summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/CODEOWNERS1
-rw-r--r--.github/actions/godot-build/action.yml36
-rw-r--r--.github/actions/godot-cache/action.yml22
-rw-r--r--.github/actions/godot-deps/action.yml27
-rw-r--r--.github/actions/upload-artifact/action.yml19
-rw-r--r--.github/workflows/android_builds.yml66
-rw-r--r--.github/workflows/ios_builds.yml64
-rw-r--r--.github/workflows/javascript_builds.yml73
-rw-r--r--.github/workflows/linux_builds.yml259
-rw-r--r--.github/workflows/macos_builds.yml135
-rw-r--r--.github/workflows/static_checks.yml4
-rw-r--r--.github/workflows/windows_builds.yml166
-rw-r--r--.gitignore5
-rw-r--r--.mailmap6
-rw-r--r--AUTHORS.md8
-rw-r--r--COPYRIGHT.txt24
-rw-r--r--DONORS.md104
-rw-r--r--SConstruct8
-rw-r--r--core/SCsub1
-rw-r--r--core/config/engine.cpp30
-rw-r--r--core/config/engine.h7
-rw-r--r--core/config/project_settings.cpp8
-rw-r--r--core/config/project_settings.h5
-rw-r--r--core/core_bind.cpp1548
-rw-r--r--core/core_bind.h194
-rw-r--r--core/core_constants.cpp13
-rw-r--r--core/doc_data.cpp18
-rw-r--r--core/doc_data.h1
-rw-r--r--core/error/error_list.cpp98
-rw-r--r--core/error/error_list.h5
-rw-r--r--core/extension/extension_api_dump.cpp23
-rw-r--r--core/extension/gdnative_interface.cpp182
-rw-r--r--core/extension/gdnative_interface.h42
-rw-r--r--core/extension/native_extension.cpp28
-rw-r--r--core/extension/native_extension.h7
-rw-r--r--core/extension/native_extension_manager.cpp19
-rw-r--r--core/extension/native_extension_manager.h3
-rw-r--r--core/input/input.cpp20
-rw-r--r--core/input/input_event.cpp15
-rw-r--r--core/input/input_event.h3
-rw-r--r--core/input/input_map.cpp126
-rw-r--r--core/input/input_map.h6
-rw-r--r--core/input/shortcut.cpp (renamed from scene/gui/shortcut.cpp)2
-rw-r--r--core/input/shortcut.h (renamed from scene/gui/shortcut.h)0
-rw-r--r--core/io/config_file.cpp4
-rw-r--r--core/io/dir_access.cpp4
-rw-r--r--core/io/http_client_tcp.cpp26
-rw-r--r--core/io/http_client_tcp.h1
-rw-r--r--core/io/image.cpp8
-rw-r--r--core/io/multiplayer_api.cpp1300
-rw-r--r--core/io/packet_peer.cpp46
-rw-r--r--core/io/packet_peer.h23
-rw-r--r--core/io/resource.cpp9
-rw-r--r--core/io/resource_format_binary.cpp4
-rw-r--r--core/io/resource_loader.cpp90
-rw-r--r--core/io/resource_loader.h12
-rw-r--r--core/io/resource_saver.cpp35
-rw-r--r--core/io/resource_saver.h6
-rw-r--r--core/io/resource_uid.cpp3
-rw-r--r--core/io/stream_peer.cpp57
-rw-r--r--core/io/stream_peer.h25
-rw-r--r--core/math/a_star.cpp96
-rw-r--r--core/math/a_star.h8
-rw-r--r--core/math/aabb.cpp4
-rw-r--r--core/math/aabb.h4
-rw-r--r--core/math/basis.cpp21
-rw-r--r--core/math/basis.h6
-rw-r--r--core/math/bvh_cull.inc2
-rw-r--r--core/math/bvh_debug.inc27
-rw-r--r--core/math/bvh_split.inc16
-rw-r--r--core/math/camera_matrix.cpp4
-rw-r--r--core/math/convex_hull.cpp28
-rw-r--r--core/math/convex_hull.h2
-rw-r--r--core/math/delaunay_2d.h2
-rw-r--r--core/math/face3.cpp4
-rw-r--r--core/math/geometry_2d.h20
-rw-r--r--core/math/rect2.h6
-rw-r--r--core/math/transform_2d.cpp24
-rw-r--r--core/math/transform_2d.h27
-rw-r--r--core/math/transform_3d.h2
-rw-r--r--core/math/triangle_mesh.cpp4
-rw-r--r--core/math/triangle_mesh.h6
-rw-r--r--core/math/triangulate.h2
-rw-r--r--core/math/vector2.cpp6
-rw-r--r--core/math/vector2.h1
-rw-r--r--core/math/vector3.cpp6
-rw-r--r--core/math/vector3.h1
-rw-r--r--core/multiplayer/SCsub5
-rw-r--r--core/multiplayer/multiplayer.h80
-rw-r--r--core/multiplayer/multiplayer_api.cpp668
-rw-r--r--core/multiplayer/multiplayer_api.h (renamed from core/io/multiplayer_api.h)140
-rw-r--r--core/multiplayer/multiplayer_peer.cpp (renamed from core/io/multiplayer_peer.cpp)185
-rw-r--r--core/multiplayer/multiplayer_peer.h (renamed from modules/gdnative/net/multiplayer_peer_gdnative.h)105
-rw-r--r--core/multiplayer/multiplayer_replicator.cpp791
-rw-r--r--core/multiplayer/multiplayer_replicator.h138
-rw-r--r--core/multiplayer/rpc_manager.cpp525
-rw-r--r--core/multiplayer/rpc_manager.h89
-rw-r--r--core/object/class_db.cpp76
-rw-r--r--core/object/class_db.h59
-rw-r--r--core/object/make_virtuals.py19
-rw-r--r--core/object/method_bind.h1
-rw-r--r--core/object/object.cpp15
-rw-r--r--core/object/object.h43
-rw-r--r--core/object/ref_counted.h4
-rw-r--r--core/object/script_language.h8
-rw-r--r--core/os/main_loop.cpp29
-rw-r--r--core/os/main_loop.h6
-rw-r--r--core/os/os.cpp25
-rw-r--r--core/os/os.h5
-rw-r--r--core/os/thread.cpp3
-rw-r--r--core/os/thread.h7
-rw-r--r--core/register_core_types.cpp100
-rw-r--r--core/string/translation.cpp13
-rw-r--r--core/string/translation.h5
-rw-r--r--core/string/ustring.cpp188
-rw-r--r--core/string/ustring.h10
-rw-r--r--core/templates/cowdata.h10
-rw-r--r--core/templates/local_vector.h2
-rw-r--r--core/templates/map.h2
-rw-r--r--core/templates/pooled_list.h14
-rw-r--r--core/templates/rid_owner.h26
-rw-r--r--core/templates/safe_list.h375
-rw-r--r--core/templates/set.h2
-rw-r--r--core/templates/vector.h4
-rw-r--r--core/variant/array.cpp37
-rw-r--r--core/variant/array.h3
-rw-r--r--core/variant/callable.cpp4
-rw-r--r--core/variant/callable.h2
-rw-r--r--core/variant/callable_bind.cpp3
-rw-r--r--core/variant/method_ptrcall.h7
-rw-r--r--core/variant/native_ptr.h131
-rw-r--r--core/variant/type_info.h29
-rw-r--r--core/variant/typed_array.h10
-rw-r--r--core/variant/variant.cpp24
-rw-r--r--core/variant/variant_call.cpp16
-rw-r--r--core/variant/variant_construct.cpp1
-rw-r--r--core/variant/variant_internal.h26
-rw-r--r--core/variant/variant_op.cpp144
-rw-r--r--core/variant/variant_op.h96
-rw-r--r--core/variant/variant_parser.cpp2
-rw-r--r--core/variant/variant_setget.cpp86
-rw-r--r--core/variant/variant_utility.cpp66
-rw-r--r--doc/Doxyfile38
-rw-r--r--doc/classes/@GlobalScope.xml136
-rw-r--r--doc/classes/AABB.xml18
-rw-r--r--doc/classes/AStar.xml6
-rw-r--r--doc/classes/AStar2D.xml6
-rw-r--r--doc/classes/AcceptDialog.xml2
-rw-r--r--doc/classes/AnimatableBody2D.xml18
-rw-r--r--doc/classes/AnimatableBody3D.xml21
-rw-r--r--doc/classes/AnimatedSprite2D.xml2
-rw-r--r--doc/classes/AnimatedSprite3D.xml2
-rw-r--r--doc/classes/AnimationNode.xml22
-rw-r--r--doc/classes/AnimationNodeAdd2.xml4
-rw-r--r--doc/classes/AnimationNodeAdd3.xml4
-rw-r--r--doc/classes/AnimationNodeAnimation.xml4
-rw-r--r--doc/classes/AnimationNodeBlend2.xml4
-rw-r--r--doc/classes/AnimationNodeBlend3.xml4
-rw-r--r--doc/classes/AnimationNodeBlendSpace1D.xml2
-rw-r--r--doc/classes/AnimationNodeOutput.xml4
-rw-r--r--doc/classes/AnimationNodeStateMachine.xml2
-rw-r--r--doc/classes/AnimationNodeStateMachinePlayback.xml2
-rw-r--r--doc/classes/AnimationNodeStateMachineTransition.xml2
-rw-r--r--doc/classes/AnimationNodeTimeScale.xml4
-rw-r--r--doc/classes/AnimationNodeTimeSeek.xml4
-rw-r--r--doc/classes/AnimationNodeTransition.xml2
-rw-r--r--doc/classes/AnimationRootNode.xml4
-rw-r--r--doc/classes/AnimationTrackEditPlugin.xml4
-rw-r--r--doc/classes/Area3D.xml9
-rw-r--r--doc/classes/Array.xml24
-rw-r--r--doc/classes/ArrayMesh.xml3
-rw-r--r--doc/classes/AspectRatioContainer.xml2
-rw-r--r--doc/classes/AtlasTexture.xml4
-rw-r--r--doc/classes/AudioBusLayout.xml4
-rw-r--r--doc/classes/AudioEffect.xml4
-rw-r--r--doc/classes/AudioEffectAmplify.xml4
-rw-r--r--doc/classes/AudioEffectBandLimitFilter.xml4
-rw-r--r--doc/classes/AudioEffectBandPassFilter.xml4
-rw-r--r--doc/classes/AudioEffectCapture.xml2
-rw-r--r--doc/classes/AudioEffectChorus.xml2
-rw-r--r--doc/classes/AudioEffectCompressor.xml4
-rw-r--r--doc/classes/AudioEffectDelay.xml4
-rw-r--r--doc/classes/AudioEffectDistortion.xml2
-rw-r--r--doc/classes/AudioEffectEQ.xml2
-rw-r--r--doc/classes/AudioEffectEQ10.xml4
-rw-r--r--doc/classes/AudioEffectEQ21.xml4
-rw-r--r--doc/classes/AudioEffectEQ6.xml4
-rw-r--r--doc/classes/AudioEffectFilter.xml2
-rw-r--r--doc/classes/AudioEffectHighPassFilter.xml4
-rw-r--r--doc/classes/AudioEffectHighShelfFilter.xml4
-rw-r--r--doc/classes/AudioEffectInstance.xml4
-rw-r--r--doc/classes/AudioEffectLimiter.xml4
-rw-r--r--doc/classes/AudioEffectLowPassFilter.xml4
-rw-r--r--doc/classes/AudioEffectLowShelfFilter.xml4
-rw-r--r--doc/classes/AudioEffectNotchFilter.xml4
-rw-r--r--doc/classes/AudioEffectPanner.xml4
-rw-r--r--doc/classes/AudioEffectPhaser.xml4
-rw-r--r--doc/classes/AudioEffectPitchShift.xml2
-rw-r--r--doc/classes/AudioEffectRecord.xml2
-rw-r--r--doc/classes/AudioEffectReverb.xml4
-rw-r--r--doc/classes/AudioEffectSpectrumAnalyzer.xml2
-rw-r--r--doc/classes/AudioEffectStereoEnhance.xml4
-rw-r--r--doc/classes/AudioListener2D.xml33
-rw-r--r--doc/classes/AudioListener3D.xml (renamed from doc/classes/Listener3D.xml)7
-rw-r--r--doc/classes/AudioStream.xml28
-rw-r--r--doc/classes/AudioStreamGenerator.xml4
-rw-r--r--doc/classes/AudioStreamGeneratorPlayback.xml2
-rw-r--r--doc/classes/AudioStreamMicrophone.xml4
-rw-r--r--doc/classes/AudioStreamPlayback.xml42
-rw-r--r--doc/classes/AudioStreamPlaybackResampled.xml4
-rw-r--r--doc/classes/AudioStreamPlayer.xml3
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml5
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml14
-rw-r--r--doc/classes/AudioStreamRandomPitch.xml4
-rw-r--r--doc/classes/BackBufferCopy.xml2
-rw-r--r--doc/classes/BaseMaterial3D.xml2
-rw-r--r--doc/classes/Basis.xml17
-rw-r--r--doc/classes/BitMap.xml2
-rw-r--r--doc/classes/Bone2D.xml2
-rw-r--r--doc/classes/BoneAttachment3D.xml2
-rw-r--r--doc/classes/BoxMesh.xml4
-rw-r--r--doc/classes/BoxShape3D.xml4
-rw-r--r--doc/classes/ButtonGroup.xml2
-rw-r--r--doc/classes/CPUParticles2D.xml148
-rw-r--r--doc/classes/CPUParticles3D.xml183
-rw-r--r--doc/classes/Callable.xml12
-rw-r--r--doc/classes/CallbackTweener.xml2
-rw-r--r--doc/classes/Camera2D.xml3
-rw-r--r--doc/classes/Camera3D.xml2
-rw-r--r--doc/classes/CameraEffects.xml4
-rw-r--r--doc/classes/CameraTexture.xml4
-rw-r--r--doc/classes/CanvasGroup.xml4
-rw-r--r--doc/classes/CanvasItem.xml14
-rw-r--r--doc/classes/CanvasItemMaterial.xml4
-rw-r--r--doc/classes/CanvasLayer.xml2
-rw-r--r--doc/classes/CanvasModulate.xml4
-rw-r--r--doc/classes/CanvasTexture.xml4
-rw-r--r--doc/classes/CapsuleMesh.xml4
-rw-r--r--doc/classes/CapsuleShape2D.xml4
-rw-r--r--doc/classes/CapsuleShape3D.xml4
-rw-r--r--doc/classes/CenterContainer.xml4
-rw-r--r--doc/classes/CharFXTransform.xml10
-rw-r--r--doc/classes/CharacterBody2D.xml34
-rw-r--r--doc/classes/CharacterBody3D.xml82
-rw-r--r--doc/classes/CheckBox.xml4
-rw-r--r--doc/classes/CheckButton.xml4
-rw-r--r--doc/classes/CircleShape2D.xml4
-rw-r--r--doc/classes/ClassDB.xml37
-rw-r--r--doc/classes/CodeEdit.xml10
-rw-r--r--doc/classes/CodeHighlighter.xml2
-rw-r--r--doc/classes/CollisionObject2D.xml2
-rw-r--r--doc/classes/CollisionObject3D.xml2
-rw-r--r--doc/classes/CollisionPolygon2D.xml2
-rw-r--r--doc/classes/CollisionPolygon3D.xml4
-rw-r--r--doc/classes/CollisionShape2D.xml4
-rw-r--r--doc/classes/CollisionShape3D.xml2
-rw-r--r--doc/classes/Color.xml10
-rw-r--r--doc/classes/ColorPicker.xml3
-rw-r--r--doc/classes/ColorPickerButton.xml3
-rw-r--r--doc/classes/ColorRect.xml4
-rw-r--r--doc/classes/ConcavePolygonShape2D.xml6
-rw-r--r--doc/classes/ConcavePolygonShape3D.xml4
-rw-r--r--doc/classes/ConfigFile.xml7
-rw-r--r--doc/classes/ConfirmationDialog.xml2
-rw-r--r--doc/classes/Control.xml26
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml2
-rw-r--r--doc/classes/ConvexPolygonShape3D.xml4
-rw-r--r--doc/classes/Crypto.xml2
-rw-r--r--doc/classes/CryptoKey.xml2
-rw-r--r--doc/classes/Cubemap.xml8
-rw-r--r--doc/classes/CubemapArray.xml4
-rw-r--r--doc/classes/Curve2D.xml2
-rw-r--r--doc/classes/Curve3D.xml2
-rw-r--r--doc/classes/CurveTexture.xml2
-rw-r--r--doc/classes/CurveXYZTexture.xml4
-rw-r--r--doc/classes/CylinderMesh.xml4
-rw-r--r--doc/classes/CylinderShape3D.xml4
-rw-r--r--doc/classes/DTLSServer.xml2
-rw-r--r--doc/classes/DampedSpringJoint2D.xml4
-rw-r--r--doc/classes/Dictionary.xml15
-rw-r--r--doc/classes/DirectionalLight2D.xml4
-rw-r--r--doc/classes/DirectionalLight3D.xml4
-rw-r--r--doc/classes/Directory.xml2
-rw-r--r--doc/classes/DisplayServer.xml2
-rw-r--r--doc/classes/EditorCommandPalette.xml27
-rw-r--r--doc/classes/EditorDebuggerPlugin.xml2
-rw-r--r--doc/classes/EditorExportPlugin.xml2
-rw-r--r--doc/classes/EditorFileSystem.xml2
-rw-r--r--doc/classes/EditorFileSystemDirectory.xml2
-rw-r--r--doc/classes/EditorImportPlugin.xml34
-rw-r--r--doc/classes/EditorInspector.xml4
-rw-r--r--doc/classes/EditorInspectorPlugin.xml22
-rw-r--r--doc/classes/EditorInterface.xml3
-rw-r--r--doc/classes/EditorNode3DGizmo.xml22
-rw-r--r--doc/classes/EditorNode3DGizmoPlugin.xml56
-rw-r--r--doc/classes/EditorPaths.xml2
-rw-r--r--doc/classes/EditorPlugin.xml110
-rw-r--r--doc/classes/EditorProperty.xml7
-rw-r--r--doc/classes/EditorResourceConversionPlugin.xml12
-rw-r--r--doc/classes/EditorResourcePicker.xml2
-rw-r--r--doc/classes/EditorResourcePreview.xml2
-rw-r--r--doc/classes/EditorResourcePreviewGenerator.xml18
-rw-r--r--doc/classes/EditorSceneImporter.xml8
-rw-r--r--doc/classes/EditorSceneImporterMesh.xml55
-rw-r--r--doc/classes/EditorSceneImporterMeshNode3D.xml4
-rw-r--r--doc/classes/EditorScenePostImport.xml4
-rw-r--r--doc/classes/EditorScript.xml2
-rw-r--r--doc/classes/EditorScriptPicker.xml4
-rw-r--r--doc/classes/EditorSelection.xml2
-rw-r--r--doc/classes/EditorSpinSlider.xml4
-rw-r--r--doc/classes/EditorSyntaxHighlighter.xml14
-rw-r--r--doc/classes/EditorTranslationParserPlugin.xml6
-rw-r--r--doc/classes/EditorVCSInterface.xml2
-rw-r--r--doc/classes/EncodedObjectAsID.xml4
-rw-r--r--doc/classes/Engine.xml67
-rw-r--r--doc/classes/EngineDebugger.xml2
-rw-r--r--doc/classes/Expression.xml2
-rw-r--r--doc/classes/File.xml18
-rw-r--r--doc/classes/FileSystemDock.xml2
-rw-r--r--doc/classes/Font.xml42
-rw-r--r--doc/classes/FontData.xml590
-rw-r--r--doc/classes/GPUParticlesAttractor3D.xml4
-rw-r--r--doc/classes/GPUParticlesAttractorBox.xml4
-rw-r--r--doc/classes/GPUParticlesAttractorSphere.xml4
-rw-r--r--doc/classes/GPUParticlesAttractorVectorField.xml4
-rw-r--r--doc/classes/GPUParticlesCollision3D.xml4
-rw-r--r--doc/classes/GPUParticlesCollisionBox.xml4
-rw-r--r--doc/classes/GPUParticlesCollisionHeightField.xml2
-rw-r--r--doc/classes/GPUParticlesCollisionSDF.xml2
-rw-r--r--doc/classes/GPUParticlesCollisionSphere.xml4
-rw-r--r--doc/classes/Geometry3D.xml2
-rw-r--r--doc/classes/Gradient.xml2
-rw-r--r--doc/classes/GradientTexture.xml7
-rw-r--r--doc/classes/GraphEdit.xml18
-rw-r--r--doc/classes/GridContainer.xml4
-rw-r--r--doc/classes/GrooveJoint2D.xml4
-rw-r--r--doc/classes/HBoxContainer.xml4
-rw-r--r--doc/classes/HMACContext.xml2
-rw-r--r--doc/classes/HScrollBar.xml10
-rw-r--r--doc/classes/HSeparator.xml4
-rw-r--r--doc/classes/HSlider.xml4
-rw-r--r--doc/classes/HSplitContainer.xml4
-rw-r--r--doc/classes/HTTPClient.xml6
-rw-r--r--doc/classes/HTTPRequest.xml5
-rw-r--r--doc/classes/HeightMapShape3D.xml4
-rw-r--r--doc/classes/Image.xml1
-rw-r--r--doc/classes/ImageTexture.xml2
-rw-r--r--doc/classes/ImageTexture3D.xml2
-rw-r--r--doc/classes/ImageTextureLayered.xml2
-rw-r--r--doc/classes/ImmediateMesh.xml2
-rw-r--r--doc/classes/InputEvent.xml2
-rw-r--r--doc/classes/InputEventAction.xml4
-rw-r--r--doc/classes/InputEventFromWindow.xml4
-rw-r--r--doc/classes/InputEventGesture.xml4
-rw-r--r--doc/classes/InputEventJoypadButton.xml4
-rw-r--r--doc/classes/InputEventJoypadMotion.xml4
-rw-r--r--doc/classes/InputEventKey.xml2
-rw-r--r--doc/classes/InputEventMIDI.xml4
-rw-r--r--doc/classes/InputEventMagnifyGesture.xml4
-rw-r--r--doc/classes/InputEventMouse.xml4
-rw-r--r--doc/classes/InputEventMouseButton.xml4
-rw-r--r--doc/classes/InputEventMouseMotion.xml4
-rw-r--r--doc/classes/InputEventPanGesture.xml4
-rw-r--r--doc/classes/InputEventScreenDrag.xml4
-rw-r--r--doc/classes/InputEventScreenTouch.xml4
-rw-r--r--doc/classes/InputEventShortcut.xml13
-rw-r--r--doc/classes/InputEventWithModifiers.xml4
-rw-r--r--doc/classes/InputMap.xml2
-rw-r--r--doc/classes/InstancePlaceholder.xml2
-rw-r--r--doc/classes/IntervalTweener.xml4
-rw-r--r--doc/classes/ItemList.xml3
-rw-r--r--doc/classes/JNISingleton.xml7
-rw-r--r--doc/classes/JSON.xml2
-rw-r--r--doc/classes/JavaClass.xml4
-rw-r--r--doc/classes/JavaClassWrapper.xml2
-rw-r--r--doc/classes/JavaScript.xml2
-rw-r--r--doc/classes/JavaScriptObject.xml4
-rw-r--r--doc/classes/Joint2D.xml4
-rw-r--r--doc/classes/Joint3D.xml4
-rw-r--r--doc/classes/KinematicCollision2D.xml2
-rw-r--r--doc/classes/KinematicCollision3D.xml97
-rw-r--r--doc/classes/Light3D.xml7
-rw-r--r--doc/classes/LightOccluder2D.xml4
-rw-r--r--doc/classes/LightmapGI.xml2
-rw-r--r--doc/classes/LightmapGIData.xml2
-rw-r--r--doc/classes/LightmapProbe.xml4
-rw-r--r--doc/classes/Lightmapper.xml4
-rw-r--r--doc/classes/LightmapperRD.xml4
-rw-r--r--doc/classes/Line2D.xml1
-rw-r--r--doc/classes/LineEdit.xml18
-rw-r--r--doc/classes/MainLoop.xml54
-rw-r--r--doc/classes/MarginContainer.xml4
-rw-r--r--doc/classes/Marshalls.xml2
-rw-r--r--doc/classes/MenuButton.xml2
-rw-r--r--doc/classes/Mesh.xml2
-rw-r--r--doc/classes/MeshDataTool.xml2
-rw-r--r--doc/classes/MeshInstance2D.xml4
-rw-r--r--doc/classes/MeshInstance3D.xml2
-rw-r--r--doc/classes/MeshLibrary.xml17
-rw-r--r--doc/classes/MeshTexture.xml4
-rw-r--r--doc/classes/MethodTweener.xml2
-rw-r--r--doc/classes/MultiMeshInstance2D.xml4
-rw-r--r--doc/classes/MultiMeshInstance3D.xml4
-rw-r--r--doc/classes/MultiplayerAPI.xml164
-rw-r--r--doc/classes/MultiplayerPeer.xml18
-rw-r--r--doc/classes/MultiplayerPeerExtension.xml99
-rw-r--r--doc/classes/MultiplayerReplicator.xml191
-rw-r--r--doc/classes/Mutex.xml5
-rw-r--r--doc/classes/NativeExtensionManager.xml6
-rw-r--r--doc/classes/NavigationAgent2D.xml2
-rw-r--r--doc/classes/NavigationAgent3D.xml2
-rw-r--r--doc/classes/NavigationMeshGenerator.xml2
-rw-r--r--doc/classes/NavigationObstacle2D.xml4
-rw-r--r--doc/classes/NavigationObstacle3D.xml4
-rw-r--r--doc/classes/NavigationPolygon.xml2
-rw-r--r--doc/classes/NavigationRegion2D.xml4
-rw-r--r--doc/classes/NavigationRegion3D.xml2
-rw-r--r--doc/classes/NavigationServer2D.xml2
-rw-r--r--doc/classes/NavigationServer3D.xml2
-rw-r--r--doc/classes/Node.xml76
-rw-r--r--doc/classes/Node2D.xml3
-rw-r--r--doc/classes/Node3DGizmo.xml4
-rw-r--r--doc/classes/NodePath.xml12
-rw-r--r--doc/classes/ORMMaterial3D.xml4
-rw-r--r--doc/classes/OS.xml21
-rw-r--r--doc/classes/Object.xml38
-rw-r--r--doc/classes/Occluder3D.xml4
-rw-r--r--doc/classes/OccluderInstance3D.xml2
-rw-r--r--doc/classes/OccluderPolygon2D.xml2
-rw-r--r--doc/classes/OmniLight3D.xml2
-rw-r--r--doc/classes/OptimizedTranslation.xml2
-rw-r--r--doc/classes/OptionButton.xml2
-rw-r--r--doc/classes/PCKPacker.xml2
-rw-r--r--doc/classes/PackedByteArray.xml14
-rw-r--r--doc/classes/PackedColorArray.xml14
-rw-r--r--doc/classes/PackedDataContainer.xml2
-rw-r--r--doc/classes/PackedDataContainerRef.xml2
-rw-r--r--doc/classes/PackedFloat32Array.xml14
-rw-r--r--doc/classes/PackedFloat64Array.xml14
-rw-r--r--doc/classes/PackedInt32Array.xml14
-rw-r--r--doc/classes/PackedInt64Array.xml14
-rw-r--r--doc/classes/PackedScene.xml26
-rw-r--r--doc/classes/PackedStringArray.xml14
-rw-r--r--doc/classes/PackedVector2Array.xml14
-rw-r--r--doc/classes/PackedVector3Array.xml14
-rw-r--r--doc/classes/PacketPeer.xml3
-rw-r--r--doc/classes/PacketPeerDTLS.xml1
-rw-r--r--doc/classes/PacketPeerExtension.xml35
-rw-r--r--doc/classes/PacketPeerStream.xml5
-rw-r--r--doc/classes/PacketPeerUDP.xml3
-rw-r--r--doc/classes/Panel.xml2
-rw-r--r--doc/classes/PanelContainer.xml4
-rw-r--r--doc/classes/PanoramaSkyMaterial.xml4
-rw-r--r--doc/classes/ParallaxBackground.xml4
-rw-r--r--doc/classes/ParallaxLayer.xml4
-rw-r--r--doc/classes/ParticlesMaterial.xml160
-rw-r--r--doc/classes/Path2D.xml4
-rw-r--r--doc/classes/Path3D.xml4
-rw-r--r--doc/classes/PathFollow2D.xml4
-rw-r--r--doc/classes/PathFollow3D.xml2
-rw-r--r--doc/classes/Performance.xml4
-rw-r--r--doc/classes/PhysicalBone2D.xml6
-rw-r--r--doc/classes/PhysicalSkyMaterial.xml4
-rw-r--r--doc/classes/PhysicsBody2D.xml12
-rw-r--r--doc/classes/PhysicsBody3D.xml16
-rw-r--r--doc/classes/PhysicsDirectBodyState2D.xml10
-rw-r--r--doc/classes/PhysicsDirectBodyState3D.xml9
-rw-r--r--doc/classes/PhysicsDirectSpaceState2D.xml23
-rw-r--r--doc/classes/PhysicsDirectSpaceState3D.xml7
-rw-r--r--doc/classes/PhysicsMaterial.xml4
-rw-r--r--doc/classes/PhysicsServer2D.xml62
-rw-r--r--doc/classes/PhysicsServer3D.xml86
-rw-r--r--doc/classes/PhysicsShapeQueryParameters2D.xml6
-rw-r--r--doc/classes/PhysicsShapeQueryParameters3D.xml6
-rw-r--r--doc/classes/PhysicsTestMotionResult2D.xml4
-rw-r--r--doc/classes/PhysicsTestMotionResult3D.xml74
-rw-r--r--doc/classes/PinJoint2D.xml4
-rw-r--r--doc/classes/Plane.xml10
-rw-r--r--doc/classes/PlaneMesh.xml4
-rw-r--r--doc/classes/PointLight2D.xml4
-rw-r--r--doc/classes/PointMesh.xml4
-rw-r--r--doc/classes/Polygon2D.xml2
-rw-r--r--doc/classes/PolygonPathFinder.xml2
-rw-r--r--doc/classes/Popup.xml4
-rw-r--r--doc/classes/PopupMenu.xml2
-rw-r--r--doc/classes/PopupPanel.xml4
-rw-r--r--doc/classes/Position2D.xml4
-rw-r--r--doc/classes/Position3D.xml4
-rw-r--r--doc/classes/PrimitiveMesh.xml2
-rw-r--r--doc/classes/PrismMesh.xml4
-rw-r--r--doc/classes/ProceduralSkyMaterial.xml4
-rw-r--r--doc/classes/ProgressBar.xml4
-rw-r--r--doc/classes/ProjectSettings.xml39
-rw-r--r--doc/classes/PropertyTweener.xml2
-rw-r--r--doc/classes/ProxyTexture.xml4
-rw-r--r--doc/classes/QuadMesh.xml4
-rw-r--r--doc/classes/Quaternion.xml10
-rw-r--r--doc/classes/RDAttachmentFormat.xml4
-rw-r--r--doc/classes/RDFramebufferPass.xml2
-rw-r--r--doc/classes/RDPipelineColorBlendState.xml4
-rw-r--r--doc/classes/RDPipelineColorBlendStateAttachment.xml2
-rw-r--r--doc/classes/RDPipelineDepthStencilState.xml4
-rw-r--r--doc/classes/RDPipelineMultisampleState.xml4
-rw-r--r--doc/classes/RDPipelineRasterizationState.xml4
-rw-r--r--doc/classes/RDPipelineSpecializationConstant.xml4
-rw-r--r--doc/classes/RDSamplerState.xml4
-rw-r--r--doc/classes/RDShaderFile.xml2
-rw-r--r--doc/classes/RDShaderSPIRV.xml2
-rw-r--r--doc/classes/RDShaderSource.xml2
-rw-r--r--doc/classes/RDTextureFormat.xml2
-rw-r--r--doc/classes/RDTextureView.xml4
-rw-r--r--doc/classes/RDUniform.xml2
-rw-r--r--doc/classes/RDVertexAttribute.xml4
-rw-r--r--doc/classes/RID.xml12
-rw-r--r--doc/classes/RandomNumberGenerator.xml4
-rw-r--r--doc/classes/Range.xml2
-rw-r--r--doc/classes/RayCast2D.xml2
-rw-r--r--doc/classes/RayCast3D.xml2
-rw-r--r--doc/classes/Rect2.xml18
-rw-r--r--doc/classes/Rect2i.xml19
-rw-r--r--doc/classes/RectangleShape2D.xml4
-rw-r--r--doc/classes/RefCounted.xml2
-rw-r--r--doc/classes/ReferenceRect.xml4
-rw-r--r--doc/classes/ReflectionProbe.xml2
-rw-r--r--doc/classes/RemoteTransform2D.xml2
-rw-r--r--doc/classes/RemoteTransform3D.xml2
-rw-r--r--doc/classes/RenderingDevice.xml34
-rw-r--r--doc/classes/RenderingServer.xml36
-rw-r--r--doc/classes/Resource.xml17
-rw-r--r--doc/classes/ResourceFormatLoader.xml32
-rw-r--r--doc/classes/ResourceFormatSaver.xml6
-rw-r--r--doc/classes/ResourceImporter.xml2
-rw-r--r--doc/classes/ResourcePreloader.xml2
-rw-r--r--doc/classes/RibbonTrailMesh.xml2
-rw-r--r--doc/classes/RichTextEffect.xml4
-rw-r--r--doc/classes/RichTextLabel.xml27
-rw-r--r--doc/classes/RigidDynamicBody2D.xml (renamed from doc/classes/RigidBody2D.xml)66
-rw-r--r--doc/classes/RigidDynamicBody3D.xml (renamed from doc/classes/RigidBody3D.xml)71
-rw-r--r--doc/classes/RootMotionView.xml4
-rw-r--r--doc/classes/SceneTree.xml10
-rw-r--r--doc/classes/SceneTreeTimer.xml4
-rw-r--r--doc/classes/Script.xml2
-rw-r--r--doc/classes/ScriptCreateDialog.xml2
-rw-r--r--doc/classes/ScriptEditor.xml2
-rw-r--r--doc/classes/ScriptEditorBase.xml9
-rw-r--r--doc/classes/ScrollBar.xml4
-rw-r--r--doc/classes/ScrollContainer.xml2
-rw-r--r--doc/classes/SegmentShape2D.xml4
-rw-r--r--doc/classes/Semaphore.xml2
-rw-r--r--doc/classes/SeparationRayShape2D.xml20
-rw-r--r--doc/classes/SeparationRayShape3D.xml20
-rw-r--r--doc/classes/Separator.xml4
-rw-r--r--doc/classes/ShaderGlobalsOverride.xml4
-rw-r--r--doc/classes/ShaderMaterial.xml2
-rw-r--r--doc/classes/Shape2D.xml2
-rw-r--r--doc/classes/Shape3D.xml2
-rw-r--r--doc/classes/Shortcut.xml2
-rw-r--r--doc/classes/Signal.xml24
-rw-r--r--doc/classes/Skeleton2D.xml3
-rw-r--r--doc/classes/Skeleton3D.xml4
-rw-r--r--doc/classes/SkeletonIK3D.xml2
-rw-r--r--doc/classes/SkeletonModification2D.xml2
-rw-r--r--doc/classes/SkeletonModification2DCCDIK.xml2
-rw-r--r--doc/classes/SkeletonModification2DFABRIK.xml2
-rw-r--r--doc/classes/SkeletonModification2DJiggle.xml2
-rw-r--r--doc/classes/SkeletonModification2DLookAt.xml2
-rw-r--r--doc/classes/SkeletonModification2DPhysicalBones.xml2
-rw-r--r--doc/classes/SkeletonModification2DStackHolder.xml2
-rw-r--r--doc/classes/SkeletonModification2DTwoBoneIK.xml2
-rw-r--r--doc/classes/SkeletonModification3D.xml2
-rw-r--r--doc/classes/SkeletonModification3DCCDIK.xml2
-rw-r--r--doc/classes/SkeletonModification3DFABRIK.xml2
-rw-r--r--doc/classes/SkeletonModification3DJiggle.xml10
-rw-r--r--doc/classes/SkeletonModification3DLookAt.xml2
-rw-r--r--doc/classes/SkeletonModification3DStackHolder.xml2
-rw-r--r--doc/classes/SkeletonModification3DTwoBoneIK.xml2
-rw-r--r--doc/classes/SkeletonModificationStack2D.xml2
-rw-r--r--doc/classes/SkeletonModificationStack3D.xml2
-rw-r--r--doc/classes/Skin.xml2
-rw-r--r--doc/classes/SkinReference.xml2
-rw-r--r--doc/classes/Sky.xml2
-rw-r--r--doc/classes/Slider.xml4
-rw-r--r--doc/classes/SoftDynamicBody3D.xml (renamed from doc/classes/SoftBody3D.xml)39
-rw-r--r--doc/classes/SphereMesh.xml4
-rw-r--r--doc/classes/SphereShape3D.xml4
-rw-r--r--doc/classes/SpinBox.xml5
-rw-r--r--doc/classes/SpotLight3D.xml4
-rw-r--r--doc/classes/SpringArm3D.xml2
-rw-r--r--doc/classes/Sprite2D.xml2
-rw-r--r--doc/classes/Sprite3D.xml4
-rw-r--r--doc/classes/SpriteFrames.xml2
-rw-r--r--doc/classes/StandardMaterial3D.xml4
-rw-r--r--doc/classes/StaticBody2D.xml27
-rw-r--r--doc/classes/StaticBody3D.xml27
-rw-r--r--doc/classes/StreamCubemap.xml4
-rw-r--r--doc/classes/StreamCubemapArray.xml4
-rw-r--r--doc/classes/StreamPeer.xml3
-rw-r--r--doc/classes/StreamPeerBuffer.xml2
-rw-r--r--doc/classes/StreamPeerExtension.xml48
-rw-r--r--doc/classes/StreamPeerSSL.xml1
-rw-r--r--doc/classes/StreamPeerTCP.xml1
-rw-r--r--doc/classes/StreamTexture2D.xml2
-rw-r--r--doc/classes/StreamTexture2DArray.xml4
-rw-r--r--doc/classes/StreamTexture3D.xml2
-rw-r--r--doc/classes/StreamTextureLayered.xml2
-rw-r--r--doc/classes/String.xml57
-rw-r--r--doc/classes/StringName.xml12
-rw-r--r--doc/classes/StyleBox.xml2
-rw-r--r--doc/classes/StyleBoxEmpty.xml4
-rw-r--r--doc/classes/StyleBoxFlat.xml3
-rw-r--r--doc/classes/StyleBoxLine.xml4
-rw-r--r--doc/classes/SubViewport.xml2
-rw-r--r--doc/classes/SubViewportContainer.xml4
-rw-r--r--doc/classes/SyntaxHighlighter.xml4
-rw-r--r--doc/classes/TCPServer.xml3
-rw-r--r--doc/classes/TabContainer.xml31
-rw-r--r--doc/classes/Tabs.xml7
-rw-r--r--doc/classes/TextEdit.xml8
-rw-r--r--doc/classes/TextParagraph.xml4
-rw-r--r--doc/classes/TextServer.xml658
-rw-r--r--doc/classes/TextServerManager.xml2
-rw-r--r--doc/classes/Texture.xml4
-rw-r--r--doc/classes/Texture2D.xml2
-rw-r--r--doc/classes/Texture2DArray.xml4
-rw-r--r--doc/classes/Texture3D.xml2
-rw-r--r--doc/classes/TextureButton.xml2
-rw-r--r--doc/classes/TextureProgressBar.xml3
-rw-r--r--doc/classes/TextureRect.xml2
-rw-r--r--doc/classes/Thread.xml11
-rw-r--r--doc/classes/TileData.xml65
-rw-r--r--doc/classes/TileMap.xml83
-rw-r--r--doc/classes/TileSet.xml304
-rw-r--r--doc/classes/TileSetAtlasSource.xml147
-rw-r--r--doc/classes/TileSetScenesCollectionSource.xml54
-rw-r--r--doc/classes/TileSetSource.xml53
-rw-r--r--doc/classes/Transform2D.xml56
-rw-r--r--doc/classes/Transform3D.xml10
-rw-r--r--doc/classes/Translation.xml20
-rw-r--r--doc/classes/TranslationServer.xml10
-rw-r--r--doc/classes/Tree.xml3
-rw-r--r--doc/classes/TreeItem.xml35
-rw-r--r--doc/classes/TriangleMesh.xml4
-rw-r--r--doc/classes/TubeTrailMesh.xml4
-rw-r--r--doc/classes/Tween.xml19
-rw-r--r--doc/classes/Tweener.xml4
-rw-r--r--doc/classes/UDPServer.xml2
-rw-r--r--doc/classes/VBoxContainer.xml4
-rw-r--r--doc/classes/VScrollBar.xml10
-rw-r--r--doc/classes/VSeparator.xml4
-rw-r--r--doc/classes/VSlider.xml4
-rw-r--r--doc/classes/VSplitContainer.xml4
-rw-r--r--doc/classes/Variant.xml4
-rw-r--r--doc/classes/Vector2.xml25
-rw-r--r--doc/classes/Vector2i.xml10
-rw-r--r--doc/classes/Vector3.xml17
-rw-r--r--doc/classes/Vector3i.xml10
-rw-r--r--doc/classes/VehicleBody3D.xml10
-rw-r--r--doc/classes/VehicleWheel3D.xml8
-rw-r--r--doc/classes/VelocityTracker3D.xml2
-rw-r--r--doc/classes/VideoPlayer.xml2
-rw-r--r--doc/classes/VideoStream.xml4
-rw-r--r--doc/classes/Viewport.xml51
-rw-r--r--doc/classes/ViewportTexture.xml4
-rw-r--r--doc/classes/VisibleOnScreenEnabler2D.xml2
-rw-r--r--doc/classes/VisibleOnScreenEnabler3D.xml4
-rw-r--r--doc/classes/VisibleOnScreenNotifier2D.xml2
-rw-r--r--doc/classes/VisibleOnScreenNotifier3D.xml2
-rw-r--r--doc/classes/VisualInstance3D.xml2
-rw-r--r--doc/classes/VisualScriptCustomNodes.xml (renamed from modules/visual_script/doc_classes/VisualScriptEditor.xml)6
-rw-r--r--doc/classes/VisualShaderNodeBillboard.xml2
-rw-r--r--doc/classes/VisualShaderNodeBooleanConstant.xml4
-rw-r--r--doc/classes/VisualShaderNodeBooleanUniform.xml4
-rw-r--r--doc/classes/VisualShaderNodeClamp.xml2
-rw-r--r--doc/classes/VisualShaderNodeColorConstant.xml4
-rw-r--r--doc/classes/VisualShaderNodeColorFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeColorOp.xml2
-rw-r--r--doc/classes/VisualShaderNodeColorUniform.xml4
-rw-r--r--doc/classes/VisualShaderNodeComment.xml4
-rw-r--r--doc/classes/VisualShaderNodeCompare.xml2
-rw-r--r--doc/classes/VisualShaderNodeConstant.xml4
-rw-r--r--doc/classes/VisualShaderNodeCubemap.xml2
-rw-r--r--doc/classes/VisualShaderNodeCubemapUniform.xml4
-rw-r--r--doc/classes/VisualShaderNodeCurveTexture.xml4
-rw-r--r--doc/classes/VisualShaderNodeCurveXYZTexture.xml4
-rw-r--r--doc/classes/VisualShaderNodeCustom.xml36
-rw-r--r--doc/classes/VisualShaderNodeDeterminant.xml4
-rw-r--r--doc/classes/VisualShaderNodeDotProduct.xml4
-rw-r--r--doc/classes/VisualShaderNodeExpression.xml4
-rw-r--r--doc/classes/VisualShaderNodeFaceForward.xml4
-rw-r--r--doc/classes/VisualShaderNodeFloatConstant.xml4
-rw-r--r--doc/classes/VisualShaderNodeFloatFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeFloatOp.xml2
-rw-r--r--doc/classes/VisualShaderNodeFloatUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeFresnel.xml4
-rw-r--r--doc/classes/VisualShaderNodeGlobalExpression.xml4
-rw-r--r--doc/classes/VisualShaderNodeGroupBase.xml2
-rw-r--r--doc/classes/VisualShaderNodeIf.xml4
-rw-r--r--doc/classes/VisualShaderNodeInput.xml2
-rw-r--r--doc/classes/VisualShaderNodeIntConstant.xml4
-rw-r--r--doc/classes/VisualShaderNodeIntFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeIntOp.xml2
-rw-r--r--doc/classes/VisualShaderNodeIntUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeIs.xml2
-rw-r--r--doc/classes/VisualShaderNodeMix.xml2
-rw-r--r--doc/classes/VisualShaderNodeMultiplyAdd.xml2
-rw-r--r--doc/classes/VisualShaderNodeOuterProduct.xml4
-rw-r--r--doc/classes/VisualShaderNodeOutput.xml4
-rw-r--r--doc/classes/VisualShaderNodeParticleAccelerator.xml2
-rw-r--r--doc/classes/VisualShaderNodeParticleBoxEmitter.xml4
-rw-r--r--doc/classes/VisualShaderNodeParticleConeVelocity.xml4
-rw-r--r--doc/classes/VisualShaderNodeParticleEmit.xml2
-rw-r--r--doc/classes/VisualShaderNodeParticleEmitter.xml4
-rw-r--r--doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml4
-rw-r--r--doc/classes/VisualShaderNodeParticleOutput.xml4
-rw-r--r--doc/classes/VisualShaderNodeParticleRandomness.xml2
-rw-r--r--doc/classes/VisualShaderNodeParticleRingEmitter.xml4
-rw-r--r--doc/classes/VisualShaderNodeParticleSphereEmitter.xml4
-rw-r--r--doc/classes/VisualShaderNodeResizableBase.xml4
-rw-r--r--doc/classes/VisualShaderNodeSDFRaymarch.xml4
-rw-r--r--doc/classes/VisualShaderNodeSDFToScreenUV.xml4
-rw-r--r--doc/classes/VisualShaderNodeSample3D.xml2
-rw-r--r--doc/classes/VisualShaderNodeScalarDerivativeFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeScreenUVToSDF.xml4
-rw-r--r--doc/classes/VisualShaderNodeSmoothStep.xml2
-rw-r--r--doc/classes/VisualShaderNodeStep.xml2
-rw-r--r--doc/classes/VisualShaderNodeSwitch.xml2
-rw-r--r--doc/classes/VisualShaderNodeTexture.xml2
-rw-r--r--doc/classes/VisualShaderNodeTexture2DArray.xml4
-rw-r--r--doc/classes/VisualShaderNodeTexture2DArrayUniform.xml4
-rw-r--r--doc/classes/VisualShaderNodeTexture3D.xml4
-rw-r--r--doc/classes/VisualShaderNodeTexture3DUniform.xml4
-rw-r--r--doc/classes/VisualShaderNodeTextureSDF.xml4
-rw-r--r--doc/classes/VisualShaderNodeTextureSDFNormal.xml4
-rw-r--r--doc/classes/VisualShaderNodeTextureUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeTextureUniformTriplanar.xml4
-rw-r--r--doc/classes/VisualShaderNodeTransformCompose.xml4
-rw-r--r--doc/classes/VisualShaderNodeTransformConstant.xml4
-rw-r--r--doc/classes/VisualShaderNodeTransformDecompose.xml4
-rw-r--r--doc/classes/VisualShaderNodeTransformFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformOp.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformUniform.xml4
-rw-r--r--doc/classes/VisualShaderNodeTransformVecMult.xml2
-rw-r--r--doc/classes/VisualShaderNodeUVFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeUniformRef.xml4
-rw-r--r--doc/classes/VisualShaderNodeVec3Constant.xml4
-rw-r--r--doc/classes/VisualShaderNodeVec3Uniform.xml4
-rw-r--r--doc/classes/VisualShaderNodeVectorCompose.xml4
-rw-r--r--doc/classes/VisualShaderNodeVectorDecompose.xml4
-rw-r--r--doc/classes/VisualShaderNodeVectorDerivativeFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeVectorDistance.xml4
-rw-r--r--doc/classes/VisualShaderNodeVectorFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeVectorLen.xml4
-rw-r--r--doc/classes/VisualShaderNodeVectorOp.xml2
-rw-r--r--doc/classes/VisualShaderNodeVectorRefract.xml4
-rw-r--r--doc/classes/VoxelGIData.xml2
-rw-r--r--doc/classes/WeakRef.xml2
-rw-r--r--doc/classes/Window.xml25
-rw-r--r--doc/classes/World2D.xml4
-rw-r--r--doc/classes/World3D.xml4
-rw-r--r--doc/classes/WorldBoundaryShape2D.xml (renamed from doc/classes/WorldMarginShape2D.xml)10
-rw-r--r--doc/classes/WorldBoundaryShape3D.xml16
-rw-r--r--doc/classes/WorldEnvironment.xml4
-rw-r--r--doc/classes/WorldMarginShape3D.xml20
-rw-r--r--doc/classes/X509Certificate.xml2
-rw-r--r--doc/classes/XRAnchor3D.xml2
-rw-r--r--doc/classes/XRCamera3D.xml4
-rw-r--r--doc/classes/XRController3D.xml2
-rw-r--r--doc/classes/XRInterface.xml33
-rw-r--r--doc/classes/XRInterfaceExtension.xml131
-rw-r--r--doc/classes/XROrigin3D.xml4
-rw-r--r--doc/classes/XRServer.xml7
-rw-r--r--doc/classes/bool.xml12
-rw-r--r--doc/classes/float.xml20
-rw-r--r--doc/classes/int.xml26
-rwxr-xr-xdoc/tools/makerst.py5
-rw-r--r--doc/translations/ar.po6
-rw-r--r--doc/translations/ca.po6
-rw-r--r--doc/translations/classes.pot6
-rw-r--r--doc/translations/cs.po6
-rw-r--r--doc/translations/de.po6
-rw-r--r--doc/translations/es.po10
-rw-r--r--doc/translations/fa.po6
-rw-r--r--doc/translations/fi.po6
-rw-r--r--doc/translations/fr.po6
-rw-r--r--doc/translations/id.po6
-rw-r--r--doc/translations/it.po6
-rw-r--r--doc/translations/ja.po6
-rw-r--r--doc/translations/ko.po6
-rw-r--r--doc/translations/nl.po6
-rw-r--r--doc/translations/pl.po6
-rw-r--r--doc/translations/pt_BR.po6
-rw-r--r--doc/translations/ro.po6
-rw-r--r--doc/translations/ru.po6
-rw-r--r--doc/translations/sr_Cyrl.po6
-rw-r--r--doc/translations/th.po6
-rw-r--r--doc/translations/tr.po6
-rw-r--r--doc/translations/uk.po6
-rw-r--r--doc/translations/zh_Hans.po6
-rw-r--r--doc/translations/zh_Hant.po6
-rw-r--r--drivers/register_driver_types.cpp3
-rw-r--r--drivers/unix/dir_access_unix.cpp26
-rw-r--r--drivers/unix/os_unix.cpp2
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp283
-rw-r--r--drivers/vulkan/rendering_device_vulkan.h5
-rw-r--r--drivers/vulkan/vulkan_context.cpp25
-rw-r--r--drivers/vulkan/vulkan_context.h4
-rw-r--r--drivers/wasapi/audio_driver_wasapi.cpp146
-rw-r--r--drivers/wasapi/audio_driver_wasapi.h3
-rw-r--r--drivers/windows/dir_access_windows.cpp10
-rw-r--r--editor/action_map_editor.cpp49
-rw-r--r--editor/action_map_editor.h2
-rw-r--r--editor/animation_bezier_editor.cpp56
-rw-r--r--editor/animation_bezier_editor.h41
-rw-r--r--editor/animation_track_editor.cpp10
-rw-r--r--editor/animation_track_editor.h4
-rw-r--r--editor/animation_track_editor_plugins.cpp4
-rw-r--r--editor/animation_track_editor_plugins.h2
-rw-r--r--editor/code_editor.cpp63
-rw-r--r--editor/code_editor.h6
-rw-r--r--editor/create_dialog.cpp2
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_parser.cpp203
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_parser.h16
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_protocol.cpp541
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_protocol.h17
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_server.cpp31
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_server.h2
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_types.h10
-rw-r--r--editor/debugger/editor_debugger_node.cpp22
-rw-r--r--editor/debugger/editor_debugger_node.h7
-rw-r--r--editor/debugger/editor_debugger_server.cpp17
-rw-r--r--editor/debugger/editor_debugger_server.h2
-rw-r--r--editor/debugger/script_editor_debugger.cpp33
-rw-r--r--editor/debugger/script_editor_debugger.h3
-rw-r--r--editor/doc_tools.cpp242
-rw-r--r--editor/editor_audio_buses.cpp6
-rw-r--r--editor/editor_audio_buses.h2
-rw-r--r--editor/editor_autoload_settings.cpp36
-rw-r--r--editor/editor_autoload_settings.h1
-rw-r--r--editor/editor_command_palette.cpp137
-rw-r--r--editor/editor_command_palette.h13
-rw-r--r--editor/editor_data.cpp51
-rw-r--r--editor/editor_data.h7
-rw-r--r--editor/editor_dir_dialog.cpp1
-rw-r--r--editor/editor_export.cpp29
-rw-r--r--editor/editor_export.h4
-rw-r--r--editor/editor_file_dialog.cpp10
-rw-r--r--editor/editor_file_dialog.h2
-rw-r--r--editor/editor_file_system.cpp87
-rw-r--r--editor/editor_file_system.h2
-rw-r--r--editor/editor_fonts.cpp400
-rw-r--r--editor/editor_help.cpp84
-rw-r--r--editor/editor_help.h7
-rw-r--r--editor/editor_help_search.cpp2
-rw-r--r--editor/editor_inspector.cpp1475
-rw-r--r--editor/editor_inspector.h159
-rw-r--r--editor/editor_log.cpp2
-rw-r--r--editor/editor_node.cpp367
-rw-r--r--editor/editor_node.h17
-rw-r--r--editor/editor_plugin.cpp164
-rw-r--r--editor/editor_plugin.h26
-rw-r--r--editor/editor_properties.cpp362
-rw-r--r--editor/editor_properties.h32
-rw-r--r--editor/editor_properties_array_dict.cpp4
-rw-r--r--editor/editor_resource_picker.cpp24
-rw-r--r--editor/editor_resource_picker.h4
-rw-r--r--editor/editor_resource_preview.cpp35
-rw-r--r--editor/editor_resource_preview.h6
-rw-r--r--editor/editor_run_native.cpp18
-rw-r--r--editor/editor_run_native.h3
-rw-r--r--editor/editor_run_script.cpp16
-rw-r--r--editor/editor_run_script.h1
-rw-r--r--editor/editor_settings.cpp326
-rw-r--r--editor/editor_settings.h3
-rw-r--r--editor/editor_spin_slider.cpp71
-rw-r--r--editor/editor_spin_slider.h3
-rw-r--r--editor/editor_themes.cpp41
-rw-r--r--editor/editor_translation_parser.cpp23
-rw-r--r--editor/editor_translation_parser.h5
-rw-r--r--editor/export_template_manager.cpp2
-rw-r--r--editor/filesystem_dock.cpp21
-rw-r--r--editor/icons/AddSplit.svg1
-rw-r--r--editor/icons/AnimatableBody2D.svg1
-rw-r--r--editor/icons/AnimatableBody3D.svg1
-rw-r--r--editor/icons/AudioListener2D.svg1
-rw-r--r--editor/icons/AudioListener3D.svg (renamed from editor/icons/Listener3D.svg)0
-rw-r--r--editor/icons/AutoEndBackwards.svg1
-rw-r--r--editor/icons/AutoPlayBackwards.svg1
-rw-r--r--editor/icons/BoneTrack.svg1
-rw-r--r--editor/icons/Breakpoint.svg1
-rw-r--r--editor/icons/CanvasItemShader.svg1
-rw-r--r--editor/icons/CanvasItemShaderGraph.svg1
-rw-r--r--editor/icons/ColorRamp.svg1
-rw-r--r--editor/icons/ControlAlignCenterLeft.svg1
-rw-r--r--editor/icons/ControlAlignCenterRight.svg1
-rw-r--r--editor/icons/DeleteSplit.svg1
-rw-r--r--editor/icons/EditResource.svg1
-rw-r--r--editor/icons/EditorInternalHandle.svg1
-rw-r--r--editor/icons/ErrorSign.svg1
-rw-r--r--editor/icons/FixedMaterial.svg1
-rw-r--r--editor/icons/FixedSpatialMaterial.svg1
-rw-r--r--editor/icons/GizmoAudioListener3D.svg (renamed from editor/icons/GizmoListener.svg)0
-rw-r--r--editor/icons/GizmoCamera.svg1
-rw-r--r--editor/icons/GuiCheckedDisabled.svg1
-rw-r--r--editor/icons/GuiHTick.svg1
-rw-r--r--editor/icons/GuiIndeterminate.svg1
-rw-r--r--editor/icons/GuiRadioCheckedDisabled.svg1
-rw-r--r--editor/icons/GuiRadioUncheckedDisabled.svg1
-rw-r--r--editor/icons/GuiResizerMirrored.svg1
-rw-r--r--editor/icons/GuiSpinboxUpdownDisabled.svg1
-rw-r--r--editor/icons/GuiTabMirrored.svg1
-rw-r--r--editor/icons/GuiTreeArrowUp.svg1
-rw-r--r--editor/icons/GuiUncheckedDisabled.svg1
-rw-r--r--editor/icons/GuiVTick.svg1
-rw-r--r--editor/icons/Headphones.svg1
-rw-r--r--editor/icons/InformationSign.svg1
-rw-r--r--editor/icons/InverseKinematics.svg1
-rw-r--r--editor/icons/Issue.svg1
-rw-r--r--editor/icons/KeyHover.svg1
-rw-r--r--editor/icons/LoopInterpolation.svg1
-rw-r--r--editor/icons/MirrorX.svg1
-rw-r--r--editor/icons/MirrorY.svg1
-rw-r--r--editor/icons/MultiEdit.svg1
-rw-r--r--editor/icons/MultiLine.svg1
-rw-r--r--editor/icons/PageFirst.svg47
-rw-r--r--editor/icons/PageLast.svg47
-rw-r--r--editor/icons/PageNext.svg42
-rw-r--r--editor/icons/PagePrevious.svg42
-rw-r--r--editor/icons/Portal.svg1
-rw-r--r--editor/icons/Rayito.svg1
-rw-r--r--editor/icons/RigidDynamicBody2D.svg (renamed from editor/icons/RigidBody2D.svg)0
-rw-r--r--editor/icons/RigidDynamicBody3D.svg (renamed from editor/icons/RigidBody3D.svg)0
-rw-r--r--editor/icons/Room.svg1
-rw-r--r--editor/icons/RoomBounds.svg1
-rw-r--r--editor/icons/Rotate0.svg1
-rw-r--r--editor/icons/Rotate180.svg1
-rw-r--r--editor/icons/Rotate270.svg1
-rw-r--r--editor/icons/Rotate90.svg1
-rw-r--r--editor/icons/RotateLeft.svg1
-rw-r--r--editor/icons/RotateRight.svg1
-rw-r--r--editor/icons/SeparationRayShape2D.svg1
-rw-r--r--editor/icons/SeparationRayShape3D.svg1
-rw-r--r--editor/icons/SoftDynamicBody3D.svg (renamed from editor/icons/SoftBody3D.svg)0
-rw-r--r--editor/icons/TestCube.svg1
-rw-r--r--editor/icons/Texture2DArray.svg (renamed from editor/icons/TextureArray.svg)0
-rw-r--r--editor/icons/TrackAddKey.svg1
-rw-r--r--editor/icons/TrackAddKeyHl.svg1
-rw-r--r--editor/icons/Unbone.svg1
-rw-r--r--editor/icons/VisualShaderNodeTexture2DArrayUniform.svg (renamed from editor/icons/VisualShaderNodeTexture2DUniformTriplanar.svg)0
-rw-r--r--editor/icons/VisualShaderNodeTexture3DUniform.svg1
-rw-r--r--editor/icons/VisualShaderNodeTextureUniform.svg1
-rw-r--r--editor/icons/VisualShaderNodeTextureUniformTriplanar.svg1
-rw-r--r--editor/icons/WorldBoundaryShape2D.svg (renamed from editor/icons/WorldMarginShape2D.svg)0
-rw-r--r--editor/icons/WorldBoundaryShape3D.svg (renamed from editor/icons/WorldMarginShape3D.svg)0
-rw-r--r--editor/import/collada.cpp9
-rw-r--r--editor/import/dynamicfont_import_settings.cpp1906
-rw-r--r--editor/import/dynamicfont_import_settings.h167
-rw-r--r--editor/import/editor_import_collada.cpp120
-rw-r--r--editor/import/editor_import_plugin.cpp170
-rw-r--r--editor/import/editor_import_plugin.h13
-rw-r--r--editor/import/resource_importer_bmfont.cpp797
-rw-r--r--editor/import/resource_importer_bmfont.h (renamed from modules/gdnative/net/packet_peer_gdnative.h)41
-rw-r--r--editor/import/resource_importer_dynamicfont.cpp304
-rw-r--r--editor/import/resource_importer_dynamicfont.h (renamed from core/io/multiplayer_peer.h)72
-rw-r--r--editor/import/resource_importer_imagefont.cpp162
-rw-r--r--editor/import/resource_importer_imagefont.h58
-rw-r--r--editor/import/resource_importer_obj.h3
-rw-r--r--editor/import/resource_importer_scene.cpp246
-rw-r--r--editor/import/resource_importer_scene.h209
-rw-r--r--editor/import/resource_importer_shader_file.cpp2
-rw-r--r--editor/import/resource_importer_texture.cpp2
-rw-r--r--editor/import/resource_importer_texture_atlas.cpp6
-rw-r--r--editor/import/scene_import_settings.cpp76
-rw-r--r--editor/import/scene_import_settings.h4
-rw-r--r--editor/import/scene_importer_mesh.cpp94
-rw-r--r--editor/import/scene_importer_mesh.h12
-rw-r--r--editor/import_dock.cpp18
-rw-r--r--editor/import_dock.h1
-rw-r--r--editor/inspector_dock.cpp128
-rw-r--r--editor/inspector_dock.h8
-rw-r--r--editor/multi_node_edit.cpp13
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp8
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.cpp15
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp76
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.h18
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp82
-rw-r--r--editor/plugins/animation_player_editor_plugin.h11
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp6
-rw-r--r--editor/plugins/asset_library_editor_plugin.h2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp40
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h2
-rw-r--r--editor/plugins/collision_polygon_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp98
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.h3
-rw-r--r--editor/plugins/cpu_particles_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/curve_editor_plugin.cpp6
-rw-r--r--editor/plugins/curve_editor_plugin.h4
-rw-r--r--editor/plugins/editor_preview_plugins.cpp65
-rw-r--r--editor/plugins/font_editor_plugin.cpp247
-rw-r--r--editor/plugins/font_editor_plugin.h33
-rw-r--r--editor/plugins/gpu_particles_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/gpu_particles_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp2
-rw-r--r--editor/plugins/item_list_editor_plugin.cpp12
-rw-r--r--editor/plugins/item_list_editor_plugin.h2
-rw-r--r--editor/plugins/lightmap_gi_editor_plugin.cpp4
-rw-r--r--editor/plugins/material_editor_plugin.cpp12
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp8
-rw-r--r--editor/plugins/mesh_editor_plugin.h3
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.cpp3
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp59
-rw-r--r--editor/plugins/mesh_library_editor_plugin.h14
-rw-r--r--editor/plugins/node_3d_editor_gizmos.cpp409
-rw-r--r--editor/plugins/node_3d_editor_gizmos.h56
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp90
-rw-r--r--editor/plugins/node_3d_editor_plugin.h8
-rw-r--r--editor/plugins/occluder_instance_3d_editor_plugin.cpp4
-rw-r--r--editor/plugins/packed_scene_translation_parser_plugin.cpp49
-rw-r--r--editor/plugins/packed_scene_translation_parser_plugin.h4
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/path_3d_editor_plugin.cpp9
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp28
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp4
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.h2
-rw-r--r--editor/plugins/script_editor_plugin.cpp147
-rw-r--r--editor/plugins/script_editor_plugin.h15
-rw-r--r--editor/plugins/script_text_editor.cpp55
-rw-r--r--editor/plugins/script_text_editor.h4
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.cpp5
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp128
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.h3
-rw-r--r--editor/plugins/text_editor.cpp5
-rw-r--r--editor/plugins/text_editor.h3
-rw-r--r--editor/plugins/texture_3d_editor_plugin.cpp6
-rw-r--r--editor/plugins/texture_3d_editor_plugin.h1
-rw-r--r--editor/plugins/texture_editor_plugin.cpp27
-rw-r--r--editor/plugins/texture_editor_plugin.h2
-rw-r--r--editor/plugins/texture_layered_editor_plugin.cpp9
-rw-r--r--editor/plugins/texture_layered_editor_plugin.h2
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp125
-rw-r--r--editor/plugins/texture_region_editor_plugin.h4
-rw-r--r--editor/plugins/theme_editor_preview.cpp4
-rw-r--r--editor/plugins/tiles/atlas_merging_dialog.cpp12
-rw-r--r--editor/plugins/tiles/tile_atlas_view.cpp45
-rw-r--r--editor/plugins/tiles/tile_atlas_view.h2
-rw-r--r--editor/plugins/tiles/tile_data_editors.cpp157
-rw-r--r--editor/plugins/tiles/tile_map_editor.cpp138
-rw-r--r--editor/plugins/tiles/tile_map_editor.h2
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.cpp267
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.h1
-rw-r--r--editor/plugins/tiles/tile_set_editor.cpp225
-rw-r--r--editor/plugins/tiles/tile_set_editor.h1
-rw-r--r--editor/plugins/tiles/tiles_editor_plugin.cpp2
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp120
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h6
-rw-r--r--editor/plugins/voxel_gi_editor_plugin.cpp2
-rw-r--r--editor/pot_generator.cpp13
-rw-r--r--editor/project_manager.cpp7
-rw-r--r--editor/project_manager.h2
-rw-r--r--editor/project_settings_editor.cpp1
-rw-r--r--editor/property_editor.cpp33
-rw-r--r--editor/property_editor.h4
-rw-r--r--editor/property_selector.cpp2
-rw-r--r--editor/quick_open.cpp8
-rw-r--r--editor/rename_dialog.cpp12
-rw-r--r--editor/rename_dialog.h7
-rw-r--r--editor/scene_tree_dock.cpp88
-rw-r--r--editor/scene_tree_dock.h9
-rw-r--r--editor/scene_tree_editor.cpp20
-rw-r--r--editor/settings_config_dialog.cpp15
-rw-r--r--editor/settings_config_dialog.h2
-rw-r--r--editor/shader_create_dialog.cpp12
-rw-r--r--editor/translations/af.po324
-rw-r--r--editor/translations/ar.po722
-rw-r--r--editor/translations/az.po350
-rw-r--r--editor/translations/bg.po985
-rw-r--r--editor/translations/bn.po366
-rw-r--r--editor/translations/br.po316
-rw-r--r--editor/translations/ca.po368
-rw-r--r--editor/translations/cs.po399
-rw-r--r--editor/translations/da.po329
-rw-r--r--editor/translations/de.po454
-rw-r--r--editor/translations/editor.pot315
-rw-r--r--editor/translations/el.po387
-rw-r--r--editor/translations/eo.po552
-rw-r--r--editor/translations/es.po460
-rw-r--r--editor/translations/es_AR.po803
-rw-r--r--editor/translations/et.po329
-rw-r--r--editor/translations/eu.po322
-rw-r--r--editor/translations/fa.po369
-rw-r--r--editor/translations/fi.po1160
-rw-r--r--editor/translations/fil.po317
-rw-r--r--editor/translations/fr.po515
-rw-r--r--editor/translations/ga.po316
-rw-r--r--editor/translations/gl.po373
-rw-r--r--editor/translations/he.po364
-rw-r--r--editor/translations/hi.po329
-rw-r--r--editor/translations/hr.po349
-rw-r--r--editor/translations/hu.po346
-rw-r--r--editor/translations/id.po816
-rw-r--r--editor/translations/is.po321
-rw-r--r--editor/translations/it.po587
-rw-r--r--editor/translations/ja.po1453
-rw-r--r--editor/translations/ka.po324
-rw-r--r--editor/translations/km.po316
-rw-r--r--editor/translations/ko.po1996
-rw-r--r--editor/translations/lt.po324
-rw-r--r--editor/translations/lv.po323
-rw-r--r--editor/translations/mi.po315
-rw-r--r--editor/translations/mk.po315
-rw-r--r--editor/translations/ml.po316
-rw-r--r--editor/translations/mr.po316
-rw-r--r--editor/translations/ms.po355
-rw-r--r--editor/translations/nb.po362
-rw-r--r--editor/translations/nl.po387
-rw-r--r--editor/translations/or.po315
-rw-r--r--editor/translations/pl.po1372
-rw-r--r--editor/translations/pr.po326
-rw-r--r--editor/translations/pt.po1374
-rw-r--r--editor/translations/pt_BR.po532
-rw-r--r--editor/translations/ro.po334
-rw-r--r--editor/translations/ru.po440
-rw-r--r--editor/translations/si.po318
-rw-r--r--editor/translations/sk.po331
-rw-r--r--editor/translations/sl.po329
-rw-r--r--editor/translations/sq.po327
-rw-r--r--editor/translations/sr_Cyrl.po368
-rw-r--r--editor/translations/sr_Latn.po324
-rw-r--r--editor/translations/sv.po355
-rw-r--r--editor/translations/ta.po320
-rw-r--r--editor/translations/te.po315
-rw-r--r--editor/translations/th.po383
-rw-r--r--editor/translations/tr.po763
-rw-r--r--editor/translations/tt.po315
-rw-r--r--editor/translations/tzm.po315
-rw-r--r--editor/translations/uk.po434
-rw-r--r--editor/translations/ur_PK.po324
-rw-r--r--editor/translations/vi.po483
-rw-r--r--editor/translations/zh_CN.po524
-rw-r--r--editor/translations/zh_HK.po331
-rw-r--r--editor/translations/zh_TW.po387
-rw-r--r--main/main.cpp83
-rw-r--r--main/main_timer_sync.cpp43
-rw-r--r--methods.py31
-rw-r--r--misc/dist/document_icons/shader.svg1
-rw-r--r--misc/dist/document_icons/shader_extra_small.svg1
-rw-r--r--misc/dist/document_icons/shader_small.svg1
-rw-r--r--misc/dist/html/editor.html2
-rw-r--r--misc/dist/html/full-size.html2
-rw-r--r--misc/dist/linux/org.godotengine.Godot.xml2
-rw-r--r--misc/dist/osx_tools.app/Contents/Info.plist36
-rw-r--r--misc/dist/osx_tools.app/Contents/Resources/Godot.icnsbin67500 -> 271163 bytes
-rw-r--r--misc/dist/osx_tools.app/Contents/Resources/Shader.icnsbin0 -> 162062 bytes
-rw-r--r--misc/dist/windows/modpath.pas4
-rwxr-xr-xmisc/hooks/canonicalize_filename.sh2
-rwxr-xr-xmisc/scripts/black_format.sh2
-rwxr-xr-xmisc/scripts/clang_format.sh2
-rwxr-xr-xmisc/scripts/file_format.sh5
-rwxr-xr-xmisc/scripts/make_icons.sh2
-rw-r--r--modules/bullet/SCsub11
-rw-r--r--modules/bullet/bullet_physics_server.cpp364
-rw-r--r--modules/bullet/rigid_body_bullet.cpp12
-rw-r--r--modules/bullet/rigid_body_bullet.h2
-rw-r--r--modules/bullet/shape_bullet.cpp20
-rw-r--r--modules/bullet/shape_bullet.h6
-rw-r--r--modules/bullet/space_bullet.cpp31
-rw-r--r--modules/bullet/space_bullet.h12
-rw-r--r--modules/camera/camera_osx.mm22
-rw-r--r--modules/csg/csg.cpp44
-rw-r--r--modules/csg/csg_shape.cpp452
-rw-r--r--modules/csg/csg_shape.h18
-rw-r--r--modules/csg/doc_classes/CSGBox3D.xml4
-rw-r--r--modules/csg/doc_classes/CSGCombiner3D.xml4
-rw-r--r--modules/csg/doc_classes/CSGCylinder3D.xml4
-rw-r--r--modules/csg/doc_classes/CSGMesh3D.xml4
-rw-r--r--modules/csg/doc_classes/CSGPolygon3D.xml17
-rw-r--r--modules/csg/doc_classes/CSGPrimitive3D.xml4
-rw-r--r--modules/csg/doc_classes/CSGSphere3D.xml4
-rw-r--r--modules/csg/doc_classes/CSGTorus3D.xml4
-rw-r--r--modules/enet/doc_classes/ENetConnection.xml3
-rw-r--r--modules/enet/doc_classes/ENetMultiplayerPeer.xml8
-rw-r--r--modules/enet/doc_classes/ENetPacketPeer.xml1
-rw-r--r--modules/enet/enet_multiplayer_peer.cpp49
-rw-r--r--modules/enet/enet_multiplayer_peer.h42
-rw-r--r--modules/etcpak/image_compress_etcpak.cpp4
-rw-r--r--modules/fbx/data/fbx_material.cpp6
-rw-r--r--modules/fbx/doc_classes/EditorSceneImporterFBX.xml4
-rw-r--r--modules/fbx/fbx_parser/FBXParser.cpp2
-rw-r--r--modules/gdnative/SCsub2
-rw-r--r--modules/gdnative/config.py6
-rw-r--r--modules/gdnative/doc_classes/GDNative.xml2
-rw-r--r--modules/gdnative/doc_classes/GDNativeLibrary.xml4
-rw-r--r--modules/gdnative/doc_classes/MultiplayerPeerGDNative.xml13
-rw-r--r--modules/gdnative/doc_classes/NativeScript.xml2
-rw-r--r--modules/gdnative/doc_classes/PluginScript.xml2
-rw-r--r--modules/gdnative/doc_classes/StreamPeerGDNative.xml13
-rw-r--r--modules/gdnative/doc_classes/VideoStreamGDNative.xml2
-rw-r--r--modules/gdnative/doc_classes/WebRTCDataChannelGDNative.xml13
-rw-r--r--modules/gdnative/doc_classes/WebRTCPeerConnectionGDNative.xml13
-rw-r--r--modules/gdnative/doc_classes/XRInterfaceGDNative.xml15
-rw-r--r--modules/gdnative/gdnative_api.json258
-rw-r--r--modules/gdnative/gdnative_builders.py2
-rw-r--r--modules/gdnative/include/nativescript/godot_nativescript.h8
-rw-r--r--modules/gdnative/include/net/godot_net.h122
-rw-r--r--modules/gdnative/include/net/godot_webrtc.h123
-rw-r--r--modules/gdnative/include/text/godot_text.h158
-rw-r--r--modules/gdnative/include/xr/godot_xr.h98
-rw-r--r--modules/gdnative/nativescript/api_generator.cpp8
-rw-r--r--modules/gdnative/nativescript/godot_nativescript.cpp4
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp6
-rw-r--r--modules/gdnative/nativescript/nativescript.h6
-rw-r--r--modules/gdnative/net/SCsub12
-rw-r--r--modules/gdnative/net/multiplayer_peer_gdnative.cpp136
-rw-r--r--modules/gdnative/net/register_types.cpp43
-rw-r--r--modules/gdnative/net/stream_peer_gdnative.h60
-rw-r--r--modules/gdnative/net/webrtc_gdnative.cpp60
-rw-r--r--modules/gdnative/pluginscript/pluginscript_instance.cpp2
-rw-r--r--modules/gdnative/pluginscript/pluginscript_instance.h2
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.cpp8
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.h4
-rw-r--r--modules/gdnative/register_types.cpp6
-rw-r--r--modules/gdnative/text/text_server_gdnative.cpp534
-rw-r--r--modules/gdnative/text/text_server_gdnative.h174
-rw-r--r--modules/gdnative/xr/SCsub6
-rw-r--r--modules/gdnative/xr/xr_interface_gdnative.cpp450
-rw-r--r--modules/gdscript/doc_classes/GDScript.xml2
-rw-r--r--modules/gdscript/editor/gdscript_highlighter.cpp22
-rw-r--r--modules/gdscript/editor/gdscript_highlighter.h6
-rw-r--r--modules/gdscript/gdscript.cpp42
-rw-r--r--modules/gdscript/gdscript.h7
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp280
-rw-r--r--modules/gdscript/gdscript_analyzer.h8
-rw-r--r--modules/gdscript/gdscript_byte_codegen.cpp8
-rw-r--r--modules/gdscript/gdscript_byte_codegen.h3
-rw-r--r--modules/gdscript/gdscript_cache.cpp12
-rw-r--r--modules/gdscript/gdscript_cache.h1
-rw-r--r--modules/gdscript/gdscript_codegen.h5
-rw-r--r--modules/gdscript/gdscript_compiler.cpp95
-rw-r--r--modules/gdscript/gdscript_disassembler.cpp8
-rw-r--r--modules/gdscript/gdscript_editor.cpp87
-rw-r--r--modules/gdscript/gdscript_function.h11
-rw-r--r--modules/gdscript/gdscript_parser.cpp336
-rw-r--r--modules/gdscript/gdscript_parser.h14
-rw-r--r--modules/gdscript/gdscript_vm.cpp36
-rw-r--r--modules/gdscript/gdscript_warning.cpp4
-rw-r--r--modules/gdscript/gdscript_warning.h1
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.cpp17
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.h3
-rw-r--r--modules/gdscript/language_server/gdscript_language_server.cpp7
-rw-r--r--modules/gdscript/language_server/gdscript_language_server.h1
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.cpp59
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.h4
-rw-r--r--modules/gdscript/language_server/lsp.hpp22
-rw-r--r--modules/gdscript/tests/README.md8
-rw-r--r--modules/gdscript/tests/gdscript_test_runner.cpp18
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.gd3
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.gd3
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.gd5
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.gd4
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.gd5
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.gd6
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.gd6
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.gd6
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.gd7
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.gd4
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.gd7
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.gd6
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/invalid_array_index.gd3
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/invalid_array_index.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_bool.gd2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_bool.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_dictionary.gd2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_dictionary.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_mixed.gd2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_mixed.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/invalid_constant.gd5
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/invalid_constant.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/leading_number_separator.gd3
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/leading_number_separator.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/missing_argument.gd6
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/missing_argument.out (renamed from modules/gdscript/tests/scripts/parser/errors/missing_argument.out)0
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/property_used_as_function.gd4
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/property_used_as_function.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/redefine_class_constant.gd7
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/redefine_class_constant.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/redefine_local_constant.gd5
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/redefine_local_constant.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/super_nonexistent_base_method.gd11
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/super_nonexistent_base_method.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/variable_name_shadows_builtin_type.gd4
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/variable_name_shadows_builtin_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/as.gd16
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/as.out8
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/auto_inferred_type_dont_error.gd9
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/auto_inferred_type_dont_error.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/call_static_builtin_function.gd3
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/call_static_builtin_function.out3
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/constants_from_parent.gd16
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/constants_from_parent.out4
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/enum_from_parent.gd14
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/enum_from_parent.out4
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/enum_value_from_parent.gd14
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/enum_value_from_parent.out4
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/gdscript_to_preload.gd5
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/gdscript_to_preload.out1
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/inner_class_as_return_type.gd11
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/inner_class_as_return_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/static_method_builtin_type.gd2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/static_method_builtin_type.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/use_preload_script_as_type.gd5
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/use_preload_script_as_type.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/array_consecutive_commas.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/array_consecutive_commas.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_2_equal_signs.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_2_equal_signs.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_3_equal_signs.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_3_equal_signs.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_in_if.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_in_if.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_in_var.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_in_var.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_in_var_if.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_in_var_if.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_without_identifier.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_without_identifier.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/binary_complement_without_argument.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/binary_complement_without_argument.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument_using_bang.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument_using_bang.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/brace_syntax.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/brace_syntax.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.gd6
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/constant_conflicts_variable.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/constant_conflicts_variable.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/default_value_in_function_call.gd7
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/default_value_in_function_call.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/function_conflicts_constant.gd5
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/function_conflicts_constant.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/function_conflicts_variable.gd7
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/function_conflicts_variable.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/invalid_escape_sequence.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/invalid_escape_sequence.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/invalid_identifier_number.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/invalid_identifier_number.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/invalid_identifier_string.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/invalid_identifier_string.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/invalid_ternary_operator.gd5
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/invalid_ternary_operator.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/missing_argument.gd6
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/missing_closing_expr_paren.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/missing_colon.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/missing_expression_after_ternary_else.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/missing_expression_after_ternary_else.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/missing_paren_after_args.gd6
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/mistaken_decrement_operator.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/mistaken_decrement_operator.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/mistaken_increment_operator.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/mistaken_increment_operator.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/multiple_number_separators.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/multiple_number_separators.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/nothing_after_dollar.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/redefine_keyword.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/redefine_keyword.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/redefine_local_constant_with_keyword.gd5
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/redefine_local_constant_with_keyword.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/subscript_without_index.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/subscript_without_index.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/variable_conflicts_constant.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/variable_conflicts_constant.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/variable_conflicts_function.gd6
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/variable_conflicts_function.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/vcs_conflict_marker.gd13
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/vcs_conflict_marker.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar_slash.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.gd6
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.gd34
-rw-r--r--modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.out14
-rw-r--r--modules/gdscript/tests/scripts/parser/features/array.gd16
-rw-r--r--modules/gdscript/tests/scripts/parser/features/array.out11
-rw-r--r--modules/gdscript/tests/scripts/parser/features/basic_expression_matching.gd27
-rw-r--r--modules/gdscript/tests/scripts/parser/features/basic_expression_matching.out10
-rw-r--r--modules/gdscript/tests/scripts/parser/features/bitwise_operators.gd50
-rw-r--r--modules/gdscript/tests/scripts/parser/features/bitwise_operators.out14
-rw-r--r--modules/gdscript/tests/scripts/parser/features/class.gd25
-rw-r--r--modules/gdscript/tests/scripts/parser/features/class.out3
-rw-r--r--modules/gdscript/tests/scripts/parser/features/class_inheritance.gd33
-rw-r--r--modules/gdscript/tests/scripts/parser/features/class_inheritance.out10
-rw-r--r--modules/gdscript/tests/scripts/parser/features/class_name.gd5
-rw-r--r--modules/gdscript/tests/scripts/parser/features/class_name.out1
-rw-r--r--modules/gdscript/tests/scripts/parser/features/concatenation.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/features/concatenation.out4
-rw-r--r--modules/gdscript/tests/scripts/parser/features/constants.gd11
-rw-r--r--modules/gdscript/tests/scripts/parser/features/constants.out33
-rw-r--r--modules/gdscript/tests/scripts/parser/features/dictionary.gd37
-rw-r--r--modules/gdscript/tests/scripts/parser/features/dictionary.out14
-rw-r--r--modules/gdscript/tests/scripts/parser/features/dictionary_lua_style.gd9
-rw-r--r--modules/gdscript/tests/scripts/parser/features/dictionary_lua_style.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/features/dictionary_mixed_syntax.gd12
-rw-r--r--modules/gdscript/tests/scripts/parser/features/dictionary_mixed_syntax.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/features/dollar_node_paths.gd20
-rw-r--r--modules/gdscript/tests/scripts/parser/features/dollar_node_paths.out1
-rw-r--r--modules/gdscript/tests/scripts/parser/features/enum.gd14
-rw-r--r--modules/gdscript/tests/scripts/parser/features/enum.out6
-rw-r--r--modules/gdscript/tests/scripts/parser/features/export_variable.gd18
-rw-r--r--modules/gdscript/tests/scripts/parser/features/export_variable.out8
-rw-r--r--modules/gdscript/tests/scripts/parser/features/float_notation.gd24
-rw-r--r--modules/gdscript/tests/scripts/parser/features/float_notation.out19
-rw-r--r--modules/gdscript/tests/scripts/parser/features/for_range.gd39
-rw-r--r--modules/gdscript/tests/scripts/parser/features/for_range.out58
-rw-r--r--modules/gdscript/tests/scripts/parser/features/function_default_parameter_type_inference.gd5
-rw-r--r--modules/gdscript/tests/scripts/parser/features/function_default_parameter_type_inference.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/features/function_many_parameters.gd5
-rw-r--r--modules/gdscript/tests/scripts/parser/features/function_many_parameters.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/features/in.gd14
-rw-r--r--modules/gdscript/tests/scripts/parser/features/in.out11
-rw-r--r--modules/gdscript/tests/scripts/parser/features/lambda_callable.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/features/lambda_callable.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/features/lambda_capture_callable.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/features/lambda_capture_callable.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/features/lambda_named_callable.gd10
-rw-r--r--modules/gdscript/tests/scripts/parser/features/lambda_named_callable.out3
-rw-r--r--modules/gdscript/tests/scripts/parser/features/match.gd18
-rw-r--r--modules/gdscript/tests/scripts/parser/features/match.out4
-rw-r--r--modules/gdscript/tests/scripts/parser/features/multiline_arrays.gd7
-rw-r--r--modules/gdscript/tests/scripts/parser/features/multiline_arrays.out1
-rw-r--r--modules/gdscript/tests/scripts/parser/features/multiline_dictionaries.gd10
-rw-r--r--modules/gdscript/tests/scripts/parser/features/multiline_dictionaries.out1
-rw-r--r--modules/gdscript/tests/scripts/parser/features/multiline_if.gd14
-rw-r--r--modules/gdscript/tests/scripts/parser/features/multiline_if.out1
-rw-r--r--modules/gdscript/tests/scripts/parser/features/multiline_strings.gd15
-rw-r--r--modules/gdscript/tests/scripts/parser/features/multiline_strings.out1
-rw-r--r--modules/gdscript/tests/scripts/parser/features/multiline_vector.gd17
-rw-r--r--modules/gdscript/tests/scripts/parser/features/multiline_vector.out1
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_arithmetic.gd22
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_arithmetic.out82
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_array.gd5
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_array.out4
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_dictionary.gd6
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_dictionary.out5
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_function_calls.gd5
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_function_calls.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_if.gd57
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_if.out21
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_match.gd79
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_match.out22
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_parentheses.gd65
-rw-r--r--modules/gdscript/tests/scripts/parser/features/nested_parentheses.out4
-rw-r--r--modules/gdscript/tests/scripts/parser/features/number_separators.gd12
-rw-r--r--modules/gdscript/tests/scripts/parser/features/number_separators.out1
-rw-r--r--modules/gdscript/tests/scripts/parser/features/operator_assign.gd8
-rw-r--r--modules/gdscript/tests/scripts/parser/features/operator_assign.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/features/property_setter_getter.gd37
-rw-r--r--modules/gdscript/tests/scripts/parser/features/property_setter_getter.out19
-rw-r--r--modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.gd5
-rw-r--r--modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/features/semicolon_as_terminator.gd22
-rw-r--r--modules/gdscript/tests/scripts/parser/features/semicolon_as_terminator.out10
-rw-r--r--modules/gdscript/tests/scripts/parser/features/signal_declaration.gd20
-rw-r--r--modules/gdscript/tests/scripts/parser/features/signal_declaration.out2
-rw-r--r--modules/gdscript/tests/scripts/parser/features/single_line_declaration.gd11
-rw-r--r--modules/gdscript/tests/scripts/parser/features/single_line_declaration.out3
-rw-r--r--modules/gdscript/tests/scripts/parser/features/space_indentation.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/features/space_indentation.out1
-rw-r--r--modules/gdscript/tests/scripts/parser/features/static_typing.gd13
-rw-r--r--modules/gdscript/tests/scripts/parser/features/static_typing.out21
-rw-r--r--modules/gdscript/tests/scripts/parser/features/str_preserves_case.gd7
-rw-r--r--modules/gdscript/tests/scripts/parser/features/str_preserves_case.out4
-rw-r--r--modules/gdscript/tests/scripts/parser/features/string_formatting.gd18
-rw-r--r--modules/gdscript/tests/scripts/parser/features/string_formatting.out11
-rw-r--r--modules/gdscript/tests/scripts/parser/features/super.gd60
-rw-r--r--modules/gdscript/tests/scripts/parser/features/super.out13
-rw-r--r--modules/gdscript/tests/scripts/parser/features/truthiness.gd30
-rw-r--r--modules/gdscript/tests/scripts/parser/features/truthiness.out65
-rw-r--r--modules/gdscript/tests/scripts/parser/features/typed_arrays.gd5
-rw-r--r--modules/gdscript/tests/scripts/parser/features/typed_arrays.out3
-rw-r--r--modules/gdscript/tests/scripts/parser/features/variable_declaration.gd22
-rw-r--r--modules/gdscript/tests/scripts/parser/features/variable_declaration.out6
-rw-r--r--modules/gdscript/tests/scripts/parser/features/while.gd5
-rw-r--r--modules/gdscript/tests/scripts/parser/features/while.out6
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/assert_always_true.gd5
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/assert_always_true.out13
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/deprecated_operators.gd8
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/deprecated_operators.out1
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.gd1
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.out4
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.gd1
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.out4
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.out4
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.out4
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/incompatible_ternary.gd8
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/incompatible_ternary.out5
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/integer_division.gd10
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/integer_division.out5
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/match_default_not_at_end.gd9
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/match_default_not_at_end.out6
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/narrowing_conversion.gd5
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/narrowing_conversion.out5
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.gd6
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out1
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/shadowed_constant.gd8
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/shadowed_constant.out9
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_class.gd8
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_class.out9
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_function.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_function.out9
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/standalone_expression.gd9
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/standalone_expression.out21
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/unassigned_variable.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/unassigned_variable.out5
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/unassigned_variable_op_assign.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/unassigned_variable_op_assign.out5
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return.gd7
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return.out5
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/unused_argument.gd12
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/unused_argument.out5
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/unused_variable.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/void_assignment.gd6
-rw-r--r--modules/gdscript/tests/scripts/parser/warnings/void_assignment.out5
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/compare-builtin-equals-null.gd138
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/compare-builtin-equals-null.out35
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/compare-builtin-not-equals-null.gd138
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/compare-builtin-not-equals-null.out35
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/compare-null-equals-builtin.gd138
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/compare-null-equals-builtin.out35
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/compare-null-not-equals-builtin.gd138
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/compare-null-not-equals-builtin.out35
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/property_with_operator_assignment.gd11
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/property_with_operator_assignment.out8
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/recursion.gd19
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/recursion.out125
-rw-r--r--modules/glslang/SCsub53
-rw-r--r--modules/gltf/config.py1
-rw-r--r--modules/gltf/doc_classes/EditorSceneImporterGLTF.xml4
-rw-r--r--modules/gltf/doc_classes/GLTFAccessor.xml4
-rw-r--r--modules/gltf/doc_classes/GLTFAnimation.xml4
-rw-r--r--modules/gltf/doc_classes/GLTFBufferView.xml4
-rw-r--r--modules/gltf/doc_classes/GLTFCamera.xml12
-rw-r--r--modules/gltf/doc_classes/GLTFDocument.xml24
-rw-r--r--modules/gltf/doc_classes/GLTFLight.xml22
-rw-r--r--modules/gltf/doc_classes/GLTFMesh.xml4
-rw-r--r--modules/gltf/doc_classes/GLTFNode.xml8
-rw-r--r--modules/gltf/doc_classes/GLTFSkeleton.xml2
-rw-r--r--modules/gltf/doc_classes/GLTFSkin.xml2
-rw-r--r--modules/gltf/doc_classes/GLTFSpecGloss.xml4
-rw-r--r--modules/gltf/doc_classes/GLTFState.xml2
-rw-r--r--modules/gltf/doc_classes/GLTFTexture.xml4
-rw-r--r--modules/gltf/doc_classes/PackedSceneGLTF.xml43
-rw-r--r--modules/gltf/editor_scene_exporter_gltf_plugin.cpp13
-rw-r--r--modules/gltf/editor_scene_exporter_gltf_plugin.h1
-rw-r--r--modules/gltf/editor_scene_importer_gltf.cpp117
-rw-r--r--modules/gltf/editor_scene_importer_gltf.h28
-rw-r--r--modules/gltf/gltf_accessor.h3
-rw-r--r--modules/gltf/gltf_animation.h2
-rw-r--r--modules/gltf/gltf_camera.cpp12
-rw-r--r--modules/gltf/gltf_camera.h12
-rw-r--r--modules/gltf/gltf_document.cpp1037
-rw-r--r--modules/gltf/gltf_document.h79
-rw-r--r--modules/gltf/gltf_light.cpp14
-rw-r--r--modules/gltf/gltf_light.h14
-rw-r--r--modules/gltf/gltf_node.cpp14
-rw-r--r--modules/gltf/gltf_node.h7
-rw-r--r--modules/gltf/gltf_state.h6
-rw-r--r--modules/gltf/register_types.cpp1
-rw-r--r--modules/gridmap/grid_map.cpp7
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp8
-rw-r--r--modules/lightmapper_rd/SCsub3
-rw-r--r--modules/lightmapper_rd/lightmapper_rd.cpp48
-rw-r--r--modules/lightmapper_rd/lightmapper_rd.h11
-rw-r--r--modules/lightmapper_rd/lm_common_inc.glsl30
-rw-r--r--modules/lightmapper_rd/lm_compute.glsl86
-rw-r--r--modules/minimp3/audio_stream_mp3.cpp12
-rw-r--r--modules/minimp3/audio_stream_mp3.h4
-rw-r--r--modules/minimp3/doc_classes/AudioStreamMP3.xml4
-rw-r--r--modules/mobile_vr/doc_classes/MobileVRInterface.xml4
-rw-r--r--modules/mobile_vr/mobile_vr_interface.cpp77
-rw-r--r--modules/mobile_vr/mobile_vr_interface.h57
-rw-r--r--modules/mobile_vr/register_types.cpp17
-rw-r--r--modules/mono/csharp_script.cpp93
-rw-r--r--modules/mono/csharp_script.h10
-rw-r--r--modules/mono/editor/GodotTools/GodotTools.BuildLogger/GodotBuildLogger.cs32
-rw-r--r--modules/mono/editor/GodotTools/GodotTools.Core/ProcessExtensions.cs2
-rw-r--r--modules/mono/editor/GodotTools/GodotTools.Core/StringExtensions.cs6
-rw-r--r--modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs80
-rw-r--r--modules/mono/editor/GodotTools/GodotTools.ProjectEditor/IdentifierUtils.cs10
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs15
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Build/BuildManager.cs2
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs122
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs44
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs6
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs7
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs22
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs85
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/HotReloadAssemblyWatcher.cs14
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Ides/GodotIdeManager.cs36
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Ides/MessagingServer.cs85
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Ides/MonoDevelop/Instance.cs26
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs23
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs13
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Internals/Globals.cs6
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs12
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Utils/FsPathUtils.cs4
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs12
-rw-r--r--modules/mono/editor/bindings_generator.cpp16
-rw-r--r--modules/mono/editor/bindings_generator.h4
-rw-r--r--modules/mono/editor/code_completion.cpp6
-rw-r--r--modules/mono/editor/editor_internal_calls.cpp9
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/AABB.cs301
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs138
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/DisableGodotGeneratorsAttribute.cs4
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttributes.cs7
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/SignalAttribute.cs4
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/ToolAttribute.cs2
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs123
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Callable.cs44
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs153
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs143
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/DynamicObject.cs40
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/NodeExtensions.cs150
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ObjectExtensions.cs24
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/PackedSceneExtensions.cs19
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs24
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/SceneTreeExtensions.cs8
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs388
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/GodotSynchronizationContext.cs3
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/GodotTraceListener.cs2
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/MarshalUtils.cs123
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs227
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/MathfEx.cs29
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/NodePath.cs162
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Object.base.cs34
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs106
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs161
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/RID.cs39
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs154
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2i.cs156
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/SignalAwaiter.cs24
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/SignalInfo.cs15
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs444
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/StringName.cs33
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs206
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs85
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/UnhandledExceptionArgs.cs2
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs187
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs98
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs187
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3i.cs104
-rw-r--r--modules/mono/glue/string_glue.cpp6
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp54
-rw-r--r--modules/mono/mono_gd/gd_mono.h16
-rw-r--r--modules/mono/mono_gd/gd_mono_cache.cpp10
-rw-r--r--modules/mono/mono_gd/gd_mono_cache.h5
-rw-r--r--modules/mono/mono_gd/gd_mono_internals.cpp6
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.cpp8
-rw-r--r--modules/mono/register_types.cpp8
-rw-r--r--modules/mono/utils/string_utils.cpp2
-rw-r--r--modules/msdfgen/SCsub66
-rw-r--r--modules/msdfgen/config.py6
-rw-r--r--modules/msdfgen/register_types.cpp (renamed from modules/gdnative/net/register_types.h)10
-rw-r--r--modules/msdfgen/register_types.h (renamed from modules/gdnative/xr/register_types.h)10
-rw-r--r--modules/navigation/godot_navigation_server.cpp82
-rw-r--r--modules/navigation/nav_map.cpp4
-rw-r--r--modules/navigation/navigation_mesh_generator.cpp2
-rw-r--r--modules/ogg/config.py11
-rw-r--r--modules/ogg/doc_classes/OGGPacketSequence.xml30
-rw-r--r--modules/ogg/doc_classes/OGGPacketSequencePlayback.xml (renamed from doc/classes/TextFile.xml)6
-rw-r--r--modules/ogg/ogg_packet_sequence.cpp220
-rw-r--r--modules/ogg/ogg_packet_sequence.h128
-rw-r--r--modules/ogg/register_types.cpp7
-rw-r--r--modules/opensimplex/doc_classes/NoiseTexture.xml4
-rw-r--r--modules/opensimplex/doc_classes/OpenSimplexNoise.xml2
-rw-r--r--modules/raycast/SCsub4
-rw-r--r--modules/raycast/godot_update_embree.py12
-rw-r--r--modules/raycast/raycast_occlusion_cull.cpp137
-rw-r--r--modules/raycast/raycast_occlusion_cull.h17
-rw-r--r--modules/regex/doc_classes/RegEx.xml2
-rw-r--r--modules/regex/doc_classes/RegExMatch.xml2
-rw-r--r--modules/stb_vorbis/SCsub27
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp270
-rw-r--r--modules/stb_vorbis/config.py16
-rw-r--r--modules/stb_vorbis/register_types.h37
-rw-r--r--modules/text_server_adv/SCsub13
-rw-r--r--modules/text_server_adv/bitmap_font_adv.cpp585
-rw-r--r--modules/text_server_adv/bitmap_font_adv.h123
-rw-r--r--modules/text_server_adv/dynamic_font_adv.cpp1030
-rw-r--r--modules/text_server_adv/dynamic_font_adv.h195
-rw-r--r--modules/text_server_adv/font_adv.h115
-rw-r--r--modules/text_server_adv/script_iterator.cpp20
-rw-r--r--modules/text_server_adv/script_iterator.h2
-rw-r--r--modules/text_server_adv/text_server_adv.cpp3313
-rw-r--r--modules/text_server_adv/text_server_adv.h359
-rw-r--r--modules/text_server_fb/SCsub22
-rw-r--r--modules/text_server_fb/bitmap_font_fb.cpp352
-rw-r--r--modules/text_server_fb/bitmap_font_fb.h111
-rw-r--r--modules/text_server_fb/dynamic_font_fb.cpp713
-rw-r--r--modules/text_server_fb/dynamic_font_fb.h173
-rw-r--r--modules/text_server_fb/font_fb.h101
-rw-r--r--modules/text_server_fb/text_server_fb.cpp2229
-rw-r--r--modules/text_server_fb/text_server_fb.h327
-rw-r--r--modules/theora/doc_classes/VideoStreamTheora.xml2
-rw-r--r--modules/vhacd/register_types.cpp69
-rw-r--r--modules/visual_script/doc_classes/VisualScript.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml58
-rw-r--r--modules/visual_script/doc_classes/VisualScriptClassConstant.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptComment.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptComposeArray.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptCondition.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptConstant.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptConstructor.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptCustomNode.xml56
-rw-r--r--modules/visual_script/doc_classes/VisualScriptDeconstruct.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEmitSignal.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptExpression.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunction.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunctionCall.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunctionState.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIndexGet.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIndexSet.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptInputAction.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIterator.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLists.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLocalVar.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptMathConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptNode.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptOperator.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPreload.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPropertyGet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPropertySet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptResourcePath.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptReturn.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSceneNode.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSceneTree.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSelect.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSelf.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSequence.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSubCall.xml11
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSwitch.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptTypeCast.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptVariableGet.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptVariableSet.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptWhile.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptYield.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptYieldSignal.xml2
-rw-r--r--modules/visual_script/register_types.cpp12
-rw-r--r--modules/visual_script/visual_script.cpp32
-rw-r--r--modules/visual_script/visual_script.h6
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.cpp55
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.h3
-rw-r--r--modules/visual_script/visual_script_editor.cpp73
-rw-r--r--modules/visual_script/visual_script_editor.h27
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp2
-rw-r--r--modules/visual_script/visual_script_nodes.cpp176
-rw-r--r--modules/visual_script/visual_script_nodes.h32
-rw-r--r--modules/visual_script/visual_script_property_selector.cpp2
-rw-r--r--modules/vorbis/SCsub3
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.cpp435
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.h (renamed from modules/stb_vorbis/audio_stream_ogg_vorbis.h)58
-rw-r--r--modules/vorbis/config.py11
-rw-r--r--modules/vorbis/doc_classes/AudioStreamOGGVorbis.xml (renamed from modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml)12
-rw-r--r--modules/vorbis/doc_classes/AudioStreamPlaybackOGGVorbis.xml (renamed from modules/gdnative/doc_classes/PacketPeerGDNative.xml)6
-rw-r--r--modules/vorbis/register_types.cpp15
-rw-r--r--modules/vorbis/resource_importer_ogg_vorbis.cpp (renamed from modules/stb_vorbis/resource_importer_ogg_vorbis.cpp)116
-rw-r--r--modules/vorbis/resource_importer_ogg_vorbis.h (renamed from modules/stb_vorbis/resource_importer_ogg_vorbis.h)20
-rw-r--r--modules/webm/doc_classes/VideoStreamWebm.xml2
-rw-r--r--modules/webrtc/SCsub5
-rw-r--r--modules/webrtc/config.py2
-rw-r--r--modules/webrtc/doc_classes/WebRTCDataChannelExtension.xml106
-rw-r--r--modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml11
-rw-r--r--modules/webrtc/doc_classes/WebRTCPeerConnectionExtension.xml71
-rw-r--r--modules/webrtc/register_types.cpp26
-rw-r--r--modules/webrtc/webrtc_data_channel_extension.cpp215
-rw-r--r--modules/webrtc/webrtc_data_channel_extension.h (renamed from modules/webrtc/webrtc_data_channel_gdnative.h)53
-rw-r--r--modules/webrtc/webrtc_data_channel_gdnative.cpp143
-rw-r--r--modules/webrtc/webrtc_multiplayer_peer.cpp46
-rw-r--r--modules/webrtc/webrtc_multiplayer_peer.h12
-rw-r--r--modules/webrtc/webrtc_peer_connection.cpp24
-rw-r--r--modules/webrtc/webrtc_peer_connection.h7
-rw-r--r--modules/webrtc/webrtc_peer_connection_extension.cpp131
-rw-r--r--modules/webrtc/webrtc_peer_connection_extension.h (renamed from modules/webrtc/webrtc_peer_connection_gdnative.h)47
-rw-r--r--modules/webrtc/webrtc_peer_connection_gdnative.cpp121
-rw-r--r--modules/webrtc/webrtc_peer_connection_js.h3
-rw-r--r--modules/websocket/doc_classes/WebSocketClient.xml7
-rw-r--r--modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml9
-rw-r--r--modules/websocket/doc_classes/WebSocketServer.xml5
-rw-r--r--modules/websocket/editor_debugger_server_websocket.cpp14
-rw-r--r--modules/websocket/editor_debugger_server_websocket.h2
-rw-r--r--modules/websocket/websocket_multiplayer_peer.cpp25
-rw-r--r--modules/websocket/websocket_multiplayer_peer.h9
-rw-r--r--modules/websocket/wsl_client.cpp28
-rw-r--r--modules/websocket/wsl_client.h2
-rw-r--r--modules/webxr/doc_classes/WebXRInterface.xml2
-rw-r--r--modules/webxr/godot_webxr.h2
-rw-r--r--modules/webxr/native/library_godot_webxr.js6
-rw-r--r--modules/webxr/register_types.cpp21
-rw-r--r--modules/webxr/webxr_interface_js.cpp30
-rw-r--r--modules/webxr/webxr_interface_js.h9
-rw-r--r--platform/android/README.md14
-rw-r--r--platform/android/detect.py2
-rw-r--r--platform/android/dir_access_jandroid.cpp2
-rw-r--r--platform/android/export/export.cpp2
-rw-r--r--platform/android/export/export_plugin.cpp43
-rw-r--r--platform/android/export/export_plugin.h7
-rw-r--r--platform/android/export/gradle_export_util.cpp9
-rw-r--r--platform/android/export/gradle_export_util.h6
-rw-r--r--platform/android/java/app/AndroidManifest.xml4
-rw-r--r--platform/android/java/app/assetPacks/installTime/build.gradle8
-rw-r--r--platform/android/java/app/build.gradle5
-rw-r--r--platform/android/java/app/config.gradle6
-rw-r--r--platform/android/java/app/gradle.properties4
-rw-r--r--platform/android/java/app/settings.gradle4
-rw-r--r--platform/android/java/gradle.properties4
-rw-r--r--platform/android/java/lib/build.gradle3
-rw-r--r--platform/android/java/lib/src/com/google/android/vending/expansion/downloader/Helpers.java2
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/FullScreenGodotApp.java21
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/Godot.java26
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/GodotHost.java6
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java14
-rw-r--r--platform/android/java/settings.gradle3
-rw-r--r--platform/android/logo.pngbin951 -> 968 bytes
-rw-r--r--platform/iphone/export/export_plugin.h2
-rw-r--r--platform/javascript/.eslintrc.js8
-rw-r--r--platform/javascript/README.md15
-rw-r--r--platform/javascript/api/javascript_tools_editor_plugin.cpp32
-rw-r--r--platform/javascript/audio_driver_javascript.cpp141
-rw-r--r--platform/javascript/audio_driver_javascript.h157
-rw-r--r--platform/javascript/display_server_javascript.cpp39
-rw-r--r--platform/javascript/display_server_javascript.h2
-rw-r--r--platform/javascript/emscripten_helpers.py5
-rw-r--r--platform/javascript/export/export_plugin.h2
-rw-r--r--platform/javascript/godot_audio.h9
-rw-r--r--platform/javascript/js/libs/audio.worklet.js61
-rw-r--r--platform/javascript/js/libs/library_godot_audio.js137
-rw-r--r--platform/javascript/js/libs/library_godot_os.js2
-rw-r--r--platform/javascript/os_javascript.cpp23
-rw-r--r--platform/javascript/os_javascript.h2
-rw-r--r--platform/linuxbsd/README.md11
-rw-r--r--platform/linuxbsd/crash_handler_linuxbsd.cpp10
-rw-r--r--platform/linuxbsd/detect.py49
-rw-r--r--platform/linuxbsd/display_server_x11.cpp3
-rw-r--r--platform/linuxbsd/export/export.cpp2
-rw-r--r--platform/osx/crash_handler_osx.mm10
-rw-r--r--platform/osx/display_server_osx.mm4
-rw-r--r--platform/osx/export/export_plugin.cpp57
-rw-r--r--platform/osx/export/export_plugin.h2
-rw-r--r--platform/osx/os_osx.h1
-rw-r--r--platform/osx/os_osx.mm20
-rw-r--r--platform/uwp/SCsub2
-rw-r--r--platform/uwp/app_uwp.cpp (renamed from platform/uwp/app.cpp)4
-rw-r--r--platform/uwp/app_uwp.h (renamed from platform/uwp/app.h)6
-rw-r--r--platform/uwp/export/export_plugin.cpp2
-rw-r--r--platform/windows/crash_handler_windows.cpp10
-rw-r--r--platform/windows/detect.py2
-rw-r--r--platform/windows/display_server_windows.cpp343
-rw-r--r--platform/windows/display_server_windows.h1
-rw-r--r--platform/windows/os_windows.cpp23
-rw-r--r--scene/2d/audio_listener_2d.cpp (renamed from modules/gdnative/net/packet_peer_gdnative.cpp)94
-rw-r--r--scene/2d/audio_listener_2d.h (renamed from modules/stb_vorbis/register_types.cpp)47
-rw-r--r--scene/2d/audio_stream_player_2d.cpp403
-rw-r--r--scene/2d/audio_stream_player_2d.h34
-rw-r--r--scene/2d/camera_2d.cpp3
-rw-r--r--scene/2d/collision_object_2d.cpp8
-rw-r--r--scene/2d/collision_object_2d.h4
-rw-r--r--scene/2d/collision_polygon_2d.cpp2
-rw-r--r--scene/2d/collision_shape_2d.cpp2
-rw-r--r--scene/2d/cpu_particles_2d.cpp258
-rw-r--r--scene/2d/cpu_particles_2d.h22
-rw-r--r--scene/2d/gpu_particles_2d.cpp2
-rw-r--r--scene/2d/navigation_region_2d.cpp2
-rw-r--r--scene/2d/parallax_layer.cpp4
-rw-r--r--scene/2d/physical_bone_2d.cpp24
-rw-r--r--scene/2d/physical_bone_2d.h4
-rw-r--r--scene/2d/physics_body_2d.cpp852
-rw-r--r--scene/2d/physics_body_2d.h177
-rw-r--r--scene/2d/skeleton_2d.cpp2
-rw-r--r--scene/2d/tile_map.cpp495
-rw-r--r--scene/2d/tile_map.h19
-rw-r--r--scene/2d/touch_screen_button.cpp8
-rw-r--r--scene/2d/touch_screen_button.h2
-rw-r--r--scene/3d/area_3d.cpp69
-rw-r--r--scene/3d/area_3d.h14
-rw-r--r--scene/3d/audio_listener_3d.cpp (renamed from scene/3d/listener_3d.cpp)65
-rw-r--r--scene/3d/audio_listener_3d.h (renamed from scene/3d/listener_3d.h)13
-rw-r--r--scene/3d/audio_stream_player_3d.cpp724
-rw-r--r--scene/3d/audio_stream_player_3d.h66
-rw-r--r--scene/3d/bone_attachment_3d.cpp4
-rw-r--r--scene/3d/camera_3d.cpp4
-rw-r--r--scene/3d/camera_3d.h2
-rw-r--r--scene/3d/collision_object_3d.cpp8
-rw-r--r--scene/3d/collision_object_3d.h4
-rw-r--r--scene/3d/collision_polygon_3d.cpp2
-rw-r--r--scene/3d/collision_shape_3d.cpp9
-rw-r--r--scene/3d/cpu_particles_3d.cpp260
-rw-r--r--scene/3d/cpu_particles_3d.h25
-rw-r--r--scene/3d/gpu_particles_3d.cpp4
-rw-r--r--scene/3d/gpu_particles_collision_3d.cpp4
-rw-r--r--scene/3d/light_3d.cpp13
-rw-r--r--scene/3d/light_3d.h2
-rw-r--r--scene/3d/lightmap_gi.cpp4
-rw-r--r--scene/3d/mesh_instance_3d.cpp3
-rw-r--r--scene/3d/physics_body_3d.cpp1596
-rw-r--r--scene/3d/physics_body_3d.h306
-rw-r--r--scene/3d/skeleton_3d.cpp28
-rw-r--r--scene/3d/skeleton_ik_3d.cpp6
-rw-r--r--scene/3d/soft_dynamic_body_3d.cpp (renamed from scene/3d/soft_body_3d.cpp)243
-rw-r--r--scene/3d/soft_dynamic_body_3d.h (renamed from scene/3d/soft_body_3d.h)32
-rw-r--r--scene/3d/sprite_3d.cpp2
-rw-r--r--scene/3d/vehicle_body_3d.cpp39
-rw-r--r--scene/3d/vehicle_body_3d.h7
-rw-r--r--scene/3d/voxelizer.cpp8
-rw-r--r--scene/animation/SCsub3
-rw-r--r--scene/animation/animation_blend_tree.cpp22
-rw-r--r--scene/animation/animation_blend_tree.h2
-rw-r--r--scene/animation/animation_player.cpp3
-rw-r--r--scene/animation/animation_tree.cpp54
-rw-r--r--scene/animation/animation_tree.h8
-rw-r--r--scene/animation/easing_equations.h405
-rw-r--r--scene/animation/tween.cpp71
-rw-r--r--scene/animation/tween.h10
-rw-r--r--scene/audio/audio_stream_player.cpp320
-rw-r--r--scene/audio/audio_stream_player.h19
-rw-r--r--scene/debugger/scene_debugger.cpp2
-rw-r--r--scene/gui/base_button.cpp18
-rw-r--r--scene/gui/base_button.h7
-rw-r--r--scene/gui/box_container.cpp4
-rw-r--r--scene/gui/check_box.cpp18
-rw-r--r--scene/gui/code_edit.cpp153
-rw-r--r--scene/gui/code_edit.h14
-rw-r--r--scene/gui/color_picker.cpp234
-rw-r--r--scene/gui/color_picker.h39
-rw-r--r--scene/gui/container.cpp5
-rw-r--r--scene/gui/control.cpp132
-rw-r--r--scene/gui/control.h21
-rw-r--r--scene/gui/dialogs.cpp6
-rw-r--r--scene/gui/file_dialog.cpp15
-rw-r--r--scene/gui/file_dialog.h2
-rw-r--r--scene/gui/gradient_edit.cpp5
-rw-r--r--scene/gui/gradient_edit.h2
-rw-r--r--scene/gui/graph_edit.cpp141
-rw-r--r--scene/gui/graph_edit.h13
-rw-r--r--scene/gui/graph_node.cpp30
-rw-r--r--scene/gui/graph_node.h7
-rw-r--r--scene/gui/item_list.cpp44
-rw-r--r--scene/gui/item_list.h7
-rw-r--r--scene/gui/label.cpp182
-rw-r--r--scene/gui/line_edit.cpp44
-rw-r--r--scene/gui/line_edit.h9
-rw-r--r--scene/gui/link_button.cpp16
-rw-r--r--scene/gui/link_button.h1
-rw-r--r--scene/gui/menu_button.cpp20
-rw-r--r--scene/gui/menu_button.h4
-rw-r--r--scene/gui/option_button.cpp4
-rw-r--r--scene/gui/option_button.h4
-rw-r--r--scene/gui/popup.cpp10
-rw-r--r--scene/gui/popup_menu.cpp22
-rw-r--r--scene/gui/popup_menu.h8
-rw-r--r--scene/gui/rich_text_effect.cpp37
-rw-r--r--scene/gui/rich_text_effect.h52
-rw-r--r--scene/gui/rich_text_label.cpp278
-rw-r--r--scene/gui/rich_text_label.h29
-rw-r--r--scene/gui/scroll_bar.cpp31
-rw-r--r--scene/gui/scroll_bar.h5
-rw-r--r--scene/gui/scroll_container.cpp12
-rw-r--r--scene/gui/scroll_container.h2
-rw-r--r--scene/gui/slider.cpp3
-rw-r--r--scene/gui/slider.h2
-rw-r--r--scene/gui/spin_box.cpp39
-rw-r--r--scene/gui/spin_box.h8
-rw-r--r--scene/gui/split_container.cpp4
-rw-r--r--scene/gui/split_container.h2
-rw-r--r--scene/gui/subviewport_container.cpp10
-rw-r--r--scene/gui/subviewport_container.h4
-rw-r--r--scene/gui/tab_container.cpp31
-rw-r--r--scene/gui/tab_container.h2
-rw-r--r--scene/gui/tabs.cpp35
-rw-r--r--scene/gui/tabs.h2
-rw-r--r--scene/gui/text_edit.cpp341
-rw-r--r--scene/gui/text_edit.h43
-rw-r--r--scene/gui/texture_progress_bar.cpp60
-rw-r--r--scene/gui/texture_progress_bar.h4
-rw-r--r--scene/gui/tree.cpp263
-rw-r--r--scene/gui/tree.h14
-rw-r--r--scene/gui/video_player.cpp5
-rw-r--r--scene/main/canvas_item.cpp13
-rw-r--r--scene/main/canvas_item.h2
-rw-r--r--scene/main/http_request.cpp8
-rw-r--r--scene/main/node.cpp338
-rw-r--r--scene/main/node.h65
-rw-r--r--scene/main/scene_tree.cpp39
-rw-r--r--scene/main/scene_tree.h10
-rw-r--r--scene/main/viewport.cpp457
-rw-r--r--scene/main/viewport.h58
-rw-r--r--scene/main/window.cpp12
-rw-r--r--scene/register_scene_types.cpp65
-rw-r--r--scene/resources/animation.cpp13
-rw-r--r--scene/resources/animation.h3
-rw-r--r--scene/resources/audio_stream_sample.cpp11
-rw-r--r--scene/resources/audio_stream_sample.h4
-rw-r--r--scene/resources/bit_map.cpp2
-rw-r--r--scene/resources/canvas_item_material.cpp3
-rw-r--r--scene/resources/canvas_item_material.h1
-rw-r--r--scene/resources/capsule_shape_2d.cpp12
-rw-r--r--scene/resources/capsule_shape_3d.cpp6
-rw-r--r--scene/resources/curve.cpp97
-rw-r--r--scene/resources/curve.h2
-rw-r--r--scene/resources/default_theme/default_theme.cpp68
-rw-r--r--scene/resources/default_theme/indeterminate.pngbin0 -> 242 bytes
-rw-r--r--scene/resources/default_theme/theme_data.h8
-rw-r--r--scene/resources/font.cpp1639
-rw-r--r--scene/resources/font.h286
-rw-r--r--scene/resources/immediate_mesh.cpp3
-rw-r--r--scene/resources/immediate_mesh.h1
-rw-r--r--scene/resources/material.cpp13
-rw-r--r--scene/resources/material.h1
-rw-r--r--scene/resources/mesh.cpp110
-rw-r--r--scene/resources/mesh.h39
-rw-r--r--scene/resources/mesh_library.cpp19
-rw-r--r--scene/resources/mesh_library.h3
-rw-r--r--scene/resources/packed_scene.cpp28
-rw-r--r--scene/resources/particles_material.cpp347
-rw-r--r--scene/resources/particles_material.h70
-rw-r--r--scene/resources/primitive_meshes.cpp13
-rw-r--r--scene/resources/primitive_meshes.h2
-rw-r--r--scene/resources/resource_format_text.cpp14
-rw-r--r--scene/resources/separation_ray_shape_2d.cpp119
-rw-r--r--scene/resources/separation_ray_shape_2d.h61
-rw-r--r--scene/resources/separation_ray_shape_3d.cpp (renamed from modules/gdnative/net/stream_peer_gdnative.cpp)70
-rw-r--r--scene/resources/separation_ray_shape_3d.h (renamed from modules/gdnative/xr/register_types.cpp)34
-rw-r--r--scene/resources/skeleton_modification_2d.cpp54
-rw-r--r--scene/resources/skeleton_modification_2d.h4
-rw-r--r--scene/resources/skeleton_modification_2d_fabrik.cpp23
-rw-r--r--scene/resources/skeleton_modification_2d_twoboneik.cpp2
-rw-r--r--scene/resources/skeleton_modification_3d.cpp56
-rw-r--r--scene/resources/skeleton_modification_3d.h3
-rw-r--r--scene/resources/skeleton_modification_3d_fabrik.cpp4
-rw-r--r--scene/resources/surface_tool.cpp50
-rw-r--r--scene/resources/syntax_highlighter.cpp24
-rw-r--r--scene/resources/syntax_highlighter.h9
-rw-r--r--scene/resources/text_line.cpp8
-rw-r--r--scene/resources/text_paragraph.cpp25
-rw-r--r--scene/resources/texture.cpp103
-rw-r--r--scene/resources/texture.h8
-rw-r--r--scene/resources/tile_set.cpp1275
-rw-r--r--scene/resources/tile_set.h142
-rw-r--r--scene/resources/visual_shader.cpp109
-rw-r--r--scene/resources/visual_shader.h14
-rw-r--r--scene/resources/world_boundary_shape_2d.cpp (renamed from scene/resources/world_margin_shape_2d.cpp)36
-rw-r--r--scene/resources/world_boundary_shape_2d.h (renamed from scene/resources/world_margin_shape_2d.h)16
-rw-r--r--scene/resources/world_boundary_shape_3d.cpp (renamed from scene/resources/world_margin_shape_3d.cpp)22
-rw-r--r--scene/resources/world_boundary_shape_3d.h (renamed from scene/resources/world_margin_shape_3d.h)18
-rw-r--r--scene/scene_string_names.cpp3
-rw-r--r--scene/scene_string_names.h3
-rw-r--r--servers/audio/audio_stream.cpp145
-rw-r--r--servers/audio/audio_stream.h54
-rw-r--r--servers/audio/effects/audio_effect_capture.h1
-rw-r--r--servers/audio/effects/audio_effect_pitch_shift.cpp2
-rw-r--r--servers/audio/effects/audio_stream_generator.cpp7
-rw-r--r--servers/audio/effects/audio_stream_generator.h3
-rw-r--r--servers/audio_server.cpp493
-rw-r--r--servers/audio_server.h90
-rw-r--r--servers/display_server.cpp1
-rw-r--r--servers/physics_2d/area_2d_sw.cpp31
-rw-r--r--servers/physics_2d/area_2d_sw.h35
-rw-r--r--servers/physics_2d/area_pair_2d_sw.cpp67
-rw-r--r--servers/physics_2d/area_pair_2d_sw.h6
-rw-r--r--servers/physics_2d/body_2d_sw.cpp300
-rw-r--r--servers/physics_2d/body_2d_sw.h185
-rw-r--r--servers/physics_2d/body_direct_state_2d_sw.cpp194
-rw-r--r--servers/physics_2d/body_direct_state_2d_sw.h92
-rw-r--r--servers/physics_2d/body_pair_2d_sw.cpp4
-rw-r--r--servers/physics_2d/body_pair_2d_sw.h18
-rw-r--r--servers/physics_2d/broad_phase_2d_bvh.cpp3
-rw-r--r--servers/physics_2d/broad_phase_2d_bvh.h8
-rw-r--r--servers/physics_2d/collision_object_2d_sw.cpp5
-rw-r--r--servers/physics_2d/collision_object_2d_sw.h25
-rw-r--r--servers/physics_2d/collision_solver_2d_sat.cpp70
-rw-r--r--servers/physics_2d/collision_solver_2d_sw.cpp132
-rw-r--r--servers/physics_2d/collision_solver_2d_sw.h10
-rw-r--r--servers/physics_2d/constraint_2d_sw.h6
-rw-r--r--servers/physics_2d/joints_2d_sw.cpp21
-rw-r--r--servers/physics_2d/joints_2d_sw.h37
-rw-r--r--servers/physics_2d/physics_server_2d_sw.cpp323
-rw-r--r--servers/physics_2d/physics_server_2d_sw.h46
-rw-r--r--servers/physics_2d/physics_server_2d_wrap_mt.cpp2
-rw-r--r--servers/physics_2d/physics_server_2d_wrap_mt.h22
-rw-r--r--servers/physics_2d/shape_2d_sw.cpp77
-rw-r--r--servers/physics_2d/shape_2d_sw.h238
-rw-r--r--servers/physics_2d/space_2d_sw.cpp114
-rw-r--r--servers/physics_2d/space_2d_sw.h68
-rw-r--r--servers/physics_2d/step_2d_sw.cpp4
-rw-r--r--servers/physics_2d/step_2d_sw.h2
-rw-r--r--servers/physics_3d/area_3d_sw.cpp52
-rw-r--r--servers/physics_3d/area_3d_sw.h56
-rw-r--r--servers/physics_3d/area_pair_3d_sw.cpp69
-rw-r--r--servers/physics_3d/area_pair_3d_sw.h6
-rw-r--r--servers/physics_3d/body_3d_sw.cpp338
-rw-r--r--servers/physics_3d/body_3d_sw.h174
-rw-r--r--servers/physics_3d/body_direct_state_3d_sw.cpp190
-rw-r--r--servers/physics_3d/body_direct_state_3d_sw.h94
-rw-r--r--servers/physics_3d/body_pair_3d_sw.h20
-rw-r--r--servers/physics_3d/broad_phase_3d_bvh.cpp3
-rw-r--r--servers/physics_3d/broad_phase_3d_bvh.h8
-rw-r--r--servers/physics_3d/collision_object_3d_sw.cpp6
-rw-r--r--servers/physics_3d/collision_object_3d_sw.h18
-rw-r--r--servers/physics_3d/collision_solver_3d_sat.cpp35
-rw-r--r--servers/physics_3d/collision_solver_3d_sw.cpp115
-rw-r--r--servers/physics_3d/collision_solver_3d_sw.h12
-rw-r--r--servers/physics_3d/gjk_epa.cpp2
-rw-r--r--servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp12
-rw-r--r--servers/physics_3d/joints/cone_twist_joint_3d_sw.h38
-rw-r--r--servers/physics_3d/joints/generic_6dof_joint_3d_sw.h79
-rw-r--r--servers/physics_3d/joints/hinge_joint_3d_sw.cpp30
-rw-r--r--servers/physics_3d/joints/hinge_joint_3d_sw.h36
-rw-r--r--servers/physics_3d/joints/jacobian_entry_3d_sw.h2
-rw-r--r--servers/physics_3d/joints/pin_joint_3d_sw.cpp5
-rw-r--r--servers/physics_3d/joints/pin_joint_3d_sw.h12
-rw-r--r--servers/physics_3d/joints/slider_joint_3d_sw.cpp37
-rw-r--r--servers/physics_3d/joints/slider_joint_3d_sw.h83
-rw-r--r--servers/physics_3d/physics_server_3d_sw.cpp421
-rw-r--r--servers/physics_3d/physics_server_3d_sw.h33
-rw-r--r--servers/physics_3d/physics_server_3d_wrap_mt.cpp3
-rw-r--r--servers/physics_3d/physics_server_3d_wrap_mt.h16
-rw-r--r--servers/physics_3d/shape_3d_sw.cpp546
-rw-r--r--servers/physics_3d/shape_3d_sw.h315
-rw-r--r--servers/physics_3d/soft_body_3d_sw.cpp104
-rw-r--r--servers/physics_3d/soft_body_3d_sw.h6
-rw-r--r--servers/physics_3d/space_3d_sw.cpp246
-rw-r--r--servers/physics_3d/space_3d_sw.h48
-rw-r--r--servers/physics_3d/step_3d_sw.cpp4
-rw-r--r--servers/physics_3d/step_3d_sw.h2
-rw-r--r--servers/physics_server_2d.cpp33
-rw-r--r--servers/physics_server_2d.h51
-rw-r--r--servers/physics_server_3d.cpp173
-rw-r--r--servers/physics_server_3d.h116
-rw-r--r--servers/register_server_types.cpp6
-rw-r--r--servers/rendering/rasterizer_dummy.h11
-rw-r--r--servers/rendering/renderer_canvas_cull.cpp234
-rw-r--r--servers/rendering/renderer_canvas_cull.h1
-rw-r--r--servers/rendering/renderer_canvas_render.h5
-rw-r--r--servers/rendering/renderer_compositor.h3
-rw-r--r--servers/rendering/renderer_rd/effects_rd.cpp12
-rw-r--r--servers/rendering/renderer_rd/effects_rd.h10
-rw-r--r--servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp9
-rw-r--r--servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp14
-rw-r--r--servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h1
-rw-r--r--servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp29
-rw-r--r--servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h1
-rw-r--r--servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp14
-rw-r--r--servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp49
-rw-r--r--servers/rendering/renderer_rd/renderer_canvas_render_rd.h8
-rw-r--r--servers/rendering/renderer_rd/renderer_compositor_rd.cpp28
-rw-r--r--servers/rendering/renderer_rd/renderer_compositor_rd.h3
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp26
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_gi_rd.h2
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.cpp585
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.h99
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp35
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_sky_rd.h13
-rw-r--r--servers/rendering/renderer_rd/renderer_storage_rd.cpp671
-rw-r--r--servers/rendering/renderer_rd/renderer_storage_rd.h101
-rw-r--r--servers/rendering/renderer_rd/shader_compiler_rd.cpp15
-rw-r--r--servers/rendering/renderer_rd/shader_compiler_rd.h1
-rw-r--r--servers/rendering/renderer_rd/shader_rd.cpp10
-rw-r--r--servers/rendering/renderer_rd/shader_rd.h2
-rw-r--r--servers/rendering/renderer_rd/shaders/blit.glsl6
-rw-r--r--servers/rendering/renderer_rd/shaders/blur_raster.glsl2
-rw-r--r--servers/rendering/renderer_rd/shaders/bokeh_dof_raster.glsl2
-rw-r--r--servers/rendering/renderer_rd/shaders/canvas.glsl37
-rw-r--r--servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl2
-rw-r--r--servers/rendering/renderer_rd/shaders/cluster_render.glsl2
-rw-r--r--servers/rendering/renderer_rd/shaders/cube_to_dp.glsl14
-rw-r--r--servers/rendering/renderer_rd/shaders/cubemap_roughness_inc.glsl4
-rw-r--r--servers/rendering/renderer_rd/shaders/decal_data_inc.glsl28
-rw-r--r--servers/rendering/renderer_rd/shaders/giprobe_write.glsl47
-rw-r--r--servers/rendering/renderer_rd/shaders/light_data_inc.glsl84
-rw-r--r--servers/rendering/renderer_rd/shaders/luminance_reduce_raster_inc.glsl2
-rw-r--r--servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl15
-rw-r--r--servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl146
-rw-r--r--servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl28
-rw-r--r--servers/rendering/renderer_rd/shaders/scene_forward_mobile_inc.glsl80
-rw-r--r--servers/rendering/renderer_rd/shaders/sdfgi_debug_probes.glsl2
-rw-r--r--servers/rendering/renderer_rd/shaders/sky.glsl15
-rw-r--r--servers/rendering/renderer_rd/shaders/tonemap.glsl96
-rw-r--r--servers/rendering/renderer_rd/shaders/voxel_gi.glsl162
-rw-r--r--servers/rendering/renderer_rd/shaders/voxel_gi_debug.glsl5
-rw-r--r--servers/rendering/renderer_scene_cull.cpp123
-rw-r--r--servers/rendering/renderer_scene_occlusion_cull.h24
-rw-r--r--servers/rendering/renderer_viewport.cpp178
-rw-r--r--servers/rendering/renderer_viewport.h6
-rw-r--r--servers/rendering/rendering_device.cpp16
-rw-r--r--servers/rendering/rendering_device.h21
-rw-r--r--servers/rendering/rendering_server_default.h2
-rw-r--r--servers/rendering/shader_language.cpp34
-rw-r--r--servers/rendering/shader_language.h1
-rw-r--r--servers/rendering/shader_types.cpp1
-rw-r--r--servers/rendering_server.cpp37
-rw-r--r--servers/rendering_server.h14
-rw-r--r--servers/text_server.cpp231
-rw-r--r--servers/text_server.h222
-rw-r--r--servers/xr/xr_interface.cpp72
-rw-r--r--servers/xr/xr_interface.h29
-rw-r--r--servers/xr/xr_interface_extension.cpp267
-rw-r--r--servers/xr/xr_interface_extension.h (renamed from modules/gdnative/xr/xr_interface_gdnative.h)76
-rw-r--r--servers/xr_server.cpp20
-rw-r--r--servers/xr_server.h7
-rw-r--r--tests/test_aabb.h3
-rw-r--r--tests/test_array.h51
-rw-r--r--tests/test_class_db.h2
-rw-r--r--tests/test_code_edit.h3068
-rw-r--r--tests/test_config_file.h11
-rw-r--r--tests/test_curve.h35
-rw-r--r--tests/test_geometry_2d.h33
-rw-r--r--tests/test_geometry_3d.h29
-rw-r--r--tests/test_macros.h219
-rw-r--r--tests/test_main.cpp151
-rw-r--r--tests/test_object.h4
-rw-r--r--tests/test_physics_2d.cpp16
-rw-r--r--tests/test_physics_3d.cpp15
-rw-r--r--tests/test_rect2.h12
-rw-r--r--tests/test_string.h127
-rw-r--r--tests/test_text_server.h40
-rw-r--r--tests/test_tools.h61
-rw-r--r--tests/test_translation.h31
-rw-r--r--tests/test_validate_testing.h12
-rw-r--r--tests/test_variant.h39
-rw-r--r--thirdparty/README.md65
-rw-r--r--thirdparty/bullet/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp1
-rw-r--r--thirdparty/bullet/BulletCollision/CollisionDispatch/btCollisionObject.h3
-rw-r--r--thirdparty/bullet/BulletCollision/CollisionDispatch/btCollisionWorld.cpp6
-rw-r--r--thirdparty/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp135
-rw-r--r--thirdparty/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h47
-rw-r--r--thirdparty/bullet/BulletDynamics/Featherstone/btMultiBody.cpp13
-rw-r--r--thirdparty/bullet/BulletDynamics/Featherstone/btMultiBody.h20
-rw-r--r--thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyConstraint.cpp5
-rw-r--r--thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyConstraint.h2
-rw-r--r--thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.cpp9
-rw-r--r--thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyJointMotor.cpp1
-rw-r--r--thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodySphericalJointMotor.cpp21
-rw-r--r--thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodySphericalJointMotor.h49
-rw-r--r--thirdparty/bullet/BulletDynamics/MLCPSolvers/btMLCPSolver.cpp4
-rw-r--r--thirdparty/bullet/BulletSoftBody/btDeformableBodySolver.cpp8
-rw-r--r--thirdparty/bullet/BulletSoftBody/btDeformableMousePickingForce.h2
-rw-r--r--thirdparty/bullet/BulletSoftBody/btSoftBody.h4
-rw-r--r--thirdparty/bullet/LinearMath/btIDebugDraw.h6
-rw-r--r--thirdparty/bullet/LinearMath/btScalar.h2
-rw-r--r--thirdparty/bullet/LinearMath/btSerializer.h7
-rw-r--r--thirdparty/bullet/VERSION.txt1
-rw-r--r--thirdparty/bullet/patches/bullet-fix-warnings.patch42
-rw-r--r--thirdparty/embree/include/embree3/rtcore_config.h6
-rw-r--r--thirdparty/embree/kernels/bvh/bvh_intersector_hybrid.cpp917
-rw-r--r--thirdparty/embree/kernels/bvh/bvh_intersector_hybrid4_bvh4.cpp59
-rw-r--r--thirdparty/embree/kernels/bvh/bvh_intersector_stream.cpp528
-rw-r--r--thirdparty/embree/kernels/bvh/bvh_intersector_stream_bvh4.cpp36
-rw-r--r--thirdparty/embree/kernels/bvh/bvh_intersector_stream_filters.cpp657
-rw-r--r--thirdparty/embree/kernels/config.h2
-rw-r--r--thirdparty/embree/kernels/hash.h2
-rw-r--r--thirdparty/etcpak/ProcessRGB.cpp699
-rw-r--r--thirdparty/etcpak/ProcessRGB.hpp6
-rw-r--r--thirdparty/glslang/SPIRV/GLSL.ext.EXT.h2
-rw-r--r--thirdparty/glslang/SPIRV/GLSL.ext.KHR.h2
-rw-r--r--thirdparty/glslang/SPIRV/GLSL.ext.NV.h3
-rw-r--r--thirdparty/glslang/SPIRV/GlslangToSpv.cpp548
-rw-r--r--thirdparty/glslang/SPIRV/SPVRemapper.cpp3
-rw-r--r--thirdparty/glslang/SPIRV/SpvBuilder.cpp124
-rw-r--r--thirdparty/glslang/SPIRV/SpvBuilder.h4
-rw-r--r--thirdparty/glslang/SPIRV/SpvPostProcess.cpp32
-rw-r--r--thirdparty/glslang/SPIRV/SpvTools.cpp3
-rw-r--r--thirdparty/glslang/SPIRV/doc.cpp41
-rw-r--r--thirdparty/glslang/SPIRV/spirv.hpp115
-rw-r--r--thirdparty/glslang/StandAlone/DirStackFileIncluder.h8
-rw-r--r--thirdparty/glslang/glslang/Include/BaseTypes.h12
-rw-r--r--thirdparty/glslang/glslang/Include/Common.h16
-rw-r--r--thirdparty/glslang/glslang/Include/SpirvIntrinsics.h136
-rw-r--r--thirdparty/glslang/glslang/Include/Types.h230
-rw-r--r--thirdparty/glslang/glslang/Include/glslang_c_shader_types.h5
-rw-r--r--thirdparty/glslang/glslang/Include/intermediate.h34
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Constant.cpp21
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp454
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp29
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp63
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp693
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h66
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Scan.cpp27
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp106
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp355
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp6
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h51
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Versions.cpp54
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/Versions.h10
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/attribute.cpp25
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/attribute.h3
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/gl_types.h6
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/glslang.y356
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp7146
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h271
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp13
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp184
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/iomapper.h43
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/limits.cpp6
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp428
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/localintermediate.h120
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp37
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp8
-rw-r--r--thirdparty/glslang/glslang/MachineIndependent/reflection.cpp6
-rw-r--r--thirdparty/glslang/glslang/Public/ShaderLang.h32
-rw-r--r--thirdparty/glslang/glslang/build_info.h2
-rw-r--r--thirdparty/harfbuzz/COPYING4
-rw-r--r--thirdparty/harfbuzz/NEWS2457
-rw-r--r--thirdparty/harfbuzz/src/hb-aat-layout-ankr-table.hh8
-rw-r--r--thirdparty/harfbuzz/src/hb-aat-layout-common.hh11
-rw-r--r--thirdparty/harfbuzz/src/hb-aat-layout-feat-table.hh2
-rw-r--r--thirdparty/harfbuzz/src/hb-aat-layout-just-table.hh16
-rw-r--r--thirdparty/harfbuzz/src/hb-aat-layout-kerx-table.hh14
-rw-r--r--thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh21
-rw-r--r--thirdparty/harfbuzz/src/hb-aat-layout-opbd-table.hh8
-rw-r--r--thirdparty/harfbuzz/src/hb-aat-layout-trak-table.hh8
-rw-r--r--thirdparty/harfbuzz/src/hb-aat-layout.cc13
-rw-r--r--thirdparty/harfbuzz/src/hb-aat-ltag-table.hh4
-rw-r--r--thirdparty/harfbuzz/src/hb-algs.hh42
-rw-r--r--thirdparty/harfbuzz/src/hb-array.hh51
-rw-r--r--thirdparty/harfbuzz/src/hb-bimap.hh5
-rw-r--r--thirdparty/harfbuzz/src/hb-bit-page.hh203
-rw-r--r--thirdparty/harfbuzz/src/hb-bit-set-invertible.hh354
-rw-r--r--thirdparty/harfbuzz/src/hb-bit-set.hh808
-rw-r--r--thirdparty/harfbuzz/src/hb-blob.cc123
-rw-r--r--thirdparty/harfbuzz/src/hb-blob.h10
-rw-r--r--thirdparty/harfbuzz/src/hb-blob.hh2
-rw-r--r--thirdparty/harfbuzz/src/hb-buffer-deserialize-json.hh1189
-rw-r--r--thirdparty/harfbuzz/src/hb-buffer-deserialize-text.hh1437
-rw-r--r--thirdparty/harfbuzz/src/hb-buffer.cc99
-rw-r--r--thirdparty/harfbuzz/src/hb-buffer.hh17
-rw-r--r--thirdparty/harfbuzz/src/hb-cache.hh2
-rw-r--r--thirdparty/harfbuzz/src/hb-cff-interp-common.hh2
-rw-r--r--thirdparty/harfbuzz/src/hb-cff2-interp-cs.hh4
-rw-r--r--thirdparty/harfbuzz/src/hb-common.cc33
-rw-r--r--thirdparty/harfbuzz/src/hb-common.h14
-rw-r--r--thirdparty/harfbuzz/src/hb-config.hh9
-rw-r--r--thirdparty/harfbuzz/src/hb-coretext.cc50
-rw-r--r--thirdparty/harfbuzz/src/hb-debug.hh6
-rw-r--r--thirdparty/harfbuzz/src/hb-deprecated.h3
-rw-r--r--thirdparty/harfbuzz/src/hb-directwrite.cc264
-rw-r--r--thirdparty/harfbuzz/src/hb-draw.cc2
-rw-r--r--thirdparty/harfbuzz/src/hb-face.cc102
-rw-r--r--thirdparty/harfbuzz/src/hb-font.cc79
-rw-r--r--thirdparty/harfbuzz/src/hb-ft.cc48
-rw-r--r--thirdparty/harfbuzz/src/hb-gdi.cc6
-rw-r--r--thirdparty/harfbuzz/src/hb-glib.cc12
-rw-r--r--thirdparty/harfbuzz/src/hb-gobject-structs.cc4
-rw-r--r--thirdparty/harfbuzz/src/hb-graphite2.cc13
-rw-r--r--thirdparty/harfbuzz/src/hb-icu.cc12
-rw-r--r--thirdparty/harfbuzz/src/hb-iter.hh2
-rw-r--r--thirdparty/harfbuzz/src/hb-machinery.hh6
-rw-r--r--thirdparty/harfbuzz/src/hb-map.cc7
-rw-r--r--thirdparty/harfbuzz/src/hb-map.hh26
-rw-r--r--thirdparty/harfbuzz/src/hb-meta.hh31
-rw-r--r--thirdparty/harfbuzz/src/hb-ms-feature-ranges.cc177
-rw-r--r--thirdparty/harfbuzz/src/hb-ms-feature-ranges.hh96
-rw-r--r--thirdparty/harfbuzz/src/hb-mutex.hh8
-rw-r--r--thirdparty/harfbuzz/src/hb-null.hh20
-rw-r--r--thirdparty/harfbuzz/src/hb-object.hh25
-rw-r--r--thirdparty/harfbuzz/src/hb-open-file.hh68
-rw-r--r--thirdparty/harfbuzz/src/hb-open-type.hh146
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-cff-common.hh6
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-cff1-table.hh7
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-cmap-table.hh256
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-color-cbdt-table.hh14
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-color-colr-table.hh890
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-color-colrv1-closure.hh101
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-color-cpal-table.hh127
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-color-sbix-table.hh10
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-color-svg-table.hh4
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-face-table-list.hh2
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-font.cc12
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-gasp-table.hh2
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-glyf-table.hh140
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-hdmx-table.hh4
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-hmtx-table.hh2
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-layout-base-table.hh36
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-layout-common.hh641
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-layout-gdef-table.hh42
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-layout-gpos-table.hh622
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-layout-gsub-table.hh322
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-layout-gsubgpos.hh643
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-layout-jstf-table.hh32
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-layout.cc184
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-layout.hh3
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-map.cc36
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-math-table.hh44
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-maxp-table.hh2
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-meta-table.hh4
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-name-table.hh17
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-name.cc9
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-os2-table.hh25
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-post-table-v2subset.hh130
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-post-table.hh36
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-fallback.hh12
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-joining-list.hh9
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-table.hh38
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic.cc4
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-hangul.cc4
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-indic-table.cc42
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-indic.cc14
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer-machine.hh665
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer.cc7
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-myanmar.cc3
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-syllabic.cc5
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-syllabic.hh3
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-use-machine.hh1034
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-use-table.hh76
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-use.cc9
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-vowel-constraints.cc4
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex.hh9
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-fallback.cc4
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape.cc88
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape.hh1
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-stat-table.hh8
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-tag-table.hh27
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-tag.cc4
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-var-avar-table.hh2
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-var-fvar-table.hh9
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-var-gvar-table.hh14
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-var-hvar-table.hh42
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-var-mvar-table.hh2
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-vorg-table.hh2
-rw-r--r--thirdparty/harfbuzz/src/hb-pool.hh6
-rw-r--r--thirdparty/harfbuzz/src/hb-priority-queue.hh151
-rw-r--r--thirdparty/harfbuzz/src/hb-repacker.hh769
-rw-r--r--thirdparty/harfbuzz/src/hb-sanitize.hh4
-rw-r--r--thirdparty/harfbuzz/src/hb-serialize.hh146
-rw-r--r--thirdparty/harfbuzz/src/hb-set-digest.hh8
-rw-r--r--thirdparty/harfbuzz/src/hb-set.cc62
-rw-r--r--thirdparty/harfbuzz/src/hb-set.h6
-rw-r--r--thirdparty/harfbuzz/src/hb-set.hh875
-rw-r--r--thirdparty/harfbuzz/src/hb-shape-plan.cc20
-rw-r--r--thirdparty/harfbuzz/src/hb-shape-plan.hh2
-rw-r--r--thirdparty/harfbuzz/src/hb-shape.cc16
-rw-r--r--thirdparty/harfbuzz/src/hb-shaper.cc16
-rw-r--r--thirdparty/harfbuzz/src/hb-static.cc1
-rw-r--r--thirdparty/harfbuzz/src/hb-style.cc64
-rw-r--r--thirdparty/harfbuzz/src/hb-style.h42
-rw-r--r--thirdparty/harfbuzz/src/hb-subset-cff-common.cc12
-rw-r--r--thirdparty/harfbuzz/src/hb-subset-cff-common.hh13
-rw-r--r--thirdparty/harfbuzz/src/hb-subset-cff1.cc14
-rw-r--r--thirdparty/harfbuzz/src/hb-subset-cff2.cc8
-rw-r--r--thirdparty/harfbuzz/src/hb-subset-input.cc328
-rw-r--r--thirdparty/harfbuzz/src/hb-subset-input.hh55
-rw-r--r--thirdparty/harfbuzz/src/hb-subset-plan.cc380
-rw-r--r--thirdparty/harfbuzz/src/hb-subset-plan.hh25
-rw-r--r--thirdparty/harfbuzz/src/hb-subset.cc227
-rw-r--r--thirdparty/harfbuzz/src/hb-subset.h123
-rw-r--r--thirdparty/harfbuzz/src/hb-ucd-table.hh6580
-rw-r--r--thirdparty/harfbuzz/src/hb-ucd.cc10
-rw-r--r--thirdparty/harfbuzz/src/hb-unicode-emoji-table.hh72
-rw-r--r--thirdparty/harfbuzz/src/hb-unicode.cc2
-rw-r--r--thirdparty/harfbuzz/src/hb-unicode.hh11
-rw-r--r--thirdparty/harfbuzz/src/hb-uniscribe.cc249
-rw-r--r--thirdparty/harfbuzz/src/hb-vector.hh11
-rw-r--r--thirdparty/harfbuzz/src/hb-version.h6
-rw-r--r--thirdparty/harfbuzz/src/hb.hh40
-rw-r--r--thirdparty/misc/easing_equations.cpp319
-rw-r--r--thirdparty/misc/stb_vorbis.c5563
-rw-r--r--thirdparty/misc/stb_vorbis.h2
-rw-r--r--thirdparty/msdfgen/CHANGELOG.md82
-rw-r--r--thirdparty/msdfgen/LICENSE.txt21
-rw-r--r--thirdparty/msdfgen/core/Bitmap.h50
-rw-r--r--thirdparty/msdfgen/core/Bitmap.hpp117
-rw-r--r--thirdparty/msdfgen/core/BitmapRef.hpp43
-rw-r--r--thirdparty/msdfgen/core/Contour.cpp90
-rw-r--r--thirdparty/msdfgen/core/Contour.h34
-rw-r--r--thirdparty/msdfgen/core/EdgeColor.h18
-rw-r--r--thirdparty/msdfgen/core/EdgeHolder.cpp77
-rw-r--r--thirdparty/msdfgen/core/EdgeHolder.h41
-rw-r--r--thirdparty/msdfgen/core/MSDFErrorCorrection.cpp495
-rw-r--r--thirdparty/msdfgen/core/MSDFErrorCorrection.h56
-rw-r--r--thirdparty/msdfgen/core/Projection.cpp42
-rw-r--r--thirdparty/msdfgen/core/Projection.h37
-rw-r--r--thirdparty/msdfgen/core/Scanline.cpp125
-rw-r--r--thirdparty/msdfgen/core/Scanline.h55
-rw-r--r--thirdparty/msdfgen/core/Shape.cpp183
-rw-r--r--thirdparty/msdfgen/core/Shape.h55
-rw-r--r--thirdparty/msdfgen/core/ShapeDistanceFinder.h37
-rw-r--r--thirdparty/msdfgen/core/ShapeDistanceFinder.hpp56
-rw-r--r--thirdparty/msdfgen/core/SignedDistance.cpp30
-rw-r--r--thirdparty/msdfgen/core/SignedDistance.h25
-rw-r--r--thirdparty/msdfgen/core/Vector2.cpp146
-rw-r--r--thirdparty/msdfgen/core/Vector2.h66
-rw-r--r--thirdparty/msdfgen/core/arithmetics.hpp63
-rw-r--r--thirdparty/msdfgen/core/bitmap-interpolation.hpp25
-rw-r--r--thirdparty/msdfgen/core/contour-combiners.cpp133
-rw-r--r--thirdparty/msdfgen/core/contour-combiners.h47
-rw-r--r--thirdparty/msdfgen/core/edge-coloring.cpp499
-rw-r--r--thirdparty/msdfgen/core/edge-coloring.h29
-rw-r--r--thirdparty/msdfgen/core/edge-segments.cpp504
-rw-r--r--thirdparty/msdfgen/core/edge-segments.h122
-rw-r--r--thirdparty/msdfgen/core/edge-selectors.cpp261
-rw-r--r--thirdparty/msdfgen/core/edge-selectors.h117
-rw-r--r--thirdparty/msdfgen/core/equation-solver.cpp77
-rw-r--r--thirdparty/msdfgen/core/equation-solver.h12
-rw-r--r--thirdparty/msdfgen/core/generator-config.h63
-rw-r--r--thirdparty/msdfgen/core/msdf-error-correction.cpp154
-rw-r--r--thirdparty/msdfgen/core/msdf-error-correction.h28
-rw-r--r--thirdparty/msdfgen/core/msdfgen.cpp288
-rw-r--r--thirdparty/msdfgen/core/pixel-conversion.hpp18
-rw-r--r--thirdparty/msdfgen/core/rasterization.cpp115
-rw-r--r--thirdparty/msdfgen/core/rasterization.h25
-rw-r--r--thirdparty/msdfgen/core/render-sdf.cpp108
-rw-r--r--thirdparty/msdfgen/core/render-sdf.h22
-rw-r--r--thirdparty/msdfgen/core/save-bmp.cpp169
-rw-r--r--thirdparty/msdfgen/core/save-bmp.h16
-rw-r--r--thirdparty/msdfgen/core/save-tiff.cpp190
-rw-r--r--thirdparty/msdfgen/core/save-tiff.h13
-rw-r--r--thirdparty/msdfgen/core/sdf-error-estimation.cpp192
-rw-r--r--thirdparty/msdfgen/core/sdf-error-estimation.h30
-rw-r--r--thirdparty/msdfgen/core/shape-description.cpp284
-rw-r--r--thirdparty/msdfgen/core/shape-description.h16
-rw-r--r--thirdparty/msdfgen/msdfgen.h65
-rw-r--r--thirdparty/nanosvg/nanosvg.h44
-rw-r--r--thirdparty/volk/volk.c33
-rw-r--r--thirdparty/volk/volk.h29
-rw-r--r--thirdparty/vulkan/include/vulkan/vulkan.hpp6759
-rw-r--r--thirdparty/vulkan/include/vulkan/vulkan_beta.h96
-rw-r--r--thirdparty/vulkan/include/vulkan/vulkan_core.h253
-rw-r--r--thirdparty/vulkan/include/vulkan/vulkan_enums.hpp897
-rw-r--r--thirdparty/vulkan/include/vulkan/vulkan_funcs.hpp1245
-rw-r--r--thirdparty/vulkan/include/vulkan/vulkan_handles.hpp2217
-rw-r--r--thirdparty/vulkan/include/vulkan/vulkan_raii.hpp4854
-rw-r--r--thirdparty/vulkan/include/vulkan/vulkan_structs.hpp3527
-rw-r--r--thirdparty/vulkan/patches/VKEnumStringHelper-use-volk.patch2
-rw-r--r--thirdparty/vulkan/patches/VMA-use-volk.patch8
-rw-r--r--thirdparty/vulkan/vk_enum_string_helper.h126
2557 files changed, 125622 insertions, 71850 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 09ff2454ee..ebbbe345fd 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -73,7 +73,6 @@ doc_classes/* @godotengine/documentation
/modules/minimp3/ @godotengine/audio
/modules/ogg/ @godotengine/audio
/modules/opus/ @godotengine/audio
-/modules/stb_vorbis/ @godotengine/audio
/modules/theora/ @godotengine/audio
/modules/vorbis/ @godotengine/audio
/modules/webm/ @godotengine/audio
diff --git a/.github/actions/godot-build/action.yml b/.github/actions/godot-build/action.yml
new file mode 100644
index 0000000000..5ed64e7de2
--- /dev/null
+++ b/.github/actions/godot-build/action.yml
@@ -0,0 +1,36 @@
+name: Build Godot
+description: Build Godot with the provided options.
+inputs:
+ target:
+ description: The scons target (debug/release_debug/release).
+ default: "debug"
+ tools:
+ description: If tools are to be built.
+ default: false
+ tests:
+ description: If tests are to be built.
+ default: false
+ platform:
+ description: The Godot platform to build.
+ required: false
+ sconsflags:
+ default: ""
+ scons-cache:
+ description: The scons cache path.
+ default: "${{ github.workspace }}/.scons-cache/"
+ scons-cache-limit:
+ description: The scons cache size limit.
+ default: 4096
+runs:
+ using: "composite"
+ steps:
+ - name: Scons Build
+ shell: sh
+ env:
+ SCONSFLAGS: ${{ inputs.sconsflags }}
+ SCONS_CACHE: ${{ inputs.scons-cache }}
+ SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }}
+ run: |
+ echo "Building with flags:" ${{ env.SCONSFLAGS }}
+ scons p=${{ inputs.platform }} target=${{ inputs.target }} tools=${{ inputs.tools }} tests=${{ inputs.tests }} --jobs=2 ${{ env.SCONSFLAGS }}
+ ls -l bin/
diff --git a/.github/actions/godot-cache/action.yml b/.github/actions/godot-cache/action.yml
new file mode 100644
index 0000000000..db14a0b97a
--- /dev/null
+++ b/.github/actions/godot-cache/action.yml
@@ -0,0 +1,22 @@
+name: Setup Godot build cache
+description: Setup Godot build cache.
+inputs:
+ cache-name:
+ description: The cache base name (job name by default).
+ default: "${{github.job}}"
+ scons-cache:
+ description: The scons cache path.
+ default: "${{github.workspace}}/.scons-cache/"
+runs:
+ using: "composite"
+ steps:
+ # Upload cache on completion and check it out now
+ - name: Load .scons_cache directory
+ uses: actions/cache@v2
+ with:
+ path: ${{inputs.scons-cache}}
+ key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
+ restore-keys: |
+ ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
+ ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
+ ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}
diff --git a/.github/actions/godot-deps/action.yml b/.github/actions/godot-deps/action.yml
new file mode 100644
index 0000000000..ee4d7d3751
--- /dev/null
+++ b/.github/actions/godot-deps/action.yml
@@ -0,0 +1,27 @@
+name: Setup python and scons
+description: Setup python, install the pip version of scons.
+inputs:
+ python-version:
+ description: The python version to use.
+ default: "3.x"
+ python-arch:
+ description: The python architecture.
+ default: "x64"
+runs:
+ using: "composite"
+ steps:
+ # Use python 3.x release (works cross platform)
+ - name: Set up Python 3.x
+ uses: actions/setup-python@v2
+ with:
+ # Semantic version range syntax or exact version of a Python version
+ python-version: ${{ inputs.python-version }}
+ # Optional - x64 or x86 architecture, defaults to x64
+ architecture: ${{ inputs.python-arch }}
+
+ - name: Setup scons
+ shell: bash
+ run: |
+ python -c "import sys; print(sys.version)"
+ python -m pip install scons
+ scons --version
diff --git a/.github/actions/upload-artifact/action.yml b/.github/actions/upload-artifact/action.yml
new file mode 100644
index 0000000000..bc1871b914
--- /dev/null
+++ b/.github/actions/upload-artifact/action.yml
@@ -0,0 +1,19 @@
+name: Upload Godot artifact
+description: Upload the Godot artifact.
+inputs:
+ name:
+ description: The artifact name.
+ default: "${{ github.job }}"
+ path:
+ description: The path to upload.
+ required: true
+ default: "bin/*"
+runs:
+ using: "composite"
+ steps:
+ - name: Upload Godot Artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ inputs.name }}
+ path: ${{ inputs.path }}
+ retention-days: 14
diff --git a/.github/workflows/android_builds.yml b/.github/workflows/android_builds.yml
index 63930aa9e2..74f8fa8eae 100644
--- a/.github/workflows/android_builds.yml
+++ b/.github/workflows/android_builds.yml
@@ -4,13 +4,15 @@ on: [push, pull_request]
# Global Settings
env:
GODOT_BASE_BRANCH: master
- SCONSFLAGS: platform=android verbose=yes warnings=extra werror=yes debug_symbols=no --jobs=2 module_text_server_fb_enabled=yes
- SCONS_CACHE_LIMIT: 4096
+ SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes
+
+concurrency:
+ group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-android
+ cancel-in-progress: true
jobs:
android-template:
runs-on: "ubuntu-20.04"
-
name: Template (target=release, tools=no)
steps:
@@ -28,47 +30,37 @@ jobs:
with:
java-version: 8
- # Upload cache on completion and check it out now
- - name: Load .scons_cache directory
- id: android-template-cache
- uses: actions/cache@v2
- with:
- path: ${{github.workspace}}/.scons_cache/
- key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- restore-keys: |
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
+ - name: Setup Godot build cache
+ uses: ./.github/actions/godot-cache
+ continue-on-error: true
+
+ - name: Setup python and scons
+ uses: ./.github/actions/godot-deps
- # Use python 3.x release (works cross platform)
- - name: Set up Python 3.x
- uses: actions/setup-python@v2
+ - name: Compilation (armv7)
+ uses: ./.github/actions/godot-build
with:
- # Semantic version range syntax or exact version of a Python version
- python-version: '3.x'
- # Optional - x64 or x86 architecture, defaults to x64
- architecture: 'x64'
+ sconsflags: ${{ env.SCONSFLAGS }} android_arch=armv7
+ platform: android
+ target: release
+ tools: false
+ tests: false
- - name: Configuring Python packages
- run: |
- python -c "import sys; print(sys.version)"
- python -m pip install scons
- python --version
- scons --version
+ - name: Compilation (arm64v8)
+ uses: ./.github/actions/godot-build
+ with:
+ sconsflags: ${{ env.SCONSFLAGS }} android_arch=arm64v8
+ platform: android
+ target: release
+ tools: false
+ tests: false
- - name: Compilation
- env:
- SCONS_CACHE: ${{github.workspace}}/.scons_cache/
+ - name: Generate Godot templates
run: |
- scons target=release tools=no android_arch=armv7
- scons target=release tools=no android_arch=arm64v8
cd platform/android/java
./gradlew generateGodotTemplates
cd ../../..
ls -l bin/
- - uses: actions/upload-artifact@v2
- with:
- name: ${{ github.job }}
- path: bin/*
- retention-days: 14
+ - name: Upload artifact
+ uses: ./.github/actions/upload-artifact
diff --git a/.github/workflows/ios_builds.yml b/.github/workflows/ios_builds.yml
index c4da3cb683..721d574dbe 100644
--- a/.github/workflows/ios_builds.yml
+++ b/.github/workflows/ios_builds.yml
@@ -4,8 +4,11 @@ on: [push, pull_request]
# Global Settings
env:
GODOT_BASE_BRANCH: master
- SCONSFLAGS: platform=iphone verbose=yes warnings=extra werror=yes debug_symbols=no --jobs=2 module_text_server_fb_enabled=yes
- SCONS_CACHE_LIMIT: 4096
+ SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes
+
+concurrency:
+ group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-ios
+ cancel-in-progress: true
jobs:
ios-template:
@@ -15,44 +18,21 @@ jobs:
steps:
- uses: actions/checkout@v2
- # Upload cache on completion and check it out now
- - name: Load .scons_cache directory
- id: ios-template-cache
- uses: actions/cache@v2
- with:
- path: ${{github.workspace}}/.scons_cache/
- key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- restore-keys: |
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
-
- # Use python 3.x release (works cross platform)
- - name: Set up Python 3.x
- uses: actions/setup-python@v2
- with:
- # Semantic version range syntax or exact version of a Python version
- python-version: '3.x'
- # Optional - x64 or x86 architecture, defaults to x64
- architecture: 'x64'
-
- # You can test your matrix by printing the current Python version
- - name: Configuring Python packages
- run: |
- python -c "import sys; print(sys.version)"
- python -m pip install scons
- python --version
- scons --version
-
- - name: Compilation
- env:
- SCONS_CACHE: ${{github.workspace}}/.scons_cache/
- run: |
- scons target=release tools=no
- ls -l bin/
-
- - uses: actions/upload-artifact@v2
+ - name: Setup Godot build cache
+ uses: ./.github/actions/godot-cache
+ continue-on-error: true
+
+ - name: Setup python and scons
+ uses: ./.github/actions/godot-deps
+
+ - name: Compilation (armv7)
+ uses: ./.github/actions/godot-build
with:
- name: ${{ github.job }}
- path: bin/*
- retention-days: 14
+ sconsflags: ${{ env.SCONSFLAGS }}
+ platform: iphone
+ target: release
+ tools: false
+ tests: false
+
+ - name: Upload artifact
+ uses: ./.github/actions/upload-artifact
diff --git a/.github/workflows/javascript_builds.yml b/.github/workflows/javascript_builds.yml
index 7f7ebf680f..9163baab0f 100644
--- a/.github/workflows/javascript_builds.yml
+++ b/.github/workflows/javascript_builds.yml
@@ -4,10 +4,13 @@ on: [push, pull_request]
# Global Settings
env:
GODOT_BASE_BRANCH: master
- SCONSFLAGS: platform=javascript verbose=yes warnings=extra werror=yes debug_symbols=no --jobs=2
- SCONS_CACHE_LIMIT: 4096
- EM_VERSION: 2.0.25
- EM_CACHE_FOLDER: 'emsdk-cache'
+ SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no
+ EM_VERSION: 2.0.27
+ EM_CACHE_FOLDER: "emsdk-cache"
+
+concurrency:
+ group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-javascript
+ cancel-in-progress: true
jobs:
javascript-template:
@@ -17,25 +20,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- # Azure repositories are not reliable, we need to prevent azure giving us packages.
- - name: Make apt sources.list use the default Ubuntu repositories
- run: |
- sudo rm -f /etc/apt/sources.list.d/*
- sudo cp -f misc/ci/sources.list /etc/apt/sources.list
- sudo apt-get update
-
- # Upload cache on completion and check it out now
- - name: Load .scons_cache directory
- id: javascript-template-cache
- uses: actions/cache@v2
- with:
- path: ${{github.workspace}}/.scons_cache/
- key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- restore-keys: |
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
-
# Additional cache for Emscripten generated system libraries
- name: Load Emscripten cache
id: javascript-template-emscripten-cache
@@ -44,23 +28,6 @@ jobs:
path: ${{env.EM_CACHE_FOLDER}}
key: ${{env.EM_VERSION}}-${{github.job}}
- # Use python 3.x release (works cross platform)
- - name: Set up Python 3.x
- uses: actions/setup-python@v2
- with:
- # Semantic version range syntax or exact version of a Python version
- python-version: '3.x'
- # Optional - x64 or x86 architecture, defaults to x64
- architecture: 'x64'
-
- # You can test your matrix by printing the current Python version
- - name: Configuring Python packages
- run: |
- python -c "import sys; print(sys.version)"
- python -m pip install scons
- python --version
- scons --version
-
- name: Set up Emscripten latest
uses: mymindstorm/setup-emsdk@v10
with:
@@ -71,15 +38,21 @@ jobs:
run: |
emcc -v
- - name: Compilation
- env:
- SCONS_CACHE: ${{github.workspace}}/.scons_cache/
- run: |
- scons target=release tools=no use_closure_compiler=yes
- ls -l bin/
+ - name: Setup Godot build cache
+ uses: ./.github/actions/godot-cache
+ continue-on-error: true
+
+ - name: Setup python and scons
+ uses: ./.github/actions/godot-deps
- - uses: actions/upload-artifact@v2
+ - name: Compilation
+ uses: ./.github/actions/godot-build
with:
- name: ${{ github.job }}
- path: bin/*
- retention-days: 14
+ sconsflags: ${{ env.SCONSFLAGS }}
+ platform: javascript
+ target: release
+ tools: false
+ tests: false
+
+ - name: Upload artifact
+ uses: ./.github/actions/upload-artifact
diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml
index 679362d749..8a49959a30 100644
--- a/.github/workflows/linux_builds.yml
+++ b/.github/workflows/linux_builds.yml
@@ -4,74 +4,90 @@ on: [push, pull_request]
# Global Settings
env:
GODOT_BASE_BRANCH: master
- SCONSFLAGS: platform=linuxbsd verbose=yes warnings=extra werror=yes debug_symbols=no --jobs=2 module_text_server_fb_enabled=yes
- SCONS_CACHE_LIMIT: 4096
+ SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
+
+concurrency:
+ group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
+ cancel-in-progress: true
jobs:
- linux-editor:
+ build-linux:
runs-on: "ubuntu-20.04"
- name: Editor (target=release_debug, tools=yes, tests=yes)
+ name: ${{ matrix.name }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - name: Editor (target=release_debug, tools=yes, tests=yes)
+ cache-name: linux-editor
+ target: release_debug
+ tools: true
+ tests: true
+ doc-test: true
+ bin: "./bin/godot.linuxbsd.opt.tools.64"
+ artifact: true
+
+ - name: Editor and sanitizers (target=debug, tools=yes, tests=yes, use_asan=yes, use_ubsan=yes)
+ cache-name: linux-editor-sanitizers
+ target: debug
+ tools: true
+ tests: true
+ sconsflags: use_asan=yes use_ubsan=yes
+ proj-test: true
+ bin: "./bin/godot.linuxbsd.tools.64s"
+ # Skip 2GiB artifact speeding up action.
+ artifact: false
+
+ - name: Template w/ Mono (target=release, tools=no)
+ cache-name: linux-template-mono
+ target: release
+ tools: false
+ tests: false
+ sconsflags: module_mono_enabled=yes mono_glue=no debug_symbols=no
+ artifact: true
steps:
- uses: actions/checkout@v2
- # Azure repositories are not reliable, we need to prevent azure giving us packages.
- - name: Make apt sources.list use the default Ubuntu repositories
+ - name: Linux dependencies
+ shell: bash
run: |
+ # Azure repositories are not reliable, we need to prevent azure giving us packages.
sudo rm -f /etc/apt/sources.list.d/*
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
sudo apt-get update
-
- # Install all packages (except scons)
- - name: Configure dependencies
- run: |
+ # The actual dependencies
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
- libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm
+ libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev \
+ libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip
- # Upload cache on completion and check it out now
- - name: Load .scons_cache directory
- id: linux-editor-cache
- uses: actions/cache@v2
- with:
- path: ${{github.workspace}}/.scons_cache/
- key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- restore-keys: |
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
-
- # Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- - name: Set up Python 3.x
- uses: actions/setup-python@v2
+ - name: Setup Godot build cache
+ uses: ./.github/actions/godot-cache
with:
- # Semantic version range syntax or exact version of a Python version
- python-version: '3.x'
- # Optional - x64 or x86 architecture, defaults to x64
- architecture: 'x64'
+ cache-name: ${{ matrix.cache-name }}
+ continue-on-error: true
- # Setup scons, print python version and scons version info, so if anything is broken it won't run the build.
- - name: Configuring Python packages
- run: |
- python -c "import sys; print(sys.version)"
- python -m pip install scons
- python --version
- scons --version
+ - name: Setup python and scons
+ uses: ./.github/actions/godot-deps
- # We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
- name: Compilation
- env:
- SCONS_CACHE: ${{github.workspace}}/.scons_cache/
- run: |
- scons tools=yes tests=yes target=release_debug
- ls -l bin/
+ uses: ./.github/actions/godot-build
+ with:
+ sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
+ platform: linuxbsd
+ target: ${{ matrix.target }}
+ tools: ${{ matrix.tools }}
+ tests: ${{ matrix.tests }}
# Execute unit tests for the editor
- - name: Unit Tests
+ - name: Unit tests
+ if: ${{ matrix.tests }}
run: |
- ./bin/godot.linuxbsd.opt.tools.64 --test
+ ${{ matrix.bin }} --test
# Download, unzip and setup SwiftShader library [4466040]
- name: Download SwiftShader
+ if: ${{ matrix.tests }}
run: |
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/swiftshader2.zip
unzip swiftshader2.zip
@@ -81,92 +97,16 @@ jobs:
# Check class reference
- name: Check for class reference updates
+ if: ${{ matrix.doc-test }}
run: |
echo "Running --doctool to see if this changes the public API without updating the documentation."
echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n"
- VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run bin/godot.linuxbsd.opt.tools.64 --doctool . 2>&1 > /dev/null || true
+ VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --doctool . 2>&1 > /dev/null || true
git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$'
- - uses: actions/upload-artifact@v2
- with:
- name: ${{ github.job }}
- path: bin/*
- retention-days: 14
-
- linux-editor-sanitizers:
- runs-on: "ubuntu-20.04"
- name: Editor and sanitizers (target=debug, tools=yes, tests=yes, use_asan=yes, use_ubsan=yes)
-
- steps:
- - uses: actions/checkout@v2
-
- # Azure repositories are not reliable, we need to prevent azure giving us packages.
- - name: Make apt sources.list use the default Ubuntu repositories
- run: |
- sudo rm -f /etc/apt/sources.list.d/*
- sudo cp -f misc/ci/sources.list /etc/apt/sources.list
- sudo apt-get update
-
- # Install all packages (except scons)
- - name: Configure dependencies
- run: |
- sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
- libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm \
- xvfb wget unzip
-
- # Upload cache on completion and check it out now
- - name: Load .scons_cache directory
- id: linux-sanitizers-cache
- uses: actions/cache@v2
- with:
- path: ${{github.workspace}}/.scons_cache/
- key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- restore-keys: |
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
-
- # Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- - name: Set up Python 3.x
- uses: actions/setup-python@v2
- with:
- # Semantic version range syntax or exact version of a Python version
- python-version: '3.x'
- # Optional - x64 or x86 architecture, defaults to x64
- architecture: 'x64'
-
- # Setup scons, print python version and scons version info, so if anything is broken it won't run the build.
- - name: Configuring Python packages
- run: |
- python -c "import sys; print(sys.version)"
- python -m pip install scons
- python --version
- scons --version
-
- # We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
- - name: Compilation
- env:
- SCONS_CACHE: ${{github.workspace}}/.scons_cache/
- run: |
- scons tools=yes tests=yes target=debug debug_symbols=no use_asan=yes use_ubsan=yes
- ls -l bin/
-
- # Execute unit tests for the editor
- - name: Unit Tests
- run: |
- ./bin/godot.linuxbsd.tools.64s --test
-
- # Download, unzip and setup SwiftShader library [4466040]
- - name: Download SwiftShader
- run: |
- wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/swiftshader2.zip
- unzip swiftshader2.zip
- rm swiftshader2.zip
- curr="$(pwd)/libvk_swiftshader.so"
- sed -i "s|PATH_TO_CHANGE|$curr|" vk_swiftshader_icd.json
-
# Download and extract zip archive with project, folder is renamed to be able to easy change used project
- name: Download test project
+ if: ${{ matrix.proj-test }}
run: |
wget https://github.com/qarmin/RegressionTestProject/archive/4.0.zip
unzip 4.0.zip
@@ -174,74 +114,25 @@ jobs:
# Editor is quite complicated piece of software, so it is easy to introduce bug here
- name: Open and close editor
+ if: ${{ matrix.proj-test }}
run: |
- VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run bin/godot.linuxbsd.tools.64s --audio-driver Dummy -e -q --path test_project 2>&1 | tee sanitizers_log.txt || true
+ VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --audio-driver Dummy -e -q --path test_project 2>&1 | tee sanitizers_log.txt || true
misc/scripts/check_ci_log.py sanitizers_log.txt
# Run test project
- name: Run project
+ if: ${{ matrix.proj-test }}
run: |
- VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run bin/godot.linuxbsd.tools.64s 40 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true
+ VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run ${{ matrix.bin }} 40 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true
misc/scripts/check_ci_log.py sanitizers_log.txt
- linux-template-mono:
- runs-on: "ubuntu-20.04"
- name: Template w/ Mono (target=release, tools=no)
-
- steps:
- - uses: actions/checkout@v2
-
- # Azure repositories are not reliable, we need to prevent azure giving us packages.
- - name: Make apt sources.list use the default Ubuntu repositories
- run: |
- sudo rm -f /etc/apt/sources.list.d/*
- sudo cp -f misc/ci/sources.list /etc/apt/sources.list
- sudo apt-get update
-
- # Install all packages (except scons)
- - name: Configure dependencies
- run: |
- sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
- libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm
-
- # Upload cache on completion and check it out now
- - name: Load .scons_cache directory
- id: linux-template-cache
- uses: actions/cache@v2
- with:
- path: ${{github.workspace}}/.scons_cache/
- key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- restore-keys: |
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
-
- # Use python 3.x release (works cross platform)
- - name: Set up Python 3.x
- uses: actions/setup-python@v2
- with:
- # Semantic version range syntax or exact version of a Python version
- python-version: '3.x'
- # Optional - x64 or x86 architecture, defaults to x64
- architecture: 'x64'
-
- # You can test your matrix by printing the current Python version
- - name: Configuring Python packages
- run: |
- python -c "import sys; print(sys.version)"
- python -m pip install scons
- python --version
- scons --version
-
- - name: Compilation
- env:
- SCONS_CACHE: ${{github.workspace}}/.scons_cache/
+ - name: Prepare artifact
+ if: ${{ matrix.artifact }}
run: |
- scons target=release tools=no module_mono_enabled=yes mono_glue=no
- ls -l bin/
+ strip bin/godot.*
- - uses: actions/upload-artifact@v2
+ - name: Upload artifact
+ uses: ./.github/actions/upload-artifact
+ if: ${{ matrix.artifact }}
with:
- name: ${{ github.job }}
- path: bin/*
- retention-days: 14
+ name: ${{ matrix.cache-name }}
diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml
index a15ab92052..dec3abe52b 100644
--- a/.github/workflows/macos_builds.yml
+++ b/.github/workflows/macos_builds.yml
@@ -4,111 +4,66 @@ on: [push, pull_request]
# Global Settings
env:
GODOT_BASE_BRANCH: master
- SCONSFLAGS: platform=osx verbose=yes warnings=extra werror=yes debug_symbols=no --jobs=2 module_text_server_fb_enabled=yes
- SCONS_CACHE_LIMIT: 4096
+ SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
+
+concurrency:
+ group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macos
+ cancel-in-progress: true
jobs:
- macos-editor:
+ build-macos:
runs-on: "macos-latest"
-
- name: Editor (target=release_debug, tools=yes, tests=yes)
+ name: ${{ matrix.name }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - name: Editor (target=release_debug, tools=yes, tests=yes)
+ cache-name: macos-editor
+ target: release_debug
+ tools: true
+ tests: true
+ bin: "./bin/godot.osx.opt.tools.64"
+
+ - name: Template (target=release, tools=no)
+ cache-name: macos-template
+ target: release
+ tools: false
+ tests: false
+ sconsflags: debug_symbols=no
steps:
- uses: actions/checkout@v2
- # Upload cache on completion and check it out now
- - name: Load .scons_cache directory
- id: macos-editor-cache
- uses: actions/cache@v2
- with:
- path: ${{github.workspace}}/.scons_cache/
- key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- restore-keys: |
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
-
- # Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- - name: Set up Python 3.x
- uses: actions/setup-python@v2
+ - name: Setup Godot build cache
+ uses: ./.github/actions/godot-cache
with:
- # Semantic version range syntax or exact version of a Python version
- python-version: '3.x'
- # Optional - x64 or x86 architecture, defaults to x64
- architecture: 'x64'
+ cache-name: ${{ matrix.cache-name }}
+ continue-on-error: true
- # Setup scons, print python version and scons version info, so if anything is broken it won't run the build.
- - name: Configuring Python packages
- run: |
- python -c "import sys; print(sys.version)"
- python -m pip install scons
- python --version
- scons --version
+ - name: Setup python and scons
+ uses: ./.github/actions/godot-deps
- # We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
- name: Compilation
- env:
- SCONS_CACHE: ${{github.workspace}}/.scons_cache/
- run: |
- scons tools=yes tests=yes target=release_debug
- ls -l bin/
-
- # Execute unit tests for the editor
- - name: Unit Tests
- run: |
- ./bin/godot.osx.opt.tools.64 --test
-
- - uses: actions/upload-artifact@v2
+ uses: ./.github/actions/godot-build
with:
- name: ${{ github.job }}
- path: bin/*
- retention-days: 14
+ sconsflags: ${{ env.SCONSFLAGS }}
+ platform: osx
+ target: ${{ matrix.target }}
+ tools: ${{ matrix.tools }}
+ tests: ${{ matrix.tests }}
- macos-template:
- runs-on: "macos-latest"
- name: Template (target=release, tools=no)
-
- steps:
- - uses: actions/checkout@v2
-
- # Upload cache on completion and check it out now
- - name: Load .scons_cache directory
- id: macos-template-cache
- uses: actions/cache@v2
- with:
- path: ${{github.workspace}}/.scons_cache/
- key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- restore-keys: |
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
-
- # Use python 3.x release (works cross platform)
- - name: Set up Python 3.x
- uses: actions/setup-python@v2
- with:
- # Semantic version range syntax or exact version of a Python version
- python-version: '3.x'
- # Optional - x64 or x86 architecture, defaults to x64
- architecture: 'x64'
-
- # You can test your matrix by printing the current Python version
- - name: Configuring Python packages
+ # Execute unit tests for the editor
+ - name: Unit tests
+ if: ${{ matrix.tests }}
run: |
- python -c "import sys; print(sys.version)"
- python -m pip install scons
- python --version
- scons --version
+ ${{ matrix.bin }} --test
- - name: Compilation
- env:
- SCONS_CACHE: ${{github.workspace}}/.scons_cache/
+ - name: Prepare artifact
run: |
- scons target=release tools=no
- ls -l bin/
+ strip bin/godot.*
- - uses: actions/upload-artifact@v2
+ - name: Upload artifact
+ uses: ./.github/actions/upload-artifact
with:
- name: ${{ github.job }}
- path: bin/*
- retention-days: 14
+ name: ${{ matrix.cache-name }}
diff --git a/.github/workflows/static_checks.yml b/.github/workflows/static_checks.yml
index 30468034ff..fd2e748076 100644
--- a/.github/workflows/static_checks.yml
+++ b/.github/workflows/static_checks.yml
@@ -1,6 +1,10 @@
name: 📊 Static Checks
on: [push, pull_request]
+concurrency:
+ group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-static
+ cancel-in-progress: true
+
jobs:
static-checks:
name: Static Checks (clang-format, black format, file format, documentation checks)
diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml
index d1db449ab0..ad870ae58f 100644
--- a/.github/workflows/windows_builds.yml
+++ b/.github/workflows/windows_builds.yml
@@ -5,116 +5,70 @@ on: [push, pull_request]
# SCONS_CACHE for windows must be set in the build environment
env:
GODOT_BASE_BRANCH: master
- SCONSFLAGS: platform=windows verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2 module_text_server_fb_enabled=yes
+ SCONSFLAGS: verbose=yes warnings=all werror=yes module_text_server_fb_enabled=yes
SCONS_CACHE_MSVC_CONFIG: true
- SCONS_CACHE_LIMIT: 3072
+
+concurrency:
+ group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-windows
+ cancel-in-progress: true
jobs:
- windows-editor:
+ build-windows:
# Windows 10 with latest image
runs-on: "windows-latest"
-
- # Windows Editor - checkout with the plugin
- name: Editor (target=release_debug, tools=yes, tests=yes)
+ name: ${{ matrix.name }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - name: Editor (target=release_debug, tools=yes, tests=yes)
+ cache-name: windows-editor
+ target: release_debug
+ tools: true
+ tests: true
+ bin: "./bin/godot.windows.opt.tools.64.exe"
+
+ - name: Template (target=release, tools=no)
+ cache-name: windows-template
+ target: release
+ tools: false
+ tests: false
+ sconsflags: debug_symbols=no
steps:
- - uses: actions/checkout@v2
-
- # Upload cache on completion and check it out now
- # Editing this is pretty dangerous for Windows since it can break and needs to be properly tested with a fresh cache.
- - name: Load .scons_cache directory
- id: windows-editor-cache
- uses: actions/cache@v2
- with:
- path: /.scons_cache/
- key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- restore-keys: |
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
-
- # Use python 3.x release (works cross platform; best to keep self contained in it's own step)
- - name: Set up Python 3.x
- uses: actions/setup-python@v2
- with:
- # Semantic version range syntax or exact version of a Python version
- python-version: '3.x'
- # Optional - x64 or x86 architecture, defaults to x64
- architecture: 'x64'
-
- # Setup scons, print python version and scons version info, so if anything is broken it won't run the build.
- - name: Configuring Python packages
- run: |
- python -c "import sys; print(sys.version)"
- python -m pip install scons
- python --version
- scons --version
-
- # We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
- - name: Compilation
- env:
- SCONS_CACHE: /.scons_cache/
- run: |
- scons tools=yes tests=yes target=release_debug
- ls -l bin/
-
- # Execute unit tests for the editor
- - name: Unit Tests
- run: |
- ./bin/godot.windows.opt.tools.64.exe --test
-
- - uses: actions/upload-artifact@v2
- with:
- name: ${{ github.job }}
- path: bin/*
- retention-days: 14
-
- windows-template:
- runs-on: "windows-latest"
- name: Template (target=release, tools=no)
-
- steps:
- - uses: actions/checkout@v2
-
- # Upload cache on completion and check it out now
- # Editing this is pretty dangerous for Windows since it can break and needs to be properly tested with a fresh cache.
- - name: Load .scons_cache directory
- id: windows-template-cache
- uses: RevoluPowered/cache@v2.1
- with:
- path: /.scons_cache/
- key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- restore-keys: |
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
- ${{github.job}}-${{env.GODOT_BASE_BRANCH}}
-
- # Use python 3.x release (works cross platform)
- - name: Set up Python 3.x
- uses: actions/setup-python@v2
- with:
- # Semantic version range syntax or exact version of a Python version
- python-version: '3.x'
- # Optional - x64 or x86 architecture, defaults to x64
- architecture: 'x64'
-
- # You can test your matrix by printing the current Python version
- - name: Configuring Python packages
- run: |
- python -c "import sys; print(sys.version)"
- python -m pip install scons
- python --version
- scons --version
-
- - name: Compilation
- env:
- SCONS_CACHE: /.scons_cache/
- run: |
- scons target=release tools=no
- ls -l bin/
-
- - uses: actions/upload-artifact@v2
- with:
- name: ${{ github.job }}
- path: bin/*
- retention-days: 14
+ - uses: actions/checkout@v2
+
+ - name: Setup Godot build cache
+ uses: ./.github/actions/godot-cache
+ with:
+ cache-name: ${{ matrix.cache-name }}
+ continue-on-error: true
+
+
+ - name: Setup python and scons
+ uses: ./.github/actions/godot-deps
+
+ - name: Compilation
+ uses: ./.github/actions/godot-build
+ with:
+ sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
+ platform: windows
+ target: ${{ matrix.target }}
+ tools: ${{ matrix.tools }}
+ tests: ${{ matrix.tests }}
+ scons-cache-limit: 3072
+
+ # Execute unit tests for the editor
+ - name: Unit tests
+ if: ${{ matrix.tests }}
+ run: |
+ ${{ matrix.bin }} --test
+
+ - name: Prepare artifact
+ run: |
+ Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
+
+ - name: Upload artifact
+ uses: ./.github/actions/upload-artifact
+ with:
+ name: ${{ matrix.cache-name }}
diff --git a/.gitignore b/.gitignore
index c1c2374bc3..5b3414fe7e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -83,7 +83,7 @@ gmon.out
__MACOSX
logs/
-# for projects that use SCons for building: http://http://www.scons.org/
+# for projects that use SCons for building: https://www.scons.org/
.sconf_temp
.sconsign*.dblite
*.pyc
@@ -390,3 +390,6 @@ gcov.css
# https://clangd.llvm.org/ cache folder
.clangd/
.cache/
+
+# Generated by unit tests files
+tests/data/*.translation
diff --git a/.mailmap b/.mailmap
index 28bd3c8e56..d303b81396 100644
--- a/.mailmap
+++ b/.mailmap
@@ -29,6 +29,8 @@ Eric M <itsjusteza@gmail.com>
Eric Rybicki <info@ericrybicki.com> <stratos695@googlemail.com>
Erik Selecký <35656626+rxlecky@users.noreply.github.com>
Erik Selecký <35656626+rxlecky@users.noreply.github.com> <35656626+SeleckyErik@users.noreply.github.com>
+Eveline Jarosz <marqin.pl@gmail.com>
+Eveline Jarosz <marqin.pl@gmail.com> <marqin.pl+git@gmail.com>
Fabian <supagu@gmail.com>
Ferenc Arn <tagcup@yahoo.com>
Ferenc Arn <tagcup@yahoo.com> <tagcup@users.noreply.github.com>
@@ -43,8 +45,6 @@ Guilherme Felipe <guilhermefelipecgs@gmail.com>
Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
HaSa1002 <johawitt@outlook.de>
Hein-Pieter van Braam-Stewart <hp@tmm.cx>
-Hubert Jarosz <marqin.pl@gmail.com>
-Hubert Jarosz <marqin.pl@gmail.com> <marqin.pl+git@gmail.com>
Hugo Locurcio <hugo.locurcio@hugo.pro> <hugo.l@openmailbox.org>
Hugo Locurcio <hugo.locurcio@hugo.pro> <Calinou@users.noreply.github.com>
Hugo Locurcio <hugo.locurcio@hugo.pro> Calinou <calinou@opmbx.org>
@@ -107,6 +107,7 @@ Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Pieter-Jan Briers <pieterjan.briers+git@gmail.com> <pieterjan.briers@gmail.com>
Poommetee Ketson <poommetee@protonmail.com>
Przemysław Gołąb (n-pigeon) <golab.przemyslaw@gmail.com>
+Rafał Mikrut <mikrutrafal@protonmail.com>
Rafał Mikrut <mikrutrafal@protonmail.com> <mikrutrafal54@gmail.com>
Ralf Hölzemer <r.hoelzemer@posteo.de> <rollenrolm@posteo.de>
Ralf Hölzemer <r.hoelzemer@posteo.de> <rollenrolm@users.noreply.github.com>
@@ -116,6 +117,7 @@ RaphaelHunter <raphael10241024@gmail.com> <Raphael10241024@gmail.com>
RaphaelHunter <raphael10241024@gmail.com> <raphael20141024@gmail.com>
Rémi Verschelde <rverschelde@gmail.com> <remi@verschelde.fr>
Rhody Lugo <rhodylugo@gmail.com> <rhodylugo@me.com>
+Ricardo Subtil <ricasubtil@gmail.com>
Robin Hübner <profan@prfn.se> <robinhubner@gmail.com>
romulox_x <romulox_x@yahoo.com>
Ruslan Mustakov <r.mustakov@gmail.com> <ruslan.mustakov@xored.com>
diff --git a/AUTHORS.md b/AUTHORS.md
index 5147da3700..0a0e3a9c21 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -36,6 +36,7 @@ name is available.
Andrii Doroshenko (Xrayez)
Andy Moss (MillionOstrich)
Angad Kambli (angad-k)
+ Anilforextra (AnilBK)
Anish Bhobe (KidRigger)
Anton Yabchinskiy (a12n)
Anutrix
@@ -76,6 +77,7 @@ name is available.
Eric Rybicki (ericrybick)
Erik Selecký (rxlecky)
est31
+ Eveline Jarosz (Marqin)
Fabian Mathews (supagu)
Fabio Alessandrelli (Faless)
fabriceci
@@ -99,7 +101,6 @@ name is available.
Hiroshi Ogawa (hi-ogawa)
homer666
hoontee
- Hubert Jarosz (Marqin)
Hugo Locurcio (Calinou)
Ian Bishop (ianb96)
Ibrahn Sahir (ibrahn)
@@ -109,9 +110,9 @@ name is available.
J08nY
Jakub Grzesik (kubecz3k)
James Buck (jbuck3)
+ Jean-Michel Bernard (jmb462)
Jérôme Gully (Nutriz)
Jia Jun Chai (SkyLucilfer)
- jmb462
Joan Fons Sanchez (JFonS)
Johannes Witt (HaSa1002)
Johan Manuel (29jm)
@@ -119,6 +120,7 @@ name is available.
Juan Linietsky (reduz)
Julian Murgia (StraToN)
Julien Nguyen (Blackiris)
+ Jummit
Justo Delgado (mrcdk)
Kelly Thomas (KellyThomas)
kleonc
@@ -137,7 +139,7 @@ name is available.
Marc Gilleron (Zylann)
Marcin Zawiejski (dragmz)
Marcus Brummer (mbrlabs)
- Marcus (MCrafterzz)
+ Marcus Elg (MCrafterzz)
Mariano Javier Suligoy (MarianoGnu)
Mario Schlack (hurikhan)
Martin Capitanio (capnm)
diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt
index ef444721b2..e84302620e 100644
--- a/COPYRIGHT.txt
+++ b/COPYRIGHT.txt
@@ -80,6 +80,13 @@ Copyright: 2008-2016, The Android Open Source Project
2002, Google, Inc.
License: Apache-2.0
+Files: ./scene/animation/easing_equations.h
+Comment: Robert Penner's Easing Functions
+Copyright: 2001, Robert Penner
+ 2007-2021 Juan Linietsky, Ariel Manzur.
+ 2014-2021 Godot Engine contributors.
+License: Expat
+
Files: ./servers/physics_3d/collision_solver_3d_sat.cpp
Comment: Open Dynamics Engine
Copyright: 2001-2003, Russell L. Smith, Alen Ladavac, Nguyen Binh
@@ -307,11 +314,6 @@ Comment: Fast Filtering of Reflection Probes
Copyright: 2016, Activision Publishing, Inc.
License: Expat
-Files: ./thirdparty/misc/easing_equations.cpp
-Comment: Robert Penner's Easing Functions
-Copyright: 2001, Robert Penner
-License: BSD-3-clause
-
Files: ./thirdparty/misc/fastlz.c
./thirdparty/misc/fastlz.h
Comment: FastLZ
@@ -367,7 +369,6 @@ Copyright: 2016-2020, Aras Pranckevicius
License: public-domain or Unlicense or Expat
Files: ./thirdparty/misc/stb_rect_pack.h
- ./thirdparty/misc/stb_vorbis.c
Comment: stb libraries
Copyright: Sean Barrett
License: public-domain or Unlicense or Expat
@@ -377,6 +378,11 @@ Comment: YUV2RGB
Copyright: 2008-2011, Robin Watts
License: BSD-2-clause
+Files: ./thirdparty/msdfgen/
+Comment: Multi-channel signed distance field generator
+Copyright: 2016, Viktor Chlumsky
+License: MIT
+
Files: ./thirdparty/nanosvg/
Comment: NanoSVG
Copyright: 2013-2014, Mikko Mononen
@@ -1135,7 +1141,7 @@ License: glslang
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
.
As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -1375,7 +1381,7 @@ License: HarfBuzz
Copyright (C) 2009 Keith Stribley
Copyright (C) 2009 Martin Hosken and SIL International
Copyright (C) 2007 Chris Wilson
- Copyright (C) 2006 Behdad Esfahbod
+ Copyright (C) 2005,2006,2020,2021 Behdad Esfahbod
Copyright (C) 2005 David Turner
Copyright (C) 2004,2007,2008,2009,2010 Red Hat, Inc.
Copyright (C) 1998-2004 David Turner and Werner Lemberg
@@ -1761,7 +1767,7 @@ License: MPL-2.0
.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
diff --git a/DONORS.md b/DONORS.md
index 1a49465e83..c1e034f67e 100644
--- a/DONORS.md
+++ b/DONORS.md
@@ -23,7 +23,6 @@ generous deed immortalized in the next stable release of Godot Engine.
## Silver sponsors
ASIFA-Hollywood <https://www.asifa-hollywood.org>
- LITSLINK <https://litslink.com>
## Bronze sponsors
@@ -41,6 +40,7 @@ generous deed immortalized in the next stable release of Godot Engine.
AD Ford
alex brown
+ Andrew Bowen
Andrew Dunai
Angry Skull
anti666
@@ -65,7 +65,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Jonah Stich
Justin Arnold
Justo Delgado Baudí
- Kamil Brzezinskip
Marcel Kräml
Marek Belski
Matthieu Huvé
@@ -93,24 +92,26 @@ generous deed immortalized in the next stable release of Godot Engine.
Acheron
Adam Brown
albinaask
- Alvaro A Baena R
Andres Hernandez
+ Arisaka Mayuki
Asher Glick
Barugon
+ Benito
Carlo Cabanilla
Daniel James
David Gehrig
David Graham
David Snopek
- Don B
Ed Morley
Ellen Poe
Florian Rämisch
Gamejunkey
+ Jacobus Dens
Jakub Grzesik
Javier Roman
Joan Fons
Johnny IV Young
+ Jonathan Wright
Jon Woodward
Karl Werf
Klavdij Voncina
@@ -119,13 +120,14 @@ generous deed immortalized in the next stable release of Godot Engine.
Maciej Pendolski
Manuele Finocchiaro
Markus Wiesner
- Mason Bially
Matthew Hillier
Michael
+ Mick
Monster Vial
Officine Pixel S.n.c.
+ Patrick Brock
+ Pedro Silva
Petrus Prinsloo
- Rene
Retro Village
Rob Messick
Roland Fredenhagen
@@ -133,8 +135,10 @@ generous deed immortalized in the next stable release of Godot Engine.
Sarksus
Scott B
Sean
+ segfault-god
Sergey
Sofox
+ Stephan Kessler
Stephen Molyneaux
Taylor Ritenour
Tom Langwaldt
@@ -142,22 +146,21 @@ generous deed immortalized in the next stable release of Godot Engine.
tukon
Vagabond Arcade
Vitaliy Sapronenko
- William Wold
Xeno Coliseum
Zaven Muradyan
Adam Nakonieczny
+ Adam Nelson
+ Alexander Erlemann
Alexander J Maynard
- Alex de la Mare
- Alexey Dyadchenko
Alex Khayrullin
alice gambrell
Andrew Cunningham
Andrew Farr
+ Andriy
Antanas Paskauskas
Antoni Batchelli
Arch Henderson III
- Arisaka Mayuki
Arthur S. Muszynski
Ben Botwin
Brandon Hawkinson
@@ -181,11 +184,8 @@ generous deed immortalized in the next stable release of Godot Engine.
Daniel Tebbutt
Darrian Little
Dennis Belfrage
- Dev To be curious
- Digital Denizen
Dimitri Nüscheler
Donn Eddy
- Easypete
Edgar Sun
Eric
Eric Brand
@@ -200,6 +200,7 @@ generous deed immortalized in the next stable release of Godot Engine.
General Chicken
Geoffroy Warin
GGGames.org
+ gisora
GrayDwarf
Guilherme Felipe de C. G. da Silva
Harvey Fong
@@ -210,22 +211,22 @@ generous deed immortalized in the next stable release of Godot Engine.
Hunter Barabas
Jake Burga
James Couzens
+ James Zahn
Jan Sælid
Jared
Jared White
- Jeppe Zapp
+ Jennifer Wilcox
Jesús Chicharro
Joel Fivat
Johnathan Kupferer
- John Knight
Jonathan Turner
+ Josef Stumpfegger
Jose Malheiro
Jose Manuel Muñoz Perez
Joseph Crane
Joshie Sparks
Joshua Flores
Joshua Lesperance
- Juan T Chen
Juan Velandia
Judd
Julián Absatz
@@ -237,13 +238,13 @@ generous deed immortalized in the next stable release of Godot Engine.
kinfox
Kis Levente Lorand
Kos
- Lain Ballard
Laszlo Kiss
leetNightshade
Leo Fidel R Liban
Liam Smyth
LoparPanda
Luca Vazzano
+ Luke
MadScientistCarl
Marcus Dobler
Marcus Richter
@@ -253,6 +254,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Martin Soucek
matt
Matt Greene
+ Matthew Hall
Matthias Toepp
Mecha Kaiju X
medecau
@@ -264,27 +266,24 @@ generous deed immortalized in the next stable release of Godot Engine.
MikadoSC
Mike Barbee
minz1
- MuffinManKen
nate etan
Nick Abousselam
+ Nicola Cocchiaro
Nicole Barovic
+ Nikita Bliznyuk
Oliver Dick
Oscar Campos
- Patrick Ting
Paul Hocker
Paul Von Zimmerman
Pavel Kotlyar
- Pedro Silva
Pete Goodwin
- Peter Richmond
Petr Malac
PhaineOfCatz
- pl
+ Piotr Wyszyński
+ Pyxl
Raymond Harris
- Renato Fontes
Rene Tailleur
Rhodochrone
- Ricardo Alcantara
Rob
Robert McDermott
Robert Willes
@@ -295,6 +294,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Ronnie Ashlock
Ronny Mühle
Ryan Scott
+ Samuel Hummerstone
Samuel Judd
Samuel Smart
Sean Morgan
@@ -304,6 +304,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Sergey Fonaryov
Sergey Minakov
Shishir Tandale
+ Sing Chun Lee
SKison
Song Junwoo
spacechase0
@@ -316,6 +317,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Thomas Kurz
Tim Howard
Tobias Bocanegra
+ Tobias Raggl
Todd Smith
Torbulous
toto bibi
@@ -333,37 +335,36 @@ generous deed immortalized in the next stable release of Godot Engine.
Yifan Lai
Yuancheng Zhang
Zie Weaver
- Zoran Kukulj
## Silver donors
1D_Inc
Aaron Oldenburg
+ A. B.
Actual_Dio
Adam Brunnmeier
Adam Carr
Adam Long
Adam McCurdy
Adam N Webber
+ Adam R Pope
Adam Smeltzer
Adam Szymański
Adisibio
Adrien de Pierres
- Agar3s - Giovanny Beltrán
Ahmet Kalyoncu
Aidan O'Flannagain
Aki Mimoto
Alan Beauchamp
+ Alberto Salazar Muñoz
Alberto Vilches
Albin Jonasson Svärdsby
Alder Stefano
AleMax
+ Ales Jelovcan
Alessandro Senese
- Alexander Erlemann
Alexander Ravenheart
- Alexander Ryndin
Alexander Walter (SilvanuZ)
- Alexandre Beaudoin
Alex Chan
Alex Clavelle
alex raeside
@@ -379,6 +380,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Ano Nim
Anthony Avina
Anton Bouwer
+ Antti Vesanen
Arch Toasty
Arda Erol
Armin Preiml
@@ -394,14 +396,17 @@ generous deed immortalized in the next stable release of Godot Engine.
Bartosz Bielecki
Benedikt
Benoit Jauvin-Girard
+ Ben Ridley
Ben Vercammen
Bernd Jänichen
Bernhard Werner
Bill Thibault
+ bitbrain
Bjarne Voigtländer
Black Block
blackjacksike
Blair Allen
+ Blunderjack
Bobby CC Wong
Borkzilla
Bram
@@ -409,19 +414,19 @@ generous deed immortalized in the next stable release of Godot Engine.
Brian Klein
Brodie Fairhall
Bronson Zgeb
- Bùi Việt Thành
+ Bruno Hurth
Burney Waring
bwhirt
Caleb Gartner
Caleb Makela
Cameron Meyer
Carlos Cejudo
+ Carlos Rios
Carl van der Geest
Casey
Cassidy James
Cédric Givord
Chad Steadman
- Charles Alston
Chris Chapin
Chris Langford
Christian Clavet
@@ -447,13 +452,16 @@ generous deed immortalized in the next stable release of Godot Engine.
David Bôle
David May
David Maziarka
+ David Rapisarda
deadwithbread
Devin Carraway
Diego Pereira
Dima Fedotov
+ Dimitri Roche
Dmitry Fisher
Dmytro Korchynskyi
Dominik Wetzel
+ Don B
Douglas Plumley
Dragontrapper
Dr Ewan Murray
@@ -473,12 +481,12 @@ generous deed immortalized in the next stable release of Godot Engine.
Eric Walkingshaw
Eric Williams
Erkki Seppälä
- Evan Rose
Faisal Alkubaisi
Fancy Ants Studios
fby
Fekinox
Felix Bohmann
+ Filip Lundby
Forty Doubleu
Francisco Garcia Florez
Francois Holland
@@ -489,6 +497,7 @@ generous deed immortalized in the next stable release of Godot Engine.
George Marques
Georgi Petkov
Graham Overby
+ Green Fox
Greg Lincoln
Greg Olson
Greyson Richey
@@ -503,7 +512,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Hunter Jones
Ian ORourke
Ian Williams
- Iiari
IndustrialRobot
Ivan Nikolaev
iveks
@@ -515,6 +523,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Jako Danar
James
James A F Manley
+ James Gary
James Guardino
James Quincy
James Thomas
@@ -546,7 +555,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Jonatan R
Jonathan Bieber
Jonathan G
- Jonathan Wright
Jon Bonazza
Jon Sully
Jordan West
@@ -565,9 +573,9 @@ generous deed immortalized in the next stable release of Godot Engine.
Julian Murgia
June Little
Justin Hamilton
+ Justin Hurst
Justin Oaksford
Justin Spedding
- Justin W. Flory
KaDokta
Karol Porzycki
Keedong Park
@@ -575,7 +583,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Keith Bradner
Kenji Kawabata
Ken Minardo
- Kenneth Lee
Kent Jofur
Ketafuki
Kevin van Rooijen
@@ -585,6 +592,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Kolandrious
Konstantin Goncharov
kormai
+ Kquona
Krishna Nadoor
Kristian Nygaard Jensen
KR McGinley
@@ -596,7 +604,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Kyuppin
Lasse le Dous
Laurent CHEA
- Laurent Tréguier
Laxman Pradhan
LEMMiNO
Leonardo Dimano
@@ -614,11 +621,12 @@ generous deed immortalized in the next stable release of Godot Engine.
Mark Malone
Markus Martin
Markus Michael Egger
+ Markus Ort
Martin FIbik
Martin Holas
Martin Liška
Martin Trbola
- Marvin
+ Martin Zabinski
Mathieu
Matt Edwards
Matthew Booe
@@ -642,6 +650,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Mike
Mike Birkhead
Mike Copley
+ Mitchell
Mitchell J. Wagner
MJacred
ModularMind
@@ -666,25 +675,21 @@ generous deed immortalized in the next stable release of Godot Engine.
Nicolas Goll-Perrier
Nicolas Rosset
Nicolas SAN AGUSTIN
+ Nils Nordmark
Nima Farid
Noel Billig
- Nuno Dionísio
NZ
oceoh
Okatima
Oleg Reva
- Omar Delarosa
- Orfist
Oriol Muñoz Princep
oscar1000108
Oscar Domingo
Pascal
- Patrick Brock
Patrick Nafarrete
Paul Gieske
Paweł Kowal
PaweÅ‚ Åyczkowski
- p_brighenti
Peter Höglund
Philip Cohoe
Philip Ludington (MrPhil)
@@ -695,43 +700,44 @@ generous deed immortalized in the next stable release of Godot Engine.
pwab
RabidTunes
Rackat
+ RackBar Dingum
Rad Cat
Rafa Laguna
Raffaele Aramo
Rainer Amler
Rami Hanano
Rammeow
- RAMupgrade
Remi Rampin
Reneator
+ René Habermann
Riccardo Marini
Richard Hayes
Richard Ivánek
Richard Néveri
Riley
- Robert Farr (Larington)
Rob Ruana
Rodrigo Loli
Roger Smith
+ Roglozor
Roland RzÄ…sa
Roman Tinkov
Ronald Ho Hip (CrimsonZA)
Ronan
- Ross Squires
Roy Scayged
+ Ryan
Ryan Groom
Sam Caulfield
Sam Edson
Scott Longley
Sean Lynch
Sebastian Michailidis
- segfault-god
SeongWan Kim
SeungJong k
Shaidak
Shane
Shane Sicienski
Shane Spoor
+ Silver1063
simdee
Simon Jonas Larsen
Simon Schoenenberger
@@ -741,10 +747,12 @@ generous deed immortalized in the next stable release of Godot Engine.
smbe19
smo1704
Solene Waked
+ Sophie Winter
Spencer Everhart
Squirrel
Stéphane Roussel
Steve Cloete
+ Steven Drovie
summerblind
Sung soo Choi
Svenne Krap
@@ -753,6 +761,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Tarch
Terry
the9thdude
+ The Domis4
Theodore Lindsey
TheVoiceInMyHead
thomas
@@ -790,6 +799,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Vi Watch
Vladimir Savin
Vladislav Smirnov
+ VoxelVisions.com
Vytenis Narušis
werner mendizabal
Wiley Thompson
diff --git a/SConstruct b/SConstruct
index 1ab42b6b90..b539dc59b7 100644
--- a/SConstruct
+++ b/SConstruct
@@ -91,6 +91,7 @@ env_base.__class__.add_program = methods.add_program
env_base.__class__.CommandNoCache = methods.CommandNoCache
env_base.__class__.Run = methods.Run
env_base.__class__.disable_warnings = methods.disable_warnings
+env_base.__class__.force_optimization_on_debug = methods.force_optimization_on_debug
env_base.__class__.module_check_dependencies = methods.module_check_dependencies
env_base["x86_libtheora_opt_gcc"] = False
@@ -156,6 +157,7 @@ opts.Add(BoolVariable("builtin_certs", "Use the built-in SSL certificates bundle
opts.Add(BoolVariable("builtin_embree", "Use the built-in Embree library", True))
opts.Add(BoolVariable("builtin_enet", "Use the built-in ENet library", True))
opts.Add(BoolVariable("builtin_freetype", "Use the built-in FreeType library", True))
+opts.Add(BoolVariable("builtin_msdfgen", "Use the built-in MSDFgen library", True))
opts.Add(BoolVariable("builtin_glslang", "Use the built-in glslang library", True))
opts.Add(BoolVariable("builtin_graphite", "Use the built-in Graphite library", True))
opts.Add(BoolVariable("builtin_harfbuzz", "Use the built-in HarfBuzz library", True))
@@ -316,10 +318,10 @@ if env_base["target"] == "debug":
# will properly be rebuilt. As such, we only enable them for debug (dev) builds, not release.
# To decide whether to rebuild a file, use the MD5 sum only if the timestamp has changed.
- # http://scons.org/doc/production/HTML/scons-user/ch06.html#idm139837621851792
+ # https://scons.org/doc/production/HTML/scons-user/ch06.html#idm139837621851792
env_base.Decider("MD5-timestamp")
# Use cached implicit dependencies by default. Can be overridden by specifying `--implicit-deps-changed` in the command line.
- # http://scons.org/doc/production/HTML/scons-user/ch06s04.html
+ # https://scons.org/doc/production/HTML/scons-user/ch06s04.html
env_base.SetOption("implicit_cache", 1)
if env_base["no_editor_splash"]:
@@ -682,7 +684,7 @@ if selected_platform in platform_list:
if env["minizip"]:
env.Append(CPPDEFINES=["MINIZIP_ENABLED"])
- editor_module_list = ["freetype", "regex"]
+ editor_module_list = ["freetype"]
if env["tools"] and not env.module_check_dependencies("tools", editor_module_list):
print(
"Build option 'module_"
diff --git a/core/SCsub b/core/SCsub
index d9167b8f83..14dfa3487f 100644
--- a/core/SCsub
+++ b/core/SCsub
@@ -183,6 +183,7 @@ SConscript("os/SCsub")
SConscript("math/SCsub")
SConscript("crypto/SCsub")
SConscript("io/SCsub")
+SConscript("multiplayer/SCsub")
SConscript("debugger/SCsub")
SConscript("input/SCsub")
SConscript("variant/SCsub")
diff --git a/core/config/engine.cpp b/core/config/engine.cpp
index 495670bc88..d8fbb50a75 100644
--- a/core/config/engine.cpp
+++ b/core/config/engine.cpp
@@ -199,17 +199,41 @@ bool Engine::is_printing_error_messages() const {
}
void Engine::add_singleton(const Singleton &p_singleton) {
+ ERR_FAIL_COND_MSG(singleton_ptrs.has(p_singleton.name), "Can't register singleton that already exists: " + String(p_singleton.name));
singletons.push_back(p_singleton);
singleton_ptrs[p_singleton.name] = p_singleton.ptr;
}
-Object *Engine::get_singleton_object(const String &p_name) const {
+Object *Engine::get_singleton_object(const StringName &p_name) const {
const Map<StringName, Object *>::Element *E = singleton_ptrs.find(p_name);
- ERR_FAIL_COND_V_MSG(!E, nullptr, "Failed to retrieve non-existent singleton '" + p_name + "'.");
+ ERR_FAIL_COND_V_MSG(!E, nullptr, "Failed to retrieve non-existent singleton '" + String(p_name) + "'.");
return E->get();
}
-bool Engine::has_singleton(const String &p_name) const {
+bool Engine::is_singleton_user_created(const StringName &p_name) const {
+ ERR_FAIL_COND_V(!singleton_ptrs.has(p_name), false);
+
+ for (const Singleton &E : singletons) {
+ if (E.name == p_name && E.user_created) {
+ return true;
+ }
+ }
+
+ return false;
+}
+void Engine::remove_singleton(const StringName &p_name) {
+ ERR_FAIL_COND(!singleton_ptrs.has(p_name));
+
+ for (List<Singleton>::Element *E = singletons.front(); E; E = E->next()) {
+ if (E->get().name == p_name) {
+ singletons.erase(E);
+ singleton_ptrs.erase(p_name);
+ return;
+ }
+ }
+}
+
+bool Engine::has_singleton(const StringName &p_name) const {
return singleton_ptrs.has(p_name);
}
diff --git a/core/config/engine.h b/core/config/engine.h
index e6b5df2d5a..ae33acede2 100644
--- a/core/config/engine.h
+++ b/core/config/engine.h
@@ -42,6 +42,7 @@ public:
StringName name;
Object *ptr;
StringName class_name; //used for binding generation hinting
+ bool user_created = false;
Singleton(const StringName &p_name = StringName(), Object *p_ptr = nullptr, const StringName &p_class_name = StringName());
};
@@ -109,8 +110,10 @@ public:
void add_singleton(const Singleton &p_singleton);
void get_singletons(List<Singleton> *p_singletons);
- bool has_singleton(const String &p_name) const;
- Object *get_singleton_object(const String &p_name) const;
+ bool has_singleton(const StringName &p_name) const;
+ Object *get_singleton_object(const StringName &p_name) const;
+ void remove_singleton(const StringName &p_name);
+ bool is_singleton_user_created(const StringName &p_name) const;
#ifdef TOOLS_ENABLED
_FORCE_INLINE_ void set_editor_hint(bool p_enabled) { editor_hint = p_enabled; }
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp
index c5e6c6d685..09f9f84728 100644
--- a/core/config/project_settings.cpp
+++ b/core/config/project_settings.cpp
@@ -55,11 +55,7 @@ String ProjectSettings::get_resource_path() const {
const String ProjectSettings::IMPORTED_FILES_PATH("res://.godot/imported");
String ProjectSettings::localize_path(const String &p_path) const {
- if (resource_path == "") {
- return p_path; //not initialized yet
- }
-
- if (p_path.begins_with("res://") || p_path.begins_with("user://") ||
+ if (resource_path.is_empty() || p_path.begins_with("res://") || p_path.begins_with("user://") ||
(p_path.is_absolute_path() && !p_path.begins_with(resource_path))) {
return p_path.simplify_path();
}
@@ -1006,7 +1002,7 @@ bool ProjectSettings::has_custom_feature(const String &p_feature) const {
return custom_features.has(p_feature);
}
-Map<StringName, ProjectSettings::AutoloadInfo> ProjectSettings::get_autoload_list() const {
+OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> ProjectSettings::get_autoload_list() const {
return autoloads;
}
diff --git a/core/config/project_settings.h b/core/config/project_settings.h
index ed8fb19fa0..7e93f26f0d 100644
--- a/core/config/project_settings.h
+++ b/core/config/project_settings.h
@@ -33,6 +33,7 @@
#include "core/object/class_db.h"
#include "core/os/thread_safe.h"
+#include "core/templates/ordered_hash_map.h"
#include "core/templates/set.h"
class ProjectSettings : public Object {
@@ -91,7 +92,7 @@ protected:
Set<String> custom_features;
Map<StringName, StringName> feature_overrides;
- Map<StringName, AutoloadInfo> autoloads;
+ OrderedHashMap<StringName, AutoloadInfo> autoloads;
bool _set(const StringName &p_name, const Variant &p_value);
bool _get(const StringName &p_name, Variant &r_ret) const;
@@ -168,7 +169,7 @@ public:
bool has_custom_feature(const String &p_feature) const;
- Map<StringName, AutoloadInfo> get_autoload_list() const;
+ OrderedHashMap<StringName, AutoloadInfo> get_autoload_list() const;
void add_autoload(const AutoloadInfo &p_autoload);
void remove_autoload(const StringName &p_autoload);
bool has_autoload(const StringName &p_autoload) const;
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index 7a2e6765b8..1f028702f6 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -41,39 +41,41 @@
#include "core/os/keyboard.h"
#include "core/os/os.h"
-////// _ResourceLoader //////
+namespace core_bind {
-_ResourceLoader *_ResourceLoader::singleton = nullptr;
+////// ResourceLoader //////
-Error _ResourceLoader::load_threaded_request(const String &p_path, const String &p_type_hint, bool p_use_sub_threads) {
- return ResourceLoader::load_threaded_request(p_path, p_type_hint, p_use_sub_threads);
+ResourceLoader *ResourceLoader::singleton = nullptr;
+
+Error ResourceLoader::load_threaded_request(const String &p_path, const String &p_type_hint, bool p_use_sub_threads) {
+ return ::ResourceLoader::load_threaded_request(p_path, p_type_hint, p_use_sub_threads);
}
-_ResourceLoader::ThreadLoadStatus _ResourceLoader::load_threaded_get_status(const String &p_path, Array r_progress) {
+ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const String &p_path, Array r_progress) {
float progress = 0;
- ResourceLoader::ThreadLoadStatus tls = ResourceLoader::load_threaded_get_status(p_path, &progress);
+ ::ResourceLoader::ThreadLoadStatus tls = ::ResourceLoader::load_threaded_get_status(p_path, &progress);
r_progress.resize(1);
r_progress[0] = progress;
return (ThreadLoadStatus)tls;
}
-RES _ResourceLoader::load_threaded_get(const String &p_path) {
+RES ResourceLoader::load_threaded_get(const String &p_path) {
Error error;
- RES res = ResourceLoader::load_threaded_get(p_path, &error);
+ RES res = ::ResourceLoader::load_threaded_get(p_path, &error);
return res;
}
-RES _ResourceLoader::load(const String &p_path, const String &p_type_hint, CacheMode p_cache_mode) {
+RES ResourceLoader::load(const String &p_path, const String &p_type_hint, CacheMode p_cache_mode) {
Error err = OK;
- RES ret = ResourceLoader::load(p_path, p_type_hint, ResourceFormatLoader::CacheMode(p_cache_mode), &err);
+ RES ret = ::ResourceLoader::load(p_path, p_type_hint, ResourceFormatLoader::CacheMode(p_cache_mode), &err);
ERR_FAIL_COND_V_MSG(err != OK, ret, "Error loading resource: '" + p_path + "'.");
return ret;
}
-Vector<String> _ResourceLoader::get_recognized_extensions_for_type(const String &p_type) {
+Vector<String> ResourceLoader::get_recognized_extensions_for_type(const String &p_type) {
List<String> exts;
- ResourceLoader::get_recognized_extensions_for_type(p_type, &exts);
+ ::ResourceLoader::get_recognized_extensions_for_type(p_type, &exts);
Vector<String> ret;
for (const String &E : exts) {
ret.push_back(E);
@@ -82,13 +84,13 @@ Vector<String> _ResourceLoader::get_recognized_extensions_for_type(const String
return ret;
}
-void _ResourceLoader::set_abort_on_missing_resources(bool p_abort) {
- ResourceLoader::set_abort_on_missing_resources(p_abort);
+void ResourceLoader::set_abort_on_missing_resources(bool p_abort) {
+ ::ResourceLoader::set_abort_on_missing_resources(p_abort);
}
-PackedStringArray _ResourceLoader::get_dependencies(const String &p_path) {
+PackedStringArray ResourceLoader::get_dependencies(const String &p_path) {
List<String> deps;
- ResourceLoader::get_dependencies(p_path, &deps);
+ ::ResourceLoader::get_dependencies(p_path, &deps);
PackedStringArray ret;
for (const String &E : deps) {
@@ -98,31 +100,31 @@ PackedStringArray _ResourceLoader::get_dependencies(const String &p_path) {
return ret;
}
-bool _ResourceLoader::has_cached(const String &p_path) {
+bool ResourceLoader::has_cached(const String &p_path) {
String local_path = ProjectSettings::get_singleton()->localize_path(p_path);
return ResourceCache::has(local_path);
}
-bool _ResourceLoader::exists(const String &p_path, const String &p_type_hint) {
- return ResourceLoader::exists(p_path, p_type_hint);
+bool ResourceLoader::exists(const String &p_path, const String &p_type_hint) {
+ return ::ResourceLoader::exists(p_path, p_type_hint);
}
-ResourceUID::ID _ResourceLoader::get_resource_uid(const String &p_path) {
- return ResourceLoader::get_resource_uid(p_path);
+ResourceUID::ID ResourceLoader::get_resource_uid(const String &p_path) {
+ return ::ResourceLoader::get_resource_uid(p_path);
}
-void _ResourceLoader::_bind_methods() {
- ClassDB::bind_method(D_METHOD("load_threaded_request", "path", "type_hint", "use_sub_threads"), &_ResourceLoader::load_threaded_request, DEFVAL(""), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("load_threaded_get_status", "path", "progress"), &_ResourceLoader::load_threaded_get_status, DEFVAL(Array()));
- ClassDB::bind_method(D_METHOD("load_threaded_get", "path"), &_ResourceLoader::load_threaded_get);
+void ResourceLoader::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("load_threaded_request", "path", "type_hint", "use_sub_threads"), &ResourceLoader::load_threaded_request, DEFVAL(""), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("load_threaded_get_status", "path", "progress"), &ResourceLoader::load_threaded_get_status, DEFVAL(Array()));
+ ClassDB::bind_method(D_METHOD("load_threaded_get", "path"), &ResourceLoader::load_threaded_get);
- ClassDB::bind_method(D_METHOD("load", "path", "type_hint", "cache_mode"), &_ResourceLoader::load, DEFVAL(""), DEFVAL(CACHE_MODE_REUSE));
- ClassDB::bind_method(D_METHOD("get_recognized_extensions_for_type", "type"), &_ResourceLoader::get_recognized_extensions_for_type);
- ClassDB::bind_method(D_METHOD("set_abort_on_missing_resources", "abort"), &_ResourceLoader::set_abort_on_missing_resources);
- ClassDB::bind_method(D_METHOD("get_dependencies", "path"), &_ResourceLoader::get_dependencies);
- ClassDB::bind_method(D_METHOD("has_cached", "path"), &_ResourceLoader::has_cached);
- ClassDB::bind_method(D_METHOD("exists", "path", "type_hint"), &_ResourceLoader::exists, DEFVAL(""));
- ClassDB::bind_method(D_METHOD("get_resource_uid", "path"), &_ResourceLoader::get_resource_uid);
+ ClassDB::bind_method(D_METHOD("load", "path", "type_hint", "cache_mode"), &ResourceLoader::load, DEFVAL(""), DEFVAL(CACHE_MODE_REUSE));
+ ClassDB::bind_method(D_METHOD("get_recognized_extensions_for_type", "type"), &ResourceLoader::get_recognized_extensions_for_type);
+ ClassDB::bind_method(D_METHOD("set_abort_on_missing_resources", "abort"), &ResourceLoader::set_abort_on_missing_resources);
+ ClassDB::bind_method(D_METHOD("get_dependencies", "path"), &ResourceLoader::get_dependencies);
+ ClassDB::bind_method(D_METHOD("has_cached", "path"), &ResourceLoader::has_cached);
+ ClassDB::bind_method(D_METHOD("exists", "path", "type_hint"), &ResourceLoader::exists, DEFVAL(""));
+ ClassDB::bind_method(D_METHOD("get_resource_uid", "path"), &ResourceLoader::get_resource_uid);
BIND_ENUM_CONSTANT(THREAD_LOAD_INVALID_RESOURCE);
BIND_ENUM_CONSTANT(THREAD_LOAD_IN_PROGRESS);
@@ -134,17 +136,17 @@ void _ResourceLoader::_bind_methods() {
BIND_ENUM_CONSTANT(CACHE_MODE_REPLACE);
}
-////// _ResourceSaver //////
+////// ResourceSaver //////
-Error _ResourceSaver::save(const String &p_path, const RES &p_resource, SaverFlags p_flags) {
+Error ResourceSaver::save(const String &p_path, const RES &p_resource, SaverFlags p_flags) {
ERR_FAIL_COND_V_MSG(p_resource.is_null(), ERR_INVALID_PARAMETER, "Can't save empty resource to path '" + String(p_path) + "'.");
- return ResourceSaver::save(p_path, p_resource, p_flags);
+ return ::ResourceSaver::save(p_path, p_resource, p_flags);
}
-Vector<String> _ResourceSaver::get_recognized_extensions(const RES &p_resource) {
+Vector<String> ResourceSaver::get_recognized_extensions(const RES &p_resource) {
ERR_FAIL_COND_V_MSG(p_resource.is_null(), Vector<String>(), "It's not a reference to a valid Resource object.");
List<String> exts;
- ResourceSaver::get_recognized_extensions(p_resource, &exts);
+ ::ResourceSaver::get_recognized_extensions(p_resource, &exts);
Vector<String> ret;
for (const String &E : exts) {
ret.push_back(E);
@@ -152,11 +154,11 @@ Vector<String> _ResourceSaver::get_recognized_extensions(const RES &p_resource)
return ret;
}
-_ResourceSaver *_ResourceSaver::singleton = nullptr;
+ResourceSaver *ResourceSaver::singleton = nullptr;
-void _ResourceSaver::_bind_methods() {
- ClassDB::bind_method(D_METHOD("save", "path", "resource", "flags"), &_ResourceSaver::save, DEFVAL(0));
- ClassDB::bind_method(D_METHOD("get_recognized_extensions", "type"), &_ResourceSaver::get_recognized_extensions);
+void ResourceSaver::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("save", "path", "resource", "flags"), &ResourceSaver::save, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_recognized_extensions", "type"), &ResourceSaver::get_recognized_extensions);
BIND_ENUM_CONSTANT(FLAG_RELATIVE_PATHS);
BIND_ENUM_CONSTANT(FLAG_BUNDLE_RESOURCES);
@@ -167,65 +169,65 @@ void _ResourceSaver::_bind_methods() {
BIND_ENUM_CONSTANT(FLAG_REPLACE_SUBRESOURCE_PATHS);
}
-////// _OS //////
+////// OS //////
-PackedStringArray _OS::get_connected_midi_inputs() {
- return OS::get_singleton()->get_connected_midi_inputs();
+PackedStringArray OS::get_connected_midi_inputs() {
+ return ::OS::get_singleton()->get_connected_midi_inputs();
}
-void _OS::open_midi_inputs() {
- OS::get_singleton()->open_midi_inputs();
+void OS::open_midi_inputs() {
+ ::OS::get_singleton()->open_midi_inputs();
}
-void _OS::close_midi_inputs() {
- OS::get_singleton()->close_midi_inputs();
+void OS::close_midi_inputs() {
+ ::OS::get_singleton()->close_midi_inputs();
}
-void _OS::set_use_file_access_save_and_swap(bool p_enable) {
+void OS::set_use_file_access_save_and_swap(bool p_enable) {
FileAccess::set_backup_save(p_enable);
}
-void _OS::set_low_processor_usage_mode(bool p_enabled) {
- OS::get_singleton()->set_low_processor_usage_mode(p_enabled);
+void OS::set_low_processor_usage_mode(bool p_enabled) {
+ ::OS::get_singleton()->set_low_processor_usage_mode(p_enabled);
}
-bool _OS::is_in_low_processor_usage_mode() const {
- return OS::get_singleton()->is_in_low_processor_usage_mode();
+bool OS::is_in_low_processor_usage_mode() const {
+ return ::OS::get_singleton()->is_in_low_processor_usage_mode();
}
-void _OS::set_low_processor_usage_mode_sleep_usec(int p_usec) {
- OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(p_usec);
+void OS::set_low_processor_usage_mode_sleep_usec(int p_usec) {
+ ::OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(p_usec);
}
-int _OS::get_low_processor_usage_mode_sleep_usec() const {
- return OS::get_singleton()->get_low_processor_usage_mode_sleep_usec();
+int OS::get_low_processor_usage_mode_sleep_usec() const {
+ return ::OS::get_singleton()->get_low_processor_usage_mode_sleep_usec();
}
-void _OS::alert(const String &p_alert, const String &p_title) {
- OS::get_singleton()->alert(p_alert, p_title);
+void OS::alert(const String &p_alert, const String &p_title) {
+ ::OS::get_singleton()->alert(p_alert, p_title);
}
-String _OS::get_executable_path() const {
- return OS::get_singleton()->get_executable_path();
+String OS::get_executable_path() const {
+ return ::OS::get_singleton()->get_executable_path();
}
-Error _OS::shell_open(String p_uri) {
+Error OS::shell_open(String p_uri) {
if (p_uri.begins_with("res://")) {
WARN_PRINT("Attempting to open an URL with the \"res://\" protocol. Use `ProjectSettings.globalize_path()` to convert a Godot-specific path to a system path before opening it with `OS.shell_open()`.");
} else if (p_uri.begins_with("user://")) {
WARN_PRINT("Attempting to open an URL with the \"user://\" protocol. Use `ProjectSettings.globalize_path()` to convert a Godot-specific path to a system path before opening it with `OS.shell_open()`.");
}
- return OS::get_singleton()->shell_open(p_uri);
+ return ::OS::get_singleton()->shell_open(p_uri);
}
-int _OS::execute(const String &p_path, const Vector<String> &p_arguments, Array r_output, bool p_read_stderr) {
+int OS::execute(const String &p_path, const Vector<String> &p_arguments, Array r_output, bool p_read_stderr) {
List<String> args;
for (int i = 0; i < p_arguments.size(); i++) {
args.push_back(p_arguments[i]);
}
String pipe;
int exitcode = 0;
- Error err = OS::get_singleton()->execute(p_path, args, &pipe, &exitcode, p_read_stderr);
+ Error err = ::OS::get_singleton()->execute(p_path, args, &pipe, &exitcode, p_read_stderr);
r_output.push_back(pipe);
if (err != OK) {
return -1;
@@ -233,45 +235,45 @@ int _OS::execute(const String &p_path, const Vector<String> &p_arguments, Array
return exitcode;
}
-int _OS::create_process(const String &p_path, const Vector<String> &p_arguments) {
+int OS::create_process(const String &p_path, const Vector<String> &p_arguments) {
List<String> args;
for (int i = 0; i < p_arguments.size(); i++) {
args.push_back(p_arguments[i]);
}
- OS::ProcessID pid = 0;
- Error err = OS::get_singleton()->create_process(p_path, args, &pid);
+ ::OS::ProcessID pid = 0;
+ Error err = ::OS::get_singleton()->create_process(p_path, args, &pid);
if (err != OK) {
return -1;
}
return pid;
}
-Error _OS::kill(int p_pid) {
- return OS::get_singleton()->kill(p_pid);
+Error OS::kill(int p_pid) {
+ return ::OS::get_singleton()->kill(p_pid);
}
-int _OS::get_process_id() const {
- return OS::get_singleton()->get_process_id();
+int OS::get_process_id() const {
+ return ::OS::get_singleton()->get_process_id();
}
-bool _OS::has_environment(const String &p_var) const {
- return OS::get_singleton()->has_environment(p_var);
+bool OS::has_environment(const String &p_var) const {
+ return ::OS::get_singleton()->has_environment(p_var);
}
-String _OS::get_environment(const String &p_var) const {
- return OS::get_singleton()->get_environment(p_var);
+String OS::get_environment(const String &p_var) const {
+ return ::OS::get_singleton()->get_environment(p_var);
}
-bool _OS::set_environment(const String &p_var, const String &p_value) const {
- return OS::get_singleton()->set_environment(p_var, p_value);
+bool OS::set_environment(const String &p_var, const String &p_value) const {
+ return ::OS::get_singleton()->set_environment(p_var, p_value);
}
-String _OS::get_name() const {
- return OS::get_singleton()->get_name();
+String OS::get_name() const {
+ return ::OS::get_singleton()->get_name();
}
-Vector<String> _OS::get_cmdline_args() {
- List<String> cmdline = OS::get_singleton()->get_cmdline_args();
+Vector<String> OS::get_cmdline_args() {
+ List<String> cmdline = ::OS::get_singleton()->get_cmdline_args();
Vector<String> cmdlinev;
for (const String &E : cmdline) {
cmdlinev.push_back(E);
@@ -280,81 +282,85 @@ Vector<String> _OS::get_cmdline_args() {
return cmdlinev;
}
-String _OS::get_locale() const {
- return OS::get_singleton()->get_locale();
+String OS::get_locale() const {
+ return ::OS::get_singleton()->get_locale();
+}
+
+String OS::get_locale_language() const {
+ return ::OS::get_singleton()->get_locale_language();
}
-String _OS::get_model_name() const {
- return OS::get_singleton()->get_model_name();
+String OS::get_model_name() const {
+ return ::OS::get_singleton()->get_model_name();
}
-Error _OS::set_thread_name(const String &p_name) {
- return Thread::set_name(p_name);
+Error OS::set_thread_name(const String &p_name) {
+ return ::Thread::set_name(p_name);
}
-Thread::ID _OS::get_thread_caller_id() const {
- return Thread::get_caller_id();
+::Thread::ID OS::get_thread_caller_id() const {
+ return ::Thread::get_caller_id();
};
-bool _OS::has_feature(const String &p_feature) const {
- return OS::get_singleton()->has_feature(p_feature);
+bool OS::has_feature(const String &p_feature) const {
+ return ::OS::get_singleton()->has_feature(p_feature);
}
-uint64_t _OS::get_static_memory_usage() const {
- return OS::get_singleton()->get_static_memory_usage();
+uint64_t OS::get_static_memory_usage() const {
+ return ::OS::get_singleton()->get_static_memory_usage();
}
-uint64_t _OS::get_static_memory_peak_usage() const {
- return OS::get_singleton()->get_static_memory_peak_usage();
+uint64_t OS::get_static_memory_peak_usage() const {
+ return ::OS::get_singleton()->get_static_memory_peak_usage();
}
/** This method uses a signed argument for better error reporting as it's used from the scripting API. */
-void _OS::delay_usec(int p_usec) const {
+void OS::delay_usec(int p_usec) const {
ERR_FAIL_COND_MSG(
p_usec < 0,
vformat("Can't sleep for %d microseconds. The delay provided must be greater than or equal to 0 microseconds.", p_usec));
- OS::get_singleton()->delay_usec(p_usec);
+ ::OS::get_singleton()->delay_usec(p_usec);
}
/** This method uses a signed argument for better error reporting as it's used from the scripting API. */
-void _OS::delay_msec(int p_msec) const {
+void OS::delay_msec(int p_msec) const {
ERR_FAIL_COND_MSG(
p_msec < 0,
vformat("Can't sleep for %d milliseconds. The delay provided must be greater than or equal to 0 milliseconds.", p_msec));
- OS::get_singleton()->delay_usec(int64_t(p_msec) * 1000);
+ ::OS::get_singleton()->delay_usec(int64_t(p_msec) * 1000);
}
-bool _OS::can_use_threads() const {
- return OS::get_singleton()->can_use_threads();
+bool OS::can_use_threads() const {
+ return ::OS::get_singleton()->can_use_threads();
}
-bool _OS::is_userfs_persistent() const {
- return OS::get_singleton()->is_userfs_persistent();
+bool OS::is_userfs_persistent() const {
+ return ::OS::get_singleton()->is_userfs_persistent();
}
-int _OS::get_processor_count() const {
- return OS::get_singleton()->get_processor_count();
+int OS::get_processor_count() const {
+ return ::OS::get_singleton()->get_processor_count();
}
-bool _OS::is_stdout_verbose() const {
- return OS::get_singleton()->is_stdout_verbose();
+bool OS::is_stdout_verbose() const {
+ return ::OS::get_singleton()->is_stdout_verbose();
}
-void _OS::dump_memory_to_file(const String &p_file) {
- OS::get_singleton()->dump_memory_to_file(p_file.utf8().get_data());
+void OS::dump_memory_to_file(const String &p_file) {
+ ::OS::get_singleton()->dump_memory_to_file(p_file.utf8().get_data());
}
-struct _OSCoreBindImg {
+struct OSCoreBindImg {
String path;
Size2 size;
int fmt = 0;
ObjectID id;
int vram = 0;
- bool operator<(const _OSCoreBindImg &p_img) const { return vram == p_img.vram ? id < p_img.id : vram > p_img.vram; }
+ bool operator<(const OSCoreBindImg &p_img) const { return vram == p_img.vram ? id < p_img.id : vram > p_img.vram; }
};
-void _OS::print_all_textures_by_size() {
- List<_OSCoreBindImg> imgs;
+void OS::print_all_textures_by_size() {
+ List<OSCoreBindImg> imgs;
uint64_t total = 0;
{
List<Ref<Resource>> rsrc;
@@ -368,7 +374,7 @@ void _OS::print_all_textures_by_size() {
Size2 size = res->call("get_size");
int fmt = res->call("get_format");
- _OSCoreBindImg img;
+ OSCoreBindImg img;
img.size = size;
img.fmt = fmt;
img.path = res->get_path();
@@ -388,7 +394,7 @@ void _OS::print_all_textures_by_size() {
"Path - VRAM usage (Dimensions)");
}
- for (const _OSCoreBindImg &img : imgs) {
+ for (const OSCoreBindImg &img : imgs) {
print_line(vformat("%s - %s %s",
img.path,
String::humanize_size(img.vram),
@@ -398,7 +404,7 @@ void _OS::print_all_textures_by_size() {
print_line(vformat("Total VRAM usage: %s.", String::humanize_size(total)));
}
-void _OS::print_resources_by_type(const Vector<String> &p_types) {
+void OS::print_resources_by_type(const Vector<String> &p_types) {
ERR_FAIL_COND_MSG(p_types.size() == 0,
"At least one type should be provided to print resources by type.");
@@ -440,38 +446,38 @@ void _OS::print_resources_by_type(const Vector<String> &p_types) {
}
}
-void _OS::print_all_resources(const String &p_to_file) {
- OS::get_singleton()->print_all_resources(p_to_file);
+void OS::print_all_resources(const String &p_to_file) {
+ ::OS::get_singleton()->print_all_resources(p_to_file);
}
-void _OS::print_resources_in_use(bool p_short) {
- OS::get_singleton()->print_resources_in_use(p_short);
+void OS::print_resources_in_use(bool p_short) {
+ ::OS::get_singleton()->print_resources_in_use(p_short);
}
-void _OS::dump_resources_to_file(const String &p_file) {
- OS::get_singleton()->dump_resources_to_file(p_file.utf8().get_data());
+void OS::dump_resources_to_file(const String &p_file) {
+ ::OS::get_singleton()->dump_resources_to_file(p_file.utf8().get_data());
}
-String _OS::get_user_data_dir() const {
- return OS::get_singleton()->get_user_data_dir();
+String OS::get_user_data_dir() const {
+ return ::OS::get_singleton()->get_user_data_dir();
}
-String _OS::get_config_dir() const {
+String OS::get_config_dir() const {
// Exposed as `get_config_dir()` instead of `get_config_path()` for consistency with other exposed OS methods.
- return OS::get_singleton()->get_config_path();
+ return ::OS::get_singleton()->get_config_path();
}
-String _OS::get_data_dir() const {
+String OS::get_data_dir() const {
// Exposed as `get_data_dir()` instead of `get_data_path()` for consistency with other exposed OS methods.
- return OS::get_singleton()->get_data_path();
+ return ::OS::get_singleton()->get_data_path();
}
-String _OS::get_cache_dir() const {
+String OS::get_cache_dir() const {
// Exposed as `get_cache_dir()` instead of `get_cache_path()` for consistency with other exposed OS methods.
- return OS::get_singleton()->get_cache_path();
+ return ::OS::get_singleton()->get_cache_path();
}
-bool _OS::is_debug_build() const {
+bool OS::is_debug_build() const {
#ifdef DEBUG_ENABLED
return true;
#else
@@ -479,113 +485,114 @@ bool _OS::is_debug_build() const {
#endif
}
-String _OS::get_system_dir(SystemDir p_dir, bool p_shared_storage) const {
- return OS::get_singleton()->get_system_dir(OS::SystemDir(p_dir), p_shared_storage);
+String OS::get_system_dir(SystemDir p_dir, bool p_shared_storage) const {
+ return ::OS::get_singleton()->get_system_dir(::OS::SystemDir(p_dir), p_shared_storage);
}
-String _OS::get_keycode_string(uint32_t p_code) const {
- return keycode_get_string(p_code);
+String OS::get_keycode_string(uint32_t p_code) const {
+ return ::keycode_get_string(p_code);
}
-bool _OS::is_keycode_unicode(uint32_t p_unicode) const {
- return keycode_has_unicode(p_unicode);
+bool OS::is_keycode_unicode(uint32_t p_unicode) const {
+ return ::keycode_has_unicode(p_unicode);
}
-int _OS::find_keycode_from_string(const String &p_code) const {
+int OS::find_keycode_from_string(const String &p_code) const {
return find_keycode(p_code);
}
-bool _OS::request_permission(const String &p_name) {
- return OS::get_singleton()->request_permission(p_name);
+bool OS::request_permission(const String &p_name) {
+ return ::OS::get_singleton()->request_permission(p_name);
}
-bool _OS::request_permissions() {
- return OS::get_singleton()->request_permissions();
+bool OS::request_permissions() {
+ return ::OS::get_singleton()->request_permissions();
}
-Vector<String> _OS::get_granted_permissions() const {
- return OS::get_singleton()->get_granted_permissions();
+Vector<String> OS::get_granted_permissions() const {
+ return ::OS::get_singleton()->get_granted_permissions();
}
-String _OS::get_unique_id() const {
- return OS::get_singleton()->get_unique_id();
+String OS::get_unique_id() const {
+ return ::OS::get_singleton()->get_unique_id();
}
-_OS *_OS::singleton = nullptr;
+OS *OS::singleton = nullptr;
-void _OS::_bind_methods() {
- ClassDB::bind_method(D_METHOD("get_connected_midi_inputs"), &_OS::get_connected_midi_inputs);
- ClassDB::bind_method(D_METHOD("open_midi_inputs"), &_OS::open_midi_inputs);
- ClassDB::bind_method(D_METHOD("close_midi_inputs"), &_OS::close_midi_inputs);
+void OS::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("get_connected_midi_inputs"), &OS::get_connected_midi_inputs);
+ ClassDB::bind_method(D_METHOD("open_midi_inputs"), &OS::open_midi_inputs);
+ ClassDB::bind_method(D_METHOD("close_midi_inputs"), &OS::close_midi_inputs);
- ClassDB::bind_method(D_METHOD("alert", "text", "title"), &_OS::alert, DEFVAL("Alert!"));
+ ClassDB::bind_method(D_METHOD("alert", "text", "title"), &OS::alert, DEFVAL("Alert!"));
- ClassDB::bind_method(D_METHOD("set_low_processor_usage_mode", "enable"), &_OS::set_low_processor_usage_mode);
- ClassDB::bind_method(D_METHOD("is_in_low_processor_usage_mode"), &_OS::is_in_low_processor_usage_mode);
+ ClassDB::bind_method(D_METHOD("set_low_processor_usage_mode", "enable"), &OS::set_low_processor_usage_mode);
+ ClassDB::bind_method(D_METHOD("is_in_low_processor_usage_mode"), &OS::is_in_low_processor_usage_mode);
- ClassDB::bind_method(D_METHOD("set_low_processor_usage_mode_sleep_usec", "usec"), &_OS::set_low_processor_usage_mode_sleep_usec);
- ClassDB::bind_method(D_METHOD("get_low_processor_usage_mode_sleep_usec"), &_OS::get_low_processor_usage_mode_sleep_usec);
+ ClassDB::bind_method(D_METHOD("set_low_processor_usage_mode_sleep_usec", "usec"), &OS::set_low_processor_usage_mode_sleep_usec);
+ ClassDB::bind_method(D_METHOD("get_low_processor_usage_mode_sleep_usec"), &OS::get_low_processor_usage_mode_sleep_usec);
- ClassDB::bind_method(D_METHOD("get_processor_count"), &_OS::get_processor_count);
+ ClassDB::bind_method(D_METHOD("get_processor_count"), &OS::get_processor_count);
- ClassDB::bind_method(D_METHOD("get_executable_path"), &_OS::get_executable_path);
- ClassDB::bind_method(D_METHOD("execute", "path", "arguments", "output", "read_stderr"), &_OS::execute, DEFVAL(Array()), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("create_process", "path", "arguments"), &_OS::create_process);
- ClassDB::bind_method(D_METHOD("kill", "pid"), &_OS::kill);
- ClassDB::bind_method(D_METHOD("shell_open", "uri"), &_OS::shell_open);
- ClassDB::bind_method(D_METHOD("get_process_id"), &_OS::get_process_id);
+ ClassDB::bind_method(D_METHOD("get_executable_path"), &OS::get_executable_path);
+ ClassDB::bind_method(D_METHOD("execute", "path", "arguments", "output", "read_stderr"), &OS::execute, DEFVAL(Array()), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("create_process", "path", "arguments"), &OS::create_process);
+ ClassDB::bind_method(D_METHOD("kill", "pid"), &OS::kill);
+ ClassDB::bind_method(D_METHOD("shell_open", "uri"), &OS::shell_open);
+ ClassDB::bind_method(D_METHOD("get_process_id"), &OS::get_process_id);
- ClassDB::bind_method(D_METHOD("get_environment", "variable"), &_OS::get_environment);
- ClassDB::bind_method(D_METHOD("set_environment", "variable", "value"), &_OS::set_environment);
- ClassDB::bind_method(D_METHOD("has_environment", "variable"), &_OS::has_environment);
+ ClassDB::bind_method(D_METHOD("get_environment", "variable"), &OS::get_environment);
+ ClassDB::bind_method(D_METHOD("set_environment", "variable", "value"), &OS::set_environment);
+ ClassDB::bind_method(D_METHOD("has_environment", "variable"), &OS::has_environment);
- ClassDB::bind_method(D_METHOD("get_name"), &_OS::get_name);
- ClassDB::bind_method(D_METHOD("get_cmdline_args"), &_OS::get_cmdline_args);
+ ClassDB::bind_method(D_METHOD("get_name"), &OS::get_name);
+ ClassDB::bind_method(D_METHOD("get_cmdline_args"), &OS::get_cmdline_args);
- ClassDB::bind_method(D_METHOD("delay_usec", "usec"), &_OS::delay_usec);
- ClassDB::bind_method(D_METHOD("delay_msec", "msec"), &_OS::delay_msec);
- ClassDB::bind_method(D_METHOD("get_locale"), &_OS::get_locale);
- ClassDB::bind_method(D_METHOD("get_model_name"), &_OS::get_model_name);
+ ClassDB::bind_method(D_METHOD("delay_usec", "usec"), &OS::delay_usec);
+ ClassDB::bind_method(D_METHOD("delay_msec", "msec"), &OS::delay_msec);
+ ClassDB::bind_method(D_METHOD("get_locale"), &OS::get_locale);
+ ClassDB::bind_method(D_METHOD("get_locale_language"), &OS::get_locale_language);
+ ClassDB::bind_method(D_METHOD("get_model_name"), &OS::get_model_name);
- ClassDB::bind_method(D_METHOD("is_userfs_persistent"), &_OS::is_userfs_persistent);
- ClassDB::bind_method(D_METHOD("is_stdout_verbose"), &_OS::is_stdout_verbose);
+ ClassDB::bind_method(D_METHOD("is_userfs_persistent"), &OS::is_userfs_persistent);
+ ClassDB::bind_method(D_METHOD("is_stdout_verbose"), &OS::is_stdout_verbose);
- ClassDB::bind_method(D_METHOD("can_use_threads"), &_OS::can_use_threads);
+ ClassDB::bind_method(D_METHOD("can_use_threads"), &OS::can_use_threads);
- ClassDB::bind_method(D_METHOD("is_debug_build"), &_OS::is_debug_build);
+ ClassDB::bind_method(D_METHOD("is_debug_build"), &OS::is_debug_build);
- ClassDB::bind_method(D_METHOD("dump_memory_to_file", "file"), &_OS::dump_memory_to_file);
- ClassDB::bind_method(D_METHOD("dump_resources_to_file", "file"), &_OS::dump_resources_to_file);
- ClassDB::bind_method(D_METHOD("print_resources_in_use", "short"), &_OS::print_resources_in_use, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("print_all_resources", "tofile"), &_OS::print_all_resources, DEFVAL(""));
+ ClassDB::bind_method(D_METHOD("dump_memory_to_file", "file"), &OS::dump_memory_to_file);
+ ClassDB::bind_method(D_METHOD("dump_resources_to_file", "file"), &OS::dump_resources_to_file);
+ ClassDB::bind_method(D_METHOD("print_resources_in_use", "short"), &OS::print_resources_in_use, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("print_all_resources", "tofile"), &OS::print_all_resources, DEFVAL(""));
- ClassDB::bind_method(D_METHOD("get_static_memory_usage"), &_OS::get_static_memory_usage);
- ClassDB::bind_method(D_METHOD("get_static_memory_peak_usage"), &_OS::get_static_memory_peak_usage);
+ ClassDB::bind_method(D_METHOD("get_static_memory_usage"), &OS::get_static_memory_usage);
+ ClassDB::bind_method(D_METHOD("get_static_memory_peak_usage"), &OS::get_static_memory_peak_usage);
- ClassDB::bind_method(D_METHOD("get_user_data_dir"), &_OS::get_user_data_dir);
- ClassDB::bind_method(D_METHOD("get_system_dir", "dir", "shared_storage"), &_OS::get_system_dir, DEFVAL(true));
- ClassDB::bind_method(D_METHOD("get_config_dir"), &_OS::get_config_dir);
- ClassDB::bind_method(D_METHOD("get_data_dir"), &_OS::get_data_dir);
- ClassDB::bind_method(D_METHOD("get_cache_dir"), &_OS::get_cache_dir);
- ClassDB::bind_method(D_METHOD("get_unique_id"), &_OS::get_unique_id);
+ ClassDB::bind_method(D_METHOD("get_user_data_dir"), &OS::get_user_data_dir);
+ ClassDB::bind_method(D_METHOD("get_system_dir", "dir", "shared_storage"), &OS::get_system_dir, DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("get_config_dir"), &OS::get_config_dir);
+ ClassDB::bind_method(D_METHOD("get_data_dir"), &OS::get_data_dir);
+ ClassDB::bind_method(D_METHOD("get_cache_dir"), &OS::get_cache_dir);
+ ClassDB::bind_method(D_METHOD("get_unique_id"), &OS::get_unique_id);
- ClassDB::bind_method(D_METHOD("print_all_textures_by_size"), &_OS::print_all_textures_by_size);
- ClassDB::bind_method(D_METHOD("print_resources_by_type", "types"), &_OS::print_resources_by_type);
+ ClassDB::bind_method(D_METHOD("print_all_textures_by_size"), &OS::print_all_textures_by_size);
+ ClassDB::bind_method(D_METHOD("print_resources_by_type", "types"), &OS::print_resources_by_type);
- ClassDB::bind_method(D_METHOD("get_keycode_string", "code"), &_OS::get_keycode_string);
- ClassDB::bind_method(D_METHOD("is_keycode_unicode", "code"), &_OS::is_keycode_unicode);
- ClassDB::bind_method(D_METHOD("find_keycode_from_string", "string"), &_OS::find_keycode_from_string);
+ ClassDB::bind_method(D_METHOD("get_keycode_string", "code"), &OS::get_keycode_string);
+ ClassDB::bind_method(D_METHOD("is_keycode_unicode", "code"), &OS::is_keycode_unicode);
+ ClassDB::bind_method(D_METHOD("find_keycode_from_string", "string"), &OS::find_keycode_from_string);
- ClassDB::bind_method(D_METHOD("set_use_file_access_save_and_swap", "enabled"), &_OS::set_use_file_access_save_and_swap);
+ ClassDB::bind_method(D_METHOD("set_use_file_access_save_and_swap", "enabled"), &OS::set_use_file_access_save_and_swap);
- ClassDB::bind_method(D_METHOD("set_thread_name", "name"), &_OS::set_thread_name);
- ClassDB::bind_method(D_METHOD("get_thread_caller_id"), &_OS::get_thread_caller_id);
+ ClassDB::bind_method(D_METHOD("set_thread_name", "name"), &OS::set_thread_name);
+ ClassDB::bind_method(D_METHOD("get_thread_caller_id"), &OS::get_thread_caller_id);
- ClassDB::bind_method(D_METHOD("has_feature", "tag_name"), &_OS::has_feature);
+ ClassDB::bind_method(D_METHOD("has_feature", "tag_name"), &OS::has_feature);
- ClassDB::bind_method(D_METHOD("request_permission", "name"), &_OS::request_permission);
- ClassDB::bind_method(D_METHOD("request_permissions"), &_OS::request_permissions);
- ClassDB::bind_method(D_METHOD("get_granted_permissions"), &_OS::get_granted_permissions);
+ ClassDB::bind_method(D_METHOD("request_permission", "name"), &OS::request_permission);
+ ClassDB::bind_method(D_METHOD("request_permissions"), &OS::request_permissions);
+ ClassDB::bind_method(D_METHOD("get_granted_permissions"), &OS::get_granted_permissions);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "low_processor_usage_mode"), "set_low_processor_usage_mode", "is_in_low_processor_usage_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "low_processor_usage_mode_sleep_usec"), "set_low_processor_usage_mode_sleep_usec", "get_low_processor_usage_mode_sleep_usec");
@@ -630,43 +637,43 @@ void _OS::_bind_methods() {
BIND_ENUM_CONSTANT(SYSTEM_DIR_RINGTONES);
}
-////// _Geometry2D //////
+////// Geometry2D //////
-_Geometry2D *_Geometry2D::singleton = nullptr;
+Geometry2D *Geometry2D::singleton = nullptr;
-_Geometry2D *_Geometry2D::get_singleton() {
+Geometry2D *Geometry2D::get_singleton() {
return singleton;
}
-bool _Geometry2D::is_point_in_circle(const Vector2 &p_point, const Vector2 &p_circle_pos, real_t p_circle_radius) {
- return Geometry2D::is_point_in_circle(p_point, p_circle_pos, p_circle_radius);
+bool Geometry2D::is_point_in_circle(const Vector2 &p_point, const Vector2 &p_circle_pos, real_t p_circle_radius) {
+ return ::Geometry2D::is_point_in_circle(p_point, p_circle_pos, p_circle_radius);
}
-real_t _Geometry2D::segment_intersects_circle(const Vector2 &p_from, const Vector2 &p_to, const Vector2 &p_circle_pos, real_t p_circle_radius) {
- return Geometry2D::segment_intersects_circle(p_from, p_to, p_circle_pos, p_circle_radius);
+real_t Geometry2D::segment_intersects_circle(const Vector2 &p_from, const Vector2 &p_to, const Vector2 &p_circle_pos, real_t p_circle_radius) {
+ return ::Geometry2D::segment_intersects_circle(p_from, p_to, p_circle_pos, p_circle_radius);
}
-Variant _Geometry2D::segment_intersects_segment(const Vector2 &p_from_a, const Vector2 &p_to_a, const Vector2 &p_from_b, const Vector2 &p_to_b) {
+Variant Geometry2D::segment_intersects_segment(const Vector2 &p_from_a, const Vector2 &p_to_a, const Vector2 &p_from_b, const Vector2 &p_to_b) {
Vector2 result;
- if (Geometry2D::segment_intersects_segment(p_from_a, p_to_a, p_from_b, p_to_b, &result)) {
+ if (::Geometry2D::segment_intersects_segment(p_from_a, p_to_a, p_from_b, p_to_b, &result)) {
return result;
} else {
return Variant();
}
}
-Variant _Geometry2D::line_intersects_line(const Vector2 &p_from_a, const Vector2 &p_dir_a, const Vector2 &p_from_b, const Vector2 &p_dir_b) {
+Variant Geometry2D::line_intersects_line(const Vector2 &p_from_a, const Vector2 &p_dir_a, const Vector2 &p_from_b, const Vector2 &p_dir_b) {
Vector2 result;
- if (Geometry2D::line_intersects_line(p_from_a, p_dir_a, p_from_b, p_dir_b, result)) {
+ if (::Geometry2D::line_intersects_line(p_from_a, p_dir_a, p_from_b, p_dir_b, result)) {
return result;
} else {
return Variant();
}
}
-Vector<Vector2> _Geometry2D::get_closest_points_between_segments(const Vector2 &p1, const Vector2 &q1, const Vector2 &p2, const Vector2 &q2) {
+Vector<Vector2> Geometry2D::get_closest_points_between_segments(const Vector2 &p1, const Vector2 &q1, const Vector2 &p2, const Vector2 &q2) {
Vector2 r1, r2;
- Geometry2D::get_closest_points_between_segments(p1, q1, p2, q2, r1, r2);
+ ::Geometry2D::get_closest_points_between_segments(p1, q1, p2, q2, r1, r2);
Vector<Vector2> r;
r.resize(2);
r.set(0, r1);
@@ -674,42 +681,42 @@ Vector<Vector2> _Geometry2D::get_closest_points_between_segments(const Vector2 &
return r;
}
-Vector2 _Geometry2D::get_closest_point_to_segment(const Vector2 &p_point, const Vector2 &p_a, const Vector2 &p_b) {
+Vector2 Geometry2D::get_closest_point_to_segment(const Vector2 &p_point, const Vector2 &p_a, const Vector2 &p_b) {
Vector2 s[2] = { p_a, p_b };
- return Geometry2D::get_closest_point_to_segment(p_point, s);
+ return ::Geometry2D::get_closest_point_to_segment(p_point, s);
}
-Vector2 _Geometry2D::get_closest_point_to_segment_uncapped(const Vector2 &p_point, const Vector2 &p_a, const Vector2 &p_b) {
+Vector2 Geometry2D::get_closest_point_to_segment_uncapped(const Vector2 &p_point, const Vector2 &p_a, const Vector2 &p_b) {
Vector2 s[2] = { p_a, p_b };
- return Geometry2D::get_closest_point_to_segment_uncapped(p_point, s);
+ return ::Geometry2D::get_closest_point_to_segment_uncapped(p_point, s);
}
-bool _Geometry2D::point_is_inside_triangle(const Vector2 &s, const Vector2 &a, const Vector2 &b, const Vector2 &c) const {
- return Geometry2D::is_point_in_triangle(s, a, b, c);
+bool Geometry2D::point_is_inside_triangle(const Vector2 &s, const Vector2 &a, const Vector2 &b, const Vector2 &c) const {
+ return ::Geometry2D::is_point_in_triangle(s, a, b, c);
}
-bool _Geometry2D::is_polygon_clockwise(const Vector<Vector2> &p_polygon) {
- return Geometry2D::is_polygon_clockwise(p_polygon);
+bool Geometry2D::is_polygon_clockwise(const Vector<Vector2> &p_polygon) {
+ return ::Geometry2D::is_polygon_clockwise(p_polygon);
}
-bool _Geometry2D::is_point_in_polygon(const Point2 &p_point, const Vector<Vector2> &p_polygon) {
- return Geometry2D::is_point_in_polygon(p_point, p_polygon);
+bool Geometry2D::is_point_in_polygon(const Point2 &p_point, const Vector<Vector2> &p_polygon) {
+ return ::Geometry2D::is_point_in_polygon(p_point, p_polygon);
}
-Vector<int> _Geometry2D::triangulate_polygon(const Vector<Vector2> &p_polygon) {
- return Geometry2D::triangulate_polygon(p_polygon);
+Vector<int> Geometry2D::triangulate_polygon(const Vector<Vector2> &p_polygon) {
+ return ::Geometry2D::triangulate_polygon(p_polygon);
}
-Vector<int> _Geometry2D::triangulate_delaunay(const Vector<Vector2> &p_points) {
- return Geometry2D::triangulate_delaunay(p_points);
+Vector<int> Geometry2D::triangulate_delaunay(const Vector<Vector2> &p_points) {
+ return ::Geometry2D::triangulate_delaunay(p_points);
}
-Vector<Point2> _Geometry2D::convex_hull(const Vector<Point2> &p_points) {
- return Geometry2D::convex_hull(p_points);
+Vector<Point2> Geometry2D::convex_hull(const Vector<Point2> &p_points) {
+ return ::Geometry2D::convex_hull(p_points);
}
-Array _Geometry2D::merge_polygons(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
- Vector<Vector<Point2>> polys = Geometry2D::merge_polygons(p_polygon_a, p_polygon_b);
+Array Geometry2D::merge_polygons(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
+ Vector<Vector<Point2>> polys = ::Geometry2D::merge_polygons(p_polygon_a, p_polygon_b);
Array ret;
@@ -719,8 +726,8 @@ Array _Geometry2D::merge_polygons(const Vector<Vector2> &p_polygon_a, const Vect
return ret;
}
-Array _Geometry2D::clip_polygons(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
- Vector<Vector<Point2>> polys = Geometry2D::clip_polygons(p_polygon_a, p_polygon_b);
+Array Geometry2D::clip_polygons(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
+ Vector<Vector<Point2>> polys = ::Geometry2D::clip_polygons(p_polygon_a, p_polygon_b);
Array ret;
@@ -730,8 +737,8 @@ Array _Geometry2D::clip_polygons(const Vector<Vector2> &p_polygon_a, const Vecto
return ret;
}
-Array _Geometry2D::intersect_polygons(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
- Vector<Vector<Point2>> polys = Geometry2D::intersect_polygons(p_polygon_a, p_polygon_b);
+Array Geometry2D::intersect_polygons(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
+ Vector<Vector<Point2>> polys = ::Geometry2D::intersect_polygons(p_polygon_a, p_polygon_b);
Array ret;
@@ -741,8 +748,8 @@ Array _Geometry2D::intersect_polygons(const Vector<Vector2> &p_polygon_a, const
return ret;
}
-Array _Geometry2D::exclude_polygons(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
- Vector<Vector<Point2>> polys = Geometry2D::exclude_polygons(p_polygon_a, p_polygon_b);
+Array Geometry2D::exclude_polygons(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
+ Vector<Vector<Point2>> polys = ::Geometry2D::exclude_polygons(p_polygon_a, p_polygon_b);
Array ret;
@@ -752,8 +759,8 @@ Array _Geometry2D::exclude_polygons(const Vector<Vector2> &p_polygon_a, const Ve
return ret;
}
-Array _Geometry2D::clip_polyline_with_polygon(const Vector<Vector2> &p_polyline, const Vector<Vector2> &p_polygon) {
- Vector<Vector<Point2>> polys = Geometry2D::clip_polyline_with_polygon(p_polyline, p_polygon);
+Array Geometry2D::clip_polyline_with_polygon(const Vector<Vector2> &p_polyline, const Vector<Vector2> &p_polygon) {
+ Vector<Vector<Point2>> polys = ::Geometry2D::clip_polyline_with_polygon(p_polyline, p_polygon);
Array ret;
@@ -763,8 +770,8 @@ Array _Geometry2D::clip_polyline_with_polygon(const Vector<Vector2> &p_polyline,
return ret;
}
-Array _Geometry2D::intersect_polyline_with_polygon(const Vector<Vector2> &p_polyline, const Vector<Vector2> &p_polygon) {
- Vector<Vector<Point2>> polys = Geometry2D::intersect_polyline_with_polygon(p_polyline, p_polygon);
+Array Geometry2D::intersect_polyline_with_polygon(const Vector<Vector2> &p_polyline, const Vector<Vector2> &p_polygon) {
+ Vector<Vector<Point2>> polys = ::Geometry2D::intersect_polyline_with_polygon(p_polyline, p_polygon);
Array ret;
@@ -774,8 +781,8 @@ Array _Geometry2D::intersect_polyline_with_polygon(const Vector<Vector2> &p_poly
return ret;
}
-Array _Geometry2D::offset_polygon(const Vector<Vector2> &p_polygon, real_t p_delta, PolyJoinType p_join_type) {
- Vector<Vector<Point2>> polys = Geometry2D::offset_polygon(p_polygon, p_delta, Geometry2D::PolyJoinType(p_join_type));
+Array Geometry2D::offset_polygon(const Vector<Vector2> &p_polygon, real_t p_delta, PolyJoinType p_join_type) {
+ Vector<Vector<Point2>> polys = ::Geometry2D::offset_polygon(p_polygon, p_delta, ::Geometry2D::PolyJoinType(p_join_type));
Array ret;
@@ -785,8 +792,8 @@ Array _Geometry2D::offset_polygon(const Vector<Vector2> &p_polygon, real_t p_del
return ret;
}
-Array _Geometry2D::offset_polyline(const Vector<Vector2> &p_polygon, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type) {
- Vector<Vector<Point2>> polys = Geometry2D::offset_polyline(p_polygon, p_delta, Geometry2D::PolyJoinType(p_join_type), Geometry2D::PolyEndType(p_end_type));
+Array Geometry2D::offset_polyline(const Vector<Vector2> &p_polygon, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type) {
+ Vector<Vector<Point2>> polys = ::Geometry2D::offset_polyline(p_polygon, p_delta, ::Geometry2D::PolyJoinType(p_join_type), ::Geometry2D::PolyEndType(p_end_type));
Array ret;
@@ -796,7 +803,7 @@ Array _Geometry2D::offset_polyline(const Vector<Vector2> &p_polygon, real_t p_de
return ret;
}
-Dictionary _Geometry2D::make_atlas(const Vector<Size2> &p_rects) {
+Dictionary Geometry2D::make_atlas(const Vector<Size2> &p_rects) {
Dictionary ret;
Vector<Size2i> rects;
@@ -807,7 +814,7 @@ Dictionary _Geometry2D::make_atlas(const Vector<Size2> &p_rects) {
Vector<Point2i> result;
Size2i size;
- Geometry2D::make_atlas(rects, result, size);
+ ::Geometry2D::make_atlas(rects, result, size);
Size2 r_size = size;
Vector<Point2> r_result;
@@ -821,37 +828,37 @@ Dictionary _Geometry2D::make_atlas(const Vector<Size2> &p_rects) {
return ret;
}
-void _Geometry2D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("is_point_in_circle", "point", "circle_position", "circle_radius"), &_Geometry2D::is_point_in_circle);
- ClassDB::bind_method(D_METHOD("segment_intersects_segment", "from_a", "to_a", "from_b", "to_b"), &_Geometry2D::segment_intersects_segment);
- ClassDB::bind_method(D_METHOD("line_intersects_line", "from_a", "dir_a", "from_b", "dir_b"), &_Geometry2D::line_intersects_line);
+void Geometry2D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("is_point_in_circle", "point", "circle_position", "circle_radius"), &Geometry2D::is_point_in_circle);
+ ClassDB::bind_method(D_METHOD("segment_intersects_segment", "from_a", "to_a", "from_b", "to_b"), &Geometry2D::segment_intersects_segment);
+ ClassDB::bind_method(D_METHOD("line_intersects_line", "from_a", "dir_a", "from_b", "dir_b"), &Geometry2D::line_intersects_line);
- ClassDB::bind_method(D_METHOD("get_closest_points_between_segments", "p1", "q1", "p2", "q2"), &_Geometry2D::get_closest_points_between_segments);
+ ClassDB::bind_method(D_METHOD("get_closest_points_between_segments", "p1", "q1", "p2", "q2"), &Geometry2D::get_closest_points_between_segments);
- ClassDB::bind_method(D_METHOD("get_closest_point_to_segment", "point", "s1", "s2"), &_Geometry2D::get_closest_point_to_segment);
+ ClassDB::bind_method(D_METHOD("get_closest_point_to_segment", "point", "s1", "s2"), &Geometry2D::get_closest_point_to_segment);
- ClassDB::bind_method(D_METHOD("get_closest_point_to_segment_uncapped", "point", "s1", "s2"), &_Geometry2D::get_closest_point_to_segment_uncapped);
+ ClassDB::bind_method(D_METHOD("get_closest_point_to_segment_uncapped", "point", "s1", "s2"), &Geometry2D::get_closest_point_to_segment_uncapped);
- ClassDB::bind_method(D_METHOD("point_is_inside_triangle", "point", "a", "b", "c"), &_Geometry2D::point_is_inside_triangle);
+ ClassDB::bind_method(D_METHOD("point_is_inside_triangle", "point", "a", "b", "c"), &Geometry2D::point_is_inside_triangle);
- ClassDB::bind_method(D_METHOD("is_polygon_clockwise", "polygon"), &_Geometry2D::is_polygon_clockwise);
- ClassDB::bind_method(D_METHOD("is_point_in_polygon", "point", "polygon"), &_Geometry2D::is_point_in_polygon);
- ClassDB::bind_method(D_METHOD("triangulate_polygon", "polygon"), &_Geometry2D::triangulate_polygon);
- ClassDB::bind_method(D_METHOD("triangulate_delaunay", "points"), &_Geometry2D::triangulate_delaunay);
- ClassDB::bind_method(D_METHOD("convex_hull", "points"), &_Geometry2D::convex_hull);
+ ClassDB::bind_method(D_METHOD("is_polygon_clockwise", "polygon"), &Geometry2D::is_polygon_clockwise);
+ ClassDB::bind_method(D_METHOD("is_point_in_polygon", "point", "polygon"), &Geometry2D::is_point_in_polygon);
+ ClassDB::bind_method(D_METHOD("triangulate_polygon", "polygon"), &Geometry2D::triangulate_polygon);
+ ClassDB::bind_method(D_METHOD("triangulate_delaunay", "points"), &Geometry2D::triangulate_delaunay);
+ ClassDB::bind_method(D_METHOD("convex_hull", "points"), &Geometry2D::convex_hull);
- ClassDB::bind_method(D_METHOD("merge_polygons", "polygon_a", "polygon_b"), &_Geometry2D::merge_polygons);
- ClassDB::bind_method(D_METHOD("clip_polygons", "polygon_a", "polygon_b"), &_Geometry2D::clip_polygons);
- ClassDB::bind_method(D_METHOD("intersect_polygons", "polygon_a", "polygon_b"), &_Geometry2D::intersect_polygons);
- ClassDB::bind_method(D_METHOD("exclude_polygons", "polygon_a", "polygon_b"), &_Geometry2D::exclude_polygons);
+ ClassDB::bind_method(D_METHOD("merge_polygons", "polygon_a", "polygon_b"), &Geometry2D::merge_polygons);
+ ClassDB::bind_method(D_METHOD("clip_polygons", "polygon_a", "polygon_b"), &Geometry2D::clip_polygons);
+ ClassDB::bind_method(D_METHOD("intersect_polygons", "polygon_a", "polygon_b"), &Geometry2D::intersect_polygons);
+ ClassDB::bind_method(D_METHOD("exclude_polygons", "polygon_a", "polygon_b"), &Geometry2D::exclude_polygons);
- ClassDB::bind_method(D_METHOD("clip_polyline_with_polygon", "polyline", "polygon"), &_Geometry2D::clip_polyline_with_polygon);
- ClassDB::bind_method(D_METHOD("intersect_polyline_with_polygon", "polyline", "polygon"), &_Geometry2D::intersect_polyline_with_polygon);
+ ClassDB::bind_method(D_METHOD("clip_polyline_with_polygon", "polyline", "polygon"), &Geometry2D::clip_polyline_with_polygon);
+ ClassDB::bind_method(D_METHOD("intersect_polyline_with_polygon", "polyline", "polygon"), &Geometry2D::intersect_polyline_with_polygon);
- ClassDB::bind_method(D_METHOD("offset_polygon", "polygon", "delta", "join_type"), &_Geometry2D::offset_polygon, DEFVAL(JOIN_SQUARE));
- ClassDB::bind_method(D_METHOD("offset_polyline", "polyline", "delta", "join_type", "end_type"), &_Geometry2D::offset_polyline, DEFVAL(JOIN_SQUARE), DEFVAL(END_SQUARE));
+ ClassDB::bind_method(D_METHOD("offset_polygon", "polygon", "delta", "join_type"), &Geometry2D::offset_polygon, DEFVAL(JOIN_SQUARE));
+ ClassDB::bind_method(D_METHOD("offset_polyline", "polyline", "delta", "join_type", "end_type"), &Geometry2D::offset_polyline, DEFVAL(JOIN_SQUARE), DEFVAL(END_SQUARE));
- ClassDB::bind_method(D_METHOD("make_atlas", "sizes"), &_Geometry2D::make_atlas);
+ ClassDB::bind_method(D_METHOD("make_atlas", "sizes"), &Geometry2D::make_atlas);
BIND_ENUM_CONSTANT(OPERATION_UNION);
BIND_ENUM_CONSTANT(OPERATION_DIFFERENCE);
@@ -869,29 +876,29 @@ void _Geometry2D::_bind_methods() {
BIND_ENUM_CONSTANT(END_ROUND);
}
-////// _Geometry3D //////
+////// Geometry3D //////
-_Geometry3D *_Geometry3D::singleton = nullptr;
+Geometry3D *Geometry3D::singleton = nullptr;
-_Geometry3D *_Geometry3D::get_singleton() {
+Geometry3D *Geometry3D::get_singleton() {
return singleton;
}
-Vector<Plane> _Geometry3D::build_box_planes(const Vector3 &p_extents) {
- return Geometry3D::build_box_planes(p_extents);
+Vector<Plane> Geometry3D::build_box_planes(const Vector3 &p_extents) {
+ return ::Geometry3D::build_box_planes(p_extents);
}
-Vector<Plane> _Geometry3D::build_cylinder_planes(float p_radius, float p_height, int p_sides, Vector3::Axis p_axis) {
- return Geometry3D::build_cylinder_planes(p_radius, p_height, p_sides, p_axis);
+Vector<Plane> Geometry3D::build_cylinder_planes(float p_radius, float p_height, int p_sides, Vector3::Axis p_axis) {
+ return ::Geometry3D::build_cylinder_planes(p_radius, p_height, p_sides, p_axis);
}
-Vector<Plane> _Geometry3D::build_capsule_planes(float p_radius, float p_height, int p_sides, int p_lats, Vector3::Axis p_axis) {
- return Geometry3D::build_capsule_planes(p_radius, p_height, p_sides, p_lats, p_axis);
+Vector<Plane> Geometry3D::build_capsule_planes(float p_radius, float p_height, int p_sides, int p_lats, Vector3::Axis p_axis) {
+ return ::Geometry3D::build_capsule_planes(p_radius, p_height, p_sides, p_lats, p_axis);
}
-Vector<Vector3> _Geometry3D::get_closest_points_between_segments(const Vector3 &p1, const Vector3 &p2, const Vector3 &q1, const Vector3 &q2) {
+Vector<Vector3> Geometry3D::get_closest_points_between_segments(const Vector3 &p1, const Vector3 &p2, const Vector3 &q1, const Vector3 &q2) {
Vector3 r1, r2;
- Geometry3D::get_closest_points_between_segments(p1, p2, q1, q2, r1, r2);
+ ::Geometry3D::get_closest_points_between_segments(p1, p2, q1, q2, r1, r2);
Vector<Vector3> r;
r.resize(2);
r.set(0, r1);
@@ -899,38 +906,38 @@ Vector<Vector3> _Geometry3D::get_closest_points_between_segments(const Vector3 &
return r;
}
-Vector3 _Geometry3D::get_closest_point_to_segment(const Vector3 &p_point, const Vector3 &p_a, const Vector3 &p_b) {
+Vector3 Geometry3D::get_closest_point_to_segment(const Vector3 &p_point, const Vector3 &p_a, const Vector3 &p_b) {
Vector3 s[2] = { p_a, p_b };
- return Geometry3D::get_closest_point_to_segment(p_point, s);
+ return ::Geometry3D::get_closest_point_to_segment(p_point, s);
}
-Vector3 _Geometry3D::get_closest_point_to_segment_uncapped(const Vector3 &p_point, const Vector3 &p_a, const Vector3 &p_b) {
+Vector3 Geometry3D::get_closest_point_to_segment_uncapped(const Vector3 &p_point, const Vector3 &p_a, const Vector3 &p_b) {
Vector3 s[2] = { p_a, p_b };
- return Geometry3D::get_closest_point_to_segment_uncapped(p_point, s);
+ return ::Geometry3D::get_closest_point_to_segment_uncapped(p_point, s);
}
-Variant _Geometry3D::ray_intersects_triangle(const Vector3 &p_from, const Vector3 &p_dir, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2) {
+Variant Geometry3D::ray_intersects_triangle(const Vector3 &p_from, const Vector3 &p_dir, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2) {
Vector3 res;
- if (Geometry3D::ray_intersects_triangle(p_from, p_dir, p_v0, p_v1, p_v2, &res)) {
+ if (::Geometry3D::ray_intersects_triangle(p_from, p_dir, p_v0, p_v1, p_v2, &res)) {
return res;
} else {
return Variant();
}
}
-Variant _Geometry3D::segment_intersects_triangle(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2) {
+Variant Geometry3D::segment_intersects_triangle(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_v0, const Vector3 &p_v1, const Vector3 &p_v2) {
Vector3 res;
- if (Geometry3D::segment_intersects_triangle(p_from, p_to, p_v0, p_v1, p_v2, &res)) {
+ if (::Geometry3D::segment_intersects_triangle(p_from, p_to, p_v0, p_v1, p_v2, &res)) {
return res;
} else {
return Variant();
}
}
-Vector<Vector3> _Geometry3D::segment_intersects_sphere(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_sphere_pos, real_t p_sphere_radius) {
+Vector<Vector3> Geometry3D::segment_intersects_sphere(const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_sphere_pos, real_t p_sphere_radius) {
Vector<Vector3> r;
Vector3 res, norm;
- if (!Geometry3D::segment_intersects_sphere(p_from, p_to, p_sphere_pos, p_sphere_radius, &res, &norm)) {
+ if (!::Geometry3D::segment_intersects_sphere(p_from, p_to, p_sphere_pos, p_sphere_radius, &res, &norm)) {
return r;
}
@@ -940,10 +947,10 @@ Vector<Vector3> _Geometry3D::segment_intersects_sphere(const Vector3 &p_from, co
return r;
}
-Vector<Vector3> _Geometry3D::segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, float p_height, float p_radius) {
+Vector<Vector3> Geometry3D::segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, float p_height, float p_radius) {
Vector<Vector3> r;
Vector3 res, norm;
- if (!Geometry3D::segment_intersects_cylinder(p_from, p_to, p_height, p_radius, &res, &norm)) {
+ if (!::Geometry3D::segment_intersects_cylinder(p_from, p_to, p_height, p_radius, &res, &norm)) {
return r;
}
@@ -953,10 +960,10 @@ Vector<Vector3> _Geometry3D::segment_intersects_cylinder(const Vector3 &p_from,
return r;
}
-Vector<Vector3> _Geometry3D::segment_intersects_convex(const Vector3 &p_from, const Vector3 &p_to, const Vector<Plane> &p_planes) {
+Vector<Vector3> Geometry3D::segment_intersects_convex(const Vector3 &p_from, const Vector3 &p_to, const Vector<Plane> &p_planes) {
Vector<Vector3> r;
Vector3 res, norm;
- if (!Geometry3D::segment_intersects_convex(p_from, p_to, p_planes.ptr(), p_planes.size(), &res, &norm)) {
+ if (!::Geometry3D::segment_intersects_convex(p_from, p_to, p_planes.ptr(), p_planes.size(), &res, &norm)) {
return r;
}
@@ -966,33 +973,33 @@ Vector<Vector3> _Geometry3D::segment_intersects_convex(const Vector3 &p_from, co
return r;
}
-Vector<Vector3> _Geometry3D::clip_polygon(const Vector<Vector3> &p_points, const Plane &p_plane) {
- return Geometry3D::clip_polygon(p_points, p_plane);
+Vector<Vector3> Geometry3D::clip_polygon(const Vector<Vector3> &p_points, const Plane &p_plane) {
+ return ::Geometry3D::clip_polygon(p_points, p_plane);
}
-void _Geometry3D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("build_box_planes", "extents"), &_Geometry3D::build_box_planes);
- ClassDB::bind_method(D_METHOD("build_cylinder_planes", "radius", "height", "sides", "axis"), &_Geometry3D::build_cylinder_planes, DEFVAL(Vector3::AXIS_Z));
- ClassDB::bind_method(D_METHOD("build_capsule_planes", "radius", "height", "sides", "lats", "axis"), &_Geometry3D::build_capsule_planes, DEFVAL(Vector3::AXIS_Z));
+void Geometry3D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("build_box_planes", "extents"), &Geometry3D::build_box_planes);
+ ClassDB::bind_method(D_METHOD("build_cylinder_planes", "radius", "height", "sides", "axis"), &Geometry3D::build_cylinder_planes, DEFVAL(Vector3::AXIS_Z));
+ ClassDB::bind_method(D_METHOD("build_capsule_planes", "radius", "height", "sides", "lats", "axis"), &Geometry3D::build_capsule_planes, DEFVAL(Vector3::AXIS_Z));
- ClassDB::bind_method(D_METHOD("get_closest_points_between_segments", "p1", "p2", "q1", "q2"), &_Geometry3D::get_closest_points_between_segments);
+ ClassDB::bind_method(D_METHOD("get_closest_points_between_segments", "p1", "p2", "q1", "q2"), &Geometry3D::get_closest_points_between_segments);
- ClassDB::bind_method(D_METHOD("get_closest_point_to_segment", "point", "s1", "s2"), &_Geometry3D::get_closest_point_to_segment);
+ ClassDB::bind_method(D_METHOD("get_closest_point_to_segment", "point", "s1", "s2"), &Geometry3D::get_closest_point_to_segment);
- ClassDB::bind_method(D_METHOD("get_closest_point_to_segment_uncapped", "point", "s1", "s2"), &_Geometry3D::get_closest_point_to_segment_uncapped);
+ ClassDB::bind_method(D_METHOD("get_closest_point_to_segment_uncapped", "point", "s1", "s2"), &Geometry3D::get_closest_point_to_segment_uncapped);
- ClassDB::bind_method(D_METHOD("ray_intersects_triangle", "from", "dir", "a", "b", "c"), &_Geometry3D::ray_intersects_triangle);
- ClassDB::bind_method(D_METHOD("segment_intersects_triangle", "from", "to", "a", "b", "c"), &_Geometry3D::segment_intersects_triangle);
- ClassDB::bind_method(D_METHOD("segment_intersects_sphere", "from", "to", "sphere_position", "sphere_radius"), &_Geometry3D::segment_intersects_sphere);
- ClassDB::bind_method(D_METHOD("segment_intersects_cylinder", "from", "to", "height", "radius"), &_Geometry3D::segment_intersects_cylinder);
- ClassDB::bind_method(D_METHOD("segment_intersects_convex", "from", "to", "planes"), &_Geometry3D::segment_intersects_convex);
+ ClassDB::bind_method(D_METHOD("ray_intersects_triangle", "from", "dir", "a", "b", "c"), &Geometry3D::ray_intersects_triangle);
+ ClassDB::bind_method(D_METHOD("segment_intersects_triangle", "from", "to", "a", "b", "c"), &Geometry3D::segment_intersects_triangle);
+ ClassDB::bind_method(D_METHOD("segment_intersects_sphere", "from", "to", "sphere_position", "sphere_radius"), &Geometry3D::segment_intersects_sphere);
+ ClassDB::bind_method(D_METHOD("segment_intersects_cylinder", "from", "to", "height", "radius"), &Geometry3D::segment_intersects_cylinder);
+ ClassDB::bind_method(D_METHOD("segment_intersects_convex", "from", "to", "planes"), &Geometry3D::segment_intersects_convex);
- ClassDB::bind_method(D_METHOD("clip_polygon", "points", "plane"), &_Geometry3D::clip_polygon);
+ ClassDB::bind_method(D_METHOD("clip_polygon", "points", "plane"), &Geometry3D::clip_polygon);
}
-////// _File //////
+////// File //////
-Error _File::open_encrypted(const String &p_path, ModeFlags p_mode_flags, const Vector<uint8_t> &p_key) {
+Error File::open_encrypted(const String &p_path, ModeFlags p_mode_flags, const Vector<uint8_t> &p_key) {
Error err = open(p_path, p_mode_flags);
if (err) {
return err;
@@ -1009,7 +1016,7 @@ Error _File::open_encrypted(const String &p_path, ModeFlags p_mode_flags, const
return OK;
}
-Error _File::open_encrypted_pass(const String &p_path, ModeFlags p_mode_flags, const String &p_pass) {
+Error File::open_encrypted_pass(const String &p_path, ModeFlags p_mode_flags, const String &p_pass) {
Error err = open(p_path, p_mode_flags);
if (err) {
return err;
@@ -1027,7 +1034,7 @@ Error _File::open_encrypted_pass(const String &p_path, ModeFlags p_mode_flags, c
return OK;
}
-Error _File::open_compressed(const String &p_path, ModeFlags p_mode_flags, CompressionMode p_compress_mode) {
+Error File::open_compressed(const String &p_path, ModeFlags p_mode_flags, CompressionMode p_compress_mode) {
FileAccessCompressed *fac = memnew(FileAccessCompressed);
fac->configure("GCPF", (Compression::Mode)p_compress_mode);
@@ -1043,7 +1050,7 @@ Error _File::open_compressed(const String &p_path, ModeFlags p_mode_flags, Compr
return OK;
}
-Error _File::open(const String &p_path, ModeFlags p_mode_flags) {
+Error File::open(const String &p_path, ModeFlags p_mode_flags) {
close();
Error err;
f = FileAccess::open(p_path, p_mode_flags, &err);
@@ -1053,94 +1060,94 @@ Error _File::open(const String &p_path, ModeFlags p_mode_flags) {
return err;
}
-void _File::flush() {
+void File::flush() {
ERR_FAIL_COND_MSG(!f, "File must be opened before flushing.");
f->flush();
}
-void _File::close() {
+void File::close() {
if (f) {
memdelete(f);
}
f = nullptr;
}
-bool _File::is_open() const {
+bool File::is_open() const {
return f != nullptr;
}
-String _File::get_path() const {
+String File::get_path() const {
ERR_FAIL_COND_V_MSG(!f, "", "File must be opened before use.");
return f->get_path();
}
-String _File::get_path_absolute() const {
+String File::get_path_absolute() const {
ERR_FAIL_COND_V_MSG(!f, "", "File must be opened before use.");
return f->get_path_absolute();
}
-void _File::seek(int64_t p_position) {
+void File::seek(int64_t p_position) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
ERR_FAIL_COND_MSG(p_position < 0, "Seek position must be a positive integer.");
f->seek(p_position);
}
-void _File::seek_end(int64_t p_position) {
+void File::seek_end(int64_t p_position) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->seek_end(p_position);
}
-uint64_t _File::get_position() const {
+uint64_t File::get_position() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_position();
}
-uint64_t _File::get_length() const {
+uint64_t File::get_length() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_length();
}
-bool _File::eof_reached() const {
+bool File::eof_reached() const {
ERR_FAIL_COND_V_MSG(!f, false, "File must be opened before use.");
return f->eof_reached();
}
-uint8_t _File::get_8() const {
+uint8_t File::get_8() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_8();
}
-uint16_t _File::get_16() const {
+uint16_t File::get_16() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_16();
}
-uint32_t _File::get_32() const {
+uint32_t File::get_32() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_32();
}
-uint64_t _File::get_64() const {
+uint64_t File::get_64() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_64();
}
-float _File::get_float() const {
+float File::get_float() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_float();
}
-double _File::get_double() const {
+double File::get_double() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_double();
}
-real_t _File::get_real() const {
+real_t File::get_real() const {
ERR_FAIL_COND_V_MSG(!f, 0, "File must be opened before use.");
return f->get_real();
}
-Vector<uint8_t> _File::get_buffer(int64_t p_length) const {
+Vector<uint8_t> File::get_buffer(int64_t p_length) const {
Vector<uint8_t> data;
ERR_FAIL_COND_V_MSG(!f, data, "File must be opened before use.");
@@ -1162,7 +1169,7 @@ Vector<uint8_t> _File::get_buffer(int64_t p_length) const {
return data;
}
-String _File::get_as_text() const {
+String File::get_as_text() const {
ERR_FAIL_COND_V_MSG(!f, String(), "File must be opened before use.");
String text;
@@ -1181,20 +1188,20 @@ String _File::get_as_text() const {
return text;
}
-String _File::get_md5(const String &p_path) const {
+String File::get_md5(const String &p_path) const {
return FileAccess::get_md5(p_path);
}
-String _File::get_sha256(const String &p_path) const {
+String File::get_sha256(const String &p_path) const {
return FileAccess::get_sha256(p_path);
}
-String _File::get_line() const {
+String File::get_line() const {
ERR_FAIL_COND_V_MSG(!f, String(), "File must be opened before use.");
return f->get_line();
}
-Vector<String> _File::get_csv_line(const String &p_delim) const {
+Vector<String> File::get_csv_line(const String &p_delim) const {
ERR_FAIL_COND_V_MSG(!f, Vector<String>(), "File must be opened before use.");
return f->get_csv_line(p_delim);
}
@@ -1204,95 +1211,95 @@ Vector<String> _File::get_csv_line(const String &p_delim) const {
* These flags get reset to false (little endian) on each open
*/
-void _File::set_big_endian(bool p_big_endian) {
+void File::set_big_endian(bool p_big_endian) {
big_endian = p_big_endian;
if (f) {
f->set_big_endian(p_big_endian);
}
}
-bool _File::is_big_endian() {
+bool File::is_big_endian() {
return big_endian;
}
-Error _File::get_error() const {
+Error File::get_error() const {
if (!f) {
return ERR_UNCONFIGURED;
}
return f->get_error();
}
-void _File::store_8(uint8_t p_dest) {
+void File::store_8(uint8_t p_dest) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_8(p_dest);
}
-void _File::store_16(uint16_t p_dest) {
+void File::store_16(uint16_t p_dest) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_16(p_dest);
}
-void _File::store_32(uint32_t p_dest) {
+void File::store_32(uint32_t p_dest) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_32(p_dest);
}
-void _File::store_64(uint64_t p_dest) {
+void File::store_64(uint64_t p_dest) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_64(p_dest);
}
-void _File::store_float(float p_dest) {
+void File::store_float(float p_dest) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_float(p_dest);
}
-void _File::store_double(double p_dest) {
+void File::store_double(double p_dest) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_double(p_dest);
}
-void _File::store_real(real_t p_real) {
+void File::store_real(real_t p_real) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_real(p_real);
}
-void _File::store_string(const String &p_string) {
+void File::store_string(const String &p_string) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_string(p_string);
}
-void _File::store_pascal_string(const String &p_string) {
+void File::store_pascal_string(const String &p_string) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_pascal_string(p_string);
}
-String _File::get_pascal_string() {
+String File::get_pascal_string() {
ERR_FAIL_COND_V_MSG(!f, "", "File must be opened before use.");
return f->get_pascal_string();
}
-void _File::store_line(const String &p_string) {
+void File::store_line(const String &p_string) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_line(p_string);
}
-void _File::store_csv_line(const Vector<String> &p_values, const String &p_delim) {
+void File::store_csv_line(const Vector<String> &p_values, const String &p_delim) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
f->store_csv_line(p_values, p_delim);
}
-void _File::store_buffer(const Vector<uint8_t> &p_buffer) {
+void File::store_buffer(const Vector<uint8_t> &p_buffer) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
uint64_t len = p_buffer.size();
@@ -1305,11 +1312,11 @@ void _File::store_buffer(const Vector<uint8_t> &p_buffer) {
f->store_buffer(&r[0], len);
}
-bool _File::file_exists(const String &p_name) const {
+bool File::file_exists(const String &p_name) const {
return FileAccess::exists(p_name);
}
-void _File::store_var(const Variant &p_var, bool p_full_objects) {
+void File::store_var(const Variant &p_var, bool p_full_objects) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
int len;
Error err = encode_variant(p_var, nullptr, len, p_full_objects);
@@ -1326,7 +1333,7 @@ void _File::store_var(const Variant &p_var, bool p_full_objects) {
store_buffer(buff);
}
-Variant _File::get_var(bool p_allow_objects) const {
+Variant File::get_var(bool p_allow_objects) const {
ERR_FAIL_COND_V_MSG(!f, Variant(), "File must be opened before use.");
uint32_t len = get_32();
Vector<uint8_t> buff = get_buffer(len);
@@ -1341,62 +1348,62 @@ Variant _File::get_var(bool p_allow_objects) const {
return v;
}
-uint64_t _File::get_modified_time(const String &p_file) const {
+uint64_t File::get_modified_time(const String &p_file) const {
return FileAccess::get_modified_time(p_file);
}
-void _File::_bind_methods() {
- ClassDB::bind_method(D_METHOD("open_encrypted", "path", "mode_flags", "key"), &_File::open_encrypted);
- ClassDB::bind_method(D_METHOD("open_encrypted_with_pass", "path", "mode_flags", "pass"), &_File::open_encrypted_pass);
- ClassDB::bind_method(D_METHOD("open_compressed", "path", "mode_flags", "compression_mode"), &_File::open_compressed, DEFVAL(0));
-
- ClassDB::bind_method(D_METHOD("open", "path", "flags"), &_File::open);
- ClassDB::bind_method(D_METHOD("flush"), &_File::flush);
- ClassDB::bind_method(D_METHOD("close"), &_File::close);
- ClassDB::bind_method(D_METHOD("get_path"), &_File::get_path);
- ClassDB::bind_method(D_METHOD("get_path_absolute"), &_File::get_path_absolute);
- ClassDB::bind_method(D_METHOD("is_open"), &_File::is_open);
- ClassDB::bind_method(D_METHOD("seek", "position"), &_File::seek);
- ClassDB::bind_method(D_METHOD("seek_end", "position"), &_File::seek_end, DEFVAL(0));
- ClassDB::bind_method(D_METHOD("get_position"), &_File::get_position);
- ClassDB::bind_method(D_METHOD("get_length"), &_File::get_length);
- ClassDB::bind_method(D_METHOD("eof_reached"), &_File::eof_reached);
- ClassDB::bind_method(D_METHOD("get_8"), &_File::get_8);
- ClassDB::bind_method(D_METHOD("get_16"), &_File::get_16);
- ClassDB::bind_method(D_METHOD("get_32"), &_File::get_32);
- ClassDB::bind_method(D_METHOD("get_64"), &_File::get_64);
- ClassDB::bind_method(D_METHOD("get_float"), &_File::get_float);
- ClassDB::bind_method(D_METHOD("get_double"), &_File::get_double);
- ClassDB::bind_method(D_METHOD("get_real"), &_File::get_real);
- ClassDB::bind_method(D_METHOD("get_buffer", "length"), &_File::get_buffer);
- ClassDB::bind_method(D_METHOD("get_line"), &_File::get_line);
- ClassDB::bind_method(D_METHOD("get_csv_line", "delim"), &_File::get_csv_line, DEFVAL(","));
- ClassDB::bind_method(D_METHOD("get_as_text"), &_File::get_as_text);
- ClassDB::bind_method(D_METHOD("get_md5", "path"), &_File::get_md5);
- ClassDB::bind_method(D_METHOD("get_sha256", "path"), &_File::get_sha256);
- ClassDB::bind_method(D_METHOD("is_big_endian"), &_File::is_big_endian);
- ClassDB::bind_method(D_METHOD("set_big_endian", "big_endian"), &_File::set_big_endian);
- ClassDB::bind_method(D_METHOD("get_error"), &_File::get_error);
- ClassDB::bind_method(D_METHOD("get_var", "allow_objects"), &_File::get_var, DEFVAL(false));
-
- ClassDB::bind_method(D_METHOD("store_8", "value"), &_File::store_8);
- ClassDB::bind_method(D_METHOD("store_16", "value"), &_File::store_16);
- ClassDB::bind_method(D_METHOD("store_32", "value"), &_File::store_32);
- ClassDB::bind_method(D_METHOD("store_64", "value"), &_File::store_64);
- ClassDB::bind_method(D_METHOD("store_float", "value"), &_File::store_float);
- ClassDB::bind_method(D_METHOD("store_double", "value"), &_File::store_double);
- ClassDB::bind_method(D_METHOD("store_real", "value"), &_File::store_real);
- ClassDB::bind_method(D_METHOD("store_buffer", "buffer"), &_File::store_buffer);
- ClassDB::bind_method(D_METHOD("store_line", "line"), &_File::store_line);
- ClassDB::bind_method(D_METHOD("store_csv_line", "values", "delim"), &_File::store_csv_line, DEFVAL(","));
- ClassDB::bind_method(D_METHOD("store_string", "string"), &_File::store_string);
- ClassDB::bind_method(D_METHOD("store_var", "value", "full_objects"), &_File::store_var, DEFVAL(false));
-
- ClassDB::bind_method(D_METHOD("store_pascal_string", "string"), &_File::store_pascal_string);
- ClassDB::bind_method(D_METHOD("get_pascal_string"), &_File::get_pascal_string);
-
- ClassDB::bind_method(D_METHOD("file_exists", "path"), &_File::file_exists);
- ClassDB::bind_method(D_METHOD("get_modified_time", "file"), &_File::get_modified_time);
+void File::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("open_encrypted", "path", "mode_flags", "key"), &File::open_encrypted);
+ ClassDB::bind_method(D_METHOD("open_encrypted_with_pass", "path", "mode_flags", "pass"), &File::open_encrypted_pass);
+ ClassDB::bind_method(D_METHOD("open_compressed", "path", "mode_flags", "compression_mode"), &File::open_compressed, DEFVAL(0));
+
+ ClassDB::bind_method(D_METHOD("open", "path", "flags"), &File::open);
+ ClassDB::bind_method(D_METHOD("flush"), &File::flush);
+ ClassDB::bind_method(D_METHOD("close"), &File::close);
+ ClassDB::bind_method(D_METHOD("get_path"), &File::get_path);
+ ClassDB::bind_method(D_METHOD("get_path_absolute"), &File::get_path_absolute);
+ ClassDB::bind_method(D_METHOD("is_open"), &File::is_open);
+ ClassDB::bind_method(D_METHOD("seek", "position"), &File::seek);
+ ClassDB::bind_method(D_METHOD("seek_end", "position"), &File::seek_end, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_position"), &File::get_position);
+ ClassDB::bind_method(D_METHOD("get_length"), &File::get_length);
+ ClassDB::bind_method(D_METHOD("eof_reached"), &File::eof_reached);
+ ClassDB::bind_method(D_METHOD("get_8"), &File::get_8);
+ ClassDB::bind_method(D_METHOD("get_16"), &File::get_16);
+ ClassDB::bind_method(D_METHOD("get_32"), &File::get_32);
+ ClassDB::bind_method(D_METHOD("get_64"), &File::get_64);
+ ClassDB::bind_method(D_METHOD("get_float"), &File::get_float);
+ ClassDB::bind_method(D_METHOD("get_double"), &File::get_double);
+ ClassDB::bind_method(D_METHOD("get_real"), &File::get_real);
+ ClassDB::bind_method(D_METHOD("get_buffer", "length"), &File::get_buffer);
+ ClassDB::bind_method(D_METHOD("get_line"), &File::get_line);
+ ClassDB::bind_method(D_METHOD("get_csv_line", "delim"), &File::get_csv_line, DEFVAL(","));
+ ClassDB::bind_method(D_METHOD("get_as_text"), &File::get_as_text);
+ ClassDB::bind_method(D_METHOD("get_md5", "path"), &File::get_md5);
+ ClassDB::bind_method(D_METHOD("get_sha256", "path"), &File::get_sha256);
+ ClassDB::bind_method(D_METHOD("is_big_endian"), &File::is_big_endian);
+ ClassDB::bind_method(D_METHOD("set_big_endian", "big_endian"), &File::set_big_endian);
+ ClassDB::bind_method(D_METHOD("get_error"), &File::get_error);
+ ClassDB::bind_method(D_METHOD("get_var", "allow_objects"), &File::get_var, DEFVAL(false));
+
+ ClassDB::bind_method(D_METHOD("store_8", "value"), &File::store_8);
+ ClassDB::bind_method(D_METHOD("store_16", "value"), &File::store_16);
+ ClassDB::bind_method(D_METHOD("store_32", "value"), &File::store_32);
+ ClassDB::bind_method(D_METHOD("store_64", "value"), &File::store_64);
+ ClassDB::bind_method(D_METHOD("store_float", "value"), &File::store_float);
+ ClassDB::bind_method(D_METHOD("store_double", "value"), &File::store_double);
+ ClassDB::bind_method(D_METHOD("store_real", "value"), &File::store_real);
+ ClassDB::bind_method(D_METHOD("store_buffer", "buffer"), &File::store_buffer);
+ ClassDB::bind_method(D_METHOD("store_line", "line"), &File::store_line);
+ ClassDB::bind_method(D_METHOD("store_csv_line", "values", "delim"), &File::store_csv_line, DEFVAL(","));
+ ClassDB::bind_method(D_METHOD("store_string", "string"), &File::store_string);
+ ClassDB::bind_method(D_METHOD("store_var", "value", "full_objects"), &File::store_var, DEFVAL(false));
+
+ ClassDB::bind_method(D_METHOD("store_pascal_string", "string"), &File::store_pascal_string);
+ ClassDB::bind_method(D_METHOD("get_pascal_string"), &File::get_pascal_string);
+
+ ClassDB::bind_method(D_METHOD("file_exists", "path"), &File::file_exists);
+ ClassDB::bind_method(D_METHOD("get_modified_time", "file"), &File::get_modified_time);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "big_endian"), "set_big_endian", "is_big_endian");
@@ -1411,15 +1418,15 @@ void _File::_bind_methods() {
BIND_ENUM_CONSTANT(COMPRESSION_GZIP);
}
-_File::~_File() {
+File::~File() {
if (f) {
memdelete(f);
}
}
-////// _Directory //////
+////// Directory //////
-Error _Directory::open(const String &p_path) {
+Error Directory::open(const String &p_path) {
Error err;
DirAccess *alt = DirAccess::open(p_path, &err);
@@ -1435,11 +1442,11 @@ Error _Directory::open(const String &p_path) {
return OK;
}
-bool _Directory::is_open() const {
+bool Directory::is_open() const {
return d && dir_open;
}
-Error _Directory::list_dir_begin(bool p_show_navigational, bool p_show_hidden) {
+Error Directory::list_dir_begin(bool p_show_navigational, bool p_show_hidden) {
ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use.");
_list_skip_navigational = !p_show_navigational;
@@ -1448,7 +1455,7 @@ Error _Directory::list_dir_begin(bool p_show_navigational, bool p_show_hidden) {
return d->list_dir_begin();
}
-String _Directory::get_next() {
+String Directory::get_next() {
ERR_FAIL_COND_V_MSG(!is_open(), "", "Directory must be opened before use.");
String next = d->get_next();
@@ -1458,32 +1465,32 @@ String _Directory::get_next() {
return next;
}
-bool _Directory::current_is_dir() const {
+bool Directory::current_is_dir() const {
ERR_FAIL_COND_V_MSG(!is_open(), false, "Directory must be opened before use.");
return d->current_is_dir();
}
-void _Directory::list_dir_end() {
+void Directory::list_dir_end() {
ERR_FAIL_COND_MSG(!is_open(), "Directory must be opened before use.");
d->list_dir_end();
}
-int _Directory::get_drive_count() {
+int Directory::get_drive_count() {
ERR_FAIL_COND_V_MSG(!is_open(), 0, "Directory must be opened before use.");
return d->get_drive_count();
}
-String _Directory::get_drive(int p_drive) {
+String Directory::get_drive(int p_drive) {
ERR_FAIL_COND_V_MSG(!is_open(), "", "Directory must be opened before use.");
return d->get_drive(p_drive);
}
-int _Directory::get_current_drive() {
+int Directory::get_current_drive() {
ERR_FAIL_COND_V_MSG(!is_open(), 0, "Directory must be opened before use.");
return d->get_current_drive();
}
-Error _Directory::change_dir(String p_dir) {
+Error Directory::change_dir(String p_dir) {
ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory is not configured properly.");
Error err = d->change_dir(p_dir);
@@ -1495,14 +1502,14 @@ Error _Directory::change_dir(String p_dir) {
return OK;
}
-String _Directory::get_current_dir() {
+String Directory::get_current_dir() {
ERR_FAIL_COND_V_MSG(!is_open(), "", "Directory must be opened before use.");
return d->get_current_dir();
}
-Error _Directory::make_dir(String p_dir) {
+Error Directory::make_dir(String p_dir) {
ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory is not configured properly.");
- if (!p_dir.is_rel_path()) {
+ if (!p_dir.is_relative_path()) {
DirAccess *d = DirAccess::create_for_path(p_dir);
Error err = d->make_dir(p_dir);
memdelete(d);
@@ -1511,9 +1518,9 @@ Error _Directory::make_dir(String p_dir) {
return d->make_dir(p_dir);
}
-Error _Directory::make_dir_recursive(String p_dir) {
+Error Directory::make_dir_recursive(String p_dir) {
ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory is not configured properly.");
- if (!p_dir.is_rel_path()) {
+ if (!p_dir.is_relative_path()) {
DirAccess *d = DirAccess::create_for_path(p_dir);
Error err = d->make_dir_recursive(p_dir);
memdelete(d);
@@ -1522,18 +1529,18 @@ Error _Directory::make_dir_recursive(String p_dir) {
return d->make_dir_recursive(p_dir);
}
-bool _Directory::file_exists(String p_file) {
+bool Directory::file_exists(String p_file) {
ERR_FAIL_COND_V_MSG(!d, false, "Directory is not configured properly.");
- if (!p_file.is_rel_path()) {
+ if (!p_file.is_relative_path()) {
return FileAccess::exists(p_file);
}
return d->file_exists(p_file);
}
-bool _Directory::dir_exists(String p_dir) {
+bool Directory::dir_exists(String p_dir) {
ERR_FAIL_COND_V_MSG(!d, false, "Directory is not configured properly.");
- if (!p_dir.is_rel_path()) {
+ if (!p_dir.is_relative_path()) {
DirAccess *d = DirAccess::create_for_path(p_dir);
bool exists = d->dir_exists(p_dir);
memdelete(d);
@@ -1543,21 +1550,21 @@ bool _Directory::dir_exists(String p_dir) {
return d->dir_exists(p_dir);
}
-uint64_t _Directory::get_space_left() {
+uint64_t Directory::get_space_left() {
ERR_FAIL_COND_V_MSG(!d, 0, "Directory must be opened before use.");
return d->get_space_left() / 1024 * 1024; // Truncate to closest MiB.
}
-Error _Directory::copy(String p_from, String p_to) {
+Error Directory::copy(String p_from, String p_to) {
ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use.");
return d->copy(p_from, p_to);
}
-Error _Directory::rename(String p_from, String p_to) {
+Error Directory::rename(String p_from, String p_to) {
ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use.");
ERR_FAIL_COND_V_MSG(p_from.is_empty() || p_from == "." || p_from == "..", ERR_INVALID_PARAMETER, "Invalid path to rename.");
- if (!p_from.is_rel_path()) {
+ if (!p_from.is_relative_path()) {
DirAccess *d = DirAccess::create_for_path(p_from);
ERR_FAIL_COND_V_MSG(!d->file_exists(p_from) && !d->dir_exists(p_from), ERR_DOES_NOT_EXIST, "File or directory does not exist.");
Error err = d->rename(p_from, p_to);
@@ -1569,9 +1576,9 @@ Error _Directory::rename(String p_from, String p_to) {
return d->rename(p_from, p_to);
}
-Error _Directory::remove(String p_name) {
+Error Directory::remove(String p_name) {
ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use.");
- if (!p_name.is_rel_path()) {
+ if (!p_name.is_relative_path()) {
DirAccess *d = DirAccess::create_for_path(p_name);
Error err = d->remove(p_name);
memdelete(d);
@@ -1581,47 +1588,47 @@ Error _Directory::remove(String p_name) {
return d->remove(p_name);
}
-void _Directory::_bind_methods() {
- ClassDB::bind_method(D_METHOD("open", "path"), &_Directory::open);
- ClassDB::bind_method(D_METHOD("list_dir_begin", "show_navigational", "show_hidden"), &_Directory::list_dir_begin, DEFVAL(false), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("get_next"), &_Directory::get_next);
- ClassDB::bind_method(D_METHOD("current_is_dir"), &_Directory::current_is_dir);
- ClassDB::bind_method(D_METHOD("list_dir_end"), &_Directory::list_dir_end);
- ClassDB::bind_method(D_METHOD("get_drive_count"), &_Directory::get_drive_count);
- ClassDB::bind_method(D_METHOD("get_drive", "idx"), &_Directory::get_drive);
- ClassDB::bind_method(D_METHOD("get_current_drive"), &_Directory::get_current_drive);
- ClassDB::bind_method(D_METHOD("change_dir", "todir"), &_Directory::change_dir);
- ClassDB::bind_method(D_METHOD("get_current_dir"), &_Directory::get_current_dir);
- ClassDB::bind_method(D_METHOD("make_dir", "path"), &_Directory::make_dir);
- ClassDB::bind_method(D_METHOD("make_dir_recursive", "path"), &_Directory::make_dir_recursive);
- ClassDB::bind_method(D_METHOD("file_exists", "path"), &_Directory::file_exists);
- ClassDB::bind_method(D_METHOD("dir_exists", "path"), &_Directory::dir_exists);
- //ClassDB::bind_method(D_METHOD("get_modified_time","file"),&_Directory::get_modified_time);
- ClassDB::bind_method(D_METHOD("get_space_left"), &_Directory::get_space_left);
- ClassDB::bind_method(D_METHOD("copy", "from", "to"), &_Directory::copy);
- ClassDB::bind_method(D_METHOD("rename", "from", "to"), &_Directory::rename);
- ClassDB::bind_method(D_METHOD("remove", "path"), &_Directory::remove);
-}
-
-_Directory::_Directory() {
+void Directory::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("open", "path"), &Directory::open);
+ ClassDB::bind_method(D_METHOD("list_dir_begin", "show_navigational", "show_hidden"), &Directory::list_dir_begin, DEFVAL(false), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("get_next"), &Directory::get_next);
+ ClassDB::bind_method(D_METHOD("current_is_dir"), &Directory::current_is_dir);
+ ClassDB::bind_method(D_METHOD("list_dir_end"), &Directory::list_dir_end);
+ ClassDB::bind_method(D_METHOD("get_drive_count"), &Directory::get_drive_count);
+ ClassDB::bind_method(D_METHOD("get_drive", "idx"), &Directory::get_drive);
+ ClassDB::bind_method(D_METHOD("get_current_drive"), &Directory::get_current_drive);
+ ClassDB::bind_method(D_METHOD("change_dir", "todir"), &Directory::change_dir);
+ ClassDB::bind_method(D_METHOD("get_current_dir"), &Directory::get_current_dir);
+ ClassDB::bind_method(D_METHOD("make_dir", "path"), &Directory::make_dir);
+ ClassDB::bind_method(D_METHOD("make_dir_recursive", "path"), &Directory::make_dir_recursive);
+ ClassDB::bind_method(D_METHOD("file_exists", "path"), &Directory::file_exists);
+ ClassDB::bind_method(D_METHOD("dir_exists", "path"), &Directory::dir_exists);
+ //ClassDB::bind_method(D_METHOD("get_modified_time","file"),&Directory::get_modified_time);
+ ClassDB::bind_method(D_METHOD("get_space_left"), &Directory::get_space_left);
+ ClassDB::bind_method(D_METHOD("copy", "from", "to"), &Directory::copy);
+ ClassDB::bind_method(D_METHOD("rename", "from", "to"), &Directory::rename);
+ ClassDB::bind_method(D_METHOD("remove", "path"), &Directory::remove);
+}
+
+Directory::Directory() {
d = DirAccess::create(DirAccess::ACCESS_RESOURCES);
}
-_Directory::~_Directory() {
+Directory::~Directory() {
if (d) {
memdelete(d);
}
}
-////// _Marshalls //////
+////// Marshalls //////
-_Marshalls *_Marshalls::singleton = nullptr;
+Marshalls *Marshalls::singleton = nullptr;
-_Marshalls *_Marshalls::get_singleton() {
+Marshalls *Marshalls::get_singleton() {
return singleton;
}
-String _Marshalls::variant_to_base64(const Variant &p_var, bool p_full_objects) {
+String Marshalls::variant_to_base64(const Variant &p_var, bool p_full_objects) {
int len;
Error err = encode_variant(p_var, nullptr, len, p_full_objects);
ERR_FAIL_COND_V_MSG(err != OK, "", "Error when trying to encode Variant.");
@@ -1639,7 +1646,7 @@ String _Marshalls::variant_to_base64(const Variant &p_var, bool p_full_objects)
return ret;
}
-Variant _Marshalls::base64_to_variant(const String &p_str, bool p_allow_objects) {
+Variant Marshalls::base64_to_variant(const String &p_str, bool p_allow_objects) {
int strlen = p_str.length();
CharString cstr = p_str.ascii();
@@ -1657,13 +1664,13 @@ Variant _Marshalls::base64_to_variant(const String &p_str, bool p_allow_objects)
return v;
}
-String _Marshalls::raw_to_base64(const Vector<uint8_t> &p_arr) {
+String Marshalls::raw_to_base64(const Vector<uint8_t> &p_arr) {
String ret = CryptoCore::b64_encode_str(p_arr.ptr(), p_arr.size());
ERR_FAIL_COND_V(ret == "", ret);
return ret;
}
-Vector<uint8_t> _Marshalls::base64_to_raw(const String &p_str) {
+Vector<uint8_t> Marshalls::base64_to_raw(const String &p_str) {
int strlen = p_str.length();
CharString cstr = p_str.ascii();
@@ -1680,14 +1687,14 @@ Vector<uint8_t> _Marshalls::base64_to_raw(const String &p_str) {
return buf;
}
-String _Marshalls::utf8_to_base64(const String &p_str) {
+String Marshalls::utf8_to_base64(const String &p_str) {
CharString cstr = p_str.utf8();
String ret = CryptoCore::b64_encode_str((unsigned char *)cstr.get_data(), cstr.length());
ERR_FAIL_COND_V(ret == "", ret);
return ret;
}
-String _Marshalls::base64_to_utf8(const String &p_str) {
+String Marshalls::base64_to_utf8(const String &p_str) {
int strlen = p_str.length();
CharString cstr = p_str.ascii();
@@ -1704,62 +1711,62 @@ String _Marshalls::base64_to_utf8(const String &p_str) {
return ret;
}
-void _Marshalls::_bind_methods() {
- ClassDB::bind_method(D_METHOD("variant_to_base64", "variant", "full_objects"), &_Marshalls::variant_to_base64, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("base64_to_variant", "base64_str", "allow_objects"), &_Marshalls::base64_to_variant, DEFVAL(false));
+void Marshalls::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("variant_to_base64", "variant", "full_objects"), &Marshalls::variant_to_base64, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("base64_to_variant", "base64_str", "allow_objects"), &Marshalls::base64_to_variant, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("raw_to_base64", "array"), &_Marshalls::raw_to_base64);
- ClassDB::bind_method(D_METHOD("base64_to_raw", "base64_str"), &_Marshalls::base64_to_raw);
+ ClassDB::bind_method(D_METHOD("raw_to_base64", "array"), &Marshalls::raw_to_base64);
+ ClassDB::bind_method(D_METHOD("base64_to_raw", "base64_str"), &Marshalls::base64_to_raw);
- ClassDB::bind_method(D_METHOD("utf8_to_base64", "utf8_str"), &_Marshalls::utf8_to_base64);
- ClassDB::bind_method(D_METHOD("base64_to_utf8", "base64_str"), &_Marshalls::base64_to_utf8);
+ ClassDB::bind_method(D_METHOD("utf8_to_base64", "utf8_str"), &Marshalls::utf8_to_base64);
+ ClassDB::bind_method(D_METHOD("base64_to_utf8", "base64_str"), &Marshalls::base64_to_utf8);
}
-////// _Semaphore //////
+////// Semaphore //////
-void _Semaphore::wait() {
+void Semaphore::wait() {
semaphore.wait();
}
-Error _Semaphore::try_wait() {
+Error Semaphore::try_wait() {
return semaphore.try_wait() ? OK : ERR_BUSY;
}
-void _Semaphore::post() {
+void Semaphore::post() {
semaphore.post();
}
-void _Semaphore::_bind_methods() {
- ClassDB::bind_method(D_METHOD("wait"), &_Semaphore::wait);
- ClassDB::bind_method(D_METHOD("try_wait"), &_Semaphore::try_wait);
- ClassDB::bind_method(D_METHOD("post"), &_Semaphore::post);
+void Semaphore::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("wait"), &Semaphore::wait);
+ ClassDB::bind_method(D_METHOD("try_wait"), &Semaphore::try_wait);
+ ClassDB::bind_method(D_METHOD("post"), &Semaphore::post);
}
-////// _Mutex //////
+////// Mutex //////
-void _Mutex::lock() {
+void Mutex::lock() {
mutex.lock();
}
-Error _Mutex::try_lock() {
+Error Mutex::try_lock() {
return mutex.try_lock();
}
-void _Mutex::unlock() {
+void Mutex::unlock() {
mutex.unlock();
}
-void _Mutex::_bind_methods() {
- ClassDB::bind_method(D_METHOD("lock"), &_Mutex::lock);
- ClassDB::bind_method(D_METHOD("try_lock"), &_Mutex::try_lock);
- ClassDB::bind_method(D_METHOD("unlock"), &_Mutex::unlock);
+void Mutex::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("lock"), &Mutex::lock);
+ ClassDB::bind_method(D_METHOD("try_lock"), &Mutex::try_lock);
+ ClassDB::bind_method(D_METHOD("unlock"), &Mutex::unlock);
}
-////// _Thread //////
+////// Thread //////
-void _Thread::_start_func(void *ud) {
- Ref<_Thread> *tud = (Ref<_Thread> *)ud;
- Ref<_Thread> t = *tud;
+void Thread::_start_func(void *ud) {
+ Ref<Thread> *tud = (Ref<Thread> *)ud;
+ Ref<Thread> t = *tud;
memdelete(tud);
Callable::CallError ce;
const Variant *arg[1] = { &t->userdata };
@@ -1779,13 +1786,13 @@ void _Thread::_start_func(void *ud) {
// We must check if we are in case b).
int target_param_count = 0;
int target_default_arg_count = 0;
- Ref<Script> script = t->target_instance->get_script();
+ Ref<Script> script = t->target_callable.get_object()->get_script();
if (script.is_valid()) {
- MethodInfo mi = script->get_method_info(t->target_method);
+ MethodInfo mi = script->get_method_info(t->target_callable.get_method());
target_param_count = mi.arguments.size();
target_default_arg_count = mi.default_arguments.size();
} else {
- MethodBind *method = ClassDB::get_method(t->target_instance->get_class_name(), t->target_method);
+ MethodBind *method = ClassDB::get_method(t->target_callable.get_object()->get_class_name(), t->target_callable.get_method());
target_param_count = method->get_argument_count();
target_default_arg_count = method->get_default_argument_count();
}
@@ -1794,89 +1801,70 @@ void _Thread::_start_func(void *ud) {
}
}
- Thread::set_name(t->target_method);
+ ::Thread::set_name(t->target_callable.get_method());
- t->ret = t->target_instance->call(t->target_method, arg, argc, ce);
+ t->target_callable.call(arg, argc, t->ret, ce);
if (ce.error != Callable::CallError::CALL_OK) {
- String reason;
- switch (ce.error) {
- case Callable::CallError::CALL_ERROR_INVALID_ARGUMENT: {
- reason = "Invalid Argument #" + itos(ce.argument);
- } break;
- case Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS: {
- reason = "Too Many Arguments";
- } break;
- case Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: {
- reason = "Too Few Arguments";
- } break;
- case Callable::CallError::CALL_ERROR_INVALID_METHOD: {
- reason = "Method Not Found";
- } break;
- default: {
- }
- }
-
- ERR_FAIL_MSG("Could not call function '" + t->target_method.operator String() + "' to start thread " + t->get_id() + ": " + reason + ".");
+ ERR_FAIL_MSG("Could not call function '" + t->target_callable.get_method().operator String() + "' to start thread " + t->get_id() + ": " + Variant::get_callable_error_text(t->target_callable, arg, argc, ce) + ".");
}
}
-Error _Thread::start(Object *p_instance, const StringName &p_method, const Variant &p_userdata, Priority p_priority) {
+Error Thread::start(const Callable &p_callable, const Variant &p_userdata, Priority p_priority) {
ERR_FAIL_COND_V_MSG(active.is_set(), ERR_ALREADY_IN_USE, "Thread already started.");
- ERR_FAIL_COND_V(!p_instance, ERR_INVALID_PARAMETER);
- ERR_FAIL_COND_V(p_method == StringName(), ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(p_callable.is_null(), ERR_INVALID_PARAMETER);
ERR_FAIL_INDEX_V(p_priority, PRIORITY_MAX, ERR_INVALID_PARAMETER);
ret = Variant();
- target_method = p_method;
- target_instance = p_instance;
+ target_callable = p_callable;
userdata = p_userdata;
active.set();
- Ref<_Thread> *ud = memnew(Ref<_Thread>(this));
+ Ref<Thread> *ud = memnew(Ref<Thread>(this));
- Thread::Settings s;
- s.priority = (Thread::Priority)p_priority;
+ ::Thread::Settings s;
+ s.priority = (::Thread::Priority)p_priority;
thread.start(_start_func, ud, s);
return OK;
}
-String _Thread::get_id() const {
+String Thread::get_id() const {
return itos(thread.get_id());
}
-bool _Thread::is_active() const {
+bool Thread::is_active() const {
return active.is_set();
}
-Variant _Thread::wait_to_finish() {
+Variant Thread::wait_to_finish() {
ERR_FAIL_COND_V_MSG(!active.is_set(), Variant(), "Thread must be active to wait for its completion.");
thread.wait_to_finish();
Variant r = ret;
active.clear();
- target_method = StringName();
- target_instance = nullptr;
+ target_callable = Callable();
userdata = Variant();
return r;
}
-void _Thread::_bind_methods() {
- ClassDB::bind_method(D_METHOD("start", "instance", "method", "userdata", "priority"), &_Thread::start, DEFVAL(Variant()), DEFVAL(PRIORITY_NORMAL));
- ClassDB::bind_method(D_METHOD("get_id"), &_Thread::get_id);
- ClassDB::bind_method(D_METHOD("is_active"), &_Thread::is_active);
- ClassDB::bind_method(D_METHOD("wait_to_finish"), &_Thread::wait_to_finish);
+void Thread::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("start", "callable", "userdata", "priority"), &Thread::start, DEFVAL(Variant()), DEFVAL(PRIORITY_NORMAL));
+ ClassDB::bind_method(D_METHOD("get_id"), &Thread::get_id);
+ ClassDB::bind_method(D_METHOD("is_active"), &Thread::is_active);
+ ClassDB::bind_method(D_METHOD("wait_to_finish"), &Thread::wait_to_finish);
BIND_ENUM_CONSTANT(PRIORITY_LOW);
BIND_ENUM_CONSTANT(PRIORITY_NORMAL);
BIND_ENUM_CONSTANT(PRIORITY_HIGH);
}
-////// _ClassDB //////
+namespace special {
+
+////// ClassDB //////
-PackedStringArray _ClassDB::get_class_list() const {
+PackedStringArray ClassDB::get_class_list() const {
List<StringName> classes;
- ClassDB::get_class_list(&classes);
+ ::ClassDB::get_class_list(&classes);
PackedStringArray ret;
ret.resize(classes.size());
@@ -1888,9 +1876,9 @@ PackedStringArray _ClassDB::get_class_list() const {
return ret;
}
-PackedStringArray _ClassDB::get_inheriters_from_class(const StringName &p_class) const {
+PackedStringArray ClassDB::get_inheriters_from_class(const StringName &p_class) const {
List<StringName> classes;
- ClassDB::get_inheriters_from_class(p_class, &classes);
+ ::ClassDB::get_inheriters_from_class(p_class, &classes);
PackedStringArray ret;
ret.resize(classes.size());
@@ -1902,24 +1890,24 @@ PackedStringArray _ClassDB::get_inheriters_from_class(const StringName &p_class)
return ret;
}
-StringName _ClassDB::get_parent_class(const StringName &p_class) const {
- return ClassDB::get_parent_class(p_class);
+StringName ClassDB::get_parent_class(const StringName &p_class) const {
+ return ::ClassDB::get_parent_class(p_class);
}
-bool _ClassDB::class_exists(const StringName &p_class) const {
- return ClassDB::class_exists(p_class);
+bool ClassDB::class_exists(const StringName &p_class) const {
+ return ::ClassDB::class_exists(p_class);
}
-bool _ClassDB::is_parent_class(const StringName &p_class, const StringName &p_inherits) const {
- return ClassDB::is_parent_class(p_class, p_inherits);
+bool ClassDB::is_parent_class(const StringName &p_class, const StringName &p_inherits) const {
+ return ::ClassDB::is_parent_class(p_class, p_inherits);
}
-bool _ClassDB::can_instantiate(const StringName &p_class) const {
- return ClassDB::can_instantiate(p_class);
+bool ClassDB::can_instantiate(const StringName &p_class) const {
+ return ::ClassDB::can_instantiate(p_class);
}
-Variant _ClassDB::instantiate(const StringName &p_class) const {
- Object *obj = ClassDB::instantiate(p_class);
+Variant ClassDB::instantiate(const StringName &p_class) const {
+ Object *obj = ::ClassDB::instantiate(p_class);
if (!obj) {
return Variant();
}
@@ -1932,22 +1920,22 @@ Variant _ClassDB::instantiate(const StringName &p_class) const {
}
}
-bool _ClassDB::has_signal(StringName p_class, StringName p_signal) const {
- return ClassDB::has_signal(p_class, p_signal);
+bool ClassDB::has_signal(StringName p_class, StringName p_signal) const {
+ return ::ClassDB::has_signal(p_class, p_signal);
}
-Dictionary _ClassDB::get_signal(StringName p_class, StringName p_signal) const {
+Dictionary ClassDB::get_signal(StringName p_class, StringName p_signal) const {
MethodInfo signal;
- if (ClassDB::get_signal(p_class, p_signal, &signal)) {
+ if (::ClassDB::get_signal(p_class, p_signal, &signal)) {
return signal.operator Dictionary();
} else {
return Dictionary();
}
}
-Array _ClassDB::get_signal_list(StringName p_class, bool p_no_inheritance) const {
+Array ClassDB::get_signal_list(StringName p_class, bool p_no_inheritance) const {
List<MethodInfo> signals;
- ClassDB::get_signal_list(p_class, &signals, p_no_inheritance);
+ ::ClassDB::get_signal_list(p_class, &signals, p_no_inheritance);
Array ret;
for (const MethodInfo &E : signals) {
@@ -1957,9 +1945,9 @@ Array _ClassDB::get_signal_list(StringName p_class, bool p_no_inheritance) const
return ret;
}
-Array _ClassDB::get_property_list(StringName p_class, bool p_no_inheritance) const {
+Array ClassDB::get_property_list(StringName p_class, bool p_no_inheritance) const {
List<PropertyInfo> plist;
- ClassDB::get_property_list(p_class, &plist, p_no_inheritance);
+ ::ClassDB::get_property_list(p_class, &plist, p_no_inheritance);
Array ret;
for (const PropertyInfo &E : plist) {
ret.push_back(E.operator Dictionary());
@@ -1968,16 +1956,16 @@ Array _ClassDB::get_property_list(StringName p_class, bool p_no_inheritance) con
return ret;
}
-Variant _ClassDB::get_property(Object *p_object, const StringName &p_property) const {
+Variant ClassDB::get_property(Object *p_object, const StringName &p_property) const {
Variant ret;
- ClassDB::get_property(p_object, p_property, ret);
+ ::ClassDB::get_property(p_object, p_property, ret);
return ret;
}
-Error _ClassDB::set_property(Object *p_object, const StringName &p_property, const Variant &p_value) const {
+Error ClassDB::set_property(Object *p_object, const StringName &p_property, const Variant &p_value) const {
Variant ret;
bool valid;
- if (!ClassDB::set_property(p_object, p_property, p_value, &valid)) {
+ if (!::ClassDB::set_property(p_object, p_property, p_value, &valid)) {
return ERR_UNAVAILABLE;
} else if (!valid) {
return ERR_INVALID_DATA;
@@ -1985,13 +1973,13 @@ Error _ClassDB::set_property(Object *p_object, const StringName &p_property, con
return OK;
}
-bool _ClassDB::has_method(StringName p_class, StringName p_method, bool p_no_inheritance) const {
- return ClassDB::has_method(p_class, p_method, p_no_inheritance);
+bool ClassDB::has_method(StringName p_class, StringName p_method, bool p_no_inheritance) const {
+ return ::ClassDB::has_method(p_class, p_method, p_no_inheritance);
}
-Array _ClassDB::get_method_list(StringName p_class, bool p_no_inheritance) const {
+Array ClassDB::get_method_list(StringName p_class, bool p_no_inheritance) const {
List<MethodInfo> methods;
- ClassDB::get_method_list(p_class, &methods, p_no_inheritance);
+ ::ClassDB::get_method_list(p_class, &methods, p_no_inheritance);
Array ret;
for (const MethodInfo &E : methods) {
@@ -2007,9 +1995,9 @@ Array _ClassDB::get_method_list(StringName p_class, bool p_no_inheritance) const
return ret;
}
-PackedStringArray _ClassDB::get_integer_constant_list(const StringName &p_class, bool p_no_inheritance) const {
+PackedStringArray ClassDB::get_integer_constant_list(const StringName &p_class, bool p_no_inheritance) const {
List<String> constants;
- ClassDB::get_integer_constant_list(p_class, &constants, p_no_inheritance);
+ ::ClassDB::get_integer_constant_list(p_class, &constants, p_no_inheritance);
PackedStringArray ret;
ret.resize(constants.size());
@@ -2021,206 +2009,278 @@ PackedStringArray _ClassDB::get_integer_constant_list(const StringName &p_class,
return ret;
}
-bool _ClassDB::has_integer_constant(const StringName &p_class, const StringName &p_name) const {
+bool ClassDB::has_integer_constant(const StringName &p_class, const StringName &p_name) const {
bool success;
- ClassDB::get_integer_constant(p_class, p_name, &success);
+ ::ClassDB::get_integer_constant(p_class, p_name, &success);
return success;
}
-int _ClassDB::get_integer_constant(const StringName &p_class, const StringName &p_name) const {
+int ClassDB::get_integer_constant(const StringName &p_class, const StringName &p_name) const {
bool found;
- int c = ClassDB::get_integer_constant(p_class, p_name, &found);
+ int c = ::ClassDB::get_integer_constant(p_class, p_name, &found);
ERR_FAIL_COND_V(!found, 0);
return c;
}
-StringName _ClassDB::get_category(const StringName &p_node) const {
- return ClassDB::get_category(p_node);
+StringName ClassDB::get_category(const StringName &p_node) const {
+ return ::ClassDB::get_category(p_node);
+}
+
+bool ClassDB::has_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance) const {
+ return ::ClassDB::has_enum(p_class, p_name, p_no_inheritance);
+}
+
+PackedStringArray ClassDB::get_enum_list(const StringName &p_class, bool p_no_inheritance) const {
+ List<StringName> enums;
+ ::ClassDB::get_enum_list(p_class, &enums, p_no_inheritance);
+
+ PackedStringArray ret;
+ ret.resize(enums.size());
+ int idx = 0;
+ for (const StringName &E : enums) {
+ ret.set(idx++, E);
+ }
+
+ return ret;
+}
+
+PackedStringArray ClassDB::get_enum_constants(const StringName &p_class, const StringName &p_enum, bool p_no_inheritance) const {
+ List<StringName> constants;
+ ::ClassDB::get_enum_constants(p_class, p_enum, &constants, p_no_inheritance);
+
+ PackedStringArray ret;
+ ret.resize(constants.size());
+ int idx = 0;
+ for (const StringName &E : constants) {
+ ret.set(idx++, E);
+ }
+
+ return ret;
+}
+
+StringName ClassDB::get_integer_constant_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance) const {
+ return ::ClassDB::get_integer_constant_enum(p_class, p_name, p_no_inheritance);
}
-bool _ClassDB::is_class_enabled(StringName p_class) const {
- return ClassDB::is_class_enabled(p_class);
+bool ClassDB::is_class_enabled(StringName p_class) const {
+ return ::ClassDB::is_class_enabled(p_class);
}
-void _ClassDB::_bind_methods() {
- ClassDB::bind_method(D_METHOD("get_class_list"), &_ClassDB::get_class_list);
- ClassDB::bind_method(D_METHOD("get_inheriters_from_class", "class"), &_ClassDB::get_inheriters_from_class);
- ClassDB::bind_method(D_METHOD("get_parent_class", "class"), &_ClassDB::get_parent_class);
- ClassDB::bind_method(D_METHOD("class_exists", "class"), &_ClassDB::class_exists);
- ClassDB::bind_method(D_METHOD("is_parent_class", "class", "inherits"), &_ClassDB::is_parent_class);
- ClassDB::bind_method(D_METHOD("can_instantiate", "class"), &_ClassDB::can_instantiate);
- ClassDB::bind_method(D_METHOD("instantiate", "class"), &_ClassDB::instantiate);
+void ClassDB::_bind_methods() {
+ ::ClassDB::bind_method(D_METHOD("get_class_list"), &ClassDB::get_class_list);
+ ::ClassDB::bind_method(D_METHOD("get_inheriters_from_class", "class"), &ClassDB::get_inheriters_from_class);
+ ::ClassDB::bind_method(D_METHOD("get_parent_class", "class"), &ClassDB::get_parent_class);
+ ::ClassDB::bind_method(D_METHOD("class_exists", "class"), &ClassDB::class_exists);
+ ::ClassDB::bind_method(D_METHOD("is_parent_class", "class", "inherits"), &ClassDB::is_parent_class);
+ ::ClassDB::bind_method(D_METHOD("can_instantiate", "class"), &ClassDB::can_instantiate);
+ ::ClassDB::bind_method(D_METHOD("instantiate", "class"), &ClassDB::instantiate);
+
+ ::ClassDB::bind_method(D_METHOD("class_has_signal", "class", "signal"), &ClassDB::has_signal);
+ ::ClassDB::bind_method(D_METHOD("class_get_signal", "class", "signal"), &ClassDB::get_signal);
+ ::ClassDB::bind_method(D_METHOD("class_get_signal_list", "class", "no_inheritance"), &ClassDB::get_signal_list, DEFVAL(false));
+
+ ::ClassDB::bind_method(D_METHOD("class_get_property_list", "class", "no_inheritance"), &ClassDB::get_property_list, DEFVAL(false));
+ ::ClassDB::bind_method(D_METHOD("class_get_property", "object", "property"), &ClassDB::get_property);
+ ::ClassDB::bind_method(D_METHOD("class_set_property", "object", "property", "value"), &ClassDB::set_property);
+
+ ::ClassDB::bind_method(D_METHOD("class_has_method", "class", "method", "no_inheritance"), &ClassDB::has_method, DEFVAL(false));
+
+ ::ClassDB::bind_method(D_METHOD("class_get_method_list", "class", "no_inheritance"), &ClassDB::get_method_list, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("class_has_signal", "class", "signal"), &_ClassDB::has_signal);
- ClassDB::bind_method(D_METHOD("class_get_signal", "class", "signal"), &_ClassDB::get_signal);
- ClassDB::bind_method(D_METHOD("class_get_signal_list", "class", "no_inheritance"), &_ClassDB::get_signal_list, DEFVAL(false));
+ ::ClassDB::bind_method(D_METHOD("class_get_integer_constant_list", "class", "no_inheritance"), &ClassDB::get_integer_constant_list, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("class_get_property_list", "class", "no_inheritance"), &_ClassDB::get_property_list, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("class_get_property", "object", "property"), &_ClassDB::get_property);
- ClassDB::bind_method(D_METHOD("class_set_property", "object", "property", "value"), &_ClassDB::set_property);
+ ::ClassDB::bind_method(D_METHOD("class_has_integer_constant", "class", "name"), &ClassDB::has_integer_constant);
+ ::ClassDB::bind_method(D_METHOD("class_get_integer_constant", "class", "name"), &ClassDB::get_integer_constant);
- ClassDB::bind_method(D_METHOD("class_has_method", "class", "method", "no_inheritance"), &_ClassDB::has_method, DEFVAL(false));
+ ::ClassDB::bind_method(D_METHOD("class_has_enum", "class", "name", "no_inheritance"), &ClassDB::has_enum, DEFVAL(false));
+ ::ClassDB::bind_method(D_METHOD("class_get_enum_list", "class", "no_inheritance"), &ClassDB::get_enum_list, DEFVAL(false));
+ ::ClassDB::bind_method(D_METHOD("class_get_enum_constants", "class", "enum", "no_inheritance"), &ClassDB::get_enum_constants, DEFVAL(false));
+ ::ClassDB::bind_method(D_METHOD("class_get_integer_constant_enum", "class", "name", "no_inheritance"), &ClassDB::get_integer_constant_enum, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("class_get_method_list", "class", "no_inheritance"), &_ClassDB::get_method_list, DEFVAL(false));
+ ::ClassDB::bind_method(D_METHOD("class_get_category", "class"), &ClassDB::get_category);
+ ::ClassDB::bind_method(D_METHOD("is_class_enabled", "class"), &ClassDB::is_class_enabled);
+}
- ClassDB::bind_method(D_METHOD("class_get_integer_constant_list", "class", "no_inheritance"), &_ClassDB::get_integer_constant_list, DEFVAL(false));
+} // namespace special
- ClassDB::bind_method(D_METHOD("class_has_integer_constant", "class", "name"), &_ClassDB::has_integer_constant);
- ClassDB::bind_method(D_METHOD("class_get_integer_constant", "class", "name"), &_ClassDB::get_integer_constant);
+////// Engine //////
- ClassDB::bind_method(D_METHOD("class_get_category", "class"), &_ClassDB::get_category);
- ClassDB::bind_method(D_METHOD("is_class_enabled", "class"), &_ClassDB::is_class_enabled);
+void Engine::set_physics_ticks_per_second(int p_ips) {
+ ::Engine::get_singleton()->set_physics_ticks_per_second(p_ips);
}
-////// _Engine //////
+int Engine::get_physics_ticks_per_second() const {
+ return ::Engine::get_singleton()->get_physics_ticks_per_second();
+}
-void _Engine::set_physics_ticks_per_second(int p_ips) {
- Engine::get_singleton()->set_physics_ticks_per_second(p_ips);
+void Engine::set_physics_jitter_fix(double p_threshold) {
+ ::Engine::get_singleton()->set_physics_jitter_fix(p_threshold);
}
-int _Engine::get_physics_ticks_per_second() const {
- return Engine::get_singleton()->get_physics_ticks_per_second();
+double Engine::get_physics_jitter_fix() const {
+ return ::Engine::get_singleton()->get_physics_jitter_fix();
}
-void _Engine::set_physics_jitter_fix(double p_threshold) {
- Engine::get_singleton()->set_physics_jitter_fix(p_threshold);
+double Engine::get_physics_interpolation_fraction() const {
+ return ::Engine::get_singleton()->get_physics_interpolation_fraction();
}
-double _Engine::get_physics_jitter_fix() const {
- return Engine::get_singleton()->get_physics_jitter_fix();
+void Engine::set_target_fps(int p_fps) {
+ ::Engine::get_singleton()->set_target_fps(p_fps);
}
-double _Engine::get_physics_interpolation_fraction() const {
- return Engine::get_singleton()->get_physics_interpolation_fraction();
+int Engine::get_target_fps() const {
+ return ::Engine::get_singleton()->get_target_fps();
}
-void _Engine::set_target_fps(int p_fps) {
- Engine::get_singleton()->set_target_fps(p_fps);
+double Engine::get_frames_per_second() const {
+ return ::Engine::get_singleton()->get_frames_per_second();
}
-int _Engine::get_target_fps() const {
- return Engine::get_singleton()->get_target_fps();
+uint64_t Engine::get_physics_frames() const {
+ return ::Engine::get_singleton()->get_physics_frames();
}
-double _Engine::get_frames_per_second() const {
- return Engine::get_singleton()->get_frames_per_second();
+uint64_t Engine::get_process_frames() const {
+ return ::Engine::get_singleton()->get_process_frames();
}
-uint64_t _Engine::get_physics_frames() const {
- return Engine::get_singleton()->get_physics_frames();
+void Engine::set_time_scale(double p_scale) {
+ ::Engine::get_singleton()->set_time_scale(p_scale);
}
-uint64_t _Engine::get_process_frames() const {
- return Engine::get_singleton()->get_process_frames();
+double Engine::get_time_scale() {
+ return ::Engine::get_singleton()->get_time_scale();
}
-void _Engine::set_time_scale(double p_scale) {
- Engine::get_singleton()->set_time_scale(p_scale);
+int Engine::get_frames_drawn() {
+ return ::Engine::get_singleton()->get_frames_drawn();
}
-double _Engine::get_time_scale() {
- return Engine::get_singleton()->get_time_scale();
+MainLoop *Engine::get_main_loop() const {
+ // Needs to remain in OS, since it's actually OS that interacts with it, but it's better exposed here
+ return ::OS::get_singleton()->get_main_loop();
}
-int _Engine::get_frames_drawn() {
- return Engine::get_singleton()->get_frames_drawn();
+Dictionary Engine::get_version_info() const {
+ return ::Engine::get_singleton()->get_version_info();
}
-MainLoop *_Engine::get_main_loop() const {
- //needs to remain in OS, since it's actually OS that interacts with it, but it's better exposed here
- return OS::get_singleton()->get_main_loop();
+Dictionary Engine::get_author_info() const {
+ return ::Engine::get_singleton()->get_author_info();
}
-Dictionary _Engine::get_version_info() const {
- return Engine::get_singleton()->get_version_info();
+Array Engine::get_copyright_info() const {
+ return ::Engine::get_singleton()->get_copyright_info();
}
-Dictionary _Engine::get_author_info() const {
- return Engine::get_singleton()->get_author_info();
+Dictionary Engine::get_donor_info() const {
+ return ::Engine::get_singleton()->get_donor_info();
}
-Array _Engine::get_copyright_info() const {
- return Engine::get_singleton()->get_copyright_info();
+Dictionary Engine::get_license_info() const {
+ return ::Engine::get_singleton()->get_license_info();
}
-Dictionary _Engine::get_donor_info() const {
- return Engine::get_singleton()->get_donor_info();
+String Engine::get_license_text() const {
+ return ::Engine::get_singleton()->get_license_text();
}
-Dictionary _Engine::get_license_info() const {
- return Engine::get_singleton()->get_license_info();
+bool Engine::is_in_physics_frame() const {
+ return ::Engine::get_singleton()->is_in_physics_frame();
}
-String _Engine::get_license_text() const {
- return Engine::get_singleton()->get_license_text();
+bool Engine::has_singleton(const StringName &p_name) const {
+ return ::Engine::get_singleton()->has_singleton(p_name);
}
-bool _Engine::is_in_physics_frame() const {
- return Engine::get_singleton()->is_in_physics_frame();
+Object *Engine::get_singleton_object(const StringName &p_name) const {
+ return ::Engine::get_singleton()->get_singleton_object(p_name);
}
-bool _Engine::has_singleton(const String &p_name) const {
- return Engine::get_singleton()->has_singleton(p_name);
+void Engine::register_singleton(const StringName &p_name, Object *p_object) {
+ ERR_FAIL_COND_MSG(has_singleton(p_name), "Singleton already registered: " + String(p_name));
+ ERR_FAIL_COND_MSG(!String(p_name).is_valid_identifier(), "Singleton name is not a valid identifier: " + p_name);
+ ::Engine::Singleton s;
+ s.class_name = p_name;
+ s.name = p_name;
+ s.ptr = p_object;
+ s.user_created = true;
+ ::Engine::get_singleton()->add_singleton(s);
+ ;
+}
+void Engine::unregister_singleton(const StringName &p_name) {
+ ERR_FAIL_COND_MSG(!has_singleton(p_name), "Attempt to remove unregisteres singleton: " + String(p_name));
+ ERR_FAIL_COND_MSG(!::Engine::get_singleton()->is_singleton_user_created(p_name), "Attempt to remove non-user created singleton: " + String(p_name));
+ ::Engine::get_singleton()->remove_singleton(p_name);
}
-Object *_Engine::get_singleton_object(const String &p_name) const {
- return Engine::get_singleton()->get_singleton_object(p_name);
+Vector<String> Engine::get_singleton_list() const {
+ List<::Engine::Singleton> singletons;
+ ::Engine::get_singleton()->get_singletons(&singletons);
+ Vector<String> ret;
+ for (List<::Engine::Singleton>::Element *E = singletons.front(); E; E = E->next()) {
+ ret.push_back(E->get().name);
+ }
+ return ret;
}
-void _Engine::set_editor_hint(bool p_enabled) {
- Engine::get_singleton()->set_editor_hint(p_enabled);
+void Engine::set_editor_hint(bool p_enabled) {
+ ::Engine::get_singleton()->set_editor_hint(p_enabled);
}
-bool _Engine::is_editor_hint() const {
- return Engine::get_singleton()->is_editor_hint();
+bool Engine::is_editor_hint() const {
+ return ::Engine::get_singleton()->is_editor_hint();
}
-void _Engine::set_print_error_messages(bool p_enabled) {
- Engine::get_singleton()->set_print_error_messages(p_enabled);
+void Engine::set_print_error_messages(bool p_enabled) {
+ ::Engine::get_singleton()->set_print_error_messages(p_enabled);
}
-bool _Engine::is_printing_error_messages() const {
- return Engine::get_singleton()->is_printing_error_messages();
+bool Engine::is_printing_error_messages() const {
+ return ::Engine::get_singleton()->is_printing_error_messages();
}
-void _Engine::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_physics_ticks_per_second", "physics_ticks_per_second"), &_Engine::set_physics_ticks_per_second);
- ClassDB::bind_method(D_METHOD("get_physics_ticks_per_second"), &_Engine::get_physics_ticks_per_second);
- ClassDB::bind_method(D_METHOD("set_physics_jitter_fix", "physics_jitter_fix"), &_Engine::set_physics_jitter_fix);
- ClassDB::bind_method(D_METHOD("get_physics_jitter_fix"), &_Engine::get_physics_jitter_fix);
- ClassDB::bind_method(D_METHOD("get_physics_interpolation_fraction"), &_Engine::get_physics_interpolation_fraction);
- ClassDB::bind_method(D_METHOD("set_target_fps", "target_fps"), &_Engine::set_target_fps);
- ClassDB::bind_method(D_METHOD("get_target_fps"), &_Engine::get_target_fps);
+void Engine::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_physics_ticks_per_second", "physics_ticks_per_second"), &Engine::set_physics_ticks_per_second);
+ ClassDB::bind_method(D_METHOD("get_physics_ticks_per_second"), &Engine::get_physics_ticks_per_second);
+ ClassDB::bind_method(D_METHOD("set_physics_jitter_fix", "physics_jitter_fix"), &Engine::set_physics_jitter_fix);
+ ClassDB::bind_method(D_METHOD("get_physics_jitter_fix"), &Engine::get_physics_jitter_fix);
+ ClassDB::bind_method(D_METHOD("get_physics_interpolation_fraction"), &Engine::get_physics_interpolation_fraction);
+ ClassDB::bind_method(D_METHOD("set_target_fps", "target_fps"), &Engine::set_target_fps);
+ ClassDB::bind_method(D_METHOD("get_target_fps"), &Engine::get_target_fps);
+
+ ClassDB::bind_method(D_METHOD("set_time_scale", "time_scale"), &Engine::set_time_scale);
+ ClassDB::bind_method(D_METHOD("get_time_scale"), &Engine::get_time_scale);
- ClassDB::bind_method(D_METHOD("set_time_scale", "time_scale"), &_Engine::set_time_scale);
- ClassDB::bind_method(D_METHOD("get_time_scale"), &_Engine::get_time_scale);
+ ClassDB::bind_method(D_METHOD("get_frames_drawn"), &Engine::get_frames_drawn);
+ ClassDB::bind_method(D_METHOD("get_frames_per_second"), &Engine::get_frames_per_second);
+ ClassDB::bind_method(D_METHOD("get_physics_frames"), &Engine::get_physics_frames);
+ ClassDB::bind_method(D_METHOD("get_process_frames"), &Engine::get_process_frames);
- ClassDB::bind_method(D_METHOD("get_frames_drawn"), &_Engine::get_frames_drawn);
- ClassDB::bind_method(D_METHOD("get_frames_per_second"), &_Engine::get_frames_per_second);
- ClassDB::bind_method(D_METHOD("get_physics_frames"), &_Engine::get_physics_frames);
- ClassDB::bind_method(D_METHOD("get_process_frames"), &_Engine::get_process_frames);
+ ClassDB::bind_method(D_METHOD("get_main_loop"), &Engine::get_main_loop);
- ClassDB::bind_method(D_METHOD("get_main_loop"), &_Engine::get_main_loop);
+ ClassDB::bind_method(D_METHOD("get_version_info"), &Engine::get_version_info);
+ ClassDB::bind_method(D_METHOD("get_author_info"), &Engine::get_author_info);
+ ClassDB::bind_method(D_METHOD("get_copyright_info"), &Engine::get_copyright_info);
+ ClassDB::bind_method(D_METHOD("get_donor_info"), &Engine::get_donor_info);
+ ClassDB::bind_method(D_METHOD("get_license_info"), &Engine::get_license_info);
+ ClassDB::bind_method(D_METHOD("get_license_text"), &Engine::get_license_text);
- ClassDB::bind_method(D_METHOD("get_version_info"), &_Engine::get_version_info);
- ClassDB::bind_method(D_METHOD("get_author_info"), &_Engine::get_author_info);
- ClassDB::bind_method(D_METHOD("get_copyright_info"), &_Engine::get_copyright_info);
- ClassDB::bind_method(D_METHOD("get_donor_info"), &_Engine::get_donor_info);
- ClassDB::bind_method(D_METHOD("get_license_info"), &_Engine::get_license_info);
- ClassDB::bind_method(D_METHOD("get_license_text"), &_Engine::get_license_text);
+ ClassDB::bind_method(D_METHOD("is_in_physics_frame"), &Engine::is_in_physics_frame);
- ClassDB::bind_method(D_METHOD("is_in_physics_frame"), &_Engine::is_in_physics_frame);
+ ClassDB::bind_method(D_METHOD("has_singleton", "name"), &Engine::has_singleton);
+ ClassDB::bind_method(D_METHOD("get_singleton", "name"), &Engine::get_singleton_object);
- ClassDB::bind_method(D_METHOD("has_singleton", "name"), &_Engine::has_singleton);
- ClassDB::bind_method(D_METHOD("get_singleton", "name"), &_Engine::get_singleton_object);
+ ClassDB::bind_method(D_METHOD("register_singleton", "name", "instance"), &Engine::register_singleton);
+ ClassDB::bind_method(D_METHOD("unregister_singleton", "name"), &Engine::unregister_singleton);
+ ClassDB::bind_method(D_METHOD("get_singleton_list"), &Engine::get_singleton_list);
- ClassDB::bind_method(D_METHOD("set_editor_hint", "enabled"), &_Engine::set_editor_hint);
- ClassDB::bind_method(D_METHOD("is_editor_hint"), &_Engine::is_editor_hint);
+ ClassDB::bind_method(D_METHOD("is_editor_hint"), &Engine::is_editor_hint);
- ClassDB::bind_method(D_METHOD("set_print_error_messages", "enabled"), &_Engine::set_print_error_messages);
- ClassDB::bind_method(D_METHOD("is_printing_error_messages"), &_Engine::is_printing_error_messages);
+ ClassDB::bind_method(D_METHOD("set_print_error_messages", "enabled"), &Engine::set_print_error_messages);
+ ClassDB::bind_method(D_METHOD("is_printing_error_messages"), &Engine::is_printing_error_messages);
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_hint"), "set_editor_hint", "is_editor_hint");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "print_error_messages"), "set_print_error_messages", "is_printing_error_messages");
ADD_PROPERTY(PropertyInfo(Variant::INT, "physics_ticks_per_second"), "set_physics_ticks_per_second", "get_physics_ticks_per_second");
ADD_PROPERTY(PropertyInfo(Variant::INT, "target_fps"), "set_target_fps", "get_target_fps");
@@ -2228,92 +2288,74 @@ void _Engine::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "physics_jitter_fix"), "set_physics_jitter_fix", "get_physics_jitter_fix");
}
-_Engine *_Engine::singleton = nullptr;
+Engine *Engine::singleton = nullptr;
-////// _EngineDebugger //////
+////// EngineDebugger //////
-void _EngineDebugger::_bind_methods() {
- ClassDB::bind_method(D_METHOD("is_active"), &_EngineDebugger::is_active);
-
- ClassDB::bind_method(D_METHOD("register_profiler", "name", "toggle", "add", "tick"), &_EngineDebugger::register_profiler);
- ClassDB::bind_method(D_METHOD("unregister_profiler", "name"), &_EngineDebugger::unregister_profiler);
- ClassDB::bind_method(D_METHOD("is_profiling", "name"), &_EngineDebugger::is_profiling);
- ClassDB::bind_method(D_METHOD("has_profiler", "name"), &_EngineDebugger::has_profiler);
-
- ClassDB::bind_method(D_METHOD("profiler_add_frame_data", "name", "data"), &_EngineDebugger::profiler_add_frame_data);
- ClassDB::bind_method(D_METHOD("profiler_enable", "name", "enable", "arguments"), &_EngineDebugger::profiler_enable, DEFVAL(Array()));
-
- ClassDB::bind_method(D_METHOD("register_message_capture", "name", "callable"), &_EngineDebugger::register_message_capture);
- ClassDB::bind_method(D_METHOD("unregister_message_capture", "name"), &_EngineDebugger::unregister_message_capture);
- ClassDB::bind_method(D_METHOD("has_capture", "name"), &_EngineDebugger::has_capture);
-
- ClassDB::bind_method(D_METHOD("send_message", "message", "data"), &_EngineDebugger::send_message);
+bool EngineDebugger::is_active() {
+ return ::EngineDebugger::is_active();
}
-bool _EngineDebugger::is_active() {
- return EngineDebugger::is_active();
-}
-
-void _EngineDebugger::register_profiler(const StringName &p_name, const Callable &p_toggle, const Callable &p_add, const Callable &p_tick) {
+void EngineDebugger::register_profiler(const StringName &p_name, const Callable &p_toggle, const Callable &p_add, const Callable &p_tick) {
ERR_FAIL_COND_MSG(profilers.has(p_name) || has_profiler(p_name), "Profiler already registered: " + p_name);
profilers.insert(p_name, ProfilerCallable(p_toggle, p_add, p_tick));
ProfilerCallable &p = profilers[p_name];
- EngineDebugger::Profiler profiler(
+ ::EngineDebugger::Profiler profiler(
&p,
- &_EngineDebugger::call_toggle,
- &_EngineDebugger::call_add,
- &_EngineDebugger::call_tick);
- EngineDebugger::register_profiler(p_name, profiler);
+ &EngineDebugger::call_toggle,
+ &EngineDebugger::call_add,
+ &EngineDebugger::call_tick);
+ ::EngineDebugger::register_profiler(p_name, profiler);
}
-void _EngineDebugger::unregister_profiler(const StringName &p_name) {
+void EngineDebugger::unregister_profiler(const StringName &p_name) {
ERR_FAIL_COND_MSG(!profilers.has(p_name), "Profiler not registered: " + p_name);
- EngineDebugger::unregister_profiler(p_name);
+ ::EngineDebugger::unregister_profiler(p_name);
profilers.erase(p_name);
}
-bool _EngineDebugger::_EngineDebugger::is_profiling(const StringName &p_name) {
- return EngineDebugger::is_profiling(p_name);
+bool EngineDebugger::is_profiling(const StringName &p_name) {
+ return ::EngineDebugger::is_profiling(p_name);
}
-bool _EngineDebugger::has_profiler(const StringName &p_name) {
- return EngineDebugger::has_profiler(p_name);
+bool EngineDebugger::has_profiler(const StringName &p_name) {
+ return ::EngineDebugger::has_profiler(p_name);
}
-void _EngineDebugger::profiler_add_frame_data(const StringName &p_name, const Array &p_data) {
- EngineDebugger::profiler_add_frame_data(p_name, p_data);
+void EngineDebugger::profiler_add_frame_data(const StringName &p_name, const Array &p_data) {
+ ::EngineDebugger::profiler_add_frame_data(p_name, p_data);
}
-void _EngineDebugger::profiler_enable(const StringName &p_name, bool p_enabled, const Array &p_opts) {
- if (EngineDebugger::get_singleton()) {
- EngineDebugger::get_singleton()->profiler_enable(p_name, p_enabled, p_opts);
+void EngineDebugger::profiler_enable(const StringName &p_name, bool p_enabled, const Array &p_opts) {
+ if (::EngineDebugger::get_singleton()) {
+ ::EngineDebugger::get_singleton()->profiler_enable(p_name, p_enabled, p_opts);
}
}
-void _EngineDebugger::register_message_capture(const StringName &p_name, const Callable &p_callable) {
+void EngineDebugger::register_message_capture(const StringName &p_name, const Callable &p_callable) {
ERR_FAIL_COND_MSG(captures.has(p_name) || has_capture(p_name), "Capture already registered: " + p_name);
captures.insert(p_name, p_callable);
Callable &c = captures[p_name];
- EngineDebugger::Capture capture(&c, &_EngineDebugger::call_capture);
- EngineDebugger::register_message_capture(p_name, capture);
+ ::EngineDebugger::Capture capture(&c, &EngineDebugger::call_capture);
+ ::EngineDebugger::register_message_capture(p_name, capture);
}
-void _EngineDebugger::unregister_message_capture(const StringName &p_name) {
+void EngineDebugger::unregister_message_capture(const StringName &p_name) {
ERR_FAIL_COND_MSG(!captures.has(p_name), "Capture not registered: " + p_name);
- EngineDebugger::unregister_message_capture(p_name);
+ ::EngineDebugger::unregister_message_capture(p_name);
captures.erase(p_name);
}
-bool _EngineDebugger::has_capture(const StringName &p_name) {
- return EngineDebugger::has_capture(p_name);
+bool EngineDebugger::has_capture(const StringName &p_name) {
+ return ::EngineDebugger::has_capture(p_name);
}
-void _EngineDebugger::send_message(const String &p_msg, const Array &p_data) {
- ERR_FAIL_COND_MSG(!EngineDebugger::is_active(), "Can't send message. No active debugger");
- EngineDebugger::get_singleton()->send_message(p_msg, p_data);
+void EngineDebugger::send_message(const String &p_msg, const Array &p_data) {
+ ERR_FAIL_COND_MSG(!::EngineDebugger::is_active(), "Can't send message. No active debugger");
+ ::EngineDebugger::get_singleton()->send_message(p_msg, p_data);
}
-void _EngineDebugger::call_toggle(void *p_user, bool p_enable, const Array &p_opts) {
+void EngineDebugger::call_toggle(void *p_user, bool p_enable, const Array &p_opts) {
Callable &toggle = ((ProfilerCallable *)p_user)->callable_toggle;
if (toggle.is_null()) {
return;
@@ -2326,7 +2368,7 @@ void _EngineDebugger::call_toggle(void *p_user, bool p_enable, const Array &p_op
ERR_FAIL_COND_MSG(err.error != Callable::CallError::CALL_OK, "Error calling 'toggle' to callable: " + Variant::get_callable_error_text(toggle, args, 2, err));
}
-void _EngineDebugger::call_add(void *p_user, const Array &p_data) {
+void EngineDebugger::call_add(void *p_user, const Array &p_data) {
Callable &add = ((ProfilerCallable *)p_user)->callable_add;
if (add.is_null()) {
return;
@@ -2339,7 +2381,7 @@ void _EngineDebugger::call_add(void *p_user, const Array &p_data) {
ERR_FAIL_COND_MSG(err.error != Callable::CallError::CALL_OK, "Error calling 'add' to callable: " + Variant::get_callable_error_text(add, args, 1, err));
}
-void _EngineDebugger::call_tick(void *p_user, double p_frame_time, double p_idle_time, double p_physics_time, double p_physics_frame_time) {
+void EngineDebugger::call_tick(void *p_user, double p_frame_time, double p_idle_time, double p_physics_time, double p_physics_frame_time) {
Callable &tick = ((ProfilerCallable *)p_user)->callable_tick;
if (tick.is_null()) {
return;
@@ -2352,7 +2394,7 @@ void _EngineDebugger::call_tick(void *p_user, double p_frame_time, double p_idle
ERR_FAIL_COND_MSG(err.error != Callable::CallError::CALL_OK, "Error calling 'tick' to callable: " + Variant::get_callable_error_text(tick, args, 4, err));
}
-Error _EngineDebugger::call_capture(void *p_user, const String &p_cmd, const Array &p_data, bool &r_captured) {
+Error EngineDebugger::call_capture(void *p_user, const String &p_cmd, const Array &p_data, bool &r_captured) {
Callable &capture = *(Callable *)p_user;
if (capture.is_null()) {
return FAILED;
@@ -2368,15 +2410,35 @@ Error _EngineDebugger::call_capture(void *p_user, const String &p_cmd, const Arr
return OK;
}
-_EngineDebugger::~_EngineDebugger() {
+EngineDebugger::~EngineDebugger() {
for (Map<StringName, Callable>::Element *E = captures.front(); E; E = E->next()) {
- EngineDebugger::unregister_message_capture(E->key());
+ ::EngineDebugger::unregister_message_capture(E->key());
}
captures.clear();
for (Map<StringName, ProfilerCallable>::Element *E = profilers.front(); E; E = E->next()) {
- EngineDebugger::unregister_profiler(E->key());
+ ::EngineDebugger::unregister_profiler(E->key());
}
profilers.clear();
}
-_EngineDebugger *_EngineDebugger::singleton = nullptr;
+EngineDebugger *EngineDebugger::singleton = nullptr;
+
+void EngineDebugger::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("is_active"), &EngineDebugger::is_active);
+
+ ClassDB::bind_method(D_METHOD("register_profiler", "name", "toggle", "add", "tick"), &EngineDebugger::register_profiler);
+ ClassDB::bind_method(D_METHOD("unregister_profiler", "name"), &EngineDebugger::unregister_profiler);
+ ClassDB::bind_method(D_METHOD("is_profiling", "name"), &EngineDebugger::is_profiling);
+ ClassDB::bind_method(D_METHOD("has_profiler", "name"), &EngineDebugger::has_profiler);
+
+ ClassDB::bind_method(D_METHOD("profiler_add_frame_data", "name", "data"), &EngineDebugger::profiler_add_frame_data);
+ ClassDB::bind_method(D_METHOD("profiler_enable", "name", "enable", "arguments"), &EngineDebugger::profiler_enable, DEFVAL(Array()));
+
+ ClassDB::bind_method(D_METHOD("register_message_capture", "name", "callable"), &EngineDebugger::register_message_capture);
+ ClassDB::bind_method(D_METHOD("unregister_message_capture", "name"), &EngineDebugger::unregister_message_capture);
+ ClassDB::bind_method(D_METHOD("has_capture", "name"), &EngineDebugger::has_capture);
+
+ ClassDB::bind_method(D_METHOD("send_message", "message", "data"), &EngineDebugger::send_message);
+}
+
+} // namespace core_bind
diff --git a/core/core_bind.h b/core/core_bind.h
index 94e8ab2a34..84a284f948 100644
--- a/core/core_bind.h
+++ b/core/core_bind.h
@@ -42,12 +42,16 @@
#include "core/os/thread.h"
#include "core/templates/safe_refcount.h"
-class _ResourceLoader : public Object {
- GDCLASS(_ResourceLoader, Object);
+class MainLoop;
+
+namespace core_bind {
+
+class ResourceLoader : public Object {
+ GDCLASS(ResourceLoader, Object);
protected:
static void _bind_methods();
- static _ResourceLoader *singleton;
+ static ResourceLoader *singleton;
public:
enum ThreadLoadStatus {
@@ -63,7 +67,7 @@ public:
CACHE_MODE_REPLACE, // Resource and subresource use path cache, but replace existing loaded resources when available with information from disk.
};
- static _ResourceLoader *get_singleton() { return singleton; }
+ static ResourceLoader *get_singleton() { return singleton; }
Error load_threaded_request(const String &p_path, const String &p_type_hint = "", bool p_use_sub_threads = false);
ThreadLoadStatus load_threaded_get_status(const String &p_path, Array r_progress = Array());
@@ -77,18 +81,15 @@ public:
bool exists(const String &p_path, const String &p_type_hint = "");
ResourceUID::ID get_resource_uid(const String &p_path);
- _ResourceLoader() { singleton = this; }
+ ResourceLoader() { singleton = this; }
};
-VARIANT_ENUM_CAST(_ResourceLoader::ThreadLoadStatus);
-VARIANT_ENUM_CAST(_ResourceLoader::CacheMode);
-
-class _ResourceSaver : public Object {
- GDCLASS(_ResourceSaver, Object);
+class ResourceSaver : public Object {
+ GDCLASS(ResourceSaver, Object);
protected:
static void _bind_methods();
- static _ResourceSaver *singleton;
+ static ResourceSaver *singleton;
public:
enum SaverFlags {
@@ -101,24 +102,20 @@ public:
FLAG_REPLACE_SUBRESOURCE_PATHS = 64,
};
- static _ResourceSaver *get_singleton() { return singleton; }
+ static ResourceSaver *get_singleton() { return singleton; }
Error save(const String &p_path, const RES &p_resource, SaverFlags p_flags);
Vector<String> get_recognized_extensions(const RES &p_resource);
- _ResourceSaver() { singleton = this; }
+ ResourceSaver() { singleton = this; }
};
-VARIANT_ENUM_CAST(_ResourceSaver::SaverFlags);
-
-class MainLoop;
-
-class _OS : public Object {
- GDCLASS(_OS, Object);
+class OS : public Object {
+ GDCLASS(OS, Object);
protected:
static void _bind_methods();
- static _OS *singleton;
+ static OS *singleton;
public:
enum VideoDriver {
@@ -181,6 +178,7 @@ public:
Vector<String> get_cmdline_args();
String get_locale() const;
+ String get_locale_language() const;
String get_model_name() const;
@@ -245,26 +243,21 @@ public:
bool request_permissions();
Vector<String> get_granted_permissions() const;
- static _OS *get_singleton() { return singleton; }
+ static OS *get_singleton() { return singleton; }
- _OS() { singleton = this; }
+ OS() { singleton = this; }
};
-VARIANT_ENUM_CAST(_OS::VideoDriver);
-VARIANT_ENUM_CAST(_OS::Weekday);
-VARIANT_ENUM_CAST(_OS::Month);
-VARIANT_ENUM_CAST(_OS::SystemDir);
-
-class _Geometry2D : public Object {
- GDCLASS(_Geometry2D, Object);
+class Geometry2D : public Object {
+ GDCLASS(Geometry2D, Object);
- static _Geometry2D *singleton;
+ static Geometry2D *singleton;
protected:
static void _bind_methods();
public:
- static _Geometry2D *get_singleton();
+ static Geometry2D *get_singleton();
Variant segment_intersects_segment(const Vector2 &p_from_a, const Vector2 &p_to_a, const Vector2 &p_from_b, const Vector2 &p_to_b);
Variant line_intersects_line(const Vector2 &p_from_a, const Vector2 &p_dir_a, const Vector2 &p_from_b, const Vector2 &p_dir_b);
Vector<Vector2> get_closest_points_between_segments(const Vector2 &p1, const Vector2 &q1, const Vector2 &p2, const Vector2 &q2);
@@ -315,23 +308,19 @@ public:
Dictionary make_atlas(const Vector<Size2> &p_rects);
- _Geometry2D() { singleton = this; }
+ Geometry2D() { singleton = this; }
};
-VARIANT_ENUM_CAST(_Geometry2D::PolyBooleanOperation);
-VARIANT_ENUM_CAST(_Geometry2D::PolyJoinType);
-VARIANT_ENUM_CAST(_Geometry2D::PolyEndType);
+class Geometry3D : public Object {
+ GDCLASS(Geometry3D, Object);
-class _Geometry3D : public Object {
- GDCLASS(_Geometry3D, Object);
-
- static _Geometry3D *singleton;
+ static Geometry3D *singleton;
protected:
static void _bind_methods();
public:
- static _Geometry3D *get_singleton();
+ static Geometry3D *get_singleton();
Vector<Plane> build_box_planes(const Vector3 &p_extents);
Vector<Plane> build_cylinder_planes(float p_radius, float p_height, int p_sides, Vector3::Axis p_axis = Vector3::AXIS_Z);
Vector<Plane> build_capsule_planes(float p_radius, float p_height, int p_sides, int p_lats, Vector3::Axis p_axis = Vector3::AXIS_Z);
@@ -347,11 +336,11 @@ public:
Vector<Vector3> clip_polygon(const Vector<Vector3> &p_points, const Plane &p_plane);
- _Geometry3D() { singleton = this; }
+ Geometry3D() { singleton = this; }
};
-class _File : public RefCounted {
- GDCLASS(_File, RefCounted);
+class File : public RefCounted {
+ GDCLASS(File, RefCounted);
FileAccess *f = nullptr;
bool big_endian = false;
@@ -445,15 +434,12 @@ public:
uint64_t get_modified_time(const String &p_file) const;
- _File() {}
- virtual ~_File();
+ File() {}
+ virtual ~File();
};
-VARIANT_ENUM_CAST(_File::ModeFlags);
-VARIANT_ENUM_CAST(_File::CompressionMode);
-
-class _Directory : public RefCounted {
- GDCLASS(_Directory, RefCounted);
+class Directory : public RefCounted {
+ GDCLASS(Directory, RefCounted);
DirAccess *d;
bool dir_open = false;
@@ -490,24 +476,24 @@ public:
Error rename(String p_from, String p_to);
Error remove(String p_name);
- _Directory();
- virtual ~_Directory();
+ Directory();
+ virtual ~Directory();
private:
bool _list_skip_navigational = false;
bool _list_skip_hidden = false;
};
-class _Marshalls : public Object {
- GDCLASS(_Marshalls, Object);
+class Marshalls : public Object {
+ GDCLASS(Marshalls, Object);
- static _Marshalls *singleton;
+ static Marshalls *singleton;
protected:
static void _bind_methods();
public:
- static _Marshalls *get_singleton();
+ static Marshalls *get_singleton();
String variant_to_base64(const Variant &p_var, bool p_full_objects = false);
Variant base64_to_variant(const String &p_str, bool p_allow_objects = false);
@@ -518,13 +504,13 @@ public:
String utf8_to_base64(const String &p_str);
String base64_to_utf8(const String &p_str);
- _Marshalls() { singleton = this; }
- ~_Marshalls() { singleton = nullptr; }
+ Marshalls() { singleton = this; }
+ ~Marshalls() { singleton = nullptr; }
};
-class _Mutex : public RefCounted {
- GDCLASS(_Mutex, RefCounted);
- Mutex mutex;
+class Mutex : public RefCounted {
+ GDCLASS(Mutex, RefCounted);
+ ::Mutex mutex;
static void _bind_methods();
@@ -534,9 +520,9 @@ public:
void unlock();
};
-class _Semaphore : public RefCounted {
- GDCLASS(_Semaphore, RefCounted);
- Semaphore semaphore;
+class Semaphore : public RefCounted {
+ GDCLASS(Semaphore, RefCounted);
+ ::Semaphore semaphore;
static void _bind_methods();
@@ -546,16 +532,15 @@ public:
void post();
};
-class _Thread : public RefCounted {
- GDCLASS(_Thread, RefCounted);
+class Thread : public RefCounted {
+ GDCLASS(Thread, RefCounted);
protected:
Variant ret;
Variant userdata;
SafeFlag active;
- Object *target_instance = nullptr;
- StringName target_method;
- Thread thread;
+ Callable target_callable;
+ ::Thread thread;
static void _bind_methods();
static void _start_func(void *ud);
@@ -567,16 +552,16 @@ public:
PRIORITY_MAX
};
- Error start(Object *p_instance, const StringName &p_method, const Variant &p_userdata = Variant(), Priority p_priority = PRIORITY_NORMAL);
+ Error start(const Callable &p_callable, const Variant &p_userdata = Variant(), Priority p_priority = PRIORITY_NORMAL);
String get_id() const;
bool is_active() const;
Variant wait_to_finish();
};
-VARIANT_ENUM_CAST(_Thread::Priority);
+namespace special {
-class _ClassDB : public Object {
- GDCLASS(_ClassDB, Object);
+class ClassDB : public Object {
+ GDCLASS(ClassDB, Object);
protected:
static void _bind_methods();
@@ -607,21 +592,28 @@ public:
int get_integer_constant(const StringName &p_class, const StringName &p_name) const;
StringName get_category(const StringName &p_node) const;
+ bool has_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance = false) const;
+ PackedStringArray get_enum_list(const StringName &p_class, bool p_no_inheritance = false) const;
+ PackedStringArray get_enum_constants(const StringName &p_class, const StringName &p_enum, bool p_no_inheritance = false) const;
+ StringName get_integer_constant_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance = false) const;
+
bool is_class_enabled(StringName p_class) const;
- _ClassDB() {}
- ~_ClassDB() {}
+ ClassDB() {}
+ ~ClassDB() {}
};
-class _Engine : public Object {
- GDCLASS(_Engine, Object);
+} // namespace special
+
+class Engine : public Object {
+ GDCLASS(Engine, Object);
protected:
static void _bind_methods();
- static _Engine *singleton;
+ static Engine *singleton;
public:
- static _Engine *get_singleton() { return singleton; }
+ static Engine *get_singleton() { return singleton; }
void set_physics_ticks_per_second(int p_ips);
int get_physics_ticks_per_second() const;
@@ -652,8 +644,11 @@ public:
bool is_in_physics_frame() const;
- bool has_singleton(const String &p_name) const;
- Object *get_singleton_object(const String &p_name) const;
+ bool has_singleton(const StringName &p_name) const;
+ Object *get_singleton_object(const StringName &p_name) const;
+ void register_singleton(const StringName &p_name, Object *p_object);
+ void unregister_singleton(const StringName &p_name);
+ Vector<String> get_singleton_list() const;
void set_editor_hint(bool p_enabled);
bool is_editor_hint() const;
@@ -661,14 +656,14 @@ public:
void set_print_error_messages(bool p_enabled);
bool is_printing_error_messages() const;
- _Engine() { singleton = this; }
+ Engine() { singleton = this; }
};
-class _EngineDebugger : public Object {
- GDCLASS(_EngineDebugger, Object);
+class EngineDebugger : public Object {
+ GDCLASS(EngineDebugger, Object);
class ProfilerCallable {
- friend class _EngineDebugger;
+ friend class EngineDebugger;
Callable callable_toggle;
Callable callable_add;
@@ -689,10 +684,10 @@ class _EngineDebugger : public Object {
protected:
static void _bind_methods();
- static _EngineDebugger *singleton;
+ static EngineDebugger *singleton;
public:
- static _EngineDebugger *get_singleton() { return singleton; }
+ static EngineDebugger *get_singleton() { return singleton; }
bool is_active();
@@ -714,8 +709,29 @@ public:
static void call_tick(void *p_user, double p_frame_time, double p_idle_time, double p_physics_time, double p_physics_frame_time);
static Error call_capture(void *p_user, const String &p_cmd, const Array &p_data, bool &r_captured);
- _EngineDebugger() { singleton = this; }
- ~_EngineDebugger();
+ EngineDebugger() { singleton = this; }
+ ~EngineDebugger();
};
+} // namespace core_bind
+
+VARIANT_ENUM_CAST(core_bind::ResourceLoader::ThreadLoadStatus);
+VARIANT_ENUM_CAST(core_bind::ResourceLoader::CacheMode);
+
+VARIANT_ENUM_CAST(core_bind::ResourceSaver::SaverFlags);
+
+VARIANT_ENUM_CAST(core_bind::OS::VideoDriver);
+VARIANT_ENUM_CAST(core_bind::OS::Weekday);
+VARIANT_ENUM_CAST(core_bind::OS::Month);
+VARIANT_ENUM_CAST(core_bind::OS::SystemDir);
+
+VARIANT_ENUM_CAST(core_bind::Geometry2D::PolyBooleanOperation);
+VARIANT_ENUM_CAST(core_bind::Geometry2D::PolyJoinType);
+VARIANT_ENUM_CAST(core_bind::Geometry2D::PolyEndType);
+
+VARIANT_ENUM_CAST(core_bind::File::ModeFlags);
+VARIANT_ENUM_CAST(core_bind::File::CompressionMode);
+
+VARIANT_ENUM_CAST(core_bind::Thread::Priority);
+
#endif // CORE_BIND_H
diff --git a/core/core_constants.cpp b/core/core_constants.cpp
index 5791f79053..721e5ae622 100644
--- a/core/core_constants.cpp
+++ b/core/core_constants.cpp
@@ -31,6 +31,7 @@
#include "core_constants.h"
#include "core/input/input_event.h"
+#include "core/multiplayer/multiplayer.h"
#include "core/object/class_db.h"
#include "core/os/keyboard.h"
#include "core/variant/variant.h"
@@ -558,6 +559,7 @@ void register_global_constants() {
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_NODE_PATH_VALID_TYPES);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_SAVE_FILE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_INT_IS_OBJECTID);
+ BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_INT_IS_POINTER);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_ARRAY_TYPE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_MAX);
@@ -592,6 +594,7 @@ void register_global_constants() {
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_DEFERRED_SET_RESOURCE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_EDITOR_BASIC_SETTING);
+ BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_ARRAY);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_DEFAULT);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_DEFAULT_INTL);
@@ -605,8 +608,18 @@ void register_global_constants() {
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_VIRTUAL);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_FROM_SCRIPT);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_STATIC);
+ BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_OBJECT_CORE);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAGS_DEFAULT);
+ // rpc
+ BIND_CORE_ENUM_CONSTANT_CUSTOM("RPC_MODE_DISABLED", Multiplayer::RPC_MODE_DISABLED);
+ BIND_CORE_ENUM_CONSTANT_CUSTOM("RPC_MODE_ANY", Multiplayer::RPC_MODE_ANY);
+ BIND_CORE_ENUM_CONSTANT_CUSTOM("RPC_MODE_AUTH", Multiplayer::RPC_MODE_AUTHORITY);
+
+ BIND_CORE_ENUM_CONSTANT_CUSTOM("TRANSFER_MODE_UNRELIABLE", Multiplayer::TRANSFER_MODE_UNRELIABLE);
+ BIND_CORE_ENUM_CONSTANT_CUSTOM("TRANSFER_MODE_ORDERED", Multiplayer::TRANSFER_MODE_ORDERED);
+ BIND_CORE_ENUM_CONSTANT_CUSTOM("TRANSFER_MODE_RELIABLE", Multiplayer::TRANSFER_MODE_RELIABLE);
+
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_NIL", Variant::NIL);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_BOOL", Variant::BOOL);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_INT", Variant::INT);
diff --git a/core/doc_data.cpp b/core/doc_data.cpp
index 45450bf97a..4b284a30aa 100644
--- a/core/doc_data.cpp
+++ b/core/doc_data.cpp
@@ -31,7 +31,14 @@
#include "doc_data.h"
void DocData::return_doc_from_retinfo(DocData::MethodDoc &p_method, const PropertyInfo &p_retinfo) {
- if (p_retinfo.type == Variant::INT && p_retinfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
+ if (p_retinfo.type == Variant::INT && p_retinfo.hint == PROPERTY_HINT_INT_IS_POINTER) {
+ p_method.return_type = p_retinfo.hint_string;
+ if (p_method.return_type == "") {
+ p_method.return_type = "void*";
+ } else {
+ p_method.return_type += "*";
+ }
+ } else if (p_retinfo.type == Variant::INT && p_retinfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
p_method.return_enum = p_retinfo.class_name;
if (p_method.return_enum.begins_with("_")) { //proxy class
p_method.return_enum = p_method.return_enum.substr(1, p_method.return_enum.length());
@@ -55,7 +62,14 @@ void DocData::return_doc_from_retinfo(DocData::MethodDoc &p_method, const Proper
void DocData::argument_doc_from_arginfo(DocData::ArgumentDoc &p_argument, const PropertyInfo &p_arginfo) {
p_argument.name = p_arginfo.name;
- if (p_arginfo.type == Variant::INT && p_arginfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
+ if (p_arginfo.type == Variant::INT && p_arginfo.hint == PROPERTY_HINT_INT_IS_POINTER) {
+ p_argument.type = p_arginfo.hint_string;
+ if (p_argument.type == "") {
+ p_argument.type = "void*";
+ } else {
+ p_argument.type += "*";
+ }
+ } else if (p_arginfo.type == Variant::INT && p_arginfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
p_argument.enumeration = p_arginfo.class_name;
if (p_argument.enumeration.begins_with("_")) { //proxy class
p_argument.enumeration = p_argument.enumeration.substr(1, p_argument.enumeration.length());
diff --git a/core/doc_data.h b/core/doc_data.h
index a3011fe275..19dec71927 100644
--- a/core/doc_data.h
+++ b/core/doc_data.h
@@ -67,6 +67,7 @@ public:
String qualifiers;
String description;
Vector<ArgumentDoc> arguments;
+ Vector<int> errors_returned;
bool operator<(const MethodDoc &p_method) const {
if (name == p_method.name) {
// Must be a constructor since there is no overloading.
diff --git a/core/error/error_list.cpp b/core/error/error_list.cpp
index a8355065fe..e1e94dd65d 100644
--- a/core/error/error_list.cpp
+++ b/core/error/error_list.cpp
@@ -31,55 +31,55 @@
#include "error_list.h"
const char *error_names[] = {
- "No error",
- "Generic error",
- "Requested operation is unsupported/unavailable",
- "The object hasn't been set up properly",
- "Missing credentials for requested resource",
- "Parameter out of range",
- "Out of memory",
- "File not found",
- "Bad drive",
- "Bad path",
- "Permission denied",
- "Already in use",
- "Can't open file",
- "Can't write file",
- "Can't read file",
- "File unrecognized",
- "File corrupt",
- "Missing dependencies for file",
- "Unexpected eof",
- "Can't open resource/socket/file", // File too? What's the difference to ERR_FILE_CANT_OPEN
- "Can't create", // What can't be created,
- "Query failed", // What query,
- "Already in use",
- "Resource is locked",
- "Timeout",
- "Can't connect",
- "Can't resolve hostname", // I guessed it's the hostname here.
- "Connection error",
- "Can't acquire resource",
- "Can't fork",
- "Invalid data",
- "Invalid parameter",
- "Item already exists",
- "Item does not exist",
- "Can't read from database", // Comments say, it's full? Is that correct?
- "Can't write to database", // Is the database always full when this is raised?
- "Compilation failed",
- "Method not found",
- "Link failed",
- "Script failed",
- "Cyclic link detected",
- "Invalid declaration",
- "Duplicate symbol",
- "Parse error",
- "Resource is busy",
- "Skip error", // ???? What's this? String taken from the docs
- "Help error", // More specific?
- "Bug",
- "Printer on fire",
+ "OK", // OK
+ "Failed", // FAILED
+ "Unavailable", // ERR_UNAVAILABLE
+ "Unconfigured", // ERR_UNCONFIGURED
+ "Unauthorized", // ERR_UNAUTHORIZED
+ "Parameter out of range", // ERR_PARAMETER_RANGE_ERROR
+ "Out of memory", // ERR_OUT_OF_MEMORY
+ "File not found", // ERR_FILE_NOT_FOUND
+ "File: Bad drive", // ERR_FILE_BAD_DRIVE
+ "File: Bad path", // ERR_FILE_BAD_PATH
+ "File: Permission denied", // ERR_FILE_NO_PERMISSION
+ "File already in use", // ERR_FILE_ALREADY_IN_USE
+ "Can't open file", // ERR_FILE_CANT_OPEN
+ "Can't write file", // ERR_FILE_CANT_WRITE
+ "Can't read file", // ERR_FILE_CANT_READ
+ "File unrecognized", // ERR_FILE_UNRECOGNIZED
+ "File corrupt", // ERR_FILE_CORRUPT
+ "Missing dependencies for file", // ERR_FILE_MISSING_DEPENDENCIES
+ "End of file", // ERR_FILE_EOF
+ "Can't open", // ERR_CANT_OPEN
+ "Can't create", // ERR_CANT_CREATE
+ "Query failed", // ERR_QUERY_FAILED
+ "Already in use", // ERR_ALREADY_IN_USE
+ "Locked", // ERR_LOCKED
+ "Timeout", // ERR_TIMEOUT
+ "Can't connect", // ERR_CANT_CONNECT
+ "Can't resolve", // ERR_CANT_RESOLVE
+ "Connection error", // ERR_CONNECTION_ERROR
+ "Can't acquire resource", // ERR_CANT_ACQUIRE_RESOURCE
+ "Can't fork", // ERR_CANT_FORK
+ "Invalid data", // ERR_INVALID_DATA
+ "Invalid parameter", // ERR_INVALID_PARAMETER
+ "Already exists", // ERR_ALREADY_EXISTS
+ "Does not exist", // ERR_DOES_NOT_EXIST
+ "Can't read database", // ERR_DATABASE_CANT_READ
+ "Can't write database", // ERR_DATABASE_CANT_WRITE
+ "Compilation failed", // ERR_COMPILATION_FAILED
+ "Method not found", // ERR_METHOD_NOT_FOUND
+ "Link failed", // ERR_LINK_FAILED
+ "Script failed", // ERR_SCRIPT_FAILED
+ "Cyclic link detected", // ERR_CYCLIC_LINK
+ "Invalid declaration", // ERR_INVALID_DECLARATION
+ "Duplicate symbol", // ERR_DUPLICATE_SYMBOL
+ "Parse error", // ERR_PARSE_ERROR
+ "Busy", // ERR_BUSY
+ "Skip", // ERR_SKIP
+ "Help", // ERR_HELP
+ "Bug", // ERR_BUG
+ "Printer on fire", // ERR_PRINTER_ON_FIRE
};
static_assert(sizeof(error_names) / sizeof(*error_names) == ERR_MAX);
diff --git a/core/error/error_list.h b/core/error/error_list.h
index e7c7f10265..852825dda5 100644
--- a/core/error/error_list.h
+++ b/core/error/error_list.h
@@ -36,6 +36,11 @@
* values can be more detailed in the future.
*
* This is a generic error list, mainly for organizing a language of returning errors.
+ *
+ * Errors:
+ * - Are added to the Error enum in core/error/error_list.h
+ * - Have a description added to error_names in core/error/error_list.cpp
+ * - Are bound with BIND_CORE_ENUM_CONSTANT() in core/core_constants.cpp
*/
enum Error {
diff --git a/core/extension/extension_api_dump.cpp b/core/extension/extension_api_dump.cpp
index 49570cd1c1..a8547a0090 100644
--- a/core/extension/extension_api_dump.cpp
+++ b/core/extension/extension_api_dump.cpp
@@ -39,6 +39,13 @@
#ifdef TOOLS_ENABLED
static String get_type_name(const PropertyInfo &p_info) {
+ if (p_info.type == Variant::INT && (p_info.hint == PROPERTY_HINT_INT_IS_POINTER)) {
+ if (p_info.hint_string == "") {
+ return "void*";
+ } else {
+ return p_info.hint_string + "*";
+ }
+ }
if (p_info.type == Variant::INT && (p_info.usage & PROPERTY_USAGE_CLASS_IS_ENUM)) {
return String("enum::") + String(p_info.class_name);
}
@@ -653,7 +660,7 @@ Dictionary NativeExtensionAPIDump::generate_extension_api() {
ClassDB::get_method_list(class_name, &method_list, true);
for (const MethodInfo &F : method_list) {
StringName method_name = F.name;
- if (F.flags & METHOD_FLAG_VIRTUAL) {
+ if ((F.flags & METHOD_FLAG_VIRTUAL) && !(F.flags & METHOD_FLAG_OBJECT_CORE)) {
//virtual method
const MethodInfo &mi = F;
Dictionary d2;
@@ -831,6 +838,20 @@ Dictionary NativeExtensionAPIDump::generate_extension_api() {
}
}
+ {
+ Array native_structures;
+
+ {
+ Dictionary d;
+ d["name"] = "AudioFrame";
+ d["format"] = "float left,float right";
+
+ native_structures.push_back(d);
+ }
+
+ api_dump["native_structures"] = native_structures;
+ }
+
return api_dump;
}
diff --git a/core/extension/gdnative_interface.cpp b/core/extension/gdnative_interface.cpp
index e0ebd19376..ff09b0b86c 100644
--- a/core/extension/gdnative_interface.cpp
+++ b/core/extension/gdnative_interface.cpp
@@ -661,9 +661,147 @@ static const char32_t *gdnative_string_operator_index_const(const GDNativeString
return &self->ptr()[p_index];
}
+/* Packed array functions */
+
+static uint8_t *gdnative_packed_byte_array_operator_index(GDNativeTypePtr p_self, GDNativeInt p_index) {
+ PackedByteArray *self = (PackedByteArray *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return &self->ptrw()[p_index];
+}
+
+static const uint8_t *gdnative_packed_byte_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) {
+ const PackedByteArray *self = (const PackedByteArray *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return &self->ptr()[p_index];
+}
+
+static GDNativeTypePtr gdnative_packed_color_array_operator_index(GDNativeTypePtr p_self, GDNativeInt p_index) {
+ PackedColorArray *self = (PackedColorArray *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return (GDNativeTypePtr)&self->ptrw()[p_index];
+}
+
+static GDNativeTypePtr gdnative_packed_color_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) {
+ const PackedColorArray *self = (const PackedColorArray *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return (GDNativeTypePtr)&self->ptr()[p_index];
+}
+
+static float *gdnative_packed_float32_array_operator_index(GDNativeTypePtr p_self, GDNativeInt p_index) {
+ PackedFloat32Array *self = (PackedFloat32Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return &self->ptrw()[p_index];
+}
+
+static const float *gdnative_packed_float32_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) {
+ const PackedFloat32Array *self = (const PackedFloat32Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return &self->ptr()[p_index];
+}
+
+static double *gdnative_packed_float64_array_operator_index(GDNativeTypePtr p_self, GDNativeInt p_index) {
+ PackedFloat64Array *self = (PackedFloat64Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return &self->ptrw()[p_index];
+}
+
+static const double *gdnative_packed_float64_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) {
+ const PackedFloat64Array *self = (const PackedFloat64Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return &self->ptr()[p_index];
+}
+
+static int32_t *gdnative_packed_int32_array_operator_index(GDNativeTypePtr p_self, GDNativeInt p_index) {
+ PackedInt32Array *self = (PackedInt32Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return &self->ptrw()[p_index];
+}
+
+static const int32_t *gdnative_packed_int32_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) {
+ const PackedInt32Array *self = (const PackedInt32Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return &self->ptr()[p_index];
+}
+
+static int64_t *gdnative_packed_int64_array_operator_index(GDNativeTypePtr p_self, GDNativeInt p_index) {
+ PackedInt64Array *self = (PackedInt64Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return &self->ptrw()[p_index];
+}
+
+static const int64_t *gdnative_packed_int64_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) {
+ const PackedInt64Array *self = (const PackedInt64Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return &self->ptr()[p_index];
+}
+
+static GDNativeStringPtr gdnative_packed_string_array_operator_index(GDNativeTypePtr p_self, GDNativeInt p_index) {
+ PackedStringArray *self = (PackedStringArray *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return (GDNativeStringPtr)&self->ptrw()[p_index];
+}
+
+static GDNativeStringPtr gdnative_packed_string_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) {
+ const PackedStringArray *self = (const PackedStringArray *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return (GDNativeStringPtr)&self->ptr()[p_index];
+}
+
+static GDNativeTypePtr gdnative_packed_vector2_array_operator_index(GDNativeTypePtr p_self, GDNativeInt p_index) {
+ PackedVector2Array *self = (PackedVector2Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return (GDNativeTypePtr)&self->ptrw()[p_index];
+}
+
+static GDNativeTypePtr gdnative_packed_vector2_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) {
+ const PackedVector2Array *self = (const PackedVector2Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return (GDNativeTypePtr)&self->ptr()[p_index];
+}
+
+static GDNativeTypePtr gdnative_packed_vector3_array_operator_index(GDNativeTypePtr p_self, GDNativeInt p_index) {
+ PackedVector3Array *self = (PackedVector3Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return (GDNativeTypePtr)&self->ptrw()[p_index];
+}
+
+static GDNativeTypePtr gdnative_packed_vector3_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) {
+ const PackedVector3Array *self = (const PackedVector3Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return (GDNativeTypePtr)&self->ptr()[p_index];
+}
+
+static GDNativeVariantPtr gdnative_array_operator_index(GDNativeTypePtr p_self, GDNativeInt p_index) {
+ Array *self = (Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return (GDNativeTypePtr)&self[p_index];
+}
+
+static GDNativeVariantPtr gdnative_array_operator_index_const(const GDNativeTypePtr p_self, GDNativeInt p_index) {
+ const Array *self = (const Array *)p_self;
+ ERR_FAIL_INDEX_V(p_index, self->size(), nullptr);
+ return (GDNativeTypePtr)&self[p_index];
+}
+
/* OBJECT API */
-static void gdnative_object_method_bind_ptrcall(GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr p_ret) {
+static void gdnative_object_method_bind_call(const GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, const GDNativeVariantPtr *p_args, GDNativeInt p_arg_count, GDNativeVariantPtr r_return, GDNativeCallError *r_error) {
+ MethodBind *mb = (MethodBind *)p_method_bind;
+ Object *o = (Object *)p_instance;
+ const Variant **args = (const Variant **)p_args;
+ Callable::CallError error;
+
+ Variant ret = mb->call(o, args, p_arg_count, error);
+ memnew_placement(r_return, Variant(ret));
+
+ if (r_error) {
+ r_error->error = (GDNativeCallErrorType)(error.error);
+ r_error->argument = error.argument;
+ r_error->expected = error.expected;
+ }
+}
+
+static void gdnative_object_method_bind_ptrcall(const GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr p_ret) {
MethodBind *mb = (MethodBind *)p_method_bind;
Object *o = (Object *)p_instance;
mb->ptrcall(o, (const void **)p_args, p_ret);
@@ -716,14 +854,21 @@ static GDNativeMethodBindPtr gdnative_classdb_get_method_bind(const char *p_clas
return (GDNativeMethodBindPtr)mb;
}
-static GDNativeClassConstructor gdnative_classdb_get_constructor(const char *p_classname) {
+static GDNativeClassConstructor gdnative_classdb_get_constructor(const char *p_classname, GDNativeExtensionPtr *r_extension) {
ClassDB::ClassInfo *class_info = ClassDB::classes.getptr(StringName(p_classname));
if (class_info) {
+ if (r_extension) {
+ *r_extension = class_info->native_extension;
+ }
return (GDNativeClassConstructor)class_info->creation_func;
}
return nullptr;
}
+static GDNativeObjectPtr gdnative_classdb_construct_object(GDNativeClassConstructor p_constructor, GDNativeExtensionPtr p_extension) {
+ return (GDNativeObjectPtr)ClassDB::construct_object((Object * (*)()) p_constructor, (ObjectNativeExtension *)p_extension);
+}
+
static void *gdnative_classdb_get_class_tag(const char *p_classname) {
ClassDB::ClassInfo *class_info = ClassDB::classes.getptr(p_classname);
return class_info ? class_info->class_ptr : nullptr;
@@ -827,8 +972,38 @@ void gdnative_setup_interface(GDNativeInterface *p_interface) {
gdni.string_operator_index = gdnative_string_operator_index;
gdni.string_operator_index_const = gdnative_string_operator_index_const;
+ /* Packed array functions */
+
+ gdni.packed_byte_array_operator_index = gdnative_packed_byte_array_operator_index;
+ gdni.packed_byte_array_operator_index_const = gdnative_packed_byte_array_operator_index_const;
+
+ gdni.packed_color_array_operator_index = gdnative_packed_color_array_operator_index;
+ gdni.packed_color_array_operator_index_const = gdnative_packed_color_array_operator_index_const;
+
+ gdni.packed_float32_array_operator_index = gdnative_packed_float32_array_operator_index;
+ gdni.packed_float32_array_operator_index_const = gdnative_packed_float32_array_operator_index_const;
+ gdni.packed_float64_array_operator_index = gdnative_packed_float64_array_operator_index;
+ gdni.packed_float64_array_operator_index_const = gdnative_packed_float64_array_operator_index_const;
+
+ gdni.packed_int32_array_operator_index = gdnative_packed_int32_array_operator_index;
+ gdni.packed_int32_array_operator_index_const = gdnative_packed_int32_array_operator_index_const;
+ gdni.packed_int64_array_operator_index = gdnative_packed_int64_array_operator_index;
+ gdni.packed_int64_array_operator_index_const = gdnative_packed_int64_array_operator_index_const;
+
+ gdni.packed_string_array_operator_index = gdnative_packed_string_array_operator_index;
+ gdni.packed_string_array_operator_index_const = gdnative_packed_string_array_operator_index_const;
+
+ gdni.packed_vector2_array_operator_index = gdnative_packed_vector2_array_operator_index;
+ gdni.packed_vector2_array_operator_index_const = gdnative_packed_vector2_array_operator_index_const;
+ gdni.packed_vector3_array_operator_index = gdnative_packed_vector3_array_operator_index;
+ gdni.packed_vector3_array_operator_index_const = gdnative_packed_vector3_array_operator_index_const;
+
+ gdni.array_operator_index = gdnative_array_operator_index;
+ gdni.array_operator_index_const = gdnative_array_operator_index_const;
+
/* OBJECT */
+ gdni.object_method_bind_call = gdnative_object_method_bind_call;
gdni.object_method_bind_ptrcall = gdnative_object_method_bind_ptrcall;
gdni.object_destroy = gdnative_object_destroy;
gdni.global_get_singleton = gdnative_global_get_singleton;
@@ -842,6 +1017,7 @@ void gdnative_setup_interface(GDNativeInterface *p_interface) {
/* CLASSDB */
gdni.classdb_get_constructor = gdnative_classdb_get_constructor;
+ gdni.classdb_construct_object = gdnative_classdb_construct_object;
gdni.classdb_get_method_bind = gdnative_classdb_get_method_bind;
gdni.classdb_get_class_tag = gdnative_classdb_get_class_tag;
@@ -852,6 +1028,8 @@ void gdnative_setup_interface(GDNativeInterface *p_interface) {
gdni.classdb_register_extension_class_method = nullptr;
gdni.classdb_register_extension_class_integer_constant = nullptr;
gdni.classdb_register_extension_class_property = nullptr;
+ gdni.classdb_register_extension_class_property_group = nullptr;
+ gdni.classdb_register_extension_class_property_subgroup = nullptr;
gdni.classdb_register_extension_class_signal = nullptr;
gdni.classdb_unregister_extension_class = nullptr;
}
diff --git a/core/extension/gdnative_interface.h b/core/extension/gdnative_interface.h
index 3432d8fabe..73f78bde54 100644
--- a/core/extension/gdnative_interface.h
+++ b/core/extension/gdnative_interface.h
@@ -137,6 +137,7 @@ typedef void *GDNativeStringNamePtr;
typedef void *GDNativeStringPtr;
typedef void *GDNativeObjectPtr;
typedef void *GDNativeTypePtr;
+typedef void *GDNativeExtensionPtr;
typedef void *GDNativeMethodBindPtr;
typedef int64_t GDNativeInt;
typedef uint8_t GDNativeBool;
@@ -387,9 +388,39 @@ typedef struct {
char32_t *(*string_operator_index)(GDNativeStringPtr p_self, GDNativeInt p_index);
const char32_t *(*string_operator_index_const)(const GDNativeStringPtr p_self, GDNativeInt p_index);
+ /* Packed array functions */
+
+ uint8_t *(*packed_byte_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedByteArray
+ const uint8_t *(*packed_byte_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedByteArray
+
+ GDNativeTypePtr (*packed_color_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedColorArray, returns Color ptr
+ GDNativeTypePtr (*packed_color_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedColorArray, returns Color ptr
+
+ float *(*packed_float32_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedFloat32Array
+ const float *(*packed_float32_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedFloat32Array
+ double *(*packed_float64_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedFloat64Array
+ const double *(*packed_float64_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedFloat64Array
+
+ int32_t *(*packed_int32_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedInt32Array
+ const int32_t *(*packed_int32_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedInt32Array
+ int64_t *(*packed_int64_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedInt32Array
+ const int64_t *(*packed_int64_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedInt32Array
+
+ GDNativeStringPtr (*packed_string_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedStringArray
+ GDNativeStringPtr (*packed_string_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedStringArray
+
+ GDNativeTypePtr (*packed_vector2_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedVector2Array, returns Vector2 ptr
+ GDNativeTypePtr (*packed_vector2_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedVector2Array, returns Vector2 ptr
+ GDNativeTypePtr (*packed_vector3_array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedVector3Array, returns Vector3 ptr
+ GDNativeTypePtr (*packed_vector3_array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be a PackedVector3Array, returns Vector3 ptr
+
+ GDNativeVariantPtr (*array_operator_index)(GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be an Array ptr
+ GDNativeVariantPtr (*array_operator_index_const)(const GDNativeTypePtr p_self, GDNativeInt p_index); // p_self should be an Array ptr
+
/* OBJECT */
- void (*object_method_bind_ptrcall)(GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr r_ret);
+ void (*object_method_bind_call)(const GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, const GDNativeVariantPtr *p_args, GDNativeInt p_arg_count, GDNativeVariantPtr r_ret, GDNativeCallError *r_error);
+ void (*object_method_bind_ptrcall)(const GDNativeMethodBindPtr p_method_bind, GDNativeObjectPtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr r_ret);
void (*object_destroy)(GDNativeObjectPtr p_o);
GDNativeObjectPtr (*global_get_singleton)(const char *p_name);
void *(*object_get_instance_binding)(GDNativeObjectPtr p_o, void *p_token, const GDNativeInstanceBindingCallbacks *p_callbacks);
@@ -401,7 +432,8 @@ typedef struct {
/* CLASSDB */
- GDNativeClassConstructor (*classdb_get_constructor)(const char *p_classname);
+ GDNativeClassConstructor (*classdb_get_constructor)(const char *p_classname, GDNativeExtensionPtr *r_extension);
+ GDNativeObjectPtr (*classdb_construct_object)(GDNativeClassConstructor p_constructor, GDNativeExtensionPtr p_extension);
GDNativeMethodBindPtr (*classdb_get_method_bind)(const char *p_classname, const char *p_methodname, GDNativeInt p_hash);
void *(*classdb_get_class_tag)(const char *p_classname);
@@ -409,8 +441,10 @@ typedef struct {
void (*classdb_register_extension_class)(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_parent_class_name, const GDNativeExtensionClassCreationInfo *p_extension_funcs);
void (*classdb_register_extension_class_method)(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const GDNativeExtensionClassMethodInfo *p_method_info);
- void (*classdb_register_extension_class_integer_constant)(const GDNativeExtensionClassLibraryPtr p_library, const char *p_enum_name, const char *p_class_name, const char *p_constant_name, uint32_t p_constant_value);
+ void (*classdb_register_extension_class_integer_constant)(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_enum_name, const char *p_constant_name, GDNativeInt p_constant_value);
void (*classdb_register_extension_class_property)(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const GDNativePropertyInfo *p_info, const char *p_setter, const char *p_getter);
+ void (*classdb_register_extension_class_property_group)(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_group_name, const char *p_prefix);
+ void (*classdb_register_extension_class_property_subgroup)(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_subgroup_name, const char *p_prefix);
void (*classdb_register_extension_class_signal)(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_signal_name, const GDNativePropertyInfo *p_argument_info, GDNativeInt p_argument_count);
void (*classdb_unregister_extension_class)(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name); /* Unregistering a parent class before a class that inherits it will result in failure. Inheritors must be unregistered first. */
} GDNativeInterface;
@@ -422,6 +456,8 @@ typedef enum {
GDNATIVE_INITIALIZATION_SERVERS,
GDNATIVE_INITIALIZATION_SCENE,
GDNATIVE_INITIALIZATION_EDITOR,
+ GDNATIVE_INITIALIZATION_DRIVER,
+ GDNATIVE_MAX_INITIALIZATION_LEVEL,
} GDNativeInitializationLevel;
typedef struct {
diff --git a/core/extension/native_extension.cpp b/core/extension/native_extension.cpp
index 91d304627a..635e53fa9c 100644
--- a/core/extension/native_extension.cpp
+++ b/core/extension/native_extension.cpp
@@ -35,6 +35,8 @@
#include "core/object/method_bind.h"
#include "core/os/os.h"
+const char *NativeExtension::EXTENSION_LIST_CONFIG_FILE = "res://.godot/extension_list.cfg";
+
class NativeExtensionMethodBind : public MethodBind {
GDNativeExtensionClassMethodCall call_func;
GDNativeExtensionClassMethodPtrCall ptrcall_func;
@@ -69,7 +71,7 @@ public:
virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) {
Variant ret;
GDExtensionClassInstancePtr extension_instance = p_object->_get_extension_instance();
- GDNativeCallError ce;
+ GDNativeCallError ce{ GDNATIVE_CALL_OK, 0, 0 };
call_func(method_userdata, extension_instance, (const GDNativeVariantPtr *)p_args, p_arg_count, (GDNativeVariantPtr)&ret, &ce);
r_error.error = Callable::CallError::Error(ce.error);
r_error.argument = ce.argument;
@@ -154,6 +156,7 @@ void NativeExtension::_register_extension_class(const GDNativeExtensionClassLibr
extension->native_extension.create_instance = p_extension_funcs->create_instance_func;
extension->native_extension.set_object_instance = p_extension_funcs->object_instance_func;
extension->native_extension.free_instance = p_extension_funcs->free_instance_func;
+ extension->native_extension.get_virtual = p_extension_funcs->get_virtual_func;
ClassDB::register_extension_class(&extension->native_extension);
}
@@ -171,7 +174,7 @@ void NativeExtension::_register_extension_class_method(const GDNativeExtensionCl
ClassDB::bind_method_custom(class_name, method);
}
-void NativeExtension::_register_extension_class_integer_constant(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_enum_name, const char *p_constant_name, uint32_t p_constant_value) {
+void NativeExtension::_register_extension_class_integer_constant(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_enum_name, const char *p_constant_name, GDNativeInt p_constant_value) {
NativeExtension *self = (NativeExtension *)p_library;
StringName class_name = p_class_name;
@@ -181,6 +184,7 @@ void NativeExtension::_register_extension_class_integer_constant(const GDNativeE
ClassDB::bind_integer_constant(class_name, p_enum_name, p_constant_name, p_constant_value);
}
+
void NativeExtension::_register_extension_class_property(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const GDNativePropertyInfo *p_info, const char *p_setter, const char *p_getter) {
NativeExtension *self = (NativeExtension *)p_library;
@@ -199,6 +203,24 @@ void NativeExtension::_register_extension_class_property(const GDNativeExtension
ClassDB::add_property(class_name, pinfo, p_setter, p_getter);
}
+void NativeExtension::_register_extension_class_property_group(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_group_name, const char *p_prefix) {
+ NativeExtension *self = (NativeExtension *)p_library;
+
+ StringName class_name = p_class_name;
+ ERR_FAIL_COND_MSG(!self->extension_classes.has(class_name), "Attempt to register extension class property group '" + String(p_group_name) + "' for unexisting class '" + class_name + "'.");
+
+ ClassDB::add_property_group(class_name, p_group_name, p_prefix);
+}
+
+void NativeExtension::_register_extension_class_property_subgroup(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_subgroup_name, const char *p_prefix) {
+ NativeExtension *self = (NativeExtension *)p_library;
+
+ StringName class_name = p_class_name;
+ ERR_FAIL_COND_MSG(!self->extension_classes.has(class_name), "Attempt to register extension class property subgroup '" + String(p_subgroup_name) + "' for unexisting class '" + class_name + "'.");
+
+ ClassDB::add_property_subgroup(class_name, p_subgroup_name, p_prefix);
+}
+
void NativeExtension::_register_extension_class_signal(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_signal_name, const GDNativePropertyInfo *p_argument_info, GDNativeInt p_argument_count) {
NativeExtension *self = (NativeExtension *)p_library;
@@ -322,6 +344,8 @@ void NativeExtension::initialize_native_extensions() {
gdnative_interface.classdb_register_extension_class_method = _register_extension_class_method;
gdnative_interface.classdb_register_extension_class_integer_constant = _register_extension_class_integer_constant;
gdnative_interface.classdb_register_extension_class_property = _register_extension_class_property;
+ gdnative_interface.classdb_register_extension_class_property_group = _register_extension_class_property_group;
+ gdnative_interface.classdb_register_extension_class_property_subgroup = _register_extension_class_property_subgroup;
gdnative_interface.classdb_register_extension_class_signal = _register_extension_class_signal;
gdnative_interface.classdb_unregister_extension_class = _unregister_extension_class;
}
diff --git a/core/extension/native_extension.h b/core/extension/native_extension.h
index 8bd95b2867..52e869ad4d 100644
--- a/core/extension/native_extension.h
+++ b/core/extension/native_extension.h
@@ -48,8 +48,10 @@ class NativeExtension : public Resource {
static void _register_extension_class(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_parent_class_name, const GDNativeExtensionClassCreationInfo *p_extension_funcs);
static void _register_extension_class_method(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const GDNativeExtensionClassMethodInfo *p_method_info);
- static void _register_extension_class_integer_constant(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_enum_name, const char *p_constant_name, uint32_t p_constant_value);
+ static void _register_extension_class_integer_constant(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_enum_name, const char *p_constant_name, GDNativeInt p_constant_value);
static void _register_extension_class_property(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const GDNativePropertyInfo *p_info, const char *p_setter, const char *p_getter);
+ static void _register_extension_class_property_group(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_group_name, const char *p_prefix);
+ static void _register_extension_class_property_subgroup(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_subgroup_name, const char *p_prefix);
static void _register_extension_class_signal(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name, const char *p_signal_name, const GDNativePropertyInfo *p_argument_info, GDNativeInt p_argument_count);
static void _unregister_extension_class(const GDNativeExtensionClassLibraryPtr p_library, const char *p_class_name);
@@ -60,6 +62,8 @@ protected:
static void _bind_methods();
public:
+ static const char *EXTENSION_LIST_CONFIG_FILE;
+
Error open_library(const String &p_path, const String &p_entry_symbol);
void close_library();
@@ -68,6 +72,7 @@ public:
INITIALIZATION_LEVEL_SERVERS,
INITIALIZATION_LEVEL_SCENE,
INITIALIZATION_LEVEL_EDITOR,
+ INITIALIZATION_LEVEL_DRIVER,
};
bool is_library_open() const;
diff --git a/core/extension/native_extension_manager.cpp b/core/extension/native_extension_manager.cpp
index 7be2593845..8b7a9df4f1 100644
--- a/core/extension/native_extension_manager.cpp
+++ b/core/extension/native_extension_manager.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "native_extension_manager.h"
+#include "core/io/file_access.h"
NativeExtensionManager::LoadStatus NativeExtensionManager::load_extension(const String &p_path) {
if (native_extension_map.has(p_path)) {
@@ -76,6 +77,11 @@ NativeExtensionManager::LoadStatus NativeExtensionManager::unload_extension(cons
native_extension_map.erase(p_path);
return LOAD_STATUS_OK;
}
+
+bool NativeExtensionManager::is_extension_loaded(const String &p_path) const {
+ return native_extension_map.has(p_path);
+}
+
Vector<String> NativeExtensionManager::get_loaded_extensions() const {
Vector<String> ret;
for (const Map<String, Ref<NativeExtension>>::Element *E = native_extension_map.front(); E; E = E->next()) {
@@ -105,6 +111,17 @@ void NativeExtensionManager::deinitialize_extensions(NativeExtension::Initializa
level = int32_t(p_level) - 1;
}
+void NativeExtensionManager::load_extensions() {
+ FileAccessRef f = FileAccess::open(NativeExtension::EXTENSION_LIST_CONFIG_FILE, FileAccess::READ);
+ while (f && !f->eof_reached()) {
+ String s = f->get_line().strip_edges();
+ if (s != String()) {
+ LoadStatus err = load_extension(s);
+ ERR_CONTINUE_MSG(err == LOAD_STATUS_FAILED, "Error loading extension: " + s);
+ }
+ }
+}
+
NativeExtensionManager *NativeExtensionManager::get_singleton() {
return singleton;
}
@@ -112,6 +129,8 @@ void NativeExtensionManager::_bind_methods() {
ClassDB::bind_method(D_METHOD("load_extension", "path"), &NativeExtensionManager::load_extension);
ClassDB::bind_method(D_METHOD("reload_extension", "path"), &NativeExtensionManager::reload_extension);
ClassDB::bind_method(D_METHOD("unload_extension", "path"), &NativeExtensionManager::unload_extension);
+ ClassDB::bind_method(D_METHOD("is_extension_loaded", "path"), &NativeExtensionManager::is_extension_loaded);
+
ClassDB::bind_method(D_METHOD("get_loaded_extensions"), &NativeExtensionManager::get_loaded_extensions);
ClassDB::bind_method(D_METHOD("get_extension", "path"), &NativeExtensionManager::get_extension);
diff --git a/core/extension/native_extension_manager.h b/core/extension/native_extension_manager.h
index 78465bd5cf..89ccd155fe 100644
--- a/core/extension/native_extension_manager.h
+++ b/core/extension/native_extension_manager.h
@@ -55,6 +55,7 @@ public:
LoadStatus load_extension(const String &p_path);
LoadStatus reload_extension(const String &p_path);
LoadStatus unload_extension(const String &p_path);
+ bool is_extension_loaded(const String &p_path) const;
Vector<String> get_loaded_extensions() const;
Ref<NativeExtension> get_extension(const String &p_path);
@@ -63,6 +64,8 @@ public:
static NativeExtensionManager *get_singleton();
+ void load_extensions();
+
NativeExtensionManager();
};
diff --git a/core/input/input.cpp b/core/input/input.cpp
index 72563cc40a..9195f7d8b5 100644
--- a/core/input/input.cpp
+++ b/core/input/input.cpp
@@ -240,18 +240,12 @@ bool Input::is_joy_button_pressed(int p_device, JoyButton p_button) const {
}
bool Input::is_action_pressed(const StringName &p_action, bool p_exact) const {
-#ifdef DEBUG_ENABLED
- bool has_action = InputMap::get_singleton()->has_action(p_action);
- ERR_FAIL_COND_V_MSG(!has_action, false, "Request for nonexistent InputMap action '" + String(p_action) + "'.");
-#endif
+ ERR_FAIL_COND_V_MSG(!InputMap::get_singleton()->has_action(p_action), false, InputMap::get_singleton()->suggest_actions(p_action));
return action_state.has(p_action) && action_state[p_action].pressed && (p_exact ? action_state[p_action].exact : true);
}
bool Input::is_action_just_pressed(const StringName &p_action, bool p_exact) const {
-#ifdef DEBUG_ENABLED
- bool has_action = InputMap::get_singleton()->has_action(p_action);
- ERR_FAIL_COND_V_MSG(!has_action, false, "Request for nonexistent InputMap action '" + String(p_action) + "'.");
-#endif
+ ERR_FAIL_COND_V_MSG(!InputMap::get_singleton()->has_action(p_action), false, InputMap::get_singleton()->suggest_actions(p_action));
const Map<StringName, Action>::Element *E = action_state.find(p_action);
if (!E) {
return false;
@@ -269,10 +263,7 @@ bool Input::is_action_just_pressed(const StringName &p_action, bool p_exact) con
}
bool Input::is_action_just_released(const StringName &p_action, bool p_exact) const {
-#ifdef DEBUG_ENABLED
- bool has_action = InputMap::get_singleton()->has_action(p_action);
- ERR_FAIL_COND_V_MSG(!has_action, false, "Request for nonexistent InputMap action '" + String(p_action) + "'.");
-#endif
+ ERR_FAIL_COND_V_MSG(!InputMap::get_singleton()->has_action(p_action), false, InputMap::get_singleton()->suggest_actions(p_action));
const Map<StringName, Action>::Element *E = action_state.find(p_action);
if (!E) {
return false;
@@ -290,10 +281,7 @@ bool Input::is_action_just_released(const StringName &p_action, bool p_exact) co
}
float Input::get_action_strength(const StringName &p_action, bool p_exact) const {
-#ifdef DEBUG_ENABLED
- bool has_action = InputMap::get_singleton()->has_action(p_action);
- ERR_FAIL_COND_V_MSG(!has_action, false, "Request for nonexistent InputMap action '" + String(p_action) + "'.");
-#endif
+ ERR_FAIL_COND_V_MSG(!InputMap::get_singleton()->has_action(p_action), 0.0, InputMap::get_singleton()->suggest_actions(p_action));
const Map<StringName, Action>::Element *E = action_state.find(p_action);
if (!E) {
return 0.0f;
diff --git a/core/input/input_event.cpp b/core/input/input_event.cpp
index 325cdf2127..1d2b5f19ee 100644
--- a/core/input/input_event.cpp
+++ b/core/input/input_event.cpp
@@ -31,8 +31,8 @@
#include "input_event.h"
#include "core/input/input_map.h"
+#include "core/input/shortcut.h"
#include "core/os/keyboard.h"
-#include "scene/gui/shortcut.h"
const int InputEvent::DEVICE_ID_TOUCH_MOUSE = -1;
const int InputEvent::DEVICE_ID_INTERNAL = -2;
@@ -864,6 +864,8 @@ void InputEventMouseMotion::_bind_methods() {
///////////////////////////////////
void InputEventJoypadMotion::set_axis(JoyAxis p_axis) {
+ ERR_FAIL_INDEX(p_axis, JOY_AXIS_MAX);
+
axis = p_axis;
emit_changed();
}
@@ -1545,14 +1547,25 @@ Ref<Shortcut> InputEventShortcut::get_shortcut() {
return shortcut;
}
+void InputEventShortcut::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_shortcut", "shortcut"), &InputEventShortcut::set_shortcut);
+ ClassDB::bind_method(D_METHOD("get_shortcut"), &InputEventShortcut::get_shortcut);
+
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shortcut", PROPERTY_HINT_RESOURCE_TYPE, "Shortcut"), "set_shortcut", "get_shortcut");
+}
+
bool InputEventShortcut::is_pressed() const {
return true;
}
String InputEventShortcut::as_text() const {
+ ERR_FAIL_COND_V(shortcut.is_null(), "None");
+
return vformat(RTR("Input Event with Shortcut=%s"), shortcut->get_as_text());
}
String InputEventShortcut::to_string() {
+ ERR_FAIL_COND_V(shortcut.is_null(), "None");
+
return vformat("InputEventShortcut: shortcut=%s", shortcut->get_as_text());
}
diff --git a/core/input/input_event.h b/core/input/input_event.h
index 517d63eb40..3fc8078a09 100644
--- a/core/input/input_event.h
+++ b/core/input/input_event.h
@@ -548,6 +548,9 @@ class InputEventShortcut : public InputEvent {
Ref<Shortcut> shortcut;
+protected:
+ static void _bind_methods();
+
public:
void set_shortcut(Ref<Shortcut> p_shortcut);
Ref<Shortcut> get_shortcut();
diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp
index 83ec70757e..1ec4299093 100644
--- a/core/input/input_map.cpp
+++ b/core/input/input_map.cpp
@@ -33,6 +33,7 @@
#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "core/os/keyboard.h"
+#include "core/os/os.h"
InputMap *InputMap::singleton = nullptr;
@@ -59,7 +60,7 @@ void InputMap::_bind_methods() {
* Returns an nonexistent action error message with a suggestion of the closest
* matching action name (if possible).
*/
-String InputMap::_suggest_actions(const StringName &p_action) const {
+String InputMap::suggest_actions(const StringName &p_action) const {
List<StringName> actions = get_actions();
StringName closest_action;
float closest_similarity = 0.0;
@@ -93,7 +94,7 @@ void InputMap::add_action(const StringName &p_action, float p_deadzone) {
}
void InputMap::erase_action(const StringName &p_action) {
- ERR_FAIL_COND_MSG(!input_map.has(p_action), _suggest_actions(p_action));
+ ERR_FAIL_COND_MSG(!input_map.has(p_action), suggest_actions(p_action));
input_map.erase(p_action);
}
@@ -147,20 +148,20 @@ bool InputMap::has_action(const StringName &p_action) const {
}
float InputMap::action_get_deadzone(const StringName &p_action) {
- ERR_FAIL_COND_V_MSG(!input_map.has(p_action), 0.0f, _suggest_actions(p_action));
+ ERR_FAIL_COND_V_MSG(!input_map.has(p_action), 0.0f, suggest_actions(p_action));
return input_map[p_action].deadzone;
}
void InputMap::action_set_deadzone(const StringName &p_action, float p_deadzone) {
- ERR_FAIL_COND_MSG(!input_map.has(p_action), _suggest_actions(p_action));
+ ERR_FAIL_COND_MSG(!input_map.has(p_action), suggest_actions(p_action));
input_map[p_action].deadzone = p_deadzone;
}
void InputMap::action_add_event(const StringName &p_action, const Ref<InputEvent> &p_event) {
ERR_FAIL_COND_MSG(p_event.is_null(), "It's not a reference to a valid InputEvent object.");
- ERR_FAIL_COND_MSG(!input_map.has(p_action), _suggest_actions(p_action));
+ ERR_FAIL_COND_MSG(!input_map.has(p_action), suggest_actions(p_action));
if (_find_event(input_map[p_action], p_event, true)) {
return; // Already added.
}
@@ -169,12 +170,12 @@ void InputMap::action_add_event(const StringName &p_action, const Ref<InputEvent
}
bool InputMap::action_has_event(const StringName &p_action, const Ref<InputEvent> &p_event) {
- ERR_FAIL_COND_V_MSG(!input_map.has(p_action), false, _suggest_actions(p_action));
+ ERR_FAIL_COND_V_MSG(!input_map.has(p_action), false, suggest_actions(p_action));
return (_find_event(input_map[p_action], p_event, true) != nullptr);
}
void InputMap::action_erase_event(const StringName &p_action, const Ref<InputEvent> &p_event) {
- ERR_FAIL_COND_MSG(!input_map.has(p_action), _suggest_actions(p_action));
+ ERR_FAIL_COND_MSG(!input_map.has(p_action), suggest_actions(p_action));
List<Ref<InputEvent>>::Element *E = _find_event(input_map[p_action], p_event, true);
if (E) {
@@ -186,7 +187,7 @@ void InputMap::action_erase_event(const StringName &p_action, const Ref<InputEve
}
void InputMap::action_erase_events(const StringName &p_action) {
- ERR_FAIL_COND_MSG(!input_map.has(p_action), _suggest_actions(p_action));
+ ERR_FAIL_COND_MSG(!input_map.has(p_action), suggest_actions(p_action));
input_map[p_action].inputs.clear();
}
@@ -218,7 +219,7 @@ bool InputMap::event_is_action(const Ref<InputEvent> &p_event, const StringName
bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const StringName &p_action, bool p_exact_match, bool *p_pressed, float *p_strength, float *p_raw_strength) const {
OrderedHashMap<StringName, Action>::Element E = input_map.find(p_action);
- ERR_FAIL_COND_V_MSG(!E, false, _suggest_actions(p_action));
+ ERR_FAIL_COND_V_MSG(!E, false, suggest_actions(p_action));
Ref<InputEventAction> input_event_action = p_event;
if (input_event_action.is_valid()) {
@@ -317,36 +318,36 @@ static const _BuiltinActionDisplayName _builtin_action_display_names[] = {
{ "ui_text_dedent", TTRC("Dedent") },
{ "ui_text_backspace", TTRC("Backspace") },
{ "ui_text_backspace_word", TTRC("Backspace Word") },
- { "ui_text_backspace_word.OSX", TTRC("Backspace Word") },
+ { "ui_text_backspace_word.macos", TTRC("Backspace Word") },
{ "ui_text_backspace_all_to_left", TTRC("Backspace all to Left") },
- { "ui_text_backspace_all_to_left.OSX", TTRC("Backspace all to Left") },
+ { "ui_text_backspace_all_to_left.macos", TTRC("Backspace all to Left") },
{ "ui_text_delete", TTRC("Delete") },
{ "ui_text_delete_word", TTRC("Delete Word") },
- { "ui_text_delete_word.OSX", TTRC("Delete Word") },
+ { "ui_text_delete_word.macos", TTRC("Delete Word") },
{ "ui_text_delete_all_to_right", TTRC("Delete all to Right") },
- { "ui_text_delete_all_to_right.OSX", TTRC("Delete all to Right") },
+ { "ui_text_delete_all_to_right.macos", TTRC("Delete all to Right") },
{ "ui_text_caret_left", TTRC("Caret Left") },
{ "ui_text_caret_word_left", TTRC("Caret Word Left") },
- { "ui_text_caret_word_left.OSX", TTRC("Caret Word Left") },
+ { "ui_text_caret_word_left.macos", TTRC("Caret Word Left") },
{ "ui_text_caret_right", TTRC("Caret Right") },
{ "ui_text_caret_word_right", TTRC("Caret Word Right") },
- { "ui_text_caret_word_right.OSX", TTRC("Caret Word Right") },
+ { "ui_text_caret_word_right.macos", TTRC("Caret Word Right") },
{ "ui_text_caret_up", TTRC("Caret Up") },
{ "ui_text_caret_down", TTRC("Caret Down") },
{ "ui_text_caret_line_start", TTRC("Caret Line Start") },
- { "ui_text_caret_line_start.OSX", TTRC("Caret Line Start") },
+ { "ui_text_caret_line_start.macos", TTRC("Caret Line Start") },
{ "ui_text_caret_line_end", TTRC("Caret Line End") },
- { "ui_text_caret_line_end.OSX", TTRC("Caret Line End") },
+ { "ui_text_caret_line_end.macos", TTRC("Caret Line End") },
{ "ui_text_caret_page_up", TTRC("Caret Page Up") },
{ "ui_text_caret_page_down", TTRC("Caret Page Down") },
{ "ui_text_caret_document_start", TTRC("Caret Document Start") },
- { "ui_text_caret_document_start.OSX", TTRC("Caret Document Start") },
+ { "ui_text_caret_document_start.macos", TTRC("Caret Document Start") },
{ "ui_text_caret_document_end", TTRC("Caret Document End") },
- { "ui_text_caret_document_end.OSX", TTRC("Caret Document End") },
+ { "ui_text_caret_document_end.macos", TTRC("Caret Document End") },
{ "ui_text_scroll_up", TTRC("Scroll Up") },
- { "ui_text_scroll_up.OSX", TTRC("Scroll Up") },
+ { "ui_text_scroll_up.macos", TTRC("Scroll Up") },
{ "ui_text_scroll_down", TTRC("Scroll Down") },
- { "ui_text_scroll_down.OSX", TTRC("Scroll Down") },
+ { "ui_text_scroll_down.macos", TTRC("Scroll Down") },
{ "ui_text_select_all", TTRC("Select All") },
{ "ui_text_select_word_under_caret", TTRC("Select Word Under Caret") },
{ "ui_text_toggle_insert_mode", TTRC("Toggle Insert Mode") },
@@ -466,7 +467,7 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
// ///// UI Text Input Shortcuts /////
inputs = List<Ref<InputEvent>>();
- inputs.push_back(InputEventKey::create_reference(KEY_SPACE | KEY_MASK_CMD));
+ inputs.push_back(InputEventKey::create_reference(KEY_SPACE | KEY_MASK_CTRL));
default_builtin_cache.insert("ui_text_completion_query", inputs);
inputs = List<Ref<InputEvent>>();
@@ -516,14 +517,14 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_BACKSPACE | KEY_MASK_ALT));
- default_builtin_cache.insert("ui_text_backspace_word.OSX", inputs);
+ default_builtin_cache.insert("ui_text_backspace_word.macos", inputs);
inputs = List<Ref<InputEvent>>();
default_builtin_cache.insert("ui_text_backspace_all_to_left", inputs);
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_BACKSPACE | KEY_MASK_CMD));
- default_builtin_cache.insert("ui_text_backspace_all_to_left.OSX", inputs);
+ default_builtin_cache.insert("ui_text_backspace_all_to_left.macos", inputs);
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_DELETE));
@@ -535,14 +536,14 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_DELETE | KEY_MASK_ALT));
- default_builtin_cache.insert("ui_text_delete_word.OSX", inputs);
+ default_builtin_cache.insert("ui_text_delete_word.macos", inputs);
inputs = List<Ref<InputEvent>>();
default_builtin_cache.insert("ui_text_delete_all_to_right", inputs);
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_DELETE | KEY_MASK_CMD));
- default_builtin_cache.insert("ui_text_delete_all_to_right.OSX", inputs);
+ default_builtin_cache.insert("ui_text_delete_all_to_right.macos", inputs);
// Text Caret Movement Left/Right
@@ -556,7 +557,7 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_LEFT | KEY_MASK_ALT));
- default_builtin_cache.insert("ui_text_caret_word_left.OSX", inputs);
+ default_builtin_cache.insert("ui_text_caret_word_left.macos", inputs);
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_RIGHT));
@@ -568,7 +569,7 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_RIGHT | KEY_MASK_ALT));
- default_builtin_cache.insert("ui_text_caret_word_right.OSX", inputs);
+ default_builtin_cache.insert("ui_text_caret_word_right.macos", inputs);
// Text Caret Movement Up/Down
@@ -589,7 +590,7 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_A | KEY_MASK_CTRL));
inputs.push_back(InputEventKey::create_reference(KEY_LEFT | KEY_MASK_CMD));
- default_builtin_cache.insert("ui_text_caret_line_start.OSX", inputs);
+ default_builtin_cache.insert("ui_text_caret_line_start.macos", inputs);
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_END));
@@ -598,7 +599,7 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_E | KEY_MASK_CTRL));
inputs.push_back(InputEventKey::create_reference(KEY_RIGHT | KEY_MASK_CMD));
- default_builtin_cache.insert("ui_text_caret_line_end.OSX", inputs);
+ default_builtin_cache.insert("ui_text_caret_line_end.macos", inputs);
// Text Caret Movement Page Up/Down
@@ -618,7 +619,7 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_UP | KEY_MASK_CMD));
- default_builtin_cache.insert("ui_text_caret_document_start.OSX", inputs);
+ default_builtin_cache.insert("ui_text_caret_document_start.macos", inputs);
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_END | KEY_MASK_CMD));
@@ -626,7 +627,7 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_DOWN | KEY_MASK_CMD));
- default_builtin_cache.insert("ui_text_caret_document_end.OSX", inputs);
+ default_builtin_cache.insert("ui_text_caret_document_end.macos", inputs);
// Text Scrolling
@@ -636,7 +637,7 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_UP | KEY_MASK_CMD | KEY_MASK_ALT));
- default_builtin_cache.insert("ui_text_scroll_up.OSX", inputs);
+ default_builtin_cache.insert("ui_text_scroll_up.macos", inputs);
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_DOWN | KEY_MASK_CMD));
@@ -644,7 +645,7 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(KEY_DOWN | KEY_MASK_CMD | KEY_MASK_ALT));
- default_builtin_cache.insert("ui_text_scroll_down.OSX", inputs);
+ default_builtin_cache.insert("ui_text_scroll_down.macos", inputs);
// Text Misc
@@ -699,34 +700,57 @@ const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
return default_builtin_cache;
}
-void InputMap::load_default() {
+const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins_with_feature_overrides_applied() {
+ if (default_builtin_with_overrides_cache.size() > 0) {
+ return default_builtin_with_overrides_cache;
+ }
+
OrderedHashMap<String, List<Ref<InputEvent>>> builtins = get_builtins();
- // List of Builtins which have an override for OSX.
- Vector<String> osx_builtins;
+ // Get a list of all built in inputs which are valid overrides for the OS
+ // Key = builtin name (e.g. ui_accept)
+ // Value = override/feature names (e.g. macos, if it was defined as "ui_accept.macos" and the platform supports that feature)
+ Map<String, Vector<String>> builtins_with_overrides;
for (OrderedHashMap<String, List<Ref<InputEvent>>>::Element E = builtins.front(); E; E = E.next()) {
- if (String(E.key()).ends_with(".OSX")) {
- // Strip .OSX from name: some_input_name.OSX -> some_input_name
- osx_builtins.push_back(String(E.key()).split(".")[0]);
+ String fullname = E.key();
+
+ Vector<String> split = fullname.split(".");
+ String name = split[0];
+ String override_for = split.size() > 1 ? split[1] : String();
+
+ if (override_for != String() && OS::get_singleton()->has_feature(override_for)) {
+ builtins_with_overrides[name].push_back(override_for);
}
}
for (OrderedHashMap<String, List<Ref<InputEvent>>>::Element E = builtins.front(); E; E = E.next()) {
String fullname = E.key();
- String name = fullname.split(".")[0];
- String override_for = fullname.split(".").size() > 1 ? fullname.split(".")[1] : "";
-#ifdef APPLE_STYLE_KEYS
- if (osx_builtins.has(name) && override_for != "OSX") {
- // Name has osx builtin but this particular one is for non-osx systems - so skip.
+ Vector<String> split = fullname.split(".");
+ String name = split[0];
+ String override_for = split.size() > 1 ? split[1] : String();
+
+ if (builtins_with_overrides.has(name) && override_for == String()) {
+ // Builtin has an override but this particular one is not an override, so skip.
continue;
}
-#else
- if (override_for == "OSX") {
- // Override for OSX - not needed on non-osx platforms.
+
+ if (override_for != String() && !OS::get_singleton()->has_feature(override_for)) {
+ // OS does not support this override - skip.
continue;
}
-#endif
+
+ default_builtin_with_overrides_cache.insert(name, E.value());
+ }
+
+ return default_builtin_with_overrides_cache;
+}
+
+void InputMap::load_default() {
+ OrderedHashMap<String, List<Ref<InputEvent>>> builtins = get_builtins_with_feature_overrides_applied();
+
+ for (OrderedHashMap<String, List<Ref<InputEvent>>>::Element E = builtins.front(); E; E = E.next()) {
+ String name = E.key();
add_action(name);
@@ -746,3 +770,7 @@ InputMap::InputMap() {
ERR_FAIL_COND_MSG(singleton, "Singleton in InputMap already exist.");
singleton = this;
}
+
+InputMap::~InputMap() {
+ singleton = nullptr;
+}
diff --git a/core/input/input_map.h b/core/input/input_map.h
index 0e0567464a..8bef722089 100644
--- a/core/input/input_map.h
+++ b/core/input/input_map.h
@@ -56,12 +56,12 @@ private:
mutable OrderedHashMap<StringName, Action> input_map;
OrderedHashMap<String, List<Ref<InputEvent>>> default_builtin_cache;
+ OrderedHashMap<String, List<Ref<InputEvent>>> default_builtin_with_overrides_cache;
List<Ref<InputEvent>>::Element *_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool p_exact_match = false, bool *p_pressed = nullptr, float *p_strength = nullptr, float *p_raw_strength = nullptr) const;
Array _action_get_events(const StringName &p_action);
Array _get_actions();
- String _suggest_actions(const StringName &p_action) const;
protected:
static void _bind_methods();
@@ -89,11 +89,15 @@ public:
void load_from_project_settings();
void load_default();
+ String suggest_actions(const StringName &p_action) const;
+
String get_builtin_display_name(const String &p_name) const;
// Use an Ordered Map so insertion order is preserved. We want the elements to be 'grouped' somewhat.
const OrderedHashMap<String, List<Ref<InputEvent>>> &get_builtins();
+ const OrderedHashMap<String, List<Ref<InputEvent>>> &get_builtins_with_feature_overrides_applied();
InputMap();
+ ~InputMap();
};
#endif // INPUT_MAP_H
diff --git a/scene/gui/shortcut.cpp b/core/input/shortcut.cpp
index c0aac6d91a..d0cb08724e 100644
--- a/scene/gui/shortcut.cpp
+++ b/core/input/shortcut.cpp
@@ -32,7 +32,7 @@
#include "core/os/keyboard.h"
void Shortcut::set_event(const Ref<InputEvent> &p_event) {
- ERR_FAIL_COND(Object::cast_to<InputEventShortcut>(*p_event));
+ ERR_FAIL_COND_MSG(Object::cast_to<InputEventShortcut>(*p_event), "Cannot set a shortcut event to an instance of InputEventShortcut.");
event = p_event;
emit_changed();
}
diff --git a/scene/gui/shortcut.h b/core/input/shortcut.h
index 249dd1971f..249dd1971f 100644
--- a/scene/gui/shortcut.h
+++ b/core/input/shortcut.h
diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp
index aeaf25f321..49fa73dab2 100644
--- a/core/io/config_file.cpp
+++ b/core/io/config_file.cpp
@@ -188,7 +188,7 @@ Error ConfigFile::_internal_save(FileAccess *file) {
for (OrderedHashMap<String, Variant>::Element F = E.get().front(); F; F = F.next()) {
String vstr;
VariantWriter::write_to_string(F.get(), vstr);
- file->store_string(F.key() + "=" + vstr + "\n");
+ file->store_string(F.key().property_name_encode() + "=" + vstr + "\n");
}
}
@@ -315,6 +315,8 @@ void ConfigFile::_bind_methods() {
ClassDB::bind_method(D_METHOD("parse", "data"), &ConfigFile::parse);
ClassDB::bind_method(D_METHOD("save", "path"), &ConfigFile::save);
+ BIND_METHOD_ERR_RETURN_DOC("load", ERR_FILE_CANT_OPEN);
+
ClassDB::bind_method(D_METHOD("load_encrypted", "path", "key"), &ConfigFile::load_encrypted);
ClassDB::bind_method(D_METHOD("load_encrypted_pass", "path", "password"), &ConfigFile::load_encrypted_pass);
diff --git a/core/io/dir_access.cpp b/core/io/dir_access.cpp
index 8234adea06..3bff0a3fd5 100644
--- a/core/io/dir_access.cpp
+++ b/core/io/dir_access.cpp
@@ -135,7 +135,7 @@ Error DirAccess::make_dir_recursive(String p_dir) {
String full_dir;
- if (p_dir.is_rel_path()) {
+ if (p_dir.is_relative_path()) {
//append current
full_dir = get_current_dir().plus_file(p_dir);
@@ -345,7 +345,7 @@ Error DirAccess::_copy_dir(DirAccess *p_target_da, String p_to, int p_chmod_flag
dirs.push_back(n);
} else {
const String &rel_path = n;
- if (!n.is_rel_path()) {
+ if (!n.is_relative_path()) {
list_dir_end();
return ERR_BUG;
}
diff --git a/core/io/http_client_tcp.cpp b/core/io/http_client_tcp.cpp
index f291086808..b3d35b3603 100644
--- a/core/io/http_client_tcp.cpp
+++ b/core/io/http_client_tcp.cpp
@@ -45,6 +45,8 @@ Error HTTPClientTCP::connect_to_host(const String &p_host, int p_port, bool p_ss
conn_port = p_port;
conn_host = p_host;
+ ip_candidates.clear();
+
ssl = p_ssl;
ssl_verify_host = p_verify_host;
@@ -234,6 +236,7 @@ void HTTPClientTCP::close() {
resolving = IP::RESOLVER_INVALID_ID;
}
+ ip_candidates.clear();
response_headers.clear();
response_str.clear();
body_size = -1;
@@ -256,10 +259,17 @@ Error HTTPClientTCP::poll() {
return OK; // Still resolving
case IP::RESOLVER_STATUS_DONE: {
- IPAddress host = IP::get_singleton()->get_resolve_item_address(resolving);
- Error err = tcp_connection->connect_to_host(host, conn_port);
+ ip_candidates = IP::get_singleton()->get_resolve_item_addresses(resolving);
IP::get_singleton()->erase_resolve_item(resolving);
resolving = IP::RESOLVER_INVALID_ID;
+
+ Error err = ERR_BUG; // Should be at least one entry.
+ while (ip_candidates.size() > 0) {
+ err = tcp_connection->connect_to_host(ip_candidates.front(), conn_port);
+ if (err == OK) {
+ break;
+ }
+ }
if (err) {
status = STATUS_CANT_CONNECT;
return err;
@@ -313,6 +323,7 @@ Error HTTPClientTCP::poll() {
if (ssl->get_status() == StreamPeerSSL::STATUS_CONNECTED) {
// Handshake has been successful
handshaking = false;
+ ip_candidates.clear();
status = STATUS_CONNECTED;
return OK;
} else if (ssl->get_status() != StreamPeerSSL::STATUS_HANDSHAKING) {
@@ -323,15 +334,24 @@ Error HTTPClientTCP::poll() {
}
// ... we will need to poll more for handshake to finish
} else {
+ ip_candidates.clear();
status = STATUS_CONNECTED;
}
return OK;
} break;
case StreamPeerTCP::STATUS_ERROR:
case StreamPeerTCP::STATUS_NONE: {
+ Error err = ERR_CANT_CONNECT;
+ while (ip_candidates.size() > 0) {
+ tcp_connection->disconnect_from_host();
+ err = tcp_connection->connect_to_host(ip_candidates.pop_front(), conn_port);
+ if (err == OK) {
+ return OK;
+ }
+ }
close();
status = STATUS_CANT_CONNECT;
- return ERR_CANT_CONNECT;
+ return err;
} break;
}
} break;
diff --git a/core/io/http_client_tcp.h b/core/io/http_client_tcp.h
index e178399fbe..170afb551c 100644
--- a/core/io/http_client_tcp.h
+++ b/core/io/http_client_tcp.h
@@ -37,6 +37,7 @@ class HTTPClientTCP : public HTTPClient {
private:
Status status = STATUS_DISCONNECTED;
IP::ResolverID resolving = IP::RESOLVER_INVALID_ID;
+ Array ip_candidates;
int conn_port = -1;
String conn_host;
bool ssl = false;
diff --git a/core/io/image.cpp b/core/io/image.cpp
index 3112dd217f..c70f4b86bd 100644
--- a/core/io/image.cpp
+++ b/core/io/image.cpp
@@ -2506,7 +2506,7 @@ void Image::blit_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const Po
clipped_src_rect.position.y = ABS(p_dest.y);
}
- if (clipped_src_rect.size.x <= 0 || clipped_src_rect.size.y <= 0) {
+ if (clipped_src_rect.has_no_area()) {
return;
}
@@ -2561,7 +2561,7 @@ void Image::blit_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, co
clipped_src_rect.position.y = ABS(p_dest.y);
}
- if (clipped_src_rect.size.x <= 0 || clipped_src_rect.size.y <= 0) {
+ if (clipped_src_rect.has_no_area()) {
return;
}
@@ -2615,7 +2615,7 @@ void Image::blend_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const P
clipped_src_rect.position.y = ABS(p_dest.y);
}
- if (clipped_src_rect.size.x <= 0 || clipped_src_rect.size.y <= 0) {
+ if (clipped_src_rect.has_no_area()) {
return;
}
@@ -2664,7 +2664,7 @@ void Image::blend_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, c
clipped_src_rect.position.y = ABS(p_dest.y);
}
- if (clipped_src_rect.size.x <= 0 || clipped_src_rect.size.y <= 0) {
+ if (clipped_src_rect.has_no_area()) {
return;
}
diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp
deleted file mode 100644
index f792dc6cb4..0000000000
--- a/core/io/multiplayer_api.cpp
+++ /dev/null
@@ -1,1300 +0,0 @@
-/*************************************************************************/
-/* multiplayer_api.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "multiplayer_api.h"
-
-#include "core/debugger/engine_debugger.h"
-#include "core/io/marshalls.h"
-#include "scene/main/node.h"
-#include "scene/resources/packed_scene.h"
-
-#include <stdint.h>
-
-#define NODE_ID_COMPRESSION_SHIFT 3
-#define NAME_ID_COMPRESSION_SHIFT 5
-#define BYTE_ONLY_OR_NO_ARGS_SHIFT 6
-
-#ifdef DEBUG_ENABLED
-#include "core/os/os.h"
-#endif
-
-String _get_rpc_md5(const Node *p_node) {
- String rpc_list;
- const Vector<MultiplayerAPI::RPCConfig> node_config = p_node->get_node_rpc_methods();
- for (int i = 0; i < node_config.size(); i++) {
- rpc_list += String(node_config[i].name);
- }
- if (p_node->get_script_instance()) {
- const Vector<MultiplayerAPI::RPCConfig> script_config = p_node->get_script_instance()->get_rpc_methods();
- for (int i = 0; i < script_config.size(); i++) {
- rpc_list += String(script_config[i].name);
- }
- }
- return rpc_list.md5_text();
-}
-
-const MultiplayerAPI::RPCConfig _get_rpc_config(const Node *p_node, const StringName &p_method, uint16_t &r_id) {
- const Vector<MultiplayerAPI::RPCConfig> node_config = p_node->get_node_rpc_methods();
- for (int i = 0; i < node_config.size(); i++) {
- if (node_config[i].name == p_method) {
- r_id = ((uint16_t)i) | (1 << 15);
- return node_config[i];
- }
- }
- if (p_node->get_script_instance()) {
- const Vector<MultiplayerAPI::RPCConfig> script_config = p_node->get_script_instance()->get_rpc_methods();
- for (int i = 0; i < script_config.size(); i++) {
- if (script_config[i].name == p_method) {
- r_id = (uint16_t)i;
- return script_config[i];
- }
- }
- }
- return MultiplayerAPI::RPCConfig();
-}
-
-const MultiplayerAPI::RPCConfig _get_rpc_config_by_id(Node *p_node, uint16_t p_id) {
- Vector<MultiplayerAPI::RPCConfig> config;
- uint16_t id = p_id;
- if (id & (1 << 15)) {
- id = id & ~(1 << 15);
- config = p_node->get_node_rpc_methods();
- } else if (p_node->get_script_instance()) {
- config = p_node->get_script_instance()->get_rpc_methods();
- }
- if (id < config.size()) {
- return config[id];
- }
- return MultiplayerAPI::RPCConfig();
-}
-
-_FORCE_INLINE_ bool _can_call_mode(Node *p_node, MultiplayerAPI::RPCMode mode, int p_remote_id) {
- switch (mode) {
- case MultiplayerAPI::RPC_MODE_DISABLED: {
- return false;
- } break;
- case MultiplayerAPI::RPC_MODE_REMOTE: {
- return true;
- } break;
- case MultiplayerAPI::RPC_MODE_MASTER: {
- return p_node->is_network_master();
- } break;
- case MultiplayerAPI::RPC_MODE_PUPPET: {
- return !p_node->is_network_master() && p_remote_id == p_node->get_network_master();
- } break;
- }
-
- return false;
-}
-
-void MultiplayerAPI::poll() {
- if (!network_peer.is_valid() || network_peer->get_connection_status() == MultiplayerPeer::CONNECTION_DISCONNECTED) {
- return;
- }
-
- network_peer->poll();
-
- if (!network_peer.is_valid()) { // It's possible that polling might have resulted in a disconnection, so check here.
- return;
- }
-
- while (network_peer->get_available_packet_count()) {
- int sender = network_peer->get_packet_peer();
- const uint8_t *packet;
- int len;
-
- Error err = network_peer->get_packet(&packet, len);
- if (err != OK) {
- ERR_PRINT("Error getting packet!");
- break; // Something is wrong!
- }
-
- rpc_sender_id = sender;
- _process_packet(sender, packet, len);
- rpc_sender_id = 0;
-
- if (!network_peer.is_valid()) {
- break; // It's also possible that a packet or RPC caused a disconnection, so also check here.
- }
- }
-}
-
-void MultiplayerAPI::clear() {
- replicated_nodes.clear();
- connected_peers.clear();
- path_get_cache.clear();
- path_send_cache.clear();
- packet_cache.clear();
- last_send_cache_id = 1;
-}
-
-void MultiplayerAPI::set_root_node(Node *p_node) {
- root_node = p_node;
-}
-
-Node *MultiplayerAPI::get_root_node() {
- return root_node;
-}
-
-void MultiplayerAPI::set_network_peer(const Ref<MultiplayerPeer> &p_peer) {
- if (p_peer == network_peer) {
- return; // Nothing to do
- }
-
- ERR_FAIL_COND_MSG(p_peer.is_valid() && p_peer->get_connection_status() == MultiplayerPeer::CONNECTION_DISCONNECTED,
- "Supplied MultiplayerPeer must be connecting or connected.");
-
- if (network_peer.is_valid()) {
- network_peer->disconnect("peer_connected", callable_mp(this, &MultiplayerAPI::_add_peer));
- network_peer->disconnect("peer_disconnected", callable_mp(this, &MultiplayerAPI::_del_peer));
- network_peer->disconnect("connection_succeeded", callable_mp(this, &MultiplayerAPI::_connected_to_server));
- network_peer->disconnect("connection_failed", callable_mp(this, &MultiplayerAPI::_connection_failed));
- network_peer->disconnect("server_disconnected", callable_mp(this, &MultiplayerAPI::_server_disconnected));
- clear();
- }
-
- network_peer = p_peer;
-
- if (network_peer.is_valid()) {
- network_peer->connect("peer_connected", callable_mp(this, &MultiplayerAPI::_add_peer));
- network_peer->connect("peer_disconnected", callable_mp(this, &MultiplayerAPI::_del_peer));
- network_peer->connect("connection_succeeded", callable_mp(this, &MultiplayerAPI::_connected_to_server));
- network_peer->connect("connection_failed", callable_mp(this, &MultiplayerAPI::_connection_failed));
- network_peer->connect("server_disconnected", callable_mp(this, &MultiplayerAPI::_server_disconnected));
- }
-}
-
-Ref<MultiplayerPeer> MultiplayerAPI::get_network_peer() const {
- return network_peer;
-}
-
-#ifdef DEBUG_ENABLED
-void _profile_node_data(const String &p_what, ObjectID p_id) {
- if (EngineDebugger::is_profiling("multiplayer")) {
- Array values;
- values.push_back("node");
- values.push_back(p_id);
- values.push_back(p_what);
- EngineDebugger::profiler_add_frame_data("multiplayer", values);
- }
-}
-
-void _profile_bandwidth_data(const String &p_inout, int p_size) {
- if (EngineDebugger::is_profiling("multiplayer")) {
- Array values;
- values.push_back("bandwidth");
- values.push_back(p_inout);
- values.push_back(OS::get_singleton()->get_ticks_msec());
- values.push_back(p_size);
- EngineDebugger::profiler_add_frame_data("multiplayer", values);
- }
-}
-#endif
-
-// Returns the packet size stripping the node path added when the node is not yet cached.
-int get_packet_len(uint32_t p_node_target, int p_packet_len) {
- if (p_node_target & 0x80000000) {
- int ofs = p_node_target & 0x7FFFFFFF;
- return p_packet_len - (p_packet_len - ofs);
- } else {
- return p_packet_len;
- }
-}
-
-void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_packet_len) {
- ERR_FAIL_COND_MSG(root_node == nullptr, "Multiplayer root node was not initialized. If you are using custom multiplayer, remember to set the root node via MultiplayerAPI.set_root_node before using it.");
- ERR_FAIL_COND_MSG(p_packet_len < 1, "Invalid packet received. Size too small.");
-
-#ifdef DEBUG_ENABLED
- _profile_bandwidth_data("in", p_packet_len);
-#endif
-
- // Extract the `packet_type` from the LSB three bits:
- uint8_t packet_type = p_packet[0] & 7;
-
- switch (packet_type) {
- case NETWORK_COMMAND_SIMPLIFY_PATH: {
- _process_simplify_path(p_from, p_packet, p_packet_len);
- } break;
-
- case NETWORK_COMMAND_CONFIRM_PATH: {
- _process_confirm_path(p_from, p_packet, p_packet_len);
- } break;
-
- case NETWORK_COMMAND_REMOTE_CALL: {
- // Extract packet meta
- int packet_min_size = 1;
- int name_id_offset = 1;
- ERR_FAIL_COND_MSG(p_packet_len < packet_min_size, "Invalid packet received. Size too small.");
- // Compute the meta size, which depends on the compression level.
- int node_id_compression = (p_packet[0] & 24) >> NODE_ID_COMPRESSION_SHIFT;
- int name_id_compression = (p_packet[0] & 32) >> NAME_ID_COMPRESSION_SHIFT;
-
- switch (node_id_compression) {
- case NETWORK_NODE_ID_COMPRESSION_8:
- packet_min_size += 1;
- name_id_offset += 1;
- break;
- case NETWORK_NODE_ID_COMPRESSION_16:
- packet_min_size += 2;
- name_id_offset += 2;
- break;
- case NETWORK_NODE_ID_COMPRESSION_32:
- packet_min_size += 4;
- name_id_offset += 4;
- break;
- default:
- ERR_FAIL_MSG("Was not possible to extract the node id compression mode.");
- }
- switch (name_id_compression) {
- case NETWORK_NAME_ID_COMPRESSION_8:
- packet_min_size += 1;
- break;
- case NETWORK_NAME_ID_COMPRESSION_16:
- packet_min_size += 2;
- break;
- default:
- ERR_FAIL_MSG("Was not possible to extract the name id compression mode.");
- }
- ERR_FAIL_COND_MSG(p_packet_len < packet_min_size, "Invalid packet received. Size too small.");
-
- uint32_t node_target = 0;
- switch (node_id_compression) {
- case NETWORK_NODE_ID_COMPRESSION_8:
- node_target = p_packet[1];
- break;
- case NETWORK_NODE_ID_COMPRESSION_16:
- node_target = decode_uint16(p_packet + 1);
- break;
- case NETWORK_NODE_ID_COMPRESSION_32:
- node_target = decode_uint32(p_packet + 1);
- break;
- default:
- // Unreachable, checked before.
- CRASH_NOW();
- }
-
- Node *node = _process_get_node(p_from, p_packet, node_target, p_packet_len);
- ERR_FAIL_COND_MSG(node == nullptr, "Invalid packet received. Requested node was not found.");
-
- uint16_t name_id = 0;
- switch (name_id_compression) {
- case NETWORK_NAME_ID_COMPRESSION_8:
- name_id = p_packet[name_id_offset];
- break;
- case NETWORK_NAME_ID_COMPRESSION_16:
- name_id = decode_uint16(p_packet + name_id_offset);
- break;
- default:
- // Unreachable, checked before.
- CRASH_NOW();
- }
-
- const int packet_len = get_packet_len(node_target, p_packet_len);
- _process_rpc(node, name_id, p_from, p_packet, packet_len, packet_min_size);
- } break;
-
- case NETWORK_COMMAND_RAW: {
- _process_raw(p_from, p_packet, p_packet_len);
- } break;
- case NETWORK_COMMAND_SPAWN: {
- _process_spawn_despawn(p_from, p_packet, p_packet_len, true);
- } break;
- case NETWORK_COMMAND_DESPAWN: {
- _process_spawn_despawn(p_from, p_packet, p_packet_len, false);
- } break;
- }
-}
-
-Node *MultiplayerAPI::_process_get_node(int p_from, const uint8_t *p_packet, uint32_t p_node_target, int p_packet_len) {
- Node *node = nullptr;
-
- if (p_node_target & 0x80000000) {
- // Use full path (not cached yet).
-
- int ofs = p_node_target & 0x7FFFFFFF;
-
- ERR_FAIL_COND_V_MSG(ofs >= p_packet_len, nullptr, "Invalid packet received. Size smaller than declared.");
-
- String paths;
- paths.parse_utf8((const char *)&p_packet[ofs], p_packet_len - ofs);
-
- NodePath np = paths;
-
- node = root_node->get_node(np);
-
- if (!node) {
- ERR_PRINT("Failed to get path from RPC: " + String(np) + ".");
- }
- } else {
- // Use cached path.
- int id = p_node_target;
-
- Map<int, PathGetCache>::Element *E = path_get_cache.find(p_from);
- ERR_FAIL_COND_V_MSG(!E, nullptr, "Invalid packet received. Requests invalid peer cache.");
-
- Map<int, PathGetCache::NodeInfo>::Element *F = E->get().nodes.find(id);
- ERR_FAIL_COND_V_MSG(!F, nullptr, "Invalid packet received. Unabled to find requested cached node.");
-
- PathGetCache::NodeInfo *ni = &F->get();
- // Do proper caching later.
-
- node = root_node->get_node(ni->path);
- if (!node) {
- ERR_PRINT("Failed to get cached path from RPC: " + String(ni->path) + ".");
- }
- }
- return node;
-}
-
-void MultiplayerAPI::_process_rpc(Node *p_node, const uint16_t p_rpc_method_id, int p_from, const uint8_t *p_packet, int p_packet_len, int p_offset) {
- ERR_FAIL_COND_MSG(p_offset > p_packet_len, "Invalid packet received. Size too small.");
-
- // Check that remote can call the RPC on this node.
- const RPCConfig config = _get_rpc_config_by_id(p_node, p_rpc_method_id);
- ERR_FAIL_COND(config.name == StringName());
-
- bool can_call = _can_call_mode(p_node, config.rpc_mode, p_from);
- ERR_FAIL_COND_MSG(!can_call, "RPC '" + String(config.name) + "' is not allowed on node " + p_node->get_path() + " from: " + itos(p_from) + ". Mode is " + itos((int)config.rpc_mode) + ", master is " + itos(p_node->get_network_master()) + ".");
-
- int argc = 0;
- bool byte_only = false;
-
- const bool byte_only_or_no_args = ((p_packet[0] & 64) >> BYTE_ONLY_OR_NO_ARGS_SHIFT) == 1;
- if (byte_only_or_no_args) {
- if (p_offset < p_packet_len) {
- // This packet contains only bytes.
- argc = 1;
- byte_only = true;
- } else {
- // This rpc calls a method without parameters.
- }
- } else {
- // Normal variant, takes the argument count from the packet.
- ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small.");
- argc = p_packet[p_offset];
- p_offset += 1;
- }
-
- Vector<Variant> args;
- Vector<const Variant *> argp;
- args.resize(argc);
- argp.resize(argc);
-
-#ifdef DEBUG_ENABLED
- _profile_node_data("in_rpc", p_node->get_instance_id());
-#endif
-
- if (byte_only) {
- Vector<uint8_t> pure_data;
- const int len = p_packet_len - p_offset;
- pure_data.resize(len);
- memcpy(pure_data.ptrw(), &p_packet[p_offset], len);
- args.write[0] = pure_data;
- argp.write[0] = &args[0];
- p_offset += len;
- } else {
- for (int i = 0; i < argc; i++) {
- ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small.");
-
- int vlen;
- Error err = _decode_and_decompress_variant(args.write[i], &p_packet[p_offset], p_packet_len - p_offset, &vlen);
- ERR_FAIL_COND_MSG(err != OK, "Invalid packet received. Unable to decode RPC argument.");
-
- argp.write[i] = &args[i];
- p_offset += vlen;
- }
- }
-
- Callable::CallError ce;
-
- p_node->call(config.name, (const Variant **)argp.ptr(), argc, ce);
- if (ce.error != Callable::CallError::CALL_OK) {
- String error = Variant::get_call_error_text(p_node, config.name, (const Variant **)argp.ptr(), argc, ce);
- error = "RPC - " + error;
- ERR_PRINT(error);
- }
-}
-
-void MultiplayerAPI::_process_simplify_path(int p_from, const uint8_t *p_packet, int p_packet_len) {
- ERR_FAIL_COND_MSG(p_packet_len < 38, "Invalid packet received. Size too small.");
- int ofs = 1;
-
- String methods_md5;
- methods_md5.parse_utf8((const char *)(p_packet + ofs), 32);
- ofs += 33;
-
- int id = decode_uint32(&p_packet[ofs]);
- ofs += 4;
-
- String paths;
- paths.parse_utf8((const char *)(p_packet + ofs), p_packet_len - ofs);
-
- NodePath path = paths;
-
- if (!path_get_cache.has(p_from)) {
- path_get_cache[p_from] = PathGetCache();
- }
-
- Node *node = root_node->get_node(path);
- ERR_FAIL_COND(node == nullptr);
- const bool valid_rpc_checksum = _get_rpc_md5(node) == methods_md5;
- if (valid_rpc_checksum == false) {
- ERR_PRINT("The rpc node checksum failed. Make sure to have the same methods on both nodes. Node path: " + path);
- }
-
- PathGetCache::NodeInfo ni;
- ni.path = path;
-
- path_get_cache[p_from].nodes[id] = ni;
-
- // Encode path to send ack.
- CharString pname = String(path).utf8();
- int len = encode_cstring(pname.get_data(), nullptr);
-
- Vector<uint8_t> packet;
-
- packet.resize(1 + 1 + len);
- packet.write[0] = NETWORK_COMMAND_CONFIRM_PATH;
- packet.write[1] = valid_rpc_checksum;
- encode_cstring(pname.get_data(), &packet.write[2]);
-
- network_peer->set_transfer_channel(0);
- network_peer->set_transfer_mode(MultiplayerPeer::TRANSFER_MODE_RELIABLE);
- network_peer->set_target_peer(p_from);
- network_peer->put_packet(packet.ptr(), packet.size());
-}
-
-void MultiplayerAPI::_process_confirm_path(int p_from, const uint8_t *p_packet, int p_packet_len) {
- ERR_FAIL_COND_MSG(p_packet_len < 3, "Invalid packet received. Size too small.");
-
- const bool valid_rpc_checksum = p_packet[1];
-
- String paths;
- paths.parse_utf8((const char *)&p_packet[2], p_packet_len - 2);
-
- NodePath path = paths;
-
- if (valid_rpc_checksum == false) {
- ERR_PRINT("The rpc node checksum failed. Make sure to have the same methods on both nodes. Node path: " + path);
- }
-
- PathSentCache *psc = path_send_cache.getptr(path);
- ERR_FAIL_COND_MSG(!psc, "Invalid packet received. Tries to confirm a path which was not found in cache.");
-
- Map<int, bool>::Element *E = psc->confirmed_peers.find(p_from);
- ERR_FAIL_COND_MSG(!E, "Invalid packet received. Source peer was not found in cache for the given path.");
- E->get() = true;
-}
-
-void MultiplayerAPI::_process_spawn_despawn(int p_from, const uint8_t *p_packet, int p_packet_len, bool p_spawn) {
- ERR_FAIL_COND_MSG(p_packet_len < 18, "Invalid spawn packet received");
- int ofs = 1;
- ResourceUID::ID id = decode_uint64(&p_packet[ofs]);
- ofs += 8;
- ERR_FAIL_COND_MSG(!spawnables.has(id), "Invalid spawn ID received " + itos(id));
-
- uint32_t node_target = decode_uint32(&p_packet[ofs]);
- Node *parent = _process_get_node(p_from, nullptr, node_target, 0);
- ofs += 4;
- ERR_FAIL_COND_MSG(parent == nullptr, "Invalid packet received. Requested node was not found.");
-
- uint32_t name_len = decode_uint32(&p_packet[ofs]);
- ofs += 4;
- ERR_FAIL_COND_MSG(name_len > uint32_t(p_packet_len - ofs), vformat("Invalid spawn packet size: %d, wants: %d", p_packet_len, ofs + name_len));
- ERR_FAIL_COND_MSG(name_len < 1, "Zero spawn name size.");
-
- const String name = String::utf8((const char *)&p_packet[ofs], name_len);
- // We need to make sure no trickery happens here (e.g. despawning a subpath), but we want to allow autogenerated ("@") node names.
- ERR_FAIL_COND_MSG(name.validate_node_name() != name.replace("@", ""), vformat("Invalid node name received: '%s'", name));
- ofs += name_len;
- PackedByteArray data;
- if (p_packet_len > ofs) {
- data.resize(p_packet_len - ofs);
- memcpy(data.ptrw(), &p_packet[ofs], data.size());
- }
-
- SpawnMode mode = spawnables[id];
- if (mode == SPAWN_MODE_SERVER && p_from == 1) {
- String scene_path = ResourceUID::get_singleton()->get_id_path(id);
- if (p_spawn) {
- ERR_FAIL_COND_MSG(parent->has_node(name), vformat("Unable to spawn node. Node already exists: %s/%s", parent->get_path(), name));
- RES res = ResourceLoader::load(scene_path);
- ERR_FAIL_COND_MSG(!res.is_valid(), "Unable to load scene to spawn at path: " + scene_path);
- PackedScene *scene = Object::cast_to<PackedScene>(res.ptr());
- ERR_FAIL_COND(!scene);
- Node *node = scene->instantiate();
- ERR_FAIL_COND(!node);
- replicated_nodes[node->get_instance_id()] = id;
- parent->_add_child_nocheck(node, name);
- emit_signal(SNAME("network_spawn"), p_from, id, node, data);
- } else {
- ERR_FAIL_COND_MSG(!parent->has_node(name), vformat("Path not found: %s/%s", parent->get_path(), name));
- Node *node = parent->get_node(name);
- ERR_FAIL_COND_MSG(!replicated_nodes.has(node->get_instance_id()), vformat("Trying to despawn a Node that was not replicated: %s/%s", parent->get_path(), name));
- emit_signal(SNAME("network_despawn"), p_from, id, node, data);
- replicated_nodes.erase(node->get_instance_id());
- node->queue_delete();
- }
- } else {
- if (p_spawn) {
- emit_signal(SNAME("network_spawn_request"), p_from, id, parent, name, data);
- } else {
- emit_signal(SNAME("network_despawn_request"), p_from, id, parent, name, data);
- }
- }
-}
-
-bool MultiplayerAPI::_send_confirm_path(Node *p_node, NodePath p_path, PathSentCache *psc, int p_target) {
- bool has_all_peers = true;
- List<int> peers_to_add; // If one is missing, take note to add it.
-
- for (Set<int>::Element *E = connected_peers.front(); E; E = E->next()) {
- if (p_target < 0 && E->get() == -p_target) {
- continue; // Continue, excluded.
- }
-
- if (p_target > 0 && E->get() != p_target) {
- continue; // Continue, not for this peer.
- }
-
- Map<int, bool>::Element *F = psc->confirmed_peers.find(E->get());
-
- if (!F || !F->get()) {
- // Path was not cached, or was cached but is unconfirmed.
- if (!F) {
- // Not cached at all, take note.
- peers_to_add.push_back(E->get());
- }
-
- has_all_peers = false;
- }
- }
-
- if (peers_to_add.size() > 0) {
- // Those that need to be added, send a message for this.
-
- // Encode function name.
- const CharString path = String(p_path).utf8();
- const int path_len = encode_cstring(path.get_data(), nullptr);
-
- // Extract MD5 from rpc methods list.
- const String methods_md5 = _get_rpc_md5(p_node);
- const int methods_md5_len = 33; // 32 + 1 for the `0` that is added by the encoder.
-
- Vector<uint8_t> packet;
- packet.resize(1 + 4 + path_len + methods_md5_len);
- int ofs = 0;
-
- packet.write[ofs] = NETWORK_COMMAND_SIMPLIFY_PATH;
- ofs += 1;
-
- ofs += encode_cstring(methods_md5.utf8().get_data(), &packet.write[ofs]);
-
- ofs += encode_uint32(psc->id, &packet.write[ofs]);
-
- ofs += encode_cstring(path.get_data(), &packet.write[ofs]);
-
- for (int &E : peers_to_add) {
- network_peer->set_target_peer(E); // To all of you.
- network_peer->set_transfer_channel(0);
- network_peer->set_transfer_mode(MultiplayerPeer::TRANSFER_MODE_RELIABLE);
- network_peer->put_packet(packet.ptr(), packet.size());
-
- psc->confirmed_peers.insert(E, false); // Insert into confirmed, but as false since it was not confirmed.
- }
- }
-
- return has_all_peers;
-}
-
-// The variant is compressed and encoded; The first byte contains all the meta
-// information and the format is:
-// - The first LSB 5 bits are used for the variant type.
-// - The next two bits are used to store the encoding mode.
-// - The most significant is used to store the boolean value.
-#define VARIANT_META_TYPE_MASK 0x1F
-#define VARIANT_META_EMODE_MASK 0x60
-#define VARIANT_META_BOOL_MASK 0x80
-#define ENCODE_8 0 << 5
-#define ENCODE_16 1 << 5
-#define ENCODE_32 2 << 5
-#define ENCODE_64 3 << 5
-Error MultiplayerAPI::_encode_and_compress_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len) {
- // Unreachable because `VARIANT_MAX` == 27 and `ENCODE_VARIANT_MASK` == 31
- CRASH_COND(p_variant.get_type() > VARIANT_META_TYPE_MASK);
-
- uint8_t *buf = r_buffer;
- r_len = 0;
- uint8_t encode_mode = 0;
-
- switch (p_variant.get_type()) {
- case Variant::BOOL: {
- if (buf) {
- // We still have 1 free bit in the meta, so let's use it.
- buf[0] = (p_variant.operator bool()) ? (1 << 7) : 0;
- buf[0] |= encode_mode | p_variant.get_type();
- }
- r_len += 1;
- } break;
- case Variant::INT: {
- if (buf) {
- // Reserve the first byte for the meta.
- buf += 1;
- }
- r_len += 1;
- int64_t val = p_variant;
- if (val <= (int64_t)INT8_MAX && val >= (int64_t)INT8_MIN) {
- // Use 8 bit
- encode_mode = ENCODE_8;
- if (buf) {
- buf[0] = val;
- }
- r_len += 1;
- } else if (val <= (int64_t)INT16_MAX && val >= (int64_t)INT16_MIN) {
- // Use 16 bit
- encode_mode = ENCODE_16;
- if (buf) {
- encode_uint16(val, buf);
- }
- r_len += 2;
- } else if (val <= (int64_t)INT32_MAX && val >= (int64_t)INT32_MIN) {
- // Use 32 bit
- encode_mode = ENCODE_32;
- if (buf) {
- encode_uint32(val, buf);
- }
- r_len += 4;
- } else {
- // Use 64 bit
- encode_mode = ENCODE_64;
- if (buf) {
- encode_uint64(val, buf);
- }
- r_len += 8;
- }
- // Store the meta
- if (buf) {
- buf -= 1;
- buf[0] = encode_mode | p_variant.get_type();
- }
- } break;
- default:
- // Any other case is not yet compressed.
- Error err = encode_variant(p_variant, r_buffer, r_len, allow_object_decoding);
- if (err != OK) {
- return err;
- }
- if (r_buffer) {
- // The first byte is not used by the marshalling, so store the type
- // so we know how to decompress and decode this variant.
- r_buffer[0] = p_variant.get_type();
- }
- }
-
- return OK;
-}
-
-Error MultiplayerAPI::_decode_and_decompress_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int *r_len) {
- const uint8_t *buf = p_buffer;
- int len = p_len;
-
- ERR_FAIL_COND_V(len < 1, ERR_INVALID_DATA);
- uint8_t type = buf[0] & VARIANT_META_TYPE_MASK;
- uint8_t encode_mode = buf[0] & VARIANT_META_EMODE_MASK;
-
- ERR_FAIL_COND_V(type >= Variant::VARIANT_MAX, ERR_INVALID_DATA);
-
- switch (type) {
- case Variant::BOOL: {
- bool val = (buf[0] & VARIANT_META_BOOL_MASK) > 0;
- r_variant = val;
- if (r_len) {
- *r_len = 1;
- }
- } break;
- case Variant::INT: {
- buf += 1;
- len -= 1;
- if (r_len) {
- *r_len = 1;
- }
- if (encode_mode == ENCODE_8) {
- // 8 bits.
- ERR_FAIL_COND_V(len < 1, ERR_INVALID_DATA);
- int8_t val = buf[0];
- r_variant = val;
- if (r_len) {
- (*r_len) += 1;
- }
- } else if (encode_mode == ENCODE_16) {
- // 16 bits.
- ERR_FAIL_COND_V(len < 2, ERR_INVALID_DATA);
- int16_t val = decode_uint16(buf);
- r_variant = val;
- if (r_len) {
- (*r_len) += 2;
- }
- } else if (encode_mode == ENCODE_32) {
- // 32 bits.
- ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
- int32_t val = decode_uint32(buf);
- r_variant = val;
- if (r_len) {
- (*r_len) += 4;
- }
- } else {
- // 64 bits.
- ERR_FAIL_COND_V(len < 8, ERR_INVALID_DATA);
- int64_t val = decode_uint64(buf);
- r_variant = val;
- if (r_len) {
- (*r_len) += 8;
- }
- }
- } break;
- default:
- Error err = decode_variant(r_variant, p_buffer, p_len, r_len, allow_object_decoding);
- if (err != OK) {
- return err;
- }
- }
-
- return OK;
-}
-
-void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, uint16_t p_rpc_id, const RPCConfig &p_config, const StringName &p_name, const Variant **p_arg, int p_argcount) {
- ERR_FAIL_COND_MSG(network_peer.is_null(), "Attempt to remote call/set when networking is not active in SceneTree.");
-
- ERR_FAIL_COND_MSG(network_peer->get_connection_status() == MultiplayerPeer::CONNECTION_CONNECTING, "Attempt to remote call/set when networking is not connected yet in SceneTree.");
-
- ERR_FAIL_COND_MSG(network_peer->get_connection_status() == MultiplayerPeer::CONNECTION_DISCONNECTED, "Attempt to remote call/set when networking is disconnected.");
-
- ERR_FAIL_COND_MSG(p_argcount > 255, "Too many arguments >255.");
-
- if (p_to != 0 && !connected_peers.has(ABS(p_to))) {
- ERR_FAIL_COND_MSG(p_to == network_peer->get_unique_id(), "Attempt to remote call/set yourself! unique ID: " + itos(network_peer->get_unique_id()) + ".");
-
- ERR_FAIL_MSG("Attempt to remote call unexisting ID: " + itos(p_to) + ".");
- }
-
- NodePath from_path = (root_node->get_path()).rel_path_to(p_from->get_path());
- ERR_FAIL_COND_MSG(from_path.is_empty(), "Unable to send RPC. Relative path is empty. THIS IS LIKELY A BUG IN THE ENGINE!");
-
- // See if the path is cached.
- PathSentCache *psc = path_send_cache.getptr(from_path);
- if (!psc) {
- // Path is not cached, create.
- path_send_cache[from_path] = PathSentCache();
- psc = path_send_cache.getptr(from_path);
- psc->id = last_send_cache_id++;
- }
-
- // See if all peers have cached path (if so, call can be fast).
- const bool has_all_peers = _send_confirm_path(p_from, from_path, psc, p_to);
-
- // Create base packet, lots of hardcode because it must be tight.
-
- int ofs = 0;
-
-#define MAKE_ROOM(m_amount) \
- if (packet_cache.size() < m_amount) \
- packet_cache.resize(m_amount);
-
- // Encode meta.
- // The meta is composed by a single byte that contains (starting from the least significant bit):
- // - `NetworkCommands` in the first three bits.
- // - `NetworkNodeIdCompression` in the next 2 bits.
- // - `NetworkNameIdCompression` in the next 1 bit.
- // - `byte_only_or_no_args` in the next 1 bit.
- // - So we still have the last bit free!
- uint8_t command_type = NETWORK_COMMAND_REMOTE_CALL;
- uint8_t node_id_compression = UINT8_MAX;
- uint8_t name_id_compression = UINT8_MAX;
- bool byte_only_or_no_args = false;
-
- MAKE_ROOM(1);
- // The meta is composed along the way, so just set 0 for now.
- packet_cache.write[0] = 0;
- ofs += 1;
-
- // Encode Node ID.
- if (has_all_peers) {
- // Compress the node ID only if all the target peers already know it.
- if (psc->id >= 0 && psc->id <= 255) {
- // We can encode the id in 1 byte
- node_id_compression = NETWORK_NODE_ID_COMPRESSION_8;
- MAKE_ROOM(ofs + 1);
- packet_cache.write[ofs] = static_cast<uint8_t>(psc->id);
- ofs += 1;
- } else if (psc->id >= 0 && psc->id <= 65535) {
- // We can encode the id in 2 bytes
- node_id_compression = NETWORK_NODE_ID_COMPRESSION_16;
- MAKE_ROOM(ofs + 2);
- encode_uint16(static_cast<uint16_t>(psc->id), &(packet_cache.write[ofs]));
- ofs += 2;
- } else {
- // Too big, let's use 4 bytes.
- node_id_compression = NETWORK_NODE_ID_COMPRESSION_32;
- MAKE_ROOM(ofs + 4);
- encode_uint32(psc->id, &(packet_cache.write[ofs]));
- ofs += 4;
- }
- } else {
- // The targets don't know the node yet, so we need to use 32 bits int.
- node_id_compression = NETWORK_NODE_ID_COMPRESSION_32;
- MAKE_ROOM(ofs + 4);
- encode_uint32(psc->id, &(packet_cache.write[ofs]));
- ofs += 4;
- }
-
- // Encode method ID
- if (p_rpc_id <= UINT8_MAX) {
- // The ID fits in 1 byte
- name_id_compression = NETWORK_NAME_ID_COMPRESSION_8;
- MAKE_ROOM(ofs + 1);
- packet_cache.write[ofs] = static_cast<uint8_t>(p_rpc_id);
- ofs += 1;
- } else {
- // The ID is larger, let's use 2 bytes
- name_id_compression = NETWORK_NAME_ID_COMPRESSION_16;
- MAKE_ROOM(ofs + 2);
- encode_uint16(p_rpc_id, &(packet_cache.write[ofs]));
- ofs += 2;
- }
-
- if (p_argcount == 0) {
- byte_only_or_no_args = true;
- } else if (p_argcount == 1 && p_arg[0]->get_type() == Variant::PACKED_BYTE_ARRAY) {
- byte_only_or_no_args = true;
- // Special optimization when only the byte vector is sent.
- const Vector<uint8_t> data = *p_arg[0];
- MAKE_ROOM(ofs + data.size());
- memcpy(&(packet_cache.write[ofs]), data.ptr(), sizeof(uint8_t) * data.size());
- ofs += data.size();
- } else {
- // Arguments
- MAKE_ROOM(ofs + 1);
- packet_cache.write[ofs] = p_argcount;
- ofs += 1;
- for (int i = 0; i < p_argcount; i++) {
- int len(0);
- Error err = _encode_and_compress_variant(*p_arg[i], nullptr, len);
- ERR_FAIL_COND_MSG(err != OK, "Unable to encode RPC argument. THIS IS LIKELY A BUG IN THE ENGINE!");
- MAKE_ROOM(ofs + len);
- _encode_and_compress_variant(*p_arg[i], &(packet_cache.write[ofs]), len);
- ofs += len;
- }
- }
-
- ERR_FAIL_COND(command_type > 7);
- ERR_FAIL_COND(node_id_compression > 3);
- ERR_FAIL_COND(name_id_compression > 1);
-
- // We can now set the meta
- packet_cache.write[0] = command_type + (node_id_compression << NODE_ID_COMPRESSION_SHIFT) + (name_id_compression << NAME_ID_COMPRESSION_SHIFT) + ((byte_only_or_no_args ? 1 : 0) << BYTE_ONLY_OR_NO_ARGS_SHIFT);
-
-#ifdef DEBUG_ENABLED
- _profile_bandwidth_data("out", ofs);
-#endif
-
- // Take chance and set transfer mode, since all send methods will use it.
- network_peer->set_transfer_channel(p_config.channel);
- network_peer->set_transfer_mode(p_config.transfer_mode);
-
- if (has_all_peers) {
- // They all have verified paths, so send fast.
- network_peer->set_target_peer(p_to); // To all of you.
- network_peer->put_packet(packet_cache.ptr(), ofs); // A message with love.
- } else {
- // Unreachable because the node ID is never compressed if the peers doesn't know it.
- CRASH_COND(node_id_compression != NETWORK_NODE_ID_COMPRESSION_32);
-
- // Not all verified path, so send one by one.
-
- // Append path at the end, since we will need it for some packets.
- CharString pname = String(from_path).utf8();
- int path_len = encode_cstring(pname.get_data(), nullptr);
- MAKE_ROOM(ofs + path_len);
- encode_cstring(pname.get_data(), &(packet_cache.write[ofs]));
-
- for (Set<int>::Element *E = connected_peers.front(); E; E = E->next()) {
- if (p_to < 0 && E->get() == -p_to) {
- continue; // Continue, excluded.
- }
-
- if (p_to > 0 && E->get() != p_to) {
- continue; // Continue, not for this peer.
- }
-
- Map<int, bool>::Element *F = psc->confirmed_peers.find(E->get());
- ERR_CONTINUE(!F); // Should never happen.
-
- network_peer->set_target_peer(E->get()); // To this one specifically.
-
- if (F->get()) {
- // This one confirmed path, so use id.
- encode_uint32(psc->id, &(packet_cache.write[1]));
- network_peer->put_packet(packet_cache.ptr(), ofs);
- } else {
- // This one did not confirm path yet, so use entire path (sorry!).
- encode_uint32(0x80000000 | ofs, &(packet_cache.write[1])); // Offset to path and flag.
- network_peer->put_packet(packet_cache.ptr(), ofs + path_len);
- }
- }
- }
-}
-
-void MultiplayerAPI::_add_peer(int p_id) {
- connected_peers.insert(p_id);
- path_get_cache.insert(p_id, PathGetCache());
- if (is_network_server()) {
- for (const KeyValue<ObjectID, ResourceUID::ID> &E : replicated_nodes) {
- // Only server mode adds to replicated_nodes, no need to check it.
- Object *obj = ObjectDB::get_instance(E.key);
- ERR_CONTINUE(!obj);
- Node *node = Object::cast_to<Node>(obj);
- ERR_CONTINUE(!node);
- _send_spawn_despawn(p_id, E.value, node->get_path(), nullptr, 0, true);
- }
- }
- emit_signal(SNAME("network_peer_connected"), p_id);
-}
-
-void MultiplayerAPI::_del_peer(int p_id) {
- connected_peers.erase(p_id);
- // Cleanup get cache.
- path_get_cache.erase(p_id);
- // Cleanup sent cache.
- // Some refactoring is needed to make this faster and do paths GC.
- List<NodePath> keys;
- path_send_cache.get_key_list(&keys);
- for (const NodePath &E : keys) {
- PathSentCache *psc = path_send_cache.getptr(E);
- psc->confirmed_peers.erase(p_id);
- }
- if (p_id == 1) {
- // Erase server replicated nodes, but do not queue them for deletion.
- replicated_nodes.clear();
- }
- emit_signal(SNAME("network_peer_disconnected"), p_id);
-}
-
-void MultiplayerAPI::_connected_to_server() {
- emit_signal(SNAME("connected_to_server"));
-}
-
-void MultiplayerAPI::_connection_failed() {
- emit_signal(SNAME("connection_failed"));
-}
-
-void MultiplayerAPI::_server_disconnected() {
- emit_signal(SNAME("server_disconnected"));
-}
-
-void MultiplayerAPI::rpcp(Node *p_node, int p_peer_id, bool p_unreliable, const StringName &p_method, const Variant **p_arg, int p_argcount) {
- ERR_FAIL_COND_MSG(!network_peer.is_valid(), "Trying to call an RPC while no network peer is active.");
- ERR_FAIL_COND_MSG(!p_node->is_inside_tree(), "Trying to call an RPC on a node which is not inside SceneTree.");
- ERR_FAIL_COND_MSG(network_peer->get_connection_status() != MultiplayerPeer::CONNECTION_CONNECTED, "Trying to call an RPC via a network peer which is not connected.");
-
- int node_id = network_peer->get_unique_id();
- bool call_local_native = false;
- bool call_local_script = false;
- uint16_t rpc_id = UINT16_MAX;
- const RPCConfig config = _get_rpc_config(p_node, p_method, rpc_id);
- ERR_FAIL_COND_MSG(config.name == StringName(),
- vformat("Unable to get the RPC configuration for the function \"%s\" at path: \"%s\". This happens when the method is not marked for RPCs.", p_method, p_node->get_path()));
- if (p_peer_id == 0 || p_peer_id == node_id || (p_peer_id < 0 && p_peer_id != -node_id)) {
- if (rpc_id & (1 << 15)) {
- call_local_native = config.sync;
- } else {
- call_local_script = config.sync;
- }
- }
-
- if (p_peer_id != node_id) {
-#ifdef DEBUG_ENABLED
- _profile_node_data("out_rpc", p_node->get_instance_id());
-#endif
-
- _send_rpc(p_node, p_peer_id, rpc_id, config, p_method, p_arg, p_argcount);
- }
-
- if (call_local_native) {
- int temp_id = rpc_sender_id;
- rpc_sender_id = get_network_unique_id();
- Callable::CallError ce;
- p_node->call(p_method, p_arg, p_argcount, ce);
- rpc_sender_id = temp_id;
- if (ce.error != Callable::CallError::CALL_OK) {
- String error = Variant::get_call_error_text(p_node, p_method, p_arg, p_argcount, ce);
- error = "rpc() aborted in local call: - " + error + ".";
- ERR_PRINT(error);
- return;
- }
- }
-
- if (call_local_script) {
- int temp_id = rpc_sender_id;
- rpc_sender_id = get_network_unique_id();
- Callable::CallError ce;
- ce.error = Callable::CallError::CALL_OK;
- p_node->get_script_instance()->call(p_method, p_arg, p_argcount, ce);
- rpc_sender_id = temp_id;
- if (ce.error != Callable::CallError::CALL_OK) {
- String error = Variant::get_call_error_text(p_node, p_method, p_arg, p_argcount, ce);
- error = "rpc() aborted in script local call: - " + error + ".";
- ERR_PRINT(error);
- return;
- }
- }
-
- ERR_FAIL_COND_MSG(p_peer_id == node_id && !config.sync, "RPC '" + p_method + "' on yourself is not allowed by selected mode.");
-}
-
-Error MultiplayerAPI::send_bytes(Vector<uint8_t> p_data, int p_to, MultiplayerPeer::TransferMode p_mode, int p_channel) {
- ERR_FAIL_COND_V_MSG(p_data.size() < 1, ERR_INVALID_DATA, "Trying to send an empty raw packet.");
- ERR_FAIL_COND_V_MSG(!network_peer.is_valid(), ERR_UNCONFIGURED, "Trying to send a raw packet while no network peer is active.");
- ERR_FAIL_COND_V_MSG(network_peer->get_connection_status() != MultiplayerPeer::CONNECTION_CONNECTED, ERR_UNCONFIGURED, "Trying to send a raw packet via a network peer which is not connected.");
-
- MAKE_ROOM(p_data.size() + 1);
- const uint8_t *r = p_data.ptr();
- packet_cache.write[0] = NETWORK_COMMAND_RAW;
- memcpy(&packet_cache.write[1], &r[0], p_data.size());
-
- network_peer->set_target_peer(p_to);
- network_peer->set_transfer_channel(p_channel);
- network_peer->set_transfer_mode(p_mode);
-
- return network_peer->put_packet(packet_cache.ptr(), p_data.size() + 1);
-}
-
-void MultiplayerAPI::_process_raw(int p_from, const uint8_t *p_packet, int p_packet_len) {
- ERR_FAIL_COND_MSG(p_packet_len < 2, "Invalid packet received. Size too small.");
-
- Vector<uint8_t> out;
- int len = p_packet_len - 1;
- out.resize(len);
- {
- uint8_t *w = out.ptrw();
- memcpy(&w[0], &p_packet[1], len);
- }
- emit_signal(SNAME("network_peer_packet"), p_from, out);
-}
-
-int MultiplayerAPI::get_network_unique_id() const {
- ERR_FAIL_COND_V_MSG(!network_peer.is_valid(), 0, "No network peer is assigned. Unable to get unique network ID.");
- return network_peer->get_unique_id();
-}
-
-bool MultiplayerAPI::is_network_server() const {
- return network_peer.is_valid() && network_peer->is_server();
-}
-
-void MultiplayerAPI::set_refuse_new_network_connections(bool p_refuse) {
- ERR_FAIL_COND_MSG(!network_peer.is_valid(), "No network peer is assigned. Unable to set 'refuse_new_connections'.");
- network_peer->set_refuse_new_connections(p_refuse);
-}
-
-bool MultiplayerAPI::is_refusing_new_network_connections() const {
- ERR_FAIL_COND_V_MSG(!network_peer.is_valid(), false, "No network peer is assigned. Unable to get 'refuse_new_connections'.");
- return network_peer->is_refusing_new_connections();
-}
-
-Vector<int> MultiplayerAPI::get_network_connected_peers() const {
- ERR_FAIL_COND_V_MSG(!network_peer.is_valid(), Vector<int>(), "No network peer is assigned. Assume no peers are connected.");
-
- Vector<int> ret;
- for (Set<int>::Element *E = connected_peers.front(); E; E = E->next()) {
- ret.push_back(E->get());
- }
-
- return ret;
-}
-
-void MultiplayerAPI::set_allow_object_decoding(bool p_enable) {
- allow_object_decoding = p_enable;
-}
-
-bool MultiplayerAPI::is_object_decoding_allowed() const {
- return allow_object_decoding;
-}
-
-Error MultiplayerAPI::spawnable_config(const ResourceUID::ID &p_id, SpawnMode p_mode) {
- ERR_FAIL_COND_V(p_mode < SPAWN_MODE_NONE || p_mode > SPAWN_MODE_CUSTOM, ERR_INVALID_PARAMETER);
- ERR_FAIL_COND_V(!ResourceUID::get_singleton()->has_id(p_id), ERR_INVALID_PARAMETER);
-#ifdef TOOLS_ENABLED
- String path = ResourceUID::get_singleton()->get_id_path(p_id);
- RES res = ResourceLoader::load(path);
- ERR_FAIL_COND_V(!res->is_class("PackedScene"), ERR_INVALID_PARAMETER);
-#endif
- if (p_mode == SPAWN_MODE_NONE) {
- if (spawnables.has(p_id)) {
- spawnables.erase(p_id);
- }
- } else {
- spawnables[p_id] = p_mode;
- }
- return OK;
-}
-
-Error MultiplayerAPI::send_despawn(int p_peer_id, const ResourceUID::ID &p_scene_id, const NodePath &p_path, const PackedByteArray &p_data) {
- return _send_spawn_despawn(p_peer_id, p_scene_id, p_path, p_data.ptr(), p_data.size(), false);
-}
-
-Error MultiplayerAPI::send_spawn(int p_peer_id, const ResourceUID::ID &p_scene_id, const NodePath &p_path, const PackedByteArray &p_data) {
- return _send_spawn_despawn(p_peer_id, p_scene_id, p_path, p_data.ptr(), p_data.size(), true);
-}
-
-Error MultiplayerAPI::_send_spawn_despawn(int p_peer_id, const ResourceUID::ID &p_scene_id, const NodePath &p_path, const uint8_t *p_data, int p_data_len, bool p_spawn) {
- ERR_FAIL_COND_V(!root_node, ERR_UNCONFIGURED);
- ERR_FAIL_COND_V_MSG(!spawnables.has(p_scene_id), ERR_INVALID_PARAMETER, vformat("Spawnable not found: %d", p_scene_id));
-
- NodePath rel_path = (root_node->get_path()).rel_path_to(p_path);
- const Vector<StringName> names = rel_path.get_names();
- ERR_FAIL_COND_V(names.size() < 2, ERR_INVALID_PARAMETER);
-
- NodePath parent = NodePath(names.subarray(0, names.size() - 2), false);
- ERR_FAIL_COND_V_MSG(!root_node->has_node(parent), ERR_INVALID_PARAMETER, "Path not found: " + parent);
-
- // See if the path is cached.
- PathSentCache *psc = path_send_cache.getptr(parent);
- if (!psc) {
- // Path is not cached, create.
- path_send_cache[parent] = PathSentCache();
- psc = path_send_cache.getptr(parent);
- psc->id = last_send_cache_id++;
- }
- _send_confirm_path(root_node->get_node(parent), parent, psc, p_peer_id);
-
- const CharString cname = String(names[names.size() - 1]).utf8();
- int nlen = encode_cstring(cname.get_data(), nullptr);
- MAKE_ROOM(1 + 8 + 4 + 4 + nlen + p_data_len);
- uint8_t *ptr = packet_cache.ptrw();
- ptr[0] = p_spawn ? NETWORK_COMMAND_SPAWN : NETWORK_COMMAND_DESPAWN;
- int ofs = 1;
- ofs += encode_uint64(p_scene_id, &ptr[ofs]);
- ofs += encode_uint32(psc->id, &ptr[ofs]);
- ofs += encode_uint32(nlen, &ptr[ofs]);
- ofs += encode_cstring(cname.get_data(), &ptr[ofs]);
- memcpy(&ptr[ofs], p_data, p_data_len);
- network_peer->set_target_peer(p_peer_id);
- network_peer->set_transfer_channel(0);
- network_peer->set_transfer_mode(MultiplayerPeer::TRANSFER_MODE_RELIABLE);
- return network_peer->put_packet(ptr, ofs + p_data_len);
-}
-
-void MultiplayerAPI::scene_enter_exit_notify(const String &p_scene, const Node *p_node, bool p_enter) {
- if (!has_network_peer()) {
- return;
- }
- ERR_FAIL_COND(!p_node || !p_node->get_parent() || !root_node);
- NodePath path = (root_node->get_path()).rel_path_to(p_node->get_parent()->get_path());
- if (path.is_empty()) {
- return;
- }
- ResourceUID::ID id = ResourceLoader::get_resource_uid(p_scene);
- if (!spawnables.has(id)) {
- return;
- }
- SpawnMode mode = spawnables[id];
- if (p_enter) {
- if (mode == SPAWN_MODE_SERVER && is_network_server()) {
- replicated_nodes[p_node->get_instance_id()] = id;
- _send_spawn_despawn(0, id, p_node->get_path(), nullptr, 0, true);
- }
- emit_signal(SNAME("network_spawnable_added"), id, p_node);
- } else {
- if (mode == SPAWN_MODE_SERVER && is_network_server() && replicated_nodes.has(p_node->get_instance_id())) {
- replicated_nodes.erase(p_node->get_instance_id());
- _send_spawn_despawn(0, id, p_node->get_path(), nullptr, 0, false);
- }
- emit_signal(SNAME("network_spawnable_removed"), id, p_node);
- }
-}
-
-void MultiplayerAPI::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_root_node", "node"), &MultiplayerAPI::set_root_node);
- ClassDB::bind_method(D_METHOD("get_root_node"), &MultiplayerAPI::get_root_node);
- ClassDB::bind_method(D_METHOD("send_bytes", "bytes", "id", "mode", "channel"), &MultiplayerAPI::send_bytes, DEFVAL(MultiplayerPeer::TARGET_PEER_BROADCAST), DEFVAL(MultiplayerPeer::TRANSFER_MODE_RELIABLE), DEFVAL(0));
- ClassDB::bind_method(D_METHOD("has_network_peer"), &MultiplayerAPI::has_network_peer);
- ClassDB::bind_method(D_METHOD("get_network_peer"), &MultiplayerAPI::get_network_peer);
- ClassDB::bind_method(D_METHOD("get_network_unique_id"), &MultiplayerAPI::get_network_unique_id);
- ClassDB::bind_method(D_METHOD("is_network_server"), &MultiplayerAPI::is_network_server);
- ClassDB::bind_method(D_METHOD("get_rpc_sender_id"), &MultiplayerAPI::get_rpc_sender_id);
- ClassDB::bind_method(D_METHOD("set_network_peer", "peer"), &MultiplayerAPI::set_network_peer);
- ClassDB::bind_method(D_METHOD("poll"), &MultiplayerAPI::poll);
- ClassDB::bind_method(D_METHOD("clear"), &MultiplayerAPI::clear);
-
- ClassDB::bind_method(D_METHOD("get_network_connected_peers"), &MultiplayerAPI::get_network_connected_peers);
- ClassDB::bind_method(D_METHOD("set_refuse_new_network_connections", "refuse"), &MultiplayerAPI::set_refuse_new_network_connections);
- ClassDB::bind_method(D_METHOD("is_refusing_new_network_connections"), &MultiplayerAPI::is_refusing_new_network_connections);
- ClassDB::bind_method(D_METHOD("set_allow_object_decoding", "enable"), &MultiplayerAPI::set_allow_object_decoding);
- ClassDB::bind_method(D_METHOD("is_object_decoding_allowed"), &MultiplayerAPI::is_object_decoding_allowed);
- ClassDB::bind_method(D_METHOD("spawnable_config", "scene_id", "spawn_mode"), &MultiplayerAPI::spawnable_config);
- ClassDB::bind_method(D_METHOD("send_despawn", "peer_id", "scene_id", "path", "data"), &MultiplayerAPI::send_despawn, DEFVAL(PackedByteArray()));
- ClassDB::bind_method(D_METHOD("send_spawn", "peer_id", "scene_id", "path", "data"), &MultiplayerAPI::send_spawn, DEFVAL(PackedByteArray()));
-
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_object_decoding"), "set_allow_object_decoding", "is_object_decoding_allowed");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "refuse_new_network_connections"), "set_refuse_new_network_connections", "is_refusing_new_network_connections");
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "network_peer", PROPERTY_HINT_RESOURCE_TYPE, "MultiplayerPeer", PROPERTY_USAGE_NONE), "set_network_peer", "get_network_peer");
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "root_node", PROPERTY_HINT_RESOURCE_TYPE, "Node", PROPERTY_USAGE_NONE), "set_root_node", "get_root_node");
- ADD_PROPERTY_DEFAULT("refuse_new_network_connections", false);
-
- ADD_SIGNAL(MethodInfo("network_peer_connected", PropertyInfo(Variant::INT, "id")));
- ADD_SIGNAL(MethodInfo("network_peer_disconnected", PropertyInfo(Variant::INT, "id")));
- ADD_SIGNAL(MethodInfo("network_peer_packet", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "packet")));
- ADD_SIGNAL(MethodInfo("connected_to_server"));
- ADD_SIGNAL(MethodInfo("connection_failed"));
- ADD_SIGNAL(MethodInfo("server_disconnected"));
- ADD_SIGNAL(MethodInfo("network_despawn", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data")));
- ADD_SIGNAL(MethodInfo("network_spawn", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data")));
- ADD_SIGNAL(MethodInfo("network_despawn_request", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "parent", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data")));
- ADD_SIGNAL(MethodInfo("network_spawn_request", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "parent", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data")));
- ADD_SIGNAL(MethodInfo("network_spawnable_added", PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
- ADD_SIGNAL(MethodInfo("network_spawnable_removed", PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
-
- BIND_ENUM_CONSTANT(RPC_MODE_DISABLED);
- BIND_ENUM_CONSTANT(RPC_MODE_REMOTE);
- BIND_ENUM_CONSTANT(RPC_MODE_MASTER);
- BIND_ENUM_CONSTANT(RPC_MODE_PUPPET);
-
- BIND_ENUM_CONSTANT(SPAWN_MODE_NONE);
- BIND_ENUM_CONSTANT(SPAWN_MODE_SERVER);
- BIND_ENUM_CONSTANT(SPAWN_MODE_CUSTOM);
-}
-
-MultiplayerAPI::MultiplayerAPI() {
- clear();
-}
-
-MultiplayerAPI::~MultiplayerAPI() {
- clear();
-}
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp
index 8da44fd290..87d2b66e5b 100644
--- a/core/io/packet_peer.cpp
+++ b/core/io/packet_peer.cpp
@@ -138,6 +138,7 @@ Error PacketPeer::_get_packet_error() const {
void PacketPeer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_var", "allow_objects"), &PacketPeer::_bnd_get_var, DEFVAL(false));
ClassDB::bind_method(D_METHOD("put_var", "var", "full_objects"), &PacketPeer::put_var, DEFVAL(false));
+
ClassDB::bind_method(D_METHOD("get_packet"), &PacketPeer::_get_packet);
ClassDB::bind_method(D_METHOD("put_packet", "buffer"), &PacketPeer::_put_packet);
ClassDB::bind_method(D_METHOD("get_packet_error"), &PacketPeer::_get_packet_error);
@@ -151,6 +152,51 @@ void PacketPeer::_bind_methods() {
/***************/
+int PacketPeerExtension::get_available_packet_count() const {
+ int count;
+ if (GDVIRTUAL_CALL(_get_available_packet_count, count)) {
+ return count;
+ }
+ WARN_PRINT_ONCE("PacketPeerExtension::_get_available_packet_count is unimplemented!");
+ return -1;
+}
+
+Error PacketPeerExtension::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
+ int err;
+ if (GDVIRTUAL_CALL(_get_packet, r_buffer, &r_buffer_size, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("PacketPeerExtension::_get_packet_native is unimplemented!");
+ return FAILED;
+}
+
+Error PacketPeerExtension::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
+ int err;
+ if (GDVIRTUAL_CALL(_put_packet, p_buffer, p_buffer_size, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("PacketPeerExtension::_put_packet_native is unimplemented!");
+ return FAILED;
+}
+
+int PacketPeerExtension::get_max_packet_size() const {
+ int size;
+ if (GDVIRTUAL_CALL(_get_max_packet_size, size)) {
+ return size;
+ }
+ WARN_PRINT_ONCE("PacketPeerExtension::_get_max_packet_size is unimplemented!");
+ return 0;
+}
+
+void PacketPeerExtension::_bind_methods() {
+ GDVIRTUAL_BIND(_get_packet, "r_buffer", "r_buffer_size");
+ GDVIRTUAL_BIND(_put_packet, "p_buffer", "p_buffer_size");
+ GDVIRTUAL_BIND(_get_available_packet_count);
+ GDVIRTUAL_BIND(_get_max_packet_size);
+}
+
+/***************/
+
void PacketPeerStream::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_stream_peer", "peer"), &PacketPeerStream::set_stream_peer);
ClassDB::bind_method(D_METHOD("get_stream_peer"), &PacketPeerStream::get_stream_peer);
diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h
index 9a345af3d0..bc1f4aaabf 100644
--- a/core/io/packet_peer.h
+++ b/core/io/packet_peer.h
@@ -35,6 +35,10 @@
#include "core/object/class_db.h"
#include "core/templates/ring_buffer.h"
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
+#include "core/variant/native_ptr.h"
+
class PacketPeer : public RefCounted {
GDCLASS(PacketPeer, RefCounted);
@@ -73,6 +77,25 @@ public:
~PacketPeer() {}
};
+class PacketPeerExtension : public PacketPeer {
+ GDCLASS(PacketPeerExtension, PacketPeer);
+
+protected:
+ static void _bind_methods();
+
+public:
+ virtual int get_available_packet_count() const override;
+ virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) override; ///< buffer is GONE after next get_packet
+ virtual Error put_packet(const uint8_t *p_buffer, int p_buffer_size) override;
+ virtual int get_max_packet_size() const override;
+
+ /* GDExtension */
+ GDVIRTUAL0RC(int, _get_available_packet_count);
+ GDVIRTUAL2R(int, _get_packet, GDNativeConstPtr<const uint8_t *>, GDNativePtr<int>);
+ GDVIRTUAL2R(int, _put_packet, GDNativeConstPtr<const uint8_t>, int);
+ GDVIRTUAL0RC(int, _get_max_packet_size);
+};
+
class PacketPeerStream : public PacketPeer {
GDCLASS(PacketPeerStream, PacketPeer);
diff --git a/core/io/resource.cpp b/core/io/resource.cpp
index 0262655927..87b4d7195d 100644
--- a/core/io/resource.cpp
+++ b/core/io/resource.cpp
@@ -352,9 +352,8 @@ Node *Resource::get_local_scene() const {
}
void Resource::setup_local_to_scene() {
- if (get_script_instance()) {
- get_script_instance()->call("_setup_local_to_scene");
- }
+ // Can't use GDVIRTUAL in Resource, so this will have to be done with a signal
+ emit_signal(SNAME("setup_local_to_scene_requested"));
}
Node *(*Resource::_get_local_scene_func)() = nullptr;
@@ -422,12 +421,12 @@ void Resource::_bind_methods() {
ClassDB::bind_method(D_METHOD("duplicate", "subresources"), &Resource::duplicate, DEFVAL(false));
ADD_SIGNAL(MethodInfo("changed"));
+ ADD_SIGNAL(MethodInfo("setup_local_to_scene_requested"));
+
ADD_GROUP("Resource", "resource_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "resource_local_to_scene"), "set_local_to_scene", "is_local_to_scene");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "resource_path", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_path", "get_path");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "resource_name"), "set_name", "get_name");
-
- BIND_VMETHOD(MethodInfo("_setup_local_to_scene"));
}
Resource::Resource() :
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 00d4d093da..84fd6496a7 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -335,7 +335,7 @@ Error ResourceLoaderBinary::parse_variant(Variant &r_v) {
String exttype = get_unicode_string();
String path = get_unicode_string();
- if (path.find("://") == -1 && path.is_rel_path()) {
+ if (path.find("://") == -1 && path.is_relative_path()) {
// path is relative to file being loaded, so convert to a resource path
path = ProjectSettings::get_singleton()->localize_path(res_path.get_base_dir().plus_file(path));
}
@@ -626,7 +626,7 @@ Error ResourceLoaderBinary::load() {
path = remaps[path];
}
- if (path.find("://") == -1 && path.is_rel_path()) {
+ if (path.find("://") == -1 && path.is_relative_path()) {
// path is relative to file being loaded, so convert to a resource path
path = ProjectSettings::get_singleton()->localize_path(path.get_base_dir().plus_file(external_resources[i].path));
}
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index d02d827443..3026236f07 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -68,25 +68,28 @@ bool ResourceFormatLoader::recognize_path(const String &p_path, const String &p_
}
bool ResourceFormatLoader::handles_type(const String &p_type) const {
- if (get_script_instance() && get_script_instance()->has_method("_handles_type")) {
- // I guess custom loaders for custom resources should use "Resource"
- return get_script_instance()->call("_handles_type", p_type);
+ bool success;
+ if (GDVIRTUAL_CALL(_handles_type, p_type, success)) {
+ return success;
}
return false;
}
String ResourceFormatLoader::get_resource_type(const String &p_path) const {
- if (get_script_instance() && get_script_instance()->has_method("_get_resource_type")) {
- return get_script_instance()->call("_get_resource_type", p_path);
+ String ret;
+
+ if (GDVIRTUAL_CALL(_get_resource_type, p_path, ret)) {
+ return ret;
}
return "";
}
ResourceUID::ID ResourceFormatLoader::get_resource_uid(const String &p_path) const {
- if (get_script_instance() && get_script_instance()->has_method("_get_resource_uid")) {
- return get_script_instance()->call("_get_resource_uid", p_path);
+ int64_t uid;
+ if (GDVIRTUAL_CALL(_get_resource_uid, p_path, uid)) {
+ return uid;
}
return ResourceUID::INVALID_ID;
@@ -105,27 +108,26 @@ void ResourceLoader::get_recognized_extensions_for_type(const String &p_type, Li
}
bool ResourceFormatLoader::exists(const String &p_path) const {
+ bool success;
+ if (GDVIRTUAL_CALL(_exists, p_path, success)) {
+ return success;
+ }
return FileAccess::exists(p_path); //by default just check file
}
void ResourceFormatLoader::get_recognized_extensions(List<String> *p_extensions) const {
- if (get_script_instance() && get_script_instance()->has_method("_get_recognized_extensions")) {
- PackedStringArray exts = get_script_instance()->call("_get_recognized_extensions");
-
- {
- const String *r = exts.ptr();
- for (int i = 0; i < exts.size(); ++i) {
- p_extensions->push_back(r[i]);
- }
+ PackedStringArray exts;
+ if (GDVIRTUAL_CALL(_get_recognized_extensions, exts)) {
+ const String *r = exts.ptr();
+ for (int i = 0; i < exts.size(); ++i) {
+ p_extensions->push_back(r[i]);
}
}
}
RES ResourceFormatLoader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
- // Check user-defined loader if there's any. Hard fail if it returns an error.
- if (get_script_instance() && get_script_instance()->has_method("_load")) {
- Variant res = get_script_instance()->call("_load", p_path, p_original_path, p_use_sub_threads, p_cache_mode);
-
+ Variant res;
+ if (GDVIRTUAL_CALL(_load, p_path, p_original_path, p_use_sub_threads, p_cache_mode, res)) {
if (res.get_type() == Variant::INT) { // Error code, abort.
if (r_error) {
*r_error = (Error)res.operator int64_t();
@@ -143,48 +145,42 @@ RES ResourceFormatLoader::load(const String &p_path, const String &p_original_pa
}
void ResourceFormatLoader::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) {
- if (get_script_instance() && get_script_instance()->has_method("_get_dependencies")) {
- PackedStringArray deps = get_script_instance()->call("_get_dependencies", p_path, p_add_types);
-
- {
- const String *r = deps.ptr();
- for (int i = 0; i < deps.size(); ++i) {
- p_dependencies->push_back(r[i]);
- }
+ PackedStringArray deps;
+ if (GDVIRTUAL_CALL(_get_dependencies, p_path, p_add_types, deps)) {
+ const String *r = deps.ptr();
+ for (int i = 0; i < deps.size(); ++i) {
+ p_dependencies->push_back(r[i]);
}
}
}
Error ResourceFormatLoader::rename_dependencies(const String &p_path, const Map<String, String> &p_map) {
- if (get_script_instance() && get_script_instance()->has_method("_rename_dependencies")) {
- Dictionary deps_dict;
- for (Map<String, String>::Element *E = p_map.front(); E; E = E->next()) {
- deps_dict[E->key()] = E->value();
- }
+ Dictionary deps_dict;
+ for (Map<String, String>::Element *E = p_map.front(); E; E = E->next()) {
+ deps_dict[E->key()] = E->value();
+ }
- int64_t res = get_script_instance()->call("_rename_dependencies", deps_dict);
- return (Error)res;
+ int64_t err;
+ if (GDVIRTUAL_CALL(_rename_dependencies, p_path, deps_dict, err)) {
+ return (Error)err;
}
return OK;
}
void ResourceFormatLoader::_bind_methods() {
- {
- MethodInfo info = MethodInfo(Variant::NIL, "_load", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "original_path"), PropertyInfo(Variant::BOOL, "use_sub_threads"), PropertyInfo(Variant::INT, "cache_mode"));
- info.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
- BIND_VMETHOD(info);
- }
-
- BIND_VMETHOD(MethodInfo(Variant::PACKED_STRING_ARRAY, "_get_recognized_extensions"));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_handles_type", PropertyInfo(Variant::STRING_NAME, "typename")));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_resource_type", PropertyInfo(Variant::STRING, "path")));
- BIND_VMETHOD(MethodInfo("_get_dependencies", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "add_types")));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_rename_dependencies", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "renames")));
-
BIND_ENUM_CONSTANT(CACHE_MODE_IGNORE);
BIND_ENUM_CONSTANT(CACHE_MODE_REUSE);
BIND_ENUM_CONSTANT(CACHE_MODE_REPLACE);
+
+ GDVIRTUAL_BIND(_get_recognized_extensions);
+ GDVIRTUAL_BIND(_handles_type, "type");
+ GDVIRTUAL_BIND(_get_resource_type, "path");
+ GDVIRTUAL_BIND(_get_resource_uid, "path");
+ GDVIRTUAL_BIND(_get_dependencies, "path", "add_types");
+ GDVIRTUAL_BIND(_rename_dependencies, "path", "renames");
+ GDVIRTUAL_BIND(_exists, "path");
+ GDVIRTUAL_BIND(_load, "path", "original_path", "use_sub_threads", "cache_mode");
}
///////////////////////////////////
@@ -282,7 +278,7 @@ static String _validate_local_path(const String &p_path) {
ResourceUID::ID uid = ResourceUID::get_singleton()->text_to_id(p_path);
if (uid != ResourceUID::INVALID_ID) {
return ResourceUID::get_singleton()->get_id_path(uid);
- } else if (p_path.is_rel_path()) {
+ } else if (p_path.is_relative_path()) {
return "res://" + p_path;
} else {
return ProjectSettings::get_singleton()->localize_path(p_path);
diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h
index e525e80a9d..f1d9815635 100644
--- a/core/io/resource_loader.h
+++ b/core/io/resource_loader.h
@@ -32,6 +32,8 @@
#define RESOURCE_LOADER_H
#include "core/io/resource.h"
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
#include "core/os/semaphore.h"
#include "core/os/thread.h"
@@ -48,6 +50,16 @@ public:
protected:
static void _bind_methods();
+ GDVIRTUAL0RC(Vector<String>, _get_recognized_extensions)
+ GDVIRTUAL1RC(bool, _handles_type, StringName)
+ GDVIRTUAL1RC(String, _get_resource_type, String)
+ GDVIRTUAL1RC(ResourceUID::ID, _get_resource_uid, String)
+ GDVIRTUAL2RC(Vector<String>, _get_dependencies, String, bool)
+ GDVIRTUAL2RC(int64_t, _rename_dependencies, String, Dictionary)
+ GDVIRTUAL1RC(bool, _exists, String)
+
+ GDVIRTUAL4RC(Variant, _load, String, String, bool, int)
+
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
virtual bool exists(const String &p_path) const;
diff --git a/core/io/resource_saver.cpp b/core/io/resource_saver.cpp
index 564de5ee69..823b5f75b1 100644
--- a/core/io/resource_saver.cpp
+++ b/core/io/resource_saver.cpp
@@ -42,44 +42,37 @@ ResourceSavedCallback ResourceSaver::save_callback = nullptr;
ResourceSaverGetResourceIDForPath ResourceSaver::save_get_id_for_path = nullptr;
Error ResourceFormatSaver::save(const String &p_path, const RES &p_resource, uint32_t p_flags) {
- if (get_script_instance() && get_script_instance()->has_method("_save")) {
- return (Error)get_script_instance()->call("_save", p_path, p_resource, p_flags).operator int64_t();
+ int64_t res;
+ if (GDVIRTUAL_CALL(_save, p_path, p_resource, p_flags, res)) {
+ return (Error)res;
}
return ERR_METHOD_NOT_FOUND;
}
bool ResourceFormatSaver::recognize(const RES &p_resource) const {
- if (get_script_instance() && get_script_instance()->has_method("_recognize")) {
- return get_script_instance()->call("_recognize", p_resource);
+ bool success;
+ if (GDVIRTUAL_CALL(_recognize, p_resource, success)) {
+ return success;
}
return false;
}
void ResourceFormatSaver::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const {
- if (get_script_instance() && get_script_instance()->has_method("_get_recognized_extensions")) {
- PackedStringArray exts = get_script_instance()->call("_get_recognized_extensions", p_resource);
-
- {
- const String *r = exts.ptr();
- for (int i = 0; i < exts.size(); ++i) {
- p_extensions->push_back(r[i]);
- }
+ PackedStringArray exts;
+ if (GDVIRTUAL_CALL(_get_recognized_extensions, p_resource, exts)) {
+ const String *r = exts.ptr();
+ for (int i = 0; i < exts.size(); ++i) {
+ p_extensions->push_back(r[i]);
}
}
}
void ResourceFormatSaver::_bind_methods() {
- {
- PropertyInfo arg0 = PropertyInfo(Variant::STRING, "path");
- PropertyInfo arg1 = PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource");
- PropertyInfo arg2 = PropertyInfo(Variant::INT, "flags");
- BIND_VMETHOD(MethodInfo(Variant::INT, "_save", arg0, arg1, arg2));
- }
-
- BIND_VMETHOD(MethodInfo(Variant::PACKED_STRING_ARRAY, "_get_recognized_extensions", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_recognize", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource")));
+ GDVIRTUAL_BIND(_save, "path", "resource", "flags");
+ GDVIRTUAL_BIND(_recognize, "resource");
+ GDVIRTUAL_BIND(_get_recognized_extensions, "resource");
}
Error ResourceSaver::save(const String &p_path, const RES &p_resource, uint32_t p_flags) {
diff --git a/core/io/resource_saver.h b/core/io/resource_saver.h
index 2fc8d32126..fcde835dab 100644
--- a/core/io/resource_saver.h
+++ b/core/io/resource_saver.h
@@ -32,6 +32,8 @@
#define RESOURCE_SAVER_H
#include "core/io/resource.h"
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
class ResourceFormatSaver : public RefCounted {
GDCLASS(ResourceFormatSaver, RefCounted);
@@ -39,6 +41,10 @@ class ResourceFormatSaver : public RefCounted {
protected:
static void _bind_methods();
+ GDVIRTUAL3R(int64_t, _save, String, RES, uint32_t)
+ GDVIRTUAL1RC(bool, _recognize, RES)
+ GDVIRTUAL1RC(Vector<String>, _get_recognized_extensions, RES)
+
public:
virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0);
virtual bool recognize(const RES &p_resource) const;
diff --git a/core/io/resource_uid.cpp b/core/io/resource_uid.cpp
index 97d683f415..290a71043c 100644
--- a/core/io/resource_uid.cpp
+++ b/core/io/resource_uid.cpp
@@ -126,8 +126,7 @@ String ResourceUID::get_id_path(ID p_id) const {
MutexLock l(mutex);
ERR_FAIL_COND_V(!unique_ids.has(p_id), String());
const CharString &cs = unique_ids[p_id].cs;
- String s(cs.ptr());
- return s;
+ return String::utf8(cs.ptr());
}
void ResourceUID::remove_id(ID p_id) {
MutexLock l(mutex);
diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp
index 27f8d4e88f..8ab025dda1 100644
--- a/core/io/stream_peer.cpp
+++ b/core/io/stream_peer.cpp
@@ -410,6 +410,63 @@ void StreamPeer::_bind_methods() {
////////////////////////////////
+int StreamPeerExtension::get_available_bytes() const {
+ int count;
+ if (GDVIRTUAL_CALL(_get_available_bytes, count)) {
+ return count;
+ }
+ WARN_PRINT_ONCE("StreamPeerExtension::_get_available_bytes is unimplemented!");
+ return -1;
+}
+
+Error StreamPeerExtension::get_data(uint8_t *r_buffer, int p_bytes) {
+ int err;
+ int received = 0;
+ if (GDVIRTUAL_CALL(_get_data, r_buffer, p_bytes, &received, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("StreamPeerExtension::_get_data is unimplemented!");
+ return FAILED;
+}
+
+Error StreamPeerExtension::get_partial_data(uint8_t *r_buffer, int p_bytes, int &r_received) {
+ int err;
+ if (GDVIRTUAL_CALL(_get_partial_data, r_buffer, p_bytes, &r_received, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("StreamPeerExtension::_get_partial_data is unimplemented!");
+ return FAILED;
+}
+
+Error StreamPeerExtension::put_data(const uint8_t *p_data, int p_bytes) {
+ int err;
+ int sent = 0;
+ if (GDVIRTUAL_CALL(_put_data, p_data, p_bytes, &sent, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("StreamPeerExtension::_put_data is unimplemented!");
+ return FAILED;
+}
+
+Error StreamPeerExtension::put_partial_data(const uint8_t *p_data, int p_bytes, int &r_sent) {
+ int err;
+ if (GDVIRTUAL_CALL(_put_data, p_data, p_bytes, &r_sent, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("StreamPeerExtension::_put_partial_data is unimplemented!");
+ return FAILED;
+}
+
+void StreamPeerExtension::_bind_methods() {
+ GDVIRTUAL_BIND(_get_data, "r_buffer", "r_bytes", "r_received");
+ GDVIRTUAL_BIND(_get_partial_data, "r_buffer", "r_bytes", "r_received");
+ GDVIRTUAL_BIND(_put_data, "p_data", "p_bytes", "r_sent");
+ GDVIRTUAL_BIND(_put_partial_data, "p_data", "p_bytes", "r_sent");
+ GDVIRTUAL_BIND(_get_available_bytes);
+}
+
+////////////////////////////////
+
void StreamPeerBuffer::_bind_methods() {
ClassDB::bind_method(D_METHOD("seek", "position"), &StreamPeerBuffer::seek);
ClassDB::bind_method(D_METHOD("get_size"), &StreamPeerBuffer::get_size);
diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h
index effc3850af..89432951c5 100644
--- a/core/io/stream_peer.h
+++ b/core/io/stream_peer.h
@@ -33,6 +33,10 @@
#include "core/object/ref_counted.h"
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
+#include "core/variant/native_ptr.h"
+
class StreamPeer : public RefCounted {
GDCLASS(StreamPeer, RefCounted);
OBJ_CATEGORY("Networking");
@@ -58,6 +62,7 @@ public:
virtual int get_available_bytes() const = 0;
+ /* helpers */
void set_big_endian(bool p_big_endian);
bool is_big_endian_enabled() const;
@@ -92,6 +97,26 @@ public:
StreamPeer() {}
};
+class StreamPeerExtension : public StreamPeer {
+ GDCLASS(StreamPeerExtension, StreamPeer);
+
+protected:
+ static void _bind_methods();
+
+public:
+ virtual Error put_data(const uint8_t *p_data, int p_bytes) override;
+ virtual Error put_partial_data(const uint8_t *p_data, int p_bytes, int &r_sent) override;
+ virtual Error get_data(uint8_t *p_buffer, int p_bytes) override;
+ virtual Error get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_received) override;
+ virtual int get_available_bytes() const override;
+
+ GDVIRTUAL3R(int, _put_data, GDNativeConstPtr<const uint8_t>, int, GDNativePtr<int>);
+ GDVIRTUAL3R(int, _put_partial_data, GDNativeConstPtr<const uint8_t>, int, GDNativePtr<int>);
+ GDVIRTUAL3R(int, _get_data, GDNativePtr<uint8_t>, int, GDNativePtr<int>);
+ GDVIRTUAL3R(int, _get_partial_data, GDNativePtr<uint8_t>, int, GDNativePtr<int>);
+ GDVIRTUAL0RC(int, _get_available_bytes);
+};
+
class StreamPeerBuffer : public StreamPeer {
GDCLASS(StreamPeerBuffer, StreamPeer);
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index 322eb7ac61..d59dbf1ba8 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -47,8 +47,8 @@ int AStar::get_available_point_id() const {
}
void AStar::add_point(int p_id, const Vector3 &p_pos, real_t p_weight_scale) {
- ERR_FAIL_COND(p_id < 0);
- ERR_FAIL_COND(p_weight_scale < 1);
+ ERR_FAIL_COND_MSG(p_id < 0, vformat("Can't add a point with negative id: %d.", p_id));
+ ERR_FAIL_COND_MSG(p_weight_scale < 1, vformat("Can't add a point with weight scale less than one: %f.", p_weight_scale));
Point *found_pt;
bool p_exists = points.lookup(p_id, found_pt);
@@ -72,7 +72,7 @@ void AStar::add_point(int p_id, const Vector3 &p_pos, real_t p_weight_scale) {
Vector3 AStar::get_point_position(int p_id) const {
Point *p;
bool p_exists = points.lookup(p_id, p);
- ERR_FAIL_COND_V(!p_exists, Vector3());
+ ERR_FAIL_COND_V_MSG(!p_exists, Vector3(), vformat("Can't get point's position. Point with id: %d doesn't exist.", p_id));
return p->pos;
}
@@ -80,7 +80,7 @@ Vector3 AStar::get_point_position(int p_id) const {
void AStar::set_point_position(int p_id, const Vector3 &p_pos) {
Point *p;
bool p_exists = points.lookup(p_id, p);
- ERR_FAIL_COND(!p_exists);
+ ERR_FAIL_COND_MSG(!p_exists, vformat("Can't set point's position. Point with id: %d doesn't exist.", p_id));
p->pos = p_pos;
}
@@ -88,7 +88,7 @@ void AStar::set_point_position(int p_id, const Vector3 &p_pos) {
real_t AStar::get_point_weight_scale(int p_id) const {
Point *p;
bool p_exists = points.lookup(p_id, p);
- ERR_FAIL_COND_V(!p_exists, 0);
+ ERR_FAIL_COND_V_MSG(!p_exists, 0, vformat("Can't get point's weight scale. Point with id: %d doesn't exist.", p_id));
return p->weight_scale;
}
@@ -96,8 +96,8 @@ real_t AStar::get_point_weight_scale(int p_id) const {
void AStar::set_point_weight_scale(int p_id, real_t p_weight_scale) {
Point *p;
bool p_exists = points.lookup(p_id, p);
- ERR_FAIL_COND(!p_exists);
- ERR_FAIL_COND(p_weight_scale < 1);
+ ERR_FAIL_COND_MSG(!p_exists, vformat("Can't set point's weight scale. Point with id: %d doesn't exist.", p_id));
+ ERR_FAIL_COND_MSG(p_weight_scale < 1, vformat("Can't set point's weight scale less than one: %f.", p_weight_scale));
p->weight_scale = p_weight_scale;
}
@@ -105,7 +105,7 @@ void AStar::set_point_weight_scale(int p_id, real_t p_weight_scale) {
void AStar::remove_point(int p_id) {
Point *p;
bool p_exists = points.lookup(p_id, p);
- ERR_FAIL_COND(!p_exists);
+ ERR_FAIL_COND_MSG(!p_exists, vformat("Can't remove point. Point with id: %d doesn't exist.", p_id));
for (OAHashMap<int, Point *>::Iterator it = p->neighbours.iter(); it.valid; it = p->neighbours.next_iter(it)) {
Segment s(p_id, (*it.key));
@@ -129,15 +129,15 @@ void AStar::remove_point(int p_id) {
}
void AStar::connect_points(int p_id, int p_with_id, bool bidirectional) {
- ERR_FAIL_COND(p_id == p_with_id);
+ ERR_FAIL_COND_MSG(p_id == p_with_id, vformat("Can't connect point with id: %d to itself.", p_id));
Point *a;
bool from_exists = points.lookup(p_id, a);
- ERR_FAIL_COND(!from_exists);
+ ERR_FAIL_COND_MSG(!from_exists, vformat("Can't connect points. Point with id: %d doesn't exist.", p_id));
Point *b;
bool to_exists = points.lookup(p_with_id, b);
- ERR_FAIL_COND(!to_exists);
+ ERR_FAIL_COND_MSG(!to_exists, vformat("Can't connect points. Point with id: %d doesn't exist.", p_with_id));
a->neighbours.set(b->id, b);
@@ -169,11 +169,11 @@ void AStar::connect_points(int p_id, int p_with_id, bool bidirectional) {
void AStar::disconnect_points(int p_id, int p_with_id, bool bidirectional) {
Point *a;
bool a_exists = points.lookup(p_id, a);
- ERR_FAIL_COND(!a_exists);
+ ERR_FAIL_COND_MSG(!a_exists, vformat("Can't disconnect points. Point with id: %d doesn't exist.", p_id));
Point *b;
bool b_exists = points.lookup(p_with_id, b);
- ERR_FAIL_COND(!b_exists);
+ ERR_FAIL_COND_MSG(!b_exists, vformat("Can't disconnect points. Point with id: %d doesn't exist.", p_with_id));
Segment s(p_id, p_with_id);
int remove_direction = bidirectional ? (int)Segment::BIDIRECTIONAL : s.direction;
@@ -223,7 +223,7 @@ Array AStar::get_points() {
Vector<int> AStar::get_point_connections(int p_id) {
Point *p;
bool p_exists = points.lookup(p_id, p);
- ERR_FAIL_COND_V(!p_exists, Vector<int>());
+ ERR_FAIL_COND_V_MSG(!p_exists, Vector<int>(), vformat("Can't get point's connections. Point with id: %d doesn't exist.", p_id));
Vector<int> point_list;
@@ -260,8 +260,8 @@ int AStar::get_point_capacity() const {
}
void AStar::reserve_space(int p_num_nodes) {
- ERR_FAIL_COND_MSG(p_num_nodes <= 0, "New capacity must be greater than 0, was: " + itos(p_num_nodes) + ".");
- ERR_FAIL_COND_MSG((uint32_t)p_num_nodes < points.get_capacity(), "New capacity must be greater than current capacity: " + itos(points.get_capacity()) + ", new was: " + itos(p_num_nodes) + ".");
+ ERR_FAIL_COND_MSG(p_num_nodes <= 0, vformat("New capacity must be greater than 0, new was: %d.", p_num_nodes));
+ ERR_FAIL_COND_MSG((uint32_t)p_num_nodes < points.get_capacity(), vformat("New capacity must be greater than current capacity: %d, new was: %d.", points.get_capacity(), p_num_nodes));
points.reserve(p_num_nodes);
}
@@ -382,33 +382,35 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
}
real_t AStar::_estimate_cost(int p_from_id, int p_to_id) {
- if (get_script_instance() && get_script_instance()->has_method(SceneStringNames::get_singleton()->_estimate_cost)) {
- return get_script_instance()->call(SceneStringNames::get_singleton()->_estimate_cost, p_from_id, p_to_id);
+ real_t scost;
+ if (GDVIRTUAL_CALL(_estimate_cost, p_from_id, p_to_id, scost)) {
+ return scost;
}
Point *from_point;
bool from_exists = points.lookup(p_from_id, from_point);
- ERR_FAIL_COND_V(!from_exists, 0);
+ ERR_FAIL_COND_V_MSG(!from_exists, 0, vformat("Can't estimate cost. Point with id: %d doesn't exist.", p_from_id));
Point *to_point;
bool to_exists = points.lookup(p_to_id, to_point);
- ERR_FAIL_COND_V(!to_exists, 0);
+ ERR_FAIL_COND_V_MSG(!to_exists, 0, vformat("Can't estimate cost. Point with id: %d doesn't exist.", p_to_id));
return from_point->pos.distance_to(to_point->pos);
}
real_t AStar::_compute_cost(int p_from_id, int p_to_id) {
- if (get_script_instance() && get_script_instance()->has_method(SceneStringNames::get_singleton()->_compute_cost)) {
- return get_script_instance()->call(SceneStringNames::get_singleton()->_compute_cost, p_from_id, p_to_id);
+ real_t scost;
+ if (GDVIRTUAL_CALL(_compute_cost, p_from_id, p_to_id, scost)) {
+ return scost;
}
Point *from_point;
bool from_exists = points.lookup(p_from_id, from_point);
- ERR_FAIL_COND_V(!from_exists, 0);
+ ERR_FAIL_COND_V_MSG(!from_exists, 0, vformat("Can't compute cost. Point with id: %d doesn't exist.", p_from_id));
Point *to_point;
bool to_exists = points.lookup(p_to_id, to_point);
- ERR_FAIL_COND_V(!to_exists, 0);
+ ERR_FAIL_COND_V_MSG(!to_exists, 0, vformat("Can't compute cost. Point with id: %d doesn't exist.", p_to_id));
return from_point->pos.distance_to(to_point->pos);
}
@@ -416,11 +418,11 @@ real_t AStar::_compute_cost(int p_from_id, int p_to_id) {
Vector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) {
Point *a;
bool from_exists = points.lookup(p_from_id, a);
- ERR_FAIL_COND_V(!from_exists, Vector<Vector3>());
+ ERR_FAIL_COND_V_MSG(!from_exists, Vector<Vector3>(), vformat("Can't get point path. Point with id: %d doesn't exist.", p_from_id));
Point *b;
bool to_exists = points.lookup(p_to_id, b);
- ERR_FAIL_COND_V(!to_exists, Vector<Vector3>());
+ ERR_FAIL_COND_V_MSG(!to_exists, Vector<Vector3>(), vformat("Can't get point path. Point with id: %d doesn't exist.", p_to_id));
if (a == b) {
Vector<Vector3> ret;
@@ -465,11 +467,11 @@ Vector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) {
Vector<int> AStar::get_id_path(int p_from_id, int p_to_id) {
Point *a;
bool from_exists = points.lookup(p_from_id, a);
- ERR_FAIL_COND_V(!from_exists, Vector<int>());
+ ERR_FAIL_COND_V_MSG(!from_exists, Vector<int>(), vformat("Can't get id path. Point with id: %d doesn't exist.", p_from_id));
Point *b;
bool to_exists = points.lookup(p_to_id, b);
- ERR_FAIL_COND_V(!to_exists, Vector<int>());
+ ERR_FAIL_COND_V_MSG(!to_exists, Vector<int>(), vformat("Can't get id path. Point with id: %d doesn't exist.", p_to_id));
if (a == b) {
Vector<int> ret;
@@ -514,7 +516,7 @@ Vector<int> AStar::get_id_path(int p_from_id, int p_to_id) {
void AStar::set_point_disabled(int p_id, bool p_disabled) {
Point *p;
bool p_exists = points.lookup(p_id, p);
- ERR_FAIL_COND(!p_exists);
+ ERR_FAIL_COND_MSG(!p_exists, vformat("Can't set if point is disabled. Point with id: %d doesn't exist.", p_id));
p->enabled = !p_disabled;
}
@@ -522,7 +524,7 @@ void AStar::set_point_disabled(int p_id, bool p_disabled) {
bool AStar::is_point_disabled(int p_id) const {
Point *p;
bool p_exists = points.lookup(p_id, p);
- ERR_FAIL_COND_V(!p_exists, false);
+ ERR_FAIL_COND_V_MSG(!p_exists, false, vformat("Can't get if point is disabled. Point with id: %d doesn't exist.", p_id));
return !p->enabled;
}
@@ -557,8 +559,8 @@ void AStar::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_point_path", "from_id", "to_id"), &AStar::get_point_path);
ClassDB::bind_method(D_METHOD("get_id_path", "from_id", "to_id"), &AStar::get_id_path);
- BIND_VMETHOD(MethodInfo(Variant::FLOAT, "_estimate_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
- BIND_VMETHOD(MethodInfo(Variant::FLOAT, "_compute_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
+ GDVIRTUAL_BIND(_estimate_cost, "from_id", "to_id")
+ GDVIRTUAL_BIND(_compute_cost, "from_id", "to_id")
}
AStar::~AStar() {
@@ -654,33 +656,35 @@ Vector2 AStar2D::get_closest_position_in_segment(const Vector2 &p_point) const {
}
real_t AStar2D::_estimate_cost(int p_from_id, int p_to_id) {
- if (get_script_instance() && get_script_instance()->has_method(SceneStringNames::get_singleton()->_estimate_cost)) {
- return get_script_instance()->call(SceneStringNames::get_singleton()->_estimate_cost, p_from_id, p_to_id);
+ real_t scost;
+ if (GDVIRTUAL_CALL(_estimate_cost, p_from_id, p_to_id, scost)) {
+ return scost;
}
AStar::Point *from_point;
bool from_exists = astar.points.lookup(p_from_id, from_point);
- ERR_FAIL_COND_V(!from_exists, 0);
+ ERR_FAIL_COND_V_MSG(!from_exists, 0, vformat("Can't estimate cost. Point with id: %d doesn't exist.", p_from_id));
AStar::Point *to_point;
bool to_exists = astar.points.lookup(p_to_id, to_point);
- ERR_FAIL_COND_V(!to_exists, 0);
+ ERR_FAIL_COND_V_MSG(!to_exists, 0, vformat("Can't estimate cost. Point with id: %d doesn't exist.", p_to_id));
return from_point->pos.distance_to(to_point->pos);
}
real_t AStar2D::_compute_cost(int p_from_id, int p_to_id) {
- if (get_script_instance() && get_script_instance()->has_method(SceneStringNames::get_singleton()->_compute_cost)) {
- return get_script_instance()->call(SceneStringNames::get_singleton()->_compute_cost, p_from_id, p_to_id);
+ real_t scost;
+ if (GDVIRTUAL_CALL(_compute_cost, p_from_id, p_to_id, scost)) {
+ return scost;
}
AStar::Point *from_point;
bool from_exists = astar.points.lookup(p_from_id, from_point);
- ERR_FAIL_COND_V(!from_exists, 0);
+ ERR_FAIL_COND_V_MSG(!from_exists, 0, vformat("Can't compute cost. Point with id: %d doesn't exist.", p_from_id));
AStar::Point *to_point;
bool to_exists = astar.points.lookup(p_to_id, to_point);
- ERR_FAIL_COND_V(!to_exists, 0);
+ ERR_FAIL_COND_V_MSG(!to_exists, 0, vformat("Can't compute cost. Point with id: %d doesn't exist.", p_to_id));
return from_point->pos.distance_to(to_point->pos);
}
@@ -688,11 +692,11 @@ real_t AStar2D::_compute_cost(int p_from_id, int p_to_id) {
Vector<Vector2> AStar2D::get_point_path(int p_from_id, int p_to_id) {
AStar::Point *a;
bool from_exists = astar.points.lookup(p_from_id, a);
- ERR_FAIL_COND_V(!from_exists, Vector<Vector2>());
+ ERR_FAIL_COND_V_MSG(!from_exists, Vector<Vector2>(), vformat("Can't get point path. Point with id: %d doesn't exist.", p_from_id));
AStar::Point *b;
bool to_exists = astar.points.lookup(p_to_id, b);
- ERR_FAIL_COND_V(!to_exists, Vector<Vector2>());
+ ERR_FAIL_COND_V_MSG(!to_exists, Vector<Vector2>(), vformat("Can't get point path. Point with id: %d doesn't exist.", p_to_id));
if (a == b) {
Vector<Vector2> ret;
@@ -737,11 +741,11 @@ Vector<Vector2> AStar2D::get_point_path(int p_from_id, int p_to_id) {
Vector<int> AStar2D::get_id_path(int p_from_id, int p_to_id) {
AStar::Point *a;
bool from_exists = astar.points.lookup(p_from_id, a);
- ERR_FAIL_COND_V(!from_exists, Vector<int>());
+ ERR_FAIL_COND_V_MSG(!from_exists, Vector<int>(), vformat("Can't get id path. Point with id: %d doesn't exist.", p_from_id));
AStar::Point *b;
bool to_exists = astar.points.lookup(p_to_id, b);
- ERR_FAIL_COND_V(!to_exists, Vector<int>());
+ ERR_FAIL_COND_V_MSG(!to_exists, Vector<int>(), vformat("Can't get id path. Point with id: %d doesn't exist.", p_to_id));
if (a == b) {
Vector<int> ret;
@@ -875,6 +879,6 @@ void AStar2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_point_path", "from_id", "to_id"), &AStar2D::get_point_path);
ClassDB::bind_method(D_METHOD("get_id_path", "from_id", "to_id"), &AStar2D::get_id_path);
- BIND_VMETHOD(MethodInfo(Variant::FLOAT, "_estimate_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
- BIND_VMETHOD(MethodInfo(Variant::FLOAT, "_compute_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
+ GDVIRTUAL_BIND(_estimate_cost, "from_id", "to_id")
+ GDVIRTUAL_BIND(_compute_cost, "from_id", "to_id")
}
diff --git a/core/math/a_star.h b/core/math/a_star.h
index 44758cb046..64fa32a325 100644
--- a/core/math/a_star.h
+++ b/core/math/a_star.h
@@ -31,7 +31,9 @@
#ifndef A_STAR_H
#define A_STAR_H
+#include "core/object/gdvirtual.gen.inc"
#include "core/object/ref_counted.h"
+#include "core/object/script_language.h"
#include "core/templates/oa_hash_map.h"
/**
@@ -122,6 +124,9 @@ protected:
virtual real_t _estimate_cost(int p_from_id, int p_to_id);
virtual real_t _compute_cost(int p_from_id, int p_to_id);
+ GDVIRTUAL2RC(real_t, _estimate_cost, int64_t, int64_t)
+ GDVIRTUAL2RC(real_t, _compute_cost, int64_t, int64_t)
+
public:
int get_available_point_id() const;
@@ -169,6 +174,9 @@ protected:
virtual real_t _estimate_cost(int p_from_id, int p_to_id);
virtual real_t _compute_cost(int p_from_id, int p_to_id);
+ GDVIRTUAL2RC(real_t, _estimate_cost, int64_t, int64_t)
+ GDVIRTUAL2RC(real_t, _compute_cost, int64_t, int64_t)
+
public:
int get_available_point_id() const;
diff --git a/core/math/aabb.cpp b/core/math/aabb.cpp
index 33aa65f15d..51a1309f0e 100644
--- a/core/math/aabb.cpp
+++ b/core/math/aabb.cpp
@@ -52,8 +52,8 @@ void AABB::merge_with(const AABB &p_aabb) {
beg_1 = position;
beg_2 = p_aabb.position;
- end_1 = Vector3(size.x, size.y, size.z) + beg_1;
- end_2 = Vector3(p_aabb.size.x, p_aabb.size.y, p_aabb.size.z) + beg_2;
+ end_1 = size + beg_1;
+ end_2 = p_aabb.size + beg_2;
min.x = (beg_1.x < beg_2.x) ? beg_1.x : beg_2.x;
min.y = (beg_1.y < beg_2.y) ? beg_1.y : beg_2.y;
diff --git a/core/math/aabb.h b/core/math/aabb.h
index e16246902a..97d92fbe37 100644
--- a/core/math/aabb.h
+++ b/core/math/aabb.h
@@ -118,6 +118,10 @@ public:
return position + size;
}
+ _FORCE_INLINE_ Vector3 get_center() const {
+ return position + (size * 0.5);
+ }
+
operator String() const;
_FORCE_INLINE_ AABB() {}
diff --git a/core/math/basis.cpp b/core/math/basis.cpp
index 5c42213e61..a7f89522d7 100644
--- a/core/math/basis.cpp
+++ b/core/math/basis.cpp
@@ -207,6 +207,10 @@ Basis Basis::transposed() const {
return tr;
}
+Basis Basis::from_scale(const Vector3 &p_scale) {
+ return Basis(p_scale.x, 0, 0, 0, p_scale.y, 0, 0, 0, p_scale.z);
+}
+
// Multiplies the matrix from left by the scaling matrix: M -> S.M
// See the comment for Basis::rotated for further explanation.
void Basis::scale(const Vector3 &p_scale) {
@@ -246,10 +250,7 @@ void Basis::make_scale_uniform() {
}
Basis Basis::scaled_local(const Vector3 &p_scale) const {
- Basis b;
- b.set_diagonal(p_scale);
-
- return (*this) * b;
+ return (*this) * Basis::from_scale(p_scale);
}
Vector3 Basis::get_scale_abs() const {
@@ -775,7 +776,7 @@ Basis::operator String() const {
Quaternion Basis::get_quaternion() const {
#ifdef MATH_CHECKS
- ERR_FAIL_COND_V_MSG(!is_rotation(), Quaternion(), "Basis must be normalized in order to be casted to a Quaternion. Use get_rotation_quaternion() or call orthonormalized() instead.");
+ ERR_FAIL_COND_V_MSG(!is_rotation(), Quaternion(), "Basis must be normalized in order to be casted to a Quaternion. Use get_rotation_quaternion() or call orthonormalized() if the Basis contains linearly independent vectors.");
#endif
/* Allow getting a quaternion from an unnormalized transform */
Basis m = *this;
@@ -991,21 +992,23 @@ void Basis::set_axis_angle(const Vector3 &p_axis, real_t p_phi) {
}
void Basis::set_axis_angle_scale(const Vector3 &p_axis, real_t p_phi, const Vector3 &p_scale) {
- set_diagonal(p_scale);
+ _set_diagonal(p_scale);
rotate(p_axis, p_phi);
}
void Basis::set_euler_scale(const Vector3 &p_euler, const Vector3 &p_scale) {
- set_diagonal(p_scale);
+ _set_diagonal(p_scale);
rotate(p_euler);
}
void Basis::set_quaternion_scale(const Quaternion &p_quaternion, const Vector3 &p_scale) {
- set_diagonal(p_scale);
+ _set_diagonal(p_scale);
rotate(p_quaternion);
}
-void Basis::set_diagonal(const Vector3 &p_diag) {
+// This also sets the non-diagonal elements to 0, which is misleading from the
+// name, so we want this method to be private. Use `from_scale` externally.
+void Basis::_set_diagonal(const Vector3 &p_diag) {
elements[0][0] = p_diag.x;
elements[0][1] = 0;
elements[0][2] = 0;
diff --git a/core/math/basis.h b/core/math/basis.h
index 9d8ed16e29..eb107d7e4e 100644
--- a/core/math/basis.h
+++ b/core/math/basis.h
@@ -35,6 +35,9 @@
#include "core/math/vector3.h"
class Basis {
+private:
+ void _set_diagonal(const Vector3 &p_diag);
+
public:
Vector3 elements[3] = {
Vector3(1, 0, 0),
@@ -166,8 +169,6 @@ public:
int get_orthogonal_index() const;
void set_orthogonal_index(int p_index);
- void set_diagonal(const Vector3 &p_diag);
-
bool is_orthogonal() const;
bool is_diagonal() const;
bool is_rotation() const;
@@ -254,6 +255,7 @@ public:
Basis(const Vector3 &p_axis, real_t p_phi) { set_axis_angle(p_axis, p_phi); }
Basis(const Vector3 &p_axis, real_t p_phi, const Vector3 &p_scale) { set_axis_angle_scale(p_axis, p_phi, p_scale); }
+ static Basis from_scale(const Vector3 &p_scale);
_FORCE_INLINE_ Basis(const Vector3 &row0, const Vector3 &row1, const Vector3 &row2) {
elements[0] = row0;
diff --git a/core/math/bvh_cull.inc b/core/math/bvh_cull.inc
index cba8ea6cb3..d7edc8a884 100644
--- a/core/math/bvh_cull.inc
+++ b/core/math/bvh_cull.inc
@@ -14,7 +14,7 @@ struct CullParams {
uint32_t pairable_type;
// optional components for different tests
- Vector3 point;
+ Point point;
BVHABB_CLASS abb;
typename BVHABB_CLASS::ConvexHull hull;
typename BVHABB_CLASS::Segment segment;
diff --git a/core/math/bvh_debug.inc b/core/math/bvh_debug.inc
index a97304334c..55db794ee3 100644
--- a/core/math/bvh_debug.inc
+++ b/core/math/bvh_debug.inc
@@ -6,24 +6,21 @@ void _debug_recursive_print_tree(int p_tree_id) const {
}
String _debug_aabb_to_string(const BVHABB_CLASS &aabb) const {
- String sz = "(";
- sz += itos(aabb.min.x);
- sz += " ~ ";
- sz += itos(-aabb.neg_max.x);
- sz += ") (";
+ Point size = aabb.calculate_size();
- sz += itos(aabb.min.y);
- sz += " ~ ";
- sz += itos(-aabb.neg_max.y);
- sz += ") (";
+ String sz;
+ float vol = 0.0;
- sz += itos(aabb.min.z);
- sz += " ~ ";
- sz += itos(-aabb.neg_max.z);
- sz += ") ";
+ for (int i = 0; i < Point::AXES_COUNT; ++i) {
+ sz += "(";
+ sz += itos(aabb.min[i]);
+ sz += " ~ ";
+ sz += itos(-aabb.neg_max[i]);
+ sz += ") ";
+
+ vol += size[i];
+ }
- Vector3 size = aabb.calculate_size();
- float vol = size.x * size.y * size.z;
sz += "vol " + itos(vol);
return sz;
diff --git a/core/math/bvh_split.inc b/core/math/bvh_split.inc
index 3fcc4c7b10..6f54d06ce7 100644
--- a/core/math/bvh_split.inc
+++ b/core/math/bvh_split.inc
@@ -28,11 +28,15 @@ void _split_leaf_sort_groups_simple(int &num_a, int &num_b, uint16_t *group_a, u
Point centre = full_bound.calculate_centre();
Point size = full_bound.calculate_size();
- int order[3];
+ int order[Point::AXIS_COUNT];
order[0] = size.min_axis();
- order[2] = size.max_axis();
- order[1] = 3 - (order[0] + order[2]);
+ order[Point::AXIS_COUNT - 1] = size.max_axis();
+
+ static_assert(Point::AXIS_COUNT <= 3);
+ if (Point::AXIS_COUNT == 3) {
+ order[1] = 3 - (order[0] + order[2]);
+ }
// simplest case, split on the longest axis
int split_axis = order[0];
@@ -54,7 +58,7 @@ void _split_leaf_sort_groups_simple(int &num_a, int &num_b, uint16_t *group_a, u
// detect when split on longest axis failed
int min_threshold = MAX_ITEMS / 4;
- int min_group_size[3];
+ int min_group_size[Point::AXIS_COUNT];
min_group_size[0] = MIN(num_a, num_b);
if (min_group_size[0] < min_threshold) {
// slow but sure .. first move everything back into a
@@ -64,7 +68,7 @@ void _split_leaf_sort_groups_simple(int &num_a, int &num_b, uint16_t *group_a, u
num_b = 0;
// now calculate the best split
- for (int axis = 1; axis < 3; axis++) {
+ for (int axis = 1; axis < Point::AXIS_COUNT; axis++) {
split_axis = order[axis];
int count = 0;
@@ -82,7 +86,7 @@ void _split_leaf_sort_groups_simple(int &num_a, int &num_b, uint16_t *group_a, u
// best axis
int best_axis = 0;
int best_min = min_group_size[0];
- for (int axis = 1; axis < 3; axis++) {
+ for (int axis = 1; axis < Point::AXIS_COUNT; axis++) {
if (min_group_size[axis] > best_min) {
best_min = min_group_size[axis];
best_axis = axis;
diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp
index 66c18f7b3c..8066a59281 100644
--- a/core/math/camera_matrix.cpp
+++ b/core/math/camera_matrix.cpp
@@ -341,8 +341,8 @@ bool CameraMatrix::get_endpoints(const Transform3D &p_transform, Vector3 *p_8poi
Vector<Plane> CameraMatrix::get_projection_planes(const Transform3D &p_transform) const {
/** Fast Plane Extraction from combined modelview/projection matrices.
* References:
- * https://web.archive.org/web/20011221205252/http://www.markmorley.com/opengl/frustumculling.html
- * https://web.archive.org/web/20061020020112/http://www2.ravensoft.com/users/ggribb/plane%20extraction.pdf
+ * https://web.archive.org/web/20011221205252/https://www.markmorley.com/opengl/frustumculling.html
+ * https://web.archive.org/web/20061020020112/https://www2.ravensoft.com/users/ggribb/plane%20extraction.pdf
*/
Vector<Plane> planes;
diff --git a/core/math/convex_hull.cpp b/core/math/convex_hull.cpp
index 682a7ea39e..f67035c803 100644
--- a/core/math/convex_hull.cpp
+++ b/core/math/convex_hull.cpp
@@ -2260,10 +2260,21 @@ Error ConvexHullComputer::convex_hull(const Vector<Vector3> &p_points, Geometry3
r_mesh.vertices = ch.vertices;
- r_mesh.edges.resize(ch.edges.size());
+ // Copy the edges over. There's two "half-edges" for every edge, so we pick only one of them.
+ r_mesh.edges.resize(ch.edges.size() / 2);
+ uint32_t edges_copied = 0;
for (uint32_t i = 0; i < ch.edges.size(); i++) {
- r_mesh.edges.write[i].a = (&ch.edges[i])->get_source_vertex();
- r_mesh.edges.write[i].b = (&ch.edges[i])->get_target_vertex();
+ uint32_t a = (&ch.edges[i])->get_source_vertex();
+ uint32_t b = (&ch.edges[i])->get_target_vertex();
+ if (a < b) { // Copy only the "canonical" edge. For the reverse edge, this will be false.
+ ERR_BREAK(edges_copied >= (uint32_t)r_mesh.edges.size());
+ r_mesh.edges.write[edges_copied].a = a;
+ r_mesh.edges.write[edges_copied].b = b;
+ edges_copied++;
+ }
+ }
+ if (edges_copied != (uint32_t)r_mesh.edges.size()) {
+ ERR_PRINT("Invalid edge count.");
}
r_mesh.faces.resize(ch.faces.size());
@@ -2278,9 +2289,18 @@ Error ConvexHullComputer::convex_hull(const Vector<Vector3> &p_points, Geometry3
e = e->get_next_edge_of_face();
} while (e != e_start);
+ // reverse indices: Godot wants clockwise, but this is counter-clockwise
+ if (face.indices.size() > 2) {
+ // reverse all but the first index.
+ int *indices = face.indices.ptrw();
+ for (int c = 0; c < (face.indices.size() - 1) / 2; c++) {
+ SWAP(indices[c + 1], indices[face.indices.size() - 1 - c]);
+ }
+ }
+
// compute normal
if (face.indices.size() >= 3) {
- face.plane = Plane(r_mesh.vertices[face.indices[0]], r_mesh.vertices[face.indices[2]], r_mesh.vertices[face.indices[1]]);
+ face.plane = Plane(r_mesh.vertices[face.indices[0]], r_mesh.vertices[face.indices[1]], r_mesh.vertices[face.indices[2]]);
} else {
WARN_PRINT("Too few vertices per face.");
}
diff --git a/core/math/convex_hull.h b/core/math/convex_hull.h
index ba7be9c5e8..806c6cc3fb 100644
--- a/core/math/convex_hull.h
+++ b/core/math/convex_hull.h
@@ -49,7 +49,7 @@ subject to the following restrictions:
#include "core/templates/vector.h"
/// Convex hull implementation based on Preparata and Hong
-/// See http://code.google.com/p/bullet/issues/detail?id=275
+/// See https://code.google.com/archive/p/bullet/issues/275
/// Ole Kniemeyer, MAXON Computer GmbH
class ConvexHullComputer {
public:
diff --git a/core/math/delaunay_2d.h b/core/math/delaunay_2d.h
index 95064e5700..2f80cb5634 100644
--- a/core/math/delaunay_2d.h
+++ b/core/math/delaunay_2d.h
@@ -101,7 +101,7 @@ public:
}
float delta_max = MAX(rect.size.width, rect.size.height);
- Vector2 center = rect.position + rect.size * 0.5;
+ Vector2 center = rect.get_center();
points.push_back(Vector2(center.x - 20 * delta_max, center.y - delta_max));
points.push_back(Vector2(center.x, center.y + 20 * delta_max));
diff --git a/core/math/face3.cpp b/core/math/face3.cpp
index 9af3f868d2..045ab67ce8 100644
--- a/core/math/face3.cpp
+++ b/core/math/face3.cpp
@@ -151,8 +151,8 @@ Face3::Side Face3::get_side_of(const Face3 &p_face, ClockDirection p_clock_dir)
}
Vector3 Face3::get_random_point_inside() const {
- real_t a = Math::random(0, 1);
- real_t b = Math::random(0, 1);
+ real_t a = Math::random(0.0, 1.0);
+ real_t b = Math::random(0.0, 1.0);
if (a > b) {
SWAP(a, b);
}
diff --git a/core/math/geometry_2d.h b/core/math/geometry_2d.h
index e1a5bfe6f2..8e5830f9b3 100644
--- a/core/math/geometry_2d.h
+++ b/core/math/geometry_2d.h
@@ -182,7 +182,15 @@ public:
C = Vector2(C.x * Bn.x + C.y * Bn.y, C.y * Bn.x - C.x * Bn.y);
D = Vector2(D.x * Bn.x + D.y * Bn.y, D.y * Bn.x - D.x * Bn.y);
- if ((C.y < 0 && D.y < 0) || (C.y >= 0 && D.y >= 0)) {
+ // Fail if C x B and D x B have the same sign (segments don't intersect).
+ // (equivalent to condition (C.y < 0 && D.y < CMP_EPSILON) || (C.y > 0 && D.y > CMP_EPSILON))
+ if (C.y * D.y > CMP_EPSILON) {
+ return false;
+ }
+
+ // Fail if segments are parallel or colinear.
+ // (when A x B == zero, i.e (C - D) x B == zero, i.e C x B == D x B)
+ if (Math::is_equal_approx(C.y, D.y)) {
return false;
}
@@ -193,7 +201,7 @@ public:
return false;
}
- // (4) Apply the discovered position to line A-B in the original coordinate system.
+ // Apply the discovered position to line A-B in the original coordinate system.
if (r_result) {
*r_result = p_from_a + B * ABpos;
}
@@ -353,8 +361,14 @@ public:
for (int i = 0; i < c; i++) {
const Vector2 &v1 = p[i];
const Vector2 &v2 = p[(i + 1) % c];
- if (segment_intersects_segment(v1, v2, p_point, further_away, nullptr)) {
+
+ Vector2 res;
+ if (segment_intersects_segment(v1, v2, p_point, further_away, &res)) {
intersections++;
+ if (res.is_equal_approx(p_point)) {
+ // Point is in one of the polygon edges.
+ return true;
+ }
}
}
diff --git a/core/math/rect2.h b/core/math/rect2.h
index ab0b489b4a..2557959fa2 100644
--- a/core/math/rect2.h
+++ b/core/math/rect2.h
@@ -46,6 +46,8 @@ struct Rect2 {
real_t get_area() const { return size.width * size.height; }
+ _FORCE_INLINE_ Vector2 get_center() const { return position + (size * 0.5); }
+
inline bool intersects(const Rect2 &p_rect, const bool p_include_borders = false) const {
if (p_include_borders) {
if (position.x > (p_rect.position.x + p_rect.size.width)) {
@@ -259,7 +261,7 @@ struct Rect2 {
}
_FORCE_INLINE_ bool intersects_filled_polygon(const Vector2 *p_points, int p_point_count) const {
- Vector2 center = position + size * 0.5;
+ Vector2 center = get_center();
int side_plus = 0;
int side_minus = 0;
Vector2 end = position + size;
@@ -344,6 +346,8 @@ struct Rect2i {
int get_area() const { return size.width * size.height; }
+ _FORCE_INLINE_ Vector2i get_center() const { return position + (size / 2); }
+
inline bool intersects(const Rect2i &p_rect) const {
if (position.x > (p_rect.position.x + p_rect.size.width)) {
return false;
diff --git a/core/math/transform_2d.cpp b/core/math/transform_2d.cpp
index 16934d67df..496a557844 100644
--- a/core/math/transform_2d.cpp
+++ b/core/math/transform_2d.cpp
@@ -63,7 +63,7 @@ Transform2D Transform2D::affine_inverse() const {
return inv;
}
-void Transform2D::rotate(real_t p_phi) {
+void Transform2D::rotate(const real_t p_phi) {
*this = Transform2D(p_phi, Vector2()) * (*this);
}
@@ -72,7 +72,7 @@ real_t Transform2D::get_skew() const {
return Math::acos(elements[0].normalized().dot(SGN(det) * elements[1].normalized())) - Math_PI * 0.5;
}
-void Transform2D::set_skew(float p_angle) {
+void Transform2D::set_skew(const real_t p_angle) {
real_t det = basis_determinant();
elements[1] = SGN(det) * elements[0].rotated((Math_PI * 0.5 + p_angle)).normalized() * elements[1].length();
}
@@ -81,7 +81,7 @@ real_t Transform2D::get_rotation() const {
return Math::atan2(elements[0].y, elements[0].x);
}
-void Transform2D::set_rotation(real_t p_rot) {
+void Transform2D::set_rotation(const real_t p_rot) {
Size2 scale = get_scale();
real_t cr = Math::cos(p_rot);
real_t sr = Math::sin(p_rot);
@@ -92,7 +92,7 @@ void Transform2D::set_rotation(real_t p_rot) {
set_scale(scale);
}
-Transform2D::Transform2D(real_t p_rot, const Vector2 &p_pos) {
+Transform2D::Transform2D(const real_t p_rot, const Vector2 &p_pos) {
real_t cr = Math::cos(p_rot);
real_t sr = Math::sin(p_rot);
elements[0][0] = cr;
@@ -102,6 +102,14 @@ Transform2D::Transform2D(real_t p_rot, const Vector2 &p_pos) {
elements[2] = p_pos;
}
+Transform2D::Transform2D(const real_t p_rot, const Size2 &p_scale, const real_t p_skew, const Vector2 &p_pos) {
+ elements[0][0] = Math::cos(p_rot) * p_scale.x;
+ elements[1][1] = Math::cos(p_rot + p_skew) * p_scale.y;
+ elements[1][0] = -Math::sin(p_rot + p_skew) * p_scale.y;
+ elements[0][1] = Math::sin(p_rot) * p_scale.x;
+ elements[2] = p_pos;
+}
+
Size2 Transform2D::get_scale() const {
real_t det_sign = SGN(basis_determinant());
return Size2(elements[0].length(), det_sign * elements[1].length());
@@ -126,7 +134,7 @@ void Transform2D::scale_basis(const Size2 &p_scale) {
elements[1][1] *= p_scale.y;
}
-void Transform2D::translate(real_t p_tx, real_t p_ty) {
+void Transform2D::translate(const real_t p_tx, const real_t p_ty) {
translate(Vector2(p_tx, p_ty));
}
@@ -231,7 +239,7 @@ Transform2D Transform2D::translated(const Vector2 &p_offset) const {
return copy;
}
-Transform2D Transform2D::rotated(real_t p_phi) const {
+Transform2D Transform2D::rotated(const real_t p_phi) const {
Transform2D copy = *this;
copy.rotate(p_phi);
return copy;
@@ -241,7 +249,7 @@ real_t Transform2D::basis_determinant() const {
return elements[0].x * elements[1].y - elements[0].y * elements[1].x;
}
-Transform2D Transform2D::interpolate_with(const Transform2D &p_transform, real_t p_c) const {
+Transform2D Transform2D::interpolate_with(const Transform2D &p_transform, const real_t p_c) const {
//extract parameters
Vector2 p1 = get_origin();
Vector2 p2 = p_transform.get_origin();
@@ -271,7 +279,7 @@ Transform2D Transform2D::interpolate_with(const Transform2D &p_transform, real_t
}
//construct matrix
- Transform2D res(Math::atan2(v.y, v.x), p1.lerp(p2, p_c));
+ Transform2D res(v.angle(), p1.lerp(p2, p_c));
res.scale_basis(s1.lerp(s2, p_c));
return res;
}
diff --git a/core/math/transform_2d.h b/core/math/transform_2d.h
index 34cfd0c1a9..6ed3af2ba7 100644
--- a/core/math/transform_2d.h
+++ b/core/math/transform_2d.h
@@ -68,17 +68,17 @@ struct Transform2D {
void affine_invert();
Transform2D affine_inverse() const;
- void set_rotation(real_t p_rot);
+ void set_rotation(const real_t p_rot);
real_t get_rotation() const;
real_t get_skew() const;
- void set_skew(float p_angle);
- _FORCE_INLINE_ void set_rotation_and_scale(real_t p_rot, const Size2 &p_scale);
- _FORCE_INLINE_ void set_rotation_scale_and_skew(real_t p_rot, const Size2 &p_scale, float p_skew);
- void rotate(real_t p_phi);
+ void set_skew(const real_t p_angle);
+ _FORCE_INLINE_ void set_rotation_and_scale(const real_t p_rot, const Size2 &p_scale);
+ _FORCE_INLINE_ void set_rotation_scale_and_skew(const real_t p_rot, const Size2 &p_scale, const real_t p_skew);
+ void rotate(const real_t p_phi);
void scale(const Size2 &p_scale);
void scale_basis(const Size2 &p_scale);
- void translate(real_t p_tx, real_t p_ty);
+ void translate(const real_t p_tx, const real_t p_ty);
void translate(const Vector2 &p_translation);
real_t basis_determinant() const;
@@ -92,7 +92,7 @@ struct Transform2D {
Transform2D scaled(const Size2 &p_scale) const;
Transform2D basis_scaled(const Size2 &p_scale) const;
Transform2D translated(const Vector2 &p_offset) const;
- Transform2D rotated(real_t p_phi) const;
+ Transform2D rotated(const real_t p_phi) const;
Transform2D untranslated() const;
@@ -110,7 +110,7 @@ struct Transform2D {
void operator*=(const real_t p_val);
Transform2D operator*(const real_t p_val) const;
- Transform2D interpolate_with(const Transform2D &p_transform, real_t p_c) const;
+ Transform2D interpolate_with(const Transform2D &p_transform, const real_t p_c) const;
_FORCE_INLINE_ Vector2 basis_xform(const Vector2 &p_vec) const;
_FORCE_INLINE_ Vector2 basis_xform_inv(const Vector2 &p_vec) const;
@@ -123,7 +123,7 @@ struct Transform2D {
operator String() const;
- Transform2D(real_t xx, real_t xy, real_t yx, real_t yy, real_t ox, real_t oy) {
+ Transform2D(const real_t xx, const real_t xy, const real_t yx, const real_t yy, const real_t ox, const real_t oy) {
elements[0][0] = xx;
elements[0][1] = xy;
elements[1][0] = yx;
@@ -138,7 +138,10 @@ struct Transform2D {
elements[2] = p_origin;
}
- Transform2D(real_t p_rot, const Vector2 &p_pos);
+ Transform2D(const real_t p_rot, const Vector2 &p_pos);
+
+ Transform2D(const real_t p_rot, const Size2 &p_scale, const real_t p_skew, const Vector2 &p_pos);
+
Transform2D() {
elements[0][0] = 1.0;
elements[1][1] = 1.0;
@@ -185,14 +188,14 @@ Rect2 Transform2D::xform(const Rect2 &p_rect) const {
return new_rect;
}
-void Transform2D::set_rotation_and_scale(real_t p_rot, const Size2 &p_scale) {
+void Transform2D::set_rotation_and_scale(const real_t p_rot, const Size2 &p_scale) {
elements[0][0] = Math::cos(p_rot) * p_scale.x;
elements[1][1] = Math::cos(p_rot) * p_scale.y;
elements[1][0] = -Math::sin(p_rot) * p_scale.y;
elements[0][1] = Math::sin(p_rot) * p_scale.x;
}
-void Transform2D::set_rotation_scale_and_skew(real_t p_rot, const Size2 &p_scale, float p_skew) {
+void Transform2D::set_rotation_scale_and_skew(const real_t p_rot, const Size2 &p_scale, const real_t p_skew) {
elements[0][0] = Math::cos(p_rot) * p_scale.x;
elements[1][1] = Math::cos(p_rot + p_skew) * p_scale.y;
elements[1][0] = -Math::sin(p_rot + p_skew) * p_scale.y;
diff --git a/core/math/transform_3d.h b/core/math/transform_3d.h
index cadfdc13d1..345e0fade0 100644
--- a/core/math/transform_3d.h
+++ b/core/math/transform_3d.h
@@ -155,7 +155,7 @@ _FORCE_INLINE_ Plane Transform3D::xform_inv(const Plane &p_plane) const {
}
_FORCE_INLINE_ AABB Transform3D::xform(const AABB &p_aabb) const {
- /* http://dev.theomader.com/transform-bounding-boxes/ */
+ /* https://dev.theomader.com/transform-bounding-boxes/ */
Vector3 min = p_aabb.position;
Vector3 max = p_aabb.position + p_aabb.size;
Vector3 tmin, tmax;
diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp
index bf06c848c5..16d9652ef2 100644
--- a/core/math/triangle_mesh.cpp
+++ b/core/math/triangle_mesh.cpp
@@ -76,7 +76,7 @@ int TriangleMesh::_create_bvh(BVH *p_bvh, BVH **p_bb, int p_from, int p_size, in
int index = r_max_alloc++;
BVH *_new = &p_bvh[index];
_new->aabb = aabb;
- _new->center = aabb.position + aabb.size * 0.5;
+ _new->center = aabb.get_center();
_new->face_index = -1;
_new->left = left;
_new->right = right;
@@ -152,7 +152,7 @@ void TriangleMesh::create(const Vector<Vector3> &p_faces) {
bw[i].left = -1;
bw[i].right = -1;
bw[i].face_index = i;
- bw[i].center = bw[i].aabb.position + bw[i].aabb.size * 0.5;
+ bw[i].center = bw[i].aabb.get_center();
}
vertices.resize(db.size());
diff --git a/core/math/triangle_mesh.h b/core/math/triangle_mesh.h
index 463b0dd5c8..2d3b4db4bb 100644
--- a/core/math/triangle_mesh.h
+++ b/core/math/triangle_mesh.h
@@ -37,11 +37,13 @@
class TriangleMesh : public RefCounted {
GDCLASS(TriangleMesh, RefCounted);
+public:
struct Triangle {
Vector3 normal;
int indices[3];
};
+private:
Vector<Triangle> triangles;
Vector<Vector3> vertices;
@@ -86,8 +88,8 @@ public:
Vector3 get_area_normal(const AABB &p_aabb) const;
Vector<Face3> get_faces() const;
- Vector<Triangle> get_triangles() const { return triangles; }
- Vector<Vector3> get_vertices() const { return vertices; }
+ const Vector<Triangle> &get_triangles() const { return triangles; }
+ const Vector<Vector3> &get_vertices() const { return vertices; }
void get_indices(Vector<int> *r_triangles_indices) const;
void create(const Vector<Vector3> &p_faces);
diff --git a/core/math/triangulate.h b/core/math/triangulate.h
index 55dc4e8e7d..249ca6238f 100644
--- a/core/math/triangulate.h
+++ b/core/math/triangulate.h
@@ -34,7 +34,7 @@
#include "core/math/vector2.h"
/*
-http://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml
+https://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml
*/
class Triangulate {
diff --git a/core/math/vector2.cpp b/core/math/vector2.cpp
index 54abc1b7f2..16e43d7d06 100644
--- a/core/math/vector2.cpp
+++ b/core/math/vector2.cpp
@@ -34,6 +34,10 @@ real_t Vector2::angle() const {
return Math::atan2(y, x);
}
+Vector2 Vector2::from_angle(const real_t p_angle) {
+ return Vector2(Math::cos(p_angle), Math::sin(p_angle));
+}
+
real_t Vector2::length() const {
return Math::sqrt(x * x + y * y);
}
@@ -75,7 +79,7 @@ real_t Vector2::angle_to(const Vector2 &p_vector2) const {
}
real_t Vector2::angle_to_point(const Vector2 &p_vector2) const {
- return Math::atan2(y - p_vector2.y, x - p_vector2.x);
+ return (*this - p_vector2).angle();
}
real_t Vector2::dot(const Vector2 &p_other) const {
diff --git a/core/math/vector2.h b/core/math/vector2.h
index 330b4741b1..332c0475fa 100644
--- a/core/math/vector2.h
+++ b/core/math/vector2.h
@@ -147,6 +147,7 @@ struct Vector2 {
bool operator>=(const Vector2 &p_vec2) const { return x == p_vec2.x ? (y >= p_vec2.y) : (x > p_vec2.x); }
real_t angle() const;
+ static Vector2 from_angle(const real_t p_angle);
_FORCE_INLINE_ Vector2 abs() const {
return Vector2(Math::abs(x), Math::abs(y));
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp
index 401c3ccd9c..fa212c178a 100644
--- a/core/math/vector3.cpp
+++ b/core/math/vector3.cpp
@@ -115,12 +115,6 @@ Basis Vector3::outer(const Vector3 &p_b) const {
return Basis(row0, row1, row2);
}
-Basis Vector3::to_diagonal_matrix() const {
- return Basis(x, 0, 0,
- 0, y, 0,
- 0, 0, z);
-}
-
bool Vector3::is_equal_approx(const Vector3 &p_v) const {
return Math::is_equal_approx(x, p_v.x) && Math::is_equal_approx(y, p_v.y) && Math::is_equal_approx(z, p_v.z);
}
diff --git a/core/math/vector3.h b/core/math/vector3.h
index 6a4c42f41b..e65ac31c02 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -106,7 +106,6 @@ struct Vector3 {
_FORCE_INLINE_ Vector3 cross(const Vector3 &p_b) const;
_FORCE_INLINE_ real_t dot(const Vector3 &p_b) const;
Basis outer(const Vector3 &p_b) const;
- Basis to_diagonal_matrix() const;
_FORCE_INLINE_ Vector3 abs() const;
_FORCE_INLINE_ Vector3 floor() const;
diff --git a/core/multiplayer/SCsub b/core/multiplayer/SCsub
new file mode 100644
index 0000000000..19a6549225
--- /dev/null
+++ b/core/multiplayer/SCsub
@@ -0,0 +1,5 @@
+#!/usr/bin/env python
+
+Import("env")
+
+env.add_source_files(env.core_sources, "*.cpp")
diff --git a/core/multiplayer/multiplayer.h b/core/multiplayer/multiplayer.h
new file mode 100644
index 0000000000..00c81d3c9a
--- /dev/null
+++ b/core/multiplayer/multiplayer.h
@@ -0,0 +1,80 @@
+/*************************************************************************/
+/* multiplayer.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef MULTIPLAYER_H
+#define MULTIPLAYER_H
+
+#include "core/variant/binder_common.h"
+
+#include "core/string/string_name.h"
+
+namespace Multiplayer {
+
+enum TransferMode {
+ TRANSFER_MODE_UNRELIABLE,
+ TRANSFER_MODE_ORDERED,
+ TRANSFER_MODE_RELIABLE
+};
+
+enum RPCMode {
+ RPC_MODE_DISABLED, // No rpc for this method, calls to this will be blocked (default)
+ RPC_MODE_ANY, // Any peer can call this RPC
+ RPC_MODE_AUTHORITY, // / Only the node's multiplayer authority (server by default) can call this RPC
+};
+
+struct RPCConfig {
+ StringName name;
+ RPCMode rpc_mode = RPC_MODE_DISABLED;
+ bool sync = false;
+ TransferMode transfer_mode = TRANSFER_MODE_RELIABLE;
+ int channel = 0;
+
+ bool operator==(RPCConfig const &p_other) const {
+ return name == p_other.name;
+ }
+};
+
+struct SortRPCConfig {
+ StringName::AlphCompare compare;
+ bool operator()(const RPCConfig &p_a, const RPCConfig &p_b) const {
+ return compare(p_a.name, p_b.name);
+ }
+};
+
+}; // namespace Multiplayer
+
+// This is needed for proper docs generation (i.e. not "Multiplayer."-prefixed).
+typedef Multiplayer::RPCMode RPCMode;
+typedef Multiplayer::TransferMode TransferMode;
+
+VARIANT_ENUM_CAST(RPCMode);
+VARIANT_ENUM_CAST(TransferMode);
+
+#endif // MULTIPLAYER_H
diff --git a/core/multiplayer/multiplayer_api.cpp b/core/multiplayer/multiplayer_api.cpp
new file mode 100644
index 0000000000..9543f77c1e
--- /dev/null
+++ b/core/multiplayer/multiplayer_api.cpp
@@ -0,0 +1,668 @@
+/*************************************************************************/
+/* multiplayer_api.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "multiplayer_api.h"
+
+#include "core/debugger/engine_debugger.h"
+#include "core/io/marshalls.h"
+#include "core/multiplayer/multiplayer_replicator.h"
+#include "core/multiplayer/rpc_manager.h"
+#include "scene/main/node.h"
+
+#include <stdint.h>
+
+#ifdef DEBUG_ENABLED
+#include "core/os/os.h"
+#endif
+
+#ifdef DEBUG_ENABLED
+void MultiplayerAPI::profile_bandwidth(const String &p_inout, int p_size) {
+ if (EngineDebugger::is_profiling("multiplayer")) {
+ Array values;
+ values.push_back("bandwidth");
+ values.push_back(p_inout);
+ values.push_back(OS::get_singleton()->get_ticks_msec());
+ values.push_back(p_size);
+ EngineDebugger::profiler_add_frame_data("multiplayer", values);
+ }
+}
+#endif
+
+void MultiplayerAPI::poll() {
+ if (!multiplayer_peer.is_valid() || multiplayer_peer->get_connection_status() == MultiplayerPeer::CONNECTION_DISCONNECTED) {
+ return;
+ }
+
+ multiplayer_peer->poll();
+
+ if (!multiplayer_peer.is_valid()) { // It's possible that polling might have resulted in a disconnection, so check here.
+ return;
+ }
+
+ while (multiplayer_peer->get_available_packet_count()) {
+ int sender = multiplayer_peer->get_packet_peer();
+ const uint8_t *packet;
+ int len;
+
+ Error err = multiplayer_peer->get_packet(&packet, len);
+ if (err != OK) {
+ ERR_PRINT("Error getting packet!");
+ break; // Something is wrong!
+ }
+
+ remote_sender_id = sender;
+ _process_packet(sender, packet, len);
+ remote_sender_id = 0;
+
+ if (!multiplayer_peer.is_valid()) {
+ break; // It's also possible that a packet or RPC caused a disconnection, so also check here.
+ }
+ }
+ if (multiplayer_peer.is_valid() && multiplayer_peer->get_connection_status() == MultiplayerPeer::CONNECTION_CONNECTED) {
+ replicator->poll();
+ }
+}
+
+void MultiplayerAPI::clear() {
+ replicator->clear();
+ connected_peers.clear();
+ path_get_cache.clear();
+ path_send_cache.clear();
+ packet_cache.clear();
+ last_send_cache_id = 1;
+}
+
+void MultiplayerAPI::set_root_node(Node *p_node) {
+ root_node = p_node;
+}
+
+Node *MultiplayerAPI::get_root_node() {
+ return root_node;
+}
+
+void MultiplayerAPI::set_multiplayer_peer(const Ref<MultiplayerPeer> &p_peer) {
+ if (p_peer == multiplayer_peer) {
+ return; // Nothing to do
+ }
+
+ ERR_FAIL_COND_MSG(p_peer.is_valid() && p_peer->get_connection_status() == MultiplayerPeer::CONNECTION_DISCONNECTED,
+ "Supplied MultiplayerPeer must be connecting or connected.");
+
+ if (multiplayer_peer.is_valid()) {
+ multiplayer_peer->disconnect("peer_connected", callable_mp(this, &MultiplayerAPI::_add_peer));
+ multiplayer_peer->disconnect("peer_disconnected", callable_mp(this, &MultiplayerAPI::_del_peer));
+ multiplayer_peer->disconnect("connection_succeeded", callable_mp(this, &MultiplayerAPI::_connected_to_server));
+ multiplayer_peer->disconnect("connection_failed", callable_mp(this, &MultiplayerAPI::_connection_failed));
+ multiplayer_peer->disconnect("server_disconnected", callable_mp(this, &MultiplayerAPI::_server_disconnected));
+ clear();
+ }
+
+ multiplayer_peer = p_peer;
+
+ if (multiplayer_peer.is_valid()) {
+ multiplayer_peer->connect("peer_connected", callable_mp(this, &MultiplayerAPI::_add_peer));
+ multiplayer_peer->connect("peer_disconnected", callable_mp(this, &MultiplayerAPI::_del_peer));
+ multiplayer_peer->connect("connection_succeeded", callable_mp(this, &MultiplayerAPI::_connected_to_server));
+ multiplayer_peer->connect("connection_failed", callable_mp(this, &MultiplayerAPI::_connection_failed));
+ multiplayer_peer->connect("server_disconnected", callable_mp(this, &MultiplayerAPI::_server_disconnected));
+ }
+}
+
+Ref<MultiplayerPeer> MultiplayerAPI::get_multiplayer_peer() const {
+ return multiplayer_peer;
+}
+
+void MultiplayerAPI::_process_packet(int p_from, const uint8_t *p_packet, int p_packet_len) {
+ ERR_FAIL_COND_MSG(root_node == nullptr, "Multiplayer root node was not initialized. If you are using custom multiplayer, remember to set the root node via MultiplayerAPI.set_root_node before using it.");
+ ERR_FAIL_COND_MSG(p_packet_len < 1, "Invalid packet received. Size too small.");
+
+#ifdef DEBUG_ENABLED
+ profile_bandwidth("in", p_packet_len);
+#endif
+
+ // Extract the `packet_type` from the LSB three bits:
+ uint8_t packet_type = p_packet[0] & CMD_MASK;
+
+ switch (packet_type) {
+ case NETWORK_COMMAND_SIMPLIFY_PATH: {
+ _process_simplify_path(p_from, p_packet, p_packet_len);
+ } break;
+
+ case NETWORK_COMMAND_CONFIRM_PATH: {
+ _process_confirm_path(p_from, p_packet, p_packet_len);
+ } break;
+
+ case NETWORK_COMMAND_REMOTE_CALL: {
+ rpc_manager->process_rpc(p_from, p_packet, p_packet_len);
+ } break;
+
+ case NETWORK_COMMAND_RAW: {
+ _process_raw(p_from, p_packet, p_packet_len);
+ } break;
+ case NETWORK_COMMAND_SPAWN: {
+ replicator->process_spawn_despawn(p_from, p_packet, p_packet_len, true);
+ } break;
+ case NETWORK_COMMAND_DESPAWN: {
+ replicator->process_spawn_despawn(p_from, p_packet, p_packet_len, false);
+ } break;
+ case NETWORK_COMMAND_SYNC: {
+ replicator->process_sync(p_from, p_packet, p_packet_len);
+ } break;
+ }
+}
+
+void MultiplayerAPI::_process_simplify_path(int p_from, const uint8_t *p_packet, int p_packet_len) {
+ ERR_FAIL_COND_MSG(p_packet_len < 38, "Invalid packet received. Size too small.");
+ int ofs = 1;
+
+ String methods_md5;
+ methods_md5.parse_utf8((const char *)(p_packet + ofs), 32);
+ ofs += 33;
+
+ int id = decode_uint32(&p_packet[ofs]);
+ ofs += 4;
+
+ String paths;
+ paths.parse_utf8((const char *)(p_packet + ofs), p_packet_len - ofs);
+
+ NodePath path = paths;
+
+ if (!path_get_cache.has(p_from)) {
+ path_get_cache[p_from] = PathGetCache();
+ }
+
+ Node *node = root_node->get_node(path);
+ ERR_FAIL_COND(node == nullptr);
+ const bool valid_rpc_checksum = rpc_manager->get_rpc_md5(node) == methods_md5;
+ if (valid_rpc_checksum == false) {
+ ERR_PRINT("The rpc node checksum failed. Make sure to have the same methods on both nodes. Node path: " + path);
+ }
+
+ PathGetCache::NodeInfo ni;
+ ni.path = path;
+
+ path_get_cache[p_from].nodes[id] = ni;
+
+ // Encode path to send ack.
+ CharString pname = String(path).utf8();
+ int len = encode_cstring(pname.get_data(), nullptr);
+
+ Vector<uint8_t> packet;
+
+ packet.resize(1 + 1 + len);
+ packet.write[0] = NETWORK_COMMAND_CONFIRM_PATH;
+ packet.write[1] = valid_rpc_checksum;
+ encode_cstring(pname.get_data(), &packet.write[2]);
+
+ multiplayer_peer->set_transfer_channel(0);
+ multiplayer_peer->set_transfer_mode(Multiplayer::TRANSFER_MODE_RELIABLE);
+ multiplayer_peer->set_target_peer(p_from);
+ multiplayer_peer->put_packet(packet.ptr(), packet.size());
+}
+
+void MultiplayerAPI::_process_confirm_path(int p_from, const uint8_t *p_packet, int p_packet_len) {
+ ERR_FAIL_COND_MSG(p_packet_len < 3, "Invalid packet received. Size too small.");
+
+ const bool valid_rpc_checksum = p_packet[1];
+
+ String paths;
+ paths.parse_utf8((const char *)&p_packet[2], p_packet_len - 2);
+
+ NodePath path = paths;
+
+ if (valid_rpc_checksum == false) {
+ ERR_PRINT("The rpc node checksum failed. Make sure to have the same methods on both nodes. Node path: " + path);
+ }
+
+ PathSentCache *psc = path_send_cache.getptr(path);
+ ERR_FAIL_COND_MSG(!psc, "Invalid packet received. Tries to confirm a path which was not found in cache.");
+
+ Map<int, bool>::Element *E = psc->confirmed_peers.find(p_from);
+ ERR_FAIL_COND_MSG(!E, "Invalid packet received. Source peer was not found in cache for the given path.");
+ E->get() = true;
+}
+
+bool MultiplayerAPI::_send_confirm_path(Node *p_node, NodePath p_path, PathSentCache *psc, int p_target) {
+ bool has_all_peers = true;
+ List<int> peers_to_add; // If one is missing, take note to add it.
+
+ for (Set<int>::Element *E = connected_peers.front(); E; E = E->next()) {
+ if (p_target < 0 && E->get() == -p_target) {
+ continue; // Continue, excluded.
+ }
+
+ if (p_target > 0 && E->get() != p_target) {
+ continue; // Continue, not for this peer.
+ }
+
+ Map<int, bool>::Element *F = psc->confirmed_peers.find(E->get());
+
+ if (!F || !F->get()) {
+ // Path was not cached, or was cached but is unconfirmed.
+ if (!F) {
+ // Not cached at all, take note.
+ peers_to_add.push_back(E->get());
+ }
+
+ has_all_peers = false;
+ }
+ }
+
+ if (peers_to_add.size() > 0) {
+ // Those that need to be added, send a message for this.
+
+ // Encode function name.
+ const CharString path = String(p_path).utf8();
+ const int path_len = encode_cstring(path.get_data(), nullptr);
+
+ // Extract MD5 from rpc methods list.
+ const String methods_md5 = rpc_manager->get_rpc_md5(p_node);
+ const int methods_md5_len = 33; // 32 + 1 for the `0` that is added by the encoder.
+
+ Vector<uint8_t> packet;
+ packet.resize(1 + 4 + path_len + methods_md5_len);
+ int ofs = 0;
+
+ packet.write[ofs] = NETWORK_COMMAND_SIMPLIFY_PATH;
+ ofs += 1;
+
+ ofs += encode_cstring(methods_md5.utf8().get_data(), &packet.write[ofs]);
+
+ ofs += encode_uint32(psc->id, &packet.write[ofs]);
+
+ ofs += encode_cstring(path.get_data(), &packet.write[ofs]);
+
+ for (int &E : peers_to_add) {
+ multiplayer_peer->set_target_peer(E); // To all of you.
+ multiplayer_peer->set_transfer_channel(0);
+ multiplayer_peer->set_transfer_mode(Multiplayer::TRANSFER_MODE_RELIABLE);
+ multiplayer_peer->put_packet(packet.ptr(), packet.size());
+
+ psc->confirmed_peers.insert(E, false); // Insert into confirmed, but as false since it was not confirmed.
+ }
+ }
+
+ return has_all_peers;
+}
+
+// The variant is compressed and encoded; The first byte contains all the meta
+// information and the format is:
+// - The first LSB 5 bits are used for the variant type.
+// - The next two bits are used to store the encoding mode.
+// - The most significant is used to store the boolean value.
+#define VARIANT_META_TYPE_MASK 0x1F
+#define VARIANT_META_EMODE_MASK 0x60
+#define VARIANT_META_BOOL_MASK 0x80
+#define ENCODE_8 0 << 5
+#define ENCODE_16 1 << 5
+#define ENCODE_32 2 << 5
+#define ENCODE_64 3 << 5
+Error MultiplayerAPI::encode_and_compress_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len) {
+ // Unreachable because `VARIANT_MAX` == 27 and `ENCODE_VARIANT_MASK` == 31
+ CRASH_COND(p_variant.get_type() > VARIANT_META_TYPE_MASK);
+
+ uint8_t *buf = r_buffer;
+ r_len = 0;
+ uint8_t encode_mode = 0;
+
+ switch (p_variant.get_type()) {
+ case Variant::BOOL: {
+ if (buf) {
+ // We still have 1 free bit in the meta, so let's use it.
+ buf[0] = (p_variant.operator bool()) ? (1 << 7) : 0;
+ buf[0] |= encode_mode | p_variant.get_type();
+ }
+ r_len += 1;
+ } break;
+ case Variant::INT: {
+ if (buf) {
+ // Reserve the first byte for the meta.
+ buf += 1;
+ }
+ r_len += 1;
+ int64_t val = p_variant;
+ if (val <= (int64_t)INT8_MAX && val >= (int64_t)INT8_MIN) {
+ // Use 8 bit
+ encode_mode = ENCODE_8;
+ if (buf) {
+ buf[0] = val;
+ }
+ r_len += 1;
+ } else if (val <= (int64_t)INT16_MAX && val >= (int64_t)INT16_MIN) {
+ // Use 16 bit
+ encode_mode = ENCODE_16;
+ if (buf) {
+ encode_uint16(val, buf);
+ }
+ r_len += 2;
+ } else if (val <= (int64_t)INT32_MAX && val >= (int64_t)INT32_MIN) {
+ // Use 32 bit
+ encode_mode = ENCODE_32;
+ if (buf) {
+ encode_uint32(val, buf);
+ }
+ r_len += 4;
+ } else {
+ // Use 64 bit
+ encode_mode = ENCODE_64;
+ if (buf) {
+ encode_uint64(val, buf);
+ }
+ r_len += 8;
+ }
+ // Store the meta
+ if (buf) {
+ buf -= 1;
+ buf[0] = encode_mode | p_variant.get_type();
+ }
+ } break;
+ default:
+ // Any other case is not yet compressed.
+ Error err = encode_variant(p_variant, r_buffer, r_len, allow_object_decoding);
+ if (err != OK) {
+ return err;
+ }
+ if (r_buffer) {
+ // The first byte is not used by the marshalling, so store the type
+ // so we know how to decompress and decode this variant.
+ r_buffer[0] = p_variant.get_type();
+ }
+ }
+
+ return OK;
+}
+
+Error MultiplayerAPI::decode_and_decompress_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int *r_len) {
+ const uint8_t *buf = p_buffer;
+ int len = p_len;
+
+ ERR_FAIL_COND_V(len < 1, ERR_INVALID_DATA);
+ uint8_t type = buf[0] & VARIANT_META_TYPE_MASK;
+ uint8_t encode_mode = buf[0] & VARIANT_META_EMODE_MASK;
+
+ ERR_FAIL_COND_V(type >= Variant::VARIANT_MAX, ERR_INVALID_DATA);
+
+ switch (type) {
+ case Variant::BOOL: {
+ bool val = (buf[0] & VARIANT_META_BOOL_MASK) > 0;
+ r_variant = val;
+ if (r_len) {
+ *r_len = 1;
+ }
+ } break;
+ case Variant::INT: {
+ buf += 1;
+ len -= 1;
+ if (r_len) {
+ *r_len = 1;
+ }
+ if (encode_mode == ENCODE_8) {
+ // 8 bits.
+ ERR_FAIL_COND_V(len < 1, ERR_INVALID_DATA);
+ int8_t val = buf[0];
+ r_variant = val;
+ if (r_len) {
+ (*r_len) += 1;
+ }
+ } else if (encode_mode == ENCODE_16) {
+ // 16 bits.
+ ERR_FAIL_COND_V(len < 2, ERR_INVALID_DATA);
+ int16_t val = decode_uint16(buf);
+ r_variant = val;
+ if (r_len) {
+ (*r_len) += 2;
+ }
+ } else if (encode_mode == ENCODE_32) {
+ // 32 bits.
+ ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
+ int32_t val = decode_uint32(buf);
+ r_variant = val;
+ if (r_len) {
+ (*r_len) += 4;
+ }
+ } else {
+ // 64 bits.
+ ERR_FAIL_COND_V(len < 8, ERR_INVALID_DATA);
+ int64_t val = decode_uint64(buf);
+ r_variant = val;
+ if (r_len) {
+ (*r_len) += 8;
+ }
+ }
+ } break;
+ default:
+ Error err = decode_variant(r_variant, p_buffer, p_len, r_len, allow_object_decoding);
+ if (err != OK) {
+ return err;
+ }
+ }
+
+ return OK;
+}
+
+void MultiplayerAPI::_add_peer(int p_id) {
+ connected_peers.insert(p_id);
+ path_get_cache.insert(p_id, PathGetCache());
+ if (is_server()) {
+ replicator->spawn_all(p_id);
+ }
+ emit_signal(SNAME("peer_connected"), p_id);
+}
+
+void MultiplayerAPI::_del_peer(int p_id) {
+ connected_peers.erase(p_id);
+ // Cleanup get cache.
+ path_get_cache.erase(p_id);
+ // Cleanup sent cache.
+ // Some refactoring is needed to make this faster and do paths GC.
+ List<NodePath> keys;
+ path_send_cache.get_key_list(&keys);
+ for (const NodePath &E : keys) {
+ PathSentCache *psc = path_send_cache.getptr(E);
+ psc->confirmed_peers.erase(p_id);
+ }
+ emit_signal(SNAME("peer_disconnected"), p_id);
+}
+
+void MultiplayerAPI::_connected_to_server() {
+ emit_signal(SNAME("connected_to_server"));
+}
+
+void MultiplayerAPI::_connection_failed() {
+ emit_signal(SNAME("connection_failed"));
+}
+
+void MultiplayerAPI::_server_disconnected() {
+ emit_signal(SNAME("server_disconnected"));
+}
+
+Error MultiplayerAPI::send_bytes(Vector<uint8_t> p_data, int p_to, Multiplayer::TransferMode p_mode, int p_channel) {
+ ERR_FAIL_COND_V_MSG(p_data.size() < 1, ERR_INVALID_DATA, "Trying to send an empty raw packet.");
+ ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), ERR_UNCONFIGURED, "Trying to send a raw packet while no multiplayer peer is active.");
+ ERR_FAIL_COND_V_MSG(multiplayer_peer->get_connection_status() != MultiplayerPeer::CONNECTION_CONNECTED, ERR_UNCONFIGURED, "Trying to send a raw packet via a multiplayer peer which is not connected.");
+
+ if (packet_cache.size() < p_data.size() + 1) {
+ packet_cache.resize(p_data.size() + 1);
+ }
+
+ const uint8_t *r = p_data.ptr();
+ packet_cache.write[0] = NETWORK_COMMAND_RAW;
+ memcpy(&packet_cache.write[1], &r[0], p_data.size());
+
+ multiplayer_peer->set_target_peer(p_to);
+ multiplayer_peer->set_transfer_channel(p_channel);
+ multiplayer_peer->set_transfer_mode(p_mode);
+
+ return multiplayer_peer->put_packet(packet_cache.ptr(), p_data.size() + 1);
+}
+
+void MultiplayerAPI::_process_raw(int p_from, const uint8_t *p_packet, int p_packet_len) {
+ ERR_FAIL_COND_MSG(p_packet_len < 2, "Invalid packet received. Size too small.");
+
+ Vector<uint8_t> out;
+ int len = p_packet_len - 1;
+ out.resize(len);
+ {
+ uint8_t *w = out.ptrw();
+ memcpy(&w[0], &p_packet[1], len);
+ }
+ emit_signal(SNAME("peer_packet"), p_from, out);
+}
+
+bool MultiplayerAPI::is_cache_confirmed(NodePath p_path, int p_peer) {
+ const PathSentCache *psc = path_send_cache.getptr(p_path);
+ ERR_FAIL_COND_V(!psc, false);
+ const Map<int, bool>::Element *F = psc->confirmed_peers.find(p_peer);
+ ERR_FAIL_COND_V(!F, false); // Should never happen.
+ return F->get();
+}
+
+bool MultiplayerAPI::send_confirm_path(Node *p_node, NodePath p_path, int p_peer_id, int &r_id) {
+ // See if the path is cached.
+ PathSentCache *psc = path_send_cache.getptr(p_path);
+ if (!psc) {
+ // Path is not cached, create.
+ path_send_cache[p_path] = PathSentCache();
+ psc = path_send_cache.getptr(p_path);
+ psc->id = last_send_cache_id++;
+ }
+ r_id = psc->id;
+
+ // See if all peers have cached path (if so, call can be fast).
+ return _send_confirm_path(p_node, p_path, psc, p_peer_id);
+}
+
+Node *MultiplayerAPI::get_cached_node(int p_from, uint32_t p_node_id) {
+ Map<int, PathGetCache>::Element *E = path_get_cache.find(p_from);
+ ERR_FAIL_COND_V_MSG(!E, nullptr, vformat("No cache found for peer %d.", p_from));
+
+ Map<int, PathGetCache::NodeInfo>::Element *F = E->get().nodes.find(p_node_id);
+ ERR_FAIL_COND_V_MSG(!F, nullptr, vformat("ID %d not found in cache of peer %d.", p_node_id, p_from));
+
+ PathGetCache::NodeInfo *ni = &F->get();
+ Node *node = root_node->get_node(ni->path);
+ if (!node) {
+ ERR_PRINT("Failed to get cached path: " + String(ni->path) + ".");
+ }
+ return node;
+}
+
+int MultiplayerAPI::get_unique_id() const {
+ ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), 0, "No multiplayer peer is assigned. Unable to get unique ID.");
+ return multiplayer_peer->get_unique_id();
+}
+
+bool MultiplayerAPI::is_server() const {
+ return multiplayer_peer.is_valid() && multiplayer_peer->is_server();
+}
+
+void MultiplayerAPI::set_refuse_new_connections(bool p_refuse) {
+ ERR_FAIL_COND_MSG(!multiplayer_peer.is_valid(), "No multiplayer peer is assigned. Unable to set 'refuse_new_connections'.");
+ multiplayer_peer->set_refuse_new_connections(p_refuse);
+}
+
+bool MultiplayerAPI::is_refusing_new_connections() const {
+ ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), false, "No multiplayer peer is assigned. Unable to get 'refuse_new_connections'.");
+ return multiplayer_peer->is_refusing_new_connections();
+}
+
+Vector<int> MultiplayerAPI::get_peer_ids() const {
+ ERR_FAIL_COND_V_MSG(!multiplayer_peer.is_valid(), Vector<int>(), "No multiplayer peer is assigned. Assume no peers are connected.");
+
+ Vector<int> ret;
+ for (Set<int>::Element *E = connected_peers.front(); E; E = E->next()) {
+ ret.push_back(E->get());
+ }
+
+ return ret;
+}
+
+void MultiplayerAPI::set_allow_object_decoding(bool p_enable) {
+ allow_object_decoding = p_enable;
+}
+
+bool MultiplayerAPI::is_object_decoding_allowed() const {
+ return allow_object_decoding;
+}
+
+void MultiplayerAPI::scene_enter_exit_notify(const String &p_scene, Node *p_node, bool p_enter) {
+ replicator->scene_enter_exit_notify(p_scene, p_node, p_enter);
+}
+
+void MultiplayerAPI::rpcp(Node *p_node, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) {
+ rpc_manager->rpcp(p_node, p_peer_id, p_method, p_arg, p_argcount);
+}
+
+void MultiplayerAPI::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_root_node", "node"), &MultiplayerAPI::set_root_node);
+ ClassDB::bind_method(D_METHOD("get_root_node"), &MultiplayerAPI::get_root_node);
+ ClassDB::bind_method(D_METHOD("send_bytes", "bytes", "id", "mode", "channel"), &MultiplayerAPI::send_bytes, DEFVAL(MultiplayerPeer::TARGET_PEER_BROADCAST), DEFVAL(Multiplayer::TRANSFER_MODE_RELIABLE), DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("has_multiplayer_peer"), &MultiplayerAPI::has_multiplayer_peer);
+ ClassDB::bind_method(D_METHOD("get_multiplayer_peer"), &MultiplayerAPI::get_multiplayer_peer);
+ ClassDB::bind_method(D_METHOD("set_multiplayer_peer", "peer"), &MultiplayerAPI::set_multiplayer_peer);
+ ClassDB::bind_method(D_METHOD("get_unique_id"), &MultiplayerAPI::get_unique_id);
+ ClassDB::bind_method(D_METHOD("is_server"), &MultiplayerAPI::is_server);
+ ClassDB::bind_method(D_METHOD("get_remote_sender_id"), &MultiplayerAPI::get_remote_sender_id);
+ ClassDB::bind_method(D_METHOD("poll"), &MultiplayerAPI::poll);
+ ClassDB::bind_method(D_METHOD("clear"), &MultiplayerAPI::clear);
+
+ ClassDB::bind_method(D_METHOD("get_peers"), &MultiplayerAPI::get_peer_ids);
+ ClassDB::bind_method(D_METHOD("set_refuse_new_connections", "refuse"), &MultiplayerAPI::set_refuse_new_connections);
+ ClassDB::bind_method(D_METHOD("is_refusing_new_connections"), &MultiplayerAPI::is_refusing_new_connections);
+ ClassDB::bind_method(D_METHOD("set_allow_object_decoding", "enable"), &MultiplayerAPI::set_allow_object_decoding);
+ ClassDB::bind_method(D_METHOD("is_object_decoding_allowed"), &MultiplayerAPI::is_object_decoding_allowed);
+ ClassDB::bind_method(D_METHOD("get_replicator"), &MultiplayerAPI::get_replicator);
+
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_object_decoding"), "set_allow_object_decoding", "is_object_decoding_allowed");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "refuse_new_connections"), "set_refuse_new_connections", "is_refusing_new_connections");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "multiplayer_peer", PROPERTY_HINT_RESOURCE_TYPE, "MultiplayerPeer", PROPERTY_USAGE_NONE), "set_multiplayer_peer", "get_multiplayer_peer");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "root_node", PROPERTY_HINT_RESOURCE_TYPE, "Node", PROPERTY_USAGE_NONE), "set_root_node", "get_root_node");
+ ADD_PROPERTY_DEFAULT("refuse_new_connections", false);
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "replicator", PROPERTY_HINT_RESOURCE_TYPE, "MultiplayerReplicator", PROPERTY_USAGE_NONE), "", "get_replicator");
+
+ ADD_SIGNAL(MethodInfo("peer_connected", PropertyInfo(Variant::INT, "id")));
+ ADD_SIGNAL(MethodInfo("peer_disconnected", PropertyInfo(Variant::INT, "id")));
+ ADD_SIGNAL(MethodInfo("peer_packet", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "packet")));
+ ADD_SIGNAL(MethodInfo("connected_to_server"));
+ ADD_SIGNAL(MethodInfo("connection_failed"));
+ ADD_SIGNAL(MethodInfo("server_disconnected"));
+}
+
+MultiplayerAPI::MultiplayerAPI() {
+ replicator = memnew(MultiplayerReplicator(this));
+ rpc_manager = memnew(RPCManager(this));
+ clear();
+}
+
+MultiplayerAPI::~MultiplayerAPI() {
+ clear();
+ memdelete(replicator);
+ memdelete(rpc_manager);
+}
diff --git a/core/io/multiplayer_api.h b/core/multiplayer/multiplayer_api.h
index 9552a0bf35..1fb0318403 100644
--- a/core/io/multiplayer_api.h
+++ b/core/multiplayer/multiplayer_api.h
@@ -31,44 +31,38 @@
#ifndef MULTIPLAYER_API_H
#define MULTIPLAYER_API_H
-#include "core/io/multiplayer_peer.h"
-#include "core/io/resource_uid.h"
+#include "core/multiplayer/multiplayer.h"
+#include "core/multiplayer/multiplayer_peer.h"
#include "core/object/ref_counted.h"
+class MultiplayerReplicator;
+class RPCManager;
+
class MultiplayerAPI : public RefCounted {
GDCLASS(MultiplayerAPI, RefCounted);
public:
- enum RPCMode {
- RPC_MODE_DISABLED, // No rpc for this method, calls to this will be blocked (default)
- RPC_MODE_REMOTE, // Using rpc() on it will call method in all remote peers
- RPC_MODE_MASTER, // Using rpc() on it will call method on wherever the master is, be it local or remote
- RPC_MODE_PUPPET, // Using rpc() on it will call method for all puppets
- };
-
- enum SpawnMode {
- SPAWN_MODE_NONE,
- SPAWN_MODE_SERVER,
- SPAWN_MODE_CUSTOM,
+ enum NetworkCommands {
+ NETWORK_COMMAND_REMOTE_CALL = 0,
+ NETWORK_COMMAND_SIMPLIFY_PATH,
+ NETWORK_COMMAND_CONFIRM_PATH,
+ NETWORK_COMMAND_RAW,
+ NETWORK_COMMAND_SPAWN,
+ NETWORK_COMMAND_DESPAWN,
+ NETWORK_COMMAND_SYNC,
};
- struct RPCConfig {
- StringName name;
- RPCMode rpc_mode = RPC_MODE_DISABLED;
- bool sync = false;
- MultiplayerPeer::TransferMode transfer_mode = MultiplayerPeer::TRANSFER_MODE_RELIABLE;
- int channel = 0;
-
- bool operator==(RPCConfig const &p_other) const {
- return name == p_other.name;
- }
+ // For each command, the 4 MSB can contain custom flags, as defined by subsystems.
+ enum {
+ CMD_FLAG_0_SHIFT = 4,
+ CMD_FLAG_1_SHIFT = 5,
+ CMD_FLAG_2_SHIFT = 6,
+ CMD_FLAG_3_SHIFT = 7,
};
- struct SortRPCConfig {
- StringName::AlphCompare compare;
- bool operator()(const RPCConfig &p_a, const RPCConfig &p_b) const {
- return compare(p_a.name, p_b.name);
- }
+ // This is the mask that will be used to extract the command.
+ enum {
+ CMD_MASK = 7, // 0x7 -> 0b00001111
};
private:
@@ -88,66 +82,52 @@ private:
Map<int, NodeInfo> nodes;
};
- Ref<MultiplayerPeer> network_peer;
- Map<ResourceUID::ID, SpawnMode> spawnables;
- int rpc_sender_id = 0;
+ Ref<MultiplayerPeer> multiplayer_peer;
Set<int> connected_peers;
+ int remote_sender_id = 0;
+ int remote_sender_override = 0;
+
HashMap<NodePath, PathSentCache> path_send_cache;
Map<int, PathGetCache> path_get_cache;
- Map<ObjectID, ResourceUID::ID> replicated_nodes;
int last_send_cache_id;
Vector<uint8_t> packet_cache;
+
Node *root_node = nullptr;
bool allow_object_decoding = false;
+ MultiplayerReplicator *replicator = nullptr;
+ RPCManager *rpc_manager = nullptr;
+
protected:
static void _bind_methods();
+ bool _send_confirm_path(Node *p_node, NodePath p_path, PathSentCache *psc, int p_target);
void _process_packet(int p_from, const uint8_t *p_packet, int p_packet_len);
void _process_simplify_path(int p_from, const uint8_t *p_packet, int p_packet_len);
void _process_confirm_path(int p_from, const uint8_t *p_packet, int p_packet_len);
- void _process_spawn_despawn(int p_from, const uint8_t *p_packet, int p_packet_len, bool p_spawn);
- Node *_process_get_node(int p_from, const uint8_t *p_packet, uint32_t p_node_target, int p_packet_len);
- void _process_rpc(Node *p_node, const uint16_t p_rpc_method_id, int p_from, const uint8_t *p_packet, int p_packet_len, int p_offset);
void _process_raw(int p_from, const uint8_t *p_packet, int p_packet_len);
- void _send_rpc(Node *p_from, int p_to, uint16_t p_rpc_id, const RPCConfig &p_config, const StringName &p_name, const Variant **p_arg, int p_argcount);
- bool _send_confirm_path(Node *p_node, NodePath p_path, PathSentCache *psc, int p_target);
-
- Error _encode_and_compress_variant(const Variant &p_variant, uint8_t *p_buffer, int &r_len);
- Error _decode_and_decompress_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int *r_len);
-
public:
- enum NetworkCommands {
- NETWORK_COMMAND_REMOTE_CALL = 0,
- NETWORK_COMMAND_SIMPLIFY_PATH,
- NETWORK_COMMAND_CONFIRM_PATH,
- NETWORK_COMMAND_RAW,
- NETWORK_COMMAND_SPAWN,
- NETWORK_COMMAND_DESPAWN,
- };
-
- enum NetworkNodeIdCompression {
- NETWORK_NODE_ID_COMPRESSION_8 = 0,
- NETWORK_NODE_ID_COMPRESSION_16,
- NETWORK_NODE_ID_COMPRESSION_32,
- };
-
- enum NetworkNameIdCompression {
- NETWORK_NAME_ID_COMPRESSION_8 = 0,
- NETWORK_NAME_ID_COMPRESSION_16,
- };
-
void poll();
void clear();
void set_root_node(Node *p_node);
Node *get_root_node();
- void set_network_peer(const Ref<MultiplayerPeer> &p_peer);
- Ref<MultiplayerPeer> get_network_peer() const;
- Error send_bytes(Vector<uint8_t> p_data, int p_to = MultiplayerPeer::TARGET_PEER_BROADCAST, MultiplayerPeer::TransferMode p_mode = MultiplayerPeer::TRANSFER_MODE_RELIABLE, int p_channel = 0);
+ void set_multiplayer_peer(const Ref<MultiplayerPeer> &p_peer);
+ Ref<MultiplayerPeer> get_multiplayer_peer() const;
+
+ Error send_bytes(Vector<uint8_t> p_data, int p_to = MultiplayerPeer::TARGET_PEER_BROADCAST, Multiplayer::TransferMode p_mode = Multiplayer::TRANSFER_MODE_RELIABLE, int p_channel = 0);
+
+ Error encode_and_compress_variant(const Variant &p_variant, uint8_t *p_buffer, int &r_len);
+ Error decode_and_decompress_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int *r_len);
// Called by Node.rpc
- void rpcp(Node *p_node, int p_peer_id, bool p_unreliable, const StringName &p_method, const Variant **p_arg, int p_argcount);
+ void rpcp(Node *p_node, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount);
+ // Called by Node._notification
+ void scene_enter_exit_notify(const String &p_scene, Node *p_node, bool p_enter);
+ // Called by replicator
+ bool send_confirm_path(Node *p_node, NodePath p_path, int p_target, int &p_id);
+ Node *get_cached_node(int p_from, uint32_t p_node_id);
+ bool is_cache_confirmed(NodePath p_path, int p_peer);
void _add_peer(int p_id);
void _del_peer(int p_id);
@@ -155,28 +135,28 @@ public:
void _connection_failed();
void _server_disconnected();
- bool has_network_peer() const { return network_peer.is_valid(); }
- Vector<int> get_network_connected_peers() const;
- int get_rpc_sender_id() const { return rpc_sender_id; }
- int get_network_unique_id() const;
- bool is_network_server() const;
- void set_refuse_new_network_connections(bool p_refuse);
- bool is_refusing_new_network_connections() const;
+ bool has_multiplayer_peer() const { return multiplayer_peer.is_valid(); }
+ Vector<int> get_peer_ids() const;
+ const Set<int> get_connected_peers() const { return connected_peers; }
+ int get_remote_sender_id() const { return remote_sender_override ? remote_sender_override : remote_sender_id; }
+ void set_remote_sender_override(int p_id) { remote_sender_override = p_id; }
+ int get_unique_id() const;
+ bool is_server() const;
+ void set_refuse_new_connections(bool p_refuse);
+ bool is_refusing_new_connections() const;
void set_allow_object_decoding(bool p_enable);
bool is_object_decoding_allowed() const;
- Error spawnable_config(const ResourceUID::ID &p_id, SpawnMode p_mode);
- Error send_despawn(int p_peer_id, const ResourceUID::ID &p_scene_id, const NodePath &p_path, const PackedByteArray &p_data = PackedByteArray());
- Error send_spawn(int p_peer_id, const ResourceUID::ID &p_scene_id, const NodePath &p_path, const PackedByteArray &p_data = PackedByteArray());
- Error _send_spawn_despawn(int p_peer_id, const ResourceUID::ID &p_scene_id, const NodePath &p_path, const uint8_t *p_data, int p_data_len, bool p_spawn);
- void scene_enter_exit_notify(const String &p_scene, const Node *p_node, bool p_enter);
+ MultiplayerReplicator *get_replicator() const { return replicator; }
+ RPCManager *get_rpc_manager() const { return rpc_manager; }
+
+#ifdef DEBUG_ENABLED
+ void profile_bandwidth(const String &p_inout, int p_size);
+#endif
MultiplayerAPI();
~MultiplayerAPI();
};
-VARIANT_ENUM_CAST(MultiplayerAPI::RPCMode);
-VARIANT_ENUM_CAST(MultiplayerAPI::SpawnMode);
-
#endif // MULTIPLAYER_API_H
diff --git a/core/io/multiplayer_peer.cpp b/core/multiplayer/multiplayer_peer.cpp
index 83cf24d7e3..3c33948e2f 100644
--- a/core/io/multiplayer_peer.cpp
+++ b/core/multiplayer/multiplayer_peer.cpp
@@ -53,6 +53,30 @@ uint32_t MultiplayerPeer::generate_unique_id() const {
return hash;
}
+void MultiplayerPeer::set_transfer_channel(int p_channel) {
+ transfer_channel = p_channel;
+}
+
+int MultiplayerPeer::get_transfer_channel() const {
+ return transfer_channel;
+}
+
+void MultiplayerPeer::set_transfer_mode(Multiplayer::TransferMode p_mode) {
+ transfer_mode = p_mode;
+}
+
+Multiplayer::TransferMode MultiplayerPeer::get_transfer_mode() const {
+ return transfer_mode;
+}
+
+void MultiplayerPeer::set_refuse_new_connections(bool p_enable) {
+ refuse_connections = p_enable;
+}
+
+bool MultiplayerPeer::is_refusing_new_connections() const {
+ return refuse_connections;
+}
+
void MultiplayerPeer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_transfer_channel", "channel"), &MultiplayerPeer::set_transfer_channel);
ClassDB::bind_method(D_METHOD("get_transfer_channel"), &MultiplayerPeer::get_transfer_channel);
@@ -75,10 +99,6 @@ void MultiplayerPeer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "transfer_mode", PROPERTY_HINT_ENUM, "Unreliable,Unreliable Ordered,Reliable"), "set_transfer_mode", "get_transfer_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "transfer_channel", PROPERTY_HINT_RANGE, "0,255,1"), "set_transfer_channel", "get_transfer_channel");
- BIND_ENUM_CONSTANT(TRANSFER_MODE_UNRELIABLE);
- BIND_ENUM_CONSTANT(TRANSFER_MODE_UNRELIABLE_ORDERED);
- BIND_ENUM_CONSTANT(TRANSFER_MODE_RELIABLE);
-
BIND_ENUM_CONSTANT(CONNECTION_DISCONNECTED);
BIND_ENUM_CONSTANT(CONNECTION_CONNECTING);
BIND_ENUM_CONSTANT(CONNECTION_CONNECTED);
@@ -92,3 +112,160 @@ void MultiplayerPeer::_bind_methods() {
ADD_SIGNAL(MethodInfo("connection_succeeded"));
ADD_SIGNAL(MethodInfo("connection_failed"));
}
+
+/*************/
+
+int MultiplayerPeerExtension::get_available_packet_count() const {
+ int count;
+ if (GDVIRTUAL_CALL(_get_available_packet_count, count)) {
+ return count;
+ }
+ WARN_PRINT_ONCE("MultiplayerPeerExtension::_get_available_packet_count is unimplemented!");
+ return -1;
+}
+
+Error MultiplayerPeerExtension::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
+ int err;
+ if (GDVIRTUAL_CALL(_get_packet, r_buffer, &r_buffer_size, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("MultiplayerPeerExtension::_get_packet_native is unimplemented!");
+ return FAILED;
+}
+
+Error MultiplayerPeerExtension::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
+ int err;
+ if (GDVIRTUAL_CALL(_put_packet, p_buffer, p_buffer_size, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("MultiplayerPeerExtension::_put_packet_native is unimplemented!");
+ return FAILED;
+}
+
+int MultiplayerPeerExtension::get_max_packet_size() const {
+ int size;
+ if (GDVIRTUAL_CALL(_get_max_packet_size, size)) {
+ return size;
+ }
+ WARN_PRINT_ONCE("MultiplayerPeerExtension::_get_max_packet_size is unimplemented!");
+ return 0;
+}
+
+void MultiplayerPeerExtension::set_transfer_channel(int p_channel) {
+ if (GDVIRTUAL_CALL(_set_transfer_channel, p_channel)) {
+ return;
+ }
+ MultiplayerPeer::set_transfer_channel(p_channel);
+}
+
+int MultiplayerPeerExtension::get_transfer_channel() const {
+ int channel;
+ if (GDVIRTUAL_CALL(_get_transfer_channel, channel)) {
+ return channel;
+ }
+ return MultiplayerPeer::get_transfer_channel();
+}
+
+void MultiplayerPeerExtension::set_transfer_mode(Multiplayer::TransferMode p_mode) {
+ if (GDVIRTUAL_CALL(_set_transfer_mode, p_mode)) {
+ return;
+ }
+ MultiplayerPeer::set_transfer_mode(p_mode);
+}
+
+Multiplayer::TransferMode MultiplayerPeerExtension::get_transfer_mode() const {
+ int mode;
+ if (GDVIRTUAL_CALL(_get_transfer_mode, mode)) {
+ return (Multiplayer::TransferMode)mode;
+ }
+ return MultiplayerPeer::get_transfer_mode();
+}
+
+void MultiplayerPeerExtension::set_target_peer(int p_peer_id) {
+ if (GDVIRTUAL_CALL(_set_target_peer, p_peer_id)) {
+ return;
+ }
+ WARN_PRINT_ONCE("MultiplayerPeerExtension::_set_target_peer is unimplemented!");
+}
+
+int MultiplayerPeerExtension::get_packet_peer() const {
+ int peer;
+ if (GDVIRTUAL_CALL(_get_packet_peer, peer)) {
+ return peer;
+ }
+ WARN_PRINT_ONCE("MultiplayerPeerExtension::_get_packet_peer is unimplemented!");
+ return 0;
+}
+
+bool MultiplayerPeerExtension::is_server() const {
+ bool server;
+ if (GDVIRTUAL_CALL(_is_server, server)) {
+ return server;
+ }
+ WARN_PRINT_ONCE("MultiplayerPeerExtension::_is_server is unimplemented!");
+ return false;
+}
+
+void MultiplayerPeerExtension::poll() {
+ int err;
+ if (GDVIRTUAL_CALL(_poll, err)) {
+ return;
+ }
+ WARN_PRINT_ONCE("MultiplayerPeerExtension::_poll is unimplemented!");
+}
+
+int MultiplayerPeerExtension::get_unique_id() const {
+ int id;
+ if (GDVIRTUAL_CALL(_get_unique_id, id)) {
+ return id;
+ }
+ WARN_PRINT_ONCE("MultiplayerPeerExtension::_get_unique_id is unimplemented!");
+ return 0;
+}
+
+void MultiplayerPeerExtension::set_refuse_new_connections(bool p_enable) {
+ if (GDVIRTUAL_CALL(_set_refuse_new_connections, p_enable)) {
+ return;
+ }
+ MultiplayerPeer::set_refuse_new_connections(p_enable);
+}
+
+bool MultiplayerPeerExtension::is_refusing_new_connections() const {
+ bool refusing;
+ if (GDVIRTUAL_CALL(_is_refusing_new_connections, refusing)) {
+ return refusing;
+ }
+ return MultiplayerPeer::is_refusing_new_connections();
+}
+
+MultiplayerPeer::ConnectionStatus MultiplayerPeerExtension::get_connection_status() const {
+ int status;
+ if (GDVIRTUAL_CALL(_get_connection_status, status)) {
+ return (ConnectionStatus)status;
+ }
+ WARN_PRINT_ONCE("MultiplayerPeerExtension::_get_connection_status is unimplemented!");
+ return CONNECTION_DISCONNECTED;
+}
+
+void MultiplayerPeerExtension::_bind_methods() {
+ GDVIRTUAL_BIND(_get_packet, "r_buffer", "r_buffer_size");
+ GDVIRTUAL_BIND(_put_packet, "p_buffer", "p_buffer_size");
+ GDVIRTUAL_BIND(_get_available_packet_count);
+ GDVIRTUAL_BIND(_get_max_packet_size);
+
+ GDVIRTUAL_BIND(_set_transfer_channel, "p_channel");
+ GDVIRTUAL_BIND(_get_transfer_channel);
+
+ GDVIRTUAL_BIND(_set_transfer_mode, "p_mode");
+ GDVIRTUAL_BIND(_get_transfer_mode);
+
+ GDVIRTUAL_BIND(_set_target_peer, "p_peer");
+
+ GDVIRTUAL_BIND(_get_packet_peer);
+ GDVIRTUAL_BIND(_is_server);
+ GDVIRTUAL_BIND(_poll);
+ GDVIRTUAL_BIND(_get_unique_id);
+ GDVIRTUAL_BIND(_set_refuse_new_connections, "p_enable");
+ GDVIRTUAL_BIND(_is_refusing_new_connections);
+ GDVIRTUAL_BIND(_get_connection_status);
+}
diff --git a/modules/gdnative/net/multiplayer_peer_gdnative.h b/core/multiplayer/multiplayer_peer.h
index ab084faae6..126ba9e645 100644
--- a/modules/gdnative/net/multiplayer_peer_gdnative.h
+++ b/core/multiplayer/multiplayer_peer.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* multiplayer_peer_gdnative.h */
+/* multiplayer_peer.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,38 +28,83 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef MULTIPLAYER_PEER_GDNATIVE_H
-#define MULTIPLAYER_PEER_GDNATIVE_H
+#ifndef NETWORKED_MULTIPLAYER_PEER_H
+#define NETWORKED_MULTIPLAYER_PEER_H
-#include "core/io/multiplayer_peer.h"
-#include "modules/gdnative/gdnative.h"
-#include "modules/gdnative/include/net/godot_net.h"
+#include "core/io/packet_peer.h"
+#include "core/multiplayer/multiplayer.h"
-class MultiplayerPeerGDNative : public MultiplayerPeer {
- GDCLASS(MultiplayerPeerGDNative, MultiplayerPeer);
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
+#include "core/variant/native_ptr.h"
+
+class MultiplayerPeer : public PacketPeer {
+ GDCLASS(MultiplayerPeer, PacketPeer);
protected:
static void _bind_methods();
- const godot_net_multiplayer_peer *interface;
+
+private:
+ int transfer_channel = 0;
+ Multiplayer::TransferMode transfer_mode = Multiplayer::TRANSFER_MODE_RELIABLE;
+ bool refuse_connections = false;
public:
- MultiplayerPeerGDNative();
- ~MultiplayerPeerGDNative();
+ enum {
+ TARGET_PEER_BROADCAST = 0,
+ TARGET_PEER_SERVER = 1
+ };
+
+ enum ConnectionStatus {
+ CONNECTION_DISCONNECTED,
+ CONNECTION_CONNECTING,
+ CONNECTION_CONNECTED,
+ };
+
+ virtual void set_transfer_channel(int p_channel);
+ virtual int get_transfer_channel() const;
+ virtual void set_transfer_mode(Multiplayer::TransferMode p_mode);
+ virtual Multiplayer::TransferMode get_transfer_mode() const;
+ virtual void set_refuse_new_connections(bool p_enable);
+ virtual bool is_refusing_new_connections() const;
+
+ virtual void set_target_peer(int p_peer_id) = 0;
+
+ virtual int get_packet_peer() const = 0;
+
+ virtual bool is_server() const = 0;
+
+ virtual void poll() = 0;
+
+ virtual int get_unique_id() const = 0;
+
+ virtual ConnectionStatus get_connection_status() const = 0;
+
+ uint32_t generate_unique_id() const;
- /* Sets the interface implementation from GDNative */
- void set_native_multiplayer_peer(const godot_net_multiplayer_peer *p_impl);
+ MultiplayerPeer() {}
+};
+
+VARIANT_ENUM_CAST(MultiplayerPeer::ConnectionStatus);
+
+class MultiplayerPeerExtension : public MultiplayerPeer {
+ GDCLASS(MultiplayerPeerExtension, MultiplayerPeer);
+
+protected:
+ static void _bind_methods();
- /* Specific to PacketPeer */
- virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) override;
+public:
+ /* PacketPeer */
+ virtual int get_available_packet_count() const override;
+ virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) override; ///< buffer is GONE after next get_packet
virtual Error put_packet(const uint8_t *p_buffer, int p_buffer_size) override;
virtual int get_max_packet_size() const override;
- virtual int get_available_packet_count() const override;
- /* Specific to MultiplayerPeer */
+ /* MultiplayerPeer */
virtual void set_transfer_channel(int p_channel) override;
virtual int get_transfer_channel() const override;
- virtual void set_transfer_mode(TransferMode p_mode) override;
- virtual TransferMode get_transfer_mode() const override;
+ virtual void set_transfer_mode(Multiplayer::TransferMode p_mode) override;
+ virtual Multiplayer::TransferMode get_transfer_mode() const override;
virtual void set_target_peer(int p_peer_id) override;
virtual int get_packet_peer() const override;
@@ -74,6 +119,26 @@ public:
virtual bool is_refusing_new_connections() const override;
virtual ConnectionStatus get_connection_status() const override;
+
+ /* PacketPeer GDExtension */
+ GDVIRTUAL0RC(int, _get_available_packet_count);
+ GDVIRTUAL2R(int, _get_packet, GDNativeConstPtr<const uint8_t *>, GDNativePtr<int>);
+ GDVIRTUAL2R(int, _put_packet, GDNativeConstPtr<const uint8_t>, int);
+ GDVIRTUAL0RC(int, _get_max_packet_size);
+
+ /* MultiplayerPeer GDExtension */
+ GDVIRTUAL1(_set_transfer_channel, int);
+ GDVIRTUAL0RC(int, _get_transfer_channel);
+ GDVIRTUAL1(_set_transfer_mode, int);
+ GDVIRTUAL0RC(int, _get_transfer_mode);
+ GDVIRTUAL1(_set_target_peer, int);
+ GDVIRTUAL0RC(int, _get_packet_peer);
+ GDVIRTUAL0RC(bool, _is_server);
+ GDVIRTUAL0R(int, _poll);
+ GDVIRTUAL0RC(int, _get_unique_id);
+ GDVIRTUAL1(_set_refuse_new_connections, bool);
+ GDVIRTUAL0RC(bool, _is_refusing_new_connections);
+ GDVIRTUAL0RC(int, _get_connection_status);
};
-#endif // MULTIPLAYER_PEER_GDNATIVE_H
+#endif // NETWORKED_MULTIPLAYER_PEER_H
diff --git a/core/multiplayer/multiplayer_replicator.cpp b/core/multiplayer/multiplayer_replicator.cpp
new file mode 100644
index 0000000000..a4ea74327c
--- /dev/null
+++ b/core/multiplayer/multiplayer_replicator.cpp
@@ -0,0 +1,791 @@
+/*************************************************************************/
+/* multiplayer_replicator.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "core/multiplayer/multiplayer_replicator.h"
+
+#include "core/io/marshalls.h"
+#include "scene/main/node.h"
+#include "scene/resources/packed_scene.h"
+
+#define MAKE_ROOM(m_amount) \
+ if (packet_cache.size() < m_amount) \
+ packet_cache.resize(m_amount);
+
+Error MultiplayerReplicator::_sync_all_default(const ResourceUID::ID &p_scene_id, int p_peer) {
+ ERR_FAIL_COND_V(!replications.has(p_scene_id), ERR_INVALID_PARAMETER);
+ SceneConfig &cfg = replications[p_scene_id];
+ int full_size = 0;
+ bool same_size = true;
+ int last_size = 0;
+ bool all_raw = true;
+ struct EncodeInfo {
+ int size = 0;
+ bool raw = false;
+ List<Variant> state;
+ };
+ Map<ObjectID, struct EncodeInfo> state;
+ if (tracked_objects.has(p_scene_id)) {
+ for (const ObjectID &obj_id : tracked_objects[p_scene_id]) {
+ Object *obj = ObjectDB::get_instance(obj_id);
+ if (obj) {
+ struct EncodeInfo info;
+ Error err = _get_state(cfg.sync_properties, obj, info.state);
+ ERR_CONTINUE(err);
+ err = _encode_state(info.state, nullptr, info.size, &info.raw);
+ ERR_CONTINUE(err);
+ state[obj_id] = info;
+ full_size += info.size;
+ if (last_size && info.size != last_size) {
+ same_size = false;
+ }
+ all_raw = all_raw && info.raw;
+ last_size = info.size;
+ }
+ }
+ }
+ // Default implementation do not send empty updates.
+ if (!full_size) {
+ return OK;
+ }
+#ifdef DEBUG_ENABLED
+ if (full_size > 4096 && cfg.sync_interval) {
+ WARN_PRINT_ONCE(vformat("The timed state update for scene %d is big (%d bytes) consider optimizing it", p_scene_id));
+ }
+#endif
+ if (same_size) {
+ // This is fast and small. Should we allow more than 256 objects per type?
+ // This costs us 1 byte.
+ MAKE_ROOM(SYNC_CMD_OFFSET + 1 + 2 + 2 + full_size);
+ } else {
+ MAKE_ROOM(SYNC_CMD_OFFSET + 1 + 2 + state.size() * 2 + full_size);
+ }
+ int ofs = 0;
+ uint8_t *ptr = packet_cache.ptrw();
+ ptr[0] = MultiplayerAPI::NETWORK_COMMAND_SYNC | (same_size ? BYTE_OR_ZERO_FLAG : 0);
+ ofs = 1;
+ ofs += encode_uint64(p_scene_id, &ptr[ofs]);
+ ptr[ofs] = cfg.sync_recv++;
+ ofs += 1;
+ ofs += encode_uint16(state.size(), &ptr[ofs]);
+ if (same_size) {
+ ofs += encode_uint16(last_size + (all_raw ? 1 << 15 : 0), &ptr[ofs]);
+ }
+ for (const ObjectID &obj_id : tracked_objects[p_scene_id]) {
+ if (!state.has(obj_id)) {
+ continue;
+ }
+ struct EncodeInfo &info = state[obj_id];
+ Object *obj = ObjectDB::get_instance(obj_id);
+ ERR_CONTINUE(!obj);
+ int size = 0;
+ if (!same_size) {
+ // We need to encode the size of every object.
+ ofs += encode_uint16(info.size + (info.raw ? 1 << 15 : 0), &ptr[ofs]);
+ }
+ Error err = _encode_state(info.state, &ptr[ofs], size, &info.raw);
+ ERR_CONTINUE(err);
+ ofs += size;
+ }
+ Ref<MultiplayerPeer> peer = multiplayer->get_multiplayer_peer();
+ peer->set_target_peer(p_peer);
+ peer->set_transfer_channel(0);
+ peer->set_transfer_mode(Multiplayer::TRANSFER_MODE_UNRELIABLE);
+ return peer->put_packet(ptr, ofs);
+}
+
+void MultiplayerReplicator::_process_default_sync(const ResourceUID::ID &p_id, const uint8_t *p_packet, int p_packet_len) {
+ ERR_FAIL_COND_MSG(p_packet_len < SYNC_CMD_OFFSET + 5, "Invalid spawn packet received");
+ ERR_FAIL_COND_MSG(!replications.has(p_id), "Invalid spawn ID received " + itos(p_id));
+ SceneConfig &cfg = replications[p_id];
+ ERR_FAIL_COND_MSG(cfg.mode != REPLICATION_MODE_SERVER || multiplayer->is_server(), "The defualt implementation only allows sync packets from the server");
+ const bool same_size = p_packet[0] & BYTE_OR_ZERO_FLAG;
+ int ofs = SYNC_CMD_OFFSET;
+ int time = p_packet[ofs];
+ // Skip old update.
+ if (time < cfg.sync_recv && cfg.sync_recv - time < 127) {
+ return;
+ }
+ cfg.sync_recv = time;
+ ofs += 1;
+ int count = decode_uint16(&p_packet[ofs]);
+ ofs += 2;
+#ifdef DEBUG_ENABLED
+ ERR_FAIL_COND(!tracked_objects.has(p_id) || tracked_objects[p_id].size() != count);
+#else
+ if (!tracked_objects.has(p_id) || tracked_objects[p_id].size() != count) {
+ return;
+ }
+#endif
+ int data_size = 0;
+ bool raw = false;
+ if (same_size) {
+ // This is fast and optimized.
+ data_size = decode_uint16(&p_packet[ofs]);
+ raw = (data_size & (1 << 15)) != 0;
+ data_size = data_size & ~(1 << 15);
+ ofs += 2;
+ ERR_FAIL_COND(p_packet_len - ofs < data_size * count);
+ }
+ for (const ObjectID &obj_id : tracked_objects[p_id]) {
+ Object *obj = ObjectDB::get_instance(obj_id);
+ ERR_CONTINUE(!obj);
+ if (!same_size) {
+ // This is slow and wasteful.
+ data_size = decode_uint16(&p_packet[ofs]);
+ raw = (data_size & (1 << 15)) != 0;
+ data_size = data_size & ~(1 << 15);
+ ofs += 2;
+ ERR_FAIL_COND(p_packet_len - ofs < data_size);
+ }
+ int size = 0;
+ Error err = _decode_state(cfg.sync_properties, obj, &p_packet[ofs], data_size, size, raw);
+ ofs += data_size;
+ ERR_CONTINUE(err);
+ ERR_CONTINUE(size != data_size);
+ }
+}
+
+Error MultiplayerReplicator::_send_default_spawn_despawn(int p_peer_id, const ResourceUID::ID &p_scene_id, Object *p_obj, const NodePath &p_path, bool p_spawn) {
+ ERR_FAIL_COND_V(p_spawn && !p_obj, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(!replications.has(p_scene_id), ERR_INVALID_PARAMETER);
+ Error err;
+ // Prepare state
+ List<Variant> state_variants;
+ int state_len = 0;
+ const SceneConfig &cfg = replications[p_scene_id];
+ if (p_spawn) {
+ if ((err = _get_state(cfg.properties, p_obj, state_variants)) != OK) {
+ return err;
+ }
+ }
+
+ bool is_raw = false;
+ if (state_variants.size() == 1 && state_variants[0].get_type() == Variant::PACKED_BYTE_ARRAY) {
+ is_raw = true;
+ const PackedByteArray pba = state_variants[0];
+ state_len = pba.size();
+ } else if (state_variants.size()) {
+ err = _encode_state(state_variants, nullptr, state_len);
+ ERR_FAIL_COND_V(err, err);
+ } else {
+ is_raw = true;
+ }
+
+ int ofs = 0;
+
+ // Prepare simplified path
+ const Node *root_node = multiplayer->get_root_node();
+ ERR_FAIL_COND_V(!root_node, ERR_UNCONFIGURED);
+ NodePath rel_path = (root_node->get_path()).rel_path_to(p_path);
+ const Vector<StringName> names = rel_path.get_names();
+ ERR_FAIL_COND_V(names.size() < 2, ERR_INVALID_PARAMETER);
+
+ NodePath parent = NodePath(names.subarray(0, names.size() - 2), false);
+ ERR_FAIL_COND_V_MSG(!root_node->has_node(parent), ERR_INVALID_PARAMETER, "Path not found: " + parent);
+
+ int path_id = 0;
+ multiplayer->send_confirm_path(root_node->get_node(parent), parent, p_peer_id, path_id);
+
+ // Encode name and parent ID.
+ CharString cname = String(names[names.size() - 1]).utf8();
+ int nlen = encode_cstring(cname.get_data(), nullptr);
+ MAKE_ROOM(SPAWN_CMD_OFFSET + 4 + 4 + nlen + state_len);
+ uint8_t *ptr = packet_cache.ptrw();
+ ptr[0] = (p_spawn ? MultiplayerAPI::NETWORK_COMMAND_SPAWN : MultiplayerAPI::NETWORK_COMMAND_DESPAWN) | (is_raw ? BYTE_OR_ZERO_FLAG : 0);
+ ofs = 1;
+ ofs += encode_uint64(p_scene_id, &ptr[ofs]);
+ ofs += encode_uint32(path_id, &ptr[ofs]);
+ ofs += encode_uint32(nlen, &ptr[ofs]);
+ ofs += encode_cstring(cname.get_data(), &ptr[ofs]);
+
+ // Encode state.
+ if (!is_raw) {
+ _encode_state(state_variants, &ptr[ofs], state_len);
+ } else if (state_len) {
+ PackedByteArray pba = state_variants[0];
+ memcpy(&ptr[ofs], pba.ptr(), state_len);
+ }
+
+ Ref<MultiplayerPeer> peer = multiplayer->get_multiplayer_peer();
+ peer->set_target_peer(p_peer_id);
+ peer->set_transfer_channel(0);
+ peer->set_transfer_mode(Multiplayer::TRANSFER_MODE_RELIABLE);
+ return peer->put_packet(ptr, ofs + state_len);
+}
+
+void MultiplayerReplicator::_process_default_spawn_despawn(int p_from, const ResourceUID::ID &p_scene_id, const uint8_t *p_packet, int p_packet_len, bool p_spawn) {
+ ERR_FAIL_COND_MSG(p_packet_len < SPAWN_CMD_OFFSET + 9, "Invalid spawn packet received");
+ int ofs = SPAWN_CMD_OFFSET;
+ uint32_t node_target = decode_uint32(&p_packet[ofs]);
+ Node *parent = multiplayer->get_cached_node(p_from, node_target);
+ ofs += 4;
+ ERR_FAIL_COND_MSG(parent == nullptr, "Invalid packet received. Requested node was not found.");
+
+ uint32_t name_len = decode_uint32(&p_packet[ofs]);
+ ofs += 4;
+ ERR_FAIL_COND_MSG(name_len > uint32_t(p_packet_len - ofs), vformat("Invalid spawn packet size: %d, wants: %d", p_packet_len, ofs + name_len));
+ ERR_FAIL_COND_MSG(name_len < 1, "Zero spawn name size.");
+
+ const String name = String::utf8((const char *)&p_packet[ofs], name_len);
+ // We need to make sure no trickery happens here (e.g. despawning a subpath), but we want to allow autogenerated ("@") node names.
+ ERR_FAIL_COND_MSG(name.validate_node_name() != name.replace("@", ""), vformat("Invalid node name received: '%s'", name));
+ ofs += name_len;
+
+ const SceneConfig &cfg = replications[p_scene_id];
+ if (cfg.mode == REPLICATION_MODE_SERVER && p_from == 1) {
+ String scene_path = ResourceUID::get_singleton()->get_id_path(p_scene_id);
+ if (p_spawn) {
+ const bool is_raw = ((p_packet[0] & BYTE_OR_ZERO_FLAG) >> BYTE_OR_ZERO_SHIFT) == 1;
+
+ ERR_FAIL_COND_MSG(parent->has_node(name), vformat("Unable to spawn node. Node already exists: %s/%s", parent->get_path(), name));
+ RES res = ResourceLoader::load(scene_path);
+ ERR_FAIL_COND_MSG(!res.is_valid(), "Unable to load scene to spawn at path: " + scene_path);
+ PackedScene *scene = Object::cast_to<PackedScene>(res.ptr());
+ ERR_FAIL_COND(!scene);
+ Node *node = scene->instantiate();
+ ERR_FAIL_COND(!node);
+ replicated_nodes[node->get_instance_id()] = p_scene_id;
+ _track(p_scene_id, node);
+ int size;
+ _decode_state(cfg.properties, node, &p_packet[ofs], p_packet_len - ofs, size, is_raw);
+ parent->_add_child_nocheck(node, name);
+ emit_signal(SNAME("spawned"), p_scene_id, node);
+ } else {
+ ERR_FAIL_COND_MSG(!parent->has_node(name), vformat("Path not found: %s/%s", parent->get_path(), name));
+ Node *node = parent->get_node(name);
+ ERR_FAIL_COND_MSG(!replicated_nodes.has(node->get_instance_id()), vformat("Trying to despawn a Node that was not replicated: %s/%s", parent->get_path(), name));
+ emit_signal(SNAME("despawned"), p_scene_id, node);
+ _untrack(p_scene_id, node);
+ replicated_nodes.erase(node->get_instance_id());
+ node->queue_delete();
+ }
+ } else {
+ PackedByteArray data;
+ if (p_packet_len > ofs) {
+ data.resize(p_packet_len - ofs);
+ memcpy(data.ptrw(), &p_packet[ofs], data.size());
+ }
+ if (p_spawn) {
+ emit_signal(SNAME("spawn_requested"), p_from, p_scene_id, parent, name, data);
+ } else {
+ emit_signal(SNAME("despawn_requested"), p_from, p_scene_id, parent, name, data);
+ }
+ }
+}
+
+void MultiplayerReplicator::process_spawn_despawn(int p_from, const uint8_t *p_packet, int p_packet_len, bool p_spawn) {
+ ERR_FAIL_COND_MSG(p_packet_len < SPAWN_CMD_OFFSET, "Invalid spawn packet received");
+ ResourceUID::ID id = decode_uint64(&p_packet[1]);
+ ERR_FAIL_COND_MSG(!replications.has(id), "Invalid spawn ID received " + itos(id));
+
+ const SceneConfig &cfg = replications[id];
+ if (cfg.on_spawn_despawn_receive.is_valid()) {
+ int ofs = SPAWN_CMD_OFFSET;
+ bool is_raw = ((p_packet[0] & BYTE_OR_ZERO_FLAG) >> BYTE_OR_ZERO_SHIFT) == 1;
+ Variant data;
+ int left = p_packet_len - ofs;
+ if (is_raw && left) {
+ PackedByteArray pba;
+ pba.resize(left);
+ memcpy(pba.ptrw(), &p_packet[ofs], pba.size());
+ data = pba;
+ } else if (left) {
+ ERR_FAIL_COND(decode_variant(data, &p_packet[ofs], left) != OK);
+ }
+
+ Variant args[4];
+ args[0] = p_from;
+ args[1] = id;
+ args[2] = data;
+ args[3] = p_spawn;
+ const Variant *argp[] = { &args[0], &args[1], &args[2], &args[3] };
+ Callable::CallError ce;
+ Variant ret;
+ cfg.on_spawn_despawn_receive.call(argp, 4, ret, ce);
+ ERR_FAIL_COND_MSG(ce.error != Callable::CallError::CALL_OK, "Custom receive function failed");
+ } else {
+ _process_default_spawn_despawn(p_from, id, p_packet, p_packet_len, p_spawn);
+ }
+}
+
+void MultiplayerReplicator::process_sync(int p_from, const uint8_t *p_packet, int p_packet_len) {
+ ERR_FAIL_COND_MSG(p_packet_len < SPAWN_CMD_OFFSET, "Invalid spawn packet received");
+ ResourceUID::ID id = decode_uint64(&p_packet[1]);
+ ERR_FAIL_COND_MSG(!replications.has(id), "Invalid spawn ID received " + itos(id));
+ const SceneConfig &cfg = replications[id];
+ if (cfg.on_sync_receive.is_valid()) {
+ Array objs;
+ if (tracked_objects.has(id)) {
+ objs.resize(tracked_objects[id].size());
+ int idx = 0;
+ for (const ObjectID &obj_id : tracked_objects[id]) {
+ objs[idx++] = ObjectDB::get_instance(obj_id);
+ }
+ }
+ PackedByteArray pba;
+ pba.resize(p_packet_len - SYNC_CMD_OFFSET);
+ if (pba.size()) {
+ memcpy(pba.ptrw(), p_packet + SYNC_CMD_OFFSET, p_packet_len - SYNC_CMD_OFFSET);
+ }
+ Variant args[4] = { p_from, id, objs, pba };
+ Variant *argp[4] = { args, &args[1], &args[2], &args[3] };
+ Callable::CallError ce;
+ Variant ret;
+ cfg.on_sync_receive.call((const Variant **)argp, 4, ret, ce);
+ ERR_FAIL_COND_MSG(ce.error != Callable::CallError::CALL_OK, "Custom sync function failed");
+ } else {
+ ERR_FAIL_COND_MSG(p_from != 1, "Default sync implementation only allow syncing from server to client");
+ _process_default_sync(id, p_packet, p_packet_len);
+ }
+}
+
+Error MultiplayerReplicator::_get_state(const List<StringName> &p_properties, const Object *p_obj, List<Variant> &r_variant) {
+ ERR_FAIL_COND_V_MSG(!p_obj, ERR_INVALID_PARAMETER, "Cannot encode null object");
+ for (const StringName &prop : p_properties) {
+ bool valid = false;
+ const Variant v = p_obj->get(prop, &valid);
+ ERR_FAIL_COND_V_MSG(!valid, ERR_INVALID_DATA, vformat("Property '%s' not found.", prop));
+ r_variant.push_back(v);
+ }
+ return OK;
+}
+
+Error MultiplayerReplicator::_encode_state(const List<Variant> &p_variants, uint8_t *p_buffer, int &r_len, bool *r_raw) {
+ r_len = 0;
+ int size = 0;
+
+ // Try raw encoding optimization.
+ if (r_raw && p_variants.size() == 1) {
+ *r_raw = false;
+ const Variant v = p_variants[0];
+ if (v.get_type() == Variant::PACKED_BYTE_ARRAY) {
+ *r_raw = true;
+ const PackedByteArray pba = v;
+ if (p_buffer) {
+ memcpy(p_buffer, pba.ptr(), pba.size());
+ }
+ r_len += pba.size();
+ } else {
+ multiplayer->encode_and_compress_variant(v, p_buffer, size);
+ r_len += size;
+ }
+ return OK;
+ }
+
+ // Regular encoding.
+ for (const Variant &v : p_variants) {
+ multiplayer->encode_and_compress_variant(v, p_buffer ? p_buffer + r_len : nullptr, size);
+ r_len += size;
+ }
+ return OK;
+}
+
+Error MultiplayerReplicator::_decode_state(const List<StringName> &p_properties, Object *p_obj, const uint8_t *p_buffer, int p_len, int &r_len, bool p_raw) {
+ r_len = 0;
+ int argc = p_properties.size();
+ if (argc == 0 && p_raw) {
+ ERR_FAIL_COND_V_MSG(p_len != 0, ERR_INVALID_DATA, "Buffer has trailing bytes.");
+ return OK;
+ }
+ ERR_FAIL_COND_V(p_raw && argc != 1, ERR_INVALID_DATA);
+ if (p_raw) {
+ r_len = p_len;
+ PackedByteArray pba;
+ pba.resize(p_len);
+ memcpy(pba.ptrw(), p_buffer, p_len);
+ p_obj->set(p_properties[0], pba);
+ return OK;
+ }
+
+ Vector<Variant> args;
+ Vector<const Variant *> argp;
+ args.resize(argc);
+
+ for (int i = 0; i < argc; i++) {
+ ERR_FAIL_COND_V_MSG(r_len >= p_len, ERR_INVALID_DATA, "Invalid packet received. Size too small.");
+
+ int vlen;
+ Error err = multiplayer->decode_and_decompress_variant(args.write[i], &p_buffer[r_len], p_len - r_len, &vlen);
+ ERR_FAIL_COND_V_MSG(err != OK, err, "Invalid packet received. Unable to decode state variable.");
+ r_len += vlen;
+ }
+ ERR_FAIL_COND_V_MSG(p_len - r_len != 0, ERR_INVALID_DATA, "Buffer has trailing bytes.");
+
+ int i = 0;
+ for (const StringName &prop : p_properties) {
+ p_obj->set(prop, args[i]);
+ i += 1;
+ }
+ return OK;
+}
+
+Error MultiplayerReplicator::spawn_config(const ResourceUID::ID &p_id, ReplicationMode p_mode, const TypedArray<StringName> &p_props, const Callable &p_on_send, const Callable &p_on_recv) {
+ ERR_FAIL_COND_V(p_mode < REPLICATION_MODE_NONE || p_mode > REPLICATION_MODE_CUSTOM, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(!ResourceUID::get_singleton()->has_id(p_id), ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V_MSG(p_on_send.is_valid() != p_on_recv.is_valid(), ERR_INVALID_PARAMETER, "Send and receive custom callables must be both valid or both empty");
+#ifdef TOOLS_ENABLED
+ if (!p_on_send.is_valid()) {
+ // We allow non scene spawning with custom callables.
+ String path = ResourceUID::get_singleton()->get_id_path(p_id);
+ RES res = ResourceLoader::load(path);
+ ERR_FAIL_COND_V(!res->is_class("PackedScene"), ERR_INVALID_PARAMETER);
+ }
+#endif
+ if (p_mode == REPLICATION_MODE_NONE) {
+ if (replications.has(p_id)) {
+ replications.erase(p_id);
+ }
+ } else {
+ SceneConfig cfg;
+ cfg.mode = p_mode;
+ for (int i = 0; i < p_props.size(); i++) {
+ cfg.properties.push_back(p_props[i]);
+ }
+ cfg.on_spawn_despawn_send = p_on_send;
+ cfg.on_spawn_despawn_receive = p_on_recv;
+ replications[p_id] = cfg;
+ }
+ return OK;
+}
+
+Error MultiplayerReplicator::sync_config(const ResourceUID::ID &p_id, uint64_t p_interval, const TypedArray<StringName> &p_props, const Callable &p_on_send, const Callable &p_on_recv) {
+ ERR_FAIL_COND_V(!ResourceUID::get_singleton()->has_id(p_id), ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V_MSG(p_on_send.is_valid() != p_on_recv.is_valid(), ERR_INVALID_PARAMETER, "Send and receive custom callables must be both valid or both empty");
+ ERR_FAIL_COND_V(!replications.has(p_id), ERR_UNCONFIGURED);
+ SceneConfig &cfg = replications[p_id];
+ ERR_FAIL_COND_V_MSG(p_interval && cfg.mode != REPLICATION_MODE_SERVER && !p_on_send.is_valid(), ERR_INVALID_PARAMETER, "Timed updates in custom mode are only allowed if custom callbacks are also specified");
+ for (int i = 0; i < p_props.size(); i++) {
+ cfg.sync_properties.push_back(p_props[i]);
+ }
+ cfg.on_sync_send = p_on_send;
+ cfg.on_sync_receive = p_on_recv;
+ cfg.sync_interval = p_interval * 1000;
+ return OK;
+}
+
+Error MultiplayerReplicator::_send_spawn_despawn(int p_peer_id, const ResourceUID::ID &p_scene_id, const Variant &p_data, bool p_spawn) {
+ int data_size = 0;
+ int is_raw = false;
+ if (p_data.get_type() == Variant::PACKED_BYTE_ARRAY) {
+ const PackedByteArray pba = p_data;
+ is_raw = true;
+ data_size = p_data.operator PackedByteArray().size();
+ } else if (p_data.get_type() == Variant::NIL) {
+ is_raw = true;
+ } else {
+ Error err = encode_variant(p_data, nullptr, data_size);
+ ERR_FAIL_COND_V(err, err);
+ }
+ MAKE_ROOM(SPAWN_CMD_OFFSET + data_size);
+ uint8_t *ptr = packet_cache.ptrw();
+ ptr[0] = (p_spawn ? MultiplayerAPI::NETWORK_COMMAND_SPAWN : MultiplayerAPI::NETWORK_COMMAND_DESPAWN) + ((is_raw ? 1 : 0) << BYTE_OR_ZERO_SHIFT);
+ encode_uint64(p_scene_id, &ptr[1]);
+ if (p_data.get_type() == Variant::PACKED_BYTE_ARRAY) {
+ const PackedByteArray pba = p_data;
+ memcpy(&ptr[SPAWN_CMD_OFFSET], pba.ptr(), pba.size());
+ } else if (data_size) {
+ encode_variant(p_data, &ptr[SPAWN_CMD_OFFSET], data_size);
+ }
+ Ref<MultiplayerPeer> peer = multiplayer->get_multiplayer_peer();
+ peer->set_target_peer(p_peer_id);
+ peer->set_transfer_channel(0);
+ peer->set_transfer_mode(Multiplayer::TRANSFER_MODE_RELIABLE);
+ return peer->put_packet(ptr, SPAWN_CMD_OFFSET + data_size);
+}
+
+Error MultiplayerReplicator::send_despawn(int p_peer_id, const ResourceUID::ID &p_scene_id, const Variant &p_data, const NodePath &p_path) {
+ ERR_FAIL_COND_V(!multiplayer->has_multiplayer_peer(), ERR_UNCONFIGURED);
+ ERR_FAIL_COND_V_MSG(!replications.has(p_scene_id), ERR_INVALID_PARAMETER, vformat("Spawnable not found: %d", p_scene_id));
+ const SceneConfig &cfg = replications[p_scene_id];
+ if (cfg.on_spawn_despawn_send.is_valid()) {
+ return _send_spawn_despawn(p_peer_id, p_scene_id, p_data, true);
+ } else {
+ ERR_FAIL_COND_V_MSG(cfg.mode == REPLICATION_MODE_SERVER && multiplayer->is_server(), ERR_UNAVAILABLE, "Manual despawn is restricted in default server mode implementation. Use custom mode if you desire control over server spawn requests.");
+ NodePath path = p_path;
+ Object *obj = p_data.get_type() == Variant::OBJECT ? p_data.get_validated_object() : nullptr;
+ if (path.is_empty() && obj) {
+ Node *node = Object::cast_to<Node>(obj);
+ if (node && node->is_inside_tree()) {
+ path = node->get_path();
+ }
+ }
+ ERR_FAIL_COND_V_MSG(path.is_empty(), ERR_INVALID_PARAMETER, "Despawn default implementation requires a despawn path, or the data to be a node inside the SceneTree");
+ return _send_default_spawn_despawn(p_peer_id, p_scene_id, obj, path, false);
+ }
+}
+
+Error MultiplayerReplicator::send_spawn(int p_peer_id, const ResourceUID::ID &p_scene_id, const Variant &p_data, const NodePath &p_path) {
+ ERR_FAIL_COND_V(!multiplayer->has_multiplayer_peer(), ERR_UNCONFIGURED);
+ ERR_FAIL_COND_V_MSG(!replications.has(p_scene_id), ERR_INVALID_PARAMETER, vformat("Spawnable not found: %d", p_scene_id));
+ const SceneConfig &cfg = replications[p_scene_id];
+ if (cfg.on_spawn_despawn_send.is_valid()) {
+ return _send_spawn_despawn(p_peer_id, p_scene_id, p_data, false);
+ } else {
+ ERR_FAIL_COND_V_MSG(cfg.mode == REPLICATION_MODE_SERVER && multiplayer->is_server(), ERR_UNAVAILABLE, "Manual spawn is restricted in default server mode implementation. Use custom mode if you desire control over server spawn requests.");
+ NodePath path = p_path;
+ Object *obj = p_data.get_type() == Variant::OBJECT ? p_data.get_validated_object() : nullptr;
+ ERR_FAIL_COND_V_MSG(!obj, ERR_INVALID_PARAMETER, "Spawn default implementation requires the data to be an object.");
+ if (path.is_empty()) {
+ Node *node = Object::cast_to<Node>(obj);
+ if (node && node->is_inside_tree()) {
+ path = node->get_path();
+ }
+ }
+ ERR_FAIL_COND_V_MSG(path.is_empty(), ERR_INVALID_PARAMETER, "Spawn default implementation requires a spawn path, or the data to be a node inside the SceneTree");
+ return _send_default_spawn_despawn(p_peer_id, p_scene_id, obj, path, true);
+ }
+}
+
+Error MultiplayerReplicator::_spawn_despawn(ResourceUID::ID p_scene_id, Object *p_obj, int p_peer, bool p_spawn) {
+ ERR_FAIL_COND_V_MSG(!replications.has(p_scene_id), ERR_INVALID_PARAMETER, vformat("Spawnable not found: %d", p_scene_id));
+
+ const SceneConfig &cfg = replications[p_scene_id];
+ if (cfg.on_spawn_despawn_send.is_valid()) {
+ Variant args[4];
+ args[0] = p_peer;
+ args[1] = p_scene_id;
+ args[2] = p_obj;
+ args[3] = true;
+ const Variant *argp[] = { &args[0], &args[1], &args[2], &args[3] };
+ Callable::CallError ce;
+ Variant ret;
+ cfg.on_spawn_despawn_send.call(argp, 4, ret, ce);
+ ERR_FAIL_COND_V_MSG(ce.error != Callable::CallError::CALL_OK, FAILED, "Custom send function failed");
+ return OK;
+ } else {
+ Node *node = Object::cast_to<Node>(p_obj);
+ ERR_FAIL_COND_V_MSG(!p_obj, ERR_INVALID_PARAMETER, "Only nodes can be replicated by the default implementation");
+ return _send_default_spawn_despawn(p_peer, p_scene_id, node, node->get_path(), p_spawn);
+ }
+}
+
+Error MultiplayerReplicator::spawn(ResourceUID::ID p_scene_id, Object *p_obj, int p_peer) {
+ return _spawn_despawn(p_scene_id, p_obj, p_peer, true);
+}
+
+Error MultiplayerReplicator::despawn(ResourceUID::ID p_scene_id, Object *p_obj, int p_peer) {
+ return _spawn_despawn(p_scene_id, p_obj, p_peer, false);
+}
+
+PackedByteArray MultiplayerReplicator::encode_state(const ResourceUID::ID &p_scene_id, const Object *p_obj, bool p_initial) {
+ PackedByteArray state;
+ ERR_FAIL_COND_V_MSG(!replications.has(p_scene_id), state, vformat("Spawnable not found: %d", p_scene_id));
+ const SceneConfig &cfg = replications[p_scene_id];
+ int len = 0;
+ List<Variant> state_vars;
+ const List<StringName> props = p_initial ? cfg.properties : cfg.sync_properties;
+ Error err = _get_state(props, p_obj, state_vars);
+ ERR_FAIL_COND_V_MSG(err != OK, state, "Unable to retrieve object state.");
+ err = _encode_state(state_vars, nullptr, len);
+ ERR_FAIL_COND_V_MSG(err != OK, state, "Unable to encode object state.");
+ state.resize(len);
+ _encode_state(state_vars, state.ptrw(), len);
+ return state;
+}
+
+Error MultiplayerReplicator::decode_state(const ResourceUID::ID &p_scene_id, Object *p_obj, const PackedByteArray p_data, bool p_initial) {
+ ERR_FAIL_COND_V_MSG(!replications.has(p_scene_id), ERR_INVALID_PARAMETER, vformat("Spawnable not found: %d", p_scene_id));
+ const SceneConfig &cfg = replications[p_scene_id];
+ const List<StringName> props = p_initial ? cfg.properties : cfg.sync_properties;
+ int size;
+ return _decode_state(props, p_obj, p_data.ptr(), p_data.size(), size);
+}
+
+void MultiplayerReplicator::scene_enter_exit_notify(const String &p_scene, Node *p_node, bool p_enter) {
+ if (!multiplayer->has_multiplayer_peer()) {
+ return;
+ }
+ Node *root_node = multiplayer->get_root_node();
+ ERR_FAIL_COND(!p_node || !p_node->get_parent() || !root_node);
+ NodePath path = (root_node->get_path()).rel_path_to(p_node->get_parent()->get_path());
+ if (path.is_empty()) {
+ return;
+ }
+ ResourceUID::ID id = ResourceLoader::get_resource_uid(p_scene);
+ if (!replications.has(id)) {
+ return;
+ }
+ const SceneConfig &cfg = replications[id];
+ if (p_enter) {
+ if (cfg.mode == REPLICATION_MODE_SERVER && multiplayer->is_server()) {
+ replicated_nodes[p_node->get_instance_id()] = id;
+ _track(id, p_node);
+ spawn(id, p_node, 0);
+ }
+ emit_signal(SNAME("replicated_instance_added"), id, p_node);
+ } else {
+ if (cfg.mode == REPLICATION_MODE_SERVER && multiplayer->is_server() && replicated_nodes.has(p_node->get_instance_id())) {
+ replicated_nodes.erase(p_node->get_instance_id());
+ _untrack(id, p_node);
+ despawn(id, p_node, 0);
+ }
+ emit_signal(SNAME("replicated_instance_removed"), id, p_node);
+ }
+}
+
+void MultiplayerReplicator::spawn_all(int p_peer) {
+ for (const KeyValue<ObjectID, ResourceUID::ID> &E : replicated_nodes) {
+ // Only server mode adds to replicated_nodes, no need to check it.
+ Object *obj = ObjectDB::get_instance(E.key);
+ ERR_CONTINUE(!obj);
+ Node *node = Object::cast_to<Node>(obj);
+ ERR_CONTINUE(!node);
+ spawn(E.value, node, p_peer);
+ }
+}
+
+void MultiplayerReplicator::poll() {
+ for (KeyValue<ResourceUID::ID, SceneConfig> &E : replications) {
+ if (!E.value.sync_interval) {
+ continue;
+ }
+ if (E.value.mode == REPLICATION_MODE_SERVER && !multiplayer->is_server()) {
+ continue;
+ }
+ uint64_t time = OS::get_singleton()->get_ticks_usec();
+ if (E.value.sync_last + E.value.sync_interval <= time) {
+ sync_all(E.key, 0);
+ E.value.sync_last = time;
+ }
+ // Handle wrapping.
+ if (E.value.sync_last > time) {
+ E.value.sync_last = time;
+ }
+ }
+}
+
+void MultiplayerReplicator::track(const ResourceUID::ID &p_scene_id, Object *p_obj) {
+ ERR_FAIL_COND(!replications.has(p_scene_id));
+ const SceneConfig &cfg = replications[p_scene_id];
+ ERR_FAIL_COND_MSG(cfg.mode == REPLICATION_MODE_SERVER, "Manual object tracking is not allowed in server mode.");
+ _track(p_scene_id, p_obj);
+}
+
+void MultiplayerReplicator::_track(const ResourceUID::ID &p_scene_id, Object *p_obj) {
+ ERR_FAIL_COND(!p_obj);
+ ERR_FAIL_COND(!replications.has(p_scene_id));
+ if (!tracked_objects.has(p_scene_id)) {
+ tracked_objects[p_scene_id] = List<ObjectID>();
+ }
+ tracked_objects[p_scene_id].push_back(p_obj->get_instance_id());
+}
+
+void MultiplayerReplicator::untrack(const ResourceUID::ID &p_scene_id, Object *p_obj) {
+ ERR_FAIL_COND(!replications.has(p_scene_id));
+ const SceneConfig &cfg = replications[p_scene_id];
+ ERR_FAIL_COND_MSG(cfg.mode == REPLICATION_MODE_SERVER, "Manual object tracking is not allowed in server mode.");
+ _untrack(p_scene_id, p_obj);
+}
+
+void MultiplayerReplicator::_untrack(const ResourceUID::ID &p_scene_id, Object *p_obj) {
+ ERR_FAIL_COND(!p_obj);
+ ERR_FAIL_COND(!replications.has(p_scene_id));
+ if (tracked_objects.has(p_scene_id)) {
+ tracked_objects[p_scene_id].erase(p_obj->get_instance_id());
+ }
+}
+
+Error MultiplayerReplicator::sync_all(const ResourceUID::ID &p_scene_id, int p_peer) {
+ ERR_FAIL_COND_V(!replications.has(p_scene_id), ERR_INVALID_PARAMETER);
+ if (!tracked_objects.has(p_scene_id)) {
+ return OK;
+ }
+ const SceneConfig &cfg = replications[p_scene_id];
+ if (cfg.on_sync_send.is_valid()) {
+ Array objs;
+ if (tracked_objects.has(p_scene_id)) {
+ objs.resize(tracked_objects[p_scene_id].size());
+ int idx = 0;
+ for (const ObjectID &obj_id : tracked_objects[p_scene_id]) {
+ objs[idx++] = ObjectDB::get_instance(obj_id);
+ }
+ }
+ Variant args[3] = { p_scene_id, objs, p_peer };
+ Variant *argp[3] = { args, &args[1], &args[2] };
+ Callable::CallError ce;
+ Variant ret;
+ cfg.on_sync_send.call((const Variant **)argp, 3, ret, ce);
+ ERR_FAIL_COND_V_MSG(ce.error != Callable::CallError::CALL_OK, FAILED, "Custom sync function failed");
+ return OK;
+ } else if (cfg.sync_properties.size()) {
+ return _sync_all_default(p_scene_id, p_peer);
+ }
+ return OK;
+}
+
+Error MultiplayerReplicator::send_sync(int p_peer_id, const ResourceUID::ID &p_scene_id, PackedByteArray p_data, Multiplayer::TransferMode p_transfer_mode, int p_channel) {
+ ERR_FAIL_COND_V(!multiplayer->has_multiplayer_peer(), ERR_UNCONFIGURED);
+ ERR_FAIL_COND_V(!replications.has(p_scene_id), ERR_INVALID_PARAMETER);
+ const SceneConfig &cfg = replications[p_scene_id];
+ ERR_FAIL_COND_V_MSG(!cfg.on_sync_send.is_valid(), ERR_UNCONFIGURED, "Sending raw sync messages is only available with custom functions");
+ MAKE_ROOM(SYNC_CMD_OFFSET + p_data.size());
+ uint8_t *ptr = packet_cache.ptrw();
+ ptr[0] = MultiplayerAPI::NETWORK_COMMAND_SYNC;
+ encode_uint64(p_scene_id, &ptr[1]);
+ if (p_data.size()) {
+ memcpy(&ptr[SYNC_CMD_OFFSET], p_data.ptr(), p_data.size());
+ }
+ Ref<MultiplayerPeer> peer = multiplayer->get_multiplayer_peer();
+ peer->set_target_peer(p_peer_id);
+ peer->set_transfer_channel(p_channel);
+ peer->set_transfer_mode(p_transfer_mode);
+ return peer->put_packet(ptr, SYNC_CMD_OFFSET + p_data.size());
+}
+
+void MultiplayerReplicator::clear() {
+ tracked_objects.clear();
+ replicated_nodes.clear();
+}
+
+void MultiplayerReplicator::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("spawn_config", "scene_id", "spawn_mode", "properties", "custom_send", "custom_receive"), &MultiplayerReplicator::spawn_config, DEFVAL(TypedArray<StringName>()), DEFVAL(Callable()), DEFVAL(Callable()));
+ ClassDB::bind_method(D_METHOD("sync_config", "scene_id", "interval", "properties", "custom_send", "custom_receive"), &MultiplayerReplicator::sync_config, DEFVAL(TypedArray<StringName>()), DEFVAL(Callable()), DEFVAL(Callable()));
+ ClassDB::bind_method(D_METHOD("despawn", "scene_id", "object", "peer_id"), &MultiplayerReplicator::despawn, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("spawn", "scene_id", "object", "peer_id"), &MultiplayerReplicator::spawn, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("send_despawn", "peer_id", "scene_id", "data", "path"), &MultiplayerReplicator::send_despawn, DEFVAL(Variant()), DEFVAL(NodePath()));
+ ClassDB::bind_method(D_METHOD("send_spawn", "peer_id", "scene_id", "data", "path"), &MultiplayerReplicator::send_spawn, DEFVAL(Variant()), DEFVAL(NodePath()));
+ ClassDB::bind_method(D_METHOD("send_sync", "peer_id", "scene_id", "data", "transfer_mode", "channel"), &MultiplayerReplicator::send_sync, DEFVAL(Multiplayer::TRANSFER_MODE_RELIABLE), DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("sync_all", "scene_id", "peer_id"), &MultiplayerReplicator::sync_all, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("track", "scene_id", "object"), &MultiplayerReplicator::track);
+ ClassDB::bind_method(D_METHOD("untrack", "scene_id", "object"), &MultiplayerReplicator::untrack);
+ ClassDB::bind_method(D_METHOD("encode_state", "scene_id", "object", "initial"), &MultiplayerReplicator::encode_state, DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("decode_state", "scene_id", "object", "data", "initial"), &MultiplayerReplicator::decode_state, DEFVAL(true));
+
+ ADD_SIGNAL(MethodInfo("despawned", PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
+ ADD_SIGNAL(MethodInfo("spawned", PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
+ ADD_SIGNAL(MethodInfo("despawn_requested", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "parent", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data")));
+ ADD_SIGNAL(MethodInfo("spawn_requested", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "parent", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data")));
+ ADD_SIGNAL(MethodInfo("replicated_instance_added", PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
+ ADD_SIGNAL(MethodInfo("replicated_instance_removed", PropertyInfo(Variant::INT, "scene_id"), PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
+
+ BIND_ENUM_CONSTANT(REPLICATION_MODE_NONE);
+ BIND_ENUM_CONSTANT(REPLICATION_MODE_SERVER);
+ BIND_ENUM_CONSTANT(REPLICATION_MODE_CUSTOM);
+}
diff --git a/core/multiplayer/multiplayer_replicator.h b/core/multiplayer/multiplayer_replicator.h
new file mode 100644
index 0000000000..7fa774fdf4
--- /dev/null
+++ b/core/multiplayer/multiplayer_replicator.h
@@ -0,0 +1,138 @@
+/*************************************************************************/
+/* multiplayer_replicator.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef MULTIPLAYER_REPLICATOR_H
+#define MULTIPLAYER_REPLICATOR_H
+
+#include "core/multiplayer/multiplayer_api.h"
+
+#include "core/io/resource_uid.h"
+#include "core/templates/hash_map.h"
+#include "core/variant/typed_array.h"
+
+class MultiplayerReplicator : public Object {
+ GDCLASS(MultiplayerReplicator, Object);
+
+public:
+ enum {
+ SPAWN_CMD_OFFSET = 9,
+ SYNC_CMD_OFFSET = 9,
+ };
+
+ enum ReplicationMode {
+ REPLICATION_MODE_NONE,
+ REPLICATION_MODE_SERVER,
+ REPLICATION_MODE_CUSTOM,
+ };
+
+ struct SceneConfig {
+ ReplicationMode mode;
+ uint64_t sync_interval = 0;
+ uint64_t sync_last = 0;
+ uint8_t sync_recv = 0;
+ List<StringName> properties;
+ List<StringName> sync_properties;
+ Callable on_spawn_despawn_send;
+ Callable on_spawn_despawn_receive;
+ Callable on_sync_send;
+ Callable on_sync_receive;
+ };
+
+protected:
+ static void _bind_methods();
+
+private:
+ enum {
+ BYTE_OR_ZERO_SHIFT = MultiplayerAPI::CMD_FLAG_0_SHIFT,
+ };
+
+ enum {
+ BYTE_OR_ZERO_FLAG = 1 << BYTE_OR_ZERO_SHIFT,
+ };
+
+ MultiplayerAPI *multiplayer = nullptr;
+ Vector<uint8_t> packet_cache;
+ Map<ResourceUID::ID, SceneConfig> replications;
+ Map<ObjectID, ResourceUID::ID> replicated_nodes;
+ HashMap<ResourceUID::ID, List<ObjectID>> tracked_objects;
+
+ // Encoding
+ Error _get_state(const List<StringName> &p_properties, const Object *p_obj, List<Variant> &r_variant);
+ Error _encode_state(const List<Variant> &p_variants, uint8_t *p_buffer, int &r_len, bool *r_raw = nullptr);
+ Error _decode_state(const List<StringName> &p_cfg, Object *p_obj, const uint8_t *p_buffer, int p_len, int &r_len, bool p_raw = false);
+
+ // Spawn
+ Error _spawn_despawn(ResourceUID::ID p_scene_id, Object *p_obj, int p_peer, bool p_spawn);
+ Error _send_spawn_despawn(int p_peer_id, const ResourceUID::ID &p_scene_id, const Variant &p_data, bool p_spawn);
+ void _process_default_spawn_despawn(int p_from, const ResourceUID::ID &p_scene_id, const uint8_t *p_packet, int p_packet_len, bool p_spawn);
+ Error _send_default_spawn_despawn(int p_peer_id, const ResourceUID::ID &p_scene_id, Object *p_obj, const NodePath &p_path, bool p_spawn);
+
+ // Sync
+ void _process_default_sync(const ResourceUID::ID &p_id, const uint8_t *p_packet, int p_packet_len);
+ Error _sync_all_default(const ResourceUID::ID &p_scene_id, int p_peer);
+ void _track(const ResourceUID::ID &p_scene_id, Object *p_object);
+ void _untrack(const ResourceUID::ID &p_scene_id, Object *p_object);
+
+public:
+ void clear();
+
+ // Encoding
+ PackedByteArray encode_state(const ResourceUID::ID &p_scene_id, const Object *p_node, bool p_initial);
+ Error decode_state(const ResourceUID::ID &p_scene_id, Object *p_node, PackedByteArray p_data, bool p_initial);
+
+ // Spawn
+ Error spawn_config(const ResourceUID::ID &p_id, ReplicationMode p_mode, const TypedArray<StringName> &p_props = TypedArray<StringName>(), const Callable &p_on_send = Callable(), const Callable &p_on_recv = Callable());
+ Error spawn(ResourceUID::ID p_scene_id, Object *p_obj, int p_peer = 0);
+ Error despawn(ResourceUID::ID p_scene_id, Object *p_obj, int p_peer = 0);
+ Error send_despawn(int p_peer_id, const ResourceUID::ID &p_scene_id, const Variant &p_data = Variant(), const NodePath &p_path = NodePath());
+ Error send_spawn(int p_peer_id, const ResourceUID::ID &p_scene_id, const Variant &p_data = Variant(), const NodePath &p_path = NodePath());
+
+ // Sync
+ Error sync_config(const ResourceUID::ID &p_id, uint64_t p_interval, const TypedArray<StringName> &p_props = TypedArray<StringName>(), const Callable &p_on_send = Callable(), const Callable &p_on_recv = Callable());
+ Error sync_all(const ResourceUID::ID &p_scene_id, int p_peer);
+ Error send_sync(int p_peer_id, const ResourceUID::ID &p_scene_id, PackedByteArray p_data, Multiplayer::TransferMode p_mode, int p_channel);
+ void track(const ResourceUID::ID &p_scene_id, Object *p_object);
+ void untrack(const ResourceUID::ID &p_scene_id, Object *p_object);
+
+ // Used by MultiplayerAPI
+ void spawn_all(int p_peer);
+ void process_spawn_despawn(int p_from, const uint8_t *p_packet, int p_packet_len, bool p_spawn);
+ void process_sync(int p_from, const uint8_t *p_packet, int p_packet_len);
+ void scene_enter_exit_notify(const String &p_scene, Node *p_node, bool p_enter);
+ void poll();
+
+ MultiplayerReplicator(MultiplayerAPI *p_multiplayer) {
+ multiplayer = p_multiplayer;
+ }
+};
+
+VARIANT_ENUM_CAST(MultiplayerReplicator::ReplicationMode);
+
+#endif // MULTIPLAYER_REPLICATOR_H
diff --git a/core/multiplayer/rpc_manager.cpp b/core/multiplayer/rpc_manager.cpp
new file mode 100644
index 0000000000..915571375e
--- /dev/null
+++ b/core/multiplayer/rpc_manager.cpp
@@ -0,0 +1,525 @@
+/*************************************************************************/
+/* rpc_manager.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "core/multiplayer/rpc_manager.h"
+
+#include "core/debugger/engine_debugger.h"
+#include "core/io/marshalls.h"
+#include "core/multiplayer/multiplayer_api.h"
+#include "scene/main/node.h"
+
+#ifdef DEBUG_ENABLED
+_FORCE_INLINE_ void RPCManager::_profile_node_data(const String &p_what, ObjectID p_id) {
+ if (EngineDebugger::is_profiling("multiplayer")) {
+ Array values;
+ values.push_back("node");
+ values.push_back(p_id);
+ values.push_back(p_what);
+ EngineDebugger::profiler_add_frame_data("multiplayer", values);
+ }
+}
+#else
+_FORCE_INLINE_ void RPCManager::_profile_node_data(const String &p_what, ObjectID p_id) {}
+#endif
+
+// Returns the packet size stripping the node path added when the node is not yet cached.
+int get_packet_len(uint32_t p_node_target, int p_packet_len) {
+ if (p_node_target & 0x80000000) {
+ int ofs = p_node_target & 0x7FFFFFFF;
+ return p_packet_len - (p_packet_len - ofs);
+ } else {
+ return p_packet_len;
+ }
+}
+
+const Multiplayer::RPCConfig _get_rpc_config(const Node *p_node, const StringName &p_method, uint16_t &r_id) {
+ const Vector<Multiplayer::RPCConfig> node_config = p_node->get_node_rpc_methods();
+ for (int i = 0; i < node_config.size(); i++) {
+ if (node_config[i].name == p_method) {
+ r_id = ((uint16_t)i) | (1 << 15);
+ return node_config[i];
+ }
+ }
+ if (p_node->get_script_instance()) {
+ const Vector<Multiplayer::RPCConfig> script_config = p_node->get_script_instance()->get_rpc_methods();
+ for (int i = 0; i < script_config.size(); i++) {
+ if (script_config[i].name == p_method) {
+ r_id = (uint16_t)i;
+ return script_config[i];
+ }
+ }
+ }
+ return Multiplayer::RPCConfig();
+}
+
+const Multiplayer::RPCConfig _get_rpc_config_by_id(Node *p_node, uint16_t p_id) {
+ Vector<Multiplayer::RPCConfig> config;
+ uint16_t id = p_id;
+ if (id & (1 << 15)) {
+ id = id & ~(1 << 15);
+ config = p_node->get_node_rpc_methods();
+ } else if (p_node->get_script_instance()) {
+ config = p_node->get_script_instance()->get_rpc_methods();
+ }
+ if (id < config.size()) {
+ return config[id];
+ }
+ return Multiplayer::RPCConfig();
+}
+
+_FORCE_INLINE_ bool _can_call_mode(Node *p_node, Multiplayer::RPCMode mode, int p_remote_id) {
+ switch (mode) {
+ case Multiplayer::RPC_MODE_DISABLED: {
+ return false;
+ } break;
+ case Multiplayer::RPC_MODE_ANY: {
+ return true;
+ } break;
+ case Multiplayer::RPC_MODE_AUTHORITY: {
+ return !p_node->is_multiplayer_authority() && p_remote_id == p_node->get_multiplayer_authority();
+ } break;
+ }
+
+ return false;
+}
+
+String RPCManager::get_rpc_md5(const Node *p_node) {
+ String rpc_list;
+ const Vector<Multiplayer::RPCConfig> node_config = p_node->get_node_rpc_methods();
+ for (int i = 0; i < node_config.size(); i++) {
+ rpc_list += String(node_config[i].name);
+ }
+ if (p_node->get_script_instance()) {
+ const Vector<Multiplayer::RPCConfig> script_config = p_node->get_script_instance()->get_rpc_methods();
+ for (int i = 0; i < script_config.size(); i++) {
+ rpc_list += String(script_config[i].name);
+ }
+ }
+ return rpc_list.md5_text();
+}
+
+Node *RPCManager::_process_get_node(int p_from, const uint8_t *p_packet, uint32_t p_node_target, int p_packet_len) {
+ Node *node = nullptr;
+
+ if (p_node_target & 0x80000000) {
+ // Use full path (not cached yet).
+ int ofs = p_node_target & 0x7FFFFFFF;
+
+ ERR_FAIL_COND_V_MSG(ofs >= p_packet_len, nullptr, "Invalid packet received. Size smaller than declared.");
+
+ String paths;
+ paths.parse_utf8((const char *)&p_packet[ofs], p_packet_len - ofs);
+
+ NodePath np = paths;
+
+ node = multiplayer->get_root_node()->get_node(np);
+
+ if (!node) {
+ ERR_PRINT("Failed to get path from RPC: " + String(np) + ".");
+ }
+ return node;
+ } else {
+ // Use cached path.
+ return multiplayer->get_cached_node(p_from, p_node_target);
+ }
+}
+
+void RPCManager::process_rpc(int p_from, const uint8_t *p_packet, int p_packet_len) {
+ // Extract packet meta
+ int packet_min_size = 1;
+ int name_id_offset = 1;
+ ERR_FAIL_COND_MSG(p_packet_len < packet_min_size, "Invalid packet received. Size too small.");
+ // Compute the meta size, which depends on the compression level.
+ int node_id_compression = (p_packet[0] & NODE_ID_COMPRESSION_FLAG) >> NODE_ID_COMPRESSION_SHIFT;
+ int name_id_compression = (p_packet[0] & NAME_ID_COMPRESSION_FLAG) >> NAME_ID_COMPRESSION_SHIFT;
+
+ switch (node_id_compression) {
+ case NETWORK_NODE_ID_COMPRESSION_8:
+ packet_min_size += 1;
+ name_id_offset += 1;
+ break;
+ case NETWORK_NODE_ID_COMPRESSION_16:
+ packet_min_size += 2;
+ name_id_offset += 2;
+ break;
+ case NETWORK_NODE_ID_COMPRESSION_32:
+ packet_min_size += 4;
+ name_id_offset += 4;
+ break;
+ default:
+ ERR_FAIL_MSG("Was not possible to extract the node id compression mode.");
+ }
+ switch (name_id_compression) {
+ case NETWORK_NAME_ID_COMPRESSION_8:
+ packet_min_size += 1;
+ break;
+ case NETWORK_NAME_ID_COMPRESSION_16:
+ packet_min_size += 2;
+ break;
+ default:
+ ERR_FAIL_MSG("Was not possible to extract the name id compression mode.");
+ }
+ ERR_FAIL_COND_MSG(p_packet_len < packet_min_size, "Invalid packet received. Size too small.");
+
+ uint32_t node_target = 0;
+ switch (node_id_compression) {
+ case NETWORK_NODE_ID_COMPRESSION_8:
+ node_target = p_packet[1];
+ break;
+ case NETWORK_NODE_ID_COMPRESSION_16:
+ node_target = decode_uint16(p_packet + 1);
+ break;
+ case NETWORK_NODE_ID_COMPRESSION_32:
+ node_target = decode_uint32(p_packet + 1);
+ break;
+ default:
+ // Unreachable, checked before.
+ CRASH_NOW();
+ }
+
+ Node *node = _process_get_node(p_from, p_packet, node_target, p_packet_len);
+ ERR_FAIL_COND_MSG(node == nullptr, "Invalid packet received. Requested node was not found.");
+
+ uint16_t name_id = 0;
+ switch (name_id_compression) {
+ case NETWORK_NAME_ID_COMPRESSION_8:
+ name_id = p_packet[name_id_offset];
+ break;
+ case NETWORK_NAME_ID_COMPRESSION_16:
+ name_id = decode_uint16(p_packet + name_id_offset);
+ break;
+ default:
+ // Unreachable, checked before.
+ CRASH_NOW();
+ }
+
+ const int packet_len = get_packet_len(node_target, p_packet_len);
+ _process_rpc(node, name_id, p_from, p_packet, packet_len, packet_min_size);
+}
+
+void RPCManager::_process_rpc(Node *p_node, const uint16_t p_rpc_method_id, int p_from, const uint8_t *p_packet, int p_packet_len, int p_offset) {
+ ERR_FAIL_COND_MSG(p_offset > p_packet_len, "Invalid packet received. Size too small.");
+
+ // Check that remote can call the RPC on this node.
+ const Multiplayer::RPCConfig config = _get_rpc_config_by_id(p_node, p_rpc_method_id);
+ ERR_FAIL_COND(config.name == StringName());
+
+ bool can_call = _can_call_mode(p_node, config.rpc_mode, p_from);
+ ERR_FAIL_COND_MSG(!can_call, "RPC '" + String(config.name) + "' is not allowed on node " + p_node->get_path() + " from: " + itos(p_from) + ". Mode is " + itos((int)config.rpc_mode) + ", authority is " + itos(p_node->get_multiplayer_authority()) + ".");
+
+ int argc = 0;
+ bool byte_only = false;
+
+ const bool byte_only_or_no_args = p_packet[0] & BYTE_ONLY_OR_NO_ARGS_FLAG;
+ if (byte_only_or_no_args) {
+ if (p_offset < p_packet_len) {
+ // This packet contains only bytes.
+ argc = 1;
+ byte_only = true;
+ } else {
+ // This rpc calls a method without parameters.
+ }
+ } else {
+ // Normal variant, takes the argument count from the packet.
+ ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small.");
+ argc = p_packet[p_offset];
+ p_offset += 1;
+ }
+
+ Vector<Variant> args;
+ Vector<const Variant *> argp;
+ args.resize(argc);
+ argp.resize(argc);
+
+#ifdef DEBUG_ENABLED
+ _profile_node_data("in_rpc", p_node->get_instance_id());
+#endif
+
+ if (byte_only) {
+ Vector<uint8_t> pure_data;
+ const int len = p_packet_len - p_offset;
+ pure_data.resize(len);
+ memcpy(pure_data.ptrw(), &p_packet[p_offset], len);
+ args.write[0] = pure_data;
+ argp.write[0] = &args[0];
+ p_offset += len;
+ } else {
+ for (int i = 0; i < argc; i++) {
+ ERR_FAIL_COND_MSG(p_offset >= p_packet_len, "Invalid packet received. Size too small.");
+
+ int vlen;
+ Error err = multiplayer->decode_and_decompress_variant(args.write[i], &p_packet[p_offset], p_packet_len - p_offset, &vlen);
+ ERR_FAIL_COND_MSG(err != OK, "Invalid packet received. Unable to decode RPC argument.");
+
+ argp.write[i] = &args[i];
+ p_offset += vlen;
+ }
+ }
+
+ Callable::CallError ce;
+
+ p_node->call(config.name, (const Variant **)argp.ptr(), argc, ce);
+ if (ce.error != Callable::CallError::CALL_OK) {
+ String error = Variant::get_call_error_text(p_node, config.name, (const Variant **)argp.ptr(), argc, ce);
+ error = "RPC - " + error;
+ ERR_PRINT(error);
+ }
+}
+
+void RPCManager::_send_rpc(Node *p_from, int p_to, uint16_t p_rpc_id, const Multiplayer::RPCConfig &p_config, const StringName &p_name, const Variant **p_arg, int p_argcount) {
+ Ref<MultiplayerPeer> peer = multiplayer->get_multiplayer_peer();
+ ERR_FAIL_COND_MSG(peer.is_null(), "Attempt to call RPC without active multiplayer peer.");
+
+ ERR_FAIL_COND_MSG(peer->get_connection_status() == MultiplayerPeer::CONNECTION_CONNECTING, "Attempt to call RPC while multiplayer peer is not connected yet.");
+
+ ERR_FAIL_COND_MSG(peer->get_connection_status() == MultiplayerPeer::CONNECTION_DISCONNECTED, "Attempt to call RPC while multiplayer peer is disconnected.");
+
+ ERR_FAIL_COND_MSG(p_argcount > 255, "Too many arguments (>255).");
+
+ if (p_to != 0 && !multiplayer->get_connected_peers().has(ABS(p_to))) {
+ ERR_FAIL_COND_MSG(p_to == peer->get_unique_id(), "Attempt to call RPC on yourself! Peer unique ID: " + itos(peer->get_unique_id()) + ".");
+
+ ERR_FAIL_MSG("Attempt to call RPC with unknown peer ID: " + itos(p_to) + ".");
+ }
+
+ NodePath from_path = (multiplayer->get_root_node()->get_path()).rel_path_to(p_from->get_path());
+ ERR_FAIL_COND_MSG(from_path.is_empty(), "Unable to send RPC. Relative path is empty. THIS IS LIKELY A BUG IN THE ENGINE!");
+
+ // See if all peers have cached path (if so, call can be fast).
+ int psc_id;
+ const bool has_all_peers = multiplayer->send_confirm_path(p_from, from_path, p_to, psc_id);
+
+ // Create base packet, lots of hardcode because it must be tight.
+
+ int ofs = 0;
+
+#define MAKE_ROOM(m_amount) \
+ if (packet_cache.size() < m_amount) \
+ packet_cache.resize(m_amount);
+
+ // Encode meta.
+ uint8_t command_type = MultiplayerAPI::NETWORK_COMMAND_REMOTE_CALL;
+ uint8_t node_id_compression = UINT8_MAX;
+ uint8_t name_id_compression = UINT8_MAX;
+ bool byte_only_or_no_args = false;
+
+ MAKE_ROOM(1);
+ // The meta is composed along the way, so just set 0 for now.
+ packet_cache.write[0] = 0;
+ ofs += 1;
+
+ // Encode Node ID.
+ if (has_all_peers) {
+ // Compress the node ID only if all the target peers already know it.
+ if (psc_id >= 0 && psc_id <= 255) {
+ // We can encode the id in 1 byte
+ node_id_compression = NETWORK_NODE_ID_COMPRESSION_8;
+ MAKE_ROOM(ofs + 1);
+ packet_cache.write[ofs] = static_cast<uint8_t>(psc_id);
+ ofs += 1;
+ } else if (psc_id >= 0 && psc_id <= 65535) {
+ // We can encode the id in 2 bytes
+ node_id_compression = NETWORK_NODE_ID_COMPRESSION_16;
+ MAKE_ROOM(ofs + 2);
+ encode_uint16(static_cast<uint16_t>(psc_id), &(packet_cache.write[ofs]));
+ ofs += 2;
+ } else {
+ // Too big, let's use 4 bytes.
+ node_id_compression = NETWORK_NODE_ID_COMPRESSION_32;
+ MAKE_ROOM(ofs + 4);
+ encode_uint32(psc_id, &(packet_cache.write[ofs]));
+ ofs += 4;
+ }
+ } else {
+ // The targets don't know the node yet, so we need to use 32 bits int.
+ node_id_compression = NETWORK_NODE_ID_COMPRESSION_32;
+ MAKE_ROOM(ofs + 4);
+ encode_uint32(psc_id, &(packet_cache.write[ofs]));
+ ofs += 4;
+ }
+
+ // Encode method ID
+ if (p_rpc_id <= UINT8_MAX) {
+ // The ID fits in 1 byte
+ name_id_compression = NETWORK_NAME_ID_COMPRESSION_8;
+ MAKE_ROOM(ofs + 1);
+ packet_cache.write[ofs] = static_cast<uint8_t>(p_rpc_id);
+ ofs += 1;
+ } else {
+ // The ID is larger, let's use 2 bytes
+ name_id_compression = NETWORK_NAME_ID_COMPRESSION_16;
+ MAKE_ROOM(ofs + 2);
+ encode_uint16(p_rpc_id, &(packet_cache.write[ofs]));
+ ofs += 2;
+ }
+
+ if (p_argcount == 0) {
+ byte_only_or_no_args = true;
+ } else if (p_argcount == 1 && p_arg[0]->get_type() == Variant::PACKED_BYTE_ARRAY) {
+ byte_only_or_no_args = true;
+ // Special optimization when only the byte vector is sent.
+ const Vector<uint8_t> data = *p_arg[0];
+ MAKE_ROOM(ofs + data.size());
+ memcpy(&(packet_cache.write[ofs]), data.ptr(), sizeof(uint8_t) * data.size());
+ ofs += data.size();
+ } else {
+ // Arguments
+ MAKE_ROOM(ofs + 1);
+ packet_cache.write[ofs] = p_argcount;
+ ofs += 1;
+ for (int i = 0; i < p_argcount; i++) {
+ int len(0);
+ Error err = multiplayer->encode_and_compress_variant(*p_arg[i], nullptr, len);
+ ERR_FAIL_COND_MSG(err != OK, "Unable to encode RPC argument. THIS IS LIKELY A BUG IN THE ENGINE!");
+ MAKE_ROOM(ofs + len);
+ multiplayer->encode_and_compress_variant(*p_arg[i], &(packet_cache.write[ofs]), len);
+ ofs += len;
+ }
+ }
+
+ ERR_FAIL_COND(command_type > 7);
+ ERR_FAIL_COND(node_id_compression > 3);
+ ERR_FAIL_COND(name_id_compression > 1);
+
+ // We can now set the meta
+ packet_cache.write[0] = command_type + (node_id_compression << NODE_ID_COMPRESSION_SHIFT) + (name_id_compression << NAME_ID_COMPRESSION_SHIFT) + (byte_only_or_no_args ? BYTE_ONLY_OR_NO_ARGS_FLAG : 0);
+
+#ifdef DEBUG_ENABLED
+ multiplayer->profile_bandwidth("out", ofs);
+#endif
+
+ // Take chance and set transfer mode, since all send methods will use it.
+ peer->set_transfer_channel(p_config.channel);
+ peer->set_transfer_mode(p_config.transfer_mode);
+
+ if (has_all_peers) {
+ // They all have verified paths, so send fast.
+ peer->set_target_peer(p_to); // To all of you.
+ peer->put_packet(packet_cache.ptr(), ofs); // A message with love.
+ } else {
+ // Unreachable because the node ID is never compressed if the peers doesn't know it.
+ CRASH_COND(node_id_compression != NETWORK_NODE_ID_COMPRESSION_32);
+
+ // Not all verified path, so send one by one.
+
+ // Append path at the end, since we will need it for some packets.
+ CharString pname = String(from_path).utf8();
+ int path_len = encode_cstring(pname.get_data(), nullptr);
+ MAKE_ROOM(ofs + path_len);
+ encode_cstring(pname.get_data(), &(packet_cache.write[ofs]));
+
+ for (const int &P : multiplayer->get_connected_peers()) {
+ if (p_to < 0 && P == -p_to) {
+ continue; // Continue, excluded.
+ }
+
+ if (p_to > 0 && P != p_to) {
+ continue; // Continue, not for this peer.
+ }
+
+ bool confirmed = multiplayer->is_cache_confirmed(from_path, P);
+
+ peer->set_target_peer(P); // To this one specifically.
+
+ if (confirmed) {
+ // This one confirmed path, so use id.
+ encode_uint32(psc_id, &(packet_cache.write[1]));
+ peer->put_packet(packet_cache.ptr(), ofs);
+ } else {
+ // This one did not confirm path yet, so use entire path (sorry!).
+ encode_uint32(0x80000000 | ofs, &(packet_cache.write[1])); // Offset to path and flag.
+ peer->put_packet(packet_cache.ptr(), ofs + path_len);
+ }
+ }
+ }
+}
+
+void RPCManager::rpcp(Node *p_node, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) {
+ Ref<MultiplayerPeer> peer = multiplayer->get_multiplayer_peer();
+ ERR_FAIL_COND_MSG(!peer.is_valid(), "Trying to call an RPC while no multiplayer peer is active.");
+ ERR_FAIL_COND_MSG(!p_node->is_inside_tree(), "Trying to call an RPC on a node which is not inside SceneTree.");
+ ERR_FAIL_COND_MSG(peer->get_connection_status() != MultiplayerPeer::CONNECTION_CONNECTED, "Trying to call an RPC via a multiplayer peer which is not connected.");
+
+ int node_id = peer->get_unique_id();
+ bool call_local_native = false;
+ bool call_local_script = false;
+ uint16_t rpc_id = UINT16_MAX;
+ const Multiplayer::RPCConfig config = _get_rpc_config(p_node, p_method, rpc_id);
+ ERR_FAIL_COND_MSG(config.name == StringName(),
+ vformat("Unable to get the RPC configuration for the function \"%s\" at path: \"%s\". This happens when the method is not marked for RPCs.", p_method, p_node->get_path()));
+ if (p_peer_id == 0 || p_peer_id == node_id || (p_peer_id < 0 && p_peer_id != -node_id)) {
+ if (rpc_id & (1 << 15)) {
+ call_local_native = config.sync;
+ } else {
+ call_local_script = config.sync;
+ }
+ }
+
+ if (p_peer_id != node_id) {
+#ifdef DEBUG_ENABLED
+ _profile_node_data("out_rpc", p_node->get_instance_id());
+#endif
+
+ _send_rpc(p_node, p_peer_id, rpc_id, config, p_method, p_arg, p_argcount);
+ }
+
+ if (call_local_native) {
+ Callable::CallError ce;
+
+ multiplayer->set_remote_sender_override(peer->get_unique_id());
+ p_node->call(p_method, p_arg, p_argcount, ce);
+ multiplayer->set_remote_sender_override(0);
+
+ if (ce.error != Callable::CallError::CALL_OK) {
+ String error = Variant::get_call_error_text(p_node, p_method, p_arg, p_argcount, ce);
+ error = "rpc() aborted in local call: - " + error + ".";
+ ERR_PRINT(error);
+ return;
+ }
+ }
+
+ if (call_local_script) {
+ Callable::CallError ce;
+ ce.error = Callable::CallError::CALL_OK;
+
+ multiplayer->set_remote_sender_override(peer->get_unique_id());
+ p_node->get_script_instance()->call(p_method, p_arg, p_argcount, ce);
+ multiplayer->set_remote_sender_override(0);
+
+ if (ce.error != Callable::CallError::CALL_OK) {
+ String error = Variant::get_call_error_text(p_node, p_method, p_arg, p_argcount, ce);
+ error = "rpc() aborted in script local call: - " + error + ".";
+ ERR_PRINT(error);
+ return;
+ }
+ }
+
+ ERR_FAIL_COND_MSG(p_peer_id == node_id && !config.sync, "RPC '" + p_method + "' on yourself is not allowed by selected mode.");
+}
diff --git a/core/multiplayer/rpc_manager.h b/core/multiplayer/rpc_manager.h
new file mode 100644
index 0000000000..7b99dee226
--- /dev/null
+++ b/core/multiplayer/rpc_manager.h
@@ -0,0 +1,89 @@
+/*************************************************************************/
+/* rpc_manager.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef MULTIPLAYER_RPC_H
+#define MULTIPLAYER_RPC_H
+
+#include "core/multiplayer/multiplayer.h"
+#include "core/multiplayer/multiplayer_api.h"
+#include "core/object/ref_counted.h"
+
+class RPCManager : public RefCounted {
+ GDCLASS(RPCManager, RefCounted);
+
+private:
+ enum NetworkNodeIdCompression {
+ NETWORK_NODE_ID_COMPRESSION_8 = 0,
+ NETWORK_NODE_ID_COMPRESSION_16,
+ NETWORK_NODE_ID_COMPRESSION_32,
+ };
+
+ enum NetworkNameIdCompression {
+ NETWORK_NAME_ID_COMPRESSION_8 = 0,
+ NETWORK_NAME_ID_COMPRESSION_16,
+ };
+
+ // The RPC meta is composed by a single byte that contains (starting from the least significant bit):
+ // - `NetworkCommands` in the first four bits.
+ // - `NetworkNodeIdCompression` in the next 2 bits.
+ // - `NetworkNameIdCompression` in the next 1 bit.
+ // - `byte_only_or_no_args` in the next 1 bit.
+ enum {
+ NODE_ID_COMPRESSION_SHIFT = MultiplayerAPI::CMD_FLAG_0_SHIFT, // 2 bits for this.
+ NAME_ID_COMPRESSION_SHIFT = MultiplayerAPI::CMD_FLAG_2_SHIFT,
+ BYTE_ONLY_OR_NO_ARGS_SHIFT = MultiplayerAPI::CMD_FLAG_3_SHIFT,
+ };
+
+ enum {
+ NODE_ID_COMPRESSION_FLAG = (1 << NODE_ID_COMPRESSION_SHIFT) | (1 << (NODE_ID_COMPRESSION_SHIFT + 1)), // 2 bits for this.
+ NAME_ID_COMPRESSION_FLAG = (1 << NAME_ID_COMPRESSION_SHIFT),
+ BYTE_ONLY_OR_NO_ARGS_FLAG = (1 << BYTE_ONLY_OR_NO_ARGS_SHIFT),
+ };
+
+ MultiplayerAPI *multiplayer = nullptr;
+ Vector<uint8_t> packet_cache;
+
+protected:
+ _FORCE_INLINE_ void _profile_node_data(const String &p_what, ObjectID p_id);
+ void _process_rpc(Node *p_node, const uint16_t p_rpc_method_id, int p_from, const uint8_t *p_packet, int p_packet_len, int p_offset);
+
+ void _send_rpc(Node *p_from, int p_to, uint16_t p_rpc_id, const Multiplayer::RPCConfig &p_config, const StringName &p_name, const Variant **p_arg, int p_argcount);
+ Node *_process_get_node(int p_from, const uint8_t *p_packet, uint32_t p_node_target, int p_packet_len);
+
+public:
+ // Called by Node.rpc
+ void rpcp(Node *p_node, int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount);
+ void process_rpc(int p_from, const uint8_t *p_packet, int p_packet_len);
+
+ String get_rpc_md5(const Node *p_node);
+ RPCManager(MultiplayerAPI *p_multiplayer) { multiplayer = p_multiplayer; }
+};
+
+#endif // MULTIPLAYER_RPC_H
diff --git a/core/object/class_db.cpp b/core/object/class_db.cpp
index c58fe7bc24..8ba46e49eb 100644
--- a/core/object/class_db.cpp
+++ b/core/object/class_db.cpp
@@ -545,6 +545,15 @@ Object *ClassDB::instantiate(const StringName &p_class) {
return ti->creation_func();
}
+Object *ClassDB::construct_object(Object *(*p_create_func)(), ObjectNativeExtension *p_extension) {
+ if (p_extension) {
+ initializing_with_extension = true;
+ initializing_extension = p_extension;
+ initializing_extension_instance = p_extension->create_instance(p_extension->class_userdata);
+ }
+ return p_create_func();
+}
+
bool ClassDB::can_instantiate(const StringName &p_class) {
OBJTYPE_RLOCK;
@@ -892,6 +901,32 @@ void ClassDB::get_enum_constants(const StringName &p_class, const StringName &p_
}
}
+void ClassDB::set_method_error_return_values(const StringName &p_class, const StringName &p_method, const Vector<Error> &p_values) {
+ OBJTYPE_RLOCK;
+#ifdef DEBUG_METHODS_ENABLED
+ ClassInfo *type = classes.getptr(p_class);
+
+ ERR_FAIL_COND(!type);
+
+ type->method_error_values[p_method] = p_values;
+#endif
+}
+
+Vector<Error> ClassDB::get_method_error_return_values(const StringName &p_class, const StringName &p_method) {
+#ifdef DEBUG_METHODS_ENABLED
+ ClassInfo *type = classes.getptr(p_class);
+
+ ERR_FAIL_COND_V(!type, Vector<Error>());
+
+ if (!type->method_error_values.has(p_method)) {
+ return Vector<Error>();
+ }
+ return type->method_error_values[p_method];
+#else
+ return Vector<Error>();
+#endif
+}
+
bool ClassDB::has_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance) {
OBJTYPE_RLOCK;
@@ -1002,6 +1037,18 @@ void ClassDB::add_property_subgroup(const StringName &p_class, const String &p_n
type->property_list.push_back(PropertyInfo(Variant::NIL, p_name, PROPERTY_HINT_NONE, p_prefix, PROPERTY_USAGE_SUBGROUP));
}
+void ClassDB::add_property_array_count(const StringName &p_class, const String &p_label, const StringName &p_count_property, const StringName &p_count_setter, const StringName &p_count_getter, const String &p_array_element_prefix, uint32_t p_count_usage) {
+ add_property(p_class, PropertyInfo(Variant::INT, p_count_property, PROPERTY_HINT_NONE, "", p_count_usage | PROPERTY_USAGE_ARRAY, vformat("%s,%s", p_label, p_array_element_prefix)), p_count_setter, p_count_getter);
+}
+
+void ClassDB::add_property_array(const StringName &p_class, const StringName &p_path, const String &p_array_element_prefix) {
+ OBJTYPE_WLOCK;
+ ClassInfo *type = classes.getptr(p_class);
+ ERR_FAIL_COND(!type);
+
+ type->property_list.push_back(PropertyInfo(Variant::NIL, p_path, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ARRAY, p_array_element_prefix));
+}
+
// NOTE: For implementation simplicity reasons, this method doesn't allow setters to have optional arguments at the end.
void ClassDB::add_property(const StringName &p_class, const PropertyInfo &p_pinfo, const StringName &p_setter, const StringName &p_getter, int p_index) {
lock.read_lock();
@@ -1068,6 +1115,20 @@ void ClassDB::set_property_default_value(const StringName &p_class, const String
default_values[p_class][p_name] = p_default;
}
+void ClassDB::add_linked_property(const StringName &p_class, const String &p_property, const String &p_linked_property) {
+#ifdef TOOLS_ENABLED
+ OBJTYPE_WLOCK;
+ ClassInfo *type = classes.getptr(p_class);
+ ERR_FAIL_COND(!type);
+
+ ERR_FAIL_COND(!type->property_map.has(p_property));
+ ERR_FAIL_COND(!type->property_map.has(p_linked_property));
+
+ PropertyInfo &pinfo = type->property_map[p_property];
+ pinfo.linked_properties.push_back(p_linked_property);
+#endif
+}
+
void ClassDB::get_property_list(const StringName &p_class, List<PropertyInfo> *p_list, bool p_no_inheritance, const Object *p_validator) {
OBJTYPE_RLOCK;
@@ -1407,7 +1468,7 @@ MethodBind *ClassDB::bind_methodfi(uint32_t p_flags, MethodBind *p_bind, const c
return p_bind;
}
-void ClassDB::add_virtual_method(const StringName &p_class, const MethodInfo &p_method, bool p_virtual) {
+void ClassDB::add_virtual_method(const StringName &p_class, const MethodInfo &p_method, bool p_virtual, const Vector<String> &p_arg_names, bool p_object_core) {
ERR_FAIL_COND_MSG(!classes.has(p_class), "Request for nonexistent class '" + p_class + "'.");
OBJTYPE_WLOCK;
@@ -1417,6 +1478,19 @@ void ClassDB::add_virtual_method(const StringName &p_class, const MethodInfo &p_
if (p_virtual) {
mi.flags |= METHOD_FLAG_VIRTUAL;
}
+ if (p_object_core) {
+ mi.flags |= METHOD_FLAG_OBJECT_CORE;
+ }
+ if (p_arg_names.size()) {
+ if (p_arg_names.size() != mi.arguments.size()) {
+ WARN_PRINT("Mismatch argument name count for virtual function: " + String(p_class) + "::" + p_method.name);
+ } else {
+ for (int i = 0; i < p_arg_names.size(); i++) {
+ mi.arguments[i].name = p_arg_names[i];
+ }
+ }
+ }
+
classes[p_class].virtual_methods.push_back(mi);
classes[p_class].virtual_methods_map[p_method.name] = mi;
diff --git a/core/object/class_db.h b/core/object/class_db.h
index bfc9d6f283..3a1cbf8559 100644
--- a/core/object/class_db.h
+++ b/core/object/class_db.h
@@ -132,6 +132,7 @@ public:
List<MethodInfo> virtual_methods;
Map<StringName, MethodInfo> virtual_methods_map;
StringName category;
+ Map<StringName, Vector<Error>> method_error_values;
#endif
HashMap<StringName, PropertySetGet> property_setget;
@@ -233,6 +234,7 @@ public:
static bool is_parent_class(const StringName &p_class, const StringName &p_inherits);
static bool can_instantiate(const StringName &p_class);
static Object *instantiate(const StringName &p_class);
+ static Object *construct_object(Object *(*p_create_func)(), ObjectNativeExtension *p_extension);
static void instance_get_native_extension_data(ObjectNativeExtension **r_extension, GDExtensionClassInstancePtr *r_extension_instance, Object *p_base);
static APIType get_api_type(const StringName &p_class);
@@ -330,7 +332,7 @@ public:
if (type->method_map.has(p_name)) {
memdelete(bind);
- // overloading not supported
+ // Overloading not supported
ERR_FAIL_V_MSG(nullptr, "Method already bound: " + instance_type + "::" + p_name + ".");
}
type->method_map[p_name] = bind;
@@ -352,8 +354,11 @@ public:
static void add_property_group(const StringName &p_class, const String &p_name, const String &p_prefix = "");
static void add_property_subgroup(const StringName &p_class, const String &p_name, const String &p_prefix = "");
+ static void add_property_array_count(const StringName &p_class, const String &p_label, const StringName &p_count_property, const StringName &p_count_setter, const StringName &p_count_getter, const String &p_array_element_prefix, uint32_t p_count_usage = PROPERTY_USAGE_EDITOR);
+ static void add_property_array(const StringName &p_class, const StringName &p_path, const String &p_array_element_prefix);
static void add_property(const StringName &p_class, const PropertyInfo &p_pinfo, const StringName &p_setter, const StringName &p_getter, int p_index = -1);
static void set_property_default_value(const StringName &p_class, const StringName &p_name, const Variant &p_default);
+ static void add_linked_property(const StringName &p_class, const String &p_property, const String &p_linked_property);
static void get_property_list(const StringName &p_class, List<PropertyInfo> *p_list, bool p_no_inheritance = false, const Object *p_validator = nullptr);
static bool get_property_info(const StringName &p_class, const StringName &p_property, PropertyInfo *r_info, bool p_no_inheritance = false, const Object *p_validator = nullptr);
static bool set_property(Object *p_object, const StringName &p_property, const Variant &p_value, bool *r_valid = nullptr);
@@ -371,7 +376,7 @@ public:
static bool get_method_info(const StringName &p_class, const StringName &p_method, MethodInfo *r_info, bool p_no_inheritance = false, bool p_exclude_from_properties = false);
static MethodBind *get_method(const StringName &p_class, const StringName &p_name);
- static void add_virtual_method(const StringName &p_class, const MethodInfo &p_method, bool p_virtual = true);
+ static void add_virtual_method(const StringName &p_class, const MethodInfo &p_method, bool p_virtual = true, const Vector<String> &p_arg_names = Vector<String>(), bool p_object_core = false);
static void get_virtual_methods(const StringName &p_class, List<MethodInfo> *p_methods, bool p_no_inheritance = false);
static void bind_integer_constant(const StringName &p_class, const StringName &p_enum, const StringName &p_name, int p_constant);
@@ -384,6 +389,8 @@ public:
static void get_enum_constants(const StringName &p_class, const StringName &p_enum, List<StringName> *p_constants, bool p_no_inheritance = false);
static bool has_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance = false);
+ static void set_method_error_return_values(const StringName &p_class, const StringName &p_method, const Vector<Error> &p_values);
+ static Vector<Error> get_method_error_return_values(const StringName &p_class, const StringName &p_method);
static Variant class_get_default_property_value(const StringName &p_class, const StringName &p_property, bool *r_valid = nullptr);
static StringName get_category(const StringName &p_node);
@@ -409,39 +416,53 @@ public:
#ifdef DEBUG_METHODS_ENABLED
#define BIND_CONSTANT(m_constant) \
- ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant);
+ ::ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant);
#define BIND_ENUM_CONSTANT(m_constant) \
- ClassDB::bind_integer_constant(get_class_static(), __constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant);
+ ::ClassDB::bind_integer_constant(get_class_static(), __constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant);
-#else
-
-#define BIND_CONSTANT(m_constant) \
- ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant);
+_FORCE_INLINE_ void errarray_add_str(Vector<Error> &arr) {
+}
-#define BIND_ENUM_CONSTANT(m_constant) \
- ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant);
+_FORCE_INLINE_ void errarray_add_str(Vector<Error> &arr, const Error &p_err) {
+ arr.push_back(p_err);
+}
-#endif
+template <class... P>
+_FORCE_INLINE_ void errarray_add_str(Vector<Error> &arr, const Error &p_err, P... p_args) {
+ arr.push_back(p_err);
+ errarray_add_str(arr, p_args...);
+}
-#ifdef TOOLS_ENABLED
+template <class... P>
+_FORCE_INLINE_ Vector<Error> errarray(P... p_args) {
+ Vector<Error> arr;
+ errarray_add_str(arr, p_args...);
+ return arr;
+}
-#define BIND_VMETHOD(m_method) \
- ClassDB::add_virtual_method(get_class_static(), m_method);
+#define BIND_METHOD_ERR_RETURN_DOC(m_method, ...) \
+ ::ClassDB::set_method_error_return_values(get_class_static(), m_method, errarray(__VA_ARGS__));
#else
-#define BIND_VMETHOD(m_method)
+#define BIND_CONSTANT(m_constant) \
+ ::ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant);
+
+#define BIND_ENUM_CONSTANT(m_constant) \
+ ::ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant);
+
+#define BIND_METHOD_ERR_RETURN_DOC(m_method, ...)
#endif
#define GDREGISTER_CLASS(m_class) \
if (!GD_IS_DEFINED(ClassDB_Disable_##m_class)) { \
- ClassDB::register_class<m_class>(); \
+ ::ClassDB::register_class<m_class>(); \
}
-#define GDREGISTER_VIRTUAL_CLASS(m_class) \
- if (!GD_IS_DEFINED(ClassDB_Disable_##m_class)) { \
- ClassDB::register_virtual_class<m_class>(); \
+#define GDREGISTER_VIRTUAL_CLASS(m_class) \
+ if (!GD_IS_DEFINED(ClassDB_Disable_##m_class)) { \
+ ::ClassDB::register_virtual_class<m_class>(); \
}
#include "core/disabled_classes.gen.h"
diff --git a/core/object/make_virtuals.py b/core/object/make_virtuals.py
index 2c6b8cddc9..86c2891e5d 100644
--- a/core/object/make_virtuals.py
+++ b/core/object/make_virtuals.py
@@ -1,8 +1,8 @@
proto = """
#define GDVIRTUAL$VER($RET m_name $ARG) \\
-GDNativeExtensionClassCallVirtual _gdvirtual_##m_name = (_get_extension() && _get_extension()->get_virtual) ? _get_extension()->get_virtual(_get_extension()->class_userdata, #m_name) : (GDNativeExtensionClassCallVirtual) nullptr;\\
StringName _gdvirtual_##m_name##_sn = #m_name;\\
-bool _gdvirtual_##m_name##_call($CALLARGS) $CONST { \\
+GDNativeExtensionClassCallVirtual _gdvirtual_##m_name = (_get_extension() && _get_extension()->get_virtual) ? _get_extension()->get_virtual(_get_extension()->class_userdata, #m_name) : (GDNativeExtensionClassCallVirtual) nullptr;\\
+_FORCE_INLINE_ bool _gdvirtual_##m_name##_call($CALLARGS) $CONST { \\
ScriptInstance *script_instance = ((Object*)(this))->get_script_instance();\\
if (script_instance) {\\
Callable::CallError ce; \\
@@ -23,6 +23,16 @@ bool _gdvirtual_##m_name##_call($CALLARGS) $CONST { \\
\\
return false;\\
}\\
+_FORCE_INLINE_ bool _gdvirtual_##m_name##_overridden() const { \\
+ ScriptInstance *script_instance = ((Object*)(this))->get_script_instance();\\
+ if (script_instance) {\\
+ return script_instance->has_method(_gdvirtual_##m_name##_sn);\\
+ }\\
+ if (_gdvirtual_##m_name) {\\
+ return true;\\
+ }\\
+ return false;\\
+}\\
\\
_FORCE_INLINE_ static MethodInfo _gdvirtual_##m_name##_get_method_info() { \\
MethodInfo method_info;\\
@@ -32,7 +42,6 @@ _FORCE_INLINE_ static MethodInfo _gdvirtual_##m_name##_get_method_info() { \\
return method_info;\\
}
-
"""
@@ -77,7 +86,7 @@ def generate_version(argcount, const=False, returns=False):
callptrargs += "\t\t"
callptrargsptr += ", "
argtext += "m_type" + str(i + 1)
- callargtext += "const m_type" + str(i + 1) + "& arg" + str(i + 1)
+ callargtext += "m_type" + str(i + 1) + " arg" + str(i + 1)
callsiargs += "Variant(arg" + str(i + 1) + ")"
callsiargptrs += "&vargs[" + str(i) + "]"
callptrargs += (
@@ -103,7 +112,7 @@ def generate_version(argcount, const=False, returns=False):
if returns:
if argcount > 0:
callargtext += ","
- callargtext += " m_ret& r_ret"
+ callargtext += " m_ret& r_ret"
s = s.replace("$CALLSIBEGIN", "Variant ret = ")
s = s.replace("$CALLSIRET", "r_ret = ret;")
s = s.replace("$CALLPTRRETPASS", "&ret")
diff --git a/core/object/method_bind.h b/core/object/method_bind.h
index 92b964772a..b0b379873e 100644
--- a/core/object/method_bind.h
+++ b/core/object/method_bind.h
@@ -43,6 +43,7 @@ enum MethodFlags {
METHOD_FLAG_FROM_SCRIPT = 64,
METHOD_FLAG_VARARG = 128,
METHOD_FLAG_STATIC = 256,
+ METHOD_FLAG_OBJECT_CORE = 512,
METHOD_FLAGS_DEFAULT = METHOD_FLAG_NORMAL,
};
diff --git a/core/object/object.cpp b/core/object/object.cpp
index 2bb4b981b9..3335942fb3 100644
--- a/core/object/object.cpp
+++ b/core/object/object.cpp
@@ -1619,22 +1619,25 @@ void Object::_bind_methods() {
ADD_SIGNAL(MethodInfo("script_changed"));
ADD_SIGNAL(MethodInfo("property_list_changed"));
- BIND_VMETHOD(MethodInfo("_notification", PropertyInfo(Variant::INT, "what")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_set", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value")));
+#define BIND_OBJ_CORE_METHOD(m_method) \
+ ::ClassDB::add_virtual_method(get_class_static(), m_method, true, Vector<String>(), true);
+
+ BIND_OBJ_CORE_METHOD(MethodInfo("_notification", PropertyInfo(Variant::INT, "what")));
+ BIND_OBJ_CORE_METHOD(MethodInfo(Variant::BOOL, "_set", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value")));
#ifdef TOOLS_ENABLED
MethodInfo miget("_get", PropertyInfo(Variant::STRING_NAME, "property"));
miget.return_val.name = "Variant";
miget.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
- BIND_VMETHOD(miget);
+ BIND_OBJ_CORE_METHOD(miget);
MethodInfo plget("_get_property_list");
plget.return_val.type = Variant::ARRAY;
- BIND_VMETHOD(plget);
+ BIND_OBJ_CORE_METHOD(plget);
#endif
- BIND_VMETHOD(MethodInfo("_init"));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_to_string"));
+ BIND_OBJ_CORE_METHOD(MethodInfo("_init"));
+ BIND_OBJ_CORE_METHOD(MethodInfo(Variant::STRING, "_to_string"));
BIND_CONSTANT(NOTIFICATION_POSTINITIALIZE);
BIND_CONSTANT(NOTIFICATION_PREDELETE);
diff --git a/core/object/object.h b/core/object/object.h
index 6523105820..a44d921bff 100644
--- a/core/object/object.h
+++ b/core/object/object.h
@@ -97,6 +97,7 @@ enum PropertyHint {
PROPERTY_HINT_SAVE_FILE, ///< a file path must be passed, hint_text (optionally) is a filter "*.png,*.wav,*.doc,". This opens a save dialog
PROPERTY_HINT_INT_IS_OBJECTID,
PROPERTY_HINT_ARRAY_TYPE,
+ PROPERTY_HINT_INT_IS_POINTER,
PROPERTY_HINT_MAX,
// When updating PropertyHint, also sync the hardcoded list in VisualScriptEditorVariableEdit
};
@@ -131,27 +132,38 @@ enum PropertyUsageFlags {
PROPERTY_USAGE_DEFERRED_SET_RESOURCE = 1 << 26, // when loading, the resource for this property can be set at the end of loading
PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT = 1 << 27, // For Object properties, instantiate them when creating in editor.
PROPERTY_USAGE_EDITOR_BASIC_SETTING = 1 << 28, //for project or editor settings, show when basic settings are selected
+ PROPERTY_USAGE_READ_ONLY = 1 << 29, // Mark a property as read-only in the inspector.
+ PROPERTY_USAGE_ARRAY = 1 << 30, // Used in the inspector to group properties as elements of an array.
PROPERTY_USAGE_DEFAULT = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK,
PROPERTY_USAGE_DEFAULT_INTL = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK | PROPERTY_USAGE_INTERNATIONALIZED,
PROPERTY_USAGE_NOEDITOR = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK,
};
-#define ADD_SIGNAL(m_signal) ClassDB::add_signal(get_class_static(), m_signal)
-#define ADD_PROPERTY(m_property, m_setter, m_getter) ClassDB::add_property(get_class_static(), m_property, _scs_create(m_setter), _scs_create(m_getter))
-#define ADD_PROPERTYI(m_property, m_setter, m_getter, m_index) ClassDB::add_property(get_class_static(), m_property, _scs_create(m_setter), _scs_create(m_getter), m_index)
-#define ADD_PROPERTY_DEFAULT(m_property, m_default) ClassDB::set_property_default_value(get_class_static(), m_property, m_default)
-#define ADD_GROUP(m_name, m_prefix) ClassDB::add_property_group(get_class_static(), m_name, m_prefix)
-#define ADD_SUBGROUP(m_name, m_prefix) ClassDB::add_property_subgroup(get_class_static(), m_name, m_prefix)
+#define ADD_SIGNAL(m_signal) ::ClassDB::add_signal(get_class_static(), m_signal)
+#define ADD_PROPERTY(m_property, m_setter, m_getter) ::ClassDB::add_property(get_class_static(), m_property, _scs_create(m_setter), _scs_create(m_getter))
+#define ADD_PROPERTYI(m_property, m_setter, m_getter, m_index) ::ClassDB::add_property(get_class_static(), m_property, _scs_create(m_setter), _scs_create(m_getter), m_index)
+#define ADD_PROPERTY_DEFAULT(m_property, m_default) ::ClassDB::set_property_default_value(get_class_static(), m_property, m_default)
+#define ADD_GROUP(m_name, m_prefix) ::ClassDB::add_property_group(get_class_static(), m_name, m_prefix)
+#define ADD_SUBGROUP(m_name, m_prefix) ::ClassDB::add_property_subgroup(get_class_static(), m_name, m_prefix)
+#define ADD_LINKED_PROPERTY(m_property, m_linked_property) ::ClassDB::add_linked_property(get_class_static(), m_property, m_linked_property)
+
+#define ADD_ARRAY_COUNT(m_label, m_count_property, m_count_property_setter, m_count_property_getter, m_prefix) ClassDB::add_property_array_count(get_class_static(), m_label, m_count_property, _scs_create(m_count_property_setter), _scs_create(m_count_property_getter), m_prefix)
+#define ADD_ARRAY_COUNT_WITH_USAGE_FLAGS(m_label, m_count_property, m_count_property_setter, m_count_property_getter, m_prefix, m_property_usage_flags) ClassDB::add_property_array_count(get_class_static(), m_label, m_count_property, _scs_create(m_count_property_setter), _scs_create(m_count_property_getter), m_prefix, m_property_usage_flags)
+#define ADD_ARRAY(m_array_path, m_prefix) ClassDB::add_property_array(get_class_static(), m_array_path, m_prefix)
struct PropertyInfo {
Variant::Type type = Variant::NIL;
String name;
- StringName class_name; //for classes
+ StringName class_name; // For classes
PropertyHint hint = PROPERTY_HINT_NONE;
String hint_string;
uint32_t usage = PROPERTY_USAGE_DEFAULT;
+#ifdef TOOLS_ENABLED
+ Vector<String> linked_properties;
+#endif
+
_FORCE_INLINE_ PropertyInfo added_usage(uint32_t p_fl) const {
PropertyInfo pi = *this;
pi.usage |= p_fl;
@@ -277,7 +289,14 @@ struct ObjectNativeExtension {
};
#define GDVIRTUAL_CALL(m_name, ...) _gdvirtual_##m_name##_call(__VA_ARGS__)
-#define GDVIRTUAL_BIND(m_name) ClassDB::add_virtual_method(get_class_static(), _gdvirtual_##m_name##_get_method_info());
+#define GDVIRTUAL_CALL_PTR(m_obj, m_name, ...) m_obj->_gdvirtual_##m_name##_call(__VA_ARGS__)
+#ifdef DEBUG_METHODS_ENABLED
+#define GDVIRTUAL_BIND(m_name, ...) ::ClassDB::add_virtual_method(get_class_static(), _gdvirtual_##m_name##_get_method_info(), true, sarray(__VA_ARGS__));
+#else
+#define GDVIRTUAL_BIND(m_name, ...)
+#endif
+#define GDVIRTUAL_IS_OVERRIDDEN(m_name) _gdvirtual_##m_name##_overridden()
+#define GDVIRTUAL_IS_OVERRIDDEN_PTR(m_obj, m_name) m_obj->_gdvirtual_##m_name##_overridden()
/*
the following is an incomprehensible blob of hacks and workarounds to compensate for many of the fallencies in C++. As a plus, this macro pretty much alone defines the object model.
@@ -299,7 +318,7 @@ private:
private: \
void operator=(const m_class &p_rval) {} \
mutable StringName _class_name; \
- friend class ClassDB; \
+ friend class ::ClassDB; \
\
public: \
virtual String get_class() const override { \
@@ -372,7 +391,7 @@ public:
return; \
} \
m_inherits::initialize_class(); \
- ClassDB::_add_class<m_class>(); \
+ ::ClassDB::_add_class<m_class>(); \
if (m_class::_get_bind_methods() != m_inherits::_get_bind_methods()) { \
_bind_methods(); \
} \
@@ -415,13 +434,13 @@ protected:
} \
p_list->push_back(PropertyInfo(Variant::NIL, get_class_static(), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY)); \
if (!_is_gpl_reversed()) { \
- ClassDB::get_property_list(#m_class, p_list, true, this); \
+ ::ClassDB::get_property_list(#m_class, p_list, true, this); \
} \
if (m_class::_get_get_property_list() != m_inherits::_get_get_property_list()) { \
_get_property_list(p_list); \
} \
if (_is_gpl_reversed()) { \
- ClassDB::get_property_list(#m_class, p_list, true, this); \
+ ::ClassDB::get_property_list(#m_class, p_list, true, this); \
} \
if (p_reversed) { \
m_inherits::_get_property_listv(p_list, p_reversed); \
diff --git a/core/object/ref_counted.h b/core/object/ref_counted.h
index e0af2c18bb..f2dd2aa324 100644
--- a/core/object/ref_counted.h
+++ b/core/object/ref_counted.h
@@ -274,8 +274,6 @@ struct PtrToArg<const Ref<T> &> {
}
};
-#ifdef DEBUG_METHODS_ENABLED
-
template <class T>
struct GetTypeInfo<Ref<T>> {
static const Variant::Type VARIANT_TYPE = Variant::OBJECT;
@@ -296,6 +294,4 @@ struct GetTypeInfo<const Ref<T> &> {
}
};
-#endif // DEBUG_METHODS_ENABLED
-
#endif // REF_COUNTED_H
diff --git a/core/object/script_language.h b/core/object/script_language.h
index 385bf79c1a..8d76cbf479 100644
--- a/core/object/script_language.h
+++ b/core/object/script_language.h
@@ -32,8 +32,8 @@
#define SCRIPT_LANGUAGE_H
#include "core/doc_data.h"
-#include "core/io/multiplayer_api.h"
#include "core/io/resource.h"
+#include "core/multiplayer/multiplayer.h"
#include "core/templates/map.h"
#include "core/templates/pair.h"
@@ -159,7 +159,7 @@ public:
virtual bool is_placeholder_fallback_enabled() const { return false; }
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const = 0;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const = 0;
Script() {}
};
@@ -200,7 +200,7 @@ public:
virtual void property_set_fallback(const StringName &p_name, const Variant &p_value, bool *r_valid);
virtual Variant property_get_fallback(const StringName &p_name, bool *r_valid);
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const = 0;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const = 0;
virtual ScriptLanguage *get_language() = 0;
virtual ~ScriptInstance();
@@ -419,7 +419,7 @@ public:
virtual void property_set_fallback(const StringName &p_name, const Variant &p_value, bool *r_valid = nullptr);
virtual Variant property_get_fallback(const StringName &p_name, bool *r_valid = nullptr);
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const { return Vector<MultiplayerAPI::RPCConfig>(); }
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const { return Vector<Multiplayer::RPCConfig>(); }
PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script, Object *p_owner);
~PlaceHolderScriptInstance();
diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp
index 3c0e56f5a8..0ba69a8d47 100644
--- a/core/os/main_loop.cpp
+++ b/core/os/main_loop.cpp
@@ -33,11 +33,6 @@
#include "core/object/script_language.h"
void MainLoop::_bind_methods() {
- BIND_VMETHOD(MethodInfo("_initialize"));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_physics_process", PropertyInfo(Variant::FLOAT, "delta")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_process", PropertyInfo(Variant::FLOAT, "delta")));
- BIND_VMETHOD(MethodInfo("_finalize"));
-
BIND_CONSTANT(NOTIFICATION_OS_MEMORY_WARNING);
BIND_CONSTANT(NOTIFICATION_TRANSLATION_CHANGED);
BIND_CONSTANT(NOTIFICATION_WM_ABOUT);
@@ -50,7 +45,12 @@ void MainLoop::_bind_methods() {
BIND_CONSTANT(NOTIFICATION_TEXT_SERVER_CHANGED);
ADD_SIGNAL(MethodInfo("on_request_permissions_result", PropertyInfo(Variant::STRING, "permission"), PropertyInfo(Variant::BOOL, "granted")));
-};
+
+ GDVIRTUAL_BIND(_initialize);
+ GDVIRTUAL_BIND(_physics_process, "delta");
+ GDVIRTUAL_BIND(_process, "delta");
+ GDVIRTUAL_BIND(_finalize);
+}
void MainLoop::set_initialize_script(const Ref<Script> &p_initialize_script) {
initialize_script = p_initialize_script;
@@ -61,30 +61,31 @@ void MainLoop::initialize() {
set_script(initialize_script);
}
- if (get_script_instance()) {
- get_script_instance()->call("_initialize");
- }
+ GDVIRTUAL_CALL(_initialize);
}
bool MainLoop::physics_process(double p_time) {
- if (get_script_instance()) {
- return get_script_instance()->call("_physics_process", p_time);
+ bool quit;
+ if (GDVIRTUAL_CALL(_physics_process, p_time, quit)) {
+ return quit;
}
return false;
}
bool MainLoop::process(double p_time) {
- if (get_script_instance()) {
- return get_script_instance()->call("_process", p_time);
+ bool quit;
+ if (GDVIRTUAL_CALL(_process, p_time, quit)) {
+ return quit;
}
return false;
}
void MainLoop::finalize() {
+ GDVIRTUAL_CALL(_finalize);
+
if (get_script_instance()) {
- get_script_instance()->call("_finalize");
set_script(Variant()); //clear script
}
}
diff --git a/core/os/main_loop.h b/core/os/main_loop.h
index b42e9b18ff..4da01d767e 100644
--- a/core/os/main_loop.h
+++ b/core/os/main_loop.h
@@ -32,6 +32,7 @@
#define MAIN_LOOP_H
#include "core/input/input_event.h"
+#include "core/object/gdvirtual.gen.inc"
#include "core/object/ref_counted.h"
#include "core/object/script_language.h"
@@ -44,6 +45,11 @@ class MainLoop : public Object {
protected:
static void _bind_methods();
+ GDVIRTUAL0(_initialize)
+ GDVIRTUAL1R(bool, _physics_process, double)
+ GDVIRTUAL1R(bool, _process, double)
+ GDVIRTUAL0(_finalize)
+
public:
enum {
//make sure these are replicated in Node
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 63390919f4..69366f688c 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -146,6 +146,10 @@ bool OS::is_stdout_verbose() const {
return _verbose_stdout;
}
+bool OS::is_single_window() const {
+ return _single_window;
+}
+
bool OS::is_stdout_debug_enabled() const {
return _debug_stdout;
}
@@ -227,6 +231,12 @@ String OS::get_locale() const {
return "en";
}
+// Non-virtual helper to extract the 2 or 3-letter language code from
+// `get_locale()` in a way that's consistent for all platforms.
+String OS::get_locale_language() const {
+ return get_locale().left(3).replace("_", "");
+}
+
// Helper function to ensure that a dir name/path will be valid on the OS
String OS::get_safe_dir_name(const String &p_dir_name, bool p_allow_dir_separator) const {
Vector<String> invalid_chars = String(": * ? \" < > |").split(" ");
@@ -272,6 +282,11 @@ String OS::get_bundle_resource_dir() const {
return ".";
}
+// Path to macOS .app bundle embedded icon
+String OS::get_bundle_icon_path() const {
+ return String();
+}
+
// OS specific path for user://
String OS::get_user_data_dir() const {
return ".";
@@ -357,9 +372,17 @@ void OS::set_has_server_feature_callback(HasServerFeatureCallback p_callback) {
}
bool OS::has_feature(const String &p_feature) {
- if (p_feature == get_name()) {
+ // Feature tags are always lowercase for consistency.
+ if (p_feature == get_name().to_lower()) {
return true;
}
+
+ // Catch-all `linuxbsd` feature tag that matches on both Linux and BSD.
+ // This is the one exposed in the project settings dialog.
+ if (p_feature == "linuxbsd" && (get_name() == "Linux" || get_name() == "FreeBSD" || get_name() == "NetBSD" || get_name() == "OpenBSD" || get_name() == "BSD")) {
+ return true;
+ }
+
#ifdef DEBUG_ENABLED
if (p_feature == "debug") {
return true;
diff --git a/core/os/os.h b/core/os/os.h
index 55b21266fc..29d33ce4f0 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -52,6 +52,7 @@ class OS {
int low_processor_usage_mode_sleep_usec = 10000;
bool _verbose_stdout = false;
bool _debug_stdout = false;
+ bool _single_window = false;
String _local_clipboard;
int _exit_code = EXIT_FAILURE; // unexpected exit is marked as failure
int _orientation;
@@ -224,6 +225,8 @@ public:
void set_stdout_enabled(bool p_enabled);
void set_stderr_enabled(bool p_enabled);
+ bool is_single_window() const;
+
virtual void disable_crash_handler() {}
virtual bool is_disable_crash_handler() const { return false; }
virtual void initialize_debugging() {}
@@ -240,6 +243,7 @@ public:
RenderThreadMode get_render_thread_mode() const { return _render_thread_mode; }
virtual String get_locale() const;
+ String get_locale_language() const;
String get_safe_dir_name(const String &p_dir_name, bool p_allow_dir_separator = false) const;
virtual String get_godot_dir_name() const;
@@ -248,6 +252,7 @@ public:
virtual String get_config_path() const;
virtual String get_cache_path() const;
virtual String get_bundle_resource_dir() const;
+ virtual String get_bundle_icon_path() const;
virtual String get_user_data_dir() const;
virtual String get_resource_dir() const;
diff --git a/core/os/thread.cpp b/core/os/thread.cpp
index 73e31bdb3d..27aefc98de 100644
--- a/core/os/thread.cpp
+++ b/core/os/thread.cpp
@@ -28,6 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#ifndef PLATFORM_THREAD_OVERRIDE // See details in thread.h
+
#include "thread.h"
#include "core/object/script_language.h"
@@ -126,3 +128,4 @@ Thread::~Thread() {
}
#endif
+#endif // PLATFORM_THREAD_OVERRIDE
diff --git a/core/os/thread.h b/core/os/thread.h
index 17ac82c650..59cb58ac57 100644
--- a/core/os/thread.h
+++ b/core/os/thread.h
@@ -28,6 +28,12 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+// Define PLATFORM_THREAD_OVERRIDE in your platform's `platform_config.h`
+// to use a custom Thread implementation defined in `platform/[your_platform]/platform_thread.h`
+// Overriding the platform implementation is required in some proprietary platforms
+#ifdef PLATFORM_THREAD_OVERRIDE
+#include "platform_thread.h"
+#else
#ifndef THREAD_H
#define THREAD_H
@@ -116,3 +122,4 @@ public:
};
#endif // THREAD_H
+#endif // PLATFORM_THREAD_OVERRIDE
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index f801be3db3..e33c21cc00 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -41,14 +41,13 @@
#include "core/extension/native_extension_manager.h"
#include "core/input/input.h"
#include "core/input/input_map.h"
+#include "core/input/shortcut.h"
#include "core/io/config_file.h"
#include "core/io/dtls_server.h"
#include "core/io/http_client.h"
#include "core/io/image_loader.h"
#include "core/io/json.h"
#include "core/io/marshalls.h"
-#include "core/io/multiplayer_api.h"
-#include "core/io/multiplayer_peer.h"
#include "core/io/packed_data_container.h"
#include "core/io/packet_peer.h"
#include "core/io/packet_peer_dtls.h"
@@ -68,6 +67,9 @@
#include "core/math/geometry_3d.h"
#include "core/math/random_number_generator.h"
#include "core/math/triangle_mesh.h"
+#include "core/multiplayer/multiplayer_api.h"
+#include "core/multiplayer/multiplayer_peer.h"
+#include "core/multiplayer/multiplayer_replicator.h"
#include "core/object/class_db.h"
#include "core/object/undo_redo.h"
#include "core/os/main_loop.h"
@@ -84,18 +86,18 @@ static Ref<ResourceFormatSaverCrypto> resource_format_saver_crypto;
static Ref<ResourceFormatLoaderCrypto> resource_format_loader_crypto;
static Ref<NativeExtensionResourceLoader> resource_loader_native_extension;
-static _ResourceLoader *_resource_loader = nullptr;
-static _ResourceSaver *_resource_saver = nullptr;
-static _OS *_os = nullptr;
-static _Engine *_engine = nullptr;
-static _ClassDB *_classdb = nullptr;
-static _Marshalls *_marshalls = nullptr;
-static _EngineDebugger *_engine_debugger = nullptr;
+static core_bind::ResourceLoader *_resource_loader = nullptr;
+static core_bind::ResourceSaver *_resource_saver = nullptr;
+static core_bind::OS *_os = nullptr;
+static core_bind::Engine *_engine = nullptr;
+static core_bind::special::ClassDB *_classdb = nullptr;
+static core_bind::Marshalls *_marshalls = nullptr;
+static core_bind::EngineDebugger *_engine_debugger = nullptr;
static IP *ip = nullptr;
-static _Geometry2D *_geometry_2d = nullptr;
-static _Geometry3D *_geometry_3d = nullptr;
+static core_bind::Geometry2D *_geometry_2d = nullptr;
+static core_bind::Geometry3D *_geometry_3d = nullptr;
extern Mutex _global_mutex;
@@ -144,10 +146,12 @@ void register_core_types() {
GDREGISTER_CLASS(Resource);
GDREGISTER_CLASS(Image);
+ GDREGISTER_CLASS(Shortcut);
GDREGISTER_VIRTUAL_CLASS(InputEvent);
GDREGISTER_VIRTUAL_CLASS(InputEventWithModifiers);
GDREGISTER_VIRTUAL_CLASS(InputEventFromWindow);
GDREGISTER_CLASS(InputEventKey);
+ GDREGISTER_CLASS(InputEventShortcut);
GDREGISTER_VIRTUAL_CLASS(InputEventMouse);
GDREGISTER_CLASS(InputEventMouseButton);
GDREGISTER_CLASS(InputEventMouseMotion);
@@ -165,11 +169,13 @@ void register_core_types() {
GDREGISTER_VIRTUAL_CLASS(IP);
GDREGISTER_VIRTUAL_CLASS(StreamPeer);
+ GDREGISTER_CLASS(StreamPeerExtension);
GDREGISTER_CLASS(StreamPeerBuffer);
GDREGISTER_CLASS(StreamPeerTCP);
GDREGISTER_CLASS(TCPServer);
GDREGISTER_VIRTUAL_CLASS(PacketPeer);
+ GDREGISTER_CLASS(PacketPeerExtension);
GDREGISTER_CLASS(PacketPeerStream);
GDREGISTER_CLASS(PacketPeerUDP);
GDREGISTER_CLASS(UDPServer);
@@ -193,6 +199,8 @@ void register_core_types() {
ResourceLoader::add_resource_format_loader(resource_format_loader_crypto);
GDREGISTER_VIRTUAL_CLASS(MultiplayerPeer);
+ GDREGISTER_VIRTUAL_CLASS(MultiplayerPeerExtension);
+ GDREGISTER_VIRTUAL_CLASS(MultiplayerReplicator);
GDREGISTER_CLASS(MultiplayerAPI);
GDREGISTER_CLASS(MainLoop);
GDREGISTER_CLASS(Translation);
@@ -203,11 +211,11 @@ void register_core_types() {
GDREGISTER_CLASS(ResourceFormatLoader);
GDREGISTER_CLASS(ResourceFormatSaver);
- GDREGISTER_CLASS(_File);
- GDREGISTER_CLASS(_Directory);
- GDREGISTER_CLASS(_Thread);
- GDREGISTER_CLASS(_Mutex);
- GDREGISTER_CLASS(_Semaphore);
+ GDREGISTER_CLASS(core_bind::File);
+ GDREGISTER_CLASS(core_bind::Directory);
+ GDREGISTER_CLASS(core_bind::Thread);
+ GDREGISTER_CLASS(core_bind::Mutex);
+ GDREGISTER_CLASS(core_bind::Semaphore);
GDREGISTER_CLASS(XMLParser);
GDREGISTER_CLASS(JSON);
@@ -240,16 +248,16 @@ void register_core_types() {
ip = IP::create();
- _geometry_2d = memnew(_Geometry2D);
- _geometry_3d = memnew(_Geometry3D);
+ _geometry_2d = memnew(core_bind::Geometry2D);
+ _geometry_3d = memnew(core_bind::Geometry3D);
- _resource_loader = memnew(_ResourceLoader);
- _resource_saver = memnew(_ResourceSaver);
- _os = memnew(_OS);
- _engine = memnew(_Engine);
- _classdb = memnew(_ClassDB);
- _marshalls = memnew(_Marshalls);
- _engine_debugger = memnew(_EngineDebugger);
+ _resource_loader = memnew(core_bind::ResourceLoader);
+ _resource_saver = memnew(core_bind::ResourceSaver);
+ _os = memnew(core_bind::OS);
+ _engine = memnew(core_bind::Engine);
+ _classdb = memnew(core_bind::special::ClassDB);
+ _marshalls = memnew(core_bind::Marshalls);
+ _engine_debugger = memnew(core_bind::EngineDebugger);
}
void register_core_settings() {
@@ -266,35 +274,35 @@ void register_core_settings() {
void register_core_singletons() {
GDREGISTER_CLASS(ProjectSettings);
GDREGISTER_VIRTUAL_CLASS(IP);
- GDREGISTER_CLASS(_Geometry2D);
- GDREGISTER_CLASS(_Geometry3D);
- GDREGISTER_CLASS(_ResourceLoader);
- GDREGISTER_CLASS(_ResourceSaver);
- GDREGISTER_CLASS(_OS);
- GDREGISTER_CLASS(_Engine);
- GDREGISTER_CLASS(_ClassDB);
- GDREGISTER_CLASS(_Marshalls);
+ GDREGISTER_CLASS(core_bind::Geometry2D);
+ GDREGISTER_CLASS(core_bind::Geometry3D);
+ GDREGISTER_CLASS(core_bind::ResourceLoader);
+ GDREGISTER_CLASS(core_bind::ResourceSaver);
+ GDREGISTER_CLASS(core_bind::OS);
+ GDREGISTER_CLASS(core_bind::Engine);
+ GDREGISTER_CLASS(core_bind::special::ClassDB);
+ GDREGISTER_CLASS(core_bind::Marshalls);
GDREGISTER_CLASS(TranslationServer);
GDREGISTER_VIRTUAL_CLASS(Input);
GDREGISTER_CLASS(InputMap);
GDREGISTER_CLASS(Expression);
- GDREGISTER_CLASS(_EngineDebugger);
+ GDREGISTER_CLASS(core_bind::EngineDebugger);
GDREGISTER_CLASS(Time);
Engine::get_singleton()->add_singleton(Engine::Singleton("ProjectSettings", ProjectSettings::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("IP", IP::get_singleton(), "IP"));
- Engine::get_singleton()->add_singleton(Engine::Singleton("Geometry2D", _Geometry2D::get_singleton()));
- Engine::get_singleton()->add_singleton(Engine::Singleton("Geometry3D", _Geometry3D::get_singleton()));
- Engine::get_singleton()->add_singleton(Engine::Singleton("ResourceLoader", _ResourceLoader::get_singleton()));
- Engine::get_singleton()->add_singleton(Engine::Singleton("ResourceSaver", _ResourceSaver::get_singleton()));
- Engine::get_singleton()->add_singleton(Engine::Singleton("OS", _OS::get_singleton()));
- Engine::get_singleton()->add_singleton(Engine::Singleton("Engine", _Engine::get_singleton()));
+ Engine::get_singleton()->add_singleton(Engine::Singleton("Geometry2D", core_bind::Geometry2D::get_singleton()));
+ Engine::get_singleton()->add_singleton(Engine::Singleton("Geometry3D", core_bind::Geometry3D::get_singleton()));
+ Engine::get_singleton()->add_singleton(Engine::Singleton("ResourceLoader", core_bind::ResourceLoader::get_singleton()));
+ Engine::get_singleton()->add_singleton(Engine::Singleton("ResourceSaver", core_bind::ResourceSaver::get_singleton()));
+ Engine::get_singleton()->add_singleton(Engine::Singleton("OS", core_bind::OS::get_singleton()));
+ Engine::get_singleton()->add_singleton(Engine::Singleton("Engine", core_bind::Engine::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("ClassDB", _classdb));
- Engine::get_singleton()->add_singleton(Engine::Singleton("Marshalls", _Marshalls::get_singleton()));
+ Engine::get_singleton()->add_singleton(Engine::Singleton("Marshalls", core_bind::Marshalls::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("TranslationServer", TranslationServer::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("Input", Input::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("InputMap", InputMap::get_singleton()));
- Engine::get_singleton()->add_singleton(Engine::Singleton("EngineDebugger", _EngineDebugger::get_singleton()));
+ Engine::get_singleton()->add_singleton(Engine::Singleton("EngineDebugger", core_bind::EngineDebugger::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("Time", Time::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("NativeExtensionManager", NativeExtensionManager::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("ResourceUID", ResourceUID::get_singleton()));
@@ -303,13 +311,7 @@ void register_core_singletons() {
void register_core_extensions() {
// Hardcoded for now.
NativeExtension::initialize_native_extensions();
- if (ProjectSettings::get_singleton()->has_setting("native_extensions/paths")) {
- Vector<String> paths = ProjectSettings::get_singleton()->get("native_extensions/paths");
- for (int i = 0; i < paths.size(); i++) {
- NativeExtensionManager::LoadStatus status = native_extension_manager->load_extension(paths[i]);
- ERR_CONTINUE_MSG(status != NativeExtensionManager::LOAD_STATUS_OK, "Error loading extension: " + paths[i]);
- }
- }
+ native_extension_manager->load_extensions();
native_extension_manager->initialize_extensions(NativeExtension::INITIALIZATION_LEVEL_CORE);
}
diff --git a/core/string/translation.cpp b/core/string/translation.cpp
index cb7d924556..5c0eb388f5 100644
--- a/core/string/translation.cpp
+++ b/core/string/translation.cpp
@@ -875,6 +875,11 @@ void Translation::add_plural_message(const StringName &p_src_text, const Vector<
}
StringName Translation::get_message(const StringName &p_src_text, const StringName &p_context) const {
+ StringName ret;
+ if (GDVIRTUAL_CALL(_get_message, p_src_text, p_context, ret)) {
+ return ret;
+ }
+
if (p_context != StringName()) {
WARN_PRINT("Translation class doesn't handle context. Using context in get_message() on a Translation instance is probably a mistake. \nUse a derived Translation class that handles context, such as TranslationPO class");
}
@@ -888,6 +893,11 @@ StringName Translation::get_message(const StringName &p_src_text, const StringNa
}
StringName Translation::get_plural_message(const StringName &p_src_text, const StringName &p_plural_text, int p_n, const StringName &p_context) const {
+ StringName ret;
+ if (GDVIRTUAL_CALL(_get_plural_message, p_src_text, p_plural_text, p_n, p_context, ret)) {
+ return ret;
+ }
+
WARN_PRINT("Translation class doesn't handle plural messages. Calling get_plural_message() on a Translation instance is probably a mistake. \nUse a derived Translation class that handles plurals, such as TranslationPO class");
return get_message(p_src_text);
}
@@ -923,6 +933,9 @@ void Translation::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_messages"), &Translation::_set_messages);
ClassDB::bind_method(D_METHOD("_get_messages"), &Translation::_get_messages);
+ GDVIRTUAL_BIND(_get_plural_message, "src_message", "src_plural_message", "n", "context");
+ GDVIRTUAL_BIND(_get_message, "src_message", "context");
+
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "messages", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_messages", "_get_messages");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "locale"), "set_locale", "get_locale");
}
diff --git a/core/string/translation.h b/core/string/translation.h
index 4f179ac0fe..6aec0bb8ea 100644
--- a/core/string/translation.h
+++ b/core/string/translation.h
@@ -32,6 +32,8 @@
#define TRANSLATION_H
#include "core/io/resource.h"
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
class Translation : public Resource {
GDCLASS(Translation, Resource);
@@ -48,6 +50,9 @@ class Translation : public Resource {
protected:
static void _bind_methods();
+ GDVIRTUAL2RC(StringName, _get_message, StringName, StringName);
+ GDVIRTUAL4RC(StringName, _get_plural_message, StringName, StringName, int, StringName);
+
public:
void set_locale(const String &p_locale);
_FORCE_INLINE_ String get_locale() const { return locale; }
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index 2fdf6e84e5..daeb7fbd17 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -39,12 +39,9 @@
#include "core/string/ucaps.h"
#include "core/variant/variant.h"
-#include <cstdint>
-
-#ifndef NO_USE_STDLIB
#include <stdio.h>
#include <stdlib.h>
-#endif
+#include <cstdint>
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS // to disable build-time warning which suggested to use strcpy_s instead strcpy
@@ -1393,10 +1390,15 @@ String String::num(double p_num, int p_decimals) {
return "inf";
}
}
-#ifndef NO_USE_STDLIB
if (p_decimals < 0) {
- p_decimals = 14 - (int)floor(log10(p_num));
+ p_decimals = 14;
+ const double abs_num = ABS(p_num);
+ if (abs_num > 10) {
+ // We want to align the digits to the above sane default, so we only
+ // need to subtract log10 for numbers with a positive power of ten.
+ p_decimals -= (int)floor(log10(abs_num));
+ }
}
if (p_decimals > MAX_DECIMALS) {
p_decimals = MAX_DECIMALS;
@@ -1460,87 +1462,6 @@ String String::num(double p_num, int p_decimals) {
}
return buf;
-#else
-
- String s;
- String sd;
- /* integer part */
-
- bool neg = p_num < 0;
- p_num = ABS(p_num);
- int intn = (int)p_num;
-
- /* decimal part */
-
- if (p_decimals > 0 || (p_decimals == -1 && (int)p_num != p_num)) {
- double dec = p_num - (double)((int)p_num);
-
- int digit = 0;
- if (p_decimals > MAX_DECIMALS) {
- p_decimals = MAX_DECIMALS;
- }
-
- int dec_int = 0;
- int dec_max = 0;
-
- while (true) {
- dec *= 10.0;
- dec_int = dec_int * 10 + (int)dec % 10;
- dec_max = dec_max * 10 + 9;
- digit++;
-
- if (p_decimals == -1) {
- if (digit == MAX_DECIMALS) { //no point in going to infinite
- break;
- }
-
- if (dec - (double)((int)dec) < 1e-6) {
- break;
- }
- }
-
- if (digit == p_decimals) {
- break;
- }
- }
- dec *= 10;
- int last = (int)dec % 10;
-
- if (last > 5) {
- if (dec_int == dec_max) {
- dec_int = 0;
- intn++;
- } else {
- dec_int++;
- }
- }
-
- String decimal;
- for (int i = 0; i < digit; i++) {
- char num[2] = { 0, 0 };
- num[0] = '0' + dec_int % 10;
- decimal = num + decimal;
- dec_int /= 10;
- }
- sd = '.' + decimal;
- }
-
- if (intn == 0)
-
- s = "0";
- else {
- while (intn) {
- char32_t num = '0' + (intn % 10);
- intn /= 10;
- s = num + s;
- }
- }
-
- s = s + sd;
- if (neg)
- s = "-" + s;
- return s;
-#endif
}
String String::num_int64(int64_t p_num, int base, bool capitalize_hex) {
@@ -1625,38 +1546,52 @@ String String::num_real(double p_num, bool p_trailing) {
String s;
String sd;
- /* integer part */
+
+ // Integer part.
bool neg = p_num < 0;
p_num = ABS(p_num);
- int intn = (int)p_num;
+ int64_t intn = (int64_t)p_num;
- /* decimal part */
+ // Decimal part.
- if ((int)p_num != p_num) {
- double dec = p_num - (double)((int)p_num);
+ if (intn != p_num) {
+ double dec = p_num - (double)intn;
int digit = 0;
-#if REAL_T_IS_DOUBLE
- int decimals = 14 - (int)floor(log10(p_num));
+#ifdef REAL_T_IS_DOUBLE
+ int decimals = 14;
+ double tolerance = 1e-14;
#else
- int decimals = 6 - (int)floor(log10(p_num));
+ int decimals = 6;
+ double tolerance = 1e-6;
#endif
+ // We want to align the digits to the above sane default, so we only
+ // need to subtract log10 for numbers with a positive power of ten.
+ if (p_num > 10) {
+ decimals -= (int)floor(log10(p_num));
+ }
+
if (decimals > MAX_DECIMALS) {
decimals = MAX_DECIMALS;
}
- int dec_int = 0;
- int dec_max = 0;
+ // In case the value ends up ending in "99999", we want to add a
+ // tiny bit to the value we're checking when deciding when to stop,
+ // so we multiply by slightly above 1 (1 + 1e-7 or 1e-15).
+ double check_multiplier = 1 + tolerance / 10;
+
+ int64_t dec_int = 0;
+ int64_t dec_max = 0;
while (true) {
dec *= 10.0;
- dec_int = dec_int * 10 + (int)dec % 10;
+ dec_int = dec_int * 10 + (int64_t)dec % 10;
dec_max = dec_max * 10 + 9;
digit++;
- if ((dec - (double)((int)dec)) < 1e-6) {
+ if ((dec - (double)(int64_t)(dec * check_multiplier)) < tolerance) {
break;
}
@@ -1666,7 +1601,7 @@ String String::num_real(double p_num, bool p_trailing) {
}
dec *= 10;
- int last = (int)dec % 10;
+ int last = (int64_t)dec % 10;
if (last > 5) {
if (dec_int == dec_max) {
@@ -1720,19 +1655,18 @@ String String::num_scientific(double p_num) {
return "inf";
}
}
-#ifndef NO_USE_STDLIB
char buf[256];
#if defined(__GNUC__) || defined(_MSC_VER)
-#if (defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER < 1900)) && defined(_TWO_DIGIT_EXPONENT) && !defined(_UCRT)
- // MinGW and old MSC require _set_output_format() to conform to C99 output for printf
+#if defined(__MINGW32__) && defined(_TWO_DIGIT_EXPONENT) && !defined(_UCRT)
+ // MinGW requires _set_output_format() to conform to C99 output for printf
unsigned int old_exponent_format = _set_output_format(_TWO_DIGIT_EXPONENT);
#endif
snprintf(buf, 256, "%lg", p_num);
-#if (defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER < 1900)) && defined(_TWO_DIGIT_EXPONENT) && !defined(_UCRT)
+#if defined(__MINGW32__) && defined(_TWO_DIGIT_EXPONENT) && !defined(_UCRT)
_set_output_format(old_exponent_format);
#endif
@@ -1743,10 +1677,6 @@ String String::num_scientific(double p_num) {
buf[255] = 0;
return buf;
-#else
-
- return String::num(p_num);
-#endif
}
String String::md5(const uint8_t *p_md5) {
@@ -3632,7 +3562,7 @@ String String::strip_edges(bool left, bool right) const {
}
if (right) {
- for (int i = (int)(len - 1); i >= 0; i--) {
+ for (int i = len - 1; i >= 0; i--) {
if (operator[](i) <= 32) {
end--;
} else {
@@ -4401,28 +4331,44 @@ bool String::is_resource_file() const {
return begins_with("res://") && find("::") == -1;
}
-bool String::is_rel_path() const {
+bool String::is_relative_path() const {
return !is_absolute_path();
}
String String::get_base_dir() const {
- int basepos = find(":/");
- if (basepos == -1) {
- basepos = find(":\\");
+ int end = 0;
+
+ // url scheme style base
+ int basepos = find("://");
+ if (basepos != -1) {
+ end = basepos + 3;
}
+
+ // windows top level directory base
+ if (end == 0) {
+ basepos = find(":/");
+ if (basepos == -1) {
+ basepos = find(":\\");
+ }
+ if (basepos != -1) {
+ end = basepos + 2;
+ }
+ }
+
+ // unix root directory base
+ if (end == 0) {
+ if (begins_with("/")) {
+ end = 1;
+ }
+ }
+
String rs;
String base;
- if (basepos != -1) {
- int end = basepos + 3;
+ if (end != 0) {
rs = substr(end, length());
base = substr(0, end);
} else {
- if (begins_with("/")) {
- rs = substr(1, length());
- base = "/";
- } else {
- rs = *this;
- }
+ rs = *this;
}
int sep = MAX(rs.rfind("/"), rs.rfind("\\"));
diff --git a/core/string/ustring.h b/core/string/ustring.h
index ffb354d6e1..24da6b82af 100644
--- a/core/string/ustring.h
+++ b/core/string/ustring.h
@@ -398,7 +398,7 @@ public:
// path functions
bool is_absolute_path() const;
- bool is_rel_path() const;
+ bool is_relative_path() const;
bool is_resource_file() const;
String path_to(const String &p_path) const;
String path_to_file(const String &p_path) const;
@@ -523,10 +523,10 @@ String DTRN(const String &p_text, const String &p_text_plural, int p_n, const St
#define TTRGET(m_value) TTR(m_value)
#else
-#define TTR(m_value) (String())
-#define TTRN(m_value) (String())
-#define DTR(m_value) (String())
-#define DTRN(m_value) (String())
+#define TTR(m_value) String()
+#define TTRN(m_value) String()
+#define DTR(m_value) String()
+#define DTRN(m_value) String()
#define TTRC(m_value) (m_value)
#define TTRGET(m_value) (m_value)
#endif
diff --git a/core/templates/cowdata.h b/core/templates/cowdata.h
index ba9babe0af..9b8c0eb528 100644
--- a/core/templates/cowdata.h
+++ b/core/templates/cowdata.h
@@ -49,6 +49,12 @@ class VMap;
SAFE_NUMERIC_TYPE_PUN_GUARANTEES(uint32_t)
#endif
+// Silence a false positive warning (see GH-52119).
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wplacement-new"
+#endif
+
template <class T>
class CowData {
template <class TV>
@@ -380,4 +386,8 @@ CowData<T>::~CowData() {
_unref(_ptr);
}
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
+
#endif // COWDATA_H
diff --git a/core/templates/local_vector.h b/core/templates/local_vector.h
index 668ec513d6..5704b8f230 100644
--- a/core/templates/local_vector.h
+++ b/core/templates/local_vector.h
@@ -170,7 +170,7 @@ public:
push_back(p_val);
} else {
resize(count + 1);
- for (U i = count; i > p_pos; i--) {
+ for (U i = count - 1; i > p_pos; i--) {
data[i] = data[i - 1];
}
data[p_pos] = p_val;
diff --git a/core/templates/map.h b/core/templates/map.h
index a47547d355..badb407e5d 100644
--- a/core/templates/map.h
+++ b/core/templates/map.h
@@ -36,7 +36,7 @@
#include "core/templates/pair.h"
// based on the very nice implementation of rb-trees by:
-// https://web.archive.org/web/20120507164830/http://web.mit.edu/~emin/www/source_code/red_black_tree/index.html
+// https://web.archive.org/web/20120507164830/https://web.mit.edu/~emin/www/source_code/red_black_tree/index.html
template <class K, class V, class C = Comparator<K>, class A = DefaultAllocator>
class Map {
diff --git a/core/templates/pooled_list.h b/core/templates/pooled_list.h
index b4a6d2d1dd..b139dadb75 100644
--- a/core/templates/pooled_list.h
+++ b/core/templates/pooled_list.h
@@ -28,13 +28,16 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#pragma once
+#ifndef POOLED_LIST_H
+#define POOLED_LIST_H
+
+#include "core/templates/local_vector.h"
// Simple template to provide a pool with O(1) allocate and free.
// The freelist could alternatively be a linked list placed within the unused elements
// to use less memory, however a separate freelist is probably more cache friendly.
-
-// NOTE : Take great care when using this with non POD types. The construction and destruction
+//
+// NOTE: Take great care when using this with non POD types. The construction and destruction
// is done in the LocalVector, NOT as part of the pool. So requesting a new item does not guarantee
// a constructor is run, and free does not guarantee a destructor.
// You should generally handle clearing
@@ -42,9 +45,6 @@
// This is by design for fastest use in the BVH. If you want a more general pool
// that does call constructors / destructors on request / free, this should probably be
// a separate template.
-
-#include "core/templates/local_vector.h"
-
template <class T, bool force_trivial = false>
class PooledList {
LocalVector<T, uint32_t, force_trivial> list;
@@ -93,3 +93,5 @@ public:
_used_size--;
}
};
+
+#endif // POOLED_LIST_H
diff --git a/core/templates/rid_owner.h b/core/templates/rid_owner.h
index 8d139551ef..71d41eacc4 100644
--- a/core/templates/rid_owner.h
+++ b/core/templates/rid_owner.h
@@ -53,14 +53,16 @@ protected:
return rid;
}
- static uint64_t _gen_id() {
- return base_id.increment();
- }
-
static RID _gen_rid() {
return _make_from_id(_gen_id());
}
+ friend struct VariantUtilityFunctions;
+
+ static uint64_t _gen_id() {
+ return base_id.increment();
+ }
+
public:
virtual ~RID_AllocBase() {}
};
@@ -149,7 +151,7 @@ public:
return _allocate_rid();
}
- _FORCE_INLINE_ T *getornull(const RID &p_rid, bool p_initialize = false) {
+ _FORCE_INLINE_ T *get_or_null(const RID &p_rid, bool p_initialize = false) {
if (p_rid == RID()) {
return nullptr;
}
@@ -208,12 +210,12 @@ public:
return ptr;
}
void initialize_rid(RID p_rid) {
- T *mem = getornull(p_rid, true);
+ T *mem = get_or_null(p_rid, true);
ERR_FAIL_COND(!mem);
memnew_placement(mem, T);
}
void initialize_rid(RID p_rid, const T &p_value) {
- T *mem = getornull(p_rid, true);
+ T *mem = get_or_null(p_rid, true);
ERR_FAIL_COND(!mem);
memnew_placement(mem, T(p_value));
}
@@ -397,8 +399,8 @@ public:
alloc.initialize_rid(p_rid, p_ptr);
}
- _FORCE_INLINE_ T *getornull(const RID &p_rid) {
- T **ptr = alloc.getornull(p_rid);
+ _FORCE_INLINE_ T *get_or_null(const RID &p_rid) {
+ T **ptr = alloc.get_or_null(p_rid);
if (unlikely(!ptr)) {
return nullptr;
}
@@ -406,7 +408,7 @@ public:
}
_FORCE_INLINE_ void replace(const RID &p_rid, T *p_new_ptr) {
- T **ptr = alloc.getornull(p_rid);
+ T **ptr = alloc.get_or_null(p_rid);
ERR_FAIL_COND(!ptr);
*ptr = p_new_ptr;
}
@@ -467,8 +469,8 @@ public:
alloc.initialize_rid(p_rid, p_ptr);
}
- _FORCE_INLINE_ T *getornull(const RID &p_rid) {
- return alloc.getornull(p_rid);
+ _FORCE_INLINE_ T *get_or_null(const RID &p_rid) {
+ return alloc.get_or_null(p_rid);
}
_FORCE_INLINE_ bool owns(const RID &p_rid) {
diff --git a/core/templates/safe_list.h b/core/templates/safe_list.h
new file mode 100644
index 0000000000..d8f010663b
--- /dev/null
+++ b/core/templates/safe_list.h
@@ -0,0 +1,375 @@
+/*************************************************************************/
+/* safe_list.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef SAFE_LIST_H
+#define SAFE_LIST_H
+
+#include "core/os/memory.h"
+#include "core/typedefs.h"
+#include <functional>
+
+#if !defined(NO_THREADS)
+
+#include <atomic>
+#include <type_traits>
+
+// Design goals for these classes:
+// - Accessing this list with an iterator will never result in a use-after free,
+// even if the element being accessed has been logically removed from the list on
+// another thread.
+// - Logical deletion from the list will not result in deallocation at that time,
+// instead the node will be deallocated at a later time when it is safe to do so.
+// - No blocking synchronization primitives will be used.
+
+// This is used in very specific areas of the engine where it's critical that these guarantees are held.
+
+template <class T, class A = DefaultAllocator>
+class SafeList {
+ struct SafeListNode {
+ std::atomic<SafeListNode *> next = nullptr;
+
+ // If the node is logically deleted, this pointer will typically point
+ // to the previous list item in time that was also logically deleted.
+ std::atomic<SafeListNode *> graveyard_next = nullptr;
+
+ std::function<void(T)> deletion_fn = [](T t) { return; };
+
+ T val;
+ };
+
+ static_assert(std::atomic<T>::is_always_lock_free);
+
+ std::atomic<SafeListNode *> head = nullptr;
+ std::atomic<SafeListNode *> graveyard_head = nullptr;
+
+ std::atomic_uint active_iterator_count = 0;
+
+public:
+ class Iterator {
+ friend class SafeList;
+
+ SafeListNode *cursor;
+ SafeList *list;
+
+ Iterator(SafeListNode *p_cursor, SafeList *p_list) :
+ cursor(p_cursor), list(p_list) {
+ list->active_iterator_count++;
+ }
+
+ public:
+ Iterator(const Iterator &p_other) :
+ cursor(p_other.cursor), list(p_other.list) {
+ list->active_iterator_count++;
+ }
+
+ ~Iterator() {
+ list->active_iterator_count--;
+ }
+
+ public:
+ T &operator*() {
+ return cursor->val;
+ }
+
+ Iterator &operator++() {
+ cursor = cursor->next;
+ return *this;
+ }
+
+ // These two operators are mostly useful for comparisons to nullptr.
+ bool operator==(const void *p_other) const {
+ return cursor == p_other;
+ }
+
+ bool operator!=(const void *p_other) const {
+ return cursor != p_other;
+ }
+
+ // These two allow easy range-based for loops.
+ bool operator==(const Iterator &p_other) const {
+ return cursor == p_other.cursor;
+ }
+
+ bool operator!=(const Iterator &p_other) const {
+ return cursor != p_other.cursor;
+ }
+ };
+
+public:
+ // Calling this will cause an allocation.
+ void insert(T p_value) {
+ SafeListNode *new_node = memnew_allocator(SafeListNode, A);
+ new_node->val = p_value;
+ SafeListNode *expected_head = nullptr;
+ do {
+ expected_head = head.load();
+ new_node->next.store(expected_head);
+ } while (!head.compare_exchange_strong(/* expected= */ expected_head, /* new= */ new_node));
+ }
+
+ Iterator find(T p_value) {
+ for (Iterator it = begin(); it != end(); ++it) {
+ if (*it == p_value) {
+ return it;
+ }
+ }
+ return end();
+ }
+
+ void erase(T p_value, std::function<void(T)> p_deletion_fn) {
+ Iterator tmp = find(p_value);
+ erase(tmp, p_deletion_fn);
+ }
+
+ void erase(T p_value) {
+ Iterator tmp = find(p_value);
+ erase(tmp, [](T t) { return; });
+ }
+
+ void erase(Iterator &p_iterator, std::function<void(T)> p_deletion_fn) {
+ p_iterator.cursor->deletion_fn = p_deletion_fn;
+ erase(p_iterator);
+ }
+
+ void erase(Iterator &p_iterator) {
+ if (find(p_iterator.cursor->val) == nullptr) {
+ // Not in the list, nothing to do.
+ return;
+ }
+ // First, remove the node from the list.
+ while (true) {
+ Iterator prev = begin();
+ SafeListNode *expected_head = prev.cursor;
+ for (; prev != end(); ++prev) {
+ if (prev.cursor && prev.cursor->next == p_iterator.cursor) {
+ break;
+ }
+ }
+ if (prev != end()) {
+ // There exists a node before this.
+ prev.cursor->next.store(p_iterator.cursor->next.load());
+ // Done.
+ break;
+ } else {
+ if (head.compare_exchange_strong(/* expected= */ expected_head, /* new= */ p_iterator.cursor->next.load())) {
+ // Successfully reassigned the head pointer before another thread changed it to something else.
+ break;
+ }
+ // Fall through upon failure, try again.
+ }
+ }
+ // Then queue it for deletion by putting it in the node graveyard.
+ // Don't touch `next` because an iterator might still be pointing at this node.
+ SafeListNode *expected_head = nullptr;
+ do {
+ expected_head = graveyard_head.load();
+ p_iterator.cursor->graveyard_next.store(expected_head);
+ } while (!graveyard_head.compare_exchange_strong(/* expected= */ expected_head, /* new= */ p_iterator.cursor));
+ }
+
+ Iterator begin() {
+ return Iterator(head.load(), this);
+ }
+
+ Iterator end() {
+ return Iterator(nullptr, this);
+ }
+
+ // Calling this will cause zero to many deallocations.
+ void maybe_cleanup() {
+ SafeListNode *cursor = nullptr;
+ SafeListNode *new_graveyard_head = nullptr;
+ do {
+ // The access order here is theoretically important.
+ cursor = graveyard_head.load();
+ if (active_iterator_count.load() != 0) {
+ // It's not safe to clean up with an active iterator, because that iterator
+ // could be pointing to an element that we want to delete.
+ return;
+ }
+ // Any iterator created after this point will never point to a deleted node.
+ // Swap it out with the current graveyard head.
+ } while (!graveyard_head.compare_exchange_strong(/* expected= */ cursor, /* new= */ new_graveyard_head));
+ // Our graveyard list is now unreachable by any active iterators,
+ // detached from the main graveyard head and ready for deletion.
+ while (cursor) {
+ SafeListNode *tmp = cursor;
+ cursor = cursor->graveyard_next;
+ tmp->deletion_fn(tmp->val);
+ memdelete_allocator<SafeListNode, A>(tmp);
+ }
+ }
+};
+
+#else // NO_THREADS
+
+// Effectively the same structure without the atomics. It's probably possible to simplify it but the semantics shouldn't differ greatly.
+template <class T, class A = DefaultAllocator>
+class SafeList {
+ struct SafeListNode {
+ SafeListNode *next = nullptr;
+
+ // If the node is logically deleted, this pointer will typically point to the previous list item in time that was also logically deleted.
+ SafeListNode *graveyard_next = nullptr;
+
+ std::function<void(T)> deletion_fn = [](T t) { return; };
+
+ T val;
+ };
+
+ SafeListNode *head = nullptr;
+ SafeListNode *graveyard_head = nullptr;
+
+ unsigned int active_iterator_count = 0;
+
+public:
+ class Iterator {
+ friend class SafeList;
+
+ SafeListNode *cursor;
+ SafeList *list;
+
+ public:
+ Iterator(SafeListNode *p_cursor, SafeList *p_list) :
+ cursor(p_cursor), list(p_list) {
+ list->active_iterator_count++;
+ }
+
+ ~Iterator() {
+ list->active_iterator_count--;
+ }
+
+ T &operator*() {
+ return cursor->val;
+ }
+
+ Iterator &operator++() {
+ cursor = cursor->next;
+ return *this;
+ }
+
+ // These two operators are mostly useful for comparisons to nullptr.
+ bool operator==(const void *p_other) const {
+ return cursor == p_other;
+ }
+
+ bool operator!=(const void *p_other) const {
+ return cursor != p_other;
+ }
+
+ // These two allow easy range-based for loops.
+ bool operator==(const Iterator &p_other) const {
+ return cursor == p_other.cursor;
+ }
+
+ bool operator!=(const Iterator &p_other) const {
+ return cursor != p_other.cursor;
+ }
+ };
+
+public:
+ // Calling this will cause an allocation.
+ void insert(T p_value) {
+ SafeListNode *new_node = memnew_allocator(SafeListNode, A);
+ new_node->val = p_value;
+ new_node->next = head;
+ head = new_node;
+ }
+
+ Iterator find(T p_value) {
+ for (Iterator it = begin(); it != end(); ++it) {
+ if (*it == p_value) {
+ return it;
+ }
+ }
+ return end();
+ }
+
+ void erase(T p_value, std::function<void(T)> p_deletion_fn) {
+ erase(find(p_value), p_deletion_fn);
+ }
+
+ void erase(T p_value) {
+ erase(find(p_value), [](T t) { return; });
+ }
+
+ void erase(Iterator p_iterator, std::function<void(T)> p_deletion_fn) {
+ p_iterator.cursor->deletion_fn = p_deletion_fn;
+ erase(p_iterator);
+ }
+
+ void erase(Iterator p_iterator) {
+ Iterator prev = begin();
+ for (; prev != end(); ++prev) {
+ if (prev.cursor && prev.cursor->next == p_iterator.cursor) {
+ break;
+ }
+ }
+ if (prev == end()) {
+ // Not in the list, nothing to do.
+ return;
+ }
+ // First, remove the node from the list.
+ prev.cursor->next = p_iterator.cursor->next;
+
+ // Then queue it for deletion by putting it in the node graveyard. Don't touch `next` because an iterator might still be pointing at this node.
+ p_iterator.cursor->graveyard_next = graveyard_head;
+ graveyard_head = p_iterator.cursor;
+ }
+
+ Iterator begin() {
+ return Iterator(head, this);
+ }
+
+ Iterator end() {
+ return Iterator(nullptr, this);
+ }
+
+ // Calling this will cause zero to many deallocations.
+ void maybe_cleanup() {
+ SafeListNode *cursor = graveyard_head;
+ if (active_iterator_count != 0) {
+ // It's not safe to clean up with an active iterator, because that iterator could be pointing to an element that we want to delete.
+ return;
+ }
+ graveyard_head = nullptr;
+ // Our graveyard list is now unreachable by any active iterators, detached from the main graveyard head and ready for deletion.
+ while (cursor) {
+ SafeListNode *tmp = cursor;
+ cursor = cursor->next;
+ tmp->deletion_fn(tmp->val);
+ memdelete_allocator<SafeListNode, A>(tmp);
+ }
+ }
+};
+
+#endif
+
+#endif // SAFE_LIST_H
diff --git a/core/templates/set.h b/core/templates/set.h
index 9261d2d3d2..0a80ceefb5 100644
--- a/core/templates/set.h
+++ b/core/templates/set.h
@@ -35,7 +35,7 @@
#include "core/typedefs.h"
// based on the very nice implementation of rb-trees by:
-// https://web.archive.org/web/20120507164830/http://web.mit.edu/~emin/www/source_code/red_black_tree/index.html
+// https://web.archive.org/web/20120507164830/https://web.mit.edu/~emin/www/source_code/red_black_tree/index.html
template <class T, class C = Comparator<T>, class A = DefaultAllocator>
class Set {
diff --git a/core/templates/vector.h b/core/templates/vector.h
index 08cbef6ba4..2600604eb7 100644
--- a/core/templates/vector.h
+++ b/core/templates/vector.h
@@ -92,7 +92,7 @@ public:
void append_array(Vector<T> p_other);
- bool has(const T &p_val) {
+ bool has(const T &p_val) const {
return find(p_val, 0) != -1;
}
@@ -229,7 +229,7 @@ public:
_FORCE_INLINE_ bool operator==(const ConstIterator &b) const { return elem_ptr == b.elem_ptr; }
_FORCE_INLINE_ bool operator!=(const ConstIterator &b) const { return elem_ptr != b.elem_ptr; }
- ConstIterator(T *p_ptr) { elem_ptr = p_ptr; }
+ ConstIterator(const T *p_ptr) { elem_ptr = p_ptr; }
ConstIterator() {}
ConstIterator(const ConstIterator &p_it) { elem_ptr = p_it.elem_ptr; }
diff --git a/core/variant/array.cpp b/core/variant/array.cpp
index 09cf785390..8373cbd4e8 100644
--- a/core/variant/array.cpp
+++ b/core/variant/array.cpp
@@ -203,9 +203,9 @@ Error Array::resize(int p_new_size) {
return _p->array.resize(p_new_size);
}
-void Array::insert(int p_pos, const Variant &p_value) {
- ERR_FAIL_COND(!_p->typed.validate(p_value, "insert"));
- _p->array.insert(p_pos, p_value);
+Error Array::insert(int p_pos, const Variant &p_value) {
+ ERR_FAIL_COND_V(!_p->typed.validate(p_value, "insert"), ERR_INVALID_PARAMETER);
+ return _p->array.insert(p_pos, p_value);
}
void Array::fill(const Variant &p_value) {
@@ -535,8 +535,8 @@ void Array::push_front(const Variant &p_value) {
Variant Array::pop_back() {
if (!_p->array.is_empty()) {
- int n = _p->array.size() - 1;
- Variant ret = _p->array.get(n);
+ const int n = _p->array.size() - 1;
+ const Variant ret = _p->array.get(n);
_p->array.resize(n);
return ret;
}
@@ -545,13 +545,38 @@ Variant Array::pop_back() {
Variant Array::pop_front() {
if (!_p->array.is_empty()) {
- Variant ret = _p->array.get(0);
+ const Variant ret = _p->array.get(0);
_p->array.remove(0);
return ret;
}
return Variant();
}
+Variant Array::pop_at(int p_pos) {
+ if (_p->array.is_empty()) {
+ // Return `null` without printing an error to mimic `pop_back()` and `pop_front()` behavior.
+ return Variant();
+ }
+
+ if (p_pos < 0) {
+ // Relative offset from the end
+ p_pos = _p->array.size() + p_pos;
+ }
+
+ ERR_FAIL_INDEX_V_MSG(
+ p_pos,
+ _p->array.size(),
+ Variant(),
+ vformat(
+ "The calculated index %s is out of bounds (the array has %s elements). Leaving the array untouched and returning `null`.",
+ p_pos,
+ _p->array.size()));
+
+ const Variant ret = _p->array.get(p_pos);
+ _p->array.remove(p_pos);
+ return ret;
+}
+
Variant Array::min() const {
Variant minval;
for (int i = 0; i < size(); i++) {
diff --git a/core/variant/array.h b/core/variant/array.h
index 540dcb1f4e..4a1b25c4a9 100644
--- a/core/variant/array.h
+++ b/core/variant/array.h
@@ -72,7 +72,7 @@ public:
void append_array(const Array &p_array);
Error resize(int p_new_size);
- void insert(int p_pos, const Variant &p_value);
+ Error insert(int p_pos, const Variant &p_value);
void remove(int p_pos);
void fill(const Variant &p_value);
@@ -97,6 +97,7 @@ public:
void push_front(const Variant &p_value);
Variant pop_back();
Variant pop_front();
+ Variant pop_at(int p_pos);
Array duplicate(bool p_deep = false) const;
diff --git a/core/variant/callable.cpp b/core/variant/callable.cpp
index f487e718f4..dcded6e61f 100644
--- a/core/variant/callable.cpp
+++ b/core/variant/callable.cpp
@@ -377,11 +377,11 @@ Error Signal::emit(const Variant **p_arguments, int p_argcount) const {
return obj->emit_signal(name, p_arguments, p_argcount);
}
-Error Signal::connect(const Callable &p_callable, const Vector<Variant> &p_binds, uint32_t p_flags) {
+Error Signal::connect(const Callable &p_callable, uint32_t p_flags) {
Object *object = get_object();
ERR_FAIL_COND_V(!object, ERR_UNCONFIGURED);
- return object->connect(name, p_callable, p_binds, p_flags);
+ return object->connect(name, p_callable, varray(), p_flags);
}
void Signal::disconnect(const Callable &p_callable) {
diff --git a/core/variant/callable.h b/core/variant/callable.h
index 52094af3aa..de886492ea 100644
--- a/core/variant/callable.h
+++ b/core/variant/callable.h
@@ -159,7 +159,7 @@ public:
operator String() const;
Error emit(const Variant **p_arguments, int p_argcount) const;
- Error connect(const Callable &p_callable, const Vector<Variant> &p_binds = Vector<Variant>(), uint32_t p_flags = 0);
+ Error connect(const Callable &p_callable, uint32_t p_flags = 0);
void disconnect(const Callable &p_callable);
bool is_connected(const Callable &p_callable) const;
diff --git a/core/variant/callable_bind.cpp b/core/variant/callable_bind.cpp
index 10446a5ec1..56eda6e703 100644
--- a/core/variant/callable_bind.cpp
+++ b/core/variant/callable_bind.cpp
@@ -169,7 +169,8 @@ CallableCustomUnbind::~CallableCustomUnbind() {
}
Callable callable_bind(const Callable &p_callable, const Variant &p_arg1) {
- return p_callable.bind((const Variant **)&p_arg1, 1);
+ const Variant *args[1] = { &p_arg1 };
+ return p_callable.bind(args, 1);
}
Callable callable_bind(const Callable &p_callable, const Variant &p_arg1, const Variant &p_arg2) {
diff --git a/core/variant/method_ptrcall.h b/core/variant/method_ptrcall.h
index 8836e257a9..98304621f2 100644
--- a/core/variant/method_ptrcall.h
+++ b/core/variant/method_ptrcall.h
@@ -191,6 +191,7 @@ struct PtrToArg<ObjectID> {
// This is for the special cases used by Variant.
+// No EncodeT because direct pointer conversion not possible.
#define MAKE_VECARG(m_type) \
template <> \
struct PtrToArg<Vector<m_type>> { \
@@ -236,6 +237,7 @@ struct PtrToArg<ObjectID> {
} \
}
+// No EncodeT because direct pointer conversion not possible.
#define MAKE_VECARG_ALT(m_type, m_type_alt) \
template <> \
struct PtrToArg<Vector<m_type_alt>> { \
@@ -285,6 +287,7 @@ MAKE_VECARG_ALT(String, StringName);
// For stuff that gets converted to Array vectors.
+// No EncodeT because direct pointer conversion not possible.
#define MAKE_VECARR(m_type) \
template <> \
struct PtrToArg<Vector<m_type>> { \
@@ -325,6 +328,7 @@ MAKE_VECARR(Variant);
MAKE_VECARR(RID);
MAKE_VECARR(Plane);
+// No EncodeT because direct pointer conversion not possible.
#define MAKE_DVECARR(m_type) \
template <> \
struct PtrToArg<Vector<m_type>> { \
@@ -372,6 +376,7 @@ MAKE_VECARR(Plane);
// Special case for IPAddress.
+// No EncodeT because direct pointer conversion not possible.
#define MAKE_STRINGCONV_BY_REFERENCE(m_type) \
template <> \
struct PtrToArg<m_type> { \
@@ -395,6 +400,7 @@ MAKE_VECARR(Plane);
MAKE_STRINGCONV_BY_REFERENCE(IPAddress);
+// No EncodeT because direct pointer conversion not possible.
template <>
struct PtrToArg<Vector<Face3>> {
_FORCE_INLINE_ static Vector<Face3> convert(const void *p_ptr) {
@@ -429,6 +435,7 @@ struct PtrToArg<Vector<Face3>> {
}
};
+// No EncodeT because direct pointer conversion not possible.
template <>
struct PtrToArg<const Vector<Face3> &> {
_FORCE_INLINE_ static Vector<Face3> convert(const void *p_ptr) {
diff --git a/core/variant/native_ptr.h b/core/variant/native_ptr.h
new file mode 100644
index 0000000000..913d4d8f7c
--- /dev/null
+++ b/core/variant/native_ptr.h
@@ -0,0 +1,131 @@
+/*************************************************************************/
+/* native_ptr.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef NATIVE_PTR_H
+#define NATIVE_PTR_H
+
+#include "core/math/audio_frame.h"
+#include "core/variant/method_ptrcall.h"
+#include "core/variant/type_info.h"
+
+template <class T>
+struct GDNativeConstPtr {
+ const T *data = nullptr;
+ GDNativeConstPtr(const T *p_assign) { data = p_assign; }
+ static const char *get_name() { return "const void"; }
+ operator const T *() const { return data; }
+ operator Variant() const { return uint64_t(data); }
+};
+
+template <class T>
+struct GDNativePtr {
+ T *data = nullptr;
+ GDNativePtr(T *p_assign) { data = p_assign; }
+ static const char *get_name() { return "void"; }
+ operator T *() const { return data; }
+ operator Variant() const { return uint64_t(data); }
+};
+
+#define GDVIRTUAL_NATIVE_PTR(m_type) \
+ template <> \
+ struct GDNativeConstPtr<const m_type> { \
+ const m_type *data = nullptr; \
+ GDNativeConstPtr(const m_type *p_assign) { data = p_assign; } \
+ static const char *get_name() { return "const " #m_type; } \
+ operator const m_type *() const { return data; } \
+ operator Variant() const { return uint64_t(data); } \
+ }; \
+ template <> \
+ struct GDNativePtr<m_type> { \
+ m_type *data = nullptr; \
+ GDNativePtr(m_type *p_assign) { data = p_assign; } \
+ static const char *get_name() { return #m_type; } \
+ operator m_type *() const { return data; } \
+ operator Variant() const { return uint64_t(data); } \
+ };
+
+template <class T>
+struct GetTypeInfo<GDNativeConstPtr<T>> {
+ static const Variant::Type VARIANT_TYPE = Variant::NIL;
+ static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_NONE;
+ static inline PropertyInfo get_class_info() {
+ return PropertyInfo(Variant::INT, String(), PROPERTY_HINT_INT_IS_POINTER, GDNativeConstPtr<T>::get_name());
+ }
+};
+
+template <class T>
+struct GetTypeInfo<GDNativePtr<T>> {
+ static const Variant::Type VARIANT_TYPE = Variant::NIL;
+ static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_NONE;
+ static inline PropertyInfo get_class_info() {
+ return PropertyInfo(Variant::INT, String(), PROPERTY_HINT_INT_IS_POINTER, GDNativePtr<T>::get_name());
+ }
+};
+
+template <class T>
+struct PtrToArg<GDNativeConstPtr<T>> {
+ _FORCE_INLINE_ static GDNativeConstPtr<T> convert(const void *p_ptr) {
+ return GDNativeConstPtr<T>(reinterpret_cast<const T *>(p_ptr));
+ }
+ typedef const T *EncodeT;
+ _FORCE_INLINE_ static void encode(GDNativeConstPtr<T> p_val, void *p_ptr) {
+ *((const T **)p_ptr) = p_val.data;
+ }
+};
+template <class T>
+struct PtrToArg<GDNativePtr<T>> {
+ _FORCE_INLINE_ static GDNativePtr<T> convert(const void *p_ptr) {
+ return GDNativePtr<T>(reinterpret_cast<const T *>(p_ptr));
+ }
+ typedef T *EncodeT;
+ _FORCE_INLINE_ static void encode(GDNativePtr<T> p_val, void *p_ptr) {
+ *((T **)p_ptr) = p_val.data;
+ }
+};
+
+GDVIRTUAL_NATIVE_PTR(AudioFrame)
+GDVIRTUAL_NATIVE_PTR(bool)
+GDVIRTUAL_NATIVE_PTR(char)
+GDVIRTUAL_NATIVE_PTR(char16_t)
+GDVIRTUAL_NATIVE_PTR(char32_t)
+GDVIRTUAL_NATIVE_PTR(wchar_t)
+GDVIRTUAL_NATIVE_PTR(uint8_t)
+GDVIRTUAL_NATIVE_PTR(uint8_t *)
+GDVIRTUAL_NATIVE_PTR(int8_t)
+GDVIRTUAL_NATIVE_PTR(uint16_t)
+GDVIRTUAL_NATIVE_PTR(int16_t)
+GDVIRTUAL_NATIVE_PTR(uint32_t)
+GDVIRTUAL_NATIVE_PTR(int32_t)
+GDVIRTUAL_NATIVE_PTR(int64_t)
+GDVIRTUAL_NATIVE_PTR(uint64_t)
+GDVIRTUAL_NATIVE_PTR(float)
+GDVIRTUAL_NATIVE_PTR(double)
+
+#endif // NATIVE_PTR_H
diff --git a/core/variant/type_info.h b/core/variant/type_info.h
index 76cb065d10..b70d29bbac 100644
--- a/core/variant/type_info.h
+++ b/core/variant/type_info.h
@@ -241,14 +241,27 @@ struct GetTypeInfo<const T *, typename EnableIf<TypeInherits<Object, T>::value>:
}
};
-#define TEMPL_MAKE_ENUM_TYPE_INFO(m_enum, m_impl) \
- template <> \
- struct GetTypeInfo<m_impl> { \
- static const Variant::Type VARIANT_TYPE = Variant::INT; \
- static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_NONE; \
- static inline PropertyInfo get_class_info() { \
- return PropertyInfo(Variant::INT, String(), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_CLASS_IS_ENUM, String(#m_enum).replace("::", ".")); \
- } \
+namespace godot {
+namespace details {
+inline String enum_qualified_name_to_class_info_name(const String &p_qualified_name) {
+ Vector<String> parts = p_qualified_name.split("::", false);
+ if (parts.size() <= 2)
+ return String(".").join(parts);
+ // Contains namespace. We only want the class and enum names.
+ return parts[parts.size() - 2] + "." + parts[parts.size() - 1];
+}
+} // namespace details
+} // namespace godot
+
+#define TEMPL_MAKE_ENUM_TYPE_INFO(m_enum, m_impl) \
+ template <> \
+ struct GetTypeInfo<m_impl> { \
+ static const Variant::Type VARIANT_TYPE = Variant::INT; \
+ static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_NONE; \
+ static inline PropertyInfo get_class_info() { \
+ return PropertyInfo(Variant::INT, String(), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_CLASS_IS_ENUM, \
+ godot::details::enum_qualified_name_to_class_info_name(String(#m_enum))); \
+ } \
};
#define MAKE_ENUM_TYPE_INFO(m_enum) \
diff --git a/core/variant/typed_array.h b/core/variant/typed_array.h
index 900dcf7689..2e96f4e445 100644
--- a/core/variant/typed_array.h
+++ b/core/variant/typed_array.h
@@ -125,7 +125,7 @@ struct PtrToArg<TypedArray<T>> {
_FORCE_INLINE_ static TypedArray<T> convert(const void *p_ptr) {
return TypedArray<T>(*reinterpret_cast<const Array *>(p_ptr));
}
-
+ typedef Array EncodeT;
_FORCE_INLINE_ static void encode(TypedArray<T> p_val, void *p_ptr) {
*(Array *)p_ptr = p_val;
}
@@ -133,13 +133,13 @@ struct PtrToArg<TypedArray<T>> {
template <class T>
struct PtrToArg<const TypedArray<T> &> {
- _FORCE_INLINE_ static TypedArray<T> convert(const void *p_ptr) {
+ typedef Array EncodeT;
+ _FORCE_INLINE_ static TypedArray<T>
+ convert(const void *p_ptr) {
return TypedArray<T>(*reinterpret_cast<const Array *>(p_ptr));
}
};
-#ifdef DEBUG_METHODS_ENABLED
-
template <class T>
struct GetTypeInfo<TypedArray<T>> {
static const Variant::Type VARIANT_TYPE = Variant::ARRAY;
@@ -218,6 +218,4 @@ MAKE_TYPED_ARRAY_INFO(Vector<Vector2>, Variant::PACKED_VECTOR2_ARRAY)
MAKE_TYPED_ARRAY_INFO(Vector<Vector3>, Variant::PACKED_VECTOR3_ARRAY)
MAKE_TYPED_ARRAY_INFO(Vector<Color>, Variant::PACKED_COLOR_ARRAY)
-#endif
-
#endif // TYPED_ARRAY_H
diff --git a/core/variant/variant.cpp b/core/variant/variant.cpp
index d538b9faff..0dbeb6e4cb 100644
--- a/core/variant/variant.cpp
+++ b/core/variant/variant.cpp
@@ -1627,9 +1627,9 @@ Variant::operator String() const {
String Variant::stringify(List<const void *> &stack) const {
switch (type) {
case NIL:
- return "Null";
+ return "null";
case BOOL:
- return _data._bool ? "True" : "False";
+ return _data._bool ? "true" : "false";
case INT:
return itos(_data._int);
case FLOAT:
@@ -2832,7 +2832,7 @@ uint32_t Variant::hash() const {
return _data._bool ? 1 : 0;
} break;
case INT: {
- return _data._int;
+ return hash_one_uint64((uint64_t)_data._int);
} break;
case FLOAT: {
return hash_djb2_one_float(_data._float);
@@ -2847,8 +2847,8 @@ uint32_t Variant::hash() const {
return hash_djb2_one_float(reinterpret_cast<const Vector2 *>(_data._mem)->y, hash);
} break;
case VECTOR2I: {
- uint32_t hash = hash_djb2_one_32(reinterpret_cast<const Vector2i *>(_data._mem)->x);
- return hash_djb2_one_32(reinterpret_cast<const Vector2i *>(_data._mem)->y, hash);
+ uint32_t hash = hash_djb2_one_32((uint32_t) reinterpret_cast<const Vector2i *>(_data._mem)->x);
+ return hash_djb2_one_32((uint32_t) reinterpret_cast<const Vector2i *>(_data._mem)->y, hash);
} break;
case RECT2: {
uint32_t hash = hash_djb2_one_float(reinterpret_cast<const Rect2 *>(_data._mem)->position.x);
@@ -2857,10 +2857,10 @@ uint32_t Variant::hash() const {
return hash_djb2_one_float(reinterpret_cast<const Rect2 *>(_data._mem)->size.y, hash);
} break;
case RECT2I: {
- uint32_t hash = hash_djb2_one_32(reinterpret_cast<const Rect2i *>(_data._mem)->position.x);
- hash = hash_djb2_one_32(reinterpret_cast<const Rect2i *>(_data._mem)->position.y, hash);
- hash = hash_djb2_one_32(reinterpret_cast<const Rect2i *>(_data._mem)->size.x, hash);
- return hash_djb2_one_32(reinterpret_cast<const Rect2i *>(_data._mem)->size.y, hash);
+ uint32_t hash = hash_djb2_one_32((uint32_t) reinterpret_cast<const Rect2i *>(_data._mem)->position.x);
+ hash = hash_djb2_one_32((uint32_t) reinterpret_cast<const Rect2i *>(_data._mem)->position.y, hash);
+ hash = hash_djb2_one_32((uint32_t) reinterpret_cast<const Rect2i *>(_data._mem)->size.x, hash);
+ return hash_djb2_one_32((uint32_t) reinterpret_cast<const Rect2i *>(_data._mem)->size.y, hash);
} break;
case TRANSFORM2D: {
uint32_t hash = 5831;
@@ -2878,9 +2878,9 @@ uint32_t Variant::hash() const {
return hash_djb2_one_float(reinterpret_cast<const Vector3 *>(_data._mem)->z, hash);
} break;
case VECTOR3I: {
- uint32_t hash = hash_djb2_one_32(reinterpret_cast<const Vector3i *>(_data._mem)->x);
- hash = hash_djb2_one_32(reinterpret_cast<const Vector3i *>(_data._mem)->y, hash);
- return hash_djb2_one_32(reinterpret_cast<const Vector3i *>(_data._mem)->z, hash);
+ uint32_t hash = hash_djb2_one_32((uint32_t) reinterpret_cast<const Vector3i *>(_data._mem)->x);
+ hash = hash_djb2_one_32((uint32_t) reinterpret_cast<const Vector3i *>(_data._mem)->y, hash);
+ return hash_djb2_one_32((uint32_t) reinterpret_cast<const Vector3i *>(_data._mem)->z, hash);
} break;
case PLANE: {
uint32_t hash = hash_djb2_one_float(reinterpret_cast<const Plane *>(_data._mem)->normal.x);
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index c3481d4896..32d6778a2b 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -1421,7 +1421,8 @@ static void _register_variant_builtin_methods() {
//bind_method(String, humanize_size, sarray("size"), varray());
bind_method(String, is_absolute_path, sarray(), varray());
- bind_method(String, is_rel_path, sarray(), varray());
+ bind_method(String, is_relative_path, sarray(), varray());
+ bind_method(String, simplify_path, sarray(), varray());
bind_method(String, get_base_dir, sarray(), varray());
bind_method(String, get_file, sarray(), varray());
bind_method(String, xml_escape, sarray("escape_quotes"), varray(false));
@@ -1501,6 +1502,8 @@ static void _register_variant_builtin_methods() {
bind_method(Vector2, clamp, sarray("min", "max"), varray());
bind_method(Vector2, snapped, sarray("step"), varray());
+ bind_static_method(Vector2, from_angle, sarray("angle"), varray());
+
/* Vector2i */
bind_method(Vector2i, aspect, sarray(), varray());
@@ -1510,6 +1513,7 @@ static void _register_variant_builtin_methods() {
/* Rect2 */
+ bind_method(Rect2, get_center, sarray(), varray());
bind_method(Rect2, get_area, sarray(), varray());
bind_method(Rect2, has_no_area, sarray(), varray());
bind_method(Rect2, has_point, sarray("point"), varray());
@@ -1526,6 +1530,7 @@ static void _register_variant_builtin_methods() {
/* Rect2i */
+ bind_method(Rect2i, get_center, sarray(), varray());
bind_method(Rect2i, get_area, sarray(), varray());
bind_method(Rect2i, has_no_area, sarray(), varray());
bind_method(Rect2i, has_point, sarray("point"), varray());
@@ -1565,7 +1570,6 @@ static void _register_variant_builtin_methods() {
bind_method(Vector3, dot, sarray("with"), varray());
bind_method(Vector3, cross, sarray("with"), varray());
bind_method(Vector3, outer, sarray("with"), varray());
- bind_method(Vector3, to_diagonal_matrix, sarray(), varray());
bind_method(Vector3, abs, sarray(), varray());
bind_method(Vector3, floor, sarray(), varray());
bind_method(Vector3, ceil, sarray(), varray());
@@ -1686,7 +1690,7 @@ static void _register_variant_builtin_methods() {
bind_method(Signal, get_object_id, sarray(), varray());
bind_method(Signal, get_name, sarray(), varray());
- bind_method(Signal, connect, sarray("callable", "binds", "flags"), varray(Array(), 0));
+ bind_method(Signal, connect, sarray("callable", "flags"), varray(0));
bind_method(Signal, disconnect, sarray("callable"), varray());
bind_method(Signal, is_connected, sarray("callable"), varray());
bind_method(Signal, get_connections, sarray(), varray());
@@ -1700,6 +1704,7 @@ static void _register_variant_builtin_methods() {
bind_method(Transform2D, get_rotation, sarray(), varray());
bind_method(Transform2D, get_origin, sarray(), varray());
bind_method(Transform2D, get_scale, sarray(), varray());
+ bind_method(Transform2D, get_skew, sarray(), varray());
bind_method(Transform2D, orthonormalized, sarray(), varray());
bind_method(Transform2D, rotated, sarray("phi"), varray());
bind_method(Transform2D, scaled, sarray("scale"), varray());
@@ -1709,6 +1714,8 @@ static void _register_variant_builtin_methods() {
bind_method(Transform2D, interpolate_with, sarray("xform", "weight"), varray());
bind_method(Transform2D, is_equal_approx, sarray("xform"), varray());
bind_method(Transform2D, set_rotation, sarray("rotation"), varray());
+ bind_method(Transform2D, set_scale, sarray("scale"), varray());
+ bind_method(Transform2D, set_skew, sarray("skew"), varray());
bind_method(Transform2D, looking_at, sarray("target"), varray(Vector2()));
/* Basis */
@@ -1729,10 +1736,12 @@ static void _register_variant_builtin_methods() {
bind_method(Basis, is_equal_approx, sarray("b"), varray());
bind_method(Basis, get_rotation_quaternion, sarray(), varray());
bind_static_method(Basis, looking_at, sarray("target", "up"), varray(Vector3(0, 1, 0)));
+ bind_static_method(Basis, from_scale, sarray("scale"), varray());
/* AABB */
bind_method(AABB, abs, sarray(), varray());
+ bind_method(AABB, get_center, sarray(), varray());
bind_method(AABB, get_area, sarray(), varray());
bind_method(AABB, has_no_area, sarray(), varray());
bind_method(AABB, has_no_surface, sarray(), varray());
@@ -1806,6 +1815,7 @@ static void _register_variant_builtin_methods() {
bind_method(Array, has, sarray("value"), varray());
bind_method(Array, pop_back, sarray(), varray());
bind_method(Array, pop_front, sarray(), varray());
+ bind_method(Array, pop_at, sarray("position"), varray());
bind_method(Array, sort, sarray(), varray());
bind_method(Array, sort_custom, sarray("func"), varray());
bind_method(Array, shuffle, sarray(), varray());
diff --git a/core/variant/variant_construct.cpp b/core/variant/variant_construct.cpp
index a1a2bec369..4317b9dc98 100644
--- a/core/variant/variant_construct.cpp
+++ b/core/variant/variant_construct.cpp
@@ -114,6 +114,7 @@ void Variant::_register_variant_constructors() {
add_constructor<VariantConstructNoArgs<Transform2D>>(sarray());
add_constructor<VariantConstructor<Transform2D, Transform2D>>(sarray("from"));
add_constructor<VariantConstructor<Transform2D, float, Vector2>>(sarray("rotation", "position"));
+ add_constructor<VariantConstructor<Transform2D, float, Size2, float, Vector2>>(sarray("rotation", "scale", "skew", "position"));
add_constructor<VariantConstructor<Transform2D, Vector2, Vector2, Vector2>>(sarray("x_axis", "y_axis", "origin"));
add_constructor<VariantConstructNoArgs<Plane>>(sarray());
diff --git a/core/variant/variant_internal.h b/core/variant/variant_internal.h
index 566b14736e..40c8a1bfde 100644
--- a/core/variant/variant_internal.h
+++ b/core/variant/variant_internal.h
@@ -104,7 +104,7 @@ public:
init_color_array(v);
break;
case Variant::OBJECT:
- object_assign_null(v);
+ init_object(v);
break;
default:
break;
@@ -280,6 +280,10 @@ public:
v->_data.packed_array = Variant::PackedArrayRef<Color>::create(Vector<Color>());
v->type = Variant::PACKED_COLOR_ARRAY;
}
+ _FORCE_INLINE_ static void init_object(Variant *v) {
+ object_assign_null(v);
+ v->type = Variant::OBJECT;
+ }
_FORCE_INLINE_ static void clear(Variant *v) {
v->clear();
@@ -1173,7 +1177,7 @@ struct VariantInitializer<PackedColorArray> {
template <>
struct VariantInitializer<Object *> {
- static _FORCE_INLINE_ void init(Variant *v) { VariantInternal::object_assign_null(v); }
+ static _FORCE_INLINE_ void init(Variant *v) { VariantInternal::init_object(v); }
};
template <class T>
@@ -1405,4 +1409,22 @@ struct VariantTypeConstructor {
}
};
+template <>
+struct VariantTypeConstructor<Object *> {
+ _FORCE_INLINE_ static void variant_from_type(void *p_variant, void *p_value) {
+ Variant *variant = reinterpret_cast<Variant *>(p_variant);
+ VariantInitializer<Object *>::init(variant);
+ Object *value = *(reinterpret_cast<Object **>(p_value));
+ if (value) {
+ VariantInternalAccessor<Object *>::set(variant, value);
+ VariantInternalAccessor<ObjectID>::set(variant, value->get_instance_id());
+ }
+ }
+
+ _FORCE_INLINE_ static void type_from_variant(void *p_value, void *p_variant) {
+ Object **value = reinterpret_cast<Object **>(p_value);
+ *value = VariantInternalAccessor<Object *>::get(reinterpret_cast<Variant *>(p_variant));
+ }
+};
+
#endif // VARIANT_INTERNAL_H
diff --git a/core/variant/variant_op.cpp b/core/variant/variant_op.cpp
index 16c7428781..b94588f480 100644
--- a/core/variant/variant_op.cpp
+++ b/core/variant/variant_op.cpp
@@ -171,7 +171,7 @@ void Variant::_register_variant_operators() {
register_op<OperatorEvaluatorDiv<Vector2, Vector2, double>>(Variant::OP_DIVIDE, Variant::VECTOR2, Variant::FLOAT);
register_op<OperatorEvaluatorDiv<Vector2, Vector2, int64_t>>(Variant::OP_DIVIDE, Variant::VECTOR2, Variant::INT);
- register_op<OperatorEvaluatorDiv<Vector2i, Vector2i, Vector2i>>(Variant::OP_DIVIDE, Variant::VECTOR2I, Variant::VECTOR2I);
+ register_op<OperatorEvaluatorDivNZ<Vector2i, Vector2i, Vector2i>>(Variant::OP_DIVIDE, Variant::VECTOR2I, Variant::VECTOR2I);
register_op<OperatorEvaluatorDivNZ<Vector2i, Vector2i, double>>(Variant::OP_DIVIDE, Variant::VECTOR2I, Variant::FLOAT);
register_op<OperatorEvaluatorDivNZ<Vector2i, Vector2i, int64_t>>(Variant::OP_DIVIDE, Variant::VECTOR2I, Variant::INT);
@@ -183,7 +183,7 @@ void Variant::_register_variant_operators() {
register_op<OperatorEvaluatorDiv<Vector3, Vector3, double>>(Variant::OP_DIVIDE, Variant::VECTOR3, Variant::FLOAT);
register_op<OperatorEvaluatorDiv<Vector3, Vector3, int64_t>>(Variant::OP_DIVIDE, Variant::VECTOR3, Variant::INT);
- register_op<OperatorEvaluatorDiv<Vector3i, Vector3i, Vector3i>>(Variant::OP_DIVIDE, Variant::VECTOR3I, Variant::VECTOR3I);
+ register_op<OperatorEvaluatorDivNZ<Vector3i, Vector3i, Vector3i>>(Variant::OP_DIVIDE, Variant::VECTOR3I, Variant::VECTOR3I);
register_op<OperatorEvaluatorDivNZ<Vector3i, Vector3i, double>>(Variant::OP_DIVIDE, Variant::VECTOR3I, Variant::FLOAT);
register_op<OperatorEvaluatorDivNZ<Vector3i, Vector3i, int64_t>>(Variant::OP_DIVIDE, Variant::VECTOR3I, Variant::INT);
@@ -195,10 +195,10 @@ void Variant::_register_variant_operators() {
register_op<OperatorEvaluatorDiv<Color, Color, int64_t>>(Variant::OP_DIVIDE, Variant::COLOR, Variant::INT);
register_op<OperatorEvaluatorModNZ<int64_t, int64_t, int64_t>>(Variant::OP_MODULE, Variant::INT, Variant::INT);
- register_op<OperatorEvaluatorMod<Vector2i, Vector2i, Vector2i>>(Variant::OP_MODULE, Variant::VECTOR2I, Variant::VECTOR2I);
+ register_op<OperatorEvaluatorModNZ<Vector2i, Vector2i, Vector2i>>(Variant::OP_MODULE, Variant::VECTOR2I, Variant::VECTOR2I);
register_op<OperatorEvaluatorModNZ<Vector2i, Vector2i, int64_t>>(Variant::OP_MODULE, Variant::VECTOR2I, Variant::INT);
- register_op<OperatorEvaluatorMod<Vector3i, Vector3i, Vector3i>>(Variant::OP_MODULE, Variant::VECTOR3I, Variant::VECTOR3I);
+ register_op<OperatorEvaluatorModNZ<Vector3i, Vector3i, Vector3i>>(Variant::OP_MODULE, Variant::VECTOR3I, Variant::VECTOR3I);
register_op<OperatorEvaluatorModNZ<Vector3i, Vector3i, int64_t>>(Variant::OP_MODULE, Variant::VECTOR3I, Variant::INT);
register_op<OperatorEvaluatorStringModNil>(Variant::OP_MODULE, Variant::STRING, Variant::NIL);
@@ -314,6 +314,74 @@ void Variant::_register_variant_operators() {
register_op<OperatorEvaluatorEqual<PackedVector3Array, PackedVector3Array>>(Variant::OP_EQUAL, Variant::PACKED_VECTOR3_ARRAY, Variant::PACKED_VECTOR3_ARRAY);
register_op<OperatorEvaluatorEqual<PackedColorArray, PackedColorArray>>(Variant::OP_EQUAL, Variant::PACKED_COLOR_ARRAY, Variant::PACKED_COLOR_ARRAY);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::BOOL, Variant::NIL>>(Variant::OP_EQUAL, Variant::BOOL, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::INT, Variant::NIL>>(Variant::OP_EQUAL, Variant::INT, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::FLOAT, Variant::NIL>>(Variant::OP_EQUAL, Variant::FLOAT, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::STRING, Variant::NIL>>(Variant::OP_EQUAL, Variant::STRING, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::VECTOR2, Variant::NIL>>(Variant::OP_EQUAL, Variant::VECTOR2, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::VECTOR2I, Variant::NIL>>(Variant::OP_EQUAL, Variant::VECTOR2I, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::RECT2, Variant::NIL>>(Variant::OP_EQUAL, Variant::RECT2, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::RECT2I, Variant::NIL>>(Variant::OP_EQUAL, Variant::RECT2I, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::VECTOR3, Variant::NIL>>(Variant::OP_EQUAL, Variant::VECTOR3, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::VECTOR3I, Variant::NIL>>(Variant::OP_EQUAL, Variant::VECTOR3I, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::TRANSFORM2D, Variant::NIL>>(Variant::OP_EQUAL, Variant::TRANSFORM2D, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::PLANE, Variant::NIL>>(Variant::OP_EQUAL, Variant::PLANE, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::QUATERNION, Variant::NIL>>(Variant::OP_EQUAL, Variant::QUATERNION, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::AABB, Variant::NIL>>(Variant::OP_EQUAL, Variant::AABB, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::BASIS, Variant::NIL>>(Variant::OP_EQUAL, Variant::BASIS, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::TRANSFORM3D, Variant::NIL>>(Variant::OP_EQUAL, Variant::TRANSFORM3D, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::COLOR, Variant::NIL>>(Variant::OP_EQUAL, Variant::COLOR, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::STRING_NAME, Variant::NIL>>(Variant::OP_EQUAL, Variant::STRING_NAME, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NODE_PATH, Variant::NIL>>(Variant::OP_EQUAL, Variant::NODE_PATH, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::RID, Variant::NIL>>(Variant::OP_EQUAL, Variant::RID, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::CALLABLE, Variant::NIL>>(Variant::OP_EQUAL, Variant::CALLABLE, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::SIGNAL, Variant::NIL>>(Variant::OP_EQUAL, Variant::SIGNAL, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::DICTIONARY, Variant::NIL>>(Variant::OP_EQUAL, Variant::DICTIONARY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::ARRAY, Variant::NIL>>(Variant::OP_EQUAL, Variant::ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::PACKED_BYTE_ARRAY, Variant::NIL>>(Variant::OP_EQUAL, Variant::PACKED_BYTE_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::PACKED_INT32_ARRAY, Variant::NIL>>(Variant::OP_EQUAL, Variant::PACKED_INT32_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::PACKED_INT64_ARRAY, Variant::NIL>>(Variant::OP_EQUAL, Variant::PACKED_INT64_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::PACKED_FLOAT32_ARRAY, Variant::NIL>>(Variant::OP_EQUAL, Variant::PACKED_FLOAT32_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::PACKED_FLOAT64_ARRAY, Variant::NIL>>(Variant::OP_EQUAL, Variant::PACKED_FLOAT64_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::PACKED_STRING_ARRAY, Variant::NIL>>(Variant::OP_EQUAL, Variant::PACKED_STRING_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::PACKED_VECTOR2_ARRAY, Variant::NIL>>(Variant::OP_EQUAL, Variant::PACKED_VECTOR2_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::PACKED_VECTOR3_ARRAY, Variant::NIL>>(Variant::OP_EQUAL, Variant::PACKED_VECTOR3_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::PACKED_COLOR_ARRAY, Variant::NIL>>(Variant::OP_EQUAL, Variant::PACKED_COLOR_ARRAY, Variant::NIL);
+
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::BOOL>>(Variant::OP_EQUAL, Variant::NIL, Variant::BOOL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::INT>>(Variant::OP_EQUAL, Variant::NIL, Variant::INT);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::FLOAT>>(Variant::OP_EQUAL, Variant::NIL, Variant::FLOAT);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::STRING>>(Variant::OP_EQUAL, Variant::NIL, Variant::STRING);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::VECTOR2>>(Variant::OP_EQUAL, Variant::NIL, Variant::VECTOR2);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::VECTOR2I>>(Variant::OP_EQUAL, Variant::NIL, Variant::VECTOR2I);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::RECT2>>(Variant::OP_EQUAL, Variant::NIL, Variant::RECT2);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::RECT2I>>(Variant::OP_EQUAL, Variant::NIL, Variant::RECT2I);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::VECTOR3>>(Variant::OP_EQUAL, Variant::NIL, Variant::VECTOR3);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::VECTOR3I>>(Variant::OP_EQUAL, Variant::NIL, Variant::VECTOR3I);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::TRANSFORM2D>>(Variant::OP_EQUAL, Variant::NIL, Variant::TRANSFORM2D);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::PLANE>>(Variant::OP_EQUAL, Variant::NIL, Variant::PLANE);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::QUATERNION>>(Variant::OP_EQUAL, Variant::NIL, Variant::QUATERNION);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::AABB>>(Variant::OP_EQUAL, Variant::NIL, Variant::AABB);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::BASIS>>(Variant::OP_EQUAL, Variant::NIL, Variant::BASIS);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::TRANSFORM3D>>(Variant::OP_EQUAL, Variant::NIL, Variant::TRANSFORM3D);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::COLOR>>(Variant::OP_EQUAL, Variant::NIL, Variant::COLOR);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::STRING_NAME>>(Variant::OP_EQUAL, Variant::NIL, Variant::STRING_NAME);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::NODE_PATH>>(Variant::OP_EQUAL, Variant::NIL, Variant::NODE_PATH);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::RID>>(Variant::OP_EQUAL, Variant::NIL, Variant::RID);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::CALLABLE>>(Variant::OP_EQUAL, Variant::NIL, Variant::CALLABLE);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::SIGNAL>>(Variant::OP_EQUAL, Variant::NIL, Variant::SIGNAL);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::DICTIONARY>>(Variant::OP_EQUAL, Variant::NIL, Variant::DICTIONARY);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::ARRAY>>(Variant::OP_EQUAL, Variant::NIL, Variant::ARRAY);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_BYTE_ARRAY>>(Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_BYTE_ARRAY);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_INT32_ARRAY>>(Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_INT32_ARRAY);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_INT64_ARRAY>>(Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_INT64_ARRAY);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_FLOAT32_ARRAY>>(Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_FLOAT32_ARRAY);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_FLOAT64_ARRAY>>(Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_FLOAT64_ARRAY);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_STRING_ARRAY>>(Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_STRING_ARRAY);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_VECTOR2_ARRAY>>(Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_VECTOR2_ARRAY);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_VECTOR3_ARRAY>>(Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_VECTOR3_ARRAY);
+ register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_COLOR_ARRAY>>(Variant::OP_EQUAL, Variant::NIL, Variant::PACKED_COLOR_ARRAY);
+
register_op<OperatorEvaluatorAlwaysFalse<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::NIL);
register_op<OperatorEvaluatorNotEqual<bool, bool>>(Variant::OP_NOT_EQUAL, Variant::BOOL, Variant::BOOL);
register_op<OperatorEvaluatorNotEqual<int64_t, int64_t>>(Variant::OP_NOT_EQUAL, Variant::INT, Variant::INT);
@@ -360,6 +428,74 @@ void Variant::_register_variant_operators() {
register_op<OperatorEvaluatorNotEqual<PackedVector3Array, PackedVector3Array>>(Variant::OP_NOT_EQUAL, Variant::PACKED_VECTOR3_ARRAY, Variant::PACKED_VECTOR3_ARRAY);
register_op<OperatorEvaluatorNotEqual<PackedColorArray, PackedColorArray>>(Variant::OP_NOT_EQUAL, Variant::PACKED_COLOR_ARRAY, Variant::PACKED_COLOR_ARRAY);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::BOOL, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::BOOL, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::INT, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::INT, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::FLOAT, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::FLOAT, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::STRING, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::STRING, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::VECTOR2, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::VECTOR2, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::VECTOR2I, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::VECTOR2I, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::RECT2, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::RECT2, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::RECT2I, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::RECT2I, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::VECTOR3, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::VECTOR3, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::VECTOR3I, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::VECTOR3I, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::TRANSFORM2D, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::TRANSFORM2D, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::PLANE, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::PLANE, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::QUATERNION, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::QUATERNION, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::AABB, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::AABB, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::BASIS, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::BASIS, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::TRANSFORM3D, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::TRANSFORM3D, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::COLOR, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::COLOR, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::STRING_NAME, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::STRING_NAME, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NODE_PATH, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::NODE_PATH, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::RID, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::RID, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::CALLABLE, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::CALLABLE, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::SIGNAL, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::SIGNAL, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::DICTIONARY, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::DICTIONARY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::ARRAY, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::PACKED_BYTE_ARRAY, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::PACKED_BYTE_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::PACKED_INT32_ARRAY, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::PACKED_INT32_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::PACKED_INT64_ARRAY, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::PACKED_INT64_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::PACKED_FLOAT32_ARRAY, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::PACKED_FLOAT32_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::PACKED_FLOAT64_ARRAY, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::PACKED_FLOAT64_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::PACKED_STRING_ARRAY, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::PACKED_STRING_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::PACKED_VECTOR2_ARRAY, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::PACKED_VECTOR2_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::PACKED_VECTOR3_ARRAY, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::PACKED_VECTOR3_ARRAY, Variant::NIL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::PACKED_COLOR_ARRAY, Variant::NIL>>(Variant::OP_NOT_EQUAL, Variant::PACKED_COLOR_ARRAY, Variant::NIL);
+
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::BOOL>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::BOOL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::INT>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::INT);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::FLOAT>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::FLOAT);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::STRING>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::STRING);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::VECTOR2>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::VECTOR2);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::VECTOR2I>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::VECTOR2I);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::RECT2>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::RECT2);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::RECT2I>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::RECT2I);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::VECTOR3>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::VECTOR3);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::VECTOR3I>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::VECTOR3I);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::TRANSFORM2D>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::TRANSFORM2D);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PLANE>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PLANE);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::QUATERNION>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::QUATERNION);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::AABB>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::AABB);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::BASIS>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::BASIS);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::TRANSFORM3D>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::TRANSFORM3D);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::COLOR>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::COLOR);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::STRING_NAME>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::STRING_NAME);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::NODE_PATH>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::NODE_PATH);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::RID>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::RID);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::CALLABLE>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::CALLABLE);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::SIGNAL>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::SIGNAL);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::DICTIONARY>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::DICTIONARY);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::ARRAY>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::ARRAY);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_BYTE_ARRAY>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_BYTE_ARRAY);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_INT32_ARRAY>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_INT32_ARRAY);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_INT64_ARRAY>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_INT64_ARRAY);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_FLOAT32_ARRAY>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_FLOAT32_ARRAY);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_FLOAT64_ARRAY>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_FLOAT64_ARRAY);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_STRING_ARRAY>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_STRING_ARRAY);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_VECTOR2_ARRAY>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_VECTOR2_ARRAY);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_VECTOR3_ARRAY>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_VECTOR3_ARRAY);
+ register_op<OperatorEvaluatorAlwaysTrue<Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_COLOR_ARRAY>>(Variant::OP_NOT_EQUAL, Variant::NIL, Variant::PACKED_COLOR_ARRAY);
+
register_op<OperatorEvaluatorLess<bool, bool>>(Variant::OP_LESS, Variant::BOOL, Variant::BOOL);
register_op<OperatorEvaluatorLess<int64_t, int64_t>>(Variant::OP_LESS, Variant::INT, Variant::INT);
register_op<OperatorEvaluatorLess<int64_t, double>>(Variant::OP_LESS, Variant::INT, Variant::FLOAT);
diff --git a/core/variant/variant_op.h b/core/variant/variant_op.h
index cbdd60f404..3c9f849a4f 100644
--- a/core/variant/variant_op.h
+++ b/core/variant/variant_op.h
@@ -168,6 +168,54 @@ public:
static Variant::Type get_return_type() { return GetTypeInfo<R>::VARIANT_TYPE; }
};
+template <>
+class OperatorEvaluatorDivNZ<Vector2i, Vector2i, Vector2i> {
+public:
+ static void evaluate(const Variant &p_left, const Variant &p_right, Variant *r_ret, bool &r_valid) {
+ const Vector2i &a = *VariantGetInternalPtr<Vector2i>::get_ptr(&p_left);
+ const Vector2i &b = *VariantGetInternalPtr<Vector2i>::get_ptr(&p_right);
+ if (unlikely(b.x == 0 || b.y == 0)) {
+ r_valid = false;
+ *r_ret = "Division by zero error";
+ return;
+ }
+ *r_ret = a / b;
+ r_valid = true;
+ }
+ static void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) {
+ VariantTypeChanger<Vector2i>::change(r_ret);
+ *VariantGetInternalPtr<Vector2i>::get_ptr(r_ret) = *VariantGetInternalPtr<Vector2i>::get_ptr(left) / *VariantGetInternalPtr<Vector2i>::get_ptr(right);
+ }
+ static void ptr_evaluate(const void *left, const void *right, void *r_ret) {
+ PtrToArg<Vector2i>::encode(PtrToArg<Vector2i>::convert(left) / PtrToArg<Vector2i>::convert(right), r_ret);
+ }
+ static Variant::Type get_return_type() { return GetTypeInfo<Vector2i>::VARIANT_TYPE; }
+};
+
+template <>
+class OperatorEvaluatorDivNZ<Vector3i, Vector3i, Vector3i> {
+public:
+ static void evaluate(const Variant &p_left, const Variant &p_right, Variant *r_ret, bool &r_valid) {
+ const Vector3i &a = *VariantGetInternalPtr<Vector3i>::get_ptr(&p_left);
+ const Vector3i &b = *VariantGetInternalPtr<Vector3i>::get_ptr(&p_right);
+ if (unlikely(b.x == 0 || b.y == 0 || b.z == 0)) {
+ r_valid = false;
+ *r_ret = "Division by zero error";
+ return;
+ }
+ *r_ret = a / b;
+ r_valid = true;
+ }
+ static void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) {
+ VariantTypeChanger<Vector3i>::change(r_ret);
+ *VariantGetInternalPtr<Vector3i>::get_ptr(r_ret) = *VariantGetInternalPtr<Vector3i>::get_ptr(left) / *VariantGetInternalPtr<Vector3i>::get_ptr(right);
+ }
+ static void ptr_evaluate(const void *left, const void *right, void *r_ret) {
+ PtrToArg<Vector3i>::encode(PtrToArg<Vector3i>::convert(left) / PtrToArg<Vector3i>::convert(right), r_ret);
+ }
+ static Variant::Type get_return_type() { return GetTypeInfo<Vector3i>::VARIANT_TYPE; }
+};
+
template <class R, class A, class B>
class OperatorEvaluatorMod {
public:
@@ -209,6 +257,54 @@ public:
static Variant::Type get_return_type() { return GetTypeInfo<R>::VARIANT_TYPE; }
};
+template <>
+class OperatorEvaluatorModNZ<Vector2i, Vector2i, Vector2i> {
+public:
+ static void evaluate(const Variant &p_left, const Variant &p_right, Variant *r_ret, bool &r_valid) {
+ const Vector2i &a = *VariantGetInternalPtr<Vector2i>::get_ptr(&p_left);
+ const Vector2i &b = *VariantGetInternalPtr<Vector2i>::get_ptr(&p_right);
+ if (unlikely(b.x == 0 || b.y == 0)) {
+ r_valid = false;
+ *r_ret = "Module by zero error";
+ return;
+ }
+ *r_ret = a % b;
+ r_valid = true;
+ }
+ static void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) {
+ VariantTypeChanger<Vector2i>::change(r_ret);
+ *VariantGetInternalPtr<Vector2i>::get_ptr(r_ret) = *VariantGetInternalPtr<Vector2i>::get_ptr(left) % *VariantGetInternalPtr<Vector2i>::get_ptr(right);
+ }
+ static void ptr_evaluate(const void *left, const void *right, void *r_ret) {
+ PtrToArg<Vector2i>::encode(PtrToArg<Vector2i>::convert(left) / PtrToArg<Vector2i>::convert(right), r_ret);
+ }
+ static Variant::Type get_return_type() { return GetTypeInfo<Vector2i>::VARIANT_TYPE; }
+};
+
+template <>
+class OperatorEvaluatorModNZ<Vector3i, Vector3i, Vector3i> {
+public:
+ static void evaluate(const Variant &p_left, const Variant &p_right, Variant *r_ret, bool &r_valid) {
+ const Vector3i &a = *VariantGetInternalPtr<Vector3i>::get_ptr(&p_left);
+ const Vector3i &b = *VariantGetInternalPtr<Vector3i>::get_ptr(&p_right);
+ if (unlikely(b.x == 0 || b.y == 0 || b.z == 0)) {
+ r_valid = false;
+ *r_ret = "Module by zero error";
+ return;
+ }
+ *r_ret = a % b;
+ r_valid = true;
+ }
+ static void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) {
+ VariantTypeChanger<Vector3i>::change(r_ret);
+ *VariantGetInternalPtr<Vector3i>::get_ptr(r_ret) = *VariantGetInternalPtr<Vector3i>::get_ptr(left) % *VariantGetInternalPtr<Vector3i>::get_ptr(right);
+ }
+ static void ptr_evaluate(const void *left, const void *right, void *r_ret) {
+ PtrToArg<Vector3i>::encode(PtrToArg<Vector3i>::convert(left) % PtrToArg<Vector3i>::convert(right), r_ret);
+ }
+ static Variant::Type get_return_type() { return GetTypeInfo<Vector3i>::VARIANT_TYPE; }
+};
+
template <class R, class A>
class OperatorEvaluatorNeg {
public:
diff --git a/core/variant/variant_parser.cpp b/core/variant/variant_parser.cpp
index 50c48fd386..a214a238a6 100644
--- a/core/variant/variant_parser.cpp
+++ b/core/variant/variant_parser.cpp
@@ -1423,7 +1423,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, itos(p_variant.operator int64_t()));
} break;
case Variant::FLOAT: {
- String s = rtosfix(p_variant.operator real_t());
+ String s = rtosfix(p_variant.operator double());
if (s != "inf" && s != "nan") {
if (s.find(".") == -1 && s.find("e") == -1) {
s += ".0";
diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp
index ae3c7685fd..3bba68d75e 100644
--- a/core/variant/variant_setget.cpp
+++ b/core/variant/variant_setget.cpp
@@ -661,6 +661,91 @@ struct VariantIndexedSetGet_Array {
static uint64_t get_indexed_size(const Variant *base) { return 0; }
};
+struct VariantIndexedSetGet_String {
+ static void get(const Variant *base, int64_t index, Variant *value, bool *oob) {
+ int64_t length = VariantGetInternalPtr<String>::get_ptr(base)->length();
+ if (index < 0) {
+ index += length;
+ }
+ if (index < 0 || index >= length) {
+ *oob = true;
+ return;
+ }
+ char32_t result = (*VariantGetInternalPtr<String>::get_ptr(base))[index];
+ *value = String(&result, 1);
+ *oob = false;
+ }
+ static void ptr_get(const void *base, int64_t index, void *member) {
+ /* avoid ptrconvert for performance*/
+ const String &v = *reinterpret_cast<const String *>(base);
+ if (index < 0) {
+ index += v.length();
+ }
+ OOB_TEST(index, v.length());
+ char32_t c = v[index];
+ PtrToArg<String>::encode(String(&c, 1), member);
+ }
+ static void set(Variant *base, int64_t index, const Variant *value, bool *valid, bool *oob) {
+ if (value->get_type() != Variant::STRING) {
+ *oob = false;
+ *valid = false;
+ return;
+ }
+ int64_t length = VariantGetInternalPtr<String>::get_ptr(base)->length();
+ if (index < 0) {
+ index += length;
+ }
+ if (index < 0 || index >= length) {
+ *oob = true;
+ *valid = false;
+ return;
+ }
+ String *b = VariantGetInternalPtr<String>::get_ptr(base);
+ const String *v = VariantInternal::get_string(value);
+ if (v->length() == 0) {
+ b->remove(index);
+ } else {
+ b->set(index, v->get(0));
+ }
+ *oob = false;
+ *valid = true;
+ }
+ static void validated_set(Variant *base, int64_t index, const Variant *value, bool *oob) {
+ int64_t length = VariantGetInternalPtr<String>::get_ptr(base)->length();
+ if (index < 0) {
+ index += length;
+ }
+ if (index < 0 || index >= length) {
+ *oob = true;
+ return;
+ }
+ String *b = VariantGetInternalPtr<String>::get_ptr(base);
+ const String *v = VariantInternal::get_string(value);
+ if (v->length() == 0) {
+ b->remove(index);
+ } else {
+ b->set(index, v->get(0));
+ }
+ *oob = false;
+ }
+ static void ptr_set(void *base, int64_t index, const void *member) {
+ /* avoid ptrconvert for performance*/
+ String &v = *reinterpret_cast<String *>(base);
+ if (index < 0) {
+ index += v.length();
+ }
+ OOB_TEST(index, v.length());
+ const String &m = *reinterpret_cast<const String *>(member);
+ if (unlikely(m.length() == 0)) {
+ v.remove(index);
+ } else {
+ v.set(index, m.unicode_at(0));
+ }
+ }
+ static Variant::Type get_index_type() { return Variant::STRING; }
+ static uint64_t get_indexed_size(const Variant *base) { return VariantInternal::get_string(base)->length(); }
+};
+
#define INDEXED_SETGET_STRUCT_DICT(m_base_type) \
struct VariantIndexedSetGet_##m_base_type { \
static void get(const Variant *base, int64_t index, Variant *value, bool *oob) { \
@@ -758,6 +843,7 @@ static void register_indexed_member(Variant::Type p_type) {
void register_indexed_setters_getters() {
#define REGISTER_INDEXED_MEMBER(m_base_type) register_indexed_member<VariantIndexedSetGet_##m_base_type>(GetTypeInfo<m_base_type>::VARIANT_TYPE)
+ REGISTER_INDEXED_MEMBER(String);
REGISTER_INDEXED_MEMBER(Vector2);
REGISTER_INDEXED_MEMBER(Vector2i);
REGISTER_INDEXED_MEMBER(Vector3);
diff --git a/core/variant/variant_utility.cpp b/core/variant/variant_utility.cpp
index 6c57d1de10..55c1376031 100644
--- a/core/variant/variant_utility.cpp
+++ b/core/variant/variant_utility.cpp
@@ -35,6 +35,8 @@
#include "core/object/ref_counted.h"
#include "core/os/os.h"
#include "core/templates/oa_hash_map.h"
+#include "core/templates/rid.h"
+#include "core/templates/rid_owner.h"
#include "core/variant/binder_common.h"
#include "core/variant/variant_parser.h"
@@ -265,14 +267,6 @@ struct VariantUtilityFunctions {
return Math::db2linear(db);
}
- static inline Vector2 polar2cartesian(double r, double th) {
- return Vector2(r * Math::cos(th), r * Math::sin(th));
- }
-
- static inline Vector2 cartesian2polar(double x, double y) {
- return Vector2(Math::sqrt(x * x + y * y), Math::atan2(y, x));
- }
-
static inline int64_t wrapi(int64_t value, int64_t min, int64_t max) {
return Math::wrapi(value, min, max);
}
@@ -493,10 +487,6 @@ struct VariantUtilityFunctions {
}
static inline void print(const Variant **p_args, int p_arg_count, Callable::CallError &r_error) {
- if (p_arg_count < 1) {
- r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
- r_error.argument = 1;
- }
String str;
for (int i = 0; i < p_arg_count; i++) {
String os = p_args[i]->operator String();
@@ -512,11 +502,29 @@ struct VariantUtilityFunctions {
r_error.error = Callable::CallError::CALL_OK;
}
- static inline void printerr(const Variant **p_args, int p_arg_count, Callable::CallError &r_error) {
- if (p_arg_count < 1) {
- r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
- r_error.argument = 1;
+ static inline void print_verbose(const Variant **p_args, int p_arg_count, Callable::CallError &r_error) {
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ String str;
+ for (int i = 0; i < p_arg_count; i++) {
+ String os = p_args[i]->operator String();
+
+ if (i == 0) {
+ str = os;
+ } else {
+ str += os;
+ }
+ }
+
+ // No need to use `print_verbose()` as this call already only happens
+ // when verbose mode is enabled. This avoids performing string argument concatenation
+ // when not needed.
+ print_line(str);
}
+
+ r_error.error = Callable::CallError::CALL_OK;
+ }
+
+ static inline void printerr(const Variant **p_args, int p_arg_count, Callable::CallError &r_error) {
String str;
for (int i = 0; i < p_arg_count; i++) {
String os = p_args[i]->operator String();
@@ -533,10 +541,6 @@ struct VariantUtilityFunctions {
}
static inline void printt(const Variant **p_args, int p_arg_count, Callable::CallError &r_error) {
- if (p_arg_count < 1) {
- r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
- r_error.argument = 1;
- }
String str;
for (int i = 0; i < p_arg_count; i++) {
if (i) {
@@ -550,10 +554,6 @@ struct VariantUtilityFunctions {
}
static inline void prints(const Variant **p_args, int p_arg_count, Callable::CallError &r_error) {
- if (p_arg_count < 1) {
- r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
- r_error.argument = 1;
- }
String str;
for (int i = 0; i < p_arg_count; i++) {
if (i) {
@@ -567,10 +567,6 @@ struct VariantUtilityFunctions {
}
static inline void printraw(const Variant **p_args, int p_arg_count, Callable::CallError &r_error) {
- if (p_arg_count < 1) {
- r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
- r_error.argument = 1;
- }
String str;
for (int i = 0; i < p_arg_count; i++) {
String os = p_args[i]->operator String();
@@ -728,6 +724,13 @@ struct VariantUtilityFunctions {
}
return p_instance.get_validated_object() != nullptr;
}
+
+ static inline uint64_t rid_allocate_id() {
+ return RID_AllocBase::_gen_id();
+ }
+ static inline RID rid_from_int64(uint64_t p_base) {
+ return RID::from_uint64(p_base);
+ }
};
#ifdef DEBUG_METHODS_ENABLED
@@ -1205,9 +1208,6 @@ void Variant::_register_variant_utility_functions() {
FUNCBINDR(linear2db, sarray("lin"), Variant::UTILITY_FUNC_TYPE_MATH);
FUNCBINDR(db2linear, sarray("db"), Variant::UTILITY_FUNC_TYPE_MATH);
- FUNCBINDR(polar2cartesian, sarray("r", "th"), Variant::UTILITY_FUNC_TYPE_MATH);
- FUNCBINDR(cartesian2polar, sarray("x", "y"), Variant::UTILITY_FUNC_TYPE_MATH);
-
FUNCBINDR(wrapi, sarray("value", "min", "max"), Variant::UTILITY_FUNC_TYPE_MATH);
FUNCBINDR(wrapf, sarray("value", "min", "max"), Variant::UTILITY_FUNC_TYPE_MATH);
@@ -1248,6 +1248,7 @@ void Variant::_register_variant_utility_functions() {
FUNCBINDVARARGV(printt, sarray(), Variant::UTILITY_FUNC_TYPE_GENERAL);
FUNCBINDVARARGV(prints, sarray(), Variant::UTILITY_FUNC_TYPE_GENERAL);
FUNCBINDVARARGV(printraw, sarray(), Variant::UTILITY_FUNC_TYPE_GENERAL);
+ FUNCBINDVARARGV(print_verbose, sarray(), Variant::UTILITY_FUNC_TYPE_GENERAL);
FUNCBINDVARARGV(push_error, sarray(), Variant::UTILITY_FUNC_TYPE_GENERAL);
FUNCBINDVARARGV(push_warning, sarray(), Variant::UTILITY_FUNC_TYPE_GENERAL);
@@ -1265,6 +1266,9 @@ void Variant::_register_variant_utility_functions() {
FUNCBINDR(instance_from_id, sarray("instance_id"), Variant::UTILITY_FUNC_TYPE_GENERAL);
FUNCBINDR(is_instance_id_valid, sarray("id"), Variant::UTILITY_FUNC_TYPE_GENERAL);
FUNCBINDR(is_instance_valid, sarray("instance"), Variant::UTILITY_FUNC_TYPE_GENERAL);
+
+ FUNCBINDR(rid_allocate_id, Vector<String>(), Variant::UTILITY_FUNC_TYPE_GENERAL);
+ FUNCBINDR(rid_from_int64, sarray("base"), Variant::UTILITY_FUNC_TYPE_GENERAL);
}
void Variant::_unregister_variant_utility_functions() {
diff --git a/doc/Doxyfile b/doc/Doxyfile
index a7aa204741..26d86cb127 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -20,7 +20,7 @@
# This tag specifies the encoding used for all characters in the config file
# that follow. The default is UTF-8 which is also the encoding used for all text
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
-# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# built into libc) for the transcoding. See https://www.gnu.org/software/libiconv
# for the list of possible encodings.
# The default value is: UTF-8.
@@ -295,7 +295,7 @@ EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# documentation. See https://daringfireball.net/projects/markdown/ for details.
# The output of markdown processing is further processed by doxygen, so you can
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
# case of backward compatibilities issues.
@@ -692,7 +692,7 @@ LAYOUT_FILE =
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
# extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
# For LaTeX the style of the bibliography can be controlled using
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
# search path. See also \cite for info how to create references.
@@ -773,7 +773,7 @@ INPUT = ../core/ ../main/ ../scene/
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# documentation (see: https://www.gnu.org/software/libiconv) for the list of
# possible encodings.
# The default value is: UTF-8.
@@ -1006,7 +1006,7 @@ SOURCE_TOOLTIPS = YES
# If the USE_HTAGS tag is set to YES then the references to source code will
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
# source browser. The htags tool is part of GNU's global source tagging system
-# (see http://www.gnu.org/software/global/global.html). You will need version
+# (see https://www.gnu.org/software/global/global.html). You will need version
# 4.8.6 or higher.
#
# To use it do the following:
@@ -1034,7 +1034,7 @@ USE_HTAGS = NO
VERBATIM_HEADERS = YES
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
-# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
+# clang parser (see: https://clang.llvm.org/) for more accurate parsing at the
# cost of reduced performance. This can be particularly helpful with template
# rich C++ code for which doxygen's built-in parser lacks the necessary type
# information.
@@ -1170,7 +1170,7 @@ HTML_EXTRA_FILES =
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the style sheet and background images according to
# this color. Hue is specified as an angle on a colorwheel, see
-# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
# purple, and 360 is red again.
# Minimum value: 0, maximum value: 359, default value: 220.
@@ -1349,7 +1349,7 @@ QCH_FILE =
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
# Project output. For more information please see Qt Help Project / Namespace
-# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# (see: https://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
# The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1357,7 +1357,7 @@ QHP_NAMESPACE = org.doxygen.Project
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
# Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# Folders (see: https://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
# folders).
# The default value is: doc.
# This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1366,7 +1366,7 @@ QHP_VIRTUAL_FOLDER = doc
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
# filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: https://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1374,7 +1374,7 @@ QHP_CUST_FILTER_NAME =
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
# custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: https://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1382,7 +1382,7 @@ QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
# project's filter section matches. Qt Help Project / Filter Attributes (see:
-# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# https://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_SECT_FILTER_ATTRS =
@@ -1487,7 +1487,7 @@ FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
+# https://www.mathjax.org) which uses client side Javascript for the rendering
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
# installed or if you want to formulas look prettier in the HTML output. When
# enabled you may also need to install MathJax separately and configure the path
@@ -1514,7 +1514,7 @@ MATHJAX_FORMAT = HTML-CSS
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
# Content Delivery Network so you can quickly see the result without installing
# MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from http://www.mathjax.org before deployment.
+# MathJax from https://www.mathjax.org before deployment.
# The default value is: http://cdn.mathjax.org/mathjax/latest.
# This tag requires that the tag USE_MATHJAX is set to YES.
@@ -1576,7 +1576,7 @@ SERVER_BASED_SEARCH = NO
#
# Doxygen ships with an example indexer (doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/).
+# Xapian (see: https://xapian.org/).
#
# See the section "External Indexing and Searching" for details.
# The default value is: NO.
@@ -1589,7 +1589,7 @@ EXTERNAL_SEARCH = NO
#
# Doxygen ships with an example indexer (doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Xapian (see: https://xapian.org/). See the section "External Indexing and
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
@@ -1773,7 +1773,7 @@ LATEX_SOURCE_CODE = NO
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
# bibliography, e.g. plainnat, or ieeetr. See
-# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
# The default value is: plain.
# This tag requires that the tag GENERATE_LATEX is set to YES.
@@ -2138,7 +2138,7 @@ CLASS_DIAGRAMS = YES
# You can define message sequence charts within doxygen comments using the \msc
# command. Doxygen will then run the mscgen tool (see:
-# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# https://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
@@ -2160,7 +2160,7 @@ HIDE_UNDOC_RELATIONS = YES
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
# available from the path. This tool is part of Graphviz (see:
-# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
# Bell Labs. The other options in this section have no effect if this option is
# set to NO
# The default value is: NO.
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index d4680d1836..fe0d7e4408 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -23,7 +23,7 @@
Returns the absolute value of float parameter [code]x[/code] (i.e. positive value).
[codeblock]
# a is 1.2
- a = absf(-1.2)
+ var a = absf(-1.2)
[/codeblock]
</description>
</method>
@@ -34,7 +34,7 @@
Returns the absolute value of int parameter [code]x[/code] (i.e. positive value).
[codeblock]
# a is 1
- a = absi(-1)
+ var a = absi(-1)
[/codeblock]
</description>
</method>
@@ -45,7 +45,7 @@
Returns the arc cosine of [code]x[/code] in radians. Use to get the angle of cosine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method acos] will return [constant @GDScript.NAN].
[codeblock]
# c is 0.523599 or 30 degrees if converted with rad2deg(c)
- c = acos(0.866025)
+ var c = acos(0.866025)
[/codeblock]
</description>
</method>
@@ -56,7 +56,7 @@
Returns the arc sine of [code]x[/code] in radians. Use to get the angle of sine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method asin] will return [constant @GDScript.NAN].
[codeblock]
# s is 0.523599 or 30 degrees if converted with rad2deg(s)
- s = asin(0.5)
+ var s = asin(0.5)
[/codeblock]
</description>
</method>
@@ -64,11 +64,12 @@
<return type="float" />
<argument index="0" name="x" type="float" />
<description>
- Returns the arc tangent of [code]x[/code] in radians. Use it to get the angle from an angle's tangent in trigonometry: [code]atan(tan(angle)) == angle[/code].
+ Returns the arc tangent of [code]x[/code] in radians. Use it to get the angle from an angle's tangent in trigonometry.
The method cannot know in which quadrant the angle should fall. See [method atan2] if you have both [code]y[/code] and [code]x[/code].
[codeblock]
- a = atan(0.5) # a is 0.463648
+ var a = atan(0.5) # a is 0.463648
[/codeblock]
+ If [code]x[/code] is between [code]-PI / 2[/code] and [code]PI / 2[/code] (inclusive), [code]atan(tan(x))[/code] is equal to [code]x[/code].
</description>
</method>
<method name="atan2">
@@ -79,7 +80,7 @@
Returns the arc tangent of [code]y/x[/code] in radians. Use to get the angle of tangent [code]y/x[/code]. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.
Important note: The Y coordinate comes first, by convention.
[codeblock]
- a = atan2(0, -1) # a is 3.141593
+ var a = atan2(0, -1) # a is 3.141593
[/codeblock]
</description>
</method>
@@ -99,22 +100,14 @@
[b]Warning:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution).
</description>
</method>
- <method name="cartesian2polar">
- <return type="Vector2" />
- <argument index="0" name="x" type="float" />
- <argument index="1" name="y" type="float" />
- <description>
- Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle).
- </description>
- </method>
<method name="ceil">
<return type="float" />
<argument index="0" name="x" type="float" />
<description>
Rounds [code]x[/code] upward (towards positive infinity), returning the smallest whole number that is not less than [code]x[/code].
[codeblock]
- i = ceil(1.45) # i is 2
- i = ceil(1.001) # i is 2
+ var i = ceil(1.45) # i is 2.0
+ i = ceil(1.001) # i is 2.0
[/codeblock]
See also [method floor], [method round], and [method snapped].
</description>
@@ -135,9 +128,9 @@
<description>
Clamps the float [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
[codeblock]
- speed = 42.1
+ var speed = 42.1
# a is 20.0
- a = clampf(speed, 1.0, 20.0)
+ var a = clampf(speed, 1.0, 20.0)
speed = -10.0
# a is -1.0
@@ -153,9 +146,9 @@
<description>
Clamps the integer [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
[codeblock]
- speed = 42
+ var speed = 42
# a is 20
- a = clampi(speed, 1, 20)
+ var a = clampi(speed, 1, 20)
speed = -10
# a is -1
@@ -169,9 +162,9 @@
<description>
Returns the cosine of angle [code]angle_rad[/code] in radians.
[codeblock]
- # Prints 1 then -1
- print(cos(PI * 2))
- print(cos(PI))
+ cos(PI * 2) # Returns 1.0
+ cos(PI) # Returns -1.0
+ cos(deg2rad(90)) # Returns 0.0
[/codeblock]
</description>
</method>
@@ -200,7 +193,7 @@
Converts an angle expressed in degrees to radians.
[codeblock]
# r is 3.141593
- r = deg2rad(180)
+ var r = deg2rad(180)
[/codeblock]
</description>
</method>
@@ -209,7 +202,18 @@
<argument index="0" name="x" type="float" />
<argument index="1" name="curve" type="float" />
<description>
- Easing function, based on exponent. The curve values are: 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in.
+ Returns an "eased" value of [code]x[/code] based on an easing function defined with [code]curve[/code]. This easing function is based on an exponent. The [code]curve[/code] can be any floating-point number, with specific values leading to the following behaviors:
+ [codeblock]
+ - Lower than -1.0 (exclusive): Ease in-out
+ - 1.0: Linear
+ - Between -1.0 and 0.0 (exclusive): Ease out-in
+ - 0.0: Constant
+ - Between 0.0 to 1.0 (exclusive): Ease in
+ - 1.0: Linear
+ - Greater than 1.0 (exclusive): Ease out
+ [/codeblock]
+ [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/ease_cheatsheet.png]ease() curve values cheatsheet[/url]
+ See also [method smoothstep]. If you need to perform more advanced transitions, use [Tween] or [AnimationPlayer].
</description>
</method>
<method name="error_string">
@@ -227,7 +231,7 @@
[b]e[/b] has an approximate value of 2.71828, and can be obtained with [code]exp(1)[/code].
For exponents to other bases use the method [method pow].
[codeblock]
- a = exp(2) # Approximately 7.39
+ var a = exp(2) # Approximately 7.39
[/codeblock]
</description>
</method>
@@ -238,7 +242,7 @@
Rounds [code]x[/code] downward (towards negative infinity), returning the largest whole number that is not more than [code]x[/code].
[codeblock]
# a is 2.0
- a = floor(2.99)
+ var a = floor(2.99)
# a is -3.0
a = floor(-2.99)
[/codeblock]
@@ -521,14 +525,6 @@
[b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2).
</description>
</method>
- <method name="polar2cartesian">
- <return type="Vector2" />
- <argument index="0" name="r" type="float" />
- <argument index="1" name="th" type="float" />
- <description>
- Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis).
- </description>
- </method>
<method name="posmod">
<return type="int" />
<argument index="0" name="x" type="int" />
@@ -566,12 +562,17 @@
<description>
Converts one or more arguments of any type to string in the best way possible and prints them to the console.
[codeblock]
- a = [1, 2, 3]
+ var a = [1, 2, 3]
print("a", "b", a) # Prints ab[1, 2, 3]
[/codeblock]
[b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
</description>
</method>
+ <method name="print_verbose" qualifiers="vararg">
+ <description>
+ If verbose mode is enabled ([method OS.is_stdout_verbose] returning [code]true[/code]), converts one or more arguments of any type to string in the best way possible and prints them to the console.
+ </description>
+ </method>
<method name="printerr" qualifiers="vararg">
<description>
Prints one or more arguments to strings in the best way possible to standard error line.
@@ -711,6 +712,19 @@
<description>
</description>
</method>
+ <method name="rid_allocate_id">
+ <return type="int" />
+ <description>
+ Allocate a unique ID which can be used by the implementation to construct a RID. This is used mainly from native extensions to implement servers.
+ </description>
+ </method>
+ <method name="rid_from_int64">
+ <return type="RID" />
+ <argument index="0" name="base" type="int" />
+ <description>
+ Create a RID from an int64. This is used mainly from native extensions to build servers.
+ </description>
+ </method>
<method name="round">
<return type="float" />
<argument index="0" name="x" type="float" />
@@ -727,7 +741,7 @@
<description>
Sets seed for the random number generator.
[codeblock]
- my_seed = "Godot Rocks"
+ var my_seed = "Godot Rocks"
seed(my_seed.hash())
[/codeblock]
</description>
@@ -768,7 +782,8 @@
<description>
Returns the sine of angle [code]angle_rad[/code] in radians.
[codeblock]
- sin(0.523599) # Returns 0.5
+ sin(0.523599) # Returns 0.5
+ sin(deg2rad(90)) # Returns 1.0
[/codeblock]
</description>
</method>
@@ -778,7 +793,7 @@
<description>
Returns the hyperbolic sine of [code]x[/code].
[codeblock]
- a = log(2.0) # Returns 0.693147
+ var a = log(2.0) # Returns 0.693147
sinh(a) # Returns 0.75
[/codeblock]
</description>
@@ -798,6 +813,8 @@
smoothstep(0, 2, 1.0) # Returns 0.5
smoothstep(0, 2, 2.0) # Returns 1.0
[/codeblock]
+ Compared to [method ease] with a curve value of [code]-1.6521[/code], [method smoothstep] returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use [Tween] or [AnimationPlayer].
+ [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/smoothstep_ease_comparison.png]Comparison between smoothstep() and ease(x, -1.6521) return values[/url]
</description>
</method>
<method name="snapped">
@@ -831,7 +848,7 @@
Returns the position of the first non-zero digit, after the decimal point. Note that the maximum return value is 10, which is a design decision in the implementation.
[codeblock]
# n is 0
- n = step_decimals(5)
+ var n = step_decimals(5)
# n is 4
n = step_decimals(1.0005)
# n is 9
@@ -851,8 +868,8 @@
<description>
Converts a formatted string that was returned by [method var2str] to the original value.
[codeblock]
- a = '{ "a": 1, "b": 2 }'
- b = str2var(a)
+ var a = '{ "a": 1, "b": 2 }'
+ var b = str2var(a)
print(b["a"]) # Prints 1
[/codeblock]
</description>
@@ -873,7 +890,7 @@
<description>
Returns the hyperbolic tangent of [code]x[/code].
[codeblock]
- a = log(2.0) # Returns 0.693147
+ var a = log(2.0) # Returns 0.693147
tanh(a) # Returns 0.6
[/codeblock]
</description>
@@ -1072,8 +1089,8 @@
<member name="TranslationServer" type="TranslationServer" setter="" getter="">
The [TranslationServer] singleton.
</member>
- <member name="VisualScriptEditor" type="VisualScriptEditor" setter="" getter="">
- The [VisualScriptEditor] singleton.
+ <member name="VisualScriptCustomNodes" type="VisualScriptCustomNodes" setter="" getter="">
+ The [VisualScriptCustomNodes] singleton.
</member>
<member name="XRServer" type="XRServer" setter="" getter="">
The [XRServer] singleton.
@@ -2351,9 +2368,11 @@
</constant>
<constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="38" enum="PropertyHint">
</constant>
+ <constant name="PROPERTY_HINT_INT_IS_POINTER" value="40" enum="PropertyHint">
+ </constant>
<constant name="PROPERTY_HINT_ARRAY_TYPE" value="39" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_MAX" value="40" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_MAX" value="41" enum="PropertyHint">
</constant>
<constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags">
</constant>
@@ -2426,6 +2445,8 @@
</constant>
<constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="268435456" enum="PropertyUsageFlags">
</constant>
+ <constant name="PROPERTY_USAGE_ARRAY" value="1073741824" enum="PropertyUsageFlags">
+ </constant>
<constant name="PROPERTY_USAGE_DEFAULT" value="7" enum="PropertyUsageFlags">
Default usage (storage, editor and network).
</constant>
@@ -2458,9 +2479,30 @@
</constant>
<constant name="METHOD_FLAG_STATIC" value="256" enum="MethodFlags">
</constant>
+ <constant name="METHOD_FLAG_OBJECT_CORE" value="512" enum="MethodFlags">
+ Used internally. Allows to not dump core virtuals such as [code]_notification[/code] to the JSON API.
+ </constant>
<constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags">
Default method flags.
</constant>
+ <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode">
+ Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
+ </constant>
+ <constant name="RPC_MODE_ANY" value="1" enum="RPCMode">
+ Used with [method Node.rpc_config] to set a method to be callable remotely by any peer. Analogous to the [code]@rpc(any)[/code] annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not.
+ </constant>
+ <constant name="RPC_MODE_AUTH" value="2" enum="RPCMode">
+ Used with [method Node.rpc_config] to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the [code]@rpc(auth)[/code] annotation. See [method Node.set_multiplayer_authority].
+ </constant>
+ <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
+ Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_ORDERED]. Use for non-critical data, and always consider whether the order matters.
+ </constant>
+ <constant name="TRANSFER_MODE_ORDERED" value="1" enum="TransferMode">
+ Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data.
+ </constant>
+ <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode">
+ Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly.
+ </constant>
<constant name="TYPE_NIL" value="0" enum="Variant.Type">
Variable is [code]null[/code].
</constant>
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index 4bc11e7166..5d18f69409 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -61,6 +61,12 @@
Returns the volume of the [AABB].
</description>
</method>
+ <method name="get_center" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the center of the [AABB], which is equal to [member position] + ([member size] / 2).
+ </description>
+ </method>
<method name="get_endpoint" qualifiers="const">
<return type="Vector3" />
<argument index="0" name="idx" type="int" />
@@ -189,6 +195,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="AABB" />
<description>
</description>
@@ -201,6 +212,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="AABB" />
<description>
</description>
@@ -218,6 +234,4 @@
If the size is negative, you can use [method abs] to fix it.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index 63dd250dbc..11c0fc33b8 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -38,7 +38,7 @@
<tutorials>
</tutorials>
<methods>
- <method name="_compute_cost" qualifiers="virtual">
+ <method name="_compute_cost" qualifiers="virtual const">
<return type="float" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
@@ -47,7 +47,7 @@
Note that this function is hidden in the default [code]AStar[/code] class.
</description>
</method>
- <method name="_estimate_cost" qualifiers="virtual">
+ <method name="_estimate_cost" qualifiers="virtual const">
<return type="float" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
@@ -326,6 +326,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index 31d695b051..43e7d59665 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -9,7 +9,7 @@
<tutorials>
</tutorials>
<methods>
- <method name="_compute_cost" qualifiers="virtual">
+ <method name="_compute_cost" qualifiers="virtual const">
<return type="float" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
@@ -18,7 +18,7 @@
Note that this function is hidden in the default [code]AStar2D[/code] class.
</description>
</method>
- <method name="_estimate_cost" qualifiers="virtual">
+ <method name="_estimate_cost" qualifiers="virtual const">
<return type="float" />
<argument index="0" name="from_id" type="int" />
<argument index="1" name="to_id" type="int" />
@@ -297,6 +297,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index 077c062d6b..c753b341d2 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -90,8 +90,6 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
<theme_items>
<theme_item name="panel" data_type="style" type="StyleBox">
Panel that fills up the background of the window.
diff --git a/doc/classes/AnimatableBody2D.xml b/doc/classes/AnimatableBody2D.xml
new file mode 100644
index 0000000000..bc169cf9c9
--- /dev/null
+++ b/doc/classes/AnimatableBody2D.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AnimatableBody2D" inherits="StaticBody2D" version="4.0">
+ <brief_description>
+ Physics body for 2D physics which moves only by script or animation. Useful for moving platforms and doors.
+ </brief_description>
+ <description>
+ Animatable body for 2D physics.
+ An animatable body can't be moved by external forces or contacts, but can be moved by script or animation to affect other bodies in its path. It is ideal for implementing moving objects in the environment, such as moving platforms or doors.
+ When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="true">
+ If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody2D.move_and_collide].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/AnimatableBody3D.xml b/doc/classes/AnimatableBody3D.xml
new file mode 100644
index 0000000000..86cff38c51
--- /dev/null
+++ b/doc/classes/AnimatableBody3D.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AnimatableBody3D" inherits="StaticBody3D" version="4.0">
+ <brief_description>
+ Physics body for 3D physics which moves only by script or animation. Useful for moving platforms and doors.
+ </brief_description>
+ <description>
+ Animatable body for 3D physics.
+ An animatable body can't be moved by external forces or contacts, but can be moved by script or animation to affect other bodies in its path. It is ideal for implementing moving objects in the environment, such as moving platforms or doors.
+ When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
+ </description>
+ <tutorials>
+ <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
+ </tutorials>
+ <members>
+ <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="true">
+ If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody3D.move_and_collide].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml
index 14e19b4c9a..b468e1d109 100644
--- a/doc/classes/AnimatedSprite2D.xml
+++ b/doc/classes/AnimatedSprite2D.xml
@@ -74,6 +74,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index 6b3d426cef..59d7553ef4 100644
--- a/doc/classes/AnimatedSprite3D.xml
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -56,6 +56,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml
index a9a08efcf1..173ff43d2a 100644
--- a/doc/classes/AnimationNode.xml
+++ b/doc/classes/AnimationNode.xml
@@ -11,46 +11,46 @@
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
- <method name="_get_caption" qualifiers="virtual">
+ <method name="_get_caption" qualifiers="virtual const">
<return type="String" />
<description>
Gets the text caption for this node (used by some editors).
</description>
</method>
- <method name="_get_child_by_name" qualifiers="virtual">
- <return type="Object" />
- <argument index="0" name="name" type="String" />
+ <method name="_get_child_by_name" qualifiers="virtual const">
+ <return type="AnimationNode" />
+ <argument index="0" name="name" type="StringName" />
<description>
Gets a child node by index (used by editors inheriting from [AnimationRootNode]).
</description>
</method>
- <method name="_get_child_nodes" qualifiers="virtual">
+ <method name="_get_child_nodes" qualifiers="virtual const">
<return type="Dictionary" />
<description>
Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode].
</description>
</method>
- <method name="_get_parameter_default_value" qualifiers="virtual">
+ <method name="_get_parameter_default_value" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="name" type="StringName" />
+ <argument index="0" name="parameter" type="StringName" />
<description>
Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
</description>
</method>
- <method name="_get_parameter_list" qualifiers="virtual">
+ <method name="_get_parameter_list" qualifiers="virtual const">
<return type="Array" />
<description>
Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list].
</description>
</method>
- <method name="_has_filter" qualifiers="virtual">
+ <method name="_has_filter" qualifiers="virtual const">
<return type="bool" />
<description>
Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node.
</description>
</method>
- <method name="_process" qualifiers="virtual">
- <return type="void" />
+ <method name="_process" qualifiers="virtual const">
+ <return type="float" />
<argument index="0" name="time" type="float" />
<argument index="1" name="seek" type="bool" />
<description>
diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml
index 63127ade9a..20ee33209b 100644
--- a/doc/classes/AnimationNodeAdd2.xml
+++ b/doc/classes/AnimationNodeAdd2.xml
@@ -9,13 +9,9 @@
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml
index 0e49ac7bbf..26738499bb 100644
--- a/doc/classes/AnimationNodeAdd3.xml
+++ b/doc/classes/AnimationNodeAdd3.xml
@@ -14,13 +14,9 @@
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml
index 75dae6a48e..668a35226f 100644
--- a/doc/classes/AnimationNodeAnimation.xml
+++ b/doc/classes/AnimationNodeAnimation.xml
@@ -11,13 +11,9 @@
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="&amp;&quot;&quot;">
Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml
index e509a2df6c..1f7a4c91c8 100644
--- a/doc/classes/AnimationNodeBlend2.xml
+++ b/doc/classes/AnimationNodeBlend2.xml
@@ -11,13 +11,9 @@
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml
index 7c81b37663..ed827e2535 100644
--- a/doc/classes/AnimationNodeBlend3.xml
+++ b/doc/classes/AnimationNodeBlend3.xml
@@ -13,13 +13,9 @@
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml
index c47d84fe37..6e55a79fd2 100644
--- a/doc/classes/AnimationNodeBlendSpace1D.xml
+++ b/doc/classes/AnimationNodeBlendSpace1D.xml
@@ -80,6 +80,4 @@
Label of the virtual axis of the blend space.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationNodeOutput.xml b/doc/classes/AnimationNodeOutput.xml
index c4150d7e82..34c96d13ea 100644
--- a/doc/classes/AnimationNodeOutput.xml
+++ b/doc/classes/AnimationNodeOutput.xml
@@ -10,8 +10,4 @@
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml
index 9921e157f2..17ef565b3a 100644
--- a/doc/classes/AnimationNodeStateMachine.xml
+++ b/doc/classes/AnimationNodeStateMachine.xml
@@ -187,6 +187,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml
index 5c11adfaf0..15c6c96302 100644
--- a/doc/classes/AnimationNodeStateMachinePlayback.xml
+++ b/doc/classes/AnimationNodeStateMachinePlayback.xml
@@ -74,6 +74,4 @@
<members>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" />
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml
index 7f07afecee..763bba6e93 100644
--- a/doc/classes/AnimationNodeStateMachineTransition.xml
+++ b/doc/classes/AnimationNodeStateMachineTransition.xml
@@ -7,8 +7,6 @@
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="&amp;&quot;&quot;">
Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]:
diff --git a/doc/classes/AnimationNodeTimeScale.xml b/doc/classes/AnimationNodeTimeScale.xml
index 2ce8309418..5b40b39bca 100644
--- a/doc/classes/AnimationNodeTimeScale.xml
+++ b/doc/classes/AnimationNodeTimeScale.xml
@@ -10,8 +10,4 @@
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationNodeTimeSeek.xml b/doc/classes/AnimationNodeTimeSeek.xml
index 171d65fbe0..d927c663c8 100644
--- a/doc/classes/AnimationNodeTimeSeek.xml
+++ b/doc/classes/AnimationNodeTimeSeek.xml
@@ -29,8 +29,4 @@
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml
index 8c859e43be..b297832ac0 100644
--- a/doc/classes/AnimationNodeTransition.xml
+++ b/doc/classes/AnimationNodeTransition.xml
@@ -47,6 +47,4 @@
Cross-fading time (in seconds) between each animation connected to the inputs.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationRootNode.xml b/doc/classes/AnimationRootNode.xml
index 46759b7f4d..056edbd230 100644
--- a/doc/classes/AnimationRootNode.xml
+++ b/doc/classes/AnimationRootNode.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AnimationTrackEditPlugin.xml b/doc/classes/AnimationTrackEditPlugin.xml
index 7b96808581..4a4c7157d2 100644
--- a/doc/classes/AnimationTrackEditPlugin.xml
+++ b/doc/classes/AnimationTrackEditPlugin.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml
index 2180196bb5..e91cfd79a1 100644
--- a/doc/classes/Area3D.xml
+++ b/doc/classes/Area3D.xml
@@ -92,6 +92,15 @@
<member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area3D.SpaceOverride" default="0">
Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values.
</member>
+ <member name="wind_attenuation_factor" type="float" setter="set_wind_attenuation_factor" getter="get_wind_attenuation_factor" default="0.0">
+ The exponential rate at which wind force decreases with distance from its origin.
+ </member>
+ <member name="wind_force_magnitude" type="float" setter="set_wind_force_magnitude" getter="get_wind_force_magnitude" default="0.0">
+ The magnitude of area-specific wind force.
+ </member>
+ <member name="wind_source_path" type="NodePath" setter="set_wind_source_path" getter="get_wind_source_path" default="NodePath(&quot;&quot;)">
+ The [Node3D] which is used to specify the the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the [Node3D]'s local transform, and its origin is the origin of the [Node3D]'s local transform.
+ </member>
</members>
<signals>
<signal name="area_entered">
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 7767a1028d..44e27643bb 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -302,7 +302,7 @@
</description>
</method>
<method name="insert">
- <return type="void" />
+ <return type="int" />
<argument index="0" name="position" type="int" />
<argument index="1" name="value" type="Variant" />
<description>
@@ -347,6 +347,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Array" />
<description>
</description>
@@ -371,6 +376,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Array" />
<description>
</description>
@@ -393,6 +403,14 @@
<description>
</description>
</method>
+ <method name="pop_at">
+ <return type="Variant" />
+ <argument index="0" name="position" type="int" />
+ <description>
+ Removes and returns the element of the array at index [code]position[/code]. If negative, [code]position[/code] is considered relative to the end of the array. Leaves the array untouched and returns [code]null[/code] if the array is empty or if it's accessed out of bounds. An error message is printed when the array is accessed out of bounds, but not when the array is empty.
+ [b]Note:[/b] On large arrays, this method can be slower than [method pop_back] as it will reindex the array's elements that are located after the removed element. The larger the array and the lower the index of the removed element, the slower [method pop_at] will be.
+ </description>
+ </method>
<method name="pop_back">
<return type="Variant" />
<description>
@@ -487,7 +505,7 @@
<argument index="2" name="step" type="int" default="1" />
<argument index="3" name="deep" type="bool" default="false" />
<description>
- Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing.
+ Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing. Wraps around if [code]begin[/code] or [code]end[/code] are out of bounds or negative. Returns an empty array for invalid parameters.
</description>
</method>
<method name="sort">
@@ -532,6 +550,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 637b9a9f16..49ce2588c5 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -115,6 +115,7 @@
<argument index="0" name="index" type="int" />
<argument index="1" name="name" type="StringName" />
<description>
+ Sets the name of the blend shape at this index.
</description>
</method>
<method name="surface_find_by_name" qualifiers="const">
@@ -202,6 +203,4 @@
<member name="shadow_mesh" type="ArrayMesh" setter="set_shadow_mesh" getter="get_shadow_mesh">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AspectRatioContainer.xml b/doc/classes/AspectRatioContainer.xml
index 7b41133139..4c0af0b997 100644
--- a/doc/classes/AspectRatioContainer.xml
+++ b/doc/classes/AspectRatioContainer.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="alignment_horizontal" type="int" setter="set_alignment_horizontal" getter="get_alignment_horizontal" enum="AspectRatioContainer.AlignMode" default="1">
Specifies the horizontal relative position of child controls.
diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml
index b49c0e4278..3435bbec59 100644
--- a/doc/classes/AtlasTexture.xml
+++ b/doc/classes/AtlasTexture.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="atlas" type="Texture2D" setter="set_atlas" getter="get_atlas">
The texture that contains the atlas. Can be any [Texture2D] subtype.
@@ -25,6 +23,4 @@
The AtlasTexture's used region.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml
index 09746913bd..b7e8d8932c 100644
--- a/doc/classes/AudioBusLayout.xml
+++ b/doc/classes/AudioBusLayout.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffect.xml b/doc/classes/AudioEffect.xml
index 955285bd2e..fd2bab073f 100644
--- a/doc/classes/AudioEffect.xml
+++ b/doc/classes/AudioEffect.xml
@@ -9,8 +9,4 @@
<tutorials>
<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml
index 1334a81661..7fcfe24d97 100644
--- a/doc/classes/AudioEffectAmplify.xml
+++ b/doc/classes/AudioEffectAmplify.xml
@@ -9,13 +9,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0">
Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml
index e8b398c8f4..ed0a33deb1 100644
--- a/doc/classes/AudioEffectBandLimitFilter.xml
+++ b/doc/classes/AudioEffectBandLimitFilter.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectBandPassFilter.xml b/doc/classes/AudioEffectBandPassFilter.xml
index ad3dbc5256..642b70428e 100644
--- a/doc/classes/AudioEffectBandPassFilter.xml
+++ b/doc/classes/AudioEffectBandPassFilter.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml
index 8e46acbd07..6aecaa170a 100644
--- a/doc/classes/AudioEffectCapture.xml
+++ b/doc/classes/AudioEffectCapture.xml
@@ -61,6 +61,4 @@
Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml
index cc93a8fc03..e3ab141e3d 100644
--- a/doc/classes/AudioEffectChorus.xml
+++ b/doc/classes/AudioEffectChorus.xml
@@ -171,6 +171,4 @@
The effect's processed signal.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml
index 4e924bcb65..28a5587377 100644
--- a/doc/classes/AudioEffectCompressor.xml
+++ b/doc/classes/AudioEffectCompressor.xml
@@ -14,8 +14,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="attack_us" type="float" setter="set_attack_us" getter="get_attack_us" default="20.0">
Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000.
@@ -39,6 +37,4 @@
The level above which compression is applied to the audio. Value can range from -60 to 0.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml
index e55e0cb2ad..96bd43bc3b 100644
--- a/doc/classes/AudioEffectDelay.xml
+++ b/doc/classes/AudioEffectDelay.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="dry" type="float" setter="set_dry" getter="get_dry" default="1.0">
Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1.
@@ -52,6 +50,4 @@
Pan position for [code]tap2[/code]. Value can range from -1 (fully left) to 1 (fully right).
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectDistortion.xml b/doc/classes/AudioEffectDistortion.xml
index 24a145b0f3..600ca93028 100644
--- a/doc/classes/AudioEffectDistortion.xml
+++ b/doc/classes/AudioEffectDistortion.xml
@@ -11,8 +11,6 @@
<tutorials>
<link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="drive" type="float" setter="set_drive" getter="get_drive" default="0.0">
Distortion power. Value can range from 0 to 1.
diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml
index ddc1af0618..9d84f87cbe 100644
--- a/doc/classes/AudioEffectEQ.xml
+++ b/doc/classes/AudioEffectEQ.xml
@@ -32,6 +32,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectEQ10.xml b/doc/classes/AudioEffectEQ10.xml
index c9fb03e23c..be89a0c4d6 100644
--- a/doc/classes/AudioEffectEQ10.xml
+++ b/doc/classes/AudioEffectEQ10.xml
@@ -20,8 +20,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectEQ21.xml b/doc/classes/AudioEffectEQ21.xml
index 7ff8a1756e..0b1a8b2a1d 100644
--- a/doc/classes/AudioEffectEQ21.xml
+++ b/doc/classes/AudioEffectEQ21.xml
@@ -31,8 +31,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectEQ6.xml b/doc/classes/AudioEffectEQ6.xml
index b47da5ed2a..9f7efad375 100644
--- a/doc/classes/AudioEffectEQ6.xml
+++ b/doc/classes/AudioEffectEQ6.xml
@@ -16,8 +16,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml
index 293848d204..5b43646077 100644
--- a/doc/classes/AudioEffectFilter.xml
+++ b/doc/classes/AudioEffectFilter.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="cutoff_hz" type="float" setter="set_cutoff" getter="get_cutoff" default="2000.0">
Threshold frequency for the filter, in Hz.
diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml
index 82a3c74941..e1bd7a3ff5 100644
--- a/doc/classes/AudioEffectHighPassFilter.xml
+++ b/doc/classes/AudioEffectHighPassFilter.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml
index 4ba31f9fc8..c572824448 100644
--- a/doc/classes/AudioEffectHighShelfFilter.xml
+++ b/doc/classes/AudioEffectHighShelfFilter.xml
@@ -8,8 +8,4 @@
<tutorials>
<link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectInstance.xml b/doc/classes/AudioEffectInstance.xml
index 9ab6028901..f9836226fc 100644
--- a/doc/classes/AudioEffectInstance.xml
+++ b/doc/classes/AudioEffectInstance.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml
index 2fbea06aed..813429e42f 100644
--- a/doc/classes/AudioEffectLimiter.xml
+++ b/doc/classes/AudioEffectLimiter.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="ceiling_db" type="float" setter="set_ceiling_db" getter="get_ceiling_db" default="-0.1">
The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1.
@@ -24,6 +22,4 @@
Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectLowPassFilter.xml b/doc/classes/AudioEffectLowPassFilter.xml
index e7a66d03bd..ece2e57c96 100644
--- a/doc/classes/AudioEffectLowPassFilter.xml
+++ b/doc/classes/AudioEffectLowPassFilter.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml
index 078e7bf1a1..e78dbf9732 100644
--- a/doc/classes/AudioEffectLowShelfFilter.xml
+++ b/doc/classes/AudioEffectLowShelfFilter.xml
@@ -8,8 +8,4 @@
<tutorials>
<link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml
index 2393674a2e..f5e4abae96 100644
--- a/doc/classes/AudioEffectNotchFilter.xml
+++ b/doc/classes/AudioEffectNotchFilter.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectPanner.xml b/doc/classes/AudioEffectPanner.xml
index 19c4cd1457..858c48c3b6 100644
--- a/doc/classes/AudioEffectPanner.xml
+++ b/doc/classes/AudioEffectPanner.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="pan" type="float" setter="set_pan" getter="get_pan" default="0.0">
Pan position. Value can range from -1 (fully left) to 1 (fully right).
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml
index b1d229e150..2855d12d51 100644
--- a/doc/classes/AudioEffectPhaser.xml
+++ b/doc/classes/AudioEffectPhaser.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0">
Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4.
@@ -28,6 +26,4 @@
Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml
index 9c28a01650..0c323fd85c 100644
--- a/doc/classes/AudioEffectPitchShift.xml
+++ b/doc/classes/AudioEffectPitchShift.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFTSize" default="3">
The size of the [url=https://en.wikipedia.org/wiki/Fast_Fourier_transform]Fast Fourier transform[/url] buffer. Higher values smooth out the effect over time, but have greater latency. The effects of this higher latency are especially noticeable on sounds that have sudden amplitude changes.
diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml
index 9656718ee8..b32206726d 100644
--- a/doc/classes/AudioEffectRecord.xml
+++ b/doc/classes/AudioEffectRecord.xml
@@ -36,6 +36,4 @@
Specifies the format in which the sample will be recorded. See [enum AudioStreamSample.Format] for available formats.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml
index fbe68cde0e..d931720e88 100644
--- a/doc/classes/AudioEffectReverb.xml
+++ b/doc/classes/AudioEffectReverb.xml
@@ -10,8 +10,6 @@
<tutorials>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="damping" type="float" setter="set_damping" getter="get_damping" default="0.5">
Defines how reflective the imaginary room's walls are. Value can range from 0 to 1.
@@ -38,6 +36,4 @@
Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioEffectSpectrumAnalyzer.xml b/doc/classes/AudioEffectSpectrumAnalyzer.xml
index 10d29ff8ab..b2f2c55aa2 100644
--- a/doc/classes/AudioEffectSpectrumAnalyzer.xml
+++ b/doc/classes/AudioEffectSpectrumAnalyzer.xml
@@ -11,8 +11,6 @@
<link title="https://godotengine.org/asset-library/asset/528">Audio Spectrum Demo</link>
<link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="2.0">
The length of the buffer to keep (in seconds). Higher values keep data around for longer, but require more memory.
diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml
index 663e3e982c..e82892f355 100644
--- a/doc/classes/AudioEffectStereoEnhance.xml
+++ b/doc/classes/AudioEffectStereoEnhance.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="pan_pullout" type="float" setter="set_pan_pullout" getter="get_pan_pullout" default="1.0">
</member>
@@ -16,6 +14,4 @@
<member name="time_pullout_ms" type="float" setter="set_time_pullout" getter="get_time_pullout" default="0.0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioListener2D.xml b/doc/classes/AudioListener2D.xml
new file mode 100644
index 0000000000..a7cdd0348c
--- /dev/null
+++ b/doc/classes/AudioListener2D.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioListener2D" inherits="Node2D" version="4.0">
+ <brief_description>
+ Overrides the location sounds are heard from.
+ </brief_description>
+ <description>
+ Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. Only one [AudioListener2D] can be current. Using [method make_current] will disable the previous [AudioListener2D].
+ If there is no active [AudioListener2D] in the current [Viewport], center of the screen will be used as a hearing point for the audio. [AudioListener2D] needs to be inside [SceneTree] to function.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="clear_current">
+ <return type="void" />
+ <description>
+ Disables the [AudioListener2D]. If it's not set as current, this method will have no effect.
+ </description>
+ </method>
+ <method name="is_current" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this [AudioListener2D] is currently active.
+ </description>
+ </method>
+ <method name="make_current">
+ <return type="void" />
+ <description>
+ Makes the [AudioListener2D] active, setting it as the hearing point for the sounds. If there is already another active [AudioListener2D], it will be disabled.
+ This method will have no effect if the [AudioListener2D] is not added to [SceneTree].
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/Listener3D.xml b/doc/classes/AudioListener3D.xml
index 9cc803f241..4a56071b57 100644
--- a/doc/classes/Listener3D.xml
+++ b/doc/classes/AudioListener3D.xml
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Listener3D" inherits="Node3D" version="4.0">
+<class name="AudioListener3D" inherits="Node3D" version="4.0">
<brief_description>
Overrides the location sounds are heard from.
</brief_description>
<description>
Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. This can be used to listen from a location different from the [Camera3D].
- [b]Note:[/b] There is no 2D equivalent for this node yet.
</description>
<tutorials>
</tutorials>
@@ -26,7 +25,7 @@
<return type="bool" />
<description>
Returns [code]true[/code] if the listener was made current using [method make_current], [code]false[/code] otherwise.
- [b]Note:[/b] There may be more than one Listener3D marked as "current" in the scene tree, but only the one that was made current last will be used.
+ [b]Note:[/b] There may be more than one AudioListener3D marked as "current" in the scene tree, but only the one that was made current last will be used.
</description>
</method>
<method name="make_current">
@@ -36,6 +35,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index 8a58b178d8..cff7199c4a 100644
--- a/doc/classes/AudioStream.xml
+++ b/doc/classes/AudioStream.xml
@@ -13,13 +13,37 @@
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
</tutorials>
<methods>
+ <method name="_get_length" qualifiers="virtual const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_stream_name" qualifiers="virtual const">
+ <return type="String" />
+ <description>
+ </description>
+ </method>
+ <method name="_instance_playback" qualifiers="virtual const">
+ <return type="AudioStreamPlayback" />
+ <description>
+ </description>
+ </method>
+ <method name="_is_monophonic" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
<method name="get_length" qualifiers="const">
<return type="float" />
<description>
Returns the length of the audio stream in seconds.
</description>
</method>
+ <method name="is_monophonic" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony.
+ </description>
+ </method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioStreamGenerator.xml b/doc/classes/AudioStreamGenerator.xml
index 8464bc8a85..05406846ce 100644
--- a/doc/classes/AudioStreamGenerator.xml
+++ b/doc/classes/AudioStreamGenerator.xml
@@ -12,8 +12,6 @@
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
<link title="https://godotengine.org/article/godot-32-will-get-new-audio-features">Godot 3.2 will get new audio features</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.5">
The length of the buffer to generate (in seconds). Lower values result in less latency, but require the script to generate audio data faster, resulting in increased CPU usage and more risk for audio cracking if the CPU can't keep up.
@@ -24,6 +22,4 @@
According to the [url=https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem]Nyquist-Shannon sampling theorem[/url], there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are generating lower-pitched sounds such as voices, lower sample rates such as [code]32000[/code] or [code]22050[/code] may be usable with no loss in quality.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml
index d99d041053..7520d5d97a 100644
--- a/doc/classes/AudioStreamGeneratorPlayback.xml
+++ b/doc/classes/AudioStreamGeneratorPlayback.xml
@@ -50,6 +50,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioStreamMicrophone.xml b/doc/classes/AudioStreamMicrophone.xml
index e73e50e3a9..13b0c2cd67 100644
--- a/doc/classes/AudioStreamMicrophone.xml
+++ b/doc/classes/AudioStreamMicrophone.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml
index cb01aa75e8..bcf0b55b31 100644
--- a/doc/classes/AudioStreamPlayback.xml
+++ b/doc/classes/AudioStreamPlayback.xml
@@ -10,7 +10,45 @@
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
</tutorials>
<methods>
+ <method name="_get_loop_count" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_playback_position" qualifiers="virtual const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_is_playing" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_mix" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="buffer" type="AudioFrame*" />
+ <argument index="1" name="rate_scale" type="float" />
+ <argument index="2" name="frames" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_seek" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="position" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_start" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="from_pos" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_stop" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioStreamPlaybackResampled.xml b/doc/classes/AudioStreamPlaybackResampled.xml
index faa563fdd8..d60d1acb7a 100644
--- a/doc/classes/AudioStreamPlaybackResampled.xml
+++ b/doc/classes/AudioStreamPlaybackResampled.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index a6c437f875..b692ae858e 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -56,6 +56,9 @@
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
Bus on which this audio is playing.
</member>
+ <member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1">
+ The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
+ </member>
<member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0">
If the audio configuration has more than two speakers, this sets the target channels. See [enum MixTarget] constants.
</member>
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index c40c223091..9c76eefbf9 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -61,6 +61,9 @@
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="2000.0">
Maximum distance from which audio is still hearable.
</member>
+ <member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1">
+ The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
+ </member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
</member>
@@ -84,6 +87,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index 584f03399c..bd344fad29 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. For greater realism, a low-pass filter is automatically applied to distant sounds. This can be disabled by setting [member attenuation_filter_cutoff_hz] to [code]20500[/code].
- By default, audio is heard from the camera position. This can be changed by adding a [Listener3D] node to the scene and enabling it by calling [method Listener3D.make_current] on it.
+ By default, audio is heard from the camera position. This can be changed by adding a [AudioListener3D] node to the scene and enabling it by calling [method AudioListener3D.make_current] on it.
See also [AudioStreamPlayer] to play a sound non-positionally.
[b]Note:[/b] Hiding an [AudioStreamPlayer3D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer3D]'s audio output, set [member unit_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
</description>
@@ -81,10 +81,10 @@
Sets the absolute maximum of the soundlevel, in decibels.
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0">
- Sets the distance from which the [member out_of_range_mode] takes effect. Has no effect if set to 0.
+ The distance past which the sound can no longer be heard at all. Only has an effect if set to a value greater than [code]0.0[/code]. [member max_distance] works in tandem with [member unit_size]. However, unlike [member unit_size] whose behavior depends on the [member attenuation_model], [member max_distance] always works in a linear fashion. This can be used to prevent the [AudioStreamPlayer3D] from requiring audio mixing when the listener is far away, which saves CPU resources.
</member>
- <member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" enum="AudioStreamPlayer3D.OutOfRangeMode" default="0">
- Decides if audio should pause when source is outside of [member max_distance] range.
+ <member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1">
+ The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
</member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
@@ -125,12 +125,6 @@
<constant name="ATTENUATION_DISABLED" value="3" enum="AttenuationModel">
No dampening of loudness according to distance. The sound will still be heard positionally, unlike an [AudioStreamPlayer].
</constant>
- <constant name="OUT_OF_RANGE_MIX" value="0" enum="OutOfRangeMode">
- Mix this audio in, even when it's out of range. This increases CPU usage, but keeps the sound playing at the correct position if the camera leaves and enters the [AudioStreamPlayer3D]'s [member max_distance] radius.
- </constant>
- <constant name="OUT_OF_RANGE_PAUSE" value="1" enum="OutOfRangeMode">
- Pause this audio when it gets out of range. This decreases CPU usage, but will cause the sound to restart if the camera leaves and enters the [AudioStreamPlayer3D]'s [member max_distance] radius.
- </constant>
<constant name="DOPPLER_TRACKING_DISABLED" value="0" enum="DopplerTracking">
Disables doppler tracking.
</constant>
diff --git a/doc/classes/AudioStreamRandomPitch.xml b/doc/classes/AudioStreamRandomPitch.xml
index 7e93b3267c..0f580699e9 100644
--- a/doc/classes/AudioStreamRandomPitch.xml
+++ b/doc/classes/AudioStreamRandomPitch.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="audio_stream" type="AudioStream" setter="set_audio_stream" getter="get_audio_stream">
The current [AudioStream].
@@ -18,6 +16,4 @@
The intensity of random pitch variation.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml
index 55ee573811..6f1dd9fc76 100644
--- a/doc/classes/BackBufferCopy.xml
+++ b/doc/classes/BackBufferCopy.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" enum="BackBufferCopy.CopyMode" default="1">
Buffer mode. See [enum CopyMode] constants.
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index bbf7c5eb6d..a5516636aa 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -683,7 +683,7 @@
</constant>
<constant name="BILLBOARD_PARTICLES" value="3" enum="BillboardMode">
Used for particle systems when assigned to [GPUParticles3D] and [CPUParticles3D] nodes. Enables [code]particles_anim_*[/code] properties.
- The [member ParticlesMaterial.anim_speed] or [member CPUParticles3D.anim_speed] should also be set to a positive value for the animation to play.
+ The [member ParticlesMaterial.anim_speed_min] or [member CPUParticles3D.anim_speed_min] should also be set to a value bigger than zero for the animation to play.
</constant>
<constant name="TEXTURE_CHANNEL_RED" value="0" enum="TextureChannel">
Used to read from the red channel of a texture.
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 8fab84d885..63df5c40b2 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -71,6 +71,13 @@
A negative determinant means the basis has a negative scale. A zero determinant means the basis isn't invertible, and is usually considered invalid.
</description>
</method>
+ <method name="from_scale" qualifiers="static">
+ <return type="Basis" />
+ <argument index="0" name="scale" type="Vector3" />
+ <description>
+ Constructs a pure scale basis matrix with no rotation or shearing. The scale values are set as the diagonal of the matrix, and the other parts of the matrix are zero.
+ </description>
+ </method>
<method name="get_euler" qualifiers="const">
<return type="Vector3" />
<description>
@@ -120,6 +127,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Basis" />
<description>
</description>
@@ -152,6 +164,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Basis" />
<description>
</description>
diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml
index 9a349c957f..0997896260 100644
--- a/doc/classes/BitMap.xml
+++ b/doc/classes/BitMap.xml
@@ -81,6 +81,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml
index f9f3ea21f1..ef0778682f 100644
--- a/doc/classes/Bone2D.xml
+++ b/doc/classes/Bone2D.xml
@@ -90,6 +90,4 @@
Rest transform of the bone. You can reset the node's transforms to this value using [method apply_rest].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/BoneAttachment3D.xml b/doc/classes/BoneAttachment3D.xml
index b493002c70..a1670430e6 100644
--- a/doc/classes/BoneAttachment3D.xml
+++ b/doc/classes/BoneAttachment3D.xml
@@ -78,6 +78,4 @@
The name of the attached bone.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/BoxMesh.xml b/doc/classes/BoxMesh.xml
index dda5e2f1e5..af3365b6ea 100644
--- a/doc/classes/BoxMesh.xml
+++ b/doc/classes/BoxMesh.xml
@@ -10,8 +10,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)">
The box's width, height and depth.
@@ -26,6 +24,4 @@
Number of extra edge loops inserted along the X axis.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/BoxShape3D.xml b/doc/classes/BoxShape3D.xml
index 5704de905b..3bfded6512 100644
--- a/doc/classes/BoxShape3D.xml
+++ b/doc/classes/BoxShape3D.xml
@@ -11,13 +11,9 @@
<link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)">
The box's width, height and depth.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml
index 302a213836..9229e69fa7 100644
--- a/doc/classes/ButtonGroup.xml
+++ b/doc/classes/ButtonGroup.xml
@@ -34,6 +34,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index ab6897ca1d..9226140c1a 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -18,25 +18,23 @@
Sets this node's properties to match a given [GPUParticles2D] node with an assigned [ParticlesMaterial].
</description>
</method>
- <method name="get_param" qualifiers="const">
- <return type="float" />
+ <method name="get_param_curve" qualifiers="const">
+ <return type="Curve" />
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<description>
- Returns the base value of the parameter specified by [enum Parameter].
+ Returns the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
- <method name="get_param_curve" qualifiers="const">
- <return type="Curve" />
+ <method name="get_param_max" qualifiers="const">
+ <return type="float" />
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<description>
- Returns the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
- <method name="get_param_randomness" qualifiers="const">
+ <method name="get_param_min" qualifiers="const">
<return type="float" />
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<description>
- Returns the randomness factor of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
@@ -52,28 +50,26 @@
Restarts the particle emitter.
</description>
</method>
- <method name="set_param">
+ <method name="set_param_curve">
<return type="void" />
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
- <argument index="1" name="value" type="float" />
+ <argument index="1" name="curve" type="Curve" />
<description>
- Sets the base value of the parameter specified by [enum Parameter].
+ Sets the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
- <method name="set_param_curve">
+ <method name="set_param_max">
<return type="void" />
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
- <argument index="1" name="curve" type="Curve" />
+ <argument index="1" name="value" type="float" />
<description>
- Sets the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
- <method name="set_param_randomness">
+ <method name="set_param_min">
<return type="void" />
<argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
- <argument index="1" name="randomness" type="float" />
+ <argument index="1" name="value" type="float" />
<description>
- Sets the randomness factor of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_particle_flag">
@@ -89,41 +85,33 @@
<member name="amount" type="int" setter="set_amount" getter="get_amount" default="8">
Number of particles emitted in one emission cycle.
</member>
- <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0">
- Initial rotation applied to each particle, in degrees.
- </member>
<member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's rotation will be animated along this [Curve].
</member>
- <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Rotation randomness ratio.
+ <member name="angle_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
</member>
- <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
- Initial angular velocity applied to each particle. Sets the speed of rotation of the particle.
+ <member name="angle_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
<member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's angular velocity will vary along this [Curve].
</member>
- <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Angular velocity randomness ratio.
+ <member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
</member>
- <member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0">
- Particle animation offset.
+ <member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
<member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation offset will vary along this [Curve].
</member>
- <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Animation offset randomness ratio.
+ <member name="anim_offset_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
</member>
- <member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0">
- Particle animation speed.
+ <member name="anim_offset_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
<member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation speed will vary along this [Curve].
</member>
- <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Animation speed randomness ratio.
+ <member name="anim_speed_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ </member>
+ <member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
Each particle's initial color. If [member texture] is defined, it will be multiplied by this color.
@@ -131,14 +119,12 @@
<member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp">
Each particle's color will vary along this [Gradient] (multiplied with [member color]).
</member>
- <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0">
- The rate at which particles lose velocity.
- </member>
<member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Damping will vary along this [Curve].
</member>
- <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Damping randomness ratio.
+ <member name="damping_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ </member>
+ <member name="damping_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
<member name="direction" type="Vector2" setter="set_direction" getter="get_direction" default="Vector2(1, 0)">
Unit vector specifying the particles' emission direction.
@@ -179,20 +165,16 @@
<member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2(0, 980)">
Gravity applied to every particle.
</member>
- <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0">
- Initial hue variation applied to each particle.
- </member>
<member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's hue will vary along this [Curve].
</member>
- <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Hue variation randomness ratio.
+ <member name="hue_variation_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ </member>
+ <member name="hue_variation_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
- <member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
- Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation.
+ <member name="initial_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
</member>
- <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Initial velocity randomness ratio.
+ <member name="initial_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
<member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0">
Amount of time each particle will exist.
@@ -200,14 +182,12 @@
<member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0">
Particle lifetime randomness ratio.
</member>
- <member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0">
- Linear acceleration applied to each particle in the direction of motion.
- </member>
<member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's linear acceleration will vary along this [Curve].
</member>
- <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Linear acceleration randomness ratio.
+ <member name="linear_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ </member>
+ <member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
<member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
@@ -215,14 +195,12 @@
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end.
</member>
- <member name="orbit_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
- Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
- </member>
<member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's orbital velocity will vary along this [Curve].
</member>
- <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Orbital velocity randomness ratio.
+ <member name="orbit_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ </member>
+ <member name="orbit_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
<member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
Align Y axis of particle with the direction of its velocity.
@@ -230,41 +208,41 @@
<member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0">
Particle system starts as if it had already run for this many seconds.
</member>
- <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0">
- Radial acceleration applied to each particle. Makes particle accelerate away from origin.
- </member>
<member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's radial acceleration will vary along this [Curve].
</member>
- <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Radial acceleration randomness ratio.
+ <member name="radial_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ </member>
+ <member name="radial_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
<member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0">
Emission lifetime randomness ratio.
</member>
- <member name="scale_amount" type="float" setter="set_param" getter="get_param" default="1.0">
- Initial scale applied to each particle.
- </member>
<member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's scale will vary along this [Curve].
</member>
- <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Scale randomness ratio.
+ <member name="scale_amount_max" type="float" setter="set_param_max" getter="get_param_max" default="1.0">
+ </member>
+ <member name="scale_amount_min" type="float" setter="set_param_min" getter="get_param_min" default="1.0">
+ </member>
+ <member name="scale_curve_x" type="Curve" setter="set_scale_curve_x" getter="get_scale_curve_x">
+ </member>
+ <member name="scale_curve_y" type="Curve" setter="set_scale_curve_y" getter="get_scale_curve_y">
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles.
</member>
+ <member name="split_scale" type="bool" setter="set_split_scale" getter="get_split_scale" default="false">
+ </member>
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees.
</member>
- <member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0">
- Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
- </member>
<member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's tangential acceleration will vary along this [Curve].
</member>
- <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Tangential acceleration randomness ratio.
+ <member name="tangential_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ </member>
+ <member name="tangential_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
Particle texture. If [code]null[/code], particles will be squares.
@@ -278,40 +256,40 @@
Particles are drawn in order of remaining lifetime.
</constant>
<constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set initial velocity properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties.
</constant>
<constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angular velocity properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties.
</constant>
<constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set orbital velocity properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties.
</constant>
<constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set linear acceleration properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties.
</constant>
<constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set radial acceleration properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties.
</constant>
<constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set tangential acceleration properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties.
</constant>
<constant name="PARAM_DAMPING" value="6" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set damping properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties.
</constant>
<constant name="PARAM_ANGLE" value="7" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angle properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties.
</constant>
<constant name="PARAM_SCALE" value="8" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set scale properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties.
</constant>
<constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set hue variation properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties.
</constant>
<constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation speed properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties.
</constant>
<constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation offset properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties.
</constant>
<constant name="PARAM_MAX" value="12" enum="Parameter">
Represents the size of the [enum Parameter] enum.
diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml
index 8aa3573996..fe8c354427 100644
--- a/doc/classes/CPUParticles3D.xml
+++ b/doc/classes/CPUParticles3D.xml
@@ -17,25 +17,23 @@
Sets this node's properties to match a given [GPUParticles3D] node with an assigned [ParticlesMaterial].
</description>
</method>
- <method name="get_param" qualifiers="const">
- <return type="float" />
+ <method name="get_param_curve" qualifiers="const">
+ <return type="Curve" />
<argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<description>
- Returns the base value of the parameter specified by [enum Parameter].
+ Returns the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
- <method name="get_param_curve" qualifiers="const">
- <return type="Curve" />
+ <method name="get_param_max" qualifiers="const">
+ <return type="float" />
<argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<description>
- Returns the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
- <method name="get_param_randomness" qualifiers="const">
+ <method name="get_param_min" qualifiers="const">
<return type="float" />
<argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<description>
- Returns the randomness factor of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
@@ -51,28 +49,28 @@
Restarts the particle emitter.
</description>
</method>
- <method name="set_param">
+ <method name="set_param_curve">
<return type="void" />
<argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
- <argument index="1" name="value" type="float" />
+ <argument index="1" name="curve" type="Curve" />
<description>
- Sets the base value of the parameter specified by [enum Parameter].
+ Sets the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
- <method name="set_param_curve">
+ <method name="set_param_max">
<return type="void" />
<argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
- <argument index="1" name="curve" type="Curve" />
+ <argument index="1" name="value" type="float" />
<description>
- Sets the [Curve] of the parameter specified by [enum Parameter].
+ Sets the maximum value for the given parameter
</description>
</method>
- <method name="set_param_randomness">
+ <method name="set_param_min">
<return type="void" />
<argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
- <argument index="1" name="randomness" type="float" />
+ <argument index="1" name="value" type="float" />
<description>
- Sets the randomness factor of the parameter specified by [enum Parameter].
+ Sets the minimum value for the given parameter
</description>
</method>
<method name="set_particle_flag">
@@ -88,41 +86,41 @@
<member name="amount" type="int" setter="set_amount" getter="get_amount" default="8">
Number of particles emitted in one emission cycle.
</member>
- <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0">
- Initial rotation applied to each particle, in degrees.
- </member>
<member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's rotation will be animated along this [Curve].
</member>
- <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Rotation randomness ratio.
+ <member name="angle_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum angle.
</member>
- <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
- Initial angular velocity applied to each particle. Sets the speed of rotation of the particle.
+ <member name="angle_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum angle.
</member>
<member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's angular velocity will vary along this [Curve].
</member>
- <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Angular velocity randomness ratio.
+ <member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum angular velocity.
</member>
- <member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0">
- Particle animation offset.
+ <member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum angular velocity.
</member>
<member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation offset will vary along this [Curve].
</member>
- <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Animation offset randomness ratio.
+ <member name="anim_offset_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum animation offset.
</member>
- <member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0">
- Particle animation speed.
+ <member name="anim_offset_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum animation offset.
</member>
<member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation speed will vary along this [Curve].
</member>
- <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Animation speed randomness ratio.
+ <member name="anim_speed_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum particle animation speed.
+ </member>
+ <member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum particle animation speed.
</member>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
Each particle's initial color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code].
@@ -130,14 +128,14 @@
<member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp">
Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]).
</member>
- <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0">
- The rate at which particles lose velocity.
- </member>
<member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Damping will vary along this [Curve].
</member>
- <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Damping randomness ratio.
+ <member name="damping_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum damping.
+ </member>
+ <member name="damping_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum damping
</member>
<member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3(1, 0, 0)">
Unit vector specifying the particles' emission direction.
@@ -193,20 +191,20 @@
<member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -9.8, 0)">
Gravity applied to every particle.
</member>
- <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0">
- Initial hue variation applied to each particle.
- </member>
<member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's hue will vary along this [Curve].
</member>
- <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Hue variation randomness ratio.
+ <member name="hue_variation_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum hue variation.
</member>
- <member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
- Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation.
+ <member name="hue_variation_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum hue variation.
</member>
- <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Initial velocity randomness ratio.
+ <member name="initial_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum value of the initial velocity.
+ </member>
+ <member name="initial_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum value of the initial velocity.
</member>
<member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0">
Amount of time each particle will exist.
@@ -214,14 +212,14 @@
<member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0">
Particle lifetime randomness ratio.
</member>
- <member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0">
- Linear acceleration applied to each particle in the direction of motion.
- </member>
<member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's linear acceleration will vary along this [Curve].
</member>
- <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Linear acceleration randomness ratio.
+ <member name="linear_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum linear acceleration.
+ </member>
+ <member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum linear acceleration.
</member>
<member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
@@ -232,15 +230,14 @@
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end.
</member>
- <member name="orbit_velocity" type="float" setter="set_param" getter="get_param">
- Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second.
- This property is only available when [member particle_flag_disable_z] is [code]true[/code].
- </member>
<member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's orbital velocity will vary along this [Curve].
</member>
- <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
- Orbital velocity randomness ratio.
+ <member name="orbit_velocity_max" type="float" setter="set_param_max" getter="get_param_max">
+ Maximum orbit velocity.
+ </member>
+ <member name="orbit_velocity_min" type="float" setter="set_param_min" getter="get_param_min">
+ Minimum orbit velocity.
</member>
<member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
Align Y axis of particle with the direction of its velocity.
@@ -249,46 +246,58 @@
If [code]true[/code], particles will not move on the Z axis.
</member>
<member name="particle_flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
- If [code]true[/code], particles rotate around Y axis by [member angle].
+ If [code]true[/code], particles rotate around Y axis by [member angle_min].
</member>
<member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0">
Particle system starts as if it had already run for this many seconds.
</member>
- <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0">
- Radial acceleration applied to each particle. Makes particle accelerate away from origin.
- </member>
<member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's radial acceleration will vary along this [Curve].
</member>
- <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Radial acceleration randomness ratio.
+ <member name="radial_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum radial acceleration.
+ </member>
+ <member name="radial_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum radial acceleration.
</member>
<member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0">
Emission lifetime randomness ratio.
</member>
- <member name="scale_amount" type="float" setter="set_param" getter="get_param" default="1.0">
- Initial scale applied to each particle.
- </member>
<member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's scale will vary along this [Curve].
</member>
- <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Scale randomness ratio.
+ <member name="scale_amount_max" type="float" setter="set_param_max" getter="get_param_max" default="1.0">
+ Maximum scale.
+ </member>
+ <member name="scale_amount_min" type="float" setter="set_param_min" getter="get_param_min" default="1.0">
+ Minimum scale.
+ </member>
+ <member name="scale_curve_x" type="Curve" setter="set_scale_curve_x" getter="get_scale_curve_x">
+ Curve for the scale over life, along the x axis.
+ </member>
+ <member name="scale_curve_y" type="Curve" setter="set_scale_curve_y" getter="get_scale_curve_y">
+ Curve for the scale over life, along the y axis.
+ </member>
+ <member name="scale_curve_z" type="Curve" setter="set_scale_curve_z" getter="get_scale_curve_z">
+ Curve for the scale over life, along the z axis.
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles.
</member>
+ <member name="split_scale" type="bool" setter="set_split_scale" getter="get_split_scale" default="false">
+ If set to true, three different scale curves can be specified, one per scale axis.
+ </member>
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes.
</member>
- <member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0">
- Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
- </member>
<member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's tangential acceleration will vary along this [Curve].
</member>
- <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Tangential acceleration randomness ratio.
+ <member name="tangential_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum tangent acceleration.
+ </member>
+ <member name="tangential_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum tangent acceleration.
</member>
</members>
<constants>
@@ -302,40 +311,40 @@
Particles are drawn in order of depth.
</constant>
<constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set initial velocity properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties.
</constant>
<constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angular velocity properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties.
</constant>
<constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set orbital velocity properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties.
</constant>
<constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set linear acceleration properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties.
</constant>
<constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set radial acceleration properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties.
</constant>
<constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set tangential acceleration properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties.
</constant>
<constant name="PARAM_DAMPING" value="6" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set damping properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties.
</constant>
<constant name="PARAM_ANGLE" value="7" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angle properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties.
</constant>
<constant name="PARAM_SCALE" value="8" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set scale properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties.
</constant>
<constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set hue variation properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties.
</constant>
<constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation speed properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties.
</constant>
<constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation offset properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties.
</constant>
<constant name="PARAM_MAX" value="12" enum="Parameter">
Represents the size of the [enum Parameter] enum.
diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml
index 5228df706b..0a95836e96 100644
--- a/doc/classes/Callable.xml
+++ b/doc/classes/Callable.xml
@@ -125,6 +125,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Callable" />
<description>
Returns [code]true[/code] if both [Callable]s invoke different targets.
@@ -132,6 +137,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Callable" />
<description>
Returns [code]true[/code] if both [Callable]s invoke the same custom target.
@@ -158,6 +168,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CallbackTweener.xml b/doc/classes/CallbackTweener.xml
index fab5f06ba8..70709d269c 100644
--- a/doc/classes/CallbackTweener.xml
+++ b/doc/classes/CallbackTweener.xml
@@ -22,6 +22,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index d0ff66ae06..a3a891cdcb 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem]-based nodes.
+ Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport.
This node is intended to be a simple helper to get things going quickly, but more functionality may be desired to change how the camera works. To make your own custom camera node, inherit it from [Node2D] and change the transform of the canvas by setting [member Viewport.canvas_transform] in [Viewport] (you can obtain the current [Viewport] by using [method Node.get_viewport]).
Note that the [Camera2D] node's [code]position[/code] doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use [method get_camera_screen_center] to get the real position.
</description>
@@ -81,7 +82,7 @@
The Camera2D's anchor point. See [enum AnchorMode] constants.
</member>
<member name="current" type="bool" setter="set_current" getter="is_current" default="false">
- If [code]true[/code], the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one.
+ If [code]true[/code], the camera acts as the active camera for its [Viewport] ancestor. Only one camera can be current in a given viewport, so setting a different camera in the same viewport [code]current[/code] will disable whatever camera was already active in that viewport.
</member>
<member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport">
The custom [Viewport] node attached to the [Camera2D]. If [code]null[/code] or not a [Viewport], uses the default viewport instead.
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index 8a91a91b22..cd17a31e23 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -26,7 +26,7 @@
<method name="get_camera_transform" qualifiers="const">
<return type="Transform3D" />
<description>
- Gets the camera transform. Subclassed cameras such as [ClippedCamera3D] may provide different transforms than the [Node] transform.
+ Returns the transform of the camera plus the vertical ([member v_offset]) and horizontal ([member h_offset]) offsets; and any other adjustments made to the position and orientation of the camera by subclassed cameras such as [ClippedCamera3D] and [XRCamera3D].
</description>
</method>
<method name="get_cull_mask_value" qualifiers="const">
diff --git a/doc/classes/CameraEffects.xml b/doc/classes/CameraEffects.xml
index 7a874d31db..5cbd489143 100644
--- a/doc/classes/CameraEffects.xml
+++ b/doc/classes/CameraEffects.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="dof_blur_amount" type="float" setter="set_dof_blur_amount" getter="get_dof_blur_amount" default="0.1">
The amount of blur for both near and far depth-of-field effects. The amount of blur increases the radius of the blur effect, making the affected area blurrier. However, If the amount is too high, you might start to see lines appearing, especially when using a low quality blur.
@@ -40,6 +38,4 @@
If [code]true[/code], overrides the manual or automatic exposure defined in the [Environment] with the value in [member override_exposure].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CameraTexture.xml b/doc/classes/CameraTexture.xml
index c0730129a9..2030d3bb45 100644
--- a/doc/classes/CameraTexture.xml
+++ b/doc/classes/CameraTexture.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id" default="0">
The ID of the [CameraFeed] for which we want to display the image.
@@ -22,6 +20,4 @@
Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CanvasGroup.xml b/doc/classes/CanvasGroup.xml
index ceeda6c3f5..e9b2c9a915 100644
--- a/doc/classes/CanvasGroup.xml
+++ b/doc/classes/CanvasGroup.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="clear_margin" type="float" setter="set_clear_margin" getter="get_clear_margin" default="10.0">
</member>
@@ -16,6 +14,4 @@
<member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="is_using_mipmaps" default="false">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 2c92ce0185..501f89fa0d 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -106,6 +106,20 @@
Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation.
</description>
</method>
+ <method name="draw_msdf_texture_rect_region">
+ <return type="void" />
+ <argument index="0" name="texture" type="Texture2D" />
+ <argument index="1" name="rect" type="Rect2" />
+ <argument index="2" name="src_rect" type="Rect2" />
+ <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <argument index="4" name="outline" type="float" default="0.0" />
+ <argument index="5" name="pixel_range" type="float" default="4.0" />
+ <description>
+ Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See [method FontData.set_multichannel_signed_distance_field] for more information and caveats about MSDF font rendering.
+ If [code]outline[/code] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [code]outline[/code] radius.
+ Value of the [code]pixel_range[/code] should the same that was used during distance field texture generation.
+ </description>
+ </method>
<method name="draw_multiline">
<return type="void" />
<argument index="0" name="points" type="PackedVector2Array" />
diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml
index c2d44c1d17..3f9dd02e4c 100644
--- a/doc/classes/CanvasItemMaterial.xml
+++ b/doc/classes/CanvasItemMaterial.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="CanvasItemMaterial.BlendMode" default="0">
The manner in which a material's rendering is applied to underlying textures.
@@ -30,7 +28,7 @@
[b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
</member>
<member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation" default="false">
- If [code]true[/code], enable spritesheet-based animation features when assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member CPUParticles2D.anim_speed] should also be set to a positive value for the animation to play.
+ If [code]true[/code], enable spritesheet-based animation features when assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed_max] or [member CPUParticles2D.anim_speed_max] should also be set to a positive value for the animation to play.
This property (and other [code]particles_anim_*[/code] properties that depend on it) has no effect on other types of nodes.
</member>
</members>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index 616fb24a6f..2f99f94893 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -45,6 +45,4 @@
The layer's transform.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CanvasModulate.xml b/doc/classes/CanvasModulate.xml
index 3540fa423f..d5f85132a5 100644
--- a/doc/classes/CanvasModulate.xml
+++ b/doc/classes/CanvasModulate.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
The tint color to apply.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CanvasTexture.xml b/doc/classes/CanvasTexture.xml
index f7147d9f0b..28a62ae1e1 100644
--- a/doc/classes/CanvasTexture.xml
+++ b/doc/classes/CanvasTexture.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="diffuse_texture" type="Texture2D" setter="set_diffuse_texture" getter="get_diffuse_texture">
</member>
@@ -24,6 +22,4 @@
<member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="CanvasItem.TextureRepeat" default="0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CapsuleMesh.xml b/doc/classes/CapsuleMesh.xml
index b8605ccaec..3b4e60ce93 100644
--- a/doc/classes/CapsuleMesh.xml
+++ b/doc/classes/CapsuleMesh.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="height" type="float" setter="set_height" getter="get_height" default="3.0">
Total height of the capsule mesh (including the hemispherical ends).
@@ -24,6 +22,4 @@
Number of rings along the height of the capsule.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml
index 8ed7d56557..74db0da033 100644
--- a/doc/classes/CapsuleShape2D.xml
+++ b/doc/classes/CapsuleShape2D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="height" type="float" setter="set_height" getter="get_height" default="30.0">
The capsule's height.
@@ -18,6 +16,4 @@
The capsule's radius.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CapsuleShape3D.xml b/doc/classes/CapsuleShape3D.xml
index c2b13224cf..8856ec3779 100644
--- a/doc/classes/CapsuleShape3D.xml
+++ b/doc/classes/CapsuleShape3D.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="height" type="float" setter="set_height" getter="get_height" default="3.0">
The capsule's height.
@@ -19,6 +17,4 @@
The capsule's radius.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml
index 435f4eb06b..8f8a978f9e 100644
--- a/doc/classes/CenterContainer.xml
+++ b/doc/classes/CenterContainer.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="use_top_left" type="bool" setter="set_use_top_left" getter="is_using_top_left" default="false">
If [code]true[/code], centers children relative to the [CenterContainer]'s top left corner.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml
index 1f63b530b1..b00031edf6 100644
--- a/doc/classes/CharFXTransform.xml
+++ b/doc/classes/CharFXTransform.xml
@@ -10,8 +10,6 @@
<link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link>
<link title="RichTextEffect test project (third-party)">https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(0, 0, 0, 1)">
The color the character will be drawn with.
@@ -30,6 +28,12 @@
<member name="font" type="RID" setter="set_font" getter="get_font">
Font resource used to render glyph.
</member>
+ <member name="glyph_count" type="int" setter="set_glyph_count" getter="get_glyph_count" default="0">
+ Number of glyphs in the grapheme cluster. This value is set in the first glyph of a cluster. Setting this property won't affect drawing.
+ </member>
+ <member name="glyph_flags" type="int" setter="set_glyph_flags" getter="get_glyph_flags" default="0">
+ Glyph flags. See [enum TextServer.GraphemeFlag] for more info. Setting this property won't affect drawing.
+ </member>
<member name="glyph_index" type="int" setter="set_glyph_index" getter="get_glyph_index" default="0">
Font specific glyph index.
</member>
@@ -46,6 +50,4 @@
If [code]true[/code], the character will be drawn. If [code]false[/code], the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to [code]Color(1, 1, 1, 0)[/code] instead.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml
index e23ceedc28..35702070be 100644
--- a/doc/classes/CharacterBody2D.xml
+++ b/doc/classes/CharacterBody2D.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CharacterBody2D" inherits="PhysicsBody2D" version="4.0">
<brief_description>
- Character body 2D node.
+ Specialized 2D physics body node for characters moved by script.
</brief_description>
<description>
- Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses:
- [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics.
- [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path.
+ Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a [AnimatableBody2D]. However, they have two main uses:
+ [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody2D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics.
+ [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [AnimatableBody2D]), which allows them to be moved by code and push other bodies on their path.
</description>
<tutorials>
<link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
@@ -107,10 +107,11 @@
<method name="move_and_slide">
<return type="bool" />
<description>
- Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
+ Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidDynamicBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
Modifies [member linear_velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for detailed information about collisions that occurred, use [method get_slide_collision].
When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions.
+ The general behaviour and available properties change according to the [member motion_mode].
Returns [code]true[/code] if the body collided, otherwise, returns [code]false[/code].
</description>
</method>
@@ -132,21 +133,30 @@
<member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398">
Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees.
</member>
- <member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="0.0">
+ <member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="1.0">
Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction].
As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping.
</member>
- <member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="false">
+ <member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true">
If [code]true[/code], the body will not slide on floor's slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still.
</member>
+ <member name="free_mode_min_slide_angle" type="float" setter="set_free_mode_min_slide_angle" getter="get_free_mode_min_slide_angle" default="0.261799">
+ Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees.
+ </member>
<member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2(0, 0)">
Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide].
</member>
<member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4">
Maximum number of times the body can change direction before it stops when calling [method move_and_slide].
</member>
- <member name="moving_platform_ignore_layers" type="int" setter="set_moving_platform_ignore_layers" getter="get_moving_platform_ignore_layers" default="0">
- Collision layers that will be excluded for detecting bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all touching bodies are detected and propagate their velocity. You can add excluded layers to ignore bodies that are contained in these layers.
+ <member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody2D.MotionMode" default="0">
+ Sets the motion mode which defines the behaviour of [method move_and_slide]. See [enum MotionMode] constants for available modes.
+ </member>
+ <member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295">
+ Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity.
+ </member>
+ <member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0">
+ Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored.
</member>
<member name="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true">
If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically.
@@ -156,5 +166,11 @@
</member>
</members>
<constants>
+ <constant name="MOTION_MODE_GROUNDED" value="0" enum="MotionMode">
+ Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for sided games like platformers.
+ </constant>
+ <constant name="MOTION_MODE_FREE" value="1" enum="MotionMode">
+ Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will always be constant. This mode is suitable for top-down games.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
index 85135d5509..66d9940b60 100644
--- a/doc/classes/CharacterBody3D.xml
+++ b/doc/classes/CharacterBody3D.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CharacterBody3D" inherits="PhysicsBody3D" version="4.0">
<brief_description>
- Character body 3D node.
+ Specialized 3D physics body node for characters moved by script.
</brief_description>
<description>
- Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses:
+ Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a [AnimatableBody3D]. However, they have two main uses:
[b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics.
- [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path.
+ [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [AnimatableBody3D]), which allows them to be moved by code and push other bodies on their path.
</description>
<tutorials>
<link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
@@ -29,6 +29,12 @@
Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
</description>
</method>
+ <method name="get_last_motion" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the last motion applied to the [CharacterBody3D] during the last call to [method move_and_slide]. The movement can be split if needed into multiple motion, this method return the last one, it's useful to retrieve the current direction of the movement.
+ </description>
+ </method>
<method name="get_last_slide_collision">
<return type="KinematicCollision3D" />
<description>
@@ -41,6 +47,18 @@
Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
</description>
</method>
+ <method name="get_position_delta" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the travel (position delta) that occurred during the last call to [method move_and_slide].
+ </description>
+ </method>
+ <method name="get_real_velocity" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the current real velocity since the last call to [method move_and_slide]. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to [member linear_velocity] which returns the requested velocity.
+ </description>
+ </method>
<method name="get_slide_collision">
<return type="KinematicCollision3D" />
<argument index="0" name="slide_idx" type="int" />
@@ -54,6 +72,12 @@
Returns the number of times the body collided and changed direction during the last call to [method move_and_slide].
</description>
</method>
+ <method name="get_wall_normal" qualifiers="const">
+ <return type="Vector3" />
+ <description>
+ Returns the surface normal of the wall at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_wall] returns [code]true[/code].
+ </description>
+ </method>
<method name="is_on_ceiling" qualifiers="const">
<return type="bool" />
<description>
@@ -93,7 +117,7 @@
<method name="move_and_slide">
<return type="bool" />
<description>
- Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
+ Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidDynamicBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
Modifies [member linear_velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for more detailed information about collisions that occurred, use [method get_slide_collision].
When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions.
@@ -108,26 +132,66 @@
A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.
A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies.
</member>
+ <member name="floor_block_on_wall" type="bool" setter="set_floor_block_on_wall_enabled" getter="is_floor_block_on_wall_enabled" default="true">
+ If [code]true[/code], the body will be able to move on the floor only. This option avoids to be able to walk on walls, it will however allow to slide down along them.
+ </member>
+ <member name="floor_constant_speed" type="bool" setter="set_floor_constant_speed_enabled" getter="is_floor_constant_speed_enabled" default="false">
+ If [code]false[/code] (by default), the body will move faster on downward slopes and slower on upward slopes.
+ If [code]true[/code], the body will always move at the same speed on the ground no matter the slope. Note that you need to use [member floor_snap_length] to stick along a downward slope at constant speed.
+ </member>
<member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398">
Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees.
</member>
- <member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="false">
+ <member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="0.1">
+ Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction].
+ As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping.
+ </member>
+ <member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true">
If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still.
</member>
<member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)">
Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide].
</member>
- <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4">
+ <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="6">
Maximum number of times the body can change direction before it stops when calling [method move_and_slide].
</member>
- <member name="snap" type="Vector3" setter="set_snap" getter="get_snap" default="Vector3(0, 0, 0)">
- When set to a value different from [code]Vector3(0, 0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide].
- As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector3(0, 0, 0)[/code].
+ <member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody3D.MotionMode" default="0">
+ Sets the motion mode which defines the behaviour of [method move_and_slide]. See [enum MotionMode] constants for available modes.
+ </member>
+ <member name="moving_platform_apply_velocity_on_leave" type="int" setter="set_moving_platform_apply_velocity_on_leave" getter="get_moving_platform_apply_velocity_on_leave" enum="CharacterBody3D.MovingPlatformApplyVelocityOnLeave" default="0">
+ Sets the behaviour to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behaviour.
+ </member>
+ <member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295">
+ Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity.
+ </member>
+ <member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0">
+ Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored.
+ </member>
+ <member name="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true">
+ If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically.
</member>
<member name="up_direction" type="Vector3" setter="set_up_direction" getter="get_up_direction" default="Vector3(0, 1, 0)">
Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector3.UP[/code]. If set to [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games.
</member>
+ <member name="wall_min_slide_angle" type="float" setter="set_wall_min_slide_angle" getter="get_wall_min_slide_angle" default="0.261799">
+ Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. In [code]MOTION_MODE_GROUNDED[/code], it works only when [member floor_block_on_wall] is [code]true[/code].
+ </member>
</members>
<constants>
+ <constant name="MOTION_MODE_GROUNDED" value="0" enum="MotionMode">
+ Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for grounded games like platformers.
+ </constant>
+ <constant name="MOTION_MODE_FREE" value="1" enum="MotionMode">
+ Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will always be constant. This mode is suitable for games without ground like space games.
+ </constant>
+ <constant name="PLATFORM_VEL_ON_LEAVE_ALWAYS" value="0" enum="MovingPlatformApplyVelocityOnLeave">
+ Add the last platform velocity to the [member linear_velocity] when you leave a moving platform.
+ </constant>
+ <constant name="PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY" value="1" enum="MovingPlatformApplyVelocityOnLeave">
+ Add the last platform velocity to the [member linear_velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down.
+ </constant>
+ <constant name="PLATFORM_VEL_ON_LEAVE_NEVER" value="2" enum="MovingPlatformApplyVelocityOnLeave">
+ Do nothing when leaving a platform.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index f13a6ea34a..a674fa8339 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -9,14 +9,10 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" />
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
</members>
- <constants>
- </constants>
<theme_items>
<theme_item name="check_vadjust" data_type="constant" type="int" default="0">
The vertical offset used when rendering the check icons (in pixels).
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index a0a05bcb79..12bd493ae1 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -9,14 +9,10 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" />
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
</members>
- <constants>
- </constants>
<theme_items>
<theme_item name="check_vadjust" data_type="constant" type="int" default="0">
The vertical offset used when rendering the toggle icons (in pixels).
diff --git a/doc/classes/CircleShape2D.xml b/doc/classes/CircleShape2D.xml
index db889b0f1b..3969734d3f 100644
--- a/doc/classes/CircleShape2D.xml
+++ b/doc/classes/CircleShape2D.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0">
The circle's radius.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index 063233fe50..5f39fc48e0 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -30,6 +30,23 @@
Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required.
</description>
</method>
+ <method name="class_get_enum_constants" qualifiers="const">
+ <return type="PackedStringArray" />
+ <argument index="0" name="class" type="StringName" />
+ <argument index="1" name="enum" type="StringName" />
+ <argument index="2" name="no_inheritance" type="bool" default="false" />
+ <description>
+ Returns an array with all the keys in [code]enum[/code] of [code]class[/code] or its ancestry.
+ </description>
+ </method>
+ <method name="class_get_enum_list" qualifiers="const">
+ <return type="PackedStringArray" />
+ <argument index="0" name="class" type="StringName" />
+ <argument index="1" name="no_inheritance" type="bool" default="false" />
+ <description>
+ Returns an array with all the enums of [code]class[/code] or its ancestry.
+ </description>
+ </method>
<method name="class_get_integer_constant" qualifiers="const">
<return type="int" />
<argument index="0" name="class" type="StringName" />
@@ -38,6 +55,15 @@
Returns the value of the integer constant [code]name[/code] of [code]class[/code] or its ancestry. Always returns 0 when the constant could not be found.
</description>
</method>
+ <method name="class_get_integer_constant_enum" qualifiers="const">
+ <return type="StringName" />
+ <argument index="0" name="class" type="StringName" />
+ <argument index="1" name="name" type="StringName" />
+ <argument index="2" name="no_inheritance" type="bool" default="false" />
+ <description>
+ Returns which enum the integer constant [code]name[/code] of [code]class[/code] or its ancestry belongs to.
+ </description>
+ </method>
<method name="class_get_integer_constant_list" qualifiers="const">
<return type="PackedStringArray" />
<argument index="0" name="class" type="StringName" />
@@ -87,6 +113,15 @@
Returns an array with all the signals of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] as described in [method class_get_signal].
</description>
</method>
+ <method name="class_has_enum" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="class" type="StringName" />
+ <argument index="1" name="name" type="StringName" />
+ <argument index="2" name="no_inheritance" type="bool" default="false" />
+ <description>
+ Returns whether [code]class[/code] or its ancestry has an enum called [code]name[/code] or not.
+ </description>
+ </method>
<method name="class_has_integer_constant" qualifiers="const">
<return type="bool" />
<argument index="0" name="class" type="StringName" />
@@ -164,6 +199,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index 47078330f3..d856990ff8 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -17,9 +17,9 @@
Override this method to define how the selected entry should be inserted. If [code]replace[/code] is true, any existing text should be replaced.
</description>
</method>
- <method name="_filter_code_completion_candidates" qualifiers="virtual">
+ <method name="_filter_code_completion_candidates" qualifiers="virtual const">
<return type="Array" />
- <argument index="0" name="candidates" type="Array" />
+ <argument index="0" name="candidates" type="Dictionary[]" />
<description>
Override this method to define what items in [code]candidates[/code] should be displayed.
Both [code]candidates[/code] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content.
@@ -671,6 +671,12 @@
<theme_item name="read_only" data_type="style" type="StyleBox">
Sets the [StyleBox] when [member TextEdit.editable] is disabled.
</theme_item>
+ <theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
+ [Color] of the border around text that matches the search query.
+ </theme_item>
+ <theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)">
+ [Color] behind the text that matches the search query.
+ </theme_item>
<theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
Sets the highlight [Color] of text selections.
</theme_item>
diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml
index 2b93188d10..064be0c29d 100644
--- a/doc/classes/CodeHighlighter.xml
+++ b/doc/classes/CodeHighlighter.xml
@@ -138,6 +138,4 @@
Sets the color for symbols.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index 7129c72e7c..ba1ee3909d 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -11,7 +11,7 @@
<methods>
<method name="_input_event" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="viewport" type="Object" />
+ <argument index="0" name="viewport" type="Viewport" />
<argument index="1" name="event" type="InputEvent" />
<argument index="2" name="shape_idx" type="int" />
<description>
diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml
index f9151a2c2f..19bcdcbb27 100644
--- a/doc/classes/CollisionObject3D.xml
+++ b/doc/classes/CollisionObject3D.xml
@@ -11,7 +11,7 @@
<methods>
<method name="_input_event" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="camera" type="Object" />
+ <argument index="0" name="camera" type="Camera3D" />
<argument index="1" name="event" type="InputEvent" />
<argument index="2" name="position" type="Vector3" />
<argument index="3" name="normal" type="Vector3" />
diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml
index 4607ab3fbd..cdaa0638ba 100644
--- a/doc/classes/CollisionPolygon2D.xml
+++ b/doc/classes/CollisionPolygon2D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode" default="0">
Collision build mode. Use one of the [enum BuildMode] constants.
diff --git a/doc/classes/CollisionPolygon3D.xml b/doc/classes/CollisionPolygon3D.xml
index cf0e55e712..b70f517da1 100644
--- a/doc/classes/CollisionPolygon3D.xml
+++ b/doc/classes/CollisionPolygon3D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0">
Length that the resulting collision extends in either direction perpendicular to its polygon.
@@ -25,6 +23,4 @@
[b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml
index c03eba82ff..5159b2b15b 100644
--- a/doc/classes/CollisionShape2D.xml
+++ b/doc/classes/CollisionShape2D.xml
@@ -12,8 +12,6 @@
<link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link>
<link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
A disabled collision shape has no effect in the world. This property should be changed with [method Object.set_deferred].
@@ -28,6 +26,4 @@
The actual shape owned by this collision shape.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml
index 9184b672ff..84e362c38b 100644
--- a/doc/classes/CollisionShape3D.xml
+++ b/doc/classes/CollisionShape3D.xml
@@ -35,6 +35,4 @@
The actual shape owned by this collision shape.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index f00a20e95e..c85bc775c7 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -261,6 +261,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Color" />
<description>
</description>
@@ -315,6 +320,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Color" />
<description>
</description>
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index 99e121de75..f33016cc6c 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Displays a color picker widget. Useful for selecting a color from an RGB/RGBA colorspace.
+ [b]Note:[/b] This control is the color picker widget itself. You can use a [ColorPickerButton] instead if you need a button that brings up a [ColorPicker] in a pop-up.
</description>
<tutorials>
<link title="Tween Demo">https://godotengine.org/asset-library/asset/146</link>
@@ -116,7 +117,7 @@
</theme_item>
<theme_item name="picker_cursor" data_type="icon" type="Texture2D">
</theme_item>
- <theme_item name="preset_bg" data_type="icon" type="Texture2D">
+ <theme_item name="sample_bg" data_type="icon" type="Texture2D">
</theme_item>
<theme_item name="screen_picker" data_type="icon" type="Texture2D">
The icon for the screen color picker button.
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index 6b5a9f2503..1cdfbd760e 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -6,6 +6,7 @@
<description>
Encapsulates a [ColorPicker] making it accessible by pressing a button. Pressing the button will toggle the [ColorPicker] visibility.
See also [BaseButton] which contains common properties and methods associated with this node.
+ [b]Note:[/b] By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set [member Control.rect_min_size] to a big enough value to give the button enough space.
</description>
<tutorials>
<link title="GUI Drag And Drop Demo">https://godotengine.org/asset-library/asset/133</link>
@@ -52,8 +53,6 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
<theme_items>
<theme_item name="bg" data_type="icon" type="Texture2D">
The background of the color preview rect on the button.
diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml
index 84955fed8a..db0dfc705e 100644
--- a/doc/classes/ColorRect.xml
+++ b/doc/classes/ColorRect.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
The fill color.
@@ -24,6 +22,4 @@
[/codeblocks]
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml
index e6b2e1845d..2ace8c72d7 100644
--- a/doc/classes/ConcavePolygonShape2D.xml
+++ b/doc/classes/ConcavePolygonShape2D.xml
@@ -4,18 +4,14 @@
Concave polygon 2D shape resource for physics.
</brief_description>
<description>
- Concave polygon 2D shape resource for physics. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions.
+ Concave polygon 2D shape resource for physics. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for [RigidDynamicBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions.
The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="segments" type="PackedVector2Array" setter="set_segments" getter="get_segments" default="PackedVector2Array()">
The array of points that make up the [ConcavePolygonShape2D]'s line segments.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ConcavePolygonShape3D.xml b/doc/classes/ConcavePolygonShape3D.xml
index 34fb06a476..ac569a8992 100644
--- a/doc/classes/ConcavePolygonShape3D.xml
+++ b/doc/classes/ConcavePolygonShape3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Concave polygon shape resource, which can be set into a [PhysicsBody3D] or area. This shape is created by feeding a list of triangles.
- Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidBody3D] with a mode other than Static.
+ Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidDynamicBody3D] with a mode other than Static.
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
@@ -30,6 +30,4 @@
If set to [code]true[/code], collisions occur on both sides of the concave shape faces. Otherwise they occur only along the face normals.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
index f970be23a6..4f6f099ebd 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -84,8 +84,10 @@
}
[/csharp]
[/codeblocks]
+ Any operation that mutates the ConfigFile such as [method set_value], [method clear], or [method erase_section], only changes what is loaded in memory. If you want to write the change to a file, you have to save the changes with [method save], [method save_encrypted], or [method save_encrypted_pass].
Keep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load.
ConfigFiles can also contain manually written comment lines starting with a semicolon ([code];[/code]). Those lines will be ignored when parsing the file. Note that comments will be lost when saving the ConfigFile. This can still be useful for dedicated server configuration files, which are typically never overwritten without explicit user action.
+ [b]Note:[/b] The file extension given to a ConfigFile does not have any impact on its formatting or behavior. By convention, the [code].cfg[/code] extension is used here, but any other extension such as [code].ini[/code] is also valid. Since neither [code].cfg[/code] nor [code].ini[/code] are standardized, Godot's ConfigFile formatting may differ from files written by other programs.
</description>
<tutorials>
</tutorials>
@@ -93,6 +95,7 @@
<method name="clear">
<return type="void" />
<description>
+ Removes the entire contents of the config.
</description>
</method>
<method name="erase_section">
@@ -149,6 +152,8 @@
</method>
<method name="load">
<return type="int" enum="Error" />
+ <returns_error number="0"/>
+ <returns_error number="12"/>
<argument index="0" name="path" type="String" />
<description>
Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
@@ -217,6 +222,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index 871082696c..352631da1d 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -30,6 +30,4 @@
<member name="size" type="Vector2i" setter="set_size" getter="get_size" override="true" default="Vector2i(200, 100)" />
<member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Please Confirm...&quot;" />
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 0834521c91..c9a2de66a8 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -22,9 +22,9 @@
<link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link>
</tutorials>
<methods>
- <method name="_can_drop_data" qualifiers="virtual">
+ <method name="_can_drop_data" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="position" type="Vector2" />
+ <argument index="0" name="at_position" type="Vector2" />
<argument index="1" name="data" type="Variant" />
<description>
Godot calls this method to test if [code]data[/code] from a control's [method _get_drag_data] can be dropped at [code]position[/code]. [code]position[/code] is local to this control.
@@ -49,7 +49,7 @@
</method>
<method name="_drop_data" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="position" type="Vector2" />
+ <argument index="0" name="at_position" type="Vector2" />
<argument index="1" name="data" type="Variant" />
<description>
Godot calls this method to pass you the [code]data[/code] from a control's [method _get_drag_data] result. Godot first calls [method _can_drop_data] to test if [code]data[/code] is allowed to drop at [code]position[/code] where [code]position[/code] is local to this control.
@@ -73,9 +73,9 @@
[/codeblocks]
</description>
</method>
- <method name="_get_drag_data" qualifiers="virtual">
+ <method name="_get_drag_data" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="position" type="Vector2" />
+ <argument index="0" name="at_position" type="Vector2" />
<description>
Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method _can_drop_data] and [method _drop_data]. [code]position[/code] is local to this control. Drag may be forced with [method force_drag].
A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method.
@@ -97,7 +97,7 @@
[/codeblocks]
</description>
</method>
- <method name="_get_minimum_size" qualifiers="virtual">
+ <method name="_get_minimum_size" qualifiers="virtual const">
<return type="Vector2" />
<description>
Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member rect_min_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately).
@@ -137,19 +137,20 @@
* control is obstructed by another [Control] on top of it, which doesn't have [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE];
* control's parent has [member mouse_filter] set to [constant MOUSE_FILTER_STOP] or has accepted the event;
* it happens outside the parent's rectangle and the parent has either [member rect_clip_content] enabled.
+ [b]Note:[/b] Event position is relative to the control origin.
</description>
</method>
<method name="_has_point" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="" type="Vector2" />
+ <argument index="0" name="position" type="Vector2" />
<description>
Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control.
If not overridden, default behavior is checking if the point is within control's Rect.
[b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code].
</description>
</method>
- <method name="_make_custom_tooltip" qualifiers="virtual">
- <return type="Control" />
+ <method name="_make_custom_tooltip" qualifiers="virtual const">
+ <return type="Object" />
<argument index="0" name="for_text" type="String" />
<description>
Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. The [code]for_text[/code] includes the contents of the [member hint_tooltip] property.
@@ -193,8 +194,8 @@
[/codeblocks]
</description>
</method>
- <method name="_structured_text_parser" qualifiers="virtual">
- <return type="void" />
+ <method name="_structured_text_parser" qualifiers="virtual const">
+ <return type="Array" />
<argument index="0" name="args" type="Array" />
<argument index="1" name="text" type="String" />
<description>
@@ -921,7 +922,8 @@
Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
</member>
<member name="auto_translate" type="bool" setter="set_auto_translate" getter="is_auto_translating" default="true">
- Toggles if any text should automatically change to its translated version depending on the current locale.
+ Toggles if any text should automatically change to its translated version depending on the current locale. Note that this will not affect any internal nodes (e.g. the popup of a [MenuButton]).
+ Also decides if the node's strings should be parsed for POT generation.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="0">
The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals.
diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
index 243605e2b7..ec7583e68b 100644
--- a/doc/classes/ConvexPolygonShape2D.xml
+++ b/doc/classes/ConvexPolygonShape2D.xml
@@ -23,6 +23,4 @@
The polygon's list of vertices. Can be in either clockwise or counterclockwise order.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ConvexPolygonShape3D.xml b/doc/classes/ConvexPolygonShape3D.xml
index a5c86526b0..832e073665 100644
--- a/doc/classes/ConvexPolygonShape3D.xml
+++ b/doc/classes/ConvexPolygonShape3D.xml
@@ -9,13 +9,9 @@
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="points" type="PackedVector3Array" setter="set_points" getter="get_points" default="PackedVector3Array()">
The list of 3D points forming the convex polygon shape.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml
index 3d7ca956da..a87c8bfab2 100644
--- a/doc/classes/Crypto.xml
+++ b/doc/classes/Crypto.xml
@@ -171,6 +171,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml
index afe2c6b301..5665c629a8 100644
--- a/doc/classes/CryptoKey.xml
+++ b/doc/classes/CryptoKey.xml
@@ -51,6 +51,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Cubemap.xml b/doc/classes/Cubemap.xml
index 61cb1d43f0..886dc36bdf 100644
--- a/doc/classes/Cubemap.xml
+++ b/doc/classes/Cubemap.xml
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Cubemap" inherits="ImageTextureLayered" version="4.0">
<brief_description>
+ 6-sided texture typically used in 3D rendering.
</brief_description>
<description>
+ A cubemap is a 6-sided texture typically used for faking reflections in 3D rendering. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods.
+ This resource is typically used as a uniform in custom shaders. Few core Godot methods make use of Cubemap resources.
+ [b]Note:[/b] Godot doesn't support using cubemaps as a [PanoramaSkyMaterial]. You can use [url=https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html]this tool[/url] to convert a cube map to an equirectangular sky map.
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CubemapArray.xml b/doc/classes/CubemapArray.xml
index 627baf79e0..9f2231886d 100644
--- a/doc/classes/CubemapArray.xml
+++ b/doc/classes/CubemapArray.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index c02b0f7ead..8c5b39a895 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -156,6 +156,4 @@
The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index 5839ccba02..30e9e2ac68 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -198,6 +198,4 @@
If [code]true[/code], the curve will bake up vectors used for orientation. This is used when [member PathFollow3D.rotation_mode] is set to [constant PathFollow3D.ROTATION_ORIENTED]. Changing it forces the cache to be recomputed.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml
index 54065fe0f9..fe75f029f0 100644
--- a/doc/classes/CurveTexture.xml
+++ b/doc/classes/CurveTexture.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="curve" type="Curve" setter="set_curve" getter="get_curve">
The [code]curve[/code] rendered onto the texture.
diff --git a/doc/classes/CurveXYZTexture.xml b/doc/classes/CurveXYZTexture.xml
index 9afeb58060..815653e987 100644
--- a/doc/classes/CurveXYZTexture.xml
+++ b/doc/classes/CurveXYZTexture.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="curve_x" type="Curve" setter="set_curve_x" getter="get_curve_x">
</member>
@@ -18,6 +16,4 @@
<member name="width" type="int" setter="set_width" getter="get_width" default="2048">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml
index 827fb5c10c..077435990b 100644
--- a/doc/classes/CylinderMesh.xml
+++ b/doc/classes/CylinderMesh.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius" default="1.0">
Bottom radius of the cylinder. If set to [code]0.0[/code], the bottom faces will not be generated, resulting in a conic shape.
@@ -27,6 +25,4 @@
Top radius of the cylinder. If set to [code]0.0[/code], the top faces will not be generated, resulting in a conic shape.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/CylinderShape3D.xml b/doc/classes/CylinderShape3D.xml
index 99334ceae6..d40b96710b 100644
--- a/doc/classes/CylinderShape3D.xml
+++ b/doc/classes/CylinderShape3D.xml
@@ -11,8 +11,6 @@
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
The cylinder's height.
@@ -21,6 +19,4 @@
The cylinder's radius.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml
index 627a7a65a5..16e65eaadf 100644
--- a/doc/classes/DTLSServer.xml
+++ b/doc/classes/DTLSServer.xml
@@ -164,6 +164,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/DampedSpringJoint2D.xml b/doc/classes/DampedSpringJoint2D.xml
index e1b6bb6866..76e38d5271 100644
--- a/doc/classes/DampedSpringJoint2D.xml
+++ b/doc/classes/DampedSpringJoint2D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="damping" type="float" setter="set_damping" getter="get_damping" default="1.0">
The spring joint's damping ratio. A value between [code]0[/code] and [code]1[/code]. When the two bodies move into different directions the system tries to align them to the spring axis again. A high [code]damping[/code] value forces the attached bodies to align faster.
@@ -24,6 +22,4 @@
The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 59088f33fd..2eb75d48a3 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -213,7 +213,8 @@
<return type="bool" />
<argument index="0" name="key" type="Variant" />
<description>
- Erase a dictionary key/value pair by key. Returns [code]true[/code] if the given key was present in the dictionary, [code]false[/code] otherwise. Does not erase elements while iterating over the dictionary.
+ Erase a dictionary key/value pair by key. Returns [code]true[/code] if the given key was present in the dictionary, [code]false[/code] otherwise.
+ [b]Note:[/b] Don't erase elements while iterating over the dictionary. You can iterate over the [method keys] array instead.
</description>
</method>
<method name="get" qualifiers="const">
@@ -290,12 +291,22 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Dictionary" />
<description>
</description>
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Dictionary" />
<description>
</description>
@@ -319,6 +330,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/DirectionalLight2D.xml b/doc/classes/DirectionalLight2D.xml
index a6eb780159..317cf6e66c 100644
--- a/doc/classes/DirectionalLight2D.xml
+++ b/doc/classes/DirectionalLight2D.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="height" type="float" setter="set_height" getter="get_height" default="0.0">
The height of the light. Used with 2D normal mapping.
@@ -15,6 +13,4 @@
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="10000.0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml
index 0060368207..7c006ad3a6 100644
--- a/doc/classes/DirectionalLight3D.xml
+++ b/doc/classes/DirectionalLight3D.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="Lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled" default="false">
If [code]true[/code], shadow detail is sacrificed in exchange for smoother transitions between splits.
@@ -36,7 +34,7 @@
<member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param" default="0.5">
The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_4_SPLITS[/code].
</member>
- <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" override="true" default="1.0" />
+ <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.1" />
<member name="use_in_sky_only" type="bool" setter="set_sky_only" getter="is_sky_only" default="false">
If [code]true[/code], this [DirectionalLight3D] will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon.
</member>
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index e8e5a286b4..c8fda27989 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -192,6 +192,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index abb715b34e..4f495eaec9 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -649,6 +649,8 @@
<argument index="0" name="min_size" type="Vector2i" />
<argument index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the minimum size for the given window to [code]min_size[/code] (in pixels).
+ [b]Note:[/b] By default, the main window has a minimum size of [code]Vector2i(64, 64)[/code]. This prevents issues that can arise when the window is resized to a near-zero size.
</description>
</method>
<method name="window_set_mode">
diff --git a/doc/classes/EditorCommandPalette.xml b/doc/classes/EditorCommandPalette.xml
index 743c59eec2..01b8593f89 100644
--- a/doc/classes/EditorCommandPalette.xml
+++ b/doc/classes/EditorCommandPalette.xml
@@ -1,8 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorCommandPalette" inherits="ConfirmationDialog" version="4.0">
<brief_description>
+ Godot editor's command palette.
</brief_description>
<description>
+ Object that holds all the available Commands and their shortcuts text. These Commands can be accessed through [b]Editor &gt; Command Palette[/b] menu.
+ Command key names use slash delimiters to distinguish sections Example: [code]"example/command1"[/code] then [code]example[/code] will be the section name.
+ [codeblocks]
+ [gdscript]
+ var command_palette = get_editor_interface().get_command_palette()
+ # external_command is a function that will be called with the command is executed.
+ var command_callable = Callable(self, "external_command").bind(arguments)
+ command_palette.add_command("command", "test/command",command_callable)
+ [/gdscript]
+ [csharp]
+ EditorCommandPalette commandPalette = GetEditorInterface().GetCommandPalette();
+ // ExternalCommand is a function that will be called with the command is executed.
+ Callable commandCallable = new Callable(this, nameof(ExternalCommand));
+ commandPalette.AddCommand("command", "test/command", commandCallable)
+ [/csharp]
+ [/codeblocks]
+ [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_command_palette].
</description>
<tutorials>
</tutorials>
@@ -14,18 +32,23 @@
<argument index="2" name="binded_callable" type="Callable" />
<argument index="3" name="shortcut_text" type="String" default="&quot;None&quot;" />
<description>
+ Adds a custom command to EditorCommandPalette.
+ - [code]command_name[/code]: [String] (Name of the [b]Command[/b]. This is displayed to the user.)
+ - [code]key_name[/code]: [String] (Name of the key for a particular [b]Command[/b]. This is used to uniquely identify the [b]Command[/b].)
+ - [code]binded_callable[/code]: [Callable] (Callable of the [b]Command[/b]. This will be executed when the [b]Command[/b] is selected.)
+ - [code]shortcut_text[/code]: [String] (Shortcut text of the [b]Command[/b] if available.)
</description>
</method>
<method name="remove_command">
<return type="void" />
<argument index="0" name="key_name" type="String" />
<description>
+ Removes the custom command from EditorCommandPalette.
+ - [code]key_name[/code]: [String] (Name of the key for a particular [b]Command[/b].)
</description>
</method>
</methods>
<members>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorDebuggerPlugin.xml b/doc/classes/EditorDebuggerPlugin.xml
index d67df8dfee..0773e176b3 100644
--- a/doc/classes/EditorDebuggerPlugin.xml
+++ b/doc/classes/EditorDebuggerPlugin.xml
@@ -84,6 +84,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index 16c50b4d3e..fca7bb350d 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -110,6 +110,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml
index 6befe32e7a..859480078b 100644
--- a/doc/classes/EditorFileSystem.xml
+++ b/doc/classes/EditorFileSystem.xml
@@ -93,6 +93,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml
index a8f94101a7..6a0a94a4c4 100644
--- a/doc/classes/EditorFileSystemDirectory.xml
+++ b/doc/classes/EditorFileSystemDirectory.xml
@@ -103,6 +103,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index b379ccc8c6..f20f4adcdf 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -113,28 +113,28 @@
<link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link>
</tutorials>
<methods>
- <method name="_get_import_options" qualifiers="virtual">
+ <method name="_get_import_options" qualifiers="virtual const">
<return type="Array" />
- <argument index="0" name="preset" type="int" />
+ <argument index="0" name="preset_index" type="int" />
<description>
Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: [code]name[/code], [code]default_value[/code], [code]property_hint[/code] (optional), [code]hint_string[/code] (optional), [code]usage[/code] (optional).
</description>
</method>
- <method name="_get_import_order" qualifiers="virtual">
+ <method name="_get_import_order" qualifiers="virtual const">
<return type="int" />
<description>
Gets the order of this importer to be run when importing resources. Importers with [i]lower[/i] import orders will be called first, and higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. The default import order is [code]0[/code] unless overridden by a specific importer. See [enum ResourceImporter.ImportOrder] for some predefined values.
</description>
</method>
- <method name="_get_importer_name" qualifiers="virtual">
+ <method name="_get_importer_name" qualifiers="virtual const">
<return type="String" />
<description>
Gets the unique name of the importer.
</description>
</method>
- <method name="_get_option_visibility" qualifiers="virtual">
+ <method name="_get_option_visibility" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="option" type="String" />
+ <argument index="0" name="option_name" type="StringName" />
<argument index="1" name="options" type="Dictionary" />
<description>
This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example:
@@ -163,50 +163,50 @@
Return [code]true[/code] to make all options always visible.
</description>
</method>
- <method name="_get_preset_count" qualifiers="virtual">
+ <method name="_get_preset_count" qualifiers="virtual const">
<return type="int" />
<description>
Gets the number of initial presets defined by the plugin. Use [method _get_import_options] to get the default options for the preset and [method _get_preset_name] to get the name of the preset.
</description>
</method>
- <method name="_get_preset_name" qualifiers="virtual">
+ <method name="_get_preset_name" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="preset" type="int" />
+ <argument index="0" name="preset_index" type="int" />
<description>
Gets the name of the options preset at this index.
</description>
</method>
- <method name="_get_priority" qualifiers="virtual">
+ <method name="_get_priority" qualifiers="virtual const">
<return type="float" />
<description>
Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. The default priority is [code]1.0[/code].
</description>
</method>
- <method name="_get_recognized_extensions" qualifiers="virtual">
- <return type="Array" />
+ <method name="_get_recognized_extensions" qualifiers="virtual const">
+ <return type="PackedStringArray" />
<description>
Gets the list of file extensions to associate with this loader (case-insensitive). e.g. [code]["obj"][/code].
</description>
</method>
- <method name="_get_resource_type" qualifiers="virtual">
+ <method name="_get_resource_type" qualifiers="virtual const">
<return type="String" />
<description>
Gets the Godot resource type associated with this loader. e.g. [code]"Mesh"[/code] or [code]"Animation"[/code].
</description>
</method>
- <method name="_get_save_extension" qualifiers="virtual">
+ <method name="_get_save_extension" qualifiers="virtual const">
<return type="String" />
<description>
Gets the extension used to save this resource in the [code].godot/imported[/code] directory.
</description>
</method>
- <method name="_get_visible_name" qualifiers="virtual">
+ <method name="_get_visible_name" qualifiers="virtual const">
<return type="String" />
<description>
Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh".
</description>
</method>
- <method name="_import" qualifiers="virtual">
+ <method name="_import" qualifiers="virtual const">
<return type="int" />
<argument index="0" name="source_file" type="String" />
<argument index="1" name="save_path" type="String" />
@@ -219,6 +219,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml
index 515c4b4d32..0c47298180 100644
--- a/doc/classes/EditorInspector.xml
+++ b/doc/classes/EditorInspector.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" override="true" default="false" />
</members>
@@ -66,6 +64,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index 62fd7a1d6e..17397b80bf 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -16,9 +16,9 @@
<link title="Inspector plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/inspector_plugins.html</link>
</tutorials>
<methods>
- <method name="_can_handle" qualifiers="virtual">
+ <method name="_can_handle" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="object" type="Object" />
+ <argument index="0" name="object" type="Variant" />
<description>
Returns [code]true[/code] if this object can be handled by this plugin.
</description>
@@ -31,9 +31,9 @@
</method>
<method name="_parse_category" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="category" type="String" />
+ <argument index="0" name="object" type="Object" />
+ <argument index="1" name="category" type="String" />
<description>
- Called to allow adding controls at the beginning of the category.
</description>
</method>
<method name="_parse_end" qualifiers="virtual">
@@ -44,11 +44,13 @@
</method>
<method name="_parse_property" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="type" type="int" />
- <argument index="1" name="path" type="String" />
- <argument index="2" name="hint" type="int" />
- <argument index="3" name="hint_text" type="String" />
- <argument index="4" name="usage" type="int" />
+ <argument index="0" name="object" type="Object" />
+ <argument index="1" name="type" type="int" />
+ <argument index="2" name="name" type="String" />
+ <argument index="3" name="hint_type" type="int" />
+ <argument index="4" name="hint_string" type="String" />
+ <argument index="5" name="usage_flags" type="int" />
+ <argument index="6" name="wide" type="bool" />
<description>
Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
</description>
@@ -78,6 +80,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index 91e1dfbf57..ad878aad80 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -33,6 +33,7 @@
<method name="get_command_palette" qualifiers="const">
<return type="EditorCommandPalette" />
<description>
+ Returns the editor's [EditorCommandPalette] instance.
</description>
</method>
<method name="get_current_path" qualifiers="const">
@@ -237,6 +238,4 @@
If [code]true[/code], enables distraction-free mode which hides side docks to increase the space available for the main view.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml
index 39f6805254..a2eac01ae8 100644
--- a/doc/classes/EditorNode3DGizmo.xml
+++ b/doc/classes/EditorNode3DGizmo.xml
@@ -13,7 +13,7 @@
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="restore" type="Variant" />
- <argument index="2" name="cancel" type="bool" default="false" />
+ <argument index="2" name="cancel" type="bool" />
<description>
Override this method to commit a handle being edited (handles must have been previously added by [method add_handles]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo".
If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action.
@@ -22,14 +22,14 @@
<method name="_commit_subgizmos" qualifiers="virtual">
<return type="void" />
<argument index="0" name="ids" type="PackedInt32Array" />
- <argument index="1" name="restore" type="Array" />
- <argument index="2" name="cancel" type="bool" default="false" />
+ <argument index="1" name="restores" type="Transform3D[]" />
+ <argument index="2" name="cancel" type="bool" />
<description>
Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [code]restore[/code] transforms as "undo".
If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] transforms should be directly set, without any [UndoRedo] action.
</description>
</method>
- <method name="_get_handle_name" qualifiers="virtual">
+ <method name="_get_handle_name" qualifiers="virtual const">
<return type="String" />
<argument index="0" name="id" type="int" />
<description>
@@ -37,21 +37,21 @@
Handles can be named for reference to the user when editing.
</description>
</method>
- <method name="_get_handle_value" qualifiers="virtual">
+ <method name="_get_handle_value" qualifiers="virtual const">
<return type="Variant" />
<argument index="0" name="id" type="int" />
<description>
Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle].
</description>
</method>
- <method name="_get_subgizmo_transform" qualifiers="virtual">
+ <method name="_get_subgizmo_transform" qualifiers="virtual const">
<return type="Transform3D" />
<argument index="0" name="id" type="int" />
<description>
Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_subgizmos].
</description>
</method>
- <method name="_is_handle_highlighted" qualifiers="virtual">
+ <method name="_is_handle_highlighted" qualifiers="virtual const">
<return type="bool" />
<argument index="0" name="id" type="int" />
<description>
@@ -81,15 +81,15 @@
Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [code]transform[/code] is given in the Node3D's local coordinate system.
</description>
</method>
- <method name="_subgizmos_intersect_frustum" qualifiers="virtual">
+ <method name="_subgizmos_intersect_frustum" qualifiers="virtual const">
<return type="PackedInt32Array" />
<argument index="0" name="camera" type="Camera3D" />
- <argument index="1" name="frustum" type="Array" />
+ <argument index="1" name="frustum" type="Plane[]" />
<description>
Override this method to allow selecting subgizmos using mouse drag box selection. Given a [code]camera[/code] and a [code]frustum[/code], this method should return which subgizmos are contained within the frustum. The [code]frustum[/code] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos].
</description>
</method>
- <method name="_subgizmos_intersect_ray" qualifiers="virtual">
+ <method name="_subgizmos_intersect_ray" qualifiers="virtual const">
<return type="int" />
<argument index="0" name="camera" type="Camera3D" />
<argument index="1" name="point" type="Vector2" />
@@ -198,6 +198,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml
index fb72427a7a..424d5dd310 100644
--- a/doc/classes/EditorNode3DGizmoPlugin.xml
+++ b/doc/classes/EditorNode3DGizmoPlugin.xml
@@ -10,7 +10,7 @@
<link title="Spatial gizmo plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link>
</tutorials>
<methods>
- <method name="_can_be_hidden" qualifiers="virtual">
+ <method name="_can_be_hidden" qualifiers="virtual const">
<return type="bool" />
<description>
Override this method to define whether the gizmos handled by this plugin can be hidden or not. Returns [code]true[/code] if not overridden.
@@ -19,9 +19,9 @@
<method name="_commit_handle" qualifiers="virtual">
<return type="void" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="id" type="int" />
+ <argument index="1" name="handle_id" type="int" />
<argument index="2" name="restore" type="Variant" />
- <argument index="3" name="cancel" type="bool" default="false" />
+ <argument index="3" name="cancel" type="bool" />
<description>
Override this method to commit a handle being edited (handles must have been previously added by [method EditorNode3DGizmo.add_handles] during [method _redraw]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo".
If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action. Called for this plugin's active gizmos.
@@ -31,73 +31,73 @@
<return type="void" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
<argument index="1" name="ids" type="PackedInt32Array" />
- <argument index="2" name="restore" type="Array" />
- <argument index="3" name="cancel" type="bool" default="false" />
+ <argument index="2" name="restores" type="Transform3D[]" />
+ <argument index="3" name="cancel" type="bool" />
<description>
Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [code]restore[/code] transforms as "undo".
If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] transforms should be directly set, without any [UndoRedo] action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos.
</description>
</method>
- <method name="_create_gizmo" qualifiers="virtual">
+ <method name="_create_gizmo" qualifiers="virtual const">
<return type="EditorNode3DGizmo" />
- <argument index="0" name="spatial" type="Node3D" />
+ <argument index="0" name="for_node_3d" type="Node3D" />
<description>
Override this method to return a custom [EditorNode3DGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. See also [method _has_gizmo].
</description>
</method>
- <method name="_get_gizmo_name" qualifiers="virtual">
+ <method name="_get_gizmo_name" qualifiers="virtual const">
<return type="String" />
<description>
Override this method to provide the name that will appear in the gizmo visibility menu.
</description>
</method>
- <method name="_get_handle_name" qualifiers="virtual">
+ <method name="_get_handle_name" qualifiers="virtual const">
<return type="String" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="id" type="int" />
+ <argument index="1" name="handle_id" type="int" />
<description>
Override this method to provide gizmo's handle names. Called for this plugin's active gizmos.
</description>
</method>
- <method name="_get_handle_value" qualifiers="virtual">
+ <method name="_get_handle_value" qualifiers="virtual const">
<return type="Variant" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="id" type="int" />
+ <argument index="1" name="handle_id" type="int" />
<description>
Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle]. Called for this plugin's active gizmos.
</description>
</method>
- <method name="_get_priority" qualifiers="virtual">
+ <method name="_get_priority" qualifiers="virtual const">
<return type="int" />
<description>
Override this method to set the gizmo's priority. Gizmos with higher priority will have precedence when processing inputs like handles or subgizmos selection.
All built-in editor gizmos return a priority of [code]-1[/code]. If not overridden, this method will return [code]0[/code], which means custom gizmos will automatically get higher priority than built-in gizmos.
</description>
</method>
- <method name="_get_subgizmo_transform" qualifiers="virtual">
+ <method name="_get_subgizmo_transform" qualifiers="virtual const">
<return type="Transform3D" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="id" type="int" />
+ <argument index="1" name="subgizmo_id" type="int" />
<description>
Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the [code]restore[/code] argument in [method _commit_subgizmos]. Called for this plugin's active gizmos.
</description>
</method>
- <method name="_has_gizmo" qualifiers="virtual">
+ <method name="_has_gizmo" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="spatial" type="Node3D" />
+ <argument index="0" name="for_node_3d" type="Node3D" />
<description>
Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a [Node3D] node is added to a scene this method is called, if it returns [code]true[/code] the node gets a generic [EditorNode3DGizmo] assigned and is added to this plugin's list of active gizmos.
</description>
</method>
- <method name="_is_handle_highlighted" qualifiers="virtual">
+ <method name="_is_handle_highlighted" qualifiers="virtual const">
<return type="bool" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="id" type="int" />
+ <argument index="1" name="handle_id" type="int" />
<description>
Override this method to return [code]true[/code] whenever to given handle should be highlighted in the editor. Called for this plugin's active gizmos.
</description>
</method>
- <method name="_is_selectable_when_hidden" qualifiers="virtual">
+ <method name="_is_selectable_when_hidden" qualifiers="virtual const">
<return type="bool" />
<description>
Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden.
@@ -113,9 +113,9 @@
<method name="_set_handle" qualifiers="virtual">
<return type="void" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="id" type="int" />
+ <argument index="1" name="handle_id" type="int" />
<argument index="2" name="camera" type="Camera3D" />
- <argument index="3" name="point" type="Vector2" />
+ <argument index="3" name="screen_pos" type="Vector2" />
<description>
Override this method to update the node's properties when the user drags a gizmo handle (previously added with [method EditorNode3DGizmo.add_handles]). The provided [code]point[/code] is the mouse position in screen coordinates and the [code]camera[/code] can be used to convert it to raycasts. Called for this plugin's active gizmos.
</description>
@@ -123,26 +123,26 @@
<method name="_set_subgizmo_transform" qualifiers="virtual">
<return type="void" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="id" type="int" />
+ <argument index="1" name="subgizmo_id" type="int" />
<argument index="2" name="transform" type="Transform3D" />
<description>
Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [code]transform[/code] is given in the Node3D's local coordinate system. Called for this plugin's active gizmos.
</description>
</method>
- <method name="_subgizmos_intersect_frustum" qualifiers="virtual">
+ <method name="_subgizmos_intersect_frustum" qualifiers="virtual const">
<return type="PackedInt32Array" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
<argument index="1" name="camera" type="Camera3D" />
- <argument index="2" name="frustum" type="Array" />
+ <argument index="2" name="frustum_planes" type="Plane[]" />
<description>
Override this method to allow selecting subgizmos using mouse drag box selection. Given a [code]camera[/code] and a [code]frustum[/code], this method should return which subgizmos are contained within the frustum. The [code]frustum[/code] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos.
</description>
</method>
- <method name="_subgizmos_intersect_ray" qualifiers="virtual">
+ <method name="_subgizmos_intersect_ray" qualifiers="virtual const">
<return type="int" />
<argument index="0" name="gizmo" type="EditorNode3DGizmo" />
<argument index="1" name="camera" type="Camera3D" />
- <argument index="2" name="point" type="Vector2" />
+ <argument index="2" name="screen_pos" type="Vector2" />
<description>
Override this method to allow selecting subgizmos using mouse clicks. Given a [code]camera[/code] and a [code]point[/code] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos.
</description>
@@ -195,6 +195,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorPaths.xml b/doc/classes/EditorPaths.xml
index 28a8314857..92a2cff27f 100644
--- a/doc/classes/EditorPaths.xml
+++ b/doc/classes/EditorPaths.xml
@@ -33,6 +33,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 37efca7f48..b8436be76a 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -38,7 +38,7 @@
</method>
<method name="_edit" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="object" type="Object" />
+ <argument index="0" name="object" type="Variant" />
<description>
This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
</description>
@@ -49,18 +49,18 @@
Called by the engine when the user enables the [EditorPlugin] in the Plugin tab of the project settings window.
</description>
</method>
- <method name="_forward_canvas_draw_over_viewport" qualifiers="virtual">
+ <method name="_forward_3d_draw_over_viewport" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="overlay" type="Control" />
+ <argument index="0" name="viewport_control" type="Control" />
<description>
- Called by the engine when the 2D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
+ Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
[codeblocks]
[gdscript]
- func _forward_canvas_draw_over_viewport(overlay):
+ func _forward_3d_draw_over_viewport(overlay):
# Draw a circle at cursor position.
- overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.white)
+ overlay.draw_circle(overlay.get_local_mouse_position(), 64)
- func _forward_canvas_gui_input(event):
+ func _forward_3d_gui_input(camera, event):
if event is InputEventMouseMotion:
# Redraw viewport when cursor is moved.
update_overlays()
@@ -68,13 +68,13 @@
return false
[/gdscript]
[csharp]
- public override void ForwardCanvasDrawOverViewport(Godot.Control overlay)
+ public override void _Forward3dDrawOverViewport(Godot.Control overlay)
{
// Draw a circle at cursor position.
overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White);
}
- public override bool ForwardCanvasGuiInput(InputEvent @event)
+ public override bool _Forward3dGuiInput(Godot.Camera3D camera, InputEvent @event)
{
if (@event is InputEventMouseMotion)
{
@@ -87,28 +87,29 @@
[/codeblocks]
</description>
</method>
- <method name="_forward_canvas_force_draw_over_viewport" qualifiers="virtual">
+ <method name="_forward_3d_force_draw_over_viewport" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="overlay" type="Control" />
+ <argument index="0" name="viewport_control" type="Control" />
<description>
- This method is the same as [method _forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
+ This method is the same as [method _forward_3d_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled].
</description>
</method>
- <method name="_forward_canvas_gui_input" qualifiers="virtual">
+ <method name="_forward_3d_gui_input" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="event" type="InputEvent" />
+ <argument index="0" name="viewport_camera" type="Camera3D" />
+ <argument index="1" name="event" type="InputEvent" />
<description>
- Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
+ Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
[codeblocks]
[gdscript]
- # Prevents the InputEvent to reach other Editor classes
- func _forward_canvas_gui_input(event):
+ # Prevents the InputEvent to reach other Editor classes.
+ func _forward_3d_gui_input(camera, event):
return true
[/gdscript]
[csharp]
- // Prevents the InputEvent to reach other Editor classes
- public override bool ForwardCanvasGuiInput(InputEvent @event)
+ // Prevents the InputEvent to reach other Editor classes.
+ public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event)
{
return true;
}
@@ -118,12 +119,12 @@
[codeblocks]
[gdscript]
# Consumes InputEventMouseMotion and forwards other InputEvent types.
- func _forward_canvas_gui_input(event):
+ func _forward_3d_gui_input(camera, event):
return event is InputEventMouseMotion
[/gdscript]
[csharp]
// Consumes InputEventMouseMotion and forwards other InputEvent types.
- public override bool ForwardCanvasGuiInput(InputEvent @event)
+ public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event)
{
return @event is InputEventMouseMotion;
}
@@ -131,18 +132,18 @@
[/codeblocks]
</description>
</method>
- <method name="_forward_spatial_draw_over_viewport" qualifiers="virtual">
+ <method name="_forward_canvas_draw_over_viewport" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="overlay" type="Control" />
+ <argument index="0" name="viewport_control" type="Control" />
<description>
- Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
+ Called by the engine when the 2D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
[codeblocks]
[gdscript]
- func _forward_spatial_draw_over_viewport(overlay):
+ func _forward_canvas_draw_over_viewport(overlay):
# Draw a circle at cursor position.
- overlay.draw_circle(overlay.get_local_mouse_position(), 64)
+ overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.white)
- func _forward_spatial_gui_input(camera, event):
+ func _forward_canvas_gui_input(event):
if event is InputEventMouseMotion:
# Redraw viewport when cursor is moved.
update_overlays()
@@ -150,13 +151,13 @@
return false
[/gdscript]
[csharp]
- public override void ForwardSpatialDrawOverViewport(Godot.Control overlay)
+ public override void ForwardCanvasDrawOverViewport(Godot.Control overlay)
{
// Draw a circle at cursor position.
overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White);
}
- public override bool ForwardSpatialGuiInput(Godot.Camera3D camera, InputEvent @event)
+ public override bool ForwardCanvasGuiInput(InputEvent @event)
{
if (@event is InputEventMouseMotion)
{
@@ -169,29 +170,28 @@
[/codeblocks]
</description>
</method>
- <method name="_forward_spatial_force_draw_over_viewport" qualifiers="virtual">
+ <method name="_forward_canvas_force_draw_over_viewport" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="overlay" type="Control" />
+ <argument index="0" name="viewport_control" type="Control" />
<description>
- This method is the same as [method _forward_spatial_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
+ This method is the same as [method _forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled].
</description>
</method>
- <method name="_forward_spatial_gui_input" qualifiers="virtual">
+ <method name="_forward_canvas_gui_input" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="camera" type="Camera3D" />
- <argument index="1" name="event" type="InputEvent" />
+ <argument index="0" name="event" type="InputEvent" />
<description>
- Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
+ Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
[codeblocks]
[gdscript]
- # Prevents the InputEvent to reach other Editor classes.
- func _forward_spatial_gui_input(camera, event):
+ # Prevents the InputEvent to reach other Editor classes
+ func _forward_canvas_gui_input(event):
return true
[/gdscript]
[csharp]
- // Prevents the InputEvent to reach other Editor classes.
- public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event)
+ // Prevents the InputEvent to reach other Editor classes
+ public override bool ForwardCanvasGuiInput(InputEvent @event)
{
return true;
}
@@ -201,12 +201,12 @@
[codeblocks]
[gdscript]
# Consumes InputEventMouseMotion and forwards other InputEvent types.
- func _forward_spatial_gui_input(camera, event):
+ func _forward_canvas_gui_input(event):
return event is InputEventMouseMotion
[/gdscript]
[csharp]
// Consumes InputEventMouseMotion and forwards other InputEvent types.
- public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event)
+ public override bool ForwardCanvasGuiInput(InputEvent @event)
{
return @event is InputEventMouseMotion;
}
@@ -214,13 +214,13 @@
[/codeblocks]
</description>
</method>
- <method name="_get_breakpoints" qualifiers="virtual">
+ <method name="_get_breakpoints" qualifiers="virtual const">
<return type="PackedStringArray" />
<description>
This is for editors that edit script-based objects. You can return a list of breakpoints in the format ([code]script:line[/code]), for example: [code]res://path_to_script.gd:25[/code].
</description>
</method>
- <method name="_get_plugin_icon" qualifiers="virtual">
+ <method name="_get_plugin_icon" qualifiers="virtual const">
<return type="Texture2D" />
<description>
Override this method in your plugin to return a [Texture2D] in order to give it an icon.
@@ -246,14 +246,14 @@
[/codeblocks]
</description>
</method>
- <method name="_get_plugin_name" qualifiers="virtual">
+ <method name="_get_plugin_name" qualifiers="virtual const">
<return type="String" />
<description>
Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor.
For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
</description>
</method>
- <method name="_get_state" qualifiers="virtual">
+ <method name="_get_state" qualifiers="virtual const">
<return type="Dictionary" />
<description>
Gets the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns).
@@ -261,19 +261,19 @@
</method>
<method name="_get_window_layout" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="layout" type="ConfigFile" />
+ <argument index="0" name="configuration" type="ConfigFile" />
<description>
Gets the GUI layout of the plugin. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock).
</description>
</method>
- <method name="_handles" qualifiers="virtual">
+ <method name="_handles" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="object" type="Object" />
+ <argument index="0" name="object" type="Variant" />
<description>
- Implement this function if your plugin edits a specific type of object (Resource or Node). If you return [code]true[/code], then you will get the functions [method _edit] and [method _make_visible] called when the editor requests them. If you have declared the methods [method _forward_canvas_gui_input] and [method _forward_spatial_gui_input] these will be called too.
+ Implement this function if your plugin edits a specific type of object (Resource or Node). If you return [code]true[/code], then you will get the functions [method _edit] and [method _make_visible] called when the editor requests them. If you have declared the methods [method _forward_canvas_gui_input] and [method _forward_3d_gui_input] these will be called too.
</description>
</method>
- <method name="_has_main_screen" qualifiers="virtual">
+ <method name="_has_main_screen" qualifiers="virtual const">
<return type="bool" />
<description>
Returns [code]true[/code] if this is a main screen editor plugin (it goes in the workspace selector together with [b]2D[/b], [b]3D[/b], [b]Script[/b] and [b]AssetLib[/b]).
@@ -302,7 +302,7 @@
</method>
<method name="_set_window_layout" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="layout" type="ConfigFile" />
+ <argument index="0" name="configuration" type="ConfigFile" />
<description>
Restore the plugin GUI layout saved by [method _get_window_layout].
</description>
@@ -586,19 +586,19 @@
<method name="set_force_draw_over_forwarding_enabled">
<return type="void" />
<description>
- Enables calling of [method _forward_canvas_force_draw_over_viewport] for the 2D editor and [method _forward_spatial_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin.
+ Enables calling of [method _forward_canvas_force_draw_over_viewport] for the 2D editor and [method _forward_3d_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin.
</description>
</method>
<method name="set_input_event_forwarding_always_enabled">
<return type="void" />
<description>
- Use this method if you always want to receive inputs from 3D view screen inside [method _forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene.
+ Use this method if you always want to receive inputs from 3D view screen inside [method _forward_3d_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene.
</description>
</method>
<method name="update_overlays" qualifiers="const">
<return type="int" />
<description>
- Updates the overlays of the 2D and 3D editor viewport. Causes methods [method _forward_canvas_draw_over_viewport], [method _forward_canvas_force_draw_over_viewport], [method _forward_spatial_draw_over_viewport] and [method _forward_spatial_force_draw_over_viewport] to be called.
+ Updates the overlays of the 2D and 3D editor viewport. Causes methods [method _forward_canvas_draw_over_viewport], [method _forward_canvas_force_draw_over_viewport], [method _forward_3d_draw_over_viewport] and [method _forward_3d_force_draw_over_viewport] to be called.
</description>
</method>
</methods>
diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml
index 725b0ba8ff..6af6507606 100644
--- a/doc/classes/EditorProperty.xml
+++ b/doc/classes/EditorProperty.xml
@@ -57,6 +57,11 @@
Puts the [code]editor[/code] control below the property label. The control must be previously added using [method Node.add_child].
</description>
</method>
+ <method name="update_property">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
</methods>
<members>
<member name="checkable" type="bool" setter="set_checkable" getter="is_checkable" default="false">
@@ -144,6 +149,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml
index 3de508c88d..820c7775f7 100644
--- a/doc/classes/EditorResourceConversionPlugin.xml
+++ b/doc/classes/EditorResourceConversionPlugin.xml
@@ -7,18 +7,22 @@
<tutorials>
</tutorials>
<methods>
- <method name="_convert" qualifiers="virtual">
+ <method name="_convert" qualifiers="virtual const">
<return type="Resource" />
<argument index="0" name="resource" type="Resource" />
<description>
</description>
</method>
- <method name="_converts_to" qualifiers="virtual">
+ <method name="_converts_to" qualifiers="virtual const">
<return type="String" />
<description>
</description>
</method>
+ <method name="_handles" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="resource" type="Resource" />
+ <description>
+ </description>
+ </method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml
index a0f2df1f0c..9c490cbb3e 100644
--- a/doc/classes/EditorResourcePicker.xml
+++ b/doc/classes/EditorResourcePicker.xml
@@ -67,6 +67,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml
index c2693b4e1e..4dc46945cf 100644
--- a/doc/classes/EditorResourcePreview.xml
+++ b/doc/classes/EditorResourcePreview.xml
@@ -62,6 +62,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml
index 7054b1f4d0..53c692aad9 100644
--- a/doc/classes/EditorResourcePreviewGenerator.xml
+++ b/doc/classes/EditorResourcePreviewGenerator.xml
@@ -9,41 +9,41 @@
<tutorials>
</tutorials>
<methods>
- <method name="_can_generate_small_preview" qualifiers="virtual">
+ <method name="_can_generate_small_preview" qualifiers="virtual const">
<return type="bool" />
<description>
If this function returns [code]true[/code], the generator will call [method _generate] or [method _generate_from_path] for small previews as well.
By default, it returns [code]false[/code].
</description>
</method>
- <method name="_generate" qualifiers="virtual">
+ <method name="_generate" qualifiers="virtual const">
<return type="Texture2D" />
- <argument index="0" name="from" type="Resource" />
- <argument index="1" name="size" type="Vector2" />
+ <argument index="0" name="resource" type="Resource" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
Generate a preview from a given resource with the specified size. This must always be implemented.
Returning an empty texture is an OK way to fail and let another generator take care.
Care must be taken because this function is always called from a thread (not the main thread).
</description>
</method>
- <method name="_generate_from_path" qualifiers="virtual">
+ <method name="_generate_from_path" qualifiers="virtual const">
<return type="Texture2D" />
<argument index="0" name="path" type="String" />
- <argument index="1" name="size" type="Vector2" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call [method _generate].
Returning an empty texture is an OK way to fail and let another generator take care.
Care must be taken because this function is always called from a thread (not the main thread).
</description>
</method>
- <method name="_generate_small_preview_automatically" qualifiers="virtual">
+ <method name="_generate_small_preview_automatically" qualifiers="virtual const">
<return type="bool" />
<description>
If this function returns [code]true[/code], the generator will automatically generate the small previews from the normal preview texture generated by the methods [method _generate] or [method _generate_from_path].
By default, it returns [code]false[/code].
</description>
</method>
- <method name="_handles" qualifiers="virtual">
+ <method name="_handles" qualifiers="virtual const">
<return type="bool" />
<argument index="0" name="type" type="String" />
<description>
@@ -51,6 +51,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml
index 2e9d6a43d8..a400db551f 100644
--- a/doc/classes/EditorSceneImporter.xml
+++ b/doc/classes/EditorSceneImporter.xml
@@ -8,12 +8,12 @@
<tutorials>
</tutorials>
<methods>
- <method name="_get_extensions" qualifiers="virtual">
- <return type="Array" />
+ <method name="_get_extensions" qualifiers="virtual const">
+ <return type="PackedStringArray" />
<description>
</description>
</method>
- <method name="_get_import_flags" qualifiers="virtual">
+ <method name="_get_import_flags" qualifiers="virtual const">
<return type="int" />
<description>
</description>
@@ -27,7 +27,7 @@
</description>
</method>
<method name="_import_scene" qualifiers="virtual">
- <return type="Node" />
+ <return type="Object" />
<argument index="0" name="path" type="String" />
<argument index="1" name="flags" type="int" />
<argument index="2" name="bake_fps" type="int" />
diff --git a/doc/classes/EditorSceneImporterMesh.xml b/doc/classes/EditorSceneImporterMesh.xml
index 3a9eea87bb..5d57a76d5f 100644
--- a/doc/classes/EditorSceneImporterMesh.xml
+++ b/doc/classes/EditorSceneImporterMesh.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorSceneImporterMesh" inherits="Resource" version="4.0">
<brief_description>
+ A [Resource] that contains vertex array-based geometry during the import process.
</brief_description>
<description>
+ EditorSceneImporterMesh is a type of [Resource] analogous to [ArrayMesh]. It contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.
+
+ Unlike its runtime counterpart, [EditorSceneImporterMesh] contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling [method clear], followed by [method add_surface] for each surface.
</description>
<tutorials>
</tutorials>
@@ -11,6 +15,7 @@
<return type="void" />
<argument index="0" name="name" type="String" />
<description>
+ Adds name for a blend shape that will be added with [method add_surface]. Must be called before surface is added.
</description>
</method>
<method name="add_surface">
@@ -22,45 +27,58 @@
}" />
<argument index="4" name="material" type="Material" default="null" />
<argument index="5" name="name" type="String" default="&quot;&quot;" />
+ <argument index="6" name="flags" type="int" default="0" />
<description>
+ Creates a new surface, analogous to [method ArrayMesh.add_surface_from_arrays].
+ Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
+ The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
</description>
</method>
<method name="clear">
<return type="void" />
<description>
+ Removes all surfaces and blend shapes from this [EditorSceneImporterMesh].
</description>
</method>
<method name="get_blend_shape_count" qualifiers="const">
<return type="int" />
<description>
+ Returns the number of blend shapes that the mesh holds.
</description>
</method>
<method name="get_blend_shape_mode" qualifiers="const">
<return type="int" enum="Mesh.BlendShapeMode" />
<description>
+ Returns the blend shape mode for this Mesh.
</description>
</method>
<method name="get_blend_shape_name" qualifiers="const">
<return type="String" />
<argument index="0" name="blend_shape_idx" type="int" />
<description>
+ Returns the name of the blend shape at this index.
</description>
</method>
<method name="get_lightmap_size_hint" qualifiers="const">
<return type="Vector2i" />
<description>
+ Returns the size hint of this mesh for lightmap-unwrapping in UV-space.
</description>
</method>
<method name="get_mesh">
<return type="ArrayMesh" />
- <argument index="0" name="arg0" type="Mesh" />
+ <argument index="0" name="base_mesh" type="ArrayMesh" default="null" />
<description>
+ Returns the mesh data represented by this [EditorSceneImporterMesh] as a usable [ArrayMesh].
+ This method caches the returned mesh, and subsequent calls will return the cached data until [method clear] is called.
+ If not yet cached and [code]base_mesh[/code] is provided, [code]base_mesh[/code] will be used and mutated.
</description>
</method>
<method name="get_surface_arrays" qualifiers="const">
<return type="Array" />
<argument index="0" name="surface_idx" type="int" />
<description>
+ Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface. See [method add_surface].
</description>
</method>
<method name="get_surface_blend_shape_arrays" qualifiers="const">
@@ -68,17 +86,27 @@
<argument index="0" name="surface_idx" type="int" />
<argument index="1" name="blend_shape_idx" type="int" />
<description>
+ Returns a single set of blend shape arrays for the requested blend shape index for a surface.
</description>
</method>
<method name="get_surface_count" qualifiers="const">
<return type="int" />
<description>
+ Returns the amount of surfaces that the mesh holds.
+ </description>
+ </method>
+ <method name="get_surface_format" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="surface_idx" type="int" />
+ <description>
+ Returns the format of the surface that the mesh holds.
</description>
</method>
<method name="get_surface_lod_count" qualifiers="const">
<return type="int" />
<argument index="0" name="surface_idx" type="int" />
<description>
+ Returns the amount of lods that the mesh holds on a given surface.
</description>
</method>
<method name="get_surface_lod_indices" qualifiers="const">
@@ -86,6 +114,7 @@
<argument index="0" name="surface_idx" type="int" />
<argument index="1" name="lod_idx" type="int" />
<description>
+ Returns the index buffer of a lod for a surface.
</description>
</method>
<method name="get_surface_lod_size" qualifiers="const">
@@ -93,36 +122,58 @@
<argument index="0" name="surface_idx" type="int" />
<argument index="1" name="lod_idx" type="int" />
<description>
+ Returns the screen ratio which activates a lod for a surface.
</description>
</method>
<method name="get_surface_material" qualifiers="const">
<return type="Material" />
<argument index="0" name="surface_idx" type="int" />
<description>
+ Returns a [Material] in a given surface. Surface is rendered using this material.
</description>
</method>
<method name="get_surface_name" qualifiers="const">
<return type="String" />
<argument index="0" name="surface_idx" type="int" />
<description>
+ Gets the name assigned to this surface.
</description>
</method>
<method name="get_surface_primitive_type">
<return type="int" enum="Mesh.PrimitiveType" />
<argument index="0" name="surface_idx" type="int" />
<description>
+ Returns the primitive type of the requested surface (see [method add_surface]).
</description>
</method>
<method name="set_blend_shape_mode">
<return type="void" />
<argument index="0" name="mode" type="int" enum="Mesh.BlendShapeMode" />
<description>
+ Sets the blend shape mode to one of [enum Mesh.BlendShapeMode].
</description>
</method>
<method name="set_lightmap_size_hint">
<return type="void" />
<argument index="0" name="size" type="Vector2i" />
<description>
+ Sets the size hint of this mesh for lightmap-unwrapping in UV-space.
+ </description>
+ </method>
+ <method name="set_surface_material">
+ <return type="void" />
+ <argument index="0" name="surface_idx" type="int" />
+ <argument index="1" name="material" type="Material" />
+ <description>
+ Sets a [Material] for a given surface. Surface will be rendered using this material.
+ </description>
+ </method>
+ <method name="set_surface_name">
+ <return type="void" />
+ <argument index="0" name="surface_idx" type="int" />
+ <argument index="1" name="name" type="String" />
+ <description>
+ Sets a name for a given surface.
</description>
</method>
</methods>
@@ -130,6 +181,4 @@
<member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;surfaces&quot;: []}">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorSceneImporterMeshNode3D.xml b/doc/classes/EditorSceneImporterMeshNode3D.xml
index 1e459c1cee..848448110e 100644
--- a/doc/classes/EditorSceneImporterMeshNode3D.xml
+++ b/doc/classes/EditorSceneImporterMeshNode3D.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="mesh" type="EditorSceneImporterMesh" setter="set_mesh" getter="get_mesh">
</member>
@@ -16,6 +14,4 @@
<member name="skin" type="Skin" setter="set_skin" getter="get_skin">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index 95b0b42d9f..241531c35f 100644
--- a/doc/classes/EditorScenePostImport.xml
+++ b/doc/classes/EditorScenePostImport.xml
@@ -57,7 +57,7 @@
<methods>
<method name="_post_import" qualifiers="virtual">
<return type="Object" />
- <argument index="0" name="scene" type="Object" />
+ <argument index="0" name="scene" type="Node" />
<description>
Called after the scene was imported. This method must return the modified version of the scene.
</description>
@@ -69,6 +69,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
index 6d793fe961..a2508118c6 100644
--- a/doc/classes/EditorScript.xml
+++ b/doc/classes/EditorScript.xml
@@ -61,6 +61,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorScriptPicker.xml b/doc/classes/EditorScriptPicker.xml
index 8334676d92..6c0538a5ab 100644
--- a/doc/classes/EditorScriptPicker.xml
+++ b/doc/classes/EditorScriptPicker.xml
@@ -9,13 +9,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="script_owner" type="Node" setter="set_script_owner" getter="get_script_owner">
The owner [Node] of the script property that holds the edited resource.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml
index 69ae865d5d..28c8ff7d7f 100644
--- a/doc/classes/EditorSelection.xml
+++ b/doc/classes/EditorSelection.xml
@@ -51,6 +51,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml
index b86e5e5c6e..9341b514c7 100644
--- a/doc/classes/EditorSpinSlider.xml
+++ b/doc/classes/EditorSpinSlider.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
</member>
@@ -22,6 +20,4 @@
The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml
index 37644a8595..8880ce4d44 100644
--- a/doc/classes/EditorSyntaxHighlighter.xml
+++ b/doc/classes/EditorSyntaxHighlighter.xml
@@ -5,30 +5,22 @@
</brief_description>
<description>
Base syntax highlighter resource all editor syntax highlighters extend from, it is used in the [ScriptEditor].
- Add a syntax highlighter to an individual script by calling [method ScriptEditorBase._add_syntax_highlighter]. To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter]
+ Add a syntax highlighter to an individual script by calling ScriptEditorBase._add_syntax_highlighter (currently not working). To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter]
</description>
<tutorials>
</tutorials>
<methods>
- <method name="_get_name" qualifiers="virtual">
+ <method name="_get_name" qualifiers="virtual const">
<return type="String" />
<description>
Virtual method which can be overridden to return the syntax highlighter name.
</description>
</method>
- <method name="_get_supported_extentions" qualifiers="virtual">
- <return type="Array" />
- <description>
- Virtual method which can be overridden to return the supported file extensions.
- </description>
- </method>
- <method name="_get_supported_languages" qualifiers="virtual">
+ <method name="_get_supported_languages" qualifiers="virtual const">
<return type="Array" />
<description>
Virtual method which can be overridden to return the supported language names.
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorTranslationParserPlugin.xml b/doc/classes/EditorTranslationParserPlugin.xml
index 47da8ec37b..de8204def3 100644
--- a/doc/classes/EditorTranslationParserPlugin.xml
+++ b/doc/classes/EditorTranslationParserPlugin.xml
@@ -102,8 +102,8 @@
<tutorials>
</tutorials>
<methods>
- <method name="_get_recognized_extensions" qualifiers="virtual">
- <return type="Array" />
+ <method name="_get_recognized_extensions" qualifiers="virtual const">
+ <return type="PackedStringArray" />
<description>
Gets the list of file extensions to associate with this parser, e.g. [code]["csv"][/code].
</description>
@@ -118,6 +118,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml
index 5dd4901e3e..bd932bede4 100644
--- a/doc/classes/EditorVCSInterface.xml
+++ b/doc/classes/EditorVCSInterface.xml
@@ -94,6 +94,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml
index e3e36590a3..fb056f4631 100644
--- a/doc/classes/EncodedObjectAsID.xml
+++ b/doc/classes/EncodedObjectAsID.xml
@@ -9,13 +9,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="object_id" type="int" setter="set_object_id" getter="get_object_id" default="0">
The [Object] identifier stored in this [EncodedObjectAsID] instance. The object instance can be retrieved with [method @GlobalScope.instance_from_id].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index 886a18900e..f05a216301 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -37,7 +37,7 @@
<method name="get_frames_drawn">
<return type="int" />
<description>
- Returns the total number of frames drawn. If the render loop is disabled with [code]--disable-render-loop[/code] via command line, this returns [code]0[/code]. See also [method get_process_frames].
+ Returns the total number of frames drawn. On headless platforms, or if the render loop is disabled with [code]--disable-render-loop[/code] via command line, [method get_frames_drawn] always returns [code]0[/code]. See [method get_process_frames].
</description>
</method>
<method name="get_frames_per_second" qualifiers="const">
@@ -67,7 +67,13 @@
<method name="get_physics_frames" qualifiers="const">
<return type="int" />
<description>
- Returns the total number of frames passed since engine initialization which is advanced on each [b]physics frame[/b].
+ Returns the total number of frames passed since engine initialization which is advanced on each [b]physics frame[/b]. See also [method get_process_frames].
+ [method get_physics_frames] can be used to run expensive logic less often without relying on a [Timer]:
+ [codeblock]
+ func _physics_process(_delta):
+ if Engine.get_physics_frames() % 2 == 0:
+ pass # Run expensive logic only once every 2 physics frames here.
+ [/codeblock]
</description>
</method>
<method name="get_physics_interpolation_fraction" qualifiers="const">
@@ -79,16 +85,27 @@
<method name="get_process_frames" qualifiers="const">
<return type="int" />
<description>
- Returns the total number of frames passed since engine initialization which is advanced on each [b]process frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn].
+ Returns the total number of frames passed since engine initialization which is advanced on each [b]process frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn] and [method get_physics_frames].
+ [method get_process_frames] can be used to run expensive logic less often without relying on a [Timer]:
+ [codeblock]
+ func _process(_delta):
+ if Engine.get_process_frames() % 2 == 0:
+ pass # Run expensive logic only once every 2 process (render) frames here.
+ [/codeblock]
</description>
</method>
<method name="get_singleton" qualifiers="const">
<return type="Object" />
- <argument index="0" name="name" type="String" />
+ <argument index="0" name="name" type="StringName" />
<description>
Returns a global singleton with given [code]name[/code]. Often used for plugins, e.g. GodotPayments.
</description>
</method>
+ <method name="get_singleton_list" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ </description>
+ </method>
<method name="get_version_info" qualifiers="const">
<return type="Dictionary" />
<description>
@@ -125,30 +142,46 @@
</method>
<method name="has_singleton" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="String" />
+ <argument index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if a singleton with given [code]name[/code] exists in global scope.
</description>
</method>
+ <method name="is_editor_hint" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the script is currently running inside the editor, [code]false[/code] otherwise. This is useful for [code]@tool[/code] scripts to conditionally draw editor helpers, or prevent accidentally running "game" code that would affect the scene state while in the editor:
+ [codeblock]
+ if Engine.is_editor_hint():
+ draw_gizmos()
+ else:
+ simulate_physics()
+ [/codeblock]
+ See [url=https://docs.godotengine.org/en/latest/tutorials/plugins/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information.
+ [b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] (e.g. when pressing [kbd]F5[/kbd]), use [method OS.has_feature] with the [code]"editor"[/code] argument instead. [code]OS.has_feature("editor")[/code] will evaluate to [code]true[/code] both when the code is running in the editor and when running the project from the editor, but it will evaluate to [code]false[/code] when the code is run from an exported project.
+ </description>
+ </method>
<method name="is_in_physics_frame" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the game is inside the fixed process and physics phase of the game loop.
</description>
</method>
+ <method name="register_singleton">
+ <return type="void" />
+ <argument index="0" name="name" type="StringName" />
+ <argument index="1" name="instance" type="Object" />
+ <description>
+ </description>
+ </method>
+ <method name="unregister_singleton">
+ <return type="void" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
</methods>
<members>
- <member name="editor_hint" type="bool" setter="set_editor_hint" getter="is_editor_hint" default="true">
- If [code]true[/code], the script is currently running inside the editor. This is useful for [code]@tool[/code] scripts to conditionally draw editor helpers, or prevent accidentally running "game" code that would affect the scene state while in the editor:
- [codeblock]
- if Engine.editor_hint:
- draw_gizmos()
- else:
- simulate_physics()
- [/codeblock]
- See [url=https://docs.godotengine.org/en/latest/tutorials/plugins/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information.
- [b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] (e.g. when pressing [kbd]F5[/kbd]), use [method OS.has_feature] with the [code]"editor"[/code] argument instead. [code]OS.has_feature("editor")[/code] will evaluate to [code]true[/code] both when the code is running in the editor and when running the project from the editor, but it will evaluate to [code]false[/code] when the code is run from an exported project.
- </member>
<member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5">
Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of the in-game clock and real clock but smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.
[b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics_jitter_fix] to [code]0[/code].
@@ -168,6 +201,4 @@
Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/EngineDebugger.xml b/doc/classes/EngineDebugger.xml
index 30d5193384..861053b1c9 100644
--- a/doc/classes/EngineDebugger.xml
+++ b/doc/classes/EngineDebugger.xml
@@ -98,6 +98,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index 809a5bb80c..f0b0775753 100644
--- a/doc/classes/Expression.xml
+++ b/doc/classes/Expression.xml
@@ -83,6 +83,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 6622619fb3..cf08029c72 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -58,8 +58,20 @@
<method name="eof_reached" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the file cursor has read past the end of the file.
- [b]Note:[/b] This function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low-level file access works in all operating systems. There is always [method get_length] and [method get_position] to implement a custom logic.
+ Returns [code]true[/code] if the file cursor has already read past the end of the file.
+ [b]Note:[/b] [code]eof_reached() == false[/code] cannot be used to check whether there is more data available. To loop while there is more data available, use:
+ [codeblocks]
+ [gdscript]
+ while file.get_position() &lt; file.get_length():
+ # Read data
+ [/gdscript]
+ [csharp]
+ while (file.GetPosition() &lt; file.GetLength())
+ {
+ // Read data
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="file_exists" qualifiers="const">
@@ -438,7 +450,7 @@
Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The cursor is positioned at the beginning of the file.
</constant>
<constant name="COMPRESSION_FASTLZ" value="0" enum="CompressionMode">
- Uses the [url=http://fastlz.org/]FastLZ[/url] compression method.
+ Uses the [url=https://fastlz.org/]FastLZ[/url] compression method.
</constant>
<constant name="COMPRESSION_DEFLATE" value="1" enum="CompressionMode">
Uses the [url=https://en.wikipedia.org/wiki/DEFLATE]DEFLATE[/url] compression method.
diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml
index a164415245..b6e708cc03 100644
--- a/doc/classes/FileSystemDock.xml
+++ b/doc/classes/FileSystemDock.xml
@@ -52,6 +52,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 06dcaca846..e8ff0f60ec 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -70,6 +70,12 @@
Add font data source to the set.
</description>
</method>
+ <method name="clear_data">
+ <return type="void" />
+ <description>
+ Removes all font data sourcers for the set.
+ </description>
+ </method>
<method name="draw_char" qualifiers="const">
<return type="float" />
<argument index="0" name="canvas_item" type="RID" />
@@ -151,6 +157,13 @@
Returns the number of font data sources.
</description>
</method>
+ <method name="get_data_rid" qualifiers="const">
+ <return type="RID" />
+ <argument index="0" name="idx" type="int" />
+ <description>
+ Returns TextServer RID of the font data resources.
+ </description>
+ </method>
<method name="get_descent" qualifiers="const">
<return type="float" />
<argument index="0" name="size" type="int" default="-1" />
@@ -180,15 +193,18 @@
</method>
<method name="get_spacing" qualifiers="const">
<return type="int" />
- <argument index="0" name="type" type="int" />
+ <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" />
<description>
- Returns the spacing for the given [code]type[/code] (see [enum SpacingType]).
+ Returns the spacing for the given [code]type[/code] (see [enum TextServer.SpacingType]).
</description>
</method>
<method name="get_string_size" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="text" type="String" />
<argument index="1" name="size" type="int" default="-1" />
+ <argument index="2" name="align" type="int" enum="HAlign" default="0" />
+ <argument index="3" name="width" type="float" default="-1" />
+ <argument index="4" name="flags" type="int" default="3" />
<description>
Returns the size of a bounding box of a string, taking kerning and advance into account.
[b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by [method get_height].
@@ -242,10 +258,10 @@
</method>
<method name="set_spacing">
<return type="void" />
- <argument index="0" name="type" type="int" />
+ <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" />
<argument index="1" name="value" type="int" />
<description>
- Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
+ Sets the spacing for [code]type[/code] (see [enum TextServer.SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
</description>
</method>
<method name="update_changes">
@@ -256,19 +272,17 @@
</method>
</methods>
<members>
- <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ <member name="base_size" type="int" setter="set_base_size" getter="get_base_size" default="16">
+ Default font size.
+ </member>
+ <member name="spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0">
Extra spacing at the bottom of the line in pixels.
</member>
- <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ <member name="spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
Extra spacing at the top of the line in pixels.
</member>
+ <member name="variation_coordinates" type="Dictionary" setter="set_variation_coordinates" getter="get_variation_coordinates" default="{}">
+ Default font [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url].
+ </member>
</members>
- <constants>
- <constant name="SPACING_TOP" value="0" enum="SpacingType">
- Spacing at the top of the line.
- </constant>
- <constant name="SPACING_BOTTOM" value="1" enum="SpacingType">
- Spacing at the bottom of the line.
- </constant>
- </constants>
</class>
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml
index 7a845a698f..a814685388 100644
--- a/doc/classes/FontData.xml
+++ b/doc/classes/FontData.xml
@@ -1,122 +1,179 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="FontData" inherits="Resource" version="4.0">
<brief_description>
- Font data source, file or memory buffer.
+ Font source data and prerendered glyph cache, imported from dynamic or bitmap font.
+ Supported font formats:
+ - Dynamic font importer: TrueType (.ttf), OpenType (.otf), WOFF (.woff), Type 1 (.pfb, .pfm).
+ - Bitmap font importer: AngelCode BMFont (.fnt, .font), text and binary (version 3) format variants.
+ - Monospace image font importer: All supported image formats.
</brief_description>
<description>
- Built-in text servers support font data sources of the following formats:
- - Bitmap fonts in the [url=https://www.angelcode.com/products/bmfont/]BMFont[/url] format. Handles [code].fnt, *.font[/code] fonts containing texture atlases. Non-scalable. Supports distance fields. Complex text shaping support is limited.
- - Dynamic fonts using the [url=https://www.freetype.org/]FreeType[/url] and [url=https://github.com/silnrsi/graphite/]Graphite[/url] library for rasterization. Handles [code]*.ttf, *.otf[/code] fonts. Scalable. Doesn't support distance fields. Supports complex text shaping and OpenType features.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="bitmap_add_char">
+ <method name="clear_cache">
<return type="void" />
- <argument index="0" name="char" type="int" />
- <argument index="1" name="texture_idx" type="int" />
- <argument index="2" name="rect" type="Rect2" />
- <argument index="3" name="align" type="Vector2" />
- <argument index="4" name="advance" type="float" />
<description>
- Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance.
+ Removes all font cache entries.
</description>
</method>
- <method name="bitmap_add_kerning_pair">
+ <method name="clear_glyphs">
<return type="void" />
- <argument index="0" name="A" type="int" />
- <argument index="1" name="B" type="int" />
- <argument index="2" name="kerning" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
- Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
+ Removes all rendered glyphs information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.
</description>
</method>
- <method name="bitmap_add_texture">
+ <method name="clear_kerning_map">
<return type="void" />
- <argument index="0" name="texture" type="Texture" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
- Adds a texture to the bitmap font.
+ Removes all kerning overrides.
</description>
</method>
- <method name="draw_glyph" qualifiers="const">
- <return type="Vector2" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="pos" type="Vector2" />
- <argument index="3" name="index" type="int" />
- <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <method name="clear_size_cache">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
<description>
- Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
- Returns advance of the glyph for horizontal and vertical layouts.
- Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ Removes all font sizes from the cache entry
</description>
</method>
- <method name="draw_glyph_outline" qualifiers="const">
- <return type="Vector2" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="outline_size" type="int" />
- <argument index="3" name="pos" type="Vector2" />
- <argument index="4" name="index" type="int" />
- <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <method name="clear_textures">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Removes all textures from font cache entry. Note: This function will not remove glyphs associated with the texture, use [method remove_glyph] to remove them manually.
+ </description>
+ </method>
+ <method name="find_cache" qualifiers="const">
+ <return type="RID" />
+ <argument index="0" name="variation_coordinates" type="Dictionary" />
<description>
- Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. If outline drawing is not supported, nothing is drawn.
- Returns advance of the glyph for horizontal and vertical layouts (regardless of outline drawing support).
- Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ Returns existing or creates a new font cache entry for the specified variation coordinates.
</description>
</method>
<method name="get_ascent" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
Returns the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="get_base_size" qualifiers="const">
- <return type="float" />
+ <method name="get_cache_count" qualifiers="const">
+ <return type="int" />
<description>
- Returns the base size of the font (the only size supported for non-scalable fonts, meaningless for scalable fonts).
+ Returns number of the font cache entries.
+ </description>
+ </method>
+ <method name="get_cache_rid" qualifiers="const">
+ <return type="RID" />
+ <argument index="0" name="cache_index" type="int" />
+ <description>
+ Returns text server font cache entry resource id.
+ </description>
+ </method>
+ <method name="get_data" qualifiers="const">
+ <return type="PackedByteArray" />
+ <description>
+ Returns contents of the dynamic font source file.
</description>
</method>
<method name="get_descent" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
- Returns the font descent (number of pixels below the baseline).
+ Returns font descent (number of pixels below the baseline).
</description>
</method>
<method name="get_glyph_advance" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="index" type="int" />
+ <argument index="0" name="cache_index" type="int" />
<argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns advance of the glyph for horizontal and vertical layouts.
- Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ Returns glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
</description>
</method>
<method name="get_glyph_index" qualifiers="const">
<return type="int" />
<argument index="0" name="char" type="int" />
- <argument index="1" name="variation_selector" type="int" default="0" />
+ <argument index="1" name="variation_selector" type="int" />
+ <argument index="2" name="arg2" type="int" />
<description>
- Return the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
+ Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
</description>
</method>
- <method name="get_glyph_kerning" qualifiers="const">
+ <method name="get_glyph_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Returns list of rendered glyphs in the cache entry.
+ </description>
+ </method>
+ <method name="get_glyph_offset" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="index_a" type="int" />
- <argument index="1" name="index_b" type="int" />
- <argument index="2" name="size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns a kerning of the pair of glyphs for horizontal and vertical layouts.
- Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ Returns glyph offset from the baseline.
</description>
</method>
- <method name="get_height" qualifiers="const">
- <return type="float" />
- <argument index="0" name="size" type="int" />
+ <method name="get_glyph_size" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns the total font height (ascent plus descent) in pixels.
+ Returns glyph size.
+ </description>
+ </method>
+ <method name="get_glyph_texture_idx" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="get_glyph_uv_rect" qualifiers="const">
+ <return type="Rect2" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns rectangle in the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="get_hinting" qualifiers="const">
+ <return type="int" enum="TextServer.Hinting" />
+ <description>
+ Returns the font hinting mode. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="get_kerning" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <description>
+ Returns kerning for the pair of glyphs.
+ </description>
+ </method>
+ <method name="get_kerning_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns list of the kerning overrides.
</description>
</method>
<method name="get_language_support_override" qualifiers="const">
@@ -132,6 +189,32 @@
Returns list of language support overrides.
</description>
</method>
+ <method name="get_msdf_pixel_range" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the width of the range around the shape between the minimum and maximum representable signed distance.
+ </description>
+ </method>
+ <method name="get_msdf_size" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns source font size used to generate MSDF textures.
+ </description>
+ </method>
+ <method name="get_oversampling" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="get_scale" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns scaling factor of the color bitmap font.
+ </description>
+ </method>
<method name="get_script_support_override" qualifiers="const">
<return type="bool" />
<argument index="0" name="script" type="String" />
@@ -145,11 +228,20 @@
Returns list of script support overrides.
</description>
</method>
+ <method name="get_size_cache_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="cache_index" type="int" />
+ <description>
+ Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
+ </description>
+ </method>
<method name="get_spacing" qualifiers="const">
<return type="int" />
- <argument index="0" name="type" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="arg2" type="int" enum="TextServer.SpacingType" />
<description>
- Returns the spacing for the given [code]type[/code] (see [enum SpacingType]).
+ Returns extra spacing added between glyphs in pixels.
</description>
</method>
<method name="get_supported_chars" qualifiers="const">
@@ -158,32 +250,66 @@
Returns a string containing all the characters available in the font.
</description>
</method>
- <method name="get_underline_position" qualifiers="const">
- <return type="float" />
- <argument index="0" name="size" type="int" />
+ <method name="get_supported_feature_list" qualifiers="const">
+ <return type="Dictionary" />
<description>
- Returns underline offset (number of pixels below the baseline).
+ Returns list of OpenType features supported by font.
</description>
</method>
- <method name="get_underline_thickness" qualifiers="const">
+ <method name="get_supported_variation_list" qualifiers="const">
+ <return type="Dictionary" />
+ <description>
+ Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
+ Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
+ </description>
+ </method>
+ <method name="get_texture_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Returns number of textures used by font cache entry.
+ </description>
+ </method>
+ <method name="get_texture_image" qualifiers="const">
+ <return type="Image" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns a copy of the font cache texture image.
+ </description>
+ </method>
+ <method name="get_texture_offsets" qualifiers="const">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns a copy of the array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ </description>
+ </method>
+ <method name="get_underline_position" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
- Returns underline thickness in pixels.
+ Returns pixel offset of the underline below the baseline.
</description>
</method>
- <method name="get_variation" qualifiers="const">
+ <method name="get_underline_thickness" qualifiers="const">
<return type="float" />
- <argument index="0" name="tag" type="String" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
<description>
- Returns variation coordinate [code]tag[/code].
+ Returns thickness of the underline in pixels.
</description>
</method>
- <method name="get_variation_list" qualifiers="const">
+ <method name="get_variation_coordinates" qualifiers="const">
<return type="Dictionary" />
+ <argument index="0" name="cache_index" type="int" />
<description>
- Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
- Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
+ Returns variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info.
</description>
</method>
<method name="has_char" qualifiers="const">
@@ -193,10 +319,16 @@
Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
- <method name="has_outline" qualifiers="const">
+ <method name="is_antialiased" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled.
+ </description>
+ </method>
+ <method name="is_force_autohinter" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code], if font supports drawing glyph outlines.
+ Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only.
</description>
</method>
<method name="is_language_supported" qualifiers="const">
@@ -206,6 +338,12 @@
Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
</description>
</method>
+ <method name="is_multichannel_signed_distance_field" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
+ </description>
+ </method>
<method name="is_script_supported" qualifiers="const">
<return type="bool" />
<argument index="0" name="script" type="String" />
@@ -213,32 +351,29 @@
Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).
</description>
</method>
- <method name="load_memory">
+ <method name="remove_cache">
<return type="void" />
- <argument index="0" name="data" type="PackedByteArray" />
- <argument index="1" name="type" type="String" />
- <argument index="2" name="base_size" type="int" default="16" />
+ <argument index="0" name="cache_index" type="int" />
<description>
- Creates new font from the data in memory.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method get_base_size] to check actual font size.
+ Removes specified font cache entry.
</description>
</method>
- <method name="load_resource">
+ <method name="remove_glyph">
<return type="void" />
- <argument index="0" name="filename" type="String" />
- <argument index="1" name="base_size" type="int" default="16" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Creates new font from the file.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method get_base_size] to check actual font size.
+ Removes specified rendered glyph information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.
</description>
</method>
- <method name="new_bitmap">
+ <method name="remove_kerning">
<return type="void" />
- <argument index="0" name="height" type="float" />
- <argument index="1" name="ascent" type="float" />
- <argument index="2" name="base_size" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
<description>
- Creates new, empty bitmap font.
+ Removes kerning override for the pair of glyphs.
</description>
</method>
<method name="remove_language_support_override">
@@ -255,6 +390,148 @@
Removes script support override.
</description>
</method>
+ <method name="remove_size_cache">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Removes specified font size from the cache entry.
+ </description>
+ </method>
+ <method name="remove_texture">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Removes specified texture from font cache entry. Note: This function will not remove glyphs associated with the texture, remove them manually, using [method remove_glyph].
+ </description>
+ </method>
+ <method name="render_glyph">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="index" type="int" />
+ <description>
+ Renders specified glyph the the font cache texture.
+ </description>
+ </method>
+ <method name="render_range">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="start" type="int" />
+ <argument index="3" name="end" type="int" />
+ <description>
+ Renders the range of characters to the font cache texture.
+ </description>
+ </method>
+ <method name="set_antialiased">
+ <return type="void" />
+ <argument index="0" name="antialiased" type="bool" />
+ <description>
+ If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="set_ascent">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="ascent" type="float" />
+ <description>
+ Sets the font ascent (number of pixels above the baseline).
+ </description>
+ </method>
+ <method name="set_data">
+ <return type="void" />
+ <argument index="0" name="data" type="PackedByteArray" />
+ <description>
+ Sets font source data, e.g contents of the dynamic font source file.
+ </description>
+ </method>
+ <method name="set_descent">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="descent" type="float" />
+ <description>
+ Sets the font descent (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="set_force_autohinter">
+ <return type="void" />
+ <argument index="0" name="force_autohinter" type="bool" />
+ <description>
+ If set to [code]true[/code] auto-hinting is preffered over font built-in hinting.
+ </description>
+ </method>
+ <method name="set_glyph_advance">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="advance" type="Vector2" />
+ <description>
+ Sets glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
+ </description>
+ </method>
+ <method name="set_glyph_offset">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="offset" type="Vector2" />
+ <description>
+ Sets glyph offset from the baseline.
+ </description>
+ </method>
+ <method name="set_glyph_size">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="gl_size" type="Vector2" />
+ <description>
+ Sets glyph size.
+ </description>
+ </method>
+ <method name="set_glyph_texture_idx">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="texture_idx" type="int" />
+ <description>
+ Sets index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="set_glyph_uv_rect">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="uv_rect" type="Rect2" />
+ <description>
+ Sets rectangle in the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="set_hinting">
+ <return type="void" />
+ <argument index="0" name="hinting" type="int" enum="TextServer.Hinting" />
+ <description>
+ Sets font hinting mode. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="set_kerning">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <argument index="3" name="kerning" type="Vector2" />
+ <description>
+ Sets kerning for the pair of glyphs.
+ </description>
+ </method>
<method name="set_language_support_override">
<return type="void" />
<argument index="0" name="language" type="String" />
@@ -263,6 +540,44 @@
Adds override for [method is_language_supported].
</description>
</method>
+ <method name="set_msdf_pixel_range">
+ <return type="void" />
+ <argument index="0" name="msdf_pixel_range" type="int" />
+ <description>
+ Sets the width of the range around the shape between the minimum and maximum representable signed distance.
+ </description>
+ </method>
+ <method name="set_msdf_size">
+ <return type="void" />
+ <argument index="0" name="msdf_size" type="int" />
+ <description>
+ Sets source font size used to generate MSDF textures.
+ </description>
+ </method>
+ <method name="set_multichannel_signed_distance_field">
+ <return type="void" />
+ <argument index="0" name="msdf" type="bool" />
+ <description>
+ If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field (MSDF) generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes.
+ [b]Note:[/b] MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts.
+ </description>
+ </method>
+ <method name="set_oversampling">
+ <return type="void" />
+ <argument index="0" name="oversampling" type="float" />
+ <description>
+ Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="set_scale">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="scale" type="float" />
+ <description>
+ Sets scaling factor of the color bitmap font.
+ </description>
+ </method>
<method name="set_script_support_override">
<return type="void" />
<argument index="0" name="script" type="String" />
@@ -273,52 +588,59 @@
</method>
<method name="set_spacing">
<return type="void" />
- <argument index="0" name="type" type="int" />
- <argument index="1" name="value" type="int" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <argument index="3" name="arg3" type="int" />
+ <description>
+ Sets extra spacing added between glyphs in pixels.
+ </description>
+ </method>
+ <method name="set_texture_image">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="image" type="Image" />
+ <description>
+ Sets font cache texture image.
+ </description>
+ </method>
+ <method name="set_texture_offsets">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="offset" type="PackedInt32Array" />
+ <description>
+ Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty (for the fonts without dynamic glyph generation support).
+ </description>
+ </method>
+ <method name="set_underline_position">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_position" type="float" />
+ <description>
+ Sets pixel offset of the underline below the baseline.
+ </description>
+ </method>
+ <method name="set_underline_thickness">
+ <return type="void" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_thickness" type="float" />
<description>
- Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
+ Sets thickness of the underline in pixels.
</description>
</method>
- <method name="set_variation">
+ <method name="set_variation_coordinates">
<return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="float" />
+ <argument index="0" name="cache_index" type="int" />
+ <argument index="1" name="variation_coordinates" type="Dictionary" />
<description>
- Sets variation coordinate [code]tag[/code].
+ Sets variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info.
</description>
</method>
</methods>
- <members>
- <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false">
- If [code]true[/code], the font is rendered with anti-aliasing.
- </member>
- <member name="data_path" type="String" setter="set_data_path" getter="get_data_path" default="&quot;&quot;">
- The path to the font data file. If font data was loaded from memory location is set to [code]"(Memory)"[/code].
- </member>
- <member name="distance_field_hint" type="bool" setter="set_distance_field_hint" getter="get_distance_field_hint" default="false">
- If [code]true[/code], distance field hint is enabled.
- </member>
- <member name="extra_spacing_glyph" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing for each glyph in pixels.
- This can be a negative number to make the distance between glyphs smaller.
- </member>
- <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing for the space character in pixels.
- This can be a negative number to make the distance between words smaller.
- </member>
- <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="get_force_autohinter" default="false">
- If [code]true[/code], default autohinter is used for font hinting.
- </member>
- <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="0">
- The font hinting mode used by FreeType. See [enum TextServer.Hinting] for options.
- </member>
- </members>
- <constants>
- <constant name="SPACING_GLYPH" value="0" enum="SpacingType">
- Spacing for each glyph.
- </constant>
- <constant name="SPACING_SPACE" value="1" enum="SpacingType">
- Spacing for the space character.
- </constant>
- </constants>
</class>
diff --git a/doc/classes/GPUParticlesAttractor3D.xml b/doc/classes/GPUParticlesAttractor3D.xml
index 111827d294..7de52eedd7 100644
--- a/doc/classes/GPUParticlesAttractor3D.xml
+++ b/doc/classes/GPUParticlesAttractor3D.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation" default="1.0">
</member>
@@ -18,6 +16,4 @@
<member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/GPUParticlesAttractorBox.xml b/doc/classes/GPUParticlesAttractorBox.xml
index 49e6111c29..93fdc45e56 100644
--- a/doc/classes/GPUParticlesAttractorBox.xml
+++ b/doc/classes/GPUParticlesAttractorBox.xml
@@ -6,12 +6,8 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/GPUParticlesAttractorSphere.xml b/doc/classes/GPUParticlesAttractorSphere.xml
index 6984427a96..4398de55e9 100644
--- a/doc/classes/GPUParticlesAttractorSphere.xml
+++ b/doc/classes/GPUParticlesAttractorSphere.xml
@@ -6,12 +6,8 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/GPUParticlesAttractorVectorField.xml b/doc/classes/GPUParticlesAttractorVectorField.xml
index 7364a4b09f..e164343528 100644
--- a/doc/classes/GPUParticlesAttractorVectorField.xml
+++ b/doc/classes/GPUParticlesAttractorVectorField.xml
@@ -6,14 +6,10 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
</member>
<member name="texture" type="Texture3D" setter="set_texture" getter="get_texture">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/GPUParticlesCollision3D.xml b/doc/classes/GPUParticlesCollision3D.xml
index dce9a32fc4..1a7901839c 100644
--- a/doc/classes/GPUParticlesCollision3D.xml
+++ b/doc/classes/GPUParticlesCollision3D.xml
@@ -6,12 +6,8 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/GPUParticlesCollisionBox.xml b/doc/classes/GPUParticlesCollisionBox.xml
index 58de18556e..d2bf4ef538 100644
--- a/doc/classes/GPUParticlesCollisionBox.xml
+++ b/doc/classes/GPUParticlesCollisionBox.xml
@@ -6,12 +6,8 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/GPUParticlesCollisionHeightField.xml b/doc/classes/GPUParticlesCollisionHeightField.xml
index 0ddddda8e4..99b2ad3ce0 100644
--- a/doc/classes/GPUParticlesCollisionHeightField.xml
+++ b/doc/classes/GPUParticlesCollisionHeightField.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
</member>
diff --git a/doc/classes/GPUParticlesCollisionSDF.xml b/doc/classes/GPUParticlesCollisionSDF.xml
index 7ef6f5f3cd..8d798a9d28 100644
--- a/doc/classes/GPUParticlesCollisionSDF.xml
+++ b/doc/classes/GPUParticlesCollisionSDF.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
</member>
diff --git a/doc/classes/GPUParticlesCollisionSphere.xml b/doc/classes/GPUParticlesCollisionSphere.xml
index 41150960d2..ddb2391fd9 100644
--- a/doc/classes/GPUParticlesCollisionSphere.xml
+++ b/doc/classes/GPUParticlesCollisionSphere.xml
@@ -6,12 +6,8 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Geometry3D.xml b/doc/classes/Geometry3D.xml
index 9d0234529a..5b2e065d1a 100644
--- a/doc/classes/Geometry3D.xml
+++ b/doc/classes/Geometry3D.xml
@@ -125,6 +125,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml
index a9577fda90..93cef07b79 100644
--- a/doc/classes/Gradient.xml
+++ b/doc/classes/Gradient.xml
@@ -76,6 +76,4 @@
Gradient's offsets returned as a [PackedFloat32Array].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/GradientTexture.xml b/doc/classes/GradientTexture.xml
index 242a78b2e4..0f0f0b1a37 100644
--- a/doc/classes/GradientTexture.xml
+++ b/doc/classes/GradientTexture.xml
@@ -8,16 +8,15 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient">
The [Gradient] that will be used to fill the texture.
</member>
+ <member name="use_hdr" type="bool" setter="set_use_hdr" getter="is_using_hdr" default="false">
+ If [code]true[/code], the generated texture will support high dynamic range ([constant Image.FORMAT_RGBAF] format). This allows for glow effects to work if [member Environment.glow_enabled] is [code]true[/code]. If [code]false[/code], the generated texture will use low dynamic range; overbright colors will be clamped ([constant Image.FORMAT_RGBA8] format).
+ </member>
<member name="width" type="int" setter="set_width" getter="get_width" default="2048">
The number of color samples that will be obtained from the [Gradient].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 907cf8587d..2213b9b8b2 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -10,6 +10,14 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_get_connection_line" qualifiers="virtual const">
+ <return type="PackedVector2Array" />
+ <argument index="0" name="from" type="Vector2" />
+ <argument index="1" name="to" type="Vector2" />
+ <description>
+ Virtual method which can be overridden to customize how connections are drawn.
+ </description>
+ </method>
<method name="add_valid_connection_type">
<return type="void" />
<argument index="0" name="from_type" type="int" />
@@ -64,6 +72,14 @@
Removes the connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection does not exist, no connection is removed.
</description>
</method>
+ <method name="get_connection_line">
+ <return type="PackedVector2Array" />
+ <argument index="0" name="from" type="Vector2" />
+ <argument index="1" name="to" type="Vector2" />
+ <description>
+ Returns the points which would make up a connection between [code]from[/code] and [code]to[/code].
+ </description>
+ </method>
<method name="get_connection_list" qualifiers="const">
<return type="Array" />
<description>
@@ -271,8 +287,6 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
<theme_items>
<theme_item name="activity" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
</theme_item>
diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml
index 34e7cbcd79..758bab465d 100644
--- a/doc/classes/GridContainer.xml
+++ b/doc/classes/GridContainer.xml
@@ -11,15 +11,11 @@
<tutorials>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="columns" type="int" setter="set_columns" getter="get_columns" default="1">
The number of columns in the [GridContainer]. If modified, [GridContainer] reorders its Control-derived children to accommodate the new layout.
</member>
</members>
- <constants>
- </constants>
<theme_items>
<theme_item name="hseparation" data_type="constant" type="int" default="4">
The horizontal separation of children nodes.
diff --git a/doc/classes/GrooveJoint2D.xml b/doc/classes/GrooveJoint2D.xml
index 643b7aefea..1683842d65 100644
--- a/doc/classes/GrooveJoint2D.xml
+++ b/doc/classes/GrooveJoint2D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="initial_offset" type="float" setter="set_initial_offset" getter="get_initial_offset" default="25.0">
The body B's initial anchor position defined by the joint's origin and a local offset [member initial_offset] along the joint's Y axis (along the groove).
@@ -18,6 +16,4 @@
The groove's length. The groove is from the joint's origin towards [member length] along the joint's local Y axis.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml
index 9c3efb384e..ce254d8a15 100644
--- a/doc/classes/HBoxContainer.xml
+++ b/doc/classes/HBoxContainer.xml
@@ -8,10 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
<theme_items>
<theme_item name="separation" data_type="constant" type="int" default="4">
The horizontal space between the [HBoxContainer]'s elements.
diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml
index 88d3c5e2f3..69ad194fe0 100644
--- a/doc/classes/HMACContext.xml
+++ b/doc/classes/HMACContext.xml
@@ -77,6 +77,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml
index 3bdd739cdf..fa9961710f 100644
--- a/doc/classes/HScrollBar.xml
+++ b/doc/classes/HScrollBar.xml
@@ -8,10 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
<theme_items>
<theme_item name="decrement" data_type="icon" type="Texture2D">
Icon used as a button to scroll the [ScrollBar] left. Supports custom step using the [member ScrollBar.custom_step] property.
@@ -19,6 +15,9 @@
<theme_item name="decrement_highlight" data_type="icon" type="Texture2D">
Displayed when the mouse cursor hovers over the decrement button.
</theme_item>
+ <theme_item name="decrement_pressed" data_type="icon" type="Texture2D">
+ Displayed when the decrement button is being pressed.
+ </theme_item>
<theme_item name="grabber" data_type="style" type="StyleBox">
Used as texture for the grabber, the draggable element representing current scroll.
</theme_item>
@@ -34,6 +33,9 @@
<theme_item name="increment_highlight" data_type="icon" type="Texture2D">
Displayed when the mouse cursor hovers over the increment button.
</theme_item>
+ <theme_item name="increment_pressed" data_type="icon" type="Texture2D">
+ Displayed when the increment button is being pressed.
+ </theme_item>
<theme_item name="scroll" data_type="style" type="StyleBox">
Used as background of this [ScrollBar].
</theme_item>
diff --git a/doc/classes/HSeparator.xml b/doc/classes/HSeparator.xml
index 24495d208e..5a1011525c 100644
--- a/doc/classes/HSeparator.xml
+++ b/doc/classes/HSeparator.xml
@@ -8,10 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
<theme_items>
<theme_item name="separation" data_type="constant" type="int" default="4">
The height of the area covered by the separator. Effectively works like a minimum height.
diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml
index 37aa968161..fa88085a70 100644
--- a/doc/classes/HSlider.xml
+++ b/doc/classes/HSlider.xml
@@ -9,10 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
<theme_items>
<theme_item name="grabber" data_type="icon" type="Texture2D">
The texture for the grabber (the draggable element).
diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml
index 6bc9913344..379d4cfbdb 100644
--- a/doc/classes/HSplitContainer.xml
+++ b/doc/classes/HSplitContainer.xml
@@ -8,10 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
<theme_items>
<theme_item name="autohide" data_type="constant" type="int" default="1">
Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index 22398cc3ce..9f33c400f4 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -8,6 +8,8 @@
[b]Note:[/b] This client only needs to connect to a host once (see [method connect_to_host]) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See [method request] for a full example and to get started.
A [HTTPClient] should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side.
For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616).
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
+ [b]Note:[/b] It's recommended to use transport encryption (SSL/TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead.
[b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header.
[b]Note:[/b] SSL/TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error.
[b]Warning:[/b] SSL/TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period.
@@ -138,7 +140,7 @@
<argument index="3" name="body" type="String" default="&quot;&quot;" />
<description>
Sends a request to the connected host.
- The URL parameter is usually just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]).
+ The URL parameter is usually just the part after the host, so for [code]https://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]).
Headers are HTTP request headers. For available HTTP methods, see [enum Method].
To create a POST request with query strings to push to the server, do:
[codeblocks]
@@ -166,7 +168,7 @@
<argument index="3" name="body" type="PackedByteArray" />
<description>
Sends a raw request to the connected host.
- The URL parameter is usually just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]).
+ The URL parameter is usually just the part after the host, so for [code]https://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]).
Headers are HTTP request headers. For available HTTP methods, see [enum Method].
Sends the body data raw, as a byte array and does not encode it in any way.
</description>
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index f45ddd0abb..558e51aefe 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -7,6 +7,7 @@
A node with the ability to send HTTP requests. Uses [HTTPClient] internally.
Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP.
[b]Warning:[/b] See the notes and warnings on [HTTPClient] for limitations, especially regarding SSL security.
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
[b]Example of contacting a REST API and printing one of its returned fields:[/b]
[codeblocks]
[gdscript]
@@ -149,7 +150,6 @@
}
[/csharp]
[/codeblocks]
-
[b]Gzipped response bodies[/b]: HTTPRequest will automatically handle decompression of response bodies. A [code]Accept-Encoding[/code] header will be automatically added to each of your requests, unless one is already specified. Any response with a [code]Content-Encoding: gzip[/code] header will automatically be decompressed and delivered to you as uncompressed bytes.
</description>
<tutorials>
@@ -192,7 +192,8 @@
<description>
Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request].
Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host.
- [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example.
+ [b]Note:[/b] When [code]method[/code] is [constant HTTPClient.METHOD_GET], the payload sent via [code]request_data[/code] might be ignored by the server or even cause the server to reject the request (check [url=https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1]RFC 7231 section 4.3.1[/url] for more details). As a workaround, you can send data as a query string in the URL (see [method String.uri_encode] for an example).
+ [b]Note:[/b] It's recommended to use transport encryption (SSL/TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead.
</description>
</method>
<method name="request_raw">
diff --git a/doc/classes/HeightMapShape3D.xml b/doc/classes/HeightMapShape3D.xml
index 9a9d3bf8f4..705415171f 100644
--- a/doc/classes/HeightMapShape3D.xml
+++ b/doc/classes/HeightMapShape3D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="map_data" type="PackedFloat32Array" setter="set_map_data" getter="get_map_data" default="PackedFloat32Array(0, 0, 0, 0)">
Height map data, pool array must be of [member map_width] * [member map_depth] size.
@@ -21,6 +19,4 @@
Width of the height map data. Changing this will resize the [member map_data].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index 34c5fb582e..5d79e22c49 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -180,6 +180,7 @@
<argument index="0" name="renormalize" type="bool" default="false" />
<description>
Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is [code]0[/code].
+ [b]Note:[/b] Mipmap generation is done on the CPU, is single-threaded and is [i]always[/i] done on the main thread. This means generating mipmaps will result in noticeable stuttering during gameplay, even if [method generate_mipmaps] is called from a [Thread].
</description>
</method>
<method name="get_data" qualifiers="const">
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index 435fec6a50..af7178db95 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -61,6 +61,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ImageTexture3D.xml b/doc/classes/ImageTexture3D.xml
index 538a836c1c..ca4178f97a 100644
--- a/doc/classes/ImageTexture3D.xml
+++ b/doc/classes/ImageTexture3D.xml
@@ -25,6 +25,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ImageTextureLayered.xml b/doc/classes/ImageTextureLayered.xml
index 1b7400803d..f6ebc43d13 100644
--- a/doc/classes/ImageTextureLayered.xml
+++ b/doc/classes/ImageTextureLayered.xml
@@ -21,6 +21,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ImmediateMesh.xml b/doc/classes/ImmediateMesh.xml
index 69637d5bdd..75a3ec65c2 100644
--- a/doc/classes/ImmediateMesh.xml
+++ b/doc/classes/ImmediateMesh.xml
@@ -79,6 +79,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index cd14965d1b..9dc8fbeffa 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -106,6 +106,4 @@
[b]Note:[/b] This device ID will always be [code]-1[/code] for emulated mouse input from a touchscreen. This can be used to distinguish emulated mouse input from physical mouse input.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml
index 42326f344f..f09af1a34d 100644
--- a/doc/classes/InputEventAction.xml
+++ b/doc/classes/InputEventAction.xml
@@ -11,8 +11,6 @@
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="action" type="StringName" setter="set_action" getter="get_action" default="&amp;&quot;&quot;">
The action's name. Actions are accessed via this [String].
@@ -24,6 +22,4 @@
The action's strength between 0 and 1. This value is considered as equal to 0 if pressed is [code]false[/code]. The event strength allows faking analog joypad motion events, by specifying how strongly the joypad axis is bent or pressed.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventFromWindow.xml b/doc/classes/InputEventFromWindow.xml
index 7cd5b7d179..0d897b9699 100644
--- a/doc/classes/InputEventFromWindow.xml
+++ b/doc/classes/InputEventFromWindow.xml
@@ -6,12 +6,8 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="window_id" type="int" setter="set_window_id" getter="get_window_id" default="0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventGesture.xml b/doc/classes/InputEventGesture.xml
index fbde318ada..2d57b84cc8 100644
--- a/doc/classes/InputEventGesture.xml
+++ b/doc/classes/InputEventGesture.xml
@@ -7,13 +7,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)">
The local gesture position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] that received this gesture.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml
index f9afe42a7a..ff82913385 100644
--- a/doc/classes/InputEventJoypadButton.xml
+++ b/doc/classes/InputEventJoypadButton.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="button_index" type="int" setter="set_button_index" getter="get_button_index" enum="JoyButton" default="0">
Button identifier. One of the [enum JoyButton] button constants.
@@ -22,6 +20,4 @@
Represents the pressure the user puts on the button with his finger, if the controller supports it. Ranges from [code]0[/code] to [code]1[/code].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml
index 398b9eb6f6..92161974ba 100644
--- a/doc/classes/InputEventJoypadMotion.xml
+++ b/doc/classes/InputEventJoypadMotion.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="axis" type="int" setter="set_axis" getter="get_axis" enum="JoyAxis" default="0">
Axis identifier. Use one of the [enum JoyAxis] axis constants.
@@ -19,6 +17,4 @@
Current position of the joystick on the given axis. The value ranges from [code]-1.0[/code] to [code]1.0[/code]. A value of [code]0[/code] means the axis is in its resting position.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml
index f670d907fc..9cf6872655 100644
--- a/doc/classes/InputEventKey.xml
+++ b/doc/classes/InputEventKey.xml
@@ -44,6 +44,4 @@
The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method Window.set_ime_active] for more information.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml
index afc9d476da..040eee7b98 100644
--- a/doc/classes/InputEventMIDI.xml
+++ b/doc/classes/InputEventMIDI.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="channel" type="int" setter="set_channel" getter="get_channel" default="0">
</member>
@@ -26,6 +24,4 @@
<member name="velocity" type="int" setter="set_velocity" getter="get_velocity" default="0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventMagnifyGesture.xml b/doc/classes/InputEventMagnifyGesture.xml
index 3e539b2f97..ed0860a63a 100644
--- a/doc/classes/InputEventMagnifyGesture.xml
+++ b/doc/classes/InputEventMagnifyGesture.xml
@@ -6,12 +6,8 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="factor" type="float" setter="set_factor" getter="get_factor" default="1.0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml
index b8043118b7..b06068aff3 100644
--- a/doc/classes/InputEventMouse.xml
+++ b/doc/classes/InputEventMouse.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="0">
The mouse button mask identifier, one of or a bitwise combination of the [enum MouseButton] button masks.
@@ -22,6 +20,4 @@
The local mouse position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] which is under the mouse.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml
index 7a6c7410ef..dcfe0d6c71 100644
--- a/doc/classes/InputEventMouseButton.xml
+++ b/doc/classes/InputEventMouseButton.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="Mouse and input coordinates">https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="button_index" type="int" setter="set_button_index" getter="get_button_index" enum="MouseButton" default="0">
The mouse button identifier, one of the [enum MouseButton] button or button wheel constants.
@@ -25,6 +23,4 @@
If [code]true[/code], the mouse button's state is pressed. If [code]false[/code], the mouse button's state is released.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index 881d74ac7b..9a0156510e 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -11,8 +11,6 @@
<link title="Mouse and input coordinates">https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="pressure" type="float" setter="set_pressure" getter="get_pressure" default="0.0">
Represents the pressure the user puts on the pen. Ranges from [code]0.0[/code] to [code]1.0[/code].
@@ -28,6 +26,4 @@
Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from [code]-1.0[/code] to [code]1.0[/code] for both axes.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventPanGesture.xml b/doc/classes/InputEventPanGesture.xml
index ffb1901dad..2de3459df7 100644
--- a/doc/classes/InputEventPanGesture.xml
+++ b/doc/classes/InputEventPanGesture.xml
@@ -6,12 +6,8 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="delta" type="Vector2" setter="set_delta" getter="get_delta" default="Vector2(0, 0)">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml
index 079ac03f45..373936225b 100644
--- a/doc/classes/InputEventScreenDrag.xml
+++ b/doc/classes/InputEventScreenDrag.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="index" type="int" setter="set_index" getter="get_index" default="0">
The drag event index in the case of a multi-drag event.
@@ -25,6 +23,4 @@
The drag speed.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml
index 7aa5f62b05..c731044c98 100644
--- a/doc/classes/InputEventScreenTouch.xml
+++ b/doc/classes/InputEventScreenTouch.xml
@@ -10,8 +10,6 @@
<tutorials>
<link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="index" type="int" setter="set_index" getter="get_index" default="0">
The touch index in the case of a multi-touch event. One index = one finger.
@@ -23,6 +21,4 @@
If [code]true[/code], the touch's state is pressed. If [code]false[/code], the touch's state is released.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputEventShortcut.xml b/doc/classes/InputEventShortcut.xml
new file mode 100644
index 0000000000..ea84db541c
--- /dev/null
+++ b/doc/classes/InputEventShortcut.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="InputEventShortcut" inherits="InputEvent" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="shortcut" type="Shortcut" setter="set_shortcut" getter="get_shortcut">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml
index 3beea7f9a0..1b9212bf65 100644
--- a/doc/classes/InputEventWithModifiers.xml
+++ b/doc/classes/InputEventWithModifiers.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="alt_pressed" type="bool" setter="set_alt_pressed" getter="is_alt_pressed" default="false">
State of the [kbd]Alt[/kbd] modifier.
@@ -32,6 +30,4 @@
This aids with cross-platform compatibility when developing e.g. on Windows for macOS, or vice-versa.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml
index 16c2695613..855d5b5d71 100644
--- a/doc/classes/InputMap.xml
+++ b/doc/classes/InputMap.xml
@@ -109,6 +109,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml
index 75892895d7..e67232ebac 100644
--- a/doc/classes/InstancePlaceholder.xml
+++ b/doc/classes/InstancePlaceholder.xml
@@ -31,6 +31,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/IntervalTweener.xml b/doc/classes/IntervalTweener.xml
index 1c59003c70..f2f58b4ca6 100644
--- a/doc/classes/IntervalTweener.xml
+++ b/doc/classes/IntervalTweener.xml
@@ -9,8 +9,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 06e98f7e57..e3e4a9fa7d 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -403,6 +403,9 @@
<member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="ItemList.SelectMode" default="0">
Allows single or multiple item selection. See the [enum SelectMode] constants.
</member>
+ <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextParagraph.OverrunBehavior" default="0">
+ Sets the clipping behavior when the text exceeds an item's bounding rectangle. See [enum TextParagraph.OverrunBehavior] for a description of all modes.
+ </member>
</members>
<signals>
<signal name="item_activated">
diff --git a/doc/classes/JNISingleton.xml b/doc/classes/JNISingleton.xml
index 84ab1a49c1..ce39e1f567 100644
--- a/doc/classes/JNISingleton.xml
+++ b/doc/classes/JNISingleton.xml
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="JNISingleton" inherits="Object" version="4.0">
<brief_description>
+ Singleton that connects the engine with Android plugins to interface with native Android code.
</brief_description>
<description>
+ The JNISingleton is implemented only in the Android export. It's used to call methods and connect signals from an Android plugin written in Java or Kotlin. Methods and signals can be called and connected to the JNISingleton as if it is a Node. See [url=https://en.wikipedia.org/wiki/Java_Native_Interface]Java Native Interface - Wikipedia[/url] for more information.
</description>
<tutorials>
+ <link title="Creating Android plugins">https://docs.godotengine.org/en/latest/tutorials/platform/android/android_plugin.html#doc-android-plugin</link>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
index cee7db08e9..63e6307b39 100644
--- a/doc/classes/JSON.xml
+++ b/doc/classes/JSON.xml
@@ -91,6 +91,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/JavaClass.xml b/doc/classes/JavaClass.xml
index 0b6a44fe14..b024f0ccd4 100644
--- a/doc/classes/JavaClass.xml
+++ b/doc/classes/JavaClass.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/JavaClassWrapper.xml b/doc/classes/JavaClassWrapper.xml
index 90d988f9bb..f532207f03 100644
--- a/doc/classes/JavaClassWrapper.xml
+++ b/doc/classes/JavaClassWrapper.xml
@@ -14,6 +14,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml
index d68b4492c7..5865ad734e 100644
--- a/doc/classes/JavaScript.xml
+++ b/doc/classes/JavaScript.xml
@@ -54,6 +54,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/JavaScriptObject.xml b/doc/classes/JavaScriptObject.xml
index 087fe163b4..5aa54a7d0c 100644
--- a/doc/classes/JavaScriptObject.xml
+++ b/doc/classes/JavaScriptObject.xml
@@ -35,8 +35,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml
index b055293b9d..b003224ad4 100644
--- a/doc/classes/Joint2D.xml
+++ b/doc/classes/Joint2D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0">
When [member node_a] and [member node_b] move in different directions the [code]bias[/code] controls how fast the joint pulls them back to their original position. The lower the [code]bias[/code] the more the two bodies can pull on the joint.
@@ -24,6 +22,4 @@
The second body attached to the joint. Must derive from [PhysicsBody2D].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Joint3D.xml b/doc/classes/Joint3D.xml
index 94cdda586c..4b2c1ab4cb 100644
--- a/doc/classes/Joint3D.xml
+++ b/doc/classes/Joint3D.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="collision/exclude_nodes" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true">
If [code]true[/code], the two bodies of the nodes are not able to collide with each other.
@@ -25,6 +23,4 @@
The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml
index 721b840e99..c558c541ad 100644
--- a/doc/classes/KinematicCollision2D.xml
+++ b/doc/classes/KinematicCollision2D.xml
@@ -56,6 +56,4 @@
The distance the moving object traveled before collision.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml
index 5477736c25..db32cf57bc 100644
--- a/doc/classes/KinematicCollision3D.xml
+++ b/doc/classes/KinematicCollision3D.xml
@@ -12,41 +12,114 @@
<methods>
<method name="get_angle" qualifiers="const">
<return type="float" />
- <argument index="0" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <argument index="1" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" />
<description>
The collision angle according to [code]up_direction[/code], which is [code]Vector3.UP[/code] by default. This value is always positive.
</description>
</method>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ Returns the collider by index (the latest by default).
+ </description>
+ </method>
+ <method name="get_collider_id" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ Returns the collider ID by index (the latest by default).
+ </description>
+ </method>
+ <method name="get_collider_metadata" qualifiers="const">
+ <return type="Variant" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ Returns the collider metadata by index (the latest by default).
+ </description>
+ </method>
+ <method name="get_collider_rid" qualifiers="const">
+ <return type="RID" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ Returns the collider RID by index (the latest by default).
+ </description>
+ </method>
+ <method name="get_collider_shape" qualifiers="const">
+ <return type="Object" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ Returns the collider shape by index (the latest by default).
+ </description>
+ </method>
+ <method name="get_collider_shape_index" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ Returns the collider shape index by index (the latest by default).
+ </description>
+ </method>
+ <method name="get_collider_velocity" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ Returns the collider velocity by index (the latest by default).
+ </description>
+ </method>
+ <method name="get_local_shape" qualifiers="const">
+ <return type="Object" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ Returns the collider velocity by index (the latest by default).
+ </description>
+ </method>
+ <method name="get_normal" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ Returns the collider normal by index (the latest by default).
+ </description>
+ </method>
+ <method name="get_position" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ Returns the collider collision point by index (the latest by default).
+ </description>
+ </method>
</methods>
<members>
- <member name="collider" type="Object" setter="" getter="get_collider">
+ <member name="collider" type="Object" setter="" getter="get_best_collider">
The colliding body.
</member>
- <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0">
+ <member name="collider_id" type="int" setter="" getter="get_best_collider_id" default="0">
The colliding body's unique instance ID. See [method Object.get_instance_id].
</member>
- <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata">
+ <member name="collider_metadata" type="Variant" setter="" getter="get_best_collider_metadata">
The colliding body's metadata. See [Object].
</member>
- <member name="collider_rid" type="RID" setter="" getter="get_collider_rid">
+ <member name="collider_rid" type="RID" setter="" getter="get_best_collider_rid">
The colliding body's [RID] used by the [PhysicsServer3D].
</member>
- <member name="collider_shape" type="Object" setter="" getter="get_collider_shape">
+ <member name="collider_shape" type="Object" setter="" getter="get_best_collider_shape">
The colliding body's shape.
</member>
- <member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index" default="0">
+ <member name="collider_shape_index" type="int" setter="" getter="get_best_collider_shape_index" default="0">
The colliding shape's index. See [CollisionObject3D].
</member>
- <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" default="Vector3(0, 0, 0)">
+ <member name="collider_velocity" type="Vector3" setter="" getter="get_best_collider_velocity" default="Vector3(0, 0, 0)">
The colliding object's velocity.
</member>
- <member name="local_shape" type="Object" setter="" getter="get_local_shape">
+ <member name="collision_count" type="int" setter="" getter="get_collision_count" default="0">
+ </member>
+ <member name="local_shape" type="Object" setter="" getter="get_best_local_shape">
The moving object's colliding shape.
</member>
- <member name="normal" type="Vector3" setter="" getter="get_normal" default="Vector3(0, 0, 0)">
+ <member name="normal" type="Vector3" setter="" getter="get_best_normal" default="Vector3(0, 0, 0)">
The colliding body's shape's normal at the point of collision.
</member>
- <member name="position" type="Vector3" setter="" getter="get_position" default="Vector3(0, 0, 0)">
+ <member name="position" type="Vector3" setter="" getter="get_best_position" default="Vector3(0, 0, 0)">
The point of collision, in global coordinates.
</member>
<member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3(0, 0, 0)">
@@ -56,6 +129,4 @@
The distance the moving object traveled before collision.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index 380e9314d4..52359b0ede 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -47,7 +47,8 @@
The light's strength multiplier (this is not a physical unit). For [OmniLight3D] and [SpotLight3D], changing this value will only change the light color's intensity, not the light's radius.
</member>
<member name="light_indirect_energy" type="float" setter="set_param" getter="get_param" default="1.0">
- Secondary multiplier used with indirect light (light bounces). Used with [VoxelGI].
+ Secondary multiplier used with indirect light (light bounces). Used with [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled]).
+ [b]Note:[/b] This property is ignored if [member light_energy] is equal to [code]0.0[/code], as the light won't be present at all in the GI shader.
</member>
<member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false">
If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows.
@@ -61,7 +62,7 @@
<member name="light_specular" type="float" setter="set_param" getter="get_param" default="0.5">
The intensity of the specular blob in objects affected by the light. At [code]0[/code], the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface.
</member>
- <member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.1">
+ <member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.2">
Used to adjust shadow appearance. Too small a value results in self-shadowing ("shadow acne"), while too large a value causes shadows to separate from casters ("peter-panning"). Adjust as needed.
</member>
<member name="shadow_blur" type="float" setter="set_param" getter="get_param" default="1.0">
@@ -75,7 +76,7 @@
</member>
<member name="shadow_fog_fade" type="float" setter="set_param" getter="get_param" default="0.1">
</member>
- <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="2.0">
+ <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="1.0">
Offsets the lookup into the shadow map by the object's normal. This can be used to reduce self-shadowing artifacts without using [member shadow_bias]. In practice, this value should be tweaked along with [member shadow_bias] to reduce artifacts as much as possible.
</member>
<member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face" default="false">
diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml
index 550daf9225..ba795a29a1 100644
--- a/doc/classes/LightOccluder2D.xml
+++ b/doc/classes/LightOccluder2D.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="2D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon">
The [OccluderPolygon2D] used to compute the shadow.
@@ -21,6 +19,4 @@
<member name="sdf_collision" type="bool" setter="set_as_sdf_collision" getter="is_set_as_sdf_collision" default="true">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/LightmapGI.xml b/doc/classes/LightmapGI.xml
index d7722a83b0..0cdf9f820f 100644
--- a/doc/classes/LightmapGI.xml
+++ b/doc/classes/LightmapGI.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0005">
</member>
diff --git a/doc/classes/LightmapGIData.xml b/doc/classes/LightmapGIData.xml
index c577439c8f..f678ae48d9 100644
--- a/doc/classes/LightmapGIData.xml
+++ b/doc/classes/LightmapGIData.xml
@@ -48,6 +48,4 @@
<member name="light_texture" type="TextureLayered" setter="set_light_texture" getter="get_light_texture">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/LightmapProbe.xml b/doc/classes/LightmapProbe.xml
index 3af71f3774..465e645216 100644
--- a/doc/classes/LightmapProbe.xml
+++ b/doc/classes/LightmapProbe.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Lightmapper.xml b/doc/classes/Lightmapper.xml
index 79fae42d68..d9a9a55f6a 100644
--- a/doc/classes/Lightmapper.xml
+++ b/doc/classes/Lightmapper.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/LightmapperRD.xml b/doc/classes/LightmapperRD.xml
index 0993b28f19..cfa9a4e2df 100644
--- a/doc/classes/LightmapperRD.xml
+++ b/doc/classes/LightmapperRD.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index 093ba51755..4d9abbbb19 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -58,6 +58,7 @@
<members>
<member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false">
If [code]true[/code], the line's border will be anti-aliased.
+ [b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased.
</member>
<member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode" default="0">
Controls the style of the line's first point. Use [enum LineCapMode] constants.
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index 834b5a41db..83e3f5b05a 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -82,6 +82,24 @@
Returns the scroll offset due to [member caret_column], as a number of characters.
</description>
</method>
+ <method name="get_selection_from_column" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the selection begin column.
+ </description>
+ </method>
+ <method name="get_selection_to_column" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the selection end column.
+ </description>
+ </method>
+ <method name="has_selection" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the user has selected text.
+ </description>
+ </method>
<method name="insert_text_at_caret">
<return type="void" />
<argument index="0" name="text" type="String" />
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml
index 11124a1436..1df00f556a 100644
--- a/doc/classes/MainLoop.xml
+++ b/doc/classes/MainLoop.xml
@@ -5,15 +5,14 @@
</brief_description>
<description>
[MainLoop] is the abstract base class for a Godot project's game loop. It is inherited by [SceneTree], which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own [MainLoop] subclass instead of the scene tree.
- Upon the application start, a [MainLoop] implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a [SceneTree] is created) unless a main [Script] is provided from the command line (with e.g. [code]godot -s my_loop.gd[/code], which should then be a [MainLoop] implementation.
+ Upon the application start, a [MainLoop] implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a [SceneTree] is created) unless a [MainLoop] [Script] is provided from the command line (with e.g. [code]godot -s my_loop.gd[/code] or the "Main Loop Type" project setting is overwritten.
Here is an example script implementing a simple [MainLoop]:
- [b]FIXME:[/b] No longer valid after DisplayServer split and Input refactoring.
- [codeblock]
+ [codeblocks]
+ [gdscript]
+ class_name CustomMainLoop
extends MainLoop
var time_elapsed = 0
- var keys_typed = []
- var quit = false
func _initialize():
print("Initialized:")
@@ -22,24 +21,41 @@
func _process(delta):
time_elapsed += delta
# Return true to end the main loop.
- return quit
-
- func _input_event(event):
- # Record keys.
- if event is InputEventKey and event.pressed and !event.echo:
- keys_typed.append(OS.get_keycode_string(event.keycode))
- # Quit on Escape press.
- if event.keycode == KEY_ESCAPE:
- quit = true
- # Quit on any mouse click.
- if event is InputEventMouseButton:
- quit = true
+ return Input.get_mouse_button_mask() != 0 || Input.is_key_pressed(KEY_ESCAPE)
func _finalize():
print("Finalized:")
print(" End time: %s" % str(time_elapsed))
- print(" Keys typed: %s" % var2str(keys_typed))
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ using Godot;
+ using System;
+
+ public class CustomMainLoop : MainLoop
+ {
+ public float TimeElapsed = 0;
+
+ public override void _Initialize()
+ {
+ GD.Print("Initialized:");
+ GD.Print($" Starting Time: {TimeElapsed}");
+ }
+
+ public override bool _Process(float delta)
+ {
+ TimeElapsed += delta;
+ // Return true to end the main loop.
+ return Input.GetMouseButtonMask() != 0 || Input.IsKeyPressed((int)KeyList.Escape);
+ }
+
+ private void _Finalize()
+ {
+ GD.Print("Finalized:");
+ GD.Print($" End Time: {TimeElapsed}");
+ }
+ }
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml
index 419857c13f..2948e58f50 100644
--- a/doc/classes/MarginContainer.xml
+++ b/doc/classes/MarginContainer.xml
@@ -27,10 +27,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
<theme_items>
<theme_item name="margin_bottom" data_type="constant" type="int" default="0">
All direct children of [MarginContainer] will have a bottom margin of [code]margin_bottom[/code] pixels.
diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml
index 0f36dd11ca..eb6635f03f 100644
--- a/doc/classes/Marshalls.xml
+++ b/doc/classes/Marshalls.xml
@@ -55,6 +55,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index 1c7e6f1f19..5bdc9cccd9 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -41,8 +41,6 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
<theme_items>
<theme_item name="disabled" data_type="style" type="StyleBox">
[StyleBox] used when the [MenuButton] is disabled.
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index bfa55c2d35..c774528a39 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -210,6 +210,8 @@
</constant>
<constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat">
</constant>
+ <constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat">
+ </constant>
<constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat">
</constant>
<constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat">
diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml
index 338deed0be..35e4451918 100644
--- a/doc/classes/MeshDataTool.xml
+++ b/doc/classes/MeshDataTool.xml
@@ -332,6 +332,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml
index 59b312f69a..c7b66c8ea3 100644
--- a/doc/classes/MeshInstance2D.xml
+++ b/doc/classes/MeshInstance2D.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="2D meshes">https://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
The [Mesh] that will be drawn by the [MeshInstance2D].
@@ -30,6 +28,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
index 665d5d3c77..507a76197a 100644
--- a/doc/classes/MeshInstance3D.xml
+++ b/doc/classes/MeshInstance3D.xml
@@ -81,6 +81,4 @@
Sets the skin to be used by this instance.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index 9e0292f946..9fde19588a 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -45,6 +45,13 @@
Returns the item's mesh.
</description>
</method>
+ <method name="get_item_mesh_transform" qualifiers="const">
+ <return type="Transform3D" />
+ <argument index="0" name="id" type="int" />
+ <description>
+ Returns the transform applied to the item's mesh.
+ </description>
+ </method>
<method name="get_item_name" qualifiers="const">
<return type="String" />
<argument index="0" name="id" type="int" />
@@ -102,6 +109,14 @@
Sets the item's mesh.
</description>
</method>
+ <method name="set_item_mesh_transform">
+ <return type="void" />
+ <argument index="0" name="id" type="int" />
+ <argument index="1" name="mesh_transform" type="Transform3D" />
+ <description>
+ Sets the transform to apply to the item's mesh.
+ </description>
+ </method>
<method name="set_item_name">
<return type="void" />
<argument index="0" name="id" type="int" />
@@ -145,6 +160,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/MeshTexture.xml b/doc/classes/MeshTexture.xml
index 57f2397874..eb0451fea6 100644
--- a/doc/classes/MeshTexture.xml
+++ b/doc/classes/MeshTexture.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="base_texture" type="Texture2D" setter="set_base_texture" getter="get_base_texture">
Sets the base texture that the Mesh will use to draw.
@@ -21,6 +19,4 @@
Sets the mesh used to draw. It must be a mesh using 2D vertices.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/MethodTweener.xml b/doc/classes/MethodTweener.xml
index 1b93b20d9f..5780aa00d9 100644
--- a/doc/classes/MethodTweener.xml
+++ b/doc/classes/MethodTweener.xml
@@ -32,6 +32,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml
index a461c8e056..328ddff0eb 100644
--- a/doc/classes/MultiMeshInstance2D.xml
+++ b/doc/classes/MultiMeshInstance2D.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh">
The [MultiMesh] that will be drawn by the [MultiMeshInstance2D].
@@ -30,6 +28,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/MultiMeshInstance3D.xml b/doc/classes/MultiMeshInstance3D.xml
index 7d8035ba77..7bf05d2d34 100644
--- a/doc/classes/MultiMeshInstance3D.xml
+++ b/doc/classes/MultiMeshInstance3D.xml
@@ -12,13 +12,9 @@
<link title="Using MultiMeshInstance">https://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html</link>
<link title="Optimization using MultiMeshes">https://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh">
The [MultiMesh] resource that will be used and shared among all instances of the [MultiMeshInstance3D].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index b9f50ad02a..e0da08f5bd 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -4,10 +4,11 @@
High-level multiplayer API.
</brief_description>
<description>
- This class implements most of the logic behind the high-level multiplayer API. See also [MultiplayerPeer].
- By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPC/RSET) across the whole scene.
+ This class implements the high-level multiplayer API. See also [MultiplayerPeer].
+ By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPCs) across the whole scene.
It is possible to override the MultiplayerAPI instance used by specific Nodes by setting the [member Node.custom_multiplayer] property, effectively allowing to run both client and server in the same scene.
[b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
</tutorials>
@@ -18,93 +19,67 @@
Clears the current MultiplayerAPI network state (you shouldn't call this unless you know what you are doing).
</description>
</method>
- <method name="get_network_connected_peers" qualifiers="const">
+ <method name="get_peers" qualifiers="const">
<return type="PackedInt32Array" />
<description>
- Returns the peer IDs of all connected peers of this MultiplayerAPI's [member network_peer].
+ Returns the peer IDs of all connected peers of this MultiplayerAPI's [member multiplayer_peer].
</description>
</method>
- <method name="get_network_unique_id" qualifiers="const">
+ <method name="get_remote_sender_id" qualifiers="const">
<return type="int" />
<description>
- Returns the unique peer ID of this MultiplayerAPI's [member network_peer].
+ Returns the sender's peer ID for the RPC currently being executed.
+ [b]Note:[/b] If not inside an RPC this method will return 0.
</description>
</method>
- <method name="get_rpc_sender_id" qualifiers="const">
+ <method name="get_unique_id" qualifiers="const">
<return type="int" />
<description>
- Returns the sender's peer ID for the RPC currently being executed.
- [b]Note:[/b] If not inside an RPC this method will return 0.
+ Returns the unique peer ID of this MultiplayerAPI's [member multiplayer_peer].
</description>
</method>
- <method name="has_network_peer" qualifiers="const">
+ <method name="has_multiplayer_peer" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if there is a [member network_peer] set.
+ Returns [code]true[/code] if there is a [member multiplayer_peer] set.
</description>
</method>
- <method name="is_network_server" qualifiers="const">
+ <method name="is_server" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if this MultiplayerAPI's [member network_peer] is in server mode (listening for connections).
+ Returns [code]true[/code] if this MultiplayerAPI's [member multiplayer_peer] is valid and in server mode (listening for connections).
</description>
</method>
<method name="poll">
<return type="void" />
<description>
Method used for polling the MultiplayerAPI. You only need to worry about this if you are using [member Node.custom_multiplayer] override or you set [member SceneTree.multiplayer_poll] to [code]false[/code]. By default, [SceneTree] will poll its MultiplayerAPI for you.
- [b]Note:[/b] This method results in RPCs and RSETs being called, so they will be executed in the same context of this function (e.g. [code]_process[/code], [code]physics[/code], [Thread]).
+ [b]Note:[/b] This method results in RPCs being called, so they will be executed in the same context of this function (e.g. [code]_process[/code], [code]physics[/code], [Thread]).
</description>
</method>
<method name="send_bytes">
<return type="int" enum="Error" />
<argument index="0" name="bytes" type="PackedByteArray" />
<argument index="1" name="id" type="int" default="0" />
- <argument index="2" name="mode" type="int" enum="MultiplayerPeer.TransferMode" default="2" />
+ <argument index="2" name="mode" type="int" enum="TransferMode" default="2" />
<argument index="3" name="channel" type="int" default="0" />
<description>
Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method MultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers.
</description>
</method>
- <method name="send_despawn">
- <return type="int" enum="Error" />
- <argument index="0" name="peer_id" type="int" />
- <argument index="1" name="scene_id" type="int" />
- <argument index="2" name="path" type="NodePath" />
- <argument index="3" name="data" type="PackedByteArray" default="PackedByteArray()" />
- <description>
- Sends a despawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant SPAWN_MODE_SERVER] (see [method spawnable_config]) and the request is sent by the server (see [method is_network_server]), the receiving peer(s) will automatically queue for deletion the node at [code]path[/code] and emit the signal [signal network_despawn]. In all other cases no deletion happens, and the signal [signal network_despawn_request] is emitted instead.
- </description>
- </method>
- <method name="send_spawn">
- <return type="int" enum="Error" />
- <argument index="0" name="peer_id" type="int" />
- <argument index="1" name="scene_id" type="int" />
- <argument index="2" name="path" type="NodePath" />
- <argument index="3" name="data" type="PackedByteArray" default="PackedByteArray()" />
- <description>
- Sends a spawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant SPAWN_MODE_SERVER] (see [method spawnable_config]) and the request is sent by the server (see [method is_network_server]), the receiving peer(s) will automatically instantiate that scene, add it to the [SceneTree] at the given [code]path[/code] and emit the signal [signal network_spawn]. In all other cases no instantiation happens, and the signal [signal network_spawn_request] is emitted instead.
- </description>
- </method>
- <method name="spawnable_config">
- <return type="int" enum="Error" />
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="spawn_mode" type="int" enum="MultiplayerAPI.SpawnMode" />
- <description>
- Configures the MultiplayerAPI to track instances of the [PackedScene] idenfied by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication. See [enum SpawnMode] for the possible configurations.
- </description>
- </method>
</methods>
<members>
<member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false">
- If [code]true[/code], the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs.
+ If [code]true[/code], the MultiplayerAPI will allow encoding and decoding of object during RPCs.
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
</member>
- <member name="network_peer" type="MultiplayerPeer" setter="set_network_peer" getter="get_network_peer">
- The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals.
+ <member name="multiplayer_peer" type="MultiplayerPeer" setter="set_multiplayer_peer" getter="get_multiplayer_peer">
+ The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_server]) and will set root node's network mode to authority, or it will become a regular client peer. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals.
+ </member>
+ <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="false">
+ If [code]true[/code], the MultiplayerAPI's [member multiplayer_peer] refuses new incoming connections.
</member>
- <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false">
- If [code]true[/code], the MultiplayerAPI's [member network_peer] refuses new incoming connections.
+ <member name="replicator" type="MultiplayerReplicator" setter="" getter="get_replicator">
</member>
<member name="root_node" type="Node" setter="set_root_node" getter="get_root_node">
The root node to use for RPCs. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed.
@@ -114,112 +89,37 @@
<signals>
<signal name="connected_to_server">
<description>
- Emitted when this MultiplayerAPI's [member network_peer] successfully connected to a server. Only emitted on clients.
+ Emitted when this MultiplayerAPI's [member multiplayer_peer] successfully connected to a server. Only emitted on clients.
</description>
</signal>
<signal name="connection_failed">
<description>
- Emitted when this MultiplayerAPI's [member network_peer] fails to establish a connection to a server. Only emitted on clients.
+ Emitted when this MultiplayerAPI's [member multiplayer_peer] fails to establish a connection to a server. Only emitted on clients.
</description>
</signal>
- <signal name="network_despawn">
+ <signal name="peer_connected">
<argument index="0" name="id" type="int" />
- <argument index="1" name="scene_id" type="int" />
- <argument index="2" name="node" type="Node" />
- <argument index="3" name="data" type="PackedByteArray" />
<description>
- Emitted on a client before deleting a local Node upon receiving a despawn request from the server.
+ Emitted when this MultiplayerAPI's [member multiplayer_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1).
</description>
</signal>
- <signal name="network_despawn_request">
+ <signal name="peer_disconnected">
<argument index="0" name="id" type="int" />
- <argument index="1" name="scene_id" type="int" />
- <argument index="2" name="parent" type="Node" />
- <argument index="3" name="name" type="String" />
- <argument index="4" name="data" type="PackedByteArray" />
<description>
- Emitted when a network despawn request has been received from a client, or for a [PackedScene] that has been configured as [constant SPAWN_MODE_CUSTOM].
+ Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server.
</description>
</signal>
- <signal name="network_peer_connected">
- <argument index="0" name="id" type="int" />
- <description>
- Emitted when this MultiplayerAPI's [member network_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1).
- </description>
- </signal>
- <signal name="network_peer_disconnected">
- <argument index="0" name="id" type="int" />
- <description>
- Emitted when this MultiplayerAPI's [member network_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server.
- </description>
- </signal>
- <signal name="network_peer_packet">
+ <signal name="peer_packet">
<argument index="0" name="id" type="int" />
<argument index="1" name="packet" type="PackedByteArray" />
<description>
- Emitted when this MultiplayerAPI's [member network_peer] receive a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet.
- </description>
- </signal>
- <signal name="network_spawn">
- <argument index="0" name="id" type="int" />
- <argument index="1" name="scene_id" type="int" />
- <argument index="2" name="node" type="Node" />
- <argument index="3" name="data" type="PackedByteArray" />
- <description>
- Emitted on a client after a new Node is instantiated locally and added to the SceneTree upon receiving a spawn request from the server.
- </description>
- </signal>
- <signal name="network_spawn_request">
- <argument index="0" name="id" type="int" />
- <argument index="1" name="scene_id" type="int" />
- <argument index="2" name="parent" type="Node" />
- <argument index="3" name="name" type="String" />
- <argument index="4" name="data" type="PackedByteArray" />
- <description>
- Emitted when a network spawn request has been received from a client, or for a [PackedScene] that has been configured as [constant SPAWN_MODE_CUSTOM].
- </description>
- </signal>
- <signal name="network_spawnable_added">
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="node" type="Node" />
- <description>
- Emitted when an instance of a [PackedScene] that has been configured for networking enters the [SceneTree]. See [method spawnable_config].
- </description>
- </signal>
- <signal name="network_spawnable_removed">
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="node" type="Node" />
- <description>
- Emitted when an instance of a [PackedScene] that has been configured for networking leaves the [SceneTree]. See [method spawnable_config].
+ Emitted when this MultiplayerAPI's [member multiplayer_peer] receives a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet.
</description>
</signal>
<signal name="server_disconnected">
<description>
- Emitted when this MultiplayerAPI's [member network_peer] disconnects from server. Only emitted on clients.
+ Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from server. Only emitted on clients.
</description>
</signal>
</signals>
- <constants>
- <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode">
- Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
- </constant>
- <constant name="RPC_MODE_REMOTE" value="1" enum="RPCMode">
- Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the remote end, not locally. Analogous to the [code]remote[/code] keyword. Calls and property changes are accepted from all remote peers, no matter if they are node's master or puppets.
- </constant>
- <constant name="RPC_MODE_MASTER" value="2" enum="RPCMode">
- Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the network master for this node. Analogous to the [code]master[/code] keyword. Only accepts calls or property changes from the node's network puppets, see [method Node.set_network_master].
- </constant>
- <constant name="RPC_MODE_PUPPET" value="3" enum="RPCMode">
- Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master].
- </constant>
- <constant name="SPAWN_MODE_NONE" value="0" enum="SpawnMode">
- Used with [method spawnable_config] to identify a [PackedScene] that should not be replicated.
- </constant>
- <constant name="SPAWN_MODE_SERVER" value="1" enum="SpawnMode">
- Used with [method spawnable_config] to identify a [PackedScene] that should be automatically replicated from server to clients.
- </constant>
- <constant name="SPAWN_MODE_CUSTOM" value="2" enum="SpawnMode">
- Used with [method spawnable_config] to identify a [PackedScene] that can be manually replicated among peers.
- </constant>
- </constants>
</class>
diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml
index adaa359168..15517f7c2f 100644
--- a/doc/classes/MultiplayerPeer.xml
+++ b/doc/classes/MultiplayerPeer.xml
@@ -4,8 +4,9 @@
A high-level network interface to simplify multiplayer interactions.
</brief_description>
<description>
- Manages the connection to network peers. Assigns unique IDs to each client connected to the server. See also [MultiplayerAPI].
+ Manages the connection to multiplayer peers. Assigns unique IDs to each client connected to the server. See also [MultiplayerAPI].
[b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
<link title="High-level multiplayer">https://docs.godotengine.org/en/latest/tutorials/networking/high_level_multiplayer.html</link>
@@ -52,14 +53,14 @@
</method>
</methods>
<members>
- <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="true">
+ <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="false">
If [code]true[/code], this [MultiplayerPeer] refuses new connections.
</member>
<member name="transfer_channel" type="int" setter="set_transfer_channel" getter="get_transfer_channel" default="0">
The channel to use to send packets. Many network APIs such as ENet and WebRTC allow the creation of multiple independent channels which behaves, in a way, like separate connections. This means that reliable data will only block delivery of other packets on that channel, and ordering will only be in respect to the channel the packet is being sent on. Using different channels to send [b]different and independent[/b] state updates is a common way to optimize network usage and decrease latency in fast-paced games.
- [b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_UNRELIABLE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly.
+ [b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly.
</member>
- <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="MultiplayerPeer.TransferMode" default="0">
+ <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="TransferMode" default="2">
The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode].
</member>
</members>
@@ -93,15 +94,6 @@
</signal>
</signals>
<constants>
- <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
- Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters.
- </constant>
- <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode">
- Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data.
- </constant>
- <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode">
- Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly.
- </constant>
<constant name="CONNECTION_DISCONNECTED" value="0" enum="ConnectionStatus">
The ongoing connection disconnected.
</constant>
diff --git a/doc/classes/MultiplayerPeerExtension.xml b/doc/classes/MultiplayerPeerExtension.xml
new file mode 100644
index 0000000000..46f9b22758
--- /dev/null
+++ b/doc/classes/MultiplayerPeerExtension.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MultiplayerPeerExtension" inherits="MultiplayerPeer" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_get_available_packet_count" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_connection_status" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_max_packet_size" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_packet" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="r_buffer" type="const uint8_t **" />
+ <argument index="1" name="r_buffer_size" type="int32_t*" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_packet_peer" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_transfer_channel" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_transfer_mode" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_unique_id" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_is_refusing_new_connections" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_is_server" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_poll" qualifiers="virtual">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_put_packet" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="p_buffer" type="const uint8_t*" />
+ <argument index="1" name="p_buffer_size" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_refuse_new_connections" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="p_enable" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_target_peer" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="p_peer" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_transfer_channel" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="p_channel" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_transfer_mode" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="p_mode" type="int" />
+ <description>
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/MultiplayerReplicator.xml b/doc/classes/MultiplayerReplicator.xml
new file mode 100644
index 0000000000..e0c309ef39
--- /dev/null
+++ b/doc/classes/MultiplayerReplicator.xml
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MultiplayerReplicator" inherits="Object" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="decode_state">
+ <return type="int" enum="Error" />
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="object" type="Object" />
+ <argument index="2" name="data" type="PackedByteArray" />
+ <argument index="3" name="initial" type="bool" default="true" />
+ <description>
+ Decode the given [code]data[/code] representing a spawnable state into [code]object[/code] using the configuration associated with the provided [code]scene_id[/code]. This function is called automatically when a client receives a server spawn for a scene with [constant REPLICATION_MODE_SERVER]. See [method spawn_config].
+ Tip: You may find this function useful in servers when parsing spawn requests from clients, or when implementing your own logic with [constant REPLICATION_MODE_CUSTOM].
+ </description>
+ </method>
+ <method name="despawn">
+ <return type="int" enum="Error" />
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="object" type="Object" />
+ <argument index="2" name="peer_id" type="int" default="0" />
+ <description>
+ Request a despawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behaviour, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_despawn] for the default behavior.
+ </description>
+ </method>
+ <method name="encode_state">
+ <return type="PackedByteArray" />
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="object" type="Object" />
+ <argument index="2" name="initial" type="bool" default="true" />
+ <description>
+ Encode the given [code]object[/code] using the configuration associated with the provided [code]scene_id[/code]. This function is called automatically when the server spawns scenes with [constant REPLICATION_MODE_SERVER]. See [method spawn_config].
+ Tip: You may find this function useful when requesting spawns from clients to server, or when implementing your own logic with [constant REPLICATION_MODE_CUSTOM].
+ </description>
+ </method>
+ <method name="send_despawn">
+ <return type="int" enum="Error" />
+ <argument index="0" name="peer_id" type="int" />
+ <argument index="1" name="scene_id" type="int" />
+ <argument index="2" name="data" type="Variant" default="null" />
+ <argument index="3" name="path" type="NodePath" default="NodePath(&quot;&quot;)" />
+ <description>
+ Sends a despawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant REPLICATION_MODE_SERVER] (see [method spawn_config]) and the request is sent by the server (see [method MultiplayerAPI.is_server]), the receiving peer(s) will automatically queue for deletion the node at [code]path[/code] and emit the signal [signal despawned]. In all other cases no deletion happens, and the signal [signal despawn_requested] is emitted instead.
+ </description>
+ </method>
+ <method name="send_spawn">
+ <return type="int" enum="Error" />
+ <argument index="0" name="peer_id" type="int" />
+ <argument index="1" name="scene_id" type="int" />
+ <argument index="2" name="data" type="Variant" default="null" />
+ <argument index="3" name="path" type="NodePath" default="NodePath(&quot;&quot;)" />
+ <description>
+ Sends a spawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant REPLICATION_MODE_SERVER] (see [method spawn_config]) and the request is sent by the server (see [method MultiplayerAPI.is_server]), the receiving peer(s) will automatically instantiate that scene, add it to the [SceneTree] at the given [code]path[/code] and emit the signal [signal spawned]. In all other cases no instantiation happens, and the signal [signal spawn_requested] is emitted instead.
+ </description>
+ </method>
+ <method name="send_sync">
+ <return type="int" enum="Error" />
+ <argument index="0" name="peer_id" type="int" />
+ <argument index="1" name="scene_id" type="int" />
+ <argument index="2" name="data" type="PackedByteArray" />
+ <argument index="3" name="transfer_mode" type="int" enum="TransferMode" default="2" />
+ <argument index="4" name="channel" type="int" default="0" />
+ <description>
+ Sends a sync request for the instances of the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). This function can only be called manually when overriding the send and receive sync functions (see [method sync_config]).
+ </description>
+ </method>
+ <method name="spawn">
+ <return type="int" enum="Error" />
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="object" type="Object" />
+ <argument index="2" name="peer_id" type="int" default="0" />
+ <description>
+ Request a spawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behaviour, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_spawn] for the default behavior.
+ </description>
+ </method>
+ <method name="spawn_config">
+ <return type="int" enum="Error" />
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="spawn_mode" type="int" enum="MultiplayerReplicator.ReplicationMode" />
+ <argument index="2" name="properties" type="StringName[]" default="[]" />
+ <argument index="3" name="custom_send" type="Callable" />
+ <argument index="4" name="custom_receive" type="Callable" />
+ <description>
+ Configures the MultiplayerReplicator to track instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication. When [code]mode[/code] is [constant REPLICATION_MODE_SERVER], the specified [code]properties[/code] will also be replicated to clients during the initial spawn. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the spawn/despawn proecess.
+ Tip: You can use a custom property in the scene main script to return a customly optimized state representation.
+ </description>
+ </method>
+ <method name="sync_all">
+ <return type="int" enum="Error" />
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="peer_id" type="int" default="0" />
+ <description>
+ Manually request a sync for all the instances of the scene identified by [code]scene_id[/code]. This function will trigger the default sync behaviour, or call your send custom send callable if specified in [method sync_config].
+ Note: The default implementation only allow syncing from server to clients.
+ </description>
+ </method>
+ <method name="sync_config">
+ <return type="int" enum="Error" />
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="interval" type="int" />
+ <argument index="2" name="properties" type="StringName[]" default="[]" />
+ <argument index="3" name="custom_send" type="Callable" />
+ <argument index="4" name="custom_receive" type="Callable" />
+ <description>
+ Configures the MultiplayerReplicator to sync instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication at the desired [code]interval[/code] (in milliseconds). The specified [code]properties[/code] will be part of the state sync. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the syncronization proecess.
+ Tip: You can use a custom property in the scene main script to return a customly optimized state representation (having a single property that returns a PackedByteArray is higly recommended when dealing with many instances).
+ </description>
+ </method>
+ <method name="track">
+ <return type="void" />
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="object" type="Object" />
+ <description>
+ Track the given [code]object[/code] as an instance of the scene identified by [code]scene_id[/code]. This object will be passed to your custom sync callables (see [method sync_config]). Tracking and untracking is automatic in [constant REPLICATION_MODE_SERVER].
+ </description>
+ </method>
+ <method name="untrack">
+ <return type="void" />
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="object" type="Object" />
+ <description>
+ Untrack the given [code]object[/code]. This object will no longer be passed to your custom sync callables (see [method sync_config]). Tracking and untracking is automatic in [constant REPLICATION_MODE_SERVER].
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="despawn_requested">
+ <argument index="0" name="id" type="int" />
+ <argument index="1" name="scene_id" type="int" />
+ <argument index="2" name="parent" type="Node" />
+ <argument index="3" name="name" type="String" />
+ <argument index="4" name="data" type="PackedByteArray" />
+ <description>
+ Emitted when a network despawn request has been received from a client, or for a [PackedScene] that has been configured as [constant REPLICATION_MODE_CUSTOM].
+ </description>
+ </signal>
+ <signal name="despawned">
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="node" type="Node" />
+ <description>
+ Emitted on a client before deleting a local Node upon receiving a despawn request from the server.
+ </description>
+ </signal>
+ <signal name="replicated_instance_added">
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="node" type="Node" />
+ <description>
+ Emitted when an instance of a [PackedScene] that has been configured for networking enters the [SceneTree]. See [method spawn_config].
+ </description>
+ </signal>
+ <signal name="replicated_instance_removed">
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="node" type="Node" />
+ <description>
+ Emitted when an instance of a [PackedScene] that has been configured for networking leaves the [SceneTree]. See [method spawn_config].
+ </description>
+ </signal>
+ <signal name="spawn_requested">
+ <argument index="0" name="id" type="int" />
+ <argument index="1" name="scene_id" type="int" />
+ <argument index="2" name="parent" type="Node" />
+ <argument index="3" name="name" type="String" />
+ <argument index="4" name="data" type="PackedByteArray" />
+ <description>
+ Emitted when a network spawn request has been received from a client, or for a [PackedScene] that has been configured as [constant REPLICATION_MODE_CUSTOM].
+ </description>
+ </signal>
+ <signal name="spawned">
+ <argument index="0" name="scene_id" type="int" />
+ <argument index="1" name="node" type="Node" />
+ <description>
+ Emitted on a client after a new Node is instantiated locally and added to the SceneTree upon receiving a spawn request from the server.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="REPLICATION_MODE_NONE" value="0" enum="ReplicationMode">
+ Used with [method spawn_config] to identify a [PackedScene] that should not be replicated.
+ </constant>
+ <constant name="REPLICATION_MODE_SERVER" value="1" enum="ReplicationMode">
+ Used with [method spawn_config] to identify a [PackedScene] that should be automatically replicated from server to clients.
+ </constant>
+ <constant name="REPLICATION_MODE_CUSTOM" value="2" enum="ReplicationMode">
+ Used with [method spawn_config] to identify a [PackedScene] that can be manually replicated among peers.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml
index f97b2344a5..eb9bec1104 100644
--- a/doc/classes/Mutex.xml
+++ b/doc/classes/Mutex.xml
@@ -14,21 +14,22 @@
<return type="void" />
<description>
Locks this [Mutex], blocks until it is unlocked by the current owner.
+ [b]Note:[/b] This function returns without blocking if the thread already has ownership of the mutex.
</description>
</method>
<method name="try_lock">
<return type="int" enum="Error" />
<description>
Tries locking this [Mutex], but does not block. Returns [constant OK] on success, [constant ERR_BUSY] otherwise.
+ [b]Note:[/b] This function returns [constant OK] if the thread already has ownership of the mutex.
</description>
</method>
<method name="unlock">
<return type="void" />
<description>
Unlocks this [Mutex], leaving it to other threads.
+ [b]Note:[/b] If a thread called [method lock] or [method try_lock] multiple times while already having ownership of the mutex, it must also call [method unlock] the same number of times in order to unlock it correctly.
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/NativeExtensionManager.xml b/doc/classes/NativeExtensionManager.xml
index c14ce94aff..42246619f6 100644
--- a/doc/classes/NativeExtensionManager.xml
+++ b/doc/classes/NativeExtensionManager.xml
@@ -18,6 +18,12 @@
<description>
</description>
</method>
+ <method name="is_extension_loaded" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ </description>
+ </method>
<method name="load_extension">
<return type="int" enum="NativeExtensionManager.LoadStatus" />
<argument index="0" name="path" type="String" />
diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml
index c05f7c2094..068854024c 100644
--- a/doc/classes/NavigationAgent2D.xml
+++ b/doc/classes/NavigationAgent2D.xml
@@ -129,6 +129,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml
index af4a058489..f429134a71 100644
--- a/doc/classes/NavigationAgent3D.xml
+++ b/doc/classes/NavigationAgent3D.xml
@@ -135,6 +135,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml
index 9931033260..ca285c030c 100644
--- a/doc/classes/NavigationMeshGenerator.xml
+++ b/doc/classes/NavigationMeshGenerator.xml
@@ -21,6 +21,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml
index 2e94eb0bba..462532d49a 100644
--- a/doc/classes/NavigationObstacle2D.xml
+++ b/doc/classes/NavigationObstacle2D.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml
index d7454a7bea..c0cb7befef 100644
--- a/doc/classes/NavigationObstacle3D.xml
+++ b/doc/classes/NavigationObstacle3D.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
index e1e2c34a63..5b5b7c42ef 100644
--- a/doc/classes/NavigationPolygon.xml
+++ b/doc/classes/NavigationPolygon.xml
@@ -141,6 +141,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml
index 33a3f04c3d..6c78b25744 100644
--- a/doc/classes/NavigationRegion2D.xml
+++ b/doc/classes/NavigationRegion2D.xml
@@ -10,8 +10,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
Determines if the [NavigationRegion2D] is enabled or disabled.
@@ -23,6 +21,4 @@
The [NavigationPolygon] resource to use.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml
index da06641b48..f91069fa9d 100644
--- a/doc/classes/NavigationRegion3D.xml
+++ b/doc/classes/NavigationRegion3D.xml
@@ -40,6 +40,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml
index 042ab06e6f..1740093eb2 100644
--- a/doc/classes/NavigationServer2D.xml
+++ b/doc/classes/NavigationServer2D.xml
@@ -272,6 +272,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml
index 73ca18655a..3e10657838 100644
--- a/doc/classes/NavigationServer3D.xml
+++ b/doc/classes/NavigationServer3D.xml
@@ -329,6 +329,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 096fbbf2c0..b4edcf49f4 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -35,8 +35,8 @@
Corresponds to the [constant NOTIFICATION_EXIT_TREE] notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited].
</description>
</method>
- <method name="_get_configuration_warnings" qualifiers="virtual">
- <return type="String[]" />
+ <method name="_get_configuration_warnings" qualifiers="virtual const">
+ <return type="PackedStringArray" />
<description>
The elements in the array returned from this method are displayed as warnings in the Scene Dock if the script that overrides it is a [code]tool[/code] script.
Returning an empty array produces no warnings.
@@ -96,9 +96,9 @@
</method>
<method name="_unhandled_key_input" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="event" type="InputEventKey" />
+ <argument index="0" name="event" type="InputEvent" />
<description>
- Called when an [InputEventKey] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
+ Called when an [InputEventKey] or [InputEventShortcut] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input].
To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called.
For gameplay input, this and [method _unhandled_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
@@ -109,9 +109,11 @@
<return type="void" />
<argument index="0" name="node" type="Node" />
<argument index="1" name="legible_unique_name" type="bool" default="false" />
+ <argument index="2" name="internal" type="int" enum="Node.InternalMode" default="0" />
<description>
Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.
If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type.
+ If [code]internal[/code] is different than [constant INTERNAL_MODE_DISABLED], the child will be added as internal node. Such nodes are ignored by methods like [method get_children], unless their parameter [code]include_internal[/code] is [code]true[/code].The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. [ColorPicker]. See [enum InternalMode] for available modes.
[b]Note:[/b] If the child node already has a parent, the function will fail. Use [method remove_child] first to remove the node from its current parent. For example:
[codeblocks]
[gdscript]
@@ -141,6 +143,7 @@
Adds a [code]sibling[/code] node to current's node parent, at the same level as that node, right below it.
If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type.
Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children.
+ [b]Note:[/b] If this node is internal, the new sibling will be internal too (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
<method name="add_to_group">
@@ -150,6 +153,7 @@
<description>
Adds the node to a group. Groups are helpers to name and organize a subset of nodes, for example "enemies" or "collectables". A node can be in any number of groups. Nodes can be assigned a group at any time, but will not be added until they are inside the scene tree (see [method is_inside_tree]). See notes in the description, and the group methods in [SceneTree].
The [code]persistent[/code] option is used when packing node to [PackedScene] and saving to file. Non-persistent groups aren't stored.
+ [b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs.
</description>
</method>
<method name="can_process" qualifiers="const">
@@ -200,22 +204,28 @@
<method name="get_child" qualifiers="const">
<return type="Node" />
<argument index="0" name="idx" type="int" />
+ <argument index="1" name="include_internal" type="bool" default="false" />
<description>
Returns a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node.
Negative indices access the children from the last one.
+ If [code]include_internal[/code] is [code]true[/code], internal children are skipped (see [code]internal[/code] parameter in [method add_child]).
To access a child node via its name, use [method get_node].
</description>
</method>
<method name="get_child_count" qualifiers="const">
<return type="int" />
+ <argument index="0" name="include_internal" type="bool" default="false" />
<description>
Returns the number of child nodes.
+ If [code]include_internal[/code] is [code]false[/code], internal children aren't counted (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
<method name="get_children" qualifiers="const">
<return type="Node[]" />
+ <argument index="0" name="include_internal" type="bool" default="false" />
<description>
Returns an array of references to node's children.
+ If [code]include_internal[/code] is [code]false[/code], the returned array won't include internal children (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
<method name="get_editor_description" qualifiers="const">
@@ -227,18 +237,21 @@
<return type="Array" />
<description>
Returns an array listing the groups that the node is a member of.
+ [b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs.
</description>
</method>
<method name="get_index" qualifiers="const">
<return type="int" />
+ <argument index="0" name="include_internal" type="bool" default="false" />
<description>
Returns the node's order in the scene tree branch. For example, if called on the first child node the position is [code]0[/code].
+ If [code]include_internal[/code] is [code]false[/code], the index won't take internal children into account, i.e. first non-internal child will have index of 0 (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
- <method name="get_network_master" qualifiers="const">
+ <method name="get_multiplayer_authority" qualifiers="const">
<return type="int" />
<description>
- Returns the peer ID of the network master for this node. See [method set_network_master].
+ Returns the peer ID of the multiplayer authority for this node. See [method set_multiplayer_authority].
</description>
</method>
<method name="get_node" qualifiers="const">
@@ -376,7 +389,14 @@
<method name="is_displayed_folded" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the node is folded (collapsed) in the Scene dock.
+ Returns [code]true[/code] if the node is folded (collapsed) in the Scene dock. This method is only intended for use with editor tooling.
+ </description>
+ </method>
+ <method name="is_editable_instance" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="node" type="Node" />
+ <description>
+ Returns [code]true[/code] if [code]node[/code] has editable children enabled relative to this node. This method is only intended for use with editor tooling.
</description>
</method>
<method name="is_greater_than" qualifiers="const">
@@ -399,10 +419,10 @@
Returns [code]true[/code] if this node is currently inside a [SceneTree].
</description>
</method>
- <method name="is_network_master" qualifiers="const">
+ <method name="is_multiplayer_authority" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the local system is the master of this node.
+ Returns [code]true[/code] if the local system is the multiplayer authority of this node.
</description>
</method>
<method name="is_physics_processing" qualifiers="const">
@@ -453,6 +473,7 @@
<argument index="1" name="to_position" type="int" />
<description>
Moves a child node to a different position (order) among the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful.
+ [b]Note:[/b] Internal children can only be moved within their expected "internal range" (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
<method name="print_stray_nodes">
@@ -559,17 +580,17 @@
<argument index="0" name="method" type="StringName" />
<description>
Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns an empty [Variant].
- [b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [MultiplayerAPI]. You also need to keep track of the connection state, either by the [MultiplayerAPI] signals like [code]server_disconnected[/code] or by checking [code]get_multiplayer().network_peer.get_connection_status() == CONNECTION_CONNECTED[/code].
+ [b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [MultiplayerAPI]. You also need to keep track of the connection state, either by the [MultiplayerAPI] signals like [code]server_disconnected[/code] or by checking [code]get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED[/code].
</description>
</method>
<method name="rpc_config">
<return type="int" />
<argument index="0" name="method" type="StringName" />
- <argument index="1" name="rpc_mode" type="int" enum="MultiplayerAPI.RPCMode" />
- <argument index="2" name="transfer_mode" type="int" enum="MultiplayerPeer.TransferMode" default="2" />
+ <argument index="1" name="rpc_mode" type="int" enum="RPCMode" />
+ <argument index="2" name="transfer_mode" type="int" enum="TransferMode" default="2" />
<argument index="3" name="channel" type="int" default="0" />
<description>
- Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum MultiplayerAPI.RPCMode] and [enum MultiplayerPeer.TransferMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs).
+ Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum RPCMode] and [enum TransferMode]. An alternative is annotating methods and properties with the corresponding annotation ([code]@rpc(any)[/code], [code]@rpc(auth)[/code]). By default, methods are not exposed to networking (and RPCs).
</description>
</method>
<method name="rpc_id" qualifiers="vararg">
@@ -584,7 +605,15 @@
<return type="void" />
<argument index="0" name="fold" type="bool" />
<description>
- Sets the folded state of the node in the Scene dock.
+ Sets the folded state of the node in the Scene dock. This method is only intended for use with editor tooling.
+ </description>
+ </method>
+ <method name="set_editable_instance">
+ <return type="void" />
+ <argument index="0" name="node" type="Node" />
+ <argument index="1" name="is_editable" type="bool" />
+ <description>
+ Sets the editable children state of [code]node[/code] relative to this node. This method is only intended for use with editor tooling.
</description>
</method>
<method name="set_editor_description">
@@ -593,12 +622,12 @@
<description>
</description>
</method>
- <method name="set_network_master">
+ <method name="set_multiplayer_authority">
<return type="void" />
<argument index="0" name="id" type="int" />
<argument index="1" name="recursive" type="bool" default="true" />
<description>
- Sets the node's network master to the peer with the given peer ID. The network master is the peer that has authority over the node on the network. Useful in conjunction with the [code]master[/code] and [code]puppet[/code] keywords. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If [code]recursive[/code], the given peer is recursively set as the master for all children of this node.
+ Sets the node's multiplayer authority to the peer with the given peer ID. The multiplayer authority is the peer that has authority over the node on the network. Useful in conjunction with [method rpc_config] and the [MultiplayerAPI]. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If [code]recursive[/code], the given peer is recursively set as the authority for all children of this node.
</description>
</method>
<method name="set_physics_process">
@@ -671,9 +700,6 @@
<member name="custom_multiplayer" type="MultiplayerAPI" setter="set_custom_multiplayer" getter="get_custom_multiplayer">
The override to the default [MultiplayerAPI]. Set to [code]null[/code] to use the default [SceneTree] one.
</member>
- <member name="filename" type="String" setter="set_filename" getter="get_filename">
- When a scene is instantiated from a file, its topmost node contains the filename from which it was loaded.
- </member>
<member name="multiplayer" type="MultiplayerAPI" setter="" getter="get_multiplayer">
The [MultiplayerAPI] instance associated with this node. Either the [member custom_multiplayer], or the default SceneTree one (if inside tree).
</member>
@@ -690,6 +716,9 @@
<member name="process_priority" type="int" setter="set_process_priority" getter="get_process_priority" default="0">
The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose process priority value is [i]lower[/i] will have their processing callbacks executed first.
</member>
+ <member name="scene_file_path" type="String" setter="set_scene_file_path" getter="get_scene_file_path">
+ If a scene is instantiated from a file, its topmost node contains the absolute file path from which it was loaded in [member scene_file_path] (e.g. [code]res://levels/1.tscn[/code]). Otherwise, [member scene_file_path] is set to an empty string.
+ </member>
</members>
<signals>
<signal name="ready">
@@ -873,5 +902,14 @@
Duplicate using instancing.
An instance stays linked to the original so when the original changes, the instance changes too.
</constant>
+ <constant name="INTERNAL_MODE_DISABLED" value="0" enum="InternalMode">
+ Node will not be internal.
+ </constant>
+ <constant name="INTERNAL_MODE_FRONT" value="1" enum="InternalMode">
+ Node will be placed at the front of parent's node list, before any non-internal sibling.
+ </constant>
+ <constant name="INTERNAL_MODE_BACK" value="2" enum="InternalMode">
+ Node will be placed at the back of parent's node list, after any non-internal sibling.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index cc790b7c28..ef5f9ee5c9 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -23,6 +23,7 @@
<argument index="0" name="point" type="Vector2" />
<description>
Returns the angle between the node and the [code]point[/code] in radians.
+ [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/node2d_get_angle_to.png]Illustration of the returned angle.[/url]
</description>
</method>
<method name="get_relative_transform_to_parent" qualifiers="const">
@@ -129,6 +130,4 @@
Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between [constant RenderingServer.CANVAS_ITEM_Z_MIN] and [constant RenderingServer.CANVAS_ITEM_Z_MAX] (inclusive).
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Node3DGizmo.xml b/doc/classes/Node3DGizmo.xml
index c561047332..00298976a8 100644
--- a/doc/classes/Node3DGizmo.xml
+++ b/doc/classes/Node3DGizmo.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index d05630d277..17c6ba38b7 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -168,17 +168,25 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="NodePath" />
<description>
</description>
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="NodePath" />
<description>
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ORMMaterial3D.xml b/doc/classes/ORMMaterial3D.xml
index d275f93196..7ca4f5d363 100644
--- a/doc/classes/ORMMaterial3D.xml
+++ b/doc/classes/ORMMaterial3D.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 757730f6c8..9d0d185c42 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -49,20 +49,25 @@
[/codeblocks]
See [method execute] if you wish to run an external command and retrieve the results.
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
+ [b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export.
</description>
</method>
<method name="delay_msec" qualifiers="const">
<return type="void" />
<argument index="0" name="msec" type="int" />
<description>
- Delay execution of the current thread by [code]msec[/code] milliseconds. [code]msec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message.
+ Delays execution of the current thread by [code]msec[/code] milliseconds. [code]msec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message.
+ [b]Note:[/b] [method delay_msec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Yielding with [method SceneTree.create_timer] will delay the execution of code placed below the [code]yield[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s).
+ [b]Note:[/b] When [method delay_msec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_msec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process).
</description>
</method>
<method name="delay_usec" qualifiers="const">
<return type="void" />
<argument index="0" name="usec" type="int" />
<description>
- Delay execution of the current thread by [code]usec[/code] microseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_usec] will do nothing and will print an error message.
+ Delays execution of the current thread by [code]usec[/code] microseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_usec] will do nothing and will print an error message.
+ [b]Note:[/b] [method delay_usec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Yielding with [method SceneTree.create_timer] will delay the execution of code placed below the [code]yield[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s).
+ [b]Note:[/b] When [method delay_usec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_usec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process).
</description>
</method>
<method name="dump_memory_to_file">
@@ -115,6 +120,7 @@
[/csharp]
[/codeblocks]
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
+ [b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export.
</description>
</method>
<method name="find_keycode_from_string" qualifiers="const">
@@ -215,7 +221,7 @@
<method name="get_locale" qualifiers="const">
<return type="String" />
<description>
- Returns the host OS locale as a string of the form [code]language_Script_COUNTRY_VARIANT@extra[/code].
+ Returns the host OS locale as a string of the form [code]language_Script_COUNTRY_VARIANT@extra[/code]. If you want only the language code and not the fully specified locale from the OS, you can use [method get_locale_language].
[code]language[/code] - 2 or 3-letter [url=https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]language code[/url], in lower case.
[code]Script[/code] - optional, 4-letter [url=https://en.wikipedia.org/wiki/ISO_15924]script code[/url], in title case.
[code]COUNTRY[/code] - optional, 2 or 3-letter [url=https://en.wikipedia.org/wiki/ISO_3166-1]country code[/url], in upper case.
@@ -223,6 +229,13 @@
[code]extra[/code] - optional, semicolon separated list of additional key words. Currency, calendar, sort order and numbering system information.
</description>
</method>
+ <method name="get_locale_language" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the host OS locale's 2 or 3-letter [url=https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]language code[/url] as a string which should be consistent on all platforms. This is equivalent to extracting the [code]language[/code] part of the [method get_locale] string.
+ This can be used to narrow down fully specified locale strings to only the "common" language code, when you don't need the additional information about country code or variants. For example, for a French Canadian user with [code]fr_CA[/code] locale, this would return [code]fr[/code].
+ </description>
+ </method>
<method name="get_model_name" qualifiers="const">
<return type="String" />
<description>
@@ -331,7 +344,7 @@
<method name="is_stdout_verbose" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the engine was executed with [code]-v[/code] (verbose stdout).
+ Returns [code]true[/code] if the engine was executed with the [code]--verbose[/code] or [code]-v[/code] command line argument, or if [member ProjectSettings.debug/settings/stdout/verbose_stdout] is [code]true[/code]. See also [method @GlobalScope.print_verbose].
</description>
</method>
<method name="is_userfs_persistent" qualifiers="const">
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 9ad79dc17a..ed045f8390 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -13,15 +13,15 @@
[codeblocks]
[gdscript]
var n = Node2D.new()
- print("position" in n) # Prints "True".
- print("other_property" in n) # Prints "False".
+ print("position" in n) # Prints "true".
+ print("other_property" in n) # Prints "false".
[/gdscript]
[csharp]
var node = new Node2D();
// C# has no direct equivalent to GDScript's `in` operator here, but we
// can achieve the same behavior by performing `Get` with a null check.
- GD.Print(node.Get("position") != null); // Prints "True".
- GD.Print(node.Get("other_property") != null); // Prints "False".
+ GD.Print(node.Get("position") != null); // Prints "true".
+ GD.Print(node.Get("other_property") != null); // Prints "false".
[/csharp]
[/codeblocks]
The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code].
@@ -92,12 +92,12 @@
Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
[codeblocks]
[gdscript]
- var node = Node2D.new()
- node.call("set", "position", Vector2(42, 0))
+ var node = Node3D.new()
+ node.call("rotate", Vector3(1.0, 0.0, 0.0), 1.571)
[/gdscript]
[csharp]
- var node = new Node2D();
- node.Call("set", "position", new Vector2(42, 0));
+ var node = new Node3D();
+ node.Call("rotate", new Vector3(1f, 0f, 0f), 1.571f);
[/csharp]
[/codeblocks]
[b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).
@@ -110,12 +110,12 @@
Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
[codeblocks]
[gdscript]
- var node = Node2D.new()
- node.call_deferred("set", "position", Vector2(42, 0))
+ var node = Node3D.new()
+ node.call_deferred("rotate", Vector3(1.0, 0.0, 0.0), 1.571)
[/gdscript]
[csharp]
- var node = new Node2D();
- node.CallDeferred("set", "position", new Vector2(42, 0));
+ var node = new Node3D();
+ node.CallDeferred("rotate", new Vector3(1f, 0f, 0f), 1.571f);
[/csharp]
[/codeblocks]
[b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).
@@ -129,12 +129,12 @@
Calls the [code]method[/code] on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array].
[codeblocks]
[gdscript]
- var node = Node2D.new()
- node.callv("set", ["position", Vector2(42, 0)])
+ var node = Node3D.new()
+ node.callv("rotate", [Vector3(1.0, 0.0, 0.0), 1.571])
[/gdscript]
[csharp]
- var node = new Node2D();
- node.Callv("set", new Godot.Collections.Array { "position", new Vector2(42, 0) });
+ var node = new Node3D();
+ node.Callv("rotate", new Godot.Collections.Array { new Vector3(1f, 0f, 0f), 1.571f });
[/csharp]
[/codeblocks]
</description>
@@ -331,7 +331,8 @@
<method name="get_class" qualifiers="const">
<return type="String" />
<description>
- Returns the object's class as a [String].
+ Returns the object's class as a [String]. See also [method is_class].
+ [b]Note:[/b] [method get_class] does not take [code]class_name[/code] declarations into account. If the object has a [code]class_name[/code] defined, the base class name will be returned instead.
</description>
</method>
<method name="get_incoming_connections" qualifiers="const">
@@ -441,7 +442,8 @@
<return type="bool" />
<argument index="0" name="class" type="String" />
<description>
- Returns [code]true[/code] if the object inherits from the given [code]class[/code].
+ Returns [code]true[/code] if the object inherits from the given [code]class[/code]. See also [method get_class].
+ [b]Note:[/b] [method is_class] does not take [code]class_name[/code] declarations into account. If the object has a [code]class_name[/code] defined, [method is_class] will return [code]false[/code] for that name.
</description>
</method>
<method name="is_connected" qualifiers="const">
diff --git a/doc/classes/Occluder3D.xml b/doc/classes/Occluder3D.xml
index 501c4a3ccf..69fb3002e3 100644
--- a/doc/classes/Occluder3D.xml
+++ b/doc/classes/Occluder3D.xml
@@ -6,14 +6,10 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="indices" type="PackedInt32Array" setter="set_indices" getter="get_indices" default="PackedInt32Array()">
</member>
<member name="vertices" type="PackedVector3Array" setter="set_vertices" getter="get_vertices" default="PackedVector3Array()">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml
index cc4bddc229..d97aa4312f 100644
--- a/doc/classes/OccluderInstance3D.xml
+++ b/doc/classes/OccluderInstance3D.xml
@@ -29,6 +29,4 @@
<member name="occluder" type="Occluder3D" setter="set_occluder" getter="get_occluder">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml
index 28d3ed433a..e347888414 100644
--- a/doc/classes/OccluderPolygon2D.xml
+++ b/doc/classes/OccluderPolygon2D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="closed" type="bool" setter="set_closed" getter="is_closed" default="true">
If [code]true[/code], closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction.
diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml
index dfcb19a287..e8d5977199 100644
--- a/doc/classes/OmniLight3D.xml
+++ b/doc/classes/OmniLight3D.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="omni_attenuation" type="float" setter="set_param" getter="get_param" default="1.0">
The light's attenuation (drop-off) curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve.
diff --git a/doc/classes/OptimizedTranslation.xml b/doc/classes/OptimizedTranslation.xml
index 195fa28188..8302a564ed 100644
--- a/doc/classes/OptimizedTranslation.xml
+++ b/doc/classes/OptimizedTranslation.xml
@@ -17,6 +17,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index 8aa0ad073d..264ef9975a 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -183,8 +183,6 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
<theme_items>
<theme_item name="arrow" data_type="icon" type="Texture2D">
The arrow icon to be drawn on the right end of the button.
diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml
index 0af329983d..28508c85e0 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -51,6 +51,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index af92590da3..8e94254a1f 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -270,7 +270,7 @@
Converts UTF-8 encoded array to [String]. Slower than [method get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. Returns empty string if source array is not valid UTF-8 string.
</description>
</method>
- <method name="has">
+ <method name="has" qualifiers="const">
<return type="bool" />
<argument index="0" name="value" type="int" />
<description>
@@ -316,6 +316,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedByteArray" />
<description>
</description>
@@ -328,6 +333,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedByteArray" />
<description>
</description>
@@ -426,6 +436,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index a5a5703bfa..4bccdcd939 100644
--- a/doc/classes/PackedColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -56,7 +56,7 @@
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
- <method name="has">
+ <method name="has" qualifiers="const">
<return type="bool" />
<argument index="0" name="value" type="Color" />
<description>
@@ -79,6 +79,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedColorArray" />
<description>
</description>
@@ -91,6 +96,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedColorArray" />
<description>
</description>
@@ -161,6 +171,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml
index 0a765fcc75..2454e565e6 100644
--- a/doc/classes/PackedDataContainer.xml
+++ b/doc/classes/PackedDataContainer.xml
@@ -23,6 +23,4 @@
<member name="__data__" type="PackedByteArray" setter="_set_data" getter="_get_data" default="PackedByteArray()">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PackedDataContainerRef.xml b/doc/classes/PackedDataContainerRef.xml
index 5e42079b97..131a6be4e2 100644
--- a/doc/classes/PackedDataContainerRef.xml
+++ b/doc/classes/PackedDataContainerRef.xml
@@ -14,6 +14,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index 9e7dd8f99e..51e14ea3d4 100644
--- a/doc/classes/PackedFloat32Array.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -57,7 +57,7 @@
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
- <method name="has">
+ <method name="has" qualifiers="const">
<return type="bool" />
<argument index="0" name="value" type="float" />
<description>
@@ -80,6 +80,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedFloat32Array" />
<description>
</description>
@@ -92,6 +97,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedFloat32Array" />
<description>
</description>
@@ -164,6 +174,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index ff4cf0edf8..25c9c025f7 100644
--- a/doc/classes/PackedFloat64Array.xml
+++ b/doc/classes/PackedFloat64Array.xml
@@ -57,7 +57,7 @@
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
- <method name="has">
+ <method name="has" qualifiers="const">
<return type="bool" />
<argument index="0" name="value" type="float" />
<description>
@@ -80,6 +80,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedFloat64Array" />
<description>
</description>
@@ -92,6 +97,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedFloat64Array" />
<description>
</description>
@@ -164,6 +174,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index 2e9716b665..1a61ce0ead 100644
--- a/doc/classes/PackedInt32Array.xml
+++ b/doc/classes/PackedInt32Array.xml
@@ -57,7 +57,7 @@
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
- <method name="has">
+ <method name="has" qualifiers="const">
<return type="bool" />
<argument index="0" name="value" type="int" />
<description>
@@ -80,6 +80,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedInt32Array" />
<description>
</description>
@@ -92,6 +97,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedInt32Array" />
<description>
</description>
@@ -164,6 +174,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index 1e7fff3bc6..06f7900237 100644
--- a/doc/classes/PackedInt64Array.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -57,7 +57,7 @@
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
- <method name="has">
+ <method name="has" qualifiers="const">
<return type="bool" />
<argument index="0" name="value" type="int" />
<description>
@@ -80,6 +80,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedInt64Array" />
<description>
</description>
@@ -92,6 +97,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedInt64Array" />
<description>
</description>
@@ -164,6 +174,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index 1374496b52..618123855f 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -22,23 +22,23 @@
AddChild(scene);
[/csharp]
[/codeblocks]
- [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidBody2D[/code] ([code]rigid[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]rigid[/code] which is a child of [code]node[/code]. Only [code]rigid[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code].
+ [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidDynamicBody2D[/code] ([code]body[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code].
[codeblocks]
[gdscript]
# Create the objects.
var node = Node2D.new()
- var rigid = RigidBody2D.new()
+ var body = RigidDynamicBody2D.new()
var collision = CollisionShape2D.new()
# Create the object hierarchy.
- rigid.add_child(collision)
- node.add_child(rigid)
+ body.add_child(collision)
+ node.add_child(body)
- # Change owner of `rigid`, but not of `collision`.
- rigid.owner = node
+ # Change owner of `body`, but not of `collision`.
+ body.owner = node
var scene = PackedScene.new()
- # Only `node` and `rigid` are now packed.
+ # Only `node` and `body` are now packed.
var result = scene.pack(node)
if result == OK:
var error = ResourceSaver.save("res://path/name.tscn", scene) # Or "user://..."
@@ -48,18 +48,18 @@
[csharp]
// Create the objects.
var node = new Node2D();
- var rigid = new RigidBody2D();
+ var body = new RigidDynamicBody2D();
var collision = new CollisionShape2D();
// Create the object hierarchy.
- rigid.AddChild(collision);
- node.AddChild(rigid);
+ body.AddChild(collision);
+ node.AddChild(body);
- // Change owner of `rigid`, but not of `collision`.
- rigid.Owner = node;
+ // Change owner of `body`, but not of `collision`.
+ body.Owner = node;
var scene = new PackedScene();
- // Only `node` and `rigid` are now packed.
+ // Only `node` and `body` are now packed.
Error result = scene.Pack(node);
if (result == Error.Ok)
{
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index 04113d4a2e..763ed0cc55 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -57,7 +57,7 @@
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
- <method name="has">
+ <method name="has" qualifiers="const">
<return type="bool" />
<argument index="0" name="value" type="String" />
<description>
@@ -80,6 +80,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedStringArray" />
<description>
</description>
@@ -92,6 +97,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedStringArray" />
<description>
</description>
@@ -162,6 +172,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index 76d3aff20e..3f0797bb59 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -57,7 +57,7 @@
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
- <method name="has">
+ <method name="has" qualifiers="const">
<return type="bool" />
<argument index="0" name="value" type="Vector2" />
<description>
@@ -80,6 +80,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedVector2Array" />
<description>
</description>
@@ -98,6 +103,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedVector2Array" />
<description>
</description>
@@ -168,6 +178,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index 1a35f71619..6b950cad61 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -56,7 +56,7 @@
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
- <method name="has">
+ <method name="has" qualifiers="const">
<return type="bool" />
<argument index="0" name="value" type="Vector3" />
<description>
@@ -79,6 +79,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedVector3Array" />
<description>
</description>
@@ -97,6 +102,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="PackedVector3Array" />
<description>
</description>
@@ -167,6 +177,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml
index 8d0aa89287..7c02ccc250 100644
--- a/doc/classes/PacketPeer.xml
+++ b/doc/classes/PacketPeer.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low-level bytes or having to worry about network ordering.
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
</tutorials>
@@ -57,6 +58,4 @@
The [method put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [Variant]. If the [Variant] is bigger than [code]encode_buffer_max_size[/code], the method will error out with [constant ERR_OUT_OF_MEMORY].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PacketPeerDTLS.xml b/doc/classes/PacketPeerDTLS.xml
index b05743fb5a..4d1c83afe7 100644
--- a/doc/classes/PacketPeerDTLS.xml
+++ b/doc/classes/PacketPeerDTLS.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
This class represents a DTLS peer connection. It can be used to connect to a DTLS server, and is returned by [method DTLSServer.take_connection].
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
[b]Warning:[/b] SSL/TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period.
</description>
<tutorials>
diff --git a/doc/classes/PacketPeerExtension.xml b/doc/classes/PacketPeerExtension.xml
new file mode 100644
index 0000000000..f6b925eb30
--- /dev/null
+++ b/doc/classes/PacketPeerExtension.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PacketPeerExtension" inherits="PacketPeer" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_get_available_packet_count" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_max_packet_size" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_packet" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="r_buffer" type="const uint8_t **" />
+ <argument index="1" name="r_buffer_size" type="int32_t*" />
+ <description>
+ </description>
+ </method>
+ <method name="_put_packet" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="p_buffer" type="const uint8_t*" />
+ <argument index="1" name="p_buffer_size" type="int" />
+ <description>
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/PacketPeerStream.xml b/doc/classes/PacketPeerStream.xml
index ec1ee175f7..1c5bec297c 100644
--- a/doc/classes/PacketPeerStream.xml
+++ b/doc/classes/PacketPeerStream.xml
@@ -5,11 +5,10 @@
</brief_description>
<description>
PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly.
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="input_buffer_max_size" type="int" setter="set_input_buffer_max_size" getter="get_input_buffer_max_size" default="65532">
</member>
@@ -19,6 +18,4 @@
The wrapped [StreamPeer] object.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml
index e2acb91058..9b77859b50 100644
--- a/doc/classes/PacketPeerUDP.xml
+++ b/doc/classes/PacketPeerUDP.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
UDP packet peer. Can be used to send raw UDP packets as well as [Variant]s.
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
</tutorials>
@@ -139,6 +140,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml
index 9906abf895..21ac7dfac1 100644
--- a/doc/classes/Panel.xml
+++ b/doc/classes/Panel.xml
@@ -11,8 +11,6 @@
<link title="2D Finite State Machine Demo">https://godotengine.org/asset-library/asset/516</link>
<link title="3D Inverse Kinematics Demo">https://godotengine.org/asset-library/asset/523</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Panel.Mode" default="0">
</member>
diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml
index f3f2f6839a..95d038e2af 100644
--- a/doc/classes/PanelContainer.xml
+++ b/doc/classes/PanelContainer.xml
@@ -9,13 +9,9 @@
<tutorials>
<link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="0" />
</members>
- <constants>
- </constants>
<theme_items>
<theme_item name="panel" data_type="style" type="StyleBox">
The style of [PanelContainer]'s background.
diff --git a/doc/classes/PanoramaSkyMaterial.xml b/doc/classes/PanoramaSkyMaterial.xml
index 905a2dd506..6707c03fac 100644
--- a/doc/classes/PanoramaSkyMaterial.xml
+++ b/doc/classes/PanoramaSkyMaterial.xml
@@ -10,13 +10,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="panorama" type="Texture2D" setter="set_panorama" getter="get_panorama">
[Texture2D] to be applied to the [PanoramaSkyMaterial].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml
index b8097343f4..5670660d01 100644
--- a/doc/classes/ParallaxBackground.xml
+++ b/doc/classes/ParallaxBackground.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="layer" type="int" setter="set_layer" getter="get_layer" override="true" default="-100" />
<member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset" default="Vector2(0, 0)">
@@ -31,6 +29,4 @@
The ParallaxBackground's scroll value. Calculated automatically when using a [Camera2D], but can be used to manually manage scrolling when no camera is present.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml
index 6b1e013851..459518ab1c 100644
--- a/doc/classes/ParallaxLayer.xml
+++ b/doc/classes/ParallaxLayer.xml
@@ -10,8 +10,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" default="Vector2(0, 0)">
The ParallaxLayer's [Texture2D] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code], the [Texture2D] will not be mirrored.
@@ -23,6 +21,4 @@
Multiplies the ParallaxLayer's motion. If an axis is set to [code]0[/code], it will not scroll.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index 3520d3b966..3b583f5c89 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -11,18 +11,18 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_param" qualifiers="const">
+ <method name="get_param_max" qualifiers="const">
<return type="float" />
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
<description>
- Returns the value of the specified parameter.
+ Return the maximum value range for the given prameter.
</description>
</method>
- <method name="get_param_randomness" qualifiers="const">
+ <method name="get_param_min" qualifiers="const">
<return type="float" />
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
<description>
- Returns the randomness ratio associated with the specified parameter.
+ Return the minimum value range for the given parameter.
</description>
</method>
<method name="get_param_texture" qualifiers="const">
@@ -39,20 +39,20 @@
Returns [code]true[/code] if the specified particle flag is enabled. See [enum ParticleFlags] for options.
</description>
</method>
- <method name="set_param">
+ <method name="set_param_max">
<return type="void" />
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
<argument index="1" name="value" type="float" />
<description>
- Sets the specified [enum Parameter].
+ Sets the maximum value range for the given parameter.
</description>
</method>
- <method name="set_param_randomness">
+ <method name="set_param_min">
<return type="void" />
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
- <argument index="1" name="randomness" type="float" />
+ <argument index="1" name="value" type="float" />
<description>
- Sets the randomness ratio for the specified [enum Parameter].
+ Sets the minimum value range for the given parameter.
</description>
</method>
<method name="set_param_texture">
@@ -73,53 +73,56 @@
</method>
</methods>
<members>
- <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0">
- Initial rotation applied to each particle, in degrees.
- Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES].
- </member>
<member name="angle_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's rotation will be animated along this [CurveTexture].
</member>
- <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Rotation randomness ratio.
+ <member name="angle_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum angle.
</member>
- <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
- Initial angular velocity applied to each particle. Sets the speed of rotation of the particle.
- Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES].
+ <member name="angle_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum angle.
</member>
<member name="angular_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's angular velocity will vary along this [CurveTexture].
</member>
- <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Angular velocity randomness ratio.
+ <member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum angular velocity.
</member>
- <member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0">
- Particle animation offset.
+ <member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum angular velocity.
</member>
<member name="anim_offset_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's animation offset will vary along this [CurveTexture].
</member>
- <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Animation offset randomness ratio.
+ <member name="anim_offset_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum animation offset.
</member>
- <member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0">
- Particle animation speed.
+ <member name="anim_offset_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum animation offset.
</member>
<member name="anim_speed_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's animation speed will vary along this [CurveTexture].
</member>
- <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Animation speed randomness ratio.
+ <member name="anim_speed_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum particle animation speed.
+ </member>
+ <member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum particle animation speed.
</member>
<member name="attractor_interaction_enabled" type="bool" setter="set_attractor_interaction_enabled" getter="is_attractor_interaction_enabled" default="true">
+ True if the interaction with particle attractors is enabled.
</member>
<member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0">
+ Collision bouncyness.
</member>
<member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="false">
+ True if collisions are enabled for this particle system.
</member>
<member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="0.0">
+ Collision friction.
</member>
<member name="collision_use_scale" type="bool" setter="set_collision_use_scale" getter="is_collision_using_scale" default="false">
+ Should collision take scale into account.
</member>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code].
@@ -127,14 +130,12 @@
<member name="color_ramp" type="Texture2D" setter="set_color_ramp" getter="get_color_ramp">
Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]).
</member>
- <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0">
- The rate at which particles lose velocity.
- </member>
<member name="damping_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Damping will vary along this [CurveTexture].
</member>
- <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Damping randomness ratio.
+ <member name="damping_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ </member>
+ <member name="damping_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
<member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3(1, 0, 0)">
Unit vector specifying the particles' emission direction.
@@ -178,42 +179,41 @@
<member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -9.8, 0)">
Gravity applied to every particle.
</member>
- <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0">
- Initial hue variation applied to each particle.
- </member>
<member name="hue_variation_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's hue will vary along this [CurveTexture].
</member>
- <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Hue variation randomness ratio.
+ <member name="hue_variation_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum hue variation.
+ </member>
+ <member name="hue_variation_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum hue variation.
</member>
- <member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
- Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation.
+ <member name="initial_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum initial velocity.
</member>
- <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Initial velocity randomness ratio.
+ <member name="initial_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum initial velocity.
</member>
<member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0">
Particle lifetime randomness ratio.
</member>
- <member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0">
- Linear acceleration applied to each particle in the direction of motion.
- </member>
<member name="linear_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's linear acceleration will vary along this [CurveTexture].
</member>
- <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Linear acceleration randomness ratio.
+ <member name="linear_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum linear acceleration.
</member>
- <member name="orbit_velocity" type="float" setter="set_param" getter="get_param">
- Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
- Only available when [member particle_flag_disable_z] is [code]true[/code].
+ <member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum linear acceleration.
</member>
<member name="orbit_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's orbital velocity will vary along this [CurveTexture].
</member>
- <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
- Orbital velocity randomness ratio.
+ <member name="orbit_velocity_max" type="float" setter="set_param_max" getter="get_param_max">
+ Maximum orbit velocity.
+ </member>
+ <member name="orbit_velocity_min" type="float" setter="set_param_min" getter="get_param_min">
+ Minimum orbit velocity.
</member>
<member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
Align Y axis of particle with the direction of its velocity.
@@ -222,25 +222,25 @@
If [code]true[/code], particles will not move on the z axis.
</member>
<member name="particle_flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
- If [code]true[/code], particles rotate around Y axis by [member angle].
- </member>
- <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0">
- Radial acceleration applied to each particle. Makes particle accelerate away from origin.
+ If [code]true[/code], particles rotate around Y axis by [member angle_min].
</member>
<member name="radial_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's radial acceleration will vary along this [CurveTexture].
</member>
- <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Radial acceleration randomness ratio.
+ <member name="radial_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum radial acceleration.
</member>
- <member name="scale" type="float" setter="set_param" getter="get_param" default="1.0">
- Initial scale applied to each particle.
+ <member name="radial_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum radial acceleration.
</member>
<member name="scale_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
- Each particle's scale will vary along this [CurveTexture].
+ Each particle's scale will vary along this [CurveTexture]. If a [CurveXYZTexture] is supplied instead, the scale will be separated per-axis.
</member>
- <member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Scale randomness ratio.
+ <member name="scale_max" type="float" setter="set_param_max" getter="get_param_max" default="1.0">
+ Maximum scale.
+ </member>
+ <member name="scale_min" type="float" setter="set_param_min" getter="get_param_min" default="1.0">
+ Minimum scale.
</member>
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees.
@@ -253,52 +253,52 @@
</member>
<member name="sub_emitter_mode" type="int" setter="set_sub_emitter_mode" getter="get_sub_emitter_mode" enum="ParticlesMaterial.SubEmitterMode" default="0">
</member>
- <member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0">
- Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
- </member>
<member name="tangential_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's tangential acceleration will vary along this [CurveTexture].
</member>
- <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
- Tangential acceleration randomness ratio.
+ <member name="tangential_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum tangential acceleration.
+ </member>
+ <member name="tangential_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum tangential acceleration.
</member>
</members>
<constants>
<constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set initial velocity properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set initial velocity properties.
</constant>
<constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angular velocity properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angular velocity properties.
</constant>
<constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set orbital velocity properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set orbital velocity properties.
</constant>
<constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set linear acceleration properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set linear acceleration properties.
</constant>
<constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set radial acceleration properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set radial acceleration properties.
</constant>
<constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set tangential acceleration properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set tangential acceleration properties.
</constant>
<constant name="PARAM_DAMPING" value="6" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set damping properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set damping properties.
</constant>
<constant name="PARAM_ANGLE" value="7" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angle properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angle properties.
</constant>
<constant name="PARAM_SCALE" value="8" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set scale properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set scale properties.
</constant>
<constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set hue variation properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set hue variation properties.
</constant>
<constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation speed properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation speed properties.
</constant>
<constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter">
- Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation offset properties.
+ Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation offset properties.
</constant>
<constant name="PARAM_MAX" value="12" enum="Parameter">
Represents the size of the [enum Parameter] enum.
diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml
index 57e2091268..297fe69986 100644
--- a/doc/classes/Path2D.xml
+++ b/doc/classes/Path2D.xml
@@ -9,13 +9,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="curve" type="Curve2D" setter="set_curve" getter="get_curve">
A [Curve2D] describing the path.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Path3D.xml b/doc/classes/Path3D.xml
index b97e7efd5d..ce5774acab 100644
--- a/doc/classes/Path3D.xml
+++ b/doc/classes/Path3D.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="curve" type="Curve3D" setter="set_curve" getter="get_curve">
A [Curve3D] describing the path.
@@ -23,6 +21,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml
index 4b55e7b781..98106fd580 100644
--- a/doc/classes/PathFollow2D.xml
+++ b/doc/classes/PathFollow2D.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation" default="true">
If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise.
@@ -39,6 +37,4 @@
The node's offset perpendicular to the curve.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PathFollow3D.xml b/doc/classes/PathFollow3D.xml
index f405bdedfc..781e861203 100644
--- a/doc/classes/PathFollow3D.xml
+++ b/doc/classes/PathFollow3D.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation" default="true">
If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise.
diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml
index 335c3d254b..6e905eace6 100644
--- a/doc/classes/Performance.xml
+++ b/doc/classes/Performance.xml
@@ -169,7 +169,7 @@
<constant name="RENDER_BUFFER_MEM_USED" value="15" enum="Monitor">
</constant>
<constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="16" enum="Monitor">
- Number of active [RigidBody2D] nodes in the game.
+ Number of active [RigidDynamicBody2D] nodes in the game.
</constant>
<constant name="PHYSICS_2D_COLLISION_PAIRS" value="17" enum="Monitor">
Number of collision pairs in the 2D physics engine.
@@ -178,7 +178,7 @@
Number of islands in the 2D physics engine.
</constant>
<constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="19" enum="Monitor">
- Number of active [RigidBody3D] and [VehicleBody3D] nodes in the game.
+ Number of active [RigidDynamicBody3D] and [VehicleBody3D] nodes in the game.
</constant>
<constant name="PHYSICS_3D_COLLISION_PAIRS" value="20" enum="Monitor">
Number of collision pairs in the 3D physics engine.
diff --git a/doc/classes/PhysicalBone2D.xml b/doc/classes/PhysicalBone2D.xml
index b4d92475a1..339739b267 100644
--- a/doc/classes/PhysicalBone2D.xml
+++ b/doc/classes/PhysicalBone2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicalBone2D" inherits="RigidBody2D" version="4.0">
+<class name="PhysicalBone2D" inherits="RigidDynamicBody2D" version="4.0">
<brief_description>
A 2D node that can be used for physically aware bones in 2D.
</brief_description>
<description>
- The [code]PhysicalBone2D[/code] node is a [RigidBody2D]-based node that can be used to make [Bone2D] nodes in a [Skeleton2D] react to physics. This node is very similar to the [PhysicalBone3D] node, just for 2D instead of 3D.
+ The [code]PhysicalBone2D[/code] node is a [RigidDynamicBody2D]-based node that can be used to make [Bone2D] nodes in a [Skeleton2D] react to physics. This node is very similar to the [PhysicalBone3D] node, just for 2D instead of 3D.
[b]Note:[/b] To have the Bone2D nodes visually follow the [code]PhysicalBone2D[/code] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes.
[b]Note:[/b] The PhysicalBone2D node does not automatically create a [Joint2D] node to keep [code]PhysicalBone2D[/code] nodes together. You will need to create these manually. For most cases, you want to use a [PinJoint2D] node. The [code]PhysicalBone2D[/code] node can automatically configure the [Joint2D] node once it's been created as a child node.
</description>
@@ -42,6 +42,4 @@
[b]Note:[/b] To have the Bone2D nodes visually follow the [code]PhysicalBone2D[/code] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml
index 20ab998d35..b90f52a70d 100644
--- a/doc/classes/PhysicalSkyMaterial.xml
+++ b/doc/classes/PhysicalSkyMaterial.xml
@@ -10,8 +10,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="dither_strength" type="float" setter="set_dither_strength" getter="get_dither_strength" default="1.0">
Sets the amount of dithering to use. Dithering helps reduce banding that appears from the smooth changes in color in the sky. Use the lowest value possible, higher amounts may add fuzziness to the sky.
@@ -47,6 +45,4 @@
Sets the thickness of the atmosphere. High turbidity creates a foggy looking atmosphere, while a low turbidity results in a clearer atmosphere.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
index e00c473bcd..e108ab6298 100644
--- a/doc/classes/PhysicsBody2D.xml
+++ b/doc/classes/PhysicsBody2D.xml
@@ -25,11 +25,12 @@
</method>
<method name="move_and_collide">
<return type="KinematicCollision2D" />
- <argument index="0" name="rel_vec" type="Vector2" />
+ <argument index="0" name="linear_velocity" type="Vector2" />
<argument index="1" name="test_only" type="bool" default="false" />
<argument index="2" name="safe_margin" type="float" default="0.08" />
<description>
- Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision.
+ Moves the body along the vector [code]linear_velocity[/code]. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
+ The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision.
If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
[code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details).
</description>
@@ -44,11 +45,12 @@
<method name="test_move">
<return type="bool" />
<argument index="0" name="from" type="Transform2D" />
- <argument index="1" name="rel_vec" type="Vector2" />
+ <argument index="1" name="linear_velocity" type="Vector2" />
<argument index="2" name="collision" type="KinematicCollision2D" default="null" />
<argument index="3" name="safe_margin" type="float" default="0.08" />
<description>
- Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
+ Checks for collisions without moving the body. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
+ Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]linear_velocity[/code]. Returns [code]true[/code] if a collision would occur.
[code]collision[/code] is an optional object of type [KinematicCollision2D], which contains additional information about the collision (should there be one).
[code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details).
</description>
@@ -57,6 +59,4 @@
<members>
<member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" override="true" default="false" />
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml
index ea2553e28a..8718c0caa2 100644
--- a/doc/classes/PhysicsBody3D.xml
+++ b/doc/classes/PhysicsBody3D.xml
@@ -32,13 +32,16 @@
</method>
<method name="move_and_collide">
<return type="KinematicCollision3D" />
- <argument index="0" name="rel_vec" type="Vector3" />
+ <argument index="0" name="linear_velocity" type="Vector3" />
<argument index="1" name="test_only" type="bool" default="false" />
<argument index="2" name="safe_margin" type="float" default="0.001" />
+ <argument index="3" name="max_collisions" type="int" default="1" />
<description>
- Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision.
+ Moves the body along the vector [code]linear_velocity[/code]. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
+ The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision.
If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given.
[code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details).
+ [code]max_collisions[/code] allows to retrieve more than one collision result.
</description>
</method>
<method name="remove_collision_exception_with">
@@ -59,13 +62,16 @@
<method name="test_move">
<return type="bool" />
<argument index="0" name="from" type="Transform3D" />
- <argument index="1" name="rel_vec" type="Vector3" />
+ <argument index="1" name="linear_velocity" type="Vector3" />
<argument index="2" name="collision" type="KinematicCollision3D" default="null" />
<argument index="3" name="safe_margin" type="float" default="0.001" />
+ <argument index="4" name="max_collisions" type="int" default="1" />
<description>
- Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
+ Checks for collisions without moving the body. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
+ Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]linear_velocity[/code]. Returns [code]true[/code] if a collision would occur.
[code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision (should there be one).
[code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details).
+ [code]max_collisions[/code] allows to retrieve more than one collision result.
</description>
</method>
</methods>
@@ -89,6 +95,4 @@
Lock the body's linear movement in the Z axis.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml
index 4c6adfca32..bbb708c9b4 100644
--- a/doc/classes/PhysicsDirectBodyState2D.xml
+++ b/doc/classes/PhysicsDirectBodyState2D.xml
@@ -4,9 +4,10 @@
Direct access object to a physics body in the [PhysicsServer2D].
</brief_description>
<description>
- Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces].
+ Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidDynamicBody2D._integrate_forces].
</description>
<tutorials>
+ <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
<link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
@@ -107,7 +108,7 @@
<return type="int" />
<description>
Returns the number of contacts this body has with other bodies.
- [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody2D.contact_monitor].
+ [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidDynamicBody2D.contact_monitor].
</description>
</method>
<method name="get_contact_local_normal" qualifiers="const">
@@ -155,6 +156,9 @@
<member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity">
The body's rotational velocity.
</member>
+ <member name="center_of_mass" type="Vector2" setter="" getter="get_center_of_mass">
+ The body's center of mass.
+ </member>
<member name="inverse_inertia" type="float" setter="" getter="get_inverse_inertia">
The inverse of the inertia of the body.
</member>
@@ -183,6 +187,4 @@
The body's transformation matrix.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml
index 271668e339..9bc5dbd6b9 100644
--- a/doc/classes/PhysicsDirectBodyState3D.xml
+++ b/doc/classes/PhysicsDirectBodyState3D.xml
@@ -4,9 +4,11 @@
Direct access object to a physics body in the [PhysicsServer3D].
</brief_description>
<description>
- Provides direct access to a physics body in the [PhysicsServer3D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidBody3D._integrate_forces].
+ Provides direct access to a physics body in the [PhysicsServer3D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidDynamicBody3D._integrate_forces].
</description>
<tutorials>
+ <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
<method name="add_central_force">
@@ -101,7 +103,7 @@
<return type="int" />
<description>
Returns the number of contacts this body has with other bodies.
- [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody3D.contact_monitor].
+ [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidDynamicBody3D.contact_monitor].
</description>
</method>
<method name="get_contact_impulse" qualifiers="const">
@@ -157,6 +159,7 @@
The body's rotational velocity.
</member>
<member name="center_of_mass" type="Vector3" setter="" getter="get_center_of_mass">
+ The body's center of mass.
</member>
<member name="inverse_inertia" type="Vector3" setter="" getter="get_inverse_inertia">
The inverse of the inertia of the body.
@@ -188,6 +191,4 @@
The body's transformation matrix.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml
index e84b3e0e49..0264249dab 100644
--- a/doc/classes/PhysicsDirectSpaceState2D.xml
+++ b/doc/classes/PhysicsDirectSpaceState2D.xml
@@ -7,7 +7,8 @@
Direct access object to a space in the [PhysicsServer2D]. It's used mainly to do queries against objects and areas residing in a given space.
</description>
<tutorials>
- <link title="Ray-Casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
<method name="cast_motion">
@@ -47,7 +48,7 @@
<argument index="0" name="point" type="Vector2" />
<argument index="1" name="max_results" type="int" default="32" />
<argument index="2" name="exclude" type="Array" default="[]" />
- <argument index="3" name="collision_mask" type="int" default="2147483647" />
+ <argument index="3" name="collision_mask" type="int" default="4294967295" />
<argument index="4" name="collide_with_bodies" type="bool" default="true" />
<argument index="5" name="collide_with_areas" type="bool" default="false" />
<description>
@@ -57,7 +58,7 @@
[code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data].
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
- Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
+ Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
[b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected.
</description>
</method>
@@ -67,10 +68,18 @@
<argument index="1" name="canvas_instance_id" type="int" />
<argument index="2" name="max_results" type="int" default="32" />
<argument index="3" name="exclude" type="Array" default="[]" />
- <argument index="4" name="collision_mask" type="int" default="2147483647" />
+ <argument index="4" name="collision_mask" type="int" default="4294967295" />
<argument index="5" name="collide_with_bodies" type="bool" default="true" />
<argument index="6" name="collide_with_areas" type="bool" default="false" />
<description>
+ Checks whether a point is inside any solid shape, in a specific canvas layer given by [code]canvas_instance_id[/code]. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
+ [code]collider[/code]: The colliding object.
+ [code]collider_id[/code]: The colliding object's ID.
+ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data].
+ [code]rid[/code]: The intersecting object's [RID].
+ [code]shape[/code]: The shape index of the colliding shape.
+ Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
+ [b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected.
</description>
</method>
<method name="intersect_ray">
@@ -78,7 +87,7 @@
<argument index="0" name="from" type="Vector2" />
<argument index="1" name="to" type="Vector2" />
<argument index="2" name="exclude" type="Array" default="[]" />
- <argument index="3" name="collision_mask" type="int" default="2147483647" />
+ <argument index="3" name="collision_mask" type="int" default="4294967295" />
<argument index="4" name="collide_with_bodies" type="bool" default="true" />
<argument index="5" name="collide_with_areas" type="bool" default="false" />
<description>
@@ -91,7 +100,7 @@
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
If the ray did not intersect anything, then an empty dictionary is returned instead.
- Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
+ Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively.
</description>
</method>
<method name="intersect_shape">
@@ -110,6 +119,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml
index 13db50a2c7..137e7bbf39 100644
--- a/doc/classes/PhysicsDirectSpaceState3D.xml
+++ b/doc/classes/PhysicsDirectSpaceState3D.xml
@@ -7,6 +7,7 @@
Direct access object to a space in the [PhysicsServer3D]. It's used mainly to do queries against objects and areas residing in a given space.
</description>
<tutorials>
+ <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
<link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
</tutorials>
<methods>
@@ -47,7 +48,7 @@
<argument index="0" name="from" type="Vector3" />
<argument index="1" name="to" type="Vector3" />
<argument index="2" name="exclude" type="Array" default="[]" />
- <argument index="3" name="collision_mask" type="int" default="2147483647" />
+ <argument index="3" name="collision_mask" type="int" default="4294967295" />
<argument index="4" name="collide_with_bodies" type="bool" default="true" />
<argument index="5" name="collide_with_areas" type="bool" default="false" />
<description>
@@ -59,7 +60,7 @@
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
If the ray did not intersect anything, then an empty dictionary is returned instead.
- Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively.
+ Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively.
</description>
</method>
<method name="intersect_shape">
@@ -76,6 +77,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PhysicsMaterial.xml b/doc/classes/PhysicsMaterial.xml
index 0889c238dc..b557b083c7 100644
--- a/doc/classes/PhysicsMaterial.xml
+++ b/doc/classes/PhysicsMaterial.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="absorbent" type="bool" setter="set_absorbent" getter="is_absorbent" default="false">
If [code]true[/code], subtracts the bounciness from the colliding object's bounciness instead of adding it.
@@ -24,6 +22,4 @@
If [code]true[/code], the physics engine will use the friction of the object marked as "rough" when two objects collide. If [code]false[/code], the physics engine will use the lowest friction of all colliding objects instead. If [code]true[/code] for both colliding objects, the physics engine will use the highest friction.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index 1df2fd0158..791a04e4c2 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -373,7 +373,7 @@
</description>
</method>
<method name="body_get_param" qualifiers="const">
- <return type="float" />
+ <return type="Variant" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" />
<description>
@@ -449,6 +449,13 @@
Removes a shape from a body. The shape is not deleted, so it can be reused afterwards.
</description>
</method>
+ <method name="body_reset_mass_properties">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using [method body_set_param].
+ </description>
+ </method>
<method name="body_set_axis_velocity">
<return type="void" />
<argument index="0" name="body" type="RID" />
@@ -489,6 +496,9 @@
<argument index="2" name="userdata" type="Variant" default="null" />
<description>
Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).
+ The force integration function takes 2 arguments:
+ [code]state:[/code] [PhysicsDirectBodyState2D] used to retrieve and modify the body's state.
+ [code]userdata:[/code] Optional user data, if it was passed when calling [code]body_set_force_integration_callback[/code].
</description>
</method>
<method name="body_set_max_contacts_reported">
@@ -519,7 +529,7 @@
<return type="void" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" />
- <argument index="2" name="value" type="float" />
+ <argument index="2" name="value" type="Variant" />
<description>
Sets a body parameter. See [enum BodyParameter] for a list of available parameters.
</description>
@@ -595,7 +605,8 @@
<argument index="2" name="motion" type="Vector2" />
<argument index="3" name="margin" type="float" default="0.08" />
<argument index="4" name="result" type="PhysicsTestMotionResult2D" default="null" />
- <argument index="5" name="exclude" type="Array" default="[]" />
+ <argument index="5" name="collide_separation_ray" type="bool" default="false" />
+ <argument index="6" name="exclude" type="Array" default="[]" />
<description>
Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult2D] can be passed to return additional information in.
</description>
@@ -726,6 +737,11 @@
<description>
</description>
</method>
+ <method name="separation_ray_shape_create">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
<method name="set_active">
<return type="void" />
<argument index="0" name="active" type="bool" />
@@ -807,7 +823,7 @@
Sets the value for a space parameter. See [enum SpaceParameter] for a list of available parameters.
</description>
</method>
- <method name="world_margin_shape_create">
+ <method name="world_boundary_shape_create">
<return type="RID" />
<description>
</description>
@@ -835,30 +851,31 @@
<constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="6" enum="SpaceParameter">
Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
</constant>
- <constant name="SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH" value="7" enum="SpaceParameter">
+ <constant name="SHAPE_WORLD_BOUNDARY" value="0" enum="ShapeType">
+ This is the constant for creating world boundary shapes. A world boundary shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks.
</constant>
- <constant name="SHAPE_WORLD_MARGIN" value="0" enum="ShapeType">
- This is the constant for creating world margin shapes. A world margin shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks.
+ <constant name="SHAPE_SEPARATION_RAY" value="1" enum="ShapeType">
+ This is the constant for creating separation ray shapes. A separation ray is defined by a length and separates itself from what is touching its far endpoint. Useful for character controllers.
</constant>
- <constant name="SHAPE_SEGMENT" value="1" enum="ShapeType">
+ <constant name="SHAPE_SEGMENT" value="2" enum="ShapeType">
This is the constant for creating segment shapes. A segment shape is a [i]finite[/i] line from a point A to a point B. It can be checked for intersections.
</constant>
- <constant name="SHAPE_CIRCLE" value="2" enum="ShapeType">
+ <constant name="SHAPE_CIRCLE" value="3" enum="ShapeType">
This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks.
</constant>
- <constant name="SHAPE_RECTANGLE" value="3" enum="ShapeType">
+ <constant name="SHAPE_RECTANGLE" value="4" enum="ShapeType">
This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks.
</constant>
- <constant name="SHAPE_CAPSULE" value="4" enum="ShapeType">
+ <constant name="SHAPE_CAPSULE" value="5" enum="ShapeType">
This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks.
</constant>
- <constant name="SHAPE_CONVEX_POLYGON" value="5" enum="ShapeType">
+ <constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType">
This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the [member CollisionPolygon2D.polygon] property, polygons modified with [method shape_set_data] do not verify that the points supplied form is a convex polygon.
</constant>
- <constant name="SHAPE_CONCAVE_POLYGON" value="6" enum="ShapeType">
+ <constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType">
This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks.
</constant>
- <constant name="SHAPE_CUSTOM" value="7" enum="ShapeType">
+ <constant name="SHAPE_CUSTOM" value="8" enum="ShapeType">
This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
</constant>
<constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter">
@@ -901,7 +918,7 @@
This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
</constant>
<constant name="BODY_MODE_STATIC" value="0" enum="BodyMode">
- Constant for static bodies. In this mode, a body can be only moved by user code.
+ Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved.
</constant>
<constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode">
Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path.
@@ -909,8 +926,8 @@
<constant name="BODY_MODE_DYNAMIC" value="2" enum="BodyMode">
Constant for dynamic bodies. In this mode, a body can be pushed by other bodies and has forces applied.
</constant>
- <constant name="BODY_MODE_DYNAMIC_LOCKED" value="3" enum="BodyMode">
- Constant for locked dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces.
+ <constant name="BODY_MODE_DYNAMIC_LINEAR" value="3" enum="BodyMode">
+ Constant for linear dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces.
</constant>
<constant name="BODY_PARAM_BOUNCE" value="0" enum="BodyParameter">
Constant to set/get a body's bounce factor.
@@ -924,16 +941,19 @@
<constant name="BODY_PARAM_INERTIA" value="3" enum="BodyParameter">
Constant to set/get a body's inertia.
</constant>
- <constant name="BODY_PARAM_GRAVITY_SCALE" value="4" enum="BodyParameter">
+ <constant name="BODY_PARAM_CENTER_OF_MASS" value="4" enum="BodyParameter">
+ Constant to set/get a body's center of mass.
+ </constant>
+ <constant name="BODY_PARAM_GRAVITY_SCALE" value="5" enum="BodyParameter">
Constant to set/get a body's gravity multiplier.
</constant>
- <constant name="BODY_PARAM_LINEAR_DAMP" value="5" enum="BodyParameter">
+ <constant name="BODY_PARAM_LINEAR_DAMP" value="6" enum="BodyParameter">
Constant to set/get a body's linear dampening factor.
</constant>
- <constant name="BODY_PARAM_ANGULAR_DAMP" value="6" enum="BodyParameter">
+ <constant name="BODY_PARAM_ANGULAR_DAMP" value="7" enum="BodyParameter">
Constant to set/get a body's angular dampening factor.
</constant>
- <constant name="BODY_PARAM_MAX" value="7" enum="BodyParameter">
+ <constant name="BODY_PARAM_MAX" value="8" enum="BodyParameter">
Represents the size of the [enum BodyParameter] enum.
</constant>
<constant name="BODY_STATE_TRANSFORM" value="0" enum="BodyState">
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index d46e38ac5f..1d1ca54dbb 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -347,7 +347,7 @@
</description>
</method>
<method name="body_get_param" qualifiers="const">
- <return type="float" />
+ <return type="Variant" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" />
<description>
@@ -430,6 +430,13 @@
Removes a shape from a body. The shape is not deleted, so it can be reused afterwards.
</description>
</method>
+ <method name="body_reset_mass_properties">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using [method body_set_param].
+ </description>
+ </method>
<method name="body_set_axis_lock">
<return type="void" />
<argument index="0" name="body" type="RID" />
@@ -478,6 +485,9 @@
<argument index="2" name="userdata" type="Variant" default="null" />
<description>
Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).
+ The force integration function takes 2 arguments:
+ [code]state:[/code] [PhysicsDirectBodyState3D] used to retrieve and modify the body's state.
+ [code]userdata:[/code] Optional user data, if it was passed when calling [code]body_set_force_integration_callback[/code].
</description>
</method>
<method name="body_set_max_contacts_reported">
@@ -508,7 +518,7 @@
<return type="void" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" />
- <argument index="2" name="value" type="float" />
+ <argument index="2" name="value" type="Variant" />
<description>
Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants.
</description>
@@ -571,7 +581,9 @@
<argument index="2" name="motion" type="Vector3" />
<argument index="3" name="margin" type="float" default="0.001" />
<argument index="4" name="result" type="PhysicsTestMotionResult3D" default="null" />
- <argument index="5" name="exclude" type="Array" default="[]" />
+ <argument index="5" name="collide_separation_ray" type="bool" default="false" />
+ <argument index="6" name="exclude" type="Array" default="[]" />
+ <argument index="7" name="max_collisions" type="int" default="1" />
<description>
Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult3D] can be passed to return additional information in.
</description>
@@ -844,7 +856,7 @@
Sets a pin_joint parameter (see [enum PinJointParam] constants).
</description>
</method>
- <method name="plane_shape_create">
+ <method name="separation_ray_shape_create">
<return type="RID" />
<description>
</description>
@@ -959,6 +971,11 @@
<description>
</description>
</method>
+ <method name="world_boundary_shape_create">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
</methods>
<constants>
<constant name="JOINT_TYPE_PIN" value="0" enum="JointType">
@@ -1168,34 +1185,37 @@
<constant name="G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR" value="5" enum="G6DOFJointAxisFlag">
If [code]set[/code] there is a linear motor on this axis that targets a specific velocity.
</constant>
- <constant name="SHAPE_PLANE" value="0" enum="ShapeType">
- The [Shape3D] is a [WorldMarginShape3D].
+ <constant name="SHAPE_WORLD_BOUNDARY" value="0" enum="ShapeType">
+ The [Shape3D] is a [WorldBoundaryShape3D].
+ </constant>
+ <constant name="SHAPE_SEPARATION_RAY" value="1" enum="ShapeType">
+ The [Shape3D] is a [SeparationRayShape3D].
</constant>
- <constant name="SHAPE_SPHERE" value="1" enum="ShapeType">
+ <constant name="SHAPE_SPHERE" value="2" enum="ShapeType">
The [Shape3D] is a [SphereShape3D].
</constant>
- <constant name="SHAPE_BOX" value="2" enum="ShapeType">
+ <constant name="SHAPE_BOX" value="3" enum="ShapeType">
The [Shape3D] is a [BoxShape3D].
</constant>
- <constant name="SHAPE_CAPSULE" value="3" enum="ShapeType">
+ <constant name="SHAPE_CAPSULE" value="4" enum="ShapeType">
The [Shape3D] is a [CapsuleShape3D].
</constant>
- <constant name="SHAPE_CYLINDER" value="4" enum="ShapeType">
+ <constant name="SHAPE_CYLINDER" value="5" enum="ShapeType">
The [Shape3D] is a [CylinderShape3D].
</constant>
- <constant name="SHAPE_CONVEX_POLYGON" value="5" enum="ShapeType">
+ <constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType">
The [Shape3D] is a [ConvexPolygonShape3D].
</constant>
- <constant name="SHAPE_CONCAVE_POLYGON" value="6" enum="ShapeType">
+ <constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType">
The [Shape3D] is a [ConcavePolygonShape3D].
</constant>
- <constant name="SHAPE_HEIGHTMAP" value="7" enum="ShapeType">
+ <constant name="SHAPE_HEIGHTMAP" value="8" enum="ShapeType">
The [Shape3D] is a [HeightMapShape3D].
</constant>
- <constant name="SHAPE_SOFT_BODY" value="8" enum="ShapeType">
- The [Shape3D] is a [SoftBody3D].
+ <constant name="SHAPE_SOFT_BODY" value="9" enum="ShapeType">
+ The [Shape3D] is used internally for a soft body. Any attempt to create this kind of shape results in an error.
</constant>
- <constant name="SHAPE_CUSTOM" value="9" enum="ShapeType">
+ <constant name="SHAPE_CUSTOM" value="10" enum="ShapeType">
This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
</constant>
<constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter">
@@ -1222,6 +1242,18 @@
<constant name="AREA_PARAM_PRIORITY" value="7" enum="AreaParameter">
Constant to set/get the priority (order of processing) of an area.
</constant>
+ <constant name="AREA_PARAM_WIND_FORCE_MAGNITUDE" value="8" enum="AreaParameter">
+ Constant to set/get the magnitude of area-specific wind force.
+ </constant>
+ <constant name="AREA_PARAM_WIND_SOURCE" value="9" enum="AreaParameter">
+ Constant to set/get the 3D vector that specifies the origin from which an area-specific wind blows.
+ </constant>
+ <constant name="AREA_PARAM_WIND_DIRECTION" value="10" enum="AreaParameter">
+ Constant to set/get the 3D vector that specifies the direction in which an area-specific wind blows.
+ </constant>
+ <constant name="AREA_PARAM_WIND_ATTENUATION_FACTOR" value="11" enum="AreaParameter">
+ Constant to set/get the exponential rate at which wind force decreases with distance from its origin.
+ </constant>
<constant name="AREA_SPACE_OVERRIDE_DISABLED" value="0" enum="AreaSpaceOverrideMode">
This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them.
</constant>
@@ -1238,7 +1270,7 @@
This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
</constant>
<constant name="BODY_MODE_STATIC" value="0" enum="BodyMode">
- Constant for static bodies. In this mode, a body can be only moved by user code.
+ Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved.
</constant>
<constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode">
Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path.
@@ -1246,8 +1278,8 @@
<constant name="BODY_MODE_DYNAMIC" value="2" enum="BodyMode">
Constant for dynamic bodies. In this mode, a body can be pushed by other bodies and has forces applied.
</constant>
- <constant name="BODY_MODE_DYNAMIC_LOCKED" value="3" enum="BodyMode">
- Constant for locked dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces.
+ <constant name="BODY_MODE_DYNAMIC_LINEAR" value="3" enum="BodyMode">
+ Constant for linear dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces.
</constant>
<constant name="BODY_PARAM_BOUNCE" value="0" enum="BodyParameter">
Constant to set/get a body's bounce factor.
@@ -1258,16 +1290,22 @@
<constant name="BODY_PARAM_MASS" value="2" enum="BodyParameter">
Constant to set/get a body's mass.
</constant>
- <constant name="BODY_PARAM_GRAVITY_SCALE" value="3" enum="BodyParameter">
+ <constant name="BODY_PARAM_INERTIA" value="3" enum="BodyParameter">
+ Constant to set/get a body's inertia.
+ </constant>
+ <constant name="BODY_PARAM_CENTER_OF_MASS" value="4" enum="BodyParameter">
+ Constant to set/get a body's center of mass.
+ </constant>
+ <constant name="BODY_PARAM_GRAVITY_SCALE" value="5" enum="BodyParameter">
Constant to set/get a body's gravity multiplier.
</constant>
- <constant name="BODY_PARAM_LINEAR_DAMP" value="4" enum="BodyParameter">
+ <constant name="BODY_PARAM_LINEAR_DAMP" value="6" enum="BodyParameter">
Constant to set/get a body's linear dampening factor.
</constant>
- <constant name="BODY_PARAM_ANGULAR_DAMP" value="5" enum="BodyParameter">
+ <constant name="BODY_PARAM_ANGULAR_DAMP" value="7" enum="BodyParameter">
Constant to set/get a body's angular dampening factor.
</constant>
- <constant name="BODY_PARAM_MAX" value="6" enum="BodyParameter">
+ <constant name="BODY_PARAM_MAX" value="8" enum="BodyParameter">
Represents the size of the [enum BodyParameter] enum.
</constant>
<constant name="BODY_STATE_TRANSFORM" value="0" enum="BodyState">
@@ -1323,8 +1361,6 @@
<constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="7" enum="SpaceParameter">
Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
</constant>
- <constant name="SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH" value="8" enum="SpaceParameter">
- </constant>
<constant name="BODY_AXIS_LINEAR_X" value="1" enum="BodyAxis">
</constant>
<constant name="BODY_AXIS_LINEAR_Y" value="2" enum="BodyAxis">
diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml
index 8b006c68e7..6035b662ea 100644
--- a/doc/classes/PhysicsShapeQueryParameters2D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters2D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false">
If [code]true[/code], the query will take [Area2D]s into account.
@@ -17,7 +15,7 @@
<member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true">
If [code]true[/code], the query will take [PhysicsBody2D]s into account.
</member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647">
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
@@ -67,6 +65,4 @@
The queried shape's transform matrix.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml
index de9b623591..1a289ff9d0 100644
--- a/doc/classes/PhysicsShapeQueryParameters3D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters3D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false">
If [code]true[/code], the query will take [Area3D]s into account.
@@ -17,7 +15,7 @@
<member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true">
If [code]true[/code], the query will take [PhysicsBody3D]s into account.
</member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647">
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
@@ -64,6 +62,4 @@
The queried shape's transform matrix.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PhysicsTestMotionResult2D.xml b/doc/classes/PhysicsTestMotionResult2D.xml
index 9c5d525f85..8d594af673 100644
--- a/doc/classes/PhysicsTestMotionResult2D.xml
+++ b/doc/classes/PhysicsTestMotionResult2D.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="collider" type="Object" setter="" getter="get_collider">
</member>
@@ -34,6 +32,4 @@
<member name="travel" type="Vector2" setter="" getter="get_travel" default="Vector2(0, 0)">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PhysicsTestMotionResult3D.xml b/doc/classes/PhysicsTestMotionResult3D.xml
index 6c18a097a1..8aa087e99a 100644
--- a/doc/classes/PhysicsTestMotionResult3D.xml
+++ b/doc/classes/PhysicsTestMotionResult3D.xml
@@ -7,33 +7,81 @@
<tutorials>
</tutorials>
<methods>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_id" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_rid" qualifiers="const">
+ <return type="RID" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_shape" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ </description>
+ </method>
+ <method name="get_collider_velocity" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_depth" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_normal" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ </description>
+ </method>
+ <method name="get_collision_point" qualifiers="const">
+ <return type="Vector3" />
+ <argument index="0" name="collision_index" type="int" default="0" />
+ <description>
+ </description>
+ </method>
</methods>
<members>
- <member name="collider" type="Object" setter="" getter="get_collider">
+ <member name="collider" type="Object" setter="" getter="get_best_collider">
</member>
- <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0">
+ <member name="collider_id" type="int" setter="" getter="get_best_collider_id" default="0">
</member>
- <member name="collider_rid" type="RID" setter="" getter="get_collider_rid">
+ <member name="collider_rid" type="RID" setter="" getter="get_best_collider_rid">
</member>
- <member name="collider_shape" type="int" setter="" getter="get_collider_shape" default="0">
+ <member name="collider_shape" type="int" setter="" getter="get_best_collider_shape" default="0">
</member>
- <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" default="Vector3(0, 0, 0)">
+ <member name="collider_velocity" type="Vector3" setter="" getter="get_best_collider_velocity" default="Vector3(0, 0, 0)">
</member>
- <member name="collision_depth" type="float" setter="" getter="get_collision_depth" default="0.0">
+ <member name="collision_count" type="int" setter="" getter="get_collision_count" default="0">
</member>
- <member name="collision_normal" type="Vector3" setter="" getter="get_collision_normal" default="Vector3(0, 0, 0)">
+ <member name="collision_depth" type="float" setter="" getter="get_best_collision_depth" default="0.0">
</member>
- <member name="collision_point" type="Vector3" setter="" getter="get_collision_point" default="Vector3(0, 0, 0)">
+ <member name="collision_normal" type="Vector3" setter="" getter="get_best_collision_normal" default="Vector3(0, 0, 0)">
</member>
- <member name="collision_safe_fraction" type="float" setter="" getter="get_collision_safe_fraction" default="0.0">
- </member>
- <member name="collision_unsafe_fraction" type="float" setter="" getter="get_collision_unsafe_fraction" default="0.0">
+ <member name="collision_point" type="Vector3" setter="" getter="get_best_collision_point" default="Vector3(0, 0, 0)">
</member>
<member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3(0, 0, 0)">
</member>
+ <member name="safe_fraction" type="float" setter="" getter="get_safe_fraction" default="0.0">
+ </member>
<member name="travel" type="Vector3" setter="" getter="get_travel" default="Vector3(0, 0, 0)">
</member>
+ <member name="unsafe_fraction" type="float" setter="" getter="get_unsafe_fraction" default="0.0">
+ </member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml
index ed45149cdf..d5890fe912 100644
--- a/doc/classes/PinJoint2D.xml
+++ b/doc/classes/PinJoint2D.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="softness" type="float" setter="set_softness" getter="get_softness" default="0.0">
The higher this value, the more the bond to the pinned partner can flex.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index c243c3ad15..bc9b3cafb5 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -125,12 +125,22 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Plane" />
<description>
</description>
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Plane" />
<description>
</description>
diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml
index 56bf98772b..ff0385dbdb 100644
--- a/doc/classes/PlaneMesh.xml
+++ b/doc/classes/PlaneMesh.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="center_offset" type="Vector3" setter="set_center_offset" getter="get_center_offset" default="Vector3(0, 0, 0)">
Offset of the generated plane. Useful for particles.
@@ -25,6 +23,4 @@
Number of subdivision along the X axis.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PointLight2D.xml b/doc/classes/PointLight2D.xml
index a7207a3c80..9c13179056 100644
--- a/doc/classes/PointLight2D.xml
+++ b/doc/classes/PointLight2D.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="height" type="float" setter="set_height" getter="get_height" default="0.0">
The height of the light. Used with 2D normal mapping.
@@ -22,6 +20,4 @@
The [member texture]'s scale factor.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PointMesh.xml b/doc/classes/PointMesh.xml
index 266ab2a898..7d1fa6ac35 100644
--- a/doc/classes/PointMesh.xml
+++ b/doc/classes/PointMesh.xml
@@ -10,8 +10,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index 23106cddf7..cbffd9e554 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -114,6 +114,4 @@
Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use [code]color[/code].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml
index f77912bafe..945849e4df 100644
--- a/doc/classes/PolygonPathFinder.xml
+++ b/doc/classes/PolygonPathFinder.xml
@@ -59,6 +59,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml
index 89695989c8..a47f72b2b6 100644
--- a/doc/classes/Popup.xml
+++ b/doc/classes/Popup.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="borderless" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" />
<member name="close_on_parent_focus" type="bool" setter="set_close_on_parent_focus" getter="get_close_on_parent_focus" default="true">
@@ -27,6 +25,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 61b5aa89a6..2208c12e56 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -535,8 +535,6 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
<theme_items>
<theme_item name="checked" data_type="icon" type="Texture2D">
[Texture2D] icon for the checked checkbox items.
diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml
index 56833f3f79..71753ffcc6 100644
--- a/doc/classes/PopupPanel.xml
+++ b/doc/classes/PopupPanel.xml
@@ -8,10 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
<theme_items>
<theme_item name="panel" data_type="style" type="StyleBox">
The background panel style of this [PopupPanel].
diff --git a/doc/classes/Position2D.xml b/doc/classes/Position2D.xml
index 9fadb73a15..03d94b5db9 100644
--- a/doc/classes/Position2D.xml
+++ b/doc/classes/Position2D.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Position3D.xml b/doc/classes/Position3D.xml
index ca61a57483..22dc261520 100644
--- a/doc/classes/Position3D.xml
+++ b/doc/classes/Position3D.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 36bec3ff61..6d63f56f1c 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -40,6 +40,4 @@
The current [Material] of the primitive mesh.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml
index 0e66281fd1..e369bfe1b2 100644
--- a/doc/classes/PrismMesh.xml
+++ b/doc/classes/PrismMesh.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right" default="0.5">
Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge.
@@ -27,6 +25,4 @@
Number of added edge loops along the X axis.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml
index c598a2c266..02e6a2d9f8 100644
--- a/doc/classes/ProceduralSkyMaterial.xml
+++ b/doc/classes/ProceduralSkyMaterial.xml
@@ -10,8 +10,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color(0.12, 0.12, 0.13, 1)">
Color of the ground at the bottom. Blends with [member ground_horizon_color].
@@ -44,6 +42,4 @@
How quickly the sun fades away between the edge of the sun disk and [member sun_angle_max].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index 8bd013c86c..88132967a0 100644
--- a/doc/classes/ProgressBar.xml
+++ b/doc/classes/ProgressBar.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="percent_visible" type="bool" setter="set_percent_visible" getter="is_percent_visible" default="true">
If [code]true[/code], the fill percentage is displayed on the bar.
@@ -17,8 +15,6 @@
<member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="0" />
<member name="step" type="float" setter="set_step" getter="get_step" override="true" default="0.01" />
</members>
- <constants>
- </constants>
<theme_items>
<theme_item name="bg" data_type="style" type="StyleBox">
The style of the background.
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 0d1fa0e70f..b3872121bf 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -279,6 +279,9 @@
<member name="audio/driver/mix_rate" type="int" setter="" getter="" default="44100">
The mixing rate used for audio (in Hz). In general, it's better to not touch this and leave it to the host operating system.
</member>
+ <member name="audio/driver/mix_rate.web" type="int" setter="" getter="" default="0">
+ Safer override for [member audio/driver/mix_rate] in the Web platform. Here [code]0[/code] means "let the browser choose" (since some browsers do not like forcing the mix rate).
+ </member>
<member name="audio/driver/output_latency" type="int" setter="" getter="" default="15">
Output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware.
</member>
@@ -328,6 +331,9 @@
<member name="debug/gdscript/warnings/deprecated_keyword" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables warnings when deprecated keywords are used.
</member>
+ <member name="debug/gdscript/warnings/empty_file" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], enables warnings when an empty file is parsed.
+ </member>
<member name="debug/gdscript/warnings/enable" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables specific GDScript warnings (see [code]debug/gdscript/warnings/*[/code] settings). If [code]false[/code], disables all GDScript warnings.
</member>
@@ -426,7 +432,7 @@
<member name="debug/settings/stdout/print_gpu_profile" type="bool" setter="" getter="" default="false">
</member>
<member name="debug/settings/stdout/verbose_stdout" type="bool" setter="" getter="" default="false">
- Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc.
+ Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the [code]--verbose[/code] or [code]-v[/code] command line argument, even on an exported project. See also [method OS.is_stdout_verbose] and [method @GlobalScope.print_verbose].
</member>
<member name="debug/settings/visual_script/max_call_stack" type="int" setter="" getter="" default="1024">
Maximum call stack in visual scripting, to avoid infinite recursion.
@@ -625,19 +631,19 @@
</member>
<member name="input/ui_text_backspace_all_to_left" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_backspace_all_to_left.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_backspace_all_to_left.macos" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_backspace_word" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_backspace_word.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_backspace_word.macos" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_caret_document_end" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_caret_document_end.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_caret_document_end.macos" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_caret_document_start" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_caret_document_start.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_caret_document_start.macos" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_caret_down" type="Dictionary" setter="" getter="">
</member>
@@ -645,11 +651,11 @@
</member>
<member name="input/ui_text_caret_line_end" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_caret_line_end.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_caret_line_end.macos" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_caret_line_start" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_caret_line_start.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_caret_line_start.macos" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_caret_page_down" type="Dictionary" setter="" getter="">
</member>
@@ -661,11 +667,11 @@
</member>
<member name="input/ui_text_caret_word_left" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_caret_word_left.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_caret_word_left.macos" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_caret_word_right" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_caret_word_right.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_caret_word_right.macos" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_completion_accept" type="Dictionary" setter="" getter="">
</member>
@@ -679,11 +685,11 @@
</member>
<member name="input/ui_text_delete_all_to_right" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_delete_all_to_right.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_delete_all_to_right.macos" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_delete_word" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_delete_word.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_delete_word.macos" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_indent" type="Dictionary" setter="" getter="">
</member>
@@ -695,11 +701,11 @@
</member>
<member name="input/ui_text_scroll_down" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_scroll_down.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_scroll_down.macos" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_scroll_up" type="Dictionary" setter="" getter="">
</member>
- <member name="input/ui_text_scroll_up.OSX" type="Dictionary" setter="" getter="">
+ <member name="input/ui_text_scroll_up.macos" type="Dictionary" setter="" getter="">
</member>
<member name="input/ui_text_select_all" type="Dictionary" setter="" getter="">
</member>
@@ -726,7 +732,7 @@
<member name="input_devices/pen_tablet/driver" type="String" setter="" getter="">
Specifies the tablet driver to use. If left empty, the default driver will be used.
</member>
- <member name="input_devices/pen_tablet/driver.Windows" type="String" setter="" getter="">
+ <member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter="">
Override for [member input_devices/pen_tablet/driver] on Windows.
</member>
<member name="input_devices/pointing/emulate_mouse_from_touch" type="bool" setter="" getter="" default="true">
@@ -1473,6 +1479,9 @@
</member>
<member name="rendering/2d/snap/snap_2d_vertices_to_pixel" type="bool" setter="" getter="" default="false">
</member>
+ <member name="rendering/3d/viewport/scale" type="int" setter="" getter="" default="0">
+ Scale the 3D render buffer based on the viewport size. The smaller the faster 3D rendering is performed but at the cost of quality.
+ </member>
<member name="rendering/anti_aliasing/quality/msaa" type="int" setter="" getter="" default="0">
Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware.
</member>
@@ -1769,6 +1778,4 @@
If [code]true[/code], XR support is enabled in Godot, this ensures required shaders are compiled.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/PropertyTweener.xml b/doc/classes/PropertyTweener.xml
index 7914b26676..71f56690d5 100644
--- a/doc/classes/PropertyTweener.xml
+++ b/doc/classes/PropertyTweener.xml
@@ -63,6 +63,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ProxyTexture.xml b/doc/classes/ProxyTexture.xml
index 4f25fbcdf9..09a9efaa7a 100644
--- a/doc/classes/ProxyTexture.xml
+++ b/doc/classes/ProxyTexture.xml
@@ -6,12 +6,8 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="base" type="Texture2D" setter="set_base" getter="get_base">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml
index 4209e3db14..da7e74537a 100644
--- a/doc/classes/QuadMesh.xml
+++ b/doc/classes/QuadMesh.xml
@@ -10,8 +10,6 @@
<link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
<link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="center_offset" type="Vector3" setter="set_center_offset" getter="get_center_offset" default="Vector3(0, 0, 0)">
Offset of the generated Quad. Useful for particles.
@@ -20,6 +18,4 @@
Size on the X and Y axes.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml
index 720188f67e..7858ac732b 100644
--- a/doc/classes/Quaternion.xml
+++ b/doc/classes/Quaternion.xml
@@ -135,6 +135,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Quaternion" />
<description>
</description>
@@ -189,6 +194,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Quaternion" />
<description>
</description>
diff --git a/doc/classes/RDAttachmentFormat.xml b/doc/classes/RDAttachmentFormat.xml
index b73377bf77..0dea57b4ce 100644
--- a/doc/classes/RDAttachmentFormat.xml
+++ b/doc/classes/RDAttachmentFormat.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="format" type="int" setter="set_format" getter="get_format" enum="RenderingDevice.DataFormat" default="36">
</member>
@@ -16,6 +14,4 @@
<member name="usage_flags" type="int" setter="set_usage_flags" getter="get_usage_flags" default="0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDFramebufferPass.xml b/doc/classes/RDFramebufferPass.xml
index c26c41f93f..4469a5d447 100644
--- a/doc/classes/RDFramebufferPass.xml
+++ b/doc/classes/RDFramebufferPass.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="color_attachments" type="PackedInt32Array" setter="set_color_attachments" getter="get_color_attachments" default="PackedInt32Array()">
Color attachments in order starting from 0. If this attachment is not used by the shader, pass ATTACHMENT_UNUSED to skip.
diff --git a/doc/classes/RDPipelineColorBlendState.xml b/doc/classes/RDPipelineColorBlendState.xml
index b672a053c7..6c740fb672 100644
--- a/doc/classes/RDPipelineColorBlendState.xml
+++ b/doc/classes/RDPipelineColorBlendState.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="attachments" type="RDPipelineColorBlendStateAttachment[]" setter="set_attachments" getter="get_attachments" default="[]">
</member>
@@ -18,6 +16,4 @@
<member name="logic_op" type="int" setter="set_logic_op" getter="get_logic_op" enum="RenderingDevice.LogicOperation" default="0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDPipelineColorBlendStateAttachment.xml b/doc/classes/RDPipelineColorBlendStateAttachment.xml
index 30430d6670..c81da31367 100644
--- a/doc/classes/RDPipelineColorBlendStateAttachment.xml
+++ b/doc/classes/RDPipelineColorBlendStateAttachment.xml
@@ -37,6 +37,4 @@
<member name="write_r" type="bool" setter="set_write_r" getter="get_write_r" default="true">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDPipelineDepthStencilState.xml b/doc/classes/RDPipelineDepthStencilState.xml
index 76e0506bca..678b576dea 100644
--- a/doc/classes/RDPipelineDepthStencilState.xml
+++ b/doc/classes/RDPipelineDepthStencilState.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="back_op_compare" type="int" setter="set_back_op_compare" getter="get_back_op_compare" enum="RenderingDevice.CompareOperator" default="7">
</member>
@@ -52,6 +50,4 @@
<member name="front_op_write_mask" type="int" setter="set_front_op_write_mask" getter="get_front_op_write_mask" default="0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDPipelineMultisampleState.xml b/doc/classes/RDPipelineMultisampleState.xml
index b4345f1f8b..fc9b617956 100644
--- a/doc/classes/RDPipelineMultisampleState.xml
+++ b/doc/classes/RDPipelineMultisampleState.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="enable_alpha_to_coverage" type="bool" setter="set_enable_alpha_to_coverage" getter="get_enable_alpha_to_coverage" default="false">
</member>
@@ -22,6 +20,4 @@
<member name="sample_masks" type="int[]" setter="set_sample_masks" getter="get_sample_masks" default="[]">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDPipelineRasterizationState.xml b/doc/classes/RDPipelineRasterizationState.xml
index 3f8c50cf42..54a6923f87 100644
--- a/doc/classes/RDPipelineRasterizationState.xml
+++ b/doc/classes/RDPipelineRasterizationState.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="RenderingDevice.PolygonCullMode" default="0">
</member>
@@ -32,6 +30,4 @@
<member name="wireframe" type="bool" setter="set_wireframe" getter="get_wireframe" default="false">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDPipelineSpecializationConstant.xml b/doc/classes/RDPipelineSpecializationConstant.xml
index 4d9481b846..301a860f26 100644
--- a/doc/classes/RDPipelineSpecializationConstant.xml
+++ b/doc/classes/RDPipelineSpecializationConstant.xml
@@ -6,14 +6,10 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="constant_id" type="int" setter="set_constant_id" getter="get_constant_id" default="0">
</member>
<member name="value" type="Variant" setter="set_value" getter="get_value">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDSamplerState.xml b/doc/classes/RDSamplerState.xml
index 9a9d55948c..259bf159a3 100644
--- a/doc/classes/RDSamplerState.xml
+++ b/doc/classes/RDSamplerState.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="anisotropy_max" type="float" setter="set_anisotropy_max" getter="get_anisotropy_max" default="1.0">
</member>
@@ -40,6 +38,4 @@
<member name="use_anisotropy" type="bool" setter="set_use_anisotropy" getter="get_use_anisotropy" default="false">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDShaderFile.xml b/doc/classes/RDShaderFile.xml
index 22fcf9867c..c46ab55b57 100644
--- a/doc/classes/RDShaderFile.xml
+++ b/doc/classes/RDShaderFile.xml
@@ -30,6 +30,4 @@
<member name="base_error" type="String" setter="set_base_error" getter="get_base_error" default="&quot;&quot;">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDShaderSPIRV.xml b/doc/classes/RDShaderSPIRV.xml
index 20de8230aa..434b09b188 100644
--- a/doc/classes/RDShaderSPIRV.xml
+++ b/doc/classes/RDShaderSPIRV.xml
@@ -56,6 +56,4 @@
<member name="compile_error_vertex" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default="&quot;&quot;">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDShaderSource.xml b/doc/classes/RDShaderSource.xml
index 2d37ce37f2..4788bca7f4 100644
--- a/doc/classes/RDShaderSource.xml
+++ b/doc/classes/RDShaderSource.xml
@@ -35,6 +35,4 @@
<member name="source_vertex" type="String" setter="set_stage_source" getter="get_stage_source" default="&quot;&quot;">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDTextureFormat.xml b/doc/classes/RDTextureFormat.xml
index 2588dcfc40..e4a6df199f 100644
--- a/doc/classes/RDTextureFormat.xml
+++ b/doc/classes/RDTextureFormat.xml
@@ -40,6 +40,4 @@
<member name="width" type="int" setter="set_width" getter="get_width" default="1">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDTextureView.xml b/doc/classes/RDTextureView.xml
index db140ae775..441d1f4079 100644
--- a/doc/classes/RDTextureView.xml
+++ b/doc/classes/RDTextureView.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="format_override" type="int" setter="set_format_override" getter="get_format_override" enum="RenderingDevice.DataFormat" default="226">
</member>
@@ -20,6 +18,4 @@
<member name="swizzle_r" type="int" setter="set_swizzle_r" getter="get_swizzle_r" enum="RenderingDevice.TextureSwizzle" default="3">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDUniform.xml b/doc/classes/RDUniform.xml
index 93adecc7de..4de90aa3dc 100644
--- a/doc/classes/RDUniform.xml
+++ b/doc/classes/RDUniform.xml
@@ -30,6 +30,4 @@
<member name="uniform_type" type="int" setter="set_uniform_type" getter="get_uniform_type" enum="RenderingDevice.UniformType" default="3">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RDVertexAttribute.xml b/doc/classes/RDVertexAttribute.xml
index 3499918cc8..17a55260c7 100644
--- a/doc/classes/RDVertexAttribute.xml
+++ b/doc/classes/RDVertexAttribute.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="format" type="int" setter="set_format" getter="get_format" enum="RenderingDevice.DataFormat" default="226">
</member>
@@ -20,6 +18,4 @@
<member name="stride" type="int" setter="set_stride" getter="get_stride" default="0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml
index ddd30dbc82..b4ba74f7e5 100644
--- a/doc/classes/RID.xml
+++ b/doc/classes/RID.xml
@@ -30,6 +30,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="RID" />
<description>
</description>
@@ -48,6 +53,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="RID" />
<description>
</description>
@@ -65,6 +75,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index 2cf3cbb83d..c011755df1 100644
--- a/doc/classes/RandomNumberGenerator.xml
+++ b/doc/classes/RandomNumberGenerator.xml
@@ -4,7 +4,7 @@
A class for generating pseudo-random numbers.
</brief_description>
<description>
- RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses [url=http://www.pcg-random.org/]PCG32[/url].
+ RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses [url=https://www.pcg-random.org/]PCG32[/url].
[b]Note:[/b] The underlying algorithm is an implementation detail. As a result, it should not be depended upon for reproducible random streams across Godot versions.
To generate a random float number (within a given range) based on a time-dependant seed:
[codeblock]
@@ -86,6 +86,4 @@
[b]Note:[/b] Do not set state to arbitrary values, since the random number generator requires the state to have certain qualities to behave properly. It should only be set to values that came from the state property itself. To initialize the random number generator with arbitrary input, use [member seed] instead.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml
index 30b915b437..2926f93c8a 100644
--- a/doc/classes/Range.xml
+++ b/doc/classes/Range.xml
@@ -68,6 +68,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml
index 1d32db8078..ce5d48cfa4 100644
--- a/doc/classes/RayCast2D.xml
+++ b/doc/classes/RayCast2D.xml
@@ -122,6 +122,4 @@
The ray's destination point, relative to the RayCast's [code]position[/code].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml
index 8628ab7dac..c7253e81c4 100644
--- a/doc/classes/RayCast3D.xml
+++ b/doc/classes/RayCast3D.xml
@@ -131,6 +131,4 @@
The ray's destination point, relative to the RayCast's [code]position[/code].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index e6c8ff86b6..e585224818 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -78,6 +78,12 @@
Returns the area of the [Rect2].
</description>
</method>
+ <method name="get_center" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the center of the [Rect2], which is equal to [member position] + ([member size] / 2).
+ </description>
+ </method>
<method name="grow" qualifiers="const">
<return type="Rect2" />
<argument index="0" name="amount" type="float" />
@@ -149,6 +155,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Rect2" />
<description>
</description>
@@ -161,6 +172,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Rect2" />
<description>
</description>
@@ -178,6 +194,4 @@
If the size is negative, you can use [method abs] to fix it.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index a75c31a007..2f6f4de66d 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -76,6 +76,13 @@
Returns the area of the [Rect2i].
</description>
</method>
+ <method name="get_center" qualifiers="const">
+ <return type="Vector2i" />
+ <description>
+ Returns the center of the [Rect2i], which is equal to [member position] + ([member size] / 2).
+ If [member size] is an odd number, the returned center value will be rounded towards [member position].
+ </description>
+ </method>
<method name="grow" qualifiers="const">
<return type="Rect2i" />
<argument index="0" name="amount" type="int" />
@@ -139,12 +146,22 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Rect2i" />
<description>
</description>
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Rect2i" />
<description>
</description>
@@ -162,6 +179,4 @@
If the size is negative, you can use [method abs] to fix it.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml
index f2795ae4a1..add8da181a 100644
--- a/doc/classes/RectangleShape2D.xml
+++ b/doc/classes/RectangleShape2D.xml
@@ -10,13 +10,9 @@
<link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link>
<link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(20, 20)">
The rectangle's width and height.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RefCounted.xml b/doc/classes/RefCounted.xml
index bf52c34777..5f18ccc14d 100644
--- a/doc/classes/RefCounted.xml
+++ b/doc/classes/RefCounted.xml
@@ -35,6 +35,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml
index df9a6f0a46..1db6879b45 100644
--- a/doc/classes/ReferenceRect.xml
+++ b/doc/classes/ReferenceRect.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" default="Color(1, 0, 0, 1)">
Sets the border [Color] of the [ReferenceRect].
@@ -21,6 +19,4 @@
If set to [code]true[/code], the [ReferenceRect] will only be visible while in editor. Otherwise, [ReferenceRect] will be visible in game.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index db01faced8..7f2bd118d6 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -10,8 +10,6 @@
<tutorials>
<link title="Reflection probes">https://docs.godotengine.org/en/latest/tutorials/3d/reflection_probes.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="ambient_color" type="Color" setter="set_ambient_color" getter="get_ambient_color" default="Color(0, 0, 0, 1)">
</member>
diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml
index 613726b555..c9be26a985 100644
--- a/doc/classes/RemoteTransform2D.xml
+++ b/doc/classes/RemoteTransform2D.xml
@@ -34,6 +34,4 @@
If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RemoteTransform3D.xml b/doc/classes/RemoteTransform3D.xml
index cc19d5c25d..de727e719d 100644
--- a/doc/classes/RemoteTransform3D.xml
+++ b/doc/classes/RemoteTransform3D.xml
@@ -34,6 +34,4 @@
If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
index 24f7f4274e..428fa2575c 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -359,6 +359,14 @@
<description>
</description>
</method>
+ <method name="get_driver_resource">
+ <return type="int" />
+ <argument index="0" name="resource" type="int" enum="RenderingDevice.DriverResource" />
+ <argument index="1" name="rid" type="RID" />
+ <argument index="2" name="index" type="int" />
+ <description>
+ </description>
+ </method>
<method name="get_frame_delay" qualifiers="const">
<return type="int" />
<description>
@@ -646,6 +654,32 @@
</constant>
<constant name="BARRIER_MASK_NO_BARRIER" value="8">
</constant>
+ <constant name="DRIVER_RESOURCE_VULKAN_DEVICE" value="0" enum="DriverResource">
+ </constant>
+ <constant name="DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE" value="1" enum="DriverResource">
+ </constant>
+ <constant name="DRIVER_RESOURCE_VULKAN_INSTANCE" value="2" enum="DriverResource">
+ </constant>
+ <constant name="DRIVER_RESOURCE_VULKAN_QUEUE" value="3" enum="DriverResource">
+ </constant>
+ <constant name="DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX" value="4" enum="DriverResource">
+ </constant>
+ <constant name="DRIVER_RESOURCE_VULKAN_IMAGE" value="5" enum="DriverResource">
+ </constant>
+ <constant name="DRIVER_RESOURCE_VULKAN_IMAGE_VIEW" value="6" enum="DriverResource">
+ </constant>
+ <constant name="DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT" value="7" enum="DriverResource">
+ </constant>
+ <constant name="DRIVER_RESOURCE_VULKAN_SAMPLER" value="8" enum="DriverResource">
+ </constant>
+ <constant name="DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET" value="9" enum="DriverResource">
+ </constant>
+ <constant name="DRIVER_RESOURCE_VULKAN_BUFFER" value="10" enum="DriverResource">
+ </constant>
+ <constant name="DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE" value="11" enum="DriverResource">
+ </constant>
+ <constant name="DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE" value="12" enum="DriverResource">
+ </constant>
<constant name="DATA_FORMAT_R4G4_UNORM_PACK8" value="0" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_R4G4B4A4_UNORM_PACK16" value="1" enum="DataFormat">
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index df8bfb7e34..b5be04fb01 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -1156,6 +1156,11 @@
<description>
</description>
</method>
+ <method name="get_rendering_device" qualifiers="const">
+ <return type="RenderingDevice" />
+ <description>
+ </description>
+ </method>
<method name="get_rendering_info">
<return type="int" />
<argument index="0" name="info" type="int" enum="RenderingServer.RenderingInfo" />
@@ -3082,6 +3087,14 @@
If [code]true[/code], render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the [code]SCREEN_TEXTURE[/code]. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size.
</description>
</method>
+ <method name="viewport_set_scale_3d">
+ <return type="void" />
+ <argument index="0" name="viewport" type="RID" />
+ <argument index="1" name="scale" type="int" enum="RenderingServer.ViewportScale3D" />
+ <description>
+ Sets the scale at which we render 3D contents.
+ </description>
+ </method>
<method name="viewport_set_scenario">
<return type="void" />
<argument index="0" name="viewport" type="RID" />
@@ -3788,21 +3801,18 @@
<constant name="VIEWPORT_SDF_SCALE_MAX" value="3" enum="ViewportSDFScale">
</constant>
<constant name="VIEWPORT_MSAA_DISABLED" value="0" enum="ViewportMSAA">
- Multisample antialiasing is disabled.
+ Multisample antialiasing for 3D is disabled. This is the default value, and also the fastest setting.
</constant>
<constant name="VIEWPORT_MSAA_2X" value="1" enum="ViewportMSAA">
- Multisample antialiasing uses 2 samples per pixel.
+ Multisample antialiasing uses 2 samples per pixel for 3D. This has a moderate impact on performance.
</constant>
<constant name="VIEWPORT_MSAA_4X" value="2" enum="ViewportMSAA">
- Multisample antialiasing uses 4 samples per pixel.
+ Multisample antialiasing uses 4 samples per pixel for 3D. This has a high impact on performance.
</constant>
<constant name="VIEWPORT_MSAA_8X" value="3" enum="ViewportMSAA">
- Multisample antialiasing uses 8 samples per pixel.
- </constant>
- <constant name="VIEWPORT_MSAA_16X" value="4" enum="ViewportMSAA">
- Multisample antialiasing uses 16 samples per pixel.
+ Multisample antialiasing uses 8 samples per pixel for 3D. This has a very high impact on performance. Likely unsupported on low-end and older hardware.
</constant>
- <constant name="VIEWPORT_MSAA_MAX" value="5" enum="ViewportMSAA">
+ <constant name="VIEWPORT_MSAA_MAX" value="4" enum="ViewportMSAA">
</constant>
<constant name="VIEWPORT_SCREEN_SPACE_AA_DISABLED" value="0" enum="ViewportScreenSpaceAA">
</constant>
@@ -3896,6 +3906,16 @@
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="23" enum="ViewportDebugDraw">
</constant>
+ <constant name="VIEWPORT_SCALE_3D_DISABLED" value="0" enum="ViewportScale3D">
+ </constant>
+ <constant name="VIEWPORT_SCALE_3D_75_PERCENT" value="1" enum="ViewportScale3D">
+ </constant>
+ <constant name="VIEWPORT_SCALE_3D_50_PERCENT" value="2" enum="ViewportScale3D">
+ </constant>
+ <constant name="VIEWPORT_SCALE_3D_33_PERCENT" value="3" enum="ViewportScale3D">
+ </constant>
+ <constant name="VIEWPORT_SCALE_3D_25_PERCENT" value="4" enum="ViewportScale3D">
+ </constant>
<constant name="SKY_MODE_AUTOMATIC" value="0" enum="SkyMode">
</constant>
<constant name="SKY_MODE_QUALITY" value="1" enum="SkyMode">
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 701ecf815c..45b68f342c 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -12,17 +12,12 @@
<link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html</link>
</tutorials>
<methods>
- <method name="_setup_local_to_scene" qualifiers="virtual">
- <return type="void" />
- <description>
- Virtual function which can be overridden to customize the behavior value of [method setup_local_to_scene].
- </description>
- </method>
<method name="duplicate" qualifiers="const">
<return type="Resource" />
<argument index="0" name="subresources" type="bool" default="false" />
<description>
- Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources.
+ Duplicates the resource, returning a new resource with the exported members copied. [b]Note:[/b] To duplicate the resource the constructor is called without arguments. This method will error when the constructor doesn't have default values.
+ By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources.
[b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.
[b]Note:[/b] When duplicating a resource, only [code]export[/code]ed properties are copied. Other properties will be set to their default value in the new resource.
</description>
@@ -54,7 +49,7 @@
<method name="setup_local_to_scene">
<return type="void" />
<description>
- This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by overriding [method _setup_local_to_scene] from script.
+ This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by connecting [signal setup_local_to_scene_requested] from script.
For most resources, this method performs no base logic. [ViewportTexture] performs custom logic to properly set the proxy texture and flags in the local viewport.
</description>
</method>
@@ -84,7 +79,9 @@
[b]Note:[/b] This signal is not emitted automatically for custom resources, which means that you need to create a setter and emit the signal yourself.
</description>
</signal>
+ <signal name="setup_local_to_scene_requested">
+ <description>
+ </description>
+ </signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index bce5785cc1..0c2bb26c02 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -11,22 +11,28 @@
<tutorials>
</tutorials>
<methods>
- <method name="_get_dependencies" qualifiers="virtual">
- <return type="void" />
+ <method name="_exists" qualifiers="virtual const">
+ <return type="bool" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_dependencies" qualifiers="virtual const">
+ <return type="PackedStringArray" />
<argument index="0" name="path" type="String" />
- <argument index="1" name="add_types" type="String" />
+ <argument index="1" name="add_types" type="bool" />
<description>
If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency.
[b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them.
</description>
</method>
- <method name="_get_recognized_extensions" qualifiers="virtual">
+ <method name="_get_recognized_extensions" qualifiers="virtual const">
<return type="PackedStringArray" />
<description>
Gets the list of extensions for files this loader is able to read.
</description>
</method>
- <method name="_get_resource_type" qualifiers="virtual">
+ <method name="_get_resource_type" qualifiers="virtual const">
<return type="String" />
<argument index="0" name="path" type="String" />
<description>
@@ -34,15 +40,21 @@
[b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them.
</description>
</method>
- <method name="_handles_type" qualifiers="virtual">
+ <method name="_get_resource_uid" qualifiers="virtual const">
+ <return type="int" />
+ <argument index="0" name="path" type="String" />
+ <description>
+ </description>
+ </method>
+ <method name="_handles_type" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="typename" type="StringName" />
+ <argument index="0" name="type" type="StringName" />
<description>
Tells which resource class this loader can load.
[b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just handle [code]"Resource"[/code] for them.
</description>
</method>
- <method name="_load" qualifiers="virtual">
+ <method name="_load" qualifiers="virtual const">
<return type="Variant" />
<argument index="0" name="path" type="String" />
<argument index="1" name="original_path" type="String" />
@@ -53,10 +65,10 @@
The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
</description>
</method>
- <method name="_rename_dependencies" qualifiers="virtual">
+ <method name="_rename_dependencies" qualifiers="virtual const">
<return type="int" />
<argument index="0" name="path" type="String" />
- <argument index="1" name="renames" type="String" />
+ <argument index="1" name="renames" type="Dictionary" />
<description>
If implemented, renames dependencies within the given resource and saves it. [code]renames[/code] is a dictionary [code]{ String =&gt; String }[/code] mapping old dependency paths to new paths.
Returns [constant OK] on success, or an [enum Error] constant in case of failure.
diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml
index ef9eebc953..8d48de9378 100644
--- a/doc/classes/ResourceFormatSaver.xml
+++ b/doc/classes/ResourceFormatSaver.xml
@@ -10,14 +10,14 @@
<tutorials>
</tutorials>
<methods>
- <method name="_get_recognized_extensions" qualifiers="virtual">
+ <method name="_get_recognized_extensions" qualifiers="virtual const">
<return type="PackedStringArray" />
<argument index="0" name="resource" type="Resource" />
<description>
Returns the list of extensions available for saving the resource object, provided it is recognized (see [method _recognize]).
</description>
</method>
- <method name="_recognize" qualifiers="virtual">
+ <method name="_recognize" qualifiers="virtual const">
<return type="bool" />
<argument index="0" name="resource" type="Resource" />
<description>
@@ -35,6 +35,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml
index 03d47ee518..9f551ad1d2 100644
--- a/doc/classes/ResourceImporter.xml
+++ b/doc/classes/ResourceImporter.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link>
</tutorials>
- <methods>
- </methods>
<constants>
<constant name="IMPORT_ORDER_DEFAULT" value="0" enum="ImportOrder">
The default import order.
diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml
index 8ac8717581..565578cb22 100644
--- a/doc/classes/ResourcePreloader.xml
+++ b/doc/classes/ResourcePreloader.xml
@@ -54,6 +54,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RibbonTrailMesh.xml b/doc/classes/RibbonTrailMesh.xml
index 771f2e444b..c2e9c14bab 100644
--- a/doc/classes/RibbonTrailMesh.xml
+++ b/doc/classes/RibbonTrailMesh.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="curve" type="Curve" setter="set_curve" getter="get_curve">
</member>
diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml
index 142afbb860..cf4b4f4a48 100644
--- a/doc/classes/RichTextEffect.xml
+++ b/doc/classes/RichTextEffect.xml
@@ -23,7 +23,7 @@
<link title="RichTextEffect test project (third-party)">https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link>
</tutorials>
<methods>
- <method name="_process_custom_fx" qualifiers="virtual">
+ <method name="_process_custom_fx" qualifiers="virtual const">
<return type="bool" />
<argument index="0" name="char_fx" type="CharFXTransform" />
<description>
@@ -31,6 +31,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 7bbcc5e0b5..50db1dc122 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -5,8 +5,9 @@
</brief_description>
<description>
Rich text can contain custom text, fonts, images and some basic formatting. The label manages these as an internal tag stack. It also adapts itself to given width/heights.
- [b]Note:[/b] Assignments to [member bbcode_text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member bbcode_text] will erase previous edits made from other manual sources such as [method append_bbcode] and the [code]push_*[/code] / [method pop] methods.
+ [b]Note:[/b] Assignments to [member text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member text] will erase previous edits made from other manual sources such as [method append_text] and the [code]push_*[/code] / [method pop] methods.
[b]Note:[/b] RichTextLabel doesn't support entangled BBCode tags. For example, instead of using [code][b]bold[i]bold italic[/b]italic[/i][/code], use [code][b]bold[i]bold italic[/i][/b][i]italic[/i][/code].
+ [b]Note:[/b] [code]push_*/pop[/code] functions won't affect BBCode.
[b]Note:[/b] Unlike [Label], RichTextLabel doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code][center][/code] tag as follows: [code][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content_height] property.
</description>
<tutorials>
@@ -34,18 +35,18 @@
Adds raw non-BBCode-parsed text to the tag stack.
</description>
</method>
- <method name="append_bbcode">
+ <method name="append_text">
<return type="int" enum="Error" />
<argument index="0" name="bbcode" type="String" />
<description>
Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns the result of the parsing, [constant OK] if successful.
- [b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [method append_bbcode] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [member bbcode_text] instead of using [method append_bbcode].
+ [b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [method append_text] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [member text] instead of using [method append_text].
</description>
</method>
<method name="clear">
<return type="void" />
<description>
- Clears the tag stack and sets [member bbcode_text] to an empty string.
+ Clears the tag stack and sets [member text] to an empty string.
</description>
</method>
<method name="get_content_height" qualifiers="const">
@@ -66,6 +67,12 @@
Returns the total number of paragraphs (newlines or [code]p[/code] tags in the tag stack's text tags). Considers wrapped text as one paragraph.
</description>
</method>
+ <method name="get_parsed_text" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the text without BBCode mark-up.
+ </description>
+ </method>
<method name="get_selected_text" qualifiers="const">
<return type="String" />
<description>
@@ -125,7 +132,7 @@
<return type="int" enum="Error" />
<argument index="0" name="bbcode" type="String" />
<description>
- The assignment version of [method append_bbcode]. Clears the tag stack and inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] successfully.
+ The assignment version of [method append_text]. Clears the tag stack and inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] successfully.
</description>
</method>
<method name="parse_expressions_for_values">
@@ -367,10 +374,6 @@
<member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode" default="false">
If [code]true[/code], the label uses BBCode formatting.
</member>
- <member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode" default="&quot;&quot;">
- The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.
- [b]Note:[/b] It is unadvised to use the [code]+=[/code] operator with [code]bbcode_text[/code] (e.g. [code]bbcode_text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call.
- </member>
<member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[]">
The currently installed custom effects. This is an array of [RichTextEffect]s.
To add a custom effect, it's more convenient to use [method install_effect].
@@ -412,8 +415,8 @@
The number of spaces associated with a single tab length. Does not affect [code]\t[/code] in text tags, only indent tags.
</member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
- The raw text of the label.
- When set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify [member bbcode_text].
+ The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.
+ [b]Note:[/b] If [member bbcode_enabled] is [code]true[/code], it is unadvised to use the [code]+=[/code] operator with [code]text[/code] (e.g. [code]text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_text] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call.
</member>
<member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
Base text writing direction.
@@ -555,7 +558,7 @@
<theme_item name="italics_font_size" data_type="font_size" type="int">
The font size used for italics text.
</theme_item>
- <theme_item name="line_separation" data_type="constant" type="int" default="1">
+ <theme_item name="line_separation" data_type="constant" type="int" default="0">
The vertical space between lines.
</theme_item>
<theme_item name="mono_font" data_type="font" type="Font">
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidDynamicBody2D.xml
index db16552db3..9baed392eb 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidDynamicBody2D.xml
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RigidBody2D" inherits="PhysicsBody2D" version="4.0">
+<class name="RigidDynamicBody2D" inherits="PhysicsBody2D" version="4.0">
<brief_description>
- A body that is controlled by the 2D physics engine.
+ Physics Body which is moved by 2D physics simulation. Useful for objects that have gravity and can be pushed by other objects.
</brief_description>
<description>
- This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties.
- A RigidBody2D has 4 behavior [member mode]s: Dynamic, Static, DynamicLocked, and Kinematic.
- [b]Note:[/b] You should not change a RigidBody2D's [code]position[/code] or [code]linear_velocity[/code] every frame or even very often. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state.
+ This node implements simulated 2D physics. You do not control a RigidDynamicBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties.
+ You can switch the body's behavior using [member lock_rotation], [member freeze], and [member freeze_mode].
+ [b]Note:[/b] You should not change a RigidDynamicBody2D's [code]position[/code] or [code]linear_velocity[/code] every frame or even very often. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state.
Please also keep in mind that physics bodies manage their own transform which overwrites the ones you set. So any direct or indirect transformation (including scaling of the node or its parent) will be visible in the editor only, and immediately reset at runtime.
If you need to override the default physics behavior or add a transformation at runtime, you can write a custom force integration. See [member custom_integrator].
- The center of mass is always located at the node's origin without taking into account the [CollisionShape2D] centroid offsets.
</description>
<tutorials>
<link title="2D Physics Platformer Demo">https://godotengine.org/asset-library/asset/119</link>
@@ -99,25 +98,42 @@
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping].
</member>
+ <member name="center_of_mass" type="Vector2" setter="set_center_of_mass" getter="get_center_of_mass" default="Vector2(0, 0)">
+ The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration.
+ When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed.
+ </member>
+ <member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidDynamicBody2D.CenterOfMassMode" default="0">
+ Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values.
+ </member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
- If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported].
+ If [code]true[/code], the body will emit signals when it collides with another RigidDynamicBody2D. See also [member contacts_reported].
</member>
<member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0">
The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code].
[b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end).
</member>
- <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidBody2D.CCDMode" default="0">
+ <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidDynamicBody2D.CCDMode" default="0">
Continuous collision detection mode.
Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See [enum CCDMode] for details.
</member>
<member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" default="false">
If [code]true[/code], internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the [method _integrate_forces] function.
</member>
+ <member name="freeze" type="bool" setter="set_freeze_enabled" getter="is_freeze_enabled" default="false">
+ If [code]true[/code], the body is frozen. Gravity and forces are not applied anymore.
+ See [member freeze_mode] to set the body's behavior when frozen.
+ For a body that is always frozen, use [StaticBody2D] or [AnimatableBody2D] instead.
+ </member>
+ <member name="freeze_mode" type="int" setter="set_freeze_mode" getter="get_freeze_mode" enum="RigidDynamicBody2D.FreezeMode" default="0">
+ The body's freeze mode. Can be used to set the body's behavior when [member freeze] is enabled. See [enum FreezeMode] for possible values.
+ For a body that is always frozen, use [StaticBody2D] or [AnimatableBody2D] instead.
+ </member>
<member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0">
Multiplies the gravity applied to the body. The body's gravity is calculated from the [b]Default Gravity[/b] value in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b] and/or any additional gravity vector applied by [Area2D]s.
</member>
- <member name="inertia" type="float" setter="set_inertia" getter="get_inertia">
- The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 inertia to return to automatically computing it.
+ <member name="inertia" type="float" setter="set_inertia" getter="get_inertia" default="0.0">
+ The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value.
+ If set to [code]0[/code], inertia is automatically computed (default value).
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0">
Damps the body's [member linear_velocity]. If [code]-1[/code], the body will use the [b]Default Linear Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b].
@@ -126,12 +142,12 @@
<member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2(0, 0)">
The body's linear velocity.
</member>
+ <member name="lock_rotation" type="bool" setter="set_lock_rotation_enabled" getter="is_lock_rotation_enabled" default="false">
+ If [code]true[/code], the body cannot rotate. Gravity and forces only apply linear movement.
+ </member>
<member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0">
The body's mass.
</member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody2D.Mode" default="0">
- The body's mode. See [enum Mode] for possible values.
- </member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
The physics material override for the body.
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
@@ -161,11 +177,11 @@
<argument index="2" name="body_shape" type="int" />
<argument index="3" name="local_shape" type="int" />
<description>
- Emitted when one of this RigidBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ Emitted when one of this RigidDynamicBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
[code]body_shape[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D].
+ [code]local_shape[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D].
</description>
</signal>
<signal name="body_shape_exited">
@@ -174,11 +190,11 @@
<argument index="2" name="body_shape" type="int" />
<argument index="3" name="local_shape" type="int" />
<description>
- Emitted when the collision between one of this RigidBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ Emitted when the collision between one of this RigidDynamicBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
[code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
[code]body_shape[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
- [code]local_shape[/code] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D].
+ [code]local_shape[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D].
</description>
</signal>
<signal name="sleeping_state_changed">
@@ -189,17 +205,17 @@
</signal>
</signals>
<constants>
- <constant name="MODE_DYNAMIC" value="0" enum="Mode">
- Dynamic body mode. This is the default mode of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
+ <constant name="FREEZE_MODE_STATIC" value="0" enum="FreezeMode">
+ Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path.
</constant>
- <constant name="MODE_STATIC" value="1" enum="Mode">
- Static body mode. The body behaves like a [StaticBody2D], and must be moved by code.
+ <constant name="FREEZE_MODE_KINEMATIC" value="1" enum="FreezeMode">
+ Kinematic body freeze mode. Similar to [constant FREEZE_MODE_STATIC], but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated.
</constant>
- <constant name="MODE_DYNAMIC_LOCKED" value="2" enum="Mode">
- Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate.
+ <constant name="CENTER_OF_MASS_MODE_AUTO" value="0" enum="CenterOfMassMode">
+ In this mode, the body's center of mass is calculated automatically based on its shapes.
</constant>
- <constant name="MODE_KINEMATIC" value="3" enum="Mode">
- Kinematic body mode. The body behaves like a [StaticBody2D] with [member StaticBody2D.kinematic_motion] enabled, and must be moved by user code.
+ <constant name="CENTER_OF_MASS_MODE_CUSTOM" value="1" enum="CenterOfMassMode">
+ In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position.
</constant>
<constant name="CCD_MODE_DISABLED" value="0" enum="CCDMode">
Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects.
diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidDynamicBody3D.xml
index f4299335bf..7d1c7fecfa 100644
--- a/doc/classes/RigidBody3D.xml
+++ b/doc/classes/RigidDynamicBody3D.xml
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RigidBody3D" inherits="PhysicsBody3D" version="4.0">
+<class name="RigidDynamicBody3D" inherits="PhysicsBody3D" version="4.0">
<brief_description>
- Physics Body whose position is determined through physics simulation in 3D space.
+ Physics Body which is moved by 3D physics simulation. Useful for objects that have gravity and can be pushed by other objects.
</brief_description>
<description>
- This is the node that implements full 3D physics. This means that you do not control a RigidBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc.
- A RigidBody3D has 4 behavior [member mode]s: Dynamic, Static, DynamicLocked, and Kinematic.
- [b]Note:[/b] Don't change a RigidBody3D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state.
+ This is the node that implements full 3D physics. This means that you do not control a RigidDynamicBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc.
+ You can switch the body's behavior using [member lock_rotation], [member freeze], and [member freeze_mode].
+ [b]Note:[/b] Don't change a RigidDynamicBody3D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state.
If you need to override the default physics behavior, you can write a custom force integration function. See [member custom_integrator].
- With Bullet physics (the default), the center of mass is the RigidBody3D center. With GodotPhysics, the center of mass is the average of the [CollisionShape3D] centers.
</description>
<tutorials>
<link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
@@ -80,7 +79,7 @@
<method name="get_inverse_inertia_tensor" qualifiers="const">
<return type="Basis" />
<description>
- Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidBody3D].
+ Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidDynamicBody3D].
</description>
</method>
<method name="set_axis_velocity">
@@ -93,17 +92,24 @@
</methods>
<members>
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0">
- Damps RigidBody3D's rotational forces.
+ Damps RigidDynamicBody3D's rotational forces.
See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping.
</member>
<member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3(0, 0, 0)">
- RigidBody3D's rotational velocity.
+ RigidDynamicBody3D's rotational velocity.
</member>
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping].
</member>
+ <member name="center_of_mass" type="Vector3" setter="set_center_of_mass" getter="get_center_of_mass" default="Vector3(0, 0, 0)">
+ The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration.
+ When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed.
+ </member>
+ <member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidDynamicBody3D.CenterOfMassMode" default="0">
+ Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values.
+ </member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
- If [code]true[/code], the RigidBody3D will emit signals when it collides with another RigidBody3D. See also [member contacts_reported].
+ If [code]true[/code], the RigidDynamicBody3D will emit signals when it collides with another RigidDynamicBody3D. See also [member contacts_reported].
</member>
<member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0">
The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code].
@@ -116,8 +122,21 @@
<member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" default="false">
If [code]true[/code], internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined.
</member>
+ <member name="freeze" type="bool" setter="set_freeze_enabled" getter="is_freeze_enabled" default="false">
+ If [code]true[/code], the body is frozen. Gravity and forces are not applied anymore.
+ See [member freeze_mode] to set the body's behavior when frozen.
+ For a body that is always frozen, use [StaticBody3D] or [AnimatableBody3D] instead.
+ </member>
+ <member name="freeze_mode" type="int" setter="set_freeze_mode" getter="get_freeze_mode" enum="RigidDynamicBody3D.FreezeMode" default="0">
+ The body's freeze mode. Can be used to set the body's behavior when [member freeze] is enabled. See [enum FreezeMode] for possible values.
+ For a body that is always frozen, use [StaticBody3D] or [AnimatableBody3D] instead.
+ </member>
<member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0">
- This is multiplied by the global 3D gravity setting found in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] to produce RigidBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
+ This is multiplied by the global 3D gravity setting found in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] to produce RigidDynamicBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
+ </member>
+ <member name="inertia" type="Vector3" setter="set_inertia" getter="get_inertia" default="Vector3(0, 0, 0)">
+ The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value.
+ If set to [code]Vector3.ZERO[/code], inertia is automatically computed (default value).
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0">
The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0, any linear damp derived from the world or areas will be overridden.
@@ -126,12 +145,12 @@
<member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)">
The body's linear velocity. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state.
</member>
+ <member name="lock_rotation" type="bool" setter="set_lock_rotation_enabled" getter="is_lock_rotation_enabled" default="false">
+ If [code]true[/code], the body cannot rotate. Gravity and forces only apply linear movement.
+ </member>
<member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0">
The body's mass.
</member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody3D.Mode" default="0">
- The body mode. See [enum Mode] for possible values.
- </member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
The physics material override for the body.
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
@@ -161,11 +180,11 @@
<argument index="2" name="body_shape" type="int" />
<argument index="3" name="local_shape" type="int" />
<description>
- Emitted when one of this RigidBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ Emitted when one of this RigidDynamicBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
[code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
[code]body_shape[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D].
+ [code]local_shape[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D].
[b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices.
</description>
</signal>
@@ -175,11 +194,11 @@
<argument index="2" name="body_shape" type="int" />
<argument index="3" name="local_shape" type="int" />
<description>
- Emitted when the collision between one of this RigidBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ Emitted when the collision between one of this RigidDynamicBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
[code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s.
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
[code]body_shape[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
- [code]local_shape[/code] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D].
+ [code]local_shape[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D].
[b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices.
</description>
</signal>
@@ -191,17 +210,17 @@
</signal>
</signals>
<constants>
- <constant name="MODE_DYNAMIC" value="0" enum="Mode">
- Dynamic body mode. This is the default mode of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
+ <constant name="FREEZE_MODE_STATIC" value="0" enum="FreezeMode">
+ Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path.
</constant>
- <constant name="MODE_STATIC" value="1" enum="Mode">
- Static body mode. The body behaves like a [StaticBody3D], and can only move by user code.
+ <constant name="FREEZE_MODE_KINEMATIC" value="1" enum="FreezeMode">
+ Kinematic body freeze mode. Similar to [constant FREEZE_MODE_STATIC], but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated.
</constant>
- <constant name="MODE_DYNAMIC_LOCKED" value="2" enum="Mode">
- Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate.
+ <constant name="CENTER_OF_MASS_MODE_AUTO" value="0" enum="CenterOfMassMode">
+ In this mode, the body's center of mass is calculated automatically based on its shapes.
</constant>
- <constant name="MODE_KINEMATIC" value="3" enum="Mode">
- Kinematic body mode. The body behaves like a [StaticBody3D] with [member StaticBody3D.kinematic_motion] enabled, and can only move by user code.
+ <constant name="CENTER_OF_MASS_MODE_CUSTOM" value="1" enum="CenterOfMassMode">
+ In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position.
</constant>
</constants>
</class>
diff --git a/doc/classes/RootMotionView.xml b/doc/classes/RootMotionView.xml
index e31ea9265e..5db13de44f 100644
--- a/doc/classes/RootMotionView.xml
+++ b/doc/classes/RootMotionView.xml
@@ -10,8 +10,6 @@
<tutorials>
<link title="Using AnimationTree - Root motion">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#root-motion</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="animation_path" type="NodePath" setter="set_animation_path" getter="get_animation_path">
Path to an [AnimationTree] node to use as a basis for root motion.
@@ -29,6 +27,4 @@
If [code]true[/code], the grid's points will all be on the same Y coordinate ([i]local[/i] Y = 0). If [code]false[/code], the points' original Y coordinate is preserved.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 59e3190213..8d7427611a 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -18,7 +18,7 @@
<argument index="0" name="group" type="StringName" />
<argument index="1" name="method" type="StringName" />
<description>
- Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call.
+ Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. This method is equivalent of calling [method call_group_flags] with [constant GROUP_CALL_DEFAULT] flag.
[b]Note:[/b] [method call_group] will always call methods with an one-frame delay, in a way similar to [method Object.call_deferred]. To call methods immediately, use [method call_group_flags] with the [constant GROUP_CALL_REALTIME] flag.
</description>
</method>
@@ -29,7 +29,9 @@
<argument index="2" name="method" type="StringName" />
<description>
Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [code]method[/code] by specifying them at the end of the method call.
- [b]Note:[/b] Group call flags are used to control the method calling behavior. If the [constant GROUP_CALL_REALTIME] flag is present in the [code]flags[/code] argument, methods will be called immediately. If this flag isn't present in [code]flags[/code], methods will be called with a one-frame delay in a way similar to [method call_group].
+ [codeblock]
+ get_tree().call_group_flags(SceneTree.GROUP_CALL_REALTIME | SceneTree.GROUP_CALL_REVERSE, "bases", "destroy") # Call the method immediately and in reverse order.
+ [/codeblock]
</description>
</method>
<method name="change_scene">
@@ -215,11 +217,11 @@
</member>
<member name="multiplayer_poll" type="bool" setter="set_multiplayer_poll_enabled" getter="is_multiplayer_poll_enabled" default="true">
If [code]true[/code] (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal process_frame].
- If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads.
+ If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs. This allows running RPCs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads.
</member>
<member name="paused" type="bool" setter="set_pause" getter="is_paused" default="false">
If [code]true[/code], the [SceneTree] is paused. Doing so will have the following behavior:
- - 2D and 3D physics will be stopped.
+ - 2D and 3D physics will be stopped. This includes signals and collision detection.
- [method Node._process], [method Node._physics_process] and [method Node._input] will not be called anymore in nodes.
</member>
<member name="root" type="Window" setter="" getter="get_root">
diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml
index 4eef754345..f97c5e42b5 100644
--- a/doc/classes/SceneTreeTimer.xml
+++ b/doc/classes/SceneTreeTimer.xml
@@ -25,8 +25,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="time_left" type="float" setter="set_time_left" getter="get_time_left">
The time remaining.
@@ -39,6 +37,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index 843d8ef9cb..b7a4f448b0 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -99,6 +99,4 @@
The script source code or an empty string if source code is not available. When set, does not reload the class implementation automatically.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml
index 189bfdc3b8..349adb9111 100644
--- a/doc/classes/ScriptCreateDialog.xml
+++ b/doc/classes/ScriptCreateDialog.xml
@@ -50,6 +50,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index 628be54e1d..faad8f8cae 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -79,6 +79,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml
index 0efcde5638..1e72fe9090 100644
--- a/doc/classes/ScriptEditorBase.xml
+++ b/doc/classes/ScriptEditorBase.xml
@@ -9,13 +9,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="_add_syntax_highlighter" qualifiers="virtual">
- <return type="void" />
- <argument index="0" name="highlighter" type="Object" />
- <description>
- Adds a [EditorSyntaxHighlighter] to the open script.
- </description>
- </method>
<method name="get_base_editor" qualifiers="const">
<return type="Control" />
<description>
@@ -71,6 +64,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml
index b1eb9c012b..1f1415bebe 100644
--- a/doc/classes/ScrollBar.xml
+++ b/doc/classes/ScrollBar.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step" default="-1.0">
Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [ScrollBar] is focused.
@@ -24,6 +22,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 953ab24748..1cf8c6cb54 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -69,8 +69,6 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
<theme_items>
<theme_item name="bg" data_type="style" type="StyleBox">
The background [StyleBox] of the [ScrollContainer].
diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml
index 341c5e9d20..799884257f 100644
--- a/doc/classes/SegmentShape2D.xml
+++ b/doc/classes/SegmentShape2D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="a" type="Vector2" setter="set_a" getter="get_a" default="Vector2(0, 0)">
The segment's first point position.
@@ -18,6 +16,4 @@
The segment's second point position.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml
index 7794161ac4..2f3fa021d4 100644
--- a/doc/classes/Semaphore.xml
+++ b/doc/classes/Semaphore.xml
@@ -29,6 +29,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SeparationRayShape2D.xml b/doc/classes/SeparationRayShape2D.xml
new file mode 100644
index 0000000000..ccb7a12882
--- /dev/null
+++ b/doc/classes/SeparationRayShape2D.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SeparationRayShape2D" inherits="Shape2D" version="4.0">
+ <brief_description>
+ Separation ray shape for 2D collisions.
+ </brief_description>
+ <description>
+ Separation ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="length" type="float" setter="set_length" getter="get_length" default="20.0">
+ The ray's length.
+ </member>
+ <member name="slide_on_slope" type="bool" setter="set_slide_on_slope" getter="get_slide_on_slope" default="false">
+ If [code]false[/code] (default), the shape always separates and returns a normal along its own direction.
+ If [code]true[/code], the shape can return the correct normal and separate in any direction, allowing sliding motion on slopes.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/SeparationRayShape3D.xml b/doc/classes/SeparationRayShape3D.xml
new file mode 100644
index 0000000000..877e8545eb
--- /dev/null
+++ b/doc/classes/SeparationRayShape3D.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SeparationRayShape3D" inherits="Shape3D" version="4.0">
+ <brief_description>
+ Separation ray shape for 3D collisions.
+ </brief_description>
+ <description>
+ Separation ray shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="length" type="float" setter="set_length" getter="get_length" default="1.0">
+ The ray's length.
+ </member>
+ <member name="slide_on_slope" type="bool" setter="set_slide_on_slope" getter="get_slide_on_slope" default="false">
+ If [code]false[/code] (default), the shape always separates and returns a normal along its own direction.
+ If [code]true[/code], the shape can return the correct normal and separate in any direction, allowing sliding motion on slopes.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Separator.xml b/doc/classes/Separator.xml
index ef79851aab..80310e912f 100644
--- a/doc/classes/Separator.xml
+++ b/doc/classes/Separator.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ShaderGlobalsOverride.xml b/doc/classes/ShaderGlobalsOverride.xml
index 2aa00aa5a9..babda1707e 100644
--- a/doc/classes/ShaderGlobalsOverride.xml
+++ b/doc/classes/ShaderGlobalsOverride.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml
index fe3ddc1b60..13f2e2fe5f 100644
--- a/doc/classes/ShaderMaterial.xml
+++ b/doc/classes/ShaderMaterial.xml
@@ -45,6 +45,4 @@
The [Shader] program used to render this material.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml
index c1191aa9de..04f91d19da 100644
--- a/doc/classes/Shape2D.xml
+++ b/doc/classes/Shape2D.xml
@@ -68,6 +68,4 @@
The shape's custom solver bias.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml
index 5fd16d8d36..96f8833486 100644
--- a/doc/classes/Shape3D.xml
+++ b/doc/classes/Shape3D.xml
@@ -23,6 +23,4 @@
Collision margins allow collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Shortcut.xml b/doc/classes/Shortcut.xml
index d9f7f98888..9fbe91f38b 100644
--- a/doc/classes/Shortcut.xml
+++ b/doc/classes/Shortcut.xml
@@ -36,6 +36,4 @@
Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent], including an [InputEventAction].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml
index 0e44abef42..f78266a20c 100644
--- a/doc/classes/Signal.xml
+++ b/doc/classes/Signal.xml
@@ -32,10 +32,16 @@
<method name="connect">
<return type="int" />
<argument index="0" name="callable" type="Callable" />
- <argument index="1" name="binds" type="Array" default="[]" />
- <argument index="2" name="flags" type="int" default="0" />
+ <argument index="1" name="flags" type="int" default="0" />
<description>
- Connects this signal to the specified [Callable], optionally providing binds and connection flags.
+ Connects this signal to the specified [Callable], optionally providing connection flags. You can provide additional arguments to the connected method call by using [method Callable.bind].
+ [codeblock]
+ for button in $Buttons.get_children():
+ button.pressed.connect(on_pressed.bind(button))
+
+ func on_pressed(button):
+ print(button.name, " was pressed")
+ [/codeblock]
</description>
</method>
<method name="disconnect">
@@ -89,17 +95,25 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Signal" />
<description>
</description>
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Signal" />
<description>
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml
index 828d24338b..7aa06985bf 100644
--- a/doc/classes/Skeleton2D.xml
+++ b/doc/classes/Skeleton2D.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Skeleton2D parents a hierarchy of [Bone2D] objects. It is a requirement of [Bone2D]. Skeleton2D holds a reference to the rest pose of its children and acts as a single point of access to its bones.
+ To setup different types of inverse kinematics for the given Skeleton2D, a [SkeletonModificationStack2D] should be created. They can be applied by creating the desired number of modifications, which can be done by increasing [member SkeletonModificationStack2D.modification_count].
</description>
<tutorials>
<link title="2D skeletons">https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link>
@@ -77,6 +78,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index 2f340adb9f..c2b514f232 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -216,7 +216,7 @@
<argument index="0" name="exception" type="RID" />
<description>
Adds a collision exception to the physical bone.
- Works just like the [RigidBody3D] node.
+ Works just like the [RigidDynamicBody3D] node.
</description>
</method>
<method name="physical_bones_remove_collision_exception">
@@ -224,7 +224,7 @@
<argument index="0" name="exception" type="RID" />
<description>
Removes a collision exception to the physical bone.
- Works just like the [RigidBody3D] node.
+ Works just like the [RigidDynamicBody3D] node.
</description>
</method>
<method name="physical_bones_start_simulation">
diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml
index 93cdd770cc..6673e0657c 100644
--- a/doc/classes/SkeletonIK3D.xml
+++ b/doc/classes/SkeletonIK3D.xml
@@ -52,6 +52,4 @@
<member name="use_magnet" type="bool" setter="set_use_magnet" getter="is_using_magnet" default="false">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification2D.xml b/doc/classes/SkeletonModification2D.xml
index cff55b6a17..815b97a271 100644
--- a/doc/classes/SkeletonModification2D.xml
+++ b/doc/classes/SkeletonModification2D.xml
@@ -82,6 +82,4 @@
The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only available in certain execution modes.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification2DCCDIK.xml b/doc/classes/SkeletonModification2DCCDIK.xml
index f876615de7..ab9a482609 100644
--- a/doc/classes/SkeletonModification2DCCDIK.xml
+++ b/doc/classes/SkeletonModification2DCCDIK.xml
@@ -130,6 +130,4 @@
The end position of the CCDIK chain. Typically, this should be a child of a [Bone2D] node attached to the final [Bone2D] in the CCDIK chain.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification2DFABRIK.xml b/doc/classes/SkeletonModification2DFABRIK.xml
index 314405498a..16c22a45d3 100644
--- a/doc/classes/SkeletonModification2DFABRIK.xml
+++ b/doc/classes/SkeletonModification2DFABRIK.xml
@@ -83,6 +83,4 @@
The NodePath to the node that is the target for the FABRIK modification. This node is what the FABRIK chain will attempt to rotate the bone chain to.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification2DJiggle.xml b/doc/classes/SkeletonModification2DJiggle.xml
index 8d3732e225..13dfbc0633 100644
--- a/doc/classes/SkeletonModification2DJiggle.xml
+++ b/doc/classes/SkeletonModification2DJiggle.xml
@@ -181,6 +181,4 @@
Whether the gravity vector, [member gravity], should be applied to the Jiggle joints, assuming they are not overriding the default settings.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification2DLookAt.xml b/doc/classes/SkeletonModification2DLookAt.xml
index 998a897d20..90b727e194 100644
--- a/doc/classes/SkeletonModification2DLookAt.xml
+++ b/doc/classes/SkeletonModification2DLookAt.xml
@@ -87,6 +87,4 @@
The NodePath to the node that is the target for the LookAt modification. This node is what the modification will rotate the [Bone2D] to.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification2DPhysicalBones.xml b/doc/classes/SkeletonModification2DPhysicalBones.xml
index e6bcb3c9d7..44572f2c67 100644
--- a/doc/classes/SkeletonModification2DPhysicalBones.xml
+++ b/doc/classes/SkeletonModification2DPhysicalBones.xml
@@ -53,6 +53,4 @@
The amount of [PhysicalBone2D] nodes linked in this modification.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification2DStackHolder.xml b/doc/classes/SkeletonModification2DStackHolder.xml
index e5d9f2194a..35ab52ea99 100644
--- a/doc/classes/SkeletonModification2DStackHolder.xml
+++ b/doc/classes/SkeletonModification2DStackHolder.xml
@@ -24,6 +24,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification2DTwoBoneIK.xml b/doc/classes/SkeletonModification2DTwoBoneIK.xml
index 25ee981d5d..b7a2faedbb 100644
--- a/doc/classes/SkeletonModification2DTwoBoneIK.xml
+++ b/doc/classes/SkeletonModification2DTwoBoneIK.xml
@@ -77,6 +77,4 @@
The NodePath to the node that is the target for the TwoBoneIK modification. This node is what the modification will use when bending the [Bone2D] nodes.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification3D.xml b/doc/classes/SkeletonModification3D.xml
index 48b8a905b9..c544473163 100644
--- a/doc/classes/SkeletonModification3D.xml
+++ b/doc/classes/SkeletonModification3D.xml
@@ -63,6 +63,4 @@
The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only availible in certain execution modes.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification3DCCDIK.xml b/doc/classes/SkeletonModification3DCCDIK.xml
index aa7ddad56e..ef3200a07a 100644
--- a/doc/classes/SkeletonModification3DCCDIK.xml
+++ b/doc/classes/SkeletonModification3DCCDIK.xml
@@ -133,6 +133,4 @@
The end position of the CCDIK chain. Typically, this should be a child of a [BoneAttachment3D] node attached to the final bone in the CCDIK chain, where the child node is offset so it is at the end of the final bone.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification3DFABRIK.xml b/doc/classes/SkeletonModification3DFABRIK.xml
index 7058e37e94..4c4e01e9d1 100644
--- a/doc/classes/SkeletonModification3DFABRIK.xml
+++ b/doc/classes/SkeletonModification3DFABRIK.xml
@@ -158,6 +158,4 @@
The NodePath to the node that is the target for the FABRIK modification. This node is what the FABRIK chain will attempt to rotate the bone chain to.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification3DJiggle.xml b/doc/classes/SkeletonModification3DJiggle.xml
index e48e382cd4..3c724229bd 100644
--- a/doc/classes/SkeletonModification3DJiggle.xml
+++ b/doc/classes/SkeletonModification3DJiggle.xml
@@ -175,19 +175,19 @@
</methods>
<members>
<member name="damping" type="float" setter="set_damping" getter="get_damping" default="0.75">
- The default amount of dampening applied to the Jiggle joints, if they are not overriden. Higher values lead to more of the calculated velocity being applied.
+ The default amount of dampening applied to the Jiggle joints, if they are not overridden. Higher values lead to more of the calculated velocity being applied.
</member>
<member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -6, 0)">
- The default amount of gravity applied to the Jiggle joints, if they are not overriden.
+ The default amount of gravity applied to the Jiggle joints, if they are not overridden.
</member>
<member name="jiggle_data_chain_length" type="int" setter="set_jiggle_data_chain_length" getter="get_jiggle_data_chain_length" default="0">
The amount of Jiggle joints in the Jiggle modification.
</member>
<member name="mass" type="float" setter="set_mass" getter="get_mass" default="0.75">
- The default amount of mass assigned to the Jiggle joints, if they are not overriden. Higher values lead to faster movements and more overshooting.
+ The default amount of mass assigned to the Jiggle joints, if they are not overridden. Higher values lead to faster movements and more overshooting.
</member>
<member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness" default="3.0">
- The default amount of stiffness assigned to the Jiggle joints, if they are not overriden. Higher values act more like springs, quickly moving into the correct position.
+ The default amount of stiffness assigned to the Jiggle joints, if they are not overridden. Higher values act more like springs, quickly moving into the correct position.
</member>
<member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
The NodePath to the node that is the target for the Jiggle modification. This node is what the Jiggle chain will attempt to rotate the bone chain to.
@@ -196,6 +196,4 @@
Whether the gravity vector, [member gravity], should be applied to the Jiggle joints, assuming they are not overriding the default settings.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification3DLookAt.xml b/doc/classes/SkeletonModification3DLookAt.xml
index c01d764cff..9b34644757 100644
--- a/doc/classes/SkeletonModification3DLookAt.xml
+++ b/doc/classes/SkeletonModification3DLookAt.xml
@@ -61,6 +61,4 @@
The NodePath to the node that is the target for the modification.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification3DStackHolder.xml b/doc/classes/SkeletonModification3DStackHolder.xml
index bb923b680d..138f9818ab 100644
--- a/doc/classes/SkeletonModification3DStackHolder.xml
+++ b/doc/classes/SkeletonModification3DStackHolder.xml
@@ -24,6 +24,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModification3DTwoBoneIK.xml b/doc/classes/SkeletonModification3DTwoBoneIK.xml
index 5c863367df..80f8ba4e5b 100644
--- a/doc/classes/SkeletonModification3DTwoBoneIK.xml
+++ b/doc/classes/SkeletonModification3DTwoBoneIK.xml
@@ -188,6 +188,4 @@
The NodePath to the node that is the target for the TwoBoneIK modification. This node is what the modification will attempt to rotate the bones to reach.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModificationStack2D.xml b/doc/classes/SkeletonModificationStack2D.xml
index 97b8e3b945..9b96c9e6d5 100644
--- a/doc/classes/SkeletonModificationStack2D.xml
+++ b/doc/classes/SkeletonModificationStack2D.xml
@@ -86,6 +86,4 @@
The interpolation strength of the modifications in stack. A value of [code]0[/code] will make it where the modifications are not applied, a strength of [code]0.5[/code] will be half applied, and a strength of [code]1[/code] will allow the modifications to be fully applied and override the [Skeleton2D] [Bone2D] poses.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkeletonModificationStack3D.xml b/doc/classes/SkeletonModificationStack3D.xml
index 4e5e9d72d8..4035e39410 100644
--- a/doc/classes/SkeletonModificationStack3D.xml
+++ b/doc/classes/SkeletonModificationStack3D.xml
@@ -85,6 +85,4 @@
The interpolation strength of the modifications in stack. A value of [code]0[/code] will make it where the modifications are not applied, a strength of [code]0.5[/code] will be half applied, and a strength of [code]1[/code] will allow the modifications to be fully applied and override the skeleton bone poses.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Skin.xml b/doc/classes/Skin.xml
index 67ca36f4d6..d24963a887 100644
--- a/doc/classes/Skin.xml
+++ b/doc/classes/Skin.xml
@@ -70,6 +70,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SkinReference.xml b/doc/classes/SkinReference.xml
index d0634c543c..f8bbc27363 100644
--- a/doc/classes/SkinReference.xml
+++ b/doc/classes/SkinReference.xml
@@ -18,6 +18,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml
index d9553a3be3..79a9bd4b31 100644
--- a/doc/classes/Sky.xml
+++ b/doc/classes/Sky.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Sky.ProcessMode" default="0">
Sets the method for generating the radiance map from the sky. The radiance map is a cubemap with increasingly blurry versions of the sky corresponding to different levels of roughness. Radiance maps can be expensive to calculate. See [enum ProcessMode] for options.
diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml
index f18b2ce39f..21a45645b8 100644
--- a/doc/classes/Slider.xml
+++ b/doc/classes/Slider.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
If [code]true[/code], the slider can be interacted with. If [code]false[/code], the value can be changed only by code.
@@ -27,6 +25,4 @@
If [code]true[/code], the slider will display ticks for minimum and maximum values.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftDynamicBody3D.xml
index ddfc14ceac..f999f77e78 100644
--- a/doc/classes/SoftBody3D.xml
+++ b/doc/classes/SoftDynamicBody3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SoftBody3D" inherits="MeshInstance3D" version="4.0">
+<class name="SoftDynamicBody3D" inherits="MeshInstance3D" version="4.0">
<brief_description>
A soft mesh physics body.
</brief_description>
@@ -42,6 +42,20 @@
<description>
</description>
</method>
+ <method name="get_point_transform">
+ <return type="Vector3" />
+ <argument index="0" name="point_index" type="int" />
+ <description>
+ Returns local translation of a vertex in the surface array.
+ </description>
+ </method>
+ <method name="is_point_pinned" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="point_index" type="int" />
+ <description>
+ Returns [code]true[/code] if vertex is set to pinned.
+ </description>
+ </method>
<method name="remove_collision_exception_with">
<return type="void" />
<argument index="0" name="body" type="Node" />
@@ -65,19 +79,28 @@
Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
</description>
</method>
+ <method name="set_point_pinned">
+ <return type="void" />
+ <argument index="0" name="point_index" type="int" />
+ <argument index="1" name="pinned" type="bool" />
+ <argument index="2" name="attachment_path" type="NodePath" default="NodePath(&quot;&quot;)" />
+ <description>
+ Sets the pinned state of a surface vertex. When set to [code]true[/code], the optional [code]attachment_path[/code] can define a [Node3D] the pinned vertex will be attached to.
+ </description>
+ </method>
</methods>
<members>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
- The physics layers this SoftBody3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].
+ The physics layers this SoftDynamicBody3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].
[b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
- The physics layers this SoftBody3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
+ The physics layers this SoftDynamicBody3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
[b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01">
</member>
- <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="SoftBody3D.DisableMode" default="0">
+ <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="SoftDynamicBody3D.DisableMode" default="0">
Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes.
</member>
<member name="drag_coefficient" type="float" setter="set_drag_coefficient" getter="get_drag_coefficient" default="0.0">
@@ -85,23 +108,23 @@
<member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5">
</member>
<member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore" default="NodePath(&quot;&quot;)">
- [NodePath] to a [CollisionObject3D] this SoftBody3D should avoid clipping.
+ [NodePath] to a [CollisionObject3D] this SoftDynamicBody3D should avoid clipping.
</member>
<member name="pressure_coefficient" type="float" setter="set_pressure_coefficient" getter="get_pressure_coefficient" default="0.0">
</member>
<member name="ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true">
- If [code]true[/code], the [SoftBody3D] will respond to [RayCast3D]s.
+ If [code]true[/code], the [SoftDynamicBody3D] will respond to [RayCast3D]s.
</member>
<member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="5">
Increasing this value will improve the resulting simulation, but can affect performance. Use with care.
</member>
<member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="1.0">
- The SoftBody3D's mass.
+ The SoftDynamicBody3D's mass.
</member>
</members>
<constants>
<constant name="DISABLE_MODE_REMOVE" value="0" enum="DisableMode">
- When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [SoftBody3D].
+ When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [SoftDynamicBody3D].
Automatically re-added to the physics simulation when the [Node] is processed again.
</constant>
<constant name="DISABLE_MODE_KEEP_ACTIVE" value="1" enum="DisableMode">
diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml
index 439fe11861..674b583e3d 100644
--- a/doc/classes/SphereMesh.xml
+++ b/doc/classes/SphereMesh.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
Full height of the sphere.
@@ -28,6 +26,4 @@
Number of segments along the height of the sphere.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SphereShape3D.xml b/doc/classes/SphereShape3D.xml
index e90493fca2..5f0f5c1052 100644
--- a/doc/classes/SphereShape3D.xml
+++ b/doc/classes/SphereShape3D.xml
@@ -9,13 +9,9 @@
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
The sphere's radius. The shape's diameter is double the radius.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml
index 4303fa52f1..33d2b472b5 100644
--- a/doc/classes/SpinBox.xml
+++ b/doc/classes/SpinBox.xml
@@ -55,9 +55,10 @@
<member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default="&quot;&quot;">
Adds the specified [code]suffix[/code] string after the numerical value of the [SpinBox].
</member>
+ <member name="update_on_text_changed" type="bool" setter="set_update_on_text_changed" getter="get_update_on_text_changed" default="false">
+ Sets the value of the [Range] for this [SpinBox] when the [LineEdit] text is [i]changed[/i] instead of [i]submitted[/i]. See [signal LineEdit.text_changed] and [signal LineEdit.text_submitted].
+ </member>
</members>
- <constants>
- </constants>
<theme_items>
<theme_item name="updown" data_type="icon" type="Texture2D">
Sets a custom [Texture2D] for up and down arrows of the [SpinBox].
diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml
index fde40ba6de..8c10ec36a8 100644
--- a/doc/classes/SpotLight3D.xml
+++ b/doc/classes/SpotLight3D.xml
@@ -10,8 +10,6 @@
<link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.03" />
<member name="spot_angle" type="float" setter="set_param" getter="get_param" default="45.0">
@@ -27,6 +25,4 @@
The maximal range that can be reached by the spotlight. Note that the effectively lit area may appear to be smaller depending on the [member spot_attenuation] in use. No matter the [member spot_attenuation] in use, the light will never reach anything outside this range.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SpringArm3D.xml b/doc/classes/SpringArm3D.xml
index 50aa3d39b8..2cd8fa71cf 100644
--- a/doc/classes/SpringArm3D.xml
+++ b/doc/classes/SpringArm3D.xml
@@ -57,6 +57,4 @@
To know more about how to perform a shape cast or a ray cast, please consult the [PhysicsDirectSpaceState3D] documentation.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml
index 0b26fdc055..b9d13a1287 100644
--- a/doc/classes/Sprite2D.xml
+++ b/doc/classes/Sprite2D.xml
@@ -98,6 +98,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml
index ddb9d543e8..5a7fd537e0 100644
--- a/doc/classes/Sprite3D.xml
+++ b/doc/classes/Sprite3D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="frame" type="int" setter="set_frame" getter="get_frame" default="0">
Current frame to display from sprite sheet. [member hframes] or [member vframes] must be greater than 1.
@@ -39,6 +37,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml
index 3bd40ff6f4..660afb5a89 100644
--- a/doc/classes/SpriteFrames.xml
+++ b/doc/classes/SpriteFrames.xml
@@ -135,6 +135,4 @@
Compatibility property, always equals to an empty array.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StandardMaterial3D.xml b/doc/classes/StandardMaterial3D.xml
index 4ed9146e0f..8a36a734f1 100644
--- a/doc/classes/StandardMaterial3D.xml
+++ b/doc/classes/StandardMaterial3D.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml
index 326bf58e22..0a90f430e6 100644
--- a/doc/classes/StaticBody2D.xml
+++ b/doc/classes/StaticBody2D.xml
@@ -1,38 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="StaticBody2D" inherits="PhysicsBody2D" version="4.0">
<brief_description>
- Static body for 2D physics.
+ Physics body for 2D physics which is static or moves only by script. Useful for floor and walls.
</brief_description>
<description>
- Static body for 2D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody2D], they don't consume any CPU resources as long as they don't move.
- They however have extra functionalities to move and affect other bodies:
- [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
- [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path.
- [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path.
+ Static body for 2D physics.
+ A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidDynamicBody2D], it doesn't consume any CPU resources as long as they don't move.
+ They have extra functionalities to move and affect other bodies:
+ [b]Static transform change:[/b] Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path.
+ [b]Constant velocity:[/b] When [member constant_linear_velocity] or [member constant_angular_velocity] is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels.
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="0.0">
- The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating.
+ The body's constant angular velocity. This does not rotate the body, but affects touching bodies, as if it were rotating.
</member>
<member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector2(0, 0)">
- The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving.
- </member>
- <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false">
- If [code]true[/code], the body will act the same as a [RigidBody2D] in [constant RigidBody2D.MODE_KINEMATIC] mode.
- When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
+ The body's constant linear velocity. This does not move the body, but affects touching bodies, as if it were moving.
</member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
The physics material override for the body.
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
</member>
- <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false">
- If [code]true[/code] and [member kinematic_motion] is enabled, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody2D.move_and_collide].
- </member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml
index 69c123002f..d1ef8cd321 100644
--- a/doc/classes/StaticBody3D.xml
+++ b/doc/classes/StaticBody3D.xml
@@ -1,41 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="StaticBody3D" inherits="PhysicsBody3D" version="4.0">
<brief_description>
- Static body for 3D physics.
+ Physics body for 3D physics which is static or moves only by script. Useful for floor and walls.
</brief_description>
<description>
- Static body for 3D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody3D], they don't consume any CPU resources as long as they don't move.
- They however have extra functionalities to move and affect other bodies:
- [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
- [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path.
- [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path.
+ Static body for 3D physics.
+ A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidDynamicBody3D], it doesn't consume any CPU resources as long as they don't move.
+ They have extra functionalities to move and affect other bodies:
+ [b]Static transform change:[/b] Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path.
+ [b]Constant velocity:[/b] When [member constant_linear_velocity] or [member constant_angular_velocity] is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels.
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3(0, 0, 0)">
- The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating.
+ The body's constant angular velocity. This does not rotate the body, but affects touching bodies, as if it were rotating.
</member>
<member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3(0, 0, 0)">
- The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving.
- </member>
- <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false">
- If [code]true[/code], the body will act the same as a [RigidBody3D] in [constant RigidBody3D.MODE_KINEMATIC] mode.
- When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
+ The body's constant linear velocity. This does not move the body, but affects touching bodies, as if it were moving.
</member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override">
The physics material override for the body.
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
</member>
- <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false">
- If [code]true[/code] and [member kinematic_motion] is enabled, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody3D.move_and_collide].
- </member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StreamCubemap.xml b/doc/classes/StreamCubemap.xml
index 16648266eb..2e7ee8e6db 100644
--- a/doc/classes/StreamCubemap.xml
+++ b/doc/classes/StreamCubemap.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StreamCubemapArray.xml b/doc/classes/StreamCubemapArray.xml
index b84973fd14..326226b5ab 100644
--- a/doc/classes/StreamCubemapArray.xml
+++ b/doc/classes/StreamCubemapArray.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index e3d77d22c5..0622626846 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
StreamPeer is an abstraction and base class for stream-based protocols (such as TCP). It provides an API for sending and receiving data through streams as raw data or strings.
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
</tutorials>
@@ -241,6 +242,4 @@
If [code]true[/code], this [StreamPeer] will using big-endian format for encoding and decoding.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml
index 62476ca166..989864760f 100644
--- a/doc/classes/StreamPeerBuffer.xml
+++ b/doc/classes/StreamPeerBuffer.xml
@@ -44,6 +44,4 @@
<member name="data_array" type="PackedByteArray" setter="set_data_array" getter="get_data_array" default="PackedByteArray()">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StreamPeerExtension.xml b/doc/classes/StreamPeerExtension.xml
new file mode 100644
index 0000000000..ceb9486a33
--- /dev/null
+++ b/doc/classes/StreamPeerExtension.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamPeerExtension" inherits="StreamPeer" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_get_available_bytes" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_data" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="r_buffer" type="uint8_t*" />
+ <argument index="1" name="r_bytes" type="int" />
+ <argument index="2" name="r_received" type="int32_t*" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_partial_data" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="r_buffer" type="uint8_t*" />
+ <argument index="1" name="r_bytes" type="int" />
+ <argument index="2" name="r_received" type="int32_t*" />
+ <description>
+ </description>
+ </method>
+ <method name="_put_data" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="p_data" type="const uint8_t*" />
+ <argument index="1" name="p_bytes" type="int" />
+ <argument index="2" name="r_sent" type="int32_t*" />
+ <description>
+ </description>
+ </method>
+ <method name="_put_partial_data" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="p_data" type="const uint8_t*" />
+ <argument index="1" name="p_bytes" type="int" />
+ <argument index="2" name="r_sent" type="int32_t*" />
+ <description>
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml
index 034168c2a0..50389f912d 100644
--- a/doc/classes/StreamPeerSSL.xml
+++ b/doc/classes/StreamPeerSSL.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
SSL stream peer. This object can be used to connect to an SSL server or accept a single SSL client connection.
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
<link title="SSL certificates">https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link>
diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml
index bba48e7275..6b700593a2 100644
--- a/doc/classes/StreamPeerTCP.xml
+++ b/doc/classes/StreamPeerTCP.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
TCP stream peer. This object can be used to connect to TCP servers, or also is returned by a TCP server.
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/StreamTexture2D.xml b/doc/classes/StreamTexture2D.xml
index 7b6c594786..fb32f1e5d9 100644
--- a/doc/classes/StreamTexture2D.xml
+++ b/doc/classes/StreamTexture2D.xml
@@ -22,6 +22,4 @@
The StreamTexture's file path to a [code].stex[/code] file.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StreamTexture2DArray.xml b/doc/classes/StreamTexture2DArray.xml
index ec545b24d0..7ecd3734f7 100644
--- a/doc/classes/StreamTexture2DArray.xml
+++ b/doc/classes/StreamTexture2DArray.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StreamTexture3D.xml b/doc/classes/StreamTexture3D.xml
index 4b2eb16ba3..1892676935 100644
--- a/doc/classes/StreamTexture3D.xml
+++ b/doc/classes/StreamTexture3D.xml
@@ -18,6 +18,4 @@
<member name="load_path" type="String" setter="load" getter="get_load_path" default="&quot;&quot;">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StreamTextureLayered.xml b/doc/classes/StreamTextureLayered.xml
index 888fb339db..7793bf8420 100644
--- a/doc/classes/StreamTextureLayered.xml
+++ b/doc/classes/StreamTextureLayered.xml
@@ -18,6 +18,4 @@
<member name="load_path" type="String" setter="load" getter="get_load_path" default="&quot;&quot;">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 0376a3f96e..0991788483 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -181,7 +181,17 @@
<method name="get_extension" qualifiers="const">
<return type="String" />
<description>
- If the string is a valid file path, returns the extension.
+ Returns the extension without the leading period character ([code].[/code]) if the string is a valid file name or path. If the string does not contain an extension, returns an empty string instead.
+ [codeblock]
+ print("/path/to/file.txt".get_extension()) # "txt"
+ print("file.txt".get_extension()) # "txt"
+ print("file.sample.txt".get_extension()) # "txt"
+ print(".txt".get_extension()) # "txt"
+ print("file.txt.".get_extension()) # "" (empty string)
+ print("file.txt..".get_extension()) # "" (empty string)
+ print("txt".get_extension()) # "" (empty string)
+ print("".get_extension()) # "" (empty string)
+ [/codeblock]
</description>
</method>
<method name="get_file" qualifiers="const">
@@ -229,7 +239,7 @@
<method name="is_absolute_path" qualifiers="const">
<return type="bool" />
<description>
- If the string is a path to a file or directory, returns [code]true[/code] if the path is absolute.
+ Returns [code]true[/code] if the string is a path to a file or directory and its starting point is explicitly defined. This includes [code]res://[/code], [code]user://[/code], [code]C:\[/code], [code]/[/code], etc.
</description>
</method>
<method name="is_empty" qualifiers="const">
@@ -238,10 +248,10 @@
Returns [code]true[/code] if the length of the string equals [code]0[/code].
</description>
</method>
- <method name="is_rel_path" qualifiers="const">
+ <method name="is_relative_path" qualifiers="const">
<return type="bool" />
<description>
- If the string is a path to a file or directory, returns [code]true[/code] if the path is relative.
+ Returns [code]true[/code] if the string is a path to a file or directory and its starting point is implicitly defined within the context it is being used. The starting point may refer to the current directory ([code]./[/code]), or the current [Node].
</description>
</method>
<method name="is_subsequence_of" qualifiers="const">
@@ -410,6 +420,21 @@
<argument index="0" name="number" type="float" />
<argument index="1" name="decimals" type="int" default="-1" />
<description>
+ Converts a [float] to a string representation of a decimal number.
+ The number of decimal places can be specified with [code]decimals[/code]. If [code]decimals[/code] is [code]-1[/code] (default), decimal places will be automatically adjusted so that the string representation has 14 significant digits (counting both digits to the left and the right of the decimal point).
+ Trailing zeros are not included in the string. The last digit will be rounded and not truncated.
+ Some examples:
+ [codeblock]
+ String.num(3.141593) # "3.141593"
+ String.num(3.141593, 3) # "3.142"
+ String.num(3.14159300) # "3.141593", no trailing zeros.
+ # Last digit will be rounded up here, which reduces total digit count since
+ # trailing zeros are removed:
+ String.num(42.129999, 5) # "42.13"
+ # If `decimals` is not specified, the total amount of significant digits is 14:
+ String.num(-0.0000012345432123454321) # "-0.00000123454321"
+ String.num(-10000.0000012345432123454321) # "-10000.0000012345"
+ [/codeblock]
</description>
</method>
<method name="num_scientific" qualifiers="static">
@@ -420,6 +445,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="String" />
<description>
</description>
@@ -456,6 +486,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="String" />
<description>
</description>
@@ -478,6 +513,12 @@
<description>
</description>
</method>
+ <method name="operator []" qualifiers="operator">
+ <return type="String" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ </description>
+ </method>
<method name="pad_decimals" qualifiers="const">
<return type="String" />
<argument index="0" name="digits" type="int" />
@@ -621,6 +662,12 @@
Returns the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar.
</description>
</method>
+ <method name="simplify_path" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns a simplified canonical path.
+ </description>
+ </method>
<method name="split" qualifiers="const">
<return type="PackedStringArray" />
<argument index="0" name="delimiter" type="String" />
@@ -796,6 +843,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml
index 4c2619e782..113195d91c 100644
--- a/doc/classes/StringName.xml
+++ b/doc/classes/StringName.xml
@@ -31,6 +31,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="String" />
<description>
</description>
@@ -43,6 +48,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="String" />
<description>
</description>
@@ -54,6 +64,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index 024524251d..6bcd485656 100644
--- a/doc/classes/StyleBox.xml
+++ b/doc/classes/StyleBox.xml
@@ -95,6 +95,4 @@
Refer to [member content_margin_bottom] for extra considerations.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StyleBoxEmpty.xml b/doc/classes/StyleBoxEmpty.xml
index 8781cdcde3..91a9f37f53 100644
--- a/doc/classes/StyleBoxEmpty.xml
+++ b/doc/classes/StyleBoxEmpty.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
index 59ab724f48..7bd68aa583 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -120,6 +120,7 @@
<members>
<member name="anti_aliasing" type="bool" setter="set_anti_aliased" getter="is_anti_aliased" default="true">
Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners.
+ [b]Note:[/b] When using beveled corners with 45-degree angles ([member corner_detail] = 1), it is recommended to set [member anti_aliasing] to [code]false[/code] to ensure crisp visuals and avoid possible visual glitches.
</member>
<member name="anti_aliasing_size" type="float" setter="set_aa_size" getter="get_aa_size" default="0.625">
This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect.
@@ -187,6 +188,4 @@
The shadow size in pixels.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml
index 850c656720..f2f8679b3e 100644
--- a/doc/classes/StyleBoxLine.xml
+++ b/doc/classes/StyleBoxLine.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(0, 0, 0, 1)">
The line's color.
@@ -27,6 +25,4 @@
If [code]true[/code], the line will be vertical. If [code]false[/code], the line will be horizontal.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml
index 9c5610e2c7..28866699f6 100644
--- a/doc/classes/SubViewport.xml
+++ b/doc/classes/SubViewport.xml
@@ -15,8 +15,6 @@
<link title="Dynamic Split Screen Demo">https://godotengine.org/asset-library/asset/541</link>
<link title="3D Viewport Scaling Demo">https://godotengine.org/asset-library/asset/586</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="SubViewport.ClearMode" default="0">
The clear mode when the sub-viewport is used as a render target.
diff --git a/doc/classes/SubViewportContainer.xml b/doc/classes/SubViewportContainer.xml
index 16d483e7f8..9a4985c98c 100644
--- a/doc/classes/SubViewportContainer.xml
+++ b/doc/classes/SubViewportContainer.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled" default="false">
If [code]true[/code], the sub-viewport will be scaled to the control's size.
@@ -21,6 +19,4 @@
[b]Note:[/b] [member stretch] must be [code]true[/code] for this property to work.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/SyntaxHighlighter.xml b/doc/classes/SyntaxHighlighter.xml
index ea0d1c27a3..9bb8aabb1f 100644
--- a/doc/classes/SyntaxHighlighter.xml
+++ b/doc/classes/SyntaxHighlighter.xml
@@ -17,7 +17,7 @@
Virtual method which can be overridden to clear any local caches.
</description>
</method>
- <method name="_get_line_syntax_highlighting" qualifiers="virtual">
+ <method name="_get_line_syntax_highlighting" qualifiers="virtual const">
<return type="Dictionary" />
<argument index="0" name="line" type="int" />
<description>
@@ -72,6 +72,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/TCPServer.xml b/doc/classes/TCPServer.xml
index 9692693eff..4fbaf9412f 100644
--- a/doc/classes/TCPServer.xml
+++ b/doc/classes/TCPServer.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
A TCP server. Listens to connections on a port and returns a [StreamPeerTCP] when it gets an incoming connection.
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
</tutorials>
@@ -51,6 +52,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index fbda005865..4c50aa4e1f 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -6,8 +6,6 @@
<description>
Sets the active tab's [code]visible[/code] property to the value [code]true[/code]. Sets all other children's to [code]false[/code].
Ignores non-[Control] children.
- Individual tabs are always visible unless you use [method set_tab_disabled] and [method set_tab_title] to hide it.
- To hide only a tab's content, nest the content inside a child [Control], so it receives the [TabContainer]'s visibility setting instead.
</description>
<tutorials>
</tutorials>
@@ -50,6 +48,13 @@
Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled.
</description>
</method>
+ <method name="get_tab_hidden" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="tab_idx" type="int" />
+ <description>
+ Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is hidden.
+ </description>
+ </method>
<method name="get_tab_icon" qualifiers="const">
<return type="Texture2D" />
<argument index="0" name="tab_idx" type="int" />
@@ -57,6 +62,13 @@
Returns the [Texture2D] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture2D].
</description>
</method>
+ <method name="get_tab_idx_at_point" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="point" type="Vector2" />
+ <description>
+ Returns the index of the tab at local coordinates [code]point[/code]. Returns [code]-1[/code] if the point is outside the control boundaries or if there's no tab at the queried position.
+ </description>
+ </method>
<method name="get_tab_title" qualifiers="const">
<return type="String" />
<argument index="0" name="tab_idx" type="int" />
@@ -82,8 +94,15 @@
<argument index="0" name="tab_idx" type="int" />
<argument index="1" name="disabled" type="bool" />
<description>
- If [code]disabled[/code] is [code]false[/code], hides the tab at index [code]tab_idx[/code].
- [b]Note:[/b] Its title text will remain, unless also removed with [method set_tab_title].
+ If [code]disabled[/code] is [code]true[/code], disables the tab at index [code]tab_idx[/code], making it non-interactable.
+ </description>
+ </method>
+ <method name="set_tab_hidden">
+ <return type="void" />
+ <argument index="0" name="tab_idx" type="int" />
+ <argument index="1" name="hidden" type="bool" />
+ <description>
+ If [code]hidden[/code] is [code]true[/code], hides the tab at index [code]tab_idx[/code], making it disappear from the tab area.
</description>
</method>
<method name="set_tab_icon">
@@ -99,14 +118,14 @@
<argument index="0" name="tab_idx" type="int" />
<argument index="1" name="title" type="String" />
<description>
- Sets a title for the tab at index [code]tab_idx[/code]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title].
+ Sets a title for the tab at index [code]tab_idx[/code]. Tab titles default to the name of the indexed child node.
</description>
</method>
<method name="set_tabs_rearrange_group">
<return type="void" />
<argument index="0" name="group_id" type="int" />
<description>
- Defines rearrange group id, choose for each [TabContainer] the same value to enable tab drag between [TabContainer]. Enable drag with [code]set_drag_to_rearrange_enabled(true)[/code].
+ Defines rearrange group id, choose for each [TabContainer] the same value to enable tab drag between [TabContainer]. Enable drag with [member drag_to_rearrange_enabled].
</description>
</method>
</methods>
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index f4c89a8b16..3ee3feb365 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/Tabs.xml
@@ -108,7 +108,7 @@
<return type="String" />
<argument index="0" name="tab_idx" type="int" />
<description>
- Returns the title of the tab at index [code]tab_idx[/code]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title].
+ Returns the title of the tab at index [code]tab_idx[/code].
</description>
</method>
<method name="get_tabs_rearrange_group" qualifiers="const">
@@ -144,8 +144,7 @@
<argument index="0" name="tab_idx" type="int" />
<argument index="1" name="disabled" type="bool" />
<description>
- If [code]disabled[/code] is [code]false[/code], hides the tab at index [code]tab_idx[/code].
- [b]Note:[/b] Its title text will remain unless it is also removed with [method set_tab_title].
+ If [code]disabled[/code] is [code]true[/code], disables the tab at index [code]tab_idx[/code], making it non-interactable.
</description>
</method>
<method name="set_tab_icon">
@@ -193,7 +192,7 @@
<return type="void" />
<argument index="0" name="group_id" type="int" />
<description>
- Defines the rearrange group ID. Choose for each [Tabs] the same value to dragging tabs between [Tabs]. Enable drag with [code]set_drag_to_rearrange_enabled(true)[/code].
+ Defines the rearrange group ID. Choose for each [Tabs] the same value to dragging tabs between [Tabs]. Enable drag with [member drag_to_rearrange_enabled].
</description>
</method>
</methods>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 7aa627b7d0..6a38c1a117 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -30,7 +30,7 @@
</method>
<method name="_handle_unicode_input" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="unicode" type="int" />
+ <argument index="0" name="unicode_char" type="int" />
<description>
Override this method to define what happens when the types in the provided key [code]unicode[/code].
</description>
@@ -1212,6 +1212,12 @@
<theme_item name="read_only" data_type="style" type="StyleBox">
Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled.
</theme_item>
+ <theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
+ [Color] of the border around text that matches the search query.
+ </theme_item>
+ <theme_item name="search_result_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 1)">
+ [Color] behind the text that matches the search query.
+ </theme_item>
<theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)">
Sets the highlight [Color] of text selections.
</theme_item>
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index fb94e14c8d..aa35acdbd2 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -220,13 +220,13 @@
<method name="get_spacing_bottom" qualifiers="const">
<return type="int" />
<description>
- Returns extra spacing at the bottom of the line. See [member Font.extra_spacing_bottom].
+ Returns extra spacing at the bottom of the line. See [member Font.spacing_bottom].
</description>
</method>
<method name="get_spacing_top" qualifiers="const">
<return type="int" />
<description>
- Returns extra spacing at the top of the line. See [member Font.extra_spacing_top].
+ Returns extra spacing at the top of the line. See [member Font.spacing_top].
</description>
</method>
<method name="hit_test" qualifiers="const">
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index ac56be4392..7fe9278f2c 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -9,42 +9,10 @@
<tutorials>
</tutorials>
<methods>
- <method name="create_font_bitmap">
+ <method name="create_font">
<return type="RID" />
- <argument index="0" name="height" type="float" />
- <argument index="1" name="ascent" type="float" />
- <argument index="2" name="base_size" type="int" />
<description>
- Creates new, empty bitmap font. To free the resulting font, use [method free_rid] method.
- </description>
- </method>
- <method name="create_font_memory">
- <return type="RID" />
- <argument index="0" name="data" type="PackedByteArray" />
- <argument index="1" name="type" type="String" />
- <argument index="2" name="base_size" type="int" default="16" />
- <description>
- Creates new font from the data in memory. To free the resulting font, use [method free_rid] method.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size.
- </description>
- </method>
- <method name="create_font_resource">
- <return type="RID" />
- <argument index="0" name="filename" type="String" />
- <argument index="1" name="base_size" type="int" default="16" />
- <description>
- Creates new font from the file. To free the resulting font, use [method free_rid] method.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size.
- </description>
- </method>
- <method name="create_font_system">
- <return type="RID" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="base_size" type="int" default="16" />
- <description>
- Creates new font from the system font. To free the resulting font, use [method free_rid] method.
- Note: This method is supported by servers with the [code]FEATURE_FONT_SYSTEM[/code] feature.
- Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size.
+ Creates new, empty font cache entry resource. To free the resulting resourec, use [method free_rid] method.
</description>
</method>
<method name="create_shaped_text">
@@ -68,52 +36,53 @@
Draws box displaying character hexadecimal code. Used for replacing missing characters.
</description>
</method>
- <method name="font_bitmap_add_char">
+ <method name="font_clear_glyphs">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="char" type="int" />
- <argument index="2" name="texture_idx" type="int" />
- <argument index="3" name="rect" type="Rect2" />
- <argument index="4" name="align" type="Vector2" />
- <argument index="5" name="advance" type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
- Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance.
+ Removes all rendered glyphs information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
</description>
</method>
- <method name="font_bitmap_add_kerning_pair">
+ <method name="font_clear_kerning_map">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="A" type="int" />
- <argument index="2" name="B" type="int" />
- <argument index="3" name="kerning" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
<description>
- Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
+ Removes all kerning overrides.
</description>
</method>
- <method name="font_bitmap_add_texture">
+ <method name="font_clear_size_cache">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="texture" type="Texture" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Removes all font sizes from the cache entry
+ </description>
+ </method>
+ <method name="font_clear_textures">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
- Adds a texture to the bitmap font.
+ Removes all textures from font cache entry. Note: This function will not remove glyphs associated with the texture, use [method font_remove_glyph] to remove them manually.
</description>
</method>
<method name="font_draw_glyph" qualifiers="const">
- <return type="Vector2" />
- <argument index="0" name="font" type="RID" />
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="canvas" type="RID" />
<argument index="2" name="size" type="int" />
<argument index="3" name="pos" type="Vector2" />
<argument index="4" name="index" type="int" />
<argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
+ Draws single glyph into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
Note: Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
</description>
</method>
<method name="font_draw_glyph_outline" qualifiers="const">
- <return type="Vector2" />
- <argument index="0" name="font" type="RID" />
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="canvas" type="RID" />
<argument index="2" name="size" type="int" />
<argument index="3" name="outline_size" type="int" />
@@ -121,68 +90,46 @@
<argument index="5" name="index" type="int" />
<argument index="6" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
+ Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
Note: Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
</description>
</method>
- <method name="font_get_antialiased" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="font" type="RID" />
- <description>
- Returns [code]true[/code], if font anti-aliasing is supported and enabled.
- </description>
- </method>
<method name="font_get_ascent" qualifiers="const">
<return type="float" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="size" type="int" />
<description>
Returns the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="font_get_base_size" qualifiers="const">
- <return type="float" />
- <argument index="0" name="font" type="RID" />
- <description>
- Returns the default size of the font.
- </description>
- </method>
<method name="font_get_descent" qualifiers="const">
<return type="float" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="size" type="int" />
<description>
Returns the font descent (number of pixels below the baseline).
</description>
</method>
- <method name="font_get_distance_field_hint" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="font" type="RID" />
- <description>
- Returns [code]true[/code], if distance field hint is enabled.
- </description>
- </method>
- <method name="font_get_feature_list" qualifiers="const">
- <return type="Dictionary" />
- <argument index="0" name="font" type="RID" />
+ <method name="font_get_fixed_size" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns list of OpenType features supported by font.
+ Returns bitmap font fixed size.
</description>
</method>
- <method name="font_get_force_autohinter" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <method name="font_get_global_oversampling" qualifiers="const">
+ <return type="float" />
<description>
- Returns [code]true[/code], if autohinter is supported and enabled.
+ Returns the font oversampling factor, shared by all fonts in the TextServer.
</description>
</method>
<method name="font_get_glyph_advance" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="index" type="int" />
- <argument index="2" name="size" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns advance of the glyph.
+ Returns glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
</description>
</method>
<method name="font_get_glyph_contours" qualifiers="const">
@@ -191,7 +138,7 @@
<argument index="1" name="size" type="int" />
<argument index="2" name="index" type="int" />
<description>
- Returns outline contours of the glyph in a Dictionary.
+ Returns outline contours of the glyph as a [code]Dictionary[/code] with the following contents:
[code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum ContourPointTag] values.
[code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour.
[code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled.
@@ -199,41 +146,85 @@
</method>
<method name="font_get_glyph_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="char" type="int" />
- <argument index="2" name="variation_selector" type="int" default="0" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="char" type="int" />
+ <argument index="3" name="variation_selector" type="int" />
<description>
Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
</description>
</method>
- <method name="font_get_glyph_kerning" qualifiers="const">
+ <method name="font_get_glyph_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Returns list of rendered glyphs in the cache entry.
+ </description>
+ </method>
+ <method name="font_get_glyph_offset" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="index_a" type="int" />
- <argument index="2" name="index_b" type="int" />
- <argument index="3" name="size" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns a kerning of the pair of glyphs.
+ Returns glyph offset from the baseline.
</description>
</method>
- <method name="font_get_height" qualifiers="const">
- <return type="float" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="size" type="int" />
+ <method name="font_get_glyph_size" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
<description>
- Returns the total font height (ascent plus descent) in pixels.
+ Returns size of the glyph.
+ </description>
+ </method>
+ <method name="font_get_glyph_texture_idx" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="font_get_glyph_uv_rect" qualifiers="const">
+ <return type="Rect2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Returns rectangle in the cache texture containing the glyph.
</description>
</method>
<method name="font_get_hinting" qualifiers="const">
<return type="int" enum="TextServer.Hinting" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns the font hinting.
+ Returns the font hinting mode. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="font_get_kerning" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <description>
+ Returns kerning for the pair of glyphs.
+ </description>
+ </method>
+ <method name="font_get_kerning_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns list of the kerning overrides.
</description>
</method>
<method name="font_get_language_support_override">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="language" type="String" />
<description>
Returns [code]true[/code] if support override is enabled for the [code]language[/code].
@@ -241,20 +232,43 @@
</method>
<method name="font_get_language_support_overrides">
<return type="PackedStringArray" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
Returns list of language support overrides.
</description>
</method>
+ <method name="font_get_msdf_pixel_range" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Return the width of the range around the shape between the minimum and maximum representable signed distance.
+ </description>
+ </method>
+ <method name="font_get_msdf_size" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns source font size used to generate MSDF textures.
+ </description>
+ </method>
<method name="font_get_oversampling" qualifiers="const">
<return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns the font oversampling factor, shared by all fonts in the TextServer.
+ Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="font_get_scale" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <description>
+ Returns scaling factor of the color bitmap font.
</description>
</method>
<method name="font_get_script_support_override">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="script" type="String" />
<description>
Returns [code]true[/code] if support override is enabled for the [code]script[/code].
@@ -262,98 +276,149 @@
</method>
<method name="font_get_script_support_overrides">
<return type="PackedStringArray" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
Returns list of script support overrides.
</description>
</method>
- <method name="font_get_spacing_glyph" qualifiers="const">
- <return type="int" />
- <argument index="0" name="font" type="RID" />
+ <method name="font_get_size_cache_list" qualifiers="const">
+ <return type="Array" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns extra spacing for each glyph in pixels.
+ Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
</description>
</method>
- <method name="font_get_spacing_space" qualifiers="const">
+ <method name="font_get_spacing" qualifiers="const">
<return type="int" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
<description>
- Sets extra spacing for each glyph in pixels.
+ Returns extra spacing added between glyphs in pixels.
</description>
</method>
<method name="font_get_supported_chars" qualifiers="const">
<return type="String" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
Returns a string containing all the characters available in the font.
</description>
</method>
- <method name="font_get_underline_position" qualifiers="const">
- <return type="float" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="size" type="int" />
+ <method name="font_get_texture_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
<description>
- Returns underline offset (number of pixels below the baseline).
+ Returns number of textures used by font cache entry.
</description>
</method>
- <method name="font_get_underline_thickness" qualifiers="const">
+ <method name="font_get_texture_image" qualifiers="const">
+ <return type="Image" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns font cache texture image data.
+ </description>
+ </method>
+ <method name="font_get_texture_offsets" qualifiers="const">
+ <return type="PackedInt32Array" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ </description>
+ </method>
+ <method name="font_get_underline_position" qualifiers="const">
<return type="float" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="size" type="int" />
<description>
- Returns underline thickness in pixels.
+ Returns pixel offset of the underline below the baseline.
</description>
</method>
- <method name="font_get_variation" qualifiers="const">
+ <method name="font_get_underline_thickness" qualifiers="const">
<return type="float" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="tag" type="String" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
<description>
- Returns variation coordinate [code]tag[/code].
+ Returns thickness of the underline in pixels.
</description>
</method>
- <method name="font_get_variation_list" qualifiers="const">
+ <method name="font_get_variation_coordinates" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
- Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
+ Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
</description>
</method>
<method name="font_has_char" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="char" type="int" />
<description>
- Returns [code]true[/code] if [code]char[/code] is available in the font.
+ Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
- <method name="font_has_outline" qualifiers="const">
+ <method name="font_is_antialiased" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled.
+ </description>
+ </method>
+ <method name="font_is_force_autohinter" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Returns [code]true[/code], if font supports glyph outlines.
+ Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only.
</description>
</method>
<method name="font_is_language_supported" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="language" type="String" />
<description>
- Returns [code]true[/code], if font supports given language (ISO 639 code).
+ Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
+ </description>
+ </method>
+ <method name="font_is_multichannel_signed_distance_field" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
</description>
</method>
<method name="font_is_script_supported" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="script" type="String" />
<description>
Returns [code]true[/code], if font supports given script (ISO 15924 code).
</description>
</method>
+ <method name="font_remove_glyph">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <description>
+ Removes specified rendered glyph information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
+ </description>
+ </method>
+ <method name="font_remove_kerning">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <description>
+ Removes kerning override for the pair of glyphs.
+ </description>
+ </method>
<method name="font_remove_language_support_override">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="language" type="String" />
<description>
Remove language support override.
@@ -361,92 +426,300 @@
</method>
<method name="font_remove_script_support_override">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="script" type="String" />
<description>
Removes script support override.
</description>
</method>
+ <method name="font_remove_size_cache">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <description>
+ Removes specified font size from the cache entry.
+ </description>
+ </method>
+ <method name="font_remove_texture">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <description>
+ Removes specified texture from font cache entry. Note: This function will not remove glyphs associated with the texture, remove them manually, using [method font_remove_glyph].
+ </description>
+ </method>
+ <method name="font_render_glyph">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="index" type="int" />
+ <description>
+ Renders specified glyph the the font cache texture.
+ </description>
+ </method>
+ <method name="font_render_range">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="start" type="int" />
+ <argument index="3" name="end" type="int" />
+ <description>
+ Renders the range of characters to the font cache texture.
+ </description>
+ </method>
<method name="font_set_antialiased">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="antialiased" type="bool" />
<description>
- Sets font anti-aliasing.
+ If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only.
</description>
</method>
- <method name="font_set_distance_field_hint">
+ <method name="font_set_ascent">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="distance_field" type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="ascent" type="float" />
<description>
- Sets font distance field hint.
+ Sets the font ascent (number of pixels above the baseline).
+ </description>
+ </method>
+ <method name="font_set_data">
+ <return type="void" />
+ <argument index="0" name="data" type="RID" />
+ <argument index="1" name="arg1" type="PackedByteArray" />
+ <description>
+ Sets font source data, e.g contents of the dynamic font source file.
+ </description>
+ </method>
+ <method name="font_set_descent">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="descent" type="float" />
+ <description>
+ Sets the font descent (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="font_set_fixed_size">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="fixed_size" type="int" />
+ <description>
+ Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
</description>
</method>
<method name="font_set_force_autohinter">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="enabeld" type="bool" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="force_autohinter" type="bool" />
<description>
- Enables/disables default autohinter.
+ If set to [code]true[/code] auto-hinting is preffered over font built-in hinting.
+ </description>
+ </method>
+ <method name="font_set_global_oversampling">
+ <return type="void" />
+ <argument index="0" name="oversampling" type="float" />
+ <description>
+ Sets oversampling factor, shared by all font in the TextServer.
+ Note: This value can be automaticaly changed by display server.
+ </description>
+ </method>
+ <method name="font_set_glyph_advance">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="advance" type="Vector2" />
+ <description>
+ Sets glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
+ </description>
+ </method>
+ <method name="font_set_glyph_offset">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="offset" type="Vector2" />
+ <description>
+ Sets glyph offset from the baseline.
+ </description>
+ </method>
+ <method name="font_set_glyph_size">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="gl_size" type="Vector2" />
+ <description>
+ Sets size of the glyph.
+ </description>
+ </method>
+ <method name="font_set_glyph_texture_idx">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="texture_idx" type="int" />
+ <description>
+ Sets index of the cache texture containing the glyph.
+ </description>
+ </method>
+ <method name="font_set_glyph_uv_rect">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="glyph" type="int" />
+ <argument index="3" name="uv_rect" type="Rect2" />
+ <description>
+ Sets rectangle in the cache texture containing the glyph.
</description>
</method>
<method name="font_set_hinting">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="hinting" type="int" enum="TextServer.Hinting" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="_hinting" type="int" enum="TextServer.Hinting" />
+ <description>
+ Sets font hinting mode. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="font_set_kerning">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="glyph_pair" type="Vector2i" />
+ <argument index="3" name="kerning" type="Vector2" />
<description>
- Sets font hinting.
+ Sets kerning for the pair of glyphs.
</description>
</method>
<method name="font_set_language_support_override">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="language" type="String" />
<argument index="2" name="supported" type="bool" />
<description>
Adds override for [method font_is_language_supported].
</description>
</method>
+ <method name="font_set_msdf_pixel_range">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="msdf_pixel_range" type="int" />
+ <description>
+ Sets the width of the range around the shape between the minimum and maximum representable signed distance.
+ </description>
+ </method>
+ <method name="font_set_msdf_size">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="msdf_size" type="int" />
+ <description>
+ Sets source font size used to generate MSDF textures.
+ </description>
+ </method>
+ <method name="font_set_multichannel_signed_distance_field">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="msdf" type="bool" />
+ <description>
+ If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes.
+ [b]Note:[/b] MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts.
+ </description>
+ </method>
<method name="font_set_oversampling">
<return type="void" />
- <argument index="0" name="oversampling" type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="oversampling" type="float" />
<description>
- Sets oversampling factor, shared by all font in the TextServer.
+ Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
+ </description>
+ </method>
+ <method name="font_set_scale">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="scale" type="float" />
+ <description>
+ Sets scaling factor of the color bitmap font.
</description>
</method>
<method name="font_set_script_support_override">
<return type="void" />
- <argument index="0" name="font" type="RID" />
+ <argument index="0" name="font_rid" type="RID" />
<argument index="1" name="script" type="String" />
<argument index="2" name="supported" type="bool" />
<description>
Adds override for [method font_is_script_supported].
</description>
</method>
- <method name="font_set_spacing_glyph">
+ <method name="font_set_spacing">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="value" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <argument index="3" name="value" type="int" />
<description>
- Returns extra spacing for the space character in pixels.
+ Sets extra spacing added between glyphs in pixels.
</description>
</method>
- <method name="font_set_spacing_space">
+ <method name="font_set_texture_image">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="value" type="int" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="image" type="Image" />
<description>
- Sets extra spacing for the space character in pixels.
+ Sets font cache texture image data.
</description>
</method>
- <method name="font_set_variation">
+ <method name="font_set_texture_offsets">
<return type="void" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="tag" type="String" />
- <argument index="2" name="value" type="float" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="texture_index" type="int" />
+ <argument index="3" name="offset" type="PackedInt32Array" />
+ <description>
+ Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ </description>
+ </method>
+ <method name="font_set_underline_position">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_position" type="float" />
+ <description>
+ Sets pixel offset of the underline below the baseline.
+ </description>
+ </method>
+ <method name="font_set_underline_thickness">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="size" type="int" />
+ <argument index="2" name="underline_thickness" type="float" />
+ <description>
+ Sets thickness of the underline in pixels.
+ </description>
+ </method>
+ <method name="font_set_variation_coordinates">
+ <return type="void" />
+ <argument index="0" name="font_rid" type="RID" />
+ <argument index="1" name="variation_coordinates" type="Dictionary" />
+ <description>
+ Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
+ </description>
+ </method>
+ <method name="font_supported_feature_list" qualifiers="const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="font_supported_variation_list" qualifiers="const">
+ <return type="Dictionary" />
+ <argument index="0" name="font_rid" type="RID" />
<description>
- Sets variation coordinate [code]name[/code]. Unsupported coordinates will be silently ignored.
</description>
</method>
<method name="format_number" qualifiers="const">
@@ -478,13 +751,6 @@
Returns the name of the server interface.
</description>
</method>
- <method name="get_system_fonts" qualifiers="const">
- <return type="PackedStringArray" />
- <description>
- Returns list of available system fonts.
- Note: This method is supported by servers with the [code]FEATURE_FONT_SYSTEM[/code] feature.
- </description>
- </method>
<method name="has">
<return type="bool" />
<argument index="0" name="rid" type="RID" />
@@ -514,7 +780,7 @@
Note: This function should be called before any other TextServer functions used, otherwise it won't have any effect.
</description>
</method>
- <method name="name_to_tag">
+ <method name="name_to_tag" qualifiers="const">
<return type="int" />
<argument index="0" name="name" type="String" />
<description>
@@ -890,7 +1156,7 @@
Aligns shaped text to the given tab-stops.
</description>
</method>
- <method name="tag_to_name">
+ <method name="tag_to_name" qualifiers="const">
<return type="String" />
<argument index="0" name="tag" type="int" />
<description>
@@ -981,6 +1247,12 @@
<constant name="GRAPHEME_IS_PUNCTUATION" value="256" enum="GraphemeFlag">
Grapheme is punctuation character.
</constant>
+ <constant name="GRAPHEME_IS_UNDERSCORE" value="512" enum="GraphemeFlag">
+ Grapheme is underscore character.
+ </constant>
+ <constant name="GRAPHEME_IS_CONNECTED" value="1024" enum="GraphemeFlag">
+ Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
+ </constant>
<constant name="HINTING_NONE" value="0" enum="Hinting">
Disables font hinting (smoother but less crisp).
</constant>
@@ -1023,5 +1295,17 @@
<constant name="CONTOUR_CURVE_TAG_OFF_CUBIC" value="2" enum="ContourPointTag">
Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
</constant>
+ <constant name="SPACING_GLYPH" value="0" enum="SpacingType">
+ Spacing for each glyph.
+ </constant>
+ <constant name="SPACING_SPACE" value="1" enum="SpacingType">
+ Spacing for the space character.
+ </constant>
+ <constant name="SPACING_TOP" value="2" enum="SpacingType">
+ Spacing at the top of the line.
+ </constant>
+ <constant name="SPACING_BOTTOM" value="3" enum="SpacingType">
+ Spacing at the bottom of the line.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/TextServerManager.xml b/doc/classes/TextServerManager.xml
index b1dd314544..0e7b6d15d3 100644
--- a/doc/classes/TextServerManager.xml
+++ b/doc/classes/TextServerManager.xml
@@ -64,6 +64,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml
index e19d611ea9..3387de30b7 100644
--- a/doc/classes/Texture.xml
+++ b/doc/classes/Texture.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml
index bf5ddeb4ab..b77365e2df 100644
--- a/doc/classes/Texture2D.xml
+++ b/doc/classes/Texture2D.xml
@@ -76,6 +76,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Texture2DArray.xml b/doc/classes/Texture2DArray.xml
index bb9283803d..bbadbc29a1 100644
--- a/doc/classes/Texture2DArray.xml
+++ b/doc/classes/Texture2DArray.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Texture3D.xml b/doc/classes/Texture3D.xml
index 8ba0d7d4b9..51cd377648 100644
--- a/doc/classes/Texture3D.xml
+++ b/doc/classes/Texture3D.xml
@@ -38,6 +38,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml
index 70bf138f27..2be27617ab 100644
--- a/doc/classes/TextureButton.xml
+++ b/doc/classes/TextureButton.xml
@@ -11,8 +11,6 @@
<tutorials>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="expand" type="bool" setter="set_expand" getter="get_expand" default="false">
If [code]true[/code], the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code], the texture will not scale with the node.
diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml
index 9da89ebe43..ee47557b39 100644
--- a/doc/classes/TextureProgressBar.xml
+++ b/doc/classes/TextureProgressBar.xml
@@ -60,6 +60,9 @@
[Texture2D] that clips based on the node's [code]value[/code] and [member fill_mode]. As [code]value[/code] increased, the texture fills up. It shows entirely when [code]value[/code] reaches [code]max_value[/code]. It doesn't show at all if [code]value[/code] is equal to [code]min_value[/code].
The [code]value[/code] property comes from [Range]. See [member Range.value], [member Range.min_value], [member Range.max_value].
</member>
+ <member name="texture_progress_offset" type="Vector2" setter="set_texture_progress_offset" getter="get_texture_progress_offset" default="Vector2(0, 0)">
+ The offset of [member texture_progress]. Useful for [member texture_over] and [member texture_under] with fancy borders, to avoid transparent margins in your progress texture.
+ </member>
<member name="texture_under" type="Texture2D" setter="set_under_texture" getter="get_under_texture">
[Texture2D] that draws under the progress bar. The bar's background.
</member>
diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml
index 743e7f6d1e..4f18f43ddf 100644
--- a/doc/classes/TextureRect.xml
+++ b/doc/classes/TextureRect.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="expand" type="bool" setter="set_expand" getter="has_expand" default="false">
If [code]true[/code], the texture scales to fit its bounding rectangle.
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index b553aad518..ae5c0761b1 100644
--- a/doc/classes/Thread.xml
+++ b/doc/classes/Thread.xml
@@ -27,12 +27,11 @@
</method>
<method name="start">
<return type="int" enum="Error" />
- <argument index="0" name="instance" type="Object" />
- <argument index="1" name="method" type="StringName" />
- <argument index="2" name="userdata" type="Variant" default="null" />
- <argument index="3" name="priority" type="int" enum="Thread.Priority" default="1" />
+ <argument index="0" name="callable" type="Callable" />
+ <argument index="1" name="userdata" type="Variant" default="null" />
+ <argument index="2" name="priority" type="int" enum="Thread.Priority" default="1" />
<description>
- Starts a new [Thread] that runs [code]method[/code] on object [code]instance[/code] with [code]userdata[/code] passed as an argument. Even if no userdata is passed, [code]method[/code] must accept one argument and it will be null. The [code]priority[/code] of the [Thread] can be changed by passing a value from the [enum Priority] enum.
+ Starts a new [Thread] that calls [code]callable[/code] with [code]userdata[/code] passed as an argument. Even if no userdata is passed, [code]method[/code] must accept one argument and it will be null. The [code]priority[/code] of the [Thread] can be changed by passing a value from the [enum Priority] enum.
Returns [constant OK] on success, or [constant ERR_CANT_CREATE] on failure.
</description>
</method>
@@ -40,6 +39,8 @@
<return type="Variant" />
<description>
Joins the [Thread] and waits for it to finish. Returns what the method called returned.
+ Should either be used when you want to retrieve the value returned from the method called by the [Thread] or before freeing the instance that contains the [Thread].
+ [b]Note:[/b] After the [Thread] finishes joining it will be disposed. If you want to use it again you will have to create a new instance of it.
</description>
</method>
</methods>
diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml
index b5031cfc63..81c5743ccc 100644
--- a/doc/classes/TileData.xml
+++ b/doc/classes/TileData.xml
@@ -11,6 +11,7 @@
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<description>
+ Adds a collision polygon to the tile on the given TileSet physics layer.
</description>
</method>
<method name="get_collision_polygon_one_way_margin" qualifiers="const">
@@ -18,6 +19,7 @@
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygon_index" type="int" />
<description>
+ Returns the one-way margin (for one-way platforms) of the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
</description>
</method>
<method name="get_collision_polygon_points" qualifiers="const">
@@ -25,42 +27,63 @@
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygon_index" type="int" />
<description>
+ Returns the points of the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
</description>
</method>
<method name="get_collision_polygons_count" qualifiers="const">
<return type="int" />
<argument index="0" name="layer_id" type="int" />
<description>
+ Returns how many polygons the tile has for TileSet physics layer with index [code]layer_id[/code].
+ </description>
+ </method>
+ <method name="get_constant_angular_velocity" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="layer_id" type="int" />
+ <description>
+ Returns the constant angular velocity applied to objects colliding with this tile.
+ </description>
+ </method>
+ <method name="get_constant_linear_velocity" qualifiers="const">
+ <return type="Vector2" />
+ <argument index="0" name="layer_id" type="int" />
+ <description>
+ Returns the constant linear velocity applied to objects colliding with this tile.
</description>
</method>
<method name="get_custom_data" qualifiers="const">
<return type="Variant" />
<argument index="0" name="layer_name" type="String" />
<description>
+ Returns the custom data value for custom data layer named [code]layer_name[/code].
</description>
</method>
<method name="get_custom_data_by_layer_id" qualifiers="const">
<return type="Variant" />
<argument index="0" name="layer_id" type="int" />
<description>
+ Returns the custom data value for custom data layer with index [code]layer_id[/code].
</description>
</method>
<method name="get_navigation_polygon" qualifiers="const">
<return type="NavigationPolygon" />
<argument index="0" name="layer_id" type="int" />
<description>
+ Returns the navigation polygon of the tile for the TileSet navigation layer with index [code]layer_id[/code].
</description>
</method>
<method name="get_occluder" qualifiers="const">
<return type="OccluderPolygon2D" />
<argument index="0" name="layer_id" type="int" />
<description>
+ Returns the occluder polygon of the tile for the TileSet occlusion layer with index [code]layer_id[/code].
</description>
</method>
<method name="get_peering_bit_terrain" qualifiers="const">
<return type="int" />
<argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" />
<description>
+ Returns the tile's terrain bit for the given [code]peering_bit[/code] direction.
</description>
</method>
<method name="is_collision_polygon_one_way" qualifiers="const">
@@ -68,6 +91,7 @@
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygon_index" type="int" />
<description>
+ Returns whether one-way collisions are enabled for the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
</description>
</method>
<method name="remove_collision_polygon">
@@ -75,6 +99,7 @@
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygon_index" type="int" />
<description>
+ Removes the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
</description>
</method>
<method name="set_collision_polygon_one_way">
@@ -83,6 +108,7 @@
<argument index="1" name="polygon_index" type="int" />
<argument index="2" name="one_way" type="bool" />
<description>
+ Enables/disables one-way collisions on the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
</description>
</method>
<method name="set_collision_polygon_one_way_margin">
@@ -91,6 +117,7 @@
<argument index="1" name="polygon_index" type="int" />
<argument index="2" name="one_way_margin" type="float" />
<description>
+ Enables/disables one-way collisions on the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
</description>
</method>
<method name="set_collision_polygon_points">
@@ -99,6 +126,7 @@
<argument index="1" name="polygon_index" type="int" />
<argument index="2" name="polygon" type="PackedVector2Array" />
<description>
+ Sets the points of the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
</description>
</method>
<method name="set_collision_polygons_count">
@@ -106,6 +134,23 @@
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygons_count" type="int" />
<description>
+ Sets the polygons count for TileSet physics layer with index [code]layer_id[/code].
+ </description>
+ </method>
+ <method name="set_constant_angular_velocity">
+ <return type="void" />
+ <argument index="0" name="layer_id" type="int" />
+ <argument index="1" name="velocity" type="float" />
+ <description>
+ Sets the constant angular velocity. This does not rotate the tile. This angular velocity is applied to objects colliding with this tile.
+ </description>
+ </method>
+ <method name="set_constant_linear_velocity">
+ <return type="void" />
+ <argument index="0" name="layer_id" type="int" />
+ <argument index="1" name="velocity" type="Vector2" />
+ <description>
+ Sets the constant linear velocity. This does not move the tile. This linear velocity is applied to objects colliding with this tile. This is useful to create conveyor belts.
</description>
</method>
<method name="set_custom_data">
@@ -113,6 +158,7 @@
<argument index="0" name="layer_name" type="String" />
<argument index="1" name="value" type="Variant" />
<description>
+ Sets the tile's custom data value for the TileSet custom data layer with name [code]layer_name[/code].
</description>
</method>
<method name="set_custom_data_by_layer_id">
@@ -120,6 +166,7 @@
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="value" type="Variant" />
<description>
+ Sets the tile's custom data value for the TileSet custom data layer with index [code]layer_id[/code].
</description>
</method>
<method name="set_navigation_polygon">
@@ -127,6 +174,7 @@
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="navigation_polygon" type="NavigationPolygon" />
<description>
+ Sets the navigation polygon for the TileSet navigation layer with index [code]layer_id[/code].
</description>
</method>
<method name="set_occluder">
@@ -134,6 +182,7 @@
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="occluder_polygon" type="OccluderPolygon2D" />
<description>
+ Sets the occluder for the TileSet occlusion layer with index [code]layer_id[/code].
</description>
</method>
<method name="set_peering_bit_terrain">
@@ -141,17 +190,7 @@
<argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" />
<argument index="1" name="terrain" type="int" />
<description>
- </description>
- </method>
- <method name="tile_get_material" qualifiers="const">
- <return type="ShaderMaterial" />
- <description>
- </description>
- </method>
- <method name="tile_set_material">
- <return type="void" />
- <argument index="0" name="material" type="ShaderMaterial" />
- <description>
+ Sets the tile's terrain bit for the given [code]peering_bit[/code] direction.
</description>
</method>
</methods>
@@ -160,6 +199,8 @@
</member>
<member name="flip_v" type="bool" setter="set_flip_v" getter="get_flip_v" default="false">
</member>
+ <member name="material" type="ShaderMaterial" setter="set_material" getter="get_material">
+ </member>
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
</member>
<member name="probability" type="float" setter="set_probability" getter="get_probability" default="1.0">
@@ -181,6 +222,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index f3c64c3c7d..e5fe823be6 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -4,8 +4,7 @@
Node for 2D tile-based maps.
</brief_description>
<description>
- Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps.
- When doing physics queries against the tilemap, the cell coordinates are encoded as [code]metadata[/code] for each detected collision shape returned by methods such as [method PhysicsDirectSpaceState2D.intersect_shape], [method PhysicsDirectBodyState2D.get_contact_collider_shape_metadata] etc.
+ Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles which are used to create grid-based maps. A TileMap may have several layers, layouting tiles on top of each other.
</description>
<tutorials>
<link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link>
@@ -17,12 +16,26 @@
<link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
</tutorials>
<methods>
+ <method name="add_layer">
+ <return type="void" />
+ <argument index="0" name="to_position" type="int" />
+ <description>
+ Adds a layer at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
+ </description>
+ </method>
<method name="clear">
<return type="void" />
<description>
Clears all cells.
</description>
</method>
+ <method name="clear_layer">
+ <return type="void" />
+ <argument index="0" name="layer" type="int" />
+ <description>
+ Clears all cells on the given layer.
+ </description>
+ </method>
<method name="fix_invalid_tiles">
<return type="void" />
<description>
@@ -35,6 +48,7 @@
<argument index="1" name="coords" type="Vector2i" />
<argument index="2" name="use_proxies" type="bool" />
<description>
+ Returns the tile alternative ID of the cell on layer [code]layer[/code] at [code]coords[/code]. If [code]use_proxies[/code] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy].
</description>
</method>
<method name="get_cell_atlas_coords" qualifiers="const">
@@ -43,6 +57,7 @@
<argument index="1" name="coords" type="Vector2i" />
<argument index="2" name="use_proxies" type="bool" />
<description>
+ Returns the tile atlas coordinates ID of the cell on layer [code]layer[/code] at coordinates [code]coords[/code]. If [code]use_proxies[/code] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy].
</description>
</method>
<method name="get_cell_source_id" qualifiers="const">
@@ -51,24 +66,40 @@
<argument index="1" name="coords" type="Vector2i" />
<argument index="2" name="use_proxies" type="bool" />
<description>
+ Returns the tile source ID of the cell on layer [code]layer[/code] at coordinates [code]coords[/code]. If [code]use_proxies[/code] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy].
+ </description>
+ </method>
+ <method name="get_coords_for_body_rid">
+ <return type="Vector2i" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Returns the coodinates of the tile for given physics body RID. Such RID can be retrieved from [member KinematicCollision2D.collider_rid], when colliding with a tile.
</description>
</method>
<method name="get_layer_name" qualifiers="const">
<return type="String" />
<argument index="0" name="layer" type="int" />
<description>
+ Returns a TileMap layer's name.
</description>
</method>
<method name="get_layer_y_sort_origin" qualifiers="const">
<return type="int" />
<argument index="0" name="layer" type="int" />
<description>
+ Returns a TileMap layer's Y sort origin.
</description>
</method>
- <method name="get_layer_z_indexd" qualifiers="const">
+ <method name="get_layer_z_index" qualifiers="const">
<return type="int" />
<argument index="0" name="layer" type="int" />
<description>
+ Returns a TileMap layer's Z-index value.
+ </description>
+ </method>
+ <method name="get_layers_count" qualifiers="const">
+ <return type="int" />
+ <description>
</description>
</method>
<method name="get_neighbor_cell" qualifiers="const">
@@ -76,37 +107,41 @@
<argument index="0" name="coords" type="Vector2i" />
<argument index="1" name="neighbor" type="int" enum="TileSet.CellNeighbor" />
<description>
+ Returns the neighboring cell to the one at coordinates [code]coords[/code], indentified by the [code]neighbor[/code] direction. This method takes into account the different layouts a TileMap can take.
</description>
</method>
<method name="get_surrounding_tiles">
<return type="Vector2i[]" />
<argument index="0" name="coords" type="Vector2i" />
<description>
+ Returns the list of all neighbourings cells to the one at [code]coords[/code]
</description>
</method>
<method name="get_used_cells" qualifiers="const">
<return type="Vector2i[]" />
<argument index="0" name="layer" type="int" />
<description>
- Returns a [Vector2] array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from [code]-1[/code]).
+ Returns a [Vector2] array with the positions of all cells containing a tile in the given layer. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is [code]Vector2(-1, -1)[/code] and its alternative identifier is -1.
</description>
</method>
<method name="get_used_rect">
<return type="Rect2" />
<description>
- Returns a rectangle enclosing the used (non-empty) tiles of the map.
+ Returns a rectangle enclosing the used (non-empty) tiles of the map, including all layers.
</description>
</method>
<method name="is_layer_enabled" qualifiers="const">
<return type="bool" />
<argument index="0" name="layer" type="int" />
<description>
+ Returns if a layer is enabled.
</description>
</method>
<method name="is_layer_y_sort_enabled" qualifiers="const">
<return type="bool" />
<argument index="0" name="layer" type="int" />
<description>
+ Returns if a layer Y-sorts its tiles.
</description>
</method>
<method name="map_to_world" qualifiers="const">
@@ -116,6 +151,21 @@
Returns the local position corresponding to the given tilemap (grid-based) coordinates.
</description>
</method>
+ <method name="move_layer">
+ <return type="void" />
+ <argument index="0" name="layer" type="int" />
+ <argument index="1" name="to_position" type="int" />
+ <description>
+ Moves the layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array.
+ </description>
+ </method>
+ <method name="remove_layer">
+ <return type="void" />
+ <argument index="0" name="layer" type="int" />
+ <description>
+ Moves the layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array.
+ </description>
+ </method>
<method name="set_cell">
<return type="void" />
<argument index="0" name="layer" type="int" />
@@ -124,7 +174,10 @@
<argument index="3" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" />
<argument index="4" name="alternative_tile" type="int" default="-1" />
<description>
- Sets the tile index for the cell given by a Vector2i.
+ Sets the tile indentifiers for the cell on layer [code]layer[/code] at coordinates [code]coords[/code]. Each tile of the [TileSet] is identified using three parts:
+ - The source indentifier [code]source_id[/code] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id],
+ - The atlas coordinates identifier [code]atlas_coords[/code] identifies a tile coordinates in the atlas (if the source is a [TileSetAtlasSource]. For [TileSetScenesCollectionSource] it should be 0),
+ - The alternative tile identifier [code]alternative_tile[/code] identifies a tile alternative the source is a [TileSetAtlasSource], and the scene for a [TileSetScenesCollectionSource].
</description>
</method>
<method name="set_layer_enabled">
@@ -132,6 +185,7 @@
<argument index="0" name="layer" type="int" />
<argument index="1" name="enabled" type="bool" />
<description>
+ Enables or disables the layer [code]layer[/code]. A disabled layer is not processed at all (no rendering, no physics, etc...).
</description>
</method>
<method name="set_layer_name">
@@ -139,6 +193,7 @@
<argument index="0" name="layer" type="int" />
<argument index="1" name="name" type="String" />
<description>
+ Sets a layer's name. This is mostly useful in the editor.
</description>
</method>
<method name="set_layer_y_sort_enabled">
@@ -146,6 +201,8 @@
<argument index="0" name="layer" type="int" />
<argument index="1" name="y_sort_enabled" type="bool" />
<description>
+ Enables or disables a layer's Y-sorting. If a layer is Y-sorted, the layer will behave as a CanvasItem node where each of its tile gets Y-sorted.
+ Y-sorted layers should usually be on different Z-index values than not Y-sorted layers, otherwise, each of those layer will be Y-sorted as whole with the Y-sorted one. This is usually an undesired behvaior.
</description>
</method>
<method name="set_layer_y_sort_origin">
@@ -153,6 +210,8 @@
<argument index="0" name="layer" type="int" />
<argument index="1" name="y_sort_origin" type="int" />
<description>
+ Sets a layer's Y-sort origin value. This Y-sort origin value is added to each tile's Y-sort origin value.
+ This allows, for example, to fake a different height level on each layer. This can be useful for top-down view games.
</description>
</method>
<method name="set_layer_z_index">
@@ -160,6 +219,7 @@
<argument index="0" name="layer" type="int" />
<argument index="1" name="z_index" type="int" />
<description>
+ Sets a layers Z-index value. This Z-index is added to each tile's Z-index value.
</description>
</method>
<method name="world_to_map" qualifiers="const">
@@ -174,11 +234,15 @@
<member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size" default="16">
The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size.
</member>
- <member name="collision_visibility_mode" type="int" setter="set_collision_visibility_mode" getter="get_collision_visibility_mode" enum="TileMap.VisibilityMode" default="0">
+ <member name="collision_animatable" type="bool" setter="set_collision_animatable" getter="is_collision_animatable" default="false">
+ If enabled, the TileMap will see its collisions synced to the physics tick and change its collision type from static to kinematic. This is required to create TileMap-based moving platform.
+ [b]Note:[/b] Enabling [code]collision_animatable[/code] may have a small performance impact, only do it if the TileMap is moving and has colliding tiles.
</member>
- <member name="layers_count" type="int" setter="set_layers_count" getter="get_layers_count" default="1">
+ <member name="collision_visibility_mode" type="int" setter="set_collision_visibility_mode" getter="get_collision_visibility_mode" enum="TileMap.VisibilityMode" default="0">
+ Show or hide the TileMap's collision shapes. If set to [code]VISIBILITY_MODE_DEFAULT[/code], this depends on the show collision debug settings.
</member>
<member name="navigation_visibility_mode" type="int" setter="set_navigation_visibility_mode" getter="get_navigation_visibility_mode" enum="TileMap.VisibilityMode" default="0">
+ Show or hide the TileMap's collision shapes. If set to [code]VISIBILITY_MODE_DEFAULT[/code], this depends on the show navigation debug settings.
</member>
<member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset">
The assigned [TileSet].
@@ -193,10 +257,13 @@
</signals>
<constants>
<constant name="VISIBILITY_MODE_DEFAULT" value="0" enum="VisibilityMode">
+ Use the debug settings to determine visibility.
</constant>
<constant name="VISIBILITY_MODE_FORCE_HIDE" value="2" enum="VisibilityMode">
+ Always hide.
</constant>
<constant name="VISIBILITY_MODE_FORCE_SHOW" value="1" enum="VisibilityMode">
+ Always show.
</constant>
</constants>
</class>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 439c6e3830..02baded019 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -4,8 +4,13 @@
Tile library for tilemaps.
</brief_description>
<description>
- A TileSet is a library of tiles for a [TileMap]. It contains a list of tiles, each consisting of a sprite and optional collision shapes.
- Tiles are referenced by a unique integer ID.
+ A TileSet is a library of tiles for a [TileMap]. A TileSet handles a list of [TileSetSource], each of them storing a set of tiles.
+ Tiles can either be from a [TileSetAtlasSource], that render tiles out of a texture with support for physics, navigation, etc... or from a [TileSetScenesCollectionSource] which exposes scene-based tiles.
+ Tiles are referenced by using three IDs: their source ID, their atlas coordinates ID and their alternative tile ID.
+
+ A TileSet can be configured so that its tiles expose more or less properties. To do so, the TileSet resources uses property layers, that you can add or remove depending on your needs.
+ For example, adding a physics layer allows giving collision shapes to your tiles. Each layer having dedicated properties (physics layer an mask), you may add several TileSet physics layers for each type of collision you need.
+ See the functions to add new layers for more information.
</description>
<tutorials>
<link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link>
@@ -17,21 +22,72 @@
<link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
</tutorials>
<methods>
+ <method name="add_custom_data_layer">
+ <return type="void" />
+ <argument index="0" name="to_position" type="int" default="-1" />
+ <description>
+ Adds a custom data layer to the TileSet at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
+ Custom data layers allow assigning custom properties to atlas tiles.
+ </description>
+ </method>
+ <method name="add_navigation_layer">
+ <return type="void" />
+ <argument index="0" name="to_position" type="int" default="-1" />
+ <description>
+ Adds a navigation layer to the TileSet at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
+ Navigation layers allow assigning a navigable area to atlas tiles.
+ </description>
+ </method>
+ <method name="add_occlusion_layer">
+ <return type="void" />
+ <argument index="0" name="to_position" type="int" default="-1" />
+ <description>
+ Adds an occlusion layer to the TileSet at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
+ Occlusion layers allow assigning occlusion polygons to atlas tiles.
+ </description>
+ </method>
+ <method name="add_physics_layer">
+ <return type="void" />
+ <argument index="0" name="to_position" type="int" default="-1" />
+ <description>
+ Adds a physics layer to the TileSet at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
+ Physics layers allow assigning collision polygons to atlas tiles.
+ </description>
+ </method>
<method name="add_source">
<return type="int" />
- <argument index="0" name="atlas_source_id_override" type="TileSetSource" />
- <argument index="1" name="arg1" type="int" default="-1" />
+ <argument index="0" name="source" type="TileSetSource" />
+ <argument index="1" name="atlas_source_id_override" type="int" default="-1" />
<description>
+ Adds a [TileSetSource] to the TileSet. If [code]atlas_source_id_override[/code] is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated.
+ The function returns the added source source ID or -1 if the source could not be added.
+ </description>
+ </method>
+ <method name="add_terrain">
+ <return type="void" />
+ <argument index="0" name="terrain_set" type="int" />
+ <argument index="1" name="to_position" type="int" default="-1" />
+ <description>
+ Adds a new terrain to the given terrain set [code]terrain_set[/code] at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
+ </description>
+ </method>
+ <method name="add_terrain_set">
+ <return type="void" />
+ <argument index="0" name="to_position" type="int" default="-1" />
+ <description>
+ Adds a new terrain set at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
</description>
</method>
<method name="cleanup_invalid_tile_proxies">
<return type="void" />
<description>
+ Clears tile proxies pointing to invalid tiles.
</description>
</method>
<method name="clear_tile_proxies">
<return type="void" />
<description>
+ Clears all tile proxies.
</description>
</method>
<method name="get_alternative_level_tile_proxy">
@@ -40,6 +96,8 @@
<argument index="1" name="coords_from" type="Vector2i" />
<argument index="2" name="alternative_from" type="int" />
<description>
+ Returns the alternative-level proxy for the given identifiers. The returned array contains the three proxie's target identifiers (source ID, atlas coords ID and alternative tile ID).
+ If the TileSet has no proxy for the given identifiers, returns an empty Array.
</description>
</method>
<method name="get_coords_level_tile_proxy">
@@ -47,70 +105,108 @@
<argument index="0" name="source_from" type="int" />
<argument index="1" name="coords_from" type="Vector2i" />
<description>
+ Returns the coodinate-level proxy for the given identifiers. The returned array contains the two proxie's target identifiers (source ID and atlas coords ID).
+ If the TileSet has no proxy for the given identifiers, returns an empty Array.
+ </description>
+ </method>
+ <method name="get_custom_data_layers_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the custom data layers count.
</description>
</method>
<method name="get_navigation_layer_layers" qualifiers="const">
<return type="int" />
<argument index="0" name="layer_index" type="int" />
<description>
+ Returns the navigation layers (as in the Navigation server) of the gives TileSet navigation layer.
+ </description>
+ </method>
+ <method name="get_navigation_layers_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the navigation layers count.
</description>
</method>
<method name="get_next_source_id" qualifiers="const">
<return type="int" />
<description>
+ Returns a new unused source ID. This generated ID is the same that a call to [code]add_source[/code] would return.
</description>
</method>
<method name="get_occlusion_layer_light_mask" qualifiers="const">
<return type="int" />
- <argument index="0" name="arg0" type="int" />
+ <argument index="0" name="layer_index" type="int" />
<description>
+ Returns the light mask of the occlusion layer.
</description>
</method>
<method name="get_occlusion_layer_sdf_collision" qualifiers="const">
<return type="bool" />
- <argument index="0" name="arg0" type="int" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ Returns if the occluders from this layer use [code]sdf_collision[/code].
+ </description>
+ </method>
+ <method name="get_occlusion_layers_count" qualifiers="const">
+ <return type="int" />
<description>
+ Returns the occlusion layers count.
</description>
</method>
<method name="get_physics_layer_collision_layer" qualifiers="const">
<return type="int" />
<argument index="0" name="layer_index" type="int" />
<description>
+ Returns the collision layer (as in the physics server) bodies on the given TileSet's physics layer are in.
</description>
</method>
<method name="get_physics_layer_collision_mask" qualifiers="const">
<return type="int" />
<argument index="0" name="layer_index" type="int" />
<description>
+ Returns the collision mask of bodies on the given TileSet's physics layer.
</description>
</method>
<method name="get_physics_layer_physics_material" qualifiers="const">
<return type="PhysicsMaterial" />
<argument index="0" name="layer_index" type="int" />
<description>
+ Returns the physics material of bodies on the given TileSet's physics layer.
+ </description>
+ </method>
+ <method name="get_physics_layers_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the physics layers count.
</description>
</method>
<method name="get_source" qualifiers="const">
<return type="TileSetSource" />
- <argument index="0" name="index" type="int" />
+ <argument index="0" name="source_id" type="int" />
<description>
+ Returns the [TileSetSource] with ID [code]source_id[/code].
</description>
</method>
<method name="get_source_count" qualifiers="const">
<return type="int" />
<description>
+ Returns the number of [TileSetSource] in this TileSet.
</description>
</method>
<method name="get_source_id" qualifiers="const">
<return type="int" />
<argument index="0" name="index" type="int" />
<description>
+ Returns the source ID for source with index [code]index[/code].
</description>
</method>
<method name="get_source_level_tile_proxy">
<return type="int" />
<argument index="0" name="source_from" type="int" />
<description>
+ Returns the source-level proxy for the given source identifier.
+ If the TileSet has no proxy for the given identifier, returns -1.
</description>
</method>
<method name="get_terrain_color" qualifiers="const">
@@ -118,6 +214,7 @@
<argument index="0" name="terrain_set" type="int" />
<argument index="1" name="terrain_index" type="int" />
<description>
+ Returns a terrain's color.
</description>
</method>
<method name="get_terrain_name" qualifiers="const">
@@ -125,18 +222,27 @@
<argument index="0" name="terrain_set" type="int" />
<argument index="1" name="terrain_index" type="int" />
<description>
+ Returns a terrain's name.
</description>
</method>
<method name="get_terrain_set_mode" qualifiers="const">
<return type="int" enum="TileSet.TerrainMode" />
<argument index="0" name="terrain_set" type="int" />
<description>
+ Returns a terrain set mode.
+ </description>
+ </method>
+ <method name="get_terrain_sets_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the terrain sets count.
</description>
</method>
<method name="get_terrains_count" qualifiers="const">
<return type="int" />
<argument index="0" name="terrain_set" type="int" />
<description>
+ Returns the number of terrains in the given terrain set.
</description>
</method>
<method name="has_alternative_level_tile_proxy">
@@ -145,6 +251,7 @@
<argument index="1" name="coords_from" type="Vector2i" />
<argument index="2" name="alternative_from" type="int" />
<description>
+ Returns if there is and alternative-level proxy for the given identifiers.
</description>
</method>
<method name="has_coords_level_tile_proxy">
@@ -152,18 +259,21 @@
<argument index="0" name="source_from" type="int" />
<argument index="1" name="coords_from" type="Vector2i" />
<description>
+ Returns if there is a coodinates-level proxy for the given identifiers.
</description>
</method>
<method name="has_source" qualifiers="const">
<return type="bool" />
- <argument index="0" name="index" type="int" />
+ <argument index="0" name="source_id" type="int" />
<description>
+ Returns if this TileSet has a source for the given source ID.
</description>
</method>
<method name="has_source_level_tile_proxy">
<return type="bool" />
<argument index="0" name="source_from" type="int" />
<description>
+ Returns if there is a source-level proxy for the given source ID.
</description>
</method>
<method name="map_tile_proxy" qualifiers="const">
@@ -172,6 +282,58 @@
<argument index="1" name="coords_from" type="Vector2i" />
<argument index="2" name="alternative_from" type="int" />
<description>
+ According to the configured proxies, maps the provided indentifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array.
+ This function first look for matching alternative-level proxies, then coordinates-level proxies, then source-level proxies.
+ If no proxy corresponding to provided identifiers are found, returns the same values the ones used as arguments.
+ </description>
+ </method>
+ <method name="move_custom_data_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <argument index="1" name="to_position" type="int" />
+ <description>
+ Moves the custom data layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly.
+ </description>
+ </method>
+ <method name="move_navigation_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <argument index="1" name="to_position" type="int" />
+ <description>
+ Moves the navigation layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly.
+ </description>
+ </method>
+ <method name="move_occlusion_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <argument index="1" name="to_position" type="int" />
+ <description>
+ Moves the occlusion layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly.
+ </description>
+ </method>
+ <method name="move_physics_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <argument index="1" name="to_position" type="int" />
+ <description>
+ Moves the physics layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly.
+ </description>
+ </method>
+ <method name="move_terrain">
+ <return type="void" />
+ <argument index="0" name="terrain_set" type="int" />
+ <argument index="1" name="terrain_index" type="int" />
+ <argument index="2" name="to_position" type="int" />
+ <description>
+ Moves the terrain at index [code]terrain_index[/code] for terrain set [code]terrain_set[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly.
+ </description>
+ </method>
+ <method name="move_terrain_set">
+ <return type="void" />
+ <argument index="0" name="terrain_set" type="int" />
+ <argument index="1" name="to_position" type="int" />
+ <description>
+ Moves the terrain set at index [code]terrain_set[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="remove_alternative_level_tile_proxy">
@@ -180,6 +342,7 @@
<argument index="1" name="coords_from" type="Vector2i" />
<argument index="2" name="alternative_from" type="int" />
<description>
+ Removes an alternative-level proxy for the given identifiers.
</description>
</method>
<method name="remove_coords_level_tile_proxy">
@@ -187,18 +350,64 @@
<argument index="0" name="source_from" type="int" />
<argument index="1" name="coords_from" type="Vector2i" />
<description>
+ Removes a coordinates-level proxy for the given identifiers.
+ </description>
+ </method>
+ <method name="remove_custom_data_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ Removes the custom data layer at index [code]layer_index[/code]. Also updates the atlas tiles accordingly.
+ </description>
+ </method>
+ <method name="remove_navigation_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ Removes the navigation layer at index [code]layer_index[/code]. Also updates the atlas tiles accordingly.
+ </description>
+ </method>
+ <method name="remove_occlusion_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ Removes the occlusion layer at index [code]layer_index[/code]. Also updates the atlas tiles accordingly.
+ </description>
+ </method>
+ <method name="remove_physics_layer">
+ <return type="void" />
+ <argument index="0" name="layer_index" type="int" />
+ <description>
+ Removes the physics layer at index [code]layer_index[/code]. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="remove_source">
<return type="void" />
<argument index="0" name="source_id" type="int" />
<description>
+ Removes the source with the given source ID.
</description>
</method>
<method name="remove_source_level_tile_proxy">
<return type="void" />
<argument index="0" name="source_from" type="int" />
<description>
+ Removes a source-level tile proxy.
+ </description>
+ </method>
+ <method name="remove_terrain">
+ <return type="void" />
+ <argument index="0" name="terrain_set" type="int" />
+ <argument index="1" name="terrain_index" type="int" />
+ <description>
+ Removes the terrain at index [code]terrain_index[/code] in the given terrain set [code]terrain_set[/code]. Also updates the atlas tiles accordingly.
+ </description>
+ </method>
+ <method name="remove_terrain_set">
+ <return type="void" />
+ <argument index="0" name="terrain_set" type="int" />
+ <description>
+ Removes the terrain set at index [code]terrain_set[/code]. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="set_alternative_level_tile_proxy">
@@ -210,6 +419,9 @@
<argument index="4" name="coords_to" type="Vector2i" />
<argument index="5" name="alternative_to" type="int" />
<description>
+ Create an alternative-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers.
+ This can be used to replace a tile in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target tile when one is available.
+ Proxied tiles can be automatically replaced in TileMap nodes using the editor.
</description>
</method>
<method name="set_coords_level_tile_proxy">
@@ -219,6 +431,9 @@
<argument index="2" name="source_to" type="int" />
<argument index="3" name="coords_to" type="Vector2i" />
<description>
+ Creates a coordinates-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. The alternative tile ID is kept the same when using coordinates-level proxies.
+ This can be used to replace a tile in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target tile when one is available.
+ Proxied tiles can be automatically replaced in TileMap nodes using the editor.
</description>
</method>
<method name="set_navigation_layer_layers">
@@ -226,6 +441,7 @@
<argument index="0" name="layer_index" type="int" />
<argument index="1" name="layers" type="int" />
<description>
+ Sets the navigation layers (as in the navigation server) for navigation regions is the given TileSet navigation layer.
</description>
</method>
<method name="set_occlusion_layer_light_mask">
@@ -233,13 +449,15 @@
<argument index="0" name="layer_index" type="int" />
<argument index="1" name="light_mask" type="int" />
<description>
+ Sets the occlusion layer (as in the rendering server) for occluders in the given TileSet occlusion layer.
</description>
</method>
<method name="set_occlusion_layer_sdf_collision">
<return type="void" />
<argument index="0" name="layer_index" type="int" />
- <argument index="1" name="sdf_collision" type="int" />
+ <argument index="1" name="sdf_collision" type="bool" />
<description>
+ Enables or disables sdf collision for occluders in the given TileSet occlusion layer.
</description>
</method>
<method name="set_physics_layer_collision_layer">
@@ -247,6 +465,7 @@
<argument index="0" name="layer_index" type="int" />
<argument index="1" name="layer" type="int" />
<description>
+ Sets the physics layer (as in the physics server) for bodies in the given TileSet physics layer.
</description>
</method>
<method name="set_physics_layer_collision_mask">
@@ -254,6 +473,7 @@
<argument index="0" name="layer_index" type="int" />
<argument index="1" name="mask" type="int" />
<description>
+ Sets the physics layer (as in the physics server) for bodies in the given TileSet physics layer.
</description>
</method>
<method name="set_physics_layer_physics_material">
@@ -261,13 +481,15 @@
<argument index="0" name="layer_index" type="int" />
<argument index="1" name="physics_material" type="PhysicsMaterial" />
<description>
+ Sets the physics material for bodies in the given TileSet physics layer.
</description>
</method>
<method name="set_source_id">
<return type="void" />
<argument index="0" name="source_id" type="int" />
- <argument index="1" name="arg1" type="int" />
+ <argument index="1" name="new_source_id" type="int" />
<description>
+ Changes a source's ID.
</description>
</method>
<method name="set_source_level_tile_proxy">
@@ -275,6 +497,9 @@
<argument index="0" name="source_from" type="int" />
<argument index="1" name="source_to" type="int" />
<description>
+ Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlac coordinates ID and the alternative tile ID are kept the same when using source-level proxies.
+ This can be used to replace a source in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target source when one is available.
+ Proxied tiles can be automatically replaced in TileMap nodes using the editor.
</description>
</method>
<method name="set_terrain_color">
@@ -283,6 +508,7 @@
<argument index="1" name="terrain_index" type="int" />
<argument index="2" name="color" type="Color" />
<description>
+ Sets a terrain's color. This color is used for identifying the different terrains in the TileSet editor.
</description>
</method>
<method name="set_terrain_name">
@@ -291,6 +517,7 @@
<argument index="1" name="terrain_index" type="int" />
<argument index="2" name="name" type="String" />
<description>
+ Sets a terrain's name.
</description>
</method>
<method name="set_terrain_set_mode">
@@ -298,103 +525,120 @@
<argument index="0" name="terrain_set" type="int" />
<argument index="1" name="mode" type="int" enum="TileSet.TerrainMode" />
<description>
- </description>
- </method>
- <method name="set_terrains_count">
- <return type="void" />
- <argument index="0" name="terrain_set" type="int" />
- <argument index="1" name="terrains_count" type="int" />
- <description>
+ Sets a terrain mode. Each mode determines which bits of a tile shape is used to match the neighbouring tiles' terrains.
</description>
</method>
</methods>
<members>
- <member name="custom_data_layers_count" type="int" setter="set_custom_data_layers_count" getter="get_custom_data_layers_count" default="0">
- </member>
- <member name="navigation_layers_count" type="int" setter="set_navigation_layers_count" getter="get_navigation_layers_count" default="0">
- </member>
- <member name="occlusion_layers_count" type="int" setter="set_occlusion_layers_count" getter="get_occlusion_layers_count" default="0">
- </member>
- <member name="physics_layers_count" type="int" setter="set_physics_layers_count" getter="get_physics_layers_count" default="0">
- </member>
- <member name="terrains_sets_count" type="int" setter="set_terrain_sets_count" getter="get_terrain_sets_count" default="0">
- </member>
<member name="tile_layout" type="int" setter="set_tile_layout" getter="get_tile_layout" enum="TileSet.TileLayout" default="0">
+ For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), changes the way tiles are indexed in the TileMap grid.
</member>
<member name="tile_offset_axis" type="int" setter="set_tile_offset_axis" getter="get_tile_offset_axis" enum="TileSet.TileOffsetAxis" default="0">
+ For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), determines the offset axis.
</member>
<member name="tile_shape" type="int" setter="set_tile_shape" getter="get_tile_shape" enum="TileSet.TileShape" default="0">
+ The tile shape.
</member>
<member name="tile_size" type="Vector2i" setter="set_tile_size" getter="get_tile_size" default="Vector2i(16, 16)">
+ The tile size, in pixels. For all tile shapes, this size corresponds to the encompassing rectangle of the tile shape. This is thus the minimal cell size required in an atlas.
</member>
<member name="uv_clipping" type="bool" setter="set_uv_clipping" getter="is_uv_clipping" default="false">
+ Enables/Disable uv clipping when rendering the tiles.
</member>
</members>
<constants>
<constant name="TILE_SHAPE_SQUARE" value="0" enum="TileShape">
- Orthogonal orientation mode.
+ Rectangular tile shape.
</constant>
<constant name="TILE_SHAPE_ISOMETRIC" value="1" enum="TileShape">
- Isometric orientation mode.
+ Diamond tile shape (for isometric look).
</constant>
<constant name="TILE_SHAPE_HALF_OFFSET_SQUARE" value="2" enum="TileShape">
+ Rectangular tile shape with one row/colum out of two offset by half a tile.
</constant>
<constant name="TILE_SHAPE_HEXAGON" value="3" enum="TileShape">
- Hexagon orientation mode.
+ Hexagonal tile shape.
</constant>
<constant name="TILE_LAYOUT_STACKED" value="0" enum="TileLayout">
+ Tile coordinates layout where both axis stay consistent with their respective local horizontal and vertical axis.
</constant>
<constant name="TILE_LAYOUT_STACKED_OFFSET" value="1" enum="TileLayout">
+ Same as [code]TILE_LAYOUT_STAKED[/code], but the first half-offset is negative instead of positive.
</constant>
<constant name="TILE_LAYOUT_STAIRS_RIGHT" value="2" enum="TileLayout">
+ Tile coordinates layout where the horizontal axis stay horizontal, and the vertical one goes down-right.
</constant>
<constant name="TILE_LAYOUT_STAIRS_DOWN" value="3" enum="TileLayout">
+ Tile coordinates layout where the vertical axis stay vertical, and the horizontal one goes down-right.
</constant>
<constant name="TILE_LAYOUT_DIAMOND_RIGHT" value="4" enum="TileLayout">
+ Tile coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right.
</constant>
<constant name="TILE_LAYOUT_DIAMOND_DOWN" value="5" enum="TileLayout">
+ Tile coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left.
</constant>
<constant name="TILE_OFFSET_AXIS_HORIZONTAL" value="0" enum="TileOffsetAxis">
+ Horizontal half-offset.
</constant>
<constant name="TILE_OFFSET_AXIS_VERTICAL" value="1" enum="TileOffsetAxis">
+ Vertical half-offset.
</constant>
<constant name="CELL_NEIGHBOR_RIGHT_SIDE" value="0" enum="CellNeighbor">
+ Neighbor on the right side.
</constant>
<constant name="CELL_NEIGHBOR_RIGHT_CORNER" value="1" enum="CellNeighbor">
+ Neighbor in the right corner.
</constant>
<constant name="CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE" value="2" enum="CellNeighbor">
+ Neighbor on the bottom right side.
</constant>
<constant name="CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER" value="3" enum="CellNeighbor">
+ Neighbor in the bottom right corner.
</constant>
<constant name="CELL_NEIGHBOR_BOTTOM_SIDE" value="4" enum="CellNeighbor">
+ Neighbor on the bottom side.
</constant>
<constant name="CELL_NEIGHBOR_BOTTOM_CORNER" value="5" enum="CellNeighbor">
+ Neighbor in the bottom corner.
</constant>
<constant name="CELL_NEIGHBOR_BOTTOM_LEFT_SIDE" value="6" enum="CellNeighbor">
+ Neighbor on the bottom left side.
</constant>
<constant name="CELL_NEIGHBOR_BOTTOM_LEFT_CORNER" value="7" enum="CellNeighbor">
+ Neighbor in the bottom left corner.
</constant>
<constant name="CELL_NEIGHBOR_LEFT_SIDE" value="8" enum="CellNeighbor">
+ Neighbor on the left side.
</constant>
<constant name="CELL_NEIGHBOR_LEFT_CORNER" value="9" enum="CellNeighbor">
+ Neighbor in the left corner.
</constant>
<constant name="CELL_NEIGHBOR_TOP_LEFT_SIDE" value="10" enum="CellNeighbor">
+ Neighbor on the top left side.
</constant>
<constant name="CELL_NEIGHBOR_TOP_LEFT_CORNER" value="11" enum="CellNeighbor">
+ Neighbor in the top left corner.
</constant>
<constant name="CELL_NEIGHBOR_TOP_SIDE" value="12" enum="CellNeighbor">
+ Neighbor on the top side.
</constant>
<constant name="CELL_NEIGHBOR_TOP_CORNER" value="13" enum="CellNeighbor">
+ Neighbor in the top corner.
</constant>
<constant name="CELL_NEIGHBOR_TOP_RIGHT_SIDE" value="14" enum="CellNeighbor">
+ Neighbor on the top right side.
</constant>
<constant name="CELL_NEIGHBOR_TOP_RIGHT_CORNER" value="15" enum="CellNeighbor">
+ Neighbor in the top right corner.
</constant>
<constant name="TERRAIN_MODE_MATCH_CORNERS_AND_SIDES" value="0" enum="TerrainMode">
+ Requires both corners and side to match with neighboring tiles' terrains.
</constant>
<constant name="TERRAIN_MODE_MATCH_CORNERS" value="1" enum="TerrainMode">
+ Requires corners to match with neighboring tiles' terrains.
</constant>
<constant name="TERRAIN_MODE_MATCH_SIDES" value="2" enum="TerrainMode">
+ Requires sides to match with neighboring tiles' terrains.
</constant>
</constants>
</class>
diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml
index 8caa3a7c39..d12ac840f4 100644
--- a/doc/classes/TileSetAtlasSource.xml
+++ b/doc/classes/TileSetAtlasSource.xml
@@ -1,23 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TileSetAtlasSource" inherits="TileSetSource" version="4.0">
<brief_description>
+ Exposes a 2D atlas texture as a set of tiles for a [TileSet] resource.
</brief_description>
<description>
+ An atlas is a grid of tiles laid out on a texture. Each tile in the grid must be exposed using [method create_tile]. Those tiles are then indexed using their coordinates in the grid.
+ Each tile can also have a size in the grid coordinates, making it more or less cells in the atlas.
+
+ Alternatives version of a tile can be created using [method create_alternative_tile], which are then indexed using an alternative ID. The main tile (the one in the grid), is accessed with an alternative ID equal to 0.
+
+ Each tile alternate has a set of properties that is defined by the source's [TileSet] layers. Those properties are stored in a TileData object that can be accessed and modified using [method get_tile_data].
+ As TileData properties are stored directly in the TileSetAtlasSource resource, their properties might also be set using [code]TileSetAtlasSource.set("&lt;coords_x&gt;:&lt;coords_y&gt;/&lt;alternative_id&gt;/&lt;tile_data_property&gt;")[/code].
</description>
<tutorials>
</tutorials>
<methods>
- <method name="can_move_tile_in_atlas" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" />
- <argument index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)" />
- <description>
- </description>
- </method>
<method name="clear_tiles_outside_texture">
<return type="void" />
<description>
+ Clears all tiles that are defined outside the texture boundaries.
</description>
</method>
<method name="create_alternative_tile">
@@ -25,6 +26,8 @@
<argument index="0" name="atlas_coords" type="Vector2i" />
<argument index="1" name="alternative_id_override" type="int" default="-1" />
<description>
+ Creates an alternative tile for the tile at coords [code]atlas_coords[/code]. If [code]alternative_id_override[/code] is -1, give it an automatically generated unique ID, or assigns it the given ID otherwise.
+ Returns the new alternative identifier, or -1 if the alternative could not be created with a provided [code]alternative_id_override[/code].
</description>
</method>
<method name="create_tile">
@@ -32,84 +35,111 @@
<argument index="0" name="atlas_coords" type="Vector2i" />
<argument index="1" name="size" type="Vector2i" default="Vector2i(1, 1)" />
<description>
+ Creates a new tile at coords [code]atlas_coords[/code] with size [code]size[/code].
+ </description>
+ </method>
+ <method name="get_atlas_grid_size" qualifiers="const">
+ <return type="Vector2i" />
+ <description>
+ Returns the atlas grid size, which depends on how many tiles can fit in the texture. It thus depends on the Texture's size, the atlas [code]margins[/code] the tiles' [code]texture_region_size[/code].
</description>
</method>
- <method name="get_alternative_tile_id" qualifiers="const">
+ <method name="get_next_alternative_tile_id" qualifiers="const">
<return type="int" />
<argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="index" type="int" />
<description>
+ Returns the alternative ID a following call to [method create_alternative_tile] would return.
</description>
</method>
- <method name="get_alternative_tiles_count" qualifiers="const">
+ <method name="get_tile_animation_columns" qualifiers="const">
<return type="int" />
<argument index="0" name="atlas_coords" type="Vector2i" />
<description>
+ Returns how many columns the tile at [code]atlas_coords[/code] has in its animation layout.
</description>
</method>
- <method name="get_atlas_grid_size" qualifiers="const">
- <return type="Vector2i" />
+ <method name="get_tile_animation_frame_duration" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
+ <argument index="1" name="frame_index" type="int" />
<description>
+ Returns the animation frame duration of frame [code]frame_index[/code] for the tile at coordinates [code]atlas_coords[/code].
</description>
</method>
- <method name="get_next_alternative_tile_id" qualifiers="const">
+ <method name="get_tile_animation_frames_count" qualifiers="const">
<return type="int" />
<argument index="0" name="atlas_coords" type="Vector2i" />
<description>
+ Returns how many animation frames has the tile at coordinates [code]atlas_coords[/code].
</description>
</method>
- <method name="get_tile_at_coords" qualifiers="const">
+ <method name="get_tile_animation_separation" qualifiers="const">
<return type="Vector2i" />
<argument index="0" name="atlas_coords" type="Vector2i" />
<description>
+ Returns the separation (as in the atlas grid) between each frame of an animated tile at coordinates [code]atlas_coords[/code].
</description>
</method>
- <method name="get_tile_data" qualifiers="const">
- <return type="Object" />
+ <method name="get_tile_animation_speed" qualifiers="const">
+ <return type="float" />
<argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="index" type="int" />
<description>
+ Returns the animation speed of the tile at coordinates [code]atlas_coords[/code].
</description>
</method>
- <method name="get_tile_id" qualifiers="const">
- <return type="Vector2i" />
- <argument index="0" name="index" type="int" />
+ <method name="get_tile_animation_total_duration" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
<description>
+ Returns the sum of the sum of the frame durations of the tile at coordinates [code]atlas_coords[/code]. This value needs to be divided by the animation speed to get the actual animation loop duration.
</description>
</method>
- <method name="get_tile_size_in_atlas" qualifiers="const">
+ <method name="get_tile_at_coords" qualifiers="const">
<return type="Vector2i" />
<argument index="0" name="atlas_coords" type="Vector2i" />
<description>
+ If there is a tile covering the [code]atlas_coords[/code] coordinates, returns the top-left coordinates of the tile (thus its coordinate ID). Returns [code]Vector2i(-1, -1)[/code] otherwise.
</description>
</method>
- <method name="get_tile_texture_region" qualifiers="const">
- <return type="Rect2i" />
+ <method name="get_tile_data" qualifiers="const">
+ <return type="Object" />
<argument index="0" name="atlas_coords" type="Vector2i" />
+ <argument index="1" name="alternative_tile" type="int" />
<description>
+ Returns the [TileData] object for the given atlas coordinates and alternative ID.
</description>
</method>
- <method name="get_tiles_count" qualifiers="const">
- <return type="int" />
+ <method name="get_tile_size_in_atlas" qualifiers="const">
+ <return type="Vector2i" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
<description>
+ Returns the size of the tile (in the grid coordinates system) at coordinates [code]atlas_coords[/code].
</description>
</method>
- <method name="has_alternative_tile" qualifiers="const">
- <return type="bool" />
+ <method name="get_tile_texture_region" qualifiers="const">
+ <return type="Rect2i" />
<argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="alternative_tile" type="int" />
+ <argument index="1" name="frame" type="int" default="0" />
<description>
+ Returns a tile's texture region in the atlas texture. For animated tiles, a [code]frame[/code] argument might be provided for the different frames of the animation.
</description>
</method>
- <method name="has_tile" qualifiers="const">
+ <method name="has_room_for_tile" qualifiers="const">
<return type="bool" />
<argument index="0" name="atlas_coords" type="Vector2i" />
+ <argument index="1" name="size" type="Vector2i" />
+ <argument index="2" name="animation_columns" type="int" />
+ <argument index="3" name="animation_separation" type="Vector2i" />
+ <argument index="4" name="frames_count" type="int" />
+ <argument index="5" name="ignored_tile" type="Vector2i" default="Vector2i(-1, -1)" />
<description>
+ Returns whether there is enough room in an atlas to create/modify a tile with the given properties. If [code]ignored_tile[/code] is provided, act as is the given tile was not present in the atlas. This may be used when you want to modify a tile's properties.
</description>
</method>
<method name="has_tiles_outside_texture">
<return type="bool" />
<description>
+ Returns if this atlas has tiles outside of its texture.
</description>
</method>
<method name="move_tile_in_atlas">
@@ -118,6 +148,9 @@
<argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" />
<argument index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)" />
<description>
+ Move the tile and its alternatives at the [code]atlas_coords[/code] coordinates to the [code]new_atlas_coords[/code] coordinates with the [code]new_size[/code] size. This functions will fail if a tile is already present in the given area.
+ If [code]new_atlas_coords[/code] is [code]Vector2i(-1, -1)[/code], keeps the tile's coordinates. If [code]new_size[/code] is [code]Vector2i(-1, -1)[/code], keeps the tile's size.
+ To avoid an error, first check if a move is possible using [method has_room_for_tile].
</description>
</method>
<method name="remove_alternative_tile">
@@ -125,12 +158,15 @@
<argument index="0" name="atlas_coords" type="Vector2i" />
<argument index="1" name="alternative_tile" type="int" />
<description>
+ Remove a tile's alternative with alternative ID [code]alternative_tile[/code].
+ Calling this function with [code]alternative_tile[/code] equals to 0 will fail, as the base tile alternative cannot be removed.
</description>
</method>
<method name="remove_tile">
<return type="void" />
<argument index="0" name="atlas_coords" type="Vector2i" />
<description>
+ Remove a tile and its alternative at coordinates [code]atlas_coords[/code].
</description>
</method>
<method name="set_alternative_tile_id">
@@ -139,19 +175,64 @@
<argument index="1" name="alternative_tile" type="int" />
<argument index="2" name="new_id" type="int" />
<description>
+ Change a tile's alternative ID from [code]alternative_tile[/code] to [code]new_id[/code].
+ Calling this function with [code]alternative_id[/code] equals to 0 will fail, as the base tile alternative cannot be moved.
+ </description>
+ </method>
+ <method name="set_tile_animation_columns">
+ <return type="void" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
+ <argument index="1" name="frame_columns" type="int" />
+ <description>
+ Sets the number of columns in the animation layout of the tile at coordinates [code]atlas_coords[/code]. If set to 0, then the different frames of the animation are laid out as a single horizontal line in the atlas.
+ </description>
+ </method>
+ <method name="set_tile_animation_frame_duration">
+ <return type="void" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
+ <argument index="1" name="frame_index" type="int" />
+ <argument index="2" name="duration" type="float" />
+ <description>
+ Sets the animation frame duration of frame [code]frame_index[/code] for the tile at coordinates [code]atlas_coords[/code].
+ </description>
+ </method>
+ <method name="set_tile_animation_frames_count">
+ <return type="void" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
+ <argument index="1" name="frames_count" type="int" />
+ <description>
+ Sets how many animation frames the tile at coordinates [code]atlas_coords[/code] has.
+ </description>
+ </method>
+ <method name="set_tile_animation_separation">
+ <return type="void" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
+ <argument index="1" name="separation" type="Vector2i" />
+ <description>
+ Sets the margin (in grid tiles) between each tile in the animation layout of the tile at coordinates [code]atlas_coords[/code] has.
+ </description>
+ </method>
+ <method name="set_tile_animation_speed">
+ <return type="void" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
+ <argument index="1" name="speed" type="float" />
+ <description>
+ Sets the animation speed of the tile at coordinates [code]atlas_coords[/code] has.
</description>
</method>
</methods>
<members>
<member name="margins" type="Vector2i" setter="set_margins" getter="get_margins" default="Vector2i(0, 0)">
+ Margins, in pixels, to offset the origin of the grid in the texture.
</member>
<member name="separation" type="Vector2i" setter="set_separation" getter="get_separation" default="Vector2i(0, 0)">
+ Separation, in pixels, between each tile texture region of the grid.
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ The atlas texture.
</member>
- <member name="tile_size" type="Vector2i" setter="set_texture_region_size" getter="get_texture_region_size" default="Vector2i(16, 16)">
+ <member name="texture_region_size" type="Vector2i" setter="set_texture_region_size" getter="get_texture_region_size" default="Vector2i(16, 16)">
+ The base tile size in the texture (in pixel). This size must be bigger than the TileSet's [code]tile_size[/code] value.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/TileSetScenesCollectionSource.xml b/doc/classes/TileSetScenesCollectionSource.xml
index a44f519a4c..3451519ff6 100644
--- a/doc/classes/TileSetScenesCollectionSource.xml
+++ b/doc/classes/TileSetScenesCollectionSource.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TileSetScenesCollectionSource" inherits="TileSetSource" version="4.0">
<brief_description>
+ Exposes a set of scenes as tiles for a [TileSet] resource.
</brief_description>
<description>
+ When placed on a [TileMap], tiles from [TileSetScenesCollectionSource] will automatically instanciate an assiciated scene at the cell's position in the TileMap.
+ Scenes are instanciated as children of the [TileMap] when it enters the tree. If you add/remove a scene tile in the [TileMap] that is already inside the tree, the [TileMap] will automatically instanciate/free the scene accordingly.
</description>
<tutorials>
</tutorials>
@@ -12,83 +15,55 @@
<argument index="0" name="packed_scene" type="PackedScene" />
<argument index="1" name="id_override" type="int" default="-1" />
<description>
- </description>
- </method>
- <method name="get_alternative_tile_id" qualifiers="const">
- <return type="int" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="index" type="int" />
- <description>
- </description>
- </method>
- <method name="get_alternative_tiles_count" qualifiers="const">
- <return type="int" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <description>
+ Creates a scene-based tile out of the given scene.
+ Returns a newly generated unique ID.
</description>
</method>
<method name="get_next_scene_tile_id" qualifiers="const">
<return type="int" />
<description>
+ Returns the scene ID a following call to [method create_scene_tile] would return.
</description>
</method>
<method name="get_scene_tile_display_placeholder" qualifiers="const">
<return type="bool" />
<argument index="0" name="id" type="int" />
<description>
+ Returns whether the scene tile with id [code]id[/code] displays a placeholder in the editor.
</description>
</method>
<method name="get_scene_tile_id">
<return type="int" />
<argument index="0" name="index" type="int" />
<description>
+ Returns the scene tile ID of the scene tile at index [code]index[/code].
</description>
</method>
<method name="get_scene_tile_scene" qualifiers="const">
<return type="PackedScene" />
<argument index="0" name="id" type="int" />
<description>
+ Returns the [PackedScene] resource of scene tile with id [code]id[/code].
</description>
</method>
<method name="get_scene_tiles_count">
<return type="int" />
<description>
- </description>
- </method>
- <method name="get_tile_id" qualifiers="const">
- <return type="Vector2i" />
- <argument index="0" name="index" type="int" />
- <description>
- </description>
- </method>
- <method name="get_tiles_count" qualifiers="const">
- <return type="int" />
- <description>
- </description>
- </method>
- <method name="has_alternative_tile" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="alternative_tile" type="int" />
- <description>
+ Returns the number or scene tiles this TileSet source has.
</description>
</method>
<method name="has_scene_tile_id">
<return type="bool" />
<argument index="0" name="id" type="int" />
<description>
- </description>
- </method>
- <method name="has_tile" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <description>
+ Returns whether this TileSet source has a scene tile with id [code]id[/code].
</description>
</method>
<method name="remove_scene_tile">
<return type="void" />
<argument index="0" name="id" type="int" />
<description>
+ Remove the scene tile with id [code]id[/code].
</description>
</method>
<method name="set_scene_tile_display_placeholder">
@@ -96,6 +71,7 @@
<argument index="0" name="id" type="int" />
<argument index="1" name="display_placeholder" type="bool" />
<description>
+ Sets whether or not the scene tile with id [code]id[/code] should display a placeholder in the editor. This might be useful for scenes that are not visible.
</description>
</method>
<method name="set_scene_tile_id">
@@ -103,6 +79,7 @@
<argument index="0" name="id" type="int" />
<argument index="1" name="new_id" type="int" />
<description>
+ Changes a scene tile's ID from [code]id[/code] to [code]new_id[/code]. This will fail if there is already a tile with a ID equal to [code]new_id[/code].
</description>
</method>
<method name="set_scene_tile_scene">
@@ -110,9 +87,8 @@
<argument index="0" name="id" type="int" />
<argument index="1" name="packed_scene" type="PackedScene" />
<description>
+ Assigns a [PackedScene] resource to the scene tile with id [code]id[/code]. This will fail if the scene does not extend CanvasItem, as positionning properties are needed to place the scene on the TileMap.
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/TileSetSource.xml b/doc/classes/TileSetSource.xml
index 6a3029bb3f..ed47684f14 100644
--- a/doc/classes/TileSetSource.xml
+++ b/doc/classes/TileSetSource.xml
@@ -1,13 +1,62 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TileSetSource" inherits="Resource" version="4.0">
<brief_description>
+ Exposes a set of tiles for a [TileSet] resource.
</brief_description>
<description>
+ Exposes a set of tiles for a [TileSet] resource.
+ Tiles in a source are indexed with two IDs, coordinates ID (of type Vector2i) and an alternative ID (of type int), named according to their use in the [TileSetAtlasSource] class.
+ Depending on the TileSet source type, those IDs might have restrictions on their values, this is why the base [TileSetSource] class only exposes getters for them.
+
+ You can iterate over all tiles exposed by a TileSetSource by first iterating over coordinates IDs using [method get_tiles_count] and [method get_tile_id], then over alternative IDs using [method get_alternative_tiles_count] and [method get_alternative_tile_id].
</description>
<tutorials>
</tutorials>
<methods>
+ <method name="get_alternative_tile_id" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
+ <argument index="1" name="index" type="int" />
+ <description>
+ Returns the alternative ID for the tile with coordinates ID [code]atlas_coords[/code] at index [code]index[/code].
+ </description>
+ </method>
+ <method name="get_alternative_tiles_count" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
+ <description>
+ Returns the number of alternatives tiles for the coordinates ID [code]atlas_coords[/code].
+ For [TileSetAtlasSource], this always return at least 1, as the base tile with ID 0 is always part of the alternatives list.
+ Returns -1 if there is not tile at the given coords.
+ </description>
+ </method>
+ <method name="get_tile_id" qualifiers="const">
+ <return type="Vector2i" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the tile coordinates ID of the tile with index [code]index[/code].
+ </description>
+ </method>
+ <method name="get_tiles_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns how many tiles this atlas source defines (not including alternative tiles).
+ </description>
+ </method>
+ <method name="has_alternative_tile" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
+ <argument index="1" name="alternative_tile" type="int" />
+ <description>
+ Returns if the base tile at coordinates [code]atlas_coords[/code] has an alternative with ID [code]alternative_tile[/code].
+ </description>
+ </method>
+ <method name="has_tile" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="atlas_coords" type="Vector2i" />
+ <description>
+ Returns if this atlas has a tile with coordinates ID [code]atlas_coordinates[/code].
+ </description>
+ </method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 948585aecb..4fd788467d 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -37,6 +37,16 @@
</method>
<method name="Transform2D" qualifiers="constructor">
<return type="Transform2D" />
+ <argument index="0" name="rotation" type="float" />
+ <argument index="1" name="scale" type="Vector2" />
+ <argument index="2" name="skew" type="float" />
+ <argument index="3" name="position" type="Vector2" />
+ <description>
+ Constructs the transform from a given angle (in radians), scale, skew (in radians) and position.
+ </description>
+ </method>
+ <method name="Transform2D" qualifiers="constructor">
+ <return type="Transform2D" />
<argument index="0" name="x_axis" type="Vector2" />
<argument index="1" name="y_axis" type="Vector2" />
<argument index="2" name="origin" type="Vector2" />
@@ -84,6 +94,12 @@
Returns the scale.
</description>
</method>
+ <method name="get_skew" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the transform's skew (in radians).
+ </description>
+ </method>
<method name="interpolate_with" qualifiers="const">
<return type="Transform2D" />
<argument index="0" name="xform" type="Transform2D" />
@@ -115,19 +131,18 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
- <argument index="0" name="right" type="Transform2D" />
<description>
</description>
</method>
- <method name="operator *" qualifiers="operator">
- <return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
+ <argument index="0" name="right" type="Transform2D" />
<description>
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Rect2" />
- <argument index="0" name="right" type="Rect2" />
+ <return type="PackedVector2Array" />
+ <argument index="0" name="right" type="PackedVector2Array" />
<description>
</description>
</method>
@@ -138,8 +153,14 @@
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="PackedVector2Array" />
- <argument index="0" name="right" type="PackedVector2Array" />
+ <return type="Rect2" />
+ <argument index="0" name="right" type="Rect2" />
+ <description>
+ </description>
+ </method>
+ <method name="operator *" qualifiers="operator">
+ <return type="Vector2" />
+ <argument index="0" name="right" type="Vector2" />
<description>
</description>
</method>
@@ -159,6 +180,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Transform2D" />
<description>
</description>
@@ -196,6 +222,20 @@
Sets the transform's rotation (in radians).
</description>
</method>
+ <method name="set_scale">
+ <return type="void" />
+ <argument index="0" name="scale" type="Vector2" />
+ <description>
+ Sets the transform's scale.
+ </description>
+ </method>
+ <method name="set_skew">
+ <return type="void" />
+ <argument index="0" name="skew" type="float" />
+ <description>
+ Sets the transform's skew (in radians).
+ </description>
+ </method>
<method name="translated" qualifiers="const">
<return type="Transform2D" />
<argument index="0" name="offset" type="Vector2" />
diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml
index 1c906f6a51..337e7d2693 100644
--- a/doc/classes/Transform3D.xml
+++ b/doc/classes/Transform3D.xml
@@ -85,6 +85,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Transform3D" />
<description>
</description>
@@ -129,6 +134,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Transform3D" />
<description>
</description>
diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml
index 4b83a2abf5..2a0695d42e 100644
--- a/doc/classes/Translation.xml
+++ b/doc/classes/Translation.xml
@@ -11,6 +11,24 @@
<link title="Locales">https://docs.godotengine.org/en/latest/tutorials/i18n/locales.html</link>
</tutorials>
<methods>
+ <method name="_get_message" qualifiers="virtual const">
+ <return type="StringName" />
+ <argument index="0" name="src_message" type="StringName" />
+ <argument index="1" name="context" type="StringName" />
+ <description>
+ Virtual method to override [method get_message].
+ </description>
+ </method>
+ <method name="_get_plural_message" qualifiers="virtual const">
+ <return type="StringName" />
+ <argument index="0" name="src_message" type="StringName" />
+ <argument index="1" name="src_plural_message" type="StringName" />
+ <argument index="2" name="n" type="int" />
+ <argument index="3" name="context" type="StringName" />
+ <description>
+ Virtual method to override [method get_plural_message].
+ </description>
+ </method>
<method name="add_message">
<return type="void" />
<argument index="0" name="src_message" type="StringName" />
@@ -76,6 +94,4 @@
The locale of the translation.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index 029848be33..8a6fa3571a 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -27,13 +27,14 @@
<method name="get_loaded_locales" qualifiers="const">
<return type="Array" />
<description>
- Returns an Array of all loaded locales of the game.
+ Returns an array of all loaded locales of the project.
</description>
</method>
<method name="get_locale" qualifiers="const">
<return type="String" />
<description>
- Returns the current locale of the game.
+ Returns the current locale of the project.
+ See also [method OS.get_locale] and [method OS.get_locale_language] to query the locale of the user system.
</description>
</method>
<method name="get_locale_name" qualifiers="const">
@@ -75,7 +76,8 @@
<return type="void" />
<argument index="0" name="locale" type="String" />
<description>
- Sets the locale of the game.
+ Sets the locale of the project. The [code]locale[/code] string will be standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]).
+ If translations have been loaded beforehand for the new locale, they will be applied.
</description>
</method>
<method name="translate" qualifiers="const">
@@ -103,6 +105,4 @@
If [code]true[/code], enables the use of pseudolocalization. See [member ProjectSettings.internationalization/pseudolocalization/use_pseudolocalization] for details.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 50a573d30f..ed24905254 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -552,6 +552,9 @@
<theme_item name="hseparation" data_type="constant" type="int" default="4">
The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled.
</theme_item>
+ <theme_item name="indeterminate" data_type="icon" type="Texture2D">
+ The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is indeterminate.
+ </theme_item>
<theme_item name="item_margin" data_type="constant" type="int" default="12">
The horizontal margin at the start of an item. This is used when folding is enabled for the item.
</theme_item>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 944b9fdc06..b997d87ac0 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -140,6 +140,14 @@
<return type="Font" />
<argument index="0" name="column" type="int" />
<description>
+ Returns custom font used to draw text in the column [code]column[/code].
+ </description>
+ </method>
+ <method name="get_custom_font_size" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="column" type="int" />
+ <description>
+ Returns custom font size used to draw text in the column [code]column[/code].
</description>
</method>
<method name="get_expand_right" qualifiers="const">
@@ -340,6 +348,13 @@
Returns [code]true[/code] if column [code]column[/code] is editable.
</description>
</method>
+ <method name="is_indeterminate" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="column" type="int" />
+ <description>
+ Returns [code]true[/code] if the given column is indeterminate.
+ </description>
+ </method>
<method name="is_selectable" qualifiers="const">
<return type="bool" />
<argument index="0" name="column" type="int" />
@@ -415,7 +430,7 @@
<argument index="0" name="column" type="int" />
<argument index="1" name="checked" type="bool" />
<description>
- If [code]true[/code], the column [code]column[/code] is checked.
+ If [code]true[/code], the column [code]column[/code] is checked. Clears column's indeterminate status.
</description>
</method>
<method name="set_custom_as_button">
@@ -457,6 +472,15 @@
<argument index="0" name="column" type="int" />
<argument index="1" name="font" type="Font" />
<description>
+ Sets custom font used to draw text in the column [code]column[/code].
+ </description>
+ </method>
+ <method name="set_custom_font_size">
+ <return type="void" />
+ <argument index="0" name="column" type="int" />
+ <argument index="1" name="font_size" type="int" />
+ <description>
+ Sets custom font size used to draw text in the column [code]column[/code].
</description>
</method>
<method name="set_editable">
@@ -507,6 +531,15 @@
Sets the given column's icon's texture region.
</description>
</method>
+ <method name="set_indeterminate">
+ <return type="void" />
+ <argument index="0" name="column" type="int" />
+ <argument index="1" name="indeterminate" type="bool" />
+ <description>
+ If [code]true[/code], the column [code]column[/code] is marked indeterminate.
+ [b]Note:[/b] If set [code]true[/code] from [code]false[/code], then column is cleared of checked status.
+ </description>
+ </method>
<method name="set_language">
<return type="void" />
<argument index="0" name="column" type="int" />
diff --git a/doc/classes/TriangleMesh.xml b/doc/classes/TriangleMesh.xml
index cfdb6fe33e..f615f7965f 100644
--- a/doc/classes/TriangleMesh.xml
+++ b/doc/classes/TriangleMesh.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/TubeTrailMesh.xml b/doc/classes/TubeTrailMesh.xml
index 2782791a62..2c84a79557 100644
--- a/doc/classes/TubeTrailMesh.xml
+++ b/doc/classes/TubeTrailMesh.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="curve" type="Curve" setter="set_curve" getter="get_curve">
</member>
@@ -22,6 +20,4 @@
<member name="sections" type="int" setter="set_sections" getter="get_sections" default="5">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index 372a6e7ebf..f94018c96b 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -58,8 +58,8 @@
[codeblock]
var tween = create_tween().set_parallel(true)
tween.tween_property(...)
- tween.tween_property(...) #will run parallelly with above
- tween.chain().tween_property(...) #will run after two above are finished
+ tween.tween_property(...) # Will run parallelly with above.
+ tween.chain().tween_property(...) # Will run after two above are finished.
[/codeblock]
</description>
</method>
@@ -86,6 +86,7 @@
[code]initial_value[/code] is the starting value of the interpolation.
[code]delta_value[/code] is the change of the value in the interpolation, i.e. it's equal to [code]final_value - initial_value[/code].
[code]duration[/code] is the total time of the interpolation.
+ [b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method will always return the final value, regardless of [code]elapsed_time[/code] provided.
</description>
</method>
<method name="is_running">
@@ -215,11 +216,9 @@
Creates and appends an [IntervalTweener]. This method can be used to create delays in the tween animation, as an alternative for using the delay in other [Tweener]s or when there's no animation (in which case the [Tween] acts as a timer). [code]time[/code] is the length of the interval, in seconds.
Example: creating an interval in code execution.
[codeblock]
- #... some code
- var tween = create_tween()
- tween.tween_interval(2)
- await tween.finished
- #... more code
+ # ... some code
+ await create_tween().tween_interval(2).finished
+ # ... more code
[/codeblock]
Example: creating an object that moves back and forth and jumps every few seconds.
[codeblock]
@@ -236,15 +235,15 @@
<method name="tween_method">
<return type="MethodTweener" />
<argument index="0" name="method" type="Callable" />
- <argument index="1" name="from" type="float" />
- <argument index="2" name="to" type="float" />
+ <argument index="1" name="from" type="Variant" />
+ <argument index="2" name="to" type="Variant" />
<argument index="3" name="duration" type="float" />
<description>
Creates and appends a [MethodTweener]. This method is similar to a combination of [method tween_callback] and [method tween_property]. It calls a method over time with a tweened value provided as an argument. The value is tweened between [code]from[/code] and [code]to[/code] over the time specified by [code]duration[/code], in seconds. Use [method Callable.bind] to bind additional arguments for the call. You can use [method MethodTweener.set_ease] and [method MethodTweener.set_trans] to tweak the easing and transition of the value or [method MethodTweener.set_delay] to delay the tweening.
Example: making a 3D object look from one point to another point.
[codeblock]
var tween = create_tween()
- tween.tween_method(look_at.bind(Vector3.UP), Vector3(-1, 0, -1), Vector3(1, 0, -1), 1) #the look_at() method takes up vector as second argument
+ tween.tween_method(look_at.bind(Vector3.UP), Vector3(-1, 0, -1), Vector3(1, 0, -1), 1) # The look_at() method takes up vector as second argument.
[/codeblock]
Example: setting a text of a [Label], using an intermediate method and after a delay.
[codeblock]
diff --git a/doc/classes/Tweener.xml b/doc/classes/Tweener.xml
index a3279502e0..ad599c4d02 100644
--- a/doc/classes/Tweener.xml
+++ b/doc/classes/Tweener.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<signals>
<signal name="finished">
<description>
@@ -17,6 +15,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml
index eb6d42fb0f..66f752b97a 100644
--- a/doc/classes/UDPServer.xml
+++ b/doc/classes/UDPServer.xml
@@ -173,6 +173,4 @@
Define the maximum number of pending connections, during [method poll], any new pending connection exceeding that value will be automatically dropped. Setting this value to [code]0[/code] effectively prevents any new pending connection to be accepted (e.g. when all your players have connected).
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml
index aa6c5fc8a4..b62fb4707e 100644
--- a/doc/classes/VBoxContainer.xml
+++ b/doc/classes/VBoxContainer.xml
@@ -9,10 +9,6 @@
<tutorials>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
<theme_items>
<theme_item name="separation" data_type="constant" type="int" default="4">
The vertical space between the [VBoxContainer]'s elements.
diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml
index 98a0aea0c7..0cf06576f6 100644
--- a/doc/classes/VScrollBar.xml
+++ b/doc/classes/VScrollBar.xml
@@ -8,14 +8,10 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" override="true" default="0" />
<member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="1" />
</members>
- <constants>
- </constants>
<theme_items>
<theme_item name="decrement" data_type="icon" type="Texture2D">
Icon used as a button to scroll the [ScrollBar] up. Supports custom step using the [member ScrollBar.custom_step] property.
@@ -23,6 +19,9 @@
<theme_item name="decrement_highlight" data_type="icon" type="Texture2D">
Displayed when the mouse cursor hovers over the decrement button.
</theme_item>
+ <theme_item name="decrement_pressed" data_type="icon" type="Texture2D">
+ Displayed when the decrement button is being pressed.
+ </theme_item>
<theme_item name="grabber" data_type="style" type="StyleBox">
Used as texture for the grabber, the draggable element representing current scroll.
</theme_item>
@@ -38,6 +37,9 @@
<theme_item name="increment_highlight" data_type="icon" type="Texture2D">
Displayed when the mouse cursor hovers over the increment button.
</theme_item>
+ <theme_item name="increment_pressed" data_type="icon" type="Texture2D">
+ Displayed when the increment button is being pressed.
+ </theme_item>
<theme_item name="scroll" data_type="style" type="StyleBox">
Used as background of this [ScrollBar].
</theme_item>
diff --git a/doc/classes/VSeparator.xml b/doc/classes/VSeparator.xml
index d59c7229ac..d9299bfe92 100644
--- a/doc/classes/VSeparator.xml
+++ b/doc/classes/VSeparator.xml
@@ -8,10 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
<theme_items>
<theme_item name="separation" data_type="constant" type="int" default="4">
The width of the area covered by the separator. Effectively works like a minimum width.
diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml
index becf3d1052..286674a9b4 100644
--- a/doc/classes/VSlider.xml
+++ b/doc/classes/VSlider.xml
@@ -9,14 +9,10 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" override="true" default="0" />
<member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="1" />
</members>
- <constants>
- </constants>
<theme_items>
<theme_item name="grabber" data_type="icon" type="Texture2D">
The texture for the grabber (the draggable element).
diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml
index 143f5b6b0a..323ce1fe80 100644
--- a/doc/classes/VSplitContainer.xml
+++ b/doc/classes/VSplitContainer.xml
@@ -8,10 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
<theme_items>
<theme_item name="autohide" data_type="constant" type="int" default="1">
Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index 240c1c909f..88644e2f8a 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -74,8 +74,4 @@
<tutorials>
<link title="Variant class">https://docs.godotengine.org/en/latest/development/cpp/variant_class.html</link>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index cb5662419e..b61d5bea0e 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -56,6 +56,7 @@
<description>
Returns this vector's angle with respect to the positive X axis, or [code](1, 0)[/code] vector, in radians.
For example, [code]Vector2.RIGHT.angle()[/code] will return zero, [code]Vector2.DOWN.angle()[/code] will return [code]PI / 2[/code] (a quarter turn, or 90 degrees), and [code]Vector2(1, -1).angle()[/code] will return [code]-PI / 4[/code] (a negative eighth turn, or -45 degrees).
+ [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle.png]Illustration of the returned angle.[/url]
Equivalent to the result of [method @GlobalScope.atan2] when called with the vector's [member y] and [member x] as parameters: [code]atan2(y, x)[/code].
</description>
</method>
@@ -64,6 +65,7 @@
<argument index="0" name="to" type="Vector2" />
<description>
Returns the angle to the given vector, in radians.
+ [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to.png]Illustration of the returned angle.[/url]
</description>
</method>
<method name="angle_to_point" qualifiers="const">
@@ -71,6 +73,7 @@
<argument index="0" name="to" type="Vector2" />
<description>
Returns the angle between the line connecting the two points and the X axis, in radians.
+ [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to_point.png]Illustration of the returned angle.[/url]
</description>
</method>
<method name="aspect" qualifiers="const">
@@ -155,6 +158,18 @@
Returns the vector with all components rounded down (towards negative infinity).
</description>
</method>
+ <method name="from_angle" qualifiers="static">
+ <return type="Vector2" />
+ <argument index="0" name="angle" type="float" />
+ <description>
+ Creates a unit [Vector2] rotated to the given [code]angle[/code] in radians. This is equivalent to doing [code]Vector2(cos(angle), sin(angle))[/code] or [code]Vector2.RIGHT.rotated(angle)[/code].
+ [codeblock]
+ print(Vector2.from_angle(0)) # Prints (1, 0).
+ print(Vector2(1, 0).angle()) # Prints 0, which is the angle used above.
+ print(Vector2.from_angle(PI / 2)) # Prints (0, 1).
+ [/codeblock]
+ </description>
+ </method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
<argument index="0" name="to" type="Vector2" />
@@ -212,6 +227,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Vector2" />
<description>
</description>
@@ -284,6 +304,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Vector2" />
<description>
</description>
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index 212b1fd22b..2e69d6efdf 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -64,6 +64,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
</description>
@@ -142,6 +147,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Vector2i" />
<description>
</description>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 78251b0342..9f2ea7b2a0 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -210,6 +210,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Vector3" />
<description>
</description>
@@ -294,6 +299,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Vector3" />
<description>
</description>
@@ -412,13 +422,6 @@
Returns this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals.
</description>
</method>
- <method name="to_diagonal_matrix" qualifiers="const">
- <return type="Basis" />
- <description>
- Returns a diagonal matrix with the vector as main diagonal.
- This is equivalent to a Basis with no rotation or shearing and this vector's components set as the scale.
- </description>
- </method>
</methods>
<members>
<member name="x" type="float" setter="" getter="" default="0.0">
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index 75df182025..bc3712ba3e 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -70,6 +70,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
</description>
@@ -148,6 +153,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="Vector3i" />
<description>
</description>
diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml
index 90d0591949..9315f6e6ad 100644
--- a/doc/classes/VehicleBody3D.xml
+++ b/doc/classes/VehicleBody3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VehicleBody3D" inherits="RigidBody3D" version="4.0">
+<class name="VehicleBody3D" inherits="RigidDynamicBody3D" version="4.0">
<brief_description>
Physics body that simulates the behavior of a car.
</brief_description>
@@ -11,14 +11,12 @@
<tutorials>
<link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="brake" type="float" setter="set_brake" getter="get_brake" default="0.0">
- Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
+ Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidDynamicBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
</member>
<member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0">
- Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel3D.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
+ Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel3D.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
[b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.
A negative value will result in the vehicle reversing.
</member>
@@ -27,6 +25,4 @@
The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel3D.use_as_steering] set to [code]true[/code] will automatically be rotated.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml
index 35f1189a06..951f4f8275 100644
--- a/doc/classes/VehicleWheel3D.xml
+++ b/doc/classes/VehicleWheel3D.xml
@@ -32,7 +32,7 @@
</methods>
<members>
<member name="brake" type="float" setter="set_brake" getter="get_brake" default="0.0">
- Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
+ Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidDynamicBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
</member>
<member name="damping_compression" type="float" setter="set_damping_compression" getter="get_damping_compression" default="0.83">
The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car.
@@ -41,7 +41,7 @@
The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5.
</member>
<member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0">
- Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The [member RigidBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
+ Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
[b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.
A negative value will result in the wheel reversing.
</member>
@@ -49,7 +49,7 @@
The steering angle for the wheel. Setting this to a non-zero value will result in the vehicle turning when it's moving.
</member>
<member name="suspension_max_force" type="float" setter="set_suspension_max_force" getter="get_suspension_max_force" default="6000.0">
- The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidBody3D.mass] of the [VehicleBody3D] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number.
+ The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidDynamicBody3D.mass] of the [VehicleBody3D] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number.
</member>
<member name="suspension_stiffness" type="float" setter="set_suspension_stiffness" getter="get_suspension_stiffness" default="5.88">
This value defines the stiffness of the suspension. Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car.
@@ -77,6 +77,4 @@
This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will be prone to rolling over, while a value of 0.0 will resist body roll.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VelocityTracker3D.xml b/doc/classes/VelocityTracker3D.xml
index 7e97cad5bf..5d8dcc6742 100644
--- a/doc/classes/VelocityTracker3D.xml
+++ b/doc/classes/VelocityTracker3D.xml
@@ -29,6 +29,4 @@
<member name="track_physics_step" type="bool" setter="set_track_physics_step" getter="is_tracking_physics_step" default="false">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml
index 86b2dd102b..4f60b9d567 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoPlayer.xml
@@ -85,6 +85,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VideoStream.xml b/doc/classes/VideoStream.xml
index 7f522bfdf0..39fefa8d95 100644
--- a/doc/classes/VideoStream.xml
+++ b/doc/classes/VideoStream.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 4a62d3ec7b..06a7177bfc 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -113,26 +113,34 @@
Returns [code]true[/code] if the viewport is currently performing a drag operation.
</description>
</method>
- <method name="input">
+ <method name="is_embedding_subwindows" qualifiers="const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="is_input_handled" qualifiers="const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="push_input">
<return type="void" />
<argument index="0" name="event" type="InputEvent" />
<argument index="1" name="in_local_coords" type="bool" default="false" />
<description>
</description>
</method>
- <method name="input_text">
+ <method name="push_text_input">
<return type="void" />
<argument index="0" name="text" type="String" />
<description>
+ Returns [code]true[/code] if the viewport is currently embedding windows.
</description>
</method>
- <method name="is_embedding_subwindows" qualifiers="const">
- <return type="bool" />
- <description>
- </description>
- </method>
- <method name="is_input_handled" qualifiers="const">
- <return type="bool" />
+ <method name="push_unhandled_input">
+ <return type="void" />
+ <argument index="0" name="event" type="InputEvent" />
+ <argument index="1" name="in_local_coords" type="bool" default="false" />
<description>
</description>
</method>
@@ -150,13 +158,6 @@
Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.
</description>
</method>
- <method name="unhandled_input">
- <return type="void" />
- <argument index="0" name="event" type="InputEvent" />
- <argument index="1" name="in_local_coords" type="bool" default="false" />
- <description>
- </description>
- </method>
<method name="warp_mouse">
<return type="void" />
<argument index="0" name="to_position" type="Vector2" />
@@ -211,6 +212,9 @@
<member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false">
If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process.
</member>
+ <member name="scale_3d" type="int" setter="set_scale_3d" getter="get_scale_3d" enum="Viewport.Scale3D" default="0">
+ The scale at which 3D content is rendered.
+ </member>
<member name="screen_space_aa" type="int" setter="set_screen_space_aa" getter="get_screen_space_aa" enum="Viewport.ScreenSpaceAA" default="0">
Sets the screen-space antialiasing method used. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry.
</member>
@@ -271,6 +275,16 @@
</signal>
</signals>
<constants>
+ <constant name="SCALE_3D_DISABLED" value="0" enum="Scale3D">
+ </constant>
+ <constant name="SCALE_3D_75_PERCENT" value="1" enum="Scale3D">
+ </constant>
+ <constant name="SCALE_3D_50_PERCENT" value="2" enum="Scale3D">
+ </constant>
+ <constant name="SCALE_3D_33_PERCENT" value="3" enum="Scale3D">
+ </constant>
+ <constant name="SCALE_3D_25_PERCENT" value="4" enum="Scale3D">
+ </constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will not be used.
</constant>
@@ -307,10 +321,7 @@
<constant name="MSAA_8X" value="3" enum="MSAA">
Use 8× Multisample Antialiasing. This has a very high performance cost. The difference between 4× and 8× MSAA may not always be visible in real gameplay conditions. Likely unsupported on low-end and older hardware.
</constant>
- <constant name="MSAA_16X" value="4" enum="MSAA">
- Use 16× Multisample Antialiasing. This has a very high performance cost. The difference between 8× and 16× MSAA may not always be visible in real gameplay conditions. Likely unsupported on medium and low-end hardware.
- </constant>
- <constant name="MSAA_MAX" value="5" enum="MSAA">
+ <constant name="MSAA_MAX" value="4" enum="MSAA">
Represents the size of the [enum MSAA] enum.
</constant>
<constant name="SCREEN_SPACE_AA_DISABLED" value="0" enum="ScreenSpaceAA">
diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml
index 393f1bb0b8..c0cf3b3c7b 100644
--- a/doc/classes/ViewportTexture.xml
+++ b/doc/classes/ViewportTexture.xml
@@ -13,14 +13,10 @@
<link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link>
<link title="3D Viewport Scaling Demo">https://godotengine.org/asset-library/asset/586</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" override="true" default="true" />
<member name="viewport_path" type="NodePath" setter="set_viewport_path_in_scene" getter="get_viewport_path_in_scene" default="NodePath(&quot;&quot;)">
The path to the [Viewport] node to display. This is relative to the scene root, not to the node which uses the texture.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisibleOnScreenEnabler2D.xml b/doc/classes/VisibleOnScreenEnabler2D.xml
index c6ae8227d2..523a3a2578 100644
--- a/doc/classes/VisibleOnScreenEnabler2D.xml
+++ b/doc/classes/VisibleOnScreenEnabler2D.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="enable_mode" type="int" setter="set_enable_mode" getter="get_enable_mode" enum="VisibleOnScreenEnabler2D.EnableMode" default="0">
</member>
diff --git a/doc/classes/VisibleOnScreenEnabler3D.xml b/doc/classes/VisibleOnScreenEnabler3D.xml
index 3205d6b415..2000d54d74 100644
--- a/doc/classes/VisibleOnScreenEnabler3D.xml
+++ b/doc/classes/VisibleOnScreenEnabler3D.xml
@@ -4,15 +4,13 @@
Enables certain nodes only when approximately visible.
</brief_description>
<description>
- The VisibleOnScreenEnabler3D will disable [RigidBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibleOnScreenEnabler3D itself.
+ The VisibleOnScreenEnabler3D will disable [RigidDynamicBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibleOnScreenEnabler3D itself.
If you just want to receive notifications, use [VisibleOnScreenNotifier3D] instead.
[b]Note:[/b] VisibleOnScreenEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot].
[b]Note:[/b] VisibleOnScreenEnabler3D will not affect nodes added after scene initialization.
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="enable_mode" type="int" setter="set_enable_mode" getter="get_enable_mode" enum="VisibleOnScreenEnabler3D.EnableMode" default="0">
</member>
diff --git a/doc/classes/VisibleOnScreenNotifier2D.xml b/doc/classes/VisibleOnScreenNotifier2D.xml
index 995bd9e9d7..d82e64fa91 100644
--- a/doc/classes/VisibleOnScreenNotifier2D.xml
+++ b/doc/classes/VisibleOnScreenNotifier2D.xml
@@ -36,6 +36,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisibleOnScreenNotifier3D.xml b/doc/classes/VisibleOnScreenNotifier3D.xml
index 03db449c80..328db15231 100644
--- a/doc/classes/VisibleOnScreenNotifier3D.xml
+++ b/doc/classes/VisibleOnScreenNotifier3D.xml
@@ -36,6 +36,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml
index f949fbe7c0..bbcf2f4730 100644
--- a/doc/classes/VisualInstance3D.xml
+++ b/doc/classes/VisualInstance3D.xml
@@ -63,6 +63,4 @@
This object will only be visible for [Camera3D]s whose cull mask includes the render object this [VisualInstance3D] is set to.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptEditor.xml b/doc/classes/VisualScriptCustomNodes.xml
index 9ea889c77b..1681da7653 100644
--- a/modules/visual_script/doc_classes/VisualScriptEditor.xml
+++ b/doc/classes/VisualScriptCustomNodes.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptEditor" inherits="Object" version="4.0">
+<class name="VisualScriptCustomNodes" inherits="Object" version="4.0">
<brief_description>
+ Manages custom nodes for the Visual Script editor.
</brief_description>
<description>
+ This singleton can be used to manage (i.e., add or remove) custom nodes for the Visual Script editor.
</description>
<tutorials>
</tutorials>
@@ -32,6 +34,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeBillboard.xml b/doc/classes/VisualShaderNodeBillboard.xml
index 53bcfa7b5c..77069975ef 100644
--- a/doc/classes/VisualShaderNodeBillboard.xml
+++ b/doc/classes/VisualShaderNodeBillboard.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="billboard_type" type="int" setter="set_billboard_type" getter="get_billboard_type" enum="VisualShaderNodeBillboard.BillboardType" default="1">
Controls how the object faces the camera. See [enum BillboardType].
diff --git a/doc/classes/VisualShaderNodeBooleanConstant.xml b/doc/classes/VisualShaderNodeBooleanConstant.xml
index 688679f2a3..73a423b93a 100644
--- a/doc/classes/VisualShaderNodeBooleanConstant.xml
+++ b/doc/classes/VisualShaderNodeBooleanConstant.xml
@@ -9,13 +9,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="constant" type="bool" setter="set_constant" getter="get_constant" default="false">
A boolean constant which represents a state of this node.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeBooleanUniform.xml b/doc/classes/VisualShaderNodeBooleanUniform.xml
index 7d72f13f9d..86f61dde83 100644
--- a/doc/classes/VisualShaderNodeBooleanUniform.xml
+++ b/doc/classes/VisualShaderNodeBooleanUniform.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="default_value" type="bool" setter="set_default_value" getter="get_default_value" default="false">
A default value to be assigned within the shader.
@@ -18,6 +16,4 @@
Enables usage of the [member default_value].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeClamp.xml b/doc/classes/VisualShaderNodeClamp.xml
index 504171bb13..a68cbbec49 100644
--- a/doc/classes/VisualShaderNodeClamp.xml
+++ b/doc/classes/VisualShaderNodeClamp.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeClamp.OpType" default="0">
A type of operands and returned value.
diff --git a/doc/classes/VisualShaderNodeColorConstant.xml b/doc/classes/VisualShaderNodeColorConstant.xml
index fa1a11c488..d9f5167bd6 100644
--- a/doc/classes/VisualShaderNodeColorConstant.xml
+++ b/doc/classes/VisualShaderNodeColorConstant.xml
@@ -9,13 +9,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="constant" type="Color" setter="set_constant" getter="get_constant" default="Color(1, 1, 1, 1)">
A [Color] constant which represents a state of this node.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml
index 8d410104b8..0d7698f755 100644
--- a/doc/classes/VisualShaderNodeColorFunc.xml
+++ b/doc/classes/VisualShaderNodeColorFunc.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeColorFunc.Function" default="0">
A function to be applied to the input color. See [enum Function] for options.
diff --git a/doc/classes/VisualShaderNodeColorOp.xml b/doc/classes/VisualShaderNodeColorOp.xml
index 55b006b098..378897d3cc 100644
--- a/doc/classes/VisualShaderNodeColorOp.xml
+++ b/doc/classes/VisualShaderNodeColorOp.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeColorOp.Operator" default="0">
An operator to be applied to the inputs. See [enum Operator] for options.
diff --git a/doc/classes/VisualShaderNodeColorUniform.xml b/doc/classes/VisualShaderNodeColorUniform.xml
index bdaf301f09..9c126fe700 100644
--- a/doc/classes/VisualShaderNodeColorUniform.xml
+++ b/doc/classes/VisualShaderNodeColorUniform.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="default_value" type="Color" setter="set_default_value" getter="get_default_value" default="Color(1, 1, 1, 1)">
A default value to be assigned within the shader.
@@ -18,6 +16,4 @@
Enables usage of the [member default_value].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeComment.xml b/doc/classes/VisualShaderNodeComment.xml
index 8970e2fabb..daffd24f93 100644
--- a/doc/classes/VisualShaderNodeComment.xml
+++ b/doc/classes/VisualShaderNodeComment.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="description" type="String" setter="set_description" getter="get_description" default="&quot;&quot;">
An additional description which placed below the title.
@@ -18,6 +16,4 @@
A title of the node.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml
index 96bb3df494..49bf952b31 100644
--- a/doc/classes/VisualShaderNodeCompare.xml
+++ b/doc/classes/VisualShaderNodeCompare.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="condition" type="int" setter="set_condition" getter="get_condition" enum="VisualShaderNodeCompare.Condition" default="0">
Extra condition which is applied if [member type] is set to [constant CTYPE_VECTOR].
diff --git a/doc/classes/VisualShaderNodeConstant.xml b/doc/classes/VisualShaderNodeConstant.xml
index 8c61529dd1..d5f63be691 100644
--- a/doc/classes/VisualShaderNodeConstant.xml
+++ b/doc/classes/VisualShaderNodeConstant.xml
@@ -7,8 +7,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeCubemap.xml b/doc/classes/VisualShaderNodeCubemap.xml
index 4a5f58261d..23d98ee4be 100644
--- a/doc/classes/VisualShaderNodeCubemap.xml
+++ b/doc/classes/VisualShaderNodeCubemap.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="cube_map" type="Cubemap" setter="set_cube_map" getter="get_cube_map">
The [Cubemap] texture to sample when using [constant SOURCE_TEXTURE] as [member source].
diff --git a/doc/classes/VisualShaderNodeCubemapUniform.xml b/doc/classes/VisualShaderNodeCubemapUniform.xml
index d4bcdc9006..bfc62469a8 100644
--- a/doc/classes/VisualShaderNodeCubemapUniform.xml
+++ b/doc/classes/VisualShaderNodeCubemapUniform.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeCurveTexture.xml b/doc/classes/VisualShaderNodeCurveTexture.xml
index 4839ceab92..b039da1671 100644
--- a/doc/classes/VisualShaderNodeCurveTexture.xml
+++ b/doc/classes/VisualShaderNodeCurveTexture.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="texture" type="CurveTexture" setter="set_texture" getter="get_texture">
The source texture.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeCurveXYZTexture.xml b/doc/classes/VisualShaderNodeCurveXYZTexture.xml
index 11cdc541bb..48ff6ba800 100644
--- a/doc/classes/VisualShaderNodeCurveXYZTexture.xml
+++ b/doc/classes/VisualShaderNodeCurveXYZTexture.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="texture" type="CurveXYZTexture" setter="set_texture" getter="get_texture">
The source texture.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml
index f6dbd2ad43..b87b59c3e4 100644
--- a/doc/classes/VisualShaderNodeCustom.xml
+++ b/doc/classes/VisualShaderNodeCustom.xml
@@ -16,17 +16,17 @@
<link title="Visual Shader plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/visual_shader_plugins.html</link>
</tutorials>
<methods>
- <method name="_get_category" qualifiers="virtual">
+ <method name="_get_category" qualifiers="virtual const">
<return type="String" />
<description>
Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may look like [code]"MyGame/MyFunctions/Noise"[/code].
Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Addons" category.
</description>
</method>
- <method name="_get_code" qualifiers="virtual">
+ <method name="_get_code" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="input_vars" type="Array" />
- <argument index="1" name="output_vars" type="Array" />
+ <argument index="0" name="input_vars" type="PackedStringArray" />
+ <argument index="1" name="output_vars" type="String[]" />
<argument index="2" name="mode" type="int" />
<argument index="3" name="type" type="int" />
<description>
@@ -37,14 +37,14 @@
Defining this method is [b]required[/b].
</description>
</method>
- <method name="_get_description" qualifiers="virtual">
+ <method name="_get_description" qualifiers="virtual const">
<return type="String" />
<description>
Override this method to define the description of the associated custom node in the Visual Shader Editor's members dialog.
Defining this method is [b]optional[/b].
</description>
</method>
- <method name="_get_global_code" qualifiers="virtual">
+ <method name="_get_global_code" qualifiers="virtual const">
<return type="String" />
<argument index="0" name="mode" type="int" />
<description>
@@ -54,22 +54,22 @@
Defining this method is [b]optional[/b].
</description>
</method>
- <method name="_get_input_port_count" qualifiers="virtual">
+ <method name="_get_input_port_count" qualifiers="virtual const">
<return type="int" />
<description>
Override this method to define the amount of input ports of the associated custom node.
Defining this method is [b]required[/b]. If not overridden, the node has no input ports.
</description>
</method>
- <method name="_get_input_port_name" qualifiers="virtual">
- <return type="StringName" />
+ <method name="_get_input_port_name" qualifiers="virtual const">
+ <return type="String" />
<argument index="0" name="port" type="int" />
<description>
Override this method to define the names of input ports of the associated custom node. The names are used both for the input slots in the editor and as identifiers in the shader code, and are passed in the [code]input_vars[/code] array in [method _get_code].
Defining this method is [b]optional[/b], but recommended. If not overridden, input ports are named as [code]"in" + str(port)[/code].
</description>
</method>
- <method name="_get_input_port_type" qualifiers="virtual">
+ <method name="_get_input_port_type" qualifiers="virtual const">
<return type="int" />
<argument index="0" name="port" type="int" />
<description>
@@ -77,29 +77,29 @@
Defining this method is [b]optional[/b], but recommended. If not overridden, input ports will return the [constant VisualShaderNode.PORT_TYPE_SCALAR] type.
</description>
</method>
- <method name="_get_name" qualifiers="virtual">
+ <method name="_get_name" qualifiers="virtual const">
<return type="String" />
<description>
Override this method to define the name of the associated custom node in the Visual Shader Editor's members dialog and graph.
Defining this method is [b]optional[/b], but recommended. If not overridden, the node will be named as "Unnamed".
</description>
</method>
- <method name="_get_output_port_count" qualifiers="virtual">
+ <method name="_get_output_port_count" qualifiers="virtual const">
<return type="int" />
<description>
Override this method to define the amount of output ports of the associated custom node.
Defining this method is [b]required[/b]. If not overridden, the node has no output ports.
</description>
</method>
- <method name="_get_output_port_name" qualifiers="virtual">
- <return type="StringName" />
+ <method name="_get_output_port_name" qualifiers="virtual const">
+ <return type="String" />
<argument index="0" name="port" type="int" />
<description>
Override this method to define the names of output ports of the associated custom node. The names are used both for the output slots in the editor and as identifiers in the shader code, and are passed in the [code]output_vars[/code] array in [method _get_code].
Defining this method is [b]optional[/b], but recommended. If not overridden, output ports are named as [code]"out" + str(port)[/code].
</description>
</method>
- <method name="_get_output_port_type" qualifiers="virtual">
+ <method name="_get_output_port_type" qualifiers="virtual const">
<return type="int" />
<argument index="0" name="port" type="int" />
<description>
@@ -107,14 +107,14 @@
Defining this method is [b]optional[/b], but recommended. If not overridden, output ports will return the [constant VisualShaderNode.PORT_TYPE_SCALAR] type.
</description>
</method>
- <method name="_get_return_icon_type" qualifiers="virtual">
+ <method name="_get_return_icon_type" qualifiers="virtual const">
<return type="int" />
<description>
Override this method to define the return icon of the associated custom node in the Visual Shader Editor's members dialog.
Defining this method is [b]optional[/b]. If not overridden, no return icon is shown.
</description>
</method>
- <method name="_is_highend" qualifiers="virtual">
+ <method name="_is_highend" qualifiers="virtual const">
<return type="bool" />
<description>
Override this method to enable high-end mark in the Visual Shader Editor's members dialog.
@@ -122,6 +122,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeDeterminant.xml b/doc/classes/VisualShaderNodeDeterminant.xml
index 06b05addfa..47afbbb11c 100644
--- a/doc/classes/VisualShaderNodeDeterminant.xml
+++ b/doc/classes/VisualShaderNodeDeterminant.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeDotProduct.xml b/doc/classes/VisualShaderNodeDotProduct.xml
index 51166ab58f..49c26735c8 100644
--- a/doc/classes/VisualShaderNodeDotProduct.xml
+++ b/doc/classes/VisualShaderNodeDotProduct.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeExpression.xml b/doc/classes/VisualShaderNodeExpression.xml
index c2cbf41f45..4fde6d3aaf 100644
--- a/doc/classes/VisualShaderNodeExpression.xml
+++ b/doc/classes/VisualShaderNodeExpression.xml
@@ -9,13 +9,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="expression" type="String" setter="set_expression" getter="get_expression" default="&quot;&quot;">
An expression in Godot Shading Language, which will be injected at the start of the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), and thus cannot be used to declare functions, varyings, uniforms, or global constants.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeFaceForward.xml b/doc/classes/VisualShaderNodeFaceForward.xml
index 48f84e5495..80cb8aea4e 100644
--- a/doc/classes/VisualShaderNodeFaceForward.xml
+++ b/doc/classes/VisualShaderNodeFaceForward.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeFloatConstant.xml b/doc/classes/VisualShaderNodeFloatConstant.xml
index a71563af54..581155b013 100644
--- a/doc/classes/VisualShaderNodeFloatConstant.xml
+++ b/doc/classes/VisualShaderNodeFloatConstant.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="constant" type="float" setter="set_constant" getter="get_constant" default="0.0">
A floating-point constant which represents a state of this node.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeFloatFunc.xml b/doc/classes/VisualShaderNodeFloatFunc.xml
index ff499d25a6..884954e85e 100644
--- a/doc/classes/VisualShaderNodeFloatFunc.xml
+++ b/doc/classes/VisualShaderNodeFloatFunc.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeFloatFunc.Function" default="13">
A function to be applied to the scalar. See [enum Function] for options.
diff --git a/doc/classes/VisualShaderNodeFloatOp.xml b/doc/classes/VisualShaderNodeFloatOp.xml
index ba000f258b..3b16363f70 100644
--- a/doc/classes/VisualShaderNodeFloatOp.xml
+++ b/doc/classes/VisualShaderNodeFloatOp.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeFloatOp.Operator" default="0">
An operator to be applied to the inputs. See [enum Operator] for options.
diff --git a/doc/classes/VisualShaderNodeFloatUniform.xml b/doc/classes/VisualShaderNodeFloatUniform.xml
index fcfd78dbea..244b8c9830 100644
--- a/doc/classes/VisualShaderNodeFloatUniform.xml
+++ b/doc/classes/VisualShaderNodeFloatUniform.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="default_value" type="float" setter="set_default_value" getter="get_default_value" default="0.0">
A default value to be assigned within the shader.
diff --git a/doc/classes/VisualShaderNodeFresnel.xml b/doc/classes/VisualShaderNodeFresnel.xml
index c396b4574c..1e4479f841 100644
--- a/doc/classes/VisualShaderNodeFresnel.xml
+++ b/doc/classes/VisualShaderNodeFresnel.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeGlobalExpression.xml b/doc/classes/VisualShaderNodeGlobalExpression.xml
index 8023ba1890..0d95824158 100644
--- a/doc/classes/VisualShaderNodeGlobalExpression.xml
+++ b/doc/classes/VisualShaderNodeGlobalExpression.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeGroupBase.xml b/doc/classes/VisualShaderNodeGroupBase.xml
index a692d47638..cbe4dc2ae6 100644
--- a/doc/classes/VisualShaderNodeGroupBase.xml
+++ b/doc/classes/VisualShaderNodeGroupBase.xml
@@ -157,6 +157,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeIf.xml b/doc/classes/VisualShaderNodeIf.xml
index 418999863b..75fd797a06 100644
--- a/doc/classes/VisualShaderNodeIf.xml
+++ b/doc/classes/VisualShaderNodeIf.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml
index dd62d668eb..68f64ad98e 100644
--- a/doc/classes/VisualShaderNodeInput.xml
+++ b/doc/classes/VisualShaderNodeInput.xml
@@ -29,6 +29,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeIntConstant.xml b/doc/classes/VisualShaderNodeIntConstant.xml
index 18d6e96ab5..e4a8a4447f 100644
--- a/doc/classes/VisualShaderNodeIntConstant.xml
+++ b/doc/classes/VisualShaderNodeIntConstant.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="constant" type="int" setter="set_constant" getter="get_constant" default="0">
An integer constant which represents a state of this node.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml
index 358a3f3512..d2782efa96 100644
--- a/doc/classes/VisualShaderNodeIntFunc.xml
+++ b/doc/classes/VisualShaderNodeIntFunc.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="2">
A function to be applied to the scalar. See [enum Function] for options.
diff --git a/doc/classes/VisualShaderNodeIntOp.xml b/doc/classes/VisualShaderNodeIntOp.xml
index 2d55cdaf78..e5fcafca81 100644
--- a/doc/classes/VisualShaderNodeIntOp.xml
+++ b/doc/classes/VisualShaderNodeIntOp.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeIntOp.Operator" default="0">
An operator to be applied to the inputs. See [enum Operator] for options.
diff --git a/doc/classes/VisualShaderNodeIntUniform.xml b/doc/classes/VisualShaderNodeIntUniform.xml
index 4070553884..36a3fbd4c1 100644
--- a/doc/classes/VisualShaderNodeIntUniform.xml
+++ b/doc/classes/VisualShaderNodeIntUniform.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="default_value" type="int" setter="set_default_value" getter="get_default_value" default="0">
A default value to be assigned within the shader.
diff --git a/doc/classes/VisualShaderNodeIs.xml b/doc/classes/VisualShaderNodeIs.xml
index f46267677e..1f52e25d50 100644
--- a/doc/classes/VisualShaderNodeIs.xml
+++ b/doc/classes/VisualShaderNodeIs.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIs.Function" default="0">
The comparison function. See [enum Function] for options.
diff --git a/doc/classes/VisualShaderNodeMix.xml b/doc/classes/VisualShaderNodeMix.xml
index c70ac7e599..1ef580a983 100644
--- a/doc/classes/VisualShaderNodeMix.xml
+++ b/doc/classes/VisualShaderNodeMix.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeMix.OpType" default="0">
A type of operands and returned value.
diff --git a/doc/classes/VisualShaderNodeMultiplyAdd.xml b/doc/classes/VisualShaderNodeMultiplyAdd.xml
index daa9e02753..a0e9aef703 100644
--- a/doc/classes/VisualShaderNodeMultiplyAdd.xml
+++ b/doc/classes/VisualShaderNodeMultiplyAdd.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeMultiplyAdd.OpType" default="0">
A type of operands and returned value.
diff --git a/doc/classes/VisualShaderNodeOuterProduct.xml b/doc/classes/VisualShaderNodeOuterProduct.xml
index ba6822bfce..adc32aff10 100644
--- a/doc/classes/VisualShaderNodeOuterProduct.xml
+++ b/doc/classes/VisualShaderNodeOuterProduct.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeOutput.xml b/doc/classes/VisualShaderNodeOutput.xml
index 83da6f29f9..8193ed6167 100644
--- a/doc/classes/VisualShaderNodeOutput.xml
+++ b/doc/classes/VisualShaderNodeOutput.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeParticleAccelerator.xml b/doc/classes/VisualShaderNodeParticleAccelerator.xml
index 2f3f58c0cf..da8c505719 100644
--- a/doc/classes/VisualShaderNodeParticleAccelerator.xml
+++ b/doc/classes/VisualShaderNodeParticleAccelerator.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="VisualShaderNodeParticleAccelerator.Mode" default="0">
</member>
diff --git a/doc/classes/VisualShaderNodeParticleBoxEmitter.xml b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml
index af33b285d2..acfd8e5572 100644
--- a/doc/classes/VisualShaderNodeParticleBoxEmitter.xml
+++ b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeParticleConeVelocity.xml b/doc/classes/VisualShaderNodeParticleConeVelocity.xml
index 7a40c2a7d0..4755b19046 100644
--- a/doc/classes/VisualShaderNodeParticleConeVelocity.xml
+++ b/doc/classes/VisualShaderNodeParticleConeVelocity.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeParticleEmit.xml b/doc/classes/VisualShaderNodeParticleEmit.xml
index 120b12d643..d6e4c384aa 100644
--- a/doc/classes/VisualShaderNodeParticleEmit.xml
+++ b/doc/classes/VisualShaderNodeParticleEmit.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="flags" type="int" setter="set_flags" getter="get_flags" enum="VisualShaderNodeParticleEmit.EmitFlags" default="31">
</member>
diff --git a/doc/classes/VisualShaderNodeParticleEmitter.xml b/doc/classes/VisualShaderNodeParticleEmitter.xml
index 3a25fc1c7f..03ceb3adea 100644
--- a/doc/classes/VisualShaderNodeParticleEmitter.xml
+++ b/doc/classes/VisualShaderNodeParticleEmitter.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml
index 89a53699c9..5cd3d8f0b8 100644
--- a/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml
+++ b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml
@@ -6,12 +6,8 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="degrees_mode" type="bool" setter="set_degrees_mode" getter="is_degrees_mode" default="true">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeParticleOutput.xml b/doc/classes/VisualShaderNodeParticleOutput.xml
index c8fc66f2ff..24eb6bf825 100644
--- a/doc/classes/VisualShaderNodeParticleOutput.xml
+++ b/doc/classes/VisualShaderNodeParticleOutput.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeParticleRandomness.xml b/doc/classes/VisualShaderNodeParticleRandomness.xml
index 75736992ee..2dec41105c 100644
--- a/doc/classes/VisualShaderNodeParticleRandomness.xml
+++ b/doc/classes/VisualShaderNodeParticleRandomness.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeParticleRandomness.OpType" default="0">
</member>
diff --git a/doc/classes/VisualShaderNodeParticleRingEmitter.xml b/doc/classes/VisualShaderNodeParticleRingEmitter.xml
index ee3fbe7faf..9aabf1ed27 100644
--- a/doc/classes/VisualShaderNodeParticleRingEmitter.xml
+++ b/doc/classes/VisualShaderNodeParticleRingEmitter.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeParticleSphereEmitter.xml b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml
index d43ac518cf..e2db81ff17 100644
--- a/doc/classes/VisualShaderNodeParticleSphereEmitter.xml
+++ b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeResizableBase.xml b/doc/classes/VisualShaderNodeResizableBase.xml
index f42289a10e..ef734ef857 100644
--- a/doc/classes/VisualShaderNodeResizableBase.xml
+++ b/doc/classes/VisualShaderNodeResizableBase.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(0, 0)">
The size of the node in the visual shader graph.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeSDFRaymarch.xml b/doc/classes/VisualShaderNodeSDFRaymarch.xml
index 775f2814c2..64a3e5a310 100644
--- a/doc/classes/VisualShaderNodeSDFRaymarch.xml
+++ b/doc/classes/VisualShaderNodeSDFRaymarch.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeSDFToScreenUV.xml b/doc/classes/VisualShaderNodeSDFToScreenUV.xml
index 40fb66e364..07e267b990 100644
--- a/doc/classes/VisualShaderNodeSDFToScreenUV.xml
+++ b/doc/classes/VisualShaderNodeSDFToScreenUV.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeSample3D.xml b/doc/classes/VisualShaderNodeSample3D.xml
index 82bcac5f69..85d2367eac 100644
--- a/doc/classes/VisualShaderNodeSample3D.xml
+++ b/doc/classes/VisualShaderNodeSample3D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeSample3D.Source" default="0">
An input source type.
diff --git a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml
index 305586ac49..8d108a5d28 100644
--- a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml
+++ b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarDerivativeFunc.Function" default="0">
The derivative type. See [enum Function] for options.
diff --git a/doc/classes/VisualShaderNodeScreenUVToSDF.xml b/doc/classes/VisualShaderNodeScreenUVToSDF.xml
index 2e121ffc54..8f1f4f486c 100644
--- a/doc/classes/VisualShaderNodeScreenUVToSDF.xml
+++ b/doc/classes/VisualShaderNodeScreenUVToSDF.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeSmoothStep.xml b/doc/classes/VisualShaderNodeSmoothStep.xml
index 0ed53a8c26..2f8c7e0f33 100644
--- a/doc/classes/VisualShaderNodeSmoothStep.xml
+++ b/doc/classes/VisualShaderNodeSmoothStep.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeSmoothStep.OpType" default="0">
A type of operands and returned value.
diff --git a/doc/classes/VisualShaderNodeStep.xml b/doc/classes/VisualShaderNodeStep.xml
index 694c144445..5d8b464814 100644
--- a/doc/classes/VisualShaderNodeStep.xml
+++ b/doc/classes/VisualShaderNodeStep.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeStep.OpType" default="0">
A type of operands and returned value.
diff --git a/doc/classes/VisualShaderNodeSwitch.xml b/doc/classes/VisualShaderNodeSwitch.xml
index 3961070a74..921092cd07 100644
--- a/doc/classes/VisualShaderNodeSwitch.xml
+++ b/doc/classes/VisualShaderNodeSwitch.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeSwitch.OpType" default="0">
A type of operands and returned value.
diff --git a/doc/classes/VisualShaderNodeTexture.xml b/doc/classes/VisualShaderNodeTexture.xml
index 17c079f385..0a2af30f67 100644
--- a/doc/classes/VisualShaderNodeTexture.xml
+++ b/doc/classes/VisualShaderNodeTexture.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeTexture.Source" default="0">
Determines the source for the lookup. See [enum Source] for options.
diff --git a/doc/classes/VisualShaderNodeTexture2DArray.xml b/doc/classes/VisualShaderNodeTexture2DArray.xml
index 3c6d328ed0..cd7c526e1f 100644
--- a/doc/classes/VisualShaderNodeTexture2DArray.xml
+++ b/doc/classes/VisualShaderNodeTexture2DArray.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="texture_array" type="Texture2DArray" setter="set_texture_array" getter="get_texture_array">
A source texture array. Used if [member VisualShaderNodeSample3D.source] is set to [constant VisualShaderNodeSample3D.SOURCE_TEXTURE].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml b/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml
index 976fcf26c8..ba320afd18 100644
--- a/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml
+++ b/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTexture3D.xml b/doc/classes/VisualShaderNodeTexture3D.xml
index 17929e823e..2f5b750ce1 100644
--- a/doc/classes/VisualShaderNodeTexture3D.xml
+++ b/doc/classes/VisualShaderNodeTexture3D.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="texture" type="Texture3D" setter="set_texture" getter="get_texture">
A source texture. Used if [member VisualShaderNodeSample3D.source] is set to [constant VisualShaderNodeSample3D.SOURCE_TEXTURE].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTexture3DUniform.xml b/doc/classes/VisualShaderNodeTexture3DUniform.xml
index d9e9acf117..3b002c5449 100644
--- a/doc/classes/VisualShaderNodeTexture3DUniform.xml
+++ b/doc/classes/VisualShaderNodeTexture3DUniform.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTextureSDF.xml b/doc/classes/VisualShaderNodeTextureSDF.xml
index b5c89c2c31..09a5851ef7 100644
--- a/doc/classes/VisualShaderNodeTextureSDF.xml
+++ b/doc/classes/VisualShaderNodeTextureSDF.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTextureSDFNormal.xml b/doc/classes/VisualShaderNodeTextureSDFNormal.xml
index 25fe1c4b28..e66492cebf 100644
--- a/doc/classes/VisualShaderNodeTextureSDFNormal.xml
+++ b/doc/classes/VisualShaderNodeTextureSDFNormal.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml
index 492c6010df..26c72d2714 100644
--- a/doc/classes/VisualShaderNodeTextureUniform.xml
+++ b/doc/classes/VisualShaderNodeTextureUniform.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="color_default" type="int" setter="set_color_default" getter="get_color_default" enum="VisualShaderNodeTextureUniform.ColorDefault" default="0">
Sets the default color if no texture is assigned to the uniform.
diff --git a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml b/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml
index 28504cc7ac..76b5506cba 100644
--- a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml
+++ b/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTransformCompose.xml b/doc/classes/VisualShaderNodeTransformCompose.xml
index b82ce9bdd8..4ec59962e9 100644
--- a/doc/classes/VisualShaderNodeTransformCompose.xml
+++ b/doc/classes/VisualShaderNodeTransformCompose.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTransformConstant.xml b/doc/classes/VisualShaderNodeTransformConstant.xml
index 30178752d0..66eda94fbe 100644
--- a/doc/classes/VisualShaderNodeTransformConstant.xml
+++ b/doc/classes/VisualShaderNodeTransformConstant.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="constant" type="Transform3D" setter="set_constant" getter="get_constant" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
A [Transform3D] constant which represents the state of this node.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTransformDecompose.xml b/doc/classes/VisualShaderNodeTransformDecompose.xml
index b815efc67a..e1bfa94a07 100644
--- a/doc/classes/VisualShaderNodeTransformDecompose.xml
+++ b/doc/classes/VisualShaderNodeTransformDecompose.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTransformFunc.xml b/doc/classes/VisualShaderNodeTransformFunc.xml
index 51b1100e22..bbc36fc8d5 100644
--- a/doc/classes/VisualShaderNodeTransformFunc.xml
+++ b/doc/classes/VisualShaderNodeTransformFunc.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeTransformFunc.Function" default="0">
The function to be computed. See [enum Function] for options.
diff --git a/doc/classes/VisualShaderNodeTransformOp.xml b/doc/classes/VisualShaderNodeTransformOp.xml
index 02debd890f..65d5b9cbbd 100644
--- a/doc/classes/VisualShaderNodeTransformOp.xml
+++ b/doc/classes/VisualShaderNodeTransformOp.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformOp.Operator" default="0">
The type of the operation to be performed on the transforms. See [enum Operator] for options.
diff --git a/doc/classes/VisualShaderNodeTransformUniform.xml b/doc/classes/VisualShaderNodeTransformUniform.xml
index 2f7818ec8a..b6d8801932 100644
--- a/doc/classes/VisualShaderNodeTransformUniform.xml
+++ b/doc/classes/VisualShaderNodeTransformUniform.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="default_value" type="Transform3D" setter="set_default_value" getter="get_default_value" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
A default value to be assigned within the shader.
@@ -18,6 +16,4 @@
Enables usage of the [member default_value].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTransformVecMult.xml b/doc/classes/VisualShaderNodeTransformVecMult.xml
index d8f7ebbd55..02fe18c7a0 100644
--- a/doc/classes/VisualShaderNodeTransformVecMult.xml
+++ b/doc/classes/VisualShaderNodeTransformVecMult.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformVecMult.Operator" default="0">
The multiplication type to be performed. See [enum Operator] for options.
diff --git a/doc/classes/VisualShaderNodeUVFunc.xml b/doc/classes/VisualShaderNodeUVFunc.xml
index 042644feb0..26bcea07e8 100644
--- a/doc/classes/VisualShaderNodeUVFunc.xml
+++ b/doc/classes/VisualShaderNodeUVFunc.xml
@@ -7,8 +7,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeUVFunc.Function" default="0">
A function to be applied to the texture coordinates. See [enum Function] for options.
diff --git a/doc/classes/VisualShaderNodeUniform.xml b/doc/classes/VisualShaderNodeUniform.xml
index 561d87af45..15c760656e 100644
--- a/doc/classes/VisualShaderNodeUniform.xml
+++ b/doc/classes/VisualShaderNodeUniform.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="qualifier" type="int" setter="set_qualifier" getter="get_qualifier" enum="VisualShaderNodeUniform.Qualifier" default="0">
</member>
diff --git a/doc/classes/VisualShaderNodeUniformRef.xml b/doc/classes/VisualShaderNodeUniformRef.xml
index db02e398ab..44a28ed53c 100644
--- a/doc/classes/VisualShaderNodeUniformRef.xml
+++ b/doc/classes/VisualShaderNodeUniformRef.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="uniform_name" type="String" setter="set_uniform_name" getter="get_uniform_name" default="&quot;[None]&quot;">
The name of the uniform which this reference points to.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVec3Constant.xml b/doc/classes/VisualShaderNodeVec3Constant.xml
index 28c3d22345..0a64357962 100644
--- a/doc/classes/VisualShaderNodeVec3Constant.xml
+++ b/doc/classes/VisualShaderNodeVec3Constant.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="constant" type="Vector3" setter="set_constant" getter="get_constant" default="Vector3(0, 0, 0)">
A [Vector3] constant which represents the state of this node.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVec3Uniform.xml b/doc/classes/VisualShaderNodeVec3Uniform.xml
index 215e2cfbea..2b72e5252a 100644
--- a/doc/classes/VisualShaderNodeVec3Uniform.xml
+++ b/doc/classes/VisualShaderNodeVec3Uniform.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="default_value" type="Vector3" setter="set_default_value" getter="get_default_value" default="Vector3(0, 0, 0)">
A default value to be assigned within the shader.
@@ -18,6 +16,4 @@
Enables usage of the [member default_value].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorCompose.xml b/doc/classes/VisualShaderNodeVectorCompose.xml
index c9ff3cd38e..ebc30d03f4 100644
--- a/doc/classes/VisualShaderNodeVectorCompose.xml
+++ b/doc/classes/VisualShaderNodeVectorCompose.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorDecompose.xml b/doc/classes/VisualShaderNodeVectorDecompose.xml
index 95af323c9b..09986bf969 100644
--- a/doc/classes/VisualShaderNodeVectorDecompose.xml
+++ b/doc/classes/VisualShaderNodeVectorDecompose.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml
index 9fd8ba2806..e0c7c8618c 100644
--- a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml
+++ b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeVectorDerivativeFunc.Function" default="0">
A derivative type. See [enum Function] for options.
diff --git a/doc/classes/VisualShaderNodeVectorDistance.xml b/doc/classes/VisualShaderNodeVectorDistance.xml
index 2da04b122e..098787e583 100644
--- a/doc/classes/VisualShaderNodeVectorDistance.xml
+++ b/doc/classes/VisualShaderNodeVectorDistance.xml
@@ -9,8 +9,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml
index 79bf3f6a07..27ae82e11b 100644
--- a/doc/classes/VisualShaderNodeVectorFunc.xml
+++ b/doc/classes/VisualShaderNodeVectorFunc.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeVectorFunc.Function" default="0">
The function to be performed. See [enum Function] for options.
diff --git a/doc/classes/VisualShaderNodeVectorLen.xml b/doc/classes/VisualShaderNodeVectorLen.xml
index 77261d3190..165455e622 100644
--- a/doc/classes/VisualShaderNodeVectorLen.xml
+++ b/doc/classes/VisualShaderNodeVectorLen.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorOp.xml b/doc/classes/VisualShaderNodeVectorOp.xml
index 263485d38e..5e8f0abda3 100644
--- a/doc/classes/VisualShaderNodeVectorOp.xml
+++ b/doc/classes/VisualShaderNodeVectorOp.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeVectorOp.Operator" default="0">
The operator to be used. See [enum Operator] for options.
diff --git a/doc/classes/VisualShaderNodeVectorRefract.xml b/doc/classes/VisualShaderNodeVectorRefract.xml
index 178c35f49a..59e98fb000 100644
--- a/doc/classes/VisualShaderNodeVectorRefract.xml
+++ b/doc/classes/VisualShaderNodeVectorRefract.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/VoxelGIData.xml b/doc/classes/VoxelGIData.xml
index 5c2c7f9dc6..f0bd2a0601 100644
--- a/doc/classes/VoxelGIData.xml
+++ b/doc/classes/VoxelGIData.xml
@@ -67,6 +67,4 @@
<member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="false">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml
index 339c1620bf..56617b581f 100644
--- a/doc/classes/WeakRef.xml
+++ b/doc/classes/WeakRef.xml
@@ -16,6 +16,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index d7b156cc57..15d844aacb 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Window" inherits="Viewport" version="4.0">
<brief_description>
+ Base class for all windows.
</brief_description>
<description>
+ A node that creates a window.
</description>
<tutorials>
</tutorials>
@@ -10,6 +12,7 @@
<method name="can_draw" qualifiers="const">
<return type="bool" />
<description>
+ Returns whether the window is being drawn to the screen.
</description>
</method>
<method name="child_controls_changed">
@@ -27,6 +30,7 @@
<return type="bool" />
<argument index="0" name="flag" type="int" enum="Window.Flags" />
<description>
+ Returns [code]true[/code] if the flag is set.
</description>
</method>
<method name="get_layout_direction" qualifiers="const">
@@ -38,6 +42,7 @@
<method name="get_real_size" qualifiers="const">
<return type="Vector2i" />
<description>
+ Returns the window's size including its border.
</description>
</method>
<method name="get_theme_color" qualifiers="const">
@@ -87,11 +92,13 @@
<method name="grab_focus">
<return type="void" />
<description>
+ Causes the window to grab focus, allowing it to receive user input.
</description>
</method>
<method name="has_focus" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the window is focused.
</description>
</method>
<method name="has_theme_color" qualifiers="const">
@@ -148,6 +155,7 @@
<method name="is_embedded" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the window is currently embedded in another window.
</description>
</method>
<method name="is_layout_rtl" qualifiers="const">
@@ -212,6 +220,7 @@
<argument index="0" name="flag" type="int" enum="Window.Flags" />
<argument index="1" name="enabled" type="bool" />
<description>
+ Sets a specified window flag.
</description>
</method>
<method name="set_ime_active">
@@ -247,11 +256,13 @@
</methods>
<members>
<member name="always_on_top" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], the window will be on top of all other windows.
</member>
<member name="auto_translate" type="bool" setter="set_auto_translate" getter="is_auto_translating" default="true">
Toggles if any text should automatically change to its translated version depending on the current locale.
</member>
<member name="borderless" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], the window will have no borders.
</member>
<member name="content_scale_aspect" type="int" setter="set_content_scale_aspect" getter="get_content_scale_aspect" enum="Window.ContentScaleAspect" default="0">
</member>
@@ -260,6 +271,7 @@
<member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i(0, 0)">
</member>
<member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0">
+ The screen the window is currently on.
</member>
<member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false">
</member>
@@ -268,16 +280,21 @@
<member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" default="Vector2i(0, 0)">
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Window.Mode" default="0">
+ Set's the window's current mode.
+ [b]Note:[/b] Fullscreen mode is not exclusive fullscreen on Windows and Linux.
</member>
<member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i(0, 0)">
+ The window's position in pixels.
</member>
<member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(100, 100)">
+ The window's size in pixels.
</member>
<member name="theme" type="Theme" setter="set_theme" getter="get_theme">
</member>
<member name="theme_type_variation" type="StringName" setter="set_theme_type_variation" getter="get_theme_type_variation" default="&amp;&quot;&quot;">
</member>
<member name="title" type="String" setter="set_title" getter="get_title" default="&quot;&quot;">
+ The window's title.
</member>
<member name="transient" type="bool" setter="set_transient" getter="is_transient" default="false">
</member>
@@ -286,8 +303,10 @@
<member name="unfocusable" type="bool" setter="set_flag" getter="get_flag" default="false">
</member>
<member name="unresizable" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], the window can't be resized.
</member>
<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
+ If [code]true[/code], the window is visible.
</member>
<member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" default="false">
</member>
@@ -340,20 +359,26 @@
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="30">
</constant>
<constant name="MODE_WINDOWED" value="0" enum="Mode">
+ Windowed mode.
</constant>
<constant name="MODE_MINIMIZED" value="1" enum="Mode">
+ Minimized window mode.
</constant>
<constant name="MODE_MAXIMIZED" value="2" enum="Mode">
+ Maximized window mode.
</constant>
<constant name="MODE_FULLSCREEN" value="3" enum="Mode">
Fullscreen window mode. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=https://docs.godotengine.org/en/latest/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
</constant>
<constant name="FLAG_RESIZE_DISABLED" value="0" enum="Flags">
+ The window's ability to be resized.
</constant>
<constant name="FLAG_BORDERLESS" value="1" enum="Flags">
+ Borderless window.
</constant>
<constant name="FLAG_ALWAYS_ON_TOP" value="2" enum="Flags">
+ Flag for making the window always on top of all other windows.
</constant>
<constant name="FLAG_TRANSPARENT" value="3" enum="Flags">
</constant>
diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml
index 20b3afbd0b..a6a4701dd4 100644
--- a/doc/classes/World2D.xml
+++ b/doc/classes/World2D.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="canvas" type="RID" setter="" getter="get_canvas">
The [RID] of this world's canvas resource. Used by the [RenderingServer] for 2D drawing.
@@ -25,6 +23,4 @@
The [RID] of this world's physics space resource. Used by the [PhysicsServer2D] for 2D physics, treating it as both a space and an area.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml
index 610ecacff4..136ca2c598 100644
--- a/doc/classes/World3D.xml
+++ b/doc/classes/World3D.xml
@@ -9,8 +9,6 @@
<tutorials>
<link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects">
</member>
@@ -33,6 +31,4 @@
The World3D's physics space.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/WorldMarginShape2D.xml b/doc/classes/WorldBoundaryShape2D.xml
index 1839ab16ad..cfbab4dcf8 100644
--- a/doc/classes/WorldMarginShape2D.xml
+++ b/doc/classes/WorldBoundaryShape2D.xml
@@ -1,15 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WorldMarginShape2D" inherits="Shape2D" version="4.0">
+<class name="WorldBoundaryShape2D" inherits="Shape2D" version="4.0">
<brief_description>
- Line shape for 2D collisions.
+ World boundary shape for 2D collisions.
</brief_description>
<description>
- Line shape for 2D collisions. It works like a 2D plane and will not allow any physics body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame.
+ World boundary shape for 2D collisions. It works like a 2D plane and will not allow any physics body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame.
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="distance" type="float" setter="set_distance" getter="get_distance" default="0.0">
The line's distance from the origin.
@@ -18,6 +16,4 @@
The line's normal. Defaults to [code]Vector2.UP[/code].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/WorldBoundaryShape3D.xml b/doc/classes/WorldBoundaryShape3D.xml
new file mode 100644
index 0000000000..a916ac03d0
--- /dev/null
+++ b/doc/classes/WorldBoundaryShape3D.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="WorldBoundaryShape3D" inherits="Shape3D" version="4.0">
+ <brief_description>
+ World boundary shape for 3D collisions.
+ </brief_description>
+ <description>
+ World boundary shape for 3D collisions. It works like an infinite plane and will not allow any physics body to go to the negative side. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [WorldBoundaryShape3D] is used in a [PhysicsBody3D], it will cause colliding objects placed "below" it to teleport "above" the plane.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane(0, 1, 0, 0)">
+ The [Plane] used by the [WorldBoundaryShape3D] for collision.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index 6aa2db00b4..bd25a74c5b 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -14,8 +14,6 @@
<link title="2D HDR Demo">https://godotengine.org/asset-library/asset/110</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects">
</member>
@@ -23,6 +21,4 @@
The [Environment] resource used by this [WorldEnvironment], defining the default properties.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/WorldMarginShape3D.xml b/doc/classes/WorldMarginShape3D.xml
deleted file mode 100644
index 9a26f254f1..0000000000
--- a/doc/classes/WorldMarginShape3D.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WorldMarginShape3D" inherits="Shape3D" version="4.0">
- <brief_description>
- Infinite plane shape for 3D collisions.
- </brief_description>
- <description>
- An infinite plane shape for 3D collisions. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [WorldMarginShape3D] is used in a [PhysicsBody3D], it will cause colliding objects placed "below" it to teleport "above" the plane.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane(0, 1, 0, 0)">
- The [Plane] used by the [WorldMarginShape3D] for collision.
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/X509Certificate.xml b/doc/classes/X509Certificate.xml
index 5900e68339..0af7094ee1 100644
--- a/doc/classes/X509Certificate.xml
+++ b/doc/classes/X509Certificate.xml
@@ -26,6 +26,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/XRAnchor3D.xml b/doc/classes/XRAnchor3D.xml
index ccbfab1273..94fc8fc13d 100644
--- a/doc/classes/XRAnchor3D.xml
+++ b/doc/classes/XRAnchor3D.xml
@@ -55,6 +55,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/XRCamera3D.xml b/doc/classes/XRCamera3D.xml
index b2682f7a90..682a797b5e 100644
--- a/doc/classes/XRCamera3D.xml
+++ b/doc/classes/XRCamera3D.xml
@@ -10,8 +10,4 @@
<tutorials>
<link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml
index 47ddc22823..1a05a7b651 100644
--- a/doc/classes/XRController3D.xml
+++ b/doc/classes/XRController3D.xml
@@ -89,6 +89,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml
index 1fb73e59b4..2a740ab1e8 100644
--- a/doc/classes/XRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="XRInterface" inherits="RefCounted" version="4.0">
<brief_description>
- Base class for an AR/VR interface implementation.
+ Base class for an XR interface implementation.
</brief_description>
<description>
This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass XRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform.
@@ -26,17 +26,17 @@
<method name="get_name" qualifiers="const">
<return type="StringName" />
<description>
- Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc).
+ Returns the name of this interface (OpenXR, OpenVR, OpenHMD, ARKit, etc).
</description>
</method>
- <method name="get_render_targetsize">
+ <method name="get_render_target_size">
<return type="Vector2" />
<description>
Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform.
</description>
</method>
<method name="get_tracking_status" qualifiers="const">
- <return type="int" enum="XRInterface.Tracking_status" />
+ <return type="int" enum="XRInterface.TrackingStatus" />
<description>
If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
</description>
@@ -52,11 +52,17 @@
<description>
Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output.
After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence.
- [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR.
+ [b]Note:[/b] You must enable the XR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR.
If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport. It will be used to output to the HMD, leaving you free to do anything you like in the main window, such as using a separate camera as a spectator camera or rendering something completely different.
While currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD.
</description>
</method>
+ <method name="is_initialized" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Is [code]true[/code] if this interface has been initialised.
+ </description>
+ </method>
<method name="uninitialize">
<return type="void" />
<description>
@@ -68,10 +74,7 @@
<member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled" default="false">
On an AR interface, [code]true[/code] if anchor detection is enabled.
</member>
- <member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized" default="false">
- [code]true[/code] if this interface been initialized.
- </member>
- <member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary" default="false">
+ <member name="interface_is_primary" type="bool" setter="set_primary" getter="is_primary" default="false">
[code]true[/code] if this is the primary interface.
</member>
</members>
@@ -89,7 +92,7 @@
This interface supports AR (video background and real world tracking).
</constant>
<constant name="XR_EXTERNAL" value="8" enum="Capabilities">
- This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes.
+ This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_target_size]). Using a separate viewport node frees up the main viewport for other purposes.
</constant>
<constant name="EYE_MONO" value="0" enum="Eyes">
Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported.
@@ -100,19 +103,19 @@
<constant name="EYE_RIGHT" value="2" enum="Eyes">
Right eye output, this is mostly used internally when rendering the image for the right eye and obtaining positioning and projection information.
</constant>
- <constant name="XR_NORMAL_TRACKING" value="0" enum="Tracking_status">
+ <constant name="XR_NORMAL_TRACKING" value="0" enum="TrackingStatus">
Tracking is behaving as expected.
</constant>
- <constant name="XR_EXCESSIVE_MOTION" value="1" enum="Tracking_status">
+ <constant name="XR_EXCESSIVE_MOTION" value="1" enum="TrackingStatus">
Tracking is hindered by excessive motion (the player is moving faster than tracking can keep up).
</constant>
- <constant name="XR_INSUFFICIENT_FEATURES" value="2" enum="Tracking_status">
+ <constant name="XR_INSUFFICIENT_FEATURES" value="2" enum="TrackingStatus">
Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc.
</constant>
- <constant name="XR_UNKNOWN_TRACKING" value="3" enum="Tracking_status">
+ <constant name="XR_UNKNOWN_TRACKING" value="3" enum="TrackingStatus">
We don't know the status of the tracking or this interface does not provide feedback.
</constant>
- <constant name="XR_NOT_TRACKING" value="4" enum="Tracking_status">
+ <constant name="XR_NOT_TRACKING" value="4" enum="TrackingStatus">
Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.).
</constant>
</constants>
diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml
new file mode 100644
index 0000000000..84b46e0ddd
--- /dev/null
+++ b/doc/classes/XRInterfaceExtension.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="XRInterfaceExtension" inherits="XRInterface" version="4.0">
+ <brief_description>
+ Base class for XR interface extensions (plugins).
+ </brief_description>
+ <description>
+ External XR interface plugins should inherit from this class.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_commit_views" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="render_target" type="RID" />
+ <argument index="1" name="screen_rect" type="Rect2" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_anchor_detection_is_enabled" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_camera_feed_id" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_camera_transform" qualifiers="virtual">
+ <return type="Transform3D" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_capabilities" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_name" qualifiers="virtual const">
+ <return type="StringName" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_projection_for_view" qualifiers="virtual">
+ <return type="PackedFloat64Array" />
+ <argument index="0" name="view" type="int" />
+ <argument index="1" name="aspect" type="float" />
+ <argument index="2" name="z_near" type="float" />
+ <argument index="3" name="z_far" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_render_target_size" qualifiers="virtual">
+ <return type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_tracking_status" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_transform_for_view" qualifiers="virtual">
+ <return type="Transform3D" />
+ <argument index="0" name="view" type="int" />
+ <argument index="1" name="cam_transform" type="Transform3D" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_view_count" qualifiers="virtual">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_initialize" qualifiers="virtual">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_is_initialized" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_notification" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="what" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_process" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_anchor_detection_is_enabled" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="enabled" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_uninitialize" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="add_blit">
+ <return type="void" />
+ <argument index="0" name="render_target" type="RID" />
+ <argument index="1" name="src_rect" type="Rect2" />
+ <argument index="2" name="dst_rect" type="Rect2i" />
+ <argument index="3" name="use_layer" type="bool" />
+ <argument index="4" name="layer" type="int" />
+ <argument index="5" name="apply_lens_distortion" type="bool" />
+ <argument index="6" name="eye_center" type="Vector2" />
+ <argument index="7" name="k1" type="float" />
+ <argument index="8" name="k2" type="float" />
+ <argument index="9" name="upscale" type="float" />
+ <argument index="10" name="aspect_ratio" type="float" />
+ <description>
+ Blits our render results to screen optionally applying lens distortion. This can only be called while processing [code]_commit_views[/code].
+ </description>
+ </method>
+ <method name="get_render_target_texture">
+ <return type="RID" />
+ <argument index="0" name="render_target" type="RID" />
+ <description>
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/XROrigin3D.xml b/doc/classes/XROrigin3D.xml
index 3e075e99b9..cdf319093c 100644
--- a/doc/classes/XROrigin3D.xml
+++ b/doc/classes/XROrigin3D.xml
@@ -12,14 +12,10 @@
<tutorials>
<link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
</tutorials>
- <methods>
- </methods>
<members>
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0">
Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter.
[b]Note:[/b] This method is a passthrough to the [XRServer] itself.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml
index 5dd9b75ad2..85170804cc 100644
--- a/doc/classes/XRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -37,13 +37,6 @@
You should call this method after a few seconds have passed. For instance, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism.
</description>
</method>
- <method name="clear_primary_interface_if">
- <return type="void" />
- <argument index="0" name="interface" type="XRInterface" />
- <description>
- Clears our current primary interface if it is set to the provided interface.
- </description>
- </method>
<method name="find_interface" qualifiers="const">
<return type="XRInterface" />
<argument index="0" name="name" type="String" />
diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml
index f3b16217e5..39e34a7b96 100644
--- a/doc/classes/bool.xml
+++ b/doc/classes/bool.xml
@@ -121,6 +121,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="bool" />
<description>
Returns [code]true[/code] if two bools are different, i.e. one is [code]true[/code] and the other is [code]false[/code].
@@ -135,6 +140,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="bool" />
<description>
Returns [code]true[/code] if two bools are equal, i.e. both are [code]true[/code] or both are [code]false[/code].
@@ -148,6 +158,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 60878eb0bd..b45cdd2099 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -4,9 +4,13 @@
Float built-in type.
</brief_description>
<description>
- Float built-in type.
+ The [float] built-in type is a 64-bit double-precision floating-point number, equivalent to [code]double[/code] in C++. This type has 14 reliable decimal digits of precision. The [float] type can be stored in [Variant], which is the generic type used by the engine. The maximum value of [float] is approximately [code]1.79769e308[/code], and the minimum is approximately [code]-1.79769e308[/code].
+ Many methods and properties in the engine use 32-bit single-precision floating-point numbers instead, equivalent to [code]float[/code] in C++, which have 6 reliable decimal digits of precision. For data structures such as [Vector2] and [Vector3], Godot uses 32-bit floating-point numbers by default, but it can be changed to use 64-bit doubles if Godot is compiled with the [code]float=64[/code] option.
+ Math done using the [float] type is not guaranteed to be exact or deterministic, and will often result in small errors. You should usually use the [method @GlobalScope.is_equal_approx] and [method @GlobalScope.is_zero_approx] methods instead of [code]==[/code] to compare [float] values for equality.
</description>
<tutorials>
+ <link title="Wikipedia: Double-precision floating-point format">https://en.wikipedia.org/wiki/Double-precision_floating-point_format</link>
+ <link title="Wikipedia: Single-precision floating-point format">https://en.wikipedia.org/wiki/Single-precision_floating-point_format</link>
</tutorials>
<methods>
<method name="float" qualifiers="constructor">
@@ -38,6 +42,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if two floats are different from each other.
@@ -187,6 +196,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if both floats are exactly equal.
@@ -231,14 +245,14 @@
<method name="operator unary+" qualifiers="operator">
<return type="float" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
</method>
<method name="operator unary-" qualifiers="operator">
<return type="float" />
<description>
+ Returns the negative value of the [float]. If positive, turns the number negative. If negative, turns the number positive. With floats, the number zero can be either positive or negative.
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index 84a01aa0d0..a75d11ba4a 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -68,6 +68,11 @@
</method>
<method name="operator !=" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if operands are different from each other.
@@ -173,17 +178,17 @@
</description>
</method>
<method name="operator +" qualifiers="operator">
- <return type="float" />
- <argument index="0" name="right" type="float" />
+ <return type="int" />
+ <argument index="0" name="right" type="int" />
<description>
- Adds an [int] to a [float]. The result is a [float].
+ Adds two integers.
</description>
</method>
<method name="operator +" qualifiers="operator">
- <return type="int" />
- <argument index="0" name="right" type="int" />
+ <return type="float" />
+ <argument index="0" name="right" type="float" />
<description>
- Adds two integers.
+ Adds an [int] to a [float]. The result is a [float].
</description>
</method>
<method name="operator -" qualifiers="operator">
@@ -262,6 +267,11 @@
</method>
<method name="operator ==" qualifiers="operator">
<return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
<argument index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if the integer is equal to the given [float].
@@ -327,11 +337,13 @@
<method name="operator unary+" qualifiers="operator">
<return type="int" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
</method>
<method name="operator unary-" qualifiers="operator">
<return type="int" />
<description>
+ Returns the negated value of the [int]. If positive, turns the number negative. If negative, turns the number positive. If zero, does nothing.
</description>
</method>
<method name="operator |" qualifiers="operator">
@@ -363,6 +375,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index 6f9a07af1f..a23324fd24 100755
--- a/doc/tools/makerst.py
+++ b/doc/tools/makerst.py
@@ -1007,6 +1007,8 @@ def format_table(f, data, remove_empty_columns=False): # type: (TextIO, Iterabl
def make_type(klass, state): # type: (str, State) -> str
+ if klass.find("*") != -1: # Pointer, ignore
+ return klass
link_type = klass
if link_type.endswith("[]"): # Typed array, strip [] to link to contained type.
link_type = link_type[:-2]
@@ -1031,9 +1033,6 @@ def make_enum(t, state): # type: (str, State) -> str
if c in state.classes and e not in state.classes[c].enums:
c = "@GlobalScope"
- if not c in state.classes and c.startswith("_"):
- c = c[1:] # Remove the underscore prefix
-
if c in state.classes and e in state.classes[c].enums:
return ":ref:`{0}<enum_{1}_{0}>`".format(e, c)
diff --git a/doc/translations/ar.po b/doc/translations/ar.po
index 4199bca6c7..b06b6f013e 100644
--- a/doc/translations/ar.po
+++ b/doc/translations/ar.po
@@ -9896,7 +9896,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33047,8 +33047,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/ca.po b/doc/translations/ca.po
index c72cba18bc..8b1b10a7db 100644
--- a/doc/translations/ca.po
+++ b/doc/translations/ca.po
@@ -9927,7 +9927,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33078,8 +33078,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot
index 321e67f759..375a9e850c 100644
--- a/doc/translations/classes.pot
+++ b/doc/translations/classes.pot
@@ -9897,7 +9897,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33048,8 +33048,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/cs.po b/doc/translations/cs.po
index 3584fc5062..d6d7025d92 100644
--- a/doc/translations/cs.po
+++ b/doc/translations/cs.po
@@ -10389,7 +10389,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33547,8 +33547,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/de.po b/doc/translations/de.po
index 76eff809ff..83eabb14fe 100644
--- a/doc/translations/de.po
+++ b/doc/translations/de.po
@@ -10211,7 +10211,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33464,8 +33464,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/es.po b/doc/translations/es.po
index 44b3b22597..1426b57e30 100644
--- a/doc/translations/es.po
+++ b/doc/translations/es.po
@@ -12986,7 +12986,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
"Convierte un valor [String] a un valor booleano, este método devolverá "
@@ -44845,8 +44845,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
@@ -44878,8 +44878,8 @@ msgstr ""
"usando [code]in[/code]:\n"
"[codeblock]\n"
"var nodo = Node2D.new()\n"
-"print(\"position\" in nodo) # Imprime \"True\".\n"
-"print(\"otra_propiedad\" in nodo) # Imprime \"False\".\n"
+"print(\"position\" in nodo) # Imprime \"true\".\n"
+"print(\"otra_propiedad\" in nodo) # Imprime \"false\".\n"
"[/codeblock]\n"
"El operador [code]in[/code] evaluará a [code]true[/code] siempre que la "
"clave exista, incluso si el valor es [code]null[/code].\n"
diff --git a/doc/translations/fa.po b/doc/translations/fa.po
index 2a185fadc5..7455b828de 100644
--- a/doc/translations/fa.po
+++ b/doc/translations/fa.po
@@ -9902,7 +9902,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33053,8 +33053,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/fi.po b/doc/translations/fi.po
index a5f470c60b..94cda2b9d9 100644
--- a/doc/translations/fi.po
+++ b/doc/translations/fi.po
@@ -9915,7 +9915,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33066,8 +33066,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/fr.po b/doc/translations/fr.po
index 2d9b1db565..e0aef69af3 100644
--- a/doc/translations/fr.po
+++ b/doc/translations/fr.po
@@ -10233,7 +10233,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33414,8 +33414,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/id.po b/doc/translations/id.po
index cd841fc553..fa90969628 100644
--- a/doc/translations/id.po
+++ b/doc/translations/id.po
@@ -9928,7 +9928,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33079,8 +33079,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/it.po b/doc/translations/it.po
index aa085f6158..d8b888535f 100644
--- a/doc/translations/it.po
+++ b/doc/translations/it.po
@@ -10186,7 +10186,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33345,8 +33345,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/ja.po b/doc/translations/ja.po
index ee900d58c2..fea270ad95 100644
--- a/doc/translations/ja.po
+++ b/doc/translations/ja.po
@@ -11116,7 +11116,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -34317,8 +34317,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/ko.po b/doc/translations/ko.po
index 60416fb63c..0dce30d48f 100644
--- a/doc/translations/ko.po
+++ b/doc/translations/ko.po
@@ -9904,7 +9904,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33055,8 +33055,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/nl.po b/doc/translations/nl.po
index c0dc01c653..e409bd00b4 100644
--- a/doc/translations/nl.po
+++ b/doc/translations/nl.po
@@ -9930,7 +9930,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33081,8 +33081,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/pl.po b/doc/translations/pl.po
index 2664f263cb..06f09dcf81 100644
--- a/doc/translations/pl.po
+++ b/doc/translations/pl.po
@@ -9948,7 +9948,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33100,8 +33100,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/pt_BR.po b/doc/translations/pt_BR.po
index f86bed9585..28ee6b7668 100644
--- a/doc/translations/pt_BR.po
+++ b/doc/translations/pt_BR.po
@@ -9943,7 +9943,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33094,8 +33094,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/ro.po b/doc/translations/ro.po
index b25c3911cc..8cabaeebe1 100644
--- a/doc/translations/ro.po
+++ b/doc/translations/ro.po
@@ -9904,7 +9904,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33055,8 +33055,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/ru.po b/doc/translations/ru.po
index cf5289d7f9..e515ff50ff 100644
--- a/doc/translations/ru.po
+++ b/doc/translations/ru.po
@@ -10409,7 +10409,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33592,8 +33592,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/sr_Cyrl.po b/doc/translations/sr_Cyrl.po
index 06399d5e87..655a4a825c 100644
--- a/doc/translations/sr_Cyrl.po
+++ b/doc/translations/sr_Cyrl.po
@@ -9914,7 +9914,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33065,8 +33065,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/th.po b/doc/translations/th.po
index cdf1c6d7e2..7f3ef3a1e2 100644
--- a/doc/translations/th.po
+++ b/doc/translations/th.po
@@ -9920,7 +9920,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33071,8 +33071,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/tr.po b/doc/translations/tr.po
index 646a3fb5b3..d102161901 100644
--- a/doc/translations/tr.po
+++ b/doc/translations/tr.po
@@ -9896,7 +9896,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33047,8 +33047,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/uk.po b/doc/translations/uk.po
index c2232d81ab..42daf9cd30 100644
--- a/doc/translations/uk.po
+++ b/doc/translations/uk.po
@@ -9982,7 +9982,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33133,8 +33133,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/zh_Hans.po b/doc/translations/zh_Hans.po
index 40d1eb68bc..312fbd37c0 100644
--- a/doc/translations/zh_Hans.po
+++ b/doc/translations/zh_Hans.po
@@ -10129,7 +10129,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33283,8 +33283,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/doc/translations/zh_Hant.po b/doc/translations/zh_Hant.po
index 13515dff67..09d52a63c7 100644
--- a/doc/translations/zh_Hant.po
+++ b/doc/translations/zh_Hant.po
@@ -9933,7 +9933,7 @@ msgid ""
"Cast a [String] value to a boolean value, this method will return "
"[code]false[/code] if [code]\"\"[/code] is passed in, and [code]true[/code] "
"for all non-empty strings.\n"
-"Examples: [code]bool(\"False\")[/code] returns [code]true[/code], "
+"Examples: [code]bool(\"false\")[/code] returns [code]true[/code], "
"[code]bool(\"\")[/code] returns [code]false[/code]."
msgstr ""
@@ -33084,8 +33084,8 @@ msgid ""
"code]:\n"
"[codeblock]\n"
"var n = Node2D.new()\n"
-"print(\"position\" in n) # Prints \"True\".\n"
-"print(\"other_property\" in n) # Prints \"False\".\n"
+"print(\"position\" in n) # Prints \"true\".\n"
+"print(\"other_property\" in n) # Prints \"false\".\n"
"[/codeblock]\n"
"The [code]in[/code] operator will evaluate to [code]true[/code] as long as "
"the key exists, even if the value is [code]null[/code].\n"
diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp
index 83702ea2cc..4a163b7c10 100644
--- a/drivers/register_driver_types.cpp
+++ b/drivers/register_driver_types.cpp
@@ -30,6 +30,7 @@
#include "register_driver_types.h"
+#include "core/extension/native_extension_manager.h"
#include "drivers/png/image_loader_png.h"
#include "drivers/png/resource_saver_png.h"
@@ -54,7 +55,9 @@ void unregister_core_driver_types() {
}
void register_driver_types() {
+ NativeExtensionManager::get_singleton()->initialize_extensions(NativeExtension::INITIALIZATION_LEVEL_DRIVER);
}
void unregister_driver_types() {
+ NativeExtensionManager::get_singleton()->deinitialize_extensions(NativeExtension::INITIALIZATION_LEVEL_DRIVER);
}
diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp
index a2c9bae852..1754b47c85 100644
--- a/drivers/unix/dir_access_unix.cpp
+++ b/drivers/unix/dir_access_unix.cpp
@@ -71,7 +71,7 @@ Error DirAccessUnix::list_dir_begin() {
bool DirAccessUnix::file_exists(String p_file) {
GLOBAL_LOCK_FUNCTION
- if (p_file.is_rel_path()) {
+ if (p_file.is_relative_path()) {
p_file = current_dir.plus_file(p_file);
}
@@ -90,7 +90,7 @@ bool DirAccessUnix::file_exists(String p_file) {
bool DirAccessUnix::dir_exists(String p_dir) {
GLOBAL_LOCK_FUNCTION
- if (p_dir.is_rel_path()) {
+ if (p_dir.is_relative_path()) {
p_dir = get_current_dir().plus_file(p_dir);
}
@@ -105,7 +105,7 @@ bool DirAccessUnix::dir_exists(String p_dir) {
bool DirAccessUnix::is_readable(String p_dir) {
GLOBAL_LOCK_FUNCTION
- if (p_dir.is_rel_path()) {
+ if (p_dir.is_relative_path()) {
p_dir = get_current_dir().plus_file(p_dir);
}
@@ -116,7 +116,7 @@ bool DirAccessUnix::is_readable(String p_dir) {
bool DirAccessUnix::is_writable(String p_dir) {
GLOBAL_LOCK_FUNCTION
- if (p_dir.is_rel_path()) {
+ if (p_dir.is_relative_path()) {
p_dir = get_current_dir().plus_file(p_dir);
}
@@ -125,7 +125,7 @@ bool DirAccessUnix::is_writable(String p_dir) {
}
uint64_t DirAccessUnix::get_modified_time(String p_file) {
- if (p_file.is_rel_path()) {
+ if (p_file.is_relative_path()) {
p_file = current_dir.plus_file(p_file);
}
@@ -293,7 +293,7 @@ bool DirAccessUnix::drives_are_shortcuts() {
Error DirAccessUnix::make_dir(String p_dir) {
GLOBAL_LOCK_FUNCTION
- if (p_dir.is_rel_path()) {
+ if (p_dir.is_relative_path()) {
p_dir = get_current_dir().plus_file(p_dir);
}
@@ -328,7 +328,7 @@ Error DirAccessUnix::change_dir(String p_dir) {
// try_dir is the directory we are trying to change into
String try_dir = "";
- if (p_dir.is_rel_path()) {
+ if (p_dir.is_relative_path()) {
String next_dir = current_dir.plus_file(p_dir);
next_dir = next_dir.simplify_path();
try_dir = next_dir;
@@ -372,13 +372,13 @@ String DirAccessUnix::get_current_dir(bool p_include_drive) {
}
Error DirAccessUnix::rename(String p_path, String p_new_path) {
- if (p_path.is_rel_path()) {
+ if (p_path.is_relative_path()) {
p_path = get_current_dir().plus_file(p_path);
}
p_path = fix_path(p_path);
- if (p_new_path.is_rel_path()) {
+ if (p_new_path.is_relative_path()) {
p_new_path = get_current_dir().plus_file(p_new_path);
}
@@ -388,7 +388,7 @@ Error DirAccessUnix::rename(String p_path, String p_new_path) {
}
Error DirAccessUnix::remove(String p_path) {
- if (p_path.is_rel_path()) {
+ if (p_path.is_relative_path()) {
p_path = get_current_dir().plus_file(p_path);
}
@@ -407,7 +407,7 @@ Error DirAccessUnix::remove(String p_path) {
}
bool DirAccessUnix::is_link(String p_file) {
- if (p_file.is_rel_path()) {
+ if (p_file.is_relative_path()) {
p_file = get_current_dir().plus_file(p_file);
}
@@ -422,7 +422,7 @@ bool DirAccessUnix::is_link(String p_file) {
}
String DirAccessUnix::read_link(String p_file) {
- if (p_file.is_rel_path()) {
+ if (p_file.is_relative_path()) {
p_file = get_current_dir().plus_file(p_file);
}
@@ -439,7 +439,7 @@ String DirAccessUnix::read_link(String p_file) {
}
Error DirAccessUnix::create_link(String p_source, String p_target) {
- if (p_target.is_rel_path()) {
+ if (p_target.is_relative_path()) {
p_target = get_current_dir().plus_file(p_target);
}
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index f6a3e93b55..3032c31629 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -392,7 +392,7 @@ String OS_Unix::get_locale() const {
Error OS_Unix::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) {
String path = p_path;
- if (FileAccess::exists(path) && path.is_rel_path()) {
+ if (FileAccess::exists(path) && path.is_relative_path()) {
// dlopen expects a slash, in this case a leading ./ for it to be interpreted as a relative path,
// otherwise it will end up searching various system directories for the lib instead and finally failing.
path = "./" + path;
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index 63510d261a..086d3b4284 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -47,7 +47,7 @@
RenderingDeviceVulkan::Buffer *RenderingDeviceVulkan::_get_buffer_from_owner(RID p_buffer, VkPipelineStageFlags &r_stage_mask, VkAccessFlags &r_access_mask, uint32_t p_post_barrier) {
Buffer *buffer = nullptr;
if (vertex_buffer_owner.owns(p_buffer)) {
- buffer = vertex_buffer_owner.getornull(p_buffer);
+ buffer = vertex_buffer_owner.get_or_null(p_buffer);
r_stage_mask |= VK_PIPELINE_STAGE_VERTEX_INPUT_BIT;
r_access_mask |= VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT;
@@ -64,7 +64,7 @@ RenderingDeviceVulkan::Buffer *RenderingDeviceVulkan::_get_buffer_from_owner(RID
} else if (index_buffer_owner.owns(p_buffer)) {
r_stage_mask |= VK_PIPELINE_STAGE_VERTEX_INPUT_BIT;
r_access_mask |= VK_ACCESS_INDEX_READ_BIT;
- buffer = index_buffer_owner.getornull(p_buffer);
+ buffer = index_buffer_owner.get_or_null(p_buffer);
} else if (uniform_buffer_owner.owns(p_buffer)) {
if (p_post_barrier & BARRIER_MASK_RASTER) {
r_stage_mask |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
@@ -73,7 +73,7 @@ RenderingDeviceVulkan::Buffer *RenderingDeviceVulkan::_get_buffer_from_owner(RID
r_stage_mask |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
}
r_access_mask |= VK_ACCESS_UNIFORM_READ_BIT;
- buffer = uniform_buffer_owner.getornull(p_buffer);
+ buffer = uniform_buffer_owner.get_or_null(p_buffer);
} else if (texture_buffer_owner.owns(p_buffer)) {
if (p_post_barrier & BARRIER_MASK_RASTER) {
r_stage_mask |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
@@ -84,9 +84,9 @@ RenderingDeviceVulkan::Buffer *RenderingDeviceVulkan::_get_buffer_from_owner(RID
r_access_mask |= VK_ACCESS_SHADER_READ_BIT;
}
- buffer = &texture_buffer_owner.getornull(p_buffer)->buffer;
+ buffer = &texture_buffer_owner.get_or_null(p_buffer)->buffer;
} else if (storage_buffer_owner.owns(p_buffer)) {
- buffer = storage_buffer_owner.getornull(p_buffer);
+ buffer = storage_buffer_owner.get_or_null(p_buffer);
if (p_post_barrier & BARRIER_MASK_RASTER) {
r_stage_mask |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
r_access_mask |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
@@ -2048,12 +2048,12 @@ RID RenderingDeviceVulkan::texture_create(const TextureFormat &p_format, const T
RID RenderingDeviceVulkan::texture_create_shared(const TextureView &p_view, RID p_with_texture) {
_THREAD_SAFE_METHOD_
- Texture *src_texture = texture_owner.getornull(p_with_texture);
+ Texture *src_texture = texture_owner.get_or_null(p_with_texture);
ERR_FAIL_COND_V(!src_texture, RID());
if (src_texture->owner.is_valid()) { //ahh this is a share
p_with_texture = src_texture->owner;
- src_texture = texture_owner.getornull(src_texture->owner);
+ src_texture = texture_owner.get_or_null(src_texture->owner);
ERR_FAIL_COND_V(!src_texture, RID()); //this is a bug
}
@@ -2173,12 +2173,12 @@ RID RenderingDeviceVulkan::texture_create_shared(const TextureView &p_view, RID
RID RenderingDeviceVulkan::texture_create_shared_from_slice(const TextureView &p_view, RID p_with_texture, uint32_t p_layer, uint32_t p_mipmap, TextureSliceType p_slice_type) {
_THREAD_SAFE_METHOD_
- Texture *src_texture = texture_owner.getornull(p_with_texture);
+ Texture *src_texture = texture_owner.get_or_null(p_with_texture);
ERR_FAIL_COND_V(!src_texture, RID());
if (src_texture->owner.is_valid()) { //ahh this is a share
p_with_texture = src_texture->owner;
- src_texture = texture_owner.getornull(src_texture->owner);
+ src_texture = texture_owner.get_or_null(src_texture->owner);
ERR_FAIL_COND_V(!src_texture, RID()); //this is a bug
}
@@ -2299,12 +2299,12 @@ Error RenderingDeviceVulkan::_texture_update(RID p_texture, uint32_t p_layer, co
ERR_FAIL_COND_V_MSG((draw_list || compute_list) && !p_use_setup_queue, ERR_INVALID_PARAMETER,
"Updating textures is forbidden during creation of a draw or compute list");
- Texture *texture = texture_owner.getornull(p_texture);
+ Texture *texture = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND_V(!texture, ERR_INVALID_PARAMETER);
if (texture->owner != RID()) {
p_texture = texture->owner;
- texture = texture_owner.getornull(texture->owner);
+ texture = texture_owner.get_or_null(texture->owner);
ERR_FAIL_COND_V(!texture, ERR_BUG); //this is a bug
}
@@ -2601,7 +2601,7 @@ Vector<uint8_t> RenderingDeviceVulkan::_texture_get_data_from_image(Texture *tex
Vector<uint8_t> RenderingDeviceVulkan::texture_get_data(RID p_texture, uint32_t p_layer) {
_THREAD_SAFE_METHOD_
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND_V(!tex, Vector<uint8_t>());
ERR_FAIL_COND_V_MSG(tex->bound, Vector<uint8_t>(),
@@ -2731,7 +2731,7 @@ Vector<uint8_t> RenderingDeviceVulkan::texture_get_data(RID p_texture, uint32_t
bool RenderingDeviceVulkan::texture_is_shared(RID p_texture) {
_THREAD_SAFE_METHOD_
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND_V(!tex, false);
return tex->owner.is_valid();
}
@@ -2740,10 +2740,18 @@ bool RenderingDeviceVulkan::texture_is_valid(RID p_texture) {
return texture_owner.owns(p_texture);
}
+Size2i RenderingDeviceVulkan::texture_size(RID p_texture) {
+ _THREAD_SAFE_METHOD_
+
+ Texture *tex = texture_owner.get_or_null(p_texture);
+ ERR_FAIL_COND_V(!tex, Size2i());
+ return Size2i(tex->width, tex->height);
+}
+
Error RenderingDeviceVulkan::texture_copy(RID p_from_texture, RID p_to_texture, const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_size, uint32_t p_src_mipmap, uint32_t p_dst_mipmap, uint32_t p_src_layer, uint32_t p_dst_layer, uint32_t p_post_barrier) {
_THREAD_SAFE_METHOD_
- Texture *src_tex = texture_owner.getornull(p_from_texture);
+ Texture *src_tex = texture_owner.get_or_null(p_from_texture);
ERR_FAIL_COND_V(!src_tex, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V_MSG(src_tex->bound, ERR_INVALID_PARAMETER,
@@ -2764,7 +2772,7 @@ Error RenderingDeviceVulkan::texture_copy(RID p_from_texture, RID p_to_texture,
ERR_FAIL_COND_V(p_src_mipmap >= src_tex->mipmaps, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(p_src_layer >= src_layer_count, ERR_INVALID_PARAMETER);
- Texture *dst_tex = texture_owner.getornull(p_to_texture);
+ Texture *dst_tex = texture_owner.get_or_null(p_to_texture);
ERR_FAIL_COND_V(!dst_tex, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V_MSG(dst_tex->bound, ERR_INVALID_PARAMETER,
@@ -2931,7 +2939,7 @@ Error RenderingDeviceVulkan::texture_copy(RID p_from_texture, RID p_to_texture,
Error RenderingDeviceVulkan::texture_resolve_multisample(RID p_from_texture, RID p_to_texture, uint32_t p_post_barrier) {
_THREAD_SAFE_METHOD_
- Texture *src_tex = texture_owner.getornull(p_from_texture);
+ Texture *src_tex = texture_owner.get_or_null(p_from_texture);
ERR_FAIL_COND_V(!src_tex, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V_MSG(src_tex->bound, ERR_INVALID_PARAMETER,
@@ -2942,7 +2950,7 @@ Error RenderingDeviceVulkan::texture_resolve_multisample(RID p_from_texture, RID
ERR_FAIL_COND_V_MSG(src_tex->type != TEXTURE_TYPE_2D, ERR_INVALID_PARAMETER, "Source texture must be 2D (or a slice of a 3D/Cube texture)");
ERR_FAIL_COND_V_MSG(src_tex->samples == TEXTURE_SAMPLES_1, ERR_INVALID_PARAMETER, "Source texture must be multisampled.");
- Texture *dst_tex = texture_owner.getornull(p_to_texture);
+ Texture *dst_tex = texture_owner.get_or_null(p_to_texture);
ERR_FAIL_COND_V(!dst_tex, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V_MSG(dst_tex->bound, ERR_INVALID_PARAMETER,
@@ -3102,7 +3110,7 @@ Error RenderingDeviceVulkan::texture_resolve_multisample(RID p_from_texture, RID
Error RenderingDeviceVulkan::texture_clear(RID p_texture, const Color &p_color, uint32_t p_base_mipmap, uint32_t p_mipmaps, uint32_t p_base_layer, uint32_t p_layers, uint32_t p_post_barrier) {
_THREAD_SAFE_METHOD_
- Texture *src_tex = texture_owner.getornull(p_texture);
+ Texture *src_tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND_V(!src_tex, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V_MSG(src_tex->bound, ERR_INVALID_PARAMETER,
@@ -3872,7 +3880,7 @@ RID RenderingDeviceVulkan::framebuffer_create(const Vector<RID> &p_texture_attac
FramebufferPass pass;
for (int i = 0; i < p_texture_attachments.size(); i++) {
- Texture *texture = texture_owner.getornull(p_texture_attachments[i]);
+ Texture *texture = texture_owner.get_or_null(p_texture_attachments[i]);
ERR_FAIL_COND_V_MSG(!texture, RID(), "Texture index supplied for framebuffer (" + itos(i) + ") is not a valid texture.");
ERR_FAIL_COND_V_MSG(texture->layers != p_view_count, RID(), "Layers of our texture doesn't match view count for this framebuffer");
@@ -3897,7 +3905,7 @@ RID RenderingDeviceVulkan::framebuffer_create_multipass(const Vector<RID> &p_tex
Size2i size;
for (int i = 0; i < p_texture_attachments.size(); i++) {
- Texture *texture = texture_owner.getornull(p_texture_attachments[i]);
+ Texture *texture = texture_owner.get_or_null(p_texture_attachments[i]);
ERR_FAIL_COND_V_MSG(!texture, RID(), "Texture index supplied for framebuffer (" + itos(i) + ") is not a valid texture.");
ERR_FAIL_COND_V_MSG(texture->layers != p_view_count, RID(), "Layers of our texture doesn't match view count for this framebuffer");
@@ -3943,7 +3951,7 @@ RID RenderingDeviceVulkan::framebuffer_create_multipass(const Vector<RID> &p_tex
RenderingDevice::FramebufferFormatID RenderingDeviceVulkan::framebuffer_get_format(RID p_framebuffer) {
_THREAD_SAFE_METHOD_
- Framebuffer *framebuffer = framebuffer_owner.getornull(p_framebuffer);
+ Framebuffer *framebuffer = framebuffer_owner.get_or_null(p_framebuffer);
ERR_FAIL_COND_V(!framebuffer, INVALID_ID);
return framebuffer->format_id;
@@ -4093,7 +4101,7 @@ RID RenderingDeviceVulkan::vertex_array_create(uint32_t p_vertex_count, VertexFo
vertex_array.description = p_vertex_format;
vertex_array.max_instances_allowed = 0xFFFFFFFF; //by default as many as you want
for (int i = 0; i < p_src_buffers.size(); i++) {
- Buffer *buffer = vertex_buffer_owner.getornull(p_src_buffers[i]);
+ Buffer *buffer = vertex_buffer_owner.get_or_null(p_src_buffers[i]);
//validate with buffer
{
@@ -4189,7 +4197,7 @@ RID RenderingDeviceVulkan::index_array_create(RID p_index_buffer, uint32_t p_ind
ERR_FAIL_COND_V(!index_buffer_owner.owns(p_index_buffer), RID());
- IndexBuffer *index_buffer = index_buffer_owner.getornull(p_index_buffer);
+ IndexBuffer *index_buffer = index_buffer_owner.get_or_null(p_index_buffer);
ERR_FAIL_COND_V(p_index_count == 0, RID());
ERR_FAIL_COND_V(p_index_offset + p_index_count > index_buffer->index_count, RID());
@@ -4233,7 +4241,7 @@ static VkShaderStageFlagBits shader_stage_masks[RenderingDevice::SHADER_STAGE_MA
String RenderingDeviceVulkan::_shader_uniform_debug(RID p_shader, int p_set) {
String ret;
- const Shader *shader = shader_owner.getornull(p_shader);
+ const Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND_V(!shader, String());
for (int i = 0; i < shader->sets.size(); i++) {
if (p_set >= 0 && i != p_set) {
@@ -5264,7 +5272,7 @@ RID RenderingDeviceVulkan::shader_create_from_bytecode(const Vector<uint8_t> &p_
uint32_t RenderingDeviceVulkan::shader_get_vertex_input_attribute_mask(RID p_shader) {
_THREAD_SAFE_METHOD_
- const Shader *shader = shader_owner.getornull(p_shader);
+ const Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND_V(!shader, 0);
return shader->vertex_input_mask;
}
@@ -5486,7 +5494,7 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
ERR_FAIL_COND_V(p_uniforms.size() == 0, RID());
- Shader *shader = shader_owner.getornull(p_shader);
+ Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND_V(!shader, RID());
ERR_FAIL_COND_V_MSG(p_shader_set >= (uint32_t)shader->sets.size() || shader->sets[p_shader_set].uniform_info.size() == 0, RID(),
@@ -5555,7 +5563,7 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
Vector<VkDescriptorImageInfo> image_info;
for (int j = 0; j < uniform.ids.size(); j++) {
- VkSampler *sampler = sampler_owner.getornull(uniform.ids[j]);
+ VkSampler *sampler = sampler_owner.get_or_null(uniform.ids[j]);
ERR_FAIL_COND_V_MSG(!sampler, RID(), "Sampler (binding: " + itos(uniform.binding) + ", index " + itos(j) + ") is not a valid sampler.");
VkDescriptorImageInfo img_info;
@@ -5588,10 +5596,10 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
Vector<VkDescriptorImageInfo> image_info;
for (int j = 0; j < uniform.ids.size(); j += 2) {
- VkSampler *sampler = sampler_owner.getornull(uniform.ids[j + 0]);
+ VkSampler *sampler = sampler_owner.get_or_null(uniform.ids[j + 0]);
ERR_FAIL_COND_V_MSG(!sampler, RID(), "SamplerBuffer (binding: " + itos(uniform.binding) + ", index " + itos(j + 1) + ") is not a valid sampler.");
- Texture *texture = texture_owner.getornull(uniform.ids[j + 1]);
+ Texture *texture = texture_owner.get_or_null(uniform.ids[j + 1]);
ERR_FAIL_COND_V_MSG(!texture, RID(), "Texture (binding: " + itos(uniform.binding) + ", index " + itos(j) + ") is not a valid texture.");
ERR_FAIL_COND_V_MSG(!(texture->usage_flags & TEXTURE_USAGE_SAMPLING_BIT), RID(),
@@ -5613,7 +5621,7 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
mutable_sampled_textures.push_back(texture);
}
if (texture->owner.is_valid()) {
- texture = texture_owner.getornull(texture->owner);
+ texture = texture_owner.get_or_null(texture->owner);
ERR_FAIL_COND_V(!texture, RID()); //bug, should never happen
}
@@ -5644,7 +5652,7 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
Vector<VkDescriptorImageInfo> image_info;
for (int j = 0; j < uniform.ids.size(); j++) {
- Texture *texture = texture_owner.getornull(uniform.ids[j]);
+ Texture *texture = texture_owner.get_or_null(uniform.ids[j]);
ERR_FAIL_COND_V_MSG(!texture, RID(), "Texture (binding: " + itos(uniform.binding) + ", index " + itos(j) + ") is not a valid texture.");
ERR_FAIL_COND_V_MSG(!(texture->usage_flags & TEXTURE_USAGE_SAMPLING_BIT), RID(),
@@ -5667,7 +5675,7 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
}
if (texture->owner.is_valid()) {
- texture = texture_owner.getornull(texture->owner);
+ texture = texture_owner.get_or_null(texture->owner);
ERR_FAIL_COND_V(!texture, RID()); //bug, should never happen
}
@@ -5697,7 +5705,7 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
Vector<VkDescriptorImageInfo> image_info;
for (int j = 0; j < uniform.ids.size(); j++) {
- Texture *texture = texture_owner.getornull(uniform.ids[j]);
+ Texture *texture = texture_owner.get_or_null(uniform.ids[j]);
ERR_FAIL_COND_V_MSG(!texture, RID(),
"Image (binding: " + itos(uniform.binding) + ", index " + itos(j) + ") is not a valid texture.");
@@ -5715,7 +5723,7 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
}
if (texture->owner.is_valid()) {
- texture = texture_owner.getornull(texture->owner);
+ texture = texture_owner.get_or_null(texture->owner);
ERR_FAIL_COND_V(!texture, RID()); //bug, should never happen
}
@@ -5747,7 +5755,7 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
Vector<VkBufferView> buffer_view;
for (int j = 0; j < uniform.ids.size(); j++) {
- TextureBuffer *buffer = texture_buffer_owner.getornull(uniform.ids[j]);
+ TextureBuffer *buffer = texture_buffer_owner.get_or_null(uniform.ids[j]);
ERR_FAIL_COND_V_MSG(!buffer, RID(), "Texture Buffer (binding: " + itos(uniform.binding) + ", index " + itos(j) + ") is not a valid texture buffer.");
buffer_info.push_back(buffer->buffer.buffer_info);
@@ -5778,10 +5786,10 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
Vector<VkBufferView> buffer_view;
for (int j = 0; j < uniform.ids.size(); j += 2) {
- VkSampler *sampler = sampler_owner.getornull(uniform.ids[j + 0]);
+ VkSampler *sampler = sampler_owner.get_or_null(uniform.ids[j + 0]);
ERR_FAIL_COND_V_MSG(!sampler, RID(), "SamplerBuffer (binding: " + itos(uniform.binding) + ", index " + itos(j + 1) + ") is not a valid sampler.");
- TextureBuffer *buffer = texture_buffer_owner.getornull(uniform.ids[j + 1]);
+ TextureBuffer *buffer = texture_buffer_owner.get_or_null(uniform.ids[j + 1]);
VkDescriptorImageInfo img_info;
img_info.sampler = *sampler;
@@ -5813,7 +5821,7 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
ERR_FAIL_COND_V_MSG(uniform.ids.size() != 1, RID(),
"Uniform buffer supplied (binding: " + itos(uniform.binding) + ") must provide one ID (" + itos(uniform.ids.size()) + " provided).");
- Buffer *buffer = uniform_buffer_owner.getornull(uniform.ids[0]);
+ Buffer *buffer = uniform_buffer_owner.get_or_null(uniform.ids[0]);
ERR_FAIL_COND_V_MSG(!buffer, RID(), "Uniform buffer supplied (binding: " + itos(uniform.binding) + ") is invalid.");
ERR_FAIL_COND_V_MSG(buffer->size != (uint32_t)set_uniform.length, RID(),
@@ -5834,9 +5842,9 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
Buffer *buffer = nullptr;
if (storage_buffer_owner.owns(uniform.ids[0])) {
- buffer = storage_buffer_owner.getornull(uniform.ids[0]);
+ buffer = storage_buffer_owner.get_or_null(uniform.ids[0]);
} else if (vertex_buffer_owner.owns(uniform.ids[0])) {
- buffer = vertex_buffer_owner.getornull(uniform.ids[0]);
+ buffer = vertex_buffer_owner.get_or_null(uniform.ids[0]);
ERR_FAIL_COND_V_MSG(!(buffer->usage & VK_BUFFER_USAGE_STORAGE_BUFFER_BIT), RID(), "Vertex buffer supplied (binding: " + itos(uniform.binding) + ") was not created with storage flag.");
}
@@ -5867,7 +5875,7 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
Vector<VkDescriptorImageInfo> image_info;
for (int j = 0; j < uniform.ids.size(); j++) {
- Texture *texture = texture_owner.getornull(uniform.ids[j]);
+ Texture *texture = texture_owner.get_or_null(uniform.ids[j]);
ERR_FAIL_COND_V_MSG(!texture, RID(),
"InputAttachment (binding: " + itos(uniform.binding) + ", index " + itos(j) + ") is not a valid texture.");
@@ -5880,7 +5888,7 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
img_info.imageView = texture->view;
if (texture->owner.is_valid()) {
- texture = texture_owner.getornull(texture->owner);
+ texture = texture_owner.get_or_null(texture->owner);
ERR_FAIL_COND_V(!texture, RID()); //bug, should never happen
}
@@ -5969,7 +5977,7 @@ bool RenderingDeviceVulkan::uniform_set_is_valid(RID p_uniform_set) {
}
void RenderingDeviceVulkan::uniform_set_set_invalidation_callback(RID p_uniform_set, UniformSetInvalidatedCallback p_callback, void *p_userdata) {
- UniformSet *us = uniform_set_owner.getornull(p_uniform_set);
+ UniformSet *us = uniform_set_owner.get_or_null(p_uniform_set);
ERR_FAIL_COND(!us);
us->invalidated_callback = p_callback;
us->invalidated_callback_userdata = p_userdata;
@@ -6118,7 +6126,7 @@ RID RenderingDeviceVulkan::render_pipeline_create(RID p_shader, FramebufferForma
_THREAD_SAFE_METHOD_
//needs a shader
- Shader *shader = shader_owner.getornull(p_shader);
+ Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND_V(!shader, RID());
ERR_FAIL_COND_V_MSG(shader->is_compute, RID(),
@@ -6560,7 +6568,7 @@ RID RenderingDeviceVulkan::compute_pipeline_create(RID p_shader, const Vector<Pi
_THREAD_SAFE_METHOD_
//needs a shader
- Shader *shader = shader_owner.getornull(p_shader);
+ Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND_V(!shader, RID());
ERR_FAIL_COND_V_MSG(!shader->is_compute, RID(),
@@ -6771,7 +6779,7 @@ Error RenderingDeviceVulkan::_draw_list_setup_framebuffer(Framebuffer *p_framebu
framebuffer_create_info.renderPass = version.render_pass;
Vector<VkImageView> attachments;
for (int i = 0; i < p_framebuffer->texture_ids.size(); i++) {
- Texture *texture = texture_owner.getornull(p_framebuffer->texture_ids[i]);
+ Texture *texture = texture_owner.get_or_null(p_framebuffer->texture_ids[i]);
ERR_FAIL_COND_V(!texture, ERR_BUG);
attachments.push_back(texture->view);
ERR_FAIL_COND_V(texture->width != p_framebuffer->size.width, ERR_BUG);
@@ -6823,7 +6831,7 @@ Error RenderingDeviceVulkan::_draw_list_render_pass_begin(Framebuffer *framebuff
{
int color_index = 0;
for (int i = 0; i < framebuffer->texture_ids.size(); i++) {
- Texture *texture = texture_owner.getornull(framebuffer->texture_ids[i]);
+ Texture *texture = texture_owner.get_or_null(framebuffer->texture_ids[i]);
VkClearValue clear_value;
if (color_index < p_clear_colors.size() && texture->usage_flags & TEXTURE_USAGE_COLOR_ATTACHMENT_BIT) {
@@ -6851,7 +6859,7 @@ Error RenderingDeviceVulkan::_draw_list_render_pass_begin(Framebuffer *framebuff
render_pass_begin.pClearValues = clear_values.ptr();
for (int i = 0; i < p_storage_textures.size(); i++) {
- Texture *texture = texture_owner.getornull(p_storage_textures[i]);
+ Texture *texture = texture_owner.get_or_null(p_storage_textures[i]);
ERR_CONTINUE_MSG(!(texture->usage_flags & TEXTURE_USAGE_STORAGE_BIT), "Supplied storage texture " + itos(i) + " for draw list is not set to be used for storage.");
if (texture->usage_flags & TEXTURE_USAGE_SAMPLING_BIT) {
@@ -6889,7 +6897,7 @@ Error RenderingDeviceVulkan::_draw_list_render_pass_begin(Framebuffer *framebuff
draw_list_unbind_depth_textures = p_final_depth_action != FINAL_ACTION_CONTINUE;
for (int i = 0; i < framebuffer->texture_ids.size(); i++) {
- Texture *texture = texture_owner.getornull(framebuffer->texture_ids[i]);
+ Texture *texture = texture_owner.get_or_null(framebuffer->texture_ids[i]);
texture->bound = true;
draw_list_bound_textures.push_back(framebuffer->texture_ids[i]);
}
@@ -6901,7 +6909,7 @@ void RenderingDeviceVulkan::_draw_list_insert_clear_region(DrawList *draw_list,
Vector<VkClearAttachment> clear_attachments;
int color_index = 0;
for (int i = 0; i < framebuffer->texture_ids.size(); i++) {
- Texture *texture = texture_owner.getornull(framebuffer->texture_ids[i]);
+ Texture *texture = texture_owner.get_or_null(framebuffer->texture_ids[i]);
VkClearAttachment clear_at = {};
if (p_clear_color && texture->usage_flags & TEXTURE_USAGE_COLOR_ATTACHMENT_BIT) {
@@ -6944,7 +6952,7 @@ RenderingDevice::DrawListID RenderingDeviceVulkan::draw_list_begin(RID p_framebu
ERR_FAIL_COND_V_MSG(draw_list != nullptr, INVALID_ID, "Only one draw list can be active at the same time.");
ERR_FAIL_COND_V_MSG(compute_list != nullptr && !compute_list->state.allow_draw_overlap, INVALID_ID, "Only one draw/compute list can be active at the same time.");
- Framebuffer *framebuffer = framebuffer_owner.getornull(p_framebuffer);
+ Framebuffer *framebuffer = framebuffer_owner.get_or_null(p_framebuffer);
ERR_FAIL_COND_V(!framebuffer, INVALID_ID);
Point2i viewport_offset;
@@ -6985,7 +6993,7 @@ RenderingDevice::DrawListID RenderingDeviceVulkan::draw_list_begin(RID p_framebu
int color_count = 0;
for (int i = 0; i < framebuffer->texture_ids.size(); i++) {
- Texture *texture = texture_owner.getornull(framebuffer->texture_ids[i]);
+ Texture *texture = texture_owner.get_or_null(framebuffer->texture_ids[i]);
if (texture->usage_flags & TEXTURE_USAGE_COLOR_ATTACHMENT_BIT) {
color_count++;
@@ -7048,7 +7056,7 @@ Error RenderingDeviceVulkan::draw_list_begin_split(RID p_framebuffer, uint32_t p
ERR_FAIL_COND_V(p_splits < 1, ERR_INVALID_DECLARATION);
- Framebuffer *framebuffer = framebuffer_owner.getornull(p_framebuffer);
+ Framebuffer *framebuffer = framebuffer_owner.get_or_null(p_framebuffer);
ERR_FAIL_COND_V(!framebuffer, ERR_INVALID_DECLARATION);
Point2i viewport_offset;
@@ -7083,7 +7091,7 @@ Error RenderingDeviceVulkan::draw_list_begin_split(RID p_framebuffer, uint32_t p
int color_count = 0;
for (int i = 0; i < framebuffer->texture_ids.size(); i++) {
- Texture *texture = texture_owner.getornull(framebuffer->texture_ids[i]);
+ Texture *texture = texture_owner.get_or_null(framebuffer->texture_ids[i]);
if (texture->usage_flags & TEXTURE_USAGE_COLOR_ATTACHMENT_BIT) {
color_count++;
@@ -7184,7 +7192,7 @@ void RenderingDeviceVulkan::draw_list_bind_render_pipeline(DrawListID p_list, RI
ERR_FAIL_COND_MSG(!dl->validation.active, "Submitted Draw Lists can no longer be modified.");
#endif
- const RenderPipeline *pipeline = render_pipeline_owner.getornull(p_render_pipeline);
+ const RenderPipeline *pipeline = render_pipeline_owner.get_or_null(p_render_pipeline);
ERR_FAIL_COND(!pipeline);
#ifdef DEBUG_ENABLED
ERR_FAIL_COND(pipeline->validation.framebuffer_format != draw_list_framebuffer_format && pipeline->validation.render_pass != draw_list_current_subpass);
@@ -7259,7 +7267,7 @@ void RenderingDeviceVulkan::draw_list_bind_uniform_set(DrawListID p_list, RID p_
ERR_FAIL_COND_MSG(!dl->validation.active, "Submitted Draw Lists can no longer be modified.");
#endif
- const UniformSet *uniform_set = uniform_set_owner.getornull(p_uniform_set);
+ const UniformSet *uniform_set = uniform_set_owner.get_or_null(p_uniform_set);
ERR_FAIL_COND(!uniform_set);
if (p_index > dl->state.set_count) {
@@ -7307,7 +7315,7 @@ void RenderingDeviceVulkan::draw_list_bind_vertex_array(DrawListID p_list, RID p
ERR_FAIL_COND_MSG(!dl->validation.active, "Submitted Draw Lists can no longer be modified.");
#endif
- const VertexArray *vertex_array = vertex_array_owner.getornull(p_vertex_array);
+ const VertexArray *vertex_array = vertex_array_owner.get_or_null(p_vertex_array);
ERR_FAIL_COND(!vertex_array);
if (dl->state.vertex_array == p_vertex_array) {
@@ -7331,7 +7339,7 @@ void RenderingDeviceVulkan::draw_list_bind_index_array(DrawListID p_list, RID p_
ERR_FAIL_COND_MSG(!dl->validation.active, "Submitted Draw Lists can no longer be modified.");
#endif
- const IndexArray *index_array = index_array_owner.getornull(p_index_array);
+ const IndexArray *index_array = index_array_owner.get_or_null(p_index_array);
ERR_FAIL_COND(!index_array);
if (dl->state.index_array == p_index_array) {
@@ -7417,7 +7425,7 @@ void RenderingDeviceVulkan::draw_list_draw(DrawListID p_list, bool p_use_indices
if (dl->state.sets[i].uniform_set_format == 0) {
ERR_FAIL_MSG("Uniforms were never supplied for set (" + itos(i) + ") at the time of drawing, which are required by the pipeline");
} else if (uniform_set_owner.owns(dl->state.sets[i].uniform_set)) {
- UniformSet *us = uniform_set_owner.getornull(dl->state.sets[i].uniform_set);
+ UniformSet *us = uniform_set_owner.get_or_null(dl->state.sets[i].uniform_set);
ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + "):\n" + _shader_uniform_debug(us->shader_id, us->shader_set) + "\nare not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(dl->state.pipeline_shader));
} else {
ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + ", which was was just freed) are not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(dl->state.pipeline_shader));
@@ -7580,7 +7588,7 @@ Error RenderingDeviceVulkan::_draw_list_allocate(const Rect2i &p_viewport, uint3
VkCommandPoolCreateInfo cmd_pool_info;
cmd_pool_info.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
cmd_pool_info.pNext = nullptr;
- cmd_pool_info.queueFamilyIndex = context->get_graphics_queue();
+ cmd_pool_info.queueFamilyIndex = context->get_graphics_queue_family_index();
cmd_pool_info.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
VkResult res = vkCreateCommandPool(device, &cmd_pool_info, nullptr, &split_draw_list_allocators.write[i].command_pool);
@@ -7688,7 +7696,7 @@ void RenderingDeviceVulkan::draw_list_end(uint32_t p_post_barrier) {
vkCmdEndRenderPass(frames[frame].draw_command_buffer);
for (int i = 0; i < draw_list_bound_textures.size(); i++) {
- Texture *texture = texture_owner.getornull(draw_list_bound_textures[i]);
+ Texture *texture = texture_owner.get_or_null(draw_list_bound_textures[i]);
ERR_CONTINUE(!texture); //wtf
if (draw_list_unbind_color_textures && (texture->usage_flags & TEXTURE_USAGE_COLOR_ATTACHMENT_BIT)) {
texture->bound = false;
@@ -7736,7 +7744,7 @@ void RenderingDeviceVulkan::draw_list_end(uint32_t p_post_barrier) {
}
for (uint32_t i = 0; i < image_barrier_count; i++) {
- Texture *texture = texture_owner.getornull(draw_list_storage_textures[i]);
+ Texture *texture = texture_owner.get_or_null(draw_list_storage_textures[i]);
VkImageMemoryBarrier &image_memory_barrier = image_barriers[i];
image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
@@ -7802,7 +7810,7 @@ void RenderingDeviceVulkan::compute_list_bind_compute_pipeline(ComputeListID p_l
ComputeList *cl = compute_list;
- const ComputePipeline *pipeline = compute_pipeline_owner.getornull(p_compute_pipeline);
+ const ComputePipeline *pipeline = compute_pipeline_owner.get_or_null(p_compute_pipeline);
ERR_FAIL_COND(!pipeline);
if (p_compute_pipeline == cl->state.pipeline) {
@@ -7875,7 +7883,7 @@ void RenderingDeviceVulkan::compute_list_bind_uniform_set(ComputeListID p_list,
ERR_FAIL_COND_MSG(!cl->validation.active, "Submitted Compute Lists can no longer be modified.");
#endif
- UniformSet *uniform_set = uniform_set_owner.getornull(p_uniform_set);
+ UniformSet *uniform_set = uniform_set_owner.get_or_null(p_uniform_set);
ERR_FAIL_COND(!uniform_set);
if (p_index > cl->state.set_count) {
@@ -7957,13 +7965,13 @@ void RenderingDeviceVulkan::compute_list_bind_uniform_set(ComputeListID p_list,
textures_to_storage[i]->used_in_compute = false;
textures_to_storage[i]->used_in_raster = false;
- textures_to_storage[i]->used_in_compute = false;
+ textures_to_storage[i]->used_in_transfer = false;
} else {
src_access_flags = 0;
textures_to_storage[i]->used_in_compute = false;
textures_to_storage[i]->used_in_raster = false;
- textures_to_storage[i]->used_in_compute = false;
+ textures_to_storage[i]->used_in_transfer = false;
textures_to_storage[i]->used_in_frame = frames_drawn;
}
@@ -8074,7 +8082,7 @@ void RenderingDeviceVulkan::compute_list_dispatch(ComputeListID p_list, uint32_t
if (cl->state.sets[i].uniform_set_format == 0) {
ERR_FAIL_MSG("Uniforms were never supplied for set (" + itos(i) + ") at the time of drawing, which are required by the pipeline");
} else if (uniform_set_owner.owns(cl->state.sets[i].uniform_set)) {
- UniformSet *us = uniform_set_owner.getornull(cl->state.sets[i].uniform_set);
+ UniformSet *us = uniform_set_owner.get_or_null(cl->state.sets[i].uniform_set);
ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + "):\n" + _shader_uniform_debug(us->shader_id, us->shader_set) + "\nare not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(cl->state.pipeline_shader));
} else {
ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + ", which was was just freed) are not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(cl->state.pipeline_shader));
@@ -8117,7 +8125,7 @@ void RenderingDeviceVulkan::compute_list_dispatch_indirect(ComputeListID p_list,
ERR_FAIL_COND(!compute_list);
ComputeList *cl = compute_list;
- Buffer *buffer = storage_buffer_owner.getornull(p_buffer);
+ Buffer *buffer = storage_buffer_owner.get_or_null(p_buffer);
ERR_FAIL_COND(!buffer);
ERR_FAIL_COND_MSG(!(buffer->usage & STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT), "Buffer provided was not created to do indirect dispatch.");
@@ -8151,7 +8159,7 @@ void RenderingDeviceVulkan::compute_list_dispatch_indirect(ComputeListID p_list,
if (cl->state.sets[i].uniform_set_format == 0) {
ERR_FAIL_MSG("Uniforms were never supplied for set (" + itos(i) + ") at the time of drawing, which are required by the pipeline");
} else if (uniform_set_owner.owns(cl->state.sets[i].uniform_set)) {
- UniformSet *us = uniform_set_owner.getornull(cl->state.sets[i].uniform_set);
+ UniformSet *us = uniform_set_owner.get_or_null(cl->state.sets[i].uniform_set);
ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + "):\n" + _shader_uniform_debug(us->shader_id, us->shader_set) + "\nare not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(cl->state.pipeline_shader));
} else {
ERR_FAIL_MSG("Uniforms supplied for set (" + itos(i) + ", which was was just freed) are not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:\n" + _shader_uniform_debug(cl->state.pipeline_shader));
@@ -8363,52 +8371,53 @@ void RenderingDeviceVulkan::draw_list_render_secondary_to_framebuffer(ID p_frame
void RenderingDeviceVulkan::_free_internal(RID p_id) {
//push everything so it's disposed of next time this frame index is processed (means, it's safe to do it)
if (texture_owner.owns(p_id)) {
- Texture *texture = texture_owner.getornull(p_id);
+ Texture *texture = texture_owner.get_or_null(p_id);
frames[frame].textures_to_dispose_of.push_back(*texture);
texture_owner.free(p_id);
} else if (framebuffer_owner.owns(p_id)) {
- Framebuffer *framebuffer = framebuffer_owner.getornull(p_id);
+ Framebuffer *framebuffer = framebuffer_owner.get_or_null(p_id);
frames[frame].framebuffers_to_dispose_of.push_back(*framebuffer);
framebuffer_owner.free(p_id);
} else if (sampler_owner.owns(p_id)) {
- VkSampler *sampler = sampler_owner.getornull(p_id);
+ VkSampler *sampler = sampler_owner.get_or_null(p_id);
frames[frame].samplers_to_dispose_of.push_back(*sampler);
sampler_owner.free(p_id);
} else if (vertex_buffer_owner.owns(p_id)) {
- Buffer *vertex_buffer = vertex_buffer_owner.getornull(p_id);
+ Buffer *vertex_buffer = vertex_buffer_owner.get_or_null(p_id);
frames[frame].buffers_to_dispose_of.push_back(*vertex_buffer);
vertex_buffer_owner.free(p_id);
} else if (vertex_array_owner.owns(p_id)) {
vertex_array_owner.free(p_id);
} else if (index_buffer_owner.owns(p_id)) {
- IndexBuffer *index_buffer = index_buffer_owner.getornull(p_id);
+ IndexBuffer *index_buffer = index_buffer_owner.get_or_null(p_id);
Buffer b;
b.allocation = index_buffer->allocation;
b.buffer = index_buffer->buffer;
b.size = index_buffer->size;
+ b.buffer_info = {};
frames[frame].buffers_to_dispose_of.push_back(b);
index_buffer_owner.free(p_id);
} else if (index_array_owner.owns(p_id)) {
index_array_owner.free(p_id);
} else if (shader_owner.owns(p_id)) {
- Shader *shader = shader_owner.getornull(p_id);
+ Shader *shader = shader_owner.get_or_null(p_id);
frames[frame].shaders_to_dispose_of.push_back(*shader);
shader_owner.free(p_id);
} else if (uniform_buffer_owner.owns(p_id)) {
- Buffer *uniform_buffer = uniform_buffer_owner.getornull(p_id);
+ Buffer *uniform_buffer = uniform_buffer_owner.get_or_null(p_id);
frames[frame].buffers_to_dispose_of.push_back(*uniform_buffer);
uniform_buffer_owner.free(p_id);
} else if (texture_buffer_owner.owns(p_id)) {
- TextureBuffer *texture_buffer = texture_buffer_owner.getornull(p_id);
+ TextureBuffer *texture_buffer = texture_buffer_owner.get_or_null(p_id);
frames[frame].buffers_to_dispose_of.push_back(texture_buffer->buffer);
frames[frame].buffer_views_to_dispose_of.push_back(texture_buffer->view);
texture_buffer_owner.free(p_id);
} else if (storage_buffer_owner.owns(p_id)) {
- Buffer *storage_buffer = storage_buffer_owner.getornull(p_id);
+ Buffer *storage_buffer = storage_buffer_owner.get_or_null(p_id);
frames[frame].buffers_to_dispose_of.push_back(*storage_buffer);
storage_buffer_owner.free(p_id);
} else if (uniform_set_owner.owns(p_id)) {
- UniformSet *uniform_set = uniform_set_owner.getornull(p_id);
+ UniformSet *uniform_set = uniform_set_owner.get_or_null(p_id);
frames[frame].uniform_sets_to_dispose_of.push_back(*uniform_set);
if (uniform_set->invalidated_callback != nullptr) {
uniform_set->invalidated_callback(p_id, uniform_set->invalidated_callback_userdata);
@@ -8416,11 +8425,11 @@ void RenderingDeviceVulkan::_free_internal(RID p_id) {
uniform_set_owner.free(p_id);
} else if (render_pipeline_owner.owns(p_id)) {
- RenderPipeline *pipeline = render_pipeline_owner.getornull(p_id);
+ RenderPipeline *pipeline = render_pipeline_owner.get_or_null(p_id);
frames[frame].render_pipelines_to_dispose_of.push_back(*pipeline);
render_pipeline_owner.free(p_id);
} else if (compute_pipeline_owner.owns(p_id)) {
- ComputePipeline *pipeline = compute_pipeline_owner.getornull(p_id);
+ ComputePipeline *pipeline = compute_pipeline_owner.get_or_null(p_id);
frames[frame].compute_pipelines_to_dispose_of.push_back(*pipeline);
compute_pipeline_owner.free(p_id);
} else {
@@ -8439,49 +8448,49 @@ void RenderingDeviceVulkan::free(RID p_id) {
// We just expose the resources that are owned and can be accessed easily.
void RenderingDeviceVulkan::set_resource_name(RID p_id, const String p_name) {
if (texture_owner.owns(p_id)) {
- Texture *texture = texture_owner.getornull(p_id);
+ Texture *texture = texture_owner.get_or_null(p_id);
if (texture->owner.is_null()) {
// Don't set the source texture's name when calling on a texture view
context->set_object_name(VK_OBJECT_TYPE_IMAGE, uint64_t(texture->image), p_name);
}
context->set_object_name(VK_OBJECT_TYPE_IMAGE_VIEW, uint64_t(texture->view), p_name + " View");
} else if (framebuffer_owner.owns(p_id)) {
- //Framebuffer *framebuffer = framebuffer_owner.getornull(p_id);
+ //Framebuffer *framebuffer = framebuffer_owner.get_or_null(p_id);
// Not implemented for now as the relationship between Framebuffer and RenderPass is very complex
} else if (sampler_owner.owns(p_id)) {
- VkSampler *sampler = sampler_owner.getornull(p_id);
+ VkSampler *sampler = sampler_owner.get_or_null(p_id);
context->set_object_name(VK_OBJECT_TYPE_SAMPLER, uint64_t(*sampler), p_name);
} else if (vertex_buffer_owner.owns(p_id)) {
- Buffer *vertex_buffer = vertex_buffer_owner.getornull(p_id);
+ Buffer *vertex_buffer = vertex_buffer_owner.get_or_null(p_id);
context->set_object_name(VK_OBJECT_TYPE_BUFFER, uint64_t(vertex_buffer->buffer), p_name);
} else if (index_buffer_owner.owns(p_id)) {
- IndexBuffer *index_buffer = index_buffer_owner.getornull(p_id);
+ IndexBuffer *index_buffer = index_buffer_owner.get_or_null(p_id);
context->set_object_name(VK_OBJECT_TYPE_BUFFER, uint64_t(index_buffer->buffer), p_name);
} else if (shader_owner.owns(p_id)) {
- Shader *shader = shader_owner.getornull(p_id);
+ Shader *shader = shader_owner.get_or_null(p_id);
context->set_object_name(VK_OBJECT_TYPE_PIPELINE_LAYOUT, uint64_t(shader->pipeline_layout), p_name + " Pipeline Layout");
for (int i = 0; i < shader->sets.size(); i++) {
context->set_object_name(VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT, uint64_t(shader->sets[i].descriptor_set_layout), p_name);
}
} else if (uniform_buffer_owner.owns(p_id)) {
- Buffer *uniform_buffer = uniform_buffer_owner.getornull(p_id);
+ Buffer *uniform_buffer = uniform_buffer_owner.get_or_null(p_id);
context->set_object_name(VK_OBJECT_TYPE_BUFFER, uint64_t(uniform_buffer->buffer), p_name);
} else if (texture_buffer_owner.owns(p_id)) {
- TextureBuffer *texture_buffer = texture_buffer_owner.getornull(p_id);
+ TextureBuffer *texture_buffer = texture_buffer_owner.get_or_null(p_id);
context->set_object_name(VK_OBJECT_TYPE_BUFFER, uint64_t(texture_buffer->buffer.buffer), p_name);
context->set_object_name(VK_OBJECT_TYPE_BUFFER_VIEW, uint64_t(texture_buffer->view), p_name + " View");
} else if (storage_buffer_owner.owns(p_id)) {
- Buffer *storage_buffer = storage_buffer_owner.getornull(p_id);
+ Buffer *storage_buffer = storage_buffer_owner.get_or_null(p_id);
context->set_object_name(VK_OBJECT_TYPE_BUFFER, uint64_t(storage_buffer->buffer), p_name);
} else if (uniform_set_owner.owns(p_id)) {
- UniformSet *uniform_set = uniform_set_owner.getornull(p_id);
+ UniformSet *uniform_set = uniform_set_owner.get_or_null(p_id);
context->set_object_name(VK_OBJECT_TYPE_DESCRIPTOR_SET, uint64_t(uniform_set->descriptor_set), p_name);
} else if (render_pipeline_owner.owns(p_id)) {
- RenderPipeline *pipeline = render_pipeline_owner.getornull(p_id);
+ RenderPipeline *pipeline = render_pipeline_owner.get_or_null(p_id);
context->set_object_name(VK_OBJECT_TYPE_PIPELINE, uint64_t(pipeline->pipeline), p_name);
context->set_object_name(VK_OBJECT_TYPE_PIPELINE_LAYOUT, uint64_t(pipeline->pipeline_layout), p_name + " Layout");
} else if (compute_pipeline_owner.owns(p_id)) {
- ComputePipeline *pipeline = compute_pipeline_owner.getornull(p_id);
+ ComputePipeline *pipeline = compute_pipeline_owner.get_or_null(p_id);
context->set_object_name(VK_OBJECT_TYPE_PIPELINE, uint64_t(pipeline->pipeline), p_name);
context->set_object_name(VK_OBJECT_TYPE_PIPELINE_LAYOUT, uint64_t(pipeline->pipeline_layout), p_name + " Layout");
} else {
@@ -8838,7 +8847,7 @@ void RenderingDeviceVulkan::initialize(VulkanContext *p_context, bool p_local_de
VkCommandPoolCreateInfo cmd_pool_info;
cmd_pool_info.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
cmd_pool_info.pNext = nullptr;
- cmd_pool_info.queueFamilyIndex = p_context->get_graphics_queue();
+ cmd_pool_info.queueFamilyIndex = p_context->get_graphics_queue_family_index();
cmd_pool_info.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
VkResult res = vkCreateCommandPool(device, &cmd_pool_info, nullptr, &frames[i].command_pool);
@@ -9008,6 +9017,92 @@ void RenderingDeviceVulkan::capture_timestamp(const String &p_name) {
frames[frame].timestamp_count++;
}
+uint64_t RenderingDeviceVulkan::get_driver_resource(DriverResource p_resource, RID p_rid, uint64_t p_index) {
+ _THREAD_SAFE_METHOD_
+
+ switch (p_resource) {
+ case DRIVER_RESOURCE_VULKAN_DEVICE: {
+ return (uint64_t)context->get_device();
+ }; break;
+ case DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE: {
+ return (uint64_t)context->get_physical_device();
+ }; break;
+ case DRIVER_RESOURCE_VULKAN_INSTANCE: {
+ return (uint64_t)context->get_instance();
+ }; break;
+ case DRIVER_RESOURCE_VULKAN_QUEUE: {
+ return (uint64_t)context->get_graphics_queue();
+ }; break;
+ case DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX: {
+ return context->get_graphics_queue_family_index();
+ }; break;
+ case DRIVER_RESOURCE_VULKAN_IMAGE: {
+ Texture *tex = texture_owner.get_or_null(p_rid);
+ ERR_FAIL_NULL_V(tex, 0);
+
+ return (uint64_t)tex->image;
+ }; break;
+ case DRIVER_RESOURCE_VULKAN_IMAGE_VIEW: {
+ Texture *tex = texture_owner.get_or_null(p_rid);
+ ERR_FAIL_NULL_V(tex, 0);
+
+ return (uint64_t)tex->view;
+ }; break;
+ case DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT: {
+ Texture *tex = texture_owner.get_or_null(p_rid);
+ ERR_FAIL_NULL_V(tex, 0);
+
+ return vulkan_formats[tex->format];
+ }; break;
+ case DRIVER_RESOURCE_VULKAN_SAMPLER: {
+ VkSampler *sampler = sampler_owner.get_or_null(p_rid);
+ ERR_FAIL_NULL_V(sampler, 0);
+
+ return uint64_t(*sampler);
+ }; break;
+ case DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET: {
+ UniformSet *uniform_set = uniform_set_owner.get_or_null(p_rid);
+ ERR_FAIL_NULL_V(uniform_set, 0);
+
+ return uint64_t(uniform_set->descriptor_set);
+ }; break;
+ case DRIVER_RESOURCE_VULKAN_BUFFER: {
+ Buffer *buffer = nullptr;
+ if (vertex_buffer_owner.owns(p_rid)) {
+ buffer = vertex_buffer_owner.get_or_null(p_rid);
+ } else if (index_buffer_owner.owns(p_rid)) {
+ buffer = index_buffer_owner.get_or_null(p_rid);
+ } else if (uniform_buffer_owner.owns(p_rid)) {
+ buffer = uniform_buffer_owner.get_or_null(p_rid);
+ } else if (texture_buffer_owner.owns(p_rid)) {
+ buffer = &texture_buffer_owner.get_or_null(p_rid)->buffer;
+ } else if (storage_buffer_owner.owns(p_rid)) {
+ buffer = storage_buffer_owner.get_or_null(p_rid);
+ }
+
+ ERR_FAIL_NULL_V(buffer, 0);
+
+ return uint64_t(buffer->buffer);
+ }; break;
+ case DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE: {
+ ComputePipeline *compute_pipeline = compute_pipeline_owner.get_or_null(p_rid);
+ ERR_FAIL_NULL_V(compute_pipeline, 0);
+
+ return uint64_t(compute_pipeline->pipeline);
+ }; break;
+ case DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE: {
+ RenderPipeline *render_pipeline = render_pipeline_owner.get_or_null(p_rid);
+ ERR_FAIL_NULL_V(render_pipeline, 0);
+
+ return uint64_t(render_pipeline->pipeline);
+ }; break;
+ default: {
+ // not supported for this driver
+ return 0;
+ }; break;
+ }
+}
+
uint32_t RenderingDeviceVulkan::get_captured_timestamps_count() const {
return frames[frame].timestamp_result_count;
}
diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h
index 5ee2ca07f2..cf0b725cfc 100644
--- a/drivers/vulkan/rendering_device_vulkan.h
+++ b/drivers/vulkan/rendering_device_vulkan.h
@@ -813,7 +813,7 @@ class RenderingDeviceVulkan : public RenderingDevice {
// When using split command lists, this is
// implemented internally using secondary command
// buffers. As they can be created in threads,
- // each needs it's own command pool.
+ // each needs its own command pool.
struct SplitDrawListAllocator {
VkCommandPool command_pool = VK_NULL_HANDLE;
@@ -1044,6 +1044,7 @@ public:
virtual bool texture_is_format_supported_for_usage(DataFormat p_format, uint32_t p_usage) const;
virtual bool texture_is_shared(RID p_texture);
virtual bool texture_is_valid(RID p_texture);
+ virtual Size2i texture_size(RID p_texture);
virtual Error texture_copy(RID p_from_texture, RID p_to_texture, const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_size, uint32_t p_src_mipmap, uint32_t p_dst_mipmap, uint32_t p_src_layer, uint32_t p_dst_layer, uint32_t p_post_barrier = BARRIER_MASK_ALL);
virtual Error texture_clear(RID p_texture, const Color &p_color, uint32_t p_base_mipmap, uint32_t p_mipmaps, uint32_t p_base_layer, uint32_t p_layers, uint32_t p_post_barrier = BARRIER_MASK_ALL);
@@ -1226,6 +1227,8 @@ public:
virtual String get_device_name() const;
virtual String get_device_pipeline_cache_uuid() const;
+ virtual uint64_t get_driver_resource(DriverResource p_resource, RID p_rid = RID(), uint64_t p_index = 0);
+
RenderingDeviceVulkan();
~RenderingDeviceVulkan();
};
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp
index 625c222b67..1c7e83af21 100644
--- a/drivers/vulkan/vulkan_context.cpp
+++ b/drivers/vulkan/vulkan_context.cpp
@@ -275,22 +275,21 @@ Error VulkanContext::_obtain_vulkan_version() {
if (res == VK_SUCCESS) {
vulkan_major = VK_VERSION_MAJOR(api_version);
vulkan_minor = VK_VERSION_MINOR(api_version);
- uint32_t vulkan_patch = VK_VERSION_PATCH(api_version);
-
- print_line("Vulkan API " + itos(vulkan_major) + "." + itos(vulkan_minor) + "." + itos(vulkan_patch));
+ vulkan_patch = VK_VERSION_PATCH(api_version);
} else {
// according to the documentation this shouldn't fail with anything except a memory allocation error
// in which case we're in deep trouble anyway
ERR_FAIL_V(ERR_CANT_CREATE);
}
} else {
- print_line("vkEnumerateInstanceVersion not available, assuming Vulkan 1.0");
+ print_line("vkEnumerateInstanceVersion not available, assuming Vulkan 1.0.");
}
// we don't go above 1.2
if ((vulkan_major > 1) || (vulkan_major == 1 && vulkan_minor > 2)) {
vulkan_major = 1;
vulkan_minor = 2;
+ vulkan_patch = 0;
}
return OK;
@@ -759,7 +758,9 @@ Error VulkanContext::_create_physical_device() {
}
}
- print_line("Using Vulkan Device #" + itos(device_index) + ": " + device_vendor + " - " + device_name);
+ print_line(
+ "Vulkan API " + itos(vulkan_major) + "." + itos(vulkan_minor) + "." + itos(vulkan_patch) +
+ " - " + "Using Vulkan Device #" + itos(device_index) + ": " + device_vendor + " - " + device_name);
device_api_version = gpu_props.apiVersion;
@@ -2028,7 +2029,11 @@ int VulkanContext::get_swapchain_image_count() const {
return swapchainImageCount;
}
-uint32_t VulkanContext::get_graphics_queue() const {
+VkQueue VulkanContext::get_graphics_queue() const {
+ return graphics_queue;
+}
+
+uint32_t VulkanContext::get_graphics_queue_family_index() const {
return graphics_queue_family_index;
}
@@ -2079,12 +2084,12 @@ RID VulkanContext::local_device_create() {
}
VkDevice VulkanContext::local_device_get_vk_device(RID p_local_device) {
- LocalDevice *ld = local_device_owner.getornull(p_local_device);
+ LocalDevice *ld = local_device_owner.get_or_null(p_local_device);
return ld->device;
}
void VulkanContext::local_device_push_command_buffers(RID p_local_device, const VkCommandBuffer *p_buffers, int p_count) {
- LocalDevice *ld = local_device_owner.getornull(p_local_device);
+ LocalDevice *ld = local_device_owner.get_or_null(p_local_device);
ERR_FAIL_COND(ld->waiting);
VkSubmitInfo submit_info;
@@ -2114,7 +2119,7 @@ void VulkanContext::local_device_push_command_buffers(RID p_local_device, const
}
void VulkanContext::local_device_sync(RID p_local_device) {
- LocalDevice *ld = local_device_owner.getornull(p_local_device);
+ LocalDevice *ld = local_device_owner.get_or_null(p_local_device);
ERR_FAIL_COND(!ld->waiting);
vkDeviceWaitIdle(ld->device);
@@ -2122,7 +2127,7 @@ void VulkanContext::local_device_sync(RID p_local_device) {
}
void VulkanContext::local_device_free(RID p_local_device) {
- LocalDevice *ld = local_device_owner.getornull(p_local_device);
+ LocalDevice *ld = local_device_owner.get_or_null(p_local_device);
vkDestroyDevice(ld->device, nullptr);
local_device_owner.free(p_local_device);
}
diff --git a/drivers/vulkan/vulkan_context.h b/drivers/vulkan/vulkan_context.h
index fe09d4c497..ae7c697be8 100644
--- a/drivers/vulkan/vulkan_context.h
+++ b/drivers/vulkan/vulkan_context.h
@@ -85,6 +85,7 @@ private:
// Vulkan 1.0 doesn't return version info so we assume this by default until we know otherwise
uint32_t vulkan_major = 1;
uint32_t vulkan_minor = 0;
+ uint32_t vulkan_patch = 0;
SubgroupCapabilities subgroup_capabilities;
MultiviewCapabilities multiview_capabilities;
@@ -243,7 +244,8 @@ public:
VkPhysicalDevice get_physical_device();
VkInstance get_instance() { return inst; }
int get_swapchain_image_count() const;
- uint32_t get_graphics_queue() const;
+ VkQueue get_graphics_queue() const;
+ uint32_t get_graphics_queue_family_index() const;
void window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height);
int window_get_width(DisplayServer::WindowID p_window = 0);
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp
index 43c8722b06..276fda2a8f 100644
--- a/drivers/wasapi/audio_driver_wasapi.cpp
+++ b/drivers/wasapi/audio_driver_wasapi.cpp
@@ -35,8 +35,60 @@
#include "core/config/project_settings.h"
#include "core/os/os.h"
+#include <stdint.h> // INT32_MAX
+
#include <functiondiscoverykeys.h>
+// Define IAudioClient3 if not already defined by MinGW headers
+#if defined __MINGW32__ || defined __MINGW64__
+
+#ifndef __IAudioClient3_FWD_DEFINED__
+#define __IAudioClient3_FWD_DEFINED__
+
+typedef interface IAudioClient3 IAudioClient3;
+
+#endif // __IAudioClient3_FWD_DEFINED__
+
+#ifndef __IAudioClient3_INTERFACE_DEFINED__
+#define __IAudioClient3_INTERFACE_DEFINED__
+
+MIDL_INTERFACE("7ED4EE07-8E67-4CD4-8C1A-2B7A5987AD42")
+IAudioClient3 : public IAudioClient2 {
+public:
+ virtual HRESULT STDMETHODCALLTYPE GetSharedModeEnginePeriod(
+ /* [annotation][in] */
+ _In_ const WAVEFORMATEX *pFormat,
+ /* [annotation][out] */
+ _Out_ UINT32 *pDefaultPeriodInFrames,
+ /* [annotation][out] */
+ _Out_ UINT32 *pFundamentalPeriodInFrames,
+ /* [annotation][out] */
+ _Out_ UINT32 *pMinPeriodInFrames,
+ /* [annotation][out] */
+ _Out_ UINT32 *pMaxPeriodInFrames) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetCurrentSharedModeEnginePeriod(
+ /* [unique][annotation][out] */
+ _Out_ WAVEFORMATEX * *ppFormat,
+ /* [annotation][out] */
+ _Out_ UINT32 * pCurrentPeriodInFrames) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE InitializeSharedAudioStream(
+ /* [annotation][in] */
+ _In_ DWORD StreamFlags,
+ /* [annotation][in] */
+ _In_ UINT32 PeriodInFrames,
+ /* [annotation][in] */
+ _In_ const WAVEFORMATEX *pFormat,
+ /* [annotation][in] */
+ _In_opt_ LPCGUID AudioSessionGuid) = 0;
+};
+__CRT_UUID_DECL(IAudioClient3, 0x7ED4EE07, 0x8E67, 0x4CD4, 0x8C, 0x1A, 0x2B, 0x7A, 0x59, 0x87, 0xAD, 0x42)
+
+#endif // __IAudioClient3_INTERFACE_DEFINED__
+
+#endif // __MINGW32__ || __MINGW64__
+
#ifndef PKEY_Device_FriendlyName
#undef DEFINE_PROPERTYKEY
@@ -51,6 +103,7 @@ DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0
const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator);
const IID IID_IMMDeviceEnumerator = __uuidof(IMMDeviceEnumerator);
const IID IID_IAudioClient = __uuidof(IAudioClient);
+const IID IID_IAudioClient3 = __uuidof(IAudioClient3);
const IID IID_IAudioRenderClient = __uuidof(IAudioRenderClient);
const IID IID_IAudioCaptureClient = __uuidof(IAudioCaptureClient);
@@ -221,7 +274,22 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_c
ERR_PRINT("WASAPI: RegisterEndpointNotificationCallback error");
}
- hr = device->Activate(IID_IAudioClient, CLSCTX_ALL, nullptr, (void **)&p_device->audio_client);
+ bool using_audio_client_3 = !p_capture; // IID_IAudioClient3 is only used for adjustable output latency (not input)
+ if (using_audio_client_3) {
+ hr = device->Activate(IID_IAudioClient3, CLSCTX_ALL, nullptr, (void **)&p_device->audio_client);
+ if (hr != S_OK) {
+ // IID_IAudioClient3 will never activate on OS versions before Windows 10.
+ // Older Windows versions should fall back gracefully.
+ using_audio_client_3 = false;
+ print_verbose("WASAPI: Couldn't activate device with IAudioClient3 interface, falling back to IAudioClient interface");
+ } else {
+ print_verbose("WASAPI: Activated device using IAudioClient3 interface");
+ }
+ }
+ if (!using_audio_client_3) {
+ hr = device->Activate(IID_IAudioClient, CLSCTX_ALL, nullptr, (void **)&p_device->audio_client);
+ }
+
SAFE_RELEASE(device)
if (reinit) {
@@ -232,6 +300,16 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_c
ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
}
+ if (using_audio_client_3) {
+ AudioClientProperties audioProps;
+ audioProps.cbSize = sizeof(AudioClientProperties);
+ audioProps.bIsOffload = FALSE;
+ audioProps.eCategory = AudioCategory_GameEffects;
+
+ hr = ((IAudioClient3 *)p_device->audio_client)->SetClientProperties(&audioProps);
+ ERR_FAIL_COND_V_MSG(hr != S_OK, ERR_CANT_OPEN, "WASAPI: SetClientProperties failed with error 0x" + String::num_uint64(hr, 16) + ".");
+ }
+
hr = p_device->audio_client->GetMixFormat(&pwfex);
ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
@@ -285,15 +363,55 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_c
}
}
- DWORD streamflags = 0;
- if ((DWORD)mix_rate != pwfex->nSamplesPerSec) {
- streamflags |= AUDCLNT_STREAMFLAGS_RATEADJUST;
- pwfex->nSamplesPerSec = mix_rate;
- pwfex->nAvgBytesPerSec = pwfex->nSamplesPerSec * pwfex->nChannels * (pwfex->wBitsPerSample / 8);
- }
+ if (!using_audio_client_3) {
+ DWORD streamflags = 0;
+ if ((DWORD)mix_rate != pwfex->nSamplesPerSec) {
+ streamflags |= AUDCLNT_STREAMFLAGS_RATEADJUST;
+ pwfex->nSamplesPerSec = mix_rate;
+ pwfex->nAvgBytesPerSec = pwfex->nSamplesPerSec * pwfex->nChannels * (pwfex->wBitsPerSample / 8);
+ }
+ hr = p_device->audio_client->Initialize(AUDCLNT_SHAREMODE_SHARED, streamflags, p_capture ? REFTIMES_PER_SEC : 0, 0, pwfex, nullptr);
+ ERR_FAIL_COND_V_MSG(hr != S_OK, ERR_CANT_OPEN, "WASAPI: Initialize failed with error 0x" + String::num_uint64(hr, 16) + ".");
+ UINT32 max_frames;
+ HRESULT hr = p_device->audio_client->GetBufferSize(&max_frames);
+ ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
- hr = p_device->audio_client->Initialize(AUDCLNT_SHAREMODE_SHARED, streamflags, p_capture ? REFTIMES_PER_SEC : 0, 0, pwfex, nullptr);
- ERR_FAIL_COND_V_MSG(hr != S_OK, ERR_CANT_OPEN, "WASAPI: Initialize failed with error 0x" + String::num_uint64(hr, 16) + ".");
+ // Due to WASAPI Shared Mode we have no control of the buffer size
+ buffer_frames = max_frames;
+ } else {
+ IAudioClient3 *device_audio_client_3 = (IAudioClient3 *)p_device->audio_client;
+
+ // AUDCLNT_STREAMFLAGS_RATEADJUST is an invalid flag with IAudioClient3, therefore we have to use
+ // the closest supported mix rate supported by the audio driver.
+ mix_rate = pwfex->nSamplesPerSec;
+ print_verbose("WASAPI: mix_rate = " + itos(mix_rate));
+
+ UINT32 default_period_frames, fundamental_period_frames, min_period_frames, max_period_frames;
+ hr = device_audio_client_3->GetSharedModeEnginePeriod(
+ pwfex,
+ &default_period_frames,
+ &fundamental_period_frames,
+ &min_period_frames,
+ &max_period_frames);
+ ERR_FAIL_COND_V_MSG(hr != S_OK, ERR_CANT_OPEN, "WASAPI: GetSharedModeEnginePeriod failed with error 0x" + String::num_uint64(hr, 16) + ".");
+
+ // Period frames must be an integral multiple of fundamental_period_frames or IAudioClient3 initialization will fail,
+ // so we need to select the closest multiple to the user-specified latency.
+ UINT32 desired_period_frames = target_latency_ms * mix_rate / 1000;
+ UINT32 period_frames = (desired_period_frames / fundamental_period_frames) * fundamental_period_frames;
+ if (ABS((int64_t)period_frames - (int64_t)desired_period_frames) > ABS((int64_t)(period_frames + fundamental_period_frames) - (int64_t)desired_period_frames)) {
+ period_frames = period_frames + fundamental_period_frames;
+ }
+ period_frames = CLAMP(period_frames, min_period_frames, max_period_frames);
+ print_verbose("WASAPI: fundamental_period_frames = " + itos(fundamental_period_frames));
+ print_verbose("WASAPI: min_period_frames = " + itos(min_period_frames));
+ print_verbose("WASAPI: max_period_frames = " + itos(max_period_frames));
+ print_verbose("WASAPI: selected a period frame size of " + itos(period_frames));
+ buffer_frames = period_frames;
+
+ hr = device_audio_client_3->InitializeSharedAudioStream(0, period_frames, pwfex, nullptr);
+ ERR_FAIL_COND_V_MSG(hr != S_OK, ERR_CANT_OPEN, "WASAPI: InitializeSharedAudioStream failed with error 0x" + String::num_uint64(hr, 16) + ".");
+ }
if (p_capture) {
hr = p_device->audio_client->GetService(IID_IAudioCaptureClient, (void **)&p_device->capture_client);
@@ -328,13 +446,6 @@ Error AudioDriverWASAPI::init_render_device(bool reinit) {
break;
}
- UINT32 max_frames;
- HRESULT hr = audio_output.audio_client->GetBufferSize(&max_frames);
- ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
-
- // Due to WASAPI Shared Mode we have no control of the buffer size
- buffer_frames = max_frames;
-
// Sample rate is independent of channels (ref: https://stackoverflow.com/questions/11048825/audio-sample-frequency-rely-on-channels)
samples_in.resize(buffer_frames * channels);
@@ -367,7 +478,6 @@ Error AudioDriverWASAPI::audio_device_finish(AudioDeviceWASAPI *p_device) {
if (p_device->audio_client) {
p_device->audio_client->Stop();
}
-
p_device->active = false;
}
@@ -389,6 +499,8 @@ Error AudioDriverWASAPI::finish_capture_device() {
Error AudioDriverWASAPI::init() {
mix_rate = GLOBAL_GET("audio/driver/mix_rate");
+ target_latency_ms = GLOBAL_GET("audio/driver/output_latency");
+
Error err = init_render_device();
if (err != OK) {
ERR_PRINT("WASAPI: init_render_device error");
diff --git a/drivers/wasapi/audio_driver_wasapi.h b/drivers/wasapi/audio_driver_wasapi.h
index b9b325f0fb..312b6a6781 100644
--- a/drivers/wasapi/audio_driver_wasapi.h
+++ b/drivers/wasapi/audio_driver_wasapi.h
@@ -71,6 +71,7 @@ class AudioDriverWASAPI : public AudioDriver {
unsigned int channels = 0;
int mix_rate = 0;
int buffer_frames = 0;
+ int target_latency_ms = 0;
bool thread_exited = false;
mutable bool exit_thread = false;
@@ -114,5 +115,5 @@ public:
AudioDriverWASAPI();
};
+#endif // WASAPI_ENABLED
#endif // AUDIO_DRIVER_WASAPI_H
-#endif
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp
index 325bae5b56..f7a5f7279e 100644
--- a/drivers/windows/dir_access_windows.cpp
+++ b/drivers/windows/dir_access_windows.cpp
@@ -155,7 +155,7 @@ Error DirAccessWindows::make_dir(String p_dir) {
GLOBAL_LOCK_FUNCTION
p_dir = fix_path(p_dir);
- if (p_dir.is_rel_path()) {
+ if (p_dir.is_relative_path()) {
p_dir = current_dir.plus_file(p_dir);
}
@@ -227,7 +227,7 @@ bool DirAccessWindows::file_exists(String p_file) {
bool DirAccessWindows::dir_exists(String p_dir) {
GLOBAL_LOCK_FUNCTION
- if (p_dir.is_rel_path()) {
+ if (p_dir.is_relative_path()) {
p_dir = get_current_dir().plus_file(p_dir);
}
@@ -242,13 +242,13 @@ bool DirAccessWindows::dir_exists(String p_dir) {
}
Error DirAccessWindows::rename(String p_path, String p_new_path) {
- if (p_path.is_rel_path()) {
+ if (p_path.is_relative_path()) {
p_path = get_current_dir().plus_file(p_path);
}
p_path = fix_path(p_path);
- if (p_new_path.is_rel_path()) {
+ if (p_new_path.is_relative_path()) {
p_new_path = get_current_dir().plus_file(p_new_path);
}
@@ -281,7 +281,7 @@ Error DirAccessWindows::rename(String p_path, String p_new_path) {
}
Error DirAccessWindows::remove(String p_path) {
- if (p_path.is_rel_path()) {
+ if (p_path.is_relative_path()) {
p_path = get_current_dir().plus_file(p_path);
}
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp
index 7aa63f899b..38db48a4d4 100644
--- a/editor/action_map_editor.cpp
+++ b/editor/action_map_editor.cpp
@@ -120,8 +120,8 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event) {
physical_key_checkbox->set_visible(show_phys_key);
additional_options_container->show();
- // Update selected item in input list for keys, joybuttons and joyaxis only (since the mouse cannot be "listened" for).
- if (k.is_valid() || joyb.is_valid() || joym.is_valid()) {
+ // Update selected item in input list.
+ if (k.is_valid() || joyb.is_valid() || joym.is_valid() || mb.is_valid()) {
TreeItem *category = input_list_tree->get_root()->get_first_child();
while (category) {
TreeItem *input_item = category->get_first_child();
@@ -134,13 +134,14 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event) {
}
// If event type matches input types of this category.
- if ((k.is_valid() && input_type == INPUT_KEY) || (joyb.is_valid() && input_type == INPUT_JOY_BUTTON) || (joym.is_valid() && input_type == INPUT_JOY_MOTION)) {
+ if ((k.is_valid() && input_type == INPUT_KEY) || (joyb.is_valid() && input_type == INPUT_JOY_BUTTON) || (joym.is_valid() && input_type == INPUT_JOY_MOTION) || (mb.is_valid() && input_type == INPUT_MOUSE_BUTTON)) {
// Loop through all items of this category until one matches.
while (input_item) {
bool key_match = k.is_valid() && (Variant(k->get_keycode()) == input_item->get_meta("__keycode") || Variant(k->get_physical_keycode()) == input_item->get_meta("__keycode"));
bool joyb_match = joyb.is_valid() && Variant(joyb->get_button_index()) == input_item->get_meta("__index");
bool joym_match = joym.is_valid() && Variant(joym->get_axis()) == input_item->get_meta("__axis") && joym->get_axis_value() == (float)input_item->get_meta("__value");
- if (key_match || joyb_match || joym_match) {
+ bool mb_match = mb.is_valid() && Variant(mb->get_button_index()) == input_item->get_meta("__index");
+ if (key_match || joyb_match || joym_match || mb_match) {
category->set_collapsed(false);
input_item->select(0);
input_list_tree->ensure_cursor_is_visible();
@@ -165,7 +166,6 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event) {
if (allowed_input_types & INPUT_KEY) {
strings.append(TTR("Key"));
}
- // We don't check for INPUT_MOUSE_BUTTON since it is ignored in the "Listen Window Input" method.
if (allowed_input_types & INPUT_JOY_BUTTON) {
strings.append(TTR("Joypad Button"));
@@ -173,7 +173,9 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event) {
if (allowed_input_types & INPUT_JOY_MOTION) {
strings.append(TTR("Joypad Axis"));
}
-
+ if (allowed_input_types & INPUT_MOUSE_BUTTON) {
+ strings.append(TTR("Mouse Button in area below"));
+ }
if (strings.size() == 0) {
text = TTR("Input Event dialog has been misconfigured: No input types are allowed.");
event_as_text->set_text(text);
@@ -214,12 +216,21 @@ void InputEventConfigurationDialog::_listen_window_input(const Ref<InputEvent> &
return;
}
- // Ignore mouse
- Ref<InputEventMouse> m = p_event;
- if (m.is_valid()) {
+ // Ignore mouse motion
+ Ref<InputEventMouseMotion> mm = p_event;
+ if (mm.is_valid()) {
return;
}
+ // Ignore mouse button if not in the detection rect
+ Ref<InputEventMouseButton> mb = p_event;
+ if (mb.is_valid()) {
+ Rect2 r = mouse_detection_rect->get_rect();
+ if (!r.has_point(mouse_detection_rect->get_local_mouse_position() + r.get_position())) {
+ return;
+ }
+ }
+
// Check what the type is and if it is allowed.
Ref<InputEventKey> k = p_event;
Ref<InputEventJoypadButton> joyb = p_event;
@@ -227,6 +238,7 @@ void InputEventConfigurationDialog::_listen_window_input(const Ref<InputEvent> &
int type = k.is_valid() ? INPUT_KEY : joyb.is_valid() ? INPUT_JOY_BUTTON :
joym.is_valid() ? INPUT_JOY_MOTION :
+ mb.is_valid() ? INPUT_MOUSE_BUTTON :
0;
if (!(allowed_input_types & type)) {
@@ -248,10 +260,8 @@ void InputEventConfigurationDialog::_listen_window_input(const Ref<InputEvent> &
k->set_pressed(false); // to avoid serialisation of 'pressed' property - doesn't matter for actions anyway.
// Maintain physical keycode option state
if (physical_key_checkbox->is_pressed()) {
- k->set_physical_keycode(k->get_keycode());
k->set_keycode(KEY_NONE);
} else {
- k->set_keycode((Key)k->get_physical_keycode());
k->set_physical_keycode(KEY_NONE);
}
}
@@ -539,6 +549,8 @@ void InputEventConfigurationDialog::_notification(int p_what) {
icon_cache.joypad_button = get_theme_icon(SNAME("JoyButton"), SNAME("EditorIcons"));
icon_cache.joypad_axis = get_theme_icon(SNAME("JoyAxis"), SNAME("EditorIcons"));
+ mouse_detection_rect->set_color(get_theme_color(SNAME("dark_color_2"), SNAME("Editor")));
+
_update_input_list();
} break;
default:
@@ -577,7 +589,7 @@ void InputEventConfigurationDialog::set_allowed_input_types(int p_type_masks) {
}
InputEventConfigurationDialog::InputEventConfigurationDialog() {
- allowed_input_types = INPUT_KEY | INPUT_MOUSE_BUTTON | INPUT_JOY_BUTTON | INPUT_JOY_MOTION;
+ allowed_input_types = INPUT_KEY | INPUT_MOUSE_BUTTON | INPUT_JOY_BUTTON | INPUT_JOY_MOTION | INPUT_MOUSE_BUTTON;
set_title(TTR("Event Configuration"));
set_min_size(Size2i(550 * EDSCALE, 0)); // Min width
@@ -592,12 +604,17 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
tab_container->connect("tab_selected", callable_mp(this, &InputEventConfigurationDialog::_tab_selected));
main_vbox->add_child(tab_container);
- CenterContainer *cc = memnew(CenterContainer);
- cc->set_name(TTR("Listen for Input"));
+ // Listen to input tab
+ VBoxContainer *vb = memnew(VBoxContainer);
+ vb->set_name(TTR("Listen for Input"));
event_as_text = memnew(Label);
event_as_text->set_align(Label::ALIGN_CENTER);
- cc->add_child(event_as_text);
- tab_container->add_child(cc);
+ vb->add_child(event_as_text);
+ // Mouse button detection rect (Mouse button event outside this ColorRect will be ignored)
+ mouse_detection_rect = memnew(ColorRect);
+ mouse_detection_rect->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ vb->add_child(mouse_detection_rect);
+ tab_container->add_child(vb);
// List of all input options to manually select from.
diff --git a/editor/action_map_editor.h b/editor/action_map_editor.h
index aff3e6e957..e55cab3510 100644
--- a/editor/action_map_editor.h
+++ b/editor/action_map_editor.h
@@ -32,6 +32,7 @@
#define ACTION_MAP_EDITOR_H
#include "editor/editor_data.h"
+#include <scene/gui/color_rect.h>
// Confirmation Dialog used when configuring an input event.
// Separate from ActionMapEditor for code cleanliness and separation of responsibilities.
@@ -60,6 +61,7 @@ private:
// Listening for input
Label *event_as_text;
+ ColorRect *mouse_detection_rect;
// List of All Key/Mouse/Joypad input options.
int allowed_input_types;
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index ea2ae53e82..28642f1bb4 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -217,6 +217,8 @@ void AnimationBezierTrackEdit::_draw_line_clipped(const Vector2 &p_from, const V
void AnimationBezierTrackEdit::_notification(int p_what) {
if (p_what == NOTIFICATION_THEME_CHANGED || p_what == NOTIFICATION_ENTER_TREE) {
+ close_button->set_icon(get_theme_icon(SNAME("Close"), SNAME("EditorIcons")));
+
bezier_icon = get_theme_icon(SNAME("KeyBezierPoint"), SNAME("EditorIcons"));
bezier_handle_icon = get_theme_icon(SNAME("KeyBezierHandle"), SNAME("EditorIcons"));
selected_icon = get_theme_icon(SNAME("KeyBezierSelected"), SNAME("EditorIcons"));
@@ -231,8 +233,8 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
int hsep = get_theme_constant(SNAME("hseparation"), SNAME("ItemList"));
int vsep = get_theme_constant(SNAME("vseparation"), SNAME("ItemList"));
- handle_mode_option->set_position(Vector2(right_limit + hsep, get_size().height - handle_mode_option->get_combined_minimum_size().height - vsep));
- handle_mode_option->set_size(Vector2(timeline->get_buttons_width() - hsep * 2, handle_mode_option->get_combined_minimum_size().height));
+ right_column->set_position(Vector2(right_limit + hsep, vsep));
+ right_column->set_size(Vector2(timeline->get_buttons_width() - hsep * 2, get_size().y - vsep * 2));
}
if (p_what == NOTIFICATION_DRAW) {
if (animation.is_null()) {
@@ -261,12 +263,6 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
draw_line(Point2(right_limit, 0), Point2(right_limit, get_size().height), linecolor, Math::round(EDSCALE));
- Ref<Texture2D> close_icon = get_theme_icon(SNAME("Close"), SNAME("EditorIcons"));
-
- close_icon_rect.position = Vector2(get_size().width - close_icon->get_width() - hsep, hsep);
- close_icon_rect.size = close_icon->get_size();
- draw_texture(close_icon, close_icon_rect.position);
-
String base_path = animation->track_get_path(track);
int end = base_path.find(":");
if (end != -1) {
@@ -495,10 +491,10 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
}
draw_rect(
Rect2(bs_from, bs_to - bs_from),
- get_theme_color("box_selection_fill_color", "Editor"));
+ get_theme_color(SNAME("box_selection_fill_color"), SNAME("Editor")));
draw_rect(
Rect2(bs_from, bs_to - bs_from),
- get_theme_color("box_selection_stroke_color", "Editor"),
+ get_theme_color(SNAME("box_selection_stroke_color"), SNAME("Editor")),
false,
Math::round(EDSCALE));
}
@@ -606,7 +602,7 @@ void AnimationBezierTrackEdit::_select_at_anim(const Ref<Animation> &p_anim, int
update();
}
-void AnimationBezierTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
+void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (p_event->is_pressed()) {
@@ -1126,13 +1122,7 @@ void AnimationBezierTrackEdit::delete_selection() {
}
}
-void AnimationBezierTrackEdit::set_block_animation_update_ptr(bool *p_block_ptr) {
- block_animation_update_ptr = p_block_ptr;
-}
-
void AnimationBezierTrackEdit::_bind_methods() {
- ClassDB::bind_method("_gui_input", &AnimationBezierTrackEdit::_gui_input);
-
ClassDB::bind_method("_clear_selection", &AnimationBezierTrackEdit::_clear_selection);
ClassDB::bind_method("_clear_selection_for_anim", &AnimationBezierTrackEdit::_clear_selection_for_anim);
ClassDB::bind_method("_select_at_anim", &AnimationBezierTrackEdit::_select_at_anim);
@@ -1152,21 +1142,6 @@ void AnimationBezierTrackEdit::_bind_methods() {
}
AnimationBezierTrackEdit::AnimationBezierTrackEdit() {
- undo_redo = nullptr;
- timeline = nullptr;
- root = nullptr;
- menu = nullptr;
- block_animation_update_ptr = nullptr;
-
- moving_selection_attempt = false;
- moving_selection = false;
- select_single_attempt = -1;
- box_selecting = false;
- box_selecting_attempt = false;
-
- moving_handle = 0;
-
- play_position_pos = 0;
play_position = memnew(Control);
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
add_child(play_position);
@@ -1174,18 +1149,21 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() {
play_position->connect("draw", callable_mp(this, &AnimationBezierTrackEdit::_play_position_draw));
set_focus_mode(FOCUS_CLICK);
- v_scroll = 0;
- v_zoom = 1;
-
- panning_timeline = false;
set_clip_contents(true);
handle_mode = HANDLE_MODE_FREE;
handle_mode_option = memnew(OptionButton);
- add_child(handle_mode_option);
+
+ close_button = memnew(Button);
+ close_button->connect("pressed", Callable(this, SNAME("emit_signal")), varray(SNAME("close_request")));
+ close_button->set_text(TTR("Close"));
+
+ right_column = memnew(VBoxContainer);
+ right_column->add_child(close_button);
+ right_column->add_spacer();
+ right_column->add_child(handle_mode_option);
+ add_child(right_column);
menu = memnew(PopupMenu);
add_child(menu);
menu->connect("id_pressed", callable_mp(this, &AnimationBezierTrackEdit::_menu_selected));
-
- //set_mouse_filter(MOUSE_FILTER_PASS); //scroll has to work too for selection
}
diff --git a/editor/animation_bezier_editor.h b/editor/animation_bezier_editor.h
index b082cae3ea..578c6f9337 100644
--- a/editor/animation_bezier_editor.h
+++ b/editor/animation_bezier_editor.h
@@ -51,11 +51,14 @@ class AnimationBezierTrackEdit : public Control {
HandleMode handle_mode;
OptionButton *handle_mode_option;
- AnimationTimelineEdit *timeline;
- UndoRedo *undo_redo;
- Node *root;
+ VBoxContainer *right_column;
+ Button *close_button;
+
+ AnimationTimelineEdit *timeline = nullptr;
+ UndoRedo *undo_redo = nullptr;
+ Node *root = nullptr;
Control *play_position; //separate control used to draw so updates for only position changed are much faster
- float play_position_pos;
+ float play_position_pos = 0;
Ref<Animation> animation;
int track;
@@ -70,37 +73,35 @@ class AnimationBezierTrackEdit : public Control {
Map<int, Rect2> subtracks;
- float v_scroll;
- float v_zoom;
+ float v_scroll = 0;
+ float v_zoom = 1;
- PopupMenu *menu;
+ PopupMenu *menu = nullptr;
void _zoom_changed();
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _menu_selected(int p_index);
- bool *block_animation_update_ptr; //used to block all tracks re-gen (speed up)
-
void _play_position_draw();
Vector2 insert_at_pos;
- bool moving_selection_attempt;
- int select_single_attempt;
- bool moving_selection;
+ bool moving_selection_attempt = false;
+ int select_single_attempt = -1;
+ bool moving_selection = false;
int moving_selection_from_key;
Vector2 moving_selection_offset;
- bool box_selecting_attempt;
- bool box_selecting;
- bool box_selecting_add;
+ bool box_selecting_attempt = false;
+ bool box_selecting = false;
+ bool box_selecting_add = false;
Vector2 box_selection_from;
Vector2 box_selection_to;
- int moving_handle; //0 no move -1 or +1 out
- int moving_handle_key;
+ int moving_handle = 0; //0 no move -1 or +1 out
+ int moving_handle_key = 0;
Vector2 moving_handle_left;
Vector2 moving_handle_right;
@@ -129,7 +130,7 @@ class AnimationBezierTrackEdit : public Control {
Set<int> selection;
- bool panning_timeline;
+ bool panning_timeline = false;
float panning_timeline_from;
float panning_timeline_at;
@@ -155,8 +156,6 @@ public:
void set_editor(AnimationTrackEditor *p_editor);
void set_root(Node *p_root);
- void set_block_animation_update_ptr(bool *p_block_ptr);
-
void set_play_position(float p_pos);
void update_play_position();
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index ff2818f027..324237ff82 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -1642,7 +1642,7 @@ void AnimationTimelineEdit::_play_position_draw() {
}
}
-void AnimationTimelineEdit::_gui_input(const Ref<InputEvent> &p_event) {
+void AnimationTimelineEdit::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
const Ref<InputEventMouseButton> mb = p_event;
@@ -1754,8 +1754,6 @@ void AnimationTimelineEdit::_track_added(int p_track) {
}
void AnimationTimelineEdit::_bind_methods() {
- ClassDB::bind_method("_gui_input", &AnimationTimelineEdit::_gui_input);
-
ADD_SIGNAL(MethodInfo("zoom_changed"));
ADD_SIGNAL(MethodInfo("name_limit_changed"));
ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag")));
@@ -2551,7 +2549,7 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
return Control::get_tooltip(p_pos);
}
-void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) {
+void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (p_event->is_pressed()) {
@@ -2965,8 +2963,6 @@ void AnimationTrackEdit::append_to_selection(const Rect2 &p_box, bool p_deselect
}
void AnimationTrackEdit::_bind_methods() {
- ClassDB::bind_method("_gui_input", &AnimationTrackEdit::_gui_input);
-
ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag")));
ADD_SIGNAL(MethodInfo("remove_request", PropertyInfo(Variant::INT, "track")));
ADD_SIGNAL(MethodInfo("dropped", PropertyInfo(Variant::INT, "from_track"), PropertyInfo(Variant::INT, "to_track")));
@@ -5761,7 +5757,7 @@ void AnimationTrackEditor::_pick_track_filter_input(const Ref<InputEvent> &p_ie)
case KEY_DOWN:
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
- pick_track->get_scene_tree()->get_scene_tree()->call("_gui_input", k);
+ pick_track->get_scene_tree()->get_scene_tree()->gui_input(k);
pick_track->get_filter_line_edit()->accept_event();
} break;
default:
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index 6d977e5a3f..4da708dd1c 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -89,7 +89,7 @@ class AnimationTimelineEdit : public Range {
float dragging_hsize_from;
float dragging_hsize_at;
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _track_added(int p_track);
protected:
@@ -195,7 +195,7 @@ protected:
static void _bind_methods();
void _notification(int p_what);
- virtual void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
public:
virtual Variant get_drag_data(const Point2 &p_point) override;
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp
index 0caed1e8e3..4ee8b991e4 100644
--- a/editor/animation_track_editor_plugins.cpp
+++ b/editor/animation_track_editor_plugins.cpp
@@ -1035,7 +1035,7 @@ void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant
AnimationTrackEdit::drop_data(p_point, p_data);
}
-void AnimationTrackEditTypeAudio::_gui_input(const Ref<InputEvent> &p_event) {
+void AnimationTrackEditTypeAudio::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseMotion> mm = p_event;
@@ -1132,7 +1132,7 @@ void AnimationTrackEditTypeAudio::_gui_input(const Ref<InputEvent> &p_event) {
return;
}
- AnimationTrackEdit::_gui_input(p_event);
+ AnimationTrackEdit::gui_input(p_event);
}
////////////////////
diff --git a/editor/animation_track_editor_plugins.h b/editor/animation_track_editor_plugins.h
index 66229c3012..a362422c2b 100644
--- a/editor/animation_track_editor_plugins.h
+++ b/editor/animation_track_editor_plugins.h
@@ -124,7 +124,7 @@ protected:
static void _bind_methods();
public:
- virtual void _gui_input(const Ref<InputEvent> &p_event) override;
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const override;
virtual void drop_data(const Point2 &p_point, const Variant &p_data) override;
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 39095c42a4..7bf82fbd1b 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -114,7 +114,7 @@ void FindReplaceBar::_notification(int p_what) {
}
}
-void FindReplaceBar::_unhandled_input(const Ref<InputEvent> &p_event) {
+void FindReplaceBar::unhandled_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventKey> k = p_event;
@@ -611,7 +611,6 @@ void FindReplaceBar::set_text_edit(CodeTextEditor *p_text_editor) {
}
void FindReplaceBar::_bind_methods() {
- ClassDB::bind_method("_unhandled_input", &FindReplaceBar::_unhandled_input);
ClassDB::bind_method("_search_current", &FindReplaceBar::search_current);
ADD_SIGNAL(MethodInfo("search"));
@@ -712,11 +711,31 @@ FindReplaceBar::FindReplaceBar() {
// This function should be used to handle shortcuts that could otherwise
// be handled too late if they weren't handled here.
-void CodeTextEditor::_input(const Ref<InputEvent> &event) {
+void CodeTextEditor::input(const Ref<InputEvent> &event) {
ERR_FAIL_COND(event.is_null());
const Ref<InputEventKey> key_event = event;
- if (!key_event.is_valid() || !key_event->is_pressed() || !text_editor->has_focus()) {
+
+ if (!key_event.is_valid()) {
+ return;
+ }
+ if (!key_event->is_pressed()) {
+ return;
+ }
+
+ if (!text_editor->has_focus()) {
+ if ((find_replace_bar != nullptr && find_replace_bar->is_visible()) && (find_replace_bar->has_focus() || find_replace_bar->is_ancestor_of(get_focus_owner()))) {
+ if (ED_IS_SHORTCUT("script_text_editor/find_next", key_event)) {
+ find_replace_bar->search_next();
+ accept_event();
+ return;
+ }
+ if (ED_IS_SHORTCUT("script_text_editor/find_previous", key_event)) {
+ find_replace_bar->search_prev();
+ accept_event();
+ return;
+ }
+ }
return;
}
@@ -815,11 +834,9 @@ void CodeTextEditor::_line_col_changed() {
}
StringBuilder sb;
- sb.append("(");
- sb.append(itos(text_editor->get_caret_line() + 1).lpad(3));
- sb.append(",");
+ sb.append(itos(text_editor->get_caret_line() + 1).lpad(4));
+ sb.append(" : ");
sb.append(itos(positional_column + 1).lpad(3));
- sb.append(")");
line_and_col_txt->set_text(sb.as_string());
}
@@ -1283,7 +1300,9 @@ void CodeTextEditor::_delete_line(int p_line) {
text_editor->set_caret_column(0);
}
text_editor->backspace();
- text_editor->unfold_line(p_line);
+ if (p_line < text_editor->get_line_count()) {
+ text_editor->unfold_line(p_line);
+ }
text_editor->set_caret_line(p_line);
}
@@ -1560,17 +1579,10 @@ void CodeTextEditor::_update_text_editor_theme() {
}
void CodeTextEditor::_on_settings_change() {
- if (settings_changed) {
- return;
- }
-
- settings_changed = true;
- MessageQueue::get_singleton()->push_callable(callable_mp(this, &CodeTextEditor::_apply_settings_change));
+ _apply_settings_change();
}
void CodeTextEditor::_apply_settings_change() {
- settings_changed = false;
-
_update_text_editor_theme();
font_size = EditorSettings::get_singleton()->get("interface/editor/code_font_size");
@@ -1636,11 +1648,8 @@ void CodeTextEditor::_set_show_warnings_panel(bool p_show) {
}
void CodeTextEditor::_toggle_scripts_pressed() {
- if (is_layout_rtl()) {
- toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->toggle_scripts_panel() ? get_theme_icon(SNAME("Forward"), SNAME("EditorIcons")) : get_theme_icon(SNAME("Back"), SNAME("EditorIcons")));
- } else {
- toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->toggle_scripts_panel() ? get_theme_icon(SNAME("Back"), SNAME("EditorIcons")) : get_theme_icon(SNAME("Forward"), SNAME("EditorIcons")));
- }
+ ScriptEditor::get_singleton()->toggle_scripts_panel();
+ update_toggle_scripts_button();
}
void CodeTextEditor::_error_pressed(const Ref<InputEvent> &p_event) {
@@ -1736,7 +1745,7 @@ void CodeTextEditor::goto_prev_bookmark() {
text_editor->set_caret_line(bmarks[bmarks.size() - 1]);
text_editor->center_viewport_to_caret();
} else {
- for (int i = bmarks.size(); i >= 0; i--) {
+ for (int i = bmarks.size() - 1; i >= 0; i--) {
int bmark_line = bmarks[i];
if (bmark_line < line) {
text_editor->unfold_line(bmark_line);
@@ -1753,8 +1762,6 @@ void CodeTextEditor::remove_all_bookmarks() {
}
void CodeTextEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_input"), &CodeTextEditor::_input);
-
ADD_SIGNAL(MethodInfo("validate_script"));
ADD_SIGNAL(MethodInfo("load_theme_settings"));
ADD_SIGNAL(MethodInfo("show_errors_panel"));
@@ -1772,11 +1779,11 @@ void CodeTextEditor::show_toggle_scripts_button() {
void CodeTextEditor::update_toggle_scripts_button() {
if (is_layout_rtl()) {
- toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? get_theme_icon(SNAME("Forward"), SNAME("EditorIcons")) : get_theme_icon(SNAME("Back"), SNAME("EditorIcons")));
+ toggle_scripts_button->set_icon(get_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Forward") : SNAME("Back"), SNAME("EditorIcons")));
} else {
- toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? get_theme_icon(SNAME("Back"), SNAME("EditorIcons")) : get_theme_icon(SNAME("Forward"), SNAME("EditorIcons")));
+ toggle_scripts_button->set_icon(get_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Back") : SNAME("Forward"), SNAME("EditorIcons")));
}
- toggle_scripts_button->set_tooltip(TTR("Toggle Scripts Panel") + " (" + ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text() + ")");
+ toggle_scripts_button->set_tooltip(vformat("%s (%s)", TTR("Toggle Scripts Panel"), ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text()));
}
CodeTextEditor::CodeTextEditor() {
diff --git a/editor/code_editor.h b/editor/code_editor.h
index ee8f4366dd..3c52a0c6e8 100644
--- a/editor/code_editor.h
+++ b/editor/code_editor.h
@@ -105,7 +105,7 @@ class FindReplaceBar : public HBoxContainer {
protected:
void _notification(int p_what);
- void _unhandled_input(const Ref<InputEvent> &p_event);
+ virtual void unhandled_input(const Ref<InputEvent> &p_event) override;
bool _search(uint32_t p_flags, int p_from_line, int p_from_col);
@@ -162,8 +162,6 @@ class CodeTextEditor : public VBoxContainer {
int error_line;
int error_column;
- bool settings_changed = false;
-
void _on_settings_change();
void _apply_settings_change();
@@ -173,7 +171,7 @@ class CodeTextEditor : public VBoxContainer {
void _font_resize_timeout();
bool _add_font_size(int p_delta);
- void _input(const Ref<InputEvent> &event);
+ virtual void input(const Ref<InputEvent> &event) override;
void _text_editor_gui_input(const Ref<InputEvent> &p_event);
void _zoom_in();
void _zoom_out();
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index eeab0fc2f5..f0b27702e7 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -356,7 +356,7 @@ void CreateDialog::_sbox_input(const Ref<InputEvent> &p_ie) {
case KEY_DOWN:
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
- search_options->call("_gui_input", k);
+ search_options->gui_input(k);
search_box->accept_event();
} break;
default:
diff --git a/editor/debugger/debug_adapter/debug_adapter_parser.cpp b/editor/debugger/debug_adapter/debug_adapter_parser.cpp
index 945291b163..fbd3aaa409 100644
--- a/editor/debugger/debug_adapter/debug_adapter_parser.cpp
+++ b/editor/debugger/debug_adapter/debug_adapter_parser.cpp
@@ -33,12 +33,15 @@
#include "editor/debugger/editor_debugger_node.h"
#include "editor/debugger/script_editor_debugger.h"
#include "editor/editor_node.h"
+#include "editor/editor_run_native.h"
void DebugAdapterParser::_bind_methods() {
// Requests
ClassDB::bind_method(D_METHOD("req_initialize", "params"), &DebugAdapterParser::req_initialize);
- ClassDB::bind_method(D_METHOD("req_disconnect", "params"), &DebugAdapterParser::prepare_success_response);
+ ClassDB::bind_method(D_METHOD("req_disconnect", "params"), &DebugAdapterParser::req_disconnect);
ClassDB::bind_method(D_METHOD("req_launch", "params"), &DebugAdapterParser::req_launch);
+ ClassDB::bind_method(D_METHOD("req_attach", "params"), &DebugAdapterParser::req_attach);
+ ClassDB::bind_method(D_METHOD("req_restart", "params"), &DebugAdapterParser::req_restart);
ClassDB::bind_method(D_METHOD("req_terminate", "params"), &DebugAdapterParser::req_terminate);
ClassDB::bind_method(D_METHOD("req_configurationDone", "params"), &DebugAdapterParser::prepare_success_response);
ClassDB::bind_method(D_METHOD("req_pause", "params"), &DebugAdapterParser::req_pause);
@@ -46,10 +49,13 @@ void DebugAdapterParser::_bind_methods() {
ClassDB::bind_method(D_METHOD("req_threads", "params"), &DebugAdapterParser::req_threads);
ClassDB::bind_method(D_METHOD("req_stackTrace", "params"), &DebugAdapterParser::req_stackTrace);
ClassDB::bind_method(D_METHOD("req_setBreakpoints", "params"), &DebugAdapterParser::req_setBreakpoints);
+ ClassDB::bind_method(D_METHOD("req_breakpointLocations", "params"), &DebugAdapterParser::req_breakpointLocations);
ClassDB::bind_method(D_METHOD("req_scopes", "params"), &DebugAdapterParser::req_scopes);
ClassDB::bind_method(D_METHOD("req_variables", "params"), &DebugAdapterParser::req_variables);
ClassDB::bind_method(D_METHOD("req_next", "params"), &DebugAdapterParser::req_next);
ClassDB::bind_method(D_METHOD("req_stepIn", "params"), &DebugAdapterParser::req_stepIn);
+ ClassDB::bind_method(D_METHOD("req_evaluate", "params"), &DebugAdapterParser::req_evaluate);
+ ClassDB::bind_method(D_METHOD("req_godot/put_msg", "params"), &DebugAdapterParser::req_godot_put_msg);
}
Dictionary DebugAdapterParser::prepare_base_event() const {
@@ -80,13 +86,31 @@ Dictionary DebugAdapterParser::prepare_error_response(const Dictionary &p_params
DAP::Message message;
String error, error_desc;
switch (err_type) {
+ case DAP::ErrorType::WRONG_PATH:
+ error = "wrong_path";
+ error_desc = "The editor and client are working on different paths; the client is on \"{clientPath}\", but the editor is on \"{editorPath}\"";
+ break;
+ case DAP::ErrorType::NOT_RUNNING:
+ error = "not_running";
+ error_desc = "Can't attach to a running session since there isn't one.";
+ break;
+ case DAP::ErrorType::TIMEOUT:
+ error = "timeout";
+ error_desc = "Timeout reached while processing a request.";
+ break;
+ case DAP::ErrorType::UNKNOWN_PLATFORM:
+ error = "unknown_platform";
+ error_desc = "The specified platform is unknown.";
+ break;
+ case DAP::ErrorType::MISSING_DEVICE:
+ error = "missing_device";
+ error_desc = "There's no connected device with specified id.";
+ break;
case DAP::ErrorType::UNKNOWN:
+ default:
error = "unknown";
error_desc = "An unknown error has ocurred when processing the request.";
break;
- case DAP::ErrorType::WRONG_PATH:
- error = "wrong_path";
- error_desc = "The editor and client are working on different paths; the client is on \"{clientPath}\", but the editor is on \"{editorPath}\"";
}
message.id = err_type;
@@ -114,10 +138,35 @@ Dictionary DebugAdapterParser::req_initialize(const Dictionary &p_params) const
DebugAdapterProtocol::get_singleton()->notify_initialized();
+ if (DebugAdapterProtocol::get_singleton()->_sync_breakpoints) {
+ // Send all current breakpoints
+ List<String> breakpoints;
+ ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
+ for (List<String>::Element *E = breakpoints.front(); E; E = E->next()) {
+ String breakpoint = E->get();
+
+ String path = breakpoint.left(breakpoint.find(":", 6)); // Skip initial part of path, aka "res://"
+ int line = breakpoint.substr(path.size()).to_int();
+
+ DebugAdapterProtocol::get_singleton()->on_debug_breakpoint_toggled(path, line, true);
+ }
+ } else {
+ // Remove all current breakpoints
+ EditorDebuggerNode::get_singleton()->get_default_debugger()->_clear_breakpoints();
+ }
+
return response;
}
-Dictionary DebugAdapterParser::req_launch(const Dictionary &p_params) {
+Dictionary DebugAdapterParser::req_disconnect(const Dictionary &p_params) const {
+ if (!DebugAdapterProtocol::get_singleton()->get_current_peer()->attached) {
+ EditorNode::get_singleton()->run_stop();
+ }
+
+ return prepare_success_response(p_params);
+}
+
+Dictionary DebugAdapterParser::req_launch(const Dictionary &p_params) const {
Dictionary args = p_params["arguments"];
if (args.has("project") && !is_valid_path(args["project"])) {
Dictionary variables;
@@ -126,17 +175,85 @@ Dictionary DebugAdapterParser::req_launch(const Dictionary &p_params) {
return prepare_error_response(p_params, DAP::ErrorType::WRONG_PATH, variables);
}
+ if (args.has("godot/custom_data")) {
+ DebugAdapterProtocol::get_singleton()->get_current_peer()->supportsCustomData = args["godot/custom_data"];
+ }
+
ScriptEditorDebugger *dbg = EditorDebuggerNode::get_singleton()->get_default_debugger();
if ((bool)args["noDebug"] != dbg->is_skip_breakpoints()) {
dbg->debug_skip_breakpoints();
}
- EditorNode::get_singleton()->run_play();
+ String platform_string = args.get("platform", "host");
+ if (platform_string == "host") {
+ EditorNode::get_singleton()->run_play();
+ } else {
+ int device = args.get("device", -1);
+ int idx = -1;
+ if (platform_string == "android") {
+ for (int i = 0; i < EditorExport::get_singleton()->get_export_platform_count(); i++) {
+ if (EditorExport::get_singleton()->get_export_platform(i)->get_name() == "Android") {
+ idx = i;
+ break;
+ }
+ }
+ } else if (platform_string == "web") {
+ for (int i = 0; i < EditorExport::get_singleton()->get_export_platform_count(); i++) {
+ if (EditorExport::get_singleton()->get_export_platform(i)->get_name() == "HTML5") {
+ idx = i;
+ break;
+ }
+ }
+ }
+
+ if (idx == -1) {
+ return prepare_error_response(p_params, DAP::ErrorType::UNKNOWN_PLATFORM);
+ }
+
+ EditorNode *editor = EditorNode::get_singleton();
+ Error err = platform_string == "android" ? editor->run_play_native(device, idx) : editor->run_play_native(-1, idx);
+ if (err) {
+ if (err == ERR_INVALID_PARAMETER && platform_string == "android") {
+ return prepare_error_response(p_params, DAP::ErrorType::MISSING_DEVICE);
+ } else {
+ return prepare_error_response(p_params, DAP::ErrorType::UNKNOWN);
+ }
+ }
+ }
+
+ DebugAdapterProtocol::get_singleton()->get_current_peer()->attached = false;
DebugAdapterProtocol::get_singleton()->notify_process();
return prepare_success_response(p_params);
}
+Dictionary DebugAdapterParser::req_attach(const Dictionary &p_params) const {
+ ScriptEditorDebugger *dbg = EditorDebuggerNode::get_singleton()->get_default_debugger();
+ if (!dbg->is_session_active()) {
+ return prepare_error_response(p_params, DAP::ErrorType::NOT_RUNNING);
+ }
+
+ DebugAdapterProtocol::get_singleton()->get_current_peer()->attached = true;
+ DebugAdapterProtocol::get_singleton()->notify_process();
+ return prepare_success_response(p_params);
+}
+
+Dictionary DebugAdapterParser::req_restart(const Dictionary &p_params) const {
+ // Extract embedded "arguments" so it can be given to req_launch/req_attach
+ Dictionary params = p_params, args;
+ args = params["arguments"];
+ args = args["arguments"];
+ params["arguments"] = args;
+
+ Dictionary response = DebugAdapterProtocol::get_singleton()->get_current_peer()->attached ? req_attach(params) : req_launch(params);
+ if (!response["success"]) {
+ response["command"] = p_params["command"];
+ return response;
+ }
+
+ return prepare_success_response(p_params);
+}
+
Dictionary DebugAdapterParser::req_terminate(const Dictionary &p_params) const {
EditorNode::get_singleton()->run_stop();
@@ -205,7 +322,7 @@ Dictionary DebugAdapterParser::req_stackTrace(const Dictionary &p_params) const
return response;
}
-Dictionary DebugAdapterParser::req_setBreakpoints(const Dictionary &p_params) {
+Dictionary DebugAdapterParser::req_setBreakpoints(const Dictionary &p_params) const {
Dictionary response = prepare_success_response(p_params), body;
response["body"] = body;
@@ -230,14 +347,30 @@ Dictionary DebugAdapterParser::req_setBreakpoints(const Dictionary &p_params) {
lines.push_back(breakpoint.line + !lines_at_one);
}
- EditorDebuggerNode::get_singleton()->set_breakpoints(ProjectSettings::get_singleton()->localize_path(source.path), lines);
Array updated_breakpoints = DebugAdapterProtocol::get_singleton()->update_breakpoints(source.path, lines);
body["breakpoints"] = updated_breakpoints;
return response;
}
-Dictionary DebugAdapterParser::req_scopes(const Dictionary &p_params) {
+Dictionary DebugAdapterParser::req_breakpointLocations(const Dictionary &p_params) const {
+ Dictionary response = prepare_success_response(p_params), body;
+ response["body"] = body;
+ Dictionary args = p_params["arguments"];
+
+ Array locations;
+ DAP::BreakpointLocation location;
+ location.line = args["line"];
+ if (args.has("endLine")) {
+ location.endLine = args["endLine"];
+ }
+ locations.push_back(location.to_json());
+
+ body["breakpoints"] = locations;
+ return response;
+}
+
+Dictionary DebugAdapterParser::req_scopes(const Dictionary &p_params) const {
Dictionary response = prepare_success_response(p_params), body;
response["body"] = body;
@@ -291,7 +424,14 @@ Dictionary DebugAdapterParser::req_variables(const Dictionary &p_params) const {
int variable_id = args["variablesReference"];
Map<int, Array>::Element *E = DebugAdapterProtocol::get_singleton()->variable_list.find(variable_id);
+
if (E) {
+ if (!DebugAdapterProtocol::get_singleton()->get_current_peer()->supportsVariableType) {
+ for (int i = 0; i < E->value().size(); i++) {
+ Dictionary variable = E->value()[i];
+ variable.erase("type");
+ }
+ }
body["variables"] = E ? E->value() : Array();
return response;
} else {
@@ -313,6 +453,29 @@ Dictionary DebugAdapterParser::req_stepIn(const Dictionary &p_params) const {
return prepare_success_response(p_params);
}
+Dictionary DebugAdapterParser::req_evaluate(const Dictionary &p_params) const {
+ Dictionary response = prepare_success_response(p_params), body;
+ response["body"] = body;
+
+ Dictionary args = p_params["arguments"];
+
+ String value = EditorDebuggerNode::get_singleton()->get_var_value(args["expression"]);
+ body["result"] = value;
+
+ return response;
+}
+
+Dictionary DebugAdapterParser::req_godot_put_msg(const Dictionary &p_params) const {
+ Dictionary args = p_params["arguments"];
+
+ String msg = args["message"];
+ Array data = args["data"];
+
+ EditorDebuggerNode::get_singleton()->get_default_debugger()->_put_msg(msg, data);
+
+ return prepare_success_response(p_params);
+}
+
Dictionary DebugAdapterParser::ev_initialized() const {
Dictionary event = prepare_base_event();
event["event"] = "initialized";
@@ -423,3 +586,25 @@ Dictionary DebugAdapterParser::ev_output(const String &p_message) const {
return event;
}
+
+Dictionary DebugAdapterParser::ev_breakpoint(const DAP::Breakpoint &p_breakpoint, const bool &p_enabled) const {
+ Dictionary event = prepare_base_event(), body;
+ event["event"] = "breakpoint";
+ event["body"] = body;
+
+ body["reason"] = p_enabled ? "new" : "removed";
+ body["breakpoint"] = p_breakpoint.to_json();
+
+ return event;
+}
+
+Dictionary DebugAdapterParser::ev_custom_data(const String &p_msg, const Array &p_data) const {
+ Dictionary event = prepare_base_event(), body;
+ event["event"] = "godot/custom_data";
+ event["body"] = body;
+
+ body["message"] = p_msg;
+ body["data"] = p_data;
+
+ return event;
+}
diff --git a/editor/debugger/debug_adapter/debug_adapter_parser.h b/editor/debugger/debug_adapter/debug_adapter_parser.h
index b86b37d067..4c93464e39 100644
--- a/editor/debugger/debug_adapter/debug_adapter_parser.h
+++ b/editor/debugger/debug_adapter/debug_adapter_parser.h
@@ -44,7 +44,7 @@ class DebugAdapterParser : public Object {
private:
friend DebugAdapterProtocol;
- _FORCE_INLINE_ bool is_valid_path(const String &p_path) {
+ _FORCE_INLINE_ bool is_valid_path(const String &p_path) const {
return p_path.begins_with(ProjectSettings::get_singleton()->get_resource_path());
}
@@ -60,17 +60,23 @@ protected:
public:
// Requests
Dictionary req_initialize(const Dictionary &p_params) const;
- Dictionary req_launch(const Dictionary &p_params);
+ Dictionary req_launch(const Dictionary &p_params) const;
+ Dictionary req_disconnect(const Dictionary &p_params) const;
+ Dictionary req_attach(const Dictionary &p_params) const;
+ Dictionary req_restart(const Dictionary &p_params) const;
Dictionary req_terminate(const Dictionary &p_params) const;
Dictionary req_pause(const Dictionary &p_params) const;
Dictionary req_continue(const Dictionary &p_params) const;
Dictionary req_threads(const Dictionary &p_params) const;
Dictionary req_stackTrace(const Dictionary &p_params) const;
- Dictionary req_setBreakpoints(const Dictionary &p_params);
- Dictionary req_scopes(const Dictionary &p_params);
+ Dictionary req_setBreakpoints(const Dictionary &p_params) const;
+ Dictionary req_breakpointLocations(const Dictionary &p_params) const;
+ Dictionary req_scopes(const Dictionary &p_params) const;
Dictionary req_variables(const Dictionary &p_params) const;
Dictionary req_next(const Dictionary &p_params) const;
Dictionary req_stepIn(const Dictionary &p_params) const;
+ Dictionary req_evaluate(const Dictionary &p_params) const;
+ Dictionary req_godot_put_msg(const Dictionary &p_params) const;
// Events
Dictionary ev_initialized() const;
@@ -83,6 +89,8 @@ public:
Dictionary ev_stopped_step() const;
Dictionary ev_continued() const;
Dictionary ev_output(const String &p_message) const;
+ Dictionary ev_custom_data(const String &p_msg, const Array &p_data) const;
+ Dictionary ev_breakpoint(const DAP::Breakpoint &p_breakpoint, const bool &p_enabled) const;
};
#endif
diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
index 0482271432..2e0e6cb7c8 100644
--- a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
+++ b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
@@ -94,11 +94,17 @@ Error DAPeer::handle_data() {
String msg;
msg.parse_utf8((const char *)req_buf, req_pos);
+ // Apply a timestamp if it there's none yet
+ if (!timestamp) {
+ timestamp = OS::get_singleton()->get_ticks_msec();
+ }
+
// Response
if (DebugAdapterProtocol::get_singleton()->process_message(msg)) {
// Reset to read again
req_pos = 0;
has_header = false;
+ timestamp = 0;
}
}
return OK;
@@ -180,12 +186,460 @@ void DebugAdapterProtocol::reset_stack_info() {
variable_list.clear();
}
+int DebugAdapterProtocol::parse_variant(const Variant &p_var) {
+ switch (p_var.get_type()) {
+ case Variant::VECTOR2:
+ case Variant::VECTOR2I: {
+ int id = variable_id++;
+ Vector2 vec = p_var;
+ DAP::Variable x, y;
+ x.name = "x";
+ y.name = "y";
+ x.type = y.type = Variant::get_type_name(p_var.get_type() == Variant::VECTOR2 ? Variant::FLOAT : Variant::INT);
+ x.value = rtos(vec.x);
+ y.value = rtos(vec.y);
+
+ Array arr;
+ arr.push_back(x.to_json());
+ arr.push_back(y.to_json());
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::RECT2:
+ case Variant::RECT2I: {
+ int id = variable_id++;
+ Rect2 rect = p_var;
+ DAP::Variable x, y, w, h;
+ x.name = "x";
+ y.name = "y";
+ w.name = "w";
+ h.name = "h";
+ x.type = y.type = w.type = h.type = Variant::get_type_name(p_var.get_type() == Variant::RECT2 ? Variant::FLOAT : Variant::INT);
+ x.value = rtos(rect.position.x);
+ y.value = rtos(rect.position.y);
+ w.value = rtos(rect.size.x);
+ h.value = rtos(rect.size.y);
+
+ Array arr;
+ arr.push_back(x.to_json());
+ arr.push_back(y.to_json());
+ arr.push_back(w.to_json());
+ arr.push_back(h.to_json());
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::VECTOR3:
+ case Variant::VECTOR3I: {
+ int id = variable_id++;
+ Vector3 vec = p_var;
+ DAP::Variable x, y, z;
+ x.name = "x";
+ y.name = "y";
+ z.name = "z";
+ x.type = y.type = z.type = Variant::get_type_name(p_var.get_type() == Variant::VECTOR3 ? Variant::FLOAT : Variant::INT);
+ x.value = rtos(vec.x);
+ y.value = rtos(vec.y);
+ z.value = rtos(vec.z);
+
+ Array arr;
+ arr.push_back(x.to_json());
+ arr.push_back(y.to_json());
+ arr.push_back(z.to_json());
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::TRANSFORM2D: {
+ int id = variable_id++;
+ Transform2D transform = p_var;
+ DAP::Variable x, y, origin;
+ x.name = "x";
+ y.name = "y";
+ origin.name = "origin";
+ x.type = y.type = origin.type = Variant::get_type_name(Variant::VECTOR2);
+ x.value = transform.elements[0];
+ y.value = transform.elements[1];
+ origin.value = transform.elements[2];
+ x.variablesReference = parse_variant(transform.elements[0]);
+ y.variablesReference = parse_variant(transform.elements[1]);
+ origin.variablesReference = parse_variant(transform.elements[2]);
+
+ Array arr;
+ arr.push_back(x.to_json());
+ arr.push_back(y.to_json());
+ arr.push_back(origin.to_json());
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::PLANE: {
+ int id = variable_id++;
+ Plane plane = p_var;
+ DAP::Variable d, normal;
+ d.name = "d";
+ normal.name = "normal";
+ d.type = Variant::get_type_name(Variant::FLOAT);
+ normal.type = Variant::get_type_name(Variant::VECTOR3);
+ d.value = rtos(plane.d);
+ normal.value = plane.normal;
+ normal.variablesReference = parse_variant(plane.normal);
+
+ Array arr;
+ arr.push_back(d.to_json());
+ arr.push_back(normal.to_json());
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::QUATERNION: {
+ int id = variable_id++;
+ Quaternion quat = p_var;
+ DAP::Variable x, y, z, w;
+ x.name = "x";
+ y.name = "y";
+ z.name = "z";
+ w.name = "w";
+ x.type = y.type = z.type = w.type = Variant::get_type_name(Variant::FLOAT);
+ x.value = rtos(quat.x);
+ y.value = rtos(quat.y);
+ z.value = rtos(quat.z);
+ w.value = rtos(quat.w);
+
+ Array arr;
+ arr.push_back(x.to_json());
+ arr.push_back(y.to_json());
+ arr.push_back(z.to_json());
+ arr.push_back(w.to_json());
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::AABB: {
+ int id = variable_id++;
+ AABB aabb = p_var;
+ DAP::Variable position, size;
+ position.name = "position";
+ size.name = "size";
+ position.type = size.type = Variant::get_type_name(Variant::VECTOR3);
+ position.value = aabb.position;
+ size.value = aabb.size;
+ position.variablesReference = parse_variant(aabb.position);
+ size.variablesReference = parse_variant(aabb.size);
+
+ Array arr;
+ arr.push_back(position.to_json());
+ arr.push_back(size.to_json());
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::BASIS: {
+ int id = variable_id++;
+ Basis basis = p_var;
+ DAP::Variable x, y, z;
+ x.name = "x";
+ y.name = "y";
+ z.name = "z";
+ x.type = y.type = z.type = Variant::get_type_name(Variant::VECTOR2);
+ x.value = basis.elements[0];
+ y.value = basis.elements[1];
+ z.value = basis.elements[2];
+ x.variablesReference = parse_variant(basis.elements[0]);
+ y.variablesReference = parse_variant(basis.elements[1]);
+ z.variablesReference = parse_variant(basis.elements[2]);
+
+ Array arr;
+ arr.push_back(x.to_json());
+ arr.push_back(y.to_json());
+ arr.push_back(z.to_json());
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::TRANSFORM3D: {
+ int id = variable_id++;
+ Transform3D transform = p_var;
+ DAP::Variable basis, origin;
+ basis.name = "basis";
+ origin.name = "origin";
+ basis.type = Variant::get_type_name(Variant::BASIS);
+ origin.type = Variant::get_type_name(Variant::VECTOR3);
+ basis.value = transform.basis;
+ origin.value = transform.origin;
+ basis.variablesReference = parse_variant(transform.basis);
+ origin.variablesReference = parse_variant(transform.origin);
+
+ Array arr;
+ arr.push_back(basis.to_json());
+ arr.push_back(origin.to_json());
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::COLOR: {
+ int id = variable_id++;
+ Color color = p_var;
+ DAP::Variable r, g, b, a;
+ r.name = "r";
+ g.name = "g";
+ b.name = "b";
+ a.name = "a";
+ r.type = g.type = b.type = a.type = Variant::get_type_name(Variant::FLOAT);
+ r.value = rtos(color.r);
+ g.value = rtos(color.g);
+ b.value = rtos(color.b);
+ a.value = rtos(color.a);
+
+ Array arr;
+ arr.push_back(r.to_json());
+ arr.push_back(g.to_json());
+ arr.push_back(b.to_json());
+ arr.push_back(a.to_json());
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::ARRAY: {
+ int id = variable_id++;
+ Array array = p_var;
+ DAP::Variable size;
+ size.name = "size";
+ size.type = Variant::get_type_name(Variant::INT);
+ size.value = itos(array.size());
+
+ Array arr;
+ arr.push_back(size.to_json());
+
+ for (int i = 0; i < array.size(); i++) {
+ DAP::Variable var;
+ var.name = itos(i);
+ var.type = Variant::get_type_name(array[i].get_type());
+ var.value = array[i];
+ var.variablesReference = parse_variant(array[i]);
+ arr.push_back(var.to_json());
+ }
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::DICTIONARY: {
+ int id = variable_id++;
+ Dictionary dictionary = p_var;
+ Array arr;
+
+ for (int i = 0; i < dictionary.size(); i++) {
+ DAP::Variable var;
+ var.name = dictionary.get_key_at_index(i);
+ Variant value = dictionary.get_value_at_index(i);
+ var.type = Variant::get_type_name(value.get_type());
+ var.value = value;
+ var.variablesReference = parse_variant(value);
+ arr.push_back(var.to_json());
+ }
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::PACKED_BYTE_ARRAY: {
+ int id = variable_id++;
+ PackedByteArray array = p_var;
+ DAP::Variable size;
+ size.name = "size";
+ size.type = Variant::get_type_name(Variant::INT);
+ size.value = itos(array.size());
+
+ Array arr;
+ arr.push_back(size.to_json());
+
+ for (int i = 0; i < array.size(); i++) {
+ DAP::Variable var;
+ var.name = itos(i);
+ var.type = "byte";
+ var.value = itos(array[i]);
+ arr.push_back(var.to_json());
+ }
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::PACKED_INT32_ARRAY: {
+ int id = variable_id++;
+ PackedInt32Array array = p_var;
+ DAP::Variable size;
+ size.name = "size";
+ size.type = Variant::get_type_name(Variant::INT);
+ size.value = itos(array.size());
+
+ Array arr;
+ arr.push_back(size.to_json());
+
+ for (int i = 0; i < array.size(); i++) {
+ DAP::Variable var;
+ var.name = itos(i);
+ var.type = "int";
+ var.value = itos(array[i]);
+ arr.push_back(var.to_json());
+ }
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::PACKED_INT64_ARRAY: {
+ int id = variable_id++;
+ PackedInt64Array array = p_var;
+ DAP::Variable size;
+ size.name = "size";
+ size.type = Variant::get_type_name(Variant::INT);
+ size.value = itos(array.size());
+
+ Array arr;
+ arr.push_back(size.to_json());
+
+ for (int i = 0; i < array.size(); i++) {
+ DAP::Variable var;
+ var.name = itos(i);
+ var.type = "long";
+ var.value = itos(array[i]);
+ arr.push_back(var.to_json());
+ }
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::PACKED_FLOAT32_ARRAY: {
+ int id = variable_id++;
+ PackedFloat32Array array = p_var;
+ DAP::Variable size;
+ size.name = "size";
+ size.type = Variant::get_type_name(Variant::INT);
+ size.value = itos(array.size());
+
+ Array arr;
+ arr.push_back(size.to_json());
+
+ for (int i = 0; i < array.size(); i++) {
+ DAP::Variable var;
+ var.name = itos(i);
+ var.type = "float";
+ var.value = rtos(array[i]);
+ arr.push_back(var.to_json());
+ }
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::PACKED_FLOAT64_ARRAY: {
+ int id = variable_id++;
+ PackedFloat64Array array = p_var;
+ DAP::Variable size;
+ size.name = "size";
+ size.type = Variant::get_type_name(Variant::INT);
+ size.value = itos(array.size());
+
+ Array arr;
+ arr.push_back(size.to_json());
+
+ for (int i = 0; i < array.size(); i++) {
+ DAP::Variable var;
+ var.name = itos(i);
+ var.type = "double";
+ var.value = rtos(array[i]);
+ arr.push_back(var.to_json());
+ }
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::PACKED_STRING_ARRAY: {
+ int id = variable_id++;
+ PackedStringArray array = p_var;
+ DAP::Variable size;
+ size.name = "size";
+ size.type = Variant::get_type_name(Variant::INT);
+ size.value = itos(array.size());
+
+ Array arr;
+ arr.push_back(size.to_json());
+
+ for (int i = 0; i < array.size(); i++) {
+ DAP::Variable var;
+ var.name = itos(i);
+ var.type = Variant::get_type_name(Variant::STRING);
+ var.value = array[i];
+ arr.push_back(var.to_json());
+ }
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::PACKED_VECTOR2_ARRAY: {
+ int id = variable_id++;
+ PackedVector2Array array = p_var;
+ DAP::Variable size;
+ size.name = "size";
+ size.type = Variant::get_type_name(Variant::INT);
+ size.value = itos(array.size());
+
+ Array arr;
+ arr.push_back(size.to_json());
+
+ for (int i = 0; i < array.size(); i++) {
+ DAP::Variable var;
+ var.name = itos(i);
+ var.type = Variant::get_type_name(Variant::VECTOR2);
+ var.value = array[i];
+ var.variablesReference = parse_variant(array[i]);
+ arr.push_back(var.to_json());
+ }
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::PACKED_VECTOR3_ARRAY: {
+ int id = variable_id++;
+ PackedVector2Array array = p_var;
+ DAP::Variable size;
+ size.name = "size";
+ size.type = Variant::get_type_name(Variant::INT);
+ size.value = itos(array.size());
+
+ Array arr;
+ arr.push_back(size.to_json());
+
+ for (int i = 0; i < array.size(); i++) {
+ DAP::Variable var;
+ var.name = itos(i);
+ var.type = Variant::get_type_name(Variant::VECTOR3);
+ var.value = array[i];
+ var.variablesReference = parse_variant(array[i]);
+ arr.push_back(var.to_json());
+ }
+ variable_list.insert(id, arr);
+ return id;
+ }
+ case Variant::PACKED_COLOR_ARRAY: {
+ int id = variable_id++;
+ PackedColorArray array = p_var;
+ DAP::Variable size;
+ size.name = "size";
+ size.type = Variant::get_type_name(Variant::INT);
+ size.value = itos(array.size());
+
+ Array arr;
+ arr.push_back(size.to_json());
+
+ for (int i = 0; i < array.size(); i++) {
+ DAP::Variable var;
+ var.name = itos(i);
+ var.type = Variant::get_type_name(Variant::COLOR);
+ var.value = array[i];
+ var.variablesReference = parse_variant(array[i]);
+ arr.push_back(var.to_json());
+ }
+ variable_list.insert(id, arr);
+ return id;
+ }
+ default:
+ // Simple atomic stuff, or too complex to be manipulated
+ return 0;
+ }
+}
+
bool DebugAdapterProtocol::process_message(const String &p_text) {
JSON json;
ERR_FAIL_COND_V_MSG(json.parse(p_text) != OK, true, "Mal-formed message!");
Dictionary params = json.get_data();
bool completed = true;
+ if (OS::get_singleton()->get_ticks_msec() - _current_peer->timestamp > _request_timeout) {
+ Dictionary response = parser->prepare_error_response(params, DAP::ErrorType::TIMEOUT);
+ _current_peer->res_queue.push_front(response);
+ return true;
+ }
+
// Append "req_" to any command received; prevents name clash with existing functions, and possibly exploiting
String command = "req_" + (String)params["command"];
if (parser->has_method(command)) {
@@ -211,7 +665,7 @@ void DebugAdapterProtocol::notify_initialized() {
}
void DebugAdapterProtocol::notify_process() {
- String launch_mode = _current_request.is_empty() ? "launch" : _current_request;
+ String launch_mode = _current_peer->attached ? "attach" : "launch";
Dictionary event = parser->ev_process(launch_mode);
for (List<Ref<DAPeer>>::Element *E = clients.front(); E; E = E->next()) {
@@ -222,7 +676,7 @@ void DebugAdapterProtocol::notify_process() {
void DebugAdapterProtocol::notify_terminated() {
Dictionary event = parser->ev_terminated();
for (List<Ref<DAPeer>>::Element *E = clients.front(); E; E = E->next()) {
- if (_current_request == "launch" && _current_peer == E->get()) {
+ if ((_current_request == "launch" || _current_request == "restart") && _current_peer == E->get()) {
continue;
}
E->get()->res_queue.push_back(event);
@@ -232,7 +686,7 @@ void DebugAdapterProtocol::notify_terminated() {
void DebugAdapterProtocol::notify_exited(const int &p_exitcode) {
Dictionary event = parser->ev_exited(p_exitcode);
for (List<Ref<DAPeer>>::Element *E = clients.front(); E; E = E->next()) {
- if (_current_request == "launch" && _current_peer == E->get()) {
+ if ((_current_request == "launch" || _current_request == "restart") && _current_peer == E->get()) {
continue;
}
E->get()->res_queue.push_back(event);
@@ -286,25 +740,46 @@ void DebugAdapterProtocol::notify_output(const String &p_message) {
}
}
+void DebugAdapterProtocol::notify_custom_data(const String &p_msg, const Array &p_data) {
+ Dictionary event = parser->ev_custom_data(p_msg, p_data);
+ for (List<Ref<DAPeer>>::Element *E = clients.front(); E; E = E->next()) {
+ Ref<DAPeer> peer = E->get();
+ if (peer->supportsCustomData) {
+ peer->res_queue.push_back(event);
+ }
+ }
+}
+
+void DebugAdapterProtocol::notify_breakpoint(const DAP::Breakpoint &p_breakpoint, const bool &p_enabled) {
+ Dictionary event = parser->ev_breakpoint(p_breakpoint, p_enabled);
+ for (List<Ref<DAPeer>>::Element *E = clients.front(); E; E = E->next()) {
+ if (_current_request == "setBreakpoints" && E->get() == _current_peer) {
+ continue;
+ }
+ E->get()->res_queue.push_back(event);
+ }
+}
+
Array DebugAdapterProtocol::update_breakpoints(const String &p_path, const Array &p_lines) {
Array updated_breakpoints;
+ // Add breakpoints
for (int i = 0; i < p_lines.size(); i++) {
+ EditorDebuggerNode::get_singleton()->get_default_debugger()->_set_breakpoint(p_path, p_lines[i], true);
DAP::Breakpoint breakpoint;
- breakpoint.verified = true;
- breakpoint.source.path = p_path;
- breakpoint.source.compute_checksums();
breakpoint.line = p_lines[i];
+ breakpoint.source.path = p_path;
- List<DAP::Breakpoint>::Element *E = breakpoint_list.find(breakpoint);
- if (E) {
- breakpoint.id = E->get().id;
- } else {
- breakpoint.id = breakpoint_id++;
- breakpoint_list.push_back(breakpoint);
- }
+ ERR_FAIL_COND_V(!breakpoint_list.find(breakpoint), Array());
+ updated_breakpoints.push_back(breakpoint_list.find(breakpoint)->get().to_json());
+ }
- updated_breakpoints.push_back(breakpoint.to_json());
+ // Remove breakpoints
+ for (List<DAP::Breakpoint>::Element *E = breakpoint_list.front(); E; E = E->next()) {
+ DAP::Breakpoint b = E->get();
+ if (b.source.path == p_path && !p_lines.has(b.line)) {
+ EditorDebuggerNode::get_singleton()->get_default_debugger()->_set_breakpoint(p_path, b.line, false);
+ }
}
return updated_breakpoints;
@@ -347,6 +822,29 @@ void DebugAdapterProtocol::on_debug_breaked(const bool &p_reallydid, const bool
_processing_stackdump = p_has_stackdump;
}
+void DebugAdapterProtocol::on_debug_breakpoint_toggled(const String &p_path, const int &p_line, const bool &p_enabled) {
+ DAP::Breakpoint breakpoint;
+ breakpoint.verified = true;
+ breakpoint.source.path = ProjectSettings::get_singleton()->globalize_path(p_path);
+ breakpoint.source.compute_checksums();
+ breakpoint.line = p_line;
+
+ if (p_enabled) {
+ // Add the breakpoint
+ breakpoint.id = breakpoint_id++;
+ breakpoint_list.push_back(breakpoint);
+ } else {
+ // Remove the breakpoint
+ List<DAP::Breakpoint>::Element *E = breakpoint_list.find(breakpoint);
+ if (E) {
+ breakpoint.id = E->get().id;
+ breakpoint_list.erase(E);
+ }
+ }
+
+ notify_breakpoint(breakpoint, p_enabled);
+}
+
void DebugAdapterProtocol::on_debug_stack_dump(const Array &p_stack_dump) {
if (_processing_breakpoint && !p_stack_dump.is_empty()) {
// Find existing breakpoint
@@ -424,11 +922,21 @@ void DebugAdapterProtocol::on_debug_stack_frame_var(const Array &p_data) {
variable.name = stack_var.name;
variable.value = stack_var.value;
variable.type = Variant::get_type_name(stack_var.value.get_type());
+ variable.variablesReference = parse_variant(stack_var.value);
variable_list.find(variable_id)->value().push_back(variable.to_json());
_remaining_vars--;
}
+void DebugAdapterProtocol::on_debug_data(const String &p_msg, const Array &p_data) {
+ // Ignore data that is already handled by DAP
+ if (p_msg == "debug_enter" || p_msg == "debug_exit" || p_msg == "stack_dump" || p_msg == "stack_frame_vars" || p_msg == "stack_frame_var" || p_msg == "output" || p_msg == "request_quit") {
+ return;
+ }
+
+ notify_custom_data(p_msg, p_data);
+}
+
void DebugAdapterProtocol::poll() {
if (server->is_connection_available()) {
on_client_connected();
@@ -459,6 +967,8 @@ void DebugAdapterProtocol::poll() {
}
Error DebugAdapterProtocol::start(int p_port, const IPAddress &p_bind_ip) {
+ _request_timeout = (uint64_t)_EDITOR_GET("network/debug_adapter/request_timeout");
+ _sync_breakpoints = (bool)_EDITOR_GET("network/debug_adapter/sync_breakpoints");
_initialized = true;
return server->listen(p_port, p_bind_ip);
}
@@ -484,12 +994,15 @@ DebugAdapterProtocol::DebugAdapterProtocol() {
node->get_pause_button()->connect("pressed", callable_mp(this, &DebugAdapterProtocol::on_debug_paused));
EditorDebuggerNode *debugger_node = EditorDebuggerNode::get_singleton();
+ debugger_node->connect("breakpoint_toggled", callable_mp(this, &DebugAdapterProtocol::on_debug_breakpoint_toggled));
+
debugger_node->get_default_debugger()->connect("stopped", callable_mp(this, &DebugAdapterProtocol::on_debug_stopped));
debugger_node->get_default_debugger()->connect("output", callable_mp(this, &DebugAdapterProtocol::on_debug_output));
debugger_node->get_default_debugger()->connect("breaked", callable_mp(this, &DebugAdapterProtocol::on_debug_breaked));
debugger_node->get_default_debugger()->connect("stack_dump", callable_mp(this, &DebugAdapterProtocol::on_debug_stack_dump));
debugger_node->get_default_debugger()->connect("stack_frame_vars", callable_mp(this, &DebugAdapterProtocol::on_debug_stack_frame_vars));
debugger_node->get_default_debugger()->connect("stack_frame_var", callable_mp(this, &DebugAdapterProtocol::on_debug_stack_frame_var));
+ debugger_node->get_default_debugger()->connect("debug_data", callable_mp(this, &DebugAdapterProtocol::on_debug_data));
}
DebugAdapterProtocol::~DebugAdapterProtocol() {
diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.h b/editor/debugger/debug_adapter/debug_adapter_protocol.h
index 6b542033ed..d4291992bf 100644
--- a/editor/debugger/debug_adapter/debug_adapter_protocol.h
+++ b/editor/debugger/debug_adapter/debug_adapter_protocol.h
@@ -52,12 +52,17 @@ struct DAPeer : RefCounted {
int content_length = 0;
List<Dictionary> res_queue;
int seq = 0;
+ uint64_t timestamp = 0;
// Client specific info
bool linesStartAt1 = false;
bool columnsStartAt1 = false;
bool supportsVariableType = false;
bool supportsInvalidatedEvent = false;
+ bool supportsCustomData = false;
+
+ // Internal client info
+ bool attached = false;
Error handle_data();
Error send_data();
@@ -82,20 +87,26 @@ private:
void on_debug_stopped();
void on_debug_output(const String &p_message);
void on_debug_breaked(const bool &p_reallydid, const bool &p_can_debug, const String &p_reason, const bool &p_has_stackdump);
+ void on_debug_breakpoint_toggled(const String &p_path, const int &p_line, const bool &p_enabled);
void on_debug_stack_dump(const Array &p_stack_dump);
void on_debug_stack_frame_vars(const int &p_size);
void on_debug_stack_frame_var(const Array &p_data);
+ void on_debug_data(const String &p_msg, const Array &p_data);
void reset_current_info();
void reset_ids();
void reset_stack_info();
+ int parse_variant(const Variant &p_var);
+
bool _initialized = false;
bool _processing_breakpoint = false;
bool _stepping = false;
bool _processing_stackdump = false;
int _remaining_vars = 0;
int _current_frame = 0;
+ uint64_t _request_timeout = 1000;
+ bool _sync_breakpoints = false;
String _current_request;
Ref<DAPeer> _current_peer;
@@ -108,6 +119,8 @@ private:
Map<int, Array> variable_list;
public:
+ friend class DebugAdapterServer;
+
_FORCE_INLINE_ static DebugAdapterProtocol *get_singleton() { return singleton; }
_FORCE_INLINE_ bool is_active() const { return _initialized && clients.size() > 0; }
@@ -126,8 +139,10 @@ public:
void notify_stopped_step();
void notify_continued();
void notify_output(const String &p_message);
+ void notify_custom_data(const String &p_msg, const Array &p_data);
+ void notify_breakpoint(const DAP::Breakpoint &p_breakpoint, const bool &p_enabled);
- Array update_breakpoints(const String &p_path, const Array &p_breakpoints);
+ Array update_breakpoints(const String &p_path, const Array &p_lines);
void poll();
Error start(int p_port, const IPAddress &p_bind_ip);
diff --git a/editor/debugger/debug_adapter/debug_adapter_server.cpp b/editor/debugger/debug_adapter/debug_adapter_server.cpp
index f9092a1791..4775e2c8b0 100644
--- a/editor/debugger/debug_adapter/debug_adapter_server.cpp
+++ b/editor/debugger/debug_adapter/debug_adapter_server.cpp
@@ -36,7 +36,8 @@
DebugAdapterServer::DebugAdapterServer() {
_EDITOR_DEF("network/debug_adapter/remote_port", remote_port);
- _EDITOR_DEF("network/debug_adapter/use_thread", use_thread);
+ _EDITOR_DEF("network/debug_adapter/request_timeout", protocol._request_timeout);
+ _EDITOR_DEF("network/debug_adapter/sync_breakpoints", protocol._sync_breakpoints);
}
void DebugAdapterServer::_notification(int p_what) {
@@ -50,16 +51,17 @@ void DebugAdapterServer::_notification(int p_what) {
case NOTIFICATION_INTERNAL_PROCESS: {
// The main loop can be run again during request processing, which modifies internal state of the protocol.
// Thus, "polling" is needed to prevent it from parsing other requests while the current one isn't finished.
- if (started && !use_thread && !polling) {
+ if (started && !polling) {
polling = true;
protocol.poll();
polling = false;
}
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+ protocol._request_timeout = EditorSettings::get_singleton()->get("network/debug_adapter/request_timeout");
+ protocol._sync_breakpoints = EditorSettings::get_singleton()->get("network/debug_adapter/sync_breakpoints");
int remote_port = (int)_EDITOR_GET("network/debug_adapter/remote_port");
- bool use_thread = (bool)_EDITOR_GET("network/debug_adapter/use_thread");
- if (remote_port != this->remote_port || use_thread != this->use_thread) {
+ if (remote_port != this->remote_port) {
this->stop();
this->start();
}
@@ -67,35 +69,16 @@ void DebugAdapterServer::_notification(int p_what) {
}
}
-void DebugAdapterServer::thread_func(void *p_userdata) {
- DebugAdapterServer *self = static_cast<DebugAdapterServer *>(p_userdata);
- while (self->thread_running) {
- // Poll 20 times per second
- self->protocol.poll();
- OS::get_singleton()->delay_usec(50000);
- }
-}
-
void DebugAdapterServer::start() {
remote_port = (int)_EDITOR_GET("network/debug_adapter/remote_port");
- use_thread = (bool)_EDITOR_GET("network/debug_adapter/use_thread");
if (protocol.start(remote_port, IPAddress("127.0.0.1")) == OK) {
EditorNode::get_log()->add_message("--- Debug adapter server started ---", EditorLog::MSG_TYPE_EDITOR);
- if (use_thread) {
- thread_running = true;
- thread.start(DebugAdapterServer::thread_func, this);
- }
- set_process_internal(!use_thread);
+ set_process_internal(true);
started = true;
}
}
void DebugAdapterServer::stop() {
- if (use_thread) {
- ERR_FAIL_COND(!thread.is_started());
- thread_running = false;
- thread.wait_to_finish();
- }
protocol.stop();
started = false;
EditorNode::get_log()->add_message("--- Debug adapter server stopped ---", EditorLog::MSG_TYPE_EDITOR);
diff --git a/editor/debugger/debug_adapter/debug_adapter_server.h b/editor/debugger/debug_adapter/debug_adapter_server.h
index f8a38965cc..c449403cc2 100644
--- a/editor/debugger/debug_adapter/debug_adapter_server.h
+++ b/editor/debugger/debug_adapter/debug_adapter_server.h
@@ -39,11 +39,9 @@ class DebugAdapterServer : public EditorPlugin {
DebugAdapterProtocol protocol;
- Thread thread;
int remote_port = 6006;
bool thread_running = false;
bool started = false;
- bool use_thread = false;
bool polling = false;
static void thread_func(void *p_userdata);
diff --git a/editor/debugger/debug_adapter/debug_adapter_types.h b/editor/debugger/debug_adapter/debug_adapter_types.h
index aa9ab1adcd..5156c91d14 100644
--- a/editor/debugger/debug_adapter/debug_adapter_types.h
+++ b/editor/debugger/debug_adapter/debug_adapter_types.h
@@ -38,7 +38,11 @@ namespace DAP {
enum ErrorType {
UNKNOWN,
- WRONG_PATH
+ WRONG_PATH,
+ NOT_RUNNING,
+ TIMEOUT,
+ UNKNOWN_PLATFORM,
+ MISSING_DEVICE
};
struct Checksum {
@@ -118,10 +122,14 @@ struct Breakpoint {
struct BreakpointLocation {
int line;
+ int endLine = -1;
_FORCE_INLINE_ Dictionary to_json() const {
Dictionary dict;
dict["line"] = line;
+ if (endLine >= 0) {
+ dict["endLine"] = endLine;
+ }
return dict;
}
diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp
index 5d654ca756..be84e8dec5 100644
--- a/editor/debugger/editor_debugger_node.cpp
+++ b/editor/debugger/editor_debugger_node.cpp
@@ -164,6 +164,7 @@ void EditorDebuggerNode::_bind_methods() {
ADD_SIGNAL(MethodInfo("set_execution", PropertyInfo("script"), PropertyInfo(Variant::INT, "line")));
ADD_SIGNAL(MethodInfo("clear_execution", PropertyInfo("script")));
ADD_SIGNAL(MethodInfo("breaked", PropertyInfo(Variant::BOOL, "reallydid"), PropertyInfo(Variant::BOOL, "can_debug")));
+ ADD_SIGNAL(MethodInfo("breakpoint_toggled", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "line"), PropertyInfo(Variant::BOOL, "enabled")));
}
EditorDebuggerRemoteObject *EditorDebuggerNode::get_inspected_remote_object() {
@@ -182,16 +183,16 @@ ScriptEditorDebugger *EditorDebuggerNode::get_default_debugger() const {
return Object::cast_to<ScriptEditorDebugger>(tabs->get_tab_control(0));
}
-Error EditorDebuggerNode::start(const String &p_protocol) {
+Error EditorDebuggerNode::start(const String &p_uri) {
stop();
+ ERR_FAIL_COND_V(p_uri.find("://") < 0, ERR_INVALID_PARAMETER);
if (EDITOR_GET("run/output/always_open_output_on_play")) {
EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorNode::get_log());
} else {
EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
}
-
- server = Ref<EditorDebuggerServer>(EditorDebuggerServer::create(p_protocol));
- const Error err = server->start();
+ server = Ref<EditorDebuggerServer>(EditorDebuggerServer::create(p_uri.substr(0, p_uri.find("://") + 3)));
+ const Error err = server->start(p_uri);
if (err != OK) {
return err;
}
@@ -487,6 +488,8 @@ void EditorDebuggerNode::set_breakpoint(const String &p_path, int p_line, bool p
_for_all(tabs, [&](ScriptEditorDebugger *dbg) {
dbg->set_breakpoint(p_path, p_line, p_enabled);
});
+
+ emit_signal("breakpoint_toggled", p_path, p_line, p_enabled);
}
void EditorDebuggerNode::set_breakpoints(const String &p_path, Array p_lines) {
@@ -655,6 +658,17 @@ void EditorDebuggerNode::live_debug_reparent_node(const NodePath &p_at, const No
});
}
+void EditorDebuggerNode::set_camera_override(CameraOverride p_override) {
+ _for_all(tabs, [&](ScriptEditorDebugger *dbg) {
+ dbg->set_camera_override(p_override);
+ });
+ camera_override = p_override;
+}
+
+EditorDebuggerNode::CameraOverride EditorDebuggerNode::get_camera_override() {
+ return camera_override;
+}
+
void EditorDebuggerNode::add_debugger_plugin(const Ref<Script> &p_script) {
ERR_FAIL_COND_MSG(debugger_plugins.has(p_script), "Debugger plugin already exists.");
ERR_FAIL_COND_MSG(p_script.is_null(), "Debugger plugin script is null");
diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h
index 0849ecf1c9..4d9e846834 100644
--- a/editor/debugger/editor_debugger_node.h
+++ b/editor/debugger/editor_debugger_node.h
@@ -185,11 +185,10 @@ public:
void live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name);
void live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos);
- // Camera
- void set_camera_override(CameraOverride p_override) { camera_override = p_override; }
- CameraOverride get_camera_override() { return camera_override; }
+ void set_camera_override(CameraOverride p_override);
+ CameraOverride get_camera_override();
- Error start(const String &p_protocol = "tcp://");
+ Error start(const String &p_uri = "tcp://");
void stop();
diff --git a/editor/debugger/editor_debugger_server.cpp b/editor/debugger/editor_debugger_server.cpp
index e8524e0702..8c3833af50 100644
--- a/editor/debugger/editor_debugger_server.cpp
+++ b/editor/debugger/editor_debugger_server.cpp
@@ -45,7 +45,7 @@ private:
public:
static EditorDebuggerServer *create(const String &p_protocol);
virtual void poll() {}
- virtual Error start();
+ virtual Error start(const String &p_uri);
virtual void stop();
virtual bool is_active() const;
virtual bool is_connection_available() const;
@@ -63,11 +63,18 @@ EditorDebuggerServerTCP::EditorDebuggerServerTCP() {
server.instantiate();
}
-Error EditorDebuggerServerTCP::start() {
- int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
- const Error err = server->listen(remote_port);
+Error EditorDebuggerServerTCP::start(const String &p_uri) {
+ int bind_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
+ String bind_host = (String)EditorSettings::get_singleton()->get("network/debug/remote_host");
+ if (!p_uri.is_empty() && p_uri != "tcp://") {
+ String scheme, path;
+ Error err = p_uri.parse_url(scheme, bind_host, bind_port, path);
+ ERR_FAIL_COND_V(err != OK, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(!bind_host.is_valid_ip_address() && bind_host != "*", ERR_INVALID_PARAMETER);
+ }
+ const Error err = server->listen(bind_port, bind_host);
if (err != OK) {
- EditorNode::get_log()->add_message(String("Error listening on port ") + itos(remote_port), EditorLog::MSG_TYPE_ERROR);
+ EditorNode::get_log()->add_message(String("Error listening on port ") + itos(bind_port), EditorLog::MSG_TYPE_ERROR);
return err;
}
return err;
diff --git a/editor/debugger/editor_debugger_server.h b/editor/debugger/editor_debugger_server.h
index 6216d0df3d..844d1a9e5a 100644
--- a/editor/debugger/editor_debugger_server.h
+++ b/editor/debugger/editor_debugger_server.h
@@ -48,7 +48,7 @@ public:
static void register_protocol_handler(const String &p_protocol, CreateServerFunc p_func);
static EditorDebuggerServer *create(const String &p_protocol);
virtual void poll() = 0;
- virtual Error start() = 0;
+ virtual Error start(const String &p_uri = "") = 0;
virtual void stop() = 0;
virtual bool is_active() const = 0;
virtual bool is_connection_available() const = 0;
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 2a5013893f..a312c161a8 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -147,7 +147,7 @@ void ScriptEditorDebugger::update_tabs() {
}
void ScriptEditorDebugger::clear_style() {
- tabs->add_theme_style_override("panel", nullptr);
+ tabs->remove_theme_style_override("panel");
}
void ScriptEditorDebugger::save_node(ObjectID p_id, const String &p_file) {
@@ -296,6 +296,7 @@ Size2 ScriptEditorDebugger::get_minimum_size() const {
}
void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_data) {
+ emit_signal(SNAME("debug_data"), p_msg, p_data);
if (p_msg == "debug_enter") {
_put_msg("get_stack_dump", Array());
@@ -396,15 +397,15 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
s->select(0);
}
}
- emit_signal("stack_dump", stack_dump_info);
+ emit_signal(SNAME("stack_dump"), stack_dump_info);
} else if (p_msg == "stack_frame_vars") {
inspector->clear_stack_variables();
ERR_FAIL_COND(p_data.size() != 1);
- emit_signal("stack_frame_vars", p_data[0]);
+ emit_signal(SNAME("stack_frame_vars"), p_data[0]);
} else if (p_msg == "stack_frame_var") {
inspector->add_stack_variable(p_data);
- emit_signal("stack_frame_var", p_data);
+ emit_signal(SNAME("stack_frame_var"), p_data);
} else if (p_msg == "output") {
ERR_FAIL_COND(p_data.size() != 2);
@@ -433,7 +434,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
} break;
}
EditorNode::get_log()->add_message(output_strings[i], msg_type);
- emit_signal("output", output_strings[i]);
+ emit_signal(SNAME("output"), output_strings[i]);
}
} else if (p_msg == "performance:profile_frame") {
Vector<float> frame_data;
@@ -500,6 +501,10 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
error->set_text(0, time);
error->set_text_align(0, TreeItem::ALIGN_LEFT);
+ const Color color = get_theme_color(oe.warning ? SNAME("warning_color") : SNAME("error_color"), SNAME("Editor"));
+ error->set_custom_color(0, color);
+ error->set_custom_color(1, color);
+
String error_title;
if (oe.callstack.size() > 0) {
// If available, use the script's stack in the error title.
@@ -872,9 +877,18 @@ void ScriptEditorDebugger::_clear_execution() {
inspector->clear_stack_variables();
}
+void ScriptEditorDebugger::_set_breakpoint(const String &p_file, const int &p_line, const bool &p_enabled) {
+ Ref<Script> script = ResourceLoader::load(p_file);
+ emit_signal("set_breakpoint", script, p_line - 1, p_enabled);
+ script.unref();
+}
+
+void ScriptEditorDebugger::_clear_breakpoints() {
+ emit_signal("clear_breakpoints");
+}
+
void ScriptEditorDebugger::start(Ref<RemoteDebuggerPeer> p_peer) {
- error_count = 0;
- warning_count = 0;
+ _clear_errors_list();
stop();
peer = p_peer;
@@ -1224,7 +1238,7 @@ void ScriptEditorDebugger::update_live_edit_root() {
Array msg;
msg.push_back(np);
if (editor->get_edited_scene()) {
- msg.push_back(editor->get_edited_scene()->get_filename());
+ msg.push_back(editor->get_edited_scene()->get_scene_file_path());
} else {
msg.push_back("");
}
@@ -1503,6 +1517,9 @@ void ScriptEditorDebugger::_bind_methods() {
ADD_SIGNAL(MethodInfo("stack_dump", PropertyInfo(Variant::ARRAY, "stack_dump")));
ADD_SIGNAL(MethodInfo("stack_frame_vars", PropertyInfo(Variant::INT, "num_vars")));
ADD_SIGNAL(MethodInfo("stack_frame_var", PropertyInfo(Variant::ARRAY, "data")));
+ ADD_SIGNAL(MethodInfo("debug_data", PropertyInfo(Variant::STRING, "msg"), PropertyInfo(Variant::ARRAY, "data")));
+ ADD_SIGNAL(MethodInfo("set_breakpoint", PropertyInfo("script"), PropertyInfo(Variant::INT, "line"), PropertyInfo(Variant::BOOL, "enabled")));
+ ADD_SIGNAL(MethodInfo("clear_breakpoints"));
}
void ScriptEditorDebugger::add_debugger_plugin(const Ref<Script> &p_script) {
diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h
index 499dda86da..1c1c0fd3e5 100644
--- a/editor/debugger/script_editor_debugger.h
+++ b/editor/debugger/script_editor_debugger.h
@@ -205,6 +205,9 @@ private:
void _clear_execution();
void _stop_and_notify();
+ void _set_breakpoint(const String &p_path, const int &p_line, const bool &p_enabled);
+ void _clear_breakpoints();
+
protected:
void _notification(int p_what);
static void _bind_methods();
diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp
index 56a9d2c258..ec162231e9 100644
--- a/editor/doc_tools.cpp
+++ b/editor/doc_tools.cpp
@@ -64,35 +64,42 @@ void DocTools::merge_from(const DocTools &p_data) {
if (cf.methods[j].name != m.name) {
continue;
}
- if (cf.methods[j].arguments.size() != m.arguments.size()) {
- continue;
- }
- // since polymorphic functions are allowed we need to check the type of
- // the arguments so we make sure they are different.
- int arg_count = cf.methods[j].arguments.size();
- Vector<bool> arg_used;
- arg_used.resize(arg_count);
- for (int l = 0; l < arg_count; ++l) {
- arg_used.write[l] = false;
- }
- // also there is no guarantee that argument ordering will match, so we
- // have to check one by one so we make sure we have an exact match
- for (int k = 0; k < arg_count; ++k) {
+
+ const char *operator_prefix = "operator "; // Operators use a space at the end, making this prefix an invalid identifier (and differentiating from methods).
+
+ if (cf.methods[j].name == c.name || cf.methods[j].name.begins_with(operator_prefix)) {
+ // Since constructors and operators can repeat, we need to check the type of
+ // the arguments so we make sure they are different.
+
+ if (cf.methods[j].arguments.size() != m.arguments.size()) {
+ continue;
+ }
+
+ int arg_count = cf.methods[j].arguments.size();
+ Vector<bool> arg_used;
+ arg_used.resize(arg_count);
for (int l = 0; l < arg_count; ++l) {
- if (cf.methods[j].arguments[k].type == m.arguments[l].type && !arg_used[l]) {
- arg_used.write[l] = true;
- break;
+ arg_used.write[l] = false;
+ }
+ // also there is no guarantee that argument ordering will match, so we
+ // have to check one by one so we make sure we have an exact match
+ for (int k = 0; k < arg_count; ++k) {
+ for (int l = 0; l < arg_count; ++l) {
+ if (cf.methods[j].arguments[k].type == m.arguments[l].type && !arg_used[l]) {
+ arg_used.write[l] = true;
+ break;
+ }
}
}
- }
- bool not_the_same = false;
- for (int l = 0; l < arg_count; ++l) {
- if (!arg_used[l]) { // at least one of the arguments was different
- not_the_same = true;
+ bool not_the_same = false;
+ for (int l = 0; l < arg_count; ++l) {
+ if (!arg_used[l]) { // at least one of the arguments was different
+ not_the_same = true;
+ }
+ }
+ if (not_the_same) {
+ continue;
}
- }
- if (not_the_same) {
- continue;
}
const DocData::MethodDoc &mf = cf.methods[j];
@@ -245,9 +252,6 @@ void DocTools::generate(bool p_basic_types) {
}
String cname = name;
- if (cname.begins_with("_")) { //proxy class
- cname = cname.substr(1, name.length());
- }
class_list[cname] = DocData::ClassDoc();
DocData::ClassDoc &c = class_list[cname];
@@ -273,7 +277,7 @@ void DocTools::generate(bool p_basic_types) {
EO = EO->next();
}
- if (E.usage & PROPERTY_USAGE_GROUP || E.usage & PROPERTY_USAGE_SUBGROUP || E.usage & PROPERTY_USAGE_CATEGORY || E.usage & PROPERTY_USAGE_INTERNAL) {
+ if (E.usage & PROPERTY_USAGE_GROUP || E.usage & PROPERTY_USAGE_SUBGROUP || E.usage & PROPERTY_USAGE_CATEGORY || E.usage & PROPERTY_USAGE_INTERNAL || (E.type == Variant::NIL && E.usage & PROPERTY_USAGE_ARRAY)) {
continue;
}
@@ -430,6 +434,18 @@ void DocTools::generate(bool p_basic_types) {
}
}
+ Vector<Error> errs = ClassDB::get_method_error_return_values(name, E.name);
+ if (errs.size()) {
+ if (errs.find(OK) == -1) {
+ errs.insert(0, OK);
+ }
+ for (int i = 0; i < errs.size(); i++) {
+ if (method.errors_returned.find(errs[i]) == -1) {
+ method.errors_returned.push_back(errs[i]);
+ }
+ }
+ }
+
c.methods.push_back(method);
}
@@ -740,9 +756,6 @@ void DocTools::generate(bool p_basic_types) {
while (String(ClassDB::get_parent_class(pd.type)) != "Object") {
pd.type = ClassDB::get_parent_class(pd.type);
}
- if (pd.type.begins_with("_")) {
- pd.type = pd.type.substr(1, pd.type.length());
- }
c.properties.push_back(pd);
}
@@ -873,6 +886,9 @@ static Error _parse_methods(Ref<XMLParser> &parser, Vector<DocData::MethodDoc> &
if (parser->has_attribute("enum")) {
method.return_enum = parser->get_attribute_value("enum");
}
+ } else if (name == "returns_error") {
+ ERR_FAIL_COND_V(!parser->has_attribute("number"), ERR_FILE_CORRUPT);
+ method.errors_returned.push_back(parser->get_attribute_value("number").to_int());
} else if (name == "argument") {
DocData::ArgumentDoc argument;
ERR_FAIL_COND_V(!parser->has_attribute("name"), ERR_FILE_CORRUPT);
@@ -1157,6 +1173,59 @@ static void _write_string(FileAccess *f, int p_tablevel, const String &p_string)
f->store_string(tab + p_string + "\n");
}
+static void _write_method_doc(FileAccess *f, const String &p_name, Vector<DocData::MethodDoc> &p_method_docs) {
+ if (!p_method_docs.is_empty()) {
+ p_method_docs.sort();
+ _write_string(f, 1, "<" + p_name + "s>");
+ for (int i = 0; i < p_method_docs.size(); i++) {
+ const DocData::MethodDoc &m = p_method_docs[i];
+
+ String qualifiers;
+ if (m.qualifiers != "") {
+ qualifiers += " qualifiers=\"" + m.qualifiers.xml_escape() + "\"";
+ }
+
+ _write_string(f, 2, "<" + p_name + " name=\"" + m.name.xml_escape() + "\"" + qualifiers + ">");
+
+ if (m.return_type != "") {
+ String enum_text;
+ if (m.return_enum != String()) {
+ enum_text = " enum=\"" + m.return_enum + "\"";
+ }
+ _write_string(f, 3, "<return type=\"" + m.return_type + "\"" + enum_text + " />");
+ }
+ if (m.errors_returned.size() > 0) {
+ for (int j = 0; j < m.errors_returned.size(); j++) {
+ _write_string(f, 3, "<returns_error number=\"" + itos(m.errors_returned[j]) + "\"/>");
+ }
+ }
+
+ for (int j = 0; j < m.arguments.size(); j++) {
+ const DocData::ArgumentDoc &a = m.arguments[j];
+
+ String enum_text;
+ if (a.enumeration != String()) {
+ enum_text = " enum=\"" + a.enumeration + "\"";
+ }
+
+ if (a.default_value != "") {
+ _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\"" + enum_text + " default=\"" + a.default_value.xml_escape(true) + "\" />");
+ } else {
+ _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\"" + enum_text + " />");
+ }
+ }
+
+ _write_string(f, 3, "<description>");
+ _write_string(f, 4, m.description.strip_edges().xml_escape());
+ _write_string(f, 3, "</description>");
+
+ _write_string(f, 2, "</" + p_name + ">");
+ }
+
+ _write_string(f, 1, "</" + p_name + "s>");
+ }
+}
+
Error DocTools::save_classes(const String &p_default_path, const Map<String, String> &p_class_path) {
for (Map<String, DocData::ClassDoc>::Element *E = class_list.front(); E; E = E->next()) {
DocData::ClassDoc &c = E->get();
@@ -1200,53 +1269,9 @@ Error DocTools::save_classes(const String &p_default_path, const Map<String, Str
}
_write_string(f, 1, "</tutorials>");
- _write_string(f, 1, "<methods>");
-
- c.methods.sort();
-
- for (int i = 0; i < c.methods.size(); i++) {
- const DocData::MethodDoc &m = c.methods[i];
-
- String qualifiers;
- if (m.qualifiers != "") {
- qualifiers += " qualifiers=\"" + m.qualifiers.xml_escape() + "\"";
- }
+ _write_method_doc(f, "method", c.methods);
- _write_string(f, 2, "<method name=\"" + m.name.xml_escape() + "\"" + qualifiers + ">");
-
- if (m.return_type != "") {
- String enum_text;
- if (m.return_enum != String()) {
- enum_text = " enum=\"" + m.return_enum + "\"";
- }
- _write_string(f, 3, "<return type=\"" + m.return_type + "\"" + enum_text + " />");
- }
-
- for (int j = 0; j < m.arguments.size(); j++) {
- const DocData::ArgumentDoc &a = m.arguments[j];
-
- String enum_text;
- if (a.enumeration != String()) {
- enum_text = " enum=\"" + a.enumeration + "\"";
- }
-
- if (a.default_value != "") {
- _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\"" + enum_text + " default=\"" + a.default_value.xml_escape(true) + "\" />");
- } else {
- _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\"" + enum_text + " />");
- }
- }
-
- _write_string(f, 3, "<description>");
- _write_string(f, 4, m.description.strip_edges().xml_escape());
- _write_string(f, 3, "</description>");
-
- _write_string(f, 2, "</method>");
- }
-
- _write_string(f, 1, "</methods>");
-
- if (c.properties.size()) {
+ if (!c.properties.is_empty()) {
_write_string(f, 1, "<members>");
c.properties.sort();
@@ -1273,52 +1298,33 @@ Error DocTools::save_classes(const String &p_default_path, const Map<String, Str
_write_string(f, 1, "</members>");
}
- if (c.signals.size()) {
- c.signals.sort();
-
- _write_string(f, 1, "<signals>");
- for (int i = 0; i < c.signals.size(); i++) {
- const DocData::MethodDoc &m = c.signals[i];
- _write_string(f, 2, "<signal name=\"" + m.name + "\">");
- for (int j = 0; j < m.arguments.size(); j++) {
- const DocData::ArgumentDoc &a = m.arguments[j];
- _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\" />");
- }
-
- _write_string(f, 3, "<description>");
- _write_string(f, 4, m.description.strip_edges().xml_escape());
- _write_string(f, 3, "</description>");
-
- _write_string(f, 2, "</signal>");
- }
-
- _write_string(f, 1, "</signals>");
- }
-
- _write_string(f, 1, "<constants>");
+ _write_method_doc(f, "signal", c.signals);
- for (int i = 0; i < c.constants.size(); i++) {
- const DocData::ConstantDoc &k = c.constants[i];
- if (k.is_value_valid) {
- if (k.enumeration != String()) {
- _write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"" + k.value + "\" enum=\"" + k.enumeration + "\">");
- } else {
- _write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"" + k.value + "\">");
- }
- } else {
- if (k.enumeration != String()) {
- _write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"platform-dependent\" enum=\"" + k.enumeration + "\">");
+ if (!c.constants.is_empty()) {
+ _write_string(f, 1, "<constants>");
+ for (int i = 0; i < c.constants.size(); i++) {
+ const DocData::ConstantDoc &k = c.constants[i];
+ if (k.is_value_valid) {
+ if (k.enumeration != String()) {
+ _write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"" + k.value + "\" enum=\"" + k.enumeration + "\">");
+ } else {
+ _write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"" + k.value + "\">");
+ }
} else {
- _write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"platform-dependent\">");
+ if (k.enumeration != String()) {
+ _write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"platform-dependent\" enum=\"" + k.enumeration + "\">");
+ } else {
+ _write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"platform-dependent\">");
+ }
}
+ _write_string(f, 3, k.description.strip_edges().xml_escape());
+ _write_string(f, 2, "</constant>");
}
- _write_string(f, 3, k.description.strip_edges().xml_escape());
- _write_string(f, 2, "</constant>");
- }
- _write_string(f, 1, "</constants>");
+ _write_string(f, 1, "</constants>");
+ }
- if (c.theme_properties.size()) {
+ if (!c.theme_properties.is_empty()) {
c.theme_properties.sort();
_write_string(f, 1, "<theme_items>");
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 5209ee06c6..b9f1c1af54 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -530,12 +530,12 @@ void EditorAudioBus::_effect_add(int p_which) {
ur->commit_action();
}
-void EditorAudioBus::_gui_input(const Ref<InputEvent> &p_event) {
+void EditorAudioBus::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed()) {
- Vector2 pos = Vector2(mb->get_position().x, mb->get_position().y);
+ Vector2 pos = mb->get_position();
bus_popup->set_position(get_global_position() + pos);
bus_popup->popup();
}
@@ -744,7 +744,7 @@ void EditorAudioBus::_effect_rmb(const Vector2 &p_pos) {
void EditorAudioBus::_bind_methods() {
ClassDB::bind_method("update_bus", &EditorAudioBus::update_bus);
ClassDB::bind_method("update_send", &EditorAudioBus::update_send);
- ClassDB::bind_method("_gui_input", &EditorAudioBus::_gui_input);
+
ClassDB::bind_method("_get_drag_data_fw", &EditorAudioBus::get_drag_data_fw);
ClassDB::bind_method("_can_drop_data_fw", &EditorAudioBus::can_drop_data_fw);
ClassDB::bind_method("_drop_data_fw", &EditorAudioBus::drop_data_fw);
diff --git a/editor/editor_audio_buses.h b/editor/editor_audio_buses.h
index 0fbda8ece9..e1aaa060c6 100644
--- a/editor/editor_audio_buses.h
+++ b/editor/editor_audio_buses.h
@@ -90,7 +90,7 @@ class EditorAudioBus : public PanelContainer {
bool is_master;
mutable bool hovering_drop;
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _effects_gui_input(Ref<InputEvent> p_event);
void _bus_popup_pressed(int p_option);
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index fad76682b5..fcf79a80a7 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -64,7 +64,12 @@ void EditorAutoloadSettings::_notification(int p_what) {
bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, String *r_error) {
if (!p_name.is_valid_identifier()) {
if (r_error) {
- *r_error = TTR("Invalid name.") + "\n" + TTR("Valid characters:") + " a-z, A-Z, 0-9 or _";
+ *r_error = TTR("Invalid name.") + " ";
+ if (p_name.size() > 0 && p_name.left(1).is_numeric()) {
+ *r_error += TTR("Cannot begin with a digit.");
+ } else {
+ *r_error += TTR("Valid characters:") + " a-z, A-Z, 0-9 or _";
+ }
}
return false;
@@ -72,7 +77,15 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, Strin
if (ClassDB::class_exists(p_name)) {
if (r_error) {
- *r_error = TTR("Invalid name.") + "\n" + TTR("Must not collide with an existing engine class name.");
+ *r_error = TTR("Invalid name.") + " " + TTR("Must not collide with an existing engine class name.");
+ }
+
+ return false;
+ }
+
+ if (ScriptServer::is_global_class(p_name)) {
+ if (r_error) {
+ *r_error = TTR("Invalid name.") + "\n" + TTR("Must not collide with an existing global script class name.");
}
return false;
@@ -81,7 +94,7 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, Strin
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
if (Variant::get_type_name(Variant::Type(i)) == p_name) {
if (r_error) {
- *r_error = TTR("Invalid name.") + "\n" + TTR("Must not collide with an existing built-in type name.");
+ *r_error = TTR("Invalid name.") + " " + TTR("Must not collide with an existing built-in type name.");
}
return false;
@@ -91,7 +104,7 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, Strin
for (int i = 0; i < CoreConstants::get_global_constant_count(); i++) {
if (CoreConstants::get_global_constant_name(i) == p_name) {
if (r_error) {
- *r_error = TTR("Invalid name.") + "\n" + TTR("Must not collide with an existing global constant name.");
+ *r_error = TTR("Invalid name.") + " " + TTR("Must not collide with an existing global constant name.");
}
return false;
@@ -104,7 +117,7 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, Strin
for (const String &E : keywords) {
if (E == p_name) {
if (r_error) {
- *r_error = TTR("Invalid name.") + "\n" + TTR("Keyword cannot be used as an autoload name.");
+ *r_error = TTR("Invalid name.") + " " + TTR("Keyword cannot be used as an autoload name.");
}
return false;
@@ -338,8 +351,11 @@ void EditorAutoloadSettings::_autoload_path_text_changed(const String p_path) {
}
void EditorAutoloadSettings::_autoload_text_changed(const String p_name) {
- add_autoload->set_disabled(
- autoload_add_path->get_text() == "" || !_autoload_name_is_valid(p_name, nullptr));
+ String error_string;
+ bool is_name_valid = _autoload_name_is_valid(p_name, &error_string);
+ add_autoload->set_disabled(autoload_add_path->get_text() == "" || !is_name_valid);
+ error_message->set_text(error_string);
+ error_message->set_visible(autoload_add_name->get_text() != "" && !is_name_valid);
}
Node *EditorAutoloadSettings::_create_autoload(const String &p_path) {
@@ -820,6 +836,12 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
HBoxContainer *hbc = memnew(HBoxContainer);
add_child(hbc);
+ error_message = memnew(Label);
+ error_message->hide();
+ error_message->set_align(Label::Align::ALIGN_RIGHT);
+ error_message->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), SNAME("Editor")));
+ add_child(error_message);
+
Label *l = memnew(Label);
l->set_text(TTR("Path:"));
hbc->add_child(l);
diff --git a/editor/editor_autoload_settings.h b/editor/editor_autoload_settings.h
index b709728856..b8e054cd14 100644
--- a/editor/editor_autoload_settings.h
+++ b/editor/editor_autoload_settings.h
@@ -70,6 +70,7 @@ class EditorAutoloadSettings : public VBoxContainer {
LineEdit *autoload_add_name;
Button *add_autoload;
LineEdit *autoload_add_path;
+ Label *error_message;
Button *browse_button;
EditorFileDialog *file_dialog;
diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp
index 6349beeef4..e69ced8522 100644
--- a/editor/editor_command_palette.cpp
+++ b/editor/editor_command_palette.cpp
@@ -70,8 +70,13 @@ void EditorCommandPalette::_update_command_search(const String &search_text) {
r.key_name = command_keys[i];
r.display_name = commands[r.key_name].name;
r.shortcut_text = commands[r.key_name].shortcut;
+ r.last_used = commands[r.key_name].last_used;
+
if (search_text.is_subsequence_ofi(r.display_name)) {
- r.score = _score_path(search_text, r.display_name.to_lower());
+ if (!search_text.is_empty()) {
+ r.score = _score_path(search_text, r.display_name.to_lower());
+ }
+
entries.push_back(r);
}
}
@@ -81,60 +86,58 @@ void EditorCommandPalette::_update_command_search(const String &search_text) {
TreeItem *root = search_options->get_root();
root->clear_children();
- if (entries.size() > 0) {
- if (!search_text.is_empty()) {
- SortArray<CommandEntry, CommandEntryComparator> sorter;
- sorter.sort(entries.ptrw(), entries.size());
- }
+ if (entries.is_empty()) {
+ get_ok_button()->set_disabled(true);
- const int entry_limit = MIN(entries.size(), 300);
- for (int i = 0; i < entry_limit; i++) {
- String section_name = entries[i].key_name.get_slice("/", 0);
- TreeItem *section;
+ return;
+ }
- if (sections.has(section_name)) {
- section = sections[section_name];
- } else {
- section = search_options->create_item(root);
+ if (!search_text.is_empty()) {
+ SortArray<CommandEntry, CommandEntryComparator> sorter;
+ sorter.sort(entries.ptrw(), entries.size());
+ } else {
+ SortArray<CommandEntry, CommandHistoryComparator> sorter;
+ sorter.sort(entries.ptrw(), entries.size());
+ }
- if (!first_section) {
- first_section = section;
- }
+ const int entry_limit = MIN(entries.size(), 300);
+ for (int i = 0; i < entry_limit; i++) {
+ String section_name = entries[i].key_name.get_slice("/", 0);
+ TreeItem *section;
- String item_name = section_name.capitalize();
- section->set_text(0, item_name);
+ if (sections.has(section_name)) {
+ section = sections[section_name];
+ } else {
+ section = search_options->create_item(root);
- sections[section_name] = section;
- section->set_custom_bg_color(0, search_options->get_theme_color("prop_subsection", "Editor"));
- section->set_custom_bg_color(1, search_options->get_theme_color("prop_subsection", "Editor"));
+ if (!first_section) {
+ first_section = section;
}
- TreeItem *ti = search_options->create_item(section);
- String shortcut_text = entries[i].shortcut_text == "None" ? "" : entries[i].shortcut_text;
- ti->set_text(0, entries[i].display_name);
- ti->set_metadata(0, entries[i].key_name);
- ti->set_text_align(1, TreeItem::TextAlign::ALIGN_RIGHT);
- ti->set_text(1, shortcut_text);
- Color c = Color(1, 1, 1, 0.5);
- ti->set_custom_color(1, c);
- }
-
- TreeItem *to_select = first_section->get_first_child();
- to_select->select(0);
- to_select->set_as_cursor(0);
- search_options->scroll_to_item(to_select);
+ String item_name = section_name.capitalize();
+ section->set_text(0, item_name);
+ section->set_selectable(0, false);
+ section->set_selectable(1, false);
+ section->set_custom_bg_color(0, search_options->get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
+ section->set_custom_bg_color(1, search_options->get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
- get_ok_button()->set_disabled(false);
- } else {
- TreeItem *ti = search_options->create_item(root);
- ti->set_text(0, TTR("No matching commands found"));
- ti->set_metadata(0, "");
- Color c = Color(0.5, 0.5, 0.5, 0.5);
- ti->set_custom_color(0, c);
- search_options->deselect_all();
+ sections[section_name] = section;
+ }
- get_ok_button()->set_disabled(true);
+ TreeItem *ti = search_options->create_item(section);
+ String shortcut_text = entries[i].shortcut_text == "None" ? "" : entries[i].shortcut_text;
+ ti->set_text(0, entries[i].display_name);
+ ti->set_metadata(0, entries[i].key_name);
+ ti->set_text_align(1, TreeItem::TextAlign::ALIGN_RIGHT);
+ ti->set_text(1, shortcut_text);
+ Color c = Color(1, 1, 1, 0.5);
+ ti->set_custom_color(1, c);
}
+
+ TreeItem *to_select = first_section->get_first_child();
+ to_select->select(0);
+ to_select->set_as_cursor(0);
+ search_options->ensure_cursor_is_visible();
}
void EditorCommandPalette::_bind_methods() {
@@ -150,7 +153,7 @@ void EditorCommandPalette::_sbox_input(const Ref<InputEvent> &p_ie) {
case KEY_DOWN:
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
- search_options->call("_gui_input", k);
+ search_options->gui_input(k);
} break;
default:
break;
@@ -169,8 +172,11 @@ void EditorCommandPalette::_confirmed() {
void EditorCommandPalette::open_popup() {
popup_centered_clamped(Size2i(600, 440), 0.8f);
+
command_search_box->clear();
command_search_box->grab_focus();
+
+ search_options->scroll_to_item(search_options->get_root());
}
void EditorCommandPalette::get_actions_list(List<String> *p_list) const {
@@ -211,7 +217,9 @@ void EditorCommandPalette::_add_command(String p_command_name, String p_key_name
void EditorCommandPalette::execute_command(String &p_command_key) {
ERR_FAIL_COND_MSG(!commands.has(p_command_key), p_command_key + " not found.");
+ commands[p_command_key].last_used = OS::get_singleton()->get_unix_time();
commands[p_command_key].callable.call_deferred(nullptr, 0);
+ _save_history();
}
void EditorCommandPalette::register_shortcuts_as_command() {
@@ -224,10 +232,18 @@ void EditorCommandPalette::register_shortcuts_as_command() {
ev.instantiate();
ev->set_shortcut(shortcut);
String shortcut_text = String(shortcut->get_as_text());
- add_command(command_name, *key, callable_mp(EditorNode::get_singleton()->get_viewport(), &Viewport::unhandled_input), varray(ev, false), shortcut_text);
+ add_command(command_name, *key, callable_mp(EditorNode::get_singleton()->get_viewport(), &Viewport::push_unhandled_input), varray(ev, false), shortcut_text);
key = unregistered_shortcuts.next(key);
}
unregistered_shortcuts.clear();
+
+ // Load command use history.
+ Dictionary command_history = EditorSettings::get_singleton()->get_project_metadata("command_palette", "command_history", Dictionary());
+ Array history_entries = command_history.keys();
+ for (int i = 0; i < history_entries.size(); i++) {
+ const String &history_key = history_entries[i];
+ commands[history_key].last_used = command_history[history_key];
+ }
}
Ref<Shortcut> EditorCommandPalette::add_shortcut_command(const String &p_command, const String &p_key, Ref<Shortcut> p_shortcut) {
@@ -236,7 +252,7 @@ Ref<Shortcut> EditorCommandPalette::add_shortcut_command(const String &p_command
ev.instantiate();
ev->set_shortcut(p_shortcut);
String shortcut_text = String(p_shortcut->get_as_text());
- add_command(p_command, p_key, callable_mp(EditorNode::get_singleton()->get_viewport(), &Viewport::unhandled_input), varray(ev, false), shortcut_text);
+ add_command(p_command, p_key, callable_mp(EditorNode::get_singleton()->get_viewport(), &Viewport::push_unhandled_input), varray(ev, false), shortcut_text);
} else {
const String key_name = String(p_key);
const String command_name = String(p_command);
@@ -247,7 +263,20 @@ Ref<Shortcut> EditorCommandPalette::add_shortcut_command(const String &p_command
}
void EditorCommandPalette::_theme_changed() {
- command_search_box->set_right_icon(search_options->get_theme_icon("Search", "EditorIcons"));
+ command_search_box->set_right_icon(search_options->get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
+}
+
+void EditorCommandPalette::_save_history() const {
+ Dictionary command_history;
+ List<String> command_keys;
+ commands.get_key_list(&command_keys);
+
+ for (const String &key : command_keys) {
+ if (commands[key].last_used > 0) {
+ command_history[key] = commands[key].last_used;
+ }
+ }
+ EditorSettings::get_singleton()->set_project_metadata("command_palette", "command_history", command_history);
}
EditorCommandPalette *EditorCommandPalette::get_singleton() {
@@ -258,6 +287,9 @@ EditorCommandPalette *EditorCommandPalette::get_singleton() {
}
EditorCommandPalette::EditorCommandPalette() {
+ set_hide_on_ok(false);
+ connect("confirmed", callable_mp(this, &EditorCommandPalette::_confirmed));
+
VBoxContainer *vbc = memnew(VBoxContainer);
vbc->connect("theme_changed", callable_mp(this, &EditorCommandPalette::_theme_changed));
add_child(vbc);
@@ -275,18 +307,15 @@ EditorCommandPalette::EditorCommandPalette() {
search_options = memnew(Tree);
search_options->connect("item_activated", callable_mp(this, &EditorCommandPalette::_confirmed));
+ search_options->connect("item_selected", callable_mp((BaseButton *)get_ok_button(), &BaseButton::set_disabled), varray(false));
+ search_options->connect("nothing_selected", callable_mp((BaseButton *)get_ok_button(), &BaseButton::set_disabled), varray(true));
search_options->create_item();
search_options->set_hide_root(true);
- search_options->set_hide_folding(true);
- search_options->add_theme_constant_override("draw_guides", 1);
search_options->set_columns(2);
search_options->set_v_size_flags(Control::SIZE_EXPAND_FILL);
search_options->set_h_size_flags(Control::SIZE_EXPAND_FILL);
search_options->set_column_custom_minimum_width(0, int(8 * EDSCALE));
vbc->add_child(search_options, true);
-
- connect("confirmed", callable_mp(this, &EditorCommandPalette::_confirmed));
- set_hide_on_ok(false);
}
Ref<Shortcut> ED_SHORTCUT_AND_COMMAND(const String &p_path, const String &p_name, Key p_keycode, String p_command_name) {
diff --git a/editor/editor_command_palette.h b/editor/editor_command_palette.h
index cfd8b964c8..39821a1169 100644
--- a/editor/editor_command_palette.h
+++ b/editor/editor_command_palette.h
@@ -31,9 +31,9 @@
#ifndef EDITOR_COMMAND_PALETTE_H
#define EDITOR_COMMAND_PALETTE_H
+#include "core/input/shortcut.h"
#include "core/os/thread_safe.h"
#include "scene/gui/dialogs.h"
-#include "scene/gui/shortcut.h"
#include "scene/gui/tree.h"
class EditorCommandPalette : public ConfirmationDialog {
@@ -47,13 +47,15 @@ class EditorCommandPalette : public ConfirmationDialog {
Callable callable;
String name;
String shortcut;
+ int last_used = 0; // Store time as int, because doubles have problems with text serialization.
};
struct CommandEntry {
String key_name;
String display_name;
String shortcut_text;
- float score;
+ int last_used = 0;
+ float score = 0;
};
struct CommandEntryComparator {
@@ -62,6 +64,12 @@ class EditorCommandPalette : public ConfirmationDialog {
}
};
+ struct CommandHistoryComparator {
+ _FORCE_INLINE_ bool operator()(const CommandEntry &A, const CommandEntry &B) const {
+ return A.last_used > B.last_used;
+ }
+ };
+
HashMap<String, Command> commands;
HashMap<String, Pair<String, Ref<Shortcut>>> unregistered_shortcuts;
@@ -74,6 +82,7 @@ class EditorCommandPalette : public ConfirmationDialog {
void _update_command_keys();
void _add_command(String p_command_name, String p_key_name, Callable p_binded_action, String p_shortcut_text = "None");
void _theme_changed();
+ void _save_history() const;
EditorCommandPalette();
protected:
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index c62e5b75b2..225526da5b 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -438,6 +438,21 @@ const Vector<Callable> EditorData::get_undo_redo_inspector_hook_callback() {
return undo_redo_callbacks;
}
+void EditorData::add_move_array_element_function(const StringName &p_class, Callable p_callable) {
+ move_element_functions.insert(p_class, p_callable);
+}
+
+void EditorData::remove_move_array_element_function(const StringName &p_class) {
+ move_element_functions.erase(p_class);
+}
+
+Callable EditorData::get_move_array_element_function(const StringName &p_class) const {
+ if (move_element_functions.has(p_class)) {
+ return move_element_functions[p_class];
+ }
+ return Callable();
+}
+
void EditorData::remove_editor_plugin(EditorPlugin *p_plugin) {
p_plugin->undo_redo = nullptr;
editor_plugins.erase(p_plugin);
@@ -539,7 +554,7 @@ void EditorData::remove_scene(int p_idx) {
ERR_FAIL_INDEX(p_idx, edited_scene.size());
if (edited_scene[p_idx].root) {
for (int i = 0; i < editor_plugins.size(); i++) {
- editor_plugins[i]->notify_scene_closed(edited_scene[p_idx].root->get_filename());
+ editor_plugins[i]->notify_scene_closed(edited_scene[p_idx].root->get_scene_file_path());
}
memdelete(edited_scene[p_idx].root);
@@ -551,6 +566,10 @@ void EditorData::remove_scene(int p_idx) {
current_edited_scene--;
}
+ if (edited_scene[p_idx].path != String()) {
+ ScriptEditor::get_singleton()->close_builtin_scripts_from_scene(edited_scene[p_idx].path);
+ }
+
edited_scene.remove(p_idx);
}
@@ -564,7 +583,7 @@ bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, Set<String>
if (p_node == p_root) {
ss = p_node->get_scene_inherited_state();
- } else if (p_node->get_filename() != String()) {
+ } else if (p_node->get_scene_file_path() != String()) {
ss = p_node->get_scene_instance_state();
}
@@ -624,12 +643,12 @@ bool EditorData::check_and_update_scene(int p_idx) {
}
}
- new_scene->set_filename(edited_scene[p_idx].root->get_filename());
+ new_scene->set_scene_file_path(edited_scene[p_idx].root->get_scene_file_path());
memdelete(edited_scene[p_idx].root);
edited_scene.write[p_idx].root = new_scene;
- if (new_scene->get_filename() != "") {
- edited_scene.write[p_idx].path = new_scene->get_filename();
+ if (new_scene->get_scene_file_path() != "") {
+ edited_scene.write[p_idx].path = new_scene->get_scene_file_path();
}
edited_scene.write[p_idx].selection = new_selection;
@@ -663,10 +682,10 @@ void EditorData::set_edited_scene_root(Node *p_root) {
ERR_FAIL_INDEX(current_edited_scene, edited_scene.size());
edited_scene.write[current_edited_scene].root = p_root;
if (p_root) {
- if (p_root->get_filename() != "") {
- edited_scene.write[current_edited_scene].path = p_root->get_filename();
+ if (p_root->get_scene_file_path() != "") {
+ edited_scene.write[current_edited_scene].path = p_root->get_scene_file_path();
} else {
- p_root->set_filename(edited_scene[current_edited_scene].path);
+ p_root->set_scene_file_path(edited_scene[current_edited_scene].path);
}
}
@@ -745,7 +764,7 @@ Ref<Script> EditorData::get_scene_root_script(int p_idx) const {
Ref<Script> s = edited_scene[p_idx].root->get_script();
if (!s.is_valid() && edited_scene[p_idx].root->get_child_count()) {
Node *n = edited_scene[p_idx].root->get_child(0);
- while (!s.is_valid() && n && n->get_filename() == String()) {
+ while (!s.is_valid() && n && n->get_scene_file_path() == String()) {
s = n->get_script();
n = n->get_parent();
}
@@ -758,11 +777,11 @@ String EditorData::get_scene_title(int p_idx, bool p_always_strip_extension) con
if (!edited_scene[p_idx].root) {
return TTR("[empty]");
}
- if (edited_scene[p_idx].root->get_filename() == "") {
+ if (edited_scene[p_idx].root->get_scene_file_path() == "") {
return TTR("[unsaved]");
}
- const String filename = edited_scene[p_idx].root->get_filename().get_file();
+ const String filename = edited_scene[p_idx].root->get_scene_file_path().get_file();
const String basename = filename.get_basename();
if (p_always_strip_extension) {
@@ -776,7 +795,7 @@ String EditorData::get_scene_title(int p_idx, bool p_always_strip_extension) con
continue;
}
- if (edited_scene[i].root && basename == edited_scene[i].root->get_filename().get_file().get_basename()) {
+ if (edited_scene[i].root && basename == edited_scene[i].root->get_scene_file_path().get_file().get_basename()) {
return filename;
}
}
@@ -792,17 +811,17 @@ void EditorData::set_scene_path(int p_idx, const String &p_path) {
if (!edited_scene[p_idx].root) {
return;
}
- edited_scene[p_idx].root->set_filename(p_path);
+ edited_scene[p_idx].root->set_scene_file_path(p_path);
}
String EditorData::get_scene_path(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), String());
if (edited_scene[p_idx].root) {
- if (edited_scene[p_idx].root->get_filename() == "") {
- edited_scene[p_idx].root->set_filename(edited_scene[p_idx].path);
+ if (edited_scene[p_idx].root->get_scene_file_path() == "") {
+ edited_scene[p_idx].root->set_scene_file_path(edited_scene[p_idx].path);
} else {
- return edited_scene[p_idx].root->get_filename();
+ return edited_scene[p_idx].root->get_scene_file_path();
}
}
diff --git a/editor/editor_data.h b/editor/editor_data.h
index df6ba9d0c9..9184ddcf39 100644
--- a/editor/editor_data.h
+++ b/editor/editor_data.h
@@ -133,6 +133,7 @@ private:
List<PropertyData> clipboard;
UndoRedo undo_redo;
Vector<Callable> undo_redo_callbacks;
+ Map<StringName, Callable> move_element_functions;
void _cleanup_history();
@@ -167,10 +168,14 @@ public:
EditorPlugin *get_editor_plugin(int p_idx);
UndoRedo &get_undo_redo();
- void add_undo_redo_inspector_hook_callback(Callable p_callable); // Callbacks should have 4 args: (Object* undo_redo, Object *modified_object, String property, Variant new_value)
+ void add_undo_redo_inspector_hook_callback(Callable p_callable); // Callbacks should have this signature: void (Object* undo_redo, Object *modified_object, String property, Variant new_value)
void remove_undo_redo_inspector_hook_callback(Callable p_callable);
const Vector<Callable> get_undo_redo_inspector_hook_callback();
+ void add_move_array_element_function(const StringName &p_class, Callable p_callable); // Function should have this signature: void (Object* undo_redo, Object *modified_object, String array_prefix, int element_index, int new_position)
+ void remove_move_array_element_function(const StringName &p_class);
+ Callable get_move_array_element_function(const StringName &p_class) const;
+
void save_editor_global_states();
void restore_editor_global_states();
diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp
index 5df392b91e..f91dedf25d 100644
--- a/editor/editor_dir_dialog.cpp
+++ b/editor/editor_dir_dialog.cpp
@@ -44,6 +44,7 @@ void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p
p_item->set_metadata(0, p_dir->get_path());
p_item->set_icon(0, tree->get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")));
+ p_item->set_icon_modulate(0, tree->get_theme_color(SNAME("folder_icon_modulate"), SNAME("FileDialog")));
if (!p_item->get_parent()) {
p_item->set_text(0, "res://");
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index b374f56f6d..10ed76673e 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -32,6 +32,7 @@
#include "core/config/project_settings.h"
#include "core/crypto/crypto_core.h"
+#include "core/extension/native_extension.h"
#include "core/io/config_file.h"
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
@@ -624,21 +625,15 @@ Vector<String> EditorExportPlugin::get_ios_project_static_libs() const {
}
void EditorExportPlugin::_export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features) {
- if (get_script_instance()) {
- get_script_instance()->call("_export_file", p_path, p_type, p_features);
- }
+ GDVIRTUAL_CALL(_export_file, p_path, p_type, p_features);
}
void EditorExportPlugin::_export_begin_script(const Vector<String> &p_features, bool p_debug, const String &p_path, int p_flags) {
- if (get_script_instance()) {
- get_script_instance()->call("_export_begin", p_features, p_debug, p_path, p_flags);
- }
+ GDVIRTUAL_CALL(_export_begin, p_features, p_debug, p_path, p_flags);
}
void EditorExportPlugin::_export_end_script() {
- if (get_script_instance()) {
- get_script_instance()->call("_export_end");
- }
+ GDVIRTUAL_CALL(_export_end);
}
void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) {
@@ -663,9 +658,9 @@ void EditorExportPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_ios_cpp_code", "code"), &EditorExportPlugin::add_ios_cpp_code);
ClassDB::bind_method(D_METHOD("skip"), &EditorExportPlugin::skip);
- BIND_VMETHOD(MethodInfo("_export_file", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "type"), PropertyInfo(Variant::PACKED_STRING_ARRAY, "features")));
- BIND_VMETHOD(MethodInfo("_export_begin", PropertyInfo(Variant::PACKED_STRING_ARRAY, "features"), PropertyInfo(Variant::BOOL, "is_debug"), PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "flags")));
- BIND_VMETHOD(MethodInfo("_export_end"));
+ GDVIRTUAL_BIND(_export_file, "path", "type", "features");
+ GDVIRTUAL_BIND(_export_begin, "features", "is_debug", "path", "flags");
+ GDVIRTUAL_BIND(_export_end);
}
EditorExportPlugin::EditorExportPlugin() {
@@ -1056,6 +1051,14 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
}
}
+ if (FileAccess::exists(NativeExtension::EXTENSION_LIST_CONFIG_FILE)) {
+ Vector<uint8_t> array = FileAccess::get_file_as_array(NativeExtension::EXTENSION_LIST_CONFIG_FILE);
+ err = p_func(p_udata, NativeExtension::EXTENSION_LIST_CONFIG_FILE, array, idx, total, enc_in_filters, enc_ex_filters, key);
+ if (err != OK) {
+ return err;
+ }
+ }
+
// Store text server data if it is supported.
if (TS->has_feature(TextServer::FEATURE_USE_SUPPORT_DATA)) {
bool use_data = ProjectSettings::get_singleton()->get("internationalization/locale/include_text_server_data");
@@ -1945,7 +1948,7 @@ void EditorExportPlatformPC::set_debug_32(const String &p_file) {
void EditorExportPlatformPC::get_platform_features(List<String> *r_features) {
r_features->push_back("pc"); //all pcs support "pc"
r_features->push_back("s3tc"); //all pcs support "s3tc" compression
- r_features->push_back(get_os_name()); //OS name is a feature
+ r_features->push_back(get_os_name().to_lower()); //OS name is a feature
}
void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) {
diff --git a/editor/editor_export.h b/editor/editor_export.h
index c9401df9c2..b681f52330 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -349,6 +349,10 @@ protected:
static void _bind_methods();
+ GDVIRTUAL3(_export_file, String, String, Vector<String>)
+ GDVIRTUAL4(_export_begin, Vector<String>, bool, String, uint32_t)
+ GDVIRTUAL0(_export_end)
+
public:
Vector<String> get_ios_frameworks() const;
Vector<String> get_ios_embedded_frameworks() const;
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 5ccbed1b49..8956983646 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -86,7 +86,7 @@ void EditorFileDialog::_notification(int p_what) {
if (preview_wheel_index >= 8) {
preview_wheel_index = 0;
}
- Ref<Texture2D> frame = item_list->get_theme_icon("Progress" + itos(preview_wheel_index + 1), "EditorIcons");
+ Ref<Texture2D> frame = item_list->get_theme_icon("Progress" + itos(preview_wheel_index + 1), SNAME("EditorIcons"));
preview->set_texture(frame);
preview_wheel_timeout = 0.1;
}
@@ -124,7 +124,7 @@ void EditorFileDialog::_notification(int p_what) {
}
}
-void EditorFileDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
+void EditorFileDialog::unhandled_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventKey> k = p_event;
@@ -728,6 +728,7 @@ void EditorFileDialog::update_file_list() {
item_list->set_icon_mode(ItemList::ICON_MODE_TOP);
item_list->set_fixed_column_width(thumbnail_size * 3 / 2);
item_list->set_max_text_lines(2);
+ item_list->set_text_overrun_behavior(TextParagraph::OVERRUN_TRIM_ELLIPSIS);
item_list->set_fixed_icon_size(Size2(thumbnail_size, thumbnail_size));
if (thumbnail_size < 64) {
@@ -957,7 +958,7 @@ String EditorFileDialog::get_current_path() const {
}
void EditorFileDialog::set_current_dir(const String &p_dir) {
- if (p_dir.is_rel_path()) {
+ if (p_dir.is_relative_path()) {
dir_access->change_dir(OS::get_singleton()->get_resource_dir());
}
dir_access->change_dir(p_dir);
@@ -1354,8 +1355,6 @@ EditorFileDialog::DisplayMode EditorFileDialog::get_display_mode() const {
}
void EditorFileDialog::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_unhandled_input"), &EditorFileDialog::_unhandled_input);
-
ClassDB::bind_method(D_METHOD("_cancel_pressed"), &EditorFileDialog::_cancel_pressed);
ClassDB::bind_method(D_METHOD("clear_filters"), &EditorFileDialog::clear_filters);
@@ -1645,6 +1644,7 @@ EditorFileDialog::EditorFileDialog() {
item_list->connect("item_rmb_selected", callable_mp(this, &EditorFileDialog::_item_list_item_rmb_selected));
item_list->connect("rmb_clicked", callable_mp(this, &EditorFileDialog::_item_list_rmb_clicked));
item_list->set_allow_rmb_select(true);
+
list_vb->add_child(item_list);
item_menu = memnew(PopupMenu);
diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h
index d789956a3e..ed427dc76e 100644
--- a/editor/editor_file_dialog.h
+++ b/editor/editor_file_dialog.h
@@ -193,7 +193,7 @@ private:
void _thumbnail_done(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, const Variant &p_udata);
void _request_single_thumbnail(const String &p_path);
- void _unhandled_input(const Ref<InputEvent> &p_event);
+ virtual void unhandled_input(const Ref<InputEvent> &p_event) override;
bool _is_open_should_be_disabled();
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 78861eff9d..8523833d52 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -31,6 +31,7 @@
#include "editor_file_system.h"
#include "core/config/project_settings.h"
+#include "core/extension/native_extension_manager.h"
#include "core/io/file_access.h"
#include "core/io/resource_importer.h"
#include "core/io/resource_loader.h"
@@ -443,6 +444,10 @@ bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_impo
Ref<ResourceImporter> importer = ResourceFormatImporter::get_singleton()->get_importer_by_name(importer_name);
+ if (importer.is_null()) {
+ return true; // the importer has possibly changed, try to reimport.
+ }
+
if (importer->get_format_version() > version) {
return true; // version changed, reimport
}
@@ -605,6 +610,18 @@ bool EditorFileSystem::_update_scan_actions() {
}
}
+ if (_scan_extensions()) {
+ //needs editor restart
+ //extensions also may provide filetypes to be imported, so they must run before importing
+ if (EditorNode::immediate_confirmation_dialog(TTR("Some extensions need the editor to restart to take effect."), first_scan ? TTR("Restart") : TTR("Save&Restart"), TTR("Continue"))) {
+ if (!first_scan) {
+ EditorNode::get_singleton()->save_all_scenes();
+ }
+ EditorNode::get_singleton()->restart_editor();
+ //do not import
+ return true;
+ }
+ }
if (reimports.size()) {
reimport_files(reimports);
} else {
@@ -2222,6 +2239,76 @@ ResourceUID::ID EditorFileSystem::_resource_saver_get_resource_id_for_path(const
}
}
+static void _scan_extensions_dir(EditorFileSystemDirectory *d, Set<String> &extensions) {
+ int fc = d->get_file_count();
+ for (int i = 0; i < fc; i++) {
+ if (d->get_file_type(i) == SNAME("NativeExtension")) {
+ extensions.insert(d->get_file_path(i));
+ }
+ }
+ int dc = d->get_subdir_count();
+ for (int i = 0; i < dc; i++) {
+ _scan_extensions_dir(d->get_subdir(i), extensions);
+ }
+}
+bool EditorFileSystem::_scan_extensions() {
+ EditorFileSystemDirectory *d = get_filesystem();
+ Set<String> extensions;
+ _scan_extensions_dir(d, extensions);
+
+ //verify against loaded extensions
+
+ Vector<String> extensions_added;
+ Vector<String> extensions_removed;
+
+ for (const String &E : extensions) {
+ if (!NativeExtensionManager::get_singleton()->is_extension_loaded(E)) {
+ extensions_added.push_back(E);
+ }
+ }
+
+ Vector<String> loaded_extensions = NativeExtensionManager::get_singleton()->get_loaded_extensions();
+ for (int i = 0; i < loaded_extensions.size(); i++) {
+ if (!extensions.has(loaded_extensions[i])) {
+ extensions_removed.push_back(loaded_extensions[i]);
+ }
+ }
+
+ if (extensions.size()) {
+ if (extensions_added.size() || extensions_removed.size()) { //extensions were added or removed
+ FileAccessRef f = FileAccess::open(NativeExtension::EXTENSION_LIST_CONFIG_FILE, FileAccess::WRITE);
+ for (const String &E : extensions) {
+ f->store_line(E);
+ }
+ }
+ } else {
+ if (loaded_extensions.size() || FileAccess::exists(NativeExtension::EXTENSION_LIST_CONFIG_FILE)) { //extensions were removed
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ da->remove(NativeExtension::EXTENSION_LIST_CONFIG_FILE);
+ }
+ }
+
+ bool needs_restart = false;
+ for (int i = 0; i < extensions_added.size(); i++) {
+ NativeExtensionManager::LoadStatus st = NativeExtensionManager::get_singleton()->load_extension(extensions_added[i]);
+ if (st == NativeExtensionManager::LOAD_STATUS_FAILED) {
+ EditorNode::get_singleton()->add_io_error("Error loading extension: " + extensions_added[i]);
+ } else if (st == NativeExtensionManager::LOAD_STATUS_NEEDS_RESTART) {
+ needs_restart = true;
+ }
+ }
+ for (int i = 0; i < extensions_removed.size(); i++) {
+ NativeExtensionManager::LoadStatus st = NativeExtensionManager::get_singleton()->unload_extension(extensions_removed[i]);
+ if (st == NativeExtensionManager::LOAD_STATUS_FAILED) {
+ EditorNode::get_singleton()->add_io_error("Error removing extension: " + extensions_added[i]);
+ } else if (st == NativeExtensionManager::LOAD_STATUS_NEEDS_RESTART) {
+ needs_restart = true;
+ }
+ }
+
+ return needs_restart;
+}
+
void EditorFileSystem::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_filesystem"), &EditorFileSystem::get_filesystem);
ClassDB::bind_method(D_METHOD("is_scanning"), &EditorFileSystem::is_scanning);
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h
index 9dce29d09c..b47cf5523a 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -255,6 +255,8 @@ class EditorFileSystem : public Node {
static ResourceUID::ID _resource_saver_get_resource_id_for_path(const String &p_path, bool p_generate);
+ bool _scan_extensions();
+
protected:
void _notification(int p_what);
static void _bind_methods();
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index 1e3db1a7b0..e5d6315ef7 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -67,46 +67,113 @@
m_name->add_data(FontJapanese); \
m_name->add_data(FontFallback);
-// the custom spacings might only work with Noto Sans
-#define MAKE_DEFAULT_FONT(m_name) \
- Ref<Font> m_name; \
- m_name.instantiate(); \
- if (CustomFont.is_valid()) { \
- m_name->add_data(CustomFont); \
- m_name->add_data(DefaultFont); \
- } else { \
- m_name->add_data(DefaultFont); \
- } \
- m_name->set_spacing(Font::SPACING_TOP, -EDSCALE); \
- m_name->set_spacing(Font::SPACING_BOTTOM, -EDSCALE); \
+#define MAKE_DEFAULT_FONT(m_name, m_variations, m_base_size) \
+ Ref<Font> m_name; \
+ m_name.instantiate(); \
+ if (CustomFont.is_valid()) { \
+ m_name->add_data(CustomFont); \
+ m_name->add_data(DefaultFont); \
+ } else { \
+ m_name->add_data(DefaultFont); \
+ } \
+ { \
+ Dictionary variations; \
+ if (m_variations != String()) { \
+ Vector<String> variation_tags = m_variations.split(","); \
+ for (int i = 0; i < variation_tags.size(); i++) { \
+ Vector<String> tokens = variation_tags[i].split("="); \
+ if (tokens.size() == 2) { \
+ variations[tokens[0]] = tokens[1].to_float(); \
+ } \
+ } \
+ } \
+ m_name->set_variation_coordinates(variations); \
+ } \
+ m_name->set_base_size(m_base_size); \
+ m_name->set_spacing(TextServer::SPACING_TOP, -EDSCALE); \
+ m_name->set_spacing(TextServer::SPACING_BOTTOM, -EDSCALE); \
MAKE_FALLBACKS(m_name);
-#define MAKE_BOLD_FONT(m_name) \
- Ref<Font> m_name; \
- m_name.instantiate(); \
- if (CustomFontBold.is_valid()) { \
- m_name->add_data(CustomFontBold); \
- m_name->add_data(DefaultFontBold); \
- } else { \
- m_name->add_data(DefaultFontBold); \
- } \
- m_name->set_spacing(Font::SPACING_TOP, -EDSCALE); \
- m_name->set_spacing(Font::SPACING_BOTTOM, -EDSCALE); \
+#define MAKE_BOLD_FONT(m_name, m_variations, m_base_size) \
+ Ref<Font> m_name; \
+ m_name.instantiate(); \
+ if (CustomFontBold.is_valid()) { \
+ m_name->add_data(CustomFontBold); \
+ m_name->add_data(DefaultFontBold); \
+ } else { \
+ m_name->add_data(DefaultFontBold); \
+ } \
+ { \
+ Dictionary variations; \
+ if (m_variations != String()) { \
+ Vector<String> variation_tags = m_variations.split(","); \
+ for (int i = 0; i < variation_tags.size(); i++) { \
+ Vector<String> tokens = variation_tags[i].split("="); \
+ if (tokens.size() == 2) { \
+ variations[tokens[0]] = tokens[1].to_float(); \
+ } \
+ } \
+ } \
+ m_name->set_variation_coordinates(variations); \
+ } \
+ m_name->set_base_size(m_base_size); \
+ m_name->set_spacing(TextServer::SPACING_TOP, -EDSCALE); \
+ m_name->set_spacing(TextServer::SPACING_BOTTOM, -EDSCALE); \
MAKE_FALLBACKS_BOLD(m_name);
-#define MAKE_SOURCE_FONT(m_name) \
- Ref<Font> m_name; \
- m_name.instantiate(); \
- if (CustomFontSource.is_valid()) { \
- m_name->add_data(CustomFontSource); \
- m_name->add_data(dfmono); \
- } else { \
- m_name->add_data(dfmono); \
- } \
- m_name->set_spacing(Font::SPACING_TOP, -EDSCALE); \
- m_name->set_spacing(Font::SPACING_BOTTOM, -EDSCALE); \
+#define MAKE_SOURCE_FONT(m_name, m_variations, m_base_size) \
+ Ref<Font> m_name; \
+ m_name.instantiate(); \
+ if (CustomFontSource.is_valid()) { \
+ m_name->add_data(CustomFontSource); \
+ m_name->add_data(dfmono); \
+ } else { \
+ m_name->add_data(dfmono); \
+ } \
+ { \
+ Dictionary variations; \
+ if (m_variations != String()) { \
+ Vector<String> variation_tags = m_variations.split(","); \
+ for (int i = 0; i < variation_tags.size(); i++) { \
+ Vector<String> tokens = variation_tags[i].split("="); \
+ if (tokens.size() == 2) { \
+ variations[tokens[0]] = tokens[1].to_float(); \
+ } \
+ } \
+ } \
+ m_name->set_variation_coordinates(variations); \
+ } \
+ m_name->set_base_size(m_base_size); \
+ m_name->set_spacing(TextServer::SPACING_TOP, -EDSCALE); \
+ m_name->set_spacing(TextServer::SPACING_BOTTOM, -EDSCALE); \
MAKE_FALLBACKS(m_name);
+Ref<FontData> load_cached_external_font(const String &p_path, TextServer::Hinting p_hinting, bool p_aa, bool p_autohint) {
+ Ref<FontData> font;
+ font.instantiate();
+
+ Vector<uint8_t> data = FileAccess::get_file_as_array(p_path);
+
+ font->set_data(data);
+ font->set_antialiased(p_aa);
+ font->set_hinting(p_hinting);
+ font->set_force_autohinter(p_autohint);
+
+ return font;
+}
+
+Ref<FontData> load_cached_internal_font(const uint8_t *p_data, size_t p_size, TextServer::Hinting p_hinting, bool p_aa, bool p_autohint) {
+ Ref<FontData> font;
+ font.instantiate();
+
+ font->set_data_ptr(p_data, p_size);
+ font->set_antialiased(p_aa);
+ font->set_hinting(p_hinting);
+ font->set_force_autohinter(p_autohint);
+
+ return font;
+}
+
void editor_register_fonts(Ref<Theme> p_theme) {
DirAccess *dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
@@ -144,11 +211,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
String custom_font_path = EditorSettings::get_singleton()->get("interface/editor/main_font");
Ref<FontData> CustomFont;
if (custom_font_path.length() > 0 && dir->file_exists(custom_font_path)) {
- CustomFont.instantiate();
- CustomFont->load_resource(custom_font_path, default_font_size);
- CustomFont->set_antialiased(font_antialiased);
- CustomFont->set_hinting(font_hinting);
- CustomFont->set_force_autohinter(true); //just looks better..i think?
+ CustomFont = load_cached_external_font(custom_font_path, font_hinting, font_antialiased, true);
} else {
EditorSettings::get_singleton()->set_manually("interface/editor/main_font", "");
}
@@ -158,11 +221,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
String custom_font_path_bold = EditorSettings::get_singleton()->get("interface/editor/main_font_bold");
Ref<FontData> CustomFontBold;
if (custom_font_path_bold.length() > 0 && dir->file_exists(custom_font_path_bold)) {
- CustomFontBold.instantiate();
- CustomFontBold->load_resource(custom_font_path_bold, default_font_size);
- CustomFontBold->set_antialiased(font_antialiased);
- CustomFontBold->set_hinting(font_hinting);
- CustomFontBold->set_force_autohinter(true); //just looks better..i think?
+ CustomFontBold = load_cached_external_font(custom_font_path_bold, font_hinting, font_antialiased, true);
} else {
EditorSettings::get_singleton()->set_manually("interface/editor/main_font_bold", "");
}
@@ -172,231 +231,51 @@ void editor_register_fonts(Ref<Theme> p_theme) {
String custom_font_path_source = EditorSettings::get_singleton()->get("interface/editor/code_font");
Ref<FontData> CustomFontSource;
if (custom_font_path_source.length() > 0 && dir->file_exists(custom_font_path_source)) {
- CustomFontSource.instantiate();
- CustomFontSource->load_resource(custom_font_path_source, default_font_size);
- CustomFontSource->set_antialiased(font_antialiased);
- CustomFontSource->set_hinting(font_hinting);
-
- Vector<String> subtag = String(EditorSettings::get_singleton()->get("interface/editor/code_font_custom_variations")).split(",");
- for (int i = 0; i < subtag.size(); i++) {
- Vector<String> subtag_a = subtag[i].split("=");
- if (subtag_a.size() == 2) {
- CustomFontSource->set_variation(subtag_a[0], subtag_a[1].to_float());
- }
- }
+ CustomFontSource = load_cached_external_font(custom_font_path_source, font_hinting, font_antialiased, true);
} else {
EditorSettings::get_singleton()->set_manually("interface/editor/code_font", "");
}
memdelete(dir);
- /* Noto Sans UI */
-
- Ref<FontData> DefaultFont;
- DefaultFont.instantiate();
- DefaultFont->load_memory(_font_NotoSans_Regular, _font_NotoSans_Regular_size, "ttf", default_font_size);
- DefaultFont->set_antialiased(font_antialiased);
- DefaultFont->set_hinting(font_hinting);
- DefaultFont->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> DefaultFontBold;
- DefaultFontBold.instantiate();
- DefaultFontBold->load_memory(_font_NotoSans_Bold, _font_NotoSans_Bold_size, "ttf", default_font_size);
- DefaultFontBold->set_antialiased(font_antialiased);
- DefaultFontBold->set_hinting(font_hinting);
- DefaultFontBold->set_force_autohinter(true); // just looks better..i think?
-
- Ref<FontData> FontArabic;
- FontArabic.instantiate();
- FontArabic->load_memory(_font_NotoNaskhArabicUI_Regular, _font_NotoNaskhArabicUI_Regular_size, "ttf", default_font_size);
- FontArabic->set_antialiased(font_antialiased);
- FontArabic->set_hinting(font_hinting);
- FontArabic->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontArabicBold;
- FontArabicBold.instantiate();
- FontArabicBold->load_memory(_font_NotoNaskhArabicUI_Bold, _font_NotoNaskhArabicUI_Bold_size, "ttf", default_font_size);
- FontArabicBold->set_antialiased(font_antialiased);
- FontArabicBold->set_hinting(font_hinting);
- FontArabicBold->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontBengali;
- FontBengali.instantiate();
- FontBengali->load_memory(_font_NotoSansBengaliUI_Regular, _font_NotoSansBengaliUI_Regular_size, "ttf", default_font_size);
- FontBengali->set_antialiased(font_antialiased);
- FontBengali->set_hinting(font_hinting);
- FontBengali->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontBengaliBold;
- FontBengaliBold.instantiate();
- FontBengaliBold->load_memory(_font_NotoSansBengaliUI_Bold, _font_NotoSansBengaliUI_Bold_size, "ttf", default_font_size);
- FontBengaliBold->set_antialiased(font_antialiased);
- FontBengaliBold->set_hinting(font_hinting);
- FontBengaliBold->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontDevanagari;
- FontDevanagari.instantiate();
- FontDevanagari->load_memory(_font_NotoSansDevanagariUI_Regular, _font_NotoSansDevanagariUI_Regular_size, "ttf", default_font_size);
- FontDevanagari->set_antialiased(font_antialiased);
- FontDevanagari->set_hinting(font_hinting);
- FontDevanagari->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontDevanagariBold;
- FontDevanagariBold.instantiate();
- FontDevanagariBold->load_memory(_font_NotoSansDevanagariUI_Bold, _font_NotoSansDevanagariUI_Bold_size, "ttf", default_font_size);
- FontDevanagariBold->set_antialiased(font_antialiased);
- FontDevanagariBold->set_hinting(font_hinting);
- FontDevanagariBold->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontGeorgian;
- FontGeorgian.instantiate();
- FontGeorgian->load_memory(_font_NotoSansGeorgian_Regular, _font_NotoSansGeorgian_Regular_size, "ttf", default_font_size);
- FontGeorgian->set_antialiased(font_antialiased);
- FontGeorgian->set_hinting(font_hinting);
- FontGeorgian->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontGeorgianBold;
- FontGeorgianBold.instantiate();
- FontGeorgianBold->load_memory(_font_NotoSansGeorgian_Bold, _font_NotoSansGeorgian_Bold_size, "ttf", default_font_size);
- FontGeorgianBold->set_antialiased(font_antialiased);
- FontGeorgianBold->set_hinting(font_hinting);
- FontGeorgianBold->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontHebrew;
- FontHebrew.instantiate();
- FontHebrew->load_memory(_font_NotoSansHebrew_Regular, _font_NotoSansHebrew_Regular_size, "ttf", default_font_size);
- FontHebrew->set_antialiased(font_antialiased);
- FontHebrew->set_hinting(font_hinting);
- FontHebrew->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontHebrewBold;
- FontHebrewBold.instantiate();
- FontHebrewBold->load_memory(_font_NotoSansHebrew_Bold, _font_NotoSansHebrew_Bold_size, "ttf", default_font_size);
- FontHebrewBold->set_antialiased(font_antialiased);
- FontHebrewBold->set_hinting(font_hinting);
- FontHebrewBold->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontMalayalam;
- FontMalayalam.instantiate();
- FontMalayalam->load_memory(_font_NotoSansMalayalamUI_Regular, _font_NotoSansMalayalamUI_Regular_size, "ttf", default_font_size);
- FontMalayalam->set_antialiased(font_antialiased);
- FontMalayalam->set_hinting(font_hinting);
- FontMalayalam->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontMalayalamBold;
- FontMalayalamBold.instantiate();
- FontMalayalamBold->load_memory(_font_NotoSansMalayalamUI_Bold, _font_NotoSansMalayalamUI_Bold_size, "ttf", default_font_size);
- FontMalayalamBold->set_antialiased(font_antialiased);
- FontMalayalamBold->set_hinting(font_hinting);
- FontMalayalamBold->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontOriya;
- FontOriya.instantiate();
- FontOriya->load_memory(_font_NotoSansOriyaUI_Regular, _font_NotoSansOriyaUI_Regular_size, "ttf", default_font_size);
- FontOriya->set_antialiased(font_antialiased);
- FontOriya->set_hinting(font_hinting);
- FontOriya->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontOriyaBold;
- FontOriyaBold.instantiate();
- FontOriyaBold->load_memory(_font_NotoSansOriyaUI_Bold, _font_NotoSansOriyaUI_Bold_size, "ttf", default_font_size);
- FontOriyaBold->set_antialiased(font_antialiased);
- FontOriyaBold->set_hinting(font_hinting);
- FontOriyaBold->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontSinhala;
- FontSinhala.instantiate();
- FontSinhala->load_memory(_font_NotoSansSinhalaUI_Regular, _font_NotoSansSinhalaUI_Regular_size, "ttf", default_font_size);
- FontSinhala->set_antialiased(font_antialiased);
- FontSinhala->set_hinting(font_hinting);
- FontSinhala->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontSinhalaBold;
- FontSinhalaBold.instantiate();
- FontSinhalaBold->load_memory(_font_NotoSansSinhalaUI_Bold, _font_NotoSansSinhalaUI_Bold_size, "ttf", default_font_size);
- FontSinhalaBold->set_antialiased(font_antialiased);
- FontSinhalaBold->set_hinting(font_hinting);
- FontSinhalaBold->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontTamil;
- FontTamil.instantiate();
- FontTamil->load_memory(_font_NotoSansTamilUI_Regular, _font_NotoSansTamilUI_Regular_size, "ttf", default_font_size);
- FontTamil->set_antialiased(font_antialiased);
- FontTamil->set_hinting(font_hinting);
- FontTamil->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontTamilBold;
- FontTamilBold.instantiate();
- FontTamilBold->load_memory(_font_NotoSansTamilUI_Bold, _font_NotoSansTamilUI_Bold_size, "ttf", default_font_size);
- FontTamilBold->set_antialiased(font_antialiased);
- FontTamilBold->set_hinting(font_hinting);
- FontTamilBold->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontTelugu;
- FontTelugu.instantiate();
- FontTelugu->load_memory(_font_NotoSansTeluguUI_Regular, _font_NotoSansTeluguUI_Regular_size, "ttf", default_font_size);
- FontTelugu->set_antialiased(font_antialiased);
- FontTelugu->set_hinting(font_hinting);
- FontTelugu->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontTeluguBold;
- FontTeluguBold.instantiate();
- FontTeluguBold->load_memory(_font_NotoSansTeluguUI_Bold, _font_NotoSansTeluguUI_Bold_size, "ttf", default_font_size);
- FontTeluguBold->set_antialiased(font_antialiased);
- FontTeluguBold->set_hinting(font_hinting);
- FontTeluguBold->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontThai;
- FontThai.instantiate();
- FontThai->load_memory(_font_NotoSansThaiUI_Regular, _font_NotoSansThaiUI_Regular_size, "ttf", default_font_size);
- FontThai->set_antialiased(font_antialiased);
- FontThai->set_hinting(font_hinting);
- FontThai->set_force_autohinter(true); //just looks better..i think?
-
- Ref<FontData> FontThaiBold;
- FontThaiBold.instantiate();
- FontThaiBold->load_memory(_font_NotoSansThaiUI_Bold, _font_NotoSansThaiUI_Bold_size, "ttf", default_font_size);
- FontThaiBold->set_antialiased(font_antialiased);
- FontThaiBold->set_hinting(font_hinting);
- FontThaiBold->set_force_autohinter(true); //just looks better..i think?
-
- /* Droid Sans Fallback */
-
- Ref<FontData> FontFallback;
- FontFallback.instantiate();
- FontFallback->load_memory(_font_DroidSansFallback, _font_DroidSansFallback_size, "ttf", default_font_size);
- FontFallback->set_antialiased(font_antialiased);
- FontFallback->set_hinting(font_hinting);
- FontFallback->set_force_autohinter(true); //just looks better..i think?
-
- /* Droid Sans Japanese */
-
- Ref<FontData> FontJapanese;
- FontJapanese.instantiate();
- FontJapanese->load_memory(_font_DroidSansJapanese, _font_DroidSansJapanese_size, "ttf", default_font_size);
- FontJapanese->set_antialiased(font_antialiased);
- FontJapanese->set_hinting(font_hinting);
- FontJapanese->set_force_autohinter(true); //just looks better..i think?
+ /* Noto Sans */
+
+ Ref<FontData> DefaultFont = load_cached_internal_font(_font_NotoSans_Regular, _font_NotoSans_Regular_size, font_hinting, font_antialiased, true);
+ Ref<FontData> DefaultFontBold = load_cached_internal_font(_font_NotoSans_Bold, _font_NotoSans_Bold_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontArabic = load_cached_internal_font(_font_NotoNaskhArabicUI_Regular, _font_NotoNaskhArabicUI_Regular_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontArabicBold = load_cached_internal_font(_font_NotoNaskhArabicUI_Bold, _font_NotoNaskhArabicUI_Bold_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontBengali = load_cached_internal_font(_font_NotoSansBengaliUI_Regular, _font_NotoSansBengaliUI_Regular_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontBengaliBold = load_cached_internal_font(_font_NotoSansBengaliUI_Bold, _font_NotoSansBengaliUI_Bold_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontDevanagari = load_cached_internal_font(_font_NotoSansDevanagariUI_Regular, _font_NotoSansDevanagariUI_Regular_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontDevanagariBold = load_cached_internal_font(_font_NotoSansDevanagariUI_Bold, _font_NotoSansDevanagariUI_Bold_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontGeorgian = load_cached_internal_font(_font_NotoSansGeorgian_Regular, _font_NotoSansGeorgian_Regular_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontGeorgianBold = load_cached_internal_font(_font_NotoSansGeorgian_Bold, _font_NotoSansGeorgian_Bold_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontHebrew = load_cached_internal_font(_font_NotoSansHebrew_Regular, _font_NotoSansHebrew_Regular_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontHebrewBold = load_cached_internal_font(_font_NotoSansHebrew_Bold, _font_NotoSansHebrew_Bold_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontMalayalam = load_cached_internal_font(_font_NotoSansMalayalamUI_Regular, _font_NotoSansMalayalamUI_Regular_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontMalayalamBold = load_cached_internal_font(_font_NotoSansMalayalamUI_Bold, _font_NotoSansMalayalamUI_Bold_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontOriya = load_cached_internal_font(_font_NotoSansOriyaUI_Regular, _font_NotoSansOriyaUI_Regular_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontOriyaBold = load_cached_internal_font(_font_NotoSansOriyaUI_Bold, _font_NotoSansOriyaUI_Bold_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontSinhala = load_cached_internal_font(_font_NotoSansSinhalaUI_Regular, _font_NotoSansSinhalaUI_Regular_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontSinhalaBold = load_cached_internal_font(_font_NotoSansSinhalaUI_Bold, _font_NotoSansSinhalaUI_Bold_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontTamil = load_cached_internal_font(_font_NotoSansTamilUI_Regular, _font_NotoSansTamilUI_Regular_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontTamilBold = load_cached_internal_font(_font_NotoSansTamilUI_Bold, _font_NotoSansTamilUI_Bold_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontTelugu = load_cached_internal_font(_font_NotoSansTeluguUI_Regular, _font_NotoSansTeluguUI_Regular_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontTeluguBold = load_cached_internal_font(_font_NotoSansTeluguUI_Bold, _font_NotoSansTeluguUI_Bold_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontThai = load_cached_internal_font(_font_NotoSansThaiUI_Regular, _font_NotoSansThaiUI_Regular_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontThaiBold = load_cached_internal_font(_font_NotoSansThaiUI_Bold, _font_NotoSansThaiUI_Bold_size, font_hinting, font_antialiased, true);
+
+ /* Droid Sans */
+
+ Ref<FontData> FontFallback = load_cached_internal_font(_font_DroidSansFallback, _font_DroidSansFallback_size, font_hinting, font_antialiased, true);
+ Ref<FontData> FontJapanese = load_cached_internal_font(_font_DroidSansJapanese, _font_DroidSansJapanese_size, font_hinting, font_antialiased, true);
/* Hack */
- Ref<FontData> dfmono;
- dfmono.instantiate();
- dfmono->load_memory(_font_Hack_Regular, _font_Hack_Regular_size, "ttf", default_font_size);
- dfmono->set_antialiased(font_antialiased);
- dfmono->set_hinting(font_hinting);
-
- Vector<String> subtag = String(EditorSettings::get_singleton()->get("interface/editor/code_font_custom_variations")).split(",");
- Dictionary ftrs;
- for (int i = 0; i < subtag.size(); i++) {
- Vector<String> subtag_a = subtag[i].split("=");
- if (subtag_a.size() == 2) {
- dfmono->set_variation(subtag_a[0], subtag_a[1].to_float());
- }
- }
+ Ref<FontData> dfmono = load_cached_internal_font(_font_Hack_Regular, _font_Hack_Regular_size, font_hinting, font_antialiased, true);
// Default font
- MAKE_DEFAULT_FONT(df);
+ MAKE_DEFAULT_FONT(df, String(), default_font_size);
p_theme->set_default_theme_font(df); // Default theme font
p_theme->set_default_theme_font_size(default_font_size);
@@ -404,7 +283,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
p_theme->set_font("main", "EditorFonts", df);
// Bold font
- MAKE_BOLD_FONT(df_bold);
+ MAKE_BOLD_FONT(df_bold, String(), default_font_size);
p_theme->set_font_size("bold_size", "EditorFonts", default_font_size);
p_theme->set_font("bold", "EditorFonts", df_bold);
@@ -430,7 +309,8 @@ void editor_register_fonts(Ref<Theme> p_theme) {
p_theme->set_font_size("font_size", "HeaderLarge", default_font_size + 3 * EDSCALE);
// Documentation fonts
- MAKE_SOURCE_FONT(df_code);
+ String code_font_custom_variations = EditorSettings::get_singleton()->get("interface/editor/code_font_custom_variations");
+ MAKE_SOURCE_FONT(df_code, code_font_custom_variations, default_font_size);
p_theme->set_font_size("doc_size", "EditorFonts", int(EDITOR_GET("text_editor/help/help_font_size")) * EDSCALE);
p_theme->set_font("doc", "EditorFonts", df);
p_theme->set_font_size("doc_bold_size", "EditorFonts", int(EDITOR_GET("text_editor/help/help_font_size")) * EDSCALE);
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index f92b9ac8ba..fff9e5e908 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -30,6 +30,7 @@
#include "editor_help.h"
+#include "core/core_constants.h"
#include "core/input/input.h"
#include "core/os/keyboard.h"
#include "doc_data_compressed.gen.h"
@@ -116,7 +117,7 @@ void EditorHelp::_class_desc_select(const String &p_select) {
} else {
if (table->has(link)) {
// Found in the current page
- class_desc->scroll_to_line((*table)[link]);
+ class_desc->scroll_to_paragraph((*table)[link]);
} else {
if (topic == "class_enum") {
// Try to find the enum in @GlobalScope
@@ -170,7 +171,7 @@ void EditorHelp::_add_type(const String &p_type, const String &p_enum) {
if (t.is_empty()) {
t = "void";
}
- bool can_ref = (t != "void") || !p_enum.is_empty();
+ bool can_ref = (t != "void" && t.find("*") == -1) || !p_enum.is_empty();
if (!p_enum.is_empty()) {
if (p_enum.get_slice_count(".") > 1) {
@@ -479,7 +480,7 @@ void EditorHelp::_update_doc() {
}
class_desc->push_color(symbol_color);
- class_desc->append_bbcode("[url=" + link + "]" + linktxt + "[/url]");
+ class_desc->append_text("[url=" + link + "]" + linktxt + "[/url]");
class_desc->pop();
class_desc->add_newline();
}
@@ -632,8 +633,8 @@ void EditorHelp::_update_doc() {
continue;
}
}
- // Ignore undocumented private.
- if (cd.methods[i].name.begins_with("_") && cd.methods[i].description.is_empty()) {
+ // Ignore undocumented non virtual private.
+ if (cd.methods[i].name.begins_with("_") && cd.methods[i].description.is_empty() && cd.methods[i].qualifiers.find("virtual") == -1) {
continue;
}
methods.push_back(cd.methods[i]);
@@ -695,7 +696,7 @@ void EditorHelp::_update_doc() {
class_desc->pop(); //cell
}
- if (m[i].description != "") {
+ if (m[i].description != "" || m[i].errors_returned.size() > 0) {
method_descr = true;
}
@@ -1179,9 +1180,9 @@ void EditorHelp::_update_doc() {
class_desc->add_text(" ");
class_desc->push_color(comment_color);
if (cd.is_script_doc) {
- class_desc->append_bbcode(TTR("There is currently no description for this property."));
+ class_desc->append_text(TTR("There is currently no description for this property."));
} else {
- class_desc->append_bbcode(TTR("There is currently no description for this property. Please help us by [color=$color][url=$url]contributing one[/url][/color]!").replace("$url", CONTRIBUTE_URL).replace("$color", link_color_text));
+ class_desc->append_text(TTR("There is currently no description for this property. Please help us by [color=$color][url=$url]contributing one[/url][/color]!").replace("$url", CONTRIBUTE_URL).replace("$color", link_color_text));
}
class_desc->pop();
}
@@ -1227,6 +1228,31 @@ void EditorHelp::_update_doc() {
class_desc->push_color(text_color);
class_desc->push_font(doc_font);
class_desc->push_indent(1);
+ if (methods_filtered[i].errors_returned.size()) {
+ class_desc->append_text(TTR("Error codes returned:"));
+ class_desc->add_newline();
+ class_desc->push_list(0, RichTextLabel::LIST_DOTS, false);
+ for (int j = 0; j < methods_filtered[i].errors_returned.size(); j++) {
+ if (j > 0) {
+ class_desc->add_newline();
+ }
+ int val = methods_filtered[i].errors_returned[j];
+ String text = itos(val);
+ for (int k = 0; k < CoreConstants::get_global_constant_count(); k++) {
+ if (CoreConstants::get_global_constant_value(k) == val && CoreConstants::get_global_constant_enum(k) == SNAME("Error")) {
+ text = CoreConstants::get_global_constant_name(k);
+ break;
+ }
+ }
+
+ class_desc->push_bold();
+ class_desc->append_text(text);
+ class_desc->pop();
+ }
+ class_desc->pop();
+ class_desc->add_newline();
+ class_desc->add_newline();
+ }
if (!methods_filtered[i].description.strip_edges().is_empty()) {
_add_text(DTR(methods_filtered[i].description));
} else {
@@ -1234,9 +1260,9 @@ void EditorHelp::_update_doc() {
class_desc->add_text(" ");
class_desc->push_color(comment_color);
if (cd.is_script_doc) {
- class_desc->append_bbcode(TTR("There is currently no description for this method."));
+ class_desc->append_text(TTR("There is currently no description for this method."));
} else {
- class_desc->append_bbcode(TTR("There is currently no description for this method. Please help us by [color=$color][url=$url]contributing one[/url][/color]!").replace("$url", CONTRIBUTE_URL).replace("$color", link_color_text));
+ class_desc->append_text(TTR("There is currently no description for this method. Please help us by [color=$color][url=$url]contributing one[/url][/color]!").replace("$url", CONTRIBUTE_URL).replace("$color", link_color_text));
}
class_desc->pop();
}
@@ -1302,6 +1328,8 @@ void EditorHelp::_help_callback(const String &p_topic) {
} else if (what == "class_global") {
if (constant_line.has(name)) {
line = constant_line[name];
+ } else if (method_line.has(name)) {
+ line = method_line[name];
} else {
Map<String, Map<String, int>>::Element *iter = enum_values_line.front();
while (true) {
@@ -1317,7 +1345,7 @@ void EditorHelp::_help_callback(const String &p_topic) {
}
}
- class_desc->call_deferred(SNAME("scroll_to_line"), line);
+ class_desc->call_deferred(SNAME("scroll_to_paragraph"), line);
}
static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
@@ -1584,6 +1612,11 @@ void EditorHelp::generate_doc() {
doc->merge_from(compdoc); //ensure all is up to date
}
+void EditorHelp::_toggle_scripts_pressed() {
+ ScriptEditor::get_singleton()->toggle_scripts_panel();
+ update_toggle_scripts_button();
+}
+
void EditorHelp::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY:
@@ -1594,7 +1627,11 @@ void EditorHelp::_notification(int p_what) {
if (is_inside_tree()) {
_class_desc_resized();
}
+ update_toggle_scripts_button();
} break;
+ case NOTIFICATION_VISIBILITY_CHANGED:
+ update_toggle_scripts_button();
+ break;
default:
break;
}
@@ -1625,7 +1662,7 @@ Vector<Pair<String, int>> EditorHelp::get_sections() {
void EditorHelp::scroll_to_section(int p_section_index) {
int line = section_line[p_section_index].second;
- class_desc->scroll_to_line(line);
+ class_desc->scroll_to_paragraph(line);
}
void EditorHelp::popup_search() {
@@ -1648,6 +1685,15 @@ void EditorHelp::set_scroll(int p_scroll) {
class_desc->get_v_scroll()->set_value(p_scroll);
}
+void EditorHelp::update_toggle_scripts_button() {
+ if (is_layout_rtl()) {
+ toggle_scripts_button->set_icon(get_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Forward") : SNAME("Back"), SNAME("EditorIcons")));
+ } else {
+ toggle_scripts_button->set_icon(get_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Back") : SNAME("Forward"), SNAME("EditorIcons")));
+ }
+ toggle_scripts_button->set_tooltip(vformat("%s (%s)", TTR("Toggle Scripts Panel"), ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text()));
+}
+
void EditorHelp::_bind_methods() {
ClassDB::bind_method("_class_list_select", &EditorHelp::_class_list_select);
ClassDB::bind_method("_request_help", &EditorHelp::_request_help);
@@ -1678,6 +1724,16 @@ EditorHelp::EditorHelp() {
find_bar->hide();
find_bar->set_rich_text_label(class_desc);
+ status_bar = memnew(HBoxContainer);
+ add_child(status_bar);
+ status_bar->set_h_size_flags(SIZE_EXPAND_FILL);
+ status_bar->set_custom_minimum_size(Size2(0, 24 * EDSCALE));
+
+ toggle_scripts_button = memnew(Button);
+ toggle_scripts_button->set_flat(true);
+ toggle_scripts_button->connect("pressed", callable_mp(this, &EditorHelp::_toggle_scripts_pressed));
+ status_bar->add_child(toggle_scripts_button);
+
class_desc->set_selection_enabled(true);
scroll_locked = false;
@@ -1825,8 +1881,6 @@ void FindBar::_notification(int p_what) {
}
void FindBar::_bind_methods() {
- ClassDB::bind_method("_unhandled_input", &FindBar::_unhandled_input);
-
ADD_SIGNAL(MethodInfo("search"));
}
@@ -1902,7 +1956,7 @@ void FindBar::_hide_bar() {
hide();
}
-void FindBar::_unhandled_input(const Ref<InputEvent> &p_event) {
+void FindBar::unhandled_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventKey> k = p_event;
diff --git a/editor/editor_help.h b/editor/editor_help.h
index 69bb72c52d..7a45b1abc1 100644
--- a/editor/editor_help.h
+++ b/editor/editor_help.h
@@ -70,7 +70,7 @@ class FindBar : public HBoxContainer {
protected:
void _notification(int p_what);
- void _unhandled_input(const Ref<InputEvent> &p_event);
+ virtual void unhandled_input(const Ref<InputEvent> &p_event) override;
bool _search(bool p_search_previous = false);
@@ -123,6 +123,8 @@ class EditorHelp : public VBoxContainer {
ConfirmationDialog *search_dialog;
LineEdit *search;
FindBar *find_bar;
+ HBoxContainer *status_bar;
+ Button *toggle_scripts_button;
String base_path;
@@ -159,6 +161,7 @@ class EditorHelp : public VBoxContainer {
void _search(bool p_search_previous = false);
String _fix_constant(const String &p_constant) const;
+ void _toggle_scripts_pressed();
protected:
void _notification(int p_what);
@@ -185,6 +188,8 @@ public:
int get_scroll() const;
void set_scroll(int p_scroll);
+ void update_toggle_scripts_button();
+
EditorHelp();
~EditorHelp();
};
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index 2b5eee4c1f..e56b10720d 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -71,7 +71,7 @@ void EditorHelpSearch::_search_box_gui_input(const Ref<InputEvent> &p_event) {
case KEY_DOWN:
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
- results_tree->call("_gui_input", key);
+ results_tree->gui_input(key);
search_box->accept_event();
} break;
default:
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 9de8b0451a..4832cd6994 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -31,11 +31,13 @@
#include "editor_inspector.h"
#include "array_property_edit.h"
+#include "core/os/keyboard.h"
#include "dictionary_property_edit.h"
#include "editor/doc_tools.h"
#include "editor_feature_profile.h"
#include "editor_node.h"
#include "editor_scale.h"
+#include "editor_settings.h"
#include "multi_node_edit.h"
#include "scene/resources/packed_scene.h"
@@ -244,9 +246,9 @@ void EditorProperty::_notification(int p_what) {
Color color;
if (draw_red) {
- color = get_theme_color(SNAME("error_color"));
+ color = get_theme_color(is_read_only() ? SNAME("readonly_error_color") : SNAME("error_color"));
} else {
- color = get_theme_color(SNAME("property_color"));
+ color = get_theme_color(is_read_only() ? SNAME("readonly_color") : SNAME("property_color"));
}
if (label.find(".") != -1) {
color.a = 0.5; //this should be un-hacked honestly, as it's used for editor overrides
@@ -281,7 +283,7 @@ void EditorProperty::_notification(int p_what) {
check_rect = Rect2();
}
- if (can_revert) {
+ if (can_revert && !is_read_only()) {
Ref<Texture2D> reload_icon = get_theme_icon(SNAME("ReloadSmall"), SNAME("EditorIcons"));
text_limit -= reload_icon->get_width() + get_theme_constant(SNAME("hseparator"), SNAME("Tree")) * 2;
revert_rect = Rect2(text_limit + get_theme_constant(SNAME("hseparator"), SNAME("Tree")), (size.height - reload_icon->get_height()) / 2, reload_icon->get_width(), reload_icon->get_height());
@@ -379,13 +381,15 @@ StringName EditorProperty::get_edited_property() {
}
void EditorProperty::update_property() {
- if (get_script_instance()) {
- get_script_instance()->call("_update_property");
- }
+ GDVIRTUAL_CALL(_update_property);
+}
+
+void EditorProperty::_set_read_only(bool p_read_only) {
}
void EditorProperty::set_read_only(bool p_read_only) {
read_only = p_read_only;
+ _set_read_only(p_read_only);
}
bool EditorProperty::is_read_only() const {
@@ -694,7 +698,7 @@ bool EditorProperty::is_selected() const {
return selected;
}
-void EditorProperty::_gui_input(const Ref<InputEvent> &p_event) {
+void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (property == StringName()) {
@@ -766,7 +770,7 @@ void EditorProperty::_gui_input(const Ref<InputEvent> &p_event) {
call_deferred(SNAME("emit_changed"), property, object->get(property).operator int64_t() + 1, "", false);
}
- call_deferred(SNAME("_update_property"));
+ call_deferred(SNAME("update_property"));
}
}
if (delete_rect.has_point(mpos)) {
@@ -784,9 +788,50 @@ void EditorProperty::_gui_input(const Ref<InputEvent> &p_event) {
update();
emit_signal(SNAME("property_checked"), property, checked);
}
+ } else if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_RIGHT) {
+ _ensure_popup();
+ menu->set_position(get_screen_position() + get_local_mouse_position());
+ menu->set_size(Vector2(1, 1));
+ menu->popup();
+ select();
+ return;
+ }
+}
+
+void EditorProperty::unhandled_key_input(const Ref<InputEvent> &p_event) {
+ if (!selected || !p_event->is_pressed()) {
+ return;
+ }
+
+ const Ref<InputEventKey> k = p_event;
+
+ if (k.is_valid() && k->is_pressed()) {
+ if (ED_IS_SHORTCUT("property_editor/copy_property", p_event)) {
+ menu_option(MENU_COPY_PROPERTY);
+ accept_event();
+ } else if (ED_IS_SHORTCUT("property_editor/paste_property", p_event) && !is_read_only()) {
+ menu_option(MENU_PASTE_PROPERTY);
+ accept_event();
+ } else if (ED_IS_SHORTCUT("property_editor/copy_property_path", p_event)) {
+ menu_option(MENU_COPY_PROPERTY_PATH);
+ accept_event();
+ }
}
}
+const Color *EditorProperty::_get_property_colors() {
+ const Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ const float saturation = base.get_s() * 0.75;
+ const float value = base.get_v();
+
+ static Color c[4];
+ c[0].set_hsv(0.0 / 3.0 + 0.05, saturation, value);
+ c[1].set_hsv(1.0 / 3.0 + 0.05, saturation, value);
+ c[2].set_hsv(2.0 / 3.0 + 0.05, saturation, value);
+ c[3].set_hsv(1.5 / 3.0 + 0.05, saturation, value);
+ return c;
+}
+
void EditorProperty::set_label_reference(Control *p_control) {
label_reference = p_control;
}
@@ -897,6 +942,20 @@ String EditorProperty::get_tooltip_text() const {
return tooltip_text;
}
+void EditorProperty::menu_option(int p_option) {
+ switch (p_option) {
+ case MENU_COPY_PROPERTY: {
+ EditorNode::get_singleton()->get_inspector()->set_property_clipboard(object->get(property));
+ } break;
+ case MENU_PASTE_PROPERTY: {
+ emit_changed(property, EditorNode::get_singleton()->get_inspector()->get_property_clipboard());
+ } break;
+ case MENU_COPY_PROPERTY_PATH: {
+ DisplayServer::get_singleton()->clipboard_set(property);
+ } break;
+ }
+}
+
void EditorProperty::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_label", "text"), &EditorProperty::set_label);
ClassDB::bind_method(D_METHOD("get_label"), &EditorProperty::get_label);
@@ -922,9 +981,8 @@ void EditorProperty::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_edited_property"), &EditorProperty::get_edited_property);
ClassDB::bind_method(D_METHOD("get_edited_object"), &EditorProperty::get_edited_object);
- ClassDB::bind_method(D_METHOD("_gui_input"), &EditorProperty::_gui_input);
-
ClassDB::bind_method(D_METHOD("get_tooltip_text"), &EditorProperty::get_tooltip_text);
+ ClassDB::bind_method(D_METHOD("update_property"), &EditorProperty::update_property);
ClassDB::bind_method(D_METHOD("add_focusable", "control"), &EditorProperty::add_focusable);
ClassDB::bind_method(D_METHOD("set_bottom_editor", "editor"), &EditorProperty::set_bottom_editor);
@@ -948,7 +1006,7 @@ void EditorProperty::_bind_methods() {
ADD_SIGNAL(MethodInfo("object_id_selected", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::INT, "id")));
ADD_SIGNAL(MethodInfo("selected", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "focusable_idx")));
- BIND_VMETHOD(MethodInfo("_update_property"));
+ GDVIRTUAL_BIND(_update_property)
}
EditorProperty::EditorProperty() {
@@ -974,6 +1032,21 @@ EditorProperty::EditorProperty() {
label_reference = nullptr;
bottom_editor = nullptr;
delete_hover = false;
+ menu = nullptr;
+ set_process_unhandled_key_input(true);
+}
+
+void EditorProperty::_ensure_popup() {
+ if (menu) {
+ return;
+ }
+ menu = memnew(PopupMenu);
+ menu->add_shortcut(ED_GET_SHORTCUT("property_editor/copy_property"), MENU_COPY_PROPERTY);
+ menu->add_shortcut(ED_GET_SHORTCUT("property_editor/paste_property"), MENU_PASTE_PROPERTY);
+ menu->add_shortcut(ED_GET_SHORTCUT("property_editor/copy_property_path"), MENU_COPY_PROPERTY_PATH);
+ menu->connect("id_pressed", callable_mp(this, &EditorProperty::menu_option));
+ menu->set_item_disabled(MENU_PASTE_PROPERTY, is_read_only());
+ add_child(menu);
}
////////////////////////////////////////////////
@@ -1003,43 +1076,31 @@ void EditorInspectorPlugin::add_property_editor_for_multiple_properties(const St
}
bool EditorInspectorPlugin::can_handle(Object *p_object) {
- if (get_script_instance()) {
- return get_script_instance()->call("_can_handle", p_object);
+ bool success;
+ if (GDVIRTUAL_CALL(_can_handle, p_object, success)) {
+ return success;
}
return false;
}
void EditorInspectorPlugin::parse_begin(Object *p_object) {
- if (get_script_instance()) {
- get_script_instance()->call("_parse_begin", p_object);
- }
+ GDVIRTUAL_CALL(_parse_begin);
}
void EditorInspectorPlugin::parse_category(Object *p_object, const String &p_parse_category) {
- if (get_script_instance()) {
- get_script_instance()->call("_parse_category", p_object, p_parse_category);
- }
+ GDVIRTUAL_CALL(_parse_category, p_object, p_parse_category);
}
bool EditorInspectorPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
- if (get_script_instance()) {
- Variant arg[6] = {
- p_object, p_type, p_path, p_hint, p_hint_text, p_usage
- };
- const Variant *argptr[6] = {
- &arg[0], &arg[1], &arg[2], &arg[3], &arg[4], &arg[5]
- };
-
- Callable::CallError err;
- return get_script_instance()->call("_parse_property", (const Variant **)&argptr, 6, err);
+ bool ret;
+ if (GDVIRTUAL_CALL(_parse_property, p_object, p_type, p_path, p_hint, p_hint_text, p_usage, p_wide, ret)) {
+ return ret;
}
return false;
}
void EditorInspectorPlugin::parse_end() {
- if (get_script_instance()) {
- get_script_instance()->call("_parse_end");
- }
+ GDVIRTUAL_CALL(_parse_end);
}
void EditorInspectorPlugin::_bind_methods() {
@@ -1047,11 +1108,11 @@ void EditorInspectorPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_property_editor", "property", "editor"), &EditorInspectorPlugin::add_property_editor);
ClassDB::bind_method(D_METHOD("add_property_editor_for_multiple_properties", "label", "properties", "editor"), &EditorInspectorPlugin::add_property_editor_for_multiple_properties);
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_can_handle", PropertyInfo(Variant::OBJECT, "object")));
- BIND_VMETHOD(MethodInfo(Variant::NIL, "_parse_begin"));
- BIND_VMETHOD(MethodInfo(Variant::NIL, "_parse_category", PropertyInfo(Variant::STRING, "category")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_parse_property", PropertyInfo(Variant::INT, "type"), PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "hint"), PropertyInfo(Variant::STRING, "hint_text"), PropertyInfo(Variant::INT, "usage")));
- BIND_VMETHOD(MethodInfo(Variant::NIL, "_parse_end"));
+ GDVIRTUAL_BIND(_can_handle, "object")
+ GDVIRTUAL_BIND(_parse_begin)
+ GDVIRTUAL_BIND(_parse_category, "object", "category")
+ GDVIRTUAL_BIND(_parse_property, "object", "type", "name", "hint_type", "hint_string", "usage_flags", "wide");
+ GDVIRTUAL_BIND(_parse_end)
}
////////////////////////////////////////////////
@@ -1140,147 +1201,150 @@ EditorInspectorCategory::EditorInspectorCategory() {
void EditorInspectorSection::_test_unfold() {
if (!vbox_added) {
add_child(vbox);
+ move_child(vbox, 0);
vbox_added = true;
}
}
void EditorInspectorSection::_notification(int p_what) {
- if (p_what == NOTIFICATION_SORT_CHILDREN) {
- Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
- int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
-
- Ref<Texture2D> arrow;
-
- if (foldable) {
- if (object->editor_is_section_unfolded(section)) {
- arrow = get_theme_icon(SNAME("arrow"), SNAME("Tree"));
- } else {
- if (is_layout_rtl()) {
- arrow = get_theme_icon(SNAME("arrow_collapsed_mirrored"), SNAME("Tree"));
+ switch (p_what) {
+ case NOTIFICATION_THEME_CHANGED: {
+ minimum_size_changed();
+ } break;
+ case NOTIFICATION_SORT_CHILDREN: {
+ if (!vbox_added) {
+ return;
+ }
+ // Get the section header font.
+ Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
+ int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
+
+ // Get the right direction arrow texture, if the section is foldable.
+ Ref<Texture2D> arrow;
+ if (foldable) {
+ if (object->editor_is_section_unfolded(section)) {
+ arrow = get_theme_icon(SNAME("arrow"), SNAME("Tree"));
} else {
- arrow = get_theme_icon(SNAME("arrow_collapsed"), SNAME("Tree"));
+ if (is_layout_rtl()) {
+ arrow = get_theme_icon(SNAME("arrow_collapsed_mirrored"), SNAME("Tree"));
+ } else {
+ arrow = get_theme_icon(SNAME("arrow_collapsed"), SNAME("Tree"));
+ }
}
}
- }
-
- Size2 size = get_size();
- Point2 offset;
- Rect2 rect;
- offset.y = font->get_height(font_size);
- if (arrow.is_valid()) {
- offset.y = MAX(offset.y, arrow->get_height());
- }
- offset.y += get_theme_constant(SNAME("vseparation"), SNAME("Tree"));
- if (is_layout_rtl()) {
- rect = Rect2(offset, size - offset - Vector2(get_theme_constant(SNAME("inspector_margin"), SNAME("Editor")), 0));
- } else {
- offset.x += get_theme_constant(SNAME("inspector_margin"), SNAME("Editor"));
- rect = Rect2(offset, size - offset);
- }
-
- //set children
- for (int i = 0; i < get_child_count(); i++) {
- Control *c = Object::cast_to<Control>(get_child(i));
- if (!c) {
- continue;
- }
- if (c->is_set_as_top_level()) {
- continue;
+ // Compute the height of the section header.
+ int header_height = font->get_height(font_size);
+ if (arrow.is_valid()) {
+ header_height = MAX(header_height, arrow->get_height());
}
- if (!c->is_visible_in_tree()) {
- continue;
- }
-
- fit_child_in_rect(c, rect);
- }
+ header_height += get_theme_constant(SNAME("vseparation"), SNAME("Tree"));
- update(); //need to redraw text
- }
+ int inspector_margin = get_theme_constant(SNAME("inspector_margin"), SNAME("Editor"));
+ Size2 size = get_size() - Vector2(inspector_margin, 0);
+ Vector2 offset = Vector2(is_layout_rtl() ? 0 : inspector_margin, header_height);
+ for (int i = 0; i < get_child_count(); i++) {
+ Control *c = Object::cast_to<Control>(get_child(i));
+ if (!c) {
+ continue;
+ }
+ if (c->is_set_as_top_level()) {
+ continue;
+ }
- if (p_what == NOTIFICATION_DRAW) {
- Ref<Texture2D> arrow;
- bool rtl = is_layout_rtl();
+ fit_child_in_rect(c, Rect2(offset, size));
+ }
+ } break;
+ case NOTIFICATION_DRAW: {
+ // Get the section header font.
+ Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
+ int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
- if (foldable) {
- if (object->editor_is_section_unfolded(section)) {
- arrow = get_theme_icon(SNAME("arrow"), SNAME("Tree"));
- } else {
- if (is_layout_rtl()) {
- arrow = get_theme_icon(SNAME("arrow_collapsed_mirrored"), SNAME("Tree"));
+ // Get the right direction arrow texture, if the section is foldable.
+ Ref<Texture2D> arrow;
+ if (foldable) {
+ if (object->editor_is_section_unfolded(section)) {
+ arrow = get_theme_icon(SNAME("arrow"), SNAME("Tree"));
} else {
- arrow = get_theme_icon(SNAME("arrow_collapsed"), SNAME("Tree"));
+ if (is_layout_rtl()) {
+ arrow = get_theme_icon(SNAME("arrow_collapsed_mirrored"), SNAME("Tree"));
+ } else {
+ arrow = get_theme_icon(SNAME("arrow_collapsed"), SNAME("Tree"));
+ }
}
}
- }
-
- Ref<Font> font = get_theme_font(SNAME("bold"), SNAME("EditorFonts"));
- int font_size = get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts"));
-
- int h = font->get_height(font_size);
- if (arrow.is_valid()) {
- h = MAX(h, arrow->get_height());
- }
- h += get_theme_constant(SNAME("vseparation"), SNAME("Tree"));
-
- Color c = bg_color;
- c.a *= 0.4;
- draw_rect(Rect2(Vector2(), Vector2(get_size().width, h)), c);
- const int arrow_margin = 2;
- const int arrow_width = arrow.is_valid() ? arrow->get_width() : 0;
- Color color = get_theme_color(SNAME("font_color"));
- float text_width = get_size().width - Math::round(arrow_width + arrow_margin * EDSCALE);
- draw_string(font, Point2(rtl ? 0 : Math::round(arrow_width + arrow_margin * EDSCALE), font->get_ascent(font_size) + (h - font->get_height(font_size)) / 2).floor(), label, rtl ? HALIGN_RIGHT : HALIGN_LEFT, text_width, font_size, color);
+ bool rtl = is_layout_rtl();
- if (arrow.is_valid()) {
- if (rtl) {
- draw_texture(arrow, Point2(get_size().width - arrow->get_width() - Math::round(arrow_margin * EDSCALE), (h - arrow->get_height()) / 2).floor());
- } else {
- draw_texture(arrow, Point2(Math::round(arrow_margin * EDSCALE), (h - arrow->get_height()) / 2).floor());
+ // Compute the height of the section header.
+ int header_height = font->get_height(font_size);
+ if (arrow.is_valid()) {
+ header_height = MAX(header_height, arrow->get_height());
}
- }
+ header_height += get_theme_constant(SNAME("vseparation"), SNAME("Tree"));
- if (dropping && !vbox->is_visible_in_tree()) {
- Color accent_color = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
- draw_rect(Rect2(Point2(), get_size()), accent_color, false);
- }
- }
+ Rect2 header_rect = Rect2(Vector2(), Vector2(get_size().width, header_height));
+ Color c = bg_color;
+ c.a *= 0.4;
+ if (foldable && header_rect.has_point(get_local_mouse_position())) {
+ c = c.lightened(Input::get_singleton()->is_mouse_button_pressed(MOUSE_BUTTON_LEFT) ? -0.05 : 0.2);
+ }
+ draw_rect(header_rect, c);
- if (p_what == NOTIFICATION_DRAG_BEGIN) {
- Dictionary dd = get_viewport()->gui_get_drag_data();
+ const int arrow_margin = 2;
+ const int arrow_width = arrow.is_valid() ? arrow->get_width() : 0;
+ Color color = get_theme_color(SNAME("font_color"));
+ float text_width = get_size().width - Math::round(arrow_width + arrow_margin * EDSCALE);
+ draw_string(font, Point2(rtl ? 0 : Math::round(arrow_width + arrow_margin * EDSCALE), font->get_ascent(font_size) + (header_height - font->get_height(font_size)) / 2).floor(), label, rtl ? HALIGN_RIGHT : HALIGN_LEFT, text_width, font_size, color);
- // Only allow dropping if the section contains properties which can take the dragged data.
- bool children_can_drop = false;
- for (int child_idx = 0; child_idx < vbox->get_child_count(); child_idx++) {
- Control *editor_property = Object::cast_to<Control>(vbox->get_child(child_idx));
+ if (arrow.is_valid()) {
+ if (rtl) {
+ draw_texture(arrow, Point2(get_size().width - arrow->get_width() - Math::round(arrow_margin * EDSCALE), (header_height - arrow->get_height()) / 2).floor());
+ } else {
+ draw_texture(arrow, Point2(Math::round(arrow_margin * EDSCALE), (header_height - arrow->get_height()) / 2).floor());
+ }
+ }
- // Test can_drop_data and can_drop_data_fw, since can_drop_data only works if set up with forwarding or if script attached.
- if (editor_property && (editor_property->can_drop_data(Point2(), dd) || editor_property->call("_can_drop_data_fw", Point2(), dd, this))) {
- children_can_drop = true;
- break;
+ if (dropping && !vbox->is_visible_in_tree()) {
+ Color accent_color = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ draw_rect(Rect2(Point2(), get_size()), accent_color, false);
}
- }
+ } break;
+ case NOTIFICATION_DRAG_BEGIN: {
+ Dictionary dd = get_viewport()->gui_get_drag_data();
- dropping = children_can_drop;
- update();
- }
+ // Only allow dropping if the section contains properties which can take the dragged data.
+ bool children_can_drop = false;
+ for (int child_idx = 0; child_idx < vbox->get_child_count(); child_idx++) {
+ Control *editor_property = Object::cast_to<Control>(vbox->get_child(child_idx));
- if (p_what == NOTIFICATION_DRAG_END) {
- dropping = false;
- update();
- }
+ // Test can_drop_data and can_drop_data_fw, since can_drop_data only works if set up with forwarding or if script attached.
+ if (editor_property && (editor_property->can_drop_data(Point2(), dd) || editor_property->call("_can_drop_data_fw", Point2(), dd, this))) {
+ children_can_drop = true;
+ break;
+ }
+ }
- if (p_what == NOTIFICATION_MOUSE_ENTER) {
- if (dropping) {
- dropping_unfold_timer->start();
- }
- }
+ dropping = children_can_drop;
+ update();
+ } break;
+ case NOTIFICATION_DRAG_END: {
+ dropping = false;
+ update();
+ } break;
+ case NOTIFICATION_MOUSE_ENTER: {
+ if (dropping) {
+ dropping_unfold_timer->start();
+ }
+ update();
+ } break;
- if (p_what == NOTIFICATION_MOUSE_EXIT) {
- if (dropping) {
- dropping_unfold_timer->stop();
- }
+ case NOTIFICATION_MOUSE_EXIT: {
+ if (dropping) {
+ dropping_unfold_timer->stop();
+ }
+ update();
+ } break;
}
}
@@ -1319,6 +1383,7 @@ void EditorInspectorSection::setup(const String &p_section, const String &p_labe
if (!foldable && !vbox_added) {
add_child(vbox);
+ move_child(vbox, 0);
vbox_added = true;
}
@@ -1332,7 +1397,7 @@ void EditorInspectorSection::setup(const String &p_section, const String &p_labe
}
}
-void EditorInspectorSection::_gui_input(const Ref<InputEvent> &p_event) {
+void EditorInspectorSection::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (!foldable) {
@@ -1353,6 +1418,8 @@ void EditorInspectorSection::_gui_input(const Ref<InputEvent> &p_event) {
} else {
fold();
}
+ } else if (mb.is_valid() && !mb->is_pressed()) {
+ update();
}
}
@@ -1378,7 +1445,7 @@ void EditorInspectorSection::fold() {
}
if (!vbox_added) {
- return; //kinda pointless
+ return;
}
object->editor_set_section_unfold(section, false);
@@ -1391,7 +1458,6 @@ void EditorInspectorSection::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_vbox"), &EditorInspectorSection::get_vbox);
ClassDB::bind_method(D_METHOD("unfold"), &EditorInspectorSection::unfold);
ClassDB::bind_method(D_METHOD("fold"), &EditorInspectorSection::fold);
- ClassDB::bind_method(D_METHOD("_gui_input"), &EditorInspectorSection::_gui_input);
}
EditorInspectorSection::EditorInspectorSection() {
@@ -1416,6 +1482,732 @@ EditorInspectorSection::~EditorInspectorSection() {
////////////////////////////////////////////////
////////////////////////////////////////////////
+int EditorInspectorArray::_get_array_count() {
+ if (mode == MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION) {
+ List<PropertyInfo> object_property_list;
+ object->get_property_list(&object_property_list);
+ return _extract_properties_as_array(object_property_list).size();
+ } else if (mode == MODE_USE_COUNT_PROPERTY) {
+ bool valid;
+ int count = object->get(count_property, &valid);
+ ERR_FAIL_COND_V_MSG(!valid, 0, vformat("%s is not a valid property to be used as array count.", count_property));
+ return count;
+ }
+ return 0;
+}
+
+void EditorInspectorArray::_add_button_pressed() {
+ _move_element(-1, -1);
+}
+
+void EditorInspectorArray::_first_page_button_pressed() {
+ emit_signal("page_change_request", 0);
+}
+
+void EditorInspectorArray::_prev_page_button_pressed() {
+ emit_signal("page_change_request", MAX(0, page - 1));
+}
+
+void EditorInspectorArray::_page_line_edit_text_submitted(String p_text) {
+ if (p_text.is_valid_int()) {
+ int new_page = p_text.to_int() - 1;
+ new_page = MIN(MAX(0, new_page), max_page);
+ page_line_edit->set_text(Variant(new_page));
+ emit_signal("page_change_request", new_page);
+ } else {
+ page_line_edit->set_text(Variant(page));
+ }
+}
+
+void EditorInspectorArray::_next_page_button_pressed() {
+ emit_signal("page_change_request", MIN(max_page, page + 1));
+}
+
+void EditorInspectorArray::_last_page_button_pressed() {
+ emit_signal("page_change_request", max_page);
+}
+
+void EditorInspectorArray::_rmb_popup_id_pressed(int p_id) {
+ switch (p_id) {
+ case OPTION_MOVE_UP:
+ if (popup_array_index_pressed > 0) {
+ _move_element(popup_array_index_pressed, popup_array_index_pressed - 1);
+ }
+ break;
+ case OPTION_MOVE_DOWN:
+ if (popup_array_index_pressed < count - 1) {
+ _move_element(popup_array_index_pressed, popup_array_index_pressed + 2);
+ }
+ break;
+ case OPTION_NEW_BEFORE:
+ _move_element(-1, popup_array_index_pressed);
+ break;
+ case OPTION_NEW_AFTER:
+ _move_element(-1, popup_array_index_pressed + 1);
+ break;
+ case OPTION_REMOVE:
+ _move_element(popup_array_index_pressed, -1);
+ break;
+ case OPTION_CLEAR_ARRAY:
+ _clear_array();
+ break;
+ case OPTION_RESIZE_ARRAY:
+ new_size = count;
+ new_size_line_edit->set_text(Variant(new_size));
+ resize_dialog->get_ok_button()->set_disabled(true);
+ resize_dialog->popup_centered();
+ new_size_line_edit->grab_focus();
+ new_size_line_edit->select_all();
+ break;
+ default:
+ break;
+ }
+}
+
+void EditorInspectorArray::_control_dropping_draw() {
+ int drop_position = _drop_position();
+
+ if (dropping && drop_position >= 0) {
+ Vector2 from;
+ Vector2 to;
+ if (drop_position < elements_vbox->get_child_count()) {
+ Transform2D xform = Object::cast_to<Control>(elements_vbox->get_child(drop_position))->get_transform();
+ from = xform.xform(Vector2());
+ to = xform.xform(Vector2(elements_vbox->get_size().x, 0));
+ } else {
+ Control *child = Object::cast_to<Control>(elements_vbox->get_child(drop_position - 1));
+ Transform2D xform = child->get_transform();
+ from = xform.xform(Vector2(0, child->get_size().y));
+ to = xform.xform(Vector2(elements_vbox->get_size().x, child->get_size().y));
+ }
+ Color color = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ control_dropping->draw_line(from, to, color, 2);
+ }
+}
+
+void EditorInspectorArray::_vbox_visibility_changed() {
+ control_dropping->set_visible(vbox->is_visible_in_tree());
+}
+
+void EditorInspectorArray::_panel_draw(int p_index) {
+ ERR_FAIL_INDEX(p_index, (int)array_elements.size());
+
+ Ref<StyleBox> style = get_theme_stylebox("Focus", "EditorStyles");
+ if (!style.is_valid()) {
+ return;
+ }
+ if (array_elements[p_index].panel->has_focus()) {
+ array_elements[p_index].panel->draw_style_box(style, Rect2(Vector2(), array_elements[p_index].panel->get_size()));
+ }
+}
+
+void EditorInspectorArray::_panel_gui_input(Ref<InputEvent> p_event, int p_index) {
+ ERR_FAIL_INDEX(p_index, (int)array_elements.size());
+
+ Ref<InputEventKey> key_ref = p_event;
+ if (key_ref.is_valid()) {
+ const InputEventKey &key = **key_ref;
+
+ if (array_elements[p_index].panel->has_focus() && key.is_pressed() && key.get_keycode() == KEY_DELETE) {
+ _move_element(begin_array_index + p_index, -1);
+ array_elements[p_index].panel->accept_event();
+ }
+ }
+
+ Ref<InputEventMouseButton> mb = p_event;
+ if (mb.is_valid()) {
+ if (mb->get_button_index() == MOUSE_BUTTON_RIGHT) {
+ popup_array_index_pressed = begin_array_index + p_index;
+ rmb_popup->set_item_disabled(OPTION_MOVE_UP, popup_array_index_pressed == 0);
+ rmb_popup->set_item_disabled(OPTION_MOVE_DOWN, popup_array_index_pressed == count - 1);
+ rmb_popup->set_position(mb->get_global_position());
+ rmb_popup->set_size(Vector2());
+ rmb_popup->popup();
+ }
+ }
+}
+
+void EditorInspectorArray::_move_element(int p_element_index, int p_to_pos) {
+ String action_name;
+ if (p_element_index < 0) {
+ action_name = vformat("Add element to property array with prefix %s.", array_element_prefix);
+ } else if (p_to_pos < 0) {
+ action_name = vformat("Remove element %d from property array with prefix %s.", p_element_index, array_element_prefix);
+ } else {
+ action_name = vformat("Move element %d to position %d in property array with prefix %s.", p_element_index, p_to_pos, array_element_prefix);
+ }
+ undo_redo->create_action(action_name);
+ if (mode == MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION) {
+ // Call the function.
+ Callable move_function = EditorNode::get_singleton()->get_editor_data().get_move_array_element_function(object->get_class_name());
+ if (move_function.is_valid()) {
+ Variant args[] = { (Object *)undo_redo, object, array_element_prefix, p_element_index, p_to_pos };
+ const Variant *args_p[] = { &args[0], &args[1], &args[2], &args[3], &args[4] };
+ Variant return_value;
+ Callable::CallError call_error;
+ move_function.call(args_p, 5, return_value, call_error);
+ } else {
+ WARN_PRINT(vformat("Could not find a function to move arrays elements for class %s. Register a move element function using EditorData::add_move_array_element_function", object->get_class_name()));
+ }
+ } else if (mode == MODE_USE_COUNT_PROPERTY) {
+ ERR_FAIL_COND(p_to_pos < -1 || p_to_pos > count);
+ List<PropertyInfo> object_property_list;
+ object->get_property_list(&object_property_list);
+
+ Array properties_as_array = _extract_properties_as_array(object_property_list);
+ properties_as_array.resize(count);
+
+ // For undoing things
+ undo_redo->add_undo_property(object, count_property, properties_as_array.size());
+ for (int i = 0; i < (int)properties_as_array.size(); i++) {
+ Dictionary d = Dictionary(properties_as_array[i]);
+ Array keys = d.keys();
+ for (int j = 0; j < keys.size(); j++) {
+ String key = keys[j];
+ undo_redo->add_undo_property(object, vformat(key, i), d[key]);
+ }
+ }
+
+ if (p_element_index < 0) {
+ // Add an element.
+ properties_as_array.insert(p_to_pos < 0 ? properties_as_array.size() : p_to_pos, Dictionary());
+ } else if (p_to_pos < 0) {
+ // Delete the element.
+ properties_as_array.remove(p_element_index);
+ } else {
+ // Move the element.
+ properties_as_array.insert(p_to_pos, properties_as_array[p_element_index].duplicate());
+ properties_as_array.remove(p_to_pos < p_element_index ? p_element_index + 1 : p_element_index);
+ }
+
+ // Change the array size then set the properties.
+ undo_redo->add_do_property(object, count_property, properties_as_array.size());
+ for (int i = 0; i < (int)properties_as_array.size(); i++) {
+ Dictionary d = properties_as_array[i];
+ Array keys = d.keys();
+ for (int j = 0; j < keys.size(); j++) {
+ String key = keys[j];
+ undo_redo->add_do_property(object, vformat(key, i), d[key]);
+ }
+ }
+ }
+ undo_redo->commit_action();
+
+ // Handle page change and update counts.
+ if (p_element_index < 0) {
+ int added_index = p_to_pos < 0 ? count : p_to_pos;
+ emit_signal("page_change_request", added_index / page_lenght);
+ count += 1;
+ } else if (p_to_pos < 0) {
+ count -= 1;
+ if (page == max_page && (MAX(0, count - 1) / page_lenght != max_page)) {
+ emit_signal("page_change_request", max_page - 1);
+ }
+ }
+ begin_array_index = page * page_lenght;
+ end_array_index = MIN(count, (page + 1) * page_lenght);
+ max_page = MAX(0, count - 1) / page_lenght;
+}
+
+void EditorInspectorArray::_clear_array() {
+ undo_redo->create_action(vformat("Clear property array with prefix %s.", array_element_prefix));
+ if (mode == MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION) {
+ for (int i = count - 1; i >= 0; i--) {
+ // Call the function.
+ Callable move_function = EditorNode::get_singleton()->get_editor_data().get_move_array_element_function(object->get_class_name());
+ if (move_function.is_valid()) {
+ Variant args[] = { (Object *)undo_redo, object, array_element_prefix, i, -1 };
+ const Variant *args_p[] = { &args[0], &args[1], &args[2], &args[3], &args[4] };
+ Variant return_value;
+ Callable::CallError call_error;
+ move_function.call(args_p, 5, return_value, call_error);
+ } else {
+ WARN_PRINT(vformat("Could not find a function to move arrays elements for class %s. Register a move element function using EditorData::add_move_array_element_function", object->get_class_name()));
+ }
+ }
+ } else if (mode == MODE_USE_COUNT_PROPERTY) {
+ List<PropertyInfo> object_property_list;
+ object->get_property_list(&object_property_list);
+
+ Array properties_as_array = _extract_properties_as_array(object_property_list);
+ properties_as_array.resize(count);
+
+ // For undoing things
+ undo_redo->add_undo_property(object, count_property, count);
+ for (int i = 0; i < (int)properties_as_array.size(); i++) {
+ Dictionary d = Dictionary(properties_as_array[i]);
+ Array keys = d.keys();
+ for (int j = 0; j < keys.size(); j++) {
+ String key = keys[j];
+ undo_redo->add_undo_property(object, vformat(key, i), d[key]);
+ }
+ }
+
+ // Change the array size then set the properties.
+ undo_redo->add_do_property(object, count_property, 0);
+ }
+ undo_redo->commit_action();
+
+ // Handle page change and update counts.
+ emit_signal("page_change_request", 0);
+ count = 0;
+ begin_array_index = 0;
+ end_array_index = 0;
+ max_page = 0;
+}
+
+void EditorInspectorArray::_resize_array(int p_size) {
+ ERR_FAIL_COND(p_size < 0);
+ if (p_size == count) {
+ return;
+ }
+
+ undo_redo->create_action(vformat("Resize property array with prefix %s.", array_element_prefix));
+ if (p_size > count) {
+ if (mode == MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION) {
+ for (int i = count; i < p_size; i++) {
+ // Call the function.
+ Callable move_function = EditorNode::get_singleton()->get_editor_data().get_move_array_element_function(object->get_class_name());
+ if (move_function.is_valid()) {
+ Variant args[] = { (Object *)undo_redo, object, array_element_prefix, -1, -1 };
+ const Variant *args_p[] = { &args[0], &args[1], &args[2], &args[3], &args[4] };
+ Variant return_value;
+ Callable::CallError call_error;
+ move_function.call(args_p, 5, return_value, call_error);
+ } else {
+ WARN_PRINT(vformat("Could not find a function to move arrays elements for class %s. Register a move element function using EditorData::add_move_array_element_function", object->get_class_name()));
+ }
+ }
+ } else if (mode == MODE_USE_COUNT_PROPERTY) {
+ undo_redo->add_undo_property(object, count_property, count);
+ undo_redo->add_do_property(object, count_property, p_size);
+ }
+ } else {
+ if (mode == MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION) {
+ for (int i = count - 1; i > p_size - 1; i--) {
+ // Call the function.
+ Callable move_function = EditorNode::get_singleton()->get_editor_data().get_move_array_element_function(object->get_class_name());
+ if (move_function.is_valid()) {
+ Variant args[] = { (Object *)undo_redo, object, array_element_prefix, i, -1 };
+ const Variant *args_p[] = { &args[0], &args[1], &args[2], &args[3], &args[4] };
+ Variant return_value;
+ Callable::CallError call_error;
+ move_function.call(args_p, 5, return_value, call_error);
+ } else {
+ WARN_PRINT(vformat("Could not find a function to move arrays elements for class %s. Register a move element function using EditorData::add_move_array_element_function", object->get_class_name()));
+ }
+ }
+ } else if (mode == MODE_USE_COUNT_PROPERTY) {
+ List<PropertyInfo> object_property_list;
+ object->get_property_list(&object_property_list);
+
+ Array properties_as_array = _extract_properties_as_array(object_property_list);
+ properties_as_array.resize(count);
+
+ // For undoing things
+ undo_redo->add_undo_property(object, count_property, count);
+ for (int i = count - 1; i > p_size - 1; i--) {
+ Dictionary d = Dictionary(properties_as_array[i]);
+ Array keys = d.keys();
+ for (int j = 0; j < keys.size(); j++) {
+ String key = keys[j];
+ undo_redo->add_undo_property(object, vformat(key, i), d[key]);
+ }
+ }
+
+ // Change the array size then set the properties.
+ undo_redo->add_do_property(object, count_property, p_size);
+ }
+ }
+ undo_redo->commit_action();
+
+ // Handle page change and update counts.
+ emit_signal("page_change_request", 0);
+ /*
+ count = 0;
+ begin_array_index = 0;
+ end_array_index = 0;
+ max_page = 0;
+ */
+}
+
+Array EditorInspectorArray::_extract_properties_as_array(const List<PropertyInfo> &p_list) {
+ Array output;
+
+ for (const PropertyInfo &pi : p_list) {
+ if (pi.name.begins_with(array_element_prefix)) {
+ String str = pi.name.trim_prefix(array_element_prefix);
+
+ int to_char_index = 0;
+ while (to_char_index < str.length()) {
+ if (str[to_char_index] < '0' || str[to_char_index] > '9') {
+ break;
+ }
+ to_char_index++;
+ }
+ if (to_char_index > 0) {
+ int array_index = str.left(to_char_index).to_int();
+ Error error = OK;
+ if (array_index >= output.size()) {
+ error = output.resize(array_index + 1);
+ }
+ if (error == OK) {
+ String format_string = String(array_element_prefix) + "%d" + str.substr(to_char_index);
+ Dictionary dict = output[array_index];
+ dict[format_string] = object->get(pi.name);
+ output[array_index] = dict;
+ } else {
+ WARN_PRINT(vformat("Array element %s has an index too high. Array allocaiton failed.", pi.name));
+ }
+ }
+ }
+ }
+ return output;
+}
+
+int EditorInspectorArray::_drop_position() const {
+ for (int i = 0; i < (int)array_elements.size(); i++) {
+ const ArrayElement &ae = array_elements[i];
+
+ Size2 size = ae.panel->get_size();
+ Vector2 mp = ae.panel->get_local_mouse_position();
+
+ if (Rect2(Vector2(), size).has_point(mp)) {
+ if (mp.y < size.y / 2) {
+ return i;
+ } else {
+ return i + 1;
+ }
+ }
+ }
+ return -1;
+}
+
+void EditorInspectorArray::_new_size_line_edit_text_changed(String p_text) {
+ bool valid = false;
+ ;
+ if (p_text.is_valid_int()) {
+ int val = p_text.to_int();
+ if (val > 0 && val != count) {
+ valid = true;
+ }
+ }
+ resize_dialog->get_ok_button()->set_disabled(!valid);
+}
+
+void EditorInspectorArray::_new_size_line_edit_text_submitted(String p_text) {
+ bool valid = false;
+ ;
+ if (p_text.is_valid_int()) {
+ int val = p_text.to_int();
+ if (val > 0 && val != count) {
+ new_size = val;
+ valid = true;
+ }
+ }
+ if (valid) {
+ resize_dialog->hide();
+ _resize_array(new_size);
+ } else {
+ new_size_line_edit->set_text(Variant(new_size));
+ }
+}
+
+void EditorInspectorArray::_resize_dialog_confirmed() {
+ _new_size_line_edit_text_submitted(new_size_line_edit->get_text());
+}
+
+void EditorInspectorArray::_setup() {
+ // Setup counts.
+ count = _get_array_count();
+ begin_array_index = page * page_lenght;
+ end_array_index = MIN(count, (page + 1) * page_lenght);
+ max_page = MAX(0, count - 1) / page_lenght;
+ array_elements.resize(MAX(0, end_array_index - begin_array_index));
+ if (page < 0 || page > max_page) {
+ WARN_PRINT(vformat("Invalid page number %d", page));
+ page = CLAMP(page, 0, max_page);
+ }
+
+ for (int i = 0; i < (int)array_elements.size(); i++) {
+ ArrayElement &ae = array_elements[i];
+
+ // Panel and its hbox.
+ ae.panel = memnew(PanelContainer);
+ ae.panel->set_focus_mode(FOCUS_ALL);
+ ae.panel->set_mouse_filter(MOUSE_FILTER_PASS);
+ ae.panel->set_drag_forwarding(this);
+ ae.panel->set_meta("index", begin_array_index + i);
+ ae.panel->set_tooltip(vformat(TTR("Element %d: %s%d*"), i, array_element_prefix, i));
+ ae.panel->connect("focus_entered", callable_mp((CanvasItem *)ae.panel, &PanelContainer::update));
+ ae.panel->connect("focus_exited", callable_mp((CanvasItem *)ae.panel, &PanelContainer::update));
+ ae.panel->connect("draw", callable_bind(callable_mp(this, &EditorInspectorArray::_panel_draw), i));
+ ae.panel->connect("gui_input", callable_bind(callable_mp(this, &EditorInspectorArray::_panel_gui_input), i));
+ ae.panel->add_theme_style_override(SNAME("panel"), i % 2 ? odd_style : even_style);
+ elements_vbox->add_child(ae.panel);
+
+ ae.margin = memnew(MarginContainer);
+ ae.margin->set_mouse_filter(MOUSE_FILTER_PASS);
+ if (is_inside_tree()) {
+ Size2 min_size = get_theme_stylebox("Focus", "EditorStyles")->get_minimum_size();
+ ae.margin->add_theme_constant_override("margin_left", min_size.x / 2);
+ ae.margin->add_theme_constant_override("margin_top", min_size.y / 2);
+ ae.margin->add_theme_constant_override("margin_right", min_size.x / 2);
+ ae.margin->add_theme_constant_override("margin_bottom", min_size.y / 2);
+ }
+ ae.panel->add_child(ae.margin);
+
+ ae.hbox = memnew(HBoxContainer);
+ ae.hbox->set_h_size_flags(SIZE_EXPAND_FILL);
+ ae.hbox->set_v_size_flags(SIZE_EXPAND_FILL);
+ ae.margin->add_child(ae.hbox);
+
+ // Move button.
+ ae.move_texture_rect = memnew(TextureRect);
+ ae.move_texture_rect->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
+ if (is_inside_tree()) {
+ ae.move_texture_rect->set_texture(get_theme_icon(SNAME("TripleBar"), SNAME("EditorIcons")));
+ }
+ ae.hbox->add_child(ae.move_texture_rect);
+
+ // Right vbox.
+ ae.vbox = memnew(VBoxContainer);
+ ae.vbox->set_h_size_flags(SIZE_EXPAND_FILL);
+ ae.vbox->set_v_size_flags(SIZE_EXPAND_FILL);
+ ae.hbox->add_child(ae.vbox);
+ }
+
+ // Hide/show the add button.
+ add_button->set_visible(page == max_page);
+
+ if (max_page == 0) {
+ hbox_pagination->hide();
+ } else {
+ // Update buttons.
+ first_page_button->set_disabled(page == 0);
+ prev_page_button->set_disabled(page == 0);
+ next_page_button->set_disabled(page == max_page);
+ last_page_button->set_disabled(page == max_page);
+
+ // Update page number and page count.
+ page_line_edit->set_text(vformat("%d", page + 1));
+ page_count_label->set_text(vformat("/ %d", max_page + 1));
+ }
+}
+
+Variant EditorInspectorArray::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
+ int index = p_from->get_meta("index");
+ Dictionary dict;
+ dict["type"] = "property_array_element";
+ dict["property_array_prefix"] = array_element_prefix;
+ dict["index"] = index;
+
+ return dict;
+}
+
+void EditorInspectorArray::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
+ Dictionary dict = p_data;
+
+ int to_drop = dict["index"];
+ int drop_position = _drop_position();
+ if (drop_position < 0) {
+ return;
+ }
+ _move_element(to_drop, begin_array_index + drop_position);
+}
+
+bool EditorInspectorArray::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
+ // First, update drawing.
+ control_dropping->update();
+
+ if (p_data.get_type() != Variant::DICTIONARY) {
+ return false;
+ }
+ Dictionary dict = p_data;
+ int drop_position = _drop_position();
+ if (!dict.has("type") || dict["type"] != "property_array_element" || String(dict["property_array_prefix"]) != array_element_prefix || drop_position < 0) {
+ return false;
+ }
+
+ // Check in dropping at the given index does indeed move the item.
+ int moved_array_index = (int)dict["index"];
+ int drop_array_index = begin_array_index + drop_position;
+
+ return drop_array_index != moved_array_index && drop_array_index - 1 != moved_array_index;
+}
+
+void EditorInspectorArray::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE:
+ case NOTIFICATION_THEME_CHANGED: {
+ Color color = get_theme_color(SNAME("dark_color_1"), SNAME("Editor"));
+ odd_style->set_bg_color(color.lightened(0.15));
+ even_style->set_bg_color(color.darkened(0.15));
+
+ for (int i = 0; i < (int)array_elements.size(); i++) {
+ ArrayElement &ae = array_elements[i];
+ ae.move_texture_rect->set_texture(get_theme_icon(SNAME("TripleBar"), SNAME("EditorIcons")));
+
+ Size2 min_size = get_theme_stylebox("Focus", "EditorStyles")->get_minimum_size();
+ ae.margin->add_theme_constant_override("margin_left", min_size.x / 2);
+ ae.margin->add_theme_constant_override("margin_top", min_size.y / 2);
+ ae.margin->add_theme_constant_override("margin_right", min_size.x / 2);
+ ae.margin->add_theme_constant_override("margin_bottom", min_size.y / 2);
+ }
+
+ add_button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
+ first_page_button->set_icon(get_theme_icon(SNAME("PageFirst"), SNAME("EditorIcons")));
+ prev_page_button->set_icon(get_theme_icon(SNAME("PagePrevious"), SNAME("EditorIcons")));
+ next_page_button->set_icon(get_theme_icon(SNAME("PageNext"), SNAME("EditorIcons")));
+ last_page_button->set_icon(get_theme_icon(SNAME("PageLast"), SNAME("EditorIcons")));
+ minimum_size_changed();
+ } break;
+ case NOTIFICATION_DRAG_BEGIN: {
+ Dictionary dict = get_viewport()->gui_get_drag_data();
+ if (dict.has("type") && dict["type"] == "property_array_element" && String(dict["property_array_prefix"]) == array_element_prefix) {
+ dropping = true;
+ control_dropping->update();
+ }
+ } break;
+ case NOTIFICATION_DRAG_END: {
+ if (dropping) {
+ dropping = false;
+ control_dropping->update();
+ }
+ } break;
+ }
+}
+
+void EditorInspectorArray::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &EditorInspectorArray::get_drag_data_fw);
+ ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &EditorInspectorArray::can_drop_data_fw);
+ ClassDB::bind_method(D_METHOD("_drop_data_fw"), &EditorInspectorArray::drop_data_fw);
+
+ ADD_SIGNAL(MethodInfo("page_change_request"));
+}
+
+void EditorInspectorArray::set_undo_redo(UndoRedo *p_undo_redo) {
+ undo_redo = p_undo_redo;
+}
+
+void EditorInspectorArray::setup_with_move_element_function(Object *p_object, String p_label, const StringName &p_array_element_prefix, int p_page, const Color &p_bg_color, bool p_foldable) {
+ count_property = "";
+ mode = MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION;
+ array_element_prefix = p_array_element_prefix;
+ page = p_page;
+
+ EditorInspectorSection::setup(String(p_array_element_prefix) + "_array", p_label, p_object, p_bg_color, p_foldable);
+
+ _setup();
+}
+
+void EditorInspectorArray::setup_with_count_property(Object *p_object, String p_label, const StringName &p_count_property, const StringName &p_array_element_prefix, int p_page, const Color &p_bg_color, bool p_foldable) {
+ count_property = p_count_property;
+ mode = MODE_USE_COUNT_PROPERTY;
+ array_element_prefix = p_array_element_prefix;
+ page = p_page;
+
+ EditorInspectorSection::setup(String(count_property) + "_array", p_label, p_object, p_bg_color, p_foldable);
+
+ _setup();
+}
+
+VBoxContainer *EditorInspectorArray::get_vbox(int p_index) {
+ if (p_index >= begin_array_index && p_index < end_array_index) {
+ return array_elements[p_index - begin_array_index].vbox;
+ } else if (p_index < 0) {
+ return vbox;
+ } else {
+ return nullptr;
+ }
+}
+
+EditorInspectorArray::EditorInspectorArray() {
+ set_mouse_filter(Control::MOUSE_FILTER_STOP);
+
+ odd_style.instantiate();
+ even_style.instantiate();
+
+ rmb_popup = memnew(PopupMenu);
+ rmb_popup->add_item(TTR("Move Up"), OPTION_MOVE_UP);
+ rmb_popup->add_item(TTR("Move Down"), OPTION_MOVE_DOWN);
+ rmb_popup->add_separator();
+ rmb_popup->add_item(TTR("Insert New Before"), OPTION_NEW_BEFORE);
+ rmb_popup->add_item(TTR("Insert New After"), OPTION_NEW_AFTER);
+ rmb_popup->add_separator();
+ rmb_popup->add_item(TTR("Remove"), OPTION_REMOVE);
+ rmb_popup->add_separator();
+ rmb_popup->add_item(TTR("Clear Array"), OPTION_CLEAR_ARRAY);
+ rmb_popup->add_item(TTR("Resize Array..."), OPTION_RESIZE_ARRAY);
+ rmb_popup->connect("id_pressed", callable_mp(this, &EditorInspectorArray::_rmb_popup_id_pressed));
+ add_child(rmb_popup);
+
+ elements_vbox = memnew(VBoxContainer);
+ elements_vbox->add_theme_constant_override("separation", 0);
+ vbox->add_child(elements_vbox);
+
+ add_button = memnew(Button);
+ add_button->set_text(TTR("Add Element"));
+ add_button->set_text_align(Button::ALIGN_CENTER);
+ add_button->connect("pressed", callable_mp(this, &EditorInspectorArray::_add_button_pressed));
+ vbox->add_child(add_button);
+
+ hbox_pagination = memnew(HBoxContainer);
+ hbox_pagination->set_h_size_flags(SIZE_EXPAND_FILL);
+ hbox_pagination->set_alignment(HBoxContainer::ALIGN_CENTER);
+ vbox->add_child(hbox_pagination);
+
+ first_page_button = memnew(Button);
+ first_page_button->set_flat(true);
+ first_page_button->connect("pressed", callable_mp(this, &EditorInspectorArray::_first_page_button_pressed));
+ hbox_pagination->add_child(first_page_button);
+
+ prev_page_button = memnew(Button);
+ prev_page_button->set_flat(true);
+ prev_page_button->connect("pressed", callable_mp(this, &EditorInspectorArray::_prev_page_button_pressed));
+ hbox_pagination->add_child(prev_page_button);
+
+ page_line_edit = memnew(LineEdit);
+ page_line_edit->connect("text_submitted", callable_mp(this, &EditorInspectorArray::_page_line_edit_text_submitted));
+ page_line_edit->add_theme_constant_override("minimum_character_width", 2);
+ hbox_pagination->add_child(page_line_edit);
+
+ page_count_label = memnew(Label);
+ hbox_pagination->add_child(page_count_label);
+ next_page_button = memnew(Button);
+ next_page_button->set_flat(true);
+ next_page_button->connect("pressed", callable_mp(this, &EditorInspectorArray::_next_page_button_pressed));
+ hbox_pagination->add_child(next_page_button);
+
+ last_page_button = memnew(Button);
+ last_page_button->set_flat(true);
+ last_page_button->connect("pressed", callable_mp(this, &EditorInspectorArray::_last_page_button_pressed));
+ hbox_pagination->add_child(last_page_button);
+
+ control_dropping = memnew(Control);
+ control_dropping->connect("draw", callable_mp(this, &EditorInspectorArray::_control_dropping_draw));
+ control_dropping->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
+ add_child(control_dropping);
+
+ resize_dialog = memnew(AcceptDialog);
+ resize_dialog->set_title(TTRC("Resize Array"));
+ resize_dialog->add_cancel_button();
+ resize_dialog->connect("confirmed", callable_mp(this, &EditorInspectorArray::_resize_dialog_confirmed));
+ add_child(resize_dialog);
+
+ VBoxContainer *resize_dialog_vbox = memnew(VBoxContainer);
+ resize_dialog->add_child(resize_dialog_vbox);
+
+ new_size_line_edit = memnew(LineEdit);
+ new_size_line_edit->connect("text_changed", callable_mp(this, &EditorInspectorArray::_new_size_line_edit_text_changed));
+ new_size_line_edit->connect("text_submitted", callable_mp(this, &EditorInspectorArray::_new_size_line_edit_text_submitted));
+ resize_dialog_vbox->add_margin_child(TTRC("New Size:"), new_size_line_edit);
+
+ vbox->connect("visibility_changed", callable_mp(this, &EditorInspectorArray::_vbox_visibility_changed));
+}
+
+////////////////////////////////////////////////
+////////////////////////////////////////////////
Ref<EditorInspectorPlugin> EditorInspector::inspector_plugins[MAX_PLUGINS];
int EditorInspector::inspector_plugin_count = 0;
@@ -1601,18 +2393,17 @@ void EditorInspector::update_tree() {
valid_plugins.push_back(inspector_plugins[i]);
}
+ // Decide if properties should be drawn in red.
bool draw_red = false;
-
if (is_inside_tree()) {
Node *nod = Object::cast_to<Node>(object);
Node *es = EditorNode::get_singleton()->get_edited_scene();
if (nod && es != nod && nod->get_owner() != es) {
+ // Draw in red edited nodes that are not in the currently edited scene.
draw_red = true;
}
}
- // TreeItem *current_category = nullptr;
-
String filter = search_box ? search_box->get_text() : "";
String group;
String group_base;
@@ -1624,30 +2415,30 @@ void EditorInspector::update_tree() {
object->get_property_list(&plist, true);
_update_script_class_properties(*object, plist);
- HashMap<String, VBoxContainer *> item_path;
- Map<VBoxContainer *, EditorInspectorSection *> section_map;
-
- item_path[""] = main_vbox;
+ Map<VBoxContainer *, HashMap<String, VBoxContainer *>> vbox_per_path;
+ Map<String, EditorInspectorArray *> editor_inspector_array_per_prefix;
Color sscolor = get_theme_color(SNAME("prop_subsection"), SNAME("Editor"));
+ // Get the lists of editors to add the beginning.
for (Ref<EditorInspectorPlugin> &ped : valid_plugins) {
ped->parse_begin(object);
_parse_added_editors(main_vbox, ped);
}
- for (List<PropertyInfo>::Element *I = plist.front(); I; I = I->next()) {
- PropertyInfo &p = I->get();
-
- //make sure the property can be edited
+ // Get the lists of editors for properties.
+ for (List<PropertyInfo>::Element *E_property = plist.front(); E_property; E_property = E_property->next()) {
+ PropertyInfo &p = E_property->get();
if (p.usage & PROPERTY_USAGE_SUBGROUP) {
+ // Setup a property sub-group.
subgroup = p.name;
subgroup_base = p.hint_string;
continue;
} else if (p.usage & PROPERTY_USAGE_GROUP) {
+ // Setup a property group.
group = p.name;
group_base = p.hint_string;
subgroup = "";
@@ -1656,6 +2447,7 @@ void EditorInspector::update_tree() {
continue;
} else if (p.usage & PROPERTY_USAGE_CATEGORY) {
+ // Setup a property category.
group = "";
group_base = "";
subgroup = "";
@@ -1665,9 +2457,9 @@ void EditorInspector::update_tree() {
continue;
}
- List<PropertyInfo>::Element *N = I->next();
+ // Iterate over remaining properties. If no properties in category, skip the category.
+ List<PropertyInfo>::Element *N = E_property->next();
bool valid = true;
- //if no properties in category, skip
while (N) {
if (N->get().usage & PROPERTY_USAGE_EDITOR && (!restrict_to_basic || (N->get().usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) {
break;
@@ -1679,28 +2471,32 @@ void EditorInspector::update_tree() {
N = N->next();
}
if (!valid) {
- continue; //empty, ignore
+ continue; // Empty, ignore it.
}
+ // Create an EditorInspectorCategory and add it to the inspector.
EditorInspectorCategory *category = memnew(EditorInspectorCategory);
main_vbox->add_child(category);
category_vbox = nullptr; //reset
String type = p.name;
+
+ // Set the category icon.
if (!ClassDB::class_exists(type) && !ScriptServer::is_global_class(type) && p.hint_string.length() && FileAccess::exists(p.hint_string)) {
- Ref<Script> s = ResourceLoader::load(p.hint_string, "Script");
+ // If we have a category inside a script, search for the first script with a valid icon.
+ Ref<Script> script = ResourceLoader::load(p.hint_string, "Script");
String base_type;
- if (s.is_valid()) {
- base_type = s->get_instance_base_type();
+ if (script.is_valid()) {
+ base_type = script->get_instance_base_type();
}
- while (s.is_valid()) {
- StringName name = EditorNode::get_editor_data().script_class_get_name(s->get_path());
+ while (script.is_valid()) {
+ StringName name = EditorNode::get_editor_data().script_class_get_name(script->get_path());
String icon_path = EditorNode::get_editor_data().script_class_get_icon_path(name);
if (name != StringName() && icon_path.length()) {
category->icon = ResourceLoader::load(icon_path, "Texture");
break;
}
- s = s->get_base_script();
+ script = script->get_base_script();
}
if (category->icon.is_null() && has_theme_icon(base_type, SNAME("EditorIcons"))) {
category->icon = get_theme_icon(base_type, SNAME("EditorIcons"));
@@ -1711,9 +2507,12 @@ void EditorInspector::update_tree() {
category->icon = EditorNode::get_singleton()->get_class_icon(type, "Object");
}
}
+
+ // Set the category label.
category->label = type;
if (use_doc_hints) {
+ // Sets the category tooltip to show documentation.
StringName type2 = p.name;
if (!class_descr_cache.has(type2)) {
String descr;
@@ -1728,6 +2527,7 @@ void EditorInspector::update_tree() {
category->set_tooltip(p.name + "::" + (class_descr_cache[type2] == "" ? "" : class_descr_cache[type2]));
}
+ // Add editors at the start of a category.
for (Ref<EditorInspectorPlugin> &ped : valid_plugins) {
ped->parse_category(object, p.name);
_parse_added_editors(main_vbox, ped);
@@ -1736,134 +2536,215 @@ void EditorInspector::update_tree() {
continue;
} else if (!(p.usage & PROPERTY_USAGE_EDITOR) || _is_property_disabled_by_feature_profile(p.name) || (restrict_to_basic && !(p.usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) {
+ // Ignore properties that are not supposed to be in the inspector.
continue;
}
if (p.name == "script") {
- category_vbox = nullptr; // script should go into its own category
+ // Script should go into its own category.
+ category_vbox = nullptr;
}
if (p.usage & PROPERTY_USAGE_HIGH_END_GFX && RS::get_singleton()->is_low_end()) {
- continue; //do not show this property in low end gfx
+ // Do not show this property in low end gfx.
+ continue;
}
if (p.name == "script" && (hide_script || bool(object->call("_hide_script_from_inspector")))) {
+ // Hide script variables from inspector if required.
continue;
}
- String basename = p.name;
+ // Get the path for property.
+ String path = p.name;
- if (subgroup != "") {
- if (subgroup_base != "") {
- if (basename.begins_with(subgroup_base)) {
- basename = basename.replace_first(subgroup_base, "");
- } else if (subgroup_base.begins_with(basename)) {
- //keep it, this is used pretty often
- } else {
- subgroup = ""; //no longer using subgroup base, clear
+ // First check if we have an array that fits the prefix.
+ String array_prefix = "";
+ int array_index = -1;
+ for (Map<String, EditorInspectorArray *>::Element *E = editor_inspector_array_per_prefix.front(); E; E = E->next()) {
+ if (p.name.begins_with(E->key()) && E->key().length() > array_prefix.length()) {
+ array_prefix = E->key();
+ }
+ }
+
+ if (!array_prefix.is_empty()) {
+ // If we have an array element, find the according index in array.
+ String str = p.name.trim_prefix(array_prefix);
+ int to_char_index = 0;
+ while (to_char_index < str.length()) {
+ if (str[to_char_index] < '0' || str[to_char_index] > '9') {
+ break;
}
+ to_char_index++;
+ }
+ if (to_char_index > 0) {
+ array_index = str.left(to_char_index).to_int();
+ } else {
+ array_prefix = "";
}
}
- if (group != "") {
- if (group_base != "" && subgroup == "") {
- if (basename.begins_with(group_base)) {
- basename = basename.replace_first(group_base, "");
- } else if (group_base.begins_with(basename)) {
- //keep it, this is used pretty often
+
+ if (!array_prefix.is_empty()) {
+ path = path.trim_prefix(array_prefix);
+ int char_index = path.find("/");
+ if (char_index >= 0) {
+ path = path.right(-char_index - 1);
+ } else {
+ path = vformat(TTR("Element %s"), array_index);
+ }
+ } else {
+ // Check if we exit or not a subgroup. If there is a prefix, remove it from the property label string.
+ if (subgroup != "" && subgroup_base != "") {
+ if (path.begins_with(subgroup_base)) {
+ path = path.trim_prefix(subgroup_base);
+ } else if (subgroup_base.begins_with(path)) {
+ // Keep it, this is used pretty often.
} else {
- group = ""; //no longer using group base, clear
+ subgroup = ""; // The prefix changed, we are no longer in the subgroup.
+ }
+ }
+
+ // Check if we exit or not a group. If there is a prefix, remove it from the property label string.
+ if (group != "" && group_base != "" && subgroup == "") {
+ if (path.begins_with(group_base)) {
+ path = path.trim_prefix(group_base);
+ } else if (group_base.begins_with(path)) {
+ // Keep it, this is used pretty often.
+ } else {
+ group = ""; // The prefix changed, we are no longer in the group.
subgroup = "";
}
}
- }
- if (subgroup != "") {
- basename = subgroup + "/" + basename;
- }
- if (group != "") {
- basename = group + "/" + basename;
- }
- String name = (basename.find("/") != -1) ? basename.substr(basename.rfind("/") + 1) : basename;
+ // Add the group and subgroup to the path.
+ if (subgroup != "") {
+ path = subgroup + "/" + path;
+ }
+ if (group != "") {
+ path = group + "/" + path;
+ }
+ }
+ // Get the property label's string.
+ String property_label_string = (path.find("/") != -1) ? path.substr(path.rfind("/") + 1) : path;
if (capitalize_paths) {
- int dot = name.find(".");
+ // Capitalize paths.
+ int dot = property_label_string.find(".");
if (dot != -1) {
- String ov = name.substr(dot);
- name = name.substr(0, dot);
- name = name.capitalize();
- name += ov;
-
+ String ov = property_label_string.substr(dot);
+ property_label_string = property_label_string.substr(0, dot);
+ property_label_string = property_label_string.capitalize();
+ property_label_string += ov;
} else {
- name = name.capitalize();
+ property_label_string = property_label_string.capitalize();
}
}
- String path;
- {
- int idx = basename.rfind("/");
- if (idx > -1) {
- path = basename.left(idx);
- }
+ // Remove the property from the path.
+ int idx = path.rfind("/");
+ if (idx > -1) {
+ path = path.left(idx);
+ } else {
+ path = "";
}
+ // Ignore properties that do not fit the filter.
if (use_filter && filter != "") {
- String cat = path;
-
- if (capitalize_paths) {
- cat = cat.capitalize();
- }
-
- if (!filter.is_subsequence_ofi(cat) && !filter.is_subsequence_ofi(name) && property_prefix.to_lower().find(filter.to_lower()) == -1) {
+ if (!filter.is_subsequence_ofi(path) && !filter.is_subsequence_ofi(property_label_string) && property_prefix.to_lower().find(filter.to_lower()) == -1) {
continue;
}
}
+ // Recreate the category vbox if it was reset.
if (category_vbox == nullptr) {
category_vbox = memnew(VBoxContainer);
main_vbox->add_child(category_vbox);
}
- VBoxContainer *current_vbox = main_vbox;
+ // Find the correct section/vbox to add the property editor to.
+ VBoxContainer *root_vbox = array_prefix.is_empty() ? main_vbox : editor_inspector_array_per_prefix[array_prefix]->get_vbox(array_index);
+ if (!root_vbox) {
+ continue;
+ }
- {
- String acc_path = "";
- int level = 1;
- for (int i = 0; i < path.get_slice_count("/"); i++) {
- String path_name = path.get_slice("/", i);
- if (i > 0) {
- acc_path += "/";
- }
- acc_path += path_name;
- if (!item_path.has(acc_path)) {
- EditorInspectorSection *section = memnew(EditorInspectorSection);
- current_vbox->add_child(section);
- sections.push_back(section);
-
- if (capitalize_paths) {
- path_name = path_name.capitalize();
- }
+ if (!vbox_per_path.has(root_vbox)) {
+ vbox_per_path[root_vbox] = HashMap<String, VBoxContainer *>();
+ vbox_per_path[root_vbox][""] = root_vbox;
+ }
- Color c = sscolor;
- c.a /= level;
- section->setup(acc_path, path_name, object, c, use_folding);
+ VBoxContainer *current_vbox = root_vbox;
+ String acc_path = "";
+ int level = 1;
- VBoxContainer *vb = section->get_vbox();
- item_path[acc_path] = vb;
- section_map[vb] = section;
+ Vector<String> components = path.split("/");
+ for (int i = 0; i < components.size(); i++) {
+ String component = components[i];
+ acc_path += (i > 0) ? "/" + component : component;
+
+ if (!vbox_per_path[root_vbox].has(acc_path)) {
+ // If the section does not exists, create it.
+ EditorInspectorSection *section = memnew(EditorInspectorSection);
+ current_vbox->add_child(section);
+ sections.push_back(section);
+
+ if (capitalize_paths) {
+ component = component.capitalize();
}
- current_vbox = item_path[acc_path];
- level = (MIN(level + 1, 4));
- }
- if (current_vbox == main_vbox) {
- //do not add directly to the main vbox, given it has no spacing
- if (category_vbox == nullptr) {
- category_vbox = memnew(VBoxContainer);
+ Color c = sscolor;
+ c.a /= level;
+ section->setup(acc_path, component, object, c, use_folding);
+
+ vbox_per_path[root_vbox][acc_path] = section->get_vbox();
+ }
+
+ current_vbox = vbox_per_path[root_vbox][acc_path];
+ level = (MIN(level + 1, 4));
+ }
+
+ // If we did not find a section to add the property to, add it to the category vbox instead (the category vbox handles margins correctly).
+ if (current_vbox == main_vbox) {
+ current_vbox = category_vbox;
+ }
+
+ // Check if the property is an array counter, if so create a dedicated array editor for the array.
+ if (p.usage & PROPERTY_USAGE_ARRAY) {
+ EditorInspectorArray *editor_inspector_array = nullptr;
+ StringName array_element_prefix;
+ Color c = sscolor;
+ c.a /= level;
+ if (p.type == Variant::NIL) {
+ // Setup the array to use a method to create/move/delete elements.
+ array_element_prefix = p.class_name;
+ editor_inspector_array = memnew(EditorInspectorArray);
+
+ String array_label = (path.find("/") != -1) ? path.substr(path.rfind("/") + 1) : path;
+ array_label = property_label_string.capitalize();
+ int page = per_array_page.has(array_element_prefix) ? per_array_page[array_element_prefix] : 0;
+ editor_inspector_array->setup_with_move_element_function(object, array_label, array_element_prefix, page, c, use_folding);
+ editor_inspector_array->connect("page_change_request", callable_mp(this, &EditorInspector::_page_change_request), varray(array_element_prefix));
+ editor_inspector_array->set_undo_redo(undo_redo);
+ } else if (p.type == Variant::INT) {
+ // Setup the array to use the count property and built-in functions to create/move/delete elements.
+ Vector<String> class_name_components = String(p.class_name).split(",");
+ if (class_name_components.size() == 2) {
+ array_element_prefix = class_name_components[1];
+ editor_inspector_array = memnew(EditorInspectorArray);
+ int page = per_array_page.has(array_element_prefix) ? per_array_page[array_element_prefix] : 0;
+ editor_inspector_array->setup_with_count_property(object, class_name_components[0], p.name, array_element_prefix, page, c, use_folding);
+ editor_inspector_array->connect("page_change_request", callable_mp(this, &EditorInspector::_page_change_request), varray(array_element_prefix));
+ editor_inspector_array->set_undo_redo(undo_redo);
}
- current_vbox = category_vbox;
}
+
+ if (editor_inspector_array) {
+ current_vbox->add_child(editor_inspector_array);
+ editor_inspector_array_per_prefix[array_element_prefix] = editor_inspector_array;
+ }
+ continue;
}
+ // Checkable and checked properties.
bool checkable = false;
bool checked = false;
if (p.usage & PROPERTY_USAGE_CHECKABLE) {
@@ -1871,6 +2752,9 @@ void EditorInspector::update_tree() {
checked = p.usage & PROPERTY_USAGE_CHECKED;
}
+ bool property_read_only = (p.usage & PROPERTY_USAGE_READ_ONLY) || read_only;
+
+ // Mark properties that would require an editor restart (mostly when editing editor settings).
if (p.usage & PROPERTY_USAGE_RESTART_IF_CHANGED) {
restart_request_props.insert(p.name);
}
@@ -1878,14 +2762,19 @@ void EditorInspector::update_tree() {
String doc_hint;
if (use_doc_hints) {
+ // Build the doc hint, to use as tooltip.
+
+ // Get the class name.
StringName classname = object->get_class_name();
if (object_class != String()) {
classname = object_class;
}
+
StringName propname = property_prefix + p.name;
String descr;
bool found = false;
+ // Search for the property description in the cache.
Map<StringName, Map<StringName, String>>::Element *E = descr_cache.find(classname);
if (E) {
Map<StringName, String>::Element *F = E->get().find(propname);
@@ -1896,6 +2785,7 @@ void EditorInspector::update_tree() {
}
if (!found) {
+ // Build the property description String and add it to the cache.
DocTools *dd = EditorHelp::get_doc_data();
Map<String, DocData::ClassDoc>::Element *F = dd->class_list.find(classname);
while (F && descr == String()) {
@@ -1928,17 +2818,18 @@ void EditorInspector::update_tree() {
doc_hint = descr;
}
+ // Seach for the inspector plugin that will handle the properties. Then add the correct property editor to it.
for (Ref<EditorInspectorPlugin> &ped : valid_plugins) {
bool exclusive = ped->parse_property(object, p.type, p.name, p.hint, p.hint_string, p.usage, wide_editors);
- List<EditorInspectorPlugin::AddedEditor> editors = ped->added_editors; //make a copy, since plugins may be used again in a sub-inspector
+ List<EditorInspectorPlugin::AddedEditor> editors = ped->added_editors; // Make a copy, since plugins may be used again in a sub-inspector.
ped->added_editors.clear();
for (const EditorInspectorPlugin::AddedEditor &F : editors) {
EditorProperty *ep = Object::cast_to<EditorProperty>(F.property_editor);
if (ep) {
- //set all this before the control gets the ENTER_TREE notification
+ // Set all this before the control gets the ENTER_TREE notification.
ep->object = object;
if (F.properties.size()) {
@@ -1953,7 +2844,7 @@ void EditorInspector::update_tree() {
ep->set_label(F.label);
} else {
// Use the existing one.
- ep->set_label(name);
+ ep->set_label(property_label_string);
}
for (int i = 0; i < F.properties.size(); i++) {
String prop = F.properties[i];
@@ -1969,18 +2860,16 @@ void EditorInspector::update_tree() {
ep->set_checkable(checkable);
ep->set_checked(checked);
ep->set_keying(keying);
-
- ep->set_read_only(read_only);
+ ep->set_read_only(property_read_only);
ep->set_deletable(deletable_properties);
}
current_vbox->add_child(F.property_editor);
if (ep) {
- ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed));
- if (p.usage & PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED) {
- ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed_update_all), varray(), CONNECT_DEFERRED);
- }
+ // Eventually, set other properties/signals after the property editor got added to the tree.
+ bool update_all = (p.usage & PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED);
+ ep->connect("property_changed", callable_mp(this, &EditorInspector::_property_changed), varray(update_all));
ep->connect("property_keyed", callable_mp(this, &EditorInspector::_property_keyed));
ep->connect("property_deleted", callable_mp(this, &EditorInspector::_property_deleted), varray(), CONNECT_DEFERRED);
ep->connect("property_keyed_with_value", callable_mp(this, &EditorInspector::_property_keyed_with_value));
@@ -2005,17 +2894,17 @@ void EditorInspector::update_tree() {
}
if (exclusive) {
+ // If we know the plugin is exclusive, we don't need to go through other plugins.
break;
}
}
}
+ // Get the lists of to add at the end.
for (Ref<EditorInspectorPlugin> &ped : valid_plugins) {
ped->parse_end();
_parse_added_editors(main_vbox, ped);
}
-
- //see if this property exists and should be kept
}
void EditorInspector::update_property(const String &p_prop) {
@@ -2054,6 +2943,7 @@ void EditorInspector::edit(Object *p_object) {
_clear();
object->disconnect("property_list_changed", callable_mp(this, &EditorInspector::_changed_callback));
}
+ per_array_page.clear();
object = p_object;
@@ -2199,6 +3089,15 @@ void EditorInspector::set_use_deletable_properties(bool p_enabled) {
deletable_properties = p_enabled;
}
+void EditorInspector::_page_change_request(int p_new_page, const StringName &p_array_prefix) {
+ int prev_page = per_array_page.has(p_array_prefix) ? per_array_page[p_array_prefix] : 0;
+ int new_page = MAX(0, p_new_page);
+ if (new_page != prev_page) {
+ per_array_page[p_array_prefix] = new_page;
+ update_tree_pending = true;
+ }
+}
+
void EditorInspector::_edit_request_change(Object *p_object, const String &p_property) {
if (object != p_object) { //may be undoing/redoing for a non edited object, so ignore
return;
@@ -2243,6 +3142,13 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
undo_redo->add_do_property(object, p_name, p_value);
undo_redo->add_undo_property(object, p_name, object->get(p_name));
+ PropertyInfo prop_info;
+ if (ClassDB::get_property_info(object->get_class_name(), p_name, &prop_info)) {
+ for (const String &linked_prop : prop_info.linked_properties) {
+ undo_redo->add_undo_property(object, linked_prop, object->get(linked_prop));
+ }
+ }
+
Variant v_undo_redo = (Object *)undo_redo;
Variant v_object = object;
Variant v_name = p_name;
@@ -2292,14 +3198,14 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
}
}
-void EditorInspector::_property_changed(const String &p_path, const Variant &p_value, const String &p_name, bool p_changing) {
+void EditorInspector::_property_changed(const String &p_path, const Variant &p_value, const String &p_name, bool p_changing, bool p_update_all) {
// The "changing" variable must be true for properties that trigger events as typing occurs,
// like "text_changed" signal. E.g. text property of Label, Button, RichTextLabel, etc.
if (p_changing) {
this->changing++;
}
- _edit_set(p_path, p_value, false, p_name);
+ _edit_set(p_path, p_value, p_update_all, p_name);
if (p_changing) {
this->changing--;
@@ -2310,11 +3216,7 @@ void EditorInspector::_property_changed(const String &p_path, const Variant &p_v
}
}
-void EditorInspector::_property_changed_update_all(const String &p_path, const Variant &p_value, const String &p_name, bool p_changing) {
- update_tree();
-}
-
-void EditorInspector::_multiple_properties_changed(Vector<String> p_paths, Array p_values) {
+void EditorInspector::_multiple_properties_changed(Vector<String> p_paths, Array p_values, bool p_changing) {
ERR_FAIL_COND(p_paths.size() == 0 || p_values.size() == 0);
ERR_FAIL_COND(p_paths.size() != p_values.size());
String names;
@@ -2331,9 +3233,13 @@ void EditorInspector::_multiple_properties_changed(Vector<String> p_paths, Array
emit_signal(SNAME("restart_requested"));
}
}
- changing++;
+ if (p_changing) {
+ changing++;
+ }
undo_redo->commit_action();
- changing--;
+ if (p_changing) {
+ changing--;
+ }
}
void EditorInspector::_property_keyed(const String &p_path, bool p_advance) {
@@ -2610,13 +3516,15 @@ void EditorInspector::_update_script_class_properties(const Object &p_object, Li
}
// NodeC -> C props... -> NodeB..C..
- r_list.erase(script_variables);
- List<PropertyInfo>::Element *to_delete = bottom->next();
- while (to_delete && !(to_delete->get().usage & PROPERTY_USAGE_CATEGORY)) {
- r_list.erase(to_delete);
- to_delete = bottom->next();
+ if (script_variables) {
+ r_list.erase(script_variables);
+ List<PropertyInfo>::Element *to_delete = bottom->next();
+ while (to_delete && !(to_delete->get().usage & PROPERTY_USAGE_CATEGORY)) {
+ r_list.erase(to_delete);
+ to_delete = bottom->next();
+ }
+ r_list.erase(bottom);
}
- r_list.erase(bottom);
}
void EditorInspector::set_restrict_to_basic_settings(bool p_restrict) {
@@ -2624,6 +3532,14 @@ void EditorInspector::set_restrict_to_basic_settings(bool p_restrict) {
update_tree();
}
+void EditorInspector::set_property_clipboard(const Variant &p_value) {
+ property_clipboard = p_value;
+}
+
+Variant EditorInspector::get_property_clipboard() const {
+ return property_clipboard;
+}
+
void EditorInspector::_bind_methods() {
ClassDB::bind_method("_edit_request_change", &EditorInspector::_edit_request_change);
@@ -2666,6 +3582,7 @@ EditorInspector::EditorInspector() {
property_focusable = -1;
sub_inspector = false;
deletable_properties = false;
+ property_clipboard = Variant();
get_v_scrollbar()->connect("value_changed", callable_mp(this, &EditorInspector::_vscroll_changed));
update_scroll_request = -1;
@@ -2675,4 +3592,8 @@ EditorInspector::EditorInspector() {
//used when class is created by the docgen to dump default values of everything bindable, editorsettings may not be created
refresh_countdown = 0.33;
}
+
+ ED_SHORTCUT("property_editor/copy_property", TTR("Copy Property"), KEY_MASK_CMD | KEY_C);
+ ED_SHORTCUT("property_editor/paste_property", TTR("Paste Property"), KEY_MASK_CMD | KEY_V);
+ ED_SHORTCUT("property_editor/copy_property_path", TTR("Copy Property Path"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_C);
}
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index 3c9ba9f39d..b71efe8f19 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -32,8 +32,12 @@
#define EDITOR_INSPECTOR_H
#include "scene/gui/box_container.h"
+#include "scene/gui/button.h"
+#include "scene/gui/dialogs.h"
#include "scene/gui/line_edit.h"
+#include "scene/gui/panel_container.h"
#include "scene/gui/scroll_container.h"
+#include "scene/gui/texture_rect.h"
class UndoRedo;
@@ -51,6 +55,13 @@ public:
class EditorProperty : public Container {
GDCLASS(EditorProperty, Container);
+public:
+ enum MenuItems {
+ MENU_COPY_PROPERTY,
+ MENU_PASTE_PROPERTY,
+ MENU_COPY_PROPERTY_PATH,
+ };
+
private:
String label;
int text_size;
@@ -84,6 +95,7 @@ private:
bool use_folding;
bool draw_top_bg;
+ void _ensure_popup();
bool _is_property_different(const Variant &p_current, const Variant &p_orig);
bool _get_instantiated_node_original_property(const StringName &p_prop, Variant &value);
void _focusable_focused(int p_index);
@@ -97,16 +109,21 @@ private:
Vector<Control *> focusables;
Control *label_reference;
Control *bottom_editor;
+ PopupMenu *menu;
mutable String tooltip_text;
Map<StringName, Variant> cache;
+ GDVIRTUAL0(_update_property)
protected:
void _notification(int p_what);
static void _bind_methods();
+ virtual void _set_read_only(bool p_read_only);
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
+ virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override;
+ const Color *_get_property_colors();
public:
void emit_changed(const StringName &p_property, const Variant &p_value, const StringName &p_field = StringName(), bool p_changing = false);
@@ -174,6 +191,8 @@ public:
bool can_revert_to_default() const { return can_revert; }
+ void menu_option(int p_option);
+
EditorProperty();
};
@@ -192,6 +211,12 @@ class EditorInspectorPlugin : public RefCounted {
protected:
static void _bind_methods();
+ GDVIRTUAL1RC(bool, _can_handle, Variant)
+ GDVIRTUAL0(_parse_begin)
+ GDVIRTUAL2(_parse_category, Object *, String)
+ GDVIRTUAL7R(bool, _parse_property, Object *, int, String, int, String, int, bool)
+ GDVIRTUAL0(_parse_end)
+
public:
void add_custom_control(Control *control);
void add_property_editor(const String &p_for_property, Control *p_prop);
@@ -231,9 +256,7 @@ class EditorInspectorSection : public Container {
String label;
String section;
- Object *object;
- VBoxContainer *vbox;
- bool vbox_added; //optimization
+ bool vbox_added; // Optimization.
Color bg_color;
bool foldable;
@@ -243,9 +266,12 @@ class EditorInspectorSection : public Container {
void _test_unfold();
protected:
+ Object *object;
+ VBoxContainer *vbox;
+
void _notification(int p_what);
static void _bind_methods();
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
public:
virtual Size2 get_minimum_size() const override;
@@ -261,6 +287,118 @@ public:
~EditorInspectorSection();
};
+class EditorInspectorArray : public EditorInspectorSection {
+ GDCLASS(EditorInspectorArray, EditorInspectorSection);
+
+ UndoRedo *undo_redo;
+
+ enum Mode {
+ MODE_NONE,
+ MODE_USE_COUNT_PROPERTY,
+ MODE_USE_MOVE_ARRAY_ELEMENT_FUNCTION,
+ } mode;
+ StringName count_property;
+ StringName array_element_prefix;
+
+ int count = 0;
+
+ VBoxContainer *elements_vbox;
+
+ Control *control_dropping;
+ bool dropping = false;
+
+ Button *add_button;
+
+ AcceptDialog *resize_dialog;
+ int new_size = 0;
+ LineEdit *new_size_line_edit;
+
+ // Pagination
+ int page_lenght = 5;
+ int page = 0;
+ int max_page = 0;
+ int begin_array_index = 0;
+ int end_array_index = 0;
+ HBoxContainer *hbox_pagination;
+ Button *first_page_button;
+ Button *prev_page_button;
+ LineEdit *page_line_edit;
+ Label *page_count_label;
+ Button *next_page_button;
+ Button *last_page_button;
+
+ enum MenuOptions {
+ OPTION_MOVE_UP = 0,
+ OPTION_MOVE_DOWN,
+ OPTION_NEW_BEFORE,
+ OPTION_NEW_AFTER,
+ OPTION_REMOVE,
+ OPTION_CLEAR_ARRAY,
+ OPTION_RESIZE_ARRAY,
+ };
+ int popup_array_index_pressed = -1;
+ PopupMenu *rmb_popup;
+
+ struct ArrayElement {
+ PanelContainer *panel;
+ MarginContainer *margin;
+ HBoxContainer *hbox;
+ TextureRect *move_texture_rect;
+ VBoxContainer *vbox;
+ };
+ LocalVector<ArrayElement> array_elements;
+
+ Ref<StyleBoxFlat> odd_style;
+ Ref<StyleBoxFlat> even_style;
+
+ int _get_array_count();
+ void _add_button_pressed();
+
+ void _first_page_button_pressed();
+ void _prev_page_button_pressed();
+ void _page_line_edit_text_submitted(String p_text);
+ void _next_page_button_pressed();
+ void _last_page_button_pressed();
+
+ void _rmb_popup_id_pressed(int p_id);
+
+ void _control_dropping_draw();
+
+ void _vbox_visibility_changed();
+
+ void _panel_draw(int p_index);
+ void _panel_gui_input(Ref<InputEvent> p_event, int p_index);
+ void _move_element(int p_element_index, int p_to_pos);
+ void _clear_array();
+ void _resize_array(int p_size);
+ Array _extract_properties_as_array(const List<PropertyInfo> &p_list);
+ int _drop_position() const;
+
+ void _new_size_line_edit_text_changed(String p_text);
+ void _new_size_line_edit_text_submitted(String p_text);
+ void _resize_dialog_confirmed();
+
+ void _update_elements_visibility();
+ void _setup();
+
+ Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
+ void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
+ bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
+
+protected:
+ void _notification(int p_what);
+ static void _bind_methods();
+
+public:
+ void set_undo_redo(UndoRedo *p_undo_redo);
+
+ void setup_with_move_element_function(Object *p_object, String p_label, const StringName &p_array_element_prefix, int p_page, const Color &p_bg_color, bool p_foldable);
+ void setup_with_count_property(Object *p_object, String p_label, const StringName &p_count_property, const StringName &p_array_element_prefix, int p_page, const Color &p_bg_color, bool p_foldable);
+ VBoxContainer *get_vbox(int p_index);
+
+ EditorInspectorArray();
+};
+
class EditorInspector : public ScrollContainer {
GDCLASS(EditorInspector, ScrollContainer);
@@ -314,14 +452,14 @@ class EditorInspector : public ScrollContainer {
String property_prefix; //used for sectioned inspector
String object_class;
+ Variant property_clipboard;
bool restrict_to_basic = false;
void _edit_set(const String &p_name, const Variant &p_value, bool p_refresh_all, const String &p_changed_field);
- void _property_changed(const String &p_path, const Variant &p_value, const String &p_name = "", bool p_changing = false);
- void _property_changed_update_all(const String &p_path, const Variant &p_value, const String &p_name = "", bool p_changing = false);
- void _multiple_properties_changed(Vector<String> p_paths, Array p_values);
+ void _property_changed(const String &p_path, const Variant &p_value, const String &p_name = "", bool p_changing = false, bool p_update_all = false);
+ void _multiple_properties_changed(Vector<String> p_paths, Array p_values, bool p_changing = false);
void _property_keyed(const String &p_path, bool p_advance);
void _property_keyed_with_value(const String &p_path, const Variant &p_value, bool p_advance);
void _property_deleted(const String &p_path);
@@ -334,6 +472,9 @@ class EditorInspector : public ScrollContainer {
void _node_removed(Node *p_node);
+ Map<StringName, int> per_array_page;
+ void _page_change_request(int p_new_page, const StringName &p_array_prefix);
+
void _changed_callback();
void _edit_request_change(Object *p_object, const String &p_prop);
@@ -405,6 +546,8 @@ public:
void set_use_deletable_properties(bool p_enabled);
void set_restrict_to_basic_settings(bool p_restrict);
+ void set_property_clipboard(const Variant &p_value);
+ Variant get_property_clipboard() const;
EditorInspector();
};
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index 296a33d917..f91cb7f607 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -195,7 +195,7 @@ void EditorLog::add_message(const String &p_msg, MessageType p_type) {
// get grouped together and sent to the editor log as one message. This can mess with the
// search functionality (see the comments on the PR above for more details). This behaviour
// also matches that of other IDE's.
- Vector<String> lines = p_msg.split("\n", false);
+ Vector<String> lines = p_msg.split("\n", true);
for (int i = 0; i < lines.size(); i++) {
_process_message(lines[i], p_type);
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 3adb7688b0..1aaa5432f4 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -97,10 +97,14 @@
#include "editor/editor_translation_parser.h"
#include "editor/export_template_manager.h"
#include "editor/filesystem_dock.h"
+#include "editor/import/dynamicfont_import_settings.h"
#include "editor/import/editor_import_collada.h"
#include "editor/import/resource_importer_bitmask.h"
+#include "editor/import/resource_importer_bmfont.h"
#include "editor/import/resource_importer_csv_translation.h"
+#include "editor/import/resource_importer_dynamicfont.h"
#include "editor/import/resource_importer_image.h"
+#include "editor/import/resource_importer_imagefont.h"
#include "editor/import/resource_importer_layered_texture.h"
#include "editor/import/resource_importer_obj.h"
#include "editor/import/resource_importer_scene.h"
@@ -388,20 +392,22 @@ void EditorNode::_version_control_menu_option(int p_idx) {
}
void EditorNode::_update_title() {
- String appname = ProjectSettings::get_singleton()->get("application/config/name");
- String title = appname.is_empty() ? String(VERSION_FULL_NAME) : String(VERSION_NAME + String(" - ") + appname);
- String edited = editor_data.get_edited_scene_root() ? editor_data.get_edited_scene_root()->get_filename() : String();
+ const String appname = ProjectSettings::get_singleton()->get("application/config/name");
+ String title = (appname.is_empty() ? "Unnamed Project" : appname) + String(" - ") + VERSION_NAME;
+ const String edited = editor_data.get_edited_scene_root() ? editor_data.get_edited_scene_root()->get_scene_file_path() : String();
if (!edited.is_empty()) {
- title += " - " + String(edited.get_file());
+ // Display the edited scene name before the program name so that it can be seen in the OS task bar.
+ title = vformat("%s - %s", edited.get_file(), title);
}
if (unsaved_cache) {
- title += " (*)";
+ // Display the "modified" mark before anything else so that it can always be seen in the OS task bar.
+ title = vformat("(*) %s", title);
}
DisplayServer::get_singleton()->window_set_title(title);
}
-void EditorNode::_unhandled_input(const Ref<InputEvent> &p_event) {
+void EditorNode::unhandled_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventKey> k = p_event;
@@ -518,6 +524,26 @@ void EditorNode::_update_from_settings() {
RS::get_singleton()->light_projectors_set_filter(RS::LightProjectorFilter(int(GLOBAL_GET("rendering/textures/light_projectors/filter"))));
}
+void EditorNode::_select_default_main_screen_plugin() {
+ if (EDITOR_3D < main_editor_buttons.size() && main_editor_buttons[EDITOR_3D]->is_visible()) {
+ // If the 3D editor is enabled, use this as the default.
+ _editor_select(EDITOR_3D);
+ return;
+ }
+
+ // Switch to the first main screen plugin that is enabled. Usually this is
+ // 2D, but may be subsequent ones if 2D is disabled in the feature profile.
+ for (int i = 0; i < main_editor_buttons.size(); i++) {
+ Button *editor_button = main_editor_buttons[i];
+ if (editor_button->is_visible()) {
+ _editor_select(i);
+ return;
+ }
+ }
+
+ _editor_select(-1);
+}
+
void EditorNode::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_PROCESS: {
@@ -550,7 +576,7 @@ void EditorNode::_notification(int p_what) {
// update the icon itself only when the spinner is visible
if (EditorSettings::get_singleton()->get("interface/editor/show_update_spinner")) {
- update_spinner->set_icon(gui_base->get_theme_icon("Progress" + itos(update_spinner_step + 1), "EditorIcons"));
+ update_spinner->set_icon(gui_base->get_theme_icon("Progress" + itos(update_spinner_step + 1), SNAME("EditorIcons")));
}
}
@@ -589,29 +615,12 @@ void EditorNode::_notification(int p_what) {
} break;
case NOTIFICATION_READY: {
- {
- _initializing_addons = true;
- Vector<String> addons;
- if (ProjectSettings::get_singleton()->has_setting("editor_plugins/enabled")) {
- addons = ProjectSettings::get_singleton()->get("editor_plugins/enabled");
- }
-
- for (int i = 0; i < addons.size(); i++) {
- set_addon_plugin_enabled(addons[i], true);
- }
- _initializing_addons = false;
- }
-
RenderingServer::get_singleton()->viewport_set_disable_2d(get_scene_root()->get_viewport_rid(), true);
RenderingServer::get_singleton()->viewport_set_disable_environment(get_viewport()->get_viewport_rid(), true);
feature_profile_manager->notify_changed();
- if (!main_editor_buttons[EDITOR_3D]->is_visible()) { //may be hidden due to feature profile
- _editor_select(EDITOR_2D);
- } else {
- _editor_select(EDITOR_3D);
- }
+ _select_default_main_screen_plugin();
// Save the project after opening to mark it as last modified, except in headless mode.
if (DisplayServer::get_singleton()->window_can_draw()) {
@@ -758,7 +767,7 @@ void EditorNode::_update_update_spinner() {
// On a light theme, icons are dark, so we need to modulate them with an even brighter color.
const bool dark_theme = EditorSettings::get_singleton()->is_dark_theme();
update_spinner->set_self_modulate(
- gui_base->get_theme_color("error_color", "Editor") * (dark_theme ? Color(1.1, 1.1, 1.1) : Color(4.25, 4.25, 4.25)));
+ gui_base->get_theme_color(SNAME("error_color"), SNAME("Editor")) * (dark_theme ? Color(1.1, 1.1, 1.1) : Color(4.25, 4.25, 4.25)));
} else {
update_spinner->set_tooltip(TTR("Spins when the editor window redraws."));
update_spinner->set_self_modulate(Color(1, 1, 1));
@@ -964,6 +973,18 @@ void EditorNode::_sources_changed(bool p_exist) {
load_scene(defer_load_scene);
defer_load_scene = "";
}
+
+ // Only enable addons once resources have been imported
+ _initializing_addons = true;
+ Vector<String> addons;
+ if (ProjectSettings::get_singleton()->has_setting("editor_plugins/enabled")) {
+ addons = ProjectSettings::get_singleton()->get("editor_plugins/enabled");
+ }
+
+ for (int i = 0; i < addons.size(); i++) {
+ set_addon_plugin_enabled(addons[i], true);
+ }
+ _initializing_addons = false;
}
}
@@ -1154,7 +1175,7 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String
int srpos = path.find("::");
if (srpos != -1) {
String base = path.substr(0, srpos);
- if (!get_edited_scene() || get_edited_scene()->get_filename() != base) {
+ if (!get_edited_scene() || get_edited_scene()->get_scene_file_path() != base) {
show_warning(TTR("This resource can't be saved because it does not belong to the edited scene. Make it unique first."));
return;
}
@@ -1528,7 +1549,7 @@ void EditorNode::_save_scene_with_preview(String p_file, int p_idx) {
bool EditorNode::_validate_scene_recursive(const String &p_filename, Node *p_node) {
for (int i = 0; i < p_node->get_child_count(); i++) {
Node *child = p_node->get_child(i);
- if (child->get_filename() == p_filename) {
+ if (child->get_scene_file_path() == p_filename) {
return true;
}
@@ -1624,7 +1645,7 @@ void EditorNode::_save_scene(String p_file, int idx) {
return;
}
- if (scene->get_filename() != String() && _validate_scene_recursive(scene->get_filename(), scene)) {
+ if (scene->get_scene_file_path() != String() && _validate_scene_recursive(scene->get_scene_file_path(), scene)) {
show_accept(TTR("This scene can't be saved because there is a cyclic instancing inclusion.\nPlease resolve it and then attempt to save again."), TTR("OK"));
return;
}
@@ -1678,7 +1699,7 @@ void EditorNode::_save_scene(String p_file, int idx) {
}
if (err == OK) {
- scene->set_filename(ProjectSettings::get_singleton()->localize_path(p_file));
+ scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(p_file));
if (idx < 0 || idx == editor_data.get_edited_scene()) {
set_current_version(editor_data.get_undo_redo().get_version());
} else {
@@ -1706,8 +1727,8 @@ void EditorNode::save_scene_list(Vector<String> p_scene_filenames) {
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
Node *scene = editor_data.get_edited_scene_root(i);
- if (scene && (p_scene_filenames.find(scene->get_filename()) >= 0)) {
- _save_scene(scene->get_filename(), i);
+ if (scene && (p_scene_filenames.find(scene->get_scene_file_path()) >= 0)) {
+ _save_scene(scene->get_scene_file_path(), i);
}
}
}
@@ -1717,7 +1738,7 @@ void EditorNode::restart_editor() {
String to_reopen;
if (get_tree()->get_edited_scene_root()) {
- to_reopen = get_tree()->get_edited_scene_root()->get_filename();
+ to_reopen = get_tree()->get_edited_scene_root()->get_scene_file_path();
}
_exit_editor();
@@ -1736,13 +1757,15 @@ void EditorNode::restart_editor() {
void EditorNode::_save_all_scenes() {
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
Node *scene = editor_data.get_edited_scene_root(i);
- if (scene && scene->get_filename() != "") {
+ if (scene && scene->get_scene_file_path() != "" && DirAccess::exists(scene->get_scene_file_path().get_base_dir())) {
if (i != editor_data.get_edited_scene()) {
- _save_scene(scene->get_filename(), i);
+ _save_scene(scene->get_scene_file_path(), i);
} else {
- _save_scene_with_preview(scene->get_filename());
+ _save_scene_with_preview(scene->get_scene_file_path());
}
- } // else: ignore new scenes
+ } else {
+ show_warning(TTR("Could not save one or more scenes!"), TTR("Save All Scenes"));
+ }
}
_save_default_environment();
@@ -1755,7 +1778,7 @@ void EditorNode::_mark_unsaved_scenes() {
continue;
}
- String path = node->get_filename();
+ String path = node->get_scene_file_path();
if (!(path == String() || FileAccess::exists(path))) {
if (i == editor_data.get_edited_scene()) {
set_current_version(-1);
@@ -1850,7 +1873,7 @@ void EditorNode::_dialog_action(String p_file) {
ml = Ref<MeshLibrary>(memnew(MeshLibrary));
}
- MeshLibraryEditor::update_library_file(editor_data.get_edited_scene_root(), ml, true);
+ MeshLibraryEditor::update_library_file(editor_data.get_edited_scene_root(), ml, true, file_export_lib_apply_xforms->is_pressed());
Error err = ResourceSaver::save(p_file, ml);
if (err) {
@@ -2086,7 +2109,6 @@ void EditorNode::_edit_current() {
Object *prev_inspected_object = get_inspector()->get_edited_object();
- bool capitalize = bool(EDITOR_GET("interface/inspector/capitalize_properties"));
bool disable_folding = bool(EDITOR_GET("interface/inspector/disable_folding"));
bool is_resource = current_obj->is_class("Resource");
bool is_node = current_obj->is_class("Node");
@@ -2108,7 +2130,7 @@ void EditorNode::_edit_current() {
if (FileAccess::exists(base_path + ".import")) {
editable_warning = TTR("This resource belongs to a scene that was imported, so it's not editable.\nPlease read the documentation relevant to importing scenes to better understand this workflow.");
} else {
- if ((!get_edited_scene() || get_edited_scene()->get_filename() != base_path) && ResourceLoader::get_resource_type(base_path) == "PackedScene") {
+ if ((!get_edited_scene() || get_edited_scene()->get_scene_file_path() != base_path) && ResourceLoader::get_resource_type(base_path) == "PackedScene") {
editable_warning = TTR("This resource belongs to a scene that was instantiated or inherited.\nChanges to it won't be kept when saving the current scene.");
}
}
@@ -2132,8 +2154,8 @@ void EditorNode::_edit_current() {
inspector_dock->update(nullptr);
}
- if (get_edited_scene() && get_edited_scene()->get_filename() != String()) {
- String source_scene = get_edited_scene()->get_filename();
+ if (get_edited_scene() && get_edited_scene()->get_scene_file_path() != String()) {
+ String source_scene = get_edited_scene()->get_scene_file_path();
if (FileAccess::exists(source_scene + ".import")) {
editable_warning = TTR("This scene was imported, so changes to it won't be kept.\nInstancing it or inheriting will allow making changes to it.\nPlease read the documentation relevant to importing scenes to better understand this workflow.");
}
@@ -2144,7 +2166,6 @@ void EditorNode::_edit_current() {
if (current_obj->is_class("EditorDebuggerRemoteObject")) {
editable_warning = TTR("This is a remote object, so changes to it won't be kept.\nPlease read the documentation relevant to debugging to better understand this workflow.");
- capitalize = false;
disable_folding = true;
} else if (current_obj->is_class("MultiNodeEdit")) {
Node *scene = get_edited_scene();
@@ -2181,10 +2202,6 @@ void EditorNode::_edit_current() {
inspector_dock->set_warning(editable_warning);
- if (get_inspector()->is_capitalize_paths_enabled() != capitalize) {
- get_inspector()->set_enable_capitalize_paths(capitalize);
- }
-
if (get_inspector()->is_using_folding() == disable_folding) {
get_inspector()->set_use_folding(!disable_folding);
}
@@ -2261,7 +2278,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
String args;
bool skip_breakpoints;
- if (p_current || (editor_data.get_edited_scene_root() && p_custom != String() && p_custom == editor_data.get_edited_scene_root()->get_filename())) {
+ if (p_current || (editor_data.get_edited_scene_root() && p_custom != String() && p_custom == editor_data.get_edited_scene_root()->get_scene_file_path())) {
Node *scene = editor_data.get_edited_scene_root();
if (!scene) {
@@ -2269,7 +2286,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
return;
}
- if (scene->get_filename() == "") {
+ if (scene->get_scene_file_path() == "") {
current_option = -1;
_menu_option(FILE_SAVE_AS_SCENE);
// Set the option to save and run so when the dialog is accepted, the scene runs.
@@ -2278,7 +2295,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
return;
}
- run_filename = scene->get_filename();
+ run_filename = scene->get_scene_file_path();
} else if (p_custom != "") {
run_filename = p_custom;
}
@@ -2294,8 +2311,8 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
if (unsaved_cache) {
Node *scene = editor_data.get_edited_scene_root();
- if (scene && scene->get_filename() != "") { // Only autosave if there is a scene and if it has a path.
- _save_scene_with_preview(scene->get_filename());
+ if (scene && scene->get_scene_file_path() != "") { // Only autosave if there is a scene and if it has a path.
+ _save_scene_with_preview(scene->get_scene_file_path());
}
}
_menu_option(FILE_SAVE_ALL_SCENES);
@@ -2388,7 +2405,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
Node *scene = editor_data.get_edited_scene_root();
if (scene) {
- file->set_current_path(scene->get_filename());
+ file->set_current_path(scene->get_scene_file_path());
};
file->set_title(p_option == FILE_OPEN_SCENE ? TTR("Open Scene") : TTR("Open Base Scene"));
file->popup_file_dialog();
@@ -2450,7 +2467,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
if (unsaved_cache || p_option == FILE_CLOSE_ALL_AND_QUIT || p_option == FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER) {
Node *scene_root = editor_data.get_edited_scene_root(tab_closing);
if (scene_root) {
- String scene_filename = scene_root->get_filename();
+ String scene_filename = scene_root->get_scene_file_path();
save_confirmation->get_ok_button()->set_text(TTR("Save & Close"));
save_confirmation->set_text(vformat(TTR("Save changes to '%s' before closing?"), scene_filename != "" ? scene_filename : "unsaved scene"));
save_confirmation->popup_centered();
@@ -2469,20 +2486,22 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
case SCENE_TAB_CLOSE:
case FILE_SAVE_SCENE: {
int scene_idx = (p_option == FILE_SAVE_SCENE) ? -1 : tab_closing;
-
Node *scene = editor_data.get_edited_scene_root(scene_idx);
- if (scene && scene->get_filename() != "") {
- if (scene_idx != editor_data.get_edited_scene()) {
- _save_scene_with_preview(scene->get_filename(), scene_idx);
- } else {
- _save_scene_with_preview(scene->get_filename());
- }
+ if (scene && scene->get_scene_file_path() != "") {
+ if (DirAccess::exists(scene->get_scene_file_path().get_base_dir())) {
+ if (scene_idx != editor_data.get_edited_scene()) {
+ _save_scene_with_preview(scene->get_scene_file_path(), scene_idx);
+ } else {
+ _save_scene_with_preview(scene->get_scene_file_path());
+ }
- if (scene_idx != -1) {
- _discard_changes();
+ if (scene_idx != -1) {
+ _discard_changes();
+ }
+ save_layout();
+ } else {
+ show_save_accept(vformat(TTR("%s no longer exists! Please specify a new save location."), scene->get_scene_file_path().get_base_dir()), TTR("OK"));
}
- save_layout();
-
break;
}
[[fallthrough]];
@@ -2524,8 +2543,8 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
}
- if (scene->get_filename() != "") {
- String path = scene->get_filename();
+ if (scene->get_scene_file_path() != "") {
+ String path = scene->get_scene_file_path();
file->set_current_path(path);
if (extensions.size()) {
String ext = path.get_extension().to_lower();
@@ -2623,7 +2642,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
break;
}
- String filename = scene->get_filename();
+ String filename = scene->get_scene_file_path();
if (filename == String()) {
show_warning(TTR("Can't reload a scene that was never saved."));
@@ -2745,7 +2764,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
String unsaved_scenes;
int i = _next_unsaved_scene(true, 0);
while (i != -1) {
- unsaved_scenes += "\n " + editor_data.get_edited_scene_root(i)->get_filename();
+ unsaved_scenes += "\n " + editor_data.get_edited_scene_root(i)->get_scene_file_path();
i = _next_unsaved_scene(true, ++i);
}
@@ -2820,7 +2839,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
Node *scene = editor_data.get_edited_scene_root();
if (scene) {
- file->set_current_path(scene->get_filename());
+ file->set_current_path(scene->get_scene_file_path());
};
file->set_title(TTR("Pick a Main Scene"));
file->popup_file_dialog();
@@ -2922,7 +2941,7 @@ int EditorNode::_next_unsaved_scene(bool p_valid_filename, int p_start) {
int current = editor_data.get_edited_scene();
bool unsaved = (i == current) ? saved_version != editor_data.get_undo_redo().get_version() : editor_data.get_scene_version(i) != 0;
if (unsaved) {
- String scene_filename = editor_data.get_edited_scene_root(i)->get_filename();
+ String scene_filename = editor_data.get_edited_scene_root(i)->get_scene_file_path();
if (p_valid_filename && scene_filename.length() == 0) {
continue;
}
@@ -2954,7 +2973,7 @@ void EditorNode::_discard_changes(const String &p_str) {
case SCENE_TAB_CLOSE: {
Node *scene = editor_data.get_edited_scene_root(tab_closing);
if (scene != nullptr) {
- String scene_filename = scene->get_filename();
+ String scene_filename = scene->get_scene_file_path();
if (scene_filename != "") {
previous_scenes.push_back(scene_filename);
}
@@ -3100,9 +3119,10 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed
tb->set_flat(true);
tb->set_toggle_mode(true);
tb->connect("pressed", callable_mp(singleton, &EditorNode::_editor_select), varray(singleton->main_editor_buttons.size()));
+ tb->set_name(p_editor->get_name());
tb->set_text(p_editor->get_name());
- Ref<Texture2D> icon = p_editor->get_icon();
+ Ref<Texture2D> icon = p_editor->get_icon();
if (icon.is_valid()) {
tb->set_icon(icon);
} else if (singleton->gui_base->has_theme_icon(p_editor->get_name(), "EditorIcons")) {
@@ -3112,7 +3132,6 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed
tb->add_theme_font_override("font", singleton->gui_base->get_theme_font(SNAME("main_button_font"), SNAME("EditorFonts")));
tb->add_theme_font_size_override("font_size", singleton->gui_base->get_theme_font_size(SNAME("main_button_font_size"), SNAME("EditorFonts")));
- tb->set_name(p_editor->get_name());
singleton->main_editor_buttons.push_back(tb);
singleton->main_editor_button_vb->add_child(tb);
singleton->editor_table.push_back(p_editor);
@@ -3263,10 +3282,6 @@ void EditorNode::_remove_edited_scene(bool p_change_tab) {
new_index = 1;
}
- if (editor_data.get_scene_path(old_index) != String()) {
- ScriptEditor::get_singleton()->close_builtin_scripts_from_scene(editor_data.get_scene_path(old_index));
- }
-
if (p_change_tab) {
_scene_tab_changed(new_index);
}
@@ -3587,7 +3602,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
Ref<SceneState> state = sdata->get_state();
state->set_path(lpath);
new_scene->set_scene_inherited_state(state);
- new_scene->set_filename(String());
+ new_scene->set_scene_file_path(String());
}
new_scene->set_scene_instance_state(Ref<SceneState>());
@@ -3760,7 +3775,7 @@ void EditorNode::_load_error_notify(void *p_ud, const String &p_text) {
}
bool EditorNode::_find_scene_in_use(Node *p_node, const String &p_path) const {
- if (p_node->get_filename() == p_path) {
+ if (p_node->get_scene_file_path() == p_path) {
return true;
}
@@ -3938,7 +3953,7 @@ void EditorNode::_pick_main_scene_custom_action(const String &p_custom_action_na
pick_main_scene->hide();
current_option = SETTINGS_PICK_MAIN_SCENE;
- _dialog_action(scene->get_filename());
+ _dialog_action(scene->get_scene_file_path());
}
}
@@ -4139,6 +4154,13 @@ void EditorNode::show_accept(const String &p_text, const String &p_title) {
accept->popup_centered();
}
+void EditorNode::show_save_accept(const String &p_text, const String &p_title) {
+ current_option = -1;
+ save_accept->get_ok_button()->set_text(p_title);
+ save_accept->set_text(p_text);
+ save_accept->popup_centered();
+}
+
void EditorNode::show_warning(const String &p_text, const String &p_title) {
if (warning->is_inside_tree()) {
warning->set_text(p_text);
@@ -4764,6 +4786,10 @@ bool EditorNode::ensure_main_scene(bool p_from_native) {
return true;
}
+Error EditorNode::run_play_native(int p_idx, int p_platform) {
+ return run_native->run_native(p_idx, p_platform);
+}
+
void EditorNode::run_play() {
_menu_option_confirm(RUN_STOP, true);
_run(false);
@@ -4798,6 +4824,32 @@ String EditorNode::get_run_playing_scene() const {
return run_filename;
}
+void EditorNode::_immediate_dialog_confirmed() {
+ immediate_dialog_confirmed = true;
+}
+bool EditorNode::immediate_confirmation_dialog(const String &p_text, const String &p_ok_text, const String &p_cancel_text) {
+ ConfirmationDialog *cd = memnew(ConfirmationDialog);
+ cd->set_text(p_text);
+ cd->get_ok_button()->set_text(p_ok_text);
+ cd->get_cancel_button()->set_text(p_cancel_text);
+ cd->connect("confirmed", callable_mp(singleton, &EditorNode::_immediate_dialog_confirmed));
+ singleton->gui_base->add_child(cd);
+
+ cd->popup_centered();
+
+ while (true) {
+ OS::get_singleton()->delay_usec(1);
+ DisplayServer::get_singleton()->process_events();
+ Main::iteration();
+ if (singleton->immediate_dialog_confirmed || !cd->is_visible()) {
+ break;
+ }
+ }
+
+ memdelete(cd);
+ return singleton->immediate_dialog_confirmed;
+}
+
int EditorNode::get_current_tab() {
return scene_tabs->get_current_tab();
}
@@ -4891,7 +4943,7 @@ void EditorNode::_scene_tab_closed(int p_tab, int option) {
editor_data.get_scene_version(p_tab) != 0;
if (unsaved) {
save_confirmation->get_ok_button()->set_text(TTR("Save & Close"));
- save_confirmation->set_text(vformat(TTR("Save changes to '%s' before closing?"), scene->get_filename() != "" ? scene->get_filename() : "unsaved scene"));
+ save_confirmation->set_text(vformat(TTR("Save changes to '%s' before closing?"), scene->get_scene_file_path() != "" ? scene->get_scene_file_path() : "unsaved scene"));
save_confirmation->popup_centered();
} else {
_discard_changes();
@@ -5586,7 +5638,6 @@ void EditorNode::_bind_methods() {
ClassDB::bind_method("_editor_select", &EditorNode::_editor_select);
ClassDB::bind_method("_node_renamed", &EditorNode::_node_renamed);
ClassDB::bind_method("edit_node", &EditorNode::edit_node);
- ClassDB::bind_method("_unhandled_input", &EditorNode::_unhandled_input);
ClassDB::bind_method(D_METHOD("push_item", "object", "property", "inspector_only"), &EditorNode::push_item, DEFVAL(""), DEFVAL(false));
@@ -5826,6 +5877,18 @@ EditorNode::EditorNode() {
import_texture_atlas.instantiate();
ResourceFormatImporter::get_singleton()->add_importer(import_texture_atlas);
+ Ref<ResourceImporterDynamicFont> import_font_data_dynamic;
+ import_font_data_dynamic.instantiate();
+ ResourceFormatImporter::get_singleton()->add_importer(import_font_data_dynamic);
+
+ Ref<ResourceImporterBMFont> import_font_data_bmfont;
+ import_font_data_bmfont.instantiate();
+ ResourceFormatImporter::get_singleton()->add_importer(import_font_data_bmfont);
+
+ Ref<ResourceImporterImageFont> import_font_data_image;
+ import_font_data_image.instantiate();
+ ResourceFormatImporter::get_singleton()->add_importer(import_font_data_image);
+
Ref<ResourceImporterCSVTranslation> import_csv_translation;
import_csv_translation.instantiate();
ResourceFormatImporter::get_singleton()->add_importer(import_csv_translation);
@@ -5915,7 +5978,7 @@ EditorNode::EditorNode() {
EDITOR_DEF_RST("interface/editor/save_each_scene_on_quit", true);
EDITOR_DEF("interface/editor/show_update_spinner", false);
EDITOR_DEF("interface/editor/update_continuously", false);
- EDITOR_DEF_RST("interface/scene_tabs/restore_scenes_on_load", false);
+ EDITOR_DEF_RST("interface/scene_tabs/restore_scenes_on_load", true);
EDITOR_DEF_RST("interface/scene_tabs/show_thumbnail_on_hover", true);
EDITOR_DEF_RST("interface/inspector/capitalize_properties", true);
EDITOR_DEF_RST("interface/inspector/default_float_step", 0.001);
@@ -6053,9 +6116,9 @@ EditorNode::EditorNode() {
dock_tab_move_right = memnew(Button);
dock_tab_move_right->set_flat(true);
if (gui_base->is_layout_rtl()) {
- dock_tab_move_right->set_icon(theme->get_icon("Forward", "EditorIcons"));
- } else {
dock_tab_move_right->set_icon(theme->get_icon("Back", "EditorIcons"));
+ } else {
+ dock_tab_move_right->set_icon(theme->get_icon("Forward", "EditorIcons"));
}
dock_tab_move_right->set_focus_mode(Control::FOCUS_NONE);
dock_tab_move_right->connect("pressed", callable_mp(this, &EditorNode::_dock_move_right));
@@ -6151,11 +6214,9 @@ EditorNode::EditorNode() {
tabbar_container->add_child(scene_tabs);
distraction_free = memnew(Button);
distraction_free->set_flat(true);
-#ifdef OSX_ENABLED
- distraction_free->set_shortcut(ED_SHORTCUT_AND_COMMAND("editor/distraction_free_mode", TTR("Distraction Free Mode"), KEY_MASK_CMD | KEY_MASK_CTRL | KEY_D));
-#else
- distraction_free->set_shortcut(ED_SHORTCUT_AND_COMMAND("editor/distraction_free_mode", TTR("Distraction Free Mode"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F11));
-#endif
+ ED_SHORTCUT_AND_COMMAND("editor/distraction_free_mode", TTR("Distraction Free Mode"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F11);
+ ED_SHORTCUT_OVERRIDE("editor/distraction_free_mode", "macos", KEY_MASK_CMD | KEY_MASK_CTRL | KEY_D);
+ distraction_free->set_shortcut(ED_GET_SHORTCUT("editor/distraction_free_mode"));
distraction_free->set_tooltip(TTR("Toggle distraction-free mode."));
distraction_free->connect("pressed", callable_mp(this, &EditorNode::_toggle_distraction_free_mode));
distraction_free->set_icon(gui_base->get_theme_icon(SNAME("DistractionFree"), SNAME("EditorIcons")));
@@ -6213,6 +6274,10 @@ EditorNode::EditorNode() {
gui_base->add_child(accept);
accept->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current));
+ save_accept = memnew(AcceptDialog);
+ gui_base->add_child(save_accept);
+ save_accept->connect("confirmed", callable_mp(this, &EditorNode::_menu_option), make_binds((int)MenuOptions::FILE_SAVE_AS_SCENE));
+
project_export = memnew(ProjectExportDialog);
gui_base->add_child(project_export);
@@ -6231,6 +6296,9 @@ EditorNode::EditorNode() {
scene_import_settings = memnew(SceneImportSettings);
gui_base->add_child(scene_import_settings);
+ fontdata_import_settings = memnew(DynamicFontImportSettings);
+ gui_base->add_child(fontdata_import_settings);
+
export_template_manager = memnew(ExportTemplateManager);
gui_base->add_child(export_template_manager);
@@ -6340,11 +6408,9 @@ EditorNode::EditorNode() {
p->add_separator();
p->add_shortcut(ED_SHORTCUT("editor/reload_current_project", TTR("Reload Current Project")), RUN_RELOAD_CURRENT_PROJECT);
-#ifdef OSX_ENABLED
- p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/quit_to_project_list", TTR("Quit to Project List"), KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_Q), RUN_PROJECT_MANAGER, true);
-#else
- p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/quit_to_project_list", TTR("Quit to Project List"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_Q), RUN_PROJECT_MANAGER, true);
-#endif
+ ED_SHORTCUT_AND_COMMAND("editor/quit_to_project_list", TTR("Quit to Project List"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_Q);
+ ED_SHORTCUT_OVERRIDE("editor/quit_to_project_list", "macos", KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_Q);
+ p->add_shortcut(ED_GET_SHORTCUT("editor/quit_to_project_list"), RUN_PROJECT_MANAGER, true);
menu_hb->add_spacer();
@@ -6369,11 +6435,10 @@ EditorNode::EditorNode() {
left_menu_hb->add_child(settings_menu);
p = settings_menu->get_popup();
-#ifdef OSX_ENABLED
- p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/editor_settings", TTR("Editor Settings..."), KEY_MASK_CMD + KEY_COMMA), SETTINGS_PREFERENCES);
-#else
- p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/editor_settings", TTR("Editor Settings...")), SETTINGS_PREFERENCES);
-#endif
+
+ ED_SHORTCUT_AND_COMMAND("editor/editor_settings", TTR("Editor Settings..."));
+ ED_SHORTCUT_OVERRIDE("editor/editor_settings", "macos", KEY_MASK_CMD + KEY_COMMA);
+ p->add_shortcut(ED_GET_SHORTCUT("editor/editor_settings"), SETTINGS_PREFERENCES);
p->add_shortcut(ED_SHORTCUT("editor/command_palette", TTR("Command Palette..."), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_P), HELP_COMMAND_PALETTE);
p->add_separator();
@@ -6383,17 +6448,17 @@ EditorNode::EditorNode() {
editor_layouts->connect("id_pressed", callable_mp(this, &EditorNode::_layout_menu_option));
p->add_submenu_item(TTR("Editor Layout"), "Layouts");
p->add_separator();
-#ifdef OSX_ENABLED
- p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/take_screenshot", TTR("Take Screenshot"), KEY_MASK_CMD | KEY_F12), EDITOR_SCREENSHOT);
-#else
- p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/take_screenshot", TTR("Take Screenshot"), KEY_MASK_CTRL | KEY_F12), EDITOR_SCREENSHOT);
-#endif
+
+ ED_SHORTCUT_AND_COMMAND("editor/take_screenshot", TTR("Take Screenshot"), KEY_MASK_CTRL | KEY_F12);
+ ED_SHORTCUT_OVERRIDE("editor/take_screenshot", "macos", KEY_MASK_CMD | KEY_F12);
+ p->add_shortcut(ED_GET_SHORTCUT("editor/take_screenshot"), EDITOR_SCREENSHOT);
+
p->set_item_tooltip(p->get_item_count() - 1, TTR("Screenshots are stored in the Editor Data/Settings Folder."));
-#ifdef OSX_ENABLED
- p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/fullscreen_mode", TTR("Toggle Fullscreen"), KEY_MASK_CMD | KEY_MASK_CTRL | KEY_F), SETTINGS_TOGGLE_FULLSCREEN);
-#else
- p->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/fullscreen_mode", TTR("Toggle Fullscreen"), KEY_MASK_SHIFT | KEY_F11), SETTINGS_TOGGLE_FULLSCREEN);
-#endif
+
+ ED_SHORTCUT_AND_COMMAND("editor/fullscreen_mode", TTR("Toggle Fullscreen"), KEY_MASK_SHIFT | KEY_F11);
+ ED_SHORTCUT_OVERRIDE("editor/fullscreen_mode", "macos", KEY_MASK_CMD | KEY_MASK_CTRL | KEY_F);
+ p->add_shortcut(ED_GET_SHORTCUT("editor/fullscreen_mode"), SETTINGS_TOGGLE_FULLSCREEN);
+
#if defined(WINDOWS_ENABLED) && defined(WINDOWS_SUBSYSTEM_CONSOLE)
// The console can only be toggled if the application was built for the console subsystem,
// not the GUI subsystem.
@@ -6402,7 +6467,7 @@ EditorNode::EditorNode() {
p->add_separator();
if (OS::get_singleton()->get_data_path() == OS::get_singleton()->get_config_path()) {
- // Configuration and data folders are located in the same place (Windows/macOS)
+ // Configuration and data folders are located in the same place (Windows/macos)
p->add_item(TTR("Open Editor Data/Settings Folder"), SETTINGS_EDITOR_DATA_FOLDER);
} else {
// Separate configuration and data folders (Linux)
@@ -6424,11 +6489,10 @@ EditorNode::EditorNode() {
p = help_menu->get_popup();
p->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
-#ifdef OSX_ENABLED
- p->add_icon_shortcut(gui_base->get_theme_icon(SNAME("HelpSearch"), SNAME("EditorIcons")), ED_SHORTCUT_AND_COMMAND("editor/editor_help", TTR("Search Help"), KEY_MASK_ALT | KEY_SPACE), HELP_SEARCH);
-#else
- p->add_icon_shortcut(gui_base->get_theme_icon(SNAME("HelpSearch"), SNAME("EditorIcons")), ED_SHORTCUT_AND_COMMAND("editor/editor_help", TTR("Search Help"), KEY_F1), HELP_SEARCH);
-#endif
+
+ ED_SHORTCUT_AND_COMMAND("editor/editor_help", TTR("Search Help"), KEY_F1);
+ ED_SHORTCUT_OVERRIDE("editor/editor_help", "macos", KEY_MASK_ALT | KEY_SPACE);
+ p->add_icon_shortcut(gui_base->get_theme_icon(SNAME("HelpSearch"), SNAME("EditorIcons")), ED_GET_SHORTCUT("editor/editor_help"), HELP_SEARCH);
p->add_separator();
p->add_icon_shortcut(gui_base->get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), ED_SHORTCUT_AND_COMMAND("editor/online_docs", TTR("Online Documentation")), HELP_DOCS);
p->add_icon_shortcut(gui_base->get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), ED_SHORTCUT_AND_COMMAND("editor/q&a", TTR("Questions & Answers")), HELP_QA);
@@ -6451,11 +6515,10 @@ EditorNode::EditorNode() {
play_button->set_focus_mode(Control::FOCUS_NONE);
play_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_PLAY));
play_button->set_tooltip(TTR("Play the project."));
-#ifdef OSX_ENABLED
- play_button->set_shortcut(ED_SHORTCUT_AND_COMMAND("editor/play", TTR("Play"), KEY_MASK_CMD | KEY_B));
-#else
- play_button->set_shortcut(ED_SHORTCUT_AND_COMMAND("editor/play", TTR("Play"), KEY_F5));
-#endif
+
+ ED_SHORTCUT_AND_COMMAND("editor/play", TTR("Play"), KEY_F5);
+ ED_SHORTCUT_OVERRIDE("editor/play", "macos", KEY_MASK_CMD | KEY_B);
+ play_button->set_shortcut(ED_GET_SHORTCUT("editor/play"));
pause_button = memnew(Button);
pause_button->set_flat(true);
@@ -6465,11 +6528,10 @@ EditorNode::EditorNode() {
pause_button->set_tooltip(TTR("Pause the scene execution for debugging."));
pause_button->set_disabled(true);
play_hb->add_child(pause_button);
-#ifdef OSX_ENABLED
- pause_button->set_shortcut(ED_SHORTCUT("editor/pause_scene", TTR("Pause Scene"), KEY_MASK_CMD | KEY_MASK_CTRL | KEY_Y));
-#else
- pause_button->set_shortcut(ED_SHORTCUT("editor/pause_scene", TTR("Pause Scene"), KEY_F7));
-#endif
+
+ ED_SHORTCUT("editor/pause_scene", TTR("Pause Scene"), KEY_F7);
+ ED_SHORTCUT_OVERRIDE("editor/pause_scene", "macos", KEY_MASK_CMD | KEY_MASK_CTRL | KEY_Y);
+ pause_button->set_shortcut(ED_GET_SHORTCUT("editor/pause_scene"));
stop_button = memnew(Button);
stop_button->set_flat(true);
@@ -6479,11 +6541,10 @@ EditorNode::EditorNode() {
stop_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_STOP));
stop_button->set_tooltip(TTR("Stop the scene."));
stop_button->set_disabled(true);
-#ifdef OSX_ENABLED
- stop_button->set_shortcut(ED_SHORTCUT("editor/stop", TTR("Stop"), KEY_MASK_CMD | KEY_PERIOD));
-#else
- stop_button->set_shortcut(ED_SHORTCUT("editor/stop", TTR("Stop"), KEY_F8));
-#endif
+
+ ED_SHORTCUT("editor/stop", TTR("Stop"), KEY_F8);
+ ED_SHORTCUT_OVERRIDE("editor/stop", "macos", KEY_MASK_CMD | KEY_PERIOD);
+ stop_button->set_shortcut(ED_GET_SHORTCUT("editor/stop"));
run_native = memnew(EditorRunNative);
play_hb->add_child(run_native);
@@ -6497,11 +6558,10 @@ EditorNode::EditorNode() {
play_scene_button->set_icon(gui_base->get_theme_icon(SNAME("PlayScene"), SNAME("EditorIcons")));
play_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_PLAY_SCENE));
play_scene_button->set_tooltip(TTR("Play the edited scene."));
-#ifdef OSX_ENABLED
- play_scene_button->set_shortcut(ED_SHORTCUT_AND_COMMAND("editor/play_scene", TTR("Play Scene"), KEY_MASK_CMD | KEY_R));
-#else
- play_scene_button->set_shortcut(ED_SHORTCUT_AND_COMMAND("editor/play_scene", TTR("Play Scene"), KEY_F6));
-#endif
+
+ ED_SHORTCUT_AND_COMMAND("editor/play_scene", TTR("Play Scene"), KEY_F6);
+ ED_SHORTCUT_OVERRIDE("editor/play_scene", "macos", KEY_MASK_CMD | KEY_R);
+ play_scene_button->set_shortcut(ED_GET_SHORTCUT("editor/play_scene"));
play_custom_scene_button = memnew(Button);
play_custom_scene_button->set_flat(true);
@@ -6511,11 +6571,10 @@ EditorNode::EditorNode() {
play_custom_scene_button->set_icon(gui_base->get_theme_icon(SNAME("PlayCustom"), SNAME("EditorIcons")));
play_custom_scene_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_PLAY_CUSTOM_SCENE));
play_custom_scene_button->set_tooltip(TTR("Play custom scene"));
-#ifdef OSX_ENABLED
- play_custom_scene_button->set_shortcut(ED_SHORTCUT_AND_COMMAND("editor/play_custom_scene", TTR("Play Custom Scene"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_R));
-#else
- play_custom_scene_button->set_shortcut(ED_SHORTCUT_AND_COMMAND("editor/play_custom_scene", TTR("Play Custom Scene"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F5));
-#endif
+
+ ED_SHORTCUT_AND_COMMAND("editor/play_custom_scene", TTR("Play Custom Scene"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F5);
+ ED_SHORTCUT_OVERRIDE("editor/play_custom_scene", "macos", KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_R);
+ play_custom_scene_button->set_shortcut(ED_GET_SHORTCUT("editor/play_custom_scene"));
HBoxContainer *right_menu_hb = memnew(HBoxContainer);
menu_hb->add_child(right_menu_hb);
@@ -6767,6 +6826,10 @@ EditorNode::EditorNode() {
file_export_lib_merge->set_text(TTR("Merge With Existing"));
file_export_lib_merge->set_pressed(true);
file_export_lib->get_vbox()->add_child(file_export_lib_merge);
+ file_export_lib_apply_xforms = memnew(CheckBox);
+ file_export_lib_apply_xforms->set_text(TTR("Apply MeshInstance Transforms"));
+ file_export_lib_apply_xforms->set_pressed(false);
+ file_export_lib->get_vbox()->add_child(file_export_lib_apply_xforms);
gui_base->add_child(file_export_lib);
file_script = memnew(EditorFileDialog);
@@ -6792,7 +6855,6 @@ EditorNode::EditorNode() {
preview_gen = memnew(AudioStreamPreviewGenerator);
add_child(preview_gen);
- //plugin stuff
add_editor_plugin(memnew(DebuggerEditorPlugin(this, debug_menu)));
add_editor_plugin(memnew(DebugAdapterServer()));
@@ -7048,20 +7110,19 @@ EditorNode::EditorNode() {
ResourceSaver::set_save_callback(_resource_saved);
ResourceLoader::set_load_callback(_resource_loaded);
-#ifdef OSX_ENABLED
- ED_SHORTCUT_AND_COMMAND("editor/editor_2d", TTR("Open 2D Editor"), KEY_MASK_ALT | KEY_1);
- ED_SHORTCUT_AND_COMMAND("editor/editor_3d", TTR("Open 3D Editor"), KEY_MASK_ALT | KEY_2);
- ED_SHORTCUT_AND_COMMAND("editor/editor_script", TTR("Open Script Editor"), KEY_MASK_ALT | KEY_3);
- ED_SHORTCUT_AND_COMMAND("editor/editor_assetlib", TTR("Open Asset Library"), KEY_MASK_ALT | KEY_4);
-#else
// Use the Ctrl modifier so F2 can be used to rename nodes in the scene tree dock.
ED_SHORTCUT_AND_COMMAND("editor/editor_2d", TTR("Open 2D Editor"), KEY_MASK_CTRL | KEY_F1);
ED_SHORTCUT_AND_COMMAND("editor/editor_3d", TTR("Open 3D Editor"), KEY_MASK_CTRL | KEY_F2);
ED_SHORTCUT_AND_COMMAND("editor/editor_script", TTR("Open Script Editor"), KEY_MASK_CTRL | KEY_F3);
ED_SHORTCUT_AND_COMMAND("editor/editor_assetlib", TTR("Open Asset Library"), KEY_MASK_CTRL | KEY_F4);
-#endif
- ED_SHORTCUT_AND_COMMAND("editor/editor_next", TTR("Next Editor Tab"));
- ED_SHORTCUT_AND_COMMAND("editor/editor_prev", TTR("Previous Editor Tab"));
+
+ ED_SHORTCUT_OVERRIDE("editor/editor_2d", "macos", KEY_MASK_ALT | KEY_1);
+ ED_SHORTCUT_OVERRIDE("editor/editor_3d", "macos", KEY_MASK_ALT | KEY_2);
+ ED_SHORTCUT_OVERRIDE("editor/editor_script", "macos", KEY_MASK_ALT | KEY_3);
+ ED_SHORTCUT_OVERRIDE("editor/editor_assetlib", "macos", KEY_MASK_ALT | KEY_4);
+
+ ED_SHORTCUT_AND_COMMAND("editor/editor_next", TTR("Open the next Editor"));
+ ED_SHORTCUT_AND_COMMAND("editor/editor_prev", TTR("Open the previous Editor"));
screenshot_timer = memnew(Timer);
screenshot_timer->set_one_shot(true);
diff --git a/editor/editor_node.h b/editor/editor_node.h
index 911139f470..d1f4cf8452 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -32,7 +32,6 @@
#define EDITOR_NODE_H
#include "core/templates/safe_refcount.h"
-#include "editor/editor_command_palette.h"
#include "editor/editor_data.h"
#include "editor/editor_export.h"
#include "editor/editor_folding.h"
@@ -92,6 +91,8 @@ class VSplitContainer;
class Window;
class SubViewport;
class SceneImportSettings;
+class EditorExtensionManager;
+class DynamicFontImportSettings;
class EditorNode : public Node {
GDCLASS(EditorNode, Node);
@@ -307,6 +308,7 @@ private:
ConfirmationDialog *pick_main_scene;
Button *select_current_scene_button;
AcceptDialog *accept;
+ AcceptDialog *save_accept;
EditorAbout *about;
AcceptDialog *warning;
@@ -333,6 +335,7 @@ private:
EditorFileDialog *file_script;
EditorFileDialog *file_android_build_source;
CheckBox *file_export_lib_merge;
+ CheckBox *file_export_lib_apply_xforms;
String current_path;
MenuButton *update_spinner;
@@ -421,6 +424,7 @@ private:
EditorResourcePreview *resource_preview;
EditorFolding editor_folding;
+ DynamicFontImportSettings *fontdata_import_settings;
SceneImportSettings *scene_import_settings;
struct BottomPanelItem {
String name;
@@ -530,7 +534,7 @@ private:
bool convert_old;
- void _unhandled_input(const Ref<InputEvent> &p_event);
+ virtual void unhandled_input(const Ref<InputEvent> &p_event) override;
static void _load_error_notify(void *p_ud, const String &p_text);
@@ -675,6 +679,11 @@ private:
void _pick_main_scene_custom_action(const String &p_custom_action_name);
+ bool immediate_dialog_confirmed = false;
+ void _immediate_dialog_confirmed();
+
+ void _select_default_main_screen_plugin();
+
protected:
void _notification(int p_what);
@@ -806,6 +815,7 @@ public:
Ref<Texture2D> get_class_icon(const String &p_class, const String &p_fallback = "Object") const;
void show_accept(const String &p_text, const String &p_title);
+ void show_save_accept(const String &p_text, const String &p_title);
void show_warning(const String &p_text, const String &p_title = TTR("Warning!"));
void _copy_warning(const String &p_str);
@@ -892,12 +902,15 @@ public:
bool ensure_main_scene(bool p_from_native);
+ Error run_play_native(int p_idx, int p_platform);
void run_play();
void run_play_current();
void run_play_custom(const String &p_custom);
void run_stop();
bool is_run_playing() const;
String get_run_playing_scene() const;
+
+ static bool immediate_confirmation_dialog(const String &p_text, const String &p_ok_text = TTR("Ok"), const String &p_cancel_text = TTR("Cancel"));
};
struct EditorProgress {
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 98b5ec7d56..7afc8d4c83 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -30,6 +30,7 @@
#include "editor_plugin.h"
+#include "editor/editor_command_palette.h"
#include "editor/editor_export.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
@@ -103,7 +104,7 @@ Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh
RS::get_singleton()->instance_set_transform(inst, mesh_xform);
AABB aabb = mesh->get_aabb();
- Vector3 ofs = aabb.position + aabb.size * 0.5;
+ Vector3 ofs = aabb.get_center();
aabb.position -= ofs;
Transform3D xform;
xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI / 6);
@@ -218,7 +219,7 @@ Array EditorInterface::get_open_scenes() const {
if (scenes[idx_scn].root == nullptr) {
continue;
}
- ret.push_back(scenes[idx_scn].root->get_filename());
+ ret.push_back(scenes[idx_scn].root->get_scene_file_path());
}
return ret;
}
@@ -290,11 +291,11 @@ Error EditorInterface::save_scene() {
if (!get_edited_scene_root()) {
return ERR_CANT_CREATE;
}
- if (get_edited_scene_root()->get_filename() == String()) {
+ if (get_edited_scene_root()->get_scene_file_path() == String()) {
return ERR_CANT_CREATE;
}
- save_scene_as(get_edited_scene_root()->get_filename());
+ save_scene_as(get_edited_scene_root()->get_scene_file_path());
return OK;
}
@@ -558,22 +559,19 @@ void EditorPlugin::notify_resource_saved(const Ref<Resource> &p_resource) {
}
bool EditorPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p_event) {
- if (get_script_instance() && get_script_instance()->has_method("_forward_canvas_gui_input")) {
- return get_script_instance()->call("_forward_canvas_gui_input", p_event);
+ bool success;
+ if (GDVIRTUAL_CALL(_forward_canvas_gui_input, p_event, success)) {
+ return success;
}
return false;
}
void EditorPlugin::forward_canvas_draw_over_viewport(Control *p_overlay) {
- if (get_script_instance() && get_script_instance()->has_method("_forward_canvas_draw_over_viewport")) {
- get_script_instance()->call("_forward_canvas_draw_over_viewport", p_overlay);
- }
+ GDVIRTUAL_CALL(_forward_canvas_draw_over_viewport, p_overlay);
}
void EditorPlugin::forward_canvas_force_draw_over_viewport(Control *p_overlay) {
- if (get_script_instance() && get_script_instance()->has_method("_forward_canvas_force_draw_over_viewport")) {
- get_script_instance()->call("_forward_canvas_force_draw_over_viewport", p_overlay);
- }
+ GDVIRTUAL_CALL(_forward_canvas_force_draw_over_viewport, p_overlay);
}
// Updates the overlays of the 2D viewport or, if in 3D mode, of every 3D viewport.
@@ -596,110 +594,101 @@ int EditorPlugin::update_overlays() const {
}
bool EditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) {
- if (get_script_instance() && get_script_instance()->has_method("_forward_spatial_gui_input")) {
- return get_script_instance()->call("_forward_spatial_gui_input", p_camera, p_event);
+ bool success;
+
+ if (GDVIRTUAL_CALL(_forward_3d_gui_input, p_camera, p_event, success)) {
+ return success;
}
return false;
}
void EditorPlugin::forward_spatial_draw_over_viewport(Control *p_overlay) {
- if (get_script_instance() && get_script_instance()->has_method("_forward_spatial_draw_over_viewport")) {
- get_script_instance()->call("_forward_spatial_draw_over_viewport", p_overlay);
- }
+ GDVIRTUAL_CALL(_forward_3d_draw_over_viewport, p_overlay);
}
void EditorPlugin::forward_spatial_force_draw_over_viewport(Control *p_overlay) {
- if (get_script_instance() && get_script_instance()->has_method("_forward_spatial_force_draw_over_viewport")) {
- get_script_instance()->call("_forward_spatial_force_draw_over_viewport", p_overlay);
- }
+ GDVIRTUAL_CALL(_forward_3d_force_draw_over_viewport, p_overlay);
}
String EditorPlugin::get_name() const {
- if (get_script_instance() && get_script_instance()->has_method("_get_plugin_name")) {
- return get_script_instance()->call("_get_plugin_name");
+ String name;
+ if (GDVIRTUAL_CALL(_get_plugin_name, name)) {
+ return name;
}
return String();
}
const Ref<Texture2D> EditorPlugin::get_icon() const {
- if (get_script_instance() && get_script_instance()->has_method("_get_plugin_icon")) {
- return get_script_instance()->call("_get_plugin_icon");
+ Ref<Texture2D> icon;
+ if (GDVIRTUAL_CALL(_get_plugin_icon, icon)) {
+ return icon;
}
return Ref<Texture2D>();
}
bool EditorPlugin::has_main_screen() const {
- if (get_script_instance() && get_script_instance()->has_method("_has_main_screen")) {
- return get_script_instance()->call("_has_main_screen");
+ bool success;
+ if (GDVIRTUAL_CALL(_has_main_screen, success)) {
+ return success;
}
return false;
}
void EditorPlugin::make_visible(bool p_visible) {
- if (get_script_instance() && get_script_instance()->has_method("_make_visible")) {
- get_script_instance()->call("_make_visible", p_visible);
- }
+ GDVIRTUAL_CALL(_make_visible, p_visible);
}
void EditorPlugin::edit(Object *p_object) {
- if (get_script_instance() && get_script_instance()->has_method("_edit")) {
- if (p_object->is_class("Resource")) {
- get_script_instance()->call("_edit", Ref<Resource>(Object::cast_to<Resource>(p_object)));
- } else {
- get_script_instance()->call("_edit", p_object);
- }
+ if (p_object->is_class("Resource")) {
+ GDVIRTUAL_CALL(_edit, Ref<Resource>(Object::cast_to<Resource>(p_object)));
+ } else {
+ GDVIRTUAL_CALL(_edit, p_object);
}
}
bool EditorPlugin::handles(Object *p_object) const {
- if (get_script_instance() && get_script_instance()->has_method("_handles")) {
- return get_script_instance()->call("_handles", p_object);
+ bool success;
+ if (GDVIRTUAL_CALL(_handles, p_object, success)) {
+ return success;
}
return false;
}
Dictionary EditorPlugin::get_state() const {
- if (get_script_instance() && get_script_instance()->has_method("_get_state")) {
- return get_script_instance()->call("_get_state");
+ Dictionary state;
+ if (GDVIRTUAL_CALL(_get_state, state)) {
+ return state;
}
return Dictionary();
}
void EditorPlugin::set_state(const Dictionary &p_state) {
- if (get_script_instance() && get_script_instance()->has_method("_set_state")) {
- get_script_instance()->call("_set_state", p_state);
- }
+ GDVIRTUAL_CALL(_set_state, p_state);
}
void EditorPlugin::clear() {
- if (get_script_instance() && get_script_instance()->has_method("_clear")) {
- get_script_instance()->call("_clear");
- }
+ GDVIRTUAL_CALL(_clear);
}
// if editor references external resources/scenes, save them
void EditorPlugin::save_external_data() {
- if (get_script_instance() && get_script_instance()->has_method("_save_external_data")) {
- get_script_instance()->call("_save_external_data");
- }
+ GDVIRTUAL_CALL(_save_external_data);
}
// if changes are pending in editor, apply them
void EditorPlugin::apply_changes() {
- if (get_script_instance() && get_script_instance()->has_method("_apply_changes")) {
- get_script_instance()->call("_apply_changes");
- }
+ GDVIRTUAL_CALL(_apply_changes);
}
void EditorPlugin::get_breakpoints(List<String> *p_breakpoints) {
- if (get_script_instance() && get_script_instance()->has_method("_get_breakpoints")) {
- PackedStringArray arr = get_script_instance()->call("_get_breakpoints");
+ PackedStringArray arr;
+ if (GDVIRTUAL_CALL(_get_breakpoints, arr)) {
for (int i = 0; i < arr.size(); i++) {
p_breakpoints->push_back(arr[i]);
}
@@ -796,37 +785,28 @@ int find(const PackedStringArray &a, const String &v) {
void EditorPlugin::enable_plugin() {
// Called when the plugin gets enabled in project settings, after it's added to the tree.
// You can implement it to register autoloads.
- if (get_script_instance() && get_script_instance()->has_method("_enable_plugin")) {
- get_script_instance()->call("_enable_plugin");
- }
+ GDVIRTUAL_CALL(_enable_plugin);
}
void EditorPlugin::disable_plugin() {
// Last function called when the plugin gets disabled in project settings.
// Implement it to cleanup things from the project, such as unregister autoloads.
-
- if (get_script_instance() && get_script_instance()->has_method("_disable_plugin")) {
- get_script_instance()->call("_disable_plugin");
- }
+ GDVIRTUAL_CALL(_disable_plugin);
}
void EditorPlugin::set_window_layout(Ref<ConfigFile> p_layout) {
- if (get_script_instance() && get_script_instance()->has_method("_set_window_layout")) {
- get_script_instance()->call("_set_window_layout", p_layout);
- }
+ GDVIRTUAL_CALL(_set_window_layout, p_layout);
}
void EditorPlugin::get_window_layout(Ref<ConfigFile> p_layout) {
- if (get_script_instance() && get_script_instance()->has_method("_get_window_layout")) {
- get_script_instance()->call("_get_window_layout", p_layout);
- }
+ GDVIRTUAL_CALL(_get_window_layout, p_layout);
}
bool EditorPlugin::build() {
- if (get_script_instance() && get_script_instance()->has_method("_build")) {
- return get_script_instance()->call("_build");
+ bool success;
+ if (GDVIRTUAL_CALL(_build, success)) {
+ return success;
}
-
return true;
}
@@ -915,29 +895,29 @@ void EditorPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_debugger_plugin", "script"), &EditorPlugin::add_debugger_plugin);
ClassDB::bind_method(D_METHOD("remove_debugger_plugin", "script"), &EditorPlugin::remove_debugger_plugin);
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_forward_canvas_gui_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
- BIND_VMETHOD(MethodInfo("_forward_canvas_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
- BIND_VMETHOD(MethodInfo("_forward_canvas_force_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_forward_spatial_gui_input", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
- BIND_VMETHOD(MethodInfo("_forward_spatial_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
- BIND_VMETHOD(MethodInfo("_forward_spatial_force_draw_over_viewport", PropertyInfo(Variant::OBJECT, "overlay", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_plugin_name"));
- BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "_get_plugin_icon"));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_has_main_screen"));
- BIND_VMETHOD(MethodInfo("_make_visible", PropertyInfo(Variant::BOOL, "visible")));
- BIND_VMETHOD(MethodInfo("_edit", PropertyInfo(Variant::OBJECT, "object")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_handles", PropertyInfo(Variant::OBJECT, "object")));
- BIND_VMETHOD(MethodInfo(Variant::DICTIONARY, "_get_state"));
- BIND_VMETHOD(MethodInfo("_set_state", PropertyInfo(Variant::DICTIONARY, "state")));
- BIND_VMETHOD(MethodInfo("_clear"));
- BIND_VMETHOD(MethodInfo("_save_external_data"));
- BIND_VMETHOD(MethodInfo("_apply_changes"));
- BIND_VMETHOD(MethodInfo(Variant::PACKED_STRING_ARRAY, "_get_breakpoints"));
- BIND_VMETHOD(MethodInfo("_set_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile")));
- BIND_VMETHOD(MethodInfo("_get_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_build"));
- BIND_VMETHOD(MethodInfo("_enable_plugin"));
- BIND_VMETHOD(MethodInfo("_disable_plugin"));
+ GDVIRTUAL_BIND(_forward_canvas_gui_input, "event");
+ GDVIRTUAL_BIND(_forward_canvas_draw_over_viewport, "viewport_control");
+ GDVIRTUAL_BIND(_forward_canvas_force_draw_over_viewport, "viewport_control");
+ GDVIRTUAL_BIND(_forward_3d_gui_input, "viewport_camera", "event");
+ GDVIRTUAL_BIND(_forward_3d_draw_over_viewport, "viewport_control");
+ GDVIRTUAL_BIND(_forward_3d_force_draw_over_viewport, "viewport_control");
+ GDVIRTUAL_BIND(_get_plugin_name);
+ GDVIRTUAL_BIND(_get_plugin_icon);
+ GDVIRTUAL_BIND(_has_main_screen);
+ GDVIRTUAL_BIND(_make_visible, "visible");
+ GDVIRTUAL_BIND(_edit, "object");
+ GDVIRTUAL_BIND(_handles, "object");
+ GDVIRTUAL_BIND(_get_state);
+ GDVIRTUAL_BIND(_set_state, "state");
+ GDVIRTUAL_BIND(_clear);
+ GDVIRTUAL_BIND(_save_external_data);
+ GDVIRTUAL_BIND(_apply_changes);
+ GDVIRTUAL_BIND(_get_breakpoints);
+ GDVIRTUAL_BIND(_set_window_layout, "configuration");
+ GDVIRTUAL_BIND(_get_window_layout, "configuration");
+ GDVIRTUAL_BIND(_build);
+ GDVIRTUAL_BIND(_enable_plugin);
+ GDVIRTUAL_BIND(_disable_plugin);
ADD_SIGNAL(MethodInfo("scene_changed", PropertyInfo(Variant::OBJECT, "scene_root", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
ADD_SIGNAL(MethodInfo("scene_closed", PropertyInfo(Variant::STRING, "filepath")));
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index d665278144..169106d901 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -39,9 +39,9 @@
#include "editor/import/editor_import_plugin.h"
#include "editor/import/resource_importer_scene.h"
#include "editor/script_create_dialog.h"
+#include "scene/3d/camera_3d.h"
#include "scene/main/node.h"
#include "scene/resources/texture.h"
-
class EditorNode;
class Node3D;
class Camera3D;
@@ -148,6 +148,30 @@ protected:
void add_custom_type(const String &p_type, const String &p_base, const Ref<Script> &p_script, const Ref<Texture2D> &p_icon);
void remove_custom_type(const String &p_type);
+ GDVIRTUAL1R(bool, _forward_canvas_gui_input, Ref<InputEvent>)
+ GDVIRTUAL1(_forward_canvas_draw_over_viewport, Control *)
+ GDVIRTUAL1(_forward_canvas_force_draw_over_viewport, Control *)
+ GDVIRTUAL2R(bool, _forward_3d_gui_input, Camera3D *, Ref<InputEvent>)
+ GDVIRTUAL1(_forward_3d_draw_over_viewport, Control *)
+ GDVIRTUAL1(_forward_3d_force_draw_over_viewport, Control *)
+ GDVIRTUAL0RC(String, _get_plugin_name)
+ GDVIRTUAL0RC(Ref<Texture2D>, _get_plugin_icon)
+ GDVIRTUAL0RC(bool, _has_main_screen)
+ GDVIRTUAL1(_make_visible, bool)
+ GDVIRTUAL1(_edit, Variant)
+ GDVIRTUAL1RC(bool, _handles, Variant)
+ GDVIRTUAL0RC(Dictionary, _get_state)
+ GDVIRTUAL1(_set_state, Dictionary)
+ GDVIRTUAL0(_clear)
+ GDVIRTUAL0(_save_external_data)
+ GDVIRTUAL0(_apply_changes)
+ GDVIRTUAL0RC(Vector<String>, _get_breakpoints)
+ GDVIRTUAL1(_set_window_layout, Ref<ConfigFile>)
+ GDVIRTUAL1(_get_window_layout, Ref<ConfigFile>)
+ GDVIRTUAL0R(bool, _build)
+ GDVIRTUAL0(_enable_plugin)
+ GDVIRTUAL0(_disable_plugin)
+
public:
enum CustomControlContainer {
CONTAINER_TOOLBAR,
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 99619cfc40..c0dadc4484 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -51,6 +51,10 @@ EditorPropertyNil::EditorPropertyNil() {
///////////////////// TEXT /////////////////////////
+void EditorPropertyText::_set_read_only(bool p_read_only) {
+ text->set_editable(!p_read_only);
+};
+
void EditorPropertyText::_text_submitted(const String &p_string) {
if (updating) {
return;
@@ -68,9 +72,9 @@ void EditorPropertyText::_text_changed(const String &p_string) {
}
if (string_name) {
- emit_changed(get_edited_property(), StringName(p_string), "", true);
+ emit_changed(get_edited_property(), StringName(p_string));
} else {
- emit_changed(get_edited_property(), p_string, "", true);
+ emit_changed(get_edited_property(), p_string);
}
}
@@ -108,6 +112,11 @@ EditorPropertyText::EditorPropertyText() {
///////////////////// MULTILINE TEXT /////////////////////////
+void EditorPropertyMultilineText::_set_read_only(bool p_read_only) {
+ text->set_editable(!p_read_only);
+ open_big_text->set_disabled(p_read_only);
+};
+
void EditorPropertyMultilineText::_big_text_changed() {
text->set_text(big_text->get_text());
emit_changed(get_edited_property(), big_text->get_text(), "", true);
@@ -180,6 +189,11 @@ EditorPropertyMultilineText::EditorPropertyMultilineText() {
///////////////////// TEXT ENUM /////////////////////////
+void EditorPropertyTextEnum::_set_read_only(bool p_read_only) {
+ option_button->set_disabled(p_read_only);
+ edit_button->set_disabled(p_read_only);
+};
+
void EditorPropertyTextEnum::_emit_changed_value(String p_string) {
if (string_name) {
emit_changed(get_edited_property(), StringName(p_string));
@@ -328,6 +342,11 @@ EditorPropertyTextEnum::EditorPropertyTextEnum() {
///////////////////// PATH /////////////////////////
+void EditorPropertyPath::_set_read_only(bool p_read_only) {
+ path->set_editable(!p_read_only);
+ path_edit->set_disabled(p_read_only);
+};
+
void EditorPropertyPath::_path_selected(const String &p_path) {
emit_changed(get_edited_property(), p_path);
update_property();
@@ -420,6 +439,10 @@ EditorPropertyPath::EditorPropertyPath() {
///////////////////// CLASS NAME /////////////////////////
+void EditorPropertyClassName::_set_read_only(bool p_read_only) {
+ property->set_disabled(p_read_only);
+};
+
void EditorPropertyClassName::setup(const String &p_base_type, const String &p_selected_type) {
base_type = p_base_type;
dialog->set_base_type(base_type);
@@ -461,6 +484,10 @@ EditorPropertyClassName::EditorPropertyClassName() {
///////////////////// MEMBER /////////////////////////
+void EditorPropertyMember::_set_read_only(bool p_read_only) {
+ property->set_disabled(p_read_only);
+};
+
void EditorPropertyMember::_property_selected(const String &p_selected) {
emit_changed(get_edited_property(), p_selected);
update_property();
@@ -557,6 +584,11 @@ EditorPropertyMember::EditorPropertyMember() {
}
///////////////////// CHECK /////////////////////////
+
+void EditorPropertyCheck::_set_read_only(bool p_read_only) {
+ checkbox->set_disabled(p_read_only);
+};
+
void EditorPropertyCheck::_checkbox_pressed() {
emit_changed(get_edited_property(), checkbox->is_pressed());
}
@@ -580,6 +612,10 @@ EditorPropertyCheck::EditorPropertyCheck() {
///////////////////// ENUM /////////////////////////
+void EditorPropertyEnum::_set_read_only(bool p_read_only) {
+ options->set_disabled(p_read_only);
+};
+
void EditorPropertyEnum::_option_selected(int p_which) {
int64_t val = options->get_item_metadata(p_which);
emit_changed(get_edited_property(), val);
@@ -628,6 +664,12 @@ EditorPropertyEnum::EditorPropertyEnum() {
///////////////////// FLAGS /////////////////////////
+void EditorPropertyFlags::_set_read_only(bool p_read_only) {
+ for (CheckBox *check : flags) {
+ check->set_disabled(p_read_only);
+ }
+};
+
void EditorPropertyFlags::_flag_toggled() {
uint32_t value = 0;
for (int i = 0; i < flags.size(); i++) {
@@ -698,6 +740,7 @@ private:
bool expanded = false;
int expansion_rows = 0;
int hovered_index = -1;
+ bool read_only = false;
Size2 get_grid_size() const {
Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Label"));
@@ -712,6 +755,10 @@ public:
Vector<String> names;
Vector<String> tooltips;
+ void set_read_only(bool p_read_only) {
+ read_only = p_read_only;
+ }
+
virtual Size2 get_minimum_size() const override {
Size2 min_size = get_grid_size();
@@ -735,7 +782,10 @@ public:
return String();
}
- void _gui_input(const Ref<InputEvent> &p_ev) {
+ void gui_input(const Ref<InputEvent> &p_ev) override {
+ if (read_only) {
+ return;
+ }
const Ref<InputEventMouseMotion> mm = p_ev;
if (mm.is_valid()) {
bool expand_was_hovered = expand_hovered;
@@ -799,12 +849,12 @@ public:
const int bsize = (grid_size.height * 80 / 100) / 2;
const int h = bsize * 2 + 1;
- Color color = get_theme_color(SNAME("highlight_color"), SNAME("Editor"));
+ Color color = get_theme_color(read_only ? SNAME("disabled_highlight_color") : SNAME("highlight_color"), SNAME("Editor"));
- Color text_color = get_theme_color(SNAME("font_color"), SNAME("Editor"));
+ Color text_color = get_theme_color(read_only ? SNAME("disabled_font_color") : SNAME("font_color"), SNAME("Editor"));
text_color.a *= 0.5;
- Color text_color_on = get_theme_color(SNAME("font_hover_color"), SNAME("Editor"));
+ Color text_color_on = get_theme_color(read_only ? SNAME("disabled_font_color") : SNAME("font_hover_color"), SNAME("Editor"));
text_color_on.a *= 0.7;
const int vofs = (grid_size.height - h) / 2;
@@ -851,7 +901,7 @@ public:
if (layer_index >= layer_count) {
if (!flag_rects.is_empty() && (expansion_rows == 0)) {
const Rect2 &last_rect = flag_rects[flag_rects.size() - 1];
- arrow_pos = last_rect.position + last_rect.size;
+ arrow_pos = last_rect.get_end();
}
break;
}
@@ -863,7 +913,7 @@ public:
// Keep last valid cell position for the expansion icon.
if (!flag_rects.is_empty() && (expansion_rows == 0)) {
const Rect2 &last_rect = flag_rects[flag_rects.size() - 1];
- arrow_pos = last_rect.position + last_rect.size;
+ arrow_pos = last_rect.get_end();
}
++expansion_rows;
@@ -931,11 +981,15 @@ public:
}
static void _bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &EditorPropertyLayersGrid::_gui_input);
ADD_SIGNAL(MethodInfo("flag_changed", PropertyInfo(Variant::INT, "flag")));
}
};
+void EditorPropertyLayers::_set_read_only(bool p_read_only) {
+ button->set_disabled(p_read_only);
+ grid->set_read_only(p_read_only);
+};
+
void EditorPropertyLayers::_grid_changed(uint32_t p_grid) {
emit_changed(get_edited_property(), p_grid);
}
@@ -1072,6 +1126,10 @@ EditorPropertyLayers::EditorPropertyLayers() {
///////////////////// INT /////////////////////////
+void EditorPropertyInteger::_set_read_only(bool p_read_only) {
+ spin->set_read_only(p_read_only);
+};
+
void EditorPropertyInteger::_value_changed(int64_t val) {
if (setting) {
return;
@@ -1114,6 +1172,10 @@ EditorPropertyInteger::EditorPropertyInteger() {
///////////////////// OBJECT ID /////////////////////////
+void EditorPropertyObjectID::_set_read_only(bool p_read_only) {
+ edit->set_disabled(p_read_only);
+};
+
void EditorPropertyObjectID::_edit_pressed() {
emit_signal(SNAME("object_id_selected"), get_edited_property(), get_edited_object()->get(get_edited_property()));
}
@@ -1152,6 +1214,10 @@ EditorPropertyObjectID::EditorPropertyObjectID() {
///////////////////// FLOAT /////////////////////////
+void EditorPropertyFloat::_set_read_only(bool p_read_only) {
+ spin->set_read_only(p_read_only);
+};
+
void EditorPropertyFloat::_value_changed(double val) {
if (setting) {
return;
@@ -1198,7 +1264,14 @@ EditorPropertyFloat::EditorPropertyFloat() {
///////////////////// EASING /////////////////////////
+void EditorPropertyEasing::_set_read_only(bool p_read_only) {
+ spin->set_read_only(p_read_only);
+};
+
void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) {
+ if (is_read_only()) {
+ return;
+ }
const Ref<InputEventMouseButton> mb = p_ev;
if (mb.is_valid()) {
if (mb->is_double_click() && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
@@ -1272,12 +1345,12 @@ void EditorPropertyEasing::_draw_easing() {
const Ref<Font> f = get_theme_font(SNAME("font"), SNAME("Label"));
int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Label"));
- const Color font_color = get_theme_color(SNAME("font_color"), SNAME("Label"));
+ const Color font_color = get_theme_color(is_read_only() ? SNAME("font_uneditable_color") : SNAME("font_color"), SNAME("LineEdit"));
Color line_color;
if (dragging) {
line_color = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
} else {
- line_color = get_theme_color(SNAME("font_color"), SNAME("Label")) * Color(1, 1, 1, 0.9);
+ line_color = get_theme_color(is_read_only() ? SNAME("font_uneditable_color") : SNAME("font_color"), SNAME("LineEdit")) * Color(1, 1, 1, 0.9);
}
Vector<Point2> points;
@@ -1410,6 +1483,12 @@ EditorPropertyEasing::EditorPropertyEasing() {
///////////////////// VECTOR2 /////////////////////////
+void EditorPropertyVector2::_set_read_only(bool p_read_only) {
+ for (int i = 0; i < 2; i++) {
+ spin[i]->set_read_only(p_read_only);
+ }
+};
+
void EditorPropertyVector2::_value_changed(double val, const String &p_name) {
if (setting) {
return;
@@ -1431,11 +1510,9 @@ void EditorPropertyVector2::update_property() {
void EditorPropertyVector2::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ const Color *colors = _get_property_colors();
for (int i = 0; i < 2; i++) {
- Color c = base;
- c.set_hsv(float(i) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
- spin[i]->set_custom_label_color(true, c);
+ spin[i]->set_custom_label_color(true, colors[i]);
}
}
}
@@ -1493,6 +1570,12 @@ EditorPropertyVector2::EditorPropertyVector2(bool p_force_wide) {
///////////////////// RECT2 /////////////////////////
+void EditorPropertyRect2::_set_read_only(bool p_read_only) {
+ for (int i = 0; i < 4; i++) {
+ spin[i]->set_read_only(p_read_only);
+ }
+};
+
void EditorPropertyRect2::_value_changed(double val, const String &p_name) {
if (setting) {
return;
@@ -1518,11 +1601,9 @@ void EditorPropertyRect2::update_property() {
void EditorPropertyRect2::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ const Color *colors = _get_property_colors();
for (int i = 0; i < 4; i++) {
- Color c = base;
- c.set_hsv(float(i % 2) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
- spin[i]->set_custom_label_color(true, c);
+ spin[i]->set_custom_label_color(true, colors[i % 2]);
}
}
}
@@ -1590,6 +1671,12 @@ EditorPropertyRect2::EditorPropertyRect2(bool p_force_wide) {
///////////////////// VECTOR3 /////////////////////////
+void EditorPropertyVector3::_set_read_only(bool p_read_only) {
+ for (int i = 0; i < 3; i++) {
+ spin[i]->set_read_only(p_read_only);
+ }
+};
+
void EditorPropertyVector3::_value_changed(double val, const String &p_name) {
if (setting) {
return;
@@ -1640,11 +1727,9 @@ Vector3 EditorPropertyVector3::get_vector() {
void EditorPropertyVector3::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ const Color *colors = _get_property_colors();
for (int i = 0; i < 3; i++) {
- Color c = base;
- c.set_hsv(float(i) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
- spin[i]->set_custom_label_color(true, c);
+ spin[i]->set_custom_label_color(true, colors[i]);
}
}
}
@@ -1702,6 +1787,12 @@ EditorPropertyVector3::EditorPropertyVector3(bool p_force_wide) {
///////////////////// VECTOR2i /////////////////////////
+void EditorPropertyVector2i::_set_read_only(bool p_read_only) {
+ for (int i = 0; i < 2; i++) {
+ spin[i]->set_read_only(p_read_only);
+ }
+};
+
void EditorPropertyVector2i::_value_changed(double val, const String &p_name) {
if (setting) {
return;
@@ -1723,11 +1814,9 @@ void EditorPropertyVector2i::update_property() {
void EditorPropertyVector2i::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ const Color *colors = _get_property_colors();
for (int i = 0; i < 2; i++) {
- Color c = base;
- c.set_hsv(float(i) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
- spin[i]->set_custom_label_color(true, c);
+ spin[i]->set_custom_label_color(true, colors[i]);
}
}
}
@@ -1785,6 +1874,12 @@ EditorPropertyVector2i::EditorPropertyVector2i(bool p_force_wide) {
///////////////////// RECT2i /////////////////////////
+void EditorPropertyRect2i::_set_read_only(bool p_read_only) {
+ for (int i = 0; i < 4; i++) {
+ spin[i]->set_read_only(p_read_only);
+ }
+};
+
void EditorPropertyRect2i::_value_changed(double val, const String &p_name) {
if (setting) {
return;
@@ -1810,11 +1905,9 @@ void EditorPropertyRect2i::update_property() {
void EditorPropertyRect2i::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ const Color *colors = _get_property_colors();
for (int i = 0; i < 4; i++) {
- Color c = base;
- c.set_hsv(float(i % 2) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
- spin[i]->set_custom_label_color(true, c);
+ spin[i]->set_custom_label_color(true, colors[i % 2]);
}
}
}
@@ -1882,6 +1975,12 @@ EditorPropertyRect2i::EditorPropertyRect2i(bool p_force_wide) {
///////////////////// VECTOR3i /////////////////////////
+void EditorPropertyVector3i::_set_read_only(bool p_read_only) {
+ for (int i = 0; i < 3; i++) {
+ spin[i]->set_read_only(p_read_only);
+ }
+};
+
void EditorPropertyVector3i::_value_changed(double val, const String &p_name) {
if (setting) {
return;
@@ -1905,11 +2004,9 @@ void EditorPropertyVector3i::update_property() {
void EditorPropertyVector3i::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ const Color *colors = _get_property_colors();
for (int i = 0; i < 3; i++) {
- Color c = base;
- c.set_hsv(float(i) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
- spin[i]->set_custom_label_color(true, c);
+ spin[i]->set_custom_label_color(true, colors[i]);
}
}
}
@@ -1966,6 +2063,12 @@ EditorPropertyVector3i::EditorPropertyVector3i(bool p_force_wide) {
///////////////////// PLANE /////////////////////////
+void EditorPropertyPlane::_set_read_only(bool p_read_only) {
+ for (int i = 0; i < 4; i++) {
+ spin[i]->set_read_only(p_read_only);
+ }
+};
+
void EditorPropertyPlane::_value_changed(double val, const String &p_name) {
if (setting) {
return;
@@ -1991,11 +2094,9 @@ void EditorPropertyPlane::update_property() {
void EditorPropertyPlane::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
- for (int i = 0; i < 3; i++) {
- Color c = base;
- c.set_hsv(float(i) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
- spin[i]->set_custom_label_color(true, c);
+ const Color *colors = _get_property_colors();
+ for (int i = 0; i < 4; i++) {
+ spin[i]->set_custom_label_color(true, colors[i]);
}
}
}
@@ -2053,6 +2154,12 @@ EditorPropertyPlane::EditorPropertyPlane(bool p_force_wide) {
///////////////////// QUATERNION /////////////////////////
+void EditorPropertyQuaternion::_set_read_only(bool p_read_only) {
+ for (int i = 0; i < 4; i++) {
+ spin[i]->set_read_only(p_read_only);
+ }
+};
+
void EditorPropertyQuaternion::_value_changed(double val, const String &p_name) {
if (setting) {
return;
@@ -2078,11 +2185,9 @@ void EditorPropertyQuaternion::update_property() {
void EditorPropertyQuaternion::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
- for (int i = 0; i < 3; i++) {
- Color c = base;
- c.set_hsv(float(i) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
- spin[i]->set_custom_label_color(true, c);
+ const Color *colors = _get_property_colors();
+ for (int i = 0; i < 4; i++) {
+ spin[i]->set_custom_label_color(true, colors[i]);
}
}
}
@@ -2137,6 +2242,12 @@ EditorPropertyQuaternion::EditorPropertyQuaternion() {
///////////////////// AABB /////////////////////////
+void EditorPropertyAABB::_set_read_only(bool p_read_only) {
+ for (int i = 0; i < 6; i++) {
+ spin[i]->set_read_only(p_read_only);
+ }
+};
+
void EditorPropertyAABB::_value_changed(double val, const String &p_name) {
if (setting) {
return;
@@ -2168,11 +2279,9 @@ void EditorPropertyAABB::update_property() {
void EditorPropertyAABB::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ const Color *colors = _get_property_colors();
for (int i = 0; i < 6; i++) {
- Color c = base;
- c.set_hsv(float(i % 3) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
- spin[i]->set_custom_label_color(true, c);
+ spin[i]->set_custom_label_color(true, colors[i % 3]);
}
}
}
@@ -2214,6 +2323,12 @@ EditorPropertyAABB::EditorPropertyAABB() {
///////////////////// TRANSFORM2D /////////////////////////
+void EditorPropertyTransform2D::_set_read_only(bool p_read_only) {
+ for (int i = 0; i < 6; i++) {
+ spin[i]->set_read_only(p_read_only);
+ }
+};
+
void EditorPropertyTransform2D::_value_changed(double val, const String &p_name) {
if (setting) {
return;
@@ -2221,10 +2336,10 @@ void EditorPropertyTransform2D::_value_changed(double val, const String &p_name)
Transform2D p;
p[0][0] = spin[0]->get_value();
- p[0][1] = spin[1]->get_value();
- p[1][0] = spin[2]->get_value();
- p[1][1] = spin[3]->get_value();
- p[2][0] = spin[4]->get_value();
+ p[1][0] = spin[1]->get_value();
+ p[2][0] = spin[2]->get_value();
+ p[0][1] = spin[3]->get_value();
+ p[1][1] = spin[4]->get_value();
p[2][1] = spin[5]->get_value();
emit_changed(get_edited_property(), p, p_name);
@@ -2234,10 +2349,10 @@ void EditorPropertyTransform2D::update_property() {
Transform2D val = get_edited_object()->get(get_edited_property());
setting = true;
spin[0]->set_value(val[0][0]);
- spin[1]->set_value(val[0][1]);
- spin[2]->set_value(val[1][0]);
- spin[3]->set_value(val[1][1]);
- spin[4]->set_value(val[2][0]);
+ spin[1]->set_value(val[1][0]);
+ spin[2]->set_value(val[2][0]);
+ spin[3]->set_value(val[0][1]);
+ spin[4]->set_value(val[1][1]);
spin[5]->set_value(val[2][1]);
setting = false;
@@ -2245,11 +2360,14 @@ void EditorPropertyTransform2D::update_property() {
void EditorPropertyTransform2D::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ const Color *colors = _get_property_colors();
for (int i = 0; i < 6; i++) {
- Color c = base;
- c.set_hsv(float(i % 2) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
- spin[i]->set_custom_label_color(true, c);
+ // For Transform2D, use the 4th color (cyan) for the origin vector.
+ if (i % 3 == 2) {
+ spin[i]->set_custom_label_color(true, colors[3]);
+ } else {
+ spin[i]->set_custom_label_color(true, colors[i % 3]);
+ }
}
}
}
@@ -2269,17 +2387,19 @@ void EditorPropertyTransform2D::setup(double p_min, double p_max, double p_step,
}
}
-EditorPropertyTransform2D::EditorPropertyTransform2D() {
+EditorPropertyTransform2D::EditorPropertyTransform2D(bool p_include_origin) {
GridContainer *g = memnew(GridContainer);
- g->set_columns(2);
+ g->set_columns(p_include_origin ? 3 : 2);
add_child(g);
- static const char *desc[6] = { "x", "y", "x", "y", "x", "y" };
+ static const char *desc[6] = { "xx", "xy", "xo", "yx", "yy", "yo" };
for (int i = 0; i < 6; i++) {
spin[i] = memnew(EditorSpinSlider);
spin[i]->set_label(desc[i]);
spin[i]->set_flat(true);
- g->add_child(spin[i]);
+ if (p_include_origin || i % 3 != 2) {
+ g->add_child(spin[i]);
+ }
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform2D::_value_changed), varray(desc[i]));
@@ -2290,6 +2410,12 @@ EditorPropertyTransform2D::EditorPropertyTransform2D() {
///////////////////// BASIS /////////////////////////
+void EditorPropertyBasis::_set_read_only(bool p_read_only) {
+ for (int i = 0; i < 9; i++) {
+ spin[i]->set_read_only(p_read_only);
+ }
+};
+
void EditorPropertyBasis::_value_changed(double val, const String &p_name) {
if (setting) {
return;
@@ -2297,13 +2423,13 @@ void EditorPropertyBasis::_value_changed(double val, const String &p_name) {
Basis p;
p[0][0] = spin[0]->get_value();
- p[1][0] = spin[1]->get_value();
- p[2][0] = spin[2]->get_value();
- p[0][1] = spin[3]->get_value();
+ p[0][1] = spin[1]->get_value();
+ p[0][2] = spin[2]->get_value();
+ p[1][0] = spin[3]->get_value();
p[1][1] = spin[4]->get_value();
- p[2][1] = spin[5]->get_value();
- p[0][2] = spin[6]->get_value();
- p[1][2] = spin[7]->get_value();
+ p[1][2] = spin[5]->get_value();
+ p[2][0] = spin[6]->get_value();
+ p[2][1] = spin[7]->get_value();
p[2][2] = spin[8]->get_value();
emit_changed(get_edited_property(), p, p_name);
@@ -2313,13 +2439,13 @@ void EditorPropertyBasis::update_property() {
Basis val = get_edited_object()->get(get_edited_property());
setting = true;
spin[0]->set_value(val[0][0]);
- spin[1]->set_value(val[1][0]);
- spin[2]->set_value(val[2][0]);
- spin[3]->set_value(val[0][1]);
+ spin[1]->set_value(val[0][1]);
+ spin[2]->set_value(val[0][2]);
+ spin[3]->set_value(val[1][0]);
spin[4]->set_value(val[1][1]);
- spin[5]->set_value(val[2][1]);
- spin[6]->set_value(val[0][2]);
- spin[7]->set_value(val[1][2]);
+ spin[5]->set_value(val[1][2]);
+ spin[6]->set_value(val[2][0]);
+ spin[7]->set_value(val[2][1]);
spin[8]->set_value(val[2][2]);
setting = false;
@@ -2327,11 +2453,9 @@ void EditorPropertyBasis::update_property() {
void EditorPropertyBasis::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ const Color *colors = _get_property_colors();
for (int i = 0; i < 9; i++) {
- Color c = base;
- c.set_hsv(float(i % 3) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
- spin[i]->set_custom_label_color(true, c);
+ spin[i]->set_custom_label_color(true, colors[i % 3]);
}
}
}
@@ -2356,7 +2480,7 @@ EditorPropertyBasis::EditorPropertyBasis() {
g->set_columns(3);
add_child(g);
- static const char *desc[9] = { "x", "y", "z", "x", "y", "z", "x", "y", "z" };
+ static const char *desc[9] = { "xx", "xy", "xz", "yx", "yy", "yz", "zx", "zy", "zz" };
for (int i = 0; i < 9; i++) {
spin[i] = memnew(EditorSpinSlider);
spin[i]->set_label(desc[i]);
@@ -2372,6 +2496,12 @@ EditorPropertyBasis::EditorPropertyBasis() {
///////////////////// TRANSFORM /////////////////////////
+void EditorPropertyTransform3D::_set_read_only(bool p_read_only) {
+ for (int i = 0; i < 12; i++) {
+ spin[i]->set_read_only(p_read_only);
+ }
+};
+
void EditorPropertyTransform3D::_value_changed(double val, const String &p_name) {
if (setting) {
return;
@@ -2379,16 +2509,16 @@ void EditorPropertyTransform3D::_value_changed(double val, const String &p_name)
Transform3D p;
p.basis[0][0] = spin[0]->get_value();
- p.basis[1][0] = spin[1]->get_value();
- p.basis[2][0] = spin[2]->get_value();
- p.basis[0][1] = spin[3]->get_value();
- p.basis[1][1] = spin[4]->get_value();
- p.basis[2][1] = spin[5]->get_value();
- p.basis[0][2] = spin[6]->get_value();
- p.basis[1][2] = spin[7]->get_value();
- p.basis[2][2] = spin[8]->get_value();
- p.origin[0] = spin[9]->get_value();
- p.origin[1] = spin[10]->get_value();
+ p.basis[0][1] = spin[1]->get_value();
+ p.basis[0][2] = spin[2]->get_value();
+ p.origin[0] = spin[3]->get_value();
+ p.basis[1][0] = spin[4]->get_value();
+ p.basis[1][1] = spin[5]->get_value();
+ p.basis[1][2] = spin[6]->get_value();
+ p.origin[1] = spin[7]->get_value();
+ p.basis[2][0] = spin[8]->get_value();
+ p.basis[2][1] = spin[9]->get_value();
+ p.basis[2][2] = spin[10]->get_value();
p.origin[2] = spin[11]->get_value();
emit_changed(get_edited_property(), p, p_name);
@@ -2401,27 +2531,25 @@ void EditorPropertyTransform3D::update_property() {
void EditorPropertyTransform3D::update_using_transform(Transform3D p_transform) {
setting = true;
spin[0]->set_value(p_transform.basis[0][0]);
- spin[1]->set_value(p_transform.basis[1][0]);
- spin[2]->set_value(p_transform.basis[2][0]);
- spin[3]->set_value(p_transform.basis[0][1]);
- spin[4]->set_value(p_transform.basis[1][1]);
- spin[5]->set_value(p_transform.basis[2][1]);
- spin[6]->set_value(p_transform.basis[0][2]);
- spin[7]->set_value(p_transform.basis[1][2]);
- spin[8]->set_value(p_transform.basis[2][2]);
- spin[9]->set_value(p_transform.origin[0]);
- spin[10]->set_value(p_transform.origin[1]);
+ spin[1]->set_value(p_transform.basis[0][1]);
+ spin[2]->set_value(p_transform.basis[0][2]);
+ spin[3]->set_value(p_transform.origin[0]);
+ spin[4]->set_value(p_transform.basis[1][0]);
+ spin[5]->set_value(p_transform.basis[1][1]);
+ spin[6]->set_value(p_transform.basis[1][2]);
+ spin[7]->set_value(p_transform.origin[1]);
+ spin[8]->set_value(p_transform.basis[2][0]);
+ spin[9]->set_value(p_transform.basis[2][1]);
+ spin[10]->set_value(p_transform.basis[2][2]);
spin[11]->set_value(p_transform.origin[2]);
setting = false;
}
void EditorPropertyTransform3D::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
- Color base = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
+ const Color *colors = _get_property_colors();
for (int i = 0; i < 12; i++) {
- Color c = base;
- c.set_hsv(float(i % 3) / 3.0 + 0.05, c.get_s() * 0.75, c.get_v());
- spin[i]->set_custom_label_color(true, c);
+ spin[i]->set_custom_label_color(true, colors[i % 4]);
}
}
}
@@ -2443,10 +2571,10 @@ void EditorPropertyTransform3D::setup(double p_min, double p_max, double p_step,
EditorPropertyTransform3D::EditorPropertyTransform3D() {
GridContainer *g = memnew(GridContainer);
- g->set_columns(3);
+ g->set_columns(4);
add_child(g);
- static const char *desc[12] = { "x", "y", "z", "x", "y", "z", "x", "y", "z", "x", "y", "z" };
+ static const char *desc[12] = { "xx", "xy", "xz", "xo", "yx", "yy", "yz", "yo", "zx", "zy", "zz", "zo" };
for (int i = 0; i < 12; i++) {
spin[i] = memnew(EditorSpinSlider);
spin[i]->set_label(desc[i]);
@@ -2462,6 +2590,10 @@ EditorPropertyTransform3D::EditorPropertyTransform3D() {
////////////// COLOR PICKER //////////////////////
+void EditorPropertyColor::_set_read_only(bool p_read_only) {
+ picker->set_disabled(p_read_only);
+};
+
void EditorPropertyColor::_color_changed(const Color &p_color) {
// Cancel the color change if the current color is identical to the new one.
if (get_edited_object()->get(get_edited_property()) == p_color) {
@@ -2534,6 +2666,11 @@ EditorPropertyColor::EditorPropertyColor() {
////////////// NODE PATH //////////////////////
+void EditorPropertyNodePath::_set_read_only(bool p_read_only) {
+ assign->set_disabled(p_read_only);
+ clear->set_disabled(p_read_only);
+};
+
void EditorPropertyNodePath::_node_selected(const NodePath &p_path) {
NodePath path = p_path;
Node *base_node = nullptr;
@@ -2679,6 +2816,10 @@ EditorPropertyRID::EditorPropertyRID() {
////////////// RESOURCE //////////////////////
+void EditorPropertyResource::_set_read_only(bool p_read_only) {
+ resource_picker->set_editable(!p_read_only);
+};
+
void EditorPropertyResource::_resource_selected(const RES &p_resource) {
if (use_sub_inspector) {
bool unfold = !get_edited_object()->editor_is_section_unfolded(get_edited_property());
@@ -2810,8 +2951,8 @@ void EditorPropertyResource::_update_property_bg() {
count_subinspectors = MIN(15, count_subinspectors);
add_theme_color_override("property_color", get_theme_color(SNAME("sub_inspector_property_color"), SNAME("Editor")));
- add_theme_style_override("bg_selected", get_theme_stylebox("sub_inspector_property_bg_selected" + itos(count_subinspectors), "Editor"));
- add_theme_style_override("bg", get_theme_stylebox("sub_inspector_property_bg" + itos(count_subinspectors), "Editor"));
+ add_theme_style_override("bg_selected", get_theme_stylebox("sub_inspector_property_bg_selected" + itos(count_subinspectors), SNAME("Editor")));
+ add_theme_style_override("bg", get_theme_stylebox("sub_inspector_property_bg" + itos(count_subinspectors), SNAME("Editor")));
add_theme_constant_override("font_offset", get_theme_constant(SNAME("sub_inspector_font_offset"), SNAME("Editor")));
add_theme_constant_override("vseparation", 0);
@@ -3290,7 +3431,6 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.suffix);
return editor;
-
} break;
case Variant::PLANE: {
EditorPropertyPlane *editor = memnew(EditorPropertyPlane(p_wide));
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index 0cb21bb391..9a687f1a72 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -59,6 +59,7 @@ class EditorPropertyText : public EditorProperty {
void _text_submitted(const String &p_string);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
public:
@@ -81,6 +82,7 @@ class EditorPropertyMultilineText : public EditorProperty {
void _open_big_text();
protected:
+ virtual void _set_read_only(bool p_read_only) override;
void _notification(int p_what);
static void _bind_methods();
@@ -115,6 +117,7 @@ class EditorPropertyTextEnum : public EditorProperty {
void _custom_value_cancelled();
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
void _notification(int p_what);
@@ -139,6 +142,7 @@ class EditorPropertyPath : public EditorProperty {
void _path_focus_exited();
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
void _notification(int p_what);
@@ -161,6 +165,7 @@ private:
void _dialog_created();
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
public:
@@ -182,7 +187,6 @@ public:
MEMBER_PROPERTY_OF_BASE_TYPE, ///< a property of a base type
MEMBER_PROPERTY_OF_INSTANCE, ///< a property of an instance
MEMBER_PROPERTY_OF_SCRIPT, ///< a property of a script & base
-
};
private:
@@ -195,6 +199,7 @@ private:
void _property_select();
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
public:
@@ -210,6 +215,7 @@ class EditorPropertyCheck : public EditorProperty {
void _checkbox_pressed();
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
public:
@@ -224,6 +230,7 @@ class EditorPropertyEnum : public EditorProperty {
void _option_selected(int p_which);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
public:
@@ -242,6 +249,7 @@ class EditorPropertyFlags : public EditorProperty {
void _flag_toggled();
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
public:
@@ -276,6 +284,7 @@ private:
void _menu_pressed(int p_menu);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
public:
@@ -291,6 +300,7 @@ class EditorPropertyInteger : public EditorProperty {
void _value_changed(int64_t p_val);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
public:
@@ -306,6 +316,7 @@ class EditorPropertyObjectID : public EditorProperty {
void _edit_pressed();
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
public:
@@ -322,6 +333,7 @@ class EditorPropertyFloat : public EditorProperty {
void _value_changed(double p_val);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
public:
@@ -363,6 +375,7 @@ class EditorPropertyEasing : public EditorProperty {
void _notification(int p_what);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
public:
@@ -378,6 +391,7 @@ class EditorPropertyVector2 : public EditorProperty {
void _value_changed(double p_val, const String &p_name);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
void _notification(int p_what);
static void _bind_methods();
@@ -394,6 +408,7 @@ class EditorPropertyRect2 : public EditorProperty {
void _value_changed(double p_val, const String &p_name);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
void _notification(int p_what);
static void _bind_methods();
@@ -411,6 +426,7 @@ class EditorPropertyVector3 : public EditorProperty {
void _value_changed(double p_val, const String &p_name);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
void _notification(int p_what);
static void _bind_methods();
@@ -429,6 +445,7 @@ class EditorPropertyVector2i : public EditorProperty {
void _value_changed(double p_val, const String &p_name);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
void _notification(int p_what);
static void _bind_methods();
@@ -445,6 +462,7 @@ class EditorPropertyRect2i : public EditorProperty {
void _value_changed(double p_val, const String &p_name);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
void _notification(int p_what);
static void _bind_methods();
@@ -461,6 +479,7 @@ class EditorPropertyVector3i : public EditorProperty {
void _value_changed(double p_val, const String &p_name);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
void _notification(int p_what);
static void _bind_methods();
@@ -477,6 +496,7 @@ class EditorPropertyPlane : public EditorProperty {
void _value_changed(double p_val, const String &p_name);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
void _notification(int p_what);
static void _bind_methods();
@@ -493,6 +513,7 @@ class EditorPropertyQuaternion : public EditorProperty {
void _value_changed(double p_val, const String &p_name);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
void _notification(int p_what);
static void _bind_methods();
@@ -509,6 +530,7 @@ class EditorPropertyAABB : public EditorProperty {
void _value_changed(double p_val, const String &p_name);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
void _notification(int p_what);
static void _bind_methods();
@@ -525,13 +547,14 @@ class EditorPropertyTransform2D : public EditorProperty {
void _value_changed(double p_val, const String &p_name);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
void _notification(int p_what);
static void _bind_methods();
public:
virtual void update_property() override;
void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
- EditorPropertyTransform2D();
+ EditorPropertyTransform2D(bool p_include_origin = true);
};
class EditorPropertyBasis : public EditorProperty {
@@ -541,6 +564,7 @@ class EditorPropertyBasis : public EditorProperty {
void _value_changed(double p_val, const String &p_name);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
void _notification(int p_what);
static void _bind_methods();
@@ -557,6 +581,7 @@ class EditorPropertyTransform3D : public EditorProperty {
void _value_changed(double p_val, const String &p_name);
protected:
+ virtual void _set_read_only(bool p_read_only) override;
void _notification(int p_what);
static void _bind_methods();
@@ -578,6 +603,7 @@ class EditorPropertyColor : public EditorProperty {
Color last_color;
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
public:
@@ -600,6 +626,7 @@ class EditorPropertyNodePath : public EditorProperty {
void _node_clear();
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
void _notification(int p_what);
@@ -644,6 +671,7 @@ class EditorPropertyResource : public EditorProperty {
void _update_property_bg();
protected:
+ virtual void _set_read_only(bool p_read_only) override;
static void _bind_methods();
void _notification(int p_what);
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index 596f515067..9cecb62c66 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -176,7 +176,7 @@ void EditorPropertyArray::_change_type(Object *p_button, int p_index) {
changing_type_index = p_index;
Rect2 rect = button->get_screen_rect();
change_type->set_as_minsize();
- change_type->set_position(rect.position + rect.size - Vector2(change_type->get_contents_minimum_size().x, 0));
+ change_type->set_position(rect.get_end() - Vector2(change_type->get_contents_minimum_size().x, 0));
change_type->popup();
}
@@ -726,7 +726,7 @@ void EditorPropertyDictionary::_change_type(Object *p_button, int p_index) {
Rect2 rect = button->get_screen_rect();
change_type->set_as_minsize();
- change_type->set_position(rect.position + rect.size - Vector2(change_type->get_contents_minimum_size().x, 0));
+ change_type->set_position(rect.get_end() - Vector2(change_type->get_contents_minimum_size().x, 0));
change_type->popup();
changing_type_index = p_index;
}
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index a4ab749db4..9dbf69a779 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -135,13 +135,17 @@ void EditorResourcePicker::_file_selected(const String &p_path) {
_update_resource();
}
+void EditorResourcePicker::_file_quick_selected() {
+ _file_selected(quick_open->get_selected());
+}
+
void EditorResourcePicker::_update_menu() {
_update_menu_items();
Rect2 gt = edit_button->get_screen_rect();
edit_menu->set_as_minsize();
int ms = edit_menu->get_contents_minimum_size().width;
- Vector2 popup_pos = gt.position + gt.size - Vector2(ms, 0);
+ Vector2 popup_pos = gt.get_end() - Vector2(ms, 0);
edit_menu->set_position(popup_pos);
edit_menu->popup();
}
@@ -153,7 +157,10 @@ void EditorResourcePicker::_update_menu_items() {
// Add options for creating specific subtypes of the base resource type.
set_create_options(edit_menu);
- // Add an option to load a resource from a file.
+ // Add an option to load a resource from a file using the QuickOpen dialog.
+ edit_menu->add_icon_item(get_theme_icon(SNAME("Load"), SNAME("EditorIcons")), TTR("Quick Load"), OBJ_MENU_QUICKLOAD);
+
+ // Add an option to load a resource from a file using the regular file dialog.
edit_menu->add_icon_item(get_theme_icon(SNAME("Load"), SNAME("EditorIcons")), TTR("Load"), OBJ_MENU_LOAD);
// Add options for changing existing value of the resource.
@@ -246,6 +253,17 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) {
file_dialog->popup_file_dialog();
} break;
+ case OBJ_MENU_QUICKLOAD: {
+ if (!quick_open) {
+ quick_open = memnew(EditorQuickOpen);
+ add_child(quick_open);
+ quick_open->connect("quick_open", callable_mp(this, &EditorResourcePicker::_file_quick_selected));
+ }
+
+ quick_open->popup_dialog(base_type);
+ quick_open->set_title(TTR("Resource"));
+ } break;
+
case OBJ_MENU_EDIT: {
if (edited_resource.is_valid()) {
emit_signal(SNAME("resource_selected"), edited_resource);
@@ -906,7 +924,7 @@ void EditorShaderPicker::set_create_options(Object *p_menu_node) {
return;
}
- menu_node->add_icon_item(get_theme_icon("Shader", "EditorIcons"), TTR("New Shader"), OBJ_MENU_NEW_SHADER);
+ menu_node->add_icon_item(get_theme_icon(SNAME("Shader"), SNAME("EditorIcons")), TTR("New Shader"), OBJ_MENU_NEW_SHADER);
menu_node->add_separator();
}
diff --git a/editor/editor_resource_picker.h b/editor/editor_resource_picker.h
index d77c31f831..d0dad0287b 100644
--- a/editor/editor_resource_picker.h
+++ b/editor/editor_resource_picker.h
@@ -32,6 +32,7 @@
#define EDITOR_RESOURCE_PICKER_H
#include "editor_file_dialog.h"
+#include "quick_open.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/popup_menu.h"
@@ -54,9 +55,11 @@ class EditorResourcePicker : public HBoxContainer {
TextureRect *preview_rect;
Button *edit_button;
EditorFileDialog *file_dialog = nullptr;
+ EditorQuickOpen *quick_open = nullptr;
enum MenuOption {
OBJ_MENU_LOAD,
+ OBJ_MENU_QUICKLOAD,
OBJ_MENU_EDIT,
OBJ_MENU_CLEAR,
OBJ_MENU_MAKE_UNIQUE,
@@ -75,6 +78,7 @@ class EditorResourcePicker : public HBoxContainer {
void _update_resource_preview(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, ObjectID p_obj);
void _resource_selected();
+ void _file_quick_selected();
void _file_selected(const String &p_path);
void _update_menu();
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index 7f4ee7848f..8fc1345f3e 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -40,22 +40,25 @@
#include "editor_settings.h"
bool EditorResourcePreviewGenerator::handles(const String &p_type) const {
- if (get_script_instance() && get_script_instance()->has_method("_handles")) {
- return get_script_instance()->call("_handles", p_type);
+ bool success;
+ if (GDVIRTUAL_CALL(_handles, p_type, success)) {
+ return success;
}
ERR_FAIL_V_MSG(false, "EditorResourcePreviewGenerator::_handles needs to be overridden.");
}
Ref<Texture2D> EditorResourcePreviewGenerator::generate(const RES &p_from, const Size2 &p_size) const {
- if (get_script_instance() && get_script_instance()->has_method("_generate")) {
- return get_script_instance()->call("_generate", p_from, p_size);
+ Ref<Texture2D> preview;
+ if (GDVIRTUAL_CALL(_generate, p_from, p_size, preview)) {
+ return preview;
}
ERR_FAIL_V_MSG(Ref<Texture2D>(), "EditorResourcePreviewGenerator::_generate needs to be overridden.");
}
Ref<Texture2D> EditorResourcePreviewGenerator::generate_from_path(const String &p_path, const Size2 &p_size) const {
- if (get_script_instance() && get_script_instance()->has_method("_generate_from_path")) {
- return get_script_instance()->call("_generate_from_path", p_path, p_size);
+ Ref<Texture2D> preview;
+ if (GDVIRTUAL_CALL(_generate_from_path, p_path, p_size, preview)) {
+ return preview;
}
RES res = ResourceLoader::load(p_path);
@@ -66,27 +69,29 @@ Ref<Texture2D> EditorResourcePreviewGenerator::generate_from_path(const String &
}
bool EditorResourcePreviewGenerator::generate_small_preview_automatically() const {
- if (get_script_instance() && get_script_instance()->has_method("_generate_small_preview_automatically")) {
- return get_script_instance()->call("_generate_small_preview_automatically");
+ bool success;
+ if (GDVIRTUAL_CALL(_generate_small_preview_automatically, success)) {
+ return success;
}
return false;
}
bool EditorResourcePreviewGenerator::can_generate_small_preview() const {
- if (get_script_instance() && get_script_instance()->has_method("_can_generate_small_preview")) {
- return get_script_instance()->call("_can_generate_small_preview");
+ bool success;
+ if (GDVIRTUAL_CALL(_can_generate_small_preview, success)) {
+ return success;
}
return false;
}
void EditorResourcePreviewGenerator::_bind_methods() {
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_handles", PropertyInfo(Variant::STRING, "type")));
- BIND_VMETHOD(MethodInfo(CLASS_INFO(Texture2D), "_generate", PropertyInfo(Variant::OBJECT, "from", PROPERTY_HINT_RESOURCE_TYPE, "Resource"), PropertyInfo(Variant::VECTOR2, "size")));
- BIND_VMETHOD(MethodInfo(CLASS_INFO(Texture2D), "_generate_from_path", PropertyInfo(Variant::STRING, "path", PROPERTY_HINT_FILE), PropertyInfo(Variant::VECTOR2, "size")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_generate_small_preview_automatically"));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_can_generate_small_preview"));
+ GDVIRTUAL_BIND(_handles, "type");
+ GDVIRTUAL_BIND(_generate, "resource", "size");
+ GDVIRTUAL_BIND(_generate_from_path, "path", "size");
+ GDVIRTUAL_BIND(_generate_small_preview_automatically);
+ GDVIRTUAL_BIND(_can_generate_small_preview);
}
EditorResourcePreviewGenerator::EditorResourcePreviewGenerator() {
diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h
index 67f83220d0..ea16c8fde0 100644
--- a/editor/editor_resource_preview.h
+++ b/editor/editor_resource_preview.h
@@ -43,6 +43,12 @@ class EditorResourcePreviewGenerator : public RefCounted {
protected:
static void _bind_methods();
+ GDVIRTUAL1RC(bool, _handles, String)
+ GDVIRTUAL2RC(Ref<Texture2D>, _generate, RES, Vector2i)
+ GDVIRTUAL2RC(Ref<Texture2D>, _generate_from_path, String, Vector2i)
+ GDVIRTUAL0RC(bool, _generate_small_preview_automatically)
+ GDVIRTUAL0RC(bool, _can_generate_small_preview)
+
public:
virtual bool handles(const String &p_type) const;
virtual Ref<Texture2D> generate(const RES &p_from, const Size2 &p_size) const;
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index e115cd77e1..5828549bdc 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -52,8 +52,8 @@ void EditorRunNative::_notification(int p_what) {
small_icon.instantiate();
small_icon->create_from_image(im);
MenuButton *mb = memnew(MenuButton);
- mb->get_popup()->connect("id_pressed", callable_mp(this, &EditorRunNative::_run_native), varray(i));
- mb->connect("pressed", callable_mp(this, &EditorRunNative::_run_native), varray(-1, i));
+ mb->get_popup()->connect("id_pressed", callable_mp(this, &EditorRunNative::run_native), varray(i));
+ mb->connect("pressed", callable_mp(this, &EditorRunNative::run_native), varray(-1, i));
mb->set_icon(small_icon);
add_child(mb);
menus[i] = mb;
@@ -93,22 +93,22 @@ void EditorRunNative::_notification(int p_what) {
}
}
-void EditorRunNative::_run_native(int p_idx, int p_platform) {
+Error EditorRunNative::run_native(int p_idx, int p_platform) {
if (!EditorNode::get_singleton()->ensure_main_scene(true)) {
resume_idx = p_idx;
resume_platform = p_platform;
- return;
+ return OK;
}
Ref<EditorExportPlatform> eep = EditorExport::get_singleton()->get_export_platform(p_platform);
- ERR_FAIL_COND(eep.is_null());
+ ERR_FAIL_COND_V(eep.is_null(), ERR_UNAVAILABLE);
if (p_idx == -1) {
if (eep->get_options_count() == 1) {
menus[p_platform]->get_popup()->hide();
p_idx = 0;
} else {
- return;
+ return ERR_INVALID_PARAMETER;
}
}
@@ -124,7 +124,7 @@ void EditorRunNative::_run_native(int p_idx, int p_platform) {
if (preset.is_null()) {
EditorNode::get_singleton()->show_warning(TTR("No runnable export preset found for this platform.\nPlease add a runnable preset in the Export menu or define an existing preset as runnable."));
- return;
+ return ERR_UNAVAILABLE;
}
emit_signal(SNAME("native_run"), preset);
@@ -149,11 +149,11 @@ void EditorRunNative::_run_native(int p_idx, int p_platform) {
flags |= EditorExportPlatform::DEBUG_FLAG_VIEW_NAVIGATION;
}
- eep->run(preset, p_idx, flags);
+ return eep->run(preset, p_idx, flags);
}
void EditorRunNative::resume_run_native() {
- _run_native(resume_idx, resume_platform);
+ run_native(resume_idx, resume_platform);
}
void EditorRunNative::_bind_methods() {
diff --git a/editor/editor_run_native.h b/editor/editor_run_native.h
index 3516f668c6..97f6fc005a 100644
--- a/editor/editor_run_native.h
+++ b/editor/editor_run_native.h
@@ -43,13 +43,12 @@ class EditorRunNative : public HBoxContainer {
int resume_idx;
int resume_platform;
- void _run_native(int p_idx, int p_platform);
-
protected:
static void _bind_methods();
void _notification(int p_what);
public:
+ Error run_native(int p_idx, int p_platform);
bool is_deploy_debug_remote_enabled() const;
void resume_run_native();
diff --git a/editor/editor_run_script.cpp b/editor/editor_run_script.cpp
index 83ce50a9f9..27923ef413 100644
--- a/editor/editor_run_script.cpp
+++ b/editor/editor_run_script.cpp
@@ -60,18 +60,8 @@ Node *EditorScript::get_scene() {
}
void EditorScript::_run() {
- Ref<Script> s = get_script();
- ERR_FAIL_COND(!s.is_valid());
- if (!get_script_instance()) {
- EditorNode::add_io_error(TTR("Couldn't instance script:") + "\n " + s->get_path() + "\n" + TTR("Did you forget the 'tool' keyword?"));
- return;
- }
-
- Callable::CallError ce;
- ce.error = Callable::CallError::CALL_OK;
- get_script_instance()->call("_run", nullptr, 0, ce);
- if (ce.error != Callable::CallError::CALL_OK) {
- EditorNode::add_io_error(TTR("Couldn't run script:") + "\n " + s->get_path() + "\n" + TTR("Did you forget the '_run' method?"));
+ if (!GDVIRTUAL_CALL(_run)) {
+ EditorNode::add_io_error(TTR("Couldn't run editor script, did you forget to override the '_run' method?"));
}
}
@@ -83,7 +73,7 @@ void EditorScript::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_root_node", "node"), &EditorScript::add_root_node);
ClassDB::bind_method(D_METHOD("get_scene"), &EditorScript::get_scene);
ClassDB::bind_method(D_METHOD("get_editor_interface"), &EditorScript::get_editor_interface);
- BIND_VMETHOD(MethodInfo("_run"));
+ GDVIRTUAL_BIND(_run);
}
EditorScript::EditorScript() {
diff --git a/editor/editor_run_script.h b/editor/editor_run_script.h
index c8412c3c92..6c7e37774d 100644
--- a/editor/editor_run_script.h
+++ b/editor/editor_run_script.h
@@ -41,6 +41,7 @@ class EditorScript : public RefCounted {
protected:
static void _bind_methods();
+ GDVIRTUAL0(_run)
public:
void add_root_node(Node *p_node);
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 3fc010c701..70f43e01cf 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -300,6 +300,14 @@ bool EditorSettings::has_default_value(const String &p_setting) const {
void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_THREAD_SAFE_METHOD_
+// Sets up the editor setting with a default value and hint PropertyInfo.
+#define EDITOR_SETTING(m_type, m_property_hint, m_name, m_default_value, m_hint_string) \
+ _initial_set(m_name, m_default_value); \
+ hints[m_name] = PropertyInfo(m_type, m_name, m_property_hint, m_hint_string);
+
+#define EDITOR_SETTING_USAGE(m_type, m_property_hint, m_name, m_default_value, m_hint_string, m_usage) \
+ _initial_set(m_name, m_default_value); \
+ hints[m_name] = PropertyInfo(m_type, m_name, m_property_hint, m_hint_string, m_usage);
/* Languages */
@@ -363,103 +371,77 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
best = "en";
}
- _initial_set("interface/editor/editor_language", best);
- set_restart_if_changed("interface/editor/editor_language", true);
- hints["interface/editor/editor_language"] = PropertyInfo(Variant::STRING, "interface/editor/editor_language", PROPERTY_HINT_ENUM, lang_hint, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ EDITOR_SETTING_USAGE(Variant::STRING, PROPERTY_HINT_ENUM, "interface/editor/editor_language", best, lang_hint, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
}
/* Interface */
// Editor
- _initial_set("interface/editor/display_scale", 0);
// Display what the Auto display scale setting effectively corresponds to.
- float scale = get_auto_display_scale();
+ const String display_scale_hint_string = vformat("Auto (%d%%),75%%,100%%,125%%,150%%,175%%,200%%,Custom", Math::round(get_auto_display_scale() * 100));
+ EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/display_scale", 0, display_scale_hint_string, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
_initial_set("interface/editor/enable_debugging_pseudolocalization", false);
set_restart_if_changed("interface/editor/enable_debugging_pseudolocalization", true);
// Use pseudolocalization in editor.
- hints["interface/editor/display_scale"] = PropertyInfo(Variant::INT, "interface/editor/display_scale", PROPERTY_HINT_ENUM, vformat("Auto (%d%%),75%%,100%%,125%%,150%%,175%%,200%%,Custom", Math::round(scale * 100)), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
- _initial_set("interface/editor/custom_display_scale", 1.0f);
- hints["interface/editor/custom_display_scale"] = PropertyInfo(Variant::FLOAT, "interface/editor/custom_display_scale", PROPERTY_HINT_RANGE, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
- _initial_set("interface/editor/main_font_size", 14);
- hints["interface/editor/main_font_size"] = PropertyInfo(Variant::INT, "interface/editor/main_font_size", PROPERTY_HINT_RANGE, "8,48,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
- _initial_set("interface/editor/code_font_size", 14);
- hints["interface/editor/code_font_size"] = PropertyInfo(Variant::INT, "interface/editor/code_font_size", PROPERTY_HINT_RANGE, "8,48,1", PROPERTY_USAGE_DEFAULT);
- _initial_set("interface/editor/code_font_contextual_ligatures", 0);
- hints["interface/editor/code_font_contextual_ligatures"] = PropertyInfo(Variant::INT, "interface/editor/code_font_contextual_ligatures", PROPERTY_HINT_ENUM, "Default,Disable Contextual Alternates (Coding Ligatures),Use Custom OpenType Feature Set", PROPERTY_USAGE_DEFAULT);
+ EDITOR_SETTING_USAGE(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/editor/custom_display_scale", 1.0, "0.5,3,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
+ EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_RANGE, "interface/editor/main_font_size", 14, "8,48,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/editor/code_font_size", 14, "8,48,1")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/code_font_contextual_ligatures", 0, "Default,Disable Contextual Alternates (Coding Ligatures),Use Custom OpenType Feature Set")
_initial_set("interface/editor/code_font_custom_opentype_features", "");
_initial_set("interface/editor/code_font_custom_variations", "");
_initial_set("interface/editor/font_antialiased", true);
- _initial_set("interface/editor/font_hinting", 0);
#ifdef OSX_ENABLED
- hints["interface/editor/font_hinting"] = PropertyInfo(Variant::INT, "interface/editor/font_hinting", PROPERTY_HINT_ENUM, "Auto (None),None,Light,Normal", PROPERTY_USAGE_DEFAULT);
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_hinting", 0, "Auto (None),None,Light,Normal")
#else
- hints["interface/editor/font_hinting"] = PropertyInfo(Variant::INT, "interface/editor/font_hinting", PROPERTY_HINT_ENUM, "Auto (Light),None,Light,Normal", PROPERTY_USAGE_DEFAULT);
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_hinting", 0, "Auto (Light),None,Light,Normal")
#endif
- _initial_set("interface/editor/main_font", "");
- hints["interface/editor/main_font"] = PropertyInfo(Variant::STRING, "interface/editor/main_font", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT);
- _initial_set("interface/editor/main_font_bold", "");
- hints["interface/editor/main_font_bold"] = PropertyInfo(Variant::STRING, "interface/editor/main_font_bold", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT);
- _initial_set("interface/editor/code_font", "");
- hints["interface/editor/code_font"] = PropertyInfo(Variant::STRING, "interface/editor/code_font", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT);
- _initial_set("interface/editor/low_processor_mode_sleep_usec", 6900); // ~144 FPS
- hints["interface/editor/low_processor_mode_sleep_usec"] = PropertyInfo(Variant::FLOAT, "interface/editor/low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
- _initial_set("interface/editor/unfocused_low_processor_mode_sleep_usec", 100000); // 10 FPS
- // Allow an unfocused FPS limit as low as 1 FPS for those who really need low power usage
- // (but don't need to preview particles or shaders while the editor is unfocused).
- // With very low FPS limits, the editor can take a small while to become usable after being focused again,
- // so this should be used at the user's discretion.
- hints["interface/editor/unfocused_low_processor_mode_sleep_usec"] = PropertyInfo(Variant::FLOAT, "interface/editor/unfocused_low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,1000000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "interface/editor/main_font", "", "*.ttf,*.otf")
+ EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "interface/editor/main_font_bold", "", "*.ttf,*.otf")
+ EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "interface/editor/code_font", "", "*.ttf,*.otf")
+ EDITOR_SETTING_USAGE(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/editor/low_processor_mode_sleep_usec", 6900, "1,100000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
+ // Default unfocused usec sleep is for 10 FPS. Allow an unfocused FPS limit
+ // as low as 1 FPS for those who really need low power usage (but don't need
+ // to preview particles or shaders while the editor is unfocused). With very
+ // low FPS limits, the editor can take a small while to become usable after
+ // being focused again, so this should be used at the user's discretion.
+ EDITOR_SETTING_USAGE(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/editor/unfocused_low_processor_mode_sleep_usec", 100000, "1,1000000,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
_initial_set("interface/editor/separate_distraction_mode", false);
_initial_set("interface/editor/automatically_open_screenshots", true);
- _initial_set("interface/editor/single_window_mode", false);
- hints["interface/editor/single_window_mode"] = PropertyInfo(Variant::BOOL, "interface/editor/single_window_mode", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ EDITOR_SETTING_USAGE(Variant::BOOL, PROPERTY_HINT_NONE, "interface/editor/single_window_mode", false, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
_initial_set("interface/editor/hide_console_window", false);
+ _initial_set("interface/editor/mouse_extra_buttons_navigate_history", true);
_initial_set("interface/editor/save_each_scene_on_quit", true); // Regression
// Inspector
- _initial_set("interface/inspector/max_array_dictionary_items_per_page", 20);
- hints["interface/inspector/max_array_dictionary_items_per_page"] = PropertyInfo(Variant::INT, "interface/inspector/max_array_dictionary_items_per_page", PROPERTY_HINT_RANGE, "10,100,1", PROPERTY_USAGE_DEFAULT);
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/inspector/max_array_dictionary_items_per_page", 20, "10,100,1")
// Theme
- _initial_set("interface/theme/preset", "Default");
- hints["interface/theme/preset"] = PropertyInfo(Variant::STRING, "interface/theme/preset", PROPERTY_HINT_ENUM, "Default,Breeze Dark,Godot 2,Grey,Light,Solarized (Dark),Solarized (Light),Custom", PROPERTY_USAGE_DEFAULT);
- _initial_set("interface/theme/icon_and_font_color", 0);
- hints["interface/theme/icon_and_font_color"] = PropertyInfo(Variant::INT, "interface/theme/icon_and_font_color", PROPERTY_HINT_ENUM, "Auto,Dark,Light", PROPERTY_USAGE_DEFAULT);
- _initial_set("interface/theme/base_color", Color(0.2, 0.23, 0.31));
- hints["interface/theme/base_color"] = PropertyInfo(Variant::COLOR, "interface/theme/base_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT);
- _initial_set("interface/theme/accent_color", Color(0.41, 0.61, 0.91));
- hints["interface/theme/accent_color"] = PropertyInfo(Variant::COLOR, "interface/theme/accent_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT);
- _initial_set("interface/theme/contrast", 0.3);
- hints["interface/theme/contrast"] = PropertyInfo(Variant::FLOAT, "interface/theme/contrast", PROPERTY_HINT_RANGE, "-1, 1, 0.01");
- _initial_set("interface/theme/icon_saturation", 1.0);
- hints["interface/theme/icon_saturation"] = PropertyInfo(Variant::FLOAT, "interface/theme/icon_saturation", PROPERTY_HINT_RANGE, "0,2,0.01", PROPERTY_USAGE_DEFAULT);
- _initial_set("interface/theme/relationship_line_opacity", 0.1);
- hints["interface/theme/relationship_line_opacity"] = PropertyInfo(Variant::FLOAT, "interface/theme/relationship_line_opacity", PROPERTY_HINT_RANGE, "0.00, 1, 0.01");
- _initial_set("interface/theme/border_size", 0);
- hints["interface/theme/border_size"] = PropertyInfo(Variant::INT, "interface/theme/border_size", PROPERTY_HINT_RANGE, "0,2,1", PROPERTY_USAGE_DEFAULT);
- _initial_set("interface/theme/corner_radius", 3);
- hints["interface/theme/corner_radius"] = PropertyInfo(Variant::INT, "interface/theme/corner_radius", PROPERTY_HINT_RANGE, "0,6,1", PROPERTY_USAGE_DEFAULT);
- _initial_set("interface/theme/additional_spacing", 0);
- hints["interface/theme/additional_spacing"] = PropertyInfo(Variant::FLOAT, "interface/theme/additional_spacing", PROPERTY_HINT_RANGE, "0,5,0.1", PROPERTY_USAGE_DEFAULT);
- _initial_set("interface/theme/custom_theme", "");
- hints["interface/theme/custom_theme"] = PropertyInfo(Variant::STRING, "interface/theme/custom_theme", PROPERTY_HINT_GLOBAL_FILE, "*.res,*.tres,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_ENUM, "interface/theme/preset", "Default", "Default,Breeze Dark,Godot 2,Grey,Light,Solarized (Dark),Solarized (Light),Custom")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/theme/icon_and_font_color", 0, "Auto,Dark,Light")
+ EDITOR_SETTING(Variant::COLOR, PROPERTY_HINT_NONE, "interface/theme/base_color", Color(0.2, 0.23, 0.31), "")
+ EDITOR_SETTING(Variant::COLOR, PROPERTY_HINT_NONE, "interface/theme/accent_color", Color(0.41, 0.61, 0.91), "")
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/theme/contrast", 0.3, "-1,1,0.01")
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/theme/icon_saturation", 1.0, "0,2,0.01")
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/theme/relationship_line_opacity", 0.1, "0.00,1,0.01")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/theme/border_size", 0, "0,2,1")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "interface/theme/corner_radius", 3, "0,6,1")
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/theme/additional_spacing", 0.0, "0,5,0.1")
+ EDITOR_SETTING_USAGE(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "interface/theme/custom_theme", "", "*.res,*.tres,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
// Scene tabs
_initial_set("interface/scene_tabs/show_thumbnail_on_hover", true);
_initial_set("interface/scene_tabs/resize_if_many_tabs", true);
- _initial_set("interface/scene_tabs/minimum_width", 50);
- hints["interface/scene_tabs/minimum_width"] = PropertyInfo(Variant::INT, "interface/scene_tabs/minimum_width", PROPERTY_HINT_RANGE, "50,500,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_RANGE, "interface/scene_tabs/minimum_width", 50, "50,500,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
_initial_set("interface/scene_tabs/show_script_button", false);
/* Filesystem */
// Directories
- _initial_set("filesystem/directories/autoscan_project_path", "");
- hints["filesystem/directories/autoscan_project_path"] = PropertyInfo(Variant::STRING, "filesystem/directories/autoscan_project_path", PROPERTY_HINT_GLOBAL_DIR);
- _initial_set("filesystem/directories/default_project_path", OS::get_singleton()->has_environment("HOME") ? OS::get_singleton()->get_environment("HOME") : OS::get_singleton()->get_system_dir(OS::SYSTEM_DIR_DOCUMENTS));
- hints["filesystem/directories/default_project_path"] = PropertyInfo(Variant::STRING, "filesystem/directories/default_project_path", PROPERTY_HINT_GLOBAL_DIR);
+ EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_DIR, "filesystem/directories/autoscan_project_path", "", "")
+ const String fs_dir_default_project_path = OS::get_singleton()->has_environment("HOME") ? OS::get_singleton()->get_environment("HOME") : OS::get_singleton()->get_system_dir(OS::SYSTEM_DIR_DOCUMENTS);
+ EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_DIR, "filesystem/directories/default_project_path", fs_dir_default_project_path, "")
// On save
_initial_set("filesystem/on_save/compress_binary_resources", true);
@@ -467,10 +449,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// File dialog
_initial_set("filesystem/file_dialog/show_hidden_files", false);
- _initial_set("filesystem/file_dialog/display_mode", 0);
- hints["filesystem/file_dialog/display_mode"] = PropertyInfo(Variant::INT, "filesystem/file_dialog/display_mode", PROPERTY_HINT_ENUM, "Thumbnails,List");
- _initial_set("filesystem/file_dialog/thumbnail_size", 64);
- hints["filesystem/file_dialog/thumbnail_size"] = PropertyInfo(Variant::INT, "filesystem/file_dialog/thumbnail_size", PROPERTY_HINT_RANGE, "32,128,16");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "filesystem/file_dialog/display_mode", 0, "Thumbnails,List")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "filesystem/file_dialog/thumbnail_size", 64, "32,128,16")
/* Docks */
@@ -478,40 +458,33 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("docks/scene_tree/start_create_dialog_fully_expanded", false);
// FileSystem
- _initial_set("docks/filesystem/thumbnail_size", 64);
- hints["docks/filesystem/thumbnail_size"] = PropertyInfo(Variant::INT, "docks/filesystem/thumbnail_size", PROPERTY_HINT_RANGE, "32,128,16");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "docks/filesystem/thumbnail_size", 64, "32,128,16")
_initial_set("docks/filesystem/always_show_folders", true);
// Property editor
_initial_set("docks/property_editor/auto_refresh_interval", 0.2); //update 5 times per second by default
- _initial_set("docks/property_editor/subresource_hue_tint", 0.75);
- hints["docks/property_editor/subresource_hue_tint"] = PropertyInfo(Variant::FLOAT, "docks/property_editor/subresource_hue_tint", PROPERTY_HINT_RANGE, "0,1,0.01", PROPERTY_USAGE_DEFAULT);
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "docks/property_editor/subresource_hue_tint", 0.75, "0,1,0.01")
/* Text editor */
// Theme
- _initial_set("text_editor/theme/color_theme", "Default");
- hints["text_editor/theme/color_theme"] = PropertyInfo(Variant::STRING, "text_editor/theme/color_theme", PROPERTY_HINT_ENUM, "Default,Godot 2,Custom");
+ EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_ENUM, "text_editor/theme/color_theme", "Default", "Default,Godot 2,Custom")
// Theme: Highlighting
_load_godot2_text_editor_theme();
// Appearance
// Appearance: Caret
- _initial_set("text_editor/appearance/caret/type", 0);
- hints["text_editor/appearance/caret/type"] = PropertyInfo(Variant::INT, "text_editor/appearance/caret/type", PROPERTY_HINT_ENUM, "Line,Block");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "text_editor/appearance/caret/type", 0, "Line,Block")
_initial_set("text_editor/appearance/caret/caret_blink", true);
- _initial_set("text_editor/appearance/caret/caret_blink_speed", 0.5);
- hints["text_editor/appearance/caret/caret_blink_speed"] = PropertyInfo(Variant::FLOAT, "text_editor/appearance/caret/caret_blink_speed", PROPERTY_HINT_RANGE, "0.1, 10, 0.01");
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "text_editor/appearance/caret/caret_blink_speed", 0.5, "0.1,10,0.01")
_initial_set("text_editor/appearance/caret/highlight_current_line", true);
_initial_set("text_editor/appearance/caret/highlight_all_occurrences", true);
// Appearance: Guidelines
_initial_set("text_editor/appearance/guidelines/show_line_length_guidelines", true);
- _initial_set("text_editor/appearance/guidelines/line_length_guideline_soft_column", 80);
- hints["text_editor/appearance/guidelines/line_length_guideline_soft_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/guidelines/line_length_guideline_soft_column", PROPERTY_HINT_RANGE, "20, 160, 1");
- _initial_set("text_editor/appearance/guidelines/line_length_guideline_hard_column", 100);
- hints["text_editor/appearance/guidelines/line_length_guideline_hard_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/guidelines/line_length_guideline_hard_column", PROPERTY_HINT_RANGE, "20, 160, 1");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/appearance/guidelines/line_length_guideline_soft_column", 80, "20,160,1")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/appearance/guidelines/line_length_guideline_hard_column", 100, "20,160,1")
// Appearance: Gutters
_initial_set("text_editor/appearance/gutters/show_line_numbers", true);
@@ -522,19 +495,16 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Appearance: Minimap
_initial_set("text_editor/appearance/minimap/show_minimap", true);
- _initial_set("text_editor/appearance/minimap/minimap_width", 80);
- hints["text_editor/appearance/minimap/minimap_width"] = PropertyInfo(Variant::INT, "text_editor/appearance/minimap/minimap_width", PROPERTY_HINT_RANGE, "50,250,1");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/appearance/minimap/minimap_width", 80, "50,250,1")
// Appearance: Lines
_initial_set("text_editor/appearance/lines/code_folding", true);
- _initial_set("text_editor/appearance/lines/word_wrap", 0);
- hints["text_editor/appearance/lines/word_wrap"] = PropertyInfo(Variant::INT, "text_editor/appearance/lines/word_wrap", PROPERTY_HINT_ENUM, "None,Boundary");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "text_editor/appearance/lines/word_wrap", 0, "None,Boundary")
// Appearance: Whitespace
_initial_set("text_editor/appearance/whitespace/draw_tabs", true);
_initial_set("text_editor/appearance/whitespace/draw_spaces", false);
- _initial_set("text_editor/appearance/whitespace/line_spacing", 6);
- hints["text_editor/appearance/whitespace/line_spacing"] = PropertyInfo(Variant::INT, "text_editor/appearance/whitespace/line_spacing", PROPERTY_HINT_RANGE, "0,50,1");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/appearance/whitespace/line_spacing", 6, "0,50,1")
// Behavior
// Behavior: Navigation
@@ -544,10 +514,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("text_editor/behavior/navigation/v_scroll_speed", 80);
// Behavior: Indent
- _initial_set("text_editor/behavior/indent/type", 0);
- hints["text_editor/behavior/indent/type"] = PropertyInfo(Variant::INT, "text_editor/behavior/indent/type", PROPERTY_HINT_ENUM, "Tabs,Spaces");
- _initial_set("text_editor/behavior/indent/size", 4);
- hints["text_editor/behavior/indent/size"] = PropertyInfo(Variant::INT, "text_editor/behavior/indent/size", PROPERTY_HINT_RANGE, "1, 64, 1"); // size of 0 crashes.
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "text_editor/behavior/indent/type", 0, "Tabs,Spaces")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/behavior/indent/size", 4, "1,64,1") // size of 0 crashes.
_initial_set("text_editor/behavior/indent/auto_indent", true);
// Behavior: Files
@@ -561,11 +529,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("text_editor/script_list/sort_members_outline_alphabetically", false);
// Completion
- _initial_set("text_editor/completion/idle_parse_delay", 2.0);
- hints["text_editor/completion/idle_parse_delay"] = PropertyInfo(Variant::FLOAT, "text_editor/completion/idle_parse_delay", PROPERTY_HINT_RANGE, "0.1, 10, 0.01");
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "text_editor/completion/idle_parse_delay", 2.0, "0.1,10,0.01")
_initial_set("text_editor/completion/auto_brace_complete", true);
- _initial_set("text_editor/completion/code_complete_delay", 0.3);
- hints["text_editor/completion/code_complete_delay"] = PropertyInfo(Variant::FLOAT, "text_editor/completion/code_complete_delay", PROPERTY_HINT_RANGE, "0.01, 5, 0.01");
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "text_editor/completion/code_complete_delay", 0.3, "0.01,5,0.01")
_initial_set("text_editor/completion/put_callhint_tooltip_below_current_line", true);
_initial_set("text_editor/completion/complete_file_paths", true);
_initial_set("text_editor/completion/add_type_hints", false);
@@ -573,14 +539,10 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Help
_initial_set("text_editor/help/show_help_index", true);
- _initial_set("text_editor/help/help_font_size", 15);
- hints["text_editor/help/help_font_size"] = PropertyInfo(Variant::INT, "text_editor/help/help_font_size", PROPERTY_HINT_RANGE, "8,48,1");
- _initial_set("text_editor/help/help_source_font_size", 14);
- hints["text_editor/help/help_source_font_size"] = PropertyInfo(Variant::INT, "text_editor/help/help_source_font_size", PROPERTY_HINT_RANGE, "8,48,1");
- _initial_set("text_editor/help/help_title_font_size", 23);
- hints["text_editor/help/help_title_font_size"] = PropertyInfo(Variant::INT, "text_editor/help/help_title_font_size", PROPERTY_HINT_RANGE, "8,48,1");
- _initial_set("text_editor/help/class_reference_examples", 0);
- hints["text_editor/help/class_reference_examples"] = PropertyInfo(Variant::INT, "text_editor/help/class_reference_examples", PROPERTY_HINT_ENUM, "GDScript,C#,GDScript and C#");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/help/help_font_size", 15, "8,48,1")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/help/help_source_font_size", 14, "8,48,1")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/help/help_title_font_size", 23, "8,48,1")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "text_editor/help/class_reference_examples", 0, "GDScript,C#,GDScript and C#")
/* Editors */
@@ -588,39 +550,23 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("editors/grid_map/pick_distance", 5000.0);
// 3D
- _initial_set("editors/3d/primary_grid_color", Color(0.56, 0.56, 0.56, 0.5));
- hints["editors/3d/primary_grid_color"] = PropertyInfo(Variant::COLOR, "editors/3d/primary_grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT);
-
- _initial_set("editors/3d/secondary_grid_color", Color(0.38, 0.38, 0.38, 0.5));
- hints["editors/3d/secondary_grid_color"] = PropertyInfo(Variant::COLOR, "editors/3d/secondary_grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT);
+ EDITOR_SETTING(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d/primary_grid_color", Color(0.56, 0.56, 0.56, 0.5), "")
+ EDITOR_SETTING(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d/secondary_grid_color", Color(0.38, 0.38, 0.38, 0.5), "")
// Use a similar color to the 2D editor selection.
- _initial_set("editors/3d/selection_box_color", Color(1.0, 0.5, 0));
- hints["editors/3d/selection_box_color"] = PropertyInfo(Variant::COLOR, "editors/3d/selection_box_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ EDITOR_SETTING_USAGE(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d/selection_box_color", Color(1.0, 0.5, 0), "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)
// If a line is a multiple of this, it uses the primary grid color.
// Use a power of 2 value by default as it's more common to use powers of 2 in level design.
- _initial_set("editors/3d/primary_grid_steps", 8);
- hints["editors/3d/primary_grid_steps"] = PropertyInfo(Variant::INT, "editors/3d/primary_grid_steps", PROPERTY_HINT_RANGE, "1,100,1", PROPERTY_USAGE_DEFAULT);
-
- // At 1000, the grid mostly looks like it has no edge.
- _initial_set("editors/3d/grid_size", 200);
- hints["editors/3d/grid_size"] = PropertyInfo(Variant::INT, "editors/3d/grid_size", PROPERTY_HINT_RANGE, "1,2000,1", PROPERTY_USAGE_DEFAULT);
-
- // Default largest grid size is 100m, 10^2 (primary grid lines are 1km apart when primary_grid_steps is 10).
- _initial_set("editors/3d/grid_division_level_max", 2);
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "editors/3d/primary_grid_steps", 8, "1,100,1")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "editors/3d/grid_size", 200, "1,2000,1")
// Higher values produce graphical artifacts when far away unless View Z-Far
// is increased significantly more than it really should need to be.
- hints["editors/3d/grid_division_level_max"] = PropertyInfo(Variant::INT, "editors/3d/grid_division_level_max", PROPERTY_HINT_RANGE, "-1,3,1", PROPERTY_USAGE_DEFAULT);
-
- // Default smallest grid size is 1m, 10^0.
- _initial_set("editors/3d/grid_division_level_min", 0);
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "editors/3d/grid_division_level_max", 2, "-1,3,1")
// Lower values produce graphical artifacts regardless of view clipping planes, so limit to -2 as a lower bound.
- hints["editors/3d/grid_division_level_min"] = PropertyInfo(Variant::INT, "editors/3d/grid_division_level_min", PROPERTY_HINT_RANGE, "-2,2,1", PROPERTY_USAGE_DEFAULT);
-
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "editors/3d/grid_division_level_min", 0, "-2,2,1")
// -0.2 seems like a sensible default. -1.0 gives Blender-like behavior, 0.5 gives huge grids.
- _initial_set("editors/3d/grid_division_level_bias", -0.2);
- hints["editors/3d/grid_division_level_bias"] = PropertyInfo(Variant::FLOAT, "editors/3d/grid_division_level_bias", PROPERTY_HINT_RANGE, "-1.0,0.5,0.1", PROPERTY_USAGE_DEFAULT);
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/grid_division_level_bias", -0.2, "-1.0,0.5,0.1")
_initial_set("editors/3d/grid_xz_plane", true);
_initial_set("editors/3d/grid_xy_plane", false);
@@ -629,56 +575,35 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Use a lower default FOV for the 3D camera compared to the
// Camera3D node as the 3D viewport doesn't span the whole screen.
// This means it's technically viewed from a further distance, which warrants a narrower FOV.
- _initial_set("editors/3d/default_fov", 70.0);
- hints["editors/3d/default_fov"] = PropertyInfo(Variant::FLOAT, "editors/3d/default_fov", PROPERTY_HINT_RANGE, "1,179,0.1");
- _initial_set("editors/3d/default_z_near", 0.05);
- hints["editors/3d/default_z_near"] = PropertyInfo(Variant::FLOAT, "editors/3d/default_z_near", PROPERTY_HINT_RANGE, "0.01,10,0.01,or_greater");
- _initial_set("editors/3d/default_z_far", 4000.0);
- hints["editors/3d/default_z_far"] = PropertyInfo(Variant::FLOAT, "editors/3d/default_z_far", PROPERTY_HINT_RANGE, "0.1,4000,0.1,or_greater");
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/default_fov", 70.0, "1,179,0.1")
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/default_z_near", 0.05, "0.01,10,0.01,or_greater")
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/default_z_far", 4000.0, "0.1,4000,0.1,or_greater")
// 3D: Navigation
- _initial_set("editors/3d/navigation/navigation_scheme", 0);
- _initial_set("editors/3d/navigation/invert_y_axis", false);
_initial_set("editors/3d/navigation/invert_x_axis", false);
- hints["editors/3d/navigation/navigation_scheme"] = PropertyInfo(Variant::INT, "editors/3d/navigation/navigation_scheme", PROPERTY_HINT_ENUM, "Godot,Maya,Modo");
- _initial_set("editors/3d/navigation/zoom_style", 0);
- hints["editors/3d/navigation/zoom_style"] = PropertyInfo(Variant::INT, "editors/3d/navigation/zoom_style", PROPERTY_HINT_ENUM, "Vertical, Horizontal");
+ _initial_set("editors/3d/navigation/invert_y_axis", false);
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/navigation/navigation_scheme", 0, "Godot,Maya,Modo")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/navigation/zoom_style", 0, "Vertical,Horizontal")
_initial_set("editors/3d/navigation/emulate_numpad", false);
_initial_set("editors/3d/navigation/emulate_3_button_mouse", false);
- _initial_set("editors/3d/navigation/orbit_modifier", 0);
- hints["editors/3d/navigation/orbit_modifier"] = PropertyInfo(Variant::INT, "editors/3d/navigation/orbit_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl");
- _initial_set("editors/3d/navigation/pan_modifier", 1);
- hints["editors/3d/navigation/pan_modifier"] = PropertyInfo(Variant::INT, "editors/3d/navigation/pan_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl");
- _initial_set("editors/3d/navigation/zoom_modifier", 4);
- hints["editors/3d/navigation/zoom_modifier"] = PropertyInfo(Variant::INT, "editors/3d/navigation/zoom_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/navigation/orbit_modifier", 0, "None,Shift,Alt,Meta,Ctrl")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/navigation/pan_modifier", 1, "None,Shift,Alt,Meta,Ctrl")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/navigation/zoom_modifier", 4, "None,Shift,Alt,Meta,Ctrl")
_initial_set("editors/3d/navigation/warped_mouse_panning", true);
// 3D: Navigation feel
- _initial_set("editors/3d/navigation_feel/orbit_sensitivity", 0.4);
- hints["editors/3d/navigation_feel/orbit_sensitivity"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/orbit_sensitivity", PROPERTY_HINT_RANGE, "0.0, 2, 0.01");
- _initial_set("editors/3d/navigation_feel/orbit_inertia", 0.05);
- hints["editors/3d/navigation_feel/orbit_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
- _initial_set("editors/3d/navigation_feel/translation_inertia", 0.15);
- hints["editors/3d/navigation_feel/translation_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
- _initial_set("editors/3d/navigation_feel/zoom_inertia", 0.075);
- hints["editors/3d/navigation_feel/zoom_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/zoom_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
- _initial_set("editors/3d/navigation_feel/manipulation_orbit_inertia", 0.075);
- hints["editors/3d/navigation_feel/manipulation_orbit_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/manipulation_orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
- _initial_set("editors/3d/navigation_feel/manipulation_translation_inertia", 0.075);
- hints["editors/3d/navigation_feel/manipulation_translation_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/navigation_feel/manipulation_translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/orbit_sensitivity", 0.25, "0.01,2,0.001")
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/orbit_inertia", 0.0, "0,1,0.001")
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/translation_inertia", 0.05, "0,1,0.001")
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/navigation_feel/zoom_inertia", 0.05, "0,1,0.001")
// 3D: Freelook
- _initial_set("editors/3d/freelook/freelook_navigation_scheme", false);
- hints["editors/3d/freelook/freelook_navigation_scheme"] = PropertyInfo(Variant::INT, "editors/3d/freelook/freelook_navigation_scheme", PROPERTY_HINT_ENUM, "Default,Partially Axis-Locked (id Tech),Fully Axis-Locked (Minecraft)");
- _initial_set("editors/3d/freelook/freelook_sensitivity", 0.4);
- hints["editors/3d/freelook/freelook_sensitivity"] = PropertyInfo(Variant::FLOAT, "editors/3d/freelook/freelook_sensitivity", PROPERTY_HINT_RANGE, "0.0, 2, 0.01");
- _initial_set("editors/3d/freelook/freelook_inertia", 0.1);
- hints["editors/3d/freelook/freelook_inertia"] = PropertyInfo(Variant::FLOAT, "editors/3d/freelook/freelook_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
- _initial_set("editors/3d/freelook/freelook_base_speed", 5.0);
- hints["editors/3d/freelook/freelook_base_speed"] = PropertyInfo(Variant::FLOAT, "editors/3d/freelook/freelook_base_speed", PROPERTY_HINT_RANGE, "0.0, 10, 0.01");
- _initial_set("editors/3d/freelook/freelook_activation_modifier", 0);
- hints["editors/3d/freelook/freelook_activation_modifier"] = PropertyInfo(Variant::INT, "editors/3d/freelook/freelook_activation_modifier", PROPERTY_HINT_ENUM, "None,Shift,Alt,Meta,Ctrl");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/freelook/freelook_navigation_scheme", 0, "Default,Partially Axis-Locked (id Tech),Fully Axis-Locked (Minecraft)")
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/freelook/freelook_sensitivity", 0.25, "0.01,2,0.001")
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/freelook/freelook_inertia", 0.0, "0,1,0.001")
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/3d/freelook/freelook_base_speed", 5.0, "0,10,0.01")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/3d/freelook/freelook_activation_modifier", 0, "None,Shift,Alt,Meta,Ctrl")
_initial_set("editors/3d/freelook/freelook_speed_zoom_link", false);
// 2D
@@ -704,8 +629,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("editors/tiles_editor/grid_color", Color(1.0, 0.5, 0.2, 0.5));
// Polygon editor
- _initial_set("editors/poly_editor/point_grab_radius", 8);
- _initial_set("editors/poly_editor/show_previous_outline", true);
+ _initial_set("editors/polygon_editor/point_grab_radius", 8);
+ _initial_set("editors/polygon_editor/show_previous_outline", true);
// Animation
_initial_set("editors/animation/autorename_animation_tracks", true);
@@ -716,28 +641,24 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("editors/animation/onion_layers_future_color", Color(0, 1, 0));
// Visual editors
- _initial_set("editors/visual_editors/minimap_opacity", 0.85);
- hints["editors/visual_editors/minimap_opacity"] = PropertyInfo(Variant::FLOAT, "editors/visual_editors/minimap_opacity", PROPERTY_HINT_RANGE, "0.0,1.0,0.01", PROPERTY_USAGE_DEFAULT);
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/visual_editors/minimap_opacity", 0.85, "0.0,1.0,0.01")
/* Run */
// Window placement
- _initial_set("run/window_placement/rect", 1);
- hints["run/window_placement/rect"] = PropertyInfo(Variant::INT, "run/window_placement/rect", PROPERTY_HINT_ENUM, "Top Left,Centered,Custom Position,Force Maximized,Force Fullscreen");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "run/window_placement/rect", 1, "Top Left,Centered,Custom Position,Force Maximized,Force Fullscreen")
String screen_hints = "Same as Editor,Previous Monitor,Next Monitor";
for (int i = 0; i < DisplayServer::get_singleton()->get_screen_count(); i++) {
screen_hints += ",Monitor " + itos(i + 1);
}
_initial_set("run/window_placement/rect_custom_position", Vector2());
- _initial_set("run/window_placement/screen", 0);
- hints["run/window_placement/screen"] = PropertyInfo(Variant::INT, "run/window_placement/screen", PROPERTY_HINT_ENUM, screen_hints);
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "run/window_placement/screen", 0, screen_hints)
// Auto save
_initial_set("run/auto_save/save_before_running", true);
// Output
- _initial_set("run/output/font_size", 13);
- hints["run/output/font_size"] = PropertyInfo(Variant::INT, "run/output/font_size", PROPERTY_HINT_RANGE, "8,48,1");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "run/output/font_size", 13, "8,48,1")
_initial_set("run/output/always_clear_output_on_play", true);
_initial_set("run/output/always_open_output_on_play", true);
_initial_set("run/output/always_close_output_on_stop", false);
@@ -747,17 +668,14 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Debug
_initial_set("network/debug/remote_host", "127.0.0.1"); // Hints provided in setup_network
- _initial_set("network/debug/remote_port", 6007);
- hints["network/debug/remote_port"] = PropertyInfo(Variant::INT, "network/debug/remote_port", PROPERTY_HINT_RANGE, "1,65535,1");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "network/debug/remote_port", 6007, "1,65535,1")
// SSL
- _initial_set("network/ssl/editor_ssl_certificates", _SYSTEM_CERTS_PATH);
- hints["network/ssl/editor_ssl_certificates"] = PropertyInfo(Variant::STRING, "network/ssl/editor_ssl_certificates", PROPERTY_HINT_GLOBAL_FILE, "*.crt,*.pem");
+ EDITOR_SETTING(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "network/ssl/editor_ssl_certificates", _SYSTEM_CERTS_PATH, "*.crt,*.pem")
/* Extra config */
- _initial_set("project_manager/sorting_order", 0);
- hints["project_manager/sorting_order"] = PropertyInfo(Variant::INT, "project_manager/sorting_order", PROPERTY_HINT_ENUM, "Name,Path,Last Edited");
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "project_manager/sorting_order", 0, "Name,Path,Last Edited")
if (p_extra_config.is_valid()) {
if (p_extra_config->has_section("init_projects") && p_extra_config->has_section_key("init_projects", "list")) {
@@ -793,7 +711,7 @@ void EditorSettings::_load_godot2_text_editor_theme() {
_initial_set("text_editor/theme/highlighting/background_color", Color(0.13, 0.12, 0.15));
_initial_set("text_editor/theme/highlighting/completion_background_color", Color(0.17, 0.16, 0.2));
_initial_set("text_editor/theme/highlighting/completion_selected_color", Color(0.26, 0.26, 0.27));
- _initial_set("text_editor/theme/highlighting/completion_existing_color", Color(0.13, 0.87, 0.87, 0.87));
+ _initial_set("text_editor/theme/highlighting/completion_existing_color", Color(0.87, 0.87, 0.87, 0.13));
_initial_set("text_editor/theme/highlighting/completion_scroll_color", Color(1, 1, 1));
_initial_set("text_editor/theme/highlighting/completion_font_color", Color(0.67, 0.67, 0.67));
_initial_set("text_editor/theme/highlighting/text_color", Color(0.67, 0.67, 0.67));
@@ -1492,7 +1410,7 @@ Ref<Shortcut> EditorSettings::get_shortcut(const String &p_name) const {
// If there was no override, check the default builtins to see if it has an InputEvent for the provided name.
if (sc.is_null()) {
- const OrderedHashMap<String, List<Ref<InputEvent>>>::ConstElement builtin_default = InputMap::get_singleton()->get_builtins().find(p_name);
+ const OrderedHashMap<String, List<Ref<InputEvent>>>::ConstElement builtin_default = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().find(p_name);
if (builtin_default) {
sc.instantiate();
sc->set_event(builtin_default.get().front()->get());
@@ -1527,6 +1445,23 @@ Ref<Shortcut> ED_GET_SHORTCUT(const String &p_path) {
return sc;
}
+void ED_SHORTCUT_OVERRIDE(const String &p_path, const String &p_feature, Key p_keycode) {
+ Ref<Shortcut> sc = EditorSettings::get_singleton()->get_shortcut(p_path);
+ ERR_FAIL_COND_MSG(!sc.is_valid(), "Used ED_SHORTCUT_OVERRIDE with invalid shortcut: " + p_path + ".");
+
+ // Only add the override if the OS supports the provided feature.
+ if (OS::get_singleton()->has_feature(p_feature)) {
+ Ref<InputEventKey> ie;
+ if (p_keycode) {
+ ie = InputEventKey::create_reference(p_keycode);
+ }
+
+ // Directly override the existing shortcut.
+ sc->set_event(ie);
+ sc->set_meta("original", ie);
+ }
+}
+
Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, Key p_keycode) {
#ifdef OSX_ENABLED
// Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS
@@ -1537,14 +1472,7 @@ Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, Key p_keyc
Ref<InputEventKey> ie;
if (p_keycode) {
- ie.instantiate();
-
- ie->set_unicode(p_keycode & KEY_CODE_MASK);
- ie->set_keycode(p_keycode & KEY_CODE_MASK);
- ie->set_shift_pressed(bool(p_keycode & KEY_MASK_SHIFT));
- ie->set_alt_pressed(bool(p_keycode & KEY_MASK_ALT));
- ie->set_ctrl_pressed(bool(p_keycode & KEY_MASK_CTRL));
- ie->set_meta_pressed(bool(p_keycode & KEY_MASK_META));
+ ie = InputEventKey::create_reference(p_keycode);
}
if (!EditorSettings::get_singleton()) {
@@ -1585,15 +1513,23 @@ void EditorSettings::set_builtin_action_override(const String &p_name, const Arr
// Check if the provided event array is same as built-in. If it is, it does not need to be added to the overrides.
// Note that event order must also be the same.
bool same_as_builtin = true;
- OrderedHashMap<String, List<Ref<InputEvent>>>::ConstElement builtin_default = InputMap::get_singleton()->get_builtins().find(p_name);
+ OrderedHashMap<String, List<Ref<InputEvent>>>::ConstElement builtin_default = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().find(p_name);
if (builtin_default) {
List<Ref<InputEvent>> builtin_events = builtin_default.get();
- if (p_events.size() == builtin_events.size()) {
+ // In the editor we only care about key events.
+ List<Ref<InputEventKey>> builtin_key_events;
+ for (Ref<InputEventKey> iek : builtin_events) {
+ if (iek.is_valid()) {
+ builtin_key_events.push_back(iek);
+ }
+ }
+
+ if (p_events.size() == builtin_key_events.size()) {
int event_idx = 0;
// Check equality of each event.
- for (const Ref<InputEvent> &E : builtin_events) {
+ for (const Ref<InputEventKey> &E : builtin_key_events) {
if (!E->is_match(p_events[event_idx])) {
same_as_builtin = false;
break;
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index 6d28b26623..9067539e29 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -31,13 +31,13 @@
#ifndef EDITOR_SETTINGS_H
#define EDITOR_SETTINGS_H
+#include "core/input/shortcut.h"
#include "core/io/config_file.h"
#include "core/io/resource.h"
#include "core/object/class_db.h"
#include "core/os/thread_safe.h"
#include "core/string/translation.h"
#include "editor/editor_paths.h"
-#include "scene/gui/shortcut.h"
class EditorPlugin;
@@ -201,6 +201,7 @@ Variant _EDITOR_GET(const String &p_setting);
#define ED_IS_SHORTCUT(p_name, p_ev) (EditorSettings::get_singleton()->is_shortcut(p_name, p_ev))
Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, Key p_keycode = KEY_NONE);
+void ED_SHORTCUT_OVERRIDE(const String &p_path, const String &p_feature, Key p_keycode = KEY_NONE);
Ref<Shortcut> ED_GET_SHORTCUT(const String &p_path);
#endif // EDITOR_SETTINGS_H
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index 91f00deeaa..1890814da9 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -52,7 +52,7 @@ String EditorSpinSlider::get_text_value() const {
return TS->format_number(String::num(get_value(), Math::range_step_decimals(get_step())));
}
-void EditorSpinSlider::_gui_input(const Ref<InputEvent> &p_event) {
+void EditorSpinSlider::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (read_only) {
@@ -191,6 +191,59 @@ void EditorSpinSlider::_grabber_gui_input(const Ref<InputEvent> &p_event) {
}
}
+void EditorSpinSlider::_value_input_gui_input(const Ref<InputEvent> &p_event) {
+ Ref<InputEventKey> k = p_event;
+ if (k.is_valid() && k->is_pressed()) {
+ double step = get_step();
+ double real_step = step;
+ if (step < 1) {
+ double divisor = 1.0 / get_step();
+
+ if (trunc(divisor) == divisor) {
+ step = 1.0;
+ }
+ }
+
+ if (k->is_ctrl_pressed()) {
+ step *= 100.0;
+ } else if (k->is_shift_pressed()) {
+ step *= 10.0;
+ } else if (k->is_alt_pressed()) {
+ step *= 0.1;
+ }
+
+ uint32_t code = k->get_keycode();
+ switch (code) {
+ case KEY_UP: {
+ _evaluate_input_text();
+
+ double last_value = get_value();
+ set_value(last_value + step);
+ double new_value = get_value();
+
+ if (new_value < CLAMP(last_value + step, get_min(), get_max())) {
+ set_value(last_value + real_step);
+ }
+
+ value_input->set_text(get_text_value());
+ } break;
+ case KEY_DOWN: {
+ _evaluate_input_text();
+
+ double last_value = get_value();
+ set_value(last_value - step);
+ double new_value = get_value();
+
+ if (new_value > CLAMP(last_value - step, get_min(), get_max())) {
+ set_value(last_value - real_step);
+ }
+
+ value_input->set_text(get_text_value());
+ } break;
+ }
+ }
+}
+
void EditorSpinSlider::_update_value_input_stylebox() {
if (!value_input) {
return;
@@ -221,7 +274,7 @@ void EditorSpinSlider::_draw_spin_slider() {
bool rtl = is_layout_rtl();
Vector2 size = get_size();
- Ref<StyleBox> sb = get_theme_stylebox(SNAME("normal"), SNAME("LineEdit"));
+ Ref<StyleBox> sb = get_theme_stylebox(is_read_only() ? SNAME("read_only") : SNAME("normal"), SNAME("LineEdit"));
if (!flat) {
draw_style_box(sb, Rect2(Vector2(), size));
}
@@ -233,7 +286,7 @@ void EditorSpinSlider::_draw_spin_slider() {
int label_width = font->get_string_size(label, font_size).width;
int number_width = size.width - sb->get_minimum_size().width - label_width - sep;
- Ref<Texture2D> updown = get_theme_icon(SNAME("updown"), SNAME("SpinBox"));
+ Ref<Texture2D> updown = get_theme_icon(is_read_only() ? SNAME("updown_disabled") : SNAME("updown"), SNAME("SpinBox"));
if (get_step() == 1) {
number_width -= updown->get_width();
@@ -243,7 +296,7 @@ void EditorSpinSlider::_draw_spin_slider() {
int vofs = (size.height - font->get_height(font_size)) / 2 + font->get_ascent(font_size);
- Color fc = get_theme_color(SNAME("font_color"), SNAME("LineEdit"));
+ Color fc = get_theme_color(is_read_only() ? SNAME("font_uneditable_color") : SNAME("font_color"), SNAME("LineEdit"));
Color lc;
if (use_custom_label_color) {
lc = custom_label_color;
@@ -299,7 +352,7 @@ void EditorSpinSlider::_draw_spin_slider() {
TS->free(num_rid);
if (get_step() == 1) {
- Ref<Texture2D> updown2 = get_theme_icon(SNAME("updown"), SNAME("SpinBox"));
+ Ref<Texture2D> updown2 = get_theme_icon(is_read_only() ? SNAME("updown_disabled") : SNAME("updown"), SNAME("SpinBox"));
int updown_vofs = (size.height - updown2->get_height()) / 2;
if (rtl) {
updown_offset = sb->get_margin(SIDE_LEFT);
@@ -328,7 +381,7 @@ void EditorSpinSlider::_draw_spin_slider() {
Rect2 grabber_rect = Rect2(ofs + gofs, svofs + 1, grabber_w, 2 * EDSCALE);
draw_rect(grabber_rect, c);
- grabbing_spinner_mouse_pos = get_global_position() + grabber_rect.position + grabber_rect.size * 0.5;
+ grabbing_spinner_mouse_pos = get_global_position() + grabber_rect.get_center();
bool display_grabber = (mouse_over_spin || mouse_over_grabber) && !grabbing_spinner && !(value_input_popup && value_input_popup->is_visible());
if (grabber->is_visible() != display_grabber) {
@@ -354,7 +407,7 @@ void EditorSpinSlider::_draw_spin_slider() {
Vector2 scale = get_global_transform_with_canvas().get_scale();
grabber->set_scale(scale);
grabber->set_size(Size2(0, 0));
- grabber->set_position(get_global_position() + (grabber_rect.position + grabber_rect.size * 0.5 - grabber->get_size() * 0.5) * scale);
+ grabber->set_position(get_global_position() + (grabber_rect.get_center() - grabber->get_size() * 0.5) * scale);
if (mousewheel_over_grabber) {
Input::get_singleton()->warp_mouse_position(grabber->get_position() + grabber_rect.size);
@@ -564,8 +617,6 @@ void EditorSpinSlider::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_flat", "flat"), &EditorSpinSlider::set_flat);
ClassDB::bind_method(D_METHOD("is_flat"), &EditorSpinSlider::is_flat);
- ClassDB::bind_method(D_METHOD("_gui_input"), &EditorSpinSlider::_gui_input);
-
ADD_PROPERTY(PropertyInfo(Variant::STRING, "label"), "set_label", "get_label");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "suffix"), "set_suffix", "get_suffix");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "read_only"), "set_read_only", "is_read_only");
@@ -587,11 +638,13 @@ void EditorSpinSlider::_ensure_input_popup() {
value_input_popup->connect("popup_hide", callable_mp(this, &EditorSpinSlider::_value_input_closed));
value_input->connect("text_submitted", callable_mp(this, &EditorSpinSlider::_value_input_submitted));
value_input->connect("focus_exited", callable_mp(this, &EditorSpinSlider::_value_focus_exited));
+ value_input->connect("gui_input", callable_mp(this, &EditorSpinSlider::_value_input_gui_input));
if (is_inside_tree()) {
_update_value_input_stylebox();
}
}
+
EditorSpinSlider::EditorSpinSlider() {
flat = false;
grabbing_spinner_attempt = false;
diff --git a/editor/editor_spin_slider.h b/editor/editor_spin_slider.h
index c09d084e88..7e10764491 100644
--- a/editor/editor_spin_slider.h
+++ b/editor/editor_spin_slider.h
@@ -71,6 +71,7 @@ class EditorSpinSlider : public Range {
void _value_input_closed();
void _value_input_submitted(const String &);
void _value_focus_exited();
+ void _value_input_gui_input(const Ref<InputEvent> &p_event);
bool hide_slider;
bool flat;
@@ -85,7 +86,7 @@ class EditorSpinSlider : public Range {
protected:
void _notification(int p_what);
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
static void _bind_methods();
void _grabber_mouse_entered();
void _grabber_mouse_exited();
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 7f8229e5e8..de1d7b5706 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -219,6 +219,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
exceptions.insert("DefaultProjectIcon");
exceptions.insert("GuiChecked");
exceptions.insert("GuiRadioChecked");
+ exceptions.insert("GuiIndeterminate");
exceptions.insert("GuiCloseCustomizable");
exceptions.insert("GuiGraphNodePort");
exceptions.insert("GuiResizer");
@@ -394,12 +395,14 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color separator_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.1);
const Color highlight_color = Color(accent_color.r, accent_color.g, accent_color.b, 0.275);
+ const Color disabled_highlight_color = highlight_color.lerp(dark_theme ? Color(0, 0, 0) : Color(1, 1, 1), 0.5);
float prev_icon_saturation = theme->has_color("icon_saturation", "Editor") ? theme->get_color("icon_saturation", "Editor").r : 1.0;
theme->set_color("icon_saturation", "Editor", Color(icon_saturation, icon_saturation, icon_saturation)); //can't save single float in theme, so using color
theme->set_color("accent_color", "Editor", accent_color);
theme->set_color("highlight_color", "Editor", highlight_color);
+ theme->set_color("disabled_highlight_color", "Editor", disabled_highlight_color);
theme->set_color("base_color", "Editor", base_color);
theme->set_color("dark_color_1", "Editor", dark_color_1);
theme->set_color("dark_color_2", "Editor", dark_color_2);
@@ -423,6 +426,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Color warning_color = Color(1, 0.87, 0.4);
Color error_color = Color(1, 0.47, 0.42);
Color property_color = font_color.lerp(Color(0.5, 0.5, 0.5), 0.5);
+ Color readonly_color = property_color.lerp(dark_theme ? Color(0, 0, 0) : Color(1, 1, 1), 0.5);
+ Color readonly_error_color = error_color.lerp(dark_theme ? Color(0, 0, 0) : Color(1, 1, 1), 0.5);
if (!dark_theme) {
// Darken some colors to be readable on a light background
@@ -435,6 +440,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("warning_color", "Editor", warning_color);
theme->set_color("error_color", "Editor", error_color);
theme->set_color("property_color", "Editor", property_color);
+ theme->set_color("readonly_color", "Editor", readonly_color);
+ theme->set_color("readonly_error_color", "EditorProperty", readonly_error_color);
if (!dark_theme) {
theme->set_color("vulkan_color", "Editor", Color::hex(0xad1128ff));
@@ -695,6 +702,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("unchecked", "CheckBox", theme->get_icon("GuiUnchecked", "EditorIcons"));
theme->set_icon("radio_checked", "CheckBox", theme->get_icon("GuiRadioChecked", "EditorIcons"));
theme->set_icon("radio_unchecked", "CheckBox", theme->get_icon("GuiRadioUnchecked", "EditorIcons"));
+ theme->set_icon("checked_disabled", "CheckBox", theme->get_icon("GuiCheckedDisabled", "EditorIcons"));
+ theme->set_icon("unchecked_disabled", "CheckBox", theme->get_icon("GuiUncheckedDisabled", "EditorIcons"));
+ theme->set_icon("radio_checked_disabled", "CheckBox", theme->get_icon("GuiRadioCheckedDisabled", "EditorIcons"));
+ theme->set_icon("radio_unchecked_disabled", "CheckBox", theme->get_icon("GuiRadioUncheckedDisabled", "EditorIcons"));
theme->set_color("font_color", "CheckBox", font_color);
theme->set_color("font_hover_color", "CheckBox", font_hover_color);
@@ -741,6 +752,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons"));
theme->set_icon("radio_checked", "PopupMenu", theme->get_icon("GuiRadioChecked", "EditorIcons"));
theme->set_icon("radio_unchecked", "PopupMenu", theme->get_icon("GuiRadioUnchecked", "EditorIcons"));
+ theme->set_icon("checked_disabled", "PopupMenu", theme->get_icon("GuiCheckedDisabled", "EditorIcons"));
+ theme->set_icon("unchecked_disabled", "PopupMenu", theme->get_icon("GuiUncheckedDisabled", "EditorIcons"));
+ theme->set_icon("radio_checked_disabled", "PopupMenu", theme->get_icon("GuiRadioCheckedDisabled", "EditorIcons"));
+ theme->set_icon("radio_unchecked_disabled", "PopupMenu", theme->get_icon("GuiRadioUncheckedDisabled", "EditorIcons"));
theme->set_icon("submenu", "PopupMenu", theme->get_icon("ArrowRight", "EditorIcons"));
theme->set_icon("submenu_mirrored", "PopupMenu", theme->get_icon("ArrowLeft", "EditorIcons"));
theme->set_icon("visibility_hidden", "PopupMenu", theme->get_icon("GuiVisibilityHidden", "EditorIcons"));
@@ -802,6 +817,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_constant("vseparation", "EditorProperty", (extra_spacing + default_margin_size) * EDSCALE);
theme->set_color("error_color", "EditorProperty", error_color);
theme->set_color("property_color", "EditorProperty", property_color);
+ theme->set_color("readonly_color", "EditorProperty", readonly_color);
+ theme->set_color("readonly_error_color", "EditorProperty", readonly_error_color);
Color inspector_section_color = font_color.lerp(Color(0.5, 0.5, 0.5), 0.35);
theme->set_color("font_color", "EditorInspectorSection", inspector_section_color);
@@ -817,6 +834,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// Tree
theme->set_icon("checked", "Tree", theme->get_icon("GuiChecked", "EditorIcons"));
+ theme->set_icon("indeterminate", "Tree", theme->get_icon("GuiIndeterminate", "EditorIcons"));
theme->set_icon("unchecked", "Tree", theme->get_icon("GuiUnchecked", "EditorIcons"));
theme->set_icon("arrow", "Tree", theme->get_icon("GuiTreeArrowDown", "EditorIcons"));
theme->set_icon("arrow_collapsed", "Tree", theme->get_icon("GuiTreeArrowRight", "EditorIcons"));
@@ -1050,7 +1068,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("tab", "TextEdit", theme->get_icon("GuiTab", "EditorIcons"));
theme->set_icon("space", "TextEdit", theme->get_icon("GuiSpace", "EditorIcons"));
theme->set_color("font_color", "TextEdit", font_color);
- theme->set_color("font_readonly_color", "LineEdit", font_readonly_color);
+ theme->set_color("font_readonly_color", "TextEdit", font_readonly_color);
theme->set_color("caret_color", "TextEdit", font_color);
theme->set_color("selection_color", "TextEdit", selection_color);
theme->set_constant("line_spacing", "TextEdit", 4 * EDSCALE);
@@ -1066,6 +1084,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("folded", "CodeEdit", theme->get_icon("GuiTreeArrowRight", "EditorIcons"));
theme->set_icon("can_fold", "CodeEdit", theme->get_icon("GuiTreeArrowDown", "EditorIcons"));
theme->set_icon("executing_line", "CodeEdit", theme->get_icon("MainPlay", "EditorIcons"));
+ theme->set_icon("breakpoint", "CodeEdit", theme->get_icon("Breakpoint", "EditorIcons"));
theme->set_constant("line_spacing", "CodeEdit", EDITOR_DEF("text_editor/appearance/whitespace/line_spacing", 6));
// H/VSplitContainer
@@ -1136,8 +1155,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("increment", "HScrollBar", empty_icon);
theme->set_icon("increment_highlight", "HScrollBar", empty_icon);
+ theme->set_icon("increment_pressed", "HScrollBar", empty_icon);
theme->set_icon("decrement", "HScrollBar", empty_icon);
theme->set_icon("decrement_highlight", "HScrollBar", empty_icon);
+ theme->set_icon("decrement_pressed", "HScrollBar", empty_icon);
// VScrollBar
theme->set_stylebox("scroll", "VScrollBar", make_stylebox(theme->get_icon("GuiScrollBg", "EditorIcons"), 5, 5, 5, 5, 0, 0, 0, 0));
@@ -1148,8 +1169,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("increment", "VScrollBar", empty_icon);
theme->set_icon("increment_highlight", "VScrollBar", empty_icon);
+ theme->set_icon("increment_pressed", "VScrollBar", empty_icon);
theme->set_icon("decrement", "VScrollBar", empty_icon);
theme->set_icon("decrement_highlight", "VScrollBar", empty_icon);
+ theme->set_icon("decrement_pressed", "VScrollBar", empty_icon);
// HSlider
theme->set_icon("grabber_highlight", "HSlider", theme->get_icon("GuiSliderGrabberHl", "EditorIcons"));
@@ -1199,11 +1222,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// TooltipPanel
Ref<StyleBoxFlat> style_tooltip = style_popup->duplicate();
style_tooltip->set_shadow_size(0);
- style_tooltip->set_default_margin(SIDE_LEFT, default_margin_size * EDSCALE);
+ style_tooltip->set_default_margin(SIDE_LEFT, default_margin_size * EDSCALE * 0.5);
style_tooltip->set_default_margin(SIDE_TOP, default_margin_size * EDSCALE * 0.5);
- style_tooltip->set_default_margin(SIDE_RIGHT, default_margin_size * EDSCALE);
+ style_tooltip->set_default_margin(SIDE_RIGHT, default_margin_size * EDSCALE * 0.5);
style_tooltip->set_default_margin(SIDE_BOTTOM, default_margin_size * EDSCALE * 0.5);
- style_tooltip->set_bg_color(mono_color.inverted() * Color(1, 1, 1, 0.9));
+ style_tooltip->set_bg_color(dark_color_3 * Color(0.8, 0.8, 0.8, 0.9));
style_tooltip->set_border_width_all(0);
theme->set_color("font_color", "TooltipLabel", font_hover_color);
theme->set_color("font_color_shadow", "TooltipLabel", Color(0, 0, 0, 0));
@@ -1214,6 +1237,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// SpinBox
theme->set_icon("updown", "SpinBox", theme->get_icon("GuiSpinboxUpdown", "EditorIcons"));
+ theme->set_icon("updown_disabled", "SpinBox", theme->get_icon("GuiSpinboxUpdownDisabled", "EditorIcons"));
// ProgressBar
theme->set_stylebox("bg", "ProgressBar", make_stylebox(theme->get_icon("GuiProgressBar", "EditorIcons"), 4, 4, 4, 4, 0, 0, 0, 0));
@@ -1359,7 +1383,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_constant("label_width", "ColorPicker", 10 * EDSCALE);
theme->set_icon("screen_picker", "ColorPicker", theme->get_icon("ColorPick", "EditorIcons"));
theme->set_icon("add_preset", "ColorPicker", theme->get_icon("Add", "EditorIcons"));
- theme->set_icon("preset_bg", "ColorPicker", theme->get_icon("GuiMiniCheckerboard", "EditorIcons"));
+ theme->set_icon("sample_bg", "ColorPicker", theme->get_icon("GuiMiniCheckerboard", "EditorIcons"));
theme->set_icon("overbright_indicator", "ColorPicker", theme->get_icon("OverbrightIndicator", "EditorIcons"));
theme->set_icon("bar_arrow", "ColorPicker", theme->get_icon("ColorPickerBarArrow", "EditorIcons"));
theme->set_icon("picker_cursor", "ColorPicker", theme->get_icon("PickerCursor", "EditorIcons"));
@@ -1367,6 +1391,13 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// ColorPickerButton
theme->set_icon("bg", "ColorPickerButton", theme->get_icon("GuiMiniCheckerboard", "EditorIcons"));
+ // ColorPresetButton
+ Ref<StyleBoxFlat> preset_sb = make_flat_stylebox(Color(1, 1, 1), 2, 2, 2, 2, 2);
+ preset_sb->set_anti_aliased(false);
+ theme->set_stylebox("preset_fg", "ColorPresetButton", preset_sb);
+ theme->set_icon("preset_bg", "ColorPresetButton", theme->get_icon("GuiMiniCheckerboard", "EditorIcons"));
+ theme->set_icon("overbright_indicator", "ColorPresetButton", theme->get_icon("OverbrightIndicator", "EditorIcons"));
+
// Information on 3D viewport
Ref<StyleBoxFlat> style_info_3d_viewport = style_default->duplicate();
style_info_3d_viewport->set_bg_color(style_info_3d_viewport->get_bg_color() * Color(1, 1, 1, 0.5));
diff --git a/editor/editor_translation_parser.cpp b/editor/editor_translation_parser.cpp
index 27d428e682..df47b2d988 100644
--- a/editor/editor_translation_parser.cpp
+++ b/editor/editor_translation_parser.cpp
@@ -38,15 +38,10 @@
EditorTranslationParser *EditorTranslationParser::singleton = nullptr;
Error EditorTranslationParserPlugin::parse_file(const String &p_path, Vector<String> *r_ids, Vector<Vector<String>> *r_ids_ctx_plural) {
- if (!get_script_instance()) {
- return ERR_UNAVAILABLE;
- }
-
- if (get_script_instance()->has_method("_parse_file")) {
- Array ids;
- Array ids_ctx_plural;
- get_script_instance()->call("_parse_file", p_path, ids, ids_ctx_plural);
+ Array ids;
+ Array ids_ctx_plural;
+ if (GDVIRTUAL_CALL(_parse_file, p_path, ids, ids_ctx_plural)) {
// Add user's extracted translatable messages.
for (int i = 0; i < ids.size(); i++) {
r_ids->append(ids[i]);
@@ -71,12 +66,8 @@ Error EditorTranslationParserPlugin::parse_file(const String &p_path, Vector<Str
}
void EditorTranslationParserPlugin::get_recognized_extensions(List<String> *r_extensions) const {
- if (!get_script_instance()) {
- return;
- }
-
- if (get_script_instance()->has_method("_get_recognized_extensions")) {
- Array extensions = get_script_instance()->call("_get_recognized_extensions");
+ Vector<String> extensions;
+ if (GDVIRTUAL_CALL(_get_recognized_extensions, extensions)) {
for (int i = 0; i < extensions.size(); i++) {
r_extensions->push_back(extensions[i]);
}
@@ -86,8 +77,8 @@ void EditorTranslationParserPlugin::get_recognized_extensions(List<String> *r_ex
}
void EditorTranslationParserPlugin::_bind_methods() {
- BIND_VMETHOD(MethodInfo(Variant::NIL, "_parse_file", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::ARRAY, "msgids"), PropertyInfo(Variant::ARRAY, "msgids_context_plural")));
- BIND_VMETHOD(MethodInfo(Variant::ARRAY, "_get_recognized_extensions"));
+ GDVIRTUAL_BIND(_parse_file, "path", "msgids", "msgids_context_plural");
+ GDVIRTUAL_BIND(_get_recognized_extensions);
}
/////////////////////////
diff --git a/editor/editor_translation_parser.h b/editor/editor_translation_parser.h
index 7013bbb8c4..242ba33b55 100644
--- a/editor/editor_translation_parser.h
+++ b/editor/editor_translation_parser.h
@@ -32,7 +32,9 @@
#define EDITOR_TRANSLATION_PARSER_H
#include "core/error/error_list.h"
+#include "core/object/gdvirtual.gen.inc"
#include "core/object/ref_counted.h"
+#include "core/object/script_language.h"
class EditorTranslationParserPlugin : public RefCounted {
GDCLASS(EditorTranslationParserPlugin, RefCounted);
@@ -40,6 +42,9 @@ class EditorTranslationParserPlugin : public RefCounted {
protected:
static void _bind_methods();
+ GDVIRTUAL3(_parse_file, String, Array, Array)
+ GDVIRTUAL0RC(Vector<String>, _get_recognized_extensions)
+
public:
virtual Error parse_file(const String &p_path, Vector<String> *r_ids, Vector<Vector<String>> *r_ids_ctx_plural);
virtual void get_recognized_extensions(List<String> *r_extensions) const;
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index b646b3361d..cb88e9d75e 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -743,7 +743,7 @@ void ExportTemplateManager::_notification(int p_what) {
current_missing_label->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
current_installed_label->add_theme_color_override("font_color", get_theme_color(SNAME("disabled_font_color"), SNAME("Editor")));
- mirror_options_button->set_icon(get_theme_icon(SNAME("GuiTabMenu"), SNAME("EditorIcons")));
+ mirror_options_button->set_icon(get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index daee61c2dd..28bbfc2eff 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -1175,7 +1175,7 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_
EditorData *ed = &editor->get_editor_data();
for (int j = 0; j < ed->get_edited_scene_count(); j++) {
if (ed->get_scene_path(j) == file_changed_paths[i]) {
- ed->get_edited_scene_root(j)->set_filename(new_item_path);
+ ed->get_edited_scene_root(j)->set_scene_file_path(new_item_path);
editor->save_layout();
break;
}
@@ -1260,7 +1260,7 @@ void FileSystemDock::_update_resource_paths_after_move(const Map<String, String>
continue;
}
- path = get_tree()->get_edited_scene_root()->get_filename();
+ path = get_tree()->get_edited_scene_root()->get_scene_file_path();
} else {
path = EditorNode::get_editor_data().get_scene_path(i);
}
@@ -1270,7 +1270,7 @@ void FileSystemDock::_update_resource_paths_after_move(const Map<String, String>
}
if (i == EditorNode::get_editor_data().get_edited_scene()) {
- get_tree()->get_edited_scene_root()->set_filename(path);
+ get_tree()->get_edited_scene_root()->set_scene_file_path(path);
} else {
EditorNode::get_editor_data().set_scene_path(i, path);
}
@@ -2158,6 +2158,14 @@ bool FileSystemDock::can_drop_data_fw(const Point2 &p_point, const Variant &p_da
return true;
}
+ if (drag_data.has("type") && String(drag_data["type"]) == "nodes") {
+ // Save branch as scene.
+ String to_dir;
+ bool favorite;
+ _get_drag_target_folder(to_dir, favorite, p_point, p_from);
+ return !favorite && Array(drag_data["nodes"]).size() == 1;
+ }
+
return false;
}
@@ -2296,6 +2304,13 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data,
_update_tree(_compute_uncollapsed_paths());
}
}
+
+ if (drag_data.has("type") && String(drag_data["type"]) == "nodes") {
+ String to_dir;
+ bool favorite;
+ _get_drag_target_folder(to_dir, favorite, p_point, p_from);
+ EditorNode::get_singleton()->get_scene_tree_dock()->save_branch_to_file(to_dir);
+ }
}
void FileSystemDock::_get_drag_target_folder(String &target, bool &target_favorites, const Point2 &p_point, Control *p_from) const {
diff --git a/editor/icons/AddSplit.svg b/editor/icons/AddSplit.svg
deleted file mode 100644
index e46949182c..0000000000
--- a/editor/icons/AddSplit.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 13 10-10" fill="none" stroke="#f5f5f5" stroke-opacity=".39216" stroke-width="2"/><path d="m11 9v2h-2v2h2v2h2v-2h2v-2h-2v-2z" fill="#5fff97"/><circle cx="4" cy="12" fill="none" r="2"/><path d="m13 1a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -2-2zm-10 10a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -2-2z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/AnimatableBody2D.svg b/editor/icons/AnimatableBody2D.svg
new file mode 100644
index 0000000000..f4fed813c9
--- /dev/null
+++ b/editor/icons/AnimatableBody2D.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#8da5f3" fill-opacity=".99" stroke-width="1.08904"><path d="m10.86822576 4.28299076h1.99947744v1.99947744h-1.99947744z"/><path d="m10.86822576 10.84273776h1.99947744v1.99947744h-1.99947744z"/><path d="m4.71256576 10.84273776h1.99947744v1.99947744h-1.99947744z"/></g><g fill="none" stroke="#8da5f3"><path d="m1.635 8.161v4.848c0 .713.579 1.293 1.292 1.293h9.857c.713 0 1.291-.58 1.291-1.293v-9.854c0-.714-.578-1.293-1.291-1.293h-5.526" stroke-width="1.07" transform="matrix(.939225 0 0 .938055 1.27996 1.07595)"/><path d="m1.339 1.364 2.539 2.539" stroke-width=".74" transform="matrix(2.04823 .655864 .655864 2.04823 -1.51683 -1.5267)"/><path d="m1.436 1.461 1.168 1.168" stroke-width="1.18" transform="matrix(1.69185 0 0 1.69185 4.50755 -.792876)"/><path d="m1.385 1.41 1.219 1.219" stroke-width="1.22" transform="matrix(1.63859 0 0 1.63859 -.688679 4.82985)"/></g></svg>
diff --git a/editor/icons/AnimatableBody3D.svg b/editor/icons/AnimatableBody3D.svg
new file mode 100644
index 0000000000..2e472f0625
--- /dev/null
+++ b/editor/icons/AnimatableBody3D.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc7f7f" fill-opacity=".99" stroke-width="1.08904"><path d="m10.86822576 4.28299076h1.99947744v1.99947744h-1.99947744z"/><path d="m10.86822576 10.84273776h1.99947744v1.99947744h-1.99947744z"/><path d="m4.71256576 10.84273776h1.99947744v1.99947744h-1.99947744z"/></g><g fill="none" stroke="#fc7f7f"><path d="m1.635 8.161v4.848c0 .713.579 1.293 1.292 1.293h9.857c.713 0 1.291-.58 1.291-1.293v-9.854c0-.714-.578-1.293-1.291-1.293h-5.526" stroke-width="1.07" transform="matrix(.939225 0 0 .938055 1.27996 1.07595)"/><path d="m1.339 1.364 2.539 2.539" stroke-width=".74" transform="matrix(2.04823 .655864 .655864 2.04823 -1.51683 -1.5267)"/><path d="m1.436 1.461 1.168 1.168" stroke-width="1.18" transform="matrix(1.69185 0 0 1.69185 4.50755 -.792876)"/><path d="m1.385 1.41 1.219 1.219" stroke-width="1.22" transform="matrix(1.63859 0 0 1.63859 -.688679 4.82985)"/></g></svg>
diff --git a/editor/icons/AudioListener2D.svg b/editor/icons/AudioListener2D.svg
new file mode 100644
index 0000000000..db84dcfed7
--- /dev/null
+++ b/editor/icons/AudioListener2D.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1a5 5 0 0 0 -5 5h2a3 3 0 0 1 3-3 3 3 0 0 1 3 3c0 1.75-.54175 2.3583-1.1406 2.8574-.29944.2495-.62954.44071-.97656.69141-.17351.1253-.35729.26529-.53711.49219-.17982.227-.3457.58398-.3457.95898 0 1.2778-.31632 1.5742-.63867 1.7676-.32236.1934-.86133.23242-1.3613.23242h-1v2h1c.5 0 1.461.038922 2.3887-.51758.87316-.5239 1.4826-1.6633 1.5566-3.2266.011365-.0098.027247-.024684.10938-.083984.21547-.1556.63537-.40194 1.0859-.77734.90112-.751 1.8594-2.1445 1.8594-4.3945a5 5 0 0 0 -5-5zm7.9277 1-1.7383 1.0039a6 6 0 0 1 .81055 2.9961 6 6 0 0 1 -.80859 2.998l1.7363 1.002a8 8 0 0 0 0-8z" fill="#a5b7f3"/></svg>
diff --git a/editor/icons/Listener3D.svg b/editor/icons/AudioListener3D.svg
index c068474d17..c068474d17 100644
--- a/editor/icons/Listener3D.svg
+++ b/editor/icons/AudioListener3D.svg
diff --git a/editor/icons/AutoEndBackwards.svg b/editor/icons/AutoEndBackwards.svg
deleted file mode 100644
index c6de305069..0000000000
--- a/editor/icons/AutoEndBackwards.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m2 14c-.552262-.000055-.999945-.447738-1-1v-10c.000055-.5522619.447738-.9999448 1-1h8c.303863-.0001753.591325.1378063.78125.375l4 5c.291397.3649711.291397.8830289 0 1.248l-4 5c-.189538.237924-.477058.376652-.78125.37695h-8zm1-2h6.5195004l3.1991996-4-3.1991996-4h-6.5195004zm6.0000004-2v-4l1.9999996 2z" fill-rule="evenodd"/><path d="m3.8685125 4.9095434h4.1550816v1.1637426h-2.6154217v1.1117544h2.4594562v1.1637428h-2.4594562v1.3676976h2.7034024v1.1637432h-4.2430623z" stroke-width=".204755"/></g></svg>
diff --git a/editor/icons/AutoPlayBackwards.svg b/editor/icons/AutoPlayBackwards.svg
deleted file mode 100644
index 20602ba348..0000000000
--- a/editor/icons/AutoPlayBackwards.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m13.999798 2a-1.0001 1.0001 0 0 1 1 1v10a-1.0001 1.0001 0 0 1 -1 1h-8.0000003a-1.0001 1.0001 0 0 1 -.78125-.375l-4-5a-1.0001 1.0001 0 0 1 0-1.248l4-5a-1.0001 1.0001 0 0 1 .78125-.37695h8.0000003zm-1 2h-6.5195003l-3.1992 4 3.1992 4h6.5195003zm-3.0000003 1c1.1046003 0 2.0000003.8954 2.0000003 2v4h-1v-2h-2.0000003v2h-1v-4c0-1.1046.89543-2 2-2zm0 1a-1 1 0 0 0 -1 1v1h2.0000003v-1a-1 1 0 0 0 -1.0000003-1zm-3 0v4l-2-2z" fill="#e0e0e0" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/BoneTrack.svg b/editor/icons/BoneTrack.svg
deleted file mode 100644
index 69a32f3595..0000000000
--- a/editor/icons/BoneTrack.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m10.478 1037.4a2.4664 2.4663 0 0 0 -1.7804.7205 2.4664 2.4663 0 0 0 -.31408 3.1041l-3.559 3.5608a2.4664 2.4663 0 0 0 -3.1023.3121 2.4664 2.4663 0 0 0 0 3.4876 2.4664 2.4663 0 0 0 1.397.6955 2.4664 2.4663 0 0 0 .69561 1.397 2.4664 2.4663 0 0 0 3.4877 0 2.4664 2.4663 0 0 0 .31408-3.1041l3.5609-3.5608a2.4664 2.4663 0 0 0 3.1004-.3102 2.4664 2.4663 0 0 0 0-3.4875 2.4664 2.4663 0 0 0 -1.397-.6974 2.4664 2.4663 0 0 0 -.69561-1.3971 2.4664 2.4663 0 0 0 -1.7072-.7205z" fill="#c38ef1" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/Breakpoint.svg b/editor/icons/Breakpoint.svg
new file mode 100644
index 0000000000..b95c2b511e
--- /dev/null
+++ b/editor/icons/Breakpoint.svg
@@ -0,0 +1 @@
+<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8c0 3.866-3.134 7-7 7s-7-3.134-7-7 3.134-7 7-7 7 3.134 7 7" fill="#e1e1e1"/><pathd="m12 8c0 2.209-1.791 4-4 4s-4-1.791-4-4 1.791-4 4-4 4 1.791 4 4" fill="#f6f6f6"/></svg>
diff --git a/editor/icons/CanvasItemShader.svg b/editor/icons/CanvasItemShader.svg
deleted file mode 100644
index 9aeb2f0fdc..0000000000
--- a/editor/icons/CanvasItemShader.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m13.303 1c-.4344 0-.86973.16881-1.2012.50586l-1.4688 1.4941h4.3418c.082839-.52789-.072596-1.0872-.47266-1.4941-.33144-.33705-.76482-.50586-1.1992-.50586z" fill="#ff4545"/><path d="m10.633 3-1.9668 2h4.8008l1.0352-1.0527c.2628-.2673.41824-.60049.47266-.94727h-4.3418z" fill="#ffe345"/><path d="m8.666 5-1.9648 2h4.7988l1.9668-2z" fill="#80ff45"/><path d="m6.7012 7-1.4004 1.4238.56641.57617h3.668l1.9648-2h-4.7988z" fill="#45ffa2"/><path d="m5.8672 9 1.834 1.8652 1.834-1.8652zm-1.752.57812c-.48501-.048725-.90521.12503-1.1953.45508-.21472.24426-.35243.57797-.39844.9668h3.5625c-.10223-.1935-.22224-.37965-.38281-.54297-.55011-.55955-1.1009-.83018-1.5859-.87891z" fill="#45d7ff"/><path d="m1.3242 13c.18414.24071.43707.53374.83789.94141.88382.899 2.6552.67038 3.5391-.22852.20747-.21103.36064-.45476.4707-.71289h-4.8477z" fill="#ff4596"/><path d="m2.5215 11c-.0105.088737-.021484.17696-.021484.27148 0 1.3947-2.2782.28739-1.1758 1.7285h4.8477c.27363-.64173.24047-1.3785-.087891-2h-3.5625z" fill="#8045ff"/></svg>
diff --git a/editor/icons/CanvasItemShaderGraph.svg b/editor/icons/CanvasItemShaderGraph.svg
deleted file mode 100644
index 70db53a4ba..0000000000
--- a/editor/icons/CanvasItemShaderGraph.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m8.0625 1025.9a3.375 3 0 0 0 -3.375 3 3.375 3 0 0 0 1.6875 2.5957v9.8115a3.375 3 0 0 0 -1.6875 2.5928 3.375 3 0 0 0 3.375 3 3.375 3 0 0 0 3.375-3 3.375 3 0 0 0 -1.6875-2.5957v-8.7832l11.931 10.605a3.375 3 0 0 0 -.11865.7735 3.375 3 0 0 0 3.375 3 3.375 3 0 0 0 3.375-3 3.375 3 0 0 0 -3.375-3 3.375 3 0 0 0 -.87341.1025l-11.928-10.602h9.8844a3.375 3 0 0 0 2.9169 1.5 3.375 3 0 0 0 3.375-3 3.375 3 0 0 0 -3.375-3 3.375 3 0 0 0 -2.9202 1.5h-11.038a3.375 3 0 0 0 -2.9169-1.5z"/></clipPath><g transform="translate(0 -1036.4)"><g clip-path="url(#a)" transform="matrix(.59259 0 0 .66667 -1.7778 353.45)"><path d="m3 1025.9h27v3h-27z" fill="#ff4545"/><path d="m3 1028.9h27v3h-27z" fill="#ffe345"/><path d="m3 1031.9h27v3h-27z" fill="#80ff45"/><path d="m3 1034.9h27v3h-27z" fill="#45ffa2"/><path d="m3 1037.9h27v3h-27z" fill="#45d7ff"/><path d="m3 1043.9h27v3h-27z" fill="#ff4596"/><path d="m3 1040.9h27v3h-27z" fill="#8045ff"/></g><ellipse cx="3" cy="1039.4" fill="#6e6e6e"/></g></svg>
diff --git a/editor/icons/ColorRamp.svg b/editor/icons/ColorRamp.svg
deleted file mode 100644
index 13e05dd1ee..0000000000
--- a/editor/icons/ColorRamp.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(.51852 0 0 .7 -.55556 1034.6)" gradientUnits="userSpaceOnUse" x1="4" x2="30" y1="14" y2="14"><stop offset="0" stop-color="#afff68"/><stop offset="1" stop-color="#ff6b6b"/></linearGradient><path d="m1 1051.4h14v-14z" fill="url(#a)" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/ControlAlignCenterLeft.svg b/editor/icons/ControlAlignCenterLeft.svg
deleted file mode 100644
index fc4674af48..0000000000
--- a/editor/icons/ControlAlignCenterLeft.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 6h6v4h-6z" fill="#d6d6d6"/></svg>
diff --git a/editor/icons/ControlAlignCenterRight.svg b/editor/icons/ControlAlignCenterRight.svg
deleted file mode 100644
index c66a3d59b5..0000000000
--- a/editor/icons/ControlAlignCenterRight.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 6h6v4h-6z" fill="#d6d6d6"/></svg>
diff --git a/editor/icons/DeleteSplit.svg b/editor/icons/DeleteSplit.svg
deleted file mode 100644
index 4ae590f78b..0000000000
--- a/editor/icons/DeleteSplit.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m.623213 6.939446h1.845669v2.085366h-1.845669z" fill="#800000"/><path d="m12.488225 7.179143h1.629941v1.989487h-1.629941z" fill="#800000"/><g fill="#e9afaf"><path d="m2.540791 7.970143h3.164003v.407485h-3.164003z"/><path d="m9.012615 8.042052h3.523549v.527334h-3.523549z"/><g transform="matrix(-.55917959 .82904655 -.82904655 -.55917959 0 0)"><path d="m1.511097-9.732645h3.643398v.455425h-3.643398z"/><path d="m.07207-12.144793h3.643398v.455425h-3.643398z"/></g></g></svg>
diff --git a/editor/icons/EditResource.svg b/editor/icons/EditResource.svg
deleted file mode 100644
index 3b14428b90..0000000000
--- a/editor/icons/EditResource.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="8" viewBox="0 0 8 8" width="8" xmlns="http://www.w3.org/2000/svg"><path d="m3.9902-.0097656a1.0001 1.0001 0 0 0 -.69727 1.7168l1.293 1.293h-3.5859v2h3.5859l-1.293 1.293a1.0001 1.0001 0 1 0 1.4141 1.4141l3-3a1.0001 1.0001 0 0 0 0-1.4141l-3-3a1.0001 1.0001 0 0 0 -.7168-.30273z" fill="#e0e0e0" fill-opacity=".78431"/></svg>
diff --git a/editor/icons/EditorInternalHandle.svg b/editor/icons/EditorInternalHandle.svg
deleted file mode 100644
index dbb7bc289f..0000000000
--- a/editor/icons/EditorInternalHandle.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><circle cx="5" cy="5" fill-opacity=".29412" r="5"/><circle cx="5" cy="5" fill="#fff" r="4"/><circle cx="5" cy="5" fill="#84b1ff" r="3"/></svg>
diff --git a/editor/icons/ErrorSign.svg b/editor/icons/ErrorSign.svg
deleted file mode 100644
index 85a2cda346..0000000000
--- a/editor/icons/ErrorSign.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="32" viewBox="0 0 32 32" width="32" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -1020.4)"><path d="m10 1048.4h12l6-6v-12l-6-6h-12l-6 6v12z" fill="#ff5d5d" fill-rule="evenodd"/><path d="m14 8 1 10h2l1-10zm2 12a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -2-2z" fill="#fff" transform="translate(0 1020.4)"/></g></svg>
diff --git a/editor/icons/FixedMaterial.svg b/editor/icons/FixedMaterial.svg
deleted file mode 100644
index 2c30ecac24..0000000000
--- a/editor/icons/FixedMaterial.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1037.4a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm-2 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2-2 2 2 0 0 1 2-2z" fill="#e0e0e0" fill-opacity=".99608" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/FixedSpatialMaterial.svg b/editor/icons/FixedSpatialMaterial.svg
deleted file mode 100644
index 322465a0c7..0000000000
--- a/editor/icons/FixedSpatialMaterial.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a7 7 0 0 0 -4.8887 2h2.8887 6.8965a7 7 0 0 0 -4.8965-2z" fill="#ff4545"/><path d="m3.1113 3a7 7 0 0 0 -1.4277 2h2.3164a2 2 0 0 1 2-2zm2.8887 0a2 2 0 0 1 2 2h6.3145a7 7 0 0 0 -1.418-2z" fill="#ffe345"/><path d="m1.6836 5a7 7 0 0 0 -.60547 2h4.9219a2 2 0 0 1 -2-2h-2.3164zm4.3164 2h8.9199a7 7 0 0 0 -.60547-2h-6.3145a2 2 0 0 1 -2 2z" fill="#80ff45"/><path d="m1.0781 7a7 7 0 0 0 -.078125 1 7 7 0 0 0 .080078 1h13.842a7 7 0 0 0 .078125-1 7 7 0 0 0 -.080078-1h-8.9199-4.9219z" fill="#45ffa2"/><path d="m1.0801 9a7 7 0 0 0 .60547 2h12.631a7 7 0 0 0 .60547-2h-13.842z" fill="#45d7ff"/><path d="m3.1035 13a7 7 0 0 0 4.8965 2 7 7 0 0 0 4.8887-2z" fill="#ff4596"/><path d="m1.6855 11a7 7 0 0 0 1.418 2h9.7852a7 7 0 0 0 1.4277-2h-12.631z" fill="#8045ff"/></svg>
diff --git a/editor/icons/GizmoListener.svg b/editor/icons/GizmoAudioListener3D.svg
index 9d3ddf8b85..9d3ddf8b85 100644
--- a/editor/icons/GizmoListener.svg
+++ b/editor/icons/GizmoAudioListener3D.svg
diff --git a/editor/icons/GizmoCamera.svg b/editor/icons/GizmoCamera.svg
deleted file mode 100644
index 1fa2186197..0000000000
--- a/editor/icons/GizmoCamera.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -924.36)"><path d="m76 16a28 28 0 0 0 -26.631 19.4 28 28 0 0 0 -13.369-3.4004 28 28 0 0 0 -28 28 28 28 0 0 0 16 25.26v14.74c0 6.648 5.352 12 12 12h48c6.648 0 12-5.352 12-12l24 16v-64l-24 16v-4.4434a28 28 0 0 0 8-19.557 28 28 0 0 0 -28-28z" fill-opacity=".29412" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="2" transform="translate(0 924.36)"/><path d="m76 944.36a24 24 0 0 0 -23.906 22.219 24 24 0 0 0 -16.094-6.2192 24 24 0 0 0 -24 24 24 24 0 0 0 16 22.594v17.406c0 4.432 3.5679 8 8 8h48c4.4321 0 8-3.568 8-8v-8l24 16v-48l-24 16v-14.156a24 24 0 0 0 8-17.844 24 24 0 0 0 -24-24z" fill="#f7f5cf"/></g></svg>
diff --git a/editor/icons/GuiCheckedDisabled.svg b/editor/icons/GuiCheckedDisabled.svg
new file mode 100644
index 0000000000..6252176241
--- /dev/null
+++ b/editor/icons/GuiCheckedDisabled.svg
@@ -0,0 +1 @@
+<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.333 1c-1.289 0-2.333 1.045-2.333 2.333v9.333c0 1.289 1.044 2.334 2.333 2.334h9.333c1.289 0 2.334-1.045 2.334-2.334v-9.333c0-1.289-1.045-2.333-2.334-2.333z" fill="#808080"/><path d="m11.501 3.734-5.612 5.612-1.704-1.681-1.5 1.5 3.204 3.181 7.111-7.113z" fill="#b3b3b3"/></svg>
diff --git a/editor/icons/GuiHTick.svg b/editor/icons/GuiHTick.svg
deleted file mode 100644
index a8a2fe58f6..0000000000
--- a/editor/icons/GuiHTick.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 4 15.999999" width="4" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" fill="#fff" fill-opacity=".39216" r="1"/></svg>
diff --git a/editor/icons/GuiIndeterminate.svg b/editor/icons/GuiIndeterminate.svg
new file mode 100644
index 0000000000..79e5d95c9a
--- /dev/null
+++ b/editor/icons/GuiIndeterminate.svg
@@ -0,0 +1 @@
+<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m3.333 1c-1.288 0-2.333 1.045-2.333 2.333v9.334c0 1.288 1.045 2.333 2.333 2.333h9.334c1.288 0 2.333-1.045 2.333-2.333v-9.334c0-1.288-1.045-2.333-2.333-2.333z" fill="#699ce8" fill-rule="nonzero"/><path d="m3 7h10.058v2.12h-10.058z" fill="#fff" transform="matrix(.99428 0 0 .943295 .017161 .396936)"/></svg>
diff --git a/editor/icons/GuiRadioCheckedDisabled.svg b/editor/icons/GuiRadioCheckedDisabled.svg
new file mode 100644
index 0000000000..94a1fffa0b
--- /dev/null
+++ b/editor/icons/GuiRadioCheckedDisabled.svg
@@ -0,0 +1 @@
+<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8c0 3.866-3.134 7-7 7s-7-3.134-7-7 3.134-7 7-7 7 3.134 7 7" fill="#808080"/><path d="m12 8c0 2.209-1.791 4-4 4s-4-1.791-4-4 1.791-4 4-4 4 1.791 4 4" fill="#b3b3b3"/></svg>
diff --git a/editor/icons/GuiRadioUncheckedDisabled.svg b/editor/icons/GuiRadioUncheckedDisabled.svg
new file mode 100644
index 0000000000..3a75797c4d
--- /dev/null
+++ b/editor/icons/GuiRadioUncheckedDisabled.svg
@@ -0,0 +1 @@
+<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m15 8c0 3.866-3.134 7-7 7s-7-3.134-7-7 3.134-7 7-7 7 3.134 7 7" fill="#808080" fill-opacity=".1882"/></svg>
diff --git a/editor/icons/GuiResizerMirrored.svg b/editor/icons/GuiResizerMirrored.svg
deleted file mode 100644
index 8227f5b648..0000000000
--- a/editor/icons/GuiResizerMirrored.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill-opacity=".588" fill="#fff" d="M4 3a1 1 0 0 1 1 1v6h6a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/></svg>
diff --git a/editor/icons/GuiSpinboxUpdownDisabled.svg b/editor/icons/GuiSpinboxUpdownDisabled.svg
new file mode 100644
index 0000000000..332c5e7bf8
--- /dev/null
+++ b/editor/icons/GuiSpinboxUpdownDisabled.svg
@@ -0,0 +1 @@
+<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7.984 1.002c-.259.004-.507.108-.691.291l-4 4c-.398.383-.41 1.016-.027 1.414s1.016.41 1.414.027l.027-.027 3.293-3.293 3.293 3.293c.383.398 1.016.41 1.414.027s.41-1.016.027-1.414c-.01-.009-.018-.018-.027-.027l-4-4c-.191-.19-.452-.296-.723-.291zm4.006 7.984c-.264.006-.514.117-.697.307l-3.293 3.293-3.293-3.293c-.188-.193-.447-.303-.717-.303-.552 0-1 .448-1 1 0 .271.109.529.303.717l4 4c.391.391 1.023.391 1.414 0l4-4c.398-.383.41-1.016.027-1.414-.193-.202-.463-.313-.744-.307z" fill="#b3b3b3" fill-opacity=".7843"/></svg>
diff --git a/editor/icons/GuiTabMirrored.svg b/editor/icons/GuiTabMirrored.svg
deleted file mode 100644
index a0011a5b2d..0000000000
--- a/editor/icons/GuiTabMirrored.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><path fill-opacity=".196" fill="#fff" d="M2 0v8H0V0zm5.014.002a-1 1 0 0 1 .693.291-1 1 0 0 1 0 1.414L5.414 4l2.293 2.293a-1 1 0 0 1 0 1.414-1 1 0 0 1-1.414 0l-3-3a-1 1 0 0 1 0-1.414l3-3a-1 1 0 0 1 .72-.29z"/></svg>
diff --git a/editor/icons/GuiTreeArrowUp.svg b/editor/icons/GuiTreeArrowUp.svg
deleted file mode 100644
index f5399bc7f9..0000000000
--- a/editor/icons/GuiTreeArrowUp.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="12" viewBox="0 0 12 12" width="12" xmlns="http://www.w3.org/2000/svg"><path d="m3 1045.4 3 3 3-3" style="fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:.39216" transform="matrix(-1 0 0 -1 12 1052.16952)"/></svg>
diff --git a/editor/icons/GuiUncheckedDisabled.svg b/editor/icons/GuiUncheckedDisabled.svg
new file mode 100644
index 0000000000..2b6515f9d7
--- /dev/null
+++ b/editor/icons/GuiUncheckedDisabled.svg
@@ -0,0 +1 @@
+<svg enable-background="new 0 0 16 16" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.333 1c-1.289 0-2.333 1.045-2.333 2.333v9.333c0 1.289 1.044 2.334 2.333 2.334h9.333c1.289 0 2.334-1.045 2.334-2.334v-9.333c0-1.289-1.045-2.333-2.334-2.333z" fill="#808080" fill-opacity=".1882"/></svg>
diff --git a/editor/icons/GuiVTick.svg b/editor/icons/GuiVTick.svg
deleted file mode 100644
index c0af1df8fb..0000000000
--- a/editor/icons/GuiVTick.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="4" viewBox="0 0 16 3.9999998" width="16" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" fill="#fff" fill-opacity=".39216" r="1"/></svg>
diff --git a/editor/icons/Headphones.svg b/editor/icons/Headphones.svg
deleted file mode 100644
index 76f92d58a7..0000000000
--- a/editor/icons/Headphones.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a7 7 0 0 0 -7 7v2 3a2 2 0 0 0 2 2h2v-5h-2v-2a5 5 0 0 1 5-5 5 5 0 0 1 5 5v2h-2v3 2h2a2 2 0 0 0 2-2v-3-2a7 7 0 0 0 -7-7z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/InformationSign.svg b/editor/icons/InformationSign.svg
deleted file mode 100644
index 8cf1ac78e3..0000000000
--- a/editor/icons/InformationSign.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g stroke-width=".570241"><path d="m4.5291945 14.892249h6.8428865l3.421444-3.421444v-6.8428864l-3.421444-3.4214437h-6.8428865l-3.4214436 3.4214437v6.8428864z" fill="#ffb65d" fill-rule="evenodd"/><g fill="#fff"><path d="m6.69985 6.347754h2.624354v6.50621h-2.624354z"/><ellipse cx="8.039363" cy="4.215466" rx="1.394188" ry="1.366851"/></g></g></svg>
diff --git a/editor/icons/InverseKinematics.svg b/editor/icons/InverseKinematics.svg
deleted file mode 100644
index 4c6dbd4546..0000000000
--- a/editor/icons/InverseKinematics.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v10.27h2v-10.271a2 2 0 0 0 .73047-.72852h4.541a2 2 0 0 0 .72852.73047v3.2695h-2v2l-1 2 3 2v-4h2v4l3-2-1-2v-2h-2v-3.2715a2 2 0 0 0 1-1.7285 2 2 0 0 0 -2-2 2 2 0 0 0 -1.7305 1h-4.541a2 2 0 0 0 -1.7285-1z" fill="#fc7f7f" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/Issue.svg b/editor/icons/Issue.svg
deleted file mode 100644
index 457d070d89..0000000000
--- a/editor/icons/Issue.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><path d="m5.2902433 14.98657h1.9512087v2.441414h-1.9512087zm0-11.909101h1.9512087v6.2957719l-.1922373 3.4314361h-1.5571222l-.2018492-3.4314361z" transform="matrix(1.2172834 0 0 .60107067 .478728 1.839214)"/><path d="m8.0503291 1.1522775a6.8983747 6.8983747 0 0 0 -6.8980516 6.8980516 6.8983747 6.8983747 0 0 0 6.8980516 6.8997839 6.8983747 6.8983747 0 0 0 6.8997839-6.8997839 6.8983747 6.8983747 0 0 0 -6.8997839-6.8980516zm-.0294418 1.1430364a5.6659852 5.6659852 0 0 1 5.6666897 5.6649578 5.6659852 5.6659852 0 0 1 -5.6666897 5.6666893 5.6659852 5.6659852 0 0 1 -5.6666896-5.6666893 5.6659852 5.6659852 0 0 1 5.6666896-5.6649578z" stroke-width=".886719"/></g></svg>
diff --git a/editor/icons/KeyHover.svg b/editor/icons/KeyHover.svg
deleted file mode 100644
index b67d7ff78d..0000000000
--- a/editor/icons/KeyHover.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="8" viewBox="0 0 8 8" width="8" xmlns="http://www.w3.org/2000/svg"><rect fill="#fff" height="6.1027" ry=".76286" transform="matrix(.70710678 -.70710678 .70710678 .70710678 0 -1044.4)" width="6.1027" x="-741.53" y="741.08"/></svg>
diff --git a/editor/icons/LoopInterpolation.svg b/editor/icons/LoopInterpolation.svg
deleted file mode 100644
index 5e3f919043..0000000000
--- a/editor/icons/LoopInterpolation.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m6 1v2h-2a2 2 0 0 0 -1.7324 1 2 2 0 0 0 -.26562 1h-.0019531v.046875 5.2246a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 2-2 2 2 0 0 0 -1-1.7305v-3.2695-2h2v2l4-3-4-3zm7 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v3.2695 2h-2v-2l-4 3 4 3v-2h2a2 2 0 0 0 1.7324-1 2 2 0 0 0 .26562-1h.001953v-5.2715a2 2 0 0 0 1-1.7285 2 2 0 0 0 -2-2z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
diff --git a/editor/icons/MirrorX.svg b/editor/icons/MirrorX.svg
deleted file mode 100644
index fa668986ac..0000000000
--- a/editor/icons/MirrorX.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#e0e0e0" stroke-opacity=".99608" stroke-width="2" transform="translate(0 -1036.4)"><path d="m4 1042.4-2 2 2 2" stroke-linecap="round" stroke-linejoin="round"/><path d="m2 1044.4h11"/><path d="m12 1042.4 2 2-2 2" stroke-linecap="round" stroke-linejoin="round"/></g></svg>
diff --git a/editor/icons/MirrorY.svg b/editor/icons/MirrorY.svg
deleted file mode 100644
index bb4e4d3543..0000000000
--- a/editor/icons/MirrorY.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m11.012 1048.4a1.0001 1.0001 0 0 0 -1.7168-.6973l-.29297.293v-7.1719l.29297.293a1.0001 1.0001 0 0 0 1.7148-.7266 1.0001 1.0001 0 0 0 -.30078-.6875l-2-2a1.0001 1.0001 0 0 0 -1.4141 0l-2 2a1.0001 1.0001 0 1 0 1.4141 1.4141l.29297-.293v7.1719l-.29297-.293a1.0001 1.0001 0 1 0 -1.4141 1.4141l2 2a1.0001 1.0001 0 0 0 1.4141 0l2-2a1.0001 1.0001 0 0 0 .30273-.7168z" fill="#e0e0e0" fill-opacity=".99608" transform="translate(0 -1036.4)"/></svg>
diff --git a/editor/icons/MultiEdit.svg b/editor/icons/MultiEdit.svg
deleted file mode 100644
index d1409e16ca..0000000000
--- a/editor/icons/MultiEdit.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1c-.554 0-1 .446-1 1v2h4v-2c0-.554-.446-1-1-1zm-1 4v7l2 3 2-3v-7zm1 1h1v5h-1zm8 1v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/MultiLine.svg b/editor/icons/MultiLine.svg
deleted file mode 100644
index 634086fd51..0000000000
--- a/editor/icons/MultiLine.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2h7v-2zm9 0v2h5v-2zm-9 4v2h11v-2zm0 4v2h4v-2zm6 0v2h8v-2zm-6 4v2h13v-2z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/PageFirst.svg b/editor/icons/PageFirst.svg
new file mode 100644
index 0000000000..76078691ef
--- /dev/null
+++ b/editor/icons/PageFirst.svg
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ height="12"
+ viewBox="0 0 12 12"
+ width="12"
+ version="1.1"
+ id="svg4"
+ sodipodi:docname="PageFirst.svg"
+ inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ id="namedview6"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="true"
+ inkscape:zoom="74.25"
+ inkscape:cx="18.053872"
+ inkscape:cy="6.5252525"
+ inkscape:window-width="3838"
+ inkscape:window-height="1582"
+ inkscape:window-x="0"
+ inkscape:window-y="16"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg4">
+ <inkscape:grid
+ type="xygrid"
+ id="grid989" />
+ </sodipodi:namedview>
+ <path
+ d="M 6,9 3,6 6,3"
+ style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path2" />
+ <path
+ d="M 9,9 V 3"
+ style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path2211"
+ sodipodi:nodetypes="cc" />
+</svg>
diff --git a/editor/icons/PageLast.svg b/editor/icons/PageLast.svg
new file mode 100644
index 0000000000..17c874e8c9
--- /dev/null
+++ b/editor/icons/PageLast.svg
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ height="12"
+ viewBox="0 0 12 12"
+ width="12"
+ version="1.1"
+ id="svg4"
+ sodipodi:docname="PageLast.svg"
+ inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ id="namedview6"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="true"
+ inkscape:zoom="74.25"
+ inkscape:cx="18.053872"
+ inkscape:cy="6.5252525"
+ inkscape:window-width="3838"
+ inkscape:window-height="1582"
+ inkscape:window-x="0"
+ inkscape:window-y="16"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg4">
+ <inkscape:grid
+ type="xygrid"
+ id="grid989" />
+ </sodipodi:namedview>
+ <path
+ d="m 6.0000414,9 3,-3 -3,-3"
+ style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path2" />
+ <path
+ d="M 3.0000414,9 V 3"
+ style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path2211"
+ sodipodi:nodetypes="cc" />
+</svg>
diff --git a/editor/icons/PageNext.svg b/editor/icons/PageNext.svg
new file mode 100644
index 0000000000..89ff6219bb
--- /dev/null
+++ b/editor/icons/PageNext.svg
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ height="12"
+ viewBox="0 0 12 12"
+ width="12"
+ version="1.1"
+ id="svg4"
+ sodipodi:docname="PageNext.svg"
+ inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ id="namedview6"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="true"
+ inkscape:zoom="105.00536"
+ inkscape:cx="4.5854803"
+ inkscape:cy="5.9377923"
+ inkscape:window-width="3838"
+ inkscape:window-height="1582"
+ inkscape:window-x="0"
+ inkscape:window-y="16"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg4">
+ <inkscape:grid
+ type="xygrid"
+ id="grid989" />
+ </sodipodi:namedview>
+ <path
+ d="m 4.5000207,9 3,-3 -3,-3"
+ style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path2" />
+</svg>
diff --git a/editor/icons/PagePrevious.svg b/editor/icons/PagePrevious.svg
new file mode 100644
index 0000000000..a2fa84da0c
--- /dev/null
+++ b/editor/icons/PagePrevious.svg
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ height="12"
+ viewBox="0 0 12 12"
+ width="12"
+ version="1.1"
+ id="svg4"
+ sodipodi:docname="PagePrevious.svg"
+ inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ id="namedview6"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="true"
+ inkscape:zoom="105.00536"
+ inkscape:cx="4.5854803"
+ inkscape:cy="5.9377923"
+ inkscape:window-width="3838"
+ inkscape:window-height="1582"
+ inkscape:window-x="0"
+ inkscape:window-y="16"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg4">
+ <inkscape:grid
+ type="xygrid"
+ id="grid989" />
+ </sodipodi:namedview>
+ <path
+ d="m 7.4999793,9 -3,-3 3,-3"
+ style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ id="path2" />
+</svg>
diff --git a/editor/icons/Portal.svg b/editor/icons/Portal.svg
deleted file mode 100644
index 9365c450da..0000000000
--- a/editor/icons/Portal.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a5 7 0 0 0 -5 7 5 7 0 0 0 5 7 5 7 0 0 0 5-7 5 7 0 0 0 -5-7zm0 2a3 5 0 0 1 3 5 3 5 0 0 1 -3 5 3 5 0 0 1 -3-5 3 5 0 0 1 3-5z" fill="#fc7f7f" fill-opacity=".99608"/></svg>
diff --git a/editor/icons/Rayito.svg b/editor/icons/Rayito.svg
deleted file mode 100644
index 1d4f9ca458..0000000000
--- a/editor/icons/Rayito.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4 1-1 7h2.875l-.875 7 9-8h-3.8574l.85742-6h-7z" fill="#ffca5f"/></svg>
diff --git a/editor/icons/RigidBody2D.svg b/editor/icons/RigidDynamicBody2D.svg
index 5d08e991ae..5d08e991ae 100644
--- a/editor/icons/RigidBody2D.svg
+++ b/editor/icons/RigidDynamicBody2D.svg
diff --git a/editor/icons/RigidBody3D.svg b/editor/icons/RigidDynamicBody3D.svg
index 7f5db4ce88..7f5db4ce88 100644
--- a/editor/icons/RigidBody3D.svg
+++ b/editor/icons/RigidDynamicBody3D.svg
diff --git a/editor/icons/Room.svg b/editor/icons/Room.svg
deleted file mode 100644
index 2bc165e736..0000000000
--- a/editor/icons/Room.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7.9629 1.002a1.0001 1.0001 0 0 0 -.41016.10352l-6 3a1.0001 1.0001 0 0 0 -.55273.89453v6a1.0001 1.0001 0 0 0 .55273.89453l6 3a1.0001 1.0001 0 0 0 .89453 0l6-3a1.0001 1.0001 0 0 0 .55273-.89453v-6a1.0001 1.0001 0 0 0 -.55273-.89453l-6-3a1.0001 1.0001 0 0 0 -.48438-.10352zm1.0371 2.6172 4 2v3.7637l-4-2zm-1 5.5 3.7637 1.8809-3.7637 1.8828-3.7637-1.8828z" fill="#fc7f7f" fill-opacity=".99608" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/RoomBounds.svg b/editor/icons/RoomBounds.svg
deleted file mode 100644
index 66901d7895..0000000000
--- a/editor/icons/RoomBounds.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v2h1v-1h1v-1zm12 0v1h1v1h1v-2zm-5.0371.00195c-.14254.00487-.28238.04016-.41016.10352l-6 3c-.33878.16944-.55276.51574-.55273.89453v6c-.00002576.37879.21395.72509.55273.89453l6 3c.28156.14078.61297.14078.89453 0l6-3c.33878-.16944.55276-.51574.55273-.89453v-6c.000026-.37879-.21395-.72509-.55273-.89453l-6-3c-.15022-.074574-.31679-.11017-.48438-.10352zm1.0371 2.6172 4 2v3.7637l-4-2zm-1 5.5 3.7637 1.8809-3.7637 1.8828-3.7637-1.8828zm-7 3.8809v2h2v-1h-1v-1zm13 0v1h-1v1h2v-2z" fill="#e0e0e0" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/Rotate0.svg b/editor/icons/Rotate0.svg
deleted file mode 100644
index 670a6f09c3..0000000000
--- a/editor/icons/Rotate0.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm1 2.1016a5 5 0 0 1 4 4.8984 5 5 0 0 1 -5 5 5 5 0 0 1 -5-5 5 5 0 0 1 4-4.8945v5.8945h2z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/Rotate180.svg b/editor/icons/Rotate180.svg
deleted file mode 100644
index fdd0882fba..0000000000
--- a/editor/icons/Rotate180.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.8541 0-7 3.1459-7 7 0 3.8542 3.1459 7 7 7s7-3.1458 7-7c0-3.8541-3.1459-7-7-7zm0 2v10c-2.7733 0-5-2.2267-5-5 0-2.7732 2.2267-5 5-5z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/Rotate270.svg b/editor/icons/Rotate270.svg
deleted file mode 100644
index 7ffd43d147..0000000000
--- a/editor/icons/Rotate270.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0 -7-7zm0 2v5h-5a5 5 0 0 1 5-5z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/Rotate90.svg b/editor/icons/Rotate90.svg
deleted file mode 100644
index ef4d631df6..0000000000
--- a/editor/icons/Rotate90.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.8541 0-7 3.1459-7 7 0 3.8542 3.1459 7 7 7 3.7179 0 6.7102-2.9486 6.9219-6.6152a1 1 0 0 0 .078125-.38477 1 1 0 0 0 -.078125-.38867 1 1 0 0 0 -.001953-.0039062c-.21589-3.6627-3.2049-6.6074-6.9199-6.6074zm0 2v5h5c0 2.7733-2.2267 5-5 5s-5-2.2267-5-5c0-2.7732 2.2267-5 5-5z" fill="#e0e0e0"/></svg>
diff --git a/editor/icons/RotateLeft.svg b/editor/icons/RotateLeft.svg
deleted file mode 100644
index 1200df1dde..0000000000
--- a/editor/icons/RotateLeft.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".99608" transform="translate(0 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/></g></svg>
diff --git a/editor/icons/RotateRight.svg b/editor/icons/RotateRight.svg
deleted file mode 100644
index d69e6a7705..0000000000
--- a/editor/icons/RotateRight.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" fill-opacity=".99608" transform="matrix(-1 0 0 1 16.026308 -1036.4)"><path d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4-4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6-6 6 6 0 0 0 -6-6z" transform="translate(0 1036.4)"/><path d="m4.118 1048.3-1.6771-.9683-1.6771-.9682 1.6771-.9683 1.6771-.9682-.0000001 1.9365z" transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)"/></g></svg>
diff --git a/editor/icons/SeparationRayShape2D.svg b/editor/icons/SeparationRayShape2D.svg
new file mode 100644
index 0000000000..aa8cee1210
--- /dev/null
+++ b/editor/icons/SeparationRayShape2D.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1a1 1 0 0 0 -1 1v9.5859l-1.293-1.293a1 1 0 0 0 -.7207-.29102 1 1 0 0 0 -.69336.29102 1 1 0 0 0 0 1.4141l3 3a1.0001 1.0001 0 0 0 .0039062.003907 1 1 0 0 0 .050781.044921 1.0001 1.0001 0 0 0 .03125.027344 1 1 0 0 0 .048828.035156 1.0001 1.0001 0 0 0 .023438.015625 1 1 0 0 0 .076172.044922 1.0001 1.0001 0 0 0 .0058593.003906 1 1 0 0 0 .013672.007813 1.0001 1.0001 0 0 0 .078125.035156 1 1 0 0 0 .074219.025391 1.0001 1.0001 0 0 0 .025391.009766 1 1 0 0 0 .039062.009765 1.0001 1.0001 0 0 0 .068359.013672 1.0001 1.0001 0 0 0 .097656.011719 1.0001 1.0001 0 0 0 .0078125 0 1 1 0 0 0 .0625.003906 1 1 0 0 0 .015625-.001953 1.0001 1.0001 0 0 0 .083984-.003906 1 1 0 0 0 .015625-.001953 1.0001 1.0001 0 0 0 .083984-.013672 1.0001 1.0001 0 0 0 .052734-.013672 1 1 0 0 0 .058594-.015625 1.0001 1.0001 0 0 0 .078125-.029297 1 1 0 0 0 .013672-.00586 1.0001 1.0001 0 0 0 .076172-.037109 1 1 0 0 0 .013672-.007812 1.0001 1.0001 0 0 0 .072266-.044922 1 1 0 0 0 .011719-.007813 1.0001 1.0001 0 0 0 .068359-.052734 1 1 0 0 0 .011719-.009766 1.0001 1.0001 0 0 0 .050781-.046875l.0097657-.011719 2.9902-2.9883a1 1 0 0 0 0-1.4141 1 1 0 0 0 -1.4141 0l-1.293 1.293v-9.5859a1 1 0 0 0 -1-1z" fill="#68b6ff" fill-rule="evenodd"/></svg>
diff --git a/editor/icons/SeparationRayShape3D.svg b/editor/icons/SeparationRayShape3D.svg
new file mode 100644
index 0000000000..44d32fe83b
--- /dev/null
+++ b/editor/icons/SeparationRayShape3D.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill-rule="evenodd"><path d="m8 1-6 5 4 2.666v4.334l2 2v-5-2z" fill="#a2d2ff"/><path d="m8 1v7 2l-2-1.334v1.334l2 1.5v3.5l2-2v-4.334l4-2.666z" fill="#2998ff"/></g></svg>
diff --git a/editor/icons/SoftBody3D.svg b/editor/icons/SoftDynamicBody3D.svg
index 7bc9a22c22..7bc9a22c22 100644
--- a/editor/icons/SoftBody3D.svg
+++ b/editor/icons/SoftDynamicBody3D.svg
diff --git a/editor/icons/TestCube.svg b/editor/icons/TestCube.svg
deleted file mode 100644
index 9995f5b5f4..0000000000
--- a/editor/icons/TestCube.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7.9629 1.002a1.0001 1.0001 0 0 0 -.41016.10352l-6 3a1.0001 1.0001 0 0 0 -.55273.89453v6a1.0001 1.0001 0 0 0 .55273.89453l6 3a1.0001 1.0001 0 0 0 .89453 0l6-3a1.0001 1.0001 0 0 0 .55273-.89453v-6a1.0001 1.0001 0 0 0 -.55273-.89453l-6-3a1.0001 1.0001 0 0 0 -.48438-.10352zm.037109 2.1172 3.7637 1.8809-3.7637 1.8828-3.7637-1.8828zm-5 3.5 4 2v3.7637l-4-2zm10 0v3.7637l-4 2v-3.7637z" fill="#fc7f7f" fill-opacity=".99608" fill-rule="evenodd" transform="translate(0 .000012)"/></svg>
diff --git a/editor/icons/TextureArray.svg b/editor/icons/Texture2DArray.svg
index a71860023b..a71860023b 100644
--- a/editor/icons/TextureArray.svg
+++ b/editor/icons/Texture2DArray.svg
diff --git a/editor/icons/TrackAddKey.svg b/editor/icons/TrackAddKey.svg
deleted file mode 100644
index 82eff5d2bf..0000000000
--- a/editor/icons/TrackAddKey.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="8" viewBox="0 0 8 8" width="8" xmlns="http://www.w3.org/2000/svg"><path d="m3 0v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#5fff97"/></svg>
diff --git a/editor/icons/TrackAddKeyHl.svg b/editor/icons/TrackAddKeyHl.svg
deleted file mode 100644
index 03fb90f1e9..0000000000
--- a/editor/icons/TrackAddKeyHl.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="8" viewBox="0 0 8 8" width="8" xmlns="http://www.w3.org/2000/svg"><path d="m3 0v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#5fff97"/><path d="m3 0v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#fff" fill-opacity=".42424"/></svg>
diff --git a/editor/icons/Unbone.svg b/editor/icons/Unbone.svg
deleted file mode 100644
index 2aa0b8ad8c..0000000000
--- a/editor/icons/Unbone.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m10.479 1a2.4664 2.4663 0 0 0 -1.7813.7207 2.4664 2.4663 0 0 0 -.31445 3.1035l-1.0723 1.0723 2.791 2.791 1.0762-1.0742a2.4664 2.4663 0 0 0 3.0996-.31055 2.4664 2.4663 0 0 0 0-3.4883 2.4664 2.4663 0 0 0 -1.3965-.69727 2.4664 2.4663 0 0 0 -.69531-1.3965 2.4664 2.4663 0 0 0 -1.707-.7207zm-4.582 6.3105-1.0723 1.0742a2.4664 2.4663 0 0 0 -3.1016.3125 2.4664 2.4663 0 0 0 0 3.4883 2.4664 2.4663 0 0 0 1.3965.69531 2.4664 2.4663 0 0 0 .69531 1.3965 2.4664 2.4663 0 0 0 3.4883 0 2.4664 2.4663 0 0 0 .31445-3.1035l1.0703-1.0723-2.791-2.791z" fill="#e0e0e0" fill-opacity=".99608"/></svg>
diff --git a/editor/icons/VisualShaderNodeTexture2DUniformTriplanar.svg b/editor/icons/VisualShaderNodeTexture2DArrayUniform.svg
index ed9e084fd3..ed9e084fd3 100644
--- a/editor/icons/VisualShaderNodeTexture2DUniformTriplanar.svg
+++ b/editor/icons/VisualShaderNodeTexture2DArrayUniform.svg
diff --git a/editor/icons/VisualShaderNodeTexture3DUniform.svg b/editor/icons/VisualShaderNodeTexture3DUniform.svg
new file mode 100644
index 0000000000..ed9e084fd3
--- /dev/null
+++ b/editor/icons/VisualShaderNodeTexture3DUniform.svg
@@ -0,0 +1 @@
+<svg height="14" viewBox="0 0 14 14" width="14" xmlns="http://www.w3.org/2000/svg"><path d="m2 0c-1.1045695 0-2 .8954-2 2v10c0 1.1046.8954305 2 2 2h10c1.104569 0 2-.8954 2-2v-10c0-1.1046-.895431-2-2-2zm0 2h10v10h-10zm9 2-4 4-2-2-2 3h8z" fill="#eae068"/></svg>
diff --git a/editor/icons/VisualShaderNodeTextureUniform.svg b/editor/icons/VisualShaderNodeTextureUniform.svg
new file mode 100644
index 0000000000..ed9e084fd3
--- /dev/null
+++ b/editor/icons/VisualShaderNodeTextureUniform.svg
@@ -0,0 +1 @@
+<svg height="14" viewBox="0 0 14 14" width="14" xmlns="http://www.w3.org/2000/svg"><path d="m2 0c-1.1045695 0-2 .8954-2 2v10c0 1.1046.8954305 2 2 2h10c1.104569 0 2-.8954 2-2v-10c0-1.1046-.895431-2-2-2zm0 2h10v10h-10zm9 2-4 4-2-2-2 3h8z" fill="#eae068"/></svg>
diff --git a/editor/icons/VisualShaderNodeTextureUniformTriplanar.svg b/editor/icons/VisualShaderNodeTextureUniformTriplanar.svg
new file mode 100644
index 0000000000..ed9e084fd3
--- /dev/null
+++ b/editor/icons/VisualShaderNodeTextureUniformTriplanar.svg
@@ -0,0 +1 @@
+<svg height="14" viewBox="0 0 14 14" width="14" xmlns="http://www.w3.org/2000/svg"><path d="m2 0c-1.1045695 0-2 .8954-2 2v10c0 1.1046.8954305 2 2 2h10c1.104569 0 2-.8954 2-2v-10c0-1.1046-.895431-2-2-2zm0 2h10v10h-10zm9 2-4 4-2-2-2 3h8z" fill="#eae068"/></svg>
diff --git a/editor/icons/WorldMarginShape2D.svg b/editor/icons/WorldBoundaryShape2D.svg
index f1dbe97c6f..f1dbe97c6f 100644
--- a/editor/icons/WorldMarginShape2D.svg
+++ b/editor/icons/WorldBoundaryShape2D.svg
diff --git a/editor/icons/WorldMarginShape3D.svg b/editor/icons/WorldBoundaryShape3D.svg
index a73e74ad33..a73e74ad33 100644
--- a/editor/icons/WorldMarginShape3D.svg
+++ b/editor/icons/WorldBoundaryShape3D.svg
diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp
index aa9700716d..b6d0927ce6 100644
--- a/editor/import/collada.cpp
+++ b/editor/import/collada.cpp
@@ -287,7 +287,7 @@ void Collada::_parse_image(XMLParser &parser) {
if (state.version < State::Version(1, 4, 0)) {
/* <1.4 */
String path = parser.get_attribute_value("source").strip_edges();
- if (path.find("://") == -1 && path.is_rel_path()) {
+ if (path.find("://") == -1 && path.is_relative_path()) {
// path is relative to file being loaded, so convert to a resource path
image.path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().plus_file(path.uri_decode()));
}
@@ -300,7 +300,7 @@ void Collada::_parse_image(XMLParser &parser) {
parser.read();
String path = parser.get_node_data().strip_edges().uri_decode();
- if (path.find("://") == -1 && path.is_rel_path()) {
+ if (path.find("://") == -1 && path.is_relative_path()) {
// path is relative to file being loaded, so convert to a resource path
path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().plus_file(path));
@@ -960,6 +960,7 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
} else if (section == "vertices") {
MeshData::Vertices vert;
String id = parser.get_attribute_value("id");
+ int last_ref = 0;
while (parser.read() == OK) {
if (parser.get_node_type() == XMLParser::NODE_ELEMENT) {
@@ -967,6 +968,10 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name
String semantic = parser.get_attribute_value("semantic");
String source = _uri_to_id(parser.get_attribute_value("source"));
+ if (semantic == "TEXCOORD") {
+ semantic = "TEXCOORD" + itos(last_ref++);
+ }
+
vert.sources[semantic] = source;
COLLADA_PRINT(section + " input semantic: " + semantic + " source: " + source);
diff --git a/editor/import/dynamicfont_import_settings.cpp b/editor/import/dynamicfont_import_settings.cpp
new file mode 100644
index 0000000000..9a8abfa5c6
--- /dev/null
+++ b/editor/import/dynamicfont_import_settings.cpp
@@ -0,0 +1,1906 @@
+/*************************************************************************/
+/* dynamicfont_import_settings.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "dynamicfont_import_settings.h"
+
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
+
+/*************************************************************************/
+/* Settings data */
+/*************************************************************************/
+
+class DynamicFontImportSettingsData : public RefCounted {
+ GDCLASS(DynamicFontImportSettingsData, RefCounted)
+ friend class DynamicFontImportSettings;
+
+ Map<StringName, Variant> settings;
+ Map<StringName, Variant> defaults;
+ List<ResourceImporter::ImportOption> options;
+ DynamicFontImportSettings *owner = nullptr;
+
+ bool _set(const StringName &p_name, const Variant &p_value) {
+ if (defaults.has(p_name) && defaults[p_name] == p_value) {
+ settings.erase(p_name);
+ } else {
+ settings[p_name] = p_value;
+ }
+ return true;
+ }
+
+ bool _get(const StringName &p_name, Variant &r_ret) const {
+ if (settings.has(p_name)) {
+ r_ret = settings[p_name];
+ return true;
+ }
+ if (defaults.has(p_name)) {
+ r_ret = defaults[p_name];
+ return true;
+ }
+ return false;
+ }
+
+ void _get_property_list(List<PropertyInfo> *p_list) const {
+ for (const List<ResourceImporter::ImportOption>::Element *E = options.front(); E; E = E->next()) {
+ if (owner && owner->import_settings_data.is_valid()) {
+ if (owner->import_settings_data->get("multichannel_signed_distance_field") && (E->get().option.name == "size" || E->get().option.name == "outline_size" || E->get().option.name == "oversampling")) {
+ continue;
+ }
+ if (!owner->import_settings_data->get("multichannel_signed_distance_field") && (E->get().option.name == "msdf_pixel_range" || E->get().option.name == "msdf_size")) {
+ continue;
+ }
+ }
+ p_list->push_back(E->get().option);
+ }
+ }
+};
+
+/*************************************************************************/
+/* Glyph ranges */
+/*************************************************************************/
+
+struct UniRange {
+ int32_t start;
+ int32_t end;
+ String name;
+};
+
+// Unicode Character Blocks
+// Source: https://www.unicode.org/Public/14.0.0/ucd/Blocks.txt
+static UniRange unicode_ranges[] = {
+ { 0x0000, 0x007F, U"Basic Latin" },
+ { 0x0080, 0x00FF, U"Latin-1 Supplement" },
+ { 0x0100, 0x017F, U"Latin Extended-A" },
+ { 0x0180, 0x024F, U"Latin Extended-B" },
+ { 0x0250, 0x02AF, U"IPA Extensions" },
+ { 0x02B0, 0x02FF, U"Spacing Modifier Letters" },
+ { 0x0300, 0x036F, U"Combining Diacritical Marks" },
+ { 0x0370, 0x03FF, U"Greek and Coptic" },
+ { 0x0400, 0x04FF, U"Cyrillic" },
+ { 0x0500, 0x052F, U"Cyrillic Supplement" },
+ { 0x0530, 0x058F, U"Armenian" },
+ { 0x0590, 0x05FF, U"Hebrew" },
+ { 0x0600, 0x06FF, U"Arabic" },
+ { 0x0700, 0x074F, U"Syriac" },
+ { 0x0750, 0x077F, U"Arabic Supplement" },
+ { 0x0780, 0x07BF, U"Thaana" },
+ { 0x07C0, 0x07FF, U"NKo" },
+ { 0x0800, 0x083F, U"Samaritan" },
+ { 0x0840, 0x085F, U"Mandaic" },
+ { 0x0860, 0x086F, U"Syriac Supplement" },
+ { 0x0870, 0x089F, U"Arabic Extended-B" },
+ { 0x08A0, 0x08FF, U"Arabic Extended-A" },
+ { 0x0900, 0x097F, U"Devanagari" },
+ { 0x0980, 0x09FF, U"Bengali" },
+ { 0x0A00, 0x0A7F, U"Gurmukhi" },
+ { 0x0A80, 0x0AFF, U"Gujarati" },
+ { 0x0B00, 0x0B7F, U"Oriya" },
+ { 0x0B80, 0x0BFF, U"Tamil" },
+ { 0x0C00, 0x0C7F, U"Telugu" },
+ { 0x0C80, 0x0CFF, U"Kannada" },
+ { 0x0D00, 0x0D7F, U"Malayalam" },
+ { 0x0D80, 0x0DFF, U"Sinhala" },
+ { 0x0E00, 0x0E7F, U"Thai" },
+ { 0x0E80, 0x0EFF, U"Lao" },
+ { 0x0F00, 0x0FFF, U"Tibetan" },
+ { 0x1000, 0x109F, U"Myanmar" },
+ { 0x10A0, 0x10FF, U"Georgian" },
+ { 0x1100, 0x11FF, U"Hangul Jamo" },
+ { 0x1200, 0x137F, U"Ethiopic" },
+ { 0x1380, 0x139F, U"Ethiopic Supplement" },
+ { 0x13A0, 0x13FF, U"Cherokee" },
+ { 0x1400, 0x167F, U"Unified Canadian Aboriginal Syllabics" },
+ { 0x1680, 0x169F, U"Ogham" },
+ { 0x16A0, 0x16FF, U"Runic" },
+ { 0x1700, 0x171F, U"Tagalog" },
+ { 0x1720, 0x173F, U"Hanunoo" },
+ { 0x1740, 0x175F, U"Buhid" },
+ { 0x1760, 0x177F, U"Tagbanwa" },
+ { 0x1780, 0x17FF, U"Khmer" },
+ { 0x1800, 0x18AF, U"Mongolian" },
+ { 0x18B0, 0x18FF, U"Unified Canadian Aboriginal Syllabics Extended" },
+ { 0x1900, 0x194F, U"Limbu" },
+ { 0x1950, 0x197F, U"Tai Le" },
+ { 0x1980, 0x19DF, U"New Tai Lue" },
+ { 0x19E0, 0x19FF, U"Khmer Symbols" },
+ { 0x1A00, 0x1A1F, U"Buginese" },
+ { 0x1A20, 0x1AAF, U"Tai Tham" },
+ { 0x1AB0, 0x1AFF, U"Combining Diacritical Marks Extended" },
+ { 0x1B00, 0x1B7F, U"Balinese" },
+ { 0x1B80, 0x1BBF, U"Sundanese" },
+ { 0x1BC0, 0x1BFF, U"Batak" },
+ { 0x1C00, 0x1C4F, U"Lepcha" },
+ { 0x1C50, 0x1C7F, U"Ol Chiki" },
+ { 0x1C80, 0x1C8F, U"Cyrillic Extended-C" },
+ { 0x1C90, 0x1CBF, U"Georgian Extended" },
+ { 0x1CC0, 0x1CCF, U"Sundanese Supplement" },
+ { 0x1CD0, 0x1CFF, U"Vedic Extensions" },
+ { 0x1D00, 0x1D7F, U"Phonetic Extensions" },
+ { 0x1D80, 0x1DBF, U"Phonetic Extensions Supplement" },
+ { 0x1DC0, 0x1DFF, U"Combining Diacritical Marks Supplement" },
+ { 0x1E00, 0x1EFF, U"Latin Extended Additional" },
+ { 0x1F00, 0x1FFF, U"Greek Extended" },
+ { 0x2000, 0x206F, U"General Punctuation" },
+ { 0x2070, 0x209F, U"Superscripts and Subscripts" },
+ { 0x20A0, 0x20CF, U"Currency Symbols" },
+ { 0x20D0, 0x20FF, U"Combining Diacritical Marks for Symbols" },
+ { 0x2100, 0x214F, U"Letterlike Symbols" },
+ { 0x2150, 0x218F, U"Number Forms" },
+ { 0x2190, 0x21FF, U"Arrows" },
+ { 0x2200, 0x22FF, U"Mathematical Operators" },
+ { 0x2300, 0x23FF, U"Miscellaneous Technical" },
+ { 0x2400, 0x243F, U"Control Pictures" },
+ { 0x2440, 0x245F, U"Optical Character Recognition" },
+ { 0x2460, 0x24FF, U"Enclosed Alphanumerics" },
+ { 0x2500, 0x257F, U"Box Drawing" },
+ { 0x2580, 0x259F, U"Block Elements" },
+ { 0x25A0, 0x25FF, U"Geometric Shapes" },
+ { 0x2600, 0x26FF, U"Miscellaneous Symbols" },
+ { 0x2700, 0x27BF, U"Dingbats" },
+ { 0x27C0, 0x27EF, U"Miscellaneous Mathematical Symbols-A" },
+ { 0x27F0, 0x27FF, U"Supplemental Arrows-A" },
+ { 0x2800, 0x28FF, U"Braille Patterns" },
+ { 0x2900, 0x297F, U"Supplemental Arrows-B" },
+ { 0x2980, 0x29FF, U"Miscellaneous Mathematical Symbols-B" },
+ { 0x2A00, 0x2AFF, U"Supplemental Mathematical Operators" },
+ { 0x2B00, 0x2BFF, U"Miscellaneous Symbols and Arrows" },
+ { 0x2C00, 0x2C5F, U"Glagolitic" },
+ { 0x2C60, 0x2C7F, U"Latin Extended-C" },
+ { 0x2C80, 0x2CFF, U"Coptic" },
+ { 0x2D00, 0x2D2F, U"Georgian Supplement" },
+ { 0x2D30, 0x2D7F, U"Tifinagh" },
+ { 0x2D80, 0x2DDF, U"Ethiopic Extended" },
+ { 0x2DE0, 0x2DFF, U"Cyrillic Extended-A" },
+ { 0x2E00, 0x2E7F, U"Supplemental Punctuation" },
+ { 0x2E80, 0x2EFF, U"CJK Radicals Supplement" },
+ { 0x2F00, 0x2FDF, U"Kangxi Radicals" },
+ { 0x2FF0, 0x2FFF, U"Ideographic Description Characters" },
+ { 0x3000, 0x303F, U"CJK Symbols and Punctuation" },
+ { 0x3040, 0x309F, U"Hiragana" },
+ { 0x30A0, 0x30FF, U"Katakana" },
+ { 0x3100, 0x312F, U"Bopomofo" },
+ { 0x3130, 0x318F, U"Hangul Compatibility Jamo" },
+ { 0x3190, 0x319F, U"Kanbun" },
+ { 0x31A0, 0x31BF, U"Bopomofo Extended" },
+ { 0x31C0, 0x31EF, U"CJK Strokes" },
+ { 0x31F0, 0x31FF, U"Katakana Phonetic Extensions" },
+ { 0x3200, 0x32FF, U"Enclosed CJK Letters and Months" },
+ { 0x3300, 0x33FF, U"CJK Compatibility" },
+ { 0x3400, 0x4DBF, U"CJK Unified Ideographs Extension A" },
+ { 0x4DC0, 0x4DFF, U"Yijing Hexagram Symbols" },
+ { 0x4E00, 0x9FFF, U"CJK Unified Ideographs" },
+ { 0xA000, 0xA48F, U"Yi Syllables" },
+ { 0xA490, 0xA4CF, U"Yi Radicals" },
+ { 0xA4D0, 0xA4FF, U"Lisu" },
+ { 0xA500, 0xA63F, U"Vai" },
+ { 0xA640, 0xA69F, U"Cyrillic Extended-B" },
+ { 0xA6A0, 0xA6FF, U"Bamum" },
+ { 0xA700, 0xA71F, U"Modifier Tone Letters" },
+ { 0xA720, 0xA7FF, U"Latin Extended-D" },
+ { 0xA800, 0xA82F, U"Syloti Nagri" },
+ { 0xA830, 0xA83F, U"Common Indic Number Forms" },
+ { 0xA840, 0xA87F, U"Phags-pa" },
+ { 0xA880, 0xA8DF, U"Saurashtra" },
+ { 0xA8E0, 0xA8FF, U"Devanagari Extended" },
+ { 0xA900, 0xA92F, U"Kayah Li" },
+ { 0xA930, 0xA95F, U"Rejang" },
+ { 0xA960, 0xA97F, U"Hangul Jamo Extended-A" },
+ { 0xA980, 0xA9DF, U"Javanese" },
+ { 0xA9E0, 0xA9FF, U"Myanmar Extended-B" },
+ { 0xAA00, 0xAA5F, U"Cham" },
+ { 0xAA60, 0xAA7F, U"Myanmar Extended-A" },
+ { 0xAA80, 0xAADF, U"Tai Viet" },
+ { 0xAAE0, 0xAAFF, U"Meetei Mayek Extensions" },
+ { 0xAB00, 0xAB2F, U"Ethiopic Extended-A" },
+ { 0xAB30, 0xAB6F, U"Latin Extended-E" },
+ { 0xAB70, 0xABBF, U"Cherokee Supplement" },
+ { 0xABC0, 0xABFF, U"Meetei Mayek" },
+ { 0xAC00, 0xD7AF, U"Hangul Syllables" },
+ { 0xD7B0, 0xD7FF, U"Hangul Jamo Extended-B" },
+ //{ 0xD800, 0xDB7F, U"High Surrogates" },
+ //{ 0xDB80, 0xDBFF, U"High Private Use Surrogates" },
+ //{ 0xDC00, 0xDFFF, U"Low Surrogates" },
+ { 0xE000, 0xF8FF, U"Private Use Area" },
+ { 0xF900, 0xFAFF, U"CJK Compatibility Ideographs" },
+ { 0xFB00, 0xFB4F, U"Alphabetic Presentation Forms" },
+ { 0xFB50, 0xFDFF, U"Arabic Presentation Forms-A" },
+ //{ 0xFE00, 0xFE0F, U"Variation Selectors" },
+ { 0xFE10, 0xFE1F, U"Vertical Forms" },
+ { 0xFE20, 0xFE2F, U"Combining Half Marks" },
+ { 0xFE30, 0xFE4F, U"CJK Compatibility Forms" },
+ { 0xFE50, 0xFE6F, U"Small Form Variants" },
+ { 0xFE70, 0xFEFF, U"Arabic Presentation Forms-B" },
+ { 0xFF00, 0xFFEF, U"Halfwidth and Fullwidth Forms" },
+ //{ 0xFFF0, 0xFFFF, U"Specials" },
+ { 0x10000, 0x1007F, U"Linear B Syllabary" },
+ { 0x10080, 0x100FF, U"Linear B Ideograms" },
+ { 0x10100, 0x1013F, U"Aegean Numbers" },
+ { 0x10140, 0x1018F, U"Ancient Greek Numbers" },
+ { 0x10190, 0x101CF, U"Ancient Symbols" },
+ { 0x101D0, 0x101FF, U"Phaistos Disc" },
+ { 0x10280, 0x1029F, U"Lycian" },
+ { 0x102A0, 0x102DF, U"Carian" },
+ { 0x102E0, 0x102FF, U"Coptic Epact Numbers" },
+ { 0x10300, 0x1032F, U"Old Italic" },
+ { 0x10330, 0x1034F, U"Gothic" },
+ { 0x10350, 0x1037F, U"Old Permic" },
+ { 0x10380, 0x1039F, U"Ugaritic" },
+ { 0x103A0, 0x103DF, U"Old Persian" },
+ { 0x10400, 0x1044F, U"Deseret" },
+ { 0x10450, 0x1047F, U"Shavian" },
+ { 0x10480, 0x104AF, U"Osmanya" },
+ { 0x104B0, 0x104FF, U"Osage" },
+ { 0x10500, 0x1052F, U"Elbasan" },
+ { 0x10530, 0x1056F, U"Caucasian Albanian" },
+ { 0x10570, 0x105BF, U"Vithkuqi" },
+ { 0x10600, 0x1077F, U"Linear A" },
+ { 0x10780, 0x107BF, U"Latin Extended-F" },
+ { 0x10800, 0x1083F, U"Cypriot Syllabary" },
+ { 0x10840, 0x1085F, U"Imperial Aramaic" },
+ { 0x10860, 0x1087F, U"Palmyrene" },
+ { 0x10880, 0x108AF, U"Nabataean" },
+ { 0x108E0, 0x108FF, U"Hatran" },
+ { 0x10900, 0x1091F, U"Phoenician" },
+ { 0x10920, 0x1093F, U"Lydian" },
+ { 0x10980, 0x1099F, U"Meroitic Hieroglyphs" },
+ { 0x109A0, 0x109FF, U"Meroitic Cursive" },
+ { 0x10A00, 0x10A5F, U"Kharoshthi" },
+ { 0x10A60, 0x10A7F, U"Old South Arabian" },
+ { 0x10A80, 0x10A9F, U"Old North Arabian" },
+ { 0x10AC0, 0x10AFF, U"Manichaean" },
+ { 0x10B00, 0x10B3F, U"Avestan" },
+ { 0x10B40, 0x10B5F, U"Inscriptional Parthian" },
+ { 0x10B60, 0x10B7F, U"Inscriptional Pahlavi" },
+ { 0x10B80, 0x10BAF, U"Psalter Pahlavi" },
+ { 0x10C00, 0x10C4F, U"Old Turkic" },
+ { 0x10C80, 0x10CFF, U"Old Hungarian" },
+ { 0x10D00, 0x10D3F, U"Hanifi Rohingya" },
+ { 0x10E60, 0x10E7F, U"Rumi Numeral Symbols" },
+ { 0x10E80, 0x10EBF, U"Yezidi" },
+ { 0x10F00, 0x10F2F, U"Old Sogdian" },
+ { 0x10F30, 0x10F6F, U"Sogdian" },
+ { 0x10F70, 0x10FAF, U"Old Uyghur" },
+ { 0x10FB0, 0x10FDF, U"Chorasmian" },
+ { 0x10FE0, 0x10FFF, U"Elymaic" },
+ { 0x11000, 0x1107F, U"Brahmi" },
+ { 0x11080, 0x110CF, U"Kaithi" },
+ { 0x110D0, 0x110FF, U"Sora Sompeng" },
+ { 0x11100, 0x1114F, U"Chakma" },
+ { 0x11150, 0x1117F, U"Mahajani" },
+ { 0x11180, 0x111DF, U"Sharada" },
+ { 0x111E0, 0x111FF, U"Sinhala Archaic Numbers" },
+ { 0x11200, 0x1124F, U"Khojki" },
+ { 0x11280, 0x112AF, U"Multani" },
+ { 0x112B0, 0x112FF, U"Khudawadi" },
+ { 0x11300, 0x1137F, U"Grantha" },
+ { 0x11400, 0x1147F, U"Newa" },
+ { 0x11480, 0x114DF, U"Tirhuta" },
+ { 0x11580, 0x115FF, U"Siddham" },
+ { 0x11600, 0x1165F, U"Modi" },
+ { 0x11660, 0x1167F, U"Mongolian Supplement" },
+ { 0x11680, 0x116CF, U"Takri" },
+ { 0x11700, 0x1174F, U"Ahom" },
+ { 0x11800, 0x1184F, U"Dogra" },
+ { 0x118A0, 0x118FF, U"Warang Citi" },
+ { 0x11900, 0x1195F, U"Dives Akuru" },
+ { 0x119A0, 0x119FF, U"Nandinagari" },
+ { 0x11A00, 0x11A4F, U"Zanabazar Square" },
+ { 0x11A50, 0x11AAF, U"Soyombo" },
+ { 0x11AB0, 0x11ABF, U"Unified Canadian Aboriginal Syllabics Extended-A" },
+ { 0x11AC0, 0x11AFF, U"Pau Cin Hau" },
+ { 0x11C00, 0x11C6F, U"Bhaiksuki" },
+ { 0x11C70, 0x11CBF, U"Marchen" },
+ { 0x11D00, 0x11D5F, U"Masaram Gondi" },
+ { 0x11D60, 0x11DAF, U"Gunjala Gondi" },
+ { 0x11EE0, 0x11EFF, U"Makasar" },
+ { 0x11FB0, 0x11FBF, U"Lisu Supplement" },
+ { 0x11FC0, 0x11FFF, U"Tamil Supplement" },
+ { 0x12000, 0x123FF, U"Cuneiform" },
+ { 0x12400, 0x1247F, U"Cuneiform Numbers and Punctuation" },
+ { 0x12480, 0x1254F, U"Early Dynastic Cuneiform" },
+ { 0x12F90, 0x12FFF, U"Cypro-Minoan" },
+ { 0x13000, 0x1342F, U"Egyptian Hieroglyphs" },
+ { 0x13430, 0x1343F, U"Egyptian Hieroglyph Format Controls" },
+ { 0x14400, 0x1467F, U"Anatolian Hieroglyphs" },
+ { 0x16800, 0x16A3F, U"Bamum Supplement" },
+ { 0x16A40, 0x16A6F, U"Mro" },
+ { 0x16A70, 0x16ACF, U"Tangsa" },
+ { 0x16AD0, 0x16AFF, U"Bassa Vah" },
+ { 0x16B00, 0x16B8F, U"Pahawh Hmong" },
+ { 0x16E40, 0x16E9F, U"Medefaidrin" },
+ { 0x16F00, 0x16F9F, U"Miao" },
+ { 0x16FE0, 0x16FFF, U"Ideographic Symbols and Punctuation" },
+ { 0x17000, 0x187FF, U"Tangut" },
+ { 0x18800, 0x18AFF, U"Tangut Components" },
+ { 0x18B00, 0x18CFF, U"Khitan Small Script" },
+ { 0x18D00, 0x18D7F, U"Tangut Supplement" },
+ { 0x1AFF0, 0x1AFFF, U"Kana Extended-B" },
+ { 0x1B000, 0x1B0FF, U"Kana Supplement" },
+ { 0x1B100, 0x1B12F, U"Kana Extended-A" },
+ { 0x1B130, 0x1B16F, U"Small Kana Extension" },
+ { 0x1B170, 0x1B2FF, U"Nushu" },
+ { 0x1BC00, 0x1BC9F, U"Duployan" },
+ { 0x1BCA0, 0x1BCAF, U"Shorthand Format Controls" },
+ { 0x1CF00, 0x1CFCF, U"Znamenny Musical Notation" },
+ { 0x1D000, 0x1D0FF, U"Byzantine Musical Symbols" },
+ { 0x1D100, 0x1D1FF, U"Musical Symbols" },
+ { 0x1D200, 0x1D24F, U"Ancient Greek Musical Notation" },
+ { 0x1D2E0, 0x1D2FF, U"Mayan Numerals" },
+ { 0x1D300, 0x1D35F, U"Tai Xuan Jing Symbols" },
+ { 0x1D360, 0x1D37F, U"Counting Rod Numerals" },
+ { 0x1D400, 0x1D7FF, U"Mathematical Alphanumeric Symbols" },
+ { 0x1D800, 0x1DAAF, U"Sutton SignWriting" },
+ { 0x1DF00, 0x1DFFF, U"Latin Extended-G" },
+ { 0x1E000, 0x1E02F, U"Glagolitic Supplement" },
+ { 0x1E100, 0x1E14F, U"Nyiakeng Puachue Hmong" },
+ { 0x1E290, 0x1E2BF, U"Toto" },
+ { 0x1E2C0, 0x1E2FF, U"Wancho" },
+ { 0x1E7E0, 0x1E7FF, U"Ethiopic Extended-B" },
+ { 0x1E800, 0x1E8DF, U"Mende Kikakui" },
+ { 0x1E900, 0x1E95F, U"Adlam" },
+ { 0x1EC70, 0x1ECBF, U"Indic Siyaq Numbers" },
+ { 0x1ED00, 0x1ED4F, U"Ottoman Siyaq Numbers" },
+ { 0x1EE00, 0x1EEFF, U"Arabic Mathematical Alphabetic Symbols" },
+ { 0x1F000, 0x1F02F, U"Mahjong Tiles" },
+ { 0x1F030, 0x1F09F, U"Domino Tiles" },
+ { 0x1F0A0, 0x1F0FF, U"Playing Cards" },
+ { 0x1F100, 0x1F1FF, U"Enclosed Alphanumeric Supplement" },
+ { 0x1F200, 0x1F2FF, U"Enclosed Ideographic Supplement" },
+ { 0x1F300, 0x1F5FF, U"Miscellaneous Symbols and Pictographs" },
+ { 0x1F600, 0x1F64F, U"Emoticons" },
+ { 0x1F650, 0x1F67F, U"Ornamental Dingbats" },
+ { 0x1F680, 0x1F6FF, U"Transport and Map Symbols" },
+ { 0x1F700, 0x1F77F, U"Alchemical Symbols" },
+ { 0x1F780, 0x1F7FF, U"Geometric Shapes Extended" },
+ { 0x1F800, 0x1F8FF, U"Supplemental Arrows-C" },
+ { 0x1F900, 0x1F9FF, U"Supplemental Symbols and Pictographs" },
+ { 0x1FA00, 0x1FA6F, U"Chess Symbols" },
+ { 0x1FA70, 0x1FAFF, U"Symbols and Pictographs Extended-A" },
+ { 0x1FB00, 0x1FBFF, U"Symbols for Legacy Computing" },
+ { 0x20000, 0x2A6DF, U"CJK Unified Ideographs Extension B" },
+ { 0x2A700, 0x2B73F, U"CJK Unified Ideographs Extension C" },
+ { 0x2B740, 0x2B81F, U"CJK Unified Ideographs Extension D" },
+ { 0x2B820, 0x2CEAF, U"CJK Unified Ideographs Extension E" },
+ { 0x2CEB0, 0x2EBEF, U"CJK Unified Ideographs Extension F" },
+ { 0x2F800, 0x2FA1F, U"CJK Compatibility Ideographs Supplement" },
+ { 0x30000, 0x3134F, U"CJK Unified Ideographs Extension G" },
+ //{ 0xE0000, 0xE007F, U"Tags" },
+ //{ 0xE0100, 0xE01EF, U"Variation Selectors Supplement" },
+ { 0xF0000, 0xFFFFF, U"Supplementary Private Use Area-A" },
+ { 0x100000, 0x10FFFF, U"Supplementary Private Use Area-B" },
+ { 0x10FFFF, 0x10FFFF, String() }
+};
+
+void DynamicFontImportSettings::_add_glyph_range_item(int32_t p_start, int32_t p_end, const String &p_name) {
+ const int page_size = 512;
+ int pages = (p_end - p_start) / page_size;
+ int remain = (p_end - p_start) % page_size;
+
+ int32_t start = p_start;
+ for (int i = 0; i < pages; i++) {
+ TreeItem *item = glyph_tree->create_item(glyph_root);
+ ERR_FAIL_NULL(item);
+ item->set_text(0, _pad_zeros(String::num_int64(start, 16)) + " - " + _pad_zeros(String::num_int64(start + page_size, 16)));
+ item->set_text(1, p_name);
+ item->set_metadata(0, Vector2i(start, start + page_size));
+ start += page_size;
+ }
+ if (remain > 0) {
+ TreeItem *item = glyph_tree->create_item(glyph_root);
+ ERR_FAIL_NULL(item);
+ item->set_text(0, _pad_zeros(String::num_int64(start, 16)) + " - " + _pad_zeros(String::num_int64(p_end, 16)));
+ item->set_text(1, p_name);
+ item->set_metadata(0, Vector2i(start, p_end));
+ }
+}
+
+/*************************************************************************/
+/* Languages and scripts */
+/*************************************************************************/
+
+struct CodeInfo {
+ String name;
+ String code;
+};
+
+static CodeInfo langs[] = {
+ { U"Custom", U"xx" },
+ { U"-", U"-" },
+ { U"Abkhazian", U"ab" },
+ { U"Afar", U"aa" },
+ { U"Afrikaans", U"af" },
+ { U"Akan", U"ak" },
+ { U"Albanian", U"sq" },
+ { U"Amharic", U"am" },
+ { U"Arabic", U"ar" },
+ { U"Aragonese", U"an" },
+ { U"Armenian", U"hy" },
+ { U"Assamese", U"as" },
+ { U"Avaric", U"av" },
+ { U"Avestan", U"ae" },
+ { U"Aymara", U"ay" },
+ { U"Azerbaijani", U"az" },
+ { U"Bambara", U"bm" },
+ { U"Bashkir", U"ba" },
+ { U"Basque", U"eu" },
+ { U"Belarusian", U"be" },
+ { U"Bengali", U"bn" },
+ { U"Bihari", U"bh" },
+ { U"Bislama", U"bi" },
+ { U"Bosnian", U"bs" },
+ { U"Breton", U"br" },
+ { U"Bulgarian", U"bg" },
+ { U"Burmese", U"my" },
+ { U"Catalan", U"ca" },
+ { U"Chamorro", U"ch" },
+ { U"Chechen", U"ce" },
+ { U"Chichewa", U"ny" },
+ { U"Chinese", U"zh" },
+ { U"Chuvash", U"cv" },
+ { U"Cornish", U"kw" },
+ { U"Corsican", U"co" },
+ { U"Cree", U"cr" },
+ { U"Croatian", U"hr" },
+ { U"Czech", U"cs" },
+ { U"Danish", U"da" },
+ { U"Divehi", U"dv" },
+ { U"Dutch", U"nl" },
+ { U"Dzongkha", U"dz" },
+ { U"English", U"en" },
+ { U"Esperanto", U"eo" },
+ { U"Estonian", U"et" },
+ { U"Ewe", U"ee" },
+ { U"Faroese", U"fo" },
+ { U"Fijian", U"fj" },
+ { U"Finnish", U"fi" },
+ { U"French", U"fr" },
+ { U"Fulah", U"ff" },
+ { U"Galician", U"gl" },
+ { U"Georgian", U"ka" },
+ { U"German", U"de" },
+ { U"Greek", U"el" },
+ { U"Guarani", U"gn" },
+ { U"Gujarati", U"gu" },
+ { U"Haitian", U"ht" },
+ { U"Hausa", U"ha" },
+ { U"Hebrew", U"he" },
+ { U"Herero", U"hz" },
+ { U"Hindi", U"hi" },
+ { U"Hiri Motu", U"ho" },
+ { U"Hungarian", U"hu" },
+ { U"Interlingua", U"ia" },
+ { U"Indonesian", U"id" },
+ { U"Interlingue", U"ie" },
+ { U"Irish", U"ga" },
+ { U"Igbo", U"ig" },
+ { U"Inupiaq", U"ik" },
+ { U"Ido", U"io" },
+ { U"Icelandic", U"is" },
+ { U"Italian", U"it" },
+ { U"Inuktitut", U"iu" },
+ { U"Japanese", U"ja" },
+ { U"Javanese", U"jv" },
+ { U"Kalaallisut", U"kl" },
+ { U"Kannada", U"kn" },
+ { U"Kanuri", U"kr" },
+ { U"Kashmiri", U"ks" },
+ { U"Kazakh", U"kk" },
+ { U"Central Khmer", U"km" },
+ { U"Kikuyu", U"ki" },
+ { U"Kinyarwanda", U"rw" },
+ { U"Kirghiz", U"ky" },
+ { U"Komi", U"kv" },
+ { U"Kongo", U"kg" },
+ { U"Korean", U"ko" },
+ { U"Kurdish", U"ku" },
+ { U"Kuanyama", U"kj" },
+ { U"Latin", U"la" },
+ { U"Luxembourgish", U"lb" },
+ { U"Ganda", U"lg" },
+ { U"Limburgan", U"li" },
+ { U"Lingala", U"ln" },
+ { U"Lao", U"lo" },
+ { U"Lithuanian", U"lt" },
+ { U"Luba-Katanga", U"lu" },
+ { U"Latvian", U"lv" },
+ { U"Man", U"gv" },
+ { U"Macedonian", U"mk" },
+ { U"Malagasy", U"mg" },
+ { U"Malay", U"ms" },
+ { U"Malayalam", U"ml" },
+ { U"Maltese", U"mt" },
+ { U"Maori", U"mi" },
+ { U"Marathi", U"mr" },
+ { U"Marshallese", U"mh" },
+ { U"Mongolian", U"mn" },
+ { U"Nauru", U"na" },
+ { U"Navajo", U"nv" },
+ { U"North Ndebele", U"nd" },
+ { U"Nepali", U"ne" },
+ { U"Ndonga", U"ng" },
+ { U"Norwegian Bokmål", U"nb" },
+ { U"Norwegian Nynorsk", U"nn" },
+ { U"Norwegian", U"no" },
+ { U"Sichuan Yi, Nuosu", U"ii" },
+ { U"South Ndebele", U"nr" },
+ { U"Occitan", U"oc" },
+ { U"Ojibwa", U"oj" },
+ { U"Church Slavic", U"cu" },
+ { U"Oromo", U"om" },
+ { U"Oriya", U"or" },
+ { U"Ossetian", U"os" },
+ { U"Punjabi", U"pa" },
+ { U"Pali", U"pi" },
+ { U"Persian", U"fa" },
+ { U"Polish", U"pl" },
+ { U"Pashto", U"ps" },
+ { U"Portuguese", U"pt" },
+ { U"Quechua", U"qu" },
+ { U"Romansh", U"rm" },
+ { U"Rundi", U"rn" },
+ { U"Romanian", U"ro" },
+ { U"Russian", U"ru" },
+ { U"Sanskrit", U"sa" },
+ { U"Sardinian", U"sc" },
+ { U"Sindhi", U"sd" },
+ { U"Northern Sami", U"se" },
+ { U"Samoan", U"sm" },
+ { U"Sango", U"sg" },
+ { U"Serbian", U"sr" },
+ { U"Gaelic", U"gd" },
+ { U"Shona", U"sn" },
+ { U"Sinhala", U"si" },
+ { U"Slovak", U"sk" },
+ { U"Slovenian", U"sl" },
+ { U"Somali", U"so" },
+ { U"Southern Sotho", U"st" },
+ { U"Spanish", U"es" },
+ { U"Sundanese", U"su" },
+ { U"Swahili", U"sw" },
+ { U"Swati", U"ss" },
+ { U"Swedish", U"sv" },
+ { U"Tamil", U"ta" },
+ { U"Telugu", U"te" },
+ { U"Tajik", U"tg" },
+ { U"Thai", U"th" },
+ { U"Tigrinya", U"ti" },
+ { U"Tibetan", U"bo" },
+ { U"Turkmen", U"tk" },
+ { U"Tagalog", U"tl" },
+ { U"Tswana", U"tn" },
+ { U"Tonga", U"to" },
+ { U"Turkish", U"tr" },
+ { U"Tsonga", U"ts" },
+ { U"Tatar", U"tt" },
+ { U"Twi", U"tw" },
+ { U"Tahitian", U"ty" },
+ { U"Uighur", U"ug" },
+ { U"Ukrainian", U"uk" },
+ { U"Urdu", U"ur" },
+ { U"Uzbek", U"uz" },
+ { U"Venda", U"ve" },
+ { U"Vietnamese", U"vi" },
+ { U"Volapük", U"vo" },
+ { U"Walloon", U"wa" },
+ { U"Welsh", U"cy" },
+ { U"Wolof", U"wo" },
+ { U"Western Frisian", U"fy" },
+ { U"Xhosa", U"xh" },
+ { U"Yiddish", U"yi" },
+ { U"Yoruba", U"yo" },
+ { U"Zhuang", U"za" },
+ { U"Zulu", U"zu" },
+ { String(), String() }
+};
+
+static CodeInfo scripts[] = {
+ { U"Custom", U"Qaaa" },
+ { U"-", U"-" },
+ { U"Adlam", U"Adlm" },
+ { U"Afaka", U"Afak" },
+ { U"Caucasian Albanian", U"Aghb" },
+ { U"Ahom", U"Ahom" },
+ { U"Arabic", U"Arab" },
+ { U"Imperial Aramaic", U"Armi" },
+ { U"Armenian", U"Armn" },
+ { U"Avestan", U"Avst" },
+ { U"Balinese", U"Bali" },
+ { U"Bamum", U"Bamu" },
+ { U"Bassa Vah", U"Bass" },
+ { U"Batak", U"Batk" },
+ { U"Bengali", U"Beng" },
+ { U"Bhaiksuki", U"Bhks" },
+ { U"Blissymbols", U"Blis" },
+ { U"Bopomofo", U"Bopo" },
+ { U"Brahmi", U"Brah" },
+ { U"Braille", U"Brai" },
+ { U"Buginese", U"Bugi" },
+ { U"Buhid", U"Buhd" },
+ { U"Chakma", U"Cakm" },
+ { U"Unified Canadian Aboriginal", U"Cans" },
+ { U"Carian", U"Cari" },
+ { U"Cham", U"Cham" },
+ { U"Cherokee", U"Cher" },
+ { U"Chorasmian", U"Chrs" },
+ { U"Cirth", U"Cirt" },
+ { U"Coptic", U"Copt" },
+ { U"Cypro-Minoan", U"Cpmn" },
+ { U"Cypriot", U"Cprt" },
+ { U"Cyrillic", U"Cyrl" },
+ { U"Devanagari", U"Deva" },
+ { U"Dives Akuru", U"Diak" },
+ { U"Dogra", U"Dogr" },
+ { U"Deseret", U"Dsrt" },
+ { U"Duployan", U"Dupl" },
+ { U"Egyptian demotic", U"Egyd" },
+ { U"Egyptian hieratic", U"Egyh" },
+ { U"Egyptian hieroglyphs", U"Egyp" },
+ { U"Elbasan", U"Elba" },
+ { U"Elymaic", U"Elym" },
+ { U"Ethiopic", U"Ethi" },
+ { U"Khutsuri", U"Geok" },
+ { U"Georgian", U"Geor" },
+ { U"Glagolitic", U"Glag" },
+ { U"Gunjala Gondi", U"Gong" },
+ { U"Masaram Gondi", U"Gonm" },
+ { U"Gothic", U"Goth" },
+ { U"Grantha", U"Gran" },
+ { U"Greek", U"Grek" },
+ { U"Gujarati", U"Gujr" },
+ { U"Gurmukhi", U"Guru" },
+ { U"Hangul", U"Hang" },
+ { U"Han", U"Hani" },
+ { U"Hanunoo", U"Hano" },
+ { U"Hatran", U"Hatr" },
+ { U"Hebrew", U"Hebr" },
+ { U"Hiragana", U"Hira" },
+ { U"Anatolian Hieroglyphs", U"Hluw" },
+ { U"Pahawh Hmong", U"Hmng" },
+ { U"Nyiakeng Puachue Hmong", U"Hmnp" },
+ { U"Old Hungarian", U"Hung" },
+ { U"Indus", U"Inds" },
+ { U"Old Italic", U"Ital" },
+ { U"Javanese", U"Java" },
+ { U"Jurchen", U"Jurc" },
+ { U"Kayah Li", U"Kali" },
+ { U"Katakana", U"Kana" },
+ { U"Kharoshthi", U"Khar" },
+ { U"Khmer", U"Khmr" },
+ { U"Khojki", U"Khoj" },
+ { U"Khitan large script", U"Kitl" },
+ { U"Khitan small script", U"Kits" },
+ { U"Kannada", U"Knda" },
+ { U"Kpelle", U"Kpel" },
+ { U"Kaithi", U"Kthi" },
+ { U"Tai Tham", U"Lana" },
+ { U"Lao", U"Laoo" },
+ { U"Latin", U"Latn" },
+ { U"Leke", U"Leke" },
+ { U"Lepcha", U"Lepc" },
+ { U"Limbu", U"Limb" },
+ { U"Linear A", U"Lina" },
+ { U"Linear B", U"Linb" },
+ { U"Lisu", U"Lisu" },
+ { U"Loma", U"Loma" },
+ { U"Lycian", U"Lyci" },
+ { U"Lydian", U"Lydi" },
+ { U"Mahajani", U"Mahj" },
+ { U"Makasar", U"Maka" },
+ { U"Mandaic", U"Mand" },
+ { U"Manichaean", U"Mani" },
+ { U"Marchen", U"Marc" },
+ { U"Mayan Hieroglyphs", U"Maya" },
+ { U"Medefaidrin", U"Medf" },
+ { U"Mende Kikakui", U"Mend" },
+ { U"Meroitic Cursive", U"Merc" },
+ { U"Meroitic Hieroglyphs", U"Mero" },
+ { U"Malayalam", U"Mlym" },
+ { U"Modi", U"Modi" },
+ { U"Mongolian", U"Mong" },
+ { U"Moon", U"Moon" },
+ { U"Mro", U"Mroo" },
+ { U"Meitei Mayek", U"Mtei" },
+ { U"Multani", U"Mult" },
+ { U"Myanmar (Burmese)", U"Mymr" },
+ { U"Nandinagari", U"Nand" },
+ { U"Old North Arabian", U"Narb" },
+ { U"Nabataean", U"Nbat" },
+ { U"Newa", U"Newa" },
+ { U"Naxi Dongba", U"Nkdb" },
+ { U"Nakhi Geba", U"Nkgb" },
+ { U"N’Ko", U"Nkoo" },
+ { U"Nüshu", U"Nshu" },
+ { U"Ogham", U"Ogam" },
+ { U"Ol Chiki", U"Olck" },
+ { U"Old Turkic", U"Orkh" },
+ { U"Oriya", U"Orya" },
+ { U"Osage", U"Osge" },
+ { U"Osmanya", U"Osma" },
+ { U"Old Uyghur", U"Ougr" },
+ { U"Palmyrene", U"Palm" },
+ { U"Pau Cin Hau", U"Pauc" },
+ { U"Proto-Cuneiform", U"Pcun" },
+ { U"Proto-Elamite", U"Pelm" },
+ { U"Old Permic", U"Perm" },
+ { U"Phags-pa", U"Phag" },
+ { U"Inscriptional Pahlavi", U"Phli" },
+ { U"Psalter Pahlavi", U"Phlp" },
+ { U"Book Pahlavi", U"Phlv" },
+ { U"Phoenician", U"Phnx" },
+ { U"Klingon", U"Piqd" },
+ { U"Miao", U"Plrd" },
+ { U"Inscriptional Parthian", U"Prti" },
+ { U"Proto-Sinaitic", U"Psin" },
+ { U"Ranjana", U"Ranj" },
+ { U"Rejang", U"Rjng" },
+ { U"Hanifi Rohingya", U"Rohg" },
+ { U"Rongorongo", U"Roro" },
+ { U"Runic", U"Runr" },
+ { U"Samaritan", U"Samr" },
+ { U"Sarati", U"Sara" },
+ { U"Old South Arabian", U"Sarb" },
+ { U"Saurashtra", U"Saur" },
+ { U"SignWriting", U"Sgnw" },
+ { U"Shavian", U"Shaw" },
+ { U"Sharada", U"Shrd" },
+ { U"Shuishu", U"Shui" },
+ { U"Siddham", U"Sidd" },
+ { U"Khudawadi", U"Sind" },
+ { U"Sinhala", U"Sinh" },
+ { U"Sogdian", U"Sogd" },
+ { U"Old Sogdian", U"Sogo" },
+ { U"Sora Sompeng", U"Sora" },
+ { U"Soyombo", U"Soyo" },
+ { U"Sundanese", U"Sund" },
+ { U"Syloti Nagri", U"Sylo" },
+ { U"Syriac", U"Syrc" },
+ { U"Tagbanwa", U"Tagb" },
+ { U"Takri", U"Takr" },
+ { U"Tai Le", U"Tale" },
+ { U"New Tai Lue", U"Talu" },
+ { U"Tamil", U"Taml" },
+ { U"Tangut", U"Tang" },
+ { U"Tai Viet", U"Tavt" },
+ { U"Telugu", U"Telu" },
+ { U"Tengwar", U"Teng" },
+ { U"Tifinagh", U"Tfng" },
+ { U"Tagalog", U"Tglg" },
+ { U"Thaana", U"Thaa" },
+ { U"Thai", U"Thai" },
+ { U"Tibetan", U"Tibt" },
+ { U"Tirhuta", U"Tirh" },
+ { U"Tangsa", U"Tnsa" },
+ { U"Toto", U"Toto" },
+ { U"Ugaritic", U"Ugar" },
+ { U"Vai", U"Vaii" },
+ { U"Visible Speech", U"Visp" },
+ { U"Vithkuqi", U"Vith" },
+ { U"Warang Citi", U"Wara" },
+ { U"Wancho", U"Wcho" },
+ { U"Woleai", U"Wole" },
+ { U"Old Persian", U"Xpeo" },
+ { U"Cuneiform", U"Xsux" },
+ { U"Yezidi", U"Yezi" },
+ { U"Yi", U"Yiii" },
+ { U"Zanabazar Square", U"Zanb" },
+ { String(), String() }
+};
+
+/*************************************************************************/
+/* Page 1 callbacks: Rendering Options */
+/*************************************************************************/
+
+void DynamicFontImportSettings::_main_prop_changed(const String &p_edited_property) {
+ // Update font preview.
+
+ if (p_edited_property == "antialiased") {
+ if (font_preview->get_data_count() > 0) {
+ font_preview->get_data(0)->set_antialiased(import_settings_data->get("antialiased"));
+ }
+ } else if (p_edited_property == "multichannel_signed_distance_field") {
+ if (font_preview->get_data_count() > 0) {
+ font_preview->get_data(0)->set_multichannel_signed_distance_field(import_settings_data->get("multichannel_signed_distance_field"));
+ }
+ _variation_selected();
+ _variations_validate();
+ } else if (p_edited_property == "msdf_pixel_range") {
+ if (font_preview->get_data_count() > 0) {
+ font_preview->get_data(0)->set_msdf_pixel_range(import_settings_data->get("msdf_pixel_range"));
+ }
+ } else if (p_edited_property == "msdf_size") {
+ if (font_preview->get_data_count() > 0) {
+ font_preview->get_data(0)->set_msdf_size(import_settings_data->get("msdf_size"));
+ }
+ } else if (p_edited_property == "force_autohinter") {
+ if (font_preview->get_data_count() > 0) {
+ font_preview->get_data(0)->set_force_autohinter(import_settings_data->get("force_autohinter"));
+ }
+ } else if (p_edited_property == "hinting") {
+ if (font_preview->get_data_count() > 0) {
+ font_preview->get_data(0)->set_hinting((TextServer::Hinting)import_settings_data->get("hinting").operator int());
+ }
+ } else if (p_edited_property == "oversampling") {
+ if (font_preview->get_data_count() > 0) {
+ font_preview->get_data(0)->set_oversampling(import_settings_data->get("oversampling"));
+ }
+ }
+ font_preview_label->add_theme_font_override("font", font_preview);
+ font_preview_label->update();
+}
+
+/*************************************************************************/
+/* Page 2 callbacks: Configurations */
+/*************************************************************************/
+
+void DynamicFontImportSettings::_variation_add() {
+ TreeItem *vars_item = vars_list->create_item(vars_list_root);
+ ERR_FAIL_NULL(vars_item);
+
+ vars_item->set_text(0, TTR("New configuration"));
+ vars_item->set_editable(0, true);
+ vars_item->add_button(1, vars_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove Variation"));
+ vars_item->set_button_color(1, 0, Color(1, 1, 1, 0.75));
+
+ Ref<DynamicFontImportSettingsData> import_variation_data;
+ import_variation_data.instantiate();
+ import_variation_data->owner = this;
+ ERR_FAIL_NULL(import_variation_data);
+
+ for (List<ResourceImporter::ImportOption>::Element *E = options_variations.front(); E; E = E->next()) {
+ import_variation_data->defaults[E->get().option.name] = E->get().default_value;
+ }
+
+ import_variation_data->options = options_variations;
+ inspector_vars->edit(import_variation_data.ptr());
+ import_variation_data->notify_property_list_changed();
+
+ vars_item->set_metadata(0, import_variation_data);
+
+ _variations_validate();
+}
+
+void DynamicFontImportSettings::_variation_selected() {
+ TreeItem *vars_item = vars_list->get_selected();
+ if (vars_item) {
+ Ref<DynamicFontImportSettingsData> import_variation_data = vars_item->get_metadata(0);
+ ERR_FAIL_NULL(import_variation_data);
+
+ inspector_vars->edit(import_variation_data.ptr());
+ import_variation_data->notify_property_list_changed();
+ }
+}
+
+void DynamicFontImportSettings::_variation_remove(Object *p_item, int p_column, int p_id) {
+ TreeItem *vars_item = (TreeItem *)p_item;
+ ERR_FAIL_NULL(vars_item);
+
+ inspector_vars->edit(nullptr);
+
+ vars_list_root->remove_child(vars_item);
+ memdelete(vars_item);
+
+ if (vars_list_root->get_first_child()) {
+ Ref<DynamicFontImportSettingsData> import_variation_data = vars_list_root->get_first_child()->get_metadata(0);
+ inspector_vars->edit(import_variation_data.ptr());
+ import_variation_data->notify_property_list_changed();
+ }
+
+ _variations_validate();
+}
+
+void DynamicFontImportSettings::_variation_changed(const String &p_edited_property) {
+ _variations_validate();
+}
+
+void DynamicFontImportSettings::_variations_validate() {
+ String warn;
+ if (!vars_list_root->get_first_child()) {
+ warn = TTR("Warinig: There are no configurations specified, no glyphs will be pre-rendered.");
+ }
+ for (TreeItem *vars_item_a = vars_list_root->get_first_child(); vars_item_a; vars_item_a = vars_item_a->get_next()) {
+ Ref<DynamicFontImportSettingsData> import_variation_data_a = vars_item_a->get_metadata(0);
+ ERR_FAIL_NULL(import_variation_data_a);
+
+ for (TreeItem *vars_item_b = vars_list_root->get_first_child(); vars_item_b; vars_item_b = vars_item_b->get_next()) {
+ if (vars_item_b != vars_item_a) {
+ bool match = true;
+ for (Map<StringName, Variant>::Element *E = import_variation_data_a->settings.front(); E; E = E->next()) {
+ Ref<DynamicFontImportSettingsData> import_variation_data_b = vars_item_b->get_metadata(0);
+ ERR_FAIL_NULL(import_variation_data_b);
+ match = match && (import_variation_data_b->settings[E->key()] == E->get());
+ }
+ if (match) {
+ warn = TTR("Warinig: Multiple configurations have identical settings. Duplicates will be ignored.");
+ break;
+ }
+ }
+ }
+ }
+ if (warn.is_empty()) {
+ label_warn->set_text("");
+ label_warn->hide();
+ } else {
+ label_warn->set_text(warn);
+ label_warn->show();
+ }
+}
+
+/*************************************************************************/
+/* Page 3 callbacks: Text to select glyphs */
+/*************************************************************************/
+
+void DynamicFontImportSettings::_change_text_opts() {
+ Vector<String> ftr = ftr_edit->get_text().split(",");
+ for (int i = 0; i < ftr.size(); i++) {
+ Vector<String> tokens = ftr[i].split("=");
+ if (tokens.size() == 2) {
+ text_edit->set_opentype_feature(tokens[0], tokens[1].to_int());
+ } else if (tokens.size() == 1) {
+ text_edit->set_opentype_feature(tokens[0], 1);
+ }
+ }
+ text_edit->set_language(lang_edit->get_text());
+}
+
+void DynamicFontImportSettings::_glyph_clear() {
+ selected_glyphs.clear();
+ label_glyphs->set_text(TTR("Preloaded glyphs: ") + itos(selected_glyphs.size()));
+ _range_selected();
+}
+
+void DynamicFontImportSettings::_glyph_text_selected() {
+ Dictionary ftrs;
+ Vector<String> ftr = ftr_edit->get_text().split(",");
+ for (int i = 0; i < ftr.size(); i++) {
+ Vector<String> tokens = ftr[i].split("=");
+ if (tokens.size() == 2) {
+ ftrs[tokens[0]] = tokens[1].to_int();
+ } else if (tokens.size() == 1) {
+ ftrs[tokens[0]] = 1;
+ }
+ }
+
+ RID text_rid = TS->create_shaped_text();
+ if (text_rid.is_valid()) {
+ TS->shaped_text_add_string(text_rid, text_edit->get_text(), font_main->get_rids(), 16, ftrs, text_edit->get_language());
+ TS->shaped_text_shape(text_rid);
+ const Vector<TextServer::Glyph> &gl = TS->shaped_text_get_glyphs(text_rid);
+
+ for (int i = 0; i < gl.size(); i++) {
+ if (gl[i].font_rid.is_valid() && gl[i].index != 0) {
+ selected_glyphs.insert(gl[i].index);
+ }
+ }
+ TS->free(text_rid);
+ label_glyphs->set_text(TTR("Preloaded glyphs: ") + itos(selected_glyphs.size()));
+ }
+ _range_selected();
+}
+
+/*************************************************************************/
+/* Page 4 callbacks: Character map */
+/*************************************************************************/
+
+void DynamicFontImportSettings::_glyph_selected() {
+ TreeItem *item = glyph_table->get_selected();
+ ERR_FAIL_NULL(item);
+
+ Color scol = glyph_table->get_theme_color("box_selection_fill_color", "Editor");
+ Color fcol = glyph_table->get_theme_color("font_selected_color", "Editor");
+ scol.a = 1.f;
+
+ int32_t c = item->get_metadata(glyph_table->get_selected_column());
+ if (font_main->has_char(c)) {
+ if (_char_update(c)) {
+ item->set_custom_color(glyph_table->get_selected_column(), fcol);
+ item->set_custom_bg_color(glyph_table->get_selected_column(), scol);
+ } else {
+ item->clear_custom_color(glyph_table->get_selected_column());
+ item->clear_custom_bg_color(glyph_table->get_selected_column());
+ }
+ }
+ label_glyphs->set_text(TTR("Preloaded glyphs: ") + itos(selected_glyphs.size()));
+}
+
+void DynamicFontImportSettings::_range_edited() {
+ TreeItem *item = glyph_tree->get_selected();
+ ERR_FAIL_NULL(item);
+ Vector2i range = item->get_metadata(0);
+ _range_update(range.x, range.y);
+}
+
+void DynamicFontImportSettings::_range_selected() {
+ TreeItem *item = glyph_tree->get_selected();
+ if (item) {
+ Vector2i range = item->get_metadata(0);
+ _edit_range(range.x, range.y);
+ }
+}
+
+void DynamicFontImportSettings::_edit_range(int32_t p_start, int32_t p_end) {
+ glyph_table->clear();
+
+ TreeItem *root = glyph_table->create_item();
+ ERR_FAIL_NULL(root);
+
+ Color scol = glyph_table->get_theme_color("box_selection_fill_color", "Editor");
+ Color fcol = glyph_table->get_theme_color("font_selected_color", "Editor");
+ scol.a = 1.f;
+
+ TreeItem *item = nullptr;
+ int col = 0;
+
+ for (int32_t c = p_start; c <= p_end; c++) {
+ if (col == 0) {
+ item = glyph_table->create_item(root);
+ ERR_FAIL_NULL(item);
+ item->set_text(0, _pad_zeros(String::num_int64(c, 16)));
+ item->set_text_align(0, TreeItem::ALIGN_LEFT);
+ item->set_selectable(0, false);
+ item->set_custom_bg_color(0, glyph_table->get_theme_color("dark_color_3", "Editor"));
+ }
+ if (font_main->has_char(c)) {
+ item->set_text(col + 1, String::chr(c));
+ item->set_custom_color(col + 1, Color(1, 1, 1));
+ if (selected_chars.has(c) || (font_main->get_data(0).is_valid() && selected_glyphs.has(font_main->get_data(0)->get_glyph_index(get_theme_font_size("font_size") * 2, c)))) {
+ item->set_custom_color(col + 1, fcol);
+ item->set_custom_bg_color(col + 1, scol);
+ } else {
+ item->clear_custom_color(col + 1);
+ item->clear_custom_bg_color(col + 1);
+ }
+ } else {
+ item->set_custom_bg_color(col + 1, glyph_table->get_theme_color("dark_color_2", "Editor"));
+ }
+ item->set_metadata(col + 1, c);
+ item->set_text_align(col + 1, TreeItem::ALIGN_CENTER);
+ item->set_selectable(col + 1, true);
+ item->set_custom_font(col + 1, font_main);
+ item->set_custom_font_size(col + 1, get_theme_font_size("font_size") * 2);
+
+ col++;
+ if (col == 16) {
+ col = 0;
+ }
+ }
+ label_glyphs->set_text(TTR("Preloaded glyphs: ") + itos(selected_glyphs.size()));
+}
+
+bool DynamicFontImportSettings::_char_update(int32_t p_char) {
+ if (selected_chars.has(p_char)) {
+ selected_chars.erase(p_char);
+ return false;
+ } else if (font_main->get_data(0).is_valid() && selected_glyphs.has(font_main->get_data(0)->get_glyph_index(get_theme_font_size("font_size") * 2, p_char))) {
+ selected_glyphs.erase(font_main->get_data(0)->get_glyph_index(get_theme_font_size("font_size") * 2, p_char));
+ return false;
+ } else {
+ selected_chars.insert(p_char);
+ return true;
+ }
+ label_glyphs->set_text(TTR("Preloaded glyphs: ") + itos(selected_glyphs.size()));
+}
+
+void DynamicFontImportSettings::_range_update(int32_t p_start, int32_t p_end) {
+ bool all_selected = true;
+ for (int32_t i = p_start; i <= p_end; i++) {
+ if (font_main->has_char(i)) {
+ if (font_main->get_data(0).is_valid()) {
+ all_selected = all_selected && (selected_chars.has(i) || (font_main->get_data(0).is_valid() && selected_glyphs.has(font_main->get_data(0)->get_glyph_index(get_theme_font_size("font_size") * 2, i))));
+ } else {
+ all_selected = all_selected && selected_chars.has(i);
+ }
+ }
+ }
+ for (int32_t i = p_start; i <= p_end; i++) {
+ if (font_main->has_char(i)) {
+ if (!all_selected) {
+ selected_chars.insert(i);
+ } else {
+ selected_chars.erase(i);
+ if (font_main->get_data(0).is_valid()) {
+ selected_glyphs.erase(font_main->get_data(0)->get_glyph_index(get_theme_font_size("font_size") * 2, i));
+ }
+ }
+ }
+ }
+ _edit_range(p_start, p_end);
+}
+
+/*************************************************************************/
+/* Page 5 callbacks: CMetadata override */
+/*************************************************************************/
+
+void DynamicFontImportSettings::_lang_add() {
+ menu_langs->set_position(lang_list->get_screen_transform().xform(lang_list->get_local_mouse_position()));
+ menu_langs->set_size(Vector2(1, 1));
+ menu_langs->popup();
+}
+
+void DynamicFontImportSettings::_lang_add_item(int p_option) {
+ TreeItem *lang_item = lang_list->create_item(lang_list_root);
+ ERR_FAIL_NULL(lang_item);
+
+ lang_item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ lang_item->set_editable(0, true);
+ lang_item->set_checked(0, false);
+ lang_item->set_text(1, langs[p_option].code);
+ lang_item->set_editable(1, true);
+ lang_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove"));
+ lang_item->set_button_color(2, 0, Color(1, 1, 1, 0.75));
+}
+
+void DynamicFontImportSettings::_lang_remove(Object *p_item, int p_column, int p_id) {
+ TreeItem *lang_item = (TreeItem *)p_item;
+ ERR_FAIL_NULL(lang_item);
+
+ lang_list_root->remove_child(lang_item);
+ memdelete(lang_item);
+}
+
+void DynamicFontImportSettings::_script_add() {
+ menu_scripts->set_position(script_list->get_screen_transform().xform(script_list->get_local_mouse_position()));
+ menu_scripts->set_size(Vector2(1, 1));
+ menu_scripts->popup();
+}
+
+void DynamicFontImportSettings::_script_add_item(int p_option) {
+ TreeItem *script_item = script_list->create_item(script_list_root);
+ ERR_FAIL_NULL(script_item);
+
+ script_item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ script_item->set_editable(0, true);
+ script_item->set_checked(0, false);
+ script_item->set_text(1, scripts[p_option].code);
+ script_item->set_editable(1, true);
+ script_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove"));
+ script_item->set_button_color(2, 0, Color(1, 1, 1, 0.75));
+}
+
+void DynamicFontImportSettings::_script_remove(Object *p_item, int p_column, int p_id) {
+ TreeItem *script_item = (TreeItem *)p_item;
+ ERR_FAIL_NULL(script_item);
+
+ script_list_root->remove_child(script_item);
+ memdelete(script_item);
+}
+
+/*************************************************************************/
+/* Common */
+/*************************************************************************/
+
+DynamicFontImportSettings *DynamicFontImportSettings::singleton = nullptr;
+
+String DynamicFontImportSettings::_pad_zeros(const String &p_hex) const {
+ int len = CLAMP(5 - p_hex.length(), 0, 5);
+ return String("0").repeat(len) + p_hex;
+}
+
+void DynamicFontImportSettings::_notification(int p_what) {
+ if (p_what == NOTIFICATION_READY) {
+ connect("confirmed", callable_mp(this, &DynamicFontImportSettings::_re_import));
+ } else if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
+ add_lang->set_icon(add_var->get_theme_icon("Add", "EditorIcons"));
+ add_script->set_icon(add_var->get_theme_icon("Add", "EditorIcons"));
+ add_var->set_icon(add_var->get_theme_icon("Add", "EditorIcons"));
+ }
+}
+
+void DynamicFontImportSettings::_re_import() {
+ Map<StringName, Variant> main_settings;
+
+ main_settings["antialiased"] = import_settings_data->get("antialiased");
+ main_settings["multichannel_signed_distance_field"] = import_settings_data->get("multichannel_signed_distance_field");
+ main_settings["msdf_pixel_range"] = import_settings_data->get("msdf_pixel_range");
+ main_settings["msdf_size"] = import_settings_data->get("msdf_size");
+ main_settings["force_autohinter"] = import_settings_data->get("force_autohinter");
+ main_settings["hinting"] = import_settings_data->get("hinting");
+ main_settings["oversampling"] = import_settings_data->get("oversampling");
+ main_settings["compress"] = import_settings_data->get("compress");
+
+ Vector<String> variations;
+ for (TreeItem *vars_item = vars_list_root->get_first_child(); vars_item; vars_item = vars_item->get_next()) {
+ String variation;
+ Ref<DynamicFontImportSettingsData> import_variation_data = vars_item->get_metadata(0);
+ ERR_FAIL_NULL(import_variation_data);
+
+ String name = vars_item->get_text(0);
+ variation += ("name=" + name);
+ for (Map<StringName, Variant>::Element *E = import_variation_data->settings.front(); E; E = E->next()) {
+ if (!variation.is_empty()) {
+ variation += ",";
+ }
+ variation += (String(E->key()) + "=" + String(E->get()));
+ }
+ variations.push_back(variation);
+ }
+ main_settings["preload/configurations"] = variations;
+
+ Vector<String> langs_enabled;
+ Vector<String> langs_disabled;
+ for (TreeItem *lang_item = lang_list_root->get_first_child(); lang_item; lang_item = lang_item->get_next()) {
+ bool selected = lang_item->is_checked(0);
+ String name = lang_item->get_text(1);
+ if (selected) {
+ langs_enabled.push_back(name);
+ } else {
+ langs_disabled.push_back(name);
+ }
+ }
+ main_settings["support_overrides/language_enabled"] = langs_enabled;
+ main_settings["support_overrides/language_disabled"] = langs_disabled;
+
+ Vector<String> scripts_enabled;
+ Vector<String> scripts_disabled;
+ for (TreeItem *script_item = script_list_root->get_first_child(); script_item; script_item = script_item->get_next()) {
+ bool selected = script_item->is_checked(0);
+ String name = script_item->get_text(1);
+ if (selected) {
+ scripts_enabled.push_back(name);
+ } else {
+ scripts_disabled.push_back(name);
+ }
+ }
+ main_settings["support_overrides/script_enabled"] = scripts_enabled;
+ main_settings["support_overrides/script_disabled"] = scripts_disabled;
+
+ if (!selected_chars.is_empty()) {
+ Vector<String> ranges;
+ char32_t start = selected_chars.front()->get();
+ for (Set<char32_t>::Element *E = selected_chars.front()->next(); E; E = E->next()) {
+ if (E->prev() && ((E->prev()->get() + 1) != E->get())) {
+ ranges.push_back(String("0x") + String::num_int64(start, 16) + String("-0x") + String::num_int64(E->prev()->get(), 16));
+ start = E->get();
+ }
+ }
+ ranges.push_back(String("0x") + String::num_int64(start, 16) + String("-0x") + String::num_int64(selected_chars.back()->get(), 16));
+ main_settings["preload/char_ranges"] = ranges;
+ }
+
+ if (!selected_glyphs.is_empty()) {
+ Vector<String> ranges;
+ int32_t start = selected_glyphs.front()->get();
+ for (Set<int32_t>::Element *E = selected_glyphs.front()->next(); E; E = E->next()) {
+ if (E->prev() && ((E->prev()->get() + 1) != E->get())) {
+ ranges.push_back(String("0x") + String::num_int64(start, 16) + String("-0x") + String::num_int64(E->prev()->get(), 16));
+ start = E->get();
+ }
+ }
+ ranges.push_back(String("0x") + String::num_int64(start, 16) + String("-0x") + String::num_int64(selected_glyphs.back()->get(), 16));
+ main_settings["preload/glyph_ranges"] = ranges;
+ }
+
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ print_line("Import settings:");
+ for (Map<StringName, Variant>::Element *E = main_settings.front(); E; E = E->next()) {
+ print_line(String(" ") + String(E->key()).utf8().get_data() + " == " + String(E->get()).utf8().get_data());
+ }
+ }
+
+ EditorFileSystem::get_singleton()->reimport_file_with_custom_parameters(base_path, "font_data_dynamic", main_settings);
+}
+
+void DynamicFontImportSettings::open_settings(const String &p_path) {
+ // Load base font data.
+ Vector<uint8_t> data = FileAccess::get_file_as_array(p_path);
+
+ // Load font for preview.
+ Ref<FontData> dfont_prev;
+ dfont_prev.instantiate();
+ dfont_prev->set_data(data);
+
+ font_preview.instantiate();
+ font_preview->add_data(dfont_prev);
+
+ String sample;
+ static const String sample_base = U"12漢字ԱբΑαÐбΑα×בابÜÜ’Þ€Þआআਆઆଆஆఆಆആආà¸à¸´àºàº´à¼€á€€á‚ áƒí•œê¸€áˆ€áŽ£áášáš áœ€áœ á€á áž€á  á¤á¥Ab😀";
+ for (int i = 0; i < sample_base.length(); i++) {
+ if (dfont_prev->has_char(sample_base[i])) {
+ sample += sample_base[i];
+ }
+ }
+ if (sample.is_empty()) {
+ sample = dfont_prev->get_supported_chars().substr(0, 6);
+ }
+ font_preview_label->set_text(sample);
+
+ // Load second copy of font with MSDF disabled for the glyph table and metadata extraction.
+ Ref<FontData> dfont_main;
+ dfont_main.instantiate();
+ dfont_main->set_data(data);
+ dfont_main->set_multichannel_signed_distance_field(false);
+
+ font_main.instantiate();
+ font_main->add_data(dfont_main);
+ text_edit->add_theme_font_override("font", font_main);
+
+ base_path = p_path;
+
+ inspector_vars->edit(nullptr);
+ inspector_general->edit(nullptr);
+
+ int gww = get_theme_font("font")->get_string_size("00000", get_theme_font_size("font_size")).x + 50;
+ glyph_table->set_column_custom_minimum_width(0, gww);
+
+ glyph_table->clear();
+ vars_list->clear();
+ lang_list->clear();
+ script_list->clear();
+
+ selected_chars.clear();
+ selected_glyphs.clear();
+ text_edit->set_text(String());
+
+ vars_list_root = vars_list->create_item();
+ lang_list_root = lang_list->create_item();
+ script_list_root = script_list->create_item();
+
+ options_variations.clear();
+ Dictionary var_list = dfont_main->get_supported_variation_list();
+ for (int i = 0; i < var_list.size(); i++) {
+ int32_t tag = var_list.get_key_at_index(i);
+ Vector3i value = var_list.get_value_at_index(i);
+ options_variations.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::FLOAT, TS->tag_to_name(tag), PROPERTY_HINT_RANGE, itos(value.x) + "," + itos(value.y) + ",1"), value.z));
+ }
+ options_variations.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "size", PROPERTY_HINT_RANGE, "0,127,1"), 16));
+ options_variations.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "outline_size", PROPERTY_HINT_RANGE, "0,127,1"), 0));
+ options_variations.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "extra_spacing_glyph"), 0));
+ options_variations.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "extra_spacing_space"), 0));
+
+ import_settings_data->defaults.clear();
+ for (List<ResourceImporter::ImportOption>::Element *E = options_general.front(); E; E = E->next()) {
+ import_settings_data->defaults[E->get().option.name] = E->get().default_value;
+ }
+
+ Ref<ConfigFile> config;
+ config.instantiate();
+ ERR_FAIL_NULL(config);
+
+ Error err = config->load(p_path + ".import");
+ print_verbose("Loading import settings:");
+ if (err == OK) {
+ List<String> keys;
+ config->get_section_keys("params", &keys);
+ for (List<String>::Element *E = keys.front(); E; E = E->next()) {
+ String key = E->get();
+ print_verbose(String(" ") + key + " == " + String(config->get_value("params", key)));
+ if (key == "preload/char_ranges") {
+ Vector<String> ranges = config->get_value("params", key);
+ for (int i = 0; i < ranges.size(); i++) {
+ int32_t start, end;
+ Vector<String> tokens = ranges[i].split("-");
+ if (tokens.size() == 2) {
+ if (!ResourceImporterDynamicFont::_decode_range(tokens[0], start) || !ResourceImporterDynamicFont::_decode_range(tokens[1], end)) {
+ WARN_PRINT("Invalid range: \"" + ranges[i] + "\"");
+ continue;
+ }
+ } else if (tokens.size() == 1) {
+ if (!ResourceImporterDynamicFont::_decode_range(tokens[0], start)) {
+ WARN_PRINT("Invalid range: \"" + ranges[i] + "\"");
+ continue;
+ }
+ end = start;
+ } else {
+ WARN_PRINT("Invalid range: \"" + ranges[i] + "\"");
+ continue;
+ }
+ for (int32_t j = start; j <= end; j++) {
+ selected_chars.insert(j);
+ }
+ }
+ } else if (key == "preload/glyph_ranges") {
+ Vector<String> ranges = config->get_value("params", key);
+ for (int i = 0; i < ranges.size(); i++) {
+ int32_t start, end;
+ Vector<String> tokens = ranges[i].split("-");
+ if (tokens.size() == 2) {
+ if (!ResourceImporterDynamicFont::_decode_range(tokens[0], start) || !ResourceImporterDynamicFont::_decode_range(tokens[1], end)) {
+ WARN_PRINT("Invalid range: \"" + ranges[i] + "\"");
+ continue;
+ }
+ } else if (tokens.size() == 1) {
+ if (!ResourceImporterDynamicFont::_decode_range(tokens[0], start)) {
+ WARN_PRINT("Invalid range: \"" + ranges[i] + "\"");
+ continue;
+ }
+ end = start;
+ } else {
+ WARN_PRINT("Invalid range: \"" + ranges[i] + "\"");
+ continue;
+ }
+ for (int32_t j = start; j <= end; j++) {
+ selected_glyphs.insert(j);
+ }
+ }
+ } else if (key == "preload/configurations") {
+ Vector<String> variations = config->get_value("params", key);
+ for (int i = 0; i < variations.size(); i++) {
+ TreeItem *vars_item = vars_list->create_item(vars_list_root);
+ ERR_FAIL_NULL(vars_item);
+
+ vars_item->set_text(0, TTR("Configuration") + " " + itos(i));
+ vars_item->set_editable(0, true);
+ vars_item->add_button(1, vars_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove Variation"));
+ vars_item->set_button_color(1, 0, Color(1, 1, 1, 0.75));
+
+ Ref<DynamicFontImportSettingsData> import_variation_data_custom;
+ import_variation_data_custom.instantiate();
+ import_variation_data_custom->owner = this;
+ ERR_FAIL_NULL(import_variation_data_custom);
+
+ for (List<ResourceImporter::ImportOption>::Element *F = options_variations.front(); F; F = F->next()) {
+ import_variation_data_custom->defaults[F->get().option.name] = F->get().default_value;
+ }
+
+ import_variation_data_custom->options = options_variations;
+
+ vars_item->set_metadata(0, import_variation_data_custom);
+ Vector<String> variation_tags = variations[i].split(",");
+ for (int j = 0; j < variation_tags.size(); j++) {
+ Vector<String> tokens = variation_tags[j].split("=");
+ if (tokens[0] == "name") {
+ vars_item->set_text(0, tokens[1]);
+ } else if (tokens[0] == "size" || tokens[0] == "outline_size" || tokens[0] == "extra_spacing_space" || tokens[0] == "extra_spacing_glyph") {
+ import_variation_data_custom->set(tokens[0], tokens[1].to_int());
+ } else {
+ import_variation_data_custom->set(tokens[0], tokens[1].to_float());
+ }
+ }
+ }
+ } else if (key == "support_overrides/language_enabled") {
+ PackedStringArray _langs = config->get_value("params", key);
+ for (int i = 0; i < _langs.size(); i++) {
+ TreeItem *lang_item = lang_list->create_item(lang_list_root);
+ ERR_FAIL_NULL(lang_item);
+
+ lang_item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ lang_item->set_editable(0, true);
+ lang_item->set_checked(0, true);
+ lang_item->set_text(1, _langs[i]);
+ lang_item->set_editable(1, true);
+ lang_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove"));
+ }
+ } else if (key == "support_overrides/language_disabled") {
+ PackedStringArray _langs = config->get_value("params", key);
+ for (int i = 0; i < _langs.size(); i++) {
+ TreeItem *lang_item = lang_list->create_item(lang_list_root);
+ ERR_FAIL_NULL(lang_item);
+
+ lang_item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ lang_item->set_editable(0, true);
+ lang_item->set_checked(0, false);
+ lang_item->set_text(1, _langs[i]);
+ lang_item->set_editable(1, true);
+ lang_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove"));
+ }
+ } else if (key == "support_overrides/script_enabled") {
+ PackedStringArray _scripts = config->get_value("params", key);
+ for (int i = 0; i < _scripts.size(); i++) {
+ TreeItem *script_item = script_list->create_item(script_list_root);
+ ERR_FAIL_NULL(script_item);
+
+ script_item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ script_item->set_editable(0, true);
+ script_item->set_checked(0, true);
+ script_item->set_text(1, _scripts[i]);
+ script_item->set_editable(1, true);
+ script_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove"));
+ }
+ } else if (key == "support_overrides/script_disabled") {
+ PackedStringArray _scripts = config->get_value("params", key);
+ for (int i = 0; i < _scripts.size(); i++) {
+ TreeItem *script_item = script_list->create_item(script_list_root);
+ ERR_FAIL_NULL(script_item);
+
+ script_item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ script_item->set_editable(0, true);
+ script_item->set_checked(0, false);
+ script_item->set_text(1, _scripts[i]);
+ script_item->set_editable(1, true);
+ script_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove"));
+ }
+ } else {
+ Variant value = config->get_value("params", key);
+ import_settings_data->defaults[key] = value;
+ }
+ }
+ }
+ label_glyphs->set_text(TTR("Preloaded glyphs: ") + itos(selected_glyphs.size()));
+
+ import_settings_data->options = options_general;
+ inspector_general->edit(import_settings_data.ptr());
+ import_settings_data->notify_property_list_changed();
+
+ if (font_preview->get_data_count() > 0) {
+ font_preview->get_data(0)->set_antialiased(import_settings_data->get("antialiased"));
+ font_preview->get_data(0)->set_multichannel_signed_distance_field(import_settings_data->get("multichannel_signed_distance_field"));
+ font_preview->get_data(0)->set_msdf_pixel_range(import_settings_data->get("msdf_pixel_range"));
+ font_preview->get_data(0)->set_msdf_size(import_settings_data->get("msdf_size"));
+ font_preview->get_data(0)->set_force_autohinter(import_settings_data->get("force_autohinter"));
+ font_preview->get_data(0)->set_hinting((TextServer::Hinting)import_settings_data->get("hinting").operator int());
+ font_preview->get_data(0)->set_oversampling(import_settings_data->get("oversampling"));
+ }
+ font_preview_label->add_theme_font_override("font", font_preview);
+ font_preview_label->update();
+
+ _variations_validate();
+
+ popup_centered_ratio();
+
+ set_title(vformat(TTR("Advanced Import Settings for '%s'"), base_path.get_file()));
+}
+
+DynamicFontImportSettings *DynamicFontImportSettings::get_singleton() {
+ return singleton;
+}
+
+DynamicFontImportSettings::DynamicFontImportSettings() {
+ singleton = this;
+
+ options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "antialiased"), true));
+ options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "multichannel_signed_distance_field", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), true));
+ options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "msdf_pixel_range", PROPERTY_HINT_RANGE, "1,100,1"), 8));
+ options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "msdf_size", PROPERTY_HINT_RANGE, "1,250,1"), 48));
+ options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "force_autohinter"), false));
+ options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::INT, "hinting", PROPERTY_HINT_ENUM, "None,Light,Normal"), 1));
+ options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::FLOAT, "oversampling", PROPERTY_HINT_RANGE, "0,10,0.1"), 0.0));
+ options_general.push_back(ResourceImporter::ImportOption(PropertyInfo(Variant::BOOL, "compress", PROPERTY_HINT_NONE, ""), false));
+
+ // Popup menus
+
+ menu_langs = memnew(PopupMenu);
+ menu_langs->set_name("Language");
+ for (int i = 0; langs[i].name != String(); i++) {
+ if (langs[i].name == "-") {
+ menu_langs->add_separator();
+ } else {
+ menu_langs->add_item(langs[i].name + " (" + langs[i].code + ")", i);
+ }
+ }
+ add_child(menu_langs);
+ menu_langs->connect("id_pressed", callable_mp(this, &DynamicFontImportSettings::_lang_add_item));
+
+ menu_scripts = memnew(PopupMenu);
+ menu_scripts->set_name("Script");
+ for (int i = 0; scripts[i].name != String(); i++) {
+ if (scripts[i].name == "-") {
+ menu_scripts->add_separator();
+ } else {
+ menu_scripts->add_item(scripts[i].name + " (" + scripts[i].code + ")", i);
+ }
+ }
+ add_child(menu_scripts);
+ menu_scripts->connect("id_pressed", callable_mp(this, &DynamicFontImportSettings::_script_add_item));
+
+ Color warn_color = (EditorNode::get_singleton()) ? EditorNode::get_singleton()->get_gui_base()->get_theme_color("warning_color", "Editor") : Color(1, 1, 0);
+
+ // Root layout
+
+ VBoxContainer *root_vb = memnew(VBoxContainer);
+ add_child(root_vb);
+
+ main_pages = memnew(TabContainer);
+ main_pages->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ main_pages->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ root_vb->add_child(main_pages);
+
+ label_warn = memnew(Label);
+ label_warn->set_align(Label::ALIGN_CENTER);
+ label_warn->set_text("");
+ root_vb->add_child(label_warn);
+ label_warn->add_theme_color_override("font_color", warn_color);
+ label_warn->hide();
+
+ // Page 1 layout: Rendering Options
+
+ VBoxContainer *page1_vb = memnew(VBoxContainer);
+ page1_vb->set_meta("_tab_name", TTR("Rendering options"));
+ main_pages->add_child(page1_vb);
+
+ page1_description = memnew(Label);
+ page1_description->set_text(TTR("Select font rendering options:"));
+ page1_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ page1_vb->add_child(page1_description);
+
+ HSplitContainer *page1_hb = memnew(HSplitContainer);
+ page1_hb->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ page1_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ page1_vb->add_child(page1_hb);
+
+ font_preview_label = memnew(Label);
+ font_preview_label->add_theme_font_size_override("font_size", 200 * EDSCALE);
+ font_preview_label->set_align(Label::ALIGN_CENTER);
+ font_preview_label->set_valign(Label::VALIGN_CENTER);
+ font_preview_label->set_autowrap_mode(Label::AUTOWRAP_ARBITRARY);
+ font_preview_label->set_clip_text(true);
+ font_preview_label->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ font_preview_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ page1_hb->add_child(font_preview_label);
+
+ inspector_general = memnew(EditorInspector);
+ inspector_general->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ inspector_general->set_custom_minimum_size(Size2(300 * EDSCALE, 250 * EDSCALE));
+ inspector_general->connect("property_edited", callable_mp(this, &DynamicFontImportSettings::_main_prop_changed));
+ page1_hb->add_child(inspector_general);
+
+ // Page 2 layout: Configurations
+ VBoxContainer *page2_vb = memnew(VBoxContainer);
+ page2_vb->set_meta("_tab_name", TTR("Sizes and variations"));
+ main_pages->add_child(page2_vb);
+
+ page2_description = memnew(Label);
+ page2_description->set_text(TTR("Add font size, variation coordinates, and extra spacing combinations to pre-render:"));
+ page2_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ page2_description->set_autowrap_mode(Label::AUTOWRAP_WORD_SMART);
+ page2_vb->add_child(page2_description);
+
+ HSplitContainer *page2_hb = memnew(HSplitContainer);
+ page2_hb->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ page2_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ page2_vb->add_child(page2_hb);
+
+ VBoxContainer *page2_side_vb = memnew(VBoxContainer);
+ page2_hb->add_child(page2_side_vb);
+
+ HBoxContainer *page2_hb_vars = memnew(HBoxContainer);
+ page2_side_vb->add_child(page2_hb_vars);
+
+ label_vars = memnew(Label);
+ page2_hb_vars->add_child(label_vars);
+ label_vars->set_align(Label::ALIGN_CENTER);
+ label_vars->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ label_vars->set_text(TTR("Configuration:"));
+
+ add_var = memnew(Button);
+ page2_hb_vars->add_child(add_var);
+ add_var->set_tooltip(TTR("Add configuration"));
+ add_var->set_icon(add_var->get_theme_icon("Add", "EditorIcons"));
+ add_var->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_variation_add));
+
+ vars_list = memnew(Tree);
+ page2_side_vb->add_child(vars_list);
+ vars_list->set_custom_minimum_size(Size2(300 * EDSCALE, 0));
+ vars_list->set_hide_root(true);
+ vars_list->set_columns(2);
+ vars_list->set_column_expand(0, true);
+ vars_list->set_column_custom_minimum_width(0, 80 * EDSCALE);
+ vars_list->set_column_expand(1, false);
+ vars_list->set_column_custom_minimum_width(1, 50 * EDSCALE);
+ vars_list->connect("item_selected", callable_mp(this, &DynamicFontImportSettings::_variation_selected));
+ vars_list->connect("button_pressed", callable_mp(this, &DynamicFontImportSettings::_variation_remove));
+ vars_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+
+ inspector_vars = memnew(EditorInspector);
+ inspector_vars->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ inspector_vars->connect("property_edited", callable_mp(this, &DynamicFontImportSettings::_variation_changed));
+ page2_hb->add_child(inspector_vars);
+
+ // Page 3 layout: Text to select glyphs
+ VBoxContainer *page3_vb = memnew(VBoxContainer);
+ page3_vb->set_meta("_tab_name", TTR("Glyphs from the text"));
+ main_pages->add_child(page3_vb);
+
+ page3_description = memnew(Label);
+ page3_description->set_text(TTR("Enter a text to shape and add all required glyphs to pre-render list:"));
+ page3_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ page3_description->set_autowrap_mode(Label::AUTOWRAP_WORD_SMART);
+ page3_vb->add_child(page3_description);
+
+ HBoxContainer *ot_hb = memnew(HBoxContainer);
+ page3_vb->add_child(ot_hb);
+ ot_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+
+ Label *label_ed_ftr = memnew(Label);
+ ot_hb->add_child(label_ed_ftr);
+ label_ed_ftr->set_text(TTR("OpenType features:"));
+
+ ftr_edit = memnew(LineEdit);
+ ot_hb->add_child(ftr_edit);
+ ftr_edit->connect("text_changed", callable_mp(this, &DynamicFontImportSettings::_change_text_opts));
+ ftr_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+
+ Label *label_ed_lang = memnew(Label);
+ ot_hb->add_child(label_ed_lang);
+ label_ed_lang->set_text(TTR("Text language:"));
+
+ lang_edit = memnew(LineEdit);
+ ot_hb->add_child(lang_edit);
+ lang_edit->connect("text_changed", callable_mp(this, &DynamicFontImportSettings::_change_text_opts));
+ lang_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+
+ text_edit = memnew(TextEdit);
+ page3_vb->add_child(text_edit);
+ text_edit->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ text_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+
+ HBoxContainer *text_hb = memnew(HBoxContainer);
+ page3_vb->add_child(text_hb);
+ text_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+
+ label_glyphs = memnew(Label);
+ text_hb->add_child(label_glyphs);
+ label_glyphs->set_text(TTR("Preloaded glyphs: ") + itos(0));
+ label_glyphs->set_custom_minimum_size(Size2(50 * EDSCALE, 0));
+
+ Button *btn_fill = memnew(Button);
+ text_hb->add_child(btn_fill);
+ btn_fill->set_text(TTR("Shape text and add glyphs"));
+ btn_fill->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_glyph_text_selected));
+
+ Button *btn_clear = memnew(Button);
+ text_hb->add_child(btn_clear);
+ btn_clear->set_text(TTR("Clear glyph list"));
+ btn_clear->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_glyph_clear));
+
+ // Page 4 layout: Character map
+ VBoxContainer *page4_vb = memnew(VBoxContainer);
+ page4_vb->set_meta("_tab_name", TTR("Glyphs from the character map"));
+ main_pages->add_child(page4_vb);
+
+ page4_description = memnew(Label);
+ page4_description->set_text(TTR("Add or remove additional glyphs from the character map to pre-render list:\nNote: Some stylistic alternatives and glyph variants do not have one-to-one correspondence to character, and not shown in this map, use \"Glyphs from the text\" to add these."));
+ page4_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ page4_description->set_autowrap_mode(Label::AUTOWRAP_WORD_SMART);
+ page4_vb->add_child(page4_description);
+
+ HSplitContainer *glyphs_split = memnew(HSplitContainer);
+ glyphs_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ glyphs_split->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ page4_vb->add_child(glyphs_split);
+
+ glyph_table = memnew(Tree);
+ glyphs_split->add_child(glyph_table);
+ glyph_table->set_custom_minimum_size(Size2((30 * 16 + 100) * EDSCALE, 0));
+ glyph_table->set_columns(17);
+ glyph_table->set_column_expand(0, false);
+ glyph_table->set_hide_root(true);
+ glyph_table->set_allow_reselect(true);
+ glyph_table->set_select_mode(Tree::SELECT_SINGLE);
+ glyph_table->connect("item_activated", callable_mp(this, &DynamicFontImportSettings::_glyph_selected));
+ glyph_table->set_column_titles_visible(true);
+ for (int i = 0; i < 16; i++) {
+ glyph_table->set_column_title(i + 1, String::num_int64(i, 16));
+ }
+ glyph_table->add_theme_style_override("selected", glyph_table->get_theme_stylebox("bg"));
+ glyph_table->add_theme_style_override("selected_focus", glyph_table->get_theme_stylebox("bg"));
+ glyph_table->add_theme_constant_override("hseparation", 0);
+ glyph_table->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ glyph_table->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+
+ glyph_tree = memnew(Tree);
+ glyphs_split->add_child(glyph_tree);
+ glyph_tree->set_custom_minimum_size(Size2(300 * EDSCALE, 0));
+ glyph_tree->set_columns(2);
+ glyph_tree->set_hide_root(true);
+ glyph_tree->set_column_expand(0, false);
+ glyph_tree->set_column_expand(1, true);
+ glyph_tree->set_column_custom_minimum_width(0, 120 * EDSCALE);
+ glyph_tree->connect("item_activated", callable_mp(this, &DynamicFontImportSettings::_range_edited));
+ glyph_tree->connect("item_selected", callable_mp(this, &DynamicFontImportSettings::_range_selected));
+ glyph_tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ glyph_root = glyph_tree->create_item();
+ for (int i = 0; unicode_ranges[i].name != String(); i++) {
+ _add_glyph_range_item(unicode_ranges[i].start, unicode_ranges[i].end, unicode_ranges[i].name);
+ }
+
+ // Page 4 layout: Metadata override
+ VBoxContainer *page5_vb = memnew(VBoxContainer);
+ page5_vb->set_meta("_tab_name", TTR("Metadata override"));
+ main_pages->add_child(page5_vb);
+
+ page5_description = memnew(Label);
+ page5_description->set_text(TTR("Add or remove language and script support overrides, to control fallback font selection order:"));
+ page5_description->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ page5_description->set_autowrap_mode(Label::AUTOWRAP_WORD_SMART);
+ page5_vb->add_child(page5_description);
+
+ HBoxContainer *hb_lang = memnew(HBoxContainer);
+ page5_vb->add_child(hb_lang);
+
+ label_langs = memnew(Label);
+ label_langs->set_align(Label::ALIGN_CENTER);
+ label_langs->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ label_langs->set_text(TTR("Language support overrides"));
+ hb_lang->add_child(label_langs);
+
+ add_lang = memnew(Button);
+ hb_lang->add_child(add_lang);
+ add_lang->set_tooltip(TTR("Add language override"));
+ add_lang->set_icon(add_var->get_theme_icon("Add", "EditorIcons"));
+ add_lang->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_lang_add));
+
+ lang_list = memnew(Tree);
+ page5_vb->add_child(lang_list);
+ lang_list->set_hide_root(true);
+ lang_list->set_columns(3);
+ lang_list->set_column_expand(0, false); // Check
+ lang_list->set_column_custom_minimum_width(0, 50 * EDSCALE);
+ lang_list->set_column_expand(1, true);
+ lang_list->set_column_custom_minimum_width(1, 80 * EDSCALE);
+ lang_list->set_column_expand(2, false);
+ lang_list->set_column_custom_minimum_width(2, 50 * EDSCALE);
+ lang_list->connect("button_pressed", callable_mp(this, &DynamicFontImportSettings::_lang_remove));
+ lang_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+
+ HBoxContainer *hb_script = memnew(HBoxContainer);
+ page5_vb->add_child(hb_script);
+
+ label_script = memnew(Label);
+ label_script->set_align(Label::ALIGN_CENTER);
+ label_script->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ label_script->set_text(TTR("Script support overrides"));
+ hb_script->add_child(label_script);
+
+ add_script = memnew(Button);
+ hb_script->add_child(add_script);
+ add_script->set_tooltip(TTR("Add script override"));
+ add_script->set_icon(add_var->get_theme_icon("Add", "EditorIcons"));
+ add_script->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_script_add));
+
+ script_list = memnew(Tree);
+ page5_vb->add_child(script_list);
+ script_list->set_hide_root(true);
+ script_list->set_columns(3);
+ script_list->set_column_expand(0, false);
+ script_list->set_column_custom_minimum_width(0, 50 * EDSCALE);
+ script_list->set_column_expand(1, true);
+ script_list->set_column_custom_minimum_width(1, 80 * EDSCALE);
+ script_list->set_column_expand(2, false);
+ script_list->set_column_custom_minimum_width(2, 50 * EDSCALE);
+ script_list->connect("button_pressed", callable_mp(this, &DynamicFontImportSettings::_script_remove));
+ script_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+
+ // Common
+
+ import_settings_data.instantiate();
+ import_settings_data->owner = this;
+
+ get_ok_button()->set_text(TTR("Reimport"));
+ get_cancel_button()->set_text(TTR("Close"));
+}
diff --git a/editor/import/dynamicfont_import_settings.h b/editor/import/dynamicfont_import_settings.h
new file mode 100644
index 0000000000..05f5e8e00b
--- /dev/null
+++ b/editor/import/dynamicfont_import_settings.h
@@ -0,0 +1,167 @@
+/*************************************************************************/
+/* dynamicfont_import_settings.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef FONTDATA_IMPORT_SETTINGS_H
+#define FONTDATA_IMPORT_SETTINGS_H
+
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_inspector.h"
+
+#include "editor/import/resource_importer_dynamicfont.h"
+
+#include "scene/gui/dialogs.h"
+#include "scene/gui/item_list.h"
+#include "scene/gui/option_button.h"
+#include "scene/gui/split_container.h"
+#include "scene/gui/subviewport_container.h"
+#include "scene/gui/tab_container.h"
+#include "scene/gui/text_edit.h"
+#include "scene/gui/tree.h"
+
+#include "scene/resources/font.h"
+#include "servers/text_server.h"
+
+class DynamicFontImportSettingsData;
+
+class DynamicFontImportSettings : public ConfirmationDialog {
+ GDCLASS(DynamicFontImportSettings, ConfirmationDialog)
+ friend class DynamicFontImportSettingsData;
+
+ enum ItemButton {
+ BUTTON_ADD_VAR,
+ BUTTON_REMOVE_VAR,
+ };
+
+ static DynamicFontImportSettings *singleton;
+
+ String base_path;
+
+ Ref<DynamicFontImportSettingsData> import_settings_data;
+ List<ResourceImporter::ImportOption> options_variations;
+ List<ResourceImporter::ImportOption> options_general;
+
+ // Root layout
+ Label *label_warn = nullptr;
+ TabContainer *main_pages = nullptr;
+
+ // Page 1 layout: Rendering Options
+ Label *page1_description = nullptr;
+ Label *font_preview_label = nullptr;
+ EditorInspector *inspector_general = nullptr;
+
+ void _main_prop_changed(const String &p_edited_property);
+
+ // Page 2 layout: Configurations
+ Label *page2_description = nullptr;
+ Label *label_vars = nullptr;
+ Button *add_var = nullptr;
+ Tree *vars_list = nullptr;
+ TreeItem *vars_list_root = nullptr;
+ EditorInspector *inspector_vars = nullptr;
+
+ void _variation_add();
+ void _variation_selected();
+ void _variation_remove(Object *p_item, int p_column, int p_id);
+ void _variation_changed(const String &p_edited_property);
+ void _variations_validate();
+
+ // Page 3 layout: Text to select glyphs
+ Label *page3_description = nullptr;
+ Label *label_glyphs = nullptr;
+ TextEdit *text_edit = nullptr;
+ LineEdit *ftr_edit = nullptr;
+ LineEdit *lang_edit = nullptr;
+
+ void _change_text_opts();
+ void _glyph_text_selected();
+ void _glyph_clear();
+
+ // Page 4 layout: Character map
+ Label *page4_description = nullptr;
+ Tree *glyph_table = nullptr;
+ Tree *glyph_tree = nullptr;
+ TreeItem *glyph_root = nullptr;
+
+ void _glyph_selected();
+ void _range_edited();
+ void _range_selected();
+ void _edit_range(int32_t p_start, int32_t p_end);
+ bool _char_update(int32_t p_char);
+ void _range_update(int32_t p_start, int32_t p_end);
+
+ // Page 5 layout: Metadata override
+ Label *page5_description = nullptr;
+ Button *add_lang = nullptr;
+ Button *add_script = nullptr;
+
+ PopupMenu *menu_langs = nullptr;
+ PopupMenu *menu_scripts = nullptr;
+
+ Tree *lang_list = nullptr;
+ TreeItem *lang_list_root = nullptr;
+
+ Tree *script_list = nullptr;
+ TreeItem *script_list_root = nullptr;
+ Label *label_langs = nullptr;
+ Label *label_script = nullptr;
+
+ void _lang_add();
+ void _lang_add_item(int p_option);
+ void _lang_remove(Object *p_item, int p_column, int p_id);
+
+ void _script_add();
+ void _script_add_item(int p_option);
+ void _script_remove(Object *p_item, int p_column, int p_id);
+
+ // Common
+
+ void _add_glyph_range_item(int32_t p_start, int32_t p_end, const String &p_name);
+
+ Ref<Font> font_preview;
+ Ref<Font> font_main;
+
+ Set<char32_t> selected_chars;
+ Set<int32_t> selected_glyphs;
+
+ void _re_import();
+
+ String _pad_zeros(const String &p_hex) const;
+
+protected:
+ void _notification(int p_what);
+
+public:
+ void open_settings(const String &p_path);
+ static DynamicFontImportSettings *get_singleton();
+
+ DynamicFontImportSettings();
+};
+
+#endif // FONTDATA_IMPORT_SETTINGS_H
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index 54b93edcdd..7ab80ac3b4 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -504,61 +504,121 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<EditorSceneImpor
const Collada::MeshData::Source *normal_src = nullptr;
int normal_ofs = 0;
- if (p.sources.has("NORMAL")) {
- String normal_source_id = p.sources["NORMAL"].source;
- normal_ofs = p.sources["NORMAL"].offset;
- ERR_FAIL_COND_V(!meshdata.sources.has(normal_source_id), ERR_INVALID_DATA);
- normal_src = &meshdata.sources[normal_source_id];
+ {
+ String normal_source_id = "";
+
+ if (p.sources.has("NORMAL")) {
+ normal_source_id = p.sources["NORMAL"].source;
+ normal_ofs = p.sources["NORMAL"].offset;
+ } else if (meshdata.vertices[vertex_src_id].sources.has("NORMAL")) {
+ normal_source_id = meshdata.vertices[vertex_src_id].sources["NORMAL"];
+ normal_ofs = vertex_ofs;
+ }
+
+ if (normal_source_id != "") {
+ ERR_FAIL_COND_V(!meshdata.sources.has(normal_source_id), ERR_INVALID_DATA);
+ normal_src = &meshdata.sources[normal_source_id];
+ }
}
const Collada::MeshData::Source *binormal_src = nullptr;
int binormal_ofs = 0;
- if (p.sources.has("TEXBINORMAL")) {
- String binormal_source_id = p.sources["TEXBINORMAL"].source;
- binormal_ofs = p.sources["TEXBINORMAL"].offset;
- ERR_FAIL_COND_V(!meshdata.sources.has(binormal_source_id), ERR_INVALID_DATA);
- binormal_src = &meshdata.sources[binormal_source_id];
+ {
+ String binormal_source_id = "";
+
+ if (p.sources.has("TEXBINORMAL")) {
+ binormal_source_id = p.sources["TEXBINORMAL"].source;
+ binormal_ofs = p.sources["TEXBINORMAL"].offset;
+ } else if (meshdata.vertices[vertex_src_id].sources.has("TEXBINORMAL")) {
+ binormal_source_id = meshdata.vertices[vertex_src_id].sources["TEXBINORMAL"];
+ binormal_ofs = vertex_ofs;
+ }
+
+ if (binormal_source_id != "") {
+ ERR_FAIL_COND_V(!meshdata.sources.has(binormal_source_id), ERR_INVALID_DATA);
+ binormal_src = &meshdata.sources[binormal_source_id];
+ }
}
const Collada::MeshData::Source *tangent_src = nullptr;
int tangent_ofs = 0;
- if (p.sources.has("TEXTANGENT")) {
- String tangent_source_id = p.sources["TEXTANGENT"].source;
- tangent_ofs = p.sources["TEXTANGENT"].offset;
- ERR_FAIL_COND_V(!meshdata.sources.has(tangent_source_id), ERR_INVALID_DATA);
- tangent_src = &meshdata.sources[tangent_source_id];
+ {
+ String tangent_source_id = "";
+
+ if (p.sources.has("TEXTANGENT")) {
+ tangent_source_id = p.sources["TEXTANGENT"].source;
+ tangent_ofs = p.sources["TEXTANGENT"].offset;
+ } else if (meshdata.vertices[vertex_src_id].sources.has("TEXTANGENT")) {
+ tangent_source_id = meshdata.vertices[vertex_src_id].sources["TEXTANGENT"];
+ tangent_ofs = vertex_ofs;
+ }
+
+ if (tangent_source_id != "") {
+ ERR_FAIL_COND_V(!meshdata.sources.has(tangent_source_id), ERR_INVALID_DATA);
+ tangent_src = &meshdata.sources[tangent_source_id];
+ }
}
const Collada::MeshData::Source *uv_src = nullptr;
int uv_ofs = 0;
- if (p.sources.has("TEXCOORD0")) {
- String uv_source_id = p.sources["TEXCOORD0"].source;
- uv_ofs = p.sources["TEXCOORD0"].offset;
- ERR_FAIL_COND_V(!meshdata.sources.has(uv_source_id), ERR_INVALID_DATA);
- uv_src = &meshdata.sources[uv_source_id];
+ {
+ String uv_source_id = "";
+
+ if (p.sources.has("TEXCOORD0")) {
+ uv_source_id = p.sources["TEXCOORD0"].source;
+ uv_ofs = p.sources["TEXCOORD0"].offset;
+ } else if (meshdata.vertices[vertex_src_id].sources.has("TEXCOORD0")) {
+ uv_source_id = meshdata.vertices[vertex_src_id].sources["TEXCOORD0"];
+ uv_ofs = vertex_ofs;
+ }
+
+ if (uv_source_id != "") {
+ ERR_FAIL_COND_V(!meshdata.sources.has(uv_source_id), ERR_INVALID_DATA);
+ uv_src = &meshdata.sources[uv_source_id];
+ }
}
const Collada::MeshData::Source *uv2_src = nullptr;
int uv2_ofs = 0;
- if (p.sources.has("TEXCOORD1")) {
- String uv2_source_id = p.sources["TEXCOORD1"].source;
- uv2_ofs = p.sources["TEXCOORD1"].offset;
- ERR_FAIL_COND_V(!meshdata.sources.has(uv2_source_id), ERR_INVALID_DATA);
- uv2_src = &meshdata.sources[uv2_source_id];
+ {
+ String uv2_source_id = "";
+
+ if (p.sources.has("TEXCOORD1")) {
+ uv2_source_id = p.sources["TEXCOORD1"].source;
+ uv2_ofs = p.sources["TEXCOORD1"].offset;
+ } else if (meshdata.vertices[vertex_src_id].sources.has("TEXCOORD1")) {
+ uv2_source_id = meshdata.vertices[vertex_src_id].sources["TEXCOORD1"];
+ uv2_ofs = vertex_ofs;
+ }
+
+ if (uv2_source_id != "") {
+ ERR_FAIL_COND_V(!meshdata.sources.has(uv2_source_id), ERR_INVALID_DATA);
+ uv2_src = &meshdata.sources[uv2_source_id];
+ }
}
const Collada::MeshData::Source *color_src = nullptr;
int color_ofs = 0;
- if (p.sources.has("COLOR")) {
- String color_source_id = p.sources["COLOR"].source;
- color_ofs = p.sources["COLOR"].offset;
- ERR_FAIL_COND_V(!meshdata.sources.has(color_source_id), ERR_INVALID_DATA);
- color_src = &meshdata.sources[color_source_id];
+ {
+ String color_source_id = "";
+
+ if (p.sources.has("COLOR")) {
+ color_source_id = p.sources["COLOR"].source;
+ color_ofs = p.sources["COLOR"].offset;
+ } else if (meshdata.vertices[vertex_src_id].sources.has("COLOR")) {
+ color_source_id = meshdata.vertices[vertex_src_id].sources["COLOR"];
+ color_ofs = vertex_ofs;
+ }
+
+ if (color_source_id != "") {
+ ERR_FAIL_COND_V(!meshdata.sources.has(color_source_id), ERR_INVALID_DATA);
+ color_src = &meshdata.sources[color_source_id];
+ }
}
//find largest source..
diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp
index 8660289c40..d219f6e325 100644
--- a/editor/import/editor_import_plugin.cpp
+++ b/editor/import/editor_import_plugin.cpp
@@ -35,102 +35,131 @@ EditorImportPlugin::EditorImportPlugin() {
}
String EditorImportPlugin::get_importer_name() const {
- ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_importer_name")), "");
- return get_script_instance()->call("_get_importer_name");
+ String ret;
+ if (GDVIRTUAL_CALL(_get_importer_name, ret)) {
+ return ret;
+ }
+ ERR_FAIL_V_MSG(String(), "Unimplemented _get_importer_name in add-on.");
}
String EditorImportPlugin::get_visible_name() const {
- ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_visible_name")), "");
- return get_script_instance()->call("_get_visible_name");
+ String ret;
+ if (GDVIRTUAL_CALL(_get_visible_name, ret)) {
+ return ret;
+ }
+ ERR_FAIL_V_MSG(String(), "Unimplemented _get_visible_name in add-on.");
}
void EditorImportPlugin::get_recognized_extensions(List<String> *p_extensions) const {
- ERR_FAIL_COND(!(get_script_instance() && get_script_instance()->has_method("_get_recognized_extensions")));
- Array extensions = get_script_instance()->call("_get_recognized_extensions");
- for (int i = 0; i < extensions.size(); i++) {
- p_extensions->push_back(extensions[i]);
+ Vector<String> extensions;
+
+ if (GDVIRTUAL_CALL(_get_recognized_extensions, extensions)) {
+ for (int i = 0; i < extensions.size(); i++) {
+ p_extensions->push_back(extensions[i]);
+ }
}
+ ERR_FAIL_MSG("Unimplemented _get_recognized_extensions in add-on.");
}
String EditorImportPlugin::get_preset_name(int p_idx) const {
- ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_preset_name")), "");
- return get_script_instance()->call("_get_preset_name", p_idx);
+ String ret;
+ if (GDVIRTUAL_CALL(_get_preset_name, p_idx, ret)) {
+ return ret;
+ }
+ ERR_FAIL_V_MSG(String(), "Unimplemented _get_preset_name in add-on.");
}
int EditorImportPlugin::get_preset_count() const {
- ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_preset_count")), 0);
- return get_script_instance()->call("_get_preset_count");
+ int ret;
+ if (GDVIRTUAL_CALL(_get_preset_count, ret)) {
+ return ret;
+ }
+ ERR_FAIL_V_MSG(-1, "Unimplemented _get_preset_count in add-on.");
}
String EditorImportPlugin::get_save_extension() const {
- ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_save_extension")), "");
- return get_script_instance()->call("_get_save_extension");
+ String ret;
+ if (GDVIRTUAL_CALL(_get_save_extension, ret)) {
+ return ret;
+ }
+ ERR_FAIL_V_MSG(String(), "Unimplemented _get_save_extension in add-on.");
}
String EditorImportPlugin::get_resource_type() const {
- ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_resource_type")), "");
- return get_script_instance()->call("_get_resource_type");
+ String ret;
+ if (GDVIRTUAL_CALL(_get_resource_type, ret)) {
+ return ret;
+ }
+ ERR_FAIL_V_MSG(String(), "Unimplemented _get_resource_type in add-on.");
}
float EditorImportPlugin::get_priority() const {
- if (!(get_script_instance() && get_script_instance()->has_method("_get_priority"))) {
- return ResourceImporter::get_priority();
+ float ret;
+ if (GDVIRTUAL_CALL(_get_priority, ret)) {
+ return ret;
}
- return get_script_instance()->call("_get_priority");
+ ERR_FAIL_V_MSG(-1, "Unimplemented _get_priority in add-on.");
}
int EditorImportPlugin::get_import_order() const {
- if (!(get_script_instance() && get_script_instance()->has_method("_get_import_order"))) {
- return ResourceImporter::get_import_order();
+ int ret;
+ if (GDVIRTUAL_CALL(_get_import_order, ret)) {
+ return ret;
}
- return get_script_instance()->call("_get_import_order");
+ ERR_FAIL_V_MSG(-1, "Unimplemented _get_import_order in add-on.");
}
void EditorImportPlugin::get_import_options(List<ResourceImporter::ImportOption> *r_options, int p_preset) const {
- ERR_FAIL_COND(!(get_script_instance() && get_script_instance()->has_method("_get_import_options")));
Array needed;
needed.push_back("name");
needed.push_back("default_value");
- Array options = get_script_instance()->call("_get_import_options", p_preset);
- for (int i = 0; i < options.size(); i++) {
- Dictionary d = options[i];
- ERR_FAIL_COND(!d.has_all(needed));
- String name = d["name"];
- Variant default_value = d["default_value"];
-
- PropertyHint hint = PROPERTY_HINT_NONE;
- if (d.has("property_hint")) {
- hint = (PropertyHint)d["property_hint"].operator int64_t();
- }
-
- String hint_string;
- if (d.has("hint_string")) {
- hint_string = d["hint_string"];
+ Array options;
+ if (GDVIRTUAL_CALL(_get_import_options, p_preset, options)) {
+ for (int i = 0; i < options.size(); i++) {
+ Dictionary d = options[i];
+ ERR_FAIL_COND(!d.has_all(needed));
+ String name = d["name"];
+ Variant default_value = d["default_value"];
+
+ PropertyHint hint = PROPERTY_HINT_NONE;
+ if (d.has("property_hint")) {
+ hint = (PropertyHint)d["property_hint"].operator int64_t();
+ }
+
+ String hint_string;
+ if (d.has("hint_string")) {
+ hint_string = d["hint_string"];
+ }
+
+ uint32_t usage = PROPERTY_USAGE_DEFAULT;
+ if (d.has("usage")) {
+ usage = d["usage"];
+ }
+
+ ImportOption option(PropertyInfo(default_value.get_type(), name, hint, hint_string, usage), default_value);
+ r_options->push_back(option);
}
-
- uint32_t usage = PROPERTY_USAGE_DEFAULT;
- if (d.has("usage")) {
- usage = d["usage"];
- }
-
- ImportOption option(PropertyInfo(default_value.get_type(), name, hint, hint_string, usage), default_value);
- r_options->push_back(option);
}
+
+ ERR_FAIL_MSG("Unimplemented _get_import_options in add-on.");
}
bool EditorImportPlugin::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
- ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_get_option_visibility")), true);
Dictionary d;
Map<StringName, Variant>::Element *E = p_options.front();
while (E) {
d[E->key()] = E->get();
E = E->next();
}
- return get_script_instance()->call("_get_option_visibility", p_option, d);
+ bool visible;
+ if (GDVIRTUAL_CALL(_get_option_visibility, p_option, d, visible)) {
+ return visible;
+ }
+
+ ERR_FAIL_V_MSG(false, "Unimplemented _get_option_visibility in add-on.");
}
Error EditorImportPlugin::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
- ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("_import")), ERR_UNAVAILABLE);
Dictionary options;
Array platform_variants, gen_files;
@@ -139,28 +168,33 @@ Error EditorImportPlugin::import(const String &p_source_file, const String &p_sa
options[E->key()] = E->get();
E = E->next();
}
- Error err = (Error)get_script_instance()->call("_import", p_source_file, p_save_path, options, platform_variants, gen_files).operator int64_t();
- for (int i = 0; i < platform_variants.size(); i++) {
- r_platform_variants->push_back(platform_variants[i]);
- }
- for (int i = 0; i < gen_files.size(); i++) {
- r_gen_files->push_back(gen_files[i]);
+ int err;
+ if (GDVIRTUAL_CALL(_import, p_source_file, p_save_path, options, platform_variants, gen_files, err)) {
+ Error ret_err = Error(err);
+
+ for (int i = 0; i < platform_variants.size(); i++) {
+ r_platform_variants->push_back(platform_variants[i]);
+ }
+ for (int i = 0; i < gen_files.size(); i++) {
+ r_gen_files->push_back(gen_files[i]);
+ }
+ return ret_err;
}
- return err;
+ ERR_FAIL_V_MSG(ERR_METHOD_NOT_FOUND, "Unimplemented _import in add-on.");
}
void EditorImportPlugin::_bind_methods() {
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_importer_name"));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_visible_name"));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_preset_count"));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_preset_name", PropertyInfo(Variant::INT, "preset")));
- BIND_VMETHOD(MethodInfo(Variant::ARRAY, "_get_recognized_extensions"));
- BIND_VMETHOD(MethodInfo(Variant::ARRAY, "_get_import_options", PropertyInfo(Variant::INT, "preset")));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_save_extension"));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_resource_type"));
- BIND_VMETHOD(MethodInfo(Variant::FLOAT, "_get_priority"));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_import_order"));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_get_option_visibility", PropertyInfo(Variant::STRING, "option"), PropertyInfo(Variant::DICTIONARY, "options")));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_import", PropertyInfo(Variant::STRING, "source_file"), PropertyInfo(Variant::STRING, "save_path"), PropertyInfo(Variant::DICTIONARY, "options"), PropertyInfo(Variant::ARRAY, "platform_variants"), PropertyInfo(Variant::ARRAY, "gen_files")));
+ GDVIRTUAL_BIND(_get_importer_name)
+ GDVIRTUAL_BIND(_get_visible_name)
+ GDVIRTUAL_BIND(_get_preset_count)
+ GDVIRTUAL_BIND(_get_preset_name, "preset_index")
+ GDVIRTUAL_BIND(_get_recognized_extensions)
+ GDVIRTUAL_BIND(_get_import_options, "preset_index")
+ GDVIRTUAL_BIND(_get_save_extension)
+ GDVIRTUAL_BIND(_get_resource_type)
+ GDVIRTUAL_BIND(_get_priority)
+ GDVIRTUAL_BIND(_get_import_order)
+ GDVIRTUAL_BIND(_get_option_visibility, "option_name", "options")
+ GDVIRTUAL_BIND(_import, "source_file", "save_path", "options", "platform_variants", "gen_files");
}
diff --git a/editor/import/editor_import_plugin.h b/editor/import/editor_import_plugin.h
index 345a40e96d..49c959ab44 100644
--- a/editor/import/editor_import_plugin.h
+++ b/editor/import/editor_import_plugin.h
@@ -39,6 +39,19 @@ class EditorImportPlugin : public ResourceImporter {
protected:
static void _bind_methods();
+ GDVIRTUAL0RC(String, _get_importer_name)
+ GDVIRTUAL0RC(String, _get_visible_name)
+ GDVIRTUAL0RC(int, _get_preset_count)
+ GDVIRTUAL1RC(String, _get_preset_name, int)
+ GDVIRTUAL0RC(Vector<String>, _get_recognized_extensions)
+ GDVIRTUAL1RC(Array, _get_import_options, int)
+ GDVIRTUAL0RC(String, _get_save_extension)
+ GDVIRTUAL0RC(String, _get_resource_type)
+ GDVIRTUAL0RC(float, _get_priority)
+ GDVIRTUAL0RC(int, _get_import_order)
+ GDVIRTUAL2RC(bool, _get_option_visibility, StringName, Dictionary)
+ GDVIRTUAL5RC(int, _import, String, String, Dictionary, Array, Array)
+
public:
EditorImportPlugin();
virtual String get_importer_name() const override;
diff --git a/editor/import/resource_importer_bmfont.cpp b/editor/import/resource_importer_bmfont.cpp
new file mode 100644
index 0000000000..2e7ef1402b
--- /dev/null
+++ b/editor/import/resource_importer_bmfont.cpp
@@ -0,0 +1,797 @@
+/*************************************************************************/
+/* resource_importer_bmfont.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "resource_importer_bmfont.h"
+
+#include "core/io/image_loader.h"
+#include "core/io/resource_saver.h"
+
+String ResourceImporterBMFont::get_importer_name() const {
+ return "font_data_bmfont";
+}
+
+String ResourceImporterBMFont::get_visible_name() const {
+ return "Font Data (AngelCode BMFont)";
+}
+
+void ResourceImporterBMFont::get_recognized_extensions(List<String> *p_extensions) const {
+ if (p_extensions) {
+ p_extensions->push_back("font");
+ p_extensions->push_back("fnt");
+ }
+}
+
+String ResourceImporterBMFont::get_save_extension() const {
+ return "fontdata";
+}
+
+String ResourceImporterBMFont::get_resource_type() const {
+ return "FontData";
+}
+
+bool ResourceImporterBMFont::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
+ return true;
+}
+
+void ResourceImporterBMFont::get_import_options(List<ImportOption> *r_options, int p_preset) const {
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true));
+}
+
+void _convert_packed_8bit(Ref<FontData> &r_font, Ref<Image> &p_source, int p_page, int p_sz) {
+ int w = p_source->get_width();
+ int h = p_source->get_height();
+
+ PackedByteArray imgdata = p_source->get_data();
+ const uint8_t *r = imgdata.ptr();
+
+ PackedByteArray imgdata_r;
+ imgdata_r.resize(w * h * 2);
+ uint8_t *wr = imgdata_r.ptrw();
+
+ PackedByteArray imgdata_g;
+ imgdata_g.resize(w * h * 2);
+ uint8_t *wg = imgdata_g.ptrw();
+
+ PackedByteArray imgdata_b;
+ imgdata_b.resize(w * h * 2);
+ uint8_t *wb = imgdata_b.ptrw();
+
+ PackedByteArray imgdata_a;
+ imgdata_a.resize(w * h * 2);
+ uint8_t *wa = imgdata_a.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs_src = (i * w + j) * 4;
+ int ofs_dst = (i * w + j) * 2;
+ wr[ofs_dst + 0] = 255;
+ wr[ofs_dst + 1] = r[ofs_src + 0];
+ wg[ofs_dst + 0] = 255;
+ wg[ofs_dst + 1] = r[ofs_src + 1];
+ wb[ofs_dst + 0] = 255;
+ wb[ofs_dst + 1] = r[ofs_src + 2];
+ wa[ofs_dst + 0] = 255;
+ wa[ofs_dst + 1] = r[ofs_src + 3];
+ }
+ }
+ Ref<Image> img_r = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_r));
+ r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 0, img_r);
+ Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_g));
+ r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 1, img_g);
+ Ref<Image> img_b = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_b));
+ r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 2, img_b);
+ Ref<Image> img_a = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_a));
+ r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 3, img_a);
+}
+
+void _convert_packed_4bit(Ref<FontData> &r_font, Ref<Image> &p_source, int p_page, int p_sz) {
+ int w = p_source->get_width();
+ int h = p_source->get_height();
+
+ PackedByteArray imgdata = p_source->get_data();
+ const uint8_t *r = imgdata.ptr();
+
+ PackedByteArray imgdata_r;
+ imgdata_r.resize(w * h * 2);
+ uint8_t *wr = imgdata_r.ptrw();
+
+ PackedByteArray imgdata_g;
+ imgdata_g.resize(w * h * 2);
+ uint8_t *wg = imgdata_g.ptrw();
+
+ PackedByteArray imgdata_b;
+ imgdata_b.resize(w * h * 2);
+ uint8_t *wb = imgdata_b.ptrw();
+
+ PackedByteArray imgdata_a;
+ imgdata_a.resize(w * h * 2);
+ uint8_t *wa = imgdata_a.ptrw();
+
+ PackedByteArray imgdata_ro;
+ imgdata_ro.resize(w * h * 2);
+ uint8_t *wro = imgdata_ro.ptrw();
+
+ PackedByteArray imgdata_go;
+ imgdata_go.resize(w * h * 2);
+ uint8_t *wgo = imgdata_go.ptrw();
+
+ PackedByteArray imgdata_bo;
+ imgdata_bo.resize(w * h * 2);
+ uint8_t *wbo = imgdata_bo.ptrw();
+
+ PackedByteArray imgdata_ao;
+ imgdata_ao.resize(w * h * 2);
+ uint8_t *wao = imgdata_ao.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs_src = (i * w + j) * 4;
+ int ofs_dst = (i * w + j) * 2;
+ wr[ofs_dst + 0] = 255;
+ wro[ofs_dst + 0] = 255;
+ if (r[ofs_src + 0] > 0x0F) {
+ wr[ofs_dst + 1] = (r[ofs_src + 0] - 0x0F) * 2;
+ wro[ofs_dst + 1] = 0;
+ } else {
+ wr[ofs_dst + 1] = 0;
+ wro[ofs_dst + 1] = r[ofs_src + 0] * 2;
+ }
+ wg[ofs_dst + 0] = 255;
+ wgo[ofs_dst + 0] = 255;
+ if (r[ofs_src + 1] > 0x0F) {
+ wg[ofs_dst + 1] = (r[ofs_src + 1] - 0x0F) * 2;
+ wgo[ofs_dst + 1] = 0;
+ } else {
+ wg[ofs_dst + 1] = 0;
+ wgo[ofs_dst + 1] = r[ofs_src + 1] * 2;
+ }
+ wb[ofs_dst + 0] = 255;
+ wbo[ofs_dst + 0] = 255;
+ if (r[ofs_src + 2] > 0x0F) {
+ wb[ofs_dst + 1] = (r[ofs_src + 2] - 0x0F) * 2;
+ wbo[ofs_dst + 1] = 0;
+ } else {
+ wb[ofs_dst + 1] = 0;
+ wbo[ofs_dst + 1] = r[ofs_src + 2] * 2;
+ }
+ wa[ofs_dst + 0] = 255;
+ wao[ofs_dst + 0] = 255;
+ if (r[ofs_src + 3] > 0x0F) {
+ wa[ofs_dst + 1] = (r[ofs_src + 3] - 0x0F) * 2;
+ wao[ofs_dst + 1] = 0;
+ } else {
+ wa[ofs_dst + 1] = 0;
+ wao[ofs_dst + 1] = r[ofs_src + 3] * 2;
+ }
+ }
+ }
+ Ref<Image> img_r = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_r));
+ r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 0, img_r);
+ Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_g));
+ r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 1, img_g);
+ Ref<Image> img_b = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_b));
+ r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 2, img_b);
+ Ref<Image> img_a = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_a));
+ r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page * 4 + 3, img_a);
+
+ Ref<Image> img_ro = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_ro));
+ r_font->set_texture_image(0, Vector2i(p_sz, 1), p_page * 4 + 0, img_ro);
+ Ref<Image> img_go = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_go));
+ r_font->set_texture_image(0, Vector2i(p_sz, 1), p_page * 4 + 1, img_go);
+ Ref<Image> img_bo = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_bo));
+ r_font->set_texture_image(0, Vector2i(p_sz, 1), p_page * 4 + 2, img_bo);
+ Ref<Image> img_ao = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_ao));
+ r_font->set_texture_image(0, Vector2i(p_sz, 1), p_page * 4 + 3, img_ao);
+}
+
+void _convert_rgba_4bit(Ref<FontData> &r_font, Ref<Image> &p_source, int p_page, int p_sz) {
+ int w = p_source->get_width();
+ int h = p_source->get_height();
+
+ PackedByteArray imgdata = p_source->get_data();
+ const uint8_t *r = imgdata.ptr();
+
+ PackedByteArray imgdata_g;
+ imgdata_g.resize(w * h * 4);
+ uint8_t *wg = imgdata_g.ptrw();
+
+ PackedByteArray imgdata_o;
+ imgdata_o.resize(w * h * 4);
+ uint8_t *wo = imgdata_o.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs = (i * w + j) * 4;
+
+ if (r[ofs + 0] > 0x7F) {
+ wg[ofs + 0] = r[ofs + 0];
+ wo[ofs + 0] = 0;
+ } else {
+ wg[ofs + 0] = 0;
+ wo[ofs + 0] = r[ofs + 0] * 2;
+ }
+ if (r[ofs + 1] > 0x7F) {
+ wg[ofs + 1] = r[ofs + 1];
+ wo[ofs + 1] = 0;
+ } else {
+ wg[ofs + 1] = 0;
+ wo[ofs + 1] = r[ofs + 1] * 2;
+ }
+ if (r[ofs + 2] > 0x7F) {
+ wg[ofs + 2] = r[ofs + 2];
+ wo[ofs + 2] = 0;
+ } else {
+ wg[ofs + 2] = 0;
+ wo[ofs + 2] = r[ofs + 2] * 2;
+ }
+ if (r[ofs + 3] > 0x7F) {
+ wg[ofs + 3] = r[ofs + 3];
+ wo[ofs + 3] = 0;
+ } else {
+ wg[ofs + 3] = 0;
+ wo[ofs + 3] = r[ofs + 3] * 2;
+ }
+ }
+ }
+ Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_RGBA8, imgdata_g));
+ r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page, img_g);
+
+ Ref<Image> img_o = memnew(Image(w, h, 0, Image::FORMAT_RGBA8, imgdata_o));
+ r_font->set_texture_image(0, Vector2i(p_sz, 1), p_page, img_o);
+}
+
+void _convert_mono_8bit(Ref<FontData> &r_font, Ref<Image> &p_source, int p_page, int p_ch, int p_sz, int p_ol) {
+ int w = p_source->get_width();
+ int h = p_source->get_height();
+
+ PackedByteArray imgdata = p_source->get_data();
+ const uint8_t *r = imgdata.ptr();
+
+ int size = 4;
+ if (p_source->get_format() == Image::FORMAT_L8) {
+ size = 1;
+ p_ch = 0;
+ }
+
+ PackedByteArray imgdata_g;
+ imgdata_g.resize(w * h * 2);
+ uint8_t *wg = imgdata_g.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs_src = (i * w + j) * size;
+ int ofs_dst = (i * w + j) * 2;
+ wg[ofs_dst + 0] = 255;
+ wg[ofs_dst + 1] = r[ofs_src + p_ch];
+ }
+ }
+ Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_g));
+ r_font->set_texture_image(0, Vector2i(p_sz, p_ol), p_page, img_g);
+}
+
+void _convert_mono_4bit(Ref<FontData> &r_font, Ref<Image> &p_source, int p_page, int p_ch, int p_sz, int p_ol) {
+ int w = p_source->get_width();
+ int h = p_source->get_height();
+
+ PackedByteArray imgdata = p_source->get_data();
+ const uint8_t *r = imgdata.ptr();
+
+ int size = 4;
+ if (p_source->get_format() == Image::FORMAT_L8) {
+ size = 1;
+ p_ch = 0;
+ }
+
+ PackedByteArray imgdata_g;
+ imgdata_g.resize(w * h * 2);
+ uint8_t *wg = imgdata_g.ptrw();
+
+ PackedByteArray imgdata_o;
+ imgdata_o.resize(w * h * 2);
+ uint8_t *wo = imgdata_o.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs_src = (i * w + j) * size;
+ int ofs_dst = (i * w + j) * 2;
+ wg[ofs_dst + 0] = 255;
+ wo[ofs_dst + 0] = 255;
+ if (r[ofs_src + p_ch] > 0x7F) {
+ wg[ofs_dst + 1] = r[ofs_src + p_ch];
+ wo[ofs_dst + 1] = 0;
+ } else {
+ wg[ofs_dst + 1] = 0;
+ wo[ofs_dst + 1] = r[ofs_src + p_ch] * 2;
+ }
+ }
+ }
+ Ref<Image> img_g = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_g));
+ r_font->set_texture_image(0, Vector2i(p_sz, 0), p_page, img_g);
+
+ Ref<Image> img_o = memnew(Image(w, h, 0, Image::FORMAT_LA8, imgdata_o));
+ r_font->set_texture_image(0, Vector2i(p_sz, p_ol), p_page, img_o);
+}
+
+Error ResourceImporterBMFont::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
+ print_verbose("Importing BMFont font from: " + p_source_file);
+
+ Ref<FontData> font;
+ font.instantiate();
+ font->set_antialiased(false);
+ font->set_multichannel_signed_distance_field(false);
+ font->set_force_autohinter(false);
+ font->set_hinting(TextServer::HINTING_NONE);
+ font->set_oversampling(1.0f);
+
+ FileAccessRef f = FileAccess::open(p_source_file, FileAccess::READ);
+ if (f == nullptr) {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Cannot open font from file ") + "\"" + p_source_file + "\".");
+ }
+
+ int base_size = 16;
+ int height = 0;
+ int ascent = 0;
+ int outline = 0;
+
+ bool packed = false;
+ uint8_t ch[4] = { 0, 0, 0, 0 }; // RGBA
+ int first_gl_ch = -1;
+ int first_ol_ch = -1;
+ int first_cm_ch = -1;
+
+ unsigned char magic[4];
+ f->get_buffer((unsigned char *)&magic, 4);
+ if (magic[0] == 'B' && magic[1] == 'M' && magic[2] == 'F') {
+ // Binary BMFont file.
+ ERR_FAIL_COND_V_MSG(magic[3] != 3, ERR_CANT_CREATE, vformat(TTR("Version %d of BMFont is not supported."), (int)magic[3]));
+
+ uint8_t block_type = f->get_8();
+ uint32_t block_size = f->get_32();
+ while (!f->eof_reached()) {
+ uint64_t off = f->get_position();
+ switch (block_type) {
+ case 1: /* info */ {
+ ERR_FAIL_COND_V_MSG(block_size < 15, ERR_CANT_CREATE, TTR("Invalid BMFont info block size."));
+ base_size = f->get_16();
+ uint8_t flags = f->get_8();
+ ERR_FAIL_COND_V_MSG(flags & 0x02, ERR_CANT_CREATE, TTR("Non-unicode version of BMFont is not supported."));
+ f->get_8(); // non-unicode charset, skip
+ f->get_16(); // stretch_h, skip
+ f->get_8(); // aa, skip
+ f->get_32(); // padding, skip
+ f->get_16(); // spacing, skip
+ outline = f->get_8();
+ // font name, skip
+ font->set_fixed_size(base_size);
+ } break;
+ case 2: /* common */ {
+ ERR_FAIL_COND_V_MSG(block_size != 15, ERR_CANT_CREATE, TTR("Invalid BMFont common block size."));
+ height = f->get_16();
+ ascent = f->get_16();
+ f->get_32(); // scale, skip
+ f->get_16(); // pages, skip
+ uint8_t flags = f->get_8();
+ packed = (flags & 0x01);
+ ch[3] = f->get_8();
+ ch[0] = f->get_8();
+ ch[1] = f->get_8();
+ ch[2] = f->get_8();
+ for (int i = 0; i < 4; i++) {
+ if (ch[i] == 0 && first_gl_ch == -1) {
+ first_gl_ch = i;
+ }
+ if (ch[i] == 1 && first_ol_ch == -1) {
+ first_ol_ch = i;
+ }
+ if (ch[i] == 2 && first_cm_ch == -1) {
+ first_cm_ch = i;
+ }
+ }
+ } break;
+ case 3: /* pages */ {
+ int page = 0;
+ CharString cs;
+ char32_t c = f->get_8();
+ while (!f->eof_reached() && f->get_position() <= off + block_size) {
+ if (c == '\0') {
+ String base_dir = p_source_file.get_base_dir();
+ String file = base_dir.plus_file(String::utf8(cs.ptr(), cs.length()));
+ if (RenderingServer::get_singleton() != nullptr) {
+ Ref<Image> img;
+ img.instantiate();
+ Error err = ImageLoader::load_image(file, img);
+ ERR_FAIL_COND_V_MSG(err != OK, ERR_FILE_CANT_READ, TTR("Can't load font texture: ") + "\"" + file + "\".");
+
+ if (packed) {
+ if (ch[3] == 0) { // 4 x 8 bit monochrome, no outline
+ outline = 0;
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_packed_8bit(font, img, page, base_size);
+ } else if ((ch[3] == 2) && (outline > 0)) { // 4 x 4 bit monochrome, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_packed_4bit(font, img, page, base_size);
+ } else {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Unsupported BMFont texture format."));
+ }
+ } else {
+ if ((ch[0] == 0) && (ch[1] == 0) && (ch[2] == 0) && (ch[3] == 0)) { // RGBA8 color, no outline
+ outline = 0;
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ font->set_texture_image(0, Vector2i(base_size, 0), page, img);
+ } else if ((ch[0] == 2) && (ch[1] == 2) && (ch[2] == 2) && (ch[3] == 2) && (outline > 0)) { // RGBA4 color, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_rgba_4bit(font, img, page, base_size);
+ } else if ((first_gl_ch >= 0) && (first_ol_ch >= 0) && (outline > 0)) { // 1 x 8 bit monochrome, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_mono_8bit(font, img, page, first_gl_ch, base_size, 0);
+ _convert_mono_8bit(font, img, page, first_ol_ch, base_size, 1);
+ } else if ((first_cm_ch >= 0) && (outline > 0)) { // 1 x 4 bit monochrome, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_mono_4bit(font, img, page, first_cm_ch, base_size, 1);
+ } else if (first_gl_ch >= 0) { // 1 x 8 bit monochrome, no outline
+ outline = 0;
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_mono_8bit(font, img, page, first_gl_ch, base_size, 0);
+ } else {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Unsupported BMFont texture format."));
+ }
+ }
+ }
+ page++;
+ cs = "";
+ } else {
+ cs += c;
+ }
+ c = f->get_8();
+ }
+ } break;
+ case 4: /* chars */ {
+ int char_count = block_size / 20;
+ for (int i = 0; i < char_count; i++) {
+ Vector2 advance;
+ Vector2 size;
+ Vector2 offset;
+ Rect2 uv_rect;
+
+ char32_t idx = f->get_32();
+ uv_rect.position.x = (int16_t)f->get_16();
+ uv_rect.position.y = (int16_t)f->get_16();
+ uv_rect.size.width = (int16_t)f->get_16();
+ size.width = uv_rect.size.width;
+ uv_rect.size.height = (int16_t)f->get_16();
+ size.height = uv_rect.size.height;
+ offset.x = (int16_t)f->get_16();
+ offset.y = (int16_t)f->get_16() - ascent;
+ advance.x = (int16_t)f->get_16();
+ if (advance.x < 0) {
+ advance.x = size.width + 1;
+ }
+
+ int texture_idx = f->get_8();
+ uint8_t channel = f->get_8();
+
+ ERR_FAIL_COND_V_MSG(!packed && channel != 15, ERR_CANT_CREATE, TTR("Invalid glyph channel."));
+ int ch_off = 0;
+ switch (channel) {
+ case 1:
+ ch_off = 2;
+ break; // B
+ case 2:
+ ch_off = 1;
+ break; // G
+ case 4:
+ ch_off = 0;
+ break; // R
+ case 8:
+ ch_off = 3;
+ break; // A
+ default:
+ ch_off = 0;
+ break;
+ }
+ font->set_glyph_advance(0, base_size, idx, advance);
+ font->set_glyph_offset(0, Vector2i(base_size, 0), idx, offset);
+ font->set_glyph_size(0, Vector2i(base_size, 0), idx, size);
+ font->set_glyph_uv_rect(0, Vector2i(base_size, 0), idx, uv_rect);
+ font->set_glyph_texture_idx(0, Vector2i(base_size, 0), idx, texture_idx * (packed ? 4 : 1) + ch_off);
+ if (outline > 0) {
+ font->set_glyph_offset(0, Vector2i(base_size, 1), idx, offset);
+ font->set_glyph_size(0, Vector2i(base_size, 1), idx, size);
+ font->set_glyph_uv_rect(0, Vector2i(base_size, 1), idx, uv_rect);
+ font->set_glyph_texture_idx(0, Vector2i(base_size, 1), idx, texture_idx * (packed ? 4 : 1) + ch_off);
+ }
+ }
+ } break;
+ case 5: /* kerning */ {
+ int pair_count = block_size / 10;
+ for (int i = 0; i < pair_count; i++) {
+ Vector2i kpk;
+ kpk.x = f->get_32();
+ kpk.y = f->get_32();
+ font->set_kerning(0, base_size, kpk, Vector2((int16_t)f->get_16(), 0));
+ }
+ } break;
+ default: {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Invalid BMFont block type."));
+ } break;
+ }
+ f->seek(off + block_size);
+ block_type = f->get_8();
+ block_size = f->get_32();
+ }
+
+ } else {
+ // Text BMFont file.
+ f->seek(0);
+ while (true) {
+ String line = f->get_line();
+
+ int delimiter = line.find(" ");
+ String type = line.substr(0, delimiter);
+ int pos = delimiter + 1;
+ Map<String, String> keys;
+
+ while (pos < line.size() && line[pos] == ' ') {
+ pos++;
+ }
+
+ while (pos < line.size()) {
+ int eq = line.find("=", pos);
+ if (eq == -1) {
+ break;
+ }
+ String key = line.substr(pos, eq - pos);
+ int end = -1;
+ String value;
+ if (line[eq + 1] == '"') {
+ end = line.find("\"", eq + 2);
+ if (end == -1) {
+ break;
+ }
+ value = line.substr(eq + 2, end - 1 - eq - 1);
+ pos = end + 1;
+ } else {
+ end = line.find(" ", eq + 1);
+ if (end == -1) {
+ end = line.size();
+ }
+ value = line.substr(eq + 1, end - eq);
+ pos = end;
+ }
+
+ while (pos < line.size() && line[pos] == ' ') {
+ pos++;
+ }
+
+ keys[key] = value;
+ }
+
+ if (type == "info") {
+ if (keys.has("size")) {
+ base_size = keys["size"].to_int();
+ font->set_fixed_size(base_size);
+ }
+ if (keys.has("outline")) {
+ outline = keys["outline"].to_int();
+ }
+ ERR_FAIL_COND_V_MSG((!keys.has("unicode") || keys["unicode"].to_int() != 1), ERR_CANT_CREATE, TTR("Non-unicode version of BMFont is not supported."));
+ } else if (type == "common") {
+ if (keys.has("lineHeight")) {
+ height = keys["lineHeight"].to_int();
+ }
+ if (keys.has("base")) {
+ ascent = keys["base"].to_int();
+ }
+ if (keys.has("packed")) {
+ packed = (keys["packed"].to_int() == 1);
+ }
+ if (keys.has("alphaChnl")) {
+ ch[3] = keys["alphaChnl"].to_int();
+ }
+ if (keys.has("redChnl")) {
+ ch[0] = keys["redChnl"].to_int();
+ }
+ if (keys.has("greenChnl")) {
+ ch[1] = keys["greenChnl"].to_int();
+ }
+ if (keys.has("blueChnl")) {
+ ch[2] = keys["blueChnl"].to_int();
+ }
+ for (int i = 0; i < 4; i++) {
+ if (ch[i] == 0 && first_gl_ch == -1) {
+ first_gl_ch = i;
+ }
+ if (ch[i] == 1 && first_ol_ch == -1) {
+ first_ol_ch = i;
+ }
+ if (ch[i] == 2 && first_cm_ch == -1) {
+ first_cm_ch = i;
+ }
+ }
+ } else if (type == "page") {
+ int page = 0;
+ if (keys.has("id")) {
+ page = keys["id"].to_int();
+ }
+ if (keys.has("file")) {
+ String base_dir = p_source_file.get_base_dir();
+ String file = base_dir.plus_file(keys["file"]);
+ if (RenderingServer::get_singleton() != nullptr) {
+ Ref<Image> img;
+ img.instantiate();
+ Error err = ImageLoader::load_image(file, img);
+ ERR_FAIL_COND_V_MSG(err != OK, ERR_FILE_CANT_READ, TTR("Can't load font texture: ") + "\"" + file + "\".");
+ if (packed) {
+ if (ch[3] == 0) { // 4 x 8 bit monochrome, no outline
+ outline = 0;
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_packed_8bit(font, img, page, base_size);
+ } else if ((ch[3] == 2) && (outline > 0)) { // 4 x 4 bit monochrome, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_packed_4bit(font, img, page, base_size);
+ } else {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Unsupported BMFont texture format."));
+ }
+ } else {
+ if ((ch[0] == 0) && (ch[1] == 0) && (ch[2] == 0) && (ch[3] == 0)) { // RGBA8 color, no outline
+ outline = 0;
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ font->set_texture_image(0, Vector2i(base_size, 0), page, img);
+ } else if ((ch[0] == 2) && (ch[1] == 2) && (ch[2] == 2) && (ch[3] == 2) && (outline > 0)) { // RGBA4 color, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_rgba_4bit(font, img, page, base_size);
+ } else if ((first_gl_ch >= 0) && (first_ol_ch >= 0) && (outline > 0)) { // 1 x 8 bit monochrome, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_mono_8bit(font, img, page, first_gl_ch, base_size, 0);
+ _convert_mono_8bit(font, img, page, first_ol_ch, base_size, 1);
+ } else if ((first_cm_ch >= 0) && (outline > 0)) { // 1 x 4 bit monochrome, gl + outline
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_mono_4bit(font, img, page, first_cm_ch, base_size, 1);
+ } else if (first_gl_ch >= 0) { // 1 x 8 bit monochrome, no outline
+ outline = 0;
+ ERR_FAIL_COND_V_MSG(img->get_format() != Image::FORMAT_RGBA8 && img->get_format() != Image::FORMAT_L8, ERR_FILE_CANT_READ, TTR("Unsupported BMFont texture format."));
+ _convert_mono_8bit(font, img, page, first_gl_ch, base_size, 0);
+ } else {
+ ERR_FAIL_V_MSG(ERR_CANT_CREATE, TTR("Unsupported BMFont texture format."));
+ }
+ }
+ }
+ }
+ } else if (type == "char") {
+ char32_t idx = 0;
+ Vector2 advance;
+ Vector2 size;
+ Vector2 offset;
+ Rect2 uv_rect;
+ int texture_idx = -1;
+ uint8_t channel = 15;
+
+ if (keys.has("id")) {
+ idx = keys["id"].to_int();
+ }
+ if (keys.has("x")) {
+ uv_rect.position.x = keys["x"].to_int();
+ }
+ if (keys.has("y")) {
+ uv_rect.position.y = keys["y"].to_int();
+ }
+ if (keys.has("width")) {
+ uv_rect.size.width = keys["width"].to_int();
+ size.width = keys["width"].to_int();
+ }
+ if (keys.has("height")) {
+ uv_rect.size.height = keys["height"].to_int();
+ size.height = keys["height"].to_int();
+ }
+ if (keys.has("xoffset")) {
+ offset.x = keys["xoffset"].to_int();
+ }
+ if (keys.has("yoffset")) {
+ offset.y = keys["yoffset"].to_int() - ascent;
+ }
+ if (keys.has("page")) {
+ texture_idx = keys["page"].to_int();
+ }
+ if (keys.has("xadvance")) {
+ advance.x = keys["xadvance"].to_int();
+ }
+ if (advance.x < 0) {
+ advance.x = size.width + 1;
+ }
+ if (keys.has("chnl")) {
+ channel = keys["chnl"].to_int();
+ }
+
+ ERR_FAIL_COND_V_MSG(!packed && channel != 15, ERR_CANT_CREATE, TTR("Invalid glyph channel."));
+ int ch_off = 0;
+ switch (channel) {
+ case 1:
+ ch_off = 2;
+ break; // B
+ case 2:
+ ch_off = 1;
+ break; // G
+ case 4:
+ ch_off = 0;
+ break; // R
+ case 8:
+ ch_off = 3;
+ break; // A
+ default:
+ ch_off = 0;
+ break;
+ }
+ font->set_glyph_advance(0, base_size, idx, advance);
+ font->set_glyph_offset(0, Vector2i(base_size, 0), idx, offset);
+ font->set_glyph_size(0, Vector2i(base_size, 0), idx, size);
+ font->set_glyph_uv_rect(0, Vector2i(base_size, 0), idx, uv_rect);
+ font->set_glyph_texture_idx(0, Vector2i(base_size, 0), idx, texture_idx * (packed ? 4 : 1) + ch_off);
+ if (outline > 0) {
+ font->set_glyph_offset(0, Vector2i(base_size, 1), idx, offset);
+ font->set_glyph_size(0, Vector2i(base_size, 1), idx, size);
+ font->set_glyph_uv_rect(0, Vector2i(base_size, 1), idx, uv_rect);
+ font->set_glyph_texture_idx(0, Vector2i(base_size, 1), idx, texture_idx * (packed ? 4 : 1) + ch_off);
+ }
+ } else if (type == "kerning") {
+ Vector2i kpk;
+ if (keys.has("first")) {
+ kpk.x = keys["first"].to_int();
+ }
+ if (keys.has("second")) {
+ kpk.y = keys["second"].to_int();
+ }
+ if (keys.has("amount")) {
+ font->set_kerning(0, base_size, kpk, Vector2(keys["amount"].to_int(), 0));
+ }
+ }
+
+ if (f->eof_reached()) {
+ break;
+ }
+ }
+ }
+
+ font->set_ascent(0, base_size, ascent);
+ font->set_descent(0, base_size, height - ascent);
+
+ int flg = ResourceSaver::SaverFlags::FLAG_BUNDLE_RESOURCES | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
+ if ((bool)p_options["compress"]) {
+ flg |= ResourceSaver::SaverFlags::FLAG_COMPRESS;
+ }
+
+ print_verbose("Saving to: " + p_save_path + ".fontdata");
+ Error err = ResourceSaver::save(p_save_path + ".fontdata", font, flg);
+ ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save font to file \"" + p_save_path + ".res\".");
+ print_verbose("Done saving to: " + p_save_path + ".fontdata");
+ return OK;
+}
+
+ResourceImporterBMFont::ResourceImporterBMFont() {
+}
diff --git a/modules/gdnative/net/packet_peer_gdnative.h b/editor/import/resource_importer_bmfont.h
index 29013f9367..065703132a 100644
--- a/modules/gdnative/net/packet_peer_gdnative.h
+++ b/editor/import/resource_importer_bmfont.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* packet_peer_gdnative.h */
+/* resource_importer_bmfont.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,32 +28,29 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PACKET_PEER_GDNATIVE_H
-#define PACKET_PEER_GDNATIVE_H
+#ifndef RESOURCE_IMPORTER_BMFONT_H
+#define RESOURCE_IMPORTER_BMFONT_H
-#include "core/io/packet_peer.h"
-#include "modules/gdnative/gdnative.h"
-#include "modules/gdnative/include/net/godot_net.h"
+#include "core/io/resource_importer.h"
+#include "scene/resources/font.h"
+#include "servers/text_server.h"
-class PacketPeerGDNative : public PacketPeer {
- GDCLASS(PacketPeerGDNative, PacketPeer);
-
-protected:
- static void _bind_methods();
- const godot_net_packet_peer *interface;
+class ResourceImporterBMFont : public ResourceImporter {
+ GDCLASS(ResourceImporterBMFont, ResourceImporter);
public:
- PacketPeerGDNative();
- ~PacketPeerGDNative();
+ virtual String get_importer_name() const override;
+ virtual String get_visible_name() const override;
+ virtual void get_recognized_extensions(List<String> *p_extensions) const override;
+ virtual String get_save_extension() const override;
+ virtual String get_resource_type() const override;
+
+ virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override;
+ virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override;
- /* Sets the interface implementation from GDNative */
- void set_native_packet_peer(const godot_net_packet_peer *p_impl);
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override;
- /* Specific to PacketPeer */
- virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) override;
- virtual Error put_packet(const uint8_t *p_buffer, int p_buffer_size) override;
- virtual int get_max_packet_size() const override;
- virtual int get_available_packet_count() const override;
+ ResourceImporterBMFont();
};
-#endif // PACKET_PEER_GDNATIVE_H
+#endif // RESOURCE_IMPORTER_BMFONT_H
diff --git a/editor/import/resource_importer_dynamicfont.cpp b/editor/import/resource_importer_dynamicfont.cpp
new file mode 100644
index 0000000000..8e01adbd56
--- /dev/null
+++ b/editor/import/resource_importer_dynamicfont.cpp
@@ -0,0 +1,304 @@
+/*************************************************************************/
+/* resource_importer_dynamicfont.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "resource_importer_dynamicfont.h"
+
+#include "dynamicfont_import_settings.h"
+
+#include "core/io/file_access.h"
+#include "core/io/resource_saver.h"
+#include "editor/editor_node.h"
+#include "modules/modules_enabled.gen.h"
+
+String ResourceImporterDynamicFont::get_importer_name() const {
+ return "font_data_dynamic";
+}
+
+String ResourceImporterDynamicFont::get_visible_name() const {
+ return "Font Data (Dynamic Font)";
+}
+
+void ResourceImporterDynamicFont::get_recognized_extensions(List<String> *p_extensions) const {
+ if (p_extensions) {
+#ifdef MODULE_FREETYPE_ENABLED
+ p_extensions->push_back("ttf");
+ p_extensions->push_back("otf");
+ p_extensions->push_back("woff");
+ //p_extensions->push_back("woff2");
+ p_extensions->push_back("pfb");
+ p_extensions->push_back("pfm");
+#endif
+ }
+}
+
+String ResourceImporterDynamicFont::get_save_extension() const {
+ return "fontdata";
+}
+
+String ResourceImporterDynamicFont::get_resource_type() const {
+ return "FontData";
+}
+
+bool ResourceImporterDynamicFont::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
+ if (p_option == "msdf_pixel_range" && !bool(p_options["multichannel_signed_distance_field"])) {
+ return false;
+ }
+ if (p_option == "msdf_size" && !bool(p_options["multichannel_signed_distance_field"])) {
+ return false;
+ }
+ if (p_option == "oversampling" && bool(p_options["multichannel_signed_distance_field"])) {
+ return false;
+ }
+ return true;
+}
+
+int ResourceImporterDynamicFont::get_preset_count() const {
+ return PRESET_MAX;
+}
+
+String ResourceImporterDynamicFont::get_preset_name(int p_idx) const {
+ switch (p_idx) {
+ case PRESET_DYNAMIC:
+ return TTR("Dynamically rendered TrueType/OpenType font");
+ case PRESET_MSDF:
+ return TTR("Prerendered multichannel(+true) signed distance field");
+ default:
+ return String();
+ }
+}
+
+void ResourceImporterDynamicFont::get_import_options(List<ImportOption> *r_options, int p_preset) const {
+ bool msdf = p_preset == PRESET_MSDF;
+
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "antialiased"), true));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "multichannel_signed_distance_field", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), (msdf) ? true : false));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "msdf_pixel_range", PROPERTY_HINT_RANGE, "1,100,1"), 8));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "msdf_size", PROPERTY_HINT_RANGE, "1,250,1"), 48));
+
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "force_autohinter"), false));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "hinting", PROPERTY_HINT_ENUM, "None,Light,Normal"), 1));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "oversampling", PROPERTY_HINT_RANGE, "0,10,0.1"), 0.0));
+
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true));
+
+ r_options->push_back(ImportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "preload/char_ranges"), Vector<String>()));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "preload/glyph_ranges"), Vector<String>()));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "preload/configurations"), Vector<String>()));
+
+ r_options->push_back(ImportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "support_overrides/language_enabled"), Vector<String>()));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "support_overrides/language_disabled"), Vector<String>()));
+
+ r_options->push_back(ImportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "support_overrides/script_enabled"), Vector<String>()));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "support_overrides/script_disabled"), Vector<String>()));
+}
+
+bool ResourceImporterDynamicFont::_decode_variation(const String &p_token, Dictionary &r_variations, Vector2i &r_size, String &r_name, Vector2i &r_spacing) {
+ Vector<String> tokens = p_token.split("=");
+ if (tokens.size() == 2) {
+ if (tokens[0] == "name") {
+ r_name = tokens[1];
+ } else if (tokens[0] == "size") {
+ r_size.x = tokens[1].to_int();
+ } else if (tokens[0] == "outline_size") {
+ r_size.y = tokens[1].to_int();
+ } else if (tokens[0] == "spacing_space") {
+ r_spacing.x = tokens[1].to_int();
+ } else if (tokens[0] == "spacing_glyph") {
+ r_spacing.y = tokens[1].to_int();
+ } else {
+ r_variations[tokens[0]] = tokens[1].to_float();
+ }
+ return true;
+ } else {
+ WARN_PRINT("Invalid variation: '" + p_token + "'.");
+ return false;
+ }
+}
+
+bool ResourceImporterDynamicFont::_decode_range(const String &p_token, int32_t &r_pos) {
+ if (p_token.begins_with("U+") || p_token.begins_with("u+") || p_token.begins_with("0x")) {
+ // Unicode character hex index.
+ r_pos = p_token.substr(2).hex_to_int();
+ return true;
+ } else if (p_token.length() == 3 && p_token[0] == '\'' && p_token[2] == '\'') {
+ // Unicode character.
+ r_pos = p_token.unicode_at(1);
+ return true;
+ } else if (p_token.is_numeric()) {
+ // Unicode character decimal index.
+ r_pos = p_token.to_int();
+ return true;
+ } else {
+ return false;
+ }
+}
+
+bool ResourceImporterDynamicFont::has_advanced_options() const {
+ return true;
+}
+void ResourceImporterDynamicFont::show_advanced_options(const String &p_path) {
+ DynamicFontImportSettings::get_singleton()->open_settings(p_path);
+}
+
+Error ResourceImporterDynamicFont::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
+ print_verbose("Importing dynamic font from: " + p_source_file);
+
+ bool antialiased = p_options["antialiased"];
+ bool msdf = p_options["multichannel_signed_distance_field"];
+ int px_range = p_options["msdf_pixel_range"];
+ int px_size = p_options["msdf_size"];
+
+ bool autohinter = p_options["force_autohinter"];
+ int hinting = p_options["hinting"];
+ real_t oversampling = p_options["oversampling"];
+
+ // Load base font data.
+ Vector<uint8_t> data = FileAccess::get_file_as_array(p_source_file);
+
+ // Create font.
+ Ref<FontData> font;
+ font.instantiate();
+ font->set_data(data);
+ font->set_antialiased(antialiased);
+ font->set_multichannel_signed_distance_field(msdf);
+ font->set_msdf_pixel_range(px_range);
+ font->set_msdf_size(px_size);
+ font->set_fixed_size(0);
+ font->set_force_autohinter(autohinter);
+ font->set_hinting((TextServer::Hinting)hinting);
+ font->set_oversampling(oversampling);
+
+ Vector<String> lang_en = p_options["support_overrides/language_enabled"];
+ for (int i = 0; i < lang_en.size(); i++) {
+ font->set_language_support_override(lang_en[i], true);
+ }
+
+ Vector<String> lang_dis = p_options["support_overrides/language_disabled"];
+ for (int i = 0; i < lang_dis.size(); i++) {
+ font->set_language_support_override(lang_dis[i], false);
+ }
+
+ Vector<String> scr_en = p_options["support_overrides/script_enabled"];
+ for (int i = 0; i < scr_en.size(); i++) {
+ font->set_script_support_override(scr_en[i], true);
+ }
+
+ Vector<String> scr_dis = p_options["support_overrides/script_disabled"];
+ for (int i = 0; i < scr_dis.size(); i++) {
+ font->set_script_support_override(scr_dis[i], false);
+ }
+
+ Vector<String> variations = p_options["preload/configurations"];
+ Vector<String> char_ranges = p_options["preload/char_ranges"];
+ Vector<String> gl_ranges = p_options["preload/glyph_ranges"];
+
+ for (int i = 0; i < variations.size(); i++) {
+ String name;
+ Dictionary var;
+ Vector2i size = Vector2(16, 0);
+ Vector2i spacing;
+
+ Vector<String> variation_tags = variations[i].split(",");
+ for (int j = 0; j < variation_tags.size(); j++) {
+ if (!_decode_variation(variation_tags[j], var, size, name, spacing)) {
+ WARN_PRINT(vformat(TTR("Invalid variation: \"%s\""), variations[i]));
+ continue;
+ }
+ }
+ RID conf = font->find_cache(var);
+
+ for (int j = 0; j < char_ranges.size(); j++) {
+ int32_t start, end;
+ Vector<String> tokens = char_ranges[j].split("-");
+ if (tokens.size() == 2) {
+ if (!_decode_range(tokens[0], start) || !_decode_range(tokens[1], end)) {
+ WARN_PRINT(vformat(TTR("Invalid range: \"%s\""), char_ranges[j]));
+ continue;
+ }
+ } else if (tokens.size() == 1) {
+ if (!_decode_range(tokens[0], start)) {
+ WARN_PRINT(vformat(TTR("Invalid range: \"%s\""), char_ranges[j]));
+ continue;
+ }
+ end = start;
+ } else {
+ WARN_PRINT(vformat(TTR("Invalid range: \"%s\""), char_ranges[j]));
+ continue;
+ }
+
+ // Preload character ranges for each variations / sizes.
+ print_verbose(vformat(TTR("Pre-rendering range U+%s...%s from configuration \"%s\" (%d / %d)..."), String::num_int64(start, 16), String::num_int64(end, 16), name, i + 1, variations.size()));
+ TS->font_render_range(conf, size, start, end);
+ }
+
+ for (int j = 0; j < gl_ranges.size(); j++) {
+ int32_t start, end;
+ Vector<String> tokens = gl_ranges[j].split("-");
+ if (tokens.size() == 2) {
+ if (!_decode_range(tokens[0], start) || !_decode_range(tokens[1], end)) {
+ WARN_PRINT(vformat(TTR("Invalid range: \"%s\""), gl_ranges[j]));
+ continue;
+ }
+ } else if (tokens.size() == 1) {
+ if (!_decode_range(tokens[0], start)) {
+ WARN_PRINT(vformat(TTR("Invalid range: \"%s\""), gl_ranges[j]));
+ continue;
+ }
+ end = start;
+ } else {
+ WARN_PRINT(vformat(TTR("Invalid range: \"%s\""), gl_ranges[j]));
+ continue;
+ }
+
+ // Preload glyph range for each variations / sizes.
+ print_verbose(vformat(TTR("Pre-rendering glyph range 0x%s...%s from configuration \"%s\" (%d / %d)..."), String::num_int64(start, 16), String::num_int64(end, 16), name, i + 1, variations.size()));
+ for (int32_t k = start; k <= end; k++) {
+ TS->font_render_glyph(conf, size, k);
+ }
+ }
+
+ TS->font_set_spacing(conf, size.x, TextServer::SPACING_SPACE, spacing.x);
+ TS->font_set_spacing(conf, size.x, TextServer::SPACING_GLYPH, spacing.y);
+ }
+
+ int flg = ResourceSaver::SaverFlags::FLAG_BUNDLE_RESOURCES | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
+ if ((bool)p_options["compress"]) {
+ flg |= ResourceSaver::SaverFlags::FLAG_COMPRESS;
+ }
+
+ print_verbose("Saving to: " + p_save_path + ".fontdata");
+ Error err = ResourceSaver::save(p_save_path + ".fontdata", font, flg);
+ ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save font to file \"" + p_save_path + ".res\".");
+ print_verbose("Done saving to: " + p_save_path + ".fontdata");
+ return OK;
+}
+
+ResourceImporterDynamicFont::ResourceImporterDynamicFont() {
+}
diff --git a/core/io/multiplayer_peer.h b/editor/import/resource_importer_dynamicfont.h
index 7ca4e7930b..52f256ab96 100644
--- a/core/io/multiplayer_peer.h
+++ b/editor/import/resource_importer_dynamicfont.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* multiplayer_peer.h */
+/* resource_importer_dynamicfont.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,58 +28,44 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef NETWORKED_MULTIPLAYER_PEER_H
-#define NETWORKED_MULTIPLAYER_PEER_H
+#ifndef RESOURCE_IMPORTER_FONT_DATA_H
+#define RESOURCE_IMPORTER_FONT_DATA_H
-#include "core/io/packet_peer.h"
+#include "core/io/resource_importer.h"
+#include "scene/resources/font.h"
+#include "servers/text_server.h"
-class MultiplayerPeer : public PacketPeer {
- GDCLASS(MultiplayerPeer, PacketPeer);
+class ResourceImporterDynamicFont : public ResourceImporter {
+ GDCLASS(ResourceImporterDynamicFont, ResourceImporter);
-protected:
- static void _bind_methods();
-
-public:
- enum {
- TARGET_PEER_BROADCAST = 0,
- TARGET_PEER_SERVER = 1
- };
- enum TransferMode {
- TRANSFER_MODE_UNRELIABLE,
- TRANSFER_MODE_UNRELIABLE_ORDERED,
- TRANSFER_MODE_RELIABLE,
- };
-
- enum ConnectionStatus {
- CONNECTION_DISCONNECTED,
- CONNECTION_CONNECTING,
- CONNECTION_CONNECTED,
+ enum Presets {
+ PRESET_DYNAMIC,
+ PRESET_MSDF,
+ PRESET_MAX
};
- virtual void set_transfer_channel(int p_channel) = 0;
- virtual int get_transfer_channel() const = 0;
- virtual void set_transfer_mode(TransferMode p_mode) = 0;
- virtual TransferMode get_transfer_mode() const = 0;
- virtual void set_target_peer(int p_peer_id) = 0;
-
- virtual int get_packet_peer() const = 0;
+public:
+ static bool _decode_range(const String &p_token, int32_t &r_pos);
+ static bool _decode_variation(const String &p_token, Dictionary &r_variations, Vector2i &r_size, String &r_name, Vector2i &r_spacing);
- virtual bool is_server() const = 0;
+ virtual String get_importer_name() const override;
+ virtual String get_visible_name() const override;
+ virtual void get_recognized_extensions(List<String> *p_extensions) const override;
+ virtual String get_save_extension() const override;
+ virtual String get_resource_type() const override;
- virtual void poll() = 0;
+ virtual int get_preset_count() const override;
+ virtual String get_preset_name(int p_idx) const override;
- virtual int get_unique_id() const = 0;
+ virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override;
+ virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override;
- virtual void set_refuse_new_connections(bool p_enable) = 0;
- virtual bool is_refusing_new_connections() const = 0;
+ bool has_advanced_options() const override;
+ void show_advanced_options(const String &p_path) override;
- virtual ConnectionStatus get_connection_status() const = 0;
- uint32_t generate_unique_id() const;
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override;
- MultiplayerPeer() {}
+ ResourceImporterDynamicFont();
};
-VARIANT_ENUM_CAST(MultiplayerPeer::TransferMode)
-VARIANT_ENUM_CAST(MultiplayerPeer::ConnectionStatus)
-
-#endif // NETWORKED_MULTIPLAYER_PEER_H
+#endif // RESOURCE_IMPORTER_FONTDATA_H
diff --git a/editor/import/resource_importer_imagefont.cpp b/editor/import/resource_importer_imagefont.cpp
new file mode 100644
index 0000000000..997280d1dd
--- /dev/null
+++ b/editor/import/resource_importer_imagefont.cpp
@@ -0,0 +1,162 @@
+/*************************************************************************/
+/* resource_importer_imagefont.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "resource_importer_imagefont.h"
+
+#include "core/io/image_loader.h"
+#include "core/io/resource_saver.h"
+
+String ResourceImporterImageFont::get_importer_name() const {
+ return "font_data_image";
+}
+
+String ResourceImporterImageFont::get_visible_name() const {
+ return "Font Data (Monospace Image Font)";
+}
+
+void ResourceImporterImageFont::get_recognized_extensions(List<String> *p_extensions) const {
+ if (p_extensions) {
+ ImageLoader::get_recognized_extensions(p_extensions);
+ }
+}
+
+String ResourceImporterImageFont::get_save_extension() const {
+ return "fontdata";
+}
+
+String ResourceImporterImageFont::get_resource_type() const {
+ return "FontData";
+}
+
+bool ResourceImporterImageFont::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
+ return true;
+}
+
+void ResourceImporterImageFont::get_import_options(List<ImportOption> *r_options, int p_preset) const {
+ r_options->push_back(ImportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "character_ranges"), Vector<String>()));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "columns"), 1));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "rows"), 1));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "font_size"), 14));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true));
+}
+
+bool ResourceImporterImageFont::_decode_range(const String &p_token, int32_t &r_pos) {
+ if (p_token.begins_with("U+") || p_token.begins_with("u+") || p_token.begins_with("0x")) {
+ // Unicode character hex index.
+ r_pos = p_token.substr(2).hex_to_int();
+ return true;
+ } else if (p_token.length() == 3 && p_token[0] == '\'' && p_token[2] == '\'') {
+ // Unicode character.
+ r_pos = p_token.unicode_at(1);
+ return true;
+ } else if (p_token.is_numeric()) {
+ // Unicode character decimal index.
+ r_pos = p_token.to_int();
+ return true;
+ } else {
+ return false;
+ }
+}
+
+Error ResourceImporterImageFont::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
+ print_verbose("Importing image font from: " + p_source_file);
+
+ int columns = p_options["columns"];
+ int rows = p_options["rows"];
+ int base_size = p_options["font_size"];
+ Vector<String> ranges = p_options["character_ranges"];
+
+ Ref<FontData> font;
+ font.instantiate();
+ font->set_antialiased(false);
+ font->set_multichannel_signed_distance_field(false);
+ font->set_fixed_size(base_size);
+ font->set_force_autohinter(false);
+ font->set_hinting(TextServer::HINTING_NONE);
+ font->set_oversampling(1.0f);
+
+ Ref<Image> img;
+ img.instantiate();
+ Error err = ImageLoader::load_image(p_source_file, img);
+ ERR_FAIL_COND_V_MSG(err != OK, ERR_FILE_CANT_READ, TTR("Can't load font texture: ") + "\"" + p_source_file + "\".");
+ font->set_texture_image(0, Vector2i(base_size, 0), 0, img);
+
+ int count = columns * rows;
+ int chr_width = img->get_width() / columns;
+ int chr_height = img->get_height() / rows;
+ int pos = 0;
+
+ for (int i = 0; i < ranges.size(); i++) {
+ int32_t start, end;
+ Vector<String> tokens = ranges[i].split("-");
+ if (tokens.size() == 2) {
+ if (!_decode_range(tokens[0], start) || !_decode_range(tokens[1], end)) {
+ WARN_PRINT("Invalid range: \"" + ranges[i] + "\"");
+ continue;
+ }
+ } else if (tokens.size() == 1) {
+ if (!_decode_range(tokens[0], start)) {
+ WARN_PRINT("Invalid range: \"" + ranges[i] + "\"");
+ continue;
+ }
+ end = start;
+ } else {
+ WARN_PRINT("Invalid range: \"" + ranges[i] + "\"");
+ continue;
+ }
+ for (int32_t idx = start; idx <= end; idx++) {
+ int x = pos % columns;
+ int y = pos / columns;
+ font->set_glyph_advance(0, base_size, idx, Vector2(chr_width, 0));
+ font->set_glyph_offset(0, Vector2i(base_size, 0), idx, Vector2(0, -0.5 * chr_height));
+ font->set_glyph_size(0, Vector2i(base_size, 0), idx, Vector2(chr_width, chr_height));
+ font->set_glyph_uv_rect(0, Vector2i(base_size, 0), idx, Rect2(chr_width * x, chr_height * y, chr_width, chr_height));
+ font->set_glyph_texture_idx(0, Vector2i(base_size, 0), idx, 0);
+ pos++;
+ ERR_FAIL_COND_V_MSG(pos >= count, ERR_CANT_CREATE, "Too many characters in range.");
+ }
+ }
+ font->set_ascent(0, base_size, 0.5 * chr_height);
+ font->set_descent(0, base_size, 0.5 * chr_height);
+
+ int flg = ResourceSaver::SaverFlags::FLAG_BUNDLE_RESOURCES | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
+ if ((bool)p_options["compress"]) {
+ flg |= ResourceSaver::SaverFlags::FLAG_COMPRESS;
+ }
+
+ print_verbose("Saving to: " + p_save_path + ".fontdata");
+ err = ResourceSaver::save(p_save_path + ".fontdata", font, flg);
+ ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save font to file \"" + p_save_path + ".res\".");
+ print_verbose("Done saving to: " + p_save_path + ".fontdata");
+ return OK;
+}
+
+ResourceImporterImageFont::ResourceImporterImageFont() {
+}
diff --git a/editor/import/resource_importer_imagefont.h b/editor/import/resource_importer_imagefont.h
new file mode 100644
index 0000000000..9b2b38596f
--- /dev/null
+++ b/editor/import/resource_importer_imagefont.h
@@ -0,0 +1,58 @@
+/*************************************************************************/
+/* resource_importer_imagefont.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef RESOURCE_IMPORTER_IMAGE_FONT_H
+#define RESOURCE_IMPORTER_IMAGE_FONT_H
+
+#include "core/io/resource_importer.h"
+#include "scene/resources/font.h"
+#include "servers/text_server.h"
+
+class ResourceImporterImageFont : public ResourceImporter {
+ GDCLASS(ResourceImporterImageFont, ResourceImporter);
+
+public:
+ static bool _decode_range(const String &p_token, int32_t &r_pos);
+
+ virtual String get_importer_name() const override;
+ virtual String get_visible_name() const override;
+ virtual void get_recognized_extensions(List<String> *p_extensions) const override;
+ virtual String get_save_extension() const override;
+ virtual String get_resource_type() const override;
+
+ virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override;
+ virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override;
+
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override;
+
+ ResourceImporterImageFont();
+};
+
+#endif // RESOURCE_IMPORTER_IMAGE_FONT_H
diff --git a/editor/import/resource_importer_obj.h b/editor/import/resource_importer_obj.h
index 414e0c1fe6..1bb5ef33ce 100644
--- a/editor/import/resource_importer_obj.h
+++ b/editor/import/resource_importer_obj.h
@@ -64,6 +64,9 @@ public:
virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override;
+ // Threaded import can currently cause deadlocks, see GH-48265.
+ virtual bool can_import_threaded() const override { return false; }
+
ResourceImporterOBJ();
};
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 492fa3f965..c48d9bb117 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -46,21 +46,23 @@
#include "scene/resources/box_shape_3d.h"
#include "scene/resources/packed_scene.h"
#include "scene/resources/resource_format_text.h"
+#include "scene/resources/separation_ray_shape_3d.h"
#include "scene/resources/sphere_shape_3d.h"
#include "scene/resources/surface_tool.h"
-#include "scene/resources/world_margin_shape_3d.h"
+#include "scene/resources/world_boundary_shape_3d.h"
uint32_t EditorSceneImporter::get_import_flags() const {
- if (get_script_instance()) {
- return get_script_instance()->call("_get_import_flags");
+ int ret;
+ if (GDVIRTUAL_CALL(_get_import_flags, ret)) {
+ return ret;
}
ERR_FAIL_V(0);
}
void EditorSceneImporter::get_extensions(List<String> *r_extensions) const {
- if (get_script_instance()) {
- Array arr = get_script_instance()->call("_get_extensions");
+ Vector<String> arr;
+ if (GDVIRTUAL_CALL(_get_extensions, arr)) {
for (int i = 0; i < arr.size(); i++) {
r_extensions->push_back(arr[i]);
}
@@ -71,16 +73,18 @@ void EditorSceneImporter::get_extensions(List<String> *r_extensions) const {
}
Node *EditorSceneImporter::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
- if (get_script_instance()) {
- return get_script_instance()->call("_import_scene", p_path, p_flags, p_bake_fps);
+ Object *ret;
+ if (GDVIRTUAL_CALL(_import_scene, p_path, p_flags, p_bake_fps, ret)) {
+ return Object::cast_to<Node>(ret);
}
ERR_FAIL_V(nullptr);
}
Ref<Animation> EditorSceneImporter::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) {
- if (get_script_instance()) {
- return get_script_instance()->call("_import_animation", p_path, p_flags);
+ Ref<Animation> ret;
+ if (GDVIRTUAL_CALL(_import_animation, p_path, p_flags, p_bake_fps, ret)) {
+ return ret;
}
ERR_FAIL_V(nullptr);
@@ -101,15 +105,10 @@ void EditorSceneImporter::_bind_methods() {
ClassDB::bind_method(D_METHOD("import_scene_from_other_importer", "path", "flags", "bake_fps"), &EditorSceneImporter::import_scene_from_other_importer);
ClassDB::bind_method(D_METHOD("import_animation_from_other_importer", "path", "flags", "bake_fps"), &EditorSceneImporter::import_animation_from_other_importer);
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_import_flags"));
- BIND_VMETHOD(MethodInfo(Variant::ARRAY, "_get_extensions"));
-
- MethodInfo mi = MethodInfo(Variant::OBJECT, "_import_scene", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "flags"), PropertyInfo(Variant::INT, "bake_fps"));
- mi.return_val.class_name = "Node";
- BIND_VMETHOD(mi);
- mi = MethodInfo(Variant::OBJECT, "_import_animation", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::INT, "flags"), PropertyInfo(Variant::INT, "bake_fps"));
- mi.return_val.class_name = "Animation";
- BIND_VMETHOD(mi);
+ GDVIRTUAL_BIND(_get_import_flags);
+ GDVIRTUAL_BIND(_get_extensions);
+ GDVIRTUAL_BIND(_import_scene, "path", "flags", "bake_fps");
+ GDVIRTUAL_BIND(_import_animation, "path", "flags", "bake_fps");
BIND_CONSTANT(IMPORT_SCENE);
BIND_CONSTANT(IMPORT_ANIMATION);
@@ -120,13 +119,14 @@ void EditorSceneImporter::_bind_methods() {
/////////////////////////////////
void EditorScenePostImport::_bind_methods() {
- BIND_VMETHOD(MethodInfo(Variant::OBJECT, "_post_import", PropertyInfo(Variant::OBJECT, "scene")));
+ GDVIRTUAL_BIND(_post_import, "scene")
ClassDB::bind_method(D_METHOD("get_source_file"), &EditorScenePostImport::get_source_file);
}
Node *EditorScenePostImport::post_import(Node *p_scene) {
- if (get_script_instance()) {
- return get_script_instance()->call("_post_import", p_scene);
+ Object *ret;
+ if (GDVIRTUAL_CALL(_post_import, p_scene, ret)) {
+ return Object::cast_to<Node>(ret);
}
return p_scene;
@@ -233,13 +233,14 @@ static String _fixstr(const String &p_what, const String &p_str) {
return what;
}
-static void _pre_gen_shape_list(const Ref<EditorSceneImporterMesh> &mesh, List<Ref<Shape3D>> &r_shape_list, bool p_convex) {
+static void _pre_gen_shape_list(Ref<EditorSceneImporterMesh> &mesh, Vector<Ref<Shape3D>> &r_shape_list, bool p_convex) {
ERR_FAIL_NULL_MSG(mesh, "Cannot generate shape list with null mesh value");
if (!p_convex) {
Ref<Shape3D> shape = mesh->create_trimesh_shape();
r_shape_list.push_back(shape);
} else {
- Vector<Ref<Shape3D>> cd = mesh->convex_decompose();
+ Vector<Ref<Shape3D>> cd;
+ cd.push_back(mesh->get_mesh()->create_convex_shape(true, /*Passing false, otherwise VHACD will be used to simplify (Decompose) the Mesh.*/ false));
if (cd.size()) {
for (int i = 0; i < cd.size(); i++) {
r_shape_list.push_back(cd[i]);
@@ -248,7 +249,7 @@ static void _pre_gen_shape_list(const Ref<EditorSceneImporterMesh> &mesh, List<R
}
}
-Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<EditorSceneImporterMesh>, List<Ref<Shape3D>>> &collision_map) {
+Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<EditorSceneImporterMesh>, Vector<Ref<Shape3D>>> &collision_map) {
// children first
for (int i = 0; i < p_node->get_child_count(); i++) {
Node *r = _pre_fix_node(p_node->get_child(i), p_root, collision_map);
@@ -335,7 +336,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E
Ref<EditorSceneImporterMesh> mesh = mi->get_mesh();
if (mesh.is_valid()) {
- List<Ref<Shape3D>> shapes;
+ Vector<Ref<Shape3D>> shapes;
String fixed_name;
if (collision_map.has(mesh)) {
shapes = collision_map[mesh];
@@ -380,9 +381,14 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E
BoxShape3D *boxShape = memnew(BoxShape3D);
boxShape->set_size(Vector3(2, 2, 2));
colshape->set_shape(boxShape);
+ } else if (empty_draw_type == "SINGLE_ARROW") {
+ SeparationRayShape3D *rayShape = memnew(SeparationRayShape3D);
+ rayShape->set_length(1);
+ colshape->set_shape(rayShape);
+ Object::cast_to<Node3D>(sb)->rotate_x(Math_PI / 2);
} else if (empty_draw_type == "IMAGE") {
- WorldMarginShape3D *world_margin_shape = memnew(WorldMarginShape3D);
- colshape->set_shape(world_margin_shape);
+ WorldBoundaryShape3D *world_boundary_shape = memnew(WorldBoundaryShape3D);
+ colshape->set_shape(world_boundary_shape);
} else {
SphereShape3D *sphereShape = memnew(SphereShape3D);
sphereShape->set_radius(1);
@@ -401,15 +407,15 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E
Ref<EditorSceneImporterMesh> mesh = mi->get_mesh();
if (mesh.is_valid()) {
- List<Ref<Shape3D>> shapes;
+ Vector<Ref<Shape3D>> shapes;
if (collision_map.has(mesh)) {
shapes = collision_map[mesh];
} else {
_pre_gen_shape_list(mesh, shapes, true);
}
- RigidBody3D *rigid_body = memnew(RigidBody3D);
- rigid_body->set_name(_fixstr(name, "rigid"));
+ RigidDynamicBody3D *rigid_body = memnew(RigidDynamicBody3D);
+ rigid_body->set_name(_fixstr(name, "rigid_body"));
p_node->replace_by(rigid_body);
rigid_body->set_transform(mi->get_transform());
p_node = rigid_body;
@@ -426,7 +432,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E
Ref<EditorSceneImporterMesh> mesh = mi->get_mesh();
if (mesh.is_valid()) {
- List<Ref<Shape3D>> shapes;
+ Vector<Ref<Shape3D>> shapes;
String fixed_name;
if (collision_map.has(mesh)) {
shapes = collision_map[mesh];
@@ -485,7 +491,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E
Ref<EditorSceneImporterMesh> mesh = mi->get_mesh();
if (!mesh.is_null()) {
- List<Ref<Shape3D>> shapes;
+ Vector<Ref<Shape3D>> shapes;
if (collision_map.has(mesh)) {
shapes = collision_map[mesh];
} else if (_teststr(mesh->get_name(), "col")) {
@@ -511,7 +517,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E
return p_node;
}
-Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<EditorSceneImporterMesh>, List<Ref<Shape3D>>> &collision_map, Set<Ref<EditorSceneImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) {
+Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<EditorSceneImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Set<Ref<EditorSceneImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) {
// children first
for (int i = 0; i < p_node->get_child_count(); i++) {
Node *r = _post_fix_node(p_node->get_child(i), p_root, collision_map, r_scanned_meshes, p_node_data, p_material_data, p_animation_data, p_animation_fps);
@@ -574,28 +580,35 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<
}
if (node_settings.has("generate/physics")) {
- int mesh_physics_mode = node_settings["generate/physics"];
-
- if (mesh_physics_mode != MESH_PHYSICS_DISABLED) {
- List<Ref<Shape3D>> shapes;
+ int mesh_physics_mode = MeshPhysicsMode::MESH_PHYSICS_DISABLED;
+
+ const bool generate_collider = node_settings["generate/physics"];
+ if (generate_collider) {
+ mesh_physics_mode = MeshPhysicsMode::MESH_PHYSICS_MESH_AND_STATIC_COLLIDER;
+ if (node_settings.has("physics/body_type")) {
+ const BodyType body_type = (BodyType)node_settings["physics/body_type"].operator int();
+ switch (body_type) {
+ case BODY_TYPE_STATIC:
+ mesh_physics_mode = MeshPhysicsMode::MESH_PHYSICS_MESH_AND_STATIC_COLLIDER;
+ break;
+ case BODY_TYPE_DYNAMIC:
+ mesh_physics_mode = MeshPhysicsMode::MESH_PHYSICS_RIGID_BODY_AND_MESH;
+ break;
+ case BODY_TYPE_AREA:
+ mesh_physics_mode = MeshPhysicsMode::MESH_PHYSICS_AREA_ONLY;
+ break;
+ }
+ }
+ }
+ if (mesh_physics_mode != MeshPhysicsMode::MESH_PHYSICS_DISABLED) {
+ Vector<Ref<Shape3D>> shapes;
if (collision_map.has(m)) {
shapes = collision_map[m];
} else {
- switch (mesh_physics_mode) {
- case MESH_PHYSICS_MESH_AND_STATIC_COLLIDER: {
- _pre_gen_shape_list(m, shapes, false);
- } break;
- case MESH_PHYSICS_RIGID_BODY_AND_MESH: {
- _pre_gen_shape_list(m, shapes, true);
- } break;
- case MESH_PHYSICS_STATIC_COLLIDER_ONLY: {
- _pre_gen_shape_list(m, shapes, false);
- } break;
- case MESH_PHYSICS_AREA_ONLY: {
- _pre_gen_shape_list(m, shapes, true);
- } break;
- }
+ shapes = get_collision_shapes(
+ m->get_mesh(),
+ node_settings);
}
if (shapes.size()) {
@@ -604,13 +617,15 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<
case MESH_PHYSICS_MESH_AND_STATIC_COLLIDER: {
StaticBody3D *col = memnew(StaticBody3D);
p_node->add_child(col);
+ col->set_owner(p_node->get_owner());
+ col->set_transform(get_collision_shapes_transform(node_settings));
base = col;
} break;
case MESH_PHYSICS_RIGID_BODY_AND_MESH: {
- RigidBody3D *rigid_body = memnew(RigidBody3D);
+ RigidDynamicBody3D *rigid_body = memnew(RigidDynamicBody3D);
rigid_body->set_name(p_node->get_name());
p_node->replace_by(rigid_body);
- rigid_body->set_transform(mi->get_transform());
+ rigid_body->set_transform(mi->get_transform() * get_collision_shapes_transform(node_settings));
p_node = rigid_body;
mi->set_transform(Transform3D());
rigid_body->add_child(mi);
@@ -619,7 +634,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<
} break;
case MESH_PHYSICS_STATIC_COLLIDER_ONLY: {
StaticBody3D *col = memnew(StaticBody3D);
- col->set_transform(mi->get_transform());
+ col->set_transform(mi->get_transform() * get_collision_shapes_transform(node_settings));
col->set_name(p_node->get_name());
p_node->replace_by(col);
memdelete(p_node);
@@ -628,7 +643,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<
} break;
case MESH_PHYSICS_AREA_ONLY: {
Area3D *area = memnew(Area3D);
- area->set_transform(mi->get_transform());
+ area->set_transform(mi->get_transform() * get_collision_shapes_transform(node_settings));
area->set_name(p_node->get_name());
p_node->replace_by(area);
memdelete(p_node);
@@ -928,8 +943,35 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p
} break;
case INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE: {
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "import/skip_import", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "generate/physics", PROPERTY_HINT_ENUM, "Disabled,Mesh + Static Collider,Rigid Body + Mesh,Static Collider Only,Area Only"), 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "generate/physics", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "generate/navmesh", PROPERTY_HINT_ENUM, "Disabled,Mesh + NavMesh,NavMesh Only"), 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "physics/body_type", PROPERTY_HINT_ENUM, "Static,Dynamic,Area"), 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "physics/shape_type", PROPERTY_HINT_ENUM, "Decompose Convex,Simple Convex,Trimesh,Box,Sphere,Cylinder,Capsule", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0));
+
+ // Decomposition
+ Mesh::ConvexDecompositionSettings decomposition_default;
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "decomposition/advanced", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "decomposition/precision", PROPERTY_HINT_RANGE, "1,10,1"), 5));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "decomposition/max_concavity", PROPERTY_HINT_RANGE, "0.0,1.0,0.001", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), decomposition_default.max_concavity));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "decomposition/symmetry_planes_clipping_bias", PROPERTY_HINT_RANGE, "0.0,1.0,0.001", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), decomposition_default.symmetry_planes_clipping_bias));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "decomposition/revolution_axes_clipping_bias", PROPERTY_HINT_RANGE, "0.0,1.0,0.001", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), decomposition_default.revolution_axes_clipping_bias));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "decomposition/min_volume_per_convex_hull", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), decomposition_default.min_volume_per_convex_hull));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "decomposition/resolution", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), decomposition_default.resolution));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "decomposition/max_num_vertices_per_convex_hull", PROPERTY_HINT_RANGE, "5,512,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), decomposition_default.max_num_vertices_per_convex_hull));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "decomposition/plane_downsampling", PROPERTY_HINT_RANGE, "1,16,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), decomposition_default.plane_downsampling));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "decomposition/convexhull_downsampling", PROPERTY_HINT_RANGE, "1,16,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), decomposition_default.convexhull_downsampling));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "decomposition/normalize_mesh", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), decomposition_default.normalize_mesh));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "decomposition/mode", PROPERTY_HINT_ENUM, "Voxel,Tetrahedron", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), static_cast<int>(decomposition_default.mode)));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "decomposition/convexhull_approximation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), decomposition_default.convexhull_approximation));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "decomposition/max_convex_hulls", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), decomposition_default.max_convex_hulls));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "decomposition/project_hull_vertices", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), decomposition_default.project_hull_vertices));
+
+ // Primitives: Box, Sphere, Cylinder, Capsule.
+ r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "primitive/size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), Vector3(2.0, 2.0, 2.0)));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "primitive/height", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 1.0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "primitive/radius", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 1.0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "primitive/position", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), Vector3()));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::VECTOR3, "primitive/rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), Vector3()));
} break;
case INTERNAL_IMPORT_CATEGORY_MESH: {
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "save_to_file/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
@@ -980,6 +1022,65 @@ bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategor
case INTERNAL_IMPORT_CATEGORY_NODE: {
} break;
case INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE: {
+ const bool generate_physics =
+ p_options.has("generate/physics") &&
+ p_options["generate/physics"].operator bool();
+
+ if (
+ p_option == "physics/body_type" ||
+ p_option == "physics/shape_type") {
+ // Show if need to generate collisions.
+ return generate_physics;
+ }
+
+ if (p_option.find("decomposition/") >= 0) {
+ // Show if need to generate collisions.
+ if (generate_physics &&
+ // Show if convex is enabled.
+ p_options["physics/shape_type"] == Variant(SHAPE_TYPE_DECOMPOSE_CONVEX)) {
+ if (p_option == "decomposition/advanced") {
+ return true;
+ }
+
+ const bool decomposition_advanced =
+ p_options.has("decomposition/advanced") &&
+ p_options["decomposition/advanced"].operator bool();
+
+ if (p_option == "decomposition/precision") {
+ return !decomposition_advanced;
+ } else {
+ return decomposition_advanced;
+ }
+ }
+
+ return false;
+ }
+
+ if (p_option == "primitive/position" || p_option == "primitive/rotation") {
+ const ShapeType physics_shape = (ShapeType)p_options["physics/shape_type"].operator int();
+ return generate_physics &&
+ physics_shape >= SHAPE_TYPE_BOX;
+ }
+
+ if (p_option == "primitive/size") {
+ const ShapeType physics_shape = (ShapeType)p_options["physics/shape_type"].operator int();
+ return generate_physics &&
+ physics_shape == SHAPE_TYPE_BOX;
+ }
+
+ if (p_option == "primitive/radius") {
+ const ShapeType physics_shape = (ShapeType)p_options["physics/shape_type"].operator int();
+ return generate_physics && (physics_shape == SHAPE_TYPE_SPHERE ||
+ physics_shape == SHAPE_TYPE_CYLINDER ||
+ physics_shape == SHAPE_TYPE_CAPSULE);
+ }
+
+ if (p_option == "primitive/height") {
+ const ShapeType physics_shape = (ShapeType)p_options["physics/shape_type"].operator int();
+ return generate_physics &&
+ (physics_shape == SHAPE_TYPE_CYLINDER ||
+ physics_shape == SHAPE_TYPE_CAPSULE);
+ }
} break;
case INTERNAL_IMPORT_CATEGORY_MESH: {
if (p_option == "save_to_file/path" || p_option == "save_to_file/make_streamable") {
@@ -1016,6 +1117,33 @@ bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategor
return true;
}
+bool ResourceImporterScene::get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const {
+ switch (p_category) {
+ case INTERNAL_IMPORT_CATEGORY_NODE: {
+ } break;
+ case INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE: {
+ if (
+ p_option == "generate/physics" ||
+ p_option == "physics/shape_type" ||
+ p_option.find("decomposition/") >= 0 ||
+ p_option.find("primitive/") >= 0) {
+ return true;
+ }
+ } break;
+ case INTERNAL_IMPORT_CATEGORY_MESH: {
+ } break;
+ case INTERNAL_IMPORT_CATEGORY_MATERIAL: {
+ } break;
+ case INTERNAL_IMPORT_CATEGORY_ANIMATION: {
+ } break;
+ case INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE: {
+ } break;
+ default: {
+ }
+ }
+ return false;
+}
+
void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, int p_preset) const {
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/root_type", PROPERTY_HINT_TYPE_STRING, "Node"), "Node3D"));
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/root_name"), "Scene Root"));
@@ -1270,7 +1398,7 @@ void ResourceImporterScene::_generate_meshes(Node *p_node, const Dictionary &p_m
}
}
-void ResourceImporterScene::_add_shapes(Node *p_node, const List<Ref<Shape3D>> &p_shapes) {
+void ResourceImporterScene::_add_shapes(Node *p_node, const Vector<Ref<Shape3D>> &p_shapes) {
for (const Ref<Shape3D> &E : p_shapes) {
CollisionShape3D *cshape = memnew(CollisionShape3D);
cshape->set_shape(E);
@@ -1311,7 +1439,7 @@ Node *ResourceImporterScene::pre_import(const String &p_source_file) {
return nullptr;
}
- Map<Ref<EditorSceneImporterMesh>, List<Ref<Shape3D>>> collision_map;
+ Map<Ref<EditorSceneImporterMesh>, Vector<Ref<Shape3D>>> collision_map;
_pre_fix_node(scene, scene, collision_map);
@@ -1387,7 +1515,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
}
Set<Ref<EditorSceneImporterMesh>> scanned_meshes;
- Map<Ref<EditorSceneImporterMesh>, List<Ref<Shape3D>>> collision_map;
+ Map<Ref<EditorSceneImporterMesh>, Vector<Ref<Shape3D>>> collision_map;
_pre_fix_node(scene, scene, collision_map);
_post_fix_node(scene, scene, collision_map, scanned_meshes, node_data, material_data, animation_data, fps);
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index 781beff689..e232b715be 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -51,6 +51,11 @@ protected:
Node *import_scene_from_other_importer(const String &p_path, uint32_t p_flags, int p_bake_fps);
Ref<Animation> import_animation_from_other_importer(const String &p_path, uint32_t p_flags, int p_bake_fps);
+ GDVIRTUAL0RC(int, _get_import_flags)
+ GDVIRTUAL0RC(Vector<String>, _get_extensions)
+ GDVIRTUAL3R(Object *, _import_scene, String, uint32_t, uint32_t)
+ GDVIRTUAL3R(Ref<Animation>, _import_animation, String, uint32_t, uint32_t)
+
public:
enum ImportFlags {
IMPORT_SCENE = 1,
@@ -58,7 +63,6 @@ public:
IMPORT_FAIL_ON_MISSING_DEPENDENCIES = 4,
IMPORT_GENERATE_TANGENT_ARRAYS = 8,
IMPORT_USE_NAMED_SKIN_BINDS = 16,
-
};
virtual uint32_t get_import_flags() const;
@@ -77,6 +81,8 @@ class EditorScenePostImport : public RefCounted {
protected:
static void _bind_methods();
+ GDVIRTUAL1R(Object *, _post_import, Node *)
+
public:
String get_source_file() const;
virtual Node *post_import(Node *p_scene);
@@ -118,9 +124,25 @@ class ResourceImporterScene : public ResourceImporter {
MESH_OVERRIDE_DISABLE,
};
+ enum BodyType {
+ BODY_TYPE_STATIC,
+ BODY_TYPE_DYNAMIC,
+ BODY_TYPE_AREA
+ };
+
+ enum ShapeType {
+ SHAPE_TYPE_DECOMPOSE_CONVEX,
+ SHAPE_TYPE_SIMPLE_CONVEX,
+ SHAPE_TYPE_TRIMESH,
+ SHAPE_TYPE_BOX,
+ SHAPE_TYPE_SPHERE,
+ SHAPE_TYPE_CYLINDER,
+ SHAPE_TYPE_CAPSULE,
+ };
+
void _replace_owner(Node *p_node, Node *p_scene, Node *p_new_owner);
void _generate_meshes(Node *p_node, const Dictionary &p_mesh_data, bool p_generate_lods, bool p_create_shadow_meshes, LightBakeMode p_light_bake_mode, float p_lightmap_texel_size, const Vector<uint8_t> &p_src_lightmap_cache, Vector<Vector<uint8_t>> &r_lightmap_caches);
- void _add_shapes(Node *p_node, const List<Ref<Shape3D>> &p_shapes);
+ void _add_shapes(Node *p_node, const Vector<Ref<Shape3D>> &p_shapes);
public:
static ResourceImporterScene *get_singleton() { return singleton; }
@@ -152,14 +174,15 @@ public:
void get_internal_import_options(InternalImportCategory p_category, List<ImportOption> *r_options) const;
bool get_internal_option_visibility(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const;
+ bool get_internal_option_update_view_required(InternalImportCategory p_category, const String &p_option, const Map<StringName, Variant> &p_options) const;
virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override;
// Import scenes *after* everything else (such as textures).
virtual int get_import_order() const override { return ResourceImporter::IMPORT_ORDER_SCENE; }
- Node *_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<EditorSceneImporterMesh>, List<Ref<Shape3D>>> &collision_map);
- Node *_post_fix_node(Node *p_node, Node *p_root, Map<Ref<EditorSceneImporterMesh>, List<Ref<Shape3D>>> &collision_map, Set<Ref<EditorSceneImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps);
+ Node *_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<EditorSceneImporterMesh>, Vector<Ref<Shape3D>>> &collision_map);
+ Node *_post_fix_node(Node *p_node, Node *p_root, Map<Ref<EditorSceneImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Set<Ref<EditorSceneImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps);
Ref<Animation> _save_animation_to_file(Ref<Animation> anim, bool p_save_to_file, String p_save_to_path, bool p_keep_custom_tracks);
void _create_clips(AnimationPlayer *anim, const Array &p_clips, bool p_bake_all);
@@ -177,6 +200,12 @@ public:
virtual bool can_import_threaded() const override { return false; }
ResourceImporterScene();
+
+ template <class M>
+ static Vector<Ref<Shape3D>> get_collision_shapes(const Ref<Mesh> &p_mesh, const M &p_options);
+
+ template <class M>
+ static Transform3D get_collision_shapes_transform(const M &p_options);
};
class EditorSceneImporterESCN : public EditorSceneImporter {
@@ -189,4 +218,176 @@ public:
virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) override;
};
+#include "scene/resources/box_shape_3d.h"
+#include "scene/resources/capsule_shape_3d.h"
+#include "scene/resources/cylinder_shape_3d.h"
+#include "scene/resources/sphere_shape_3d.h"
+
+template <class M>
+Vector<Ref<Shape3D>> ResourceImporterScene::get_collision_shapes(const Ref<Mesh> &p_mesh, const M &p_options) {
+ ShapeType generate_shape_type = SHAPE_TYPE_DECOMPOSE_CONVEX;
+ if (p_options.has(SNAME("physics/shape_type"))) {
+ generate_shape_type = (ShapeType)p_options[SNAME("physics/shape_type")].operator int();
+ }
+
+ if (generate_shape_type == SHAPE_TYPE_DECOMPOSE_CONVEX) {
+ Mesh::ConvexDecompositionSettings decomposition_settings;
+ bool advanced = false;
+ if (p_options.has(SNAME("decomposition/advanced"))) {
+ advanced = p_options[SNAME("decomposition/advanced")];
+ }
+
+ if (advanced) {
+ if (p_options.has(SNAME("decomposition/max_concavity"))) {
+ decomposition_settings.max_concavity = p_options[SNAME("decomposition/max_concavity")];
+ }
+
+ if (p_options.has(SNAME("decomposition/symmetry_planes_clipping_bias"))) {
+ decomposition_settings.symmetry_planes_clipping_bias = p_options[SNAME("decomposition/symmetry_planes_clipping_bias")];
+ }
+
+ if (p_options.has(SNAME("decomposition/revolution_axes_clipping_bias"))) {
+ decomposition_settings.revolution_axes_clipping_bias = p_options[SNAME("decomposition/revolution_axes_clipping_bias")];
+ }
+
+ if (p_options.has(SNAME("decomposition/min_volume_per_convex_hull"))) {
+ decomposition_settings.min_volume_per_convex_hull = p_options[SNAME("decomposition/min_volume_per_convex_hull")];
+ }
+
+ if (p_options.has(SNAME("decomposition/resolution"))) {
+ decomposition_settings.resolution = p_options[SNAME("decomposition/resolution")];
+ }
+
+ if (p_options.has(SNAME("decomposition/max_num_vertices_per_convex_hull"))) {
+ decomposition_settings.max_num_vertices_per_convex_hull = p_options[SNAME("decomposition/max_num_vertices_per_convex_hull")];
+ }
+
+ if (p_options.has(SNAME("decomposition/plane_downsampling"))) {
+ decomposition_settings.plane_downsampling = p_options[SNAME("decomposition/plane_downsampling")];
+ }
+
+ if (p_options.has(SNAME("decomposition/convexhull_downsampling"))) {
+ decomposition_settings.convexhull_downsampling = p_options[SNAME("decomposition/convexhull_downsampling")];
+ }
+
+ if (p_options.has(SNAME("decomposition/normalize_mesh"))) {
+ decomposition_settings.normalize_mesh = p_options[SNAME("decomposition/normalize_mesh")];
+ }
+
+ if (p_options.has(SNAME("decomposition/mode"))) {
+ decomposition_settings.mode = (Mesh::ConvexDecompositionSettings::Mode)p_options[SNAME("decomposition/mode")].operator int();
+ }
+
+ if (p_options.has(SNAME("decomposition/convexhull_approximation"))) {
+ decomposition_settings.convexhull_approximation = p_options[SNAME("decomposition/convexhull_approximation")];
+ }
+
+ if (p_options.has(SNAME("decomposition/max_convex_hulls"))) {
+ decomposition_settings.max_convex_hulls = p_options[SNAME("decomposition/max_convex_hulls")];
+ }
+
+ if (p_options.has(SNAME("decomposition/project_hull_vertices"))) {
+ decomposition_settings.project_hull_vertices = p_options[SNAME("decomposition/project_hull_vertices")];
+ }
+ } else {
+ int precision_level = 5;
+ if (p_options.has(SNAME("decomposition/precision"))) {
+ precision_level = p_options[SNAME("decomposition/precision")];
+ }
+
+ const real_t precision = real_t(precision_level - 1) / 9.0;
+
+ decomposition_settings.max_concavity = Math::lerp(real_t(1.0), real_t(0.001), precision);
+ decomposition_settings.min_volume_per_convex_hull = Math::lerp(real_t(0.01), real_t(0.0001), precision);
+ decomposition_settings.resolution = Math::lerp(10'000, 100'000, precision);
+ decomposition_settings.max_num_vertices_per_convex_hull = Math::lerp(32, 64, precision);
+ decomposition_settings.plane_downsampling = Math::lerp(3, 16, precision);
+ decomposition_settings.convexhull_downsampling = Math::lerp(3, 16, precision);
+ decomposition_settings.max_convex_hulls = Math::lerp(1, 32, precision);
+ }
+
+ return p_mesh->convex_decompose(decomposition_settings);
+ } else if (generate_shape_type == SHAPE_TYPE_SIMPLE_CONVEX) {
+ Vector<Ref<Shape3D>> shapes;
+ shapes.push_back(p_mesh->create_convex_shape(true, /*Passing false, otherwise VHACD will be used to simplify (Decompose) the Mesh.*/ false));
+ return shapes;
+ } else if (generate_shape_type == SHAPE_TYPE_TRIMESH) {
+ Vector<Ref<Shape3D>> shapes;
+ shapes.push_back(p_mesh->create_trimesh_shape());
+ return shapes;
+ } else if (generate_shape_type == SHAPE_TYPE_BOX) {
+ Ref<BoxShape3D> box;
+ box.instantiate();
+ if (p_options.has(SNAME("primitive/size"))) {
+ box->set_size(p_options[SNAME("primitive/size")]);
+ }
+
+ Vector<Ref<Shape3D>> shapes;
+ shapes.push_back(box);
+ return shapes;
+
+ } else if (generate_shape_type == SHAPE_TYPE_SPHERE) {
+ Ref<SphereShape3D> sphere;
+ sphere.instantiate();
+ if (p_options.has(SNAME("primitive/radius"))) {
+ sphere->set_radius(p_options[SNAME("primitive/radius")]);
+ }
+
+ Vector<Ref<Shape3D>> shapes;
+ shapes.push_back(sphere);
+ return shapes;
+ } else if (generate_shape_type == SHAPE_TYPE_CYLINDER) {
+ Ref<CylinderShape3D> cylinder;
+ cylinder.instantiate();
+ if (p_options.has(SNAME("primitive/height"))) {
+ cylinder->set_height(p_options[SNAME("primitive/height")]);
+ }
+ if (p_options.has(SNAME("primitive/radius"))) {
+ cylinder->set_radius(p_options[SNAME("primitive/radius")]);
+ }
+
+ Vector<Ref<Shape3D>> shapes;
+ shapes.push_back(cylinder);
+ return shapes;
+ } else if (generate_shape_type == SHAPE_TYPE_CAPSULE) {
+ Ref<CapsuleShape3D> capsule;
+ capsule.instantiate();
+ if (p_options.has(SNAME("primitive/height"))) {
+ capsule->set_height(p_options[SNAME("primitive/height")]);
+ }
+ if (p_options.has(SNAME("primitive/radius"))) {
+ capsule->set_radius(p_options[SNAME("primitive/radius")]);
+ }
+
+ Vector<Ref<Shape3D>> shapes;
+ shapes.push_back(capsule);
+ return shapes;
+ }
+ return Vector<Ref<Shape3D>>();
+}
+
+template <class M>
+Transform3D ResourceImporterScene::get_collision_shapes_transform(const M &p_options) {
+ Transform3D transform;
+
+ ShapeType generate_shape_type = SHAPE_TYPE_DECOMPOSE_CONVEX;
+ if (p_options.has(SNAME("physics/shape_type"))) {
+ generate_shape_type = (ShapeType)p_options[SNAME("physics/shape_type")].operator int();
+ }
+
+ if (generate_shape_type == SHAPE_TYPE_BOX ||
+ generate_shape_type == SHAPE_TYPE_SPHERE ||
+ generate_shape_type == SHAPE_TYPE_CYLINDER ||
+ generate_shape_type == SHAPE_TYPE_CAPSULE) {
+ if (p_options.has(SNAME("primitive/position"))) {
+ transform.origin = p_options[SNAME("primitive/position")];
+ }
+
+ if (p_options.has(SNAME("primitive/rotation"))) {
+ transform.basis.set_euler((p_options[SNAME("primitive/rotation")].operator Vector3() / 180.0) * Math_PI);
+ }
+ }
+ return transform;
+}
+
#endif // RESOURCEIMPORTERSCENE_H
diff --git a/editor/import/resource_importer_shader_file.cpp b/editor/import/resource_importer_shader_file.cpp
index 4d92490675..c01d8068da 100644
--- a/editor/import/resource_importer_shader_file.cpp
+++ b/editor/import/resource_importer_shader_file.cpp
@@ -78,7 +78,7 @@ static String _include_function(const String &p_path, void *userpointer) {
String *base_path = (String *)userpointer;
String include = p_path;
- if (include.is_rel_path()) {
+ if (include.is_relative_path()) {
include = base_path->plus_file(include);
}
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index daf7b15794..61745cb6ee 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -393,7 +393,7 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
float lossy = p_options["compress/lossy_quality"];
int pack_channels = p_options["compress/channel_pack"];
bool mipmaps = p_options["mipmaps/generate"];
- uint32_t mipmap_limit = int(mipmaps ? int(p_options["mipmaps/limit"]) : int(-1));
+ uint32_t mipmap_limit = mipmaps ? uint32_t(p_options["mipmaps/limit"]) : uint32_t(-1);
bool fix_alpha_border = p_options["process/fix_alpha_border"];
bool premult_alpha = p_options["process/premult_alpha"];
bool normal_map_invert_y = p_options["process/normal_map_invert_y"];
diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp
index dec1466da1..36fd161c35 100644
--- a/editor/import/resource_importer_texture_atlas.cpp
+++ b/editor/import/resource_importer_texture_atlas.cpp
@@ -131,9 +131,9 @@ static void _plot_triangle(Vector2i *vertices, const Vector2i &p_offset, bool p_
double xf = x[0];
double xt = x[0] + dx_upper; // if y[0] == y[1], special case
int max_y = MIN(y[2], height - p_offset.y - 1);
- for (int yi = y[0]; yi <= max_y; yi++) {
+ for (int yi = y[0]; yi < max_y; yi++) {
if (yi >= 0) {
- for (int xi = (xf > 0 ? int(xf) : 0); xi <= (xt < width ? xt : width - 1); xi++) {
+ for (int xi = (xf > 0 ? int(xf) : 0); xi < (xt < width ? xt : width - 1); xi++) {
int px = xi, py = yi;
int sx = px, sy = py;
sx = CLAMP(sx, 0, src_width - 1);
@@ -324,7 +324,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
atlas_texture.instantiate();
atlas_texture->set_atlas(cache);
atlas_texture->set_region(Rect2(offset, pack_data.region.size));
- atlas_texture->set_margin(Rect2(pack_data.region.position, Size2(pack_data.image->get_width(), pack_data.image->get_height()) - pack_data.region.size));
+ atlas_texture->set_margin(Rect2(pack_data.region.position, pack_data.image->get_size() - pack_data.region.size));
texture = atlas_texture;
} else {
diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp
index 19a8f209bb..f99ab9888a 100644
--- a/editor/import/scene_import_settings.cpp
+++ b/editor/import/scene_import_settings.cpp
@@ -53,6 +53,11 @@ class SceneImportSettingsData : public Object {
}
current[p_name] = p_value;
+
+ if (ResourceImporterScene::get_singleton()->get_internal_option_update_view_required(category, p_name, current)) {
+ SceneImportSettings::get_singleton()->update_view();
+ }
+
return true;
}
return false;
@@ -317,6 +322,13 @@ void SceneImportSettings::_fill_scene(Node *p_node, TreeItem *p_parent_item) {
if (mesh_node && mesh_node->get_mesh().is_valid()) {
_fill_mesh(scene_tree, mesh_node->get_mesh(), item);
+ // Add the collider view.
+ MeshInstance3D *collider_view = memnew(MeshInstance3D);
+ collider_view->set_name("collider_view");
+ collider_view->set_visible(false);
+ mesh_node->add_child(collider_view);
+ collider_view->set_owner(mesh_node);
+
Transform3D accum_xform;
Node3D *base = mesh_node;
while (base) {
@@ -346,6 +358,54 @@ void SceneImportSettings::_update_scene() {
_fill_scene(scene, nullptr);
}
+void SceneImportSettings::_update_view_gizmos() {
+ for (const KeyValue<String, NodeData> &e : node_map) {
+ bool generate_collider = false;
+ if (e.value.settings.has(SNAME("generate/physics"))) {
+ generate_collider = e.value.settings[SNAME("generate/physics")];
+ }
+
+ MeshInstance3D *mesh_node = Object::cast_to<MeshInstance3D>(e.value.node);
+ if (mesh_node == nullptr || mesh_node->get_mesh().is_null()) {
+ // Nothing to do
+ continue;
+ }
+
+ MeshInstance3D *collider_view = static_cast<MeshInstance3D *>(mesh_node->find_node("collider_view"));
+ CRASH_COND_MSG(collider_view == nullptr, "This is unreachable, since the collider view is always created even when the collision is not used! If this is triggered there is a bug on the function `_fill_scene`.");
+
+ collider_view->set_visible(generate_collider);
+ if (generate_collider) {
+ // This collider_view doesn't have a mesh so we need to generate a new one.
+
+ // Generate the mesh collider.
+ Vector<Ref<Shape3D>> shapes = ResourceImporterScene::get_collision_shapes(mesh_node->get_mesh(), e.value.settings);
+ const Transform3D transform = ResourceImporterScene::get_collision_shapes_transform(e.value.settings);
+
+ Ref<ArrayMesh> collider_view_mesh;
+ collider_view_mesh.instantiate();
+ for (Ref<Shape3D> shape : shapes) {
+ Ref<ArrayMesh> debug_shape_mesh;
+ if (shape.is_valid()) {
+ debug_shape_mesh = shape->get_debug_mesh();
+ }
+ if (debug_shape_mesh.is_valid()) {
+ collider_view_mesh->add_surface_from_arrays(
+ debug_shape_mesh->surface_get_primitive_type(0),
+ debug_shape_mesh->surface_get_arrays(0));
+
+ collider_view_mesh->surface_set_material(
+ collider_view_mesh->get_surface_count() - 1,
+ collider_mat);
+ }
+ }
+
+ collider_view->set_mesh(collider_view_mesh);
+ collider_view->set_transform(transform);
+ }
+ }
+}
+
void SceneImportSettings::_update_camera() {
AABB camera_aabb;
@@ -374,7 +434,7 @@ void SceneImportSettings::_update_camera() {
}
}
- Vector3 center = camera_aabb.position + camera_aabb.size * 0.5;
+ Vector3 center = camera_aabb.get_center();
float camera_size = camera_aabb.get_longest_axis_size();
camera->set_orthogonal(camera_size * zoom, 0.0001, camera_size * 2);
@@ -404,11 +464,16 @@ void SceneImportSettings::_load_default_subresource_settings(Map<StringName, Var
}
}
+void SceneImportSettings::update_view() {
+ _update_view_gizmos();
+}
+
void SceneImportSettings::open_settings(const String &p_path) {
if (scene) {
memdelete(scene);
scene = nullptr;
}
+ scene_import_settings_data->settings = nullptr;
scene = ResourceImporterScene::get_singleton()->pre_import(p_path);
if (scene == nullptr) {
EditorNode::get_singleton()->show_warning(TTR("Error opening scene"));
@@ -463,6 +528,7 @@ void SceneImportSettings::open_settings(const String &p_path) {
}
popup_centered_ratio();
+ _update_view_gizmos();
_update_camera();
set_title(vformat(TTR("Advanced Import Settings for '%s'"), base_path.get_file()));
@@ -629,6 +695,7 @@ void SceneImportSettings::_material_tree_selected() {
_select(material_tree, type, import_id);
}
+
void SceneImportSettings::_mesh_tree_selected() {
if (selecting) {
return;
@@ -640,6 +707,7 @@ void SceneImportSettings::_mesh_tree_selected() {
_select(mesh_tree, type, import_id);
}
+
void SceneImportSettings::_scene_tree_selected() {
if (selecting) {
return;
@@ -1144,6 +1212,12 @@ SceneImportSettings::SceneImportSettings() {
material_preview.instantiate();
}
+ {
+ collider_mat.instantiate();
+ collider_mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
+ collider_mat->set_albedo(Color(0.5, 0.5, 1.0));
+ }
+
inspector = memnew(EditorInspector);
inspector->set_custom_minimum_size(Size2(300 * EDSCALE, 0));
diff --git a/editor/import/scene_import_settings.h b/editor/import/scene_import_settings.h
index ddcf4a6d5d..c7c94af493 100644
--- a/editor/import/scene_import_settings.h
+++ b/editor/import/scene_import_settings.h
@@ -84,6 +84,8 @@ class SceneImportSettings : public ConfirmationDialog {
MeshInstance3D *mesh_preview;
Ref<SphereMesh> material_preview;
+ Ref<StandardMaterial3D> collider_mat;
+
float cam_rot_x;
float cam_rot_y;
float cam_zoom;
@@ -145,6 +147,7 @@ class SceneImportSettings : public ConfirmationDialog {
bool selecting = false;
+ void _update_view_gizmos();
void _update_camera();
void _select(Tree *p_from, String p_type, String p_id);
void _material_tree_selected();
@@ -190,6 +193,7 @@ protected:
void _notification(int p_what);
public:
+ void update_view();
void open_settings(const String &p_path);
static SceneImportSettings *get_singleton();
SceneImportSettings();
diff --git a/editor/import/scene_importer_mesh.cpp b/editor/import/scene_importer_mesh.cpp
index 0d14347225..5e6dd08e79 100644
--- a/editor/import/scene_importer_mesh.cpp
+++ b/editor/import/scene_importer_mesh.cpp
@@ -33,6 +33,8 @@
#include "core/math/math_defs.h"
#include "scene/resources/surface_tool.h"
+#include <cstdint>
+
void EditorSceneImporterMesh::add_blend_shape(const String &p_name) {
ERR_FAIL_COND(surfaces.size() > 0);
blend_shapes.push_back(p_name);
@@ -55,13 +57,14 @@ Mesh::BlendShapeMode EditorSceneImporterMesh::get_blend_shape_mode() const {
return blend_shape_mode;
}
-void EditorSceneImporterMesh::add_surface(Mesh::PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes, const Dictionary &p_lods, const Ref<Material> &p_material, const String &p_name) {
+void EditorSceneImporterMesh::add_surface(Mesh::PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes, const Dictionary &p_lods, const Ref<Material> &p_material, const String &p_name, const uint32_t p_flags) {
ERR_FAIL_COND(p_blend_shapes.size() != blend_shapes.size());
ERR_FAIL_COND(p_arrays.size() != Mesh::ARRAY_MAX);
Surface s;
s.primitive = p_primitive;
s.arrays = p_arrays;
s.name = p_name;
+ s.flags = p_flags;
Vector<Vector3> vertex_array = p_arrays[Mesh::ARRAY_VERTEX];
int vertex_count = vertex_array.size();
@@ -110,6 +113,12 @@ String EditorSceneImporterMesh::get_surface_name(int p_surface) const {
ERR_FAIL_INDEX_V(p_surface, surfaces.size(), String());
return surfaces[p_surface].name;
}
+void EditorSceneImporterMesh::set_surface_name(int p_surface, const String &p_name) {
+ ERR_FAIL_INDEX(p_surface, surfaces.size());
+ surfaces.write[p_surface].name = p_name;
+ mesh.unref();
+}
+
Array EditorSceneImporterMesh::get_surface_blend_shape_arrays(int p_surface, int p_blend_shape) const {
ERR_FAIL_INDEX_V(p_surface, surfaces.size(), Array());
ERR_FAIL_INDEX_V(p_blend_shape, surfaces[p_surface].blend_shape_data.size(), Array());
@@ -132,6 +141,11 @@ float EditorSceneImporterMesh::get_surface_lod_size(int p_surface, int p_lod) co
return surfaces[p_surface].lods[p_lod].distance;
}
+uint32_t EditorSceneImporterMesh::get_surface_format(int p_surface) const {
+ ERR_FAIL_INDEX_V(p_surface, surfaces.size(), 0);
+ return surfaces[p_surface].flags;
+}
+
Ref<Material> EditorSceneImporterMesh::get_surface_material(int p_surface) const {
ERR_FAIL_INDEX_V(p_surface, surfaces.size(), Ref<Material>());
return surfaces[p_surface].material;
@@ -140,6 +154,7 @@ Ref<Material> EditorSceneImporterMesh::get_surface_material(int p_surface) const
void EditorSceneImporterMesh::set_surface_material(int p_surface, const Ref<Material> &p_material) {
ERR_FAIL_INDEX(p_surface, surfaces.size());
surfaces.write[p_surface].material = p_material;
+ mesh.unref();
}
Basis EditorSceneImporterMesh::compute_rotation_matrix_from_ortho_6d(Vector3 p_x_raw, Vector3 p_y_raw) {
@@ -244,7 +259,7 @@ bool EditorSceneImporterMesh::has_mesh() const {
return mesh.is_valid();
}
-Ref<ArrayMesh> EditorSceneImporterMesh::get_mesh(const Ref<Mesh> &p_base) {
+Ref<ArrayMesh> EditorSceneImporterMesh::get_mesh(const Ref<ArrayMesh> &p_base) {
ERR_FAIL_COND_V(surfaces.size() == 0, Ref<ArrayMesh>());
if (mesh.is_null()) {
@@ -276,7 +291,7 @@ Ref<ArrayMesh> EditorSceneImporterMesh::get_mesh(const Ref<Mesh> &p_base) {
}
}
- mesh->add_surface_from_arrays(surfaces[i].primitive, surfaces[i].arrays, bs_data, lods);
+ mesh->add_surface_from_arrays(surfaces[i].primitive, surfaces[i].arrays, bs_data, lods, surfaces[i].flags);
if (surfaces[i].material.is_valid()) {
mesh->surface_set_material(mesh->get_surface_count() - 1, surfaces[i].material);
}
@@ -391,7 +406,7 @@ void EditorSceneImporterMesh::create_shadow_mesh() {
}
}
- shadow_mesh->add_surface(surfaces[i].primitive, new_surface, Array(), lods, Ref<Material>(), surfaces[i].name);
+ shadow_mesh->add_surface(surfaces[i].primitive, new_surface, Array(), lods, Ref<Material>(), surfaces[i].name, surfaces[i].flags);
}
}
@@ -429,7 +444,11 @@ void EditorSceneImporterMesh::_set_data(const Dictionary &p_data) {
if (s.has("material")) {
material = s["material"];
}
- add_surface(prim, arr, blend_shapes, lods, material, name);
+ uint32_t flags = 0;
+ if (s.has("flags")) {
+ flags = s["flags"];
+ }
+ add_surface(prim, arr, blend_shapes, lods, material, name, flags);
}
}
}
@@ -466,6 +485,10 @@ Dictionary EditorSceneImporterMesh::_get_data() const {
d["name"] = surfaces[i].name;
}
+ if (surfaces[i].flags != 0) {
+ d["flags"] = surfaces[i].flags;
+ }
+
surface_arr.push_back(d);
}
data["surfaces"] = surface_arr;
@@ -501,36 +524,47 @@ Vector<Face3> EditorSceneImporterMesh::get_faces() const {
return faces;
}
-Vector<Ref<Shape3D>> EditorSceneImporterMesh::convex_decompose() const {
- ERR_FAIL_COND_V(!Mesh::convex_composition_function, Vector<Ref<Shape3D>>());
+Vector<Ref<Shape3D>> EditorSceneImporterMesh::convex_decompose(const Mesh::ConvexDecompositionSettings &p_settings) const {
+ ERR_FAIL_COND_V(!Mesh::convex_decomposition_function, Vector<Ref<Shape3D>>());
const Vector<Face3> faces = get_faces();
+ int face_count = faces.size();
+
+ Vector<Vector3> vertices;
+ uint32_t vertex_count = 0;
+ vertices.resize(face_count * 3);
+ Vector<uint32_t> indices;
+ indices.resize(face_count * 3);
+ {
+ Map<Vector3, uint32_t> vertex_map;
+ Vector3 *vertex_w = vertices.ptrw();
+ uint32_t *index_w = indices.ptrw();
+ for (int i = 0; i < face_count; i++) {
+ for (int j = 0; j < 3; j++) {
+ const Vector3 &vertex = faces[i].vertex[j];
+ Map<Vector3, uint32_t>::Element *found_vertex = vertex_map.find(vertex);
+ uint32_t index;
+ if (found_vertex) {
+ index = found_vertex->get();
+ } else {
+ index = ++vertex_count;
+ vertex_map[vertex] = index;
+ vertex_w[index] = vertex;
+ }
+ index_w[i * 3 + j] = index;
+ }
+ }
+ }
+ vertices.resize(vertex_count);
- Vector<Vector<Face3>> decomposed = Mesh::convex_composition_function(faces, -1);
+ Vector<Vector<Vector3>> decomposed = Mesh::convex_decomposition_function((real_t *)vertices.ptr(), vertex_count, indices.ptr(), face_count, p_settings, nullptr);
Vector<Ref<Shape3D>> ret;
for (int i = 0; i < decomposed.size(); i++) {
- Set<Vector3> points;
- for (int j = 0; j < decomposed[i].size(); j++) {
- points.insert(decomposed[i][j].vertex[0]);
- points.insert(decomposed[i][j].vertex[1]);
- points.insert(decomposed[i][j].vertex[2]);
- }
-
- Vector<Vector3> convex_points;
- convex_points.resize(points.size());
- {
- Vector3 *w = convex_points.ptrw();
- int idx = 0;
- for (Set<Vector3>::Element *E = points.front(); E; E = E->next()) {
- w[idx++] = E->get();
- }
- }
-
Ref<ConvexPolygonShape3D> shape;
shape.instantiate();
- shape->set_points(convex_points);
+ shape->set_points(decomposed[i]);
ret.push_back(shape);
}
@@ -826,7 +860,7 @@ void EditorSceneImporterMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_blend_shape_mode", "mode"), &EditorSceneImporterMesh::set_blend_shape_mode);
ClassDB::bind_method(D_METHOD("get_blend_shape_mode"), &EditorSceneImporterMesh::get_blend_shape_mode);
- ClassDB::bind_method(D_METHOD("add_surface", "primitive", "arrays", "blend_shapes", "lods", "material", "name"), &EditorSceneImporterMesh::add_surface, DEFVAL(Array()), DEFVAL(Dictionary()), DEFVAL(Ref<Material>()), DEFVAL(String()));
+ ClassDB::bind_method(D_METHOD("add_surface", "primitive", "arrays", "blend_shapes", "lods", "material", "name", "flags"), &EditorSceneImporterMesh::add_surface, DEFVAL(Array()), DEFVAL(Dictionary()), DEFVAL(Ref<Material>()), DEFVAL(String()), DEFVAL(0));
ClassDB::bind_method(D_METHOD("get_surface_count"), &EditorSceneImporterMesh::get_surface_count);
ClassDB::bind_method(D_METHOD("get_surface_primitive_type", "surface_idx"), &EditorSceneImporterMesh::get_surface_primitive_type);
@@ -837,8 +871,12 @@ void EditorSceneImporterMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_surface_lod_size", "surface_idx", "lod_idx"), &EditorSceneImporterMesh::get_surface_lod_size);
ClassDB::bind_method(D_METHOD("get_surface_lod_indices", "surface_idx", "lod_idx"), &EditorSceneImporterMesh::get_surface_lod_indices);
ClassDB::bind_method(D_METHOD("get_surface_material", "surface_idx"), &EditorSceneImporterMesh::get_surface_material);
+ ClassDB::bind_method(D_METHOD("get_surface_format", "surface_idx"), &EditorSceneImporterMesh::get_surface_format);
+
+ ClassDB::bind_method(D_METHOD("set_surface_name", "surface_idx", "name"), &EditorSceneImporterMesh::set_surface_name);
+ ClassDB::bind_method(D_METHOD("set_surface_material", "surface_idx", "material"), &EditorSceneImporterMesh::set_surface_material);
- ClassDB::bind_method(D_METHOD("get_mesh"), &EditorSceneImporterMesh::get_mesh);
+ ClassDB::bind_method(D_METHOD("get_mesh", "base_mesh"), &EditorSceneImporterMesh::get_mesh, DEFVAL(Ref<ArrayMesh>()));
ClassDB::bind_method(D_METHOD("clear"), &EditorSceneImporterMesh::clear);
ClassDB::bind_method(D_METHOD("_set_data", "data"), &EditorSceneImporterMesh::_set_data);
diff --git a/editor/import/scene_importer_mesh.h b/editor/import/scene_importer_mesh.h
index 2488de7ed0..d32b1fdf74 100644
--- a/editor/import/scene_importer_mesh.h
+++ b/editor/import/scene_importer_mesh.h
@@ -36,6 +36,9 @@
#include "scene/resources/convex_polygon_shape_3d.h"
#include "scene/resources/mesh.h"
#include "scene/resources/navigation_mesh.h"
+
+#include <cstdint>
+
// The following classes are used by importers instead of ArrayMesh and MeshInstance3D
// so the data is not registered (hence, quality loss), importing happens faster and
// its easier to modify before saving
@@ -57,6 +60,7 @@ class EditorSceneImporterMesh : public Resource {
Vector<LOD> lods;
Ref<Material> material;
String name;
+ uint32_t flags = 0;
};
Vector<Surface> surfaces;
Vector<String> blend_shapes;
@@ -80,7 +84,7 @@ public:
int get_blend_shape_count() const;
String get_blend_shape_name(int p_blend_shape) const;
- void add_surface(Mesh::PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes = Array(), const Dictionary &p_lods = Dictionary(), const Ref<Material> &p_material = Ref<Material>(), const String &p_name = String());
+ void add_surface(Mesh::PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes = Array(), const Dictionary &p_lods = Dictionary(), const Ref<Material> &p_material = Ref<Material>(), const String &p_name = String(), const uint32_t p_flags = 0);
int get_surface_count() const;
void set_blend_shape_mode(Mesh::BlendShapeMode p_blend_shape_mode);
@@ -88,12 +92,14 @@ public:
Mesh::PrimitiveType get_surface_primitive_type(int p_surface);
String get_surface_name(int p_surface) const;
+ void set_surface_name(int p_surface, const String &p_name);
Array get_surface_arrays(int p_surface) const;
Array get_surface_blend_shape_arrays(int p_surface, int p_blend_shape) const;
int get_surface_lod_count(int p_surface) const;
Vector<int> get_surface_lod_indices(int p_surface, int p_lod) const;
float get_surface_lod_size(int p_surface, int p_lod) const;
Ref<Material> get_surface_material(int p_surface) const;
+ uint32_t get_surface_format(int p_surface) const;
void set_surface_material(int p_surface, const Ref<Material> &p_material);
@@ -103,7 +109,7 @@ public:
Ref<EditorSceneImporterMesh> get_shadow_mesh() const;
Vector<Face3> get_faces() const;
- Vector<Ref<Shape3D>> convex_decompose() const;
+ Vector<Ref<Shape3D>> convex_decompose(const Mesh::ConvexDecompositionSettings &p_settings) const;
Ref<Shape3D> create_trimesh_shape() const;
Ref<NavigationMesh> create_navigation_mesh();
Error lightmap_unwrap_cached(const Transform3D &p_base_transform, float p_texel_size, const Vector<uint8_t> &p_src_cache, Vector<uint8_t> &r_dst_cache);
@@ -112,7 +118,7 @@ public:
Size2i get_lightmap_size_hint() const;
bool has_mesh() const;
- Ref<ArrayMesh> get_mesh(const Ref<Mesh> &p_base = Ref<Mesh>());
+ Ref<ArrayMesh> get_mesh(const Ref<ArrayMesh> &p_base = Ref<ArrayMesh>());
void clear();
};
#endif // EDITOR_SCENE_IMPORTER_MESH_H
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 648e60a554..5b52554335 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -127,12 +127,7 @@ void ImportDock::set_edit_path(const String &p_path) {
}
}
- import_as->add_separator();
- import_as->add_item(TTR("Keep File (No Import)"));
- import_as->set_item_metadata(import_as->get_item_count() - 1, "keep");
- if (importer_name == "keep") {
- import_as->select(import_as->get_item_count() - 1);
- }
+ _add_keep_import_option(importer_name);
import->set_disabled(false);
import_as->set_disabled(false);
@@ -141,6 +136,15 @@ void ImportDock::set_edit_path(const String &p_path) {
imported->set_text(p_path.get_file());
}
+void ImportDock::_add_keep_import_option(const String &p_importer_name) {
+ import_as->add_separator();
+ import_as->add_item(TTR("Keep File (No Import)"));
+ import_as->set_item_metadata(import_as->get_item_count() - 1, "keep");
+ if (p_importer_name == "keep") {
+ import_as->select(import_as->get_item_count() - 1);
+ }
+}
+
void ImportDock::_update_options(const Ref<ConfigFile> &p_config) {
List<ResourceImporter::ImportOption> options;
@@ -270,6 +274,8 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) {
}
}
+ _add_keep_import_option(params->importer->get_importer_name());
+
_update_preset_menu();
params->paths = p_paths;
diff --git a/editor/import_dock.h b/editor/import_dock.h
index 2be48dd505..3c28bbcd89 100644
--- a/editor/import_dock.h
+++ b/editor/import_dock.h
@@ -66,6 +66,7 @@ class ImportDock : public VBoxContainer {
void _importer_selected(int i_idx);
void _update_options(const Ref<ConfigFile> &p_config = Ref<ConfigFile>());
void _update_preset_menu();
+ void _add_keep_import_option(const String &p_importer_name);
void _property_toggled(const StringName &p_prop, bool p_checked);
void _reimport_attempt();
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index 778046f45c..04ddf3552b 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -30,11 +30,22 @@
#include "inspector_dock.h"
-#include "editor/editor_node.h"
-#include "editor/editor_settings.h"
+#include "editor/editor_scale.h"
#include "editor/plugins/animation_player_editor_plugin.h"
void InspectorDock::_menu_option(int p_option) {
+ _menu_option_confirm(p_option, false);
+}
+
+void InspectorDock::_menu_confirm_current() {
+ _menu_option_confirm(current_option, true);
+}
+
+void InspectorDock::_menu_option_confirm(int p_option, bool p_confirmed) {
+ if (!p_confirmed) {
+ current_option = p_option;
+ }
+
switch (p_option) {
case EXPAND_ALL: {
_menu_expandall();
@@ -82,39 +93,81 @@ void InspectorDock::_menu_option(int p_option) {
} break;
case OBJECT_UNIQUE_RESOURCES: {
- editor_data->apply_changes_in_editors();
- if (current) {
- List<PropertyInfo> props;
- current->get_property_list(&props);
- Map<RES, RES> duplicates;
- for (const PropertyInfo &E : props) {
- if (!(E.usage & PROPERTY_USAGE_STORAGE)) {
- continue;
- }
+ if (!p_confirmed) {
+ Vector<String> resource_propnames;
- Variant v = current->get(E.name);
- if (v.is_ref()) {
+ if (current) {
+ List<PropertyInfo> props;
+ current->get_property_list(&props);
+
+ for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
+ if (!(E->get().usage & PROPERTY_USAGE_STORAGE)) {
+ continue;
+ }
+
+ Variant v = current->get(E->get().name);
REF ref = v;
- if (ref.is_valid()) {
- RES res = ref;
- if (res.is_valid()) {
- if (!duplicates.has(res)) {
- duplicates[res] = res->duplicate();
- }
- res = duplicates[res];
+ RES res = ref;
+ if (v.is_ref() && ref.is_valid() && res.is_valid()) {
+ // Valid resource which would be duplicated if action is confirmed.
+ resource_propnames.append(E->get().name);
+ }
+ }
+ }
+
+ if (resource_propnames.size()) {
+ unique_resources_list_tree->clear();
+ TreeItem *root = unique_resources_list_tree->create_item();
- current->set(E.name, res);
- editor->get_inspector()->update_property(E.name);
+ for (int i = 0; i < resource_propnames.size(); i++) {
+ String propname = resource_propnames[i].replace("/", " / ");
+
+ TreeItem *ti = unique_resources_list_tree->create_item(root);
+ ti->set_text(0, bool(EDITOR_GET("interface/inspector/capitalize_properties")) ? propname.capitalize() : propname);
+ }
+
+ unique_resources_confirmation->popup_centered();
+ } else {
+ unique_resources_confirmation->set_text(TTR("This object has no resources."));
+ current_option = -1;
+ unique_resources_confirmation->popup_centered();
+ }
+ } else {
+ editor_data->apply_changes_in_editors();
+
+ if (current) {
+ List<PropertyInfo> props;
+ current->get_property_list(&props);
+ Map<RES, RES> duplicates;
+ for (const PropertyInfo &prop_info : props) {
+ if (!(prop_info.usage & PROPERTY_USAGE_STORAGE)) {
+ continue;
+ }
+
+ Variant v = current->get(prop_info.name);
+ if (v.is_ref()) {
+ REF ref = v;
+ if (ref.is_valid()) {
+ RES res = ref;
+ if (res.is_valid()) {
+ if (!duplicates.has(res)) {
+ duplicates[res] = res->duplicate();
+ }
+ res = duplicates[res];
+
+ current->set(prop_info.name, res);
+ editor->get_inspector()->update_property(prop_info.name);
+ }
}
}
}
}
- }
- editor_data->get_undo_redo().clear_history();
+ editor_data->get_undo_redo().clear_history();
- editor->get_editor_plugins_over()->edit(nullptr);
- editor->get_editor_plugins_over()->edit(current);
+ editor->get_editor_plugins_over()->edit(nullptr);
+ editor->get_editor_plugins_over()->edit(current);
+ }
} break;
@@ -619,6 +672,29 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) {
warning->hide();
warning->connect("pressed", callable_mp(this, &InspectorDock::_warning_pressed));
+ unique_resources_confirmation = memnew(ConfirmationDialog);
+ add_child(unique_resources_confirmation);
+
+ VBoxContainer *container = memnew(VBoxContainer);
+ unique_resources_confirmation->add_child(container);
+
+ Label *top_label = memnew(Label);
+ top_label->set_text(TTR("The following resources will be duplicated and embedded within this resource/object."));
+ container->add_child(top_label);
+
+ unique_resources_list_tree = memnew(Tree);
+ unique_resources_list_tree->set_hide_root(true);
+ unique_resources_list_tree->set_columns(1);
+ unique_resources_list_tree->set_column_title(0, TTR("Property"));
+ unique_resources_list_tree->set_custom_minimum_size(Size2(0, 200 * EDSCALE));
+ container->add_child(unique_resources_list_tree);
+
+ Label *bottom_label = memnew(Label);
+ bottom_label->set_text(TTR("This cannot be undone. Are you sure?"));
+ container->add_child(bottom_label);
+
+ unique_resources_confirmation->connect("confirmed", callable_mp(this, &InspectorDock::_menu_confirm_current));
+
warning_dialog = memnew(AcceptDialog);
editor->get_gui_base()->add_child(warning_dialog);
diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h
index 6615845b66..5bf6a34617 100644
--- a/editor/inspector_dock.h
+++ b/editor/inspector_dock.h
@@ -40,8 +40,6 @@
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/control.h"
-#include "scene/gui/label.h"
-#include "scene/gui/popup_menu.h"
class EditorNode;
@@ -92,7 +90,13 @@ class InspectorDock : public VBoxContainer {
Button *warning;
AcceptDialog *warning_dialog;
+ int current_option = -1;
+ ConfirmationDialog *unique_resources_confirmation;
+ Tree *unique_resources_list_tree;
+
void _menu_option(int p_option);
+ void _menu_confirm_current();
+ void _menu_option_confirm(int p_option, bool p_confirmed);
void _new_resource();
void _load_resource(const String &p_type = "");
diff --git a/editor/multi_node_edit.cpp b/editor/multi_node_edit.cpp
index fd4a4334fc..1e707c1a60 100644
--- a/editor/multi_node_edit.cpp
+++ b/editor/multi_node_edit.cpp
@@ -49,6 +49,11 @@ bool MultiNodeEdit::_set_impl(const StringName &p_name, const Variant &p_value,
name = "script";
}
+ Node *node_path_target = nullptr;
+ if (p_value.get_type() == Variant::NODE_PATH && p_value != NodePath()) {
+ node_path_target = es->get_node(p_value);
+ }
+
UndoRedo *ur = EditorNode::get_undo_redo();
ur->create_action(TTR("MultiNode Set") + " " + String(name), UndoRedo::MERGE_ENDS);
@@ -63,9 +68,11 @@ bool MultiNodeEdit::_set_impl(const StringName &p_name, const Variant &p_value,
}
if (p_value.get_type() == Variant::NODE_PATH) {
- Node *tonode = n->get_node(p_value);
- NodePath p_path = n->get_path_to(tonode);
- ur->add_do_property(n, name, p_path);
+ NodePath path;
+ if (node_path_target) {
+ path = n->get_path_to(node_path_target);
+ }
+ ur->add_do_property(n, name, path);
} else {
Variant new_value;
if (p_field == "") {
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index ef3b0588b8..36a814c30a 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -367,7 +367,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
edge_point = PosVertex();
return true;
} else {
- const real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
+ const real_t grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius");
if (!_is_line() && wip.size() > 1 && xform.xform(wip[0]).distance_to(xform.xform(cpoint)) < grab_threshold) {
//wip closed
@@ -502,7 +502,7 @@ void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overl
offset = _get_offset(j);
}
- if (!wip_active && j == edited_point.polygon && EDITOR_GET("editors/poly_editor/show_previous_outline")) {
+ if (!wip_active && j == edited_point.polygon && EDITOR_GET("editors/polygon_editor/show_previous_outline")) {
const Color col = Color(0.5, 0.5, 0.5); // FIXME polygon->get_outline_color();
const int n = pre_move_edit.size();
for (int i = 0; i < n - (is_closed ? 0 : 1); i++) {
@@ -625,7 +625,7 @@ AbstractPolygon2DEditor::Vertex AbstractPolygon2DEditor::get_active_point() cons
}
AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_point(const Vector2 &p_pos) const {
- const real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
+ const real_t grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius");
const int n_polygons = _get_polygon_count();
const Transform2D xform = canvas_item_editor->get_canvas_transform() * _get_node()->get_global_transform();
@@ -653,7 +653,7 @@ AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_point(const
}
AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_edge_point(const Vector2 &p_pos) const {
- const real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
+ const real_t grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius");
const real_t eps = grab_threshold * 2;
const real_t eps2 = eps * eps;
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index 49fcac512b..686a35e442 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -129,8 +129,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
add_point_pos += blend_space->get_min_space();
if (snap->is_pressed()) {
- add_point_pos.x = Math::snapped(add_point_pos.x, blend_space->get_snap().x);
- add_point_pos.y = Math::snapped(add_point_pos.y, blend_space->get_snap().y);
+ add_point_pos = add_point_pos.snapped(blend_space->get_snap());
}
}
@@ -215,8 +214,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
Vector2 point = blend_space->get_blend_point_position(selected_point);
point += drag_ofs;
if (snap->is_pressed()) {
- point.x = Math::snapped(point.x, blend_space->get_snap().x);
- point.y = Math::snapped(point.y, blend_space->get_snap().y);
+ point = point.snapped(blend_space->get_snap());
}
updating = true;
@@ -467,8 +465,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
if (dragging_selected && selected_point == point_idx) {
point += drag_ofs;
if (snap->is_pressed()) {
- point.x = Math::snapped(point.x, blend_space->get_snap().x);
- point.y = Math::snapped(point.y, blend_space->get_snap().y);
+ point = point.snapped(blend_space->get_snap());
}
}
point = (point - blend_space->get_min_space()) / (blend_space->get_max_space() - blend_space->get_min_space());
@@ -503,8 +500,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_draw() {
if (dragging_selected && selected_point == i) {
point += drag_ofs;
if (snap->is_pressed()) {
- point.x = Math::snapped(point.x, blend_space->get_snap().x);
- point.y = Math::snapped(point.y, blend_space->get_snap().y);
+ point = point.snapped(blend_space->get_snap());
}
}
point = (point - blend_space->get_min_space()) / (blend_space->get_max_space() - blend_space->get_min_space());
@@ -702,8 +698,7 @@ void AnimationNodeBlendSpace2DEditor::_update_edited_point_pos() {
if (dragging_selected) {
pos += drag_ofs;
if (snap->is_pressed()) {
- pos.x = Math::snapped(pos.x, blend_space->get_snap().x);
- pos.y = Math::snapped(pos.y, blend_space->get_snap().y);
+ pos = pos.snapped(blend_space->get_snap());
}
}
updating = true;
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 69206daea8..24cb660f7a 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -66,9 +66,13 @@ void AnimationNodeBlendTreeEditor::remove_custom_type(const Ref<Script> &p_scrip
_update_options_menu();
}
-void AnimationNodeBlendTreeEditor::_update_options_menu() {
+void AnimationNodeBlendTreeEditor::_update_options_menu(bool p_has_input_ports) {
add_node->get_popup()->clear();
+ add_node->get_popup()->set_size(Size2i(-1, -1));
for (int i = 0; i < add_options.size(); i++) {
+ if (p_has_input_ports && add_options[i].input_port_count == 0) {
+ continue;
+ }
add_node->get_popup()->add_item(add_options[i].name, i);
}
@@ -126,6 +130,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
graph->add_child(node);
Ref<AnimationNode> agnode = blend_tree->get_node(E);
+ ERR_CONTINUE(!agnode.is_valid());
node->set_position_offset(blend_tree->get_node_position(E) * EDSCALE);
@@ -308,6 +313,11 @@ void AnimationNodeBlendTreeEditor::_add_node(int p_idx) {
return;
}
+ if (!from_node.is_empty() && anode->get_input_count() == 0) {
+ from_node = "";
+ return;
+ }
+
Point2 instance_pos = graph->get_scroll_ofs();
if (use_popup_menu_position) {
instance_pos += popup_menu_position;
@@ -327,11 +337,51 @@ void AnimationNodeBlendTreeEditor::_add_node(int p_idx) {
undo_redo->create_action(TTR("Add Node to BlendTree"));
undo_redo->add_do_method(blend_tree.ptr(), "add_node", name, anode, instance_pos / EDSCALE);
undo_redo->add_undo_method(blend_tree.ptr(), "remove_node", name);
+
+ if (!from_node.is_empty()) {
+ undo_redo->add_do_method(blend_tree.ptr(), "connect_node", name, 0, from_node);
+ from_node = "";
+ }
+ if (!to_node.is_empty() && to_slot != -1) {
+ undo_redo->add_do_method(blend_tree.ptr(), "connect_node", to_node, to_slot, name);
+ to_node = "";
+ to_slot = -1;
+ }
+
undo_redo->add_do_method(this, "_update_graph");
undo_redo->add_undo_method(this, "_update_graph");
undo_redo->commit_action();
}
+void AnimationNodeBlendTreeEditor::_popup(bool p_has_input_ports, const Vector2 &p_popup_position, const Vector2 &p_node_position) {
+ _update_options_menu(p_has_input_ports);
+ use_popup_menu_position = true;
+ popup_menu_position = p_popup_position;
+ add_node->get_popup()->set_position(p_node_position);
+ add_node->get_popup()->popup();
+}
+
+void AnimationNodeBlendTreeEditor::_popup_request(const Vector2 &p_position) {
+ _popup(false, graph->get_local_mouse_position(), p_position);
+}
+
+void AnimationNodeBlendTreeEditor::_connection_to_empty(const String &p_from, int p_from_slot, const Vector2 &p_release_position) {
+ Ref<AnimationNode> node = blend_tree->get_node(p_from);
+ if (node.is_valid()) {
+ from_node = p_from;
+ _popup(true, p_release_position, graph->get_global_mouse_position());
+ }
+}
+
+void AnimationNodeBlendTreeEditor::_connection_from_empty(const String &p_to, int p_to_slot, const Vector2 &p_release_position) {
+ Ref<AnimationNode> node = blend_tree->get_node(p_to);
+ if (node.is_valid()) {
+ to_node = p_to;
+ to_slot = p_to_slot;
+ _popup(false, p_release_position, graph->get_global_mouse_position());
+ }
+}
+
void AnimationNodeBlendTreeEditor::_node_dragged(const Vector2 &p_from, const Vector2 &p_to, const StringName &p_which) {
updating = true;
undo_redo->create_action(TTR("Node Moved"));
@@ -430,14 +480,6 @@ void AnimationNodeBlendTreeEditor::_delete_nodes_request() {
undo_redo->commit_action();
}
-void AnimationNodeBlendTreeEditor::_popup_request(const Vector2 &p_position) {
- _update_options_menu();
- use_popup_menu_position = true;
- popup_menu_position = graph->get_local_mouse_position();
- add_node->get_popup()->set_position(p_position);
- add_node->get_popup()->popup();
-}
-
void AnimationNodeBlendTreeEditor::_node_selected(Object *p_node) {
GraphNode *gn = Object::cast_to<GraphNode>(p_node);
ERR_FAIL_COND(!gn);
@@ -889,6 +931,8 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
graph->connect("scroll_offset_changed", callable_mp(this, &AnimationNodeBlendTreeEditor::_scroll_changed));
graph->connect("delete_nodes_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_nodes_request));
graph->connect("popup_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_popup_request));
+ graph->connect("connection_to_empty", callable_mp(this, &AnimationNodeBlendTreeEditor::_connection_to_empty));
+ graph->connect("connection_from_empty", callable_mp(this, &AnimationNodeBlendTreeEditor::_connection_from_empty));
float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity");
graph->set_minimap_opacity(graph_minimap_opacity);
@@ -904,13 +948,13 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
add_node->connect("about_to_popup", callable_mp(this, &AnimationNodeBlendTreeEditor::_update_options_menu));
add_options.push_back(AddOption("Animation", "AnimationNodeAnimation"));
- add_options.push_back(AddOption("OneShot", "AnimationNodeOneShot"));
- add_options.push_back(AddOption("Add2", "AnimationNodeAdd2"));
- add_options.push_back(AddOption("Add3", "AnimationNodeAdd3"));
- add_options.push_back(AddOption("Blend2", "AnimationNodeBlend2"));
- add_options.push_back(AddOption("Blend3", "AnimationNodeBlend3"));
- add_options.push_back(AddOption("Seek", "AnimationNodeTimeSeek"));
- add_options.push_back(AddOption("TimeScale", "AnimationNodeTimeScale"));
+ add_options.push_back(AddOption("OneShot", "AnimationNodeOneShot", 2));
+ add_options.push_back(AddOption("Add2", "AnimationNodeAdd2", 2));
+ add_options.push_back(AddOption("Add3", "AnimationNodeAdd3", 3));
+ add_options.push_back(AddOption("Blend2", "AnimationNodeBlend2", 2));
+ add_options.push_back(AddOption("Blend3", "AnimationNodeBlend3", 3));
+ add_options.push_back(AddOption("Seek", "AnimationNodeTimeSeek", 1));
+ add_options.push_back(AddOption("TimeScale", "AnimationNodeTimeScale", 1));
add_options.push_back(AddOption("Transition", "AnimationNodeTransition"));
add_options.push_back(AddOption("BlendTree", "AnimationNodeBlendTree"));
add_options.push_back(AddOption("BlendSpace1D", "AnimationNodeBlendSpace1D"));
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.h b/editor/plugins/animation_blend_tree_editor_plugin.h
index 9f09069719..0fcafad40e 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.h
+++ b/editor/plugins/animation_blend_tree_editor_plugin.h
@@ -64,22 +64,28 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
Map<StringName, ProgressBar *> animations;
Vector<EditorProperty *> visible_properties;
+ String to_node = "";
+ int to_slot = -1;
+ String from_node = "";
+
void _update_graph();
struct AddOption {
String name;
String type;
Ref<Script> script;
- AddOption(const String &p_name = String(), const String &p_type = String()) :
+ int input_port_count;
+ AddOption(const String &p_name = String(), const String &p_type = String(), bool p_input_port_count = 0) :
name(p_name),
- type(p_type) {
+ type(p_type),
+ input_port_count(p_input_port_count) {
}
};
Vector<AddOption> add_options;
void _add_node(int p_idx);
- void _update_options_menu();
+ void _update_options_menu(bool p_has_input_ports = false);
static AnimationNodeBlendTreeEditor *singleton;
@@ -98,7 +104,6 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
void _anim_selected(int p_index, Array p_options, const String &p_node);
void _delete_request(const String &p_which);
void _delete_nodes_request();
- void _popup_request(const Vector2 &p_position);
bool _update_filters(const Ref<AnimationNode> &anode);
void _edit_filters(const String &p_which);
@@ -106,6 +111,11 @@ class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
void _filter_toggled();
Ref<AnimationNode> _filter_edit;
+ void _popup(bool p_has_input_ports, const Vector2 &p_popup_position, const Vector2 &p_node_position);
+ void _popup_request(const Vector2 &p_position);
+ void _connection_to_empty(const String &p_from, int p_from_slot, const Vector2 &p_release_position);
+ void _connection_from_empty(const String &p_to, int p_to_slot, const Vector2 &p_release_position);
+
void _property_changed(const StringName &p_property, const Variant &p_value, const String &p_field, bool p_changing);
void _removed_from_graph();
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index b4e9f468de..68b143358a 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -120,7 +120,7 @@ void AnimationPlayerEditor::_notification(int p_what) {
Ref<Image> autoplay_img = autoplay_icon->get_image();
Ref<Image> reset_img = reset_icon->get_image();
Ref<Image> autoplay_reset_img;
- Size2 icon_size = Size2(autoplay_img->get_width(), autoplay_img->get_height());
+ Size2 icon_size = autoplay_img->get_size();
autoplay_reset_img.instantiate();
autoplay_reset_img->create(icon_size.x * 2, icon_size.y, false, autoplay_img->get_format());
autoplay_reset_img->blit_rect(autoplay_img, Rect2(Point2(), icon_size), Point2());
@@ -345,7 +345,7 @@ void AnimationPlayerEditor::_animation_rename() {
void AnimationPlayerEditor::_animation_load() {
ERR_FAIL_COND(!player);
- file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
+ file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILES);
file->clear_filters();
List<String> extensions;
@@ -355,7 +355,6 @@ void AnimationPlayerEditor::_animation_load() {
}
file->popup_file_dialog();
- current_option = RESOURCE_LOAD;
}
void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource> &p_resource, const String &p_path) {
@@ -416,7 +415,6 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource> &p_resource)
file->set_current_path(path);
file->set_title(TTR("Save Resource As..."));
file->popup_file_dialog();
- current_option = RESOURCE_SAVE;
}
void AnimationPlayerEditor::_animation_remove() {
@@ -718,44 +716,48 @@ void AnimationPlayerEditor::_animation_edit() {
}
}
-void AnimationPlayerEditor::_dialog_action(String p_path) {
- switch (current_option) {
- case RESOURCE_LOAD: {
- ERR_FAIL_COND(!player);
+void AnimationPlayerEditor::_save_animation(String p_file) {
+ String current = animation->get_item_text(animation->get_selected());
+ if (current != "") {
+ Ref<Animation> anim = player->get_animation(current);
- Ref<Resource> res = ResourceLoader::load(p_path, "Animation");
- ERR_FAIL_COND_MSG(res.is_null(), "Cannot load Animation from file '" + p_path + "'.");
- ERR_FAIL_COND_MSG(!res->is_class("Animation"), "Loaded resource from file '" + p_path + "' is not Animation.");
+ ERR_FAIL_COND(!Object::cast_to<Resource>(*anim));
- String anim_name = p_path.get_file();
- int ext_pos = anim_name.rfind(".");
- if (ext_pos != -1) {
- anim_name = anim_name.substr(0, ext_pos);
- }
+ RES current_res = RES(Object::cast_to<Resource>(*anim));
- undo_redo->create_action(TTR("Load Animation"));
- undo_redo->add_do_method(player, "add_animation", anim_name, res);
- undo_redo->add_undo_method(player, "remove_animation", anim_name);
- if (player->has_animation(anim_name)) {
- undo_redo->add_undo_method(player, "add_animation", anim_name, player->get_animation(anim_name));
- }
- undo_redo->add_do_method(this, "_animation_player_changed", player);
- undo_redo->add_undo_method(this, "_animation_player_changed", player);
- undo_redo->commit_action();
- break;
- }
- case RESOURCE_SAVE: {
- String current = animation->get_item_text(animation->get_selected());
- if (current != "") {
- Ref<Animation> anim = player->get_animation(current);
+ _animation_save_in_path(current_res, p_file);
+ }
+}
- ERR_FAIL_COND(!Object::cast_to<Resource>(*anim));
+void AnimationPlayerEditor::_load_animations(Vector<String> p_files) {
+ ERR_FAIL_COND(!player);
- RES current_res = RES(Object::cast_to<Resource>(*anim));
+ for (int i = 0; i < p_files.size(); i++) {
+ String file = p_files[i];
- _animation_save_in_path(current_res, p_path);
- }
+ Ref<Resource> res = ResourceLoader::load(file, "Animation");
+ ERR_FAIL_COND_MSG(res.is_null(), "Cannot load Animation from file '" + file + "'.");
+ ERR_FAIL_COND_MSG(!res->is_class("Animation"), "Loaded resource from file '" + file + "' is not Animation.");
+ if (file.rfind("/") != -1) {
+ file = file.substr(file.rfind("/") + 1, file.length());
+ }
+ if (file.rfind("\\") != -1) {
+ file = file.substr(file.rfind("\\") + 1, file.length());
}
+
+ if (file.find(".") != -1) {
+ file = file.substr(0, file.find("."));
+ }
+
+ undo_redo->create_action(TTR("Load Animation"));
+ undo_redo->add_do_method(player, "add_animation", file, res);
+ undo_redo->add_undo_method(player, "remove_animation", file);
+ if (player->has_animation(file)) {
+ undo_redo->add_undo_method(player, "add_animation", file, player->get_animation(file));
+ }
+ undo_redo->add_do_method(this, "_animation_player_changed", player);
+ undo_redo->add_undo_method(this, "_animation_player_changed", player);
+ undo_redo->commit_action();
}
}
@@ -902,7 +904,7 @@ void AnimationPlayerEditor::edit(AnimationPlayer *p_player) {
}
}
-void AnimationPlayerEditor::forward_canvas_force_draw_over_viewport(Control *p_overlay) {
+void AnimationPlayerEditor::forward_force_draw_over_viewport(Control *p_overlay) {
if (!onion.can_overlay) {
return;
}
@@ -1220,7 +1222,7 @@ void AnimationPlayerEditor::_onion_skinning_menu(int p_option) {
}
}
-void AnimationPlayerEditor::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
+void AnimationPlayerEditor::unhandled_key_input(const Ref<InputEvent> &p_ev) {
ERR_FAIL_COND(p_ev.is_null());
Ref<InputEventKey> k = p_ev;
@@ -1497,7 +1499,6 @@ void AnimationPlayerEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_animation_player_changed"), &AnimationPlayerEditor::_animation_player_changed);
ClassDB::bind_method(D_METHOD("_list_changed"), &AnimationPlayerEditor::_list_changed);
ClassDB::bind_method(D_METHOD("_animation_duplicate"), &AnimationPlayerEditor::_animation_duplicate);
- ClassDB::bind_method(D_METHOD("_unhandled_key_input"), &AnimationPlayerEditor::_unhandled_key_input);
ClassDB::bind_method(D_METHOD("_prepare_onion_layers_1"), &AnimationPlayerEditor::_prepare_onion_layers_1);
ClassDB::bind_method(D_METHOD("_prepare_onion_layers_2"), &AnimationPlayerEditor::_prepare_onion_layers_2);
@@ -1696,7 +1697,8 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
animation->connect("item_selected", callable_mp(this, &AnimationPlayerEditor::_animation_selected));
- file->connect("file_selected", callable_mp(this, &AnimationPlayerEditor::_dialog_action));
+ file->connect("file_selected", callable_mp(this, &AnimationPlayerEditor::_save_animation));
+ file->connect("files_selected", callable_mp(this, &AnimationPlayerEditor::_load_animations));
frame->connect("value_changed", callable_mp(this, &AnimationPlayerEditor::_seek_value_changed), make_binds(true, false));
scale->connect("text_submitted", callable_mp(this, &AnimationPlayerEditor::_scale_changed));
@@ -1736,6 +1738,8 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
onion.capture.shader = Ref<Shader>(memnew(Shader));
onion.capture.shader->set_code(R"(
+// Animation editor onion skinning shader.
+
shader_type canvas_item;
uniform vec4 bkg_color;
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index 5c2348f86b..0a514d3ff1 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -112,7 +112,6 @@ class AnimationPlayerEditor : public VBoxContainer {
EditorFileDialog *file;
ConfirmationDialog *delete_dialog;
- int current_option;
struct BlendEditor {
AcceptDialog *dialog = nullptr;
@@ -185,7 +184,8 @@ class AnimationPlayerEditor : public VBoxContainer {
void _animation_duplicate();
void _animation_resource_edit();
void _scale_changed(const String &p_scale);
- void _dialog_action(String p_file);
+ void _save_animation(String p_file);
+ void _load_animations(Vector<String> p_files);
void _seek_frame_changed(const String &p_frame);
void _seek_value_changed(float p_value, bool p_set = false, bool p_timeline_only = false);
void _blend_editor_next_changed(const int p_idx);
@@ -200,7 +200,7 @@ class AnimationPlayerEditor : public VBoxContainer {
void _animation_key_editor_seek(float p_pos, bool p_drag, bool p_timeline_only = false);
void _animation_key_editor_anim_len_changed(float p_len);
- void _unhandled_key_input(const Ref<InputEvent> &p_ev);
+ virtual void unhandled_key_input(const Ref<InputEvent> &p_ev) override;
void _animation_tool_menu(int p_option);
void _onion_skinning_menu(int p_option);
@@ -238,7 +238,7 @@ public:
void set_undo_redo(UndoRedo *p_undo_redo) { undo_redo = p_undo_redo; }
void edit(AnimationPlayer *p_player);
- void forward_canvas_force_draw_over_viewport(Control *p_overlay);
+ void forward_force_draw_over_viewport(Control *p_overlay);
AnimationPlayerEditor(EditorNode *p_editor, AnimationPlayerEditorPlugin *p_plugin);
};
@@ -262,7 +262,8 @@ public:
virtual bool handles(Object *p_object) const override;
virtual void make_visible(bool p_visible) override;
- virtual void forward_canvas_force_draw_over_viewport(Control *p_overlay) override { anim_editor->forward_canvas_force_draw_over_viewport(p_overlay); }
+ virtual void forward_canvas_force_draw_over_viewport(Control *p_overlay) override { anim_editor->forward_force_draw_over_viewport(p_overlay); }
+ virtual void forward_spatial_force_draw_over_viewport(Control *p_overlay) override { anim_editor->forward_force_draw_over_viewport(p_overlay); }
AnimationPlayerEditorPlugin(EditorNode *p_node);
~AnimationPlayerEditorPlugin();
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 785bab42cf..664b2f521e 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -230,7 +230,7 @@ void EditorAssetLibraryItemDescription::configure(const String &p_title, int p_a
description->add_text(TTR("View Files"));
description->pop();
description->add_text("\n" + TTR("Description:") + "\n\n");
- description->append_bbcode(p_description);
+ description->append_text(p_description);
set_title(p_title);
}
@@ -614,7 +614,7 @@ void EditorAssetLibrary::_update_repository_options() {
}
}
-void EditorAssetLibrary::_unhandled_key_input(const Ref<InputEvent> &p_event) {
+void EditorAssetLibrary::unhandled_key_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
const Ref<InputEventKey> key = p_event;
@@ -1322,8 +1322,6 @@ void EditorAssetLibrary::disable_community_support() {
}
void EditorAssetLibrary::_bind_methods() {
- ClassDB::bind_method("_unhandled_key_input", &EditorAssetLibrary::_unhandled_key_input);
-
ADD_SIGNAL(MethodInfo("install_asset", PropertyInfo(Variant::STRING, "zip_path"), PropertyInfo(Variant::STRING, "name")));
}
diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h
index c6ca1ecd4f..286546f962 100644
--- a/editor/plugins/asset_library_editor_plugin.h
+++ b/editor/plugins/asset_library_editor_plugin.h
@@ -299,7 +299,7 @@ class EditorAssetLibrary : public PanelContainer {
protected:
static void _bind_methods();
void _notification(int p_what);
- void _unhandled_key_input(const Ref<InputEvent> &p_event);
+ virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override;
public:
void disable_community_support();
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 477e066e87..a42bdfea34 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -387,7 +387,7 @@ Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, unsig
// Self center
if ((is_snap_active && snap_node_center && (p_modes & SNAP_NODE_CENTER)) || (p_forced_modes & SNAP_NODE_CENTER)) {
if (p_self_canvas_item->_edit_use_rect()) {
- Point2 center = p_self_canvas_item->get_global_transform_with_canvas().xform(p_self_canvas_item->_edit_get_rect().get_position() + p_self_canvas_item->_edit_get_rect().get_size() / 2.0);
+ Point2 center = p_self_canvas_item->get_global_transform_with_canvas().xform(p_self_canvas_item->_edit_get_rect().get_center());
_snap_if_closer_point(p_target, output, snap_target, center, SNAP_TARGET_SELF, rotation);
} else {
Point2 position = p_self_canvas_item->get_global_transform_with_canvas().xform(Point2());
@@ -472,7 +472,7 @@ real_t CanvasItemEditor::snap_angle(real_t p_target, real_t p_start) const {
}
}
-void CanvasItemEditor::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
+void CanvasItemEditor::unhandled_key_input(const Ref<InputEvent> &p_ev) {
ERR_FAIL_COND(p_ev.is_null());
Ref<InputEventKey> k = p_ev;
@@ -525,7 +525,7 @@ Rect2 CanvasItemEditor::_get_encompassing_rect_from_list(List<CanvasItem *> p_li
// Handles the first element
CanvasItem *canvas_item = p_list.front()->get();
- Rect2 rect = Rect2(canvas_item->get_global_transform_with_canvas().xform(canvas_item->_edit_get_rect().position + canvas_item->_edit_get_rect().size / 2), Size2());
+ Rect2 rect = Rect2(canvas_item->get_global_transform_with_canvas().xform(canvas_item->_edit_get_rect().get_center()), Size2());
// Expand with the other ones
for (CanvasItem *canvas_item2 : p_list) {
@@ -564,7 +564,7 @@ void CanvasItemEditor::_expand_encompassing_rect_using_children(Rect2 &r_rect, c
Transform2D xform = p_parent_xform * p_canvas_xform * canvas_item->get_transform();
Rect2 rect = canvas_item->_edit_get_rect();
if (r_first) {
- r_rect = Rect2(xform.xform(rect.position + rect.size / 2), Size2());
+ r_rect = Rect2(xform.xform(rect.get_center()), Size2());
r_first = false;
}
r_rect.expand_to(xform.xform(rect.position));
@@ -590,7 +590,7 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no
return;
}
- const real_t grab_distance = EDITOR_GET("editors/poly_editor/point_grab_radius");
+ const real_t grab_distance = EDITOR_GET("editors/polygon_editor/point_grab_radius");
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
for (int i = p_node->get_child_count() - 1; i >= 0; i--) {
@@ -1295,7 +1295,7 @@ bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) {
// Drag the pivot (in pivot mode / with V key)
if (drag_type == DRAG_NONE) {
if ((b.is_valid() && b->is_pressed() && b->get_button_index() == MOUSE_BUTTON_LEFT && tool == TOOL_EDIT_PIVOT) ||
- (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_keycode() == KEY_V)) {
+ (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_keycode() == KEY_V && tool == TOOL_SELECT && k->get_modifiers_mask() == 0)) {
List<CanvasItem *> selection = _get_edited_canvas_items();
// Filters the selection with nodes that allow setting the pivot
@@ -1460,8 +1460,8 @@ bool CanvasItemEditor::_gui_input_open_scene_on_double_click(const Ref<InputEven
List<CanvasItem *> selection = _get_edited_canvas_items();
if (selection.size() == 1) {
CanvasItem *canvas_item = selection[0];
- if (canvas_item->get_filename() != "" && canvas_item != editor->get_edited_scene()) {
- editor->open_request(canvas_item->get_filename());
+ if (canvas_item->get_scene_file_path() != "" && canvas_item != editor->get_edited_scene()) {
+ editor->open_request(canvas_item->get_scene_file_path());
return true;
}
}
@@ -2927,7 +2927,7 @@ void CanvasItemEditor::_draw_ruler_tool() {
viewport->draw_string(font, text_pos, TS->format_number(vformat("%.1f px", length_vector.length())), HALIGN_LEFT, -1, font_size, font_color, outline_size, outline_color);
if (draw_secondary_lines) {
- const real_t horizontal_angle_rad = atan2(length_vector.y, length_vector.x);
+ const real_t horizontal_angle_rad = length_vector.angle();
const real_t vertical_angle_rad = Math_PI / 2.0 - horizontal_angle_rad;
const int horizontal_angle = round(180 * horizontal_angle_rad / Math_PI);
const int vertical_angle = round(180 * vertical_angle_rad / Math_PI);
@@ -3968,7 +3968,7 @@ void CanvasItemEditor::edit(CanvasItem *p_canvas_item) {
void CanvasItemEditor::_update_context_menu_stylebox() {
// This must be called when the theme changes to follow the new accent color.
Ref<StyleBoxFlat> context_menu_stylebox = memnew(StyleBoxFlat);
- const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color("accent_color", "Editor");
+ const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("accent_color"), SNAME("Editor"));
context_menu_stylebox->set_bg_color(accent_color * Color(1, 1, 1, 0.1));
// Add an underline to the StyleBox, but prevent its minimum vertical size from changing.
context_menu_stylebox->set_border_color(accent_color);
@@ -4195,6 +4195,7 @@ void CanvasItemEditor::_zoom_on_position(real_t p_zoom, Point2 p_position) {
p_zoom = CLAMP(p_zoom, MIN_ZOOM, MAX_ZOOM);
if (p_zoom == zoom) {
+ zoom_widget->set_zoom(p_zoom);
return;
}
@@ -4895,10 +4896,9 @@ void CanvasItemEditor::_focus_selection(int p_op) {
};
if (p_op == VIEW_CENTER_TO_SELECTION) {
- center = rect.position + rect.size / 2;
+ center = rect.get_center();
Vector2 offset = viewport->get_size() / 2 - editor->get_scene_root()->get_global_canvas_transform().xform(center);
- view_offset.x -= Math::round(offset.x / zoom);
- view_offset.y -= Math::round(offset.y / zoom);
+ view_offset -= (offset / zoom).round();
update_viewport();
} else { // VIEW_FRAME_TO_SELECTION
@@ -4918,7 +4918,7 @@ void CanvasItemEditor::_focus_selection(int p_op) {
void CanvasItemEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_override_camera_button", "game_running"), &CanvasItemEditor::_update_override_camera_button);
ClassDB::bind_method("_get_editor_data", &CanvasItemEditor::_get_editor_data);
- ClassDB::bind_method("_unhandled_key_input", &CanvasItemEditor::_unhandled_key_input);
+
ClassDB::bind_method(D_METHOD("set_state"), &CanvasItemEditor::set_state);
ClassDB::bind_method(D_METHOD("update_viewport"), &CanvasItemEditor::update_viewport);
ClassDB::bind_method(D_METHOD("_zoom_on_position"), &CanvasItemEditor::_zoom_on_position);
@@ -5203,7 +5203,9 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
snap_rotation = false;
snap_scale = false;
snap_relative = false;
- snap_pixel = false;
+ // Enable pixel snapping even if pixel snap rendering is disabled in the Project Settings.
+ // This results in crisper visuals by preventing 2D nodes from being placed at subpixel coordinates.
+ snap_pixel = true;
snap_target[0] = SNAP_TARGET_NONE;
snap_target[1] = SNAP_TARGET_NONE;
@@ -5798,7 +5800,7 @@ void CanvasItemEditorViewport::_remove_preview() {
}
bool CanvasItemEditorViewport::_cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node) {
- if (p_desired_node->get_filename() == p_target_scene_path) {
+ if (p_desired_node->get_scene_file_path() == p_target_scene_path) {
return true;
}
@@ -5895,14 +5897,14 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons
return false;
}
- if (editor->get_edited_scene()->get_filename() != "") { // cyclical instancing
- if (_cyclical_dependency_exists(editor->get_edited_scene()->get_filename(), instantiated_scene)) {
+ if (editor->get_edited_scene()->get_scene_file_path() != "") { // cyclical instancing
+ if (_cyclical_dependency_exists(editor->get_edited_scene()->get_scene_file_path(), instantiated_scene)) {
memdelete(instantiated_scene);
return false;
}
}
- instantiated_scene->set_filename(ProjectSettings::get_singleton()->localize_path(path));
+ instantiated_scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(path));
editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene);
editor_data->get_undo_redo().add_do_method(instantiated_scene, "set_owner", editor->get_edited_scene());
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index bff580315e..1965efbf30 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -455,7 +455,7 @@ private:
void _keying_changed();
- void _unhandled_key_input(const Ref<InputEvent> &p_ev);
+ virtual void unhandled_key_input(const Ref<InputEvent> &p_ev) override;
void _draw_text_at_position(Point2 p_position, String p_string, Side p_side);
void _draw_margin_at_position(int p_value, Point2 p_position, Side p_side);
diff --git a/editor/plugins/collision_polygon_3d_editor_plugin.cpp b/editor/plugins/collision_polygon_3d_editor_plugin.cpp
index 5d5f78e0dc..8b354c33a1 100644
--- a/editor/plugins/collision_polygon_3d_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_3d_editor_plugin.cpp
@@ -138,7 +138,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
Vector<Vector2> poly = node->call("get_polygon");
//first check if a point is to be added (segment split)
- real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
+ real_t grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius");
switch (mode) {
case MODE_CREATE: {
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index 486f947e43..fb32d7b1fd 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -38,7 +38,8 @@
#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/segment_shape_2d.h"
-#include "scene/resources/world_margin_shape_2d.h"
+#include "scene/resources/separation_ray_shape_2d.h"
+#include "scene/resources/world_boundary_shape_2d.h"
void CollisionShape2DEditor::_node_removed(Node *p_node) {
if (p_node == node) {
@@ -50,12 +51,7 @@ Variant CollisionShape2DEditor::get_handle_value(int idx) const {
switch (shape_type) {
case CAPSULE_SHAPE: {
Ref<CapsuleShape2D> capsule = node->get_shape();
-
- if (idx == 0) {
- return capsule->get_radius();
- } else if (idx == 1) {
- return capsule->get_height();
- }
+ return Vector2(capsule->get_radius(), capsule->get_height());
} break;
@@ -74,13 +70,22 @@ Variant CollisionShape2DEditor::get_handle_value(int idx) const {
case CONVEX_POLYGON_SHAPE: {
} break;
- case WORLD_MARGIN_SHAPE: {
- Ref<WorldMarginShape2D> line = node->get_shape();
+ case WORLD_BOUNDARY_SHAPE: {
+ Ref<WorldBoundaryShape2D> world_boundary = node->get_shape();
if (idx == 0) {
- return line->get_distance();
+ return world_boundary->get_distance();
} else {
- return line->get_normal();
+ return world_boundary->get_normal();
+ }
+
+ } break;
+
+ case SEPARATION_RAY_SHAPE: {
+ Ref<SeparationRayShape2D> ray = node->get_shape();
+
+ if (idx == 0) {
+ return ray->get_length();
}
} break;
@@ -142,14 +147,14 @@ void CollisionShape2DEditor::set_handle(int idx, Point2 &p_point) {
case CONVEX_POLYGON_SHAPE: {
} break;
- case WORLD_MARGIN_SHAPE: {
+ case WORLD_BOUNDARY_SHAPE: {
if (idx < 2) {
- Ref<WorldMarginShape2D> line = node->get_shape();
+ Ref<WorldBoundaryShape2D> world_boundary = node->get_shape();
if (idx == 0) {
- line->set_distance(p_point.length());
+ world_boundary->set_distance(p_point.length());
} else {
- line->set_normal(p_point.normalized());
+ world_boundary->set_normal(p_point.normalized());
}
canvas_item_editor->update_viewport();
@@ -157,6 +162,15 @@ void CollisionShape2DEditor::set_handle(int idx, Point2 &p_point) {
} break;
+ case SEPARATION_RAY_SHAPE: {
+ Ref<SeparationRayShape2D> ray = node->get_shape();
+
+ ray->set_length(Math::abs(p_point.y));
+
+ canvas_item_editor->update_viewport();
+
+ } break;
+
case RECTANGLE_SHAPE: {
if (idx < 8) {
Ref<RectangleShape2D> rect = node->get_shape();
@@ -209,17 +223,17 @@ void CollisionShape2DEditor::commit_handle(int idx, Variant &p_org) {
case CAPSULE_SHAPE: {
Ref<CapsuleShape2D> capsule = node->get_shape();
+ Vector2 values = p_org;
+
if (idx == 0) {
undo_redo->add_do_method(capsule.ptr(), "set_radius", capsule->get_radius());
- undo_redo->add_do_method(canvas_item_editor, "update_viewport");
- undo_redo->add_undo_method(capsule.ptr(), "set_radius", p_org);
- undo_redo->add_do_method(canvas_item_editor, "update_viewport");
} else if (idx == 1) {
undo_redo->add_do_method(capsule.ptr(), "set_height", capsule->get_height());
- undo_redo->add_do_method(canvas_item_editor, "update_viewport");
- undo_redo->add_undo_method(capsule.ptr(), "set_height", p_org);
- undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
}
+ undo_redo->add_do_method(canvas_item_editor, "update_viewport");
+ undo_redo->add_undo_method(capsule.ptr(), "set_radius", values[0]);
+ undo_redo->add_undo_method(capsule.ptr(), "set_height", values[1]);
+ undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
} break;
@@ -241,23 +255,33 @@ void CollisionShape2DEditor::commit_handle(int idx, Variant &p_org) {
// Cannot be edited directly, use CollisionPolygon2D instead.
} break;
- case WORLD_MARGIN_SHAPE: {
- Ref<WorldMarginShape2D> line = node->get_shape();
+ case WORLD_BOUNDARY_SHAPE: {
+ Ref<WorldBoundaryShape2D> world_boundary = node->get_shape();
if (idx == 0) {
- undo_redo->add_do_method(line.ptr(), "set_distance", line->get_distance());
+ undo_redo->add_do_method(world_boundary.ptr(), "set_distance", world_boundary->get_distance());
undo_redo->add_do_method(canvas_item_editor, "update_viewport");
- undo_redo->add_undo_method(line.ptr(), "set_distance", p_org);
+ undo_redo->add_undo_method(world_boundary.ptr(), "set_distance", p_org);
undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
} else {
- undo_redo->add_do_method(line.ptr(), "set_normal", line->get_normal());
+ undo_redo->add_do_method(world_boundary.ptr(), "set_normal", world_boundary->get_normal());
undo_redo->add_do_method(canvas_item_editor, "update_viewport");
- undo_redo->add_undo_method(line.ptr(), "set_normal", p_org);
+ undo_redo->add_undo_method(world_boundary.ptr(), "set_normal", p_org);
undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
}
} break;
+ case SEPARATION_RAY_SHAPE: {
+ Ref<SeparationRayShape2D> ray = node->get_shape();
+
+ undo_redo->add_do_method(ray.ptr(), "set_length", ray->get_length());
+ undo_redo->add_do_method(canvas_item_editor, "update_viewport");
+ undo_redo->add_undo_method(ray.ptr(), "set_length", p_org);
+ undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
+
+ } break;
+
case RECTANGLE_SHAPE: {
Ref<RectangleShape2D> rect = node->get_shape();
@@ -397,8 +421,10 @@ void CollisionShape2DEditor::_get_current_shape_type() {
shape_type = CONCAVE_POLYGON_SHAPE;
} else if (Object::cast_to<ConvexPolygonShape2D>(*s)) {
shape_type = CONVEX_POLYGON_SHAPE;
- } else if (Object::cast_to<WorldMarginShape2D>(*s)) {
- shape_type = WORLD_MARGIN_SHAPE;
+ } else if (Object::cast_to<WorldBoundaryShape2D>(*s)) {
+ shape_type = WORLD_BOUNDARY_SHAPE;
+ } else if (Object::cast_to<SeparationRayShape2D>(*s)) {
+ shape_type = SEPARATION_RAY_SHAPE;
} else if (Object::cast_to<RectangleShape2D>(*s)) {
shape_type = RECTANGLE_SHAPE;
} else if (Object::cast_to<SegmentShape2D>(*s)) {
@@ -464,8 +490,8 @@ void CollisionShape2DEditor::forward_canvas_draw_over_viewport(Control *p_overla
case CONVEX_POLYGON_SHAPE: {
} break;
- case WORLD_MARGIN_SHAPE: {
- Ref<WorldMarginShape2D> shape = node->get_shape();
+ case WORLD_BOUNDARY_SHAPE: {
+ Ref<WorldBoundaryShape2D> shape = node->get_shape();
handles.resize(2);
handles.write[0] = shape->get_normal() * shape->get_distance();
@@ -476,6 +502,16 @@ void CollisionShape2DEditor::forward_canvas_draw_over_viewport(Control *p_overla
} break;
+ case SEPARATION_RAY_SHAPE: {
+ Ref<SeparationRayShape2D> shape = node->get_shape();
+
+ handles.resize(1);
+ handles.write[0] = Point2(0, shape->get_length());
+
+ p_overlay->draw_texture(h, gt.xform(handles[0]) - size);
+
+ } break;
+
case RECTANGLE_SHAPE: {
Ref<RectangleShape2D> shape = node->get_shape();
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.h b/editor/plugins/collision_shape_2d_editor_plugin.h
index 056e1b5b7d..ab95600a52 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.h
+++ b/editor/plugins/collision_shape_2d_editor_plugin.h
@@ -46,7 +46,8 @@ class CollisionShape2DEditor : public Control {
CIRCLE_SHAPE,
CONCAVE_POLYGON_SHAPE,
CONVEX_POLYGON_SHAPE,
- WORLD_MARGIN_SHAPE,
+ WORLD_BOUNDARY_SHAPE,
+ SEPARATION_RAY_SHAPE,
RECTANGLE_SHAPE,
SEGMENT_SHAPE
};
diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.cpp b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
index 6f246c1661..fb9f8696fe 100644
--- a/editor/plugins/cpu_particles_2d_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
@@ -83,7 +83,7 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() {
}
img->convert(Image::FORMAT_RGBA8);
ERR_FAIL_COND(img->get_format() != Image::FORMAT_RGBA8);
- Size2i s = Size2(img->get_width(), img->get_height());
+ Size2i s = img->get_size();
ERR_FAIL_COND(s.width == 0 || s.height == 0);
Vector<Point2> valid_positions;
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index 07ff0eb346..4a22dc5b62 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -101,7 +101,7 @@ void CurveEditor::_notification(int p_what) {
}
}
-void CurveEditor::on_gui_input(const Ref<InputEvent> &p_event) {
+void CurveEditor::gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb_ref = p_event;
if (mb_ref.is_valid()) {
const InputEventMouseButton &mb = **mb_ref;
@@ -757,10 +757,6 @@ void CurveEditor::_draw() {
}
}
-void CurveEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &CurveEditor::on_gui_input);
-}
-
//---------------
bool EditorInspectorPluginCurve::can_handle(Object *p_object) {
diff --git a/editor/plugins/curve_editor_plugin.h b/editor/plugins/curve_editor_plugin.h
index 2e8dd43d7e..c351f6ebe9 100644
--- a/editor/plugins/curve_editor_plugin.h
+++ b/editor/plugins/curve_editor_plugin.h
@@ -74,10 +74,8 @@ public:
protected:
void _notification(int p_what);
- static void _bind_methods();
-
private:
- void on_gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
void on_preset_item_selected(int preset_id);
void _curve_changed();
void on_context_menu_item_selected(int action_id);
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 95f68d5f7f..4cb2c0a76b 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -718,7 +718,7 @@ Ref<Texture2D> EditorMeshPreviewPlugin::generate(const RES &p_from, const Size2
RS::get_singleton()->instance_set_base(mesh_instance, mesh->get_rid());
AABB aabb = mesh->get_aabb();
- Vector3 ofs = aabb.position + aabb.size * 0.5;
+ Vector3 ofs = aabb.get_center();
aabb.position -= ofs;
Transform3D xform;
xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI * 0.125);
@@ -826,55 +826,6 @@ bool EditorFontPreviewPlugin::handles(const String &p_type) const {
return ClassDB::is_parent_class(p_type, "FontData") || ClassDB::is_parent_class(p_type, "Font");
}
-struct FSample {
- String script;
- String sample;
-};
-
-static FSample _samples[] = {
- { "hani", U"漢字" },
- { "armn", U"Ô±Õ¢" },
- { "copt", U"Αα" },
- { "cyrl", U"Ðб" },
- { "grek", U"Αα" },
- { "hebr", U"×ב" },
- { "arab", U"اب" },
- { "syrc", U"ÜÜ’" },
- { "thaa", U"Þ€Þ" },
- { "deva", U"आ" },
- { "beng", U"আ" },
- { "guru", U"ਆ" },
- { "gujr", U"આ" },
- { "orya", U"ଆ" },
- { "taml", U"ஆ" },
- { "telu", U"à°†" },
- { "knda", U"ಆ" },
- { "mylm", U"à´†" },
- { "sinh", U"ආ" },
- { "thai", U"à¸à¸´" },
- { "laoo", U"àºàº´" },
- { "tibt", U"ༀ" },
- { "mymr", U"က" },
- { "geor", U"á‚ áƒ" },
- { "hang", U"한글" },
- { "ethi", U"ሀ" },
- { "cher", U"Ꭳ" },
- { "cans", U"á" },
- { "ogam", U"áš" },
- { "runr", U"áš " },
- { "tglg", U"ᜀ" },
- { "hano", U"ᜠ" },
- { "buhd", U"á€" },
- { "tagb", U"á " },
- { "khmr", U"ក" },
- { "mong", U"á  " },
- { "limb", U"á¤" },
- { "tale", U"á¥" },
- { "latn", U"Ab" },
- { "zyyy", U"😀" },
- { "", U"" }
-};
-
Ref<Texture2D> EditorFontPreviewPlugin::generate_from_path(const String &p_path, const Size2 &p_size) const {
RES res = ResourceLoader::load(p_path);
Ref<Font> sampled_font;
@@ -886,15 +837,15 @@ Ref<Texture2D> EditorFontPreviewPlugin::generate_from_path(const String &p_path,
}
String sample;
- for (int j = 0; j < sampled_font->get_data_count(); j++) {
- for (int i = 0; _samples[i].script != String(); i++) {
- if (sampled_font->get_data(j)->is_script_supported(_samples[i].script)) {
- if (sampled_font->get_data(j)->has_char(_samples[i].sample[0])) {
- sample += _samples[i].sample;
- }
- }
+ static const String sample_base = U"12漢字ԱբΑαÐбΑα×בابÜÜ’Þ€Þआআਆઆଆஆఆಆആආà¸à¸´àºàº´à¼€á€€á‚ áƒí•œê¸€áˆ€áŽ£áášáš áœ€áœ á€á áž€á  á¤á¥Ab😀";
+ for (int i = 0; i < sample_base.length(); i++) {
+ if (sampled_font->has_char(sample_base[i])) {
+ sample += sample_base[i];
}
}
+ if (sample.is_empty()) {
+ sample = sampled_font->get_supported_chars().substr(0, 6);
+ }
Vector2 size = sampled_font->get_string_size(sample, 50);
Vector2 pos;
diff --git a/editor/plugins/font_editor_plugin.cpp b/editor/plugins/font_editor_plugin.cpp
index 22c9cc9ab1..52fb5b69ea 100644
--- a/editor/plugins/font_editor_plugin.cpp
+++ b/editor/plugins/font_editor_plugin.cpp
@@ -50,70 +50,24 @@ Size2 FontDataPreview::get_minimum_size() const {
return Vector2(64, 64) * EDSCALE;
}
-struct FSample {
- String script;
- String sample;
-};
-
-static FSample _samples[] = {
- { "hani", U"漢字" },
- { "armn", U"Ô±Õ¢" },
- { "copt", U"Αα" },
- { "cyrl", U"Ðб" },
- { "grek", U"Αα" },
- { "hebr", U"×ב" },
- { "arab", U"اب" },
- { "syrc", U"ÜÜ’" },
- { "thaa", U"Þ€Þ" },
- { "deva", U"आ" },
- { "beng", U"আ" },
- { "guru", U"ਆ" },
- { "gujr", U"આ" },
- { "orya", U"ଆ" },
- { "taml", U"ஆ" },
- { "telu", U"à°†" },
- { "knda", U"ಆ" },
- { "mylm", U"à´†" },
- { "sinh", U"ආ" },
- { "thai", U"à¸à¸´" },
- { "laoo", U"àºàº´" },
- { "tibt", U"ༀ" },
- { "mymr", U"က" },
- { "geor", U"á‚ áƒ" },
- { "hang", U"한글" },
- { "ethi", U"ሀ" },
- { "cher", U"Ꭳ" },
- { "cans", U"á" },
- { "ogam", U"áš" },
- { "runr", U"áš " },
- { "tglg", U"ᜀ" },
- { "hano", U"ᜠ" },
- { "buhd", U"á€" },
- { "tagb", U"á " },
- { "khmr", U"ក" },
- { "mong", U"á  " },
- { "limb", U"á¤" },
- { "tale", U"á¥" },
- { "latn", U"Ab" },
- { "zyyy", U"😀" },
- { "", U"" }
-};
-
void FontDataPreview::set_data(const Ref<FontData> &p_data) {
Ref<Font> f = memnew(Font);
f->add_data(p_data);
line->clear();
-
- String sample;
- for (int i = 0; _samples[i].script != String(); i++) {
- if (p_data->is_script_supported(_samples[i].script)) {
- if (p_data->has_char(_samples[i].sample[0])) {
- sample += _samples[i].sample;
+ if (p_data.is_valid()) {
+ String sample;
+ static const String sample_base = U"12漢字ԱբΑαÐбΑα×בابÜÜ’Þ€Þआআਆઆଆஆఆಆആආà¸à¸´àºàº´à¼€á€€á‚ áƒí•œê¸€áˆ€áŽ£áášáš áœ€áœ á€á áž€á  á¤á¥Ab😀";
+ for (int i = 0; i < sample_base.length(); i++) {
+ if (p_data->has_char(sample_base[i])) {
+ sample += sample_base[i];
}
}
+ if (sample.is_empty()) {
+ sample = p_data->get_supported_chars().substr(0, 6);
+ }
+ line->add_string(sample, f, 72);
}
- line->add_string(sample, f, 72);
update();
}
@@ -124,159 +78,6 @@ FontDataPreview::FontDataPreview() {
/*************************************************************************/
-void FontDataEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_SORT_CHILDREN) {
- int split_width = get_name_split_ratio() * get_size().width;
- button->set_size(Size2(get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))->get_width(), get_size().height));
- if (is_layout_rtl()) {
- if (le != nullptr) {
- fit_child_in_rect(le, Rect2(Vector2(split_width, 0), Size2(split_width, get_size().height)));
- }
- fit_child_in_rect(chk, Rect2(Vector2(split_width - chk->get_size().x, 0), Size2(chk->get_size().x, get_size().height)));
- fit_child_in_rect(button, Rect2(Vector2(0, 0), Size2(button->get_size().width, get_size().height)));
- } else {
- if (le != nullptr) {
- fit_child_in_rect(le, Rect2(Vector2(0, 0), Size2(split_width, get_size().height)));
- }
- fit_child_in_rect(chk, Rect2(Vector2(split_width, 0), Size2(chk->get_size().x, get_size().height)));
- fit_child_in_rect(button, Rect2(Vector2(get_size().width - button->get_size().width, 0), Size2(button->get_size().width, get_size().height)));
- }
- update();
- }
- if (p_what == NOTIFICATION_DRAW) {
- int split_width = get_name_split_ratio() * get_size().width;
- Color dark_color = get_theme_color(SNAME("dark_color_2"), SNAME("Editor"));
- if (is_layout_rtl()) {
- draw_rect(Rect2(Vector2(0, 0), Size2(split_width, get_size().height)), dark_color);
- } else {
- draw_rect(Rect2(Vector2(split_width, 0), Size2(split_width, get_size().height)), dark_color);
- }
- }
- if (p_what == NOTIFICATION_THEME_CHANGED) {
- if (le != nullptr) {
- button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
- } else {
- button->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
- }
- queue_sort();
- }
- if (p_what == NOTIFICATION_RESIZED) {
- queue_sort();
- }
-}
-
-void FontDataEditor::update_property() {
- if (le == nullptr) {
- bool c = get_edited_object()->get(get_edited_property());
- chk->set_pressed(c);
- chk->set_disabled(is_read_only());
- }
-}
-
-Size2 FontDataEditor::get_minimum_size() const {
- return Size2(0, 60);
-}
-
-void FontDataEditor::_bind_methods() {
-}
-
-void FontDataEditor::init_lang_add() {
- le = memnew(LineEdit);
- le->set_placeholder("Language code");
- le->set_custom_minimum_size(Size2(get_size().width / 2, 0));
- le->set_editable(true);
- add_child(le);
-
- button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
- button->connect("pressed", callable_mp(this, &FontDataEditor::add_lang));
-}
-
-void FontDataEditor::init_lang_edit() {
- button->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
- button->connect("pressed", callable_mp(this, &FontDataEditor::remove_lang));
- chk->connect("toggled", callable_mp(this, &FontDataEditor::toggle_lang));
-}
-
-void FontDataEditor::init_script_add() {
- le = memnew(LineEdit);
- le->set_placeholder("Script code");
- le->set_custom_minimum_size(Size2(get_size().width / 2, 0));
- le->set_editable(true);
- add_child(le);
-
- button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
- button->connect("pressed", callable_mp(this, &FontDataEditor::add_script));
-}
-
-void FontDataEditor::init_script_edit() {
- button->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
- button->connect("pressed", callable_mp(this, &FontDataEditor::remove_script));
- chk->connect("toggled", callable_mp(this, &FontDataEditor::toggle_script));
-}
-
-void FontDataEditor::add_lang() {
- FontData *fd = Object::cast_to<FontData>(get_edited_object());
- if (fd != nullptr && !le->get_text().is_empty()) {
- fd->set_language_support_override(le->get_text(), chk->is_pressed());
- le->set_text("");
- chk->set_pressed(false);
- }
-}
-
-void FontDataEditor::add_script() {
- FontData *fd = Object::cast_to<FontData>(get_edited_object());
- if (fd != nullptr && le->get_text().length() == 4) {
- fd->set_script_support_override(le->get_text(), chk->is_pressed());
- le->set_text("");
- chk->set_pressed(false);
- }
-}
-
-void FontDataEditor::toggle_lang(bool p_pressed) {
- FontData *fd = Object::cast_to<FontData>(get_edited_object());
- if (fd != nullptr) {
- String lang = String(get_edited_property()).replace("language_support_override/", "");
- fd->set_language_support_override(lang, p_pressed);
- }
-}
-
-void FontDataEditor::toggle_script(bool p_pressed) {
- FontData *fd = Object::cast_to<FontData>(get_edited_object());
- if (fd != nullptr) {
- String script = String(get_edited_property()).replace("script_support_override/", "");
- fd->set_script_support_override(script, p_pressed);
- }
-}
-
-void FontDataEditor::remove_lang() {
- FontData *fd = Object::cast_to<FontData>(get_edited_object());
- if (fd != nullptr) {
- String lang = String(get_edited_property()).replace("language_support_override/", "");
- fd->remove_language_support_override(lang);
- }
-}
-
-void FontDataEditor::remove_script() {
- FontData *fd = Object::cast_to<FontData>(get_edited_object());
- if (fd != nullptr) {
- String script = String(get_edited_property()).replace("script_support_override/", "");
- fd->remove_script_support_override(script);
- }
-}
-
-FontDataEditor::FontDataEditor() {
- chk = memnew(CheckBox);
- chk->set_text(TTR("On"));
- chk->set_flat(true);
- add_child(chk);
-
- button = memnew(Button);
- button->set_flat(true);
- add_child(button);
-}
-
-/*************************************************************************/
-
bool EditorInspectorPluginFont::can_handle(Object *p_object) {
return Object::cast_to<FontData>(p_object) != nullptr;
}
@@ -291,34 +92,6 @@ void EditorInspectorPluginFont::parse_begin(Object *p_object) {
}
bool EditorInspectorPluginFont::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
- if (p_path.begins_with("language_support_override/") && p_object->is_class("FontData")) {
- String lang = p_path.replace("language_support_override/", "");
-
- FontDataEditor *editor = memnew(FontDataEditor);
- if (lang != "_new") {
- editor->init_lang_edit();
- } else {
- editor->init_lang_add();
- }
- add_property_editor(p_path, editor);
-
- return true;
- }
-
- if (p_path.begins_with("script_support_override/") && p_object->is_class("FontData")) {
- String script = p_path.replace("script_support_override/", "");
-
- FontDataEditor *editor = memnew(FontDataEditor);
- if (script != "_new") {
- editor->init_script_edit();
- } else {
- editor->init_script_add();
- }
- add_property_editor(p_path, editor);
-
- return true;
- }
-
return false;
}
diff --git a/editor/plugins/font_editor_plugin.h b/editor/plugins/font_editor_plugin.h
index 71464003a0..3530815872 100644
--- a/editor/plugins/font_editor_plugin.h
+++ b/editor/plugins/font_editor_plugin.h
@@ -55,39 +55,6 @@ public:
/*************************************************************************/
-class FontDataEditor : public EditorProperty {
- GDCLASS(FontDataEditor, EditorProperty);
-
- LineEdit *le = nullptr;
- CheckBox *chk = nullptr;
- Button *button = nullptr;
-
- void toggle_lang(bool p_pressed);
- void toggle_script(bool p_pressed);
- void add_lang();
- void add_script();
- void remove_lang();
- void remove_script();
-
-protected:
- void _notification(int p_what);
-
- static void _bind_methods();
-
-public:
- virtual Size2 get_minimum_size() const override;
- virtual void update_property() override;
-
- void init_lang_add();
- void init_lang_edit();
- void init_script_add();
- void init_script_edit();
-
- FontDataEditor();
-};
-
-/*************************************************************************/
-
class EditorInspectorPluginFont : public EditorInspectorPlugin {
GDCLASS(EditorInspectorPluginFont, EditorInspectorPlugin);
diff --git a/editor/plugins/gpu_particles_2d_editor_plugin.cpp b/editor/plugins/gpu_particles_2d_editor_plugin.cpp
index dd91df747a..44c789b145 100644
--- a/editor/plugins/gpu_particles_2d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_2d_editor_plugin.cpp
@@ -158,7 +158,7 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
}
img->convert(Image::FORMAT_RGBA8);
ERR_FAIL_COND(img->get_format() != Image::FORMAT_RGBA8);
- Size2i s = Size2(img->get_width(), img->get_height());
+ Size2i s = img->get_size();
ERR_FAIL_COND(s.width == 0 || s.height == 0);
Vector<Point2> valid_positions;
diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
index 903a3689b0..5ac58795d1 100644
--- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
@@ -362,6 +362,7 @@ void GPUParticles3DEditor::_generate_emission_points() {
Ref<ImageTexture> tex;
tex.instantiate();
+ tex->create_from_image(image);
Ref<ParticlesMaterial> material = node->get_process_material();
ERR_FAIL_COND(material.is_null());
@@ -390,6 +391,7 @@ void GPUParticles3DEditor::_generate_emission_points() {
Ref<ImageTexture> tex2;
tex2.instantiate();
+ tex2->create_from_image(image2);
material->set_emission_normal_texture(tex2);
} else {
diff --git a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
index a4436525fb..6df2e34ceb 100644
--- a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
@@ -33,7 +33,7 @@
void GPUParticlesCollisionSDFEditorPlugin::_bake() {
if (col_sdf) {
if (col_sdf->get_texture().is_null() || !col_sdf->get_texture()->get_path().is_resource_file()) {
- String path = get_tree()->get_edited_scene_root()->get_filename();
+ String path = get_tree()->get_edited_scene_root()->get_scene_file_path();
if (path == String()) {
path = "res://" + col_sdf->get_name() + "_data.exr";
} else {
diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp
index 3207a989bd..16cafda899 100644
--- a/editor/plugins/item_list_editor_plugin.cpp
+++ b/editor/plugins/item_list_editor_plugin.cpp
@@ -244,6 +244,7 @@ void ItemListEditor::_node_removed(Node *p_node) {
void ItemListEditor::_notification(int p_notification) {
if (p_notification == NOTIFICATION_ENTER_TREE || p_notification == NOTIFICATION_THEME_CHANGED) {
add_button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
+ clear_button->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
del_button->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")));
} else if (p_notification == NOTIFICATION_READY) {
get_tree()->connect("node_removed", callable_mp(this, &ItemListEditor::_node_removed));
@@ -258,6 +259,12 @@ void ItemListEditor::_add_pressed() {
item_plugins[selected_idx]->add_item();
}
+void ItemListEditor::_clear_pressed() {
+ for (int i = item_plugins[selected_idx]->get_item_count() - 1; i >= 0; i--) {
+ item_plugins[selected_idx]->erase(i);
+ }
+}
+
void ItemListEditor::_delete_pressed() {
if (selected_idx == -1) {
return;
@@ -350,6 +357,11 @@ ItemListEditor::ItemListEditor() {
hbc->add_spacer();
+ clear_button = memnew(Button);
+ clear_button->set_text(TTR("Delete All"));
+ hbc->add_child(clear_button);
+ clear_button->connect("pressed", callable_mp(this, &ItemListEditor::_clear_pressed));
+
del_button = memnew(Button);
del_button->set_text(TTR("Delete"));
hbc->add_child(del_button);
diff --git a/editor/plugins/item_list_editor_plugin.h b/editor/plugins/item_list_editor_plugin.h
index 8c77f3d952..8f61aef083 100644
--- a/editor/plugins/item_list_editor_plugin.h
+++ b/editor/plugins/item_list_editor_plugin.h
@@ -204,6 +204,7 @@ class ItemListEditor : public HBoxContainer {
Tree *tree;
Button *add_button;
Button *del_button;
+ Button *clear_button;
int selected_idx;
@@ -213,6 +214,7 @@ class ItemListEditor : public HBoxContainer {
void _add_pressed();
void _delete_pressed();
+ void _clear_pressed();
void _node_removed(Node *p_node);
diff --git a/editor/plugins/lightmap_gi_editor_plugin.cpp b/editor/plugins/lightmap_gi_editor_plugin.cpp
index b4a70cd31d..123087446c 100644
--- a/editor/plugins/lightmap_gi_editor_plugin.cpp
+++ b/editor/plugins/lightmap_gi_editor_plugin.cpp
@@ -43,9 +43,9 @@ void LightmapGIEditorPlugin::_bake_select_file(const String &p_file) {
switch (err) {
case LightmapGI::BAKE_ERROR_NO_SAVE_PATH: {
- String scene_path = lightmap->get_filename();
+ String scene_path = lightmap->get_scene_file_path();
if (scene_path == String()) {
- scene_path = lightmap->get_owner()->get_filename();
+ scene_path = lightmap->get_owner()->get_scene_file_path();
}
if (scene_path == String()) {
EditorNode::get_singleton()->show_warning(TTR("Can't determine a save path for lightmap images.\nSave your scene and try again."));
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index 94966d4fe6..30945826bb 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -278,6 +278,8 @@ Ref<Resource> StandardMaterial3DConversionPlugin::convert(const Ref<Resource> &p
}
smat->set_render_priority(mat->get_render_priority());
+ smat->set_local_to_scene(mat->is_local_to_scene());
+ smat->set_name(mat->get_name());
return smat;
}
@@ -315,6 +317,8 @@ Ref<Resource> ParticlesMaterialConversionPlugin::convert(const Ref<Resource> &p_
}
smat->set_render_priority(mat->get_render_priority());
+ smat->set_local_to_scene(mat->is_local_to_scene());
+ smat->set_name(mat->get_name());
return smat;
}
@@ -352,6 +356,8 @@ Ref<Resource> CanvasItemMaterialConversionPlugin::convert(const Ref<Resource> &p
}
smat->set_render_priority(mat->get_render_priority());
+ smat->set_local_to_scene(mat->is_local_to_scene());
+ smat->set_name(mat->get_name());
return smat;
}
@@ -389,6 +395,8 @@ Ref<Resource> ProceduralSkyMaterialConversionPlugin::convert(const Ref<Resource>
}
smat->set_render_priority(mat->get_render_priority());
+ smat->set_local_to_scene(mat->is_local_to_scene());
+ smat->set_name(mat->get_name());
return smat;
}
@@ -426,6 +434,8 @@ Ref<Resource> PanoramaSkyMaterialConversionPlugin::convert(const Ref<Resource> &
}
smat->set_render_priority(mat->get_render_priority());
+ smat->set_local_to_scene(mat->is_local_to_scene());
+ smat->set_name(mat->get_name());
return smat;
}
@@ -463,5 +473,7 @@ Ref<Resource> PhysicalSkyMaterialConversionPlugin::convert(const Ref<Resource> &
}
smat->set_render_priority(mat->get_render_priority());
+ smat->set_local_to_scene(mat->is_local_to_scene());
+ smat->set_name(mat->get_name());
return smat;
}
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index 39ab3215ff..dc16a7a325 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -32,7 +32,7 @@
#include "editor/editor_scale.h"
-void MeshEditor::_gui_input(Ref<InputEvent> p_event) {
+void MeshEditor::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseMotion> mm = p_event;
@@ -80,7 +80,7 @@ void MeshEditor::edit(Ref<Mesh> p_mesh) {
_update_rotation();
AABB aabb = mesh->get_aabb();
- Vector3 ofs = aabb.position + aabb.size * 0.5;
+ Vector3 ofs = aabb.get_center();
float m = aabb.get_longest_axis_size();
if (m != 0) {
m = 1.0 / m;
@@ -103,10 +103,6 @@ void MeshEditor::_button_pressed(Node *p_button) {
}
}
-void MeshEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &MeshEditor::_gui_input);
-}
-
MeshEditor::MeshEditor() {
viewport = memnew(SubViewport);
Ref<World3D> world_3d;
diff --git a/editor/plugins/mesh_editor_plugin.h b/editor/plugins/mesh_editor_plugin.h
index 455fcb5fe9..1e88b70202 100644
--- a/editor/plugins/mesh_editor_plugin.h
+++ b/editor/plugins/mesh_editor_plugin.h
@@ -64,8 +64,7 @@ class MeshEditor : public SubViewportContainer {
protected:
void _notification(int p_what);
- void _gui_input(Ref<InputEvent> p_event);
- static void _bind_methods();
+ void gui_input(const Ref<InputEvent> &p_event) override;
public:
void edit(Ref<Mesh> p_mesh);
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
index 9a2b222f21..574d3ef27e 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
@@ -202,7 +202,8 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
return;
}
- Vector<Ref<Shape3D>> shapes = mesh->convex_decompose();
+ Mesh::ConvexDecompositionSettings settings;
+ Vector<Ref<Shape3D>> shapes = mesh->convex_decompose(settings);
if (!shapes.size()) {
err_dialog->set_text(TTR("Couldn't create any collision shapes."));
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index b3f92c9d95..18e7480287 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -47,23 +47,25 @@ void MeshLibraryEditor::edit(const Ref<MeshLibrary> &p_mesh_library) {
}
}
-void MeshLibraryEditor::_menu_confirm() {
+void MeshLibraryEditor::_menu_remove_confirm() {
switch (option) {
case MENU_OPTION_REMOVE_ITEM: {
mesh_library->remove_item(to_erase);
} break;
- case MENU_OPTION_UPDATE_FROM_SCENE: {
- String existing = mesh_library->get_meta("_editor_source_scene");
- ERR_FAIL_COND(existing == "");
- _import_scene_cbk(existing);
-
- } break;
default: {
};
}
}
-void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, bool p_merge) {
+void MeshLibraryEditor::_menu_update_confirm(bool p_apply_xforms) {
+ cd_update->hide();
+ apply_xforms = p_apply_xforms;
+ String existing = mesh_library->get_meta("_editor_source_scene");
+ ERR_FAIL_COND(existing == "");
+ _import_scene_cbk(existing);
+}
+
+void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, bool p_merge, bool p_apply_xforms) {
if (!p_merge) {
p_library->clear();
}
@@ -108,6 +110,13 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
}
p_library->set_item_mesh(id, mesh);
+
+ if (p_apply_xforms) {
+ p_library->set_item_mesh_transform(id, mi->get_transform());
+ } else {
+ p_library->set_item_mesh_transform(id, Transform3D());
+ }
+
mesh_instances[id] = mi;
Vector<MeshLibrary::ShapeData> collisions;
@@ -197,15 +206,16 @@ void MeshLibraryEditor::_import_scene_cbk(const String &p_str) {
ERR_FAIL_COND_MSG(!scene, "Cannot create an instance from PackedScene '" + p_str + "'.");
- _import_scene(scene, mesh_library, option == MENU_OPTION_UPDATE_FROM_SCENE);
+ _import_scene(scene, mesh_library, option == MENU_OPTION_UPDATE_FROM_SCENE, apply_xforms);
memdelete(scene);
mesh_library->set_meta("_editor_source_scene", p_str);
+
menu->get_popup()->set_item_disabled(menu->get_popup()->get_item_index(MENU_OPTION_UPDATE_FROM_SCENE), false);
}
-Error MeshLibraryEditor::update_library_file(Node *p_base_scene, Ref<MeshLibrary> ml, bool p_merge) {
- _import_scene(p_base_scene, ml, p_merge);
+Error MeshLibraryEditor::update_library_file(Node *p_base_scene, Ref<MeshLibrary> ml, bool p_merge, bool p_apply_xforms) {
+ _import_scene(p_base_scene, ml, p_merge, p_apply_xforms);
return OK;
}
@@ -219,16 +229,21 @@ void MeshLibraryEditor::_menu_cbk(int p_option) {
String p = editor->get_inspector()->get_selected_path();
if (p.begins_with("/MeshLibrary/item") && p.get_slice_count("/") >= 3) {
to_erase = p.get_slice("/", 3).to_int();
- cd->set_text(vformat(TTR("Remove item %d?"), to_erase));
- cd->popup_centered(Size2(300, 60));
+ cd_remove->set_text(vformat(TTR("Remove item %d?"), to_erase));
+ cd_remove->popup_centered(Size2(300, 60));
}
} break;
case MENU_OPTION_IMPORT_FROM_SCENE: {
+ apply_xforms = false;
+ file->popup_file_dialog();
+ } break;
+ case MENU_OPTION_IMPORT_FROM_SCENE_APPLY_XFORMS: {
+ apply_xforms = true;
file->popup_file_dialog();
} break;
case MENU_OPTION_UPDATE_FROM_SCENE: {
- cd->set_text(vformat(TTR("Update from existing scene?:\n%s"), String(mesh_library->get_meta("_editor_source_scene"))));
- cd->popup_centered(Size2(500, 60));
+ cd_update->set_text(vformat(TTR("Update from existing scene?:\n%s"), String(mesh_library->get_meta("_editor_source_scene"))));
+ cd_update->popup_centered(Size2(500, 60));
} break;
}
}
@@ -258,16 +273,22 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
menu->get_popup()->add_item(TTR("Add Item"), MENU_OPTION_ADD_ITEM);
menu->get_popup()->add_item(TTR("Remove Selected Item"), MENU_OPTION_REMOVE_ITEM);
menu->get_popup()->add_separator();
- menu->get_popup()->add_item(TTR("Import from Scene"), MENU_OPTION_IMPORT_FROM_SCENE);
+ menu->get_popup()->add_item(TTR("Import from Scene (Ignore Transforms)"), MENU_OPTION_IMPORT_FROM_SCENE);
+ menu->get_popup()->add_item(TTR("Import from Scene (Apply Transforms)"), MENU_OPTION_IMPORT_FROM_SCENE_APPLY_XFORMS);
menu->get_popup()->add_item(TTR("Update from Scene"), MENU_OPTION_UPDATE_FROM_SCENE);
menu->get_popup()->set_item_disabled(menu->get_popup()->get_item_index(MENU_OPTION_UPDATE_FROM_SCENE), true);
menu->get_popup()->connect("id_pressed", callable_mp(this, &MeshLibraryEditor::_menu_cbk));
menu->hide();
editor = p_editor;
- cd = memnew(ConfirmationDialog);
- add_child(cd);
- cd->get_ok_button()->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_confirm));
+ cd_remove = memnew(ConfirmationDialog);
+ add_child(cd_remove);
+ cd_remove->get_ok_button()->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_remove_confirm));
+ cd_update = memnew(ConfirmationDialog);
+ add_child(cd_update);
+ cd_update->get_ok_button()->set_text("Apply without Transforms");
+ cd_update->get_ok_button()->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_update_confirm), varray(false));
+ cd_update->add_button("Apply with Transforms")->connect("pressed", callable_mp(this, &MeshLibraryEditor::_menu_update_confirm), varray(true));
}
void MeshLibraryEditorPlugin::edit(Object *p_node) {
diff --git a/editor/plugins/mesh_library_editor_plugin.h b/editor/plugins/mesh_library_editor_plugin.h
index 6c33c8bb9e..9e225ffb9b 100644
--- a/editor/plugins/mesh_library_editor_plugin.h
+++ b/editor/plugins/mesh_library_editor_plugin.h
@@ -41,23 +41,27 @@ class MeshLibraryEditor : public Control {
EditorNode *editor;
MenuButton *menu;
- ConfirmationDialog *cd;
+ ConfirmationDialog *cd_remove;
+ ConfirmationDialog *cd_update;
EditorFileDialog *file;
+ bool apply_xforms;
int to_erase;
enum {
MENU_OPTION_ADD_ITEM,
MENU_OPTION_REMOVE_ITEM,
MENU_OPTION_UPDATE_FROM_SCENE,
- MENU_OPTION_IMPORT_FROM_SCENE
+ MENU_OPTION_IMPORT_FROM_SCENE,
+ MENU_OPTION_IMPORT_FROM_SCENE_APPLY_XFORMS
};
int option;
void _import_scene_cbk(const String &p_str);
void _menu_cbk(int p_option);
- void _menu_confirm();
+ void _menu_remove_confirm();
+ void _menu_update_confirm(bool p_apply_xforms);
- static void _import_scene(Node *p_scene, Ref<MeshLibrary> p_library, bool p_merge);
+ static void _import_scene(Node *p_scene, Ref<MeshLibrary> p_library, bool p_merge, bool p_apply_xforms);
protected:
static void _bind_methods();
@@ -66,7 +70,7 @@ public:
MenuButton *get_menu_button() const { return menu; }
void edit(const Ref<MeshLibrary> &p_mesh_library);
- static Error update_library_file(Node *p_base_scene, Ref<MeshLibrary> ml, bool p_merge = true);
+ static Error update_library_file(Node *p_base_scene, Ref<MeshLibrary> ml, bool p_merge = true, bool p_apply_xforms = false);
MeshLibraryEditor(EditorNode *p_editor);
};
diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp
index b93e12d7fa..eb771f2bc4 100644
--- a/editor/plugins/node_3d_editor_gizmos.cpp
+++ b/editor/plugins/node_3d_editor_gizmos.cpp
@@ -34,6 +34,7 @@
#include "core/math/geometry_2d.h"
#include "core/math/geometry_3d.h"
#include "editor/plugins/node_3d_editor_plugin.h"
+#include "scene/3d/audio_listener_3d.h"
#include "scene/3d/audio_stream_player_3d.h"
#include "scene/3d/camera_3d.h"
#include "scene/3d/collision_polygon_3d.h"
@@ -45,7 +46,6 @@
#include "scene/3d/light_3d.h"
#include "scene/3d/lightmap_gi.h"
#include "scene/3d/lightmap_probe.h"
-#include "scene/3d/listener_3d.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/3d/navigation_region_3d.h"
#include "scene/3d/occluder_instance_3d.h"
@@ -53,7 +53,7 @@
#include "scene/3d/position_3d.h"
#include "scene/3d/ray_cast_3d.h"
#include "scene/3d/reflection_probe.h"
-#include "scene/3d/soft_body_3d.h"
+#include "scene/3d/soft_dynamic_body_3d.h"
#include "scene/3d/spring_arm_3d.h"
#include "scene/3d/sprite_3d.h"
#include "scene/3d/vehicle_body_3d.h"
@@ -66,9 +66,10 @@
#include "scene/resources/cylinder_shape_3d.h"
#include "scene/resources/height_map_shape_3d.h"
#include "scene/resources/primitive_meshes.h"
+#include "scene/resources/separation_ray_shape_3d.h"
#include "scene/resources/sphere_shape_3d.h"
#include "scene/resources/surface_tool.h"
-#include "scene/resources/world_margin_shape_3d.h"
+#include "scene/resources/world_boundary_shape_3d.h"
#define HANDLE_HALF_SIZE 9.5
@@ -105,9 +106,7 @@ void EditorNode3DGizmo::clear() {
}
void EditorNode3DGizmo::redraw() {
- if (get_script_instance() && get_script_instance()->has_method("_redraw")) {
- get_script_instance()->call("_redraw");
- } else {
+ if (!GDVIRTUAL_CALL(_redraw)) {
ERR_FAIL_COND(!gizmo_plugin);
gizmo_plugin->redraw(this);
}
@@ -118,8 +117,9 @@ void EditorNode3DGizmo::redraw() {
}
String EditorNode3DGizmo::get_handle_name(int p_id) const {
- if (get_script_instance() && get_script_instance()->has_method("_get_handle_name")) {
- return get_script_instance()->call("_get_handle_name", p_id);
+ String ret;
+ if (GDVIRTUAL_CALL(_get_handle_name, p_id, ret)) {
+ return ret;
}
ERR_FAIL_COND_V(!gizmo_plugin, "");
@@ -127,8 +127,9 @@ String EditorNode3DGizmo::get_handle_name(int p_id) const {
}
bool EditorNode3DGizmo::is_handle_highlighted(int p_id) const {
- if (get_script_instance() && get_script_instance()->has_method("_is_handle_highlighted")) {
- return get_script_instance()->call("_is_handle_highlighted", p_id);
+ bool success;
+ if (GDVIRTUAL_CALL(_is_handle_highlighted, p_id, success)) {
+ return success;
}
ERR_FAIL_COND_V(!gizmo_plugin, false);
@@ -136,8 +137,9 @@ bool EditorNode3DGizmo::is_handle_highlighted(int p_id) const {
}
Variant EditorNode3DGizmo::get_handle_value(int p_id) const {
- if (get_script_instance() && get_script_instance()->has_method("_get_handle_value")) {
- return get_script_instance()->call("_get_handle_value", p_id);
+ Variant value;
+ if (GDVIRTUAL_CALL(_get_handle_value, p_id, value)) {
+ return value;
}
ERR_FAIL_COND_V(!gizmo_plugin, Variant());
@@ -145,8 +147,7 @@ Variant EditorNode3DGizmo::get_handle_value(int p_id) const {
}
void EditorNode3DGizmo::set_handle(int p_id, Camera3D *p_camera, const Point2 &p_point) {
- if (get_script_instance() && get_script_instance()->has_method("_set_handle")) {
- get_script_instance()->call("_set_handle", p_id, p_camera, p_point);
+ if (GDVIRTUAL_CALL(_set_handle, p_id, p_camera, p_point)) {
return;
}
@@ -155,8 +156,7 @@ void EditorNode3DGizmo::set_handle(int p_id, Camera3D *p_camera, const Point2 &p
}
void EditorNode3DGizmo::commit_handle(int p_id, const Variant &p_restore, bool p_cancel) {
- if (get_script_instance() && get_script_instance()->has_method("_commit_handle")) {
- get_script_instance()->call("_commit_handle", p_id, p_restore, p_cancel);
+ if (GDVIRTUAL_CALL(_commit_handle, p_id, p_restore, p_cancel)) {
return;
}
@@ -165,8 +165,9 @@ void EditorNode3DGizmo::commit_handle(int p_id, const Variant &p_restore, bool p
}
int EditorNode3DGizmo::subgizmos_intersect_ray(Camera3D *p_camera, const Vector2 &p_point) const {
- if (get_script_instance() && get_script_instance()->has_method("_subgizmos_intersect_ray")) {
- return get_script_instance()->call("_subgizmos_intersect_ray", p_camera, p_point);
+ int id;
+ if (GDVIRTUAL_CALL(_subgizmos_intersect_ray, p_camera, p_point, id)) {
+ return id;
}
ERR_FAIL_COND_V(!gizmo_plugin, -1);
@@ -174,12 +175,14 @@ int EditorNode3DGizmo::subgizmos_intersect_ray(Camera3D *p_camera, const Vector2
}
Vector<int> EditorNode3DGizmo::subgizmos_intersect_frustum(const Camera3D *p_camera, const Vector<Plane> &p_frustum) const {
- if (get_script_instance() && get_script_instance()->has_method("_subgizmos_intersect_frustum")) {
- Array frustum;
- for (int i = 0; i < p_frustum.size(); i++) {
- frustum[i] = p_frustum[i];
- }
- return get_script_instance()->call("_subgizmos_intersect_frustum", p_camera, frustum);
+ TypedArray<Plane> frustum;
+ frustum.resize(p_frustum.size());
+ for (int i = 0; i < p_frustum.size(); i++) {
+ frustum[i] = p_frustum[i];
+ }
+ Vector<int> ret;
+ if (GDVIRTUAL_CALL(_subgizmos_intersect_frustum, p_camera, frustum, ret)) {
+ return ret;
}
ERR_FAIL_COND_V(!gizmo_plugin, Vector<int>());
@@ -187,8 +190,9 @@ Vector<int> EditorNode3DGizmo::subgizmos_intersect_frustum(const Camera3D *p_cam
}
Transform3D EditorNode3DGizmo::get_subgizmo_transform(int p_id) const {
- if (get_script_instance() && get_script_instance()->has_method("_get_subgizmo_transform")) {
- return get_script_instance()->call("_get_subgizmo_transform", p_id);
+ Transform3D ret;
+ if (GDVIRTUAL_CALL(_get_subgizmo_transform, p_id, ret)) {
+ return ret;
}
ERR_FAIL_COND_V(!gizmo_plugin, Transform3D());
@@ -196,8 +200,7 @@ Transform3D EditorNode3DGizmo::get_subgizmo_transform(int p_id) const {
}
void EditorNode3DGizmo::set_subgizmo_transform(int p_id, Transform3D p_transform) {
- if (get_script_instance() && get_script_instance()->has_method("_set_subgizmo_transform")) {
- get_script_instance()->call("_set_subgizmo_transform", p_id, p_transform);
+ if (GDVIRTUAL_CALL(_set_subgizmo_transform, p_id, p_transform)) {
return;
}
@@ -206,18 +209,13 @@ void EditorNode3DGizmo::set_subgizmo_transform(int p_id, Transform3D p_transform
}
void EditorNode3DGizmo::commit_subgizmos(const Vector<int> &p_ids, const Vector<Transform3D> &p_restore, bool p_cancel) {
- if (get_script_instance() && get_script_instance()->has_method("_commit_subgizmos")) {
- Array ids;
- for (int i = 0; i < p_ids.size(); i++) {
- ids[i] = p_ids[i];
- }
-
- Array restore;
- for (int i = 0; i < p_restore.size(); i++) {
- restore[i] = p_restore[i];
- }
+ TypedArray<Transform3D> restore;
+ restore.resize(p_restore.size());
+ for (int i = 0; i < p_restore.size(); i++) {
+ restore[i] = p_restore[i];
+ }
- get_script_instance()->call("_commit_subgizmos", ids, restore, p_cancel);
+ if (GDVIRTUAL_CALL(_commit_subgizmos, p_ids, restore, p_cancel)) {
return;
}
@@ -837,26 +835,19 @@ void EditorNode3DGizmo::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_subgizmo_selected"), &EditorNode3DGizmo::is_subgizmo_selected);
ClassDB::bind_method(D_METHOD("get_subgizmo_selection"), &EditorNode3DGizmo::get_subgizmo_selection);
- BIND_VMETHOD(MethodInfo("_redraw"));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_handle_name", PropertyInfo(Variant::INT, "id")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_is_handle_highlighted", PropertyInfo(Variant::INT, "id")));
+ GDVIRTUAL_BIND(_redraw);
+ GDVIRTUAL_BIND(_get_handle_name, "id");
+ GDVIRTUAL_BIND(_is_handle_highlighted, "id");
- MethodInfo hvget(Variant::NIL, "_get_handle_value", PropertyInfo(Variant::INT, "id"));
- hvget.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
- BIND_VMETHOD(hvget);
+ GDVIRTUAL_BIND(_get_handle_value, "id");
+ GDVIRTUAL_BIND(_set_handle, "id", "camera", "point");
+ GDVIRTUAL_BIND(_commit_handle, "id", "restore", "cancel");
- BIND_VMETHOD(MethodInfo("_set_handle", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::VECTOR2, "point")));
- MethodInfo cm = MethodInfo("_commit_handle", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::NIL, "restore"), PropertyInfo(Variant::BOOL, "cancel"));
- cm.default_arguments.push_back(false);
- BIND_VMETHOD(cm);
-
- BIND_VMETHOD(MethodInfo(Variant::INT, "_subgizmos_intersect_ray", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::VECTOR2, "point")));
- BIND_VMETHOD(MethodInfo(Variant::PACKED_INT32_ARRAY, "_subgizmos_intersect_frustum", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::ARRAY, "frustum")));
- BIND_VMETHOD(MethodInfo(Variant::TRANSFORM3D, "_get_subgizmo_transform", PropertyInfo(Variant::INT, "id")));
- BIND_VMETHOD(MethodInfo("_set_subgizmo_transform", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::TRANSFORM3D, "transform")));
- MethodInfo cs = MethodInfo("_commit_subgizmos", PropertyInfo(Variant::PACKED_INT32_ARRAY, "ids"), PropertyInfo(Variant::ARRAY, "restore"), PropertyInfo(Variant::BOOL, "cancel"));
- cs.default_arguments.push_back(false);
- BIND_VMETHOD(cs);
+ GDVIRTUAL_BIND(_subgizmos_intersect_ray, "camera", "point");
+ GDVIRTUAL_BIND(_subgizmos_intersect_frustum, "camera", "frustum");
+ GDVIRTUAL_BIND(_set_subgizmo_transform, "id", "transform");
+ GDVIRTUAL_BIND(_get_subgizmo_transform, "id");
+ GDVIRTUAL_BIND(_commit_subgizmos, "ids", "restores", "cancel");
}
EditorNode3DGizmo::EditorNode3DGizmo() {
@@ -1012,7 +1003,9 @@ String EditorNode3DGizmoPlugin::get_gizmo_name() const {
if (get_script_instance() && get_script_instance()->has_method("_get_gizmo_name")) {
return get_script_instance()->call("_get_gizmo_name");
}
- return TTR("Nameless gizmo");
+
+ WARN_PRINT_ONCE("A 3D editor gizmo has no name defined (it will appear as \"Unnamed Gizmo\" in the \"View > Gizmos\" menu). To resolve this, override the `_get_gizmo_name()` function to return a String in the script that extends EditorNode3DGizmoPlugin.");
+ return TTR("Unnamed Gizmo");
}
int EditorNode3DGizmoPlugin::get_priority() const {
@@ -1042,11 +1035,6 @@ Ref<EditorNode3DGizmo> EditorNode3DGizmoPlugin::get_gizmo(Node3D *p_spatial) {
}
void EditorNode3DGizmoPlugin::_bind_methods() {
-#define GIZMO_REF PropertyInfo(Variant::OBJECT, "gizmo", PROPERTY_HINT_RESOURCE_TYPE, "EditorNode3DGizmo")
-
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_has_gizmo", PropertyInfo(Variant::OBJECT, "spatial", PROPERTY_HINT_RESOURCE_TYPE, "Node3D")));
- BIND_VMETHOD(MethodInfo(GIZMO_REF, "_create_gizmo", PropertyInfo(Variant::OBJECT, "spatial", PROPERTY_HINT_RESOURCE_TYPE, "Node3D")));
-
ClassDB::bind_method(D_METHOD("create_material", "name", "color", "billboard", "on_top", "use_vertex_color"), &EditorNode3DGizmoPlugin::create_material, DEFVAL(false), DEFVAL(false), DEFVAL(false));
ClassDB::bind_method(D_METHOD("create_icon_material", "name", "texture", "on_top", "color"), &EditorNode3DGizmoPlugin::create_icon_material, DEFVAL(false), DEFVAL(Color(1, 1, 1, 1)));
ClassDB::bind_method(D_METHOD("create_handle_material", "name", "billboard", "texture"), &EditorNode3DGizmoPlugin::create_handle_material, DEFVAL(false), DEFVAL(Variant()));
@@ -1054,45 +1042,42 @@ void EditorNode3DGizmoPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_material", "name", "gizmo"), &EditorNode3DGizmoPlugin::get_material, DEFVAL(Ref<EditorNode3DGizmo>()));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_gizmo_name"));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_priority"));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_can_be_hidden"));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_is_selectable_when_hidden"));
-
- BIND_VMETHOD(MethodInfo("_redraw", GIZMO_REF));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_handle_name", GIZMO_REF, PropertyInfo(Variant::INT, "id")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_is_handle_highlighted", GIZMO_REF, PropertyInfo(Variant::INT, "id")));
+ GDVIRTUAL_BIND(_has_gizmo, "for_node_3d");
+ GDVIRTUAL_BIND(_create_gizmo, "for_node_3d");
- MethodInfo hvget(Variant::NIL, "_get_handle_value", GIZMO_REF, PropertyInfo(Variant::INT, "id"));
- hvget.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
- BIND_VMETHOD(hvget);
+ GDVIRTUAL_BIND(_get_gizmo_name);
+ GDVIRTUAL_BIND(_get_priority);
+ GDVIRTUAL_BIND(_can_be_hidden);
+ GDVIRTUAL_BIND(_is_selectable_when_hidden);
- BIND_VMETHOD(MethodInfo("_set_handle", GIZMO_REF, PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::VECTOR2, "point")));
- MethodInfo cm = MethodInfo("_commit_handle", GIZMO_REF, PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::NIL, "restore"), PropertyInfo(Variant::BOOL, "cancel"));
- cm.default_arguments.push_back(false);
- BIND_VMETHOD(cm);
+ GDVIRTUAL_BIND(_redraw, "gizmo");
+ GDVIRTUAL_BIND(_get_handle_name, "gizmo", "handle_id");
+ GDVIRTUAL_BIND(_is_handle_highlighted, "gizmo", "handle_id");
+ GDVIRTUAL_BIND(_get_handle_value, "gizmo", "handle_id");
- BIND_VMETHOD(MethodInfo(Variant::INT, "_subgizmos_intersect_ray", GIZMO_REF, PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::VECTOR2, "point")));
- BIND_VMETHOD(MethodInfo(Variant::PACKED_INT32_ARRAY, "_subgizmos_intersect_frustum", GIZMO_REF, PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera3D"), PropertyInfo(Variant::ARRAY, "frustum")));
- BIND_VMETHOD(MethodInfo(Variant::TRANSFORM3D, "_get_subgizmo_transform", GIZMO_REF, PropertyInfo(Variant::INT, "id")));
- BIND_VMETHOD(MethodInfo("_set_subgizmo_transform", GIZMO_REF, PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::TRANSFORM3D, "transform")));
- MethodInfo cs = MethodInfo("_commit_subgizmos", GIZMO_REF, PropertyInfo(Variant::PACKED_INT32_ARRAY, "ids"), PropertyInfo(Variant::ARRAY, "restore"), PropertyInfo(Variant::BOOL, "cancel"));
- cs.default_arguments.push_back(false);
- BIND_VMETHOD(cs);
+ GDVIRTUAL_BIND(_set_handle, "gizmo", "handle_id", "camera", "screen_pos");
+ GDVIRTUAL_BIND(_commit_handle, "gizmo", "handle_id", "restore", "cancel");
-#undef GIZMO_REF
+ GDVIRTUAL_BIND(_subgizmos_intersect_ray, "gizmo", "camera", "screen_pos");
+ GDVIRTUAL_BIND(_subgizmos_intersect_frustum, "gizmo", "camera", "frustum_planes");
+ GDVIRTUAL_BIND(_get_subgizmo_transform, "gizmo", "subgizmo_id");
+ GDVIRTUAL_BIND(_set_subgizmo_transform, "gizmo", "subgizmo_id", "transform");
+ GDVIRTUAL_BIND(_commit_subgizmos, "gizmo", "ids", "restores", "cancel");
+ ;
}
bool EditorNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
- if (get_script_instance() && get_script_instance()->has_method("_has_gizmo")) {
- return get_script_instance()->call("_has_gizmo", p_spatial);
+ bool success;
+ if (GDVIRTUAL_CALL(_has_gizmo, p_spatial, success)) {
+ return success;
}
return false;
}
Ref<EditorNode3DGizmo> EditorNode3DGizmoPlugin::create_gizmo(Node3D *p_spatial) {
- if (get_script_instance() && get_script_instance()->has_method("_create_gizmo")) {
- return get_script_instance()->call("_create_gizmo", p_spatial);
+ Ref<EditorNode3DGizmo> ret;
+ if (GDVIRTUAL_CALL(_create_gizmo, p_spatial, ret)) {
+ return ret;
}
Ref<EditorNode3DGizmo> ref;
@@ -1103,106 +1088,100 @@ Ref<EditorNode3DGizmo> EditorNode3DGizmoPlugin::create_gizmo(Node3D *p_spatial)
}
bool EditorNode3DGizmoPlugin::can_be_hidden() const {
- if (get_script_instance() && get_script_instance()->has_method("_can_be_hidden")) {
- return get_script_instance()->call("_can_be_hidden");
+ bool ret;
+ if (GDVIRTUAL_CALL(_can_be_hidden, ret)) {
+ return ret;
}
return true;
}
bool EditorNode3DGizmoPlugin::is_selectable_when_hidden() const {
- if (get_script_instance() && get_script_instance()->has_method("_is_selectable_when_hidden")) {
- return get_script_instance()->call("_is_selectable_when_hidden");
+ bool ret;
+ if (GDVIRTUAL_CALL(_is_selectable_when_hidden, ret)) {
+ return ret;
}
return false;
}
void EditorNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- if (get_script_instance() && get_script_instance()->has_method("_redraw")) {
- Ref<EditorNode3DGizmo> ref(p_gizmo);
- get_script_instance()->call("_redraw", ref);
- }
+ GDVIRTUAL_CALL(_redraw, p_gizmo);
}
bool EditorNode3DGizmoPlugin::is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int p_id) const {
- if (get_script_instance() && get_script_instance()->has_method("_is_handle_highlighted")) {
- return get_script_instance()->call("_is_handle_highlighted", p_gizmo, p_id);
+ bool ret;
+ if (GDVIRTUAL_CALL(_is_handle_highlighted, Ref<EditorNode3DGizmo>(p_gizmo), p_id, ret)) {
+ return ret;
}
return false;
}
String EditorNode3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id) const {
- if (get_script_instance() && get_script_instance()->has_method("_get_handle_name")) {
- return get_script_instance()->call("_get_handle_name", p_gizmo, p_id);
+ String ret;
+ if (GDVIRTUAL_CALL(_get_handle_name, Ref<EditorNode3DGizmo>(p_gizmo), p_id, ret)) {
+ return ret;
}
return "";
}
Variant EditorNode3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id) const {
- if (get_script_instance() && get_script_instance()->has_method("_get_handle_value")) {
- return get_script_instance()->call("_get_handle_value", p_gizmo, p_id);
+ Variant ret;
+ if (GDVIRTUAL_CALL(_get_handle_value, Ref<EditorNode3DGizmo>(p_gizmo), p_id, ret)) {
+ return ret;
}
return Variant();
}
void EditorNode3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int p_id, Camera3D *p_camera, const Point2 &p_point) {
- if (get_script_instance() && get_script_instance()->has_method("_set_handle")) {
- get_script_instance()->call("_set_handle", p_gizmo, p_id, p_camera, p_point);
- }
+ GDVIRTUAL_CALL(_set_handle, Ref<EditorNode3DGizmo>(p_gizmo), p_id, p_camera, p_point);
}
void EditorNode3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, const Variant &p_restore, bool p_cancel) {
- if (get_script_instance() && get_script_instance()->has_method("_commit_handle")) {
- get_script_instance()->call("_commit_handle", p_gizmo, p_id, p_restore, p_cancel);
- }
+ GDVIRTUAL_CALL(_commit_handle, Ref<EditorNode3DGizmo>(p_gizmo), p_id, p_restore, p_cancel);
}
int EditorNode3DGizmoPlugin::subgizmos_intersect_ray(const EditorNode3DGizmo *p_gizmo, Camera3D *p_camera, const Vector2 &p_point) const {
- if (get_script_instance() && get_script_instance()->has_method("_subgizmos_intersect_ray")) {
- return get_script_instance()->call("_subgizmos_intersect_ray", p_camera, p_point);
+ int ret;
+ if (GDVIRTUAL_CALL(_subgizmos_intersect_ray, Ref<EditorNode3DGizmo>(p_gizmo), p_camera, p_point, ret)) {
+ return ret;
}
return -1;
}
Vector<int> EditorNode3DGizmoPlugin::subgizmos_intersect_frustum(const EditorNode3DGizmo *p_gizmo, const Camera3D *p_camera, const Vector<Plane> &p_frustum) const {
- if (get_script_instance() && get_script_instance()->has_method("_subgizmos_intersect_frustum")) {
- Array frustum;
- for (int i = 0; i < p_frustum.size(); i++) {
- frustum[i] = p_frustum[i];
- }
- return get_script_instance()->call("_subgizmos_intersect_frustum", p_camera, frustum);
+ TypedArray<Transform3D> frustum;
+ frustum.resize(p_frustum.size());
+ for (int i = 0; i < p_frustum.size(); i++) {
+ frustum[i] = p_frustum[i];
+ }
+ Vector<int> ret;
+ if (GDVIRTUAL_CALL(_subgizmos_intersect_frustum, Ref<EditorNode3DGizmo>(p_gizmo), p_camera, frustum, ret)) {
+ return ret;
}
return Vector<int>();
}
Transform3D EditorNode3DGizmoPlugin::get_subgizmo_transform(const EditorNode3DGizmo *p_gizmo, int p_id) const {
- if (get_script_instance() && get_script_instance()->has_method("_get_subgizmo_transform")) {
- return get_script_instance()->call("_get_subgizmo_transform", p_id);
+ Transform3D ret;
+ if (GDVIRTUAL_CALL(_get_subgizmo_transform, Ref<EditorNode3DGizmo>(p_gizmo), p_id, ret)) {
+ return ret;
}
return Transform3D();
}
void EditorNode3DGizmoPlugin::set_subgizmo_transform(const EditorNode3DGizmo *p_gizmo, int p_id, Transform3D p_transform) {
- if (get_script_instance() && get_script_instance()->has_method("_set_subgizmo_transform")) {
- get_script_instance()->call("_set_subgizmo_transform", p_id, p_transform);
- }
+ GDVIRTUAL_CALL(_set_subgizmo_transform, Ref<EditorNode3DGizmo>(p_gizmo), p_id, p_transform);
}
void EditorNode3DGizmoPlugin::commit_subgizmos(const EditorNode3DGizmo *p_gizmo, const Vector<int> &p_ids, const Vector<Transform3D> &p_restore, bool p_cancel) {
- if (get_script_instance() && get_script_instance()->has_method("_commit_subgizmos")) {
- Array ids;
- for (int i = 0; i < p_ids.size(); i++) {
- ids[i] = p_ids[i];
- }
-
- Array restore;
- for (int i = 0; i < p_restore.size(); i++) {
- restore[i] = p_restore[i];
- }
-
- get_script_instance()->call("_commit_subgizmos", ids, restore, p_cancel);
+ TypedArray<Transform3D> restore;
+ restore.resize(p_restore.size());
+ for (int i = 0; i < p_restore.size(); i++) {
+ restore[i] = p_restore[i];
}
+
+ GDVIRTUAL_CALL(_commit_subgizmos, Ref<EditorNode3DGizmo>(p_gizmo), p_ids, restore, p_cancel);
}
void EditorNode3DGizmoPlugin::set_state(int p_state) {
@@ -1504,8 +1483,6 @@ void Light3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
}
}
-//////
-
//// player gizmo
AudioStreamPlayer3DGizmoPlugin::AudioStreamPlayer3DGizmoPlugin() {
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/stream_player_3d", Color(0.4, 0.8, 1));
@@ -1644,6 +1621,29 @@ void AudioStreamPlayer3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
//////
+AudioListener3DGizmoPlugin::AudioListener3DGizmoPlugin() {
+ create_icon_material("audio_listener_3d_icon", Node3DEditor::get_singleton()->get_theme_icon("GizmoAudioListener3D", "EditorIcons"));
+}
+
+bool AudioListener3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+ return Object::cast_to<AudioListener3D>(p_spatial) != nullptr;
+}
+
+String AudioListener3DGizmoPlugin::get_gizmo_name() const {
+ return "AudioListener3D";
+}
+
+int AudioListener3DGizmoPlugin::get_priority() const {
+ return -1;
+}
+
+void AudioListener3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+ const Ref<Material> icon = get_material("audio_listener_3d_icon", p_gizmo);
+ p_gizmo->add_unscaled_billboard(icon, 0.05);
+}
+
+//////
+
Camera3DGizmoPlugin::Camera3DGizmoPlugin() {
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/camera", Color(0.8, 0.4, 0.8));
@@ -1889,7 +1889,7 @@ MeshInstance3DGizmoPlugin::MeshInstance3DGizmoPlugin() {
}
bool MeshInstance3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
- return Object::cast_to<MeshInstance3D>(p_spatial) != nullptr && Object::cast_to<SoftBody3D>(p_spatial) == nullptr;
+ return Object::cast_to<MeshInstance3D>(p_spatial) != nullptr && Object::cast_to<SoftDynamicBody3D>(p_spatial) == nullptr;
}
String MeshInstance3DGizmoPlugin::get_gizmo_name() const {
@@ -2104,7 +2104,7 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
grests.resize(skel->get_bone_count());
LocalVector<int> bones;
- LocalVector<real_t> weights;
+ LocalVector<float> weights;
bones.resize(4);
weights.resize(4);
@@ -2120,7 +2120,6 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Color bonecolor = Color(1.0, 0.4, 0.4, 0.3);
Color rootcolor = Color(0.4, 1.0, 0.4, 0.1);
- //LocalVector<int> bones_to_process = skel->get_parentless_bones();
LocalVector<int> bones_to_process;
bones_to_process = skel->get_parentless_bones();
@@ -2132,19 +2131,18 @@ void Skeleton3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
child_bones_vector = skel->get_bone_children(current_bone_idx);
int child_bones_size = child_bones_vector.size();
- // You have children but no parent, then you must be a root/parentless bone.
- if (child_bones_size >= 0 && skel->get_bone_parent(current_bone_idx) <= 0) {
- grests[current_bone_idx] = skel->global_pose_to_local_pose(current_bone_idx, skel->get_bone_global_pose(current_bone_idx));
+ if (skel->get_bone_parent(current_bone_idx) < 0) {
+ grests[current_bone_idx] = skel->get_bone_rest(current_bone_idx);
}
for (int i = 0; i < child_bones_size; i++) {
int child_bone_idx = child_bones_vector[i];
- grests[child_bone_idx] = skel->global_pose_to_local_pose(child_bone_idx, skel->get_bone_global_pose(child_bone_idx));
+ grests[child_bone_idx] = grests[current_bone_idx] * skel->get_bone_rest(child_bone_idx);
Vector3 v0 = grests[current_bone_idx].origin;
Vector3 v1 = grests[child_bone_idx].origin;
- Vector3 d = skel->get_bone_rest(child_bone_idx).origin.normalized();
- real_t dist = skel->get_bone_rest(child_bone_idx).origin.length();
+ Vector3 d = (v1 - v0).normalized();
+ real_t dist = v0.distance_to(v1);
// Find closest axis.
int closest = -1;
@@ -2514,30 +2512,30 @@ void VehicleWheel3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
///////////
-SoftBody3DGizmoPlugin::SoftBody3DGizmoPlugin() {
+SoftDynamicBody3DGizmoPlugin::SoftDynamicBody3DGizmoPlugin() {
Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
create_material("shape_material", gizmo_color);
create_handle_material("handles");
}
-bool SoftBody3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
- return Object::cast_to<SoftBody3D>(p_spatial) != nullptr;
+bool SoftDynamicBody3DGizmoPlugin::has_gizmo(Node3D *p_spatial) {
+ return Object::cast_to<SoftDynamicBody3D>(p_spatial) != nullptr;
}
-String SoftBody3DGizmoPlugin::get_gizmo_name() const {
- return "SoftBody3D";
+String SoftDynamicBody3DGizmoPlugin::get_gizmo_name() const {
+ return "SoftDynamicBody3D";
}
-int SoftBody3DGizmoPlugin::get_priority() const {
+int SoftDynamicBody3DGizmoPlugin::get_priority() const {
return -1;
}
-bool SoftBody3DGizmoPlugin::is_selectable_when_hidden() const {
+bool SoftDynamicBody3DGizmoPlugin::is_selectable_when_hidden() const {
return true;
}
-void SoftBody3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
- SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node());
+void SoftDynamicBody3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
+ SoftDynamicBody3D *soft_body = Object::cast_to<SoftDynamicBody3D>(p_gizmo->get_spatial_node());
p_gizmo->clear();
@@ -2573,22 +2571,22 @@ void SoftBody3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_collision_triangles(tm);
}
-String SoftBody3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id) const {
- return "SoftBody3D pin point";
+String SoftDynamicBody3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id) const {
+ return "SoftDynamicBody3D pin point";
}
-Variant SoftBody3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id) const {
- SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node());
+Variant SoftDynamicBody3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id) const {
+ SoftDynamicBody3D *soft_body = Object::cast_to<SoftDynamicBody3D>(p_gizmo->get_spatial_node());
return Variant(soft_body->is_point_pinned(p_id));
}
-void SoftBody3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, const Variant &p_restore, bool p_cancel) {
- SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node());
+void SoftDynamicBody3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, const Variant &p_restore, bool p_cancel) {
+ SoftDynamicBody3D *soft_body = Object::cast_to<SoftDynamicBody3D>(p_gizmo->get_spatial_node());
soft_body->pin_point_toggle(p_id);
}
-bool SoftBody3DGizmoPlugin::is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int p_id) const {
- SoftBody3D *soft_body = Object::cast_to<SoftBody3D>(p_gizmo->get_spatial_node());
+bool SoftDynamicBody3DGizmoPlugin::is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int p_id) const {
+ SoftDynamicBody3D *soft_body = Object::cast_to<SoftDynamicBody3D>(p_gizmo->get_spatial_node());
return soft_body->is_point_pinned(p_id);
}
@@ -2654,7 +2652,7 @@ void VisibleOnScreenNotifier3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p
Vector3 sg[2] = { gi.xform(ray_from), gi.xform(ray_from + ray_dir * 4096) };
- Vector3 ofs = aabb.position + aabb.size * 0.5;
+ Vector3 ofs = aabb.get_center();
Vector3 axis;
axis[p_id] = 1.0;
@@ -2730,7 +2728,7 @@ void VisibleOnScreenNotifier3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
handles.push_back(ax);
}
- Vector3 center = aabb.position + aabb.size * 0.5;
+ Vector3 center = aabb.get_center();
for (int i = 0; i < 3; i++) {
Vector3 ax;
ax[i] = 1.0;
@@ -2746,7 +2744,7 @@ void VisibleOnScreenNotifier3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
if (p_gizmo->is_selected()) {
Ref<Material> solid_material = get_material("visibility_notifier_solid_material", p_gizmo);
- p_gizmo->add_solid_box(solid_material, aabb.get_size(), aabb.get_position() + aabb.get_size() / 2.0);
+ p_gizmo->add_solid_box(solid_material, aabb.get_size(), aabb.get_center());
}
p_gizmo->add_handles(handles, get_material("handles"));
@@ -2845,7 +2843,7 @@ void GPUParticles3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, int
Vector3 sg[2] = { gi.xform(ray_from), gi.xform(ray_from + ray_dir * 4096) };
- Vector3 ofs = aabb.position + aabb.size * 0.5;
+ Vector3 ofs = aabb.get_center();
Vector3 axis;
axis[p_id] = 1.0;
@@ -2921,7 +2919,7 @@ void GPUParticles3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
handles.push_back(ax);
}
- Vector3 center = aabb.position + aabb.size * 0.5;
+ Vector3 center = aabb.get_center();
for (int i = 0; i < 3; i++) {
Vector3 ax;
ax[i] = 1.0;
@@ -2937,7 +2935,7 @@ void GPUParticles3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
if (p_gizmo->is_selected()) {
Ref<Material> solid_material = get_material("particles_solid_material", p_gizmo);
- p_gizmo->add_solid_box(solid_material, aabb.get_size(), aabb.get_position() + aabb.get_size() / 2.0);
+ p_gizmo->add_solid_box(solid_material, aabb.get_size(), aabb.get_center());
}
p_gizmo->add_handles(handles, get_material("handles"));
@@ -4091,6 +4089,10 @@ String CollisionShape3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_g
return p_id == 0 ? "Radius" : "Height";
}
+ if (Object::cast_to<SeparationRayShape3D>(*s)) {
+ return "Length";
+ }
+
return "";
}
@@ -4114,7 +4116,7 @@ Variant CollisionShape3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p
if (Object::cast_to<CapsuleShape3D>(*s)) {
Ref<CapsuleShape3D> cs2 = s;
- return p_id == 0 ? cs2->get_radius() : cs2->get_height();
+ return Vector2(cs2->get_radius(), cs2->get_height());
}
if (Object::cast_to<CylinderShape3D>(*s)) {
@@ -4122,6 +4124,11 @@ Variant CollisionShape3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p
return p_id == 0 ? cs2->get_radius() : cs2->get_height();
}
+ if (Object::cast_to<SeparationRayShape3D>(*s)) {
+ Ref<SeparationRayShape3D> cs2 = s;
+ return cs2->get_length();
+ }
+
return Variant();
}
@@ -4157,6 +4164,22 @@ void CollisionShape3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_gizmo, i
ss->set_radius(d);
}
+ if (Object::cast_to<SeparationRayShape3D>(*s)) {
+ Ref<SeparationRayShape3D> rs = s;
+ Vector3 ra, rb;
+ Geometry3D::get_closest_points_between_segments(Vector3(), Vector3(0, 0, 4096), sg[0], sg[1], ra, rb);
+ float d = ra.z;
+ if (Node3DEditor::get_singleton()->is_snap_enabled()) {
+ d = Math::snapped(d, Node3DEditor::get_singleton()->get_translate_snap());
+ }
+
+ if (d < 0.001) {
+ d = 0.001;
+ }
+
+ rs->set_length(d);
+ }
+
if (Object::cast_to<BoxShape3D>(*s)) {
Vector3 axis;
axis[p_id] = 1.0;
@@ -4261,12 +4284,11 @@ void CollisionShape3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo
if (Object::cast_to<CapsuleShape3D>(*s)) {
Ref<CapsuleShape3D> ss = s;
+ Vector2 values = p_restore;
+
if (p_cancel) {
- if (p_id == 0) {
- ss->set_radius(p_restore);
- } else {
- ss->set_height(p_restore);
- }
+ ss->set_radius(values[0]);
+ ss->set_height(values[1]);
return;
}
@@ -4274,12 +4296,12 @@ void CollisionShape3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo
if (p_id == 0) {
ur->create_action(TTR("Change Capsule Shape Radius"));
ur->add_do_method(ss.ptr(), "set_radius", ss->get_radius());
- ur->add_undo_method(ss.ptr(), "set_radius", p_restore);
} else {
ur->create_action(TTR("Change Capsule Shape Height"));
ur->add_do_method(ss.ptr(), "set_height", ss->get_height());
- ur->add_undo_method(ss.ptr(), "set_height", p_restore);
}
+ ur->add_undo_method(ss.ptr(), "set_radius", values[0]);
+ ur->add_undo_method(ss.ptr(), "set_height", values[1]);
ur->commit_action();
}
@@ -4312,6 +4334,20 @@ void CollisionShape3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo
ur->commit_action();
}
+
+ if (Object::cast_to<SeparationRayShape3D>(*s)) {
+ Ref<SeparationRayShape3D> ss = s;
+ if (p_cancel) {
+ ss->set_length(p_restore);
+ return;
+ }
+
+ UndoRedo *ur = Node3DEditor::get_singleton()->get_undo_redo();
+ ur->create_action(TTR("Change Separation Ray Shape Length"));
+ ur->add_do_method(ss.ptr(), "set_length", ss->get_length());
+ ur->add_undo_method(ss.ptr(), "set_length", p_restore);
+ ur->commit_action();
+ }
}
void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
@@ -4524,9 +4560,9 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_handles(handles, handles_material);
}
- if (Object::cast_to<WorldMarginShape3D>(*s)) {
- Ref<WorldMarginShape3D> ps = s;
- Plane p = ps->get_plane();
+ if (Object::cast_to<WorldBoundaryShape3D>(*s)) {
+ Ref<WorldBoundaryShape3D> wbs = s;
+ const Plane &p = wbs->get_plane();
Vector<Vector3> points;
Vector3 n1 = p.get_any_perpendicular_normal();
@@ -4582,6 +4618,19 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_collision_segments(cs2->get_debug_mesh_lines());
}
+ if (Object::cast_to<SeparationRayShape3D>(*s)) {
+ Ref<SeparationRayShape3D> rs = s;
+
+ Vector<Vector3> points;
+ points.push_back(Vector3());
+ points.push_back(Vector3(0, 0, rs->get_length()));
+ p_gizmo->add_lines(points, material);
+ p_gizmo->add_collision_segments(points);
+ Vector<Vector3> handles;
+ handles.push_back(Vector3(0, 0, rs->get_length()));
+ p_gizmo->add_handles(handles, handles_material);
+ }
+
if (Object::cast_to<HeightMapShape3D>(*s)) {
Ref<HeightMapShape3D> hms = s;
diff --git a/editor/plugins/node_3d_editor_gizmos.h b/editor/plugins/node_3d_editor_gizmos.h
index 2cc0951557..24b4a23d4b 100644
--- a/editor/plugins/node_3d_editor_gizmos.h
+++ b/editor/plugins/node_3d_editor_gizmos.h
@@ -33,10 +33,10 @@
#include "core/templates/local_vector.h"
#include "core/templates/ordered_hash_map.h"
+#include "scene/3d/camera_3d.h"
#include "scene/3d/node_3d.h"
#include "scene/3d/skeleton_3d.h"
-class Camera3D;
class Timer;
class EditorNode3DGizmoPlugin;
@@ -79,6 +79,19 @@ protected:
EditorNode3DGizmoPlugin *gizmo_plugin;
+ GDVIRTUAL0(_redraw)
+ GDVIRTUAL1RC(String, _get_handle_name, int)
+ GDVIRTUAL1RC(bool, _is_handle_highlighted, int)
+
+ GDVIRTUAL1RC(Variant, _get_handle_value, int)
+ GDVIRTUAL3(_set_handle, int, const Camera3D *, Vector2)
+ GDVIRTUAL3(_commit_handle, int, Variant, bool)
+
+ GDVIRTUAL2RC(int, _subgizmos_intersect_ray, const Camera3D *, Vector2)
+ GDVIRTUAL2RC(Vector<int>, _subgizmos_intersect_frustum, const Camera3D *, TypedArray<Plane>)
+ GDVIRTUAL1RC(Transform3D, _get_subgizmo_transform, int)
+ GDVIRTUAL2(_set_subgizmo_transform, int, Transform3D)
+ GDVIRTUAL3(_commit_subgizmos, Vector<int>, TypedArray<Transform3D>, bool)
public:
void add_lines(const Vector<Vector3> &p_lines, const Ref<Material> &p_material, bool p_billboard = false, const Color &p_modulate = Color(1, 1, 1));
void add_vertices(const Vector<Vector3> &p_vertices, const Ref<Material> &p_material, Mesh::PrimitiveType p_primitive_type, bool p_billboard = false, const Color &p_modulate = Color(1, 1, 1));
@@ -145,6 +158,28 @@ protected:
virtual bool has_gizmo(Node3D *p_spatial);
virtual Ref<EditorNode3DGizmo> create_gizmo(Node3D *p_spatial);
+ GDVIRTUAL1RC(bool, _has_gizmo, Node3D *)
+ GDVIRTUAL1RC(Ref<EditorNode3DGizmo>, _create_gizmo, Node3D *)
+
+ GDVIRTUAL0RC(String, _get_gizmo_name)
+ GDVIRTUAL0RC(int, _get_priority)
+ GDVIRTUAL0RC(bool, _can_be_hidden)
+ GDVIRTUAL0RC(bool, _is_selectable_when_hidden)
+
+ GDVIRTUAL1(_redraw, Ref<EditorNode3DGizmo>)
+ GDVIRTUAL2RC(String, _get_handle_name, Ref<EditorNode3DGizmo>, int)
+ GDVIRTUAL2RC(bool, _is_handle_highlighted, Ref<EditorNode3DGizmo>, int)
+ GDVIRTUAL2RC(Variant, _get_handle_value, Ref<EditorNode3DGizmo>, int)
+
+ GDVIRTUAL4(_set_handle, Ref<EditorNode3DGizmo>, int, const Camera3D *, Vector2)
+ GDVIRTUAL4(_commit_handle, Ref<EditorNode3DGizmo>, int, Variant, bool)
+
+ GDVIRTUAL3RC(int, _subgizmos_intersect_ray, Ref<EditorNode3DGizmo>, const Camera3D *, Vector2)
+ GDVIRTUAL3RC(Vector<int>, _subgizmos_intersect_frustum, Ref<EditorNode3DGizmo>, const Camera3D *, TypedArray<Plane>)
+ GDVIRTUAL2RC(Transform3D, _get_subgizmo_transform, Ref<EditorNode3DGizmo>, int)
+ GDVIRTUAL3(_set_subgizmo_transform, Ref<EditorNode3DGizmo>, int, Transform3D)
+ GDVIRTUAL4(_commit_subgizmos, Ref<EditorNode3DGizmo>, Vector<int>, TypedArray<Transform3D>, bool)
+
public:
void create_material(const String &p_name, const Color &p_color, bool p_billboard = false, bool p_on_top = false, bool p_use_vertex_color = false);
void create_icon_material(const String &p_name, const Ref<Texture2D> &p_texture, bool p_on_top = false, const Color &p_albedo = Color(1, 1, 1, 1));
@@ -214,6 +249,19 @@ public:
AudioStreamPlayer3DGizmoPlugin();
};
+class AudioListener3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+ GDCLASS(AudioListener3DGizmoPlugin, EditorNode3DGizmoPlugin);
+
+public:
+ bool has_gizmo(Node3D *p_spatial) override;
+ String get_gizmo_name() const override;
+ int get_priority() const override;
+
+ void redraw(EditorNode3DGizmo *p_gizmo) override;
+
+ AudioListener3DGizmoPlugin();
+};
+
class Camera3DGizmoPlugin : public EditorNode3DGizmoPlugin {
GDCLASS(Camera3DGizmoPlugin, EditorNode3DGizmoPlugin);
@@ -344,8 +392,8 @@ public:
VehicleWheel3DGizmoPlugin();
};
-class SoftBody3DGizmoPlugin : public EditorNode3DGizmoPlugin {
- GDCLASS(SoftBody3DGizmoPlugin, EditorNode3DGizmoPlugin);
+class SoftDynamicBody3DGizmoPlugin : public EditorNode3DGizmoPlugin {
+ GDCLASS(SoftDynamicBody3DGizmoPlugin, EditorNode3DGizmoPlugin);
public:
bool has_gizmo(Node3D *p_spatial) override;
@@ -359,7 +407,7 @@ public:
void commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, const Variant &p_restore, bool p_cancel = false) override;
bool is_handle_highlighted(const EditorNode3DGizmo *p_gizmo, int p_id) const override;
- SoftBody3DGizmoPlugin();
+ SoftDynamicBody3DGizmoPlugin();
};
class VisibleOnScreenNotifier3DGizmoPlugin : public EditorNode3DGizmoPlugin {
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 4300a56ef0..e5e3be8a4d 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -128,7 +128,7 @@ void ViewportRotationControl::_draw_axis(const Axis2D &p_axis) {
const Color axis_color = axis_colors[direction];
const double alpha = focused ? 1.0 : ((p_axis.z_axis + 1.0) / 2.0) * 0.5 + 0.5;
- const Color c = focused ? Color(0.9, 0.9, 0.9) : Color(axis_color.r, axis_color.g, axis_color.b, alpha);
+ const Color c = focused ? Color(0.9, 0.9, 0.9) : Color(axis_color, alpha);
if (positive) {
// Draw axis lines for the positive axes.
@@ -181,7 +181,7 @@ void ViewportRotationControl::_get_sorted_axis(Vector<Axis2D> &r_axis) {
r_axis.sort_custom<Axis2DCompare>();
}
-void ViewportRotationControl::_gui_input(Ref<InputEvent> p_event) {
+void ViewportRotationControl::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
const Ref<InputEventMouseButton> mb = p_event;
@@ -252,10 +252,6 @@ void ViewportRotationControl::set_viewport(Node3DEditorViewport *p_viewport) {
viewport = p_viewport;
}
-void ViewportRotationControl::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &ViewportRotationControl::_gui_input);
-}
-
void Node3DEditorViewport::_update_camera(real_t p_interp_delta) {
bool is_orthogonal = camera->get_projection() == Camera3D::PROJECTION_ORTHOGONAL;
@@ -269,15 +265,13 @@ void Node3DEditorViewport::_update_camera(real_t p_interp_delta) {
if (is_freelook_active()) {
// Higher inertia should increase "lag" (lerp with factor between 0 and 1)
// Inertia of zero should produce instant movement (lerp with factor of 1) in this case it returns a really high value and gets clamped to 1.
- real_t inertia = EDITOR_GET("editors/3d/freelook/freelook_inertia");
- inertia = MAX(0.001, inertia);
+ const real_t inertia = EDITOR_GET("editors/3d/freelook/freelook_inertia");
real_t factor = (1.0 / inertia) * p_interp_delta;
// We interpolate a different point here, because in freelook mode the focus point (cursor.pos) orbits around eye_pos
camera_cursor.eye_pos = old_camera_cursor.eye_pos.lerp(cursor.eye_pos, CLAMP(factor, 0, 1));
- real_t orbit_inertia = EDITOR_GET("editors/3d/navigation_feel/orbit_inertia");
- orbit_inertia = MAX(0.0001, orbit_inertia);
+ const real_t orbit_inertia = EDITOR_GET("editors/3d/navigation_feel/orbit_inertia");
camera_cursor.x_rot = Math::lerp(old_camera_cursor.x_rot, cursor.x_rot, MIN(1.f, p_interp_delta * (1 / orbit_inertia)));
camera_cursor.y_rot = Math::lerp(old_camera_cursor.y_rot, cursor.y_rot, MIN(1.f, p_interp_delta * (1 / orbit_inertia)));
@@ -293,24 +287,9 @@ void Node3DEditorViewport::_update_camera(real_t p_interp_delta) {
camera_cursor.pos = camera_cursor.eye_pos + forward * camera_cursor.distance;
} else {
- //when not being manipulated, move softly
- real_t free_orbit_inertia = EDITOR_GET("editors/3d/navigation_feel/orbit_inertia");
- real_t free_translation_inertia = EDITOR_GET("editors/3d/navigation_feel/translation_inertia");
- //when being manipulated, move more quickly
- real_t manip_orbit_inertia = EDITOR_GET("editors/3d/navigation_feel/manipulation_orbit_inertia");
- real_t manip_translation_inertia = EDITOR_GET("editors/3d/navigation_feel/manipulation_translation_inertia");
-
- real_t zoom_inertia = EDITOR_GET("editors/3d/navigation_feel/zoom_inertia");
-
- //determine if being manipulated
- bool manipulated = Input::get_singleton()->get_mouse_button_mask() & (2 | 4);
- manipulated |= Input::get_singleton()->is_key_pressed(KEY_SHIFT);
- manipulated |= Input::get_singleton()->is_key_pressed(KEY_ALT);
- manipulated |= Input::get_singleton()->is_key_pressed(KEY_CTRL);
-
- real_t orbit_inertia = MAX(0.00001, manipulated ? manip_orbit_inertia : free_orbit_inertia);
- real_t translation_inertia = MAX(0.0001, manipulated ? manip_translation_inertia : free_translation_inertia);
- zoom_inertia = MAX(0.0001, zoom_inertia);
+ const real_t orbit_inertia = EDITOR_GET("editors/3d/navigation_feel/orbit_inertia");
+ const real_t translation_inertia = EDITOR_GET("editors/3d/navigation_feel/translation_inertia");
+ const real_t zoom_inertia = EDITOR_GET("editors/3d/navigation_feel/zoom_inertia");
camera_cursor.x_rot = Math::lerp(old_camera_cursor.x_rot, cursor.x_rot, MIN(1.f, p_interp_delta * (1 / orbit_inertia)));
camera_cursor.y_rot = Math::lerp(old_camera_cursor.y_rot, cursor.y_rot, MIN(1.f, p_interp_delta * (1 / orbit_inertia)));
@@ -839,7 +818,7 @@ void Node3DEditorViewport::_update_name() {
if (orthogonal) {
name = TTR("Left Orthogonal");
} else {
- name = TTR("Right Perspective");
+ name = TTR("Left Perspective");
}
} break;
case VIEW_TYPE_RIGHT: {
@@ -875,8 +854,8 @@ void Node3DEditorViewport::_update_name() {
}
void Node3DEditorViewport::_compute_edit(const Point2 &p_point) {
- _edit.click_ray = _get_ray(Vector2(p_point.x, p_point.y));
- _edit.click_ray_pos = _get_ray_pos(Vector2(p_point.x, p_point.y));
+ _edit.click_ray = _get_ray(p_point);
+ _edit.click_ray_pos = _get_ray_pos(p_point);
_edit.plane = TRANSFORM_VIEW;
spatial_editor->update_transform_gizmo();
_edit.center = spatial_editor->get_gizmo_transform().origin;
@@ -955,8 +934,8 @@ bool Node3DEditorViewport::_transform_gizmo_select(const Vector2 &p_screenpos, b
return false;
}
- Vector3 ray_pos = _get_ray_pos(Vector2(p_screenpos.x, p_screenpos.y));
- Vector3 ray = _get_ray(Vector2(p_screenpos.x, p_screenpos.y));
+ Vector3 ray_pos = _get_ray_pos(p_screenpos);
+ Vector3 ray = _get_ray(p_screenpos);
Transform3D gt = spatial_editor->get_gizmo_transform();
@@ -1019,7 +998,7 @@ bool Node3DEditorViewport::_transform_gizmo_select(const Vector2 &p_screenpos, b
} else {
//handle plane translate
_edit.mode = TRANSFORM_TRANSLATE;
- _compute_edit(Point2(p_screenpos.x, p_screenpos.y));
+ _compute_edit(p_screenpos);
_edit.plane = TransformPlane(TRANSFORM_X_AXIS + col_axis + (is_plane_translate ? 3 : 0));
}
return true;
@@ -1057,7 +1036,7 @@ bool Node3DEditorViewport::_transform_gizmo_select(const Vector2 &p_screenpos, b
} else {
//handle rotate
_edit.mode = TRANSFORM_ROTATE;
- _compute_edit(Point2(p_screenpos.x, p_screenpos.y));
+ _compute_edit(p_screenpos);
_edit.plane = TransformPlane(TRANSFORM_X_AXIS + col_axis);
}
return true;
@@ -1123,7 +1102,7 @@ bool Node3DEditorViewport::_transform_gizmo_select(const Vector2 &p_screenpos, b
} else {
//handle scale
_edit.mode = TRANSFORM_SCALE;
- _compute_edit(Point2(p_screenpos.x, p_screenpos.y));
+ _compute_edit(p_screenpos);
_edit.plane = TransformPlane(TRANSFORM_X_AXIS + col_axis + (is_plane_scale ? 3 : 0));
}
return true;
@@ -1835,6 +1814,8 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
motion = Vector3(scale, scale, scale);
}
+ motion /= click.distance_to(_edit.center);
+
// Disable local transformation for TRANSFORM_VIEW
bool local_coords = (spatial_editor->are_local_coords_enabled() && _edit.plane != TRANSFORM_VIEW);
@@ -3936,7 +3917,7 @@ void Node3DEditorViewport::_remove_preview() {
}
bool Node3DEditorViewport::_cyclical_dependency_exists(const String &p_target_scene_path, Node *p_desired_node) {
- if (p_desired_node->get_filename() == p_target_scene_path) {
+ if (p_desired_node->get_scene_file_path() == p_target_scene_path) {
return true;
}
@@ -3978,15 +3959,15 @@ bool Node3DEditorViewport::_create_instance(Node *parent, String &path, const Po
return false;
}
- if (editor->get_edited_scene()->get_filename() != "") { // cyclical instancing
- if (_cyclical_dependency_exists(editor->get_edited_scene()->get_filename(), instantiated_scene)) {
+ if (editor->get_edited_scene()->get_scene_file_path() != "") { // cyclical instancing
+ if (_cyclical_dependency_exists(editor->get_edited_scene()->get_scene_file_path(), instantiated_scene)) {
memdelete(instantiated_scene);
return false;
}
}
if (scene != nullptr) {
- instantiated_scene->set_filename(ProjectSettings::get_singleton()->localize_path(path));
+ instantiated_scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(path));
}
editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene);
@@ -4198,7 +4179,8 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito
VBoxContainer *vbox = memnew(VBoxContainer);
surface->add_child(vbox);
- vbox->set_position(Point2(10, 10) * EDSCALE);
+ vbox->set_offset(SIDE_LEFT, 10 * EDSCALE);
+ vbox->set_offset(SIDE_TOP, 10 * EDSCALE);
view_menu = memnew(MenuButton);
view_menu->set_flat(false);
@@ -4428,7 +4410,7 @@ Node3DEditorViewport::~Node3DEditorViewport() {
//////////////////////////////////////////////////////////////
-void Node3DEditorViewportContainer::_gui_input(const Ref<InputEvent> &p_event) {
+void Node3DEditorViewportContainer::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseButton> mb = p_event;
@@ -4720,10 +4702,6 @@ Node3DEditorViewportContainer::View Node3DEditorViewportContainer::get_view() {
return view;
}
-void Node3DEditorViewportContainer::_bind_methods() {
- ClassDB::bind_method("_gui_input", &Node3DEditorViewportContainer::_gui_input);
-}
-
Node3DEditorViewportContainer::Node3DEditorViewportContainer() {
set_clip_contents(true);
view = VIEW_USE_1_VIEWPORT;
@@ -4826,7 +4804,7 @@ void _update_all_gizmos(Node *p_node) {
}
void Node3DEditor::update_all_gizmos(Node *p_node) {
- if (!p_node && get_tree()) {
+ if (!p_node && is_inside_tree()) {
p_node = get_tree()->get_edited_scene_root();
}
@@ -5606,6 +5584,8 @@ void Node3DEditor::_init_indicators() {
Ref<Shader> grid_shader = memnew(Shader);
grid_shader->set_code(R"(
+// 3D editor grid shader.
+
shader_type spatial;
render_mode unshaded;
@@ -5847,6 +5827,8 @@ void fragment() {
Ref<Shader> rotate_shader = memnew(Shader);
rotate_shader->set_code(R"(
+// 3D editor rotation manipulator gizmo shader.
+
shader_type spatial;
render_mode unshaded, depth_test_disabled;
@@ -5895,6 +5877,8 @@ void fragment() {
Ref<Shader> border_shader = memnew(Shader);
border_shader->set_code(R"(
+// 3D editor rotation manipulator gizmo shader (white outline).
+
shader_type spatial;
render_mode unshaded, depth_test_disabled;
@@ -6030,7 +6014,7 @@ void fragment() {
void Node3DEditor::_update_context_menu_stylebox() {
// This must be called when the theme changes to follow the new accent color.
Ref<StyleBoxFlat> context_menu_stylebox = memnew(StyleBoxFlat);
- const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color("accent_color", "Editor");
+ const Color accent_color = EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("accent_color"), SNAME("Editor"));
context_menu_stylebox->set_bg_color(accent_color * Color(1, 1, 1, 0.1));
// Add an underline to the StyleBox, but prevent its minimum vertical size from changing.
context_menu_stylebox->set_border_color(accent_color);
@@ -6296,7 +6280,7 @@ void Node3DEditor::update_grid() {
// Gets a orthogonal or perspective position correctly (for the grid comparison)
const Vector3 camera_position = get_editor_viewport(0)->camera->get_position();
- if (!grid_init_draw || (camera_position - grid_camera_last_update_position).length() >= 10.0f) {
+ if (!grid_init_draw || grid_camera_last_update_position.distance_squared_to(camera_position) >= 100.0f) {
_finish_grid();
_init_grid();
grid_init_draw = true;
@@ -6512,7 +6496,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() {
}
}
-void Node3DEditor::_unhandled_key_input(Ref<InputEvent> p_event) {
+void Node3DEditor::unhandled_key_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (!is_visible_in_tree()) {
@@ -6863,9 +6847,10 @@ void Node3DEditor::_register_all_gizmos() {
add_gizmo_plugin(Ref<Camera3DGizmoPlugin>(memnew(Camera3DGizmoPlugin)));
add_gizmo_plugin(Ref<Light3DGizmoPlugin>(memnew(Light3DGizmoPlugin)));
add_gizmo_plugin(Ref<AudioStreamPlayer3DGizmoPlugin>(memnew(AudioStreamPlayer3DGizmoPlugin)));
+ add_gizmo_plugin(Ref<AudioListener3DGizmoPlugin>(memnew(AudioListener3DGizmoPlugin)));
add_gizmo_plugin(Ref<MeshInstance3DGizmoPlugin>(memnew(MeshInstance3DGizmoPlugin)));
add_gizmo_plugin(Ref<OccluderInstance3DGizmoPlugin>(memnew(OccluderInstance3DGizmoPlugin)));
- add_gizmo_plugin(Ref<SoftBody3DGizmoPlugin>(memnew(SoftBody3DGizmoPlugin)));
+ add_gizmo_plugin(Ref<SoftDynamicBody3DGizmoPlugin>(memnew(SoftDynamicBody3DGizmoPlugin)));
add_gizmo_plugin(Ref<Sprite3DGizmoPlugin>(memnew(Sprite3DGizmoPlugin)));
add_gizmo_plugin(Ref<Skeleton3DGizmoPlugin>(memnew(Skeleton3DGizmoPlugin)));
add_gizmo_plugin(Ref<Position3DGizmoPlugin>(memnew(Position3DGizmoPlugin)));
@@ -6890,7 +6875,6 @@ void Node3DEditor::_register_all_gizmos() {
}
void Node3DEditor::_bind_methods() {
- ClassDB::bind_method("_unhandled_key_input", &Node3DEditor::_unhandled_key_input);
ClassDB::bind_method("_get_editor_data", &Node3DEditor::_get_editor_data);
ClassDB::bind_method("_request_gizmo", &Node3DEditor::_request_gizmo);
ClassDB::bind_method("_clear_subgizmo_selection", &Node3DEditor::_clear_subgizmo_selection);
@@ -7515,6 +7499,8 @@ Node3DEditor::Node3DEditor(EditorNode *p_editor) {
sun_direction_shader.instantiate();
sun_direction_shader->set_code(R"(
+// 3D editor Preview Sun direction shader.
+
shader_type canvas_item;
uniform vec3 sun_direction;
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index 868b834993..59f3ec6fcd 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -74,9 +74,8 @@ class ViewportRotationControl : public Control {
const float AXIS_CIRCLE_RADIUS = 8.0f * EDSCALE;
protected:
- static void _bind_methods();
void _notification(int p_what);
- void _gui_input(Ref<InputEvent> p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _draw();
void _draw_axis(const Axis2D &p_axis);
void _get_sorted_axis(Vector<Axis2D> &r_axis);
@@ -470,11 +469,10 @@ private:
Vector2 drag_begin_pos;
Vector2 drag_begin_ratio;
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
protected:
void _notification(int p_what);
- static void _bind_methods();
public:
void set_view(View p_view);
@@ -744,7 +742,7 @@ private:
protected:
void _notification(int p_what);
//void _gui_input(InputEvent p_event);
- void _unhandled_key_input(Ref<InputEvent> p_event);
+ virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override;
static void _bind_methods();
diff --git a/editor/plugins/occluder_instance_3d_editor_plugin.cpp b/editor/plugins/occluder_instance_3d_editor_plugin.cpp
index ab88b9f00d..0328b1bea6 100644
--- a/editor/plugins/occluder_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/occluder_instance_3d_editor_plugin.cpp
@@ -41,9 +41,9 @@ void OccluderInstance3DEditorPlugin::_bake_select_file(const String &p_file) {
switch (err) {
case OccluderInstance3D::BAKE_ERROR_NO_SAVE_PATH: {
- String scene_path = occluder_instance->get_filename();
+ String scene_path = occluder_instance->get_scene_file_path();
if (scene_path == String()) {
- scene_path = occluder_instance->get_owner()->get_filename();
+ scene_path = occluder_instance->get_owner()->get_scene_file_path();
}
if (scene_path == String()) {
EditorNode::get_singleton()->show_warning(TTR("Can't determine a save path for the occluder.\nSave your scene and try again."));
diff --git a/editor/plugins/packed_scene_translation_parser_plugin.cpp b/editor/plugins/packed_scene_translation_parser_plugin.cpp
index 0a949c8610..53c5b8dd70 100644
--- a/editor/plugins/packed_scene_translation_parser_plugin.cpp
+++ b/editor/plugins/packed_scene_translation_parser_plugin.cpp
@@ -31,6 +31,7 @@
#include "packed_scene_translation_parser_plugin.h"
#include "core/io/resource_loader.h"
+#include "scene/gui/option_button.h"
#include "scene/resources/packed_scene.h"
void PackedSceneEditorTranslationParserPlugin::get_recognized_extensions(List<String> *r_extensions) const {
@@ -50,21 +51,31 @@ Error PackedSceneEditorTranslationParserPlugin::parse_file(const String &p_path,
Ref<SceneState> state = Ref<PackedScene>(loaded_res)->get_state();
Vector<String> parsed_strings;
- String property_name;
- Variant property_value;
for (int i = 0; i < state->get_node_count(); i++) {
- if (!ClassDB::is_parent_class(state->get_node_type(i), "Control") && !ClassDB::is_parent_class(state->get_node_type(i), "Viewport")) {
+ String node_type = state->get_node_type(i);
+ if (!ClassDB::is_parent_class(node_type, "Control") && !ClassDB::is_parent_class(node_type, "Window")) {
continue;
}
+ // Find the `auto_translate` property, and abort the string parsing of the node if disabled.
+ bool auto_translating = true;
for (int j = 0; j < state->get_node_property_count(i); j++) {
- property_name = state->get_node_property_name(i, j);
- if (!lookup_properties.has(property_name)) {
- continue;
+ if (state->get_node_property_name(i, j) == "auto_translate" && (bool)state->get_node_property_value(i, j) == false) {
+ auto_translating = false;
+ break;
}
+ }
+ if (!auto_translating) {
+ continue;
+ }
- property_value = state->get_node_property_value(i, j);
+ for (int j = 0; j < state->get_node_property_count(i); j++) {
+ String property_name = state->get_node_property_name(i, j);
+ if (!lookup_properties.has(property_name) || (exception_list.has(node_type) && exception_list[node_type].has(property_name))) {
+ continue;
+ }
+ Variant property_value = state->get_node_property_value(i, j);
if (property_name == "script" && property_value.get_type() == Variant::OBJECT && !property_value.is_null()) {
// Parse built-in script.
Ref<Script> s = Object::cast_to<Script>(property_value);
@@ -76,7 +87,16 @@ Error PackedSceneEditorTranslationParserPlugin::parse_file(const String &p_path,
parsed_strings.append_array(temp);
r_ids_ctx_plural->append_array(ids_context_plural);
}
- } else if (property_name == "filters") {
+ } else if ((node_type == "MenuButton" || node_type == "OptionButton") && property_name == "items") {
+ Vector<String> str_values = property_value;
+ int incr_value = node_type == "MenuButton" ? PopupMenu::ITEM_PROPERTY_SIZE : OptionButton::ITEM_PROPERTY_SIZE;
+ for (int k = 0; k < str_values.size(); k += incr_value) {
+ String desc = str_values[k].get_slice(";", 1).strip_edges();
+ if (!desc.is_empty()) {
+ parsed_strings.push_back(desc);
+ }
+ }
+ } else if (node_type == "FileDialog" && property_name == "filters") {
// Extract FileDialog's filters property with values in format "*.png ; PNG Images","*.gd ; GDScript Files".
Vector<String> str_values = property_value;
for (int k = 0; k < str_values.size(); k++) {
@@ -105,12 +125,17 @@ PackedSceneEditorTranslationParserPlugin::PackedSceneEditorTranslationParserPlug
lookup_properties.insert("text");
lookup_properties.insert("hint_tooltip");
lookup_properties.insert("placeholder_text");
+ lookup_properties.insert("items");
+ lookup_properties.insert("title");
lookup_properties.insert("dialog_text");
lookup_properties.insert("filters");
lookup_properties.insert("script");
- //Add exception list (to prevent false positives)
- //line edit, text edit, richtextlabel
- //Set<String> exception_list;
- //exception_list.insert("RichTextLabel");
+ // Exception list (to prevent false positives).
+ exception_list.insert("LineEdit", Vector<StringName>());
+ exception_list["LineEdit"].append("text");
+ exception_list.insert("TextEdit", Vector<StringName>());
+ exception_list["TextEdit"].append("text");
+ exception_list.insert("CodeEdit", Vector<StringName>());
+ exception_list["CodeEdit"].append("text");
}
diff --git a/editor/plugins/packed_scene_translation_parser_plugin.h b/editor/plugins/packed_scene_translation_parser_plugin.h
index e51d65414e..af0291b69c 100644
--- a/editor/plugins/packed_scene_translation_parser_plugin.h
+++ b/editor/plugins/packed_scene_translation_parser_plugin.h
@@ -37,7 +37,9 @@ class PackedSceneEditorTranslationParserPlugin : public EditorTranslationParserP
GDCLASS(PackedSceneEditorTranslationParserPlugin, EditorTranslationParserPlugin);
// Scene Node's properties that contain translation strings.
- Set<String> lookup_properties;
+ Set<StringName> lookup_properties;
+ // Properties from specific Nodes that should be ignored.
+ Map<StringName, Vector<StringName>> exception_list;
public:
virtual Error parse_file(const String &p_path, Vector<String> *r_ids, Vector<Vector<String>> *r_ids_ctx_plural) override;
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index 584eb84ecd..119ecddf63 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -70,7 +70,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
return false;
}
- real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
+ real_t grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius");
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp
index 13f7908170..bb0c270baa 100644
--- a/editor/plugins/path_3d_editor_plugin.cpp
+++ b/editor/plugins/path_3d_editor_plugin.cpp
@@ -510,7 +510,14 @@ void Path3DEditorPlugin::_close_curve() {
if (c->get_point_count() < 2) {
return;
}
- c->add_point(c->get_point_position(0), c->get_point_in(0), c->get_point_out(0));
+ if (c->get_point_position(0) == c->get_point_position(c->get_point_count() - 1)) {
+ return;
+ }
+ UndoRedo *ur = editor->get_undo_redo();
+ ur->create_action(TTR("Close Curve"));
+ ur->add_do_method(c.ptr(), "add_point", c->get_point_position(0), c->get_point_in(0), c->get_point_out(0), -1);
+ ur->add_undo_method(c.ptr(), "remove_point", c->get_point_count());
+ ur->commit_action();
}
void Path3DEditorPlugin::_handle_option_pressed(int p_option) {
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 9377395418..5afe9ed60c 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -449,7 +449,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
if (mb.is_valid()) {
if (mb->get_button_index() == MOUSE_BUTTON_LEFT) {
if (mb->is_pressed()) {
- uv_drag_from = snap_point(Vector2(mb->get_position().x, mb->get_position().y));
+ uv_drag_from = snap_point(mb->get_position());
uv_drag = true;
points_prev = node->get_uv();
@@ -463,7 +463,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
if (uv_move_current == UV_MODE_CREATE) {
if (!uv_create) {
points_prev.resize(0);
- Vector2 tuv = mtx.affine_inverse().xform(snap_point(Vector2(mb->get_position().x, mb->get_position().y)));
+ Vector2 tuv = mtx.affine_inverse().xform(snap_point(mb->get_position()));
points_prev.push_back(tuv);
uv_create_to = tuv;
point_drag_index = 0;
@@ -483,7 +483,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
uv_edit_draw->update();
} else {
- Vector2 tuv = mtx.affine_inverse().xform(snap_point(Vector2(mb->get_position().x, mb->get_position().y)));
+ Vector2 tuv = mtx.affine_inverse().xform(snap_point(mb->get_position()));
// Close the polygon if selected point is near start. Threshold for closing scaled by zoom level
if (points_prev.size() > 2 && tuv.distance_to(points_prev[0]) < (8 / uv_draw_zoom)) {
@@ -527,7 +527,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
uv_create_bones_prev = node->call("_get_bones");
int internal_vertices = node->get_internal_vertex_count();
- Vector2 pos = mtx.affine_inverse().xform(snap_point(Vector2(mb->get_position().x, mb->get_position().y)));
+ Vector2 pos = mtx.affine_inverse().xform(snap_point(mb->get_position()));
uv_create_poly_prev.push_back(pos);
uv_create_uv_prev.push_back(pos);
@@ -573,7 +573,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
for (int i = points_prev.size() - internal_vertices; i < points_prev.size(); i++) {
Vector2 tuv = mtx.xform(uv_create_poly_prev[i]);
- real_t dist = tuv.distance_to(Vector2(mb->get_position().x, mb->get_position().y));
+ real_t dist = tuv.distance_to(mb->get_position());
if (dist < 8 && dist < closest_dist) {
closest = i;
closest_dist = dist;
@@ -626,7 +626,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
point_drag_index = -1;
for (int i = 0; i < points_prev.size(); i++) {
Vector2 tuv = mtx.xform(points_prev[i]);
- if (tuv.distance_to(Vector2(mb->get_position().x, mb->get_position().y)) < 8) {
+ if (tuv.distance_to(mb->get_position()) < 8) {
uv_drag_from = tuv;
point_drag_index = i;
}
@@ -643,7 +643,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
for (int i = 0; i < points_prev.size(); i++) {
Vector2 tuv = mtx.xform(points_prev[i]);
- real_t dist = tuv.distance_to(Vector2(mb->get_position().x, mb->get_position().y));
+ real_t dist = tuv.distance_to(mb->get_position());
if (dist < 8 && dist < closest_dist) {
closest = i;
closest_dist = dist;
@@ -695,7 +695,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
polys.write[j] = mtx.xform(points_prev[idx]);
}
- if (Geometry2D::is_point_in_polygon(Vector2(mb->get_position().x, mb->get_position().y), polys)) {
+ if (Geometry2D::is_point_in_polygon(mb->get_position(), polys)) {
erase_index = i;
break;
}
@@ -779,7 +779,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
if (mm.is_valid()) {
if ((mm->get_button_mask() & MOUSE_BUTTON_MASK_MIDDLE) || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
- Vector2 drag(mm->get_relative().x, mm->get_relative().y);
+ Vector2 drag = mm->get_relative();
uv_hscroll->set_value(uv_hscroll->get_value() - drag.x);
uv_vscroll->set_value(uv_vscroll->get_value() - drag.y);
@@ -791,7 +791,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
switch (uv_move_current) {
case UV_MODE_CREATE: {
if (uv_create) {
- uv_create_to = mtx.affine_inverse().xform(snap_point(Vector2(mm->get_position().x, mm->get_position().y)));
+ uv_create_to = mtx.affine_inverse().xform(snap_point(mm->get_position()));
}
} break;
case UV_MODE_EDIT_POINT: {
@@ -870,7 +870,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
} break;
case UV_MODE_PAINT_WEIGHT:
case UV_MODE_CLEAR_WEIGHT: {
- bone_paint_pos = Vector2(mm->get_position().x, mm->get_position().y);
+ bone_paint_pos = mm->get_position();
} break;
default: {
}
@@ -905,10 +905,10 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
uv_edit_draw->update();
CanvasItemEditor::get_singleton()->update_viewport();
} else if (polygon_create.size()) {
- uv_create_to = mtx.affine_inverse().xform(Vector2(mm->get_position().x, mm->get_position().y));
+ uv_create_to = mtx.affine_inverse().xform(mm->get_position());
uv_edit_draw->update();
} else if (uv_mode == UV_MODE_PAINT_WEIGHT || uv_mode == UV_MODE_CLEAR_WEIGHT) {
- bone_paint_pos = Vector2(mm->get_position().x, mm->get_position().y);
+ bone_paint_pos = mm->get_position();
uv_edit_draw->update();
}
}
@@ -1041,7 +1041,7 @@ void Polygon2DEditor::_uv_draw() {
for (int i = 0; i < uvs.size(); i++) {
int next = uv_draw_max > 0 ? (i + 1) % uv_draw_max : 0;
- if (i < uv_draw_max && uv_drag && uv_move_current == UV_MODE_EDIT_POINT && EDITOR_DEF("editors/poly_editor/show_previous_outline", true)) {
+ if (i < uv_draw_max && uv_drag && uv_move_current == UV_MODE_EDIT_POINT && EDITOR_DEF("editors/polygon_editor/show_previous_outline", true)) {
uv_edit_draw->draw_line(mtx.xform(points_prev[i]), mtx.xform(points_prev[next]), prev_color, Math::round(EDSCALE));
}
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index cbea2405b8..eae6916a92 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -35,9 +35,6 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
-void ResourcePreloaderEditor::_gui_input(Ref<InputEvent> p_event) {
-}
-
void ResourcePreloaderEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
load->set_icon(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")));
@@ -335,7 +332,6 @@ void ResourcePreloaderEditor::drop_data_fw(const Point2 &p_point, const Variant
}
void ResourcePreloaderEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &ResourcePreloaderEditor::_gui_input);
ClassDB::bind_method(D_METHOD("_update_library"), &ResourcePreloaderEditor::_update_library);
ClassDB::bind_method(D_METHOD("_remove_resource", "to_remove"), &ResourcePreloaderEditor::_remove_resource);
diff --git a/editor/plugins/resource_preloader_editor_plugin.h b/editor/plugins/resource_preloader_editor_plugin.h
index bc10b48a16..04ab458eb5 100644
--- a/editor/plugins/resource_preloader_editor_plugin.h
+++ b/editor/plugins/resource_preloader_editor_plugin.h
@@ -75,7 +75,7 @@ class ResourcePreloaderEditor : public PanelContainer {
protected:
void _notification(int p_what);
- void _gui_input(Ref<InputEvent> p_event);
+
static void _bind_methods();
public:
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index bd90fa82f2..6922a48a50 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -37,6 +37,7 @@
#include "core/os/keyboard.h"
#include "core/os/os.h"
#include "editor/debugger/editor_debugger_node.h"
+#include "editor/debugger/script_editor_debugger.h"
#include "editor/editor_node.h"
#include "editor/editor_run_script.h"
#include "editor/editor_scale.h"
@@ -45,6 +46,7 @@
#include "editor/find_in_files.h"
#include "editor/node_dock.h"
#include "editor/plugins/shader_editor_plugin.h"
+#include "modules/visual_script/visual_script_editor.h"
#include "scene/main/window.h"
#include "scene/scene_string_names.h"
#include "script_text_editor.h"
@@ -54,17 +56,17 @@
/*** SYNTAX HIGHLIGHTER ****/
String EditorSyntaxHighlighter::_get_name() const {
- ScriptInstance *si = get_script_instance();
- if (si && si->has_method("_get_name")) {
- return si->call("_get_name");
+ String ret;
+ if (GDVIRTUAL_CALL(_get_name, ret)) {
+ return ret;
}
return "Unnamed";
}
Array EditorSyntaxHighlighter::_get_supported_languages() const {
- ScriptInstance *si = get_script_instance();
- if (si && si->has_method("_get_supported_languages")) {
- return si->call("_get_supported_languages");
+ Array ret;
+ if (GDVIRTUAL_CALL(_get_supported_languages, ret)) {
+ return ret;
}
return Array();
}
@@ -81,9 +83,8 @@ Ref<EditorSyntaxHighlighter> EditorSyntaxHighlighter::_create() const {
void EditorSyntaxHighlighter::_bind_methods() {
ClassDB::bind_method(D_METHOD("_get_edited_resource"), &EditorSyntaxHighlighter::_get_edited_resource);
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_name"));
- BIND_VMETHOD(MethodInfo(Variant::ARRAY, "_get_supported_languages"));
- BIND_VMETHOD(MethodInfo(Variant::ARRAY, "_get_supported_extentions"));
+ GDVIRTUAL_BIND(_get_name)
+ GDVIRTUAL_BIND(_get_supported_languages)
}
////
@@ -104,11 +105,7 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
List<StringName> types;
ClassDB::get_class_list(&types);
for (const StringName &E : types) {
- String n = E;
- if (n.begins_with("_")) {
- n = n.substr(1, n.length());
- }
- highlighter->add_keyword_color(n, type_color);
+ highlighter->add_keyword_color(E, type_color);
}
/* User types. */
@@ -120,9 +117,9 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
}
/* Autoloads. */
- Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
- for (Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E; E = E->next()) {
- const ProjectSettings::AutoloadInfo &info = E->value();
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
+ const ProjectSettings::AutoloadInfo &info = E.value();
if (info.is_singleton) {
highlighter->add_keyword_color(info.name, usertype_color);
}
@@ -227,8 +224,6 @@ void ScriptEditorBase::_bind_methods() {
// TODO: This signal is no use for VisualScript.
ADD_SIGNAL(MethodInfo("search_in_files_requested", PropertyInfo(Variant::STRING, "text")));
ADD_SIGNAL(MethodInfo("replace_in_files_requested", PropertyInfo(Variant::STRING, "text")));
-
- BIND_VMETHOD(MethodInfo("_add_syntax_highlighter", PropertyInfo(Variant::OBJECT, "highlighter")));
}
static bool _is_built_in_script(Script *p_script) {
@@ -323,7 +318,7 @@ void ScriptEditorQuickOpen::_sbox_input(const Ref<InputEvent> &p_ie) {
k->get_keycode() == KEY_DOWN ||
k->get_keycode() == KEY_PAGEUP ||
k->get_keycode() == KEY_PAGEDOWN)) {
- search_options->call("_gui_input", k);
+ search_options->gui_input(k);
search_box->accept_event();
}
}
@@ -486,6 +481,29 @@ void ScriptEditor::_clear_execution(REF p_script) {
}
}
+void ScriptEditor::_set_breakpoint(REF p_script, int p_line, bool p_enabled) {
+ Ref<Script> script = Object::cast_to<Script>(*p_script);
+ if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) {
+ if (edit(p_script, p_line, 0, false)) {
+ editor->push_item(p_script.ptr());
+
+ ScriptEditorBase *se = _get_current_editor();
+ if (se) {
+ se->set_breakpoint(p_line, p_enabled);
+ }
+ }
+ }
+}
+
+void ScriptEditor::_clear_breakpoints() {
+ for (int i = 0; i < tab_container->get_child_count(); i++) {
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
+ if (se) {
+ se->clear_breakpoints();
+ }
+ }
+}
+
ScriptEditorBase *ScriptEditor::_get_current_editor() const {
int selected = tab_container->get_current_tab();
if (selected < 0 || selected >= tab_container->get_child_count()) {
@@ -790,39 +808,35 @@ void ScriptEditor::_copy_script_path() {
}
void ScriptEditor::_close_other_tabs() {
- int child_count = tab_container->get_child_count();
int current_idx = tab_container->get_current_tab();
- for (int i = child_count - 1; i >= 0; i--) {
- if (i == current_idx) {
- continue;
- }
-
- tab_container->set_current_tab(i);
- ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
-
- if (se) {
- // Maybe there are unsaved changes
- if (se->is_unsaved()) {
- _ask_close_current_unsaved_tab(se);
- continue;
- }
+ for (int i = tab_container->get_child_count() - 1; i >= 0; i--) {
+ if (i != current_idx) {
+ script_close_queue.push_back(i);
}
-
- _close_current_tab(false);
}
+ _queue_close_tabs();
}
void ScriptEditor::_close_all_tabs() {
- int child_count = tab_container->get_child_count();
- for (int i = child_count - 1; i >= 0; i--) {
- tab_container->set_current_tab(i);
- ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
+ for (int i = tab_container->get_child_count() - 1; i >= 0; i--) {
+ script_close_queue.push_back(i);
+ }
+ _queue_close_tabs();
+}
+
+void ScriptEditor::_queue_close_tabs() {
+ while (!script_close_queue.is_empty()) {
+ int idx = script_close_queue.front()->get();
+ script_close_queue.pop_front();
+ tab_container->set_current_tab(idx);
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(idx));
if (se) {
- // Maybe there are unsaved changes
+ // Maybe there are unsaved changes.
if (se->is_unsaved()) {
_ask_close_current_unsaved_tab(se);
- continue;
+ erase_tab_confirm->connect(SceneStringNames::get_singleton()->visibility_changed, callable_mp(this, &ScriptEditor::_queue_close_tabs), varray(), CONNECT_ONESHOT);
+ break;
}
}
@@ -1219,14 +1233,15 @@ void ScriptEditor::_menu_option(int p_option) {
_update_script_names();
} break;
case TOGGLE_SCRIPTS_PANEL: {
+ toggle_scripts_panel();
if (current) {
- ScriptTextEditor *editor = Object::cast_to<ScriptTextEditor>(current);
- toggle_scripts_panel();
- if (editor) {
- editor->update_toggle_scripts_button();
- }
+ current->update_toggle_scripts_button();
} else {
- toggle_scripts_panel();
+ Control *tab = tab_container->get_current_tab_control();
+ EditorHelp *editor_help = Object::cast_to<EditorHelp>(tab);
+ if (editor_help) {
+ editor_help->update_toggle_scripts_button();
+ }
}
}
}
@@ -2735,7 +2750,30 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co
}
}
-void ScriptEditor::_unhandled_key_input(const Ref<InputEvent> &p_event) {
+void ScriptEditor::input(const Ref<InputEvent> &p_event) {
+ // This is implemented in `input()` rather than `unhandled_input()` to allow
+ // the shortcut to be used regardless of the click location.
+ // This feature can be disabled to avoid interfering with other uses of the additional
+ // mouse buttons, such as push-to-talk in a VoIP program.
+ if (EDITOR_GET("interface/editor/mouse_extra_buttons_navigate_history")) {
+ const Ref<InputEventMouseButton> mb = p_event;
+
+ // Navigate the script history using additional mouse buttons present on some mice.
+ // This must be hardcoded as the editor shortcuts dialog doesn't allow assigning
+ // more than one shortcut per action.
+ if (mb.is_valid() && mb->is_pressed() && is_visible_in_tree()) {
+ if (mb->get_button_index() == MOUSE_BUTTON_XBUTTON1) {
+ _history_back();
+ }
+
+ if (mb->get_button_index() == MOUSE_BUTTON_XBUTTON2) {
+ _history_forward();
+ }
+ }
+ }
+}
+
+void ScriptEditor::unhandled_key_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (!is_visible_in_tree() || !p_event->is_pressed() || p_event->is_echo()) {
@@ -3279,7 +3317,6 @@ void ScriptEditor::_bind_methods() {
ClassDB::bind_method("_update_script_connections", &ScriptEditor::_update_script_connections);
ClassDB::bind_method("_help_class_open", &ScriptEditor::_help_class_open);
ClassDB::bind_method("_live_auto_reload_running_scripts", &ScriptEditor::_live_auto_reload_running_scripts);
- ClassDB::bind_method("_unhandled_key_input", &ScriptEditor::_unhandled_key_input);
ClassDB::bind_method("_update_members_overview", &ScriptEditor::_update_members_overview);
ClassDB::bind_method("_update_recent_scripts", &ScriptEditor::_update_recent_scripts);
@@ -3412,9 +3449,11 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
ED_SHORTCUT("script_editor/window_sort", TTR("Sort"));
ED_SHORTCUT("script_editor/window_move_up", TTR("Move Up"), KEY_MASK_SHIFT | KEY_MASK_ALT | KEY_UP);
ED_SHORTCUT("script_editor/window_move_down", TTR("Move Down"), KEY_MASK_SHIFT | KEY_MASK_ALT | KEY_DOWN);
- ED_SHORTCUT("script_editor/next_script", TTR("Next Script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_PERIOD); // these should be KEY_GREATER and KEY_LESS but those don't work
+ // FIXME: These should be `KEY_GREATER` and `KEY_LESS` but those don't work.
+ ED_SHORTCUT("script_editor/next_script", TTR("Next Script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_PERIOD);
ED_SHORTCUT("script_editor/prev_script", TTR("Previous Script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_COMMA);
- set_process_unhandled_key_input(true);
+ set_process_input(true);
+ set_process_unhandled_input(true);
file_menu = memnew(MenuButton);
file_menu->set_text(TTR("File"));
@@ -3491,6 +3530,8 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
debugger->connect("set_execution", callable_mp(this, &ScriptEditor::_set_execution));
debugger->connect("clear_execution", callable_mp(this, &ScriptEditor::_clear_execution));
debugger->connect("breaked", callable_mp(this, &ScriptEditor::_breaked));
+ debugger->get_default_debugger()->connect("set_breakpoint", callable_mp(this, &ScriptEditor::_set_breakpoint));
+ debugger->get_default_debugger()->connect("clear_breakpoints", callable_mp(this, &ScriptEditor::_clear_breakpoints));
menu_hb->add_spacer();
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index e322828b6c..6d9b27e0be 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -56,6 +56,9 @@ private:
protected:
static void _bind_methods();
+ GDVIRTUAL0RC(String, _get_name)
+ GDVIRTUAL0RC(Array, _get_supported_languages)
+
public:
virtual String _get_name() const;
virtual Array _get_supported_languages() const;
@@ -74,7 +77,7 @@ private:
public:
virtual void _update_cache() override;
- virtual Dictionary _get_line_syntax_highlighting(int p_line) override { return highlighter->get_line_syntax_highlighting(p_line); }
+ virtual Dictionary _get_line_syntax_highlighting_impl(int p_line) override { return highlighter->get_line_syntax_highlighting(p_line); }
virtual String _get_name() const override { return TTR("Standard"); }
@@ -152,10 +155,13 @@ public:
virtual void tag_saved_version() = 0;
virtual void reload(bool p_soft) {}
virtual Array get_breakpoints() = 0;
+ virtual void set_breakpoint(int p_line, bool p_enabled) = 0;
+ virtual void clear_breakpoints() = 0;
virtual void add_callback(const String &p_function, PackedStringArray p_args) = 0;
virtual void update_settings() = 0;
virtual void set_debugger_active(bool p_active) = 0;
virtual bool can_lose_focus_on_node_selection() { return true; }
+ virtual void update_toggle_scripts_button() {}
virtual bool show_members_overview() = 0;
@@ -303,6 +309,7 @@ class ScriptEditor : public PanelContainer {
int history_pos;
List<String> previous_scripts;
+ List<int> script_close_queue;
void _tab_changed(int p_which);
void _menu_option(int p_option);
@@ -335,6 +342,7 @@ class ScriptEditor : public PanelContainer {
void _close_docs_tab();
void _close_other_tabs();
void _close_all_tabs();
+ void _queue_close_tabs();
void _copy_script_path();
@@ -371,6 +379,8 @@ class ScriptEditor : public PanelContainer {
void _breaked(bool p_breaked, bool p_can_debug);
void _update_window_menu();
void _script_created(Ref<Script> p_script);
+ void _set_breakpoint(REF p_scrpt, int p_line, bool p_enabled);
+ void _clear_breakpoints();
ScriptEditorBase *_get_current_editor() const;
Array _get_open_script_editors() const;
@@ -408,7 +418,8 @@ class ScriptEditor : public PanelContainer {
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
- void _unhandled_key_input(const Ref<InputEvent> &p_event);
+ virtual void input(const Ref<InputEvent> &p_event) override;
+ virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override;
void _script_list_gui_input(const Ref<InputEvent> &ev);
void _make_script_list_context_menu();
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 7f2908eada..2b1ca068ee 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -158,7 +158,6 @@ void ScriptTextEditor::enable_editor() {
editor_enabled = true;
_enable_code_editor();
- _set_theme_for_script();
_validate_script();
}
@@ -758,8 +757,6 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c
} else if (script->get_language()->lookup_code(code_editor->get_text_editor()->get_text_for_symbol_lookup(), p_symbol, script->get_path(), base, result) == OK) {
_goto_line(p_row);
- result.class_name = result.class_name.trim_prefix("_");
-
switch (result.type) {
case ScriptLanguage::LookupResult::RESULT_SCRIPT_LOCATION: {
if (result.script.is_valid()) {
@@ -833,7 +830,7 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c
if (info.is_singleton) {
EditorNode::get_singleton()->load_scene(info.path);
}
- } else if (p_symbol.is_rel_path()) {
+ } else if (p_symbol.is_relative_path()) {
// Every symbol other than absolute path is relative path so keep this condition at last.
String path = _get_absolute_path(p_symbol);
if (FileAccess::exists(path)) {
@@ -860,7 +857,7 @@ void ScriptTextEditor::_validate_symbol(const String &p_symbol) {
ScriptLanguage::LookupResult result;
if (ScriptServer::is_global_class(p_symbol) || p_symbol.is_resource_file() || script->get_language()->lookup_code(code_editor->get_text_editor()->get_text_for_symbol_lookup(), p_symbol, script->get_path(), base, result) == OK || (ProjectSettings::get_singleton()->has_autoload(p_symbol) && ProjectSettings::get_singleton()->get_autoload(p_symbol).is_singleton)) {
text_edit->set_symbol_lookup_word_as_valid(true);
- } else if (p_symbol.is_rel_path()) {
+ } else if (p_symbol.is_relative_path()) {
String path = _get_absolute_path(p_symbol);
if (FileAccess::exists(path)) {
text_edit->set_symbol_lookup_word_as_valid(true);
@@ -879,9 +876,7 @@ String ScriptTextEditor::_get_absolute_path(const String &rel_path) {
}
void ScriptTextEditor::update_toggle_scripts_button() {
- if (code_editor != nullptr) {
- code_editor->update_toggle_scripts_button();
- }
+ code_editor->update_toggle_scripts_button();
}
void ScriptTextEditor::_update_connected_methods() {
@@ -1245,7 +1240,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
tx->set_caret_line(bpoints[bpoints.size() - 1]);
tx->center_viewport_to_caret();
} else {
- for (int i = bpoints.size(); i >= 0; i--) {
+ for (int i = bpoints.size() - 1; i >= 0; i--) {
int bline = bpoints[i];
if (bline < line) {
tx->unfold_line(bline);
@@ -1372,6 +1367,14 @@ Array ScriptTextEditor::get_breakpoints() {
return code_editor->get_text_editor()->get_breakpointed_lines();
}
+void ScriptTextEditor::set_breakpoint(int p_line, bool p_enabled) {
+ code_editor->get_text_editor()->set_line_as_breakpoint(p_line, p_enabled);
+}
+
+void ScriptTextEditor::clear_breakpoints() {
+ code_editor->get_text_editor()->clear_breakpointed_lines();
+}
+
void ScriptTextEditor::set_tooltip_request_func(String p_method, Object *p_obj) {
code_editor->get_text_editor()->set_tooltip_request_func(p_obj, p_method, this);
}
@@ -1958,11 +1961,8 @@ void ScriptTextEditor::register_editor() {
ED_SHORTCUT("script_text_editor/toggle_fold_line", TTR("Fold/Unfold Line"), KEY_MASK_ALT | KEY_F);
ED_SHORTCUT("script_text_editor/fold_all_lines", TTR("Fold All Lines"), KEY_NONE);
ED_SHORTCUT("script_text_editor/unfold_all_lines", TTR("Unfold All Lines"), KEY_NONE);
-#ifdef OSX_ENABLED
- ED_SHORTCUT("script_text_editor/duplicate_selection", TTR("Duplicate Selection"), KEY_MASK_SHIFT | KEY_MASK_CMD | KEY_C);
-#else
ED_SHORTCUT("script_text_editor/duplicate_selection", TTR("Duplicate Selection"), KEY_MASK_SHIFT | KEY_MASK_CMD | KEY_D);
-#endif
+ ED_SHORTCUT_OVERRIDE("script_text_editor/duplicate_selection", "macos", KEY_MASK_SHIFT | KEY_MASK_CMD | KEY_C);
ED_SHORTCUT("script_text_editor/evaluate_selection", TTR("Evaluate Selection"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_E);
ED_SHORTCUT("script_text_editor/trim_trailing_whitespace", TTR("Trim Trailing Whitespace"), KEY_MASK_CMD | KEY_MASK_ALT | KEY_T);
ED_SHORTCUT("script_text_editor/convert_indent_to_spaces", TTR("Convert Indent to Spaces"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_Y);
@@ -1970,42 +1970,35 @@ void ScriptTextEditor::register_editor() {
ED_SHORTCUT("script_text_editor/auto_indent", TTR("Auto Indent"), KEY_MASK_CMD | KEY_I);
ED_SHORTCUT_AND_COMMAND("script_text_editor/find", TTR("Find..."), KEY_MASK_CMD | KEY_F);
-#ifdef OSX_ENABLED
- ED_SHORTCUT("script_text_editor/find_next", TTR("Find Next"), KEY_MASK_CMD | KEY_G);
- ED_SHORTCUT("script_text_editor/find_previous", TTR("Find Previous"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_G);
- ED_SHORTCUT_AND_COMMAND("script_text_editor/replace", TTR("Replace..."), KEY_MASK_ALT | KEY_MASK_CMD | KEY_F);
-#else
+
ED_SHORTCUT("script_text_editor/find_next", TTR("Find Next"), KEY_F3);
+ ED_SHORTCUT_OVERRIDE("script_text_editor/find_next", "macos", KEY_MASK_CMD | KEY_G);
+
ED_SHORTCUT("script_text_editor/find_previous", TTR("Find Previous"), KEY_MASK_SHIFT | KEY_F3);
+ ED_SHORTCUT_OVERRIDE("script_text_editor/find_previous", "macos", KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_G);
+
ED_SHORTCUT_AND_COMMAND("script_text_editor/replace", TTR("Replace..."), KEY_MASK_CMD | KEY_R);
-#endif
+ ED_SHORTCUT_OVERRIDE("script_text_editor/replace", "macos", KEY_MASK_ALT | KEY_MASK_CMD | KEY_F);
ED_SHORTCUT("script_text_editor/find_in_files", TTR("Find in Files..."), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F);
ED_SHORTCUT("script_text_editor/replace_in_files", TTR("Replace in Files..."), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_R);
-#ifdef OSX_ENABLED
- ED_SHORTCUT("script_text_editor/contextual_help", TTR("Contextual Help"), KEY_MASK_ALT | KEY_MASK_SHIFT | KEY_SPACE);
-#else
ED_SHORTCUT("script_text_editor/contextual_help", TTR("Contextual Help"), KEY_MASK_ALT | KEY_F1);
-#endif
+ ED_SHORTCUT_OVERRIDE("script_text_editor/contextual_help", "macos", KEY_MASK_ALT | KEY_MASK_SHIFT | KEY_SPACE);
ED_SHORTCUT("script_text_editor/toggle_bookmark", TTR("Toggle Bookmark"), KEY_MASK_CMD | KEY_MASK_ALT | KEY_B);
ED_SHORTCUT("script_text_editor/goto_next_bookmark", TTR("Go to Next Bookmark"), KEY_MASK_CMD | KEY_B);
ED_SHORTCUT("script_text_editor/goto_previous_bookmark", TTR("Go to Previous Bookmark"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B);
ED_SHORTCUT("script_text_editor/remove_all_bookmarks", TTR("Remove All Bookmarks"), KEY_NONE);
-#ifdef OSX_ENABLED
- ED_SHORTCUT("script_text_editor/goto_function", TTR("Go to Function..."), KEY_MASK_CTRL | KEY_MASK_CMD | KEY_J);
-#else
ED_SHORTCUT("script_text_editor/goto_function", TTR("Go to Function..."), KEY_MASK_ALT | KEY_MASK_CMD | KEY_F);
-#endif
+ ED_SHORTCUT_OVERRIDE("script_text_editor/goto_function", "macos", KEY_MASK_CTRL | KEY_MASK_CMD | KEY_J);
+
ED_SHORTCUT("script_text_editor/goto_line", TTR("Go to Line..."), KEY_MASK_CMD | KEY_L);
-#ifdef OSX_ENABLED
- ED_SHORTCUT("script_text_editor/toggle_breakpoint", TTR("Toggle Breakpoint"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B);
-#else
ED_SHORTCUT("script_text_editor/toggle_breakpoint", TTR("Toggle Breakpoint"), KEY_F9);
-#endif
+ ED_SHORTCUT_OVERRIDE("script_text_editor/toggle_breakpoint", "macos", KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_B);
+
ED_SHORTCUT("script_text_editor/remove_all_breakpoints", TTR("Remove All Breakpoints"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F9);
ED_SHORTCUT("script_text_editor/goto_next_breakpoint", TTR("Go to Next Breakpoint"), KEY_MASK_CMD | KEY_PERIOD);
ED_SHORTCUT("script_text_editor/goto_previous_breakpoint", TTR("Go to Previous Breakpoint"), KEY_MASK_CMD | KEY_COMMA);
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index 1ca6f56ea1..afe9a7453d 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -197,7 +197,7 @@ public:
virtual void add_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) override;
virtual void set_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) override;
- void update_toggle_scripts_button();
+ void update_toggle_scripts_button() override;
virtual void apply_code() override;
virtual RES get_edited_resource() const override;
@@ -225,6 +225,8 @@ public:
virtual void reload(bool p_soft) override;
virtual Array get_breakpoints() override;
+ virtual void set_breakpoint(int p_line, bool p_enabled) override;
+ virtual void clear_breakpoints() override;
virtual void add_callback(const String &p_function, PackedStringArray p_args) override;
virtual void update_settings() override;
diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp
index 7ef680d7ef..c350004f0f 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_2d_editor_plugin.cpp
@@ -98,9 +98,10 @@ Skeleton2DEditor::Skeleton2DEditor() {
options->set_text(TTR("Skeleton2D"));
options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Skeleton2D"), SNAME("EditorIcons")));
- options->get_popup()->add_item(TTR("Make Rest Pose (From Bones)"), MENU_OPTION_MAKE_REST);
+ options->get_popup()->add_item(TTR("Reset to Rest Pose"), MENU_OPTION_MAKE_REST);
options->get_popup()->add_separator();
- options->get_popup()->add_item(TTR("Set Bones to Rest Pose"), MENU_OPTION_SET_REST);
+ // Use the "Overwrite" word to highlight that this is a destructive operation.
+ options->get_popup()->add_item(TTR("Overwrite Rest Pose"), MENU_OPTION_SET_REST);
options->set_switch_on_hover(true);
options->get_popup()->connect("id_pressed", callable_mp(this, &Skeleton2DEditor::_menu_option));
diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp
index 0f889ce33d..eb5e527640 100644
--- a/editor/plugins/sprite_2d_editor_plugin.cpp
+++ b/editor/plugins/sprite_2d_editor_plugin.cpp
@@ -182,7 +182,7 @@ void Sprite2DEditor::_update_mesh_data() {
if (node->is_region_enabled()) {
rect = node->get_region_rect();
} else {
- rect.size = Size2(image->get_width(), image->get_height());
+ rect.size = image->get_size();
}
Ref<BitMap> bm;
@@ -209,7 +209,7 @@ void Sprite2DEditor::_update_mesh_data() {
computed_uv.clear();
computed_indices.clear();
- Size2 img_size = Vector2(image->get_width(), image->get_height());
+ Size2 img_size = image->get_size();
for (int i = 0; i < lines.size(); i++) {
lines.write[i] = expand(lines[i], rect, epsilon);
}
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 2883dbbc81..8a8d80891a 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -40,7 +40,7 @@
#include "scene/gui/margin_container.h"
#include "scene/gui/panel_container.h"
-void SpriteFramesEditor::_gui_input(Ref<InputEvent> p_event) {
+void SpriteFramesEditor::gui_input(const Ref<InputEvent> &p_event) {
}
void SpriteFramesEditor::_open_sprite_sheet() {
@@ -54,22 +54,46 @@ void SpriteFramesEditor::_open_sprite_sheet() {
file_split_sheet->popup_file_dialog();
}
+int SpriteFramesEditor::_sheet_preview_position_to_frame_index(const Point2 &p_position) {
+ if (p_position.x < 0 || p_position.y < 0) {
+ return -1;
+ }
+
+ Size2i texture_size = split_sheet_preview->get_texture()->get_size();
+ int h = split_sheet_h->get_value();
+ int v = split_sheet_v->get_value();
+ if (h > texture_size.width || v > texture_size.height) {
+ return -1;
+ }
+
+ int x = int(p_position.x / sheet_zoom) / (texture_size.width / h);
+ int y = int(p_position.y / sheet_zoom) / (texture_size.height / v);
+ if (x >= h || y >= v) {
+ return -1;
+ }
+ return h * y + x;
+}
+
void SpriteFramesEditor::_sheet_preview_draw() {
- Size2i size = split_sheet_preview->get_size();
+ Size2i texture_size = split_sheet_preview->get_texture()->get_size();
int h = split_sheet_h->get_value();
int v = split_sheet_v->get_value();
- int width = size.width / h;
- int height = size.height / v;
+
+ real_t width = (texture_size.width / h) * sheet_zoom;
+ real_t height = (texture_size.height / v) * sheet_zoom;
const float a = 0.3;
- for (int i = 1; i < h; i++) {
- int x = i * width;
- split_sheet_preview->draw_line(Point2(x, 0), Point2(x, size.height), Color(1, 1, 1, a));
- split_sheet_preview->draw_line(Point2(x + 1, 0), Point2(x + 1, size.height), Color(0, 0, 0, a));
+
+ real_t y_end = v * height;
+ for (int i = 0; i <= h; i++) {
+ real_t x = i * width;
+ split_sheet_preview->draw_line(Point2(x, 0), Point2(x, y_end), Color(1, 1, 1, a));
+ split_sheet_preview->draw_line(Point2(x + 1, 0), Point2(x + 1, y_end), Color(0, 0, 0, a));
}
- for (int i = 1; i < v; i++) {
- int y = i * height;
- split_sheet_preview->draw_line(Point2(0, y), Point2(size.width, y), Color(1, 1, 1, a));
- split_sheet_preview->draw_line(Point2(0, y + 1), Point2(size.width, y + 1), Color(0, 0, 0, a));
+ real_t x_end = h * width;
+ for (int i = 0; i <= v; i++) {
+ real_t y = i * height;
+ split_sheet_preview->draw_line(Point2(0, y), Point2(x_end, y), Color(1, 1, 1, a));
+ split_sheet_preview->draw_line(Point2(0, y + 1), Point2(x_end, y + 1), Color(0, 0, 0, a));
}
if (frames_selected.size() == 0) {
@@ -83,9 +107,9 @@ void SpriteFramesEditor::_sheet_preview_draw() {
for (Set<int>::Element *E = frames_selected.front(); E; E = E->next()) {
int idx = E->get();
int xp = idx % h;
- int yp = (idx - xp) / h;
- int x = xp * width;
- int y = yp * height;
+ int yp = idx / h;
+ real_t x = xp * width;
+ real_t y = yp * height;
split_sheet_preview->draw_rect(Rect2(x + 5, y + 5, width - 10, height - 10), Color(0, 0, 0, 0.35), true);
split_sheet_preview->draw_rect(Rect2(x + 0, y + 0, width - 0, height - 0), Color(0, 0, 0, 1), false);
@@ -103,46 +127,43 @@ void SpriteFramesEditor::_sheet_preview_draw() {
void SpriteFramesEditor::_sheet_preview_input(const Ref<InputEvent> &p_event) {
const Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
- const Size2i size = split_sheet_preview->get_size();
- const int h = split_sheet_h->get_value();
- const int v = split_sheet_v->get_value();
-
- const int x = CLAMP(int(mb->get_position().x) * h / size.width, 0, h - 1);
- const int y = CLAMP(int(mb->get_position().y) * v / size.height, 0, v - 1);
-
- const int idx = h * y + x;
+ const int idx = _sheet_preview_position_to_frame_index(mb->get_position());
+
+ if (idx != -1) {
+ if (mb->is_shift_pressed() && last_frame_selected >= 0) {
+ //select multiple
+ int from = idx;
+ int to = last_frame_selected;
+ if (from > to) {
+ SWAP(from, to);
+ }
- if (mb->is_shift_pressed() && last_frame_selected >= 0) {
- //select multiple
- int from = idx;
- int to = last_frame_selected;
- if (from > to) {
- SWAP(from, to);
- }
+ for (int i = from; i <= to; i++) {
+ // Prevent double-toggling the same frame when moving the mouse when the mouse button is still held.
+ frames_toggled_by_mouse_hover.insert(idx);
- for (int i = from; i <= to; i++) {
+ if (mb->is_ctrl_pressed()) {
+ frames_selected.erase(i);
+ } else {
+ frames_selected.insert(i);
+ }
+ }
+ } else {
// Prevent double-toggling the same frame when moving the mouse when the mouse button is still held.
frames_toggled_by_mouse_hover.insert(idx);
- if (mb->is_ctrl_pressed()) {
- frames_selected.erase(i);
+ if (frames_selected.has(idx)) {
+ frames_selected.erase(idx);
} else {
- frames_selected.insert(i);
+ frames_selected.insert(idx);
}
}
- } else {
- // Prevent double-toggling the same frame when moving the mouse when the mouse button is still held.
- frames_toggled_by_mouse_hover.insert(idx);
-
- if (frames_selected.has(idx)) {
- frames_selected.erase(idx);
- } else {
- frames_selected.insert(idx);
- }
}
- last_frame_selected = idx;
- split_sheet_preview->update();
+ if (last_frame_selected != idx || idx != -1) {
+ last_frame_selected = idx;
+ split_sheet_preview->update();
+ }
}
if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
@@ -152,16 +173,9 @@ void SpriteFramesEditor::_sheet_preview_input(const Ref<InputEvent> &p_event) {
const Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) {
// Select by holding down the mouse button on frames.
- const Size2i size = split_sheet_preview->get_size();
- const int h = split_sheet_h->get_value();
- const int v = split_sheet_v->get_value();
-
- const int x = CLAMP(int(mm->get_position().x) * h / size.width, 0, h - 1);
- const int y = CLAMP(int(mm->get_position().y) * v / size.height, 0, v - 1);
-
- const int idx = h * y + x;
+ const int idx = _sheet_preview_position_to_frame_index(mm->get_position());
- if (!frames_toggled_by_mouse_hover.has(idx)) {
+ if (idx != -1 && !frames_toggled_by_mouse_hover.has(idx)) {
// Only allow toggling each tile once per mouse hold.
// Otherwise, the selection would constantly "flicker" in and out when moving the mouse cursor.
// The mouse button must be released before it can be toggled again.
@@ -199,17 +213,17 @@ void SpriteFramesEditor::_sheet_scroll_input(const Ref<InputEvent> &p_event) {
}
void SpriteFramesEditor::_sheet_add_frames() {
- Size2i size = split_sheet_preview->get_texture()->get_size();
+ Size2i texture_size = split_sheet_preview->get_texture()->get_size();
int frame_count_x = split_sheet_h->get_value();
int frame_count_y = split_sheet_v->get_value();
- Size2 frame_size(size.width / frame_count_x, size.height / frame_count_y);
+ Size2 frame_size(texture_size.width / frame_count_x, texture_size.height / frame_count_y);
undo_redo->create_action(TTR("Add Frame"));
int fc = frames->get_frame_count(edited_anim);
Point2 src_origin;
- Rect2 src_region(Point2(), size);
+ Rect2 src_region(Point2(), texture_size);
AtlasTexture *src_atlas = Object::cast_to<AtlasTexture>(*split_sheet_preview->get_texture());
if (src_atlas && src_atlas->get_atlas().is_valid()) {
diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h
index e6c59e3533..5e3b2fb8c1 100644
--- a/editor/plugins/sprite_frames_editor_plugin.h
+++ b/editor/plugins/sprite_frames_editor_plugin.h
@@ -135,6 +135,7 @@ class SpriteFramesEditor : public HSplitContainer {
void _open_sprite_sheet();
void _prepare_sprite_sheet(const String &p_file);
+ int _sheet_preview_position_to_frame_index(const Vector2 &p_position);
void _sheet_preview_draw();
void _sheet_spin_changed(double);
void _sheet_preview_input(const Ref<InputEvent> &p_event);
@@ -147,7 +148,7 @@ class SpriteFramesEditor : public HSplitContainer {
protected:
void _notification(int p_what);
- void _gui_input(Ref<InputEvent> p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
static void _bind_methods();
public:
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index 32bcc1a4e6..06ba8a6168 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -513,6 +513,10 @@ void TextEditor::_make_context_menu(bool p_selection, bool p_can_fold, bool p_is
context_menu->popup();
}
+void TextEditor::update_toggle_scripts_button() {
+ code_editor->update_toggle_scripts_button();
+}
+
TextEditor::TextEditor() {
code_editor = memnew(CodeTextEditor);
add_child(code_editor);
@@ -521,6 +525,7 @@ TextEditor::TextEditor() {
code_editor->connect("validate_script", callable_mp(this, &TextEditor::_validate_script));
code_editor->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
code_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ code_editor->show_toggle_scripts_button();
update_settings();
diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h
index 839e1c5f7a..9308fec210 100644
--- a/editor/plugins/text_editor.h
+++ b/editor/plugins/text_editor.h
@@ -121,6 +121,8 @@ public:
virtual void set_edit_state(const Variant &p_state) override;
virtual Vector<String> get_functions() override;
virtual Array get_breakpoints() override;
+ virtual void set_breakpoint(int p_line, bool p_enabled) override{};
+ virtual void clear_breakpoints() override{};
virtual void goto_line(int p_line, bool p_with_error = false) override;
void goto_line_selection(int p_line, int p_begin, int p_end);
virtual void set_executing_line(int p_line) override;
@@ -137,6 +139,7 @@ public:
virtual void set_debugger_active(bool p_active) override;
virtual void set_tooltip_request_func(String p_method, Object *p_obj) override;
virtual void add_callback(const String &p_function, PackedStringArray p_args) override;
+ void update_toggle_scripts_button() override;
virtual Control *get_edit_menu() override;
virtual void clear_edit_menu() override;
diff --git a/editor/plugins/texture_3d_editor_plugin.cpp b/editor/plugins/texture_3d_editor_plugin.cpp
index 3987cdd6a0..bd1923f4ab 100644
--- a/editor/plugins/texture_3d_editor_plugin.cpp
+++ b/editor/plugins/texture_3d_editor_plugin.cpp
@@ -34,9 +34,6 @@
#include "core/io/resource_loader.h"
#include "editor/editor_settings.h"
-void Texture3DEditor::_gui_input(Ref<InputEvent> p_event) {
-}
-
void Texture3DEditor::_texture_rect_draw() {
texture_rect->draw_rect(Rect2(Point2(), texture_rect->get_size()), Color(1, 1, 1, 1));
}
@@ -79,6 +76,8 @@ void Texture3DEditor::_update_material() {
void Texture3DEditor::_make_shaders() {
shader.instantiate();
shader->set_code(R"(
+// Texture3DEditor preview shader.
+
shader_type canvas_item;
uniform sampler3D tex;
@@ -145,7 +144,6 @@ void Texture3DEditor::edit(Ref<Texture3D> p_texture) {
}
void Texture3DEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &Texture3DEditor::_gui_input);
ClassDB::bind_method(D_METHOD("_layer_changed"), &Texture3DEditor::_layer_changed);
}
diff --git a/editor/plugins/texture_3d_editor_plugin.h b/editor/plugins/texture_3d_editor_plugin.h
index 9d90d3653f..855194e644 100644
--- a/editor/plugins/texture_3d_editor_plugin.h
+++ b/editor/plugins/texture_3d_editor_plugin.h
@@ -65,7 +65,6 @@ class Texture3DEditor : public Control {
protected:
void _notification(int p_what);
- void _gui_input(Ref<InputEvent> p_event);
static void _bind_methods();
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 44db06bcfd..b9ec6bf5ab 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -58,6 +58,21 @@ void TexturePreview::_notification(int p_what) {
}
}
+void TexturePreview::_update_metadata_label_text() {
+ Ref<Texture2D> texture = texture_display->get_texture();
+
+ String format;
+ if (Object::cast_to<ImageTexture>(*texture)) {
+ format = Image::get_format_name(Object::cast_to<ImageTexture>(*texture)->get_format());
+ } else if (Object::cast_to<StreamTexture2D>(*texture)) {
+ format = Image::get_format_name(Object::cast_to<StreamTexture2D>(*texture)->get_format());
+ } else {
+ format = texture->get_class();
+ }
+
+ metadata_label->set_text(itos(texture->get_width()) + "x" + itos(texture->get_height()) + " " + format);
+}
+
TexturePreview::TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata) {
checkerboard = memnew(TextureRect);
checkerboard->set_stretch_mode(TextureRect::STRETCH_TILE);
@@ -75,16 +90,8 @@ TexturePreview::TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata) {
if (p_show_metadata) {
metadata_label = memnew(Label);
- String format;
- if (Object::cast_to<ImageTexture>(*p_texture)) {
- format = Image::get_format_name(Object::cast_to<ImageTexture>(*p_texture)->get_format());
- } else if (Object::cast_to<StreamTexture2D>(*p_texture)) {
- format = Image::get_format_name(Object::cast_to<StreamTexture2D>(*p_texture)->get_format());
- } else {
- format = p_texture->get_class();
- }
-
- metadata_label->set_text(itos(p_texture->get_width()) + "x" + itos(p_texture->get_height()) + " " + format);
+ _update_metadata_label_text();
+ p_texture->connect("changed", callable_mp(this, &TexturePreview::_update_metadata_label_text));
// It's okay that these colors are static since the grid color is static too.
metadata_label->add_theme_color_override("font_color", Color::named("white"));
diff --git a/editor/plugins/texture_editor_plugin.h b/editor/plugins/texture_editor_plugin.h
index 36a5513ea6..60349febd7 100644
--- a/editor/plugins/texture_editor_plugin.h
+++ b/editor/plugins/texture_editor_plugin.h
@@ -44,6 +44,8 @@ private:
TextureRect *checkerboard = nullptr;
Label *metadata_label = nullptr;
+ void _update_metadata_label_text();
+
protected:
void _notification(int p_what);
diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp
index 80359452ac..424e018a47 100644
--- a/editor/plugins/texture_layered_editor_plugin.cpp
+++ b/editor/plugins/texture_layered_editor_plugin.cpp
@@ -34,7 +34,7 @@
#include "core/io/resource_loader.h"
#include "editor/editor_settings.h"
-void TextureLayeredEditor::_gui_input(Ref<InputEvent> p_event) {
+void TextureLayeredEditor::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseMotion> mm = p_event;
@@ -106,6 +106,8 @@ void TextureLayeredEditor::_update_material() {
void TextureLayeredEditor::_make_shaders() {
shaders[0].instantiate();
shaders[0]->set_code(R"(
+// TextureLayeredEditor preview shader (2D array).
+
shader_type canvas_item;
uniform sampler2DArray tex;
@@ -118,6 +120,8 @@ void fragment() {
shaders[1].instantiate();
shaders[1]->set_code(R"(
+// TextureLayeredEditor preview shader (cubemap).
+
shader_type canvas_item;
uniform samplerCube tex;
@@ -132,6 +136,8 @@ void fragment() {
shaders[2].instantiate();
shaders[2]->set_code(R"(
+// TextureLayeredEditor preview shader (cubemap array).
+
shader_type canvas_item;
uniform samplerCubeArray tex;
@@ -214,7 +220,6 @@ void TextureLayeredEditor::edit(Ref<TextureLayered> p_texture) {
}
void TextureLayeredEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &TextureLayeredEditor::_gui_input);
ClassDB::bind_method(D_METHOD("_layer_changed"), &TextureLayeredEditor::_layer_changed);
}
diff --git a/editor/plugins/texture_layered_editor_plugin.h b/editor/plugins/texture_layered_editor_plugin.h
index c4ced62fb9..a7fe4b94e9 100644
--- a/editor/plugins/texture_layered_editor_plugin.h
+++ b/editor/plugins/texture_layered_editor_plugin.h
@@ -67,7 +67,7 @@ class TextureLayeredEditor : public Control {
protected:
void _notification(int p_what);
- void _gui_input(Ref<InputEvent> p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
static void _bind_methods();
public:
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 1a6eb7b63b..ce90d61616 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -50,7 +50,7 @@ void draw_margin_line(Control *edit_draw, Vector2 from, Vector2 to) {
EditorNode::get_singleton()->get_theme_base()->get_theme_color(SNAME("mono_color"), SNAME("Editor")).inverted() * Color(1, 1, 1, 0.5),
Math::round(2 * EDSCALE));
- while ((to - from).length_squared() > 200) {
+ while (from.distance_squared_to(to) > 200) {
edit_draw->draw_line(
from,
from + line,
@@ -63,16 +63,16 @@ void draw_margin_line(Control *edit_draw, Vector2 from, Vector2 to) {
void TextureRegionEditor::_region_draw() {
Ref<Texture2D> base_tex = nullptr;
- if (node_sprite) {
- base_tex = node_sprite->get_texture();
+ if (atlas_tex.is_valid()) {
+ base_tex = atlas_tex->get_atlas();
+ } else if (node_sprite_2d) {
+ base_tex = node_sprite_2d->get_texture();
} else if (node_sprite_3d) {
base_tex = node_sprite_3d->get_texture();
} else if (node_ninepatch) {
base_tex = node_ninepatch->get_texture();
} else if (obj_styleBox.is_valid()) {
base_tex = obj_styleBox->get_texture();
- } else if (atlas_tex.is_valid()) {
- base_tex = atlas_tex->get_atlas();
}
if (base_tex.is_null()) {
@@ -321,35 +321,38 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
prev_margin = margins[3];
}
if (edited_margin >= 0) {
- drag_from = Vector2(mb->get_position().x, mb->get_position().y);
+ drag_from = mb->get_position();
drag = true;
}
}
if (edited_margin < 0 && snap_mode == SNAP_AUTOSLICE) {
- Vector2 point = mtx.affine_inverse().xform(Vector2(mb->get_position().x, mb->get_position().y));
+ Vector2 point = mtx.affine_inverse().xform(mb->get_position());
for (const Rect2 &E : autoslice_cache) {
if (E.has_point(point)) {
rect = E;
if (Input::get_singleton()->is_key_pressed(KEY_CTRL) && !(Input::get_singleton()->is_key_pressed(Key(KEY_SHIFT | KEY_ALT)))) {
Rect2 r;
- if (node_sprite) {
- r = node_sprite->get_region_rect();
+ if (atlas_tex.is_valid()) {
+ r = atlas_tex->get_region();
+ } else if (node_sprite_2d) {
+ r = node_sprite_2d->get_region_rect();
} else if (node_sprite_3d) {
r = node_sprite_3d->get_region_rect();
} else if (node_ninepatch) {
r = node_ninepatch->get_region_rect();
} else if (obj_styleBox.is_valid()) {
r = obj_styleBox->get_region_rect();
- } else if (atlas_tex.is_valid()) {
- r = atlas_tex->get_region();
}
rect.expand_to(r.position);
- rect.expand_to(r.position + r.size);
+ rect.expand_to(r.get_end());
}
undo_redo->create_action(TTR("Set Region Rect"));
- if (node_sprite) {
- undo_redo->add_do_method(node_sprite, "set_region_rect", rect);
- undo_redo->add_undo_method(node_sprite, "set_region_rect", node_sprite->get_region_rect());
+ if (atlas_tex.is_valid()) {
+ undo_redo->add_do_method(atlas_tex.ptr(), "set_region", rect);
+ undo_redo->add_undo_method(atlas_tex.ptr(), "set_region", atlas_tex->get_region());
+ } else if (node_sprite_2d) {
+ undo_redo->add_do_method(node_sprite_2d, "set_region_rect", rect);
+ undo_redo->add_undo_method(node_sprite_2d, "set_region_rect", node_sprite_2d->get_region_rect());
} else if (node_sprite_3d) {
undo_redo->add_do_method(node_sprite_3d, "set_region_rect", rect);
undo_redo->add_undo_method(node_sprite_3d, "set_region_rect", node_sprite_3d->get_region_rect());
@@ -359,9 +362,6 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
} else if (obj_styleBox.is_valid()) {
undo_redo->add_do_method(obj_styleBox.ptr(), "set_region_rect", rect);
undo_redo->add_undo_method(obj_styleBox.ptr(), "set_region_rect", obj_styleBox->get_region_rect());
- } else if (atlas_tex.is_valid()) {
- undo_redo->add_do_method(atlas_tex.ptr(), "set_region", rect);
- undo_redo->add_undo_method(atlas_tex.ptr(), "set_region", atlas_tex->get_region());
}
undo_redo->add_do_method(this, "_update_rect");
undo_redo->add_undo_method(this, "_update_rect");
@@ -372,28 +372,28 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
}
}
} else if (edited_margin < 0) {
- drag_from = mtx.affine_inverse().xform(Vector2(mb->get_position().x, mb->get_position().y));
+ drag_from = mtx.affine_inverse().xform(mb->get_position());
if (snap_mode == SNAP_PIXEL) {
drag_from = drag_from.snapped(Vector2(1, 1));
} else if (snap_mode == SNAP_GRID) {
drag_from = snap_point(drag_from);
}
drag = true;
- if (node_sprite) {
- rect_prev = node_sprite->get_region_rect();
+ if (atlas_tex.is_valid()) {
+ rect_prev = atlas_tex->get_region();
+ } else if (node_sprite_2d) {
+ rect_prev = node_sprite_2d->get_region_rect();
} else if (node_sprite_3d) {
rect_prev = node_sprite_3d->get_region_rect();
} else if (node_ninepatch) {
rect_prev = node_ninepatch->get_region_rect();
} else if (obj_styleBox.is_valid()) {
rect_prev = obj_styleBox->get_region_rect();
- } else if (atlas_tex.is_valid()) {
- rect_prev = atlas_tex->get_region();
}
for (int i = 0; i < 8; i++) {
Vector2 tuv = endpoints[i];
- if (tuv.distance_to(Vector2(mb->get_position().x, mb->get_position().y)) < handle_radius) {
+ if (tuv.distance_to(mb->get_position()) < handle_radius) {
drag_index = i;
}
}
@@ -419,15 +419,15 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
edited_margin = -1;
} else {
undo_redo->create_action(TTR("Set Region Rect"));
- if (node_sprite) {
- undo_redo->add_do_method(node_sprite, "set_region_rect", node_sprite->get_region_rect());
- undo_redo->add_undo_method(node_sprite, "set_region_rect", rect_prev);
+ if (atlas_tex.is_valid()) {
+ undo_redo->add_do_method(atlas_tex.ptr(), "set_region", atlas_tex->get_region());
+ undo_redo->add_undo_method(atlas_tex.ptr(), "set_region", rect_prev);
+ } else if (node_sprite_2d) {
+ undo_redo->add_do_method(node_sprite_2d, "set_region_rect", node_sprite_2d->get_region_rect());
+ undo_redo->add_undo_method(node_sprite_2d, "set_region_rect", rect_prev);
} else if (node_sprite_3d) {
undo_redo->add_do_method(node_sprite_3d, "set_region_rect", node_sprite_3d->get_region_rect());
undo_redo->add_undo_method(node_sprite_3d, "set_region_rect", rect_prev);
- } else if (atlas_tex.is_valid()) {
- undo_redo->add_do_method(atlas_tex.ptr(), "set_region", atlas_tex->get_region());
- undo_redo->add_undo_method(atlas_tex.ptr(), "set_region", rect_prev);
} else if (node_ninepatch) {
undo_redo->add_do_method(node_ninepatch, "set_region_rect", node_ninepatch->get_region_rect());
undo_redo->add_undo_method(node_ninepatch, "set_region_rect", rect_prev);
@@ -544,7 +544,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
switch (drag_index) {
case 0: {
- Vector2 p = rect_prev.position + rect_prev.size;
+ Vector2 p = rect_prev.get_end();
rect = Rect2(p, Size2());
rect.expand_to(new_pos);
apply_rect(rect);
@@ -674,8 +674,7 @@ void TextureRegionEditor::_zoom_on_position(float p_zoom, Point2 p_position) {
draw_zoom = p_zoom;
Point2 ofs = p_position;
ofs = ofs / prev_zoom - ofs / draw_zoom;
- draw_ofs.x = Math::round(draw_ofs.x + ofs.x);
- draw_ofs.y = Math::round(draw_ofs.y + ofs.y);
+ draw_ofs = (draw_ofs + ofs).round();
edit_draw->update();
}
@@ -693,22 +692,24 @@ void TextureRegionEditor::_zoom_out() {
}
void TextureRegionEditor::apply_rect(const Rect2 &p_rect) {
- if (node_sprite) {
- node_sprite->set_region_rect(p_rect);
+ if (atlas_tex.is_valid()) {
+ atlas_tex->set_region(p_rect);
+ } else if (node_sprite_2d) {
+ node_sprite_2d->set_region_rect(p_rect);
} else if (node_sprite_3d) {
node_sprite_3d->set_region_rect(p_rect);
} else if (node_ninepatch) {
node_ninepatch->set_region_rect(p_rect);
} else if (obj_styleBox.is_valid()) {
obj_styleBox->set_region_rect(p_rect);
- } else if (atlas_tex.is_valid()) {
- atlas_tex->set_region(p_rect);
}
}
void TextureRegionEditor::_update_rect() {
- if (node_sprite) {
- rect = node_sprite->get_region_rect();
+ if (atlas_tex.is_valid()) {
+ rect = atlas_tex->get_region();
+ } else if (node_sprite_2d) {
+ rect = node_sprite_2d->get_region_rect();
} else if (node_sprite_3d) {
rect = node_sprite_3d->get_region_rect();
} else if (node_ninepatch) {
@@ -718,8 +719,6 @@ void TextureRegionEditor::_update_rect() {
}
} else if (obj_styleBox.is_valid()) {
rect = obj_styleBox->get_region_rect();
- } else if (atlas_tex.is_valid()) {
- rect = atlas_tex->get_region();
}
}
@@ -728,16 +727,16 @@ void TextureRegionEditor::_update_autoslice() {
autoslice_cache.clear();
Ref<Texture2D> texture = nullptr;
- if (node_sprite) {
- texture = node_sprite->get_texture();
+ if (atlas_tex.is_valid()) {
+ texture = atlas_tex->get_atlas();
+ } else if (node_sprite_2d) {
+ texture = node_sprite_2d->get_texture();
} else if (node_sprite_3d) {
texture = node_sprite_3d->get_texture();
} else if (node_ninepatch) {
texture = node_ninepatch->get_texture();
} else if (obj_styleBox.is_valid()) {
texture = obj_styleBox->get_texture();
- } else if (atlas_tex.is_valid()) {
- texture = atlas_tex->get_atlas();
}
if (texture.is_null()) {
@@ -823,8 +822,8 @@ void TextureRegionEditor::_notification(int p_what) {
}
void TextureRegionEditor::_node_removed(Object *p_obj) {
- if (p_obj == node_sprite || p_obj == node_sprite_3d || p_obj == node_ninepatch || p_obj == obj_styleBox.ptr() || p_obj == atlas_tex.ptr()) {
- node_sprite = nullptr;
+ if (p_obj == node_sprite_2d || p_obj == node_sprite_3d || p_obj == node_ninepatch || p_obj == obj_styleBox.ptr() || p_obj == atlas_tex.ptr()) {
+ node_sprite_2d = nullptr;
node_sprite_3d = nullptr;
node_ninepatch = nullptr;
obj_styleBox = Ref<StyleBox>(nullptr);
@@ -852,17 +851,17 @@ bool TextureRegionEditor::is_ninepatch() {
return node_ninepatch != nullptr;
}
-Sprite3D *TextureRegionEditor::get_sprite_3d() {
- return node_sprite_3d;
+Sprite2D *TextureRegionEditor::get_sprite_2d() {
+ return node_sprite_2d;
}
-Sprite2D *TextureRegionEditor::get_sprite() {
- return node_sprite;
+Sprite3D *TextureRegionEditor::get_sprite_3d() {
+ return node_sprite_3d;
}
void TextureRegionEditor::edit(Object *p_obj) {
- if (node_sprite) {
- node_sprite->disconnect("texture_changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
+ if (node_sprite_2d) {
+ node_sprite_2d->disconnect("texture_changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
}
if (node_sprite_3d) {
node_sprite_3d->disconnect("texture_changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
@@ -877,7 +876,7 @@ void TextureRegionEditor::edit(Object *p_obj) {
atlas_tex->disconnect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
}
if (p_obj) {
- node_sprite = Object::cast_to<Sprite2D>(p_obj);
+ node_sprite_2d = Object::cast_to<Sprite2D>(p_obj);
node_sprite_3d = Object::cast_to<Sprite3D>(p_obj);
node_ninepatch = Object::cast_to<NinePatchRect>(p_obj);
@@ -898,14 +897,14 @@ void TextureRegionEditor::edit(Object *p_obj) {
}
_edit_region();
} else {
- node_sprite = nullptr;
+ node_sprite_2d = nullptr;
node_sprite_3d = nullptr;
node_ninepatch = nullptr;
obj_styleBox = Ref<StyleBoxTexture>(nullptr);
atlas_tex = Ref<AtlasTexture>(nullptr);
}
edit_draw->update();
- if ((node_sprite && !node_sprite->is_region_enabled()) || (node_sprite_3d && !node_sprite_3d->is_region_enabled())) {
+ if ((node_sprite_2d && !node_sprite_2d->is_region_enabled()) || (node_sprite_3d && !node_sprite_3d->is_region_enabled())) {
set_process(true);
}
if (!p_obj) {
@@ -922,16 +921,16 @@ void TextureRegionEditor::_texture_changed() {
void TextureRegionEditor::_edit_region() {
Ref<Texture2D> texture = nullptr;
- if (node_sprite) {
- texture = node_sprite->get_texture();
+ if (atlas_tex.is_valid()) {
+ texture = atlas_tex->get_atlas();
+ } else if (node_sprite_2d) {
+ texture = node_sprite_2d->get_texture();
} else if (node_sprite_3d) {
texture = node_sprite_3d->get_texture();
} else if (node_ninepatch) {
texture = node_ninepatch->get_texture();
} else if (obj_styleBox.is_valid()) {
texture = obj_styleBox->get_texture();
- } else if (atlas_tex.is_valid()) {
- texture = atlas_tex->get_atlas();
}
if (texture.is_null()) {
@@ -967,7 +966,7 @@ Vector2 TextureRegionEditor::snap_point(Vector2 p_target) const {
}
TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
- node_sprite = nullptr;
+ node_sprite_2d = nullptr;
node_sprite_3d = nullptr;
node_ninepatch = nullptr;
obj_styleBox = Ref<StyleBoxTexture>(nullptr);
@@ -1122,7 +1121,9 @@ void TextureRegionEditorPlugin::_editor_visiblity_changed() {
void TextureRegionEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
texture_region_button->show();
- bool is_node_configured = region_editor->is_stylebox() || region_editor->is_atlas_texture() || region_editor->is_ninepatch() || (region_editor->get_sprite() && region_editor->get_sprite()->is_region_enabled()) || (region_editor->get_sprite_3d() && region_editor->get_sprite_3d()->is_region_enabled());
+ bool is_node_configured = region_editor->is_stylebox() || region_editor->is_atlas_texture() || region_editor->is_ninepatch();
+ is_node_configured |= region_editor->get_sprite_2d() && region_editor->get_sprite_2d()->is_region_enabled();
+ is_node_configured |= region_editor->get_sprite_3d() && region_editor->get_sprite_3d()->is_region_enabled();
if ((is_node_configured && !manually_hidden) || texture_region_button->is_pressed()) {
editor->make_bottom_panel_item_visible(region_editor);
}
diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h
index d3db0a08a9..c043d6ae33 100644
--- a/editor/plugins/texture_region_editor_plugin.h
+++ b/editor/plugins/texture_region_editor_plugin.h
@@ -83,7 +83,7 @@ class TextureRegionEditor : public VBoxContainer {
Vector2 snap_step;
Vector2 snap_separation;
- Sprite2D *node_sprite;
+ Sprite2D *node_sprite_2d;
Sprite3D *node_sprite_3d;
NinePatchRect *node_ninepatch;
Ref<StyleBoxTexture> obj_styleBox;
@@ -134,8 +134,8 @@ public:
bool is_stylebox();
bool is_atlas_texture();
bool is_ninepatch();
+ Sprite2D *get_sprite_2d();
Sprite3D *get_sprite_3d();
- Sprite2D *get_sprite();
void edit(Object *p_obj);
TextureRegionEditor(EditorNode *p_editor);
diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp
index 801ee0eac2..d26d0ec39d 100644
--- a/editor/plugins/theme_editor_preview.cpp
+++ b/editor/plugins/theme_editor_preview.cpp
@@ -126,8 +126,8 @@ void ThemeEditorPreview::_draw_picker_overlay() {
highlight_label_rect.size.x += margin_left + margin_right;
highlight_label_rect.size.y += margin_top + margin_bottom;
- highlight_label_rect.position.x = CLAMP(highlight_label_rect.position.x, 0.0, picker_overlay->get_size().width);
- highlight_label_rect.position.y = CLAMP(highlight_label_rect.position.y, 0.0, picker_overlay->get_size().height);
+ highlight_label_rect.position = highlight_label_rect.position.clamp(Vector2(), picker_overlay->get_size());
+
picker_overlay->draw_style_box(theme_cache.preview_picker_label, highlight_label_rect);
Point2 label_pos = highlight_label_rect.position;
diff --git a/editor/plugins/tiles/atlas_merging_dialog.cpp b/editor/plugins/tiles/atlas_merging_dialog.cpp
index d54906c98c..2a8a3216ed 100644
--- a/editor/plugins/tiles/atlas_merging_dialog.cpp
+++ b/editor/plugins/tiles/atlas_merging_dialog.cpp
@@ -94,12 +94,14 @@ void AtlasMergingDialog::_generate_merged(Vector<Ref<TileSetAtlasSource>> p_atla
}
// Copy the texture.
- Rect2i src_rect = atlas_source->get_tile_texture_region(tile_id);
- Rect2 dst_rect_wide = Rect2i(new_tile_rect_in_altas.position * new_texture_region_size, new_tile_rect_in_altas.size * new_texture_region_size);
- if (dst_rect_wide.get_end().x > output_image->get_width() || dst_rect_wide.get_end().y > output_image->get_height()) {
- output_image->crop(MAX(dst_rect_wide.get_end().x, output_image->get_width()), MAX(dst_rect_wide.get_end().y, output_image->get_height()));
+ for (int frame = 0; frame < atlas_source->get_tile_animation_frames_count(tile_id); frame++) {
+ Rect2i src_rect = atlas_source->get_tile_texture_region(tile_id, frame);
+ Rect2 dst_rect_wide = Rect2i(new_tile_rect_in_altas.position * new_texture_region_size, new_tile_rect_in_altas.size * new_texture_region_size);
+ if (dst_rect_wide.get_end().x > output_image->get_width() || dst_rect_wide.get_end().y > output_image->get_height()) {
+ output_image->crop(MAX(dst_rect_wide.get_end().x, output_image->get_width()), MAX(dst_rect_wide.get_end().y, output_image->get_height()));
+ }
+ output_image->blit_rect(atlas_source->get_texture()->get_image(), src_rect, dst_rect_wide.get_center() - src_rect.size / 2);
}
- output_image->blit_rect(atlas_source->get_texture()->get_image(), src_rect, (dst_rect_wide.get_position() + dst_rect_wide.get_end()) / 2 - src_rect.size / 2);
}
// Compute the atlas offset.
diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp
index 13f04cb804..e98bd74b62 100644
--- a/editor/plugins/tiles/tile_atlas_view.cpp
+++ b/editor/plugins/tiles/tile_atlas_view.cpp
@@ -41,7 +41,7 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
-void TileAtlasView::_gui_input(const Ref<InputEvent> &p_event) {
+void TileAtlasView::gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
drag_type = DRAG_TYPE_NONE;
@@ -256,11 +256,15 @@ void TileAtlasView::_draw_base_tiles() {
for (int i = 0; i < tile_set_atlas_source->get_tiles_count(); i++) {
Vector2i atlas_coords = tile_set_atlas_source->get_tile_id(i);
- // Update the y to max value.
- Vector2i offset_pos = (margins + (atlas_coords * texture_region_size) + tile_set_atlas_source->get_tile_texture_region(atlas_coords).size / 2 + tile_set_atlas_source->get_tile_effective_texture_offset(atlas_coords, 0));
+ for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(atlas_coords); frame++) {
+ // Update the y to max value.
+ int animation_columns = tile_set_atlas_source->get_tile_animation_columns(atlas_coords);
+ Vector2i frame_coords = atlas_coords + (tile_set_atlas_source->get_tile_size_in_atlas(atlas_coords) + tile_set_atlas_source->get_tile_animation_separation(atlas_coords)) * ((animation_columns > 0) ? Vector2i(frame % animation_columns, frame / animation_columns) : Vector2i(frame, 0));
+ Vector2i offset_pos = (margins + (frame_coords * texture_region_size) + tile_set_atlas_source->get_tile_texture_region(atlas_coords, frame).size / 2 + tile_set_atlas_source->get_tile_effective_texture_offset(atlas_coords, 0));
- // Draw the tile.
- TileMap::draw_tile(base_tiles_draw->get_canvas_item(), offset_pos, tile_set, source_id, atlas_coords, 0);
+ // Draw the tile.
+ TileMap::draw_tile(base_tiles_draw->get_canvas_item(), offset_pos, tile_set, source_id, atlas_coords, 0, frame);
+ }
}
}
}
@@ -326,11 +330,18 @@ void TileAtlasView::_draw_base_tiles_shape_grid() {
for (int i = 0; i < tile_set_atlas_source->get_tiles_count(); i++) {
Vector2i tile_id = tile_set_atlas_source->get_tile_id(i);
Vector2 in_tile_base_offset = tile_set_atlas_source->get_tile_effective_texture_offset(tile_id, 0);
- Rect2i texture_region = tile_set_atlas_source->get_tile_texture_region(tile_id);
- Vector2 origin = texture_region.position + (texture_region.size - tile_shape_size) / 2 + in_tile_base_offset;
- // Draw only if the tile shape fits in the texture region
- tile_set->draw_tile_shape(base_tiles_shape_grid, Rect2(origin, tile_shape_size), grid_color);
+ for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(tile_id); frame++) {
+ Color color = grid_color;
+ if (frame > 0) {
+ color.a *= 0.3;
+ }
+ Rect2i texture_region = tile_set_atlas_source->get_tile_texture_region(tile_id);
+ Transform2D tile_xform;
+ tile_xform.set_origin(texture_region.get_center() + in_tile_base_offset);
+ tile_xform.set_scale(tile_shape_size);
+ tile_set->draw_tile_shape(base_tiles_shape_grid, tile_xform, color);
+ }
}
}
@@ -358,7 +369,7 @@ void TileAtlasView::_draw_alternatives() {
Vector2i atlas_coords = tile_set_atlas_source->get_tile_id(i);
current_pos.x = 0;
int y_increment = 0;
- Rect2i texture_region = tile_set_atlas_source->get_tile_texture_region(atlas_coords);
+ Size2i texture_region_size = tile_set_atlas_source->get_tile_texture_region(atlas_coords).size;
int alternatives_count = tile_set_atlas_source->get_alternative_tiles_count(atlas_coords);
for (int j = 1; j < alternatives_count; j++) {
int alternative_id = tile_set_atlas_source->get_alternative_tile_id(atlas_coords, j);
@@ -368,18 +379,18 @@ void TileAtlasView::_draw_alternatives() {
// Update the y to max value.
Vector2i offset_pos = current_pos;
if (transposed) {
- offset_pos = (current_pos + Vector2(texture_region.size.y, texture_region.size.x) / 2 + tile_set_atlas_source->get_tile_effective_texture_offset(atlas_coords, alternative_id));
- y_increment = MAX(y_increment, texture_region.size.x);
+ offset_pos = (current_pos + Vector2(texture_region_size.y, texture_region_size.x) / 2 + tile_set_atlas_source->get_tile_effective_texture_offset(atlas_coords, alternative_id));
+ y_increment = MAX(y_increment, texture_region_size.x);
} else {
- offset_pos = (current_pos + texture_region.size / 2 + tile_set_atlas_source->get_tile_effective_texture_offset(atlas_coords, alternative_id));
- y_increment = MAX(y_increment, texture_region.size.y);
+ offset_pos = (current_pos + texture_region_size / 2 + tile_set_atlas_source->get_tile_effective_texture_offset(atlas_coords, alternative_id));
+ y_increment = MAX(y_increment, texture_region_size.y);
}
// Draw the tile.
TileMap::draw_tile(alternatives_draw->get_canvas_item(), offset_pos, tile_set, source_id, atlas_coords, alternative_id);
// Increment the x position.
- current_pos.x += transposed ? texture_region.size.y : texture_region.size.x;
+ current_pos.x += transposed ? texture_region_size.y : texture_region_size.x;
}
if (alternatives_count > 1) {
current_pos.y += y_increment;
@@ -548,8 +559,6 @@ void TileAtlasView::_notification(int p_what) {
}
void TileAtlasView::_bind_methods() {
- ClassDB::bind_method("_gui_input", &TileAtlasView::_gui_input);
-
ADD_SIGNAL(MethodInfo("transform_changed", PropertyInfo(Variant::FLOAT, "zoom"), PropertyInfo(Variant::VECTOR2, "scroll")));
}
@@ -582,7 +591,7 @@ TileAtlasView::TileAtlasView() {
center_container = memnew(CenterContainer);
center_container->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
center_container->set_anchors_preset(Control::PRESET_CENTER);
- center_container->connect("gui_input", callable_mp(this, &TileAtlasView::_gui_input));
+ center_container->connect("gui_input", callable_mp(this, &TileAtlasView::gui_input));
panel->add_child(center_container);
missing_source_label = memnew(Label);
diff --git a/editor/plugins/tiles/tile_atlas_view.h b/editor/plugins/tiles/tile_atlas_view.h
index b2046f4322..5b0df366ae 100644
--- a/editor/plugins/tiles/tile_atlas_view.h
+++ b/editor/plugins/tiles/tile_atlas_view.h
@@ -62,7 +62,7 @@ private:
void _update_zoom_and_panning(bool p_zoom_on_mouse_pos = false);
void _zoom_widget_changed();
void _center_view();
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
Map<Vector2, Map<int, Rect2i>> alternative_tiles_rect_cache;
void _update_alternative_tiles_rect_cache();
diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp
index bab55df65a..5f72cfe313 100644
--- a/editor/plugins/tiles/tile_data_editors.cpp
+++ b/editor/plugins/tiles/tile_data_editors.cpp
@@ -110,7 +110,7 @@ void DummyObject::clear_dummy_properties() {
void GenericTilePolygonEditor::_base_control_draw() {
ERR_FAIL_COND(!tile_set.is_valid());
- real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
+ real_t grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius");
Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
const Ref<Texture2D> handle = get_theme_icon(SNAME("EditorPathSharpHandle"), SNAME("EditorIcons"));
@@ -124,7 +124,9 @@ void GenericTilePolygonEditor::_base_control_draw() {
base_control->draw_set_transform_matrix(xform);
// Draw the tile shape filled.
- tile_set->draw_tile_shape(base_control, Rect2(-tile_size / 2, tile_size), Color(1.0, 1.0, 1.0, 0.3), true);
+ Transform2D tile_xform;
+ tile_xform.set_scale(tile_size);
+ tile_set->draw_tile_shape(base_control, tile_xform, Color(1.0, 1.0, 1.0, 0.3), true);
// Draw the background.
if (background_texture.is_valid()) {
@@ -213,7 +215,7 @@ void GenericTilePolygonEditor::_base_control_draw() {
// Draw the tile shape line.
base_control->draw_set_transform_matrix(xform);
- tile_set->draw_tile_shape(base_control, Rect2(-tile_size / 2, tile_size), grid_color, false);
+ tile_set->draw_tile_shape(base_control, tile_xform, grid_color, false);
base_control->draw_set_transform_matrix(Transform2D());
}
@@ -229,10 +231,14 @@ void GenericTilePolygonEditor::_zoom_changed() {
void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) {
switch (p_item_pressed) {
- case RESET_TO_DEFAULT_TILE:
+ case RESET_TO_DEFAULT_TILE: {
undo_redo->create_action(TTR("Edit Polygons"));
undo_redo->add_do_method(this, "clear_polygons");
- undo_redo->add_do_method(this, "add_polygon", tile_set->get_tile_shape_polygon());
+ Vector<Vector2> polygon = tile_set->get_tile_shape_polygon();
+ for (int i = 0; i < polygon.size(); i++) {
+ polygon.write[i] = polygon[i] * tile_set->get_tile_size();
+ }
+ undo_redo->add_do_method(this, "add_polygon", polygon);
undo_redo->add_do_method(base_control, "update");
undo_redo->add_do_method(this, "emit_signal", "polygons_changed");
undo_redo->add_undo_method(this, "clear_polygons");
@@ -242,8 +248,8 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) {
undo_redo->add_undo_method(base_control, "update");
undo_redo->add_undo_method(this, "emit_signal", "polygons_changed");
undo_redo->commit_action(true);
- break;
- case CLEAR_TILE:
+ } break;
+ case CLEAR_TILE: {
undo_redo->create_action(TTR("Edit Polygons"));
undo_redo->add_do_method(this, "clear_polygons");
undo_redo->add_do_method(base_control, "update");
@@ -255,14 +261,14 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) {
undo_redo->add_undo_method(base_control, "update");
undo_redo->add_undo_method(this, "emit_signal", "polygons_changed");
undo_redo->commit_action(true);
- break;
+ } break;
default:
break;
}
}
void GenericTilePolygonEditor::_grab_polygon_point(Vector2 p_pos, const Transform2D &p_polygon_xform, int &r_polygon_index, int &r_point_index) {
- const real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
+ const real_t grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius");
r_polygon_index = -1;
r_point_index = -1;
float closest_distance = grab_threshold + 1.0;
@@ -280,7 +286,7 @@ void GenericTilePolygonEditor::_grab_polygon_point(Vector2 p_pos, const Transfor
}
void GenericTilePolygonEditor::_grab_polygon_segment_point(Vector2 p_pos, const Transform2D &p_polygon_xform, int &r_polygon_index, int &r_segment_index, Vector2 &r_point) {
- const real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
+ const real_t grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius");
Point2 point = p_polygon_xform.affine_inverse().xform(p_pos);
r_polygon_index = -1;
@@ -306,6 +312,9 @@ void GenericTilePolygonEditor::_snap_to_tile_shape(Point2 &r_point, float &r_cur
ERR_FAIL_COND(!tile_set.is_valid());
Vector<Point2> polygon = tile_set->get_tile_shape_polygon();
+ for (int i = 0; i < polygon.size(); i++) {
+ polygon.write[i] = polygon[i] * tile_set->get_tile_size();
+ }
Point2 snapped_point = r_point;
// Snap to polygon vertices.
@@ -340,7 +349,7 @@ void GenericTilePolygonEditor::_snap_to_half_pixel(Point2 &r_point) {
}
void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event) {
- real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
+ real_t grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius");
hovered_polygon_index = -1;
hovered_point_index = -1;
@@ -537,7 +546,11 @@ void GenericTilePolygonEditor::set_tile_set(Ref<TileSet> p_tile_set) {
// Set the default tile shape
clear_polygons();
if (p_tile_set.is_valid()) {
- add_polygon(p_tile_set->get_tile_shape_polygon());
+ Vector<Vector2> polygon = p_tile_set->get_tile_shape_polygon();
+ for (int i = 0; i < polygon.size(); i++) {
+ polygon.write[i] = polygon[i] * p_tile_set->get_tile_size();
+ }
+ add_polygon(polygon);
}
}
tile_set = p_tile_set;
@@ -620,7 +633,7 @@ void GenericTilePolygonEditor::_notification(int p_what) {
button_delete->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("CurveDelete"), SNAME("EditorIcons")));
button_center_view->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("CenterView"), SNAME("EditorIcons")));
button_pixel_snap->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Snap"), SNAME("EditorIcons")));
- button_advanced_menu->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("GuiTabMenu"), SNAME("EditorIcons")));
+ button_advanced_menu->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("GuiTabMenuHl"), SNAME("EditorIcons")));
break;
}
}
@@ -1072,14 +1085,15 @@ void TileDataTextureOffsetEditor::draw_over_tile(CanvasItem *p_canvas_item, Tran
ERR_FAIL_COND(!tile_data);
Vector2i tile_set_tile_size = tile_set->get_tile_size();
- Rect2i rect = Rect2i(-tile_set_tile_size / 2, tile_set_tile_size);
Color color = Color(1.0, 0.0, 0.0);
if (p_selected) {
Color grid_color = EditorSettings::get_singleton()->get("editors/tiles_editor/grid_color");
Color selection_color = Color().from_hsv(Math::fposmod(grid_color.get_h() + 0.5, 1.0), grid_color.get_s(), grid_color.get_v(), 1.0);
color = selection_color;
}
- tile_set->draw_tile_shape(p_canvas_item, p_transform.xform(rect), color);
+ Transform2D tile_xform;
+ tile_xform.set_scale(tile_set_tile_size);
+ tile_set->draw_tile_shape(p_canvas_item, p_transform * tile_xform, color);
}
void TileDataPositionEditor::draw_over_tile(CanvasItem *p_canvas_item, Transform2D p_transform, TileMapCell p_cell, bool p_selected) {
@@ -1262,17 +1276,21 @@ void TileDataCollisionEditor::_polygons_changed() {
}
Variant TileDataCollisionEditor::_get_painted_value() {
+ Dictionary dict;
+ dict["linear_velocity"] = dummy_object->get("linear_velocity");
+ dict["angular_velocity"] = dummy_object->get("angular_velocity");
Array array;
for (int i = 0; i < polygon_editor->get_polygon_count(); i++) {
ERR_FAIL_COND_V(polygon_editor->get_polygon(i).size() < 3, Variant());
- Dictionary dict;
- dict["points"] = polygon_editor->get_polygon(i);
- dict["one_way"] = dummy_object->get(vformat("polygon_%d_one_way", i));
- dict["one_way_margin"] = dummy_object->get(vformat("polygon_%d_one_way_margin", i));
- array.push_back(dict);
+ Dictionary polygon_dict;
+ polygon_dict["points"] = polygon_editor->get_polygon(i);
+ polygon_dict["one_way"] = dummy_object->get(vformat("polygon_%d_one_way", i));
+ polygon_dict["one_way_margin"] = dummy_object->get(vformat("polygon_%d_one_way_margin", i));
+ array.push_back(polygon_dict);
}
+ dict["polygons"] = array;
- return array;
+ return dict;
}
void TileDataCollisionEditor::_set_painted_value(TileSetAtlasSource *p_tile_set_atlas_source, Vector2 p_coords, int p_alternative_tile) {
@@ -1288,6 +1306,8 @@ void TileDataCollisionEditor::_set_painted_value(TileSetAtlasSource *p_tile_set_
}
_polygons_changed();
+ dummy_object->set("linear_velocity", tile_data->get_constant_linear_velocity(physics_layer));
+ dummy_object->set("angular_velocity", tile_data->get_constant_angular_velocity(physics_layer));
for (int i = 0; i < tile_data->get_collision_polygons_count(physics_layer); i++) {
dummy_object->set(vformat("polygon_%d_one_way", i), tile_data->is_collision_polygon_one_way(physics_layer, i));
dummy_object->set(vformat("polygon_%d_one_way_margin", i), tile_data->get_collision_polygon_one_way_margin(physics_layer, i));
@@ -1303,13 +1323,16 @@ void TileDataCollisionEditor::_set_value(TileSetAtlasSource *p_tile_set_atlas_so
TileData *tile_data = Object::cast_to<TileData>(p_tile_set_atlas_source->get_tile_data(p_coords, p_alternative_tile));
ERR_FAIL_COND(!tile_data);
- Array array = p_value;
+ Dictionary dict = p_value;
+ tile_data->set_constant_linear_velocity(physics_layer, dict["linear_velocity"]);
+ tile_data->set_constant_angular_velocity(physics_layer, dict["angular_velocity"]);
+ Array array = dict["polygons"];
tile_data->set_collision_polygons_count(physics_layer, array.size());
for (int i = 0; i < array.size(); i++) {
- Dictionary dict = array[i];
- tile_data->set_collision_polygon_points(physics_layer, i, dict["points"]);
- tile_data->set_collision_polygon_one_way(physics_layer, i, dict["one_way"]);
- tile_data->set_collision_polygon_one_way_margin(physics_layer, i, dict["one_way_margin"]);
+ Dictionary polygon_dict = array[i];
+ tile_data->set_collision_polygon_points(physics_layer, i, polygon_dict["points"]);
+ tile_data->set_collision_polygon_one_way(physics_layer, i, polygon_dict["one_way"]);
+ tile_data->set_collision_polygon_one_way_margin(physics_layer, i, polygon_dict["one_way_margin"]);
}
polygon_editor->set_background(p_tile_set_atlas_source->get_texture(), p_tile_set_atlas_source->get_tile_texture_region(p_coords), p_tile_set_atlas_source->get_tile_effective_texture_offset(p_coords, p_alternative_tile), tile_data->get_flip_h(), tile_data->get_flip_v(), tile_data->get_transpose(), tile_data->get_modulate());
@@ -1319,15 +1342,19 @@ Variant TileDataCollisionEditor::_get_value(TileSetAtlasSource *p_tile_set_atlas
TileData *tile_data = Object::cast_to<TileData>(p_tile_set_atlas_source->get_tile_data(p_coords, p_alternative_tile));
ERR_FAIL_COND_V(!tile_data, Variant());
+ Dictionary dict;
+ dict["linear_velocity"] = tile_data->get_constant_linear_velocity(physics_layer);
+ dict["angular_velocity"] = tile_data->get_constant_angular_velocity(physics_layer);
Array array;
for (int i = 0; i < tile_data->get_collision_polygons_count(physics_layer); i++) {
- Dictionary dict;
- dict["points"] = tile_data->get_collision_polygon_points(physics_layer, i);
- dict["one_way"] = tile_data->is_collision_polygon_one_way(physics_layer, i);
- dict["one_way_margin"] = tile_data->get_collision_polygon_one_way_margin(physics_layer, i);
- array.push_back(dict);
+ Dictionary polygon_dict;
+ polygon_dict["points"] = tile_data->get_collision_polygon_points(physics_layer, i);
+ polygon_dict["one_way"] = tile_data->is_collision_polygon_one_way(physics_layer, i);
+ polygon_dict["one_way_margin"] = tile_data->get_collision_polygon_one_way_margin(physics_layer, i);
+ array.push_back(polygon_dict);
}
- return array;
+ dict["polygons"] = array;
+ return dict;
}
void TileDataCollisionEditor::_setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) {
@@ -1375,6 +1402,27 @@ TileDataCollisionEditor::TileDataCollisionEditor() {
polygon_editor->connect("polygons_changed", callable_mp(this, &TileDataCollisionEditor::_polygons_changed));
add_child(polygon_editor);
+ dummy_object->add_dummy_property("linear_velocity");
+ dummy_object->set("linear_velocity", Vector2());
+ dummy_object->add_dummy_property("angular_velocity");
+ dummy_object->set("angular_velocity", 0.0);
+
+ EditorProperty *linear_velocity_editor = EditorInspectorDefaultPlugin::get_editor_for_property(dummy_object, Variant::VECTOR2, "linear_velocity", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT);
+ linear_velocity_editor->set_object_and_property(dummy_object, "linear_velocity");
+ linear_velocity_editor->set_label("linear_velocity");
+ linear_velocity_editor->connect("property_changed", callable_mp(this, &TileDataCollisionEditor::_property_value_changed).unbind(1));
+ linear_velocity_editor->update_property();
+ add_child(linear_velocity_editor);
+ property_editors["linear_velocity"] = linear_velocity_editor;
+
+ EditorProperty *angular_velocity_editor = EditorInspectorDefaultPlugin::get_editor_for_property(dummy_object, Variant::FLOAT, "angular_velocity", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT);
+ angular_velocity_editor->set_object_and_property(dummy_object, "angular_velocity");
+ angular_velocity_editor->set_label("angular_velocity");
+ angular_velocity_editor->connect("property_changed", callable_mp(this, &TileDataCollisionEditor::_property_value_changed).unbind(1));
+ angular_velocity_editor->update_property();
+ add_child(angular_velocity_editor);
+ property_editors["angular_velocity"] = linear_velocity_editor;
+
_polygons_changed();
}
@@ -1465,12 +1513,13 @@ void TileDataTerrainsEditor::_tile_set_changed() {
ERR_FAIL_COND(!tile_set.is_valid());
// Fix if wrong values are selected.
- if (int(dummy_object->get("terrain_set")) > tile_set->get_terrain_sets_count()) {
+ int terrain_set = int(dummy_object->get("terrain_set"));
+ if (terrain_set >= tile_set->get_terrain_sets_count()) {
+ terrain_set = -1;
dummy_object->set("terrain_set", -1);
}
- int terrain_set = int(dummy_object->get("terrain"));
if (terrain_set >= 0) {
- if (int(dummy_object->get("terrain")) > tile_set->get_terrains_count(terrain_set)) {
+ if (int(dummy_object->get("terrain")) >= tile_set->get_terrains_count(terrain_set)) {
dummy_object->set("terrain", -1);
}
}
@@ -1491,7 +1540,7 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas
TileData *tile_data = Object::cast_to<TileData>(p_tile_set_atlas_source->get_tile_data(hovered_coords, 0));
int terrain_set = tile_data->get_terrain_set();
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(hovered_coords);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + p_tile_set_atlas_source->get_tile_effective_texture_offset(hovered_coords, 0);
+ Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(hovered_coords, 0);
if (terrain_set >= 0 && terrain_set == int(dummy_object->get("terrain_set"))) {
// Draw hovered bit.
@@ -1513,9 +1562,10 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas
}
} else {
// Draw hovered tile.
- Vector2i tile_size = tile_set->get_tile_size();
- Rect2i rect = p_transform.xform(Rect2i(position - tile_size / 2, tile_size));
- tile_set->draw_tile_shape(p_canvas_item, rect, Color(1.0, 1.0, 1.0, 0.5), true);
+ Transform2D tile_xform;
+ tile_xform.set_origin(position);
+ tile_xform.set_scale(tile_set->get_tile_size());
+ tile_set->draw_tile_shape(p_canvas_item, p_transform * tile_xform, Color(1.0, 1.0, 1.0, 0.5), true);
}
}
}
@@ -1535,7 +1585,7 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas
// Text
p_canvas_item->draw_set_transform_matrix(Transform2D());
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
Color color = Color(1, 1, 1);
String text;
@@ -1627,7 +1677,7 @@ void TileDataTerrainsEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas
Vector2i coords = E->get().get_atlas_coords();
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
@@ -1663,7 +1713,7 @@ void TileDataTerrainsEditor::forward_draw_over_alternatives(TileAtlasView *p_til
TileData *tile_data = Object::cast_to<TileData>(p_tile_set_atlas_source->get_tile_data(hovered_coords, hovered_alternative));
int terrain_set = tile_data->get_terrain_set();
Rect2i texture_region = p_tile_atlas_view->get_alternative_tile_rect(hovered_coords, hovered_alternative);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + p_tile_set_atlas_source->get_tile_effective_texture_offset(hovered_coords, hovered_alternative);
+ Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(hovered_coords, hovered_alternative);
if (terrain_set == int(dummy_object->get("terrain_set"))) {
// Draw hovered bit.
@@ -1685,9 +1735,10 @@ void TileDataTerrainsEditor::forward_draw_over_alternatives(TileAtlasView *p_til
}
} else {
// Draw hovered tile.
- Vector2i tile_size = tile_set->get_tile_size();
- Rect2i rect = p_transform.xform(Rect2i(position - tile_size / 2, tile_size));
- tile_set->draw_tile_shape(p_canvas_item, rect, Color(1.0, 1.0, 1.0, 0.5), true);
+ Transform2D tile_xform;
+ tile_xform.set_origin(position);
+ tile_xform.set_scale(tile_set->get_tile_size());
+ tile_set->draw_tile_shape(p_canvas_item, p_transform * tile_xform, Color(1.0, 1.0, 1.0, 0.5), true);
}
}
}
@@ -1709,7 +1760,7 @@ void TileDataTerrainsEditor::forward_draw_over_alternatives(TileAtlasView *p_til
// Text
p_canvas_item->draw_set_transform_matrix(Transform2D());
Rect2i texture_region = p_tile_atlas_view->get_alternative_tile_rect(coords, alternative_tile);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
Color color = Color(1, 1, 1);
String text;
@@ -1790,7 +1841,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
// Set the terrains bits.
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
for (int j = 0; j < TileSet::CELL_NEIGHBOR_MAX; j++) {
TileSet::CellNeighbor bit = TileSet::CellNeighbor(j);
if (tile_data->is_valid_peering_bit_terrain(bit)) {
@@ -1818,7 +1869,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
TileData *tile_data = Object::cast_to<TileData>(p_tile_set_atlas_source->get_tile_data(coords, 0));
int terrain_set = tile_data->get_terrain_set();
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
dummy_object->set("terrain_set", terrain_set);
dummy_object->set("terrain", -1);
for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
@@ -1916,7 +1967,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
// Set the terrain bit.
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
@@ -2049,7 +2100,7 @@ void TileDataTerrainsEditor::forward_painting_atlas_gui_input(TileAtlasView *p_t
TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
if (tile_set->is_valid_peering_bit_terrain(terrain_set, bit)) {
Rect2i texture_region = p_tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
Vector<Vector2> polygon = tile_set->get_terrain_bit_polygon(terrain_set, bit);
for (int j = 0; j < polygon.size(); j++) {
@@ -2132,7 +2183,7 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi
// Set the terrains bits.
Rect2i texture_region = p_tile_atlas_view->get_alternative_tile_rect(coords, alternative_tile);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative_tile);
+ Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative_tile);
for (int j = 0; j < TileSet::CELL_NEIGHBOR_MAX; j++) {
TileSet::CellNeighbor bit = TileSet::CellNeighbor(j);
if (tile_data->is_valid_peering_bit_terrain(bit)) {
@@ -2161,7 +2212,7 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi
TileData *tile_data = Object::cast_to<TileData>(p_tile_set_atlas_source->get_tile_data(coords, alternative_tile));
int terrain_set = tile_data->get_terrain_set();
Rect2i texture_region = p_tile_atlas_view->get_alternative_tile_rect(coords, alternative_tile);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative_tile);
+ Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative_tile);
dummy_object->set("terrain_set", terrain_set);
dummy_object->set("terrain", -1);
for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
@@ -2236,7 +2287,7 @@ void TileDataTerrainsEditor::forward_painting_alternatives_gui_input(TileAtlasVi
// Set the terrain bit.
Rect2i texture_region = p_tile_atlas_view->get_alternative_tile_rect(coords, alternative_tile);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative_tile);
+ Vector2i position = texture_region.get_center() + p_tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative_tile);
for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
TileSet::CellNeighbor bit = TileSet::CellNeighbor(i);
if (tile_set->is_valid_peering_bit_terrain(terrain_set, bit)) {
diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp
index 77084f551a..a248f23517 100644
--- a/editor/plugins/tiles/tile_map_editor.cpp
+++ b/editor/plugins/tiles/tile_map_editor.cpp
@@ -636,8 +636,10 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over
for (int y = rect.position.y; y < rect.get_end().y; y++) {
Vector2i coords = Vector2i(x, y);
if (tile_map->get_cell_source_id(tile_map_layer, coords) != TileSet::INVALID_SOURCE) {
- Rect2 cell_region = xform.xform(Rect2(tile_map->map_to_world(coords) - tile_shape_size / 2, tile_shape_size));
- tile_set->draw_tile_shape(p_overlay, cell_region, Color(1.0, 1.0, 1.0), false);
+ Transform2D tile_xform;
+ tile_xform.set_origin(tile_map->map_to_world(coords));
+ tile_xform.set_scale(tile_shape_size);
+ tile_set->draw_tile_shape(p_overlay, xform * tile_xform, Color(1.0, 1.0, 1.0), false);
}
}
}
@@ -734,10 +736,12 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over
float bottom_opacity = CLAMP(Math::inverse_lerp((float)drawn_grid_rect.size.y, (float)(drawn_grid_rect.size.y - fading), (float)pos_in_rect.y), 0.0f, 1.0f);
float opacity = CLAMP(MIN(left_opacity, MIN(right_opacity, MIN(top_opacity, bottom_opacity))) + 0.1, 0.0f, 1.0f);
- Rect2 cell_region = xform.xform(Rect2(tile_map->map_to_world(Vector2(x, y)) - tile_shape_size / 2, tile_shape_size));
+ Transform2D tile_xform;
+ tile_xform.set_origin(tile_map->map_to_world(Vector2(x, y)));
+ tile_xform.set_scale(tile_shape_size);
Color color = grid_color;
color.a = color.a * opacity;
- tile_set->draw_tile_shape(p_overlay, cell_region, color, false);
+ tile_set->draw_tile_shape(p_overlay, xform * tile_xform, color, false);
}
}
}
@@ -745,11 +749,11 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over
// Draw the preview.
for (Map<Vector2i, TileMapCell>::Element *E = preview.front(); E; E = E->next()) {
- Vector2i size = tile_set->get_tile_size();
- Vector2 position = tile_map->map_to_world(E->key()) - size / 2;
- Rect2 cell_region = xform.xform(Rect2(position, size));
+ Transform2D tile_xform;
+ tile_xform.set_origin(tile_map->map_to_world(E->key()));
+ tile_xform.set_scale(tile_set->get_tile_size());
if (!erase_button->is_pressed() && random_tile_checkbox->is_pressed()) {
- tile_set->draw_tile_shape(p_overlay, cell_region, Color(1.0, 1.0, 1.0, 0.5), true);
+ tile_set->draw_tile_shape(p_overlay, xform * tile_xform, Color(1.0, 1.0, 1.0, 0.5), true);
} else {
if (tile_set->has_source(E->get().source_id)) {
TileSetSource *source = *tile_set->get_source(E->get().source_id);
@@ -786,15 +790,15 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over
// Get the tile modulation.
Color modulate = tile_data->get_modulate();
Color self_modulate = tile_map->get_self_modulate();
- modulate = Color(modulate.r * self_modulate.r, modulate.g * self_modulate.g, modulate.b * self_modulate.b, modulate.a * self_modulate.a);
+ modulate *= self_modulate;
// Draw the tile.
p_overlay->draw_texture_rect_region(atlas_source->get_texture(), dest_rect, source_rect, modulate * Color(1.0, 1.0, 1.0, 0.5), transpose, tile_set->is_uv_clipping());
} else {
- tile_set->draw_tile_shape(p_overlay, cell_region, Color(1.0, 1.0, 1.0, 0.5), true);
+ tile_set->draw_tile_shape(p_overlay, xform * tile_xform, Color(1.0, 1.0, 1.0, 0.5), true);
}
} else {
- tile_set->draw_tile_shape(p_overlay, cell_region, Color(0.0, 0.0, 0.0, 0.5), true);
+ tile_set->draw_tile_shape(p_overlay, xform * tile_xform, Color(0.0, 0.0, 0.0, 0.5), true);
}
}
}
@@ -1037,7 +1041,7 @@ Map<Vector2i, TileMapCell> TileMapEditorTilesPlugin::_draw_bucket_fill(Vector2i
TypedArray<Vector2i> to_check;
if (source.source_id == TileSet::INVALID_SOURCE) {
Rect2i rect = tile_map->get_used_rect();
- if (rect.size.x <= 0 || rect.size.y <= 0) {
+ if (rect.has_no_area()) {
rect = Rect2i(p_coords, Vector2i(1, 1));
}
for (int x = boundaries.position.x; x < boundaries.get_end().x; x++) {
@@ -1452,13 +1456,25 @@ void TileMapEditorTilesPlugin::_tile_atlas_control_draw() {
Color selection_color = Color().from_hsv(Math::fposmod(grid_color.get_h() + 0.5, 1.0), grid_color.get_s(), grid_color.get_v(), 1.0);
for (Set<TileMapCell>::Element *E = tile_set_selection.front(); E; E = E->next()) {
if (E->get().source_id == source_id && E->get().alternative_tile == 0) {
- tile_atlas_control->draw_rect(atlas->get_tile_texture_region(E->get().get_atlas_coords()), selection_color, false);
+ for (int frame = 0; frame < atlas->get_tile_animation_frames_count(E->get().get_atlas_coords()); frame++) {
+ Color color = selection_color;
+ if (frame > 0) {
+ color.a *= 0.3;
+ }
+ tile_atlas_control->draw_rect(atlas->get_tile_texture_region(E->get().get_atlas_coords(), frame), color, false);
+ }
}
}
// Draw the hovered tile.
if (hovered_tile.get_atlas_coords() != TileSetSource::INVALID_ATLAS_COORDS && hovered_tile.alternative_tile == 0 && !tile_set_dragging_selection) {
- tile_atlas_control->draw_rect(atlas->get_tile_texture_region(hovered_tile.get_atlas_coords()), Color(1.0, 1.0, 1.0), false);
+ for (int frame = 0; frame < atlas->get_tile_animation_frames_count(hovered_tile.get_atlas_coords()); frame++) {
+ Color color = Color(1.0, 1.0, 1.0);
+ if (frame > 0) {
+ color.a *= 0.3;
+ }
+ tile_atlas_control->draw_rect(atlas->get_tile_texture_region(hovered_tile.get_atlas_coords(), frame), color, false);
+ }
}
// Draw the selection rect.
@@ -3177,7 +3193,7 @@ TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() {
paint_tool_button->set_toggle_mode(true);
paint_tool_button->set_button_group(tool_buttons_group);
paint_tool_button->set_pressed(true);
- paint_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/paint_tool", "Paint", KEY_E));
+ paint_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/paint_tool", "Paint", KEY_D));
paint_tool_button->connect("pressed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_toolbar));
tilemap_tiles_tools_buttons->add_child(paint_tool_button);
@@ -3549,30 +3565,76 @@ void TileMapEditor::_update_layers_selection() {
tile_map_editor_plugins[tabs->get_current_tab()]->edit(tile_map_id, tile_map_layer);
}
-void TileMapEditor::_undo_redo_inspector_callback(Object *p_undo_redo, Object *p_edited, String p_property, Variant p_new_value) {
+void TileMapEditor::_move_tile_map_array_element(Object *p_undo_redo, Object *p_edited, String p_array_prefix, int p_from_index, int p_to_pos) {
UndoRedo *undo_redo = Object::cast_to<UndoRedo>(p_undo_redo);
ERR_FAIL_COND(!undo_redo);
TileMap *tile_map = Object::cast_to<TileMap>(p_edited);
- if (tile_map) {
- if (p_property == "layers_count") {
- int new_layers_count = (int)p_new_value;
- if (new_layers_count < tile_map->get_layers_count()) {
- List<PropertyInfo> property_list;
- tile_map->get_property_list(&property_list);
-
- for (PropertyInfo property_info : property_list) {
- Vector<String> components = String(property_info.name).split("/", true, 2);
- if (components.size() == 2 && components[0].begins_with("layer_") && components[0].trim_prefix("layer_").is_valid_int()) {
- int index = components[0].trim_prefix("layer_").to_int();
- if (index >= new_layers_count) {
- undo_redo->add_undo_property(tile_map, property_info.name, tile_map->get(property_info.name));
- }
- }
+ if (!tile_map) {
+ return;
+ }
+
+ // Compute the array indices to save.
+ int begin = 0;
+ int end;
+ if (p_array_prefix == "layer_") {
+ end = tile_map->get_layers_count();
+ } else {
+ ERR_FAIL_MSG("Invalid array prefix for TileSet.");
+ }
+ if (p_from_index < 0) {
+ // Adding new.
+ if (p_to_pos >= 0) {
+ begin = p_to_pos;
+ } else {
+ end = 0; // Nothing to save when adding at the end.
+ }
+ } else if (p_to_pos < 0) {
+ // Removing.
+ begin = p_from_index;
+ } else {
+ // Moving.
+ begin = MIN(p_from_index, p_to_pos);
+ end = MIN(MAX(p_from_index, p_to_pos) + 1, end);
+ }
+
+#define ADD_UNDO(obj, property) undo_redo->add_undo_property(obj, property, obj->get(property));
+ // Save layers' properties.
+ if (p_from_index < 0) {
+ undo_redo->add_undo_method(tile_map, "remove_layer", p_to_pos < 0 ? tile_map->get_layers_count() : p_to_pos);
+ } else if (p_to_pos < 0) {
+ undo_redo->add_undo_method(tile_map, "add_layer", p_from_index);
+ }
+
+ List<PropertyInfo> properties;
+ tile_map->get_property_list(&properties);
+ for (PropertyInfo pi : properties) {
+ if (pi.name.begins_with(p_array_prefix)) {
+ String str = pi.name.trim_prefix(p_array_prefix);
+ int to_char_index = 0;
+ while (to_char_index < str.length()) {
+ if (str[to_char_index] < '0' || str[to_char_index] > '9') {
+ break;
+ }
+ to_char_index++;
+ }
+ if (to_char_index > 0) {
+ int array_index = str.left(to_char_index).to_int();
+ if (array_index >= begin && array_index < end) {
+ ADD_UNDO(tile_map, pi.name);
}
}
}
}
+#undef ADD_UNDO
+
+ if (p_from_index < 0) {
+ undo_redo->add_do_method(tile_map, "add_layer", p_to_pos);
+ } else if (p_to_pos < 0) {
+ undo_redo->add_do_method(tile_map, "remove_layer", p_from_index);
+ } else {
+ undo_redo->add_do_method(tile_map, "move_layer", p_from_index, p_to_pos);
+ }
}
bool TileMapEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_event) {
@@ -3643,8 +3705,10 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
0.8);
// Draw the scaled tile.
- Rect2 cell_region = xform.xform(Rect2(tile_map->map_to_world(coords) - Vector2(tile_shape_size) / 2, Vector2(tile_shape_size)));
- tile_set->draw_tile_shape(p_overlay, cell_region, color, true, warning_pattern_texture);
+ Transform2D tile_xform;
+ tile_xform.set_origin(tile_map->map_to_world(coords));
+ tile_xform.set_scale(tile_shape_size);
+ tile_set->draw_tile_shape(p_overlay, xform * tile_xform, color, true, warning_pattern_texture);
}
// Draw the warning icon.
@@ -3700,10 +3764,12 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) {
float bottom_opacity = CLAMP(Math::inverse_lerp((float)displayed_rect.size.y, (float)(displayed_rect.size.y - fading), (float)pos_in_rect.y), 0.0f, 1.0f);
float opacity = CLAMP(MIN(left_opacity, MIN(right_opacity, MIN(top_opacity, bottom_opacity))) + 0.1, 0.0f, 1.0f);
- Rect2 cell_region = xform.xform(Rect2(tile_map->map_to_world(Vector2(x, y)) - tile_shape_size / 2, tile_shape_size));
+ Transform2D tile_xform;
+ tile_xform.set_origin(tile_map->map_to_world(Vector2(x, y)));
+ tile_xform.set_scale(tile_shape_size);
Color color = grid_color;
color.a = color.a * opacity;
- tile_set->draw_tile_shape(p_overlay, cell_region, color, false);
+ tile_set->draw_tile_shape(p_overlay, xform * tile_xform, color, false);
}
}
}
@@ -3851,7 +3917,7 @@ TileMapEditor::TileMapEditor() {
_tab_changed(0);
// Registers UndoRedo inspector callback.
- EditorNode::get_singleton()->get_editor_data().add_undo_redo_inspector_hook_callback(callable_mp(this, &TileMapEditor::_undo_redo_inspector_callback));
+ EditorNode::get_singleton()->get_editor_data().add_move_array_element_function(SNAME("TileMap"), callable_mp(this, &TileMapEditor::_move_tile_map_array_element));
}
TileMapEditor::~TileMapEditor() {
diff --git a/editor/plugins/tiles/tile_map_editor.h b/editor/plugins/tiles/tile_map_editor.h
index 6e2f2ce2ba..6126db59e9 100644
--- a/editor/plugins/tiles/tile_map_editor.h
+++ b/editor/plugins/tiles/tile_map_editor.h
@@ -341,7 +341,7 @@ private:
void _update_layers_selection();
// Inspector undo/redo callback.
- void _undo_redo_inspector_callback(Object *p_undo_redo, Object *p_edited, String p_property, Variant p_new_value);
+ void _move_tile_map_array_element(Object *p_undo_redo, Object *p_edited, String p_array_prefix, int p_from_index, int p_to_pos);
protected:
void _notification(int p_what);
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
index 432f48fa85..1f1408016b 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
@@ -87,7 +87,7 @@ void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_get_property_list
p_list->push_back(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"));
p_list->push_back(PropertyInfo(Variant::VECTOR2I, "margins", PROPERTY_HINT_NONE, ""));
p_list->push_back(PropertyInfo(Variant::VECTOR2I, "separation", PROPERTY_HINT_NONE, ""));
- p_list->push_back(PropertyInfo(Variant::VECTOR2I, "tile_size", PROPERTY_HINT_NONE, ""));
+ p_list->push_back(PropertyInfo(Variant::VECTOR2I, "texture_region_size", PROPERTY_HINT_NONE, ""));
}
void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_bind_methods() {
@@ -135,45 +135,81 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_set(const StringName &p_na
const Vector2i &coords = tiles.front()->get().tile;
const int &alternative = tiles.front()->get().alternative;
- if (alternative == 0 && p_name == "atlas_coords") {
- Vector2i as_vector2i = Vector2i(p_value);
- ERR_FAIL_COND_V(!tile_set_atlas_source->can_move_tile_in_atlas(coords, as_vector2i), false);
+ if (alternative == 0) {
+ Vector<String> components = String(p_name).split("/", true, 2);
+ if (p_name == "atlas_coords") {
+ Vector2i as_vector2i = Vector2i(p_value);
+ bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(as_vector2i, tile_set_atlas_source->get_tile_size_in_atlas(coords), tile_set_atlas_source->get_tile_animation_columns(coords), tile_set_atlas_source->get_tile_animation_separation(coords), tile_set_atlas_source->get_tile_animation_frames_count(coords), coords);
+ ERR_FAIL_COND_V(!has_room_for_tile, false);
+
+ if (tiles_set_atlas_source_editor->selection.front()->get().tile == coords) {
+ tiles_set_atlas_source_editor->selection.clear();
+ tiles_set_atlas_source_editor->selection.insert({ as_vector2i, 0 });
+ tiles_set_atlas_source_editor->_update_tile_id_label();
+ }
- if (tiles_set_atlas_source_editor->selection.front()->get().tile == coords) {
- tiles_set_atlas_source_editor->selection.clear();
- tiles_set_atlas_source_editor->selection.insert({ as_vector2i, 0 });
- tiles_set_atlas_source_editor->_update_tile_id_label();
+ tile_set_atlas_source->move_tile_in_atlas(coords, as_vector2i);
+ tiles.clear();
+ tiles.insert({ as_vector2i, 0 });
+ emit_signal(SNAME("changed"), "atlas_coords");
+ return true;
+ } else if (p_name == "size_in_atlas") {
+ Vector2i as_vector2i = Vector2i(p_value);
+ bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(coords, as_vector2i, tile_set_atlas_source->get_tile_animation_columns(coords), tile_set_atlas_source->get_tile_animation_separation(coords), tile_set_atlas_source->get_tile_animation_frames_count(coords), coords);
+ ERR_FAIL_COND_V(!has_room_for_tile, false);
+ tile_set_atlas_source->move_tile_in_atlas(coords, TileSetSource::INVALID_ATLAS_COORDS, as_vector2i);
+ emit_signal(SNAME("changed"), "size_in_atlas");
+ return true;
+ } else if (p_name == "animation_columns") {
+ bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(coords, tile_set_atlas_source->get_tile_size_in_atlas(coords), p_value, tile_set_atlas_source->get_tile_animation_separation(coords), tile_set_atlas_source->get_tile_animation_frames_count(coords), coords);
+ ERR_FAIL_COND_V(!has_room_for_tile, false);
+ tile_set_atlas_source->set_tile_animation_columns(coords, p_value);
+ emit_signal(SNAME("changed"), "animation_columns");
+ return true;
+ } else if (p_name == "animation_separation") {
+ bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(coords, tile_set_atlas_source->get_tile_size_in_atlas(coords), tile_set_atlas_source->get_tile_animation_columns(coords), p_value, tile_set_atlas_source->get_tile_animation_frames_count(coords), coords);
+ ERR_FAIL_COND_V(!has_room_for_tile, false);
+ tile_set_atlas_source->set_tile_animation_separation(coords, p_value);
+ emit_signal(SNAME("changed"), "animation_separation");
+ return true;
+ } else if (p_name == "animation_speed") {
+ tile_set_atlas_source->set_tile_animation_speed(coords, p_value);
+ emit_signal(SNAME("changed"), "animation_speed");
+ return true;
+ } else if (p_name == "animation_frames_count") {
+ bool has_room_for_tile = tile_set_atlas_source->has_room_for_tile(coords, tile_set_atlas_source->get_tile_size_in_atlas(coords), tile_set_atlas_source->get_tile_animation_columns(coords), tile_set_atlas_source->get_tile_animation_separation(coords), p_value, coords);
+ ERR_FAIL_COND_V(!has_room_for_tile, false);
+ tile_set_atlas_source->set_tile_animation_frames_count(coords, p_value);
+ notify_property_list_changed();
+ emit_signal(SNAME("changed"), "animation_separation");
+ return true;
+ } else if (components.size() == 2 && components[0].begins_with("animation_frame_") && components[0].trim_prefix("animation_frame_").is_valid_int()) {
+ int frame = components[0].trim_prefix("animation_frame_").to_int();
+ ERR_FAIL_INDEX_V(frame, tile_set_atlas_source->get_tile_animation_frames_count(coords), false);
+ if (components[1] == "duration") {
+ tile_set_atlas_source->set_tile_animation_frame_duration(coords, frame, p_value);
+ return true;
+ }
}
+ } else if (alternative > 0) {
+ if (p_name == "alternative_id") {
+ int as_int = int(p_value);
+ ERR_FAIL_COND_V(as_int < 0, false);
+ ERR_FAIL_COND_V_MSG(tile_set_atlas_source->has_alternative_tile(coords, as_int), false, vformat("Cannot change alternative tile ID. Another alternative exists with id %d for tile at coords %s.", as_int, coords));
+
+ if (tiles_set_atlas_source_editor->selection.front()->get().alternative == alternative) {
+ tiles_set_atlas_source_editor->selection.clear();
+ tiles_set_atlas_source_editor->selection.insert({ coords, as_int });
+ }
- tile_set_atlas_source->move_tile_in_atlas(coords, as_vector2i);
- tiles.clear();
- tiles.insert({ as_vector2i, 0 });
- emit_signal(SNAME("changed"), "atlas_coords");
- return true;
- } else if (alternative == 0 && p_name == "size_in_atlas") {
- Vector2i as_vector2i = Vector2i(p_value);
- ERR_FAIL_COND_V(!tile_set_atlas_source->can_move_tile_in_atlas(coords, TileSetSource::INVALID_ATLAS_COORDS, as_vector2i), false);
+ int previous_alternative_tile = alternative;
+ tiles.clear();
+ tiles.insert({ coords, as_int }); // tiles must be updated before.
+ tile_set_atlas_source->set_alternative_tile_id(coords, previous_alternative_tile, as_int);
- tile_set_atlas_source->move_tile_in_atlas(coords, TileSetSource::INVALID_ATLAS_COORDS, as_vector2i);
- emit_signal(SNAME("changed"), "size_in_atlas");
- return true;
- } else if (alternative > 0 && p_name == "alternative_id") {
- int as_int = int(p_value);
- ERR_FAIL_COND_V(as_int < 0, false);
- ERR_FAIL_COND_V_MSG(tile_set_atlas_source->has_alternative_tile(coords, as_int), false, vformat("Cannot change alternative tile ID. Another alternative exists with id %d for tile at coords %s.", as_int, coords));
-
- if (tiles_set_atlas_source_editor->selection.front()->get().alternative == alternative) {
- tiles_set_atlas_source_editor->selection.clear();
- tiles_set_atlas_source_editor->selection.insert({ coords, as_int });
+ emit_signal(SNAME("changed"), "alternative_id");
+ return true;
}
-
- int previous_alternative_tile = alternative;
- tiles.clear();
- tiles.insert({ coords, as_int }); // tiles must be updated before.
- tile_set_atlas_source->set_alternative_tile_id(coords, previous_alternative_tile, as_int);
-
- emit_signal(SNAME("changed"), "alternative_id");
- return true;
}
}
@@ -206,15 +242,41 @@ bool TileSetAtlasSourceEditor::AtlasTileProxyObject::_get(const StringName &p_na
const Vector2i &coords = tiles.front()->get().tile;
const int &alternative = tiles.front()->get().alternative;
- if (alternative == 0 && p_name == "atlas_coords") {
- r_ret = coords;
- return true;
- } else if (alternative == 0 && p_name == "size_in_atlas") {
- r_ret = tile_set_atlas_source->get_tile_size_in_atlas(coords);
- return true;
- } else if (alternative > 0 && p_name == "alternative_id") {
- r_ret = alternative;
- return true;
+ if (alternative == 0) {
+ Vector<String> components = String(p_name).split("/", true, 2);
+ if (p_name == "atlas_coords") {
+ r_ret = coords;
+ return true;
+ } else if (p_name == "size_in_atlas") {
+ r_ret = tile_set_atlas_source->get_tile_size_in_atlas(coords);
+ return true;
+ } else if (p_name == "animation_columns") {
+ r_ret = tile_set_atlas_source->get_tile_animation_columns(coords);
+ return true;
+ } else if (p_name == "animation_separation") {
+ r_ret = tile_set_atlas_source->get_tile_animation_separation(coords);
+ return true;
+ } else if (p_name == "animation_speed") {
+ r_ret = tile_set_atlas_source->get_tile_animation_speed(coords);
+ return true;
+ } else if (p_name == "animation_frames_count") {
+ r_ret = tile_set_atlas_source->get_tile_animation_frames_count(coords);
+ return true;
+ } else if (components.size() == 2 && components[0].begins_with("animation_frame_") && components[0].trim_prefix("animation_frame_").is_valid_int()) {
+ int frame = components[0].trim_prefix("animation_frame_").to_int();
+ if (components[1] == "duration") {
+ if (frame < 0 || frame >= tile_set_atlas_source->get_tile_animation_frames_count(coords)) {
+ return false;
+ }
+ r_ret = tile_set_atlas_source->get_tile_animation_frame_duration(coords, frame);
+ return true;
+ }
+ }
+ } else if (alternative > 0) {
+ if (p_name == "alternative_id") {
+ r_ret = alternative;
+ return true;
+ }
}
}
@@ -246,6 +308,20 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro
if (tiles.front()->get().alternative == 0) {
p_list->push_back(PropertyInfo(Variant::VECTOR2I, "atlas_coords", PROPERTY_HINT_NONE, ""));
p_list->push_back(PropertyInfo(Variant::VECTOR2I, "size_in_atlas", PROPERTY_HINT_NONE, ""));
+
+ // Animation.
+ p_list->push_back(PropertyInfo(Variant::NIL, "Animation", PROPERTY_HINT_NONE, "animation_", PROPERTY_USAGE_GROUP));
+ p_list->push_back(PropertyInfo(Variant::INT, "animation_columns", PROPERTY_HINT_NONE, ""));
+ p_list->push_back(PropertyInfo(Variant::VECTOR2I, "animation_separation", PROPERTY_HINT_NONE, ""));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "animation_speed", PROPERTY_HINT_NONE, ""));
+ p_list->push_back(PropertyInfo(Variant::INT, "animation_frames_count", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ARRAY, "Frames,animation_frame_"));
+ if (tile_set_atlas_source->get_tile_animation_frames_count(tiles.front()->get().tile) == 1) {
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "animation_frame_0/duration", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY));
+ } else {
+ for (int i = 0; i < tile_set_atlas_source->get_tile_animation_frames_count(tiles.front()->get().tile); i++) {
+ p_list->push_back(PropertyInfo(Variant::FLOAT, vformat("animation_frame_%d/duration", i), PROPERTY_HINT_NONE, ""));
+ }
+ }
} else {
p_list->push_back(PropertyInfo(Variant::INT, "alternative_id", PROPERTY_HINT_NONE, ""));
}
@@ -846,15 +922,15 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
CursorShape cursor_shape = CURSOR_ARROW;
bool can_grow[4];
for (int i = 0; i < 4; i++) {
- can_grow[i] = tile_set_atlas_source->can_move_tile_in_atlas(selected.tile, selected.tile + directions[i]);
+ can_grow[i] = tile_set_atlas_source->has_room_for_tile(selected.tile + directions[i], tile_set_atlas_source->get_tile_size_in_atlas(selected.tile), tile_set_atlas_source->get_tile_animation_columns(selected.tile), tile_set_atlas_source->get_tile_animation_separation(selected.tile), tile_set_atlas_source->get_tile_animation_frames_count(selected.tile), selected.tile);
can_grow[i] |= (i % 2 == 0) ? size_in_atlas.y > 1 : size_in_atlas.x > 1;
}
for (int i = 0; i < 4; i++) {
- Vector2 pos = rect.position + Vector2(rect.size.x, rect.size.y) * coords[i];
+ Vector2 pos = rect.position + rect.size * coords[i];
if (can_grow[i] && can_grow[(i + 3) % 4] && Rect2(pos, zoomed_size).has_point(mouse_local_pos)) {
cursor_shape = (i % 2) ? CURSOR_BDIAGSIZE : CURSOR_FDIAGSIZE;
}
- Vector2 next_pos = rect.position + Vector2(rect.size.x, rect.size.y) * coords[(i + 1) % 4];
+ Vector2 next_pos = rect.position + rect.size * coords[(i + 1) % 4];
if (can_grow[i] && Rect2((pos + next_pos) / 2.0, zoomed_size).has_point(mouse_local_pos)) {
cursor_shape = (i % 2) ? CURSOR_HSIZE : CURSOR_VSIZE;
}
@@ -869,7 +945,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
Rect2i new_rect = Rect2i(start_base_tiles_coords, new_base_tiles_coords - start_base_tiles_coords).abs();
new_rect.size += Vector2i(1, 1);
// Check if the new tile can fit in the new rect.
- if (tile_set_atlas_source->can_move_tile_in_atlas(drag_current_tile, new_rect.position, new_rect.size)) {
+ if (tile_set_atlas_source->has_room_for_tile(new_rect.position, new_rect.size, tile_set_atlas_source->get_tile_animation_columns(drag_current_tile), tile_set_atlas_source->get_tile_animation_separation(drag_current_tile), tile_set_atlas_source->get_tile_animation_frames_count(drag_current_tile), drag_current_tile)) {
// Move and resize the tile.
tile_set_atlas_source->move_tile_in_atlas(drag_current_tile, new_rect.position, new_rect.size);
drag_current_tile = new_rect.position;
@@ -908,7 +984,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
Vector2 mouse_offset = (Vector2(tile_set_atlas_source->get_tile_size_in_atlas(drag_current_tile)) / 2.0 - Vector2(0.5, 0.5)) * tile_set->get_tile_size();
Vector2i coords = tile_atlas_view->get_atlas_tile_coords_at_pos(tile_atlas_control->get_local_mouse_position() - mouse_offset);
coords = coords.max(Vector2i(0, 0)).min(grid_size - Vector2i(1, 1));
- if (drag_current_tile != coords && tile_set_atlas_source->can_move_tile_in_atlas(drag_current_tile, coords)) {
+ if (drag_current_tile != coords && tile_set_atlas_source->has_room_for_tile(coords, tile_set_atlas_source->get_tile_size_in_atlas(drag_current_tile), tile_set_atlas_source->get_tile_animation_columns(drag_current_tile), tile_set_atlas_source->get_tile_animation_separation(drag_current_tile), tile_set_atlas_source->get_tile_animation_frames_count(drag_current_tile), drag_current_tile)) {
tile_set_atlas_source->move_tile_in_atlas(drag_current_tile, coords);
selection.clear();
selection.insert({ coords, 0 });
@@ -948,7 +1024,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
new_rect.set_end(Vector2i(new_rect.get_end().x, MAX(new_base_tiles_coords.y, old_rect.position.y + 1)));
}
- if (tile_set_atlas_source->can_move_tile_in_atlas(drag_current_tile, new_rect.position, new_rect.size)) {
+ if (tile_set_atlas_source->has_room_for_tile(new_rect.position, new_rect.size, tile_set_atlas_source->get_tile_animation_columns(drag_current_tile), tile_set_atlas_source->get_tile_animation_separation(drag_current_tile), tile_set_atlas_source->get_tile_animation_frames_count(drag_current_tile), drag_current_tile)) {
tile_set_atlas_source->move_tile_in_atlas(drag_current_tile, new_rect.position, new_rect.size);
selection.clear();
selection.insert({ new_rect.position, 0 });
@@ -1056,11 +1132,11 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
CursorShape cursor_shape = CURSOR_ARROW;
bool can_grow[4];
for (int i = 0; i < 4; i++) {
- can_grow[i] = tile_set_atlas_source->can_move_tile_in_atlas(selected.tile, selected.tile + directions[i]);
+ can_grow[i] = tile_set_atlas_source->has_room_for_tile(selected.tile + directions[i], tile_set_atlas_source->get_tile_size_in_atlas(selected.tile), tile_set_atlas_source->get_tile_animation_columns(selected.tile), tile_set_atlas_source->get_tile_animation_separation(selected.tile), tile_set_atlas_source->get_tile_animation_frames_count(selected.tile), selected.tile);
can_grow[i] |= (i % 2 == 0) ? size_in_atlas.y > 1 : size_in_atlas.x > 1;
}
for (int i = 0; i < 4; i++) {
- Vector2 pos = rect.position + Vector2(rect.size.x, rect.size.y) * coords[i];
+ Vector2 pos = rect.position + rect.size * coords[i];
if (can_grow[i] && can_grow[(i + 3) % 4] && Rect2(pos, zoomed_size).has_point(mouse_local_pos)) {
drag_type = (DragType)((int)DRAG_TYPE_RESIZE_TOP_LEFT + i * 2);
drag_start_mouse_pos = mouse_local_pos;
@@ -1069,7 +1145,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_gui_input(const Ref<InputEven
drag_start_tile_shape = Rect2i(selected.tile, tile_set_atlas_source->get_tile_size_in_atlas(selected.tile));
cursor_shape = (i % 2) ? CURSOR_BDIAGSIZE : CURSOR_FDIAGSIZE;
}
- Vector2 next_pos = rect.position + Vector2(rect.size.x, rect.size.y) * coords[(i + 1) % 4];
+ Vector2 next_pos = rect.position + rect.size * coords[(i + 1) % 4];
if (can_grow[i] && Rect2((pos + next_pos) / 2.0, zoomed_size).has_point(mouse_local_pos)) {
drag_type = (DragType)((int)DRAG_TYPE_RESIZE_TOP + i * 2);
drag_start_mouse_pos = mouse_local_pos;
@@ -1511,37 +1587,45 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() {
TileSelection selected = E->get();
if (selected.alternative == 0) {
// Draw the rect.
- Rect2 region = tile_set_atlas_source->get_tile_texture_region(selected.tile);
- tile_atlas_control->draw_rect(region, selection_color, false);
+ for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(selected.tile); frame++) {
+ Color color = selection_color;
+ if (frame > 0) {
+ color.a *= 0.3;
+ }
+ Rect2 region = tile_set_atlas_source->get_tile_texture_region(selected.tile, frame);
+ tile_atlas_control->draw_rect(region, color, false);
+ }
}
}
if (selection.size() == 1) {
// Draw the resize handles (only when it's possible to expand).
TileSelection selected = selection.front()->get();
- Vector2i size_in_atlas = tile_set_atlas_source->get_tile_size_in_atlas(selected.tile);
- Size2 zoomed_size = resize_handle->get_size() / tile_atlas_view->get_zoom();
- Rect2 region = tile_set_atlas_source->get_tile_texture_region(selected.tile);
- Rect2 rect = region.grow_individual(zoomed_size.x, zoomed_size.y, 0, 0);
- Vector2i coords[] = { Vector2i(0, 0), Vector2i(1, 0), Vector2i(1, 1), Vector2i(0, 1) };
- Vector2i directions[] = { Vector2i(0, -1), Vector2i(1, 0), Vector2i(0, 1), Vector2i(-1, 0) };
- bool can_grow[4];
- for (int i = 0; i < 4; i++) {
- can_grow[i] = tile_set_atlas_source->can_move_tile_in_atlas(selected.tile, selected.tile + directions[i]);
- can_grow[i] |= (i % 2 == 0) ? size_in_atlas.y > 1 : size_in_atlas.x > 1;
- }
- for (int i = 0; i < 4; i++) {
- Vector2 pos = rect.position + Vector2(rect.size.x, rect.size.y) * coords[i];
- if (can_grow[i] && can_grow[(i + 3) % 4]) {
- tile_atlas_control->draw_texture_rect(resize_handle, Rect2(pos, zoomed_size), false);
- } else {
- tile_atlas_control->draw_texture_rect(resize_handle_disabled, Rect2(pos, zoomed_size), false);
+ if (selected.alternative == 0) {
+ Vector2i size_in_atlas = tile_set_atlas_source->get_tile_size_in_atlas(selected.tile);
+ Size2 zoomed_size = resize_handle->get_size() / tile_atlas_view->get_zoom();
+ Rect2 region = tile_set_atlas_source->get_tile_texture_region(selected.tile);
+ Rect2 rect = region.grow_individual(zoomed_size.x, zoomed_size.y, 0, 0);
+ Vector2i coords[] = { Vector2i(0, 0), Vector2i(1, 0), Vector2i(1, 1), Vector2i(0, 1) };
+ Vector2i directions[] = { Vector2i(0, -1), Vector2i(1, 0), Vector2i(0, 1), Vector2i(-1, 0) };
+ bool can_grow[4];
+ for (int i = 0; i < 4; i++) {
+ can_grow[i] = tile_set_atlas_source->has_room_for_tile(selected.tile + directions[i], tile_set_atlas_source->get_tile_size_in_atlas(selected.tile), tile_set_atlas_source->get_tile_animation_columns(selected.tile), tile_set_atlas_source->get_tile_animation_separation(selected.tile), tile_set_atlas_source->get_tile_animation_frames_count(selected.tile), selected.tile);
+ can_grow[i] |= (i % 2 == 0) ? size_in_atlas.y > 1 : size_in_atlas.x > 1;
}
- Vector2 next_pos = rect.position + Vector2(rect.size.x, rect.size.y) * coords[(i + 1) % 4];
- if (can_grow[i]) {
- tile_atlas_control->draw_texture_rect(resize_handle, Rect2((pos + next_pos) / 2.0, zoomed_size), false);
- } else {
- tile_atlas_control->draw_texture_rect(resize_handle_disabled, Rect2((pos + next_pos) / 2.0, zoomed_size), false);
+ for (int i = 0; i < 4; i++) {
+ Vector2 pos = rect.position + rect.size * coords[i];
+ if (can_grow[i] && can_grow[(i + 3) % 4]) {
+ tile_atlas_control->draw_texture_rect(resize_handle, Rect2(pos, zoomed_size), false);
+ } else {
+ tile_atlas_control->draw_texture_rect(resize_handle_disabled, Rect2(pos, zoomed_size), false);
+ }
+ Vector2 next_pos = rect.position + rect.size * coords[(i + 1) % 4];
+ if (can_grow[i]) {
+ tile_atlas_control->draw_texture_rect(resize_handle, Rect2((pos + next_pos) / 2.0, zoomed_size), false);
+ } else {
+ tile_atlas_control->draw_texture_rect(resize_handle_disabled, Rect2((pos + next_pos) / 2.0, zoomed_size), false);
+ }
}
}
}
@@ -1550,7 +1634,9 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() {
if (drag_type == DRAG_TYPE_REMOVE_TILES) {
// Draw the tiles to be removed.
for (Set<Vector2i>::Element *E = drag_modified_tiles.front(); E; E = E->next()) {
- tile_atlas_control->draw_rect(tile_set_atlas_source->get_tile_texture_region(E->get()), Color(0.0, 0.0, 0.0), false);
+ for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(E->get()); frame++) {
+ tile_atlas_control->draw_rect(tile_set_atlas_source->get_tile_texture_region(E->get(), frame), Color(0.0, 0.0, 0.0), false);
+ }
}
} else if (drag_type == DRAG_TYPE_RECT_SELECT || drag_type == DRAG_TYPE_REMOVE_TILES_USING_RECT) {
// Draw tiles to be removed.
@@ -1617,7 +1703,13 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_draw() {
Vector2i hovered_tile = tile_set_atlas_source->get_tile_at_coords(hovered_base_tile_coords);
if (hovered_tile != TileSetSource::INVALID_ATLAS_COORDS) {
// Draw existing hovered tile.
- tile_atlas_control->draw_rect(tile_set_atlas_source->get_tile_texture_region(hovered_tile), Color(1.0, 1.0, 1.0), false);
+ for (int frame = 0; frame < tile_set_atlas_source->get_tile_animation_frames_count(hovered_tile); frame++) {
+ Color color = Color(1.0, 1.0, 1.0);
+ if (frame > 0) {
+ color.a *= 0.3;
+ }
+ tile_atlas_control->draw_rect(tile_set_atlas_source->get_tile_texture_region(hovered_tile, frame), color, false);
+ }
} else {
// Draw empty tile, only in add/remove tiles mode.
if (tools_button_group->get_pressed_button() == tool_setup_atlas_source_button) {
@@ -1638,7 +1730,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_unscaled_draw() {
for (int i = 0; i < tile_set_atlas_source->get_tiles_count(); i++) {
Vector2i coords = tile_set_atlas_source->get_tile_id(i);
Rect2i texture_region = tile_set_atlas_source->get_tile_texture_region(coords);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
+ Vector2i position = texture_region.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(coords, 0);
Transform2D xform = tile_atlas_control->get_parent_control()->get_transform();
xform.translate(position);
@@ -1661,7 +1753,7 @@ void TileSetAtlasSourceEditor::_tile_atlas_control_unscaled_draw() {
continue;
}
Rect2i texture_region = tile_set_atlas_source->get_tile_texture_region(E->get().tile);
- Vector2i position = (texture_region.position + texture_region.get_end()) / 2 + tile_set_atlas_source->get_tile_effective_texture_offset(E->get().tile, 0);
+ Vector2i position = texture_region.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(E->get().tile, 0);
Transform2D xform = tile_atlas_control->get_parent_control()->get_transform();
xform.translate(position);
@@ -1805,7 +1897,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() {
continue;
}
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(coords, alternative_tile);
- Vector2 position = (rect.get_position() + rect.get_end()) / 2;
+ Vector2 position = rect.get_center();
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
xform.translate(position);
@@ -1829,7 +1921,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() {
continue;
}
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(E->get().tile, E->get().alternative);
- Vector2 position = (rect.get_position() + rect.get_end()) / 2;
+ Vector2 position = rect.get_center();
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
xform.translate(position);
@@ -1854,6 +1946,11 @@ void TileSetAtlasSourceEditor::_tile_set_atlas_source_changed() {
tile_set_atlas_source_changed_needs_update = true;
}
+void TileSetAtlasSourceEditor::_tile_proxy_object_changed(String p_what) {
+ tile_set_atlas_source_changed_needs_update = false; // Avoid updating too many things.
+ _update_atlas_view();
+}
+
void TileSetAtlasSourceEditor::_atlas_source_proxy_object_changed(String p_what) {
if (p_what == "texture" && !atlas_source_proxy_object->get("texture").is_null()) {
confirm_auto_create_tiles->popup_centered();
@@ -1866,7 +1963,7 @@ void TileSetAtlasSourceEditor::_undo_redo_inspector_callback(Object *p_undo_redo
UndoRedo *undo_redo = Object::cast_to<UndoRedo>(p_undo_redo);
ERR_FAIL_COND(!undo_redo);
-#define ADD_UNDO(obj, property) undo_redo->add_undo_property(obj, property, tile_data->get(property));
+#define ADD_UNDO(obj, property) undo_redo->add_undo_property(obj, property, obj->get(property));
AtlasTileProxyObject *tile_data = Object::cast_to<AtlasTileProxyObject>(p_edited);
if (tile_data) {
@@ -2114,7 +2211,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
middle_vbox_container->add_child(tile_inspector_label);
tile_proxy_object = memnew(AtlasTileProxyObject(this));
- tile_proxy_object->connect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_update_atlas_view).unbind(1));
+ tile_proxy_object->connect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_proxy_object_changed));
tile_inspector = memnew(EditorInspector);
tile_inspector->set_undo_redo(undo_redo);
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.h b/editor/plugins/tiles/tile_set_atlas_source_editor.h
index 501416c340..6448b55feb 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.h
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.h
@@ -264,6 +264,7 @@ private:
AcceptDialog *confirm_auto_create_tiles;
void _tile_set_atlas_source_changed();
+ void _tile_proxy_object_changed(String p_what);
void _atlas_source_proxy_object_changed(String p_what);
void _undo_redo_inspector_callback(Object *p_undo_redo, Object *p_edited, String p_property, Variant p_new_value);
diff --git a/editor/plugins/tiles/tile_set_editor.cpp b/editor/plugins/tiles/tile_set_editor.cpp
index ba98a7d6b3..48d0d9b333 100644
--- a/editor/plugins/tiles/tile_set_editor.cpp
+++ b/editor/plugins/tiles/tile_set_editor.cpp
@@ -330,11 +330,192 @@ void TileSetEditor::_tile_set_changed() {
tile_set_changed_needs_update = true;
}
+void TileSetEditor::_move_tile_set_array_element(Object *p_undo_redo, Object *p_edited, String p_array_prefix, int p_from_index, int p_to_pos) {
+ UndoRedo *undo_redo = Object::cast_to<UndoRedo>(p_undo_redo);
+ ERR_FAIL_COND(!undo_redo);
+
+ TileSet *tile_set = Object::cast_to<TileSet>(p_edited);
+ if (!tile_set) {
+ return;
+ }
+
+ Vector<String> components = String(p_array_prefix).split("/", true, 2);
+
+ // Compute the array indices to save.
+ int begin = 0;
+ int end;
+ if (p_array_prefix == "occlusion_layer_") {
+ end = tile_set->get_occlusion_layers_count();
+ } else if (p_array_prefix == "physics_layer_") {
+ end = tile_set->get_physics_layers_count();
+ } else if (p_array_prefix == "terrain_set_") {
+ end = tile_set->get_terrain_sets_count();
+ } else if (components.size() >= 2 && components[0].begins_with("terrain_set_") && components[0].trim_prefix("terrain_set_").is_valid_int() && components[1] == "terrain_") {
+ int terrain_set = components[0].trim_prefix("terrain_set_").to_int();
+ end = tile_set->get_terrains_count(terrain_set);
+ } else if (p_array_prefix == "navigation_layer_") {
+ end = tile_set->get_navigation_layers_count();
+ } else if (p_array_prefix == "custom_data_layer_") {
+ end = tile_set->get_custom_data_layers_count();
+ } else {
+ ERR_FAIL_MSG("Invalid array prefix for TileSet.");
+ }
+ if (p_from_index < 0) {
+ // Adding new.
+ if (p_to_pos >= 0) {
+ begin = p_to_pos;
+ } else {
+ end = 0; // Nothing to save when adding at the end.
+ }
+ } else if (p_to_pos < 0) {
+ // Removing.
+ begin = p_from_index;
+ } else {
+ // Moving.
+ begin = MIN(p_from_index, p_to_pos);
+ end = MIN(MAX(p_from_index, p_to_pos) + 1, end);
+ }
+
+#define ADD_UNDO(obj, property) undo_redo->add_undo_property(obj, property, obj->get(property));
+ // Save layers' properties.
+ List<PropertyInfo> properties;
+ tile_set->get_property_list(&properties);
+ for (PropertyInfo pi : properties) {
+ if (pi.name.begins_with(p_array_prefix)) {
+ String str = pi.name.trim_prefix(p_array_prefix);
+ int to_char_index = 0;
+ while (to_char_index < str.length()) {
+ if (str[to_char_index] < '0' || str[to_char_index] > '9') {
+ break;
+ }
+ to_char_index++;
+ }
+ if (to_char_index > 0) {
+ int array_index = str.left(to_char_index).to_int();
+ if (array_index >= begin && array_index < end) {
+ ADD_UNDO(tile_set, pi.name);
+ }
+ }
+ }
+ }
+
+ // Save properties for TileSetAtlasSources tile data
+ for (int i = 0; i < tile_set->get_source_count(); i++) {
+ int source_id = tile_set->get_source_id(i);
+
+ Ref<TileSetAtlasSource> tas = tile_set->get_source(source_id);
+ if (tas.is_valid()) {
+ for (int j = 0; j < tas->get_tiles_count(); j++) {
+ Vector2i tile_id = tas->get_tile_id(j);
+ for (int k = 0; k < tas->get_alternative_tiles_count(tile_id); k++) {
+ int alternative_id = tas->get_alternative_tile_id(tile_id, k);
+ TileData *tile_data = Object::cast_to<TileData>(tas->get_tile_data(tile_id, alternative_id));
+ ERR_FAIL_COND(!tile_data);
+
+ // Actually saving stuff.
+ if (p_array_prefix == "occlusion_layer_") {
+ for (int layer_index = begin; layer_index < end; layer_index++) {
+ ADD_UNDO(tile_data, vformat("occlusion_layer_%d/polygon", layer_index));
+ }
+ } else if (p_array_prefix == "physics_layer_") {
+ for (int layer_index = begin; layer_index < end; layer_index++) {
+ ADD_UNDO(tile_data, vformat("physics_layer_%d/polygons_count", layer_index));
+ for (int polygon_index = 0; polygon_index < tile_data->get_collision_polygons_count(layer_index); polygon_index++) {
+ ADD_UNDO(tile_data, vformat("physics_layer_%d/polygon_%d/points", layer_index, polygon_index));
+ ADD_UNDO(tile_data, vformat("physics_layer_%d/polygon_%d/one_way", layer_index, polygon_index));
+ ADD_UNDO(tile_data, vformat("physics_layer_%d/polygon_%d/one_way_margin", layer_index, polygon_index));
+ }
+ }
+ } else if (p_array_prefix == "terrain_set_") {
+ ADD_UNDO(tile_data, "terrain_set");
+ for (int terrain_set_index = begin; terrain_set_index < end; terrain_set_index++) {
+ for (int l = 0; l < TileSet::CELL_NEIGHBOR_MAX; l++) {
+ TileSet::CellNeighbor bit = TileSet::CellNeighbor(l);
+ if (tile_data->is_valid_peering_bit_terrain(bit)) {
+ ADD_UNDO(tile_data, "terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[l]));
+ }
+ }
+ }
+ } else if (components.size() >= 2 && components[0].begins_with("terrain_set_") && components[0].trim_prefix("terrain_set_").is_valid_int() && components[1] == "terrain_") {
+ for (int terrain_index = 0; terrain_index < TileSet::CELL_NEIGHBOR_MAX; terrain_index++) {
+ TileSet::CellNeighbor bit = TileSet::CellNeighbor(terrain_index);
+ if (tile_data->is_valid_peering_bit_terrain(bit)) {
+ ADD_UNDO(tile_data, "terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[terrain_index]));
+ }
+ }
+ } else if (p_array_prefix == "navigation_layer_") {
+ for (int layer_index = begin; layer_index < end; layer_index++) {
+ ADD_UNDO(tile_data, vformat("navigation_layer_%d/polygon", layer_index));
+ }
+ } else if (p_array_prefix == "custom_data_layer_") {
+ for (int layer_index = begin; layer_index < end; layer_index++) {
+ ADD_UNDO(tile_data, vformat("custom_data_%d", layer_index));
+ }
+ }
+ }
+ }
+ }
+ }
+#undef ADD_UNDO
+
+ // Add do method.
+ if (p_array_prefix == "occlusion_layer_") {
+ if (p_from_index < 0) {
+ undo_redo->add_do_method(tile_set, "add_occlusion_layer", p_to_pos);
+ } else if (p_to_pos < 0) {
+ undo_redo->add_do_method(tile_set, "remove_occlusion_layer", p_from_index);
+ } else {
+ undo_redo->add_do_method(tile_set, "move_occlusion_layer", p_from_index, p_to_pos);
+ }
+ } else if (p_array_prefix == "physics_layer_") {
+ if (p_from_index < 0) {
+ undo_redo->add_do_method(tile_set, "add_physics_layer", p_to_pos);
+ } else if (p_to_pos < 0) {
+ undo_redo->add_do_method(tile_set, "remove_physics_layer", p_from_index);
+ } else {
+ undo_redo->add_do_method(tile_set, "move_physics_layer", p_from_index, p_to_pos);
+ }
+ } else if (p_array_prefix == "terrain_set_") {
+ if (p_from_index < 0) {
+ undo_redo->add_do_method(tile_set, "add_terrain_set", p_to_pos);
+ } else if (p_to_pos < 0) {
+ undo_redo->add_do_method(tile_set, "remove_terrain_set", p_from_index);
+ } else {
+ undo_redo->add_do_method(tile_set, "move_terrain_set", p_from_index, p_to_pos);
+ }
+ } else if (components.size() >= 2 && components[0].begins_with("terrain_set_") && components[0].trim_prefix("terrain_set_").is_valid_int() && components[1] == "terrain_") {
+ int terrain_set = components[0].trim_prefix("terrain_set_").to_int();
+ if (p_from_index < 0) {
+ undo_redo->add_do_method(tile_set, "add_terrain", terrain_set, p_to_pos);
+ } else if (p_to_pos < 0) {
+ undo_redo->add_do_method(tile_set, "remove_terrain", terrain_set, p_from_index);
+ } else {
+ undo_redo->add_do_method(tile_set, "move_terrain", terrain_set, p_from_index, p_to_pos);
+ }
+ } else if (p_array_prefix == "navigation_layer_") {
+ if (p_from_index < 0) {
+ undo_redo->add_do_method(tile_set, "add_navigation_layer", p_to_pos);
+ } else if (p_to_pos < 0) {
+ undo_redo->add_do_method(tile_set, "remove_navigation_layer", p_from_index);
+ } else {
+ undo_redo->add_do_method(tile_set, "move_navigation_layer", p_from_index, p_to_pos);
+ }
+ } else if (p_array_prefix == "custom_data_layer_") {
+ if (p_from_index < 0) {
+ undo_redo->add_do_method(tile_set, "add_custom_data_layer", p_to_pos);
+ } else if (p_to_pos < 0) {
+ undo_redo->add_do_method(tile_set, "remove_custom_data_layer", p_from_index);
+ } else {
+ undo_redo->add_do_method(tile_set, "move_custom_data_layer", p_from_index, p_to_pos);
+ }
+ }
+}
+
void TileSetEditor::_undo_redo_inspector_callback(Object *p_undo_redo, Object *p_edited, String p_property, Variant p_new_value) {
UndoRedo *undo_redo = Object::cast_to<UndoRedo>(p_undo_redo);
ERR_FAIL_COND(!undo_redo);
-#define ADD_UNDO(obj, property) undo_redo->add_undo_property(obj, property, tile_data->get(property));
+#define ADD_UNDO(obj, property) undo_redo->add_undo_property(obj, property, obj->get(property));
TileSet *tile_set = Object::cast_to<TileSet>(p_edited);
if (tile_set) {
Vector<String> components = p_property.split("/", true, 3);
@@ -350,30 +531,7 @@ void TileSetEditor::_undo_redo_inspector_callback(Object *p_undo_redo, Object *p
TileData *tile_data = Object::cast_to<TileData>(tas->get_tile_data(tile_id, alternative_id));
ERR_FAIL_COND(!tile_data);
- if (p_property == "occlusion_layers_count") {
- int new_layer_count = p_new_value;
- int old_layer_count = tile_set->get_occlusion_layers_count();
- if (new_layer_count < old_layer_count) {
- for (int occclusion_layer_index = new_layer_count - 1; occclusion_layer_index < old_layer_count; occclusion_layer_index++) {
- ADD_UNDO(tile_data, vformat("occlusion_layer_%d/polygon", occclusion_layer_index));
- }
- }
- } else if (p_property == "physics_layers_count") {
- int new_layer_count = p_new_value;
- int old_layer_count = tile_set->get_physics_layers_count();
- if (new_layer_count < old_layer_count) {
- for (int physics_layer_index = new_layer_count - 1; physics_layer_index < old_layer_count; physics_layer_index++) {
- ADD_UNDO(tile_data, vformat("physics_layer_%d/polygons_count", physics_layer_index));
- for (int polygon_index = 0; polygon_index < tile_data->get_collision_polygons_count(physics_layer_index); polygon_index++) {
- ADD_UNDO(tile_data, vformat("physics_layer_%d/polygon_%d/points", physics_layer_index, polygon_index));
- ADD_UNDO(tile_data, vformat("physics_layer_%d/polygon_%d/one_way", physics_layer_index, polygon_index));
- ADD_UNDO(tile_data, vformat("physics_layer_%d/polygon_%d/one_way_margin", physics_layer_index, polygon_index));
- }
- }
- }
- } else if ((p_property == "terrains_sets_count" && tile_data->get_terrain_set() >= (int)p_new_value) ||
- (components.size() == 2 && components[0].begins_with("terrain_set_") && components[0].trim_prefix("terrain_set_").is_valid_int() && components[1] == "mode") ||
- (components.size() == 2 && components[0].begins_with("terrain_set_") && components[0].trim_prefix("terrain_set_").is_valid_int() && components[1] == "terrains_count" && tile_data->get_terrain_set() == components[0].trim_prefix("terrain_set_").to_int() && (int)p_new_value < tile_set->get_terrains_count(tile_data->get_terrain_set()))) {
+ if (components.size() == 2 && components[0].begins_with("terrain_set_") && components[0].trim_prefix("terrain_set_").is_valid_int() && components[1] == "mode") {
ADD_UNDO(tile_data, "terrain_set");
for (int l = 0; l < TileSet::CELL_NEIGHBOR_MAX; l++) {
TileSet::CellNeighbor bit = TileSet::CellNeighbor(l);
@@ -381,22 +539,6 @@ void TileSetEditor::_undo_redo_inspector_callback(Object *p_undo_redo, Object *p
ADD_UNDO(tile_data, "terrains_peering_bit/" + String(TileSet::CELL_NEIGHBOR_ENUM_TO_TEXT[l]));
}
}
- } else if (p_property == "navigation_layers_count") {
- int new_layer_count = p_new_value;
- int old_layer_count = tile_set->get_navigation_layers_count();
- if (new_layer_count < old_layer_count) {
- for (int navigation_layer_index = new_layer_count - 1; navigation_layer_index < old_layer_count; navigation_layer_index++) {
- ADD_UNDO(tile_data, vformat("navigation_layer_%d/polygon", navigation_layer_index));
- }
- }
- } else if (p_property == "custom_data_layers_count") {
- int new_layer_count = p_new_value;
- int old_layer_count = tile_set->get_custom_data_layers_count();
- if (new_layer_count < old_layer_count) {
- for (int custom_data_layer_index = new_layer_count - 1; custom_data_layer_index < old_layer_count; custom_data_layer_index++) {
- ADD_UNDO(tile_data, vformat("custom_data_%d", custom_data_layer_index));
- }
- }
} else if (components.size() == 2 && components[0].begins_with("custom_data_layer_") && components[0].trim_prefix("custom_data_layer_").is_valid_int() && components[1] == "type") {
int custom_data_layer = components[0].trim_prefix("custom_data_layer_").is_valid_int();
ADD_UNDO(tile_data, vformat("custom_data_%d", custom_data_layer));
@@ -531,6 +673,7 @@ TileSetEditor::TileSetEditor() {
tile_set_scenes_collection_source_editor->hide();
// Registers UndoRedo inspector callback.
+ EditorNode::get_singleton()->get_editor_data().add_move_array_element_function(SNAME("TileSet"), callable_mp(this, &TileSetEditor::_move_tile_set_array_element));
EditorNode::get_singleton()->get_editor_data().add_undo_redo_inspector_hook_callback(callable_mp(this, &TileSetEditor::_undo_redo_inspector_callback));
}
diff --git a/editor/plugins/tiles/tile_set_editor.h b/editor/plugins/tiles/tile_set_editor.h
index 970e3fabb6..fe854b2281 100644
--- a/editor/plugins/tiles/tile_set_editor.h
+++ b/editor/plugins/tiles/tile_set_editor.h
@@ -71,6 +71,7 @@ private:
void _tile_set_changed();
+ void _move_tile_set_array_element(Object *p_undo_redo, Object *p_edited, String p_array_prefix, int p_from_index, int p_to_pos);
void _undo_redo_inspector_callback(Object *p_undo_redo, Object *p_edited, String p_property, Variant p_new_value);
protected:
diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp
index 79b869b511..f51f4625a9 100644
--- a/editor/plugins/tiles/tiles_editor_plugin.cpp
+++ b/editor/plugins/tiles/tiles_editor_plugin.cpp
@@ -146,7 +146,7 @@ void TilesEditor::synchronize_atlas_view(Object *p_current) {
ERR_FAIL_COND(!tile_atlas_view);
if (tile_atlas_view->is_visible_in_tree()) {
- tile_atlas_view->set_transform(atlas_view_zoom, Vector2(atlas_view_scroll.x, atlas_view_scroll.y));
+ tile_atlas_view->set_transform(atlas_view_zoom, atlas_view_scroll);
}
}
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 2dd8270ee3..27f30479cf 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -70,14 +70,15 @@ const int MAX_FLOAT_CONST_DEFS = sizeof(float_constant_defs) / sizeof(FloatConst
///////////////////
Control *VisualShaderNodePlugin::create_editor(const Ref<Resource> &p_parent_resource, const Ref<VisualShaderNode> &p_node) {
- if (get_script_instance()) {
- return get_script_instance()->call("_create_editor", p_parent_resource, p_node);
+ Object *ret;
+ if (GDVIRTUAL_CALL(_create_editor, p_parent_resource, p_node, ret)) {
+ return Object::cast_to<Control>(ret);
}
return nullptr;
}
void VisualShaderNodePlugin::_bind_methods() {
- BIND_VMETHOD(MethodInfo(Variant::OBJECT, "_create_editor", PropertyInfo(Variant::OBJECT, "parent_resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource"), PropertyInfo(Variant::OBJECT, "for_node", PROPERTY_HINT_RESOURCE_TYPE, "VisualShaderNode")));
+ GDVIRTUAL_BIND(_create_editor, "parent_resource", "visual_shader_node");
}
///////////////////
@@ -1219,8 +1220,88 @@ void VisualShaderEditor::_update_options_menu() {
Vector<AddOption> custom_options;
Vector<AddOption> embedded_options;
+ static Vector<String> type_filter_exceptions;
+ if (type_filter_exceptions.is_empty()) {
+ type_filter_exceptions.append("VisualShaderNodeExpression");
+ }
+
for (int i = 0; i < add_options.size(); i++) {
if (!use_filter || add_options[i].name.findn(filter) != -1) {
+ // port type filtering
+ if (members_output_port_type != VisualShaderNode::PORT_TYPE_MAX || members_input_port_type != VisualShaderNode::PORT_TYPE_MAX) {
+ Ref<VisualShaderNode> vsn;
+ int check_result = 0;
+
+ if (!add_options[i].is_custom) {
+ vsn = Ref<VisualShaderNode>(Object::cast_to<VisualShaderNode>(ClassDB::instantiate(add_options[i].type)));
+ if (!vsn.is_valid()) {
+ continue;
+ }
+
+ if (type_filter_exceptions.has(add_options[i].type)) {
+ check_result = 1;
+ }
+
+ Ref<VisualShaderNodeInput> input = Object::cast_to<VisualShaderNodeInput>(vsn.ptr());
+ if (input.is_valid()) {
+ input->set_shader_mode(visual_shader->get_mode());
+ input->set_shader_type(visual_shader->get_shader_type());
+ input->set_input_name(add_options[i].sub_func_str);
+ }
+
+ Ref<VisualShaderNodeExpression> expression = Object::cast_to<VisualShaderNodeExpression>(vsn.ptr());
+ if (expression.is_valid()) {
+ if (members_input_port_type == VisualShaderNode::PORT_TYPE_SAMPLER) {
+ check_result = -1; // expressions creates a port with required type automatically (except for sampler output)
+ }
+ }
+
+ Ref<VisualShaderNodeUniformRef> uniform_ref = Object::cast_to<VisualShaderNodeUniformRef>(vsn.ptr());
+ if (uniform_ref.is_valid()) {
+ check_result = -1;
+
+ if (members_input_port_type != VisualShaderNode::PORT_TYPE_MAX) {
+ for (int j = 0; j < uniform_ref->get_uniforms_count(); j++) {
+ if (visual_shader->is_port_types_compatible(uniform_ref->get_port_type_by_index(j), members_input_port_type)) {
+ check_result = 1;
+ break;
+ }
+ }
+ }
+ }
+ } else {
+ check_result = 1;
+ }
+
+ if (members_output_port_type != VisualShaderNode::PORT_TYPE_MAX) {
+ if (check_result == 0) {
+ for (int j = 0; j < vsn->get_input_port_count(); j++) {
+ if (visual_shader->is_port_types_compatible(vsn->get_input_port_type(j), members_output_port_type)) {
+ check_result = 1;
+ break;
+ }
+ }
+ }
+
+ if (check_result != 1) {
+ continue;
+ }
+ }
+ if (members_input_port_type != VisualShaderNode::PORT_TYPE_MAX) {
+ if (check_result == 0) {
+ for (int j = 0; j < vsn->get_output_port_count(); j++) {
+ if (visual_shader->is_port_types_compatible(vsn->get_output_port_type(j), members_input_port_type)) {
+ check_result = 1;
+ break;
+ }
+ }
+ }
+
+ if (check_result != 1) {
+ continue;
+ }
+ }
+ }
if ((add_options[i].func != current_func && add_options[i].func != -1) || !_is_available(add_options[i].mode)) {
continue;
}
@@ -1864,7 +1945,7 @@ void VisualShaderEditor::_set_node_size(int p_type, int p_node, const Vector2 &p
box_size.x -= 28 * EDSCALE;
box_size.y -= text_box->get_offset(SIDE_TOP);
box_size.y -= 28 * EDSCALE;
- text_box->set_custom_minimum_size(Size2(box_size.x, box_size.y));
+ text_box->set_custom_minimum_size(box_size);
text_box->set_size(Size2(1, 1));
}
}
@@ -2466,6 +2547,7 @@ void VisualShaderEditor::_add_node(int p_idx, int p_op_idx, String p_resource_pa
}
}
}
+ _member_cancel();
VisualShaderNodeUniform *uniform = Object::cast_to<VisualShaderNodeUniform>(vsnode.ptr());
if (uniform) {
@@ -2588,13 +2670,25 @@ void VisualShaderEditor::_disconnection_request(const String &p_from, int p_from
void VisualShaderEditor::_connection_to_empty(const String &p_from, int p_from_slot, const Vector2 &p_release_position) {
from_node = p_from.to_int();
from_slot = p_from_slot;
- _show_members_dialog(true);
+ VisualShaderNode::PortType input_port_type = VisualShaderNode::PORT_TYPE_MAX;
+ VisualShaderNode::PortType output_port_type = VisualShaderNode::PORT_TYPE_MAX;
+ Ref<VisualShaderNode> node = visual_shader->get_node(get_current_shader_type(), from_node);
+ if (node.is_valid()) {
+ output_port_type = node->get_output_port_type(from_slot);
+ }
+ _show_members_dialog(true, input_port_type, output_port_type);
}
void VisualShaderEditor::_connection_from_empty(const String &p_to, int p_to_slot, const Vector2 &p_release_position) {
to_node = p_to.to_int();
to_slot = p_to_slot;
- _show_members_dialog(true);
+ VisualShaderNode::PortType input_port_type = VisualShaderNode::PORT_TYPE_MAX;
+ VisualShaderNode::PortType output_port_type = VisualShaderNode::PORT_TYPE_MAX;
+ Ref<VisualShaderNode> node = visual_shader->get_node(get_current_shader_type(), to_node);
+ if (node.is_valid()) {
+ input_port_type = node->get_input_port_type(to_slot);
+ }
+ _show_members_dialog(true, input_port_type, output_port_type);
}
void VisualShaderEditor::_delete_nodes(int p_type, const List<int> &p_nodes) {
@@ -3036,7 +3130,13 @@ void VisualShaderEditor::_graph_gui_input(const Ref<InputEvent> &p_event) {
}
}
-void VisualShaderEditor::_show_members_dialog(bool at_mouse_pos) {
+void VisualShaderEditor::_show_members_dialog(bool at_mouse_pos, VisualShaderNode::PortType p_input_port_type, VisualShaderNode::PortType p_output_port_type) {
+ if (members_input_port_type != p_input_port_type || members_output_port_type != p_output_port_type) {
+ members_input_port_type = p_input_port_type;
+ members_output_port_type = p_output_port_type;
+ _update_options_menu();
+ }
+
if (at_mouse_pos) {
saved_node_pos_dirty = true;
saved_node_pos = graph->get_local_mouse_position();
@@ -3072,7 +3172,7 @@ void VisualShaderEditor::_sbox_input(const Ref<InputEvent> &p_ie) {
ie->get_keycode() == KEY_DOWN ||
ie->get_keycode() == KEY_ENTER ||
ie->get_keycode() == KEY_KP_ENTER)) {
- members->call("_gui_input", ie);
+ members->gui_input(ie);
node_filter->accept_event();
}
}
@@ -3114,7 +3214,7 @@ void VisualShaderEditor::_notification(int p_what) {
{
Color background_color = EDITOR_GET("text_editor/theme/highlighting/background_color");
Color text_color = EDITOR_GET("text_editor/theme/highlighting/text_color");
- Color keyword_color = EDITOR_GET("text_editor/highlighting/keyword_color");
+ Color keyword_color = EDITOR_GET("text_editor/theme/highlighting/keyword_color");
Color control_flow_keyword_color = EDITOR_GET("text_editor/theme/highlighting/control_flow_keyword_color");
Color comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color");
Color symbol_color = EDITOR_GET("text_editor/theme/highlighting/symbol_color");
@@ -3942,7 +4042,7 @@ VisualShaderEditor::VisualShaderEditor() {
graph->get_zoom_hbox()->add_child(add_node);
add_node->set_text(TTR("Add Node..."));
graph->get_zoom_hbox()->move_child(add_node, 0);
- add_node->connect("pressed", callable_mp(this, &VisualShaderEditor::_show_members_dialog), varray(false));
+ add_node->connect("pressed", callable_mp(this, &VisualShaderEditor::_show_members_dialog), varray(false, VisualShaderNode::PORT_TYPE_MAX, VisualShaderNode::PORT_TYPE_MAX));
preview_shader = memnew(Button);
preview_shader->set_flat(true);
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index 87bab16a45..9f24c5af72 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -47,6 +47,8 @@ class VisualShaderNodePlugin : public RefCounted {
protected:
static void _bind_methods();
+ GDVIRTUAL2RC(Object *, _create_editor, RES, Ref<VisualShaderNode>)
+
public:
virtual Control *create_editor(const Ref<Resource> &p_parent_resource, const Ref<VisualShaderNode> &p_node);
};
@@ -160,6 +162,8 @@ class VisualShaderEditor : public VBoxContainer {
bool saved_node_pos_dirty;
ConfirmationDialog *members_dialog;
+ VisualShaderNode::PortType members_input_port_type = VisualShaderNode::PORT_TYPE_MAX;
+ VisualShaderNode::PortType members_output_port_type = VisualShaderNode::PORT_TYPE_MAX;
PopupMenu *popup_menu;
PopupMenu *constants_submenu = nullptr;
MenuButton *tools;
@@ -227,7 +231,7 @@ class VisualShaderEditor : public VBoxContainer {
Label *highend_label;
void _tools_menu_option(int p_idx);
- void _show_members_dialog(bool at_mouse_pos);
+ void _show_members_dialog(bool at_mouse_pos, VisualShaderNode::PortType p_input_port_type = VisualShaderNode::PORT_TYPE_MAX, VisualShaderNode::PortType p_output_port_type = VisualShaderNode::PORT_TYPE_MAX);
void _update_graph();
diff --git a/editor/plugins/voxel_gi_editor_plugin.cpp b/editor/plugins/voxel_gi_editor_plugin.cpp
index 5bbc0c9dd5..9a44d40dcb 100644
--- a/editor/plugins/voxel_gi_editor_plugin.cpp
+++ b/editor/plugins/voxel_gi_editor_plugin.cpp
@@ -33,7 +33,7 @@
void VoxelGIEditorPlugin::_bake() {
if (voxel_gi) {
if (voxel_gi->get_probe_data().is_null()) {
- String path = get_tree()->get_edited_scene_root()->get_filename();
+ String path = get_tree()->get_edited_scene_root()->get_scene_file_path();
if (path == String()) {
path = "res://" + voxel_gi->get_name() + "_data.res";
} else {
diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp
index b58b7e4cac..d57345cac1 100644
--- a/editor/pot_generator.cpp
+++ b/editor/pot_generator.cpp
@@ -108,7 +108,6 @@ void POTGenerator::_write_to_pot(const String &p_file) {
const String header =
"# LANGUAGE translation for " + project_name + " for the following files:\n" + extracted_files +
"#\n"
- "#\n"
"# FIRST AUTHOR < EMAIL @ADDRESS>, YEAR.\n"
"#\n"
"#, fuzzy\n"
@@ -116,8 +115,9 @@ void POTGenerator::_write_to_pot(const String &p_file) {
"msgstr \"\"\n"
"\"Project-Id-Version: " +
project_name + "\\n\"\n"
+ "\"MIME-Version: 1.0\\n\"\n"
"\"Content-Type: text/plain; charset=UTF-8\\n\"\n"
- "\"Content-Transfer-Encoding: 8-bit\\n\"\n\n";
+ "\"Content-Transfer-Encoding: 8-bit\\n\"\n";
file->store_string(header);
@@ -129,6 +129,9 @@ void POTGenerator::_write_to_pot(const String &p_file) {
String plural = v_msgid_data[i].plural;
const Set<String> &locations = v_msgid_data[i].locations;
+ // Put the blank line at the start, to avoid a double at the end when closing the file.
+ file->store_line("");
+
// Write file locations.
for (Set<String>::Element *E = locations.front(); E; E = E->next()) {
file->store_line("#: " + E->get().trim_prefix("res://"));
@@ -142,13 +145,13 @@ void POTGenerator::_write_to_pot(const String &p_file) {
// Write msgid.
_write_msgid(file, msgid, false);
- // Write msgid_plural
+ // Write msgid_plural.
if (!plural.is_empty()) {
_write_msgid(file, plural, true);
file->store_line("msgstr[0] \"\"");
- file->store_line("msgstr[1] \"\"\n");
+ file->store_line("msgstr[1] \"\"");
} else {
- file->store_line("msgstr \"\"\n");
+ file->store_line("msgstr \"\"");
}
}
}
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 8d425a1e51..81554c9550 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -1887,7 +1887,7 @@ void ProjectManager::_update_project_buttons() {
erase_missing_btn->set_disabled(!_project_list->is_any_project_missing());
}
-void ProjectManager::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
+void ProjectManager::unhandled_key_input(const Ref<InputEvent> &p_ev) {
ERR_FAIL_COND(p_ev.is_null());
Ref<InputEventKey> k = p_ev;
@@ -2051,6 +2051,10 @@ void ProjectManager::_open_selected_projects() {
args.push_back("--disable-crash-handler");
}
+ if (OS::get_singleton()->is_single_window()) {
+ args.push_back("--single-window");
+ }
+
String exec = OS::get_singleton()->get_executable_path();
Error err = OS::get_singleton()->create_process(exec, args);
ERR_FAIL_COND(err);
@@ -2364,7 +2368,6 @@ void ProjectManager::_on_search_term_changed(const String &p_term) {
}
void ProjectManager::_bind_methods() {
- ClassDB::bind_method("_unhandled_key_input", &ProjectManager::_unhandled_key_input);
ClassDB::bind_method("_update_project_buttons", &ProjectManager::_update_project_buttons);
ClassDB::bind_method("_version_button_pressed", &ProjectManager::_version_button_pressed);
}
diff --git a/editor/project_manager.h b/editor/project_manager.h
index 0fc69bd313..f45d34d461 100644
--- a/editor/project_manager.h
+++ b/editor/project_manager.h
@@ -121,7 +121,7 @@ class ProjectManager : public Control {
void _install_project(const String &p_zip_path, const String &p_title);
void _dim_window();
- void _unhandled_key_input(const Ref<InputEvent> &p_ev);
+ virtual void unhandled_key_input(const Ref<InputEvent> &p_ev) override;
void _files_dropped(PackedStringArray p_files, int p_screen);
void _version_button_pressed();
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index b8ccab78dd..db12e90540 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -222,7 +222,6 @@ void ProjectSettingsEditor::_add_feature_overrides() {
presets.insert("standalone");
presets.insert("32");
presets.insert("64");
- presets.insert("Server"); // Not available as an export platform yet, so it needs to be added manually
EditorExport *ee = EditorExport::get_singleton();
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 7338588d56..6ea9b9dfae 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -59,42 +59,33 @@
#include "scene/scene_string_names.h"
void EditorResourceConversionPlugin::_bind_methods() {
- MethodInfo mi;
- mi.name = "_convert";
- mi.return_val.type = Variant::OBJECT;
- mi.return_val.class_name = "Resource";
- mi.return_val.hint = PROPERTY_HINT_RESOURCE_TYPE;
- mi.return_val.hint_string = "Resource";
- mi.arguments.push_back(mi.return_val);
- mi.arguments[0].name = "resource";
-
- BIND_VMETHOD(mi)
-
- mi.name = "_handles";
- mi.return_val = PropertyInfo(Variant::BOOL, "");
-
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_converts_to"));
+ GDVIRTUAL_BIND(_converts_to);
+ GDVIRTUAL_BIND(_handles, "resource");
+ GDVIRTUAL_BIND(_convert, "resource");
}
String EditorResourceConversionPlugin::converts_to() const {
- if (get_script_instance()) {
- return get_script_instance()->call("_converts_to");
+ String ret;
+ if (GDVIRTUAL_CALL(_converts_to, ret)) {
+ return ret;
}
return "";
}
bool EditorResourceConversionPlugin::handles(const Ref<Resource> &p_resource) const {
- if (get_script_instance()) {
- return get_script_instance()->call("_handles", p_resource);
+ bool ret;
+ if (GDVIRTUAL_CALL(_handles, p_resource, ret)) {
+ return ret;
}
return false;
}
Ref<Resource> EditorResourceConversionPlugin::convert(const Ref<Resource> &p_resource) const {
- if (get_script_instance()) {
- return get_script_instance()->call("_convert", p_resource);
+ RES ret;
+ if (GDVIRTUAL_CALL(_convert, p_resource, ret)) {
+ return ret;
}
return Ref<Resource>();
diff --git a/editor/property_editor.h b/editor/property_editor.h
index 8a587b50b0..23771b7494 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -56,6 +56,10 @@ class EditorResourceConversionPlugin : public RefCounted {
protected:
static void _bind_methods();
+ GDVIRTUAL0RC(String, _converts_to)
+ GDVIRTUAL1RC(bool, _handles, RES)
+ GDVIRTUAL1RC(RES, _convert, RES)
+
public:
virtual String converts_to() const;
virtual bool handles(const Ref<Resource> &p_resource) const;
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index 1272d064a0..f167ded4e7 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -48,7 +48,7 @@ void PropertySelector::_sbox_input(const Ref<InputEvent> &p_ie) {
case KEY_DOWN:
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
- search_options->call("_gui_input", k);
+ search_options->gui_input(k);
search_box->accept_event();
TreeItem *root = search_options->get_root();
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp
index f8af3e8f36..fc3abbb87e 100644
--- a/editor/quick_open.cpp
+++ b/editor/quick_open.cpp
@@ -130,12 +130,6 @@ float EditorQuickOpen::_score_path(const String &p_search, const String &p_path)
return score * (1.0f - 0.1f * (float(pos) / file.length()));
}
- // Positive bias for matches close to the end of the path.
- pos = p_path.rfindn(p_search);
- if (pos != -1) {
- return 1.1f + 0.09 / (p_path.length() - pos + 1);
- }
-
// Similarity
return p_path.to_lower().similarity(p_search.to_lower());
}
@@ -170,7 +164,7 @@ void EditorQuickOpen::_sbox_input(const Ref<InputEvent> &p_ie) {
case KEY_DOWN:
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
- search_options->call("_gui_input", k);
+ search_options->gui_input(k);
search_box->accept_event();
if (allow_multi_select) {
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index d86e2656d4..9063b5c6f8 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -30,23 +30,19 @@
#include "rename_dialog.h"
+#ifdef MODULE_REGEX_ENABLED
+
#include "core/string/print_string.h"
#include "editor_node.h"
#include "editor_scale.h"
#include "editor_settings.h"
#include "editor_themes.h"
+#include "modules/regex/regex.h"
#include "plugins/script_editor_plugin.h"
#include "scene/gui/control.h"
#include "scene/gui/label.h"
#include "scene/gui/tab_container.h"
-#include "modules/modules_enabled.gen.h"
-#ifdef MODULE_REGEX_ENABLED
-#include "modules/regex/regex.h"
-#else
-#error "Can't build editor rename dialog without RegEx module."
-#endif
-
RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_undo_redo) {
scene_tree_editor = p_scene_tree_editor;
undo_redo = p_undo_redo;
@@ -655,3 +651,5 @@ void RenameDialog::_features_toggled(bool pressed) {
size.y = 0;
set_size(size);
}
+
+#endif // MODULE_REGEX_ENABLED
diff --git a/editor/rename_dialog.h b/editor/rename_dialog.h
index 76e99e3b66..7990862b37 100644
--- a/editor/rename_dialog.h
+++ b/editor/rename_dialog.h
@@ -31,6 +31,9 @@
#ifndef RENAME_DIALOG_H
#define RENAME_DIALOG_H
+#include "modules/modules_enabled.gen.h"
+#ifdef MODULE_REGEX_ENABLED
+
#include "scene/gui/check_box.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/option_button.h"
@@ -113,4 +116,6 @@ public:
~RenameDialog() {}
};
-#endif
+#endif // MODULE_REGEX_ENABLED
+
+#endif // RENAME_DIALOG_H
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 0b228c2695..d2e8880bf9 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -62,7 +62,7 @@ void SceneTreeDock::_quick_open() {
instantiate_scenes(quick_open->get_selected_files(), scene_tree->get_selected());
}
-void SceneTreeDock::_input(Ref<InputEvent> p_event) {
+void SceneTreeDock::input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseButton> mb = p_event;
@@ -72,7 +72,7 @@ void SceneTreeDock::_input(Ref<InputEvent> p_event) {
}
}
-void SceneTreeDock::_unhandled_key_input(Ref<InputEvent> p_event) {
+void SceneTreeDock::unhandled_key_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (get_focus_owner() && get_focus_owner()->is_text_field()) {
@@ -83,10 +83,12 @@ void SceneTreeDock::_unhandled_key_input(Ref<InputEvent> p_event) {
return;
}
- if (ED_IS_SHORTCUT("scene_tree/batch_rename", p_event)) {
- _tool_selected(TOOL_BATCH_RENAME);
- } else if (ED_IS_SHORTCUT("scene_tree/rename", p_event)) {
+ if (ED_IS_SHORTCUT("scene_tree/rename", p_event)) {
_tool_selected(TOOL_RENAME);
+#ifdef MODULE_REGEX_ENABLED
+ } else if (ED_IS_SHORTCUT("scene_tree/batch_rename", p_event)) {
+ _tool_selected(TOOL_BATCH_RENAME);
+#endif // MODULE_REGEX_ENABLED
} else if (ED_IS_SHORTCUT("scene_tree/add_child_node", p_event)) {
_tool_selected(TOOL_NEW);
} else if (ED_IS_SHORTCUT("scene_tree/instance_scene", p_event)) {
@@ -185,8 +187,8 @@ void SceneTreeDock::_perform_instantiate_scenes(const Vector<String> &p_files, N
break;
}
- if (edited_scene->get_filename() != "") {
- if (_cyclical_dependency_exists(edited_scene->get_filename(), instantiated_scene)) {
+ if (edited_scene->get_scene_file_path() != "") {
+ if (_cyclical_dependency_exists(edited_scene->get_scene_file_path(), instantiated_scene)) {
accept->set_text(vformat(TTR("Cannot instance the scene '%s' because the current scene exists within one of its nodes."), p_files[i]));
accept->popup_centered();
error = true;
@@ -194,7 +196,7 @@ void SceneTreeDock::_perform_instantiate_scenes(const Vector<String> &p_files, N
}
}
- instantiated_scene->set_filename(ProjectSettings::get_singleton()->localize_path(p_files[i]));
+ instantiated_scene->set_scene_file_path(ProjectSettings::get_singleton()->localize_path(p_files[i]));
instances.push_back(instantiated_scene);
}
@@ -305,7 +307,7 @@ bool SceneTreeDock::_track_inherit(const String &p_target_scene_path, Node *p_de
bool result = false;
Vector<Node *> instances;
while (true) {
- if (p->get_filename() == p_target_scene_path) {
+ if (p->get_scene_file_path() == p_target_scene_path) {
result = true;
break;
}
@@ -336,6 +338,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
current_option = p_tool;
switch (p_tool) {
+#ifdef MODULE_REGEX_ENABLED
case TOOL_BATCH_RENAME: {
if (!profile_allow_editing) {
break;
@@ -344,6 +347,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
rename_dialog->popup_centered();
}
} break;
+#endif // MODULE_REGEX_ENABLED
case TOOL_RENAME: {
if (!profile_allow_editing) {
break;
@@ -438,7 +442,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (!node_clipboard.is_empty()) {
_clear_clipboard();
}
- clipboard_source_scene = editor->get_edited_scene()->get_filename();
+ clipboard_source_scene = editor->get_edited_scene()->get_scene_file_path();
selection.sort_custom<Node::Comparator>();
@@ -461,9 +465,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
}
bool has_cycle = false;
- if (edited_scene->get_filename() != String()) {
+ if (edited_scene->get_scene_file_path() != String()) {
for (Node *E : node_clipboard) {
- if (edited_scene->get_filename() == E->get_filename()) {
+ if (edited_scene->get_scene_file_path() == E->get_scene_file_path()) {
has_cycle = true;
break;
}
@@ -492,7 +496,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor_data->get_undo_redo().add_do_method(editor_selection, "clear");
Map<RES, RES> resource_remap;
- String target_scene = editor->get_edited_scene()->get_filename();
+ String target_scene = editor->get_edited_scene()->get_scene_file_path();
if (target_scene != clipboard_source_scene) {
if (!clipboard_resource_remap.has(target_scene)) {
Map<RES, RES> remap;
@@ -804,7 +808,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
return;
}
- if (node->get_filename() != String()) {
+ if (node->get_scene_file_path() != String()) {
accept->set_text(TTR("Instantiated scenes can't become root"));
accept->popup_centered();
return;
@@ -814,14 +818,14 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor_data->get_undo_redo().add_do_method(node->get_parent(), "remove_child", node);
editor_data->get_undo_redo().add_do_method(editor, "set_edited_scene", node);
editor_data->get_undo_redo().add_do_method(node, "add_child", root);
- editor_data->get_undo_redo().add_do_method(node, "set_filename", root->get_filename());
- editor_data->get_undo_redo().add_do_method(root, "set_filename", String());
+ editor_data->get_undo_redo().add_do_method(node, "set_scene_file_path", root->get_scene_file_path());
+ editor_data->get_undo_redo().add_do_method(root, "set_scene_file_path", String());
editor_data->get_undo_redo().add_do_method(node, "set_owner", (Object *)nullptr);
editor_data->get_undo_redo().add_do_method(root, "set_owner", node);
_node_replace_owner(root, root, node, MODE_DO);
- editor_data->get_undo_redo().add_undo_method(root, "set_filename", root->get_filename());
- editor_data->get_undo_redo().add_undo_method(node, "set_filename", String());
+ editor_data->get_undo_redo().add_undo_method(root, "set_scene_file_path", root->get_scene_file_path());
+ editor_data->get_undo_redo().add_undo_method(node, "set_scene_file_path", String());
editor_data->get_undo_redo().add_undo_method(node, "remove_child", root);
editor_data->get_undo_redo().add_undo_method(editor, "set_edited_scene", root);
editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node);
@@ -844,7 +848,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
break;
}
Ref<MultiNodeEdit> mne = memnew(MultiNodeEdit);
- for (const Map<Node *, Object *>::Element *E = EditorNode::get_singleton()->get_editor_selection()->get_selection().front(); E; E = E->next()) {
+ for (const Map<Node *, Object *>::Element *E = editor_selection->get_selection().front(); E; E = E->next()) {
mne->add_node(root->get_path_to(E->key()));
}
@@ -883,7 +887,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
Node *node = remove_list[0];
if (node == editor_data->get_edited_scene_root()) {
msg = vformat(TTR("Delete the root node \"%s\"?"), node->get_name());
- } else if (node->get_filename() == "" && node->get_child_count() > 0) {
+ } else if (node->get_scene_file_path() == "" && node->get_child_count() > 0) {
// Display this message only for non-instantiated scenes
msg = vformat(TTR("Delete node \"%s\" and its children?"), node->get_name());
} else {
@@ -930,7 +934,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
break;
}
- if (tocopy != editor_data->get_edited_scene_root() && tocopy->get_filename() != "") {
+ if (tocopy != editor_data->get_edited_scene_root() && tocopy->get_scene_file_path() != "") {
accept->set_text(TTR("Can't save the branch of an already instantiated scene.\nTo create a variation of a scene, you can make an inherited scene based on the instantiated scene using Scene > New Inherited Scene... instead."));
accept->popup_centered();
break;
@@ -1043,10 +1047,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
break;
}
- ERR_FAIL_COND(node->get_filename() == String());
+ ERR_FAIL_COND(node->get_scene_file_path() == String());
undo_redo->create_action(TTR("Make Local"));
- undo_redo->add_do_method(node, "set_filename", "");
- undo_redo->add_undo_method(node, "set_filename", node->get_filename());
+ undo_redo->add_do_method(node, "set_scene_file_path", "");
+ undo_redo->add_undo_method(node, "set_scene_file_path", node->get_scene_file_path());
_node_replace_owner(node, node, root);
undo_redo->add_do_method(scene_tree, "update_tree");
undo_redo->add_undo_method(scene_tree, "update_tree");
@@ -1060,7 +1064,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (e) {
Node *node = e->get();
if (node) {
- scene_tree->emit_signal(SNAME("open"), node->get_filename());
+ scene_tree->emit_signal(SNAME("open"), node->get_scene_file_path());
}
}
} break;
@@ -1690,7 +1694,7 @@ bool SceneTreeDock::_validate_no_instance() {
List<Node *> selection = editor_selection->get_selected_node_list();
for (Node *E : selection) {
- if (E != edited_scene && E->get_filename() != "") {
+ if (E != edited_scene && E->get_scene_file_path() != "") {
accept->set_text(TTR("This operation can't be done on instantiated scenes."));
accept->popup_centered();
return false;
@@ -2097,11 +2101,11 @@ void SceneTreeDock::_update_script_button() {
if (!profile_allow_script_editing) {
button_create_script->hide();
button_detach_script->hide();
- } else if (EditorNode::get_singleton()->get_editor_selection()->get_selection().size() == 0) {
+ } else if (editor_selection->get_selection().size() == 0) {
button_create_script->hide();
button_detach_script->hide();
- } else if (EditorNode::get_singleton()->get_editor_selection()->get_selection().size() == 1) {
- Node *n = EditorNode::get_singleton()->get_editor_selection()->get_selected_node_list()[0];
+ } else if (editor_selection->get_selection().size() == 1) {
+ Node *n = editor_selection->get_selected_node_list()[0];
if (n->get_script().is_null()) {
button_create_script->show();
button_detach_script->hide();
@@ -2124,10 +2128,12 @@ void SceneTreeDock::_update_script_button() {
}
void SceneTreeDock::_selection_changed() {
- int selection_size = EditorNode::get_singleton()->get_editor_selection()->get_selection().size();
+ int selection_size = editor_selection->get_selection().size();
if (selection_size > 1) {
//automatically turn on multi-edit
_tool_selected(TOOL_MULTI_EDIT);
+ } else if (selection_size == 1) {
+ editor->push_item(editor_selection->get_selection().front()->key());
} else if (selection_size == 0) {
editor->push_item(nullptr);
}
@@ -2747,7 +2753,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
bool can_replace = true;
for (Node *E : selection) {
- if (E != edited_scene && (E->get_owner() != edited_scene || E->get_filename() != "")) {
+ if (E != edited_scene && (E->get_owner() != edited_scene || E->get_scene_file_path() != "")) {
can_replace = false;
break;
}
@@ -2779,7 +2785,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
menu->add_icon_shortcut(get_theme_icon(SNAME("CopyNodePath"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/copy_node_path"), TOOL_COPY_NODE_PATH);
}
- bool is_external = (selection[0]->get_filename() != "");
+ bool is_external = (selection[0]->get_scene_file_path() != "");
if (is_external) {
bool is_inherited = selection[0]->get_scene_inherited_state() != nullptr;
bool is_top_level = selection[0]->get_owner() == nullptr;
@@ -2807,11 +2813,13 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
}
}
+#ifdef MODULE_REGEX_ENABLED
if (profile_allow_editing && selection.size() > 1) {
//this is not a commonly used action, it makes no sense for it to be where it was nor always present.
menu->add_separator();
menu->add_icon_shortcut(get_theme_icon(SNAME("Rename"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/batch_rename"), TOOL_BATCH_RENAME);
}
+#endif // MODULE_REGEX_ENABLED
menu->add_separator();
menu->add_icon_item(get_theme_icon(SNAME("Help"), SNAME("EditorIcons")), TTR("Open Documentation"), TOOL_OPEN_DOCUMENTATION);
@@ -2837,6 +2845,11 @@ void SceneTreeDock::set_filter(const String &p_filter) {
scene_tree->set_filter(p_filter);
}
+void SceneTreeDock::save_branch_to_file(String p_directory) {
+ new_scene_from_dialog->set_current_dir(p_directory);
+ _tool_selected(TOOL_NEW_SCENE_FROM);
+}
+
void SceneTreeDock::_focus_node() {
Node *node = scene_tree->get_selected();
ERR_FAIL_COND(!node);
@@ -2872,9 +2885,9 @@ void SceneTreeDock::attach_script_to_selected(bool p_extend) {
Ref<Script> existing = selected->get_script();
- String path = selected->get_filename();
+ String path = selected->get_scene_file_path();
if (path == "") {
- String root_path = editor_data->get_edited_scene_root()->get_filename();
+ String root_path = editor_data->get_edited_scene_root()->get_scene_file_path();
if (root_path == "") {
path = String("res://").plus_file(selected->get_name());
} else {
@@ -2926,7 +2939,7 @@ void SceneTreeDock::attach_shader_to_selected() {
if (path == "") {
String root_path;
if (editor_data->get_edited_scene_root()) {
- root_path = editor_data->get_edited_scene_root()->get_filename();
+ root_path = editor_data->get_edited_scene_root()->get_scene_file_path();
}
String shader_name;
if (selected_shader_material->get_name().is_empty()) {
@@ -3163,8 +3176,7 @@ void SceneTreeDock::_create_remap_for_resource(RES p_resource, Map<RES, RES> &r_
void SceneTreeDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_owners"), &SceneTreeDock::_set_owners);
- ClassDB::bind_method(D_METHOD("_unhandled_key_input"), &SceneTreeDock::_unhandled_key_input);
- ClassDB::bind_method(D_METHOD("_input"), &SceneTreeDock::_input);
+
ClassDB::bind_method(D_METHOD("_update_script_button"), &SceneTreeDock::_update_script_button);
ClassDB::bind_method(D_METHOD("instantiate"), &SceneTreeDock::instantiate);
@@ -3317,8 +3329,10 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
create_dialog->connect("create", callable_mp(this, &SceneTreeDock::_create));
create_dialog->connect("favorites_updated", callable_mp(this, &SceneTreeDock::_update_create_root_dialog));
+#ifdef MODULE_REGEX_ENABLED
rename_dialog = memnew(RenameDialog(scene_tree, &editor_data->get_undo_redo()));
add_child(rename_dialog);
+#endif // MODULE_REGEX_ENABLED
script_create_dialog = memnew(ScriptCreateDialog);
script_create_dialog->set_inheritance_base_type("Node");
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h
index ccdc0a3786..ece0ca5ca4 100644
--- a/editor/scene_tree_dock.h
+++ b/editor/scene_tree_dock.h
@@ -62,7 +62,9 @@ class SceneTreeDock : public VBoxContainer {
TOOL_COPY,
TOOL_PASTE,
TOOL_RENAME,
+#ifdef MODULE_REGEX_ENABLED
TOOL_BATCH_RENAME,
+#endif // MODULE_REGEX_ENABLED
TOOL_REPLACE,
TOOL_EXTEND_SCRIPT,
TOOL_ATTACH_SCRIPT,
@@ -105,7 +107,9 @@ class SceneTreeDock : public VBoxContainer {
int current_option;
CreateDialog *create_dialog;
+#ifdef MODULE_REGEX_ENABLED
RenameDialog *rename_dialog;
+#endif // MODULE_REGEX_ENABLED
Button *button_add;
Button *button_instance;
@@ -210,8 +214,8 @@ class SceneTreeDock : public VBoxContainer {
void _node_prerenamed(Node *p_node, const String &p_new_name);
void _nodes_drag_begin();
- void _input(Ref<InputEvent> p_event);
- void _unhandled_key_input(Ref<InputEvent> p_event);
+ virtual void input(const Ref<InputEvent> &p_event) override;
+ virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override;
void _import_subscene();
@@ -269,6 +273,7 @@ protected:
public:
String get_filter();
void set_filter(const String &p_filter);
+ void save_branch_to_file(String p_directory);
void _focus_node();
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index e7ba80677d..ccca01ed8b 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -66,7 +66,7 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i
emit_signal(SNAME("open"), n->get_scene_inherited_state()->get_path());
}
} else {
- emit_signal(SNAME("open"), n->get_filename());
+ emit_signal(SNAME("open"), n->get_scene_file_path());
}
} else if (p_id == BUTTON_SCRIPT) {
Ref<Script> script_typed = n->get_script();
@@ -291,19 +291,21 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll
}
}
+ // Display the node name in all tooltips so that long node names can be previewed
+ // without having to rename them.
if (p_node == get_scene_node() && p_node->get_scene_inherited_state().is_valid()) {
item->add_button(0, get_theme_icon(SNAME("InstanceOptions"), SNAME("EditorIcons")), BUTTON_SUBSCENE, false, TTR("Open in Editor"));
- String tooltip = TTR("Inherits:") + " " + p_node->get_scene_inherited_state()->get_path() + "\n" + TTR("Type:") + " " + p_node->get_class();
+ String tooltip = String(p_node->get_name()) + "\n" + TTR("Inherits:") + " " + p_node->get_scene_inherited_state()->get_path() + "\n" + TTR("Type:") + " " + p_node->get_class();
if (p_node->get_editor_description() != String()) {
tooltip += "\n\n" + p_node->get_editor_description();
}
item->set_tooltip(0, tooltip);
- } else if (p_node != get_scene_node() && p_node->get_filename() != "" && can_open_instance) {
+ } else if (p_node != get_scene_node() && p_node->get_scene_file_path() != "" && can_open_instance) {
item->add_button(0, get_theme_icon(SNAME("InstanceOptions"), SNAME("EditorIcons")), BUTTON_SUBSCENE, false, TTR("Open in Editor"));
- String tooltip = TTR("Instance:") + " " + p_node->get_filename() + "\n" + TTR("Type:") + " " + p_node->get_class();
+ String tooltip = String(p_node->get_name()) + "\n" + TTR("Instance:") + " " + p_node->get_scene_file_path() + "\n" + TTR("Type:") + " " + p_node->get_class();
if (p_node->get_editor_description() != String()) {
tooltip += "\n\n" + p_node->get_editor_description();
}
@@ -315,7 +317,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll
type = p_node->get_class();
}
- String tooltip = TTR("Type:") + " " + type;
+ String tooltip = String(p_node->get_name()) + "\n" + TTR("Type:") + " " + type;
if (p_node->get_editor_description() != String()) {
tooltip += "\n\n" + p_node->get_editor_description();
}
@@ -520,7 +522,7 @@ void SceneTreeEditor::_node_removed(Node *p_node) {
if (p_node == selected) {
selected = nullptr;
- emit_signal("node_selected");
+ emit_signal(SNAME("node_selected"));
}
}
@@ -628,7 +630,7 @@ void SceneTreeEditor::_selected_changed() {
selected = get_node(np);
blocked++;
- emit_signal("node_selected");
+ emit_signal(SNAME("node_selected"));
blocked--;
}
@@ -755,7 +757,7 @@ void SceneTreeEditor::set_selected(Node *p_node, bool p_emit_selected) {
}
if (p_emit_selected) {
- emit_signal("node_selected");
+ emit_signal(SNAME("node_selected"));
}
}
@@ -952,7 +954,7 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from
Node *n = get_node(np);
if (n) {
// Only allow selection if not part of an instantiated scene.
- if (!n->get_owner() || n->get_owner() == get_scene_node() || n->get_owner()->get_filename() == String()) {
+ if (!n->get_owner() || n->get_owner() == get_scene_node() || n->get_owner()->get_scene_file_path() == String()) {
selected.push_back(n);
icons.push_back(next->get_icon(0));
}
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index ee100ca938..f024589ef1 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -138,7 +138,7 @@ void EditorSettingsDialog::_notification(int p_what) {
}
}
-void EditorSettingsDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
+void EditorSettingsDialog::unhandled_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
const Ref<InputEventKey> k = p_event;
@@ -250,6 +250,8 @@ void EditorSettingsDialog::_update_shortcuts() {
sections["Common"] = common_section;
common_section->set_text(0, TTR("Common"));
+ common_section->set_selectable(0, false);
+ common_section->set_selectable(1, false);
if (collapsed.has("Common")) {
common_section->set_collapsed(collapsed["Common"]);
}
@@ -266,7 +268,7 @@ void EditorSettingsDialog::_update_shortcuts() {
Array events; // Need to get the list of events into an array so it can be set as metadata on the item.
Vector<String> event_strings;
- List<Ref<InputEvent>> all_default_events = InputMap::get_singleton()->get_builtins().find(action_name).value();
+ List<Ref<InputEvent>> all_default_events = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied().find(action_name).value();
List<Ref<InputEventKey>> key_default_events;
// Remove all non-key events from the defaults. Only check keys, since we are in the editor.
for (List<Ref<InputEvent>>::Element *I = all_default_events.front(); I; I = I->next()) {
@@ -343,14 +345,16 @@ void EditorSettingsDialog::_update_shortcuts() {
String item_name = section_name.capitalize();
section->set_text(0, item_name);
+ section->set_selectable(0, false);
+ section->set_selectable(1, false);
+ section->set_custom_bg_color(0, shortcuts->get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
+ section->set_custom_bg_color(1, shortcuts->get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
if (collapsed.has(item_name)) {
section->set_collapsed(collapsed[item_name]);
}
sections[section_name] = section;
- section->set_custom_bg_color(0, shortcuts->get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
- section->set_custom_bg_color(1, shortcuts->get_theme_color(SNAME("prop_subsection"), SNAME("Editor")));
}
// Don't match unassigned shortcuts when searching for assigned keys in search results.
@@ -400,7 +404,7 @@ void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column
switch (button_idx) {
case SHORTCUT_REVERT: {
Array events;
- List<Ref<InputEvent>> defaults = InputMap::get_singleton()->get_builtins()[current_action];
+ List<Ref<InputEvent>> defaults = InputMap::get_singleton()->get_builtins_with_feature_overrides_applied()[current_action];
// Convert the list to an array, and only keep key events as this is for the editor.
for (const Ref<InputEvent> &k : defaults) {
@@ -538,7 +542,6 @@ void EditorSettingsDialog::_editor_restart_close() {
}
void EditorSettingsDialog::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_unhandled_input"), &EditorSettingsDialog::_unhandled_input);
ClassDB::bind_method(D_METHOD("_update_shortcuts"), &EditorSettingsDialog::_update_shortcuts);
ClassDB::bind_method(D_METHOD("_settings_changed"), &EditorSettingsDialog::_settings_changed);
}
diff --git a/editor/settings_config_dialog.h b/editor/settings_config_dialog.h
index c38fceedf1..2b6c9b3e1d 100644
--- a/editor/settings_config_dialog.h
+++ b/editor/settings_config_dialog.h
@@ -83,7 +83,7 @@ class EditorSettingsDialog : public AcceptDialog {
void _settings_property_edited(const String &p_name);
void _settings_save();
- void _unhandled_input(const Ref<InputEvent> &p_event);
+ virtual void unhandled_input(const Ref<InputEvent> &p_event) override;
void _notification(int p_what);
void _update_icons();
diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp
index 7e6f154fab..6bbefb3bb2 100644
--- a/editor/shader_create_dialog.cpp
+++ b/editor/shader_create_dialog.cpp
@@ -190,7 +190,7 @@ void ShaderCreateDialog::_create_new() {
}
}
- emit_signal("shader_created", shader);
+ emit_signal(SNAME("shader_created"), shader);
hide();
}
@@ -203,7 +203,7 @@ void ShaderCreateDialog::_load_exist() {
return;
}
- emit_signal("shader_created", p_shader);
+ emit_signal(SNAME("shader_created"), p_shader);
hide();
}
@@ -404,18 +404,18 @@ String ShaderCreateDialog::_validate_path(const String &p_path) {
void ShaderCreateDialog::_msg_script_valid(bool valid, const String &p_msg) {
error_label->set_text("- " + p_msg);
if (valid) {
- error_label->add_theme_color_override("font_color", gc->get_theme_color("success_color", "Editor"));
+ error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("success_color"), SNAME("Editor")));
} else {
- error_label->add_theme_color_override("font_color", gc->get_theme_color("error_color", "Editor"));
+ error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("error_color"), SNAME("Editor")));
}
}
void ShaderCreateDialog::_msg_path_valid(bool valid, const String &p_msg) {
path_error_label->set_text("- " + p_msg);
if (valid) {
- path_error_label->add_theme_color_override("font_color", gc->get_theme_color("success_color", "Editor"));
+ path_error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("success_color"), SNAME("Editor")));
} else {
- path_error_label->add_theme_color_override("font_color", gc->get_theme_color("error_color", "Editor"));
+ path_error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("error_color"), SNAME("Editor")));
}
}
diff --git a/editor/translations/af.po b/editor/translations/af.po
index 70e016ee65..223a1b1c45 100644
--- a/editor/translations/af.po
+++ b/editor/translations/af.po
@@ -1057,7 +1057,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Afhanklikhede"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Hulpbron"
@@ -1720,14 +1720,14 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#, fuzzy
msgid "Custom debug template not found."
msgstr "Sjabloon lêer nie gevind nie:\n"
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2129,7 +2129,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Her)Invoer van Bates"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Bo"
@@ -2632,6 +2632,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3271,6 +3295,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim Verander Transformasie"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3519,6 +3548,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5675,6 +5708,17 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Verwyder Seleksie"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6614,7 +6658,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7211,6 +7259,16 @@ msgstr "Skep"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Anim Verander Transform"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Skrap"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7739,11 +7797,12 @@ msgid "Skeleton2D"
msgstr "EnkelHouer"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Laai Verstek"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7773,6 +7832,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7884,42 +7997,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8184,6 +8277,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Skep Intekening"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -8249,7 +8347,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12344,6 +12442,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12633,6 +12739,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Alle Seleksie"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13123,164 +13234,153 @@ msgstr "Deursoek Hulp"
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Installeer"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Laai"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Kon nie vouer skep nie."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Kon nie vouer skep nie."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid package name:"
msgstr "Ongeldige naam."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13288,58 +13388,58 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "Kon nie vouer skep nie."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13347,57 +13447,57 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "Kon nie vouer skep nie."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Animasie lengte (in sekondes)."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "Kon nie vouer skep nie."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13405,21 +13505,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Vind"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Kon nie vouer skep nie."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13883,6 +13983,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14176,6 +14284,14 @@ msgstr "Moet 'n geldige uitbreiding gebruik."
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14216,6 +14332,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/ar.po b/editor/translations/ar.po
index eb11aa27b6..16cc1fd0a7 100644
--- a/editor/translations/ar.po
+++ b/editor/translations/ar.po
@@ -34,7 +34,7 @@
# Ahmed Shahwan <dev.ahmed.shahwan@gmail.com>, 2019.
# hshw <shw@tutanota.com>, 2020.
# Youssef Harmal <the.coder.crab@gmail.com>, 2020.
-# Nabeel20 <nabeelandnizam@gmail.com>, 2020.
+# Nabeel20 <nabeelandnizam@gmail.com>, 2020, 2021.
# merouche djallal <kbordora@gmail.com>, 2020.
# Airbus5717 <Abdussamadf350@gmail.com>, 2020.
# tamsamani mohamed <tamsmoha@gmail.com>, 2020.
@@ -54,12 +54,14 @@
# HASSAN GAMER - حسن جيمر <gamerhassan55@gmail.com>, 2021.
# abubakrAlsaab <madeinsudan19@gmail.com>, 2021.
# Hafid Talbi <atalbiie@gmail.com>, 2021.
+# Hareth Mohammed <harethpy@gmail.com>, 2021.
+# Mohammed Mubarak <modymu9@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-07-29 02:33+0000\n"
-"Last-Translator: Hafid Talbi <atalbiie@gmail.com>\n"
+"PO-Revision-Date: 2021-09-19 11:14+0000\n"
+"Last-Translator: Mohammed Mubarak <modymu9@gmail.com>\n"
"Language-Team: Arabic <https://hosted.weblate.org/projects/godot-engine/"
"godot/ar/>\n"
"Language: ar\n"
@@ -68,7 +70,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
-"X-Generator: Weblate 4.7.2-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -416,13 +418,11 @@ msgstr "إدخال حركة"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "لا يمكن ÙØªØ­ '%s'."
+msgstr "العقدة (node) '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
msgstr "رسوم متحركة"
@@ -432,9 +432,8 @@ msgstr "اللأعب المتحرك لا يستطيع تحريك Ù†ÙØ³Ù‡ ,ÙÙ‚Ø
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "لا خاصية '%s' موجودة."
+msgstr "الخاصية '%s'"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -662,9 +661,8 @@ msgid "Use Bezier Curves"
msgstr "إستعمل منحنيات بيزر"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Create RESET Track(s)"
-msgstr "لصق المقاطع"
+msgstr "إنشاء مسار/ات إعادة التعيين (RESET)"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -1009,7 +1007,7 @@ msgstr "لا نتائج من أجل \"%s\"."
#: editor/create_dialog.cpp editor/property_selector.cpp
msgid "No description available for %s."
-msgstr ""
+msgstr "ليس هناك وص٠مناسب لأجل s%."
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
@@ -1069,7 +1067,7 @@ msgstr ""
msgid "Dependencies"
msgstr "التبعيات"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "مورد"
@@ -1304,36 +1302,32 @@ msgid "Error opening asset file for \"%s\" (not in ZIP format)."
msgstr "حدث خطأ Ø¹Ù†Ø¯ÙØªØ­ مل٠الحزمة بسبب أن المل٠ليس ÙÙŠ صيغة \"ZIP\"."
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "%s (already exists)"
-msgstr "%s (موجود Ø¨Ø§Ù„ÙØ¹Ù„!)"
+msgstr "%s (موجود Ø¨Ø§Ù„ÙØ¹Ù„)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
-msgstr ""
+msgstr "تتعارض محتويات المصدر \"%s\" - من الملÙ(ات) %d مع مشروعك:"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - No files conflict with your project:"
-msgstr ""
+msgstr "محتويات المصدر \"%s\" - لا تتعارض مع مشروعك:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
msgstr "ÙŠÙكك الضغط عن الأصول"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "The following files failed extraction from asset \"%s\":"
-msgstr "ÙØ´Ù„ استخراج Ø§Ù„Ù…Ù„ÙØ§Øª التالية من الحزمة:"
+msgstr "ÙØ´Ù„ استخراج Ø§Ù„Ù…Ù„ÙØ§Øª التالية من الحزمة \"Ùª s\":"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "(and %s more files)"
-msgstr "Ùˆ %s أيضاً من Ø§Ù„Ù…Ù„ÙØ§Øª."
+msgstr "و %s مل٠أكثر."
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset \"%s\" installed successfully!"
-msgstr "تم تتبيث الحزمة بنجاح!"
+msgstr "تم تثبيت الحزمة \"%s\" بنجاح!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -1345,7 +1339,6 @@ msgid "Install"
msgstr "تثبيت"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset Installer"
msgstr "مثبت الحزم"
@@ -1410,9 +1403,8 @@ msgid "Bypass"
msgstr "تخطي"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Bus Options"
-msgstr "إعدادات مسار الصوت"
+msgstr "‎خيارات مسار الصوت (BUS)"
#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -1578,13 +1570,12 @@ msgid "Can't add autoload:"
msgstr "لا يمكن Ø¥Ø¶Ø§ÙØ© التحميل التلقائي:"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "%s is an invalid path. File does not exist."
-msgstr "المل٠غير موجود."
+msgstr "%s مسار غير صالح. المل٠غير موجود."
#: editor/editor_autoload_settings.cpp
msgid "%s is an invalid path. Not in resource path (res://)."
-msgstr ""
+msgstr "المسار %s غير صالح. غير موجود ÙÙŠ مسار الموارد (//:res)."
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1608,9 +1599,8 @@ msgid "Name"
msgstr "الأسم"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Global Variable"
-msgstr "إعادة تسمية Ø§Ù„Ù…ÙØªØºÙŠÙ‘ر"
+msgstr "Ù…ÙØªØºÙŠÙ‘ر عام (Global Variable)"
#: editor/editor_data.cpp
msgid "Paste Params"
@@ -1734,13 +1724,13 @@ msgstr ""
"مَكّÙÙ† 'استيراد Etc' ÙÙŠ إعدادات المشروع، أو عطّل 'تمكين التواÙÙ‚ الرجعي Ù„Ù„ØªØ¹Ø±ÙŠÙØ§Øª "
"Driver Fallback Enabled'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "نمودج تصحيح الأخطاء غير موجود."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1784,35 +1774,37 @@ msgstr "رصي٠الاستيراد"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
-msgstr ""
+msgstr "يسمح لعرض وتحرير المشاهد ثلاثية الأبعاد."
#: editor/editor_feature_profile.cpp
msgid "Allows to edit scripts using the integrated script editor."
-msgstr ""
+msgstr "يسمح بتحرير النصوص البرمجية عن طريق المحرر المدمج."
#: editor/editor_feature_profile.cpp
msgid "Provides built-in access to the Asset Library."
-msgstr ""
+msgstr "يؤمن وصول لمكتبة الملحقات من داخل المحرر."
#: editor/editor_feature_profile.cpp
msgid "Allows editing the node hierarchy in the Scene dock."
-msgstr ""
+msgstr "يسمح بتحرير تراتبية العقد عن طريق رصي٠المشهد."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to work with signals and groups of the node selected in the Scene "
"dock."
-msgstr ""
+msgstr "يسمح بالعمل مع إشارات ومجموعات العقد المحددة ÙÙŠ رصي٠المشهد."
#: editor/editor_feature_profile.cpp
msgid "Allows to browse the local file system via a dedicated dock."
-msgstr ""
+msgstr "يسمح Ø¨ØªØµÙØ­ Ù…Ù„ÙØ§Øª النظام المحلية عن طريق رصي٠خاص بذلك."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to configure import settings for individual assets. Requires the "
"FileSystem dock to function."
msgstr ""
+"يسمح بتحديد خصائص الاستيراد المتعلقة بالوسائط على حدى. يتطلب عمله رصي٠"
+"Ø§Ù„Ù…Ù„ÙØ§Øª."
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -1821,11 +1813,11 @@ msgstr "(الحالي)"
#: editor/editor_feature_profile.cpp
msgid "(none)"
-msgstr ""
+msgstr "(لاشيء)"
#: editor/editor_feature_profile.cpp
msgid "Remove currently selected profile, '%s'? Cannot be undone."
-msgstr ""
+msgstr "أترغب بإزالة المل٠المحدد '%s'؟ لا يمكنك التراجع عن ذلك."
#: editor/editor_feature_profile.cpp
msgid "Profile must be a valid filename and must not contain '.'"
@@ -1856,19 +1848,16 @@ msgid "Enable Contextual Editor"
msgstr "مكّن المحرر السياقي Contextual"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Properties:"
-msgstr "خصائص:"
+msgstr "خصائص Ø§Ù„ÙØ¦Ø© (Class):"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Main Features:"
-msgstr "المزايا"
+msgstr "المزايا الرئيسية:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Nodes and Classes:"
-msgstr "الصÙو٠المÙمكّنة:"
+msgstr "العÙقد (Nodes) ÙˆØ§Ù„ÙØ¦Ø§Øª (Classes):"
#: editor/editor_feature_profile.cpp
msgid "File '%s' format is invalid, import aborted."
@@ -1885,9 +1874,8 @@ msgid "Error saving profile to path: '%s'."
msgstr "خطأ ÙÙŠ Ø­ÙØ¸ المل٠إلى المسار: '%s'."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Reset to Default"
-msgstr "اعادة التعيين Ù„Ù„Ø¥ÙØªØ±Ø§Ø¶ÙŠØ§Øª"
+msgstr "إعادة التعيين إلى Ø§Ù„Ø§ÙØªØ±Ø§Ø¶ÙŠ"
#: editor/editor_feature_profile.cpp
msgid "Current Profile:"
@@ -1932,7 +1920,7 @@ msgstr "إعدادات الص٠(Class):"
#: editor/editor_feature_profile.cpp
msgid "Create or import a profile to edit available classes and properties."
-msgstr ""
+msgstr "أنشئ أو استورد Ù…Ù„ÙØ§Ù‹ لتحرير الصÙو٠والخصائص Ø§Ù„Ù…ØªÙˆÙØ±Ø©."
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
@@ -2120,7 +2108,7 @@ msgstr "هناك عدة مستوردات مخصوصة لعدة أنواع حدد
msgid "(Re)Importing Assets"
msgstr "إعادة إستيراد الأصول"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Ùوق"
@@ -2357,6 +2345,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"يدور عندما يعاد رسم Ù†Ø§ÙØ°Ø© المحرر.\n"
+"التحديث المستمر ممكن، الأمر الذي يعني استهلاك أكبر للطاقة. اضغط لإزالة "
+"التمكين."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2590,6 +2581,8 @@ msgid ""
"The current scene has no root node, but %d modified external resource(s) "
"were saved anyway."
msgstr ""
+"المشهد الحالي لا يملك عقدة رئيسة، ولكن %d عدّل المصدر(مصادر) خارجياً وتم Ø§Ù„Ø­ÙØ¸ "
+"عموما."
#: editor/editor_node.cpp
#, fuzzy
@@ -2627,6 +2620,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "لم يتم Ø­ÙØ¸ المشهد الحالي. Ø¥ÙØªØ­Ù‡ علي أية حال؟"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "تراجع"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "إعادة تراجع"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "لا يمكن إعادة تحميل مشهد لم يتم Ø­ÙØ¸Ù‡ من قبل."
@@ -3144,7 +3163,7 @@ msgstr "ÙØªØ­ الوثائق"
#: editor/editor_node.cpp
msgid "Questions & Answers"
-msgstr ""
+msgstr "أسئلة وإجابات"
#: editor/editor_node.cpp
msgid "Report a Bug"
@@ -3152,7 +3171,7 @@ msgstr "إرسال تقرير عن خلل برمجي"
#: editor/editor_node.cpp
msgid "Suggest a Feature"
-msgstr ""
+msgstr "اقترح ميزة"
#: editor/editor_node.cpp
msgid "Send Docs Feedback"
@@ -3257,14 +3276,12 @@ msgid "Manage Templates"
msgstr "إدارة القوالب"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Install from file"
msgstr "تثبيت من ملÙ"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Select android sources file"
-msgstr "حدد مصدر ميش:"
+msgstr "تحديد مصدر Ù…Ù„ÙØ§Øª الاندرويد"
#: editor/editor_node.cpp
msgid ""
@@ -3276,8 +3293,8 @@ msgid ""
"the \"Use Custom Build\" option should be enabled in the Android export "
"preset."
msgstr ""
-"بهذه الطريقة سيتم إعداد المشروع الخاص بك لأجل نسخ بناء أندريد مخصوصة عن طريق "
-"تنزيل قوالب المصدر البرمجي ÙÙŠ \"res://android/build\".\n"
+"بهذه الطريقة سيتم إعداد المشروع الخاص بك لأجل نسخ بناء أندرويد مخصص عن طريق "
+"تثبيت قوالب المصدر البرمجي ÙÙŠ \"res://android/build\".\n"
"يمكنك تطبيق تعديلات الخاصة على نسخة البناء للحصول على حزمة تطبيق أندرويد APK "
"معدّلة عند التصدير (زيادة Ù…Ùلحقات، تعديل مل٠AndroidManifest.xml إلخ..).\n"
"ضع ÙÙŠ بالك أنه من أجل إنشاء نسخ بناء مخصوصة بدلاً من الحزم APKs المبنية Ø³Ù„ÙØ§Ù‹ØŒ "
@@ -3291,7 +3308,7 @@ msgid ""
"Remove the \"res://android/build\" directory manually before attempting this "
"operation again."
msgstr ""
-"إن قالب البناء الخاص بالأندرويد تم تنزيله Ø³Ù„ÙØ§Ù‹ لأجل هذا المشروع ولا يمكنه "
+"قالب البناء الخاص بالأندرويد تم تنزيله Ø³Ù„ÙØ§Ù‹ لأجل هذا المشروع ولا يمكنه "
"الكتابة Ùوق البيانات السابقة.\n"
"قم بإزالة \"res://android/build\" يدوياً قبل الشروع بهذه العملية مرة أخرى."
@@ -3312,6 +3329,11 @@ msgid "Merge With Existing"
msgstr "دمج مع الموجود"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "تحويل تغيير التحريك"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "ÙØªØ­ Ùˆ تشغيل كود"
@@ -3348,7 +3370,7 @@ msgstr "حدد"
#: editor/editor_node.cpp
#, fuzzy
msgid "Select Current"
-msgstr "تحديد المجلد الحالي"
+msgstr "تحديد الحالي"
#: editor/editor_node.cpp
msgid "Open 2D Editor"
@@ -3383,9 +3405,8 @@ msgid "No sub-resources found."
msgstr "لا مصدر للسطح تم تحديده."
#: editor/editor_path.cpp
-#, fuzzy
msgid "Open a list of sub-resources."
-msgstr "لا مصدر للسطح تم تحديده."
+msgstr "ÙØªØ­ قائمة الموارد Ø§Ù„ÙØ±Ø¹ÙŠØ©."
#: editor/editor_plugin.cpp
msgid "Creating Mesh Previews"
@@ -3412,14 +3433,13 @@ msgid "Update"
msgstr "تحديث"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Version"
-msgstr "النسخة:"
+msgstr "الإصدار"
#: editor/editor_plugin_settings.cpp
#, fuzzy
msgid "Author"
-msgstr "المالكون"
+msgstr "المالك"
#: editor/editor_plugin_settings.cpp
#: editor/plugins/version_control_editor_plugin.cpp
@@ -3434,12 +3454,12 @@ msgstr "قياس:"
#: editor/editor_profiler.cpp
#, fuzzy
msgid "Frame Time (ms)"
-msgstr "وقت الاطار (ثانية)"
+msgstr "وقت الاطار (ميلي ثانية)"
#: editor/editor_profiler.cpp
#, fuzzy
msgid "Average Time (ms)"
-msgstr "متوسط الوقت (ثانية)"
+msgstr "متوسط الوقت (ميلي ثانية)"
#: editor/editor_profiler.cpp
msgid "Frame %"
@@ -3567,6 +3587,10 @@ msgid ""
msgstr ""
"يلا يتطابق نوع المورد المختار (%s) مع أي نوع متوقع لأجل هذه الخاصية (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "إجعلة مميزاً"
@@ -3660,11 +3684,11 @@ msgstr "إستيراد من عقدة:"
#: editor/export_template_manager.cpp
msgid "Open the folder containing these templates."
-msgstr ""
+msgstr "Ø§ÙØªØ­ المجلد الحاوي هذه القوالب."
#: editor/export_template_manager.cpp
msgid "Uninstall these templates."
-msgstr ""
+msgstr "إزالة تثبيت هذه القوالب."
#: editor/export_template_manager.cpp
#, fuzzy
@@ -3678,7 +3702,7 @@ msgstr "يستقبل المرايا، من ÙØ¶Ù„Ùƒ إنتظر..."
#: editor/export_template_manager.cpp
msgid "Starting the download..."
-msgstr ""
+msgstr "الشروع بالتنزيل..."
#: editor/export_template_manager.cpp
msgid "Error requesting URL:"
@@ -3721,7 +3745,7 @@ msgstr "ÙØ´Ù„ الطلب."
#: editor/export_template_manager.cpp
msgid "Download complete; extracting templates..."
-msgstr ""
+msgstr "اكتمل التحميل؛ استخراج القوالب..."
#: editor/export_template_manager.cpp
msgid "Cannot remove temporary file:"
@@ -3748,7 +3772,7 @@ msgstr ""
#: editor/export_template_manager.cpp
msgid "Best available mirror"
-msgstr ""
+msgstr "Ø£ÙØ¶Ù„ بديل Ù…ØªÙˆØ§ÙØ±"
#: editor/export_template_manager.cpp
msgid ""
@@ -3847,11 +3871,11 @@ msgstr "النسخة الحالية:"
#: editor/export_template_manager.cpp
msgid "Export templates are missing. Download them or install from a file."
-msgstr ""
+msgstr "قوالب التصدير Ù…Ùقودة. حمّلها أو نصبّها من ملÙ."
#: editor/export_template_manager.cpp
msgid "Export templates are installed and ready to be used."
-msgstr ""
+msgstr "تم تنصيب قوالب التصدير وهي جاهزة للاستعمال."
#: editor/export_template_manager.cpp
#, fuzzy
@@ -3860,7 +3884,7 @@ msgstr "Ø§ÙØªØ­ الملÙ"
#: editor/export_template_manager.cpp
msgid "Open the folder containing installed templates for the current version."
-msgstr ""
+msgstr "Ø§ÙØªØ­ المجلد الحاوي على القوالب المنصبة بالنسبة للإصدار الحالي."
#: editor/export_template_manager.cpp
msgid "Uninstall"
@@ -3888,13 +3912,13 @@ msgstr "خطأ ÙÙŠ نسخ"
#: editor/export_template_manager.cpp
msgid "Download and Install"
-msgstr ""
+msgstr "حمّل ونصّب"
#: editor/export_template_manager.cpp
msgid ""
"Download and install templates for the current version from the best "
"possible mirror."
-msgstr ""
+msgstr "حمّل ونصّب قوالب الإصدار الحالي من Ø£ÙØ¶Ù„ مصدر Ù…ØªÙˆÙØ±."
#: editor/export_template_manager.cpp
msgid "Official export templates aren't available for development builds."
@@ -3943,6 +3967,8 @@ msgid ""
"The templates will continue to download.\n"
"You may experience a short editor freeze when they finish."
msgstr ""
+"ستستمر القوالب بالتحميل.\n"
+"ربما تلاحظ تجمداً بسيطاً بالمحرر عندما ينتهي تحميلهم."
#: editor/filesystem_dock.cpp
msgid "Favorites"
@@ -4088,19 +4114,19 @@ msgstr "بحث Ø§Ù„Ù…Ù„ÙØ§Øª"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Ascending)"
-msgstr ""
+msgstr "صن٠وÙقا للاسم (تصاعدياً)"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Descending)"
-msgstr ""
+msgstr "صن٠وÙقاً للاسم (تنازلياً)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Ascending)"
-msgstr ""
+msgstr "صنّ٠وÙقاً للنوع (تصاعدياً)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Descending)"
-msgstr ""
+msgstr "صنّ٠وÙقاً للنوع (تنازلياً)"
#: editor/filesystem_dock.cpp
#, fuzzy
@@ -4122,7 +4148,7 @@ msgstr "إعادة تسمية..."
#: editor/filesystem_dock.cpp
msgid "Focus the search box"
-msgstr ""
+msgstr "حدد صندوق البحث"
#: editor/filesystem_dock.cpp
msgid "Previous Folder/File"
@@ -5484,11 +5510,11 @@ msgstr "الكل"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search templates, projects, and demos"
-msgstr ""
+msgstr "ابحث ÙÙŠ القوالب، والمشاريع والنماذج"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search assets (excluding templates, projects, and demos)"
-msgstr ""
+msgstr "ابحث ÙÙŠ الوسائط (عدا القوالب، والمشاريع، والنماذج)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Import..."
@@ -5532,7 +5558,7 @@ msgstr "مل٠أصول مضغوط"
#: editor/plugins/audio_stream_editor_plugin.cpp
msgid "Audio Preview Play/Pause"
-msgstr ""
+msgstr "معاينة الصوت شغّل/أوقÙ"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
#, fuzzy
@@ -5696,6 +5722,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "تحريك العنصر القماشي"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Ø­ÙØ¯Ø¯ القÙÙ„"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "المجموعات"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -5805,11 +5843,14 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid ""
"Project Camera Override\n"
"No project instance running. Run the project from the editor to use this "
"feature."
msgstr ""
+"تجاوز كاميرا المشروع.\n"
+"ليس هناك مشروع يعمل حالياً. شغل المشروع من المحرر لاستعمال هذه الميزة."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5899,7 +5940,7 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "RMB: Add node at position clicked."
-msgstr ""
+msgstr "زر-Ø§Ù„ÙØ£Ø±Ø©-الأيمن: ض٠العقد عند موقع الضغط."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6159,15 +6200,15 @@ msgstr "إظهار شامل"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 3.125%"
-msgstr ""
+msgstr "التكبير حتى 3.125%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 6.25%"
-msgstr ""
+msgstr "التكبير حتى 6.25%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 12.5%"
-msgstr ""
+msgstr "التكبير حتى 12.5%"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -6201,7 +6242,7 @@ msgstr "تصغير"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 1600%"
-msgstr ""
+msgstr "التكبير حتى 1600%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
@@ -6331,7 +6372,7 @@ msgstr "السطح 0"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Flat 1"
-msgstr "السطح 1"
+msgstr "المستوى 1"
#: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp
msgid "Ease In"
@@ -6639,7 +6680,13 @@ msgid "Remove Selected Item"
msgstr "مسح العنصر المحدد"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "إستيراد من المشهد"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "إستيراد من المشهد"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7239,6 +7286,16 @@ msgstr "عدد النقاط المولدة:"
msgid "Flip Portal"
msgstr "القلب Ø£Ùقياً"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "محو التَحَوّل"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "إنشاء عقدة"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "لا تملك شجرة الرسومات المتحركة مساراً لمشغل الرسومات المتحركة"
@@ -7740,12 +7797,14 @@ msgid "Skeleton2D"
msgstr "هيكل ثنائي Ø§Ù„Ø¨ÙØ¹Ø¯"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "إنشاء وضعية الراحة (من العظام)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "تحديد العظام لتكون ÙÙŠ وضعية الراحة"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "تحديد العظام لتكون ÙÙŠ وضعية الراحة"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "الكتابة Ø§Ù„Ù…ÙØªØ±Ø§ÙƒØ¨Ø© Overwrite"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7772,6 +7831,71 @@ msgid "Perspective"
msgstr "منظوري"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "متعامد"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "منظوري"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "متعامد"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "منظوري"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "متعامد"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "منظوري"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "متعامد"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "متعامد"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "منظوري"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "متعامد"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "منظوري"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "أجهض التحول."
@@ -7879,7 +8003,7 @@ msgstr "القمم"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "FPS: %d (%s ms)"
-msgstr ""
+msgstr "FPS: %d (%s جزء من الثانية)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
@@ -7890,42 +8014,22 @@ msgid "Bottom View."
msgstr "الواجهة السÙلية."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "الأسÙÙ„"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "الواجهة Ø§Ù„ÙŠÙØ³Ø±Ù‰."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "اليسار"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "الواجهة اليÙمنى."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "اليمين"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "الواجهة الأمامية."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "الأمام"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "الواجهة الخلÙية."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "الخلÙ"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "محاذاة التحوّل مع الواجهة"
@@ -8200,6 +8304,11 @@ msgid "View Portal Culling"
msgstr "إعدادات إطار العرض"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "إعدادات إطار العرض"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "اعدادات..."
@@ -8265,8 +8374,9 @@ msgid "Post"
msgstr "لاحق"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "أداة (gizmo) غير مسماة"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "مشروع غير مسمى"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8542,7 +8652,7 @@ msgstr "الأسلوب"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} color(s)"
-msgstr ""
+msgstr "{num} لون (ألوان)"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8561,7 +8671,7 @@ msgstr "ثابت اللون."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} font(s)"
-msgstr ""
+msgstr "{num} خط (خطوط)"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8570,7 +8680,7 @@ msgstr "لم يوجد!"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} icon(s)"
-msgstr ""
+msgstr "{num} أيقونة (أيقونات)"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8588,11 +8698,11 @@ msgstr "لا مصدر للسطح تم تحديده."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} currently selected"
-msgstr ""
+msgstr "{num} المختارة حالياً"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Nothing was selected for the import."
-msgstr ""
+msgstr "لم يتم اختيار شيء لأجل عملية الاستيراد."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8601,7 +8711,7 @@ msgstr "استيراد الموضوع Theme"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Importing items {n}/{n}"
-msgstr ""
+msgstr "استيراد العناصر {n}/{n}"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8620,7 +8730,7 @@ msgstr "تنقيات:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "With Data"
-msgstr ""
+msgstr "مع البيانات"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8629,15 +8739,15 @@ msgstr "اختر عÙقدة"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible color items."
-msgstr ""
+msgstr "اختيار جميع العناصر اللونية المرئية."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible color items and their data."
-msgstr ""
+msgstr "اختر جميع العناصر المرئية الملونة والبيانات المتعلقة بها."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible color items."
-msgstr ""
+msgstr "أزل اختيار العناصر الملونة المرئية."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8646,11 +8756,11 @@ msgstr "اختر عنصر إعدادات بدايةً!"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible constant items and their data."
-msgstr ""
+msgstr "اختر جميع العناصر الثابتة المرئية والبيانات المتعلقة بها."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible constant items."
-msgstr ""
+msgstr "أزل اختيار العناصر الثابتة المرئية."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8659,11 +8769,11 @@ msgstr "اختر عنصر إعدادات بدايةً!"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible font items and their data."
-msgstr ""
+msgstr "اختر جميع عناصر الخط المرئية والبيانات المتعلقة بها."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible font items."
-msgstr ""
+msgstr "أزل اختيار جميع عناصر الخط المرئية."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8682,21 +8792,23 @@ msgstr "اختر عنصر إعدادات بدايةً!"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items."
-msgstr ""
+msgstr "اختر جميع عناصر صندوق المظهر المرئية."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items and their data."
-msgstr ""
+msgstr "اختر جميع عناصر صندوق المصدر المرئية والبيانات المتعلقة بها."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible stylebox items."
-msgstr ""
+msgstr "أزل اختيار جميع عناصر صندوق المظهر المرئية."
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Caution: Adding icon data may considerably increase the size of your Theme "
"resource."
msgstr ""
+"تحذير: إن Ø¥Ø¶Ø§ÙØ© بيانات الأيقونة من الممكن أن تزيد حجم مورد الثيم الخاص بك "
+"بصورة معتبرة."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8720,7 +8832,7 @@ msgstr "إختر النقاط"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all Theme items with item data."
-msgstr ""
+msgstr "اختر جميع عناصر الثيم والبيانات المتعلقة بهم."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8729,7 +8841,7 @@ msgstr "تحديد الكل"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all Theme items."
-msgstr ""
+msgstr "أزل اختيار جميع عناصر الثيم."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8742,12 +8854,17 @@ msgid ""
"closing this window.\n"
"Close anyway?"
msgstr ""
+"تبويب استيراد العناصر يحوي عناصر مختارة. بإغلاقك Ø§Ù„Ù†Ø§ÙØ°Ø© ستخسر جميع العناصر "
+"المختارة.\n"
+"الإغلاق على أية حال؟"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Select a theme type from the list to edit its items.\n"
"You can add a custom type or import a type with its items from another theme."
msgstr ""
+"اختر نوعاً للثيم من القائمة جانباً لتحرير عناصره.\n"
+"يمكنك Ø¥Ø¶Ø§ÙØ© نوع خاص أو استيراد نوع آخر متراÙÙ‚ من عناصره من ثيم آخر."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8784,6 +8901,8 @@ msgid ""
"This theme type is empty.\n"
"Add more items to it manually or by importing from another theme."
msgstr ""
+"نوع الثيم هذا ÙØ§Ø±Øº.\n"
+"ض٠المزيد من العناصر يدوياً أو عن طريق استيرادها من ثيم آخر."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8842,7 +8961,7 @@ msgstr "مل٠خطأ، ليس مل٠نسق مسار الصوت."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Invalid file, same as the edited Theme resource."
-msgstr ""
+msgstr "مل٠غير صالح، مماثل لمصدر الثيم المحرر."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8938,29 +9057,28 @@ msgid "Cancel Item Rename"
msgstr "إعادة تسمية Ø§Ù„Ø¯ÙØ¹Ø©"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override Item"
-msgstr "يتجاوز"
+msgstr "تجاوز العنصر"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Unpin this StyleBox as a main style."
-msgstr ""
+msgstr "أزل تثبيت صندوق المظهر هذا على أنه المظهر الرئيس."
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Pin this StyleBox as a main style. Editing its properties will update the "
"same properties in all other StyleBoxes of this type."
msgstr ""
+"ثبّت صندوق المظهر هذا ليكون المظهر الرئيس. تحرير خاصياته سيحدث جميع الخاصيات "
+"المشابهة ÙÙŠ جميع صناديق المظهر من هذا النوع."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type"
-msgstr "النوع"
+msgstr "Ø¥Ø¶Ø§ÙØ© نوع"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item Type"
-msgstr "Ø¥Ø¶Ø§ÙØ© عنصر"
+msgstr "Ø¥Ø¶Ø§ÙØ© نوع للعنصر"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8974,7 +9092,7 @@ msgstr "تحميل Ø§Ù„Ø¥ÙØªØ±Ø§Ø¶ÙŠ"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Show default type items alongside items that have been overridden."
-msgstr ""
+msgstr "أظهر عناصر النمط Ø§Ù„Ø§ÙØªØ±Ø§Ø¶ÙŠ Ø¥Ù„Ù‰ جانب العناصر التي تم تجاوزها."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8983,7 +9101,7 @@ msgstr "يتجاوز"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Override all default type items."
-msgstr ""
+msgstr "تجاوز جميع أنواع العناصر Ø§Ù„Ø§ÙØªØ±Ø§Ø¶ÙŠØ©."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8997,7 +9115,7 @@ msgstr "إدارة قوالب التصدير..."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add, remove, organize and import Theme items."
-msgstr ""
+msgstr "Ø£Ø¶ÙØŒ أزل، رتّب واستورد عناصر القالب."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -9018,7 +9136,7 @@ msgstr "حدد مصدر ميش:"
msgid ""
"Toggle the control picker, allowing to visually select control types for "
"edit."
-msgstr ""
+msgstr "ÙØ¹Ù‘Ù„ Ù…ÙØ®ØªØ§Ø± التحديد، مما يسمح لك باختيار أنواع التحديد بصرياً لتحريرها."
#: editor/plugins/theme_editor_preview.cpp
msgid "Toggle Button"
@@ -9108,10 +9226,13 @@ msgstr "يمتلك، خيارات، عديدة"
#: editor/plugins/theme_editor_preview.cpp
msgid "Invalid path, the PackedScene resource was probably moved or removed."
msgstr ""
+"مسار غير صالح، غالباً مصدر المشهد الموضب PackedScene قد تمت إزالته أو نقله."
#: editor/plugins/theme_editor_preview.cpp
msgid "Invalid PackedScene resource, must have a Control node at its root."
msgstr ""
+"مصدر للمشهد الموضب PackedScene غير صالح، يجب أن يملك عقدة تحكم Control node "
+"كعقدة رئيسة."
#: editor/plugins/theme_editor_preview.cpp
#, fuzzy
@@ -9120,7 +9241,7 @@ msgstr "مل٠خطأ، ليس مل٠نسق مسار الصوت."
#: editor/plugins/theme_editor_preview.cpp
msgid "Reload the scene to reflect its most actual state."
-msgstr ""
+msgstr "أعد تحميل المشهد لإظهار الشكل الأقرب لحالته."
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase Selection"
@@ -11086,7 +11207,7 @@ msgstr "مسح الكل"
#: editor/project_manager.cpp
msgid "Also delete project contents (no undo!)"
-msgstr ""
+msgstr "كذلك ستحذ٠محتويات المشروع (لا تراجع!)"
#: editor/project_manager.cpp
msgid "Can't run project"
@@ -11122,7 +11243,7 @@ msgstr "زر "
#: editor/project_settings_editor.cpp
msgid "Physical Key"
-msgstr ""
+msgstr "الزر الÙيزيائي"
#: editor/project_settings_editor.cpp
msgid "Joy Button"
@@ -11170,7 +11291,7 @@ msgstr "الجهاز"
#: editor/project_settings_editor.cpp
msgid " (Physical)"
-msgstr ""
+msgstr " (Ùيزيائي)"
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key..."
@@ -11772,13 +11893,13 @@ msgstr "حذ٠العقدة \"%s\"؟"
#: editor/scene_tree_dock.cpp
msgid ""
"Saving the branch as a scene requires having a scene open in the editor."
-msgstr ""
+msgstr "يتطلب Ø­ÙØ¸ المشهد ÙƒÙØ±Ø¹ وجود مشهد Ù…ÙØªÙˆØ­ ÙÙŠ المحرر."
#: editor/scene_tree_dock.cpp
msgid ""
"Saving the branch as a scene requires selecting only one node, but you have "
"selected %d nodes."
-msgstr ""
+msgstr "يتطلب Ø­ÙØ¸ المشهد ÙƒÙØ±Ø¹ اختيارك عقدة واحدة Ùقط، ولكنك اخترت %d من العقد."
#: editor/scene_tree_dock.cpp
msgid ""
@@ -11787,6 +11908,10 @@ msgid ""
"FileSystem dock context menu\n"
"or create an inherited scene using Scene > New Inherited Scene... instead."
msgstr ""
+"ÙØ´Ù„ت عملية Ø­ÙØ¸ العقدة الرئيسة ÙƒÙØ±Ø¹ ÙÙŠ المشهد الموروث instanced scene.\n"
+"لإنشاء نسخة قابلة للتحرير من المشهد الحالي، ضاع٠المشهد مستخدماً قائمة رصي٠"
+"Ø§Ù„Ù…Ù„ÙØ§Øª FileSystem\n"
+"أو أنشئ مشهداً موروثاً مستعملاً مشهد > مشهد موروث جديد... بدلاً عما قمت Ø¨ÙØ¹Ù„Ù‡."
#: editor/scene_tree_dock.cpp
msgid ""
@@ -11794,6 +11919,9 @@ msgid ""
"To create a variation of a scene, you can make an inherited scene based on "
"the instanced scene using Scene > New Inherited Scene... instead."
msgstr ""
+"لا يمكن Ø­ÙØ¸ Ø§Ù„ÙØ±Ø¹ باستخدام مشهد منسوخ أساساً.\n"
+"لإنشاء تعديلة عن المشهد، يمكنك إنشاء مشهد موروث عن مشهد منسوخ مستخدماً مشهد > "
+"مشهد جديد موروث… بدلاً عن ذلك."
#: editor/scene_tree_dock.cpp
msgid "Save New Scene As..."
@@ -12199,6 +12327,8 @@ msgid ""
"Warning: Having the script name be the same as a built-in type is usually "
"not desired."
msgstr ""
+"تحذير: من غير المستحسن امتلاك النص البرمجي اسماً مماثلاً للأنواع المشابهة "
+"المدمجة بالمحرر."
#: editor/script_create_dialog.cpp
msgid "Class Name:"
@@ -12270,7 +12400,7 @@ msgstr "خطأ ÙÙŠ نسخ"
#: editor/script_editor_debugger.cpp
msgid "Open C++ Source on GitHub"
-msgstr ""
+msgstr "Ø§ÙØªØ­ مصدر ++C على GitHub"
#: editor/script_editor_debugger.cpp
msgid "Video RAM"
@@ -12459,6 +12589,16 @@ msgstr "حدد موقع نقطة الإنحناء"
msgid "Set Portal Point Position"
msgstr "حدد موقع نقطة الإنحناء"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "تعديل نص٠قطر الشكل الأسطواني"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "ضع الإنحناء ÙÙŠ الموقع"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "تغيير نص٠قطر الاسطوانة"
@@ -12748,6 +12888,11 @@ msgstr "تخطيط الإضاءات"
msgid "Class name can't be a reserved keyword"
msgstr "لا يمكن أن يكون اسم الص٠كلمة محجوزة"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "تعبئة Ø§Ù„Ù…ÙØ­Ø¯Ø¯"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "نهاية تتبع مكدس الاستثناء الداخلي"
@@ -13230,144 +13375,151 @@ msgstr "بحث VisualScript"
msgid "Get %s"
msgstr "جلب %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "اسم Ø§Ù„Ø±ÙØ²Ù…Ø© Ù…Ùقود."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "أقسام Ø§Ù„Ø±ÙØ²Ù…Ø© ينبغي أن تكون ذات Ù…Ø³Ø§ÙØ§Øª غير-ØµÙØ±ÙŠØ© non-zero length."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "إن الحر٠'%s' غير مسموح ÙÙŠ أسماء Ø­ÙØ²Ù… تطبيقات الأندرويد."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "لا يمكن أن يكون الرقم هو أول حر٠ÙÙŠ مقطع Ø§Ù„Ø±ÙØ²Ù…Ø©."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "الحر٠'%s' لا يمكن أن يكون الحر٠الأول من مقطع Ø§Ù„Ø±ÙØ²Ù…Ø©."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "يجب أن تتضمن الرزمة على الأقل واحد من الÙواصل '.' ."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "اختر جهازاً من القائمة"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
-msgstr ""
+msgstr "يعمل على %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "تصدير الكÙÙ„"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "إلغاء التثبيت"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "يستقبل المرايا، من ÙØ¶Ù„Ùƒ إنتظر..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "لا يمكن بدء عملية جانبية!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "تشغيل النص البرمجي Ø§Ù„Ù…ÙØ®ØµØµ..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "لا يمكن إنشاء المجلد."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "تعذر العثور على أداة توقيع تطبيق اندرويد\"apksigner\"."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
"لم يتم تنزيل قالب بناء Android لهذا المشروع. نزّل واحداً من قائمة المشروع."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
+"إما أن يتم يتكوين Ù…ÙØªØ§Ø­-المتجر للتنقيح البرمجي debug keystoreØŒ أو إعدادات "
+"مل٠وكلمة مرور التنقيح البرمجي سويةً debug user AND debug password، أو لاشيء "
+"مما سبق."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Ù…Ùنقح أخطاء Ù…ÙØªØ§Ø­ المتجر keystore غير Ù…Ùهيئ ÙÙŠ إعدادت Ø§Ù„Ù…ÙØ­Ø±Ø± أو ÙÙŠ الإعدادات "
"الموضوعة Ø³Ù„ÙØ§Ù‹."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
+"إم أن يتم تكوين إعدادات Ù…ÙØªØ§Ø­ التصدير release keystoreØŒ أو مل٠وكلمة مرور "
+"التصدير سوية Release User AND Release Password، أو من دونهم جميعاً."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr "تحرر مخزن Ø§Ù„Ù…ÙØ§ØªÙŠØ­ غير Ù…Ùهيئ بشكل صحيح ÙÙŠ إعدادت المسبقة للتصدير."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"مسار حزمة تطوير Android SDK للبÙنى المخصوصة، غير صالح ÙÙŠ إعدادات Ø§Ù„Ù…ÙØ­Ø±Ø±."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
"مسار حزمة تطوير Android SDK للبÙنى المخصوصة، غير صالح ÙÙŠ إعدادات Ø§Ù„Ù…ÙØ­Ø±Ø±."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
-msgstr ""
+msgstr "دليل Ù…Ù„ÙØ§Øª \"أدوات-المنصة platform-tools\" Ù…Ùقود!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
-msgstr ""
+msgstr "تعذر العثور على أمر adb الخاص بأدوات النظام الأساسي لـ Android SDK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"مسار حزمة تطوير Android SDK للبÙنى المخصوصة، غير صالح ÙÙŠ إعدادات Ø§Ù„Ù…ÙØ­Ø±Ø±."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
-msgstr ""
+msgstr "مل٠\"أدوات البناء\"build-tools Ù…Ùقود!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
+"تعذر العثور على أمر أدوات البناء الخاص بالأندرويد Android SDK build-tools "
+"الخاص بتوقيع مل٠apk (apksigner)."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Ù…ÙØªØ§Ø­ عام غير صالح لأجل تصدير حزمة تطبيق أندرويد APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "اسم Ø±ÙØ²Ù…Ø© غير صالح:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13375,95 +13527,87 @@ msgstr ""
"وحدة \"GodotPaymentV3\" المضمنة ÙÙŠ إعدادات المشروع \"android / modules\" غير "
"صالحة (تم تغييره ÙÙŠ Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "يجب ØªÙØ¹ÙŠÙ„ \"Use Custom Build\" لإستخدام Ø§Ù„Ø¥Ø¶Ø§ÙØ§Øª."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Degrees Of Freedom\" تكون صالحة Ùقط عندما يكون وضع ال \"Xr Mode\"هو "
-"\"Oculus Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"Hand Tracking\" تكون صالحة Ùقط عندما يكون وضع ال \"Xr Mode\"هو \"Oculus "
"Mobile VR\"."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Focus Awareness\" تكون صالحة Ùقط عندما يكون وضع ال \"Xr Mode\"هو \"Oculus "
-"Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
+"يصبح خيار \"تصدير ABB\" صالحاً Ùقط عندما يتم اختيار \"استعمال تصدير مخصص "
+"Custom Build\"."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
"directory.\n"
"The resulting %s is unsigned."
msgstr ""
+"تعذر العثور على 'apksigner'.\n"
+"تأكد من ÙØ¶Ù„Ùƒ إن كان الأمر موجوداً ÙÙŠ دليل Ù…Ù„ÙØ§Øª أدوات-بناء الأندرويد Android "
+"SDK build-tools.\n"
+"لم يتم توقيع الناتج %s."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
-msgstr ""
+msgstr "يتم توقيع نسخة التنقيح البرمجي %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"ÙŠÙØ­Øµ Ø§Ù„Ù…Ù„ÙØ§ØªØŒ\n"
"من ÙØ¶Ù„Ùƒ إنتظر..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "لا يمكن ÙØªØ­ القالب من أجل التصدير:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
-msgstr ""
+msgstr "أعاد 'apksigner' الخطأ التالي #%d"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Ø¥Ø¶Ø§ÙØ© %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
-msgstr ""
+msgstr "ÙØ´Ù„ت عملية توثيق 'apksigner' Ù„ %s."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "تصدير الكÙÙ„"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
+"اسم مل٠غير صالح! تتطلب حزمة تطبيق الأندرويد Android App Bundle لاحقة *.aab."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
-msgstr ""
+msgstr "توسيع APK غير متواÙÙ‚ مع حزمة تطبيق الأندرويد Android App Bundle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
-msgstr ""
+msgstr "إسم مل٠غير صالح! يتطلب مل٠APK اللاحقة ‭*.apk"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
-msgstr ""
+msgstr "صيغة تصدير غير مدعومة!\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13471,7 +13615,7 @@ msgstr ""
"تتم محاولة البناء من قالب بناء Ù…ÙØ®ØµØµØŒ ولكن لا تتواجد معلومات النسخة. من ÙØ¶Ù„Ùƒ "
"أعد التحميل من قائمة \"المشروع\"."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13483,26 +13627,27 @@ msgstr ""
"\tإصدار غودوت: %s\n"
"من ÙØ¶Ù„Ùƒ أعد تنصيب قالب بناء الأندرويد Android من قائمة \"المشروع\"."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
+"تعذرت كتابة overwrite Ù…Ù„ÙØ§Øª res://android/build/res/*.xml مع اسم المشروع"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "لا قدرة على تحرير project.godot ÙÙŠ مسار المشروع."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "لا يمكن كتابة الملÙ:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "بناء مشروع الأندرويد (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13510,58 +13655,61 @@ msgstr ""
"أخÙÙ‚ بناء مشروع الأندرويد، تÙقد Ø§Ù„Ù…ÙØ®Ø±Ø¬Ø§Øª للإطلاع على الخطأ.\n"
"بصورة بديلة يمكنك زيارة docs.godotengine.org لأجل مستندات البناء للأندرويد."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
-msgstr ""
+msgstr "نقل المخرجات"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
-msgstr ""
+msgstr "تعذر نسخ وإعادة تسمية المل٠المصدر، تÙقد مل٠مشروع gradle للمخرجات."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "لم يتم إيجاد الرسم المتحرك: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "إنشاء المحيط..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "لا يمكن ÙØªØ­ القالب من أجل التصدير:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
"Please build a template with all required libraries, or uncheck the missing "
"architectures in the export preset."
msgstr ""
+"هنالك مكاتب قوالب تصدير ناقصة بالنسبة للمعمارية المختارة: %s.\n"
+"ابن قالب التصدير متضمناً جميع المكتبات الضرورية، أو أزال اختيار المعماريات "
+"الناقصة من خيارات التصدير المعدّة مسبقاً."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Ø¥Ø¶Ø§ÙØ© %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "لا يمكن كتابة الملÙ:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
-msgstr ""
+msgstr "محاذاة مل٠APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
-msgstr ""
+msgstr "تعذر إزالة ضغط مل٠APK المؤقت غير المصÙÙˆÙ unaligned."
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "Identifier is missing."
@@ -13636,19 +13784,19 @@ msgstr "Ù…ÙØ­Ø¯Ø¯ غير صالح:"
#: platform/osx/export/export.cpp
msgid "Notarization: code signing required."
-msgstr ""
+msgstr "التوثيق: إن توقيع Ø§Ù„Ø´ÙØ±Ø© البرمجية مطلوب."
#: platform/osx/export/export.cpp
msgid "Notarization: hardened runtime required."
-msgstr ""
+msgstr "التوثيق: إن تمكين وقت التشغيل hardened runtime مطلوب."
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID name not specified."
-msgstr ""
+msgstr "التوثيق: لم يتم تحديد اسم معر٠Apple ID."
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID password not specified."
-msgstr ""
+msgstr "التوثيق: لم يتم تحديد كلمة مرور Apple ID."
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -13751,10 +13899,14 @@ msgstr ""
#: scene/2d/collision_polygon_2d.cpp
msgid "Invalid polygon. At least 3 points are needed in 'Solids' build mode."
msgstr ""
+"مضلع غير صالح. يتطلب الأمر 3 نقاط على الأقل ÙÙŠ نمط بناء \"المواد الصلبة "
+"Solids\"."
#: scene/2d/collision_polygon_2d.cpp
msgid "Invalid polygon. At least 2 points are needed in 'Segments' build mode."
msgstr ""
+"مضلع غير صالح. يتطلب الأمر على الأقل نقطتين ÙÙŠ نمط البناء \"المتجزئ Segments"
+"\"."
#: scene/2d/collision_shape_2d.cpp
msgid ""
@@ -13798,22 +13950,25 @@ msgstr ""
#: scene/2d/joints_2d.cpp
msgid "Node A and Node B must be PhysicsBody2Ds"
msgstr ""
+"يجب على العقدة A والعقدة B أن يكونا PhysicsBody2Ds (جسم Ùيزيائي ثنائي Ø§Ù„Ø¨ÙØ¹Ø¯)"
#: scene/2d/joints_2d.cpp
msgid "Node A must be a PhysicsBody2D"
-msgstr ""
+msgstr "يجب أن تكون العقدة A من النوع PhysicsBody2D (جسم Ùيزيائي ثنائي Ø§Ù„Ø¨ÙØ¹Ø¯)"
#: scene/2d/joints_2d.cpp
msgid "Node B must be a PhysicsBody2D"
-msgstr ""
+msgstr "يجب أن تكون العقدة B من النوع PhysicsBody2D (جسم Ùيزيائي ثنائي Ø§Ù„Ø¨ÙØ¹Ø¯)"
#: scene/2d/joints_2d.cpp
msgid "Joint is not connected to two PhysicsBody2Ds"
msgstr ""
+"إن Ø§Ù„Ù…ÙØµÙ„ غير متصل مع اثنين من PhysicsBody2Ds (الأجسام الÙيزيائية ثنائية "
+"البعد)"
#: scene/2d/joints_2d.cpp
msgid "Node A and Node B must be different PhysicsBody2Ds"
-msgstr ""
+msgstr "على العقدة A وكذلك العقدة B أن يكونا PhysicsBody2Ds مختلÙين"
#: scene/2d/light_2d.cpp
msgid ""
@@ -13979,7 +14134,7 @@ msgstr ""
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "إيجاد السطوح meshes والأضواء"
#: scene/3d/baked_lightmap.cpp
msgid "Preparing geometry (%d/%d)"
@@ -14115,6 +14270,14 @@ msgstr ""
"يجب أن يكون نموذج-مجسم-التنقل (NavigationMeshInstance) تابعًا أو Ø­Ùيدًا لعقدة "
"التنقل (Navigation node). انه ÙŠÙˆÙØ± Ùقط بيانات التنقل."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14442,6 +14605,14 @@ msgstr "يجب أن يستخدم صيغة صحيحة."
msgid "Enable grid minimap."
msgstr "ØªÙØ¹ÙŠÙ„ الخريطة المصغرة للشبكة."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14492,6 +14663,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "ينبغي أن يكون حجم إطار العرض أكبر من 0 ليتم الإخراج البصري لأي شيء."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14543,6 +14718,41 @@ msgstr "التعين للإنتظام."
msgid "Constants cannot be modified."
msgstr "لا يمكن تعديل الثوابت."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "إنشاء وضعية الراحة (من العظام)"
+
+#~ msgid "Bottom"
+#~ msgstr "الأسÙÙ„"
+
+#~ msgid "Left"
+#~ msgstr "اليسار"
+
+#~ msgid "Right"
+#~ msgstr "اليمين"
+
+#~ msgid "Front"
+#~ msgstr "الأمام"
+
+#~ msgid "Rear"
+#~ msgstr "الخلÙ"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "أداة (gizmo) غير مسماة"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Degrees Of Freedom\" تكون صالحة Ùقط عندما يكون وضع ال \"Xr Mode\"هو "
+#~ "\"Oculus Mobile VR\"."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Focus Awareness\" تكون صالحة Ùقط عندما يكون وضع ال \"Xr Mode\"هو "
+#~ "\"Oculus Mobile VR\"."
+
#~ msgid "Package Contents:"
#~ msgstr "محتويات الرزمة:"
diff --git a/editor/translations/az.po b/editor/translations/az.po
index 6c07f98d38..1965e41921 100644
--- a/editor/translations/az.po
+++ b/editor/translations/az.po
@@ -4,18 +4,19 @@
# This file is distributed under the same license as the Godot source code.
#
# Jafar Tarverdiyev <cefertarverdiyevv@gmail.com>, 2021.
+# Lucifer25x <umudyt2006@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2021-05-14 11:20+0000\n"
-"Last-Translator: Jafar Tarverdiyev <cefertarverdiyevv@gmail.com>\n"
+"PO-Revision-Date: 2021-09-16 14:36+0000\n"
+"Last-Translator: Lucifer25x <umudyt2006@gmail.com>\n"
"Language-Team: Azerbaijani <https://hosted.weblate.org/projects/godot-engine/"
"godot/az/>\n"
"Language: az\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.7-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -402,8 +403,9 @@ msgstr "AnimationPlayer özünü canlandıra bilməz, yalnız digər playerlər.
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "property '%s'"
-msgstr ""
+msgstr "özəllik '%s'"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -497,7 +499,7 @@ msgstr "Animasya Köçürmə Açarları"
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Clipboard is empty!"
-msgstr ""
+msgstr "Pano boÅŸdur!"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -621,7 +623,7 @@ msgstr "ÆvvÉ™lki addıma keç"
#: editor/animation_track_editor.cpp
msgid "Apply Reset"
-msgstr ""
+msgstr "Sıfırla"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -990,11 +992,11 @@ msgstr "Yeni %s yarat"
#: editor/create_dialog.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "No results for \"%s\"."
-msgstr ""
+msgstr "\"%s\" üçün nəticə yoxdur."
#: editor/create_dialog.cpp editor/property_selector.cpp
msgid "No description available for %s."
-msgstr ""
+msgstr "%s üçün heç bir təsvir yoxdur."
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
@@ -1054,7 +1056,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Asılılıqlar"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Mənbə"
@@ -1189,7 +1191,7 @@ msgstr "Godot topluluğundan təşəkkürlər!"
#: editor/editor_about.cpp editor/editor_node.cpp editor/project_manager.cpp
msgid "Click to copy."
-msgstr ""
+msgstr "Kopyalamaq üçün vurun."
#: editor/editor_about.cpp
msgid "Godot Engine contributors"
@@ -1287,20 +1289,24 @@ msgid "Licenses"
msgstr "Lisenziyalar"
#: editor/editor_asset_installer.cpp
+#, fuzzy
msgid "Error opening asset file for \"%s\" (not in ZIP format)."
-msgstr ""
+msgstr "\"%S\" üçün aktiv faylını açarkən xəta oldu (ZIP formatında deyil)."
#: editor/editor_asset_installer.cpp
msgid "%s (already exists)"
-msgstr ""
+msgstr "%s (artıq mövcuddur)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
msgstr ""
+"\" %S\" aktivinin məzmunu - %d fayl(lar) layihənizlə ziddiyyət təşkil edir:"
#: editor/editor_asset_installer.cpp
+#, fuzzy
msgid "Contents of asset \"%s\" - No files conflict with your project:"
msgstr ""
+"\"%s\" aktivinin məzmunu - Layihənizlə heç bir fayl ziddiyyət təşkil etmir:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
@@ -1321,11 +1327,11 @@ msgstr ""
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Success!"
-msgstr ""
+msgstr "UÄŸur!"
#: editor/editor_asset_installer.cpp editor/editor_node.cpp
msgid "Install"
-msgstr ""
+msgstr "Quraşdır"
#: editor/editor_asset_installer.cpp
msgid "Asset Installer"
@@ -1385,7 +1391,7 @@ msgstr ""
#: editor/editor_audio_buses.cpp
msgid "Mute"
-msgstr ""
+msgstr "Səssiz"
#: editor/editor_audio_buses.cpp
msgid "Bypass"
@@ -1697,13 +1703,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2075,7 +2081,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2553,6 +2559,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3176,6 +3206,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Animasya transformasiyasını dəyiş"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3418,6 +3453,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5462,6 +5501,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6367,7 +6416,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6953,6 +7006,14 @@ msgstr "Bezier Nöqtələrini Köçür"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Center Node"
+msgstr ""
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7447,11 +7508,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7479,6 +7540,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7586,42 +7701,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7883,6 +7978,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7948,7 +8047,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11854,6 +11953,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12135,6 +12242,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12603,159 +12714,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12763,57 +12863,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12821,54 +12921,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12876,19 +12976,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13338,6 +13438,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13627,6 +13735,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13667,6 +13783,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/bg.po b/editor/translations/bg.po
index 3045c7b781..7aab99c847 100644
--- a/editor/translations/bg.po
+++ b/editor/translations/bg.po
@@ -17,7 +17,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-03-10 22:14+0000\n"
+"PO-Revision-Date: 2021-09-20 14:46+0000\n"
"Last-Translator: Любомир ВаÑилев <lyubomirv@gmx.com>\n"
"Language-Team: Bulgarian <https://hosted.weblate.org/projects/godot-engine/"
"godot/bg/>\n"
@@ -26,7 +26,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.5.2-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -377,15 +377,13 @@ msgstr ""
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "Избиране на вÑичко"
+msgstr "възел „%s“"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "ÐнимациÑ"
+msgstr "анимациÑ"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -393,9 +391,8 @@ msgstr ""
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "СвойÑтво"
+msgstr "ÑвойÑтво „%s“"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -610,9 +607,8 @@ msgid "Use Bezier Curves"
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Create RESET Track(s)"
-msgstr "ПоÑтавÑне на пътечки"
+msgstr "Създаване на пътечка/и за ÐУЛИРÐÐЕ"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -933,9 +929,8 @@ msgid "Edit..."
msgstr "Редактиране..."
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Go to Method"
-msgstr "Преминаване към метода"
+msgstr "Към метода"
#: editor/create_dialog.cpp
msgid "Change %s Type"
@@ -1011,7 +1006,7 @@ msgstr ""
msgid "Dependencies"
msgstr "ЗавиÑимоÑти"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1051,14 +1046,14 @@ msgid "Owners Of:"
msgstr ""
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"Remove the selected files from the project? (Cannot be undone.)\n"
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
-"Да Ñе премахнат ли избраните файлове от проекта? (ДейÑтвието е необратимо)\n"
-"Ще можете да ги откриете в кошчето, ако иÑкате да ги възÑтановите."
+"Да Ñе премахнат ли избраните файлове от проекта? (ДейÑтвието е необратимо.)\n"
+"Според наÑтройката на файловата Ви ÑиÑтема, файловете ще бъдат или "
+"премеÑтени в кошчето, или окончателно изтрити."
#: editor/dependency_editor.cpp
msgid ""
@@ -1237,9 +1232,8 @@ msgid "Error opening asset file for \"%s\" (not in ZIP format)."
msgstr ""
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "%s (already exists)"
-msgstr "%s (Вече ÑъщеÑтвува)"
+msgstr "%s (вече ÑъщеÑтвува)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
@@ -1254,16 +1248,12 @@ msgid "Uncompressing Assets"
msgstr "Разархивиране на реÑурÑите"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "The following files failed extraction from asset \"%s\":"
-msgstr ""
-"Следните файлове Ñа по-нови на диÑка.\n"
-"Кое дейÑтвие трÑбва да Ñе предприеме?:"
+msgstr "Следните файлове не уÑпÑха да бъдат изнеÑени от материала „%s“:"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "(and %s more files)"
-msgstr "И още %s файл(а)."
+msgstr "(и още %s файла)"
#: editor/editor_asset_installer.cpp
msgid "Asset \"%s\" installed successfully!"
@@ -1279,9 +1269,8 @@ msgid "Install"
msgstr "ИнÑталиране"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset Installer"
-msgstr "ИнÑталиране"
+msgstr "ИнÑталатор на реÑурÑи"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
@@ -1344,7 +1333,6 @@ msgid "Bypass"
msgstr ""
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Bus Options"
msgstr "ÐаÑтройки на шината"
@@ -1541,9 +1529,8 @@ msgid "Name"
msgstr ""
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Global Variable"
-msgstr "Преименуване на променливата"
+msgstr "Глобална променлива"
#: editor/editor_data.cpp
msgid "Paste Params"
@@ -1651,13 +1638,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1772,18 +1759,16 @@ msgid "Enable Contextual Editor"
msgstr ""
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Properties:"
-msgstr "Свиване на вÑички ÑвойÑтва"
+msgstr "СвойÑтва на клаÑа:"
#: editor/editor_feature_profile.cpp
msgid "Main Features:"
msgstr ""
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Nodes and Classes:"
-msgstr "Включени клаÑове:"
+msgstr "Възли и клаÑове:"
#: editor/editor_feature_profile.cpp
msgid "File '%s' format is invalid, import aborted."
@@ -1800,7 +1785,6 @@ msgid "Error saving profile to path: '%s'."
msgstr "Грешка при запазването на профила в: „%s“."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Reset to Default"
msgstr "Връщане на Ñтандартните наÑтройки"
@@ -1809,14 +1793,12 @@ msgid "Current Profile:"
msgstr "Текущ профил:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Create Profile"
-msgstr "Изтриване на профила"
+msgstr "Създаване на профил"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Remove Profile"
-msgstr "Премахване на плочката"
+msgstr "Изтриване на профила"
#: editor/editor_feature_profile.cpp
msgid "Available Profiles:"
@@ -1836,14 +1818,12 @@ msgid "Export"
msgstr "ИзнаÑÑне"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Configure Selected Profile:"
-msgstr "Текущ профил:"
+msgstr "ÐаÑтройка на Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Extra Options:"
-msgstr "ÐаÑтройки на клаÑа:"
+msgstr "Допълнителни наÑтройки:"
#: editor/editor_feature_profile.cpp
msgid "Create or import a profile to edit available classes and properties."
@@ -1874,7 +1854,6 @@ msgid "Select Current Folder"
msgstr "Избиране на текущата папка"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "File exists, overwrite?"
msgstr "Файлът ÑъщеÑтвува. ИÑкате ли да го презапишете?"
@@ -2035,7 +2014,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Повторно) внаÑÑне на реÑурÑите"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2513,6 +2492,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Текущата Ñцена не е запазена. ОтварÑне въпреки това?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Сцена, коÑто никога не е била запазвана, не може да бъде презаредена."
@@ -2589,14 +2592,14 @@ msgid "Unable to load addon script from path: '%s'."
msgstr "Ðе може да Ñе зареди добавката-Ñкрипт от: „%s“."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"Unable to load addon script from path: '%s'. This might be due to a code "
"error in that script.\n"
"Disabling the addon at '%s' to prevent further errors."
msgstr ""
-"Ðе може да Ñе зареди добавката-Ñкрипт от: „%s“. Изглежда има грешка в кода. "
-"МолÑ, проверете ÑинтакÑиÑа."
+"Ðе може да Ñе зареди добавката-Ñкрипт от: „%s“. Възможно е да има грешка в "
+"кода.\n"
+"Добавката „%s“ ще бъде изключена, за да Ñе предотвратÑÑ‚ поÑледващи проблеми."
#: editor/editor_node.cpp
msgid ""
@@ -2861,9 +2864,8 @@ msgid "Orphan Resource Explorer..."
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reload Current Project"
-msgstr "Преименуване на проекта"
+msgstr "Презареждане на Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ Ð¿Ñ€Ð¾ÐµÐºÑ‚"
#: editor/editor_node.cpp
msgid "Quit to Project List"
@@ -3001,9 +3003,8 @@ msgid "Help"
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Online Documentation"
-msgstr "ОтварÑне на документациÑта"
+msgstr "Ð”Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ Ð² Интернет"
#: editor/editor_node.cpp
msgid "Questions & Answers"
@@ -3026,9 +3027,8 @@ msgid "Community"
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "About Godot"
-msgstr "ОтноÑно"
+msgstr "ОтноÑно Godot"
#: editor/editor_node.cpp
msgid "Support Godot Development"
@@ -3120,9 +3120,8 @@ msgid "Manage Templates"
msgstr "Управление на шаблоните"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Install from file"
-msgstr "ИнÑталиране и редактиране"
+msgstr "ИнÑталиране от файл"
#: editor/editor_node.cpp
#, fuzzy
@@ -3165,6 +3164,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "ПромÑна на транÑÑ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ (ÐнимациÑ)"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3187,9 +3191,8 @@ msgid "Resave"
msgstr "ПрезапиÑване"
#: editor/editor_node.cpp
-#, fuzzy
msgid "New Inherited"
-msgstr "Ðов Ñкрипт"
+msgstr "Ðова наÑледена Ñцена"
#: editor/editor_node.cpp
msgid "Load Errors"
@@ -3200,9 +3203,8 @@ msgid "Select"
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Select Current"
-msgstr "Избиране на текущата папка"
+msgstr "Избиране на текущото"
#: editor/editor_node.cpp
msgid "Open 2D Editor"
@@ -3265,14 +3267,12 @@ msgid "Update"
msgstr ""
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Version"
-msgstr "ВерÑиÑ:"
+msgstr "ВерÑиÑ"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Author"
-msgstr "Ðвтори"
+msgstr "Ðвтор"
#: editor/editor_plugin_settings.cpp
#: editor/plugins/version_control_editor_plugin.cpp
@@ -3285,9 +3285,8 @@ msgid "Measure:"
msgstr ""
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Frame Time (ms)"
-msgstr "Време (Ñек): "
+msgstr "ПродължителноÑÑ‚ на кадъра (мÑек)"
#: editor/editor_profiler.cpp
msgid "Average Time (ms)"
@@ -3412,6 +3411,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -3431,9 +3434,8 @@ msgid "Paste"
msgstr "ПоÑтавÑне"
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
-#, fuzzy
msgid "Convert to %s"
-msgstr "Преобразуване в Mesh2D"
+msgstr "Преобразуване в %s"
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "New %s"
@@ -3511,9 +3513,8 @@ msgid "There are no mirrors available."
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Retrieving the mirror list..."
-msgstr "Свързване Ñ Ð¾Ð³Ð»ÐµÐ´Ð°Ð»Ð½Ð¾Ñ‚Ð¾ меÑтоположение..."
+msgstr "Получаване на ÑпиÑъка Ñ Ð¾Ð³Ð»ÐµÐ´Ð°Ð»Ð½Ð¸ меÑтоположениÑ..."
#: editor/export_template_manager.cpp
msgid "Starting the download..."
@@ -3524,7 +3525,6 @@ msgid "Error requesting URL:"
msgstr "Грешка при заÑвката за адреÑ:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Connecting to the mirror..."
msgstr "Свързване Ñ Ð¾Ð³Ð»ÐµÐ´Ð°Ð»Ð½Ð¾Ñ‚Ð¾ меÑтоположение..."
@@ -3533,9 +3533,8 @@ msgid "Can't resolve the requested address."
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't connect to the mirror."
-msgstr "Свързване Ñ Ð¾Ð³Ð»ÐµÐ´Ð°Ð»Ð½Ð¾Ñ‚Ð¾ меÑтоположение..."
+msgstr "Огледалното меÑтоположение е недоÑтъпно."
#: editor/export_template_manager.cpp
msgid "No response from the mirror."
@@ -3547,14 +3546,12 @@ msgid "Request failed."
msgstr "ЗаÑвката беше неуÑпешна."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Request ended up in a redirect loop."
-msgstr "ЗаÑвката Ñе провали. Твърде много пренаÑочваниÑ"
+msgstr "ЗаÑвката попадна в цикъл от пренаÑочваниÑ."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Request failed:"
-msgstr "ЗаÑвката беше неуÑпешна."
+msgstr "ЗаÑвката беше неуÑпешна:"
#: editor/export_template_manager.cpp
msgid "Download complete; extracting templates..."
@@ -3631,9 +3628,8 @@ msgid "SSL Handshake Error"
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't open the export templates file."
-msgstr "Управление на шаблоните за изнаÑÑне..."
+msgstr "Файлът Ñ ÑˆÐ°Ð±Ð»Ð¾Ð½Ð¸Ñ‚Ðµ за изнаÑÑне не може да Ñе отвори."
#: editor/export_template_manager.cpp
msgid "Invalid version.txt format inside the export templates file: %s."
@@ -3644,9 +3640,8 @@ msgid "No version.txt found inside the export templates file."
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for extracting templates:"
-msgstr "Грешка при Ñъздаването на път за шаблоните:"
+msgstr "Грешка при Ñъздаването на път за разархивиране на шаблоните:"
#: editor/export_template_manager.cpp
msgid "Extracting Export Templates"
@@ -3681,9 +3676,8 @@ msgid "Export templates are installed and ready to be used."
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open Folder"
-msgstr "ОтварÑне на файл"
+msgstr "ОтварÑне на папката"
#: editor/export_template_manager.cpp
msgid "Open the folder containing installed templates for the current version."
@@ -3698,19 +3692,16 @@ msgid "Uninstall templates for the current version."
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Download from:"
-msgstr "Грешка при ÑвалÑнето"
+msgstr "СвалÑне от:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "ОтварÑне във Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¸Ñ Ð¼ÐµÐ½Ð¸Ð´Ð¶ÑŠÑ€"
+msgstr "ОтварÑне в уеб браузъра"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "Копиране на грешката"
+msgstr "Копиране на адреÑа на огледалното меÑтоположение"
#: editor/export_template_manager.cpp
msgid "Download and Install"
@@ -3727,14 +3718,12 @@ msgid "Official export templates aren't available for development builds."
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install from File"
-msgstr "ИнÑталиране и редактиране"
+msgstr "ИнÑталиране от файл"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install templates from a local file."
-msgstr "ВнаÑÑне на шаблони от архив във формат ZIP"
+msgstr "ВнаÑÑне на шаблони от локален файл."
#: editor/export_template_manager.cpp editor/find_in_files.cpp
#: editor/progress_dialog.cpp scene/gui/dialogs.cpp
@@ -3746,14 +3735,12 @@ msgid "Cancel the download of the templates."
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Other Installed Versions:"
-msgstr "ИнÑталирани верÑии:"
+msgstr "Други инÑталирани верÑии:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uninstall Template"
-msgstr "Управление на шаблоните"
+msgstr "ДеинÑталиране на шаблона"
#: editor/export_template_manager.cpp
msgid "Select Template File"
@@ -3905,9 +3892,8 @@ msgid "Collapse All"
msgstr "Свиване на вÑичко"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort files"
-msgstr "ТърÑене на файлове"
+msgstr "Сортиране на файлове"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Ascending)"
@@ -4245,14 +4231,12 @@ msgid "Failed to load resource."
msgstr "РеÑурÑÑŠÑ‚ не може да бъде зареден."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Copy Properties"
-msgstr "Свиване на вÑички ÑвойÑтва"
+msgstr "Копиране на ÑвойÑтвата"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Paste Properties"
-msgstr "СвойÑтва на темата"
+msgstr "ПоÑтавÑне на ÑвойÑтвата"
#: editor/inspector_dock.cpp
msgid "Make Sub-Resources Unique"
@@ -4277,14 +4261,12 @@ msgid "Save As..."
msgstr "Запазване като..."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Extra resource options."
-msgstr "Ðе е в Ð¿ÑŠÑ‚Ñ Ð½Ð° реÑурÑите."
+msgstr "Допълнителни наÑтройки на реÑурÑа."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Edit Resource from Clipboard"
-msgstr "ÐÑма реÑурÑâ€“Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð² буфера за обмен!"
+msgstr "Редактиране на реÑÑƒÑ€Ñ Ð¾Ñ‚ буфера за обмен"
#: editor/inspector_dock.cpp
msgid "Copy Resource"
@@ -4307,9 +4289,8 @@ msgid "History of recently edited objects."
msgstr "ИÑÑ‚Ð¾Ñ€Ð¸Ñ Ð½Ð° поÑледно редактираните обекти."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Open documentation for this object."
-msgstr "ОтварÑне на документациÑта"
+msgstr "ОтварÑне на документациÑта за този обект."
#: editor/inspector_dock.cpp editor/scene_tree_dock.cpp
msgid "Open Documentation"
@@ -4320,9 +4301,8 @@ msgid "Filter properties"
msgstr "Филтриране на ÑвойÑтвата"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Manage object properties."
-msgstr "СвойÑтва на обекта."
+msgstr "Управление на ÑвойÑтвата на обекта."
#: editor/inspector_dock.cpp
msgid "Changes may be lost!"
@@ -4567,9 +4547,8 @@ msgid "Blend:"
msgstr "СмеÑване:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Parameter Changed:"
-msgstr "Параметърът е променен"
+msgstr "Параметърът е променен:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -5203,9 +5182,8 @@ msgid "Got:"
msgstr "Получено:"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Failed SHA-256 hash check"
-msgstr "ÐеуÑпешна проверка на хеш от вид „sha256“"
+msgstr "ÐеуÑпешна проверка на хеш от вид SHA-256"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
@@ -5353,13 +5331,13 @@ msgstr ""
"Запазете Ñцената и опитайте отново."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"No meshes to bake. Make sure they contain an UV2 channel and that the 'Use "
"In Baked Light' and 'Generate Lightmap' flags are on."
msgstr ""
"ÐÑма полигонни мрежи за изпичане. Уверете Ñе, че те Ñъдържат канал UV2 и че "
-"флагът „Изпичане на Ñветлината“ е включен."
+"флаговете „Използване при изпичане на Ñветлината“ и „Създаване на карта на "
+"оÑветеноÑт“ Ñа включени."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed creating lightmap images, make sure path is writable."
@@ -5382,7 +5360,6 @@ msgstr ""
"принадлежат на квадратната облаÑÑ‚ [0.0,1.0]."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
@@ -5503,6 +5480,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Заключване на избраното"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Групи"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -5677,27 +5666,23 @@ msgstr "Режим на избиране"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Drag: Rotate selected node around pivot."
-msgstr "Премахване на Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ð²ÑŠÐ·ÐµÐ» или преход."
+msgstr "Влачене: Въртене на Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ð²ÑŠÐ·ÐµÐ» около централната му точка."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Alt+Drag: Move selected node."
-msgstr "Alt+Влачене: премеÑтване"
+msgstr "Alt+Влачене: премеÑтване на Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ð²ÑŠÐ·ÐµÐ»."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "V: Set selected node's pivot position."
-msgstr "Премахване на Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¸Ñ Ð²ÑŠÐ·ÐµÐ» или преход."
+msgstr "V: Задаване на централната точка на възела."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Alt+RMB: Show list of all nodes at position clicked, including locked."
msgstr ""
-"Показване на ÑпиÑък Ñ Ð²Ñички обекти на щракнатата позициÑ\n"
-"(Ñъщото като Alt+ДеÑен бутон в режим на избиране)."
+"Alt+ДеÑен бутон: Показване на ÑпиÑък Ñ Ð²Ñички обекти на щракнатата позициÑ, "
+"включително заключените."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "RMB: Add node at position clicked."
@@ -5729,7 +5714,7 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Click to change object's rotation pivot."
-msgstr ""
+msgstr "Щракнете, за да промените централната точка за въртене на обекта."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Pan Mode"
@@ -5934,14 +5919,12 @@ msgid "Clear Pose"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Add Node Here"
-msgstr "ДобавÑне на възел"
+msgstr "ДобавÑне на възел тук"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Instance Scene Here"
-msgstr "Вмъкване на ключ тук"
+msgstr "ИнÑтанциране на Ñцената тук"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
@@ -5968,34 +5951,28 @@ msgid "Zoom to 12.5%"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 25%"
-msgstr "Отдалечаване"
+msgstr "Мащабиране на 25%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 50%"
-msgstr "Отдалечаване"
+msgstr "Мащабиране на 50%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 100%"
-msgstr "Отдалечаване"
+msgstr "Мащабиране на 100%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 200%"
-msgstr "Отдалечаване"
+msgstr "Мащабиране на 200%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 400%"
-msgstr "Отдалечаване"
+msgstr "Мащабиране на 400%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 800%"
-msgstr "Отдалечаване"
+msgstr "Мащабиране на 800%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 1600%"
@@ -6162,9 +6139,8 @@ msgid "Remove Point"
msgstr "Премахване на точката"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Left Linear"
-msgstr "Линейно"
+msgstr "Линейно отлÑво"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Right Linear"
@@ -6219,9 +6195,9 @@ msgid "Mesh is empty!"
msgstr "Полигонната мрежа е празна!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Couldn't create a Trimesh collision shape."
-msgstr "ÐеуÑпешно Ñъздаване на папка."
+msgstr ""
+"Ðе може да Ñе Ñъздаде форма за ÐºÐ¾Ð»Ð¸Ð·Ð¸Ñ Ð¾Ñ‚ тип полигонна мрежа от триъгълници."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -6244,9 +6220,8 @@ msgid "Couldn't create a single convex collision shape."
msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Shape"
-msgstr "Създаване на единична изпъкнала форма"
+msgstr "Създаване на опроÑтена изпъкнала форма"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Single Convex Shape"
@@ -6431,7 +6406,13 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "ВнаÑÑне от Ñцена"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "ВнаÑÑне от Ñцена"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7009,19 +6990,27 @@ msgid "Flip Portals"
msgstr ""
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Room Generate Points"
-msgstr "ПремеÑтване на точки на Безие"
+msgstr "Точки за генериране на ÑтаÑ"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Generate Points"
-msgstr "Изтриване на точка"
+msgstr "Генериране на точки"
#: editor/plugins/room_manager_editor_plugin.cpp
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "ИзчиÑтване на транÑформациÑта"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Създаване на възел"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7520,11 +7509,12 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Връщане на Ñтандартните наÑтройки"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7552,6 +7542,63 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Долу влÑво"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "ЛÑв бутон"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "ДеÑен бутон"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7578,24 +7625,21 @@ msgid "None"
msgstr "ÐÑма"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Rotate"
-msgstr "Режим на завъртане"
+msgstr "РотациÑ"
#. TRANSLATORS: This refers to the movement that changes the position of an object.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translate"
-msgstr "ТранÑлиране: "
+msgstr "ТранÑлиране"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scale"
-msgstr "Мащаб:"
+msgstr "Скалиране"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scaling: "
-msgstr ""
+msgstr "Скалиране: "
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Translating: "
@@ -7603,7 +7647,7 @@ msgstr "ТранÑлиране: "
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotating %s degrees."
-msgstr ""
+msgstr "Завъртане на %s градуÑа."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Keying is disabled (no key inserted)."
@@ -7622,37 +7666,32 @@ msgid "Yaw:"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Size:"
-msgstr "Изглед Отпред."
+msgstr "Размер:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn:"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Material Changes:"
-msgstr "Параметърът е променен"
+msgstr "Промени в материала:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Shader Changes:"
-msgstr "Параметърът е променен"
+msgstr "Промени в шейдъра:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes:"
-msgstr "Точки на повърхноÑтта"
+msgstr "Промени в повърхнината:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Draw Calls:"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices:"
-msgstr "Вертикала:"
+msgstr "ВертекÑи:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "FPS: %d (%s ms)"
@@ -7667,42 +7706,22 @@ msgid "Bottom View."
msgstr "Изглед отдолу."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Изглед отлÑво."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Изглед отдÑÑно."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Изглед отпред."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Изглед отзад."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "ПодравнÑване на транÑформациÑта Ñ Ð¸Ð·Ð³Ð»ÐµÐ´Ð°"
@@ -7811,9 +7830,8 @@ msgid "Freelook Slow Modifier"
msgstr "Модификатор за забавÑне на ÑÐ²Ð¾Ð±Ð¾Ð´Ð½Ð¸Ñ Ð¸Ð·Ð³Ð»ÐµÐ´"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Camera Preview"
-msgstr "Превключване на любимите"
+msgstr "Превключване на изгледа за преглед на камерата"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
@@ -7831,9 +7849,8 @@ msgid ""
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Convert Rooms"
-msgstr "Преобразуване в Mesh2D"
+msgstr "Преобразуване на Ñтаите"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
@@ -7849,9 +7866,8 @@ msgid ""
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Snap Nodes to Floor"
-msgstr "Следващ под"
+msgstr "Прилепване на възлите към пода"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Couldn't find a solid floor to snap the selection to."
@@ -7967,6 +7983,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Редактиране на полигона за прикриване"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "ÐаÑтройки…"
@@ -8032,7 +8053,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -8276,33 +8297,28 @@ msgid "Step:"
msgstr "Стъпка:"
#: editor/plugins/texture_region_editor_plugin.cpp
-#, fuzzy
msgid "Separation:"
-msgstr "ВерÑиÑ:"
+msgstr "Разделение:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "TextureRegion"
msgstr "ТекÑтурна облаÑÑ‚"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Colors"
-msgstr "Цват"
+msgstr "Цветове"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Fonts"
-msgstr "Шрифт"
+msgstr "Шрифтове"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Icons"
-msgstr "Иконка"
+msgstr "Иконки"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Styleboxes"
-msgstr "Стил"
+msgstr "Стилове"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} color(s)"
@@ -8313,14 +8329,12 @@ msgid "No colors found."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "{num} constant(s)"
-msgstr "КонÑтанти"
+msgstr "{num} конÑтанта/и"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No constants found."
-msgstr "КонÑтанта за цвÑÑ‚."
+msgstr "ÐÑма намерени конÑтанти."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} font(s)"
@@ -8355,28 +8369,24 @@ msgid "Nothing was selected for the import."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Importing Theme Items"
-msgstr "ВнаÑÑне на тема"
+msgstr "ВнаÑÑне на елементите на темата"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Importing items {n}/{n}"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Updating the editor"
-msgstr "ОбновÑване на Ñцената"
+msgstr "ОбновÑване на редактора"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Finalizing"
-msgstr "Ðнализиране"
+msgstr "Завършване"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Filter:"
-msgstr "Филтри:"
+msgstr "Филтриране:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "With Data"
@@ -8387,9 +8397,8 @@ msgid "Select by data type:"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible color items."
-msgstr "Избери разделение и го изтрий"
+msgstr "Избиране на вÑички видими цветни елементи."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible color items and their data."
@@ -8454,23 +8463,20 @@ msgid ""
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Collapse types."
-msgstr "Свиване на вÑичко"
+msgstr "Свиване на типовете."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Expand types."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all Theme items."
-msgstr "Избор на шаблонен файл"
+msgstr "Избиране на вÑички елементи – теми."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select With Data"
-msgstr "Избиране на метод"
+msgstr "Избиране Ñ Ð´Ð°Ð½Ð½Ð¸Ñ‚Ðµ"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all Theme items with item data."
@@ -8486,9 +8492,8 @@ msgid "Deselect all Theme items."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Selected"
-msgstr "ВнаÑÑне на Ñцена"
+msgstr "ВнаÑÑне на избраното"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -8504,34 +8509,28 @@ msgid ""
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Color Items"
-msgstr "Премахване на вÑички елементи"
+msgstr "Премахване на вÑички елементи – цветове"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Item"
-msgstr "Преименуван"
+msgstr "Преименуване на елемента"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Constant Items"
-msgstr "Премахване на вÑички елементи"
+msgstr "Премахване на вÑички елементи – конÑтанти"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Font Items"
-msgstr "Премахване на вÑички елементи"
+msgstr "Премахване на вÑички елементи – шрифтове"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Icon Items"
-msgstr "Премахване на вÑички елементи"
+msgstr "Премахване на вÑички елементи – иконки"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All StyleBox Items"
-msgstr "Премахване на вÑички елементи"
+msgstr "Премахване на вÑички елементи – Ñтилове"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -8540,149 +8539,124 @@ msgid ""
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Color Item"
-msgstr "ДобавÑне на вÑички елементи"
+msgstr "ДобавÑне на елемент – цвÑÑ‚"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Constant Item"
-msgstr "КонÑтанта"
+msgstr "ДобавÑне на елемент – конÑтанта"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Font Item"
-msgstr "ДобавÑне на вÑички елементи"
+msgstr "ДобавÑне на елемент – шрифт"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Icon Item"
-msgstr "ДобавÑне на вÑички елементи"
+msgstr "ДобавÑне на елемент – иконка"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Stylebox Item"
-msgstr "ДобавÑне на вÑички елементи"
+msgstr "ДобавÑне на елемент – Ñтил"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Color Item"
-msgstr "Премахване на вÑички елементи"
+msgstr "Преименуване на елемента – цвÑÑ‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Rename Constant Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Font Item"
-msgstr "Преименуване на функциÑта"
+msgstr "Преименуване на елемента – шрифт"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Icon Item"
-msgstr "Преименуване на функциÑта"
+msgstr "Преименуване на елемента – иконка"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Stylebox Item"
-msgstr "Премахване на вÑички елементи"
+msgstr "Преименуване на елемента – Ñтил"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Invalid file, not a Theme resource."
-msgstr "РеÑурÑÑŠÑ‚ не може да бъде зареден."
+msgstr "Ðеправилен файл – не е реÑÑƒÑ€Ñ Ð¾Ñ‚ тип тема."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Invalid file, same as the edited Theme resource."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Theme Items"
-msgstr "Управление на шаблоните"
+msgstr "Управление на елементите на темата"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Edit Items"
-msgstr "Редактируем елемент"
+msgstr "Редактиране на елементите"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Types:"
-msgstr "Тип:"
+msgstr "Типове:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type:"
-msgstr "Тип:"
+msgstr "ДобавÑне на тип:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item:"
-msgstr "ДобавÑне на вÑички елементи"
+msgstr "ДобавÑне на елемент:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add StyleBox Item"
-msgstr "ДобавÑне на вÑички елементи"
+msgstr "ДобавÑне на елемент на Ñтила"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Items:"
-msgstr "Премахване на вÑички елементи"
+msgstr "Премахване на елементи:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Class Items"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Items"
-msgstr "Премахване на вÑички елементи"
+msgstr "Премахване на перÑонализираните елементи"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Items"
msgstr "Премахване на вÑички елементи"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Theme Item"
-msgstr "ДобавÑне на вÑички елементи"
+msgstr "ДобавÑне на елемент на темата"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Old Name:"
-msgstr "Име:"
+msgstr "Старо име:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Items"
-msgstr "ВнаÑÑне на тема"
+msgstr "ВнаÑÑне на елементи"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Theme"
-msgstr "Презареждане на темата"
+msgstr "Тема по подразбиране"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Editor Theme"
-msgstr "Редактиране на темата"
+msgstr "Тема на редактора"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select Another Theme Resource:"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Another Theme"
-msgstr "ВнаÑÑне на тема"
+msgstr "Друга тема"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Confirm Item Rename"
-msgstr "ÐаÑтройване на прилепването"
+msgstr "Потвърждаване на преименуването на елемента"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Cancel Item Rename"
@@ -8703,66 +8677,56 @@ msgid ""
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type"
-msgstr "ДобавÑне на възел"
+msgstr "ДобавÑне на тип"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item Type"
-msgstr "ДобавÑне на вÑички елементи"
+msgstr "ДобавÑне на тип елемент"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Node Types:"
-msgstr "Тип на възела"
+msgstr "Типове на възлите:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Show Default"
-msgstr "ВнаÑÑне на преводи"
+msgstr "Показване на Ñтандартните"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Show default type items alongside items that have been overridden."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override All"
-msgstr "Запазване на вÑичко"
+msgstr "ЗамÑна на вÑичко"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Override all default type items."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Theme:"
-msgstr "Тема"
+msgstr "Тема:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Items..."
-msgstr "Управление на шаблоните за изнаÑÑне..."
+msgstr "Управление на елементите..."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add, remove, organize and import Theme items."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Preview"
-msgstr "Преглед"
+msgstr "ДобавÑне на преглед"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Preview"
-msgstr "ОбновÑване на Ð¿Ñ€ÐµÐ´Ð²Ð°Ñ€Ð¸Ñ‚ÐµÐ»Ð½Ð¸Ñ Ð¿Ñ€ÐµÐ³Ð»ÐµÐ´"
+msgstr "Стандартен предварителен преглед"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select UI Scene:"
-msgstr "Изберете източник за полигонна мрежа:"
+msgstr "Изберете Ñцена за потребителÑки интерфейÑ:"
#: editor/plugins/theme_editor_preview.cpp
msgid ""
@@ -8803,9 +8767,8 @@ msgid "Checked Radio Item"
msgstr ""
#: editor/plugins/theme_editor_preview.cpp
-#, fuzzy
msgid "Named Separator"
-msgstr "Именуван разд."
+msgstr "Именуван разделител"
#: editor/plugins/theme_editor_preview.cpp
msgid "Submenu"
@@ -9021,9 +8984,8 @@ msgid "Collision"
msgstr "КолизиÑ"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Occlusion"
-msgstr "ПриÑтавки"
+msgstr "Прикриване"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Navigation"
@@ -9054,9 +9016,8 @@ msgid "Collision Mode"
msgstr "Режим на колизии"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Occlusion Mode"
-msgstr "ПриÑтавки"
+msgstr "Режим на прикриване"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Navigation Mode"
@@ -10190,9 +10151,8 @@ msgid "VisualShader"
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Edit Visual Property:"
-msgstr "Редактиране на визуалното ÑвойÑтво"
+msgstr "Редактиране на визуално ÑвойÑтво:"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Visual Shader Mode Changed"
@@ -10233,7 +10193,7 @@ msgstr ""
#: editor/project_export.cpp
msgid "Export templates for this platform are missing/corrupted:"
-msgstr ""
+msgstr "Шаблоните за изнаÑÑне за тази платформа липÑват или Ñа повредени:"
#: editor/project_export.cpp
msgid "Presets"
@@ -10241,7 +10201,7 @@ msgstr ""
#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add..."
-msgstr ""
+msgstr "ДобавÑне..."
#: editor/project_export.cpp
msgid ""
@@ -10255,7 +10215,7 @@ msgstr "Път за изнаÑÑне"
#: editor/project_export.cpp
msgid "Resources"
-msgstr ""
+msgstr "РеÑурÑи"
#: editor/project_export.cpp
msgid "Export all resources in the project"
@@ -10282,12 +10242,16 @@ msgid ""
"Filters to export non-resource files/folders\n"
"(comma-separated, e.g: *.json, *.txt, docs/*)"
msgstr ""
+"Филтри за изнаÑÑне на нереÑурÑни файлове/папки\n"
+"(разделени ÑÑŠÑ Ð·Ð°Ð¿ÐµÑ‚Ð°Ñ, например: *.json, *.txt, docs/*)"
#: editor/project_export.cpp
msgid ""
"Filters to exclude files/folders from project\n"
"(comma-separated, e.g: *.json, *.txt, docs/*)"
msgstr ""
+"Филтри за изключване на файлове/папки от проекта\n"
+"(разделени ÑÑŠÑ Ð·Ð°Ð¿ÐµÑ‚Ð°Ñ, например: *.json, *.txt, docs/*)"
#: editor/project_export.cpp
msgid "Features"
@@ -10306,29 +10270,30 @@ msgid "Script"
msgstr "Скрипт"
#: editor/project_export.cpp
-#, fuzzy
msgid "GDScript Export Mode:"
-msgstr "Режим на изнаÑÑне на Ñкриптове:"
+msgstr "Режим на изнаÑÑне на файловете Ñ ÐºÐ¾Ð´ на GDScript:"
#: editor/project_export.cpp
msgid "Text"
-msgstr ""
+msgstr "Като текÑÑ‚"
#: editor/project_export.cpp
msgid "Compiled Bytecode (Faster Loading)"
-msgstr ""
+msgstr "Компилиран байт-код (по-бързо зареждане)"
#: editor/project_export.cpp
msgid "Encrypted (Provide Key Below)"
-msgstr ""
+msgstr "Шифровани (въведете ключ по-долу)"
#: editor/project_export.cpp
msgid "Invalid Encryption Key (must be 64 hexadecimal characters long)"
msgstr ""
+"Ðеправилен ключ за шифроване (трÑбва да бъде Ñ Ð´ÑŠÐ»Ð¶Ð¸Ð½Ð° 64 шеÑтнадеÑетични "
+"знака)"
#: editor/project_export.cpp
msgid "GDScript Encryption Key (256-bits as hexadecimal):"
-msgstr ""
+msgstr "Ключ за шифроване на GDScript (256 бита, в шеÑтнадеÑетичен формат):"
#: editor/project_export.cpp
msgid "Export PCK/Zip"
@@ -10352,32 +10317,33 @@ msgstr "Файл ZIP"
#: editor/project_export.cpp
msgid "Godot Game Pack"
-msgstr ""
+msgstr "Игрален пакет на Godot"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
-msgstr ""
+msgstr "Шаблоните за изнаÑÑне за тази ÑиÑтема липÑват:"
#: editor/project_export.cpp
msgid "Manage Export Templates"
-msgstr ""
+msgstr "Управление на шаблоните за изнаÑÑне"
#: editor/project_export.cpp
msgid "Export With Debug"
-msgstr ""
+msgstr "ИзнаÑÑне Ñ Ð´Ð°Ð½Ð½Ð¸ за дебъгване"
#: editor/project_manager.cpp
msgid "The path specified doesn't exist."
-msgstr ""
+msgstr "ПоÑочениÑÑ‚ път не ÑъщеÑтвува."
#: editor/project_manager.cpp
msgid "Error opening package file (it's not in ZIP format)."
-msgstr ""
+msgstr "Грешка при отварÑне на пакета (не е във формат ZIP)."
#: editor/project_manager.cpp
msgid ""
"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
msgstr ""
+"Ðеправилен проектен файл „.zip“. Ð’ него не Ñе Ñъдържа файл „project.godot“."
#: editor/project_manager.cpp
msgid "Please choose an empty folder."
@@ -10389,20 +10355,19 @@ msgstr "МолÑ, изберете файл от тип „project.godot“ ил
#: editor/project_manager.cpp
msgid "This directory already contains a Godot project."
-msgstr ""
+msgstr "Тази папка вече Ñъдържа проект на Godot."
#: editor/project_manager.cpp
msgid "New Game Project"
-msgstr ""
+msgstr "Ðов игрален проект"
#: editor/project_manager.cpp
msgid "Imported Project"
msgstr "ВнеÑен проект"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project name."
-msgstr "Ðеправилно име на проект."
+msgstr "Ðеправилно име на проекта."
#: editor/project_manager.cpp
msgid "Couldn't create folder."
@@ -10410,21 +10375,23 @@ msgstr "Папката не може да бъде Ñъздадена."
#: editor/project_manager.cpp
msgid "There is already a folder in this path with the specified name."
-msgstr ""
+msgstr "Ð’ този път вече ÑъщеÑтвува папка Ñ Ñ‚Ð¾Ð²Ð° име."
#: editor/project_manager.cpp
msgid "It would be a good idea to name your project."
-msgstr ""
+msgstr "ÐÑма да е лошо да дадете име на проекта Ñи."
#: editor/project_manager.cpp
msgid "Invalid project path (changed anything?)."
-msgstr ""
+msgstr "Ðеправилен път до проекта (ПроменÑли ли Ñте нещо?)."
#: editor/project_manager.cpp
msgid ""
"Couldn't load project.godot in project path (error %d). It may be missing or "
"corrupted."
msgstr ""
+"Файлът „project.godot“ не може да бъде зареден от Ð¿ÑŠÑ‚Ñ Ð½Ð° проекта (грешка "
+"%d). Възможно е той да липÑва или да е повреден."
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
@@ -10622,37 +10589,32 @@ msgid "Project Manager"
msgstr "Управление на проектите"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Local Projects"
-msgstr "Проекти"
+msgstr "Локални проекти"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Loading, please wait..."
-msgstr "Зареждане…"
+msgstr "Зареждане. МолÑ, изчакайте…"
#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
#: editor/project_manager.cpp
-#, fuzzy
msgid "Edit Project"
-msgstr "ИзнаÑÑне на проекта"
+msgstr "Редактиране на проекта"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Run Project"
-msgstr "Преименуване на проекта"
+msgstr "ПуÑкане на проекта"
#: editor/project_manager.cpp
msgid "Scan"
msgstr "Сканиране"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Scan Projects"
-msgstr "Проекти"
+msgstr "Сканиране за проекти"
#: editor/project_manager.cpp
msgid "Select a Folder to Scan"
@@ -10663,14 +10625,12 @@ msgid "New Project"
msgstr "Ðов проект"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Import Project"
-msgstr "ВнеÑен проект"
+msgstr "ВнаÑÑне на проект"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove Project"
-msgstr "Преименуване на проекта"
+msgstr "Премахване на проекта"
#: editor/project_manager.cpp
msgid "Remove Missing"
@@ -10681,9 +10641,8 @@ msgid "About"
msgstr "ОтноÑно"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Asset Library Projects"
-msgstr "Библиотека Ñ Ñ€ÐµÑурÑи"
+msgstr "Проекти от Библиотеката Ñ Ñ€ÐµÑурÑи"
#: editor/project_manager.cpp
msgid "Restart Now"
@@ -10708,9 +10667,8 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-#, fuzzy
msgid "Filter projects"
-msgstr "Филтриране на ÑвойÑтвата"
+msgstr "Филтриране на проектите"
#: editor/project_manager.cpp
msgid ""
@@ -10912,9 +10870,8 @@ msgid "Override for Feature"
msgstr ""
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Add %d Translations"
-msgstr "ДобавÑне на превод"
+msgstr "ДобавÑне на %d превода"
#: editor/project_settings_editor.cpp
msgid "Remove Translation"
@@ -11300,9 +11257,8 @@ msgid "Can't paste root node into the same scene."
msgstr ""
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Paste Node(s)"
-msgstr "ПоÑтавÑне на възлите"
+msgstr "ПоÑтавÑне на възела(възлите)"
#: editor/scene_tree_dock.cpp
msgid "Detach Script"
@@ -11447,9 +11403,8 @@ msgid "Attach Script"
msgstr "Закачане на Ñкрипт"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Cut Node(s)"
-msgstr "ИзрÑзване на възлите"
+msgstr "ИзрÑзване на възела(възлите)"
#: editor/scene_tree_dock.cpp
msgid "Remove Node(s)"
@@ -12021,6 +11976,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12098,7 +12061,6 @@ msgid "Step argument is zero!"
msgstr "Ðргументът за Ñтъпката е нула!"
#: modules/gdscript/gdscript_functions.cpp
-#, fuzzy
msgid "Not a script with an instance"
msgstr "Скриптът нÑма инÑтанциÑ"
@@ -12134,14 +12096,12 @@ msgid "Object can't provide a length."
msgstr ""
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "Export Mesh GLTF2"
-msgstr "ИзнаÑÑне на библиотека Ñ Ð¿Ð¾Ð»Ð¸Ð³Ð¾Ð½Ð½Ð¸ мрежи"
+msgstr "ИзнаÑÑне на полигонна мрежа като GLTF2"
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "Export GLTF..."
-msgstr "ИзнаÑÑне..."
+msgstr "ИзнаÑÑне на GLTF..."
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
@@ -12200,29 +12160,28 @@ msgid "Snap View"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Clip Disabled"
-msgstr "Изключено"
+msgstr "ОтрÑзването е изключено"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Above"
-msgstr ""
+msgstr "ОтрÑзване над"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Below"
-msgstr ""
+msgstr "ОтрÑзване под"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Edit X Axis"
-msgstr ""
+msgstr "Редактиране на оÑта X"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Edit Y Axis"
-msgstr ""
+msgstr "Редактиране на оÑта Y"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Edit Z Axis"
-msgstr ""
+msgstr "Редактиране на оÑта Z"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Rotate X"
@@ -12303,9 +12262,8 @@ msgid "Indirect lighting"
msgstr ""
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
-msgstr "Задаване на израз"
+msgstr "ПоÑтобработка"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Plotting lightmaps"
@@ -12315,6 +12273,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Запълване на избраното"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12438,14 +12401,12 @@ msgid "Add Output Port"
msgstr "ДобавÑне на изходÑщ порт"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Type"
-msgstr "ПромÑна на типа на входÑÑ‰Ð¸Ñ Ð¿Ð¾Ñ€Ñ‚"
+msgstr "ПромÑна на типа на порта"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Name"
-msgstr "ПромÑна на името на входÑÑ‰Ð¸Ñ Ð¿Ð¾Ñ€Ñ‚"
+msgstr "ПромÑна на името на порт"
#: modules/visual_script/visual_script_editor.cpp
msgid "Override an existing built-in function."
@@ -12556,9 +12517,8 @@ msgid "Add Preload Node"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Node(s)"
-msgstr "ДобавÑне на възел"
+msgstr "ДобавÑне на възел(възли)"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Node(s) From Tree"
@@ -12599,14 +12559,12 @@ msgid "Disconnect Nodes"
msgstr "Разкачане на възлите"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Connect Node Data"
-msgstr "ИзрÑзване на възелите"
+msgstr "Свързване на данните на възела"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Connect Node Sequence"
-msgstr "ИзрÑзване на възелите"
+msgstr "Свързване на поÑледователноÑÑ‚ от възли"
#: modules/visual_script/visual_script_editor.cpp
msgid "Script already has function '%s'"
@@ -12786,225 +12744,215 @@ msgstr "ТърÑене във VisualScript"
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
-msgstr "ИзнаÑÑне на вÑичко"
+msgstr "ИзнаÑÑне на APK..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
-msgstr "ИнÑталирате..."
+msgstr "ДеинÑталиране..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
-msgstr "Зареждане…"
+msgstr "ИнÑталиране на уÑтройÑтвото. МолÑ, изчакайте…"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
-msgstr "Файлът не може да бъде запиÑан:"
+msgstr "Ðе може да Ñе инÑталира на уÑтройÑтво: %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
-msgstr "Папката не може да бъде Ñъздадена."
+msgstr "Изпълнението на уÑтройÑтвото е невъзможно."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
+"Ð’ наÑтройките на редактора трÑбва да бъде поÑочен правилен път към Android "
+"SDK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
-msgstr ""
+msgstr "ПътÑÑ‚ до Android SDK в наÑтройките на редактора е грешен."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
-msgstr ""
+msgstr "ЛипÑва папката „platform-tools“!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
-msgstr ""
+msgstr "Ðе е намерена командата „adb“ от Android SDK – platform-tools."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
+"МолÑ, проверете папката на Android SDK, коÑто е поÑочена в наÑтройките на "
+"редактора."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
-msgstr ""
+msgstr "ЛипÑва папката „build-tools“!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
-msgstr ""
+msgstr "Ðе е намерена командата „apksigner “ от Android SDK – build-tools."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
-msgstr ""
+msgstr "Ðеправилен публичен ключ за разширение към APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Ðеправилно име на пакет:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
+"Ð’ наÑтройките на проекта, раздел „android/modules“, приÑÑŠÑтва неправилен "
+"модул „GodotPaymentV3“ (това е променено във Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
"directory.\n"
"The resulting %s is unsigned."
msgstr ""
+"Командата „apksigner“ не може да бъде намерена.\n"
+"Проверете дали командата е налична в папката „build-tools“ на Android SDK.\n"
+"РезултатниÑÑ‚ файл „%s“ не е подпиÑан."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
-msgstr "Шаблонът не може да Ñе отвори за изнаÑÑне:"
+msgstr "Ðе е намерено хранилище за ключове. ИзнаÑÑнето е невъзможно."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
-msgstr "ДобавÑне на %s..."
+msgstr "Потвърждаване на %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
-msgstr "ИзнаÑÑне на вÑичко"
+msgstr "ИзнаÑÑне за Android"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13012,58 +12960,56 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
-msgstr "Файлът не може да бъде запиÑан:"
+msgstr "Файлът Ñ Ð¿Ð°ÐºÐµÑ‚Ð° за разширение не може да бъде запиÑан!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
-msgstr "Съдържание на пакета:"
+msgstr "Пакетът не е намерен: %s"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
-msgstr "Създаване на полигонна мрежа…"
+msgstr "Създаване на APK…"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
-msgstr "Шаблонът не може да Ñе отвори за изнаÑÑне:"
+msgstr ""
+"Ðе е намерен шаблонен файл APK за изнаÑÑне:\n"
+"%s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13071,21 +13017,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
-msgstr "ДобавÑне на %s..."
+msgstr "ДобавÑне на файлове..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
-msgstr "Файлът не може да бъде запиÑан:"
+msgstr "Файловете на проекта не могат да бъдат изнеÑени"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13134,29 +13078,24 @@ msgid "Could not write file:"
msgstr "Файлът не може да бъде запиÑан:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file:"
-msgstr "Файлът не може да бъде запиÑан:"
+msgstr "Файлът не може да бъде прочетен:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read HTML shell:"
-msgstr "Ðе може да Ñе прочете перÑонализирана HTML-обвивка:"
+msgstr "ПерÑонализираната HTML-обвивка не може да бъде прочетена:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not create HTTP server directory:"
-msgstr "Папката не може да бъде Ñъздадена."
+msgstr "Папката на HTTP-Ñървъра не може да бъде Ñъздадена:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Error starting HTTP server:"
-msgstr "Грешка при запиÑването:"
+msgstr "Грешка при Ñтартирането на HTTP-Ñървър:"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid bundle identifier:"
-msgstr "Името не е правилен идентификатор:"
+msgstr "Ðеправилен идентификатор на пакета:"
#: platform/osx/export/export.cpp
msgid "Notarization: code signing required."
@@ -13576,6 +13515,14 @@ msgstr ""
"NavigationMeshInstance трÑбва да бъде дъщерен или под-дъщерен на възел от "
"тип Navigation. Той Ñамо предоÑÑ‚Ð°Ð²Ñ Ð´Ð°Ð½Ð½Ð¸Ñ‚Ðµ за навигирането."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13871,6 +13818,14 @@ msgstr "ТрÑбва да Ñе използва правилно разширеÐ
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13911,6 +13866,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/bn.po b/editor/translations/bn.po
index 6cd9e3a81c..6c958956bc 100644
--- a/editor/translations/bn.po
+++ b/editor/translations/bn.po
@@ -1052,7 +1052,7 @@ msgstr ""
msgid "Dependencies"
msgstr "নিরà§à¦­à¦°à¦¤à¦¾-সমূহ"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "রিসোরà§à¦¸"
@@ -1723,14 +1723,14 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#, fuzzy
msgid "Custom debug template not found."
msgstr "সà§à¦¬à¦¨à¦¿à¦°à§à¦®à¦¿à¦¤ ডিবাগ (debug) পà§à¦¯à¦¾à¦•েজ খà§à¦à¦œà§‡ পাওয়া যায়নি।"
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#, fuzzy
@@ -2147,7 +2147,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "পà§à¦¨à¦°à¦¾à§Ÿ ইমà§à¦ªà§‹à¦°à§à¦Ÿ হচà§à¦›à§‡"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "শীরà§à¦·"
@@ -2689,6 +2689,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "বরà§à¦¤à¦®à¦¾à¦¨ দৃশà§à¦¯à¦Ÿà¦¿ সংরকà§à¦·à¦¿à¦¤ হয়নি। তবà§à¦“ খà§à¦²à¦¬à§‡à¦¨?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "সাবেক অবসà§à¦¥à¦¾à§Ÿ যান/আনডà§"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "পà§à¦¨à¦°à¦¾à¦¯à¦¼ করà§à¦¨"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "পূরà§à¦¬à§‡ কখনোই সংরকà§à¦·à¦¿à¦¤ হয়নি à¦à¦®à¦¨ দৃশà§à¦¯ পà§à¦¨à¦°à¦¾à§Ÿ-লোড (রিলোড) করা অসমà§à¦­à¦¬à¥¤"
@@ -3407,6 +3433,11 @@ msgid "Merge With Existing"
msgstr "বিদà§à¦¯à¦®à¦¾à¦¨à§‡à¦° সাথে à¦à¦•তà§à¦°à¦¿à¦¤ করà§à¦¨"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ (Anim) টà§à¦°à¦¾à¦¨à§à¦¸à¦«à¦°à§à¦® পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "à¦à¦•টি সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ খà§à¦²à§à¦¨ à¦à¦¬à¦‚ চালান"
@@ -3681,6 +3712,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
#, fuzzy
msgid "Make Unique"
@@ -5971,6 +6006,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "CanvasItem সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "নিরà§à¦¬à¦¾à¦šà¦¨ করà§à¦¨"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "গà§à¦°à§à¦ª"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6977,7 +7024,13 @@ msgid "Remove Selected Item"
msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ বসà§à¦¤à§à¦Ÿà¦¿ অপসারণ করà§à¦¨"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "দৃশà§à¦¯ হতে ইমà§à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "দৃশà§à¦¯ হতে ইমà§à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7609,6 +7662,16 @@ msgstr "উৎপাদিত বিনà§à¦¦à§à¦° সংখà§à¦¯à¦¾:"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "রà§à¦ªà¦¾à¦¨à§à¦¤à¦°"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "নোড তৈরি করà§à¦¨"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -8158,12 +8221,14 @@ msgid "Skeleton2D"
msgstr "সà§à¦•েলেটন/কাঠাম..."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "পà§à¦°à¦¾à¦¥à¦®à¦¿à¦• sRGB বà§à¦¯à¦¬à¦¹à¦¾à¦° করà§à¦¨"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "পà§à¦°à¦¤à¦¿à¦¸à§à¦¥à¦¾à¦ªà¦¨"
#: editor/plugins/skeleton_editor_plugin.cpp
#, fuzzy
@@ -8194,6 +8259,71 @@ msgid "Perspective"
msgstr "পরিপà§à¦°à§‡à¦•à§à¦·à¦¿à¦¤ (Perspective)"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "সমকোণীয় (Orthogonal)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "পরিপà§à¦°à§‡à¦•à§à¦·à¦¿à¦¤ (Perspective)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "সমকোণীয় (Orthogonal)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "পরিপà§à¦°à§‡à¦•à§à¦·à¦¿à¦¤ (Perspective)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "সমকোণীয় (Orthogonal)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "পরিপà§à¦°à§‡à¦•à§à¦·à¦¿à¦¤ (Perspective)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "সমকোণীয় (Orthogonal)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "সমকোণীয় (Orthogonal)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "পরিপà§à¦°à§‡à¦•à§à¦·à¦¿à¦¤ (Perspective)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "সমকোণীয় (Orthogonal)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "পরিপà§à¦°à§‡à¦•à§à¦·à¦¿à¦¤ (Perspective)"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "রà§à¦ªà¦¾à¦¨à§à¦¤à¦° নিষà§à¦«à¦²à¦¾ করা হয়েছে।"
@@ -8315,42 +8445,22 @@ msgid "Bottom View."
msgstr "নিমà§à¦¨ দরà§à¦¶à¦¨à¥¤"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "নিমà§à¦¨"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "বাম দরà§à¦¶à¦¨à¥¤"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "বাম"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "ডান দরà§à¦¶à¦¨à¥¤"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "ডান"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "সনà§à¦®à§à¦– দরà§à¦¶à¦¨à¥¤"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "সনà§à¦®à§à¦–"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "পশà§à¦šà¦¾à§Ž দরà§à¦¶à¦¨à¥¤"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "পশà§à¦šà¦¾à§Ž"
-
-#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Align Transform with View"
msgstr "দরà§à¦¶à¦¨à§‡à¦° সাথে সারিবদà§à¦§ করà§à¦¨"
@@ -8637,6 +8747,11 @@ msgid "View Portal Culling"
msgstr "Viewport সেটিংস"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Viewport সেটিংস"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Settings..."
@@ -8703,8 +8818,9 @@ msgid "Post"
msgstr "পরবরà§à¦¤à§€ (Post)"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr ""
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "নামহীন পà§à¦°à¦•লà§à¦ª"
#: editor/plugins/sprite_editor_plugin.cpp
#, fuzzy
@@ -13073,6 +13189,16 @@ msgstr "বকà§à¦°à¦°à§‡à¦–ার বিনà§à¦¦à§à¦° সà§à¦¥à¦¾à¦¨ নি
msgid "Set Portal Point Position"
msgstr "বকà§à¦°à¦°à§‡à¦–ার বিনà§à¦¦à§à¦° সà§à¦¥à¦¾à¦¨ নিরà§à¦§à¦¾à¦°à¦£ করà§à¦¨"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Capsule Shape à¦à¦° বà§à¦¯à¦¾à¦¸à¦¾à¦°à§à¦§ পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "আনà§à¦¤-বকà§à¦°à¦°à§‡à¦–ার সà§à¦¥à¦¾à¦¨ নিরà§à¦§à¦¾à¦°à¦£ করà§à¦¨"
+
#: modules/csg/csg_gizmos.cpp
#, fuzzy
msgid "Change Cylinder Radius"
@@ -13391,6 +13517,11 @@ msgstr "ছবিসমূহ বà§à¦²à¦¿à¦Ÿà¦¿à¦‚ (Blitting) করা হচà
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "সব সিলেকà§à¦Ÿ করà§à¦¨"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13927,166 +14058,155 @@ msgstr "Shader Graph Node অপসারণ করà§à¦¨"
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "লিসà§à¦Ÿ থেকে ডিভাইস সিলেকà§à¦Ÿ করà§à¦¨"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "%s à¦à¦° জনà§à¦¯ à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ (export) হচà§à¦›à§‡"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "ইনà§à¦¸à¦Ÿà¦²"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "মিরর রিটà§à¦°à¦¾à¦‡à¦­ করা হচà§à¦›à§‡, দযা করে অপেকà§à¦·à¦¾ করà§à¦¨..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "দৃশà§à¦¯ ইনà§à¦¸à¦Ÿà§à¦¯à¦¾à¦¨à§à¦¸ করা সমà§à¦­à¦¬ হয়নি!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "সà§à¦¬à¦¨à¦¿à¦°à§à¦®à¦¿à¦¤ সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ চালানো হচà§à¦›à§‡..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "ফোলà§à¦¡à¦¾à¦° তৈরী করা সমà§à¦­à¦¬ হয়নি।"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid package name:"
msgstr "অগà§à¦°à¦¹à¦£à¦¯à§‹à¦—à§à¦¯ কà§à¦²à¦¾à¦¸ নাম"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -14094,63 +14214,63 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"ফাইল সà§à¦•à§à¦¯à¦¾à¦¨ করা হচà§à¦›à§‡,\n"
"অনà§à¦—à§à¦°à¦¹à¦ªà§‚রà§à¦¬à¦• অপেকà§à¦·à¦¾ করà§à¦¨..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "ফোলà§à¦¡à¦¾à¦° তৈরী করা সমà§à¦­à¦¬ হয়নি।"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "%s সংযà§à¦•à§à¦¤ হচà§à¦›à§‡..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "%s à¦à¦° জনà§à¦¯ à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ (export) হচà§à¦›à§‡"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -14158,59 +14278,59 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "পà§à¦°à¦•লà§à¦ªà§‡à¦° পথে engine.cfg তৈরি করা সমà§à¦­à¦¬ হয়নি।"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "টাইলটি খà§à¦à¦œà§‡ পাওয়া যায়নি:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° সরঞà§à¦œà¦¾à¦®à¦¸à¦®à§‚হ"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "ওকটà§à¦°à§€ (octree) গঠনবিনà§à¦¯à¦¾à¦¸ তৈরি করা হচà§à¦›à§‡"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "ফোলà§à¦¡à¦¾à¦° তৈরী করা সমà§à¦­à¦¬ হয়নি।"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -14218,21 +14338,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "%s সংযà§à¦•à§à¦¤ হচà§à¦›à§‡..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "টাইলটি খà§à¦à¦œà§‡ পাওয়া যায়নি:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14744,6 +14864,14 @@ msgstr ""
"NavigationMeshInstance-কে অবশà§à¦¯à¦‡ Navigation-à¦à¦° অংশ অথবা অংশের অংশ হতে হবে। "
"à¦à¦Ÿà¦¾ শà§à¦§à§à¦®à¦¾à¦¤à§à¦° নà§à¦¯à¦¾à¦­à¦¿à¦—েশনের তথà§à¦¯ পà§à¦°à¦¦à¦¾à¦¨ করে।"
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -15047,6 +15175,14 @@ msgstr "à¦à¦•টি কারà§à¦¯à¦•র à¦à¦•à§à¦¸à¦Ÿà§‡à¦¨à¦¶à¦¨ বà§à¦¯
msgid "Enable grid minimap."
msgstr "সà§à¦¨à§à¦¯à¦¾à¦ª সকà§à¦°à¦¿à§Ÿ করà§à¦¨"
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
#, fuzzy
msgid ""
@@ -15095,6 +15231,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -15148,6 +15288,21 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Bottom"
+#~ msgstr "নিমà§à¦¨"
+
+#~ msgid "Left"
+#~ msgstr "বাম"
+
+#~ msgid "Right"
+#~ msgstr "ডান"
+
+#~ msgid "Front"
+#~ msgstr "সনà§à¦®à§à¦–"
+
+#~ msgid "Rear"
+#~ msgstr "পশà§à¦šà¦¾à§Ž"
+
#, fuzzy
#~ msgid "Package Contents:"
#~ msgstr "ধà§à¦°à§à¦¬à¦•সমূহ:"
@@ -17072,9 +17227,6 @@ msgstr ""
#~ msgid "Images:"
#~ msgstr "ছবিসমূহ:"
-#~ msgid "Group"
-#~ msgstr "গà§à¦°à§à¦ª"
-
#~ msgid "Sample Conversion Mode: (.wav files):"
#~ msgstr "নমà§à¦¨à¦¾ রূপানà§à¦¤à¦° মোড: (.wav ফাইল):"
diff --git a/editor/translations/br.po b/editor/translations/br.po
index adee6daaba..4db566b371 100644
--- a/editor/translations/br.po
+++ b/editor/translations/br.po
@@ -1009,7 +1009,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1638,13 +1638,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2015,7 +2015,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2493,6 +2493,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3116,6 +3140,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Cheñch Treuzfurmadur ar Fiñvskeudenn"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3357,6 +3386,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5397,6 +5430,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6296,7 +6339,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6882,6 +6929,14 @@ msgstr "Fiñval ar Poentoù Bezier"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Center Node"
+msgstr ""
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7376,11 +7431,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7408,6 +7463,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7515,42 +7624,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7812,6 +7901,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7877,7 +7970,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11777,6 +11870,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12057,6 +12158,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12524,159 +12629,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12684,57 +12778,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12742,54 +12836,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12797,19 +12891,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13259,6 +13353,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13548,6 +13650,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13588,6 +13698,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/ca.po b/editor/translations/ca.po
index 347fea679b..e2580e35d9 100644
--- a/editor/translations/ca.po
+++ b/editor/translations/ca.po
@@ -1039,7 +1039,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Dependències"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Recurs"
@@ -1708,13 +1708,13 @@ msgstr ""
"Activeu \"Import Etc\" a Configuració del Projecte o desactiveu la opció "
"'Driver Fallback Enabled''."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "No s'ha trobat cap plantilla de depuració personalitzada."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2100,7 +2100,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Re)Important Recursos"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Dalt"
@@ -2611,6 +2611,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "L'escena actual no s'ha desat. Voleu obrir-la igualment?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Desfés"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Refés"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "No es pot recarregar una escena mai desada."
@@ -3320,6 +3346,11 @@ msgid "Merge With Existing"
msgstr "Combina amb Existents"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Modifica la Transformació de l'Animació"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Obre i Executa un Script"
@@ -3579,6 +3610,10 @@ msgstr ""
"El recurs seleccionat (%s) no coincideix amb cap tipus esperat per aquesta "
"propietat (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Fes-lo Únic"
@@ -5758,6 +5793,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Modifica el elementCanvas"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Bloca la selecció"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grups"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6741,7 +6788,13 @@ msgid "Remove Selected Item"
msgstr "Elimina l'Element Seleccionat"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Importa des de l'Escena"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Importa des de l'Escena"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7350,6 +7403,16 @@ msgstr "Recompte de punts generats:"
msgid "Flip Portal"
msgstr "Invertir Horitzontalment"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Restablir Transformació"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Crea un Node"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "L'AnimationTree no té ruta assignada cap a un AnimationPlayer"
@@ -7869,13 +7932,13 @@ msgstr "Esquelet2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
-msgid "Make Rest Pose (From Bones)"
-msgstr "Crear Pose de Repòs (A partir dels Ossos)"
+msgid "Reset to Rest Pose"
+msgstr "Establir els ossos a la postura de repós"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
-msgid "Set Bones to Rest Pose"
-msgstr "Establir els ossos a la postura de repós"
+msgid "Overwrite Rest Pose"
+msgstr "Sobreescriu"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7903,6 +7966,71 @@ msgid "Perspective"
msgstr "Perspectiva"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspectiva"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "S'ha interromput la Transformació ."
@@ -8021,42 +8149,22 @@ msgid "Bottom View."
msgstr "Vista inferior."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Part inferior"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Vista esquerra."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Esquerra"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Vista Dreta."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Dreta"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Vista Frontal."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Davant"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Vista Posterior."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Darrere"
-
-#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Align Transform with View"
msgstr "Alinear amb la Vista"
@@ -8334,6 +8442,11 @@ msgid "View Portal Culling"
msgstr "Configuració de la Vista"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Configuració de la Vista"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Configuració..."
@@ -8403,8 +8516,8 @@ msgstr "Post"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
-msgid "Nameless gizmo"
-msgstr "Gizmo sense nom"
+msgid "Unnamed Gizmo"
+msgstr "Projecte sense nom"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -12771,6 +12884,16 @@ msgstr "Estableix la Posició del Punt de la Corba"
msgid "Set Portal Point Position"
msgstr "Estableix la Posició del Punt de la Corba"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Modifica el radi d'una Forma Càpsula"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Estableix la Posició d'Entrada de la Corba"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "Canviar Radi del Cilindre"
@@ -13073,6 +13196,11 @@ msgstr "S'està traçant l'Il·luminació:"
msgid "Class name can't be a reserved keyword"
msgstr "El nom de la classe no pot ser una paraula clau reservada"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Omplir la Selecció"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Final de la traça de la pila d'excepció interna"
@@ -13584,78 +13712,78 @@ msgstr "Elimina el Node de VisualScript"
msgid "Get %s"
msgstr "Obtenir %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "El nom del paquet falta."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package segments must be of non-zero length."
msgstr "Els segments de paquets han de ser de longitud no zero."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
"El caràcter '%s' no està permès als noms de paquets d'aplicacions Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "A digit cannot be the first character in a package segment."
msgstr "Un dígit no pot ser el primer caràcter d'un segment de paquets."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
"El caràcter '%s' no pot ser el primer caràcter d'un segment de paquets."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "El paquet ha de tenir com a mínim un separador '. '."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Selecciona un dispositiu de la llista"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Exportant tot"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Desinstal·lar"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "S'estan buscant rèpliques..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "No s'ha pogut començar el subprocés!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Executant Script Personalitzat..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "No s'ha pogut crear el directori."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Android build template not installed in the project. Install it from the "
@@ -13664,102 +13792,91 @@ msgstr ""
"El projecte Android no està instal·lat per a la compilació. Instal·leu-lo "
"des del menú Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"El camí de l'SDK d'Android no és vàlid per a la compilació personalitzada en "
"la configuració de l'editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
"El camí de l'SDK d'Android no és vàlid per a la compilació personalitzada en "
"la configuració de l'editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"El camí de l'SDK d'Android no és vàlid per a la compilació personalitzada en "
"la configuració de l'editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Clau pública no vàlida per a l'expansió de l'APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "El nom del paquet no és vàlid:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13767,57 +13884,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Analitzant Fitxers,\n"
"Si Us Plau Espereu..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "No es pot obrir la plantilla per exportar:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Afegint %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Exportant tot"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Trying to build from a custom built template, but no version info for it "
@@ -13826,7 +13943,7 @@ msgstr ""
"Intentant construir des d'una plantilla personalitzada, però no existeix "
"informació de versió per a això. Torneu a instal·lar des del menú 'projecte'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Android build version mismatch:\n"
@@ -13840,27 +13957,27 @@ msgstr ""
"Torneu a instal·lar la plantilla de compilació d'Android des del menú "
"'Projecte'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "No es pot trobat el el fitxer 'project.godot' en el camí del projecte."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "No s'ha pogut escriure el fitxer:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Building Android Project (gradle)"
msgstr "Construint Projecte Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Building of Android project failed, check output for the error.\n"
@@ -13871,34 +13988,34 @@ msgstr ""
"Alternativament visiteu docs.godotengine.org per a la documentació de "
"compilació d'Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Animació no trobada: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Creant els contorns..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "No es pot obrir la plantilla per exportar:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13906,21 +14023,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Afegint %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "No s'ha pogut escriure el fitxer:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14467,6 +14584,14 @@ msgstr ""
"NavigationMeshInstance ha de ser fill o nét d'un node Navigation. Només "
"proporciona dades de navegació."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14787,6 +14912,14 @@ msgstr "Cal utilitzar una extensió vàlida."
msgid "Enable grid minimap."
msgstr "Activar graella del minimapa"
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
#, fuzzy
msgid ""
@@ -14842,6 +14975,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14894,6 +15031,29 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr "Les constants no es poden modificar."
+#, fuzzy
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Crear Pose de Repòs (A partir dels Ossos)"
+
+#~ msgid "Bottom"
+#~ msgstr "Part inferior"
+
+#~ msgid "Left"
+#~ msgstr "Esquerra"
+
+#~ msgid "Right"
+#~ msgstr "Dreta"
+
+#~ msgid "Front"
+#~ msgstr "Davant"
+
+#~ msgid "Rear"
+#~ msgstr "Darrere"
+
+#, fuzzy
+#~ msgid "Nameless gizmo"
+#~ msgstr "Gizmo sense nom"
+
#~ msgid "Package Contents:"
#~ msgstr "Contingut del Paquet:"
diff --git a/editor/translations/cs.po b/editor/translations/cs.po
index 266614bf96..eb257b0af6 100644
--- a/editor/translations/cs.po
+++ b/editor/translations/cs.po
@@ -30,7 +30,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-07-26 14:18+0000\n"
+"PO-Revision-Date: 2021-09-15 00:46+0000\n"
"Last-Translator: Zbyněk <zbynek.fiala@gmail.com>\n"
"Language-Team: Czech <https://hosted.weblate.org/projects/godot-engine/godot/"
"cs/>\n"
@@ -39,7 +39,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Weblate 4.7.2-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -63,8 +63,7 @@ msgstr "Neplatný vstup %i (nepředán) ve výrazu"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr ""
-"\"self\" nemůže být použito, protože instance je \"null\" (není předána)"
+msgstr "self nemůže být použit, protože jeho instance je null (není platná)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
@@ -1047,7 +1046,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Závislosti"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Zdroj"
@@ -1712,13 +1711,13 @@ msgstr ""
"Povolte 'Import Pvrtc' v nastavení projektu, nebo vypněte 'Driver Fallback "
"Enabled'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Vlastní ladící šablona nebyla nalezena."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2100,7 +2099,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Re)Importování assetů"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Horní"
@@ -2608,6 +2607,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Aktuální scéna neuložena. Přesto otevřít?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Zpět"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Znovu"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Nelze naÄíst scénu, která nebyla nikdy uložena."
@@ -3291,6 +3316,11 @@ msgid "Merge With Existing"
msgstr "SlouÄit s existující"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Animace: Změna transformace"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Otevřít a spustit skript"
@@ -3547,6 +3577,10 @@ msgstr ""
"Vybraný zdroj (%s) neodpovídá žádnému oÄekávanému typu pro tuto vlastnost "
"(%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Vytvořit unikátní"
@@ -5674,6 +5708,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Přemístit CanvasItem \"%s\" na (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "UzamÄít vybraný"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Skupiny"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6492,7 +6538,7 @@ msgstr "Vytvořit obrys"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh"
-msgstr "Mesh"
+msgstr "Sítě (Mesh)"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Static Body"
@@ -6623,7 +6669,13 @@ msgid "Remove Selected Item"
msgstr "Odstranit vybranou položku"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Importovat ze scény"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Importovat ze scény"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7216,6 +7268,16 @@ msgstr "PoÄet vygenerovaných bodů:"
msgid "Flip Portal"
msgstr "Převrátit horizontálně"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Promazat transformaci"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Vytvořit uzel"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "AnimationTree nemá nastavenou cestu k AnimstionPlayer"
@@ -7716,12 +7778,14 @@ msgid "Skeleton2D"
msgstr "Skeleton2D (Kostra 2D)"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Vytvořit klidovou pózu (z kostí)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Umístit kosti do klidové pózy"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Umístit kosti do klidové pózy"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Přepsat"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7748,6 +7812,71 @@ msgid "Perspective"
msgstr "Perspektivní"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ortogonální"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspektivní"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ortogonální"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspektivní"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ortogonální"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspektivní"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ortogonální"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ortogonální"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspektivní"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ortogonální"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspektivní"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Transformace zrušena."
@@ -7866,42 +7995,22 @@ msgid "Bottom View."
msgstr "Pohled zdola."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Dolní"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Pohled zleva."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Levý"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Pohled zprava."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Pravý"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Čelní pohled."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Přední"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Pohled zezadu."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Zadní"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Zarovnat se zobrazením"
@@ -8174,6 +8283,11 @@ msgid "View Portal Culling"
msgstr "Nastavení viewportu"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Nastavení viewportu"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Nastavení..."
@@ -8239,8 +8353,9 @@ msgid "Post"
msgstr "Po"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Gizmo beze jména"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Nepojmenovaný projekt"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -12411,6 +12526,16 @@ msgstr "Nastavit pozici bodu křivky"
msgid "Set Portal Point Position"
msgstr "Nastavit pozici bodu křivky"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Změnit poloměr Cylinder Shape"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Nastavit bod do křivky"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "Změnit poloměr Cylinder"
@@ -12694,6 +12819,11 @@ msgstr "Vykreslování světelných map"
msgid "Class name can't be a reserved keyword"
msgstr "Název třídy nemůže být rezervované klíÄové slovo"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Vyplnit výběr"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Konec zásobníku trasování vnitřní výjimky"
@@ -13173,73 +13303,73 @@ msgstr "Hledat VisualScript"
msgid "Get %s"
msgstr "Přijmi %d"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Chybí jméno balíÄku."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Jméno balíÄku musí být neprázdné."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "Znak '%s' není povolen v názvu balíÄku Android aplikace."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "Číslice nemůže být prvním znakem segmentu balíÄku."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "Znak '%s' nemůže být prvním znakem segmentu balíÄku."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "BalíÄek musí mít alespoň jeden '.' oddÄ›lovaÄ."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Vyberte zařízení ze seznamu"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Exportování všeho"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Odinstalovat"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "NaÄítání, prosím Äekejte..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Nelze spustit podproces!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Spouštím skript..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Nelze vytvořit složku."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "Nelze najít nástroj 'apksigner'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13247,66 +13377,66 @@ msgstr ""
"Šablona sestavení Androidu není pro projekt nainstalována. Nainstalujte jej "
"z nabídky Projekt."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"ÚložiÅ¡tÄ› klíÄů k ladÄ›ní není nakonfigurováno v Nastavení editoru nebo v "
"export profilu."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"ÚložiÅ¡tÄ› klíÄů pro vydání je nakonfigurováno nesprávnÄ› v profilu exportu."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr "Je vyžadována platná cesta Android SDK v Nastavení editoru."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "Neplatná cesta k Android SDK v Nastavení editoru."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "Chybí složka \"platform-tools\"!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "Nelze najít příkaz adb z nástrojů platformy Android SDK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr "Zkontrolujte ve složce Android SDK uvedené v Nastavení editoru."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "Chybí složka \"build-tools\"!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr "Nelze najít apksigner, nástrojů Android SDK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Neplatný veÅ™ejný klÃ­Ä pro rozšíření APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Neplatné jméno balíÄku:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13314,40 +13444,25 @@ msgstr ""
"Neplatný modul \"GodotPaymentV3\" v nastavení projektu \"Android / moduly"
"\" (změněno v Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
"Chcete-li používat doplňky, musí být povoleno \"použít vlastní build\"."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Stupně svobody\" je platné pouze v případě, že \"Xr Mode\" je \"Oculus "
-"Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"Hand Tracking\" je platné pouze v případě, že \"Režim Xr\" má hodnotu "
"\"Oculus Mobile VR\"."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Focus Awareness\" je platné pouze v případě, že \"Režim Xr\" má hodnotu "
-"\"Oculus Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"\"Export AAB\" je validní pouze v případě, že je povolena možnost \"Použít "
"vlastní sestavu\"."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13355,57 +13470,56 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Skenování souborů,\n"
"Prosím, Äekejte..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "Nelze otevřít šablonu pro export:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Přidávám %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
-msgstr "Exportování všeho"
+msgstr "Export pro systém Android"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr "Neplatné jméno souboru! Android App Bundle vyžaduje příponu *.aab."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "Rozšíření APK není kompatibilní s Android App Bundle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "Neplatné jméno souboru! Android APK vyžaduje příponu *.apk."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13413,7 +13527,7 @@ msgstr ""
"Pokus o sestavení z vlastní šablony, ale neexistují pro ni žádné informace o "
"verzi. Přeinstalujte jej z nabídky \"Projekt\"."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13425,26 +13539,26 @@ msgstr ""
" Verze Godot: %s\n"
"Přeinstalujte šablonu pro sestavení systému Android z nabídky \"Projekt\"."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "Nelze upravit project.godot v umístění projektu."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "Nelze zapsat soubor:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Buildování projektu pro Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13452,11 +13566,11 @@ msgstr ""
"Buildování projektu pro Android se nezdařilo, zkontrolujte chybový výstup.\n"
"Případně navštivte dokumentaci o build pro Android na docs.godotengine.org."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "Přesunout výstup"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13464,24 +13578,24 @@ msgstr ""
"Nelze kopírovat Äi pÅ™ejmenovat exportovaný soubor, zkontrolujte výstupy v "
"adresáři projektu gradle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Animace nenalezena: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Vytvářím kontury..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "Nelze otevřít šablonu pro export:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13489,21 +13603,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Přidávám %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Nelze zapsat soubor:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "Zarovnávání APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14029,6 +14143,14 @@ msgstr ""
"NavigationMeshInstance musí být dítÄ›tem nebo vnouÄetem uzlu Navigation. "
"Poskytuje pouze data pro navigaci."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14352,6 +14474,14 @@ msgstr "Je nutné použít platnou příponu."
msgid "Enable grid minimap."
msgstr "Povolit minimapu mřížky."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14406,6 +14536,10 @@ msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
"Velikost pohledu musí být větší než 0, aby bylo možné cokoliv renderovat."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14459,6 +14593,41 @@ msgstr "Přiřazeno uniformu."
msgid "Constants cannot be modified."
msgstr "Konstanty není možné upravovat."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Vytvořit klidovou pózu (z kostí)"
+
+#~ msgid "Bottom"
+#~ msgstr "Dolní"
+
+#~ msgid "Left"
+#~ msgstr "Levý"
+
+#~ msgid "Right"
+#~ msgstr "Pravý"
+
+#~ msgid "Front"
+#~ msgstr "Přední"
+
+#~ msgid "Rear"
+#~ msgstr "Zadní"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Gizmo beze jména"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Stupně svobody\" je platné pouze v případě, že \"Xr Mode\" je \"Oculus "
+#~ "Mobile VR\"."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Focus Awareness\" je platné pouze v případě, že \"Režim Xr\" má hodnotu "
+#~ "\"Oculus Mobile VR\"."
+
#~ msgid "Package Contents:"
#~ msgstr "Obsah balíÄku:"
diff --git a/editor/translations/da.po b/editor/translations/da.po
index 2ab69b5f05..008f3b947c 100644
--- a/editor/translations/da.po
+++ b/editor/translations/da.po
@@ -1078,7 +1078,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Afhængigheder"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Ressource"
@@ -1757,13 +1757,13 @@ msgstr ""
"Aktivér 'Import Pvrtc' i Projektindstillingerne, eller deaktivér 'Driver "
"Fallback Aktiveret'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Brugerdefineret debug skabelonfil ikke fundet."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2171,7 +2171,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Gen)Importér Aktiver"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Top"
@@ -2685,6 +2685,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Nuværende scene er ikke gemt. Åbn alligevel?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Fortryd"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Annuller Fortyd"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Kan ikke genindlæse en scene, der aldrig blev gemt."
@@ -3383,6 +3409,11 @@ msgid "Merge With Existing"
msgstr "Flet Med Eksisterende"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim Skift Transformering"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Åben & Kør et Script"
@@ -3635,6 +3666,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5847,6 +5882,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Vælg værktøj"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grupper"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6799,7 +6846,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7407,6 +7458,16 @@ msgstr "Indsæt Punkt"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Anim Skift Transformering"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Vælg Node"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7943,11 +8004,12 @@ msgid "Skeleton2D"
msgstr "Singleton"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Indlæs Default"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7978,6 +8040,61 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Højre knap."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -8093,42 +8210,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8395,6 +8492,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Rediger Poly"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Settings..."
@@ -8461,7 +8563,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12655,6 +12757,15 @@ msgstr "Fjern Kurve Punktets Position"
msgid "Set Portal Point Position"
msgstr "Fjern Kurve Punktets Position"
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Fjern Signal"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12952,6 +13063,11 @@ msgstr "Generering af lightmaps"
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "All selection"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13456,166 +13572,155 @@ msgstr "Fjern VisualScript Node"
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Vælg enhed fra listen"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Eksporter"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Afinstaller"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Henter spejle, vent venligst ..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Kunne ikke starte underproces!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Kører Brugerdefineret Script..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Kunne ikke oprette mappe."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid package name:"
msgstr "Ugyldigt navn."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13623,63 +13728,63 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Scanner Filer,\n"
"Vent Venligst..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "Kan ikke åbne skabelon til eksport:\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Tester"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Eksporter"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13687,58 +13792,58 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "Kunne ikke skrive til fil:\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Animations Længde (i sekunder)."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Forbinder..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "Kan ikke åbne skabelon til eksport:\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13746,21 +13851,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Filtrer filer..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Kunne ikke skrive til fil:\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14273,6 +14378,14 @@ msgstr ""
"NavigationMeshInstance skal være et barn eller barnebarn til en Navigation "
"node. Det giver kun navigationsdata."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14575,6 +14688,14 @@ msgstr "Du skal bruge en gyldig udvidelse."
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
#, fuzzy
msgid ""
@@ -14623,6 +14744,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/de.po b/editor/translations/de.po
index 6d57f3dcad..b0ca136093 100644
--- a/editor/translations/de.po
+++ b/editor/translations/de.po
@@ -71,12 +71,13 @@
# Stephan Kerbl <stephankerbl@gmail.com>, 2021.
# Philipp Wabnitz <philipp.wabnitz@s2011.tu-chemnitz.de>, 2021.
# jmih03 <joerni@mail.de>, 2021.
+# Dominik Moos <dominik.moos@protonmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-08-06 06:47+0000\n"
-"Last-Translator: So Wieso <sowieso@dukun.de>\n"
+"PO-Revision-Date: 2021-08-27 08:25+0000\n"
+"Last-Translator: Dominik Moos <dominik.moos@protonmail.com>\n"
"Language-Team: German <https://hosted.weblate.org/projects/godot-engine/"
"godot/de/>\n"
"Language: de\n"
@@ -84,7 +85,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.8.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -433,13 +434,11 @@ msgstr "Einfügen"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "‚%s‘ kann nicht geöffnet werden."
+msgstr "Node ‚%s‘"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
msgstr "Animation"
@@ -449,9 +448,8 @@ msgstr "AnimationPlayer kann sich nicht selbst animieren, nur andere Objekte."
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "Eigenschaft ‚%s‘ existiert nicht."
+msgstr "Eigenschaft ‚%s‘"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -1092,7 +1090,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Abhängigkeiten"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Ressource"
@@ -1756,13 +1754,13 @@ msgstr ""
"Bitte ‚Import Pvrtc‘ in den Projekteinstellungen aktivieren oder ‚Driver "
"Fallback Enabled‘ ausschalten."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Selbst konfigurierte Debug-Exportvorlage nicht gefunden."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1942,7 +1940,7 @@ msgstr "Als aktuell auswählen"
#: editor/editor_feature_profile.cpp editor/editor_node.cpp
#: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp
msgid "Import"
-msgstr "Import"
+msgstr "Importieren"
#: editor/editor_feature_profile.cpp editor/project_export.cpp
msgid "Export"
@@ -2149,7 +2147,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "Importiere Nutzerinhalte erneut"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Oben"
@@ -2386,6 +2384,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"Dreht sich wenn das Editorfenster neu gezeichnet wird.\n"
+"Fortlaufendes Aktualisieren ist aktiviert, was den Energieverbrauch erhöht. "
+"Zum Deaktivieren klicken."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2664,6 +2665,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Die aktuelle Szene ist nicht gespeichert. Trotzdem öffnen?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Rückgängig machen"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Wiederherstellen"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
"Szene kann nicht neu geladen werden, wenn sie vorher nicht gespeichert wurde."
@@ -3361,6 +3388,11 @@ msgid "Merge With Existing"
msgstr "Mit existierendem vereinen"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Transformation bearbeiten"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Skript öffnen und ausführen"
@@ -3395,9 +3427,8 @@ msgid "Select"
msgstr "Auswählen"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Select Current"
-msgstr "Aktuelles auswählen"
+msgstr "Aktuelle auswählen"
#: editor/editor_node.cpp
msgid "Open 2D Editor"
@@ -3620,6 +3651,10 @@ msgstr ""
"Die ausgewählte Ressource (%s) stimmt mit keinem erwarteten Typ dieser "
"Eigenschaft (%s) überein."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Einzigartig machen"
@@ -3912,14 +3947,12 @@ msgid "Download from:"
msgstr "Herunterladen von:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "Im Browser ausführen"
+msgstr "In Web-Browser öffnen"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "Fehlermeldung kopieren"
+msgstr "Mirror-URL kopieren"
#: editor/export_template_manager.cpp
msgid "Download and Install"
@@ -5730,6 +5763,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "CanvasItem „%s“ zu (%d, d%) verschieben"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Sperren ausgewählt"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Gruppe"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6589,7 +6634,6 @@ msgid "Create Simplified Convex Collision Sibling"
msgstr "Vereinfachtes konvexes Kollisionsnachbarelement erzeugen"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid ""
"Creates a simplified convex collision shape.\n"
"This is similar to single collision shape, but can result in a simpler "
@@ -6604,7 +6648,6 @@ msgid "Create Multiple Convex Collision Siblings"
msgstr "Mehrere konvexe Kollisionsunterelemente erzeugen"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between a single convex collision and a "
@@ -6679,7 +6722,13 @@ msgid "Remove Selected Item"
msgstr "Ausgewähltes Element entfernen"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Aus Szene importieren"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Aus Szene importieren"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7273,6 +7322,16 @@ msgstr "Generiere Punkte"
msgid "Flip Portal"
msgstr "Portal umdrehen"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Transform leeren"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Erzeuge Node"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7779,12 +7838,14 @@ msgid "Skeleton2D"
msgstr "Skelett2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Ruhe-Pose erstellen (aus Knochen)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Kochen in Ruhe-Pose setzen"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Kochen in Ruhe-Pose setzen"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Überschreiben"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7811,6 +7872,71 @@ msgid "Perspective"
msgstr "Perspektivisch"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Senkrecht"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspektivisch"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Senkrecht"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspektivisch"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Senkrecht"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspektivisch"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Senkrecht"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Senkrecht"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspektivisch"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Senkrecht"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspektivisch"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Transformation abgebrochen."
@@ -7918,42 +8044,22 @@ msgid "Bottom View."
msgstr "Sicht von unten."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Unten"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Sicht von links."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Links"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Sicht von Rechts."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Rechts"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Sicht von vorne."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Vorne"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Sicht von hinten."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Hinten"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Transform auf Sicht ausrichten"
@@ -8228,6 +8334,11 @@ msgid "View Portal Culling"
msgstr "Portal-Culling anzeigen"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Portal-Culling anzeigen"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Einstellungen…"
@@ -8293,8 +8404,9 @@ msgid "Post"
msgstr "Nachher"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Namenloser Manipulator"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Unbenanntes Projekt"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8620,7 +8732,7 @@ msgstr "Am Importieren von Elementen {n}/{n}"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Updating the editor"
-msgstr "Den Editor aktualisieren?"
+msgstr "Am Aktualisieren des Editors"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Finalizing"
@@ -8753,6 +8865,9 @@ msgid ""
"Select a theme type from the list to edit its items.\n"
"You can add a custom type or import a type with its items from another theme."
msgstr ""
+"Einen Thementyp aus der Liste auswählen um dessen Elementen zu bearbeiten.\n"
+"Weiter kann ein eigener Typ hinzugefügt oder ein Typ inklusive seiner "
+"Elemente aus einem andern Thema importiert werden."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Color Items"
@@ -8783,6 +8898,9 @@ msgid ""
"This theme type is empty.\n"
"Add more items to it manually or by importing from another theme."
msgstr ""
+"Dieser Thementyp ist leer.\n"
+"Zusätzliche Elemente können manuell oder durch Importieren aus einem andern "
+"Thema hinzugefügt werden."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Color Item"
@@ -9715,7 +9833,7 @@ msgstr "UniformRef-Name geändert"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
-msgstr "Eckpunkt"
+msgstr "Vertex"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Fragment"
@@ -11001,7 +11119,7 @@ msgstr "Projekt ausführen"
#: editor/project_manager.cpp
msgid "Scan"
-msgstr "Scannen"
+msgstr "Durchsuchen"
#: editor/project_manager.cpp
msgid "Scan Projects"
@@ -11297,7 +11415,7 @@ msgstr "Ressourcen-Umleitung entfernen"
#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
-msgstr "Ressourcen-Umleitungsoption entfernen"
+msgstr "Ressourcen-Neuzuordungsoption entfernen"
#: editor/project_settings_editor.cpp
msgid "Changed Locale Filter"
@@ -12426,14 +12544,22 @@ msgid "Change Ray Shape Length"
msgstr "Ändere Länge der Strahlenform"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Room Point Position"
-msgstr "Kurvenpunktposition festlegen"
+msgstr "Room-Point-Position festlegen"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Portal Point Position"
-msgstr "Kurvenpunktposition festlegen"
+msgstr "Portal-Point-Position festlegen"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Zylinderformradius ändern"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Kurven-Eingangsposition festlegen"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -12717,6 +12843,11 @@ msgstr "Lightmaps auftragen"
msgid "Class name can't be a reserved keyword"
msgstr "Der Klassenname kann nicht ein reserviertes Schlüsselwort sein"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Auswahl füllen"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Ende des inneren Exception-Stack-Traces"
@@ -13205,68 +13336,68 @@ msgstr "VisualScript suchen"
msgid "Get %s"
msgstr "%s abrufen"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Paketname fehlt."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Paketsegmente dürfen keine Länge gleich Null haben."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "Das Zeichen ‚%s‘ ist in Android-Anwendungspaketnamen nicht gestattet."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "Eine Ziffer kann nicht das erste Zeichen eines Paketsegments sein."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
"Das Zeichen ‚%s‘ kann nicht das erste Zeichen in einem Paketsegment sein."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "Das Paket muss mindestens einen Punkt-Unterteiler ‚.‘ haben."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Gerät aus Liste auswählen"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr "Läuft auf %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr "APK exportieren…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr "Am Deinstallieren…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr "Am Installieren auf Gerät, bitte warten..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr "Konnte Installation auf Gerät nicht durchführen: %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr "Auf Gerät ausführen…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr "Ließ sich nicht auf Gerät ausführen."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "Das ‚apksigner‘-Hilfswerkzeug konnte nicht gefunden werden."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13274,7 +13405,7 @@ msgstr ""
"Es wurde keine Android-Buildvorlage für dieses Projekt installiert. Es kann "
"im Projektmenü installiert werden."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
@@ -13282,13 +13413,13 @@ msgstr ""
"Die drei Einstellungen Debug Keystore, Debug User und Debug Password müssen "
"entweder alle angegeben, oder alle nicht angegeben sein."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Debug-Keystore wurde weder in den Editoreinstellungen noch in der Vorlage "
"konfiguriert."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
@@ -13296,54 +13427,54 @@ msgstr ""
"Die drei Einstellungen Release Keystore, Release User und Release Password "
"müssen entweder alle angegeben, oder alle nicht angegeben sein."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"Release-Keystore wurde nicht korrekt konfiguriert in den Exporteinstellungen."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"Es wird ein gültiger Android-SDK-Pfad in den Editoreinstellungen benötigt."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "Ungültiger Android-SDK-Pfad in den Editoreinstellungen."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "‚platform-tools‘-Verzeichnis fehlt!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
"‚adb‘-Anwendung der Android-SDK-Platform-Tools konnte nicht gefunden werden."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Schauen Sie im Android-SDK-Verzeichnis das in den Editoreinstellungen "
"angegeben wurde nach."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "‚build-tools‘-Verzeichnis fehlt!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
"‚apksigner‘-Anwendung der Android-SDK-Build-Tools konnte nicht gefunden "
"werden."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Ungültiger öffentlicher Schlüssel für APK-Erweiterung."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Ungültiger Paketname:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13351,38 +13482,23 @@ msgstr ""
"Ungültiges „GodotPaymentV3“-Modul eingebunden in den „android/modules“-"
"Projekteinstellungen (wurde in Godot 3.2.2 geändert).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
"„Use Custom Build“ muss aktiviert werden um die Plugins nutzen zu können."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"„Degrees Of Freedom“ ist nur gültig wenn „Xr Mode“ als „Occulus Mobile VR“ "
-"gesetzt wurde."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"„Hand Tracking“ ist nur gültig wenn „Xr Mode“ als „Occulus Mobile VR“ "
"gesetzt wurde."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"„Focus Awareness“ ist nur gültig wenn „Xr Mode“ als „Occulus Mobile VR“ "
-"gesetzt wurde."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr "„Export AAB“ ist nur gültig wenn „Use Custom Build“ aktiviert ist."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13393,54 +13509,54 @@ msgstr ""
"Ist das Programm im Android SDK build-tools-Verzeichnis vorhanden?\n"
"Das resultierende %s ist nicht signiert."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr "Signiere Debug-Build %s…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr "Signiere Release-Build %s…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr "Keystore konnte nicht gefunden werden, Export fehlgeschlagen."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr "‚apksigner‘ gab Fehlercode #%d zurück"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr "Verifiziere %s…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr "‚apksigner‘-Verifizierung von %s fehlgeschlagen."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr "Exportiere für Android"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
"Ungültiger Dateiname. Android App Bundles benötigen .aab als "
"Dateinamenendung."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "APK-Expansion ist nicht kompatibel mit Android App Bundles."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
"Ungültiger Dateiname. Android APKs benötigen .apk als Dateinamenendung."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr "Nicht unterstütztes Exportformat!\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13449,7 +13565,7 @@ msgstr ""
"existieren keine Versionsinformation für sie. Neuinstallation im ‚Projekt‘-"
"Menü benötigt."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13461,26 +13577,26 @@ msgstr ""
" Godot-Version: %s\n"
"Bitte Android-Build-Vorlage im ‚Projekt‘-Menü neu installieren."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
"Kann res://android/build/res/*.xml Dateien nicht mit Projektnamen "
"überschreiben"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr "Konnte Projektdateien nicht als Gradle-Projekt exportieren\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr "Konnte Expansion-Package-Datei nicht schreiben!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Baue Android-Projekt (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13490,11 +13606,11 @@ msgstr ""
"Alternativ befindet sich die Android-Build-Dokumentation auf docs."
"godotengine.org."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "Verschiebe Ausgabe"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13502,15 +13618,15 @@ msgstr ""
"Exportdatei kann nicht kopiert und umbenannt werden. Fehlermeldungen sollten "
"im Gradle Projektverzeichnis erscheinen."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr "Paket nicht gefunden: %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr "Erzeuge APK…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
@@ -13518,7 +13634,7 @@ msgstr ""
"Konnte keine APK-Vorlage zum Exportieren finden:\n"
"%s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13530,19 +13646,19 @@ msgstr ""
"Es muss entweder eine Exportvorlage mit den allen benötigten Bibliotheken "
"gebaut werden oder die angegebenen Architekturen müssen abgewählt werden."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr "Füge Dateien hinzu…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr "Projektdateien konnten nicht exportiert werden"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "Richte APK aus..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr "Temporäres unausgerichtetes APK konnte nicht entpackt werden."
@@ -14093,6 +14209,14 @@ msgstr ""
"NavigationMeshInstance muss ein Unterobjekt erster oder zweiter Ordnung "
"eines Navigation-Nodes sein. Es liefert nur Navigationsinformationen."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14237,36 +14361,46 @@ msgid ""
"RoomList path is invalid.\n"
"Please check the RoomList branch has been assigned in the RoomManager."
msgstr ""
+"RoomList-Pfad ist ungültig.\n"
+"Wurde der RoomList-Zweig im RoomManager zugewiesen?"
#: scene/3d/room_manager.cpp
msgid "RoomList contains no Rooms, aborting."
-msgstr ""
+msgstr "RoomList einhält keine Rooms, breche ab."
#: scene/3d/room_manager.cpp
msgid "Misnamed nodes detected, check output log for details. Aborting."
msgstr ""
+"Falsch benannte Nodes entdeckt, siehe Log-Ausgabe für Details. Breche ab."
#: scene/3d/room_manager.cpp
msgid "Portal link room not found, check output log for details."
-msgstr ""
+msgstr "Portal-Link-Room nicht gefunden, siehe Log-Ausgabe für Details."
#: scene/3d/room_manager.cpp
msgid ""
"Portal autolink failed, check output log for details.\n"
"Check the portal is facing outwards from the source room."
msgstr ""
+"Portal-Autolink fehlgeschlagen, siehe Log-Ausgabe für Details.\n"
+"Zeigt das Portal nach außen vom Quellraum ausgesehen?"
#: scene/3d/room_manager.cpp
msgid ""
"Room overlap detected, cameras may work incorrectly in overlapping area.\n"
"Check output log for details."
msgstr ""
+"Raumüberlappung festgestellt, Kameras werden im Überlappungsbereich "
+"wahrscheinlich nicht richtig funktionieren.\n"
+"Siehe Log-Ausgabe für Details."
#: scene/3d/room_manager.cpp
msgid ""
"Error calculating room bounds.\n"
"Ensure all rooms contain geometry or manual bounds."
msgstr ""
+"Fehler beim Berechnen der Raumbegrenzungen.\n"
+"Enthalten alle Räume Geometrie oder manuelle Begrenzungen?"
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
@@ -14440,6 +14574,14 @@ msgstr "Eine gültige Datei-Endung muss verwendet werden."
msgid "Enable grid minimap."
msgstr "Gitterübersichtskarte aktivieren."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14497,6 +14639,10 @@ msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
"Die Größe des Viewports muss größer als 0 sein um etwas rendern zu können."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14555,6 +14701,41 @@ msgstr "Zuweisung an Uniform."
msgid "Constants cannot be modified."
msgstr "Konstanten können nicht verändert werden."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Ruhe-Pose erstellen (aus Knochen)"
+
+#~ msgid "Bottom"
+#~ msgstr "Unten"
+
+#~ msgid "Left"
+#~ msgstr "Links"
+
+#~ msgid "Right"
+#~ msgstr "Rechts"
+
+#~ msgid "Front"
+#~ msgstr "Vorne"
+
+#~ msgid "Rear"
+#~ msgstr "Hinten"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Namenloser Manipulator"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "„Degrees Of Freedom“ ist nur gültig wenn „Xr Mode“ als „Occulus Mobile "
+#~ "VR“ gesetzt wurde."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "„Focus Awareness“ ist nur gültig wenn „Xr Mode“ als „Occulus Mobile VR“ "
+#~ "gesetzt wurde."
+
#~ msgid "Package Contents:"
#~ msgstr "Paketinhalte:"
@@ -16714,9 +16895,6 @@ msgstr "Konstanten können nicht verändert werden."
#~ msgid "Images:"
#~ msgstr "Bilder:"
-#~ msgid "Group"
-#~ msgstr "Gruppe"
-
#~ msgid "Sample Conversion Mode: (.wav files):"
#~ msgstr "Audio-Umwandlungs-Modus: (.wav-Dateien):"
diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot
index 0f3b125484..47aa1d3a22 100644
--- a/editor/translations/editor.pot
+++ b/editor/translations/editor.pot
@@ -987,7 +987,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1616,13 +1616,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1992,7 +1992,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2470,6 +2470,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3093,6 +3117,10 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+msgid "Apply MeshInstance Transforms"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3333,6 +3361,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5373,6 +5405,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6271,7 +6313,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6855,6 +6901,14 @@ msgstr ""
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Center Node"
+msgstr ""
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7349,11 +7403,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7381,6 +7435,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7488,42 +7596,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7785,6 +7873,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7850,7 +7942,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11750,6 +11842,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12030,6 +12130,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12496,159 +12600,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12656,57 +12749,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12714,54 +12807,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12769,19 +12862,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13231,6 +13324,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13520,6 +13621,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13560,6 +13669,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/el.po b/editor/translations/el.po
index 93b5941f64..ea1c91f4b5 100644
--- a/editor/translations/el.po
+++ b/editor/translations/el.po
@@ -1041,7 +1041,7 @@ msgstr ""
msgid "Dependencies"
msgstr "ΕξαÏτήσεις"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "ΠόÏος"
@@ -1709,13 +1709,13 @@ msgstr ""
"ΕνεÏγοποιήστε το 'Εισαγωγή PVRTC' στις Ρυθμίσεις ΈÏγου, ή απενεÏγοποιήστε το "
"'ΕνεÏγοποίηση εναλλαγής οδηγοÏ'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Δεν βÏέθηκε Ï€ÏοσαÏμοσμένο πακέτο αποσφαλμάτωσης."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2099,7 +2099,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Επαν)εισαγωγή"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "ΚοÏυφή"
@@ -2614,6 +2614,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Η Ï„Ïέχουσα σκηνή δεν έχει αποθηκευτεί. Συνέχεια με το άνοιγμα;"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "ΑναίÏεση"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "ΑκÏÏωση αναίÏεσης"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
"Δεν είναι δυνατό να φοÏτώσετε εκ νέου μια σκηνή που δεν αποθηκεÏτηκε ποτέ."
@@ -3319,6 +3345,11 @@ msgid "Merge With Existing"
msgstr "Συγχώνευση με υπάÏχων"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Αλλαγή ÎœÎµÏ„Î±ÏƒÏ‡Î·Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï ÎšÎ¯Î½Î·ÏƒÎ·Ï‚"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Άνοιξε & ΤÏέξε μία δέσμη ενεÏγειών"
@@ -3575,6 +3606,10 @@ msgstr ""
"Ο επιλεγμένος πόÏος (%s) δεν ταιÏιάζει σε κανέναν αναμενόμενο Ï„Ïπο γι'αυτήν "
"την ιδιότητα (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Κάνε μοναδικό"
@@ -5722,6 +5757,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Μετακίνηση CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Κλείδωσε το Επιλεγμένο"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Ομάδες"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6678,7 +6725,13 @@ msgid "Remove Selected Item"
msgstr "ΑφαίÏεση του επιλεγμένου στοιοχείου"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Εισαγωγή από την σκηνή"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Εισαγωγή από την σκηνή"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7283,6 +7336,16 @@ msgstr "ΑÏιθμός δημιουÏγημένων σημείων:"
msgid "Flip Portal"
msgstr "ΑναστÏοφή ΟÏιζόντια"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "ΕκκαθάÏιση ΜετασχηματισμοÏ"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "ΔημιουÏγία κόμβου"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "Το AnimationTree δεν έχει διαδÏομή σε AnimationPlayer"
@@ -7792,12 +7855,14 @@ msgid "Skeleton2D"
msgstr "Skeleton2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Κάνε Στάση ΑδÏάνειας (Από Οστά)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Θέσε Οστά σε Στάση ΑδÏάνειας"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Θέσε Οστά σε Στάση ΑδÏάνειας"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Αντικατάσταση"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7824,6 +7889,71 @@ msgid "Perspective"
msgstr "ΠÏοοπτική"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "ΑξονομετÏική"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "ΠÏοοπτική"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "ΑξονομετÏική"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "ΠÏοοπτική"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "ΑξονομετÏική"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "ΠÏοοπτική"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "ΑξονομετÏική"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "ΑξονομετÏική"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "ΠÏοοπτική"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "ΑξονομετÏική"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "ΠÏοοπτική"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Ο μετασχηματισμός ματαιώθηκε."
@@ -7943,42 +8073,22 @@ msgid "Bottom View."
msgstr "Κάτω όψη."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Κάτω"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "ΑÏιστεÏή όψη."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "ΑÏιστεÏά"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Δεξιά όψη."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Δεξιά"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "ΕμπÏόσθια όψη."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "ΜπÏοστά"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Πίσω όψη."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Πίσω"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Στοίχιση ÎœÎµÏ„Î±ÏƒÏ‡Î·Î¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï Î¼Îµ ΠÏοβολή"
@@ -8254,6 +8364,11 @@ msgid "View Portal Culling"
msgstr "Ρυθμίσεις οπτικής γωνίας"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Ρυθμίσεις οπτικής γωνίας"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Ρυθμίσεις..."
@@ -8319,8 +8434,9 @@ msgid "Post"
msgstr "Μετά"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Ανώνυμο μαÏαφέτι"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Ανώνυμο έÏγο"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -12528,6 +12644,16 @@ msgstr "ΟÏισμός θέσης σημείου καμπÏλης"
msgid "Set Portal Point Position"
msgstr "ΟÏισμός θέσης σημείου καμπÏλης"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Αλλαγή Ακτίνας Σχήματος ΚυλίνδÏου"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "ΟÏισμός θέσης εισόδου καμπÏλης"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "Αλλαγή Ακτίνας ΚυλίνδÏου"
@@ -12818,6 +12944,11 @@ msgstr "Τοποθέτηση φώτων:"
msgid "Class name can't be a reserved keyword"
msgstr "Το όνομα της κλάσης δεν μποÏεί να είναι λέξη-κλειδί"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Γέμισμα Επιλογής"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Τέλος ιχνηλάτησης στοίβας εσωτεÏικής εξαίÏεσης"
@@ -13309,77 +13440,77 @@ msgstr "Αναζήτηση VisualScript"
msgid "Get %s"
msgstr "Διάβασε %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Το όνομα του πακέτου λείπει."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Τα τμήματα του πακέτου Ï€Ïέπει να έχουν μη μηδενικό μήκος."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
"Ο χαÏακτήÏας «%s» απαγοÏεÏεται στο όνομα πακέτου των εφαÏμογών Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
"Ένα ψηφίο δεν μποÏεί να είναι ο Ï€Ïώτος χαÏακτήÏας σε ένα τμήμα πακέτου."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
"Ο χαÏακτήÏας '%s' δεν μποÏεί να είναι ο Ï€Ïώτος χαÏακτήÏας σε ένα τμήμα "
"πακέτου."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "Το πακέτο Ï€Ïέπει να έχει τουλάχιστον έναν '.' διαχωÏιστή."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Επιλέξτε συσκευή από την λίστα"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Εξαγωγή Όλων"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Απεγκατάσταση"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Ανάκτηση δεδοένων κατοπτÏισμοÏ, παÏακαλώ πεÏιμένετε..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Δεν ήταν δυνατή η δημιουÏγία στιγμιοτÏπου της σκηνής!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Εκτέλεση ΠÏοσαÏμοσμένης Δέσμης ΕνεÏγειών..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "ΑδÏνατη η δημιουÏγία φακέλου."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13387,75 +13518,75 @@ msgstr ""
"Λείπει το Ï€Ïότυπο δόμησης Android από το έÏγο. Εγκαταστήστε το από το Î¼ÎµÎ½Î¿Ï "
"«ΈÏγο»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Το «debug keystore» δεν έχει καθοÏιστεί στις Ρυθμίσεις ΕπεξεÏγαστή ή την "
"διαμόÏφωση."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"Εσφαλμένη ÏÏθμιση αποθετηÏίου κλειδιών διανομής στην διαμόÏφωση εξαγωγής."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"Μη έγκυÏη διαδÏομή Android SDK για Ï€ÏοσαÏμοσμένη δόμηση στις Ρυθμίσεις "
"ΕπεξεÏγαστή."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
"Μη έγκυÏη διαδÏομή Android SDK για Ï€ÏοσαÏμοσμένη δόμηση στις Ρυθμίσεις "
"ΕπεξεÏγαστή."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Μη έγκυÏη διαδÏομή Android SDK για Ï€ÏοσαÏμοσμένη δόμηση στις Ρυθμίσεις "
"ΕπεξεÏγαστή."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Μη έγκυÏο δημόσιο κλειδί (public key) για επέκταση APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "ΆκυÏο όνομα πακέτου:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13463,38 +13594,23 @@ msgstr ""
"Εσφαλμένη λειτουÏγική μονάδα «GodotPaymentV3» στην ÏÏθμιση εÏγου «Android/"
"Modules» (άλλαξε στην Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
"Η επιλογή «Use Custom Build» Ï€Ïέπει να ενεÏγοποιηθεί για χÏήση Ï€Ïοσθέτων."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"Το «Degrees Of Freedom» είναι έγκυÏο μόνο όταν το «Xr Mode» είναι «Oculus "
-"Mobile VR»."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"Το «Hand Tracking» είναι έγκυÏο μόνο όταν το «Xr Mode» είναι «Oculus Mobile "
"VR»."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"Το «Focus Awareness» είναι έγκυÏο μόνο όταν το «Xr Mode» είναι «Oculus "
-"Mobile VR»."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13502,57 +13618,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"ΣάÏωση αÏχείων,\n"
"ΠαÏακαλώ πεÏιμένετε..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "Σφάλμα κατά το άνοιγμα Ï€ÏοτÏπου για εξαγωγή:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "ΠÏοσθήκη %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Εξαγωγή Όλων"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13560,7 +13676,7 @@ msgstr ""
"Δοκιμή δόμησης από Ï€ÏοσαÏμοσμένο Ï€Ïότυπο δόμησης, αλλά δεν υπάÏχουν "
"πληÏοφοÏίες έκδοσης. ΠαÏακαλοÏμε κάντε επανεγκατάσταση από το Î¼ÎµÎ½Î¿Ï Â«ÎˆÏγο»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13573,26 +13689,26 @@ msgstr ""
"ΠαÏακαλοÏμε να επανεγκαταστήσετε το Ï€Ïότυπο δόμησης Android από το Î¼ÎµÎ½Î¿Ï "
"«ΈÏγο»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "Δεν βÏέθηκε το project.godot στη διαδÏομή του έÏγου."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "Απέτυχε η εγγÏαφή σε αÏχείο:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Δόμηση ΈÏγου Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13601,34 +13717,34 @@ msgstr ""
"Εναλλακτικά, επισκεφτείτε τη σελίδα docs.godotengine.org για τεκμηÏίωση "
"δόμησης Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Δεν βÏέθηκε η κίνηση: «%s»"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "ΔημιουÏγία πεÏιγÏαμμάτων..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "Σφάλμα κατά το άνοιγμα Ï€ÏοτÏπου για εξαγωγή:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13636,21 +13752,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "ΠÏοσθήκη %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Απέτυχε η εγγÏαφή σε αÏχείο:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14197,6 +14313,14 @@ msgstr ""
"Ένας κόμβος Ï„Ïπου στιγμιοτÏπου πλέγματος πλοήγησης Ï€Ïέπει να κληÏονομεί έναν "
"κόμβο Ï„Ïπου πλοήγηση, διότι διαθέτει μόνο δεδομένα πλοήγησης."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14525,6 +14649,14 @@ msgstr "Απαιτείται η χÏήση έγκυÏης επέκτασης."
msgid "Enable grid minimap."
msgstr "ΕνεÏγοποίηση κουμπώματος"
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14582,6 +14714,10 @@ msgstr ""
"Το μέγεθος της οπτικής γωνίας Ï€Ïέπει να είναι μεγαλÏτεÏο του 0 για να γίνει "
"απόδοση."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14633,6 +14769,41 @@ msgstr "Ανάθεση σε ενιαία μεταβλητή."
msgid "Constants cannot be modified."
msgstr "Οι σταθεÏές δεν μποÏοÏν να Ï„ÏοποποιηθοÏν."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Κάνε Στάση ΑδÏάνειας (Από Οστά)"
+
+#~ msgid "Bottom"
+#~ msgstr "Κάτω"
+
+#~ msgid "Left"
+#~ msgstr "ΑÏιστεÏά"
+
+#~ msgid "Right"
+#~ msgstr "Δεξιά"
+
+#~ msgid "Front"
+#~ msgstr "ΜπÏοστά"
+
+#~ msgid "Rear"
+#~ msgstr "Πίσω"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Ανώνυμο μαÏαφέτι"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "Το «Degrees Of Freedom» είναι έγκυÏο μόνο όταν το «Xr Mode» είναι «Oculus "
+#~ "Mobile VR»."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "Το «Focus Awareness» είναι έγκυÏο μόνο όταν το «Xr Mode» είναι «Oculus "
+#~ "Mobile VR»."
+
#~ msgid "Package Contents:"
#~ msgstr "ΠεÏιεχόμενα Πακέτου:"
diff --git a/editor/translations/eo.po b/editor/translations/eo.po
index 9f8c869bee..5987003cb7 100644
--- a/editor/translations/eo.po
+++ b/editor/translations/eo.po
@@ -17,7 +17,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2021-07-31 19:44+0000\n"
+"PO-Revision-Date: 2021-08-14 19:04+0000\n"
"Last-Translator: mourning20s <mourning20s@protonmail.com>\n"
"Language-Team: Esperanto <https://hosted.weblate.org/projects/godot-engine/"
"godot/eo/>\n"
@@ -374,13 +374,12 @@ msgstr "Animado Enmetu"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
msgid "node '%s'"
-msgstr ""
+msgstr "nodo '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "Animacio"
+msgstr "animacio"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -388,9 +387,8 @@ msgstr "AnimationPlayer ne povas animi si mem, nur aliajn ludantojn."
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "Atributo"
+msgstr "atributo"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -601,7 +599,7 @@ msgstr "Iri al AntaÅ­a PaÅo"
#: editor/animation_track_editor.cpp
msgid "Apply Reset"
-msgstr ""
+msgstr "Almeti rekomencigon"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -620,9 +618,8 @@ msgid "Use Bezier Curves"
msgstr "Uzu Bezier-kurbojn"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Create RESET Track(s)"
-msgstr "Alglui trakojn"
+msgstr "Krei RESET-trako(j)n"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -947,9 +944,8 @@ msgid "Edit..."
msgstr "Redakti..."
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Go to Method"
-msgstr "Iru al metodo"
+msgstr "Iri al metodo"
#: editor/create_dialog.cpp
msgid "Change %s Type"
@@ -969,7 +965,7 @@ msgstr "Ne rezultoj por \"%s\"."
#: editor/create_dialog.cpp editor/property_selector.cpp
msgid "No description available for %s."
-msgstr ""
+msgstr "Ne priskribo disponeblas por %s."
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
@@ -1029,7 +1025,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Dependecoj"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Rimedo"
@@ -1069,17 +1065,16 @@ msgid "Owners Of:"
msgstr "Proprietuloj de:"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"Remove the selected files from the project? (Cannot be undone.)\n"
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
-"Forigi selektajn dosierojn el la projekto? (ne malfaro)\n"
-"Vi povas trovi la forigajn dosierojn en la sistema rubujo por restaÅ­ri ilin."
+"Forigi la elektitajn dosierojn el la projekto? (ne malfareblas)\n"
+"Depende de la agordo de via dosiersistemo, la dosierojn aÅ­ movos al rubujo "
+"de la sistemo aŭ forigos ĉiame."
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"The files being removed are required by other resources in order for them to "
"work.\n"
@@ -1087,9 +1082,11 @@ msgid ""
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
-"La forigotaj dosieroj bezonas por ke aliaj risurcoj funkciadi.\n"
-"Forigu ilin iel? (ne malfaro)\n"
-"Vi povas trovi la forigajn dosierojn en la sistema rubujo por restaÅ­ri ilin."
+"La forigotaj dosieroj estas bezoni de aliaj risurcoj por ke ili eblas "
+"funkciadi.\n"
+"Forigi ilin iel? (ne malfareblas)\n"
+"Depende de la agordo de via dosiersistemo, la dosierojn aÅ­ movos al rubujo "
+"de la sistemo aŭ forigos ĉiame."
#: editor/dependency_editor.cpp
msgid "Cannot remove:"
@@ -1259,55 +1256,51 @@ msgid "Licenses"
msgstr "Permesiloj"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Error opening asset file for \"%s\" (not in ZIP format)."
-msgstr "Eraro dum malfermi pakaĵan dosieron (ne estas en ZIP-formo)."
+msgstr ""
+"Eraro dum malfermi pakaĵan dosieron por \"%s\" (ne estas de ZIP-formo)."
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "%s (already exists)"
msgstr "%s (jam ekzistante)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
msgstr ""
+"Enhavaĵoj de pakaĵo \"%s\" - %d dosiero(j) konfliktas kun via projekto:"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - No files conflict with your project:"
-msgstr ""
+msgstr "Enhavaĵoj de pakaĵo \"%s\" - Ne dosiero konfliktas kun via projekto:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
-msgstr "Maldensigas havaĵojn"
+msgstr "Malkompaktigas havaĵojn"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "The following files failed extraction from asset \"%s\":"
-msgstr "La jenaj dosieroj malplenumis malkompaktigi el la pakaĵo:"
+msgstr "La jenajn dosierojn malsukcesis malkompaktigi el la pakaĵo \"%s\":"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "(and %s more files)"
-msgstr "Kaj %s pli dosieroj."
+msgstr "(kaj %s pli dosieroj)"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset \"%s\" installed successfully!"
-msgstr "Pakaĵo instalis sukcese!"
+msgstr "Pakaĵo \"%s\" instalis sukcese!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Success!"
-msgstr "Sukcese!"
+msgstr "Sukceso!"
#: editor/editor_asset_installer.cpp editor/editor_node.cpp
msgid "Install"
msgstr "Instali"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset Installer"
-msgstr "Pakaĵa instalilo"
+msgstr "Instalilo de pakaĵo"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
@@ -1334,9 +1327,8 @@ msgid "Toggle Audio Bus Mute"
msgstr "Baskuli la muta reÄimo de la aÅ­dia buso"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Toggle Audio Bus Bypass Effects"
-msgstr "Baskuli preterpasajn efektojn de aÅ­dia buso"
+msgstr "Baskuli la preterpasajn efektojn de aÅ­dbuso"
#: editor/editor_audio_buses.cpp
msgid "Select Audio Bus Send"
@@ -1371,9 +1363,8 @@ msgid "Bypass"
msgstr "Preterpase"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Bus Options"
-msgstr "Busaj agordoj"
+msgstr "Agordoj de buso"
#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -1539,13 +1530,13 @@ msgid "Can't add autoload:"
msgstr "Ne aldoneblas aÅ­toÅargon:"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "%s is an invalid path. File does not exist."
-msgstr "Dosiero ne ekzistas."
+msgstr "%s estas invalida dosierindiko. Dosiero ne ekzistas."
#: editor/editor_autoload_settings.cpp
msgid "%s is an invalid path. Not in resource path (res://)."
msgstr ""
+"%s estas invalida dosierindiko. Ne estas ĉe risurca dosierindiko (res://)."
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1569,9 +1560,8 @@ msgid "Name"
msgstr "Nomo"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Global Variable"
-msgstr "Renomi variablon"
+msgstr "Malloka variablo"
#: editor/editor_data.cpp
msgid "Paste Params"
@@ -1695,22 +1685,21 @@ msgstr ""
"Ebligu 'Import Pvrtc' en projektaj agordoj, aÅ­ malÅalti 'Driver Fallback "
"Enabled'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Propra sencimiga Åablonon ne trovitis."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
msgstr "Propra eldona Åablono ne trovitis."
#: editor/editor_export.cpp platform/javascript/export/export.cpp
-#, fuzzy
msgid "Template file not found:"
-msgstr "Åœablonan dosieron ne trovitis:"
+msgstr "Åœablonan dosieron ne trovis:"
#: editor/editor_export.cpp
msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
@@ -1731,7 +1720,7 @@ msgstr "Biblioteko de havaĵoj"
#: editor/editor_feature_profile.cpp
msgid "Scene Tree Editing"
-msgstr "Redaktado de scena arbo"
+msgstr "Redaktado de scenoarbo"
#: editor/editor_feature_profile.cpp
msgid "Node Dock"
@@ -1747,48 +1736,51 @@ msgstr "Doko de enporto"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
-msgstr ""
+msgstr "Permesas vidi kaj redakti 3D-scenojn."
#: editor/editor_feature_profile.cpp
msgid "Allows to edit scripts using the integrated script editor."
-msgstr ""
+msgstr "Permesas redakti skriptojn per la integrita skript-redaktilo."
#: editor/editor_feature_profile.cpp
msgid "Provides built-in access to the Asset Library."
-msgstr ""
+msgstr "Provizas integritan atingon al la Biblioteko de havaĵoj."
#: editor/editor_feature_profile.cpp
msgid "Allows editing the node hierarchy in the Scene dock."
-msgstr ""
+msgstr "Permesas redakti la hierarkion de nodoj en la Sceno-doko."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to work with signals and groups of the node selected in the Scene "
"dock."
msgstr ""
+"Permesas labori la signalojn kaj la grupojn de la nodo elektitas en la Sceno-"
+"doko."
#: editor/editor_feature_profile.cpp
msgid "Allows to browse the local file system via a dedicated dock."
-msgstr ""
+msgstr "Permesas esplori la lokan dosiersistemon per dediĉita doko."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to configure import settings for individual assets. Requires the "
"FileSystem dock to function."
msgstr ""
+"Permesas agordi enportajn agordojn por individuaj havaĵoj. Bezonas ke la "
+"doko Dosiersistemo funkcias."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(current)"
-msgstr "(Aktuala)"
+msgstr "(aktuale)"
#: editor/editor_feature_profile.cpp
msgid "(none)"
-msgstr ""
+msgstr "(nenio)"
#: editor/editor_feature_profile.cpp
msgid "Remove currently selected profile, '%s'? Cannot be undone."
-msgstr ""
+msgstr "Forigi aktuale elektitan profilon '%s'? Ne malfareblas."
#: editor/editor_feature_profile.cpp
msgid "Profile must be a valid filename and must not contain '.'"
@@ -1819,19 +1811,16 @@ msgid "Enable Contextual Editor"
msgstr "Åœalti kuntekstan redaktilon"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Properties:"
-msgstr "Maletendi ĉiajn atributojn"
+msgstr "Atributoj de la klaso:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Main Features:"
-msgstr "Åœaltitaj eblecoj:"
+msgstr "Ĉefa eblaĵoj:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Nodes and Classes:"
-msgstr "Åœaltitaj klasoj:"
+msgstr "Nodoj kaj klasoj:"
#: editor/editor_feature_profile.cpp
msgid "File '%s' format is invalid, import aborted."
@@ -1848,7 +1837,6 @@ msgid "Error saving profile to path: '%s'."
msgstr "Eraras konservi profilon al dosierindiko: '%s'."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Reset to Default"
msgstr "Rekomencigi al defaÅ­ltoj"
@@ -1857,14 +1845,12 @@ msgid "Current Profile:"
msgstr "Aktuala profilo:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Create Profile"
-msgstr "ViÅi profilon"
+msgstr "Krei profilon"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Remove Profile"
-msgstr "Forigi punkton"
+msgstr "Forigi profilon"
#: editor/editor_feature_profile.cpp
msgid "Available Profiles:"
@@ -1884,18 +1870,17 @@ msgid "Export"
msgstr "Eksporti"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Configure Selected Profile:"
-msgstr "Aktuala profilo:"
+msgstr "Agordi elektitan profilon:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Extra Options:"
-msgstr "Agordoj de klaso:"
+msgstr "Pli agordoj:"
#: editor/editor_feature_profile.cpp
msgid "Create or import a profile to edit available classes and properties."
msgstr ""
+"Krei aÅ­ enporti profilon por redakti disponeblajn klasojn kaj atributojn."
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
@@ -1922,7 +1907,6 @@ msgid "Select Current Folder"
msgstr "Elekti aktualan dosierujon"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "File exists, overwrite?"
msgstr "Dosiero ekzistas, superskribi?"
@@ -2085,7 +2069,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Re)enportas havaĵoj"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Supro"
@@ -2242,7 +2226,7 @@ msgstr "Atributo:"
#: editor/editor_inspector.cpp editor/scene_tree_dock.cpp
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Set %s"
-msgstr ""
+msgstr "Agordis %s"
#: editor/editor_inspector.cpp
msgid "Set Multiple:"
@@ -2322,6 +2306,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"Rotacius kiam la fenestro de la redaktilo redesegniÄus.\n"
+"'Äœisdatigi konstante' estas Åaltita, kiu eblas pliiÄi kurentuzado. Alklaku "
+"por malÅalti Äin."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2358,19 +2345,16 @@ msgid "Can't open file for writing:"
msgstr "Ne malfermeblas dosieron por skribi:"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Requested file format unknown:"
-msgstr "Petitan dosierformon senkonatas:"
+msgstr "Petitan dosierformon nekonas:"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while saving."
-msgstr "Eraro dum la konservo."
+msgstr "Eraro dum la konservado."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Can't open '%s'. The file could have been moved or deleted."
-msgstr "Ne malfermeblas '%s'. La dosiero estus movita aÅ­ forigita."
+msgstr "Ne malfermeblas '%s'. La dosiero eble estis movita aÅ­ forigita."
#: editor/editor_node.cpp
msgid "Error while parsing '%s'."
@@ -2559,35 +2543,34 @@ msgid ""
"The current scene has no root node, but %d modified external resource(s) "
"were saved anyway."
msgstr ""
+"La aktula sceno havas ne radika nodo, sed %d modifita(j) ekstera(j) "
+"risurco(j) konserviÄis iel."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"A root node is required to save the scene. You can add a root node using the "
"Scene tree dock."
-msgstr "Radika nodo estas necesita por konservi la scenon."
+msgstr ""
+"Radikan nodon bezonas por konservi la scenon. Vi eblas aldoni radikan nodon "
+"per la Scenoarbo-doko."
#: editor/editor_node.cpp
msgid "Save Scene As..."
msgstr "Konservi sceno kiel..."
#: editor/editor_node.cpp modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "This operation can't be done without a scene."
-msgstr "Ĉi tiu funkciado ne povas fari sen sceno."
+msgstr "Ĉi tian operacion ne povas fari sen sceno."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Export Mesh Library"
-msgstr "Eksporti maÅajn bibliotekon"
+msgstr "Eksporti bibliotekon de maÅoj"
#: editor/editor_node.cpp
-#, fuzzy
msgid "This operation can't be done without a root node."
-msgstr "Ĉi tiu funkciado ne povas fari sen radika nodo."
+msgstr "Ĉi tian operacion ne povas fari sen radika nodo."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Export Tile Set"
msgstr "Eksporti kahelaron"
@@ -2600,13 +2583,38 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Nuna sceno ne estas konservita. Malfermi ĉuikaze?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Malfari"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Refari"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Ne povas reÅarÄi scenon, kiu konservis neniam."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reload Saved Scene"
-msgstr "Konservi scenon"
+msgstr "ReÅargi konservitan scenon"
#: editor/editor_node.cpp
msgid ""
@@ -2650,13 +2658,12 @@ msgstr ""
"Konservi ÅanÄojn al la jena(j) sceno(j) antaÅ­ malfermi projektan mastrumilon?"
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"This option is deprecated. Situations where refresh must be forced are now "
"considered a bug. Please report."
msgstr ""
-"Tiu ĉi opcio estas evitinda. Statoj en kiu aktualigo deviÄi estas nun "
-"konsideri kiel cimo. Bonvolu raporti."
+"Tia ĉi opcio estas evitinda. Statoj en kiu bezonus Äisdatigo nun konsideras "
+"kiel cimo. Bonvolu raporti."
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
@@ -2707,13 +2714,12 @@ msgstr ""
"estas en ila reÄimo."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"Scene '%s' was automatically imported, so it can't be modified.\n"
"To make changes to it, a new inherited scene can be created."
msgstr ""
-"Sceno '%s' aÅ­tomate enportiÄis, do ne eblas redakti Äin.\n"
-"Por ÅanÄu Äin, nova heredita sceno povas kreiÄi."
+"Sceno '%s' aÅ­tomate enportiÄis, do Äin ne eblas modifi.\n"
+"Por ÅanÄi Äin, povas krei novan hereditan scenon."
#: editor/editor_node.cpp
msgid ""
@@ -2908,9 +2914,8 @@ msgid "Redo"
msgstr "Refari"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Miscellaneous project or scene-wide tools."
-msgstr "Diversa projekto aÅ­ sceno-abundaj iloj."
+msgstr "Diversa projekto aÅ­ tut-scenaj iloj."
#: editor/editor_node.cpp editor/project_manager.cpp
#: editor/script_create_dialog.cpp
@@ -2922,14 +2927,12 @@ msgid "Project Settings..."
msgstr "Projektaj agordoj..."
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Version Control"
msgstr "Versikontrolo"
#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Set Up Version Control"
-msgstr "Altlevi versitenan sistemon"
+msgstr "Agordi versikontrolon"
#: editor/editor_node.cpp
msgid "Shut Down Version Control"
@@ -2952,14 +2955,12 @@ msgid "Tools"
msgstr "Iloj"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Orphan Resource Explorer..."
-msgstr "Eksplorilo da orfaj risurcoj..."
+msgstr "Eksplorilo de orfaj risurcoj..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reload Current Project"
-msgstr "Renomi projekton"
+msgstr "Renomi aktualan projekton"
#: editor/editor_node.cpp
msgid "Quit to Project List"
@@ -2983,14 +2984,17 @@ msgid ""
"mobile device).\n"
"You don't need to enable it to use the GDScript debugger locally."
msgstr ""
+"Kiam ĉi tiu opcio Åaltus, uzado de unu-alklaka disponigo igos la "
+"komandodosieron provus konekti al la IP-adreso de ĉi tiu komputilo por ke la "
+"rulata projekto eblus sencimigi.\n"
+"Ĉi tiu opcio destiniÄas por fora sencimigado (tipe kun portebla aparato).\n"
+"Vi ne devas Åalti Äin por uzi la GDScript-sencimigilon loke."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Small Deploy with Network Filesystem"
-msgstr "Eta disponigo kun reta dosiersistemo"
+msgstr "Malgranda disponigo kun reta dosiersistemo"
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"When this option is enabled, using one-click deploy for Android will only "
"export an executable without the project data.\n"
@@ -2999,53 +3003,51 @@ msgid ""
"On Android, deploying will use the USB cable for faster performance. This "
"option speeds up testing for projects with large assets."
msgstr ""
-"Kiam ĉi tiun agordon estas Åaltita, eksporti aÅ­ malfaldi produktos minimuman "
-"plenumeblan dosieron.\n"
-"La dosiersistemon disponigas el la projekto fare de editilo per la reto.\n"
-"En Android, malfaldo uzantos la USB-kablon por pli rapida rendimento. Ĉi tui "
-"agordo rapidigas testadon por ludoj kun larÄa areo."
+"Kiam ĉi tiun agordon Åaltus, uzado de unu-alklaka disponigo por Android nur "
+"eksportos komandodosieron sen la datumoj de projekto.\n"
+"La dosiersistemo proviziÄos el la projekto per la redaktilo per la reto.\n"
+"Per Android, disponigado uzos la USB-kablon por pli rapida rendimento. Ĉi "
+"tiu opcio rapidigas testadon por projektoj kun grandaj havaĵoj."
#: editor/editor_node.cpp
msgid "Visible Collision Shapes"
msgstr "Videblaj koliziaj formoj"
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"When this option is enabled, collision shapes and raycast nodes (for 2D and "
"3D) will be visible in the running project."
msgstr ""
-"Koliziaj formoj kaj radĵetaj nodoj (por 2D kaj 3D) estos videblaj en la "
-"rulas ludo, se ĉi tiu agordo estas Åaltita."
+"Kiam ĉi tia opcio Åaltus, koliziaj formoj kaj radĵetaj nodoj (por 2D kaj 3D) "
+"estos videblaj en la rula projekto."
#: editor/editor_node.cpp
msgid "Visible Navigation"
msgstr "Videbla navigacio"
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"When this option is enabled, navigation meshes and polygons will be visible "
"in the running project."
msgstr ""
-"Navigaciaj maÅoj kaj poligonoj estos videblaj en la rulas ludo, se ĉi tiu "
-"agordo estas Åaltita."
+"Kiam ĉi tiu opcio Åaltus, navigaciaj maÅoj kaj plurlateroj estos videblaj en "
+"la rula projekto."
#: editor/editor_node.cpp
msgid "Synchronize Scene Changes"
msgstr "Sinkronigi ÅanÄojn en sceno"
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"When this option is enabled, any changes made to the scene in the editor "
"will be replicated in the running project.\n"
"When used remotely on a device, this is more efficient when the network "
"filesystem option is enabled."
msgstr ""
-"Kiam tuin ĉi agordo estas Åaltita, iuj ÅanÄoj ke faris al la scenon en la "
-"editilo replikos en la rulas ludo.\n"
-"Kiam uzantis malproksime en aparato, estas pli efika kun reta dosiersistemo."
+"Kiam ĉi tiu opcio Åaltus, iuj ÅanÄoj ke faris al la scenon en la redaktilo "
+"replikos en la rula projekto.\n"
+"Kiam uzantus fore en aparato, tiu estas pli efika kiam la reta dosiersistema "
+"opcio estas Åaltita."
#: editor/editor_node.cpp
msgid "Synchronize Script Changes"
@@ -3284,6 +3286,11 @@ msgid "Merge With Existing"
msgstr "Kunfandi kun ekzistanta"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Aliigi Transformon de Animado"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Malfermi & ruli skripto"
@@ -3541,6 +3548,10 @@ msgstr ""
"La elektinta risurco (%s) ne kongruas ian atenditan tipon por ĉi tiu "
"atributo (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Farigi unikan"
@@ -5670,6 +5681,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Movi CanvasItem \"%s\" al (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Åœlosi elektiton"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grupoj"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6619,7 +6642,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7207,6 +7234,15 @@ msgstr "Nombrado de generintaj punktoj:"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Krei nodon"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7703,12 +7739,14 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Rekomencigi al defaÅ­ltoj"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Superskribi"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7735,6 +7773,63 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Malsupre maldekstre"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Maldekstra butono"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Dekstra butono"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7851,42 +7946,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8157,6 +8232,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -8222,8 +8301,9 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr ""
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Sennoma projekto"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -11881,7 +11961,7 @@ msgstr "Renomi nodon"
#: editor/scene_tree_editor.cpp
msgid "Scene Tree (Nodes):"
-msgstr "Scena arbo (nodoj):"
+msgstr "Scenoarbo (nodoj):"
#: editor/scene_tree_editor.cpp
msgid "Node Configuration Warning!"
@@ -12263,6 +12343,15 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Krei okludan plurlateron"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12547,6 +12636,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13026,165 +13119,154 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Eksporti..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Malinstali"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Åœargas, bonvolu atendi..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Ne eble komencas subprocezon!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Rulas propran skripton..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Ne povis krei dosierujon."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13192,61 +13274,61 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Skanas dosierojn,\n"
"Bonvolu atendi..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Aldonas %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13254,57 +13336,57 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "Ne eblas redakti project.godot en projekta dosierindiko."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Enhavo de pakaĵo:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Konektas..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13312,21 +13394,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Aldonas %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Ne eble komencas subprocezon!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13781,6 +13863,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14070,6 +14160,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14110,6 +14208,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/es.po b/editor/translations/es.po
index eef4affde3..95a4a08bfd 100644
--- a/editor/translations/es.po
+++ b/editor/translations/es.po
@@ -69,11 +69,12 @@
# pabloggomez <pgg2733@gmail.com>, 2021.
# Erick Figueroa <querecuto@hotmail.com>, 2021.
# jonagamerpro1234 ss <js398704@gmail.com>, 2021.
+# davidrogel <david.rogel.pernas@icloud.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-08-12 14:48+0000\n"
+"PO-Revision-Date: 2021-08-27 08:25+0000\n"
"Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/"
"godot/es/>\n"
@@ -82,7 +83,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.8.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -433,15 +434,13 @@ msgstr "Insertar Animación"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "No se puede abrir '%s'."
+msgstr "nodo '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "Animación"
+msgstr "animación"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -449,9 +448,8 @@ msgstr "Un AnimationPlayer no puede animarse a sí mismo, solo a otros players."
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "No existe la propiedad '%s'."
+msgstr "propiedad '%s'"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -690,7 +688,7 @@ msgstr "Crear pista(s) RESET"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
-msgstr "Optimizar animación"
+msgstr "Optimizar Animación"
#: editor/animation_track_editor.cpp
msgid "Max. Linear Error:"
@@ -795,7 +793,7 @@ msgstr "%d coincidencias."
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Match Case"
-msgstr "Distinguir mayúsculas y minúsculas"
+msgstr "Coincidir Mayus./Minus."
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Whole Words"
@@ -1094,7 +1092,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Dependencias"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Recursos"
@@ -1755,13 +1753,13 @@ msgstr ""
"Activa Import Pvrtc' en Configuración del Proyecto, o desactiva 'Driver "
"Fallback Enabled'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "No se encontró la plantilla de depuración personalizada."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2146,7 +2144,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Re)Importación de Assets"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Superior"
@@ -2234,7 +2232,7 @@ msgstr "Buscar en la Ayuda"
#: editor/editor_help_search.cpp
msgid "Case Sensitive"
-msgstr "Respetar mayús/minúsculas"
+msgstr "Respetar Mayus./Minus."
#: editor/editor_help_search.cpp
msgid "Show Hierarchy"
@@ -2383,6 +2381,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"Gira cuando la ventana del editor se vuelve a dibujar.\n"
+"Si Update Continuously está habilitado puede incrementarse el consumo. Clica "
+"para deshabilitarlo."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2661,6 +2662,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Escena actual no guardada ¿Abrir de todos modos?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Deshacer"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Rehacer"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "No se puede volver a cargar una escena que nunca se guardó."
@@ -3215,7 +3242,7 @@ msgstr "Apoyar el desarrollo de Godot"
#: editor/editor_node.cpp
msgid "Play the project."
-msgstr "Ejecutar el proyecto."
+msgstr "Reproducir el proyecto."
#: editor/editor_node.cpp
msgid "Play"
@@ -3356,6 +3383,11 @@ msgid "Merge With Existing"
msgstr "Combinar Con Existentes"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Cambiar Transformación de la Animación"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Abrir y Ejecutar un Script"
@@ -3613,6 +3645,10 @@ msgstr ""
"El recurso seleccionado (%s) no coincide con ningún tipo esperado para esta "
"propiedad (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Hacer Único"
@@ -3911,14 +3947,12 @@ msgid "Download from:"
msgstr "Descargar desde:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "Ejecutar en Navegador"
+msgstr "Abrir en el Navegador Web"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "Copiar Error"
+msgstr "Copiar Mirror URL"
#: editor/export_template_manager.cpp
msgid "Download and Install"
@@ -5731,6 +5765,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Mover CanvasItem \"%s\" a (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Bloqueo Seleccionado"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grupo"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6676,7 +6722,13 @@ msgid "Remove Selected Item"
msgstr "Eliminar Elemento Seleccionado"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Importar desde escena"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Importar desde escena"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7274,6 +7326,16 @@ msgstr "Generar puntos"
msgid "Flip Portal"
msgstr "Voltear Portal"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Reestablecer Transformación"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Crear Nodo"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "El AnimationTree no tiene una ruta asignada a un AnimationPlayer"
@@ -7605,15 +7667,15 @@ msgstr "Seleccionar Color"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Convert Case"
-msgstr "Convertir Mayús./Minús."
+msgstr "Convertir Mayus./Minus."
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Uppercase"
-msgstr "Mayúscula"
+msgstr "Mayúsculas"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Lowercase"
-msgstr "Minúscula"
+msgstr "Minúsculas"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Capitalize"
@@ -7777,12 +7839,14 @@ msgid "Skeleton2D"
msgstr "Skeleton2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Crear Pose de Descanso (Desde Huesos)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Asignar Pose de Descanso a Huesos"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Asignar Pose de Descanso a Huesos"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Sobreescribir"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7809,6 +7873,71 @@ msgid "Perspective"
msgstr "Perspectiva"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspectiva"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Transformación Abortada."
@@ -7916,42 +8045,22 @@ msgid "Bottom View."
msgstr "Vista Inferior."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Abajo"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Vista Izquierda."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Izquierda"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Vista Derecha."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Derecha"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Vista Frontal."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Frente"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Vista Posterior."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Detrás"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Alinear la Transformación con la Vista"
@@ -8223,6 +8332,11 @@ msgid "View Portal Culling"
msgstr "Ver Eliminación de Portales"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Ver Eliminación de Portales"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Configuración..."
@@ -8288,8 +8402,9 @@ msgid "Post"
msgstr "Posterior"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Gizmo sin nombre"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Proyecto Sin Nombre"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8747,6 +8862,9 @@ msgid ""
"Select a theme type from the list to edit its items.\n"
"You can add a custom type or import a type with its items from another theme."
msgstr ""
+"Selecciona un Theme de la lista para editar sus propiedades.\n"
+"Puedes añadir un Theme personalizado o importar un Theme con sus propiedades "
+"desde otro Theme."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Color Items"
@@ -8777,6 +8895,8 @@ msgid ""
"This theme type is empty.\n"
"Add more items to it manually or by importing from another theme."
msgstr ""
+"Este Theme está vacío.\n"
+"Añade más propiedades manualmente o impórtalas desde otro Theme."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Color Item"
@@ -11567,15 +11687,15 @@ msgstr "snake_case a PascalCase"
#: editor/rename_dialog.cpp
msgid "Case"
-msgstr "Mayús./Minús."
+msgstr "Mayus./Minus."
#: editor/rename_dialog.cpp
msgid "To Lowercase"
-msgstr "A minúsculas"
+msgstr "A Minúsculas"
#: editor/rename_dialog.cpp
msgid "To Uppercase"
-msgstr "A mayúsculas"
+msgstr "A Mayúsculas"
#: editor/rename_dialog.cpp
msgid "Reset"
@@ -12417,14 +12537,22 @@ msgid "Change Ray Shape Length"
msgstr "Cambiar Longitud de la Forma del Rayo"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Room Point Position"
-msgstr "Establecer Posición de Punto de Curva"
+msgstr "Establecer Posición del Room Point"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Portal Point Position"
-msgstr "Establecer Posición de Punto de Curva"
+msgstr "Establecer Posición del Portal Point"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Cambiar Radio de la Forma del Cilindro"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Establecer Posición de Entrada de Curva"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -12711,6 +12839,11 @@ msgstr "Trazar lightmaps"
msgid "Class name can't be a reserved keyword"
msgstr "El nombre de la clase no puede ser una palabra reservada"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Rellenar Selección"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Fin del reporte de la pila de excepciones"
@@ -13197,70 +13330,70 @@ msgstr "Buscar en VisualScript"
msgid "Get %s"
msgstr "Obtener %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Falta el nombre del paquete."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Los segmentos del paquete deben ser de largo no nulo."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
"El carácter '%s' no está permitido en nombres de paquete de aplicación "
"Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "Un dígito no puede ser el primer carácter en un segmento de paquete."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
"El carácter '%s' no puede ser el primer carácter en un segmento de paquete."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "El paquete debe tener al menos un '.' como separador."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Seleccionar dispositivo de la lista"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr "Ejecutar en %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr "Exportar APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr "Desinstalando..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr "Instalando en el dispositivo, espera por favor..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr "No se pudo instalar en el dispositivo: %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr "Ejecutando en el dispositivo..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr "No se ha podido ejecutar en el dispositivo."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "No se pudo encontrar la herramienta 'apksigner'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13268,7 +13401,7 @@ msgstr ""
"La plantilla de exportación de Android no esta instalada en el proyecto. "
"Instalala desde el menú de Proyecto."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
@@ -13276,12 +13409,12 @@ msgstr ""
"Deben configurarse los ajustes de Depuración de Claves, Depuración de "
"Usuarios Y Depuración de Contraseñas O ninguno de ellos."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Debug keystore no configurada en Configuración del Editor ni en el preset."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
@@ -13289,57 +13422,57 @@ msgstr ""
"Deben configurarse los ajustes de Liberación del Almacén de Claves, "
"Liberación del Usuario Y Liberación de la Contraseña O ninguno de ellos."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"Release keystore no está configurado correctamente en el preset de "
"exportación."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"Se requiere una ruta válida del SDK de Android en la Configuración del "
"Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "Ruta del SDK de Android inválida en la Configuración del Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "¡No se encontró el directorio 'platform-tools'!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
"No se pudo encontrar el comando adb de las herramientas de la plataforma SDK "
"de Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Por favor, comprueba el directorio del SDK de Android especificado en la "
"Configuración del Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "¡No se encontró el directorio 'build-tools'!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
"No se pudo encontrar el comando apksigner de las herramientas de "
"construcción del SDK de Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Clave pública inválida para la expansión de APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Nombre de paquete inválido:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13347,37 +13480,22 @@ msgstr ""
"El módulo \"GodotPaymentV3\" incluido en los ajustes del proyecto \"android/"
"modules\" es inválido (cambiado en Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "\"Use Custom Build\" debe estar activado para usar los plugins."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Degrees Of Freedom\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile "
-"VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"Hand Tracking\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile VR\"."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Focus Awareness\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile VR"
-"\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"\"Export AAB\" sólo es válido cuando \"Use Custom Build\" está activado."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13389,52 +13507,52 @@ msgstr ""
"SDK build-tools.\n"
"El resultado %s es sin firma."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr "Firma de depuración %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr "Firmando liberación %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr "No se pudo encontrar la keystore, no se puedo exportar."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr "'apksigner' ha retornado con error #%d"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr "Verificando %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr "La verificación de 'apksigner' de %s ha fallado."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr "Exportando para Android"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
"¡Nombre del archivo inválido! Android App Bundle requiere la extensión *.aab."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "La Expansión APK no es compatible con Android App Bundle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "¡Nombre de archivo inválido! Android APK requiere la extensión *.apk."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr "¡Formato de exportación no compatible!\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13443,7 +13561,7 @@ msgstr ""
"información de la versión para ello. Por favor, reinstala desde el menú "
"'Proyecto'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13456,26 +13574,26 @@ msgstr ""
"Por favor, reinstala la plantilla de compilación de Android desde el menú "
"'Proyecto'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
"No se puede sobrescribir los archivos res://android/build/res/*.xml con el "
"nombre del proyecto"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr "No se pueden exportar los archivos del proyecto a un proyecto gradle\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr "¡No se pudo escribir el archivo del paquete de expansión!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Construir Proyecto Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13484,11 +13602,11 @@ msgstr ""
"También puedes visitar docs.godotengine.org para consultar la documentación "
"de compilación de Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "Moviendo salida"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13496,15 +13614,15 @@ msgstr ""
"No se puede copiar y renombrar el archivo de exportación, comprueba el "
"directorio del proyecto de gradle para ver los resultados."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr "Paquete no encontrado:% s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr "Creando APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
@@ -13512,7 +13630,7 @@ msgstr ""
"No se pudo encontrar la plantilla APK para exportar:\n"
"%s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13524,19 +13642,19 @@ msgstr ""
"Por favor, construya una plantilla con todas las bibliotecas necesarias, o "
"desmarque las arquitecturas que faltan en el preajuste de exportación."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr "Añadiendo archivos ..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr "No se pudieron exportar los archivos del proyecto"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "Alineando APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr "No se pudo descomprimir el APK no alineado temporal."
@@ -14090,6 +14208,14 @@ msgstr ""
"NavigationMeshInstance debe ser hijo o nieto de un nodo Navigation. Ya que "
"sólo proporciona los datos de navegación."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14229,36 +14355,50 @@ msgid ""
"RoomList path is invalid.\n"
"Please check the RoomList branch has been assigned in the RoomManager."
msgstr ""
+"La ruta del RoomList no es válida.\n"
+"Por favor, comprueba que la rama de la RoomList ha sido asignada al "
+"RoomManager."
#: scene/3d/room_manager.cpp
msgid "RoomList contains no Rooms, aborting."
-msgstr ""
+msgstr "La RoomList no contiene Rooms, abortando."
#: scene/3d/room_manager.cpp
msgid "Misnamed nodes detected, check output log for details. Aborting."
msgstr ""
+"Nodos con nombres incorrectos detectados, comprueba la salida del Log para "
+"más detalles. Abortando."
#: scene/3d/room_manager.cpp
msgid "Portal link room not found, check output log for details."
msgstr ""
+"No se encuentra Portal link room, comprueba la salida del Log para más "
+"detalles."
#: scene/3d/room_manager.cpp
msgid ""
"Portal autolink failed, check output log for details.\n"
"Check the portal is facing outwards from the source room."
msgstr ""
+"Fallo en el Portal autolink, comprueba la salida del Log para más detalles.\n"
+"Comprueba si el portal está mirando hacia fuera de la room de origen."
#: scene/3d/room_manager.cpp
msgid ""
"Room overlap detected, cameras may work incorrectly in overlapping area.\n"
"Check output log for details."
msgstr ""
+"Detectada superposición de la Room, las cámaras pueden funcionar "
+"incorrectamente en las zonas donde hay superposición.\n"
+"Comrpueba la salida del Log para más detalles."
#: scene/3d/room_manager.cpp
msgid ""
"Error calculating room bounds.\n"
"Ensure all rooms contain geometry or manual bounds."
msgstr ""
+"Error al calcular los límites de la room.\n"
+"Asegúrate de que todas las rooms contienen geometría o límites manuales."
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
@@ -14426,6 +14566,14 @@ msgstr "Debe tener una extensión válida."
msgid "Enable grid minimap."
msgstr "Activar minimapa de cuadrícula."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14481,6 +14629,10 @@ msgstr ""
"El tamaño del Viewport debe ser mayor que 0 para poder renderizar cualquier "
"cosa."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14539,6 +14691,41 @@ msgstr "Asignación a uniform."
msgid "Constants cannot be modified."
msgstr "Las constantes no pueden modificarse."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Crear Pose de Descanso (Desde Huesos)"
+
+#~ msgid "Bottom"
+#~ msgstr "Abajo"
+
+#~ msgid "Left"
+#~ msgstr "Izquierda"
+
+#~ msgid "Right"
+#~ msgstr "Derecha"
+
+#~ msgid "Front"
+#~ msgstr "Frente"
+
+#~ msgid "Rear"
+#~ msgstr "Detrás"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Gizmo sin nombre"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Degrees Of Freedom\" sólo es válido cuando \"Xr Mode\" es \"Oculus "
+#~ "Mobile VR\"."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Focus Awareness\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile "
+#~ "VR\"."
+
#~ msgid "Package Contents:"
#~ msgstr "Contenido del Paquete:"
@@ -16735,9 +16922,6 @@ msgstr "Las constantes no pueden modificarse."
#~ msgid "Images:"
#~ msgstr "Imágenes:"
-#~ msgid "Group"
-#~ msgstr "Grupo"
-
#~ msgid "Sample Conversion Mode: (.wav files):"
#~ msgstr "Modo de conversión de muestreo: (archivos .wav):"
diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po
index d5c955a347..0decc83e9f 100644
--- a/editor/translations/es_AR.po
+++ b/editor/translations/es_AR.po
@@ -17,12 +17,13 @@
# Cristian Yepez <cristianyepez@gmail.com>, 2020.
# Skarline <lihue-molina@hotmail.com>, 2020.
# Joakker <joaquinandresleon108@gmail.com>, 2020.
+# M3CG <cgmario1999@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-08-06 06:47+0000\n"
-"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n"
+"PO-Revision-Date: 2021-09-06 16:32+0000\n"
+"Last-Translator: M3CG <cgmario1999@gmail.com>\n"
"Language-Team: Spanish (Argentina) <https://hosted.weblate.org/projects/"
"godot-engine/godot/es_AR/>\n"
"Language: es_AR\n"
@@ -30,7 +31,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.8.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -380,15 +381,13 @@ msgstr "Insertar Anim"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "No se puede abrir '%s'."
+msgstr "nodo '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "Animación"
+msgstr "animación"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -396,9 +395,8 @@ msgstr "Un AnimationPlayer no puede animarse a sí mismo, solo a otros players."
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "No existe la propiedad '%s'."
+msgstr "propiedad '%s'"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -1038,7 +1036,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Dependencias"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Recursos"
@@ -1078,18 +1076,16 @@ msgid "Owners Of:"
msgstr "Dueños De:"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"Remove the selected files from the project? (Cannot be undone.)\n"
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
-"¿Eliminar los archivos seleccionados del proyecto? (irreversible)\n"
-"Podés encontrar los archivos eliminados en la papelera de reciclaje del "
-"sistema para restaurarlos."
+"¿Eliminar los archivos seleccionados del proyecto? (No se puede deshacer).\n"
+"Dependiendo de la configuración de tu sistema de archivos, los archivos se "
+"moverán a la papelera del sistema o se eliminarán permanentemente."
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"The files being removed are required by other resources in order for them to "
"work.\n"
@@ -1097,11 +1093,11 @@ msgid ""
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
-"Los archivos que se están removiendo son requeridos por otros recursos para "
+"Los archivos que se están eliminando son requeridos por otros recursos para "
"funcionar.\n"
-"¿Eliminarlos de todos modos? (irreversible)\n"
-"Podés encontrar los archivos eliminados en la papelera de reciclaje del "
-"sistema para restaurarlos."
+"¿Eliminarlos de todos modos? (No se puede deshacer).\n"
+"Dependiendo de la configuración de tu sistema de archivos, los archivos se "
+"moverán a la papelera del sistema o se eliminarán permanentemente."
#: editor/dependency_editor.cpp
msgid "Cannot remove:"
@@ -1271,9 +1267,10 @@ msgid "Licenses"
msgstr "Licencias"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Error opening asset file for \"%s\" (not in ZIP format)."
-msgstr "Error al abrir el archivo de paquete (no esta en formato ZIP)."
+msgstr ""
+"Error al abrir el archivo de assets para \"%s\" (no se encuentra en formato "
+"ZIP)."
#: editor/editor_asset_installer.cpp
msgid "%s (already exists)"
@@ -1282,10 +1279,12 @@ msgstr "%s (ya existe)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
msgstr ""
+"Contenido del asset \"%s\" - %d archivo(s) en conflicto con tu proyecto:"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - No files conflict with your project:"
msgstr ""
+"Contenido del asset \"%s\" - No hay archivos en conflicto con tu proyecto:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
@@ -1699,13 +1698,13 @@ msgstr ""
"Activá Import Pvrtc' en la Ajustes del Proyecto, o desactiva 'Driver "
"Fallback Enabled'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Plantilla debug personalizada no encontrada."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1782,6 +1781,8 @@ msgid ""
"Allows to configure import settings for individual assets. Requires the "
"FileSystem dock to function."
msgstr ""
+"Permite ajustar los parámetros de importación para assets individuales. "
+"Requiere del panel Sistema de Archivos para funcionar."
#: editor/editor_feature_profile.cpp
msgid "(current)"
@@ -1793,7 +1794,7 @@ msgstr "(ninguno)"
#: editor/editor_feature_profile.cpp
msgid "Remove currently selected profile, '%s'? Cannot be undone."
-msgstr ""
+msgstr "¿Eliminar el perfil seleccionado, '%s'? No se puede deshacer."
#: editor/editor_feature_profile.cpp
msgid "Profile must be a valid filename and must not contain '.'"
@@ -1897,6 +1898,7 @@ msgstr "Opciones Extra:"
#: editor/editor_feature_profile.cpp
msgid "Create or import a profile to edit available classes and properties."
msgstr ""
+"Crear o importar un perfil para editar las clases y propiedades disponibles."
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
@@ -2085,7 +2087,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Re)Importando Assets"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Cima"
@@ -2322,6 +2324,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"Gira cuando la ventana del editor se redibuja.\n"
+"Update Continuously está habilitado, lo que puede aumentar el consumo "
+"eléctrico. Click para desactivarlo."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2561,13 +2566,16 @@ msgid ""
"The current scene has no root node, but %d modified external resource(s) "
"were saved anyway."
msgstr ""
+"La escena actual no contiene un nodo raíz, pero %d resource(s) externo(s) "
+"modificado(s) fueron guardados de todos modos."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"A root node is required to save the scene. You can add a root node using the "
"Scene tree dock."
-msgstr "Se necesita un nodo raíz para guardar la escena."
+msgstr ""
+"Se requiere un nodo raíz para guardar la escena. Podés agregar un nodo raíz "
+"usando el dock de árbol de Escenas."
#: editor/editor_node.cpp
msgid "Save Scene As..."
@@ -2598,6 +2606,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Escena actual sin guardar. Abrir de todos modos?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Deshacer"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Rehacer"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "No se puede volver a cargar una escena que nunca se guardó."
@@ -3240,9 +3274,8 @@ msgid "Install from file"
msgstr "Instalar desde archivo"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Select android sources file"
-msgstr "Seleccioná una Mesh de Origen:"
+msgstr "Seleccionar archivo de fuentes de Android"
#: editor/editor_node.cpp
msgid ""
@@ -3292,6 +3325,11 @@ msgid "Merge With Existing"
msgstr "Mergear Con Existentes"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Cambiar Transform de Anim"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Abrir y Correr un Script"
@@ -3362,9 +3400,8 @@ msgid "No sub-resources found."
msgstr "No se encontró ningún sub-recurso."
#: editor/editor_path.cpp
-#, fuzzy
msgid "Open a list of sub-resources."
-msgstr "No se encontró ningún sub-recurso."
+msgstr "Abra una lista de sub-recursos."
#: editor/editor_plugin.cpp
msgid "Creating Mesh Previews"
@@ -3409,9 +3446,8 @@ msgid "Measure:"
msgstr "Medida:"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Frame Time (ms)"
-msgstr "Duración de Frame (seg)"
+msgstr "Duración de Frame (ms)"
#: editor/editor_profiler.cpp
msgid "Average Time (ms)"
@@ -3442,6 +3478,12 @@ msgid ""
"functions called by that function.\n"
"Use this to find individual functions to optimize."
msgstr ""
+"Inclusivo: Incluye el tiempo de otras funciones llamadas por esta función.\n"
+"Usalo para detectar cuellos de botella.\n"
+"\n"
+"Propio: Sólo contabiliza el tiempo empleado en la propia función, no en "
+"otras funciones llamadas por esa función.\n"
+"Utilizalo para buscar funciones individuales que optimizar."
#: editor/editor_profiler.cpp
msgid "Frame #:"
@@ -3544,6 +3586,10 @@ msgstr ""
"El recurso seleccionado (%s) no concuerda con ningún tipo esperado para esta "
"propiedad (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Convertir en Unico"
@@ -3614,11 +3660,10 @@ msgid "Did you forget the '_run' method?"
msgstr "Te olvidaste del método '_run'?"
#: editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Hold %s to round to integers. Hold Shift for more precise changes."
msgstr ""
-"Mantené pulsado Ctrl para redondear a enteros. Mantené pulsado Shift para "
-"cambios más precisos."
+"Mantené %s para redondear a números enteros. Mantené Mayús para cambios más "
+"precisos."
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
@@ -3710,10 +3755,9 @@ msgid "Error getting the list of mirrors."
msgstr "Error al obtener la lista de mirrors."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error parsing JSON with the list of mirrors. Please report this issue!"
msgstr ""
-"Error al parsear el JSON de la lista de mirrors. ¡Por favor reportá este "
+"Error al parsear el JSON con la lista de mirrors. ¡Por favor, reportá este "
"problema!"
#: editor/export_template_manager.cpp
@@ -3771,24 +3815,21 @@ msgid "SSL Handshake Error"
msgstr "Error de Handshake SSL"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't open the export templates file."
-msgstr "No se puede abir el zip de plantillas de exportación."
+msgstr "No se puede abrir el archivo de plantillas de exportación."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Invalid version.txt format inside the export templates file: %s."
-msgstr "Formato de version.txt inválido dentro de plantillas: %s."
+msgstr "Formato de version.txt inválido dentro de archivo de plantillas: %s."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No version.txt found inside the export templates file."
-msgstr "No se encontro ningún version.txt dentro de las plantillas."
+msgstr ""
+"No se ha encontrado el archivo version.txt dentro del archivo de plantillas."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for extracting templates:"
-msgstr "Error creando rutas para las plantillas:"
+msgstr "Error al crear la ruta para extraer las plantillas:"
#: editor/export_template_manager.cpp
msgid "Extracting Export Templates"
@@ -3799,9 +3840,8 @@ msgid "Importing:"
msgstr "Importando:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Remove templates for the version '%s'?"
-msgstr "Quitar plantilla version '%s'?"
+msgstr "¿Quitar plantillas para la versión '%s'?"
#: editor/export_template_manager.cpp
msgid "Uncompressing Android Build Sources"
@@ -3833,29 +3873,28 @@ msgstr "Abrir Carpeta"
#: editor/export_template_manager.cpp
msgid "Open the folder containing installed templates for the current version."
msgstr ""
+"Abra la carpeta que contiene las plantillas instaladas para la versión "
+"actual."
#: editor/export_template_manager.cpp
msgid "Uninstall"
msgstr "Desinstalar"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uninstall templates for the current version."
-msgstr "Valor inicial para el contador"
+msgstr "Desinstalar las plantillas de la versión actual."
#: editor/export_template_manager.cpp
msgid "Download from:"
msgstr "Descargar desde:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "Ejecutar en el Navegador"
+msgstr "Abrir en el Navegador Web"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "Copiar Error"
+msgstr "Copiar URL del Mirror"
#: editor/export_template_manager.cpp
msgid "Download and Install"
@@ -3866,6 +3905,8 @@ msgid ""
"Download and install templates for the current version from the best "
"possible mirror."
msgstr ""
+"Descargar e instalar plantillas para la versión actual de el mejor mirror "
+"posible."
#: editor/export_template_manager.cpp
msgid "Official export templates aren't available for development builds."
@@ -3911,6 +3952,8 @@ msgid ""
"The templates will continue to download.\n"
"You may experience a short editor freeze when they finish."
msgstr ""
+"Las plantillas seguirán descargándose.\n"
+"Puede que el editor se frice brevemente cuando terminen."
#: editor/filesystem_dock.cpp
msgid "Favorites"
@@ -5504,7 +5547,7 @@ msgstr "Archivo ZIP de Assets"
#: editor/plugins/audio_stream_editor_plugin.cpp
msgid "Audio Preview Play/Pause"
-msgstr ""
+msgstr "Reproducir/Pausar Previsualización de Audio"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5664,6 +5707,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Mover CanvasItem \"%s\" a (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Bloqueo Seleccionado"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grupo"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -5765,13 +5820,13 @@ msgstr "Cambiar Anclas"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid ""
"Project Camera Override\n"
"Overrides the running project's camera with the editor viewport camera."
msgstr ""
-"Reemplazar Cámara del Juego\n"
-"Reemplaza la cámara del juego con la cámara del viewport del editor."
+"Reemplazar Cámara del Proyecto\n"
+"Reemplaza la cámara del proyecto en ejecución con la cámara del viewport del "
+"editor."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5780,6 +5835,9 @@ msgid ""
"No project instance running. Run the project from the editor to use this "
"feature."
msgstr ""
+"Reemplazo de la Cámara de Proyecto\n"
+"No se está ejecutando ninguna instancia del proyecto. Ejecutá el proyecto "
+"desde el editor para utilizar esta función."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5847,31 +5905,27 @@ msgstr "Modo Seleccionar"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Drag: Rotate selected node around pivot."
-msgstr "Quitar el nodo o transición seleccionado/a."
+msgstr "Arrastrar: Rotar el nodo seleccionado alrededor del pivote."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Alt+Drag: Move selected node."
-msgstr "Alt+Arrastrae: Mover"
+msgstr "Alt+Arrastrar: Mover el nodo seleccionado"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "V: Set selected node's pivot position."
-msgstr "Quitar el nodo o transición seleccionado/a."
+msgstr "V: Establecer la posición de pivote del nodo seleccionado."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Alt+RMB: Show list of all nodes at position clicked, including locked."
msgstr ""
-"Mostrar una lista de todos los objetos en la posicion cliqueada\n"
-"(igual que Alt+Click Der. en modo selección)."
+"Alt+Click Der.: Mostrar una lista de todos los nodos en la posición "
+"clickeada, incluyendo bloqueados."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "RMB: Add node at position clicked."
-msgstr ""
+msgstr "Click Der.: Añadir un nodo en la posición clickeada."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6412,9 +6466,8 @@ msgid "Couldn't create a single convex collision shape."
msgstr "No se pudo crear una forma de colisión única."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Shape"
-msgstr "Crear Forma Convexa Única"
+msgstr "Crear una Figura Convexa Simplificada"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Single Convex Shape"
@@ -6451,9 +6504,8 @@ msgid "No mesh to debug."
msgstr "No hay meshes para depurar."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Mesh has no UV in layer %d."
-msgstr "El modelo no tiene UV en esta capa"
+msgstr "La malla no tiene UV en la capa %d."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "MeshInstance lacks a Mesh!"
@@ -6518,9 +6570,8 @@ msgstr ""
"Esta es la opción mas rápida (pero menos exacta) para detectar colisiones."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Collision Sibling"
-msgstr "Crear Colisión Convexa Única Hermana"
+msgstr "Crear Colisión Convexa Simplificada Hermana"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6528,20 +6579,23 @@ msgid ""
"This is similar to single collision shape, but can result in a simpler "
"geometry in some cases, at the cost of accuracy."
msgstr ""
+"Crea una forma de colisión convexa simplificada.\n"
+"Esto es similar a la forma de colisión única, pero puede resultar en una "
+"geometría más simple en algunos casos, a costa de precisión."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Multiple Convex Collision Siblings"
msgstr "Crear Múltiples Colisiones Convexas como Nodos Hermanos"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between a single convex collision and a "
"polygon-based collision."
msgstr ""
"Crea una forma de colisión basada en polígonos.\n"
-"Esto está en un punto medio de rendimiento entre las dos opciones de arriba."
+"Esto es un punto medio de rendimiento entre una colisión convexa única y una "
+"colisión basada en polígonos."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -6608,7 +6662,13 @@ msgid "Remove Selected Item"
msgstr "Remover Item Seleccionado"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Importar desde Escena"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Importar desde Escena"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7187,24 +7247,30 @@ msgid "ResourcePreloader"
msgstr "ResourcePreloader"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portals"
-msgstr "Espejar Horizontalmente"
+msgstr "Invertir Portales"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Room Generate Points"
-msgstr "Conteo de Puntos Generados:"
+msgstr "Generar Puntos en la Room"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Generate Points"
msgstr "Conteo de Puntos Generados:"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portal"
-msgstr "Espejar Horizontalmente"
+msgstr "Invertir Portal"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Reestablecer Transform"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Crear Nodo"
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
@@ -7709,12 +7775,14 @@ msgid "Skeleton2D"
msgstr "Skeleton2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Crear Pose de Descanso"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Setear Huesos a la Pose de Descanso"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Setear Huesos a la Pose de Descanso"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Sobreescribir"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7741,6 +7809,71 @@ msgid "Perspective"
msgstr "Perspectiva"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspectiva"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Transformación Abortada."
@@ -7767,20 +7900,17 @@ msgid "None"
msgstr "Ninguno"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Rotate"
-msgstr "Estado"
+msgstr "Rotar"
#. TRANSLATORS: This refers to the movement that changes the position of an object.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translate"
-msgstr "Trasladar:"
+msgstr "Trasladar"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scale"
-msgstr "Escala:"
+msgstr "Escalar"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scaling: "
@@ -7803,48 +7933,40 @@ msgid "Animation Key Inserted."
msgstr "Clave de Animación Insertada."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Pitch:"
-msgstr "Altura"
+msgstr "Cabeceo:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Yaw:"
-msgstr ""
+msgstr "Guiñada:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Size:"
-msgstr "Tamaño: "
+msgstr "Tamaño:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Objects Drawn:"
-msgstr "Objetos Dibujados"
+msgstr "Objetos Dibujados:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Material Changes:"
-msgstr "Cambios de Material"
+msgstr "Cambios de Material:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Shader Changes:"
-msgstr "Cambios de Shader"
+msgstr "Cambios de Shaders:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes:"
-msgstr "Cambios de Superficie"
+msgstr "Cambios de Superficies:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Draw Calls:"
-msgstr "Llamadas de Dibujado"
+msgstr "Llamadas de Dibujado:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices:"
-msgstr "Vértices"
+msgstr "Vértices:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "FPS: %d (%s ms)"
@@ -7859,42 +7981,22 @@ msgid "Bottom View."
msgstr "Vista Inferior."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Fondo"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Vista Izquierda."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Izquierda"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Vista Derecha."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Derecha"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Vista Frontal."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Frente"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Vista Anterior."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Detrás"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Alinear Transform con Vista"
@@ -8003,9 +8105,8 @@ msgid "Freelook Slow Modifier"
msgstr "Modificador de Velocidad de Vista Libre"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Camera Preview"
-msgstr "Cambiar Tamaño de Cámara"
+msgstr "Alternar Vista Previa de la Cámara"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
@@ -8027,9 +8128,8 @@ msgstr ""
"No se puede utilizar como un indicador fiable del rendimiento en el juego."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Convert Rooms"
-msgstr "Convertir A %s"
+msgstr "Convertir Rooms"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
@@ -8051,7 +8151,6 @@ msgstr ""
"opacas (\"x-ray\")."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Snap Nodes to Floor"
msgstr "Ajustar Nodos al Suelo"
@@ -8069,7 +8168,7 @@ msgstr "Usar Ajuste"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Converts rooms for portal culling."
-msgstr ""
+msgstr "Convertir rooms para hacer culling de portales."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom View"
@@ -8165,9 +8264,13 @@ msgid "View Grid"
msgstr "Ver Grilla"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Portal Culling"
-msgstr "Ajustes de Viewport"
+msgstr "Ver Culling de Portales"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Ver Culling de Portales"
#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
@@ -8235,8 +8338,9 @@ msgid "Post"
msgstr "Post"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Gizmo sin nombre"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Proyecto Sin Nombre"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8487,129 +8591,112 @@ msgid "TextureRegion"
msgstr "Región de Textura"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Colors"
-msgstr "Color"
+msgstr "Colores"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Fonts"
-msgstr "Tipografía"
+msgstr "Fuentes"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Icons"
-msgstr "Icono"
+msgstr "Iconos"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Styleboxes"
-msgstr "StyleBox"
+msgstr "Styleboxes"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} color(s)"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No colors found."
-msgstr "No se encontró ningún sub-recurso."
+msgstr "No se encontraron colores."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "{num} constant(s)"
-msgstr "Constantes"
+msgstr "{num} constante(s)"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No constants found."
-msgstr "Constante de color."
+msgstr "No se encontraron constantes."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} font(s)"
-msgstr ""
+msgstr "{num} fuente(s)"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No fonts found."
-msgstr "No se encontró!"
+msgstr "No se encontraron fuentes."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} icon(s)"
-msgstr ""
+msgstr "{num} ícono(s)"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No icons found."
-msgstr "No se encontró!"
+msgstr "No se encontraron íconos."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} stylebox(es)"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No styleboxes found."
-msgstr "No se encontró ningún sub-recurso."
+msgstr "No se encontraron styleboxes."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} currently selected"
-msgstr ""
+msgstr "{num} seleccionado(s) actualmente"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Nothing was selected for the import."
-msgstr ""
+msgstr "No se seleccionó nada para la importación."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Importing Theme Items"
-msgstr "Importar Tema"
+msgstr "Importando Items de Tema"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Importing items {n}/{n}"
-msgstr ""
+msgstr "Importando items {n}/{n}"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Updating the editor"
-msgstr "Salir del editor?"
+msgstr "Actualizando el editor"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Finalizing"
-msgstr "Analizando"
+msgstr "Finalizando"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Filter:"
-msgstr "Filtro: "
+msgstr "Filtro:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "With Data"
-msgstr ""
+msgstr "Con Data"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select by data type:"
-msgstr "Seleccionar un Nodo"
+msgstr "Seleccionar por tipo de datos:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible color items."
-msgstr "Seleccioná una división para borrarla."
+msgstr "Seleccionar todos los elementos color visibles."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible color items and their data."
-msgstr ""
+msgstr "Seleccione todos los elementos visibles de color y sus datos."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible color items."
-msgstr ""
+msgstr "Quitar selección a todos los elementos visibles de color."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible constant items."
-msgstr "Selecciona un ítem primero!"
+msgstr "Seleccionar todos elementos constant visibles."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible constant items and their data."
@@ -8620,9 +8707,8 @@ msgid "Deselect all visible constant items."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible font items."
-msgstr "Selecciona un ítem primero!"
+msgstr "Seleccionar todos los elementos font visibles."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible font items and their data."
@@ -8633,19 +8719,16 @@ msgid "Deselect all visible font items."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible icon items."
-msgstr "Selecciona un ítem primero!"
+msgstr "Seleccionar todos los elementos icon visibles."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible icon items and their data."
-msgstr "Selecciona un ítem primero!"
+msgstr "Seleccionar todos los elementos icon visibles y sus datos."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Deselect all visible icon items."
-msgstr "Selecciona un ítem primero!"
+msgstr "Deseleccionar todos los elementos icon visibles."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items."
@@ -8666,42 +8749,36 @@ msgid ""
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Collapse types."
-msgstr "Colapsar Todos"
+msgstr "Colapsar tipos."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Expand types."
-msgstr "Expandir Todos"
+msgstr "Expandir tipos."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all Theme items."
-msgstr "Elegir Archivo de Plantilla"
+msgstr "Seleccionar todos los elementos del Tema."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select With Data"
-msgstr "Seleccionar Puntos"
+msgstr "Seleccionar Con Datos"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all Theme items with item data."
-msgstr ""
+msgstr "Seleccionar todos los elementos del Tema con los datos del elemento."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Deselect All"
-msgstr "Seleccionar Todo"
+msgstr "Deseleccionar Todo"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all Theme items."
-msgstr ""
+msgstr "Deseleccionar todos los elementos del Tema."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Selected"
-msgstr "Importar Escena"
+msgstr "Importar Seleccionado"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -8715,36 +8792,33 @@ msgid ""
"Select a theme type from the list to edit its items.\n"
"You can add a custom type or import a type with its items from another theme."
msgstr ""
+"Selecciona un tipo de tema de la list para editar sus elementos.\n"
+"Podés agregar un tipo customizado o importar un tipo con sus elementos desde "
+"otro tema."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Color Items"
msgstr "Quitar Todos los Ãtems"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Item"
-msgstr "Remover Item"
+msgstr "Renombrar Item"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Constant Items"
-msgstr "Quitar Todos los Ãtems"
+msgstr "Eliminar Todos los Elementos Constant"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Font Items"
-msgstr "Quitar Todos los Ãtems"
+msgstr "Eliminar Todos los Elementos Font"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Icon Items"
-msgstr "Quitar Todos los Ãtems"
+msgstr "Eliminar Todos los Elementos de Iconos"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All StyleBox Items"
-msgstr "Quitar Todos los Ãtems"
+msgstr "Eliminar Todos los Elementos de StyleBox"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -8753,161 +8827,132 @@ msgid ""
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Color Item"
-msgstr "Agregar Items de Clases"
+msgstr "Añadir Elemento Color"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Constant Item"
-msgstr "Agregar Items de Clases"
+msgstr "Añadir Elemento Constant"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Font Item"
-msgstr "Agregar Item"
+msgstr "Añadir Elemento Font"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Icon Item"
msgstr "Agregar Item"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Stylebox Item"
-msgstr "Agregar Todos los Items"
+msgstr "Añadir Elemento Stylebox"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Color Item"
-msgstr "Quitar Ãtems de Clases"
+msgstr "Cambiar Nombre del Elemento Color"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Constant Item"
-msgstr "Quitar Ãtems de Clases"
+msgstr "Cambiar Nombre del Elemento Constant"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Font Item"
-msgstr "Renombrar Nodo"
+msgstr "Renombrar Elemento Font"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Icon Item"
-msgstr "Renombrar Nodo"
+msgstr "Renombrar Elemento Icon"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Stylebox Item"
-msgstr "Remover Item Seleccionado"
+msgstr "Renombrar Elemento Stylebox"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Invalid file, not a Theme resource."
-msgstr "Archivo inválido. No es un layout de bus de audio."
+msgstr "Archivo inválido, no es un recurso del Theme."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Invalid file, same as the edited Theme resource."
-msgstr ""
+msgstr "Archivo inválido, idéntico al recurso del Theme editado."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Theme Items"
-msgstr "Administrar Plantillas"
+msgstr "Administrar Elementos del Theme"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Edit Items"
-msgstr "Ãtem Editable"
+msgstr "Editar Elementos"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Types:"
-msgstr "Tipo:"
+msgstr "Tipos:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type:"
-msgstr "Tipo:"
+msgstr "Añadir Tipo:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item:"
-msgstr "Agregar Item"
+msgstr "Añadir Elemento:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add StyleBox Item"
-msgstr "Agregar Todos los Items"
+msgstr "Añadir Elemento StyleBox"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Items:"
-msgstr "Remover Item"
+msgstr "Eliminar Elementos:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Class Items"
msgstr "Quitar Ãtems de Clases"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Items"
-msgstr "Quitar Ãtems de Clases"
+msgstr "Eliminar Elementos Personalizados"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Items"
msgstr "Quitar Todos los Ãtems"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Theme Item"
-msgstr "Items de Tema de la GUI"
+msgstr "Agregar Elemento del Theme"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Old Name:"
-msgstr "Nombre de Nodo:"
+msgstr "Nombre Antiguo:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Items"
-msgstr "Importar Tema"
+msgstr "Importar Elementos"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Theme"
-msgstr "Por Defecto"
+msgstr "Theme Predeterminado"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Editor Theme"
msgstr "Editar Tema"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select Another Theme Resource:"
-msgstr "Eliminar Recurso"
+msgstr "Seleccionar Otro Recurso del Theme:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Another Theme"
-msgstr "Importar Tema"
+msgstr "Otro Theme"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Confirm Item Rename"
-msgstr "Renombrar pista de animación"
+msgstr "Confirmar Cambio de Nombre del Elemento"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Cancel Item Rename"
-msgstr "Renombrar en Masa"
+msgstr "Cancelar Renombrado de Elemento"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override Item"
-msgstr "Reemplazos(Overrides)"
+msgstr "Reemplazar Elemento"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Unpin this StyleBox as a main style."
@@ -12438,6 +12483,16 @@ msgstr "Setear Posición de Punto de Curva"
msgid "Set Portal Point Position"
msgstr "Setear Posición de Punto de Curva"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Cambiar Radio de Shape Cilindro"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Setear Posición de Entrada de Curva"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "Cambiar Radio de Cilindro"
@@ -12724,6 +12779,11 @@ msgstr "Trazando lightmatps"
msgid "Class name can't be a reserved keyword"
msgstr "El nombre de la clase no puede ser una palabra reservada"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Llenar la Selección"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Fin del stack trace de excepción interna"
@@ -13212,76 +13272,76 @@ msgstr "Buscar en VisualScript"
msgid "Get %s"
msgstr "Obtener %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Nombre de paquete faltante."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Los segmentos del paquete deben ser de largo no nulo."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
"El caracter '%s' no está permitido en nombres de paquete de aplicación "
"Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "Un dígito no puede ser el primer caracter en un segmento de paquete."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
"El caracter '%s' no puede ser el primer caracter en un segmento de paquete."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "El paquete debe tener al menos un '.' como separador."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Seleccionar dispositivo de la lista"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Exportar Todo"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Desinstalar"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Cargando, esperá, por favor..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "No se pudo instanciar la escena!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Ejecutando Script Personalizado..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "No se pudo crear la carpeta."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "No se pudo encontrar la herramienta 'apksigner'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13289,7 +13349,7 @@ msgstr ""
"La plantilla de exportación de Android no esta instalada en el proyecto. "
"Instalala desde el menú de Proyecto."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
@@ -13297,12 +13357,12 @@ msgstr ""
"Deben estar configurados o bien Debug Keystore, Debug User Y Debug Password "
"o bien ninguno de ellos."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Keystore debug no configurada en Configuración del Editor ni en el preset."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
@@ -13310,53 +13370,53 @@ msgstr ""
"Deben estar configurados o bien Release Keystore, Release User y Release "
"Passoword o bien ninguno de ellos."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"Release keystore no está configurado correctamente en el preset de "
"exportación."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"Se requiere una ruta válida al SDK de Android en la Configuración del Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "Ruta del SDK de Android inválida en la Configuración del Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "¡No se encontró el directorio 'platform-tools'!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "No se pudo encontrar el comando adb en las Android SDK platform-tools."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Por favor, comprueba el directorio del SDK de Android especificado en la "
"Configuración del Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "¡No se encontró el directorio 'build-tools'!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
"No se pudo encontrar el comando apksigner en las Android SDK build-tools."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Clave pública inválida para la expansión de APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Nombre de paquete inválido:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13364,37 +13424,22 @@ msgstr ""
"El módulo \"GodotPaymentV3\" incluido en el ajuste de proyecto \"android/"
"modules\" es inválido (cambiado en Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "\"Use Custom Build\" debe estar activado para usar los plugins."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Degrees Of Freedom\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile "
-"VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"Hand Tracking\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile VR\"."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Focus Awareness\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile VR"
-"\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"\"Export AAB\" sólo es válido cuando \"Use Custom Build\" está activado."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13402,58 +13447,58 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Examinando Archivos,\n"
"Aguardá, por favor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "No se pudo abrir la plantilla para exportar:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Agregando %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Exportar Todo"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
"¡Nombre de archivo inválido! Android App Bundle requiere la extensión *.aab."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "La Expansión APK no es compatible con Android App Bundle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "¡Nombre de archivo inválido! Android APK requiere la extensión *.apk."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13462,7 +13507,7 @@ msgstr ""
"información de la versión para ello. Por favor, reinstalá desde el menú "
"'Proyecto'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13475,26 +13520,26 @@ msgstr ""
"Por favor, reinstalá la plantilla de compilación de Android desde el menú "
"'Proyecto'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "No se pudo obtener project.godot en la ruta de proyecto."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "No se pudo escribir el archivo:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Construir Proyecto Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13503,11 +13548,11 @@ msgstr ""
"También podés visitar docs.godotengine.org para consultar la documentación "
"de compilación de Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "Moviendo salida"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13515,24 +13560,24 @@ msgstr ""
"No se puede copiar y renombrar el archivo de exportación, comprobá el "
"directorio del proyecto de gradle para ver los resultados."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "No se encontró la animación: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Creando contornos..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "No se pudo abrir la plantilla para exportar:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13540,21 +13585,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Agregando %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "No se pudo escribir el archivo:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14107,6 +14152,14 @@ msgstr ""
"NavigationMeshInstance debe ser un hijo o nieto de un nodo Navigation. Solo "
"provee datos de navegación."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14436,6 +14489,14 @@ msgstr "Debe ser una extensión válida."
msgid "Enable grid minimap."
msgstr "Activar minimapa de grilla."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14488,6 +14549,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "El tamaño del viewport debe ser mayor a 0 para poder renderizar."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14541,6 +14606,41 @@ msgstr "Asignación a uniform."
msgid "Constants cannot be modified."
msgstr "Las constantes no pueden modificarse."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Crear Pose de Descanso"
+
+#~ msgid "Bottom"
+#~ msgstr "Fondo"
+
+#~ msgid "Left"
+#~ msgstr "Izquierda"
+
+#~ msgid "Right"
+#~ msgstr "Derecha"
+
+#~ msgid "Front"
+#~ msgstr "Frente"
+
+#~ msgid "Rear"
+#~ msgstr "Detrás"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Gizmo sin nombre"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Degrees Of Freedom\" sólo es válido cuando \"Xr Mode\" es \"Oculus "
+#~ "Mobile VR\"."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Focus Awareness\" sólo es válido cuando \"Xr Mode\" es \"Oculus Mobile "
+#~ "VR\"."
+
#~ msgid "Package Contents:"
#~ msgstr "Contenido del Paquete:"
@@ -16517,9 +16617,6 @@ msgstr "Las constantes no pueden modificarse."
#~ msgid "Images:"
#~ msgstr "Imágenes:"
-#~ msgid "Group"
-#~ msgstr "Grupo"
-
#~ msgid "Sample Conversion Mode: (.wav files):"
#~ msgstr "Modo de Conversión de Muestras: (archivos .wav):"
diff --git a/editor/translations/et.po b/editor/translations/et.po
index 13019cd9e3..2c59035681 100644
--- a/editor/translations/et.po
+++ b/editor/translations/et.po
@@ -1006,7 +1006,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Sõltuvused"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Ressurss"
@@ -1659,13 +1659,13 @@ msgstr ""
"Lülitage projekti sätetes sisse „Impordi ETC†või keelake „Draiveri "
"tagasilangemine lubatudâ€."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2051,7 +2051,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Taas)impordin varasid"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Ülaosa"
@@ -2534,6 +2534,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Võta tagasi"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Tee uuesti"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3169,6 +3195,10 @@ msgid "Merge With Existing"
msgstr "Liida olemasolevaga"
#: editor/editor_node.cpp
+msgid "Apply MeshInstance Transforms"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3414,6 +3444,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5470,6 +5504,17 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Rühmad"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6369,7 +6414,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6955,6 +7004,15 @@ msgstr "Liiguta Bezieri punkte"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Kustuta sõlm(ed)"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7449,11 +7507,12 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Laadi vaikimisi"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7481,6 +7540,65 @@ msgid "Perspective"
msgstr "Perspektiiv"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspektiiv"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspektiiv"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspektiiv"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspektiiv"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspektiiv"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7599,42 +7717,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7898,6 +7996,11 @@ msgid "View Portal Culling"
msgstr "Vaateakna sätted"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Vaateakna sätted"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Sätted..."
@@ -7963,7 +8066,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11923,6 +12026,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12206,6 +12317,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Poolresolutioon"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12675,161 +12791,150 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Ekspordi..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Ei saanud luua kausta."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12837,58 +12942,58 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Sätted..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12896,56 +13001,56 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Paigutuse nime ei leitud!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Sätted..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12953,20 +13058,20 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Ei saanud luua kausta."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13421,6 +13526,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13710,6 +13823,14 @@ msgstr "Peab kasutama kehtivat laiendit."
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13750,6 +13871,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "Vaateakne suurus peab olema suurem kui 0, et kuvada."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/eu.po b/editor/translations/eu.po
index 7b6934ff33..ddcf8f5d37 100644
--- a/editor/translations/eu.po
+++ b/editor/translations/eu.po
@@ -1005,7 +1005,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Mendekotasunak"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Baliabidea"
@@ -1649,13 +1649,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2032,7 +2032,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "Aktiboak (bir)inportatzen"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2510,6 +2510,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Desegin"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Berregin"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3138,6 +3164,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Animazioaren transformazioa aldatu"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3382,6 +3413,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5447,6 +5482,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6347,7 +6392,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6933,6 +6982,15 @@ msgstr "Mugitu Bezier puntuak"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Blend4 nodoa"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7427,12 +7485,13 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "gainidatzi:"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7459,6 +7518,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7568,42 +7681,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7867,6 +7960,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7932,7 +8029,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11889,6 +11986,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12170,6 +12275,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12637,164 +12746,153 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Esportatu..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Desinstalatu"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr ""
"Fitxategiak arakatzen,\n"
"Itxaron mesedez..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12802,60 +12900,60 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Fitxategiak arakatzen,\n"
"Itxaron mesedez..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12863,55 +12961,55 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Paketearen edukia:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12919,19 +13017,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13382,6 +13480,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13672,6 +13778,14 @@ msgstr "Baliozko luzapena erabili behar du."
msgid "Enable grid minimap."
msgstr "Gaitu atxikitzea"
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13712,6 +13826,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/fa.po b/editor/translations/fa.po
index bb761cf137..2d086fe827 100644
--- a/editor/translations/fa.po
+++ b/editor/translations/fa.po
@@ -21,12 +21,13 @@
# ItzMiad44909858f5774b6d <maidggg@gmail.com>, 2020.
# YASAN <yasandev@gmail.com>, 2021.
# duniyal ras <duniyalr@gmail.com>, 2021.
+# عبدالرئو٠عابدی <abdolraoofabedi@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-07-13 06:13+0000\n"
-"Last-Translator: duniyal ras <duniyalr@gmail.com>\n"
+"PO-Revision-Date: 2021-08-27 08:25+0000\n"
+"Last-Translator: عبدالرئو٠عابدی <abdolraoofabedi@gmail.com>\n"
"Language-Team: Persian <https://hosted.weblate.org/projects/godot-engine/"
"godot/fa/>\n"
"Language: fa\n"
@@ -34,7 +35,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 4.7.2-dev\n"
+"X-Generator: Weblate 4.8.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -390,7 +391,6 @@ msgstr "در حال اتصال..."
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
msgstr "انیمیشن"
@@ -400,9 +400,8 @@ msgstr "انیمیشن پلیر نمی تواند خود را انیمیت Ú©Ù†Ø
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "ویژگی '%s' موجود نیست."
+msgstr "ویژگی \"٪ s\""
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -610,9 +609,8 @@ msgid "Go to Previous Step"
msgstr "برو به گام پیشین"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Apply Reset"
-msgstr "بازنشانی بزرگنمایی"
+msgstr "بازنشانی را اعمال کنید"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -631,9 +629,8 @@ msgid "Use Bezier Curves"
msgstr "بکارگیری منحنی Ø¨ÙØ²ÛŒÙر"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Create RESET Track(s)"
-msgstr "جاگذاری مسیر ها"
+msgstr "ایجاد آهنگ (های) بازنشانی"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -975,12 +972,13 @@ msgid "Create New %s"
msgstr "ساختن %s جدید"
#: editor/create_dialog.cpp editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "No results for \"%s\"."
-msgstr ""
+msgstr "هیچ نتیجه ای برای \"٪ s\" وجود ندارد."
#: editor/create_dialog.cpp editor/property_selector.cpp
msgid "No description available for %s."
-msgstr ""
+msgstr "توضیحی برای٪ s در دسترس نیست."
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
@@ -1040,7 +1038,7 @@ msgstr ""
msgid "Dependencies"
msgstr "بستگی‌ها"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "منبع"
@@ -1085,7 +1083,10 @@ msgid ""
"Remove the selected files from the project? (Cannot be undone.)\n"
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
-msgstr "آیا پرونده‌های انتخاب شده از طرح حذ٠شوند؟ (غیر قابل بازیابی)"
+msgstr ""
+"ÙØ§ÛŒÙ„های انتخابی از پروژه حذ٠شوند؟ (قابل واگرد نیست.)\n"
+"بسته به پیکربندی سیستم ÙØ§ÛŒÙ„ شما ØŒ ÙØ§ÛŒÙ„ ها یا به سطل زباله سیستم منتقل Ù…ÛŒ "
+"شوند و یا برای همیشه حذ٠می شوند."
#: editor/dependency_editor.cpp
#, fuzzy
@@ -1096,10 +1097,10 @@ msgid ""
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
-"پرونده‌هایی که می‌خواهید حذ٠شوند برای منابع دیگر مورد نیاز هستند تا کار "
-"کنند.\n"
-"آیا در هر صورت حذ٠شوند؟(بدون برگشت)\n"
-"شما میتوانید ÙØ§ÛŒÙ„ های حذ٠شده را در سطل زباله سیستم عامل خود بیابید ."
+"ÙØ§ÛŒÙ„ های در حال حذ٠توسط منابع دیگر مورد نیاز است تا بتوانند کار کنند.\n"
+"به هر حال آنها را حذ٠کنم؟ (قابل واگرد نیست.)\n"
+"بسته به پیکربندی سیستم ÙØ§ÛŒÙ„ شما ØŒ ÙØ§ÛŒÙ„ ها یا به سطل زباله سیستم منتقل Ù…ÛŒ "
+"شوند و یا برای همیشه حذ٠می شوند."
#: editor/dependency_editor.cpp
msgid "Cannot remove:"
@@ -1687,13 +1688,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2073,7 +2074,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(در حال) وارد کردن دوباره عست ها"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2551,6 +2552,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "عقب‌گرد"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "جلوگرد"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3194,6 +3221,11 @@ msgid "Merge With Existing"
msgstr "ترکیب کردن با نمونه ی موجود"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "تغییر دگرشکل متحرک"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "گشودن و اجرای یک اسکریپت"
@@ -3448,6 +3480,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5645,6 +5681,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "همه‌ی انتخاب ها"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "گروه ها"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6598,7 +6646,13 @@ msgid "Remove Selected Item"
msgstr "حذ٠مورد انتخاب‌شده"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "وارد کردن از صحنه"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "وارد کردن از صحنه"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7204,6 +7258,16 @@ msgstr "حذ٠کن"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "انتقال را در انیمیشن تغییر بده"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "ساختن گره"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7743,11 +7807,12 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "بارگیری پیش ÙØ±Ø¶"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7777,6 +7842,61 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "دکمهٔ راست."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7894,42 +8014,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8201,6 +8301,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "ویرایش سیگنال"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Settings..."
@@ -8267,8 +8372,9 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr ""
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "پروژه بی نام"
#: editor/plugins/sprite_editor_plugin.cpp
#, fuzzy
@@ -12485,6 +12591,15 @@ msgstr "برداشتن موج"
msgid "Set Portal Point Position"
msgstr "برداشتن موج"
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "برداشتن موج"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12791,6 +12906,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "همه‌ی انتخاب ها"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13304,165 +13424,154 @@ msgstr "حذ٠گره اسکریپت٠دیداری"
msgid "Get %s"
msgstr "Ú¯Ø±ÙØªÙ† %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "صدور"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "نصب کردن"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "بارگیری"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "نمی‌تواند یک پوشه ایجاد شود."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "ناتوان در ساختن پوشه."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid package name:"
msgstr "نام نامعتبر."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13470,60 +13579,60 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "نمی‌تواند یک پوشه ایجاد شود."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "ترجیحات"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "صدور"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13531,58 +13640,58 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "نمی‌تواند یک پوشه ایجاد شود."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "طول انیمیشن (به ثانیه)."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "در حال اتصال..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "نمی‌تواند یک پوشه ایجاد شود."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13590,21 +13699,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "ÛŒØ§ÙØªÙ†"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "نمی‌تواند یک پوشه ایجاد شود."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14117,6 +14226,14 @@ msgstr ""
"NavigationMeshInstance باید یک ÙØ±Ø²Ù†Ø¯ یا نوه‌ی یک گره Navigation باشد. این "
"تنها داده‌ی پیمایش را ÙØ±Ø§Ù‡Ù… می‌کند."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14422,6 +14539,14 @@ msgstr "باید یک پسوند معتبر بکار گیرید."
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
#, fuzzy
msgid ""
@@ -14470,6 +14595,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/fi.po b/editor/translations/fi.po
index ffedccec28..79a1e722b5 100644
--- a/editor/translations/fi.po
+++ b/editor/translations/fi.po
@@ -16,7 +16,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-08-10 21:40+0000\n"
+"PO-Revision-Date: 2021-09-21 15:22+0000\n"
"Last-Translator: Tapani Niemi <tapani.niemi@kapsi.fi>\n"
"Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/"
"godot/fi/>\n"
@@ -25,7 +25,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -374,15 +374,13 @@ msgstr "Animaatio: lisää"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "Ei voida avata tiedostoa '%s'."
+msgstr "solmu '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "Animaatio"
+msgstr "animaatio"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -390,9 +388,8 @@ msgstr "AnimationPlayer ei voi animoida itseään, vain muita toistimia."
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "Ominaisuutta '%s' ei löytynyt."
+msgstr "ominaisuus '%s'"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -1025,7 +1022,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Riippuvuudet"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Resurssi"
@@ -1685,13 +1682,13 @@ msgstr ""
"Kytke 'Import Pvrtc' päälle projektin asetuksista tai poista 'Driver "
"Fallback Enabled' asetus."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Mukautettua debug-vientimallia ei löytynyt."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2072,7 +2069,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "Tuodaan (uudelleen) assetteja"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Yläpuoli"
@@ -2309,6 +2306,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"Pyörii editori-ikkunan piirtäessä.\n"
+"Päivitä jatkuvasti -asetus on päällä, mikä voi lisätä virrankulutusta. "
+"Napsauta kytkeäksesi se pois päältä."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2584,6 +2584,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Nykyistä skeneä ei ole tallennettu. Avaa joka tapauksessa?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Peru"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Tee uudelleen"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Ei voida ladata uudelleen skeneä, jota ei ole koskaan tallennettu."
@@ -3263,6 +3289,11 @@ msgid "Merge With Existing"
msgstr "Yhdistä olemassaolevaan"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Animaatio: muuta muunnosta"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Avaa ja suorita skripti"
@@ -3521,6 +3552,10 @@ msgstr ""
"Valittu resurssi (%s) ei vastaa mitään odotettua tyyppiä tälle "
"ominaisuudelle (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Tee yksilölliseksi"
@@ -3590,10 +3625,9 @@ msgid "Did you forget the '_run' method?"
msgstr "Unohditko '_run' metodin?"
#: editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Hold %s to round to integers. Hold Shift for more precise changes."
msgstr ""
-"Pidä Ctrl pohjassa pyöristääksesi kokonaislukuun. Pidä Shift pohjassa "
+"Pidä %s pohjassa pyöristääksesi kokonaislukuun. Pidä Shift pohjassa "
"tarkempia muutoksia varten."
#: editor/editor_sub_scene.cpp
@@ -3614,21 +3648,19 @@ msgstr "Tuo solmusta:"
#: editor/export_template_manager.cpp
msgid "Open the folder containing these templates."
-msgstr ""
+msgstr "Avaa kansio, joka sisältää nämä vientimallit."
#: editor/export_template_manager.cpp
msgid "Uninstall these templates."
-msgstr ""
+msgstr "Poista näiden vientimallien asennus."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "There are no mirrors available."
-msgstr "Tiedostoa '%s' ei ole."
+msgstr "Peilipalvelimia ei ole saatavilla."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Retrieving the mirror list..."
-msgstr "Noudetaan peilipalvelimia, hetkinen..."
+msgstr "Noudetaan luetteloa peilipalvelimista..."
#: editor/export_template_manager.cpp
msgid "Starting the download..."
@@ -3688,7 +3720,6 @@ msgid "Error getting the list of mirrors."
msgstr "Virhe peilipalvelimien listan haussa."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error parsing JSON with the list of mirrors. Please report this issue!"
msgstr ""
"Virhe jäsennettäessä peilipalvelimien JSON-listaa. Raportoi tämä ongelma, "
@@ -3753,19 +3784,16 @@ msgid "Can't open the export templates file."
msgstr "Vientimallien tiedostoa ei voida avata."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Invalid version.txt format inside the export templates file: %s."
-msgstr "Vientimalli sisältää virheellisen version.txt tiedoston: %s."
+msgstr "Vientimalli sisältää virheellisen version.txt tallennusmuodon: %s."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No version.txt found inside the export templates file."
-msgstr "Vientimalleista ei löytynyt version.txt tiedostoa."
+msgstr "Vientimallista ei löytynyt version.txt tiedostoa."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for extracting templates:"
-msgstr "Virhe luotaessa polkua malleille:"
+msgstr "Virhe luotaessa polkua vientimallien purkamista varten:"
#: editor/export_template_manager.cpp
msgid "Extracting Export Templates"
@@ -3776,9 +3804,8 @@ msgid "Importing:"
msgstr "Tuodaan:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Remove templates for the version '%s'?"
-msgstr "Poista mallin versio '%s'?"
+msgstr "Poista vientimallit versiolle '%s'?"
#: editor/export_template_manager.cpp
msgid "Uncompressing Android Build Sources"
@@ -3794,11 +3821,11 @@ msgstr "Nykyinen versio:"
#: editor/export_template_manager.cpp
msgid "Export templates are missing. Download them or install from a file."
-msgstr ""
+msgstr "Vientimallit puuttuvat. Lataa ne tai asenna ne tiedostosta."
#: editor/export_template_manager.cpp
msgid "Export templates are installed and ready to be used."
-msgstr ""
+msgstr "Vientimallit ovat asennettu ja valmiita käyttöä varten."
#: editor/export_template_manager.cpp
msgid "Open Folder"
@@ -3806,30 +3833,27 @@ msgstr "Avaa kansio"
#: editor/export_template_manager.cpp
msgid "Open the folder containing installed templates for the current version."
-msgstr ""
+msgstr "Avaa kansio, joka sisältää vientimallit nykyistä versiota varten."
#: editor/export_template_manager.cpp
msgid "Uninstall"
msgstr "Poista asennus"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uninstall templates for the current version."
-msgstr "Laskurin alkuarvo"
+msgstr "Poista vientimallien asennus nykyiseltä versiolta."
#: editor/export_template_manager.cpp
msgid "Download from:"
msgstr "Lataa sijannista:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "Suorita selaimessa"
+msgstr "Avaa selaimessa"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "Kopioi virhe"
+msgstr "Kopioi peilipalvelimen web-osoite"
#: editor/export_template_manager.cpp
msgid "Download and Install"
@@ -4070,7 +4094,7 @@ msgstr "Nimeä uudelleen..."
#: editor/filesystem_dock.cpp
msgid "Focus the search box"
-msgstr ""
+msgstr "Kohdista hakukenttään"
#: editor/filesystem_dock.cpp
msgid "Previous Folder/File"
@@ -4416,18 +4440,16 @@ msgid "Extra resource options."
msgstr "Ylimääräiset resurssivalinnat."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Edit Resource from Clipboard"
-msgstr "Muokkaa resurssien leikepöytää"
+msgstr "Muokkaa leikepöydän resurssia"
#: editor/inspector_dock.cpp
msgid "Copy Resource"
msgstr "Kopioi resurssi"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Make Resource Built-In"
-msgstr "Tee sisäänrakennettu"
+msgstr "Tee resurssista sisäänrakennettu"
#: editor/inspector_dock.cpp
msgid "Go to the previous edited object in history."
@@ -4442,9 +4464,8 @@ msgid "History of recently edited objects."
msgstr "Viimeisimmin muokatut objektit."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Open documentation for this object."
-msgstr "Avaa dokumentaatio"
+msgstr "Avaa dokumentaatio tälle objektille."
#: editor/inspector_dock.cpp editor/scene_tree_dock.cpp
msgid "Open Documentation"
@@ -4455,9 +4476,8 @@ msgid "Filter properties"
msgstr "Suodata ominaisuuksia"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Manage object properties."
-msgstr "Objektin ominaisuudet."
+msgstr "Hallitse objektin ominaisuuksia."
#: editor/inspector_dock.cpp
msgid "Changes may be lost!"
@@ -4702,9 +4722,8 @@ msgid "Blend:"
msgstr "Sulautus:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Parameter Changed:"
-msgstr "Parametri muutettu"
+msgstr "Parametri muutettu:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -5434,7 +5453,7 @@ msgstr "Kaikki"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search templates, projects, and demos"
-msgstr ""
+msgstr "Hae malleja, projekteja ja esimerkkejä"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search assets (excluding templates, projects, and demos)"
@@ -5641,6 +5660,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Siirrä CanvasItem \"%s\" koordinaattiin (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Lukitse valitut"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Ryhmät"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -5826,31 +5857,27 @@ msgstr "Valintatila"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Drag: Rotate selected node around pivot."
-msgstr "Poista valittu solmu tai siirtymä."
+msgstr "Vedä: kierrä valittua solmua kääntökeskiön ympäri."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Alt+Drag: Move selected node."
-msgstr "Alt+Vedä: Siirrä"
+msgstr "Alt+Vedä: Siirrä valittua solmua."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "V: Set selected node's pivot position."
-msgstr "Poista valittu solmu tai siirtymä."
+msgstr "V: Aseta nykyisen solmun kääntökeskiön sijainti."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Alt+RMB: Show list of all nodes at position clicked, including locked."
msgstr ""
-"Näytä lista kaikista napsautetussa kohdassa olevista objekteista\n"
-"(sama kuin Alt + Hiiren oikea painike valintatilassa)."
+"Alt+Hiiren oikea painike: Näytä lista kaikista napsautetussa kohdassa "
+"olevista solmuista, mukaan lukien lukituista."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "RMB: Add node at position clicked."
-msgstr ""
+msgstr "Hiiren oikea painike: Lisää solmu napsautettuun paikkaan."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6088,14 +6115,12 @@ msgid "Clear Pose"
msgstr "Tyhjennä asento"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Add Node Here"
-msgstr "Lisää solmu"
+msgstr "Lisää solmu tähän"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Instance Scene Here"
-msgstr "Luo ilmentymä skenestä tai skeneistä"
+msgstr "Luo ilmentymä skenestä tähän"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
@@ -6111,49 +6136,43 @@ msgstr "Panorointinäkymä"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 3.125%"
-msgstr ""
+msgstr "Aseta lähennystasoksi 3.125%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 6.25%"
-msgstr ""
+msgstr "Aseta lähennystasoksi 6.25%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 12.5%"
-msgstr ""
+msgstr "Aseta lähennystasoksi 12.5%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 25%"
-msgstr "Loitonna"
+msgstr "Aseta lähennystasoksi 25%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 50%"
-msgstr "Loitonna"
+msgstr "Aseta lähennystasoksi 50%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 100%"
-msgstr "Loitonna"
+msgstr "Aseta lähennystasoksi 100%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 200%"
-msgstr "Loitonna"
+msgstr "Aseta lähennystasoksi 200%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 400%"
-msgstr "Loitonna"
+msgstr "Aseta lähennystasoksi 400%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 800%"
-msgstr "Loitonna"
+msgstr "Aseta lähennystasoksi 800%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 1600%"
-msgstr ""
+msgstr "Aseta lähennystasoksi 1600%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
@@ -6398,9 +6417,8 @@ msgid "Couldn't create a single convex collision shape."
msgstr "Ei voitu luoda yksittäistä konveksia törmäysmuotoa."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Shape"
-msgstr "Luo yksittäinen konveksi muoto"
+msgstr "Luo pelkistetty konveksi muoto"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Single Convex Shape"
@@ -6435,9 +6453,8 @@ msgid "No mesh to debug."
msgstr "Ei meshiä debugattavaksi."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Mesh has no UV in layer %d."
-msgstr "Mallilla ei ole UV-kanavaa tällä kerroksella"
+msgstr "Meshillä ei ole UV-kanavaa kerroksella %d."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "MeshInstance lacks a Mesh!"
@@ -6502,9 +6519,8 @@ msgstr ""
"Tämä on nopein (mutta epätarkin) vaihtoehto törmäystunnistukselle."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Collision Sibling"
-msgstr "Luo yksittäisen konveksin törmäyksen sisar"
+msgstr "Luo pelkistetty konveksin törmäyksen sisar"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6512,20 +6528,24 @@ msgid ""
"This is similar to single collision shape, but can result in a simpler "
"geometry in some cases, at the cost of accuracy."
msgstr ""
+"Luo pelkistetyn konveksin törmäysmuodon.\n"
+"Tämä on samankaltainen kuin yksittäinen törmäysmuoto, mutta voi johtaa "
+"joissakin tapauksissa yksinkertaisempaan geometriaan tarkkuuden "
+"kustannuksella."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Multiple Convex Collision Siblings"
msgstr "Luo useita konvekseja törmäysmuotojen sisaria"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between a single convex collision and a "
"polygon-based collision."
msgstr ""
"Luo polygonipohjaisen törmäysmuodon.\n"
-"Tämä on suorituskyvyltään välimaastoa kahdelle yllä olevalle vaihtoehdolle."
+"Tämä on suorituskyvyltään yksittäisen konveksin törmäyksen ja "
+"polygonipohjaisen törmäyksen välimaastoa."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -6592,7 +6612,13 @@ msgid "Remove Selected Item"
msgstr "Poista valitut kohteet"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Tuo skenestä"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Tuo skenestä"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7171,24 +7197,30 @@ msgid "ResourcePreloader"
msgstr "Resurssien esilataaja"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portals"
-msgstr "Käännä vaakasuorasti"
+msgstr "Käännä portaalit"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Room Generate Points"
-msgstr "Luotujen pisteiden määrä:"
+msgstr "Luo huoneen pisteet"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Generate Points"
-msgstr "Luotujen pisteiden määrä:"
+msgstr "Luo pisteet"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portal"
-msgstr "Käännä vaakasuorasti"
+msgstr "Käännä portaali"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Tyhjennä muunnos"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Luo solmu"
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
@@ -7693,12 +7725,14 @@ msgid "Skeleton2D"
msgstr "Skeleton2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Tee lepoasento (luista)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Aseta luut lepoasentoon"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Aseta luut lepoasentoon"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Ylikirjoita"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7725,6 +7759,71 @@ msgid "Perspective"
msgstr "Perspektiivi"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ortogonaalinen"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspektiivi"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ortogonaalinen"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspektiivi"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ortogonaalinen"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspektiivi"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ortogonaalinen"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ortogonaalinen"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspektiivi"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ortogonaalinen"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspektiivi"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Muunnos keskeytetty."
@@ -7751,20 +7850,17 @@ msgid "None"
msgstr "Ei mitään"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Rotate"
-msgstr "Kiertotila"
+msgstr "Kierrä"
#. TRANSLATORS: This refers to the movement that changes the position of an object.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translate"
-msgstr "Siirrä:"
+msgstr "Siirrä"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scale"
-msgstr "Skaalaus:"
+msgstr "Skaalaa"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scaling: "
@@ -7787,52 +7883,44 @@ msgid "Animation Key Inserted."
msgstr "Animaatioavain lisätty."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Pitch:"
-msgstr "Nyökkäys (pitch)"
+msgstr "Nyökkäyskulma:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Yaw:"
-msgstr ""
+msgstr "Kääntymiskulma:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Size:"
-msgstr "Koko: "
+msgstr "Koko:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Objects Drawn:"
-msgstr "Objekteja piirretty"
+msgstr "Objekteja piirretty:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Material Changes:"
-msgstr "Materiaalimuutokset"
+msgstr "Materiaalimuutokset:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Shader Changes:"
-msgstr "Sävytinmuutokset"
+msgstr "Sävytinmuutokset:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes:"
-msgstr "Pintamuutokset"
+msgstr "Pintamuutokset:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Draw Calls:"
-msgstr "Piirtokutsuja"
+msgstr "Piirtokutsuja:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices:"
-msgstr "Kärkipisteet"
+msgstr "Kärkipisteitä:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "FPS: %d (%s ms)"
-msgstr ""
+msgstr "FPS: %d (%s ms)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
@@ -7843,42 +7931,22 @@ msgid "Bottom View."
msgstr "Pohjanäkymä."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Pohja"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Vasen näkymä."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Vasen"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Oikea näkymä."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Oikea"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Etunäkymä."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Etu"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Takanäkymä."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Taka"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Kohdista muunnos näkymään"
@@ -7987,9 +8055,8 @@ msgid "Freelook Slow Modifier"
msgstr "Liikkumisen hitauskerroin"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Camera Preview"
-msgstr "Muuta kameran kokoa"
+msgstr "Aseta kameran esikatselu"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
@@ -8011,9 +8078,8 @@ msgstr ""
"Sitä ei voi käyttää luotettavana pelin sisäisenä tehokkuuden ilmaisimena."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Convert Rooms"
-msgstr "Muunna muotoon %s"
+msgstr "Muunna huoneet"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
@@ -8035,7 +8101,6 @@ msgstr ""
"läpi (\"röntgen\")."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Snap Nodes to Floor"
msgstr "Tarraa solmut lattiaan"
@@ -8053,7 +8118,7 @@ msgstr "Käytä tarttumista"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Converts rooms for portal culling."
-msgstr ""
+msgstr "Muunna huoneet portaalien harvennukseen."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom View"
@@ -8149,9 +8214,13 @@ msgid "View Grid"
msgstr "Näytä ruudukko"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Portal Culling"
-msgstr "Näyttöruudun asetukset"
+msgstr "Näytä portaalien harvennus"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Näytä portaalien harvennus"
#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
@@ -8219,8 +8288,9 @@ msgid "Post"
msgstr "Jälki"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Nimetön muokkain"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Nimetön projekti"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8471,221 +8541,196 @@ msgid "TextureRegion"
msgstr "Tekstuurialue"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Colors"
-msgstr "Väri"
+msgstr "Värit"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Fonts"
-msgstr "Fontti"
+msgstr "Fontit"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Icons"
-msgstr "Kuvake"
+msgstr "Kuvakkeet"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Styleboxes"
-msgstr "StyleBox"
+msgstr "Tyylilaatikot"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} color(s)"
-msgstr ""
+msgstr "{num} väriä"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No colors found."
-msgstr "Aliresursseja ei löydetty."
+msgstr "Värejä ei löytynyt."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "{num} constant(s)"
-msgstr "Vakiot"
+msgstr "{num} vakiota"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No constants found."
-msgstr "Värivakio."
+msgstr "Vakioita ei löytynyt."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} font(s)"
-msgstr ""
+msgstr "{num} fonttia"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No fonts found."
-msgstr "Ei löytynyt!"
+msgstr "Fontteja ei löytynyt."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} icon(s)"
-msgstr ""
+msgstr "{num} kuvaketta"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No icons found."
-msgstr "Ei löytynyt!"
+msgstr "Kuvakkeita ei löytynyt."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} stylebox(es)"
-msgstr ""
+msgstr "{num} tyylilaatikkoa"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No styleboxes found."
-msgstr "Aliresursseja ei löydetty."
+msgstr "Tyylilaatikkoja ei löytynyt."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} currently selected"
-msgstr ""
+msgstr "{num} tällä hetkellä valittuna"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Nothing was selected for the import."
-msgstr ""
+msgstr "Mitään ei ollut valittuna tuontia varten."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Importing Theme Items"
-msgstr "Tuo teema"
+msgstr "Teeman osien tuonti"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Importing items {n}/{n}"
-msgstr ""
+msgstr "Tuodaan teeman osia {n}/{n}"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Updating the editor"
-msgstr "Poistu editorista?"
+msgstr "Päivitetään editoria"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Finalizing"
-msgstr "Analysoidaan"
+msgstr "Viimeistellään"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Filter:"
-msgstr "Suodatin: "
+msgstr "Suodatin:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "With Data"
-msgstr ""
+msgstr "Datan kanssa"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select by data type:"
-msgstr "Valitse solmu"
+msgstr "Valitse datatyypin mukaan:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible color items."
-msgstr "Valitse jako poistaaksesi sen."
+msgstr "Valitse kaikki näkyvät värit."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible color items and their data."
-msgstr ""
+msgstr "Valitse kaikki näkyvät värit ja niiden data."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible color items."
-msgstr ""
+msgstr "Poista kaikkien näkyvien värien valinta."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible constant items."
-msgstr "Valitse asetus ensin!"
+msgstr "Valitse kaikki näkyvät vakiot."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible constant items and their data."
-msgstr ""
+msgstr "Valitse kaikki näkyvät vakiot ja niiden data."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible constant items."
-msgstr ""
+msgstr "Poista kaikkien näkyvien vakioiden valinta."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible font items."
-msgstr "Valitse asetus ensin!"
+msgstr "Valitse kaikki näkyvät fontit."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible font items and their data."
-msgstr ""
+msgstr "Valitse kaikki näkyvät fontit ja niiden data."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible font items."
-msgstr ""
+msgstr "Poista kaikkien näkyvien fonttien valinta."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible icon items."
-msgstr "Valitse asetus ensin!"
+msgstr "Valitse kaikki näkyvät kuvakkeet."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible icon items and their data."
-msgstr "Valitse asetus ensin!"
+msgstr "Valitse kaikki näkyvät kuvakkeet ja niiden data."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Deselect all visible icon items."
-msgstr "Valitse asetus ensin!"
+msgstr "Poista kaikkien näkyvien kuvakkeiden valinta."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items."
-msgstr ""
+msgstr "Valitse kaikki näkyvät tyylilaatikot."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items and their data."
-msgstr ""
+msgstr "Valitse kaikki näkyvät tyylilaatikot ja niiden data."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible stylebox items."
-msgstr ""
+msgstr "Poista kaikkien näkyvien tyylilaatikoiden valinta."
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Caution: Adding icon data may considerably increase the size of your Theme "
"resource."
msgstr ""
+"Varoitus: kuvakkeiden datan lisäys voi kasvattaa teemaresurssisi kokoa "
+"merkittävästi."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Collapse types."
-msgstr "Tiivistä kaikki"
+msgstr "Tiivistä tyypit."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Expand types."
-msgstr "Laajenna kaikki"
+msgstr "Laajenna tyypit."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all Theme items."
-msgstr "Valitse mallitiedosto"
+msgstr "Valitse kaikki teeman osat."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select With Data"
-msgstr "Valitse pisteet"
+msgstr "Valitse datan kanssa"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all Theme items with item data."
-msgstr ""
+msgstr "Valitse kaikki teeman osat datan kanssa."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Deselect All"
-msgstr "Valitse kaikki"
+msgstr "Poista kaikki valinnat"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all Theme items."
-msgstr ""
+msgstr "Poista kaikkien teeman osien valinta."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Selected"
-msgstr "Tuo skene"
+msgstr "Tuo valittu"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -8693,283 +8738,249 @@ msgid ""
"closing this window.\n"
"Close anyway?"
msgstr ""
+"Tuo osat -välilehdellä on joitakin osia valittuna. Valinta menetetään tämän "
+"ikkunan sulkeuduttua.\n"
+"Suljetaanko silti?"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Select a theme type from the list to edit its items.\n"
"You can add a custom type or import a type with its items from another theme."
msgstr ""
+"Valitse teeman tyyppi luettelosta muokataksesi sen osia.\n"
+"Voit lisätä mukautetun tyypin tai tuoda tyypin osineen toisesta teemasta."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Color Items"
-msgstr "Poista kaikki"
+msgstr "Poista kaikki värit"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Item"
-msgstr "Poista"
+msgstr "Nimeä osa uudellen"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Constant Items"
-msgstr "Poista kaikki"
+msgstr "Poista kaikki vakiot"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Font Items"
-msgstr "Poista kaikki"
+msgstr "Poista kaikki fontit"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Icon Items"
-msgstr "Poista kaikki"
+msgstr "Poista kaikki kuvakkeet"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All StyleBox Items"
-msgstr "Poista kaikki"
+msgstr "Poista kaikki tyylilaatikot"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"This theme type is empty.\n"
"Add more items to it manually or by importing from another theme."
msgstr ""
+"Tämä teema on tyhjä.\n"
+"Lisää siihen osia käsin tai tuomalla niitä toisesta teemasta."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Color Item"
-msgstr "Lisää luokka"
+msgstr "Lisää väri"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Constant Item"
-msgstr "Lisää luokka"
+msgstr "Lisää vakio"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Font Item"
-msgstr "Lisää kohde"
+msgstr "Lisää fontti"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Icon Item"
-msgstr "Lisää kohde"
+msgstr "Lisää kuvake"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Stylebox Item"
-msgstr "Lisää kaikki"
+msgstr "Lisää tyylilaatikko"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Color Item"
-msgstr "Poista luokka"
+msgstr "Nimeä väri uudelleen"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Constant Item"
-msgstr "Poista luokka"
+msgstr "Nimeä vakio uudelleen"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Font Item"
-msgstr "Nimeä solmu uudelleen"
+msgstr "Nimeä fontti uudelleen"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Icon Item"
-msgstr "Nimeä solmu uudelleen"
+msgstr "Nimeä kuvake uudelleen"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Stylebox Item"
-msgstr "Poista valitut kohteet"
+msgstr "Nimeä tyylilaatikko uudelleen"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Invalid file, not a Theme resource."
-msgstr "Virheellinen tiedosto. Tämä ei ole ääniväylän asettelu ensinkään."
+msgstr "Virheellinen tiedosto, ei ole teemaresurssi."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Invalid file, same as the edited Theme resource."
-msgstr ""
+msgstr "Virheellinen tiedosto, sama kuin muokattu teemaresurssi."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Theme Items"
-msgstr "Hallinnoi malleja"
+msgstr "Hallinnoi teeman osia"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Edit Items"
-msgstr "Muokattava osanen"
+msgstr "Muokkaa osia"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Types:"
-msgstr "Tyyppi:"
+msgstr "Tyypit:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type:"
-msgstr "Tyyppi:"
+msgstr "Lisää tyyppi:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item:"
-msgstr "Lisää kohde"
+msgstr "Lisää osa:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add StyleBox Item"
-msgstr "Lisää kaikki"
+msgstr "Lisää tyylilaatikko"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Items:"
-msgstr "Poista"
+msgstr "Poista osia:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Class Items"
msgstr "Poista luokka"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Items"
-msgstr "Poista luokka"
+msgstr "Poista mukautettuja osia"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Items"
msgstr "Poista kaikki"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Theme Item"
-msgstr "Käyttöliittymäteeman osat"
+msgstr "Lisää teeman osa"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Old Name:"
-msgstr "Solmun nimi:"
+msgstr "Vanha nimi:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Items"
-msgstr "Tuo teema"
+msgstr "Tuo osia"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Theme"
-msgstr "Oletus"
+msgstr "Oletusteema"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Editor Theme"
-msgstr "Muokkaa teemaa"
+msgstr "Editorin teema"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select Another Theme Resource:"
-msgstr "Poista resurssi"
+msgstr "Valitse toinen teemaresurssi:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Another Theme"
-msgstr "Tuo teema"
+msgstr "Toinen teema"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Confirm Item Rename"
-msgstr "Animaatioraita: nimeä uudelleen"
+msgstr "Vahvista osan uudelleen nimeäminen"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Cancel Item Rename"
-msgstr "Niputettu uudelleennimeäminen"
+msgstr "Peruuta osan uudelleen nimeäminen"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override Item"
-msgstr "Ylikirjoittaa"
+msgstr "Ylikirjoita osa"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Unpin this StyleBox as a main style."
-msgstr ""
+msgstr "Irrota tämä tyylilaatikko päätyylistä."
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Pin this StyleBox as a main style. Editing its properties will update the "
"same properties in all other StyleBoxes of this type."
msgstr ""
+"Kiinnitä tämä tyylilaatikko päätyyliksi. Sen ominaisuuksien muokkaaminen "
+"päivittää kaikkien muiden tämän tyyppisten tyylilaatikoiden ominaisuuksia."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type"
-msgstr "Tyyppi"
+msgstr "Lisää tyyppi"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item Type"
-msgstr "Lisää kohde"
+msgstr "Lisää osan tyyppi"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Node Types:"
-msgstr "Solmun tyyppi"
+msgstr "Solmutyypit:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Show Default"
-msgstr "Lataa oletus"
+msgstr "Näytä oletus"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Show default type items alongside items that have been overridden."
-msgstr ""
+msgstr "Näytä oletustyypin osat ylikirjoitettujen osien ohella."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override All"
-msgstr "Ylikirjoittaa"
+msgstr "Ylikirjoita kaikki"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Override all default type items."
-msgstr ""
+msgstr "Ylikirjoita kaikki oletustyypin osat."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Theme:"
-msgstr "Teema"
+msgstr "Teema:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Items..."
-msgstr "Hallinnoi vientimalleja..."
+msgstr "Hallinnoi osia..."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add, remove, organize and import Theme items."
-msgstr ""
+msgstr "Lisää, poista, järjestele ja tuo teeman osia."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Preview"
-msgstr "Esikatselu"
+msgstr "Lisää esikatselu"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Preview"
-msgstr "Päivitä esikatselu"
+msgstr "Oletusesikatselu"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select UI Scene:"
-msgstr "Valitse lähdemesh:"
+msgstr "Valitse käyttöliittymäskene:"
#: editor/plugins/theme_editor_preview.cpp
msgid ""
"Toggle the control picker, allowing to visually select control types for "
"edit."
msgstr ""
+"Kytke päälle tai pois kontrollien valitsija, joka antaa valita "
+"kontrollityypit muokkausta varten visuaalisesti."
#: editor/plugins/theme_editor_preview.cpp
msgid "Toggle Button"
@@ -9004,7 +9015,6 @@ msgid "Checked Radio Item"
msgstr "Valittu valintapainike"
#: editor/plugins/theme_editor_preview.cpp
-#, fuzzy
msgid "Named Separator"
msgstr "Nimetty erotin"
@@ -9059,19 +9069,21 @@ msgstr "On,Useita,Asetuksia"
#: editor/plugins/theme_editor_preview.cpp
msgid "Invalid path, the PackedScene resource was probably moved or removed."
msgstr ""
+"Virheellinen polku, PackedScene resurssi oli todennäköisesti siirretty tai "
+"poistettu."
#: editor/plugins/theme_editor_preview.cpp
msgid "Invalid PackedScene resource, must have a Control node at its root."
msgstr ""
+"Virheellinen PackedScene resurssi, juurisolmuna täytyy olla Control solmu."
#: editor/plugins/theme_editor_preview.cpp
-#, fuzzy
msgid "Invalid file, not a PackedScene resource."
-msgstr "Virheellinen tiedosto. Tämä ei ole ääniväylän asettelu ensinkään."
+msgstr "Virheellinen tiedosto, ei ole PackedScene resurssi."
#: editor/plugins/theme_editor_preview.cpp
msgid "Reload the scene to reflect its most actual state."
-msgstr ""
+msgstr "Lataa skenen uudelleen vastaamaan sen varsinaista tilaa."
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase Selection"
@@ -9658,7 +9670,7 @@ msgstr "Aseta lauseke"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Resize VisualShader node"
-msgstr "Muuta VisualShader solmun kokoa"
+msgstr "Muuta visuaalisen sävyttimen solmun kokoa"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Set Uniform Name"
@@ -9670,7 +9682,7 @@ msgstr "Aseta oletustuloportti"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node to Visual Shader"
-msgstr "Lisää solmu Visual Shaderiin"
+msgstr "Lisää solmu visuaaliseen sävyttimeen"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Node(s) Moved"
@@ -9691,7 +9703,7 @@ msgstr "Poista solmut"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Visual Shader Input Type Changed"
-msgstr "Visual Shaderin syötteen tyyppi vaihdettu"
+msgstr "Visuaalisen sävyttimen syötteen tyyppi vaihdettu"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "UniformRef Name Changed"
@@ -9703,7 +9715,7 @@ msgstr "Kärkipiste"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Fragment"
-msgstr "Fragmentti"
+msgstr "Kuvapiste"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Light"
@@ -9715,7 +9727,7 @@ msgstr "Näytä syntyvä sävytinkoodi."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Create Shader Node"
-msgstr "Luo Shader solmu"
+msgstr "Luo sävytinsolmu"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Color function."
@@ -10412,18 +10424,18 @@ msgstr "Viittaus olemassa olevaan uniformiin."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "(Fragment/Light mode only) Scalar derivative function."
-msgstr "(Vain Fragment/Light tilat) Skalaariderivaattafunktio."
+msgstr "(Vain kuvapiste- tai valotilassa) Skalaariderivaattafunktio."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "(Fragment/Light mode only) Vector derivative function."
-msgstr "(Vain Fragment/Light tilat) Vektoriderivaattafunktio."
+msgstr "(Vain kuvapiste- tai valotilassa) Vektoriderivaattafunktio."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Vector) Derivative in 'x' using local "
"differencing."
msgstr ""
-"(Vain Fragment/Light tilat) (Vektori) 'x' derivaatta käyttäen "
+"(Vain kuvapiste- tai valotilassa) (Vektori) 'x' derivaatta käyttäen "
"paikallisdifferentiaalia."
#: editor/plugins/visual_shader_editor_plugin.cpp
@@ -10431,7 +10443,7 @@ msgid ""
"(Fragment/Light mode only) (Scalar) Derivative in 'x' using local "
"differencing."
msgstr ""
-"(Vain Fragment/Light tilat) (Skalaari) 'x' derivaatta käyttäen "
+"(Vain kuvapiste- tai valotilassa) (Skalaari) 'x' derivaatta käyttäen "
"paikallisdifferentiaalia."
#: editor/plugins/visual_shader_editor_plugin.cpp
@@ -10439,7 +10451,7 @@ msgid ""
"(Fragment/Light mode only) (Vector) Derivative in 'y' using local "
"differencing."
msgstr ""
-"(Vain Fragment/Light tilat) (Vektori) 'y' derivaatta käyttäen "
+"(Vain kuvapiste- tai valotilassa) (Vektori) 'y' derivaatta käyttäen "
"paikallisdifferentiaalia."
#: editor/plugins/visual_shader_editor_plugin.cpp
@@ -10447,7 +10459,7 @@ msgid ""
"(Fragment/Light mode only) (Scalar) Derivative in 'y' using local "
"differencing."
msgstr ""
-"(Vain Fragment/Light tilat) (Skalaari) 'y' derivaatta käyttäen "
+"(Vain kuvapiste- tai valotilassa) (Skalaari) 'y' derivaatta käyttäen "
"paikallisdifferentiaalia."
#: editor/plugins/visual_shader_editor_plugin.cpp
@@ -10455,15 +10467,15 @@ msgid ""
"(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and "
"'y'."
msgstr ""
-"(Vain Fragment/Light tilat) (Vektori) 'x' ja 'y' derivaattojen itseisarvojen "
-"summa."
+"(Vain kuvapiste- tai valotilassa) (Vektori) 'x' ja 'y' derivaattojen "
+"itseisarvojen summa."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
"(Fragment/Light mode only) (Scalar) Sum of absolute derivative in 'x' and "
"'y'."
msgstr ""
-"(Vain Fragment/Light tilat) (Skalaari) 'x' ja 'y' derivaattojen "
+"(Vain kuvapiste- tai valotilassa) (Skalaari) 'x' ja 'y' derivaattojen "
"itseisarvojen summa."
#: editor/plugins/visual_shader_editor_plugin.cpp
@@ -10471,13 +10483,12 @@ msgid "VisualShader"
msgstr "VisualShader"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Edit Visual Property:"
-msgstr "Muokkaa visuaalista ominaisuutta"
+msgstr "Muokkaa visuaalista ominaisuutta:"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Visual Shader Mode Changed"
-msgstr "Visual Shaderin tila vaihdettu"
+msgstr "Visuaalisen sävyttimen tila vaihdettu"
#: editor/project_export.cpp
msgid "Runnable"
@@ -10539,7 +10550,7 @@ msgstr ""
#: editor/project_export.cpp
msgid "Export Path"
-msgstr "Vie polku"
+msgstr "Vientipolku"
#: editor/project_export.cpp
msgid "Resources"
@@ -10599,9 +10610,8 @@ msgid "Script"
msgstr "Skripti"
#: editor/project_export.cpp
-#, fuzzy
msgid "GDScript Export Mode:"
-msgstr "Skriptin vientitila:"
+msgstr "GDScriptin vientitila:"
#: editor/project_export.cpp
msgid "Text"
@@ -10609,21 +10619,19 @@ msgstr "Teksti"
#: editor/project_export.cpp
msgid "Compiled Bytecode (Faster Loading)"
-msgstr ""
+msgstr "Käännetty bytekoodi (nopeampi latautuminen)"
#: editor/project_export.cpp
msgid "Encrypted (Provide Key Below)"
msgstr "Salattu (syötä avain alla)"
#: editor/project_export.cpp
-#, fuzzy
msgid "Invalid Encryption Key (must be 64 hexadecimal characters long)"
-msgstr "Virheellinen salausavain (oltava 64 merkkiä pitkä)"
+msgstr "Virheellinen salausavain (oltava 64 heksadesimaalimerkkiä pitkä)"
#: editor/project_export.cpp
-#, fuzzy
msgid "GDScript Encryption Key (256-bits as hexadecimal):"
-msgstr "Skriptin salausavain (256-bittinen heksana):"
+msgstr "GDScriptin salausavain (256-bittinen heksadesimaalina):"
#: editor/project_export.cpp
msgid "Export PCK/Zip"
@@ -10697,7 +10705,6 @@ msgid "Imported Project"
msgstr "Tuotu projekti"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project name."
msgstr "Virheellinen projektin nimi."
@@ -10921,14 +10928,12 @@ msgid "Are you sure to run %d projects at once?"
msgstr "Haluatko varmasti suorittaa %d projektia yhdenaikaisesti?"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove %d projects from the list?"
-msgstr "Valitse laite listasta"
+msgstr "Poista %d projektia listasta?"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove this project from the list?"
-msgstr "Valitse laite listasta"
+msgstr "Poistetaanko tämä projekti listasta?"
#: editor/project_manager.cpp
msgid ""
@@ -10961,9 +10966,8 @@ msgid "Project Manager"
msgstr "Projektinhallinta"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Local Projects"
-msgstr "Projektit"
+msgstr "Paikalliset projektit"
#: editor/project_manager.cpp
msgid "Loading, please wait..."
@@ -10974,23 +10978,20 @@ msgid "Last Modified"
msgstr "Viimeksi muutettu"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Edit Project"
-msgstr "Vie projekti"
+msgstr "Muokkaa projektia"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Run Project"
-msgstr "Nimetä projekti"
+msgstr "Aja projekti"
#: editor/project_manager.cpp
msgid "Scan"
msgstr "Tutki"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Scan Projects"
-msgstr "Projektit"
+msgstr "Skannaa projektit"
#: editor/project_manager.cpp
msgid "Select a Folder to Scan"
@@ -11001,14 +11002,12 @@ msgid "New Project"
msgstr "Uusi projekti"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Import Project"
-msgstr "Tuotu projekti"
+msgstr "Tuo projekti"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove Project"
-msgstr "Nimetä projekti"
+msgstr "Poista projekti"
#: editor/project_manager.cpp
msgid "Remove Missing"
@@ -11019,9 +11018,8 @@ msgid "About"
msgstr "Tietoja"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Asset Library Projects"
-msgstr "Asset-kirjasto"
+msgstr "Asset-kirjaston projektit"
#: editor/project_manager.cpp
msgid "Restart Now"
@@ -11033,7 +11031,7 @@ msgstr "Poista kaikki"
#: editor/project_manager.cpp
msgid "Also delete project contents (no undo!)"
-msgstr ""
+msgstr "Poista myös projektien sisältö (ei voi kumota!)"
#: editor/project_manager.cpp
msgid "Can't run project"
@@ -11048,18 +11046,16 @@ msgstr ""
"Haluaisitko selata virallisia esimerkkiprojekteja Asset-kirjastosta?"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Filter projects"
-msgstr "Suodata ominaisuuksia"
+msgstr "Suodata projekteja"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"This field filters projects by name and last path component.\n"
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
-"Hakulaatikko suodattaa projektit nimen ja polun loppuosan mukaan.\n"
+"Tämä kenttä suodattaa projektit nimen ja polun loppuosan mukaan.\n"
"Suodattaaksesi projektit nimen ja koko polun mukaan, haussa tulee olla "
"mukana vähintään yksi `/` merkki."
@@ -11069,7 +11065,7 @@ msgstr "Näppäin "
#: editor/project_settings_editor.cpp
msgid "Physical Key"
-msgstr ""
+msgstr "Fyysinen avain"
#: editor/project_settings_editor.cpp
msgid "Joy Button"
@@ -11117,7 +11113,7 @@ msgstr "Laite"
#: editor/project_settings_editor.cpp
msgid " (Physical)"
-msgstr ""
+msgstr " (fyysinen)"
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key..."
@@ -11260,23 +11256,20 @@ msgid "Override for Feature"
msgstr "Ominaisuuden ohitus"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Add %d Translations"
-msgstr "Lisää käännös"
+msgstr "Lisää %d käännöstä"
#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "Poista käännös"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Translation Resource Remap: Add %d Path(s)"
-msgstr "Lisää resurssin korvaavuus"
+msgstr "Käännösresurssin uudelleenmäppäys: lisää %d polkua"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Translation Resource Remap: Add %d Remap(s)"
-msgstr "Lisää resurssin korvaavuus"
+msgstr "Käännösresurssin uudelleenmäppäys: lisää %d uudelleenmäppäystä"
#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
@@ -11722,12 +11715,15 @@ msgstr "Poista solmu \"%s\"?"
msgid ""
"Saving the branch as a scene requires having a scene open in the editor."
msgstr ""
+"Haaran tallentaminen skenenä edellyttää, että skene on avoinna editorissa."
#: editor/scene_tree_dock.cpp
msgid ""
"Saving the branch as a scene requires selecting only one node, but you have "
"selected %d nodes."
msgstr ""
+"Haaran tallentaminen skenenä edellyttää, että vain yksi solmu on valittuna, "
+"mutta olet valinnut %d solmua."
#: editor/scene_tree_dock.cpp
msgid ""
@@ -11736,6 +11732,11 @@ msgid ""
"FileSystem dock context menu\n"
"or create an inherited scene using Scene > New Inherited Scene... instead."
msgstr ""
+"Ei voida tallentaa juurisolmun haaraa skenen ilmentymänä.\n"
+"Luodaksesi muokattavan kopion nykyisestä skenestä, monista se "
+"Tiedostojärjestelmä-telakan pikavalikosta\n"
+"tai luo vaihtoehtoisesti periytetty skene Skene > Uusi periytetty skene... "
+"valikosta."
#: editor/scene_tree_dock.cpp
msgid ""
@@ -11743,6 +11744,9 @@ msgid ""
"To create a variation of a scene, you can make an inherited scene based on "
"the instanced scene using Scene > New Inherited Scene... instead."
msgstr ""
+"Skenestä, joka on jo ilmentymä, ei voida luoda haaraa.\n"
+"Luodaksesi muunnelman skenestä voit sen sijaan tehdä periytetyn skenen "
+"skeneilmentymästä Skene > Uusi periytetty skene... valikosta."
#: editor/scene_tree_dock.cpp
msgid "Save New Scene As..."
@@ -12150,6 +12154,8 @@ msgid ""
"Warning: Having the script name be the same as a built-in type is usually "
"not desired."
msgstr ""
+"Varoitus: skriptin nimeäminen sisäänrakennetun tyypin nimiseksi ei ole "
+"yleensä toivottua."
#: editor/script_create_dialog.cpp
msgid "Class Name:"
@@ -12221,7 +12227,7 @@ msgstr "Kopioi virhe"
#: editor/script_editor_debugger.cpp
msgid "Open C++ Source on GitHub"
-msgstr ""
+msgstr "Avaa C++ lähdekoodi GitHubissa"
#: editor/script_editor_debugger.cpp
msgid "Video RAM"
@@ -12400,14 +12406,22 @@ msgid "Change Ray Shape Length"
msgstr "Vaihda säteen muodon pituutta"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Room Point Position"
-msgstr "Aseta käyräpisteen sijainti"
+msgstr "Aseta huoneen pisteen sijainti"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Portal Point Position"
-msgstr "Aseta käyräpisteen sijainti"
+msgstr "Aseta portaalin pisteen sijainti"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Muuta sylinterimuodon sädettä"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Aseta käyrän aloitussijainti"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -12522,14 +12536,12 @@ msgid "Object can't provide a length."
msgstr "Objektille ei voida määrittää pituutta."
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "Export Mesh GLTF2"
-msgstr "Vie mesh-kirjasto"
+msgstr "Vie mesh GLTF2:na"
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "Export GLTF..."
-msgstr "Vie..."
+msgstr "Vie GLTF..."
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
@@ -12572,9 +12584,8 @@ msgid "GridMap Paint"
msgstr "Ruudukon maalaus"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Selection"
-msgstr "Täytä valinta"
+msgstr "Ruudukon valinta"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
@@ -12697,6 +12708,11 @@ msgstr "Piirretään lightmappeja"
msgid "Class name can't be a reserved keyword"
msgstr "Luokan nimi ei voi olla varattu avainsana"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Täytä valinta"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Sisemmän poikkeuksen kutsupinon loppu"
@@ -12826,14 +12842,12 @@ msgid "Add Output Port"
msgstr "Lisää lähtöportti"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Type"
-msgstr "Muuta tyyppiä"
+msgstr "Vaihda portin tyyppi"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Name"
-msgstr "Vaihda tuloportin nimi"
+msgstr "Vaihda portin nimi"
#: modules/visual_script/visual_script_editor.cpp
msgid "Override an existing built-in function."
@@ -12949,9 +12963,8 @@ msgid "Add Preload Node"
msgstr "Lisää esiladattu solmu"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Node(s)"
-msgstr "Lisää solmu"
+msgstr "Lisää solmuja"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Node(s) From Tree"
@@ -13183,73 +13196,67 @@ msgstr "Hae VisualScriptistä"
msgid "Get %s"
msgstr "Hae %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Paketin nimi puuttuu."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Paketin osioiden pituuksien täytyy olla nollasta poikkeavia."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "Merkki '%s' ei ole sallittu Android-sovellusten pakettien nimissä."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "Paketin osion ensimmäinen merkki ei voi olla numero."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "Merkki '%s' ei voi olla paketin osion ensimmäinen merkki."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "Paketilla on oltava ainakin yksi '.' erotinmerkki."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Valitse laite listasta"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
-msgstr ""
+msgstr "Ajetaan %s"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
-msgstr "Viedään kaikki"
+msgstr "Viedään APK:ta..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
-msgstr "Poista asennus"
+msgstr "Poistetaan asennusta..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
-msgstr "Ladataan, hetkinen..."
+msgstr "Asennetaan laitteelle, hetkinen..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
-msgstr "Aliprosessia ei voitu käynnistää!"
+msgstr "Ei voitu asentaa laitteelle: %s"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
-msgstr "Suoritetaan mukautettua skriptiä..."
+msgstr "Ajetaan laitteella..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
-msgstr "Kansiota ei voitu luoda."
+msgstr "Ei voitu suorittaa laitteella."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "'apksigner' työkalua ei löydy."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13257,7 +13264,7 @@ msgstr ""
"Android-käännösmallia ei ole asennettu projektiin. Asenna se Projekti-"
"valikosta."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
@@ -13265,12 +13272,12 @@ msgstr ""
"Joko Debug Keystore, Debug User JA Debug Password asetukset on kaikki "
"konfiguroitava TAI ei mitään niistä."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Debug keystore ei ole määritettynä editorin asetuksissa eikä esiasetuksissa."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
@@ -13278,48 +13285,48 @@ msgstr ""
"Joko Release Keystore, Release User JA Release Password asetukset on kaikki "
"konfiguroitava TAI ei mitään niistä."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr "Release keystore on konfiguroitu väärin viennin esiasetuksissa."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr "Editorin asetuksiin tarvitaan kelvollinen Android SDK -polku."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "Editorin asetuksissa on virheellinen Android SDK -polku."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "'platform-tools' hakemisto puuttuu!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "Android SDK platform-tools adb-komentoa ei löydy."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Ole hyvä ja tarkista editorin asetuksissa määritelty Android SDK -hakemisto."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "'build-tools' hakemisto puuttuu!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr "Android SDK build-tools apksigner-komentoa ei löydy."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Virheellinen julkinen avain APK-laajennosta varten."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Virheellinen paketin nimi:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13327,102 +13334,85 @@ msgstr ""
"\"android/modules\" projektiasetukseen on liitetty virheellinen "
"\"GodotPaymentV3\" moduuli (muuttunut Godotin versiossa 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
"\"Use Custom Build\" asetuksen täytyy olla päällä, jotta liittännäisiä voi "
"käyttää."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Degrees Of Freedom\" on käyttökelpoinen ainoastaan kun \"Xr Mode\" asetus "
-"on \"Oculus Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"Hand Tracking\" on käyttökelpoinen ainoastaan kun \"Xr Mode\" asetus on "
"\"Oculus Mobile VR\"."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Focus Awareness\" on käyttökelpoinen ainoastaan kun \"Xr Mode\" asetus on "
-"\"Oculus Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"\"Export AAB\" on käyttökelpoinen vain, kun \"Use Custom Build\" asetus on "
"päällä."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
"directory.\n"
"The resulting %s is unsigned."
msgstr ""
+"'apksigner' ei löydy.\n"
+"Ole hyvä ja tarkista, että komento on saatavilla Android SDK build-tools "
+"hakemistossa.\n"
+"Tuloksena syntynyt %s on allekirjoittamaton."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
-msgstr ""
+msgstr "Allekirjoitetaan debug %s..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
-msgstr ""
-"Selataan tiedostoja,\n"
-"Hetkinen…"
+msgstr "Allekirjoitetaan release %s..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
-msgstr "Mallin avaus vientiin epäonnistui:"
+msgstr "Keystorea ei löytynyt, ei voida viedä."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
-msgstr ""
+msgstr "'apksigner' palautti virheen #%d"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
-msgstr "Lisätään %s..."
+msgstr "Todennetaan %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
-msgstr ""
+msgstr "'apksigner' todennus kohteelle %s epäonnistui."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
-msgstr "Viedään kaikki"
+msgstr "Viedään Androidille"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
"Virheellinen tiedostonimi! Android App Bundle tarvitsee *.aab "
"tiedostopäätteen."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "APK Expansion ei ole yhteensopiva Android App Bundlen kanssa."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
"Virheellinen tiedostonimi! Android APK tarvitsee *.apk tiedostopäätteen."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
-msgstr ""
+msgstr "Vientiformaatti ei ole tuettu!\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13430,7 +13420,7 @@ msgstr ""
"Yritetään kääntää mukautetulla käännösmallilla, mutta sillä ei ole "
"versiotietoa. Ole hyvä ja uudelleenasenna se 'Projekti'-valikosta."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13442,26 +13432,26 @@ msgstr ""
" Godotin versio: %s\n"
"Ole hyvä ja uudelleenasenna Androidin käännösmalli 'Projekti'-valikosta."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
+"Ei voitu ylikirjoittaa res://android/build/res/*.xml tiedostoja projektin "
+"nimellä"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
-msgstr "Ei voitu luoda godot.cfg -tiedostoa projektin polkuun."
+msgstr "Ei voitu viedä projektitiedostoja gradle-projektiksi.\n"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
-msgstr "Ei voitu kirjoittaa tiedostoa:"
+msgstr "Ei voitu kirjoittaa laajennuspakettitiedostoa!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Käännetään Android-projektia (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13470,11 +13460,11 @@ msgstr ""
"Vaihtoehtoisesti, lue docs.godotengine.org sivustolta Androidin "
"käännösdokumentaatio."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "Siirretään tulostetta"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13482,48 +13472,48 @@ msgstr ""
"Vientitiedoston kopiointi ja uudelleennimeäminen ei onnistu, tarkista "
"tulosteet gradle-projektin hakemistosta."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
-msgstr "Animaatio ei löytynyt: '%s'"
+msgstr "Pakettia ei löytynyt: %s"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
-msgstr "Luodaan korkeuskäyriä..."
+msgstr "Luodaan APK:ta..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
-msgstr "Mallin avaus vientiin epäonnistui:"
+msgstr ""
+"Ei löydetty APK-vientimallia vientiä varten:\n"
+"%s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
"Please build a template with all required libraries, or uncheck the missing "
"architectures in the export preset."
msgstr ""
+"Vientimalleista puuttuu kirjastoja valituille arkkitehtuureille: %s.\n"
+"Ole hyvä ja kokoa malli, jossa on kaikki tarvittavat kirjastot, tai poista "
+"puuttuvien arkkitehtuurien valinta viennin esiasetuksista."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
-msgstr "Lisätään %s..."
+msgstr "Lisätään tiedostoja..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
-msgstr "Ei voitu kirjoittaa tiedostoa:"
+msgstr "Ei voitu viedä projektin tiedostoja"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "Tasataan APK:ta..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
-msgstr ""
+msgstr "Ei voitu purkaa väliaikaista unaligned APK:ta."
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "Identifier is missing."
@@ -13570,45 +13560,40 @@ msgid "Could not write file:"
msgstr "Ei voitu kirjoittaa tiedostoa:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file:"
-msgstr "Ei voitu kirjoittaa tiedostoa:"
+msgstr "Ei voitu lukea tiedostoa:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read HTML shell:"
-msgstr "Ei voitu lukea mukautettua HTML tulkkia:"
+msgstr "Ei voitu lukea HTML tulkkia:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not create HTTP server directory:"
-msgstr "Kansiota ei voitu luoda."
+msgstr "Ei voitu luoda HTTP-palvelimen hakemistoa:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Error starting HTTP server:"
-msgstr "Virhe tallennettaessa skeneä."
+msgstr "Virhe käynnistettäessä HTTP-palvelinta:"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid bundle identifier:"
-msgstr "Virheellinen Identifier osio:"
+msgstr "Virheellinen bundle-tunniste:"
#: platform/osx/export/export.cpp
msgid "Notarization: code signing required."
-msgstr ""
+msgstr "Notarisointi: koodin allekirjoitus tarvitaan."
#: platform/osx/export/export.cpp
msgid "Notarization: hardened runtime required."
-msgstr ""
+msgstr "Notarisointi: hardened runtime tarvitaan."
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID name not specified."
-msgstr ""
+msgstr "Notarointi: Apple ID nimeä ei ole määritetty."
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID password not specified."
-msgstr ""
+msgstr "Notarointi: Apple ID salasanaa ei ole määritetty."
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -14041,6 +14026,9 @@ msgid ""
"longer has any effect.\n"
"To remove this warning, disable the GIProbe's Compress property."
msgstr ""
+"GIProben Compress-ominaisuus on poistettu käytöstä tiedossa olevien bugien "
+"vuoksi, eikä sillä ole enää mitään vaikutusta.\n"
+"Poista GIProben Compress-ominaisuus käytöstä poistaaksesi tämän varoituksen."
#: scene/3d/light.cpp
msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows."
@@ -14061,6 +14049,14 @@ msgstr ""
"NavigationMeshInstance solmun täytyy olla Navigation solmun alaisuudessa. Se "
"tarjoaa vain navigointidataa."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14130,15 +14126,15 @@ msgstr "Solmujen A ja B tulee olla eri PhysicsBody solmut"
#: scene/3d/portal.cpp
msgid "The RoomManager should not be a child or grandchild of a Portal."
-msgstr ""
+msgstr "RoomManager solmun ei pitäisi sijaita Portal solmun alla."
#: scene/3d/portal.cpp
msgid "A Room should not be a child or grandchild of a Portal."
-msgstr ""
+msgstr "Room solmun ei pitäisi sijaita Portal solmun alla."
#: scene/3d/portal.cpp
msgid "A RoomGroup should not be a child or grandchild of a Portal."
-msgstr ""
+msgstr "RoomGroup solmun ei pitäisi sijaita Portal solmun alla."
#: scene/3d/remote_transform.cpp
msgid ""
@@ -14150,79 +14146,96 @@ msgstr ""
#: scene/3d/room.cpp
msgid "A Room cannot have another Room as a child or grandchild."
-msgstr ""
+msgstr "Room solmun alla ei voi olla toista Room solmua."
#: scene/3d/room.cpp
msgid "The RoomManager should not be placed inside a Room."
-msgstr ""
+msgstr "RoomManager solmua ei pitäisi sijoittaa Room solmun sisään."
#: scene/3d/room.cpp
msgid "A RoomGroup should not be placed inside a Room."
-msgstr ""
+msgstr "RoomGroup solmua ei pitäisi sijoittaa Room solmun sisään."
#: scene/3d/room.cpp
msgid ""
"Room convex hull contains a large number of planes.\n"
"Consider simplifying the room bound in order to increase performance."
msgstr ""
+"Huoneen konveksi runko sisältää suuren määrän tasoja.\n"
+"Harkitse huoneen rajojen yksinkertaistamista suorituskyvyn lisäämiseksi."
#: scene/3d/room_group.cpp
msgid "The RoomManager should not be placed inside a RoomGroup."
-msgstr ""
+msgstr "RoomManager solmua ei pitäisi sijoittaa RoomGroup solmun sisään."
#: scene/3d/room_manager.cpp
msgid "The RoomList has not been assigned."
-msgstr ""
+msgstr "RoomList solmua ei ole määrätty."
#: scene/3d/room_manager.cpp
msgid "The RoomList node should be a Spatial (or derived from Spatial)."
-msgstr ""
+msgstr "RoomList solmun tulisi olla Spatial (tai periytynyt Spatial solmusta)."
#: scene/3d/room_manager.cpp
msgid ""
"Portal Depth Limit is set to Zero.\n"
"Only the Room that the Camera is in will render."
msgstr ""
+"Portaalin Depth Limit on asetettu nollaksi.\n"
+"Vain se huone, jossa kamera on, piirretään."
#: scene/3d/room_manager.cpp
msgid "There should only be one RoomManager in the SceneTree."
-msgstr ""
+msgstr "Skenepuussa pitäisi olla vain yksi RoomManager solmu."
#: scene/3d/room_manager.cpp
msgid ""
"RoomList path is invalid.\n"
"Please check the RoomList branch has been assigned in the RoomManager."
msgstr ""
+"RoomList solmun polku on virheellinen.\n"
+"Ole hyvä ja tarkista, että RoomList haara on määrätty RoomManager solmussa."
#: scene/3d/room_manager.cpp
msgid "RoomList contains no Rooms, aborting."
-msgstr ""
+msgstr "RoomList solmulla ei ole Room solmuja, keskeytetään."
#: scene/3d/room_manager.cpp
msgid "Misnamed nodes detected, check output log for details. Aborting."
msgstr ""
+"Havaittiin väärin nimettyjä solmuja, tarkista yksityiskohdat tulostelokista. "
+"Keskeytetään."
#: scene/3d/room_manager.cpp
msgid "Portal link room not found, check output log for details."
msgstr ""
+"Portaalin linkkihuonetta ei löydetty, tarkista yksityiskohdat tulostelokista."
#: scene/3d/room_manager.cpp
msgid ""
"Portal autolink failed, check output log for details.\n"
"Check the portal is facing outwards from the source room."
msgstr ""
+"Portaalin automaatinen linkitys epäonnistui, tarkista yksityiskohdat "
+"tulostelokista.\n"
+"Tarkista, että portaali on suunnattu ulospäin lähtöhuoneesta katsottuna."
#: scene/3d/room_manager.cpp
msgid ""
"Room overlap detected, cameras may work incorrectly in overlapping area.\n"
"Check output log for details."
msgstr ""
+"Havaittiin päällekkäisiä huoneita, kamerat saattavat toimia virheellisesti "
+"päällekkäisillä alueilla.\n"
+"Tarkista yksityiskohdat tulostelokista."
#: scene/3d/room_manager.cpp
msgid ""
"Error calculating room bounds.\n"
"Ensure all rooms contain geometry or manual bounds."
msgstr ""
+"Virhe laskettaessa huoneen rajoja.\n"
+"Varmista, että kaikki huoneet sisältävät geometrian tai käsin syötetyt rajat."
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
@@ -14287,7 +14300,7 @@ msgstr "Animaatio ei löytynyt: '%s'"
#: scene/animation/animation_player.cpp
msgid "Anim Apply Reset"
-msgstr ""
+msgstr "Tee animaation palautus"
#: scene/animation/animation_tree.cpp
msgid "In node '%s', invalid animation: '%s'."
@@ -14388,6 +14401,14 @@ msgstr "Käytä sopivaa tiedostopäätettä."
msgid "Enable grid minimap."
msgstr "Käytä ruudukon pienoiskarttaa."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14441,6 +14462,10 @@ msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
"Näyttöruudun koko on oltava suurempi kuin 0, jotta mitään renderöidään."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14462,25 +14487,29 @@ msgid "Invalid comparison function for that type."
msgstr "Virheellinen vertailufunktio tälle tyypille."
#: servers/visual/shader_language.cpp
-#, fuzzy
msgid "Varying may not be assigned in the '%s' function."
-msgstr "Varying tyypin voi sijoittaa vain vertex-funktiossa."
+msgstr "Varying tyyppiä ei voi sijoittaa '%s' funktiossa."
#: servers/visual/shader_language.cpp
msgid ""
"Varyings which assigned in 'vertex' function may not be reassigned in "
"'fragment' or 'light'."
msgstr ""
+"Varying muuttujia, jotka on sijoitettu 'vertex' funktiossa, ei voi "
+"uudelleensijoittaa 'fragment' tai 'light' funktioissa."
#: servers/visual/shader_language.cpp
msgid ""
"Varyings which assigned in 'fragment' function may not be reassigned in "
"'vertex' or 'light'."
msgstr ""
+"Varying muuttujia, jotka on sijoitettu 'fragment' funktiossa, ei voi "
+"uudelleensijoittaa 'vertex' tai 'light' funktioissa."
#: servers/visual/shader_language.cpp
msgid "Fragment-stage varying could not been accessed in custom function!"
msgstr ""
+"Kuvapistevaiheen varying muuttujaa ei voitu käyttää mukautetussa funktiossa!"
#: servers/visual/shader_language.cpp
msgid "Assignment to function."
@@ -14494,6 +14523,41 @@ msgstr "Sijoitus uniformille."
msgid "Constants cannot be modified."
msgstr "Vakioita ei voi muokata."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Tee lepoasento (luista)"
+
+#~ msgid "Bottom"
+#~ msgstr "Pohja"
+
+#~ msgid "Left"
+#~ msgstr "Vasen"
+
+#~ msgid "Right"
+#~ msgstr "Oikea"
+
+#~ msgid "Front"
+#~ msgstr "Etu"
+
+#~ msgid "Rear"
+#~ msgstr "Taka"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Nimetön muokkain"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Degrees Of Freedom\" on käyttökelpoinen ainoastaan kun \"Xr Mode\" "
+#~ "asetus on \"Oculus Mobile VR\"."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Focus Awareness\" on käyttökelpoinen ainoastaan kun \"Xr Mode\" asetus "
+#~ "on \"Oculus Mobile VR\"."
+
#~ msgid "Package Contents:"
#~ msgstr "Paketin sisältö:"
diff --git a/editor/translations/fil.po b/editor/translations/fil.po
index e53b7bb1a7..c227244f65 100644
--- a/editor/translations/fil.po
+++ b/editor/translations/fil.po
@@ -1003,7 +1003,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1632,13 +1632,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2010,7 +2010,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2489,6 +2489,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3114,6 +3138,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Pagbago ng Transform ng Animation"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3356,6 +3385,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5401,6 +5434,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6302,7 +6345,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6889,6 +6936,15 @@ msgstr "Maglipat ng (mga) Bezier Point"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "3D Transform Track"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Center Node"
+msgstr ""
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7383,11 +7439,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7415,6 +7471,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7522,42 +7632,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7819,6 +7909,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7884,7 +7978,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11801,6 +11895,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12082,6 +12184,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12554,159 +12660,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12714,57 +12809,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12772,54 +12867,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12827,19 +12922,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13289,6 +13384,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13578,6 +13681,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13618,6 +13729,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/fr.po b/editor/translations/fr.po
index e6e2c9021e..9416a14cdc 100644
--- a/editor/translations/fr.po
+++ b/editor/translations/fr.po
@@ -66,7 +66,7 @@
# Fabrice <fabricecipolla@gmail.com>, 2019.
# Romain Paquet <titou.paquet@gmail.com>, 2019.
# Xavier Sellier <contact@binogure-studio.com>, 2019.
-# Sofiane <Sofiane-77@caramail.fr>, 2019.
+# Sofiane <Sofiane-77@caramail.fr>, 2019, 2021.
# Camille Mohr-Daurat <pouleyketchoup@gmail.com>, 2019.
# Pierre Stempin <pierre.stempin@gmail.com>, 2019.
# Pierre Caye <pierrecaye@laposte.net>, 2020, 2021.
@@ -87,8 +87,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-08-12 14:48+0000\n"
-"Last-Translator: Blackiris <divjvc@free.fr>\n"
+"PO-Revision-Date: 2021-08-20 06:04+0000\n"
+"Last-Translator: Pierre Caye <pierrecaye@laposte.net>\n"
"Language-Team: French <https://hosted.weblate.org/projects/godot-engine/"
"godot/fr/>\n"
"Language: fr\n"
@@ -445,15 +445,13 @@ msgstr "Insérer une animation"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "Mode d'aimantation (%s)"
+msgstr "nœud '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "Animation"
+msgstr "animation"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -462,9 +460,8 @@ msgstr ""
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "Il n'y a pas de propriété « %s »."
+msgstr "propriété « %s »"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -1108,7 +1105,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Dépendances"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Ressource"
@@ -1774,13 +1771,13 @@ msgstr ""
"Activez 'Import Pvrtc' dans les paramètres du projet, ou désactivez 'Driver "
"Fallback Enabled'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Modèle de débogage personnalisé introuvable."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2165,7 +2162,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "Ré-importation des assets"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Dessus"
@@ -2402,6 +2399,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"Tourne lorsque la fenêtre de l'éditeur est redessinée.\n"
+"L'option Mettre à jour en Permanence est activée, ce qui peut augmenter la "
+"consommation de puissance. Cliquez pour le désactiver."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2684,6 +2684,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "La scène actuelle n'est pas enregistrée. Ouvrir quand même ?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Annuler"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Refaire"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Impossible de recharger une scène qui n'a jamais été sauvegardée."
@@ -3382,6 +3408,11 @@ msgid "Merge With Existing"
msgstr "Fusionner avec l'existant"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Changer la transformation de l’animation"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Ouvrir et exécuter un script"
@@ -3640,6 +3671,10 @@ msgstr ""
"La ressource sélectionnée (%s) ne correspond à aucun des types attendus pour "
"cette propriété (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Rendre unique"
@@ -3935,14 +3970,12 @@ msgid "Download from:"
msgstr "Télécharger depuis :"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "Exécuter dans le navigateur"
+msgstr "Ouvrir dans le navigateur Web"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "Copier l'erreur"
+msgstr "Copier l'URL du miroir"
#: editor/export_template_manager.cpp
msgid "Download and Install"
@@ -5760,6 +5793,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Déplacer le CanvasItem « %s » vers (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Verrouillage Sélectionné"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Groupes"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6710,7 +6755,13 @@ msgid "Remove Selected Item"
msgstr "Supprimer l'élément sélectionné"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Importer depuis la scène"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Importer depuis la scène"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7308,6 +7359,16 @@ msgstr "Générer des points"
msgid "Flip Portal"
msgstr "Retourner le Portal"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Supprimer la transformation"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Créer un nœud"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "AnimationTree n'a pas de chemin défini vers un AnimationPlayer"
@@ -7812,12 +7873,14 @@ msgid "Skeleton2D"
msgstr "Squelette 2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Créer la position de repos (d'après les os)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Assigner les os à la position de repos"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Assigner les os à la position de repos"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Écraser"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7844,6 +7907,71 @@ msgid "Perspective"
msgstr "Perspective"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Orthogonale"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspective"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Orthogonale"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspective"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Orthogonale"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspective"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Orthogonale"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Orthogonale"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspective"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Orthogonale"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspective"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Transformation annulée."
@@ -7951,42 +8079,22 @@ msgid "Bottom View."
msgstr "Vue de dessous."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Dessous"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Vue de gauche."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Gauche"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Vue de droite."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Droite"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Vue avant."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Avant"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Vue arrière."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Arrière"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Aligner Transform avec la vue"
@@ -8261,6 +8369,11 @@ msgid "View Portal Culling"
msgstr "Afficher le Portal culling"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Afficher le Portal culling"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Paramètres..."
@@ -8326,8 +8439,9 @@ msgid "Post"
msgstr "Post"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Gadget sans nom"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Projet sans titre"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8790,6 +8904,9 @@ msgid ""
"Select a theme type from the list to edit its items.\n"
"You can add a custom type or import a type with its items from another theme."
msgstr ""
+"Sélectionnez un type de thème dans la liste pour modifier ses éléments. \n"
+"Vous pouvez ajouter un type personnalisé ou importer un type avec ses "
+"éléments à partir d’un autre thème."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Color Items"
@@ -8820,6 +8937,9 @@ msgid ""
"This theme type is empty.\n"
"Add more items to it manually or by importing from another theme."
msgstr ""
+"Ce type de thème est vide.\n"
+"Ajoutez-lui des éléments manuellement ou en important à partir d'un autre "
+"thème."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Color Item"
@@ -12474,14 +12594,22 @@ msgid "Change Ray Shape Length"
msgstr "Changer la longueur d'une forme en rayon"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Room Point Position"
-msgstr "Définir la position du point de la courbe"
+msgstr "Définir la position du point de la pièce"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Portal Point Position"
-msgstr "Définir la position du point de la courbe"
+msgstr "Définir la position du point du Portal"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Changer le rayon de la forme du cylindre"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Définir position d'entrée de la courbe"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -12596,9 +12724,8 @@ msgid "Object can't provide a length."
msgstr "L'objet ne peut fournir une longueur."
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "Export Mesh GLTF2"
-msgstr "Exporter le Maillage GLTF2"
+msgstr "Exporter le Maillage en GLTF2"
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
msgid "Export GLTF..."
@@ -12769,6 +12896,11 @@ msgstr "Tracer des lightmaps"
msgid "Class name can't be a reserved keyword"
msgstr "Le nom de classe ne peut pas être un mot-clé réservé"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Remplir la sélection"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Fin de la trace d'appel (stack trace) intrinsèque"
@@ -13020,9 +13152,8 @@ msgid "Add Preload Node"
msgstr "Ajouter un nœud préchargé"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Node(s)"
-msgstr "Ajouter un nœud"
+msgstr "Ajouter Node(s)"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Node(s) From Tree"
@@ -13257,73 +13388,72 @@ msgstr "Rechercher VisualScript"
msgid "Get %s"
msgstr "Obtenir %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Nom du paquet manquant."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Les segments du paquet doivent être de longueur non nulle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
"Le caractère « %s » n'est pas autorisé dans les noms de paquet "
"d'applications Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
"Un chiffre ne peut pas être le premier caractère d'un segment de paquet."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
"Le caractère \"%s\" ne peut pas être le premier caractère d'un segment de "
"paquet."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "Le paquet doit comporter au moins un séparateur « . »."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Sélectionner appareil depuis la liste"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
-msgstr "En cours d'exécution sur %s"
+msgstr "Exécution sur %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr "Exportation de l'APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr "Désinstallation..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr "Installation sur l'appareil, veuillez patienter..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr "Impossible d'installer sur l'appareil : %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr "En cours d'exécution sur l'appareil..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr "Impossible d'exécuter sur l'appareil."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "Impossible de trouver l'outil 'apksigner'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13331,7 +13461,7 @@ msgstr ""
"Le modèle de compilation Android n'est pas installé dans le projet. "
"Installez-le à partir du menu Projet."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
@@ -13339,13 +13469,13 @@ msgstr ""
"Il faut configurer soit les paramètres Debug Keystore, Debug User ET Debug "
"Password, soit aucun d'entre eux."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Le Debug keystore n'est pas configuré dans les Paramètres de l'éditeur, ni "
"dans le préréglage."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
@@ -13353,55 +13483,55 @@ msgstr ""
"Il faut configurer soit les paramètres Release Keystore, Release User ET "
"Release Password, soit aucun d'entre eux."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"La clé de version n'est pas configurée correctement dans le préréglage "
"d'exportation."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"Un chemin d'accès valide au SDK Android est requis dans les paramètres de "
"l'éditeur."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
"Chemin d'accès invalide au SDK Android dans les paramètres de l'éditeur."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "Dossier « platform-tools » manquant !"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "Impossible de trouver la commande adb du SDK Android platform-tools."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Veuillez vérifier le répertoire du SDK Android spécifié dans les paramètres "
"de l'éditeur."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "Dossier « build-tools » manquant !"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
"Impossible de trouver la commande apksigner du SDK Android build-tools."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Clé publique invalide pour l'expansion APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Nom de paquet invalide :"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13409,40 +13539,24 @@ msgstr ""
"Module \"GodotPaymentV3\" invalide inclus dans le paramétrage du projet "
"\"android/modules\" (modifié dans Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "« Use Custom Build » doit être activé pour utiliser les plugins."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"« Degrés de liberté » est valide uniquement lorsque le « Mode Xr » est « "
-"Oculus Mobile VR »."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"« Suivi de la main » est valide uniquement lorsque le « Mode Xr » est « "
"Oculus Mobile VR »."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"« Sensibilité de la mise au point » est valide uniquement lorsque le « Mode "
-"Xr » est « Oculus Mobile VR »."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"« Export AAB » est valide uniquement lorsque l'option « Use Custom Build » "
"est activée."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13454,61 +13568,57 @@ msgstr ""
"du SDK Android.\n"
"Le paquet sortant %s est non signé."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr "Signature du debug %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr "Signature de la version %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr "Impossible de trouver le keystore, impossible d'exporter."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
-msgstr "'apksigner' a terminé avec l'erreur #%d"
+msgstr "'apksigner' est retourné avec l'erreur #%d"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr "Vérification de %s..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
-msgstr "La vérification de %s avec 'apksigner' a échoué."
+msgstr "La vérification de %s par 'apksigner' a échoué."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr "Exportation vers Android"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
"Nom de fichier invalide ! Le bundle d'application Android nécessite "
"l'extension *.aab."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
"L'expansion de fichier APK n'est pas compatible avec le bundle d'application "
"Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
"Nom de fichier invalide ! Les fichiers APK d'Android nécessitent l'extension "
"*.apk."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr "Format d'export non supporté !\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13517,7 +13627,7 @@ msgstr ""
"information de version n'existe pour lui. Veuillez réinstaller à partir du "
"menu 'Projet'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13529,27 +13639,26 @@ msgstr ""
" Version Godot : %s\n"
"Veuillez réinstaller la version d'Android depuis le menu 'Projet'."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
"Impossible d'écraser les fichiers res://android/build/res/*.xml avec le nom "
"du projet"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr "Impossible d'exporter les fichiers du projet vers le projet gradle\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr "Impossible d'écrire le fichier du paquet d'expansion !"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Construire le Project Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13559,11 +13668,11 @@ msgstr ""
"Sinon, visitez docs.godotengine.org pour la documentation de construction "
"Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "Déplacement du résultat"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13571,17 +13680,15 @@ msgstr ""
"Impossible de copier et de renommer le fichier d'export, vérifiez le dossier "
"du projet gradle pour les journaux."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
-msgstr "Paquet introuvable : « %s »"
+msgstr "Paquet non trouvé : %s"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
-msgstr "Création du fichier APK..."
+msgstr "Création de l'APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
@@ -13589,33 +13696,31 @@ msgstr ""
"Impossible de trouver le modèle de l'APK à exporter :\n"
"%s"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
"Please build a template with all required libraries, or uncheck the missing "
"architectures in the export preset."
msgstr ""
-"Bibliothèques manquantes dans le modèle d'export pour les architectures "
+"Bibliothèques manquantes dans le modèle d'exportation pour les architectures "
"sélectionnées : %s.\n"
"Veuillez construire un modèle avec toutes les bibliothèques requises, ou "
-"désélectionner les architectures manquantes dans le préréglage de l'export."
+"désélectionner les architectures manquantes dans le préréglage d'exportation."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr "Ajout de fichiers..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr "Impossible d'exporter les fichiers du projet"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "Alignement de l'APK…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr "Impossible de décompresser l'APK temporaire non aligné."
@@ -13668,9 +13773,8 @@ msgid "Could not read file:"
msgstr "Impossible de lire le fichier :"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read HTML shell:"
-msgstr "Impossible de lire le shell HTML personnalisé :"
+msgstr "Impossible de lire le shell HTML :"
#: platform/javascript/export/export.cpp
msgid "Could not create HTTP server directory:"
@@ -13681,26 +13785,24 @@ msgid "Error starting HTTP server:"
msgstr "Erreur de démarrage du serveur HTTP :"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid bundle identifier:"
-msgstr "Identifiant invalide :"
+msgstr "Identificateur de bundle non valide :"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Notarization: code signing required."
msgstr "Certification : signature du code requise."
#: platform/osx/export/export.cpp
msgid "Notarization: hardened runtime required."
-msgstr ""
+msgstr "Certification : exécution renforcée requise."
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID name not specified."
-msgstr ""
+msgstr "Certification : Identifiant Apple ID non spécifié."
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID password not specified."
-msgstr ""
+msgstr "Certification : Mot de passe Apple ID non spécifié."
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -14145,7 +14247,6 @@ msgstr ""
"A la place utilisez une BakedLightMap."
#: scene/3d/gi_probe.cpp
-#, fuzzy
msgid ""
"The GIProbe Compress property has been deprecated due to known bugs and no "
"longer has any effect.\n"
@@ -14176,6 +14277,14 @@ msgstr ""
"Un NavigationMeshInstance doit être enfant ou sous-enfant d'un nœud de type "
"Navigation. Il fournit uniquement des données de navigation."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14269,78 +14378,100 @@ msgstr ""
#: scene/3d/room.cpp
msgid "A Room cannot have another Room as a child or grandchild."
msgstr ""
+"Une pièce ne peut pas avoir une autre pièce comme enfant ou petit-enfant."
#: scene/3d/room.cpp
msgid "The RoomManager should not be placed inside a Room."
-msgstr ""
+msgstr "Le RoomManager ne doit pas être placé à l'intérieur d'une pièce."
#: scene/3d/room.cpp
msgid "A RoomGroup should not be placed inside a Room."
-msgstr ""
+msgstr "Un RoomGroup ne doit pas être placé à l'intérieur d'une pièce."
#: scene/3d/room.cpp
msgid ""
"Room convex hull contains a large number of planes.\n"
"Consider simplifying the room bound in order to increase performance."
msgstr ""
+"La coque convexe de la pièce contient un grand nombre de plans.\n"
+"Envisagez de simplifier la limite de la pièce afin d'augmenter les "
+"performances."
#: scene/3d/room_group.cpp
msgid "The RoomManager should not be placed inside a RoomGroup."
-msgstr ""
+msgstr "Le RoomManager ne doit pas être placé à l'intérieur d'un RoomGroup."
#: scene/3d/room_manager.cpp
msgid "The RoomList has not been assigned."
-msgstr ""
+msgstr "La RoomList n'a pas été assignée."
#: scene/3d/room_manager.cpp
msgid "The RoomList node should be a Spatial (or derived from Spatial)."
-msgstr ""
+msgstr "Le nœud RoomList doit être un Spatial (ou un dérivé de Spatial)."
#: scene/3d/room_manager.cpp
msgid ""
"Portal Depth Limit is set to Zero.\n"
"Only the Room that the Camera is in will render."
msgstr ""
+"La limite de profondeur du portail est fixée à zéro.\n"
+"Seule la pièce dans laquelle se trouve la caméra sera rendue."
#: scene/3d/room_manager.cpp
msgid "There should only be one RoomManager in the SceneTree."
-msgstr ""
+msgstr "Il ne doit y avoir qu'un seul RoomManager dans le SceneTree."
#: scene/3d/room_manager.cpp
msgid ""
"RoomList path is invalid.\n"
"Please check the RoomList branch has been assigned in the RoomManager."
msgstr ""
+"Le chemin de la RoomList est invalide.\n"
+"Veuillez vérifier que la branche RoomList a été attribuée dans le "
+"RoomManager."
#: scene/3d/room_manager.cpp
msgid "RoomList contains no Rooms, aborting."
-msgstr ""
+msgstr "RoomList ne contient aucune pièce, abandon."
#: scene/3d/room_manager.cpp
msgid "Misnamed nodes detected, check output log for details. Aborting."
msgstr ""
+"Des nœuds mal nommés ont été détectés, vérifiez le journal de sortie pour "
+"plus de détails. Abandon."
#: scene/3d/room_manager.cpp
msgid "Portal link room not found, check output log for details."
msgstr ""
+"Lien entre le portail et la pièce introuvable, vérifiez le journal de sortie "
+"pour plus de détails."
#: scene/3d/room_manager.cpp
msgid ""
"Portal autolink failed, check output log for details.\n"
"Check the portal is facing outwards from the source room."
msgstr ""
+"La liaison automatique du portail a échoué, vérifiez le journal de sortie "
+"pour plus de détails.\n"
+"Vérifiez que le portail est orienté vers l'extérieur de la pièce source."
#: scene/3d/room_manager.cpp
msgid ""
"Room overlap detected, cameras may work incorrectly in overlapping area.\n"
"Check output log for details."
msgstr ""
+"Chevauchement de pièces détecté, les caméras peuvent fonctionner de manière "
+"incorrecte dans la zone de chevauchement.\n"
+"Consultez le journal de sortie pour plus de détails."
#: scene/3d/room_manager.cpp
msgid ""
"Error calculating room bounds.\n"
"Ensure all rooms contain geometry or manual bounds."
msgstr ""
+"Erreur de calcul des limites de la pièce.\n"
+"Assurez-vous que toutes les pièces contiennent une géométrie ou des limites "
+"manuelles."
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
@@ -14406,7 +14537,7 @@ msgstr "Animation introuvable : « %s »"
#: scene/animation/animation_player.cpp
msgid "Anim Apply Reset"
-msgstr ""
+msgstr "Animer Appliquer Réinitialiser"
#: scene/animation/animation_tree.cpp
msgid "In node '%s', invalid animation: '%s'."
@@ -14509,6 +14640,14 @@ msgstr "Utilisez une extension valide."
msgid "Enable grid minimap."
msgstr "Activer l'alignement."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14565,6 +14704,10 @@ msgstr ""
"La taille de la fenêtre d'affichage doit être supérieure à 0 pour pouvoir "
"afficher quoi que ce soit."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14586,25 +14729,30 @@ msgid "Invalid comparison function for that type."
msgstr "Fonction de comparaison invalide pour ce type."
#: servers/visual/shader_language.cpp
-#, fuzzy
msgid "Varying may not be assigned in the '%s' function."
-msgstr "Les variations ne peuvent être affectées que dans la fonction vertex."
+msgstr "Varying ne peut pas être assigné dans la fonction '%s'."
#: servers/visual/shader_language.cpp
msgid ""
"Varyings which assigned in 'vertex' function may not be reassigned in "
"'fragment' or 'light'."
msgstr ""
+"Les Varyings assignées dans la fonction \"vertex\" ne peuvent pas être "
+"réassignées dans 'fragment' ou 'light'."
#: servers/visual/shader_language.cpp
msgid ""
"Varyings which assigned in 'fragment' function may not be reassigned in "
"'vertex' or 'light'."
msgstr ""
+"Les Varyings attribuées dans la fonction 'fragment' ne peuvent pas être "
+"réattribuées dans 'vertex' ou 'light'."
#: servers/visual/shader_language.cpp
msgid "Fragment-stage varying could not been accessed in custom function!"
msgstr ""
+"La varying de l'étape fragment n'a pas pu être accédée dans la fonction "
+"personnalisée !"
#: servers/visual/shader_language.cpp
msgid "Assignment to function."
@@ -14618,6 +14766,41 @@ msgstr "Affectation à la variable uniform."
msgid "Constants cannot be modified."
msgstr "Les constantes ne peuvent être modifiées."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Créer la position de repos (d'après les os)"
+
+#~ msgid "Bottom"
+#~ msgstr "Dessous"
+
+#~ msgid "Left"
+#~ msgstr "Gauche"
+
+#~ msgid "Right"
+#~ msgstr "Droite"
+
+#~ msgid "Front"
+#~ msgstr "Avant"
+
+#~ msgid "Rear"
+#~ msgstr "Arrière"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Gadget sans nom"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "« Degrés de liberté » est valide uniquement lorsque le « Mode Xr » est « "
+#~ "Oculus Mobile VR »."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "« Sensibilité de la mise au point » est valide uniquement lorsque le « "
+#~ "Mode Xr » est « Oculus Mobile VR »."
+
#~ msgid "Package Contents:"
#~ msgstr "Contenu du paquetage :"
diff --git a/editor/translations/ga.po b/editor/translations/ga.po
index 872463b1a9..da5c9051ed 100644
--- a/editor/translations/ga.po
+++ b/editor/translations/ga.po
@@ -995,7 +995,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Acmhainn"
@@ -1625,13 +1625,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2002,7 +2002,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2481,6 +2481,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3105,6 +3129,10 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+msgid "Apply MeshInstance Transforms"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3345,6 +3373,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5391,6 +5423,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6289,7 +6331,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6873,6 +6919,15 @@ msgstr ""
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Nód Cumaisc2"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7367,11 +7422,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7399,6 +7454,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7507,42 +7616,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7804,6 +7893,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7869,7 +7962,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11782,6 +11875,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12063,6 +12164,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12533,159 +12638,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12693,57 +12787,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12751,55 +12845,55 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Ãbhar:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12807,19 +12901,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13269,6 +13363,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13558,6 +13660,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13598,6 +13708,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/gl.po b/editor/translations/gl.po
index 054b62690d..285cdf4e3b 100644
--- a/editor/translations/gl.po
+++ b/editor/translations/gl.po
@@ -10,7 +10,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2021-08-12 14:48+0000\n"
+"PO-Revision-Date: 2021-08-12 21:32+0000\n"
"Last-Translator: davidrogel <david.rogel.pernas@icloud.com>\n"
"Language-Team: Galician <https://hosted.weblate.org/projects/godot-engine/"
"godot/gl/>\n"
@@ -368,13 +368,12 @@ msgstr "Engadir Animación"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
msgid "node '%s'"
-msgstr ""
+msgstr "nodo '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "Animación"
+msgstr "animación"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -382,9 +381,8 @@ msgstr "Un AnimationPlayer non pode animarse a si mesmo, só a outros players."
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "Non existe a propiedade '%s'."
+msgstr "propiedade '%s'"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -1024,7 +1022,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Dependencias"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Recurso"
@@ -1693,13 +1691,13 @@ msgstr ""
"Active 'Importar Pvrtc' na 'Configuración do Proxecto' ou desactive "
"'Controlador de Respaldo Activado'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Non se encontrou un modelo de depuración personalizado."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2080,7 +2078,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Re)Importando Assets"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Superior"
@@ -2592,6 +2590,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Escena actual non gardada ¿Abrir de todos os modos?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Desfacer"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Refacer"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Non se pode volver a cargar unha escena que nunca foi gardada."
@@ -3275,6 +3299,11 @@ msgid "Merge With Existing"
msgstr "Combinar Con Existentes"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Cambiar Transformación da Animación"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Abrir e Executar un Script"
@@ -3528,6 +3557,10 @@ msgstr ""
"O recurso seleccionado (%s) non coincide con ningún tipo esperado para esta "
"propiedade (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Facer Único"
@@ -5616,6 +5649,17 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grupos"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6555,7 +6599,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7145,6 +7193,15 @@ msgstr "Número de Puntos Xerados:"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Crear Nodo"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7641,12 +7698,14 @@ msgid "Skeleton2D"
msgstr "Skeleton2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Crear Pose de Repouso (a partir dos Ósos)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Asignar Pose de Repouso aos Ósos"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Asignar Pose de Repouso aos Ósos"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Sobreescribir"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7673,6 +7732,71 @@ msgid "Perspective"
msgstr "Perspetiva"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspetiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspetiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspetiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspetiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspetiva"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7791,42 +7915,22 @@ msgid "Bottom View."
msgstr "Vista Inferior."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Inferior"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Vista Esquerda."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Esquerda"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Vista Dereita."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Dereita"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Vista Frontal."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Frontal"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Vista Traseria."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Traseira"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Aliñar Transformación con Perspectiva"
@@ -8100,6 +8204,11 @@ msgid "View Portal Culling"
msgstr "Axustes de Visión"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Axustes de Visión"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Axustes..."
@@ -8165,8 +8274,9 @@ msgid "Post"
msgstr "Posterior (Post)"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Gizmo sen nome"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Proxecto Sen Nome"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -12240,6 +12350,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12523,6 +12641,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Resolución á Metade"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12992,170 +13115,159 @@ msgstr "Buscar en VisualScript"
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Exportar..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Desinstalar"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Cargando, por favor agarde..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Non se puido iniciar subproceso!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Non se puido crear cartafol."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Non está configurado o Keystore de depuración nin na configuración do "
"editor, nin nos axustes de exportación."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"O Keystore Release non está configurado correctamente nos axustes de "
"exportación."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
"\"Use Custom Build\" debe estar activado para usar estas características "
"adicionais (plugins)."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13163,61 +13275,61 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Examinando arquivos,\n"
"Por favor, espere..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Engadindo %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13225,25 +13337,25 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "Non se pudo editar o arquivo 'project.godot' na ruta do proxecto."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Construir Proxecto Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13253,33 +13365,33 @@ msgstr ""
"Ou visita docs.godotengine.org para ver a documentación sobre compilación "
"para Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Contenido do Paquete:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Conectando..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13287,21 +13399,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Engadindo %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Non se puido iniciar subproceso!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13794,6 +13906,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14101,6 +14221,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14150,6 +14278,10 @@ msgstr ""
"As dimensións da Mini-Ventá (Viewport) deben de ser maior que 0 para poder "
"renderizar nada."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14200,6 +14332,27 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Crear Pose de Repouso (a partir dos Ósos)"
+
+#~ msgid "Bottom"
+#~ msgstr "Inferior"
+
+#~ msgid "Left"
+#~ msgstr "Esquerda"
+
+#~ msgid "Right"
+#~ msgstr "Dereita"
+
+#~ msgid "Front"
+#~ msgstr "Frontal"
+
+#~ msgid "Rear"
+#~ msgstr "Traseira"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Gizmo sen nome"
+
#~ msgid "Singleton"
#~ msgstr "Singleton"
diff --git a/editor/translations/he.po b/editor/translations/he.po
index d0a09565de..15c4694949 100644
--- a/editor/translations/he.po
+++ b/editor/translations/he.po
@@ -1041,7 +1041,7 @@ msgstr ""
msgid "Dependencies"
msgstr "תלויות"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "מש×ב"
@@ -1692,13 +1692,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "תבנית ניפוי שגי×ות מות×מת ×ישית ×œ× × ×ž×¦××”."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2096,7 +2096,7 @@ msgstr "יש מספר מייב××™× ×œ×¡×•×’×™× ×©×•× ×™× ×”×ž×¦×‘×™×¢×™× ×œ
msgid "(Re)Importing Assets"
msgstr "×™×™×‘×•× ×ž×©××‘×™× (מחדש)"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "עליון"
@@ -2594,6 +2594,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "הסצנה הנוכחית ×œ× × ×©×ž×¨×”. לפתוח בכל ×–×ת?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "ביטול"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "ביצוע חוזר"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "×œ× × ×™×ª×Ÿ לרענן סצנה ×©×ž×¢×•×œ× ×œ× × ×©×ž×¨×”."
@@ -3265,6 +3291,11 @@ msgid "Merge With Existing"
msgstr "מיזוג ×¢× × ×•×›×—×™×™×"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "החלפת הנפשת ×פקט שינוי צורה"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "פתיחה והרצה של סקריפט"
@@ -3516,6 +3547,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5673,6 +5708,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "בחירת מיקוד"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "קבוצות"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6633,7 +6680,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7237,6 +7288,16 @@ msgstr "מחיקת נקודה"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "התמרה"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "מפרק ×חר"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7764,12 +7825,14 @@ msgid "Skeleton2D"
msgstr "יחידני"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "טעינת בררת המחדל"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "דריסה"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7799,6 +7862,63 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "מבט תחתי"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "כפתור שמ×לי"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "כפתור ימני"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7914,42 +8034,22 @@ msgid "Bottom View."
msgstr "מבט מתחת."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "מתחת"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "מבט משמ×ל."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "שמ×ל"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "מבט מימין."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "ימין"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "מבט קדמי."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "קדמי"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "מבט ×חורי."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "×חורי"
-
-#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Align Transform with View"
msgstr "יישור ×¢× ×”×ª×¦×•×’×”"
@@ -8221,6 +8321,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "עריכת מצולע"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Settings..."
@@ -8287,7 +8392,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12444,6 +12549,15 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "שינוי רדיוס לצורת גליל"
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "שינוי רדיוס גליל"
@@ -12731,6 +12845,11 @@ msgstr "מדפיס ת×ורות:"
msgid "Class name can't be a reserved keyword"
msgstr "×©× ×ž×—×œ×§×” ×œ× ×™×›×•×œ להיות מילת מפתח שמורה"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "מילוי הבחירה"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "סוף מחסנית מעקב לחריגה פנימית"
@@ -13208,143 +13327,143 @@ msgstr "חיפוש VisualScript"
msgid "Get %s"
msgstr "קבלת %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "×©× ×”×—×‘×™×œ×” חסר."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "מקטעי החבילה ×—×™×™×‘×™× ×œ×”×™×•×ª ב×ורך ש×ינו ×פס."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "התו '%s' ×ינו מותר בשמות חבילת ×™×™×©×•× ×נדרו×יד."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "ספרה ××™× ×” יכולה להיות התו הר×שון במקטע חבילה."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "התו '%s' ×ינו יכול להיות התו הר×שון במקטע חבילה."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "החבילה חייבת לכלול לפחות מפריד '.' ×חד."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "× × ×œ×‘×—×•×¨ התקן מהרשימה"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "ייצו×"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "הסרה"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr ""
"×”×§×‘×¦×™× × ×¡×¨×§×™×,\n"
"× × ×œ×”×ž×ª×™×Ÿâ€¦"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "×œ× × ×™×ª×Ÿ להפעיל תהליך משנה!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "מופעל סקריפט מות×× ×ישית…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "×œ× × ×™×ª×Ÿ ליצור תיקייה."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr "תבנית בנייה ל×נדרו×יד ×œ× ×ž×•×ª×§× ×ª בפרוייקט. ההתקנה ×”×™× ×ž×ª×¤×¨×™×˜ המיז×."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr "מפתח לניפוי שגי×ות ×œ× × ×§×‘×¢ בהגדרות העורך ×•×œ× ×‘×”×’×“×¨×•×ª הייצו×."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr "מפתח גירסת שיחרור נקבע ב×ופן שגוי בהגדרות הייצו×."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"נתיב ×œ× ×—×•×§×™ לערכת פיתוח ×נדרו×יד עבור בנייה מות×מת ×ישית בהגדרות העורך."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
"נתיב ×œ× ×—×•×§×™ לערכת פיתוח ×נדרו×יד עבור בנייה מות×מת ×ישית בהגדרות העורך."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"נתיב ×œ× ×—×•×§×™ לערכת פיתוח ×נדרו×יד עבור בנייה מות×מת ×ישית בהגדרות העורך."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "מפתח ציבורי ×œ× ×—×•×§×™ להרחבת APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "×©× ×—×‘×™×œ×” ×œ× ×—×•×§×™:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13352,34 +13471,21 @@ msgstr ""
"מודול \"GodotPaymentV3\" ×œ× ×—×•×§×™ × ×ž×¦× ×‘×”×’×“×¨×ª ×”×ž×™×–× ×‘-\"×נדרו×יד/מודולי×"
"\" (שינוי בגודו 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "חובה ל×פשר ״שימוש בבניה מות×מת ×ישית״ כדי להשתמש בתוספי×."
-#: platform/android/export/export.cpp
-#, fuzzy
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr "\"דרגות של חופש\" תקף רק ×›×שר \"מצב Xr\" ×”×•× \"Oculus Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr "\"Hand Tracking\" תקף רק ×›×שר \"מצב Xr\" ×”×•× \"Oculus Mobile VR\"."
-#: platform/android/export/export.cpp
-#, fuzzy
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr "\"Focus Awareness\" תקף רק ×›×שר \"מצב Xr\" ×”×•× \"Oculus Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13387,57 +13493,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"×”×§×‘×¦×™× × ×¡×¨×§×™×,\n"
"× × ×œ×”×ž×ª×™×Ÿâ€¦"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "×œ× × ×™×ª×Ÿ לפתוח תבנית לייצו×:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "הגדרות"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "ייצו×"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13445,7 +13551,7 @@ msgstr ""
"מנסה לבנות מתבנית מות×מת ×ישית, ×ך ×œ× ×§×™×™× ×ž×™×“×¢ על גירסת הבניה. × × ×œ×”×ª×§×™×Ÿ "
"מחדש מתפריט 'Project'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Android build version mismatch:\n"
@@ -13458,25 +13564,25 @@ msgstr ""
" גרסת גודו: %s\n"
"× × ×œ×”×ª×§×™×Ÿ מחדש ×ת תבנית בניית ×נדרו×יד מתפריט 'Project'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "×œ× × ×™×ª×Ÿ לכתוב קובץ:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "בניית ×ž×™×–× ×נדרו×יד (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13484,34 +13590,34 @@ msgstr ""
"בניית ×ž×™×–× ×נדרו×יד נכשלה, ניתן לבדוק ×ת הפלט ל×יתור השגי××”.\n"
"לחלופין, ×§×™×™× ×‘- docs.godotengine.org תיעוד לבניית ×נדרו×יד."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "הנפשה ×œ× × ×ž×¦××”: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "יצירת קווי מת×ר..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "×œ× × ×™×ª×Ÿ לפתוח תבנית לייצו×:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13519,21 +13625,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "×יתור…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "×œ× × ×™×ª×Ÿ לכתוב קובץ:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14044,6 +14150,14 @@ msgstr ""
"NavigationMeshInstance חייב להיות ילד ×ו נכד למפרק Navigation. ×”×•× ×ž×¡×¤×§ רק "
"נתוני ניווט."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14363,6 +14477,14 @@ msgstr "יש להשתמש בסיומת תקנית."
msgid "Enable grid minimap."
msgstr "הפעלת הצמדה"
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14413,6 +14535,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "גודל חלון התצוגה חייב להיות גדול מ-0 על מנת להציג משהו."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14464,6 +14590,34 @@ msgstr "השמה ל-uniform."
msgid "Constants cannot be modified."
msgstr "××™ ×פשר לשנות קבועי×."
+#~ msgid "Bottom"
+#~ msgstr "מתחת"
+
+#~ msgid "Left"
+#~ msgstr "שמ×ל"
+
+#~ msgid "Right"
+#~ msgstr "ימין"
+
+#~ msgid "Front"
+#~ msgstr "קדמי"
+
+#~ msgid "Rear"
+#~ msgstr "×חורי"
+
+#, fuzzy
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr "\"דרגות של חופש\" תקף רק ×›×שר \"מצב Xr\" ×”×•× \"Oculus Mobile VR\"."
+
+#, fuzzy
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Focus Awareness\" תקף רק ×›×שר \"מצב Xr\" ×”×•× \"Oculus Mobile VR\"."
+
#~ msgid "Package Contents:"
#~ msgstr "תוכן החבילה:"
diff --git a/editor/translations/hi.po b/editor/translations/hi.po
index 916e6fd01d..e6a2a76f37 100644
--- a/editor/translations/hi.po
+++ b/editor/translations/hi.po
@@ -1027,7 +1027,7 @@ msgstr ""
msgid "Dependencies"
msgstr "निरà¥à¤­à¤°à¤¤à¤¾à¤à¤"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "संसाधन"
@@ -1688,13 +1688,13 @@ msgstr ""
"आवशà¥à¤¯à¤•ता होती है।\n"
"पà¥à¤°à¥‹à¤œà¥‡à¤•à¥à¤Ÿ सेटिंगà¥à¤¸ में \"आयात Pvrtc\" सकà¥à¤·à¤® करें, या \"डà¥à¤°à¤¾à¤‡à¤µà¤° फ़ॉलबैक सकà¥à¤·à¤®\" अकà¥à¤·à¤® करें।"
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "कसà¥à¤Ÿà¤® डिबग टेमà¥à¤ªà¥à¤²à¥‡à¤Ÿ नहीं मिला."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2075,7 +2075,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "असà¥à¤¸à¥‡à¤Ÿ (पà¥à¤¨:) इंपोरà¥à¤Ÿ"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "सरà¥à¤µà¥‹à¤šà¥à¤š"
@@ -2578,6 +2578,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "वरà¥à¤¤à¤®à¤¾à¤¨ दृशà¥à¤¯ को बचाया नहीं गया । वैसे भी खà¥à¤²à¤¾?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "पूरà¥à¤µà¤µà¤¤à¥"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "दोहराà¤à¤"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "à¤à¤• दृशà¥à¤¯ है कि कभी नहीं बचाया गया था फिर से लोड नहीं कर सकते ।"
@@ -3253,6 +3279,11 @@ msgid "Merge With Existing"
msgstr "मौजूदा के साथ विलय"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim परिवरà¥à¤¤à¤¨ परिणत"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "ओपन à¤à¤‚ड रन à¤à¤• सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ"
@@ -3506,6 +3537,10 @@ msgid ""
msgstr ""
"चयनित संसाधन (%s) इस संपतà¥à¤¤à¤¿ (% à¤à¤¸) के लिठअपेकà¥à¤·à¤¿à¤¤ किसी भी पà¥à¤°à¤•ार से मेल नहीं खाता है।"
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "अदà¥à¤µà¤¿à¤¤à¥€à¤¯ बनाओ"
@@ -5595,6 +5630,17 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "अनेक गà¥à¤°à¥à¤ª"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6511,7 +6557,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7105,6 +7155,16 @@ msgstr "अंक बनाà¤à¤‚।"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ परिवरà¥à¤¤à¤¨ परिणत"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "को हटा दें"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7610,12 +7670,14 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "पà¥à¤°à¤¾à¤¯à¤¿à¤• लोड कीजिये"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "मौजूदा के ऊपर लिखे"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7643,6 +7705,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7753,42 +7869,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8053,6 +8149,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "सदसà¥à¤¯à¤¤à¤¾ बनाà¤à¤‚"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -8118,7 +8219,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12178,6 +12279,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12467,6 +12576,11 @@ msgstr "लाईटमॅप बना रहा है"
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "सभी खंड"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12950,166 +13064,155 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "निरà¥à¤¯à¤¾à¤¤..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "अनइंसà¥à¤Ÿà¤¾à¤² करें"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "दरà¥à¤ªà¤£ को पà¥à¤¨à¤ƒ पà¥à¤°à¤¾à¤ªà¥à¤¤ करना, कृपया पà¥à¤°à¤¤à¥€à¤•à¥à¤·à¤¾ करें ..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "उपपà¥à¤°à¤•à¥à¤°à¤¿à¤¯à¤¾ शà¥à¤°à¥‚ नहीं कर सका!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "कसà¥à¤Ÿà¤® सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ चला रहा है..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "फ़ोलà¥à¤¡à¤° नही बना सकते."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid package name:"
msgstr "गलत फॉणà¥à¤Ÿ का आकार |"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13117,60 +13220,60 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"फ़ाइले सà¥à¤•ैन कर रहा है,\n"
"कृपया रà¥à¤•िये..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13178,56 +13281,56 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "पैकेज में है:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "जोड़ने..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13235,21 +13338,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "पसंदीदा:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "उपपà¥à¤°à¤•à¥à¤°à¤¿à¤¯à¤¾ शà¥à¤°à¥‚ नहीं कर सका!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13712,6 +13815,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14003,6 +14114,14 @@ msgstr "मानà¥à¤¯ à¤à¤•à¥à¤¸à¤Ÿà¥‡à¤¨à¤¶à¤¨ इसà¥à¤¤à¥‡à¤®à¤¾à¤² क
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14043,6 +14162,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/hr.po b/editor/translations/hr.po
index 37d517cba0..c5fcf3ab6e 100644
--- a/editor/translations/hr.po
+++ b/editor/translations/hr.po
@@ -9,7 +9,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2021-07-16 05:47+0000\n"
+"PO-Revision-Date: 2021-08-13 19:05+0000\n"
"Last-Translator: LeoClose <leoclose575@gmail.com>\n"
"Language-Team: Croatian <https://hosted.weblate.org/projects/godot-engine/"
"godot/hr/>\n"
@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.7.2-dev\n"
+"X-Generator: Weblate 4.8-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -149,7 +149,7 @@ msgstr "Animacija - Promijeni prijelaz"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transform"
-msgstr ""
+msgstr "Anim Promijeni Transform"
#: editor/animation_track_editor.cpp
msgid "Anim Change Keyframe Value"
@@ -213,9 +213,8 @@ msgid "Animation Playback Track"
msgstr ""
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Animation length (frames)"
-msgstr "Trajanje animacije (u sekundama)"
+msgstr "Trajanje animacije (frames)"
#: editor/animation_track_editor.cpp
msgid "Animation length (seconds)"
@@ -523,12 +522,12 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Seconds"
-msgstr ""
+msgstr "Sekunde"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "FPS"
-msgstr ""
+msgstr "FPS"
#: editor/animation_track_editor.cpp editor/editor_plugin_settings.cpp
#: editor/editor_resource_picker.cpp
@@ -539,15 +538,15 @@ msgstr ""
#: editor/project_settings_editor.cpp editor/property_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
-msgstr ""
+msgstr "Uredi"
#: editor/animation_track_editor.cpp
msgid "Animation properties."
-msgstr ""
+msgstr "Svojstva animacije."
#: editor/animation_track_editor.cpp
msgid "Copy Tracks"
-msgstr ""
+msgstr "Kopiraj Zapise"
#: editor/animation_track_editor.cpp
msgid "Scale Selection"
@@ -942,11 +941,11 @@ msgstr "Napravi novi %s"
#: editor/create_dialog.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "No results for \"%s\"."
-msgstr ""
+msgstr "Nema rezultata za \"%s\"."
#: editor/create_dialog.cpp editor/property_selector.cpp
msgid "No description available for %s."
-msgstr ""
+msgstr "Opis za %s nije dostupan."
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
@@ -1006,7 +1005,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Ovisnosti"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Resurs"
@@ -1645,13 +1644,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2029,7 +2028,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2507,6 +2506,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3132,6 +3155,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim Promijeni Transform"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3375,6 +3403,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5429,6 +5461,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6334,7 +6376,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6920,6 +6966,15 @@ msgstr "Pomakni Bezier ToÄke"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Premjesti Ävor(node)"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7414,11 +7469,12 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "UÄitaj Zadano"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7446,6 +7502,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7555,42 +7665,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7853,6 +7943,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7918,7 +8012,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -8904,9 +8998,8 @@ msgid "Occlusion Mode"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Navigation Mode"
-msgstr "NaÄin Interpolacije"
+msgstr "NaÄin Navigacije"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Bitmask Mode"
@@ -9174,9 +9267,8 @@ msgid "Detect new changes"
msgstr ""
#: editor/plugins/version_control_editor_plugin.cpp
-#, fuzzy
msgid "Changes"
-msgstr "Promijeni"
+msgstr "Promjene"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Modified"
@@ -11858,6 +11950,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12142,6 +12242,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12617,159 +12721,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12777,57 +12870,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12835,54 +12928,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12890,19 +12983,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13353,6 +13446,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13642,6 +13743,14 @@ msgstr "Nastavak mora biti ispravan."
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13682,6 +13791,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/hu.po b/editor/translations/hu.po
index c822f5bd53..2df1fc98b0 100644
--- a/editor/translations/hu.po
+++ b/editor/translations/hu.po
@@ -1039,7 +1039,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Függőségek"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Forrás"
@@ -1705,13 +1705,13 @@ msgstr ""
"Engedélyezze az 'Import Pvrtc' beállítást a Projekt Beállításokban, vagy "
"kapcsolja ki a 'Driver Fallback Enabled' beállítást."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Az egyéni hibakeresési sablon nem található."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2095,7 +2095,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "Eszközök (Újra) Betöltése"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Eleje"
@@ -2612,6 +2612,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Még nem mentette az aktuális jelenetet. Megnyitja mindenképp?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Visszavonás"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Újra"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Nem lehet újratölteni egy olyan jelenetet, amit soha nem mentett el."
@@ -3297,6 +3323,11 @@ msgid "Merge With Existing"
msgstr "Egyesítés Meglévővel"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Animáció - Transzformáció Változtatása"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Szkriptet Megnyit és Futtat"
@@ -3545,6 +3576,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Egyedivé tétel"
@@ -5652,6 +5687,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "%s CanvasItem mozgatása (%d, %d)-ra/re"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Kijelölés zárolása"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Csoportok"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6577,7 +6624,13 @@ msgid "Remove Selected Item"
msgstr "Kijelölt Elem Eltávolítása"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Importálás Jelenetből"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Importálás Jelenetből"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7164,6 +7217,16 @@ msgstr "Generált Pontok Száma:"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Megnéz a Síklap transzformációját."
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Node létrehozás"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7660,12 +7723,14 @@ msgid "Skeleton2D"
msgstr "Csontváz2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Visszaállítás Alapértelmezettre"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Felülírás"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7692,6 +7757,71 @@ msgid "Perspective"
msgstr "Perspektíva"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ortogonális"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspektíva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ortogonális"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspektíva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ortogonális"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspektíva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ortogonális"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ortogonális"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspektíva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ortogonális"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspektíva"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Ãtalakítás Megszakítva."
@@ -7809,42 +7939,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8109,6 +8219,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Beállítások..."
@@ -8174,8 +8288,9 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr ""
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Névtelen projekt"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -12161,6 +12276,15 @@ msgstr "Görbe Pont Pozíció Beállítása"
msgid "Set Portal Point Position"
msgstr "Görbe Pont Pozíció Beállítása"
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Be-Görbe Pozíció Beállítása"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12446,6 +12570,11 @@ msgstr "Fénytérképek Ãbrázolása"
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Kijelölés kitöltése"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12921,165 +13050,154 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Válasszon készüléket a listából"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Összes exportálása"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Eltávolítás"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Betöltés, kérem várjon..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Az alprocesszt nem lehetett elindítani!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Tetszőleges Szkript Futtatása..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Nem sikerült létrehozni a mappát."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Érvénytelen csomagnév:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13087,62 +13205,62 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Fájlok vizsgálata,\n"
"kérjük várjon..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "%s Hozzáadása..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Összes exportálása"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13150,56 +13268,56 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Az animáció nem található: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Kontúrok létrehozása…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13207,21 +13325,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "%s Hozzáadása..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Az alprocesszt nem lehetett elindítani!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13678,6 +13796,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13967,6 +14093,14 @@ msgstr "Használjon érvényes kiterjesztést."
msgid "Enable grid minimap."
msgstr "Rács kistérkép engedélyezése."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14011,6 +14145,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/id.po b/editor/translations/id.po
index 3426bd0962..83b80592b1 100644
--- a/editor/translations/id.po
+++ b/editor/translations/id.po
@@ -10,7 +10,7 @@
# Fajar Ru <kzofajar@gmail.com>, 2018.
# Khairul Hidayat <khairulcyber4rt@gmail.com>, 2016.
# Reza Hidayat Bayu Prabowo <rh.bayu.prabowo@gmail.com>, 2018, 2019.
-# Romi Kusuma Bakti <romikusumab@gmail.com>, 2017, 2018.
+# Romi Kusuma Bakti <romikusumab@gmail.com>, 2017, 2018, 2021.
# Sofyan Sugianto <sofyanartem@gmail.com>, 2017-2018, 2019, 2020, 2021.
# Tito <ijavadroid@gmail.com>, 2018.
# Tom My <tom.asadinawan@gmail.com>, 2017.
@@ -32,12 +32,13 @@
# Reza Almanda <rezaalmanda27@gmail.com>, 2021.
# Naufal Adriansyah <naufaladrn90@gmail.com>, 2021.
# undisputedgoose <diablodvorak@gmail.com>, 2021.
+# Tsaqib Fadhlurrahman Soka <sokatsaqib@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-07-05 14:32+0000\n"
-"Last-Translator: undisputedgoose <diablodvorak@gmail.com>\n"
+"PO-Revision-Date: 2021-09-20 14:46+0000\n"
+"Last-Translator: Sofyan Sugianto <sofyanartem@gmail.com>\n"
"Language-Team: Indonesian <https://hosted.weblate.org/projects/godot-engine/"
"godot/id/>\n"
"Language: id\n"
@@ -45,12 +46,12 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Invalid type argument to convert(), use TYPE_* constants."
-msgstr "Tipe argumen salah dalam penggunaan convert(), gunakan konstan TYPE_*."
+msgstr "Tipe argumen tidak valid untuk convert(), gunakan konstanta TYPE_*."
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
@@ -60,9 +61,7 @@ msgstr "String dengan panjang 1 (karakter) yang diharapkan."
#: modules/mono/glue/gd_glue.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
msgid "Not enough bytes for decoding bytes, or invalid format."
-msgstr ""
-"Tidak memiliki bytes yang cukup untuk merubah bytes ke nilai asal, atau "
-"format tidak valid."
+msgstr "Tidak cukup byte untuk mendekode byte, atau format tidak valid."
#: core/math/expression.cpp
msgid "Invalid input %i (not passed) in expression"
@@ -70,7 +69,8 @@ msgstr "Masukkan tidak sah %i (tidak diberikan) dalam ekspresi"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr "self tidak dapat digunakan karena instansi adalah null"
+msgstr ""
+"self tidak dapat digunakan karena instance bernilai null (tidak di-passing)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
@@ -395,15 +395,13 @@ msgstr "Sisipkan Anim"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "Tidak dapat membuka '%s'."
+msgstr "node '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "Animasi"
+msgstr "animasi"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -412,9 +410,8 @@ msgstr ""
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "Tidak ada properti '%s'."
+msgstr "properti '%s'"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -584,7 +581,7 @@ msgstr "FPS"
#: editor/project_settings_editor.cpp editor/property_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
-msgstr "Sunting"
+msgstr "Edit"
#: editor/animation_track_editor.cpp
msgid "Animation properties."
@@ -624,9 +621,8 @@ msgid "Go to Previous Step"
msgstr "Pergi ke Langkah Sebelumnya"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Apply Reset"
-msgstr "Reset"
+msgstr "Terapkan Reset"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -645,9 +641,8 @@ msgid "Use Bezier Curves"
msgstr "Gunakan Lengkungan Bezier"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Create RESET Track(s)"
-msgstr "Tempel Trek-trek"
+msgstr "Buat RESET Track"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -971,9 +966,8 @@ msgid "Edit..."
msgstr "sunting..."
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Go to Method"
-msgstr "Menuju Ke Fungsi"
+msgstr "Menuju Ke Metode"
#: editor/create_dialog.cpp
msgid "Change %s Type"
@@ -993,7 +987,7 @@ msgstr "Tidak ada hasil untuk \"%s\"."
#: editor/create_dialog.cpp editor/property_selector.cpp
msgid "No description available for %s."
-msgstr ""
+msgstr "Tidak ada deskripsi tersedia untuk %s."
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
@@ -1053,7 +1047,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Ketergantungan"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Resource"
@@ -1093,17 +1087,16 @@ msgid "Owners Of:"
msgstr "Pemilik Dari:"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"Remove the selected files from the project? (Cannot be undone.)\n"
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
"Hapus berkas yang dipilih dari proyek? (tidak bisa dibatalkan)\n"
-"Anda bisa menemukan berkas yang telah dihapus di tong sampah."
+"Tergantung pada konfigurasi sistem file Anda, file akan dipindahkan ke "
+"tempat sampah sistem atau dihapus secara permanen."
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"The files being removed are required by other resources in order for them to "
"work.\n"
@@ -1111,10 +1104,11 @@ msgid ""
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
-"File-file yang telah dihapus diperlukan oleh resource lain agar mereka dapat "
-"bekerja.\n"
+"File-file yang telah dihapus diperlukan oleh sumber daya lain agar mereka "
+"dapat bekerja.\n"
"Hapus saja? (tidak bisa dibatalkan)\n"
-"Anda bisa menemukan berkas yang telah dihapus di tong sampah."
+"Tergantung pada konfigurasi sistem file Anda, file akan dipindahkan ke "
+"tempat sampah sistem atau dihapus secara permanen."
#: editor/dependency_editor.cpp
msgid "Cannot remove:"
@@ -1284,41 +1278,36 @@ msgid "Licenses"
msgstr "Lisensi"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Error opening asset file for \"%s\" (not in ZIP format)."
-msgstr "Galat saat membuka berkas paket (tidak dalam format ZIP)."
+msgstr "Gagal saat membuka berkas aset untuk \"%s\" (tidak dalam format ZIP)."
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "%s (already exists)"
-msgstr "%s (Sudah Ada)"
+msgstr "%s (sudah ada)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
-msgstr ""
+msgstr "Konten dari aset \"%s\" - %d berkas-berkas konflik dengan proyek anda:"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - No files conflict with your project:"
-msgstr ""
+msgstr "Konten dari aset \"%s\" - Tidak ada konflik dengan proyek anda:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
msgstr "Membuka Aset Terkompresi"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "The following files failed extraction from asset \"%s\":"
-msgstr "Berkas berikut gagal diekstrak dari paket:"
+msgstr "Berkas ini gagal mengekstrak dari aset \"%s\":"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "(and %s more files)"
-msgstr "Dan %s berkas lebih banyak."
+msgstr "(dan %s berkas lebih banyak)"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset \"%s\" installed successfully!"
-msgstr "Paket Sukses Terpasang!"
+msgstr "Aset \"%s\" sukses terpasang!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -1330,9 +1319,8 @@ msgid "Install"
msgstr "Pasang"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset Installer"
-msgstr "Paket Instalasi"
+msgstr "Aset Instalasi"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
@@ -1395,9 +1383,8 @@ msgid "Bypass"
msgstr "Jalan Lingkar"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Bus Options"
-msgstr "Opsi Bus"
+msgstr "Pilihan Bus"
#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -1563,13 +1550,13 @@ msgid "Can't add autoload:"
msgstr "Tidak dapat menambahkan autoload"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "%s is an invalid path. File does not exist."
-msgstr "File tidak ada."
+msgstr "%s adalah jalur yang tidak valid. Berkas tidak ada."
#: editor/editor_autoload_settings.cpp
msgid "%s is an invalid path. Not in resource path (res://)."
msgstr ""
+"%s adalah jalur yang tidak valid. Tidak dalam jalur sumber daya (res://)."
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1593,9 +1580,8 @@ msgid "Name"
msgstr "Nama"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Global Variable"
-msgstr "Namai kembali Variabel"
+msgstr "Variabel Global"
#: editor/editor_data.cpp
msgid "Paste Params"
@@ -1719,13 +1705,13 @@ msgstr ""
"Aktifkan 'Impor Pvrtc' di Pengaturan Proyek, atau matikan 'Driver Fallback "
"Enabled'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Templat awakutu kustom tidak ditemukan."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1769,48 +1755,52 @@ msgstr "Dok Impor"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
-msgstr ""
+msgstr "Memungkinkan untuk melihat dan mengedit scene 3D."
#: editor/editor_feature_profile.cpp
msgid "Allows to edit scripts using the integrated script editor."
msgstr ""
+"Memungkinkan untuk mengedit skrip menggunakan editor skrip terintegrasi."
#: editor/editor_feature_profile.cpp
msgid "Provides built-in access to the Asset Library."
-msgstr ""
+msgstr "Menyediakan akses bawaan ke Perpustakaan Aset."
#: editor/editor_feature_profile.cpp
msgid "Allows editing the node hierarchy in the Scene dock."
-msgstr ""
+msgstr "Memungkinkan pengeditan hierarki node di dock Scene."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to work with signals and groups of the node selected in the Scene "
"dock."
msgstr ""
+"Memungkinkan untuk bekerja dengan sinyal dan kelompok node yang dipilih di "
+"dock Scene."
#: editor/editor_feature_profile.cpp
msgid "Allows to browse the local file system via a dedicated dock."
-msgstr ""
+msgstr "Memungkinkan untuk menelusuri sistem file lokal melalui dock khusus."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to configure import settings for individual assets. Requires the "
"FileSystem dock to function."
msgstr ""
+"Memungkinkan untuk mengkonfigurasi pengaturan impor untuk aset individu. "
+"Membutuhkan dock FileSystem untuk berfungsi."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(current)"
-msgstr "(Kondisi Saat Ini)"
+msgstr "(saat ini)"
#: editor/editor_feature_profile.cpp
msgid "(none)"
-msgstr ""
+msgstr "(tidak ada)"
#: editor/editor_feature_profile.cpp
msgid "Remove currently selected profile, '%s'? Cannot be undone."
-msgstr ""
+msgstr "Menghapus profil yang dipilih saat ini, '%s'? Tidak bisa dibatalkan."
#: editor/editor_feature_profile.cpp
msgid "Profile must be a valid filename and must not contain '.'"
@@ -1841,19 +1831,16 @@ msgid "Enable Contextual Editor"
msgstr "Aktifkan Editor Kontekstual"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Properties:"
-msgstr "Properti:"
+msgstr "Properti Kelas:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Main Features:"
-msgstr "Fitur-fitur"
+msgstr "Fitur Utama:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Nodes and Classes:"
-msgstr "Kelas yang Diaktifkan:"
+msgstr "Node dan Kelas:"
#: editor/editor_feature_profile.cpp
msgid "File '%s' format is invalid, import aborted."
@@ -1872,23 +1859,20 @@ msgid "Error saving profile to path: '%s'."
msgstr "Galat saat menyimpan profil ke: '%s'."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Reset to Default"
-msgstr "Kembalikan ke Nilai Baku"
+msgstr "Reset ke Default"
#: editor/editor_feature_profile.cpp
msgid "Current Profile:"
msgstr "Profil Sekarang:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Create Profile"
-msgstr "Hapus Profil"
+msgstr "Membuat Profil"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Remove Profile"
-msgstr "Hapus Tile"
+msgstr "Hapus Profil"
#: editor/editor_feature_profile.cpp
msgid "Available Profiles:"
@@ -1908,18 +1892,17 @@ msgid "Export"
msgstr "Ekspor"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Configure Selected Profile:"
-msgstr "Profil Sekarang:"
+msgstr "Konfigurasi Profil Saat Ini:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Extra Options:"
-msgstr "Opsi Tekstur"
+msgstr "Opsi Ekstra:"
#: editor/editor_feature_profile.cpp
msgid "Create or import a profile to edit available classes and properties."
msgstr ""
+"Buat atau impor profil untuk mengedit kelas dan properti yang tersedia."
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
@@ -1946,9 +1929,8 @@ msgid "Select Current Folder"
msgstr "Pilih Folder Saat Ini"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "File exists, overwrite?"
-msgstr "File telah ada, Overwrite?"
+msgstr "File sudah ada, timpa?"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Select This Folder"
@@ -2109,7 +2091,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "Mengimpor ulang Aset"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Atas"
@@ -2346,6 +2328,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"Berputar saat jendela editor menggambar ulang.\n"
+"Perbarui Berkelanjutan diaktifkan, yang dapat meningkatkan penggunaan daya. "
+"Klik untuk menonaktifkannya."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2582,13 +2567,16 @@ msgid ""
"The current scene has no root node, but %d modified external resource(s) "
"were saved anyway."
msgstr ""
+"Scene saat ini tidak memiliki node root, tetapi %d sumber daya eksternal "
+"yang diubah tetap disimpan."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"A root node is required to save the scene. You can add a root node using the "
"Scene tree dock."
-msgstr "Node akar diperlukan untuk menyimpan skena."
+msgstr ""
+"Node root diperlukan untuk menyimpan scene. Anda dapat menambahkan node root "
+"menggunakan dok pohon Scene."
#: editor/editor_node.cpp
msgid "Save Scene As..."
@@ -2619,6 +2607,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Skena saat ini belum disimpan. Buka saja?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Batal"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Ulangi"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Tidak bisa memuat ulang skena yang belum pernah disimpan."
@@ -2970,9 +2984,8 @@ msgid "Orphan Resource Explorer..."
msgstr "Penjelajah Resource Orphan..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reload Current Project"
-msgstr "Ubah Nama Proyek"
+msgstr "Muat Ulang Project Saat Ini"
#: editor/editor_node.cpp
msgid "Quit to Project List"
@@ -3131,13 +3144,12 @@ msgid "Help"
msgstr "Bantuan"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Online Documentation"
-msgstr "Buka Dokumentasi"
+msgstr "Dokumentasi Online"
#: editor/editor_node.cpp
msgid "Questions & Answers"
-msgstr ""
+msgstr "Pertanyaan & Jawaban"
#: editor/editor_node.cpp
msgid "Report a Bug"
@@ -3145,7 +3157,7 @@ msgstr "Laporkan Kutu"
#: editor/editor_node.cpp
msgid "Suggest a Feature"
-msgstr ""
+msgstr "Sarankan Fitur"
#: editor/editor_node.cpp
msgid "Send Docs Feedback"
@@ -3156,9 +3168,8 @@ msgid "Community"
msgstr "Komunitas"
#: editor/editor_node.cpp
-#, fuzzy
msgid "About Godot"
-msgstr "Tentang"
+msgstr "Tentang Godot"
#: editor/editor_node.cpp
msgid "Support Godot Development"
@@ -3250,14 +3261,12 @@ msgid "Manage Templates"
msgstr "Kelola Templat"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Install from file"
-msgstr "Memasang dari berkas"
+msgstr "Install dari file"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Select android sources file"
-msgstr "Pilih Mesh Sumber:"
+msgstr "Pilih file sumber android"
#: editor/editor_node.cpp
msgid ""
@@ -3306,6 +3315,11 @@ msgid "Merge With Existing"
msgstr "Gabung dengan yang Ada"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Ubah Transformasi Animasi"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Buka & Jalankan Skrip"
@@ -3340,9 +3354,8 @@ msgid "Select"
msgstr "Pilih"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Select Current"
-msgstr "Pilih Folder Saat Ini"
+msgstr "Pilih Saat Ini"
#: editor/editor_node.cpp
msgid "Open 2D Editor"
@@ -3377,9 +3390,8 @@ msgid "No sub-resources found."
msgstr "Tidak ada sub-resourc yang ditemukan."
#: editor/editor_path.cpp
-#, fuzzy
msgid "Open a list of sub-resources."
-msgstr "Tidak ada sub-resourc yang ditemukan."
+msgstr "Buka daftar sub-sumber daya."
#: editor/editor_plugin.cpp
msgid "Creating Mesh Previews"
@@ -3406,14 +3418,12 @@ msgid "Update"
msgstr "Perbarui"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Version"
-msgstr "Versi:"
+msgstr "Versi"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Author"
-msgstr "Pengarang"
+msgstr "Pencipta"
#: editor/editor_plugin_settings.cpp
#: editor/plugins/version_control_editor_plugin.cpp
@@ -3426,14 +3436,12 @@ msgid "Measure:"
msgstr "Ukuran:"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Frame Time (ms)"
-msgstr "Waktu Frame (sec)"
+msgstr "Waktu Frame (ms)"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Average Time (ms)"
-msgstr "Waktu Rata-rata (sec)"
+msgstr "Waktu Rata-rata (ms)"
#: editor/editor_profiler.cpp
msgid "Frame %"
@@ -3563,6 +3571,10 @@ msgstr ""
"Resource yang terpilih (%s) tidak sesuai dengan tipe apapun yang diharapkan "
"untuk properti ini (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Jadikan Unik"
@@ -3582,9 +3594,8 @@ msgid "Paste"
msgstr "Tempel"
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
-#, fuzzy
msgid "Convert to %s"
-msgstr "Konversikan ke %s"
+msgstr "Konversi ke %s"
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "New %s"
@@ -3632,11 +3643,10 @@ msgid "Did you forget the '_run' method?"
msgstr "Apakah anda lupa dengan fungsi '_run' ?"
#: editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Hold %s to round to integers. Hold Shift for more precise changes."
msgstr ""
-"Tahan Ctrl untuk membulatkan bilangan. Tahan Shift untuk meletakkan bilangan "
-"yang lebih presisi."
+"Tahan %s untuk membulatkan ke integer. Tahan Shift untuk perubahan yang "
+"lebih presisi."
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
@@ -3656,49 +3666,43 @@ msgstr "Impor dari Node:"
#: editor/export_template_manager.cpp
msgid "Open the folder containing these templates."
-msgstr ""
+msgstr "Buka folder yang berisi template ini."
#: editor/export_template_manager.cpp
msgid "Uninstall these templates."
-msgstr ""
+msgstr "Uninstall template ini."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "There are no mirrors available."
-msgstr "Tidak ada berkas '%s'."
+msgstr "Tidak ada mirror yang tersedia."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Retrieving the mirror list..."
-msgstr "Mendapatkan informasi cermin, silakan tunggu..."
+msgstr "Mengambil daftar mirror..."
#: editor/export_template_manager.cpp
msgid "Starting the download..."
-msgstr ""
+msgstr "Memulai download..."
#: editor/export_template_manager.cpp
msgid "Error requesting URL:"
msgstr "Galat saat meminta URL:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Connecting to the mirror..."
-msgstr "Menyambungkan..."
+msgstr "Menghubungkan ke mirror..."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't resolve the requested address."
-msgstr "Tidak dapat menjelaskan hostname:"
+msgstr "Tidak dapat menyelesaikan alamat yang diminta."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't connect to the mirror."
-msgstr "Tidak dapat terhubung ke host:"
+msgstr "Tidak dapat terhubung ke mirror."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No response from the mirror."
-msgstr "Tidak ada respon dari host:"
+msgstr "Tidak ada respon dari mirror."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3706,18 +3710,16 @@ msgid "Request failed."
msgstr "Permintaan gagal."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Request ended up in a redirect loop."
-msgstr "Permintaan gagal, terlalu banyak pengalihan"
+msgstr "Permintaan berakhir di loop pengalihan."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Request failed:"
-msgstr "Permintaan gagal."
+msgstr "Permintaan gagal:"
#: editor/export_template_manager.cpp
msgid "Download complete; extracting templates..."
-msgstr ""
+msgstr "Download selesai; mengekstrak template..."
#: editor/export_template_manager.cpp
msgid "Cannot remove temporary file:"
@@ -3736,13 +3738,14 @@ msgid "Error getting the list of mirrors."
msgstr "Galat dalam mendapatkan daftar mirror."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error parsing JSON with the list of mirrors. Please report this issue!"
-msgstr "Galat mengurai JSON dari daftar mirror. Silakan laporkan masalah ini!"
+msgstr ""
+"Kesalahan saat mengurai JSON dengan daftar mirror. Silakan laporkan masalah "
+"ini!"
#: editor/export_template_manager.cpp
msgid "Best available mirror"
-msgstr ""
+msgstr "Mirror terbaik yang tersedia"
#: editor/export_template_manager.cpp
msgid ""
@@ -3795,24 +3798,20 @@ msgid "SSL Handshake Error"
msgstr "Kesalahan jabat tangan SSL"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't open the export templates file."
-msgstr "Tidak dapat membuka ekspor template-template zip."
+msgstr "Tidak dapat membuka file template ekspor."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Invalid version.txt format inside the export templates file: %s."
-msgstr "Format version.txt tidak valid dalam berkas templat: %s."
+msgstr "Format version.txt tidak valid di dalam file template ekspor: %s."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No version.txt found inside the export templates file."
-msgstr "Berkas version.txt tidak ditemukan dalam templat."
+msgstr "Tidak ada version.txt yang ditemukan di dalam file template ekspor."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for extracting templates:"
-msgstr "Kesalahan saat membuat lokasi untuk templat:"
+msgstr "Kesalahan saat membuat jalur untuk mengekstrak template:"
#: editor/export_template_manager.cpp
msgid "Extracting Export Templates"
@@ -3823,9 +3822,8 @@ msgid "Importing:"
msgstr "Mengimpor:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Remove templates for the version '%s'?"
-msgstr "Hapus templat versi '%s'?"
+msgstr "Hapus template untuk versi '%s'?"
#: editor/export_template_manager.cpp
msgid "Uncompressing Android Build Sources"
@@ -3841,68 +3839,61 @@ msgstr "Versi sekarang:"
#: editor/export_template_manager.cpp
msgid "Export templates are missing. Download them or install from a file."
-msgstr ""
+msgstr "Template ekspor tidak ada. Download atau instal dari file."
#: editor/export_template_manager.cpp
msgid "Export templates are installed and ready to be used."
-msgstr ""
+msgstr "Template ekspor sudah terinstal dan siap digunakan."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open Folder"
-msgstr "Buka Berkas"
+msgstr "Buka Folder"
#: editor/export_template_manager.cpp
msgid "Open the folder containing installed templates for the current version."
-msgstr ""
+msgstr "Buka folder yang berisi template yang diinstal untuk versi saat ini."
#: editor/export_template_manager.cpp
msgid "Uninstall"
msgstr "Copot Pemasangan"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uninstall templates for the current version."
-msgstr "Nilai awal untuk penghitung"
+msgstr "Uninstall template untuk versi saat ini."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Download from:"
-msgstr "Unduhan Gagal"
+msgstr "Download dari:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "Jalankan di Peramban"
+msgstr "Buka di Browser Web"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "Salin Galat"
+msgstr "Salin URL Mirror"
#: editor/export_template_manager.cpp
msgid "Download and Install"
-msgstr ""
+msgstr "Download dan Instal"
#: editor/export_template_manager.cpp
msgid ""
"Download and install templates for the current version from the best "
"possible mirror."
-msgstr ""
+msgstr "Download dan instal template untuk versi saat ini dari mirror terbaik."
#: editor/export_template_manager.cpp
msgid "Official export templates aren't available for development builds."
msgstr "Templat ekspor resmi tidak tersedia untuk build pengembangan."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install from File"
-msgstr "Memasang dari berkas"
+msgstr "Install dari File"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install templates from a local file."
-msgstr "Impor Templat dari Berkas ZIP"
+msgstr "Instal template dari file lokal."
#: editor/export_template_manager.cpp editor/find_in_files.cpp
#: editor/progress_dialog.cpp scene/gui/dialogs.cpp
@@ -3910,19 +3901,16 @@ msgid "Cancel"
msgstr "Batal"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Cancel the download of the templates."
-msgstr "Tidak dapat membuka ekspor template-template zip."
+msgstr "Batalkan download template."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Other Installed Versions:"
-msgstr "Versi Terpasang:"
+msgstr "Versi Terinstal Lainnya:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uninstall Template"
-msgstr "Copot Pemasangan"
+msgstr "Uninstal Template"
#: editor/export_template_manager.cpp
msgid "Select Template File"
@@ -3937,6 +3925,8 @@ msgid ""
"The templates will continue to download.\n"
"You may experience a short editor freeze when they finish."
msgstr ""
+"Templat akan dilanjutkan untuk diunduh.\n"
+"Editor Anda mungkin mengalami pembekuan sementara saat unduhan selesai."
#: editor/filesystem_dock.cpp
msgid "Favorites"
@@ -4036,7 +4026,7 @@ msgstr "Buka Skena"
#: editor/filesystem_dock.cpp
msgid "Instance"
-msgstr "hal"
+msgstr "Instance"
#: editor/filesystem_dock.cpp
msgid "Add to Favorites"
@@ -4083,35 +4073,32 @@ msgid "Collapse All"
msgstr "Lipat Semua"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort files"
-msgstr "Cari berkas"
+msgstr "Urutkan berkas"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Ascending)"
-msgstr ""
+msgstr "Urutkan berdasarkan Nama (Ascending)"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Descending)"
-msgstr ""
+msgstr "Urutkan berdasarkan Nama (Descending)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Ascending)"
-msgstr ""
+msgstr "Urutkan berdasarkan Jenis (Ascending)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Descending)"
-msgstr ""
+msgstr "Urutkan berdasarkan Jenis (Descending)"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort by Last Modified"
-msgstr "Terakhir Diubah"
+msgstr "Urut dari Terakhir Diubah"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort by First Modified"
-msgstr "Terakhir Diubah"
+msgstr "Urut dari Pertama Diubah"
#: editor/filesystem_dock.cpp
msgid "Duplicate..."
@@ -4123,7 +4110,7 @@ msgstr "Ubah Nama..."
#: editor/filesystem_dock.cpp
msgid "Focus the search box"
-msgstr ""
+msgstr "Memfokuskan kotak pencarian"
#: editor/filesystem_dock.cpp
msgid "Previous Folder/File"
@@ -4432,14 +4419,12 @@ msgid "Failed to load resource."
msgstr "Gagal memuat resource."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Copy Properties"
-msgstr "Properti"
+msgstr "Salin Properti"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Paste Properties"
-msgstr "Properti"
+msgstr "Tempel Properti"
#: editor/inspector_dock.cpp
msgid "Make Sub-Resources Unique"
@@ -4464,23 +4449,20 @@ msgid "Save As..."
msgstr "Simpan Sebagai..."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Extra resource options."
-msgstr "Tidak dalam lokasi resource."
+msgstr "Opsi resource tambahan."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Edit Resource from Clipboard"
-msgstr "Sunting Papan Klip Resource"
+msgstr "Edit Resource dari Papan Klip"
#: editor/inspector_dock.cpp
msgid "Copy Resource"
msgstr "Salin Resource"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Make Resource Built-In"
-msgstr "Buat Menjadi Bawaan"
+msgstr "Buat Resource Menjadi Bawaan"
#: editor/inspector_dock.cpp
msgid "Go to the previous edited object in history."
@@ -4495,9 +4477,8 @@ msgid "History of recently edited objects."
msgstr "Histori dari objek terdireksi baru-baru saja."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Open documentation for this object."
-msgstr "Buka Dokumentasi"
+msgstr "Buka Dokumentasi objek ini."
#: editor/inspector_dock.cpp editor/scene_tree_dock.cpp
msgid "Open Documentation"
@@ -4508,9 +4489,8 @@ msgid "Filter properties"
msgstr "Filter properti"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Manage object properties."
-msgstr "Properti Objek."
+msgstr "Atur properti objek."
#: editor/inspector_dock.cpp
msgid "Changes may be lost!"
@@ -4754,9 +4734,8 @@ msgid "Blend:"
msgstr "Campur:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Parameter Changed:"
-msgstr "Parameter Berubah"
+msgstr "Parameter Berubah:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -5483,11 +5462,11 @@ msgstr "Semua"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search templates, projects, and demos"
-msgstr ""
+msgstr "Cari templat, proyek, dan demo"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search assets (excluding templates, projects, and demos)"
-msgstr ""
+msgstr "Cari aset (kecuali templat, proyek, dan demo)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Import..."
@@ -5531,7 +5510,7 @@ msgstr "Berkas Aset ZIP"
#: editor/plugins/audio_stream_editor_plugin.cpp
msgid "Audio Preview Play/Pause"
-msgstr ""
+msgstr "Putar/Jeda Pratinjau Audio"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5568,11 +5547,10 @@ msgstr ""
"persegi [0.0,1.0]."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
-"Editor Godot di-build tanpa dukungan ray tracing, sehingga lightmaps tidak "
+"Editor Godot di-build tanpa dukungan ray tracing, sehingga lightmap tidak "
"dapat di-bake."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
@@ -5689,6 +5667,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Pindahkan CanvasItem \"%s\" ke (%d,%d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Kunci yang Dipilih"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Kelompok"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -5790,13 +5780,12 @@ msgstr "Ubah Jangkar-jangkar"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid ""
"Project Camera Override\n"
"Overrides the running project's camera with the editor viewport camera."
msgstr ""
-"Timpa Kamera Gim\n"
-"Menimpa kamera gim dengan kamera viewport editor."
+"Timpa Kamera Proyek\n"
+"Menimpa kamera proyek yang dijalankan dengan kamera viewport editor."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5805,6 +5794,9 @@ msgid ""
"No project instance running. Run the project from the editor to use this "
"feature."
msgstr ""
+"Timpa Kamera Proyek\n"
+"Tidak ada instance proyek yang berjalan. Jalankan proyek dari editor untuk "
+"menggunakan fitur ini."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5872,31 +5864,27 @@ msgstr "Mode Seleksi"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Drag: Rotate selected node around pivot."
-msgstr "Hapus node atau transisi terpilih."
+msgstr "Seret: Putar node terpilih sekitar pivot."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Alt+Drag: Move selected node."
-msgstr "Alt+Geser: Pindah"
+msgstr "Alt+Seret: Pindahkan node terpilih."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "V: Set selected node's pivot position."
-msgstr "Hapus node atau transisi terpilih."
+msgstr "V: Atur posisi pivot node terpilih."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Alt+RMB: Show list of all nodes at position clicked, including locked."
msgstr ""
-"Tampilkan semua objek dalam posisi klik ke sebuah daftar\n"
-"(sama seperti Alt+Klik kanan dalam mode seleksi)."
+"Alt+Klik Kanan: Tampilkan semua daftar node di posisi yang diklik, termasuk "
+"yang dikunci."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "RMB: Add node at position clicked."
-msgstr ""
+msgstr "Klik Kanan: Tambah node di posisi yang diklik."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6134,14 +6122,12 @@ msgid "Clear Pose"
msgstr "Hapus Pose"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Add Node Here"
-msgstr "Tambahkan Node"
+msgstr "Tambahkan Node Di sini"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Instance Scene Here"
-msgstr "Instansi Skena"
+msgstr "Instansi Skena Di sini"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
@@ -6157,49 +6143,43 @@ msgstr "Geser Tampilan"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 3.125%"
-msgstr ""
+msgstr "Perbesar 3.125%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 6.25%"
-msgstr ""
+msgstr "Perbesar 6.25%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 12.5%"
-msgstr ""
+msgstr "Perbesar 12.5%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 25%"
-msgstr "Perkecil Pandangan"
+msgstr "Perbesar 25%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 50%"
-msgstr "Perkecil Pandangan"
+msgstr "Perbesar 50%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 100%"
-msgstr "Perkecil Pandangan"
+msgstr "Perbesar 100%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 200%"
-msgstr "Perkecil Pandangan"
+msgstr "Perbesar 200%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 400%"
-msgstr "Perkecil Pandangan"
+msgstr "Perbesar 400%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 800%"
-msgstr "Perkecil Pandangan"
+msgstr "Perbesar 800%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 1600%"
-msgstr ""
+msgstr "Perbesar 1600%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
@@ -6444,9 +6424,8 @@ msgid "Couldn't create a single convex collision shape."
msgstr "Tidak dapat membuat convex collision shape tunggal."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Shape"
-msgstr "Buat Bentuk Cembung"
+msgstr "Buat Bentuk Cembung yang Disederhanakan"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Single Convex Shape"
@@ -6481,9 +6460,8 @@ msgid "No mesh to debug."
msgstr "Tidak ada mesh untuk diawakutu."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Mesh has no UV in layer %d."
-msgstr "Model tidak memiliki UV dalam lapisan ini"
+msgstr "Mesh tidak memiliki UV di layer %d."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "MeshInstance lacks a Mesh!"
@@ -6641,7 +6619,13 @@ msgid "Remove Selected Item"
msgstr "Hapus Item yang Dipilih"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Impor dari Skena"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Impor dari Skena"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6925,7 +6909,7 @@ msgstr "Cermin Pengatur Panjang"
#: editor/plugins/path_editor_plugin.cpp
msgid "Curve Point #"
-msgstr "Titik # Curve"
+msgstr "Titik Kurva #"
#: editor/plugins/path_editor_plugin.cpp
msgid "Set Curve Point Position"
@@ -7219,9 +7203,8 @@ msgid "ResourcePreloader"
msgstr "ResourcePreloader"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portals"
-msgstr "Balik secara Horizontal"
+msgstr "Balikkan Portal"
#: editor/plugins/room_manager_editor_plugin.cpp
#, fuzzy
@@ -7234,9 +7217,18 @@ msgid "Generate Points"
msgstr "Jumlah Titik yang Dihasilkan:"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portal"
-msgstr "Balik secara Horizontal"
+msgstr "Balikkan Portal"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Bersihkan Transformasi"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Buat Node"
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
@@ -7743,12 +7735,14 @@ msgid "Skeleton2D"
msgstr "Skeleton2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Buat Pose Istirahat (Dari Pertulangan)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Atur Tulang ke Pose Istirahat"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Atur Tulang ke Pose Istirahat"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Timpa"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7775,6 +7769,71 @@ msgid "Perspective"
msgstr "Perspektif"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspektif"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspektif"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspektif"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspektif"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspektif"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Transformasi Dibatalkan."
@@ -7801,20 +7860,17 @@ msgid "None"
msgstr "Tidak ada"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Rotate"
-msgstr "Mode Putar"
+msgstr "Putar"
#. TRANSLATORS: This refers to the movement that changes the position of an object.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translate"
-msgstr "Translasi:"
+msgstr "Translasi"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scale"
-msgstr "Skala:"
+msgstr "Skala"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scaling: "
@@ -7846,9 +7902,8 @@ msgid "Yaw:"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Size:"
-msgstr "Ukuran: "
+msgstr "Ukuran:"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
@@ -7893,42 +7948,22 @@ msgid "Bottom View."
msgstr "Tampilan Bawah."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Bawah"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Tampilan Kiri."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Kiri"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Tampilan Kanan."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Kanan"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Tampilan Depan."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Depan"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Tampilan Belakang."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Belakang"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Sejajarkan Transformasi dengan Tampilan"
@@ -8046,12 +8081,11 @@ msgid "View Rotation Locked"
msgstr "Rotasi Tampilan Terkunci"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid ""
"To zoom further, change the camera's clipping planes (View -> Settings...)"
msgstr ""
-"Untuk memperbesar lebih jauh, ganti kamera clipping planes (Tinjau -> "
-"Setelan...)"
+"Untuk memperbesar lebih lanjut, ubah bidang kliping kamera (View -> "
+"Setting...)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid ""
@@ -8206,6 +8240,11 @@ msgid "View Portal Culling"
msgstr "Pengaturan Viewport"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Pengaturan Viewport"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Pengaturan…"
@@ -8271,8 +8310,9 @@ msgid "Post"
msgstr "Sesudah"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Gizmo tak bernama"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Proyek Tanpa Nama"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -11391,7 +11431,7 @@ msgstr "Aksi"
#: editor/project_settings_editor.cpp
msgid "Deadzone"
-msgstr "Zona tidak aktif"
+msgstr "Zona mati"
#: editor/project_settings_editor.cpp
msgid "Device:"
@@ -12470,6 +12510,16 @@ msgstr "Atur Posisi Titik Kurva"
msgid "Set Portal Point Position"
msgstr "Atur Posisi Titik Kurva"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Ubah Radius Bentuk Silinder"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Atur Posisi Kurva Dalam"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "Ubah Radius Silinder"
@@ -12754,6 +12804,11 @@ msgstr "Memetakan lightmap"
msgid "Class name can't be a reserved keyword"
msgstr "Nama kelas tidak boleh reserved keyword"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Isi Pilihan"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Akhir dari inner exception stack trace"
@@ -13241,73 +13296,73 @@ msgstr "Cari VisualScript"
msgid "Get %s"
msgstr "Dapatkan %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Nama paket tidak ada."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Segmen paket panjangnya harus tidak boleh nol."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "Karakter '%s' tidak diizinkan dalam penamaan paket aplikasi Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "Digit tidak boleh diletakkan sebagai karakter awal di segmen paket."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "Karakter '%s' tidak bisa dijadikan karakter awal dalam segmen paket."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "Package setidaknya harus memiliki sebuah pemisah '.'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Pilih perangkat pada daftar"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Mengekspor Semua"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Copot Pemasangan"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Memuat, tunggu sejenak..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Tidak dapat memulai subproses!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Menjalankan Script Khusus..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Tidak dapat membuat folder."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "Tak dapat menemukan perkakas 'apksigner'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13315,66 +13370,66 @@ msgstr ""
"Templat build Android belum terpasang dalam proyek. Pasanglah dari menu "
"Proyek."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Berkas debug keystore belum dikonfigurasi dalam Pengaturan Editor maupun di "
"prasetel proyek."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr "Berkas keystore rilis belum dikonfigurasi di prasetel ekspor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr "Lokasi Android SDK yang valid dibutuhkan di Pengaturan Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "Lokasi Android SDK tidak valid di Pengaturan Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "Direktori 'platform-tools' tidak ada!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "Tidak dapat menemukan perintah adb di Android SDK platform-tools."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Silakan cek direktori Android SDK yang diisikan dalam Pengaturan Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "Direktori 'build-tools' tidak ditemukan!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr "Tidak dapat menemukan apksigner dalam Android SDK build-tools."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Kunci Publik untuk ekspansi APK tidak valid."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Nama paket tidak valid:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13382,38 +13437,23 @@ msgstr ""
"Modul \"GodotPaymentV3\" tidak valid yang dimasukkan dalam pengaturan proyek "
"\"android/modules\" (diubah di Godot 3.2.2)\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "\"Gunakan Build Custom\" harus diaktifkan untuk menggunakan plugin."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Derajat Kebebasan\" hanya valid ketika \"Mode Xr\" bernilai \"Occulus "
-"Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"Pelacakan Tangan\" hanya valid ketika \"Mode Xr\" bernilai \"Oculus Mobile "
"VR\"."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Focus Awareness\" hanya valid ketika \"Mode Xr\" bernilai \"Oculus Mobile "
-"VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"\"Expor AAB\" hanya bisa valid ketika \"Gunakan Build Custom\" diaktifkan."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13421,57 +13461,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Memindai Berkas,\n"
"Silakan Tunggu..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "Tidak dapat membuka templat untuk ekspor:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Menambahkan %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Mengekspor Semua"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr "Nama berkas tak valid! Android App Bundle memerlukan ekstensi *.aab ."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "Ekspansi APK tidak kompatibel dengan Android App Bundle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "Nama berkas tidak valid! APK Android memerlukan ekstensi *.apk ."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13479,7 +13519,7 @@ msgstr ""
"Mencoba untuk membangun dari templat build khusus, tapi tidak ada informasi "
"versinya. Silakan pasang ulang dari menu 'Proyek'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13491,26 +13531,25 @@ msgstr ""
" Versi Godot: %s\n"
"Silakan pasang ulang templat build Android dari menu 'Project'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
-msgstr "Tidak dapat menyunting project.godot dalam lokasi proyek."
+msgstr "Tidak dapat menyunting proyek gradle dalam lokasi proyek\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "Tidak dapat menulis berkas:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Membangun Proyek Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13518,11 +13557,11 @@ msgstr ""
"Pembangunan proyek Android gagal, periksa output untuk galatnya.\n"
"Atau kunjungi docs.godotengine.org untuk dokumentasi build Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "Memindahkan keluaran"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13530,24 +13569,24 @@ msgstr ""
"Tidak dapat menyalin dan mengubah nama berkas ekspor, cek direktori proyek "
"gradle untuk hasilnya."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Animasi tidak ditemukan: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Membuat kontur..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "Tidak dapat membuka templat untuk ekspor:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13555,21 +13594,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Menambahkan %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Tidak dapat menulis berkas:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14115,6 +14154,14 @@ msgstr ""
"NavigationMeshInstance harus menjadi child atau grandchild untuk sebuah node "
"Navigation. Ini hanya menyediakan data navigasi."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14445,6 +14492,14 @@ msgstr "Harus menggunakan ekstensi yang sah."
msgid "Enable grid minimap."
msgstr "Aktifkan peta mini grid."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14501,6 +14556,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "Ukuran viewport harus lebih besar dari 0 untuk me-render apa pun."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14554,6 +14613,41 @@ msgstr "Pemberian nilai untuk uniform."
msgid "Constants cannot be modified."
msgstr "Konstanta tidak dapat dimodifikasi."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Buat Pose Istirahat (Dari Pertulangan)"
+
+#~ msgid "Bottom"
+#~ msgstr "Bawah"
+
+#~ msgid "Left"
+#~ msgstr "Kiri"
+
+#~ msgid "Right"
+#~ msgstr "Kanan"
+
+#~ msgid "Front"
+#~ msgstr "Depan"
+
+#~ msgid "Rear"
+#~ msgstr "Belakang"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Gizmo tak bernama"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Derajat Kebebasan\" hanya valid ketika \"Mode Xr\" bernilai \"Occulus "
+#~ "Mobile VR\"."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Focus Awareness\" hanya valid ketika \"Mode Xr\" bernilai \"Oculus "
+#~ "Mobile VR\"."
+
#~ msgid "Package Contents:"
#~ msgstr "Isi Paket:"
diff --git a/editor/translations/is.po b/editor/translations/is.po
index e536b0a8f6..33fee00267 100644
--- a/editor/translations/is.po
+++ b/editor/translations/is.po
@@ -1029,7 +1029,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1660,13 +1660,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2041,7 +2041,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2520,6 +2520,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3148,6 +3172,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Breyta umbreytingu"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3390,6 +3419,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5454,6 +5487,17 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Fjarlægja val"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6364,7 +6408,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6953,6 +7001,16 @@ msgstr ""
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Breyta umbreytingu"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Anim DELETE-lyklar"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7448,11 +7506,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7480,6 +7538,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7588,42 +7700,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7885,6 +7977,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Breyta Viðbót"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7950,7 +8047,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11926,6 +12023,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12212,6 +12317,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Allt úrvalið"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12691,160 +12801,149 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Breyta..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12852,57 +12951,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12910,54 +13009,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12965,19 +13064,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13427,6 +13526,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13716,6 +13823,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13756,6 +13871,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/it.po b/editor/translations/it.po
index c3aa84d4b6..0b25d41fa0 100644
--- a/editor/translations/it.po
+++ b/editor/translations/it.po
@@ -64,8 +64,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-08-10 21:39+0000\n"
-"Last-Translator: Mirko <miknsop@gmail.com>\n"
+"PO-Revision-Date: 2021-08-22 22:46+0000\n"
+"Last-Translator: Riteo Siuga <riteo@posteo.net>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/"
"godot/it/>\n"
"Language: it\n"
@@ -73,7 +73,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.8.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -96,7 +96,7 @@ msgstr "Input %i non valido (assente) nell'espressione"
#: core/math/expression.cpp
msgid "self can't be used because instance is null (not passed)"
-msgstr "self non può essere utilizzato perché l'istanza è nulla (non passata)"
+msgstr "self non può essere usato perché l'istanza è nulla (non passata)"
#: core/math/expression.cpp
msgid "Invalid operands to operator %s, %s and %s."
@@ -421,15 +421,13 @@ msgstr "Inserisci un'animazione"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "Impossibile aprire '%s'."
+msgstr "nodo \"%s\""
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "Animazione"
+msgstr "animazione"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -437,9 +435,8 @@ msgstr "AnimationPlayer non può animare se stesso, solo altri nodi."
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "Non esiste nessuna proprietà \"%s\"."
+msgstr "proprietà \"%s\""
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -657,7 +654,7 @@ msgstr "Vai al passo precedente"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Apply Reset"
-msgstr "Reset"
+msgstr "Applica reset"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -678,7 +675,7 @@ msgstr "Usa le curve di Bézier"
#: editor/animation_track_editor.cpp
#, fuzzy
msgid "Create RESET Track(s)"
-msgstr "Incolla delle tracce"
+msgstr "Crea delle tracce di reimpostazione"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -908,7 +905,6 @@ msgid "Deferred"
msgstr "Differita"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid ""
"Defers the signal, storing it in a queue and only firing it at idle time."
msgstr ""
@@ -1004,7 +1000,6 @@ msgid "Edit..."
msgstr "Modifica..."
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Go to Method"
msgstr "Vai al metodo"
@@ -1026,7 +1021,7 @@ msgstr "Nessun risultato per \"%s\"."
#: editor/create_dialog.cpp editor/property_selector.cpp
msgid "No description available for %s."
-msgstr ""
+msgstr "Nessuna descrizione disponibile per %s."
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
@@ -1086,7 +1081,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Dipendenze"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Risorsa"
@@ -1126,17 +1121,16 @@ msgid "Owners Of:"
msgstr "Proprietari di:"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"Remove the selected files from the project? (Cannot be undone.)\n"
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
"Rimuovere i file selezionati dal progetto? (non annullabile)\n"
-"Sarà possibile ripristinarli accedendo al cestino di sistema."
+"A seconda della propria configurazione di sistema, essi saranno spostati nel "
+"cestino di sistema oppure eliminati permanentemente."
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"The files being removed are required by other resources in order for them to "
"work.\n"
@@ -1147,7 +1141,8 @@ msgstr ""
"I file che stanno per essere rimossi sono richiesti per il funzionamento di "
"altre risorse.\n"
"Rimuoverli comunque? (non annullabile)\n"
-"Sarà possibile ripristinarli accedendo al cestino di sistema."
+"A seconda della propria configurazione di sistema, essi saranno spostati nel "
+"cestino di sistema oppure eliminati permanentemente."
#: editor/dependency_editor.cpp
msgid "Cannot remove:"
@@ -1317,41 +1312,38 @@ msgid "Licenses"
msgstr "Licenze"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Error opening asset file for \"%s\" (not in ZIP format)."
-msgstr "Errore nell'apertura del file package (non è in formato ZIP)."
+msgstr ""
+"Errore nell'apertura del file del contenuto per \"%s\" (non è in formato "
+"ZIP)."
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "%s (already exists)"
msgstr "%s (già esistente)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
-msgstr ""
+msgstr "File del contenuto \"%s\" - %d file sono in conflitto col progetto:"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - No files conflict with your project:"
-msgstr ""
+msgstr "File del contenuto \"%s\" - Nessun file è in conflitto col progetto:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
-msgstr "Estrazione asset"
+msgstr "Estraendo i contenuti"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "The following files failed extraction from asset \"%s\":"
-msgstr "Impossibile estrarre i seguenti file dal pacchetto:"
+msgstr "L'estrazione dei seguenti file dal contenuto \"%s\" è fallita:"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "(and %s more files)"
-msgstr "E %s altri file."
+msgstr "(e %s altri file)"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset \"%s\" installed successfully!"
-msgstr "Pacchetto installato con successo!"
+msgstr "Contenuto \"%s\" installato con successo!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -1363,9 +1355,8 @@ msgid "Install"
msgstr "Installa"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset Installer"
-msgstr "Installatore di pacchetti"
+msgstr "Installatore di contenuti"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
@@ -1610,7 +1601,7 @@ msgstr "File inesistente."
#: editor/editor_autoload_settings.cpp
msgid "%s is an invalid path. Not in resource path (res://)."
-msgstr ""
+msgstr "%s non è una strada valida. Essa non punta nelle risorse (res://)."
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1761,13 +1752,13 @@ msgstr ""
"Attiva \"Import Pvrtc\" nelle impostazioni del progetto, oppure disattiva "
"\"Driver Fallback Enabled\"."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Modello di sviluppo personalizzato non trovato."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1792,9 +1783,8 @@ msgid "Script Editor"
msgstr "Editor degli script"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Asset Library"
-msgstr "Libreria degli asset"
+msgstr "Libreria dei contenuti"
#: editor/editor_feature_profile.cpp
msgid "Scene Tree Editing"
@@ -1814,35 +1804,40 @@ msgstr "Pannello d'importazione"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
-msgstr ""
+msgstr "Permette di visuallizzare e modificare le scene 3D."
#: editor/editor_feature_profile.cpp
msgid "Allows to edit scripts using the integrated script editor."
-msgstr ""
+msgstr "Permette di modificare gli script usando l'editor di script integrato."
#: editor/editor_feature_profile.cpp
msgid "Provides built-in access to the Asset Library."
-msgstr ""
+msgstr "Offre un accesso alla libreria dei contenuti integrato."
#: editor/editor_feature_profile.cpp
msgid "Allows editing the node hierarchy in the Scene dock."
-msgstr ""
+msgstr "Permette di modificare la gerarchia dei nodi nel pannello della scena."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to work with signals and groups of the node selected in the Scene "
"dock."
msgstr ""
+"Permette di lavorare coi segnali e i gruppi del nodo selezionato nel "
+"pannello della scena."
#: editor/editor_feature_profile.cpp
msgid "Allows to browse the local file system via a dedicated dock."
msgstr ""
+"Permette di esplorare il file system locale tramite un pannello dedicato."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to configure import settings for individual assets. Requires the "
"FileSystem dock to function."
msgstr ""
+"Permette di configurare le impostazioni d'importazione di contenuti "
+"individuali. Richiede il pannello del file system per funzionare."
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -1851,11 +1846,13 @@ msgstr "(Corrente)"
#: editor/editor_feature_profile.cpp
msgid "(none)"
-msgstr ""
+msgstr "(nulla)"
#: editor/editor_feature_profile.cpp
msgid "Remove currently selected profile, '%s'? Cannot be undone."
msgstr ""
+"Rimuovere il profilo '%s' attualmente selezionato? Ciò non potrà essere "
+"annullato."
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -1967,6 +1964,8 @@ msgstr "Opzioni Texture"
#: editor/editor_feature_profile.cpp
msgid "Create or import a profile to edit available classes and properties."
msgstr ""
+"Creare o importare un profilo per modificare le classi e le proprietà "
+"disponibili."
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
@@ -2153,11 +2152,10 @@ msgstr ""
"importazione annullata"
#: editor/editor_file_system.cpp
-#, fuzzy
msgid "(Re)Importing Assets"
-msgstr "Reimportazione degli asset"
+msgstr "Reimportando i contenuti"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "In cima"
@@ -2396,6 +2394,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"Gira quando la finestra dell'editor si aggiorna.\n"
+"Aggiorna continuamente è attivo, il che può aumentare il consumo di "
+"corrente. Cliccare per disabilitarlo."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2636,6 +2637,8 @@ msgid ""
"The current scene has no root node, but %d modified external resource(s) "
"were saved anyway."
msgstr ""
+"La scena attuale non ha un nodo radice, ma %d risorse esterne modificate "
+"sono state salvate comunque."
#: editor/editor_node.cpp
#, fuzzy
@@ -2673,6 +2676,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Scena attuale non salvata. Aprire comunque?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Annulla"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Rifai"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Impossibile ricaricare una scena che non è mai stata salvata."
@@ -3081,7 +3110,7 @@ msgstr ""
"esporterà un eseguibile senza i dati del progetto.\n"
"Il filesystem verrà provvisto dall'editor attraverso la rete.\n"
"Su Android, esso userà il cavo USB per ottenere delle prestazioni migliori. "
-"Questa impostazione rende più veloci i progetti con risorse pesanti."
+"Questa impostazione rende più veloci i progetti con contenuti pesanti."
#: editor/editor_node.cpp
msgid "Visible Collision Shapes"
@@ -3202,7 +3231,7 @@ msgstr "Apri la documentazione"
#: editor/editor_node.cpp
msgid "Questions & Answers"
-msgstr ""
+msgstr "Domande e risposte"
#: editor/editor_node.cpp
msgid "Report a Bug"
@@ -3380,6 +3409,11 @@ msgid "Merge With Existing"
msgstr "Unisci con una esistente"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Cambia la trasformazione di un'animazione"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Apri ed esegui uno script"
@@ -3431,9 +3465,8 @@ msgid "Open Script Editor"
msgstr "Apri l'editor degli script"
#: editor/editor_node.cpp editor/project_manager.cpp
-#, fuzzy
msgid "Open Asset Library"
-msgstr "Apri la libreria degli Asset"
+msgstr "Apri la libreria dei contenuti"
#: editor/editor_node.cpp
msgid "Open the next Editor"
@@ -3526,7 +3559,7 @@ msgstr "Inclusivo"
#: editor/editor_profiler.cpp
msgid "Self"
-msgstr "Se stesso"
+msgstr "Proprio"
#: editor/editor_profiler.cpp
msgid ""
@@ -3537,6 +3570,12 @@ msgid ""
"functions called by that function.\n"
"Use this to find individual functions to optimize."
msgstr ""
+"Inclusivo: include il tempo speso dalle altre funzioni chiamate da questa.\n"
+"Utilizzare questa opzione per trovare dei colli di bottiglia.\n"
+"\n"
+"Proprio: conta solo il tempo speso dalla funzione stessa, non in altre "
+"chiamate da essa.\n"
+"Utilizzare questa opzione per trovare delle funzioni singole da ottimizzare."
#: editor/editor_profiler.cpp
msgid "Frame #:"
@@ -3641,6 +3680,10 @@ msgstr ""
"La risorsa selezionata (%s) non corrisponde ad alcun tipo previsto per "
"questa proprietà (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
#, fuzzy
msgid "Make Unique"
@@ -3738,11 +3781,11 @@ msgstr "Importa Da Nodo:"
#: editor/export_template_manager.cpp
msgid "Open the folder containing these templates."
-msgstr ""
+msgstr "Apre la cartella che contiene questi modelli."
#: editor/export_template_manager.cpp
msgid "Uninstall these templates."
-msgstr ""
+msgstr "Disinstalla questi modelli."
#: editor/export_template_manager.cpp
#, fuzzy
@@ -3756,7 +3799,7 @@ msgstr "Recupero dei mirror, attendi..."
#: editor/export_template_manager.cpp
msgid "Starting the download..."
-msgstr ""
+msgstr "Avviando lo scaricamento..."
#: editor/export_template_manager.cpp
msgid "Error requesting URL:"
@@ -3799,7 +3842,7 @@ msgstr "Richiesta fallita."
#: editor/export_template_manager.cpp
msgid "Download complete; extracting templates..."
-msgstr ""
+msgstr "Scaricamento completato; estraendo i modelli..."
#: editor/export_template_manager.cpp
msgid "Cannot remove temporary file:"
@@ -3826,7 +3869,7 @@ msgstr ""
#: editor/export_template_manager.cpp
msgid "Best available mirror"
-msgstr ""
+msgstr "Miglior mirror disponibile"
#: editor/export_template_manager.cpp
msgid ""
@@ -3925,11 +3968,11 @@ msgstr "Versione Corrente:"
#: editor/export_template_manager.cpp
msgid "Export templates are missing. Download them or install from a file."
-msgstr ""
+msgstr "Modelli d'eportazione mancanti. Scaricarli o installarli da un file."
#: editor/export_template_manager.cpp
msgid "Export templates are installed and ready to be used."
-msgstr ""
+msgstr "I modelli d'esportazione sono installati e pronti all'uso."
#: editor/export_template_manager.cpp
#, fuzzy
@@ -3939,6 +3982,7 @@ msgstr "Apri file"
#: editor/export_template_manager.cpp
msgid "Open the folder containing installed templates for the current version."
msgstr ""
+"Apre la cartella contenente i modelli installati per la versione corrente."
#: editor/export_template_manager.cpp
msgid "Uninstall"
@@ -3966,13 +4010,15 @@ msgstr "Copia Errore"
#: editor/export_template_manager.cpp
msgid "Download and Install"
-msgstr ""
+msgstr "Scarica e installa"
#: editor/export_template_manager.cpp
msgid ""
"Download and install templates for the current version from the best "
"possible mirror."
msgstr ""
+"Scarica e installa i modelli per la versione corrente dal miglior mirror "
+"possibile."
#: editor/export_template_manager.cpp
msgid "Official export templates aren't available for development builds."
@@ -4023,6 +4069,8 @@ msgid ""
"The templates will continue to download.\n"
"You may experience a short editor freeze when they finish."
msgstr ""
+"I modelli continueranno a scaricare.\n"
+"L'editor potrebbe bloccarsi brevemente a scaricamento finito."
#: editor/filesystem_dock.cpp
msgid "Favorites"
@@ -4176,19 +4224,19 @@ msgstr "Cerca file"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Ascending)"
-msgstr ""
+msgstr "Ordina per nome (crescente)"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Descending)"
-msgstr ""
+msgstr "Ordina per nome (decrescente)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Ascending)"
-msgstr ""
+msgstr "Ordina per tipo (crescente)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Descending)"
-msgstr ""
+msgstr "Ordina per tipo (decrescente)"
#: editor/filesystem_dock.cpp
#, fuzzy
@@ -4210,7 +4258,7 @@ msgstr "Rinomina..."
#: editor/filesystem_dock.cpp
msgid "Focus the search box"
-msgstr ""
+msgstr "Seleziona la barra di ricerca"
#: editor/filesystem_dock.cpp
msgid "Previous Folder/File"
@@ -4511,8 +4559,8 @@ msgstr "Cambiare il tipo di un file importato richiede il riavvio dell'editor."
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
-"ATTENZIONE: Esistono degli elementi che utilizzano questa risorsa, "
-"potrebbero non essere più caricati correttamente."
+"ATTENZIONE: Esistono dei contenuti che utilizzano questa risorsa, potrebbero "
+"non essere più caricati correttamente."
#: editor/inspector_dock.cpp
msgid "Failed to load resource."
@@ -5495,7 +5543,7 @@ msgstr "Check has SHA-256 fallito"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr "Errore di Download Asset:"
+msgstr "Errore di scaricamento del contenuto:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Downloading (%s / %s)..."
@@ -5531,7 +5579,7 @@ msgstr "Errore durante il download"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr "Il download per questo asset è già in corso!"
+msgstr "Lo scaricamento di questo contenuto è già in corso!"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Recently Updated"
@@ -5579,11 +5627,11 @@ msgstr "Tutti"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search templates, projects, and demos"
-msgstr ""
+msgstr "Cerca tra modelli, progetti e demo"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search assets (excluding templates, projects, and demos)"
-msgstr ""
+msgstr "Cerca tra i contenuti (escludendo modelli, progetti e demo)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Import..."
@@ -5623,11 +5671,11 @@ msgstr "Caricamento…"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
-msgstr "ZIP File degli Asset"
+msgstr "File ZIP dei contenuti"
#: editor/plugins/audio_stream_editor_plugin.cpp
msgid "Audio Preview Play/Pause"
-msgstr ""
+msgstr "Avvia/Pausa l'anteprima audio"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5791,6 +5839,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Sposta CanvasItem \"%s\" a (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Blocca selezionato"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Gruppo"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -5907,6 +5967,9 @@ msgid ""
"No project instance running. Run the project from the editor to use this "
"feature."
msgstr ""
+"Sovrascrivi la camera del progetto\n"
+"Nessuna istanza del progetto avviata. Eseguire il progetto dall'editor per "
+"utilizzare questa funzionalità."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5998,7 +6061,7 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "RMB: Add node at position clicked."
-msgstr ""
+msgstr "Click destro: aggiungi un nodo sulla posizione cliccata."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6276,15 +6339,15 @@ msgstr "Trasla Visuale"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 3.125%"
-msgstr ""
+msgstr "Ingrandisci al 3.125%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 6.25%"
-msgstr ""
+msgstr "Ingrandisci al 6.25%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 12.5%"
-msgstr ""
+msgstr "Ingrandisci al 12.5%"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -6318,7 +6381,7 @@ msgstr "Rimpicciolisci"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 1600%"
-msgstr ""
+msgstr "Ingrandisci al 1600%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
@@ -6447,6 +6510,7 @@ msgid "Flat 0"
msgstr "Flat 0"
#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Flat 1"
msgstr "Flat 1"
@@ -6686,6 +6750,9 @@ msgid ""
"This is similar to single collision shape, but can result in a simpler "
"geometry in some cases, at the cost of accuracy."
msgstr ""
+"Crea una forma di collisione convessa semplificata.\n"
+"Essa è simile a una forma di collisione singola ma in alcuni casi può "
+"risultare in una geometria più semplice al costo di risultare inaccurata."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Multiple Convex Collision Siblings"
@@ -6767,7 +6834,13 @@ msgid "Remove Selected Item"
msgstr "Rimuovi Elementi Selezionati"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Importa da Scena"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Importa da Scena"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7367,6 +7440,16 @@ msgstr "Conteggio Punti Generati:"
msgid "Flip Portal"
msgstr "Ribalta orizzontalmente"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Azzera la trasformazione"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Crea Nodo"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "AnimationTree non ha nessun percorso impostato a un AnimationPlayer"
@@ -7874,12 +7957,14 @@ msgid "Skeleton2D"
msgstr "Skeleton2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Crea Posizione di Riposo (Dalle Ossa)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Imposta Ossa in Posizione di Riposo"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Imposta Ossa in Posizione di Riposo"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Sovrascrivi Scena esistente"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7906,6 +7991,71 @@ msgid "Perspective"
msgstr "Prospettiva"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ortogonale"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Prospettiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ortogonale"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Prospettiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ortogonale"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Prospettiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ortogonale"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ortogonale"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Prospettiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ortogonale"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Prospettiva"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Transform Abortito."
@@ -7973,7 +8123,7 @@ msgstr "Inclinazione"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Yaw:"
-msgstr ""
+msgstr "Imbardata:"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
@@ -8012,7 +8162,7 @@ msgstr "Vertici"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "FPS: %d (%s ms)"
-msgstr ""
+msgstr "FPS: %d (%s ms)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
@@ -8023,42 +8173,22 @@ msgid "Bottom View."
msgstr "Vista dal basso."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Basso"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Vista da sinistra."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Sinistra"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Vista da destra."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Destra"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Vista frontale."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Fronte"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Vista dal retro."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Retro"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Allinea la trasformazione con la vista"
@@ -8340,6 +8470,11 @@ msgid "View Portal Culling"
msgstr "Impostazioni Viewport"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Impostazioni Viewport"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Impostazioni…"
@@ -8409,8 +8544,9 @@ msgid "Post"
msgstr "Post"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Gizmo senza nome"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Progetto Senza Nome"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8686,7 +8822,7 @@ msgstr "Stile Box"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} color(s)"
-msgstr ""
+msgstr "{num} colori"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8704,8 +8840,9 @@ msgid "No constants found."
msgstr "Costante di colore."
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "{num} font(s)"
-msgstr ""
+msgstr "{num} caratteri"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8714,7 +8851,7 @@ msgstr "Non trovato!"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} icon(s)"
-msgstr ""
+msgstr "{num} icone"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8723,7 +8860,7 @@ msgstr "Non trovato!"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} stylebox(es)"
-msgstr ""
+msgstr "{num} stylebox"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8732,7 +8869,7 @@ msgstr "Nessuna sottorisorsa trovata."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} currently selected"
-msgstr ""
+msgstr "{num} selezionati"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Nothing was selected for the import."
@@ -11134,8 +11271,8 @@ msgid ""
"Can't run project: Assets need to be imported.\n"
"Please edit the project to trigger the initial import."
msgstr ""
-"Impossibile eseguire il progetto: le Risorse devono essere importate.\n"
-"Per favore modifica il progetto per azionare l'importo iniziale."
+"Impossibile eseguire il progetto: i contenuti devono essere importati.\n"
+"Per favore modifica il progetto per avviare l'importazione iniziale."
#: editor/project_manager.cpp
msgid "Are you sure to run %d projects at once?"
@@ -11241,9 +11378,8 @@ msgid "About"
msgstr "Informazioni su Godot"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Asset Library Projects"
-msgstr "Libreria degli asset"
+msgstr "Progetti della libreria dei contenuti"
#: editor/project_manager.cpp
msgid "Restart Now"
@@ -11266,8 +11402,8 @@ msgid ""
"You currently don't have any projects.\n"
"Would you like to explore official example projects in the Asset Library?"
msgstr ""
-"Al momento non hai nessun progetto.\n"
-"Ti piacerebbe esplorare gli esempi ufficiali nella libreria degli Asset?"
+"Al momento non esiste alcun progetto.\n"
+"Esplorare i progetti di esempio ufficiali nella libreria dei contenuti?"
#: editor/project_manager.cpp
#, fuzzy
@@ -12630,6 +12766,16 @@ msgstr "Imposta Posizione Punto Curva"
msgid "Set Portal Point Position"
msgstr "Imposta Posizione Punto Curva"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Modifica Raggio di Forma del Cilindro"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Imposta Curva In Posizione"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "Modifica Raggio del Cilindro"
@@ -12916,6 +13062,11 @@ msgstr "Stampando le lightmap"
msgid "Class name can't be a reserved keyword"
msgstr "Il nome della classe non può essere una parola chiave riservata"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Riempi Selezione"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Fine dell'analisi dell’eccezione interna dello stack"
@@ -13402,78 +13553,78 @@ msgstr "Ricerca VisualScript"
msgid "Get %s"
msgstr "Ottieni %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Il nome del pacchetto è mancante."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "I segmenti del pacchetto devono essere di lunghezza diversa da zero."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
"Il carattere \"%s\" non è consentito nei nomi dei pacchetti delle "
"applicazioni Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
"Una cifra non può essere il primo carattere di un segmento di un pacchetto."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
"Il carattere \"%s\" non può essere il primo carattere di un segmento di "
"pacchetto."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "Il pacchetto deve avere almeno un \".\" separatore."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Seleziona il dispositivo dall'elenco"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Esportando Tutto"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Disinstalla"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Caricamento, per favore attendere..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Impossibile istanziare la scena!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Eseguendo Script Personalizzato..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Impossibile creare la cartella."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "Impossibile trovare lo strumento \"apksigner\"."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13481,72 +13632,72 @@ msgstr ""
"Il template build di Android non è installato in questo progetto. Installalo "
"dal menu Progetto."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Debug keystore non configurato nelle Impostazioni dell'Editor né nel preset."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"Release keystore non configurato correttamente nel preset di esportazione."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"Un percorso valido per il SDK Android è richiesto nelle Impostazioni Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "Un percorso invalido per il SDK Android nelle Impostazioni Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "Cartella \"platform-tools\" inesistente!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
"Impossibile trovare il comando adb negli strumenti di piattaforma del SDK "
"Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Per favore, controlla la directory specificata del SDK Android nelle "
"Impostazioni Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "Cartella \"build-tools\" inesistente!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
"Impossibile trovare il comando apksigner negli strumenti di piattaforma del "
"SDK Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Chiave pubblica non valida per l'espansione dell'APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Nome del pacchetto non valido:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13554,38 +13705,23 @@ msgstr ""
"Modulo \"GodotPaymentV3\" non valido incluso nelle impostazione del progetto "
"\"android/moduli\" (modificato in Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "Per utilizzare i plugin \"Use Custom Build\" deve essere abilitato."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Degrees Of Freedom\" è valido solamente quando \"Xr Mode\" è \"Oculus "
-"Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"Hand Tracking\" è valido solo quando \"Xr Mode\" è impostato su \"Oculus "
"Mobile VR\"."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Focus Awareness\" è valido solo quando \"Xr Mode\" è impostato su \"Oculus "
-"Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"\"Export AAB\" è valido soltanto quanto \"Use Custom Build\" è abilitato."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13593,57 +13729,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Scansione File,\n"
"Si prega di attendere..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "Impossibile aprire il template per l'esportazione:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Aggiungendo %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Esportazione per Android"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr "Nome file invalido! Il Bundle Android App richiede l'estensione *.aab."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "L'estensione APK non è compatibile con il Bundle Android App."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "Nome file invalido! L'APK Android richiede l'estensione *.apk."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13652,7 +13788,7 @@ msgstr ""
"informazione sulla sua versione esiste. Perfavore, reinstallalo dal menu "
"\"Progetto\"."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13664,26 +13800,26 @@ msgstr ""
" Versione Godot: %s\n"
"Perfavore, reinstalla il build template di Android dal menu \"Progetto\"."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "Impossibile creare project.godot nel percorso di progetto."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "Impossibile scrivere il file:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Compilazione di un progetto Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13693,11 +13829,11 @@ msgstr ""
"In alternativa, visita docs.godotengine.org per la documentazione della "
"build Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "Spostando l'output"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13705,24 +13841,24 @@ msgstr ""
"Impossibile copiare e rinominare il file di esportazione, controlla la "
"directory del progetto gradle per gli output."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Animazione non trovata: \"%s\""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Creazione contorni..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "Impossibile aprire il template per l'esportazione:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13730,21 +13866,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Aggiungendo %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Impossibile scrivere il file:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14308,6 +14444,14 @@ msgstr ""
"NavigationMeshInstance deve essere un figlio o nipote di un nodo Navigation. "
"Fornisce solamente dati per la navigazione."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14633,6 +14777,14 @@ msgstr "È necessaria un'estensione valida."
msgid "Enable grid minimap."
msgstr "Abilita mini-mappa griglia."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14688,6 +14840,10 @@ msgstr ""
"La dimensione del Viewport deve essere maggiore di 0 affinché qualcosa sia "
"visibile."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14742,6 +14898,41 @@ msgstr "Assegnazione all'uniforme."
msgid "Constants cannot be modified."
msgstr "Le constanti non possono essere modificate."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Crea Posizione di Riposo (Dalle Ossa)"
+
+#~ msgid "Bottom"
+#~ msgstr "Basso"
+
+#~ msgid "Left"
+#~ msgstr "Sinistra"
+
+#~ msgid "Right"
+#~ msgstr "Destra"
+
+#~ msgid "Front"
+#~ msgstr "Fronte"
+
+#~ msgid "Rear"
+#~ msgstr "Retro"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Gizmo senza nome"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Degrees Of Freedom\" è valido solamente quando \"Xr Mode\" è \"Oculus "
+#~ "Mobile VR\"."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Focus Awareness\" è valido solo quando \"Xr Mode\" è impostato su "
+#~ "\"Oculus Mobile VR\"."
+
#~ msgid "Package Contents:"
#~ msgstr "Contenuti del pacchetto:"
@@ -16709,9 +16900,6 @@ msgstr "Le constanti non possono essere modificate."
#~ msgid "Images:"
#~ msgstr "Immagini:"
-#~ msgid "Group"
-#~ msgstr "Gruppo"
-
#~ msgid "Sample Conversion Mode: (.wav files):"
#~ msgstr "Modalità Conversione Sample (file .wav):"
@@ -16845,9 +17033,6 @@ msgstr "Le constanti non possono essere modificate."
#~ "le opzioni di esportazione successivamente. Gli atlas possono essere "
#~ "anche generati in esportazione."
-#~ msgid "Overwrite Existing Scene"
-#~ msgstr "Sovrascrivi Scena esistente"
-
#~ msgid "Overwrite Existing, Keep Materials"
#~ msgstr "Sovrascrivi Esistente, Mantieni Materiali"
diff --git a/editor/translations/ja.po b/editor/translations/ja.po
index 3ee6d0b49d..20cd8fc7da 100644
--- a/editor/translations/ja.po
+++ b/editor/translations/ja.po
@@ -33,12 +33,13 @@
# sporeball <sporeballdev@gmail.com>, 2020.
# BinotaLIU <me@binota.org>, 2020, 2021.
# 都築 æœ¬æˆ <motonari728@gmail.com>, 2021.
+# Nanjakkun <nanjakkun@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-08-12 14:48+0000\n"
-"Last-Translator: sugusan <sugusan.development@gmail.com>\n"
+"PO-Revision-Date: 2021-09-11 20:05+0000\n"
+"Last-Translator: nitenook <admin@alterbaum.net>\n"
"Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/"
"godot/ja/>\n"
"Language: ja\n"
@@ -46,7 +47,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -55,7 +56,7 @@ msgstr "convert() ã®å¼•æ•°ã®åž‹ãŒç„¡åйã§ã™ã€‚TYPE_* 定数を使用ã—ã¦ã
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
msgid "Expected a string of length 1 (a character)."
-msgstr "é•·ã•㌠1 ã®æ–‡å­—列 (文字) ãŒå¿…è¦ã§ã™ã€‚"
+msgstr "é•·ã•ãŒ1ã®æ–‡å­—列 (文字) ãŒå¿…è¦ã§ã™ã€‚"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/mono/glue/gd_glue.cpp
@@ -394,13 +395,11 @@ msgstr "アニメーション挿入"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "'..'を処ç†ã§ãã¾ã›ã‚“"
+msgstr "ノード '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
msgstr "アニメーション"
@@ -412,9 +411,8 @@ msgstr ""
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "プロパティ '%s' ã¯å­˜åœ¨ã—ã¾ã›ã‚“。"
+msgstr "プロパティ '%s'"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -459,7 +457,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Not possible to add a new track without a root"
-msgstr "root ãŒç„¡ã‘ã‚Œã°æ–°è¦ãƒˆãƒ©ãƒƒã‚¯ã¯è¿½åŠ ã§ãã¾ã›ã‚“"
+msgstr "ルートãªã—ã§æ–°è¦ãƒˆãƒ©ãƒƒã‚¯ã¯è¿½åŠ ã§ãã¾ã›ã‚“"
#: editor/animation_track_editor.cpp
msgid "Invalid track for Bezier (no suitable sub-properties)"
@@ -504,7 +502,7 @@ msgstr "アニメーションキーã®ç§»å‹•"
#: editor/animation_track_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Clipboard is empty!"
-msgstr "クリップボードã¯ç©ºã§ã™!"
+msgstr "クリップボードã¯ç©ºã§ã™ï¼"
#: editor/animation_track_editor.cpp
msgid "Paste Tracks"
@@ -625,7 +623,6 @@ msgid "Go to Previous Step"
msgstr "å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã¸"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Apply Reset"
msgstr "リセット"
@@ -684,7 +681,7 @@ msgstr "ã™ã¹ã¦ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’クリーンアップ"
#: editor/animation_track_editor.cpp
msgid "Clean-Up Animation(s) (NO UNDO!)"
-msgstr "アニメーションをクリーンアップ (å…ƒã«æˆ»ã›ã¾ã›ã‚“!)"
+msgstr "アニメーションをクリーンアップ (å…ƒã«æˆ»ã›ã¾ã›ã‚“ï¼)"
#: editor/animation_track_editor.cpp
msgid "Clean-Up"
@@ -971,9 +968,8 @@ msgid "Edit..."
msgstr "編集..."
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Go to Method"
-msgstr "メソッドã¸è¡Œã"
+msgstr "メソッドã¸ç§»å‹•"
#: editor/create_dialog.cpp
msgid "Change %s Type"
@@ -1053,7 +1049,7 @@ msgstr ""
msgid "Dependencies"
msgstr "ä¾å­˜é–¢ä¿‚"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "リソース"
@@ -1093,17 +1089,16 @@ msgid "Owners Of:"
msgstr "次ã®ã‚ªãƒ¼ãƒŠãƒ¼:"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"Remove the selected files from the project? (Cannot be undone.)\n"
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
-"é¸æŠžã—ãŸãƒ•ァイルをプロジェクトã‹ã‚‰å‰Šé™¤ã—ã¾ã™ã‹ï¼Ÿ(å–り消ã—ã¯ã§ãã¾ã›ã‚“)\n"
-"削除ã•れãŸãƒ•ァイルã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã®ã‚´ãƒŸç®±ã«ã‚ã‚‹ã®ã§å¾©å…ƒã§ãã¾ã™ã€‚"
+"é¸æŠžã—ãŸãƒ•ァイルをプロジェクトã‹ã‚‰å‰Šé™¤ã—ã¾ã™ã‹ï¼Ÿ (å–り消ã—ã¯ã§ãã¾ã›ã‚“。)\n"
+"ファイルシステムã®è¨­å®šã«å¿œã˜ã¦ã€ãã®ãƒ•ァイルã¯ã‚·ã‚¹ãƒ†ãƒ ã®ã‚´ãƒŸç®±ã«ç§»å‹•ã•れる"
+"ã‹ã€æ°¸ä¹…ã«å‰Šé™¤ã•れã¾ã™ã€‚"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"The files being removed are required by other resources in order for them to "
"work.\n"
@@ -1112,8 +1107,9 @@ msgid ""
"to the system trash or deleted permanently."
msgstr ""
"除去ã—よã†ã¨ã—ã¦ã„るファイルã¯ä»–ã®ãƒªã‚½ãƒ¼ã‚¹ã®å‹•作ã«å¿…è¦ã§ã™ã€‚\n"
-"無視ã—ã¦é™¤åŽ»ã—ã¾ã™ã‹ï¼Ÿ(å–り消ã—ã¯ã§ãã¾ã›ã‚“)\n"
-"削除ã•れãŸãƒ•ァイルã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã®ã‚´ãƒŸç®±ã«ã‚ã‚‹ã®ã§å¾©å…ƒã§ãã¾ã™ã€‚"
+"ãれã§ã‚‚除去ã—ã¾ã™ã‹ï¼Ÿ(å–り消ã—ã¯ã§ãã¾ã›ã‚“。)\n"
+"ファイルシステムã®è¨­å®šã«å¿œã˜ã¦ã€ãã®ãƒ•ァイルã¯ã‚·ã‚¹ãƒ†ãƒ ã®ã‚´ãƒŸç®±ã«ç§»å‹•ã•れる"
+"ã‹ã€æ°¸ä¹…ã«å‰Šé™¤ã•れã¾ã™ã€‚"
#: editor/dependency_editor.cpp
msgid "Cannot remove:"
@@ -1133,7 +1129,7 @@ msgstr "ã¨ã«ã‹ãé–‹ã"
#: editor/dependency_editor.cpp
msgid "Which action should be taken?"
-msgstr "ã©ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã—ã¾ã™ã‹?"
+msgstr "ã©ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/dependency_editor.cpp
msgid "Fix Dependencies"
@@ -1169,7 +1165,7 @@ msgstr "所有"
#: editor/dependency_editor.cpp
msgid "Resources Without Explicit Ownership:"
-msgstr "æ‰€æœ‰æ¨©ãŒæ˜Žç¤ºã•れã¦ã„ãªã„リソース:"
+msgstr "æ‰€æœ‰æ¨©ãŒæ˜Žç¤ºçš„ã§ãªã„リソース:"
#: editor/dictionary_property_edit.cpp
msgid "Change Dictionary Key"
@@ -1283,42 +1279,36 @@ msgid "Licenses"
msgstr "ライセンス文書"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Error opening asset file for \"%s\" (not in ZIP format)."
-msgstr ""
-"パッケージ ファイルを開ãã¨ãã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—㟠(ZIPå½¢å¼ã§ã¯ã‚りã¾ã›ã‚“)。"
+msgstr "\"%s\" ã®ã‚¢ã‚»ãƒƒãƒˆãƒ•ァイルを開ã‘ã¾ã›ã‚“ (ZIPå½¢å¼ã§ã¯ã‚りã¾ã›ã‚“)。"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "%s (already exists)"
-msgstr "%s (ã™ã§ã«å­˜åœ¨ã—ã¾ã™)"
+msgstr "%s (ã™ã§ã«å­˜åœ¨ã™ã‚‹)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
-msgstr ""
+msgstr "アセットã®å†…容 \"%s\" - %d 個ã®ãƒ•ァイルãŒãƒ—ロジェクトã¨ç«¶åˆã—ã¾ã™:"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - No files conflict with your project:"
-msgstr ""
+msgstr "アセットã®å†…容 \"%s\" - %d 個ã®ãƒ•ァイルãŒãƒ—ロジェクトã¨ç«¶åˆã—ã¾ã™:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
msgstr "アセットを展開"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "The following files failed extraction from asset \"%s\":"
-msgstr "次ã®ãƒ•ァイルをパッケージã‹ã‚‰æŠ½å‡ºã§ãã¾ã›ã‚“ã§ã—ãŸ:"
+msgstr "次ã®ãƒ•ァイルをアセット \"%s\" ã‹ã‚‰å±•é–‹ã§ãã¾ã›ã‚“ã§ã—ãŸ:"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "(and %s more files)"
-msgstr "ãŠã‚ˆã³ %s 個ã®ãƒ•ァイル。"
+msgstr "(ãŠã‚ˆã³ %s 個ã®ãƒ•ァイル)"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset \"%s\" installed successfully!"
-msgstr "パッケージã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã«æˆåŠŸã—ã¾ã—ãŸ!"
+msgstr "アセット \"%s\" ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã«æˆåŠŸã—ã¾ã—ãŸï¼"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -1330,9 +1320,8 @@ msgid "Install"
msgstr "インストール"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset Installer"
-msgstr "パッケージインストーラ"
+msgstr "アセットインストーラー"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
@@ -1395,7 +1384,6 @@ msgid "Bypass"
msgstr "ãƒã‚¤ãƒ‘ス"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Bus Options"
msgstr "ãƒã‚¹ オプション"
@@ -1563,13 +1551,12 @@ msgid "Can't add autoload:"
msgstr "自動読ã¿è¾¼ã¿ã‚’追加出æ¥ã¾ã›ã‚“:"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "%s is an invalid path. File does not exist."
-msgstr "ファイルãŒå­˜åœ¨ã—ã¾ã›ã‚“。"
+msgstr "%s ã¯ç„¡åйãªãƒ‘スã§ã™ã€‚ファイルãŒå­˜åœ¨ã—ã¾ã›ã‚“。"
#: editor/editor_autoload_settings.cpp
msgid "%s is an invalid path. Not in resource path (res://)."
-msgstr ""
+msgstr "%s ã¯ç„¡åйãªãƒ‘スã§ã™ã€‚リソースパス (res://) ã«å­˜åœ¨ã—ã¾ã›ã‚“。"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1593,9 +1580,8 @@ msgid "Name"
msgstr "åå‰"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Global Variable"
-msgstr "変数"
+msgstr "グローãƒãƒ«å¤‰æ•°"
#: editor/editor_data.cpp
msgid "Paste Params"
@@ -1688,8 +1674,8 @@ msgid ""
msgstr ""
"対象プラットフォームã§ã¯GLES2ã¸ãƒ•ォールãƒãƒƒã‚¯ã™ã‚‹ãŸã‚ã«'ETC'テクスãƒãƒ£åœ§ç¸®ãŒ"
"å¿…è¦ã§ã™ã€‚\n"
-"プロジェクト設定より 'Import Etc' をオンã«ã™ã‚‹ã‹ã€'Fallback To Gles 2' をオフ"
-"ã«ã—ã¦ãã ã•ã„。"
+"プロジェクト設定より 'Import Etc' をオンã«ã™ã‚‹ã‹ã€'Driver Fallback Enabled' "
+"をオフã«ã—ã¦ãã ã•ã„。"
#: editor/editor_export.cpp
msgid ""
@@ -1720,13 +1706,13 @@ msgstr ""
"プロジェクト設定より 'Import Pvrtc' をオンã«ã™ã‚‹ã‹ã€'Driver Fallback "
"Enabled' をオフã«ã—ã¦ãã ã•ã„。"
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "カスタム デãƒãƒƒã‚°ãƒ†ãƒ³ãƒ—レートãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。"
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1771,48 +1757,50 @@ msgstr "インãƒãƒ¼ãƒˆãƒ‰ãƒƒã‚¯"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
-msgstr ""
+msgstr "3Dシーンã®è¡¨ç¤ºã¨ç·¨é›†ãŒã§ãã¾ã™ã€‚"
#: editor/editor_feature_profile.cpp
msgid "Allows to edit scripts using the integrated script editor."
-msgstr ""
+msgstr "内臓ã®ã‚¹ã‚¯ãƒªãƒ—トエディタを使用ã—ã¦ã‚¹ã‚¯ãƒªãƒ—トを編集ã§ãã¾ã™ã€‚"
#: editor/editor_feature_profile.cpp
msgid "Provides built-in access to the Asset Library."
-msgstr ""
+msgstr "アセットライブラリã¸ã®çµ„ã¿è¾¼ã¿ã®ã‚¢ã‚¯ã‚»ã‚¹æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚"
#: editor/editor_feature_profile.cpp
msgid "Allows editing the node hierarchy in the Scene dock."
-msgstr ""
+msgstr "シーンドックã®ãƒŽãƒ¼ãƒ‰éšŽå±¤ã‚’編集ã§ãã¾ã™ã€‚"
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to work with signals and groups of the node selected in the Scene "
"dock."
-msgstr ""
+msgstr "シーンドックã§é¸æŠžã•れãŸãƒŽãƒ¼ãƒ‰ã®ã‚·ã‚°ãƒŠãƒ«ã¨ã‚°ãƒ«ãƒ¼ãƒ—ã‚’æ“作ã§ãã¾ã™ã€‚"
#: editor/editor_feature_profile.cpp
msgid "Allows to browse the local file system via a dedicated dock."
-msgstr ""
+msgstr "専用ã®ãƒ‰ãƒƒã‚¯ã‚’使用ã—ã¦ã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ァイルシステムを閲覧ã§ãã¾ã™ã€‚"
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to configure import settings for individual assets. Requires the "
"FileSystem dock to function."
msgstr ""
+"å„アセットã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆè¨­å®šã‚’æ§‹æˆã§ãã¾ã™ã€‚動作ã«ã¯ãƒ•ァイルシステム ドッグãŒå¿…"
+"è¦ã§ã™ã€‚"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(current)"
msgstr "(ç¾åœ¨)"
#: editor/editor_feature_profile.cpp
msgid "(none)"
-msgstr ""
+msgstr "(ãªã—)"
#: editor/editor_feature_profile.cpp
msgid "Remove currently selected profile, '%s'? Cannot be undone."
msgstr ""
+"é¸æŠžã•れã¦ã„るプロファイル '%s' を除去ã—ã¾ã™ã‹ï¼Ÿ å–り消ã—ã¯ã§ãã¾ã›ã‚“。"
#: editor/editor_feature_profile.cpp
msgid "Profile must be a valid filename and must not contain '.'"
@@ -1844,19 +1832,16 @@ msgid "Enable Contextual Editor"
msgstr "コンテキストエディタを有効ã«ã™ã‚‹"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Properties:"
-msgstr "プロパティ:"
+msgstr "クラス プロパティ:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Main Features:"
-msgstr "機能"
+msgstr "ä¸»è¦æ©Ÿèƒ½:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Nodes and Classes:"
-msgstr "クラスを有効ã«ã™ã‚‹:"
+msgstr "ノードã¨ã‚¯ãƒ©ã‚¹:"
#: editor/editor_feature_profile.cpp
msgid "File '%s' format is invalid, import aborted."
@@ -1875,23 +1860,20 @@ msgid "Error saving profile to path: '%s'."
msgstr "指定ã•れãŸãƒ‘スã¸ã®ä¿å­˜ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ: '%s'."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Reset to Default"
-msgstr "デフォルトã«ãƒªã‚»ãƒƒãƒˆã™ã‚‹"
+msgstr "ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã«æˆ»ã™"
#: editor/editor_feature_profile.cpp
msgid "Current Profile:"
msgstr "ç¾åœ¨ã®ãƒ—ロファイル:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Create Profile"
-msgstr "プロファイルを消去"
+msgstr "プロファイルを作æˆ"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Remove Profile"
-msgstr "タイルを除去"
+msgstr "プロファイルを除去"
#: editor/editor_feature_profile.cpp
msgid "Available Profiles:"
@@ -1899,7 +1881,7 @@ msgstr "利用å¯èƒ½ãªãƒ—ロファイル:"
#: editor/editor_feature_profile.cpp
msgid "Make Current"
-msgstr "最新ã«ã™ã‚‹"
+msgstr "使用ã™ã‚‹"
#: editor/editor_feature_profile.cpp editor/editor_node.cpp
#: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp
@@ -1911,18 +1893,18 @@ msgid "Export"
msgstr "エクスãƒãƒ¼ãƒˆ"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Configure Selected Profile:"
-msgstr "ç¾åœ¨ã®ãƒ—ロファイル:"
+msgstr "é¸æŠžã•れãŸãƒ—ロファイルã®è¨­å®š:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Extra Options:"
-msgstr "テクスãƒãƒ£ã€€ã‚ªãƒ—ション"
+msgstr "追加ã®ã‚ªãƒ—ション:"
#: editor/editor_feature_profile.cpp
msgid "Create or import a profile to edit available classes and properties."
msgstr ""
+"プロファイルを作æˆã¾ãŸã¯ã‚¤ãƒ³ãƒãƒ¼ãƒˆã—ã¦ã€åˆ©ç”¨å¯èƒ½ãªã‚¯ãƒ©ã‚¹ã‚„プロパティを編集ã§"
+"ãã¾ã™ã€‚"
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
@@ -1949,7 +1931,6 @@ msgid "Select Current Folder"
msgstr "ç¾åœ¨ã®ãƒ•ã‚©ãƒ«ãƒ€ã‚’é¸æŠž"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "File exists, overwrite?"
msgstr "ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ—¢ã«å­˜åœ¨ã—ã¾ã™ã€‚上書ãã—ã¾ã™ã‹ï¼Ÿ"
@@ -2065,7 +2046,7 @@ msgstr "親フォルダã¸ç§»å‹•ã™ã‚‹ã€‚"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Refresh files."
-msgstr "ファイル更新。"
+msgstr "ファイルã®ä¸€è¦§ã‚’リフレッシュã™ã‚‹ã€‚"
#: editor/editor_file_dialog.cpp
msgid "(Un)favorite current folder."
@@ -2112,7 +2093,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "アセットを(å†)インãƒãƒ¼ãƒˆä¸­"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "トップ"
@@ -2179,7 +2160,7 @@ msgid ""
"[color=$color][url=$url]contributing one[/url][/color]!"
msgstr ""
"ç¾åœ¨ã€ã“ã®ãƒ—ロパティã®èª¬æ˜Žã¯ã‚りã¾ã›ã‚“。[color=$color][url=$url]貢献[/url][/"
-"color]ã—ã¦ç§ãŸã¡ã‚’助ã‘ã¦ãã ã•ã„!"
+"color]ã—ã¦ç§ãŸã¡ã‚’助ã‘ã¦ãã ã•ã„ï¼"
#: editor/editor_help.cpp
msgid "Method Descriptions"
@@ -2191,7 +2172,7 @@ msgid ""
"$color][url=$url]contributing one[/url][/color]!"
msgstr ""
"ç¾åœ¨ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®èª¬æ˜Žã¯ã‚りã¾ã›ã‚“。[color=$color][url=$url]貢献[/url][/"
-"color]ã—ã¦ç§ãŸã¡ã‚’助ã‘ã¦ãã ã•ã„!"
+"color]ã—ã¦ç§ãŸã¡ã‚’助ã‘ã¦ãã ã•ã„ï¼"
#: editor/editor_help_search.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -2349,6 +2330,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"エディタウィンドウã®å†æç”»æ™‚ã«ã‚¹ãƒ”ンã—ã¾ã™ã€‚\n"
+"ç¶™ç¶šçš„ã«æ›´æ–° ãŒæœ‰åйã«ãªã£ã¦ãŠã‚Šã€é›»åŠ›æ¶ˆè²»é‡ãŒå¢—加ã™ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚クリッ"
+"クã§ç„¡åŠ¹åŒ–ã—ã¾ã™ã€‚"
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2427,7 +2411,7 @@ msgstr "サムãƒã‚¤ãƒ«ã‚’作æˆ"
#: editor/editor_node.cpp
msgid "This operation can't be done without a tree root."
-msgstr "ã“ã®æ“作ã¯ã€ãƒ„リー㮠root ãªã—ã§ã¯å®Ÿè¡Œã§ãã¾ã›ã‚“。"
+msgstr "ã“ã®æ“作ã¯ã€ãƒ„リーã®ãƒ«ãƒ¼ãƒˆãªã—ã§å®Ÿè¡Œã§ãã¾ã›ã‚“。"
#: editor/editor_node.cpp
msgid ""
@@ -2447,7 +2431,7 @@ msgstr ""
#: editor/editor_node.cpp editor/scene_tree_dock.cpp
msgid "Can't overwrite scene that is still open!"
-msgstr "é–‹ã„ã¦ã„るシーンを上書ãã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“!"
+msgstr "é–‹ã„ã¦ã„るシーンを上書ãã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ï¼"
#: editor/editor_node.cpp
msgid "Can't load MeshLibrary for merging!"
@@ -2455,7 +2439,7 @@ msgstr "マージã™ã‚‹ãƒ¡ãƒƒã‚·ãƒ¥ãƒ©ã‚¤ãƒ–ラリーãŒèª­è¾¼ã‚ã¾ã›ã‚“ï¼"
#: editor/editor_node.cpp
msgid "Error saving MeshLibrary!"
-msgstr "メッシュライブラリーã®ä¿å­˜ã‚¨ãƒ©ãƒ¼!"
+msgstr "メッシュライブラリーã®ä¿å­˜ã‚¨ãƒ©ãƒ¼ï¼"
#: editor/editor_node.cpp
msgid "Can't load TileSet for merging!"
@@ -2550,7 +2534,7 @@ msgstr "実行å‰ã«ã‚·ãƒ¼ãƒ³ã‚’ä¿å­˜..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
-msgstr "サブプロセスを開始ã§ãã¾ã›ã‚“ã§ã—ãŸ!"
+msgstr "サブプロセスを開始ã§ãã¾ã›ã‚“ã§ã—ãŸï¼"
#: editor/editor_node.cpp editor/filesystem_dock.cpp
msgid "Open Scene"
@@ -2585,13 +2569,16 @@ msgid ""
"The current scene has no root node, but %d modified external resource(s) "
"were saved anyway."
msgstr ""
+"ç¾åœ¨ã®ã‚·ãƒ¼ãƒ³ã«ã¯ãƒ«ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ãŒã‚りã¾ã›ã‚“ãŒã€%d 個ã®å¤‰æ›´ã•れãŸå¤–部リソースãŒä¿"
+"å­˜ã•れã¾ã—ãŸã€‚"
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"A root node is required to save the scene. You can add a root node using the "
"Scene tree dock."
-msgstr "シーンをä¿å­˜ã™ã‚‹ã«ã¯ãƒ«ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ãŒå¿…è¦ã§ã™ã€‚"
+msgstr ""
+"シーンをä¿å­˜ã™ã‚‹ã«ã¯ãƒ«ãƒ¼ãƒˆãƒŽãƒ¼ãƒ‰ãŒå¿…è¦ã§ã™ã€‚シーンツリーã®ãƒ‰ãƒƒã‚¯ã‹ã‚‰ã€ãƒ«ãƒ¼ãƒˆ"
+"ノードを追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"
#: editor/editor_node.cpp
msgid "Save Scene As..."
@@ -2622,6 +2609,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "ç¾åœ¨ã®ã‚·ãƒ¼ãƒ³ã¯ä¿å­˜ã•れã¦ã„ã¾ã›ã‚“。ãれã§ã‚‚é–‹ãã¾ã™ã‹ï¼Ÿ"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "å…ƒã«æˆ»ã™"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "やり直ã™"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "ä¿å­˜ã•れã¦ã„ãªã„シーンを読ã¿è¾¼ã‚€ã“ã¨ã¯ã§ãã¾ã›ã‚“。"
@@ -2703,15 +2716,14 @@ msgid "Unable to load addon script from path: '%s'."
msgstr "パス '%s' ã‹ã‚‰ã‚¢ãƒ‰ã‚ªãƒ³ã‚¹ã‚¯ãƒªãƒ—トを読込ã‚ã¾ã›ã‚“。"
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"Unable to load addon script from path: '%s'. This might be due to a code "
"error in that script.\n"
"Disabling the addon at '%s' to prevent further errors."
msgstr ""
-"パス '%s' ã‹ã‚‰ã‚¢ãƒ‰ã‚ªãƒ³ã‚¹ã‚¯ãƒªãƒ—トを読ã¿è¾¼ã‚ã¾ã›ã‚“。コードã«ã‚¨ãƒ©ãƒ¼ãŒã‚ã‚‹å¯èƒ½æ€§"
-"ãŒã‚りã¾ã™ã€‚\n"
-"構文を確èªã—ã¦ãã ã•ã„。"
+"アドオンスクリプト パス: '%s' をロードã§ãã¾ã›ã‚“。ã“れã¯ã€ãã®ã‚¹ã‚¯ãƒªãƒ—トã®"
+"コードエラーãŒåŽŸå› ã®å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚\n"
+"ã•らãªã‚‹ã‚¨ãƒ©ãƒ¼ã‚’防ããŸã‚ã€%s ã®ã‚¢ãƒ‰ã‚ªãƒ³ã‚’無効化ã—ã¾ã™ã€‚"
#: editor/editor_node.cpp
msgid ""
@@ -2757,7 +2769,7 @@ msgid ""
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
-"メインシーンãŒå®šç¾©ã•れã¦ã„ã¾ã›ã‚“ã€‚é¸æŠžã—ã¾ã™ã‹?\n"
+"メインシーンãŒå®šç¾©ã•れã¦ã„ã¾ã›ã‚“ã€‚é¸æŠžã—ã¾ã™ã‹ï¼Ÿ\n"
"'アプリケーション' カテゴリã®ä¸‹ã® \"プロジェクト設定\" ã‹ã‚‰ã‚‚変更ã§ãã¾ã™ã€‚"
#: editor/editor_node.cpp
@@ -2766,7 +2778,7 @@ msgid ""
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
-"é¸æŠžã—ãŸã‚·ãƒ¼ãƒ³ '%s' ã¯å­˜åœ¨ã—ã¾ã›ã‚“。有効ãªã‚·ãƒ¼ãƒ³ã‚’é¸æŠžã—ã¾ã™ã‹?\n"
+"é¸æŠžã—ãŸã‚·ãƒ¼ãƒ³ '%s' ã¯å­˜åœ¨ã—ã¾ã›ã‚“。有効ãªã‚·ãƒ¼ãƒ³ã‚’é¸æŠžã—ã¾ã™ã‹ï¼Ÿ\n"
"'アプリケーション' カテゴリã®ä¸‹ã® \"プロジェクト設定\" ã§å¾Œã‹ã‚‰å¤‰æ›´ã§ãã¾ã™ã€‚"
#: editor/editor_node.cpp
@@ -2776,7 +2788,7 @@ msgid ""
"category."
msgstr ""
"é¸æŠžã—ãŸã‚·ãƒ¼ãƒ³ '%s' ã¯ã‚·ãƒ¼ãƒ³ãƒ•ァイルã§ã¯ã‚りã¾ã›ã‚“。有効ãªã‚·ãƒ¼ãƒ³ã‚’é¸æŠžã—ã¾ã™"
-"ã‹?\n"
+"ã‹ï¼Ÿ\n"
"'アプリケーション' カテゴリã®ä¸‹ã® \"プロジェクト設定\" ã§å¾Œã‹ã‚‰å¤‰æ›´ã§ãã¾ã™ã€‚"
#: editor/editor_node.cpp
@@ -2785,7 +2797,7 @@ msgstr "レイアウトをä¿å­˜"
#: editor/editor_node.cpp
msgid "Delete Layout"
-msgstr "レイアウトã®å‰Šé™¤"
+msgstr "レイアウトを削除"
#: editor/editor_node.cpp editor/import_dock.cpp
#: editor/script_create_dialog.cpp
@@ -2973,9 +2985,8 @@ msgid "Orphan Resource Explorer..."
msgstr "孤立リソースエクスプローラー..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reload Current Project"
-msgstr "プロジェクトåã®å¤‰æ›´"
+msgstr "ç¾åœ¨ã®ãƒ—ロジェクトをリロード"
#: editor/editor_node.cpp
msgid "Quit to Project List"
@@ -3135,22 +3146,20 @@ msgid "Help"
msgstr "ヘルプ"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Online Documentation"
-msgstr "ドキュメントを開ã"
+msgstr "オンラインドキュメント"
#: editor/editor_node.cpp
msgid "Questions & Answers"
-msgstr ""
+msgstr "è³ªå• & 回答"
#: editor/editor_node.cpp
msgid "Report a Bug"
msgstr "ãƒã‚°ã‚’報告"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Suggest a Feature"
-msgstr "値を設定ã™ã‚‹"
+msgstr "æ©Ÿèƒ½ã‚’ææ¡ˆã™ã‚‹"
#: editor/editor_node.cpp
msgid "Send Docs Feedback"
@@ -3161,9 +3170,8 @@ msgid "Community"
msgstr "コミュニティ"
#: editor/editor_node.cpp
-#, fuzzy
msgid "About Godot"
-msgstr "概è¦"
+msgstr "Godotã«ã¤ã„ã¦"
#: editor/editor_node.cpp
msgid "Support Godot Development"
@@ -3257,14 +3265,12 @@ msgid "Manage Templates"
msgstr "テンプレートã®ç®¡ç†"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Install from file"
msgstr "ファイルã‹ã‚‰ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Select android sources file"
-msgstr "ã‚½ãƒ¼ã‚¹ãƒ¡ãƒƒã‚·ãƒ¥ã‚’é¸æŠž:"
+msgstr "Androidã®ã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠž"
#: editor/editor_node.cpp
msgid ""
@@ -3312,6 +3318,11 @@ msgid "Merge With Existing"
msgstr "既存ã®(ライブラリを)マージ"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "アニメーションã®ãƒˆãƒ©ãƒ³ã‚¹ãƒ•ォームを変更"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "スクリプトを開ã„ã¦å®Ÿè¡Œ"
@@ -3321,7 +3332,7 @@ msgid ""
"What action should be taken?"
msgstr ""
"以下ã®ãƒ•ァイルより新ã—ã„ã‚‚ã®ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ã¾ã™ã€‚\n"
-"ã©ã†ã—ã¾ã™ã‹?"
+"ã©ã†ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/shader_editor_plugin.cpp
@@ -3383,9 +3394,8 @@ msgid "No sub-resources found."
msgstr "サブリソースãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/editor_path.cpp
-#, fuzzy
msgid "Open a list of sub-resources."
-msgstr "サブリソースãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚"
+msgstr "サブリソースã®ãƒªã‚¹ãƒˆã‚’é–‹ã。"
#: editor/editor_plugin.cpp
msgid "Creating Mesh Previews"
@@ -3409,15 +3419,13 @@ msgstr "インストール済プラグイン:"
#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
msgid "Update"
-msgstr "アップデート"
+msgstr "æ›´æ–°"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Version"
-msgstr "ãƒãƒ¼ã‚¸ãƒ§ãƒ³:"
+msgstr "ãƒãƒ¼ã‚¸ãƒ§ãƒ³"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Author"
msgstr "作者"
@@ -3432,14 +3440,12 @@ msgid "Measure:"
msgstr "測定:"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Frame Time (ms)"
-msgstr "フレーム時間(秒)"
+msgstr "フレーム時間 (ms)"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Average Time (ms)"
-msgstr "平凿™‚é–“(ç§’)"
+msgstr "平凿™‚é–“ (ms)"
#: editor/editor_profiler.cpp
msgid "Frame %"
@@ -3451,11 +3457,11 @@ msgstr "物ç†ãƒ•レーム %"
#: editor/editor_profiler.cpp
msgid "Inclusive"
-msgstr "å«"
+msgstr "包括"
#: editor/editor_profiler.cpp
msgid "Self"
-msgstr "セルフ(Self)"
+msgstr "自己"
#: editor/editor_profiler.cpp
msgid ""
@@ -3466,6 +3472,12 @@ msgid ""
"functions called by that function.\n"
"Use this to find individual functions to optimize."
msgstr ""
+"包括: ã“ã®é–¢æ•°ãŒå‘¼ã³å‡ºã™ã€ä»–ã®é–¢æ•°ã®æ™‚é–“ã‚’å«ã¿ã¾ã™ã€‚\n"
+"ボトルãƒãƒƒã‚¯ã‚’見ã¤ã‘ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚\n"
+"\n"
+"自己: ã“ã®é–¢æ•°ãŒå‘¼ã³å‡ºã™ä»–ã®é–¢æ•°ã®æ™‚é–“ã‚’å«ã¾ãšã€ã“ã®é–¢æ•°è‡ªä½“ã«è²»ã‚„ã•ã‚ŒãŸæ™‚é–“"
+"ã®ã¿ã‚’カウントã—ã¾ã™ã€‚\n"
+"最é©åŒ–ã™ã‚‹å€‹ã€…ã®é–¢æ•°ã‚’見ã¤ã‘ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚"
#: editor/editor_profiler.cpp
msgid "Frame #:"
@@ -3568,6 +3580,10 @@ msgstr ""
"é¸æŠžã•れãŸãƒªã‚½ãƒ¼ã‚¹ (%s) ã¯ã€ã“ã®ãƒ—ロパティ (%s) ãŒæ±‚ã‚ã‚‹åž‹ã«ä¸€è‡´ã—ã¦ã„ã¾ã›"
"ん。"
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "ユニーク化"
@@ -3587,7 +3603,6 @@ msgid "Paste"
msgstr "貼り付ã‘"
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
-#, fuzzy
msgid "Convert to %s"
msgstr "%s ã«å¤‰æ›"
@@ -3638,9 +3653,8 @@ msgid "Did you forget the '_run' method?"
msgstr "'_run' メソッドを忘れã¦ã„ã¾ã›ã‚“ã‹ï¼Ÿ"
#: editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Hold %s to round to integers. Hold Shift for more precise changes."
-msgstr "Ctrlを押ã—ãŸã¾ã¾ã§æ•´æ•°å€¤ã«ä¸¸ã‚る。Shiftを押ã—ãŸã¾ã¾ã§ç²¾å¯†èª¿æ•´ã€‚"
+msgstr "%s を押ã—ãŸã¾ã¾ã§æ•´æ•°å€¤ã«ä¸¸ã‚る。Shiftを押ã—ãŸã¾ã¾ã§ç²¾å¯†èª¿æ•´ã€‚"
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
@@ -3667,14 +3681,12 @@ msgid "Uninstall these templates."
msgstr "ã“れらã®ãƒ†ãƒ³ãƒ—レートをアンインストールã—ã¾ã™ã€‚"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "There are no mirrors available."
-msgstr "'%s' ファイルãŒã‚りã¾ã›ã‚“。"
+msgstr "有効ãªãƒŸãƒ©ãƒ¼ã¯ã‚りã¾ã›ã‚“。"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Retrieving the mirror list..."
-msgstr "ミラーをå–å¾—ã—ã¦ã„ã¾ã™ã€‚ã—ã°ã‚‰ããŠå¾…ã¡ãã ã•ã„..."
+msgstr "ミラーリストをå–得中..."
#: editor/export_template_manager.cpp
msgid "Starting the download..."
@@ -3685,24 +3697,20 @@ msgid "Error requesting URL:"
msgstr "URL リクエストã®ã‚¨ãƒ©ãƒ¼:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Connecting to the mirror..."
msgstr "ãƒŸãƒ©ãƒ¼ã«æŽ¥ç¶šä¸­..."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't resolve the requested address."
-msgstr "ホストåを解決ã§ãã¾ã›ã‚“:"
+msgstr "è¦æ±‚ã•れãŸã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’解決ã§ãã¾ã›ã‚“。"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't connect to the mirror."
-msgstr "ãƒ›ã‚¹ãƒˆã«æŽ¥ç¶šã§ãã¾ã›ã‚“:"
+msgstr "ãƒŸãƒ©ãƒ¼ã«æŽ¥ç¶šã§ãã¾ã›ã‚“。"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No response from the mirror."
-msgstr "ホストã‹ã‚‰å¿œç­”ãŒã‚りã¾ã›ã‚“:"
+msgstr "ミラーã‹ã‚‰å¿œç­”ãŒã‚りã¾ã›ã‚“。"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3710,14 +3718,12 @@ msgid "Request failed."
msgstr "リクエストã¯å¤±æ•—ã—ã¾ã—ãŸã€‚"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Request ended up in a redirect loop."
-msgstr "リクエスト失敗。リダイレクトéŽå¤š"
+msgstr "リクエストã¯ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆãƒ«ãƒ¼ãƒ—ã®ãŸã‚終了ã—ã¾ã—ãŸã€‚"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Request failed:"
-msgstr "リクエストã¯å¤±æ•—ã—ã¾ã—ãŸã€‚"
+msgstr "リクエスト失敗:"
#: editor/export_template_manager.cpp
msgid "Download complete; extracting templates..."
@@ -3740,13 +3746,12 @@ msgid "Error getting the list of mirrors."
msgstr "ミラーリストã®å–得エラー。"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error parsing JSON with the list of mirrors. Please report this issue!"
-msgstr "ミラーリストã®JSONを読ã¿è¾¼ã¿å¤±æ•—。ã“ã®å•題ã®å ±å‘Šã‚’ãŠé¡˜ã„ã—ã¾ã™ï¼"
+msgstr "ミラーリストã®JSONã®è§£æžã«å¤±æ•—ã—ã¾ã—ãŸã€‚ã“ã®å•題ã®å ±å‘Šã‚’ãŠé¡˜ã„ã—ã¾ã™ï¼"
#: editor/export_template_manager.cpp
msgid "Best available mirror"
-msgstr ""
+msgstr "æœ‰åŠ¹ãªæœ€è‰¯ã®ãƒŸãƒ©ãƒ¼"
#: editor/export_template_manager.cpp
msgid ""
@@ -3799,24 +3804,20 @@ msgid "SSL Handshake Error"
msgstr "SSL ãƒãƒ³ãƒ‰ã‚·ã‚§ã‚¤ã‚¯ã‚¨ãƒ©ãƒ¼"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't open the export templates file."
-msgstr "エクスãƒãƒ¼ãƒˆ テンプレート ZIP ファイルを開ã‘ã¾ã›ã‚“。"
+msgstr "エクスãƒãƒ¼ãƒˆãƒ†ãƒ³ãƒ—レート ファイルを開ã‘ã¾ã›ã‚“。"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Invalid version.txt format inside the export templates file: %s."
-msgstr "テンプレート内㮠version.txt フォーマットãŒä¸æ­£ã§ã™: %s。"
+msgstr "エクスãƒãƒ¼ãƒˆãƒ†ãƒ³ãƒ—レート内㮠version.txt フォーマットãŒä¸æ­£ã§ã™: %s。"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No version.txt found inside the export templates file."
-msgstr "テンプレート内㫠version.txt ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。"
+msgstr "エクスãƒãƒ¼ãƒˆãƒ†ãƒ³ãƒ—レート内㫠version.txt ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for extracting templates:"
-msgstr "テンプレートã®ãƒ‘ス生æˆã‚¨ãƒ©ãƒ¼:"
+msgstr "テンプレート展開ã®ãŸã‚ã®ãƒ‘スã®ä½œæˆã‚¨ãƒ©ãƒ¼:"
#: editor/export_template_manager.cpp
msgid "Extracting Export Templates"
@@ -3827,9 +3828,8 @@ msgid "Importing:"
msgstr "インãƒãƒ¼ãƒˆä¸­:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Remove templates for the version '%s'?"
-msgstr "テンプレート ãƒãƒ¼ã‚¸ãƒ§ãƒ³ '%s' を除去ã—ã¾ã™ã‹ï¼Ÿ"
+msgstr "ãƒãƒ¼ã‚¸ãƒ§ãƒ³ '%s' ã®ãƒ†ãƒ³ãƒ—レートを削除ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/export_template_manager.cpp
msgid "Uncompressing Android Build Sources"
@@ -3837,7 +3837,7 @@ msgstr "Androidビルドソースã®è§£å‡"
#: editor/export_template_manager.cpp
msgid "Export Template Manager"
-msgstr "テンプレートã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ マãƒãƒ¼ã‚¸ãƒ£ãƒ¼"
+msgstr "エクスãƒãƒ¼ãƒˆãƒ†ãƒ³ãƒ—レート マãƒãƒ¼ã‚¸ãƒ£ãƒ¼"
#: editor/export_template_manager.cpp
msgid "Current Version:"
@@ -3854,37 +3854,32 @@ msgid "Export templates are installed and ready to be used."
msgstr "エクスãƒãƒ¼ãƒˆ テンプレートã¯ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ãŠã‚Šã€åˆ©ç”¨ã§ãã¾ã™ã€‚"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open Folder"
-msgstr "ファイルを開ã"
+msgstr "フォルダを開ã"
#: editor/export_template_manager.cpp
msgid "Open the folder containing installed templates for the current version."
-msgstr ""
+msgstr "ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ†ãƒ³ãƒ—レートãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れãŸãƒ•ォルダを開ãã¾ã™ã€‚"
#: editor/export_template_manager.cpp
msgid "Uninstall"
msgstr "アンインストール"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uninstall templates for the current version."
-msgstr "カウンタã®åˆæœŸå€¤"
+msgstr "ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ†ãƒ³ãƒ—レートをアンインストールã™ã‚‹ã€‚"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Download from:"
-msgstr "ダウンロードエラー"
+msgstr "ダウンロード元:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "ブラウザã§å®Ÿè¡Œ"
+msgstr "Webブラウザã§é–‹ã"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "エラーをコピー"
+msgstr "エラーã®URLをコピー"
#: editor/export_template_manager.cpp
msgid "Download and Install"
@@ -3895,20 +3890,20 @@ msgid ""
"Download and install templates for the current version from the best "
"possible mirror."
msgstr ""
+"ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ãƒ†ãƒ³ãƒ—レートを最é©ãªãƒŸãƒ©ãƒ¼ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«"
+"ã—ã¾ã™ã€‚"
#: editor/export_template_manager.cpp
msgid "Official export templates aren't available for development builds."
msgstr "å…¬å¼ã®æ›¸ã出ã—テンプレートã¯é–‹ç™ºç”¨ãƒ“ルドã®å ´åˆã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install from File"
msgstr "ファイルã‹ã‚‰ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install templates from a local file."
-msgstr "ZIPファイルã‹ã‚‰ãƒ†ãƒ³ãƒ—レートをインãƒãƒ¼ãƒˆ"
+msgstr "ローカルファイルã‹ã‚‰ãƒ†ãƒ³ãƒ—レートをインストールã™ã‚‹ã€‚"
#: editor/export_template_manager.cpp editor/find_in_files.cpp
#: editor/progress_dialog.cpp scene/gui/dialogs.cpp
@@ -3916,19 +3911,16 @@ msgid "Cancel"
msgstr "キャンセル"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Cancel the download of the templates."
-msgstr "エクスãƒãƒ¼ãƒˆ テンプレート ZIP ファイルを開ã‘ã¾ã›ã‚“。"
+msgstr "テンプレートã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã‚’キャンセルã™ã‚‹ã€‚"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Other Installed Versions:"
-msgstr "インストールã•れãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³:"
+msgstr "ä»–ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uninstall Template"
-msgstr "アンインストール"
+msgstr "テンプレートをアンインストール"
#: editor/export_template_manager.cpp
msgid "Select Template File"
@@ -3943,6 +3935,8 @@ msgid ""
"The templates will continue to download.\n"
"You may experience a short editor freeze when they finish."
msgstr ""
+"テンプレートã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã¯ç¶™ç¶šã•れã¾ã™ã€‚\n"
+"完了時ã«ã€çŸ­ã„間エディタãŒãƒ•リーズã™ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚"
#: editor/filesystem_dock.cpp
msgid "Favorites"
@@ -4127,7 +4121,7 @@ msgstr "åå‰ã‚’変更..."
#: editor/filesystem_dock.cpp
msgid "Focus the search box"
-msgstr ""
+msgstr "検索ボックスã«ãƒ•ォーカス"
#: editor/filesystem_dock.cpp
msgid "Previous Folder/File"
@@ -4275,7 +4269,7 @@ msgstr "グループãŒãƒŽãƒ¼ãƒ‰ã‚りã¾ã›ã‚“"
#: editor/groups_editor.cpp editor/scene_tree_dock.cpp
#: editor/scene_tree_editor.cpp
msgid "Filter nodes"
-msgstr "フィルタノード"
+msgstr "ノードã®ãƒ•ィルタ"
#: editor/groups_editor.cpp
msgid "Nodes in Group"
@@ -4376,18 +4370,16 @@ msgid "Saving..."
msgstr "ä¿å­˜ä¸­..."
#: editor/import_defaults_editor.cpp
-#, fuzzy
msgid "Select Importer"
-msgstr "é¸æŠžãƒ¢ãƒ¼ãƒ‰"
+msgstr "インãƒãƒ¼ã‚¿ã‚’é¸æŠž"
#: editor/import_defaults_editor.cpp
-#, fuzzy
msgid "Importer:"
-msgstr "インãƒãƒ¼ãƒˆ"
+msgstr "インãƒãƒ¼ã‚¿:"
#: editor/import_defaults_editor.cpp
msgid "Reset to Defaults"
-msgstr "デフォルトã«ãƒªã‚»ãƒƒãƒˆã™ã‚‹"
+msgstr "ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã«æˆ»ã™"
#: editor/import_dock.cpp
msgid "Keep File (No Import)"
@@ -4437,14 +4429,12 @@ msgid "Failed to load resource."
msgstr "リソースã®èª­è¾¼ã¿ã«å¤±æ•—ã—ã¾ã—ãŸã€‚"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Copy Properties"
-msgstr "プロパティ"
+msgstr "プロパティをコピー"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Paste Properties"
-msgstr "プロパティ"
+msgstr "プロパティを貼り付ã‘"
#: editor/inspector_dock.cpp
msgid "Make Sub-Resources Unique"
@@ -4469,23 +4459,20 @@ msgid "Save As..."
msgstr "åå‰ã‚’付ã‘ã¦ä¿å­˜..."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Extra resource options."
-msgstr "リソースパスã«ã‚りã¾ã›ã‚“。"
+msgstr "追加ã®ãƒªã‚½ãƒ¼ã‚¹ã‚ªãƒ—ション。"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Edit Resource from Clipboard"
-msgstr "リソースã®ã‚¯ãƒªãƒƒãƒ—ボードを編集"
+msgstr "クリップボードã‹ã‚‰ãƒªã‚½ãƒ¼ã‚¹ã‚’編集"
#: editor/inspector_dock.cpp
msgid "Copy Resource"
msgstr "リソースをコピー"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Make Resource Built-In"
-msgstr "組ã¿è¾¼ã¿ã«ã™ã‚‹"
+msgstr "リソースを組ã¿è¾¼ã¿ã«ã™ã‚‹"
#: editor/inspector_dock.cpp
msgid "Go to the previous edited object in history."
@@ -4500,9 +4487,8 @@ msgid "History of recently edited objects."
msgstr "最近編集ã—ãŸã‚ªãƒ–ジェクトã®å±¥æ­´ã€‚"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Open documentation for this object."
-msgstr "ドキュメントを開ã"
+msgstr "ã“ã®ã‚ªãƒ–ジェクトã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’é–‹ã。"
#: editor/inspector_dock.cpp editor/scene_tree_dock.cpp
msgid "Open Documentation"
@@ -4513,9 +4499,8 @@ msgid "Filter properties"
msgstr "フィルタプロパティ"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Manage object properties."
-msgstr "オブジェクトã®ãƒ—ロパティ。"
+msgstr "オブジェクトã®ãƒ—ロパティを管ç†ã€‚"
#: editor/inspector_dock.cpp
msgid "Changes may be lost!"
@@ -4759,9 +4744,8 @@ msgid "Blend:"
msgstr "ブレンド:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Parameter Changed:"
-msgstr "パラメータãŒå¤‰æ›´ã•れã¾ã—ãŸ"
+msgstr "パラメータãŒå¤‰æ›´ã•れã¾ã—ãŸ:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -5445,11 +5429,11 @@ msgstr "ã“ã®ã‚¢ã‚»ãƒƒãƒˆã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã¯æ—¢ã«é€²è¡Œä¸­ï¼"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Recently Updated"
-msgstr "更新日時"
+msgstr "æœ€æ–°ã®æ›´æ–°æ—¥"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Least Recently Updated"
-msgstr "更新日時 (逆)"
+msgstr "最å¤ã®æ›´æ–°æ—¥"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Name (A-Z)"
@@ -5489,11 +5473,11 @@ msgstr "ã™ã¹ã¦"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search templates, projects, and demos"
-msgstr ""
+msgstr "テンプレートã€ãƒ—ロジェクトã€ãƒ‡ãƒ¢ã‚’検索"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search assets (excluding templates, projects, and demos)"
-msgstr ""
+msgstr "アセットを検索 (テンプレートã€ãƒ—ロジェクトã€ãƒ‡ãƒ¢ã‚’除ã)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Import..."
@@ -5525,7 +5509,7 @@ msgstr "å…¬å¼"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Testing"
-msgstr "テストã™ã‚‹"
+msgstr "試験的"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Loading..."
@@ -5537,7 +5521,7 @@ msgstr "アセットã®zipファイル"
#: editor/plugins/audio_stream_editor_plugin.cpp
msgid "Audio Preview Play/Pause"
-msgstr ""
+msgstr "オーディオプレビューã®å†ç”Ÿ/ä¸€æ™‚åœæ­¢"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5548,13 +5532,13 @@ msgstr ""
"シーンをä¿å­˜ã—ã¦ã‹ã‚‰å†åº¦è¡Œã£ã¦ãã ã•ã„。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"No meshes to bake. Make sure they contain an UV2 channel and that the 'Use "
"In Baked Light' and 'Generate Lightmap' flags are on."
msgstr ""
-"ベイクã™ã‚‹ãƒ¡ãƒƒã‚·ãƒ¥ãŒã‚りã¾ã›ã‚“。メッシュ㫠UV2ãƒãƒ£ãƒ³ãƒãƒ«ãŒå«ã¾ã‚Œã¦ãŠ"
-"りã€'Bake Light' フラグãŒã‚ªãƒ³ã«ãªã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。"
+"ベイクã™ã‚‹ãƒ¡ãƒƒã‚·ãƒ¥ãŒã‚りã¾ã›ã‚“。メッシュ㫠UV2ãƒãƒ£ãƒ³ãƒãƒ«ãŒå«ã¾ã‚Œã¦ãŠã‚Šã€Use "
+"In Baked Light' 㨠'Generate Lightmap' フラグãŒã‚ªãƒ³ã«ãªã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦"
+"ãã ã•ã„。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed creating lightmap images, make sure path is writable."
@@ -5697,6 +5681,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "CanvasItem \"%s\" ã‚’ (%d, %d) ã«ç§»å‹•"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "é¸æŠžå¯¾è±¡ã‚’ãƒ­ãƒƒã‚¯"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "グループ"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -5797,13 +5793,13 @@ msgstr "アンカーを変更"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid ""
"Project Camera Override\n"
"Overrides the running project's camera with the editor viewport camera."
msgstr ""
-"ゲームカメラã®ç½®ãæ›ãˆ\n"
-"エディタã®ãƒ“ューãƒãƒ¼ãƒˆã‚«ãƒ¡ãƒ©ã§ã‚²ãƒ¼ãƒ ã‚«ãƒ¡ãƒ©ã‚’ç½®ãæ›ãˆã‚‹ã€‚"
+"プロジェクトã®ã‚«ãƒ¡ãƒ©ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰\n"
+"実行中ã®ãƒ—ロジェクトã®ã‚«ãƒ¡ãƒ©ã‚’ã€ã‚¨ãƒ‡ã‚£ã‚¿ã®ãƒ“ューãƒãƒ¼ãƒˆã‚«ãƒ¡ãƒ©ã§ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰"
+"ã—ã¾ã™ã€‚"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5812,6 +5808,9 @@ msgid ""
"No project instance running. Run the project from the editor to use this "
"feature."
msgstr ""
+"プロジェクトã®ã‚«ãƒ¡ãƒ©ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰\n"
+"実行中ã®ãƒ—ロジェクトã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ã‚りã¾ã›ã‚“。ã“ã®æ©Ÿèƒ½ã‚’使用ã™ã‚‹ã«ã¯ã€ã‚¨"
+"ディターã‹ã‚‰ãƒ—ロジェクトを実行ã—ã¾ã™ã€‚"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5877,31 +5876,27 @@ msgstr "é¸æŠžãƒ¢ãƒ¼ãƒ‰"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Drag: Rotate selected node around pivot."
-msgstr "é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã¾ãŸã¯ãƒˆãƒ©ãƒ³ã‚¸ã‚·ãƒ§ãƒ³ã‚’除去。"
+msgstr "ドラッグ: é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã‚’ピボットを中心ã«å›žè»¢ã™ã‚‹ã€‚"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Alt+Drag: Move selected node."
-msgstr "Alt+ドラッグ: 移動"
+msgstr "Alt+ドラッグ: é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã‚’移動。"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "V: Set selected node's pivot position."
-msgstr "é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã¾ãŸã¯ãƒˆãƒ©ãƒ³ã‚¸ã‚·ãƒ§ãƒ³ã‚’除去。"
+msgstr "V: é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã®ãƒ”ボットã®ä½ç½®ã‚’設定ã™ã‚‹ã€‚"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Alt+RMB: Show list of all nodes at position clicked, including locked."
msgstr ""
-"クリックã—ãŸä½ç½®ã«ã‚るオブジェクトã®ãƒªã‚¹ãƒˆã‚’表示\n"
-"(é¸æŠžãƒ¢ãƒ¼ãƒ‰ã§ã®Alt+å³ã‚¯ãƒªãƒƒã‚¯ã¨åŒã˜)。"
+"Alt+å³ã‚¯ãƒªãƒƒã‚¯: クリックã—ãŸä½ç½®ã®ã™ã¹ã¦ã®ãƒŽãƒ¼ãƒ‰ã‚’一覧ã§è¡¨ç¤ºã€‚ロックã•れãŸã‚‚"
+"ã®ã‚‚å«ã‚€ã€‚"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "RMB: Add node at position clicked."
-msgstr ""
+msgstr "å³ã‚¯ãƒªãƒƒã‚¯: クリックã—ãŸä½ç½®ã«ãƒŽãƒ¼ãƒ‰ã‚’追加。"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6011,7 +6006,7 @@ msgstr "ガイドã«ã‚¹ãƒŠãƒƒãƒ—"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock the selected object in place (can't be moved)."
-msgstr "é¸æŠžã—ãŸã‚ªãƒ–ジェクトをç¾åœ¨ä½ç½®ã§ãƒ­ãƒƒã‚¯ (移動ä¸å¯èƒ½ã«ã™ã‚‹)。"
+msgstr "é¸æŠžã—ãŸã‚ªãƒ–ジェクトã®ä½ç½®ã‚’ロック (移動ä¸å¯èƒ½ã«ã™ã‚‹)。"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6138,14 +6133,12 @@ msgid "Clear Pose"
msgstr "ãƒãƒ¼ã‚ºã‚’クリアã™ã‚‹"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Add Node Here"
-msgstr "ノードを追加"
+msgstr "ã“ã“ã«ãƒŽãƒ¼ãƒ‰ã‚’追加"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Instance Scene Here"
-msgstr "シーンã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–"
+msgstr "ã“ã“ã«ã‚·ãƒ¼ãƒ³ã‚’インスタンス化ã™ã‚‹"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
@@ -6161,49 +6154,43 @@ msgstr "ビューをパン"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 3.125%"
-msgstr ""
+msgstr "3.125%ã«ã‚ºãƒ¼ãƒ "
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 6.25%"
-msgstr ""
+msgstr "6.25%ã«ã‚ºãƒ¼ãƒ "
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 12.5%"
-msgstr ""
+msgstr "12.5%ã«ã‚ºãƒ¼ãƒ "
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 25%"
-msgstr "ズームアウト"
+msgstr "25%ã«ã‚ºãƒ¼ãƒ "
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 50%"
-msgstr "ズームアウト"
+msgstr "50%ã«ã‚ºãƒ¼ãƒ "
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 100%"
-msgstr "ズームアウト"
+msgstr "100%ã«ã‚ºãƒ¼ãƒ "
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 200%"
-msgstr "ズームアウト"
+msgstr "200%ã«ã‚ºãƒ¼ãƒ "
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 400%"
-msgstr "ズームアウト"
+msgstr "400%ã«ã‚ºãƒ¼ãƒ "
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 800%"
-msgstr "ズームアウト"
+msgstr "800%ã«ã‚ºãƒ¼ãƒ "
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 1600%"
-msgstr ""
+msgstr "1600%ã«ã‚ºãƒ¼ãƒ "
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
@@ -6276,7 +6263,7 @@ msgstr "放出マスクをクリア"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Particles"
-msgstr "パーティクル"
+msgstr "Particles"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -6315,7 +6302,7 @@ msgstr "放出色"
#: editor/plugins/cpu_particles_editor_plugin.cpp
msgid "CPUParticles"
-msgstr "CPUパーティクル"
+msgstr "CPUParticles"
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -6421,7 +6408,7 @@ msgstr "オクルーダーãƒãƒªã‚´ãƒ³ã‚’生æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh is empty!"
-msgstr "メッシュãŒã‚りã¾ã›ã‚“!"
+msgstr "メッシュãŒã‚りã¾ã›ã‚“ï¼"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a Trimesh collision shape."
@@ -6433,7 +6420,7 @@ msgstr "三角形メッシュé™çš„ボディを作æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "This doesn't work on scene root!"
-msgstr "ã“れã¯ã‚·ãƒ¼ãƒ³ã®ãƒ«ãƒ¼ãƒˆã§ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“!"
+msgstr "ã“れã¯ã‚·ãƒ¼ãƒ³ã®ãƒ«ãƒ¼ãƒˆã§ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“ï¼"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Static Shape"
@@ -6449,9 +6436,8 @@ msgid "Couldn't create a single convex collision shape."
msgstr "å˜ä¸€ã®å‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Shape"
-msgstr "å˜ä¸€ã®å‡¸åž‹ã‚·ã‚§ã‚¤ãƒ—を作æˆã™ã‚‹"
+msgstr "簡略化ã•れãŸå‡¸åž‹ã‚·ã‚§ã‚¤ãƒ—を作æˆã™ã‚‹"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Single Convex Shape"
@@ -6480,16 +6466,15 @@ msgstr "å«ã¾ã‚Œã¦ã„るメッシュãŒArrayMeshåž‹ã§ã¯ã‚りã¾ã›ã‚“。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "UV Unwrap failed, mesh may not be manifold?"
-msgstr "UV展開ã«å¤±æ•—ã—ã¾ã—ãŸã€‚メッシュãŒéžå¤šæ§˜ä½“ã§ã¯ã‚りã¾ã›ã‚“ã‹?"
+msgstr "UV展開ã«å¤±æ•—ã—ã¾ã—ãŸã€‚メッシュãŒéžå¤šæ§˜ä½“ã§ã¯ã‚りã¾ã›ã‚“ã‹ï¼Ÿ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "No mesh to debug."
msgstr "デãƒãƒƒã‚°ã™ã‚‹ãƒ¡ãƒƒã‚·ãƒ¥ãŒã‚りã¾ã›ã‚“。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Mesh has no UV in layer %d."
-msgstr "モデルã«ã¯ã“ã®ãƒ¬ã‚¤ãƒ¤ãƒ¼ã«UVãŒã‚りã¾ã›ã‚“"
+msgstr "メッシュã®ãƒ¬ã‚¤ãƒ¤ãƒ¼ %dã«UVãŒã‚りã¾ã›ã‚“。"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "MeshInstance lacks a Mesh!"
@@ -6497,15 +6482,15 @@ msgstr "MeshInstanceã«ãƒ¡ãƒƒã‚·ãƒ¥ãŒã‚りã¾ã›ã‚“ï¼"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh has not surface to create outlines from!"
-msgstr "メッシュã«ã‚¢ã‚¦ãƒˆãƒ©ã‚¤ãƒ³ã‚’作æˆã™ã‚‹ãŸã‚ã®ã‚µãƒ¼ãƒ•ェスãŒå­˜åœ¨ã—ã¾ã›ã‚“!"
+msgstr "メッシュã«ã‚¢ã‚¦ãƒˆãƒ©ã‚¤ãƒ³ã‚’作æˆã™ã‚‹ãŸã‚ã®ã‚µãƒ¼ãƒ•ェスãŒå­˜åœ¨ã—ã¾ã›ã‚“ï¼"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh primitive type is not PRIMITIVE_TRIANGLES!"
-msgstr "メッシュã®ãƒ—リミティブ型㌠PRIMITIVE_TRIANGLES ã§ã¯ã‚りã¾ã›ã‚“!"
+msgstr "メッシュã®ãƒ—リミティブ型㌠PRIMITIVE_TRIANGLES ã§ã¯ã‚りã¾ã›ã‚“ï¼"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Could not create outline!"
-msgstr "アウトラインを生æˆã§ãã¾ã›ã‚“ã§ã—ãŸ!"
+msgstr "アウトラインを生æˆã§ãã¾ã›ã‚“ã§ã—ãŸï¼"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline"
@@ -6554,9 +6539,8 @@ msgstr ""
"ã“れã¯ã€è¡çªæ¤œå‡ºã®æœ€é€Ÿã®(ãŸã ã—ç²¾åº¦ãŒæœ€ã‚‚低ã„)オプションã§ã™ã€‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Collision Sibling"
-msgstr "å˜ä¸€ã®å‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã®å…„弟を作æˆ"
+msgstr "簡略化ã•れãŸå‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã®å…„弟を作æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6564,6 +6548,9 @@ msgid ""
"This is similar to single collision shape, but can result in a simpler "
"geometry in some cases, at the cost of accuracy."
msgstr ""
+"簡略化ã•れãŸå‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—を作æˆã—ã¾ã™ã€‚\n"
+"ã“れã¯å˜ä¸€ã®å‡¸åž‹ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ç²¾åº¦ã‚’犠牲ã«ã‚ˆã‚Šå˜ç´”ãªã‚¸ã‚ª"
+"メトリã«ãªã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Multiple Convex Collision Siblings"
@@ -6644,7 +6631,13 @@ msgid "Remove Selected Item"
msgstr "é¸æŠžã—ãŸã‚¢ã‚¤ãƒ†ãƒ ã‚’å–り除ã"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "シーンã‹ã‚‰ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "シーンã‹ã‚‰ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7171,7 +7164,7 @@ msgstr "ボーンをãƒãƒªã‚´ãƒ³ã«åŒæœŸã•ã›ã‚‹"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "ERROR: Couldn't load resource!"
-msgstr "エラー: リソースを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ!"
+msgstr "エラー: リソースを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸï¼"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Add Resource"
@@ -7188,7 +7181,7 @@ msgstr "リソースを削除"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Resource clipboard is empty!"
-msgstr "リソースクリップボードãŒç©ºã§ã™!"
+msgstr "リソースクリップボードãŒç©ºã§ã™ï¼"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Paste Resource"
@@ -7220,9 +7213,8 @@ msgid "ResourcePreloader"
msgstr "ResourcePreloader"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portals"
-msgstr "å·¦å³å転"
+msgstr "ãƒãƒ¼ã‚¿ãƒ«ã‚’å転"
#: editor/plugins/room_manager_editor_plugin.cpp
#, fuzzy
@@ -7235,9 +7227,18 @@ msgid "Generate Points"
msgstr "生æˆã—ãŸãƒã‚¤ãƒ³ãƒˆã®æ•°:"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portal"
-msgstr "å·¦å³å転"
+msgstr "ãƒãƒ¼ã‚¿ãƒ«ã‚’å転"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "トランスフォームをクリア"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "ノードを生æˆ"
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
@@ -7253,7 +7254,7 @@ msgstr "最近開ã„ãŸãƒ•ァイルã®å±¥æ­´ã‚’クリア"
#: editor/plugins/script_editor_plugin.cpp
msgid "Close and save changes?"
-msgstr "変更をä¿å­˜ã—ã¦é–‰ã˜ã¾ã™ã‹?"
+msgstr "変更をä¿å­˜ã—ã¦é–‰ã˜ã¾ã™ã‹ï¼Ÿ"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error writing TextFile:"
@@ -7265,7 +7266,7 @@ msgstr "ファイルãŒèª­ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error saving file!"
-msgstr "ファイルã®ä¿å­˜ã‚¨ãƒ©ãƒ¼!"
+msgstr "ファイルã®ä¿å­˜ã‚¨ãƒ©ãƒ¼ï¼"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error while saving theme."
@@ -7347,7 +7348,7 @@ msgstr "å‰ã‚’検索"
#: editor/plugins/script_editor_plugin.cpp
msgid "Filter scripts"
-msgstr "フィルタスクリプト"
+msgstr "スクリプトã®ãƒ•ィルタ"
#: editor/plugins/script_editor_plugin.cpp
msgid "Toggle alphabetical sorting of the method list."
@@ -7469,7 +7470,7 @@ msgstr "続行"
#: editor/plugins/script_editor_plugin.cpp
msgid "Keep Debugger Open"
-msgstr "デãƒãƒƒã‚¬ã‚’é–‹ã„ãŸã¾ã¾ã«"
+msgstr "デãƒãƒƒã‚¬ã‚’é–‹ã„ãŸã¾ã¾ã«ã™ã‚‹"
#: editor/plugins/script_editor_plugin.cpp
msgid "Debug with External Editor"
@@ -7506,7 +7507,7 @@ msgid ""
"What action should be taken?:"
msgstr ""
"以下ã®ãƒ•ァイルより新ã—ã„ã‚‚ã®ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ã¾ã™ã€‚\n"
-"ã©ã†ã—ã¾ã™ã‹?:"
+"ã©ã†ã—ã¾ã™ã‹ï¼Ÿ:"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
@@ -7721,7 +7722,7 @@ msgid ""
"What action should be taken?"
msgstr ""
"ã“ã®ã‚·ã‚§ãƒ¼ãƒ€ãƒ¼ã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ä¿®æ­£ã•れã¦ã„ã¾ã™ã€‚\n"
-"ã©ã†ã—ã¾ã™ã‹?"
+"ã©ã†ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/plugins/shader_editor_plugin.cpp
msgid "Shader"
@@ -7744,12 +7745,14 @@ msgid "Skeleton2D"
msgstr "Skeleton2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "レスト・ãƒãƒ¼ã‚ºã®ä½œæˆ(ボーンã‹ã‚‰)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "レスト・ãƒãƒ¼ã‚ºã¸ãƒœãƒ¼ãƒ³ã‚’設定ã™ã‚‹"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "レスト・ãƒãƒ¼ã‚ºã¸ãƒœãƒ¼ãƒ³ã‚’設定ã™ã‚‹"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "上書ã"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7776,6 +7779,71 @@ msgid "Perspective"
msgstr "é€è¦–投影"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "平行投影"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "é€è¦–投影"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "平行投影"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "é€è¦–投影"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "平行投影"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "é€è¦–投影"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "平行投影"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "平行投影"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "é€è¦–投影"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "平行投影"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "é€è¦–投影"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "トランスフォームã¯ä¸­æ­¢ã•れã¾ã—ãŸã€‚"
@@ -7802,20 +7870,17 @@ msgid "None"
msgstr "None"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Rotate"
-msgstr "回転モード"
+msgstr "回転"
#. TRANSLATORS: This refers to the movement that changes the position of an object.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translate"
-msgstr "移動:"
+msgstr "移動"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scale"
-msgstr "スケール:"
+msgstr "スケール"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scaling: "
@@ -7838,52 +7903,44 @@ msgid "Animation Key Inserted."
msgstr "ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚­ãƒ¼ãŒæŒ¿å…¥ã•れã¾ã—ãŸã€‚"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Pitch:"
-msgstr "ピッãƒ"
+msgstr "ピッãƒ:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Yaw:"
-msgstr ""
+msgstr "ヨー:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Size:"
-msgstr "サイズ: "
+msgstr "サイズ:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Objects Drawn:"
-msgstr "æç”»ã•れãŸã‚ªãƒ–ジェクト"
+msgstr "æç”»ã•れãŸã‚ªãƒ–ジェクト:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Material Changes:"
-msgstr "マテリアルã®å¤‰æ›´"
+msgstr "マテリアルã®å¤‰æ›´:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Shader Changes:"
-msgstr "シェーダーã®å¤‰æ›´"
+msgstr "シェーダーã®å¤‰æ›´:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes:"
-msgstr "サーフェスã®å¤‰æ›´"
+msgstr "サーフェスã®å¤‰æ›´:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Draw Calls:"
-msgstr "ドローコール"
+msgstr "ドローコール:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices:"
-msgstr "頂点"
+msgstr "頂点:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "FPS: %d (%s ms)"
-msgstr ""
+msgstr "FPS: %d (%s ms)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
@@ -7894,42 +7951,22 @@ msgid "Bottom View."
msgstr "下é¢å›³ã€‚"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "下é¢"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "å·¦å´é¢å›³ã€‚"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "å·¦å´é¢"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "å³å´é¢å›³ã€‚"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "å³å´é¢"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "å‰é¢å›³ã€‚"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "å‰é¢"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "後é¢å›³."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "後é¢"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "トランスフォームをビューã«åˆã‚ã›ã‚‹"
@@ -8038,9 +8075,8 @@ msgid "Freelook Slow Modifier"
msgstr "ãƒ•ãƒªãƒ¼ãƒ«ãƒƒã‚¯ã®æ¸›é€Ÿèª¿æ•´"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Camera Preview"
-msgstr "カメラサイズを変更"
+msgstr "カメラã®ãƒ—レビューを切り替ãˆ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
@@ -8050,6 +8086,8 @@ msgstr "ビューã®å›žè»¢ã‚’固定中"
msgid ""
"To zoom further, change the camera's clipping planes (View -> Settings...)"
msgstr ""
+"ã•らã«ã‚ºãƒ¼ãƒ ã™ã‚‹ã«ã¯ã€ã‚«ãƒ¡ãƒ©ã®ã‚¯ãƒªãƒƒãƒ”ングé¢ã‚’変更ã—ã¦ãã ã•ã„ (ビュー -> 設"
+"定...)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid ""
@@ -8083,7 +8121,6 @@ msgstr ""
"åŠé–‹ãã®ç›®: ギズモã¯éžé€æ˜Žãªé¢ã‚’通ã—ã¦ã‚‚å¯è¦– (「Xç·šã€)。"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Snap Nodes to Floor"
msgstr "ノードをフロアã«ã‚¹ãƒŠãƒƒãƒ—"
@@ -8190,16 +8227,20 @@ msgstr "ギズモ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Origin"
-msgstr "ビューã®åŽŸç‚¹"
+msgstr "原点を表示"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Grid"
-msgstr "ビューã®ã‚°ãƒªãƒƒãƒ‰"
+msgstr "グリッドを表示"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Portal Culling"
-msgstr "ビューãƒãƒ¼ãƒˆã®è¨­å®š"
+msgstr "ãƒãƒ¼ã‚¿ãƒ«ã‚«ãƒªãƒ³ã‚°ã‚’表示"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "ãƒãƒ¼ã‚¿ãƒ«ã‚«ãƒªãƒ³ã‚°ã‚’表示"
#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
@@ -8232,11 +8273,11 @@ msgstr "視野角(度):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Z-Near:"
-msgstr "Z-Nearを表示:"
+msgstr "Z-Nearã®è¡¨ç¤º:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Z-Far:"
-msgstr "Z-Farを表示:"
+msgstr "Z-Farã®è¡¨ç¤º:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Change"
@@ -8267,8 +8308,9 @@ msgid "Post"
msgstr "後"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "ç„¡åã®ã‚®ã‚ºãƒ¢"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "åç„¡ã—ã®ãƒ—ロジェクト"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8304,7 +8346,7 @@ msgstr "LightOccluder2D プレビュー"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Sprite is empty!"
-msgstr "スプライトã¯ç©ºã§ã™!"
+msgstr "スプライトã¯ç©ºã§ã™ï¼"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Can't convert a sprite using animation frames to mesh."
@@ -8384,11 +8426,11 @@ msgstr "ç”»åƒã‚’読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "ERROR: Couldn't load frame resource!"
-msgstr "エラー:フレームリソースを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ!"
+msgstr "エラー:フレームリソースを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸï¼"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Resource clipboard is empty or not a texture!"
-msgstr "リソースクリップボードã¯ç©ºã‹ã€ãƒ†ã‚¯ã‚¹ãƒãƒ£ä»¥å¤–ã®ã‚‚ã®ã§ã™!"
+msgstr "リソースクリップボードã¯ç©ºã‹ã€ãƒ†ã‚¯ã‚¹ãƒãƒ£ä»¥å¤–ã®ã‚‚ã®ã§ã™ï¼"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Paste Frame"
@@ -8519,106 +8561,92 @@ msgid "TextureRegion"
msgstr "テクスãƒãƒ£é ˜åŸŸ"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Colors"
-msgstr "Color"
+msgstr "カラー"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Fonts"
msgstr "フォント"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Icons"
msgstr "アイコン"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Styleboxes"
-msgstr "スタイル"
+msgstr "StyleBox"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} color(s)"
-msgstr ""
+msgstr "{num} 個ã®ã‚«ãƒ©ãƒ¼"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No colors found."
-msgstr "サブリソースãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚"
+msgstr "カラーãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "{num} constant(s)"
-msgstr "定数"
+msgstr "{num} 個ã®å®šæ•°"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No constants found."
-msgstr "Color定数。"
+msgstr "定数ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} font(s)"
-msgstr ""
+msgstr "{num} 個ã®ãƒ•ォント"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No fonts found."
-msgstr "見ã¤ã‹ã‚Šã¾ã›ã‚“!"
+msgstr "フォントãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} icon(s)"
-msgstr ""
+msgstr "{num} 個ã®ã‚¢ã‚¤ã‚³ãƒ³"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No icons found."
-msgstr "見ã¤ã‹ã‚Šã¾ã›ã‚“!"
+msgstr "アイコンãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} stylebox(es)"
-msgstr ""
+msgstr "{num} 個ã®ã‚¹ã‚«ã‚¤ãƒœãƒƒã‚¯ã‚¹"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No styleboxes found."
-msgstr "サブリソースãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚"
+msgstr "StyleBoxãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} currently selected"
-msgstr ""
+msgstr "{num} 個 ç¾åœ¨é¸æŠžä¸­"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Nothing was selected for the import."
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆã™ã‚‹ã‚‚ã®ãŒé¸æŠžã•れã¦ã„ã¾ã›ã‚“。"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Importing Theme Items"
-msgstr "テーマã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
+msgstr "テーマã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’インãƒãƒ¼ãƒˆä¸­"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Importing items {n}/{n}"
-msgstr ""
+msgstr "アイテムをインãƒãƒ¼ãƒˆä¸­ {n}/{n}"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Updating the editor"
-msgstr "エディタを終了ã—ã¾ã™ã‹ï¼Ÿ"
+msgstr "エディタをアップデート中"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Finalizing"
-msgstr "分æžä¸­"
+msgstr "終了処ç†ä¸­"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Filter:"
-msgstr "フィルタ: "
+msgstr "フィルタ:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "With Data"
-msgstr ""
+msgstr "データ付"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8626,76 +8654,71 @@ msgid "Select by data type:"
msgstr "ãƒŽãƒ¼ãƒ‰ã‚’é¸æŠž"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible color items."
-msgstr "設定項目を設定ã—ã¦ãã ã•ã„!"
+msgstr "表示中ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ¼ã‚¢ã‚¤ãƒ†ãƒ ã‚’é¸æŠžã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible color items and their data."
-msgstr ""
+msgstr "表示中ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ¼ã‚¢ã‚¤ãƒ†ãƒ ã¨ãã®ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible color items."
-msgstr ""
+msgstr "表示中ã®ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ¼ã‚¢ã‚¤ãƒ†ãƒ ã‚’é¸æŠžè§£é™¤ã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible constant items."
-msgstr "è¨­å®šé …ç›®ã‚’é¸æŠžã—ã¦ãã ã•ã„!"
+msgstr "表示中ã®ã™ã¹ã¦ã®å®šæ•°ã‚¢ã‚¤ãƒ†ãƒ ã‚’é¸æŠžã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible constant items and their data."
-msgstr ""
+msgstr "表示中ã®ã™ã¹ã¦ã®å®šæ•°ã‚¢ã‚¤ãƒ†ãƒ ã¨ãã®ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible constant items."
-msgstr ""
+msgstr "表示中ã®ã™ã¹ã¦ã®å®šæ•°ã‚¢ã‚¤ãƒ†ãƒ ã‚’é¸æŠžè§£é™¤ã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible font items."
-msgstr "è¨­å®šé …ç›®ã‚’é¸æŠžã—ã¦ãã ã•ã„!"
+msgstr "表示中ã®ã™ã¹ã¦ã®ãƒ•ã‚©ãƒ³ãƒˆã‚¢ã‚¤ãƒ†ãƒ ã‚’é¸æŠžã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible font items and their data."
-msgstr ""
+msgstr "表示中ã®ã™ã¹ã¦ã®ãƒ•ォントアイテムã¨ãã®ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible font items."
-msgstr ""
+msgstr "表示中ã®ã™ã¹ã¦ã®ãƒ•ã‚©ãƒ³ãƒˆã‚¢ã‚¤ãƒ†ãƒ ã‚’é¸æŠžè§£é™¤ã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible icon items."
-msgstr "è¨­å®šé …ç›®ã‚’é¸æŠžã—ã¦ãã ã•ã„!"
+msgstr "表示中ã®ã™ã¹ã¦ã®ã‚¢ã‚¤ã‚³ãƒ³ã‚¢ã‚¤ãƒ†ãƒ ã‚’é¸æŠžã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible icon items and their data."
-msgstr "è¨­å®šé …ç›®ã‚’é¸æŠžã—ã¦ãã ã•ã„!"
+msgstr "表示中ã®ã™ã¹ã¦ã®ã‚¢ã‚¤ã‚³ãƒ³ã‚¢ã‚¤ãƒ†ãƒ ã¨ãã®ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Deselect all visible icon items."
-msgstr "è¨­å®šé …ç›®ã‚’é¸æŠžã—ã¦ãã ã•ã„!"
+msgstr "表示中ã®ã™ã¹ã¦ã®ã‚¢ã‚¤ã‚³ãƒ³ã‚¢ã‚¤ãƒ†ãƒ ã‚’é¸æŠžè§£é™¤ã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items."
-msgstr ""
+msgstr "表示中ã®ã™ã¹ã¦ã® StyleBox ã‚¢ã‚¤ãƒ†ãƒ ã‚’é¸æŠžã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items and their data."
-msgstr ""
+msgstr "表示中ã®ã™ã¹ã¦ã® StyleBox アイテムã¨ãã®ãƒ‡ãƒ¼ã‚¿ã‚’é¸æŠžã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible stylebox items."
-msgstr ""
+msgstr "表示中ã®ã™ã¹ã¦ã® StyleBox ã‚¢ã‚¤ãƒ†ãƒ ã‚’é¸æŠžè§£é™¤ã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Caution: Adding icon data may considerably increase the size of your Theme "
"resource."
msgstr ""
+"注æ„: アイコンデータを追加ã™ã‚‹ã¨ãƒ†ãƒ¼ãƒž リソースã®ã‚µã‚¤ã‚ºãŒå¤§å¹…ã«å¢—加ã—ã¾ã™ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8708,27 +8731,24 @@ msgid "Expand types."
msgstr "ã™ã¹ã¦å±•é–‹"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all Theme items."
-msgstr "ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠž"
+msgstr "ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒž ã‚¢ã‚¤ãƒ†ãƒ ã‚’é¸æŠžã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select With Data"
-msgstr "ç‚¹ã‚’é¸æŠž"
+msgstr "データ付ãã§é¸æŠž"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all Theme items with item data."
-msgstr ""
+msgstr "ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒž アイテムをã€ã‚¢ã‚¤ãƒ†ãƒ ã®ãƒ‡ãƒ¼ã‚¿ä»˜ãã§é¸æŠžã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Deselect All"
-msgstr "ã™ã¹ã¦é¸æŠž"
+msgstr "ã™ã¹ã¦é¸æŠžè§£é™¤"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all Theme items."
-msgstr ""
+msgstr "ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒž アイテムã®é¸æŠžã‚’解除ã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8749,34 +8769,28 @@ msgid ""
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Color Items"
-msgstr "ã™ã¹ã¦ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’除去"
+msgstr "ã™ã¹ã¦ã®ã‚«ãƒ©ãƒ¼ã‚¢ã‚¤ãƒ†ãƒ ã‚’除去"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Item"
-msgstr "アイテムを除去"
+msgstr "アイテムåを変更"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Constant Items"
-msgstr "ã™ã¹ã¦ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’除去"
+msgstr "ã™ã¹ã¦ã®å®šæ•°ã‚¢ã‚¤ãƒ†ãƒ ã‚’除去"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Font Items"
-msgstr "ã™ã¹ã¦ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’除去"
+msgstr "ã™ã¹ã¦ã®ãƒ•ォントアイテムを除去"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Icon Items"
-msgstr "ã™ã¹ã¦ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’除去"
+msgstr "ã™ã¹ã¦ã®ã‚¢ã‚¤ã‚³ãƒ³ã‚¢ã‚¤ãƒ†ãƒ ã‚’除去"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All StyleBox Items"
-msgstr "ã™ã¹ã¦ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’除去"
+msgstr "ã™ã¹ã¦ã® StyleBox アイテムを除去"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -8785,161 +8799,132 @@ msgid ""
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Color Item"
-msgstr "クラスアイテム追加"
+msgstr "カラーアイテムã®è¿½åŠ "
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Constant Item"
-msgstr "クラスアイテム追加"
+msgstr "定数アイテムã®è¿½åŠ "
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Font Item"
-msgstr "アイテムを追加"
+msgstr "フォントアイテムã®è¿½åŠ "
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Icon Item"
-msgstr "アイテムを追加"
+msgstr "アイコンアイテムã®è¿½åŠ "
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Stylebox Item"
-msgstr "ã™ã¹ã¦ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’追加"
+msgstr "StyleBox アイテムã®è¿½åŠ "
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Color Item"
-msgstr "クラスアイテム削除"
+msgstr "カラーアイテムåã®å¤‰æ›´"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Constant Item"
-msgstr "クラスアイテム削除"
+msgstr "定数アイテムåã®å¤‰æ›´"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Font Item"
-msgstr "ノードã®åå‰ã‚’変更"
+msgstr "フォントアイテムåã®å¤‰æ›´"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Icon Item"
-msgstr "ノードã®åå‰ã‚’変更"
+msgstr "アイコンアイテムåã®å¤‰æ›´"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Stylebox Item"
-msgstr "é¸æŠžã—ãŸã‚¢ã‚¤ãƒ†ãƒ ã‚’å–り除ã"
+msgstr "StyleBox アイテムåã®å¤‰æ›´"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Invalid file, not a Theme resource."
-msgstr "無効ãªãƒ•ァイルã§ã™ã€‚オーディオãƒã‚¹ã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã§ã¯ã‚りã¾ã›ã‚“。"
+msgstr "無効ãªãƒ•ァイルã§ã™ã€‚テーマ リソースã§ã¯ã‚りã¾ã›ã‚“。"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Invalid file, same as the edited Theme resource."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Theme Items"
-msgstr "テンプレートã®ç®¡ç†"
+msgstr "テーマ アイテムã®ç®¡ç†"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Edit Items"
-msgstr "編集å¯èƒ½ãªã‚¢ã‚¤ãƒ†ãƒ "
+msgstr "アイテムを編集"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Types:"
msgstr "åž‹:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type:"
-msgstr "åž‹:"
+msgstr "型を追加:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item:"
-msgstr "アイテムを追加"
+msgstr "アイテムを追加:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add StyleBox Item"
-msgstr "ã™ã¹ã¦ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’追加"
+msgstr "StyleBox アイテムã®è¿½åŠ "
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Items:"
-msgstr "アイテムを除去"
+msgstr "アイテムを除去:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Class Items"
msgstr "クラスアイテム削除"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Items"
-msgstr "クラスアイテム削除"
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Items"
msgstr "ã™ã¹ã¦ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’除去"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Theme Item"
-msgstr "GUIテーマã®ã‚¢ã‚¤ãƒ†ãƒ "
+msgstr "テーマ アイテムを追加"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Old Name:"
-msgstr "ノードå:"
+msgstr "æ—§å:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Items"
-msgstr "テーマã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
+msgstr "アイテムã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Theme"
-msgstr "デフォルト"
+msgstr "デフォルトã®ãƒ†ãƒ¼ãƒž"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Editor Theme"
-msgstr "テーマを編集"
+msgstr "エディターã®ãƒ†ãƒ¼ãƒž"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select Another Theme Resource:"
-msgstr "リソースを削除"
+msgstr "ä»–ã®ãƒ†ãƒ¼ãƒžãƒªã‚½ãƒ¼ã‚¹ã®é¸æŠž:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Another Theme"
-msgstr "テーマã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
+msgstr "ä»–ã®ãƒ†ãƒ¼ãƒž"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Confirm Item Rename"
-msgstr "Anim トラックåã®å¤‰æ›´"
+msgstr "アイテムå変更ã®ç¢ºèª"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Cancel Item Rename"
-msgstr "åå‰ã®ä¸€æ‹¬å¤‰æ›´"
+msgstr "アイテムå変更をキャンセル"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override Item"
-msgstr "上書ã"
+msgstr "アイテムを上書ã"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Unpin this StyleBox as a main style."
@@ -8967,51 +8952,44 @@ msgid "Node Types:"
msgstr "ノードタイプ"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Show Default"
-msgstr "デフォルトを読込む"
+msgstr "デフォルトã®è¡¨ç¤º"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Show default type items alongside items that have been overridden."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override All"
-msgstr "上書ã"
+msgstr "ã™ã¹ã¦ä¸Šæ›¸ã"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Override all default type items."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Theme:"
-msgstr "テーマ"
+msgstr "テーマ:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Items..."
-msgstr "エクスãƒãƒ¼ãƒˆãƒ†ãƒ³ãƒ—レートã®ç®¡ç†..."
+msgstr "アイテムを管ç†..."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add, remove, organize and import Theme items."
-msgstr ""
+msgstr "テーマアイテムã®è¿½åŠ ã€å‰Šé™¤ã€æ•´ç†ã€ã‚¤ãƒ³ãƒãƒ¼ãƒˆã‚’ã™ã‚‹ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Preview"
-msgstr "プレビュー"
+msgstr "プレビューを追加"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Preview"
-msgstr "プレビューを更新"
+msgstr "デフォルトã®ãƒ—レビュー"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select UI Scene:"
-msgstr "ã‚½ãƒ¼ã‚¹ãƒ¡ãƒƒã‚·ãƒ¥ã‚’é¸æŠž:"
+msgstr "UIシーンã®é¸æŠž:"
#: editor/plugins/theme_editor_preview.cpp
msgid ""
@@ -9025,7 +9003,7 @@ msgstr "切り替ãˆãƒœã‚¿ãƒ³"
#: editor/plugins/theme_editor_preview.cpp
msgid "Disabled Button"
-msgstr "ボタンを無効ã«ã™ã‚‹"
+msgstr "無効ãªãƒœã‚¿ãƒ³"
#: editor/plugins/theme_editor_preview.cpp
msgid "Item"
@@ -9070,15 +9048,15 @@ msgstr "サブアイテム 2"
#: editor/plugins/theme_editor_preview.cpp
msgid "Has"
-msgstr "å«ã‚“ã§ã„ã‚‹"
+msgstr "Has"
#: editor/plugins/theme_editor_preview.cpp
msgid "Many"
-msgstr "多ãã®"
+msgstr "Many"
#: editor/plugins/theme_editor_preview.cpp
msgid "Disabled LineEdit"
-msgstr "ライン編集を無効ã«ã™ã‚‹"
+msgstr "無効㪠LineEdit"
#: editor/plugins/theme_editor_preview.cpp
msgid "Tab 1"
@@ -9110,12 +9088,11 @@ msgstr ""
#: editor/plugins/theme_editor_preview.cpp
msgid "Invalid PackedScene resource, must have a Control node at its root."
-msgstr ""
+msgstr "無効㪠PackedScene リソースã§ã™ã€‚ルートã«ã¯ Control ノードãŒå¿…è¦ã§ã™ã€‚"
#: editor/plugins/theme_editor_preview.cpp
-#, fuzzy
msgid "Invalid file, not a PackedScene resource."
-msgstr "無効ãªãƒ•ァイルã§ã™ã€‚オーディオãƒã‚¹ã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã§ã¯ã‚りã¾ã›ã‚“。"
+msgstr "無効ãªãƒ•ァイルã§ã™ã€‚PackedScene ã®ãƒªã‚½ãƒ¼ã‚¹ã§ã¯ã‚りã¾ã›ã‚“。"
#: editor/plugins/theme_editor_preview.cpp
msgid "Reload the scene to reflect its most actual state."
@@ -9189,16 +9166,16 @@ msgid ""
"Shift+LMB: Line Draw\n"
"Shift+Command+LMB: Rectangle Paint"
msgstr ""
-"Shift+左マウスボタン: ç›´ç·šã«æã\n"
-"Shift+Command+左マウスボタン: 長方形ペイント"
+"Shift+左クリック: ç›´ç·šã«æã\n"
+"Shift+Command+左クリック: 長方形ペイント"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid ""
"Shift+LMB: Line Draw\n"
"Shift+Ctrl+LMB: Rectangle Paint"
msgstr ""
-"Shift+左マウスボタン: ç›´ç·šã«æã\n"
-"Shift+Ctrl+左マウスボタン: 長方形ペイント"
+"Shift+左クリック: ç›´ç·šã«æã\n"
+"Shift+Ctrl+左クリック: 長方形ペイント"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Pick Tile"
@@ -9386,7 +9363,7 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove selected texture? This will remove all tiles which use it."
msgstr ""
-"é¸æŠžã—ãŸãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’除去ã—ã¾ã™ã‹? ã“れを使用ã—ã¦ã„ã‚‹ã™ã¹ã¦ã®ã‚¿ã‚¤ãƒ«ã¯é™¤åŽ»ã•れ"
+"é¸æŠžã—ãŸãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’除去ã—ã¾ã™ã‹ï¼Ÿ ã“れを使用ã—ã¦ã„ã‚‹ã™ã¹ã¦ã®ã‚¿ã‚¤ãƒ«ã¯é™¤åŽ»ã•れ"
"ã¾ã™ã€‚"
#: editor/plugins/tile_set_editor_plugin.cpp
@@ -9578,7 +9555,7 @@ msgstr "ステージã«è¿½åŠ ã•れã¦ã„るファイルãŒã‚りã¾ã›ã‚“"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "Commit"
-msgstr "委託"
+msgstr "コミット"
#: editor/plugins/version_control_editor_plugin.cpp
msgid "VCS Addon is not initialized"
@@ -9718,7 +9695,7 @@ msgstr "入力デフォルトãƒãƒ¼ãƒˆã®è¨­å®š"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node to Visual Shader"
-msgstr "ビジュアルシェーダã«ãƒŽãƒ¼ãƒ‰ã‚’追加"
+msgstr "ビジュアルシェーダーã«ãƒŽãƒ¼ãƒ‰ã‚’追加"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Node(s) Moved"
@@ -9739,7 +9716,7 @@ msgstr "ノードを削除"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Visual Shader Input Type Changed"
-msgstr "ビジュアルシェーダã®å…¥åŠ›ã‚¿ã‚¤ãƒ—ãŒå¤‰æ›´ã•れã¾ã—ãŸ"
+msgstr "ビジュアルシェーダーã®å…¥åŠ›ã‚¿ã‚¤ãƒ—ãŒå¤‰æ›´ã•れã¾ã—ãŸ"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "UniformRef Name Changed"
@@ -9879,7 +9856,7 @@ msgstr "ãれ以下(<=)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Not Equal (!=)"
-msgstr "ç­‰ã—ããªã„(!=)"
+msgstr "ç­‰ã—ããªã„ (!=)"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9926,7 +9903,7 @@ msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "'%s' input parameter for fragment and light shader modes."
-msgstr "フラグメントモードã¨ãƒ©ã‚¤ãƒˆã‚·ã‚§ãƒ¼ãƒ€ãƒ¢ãƒ¼ãƒ‰ã® '%s' 入力パラメーター。"
+msgstr "フラグメントモードã¨ãƒ©ã‚¤ãƒˆã‚·ã‚§ãƒ¼ãƒ€ãƒ¼ãƒ¢ãƒ¼ãƒ‰ã® '%s' 入力パラメーター。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "'%s' input parameter for fragment shader mode."
@@ -9938,7 +9915,7 @@ msgstr "ライトシェーダーモード㮠'%s' 入力パラメータ。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "'%s' input parameter for vertex shader mode."
-msgstr "頂点シェーダモード㮠'%s' 入力パラメータ。"
+msgstr "頂点シェーダーモード㮠'%s' 入力パラメータ。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "'%s' input parameter for vertex and fragment shader mode."
@@ -10511,13 +10488,12 @@ msgid "VisualShader"
msgstr "VisualShader"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Edit Visual Property:"
-msgstr "ビジュアルプロパティを編集"
+msgstr "ビジュアルプロパティを編集:"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Visual Shader Mode Changed"
-msgstr "ビジュアルシェーダモードãŒå¤‰æ›´ã•れã¾ã—ãŸ"
+msgstr "ビジュアルシェーダーモードãŒå¤‰æ›´ã•れã¾ã—ãŸ"
#: editor/project_export.cpp
msgid "Runnable"
@@ -10525,7 +10501,7 @@ msgstr "実行å¯èƒ½"
#: editor/project_export.cpp
msgid "Delete preset '%s'?"
-msgstr "プリセット '%s' を削除ã—ã¾ã™ã‹?"
+msgstr "プリセット '%s' を削除ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/project_export.cpp
msgid ""
@@ -10615,7 +10591,7 @@ msgid ""
"(comma-separated, e.g: *.json, *.txt, docs/*)"
msgstr ""
"リソース以外ã®ãƒ•ァイル/フォルダをエクスãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã®ãƒ•ィルタ\n"
-"(コンマã§åŒºåˆ‡ã‚‹ã€ 例: *.json,*.txt,docs/*)"
+"(コンマ区切り〠例: *.json, *.txt, docs/*)"
#: editor/project_export.cpp
msgid ""
@@ -10623,7 +10599,7 @@ msgid ""
"(comma-separated, e.g: *.json, *.txt, docs/*)"
msgstr ""
"プロジェクトã‹ã‚‰ãƒ•ァイル/フォルダを除外ã™ã‚‹ãƒ•ィルタ\n"
-"(コンマã§åŒºåˆ‡ã‚‹ã€ 例: *.json,*.txt,docs/*)"
+"(コンマ区切り〠例: *.json, *.txt, docs/*)"
#: editor/project_export.cpp
msgid "Features"
@@ -10642,9 +10618,8 @@ msgid "Script"
msgstr "スクリプト"
#: editor/project_export.cpp
-#, fuzzy
msgid "GDScript Export Mode:"
-msgstr "スクリプトã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆãƒ¢ãƒ¼ãƒ‰:"
+msgstr "GDScript ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆãƒ¢ãƒ¼ãƒ‰:"
#: editor/project_export.cpp
msgid "Text"
@@ -10652,21 +10627,19 @@ msgstr "テキスト"
#: editor/project_export.cpp
msgid "Compiled Bytecode (Faster Loading)"
-msgstr ""
+msgstr "コンパイルã•れãŸãƒã‚¤ãƒˆã‚³ãƒ¼ãƒ‰ (より高速ãªãƒ­ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°)"
#: editor/project_export.cpp
msgid "Encrypted (Provide Key Below)"
msgstr "æš—å·åŒ–(下ã«ã‚­ãƒ¼ã‚’入力)"
#: editor/project_export.cpp
-#, fuzzy
msgid "Invalid Encryption Key (must be 64 hexadecimal characters long)"
-msgstr "ç„¡åŠ¹ãªæš—å·åŒ–キー(64文字ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™)"
+msgstr "ç„¡åŠ¹ãªæš—å·åŒ–キー (16進数ã§64文字ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™)"
#: editor/project_export.cpp
-#, fuzzy
msgid "GDScript Encryption Key (256-bits as hexadecimal):"
-msgstr "スクリプト暗å·åŒ–キー(16進数ã§256ビット):"
+msgstr "GDScript æš—å·åŒ–キー (16進数ã§256ビット):"
#: editor/project_export.cpp
msgid "Export PCK/Zip"
@@ -10741,7 +10714,6 @@ msgid "Imported Project"
msgstr "インãƒãƒ¼ãƒˆã•れãŸãƒ—ロジェクト"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project name."
msgstr "無効ãªãƒ—ロジェクトåã§ã™ã€‚"
@@ -10787,7 +10759,7 @@ msgstr "次ã®ãƒ•ァイルをパッケージã‹ã‚‰æŠ½å‡ºã§ãã¾ã›ã‚“ã§ã—ãŸ
#: editor/project_manager.cpp
msgid "Package installed successfully!"
-msgstr "パッケージã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã«æˆåŠŸã—ã¾ã—ãŸ!"
+msgstr "パッケージã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã«æˆåŠŸã—ã¾ã—ãŸï¼"
#: editor/project_manager.cpp
msgid "Rename Project"
@@ -10892,7 +10864,7 @@ msgstr "次ã®å ´æ‰€ã®ãƒ—ロジェクトを開ã‘ã¾ã›ã‚“ '%s'。"
#: editor/project_manager.cpp
msgid "Are you sure to open more than one project?"
-msgstr "複数ã®ãƒ—ロジェクトを開ã„ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹?"
+msgstr "複数ã®ãƒ—ロジェクトを開ã„ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹ï¼Ÿ"
#: editor/project_manager.cpp
msgid ""
@@ -10930,7 +10902,7 @@ msgstr ""
"\n"
"%s\n"
"\n"
-"変æ›ã—ã¾ã™ã‹?\n"
+"変æ›ã—ã¾ã™ã‹ï¼Ÿ\n"
"警告: ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã¯æ—§ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¨ãƒ³ã‚¸ãƒ³ã§é–‹ãã“ã¨ãŒã§ããªããªã‚Šã¾ã™ã€‚"
#: editor/project_manager.cpp
@@ -10961,24 +10933,22 @@ msgstr ""
#: editor/project_manager.cpp
msgid "Are you sure to run %d projects at once?"
-msgstr "%d個ã®ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã‚’åŒæ™‚ã«å®Ÿè¡Œã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹?"
+msgstr "%d個ã®ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã‚’åŒæ™‚ã«å®Ÿè¡Œã—ã¦ã‚‚よã‚ã—ã„ã§ã™ã‹ï¼Ÿ"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove %d projects from the list?"
-msgstr "一覧ã‹ã‚‰ãƒ‡ãƒã‚¤ã‚¹ã‚’é¸æŠž"
+msgstr "リストã‹ã‚‰ %d 個ã®ãƒ—ロジェクトを除去ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove this project from the list?"
-msgstr "一覧ã‹ã‚‰ãƒ‡ãƒã‚¤ã‚¹ã‚’é¸æŠž"
+msgstr "ã“ã®ãƒ—ロジェクトをリストã‹ã‚‰é™¤åŽ»ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/project_manager.cpp
msgid ""
"Remove all missing projects from the list?\n"
"The project folders' contents won't be modified."
msgstr ""
-"見ã¤ã‹ã‚‰ãªã„ã™ã¹ã¦ã®ãƒ—ロジェクトを一覧ã‹ã‚‰å‰Šé™¤ã—ã¾ã™ã‹?\n"
+"見ã¤ã‹ã‚‰ãªã„ã™ã¹ã¦ã®ãƒ—ロジェクトを一覧ã‹ã‚‰å‰Šé™¤ã—ã¾ã™ã‹ï¼Ÿ\n"
"プロジェクトフォルダã®å†…容ã¯å¤‰æ›´ã•れã¾ã›ã‚“。"
#: editor/project_manager.cpp
@@ -10995,7 +10965,7 @@ msgid ""
"Are you sure to scan %s folders for existing Godot projects?\n"
"This could take a while."
msgstr ""
-"既存ã®Godotプロジェクトã®%sフォルダをスキャンã—ã¾ã™ã‹?\n"
+"既存ã®Godotプロジェクトã®%sフォルダをスキャンã—ã¾ã™ã‹ï¼Ÿ\n"
"ã“れã«ã¯ã—ã°ã‚‰ã時間ãŒã‹ã‹ã‚Šã¾ã™ã€‚"
#. TRANSLATORS: This refers to the application where users manage their Godot projects.
@@ -11004,9 +10974,8 @@ msgid "Project Manager"
msgstr "プロジェクトマãƒãƒ¼ã‚¸ãƒ£ãƒ¼"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Local Projects"
-msgstr "プロジェクト"
+msgstr "ローカル プロジェクト"
#: editor/project_manager.cpp
msgid "Loading, please wait..."
@@ -11017,23 +10986,20 @@ msgid "Last Modified"
msgstr "最終更新"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Edit Project"
-msgstr "プロジェクトã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ"
+msgstr "プロジェクトを編集"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Run Project"
-msgstr "プロジェクトåã®å¤‰æ›´"
+msgstr "プロジェクトを実行"
#: editor/project_manager.cpp
msgid "Scan"
msgstr "スキャン"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Scan Projects"
-msgstr "プロジェクト"
+msgstr "プロジェクトをスキャン"
#: editor/project_manager.cpp
msgid "Select a Folder to Scan"
@@ -11044,14 +11010,12 @@ msgid "New Project"
msgstr "æ–°è¦ãƒ—ロジェクト"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Import Project"
-msgstr "インãƒãƒ¼ãƒˆã•れãŸãƒ—ロジェクト"
+msgstr "プロジェクトをインãƒãƒ¼ãƒˆ"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove Project"
-msgstr "プロジェクトåã®å¤‰æ›´"
+msgstr "プロジェクトを除去"
#: editor/project_manager.cpp
msgid "Remove Missing"
@@ -11062,9 +11026,8 @@ msgid "About"
msgstr "概è¦"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Asset Library Projects"
-msgstr "アセットライブラリ"
+msgstr "アセットライブラリã®ãƒ—ロジェクト"
#: editor/project_manager.cpp
msgid "Restart Now"
@@ -11076,7 +11039,7 @@ msgstr "ã™ã¹ã¦é™¤åŽ»"
#: editor/project_manager.cpp
msgid "Also delete project contents (no undo!)"
-msgstr ""
+msgstr "プロジェクトã®å†…容も削除ã•れã¾ã™ (ã‚‚ã¨ã«æˆ»ã›ã¾ã›ã‚“ï¼)"
#: editor/project_manager.cpp
msgid "Can't run project"
@@ -11091,19 +11054,17 @@ msgstr ""
"アセットライブラリã§å…¬å¼ã®ã‚µãƒ³ãƒ—ルプロジェクトをãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Filter projects"
-msgstr "フィルタプロパティ"
+msgstr "プロジェクトã®ãƒ•ィルタ"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"This field filters projects by name and last path component.\n"
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
-"検索ボックスã§ã¯ã€ãƒ—ロジェクトã¯åå‰ãŠã‚ˆã³ãƒ‘ã‚¹ã®æœ€å¾Œã®éƒ¨åˆ†ã§ãƒ•ィルターã•れã¾"
-"ã™ã€‚\n"
+"ã“ã®ãƒ•ィールドã¯ã€ãƒ—ロジェクトåã¨ãƒ‘ã‚¹ã®æœ€å¾Œã®éƒ¨åˆ†ã§ãƒ—ロジェクトをフィルタリ"
+"ングã—ã¾ã™ã€‚\n"
"プロジェクトåãŠã‚ˆã³å®Œå…¨ãƒ‘スã§ãƒ•ィルターã™ã‚‹ã«ã¯ã€ã‚¯ã‚¨ãƒªã«ã¯ `/` 文字ãŒå°‘ãªã"
"ã¨ã‚‚1ã¤å¿…è¦ã§ã™ã€‚"
@@ -11261,7 +11222,7 @@ msgstr "グローãƒãƒ«ãƒ—ロパティを追加"
#: editor/project_settings_editor.cpp
msgid "Select a setting item first!"
-msgstr "è¨­å®šé …ç›®ã‚’é¸æŠžã—ã¦ãã ã•ã„!"
+msgstr "è¨­å®šé …ç›®ã‚’é¸æŠžã—ã¦ãã ã•ã„ï¼"
#: editor/project_settings_editor.cpp
msgid "No property '%s' exists."
@@ -11304,9 +11265,8 @@ msgid "Override for Feature"
msgstr "機能ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Add %d Translations"
-msgstr "翻訳を追加"
+msgstr "%d 個ã®ç¿»è¨³ã‚’追加"
#: editor/project_settings_editor.cpp
msgid "Remove Translation"
@@ -11439,9 +11399,8 @@ msgid "Plugins"
msgstr "プラグイン"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Import Defaults"
-msgstr "デフォルトを読込む"
+msgstr "インãƒãƒ¼ãƒˆã®æ—¢å®šå€¤"
#: editor/property_editor.cpp
msgid "Preset..."
@@ -11477,7 +11436,7 @@ msgstr "ãƒŽãƒ¼ãƒ‰ã‚’é¸æŠž"
#: editor/property_editor.cpp
msgid "Error loading file: Not a resource!"
-msgstr "ファイル読ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼: リソースã§ã¯ã‚りã¾ã›ã‚“!"
+msgstr "ファイル読ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼: リソースã§ã¯ã‚りã¾ã›ã‚“ï¼"
#: editor/property_editor.cpp
msgid "Pick a Node"
@@ -11750,7 +11709,7 @@ msgstr "%d ノードを削除ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/scene_tree_dock.cpp
msgid "Delete the root node \"%s\"?"
-msgstr "ルートノード \"%s\" を削除ã—ã¾ã™ã‹?"
+msgstr "ルートノード \"%s\" を削除ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/scene_tree_dock.cpp
msgid "Delete node \"%s\" and its children?"
@@ -11764,12 +11723,16 @@ msgstr "\"%s\" ノードを削除ã—ã¾ã™ã‹ï¼Ÿ"
msgid ""
"Saving the branch as a scene requires having a scene open in the editor."
msgstr ""
+"ブランãƒã‚’シーンã¨ã—ã¦ä¿å­˜ã™ã‚‹ã«ã¯ã€ã‚¨ãƒ‡ã‚£ã‚¿ã§ã‚·ãƒ¼ãƒ³ã‚’é–‹ã„ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾"
+"ã™ã€‚"
#: editor/scene_tree_dock.cpp
msgid ""
"Saving the branch as a scene requires selecting only one node, but you have "
"selected %d nodes."
msgstr ""
+"ブランãƒã‚’シーンã¨ã—ã¦ä¿å­˜ã™ã‚‹ã«ã¯ã€1ã¤ã ã‘ãƒŽãƒ¼ãƒ‰ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚りã¾"
+"ã™ã€‚%d 個ã®ãƒŽãƒ¼ãƒ‰ãŒé¸æŠžã•れã¦ã„ã¾ã™ã€‚"
#: editor/scene_tree_dock.cpp
msgid ""
@@ -11836,11 +11799,11 @@ msgstr "ãã®ä»–ã®ãƒŽãƒ¼ãƒ‰"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes from a foreign scene!"
-msgstr "別ã®ã‚·ãƒ¼ãƒ³ã‹ã‚‰ãƒŽãƒ¼ãƒ‰ã‚’æ“作ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“!"
+msgstr "別ã®ã‚·ãƒ¼ãƒ³ã‹ã‚‰ãƒŽãƒ¼ãƒ‰ã‚’æ“作ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ï¼"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes the current scene inherits from!"
-msgstr "ç¾åœ¨ã®ã‚·ãƒ¼ãƒ³ãŒç¶™æ‰¿ã—ã¦ã„るノードをæ“作ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“!"
+msgstr "ç¾åœ¨ã®ã‚·ãƒ¼ãƒ³ãŒç¶™æ‰¿ã—ã¦ã„るノードをæ“作ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ï¼"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on instanced scenes."
@@ -11977,7 +11940,7 @@ msgstr "ローカル"
#: editor/scene_tree_dock.cpp
msgid "Clear Inheritance? (No Undo!)"
-msgstr "継承をクリアã—ã¾ã™ã‹? (å…ƒã«æˆ»ã›ã¾ã›ã‚“!)"
+msgstr "継承をクリアã—ã¾ã™ã‹ï¼Ÿ (å…ƒã«æˆ»ã›ã¾ã›ã‚“ï¼)"
#: editor/scene_tree_editor.cpp
msgid "Toggle Visible"
@@ -12041,7 +12004,7 @@ msgid ""
"Click to make selectable."
msgstr ""
"å­ã‚’é¸æŠžã§ãã¾ã›ã‚“。\n"
-"クリックã—ã¦é¸æŠžå¯èƒ½ã«ã—ã¦ãã ã•ã„。"
+"クリックã§é¸æŠžå¯èƒ½ã«ã™ã‚‹ã€‚"
#: editor/scene_tree_editor.cpp
msgid "Toggle Visibility"
@@ -12069,7 +12032,7 @@ msgstr "シーンツリー(ノード):"
#: editor/scene_tree_editor.cpp
msgid "Node Configuration Warning!"
-msgstr "ノードã®è¨­å®šã«é–¢ã™ã‚‹è­¦å‘Š!"
+msgstr "ノードã®è¨­å®šã«é–¢ã™ã‚‹è­¦å‘Šï¼"
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -12188,6 +12151,7 @@ msgid ""
"Warning: Having the script name be the same as a built-in type is usually "
"not desired."
msgstr ""
+"警告: スクリプトåを組ã¿è¾¼ã¿åž‹ã¨åŒã˜ã«ã™ã‚‹ã“ã¨ã¯ã€é€šå¸¸ã¯æœ›ã¾ã—ãã‚りã¾ã›ã‚“。"
#: editor/script_create_dialog.cpp
msgid "Class Name:"
@@ -12259,7 +12223,7 @@ msgstr "エラーをコピー"
#: editor/script_editor_debugger.cpp
msgid "Open C++ Source on GitHub"
-msgstr ""
+msgstr "C++ã®ã‚½ãƒ¼ã‚¹ã‚’GitHubã§é–‹ã"
#: editor/script_editor_debugger.cpp
msgid "Video RAM"
@@ -12438,14 +12402,22 @@ msgid "Change Ray Shape Length"
msgstr "レイシェイプã®é•·ã•を変更"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Room Point Position"
-msgstr "カーブãƒã‚¤ãƒ³ãƒˆã®ä½ç½®ã‚’設定"
+msgstr "Room ãƒã‚¤ãƒ³ãƒˆã®ä½ç½®ã‚’設定"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Portal Point Position"
-msgstr "カーブãƒã‚¤ãƒ³ãƒˆã®ä½ç½®ã‚’設定"
+msgstr "Portal ãƒã‚¤ãƒ³ãƒˆã®ä½ç½®ã‚’設定"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "円柱シェイプã®åŠå¾„を変更"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "曲線ã®In-Controlã®ä½ç½®ã‚’指定"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -12521,7 +12493,7 @@ msgstr "GDNative"
#: modules/gdscript/gdscript_functions.cpp
msgid "Step argument is zero!"
-msgstr "ステップ引数ã¯ã‚¼ãƒ­ã§ã™!"
+msgstr "ステップ引数ã¯ã‚¼ãƒ­ã§ã™ï¼"
#: modules/gdscript/gdscript_functions.cpp
msgid "Not a script with an instance"
@@ -12556,14 +12528,12 @@ msgid "Object can't provide a length."
msgstr "オブジェクトã«é•·ã•ãŒã‚りã¾ã›ã‚“."
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "Export Mesh GLTF2"
-msgstr "メッシュライブラリã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ"
+msgstr "メッシュ㮠GLTF2 エクスãƒãƒ¼ãƒˆ"
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "Export GLTF..."
-msgstr "エクスãƒãƒ¼ãƒˆ..."
+msgstr "GLTF をエクスãƒãƒ¼ãƒˆ..."
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
@@ -12606,9 +12576,8 @@ msgid "GridMap Paint"
msgstr "GridMap ペイント"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Selection"
-msgstr "GridMap é¸æŠžç¯„å›²ã‚’åŸ‹ã‚ã‚‹"
+msgstr "GridMap ã®é¸æŠž"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
@@ -12725,14 +12694,18 @@ msgid "Post processing"
msgstr "後処ç†"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "å…‰æºã‚’æç”»ä¸­:"
+msgstr "ライトマップをæç”»ä¸­:"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
msgstr "クラスåを予約キーワードã«ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "é¸æŠžéƒ¨ã®å¡—り潰ã—"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "内部例外スタックトレースã®çµ‚了"
@@ -12795,7 +12768,7 @@ msgstr "ジオメトリを解æžã—ã¦ã„ã¾ã™..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Done!"
-msgstr "完了!"
+msgstr "完了ï¼"
#: modules/visual_script/visual_script.cpp
msgid ""
@@ -12803,7 +12776,7 @@ msgid ""
"properly!"
msgstr ""
"作業メモリãªã—ã§ãƒŽãƒ¼ãƒ‰ãŒç”Ÿæˆã•れã¾ã—ãŸã€‚æ­£ã—ã生æˆã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€ãƒ‰ã‚­ãƒ¥"
-"メントをå‚ç…§ã—ã¦ãã ã•ã„!"
+"メントをå‚ç…§ã—ã¦ãã ã•ã„ï¼"
#: modules/visual_script/visual_script.cpp
msgid ""
@@ -12828,7 +12801,7 @@ msgstr "ノードã¯ç„¡åйãªã‚·ãƒ¼ã‚¯ã‚¨ãƒ³ã‚¹å‡ºåŠ›ã‚’è¿”ã—ã¾ã—ãŸ: "
msgid "Found sequence bit but not the node in the stack, report bug!"
msgstr ""
"スタックã«ã‚·ãƒ¼ã‚¯ã‚¨ãƒ³ã‚¹ãƒ“ットを見ã¤ã‘ã¾ã—ãŸãŒã€ãƒŽãƒ¼ãƒ‰ã§ã¯ã‚りã¾ã›ã‚“。ãƒã‚°å ±å‘Š"
-"ã‚’!"
+"ã‚’ï¼"
#: modules/visual_script/visual_script.cpp
msgid "Stack overflow with stack depth: "
@@ -12863,14 +12836,12 @@ msgid "Add Output Port"
msgstr "出力ãƒãƒ¼ãƒˆã‚’追加"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Type"
-msgstr "型を変更"
+msgstr "ãƒãƒ¼ãƒˆã®åž‹ã‚’変更"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Name"
-msgstr "入力ãƒãƒ¼ãƒˆåã®å¤‰æ›´"
+msgstr "ãƒãƒ¼ãƒˆåを変更"
#: modules/visual_script/visual_script_editor.cpp
msgid "Override an existing built-in function."
@@ -12988,7 +12959,6 @@ msgid "Add Preload Node"
msgstr "プリロードノードを追加"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Node(s)"
msgstr "ノードを追加"
@@ -13175,7 +13145,7 @@ msgstr "インデックスプロパティåãŒç„¡åйã§ã™ã€‚"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Base object is not a Node!"
-msgstr "ベースオブジェクトã¯ãƒŽãƒ¼ãƒ‰ã§ã¯ã‚りã¾ã›ã‚“!"
+msgstr "ベースオブジェクトã¯ãƒŽãƒ¼ãƒ‰ã§ã¯ã‚りã¾ã›ã‚“ï¼"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Path does not lead Node!"
@@ -13221,73 +13191,67 @@ msgstr "VisualScriptを検索"
msgid "Get %s"
msgstr "%s ã‚’å–å¾—"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "パッケージåãŒã‚りã¾ã›ã‚“。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "パッケージセグメントã®é•·ã•ã¯0以外ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "文字 '%s' ã¯Androidアプリケーション パッケージåã«ä½¿ç”¨ã§ãã¾ã›ã‚“。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "数字をパッケージセグメントã®å…ˆé ­ã«ä½¿ç”¨ã§ãã¾ã›ã‚“。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "文字 '%s' ã¯ãƒ‘ッケージ セグメントã®å…ˆé ­ã«ä½¿ç”¨ã§ãã¾ã›ã‚“。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "パッケージã«ã¯ä¸€ã¤ä»¥ä¸Šã®åŒºåˆ‡ã‚Šæ–‡å­— '.' ãŒå¿…è¦ã§ã™ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "一覧ã‹ã‚‰ãƒ‡ãƒã‚¤ã‚¹ã‚’é¸æŠž"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
-msgstr ""
+msgstr "%s ã§å®Ÿè¡Œä¸­"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
-msgstr "ã™ã¹ã¦ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ"
+msgstr "APKをエクスãƒãƒ¼ãƒˆä¸­..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
-msgstr "アンインストール"
+msgstr "アンインストール中..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
-msgstr "読ã¿è¾¼ã¿ä¸­ã€ã—ã°ã‚‰ããŠå¾…ã¡ãã ã•ã„..."
+msgstr "デãƒã‚¤ã‚¹ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ä¸­ã€ã—ã°ã‚‰ããŠå¾…ã¡ãã ã•ã„..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
-msgstr "サブプロセスを開始ã§ãã¾ã›ã‚“ã§ã—ãŸ!"
+msgstr "デãƒã‚¤ã‚¹ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§ãã¾ã›ã‚“ã§ã—ãŸ: %s"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
-msgstr "カスタムスクリプトã®å®Ÿè¡Œä¸­..."
+msgstr "デãƒã‚¤ã‚¹ã§å®Ÿè¡Œä¸­..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
-msgstr "フォルダを作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
+msgstr "デãƒã‚¤ã‚¹ã§å®Ÿè¡Œã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "'apksigner' ツールãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13295,63 +13259,63 @@ msgstr ""
"Android ビルド テンプレートãŒãƒ—ロジェクトã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã¾ã›ã‚“。[プロ"
"ジェクト] メニューã‹ã‚‰ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¾ã™ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr "デãƒãƒƒã‚°ã‚­ãƒ¼ã‚¹ãƒˆã‚¢ãŒã‚¨ãƒ‡ã‚£ã‚¿è¨­å®šã«ã‚‚プリセットã«ã‚‚設定ã•れã¦ã„ã¾ã›ã‚“。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr "エクスãƒãƒ¼ãƒˆè¨­å®šã«ã¦ãƒªãƒªãƒ¼ã‚¹ キーストアãŒèª¤ã£ã¦è¨­å®šã•れã¦ã„ã¾ã™ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr "エディタ設定ã§Android SDKãƒ‘ã‚¹ã®æŒ‡å®šãŒå¿…è¦ã§ã™ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "エディタ設定ã®Android SDKパスãŒç„¡åйã§ã™ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "'platform-tools' ディレクトリãŒã‚りã¾ã›ã‚“ï¼"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "Android SDK platform-toolsã®adbコマンドãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr "ã‚¨ãƒ‡ã‚£ã‚¿è¨­å®šã§æŒ‡å®šã•れãŸAndroid SDKã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’確èªã—ã¦ãã ã•ã„。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "'build-tools' ディレクトリãŒã‚りã¾ã›ã‚“ï¼"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr "Android SDK build-toolsã®apksignerコマンドãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "APK expansion ã®å…¬é–‹éµãŒç„¡åйã§ã™ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "無効ãªãƒ‘ッケージå:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13359,99 +13323,82 @@ msgstr ""
"「android/modulesã€ã«å«ã¾ã‚Œã‚‹ã€ŒGodotPaymentV3ã€ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®ãƒ—ロジェクト設定ãŒ"
"無効ã§ã™ (Godot 3.2.2 ã«ã¦å¤‰æ›´)。\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
"プラグインを利用ã™ã‚‹ã«ã¯ã€ŒUse Custom Build (カスタムビルドを使用ã™ã‚‹)ã€ãŒæœ‰åй"
"ã«ãªã£ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚"
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Degrees Of Freedom\" 㯠\"Xr Mode\" ㌠\"Oculus Mobile VR\" ã®å ´åˆã«ã®ã¿æœ‰"
-"効ã«ãªã‚Šã¾ã™ã€‚"
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"Hand Tracking\" 㯠\"Xr Mode\" ㌠\"Oculus Mobile VR\" ã®å ´åˆã«ã®ã¿æœ‰åйã«ãª"
"りã¾ã™ã€‚"
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Focus Awareness\" 㯠\"Xr Mode\" ㌠\"Oculus Mobile VR\" ã®å ´åˆã«ã®ã¿æœ‰åйã«"
-"ãªã‚Šã¾ã™ã€‚"
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"\"Export AAB\" 㯠\"Use Custom Build\" ãŒæœ‰åйã§ã‚ã‚‹å ´åˆã«ã®ã¿æœ‰åйã«ãªã‚Šã¾ã™ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
"directory.\n"
"The resulting %s is unsigned."
msgstr ""
+"'apksigner' ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚\n"
+"ã“ã®ã‚³ãƒžãƒ³ãƒ‰ãŒ Android SDK build-tools ディレクトリã«ã‚ã‚‹ã‹ç¢ºèªã—ã¦ãã ã•"
+"ã„。\n"
+"%s ã¯ç½²åã•れã¾ã›ã‚“ã§ã—ãŸã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
-msgstr ""
+msgstr "デãƒãƒƒã‚° %s ã«ç½²å中..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
-msgstr ""
-"ファイルã®ã‚¹ã‚­ãƒ£ãƒ³ä¸­\n"
-"ã—ã°ã‚‰ããŠå¾…ã¡ä¸‹ã•ã„..."
+msgstr "リリース %s ã«ç½²å中..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
-msgstr "エクスãƒãƒ¼ãƒˆç”¨ã®ãƒ†ãƒ³ãƒ—レートを開ã‘ã¾ã›ã‚“ã§ã—ãŸ:"
+msgstr "キーストアãŒè¦‹ã¤ã‹ã‚‰ãªã„ãŸã‚ã€ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã§ãã¾ã›ã‚“。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
-msgstr ""
+msgstr "'apksigner' ãŒã‚¨ãƒ©ãƒ¼ #%d ã§çµ‚了ã—ã¾ã—ãŸ"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
-msgstr "%s を追加中..."
+msgstr "%s を検証中..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
-msgstr ""
+msgstr "'apksigner' ã«ã‚ˆã‚‹ %s ã®æ¤œè¨¼ã«å¤±æ•—ã—ã¾ã—ãŸã€‚"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
-msgstr "ã™ã¹ã¦ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ"
+msgstr "Android用ã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆä¸­"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
"無効ãªãƒ•ァイルåã§ã™ï¼ Android App Bundle ã«ã¯æ‹¡å¼µå­ *.aab ãŒå¿…è¦ã§ã™ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "APK Expansion 㯠Android App Bundle ã¨ã¯äº’æ›æ€§ãŒã‚りã¾ã›ã‚“。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "無効ãªãƒ•ァイルåã§ã™ï¼ Android APKã«ã¯æ‹¡å¼µå­ *.apk ãŒå¿…è¦ã§ã™ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
-msgstr ""
+msgstr "サãƒãƒ¼ãƒˆã•れã¦ã„ãªã„エクスãƒãƒ¼ãƒˆãƒ•ォーマットã§ã™ï¼\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13459,7 +13406,7 @@ msgstr ""
"カスタムビルドã•れãŸãƒ†ãƒ³ãƒ—レートã‹ã‚‰ãƒ“ルドã—よã†ã¨ã—ã¾ã—ãŸãŒã€ãã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³"
"情報ãŒå­˜åœ¨ã—ã¾ã›ã‚“。 「プロジェクトã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰å†ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¦ãã ã•ã„。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13472,26 +13419,25 @@ msgstr ""
"「プロジェクト ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰Androidビルドテンプレートをå†ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¦ã"
"ã ã•ã„。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
-msgstr "project.godotをプロジェクトパスã«ç”Ÿæˆã§ãã¾ã›ã‚“ã§ã—ãŸ"
+msgstr ""
+"プロジェクトファイルをgladleプロジェクトã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã§ãã¾ã›ã‚“ã§ã—ãŸ\n"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
-msgstr "ファイルを書ãè¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:"
+msgstr "拡張パッケージファイルを書ãè¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸï¼"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Androidãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã®æ§‹ç¯‰(gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13500,11 +13446,11 @@ msgstr ""
"ã¾ãŸã€Androidビルドã«ã¤ã„ã¦ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯ docs.godotengine.org ã‚’ã”覧ãã ã•"
"ã„。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "å‡ºåŠ›çµæžœã®ç§»å‹•中"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13512,24 +13458,23 @@ msgstr ""
"エクスãƒãƒ¼ãƒˆãƒ•ァイルã®ã‚³ãƒ”ーã¨åå‰ã®å¤‰æ›´ãŒã§ãã¾ã›ã‚“ã€‚å‡ºåŠ›çµæžœã‚’ã¿ã‚‹ã«ã¯"
"gradleã®ãƒ—ロジェクトディレクトリを確èªã—ã¦ãã ã•ã„。"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
-msgstr "見ã¤ã‹ã‚‰ãªã„アニメーション: '%s'"
+msgstr "見ã¤ã‹ã‚‰ãªã„パッケージ: %s"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
-msgstr "輪郭を作æˆã—ã¦ã„ã¾ã™..."
+msgstr "APK を作æˆã—ã¦ã„ã¾ã™..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
-msgstr "エクスãƒãƒ¼ãƒˆç”¨ã®ãƒ†ãƒ³ãƒ—レートを開ã‘ã¾ã›ã‚“ã§ã—ãŸ:"
+msgstr ""
+"エクスãƒãƒ¼ãƒˆã™ã‚‹ãƒ†ãƒ³ãƒ—レートAPKãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸ:\n"
+"%s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13537,21 +13482,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
-msgstr "%s を追加中..."
+msgstr "ファイルを追加中..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
-msgstr "ファイルを書ãè¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:"
+msgstr "プロジェクトファイルをエクスãƒãƒ¼ãƒˆã§ãã¾ã›ã‚“ã§ã—ãŸ"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "APKを最é©åŒ–..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13600,45 +13543,40 @@ msgid "Could not write file:"
msgstr "ファイルを書ãè¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file:"
-msgstr "ファイルを書ãè¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:"
+msgstr "ファイルを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read HTML shell:"
-msgstr "カスタムHTMLシェルを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:"
+msgstr "HTMLシェルを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not create HTTP server directory:"
-msgstr "フォルダを作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
+msgstr "HTTPサーãƒãƒ¼ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®ä½œæˆã«å¤±æ•—:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Error starting HTTP server:"
-msgstr "シーンをä¿å­˜ã™ã‚‹éš›ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ."
+msgstr "HTTPサーãƒãƒ¼ã®é–‹å§‹ã«å¤±æ•—:"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid bundle identifier:"
-msgstr "無効ãªè­˜åˆ¥å­:"
+msgstr "無効ãªãƒãƒ³ãƒ‰ãƒ«ID:"
#: platform/osx/export/export.cpp
msgid "Notarization: code signing required."
-msgstr ""
+msgstr "Notarization: コード署åãŒå¿…è¦ã§ã™ã€‚"
#: platform/osx/export/export.cpp
msgid "Notarization: hardened runtime required."
-msgstr ""
+msgstr "Notarization: hardened runtime ãŒå¿…è¦ã§ã™ã€‚"
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID name not specified."
-msgstr ""
+msgstr "Notarization: Apple ID åãŒæŒ‡å®šã•れã¦ã„ã¾ã›ã‚“。"
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID password not specified."
-msgstr ""
+msgstr "Notarization: Apple ID ãƒ‘ã‚¹ãƒ¯ãƒ¼ãƒ‰ãŒæŒ‡å®šã•れã¦ã„ã¾ã›ã‚“。"
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -13956,16 +13894,15 @@ msgstr "ARVROriginã¯å­ãƒŽãƒ¼ãƒ‰ã«ARVRCameraãŒå¿…è¦ã§ã™ã€‚"
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "メッシュã¨ãƒ©ã‚¤ãƒˆã‚’検索中"
#: scene/3d/baked_lightmap.cpp
msgid "Preparing geometry (%d/%d)"
msgstr "ジオメトリを解æžã—ã¦ã„ã¾ã™ (%d/%d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "環境を表示"
+msgstr "環境を準備中"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
@@ -13973,9 +13910,8 @@ msgid "Generating capture"
msgstr "ライトマップã®ç”Ÿæˆ"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "ライトマップã®ç”Ÿæˆ"
+msgstr "ライトマップをä¿å­˜ä¸­"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -14053,7 +13989,7 @@ msgstr ""
#: scene/3d/gi_probe.cpp
msgid "Plotting Meshes"
-msgstr "メッシュã®ãƒ—ロット"
+msgstr "メッシュをæç”»ä¸­"
#: scene/3d/gi_probe.cpp
msgid "Finishing Plot"
@@ -14073,6 +14009,9 @@ msgid ""
"longer has any effect.\n"
"To remove this warning, disable the GIProbe's Compress property."
msgstr ""
+"GIProbeã®Compressãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã¯æ—¢çŸ¥ã®ãƒã‚°ã®ãŸã‚éžæŽ¨å¥¨ã«ãªã‚Šã€ã‚‚ã¯ã‚„何ã®åŠ¹æžœã‚‚ã‚"
+"りã¾ã›ã‚“。\n"
+"ã“ã®è­¦å‘Šã‚’消ã™ã«ã¯ã€GIProbeã®Compressプロパティを無効化ã—ã¦ãã ã•ã„。"
#: scene/3d/light.cpp
msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows."
@@ -14092,6 +14031,14 @@ msgstr ""
"NavigationMeshInstance ã¯ã€ãƒŠãƒ“ゲーションノードã®å­ã‚„å­«ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚"
"ã“れã¯ãƒŠãƒ“ゲーションデータã®ã¿æä¾›ã—ã¾ã™ã€‚"
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14159,15 +14106,15 @@ msgstr "Node A 㨠Node B ã¯ç•°ãªã‚‹ PhysicsBody ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚
#: scene/3d/portal.cpp
msgid "The RoomManager should not be a child or grandchild of a Portal."
-msgstr ""
+msgstr "RoomManager 㯠Portal ã®å­ã‚„å­«ã«ã§ãã¾ã›ã‚“。"
#: scene/3d/portal.cpp
msgid "A Room should not be a child or grandchild of a Portal."
-msgstr ""
+msgstr "Room 㯠Portal ã®å­ã‚„å­«ã«ã§ãã¾ã›ã‚“。"
#: scene/3d/portal.cpp
msgid "A RoomGroup should not be a child or grandchild of a Portal."
-msgstr ""
+msgstr "RoomGroup 㯠Portal ã®å­ã‚„å­«ã«ã§ãã¾ã›ã‚“。"
#: scene/3d/remote_transform.cpp
msgid ""
@@ -14179,15 +14126,15 @@ msgstr ""
#: scene/3d/room.cpp
msgid "A Room cannot have another Room as a child or grandchild."
-msgstr ""
+msgstr "Room 㯠他㮠Room ã‚’å­ã‚„å­«ã«æŒã¤ã“ã¨ã¯ã§ãã¾ã›ã‚“。"
#: scene/3d/room.cpp
msgid "The RoomManager should not be placed inside a Room."
-msgstr ""
+msgstr "RoomManager 㯠Room ã®ä¸­ã«è¨­ç½®ã§ãã¾ã›ã‚“。"
#: scene/3d/room.cpp
msgid "A RoomGroup should not be placed inside a Room."
-msgstr ""
+msgstr "RoomGroup 㯠Room ã®ä¸­ã«è¨­ç½®ã§ãã¾ã›ã‚“。"
#: scene/3d/room.cpp
msgid ""
@@ -14197,39 +14144,46 @@ msgstr ""
#: scene/3d/room_group.cpp
msgid "The RoomManager should not be placed inside a RoomGroup."
-msgstr ""
+msgstr "RoomManager 㯠RoomGroup ã®ä¸­ã«è¨­ç½®ã§ãã¾ã›ã‚“。"
#: scene/3d/room_manager.cpp
msgid "The RoomList has not been assigned."
-msgstr ""
+msgstr "RoomList ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã¾ã›ã‚“。"
#: scene/3d/room_manager.cpp
msgid "The RoomList node should be a Spatial (or derived from Spatial)."
msgstr ""
+"RoomList ノード㯠Spatial (ã¾ãŸã¯ Spatial ã®æ´¾ç”Ÿ) ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。"
#: scene/3d/room_manager.cpp
msgid ""
"Portal Depth Limit is set to Zero.\n"
"Only the Room that the Camera is in will render."
msgstr ""
+"Portal Depth Limit ㌠ゼロ ã«è¨­å®šã•れã¦ã„ã¾ã™ã€‚\n"
+"カメラãŒå†…部ã«ã‚ã‚‹ Room ã®ã¿æç”»ã•れã¾ã™ã€‚"
#: scene/3d/room_manager.cpp
msgid "There should only be one RoomManager in the SceneTree."
-msgstr ""
+msgstr "SceneTree ã«ã¯ RoomManager ãŒ1ã¤ã ã‘存在ã§ãã¾ã™ã€‚"
#: scene/3d/room_manager.cpp
msgid ""
"RoomList path is invalid.\n"
"Please check the RoomList branch has been assigned in the RoomManager."
msgstr ""
+"RoomList パスãŒç„¡åйã§ã™ã€‚\n"
+"RoomList ブランãƒãŒ RoomManager ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã‚‹ã‹ç¢ºèªã—ã¦ãã ã•ã„。"
#: scene/3d/room_manager.cpp
msgid "RoomList contains no Rooms, aborting."
-msgstr ""
+msgstr "RoomList ã« Room ãŒå«ã¾ã‚Œã¦ã„ãªã„ãŸã‚ã€ä¸­æ–­ã—ã¾ã™ã€‚"
#: scene/3d/room_manager.cpp
msgid "Misnamed nodes detected, check output log for details. Aborting."
msgstr ""
+"誤ã£ãŸãƒŽãƒ¼ãƒ‰åãŒæ¤œå‡ºã•れã¾ã—ãŸã€‚詳細ã¯å‡ºåŠ›ãƒ­ã‚°ã‚’ç¢ºèªã—ã¦ãã ã•ã„。中止ã—ã¾"
+"ã™ã€‚"
#: scene/3d/room_manager.cpp
msgid "Portal link room not found, check output log for details."
@@ -14246,6 +14200,9 @@ msgid ""
"Room overlap detected, cameras may work incorrectly in overlapping area.\n"
"Check output log for details."
msgstr ""
+"Roomã®é‡ãªã‚ŠãŒæ¤œå‡ºã•れã¾ã—ãŸã€‚é‡ãªã£ãŸã‚¨ãƒªã‚¢ã§ã‚«ãƒ¡ãƒ©ãŒæ­£ã—ã動作ã—ãªã„å¯èƒ½æ€§"
+"ãŒã‚りã¾ã™ã€‚\n"
+"詳細ã¯å‡ºåŠ›ãƒ­ã‚°ã‚’ç¢ºèªã—ã¦ãã ã•ã„。"
#: scene/3d/room_manager.cpp
msgid ""
@@ -14316,7 +14273,7 @@ msgstr "見ã¤ã‹ã‚‰ãªã„アニメーション: '%s'"
#: scene/animation/animation_player.cpp
msgid "Anim Apply Reset"
-msgstr ""
+msgstr "アニメーションをリセット"
#: scene/animation/animation_tree.cpp
msgid "In node '%s', invalid animation: '%s'."
@@ -14359,8 +14316,8 @@ msgid ""
"RMB: Remove preset"
msgstr ""
"色: #%s\n"
-"左マウスボタン: 色をセット\n"
-"å³ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³: プリセットã®é™¤åŽ»"
+"左クリック: 色をセット\n"
+"å³ã‚¯ãƒªãƒƒã‚¯: プリセットã®é™¤åŽ»"
#: scene/gui/color_picker.cpp
msgid "Pick a color from the editor window."
@@ -14404,7 +14361,7 @@ msgstr ""
#: scene/gui/dialogs.cpp
msgid "Alert!"
-msgstr "警告!"
+msgstr "警告ï¼"
#: scene/gui/dialogs.cpp
msgid "Please Confirm..."
@@ -14418,6 +14375,14 @@ msgstr "æœ‰åŠ¹ãªæ‹¡å¼µå­ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚"
msgid "Enable grid minimap."
msgstr "グリッドミニマップを有効ã«ã™ã‚‹ã€‚"
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14470,6 +14435,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "レンダーã™ã‚‹ã«ã¯ãƒ“ューãƒãƒ¼ãƒˆã®ã‚µã‚¤ã‚ºãŒ 0 より大ãã„å¿…è¦ãŒã‚りã¾ã™ã€‚"
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14489,21 +14458,24 @@ msgid "Invalid comparison function for that type."
msgstr "ãã®ã‚¿ã‚¤ãƒ—ã®æ¯”較関数ã¯ç„¡åйã§ã™ã€‚"
#: servers/visual/shader_language.cpp
-#, fuzzy
msgid "Varying may not be assigned in the '%s' function."
-msgstr "Varying変数ã¯é ‚点関数ã«ã®ã¿å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚"
+msgstr "Varying 㯠'%s' 関数ã§å‰²ã‚Šå½“ã¦ã‚‰ã‚Œãªã„å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚"
#: servers/visual/shader_language.cpp
msgid ""
"Varyings which assigned in 'vertex' function may not be reassigned in "
"'fragment' or 'light'."
msgstr ""
+"'vertex' 関数ã§å‰²ã‚Šå½“ã¦ãŸ Varying ã‚’ 'fragment' 㨠'light' ã§å†ã³å‰²ã‚Šå½“ã¦ã‚‹ã“"
+"ã¨ã¯ã§ãã¾ã›ã‚“。"
#: servers/visual/shader_language.cpp
msgid ""
"Varyings which assigned in 'fragment' function may not be reassigned in "
"'vertex' or 'light'."
msgstr ""
+"'fragment' 関数ã§å‰²ã‚Šå½“ã¦ãŸ Varying ã‚’ 'vertex' 㨠'light' ã§å†ã³å‰²ã‚Šå½“ã¦ã‚‹ã“"
+"ã¨ã¯ã§ãã¾ã›ã‚“。"
#: servers/visual/shader_language.cpp
msgid "Fragment-stage varying could not been accessed in custom function!"
@@ -14521,6 +14493,41 @@ msgstr "uniform ã¸ã®å‰²ã‚Šå½“ã¦ã€‚"
msgid "Constants cannot be modified."
msgstr "定数ã¯å¤‰æ›´ã§ãã¾ã›ã‚“。"
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "レスト・ãƒãƒ¼ã‚ºã®ä½œæˆ(ボーンã‹ã‚‰)"
+
+#~ msgid "Bottom"
+#~ msgstr "下é¢"
+
+#~ msgid "Left"
+#~ msgstr "å·¦å´é¢"
+
+#~ msgid "Right"
+#~ msgstr "å³å´é¢"
+
+#~ msgid "Front"
+#~ msgstr "å‰é¢"
+
+#~ msgid "Rear"
+#~ msgstr "後é¢"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "ç„¡åã®ã‚®ã‚ºãƒ¢"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Degrees Of Freedom\" 㯠\"Xr Mode\" ㌠\"Oculus Mobile VR\" ã®å ´åˆã«ã®ã¿"
+#~ "有効ã«ãªã‚Šã¾ã™ã€‚"
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Focus Awareness\" 㯠\"Xr Mode\" ㌠\"Oculus Mobile VR\" ã®å ´åˆã«ã®ã¿æœ‰"
+#~ "効ã«ãªã‚Šã¾ã™ã€‚"
+
#~ msgid "Package Contents:"
#~ msgstr "パッケージã®å†…容:"
diff --git a/editor/translations/ka.po b/editor/translations/ka.po
index 7abc89b216..5e4f5d0094 100644
--- a/editor/translations/ka.po
+++ b/editor/translations/ka.po
@@ -1070,7 +1070,7 @@ msgstr ""
msgid "Dependencies"
msgstr "დáƒáƒ›áƒáƒ™áƒ˜áƒ“ებულებები"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "რესურსი"
@@ -1719,13 +1719,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2110,7 +2110,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2600,6 +2600,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3233,6 +3257,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ გáƒáƒ áƒ“áƒáƒ¥áƒ›áƒœáƒ˜áƒ¡ ცვლილებáƒ"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3479,6 +3508,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5592,6 +5625,17 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "მáƒáƒœáƒ˜áƒ¨áƒ•ნის მáƒáƒ¨áƒáƒ áƒ”ბáƒ"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6527,7 +6571,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7119,6 +7167,16 @@ msgstr "შექმნáƒ"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ გáƒáƒ áƒ“áƒáƒ¥áƒ›áƒœáƒ˜áƒ¡ ცვლილებáƒ"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "წáƒáƒ¨áƒšáƒ"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7635,11 +7693,12 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "áƒáƒ®áƒáƒšáƒ˜ %s შექმნáƒ"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7667,6 +7726,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7777,42 +7890,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8076,6 +8169,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "შექმნáƒ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -8141,7 +8239,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12195,6 +12293,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12480,6 +12586,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "ყველრმáƒáƒœáƒ˜áƒ¨áƒœáƒ•áƒ"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12966,162 +13077,151 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "დáƒáƒ§áƒ”ნებáƒ"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "ძებნáƒ:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid package name:"
msgstr "áƒáƒ áƒáƒ¡áƒ¬áƒáƒ áƒ˜ ფáƒáƒœáƒ¢áƒ˜áƒ¡ ზáƒáƒ›áƒ."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13129,57 +13229,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13187,55 +13287,55 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "áƒáƒœáƒ˜áƒ›áƒáƒªáƒ˜áƒ˜áƒ¡ ხáƒáƒœáƒ’რძლივáƒáƒ‘რ(წáƒáƒ›áƒ”ბში)."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13243,20 +13343,20 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "სáƒáƒ§áƒ•áƒáƒ áƒšáƒ”ბი:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13713,6 +13813,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14006,6 +14114,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14046,6 +14162,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/km.po b/editor/translations/km.po
index 187307bc17..a5b6139d08 100644
--- a/editor/translations/km.po
+++ b/editor/translations/km.po
@@ -993,7 +993,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1622,13 +1622,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1998,7 +1998,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2476,6 +2476,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3099,6 +3123,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim ផ្លាស់ប្ážáž¼ážš Transform"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3339,6 +3368,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5379,6 +5412,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6278,7 +6321,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6864,6 +6911,14 @@ msgstr "ផ្លាស់ទី Bezier Points"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Center Node"
+msgstr ""
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7358,11 +7413,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7390,6 +7445,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7497,42 +7606,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7794,6 +7883,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7859,7 +7952,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11759,6 +11852,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12039,6 +12140,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12505,159 +12610,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12665,57 +12759,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12723,54 +12817,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12778,19 +12872,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13240,6 +13334,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13529,6 +13631,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13569,6 +13679,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/ko.po b/editor/translations/ko.po
index 1f24eb1b1d..c288a2b7e7 100644
--- a/editor/translations/ko.po
+++ b/editor/translations/ko.po
@@ -23,11 +23,12 @@
# Yungjoong Song <yungjoong.song@gmail.com>, 2020.
# Henry LeRoux <henry.leroux@ocsbstudent.ca>, 2021.
# Postive_ Cloud <postive12@gmail.com>, 2021.
+# dewcked <dewcked@protonmail.ch>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-08-12 14:48+0000\n"
+"PO-Revision-Date: 2021-09-21 15:22+0000\n"
"Last-Translator: Myeongjin Lee <aranet100@gmail.com>\n"
"Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/"
"godot/ko/>\n"
@@ -36,7 +37,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -205,7 +206,7 @@ msgstr "애니메ì´ì…˜ ê¸¸ì´ ë°”ê¾¸ê¸°"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation Loop"
-msgstr "애니메ì´ì…˜ 루프 변경"
+msgstr "애니메ì´ì…˜ 루프 바꾸기"
#: editor/animation_track_editor.cpp
msgid "Property Track"
@@ -266,7 +267,7 @@ msgstr "트랙 경로 바꾸기"
#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
-msgstr "ì´ íŠ¸ëž™ì„ ì¼¬/êº¼ì§ ì—¬ë¶€ë¥¼ 전환합니다."
+msgstr "ì´ íŠ¸ëž™ì„ ì¼œê¸°/ë„기를 토글합니다."
#: editor/animation_track_editor.cpp
msgid "Update Mode (How this property is set)"
@@ -282,7 +283,7 @@ msgstr "루프 래핑 모드 (시작 루프와 ëì„ ë³´ê°„)"
#: editor/animation_track_editor.cpp
msgid "Remove this track."
-msgstr "ì´ íŠ¸ëž™ì„ ì‚­ì œí•©ë‹ˆë‹¤."
+msgstr "ì´ íŠ¸ëž™ì„ ì œê±°í•©ë‹ˆë‹¤."
#: editor/animation_track_editor.cpp
msgid "Time (s): "
@@ -356,7 +357,7 @@ msgstr "애니메ì´ì…˜ 루프 모드 바꾸기"
#: editor/animation_track_editor.cpp
msgid "Remove Anim Track"
-msgstr "애니메ì´ì…˜ 트랙 ì‚­ì œ"
+msgstr "애니메ì´ì…˜ 트랙 제거"
#. TRANSLATORS: %s will be replaced by a phrase describing the target of track.
#: editor/animation_track_editor.cpp
@@ -385,13 +386,11 @@ msgstr "애니메ì´ì…˜ 삽입"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "'%s' 열수 ì—†ìŒ."
+msgstr "노드 '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
msgstr "애니메ì´ì…˜"
@@ -403,9 +402,8 @@ msgstr ""
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "'%s' ì†ì„±ì´ 없습니다."
+msgstr "ì†ì„± '%s'"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -485,7 +483,7 @@ msgstr "메서드 트랙 키 추가"
#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
-msgstr "ê°ì²´ì— 메서드가 ì—†ìŒ: "
+msgstr "오브ì íŠ¸ì— ë©”ì„œë“œê°€ ì—†ìŒ: "
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
@@ -502,7 +500,7 @@ msgstr "트랙 붙여 넣기"
#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
-msgstr "애니메ì´ì…˜ 키 í¬ê¸° ì¡°ì ˆ"
+msgstr "애니메ì´ì…˜ 키 스케ì¼"
#: editor/animation_track_editor.cpp
msgid ""
@@ -525,9 +523,9 @@ msgstr ""
"ì´ ì• ë‹ˆë©”ì´ì…˜ì€ 가져온 ì”¬ì— ì†í•´ 있습니다. 가져온 íŠ¸ëž™ì˜ ë³€ê²½ ì‚¬í•­ì€ ì €ìž¥ë˜"
"지 않습니다.\n"
"\n"
-"저장 ê¸°ëŠ¥ì„ ì¼œë ¤ë©´ 맞춤 íŠ¸ëž™ì„ ì¶”ê°€í•˜ê³ , ì”¬ì˜ ê°€ì ¸ì˜¤ê¸° 설정으로 가서\n"
+"저장 ê¸°ëŠ¥ì„ í™œì„±í™”í•˜ë ¤ë©´ 맞춤 íŠ¸ëž™ì„ ì¶”ê°€í•˜ê³ , ì”¬ì˜ ê°€ì ¸ì˜¤ê¸° 설정으로 가서\n"
"\"Animation > Storage\" ì„¤ì •ì„ \"Files\"로, \"Animation > Keep Custom Tracks"
-"\" ì„¤ì •ì„ ì¼  ë’¤, 다시 가져오십시오.\n"
+"\" ì„¤ì •ì„ í™œì„±í™”í•œ ë’¤, 다시 가져오십시오.\n"
"아니면 가져오기 프리셋으로 애니메ì´ì…˜ì„ 별ë„ì˜ íŒŒì¼ë¡œ 가져올 ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤."
#: editor/animation_track_editor.cpp
@@ -584,11 +582,11 @@ msgstr "트랙 복사"
#: editor/animation_track_editor.cpp
msgid "Scale Selection"
-msgstr "ì„ íƒ í•­ëª© 배율 ì¡°ì ˆ"
+msgstr "ì„ íƒ í•­ëª© ìŠ¤ì¼€ì¼ ì¡°ì ˆ"
#: editor/animation_track_editor.cpp
msgid "Scale From Cursor"
-msgstr "커서 위치ì—서 배율 ì¡°ì ˆ"
+msgstr "커서 위치ì—서 ìŠ¤ì¼€ì¼ ì¡°ì ˆ"
#: editor/animation_track_editor.cpp editor/plugins/script_text_editor.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
@@ -612,9 +610,8 @@ msgid "Go to Previous Step"
msgstr "ì´ì „ 단계로 ì´ë™"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Apply Reset"
-msgstr "ë˜ëŒë¦¬ê¸°"
+msgstr "재설정 ì ìš©"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -633,9 +630,8 @@ msgid "Use Bezier Curves"
msgstr "베지어 곡선 사용"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Create RESET Track(s)"
-msgstr "트랙 붙여 넣기"
+msgstr "재설정 트랙 만들기"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -659,11 +655,11 @@ msgstr "최ì í™”"
#: editor/animation_track_editor.cpp
msgid "Remove invalid keys"
-msgstr "ìž˜ëª»ëœ í‚¤ ì‚­ì œ"
+msgstr "ìž˜ëª»ëœ í‚¤ 제거"
#: editor/animation_track_editor.cpp
msgid "Remove unresolved and empty tracks"
-msgstr "í•´ê²°ë˜ì§€ 않고 빈 트랙 ì‚­ì œ"
+msgstr "í•´ê²°ë˜ì§€ 않고 빈 트랙 제거"
#: editor/animation_track_editor.cpp
msgid "Clean-up all animations"
@@ -679,7 +675,7 @@ msgstr "정리"
#: editor/animation_track_editor.cpp
msgid "Scale Ratio:"
-msgstr "배율값:"
+msgstr "ìŠ¤ì¼€ì¼ ë¹„ìœ¨:"
#: editor/animation_track_editor.cpp
msgid "Select Tracks to Copy"
@@ -842,7 +838,7 @@ msgstr "추가"
#: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp
#: editor/project_settings_editor.cpp
msgid "Remove"
-msgstr "삭제"
+msgstr "제거"
#: editor/connections_dialog.cpp
msgid "Add Extra Call Argument:"
@@ -937,7 +933,7 @@ msgstr "연결 변경:"
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from the \"%s\" signal?"
-msgstr "\"%s\" 시그ë„ì˜ ëª¨ë“  ì—°ê²°ì„ ì‚­ì œí• ê¹Œìš”?"
+msgstr "\"%s\" 시그ë„ì˜ ëª¨ë“  ì—°ê²°ì„ ì œê±°í•˜ì‹œê² ìŠµë‹ˆê¹Œ?"
#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
msgid "Signals"
@@ -949,7 +945,7 @@ msgstr "ì‹œê·¸ë„ í•„í„°"
#: editor/connections_dialog.cpp
msgid "Are you sure you want to remove all connections from this signal?"
-msgstr "ì´ ì‹œê·¸ë„ì˜ ëª¨ë“  ì—°ê²°ì„ ì‚­ì œí• ê¹Œìš”?"
+msgstr "ì´ ì‹œê·¸ë„ì˜ ëª¨ë“  ì—°ê²°ì„ ì œê±°í•˜ì‹œê² ìŠµë‹ˆê¹Œ?"
#: editor/connections_dialog.cpp
msgid "Disconnect All"
@@ -960,7 +956,6 @@ msgid "Edit..."
msgstr "편집..."
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Go to Method"
msgstr "메서드로 ì´ë™"
@@ -1026,7 +1021,7 @@ msgid ""
"Scene '%s' is currently being edited.\n"
"Changes will only take effect when reloaded."
msgstr ""
-"씬 '%s'ì´(ê°€) 현재 편집중입니다.\n"
+"씬 '%s'ì´(ê°€) 현재 편집ë˜ê³  있습니다.\n"
"변경 ì‚¬í•­ì€ ë‹¤ì‹œ 불러온 ë’¤ì— ë°˜ì˜ë©ë‹ˆë‹¤."
#: editor/dependency_editor.cpp
@@ -1034,7 +1029,7 @@ msgid ""
"Resource '%s' is in use.\n"
"Changes will only take effect when reloaded."
msgstr ""
-"리소스 '%s'ì´(ê°€) 현재 사용중입니다.\n"
+"리소스 '%s'ì´(ê°€) 현재 사용 중입니다.\n"
"변경 ì‚¬í•­ì€ ë‹¤ì‹œ 불러온 ë’¤ì— ë°˜ì˜ë©ë‹ˆë‹¤."
#: editor/dependency_editor.cpp
@@ -1042,7 +1037,7 @@ msgstr ""
msgid "Dependencies"
msgstr "ì¢…ì† ê´€ê³„"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "리소스"
@@ -1061,7 +1056,7 @@ msgstr "ë§ê°€ì§„ 부분 고치기"
#: editor/dependency_editor.cpp
msgid "Dependency Editor"
-msgstr "ì¢…ì† ê´€ê³„ 편집기"
+msgstr "ì¢…ì† ê´€ê³„ ì—디터"
#: editor/dependency_editor.cpp
msgid "Search Replacement Resource:"
@@ -1082,17 +1077,16 @@ msgid "Owners Of:"
msgstr "소유ìž:"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"Remove the selected files from the project? (Cannot be undone.)\n"
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
-"프로ì íЏì—서 ì„ íƒëœ 파ì¼ì„ 제거하시겠습니다? (ë˜ëŒë¦´ 수 ì—†ìŒ)\n"
-"시스템 휴지통ì—서 ì œê±°ëœ íŒŒì¼ì„ 찾고 ë³µì›í•  수 있습니다."
+"프로ì íЏì—서 ì„ íƒëœ 파ì¼ì„ 제거하시겠습니까? (ë˜ëŒë¦´ 수 없습니다.)\n"
+"파ì¼ì‹œìŠ¤í…œ êµ¬ì„±ì— ë”°ë¼, 파ì¼ì€ 시스템 휴지ë™ìœ¼ë¡œ ì´ë™ë˜ê±°ë‚˜ 완전히 ì‚­ì œë©ë‹ˆ"
+"다."
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"The files being removed are required by other resources in order for them to "
"work.\n"
@@ -1101,12 +1095,12 @@ msgid ""
"to the system trash or deleted permanently."
msgstr ""
"제거하려는 파ì¼ì€ 다른 리소스가 ë™ìž‘하기 위해 필요합니다.\n"
-"무시하고 제거하시겠습니까? (ë˜ëŒë¦´ 수 ì—†ìŒ)\n"
-"시스템 휴지통ì—서 ì œê±°ëœ íŒŒì¼ì„ 찾고 ë³µì›í•  수 있습니다."
+"무시하고 제거하시겠습니까? (ë˜ëŒë¦´ 수 없습니다.)\n"
+"파ì¼ì‹œìŠ¤í…œ êµ¬ì„±ì— ë”°ë¼ íŒŒì¼ì€ 시스템 휴지통으로 ì´ë™ë˜ê±°ë‚˜ 완전히 ì‚­ì œë©ë‹ˆë‹¤."
#: editor/dependency_editor.cpp
msgid "Cannot remove:"
-msgstr "삭제할 수 ì—†ìŒ:"
+msgstr "제거할 수 ì—†ìŒ:"
#: editor/dependency_editor.cpp
msgid "Error loading:"
@@ -1162,11 +1156,11 @@ msgstr "명확한 소유 관계가 없는 리소스:"
#: editor/dictionary_property_edit.cpp
msgid "Change Dictionary Key"
-msgstr "딕셔너리 키 변경"
+msgstr "딕셔너리 키 바꾸기"
#: editor/dictionary_property_edit.cpp
msgid "Change Dictionary Value"
-msgstr "딕셔너리 값 변경"
+msgstr "딕셔너리 값 바꾸기"
#: editor/editor_about.cpp
msgid "Thanks from the Godot community!"
@@ -1271,40 +1265,36 @@ msgid "Licenses"
msgstr "ë¼ì´ì„ ìФ"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Error opening asset file for \"%s\" (not in ZIP format)."
-msgstr "패키지 파ì¼ì„ 여는 중 오류 (ZIP 형ì‹ì´ 아닙니다)."
+msgstr "\"%s\"ì— ëŒ€í•œ ì• ì…‹ 파ì¼ì„ 여는 중 오류 (ZIP 형ì‹ì´ 아닙니다)."
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "%s (already exists)"
-msgstr "%s (ì´ë¯¸ 존재함)"
+msgstr "%s (ì´ë¯¸ 있습니다)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
-msgstr "ì• ì…‹ \"%s\"ì˜ ë‚´ìš© - íŒŒì¼ %d개가 프로ì íŠ¸ì™€ ì¶©ëŒí•©ë‹ˆë‹¤:"
+msgstr "ì• ì…‹ \"%s\"ì˜ ì½˜í…츠 - íŒŒì¼ %d개가 프로ì íŠ¸ì™€ ì¶©ëŒí•©ë‹ˆë‹¤:"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - No files conflict with your project:"
-msgstr "ì• ì…‹ \"%s\"ì˜ ë‚´ìš© - 프로ì íŠ¸ì™€ ì¶©ëŒí•˜ëŠ” 파ì¼ì´ 없습니다:"
+msgstr "ì• ì…‹ \"%s\"ì˜ ì½˜í…츠 - 프로ì íŠ¸ì™€ ì¶©ëŒí•˜ëŠ” 파ì¼ì´ 없습니다:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
msgstr "애셋 압축 풀기"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "The following files failed extraction from asset \"%s\":"
-msgstr "ë‹¤ìŒ íŒŒì¼ì„ 패키지ì—서 ì¶”ì¶œí•˜ëŠ”ë° ì‹¤íŒ¨í•¨:"
+msgstr "ë‹¤ìŒ íŒŒì¼ì„ ì• ì…‹ì—서 ì••ì¶• 푸는 ë° ì‹¤íŒ¨í•¨:"
#: editor/editor_asset_installer.cpp
msgid "(and %s more files)"
msgstr "(ë° ë” ë§Žì€ íŒŒì¼ %sê°œ)"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset \"%s\" installed successfully!"
-msgstr "패키지를 성공ì ìœ¼ë¡œ 설치했습니다!"
+msgstr "ì• ì…‹ \"%s\"를 성공ì ìœ¼ë¡œ 설치했습니다!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -1316,9 +1306,8 @@ msgid "Install"
msgstr "설치"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset Installer"
-msgstr "패키지 설치 마법사"
+msgstr "ì• ì…‹ ì¸ìŠ¤í†¨ëŸ¬"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
@@ -1326,7 +1315,7 @@ msgstr "스피커"
#: editor/editor_audio_buses.cpp
msgid "Add Effect"
-msgstr "효과 추가"
+msgstr "ì´íŽ™íŠ¸ 추가"
#: editor/editor_audio_buses.cpp
msgid "Rename Audio Bus"
@@ -1346,7 +1335,7 @@ msgstr "오디오 버스 ìŒì†Œê±° 토글"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Bypass Effects"
-msgstr "오디오 버스 ë°”ì´íŒ¨ìФ 효과 토글"
+msgstr "오디오 버스 ë°”ì´íŒ¨ìФ ì´íŽ™íŠ¸ 토글"
#: editor/editor_audio_buses.cpp
msgid "Select Audio Bus Send"
@@ -1354,15 +1343,15 @@ msgstr "오디오 버스 전송 ì„ íƒ"
#: editor/editor_audio_buses.cpp
msgid "Add Audio Bus Effect"
-msgstr "오디오 버스 효과 추가"
+msgstr "오디오 버스 ì´íŽ™íŠ¸ 추가"
#: editor/editor_audio_buses.cpp
msgid "Move Bus Effect"
-msgstr "버스 효과 ì´ë™"
+msgstr "버스 ì´íŽ™íŠ¸ ì´ë™"
#: editor/editor_audio_buses.cpp
msgid "Delete Bus Effect"
-msgstr "버스 효과 삭제"
+msgstr "버스 ì´íŽ™íŠ¸ ì‚­ì œ"
#: editor/editor_audio_buses.cpp
msgid "Drag & drop to rearrange."
@@ -1381,9 +1370,8 @@ msgid "Bypass"
msgstr "ë°”ì´íŒ¨ìФ"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Bus Options"
-msgstr "버스 설정"
+msgstr "버스 옵션"
#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -1392,11 +1380,11 @@ msgstr "복제"
#: editor/editor_audio_buses.cpp
msgid "Reset Volume"
-msgstr "볼륨 초기화"
+msgstr "볼륨 재설정"
#: editor/editor_audio_buses.cpp
msgid "Delete Effect"
-msgstr "효과 삭제"
+msgstr "ì´íŽ™íŠ¸ ì‚­ì œ"
#: editor/editor_audio_buses.cpp
msgid "Audio"
@@ -1420,7 +1408,7 @@ msgstr "오디오 버스 복제"
#: editor/editor_audio_buses.cpp
msgid "Reset Bus Volume"
-msgstr "버스 볼륨 초기화"
+msgstr "버스 볼륨 재설정"
#: editor/editor_audio_buses.cpp
msgid "Move Audio Bus"
@@ -1482,11 +1470,11 @@ msgstr "ì´ ë²„ìŠ¤ ë ˆì´ì•„ì›ƒì„ íŒŒì¼ë¡œ 저장합니다."
#: editor/editor_audio_buses.cpp editor/import_dock.cpp
msgid "Load Default"
-msgstr "기본값 불러오기"
+msgstr "ë””í´íЏ 불러오기"
#: editor/editor_audio_buses.cpp
msgid "Load the default Bus Layout."
-msgstr "기본 버스 ë ˆì´ì•„ì›ƒì„ ë¶ˆëŸ¬ì˜µë‹ˆë‹¤."
+msgstr "ë””í´íЏ 버스 ë ˆì´ì•„ì›ƒì„ ë¶ˆëŸ¬ì˜µë‹ˆë‹¤."
#: editor/editor_audio_buses.cpp
msgid "Create a new Bus Layout."
@@ -1506,7 +1494,7 @@ msgstr "ì—”ì§„ì— ì´ë¯¸ 있는 í´ëž˜ìФ ì´ë¦„ê³¼ 겹치지 않아야 합니ë‹
#: editor/editor_autoload_settings.cpp
msgid "Must not collide with an existing built-in type name."
-msgstr "기본 ìžë£Œí˜•ê³¼ ì´ë¦„ê³¼ 겹치지 않아야 합니다."
+msgstr "기존 내장 ìžë£Œí˜•ê³¼ ì´ë¦„ê³¼ 겹치지 않아야 합니다."
#: editor/editor_autoload_settings.cpp
msgid "Must not collide with an existing global constant name."
@@ -1534,11 +1522,11 @@ msgstr "오토로드 ì´ë™"
#: editor/editor_autoload_settings.cpp
msgid "Remove Autoload"
-msgstr "오토로드 삭제"
+msgstr "오토로드 제거"
#: editor/editor_autoload_settings.cpp editor/editor_plugin_settings.cpp
msgid "Enable"
-msgstr "켜기"
+msgstr "활성화"
#: editor/editor_autoload_settings.cpp
msgid "Rearrange Autoloads"
@@ -1578,9 +1566,8 @@ msgid "Name"
msgstr "ì´ë¦„"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Global Variable"
-msgstr "변수"
+msgstr "전역 변수"
#: editor/editor_data.cpp
msgid "Paste Params"
@@ -1654,7 +1641,7 @@ msgid ""
"Etc' in Project Settings."
msgstr ""
"ëŒ€ìƒ í”Œëž«í¼ì—서 GLES2 ìš© 'ETC' í…스처 ì••ì¶•ì´ í•„ìš”í•©ë‹ˆë‹¤. 프로ì íЏ 설정ì—서 "
-"'Import Etc' ì„¤ì •ì„ ì¼œì„¸ìš”."
+"'Import Etc' ì„¤ì •ì„ í™œì„±í™”í•˜ì„¸ìš”."
#: editor/editor_export.cpp
msgid ""
@@ -1662,7 +1649,7 @@ msgid ""
"'Import Etc 2' in Project Settings."
msgstr ""
"ëŒ€ìƒ í”Œëž«í¼ì—서 GLES3 ìš© 'ETC2' í…스처 ì••ì¶•ì´ í•„ìš”í•©ë‹ˆë‹¤. 프로ì íЏ 설정ì—서 "
-"'Import Etc 2' ì„¤ì •ì„ ì¼œì„¸ìš”."
+"'Import Etc 2' ì„¤ì •ì„ í™œì„±í™”í•˜ì„¸ìš”."
#: editor/editor_export.cpp
msgid ""
@@ -1673,8 +1660,8 @@ msgid ""
msgstr ""
"ëŒ€ìƒ í”Œëž«í¼ì—서 드ë¼ì´ë²„ê°€ GLES2로 í´ë°±í•˜ê¸° 위해 'ETC' í…스처 ì••ì¶•ì´ í•„ìš”í•©ë‹ˆ"
"다.\n"
-"프로ì íЏ 설정ì—서 'Import Etc' ì„¤ì •ì„ í™œì„±í™” 하거나, 'Driver Fallback "
-"Enabled' ì„¤ì •ì„ ë¹„í™œì„±í™” 하세요."
+"프로ì íЏ 설정ì—서 'Import Etc' ì„¤ì •ì„ í™œì„±í™”í•˜ê±°ë‚˜, 'Driver Fallback "
+"Enabled' ì„¤ì •ì„ ë¹„í™œì„±í™”í•˜ì„¸ìš”."
#: editor/editor_export.cpp
msgid ""
@@ -1682,15 +1669,15 @@ msgid ""
"'Import Pvrtc' in Project Settings."
msgstr ""
"ëŒ€ìƒ í”Œëž«í¼ì—서 GLES2 ìš© 'PVRTC' í…스처 ì••ì¶•ì´ í•„ìš”í•©ë‹ˆë‹¤. 프로ì íЏ 설정ì—서 "
-"'Import Pvrt' 를 활성화 하세요."
+"'Import Pvrt' ì„¤ì •ì„ í™œì„±í™”í•˜ì„¸ìš”."
#: editor/editor_export.cpp
msgid ""
"Target platform requires 'ETC2' or 'PVRTC' texture compression for GLES3. "
"Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings."
msgstr ""
-"ëŒ€ìƒ í”Œëž«í¼ì€ GLES3 ìš© 'ETC2' 나 'PVRTC' í…스처 ì••ì¶•ì´ í•„ìš”í•©ë‹ˆë‹¤. 프로ì íЏ "
-"설정ì—서 'Import Etc 2' 나 'Import Pvrtc' 를 활성화 하세요."
+"ëŒ€ìƒ í”Œëž«í¼ì€ GLES3 ìš© 'ETC2'나 'PVRTC' í…스처 ì••ì¶•ì´ í•„ìš”í•©ë‹ˆë‹¤. 프로ì íЏ 설"
+"ì •ì—서 'Import Etc 2'나 'Import Pvrtc' ì„¤ì •ì„ í™œì„±í™”í•˜ì„¸ìš”."
#: editor/editor_export.cpp
msgid ""
@@ -1701,16 +1688,16 @@ msgid ""
msgstr ""
"ëŒ€ìƒ í”Œëž«í¼ì—서 드ë¼ì´ë²„ê°€ GLES2로 í´ë°±í•˜ê¸° 위해 'PVRTC' í…스처 ì••ì¶•ì´ í•„ìš”í•©"
"니다.\n"
-"프로ì íЏ 설정ì—서 'Import Pvrtc' ì„¤ì •ì„ í™œì„±í™” 하거나, 'Driver Fallback "
-"Enabled' ì„¤ì •ì„ ë¹„í™œì„±í™” 하세요."
+"프로ì íЏ 설정ì—서 'Import Pvrtc' ì„¤ì •ì„ í™œì„±í™”í•˜ê±°ë‚˜, 'Driver Fallback "
+"Enabled' ì„¤ì •ì„ ë¹„í™œì„±í™”í•˜ì„¸ìš”."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "ì‚¬ìš©ìž ì§€ì • 디버그 í…œí”Œë¦¿ì„ ì°¾ì„ ìˆ˜ 없습니다."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1726,11 +1713,11 @@ msgstr "32비트 환경ì—서는 4 GiB보다 í° ë‚´ìž¥ PCK를 내보낼 수 ì—†
#: editor/editor_feature_profile.cpp
msgid "3D Editor"
-msgstr "3D 편집기"
+msgstr "3D ì—디터"
#: editor/editor_feature_profile.cpp
msgid "Script Editor"
-msgstr "스í¬ë¦½íЏ 편집기"
+msgstr "스í¬ë¦½íЏ ì—디터"
#: editor/editor_feature_profile.cpp
msgid "Asset Library"
@@ -1746,7 +1733,7 @@ msgstr "노드 ë„킹"
#: editor/editor_feature_profile.cpp
msgid "FileSystem Dock"
-msgstr "íŒŒì¼ ì‹œìŠ¤í…œ ë…"
+msgstr "파ì¼ì‹œìŠ¤í…œ ë…"
#: editor/editor_feature_profile.cpp
msgid "Import Dock"
@@ -1754,48 +1741,49 @@ msgstr "ë… ê°€ì ¸ì˜¤ê¸°"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
-msgstr ""
+msgstr "3D ì”¬ì„ ë³´ê³  편집할 수 있게 합니다."
#: editor/editor_feature_profile.cpp
msgid "Allows to edit scripts using the integrated script editor."
-msgstr ""
+msgstr "통합 스í¬ë¦½íЏ ì—디터를 사용해 스í¬ë¦½íŠ¸ë¥¼ 편집할 수 있게 합니다."
#: editor/editor_feature_profile.cpp
msgid "Provides built-in access to the Asset Library."
-msgstr ""
+msgstr "ì• ì…‹ ë¼ì´ë¸ŒëŸ¬ë¦¬ì— 내장 ì ‘ê·¼ì„ ì œê³µí•©ë‹ˆë‹¤."
#: editor/editor_feature_profile.cpp
msgid "Allows editing the node hierarchy in the Scene dock."
-msgstr ""
+msgstr "씬 ë…ì—서 노드 계층 구조를 편집할 수 있게 합니다."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to work with signals and groups of the node selected in the Scene "
"dock."
-msgstr ""
+msgstr "씬 ë…ì—서 ì„ íƒëœ ë…¸ë“œì˜ ì‹ í˜¸ì™€ 그룹으로 ë™ìž‘í•  수 있게 합니다."
#: editor/editor_feature_profile.cpp
msgid "Allows to browse the local file system via a dedicated dock."
-msgstr ""
+msgstr "ì „ìš© ë…ì„ í†µí•´ 로컬 íŒŒì¼ ì‹œìŠ¤í…œì„ íƒìƒ‰í•  수 있게 합니다."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to configure import settings for individual assets. Requires the "
"FileSystem dock to function."
msgstr ""
+"개별 ì• ì…‹ì— ëŒ€í•œ 가져오기 ì„¤ì •ì„ êµ¬ì„±í•  수 있게 합니다. ìž‘ë™í•˜ë ¤ë©´ 파ì¼ì‹œìФ"
+"í…œ ë…ì´ í•„ìš”í•©ë‹ˆë‹¤."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(current)"
msgstr "(현재)"
#: editor/editor_feature_profile.cpp
msgid "(none)"
-msgstr ""
+msgstr "(ì—†ìŒ)"
#: editor/editor_feature_profile.cpp
msgid "Remove currently selected profile, '%s'? Cannot be undone."
-msgstr ""
+msgstr "현재 ì„ íƒëœ í”„ë¡œí•„ì¸ '%s'ì„ ì œê±°í•˜ì‹œê² ìŠµë‹ˆê¹Œ? ë˜ëŒë¦´ 수 없습니다."
#: editor/editor_feature_profile.cpp
msgid "Profile must be a valid filename and must not contain '.'"
@@ -1807,37 +1795,35 @@ msgstr "ì´ ì´ë¦„으로 ëœ í”„ë¡œí•„ì´ ì´ë¯¸ 있습니다."
#: editor/editor_feature_profile.cpp
msgid "(Editor Disabled, Properties Disabled)"
-msgstr "(편집기 꺼ì§, ì†ì„± 꺼ì§)"
+msgstr "(ì—디터 비활성화ë¨, ì†ì„± 비활성화ë¨)"
#: editor/editor_feature_profile.cpp
msgid "(Properties Disabled)"
-msgstr "(ì†ì„± 꺼ì§)"
+msgstr "(ì†ì„± 비활성회ë¨)"
#: editor/editor_feature_profile.cpp
msgid "(Editor Disabled)"
-msgstr "(편집기 꺼ì§)"
+msgstr "(ì—디터 비활성화ë¨)"
#: editor/editor_feature_profile.cpp
msgid "Class Options:"
-msgstr "í´ëž˜ìФ 설정:"
+msgstr "í´ëž˜ìФ 옵션:"
#: editor/editor_feature_profile.cpp
msgid "Enable Contextual Editor"
-msgstr "ìƒí™©ë³„ 편집기 켜기"
+msgstr "ìƒí™©ë³„ ì—디터 활성화"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Properties:"
-msgstr "ì†ì„±:"
+msgstr "í´ëž˜ìФ ì†ì„±:"
#: editor/editor_feature_profile.cpp
msgid "Main Features:"
msgstr "주요 기능:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Nodes and Classes:"
-msgstr "켜진 í´ëž˜ìФ:"
+msgstr "노드와 í´ëž˜ìФ:"
#: editor/editor_feature_profile.cpp
msgid "File '%s' format is invalid, import aborted."
@@ -1848,7 +1834,7 @@ msgid ""
"Profile '%s' already exists. Remove it first before importing, import "
"aborted."
msgstr ""
-"프로필 '%s'ì´(ê°€) ì´ë¯¸ 있습니다. 가져오기 ì „ì— ì´ë¯¸ 있는 í”„ë¡œí•„ì„ ë¨¼ì € 삭제하"
+"프로필 '%s'ì´(ê°€) ì´ë¯¸ 있습니다. 가져오기 ì „ì— ì´ë¯¸ 있는 í”„ë¡œí•„ì„ ë¨¼ì € 제거하"
"세요. 가져오기를 중단합니다."
#: editor/editor_feature_profile.cpp
@@ -1856,23 +1842,20 @@ msgid "Error saving profile to path: '%s'."
msgstr "í”„ë¡œí•„ì„ ê²½ë¡œì— ì €ìž¥í•˜ëŠ” 중 오류: '%s'."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Reset to Default"
-msgstr "기본값으로 재설정"
+msgstr "ë””í´íŠ¸ë¡œ 재설정"
#: editor/editor_feature_profile.cpp
msgid "Current Profile:"
msgstr "현재 프로필:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Create Profile"
-msgstr "프로필 지우기"
+msgstr "프로필 만들기"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Remove Profile"
-msgstr "íƒ€ì¼ ì‚­ì œ"
+msgstr "프로필 제거"
#: editor/editor_feature_profile.cpp
msgid "Available Profiles:"
@@ -1901,7 +1884,7 @@ msgstr "별ë„ì˜ ì˜µì…˜:"
#: editor/editor_feature_profile.cpp
msgid "Create or import a profile to edit available classes and properties."
-msgstr ""
+msgstr "사용 가능한 í´ëž˜ìŠ¤ì™€ ì†ì„±ì„ 편집하려면 í”„ë¡œí•„ì„ ë§Œë“¤ê±°ë‚˜ 가져오세요."
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
@@ -1921,16 +1904,15 @@ msgstr "프로필 내보내기"
#: editor/editor_feature_profile.cpp
msgid "Manage Editor Feature Profiles"
-msgstr "편집기 기능 프로필 관리"
+msgstr "ì—디터 기능 프로필 관리"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Select Current Folder"
msgstr "현재 í´ë” ì„ íƒ"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "File exists, overwrite?"
-msgstr "파ì¼ì´ ì´ë¯¸ 있습니다. ë®ì–´ì“¸ê¹Œìš”?"
+msgstr "파ì¼ì´ 존재합니다. ë®ì–´ì“°ì‹œê² ìŠµë‹ˆê¹Œ?"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Select This Folder"
@@ -2089,7 +2071,7 @@ msgstr "íŒŒì¼ % ì— í•´ë‹¹í•˜ëŠ” 가져오기 í¬ë§·ì´ 여러 종류입니다.
msgid "(Re)Importing Assets"
msgstr "애셋 (다시) 가져오기"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "맨 위"
@@ -2120,11 +2102,11 @@ msgstr "ì†ì„±"
#: editor/editor_help.cpp
msgid "override:"
-msgstr "오버ë¼ì´ë“œ:"
+msgstr "재정ì˜:"
#: editor/editor_help.cpp
msgid "default:"
-msgstr "기본:"
+msgstr "ë””í´íЏ:"
#: editor/editor_help.cpp
msgid "Methods"
@@ -2189,7 +2171,7 @@ msgstr "ëª¨ë‘ í‘œì‹œ"
#: editor/editor_help_search.cpp
msgid "Classes Only"
-msgstr "í´ëž˜ìŠ¤ë§Œ 표시"
+msgstr "í´ëž˜ìŠ¤ë§Œ"
#: editor/editor_help_search.cpp
msgid "Methods Only"
@@ -2326,10 +2308,13 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"ì—디터 ì°½ì„ ë‹¤ì‹œ 그릴 때 회전합니다.\n"
+"ì—…ë°ì´íŠ¸ê°€ ì§€ì†ì ìœ¼ë¡œ 활성화ë˜ë¯€ë¡œ, ì „ë ¥ ì‚¬ìš©ëŸ‰ì´ ì»¤ì§ˆ 수 있습니다. ì´ë¥¼ 비활"
+"성화하려면 í´ë¦­í•˜ì„¸ìš”."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
-msgstr "편집기 ì°½ì— ë³€í™”ê°€ ìžˆì„ ë•Œë§ˆë‹¤ 회전합니다."
+msgstr "ì—디터 ì°½ì— ë³€í™”ê°€ ìžˆì„ ë•Œë§ˆë‹¤ 회전합니다."
#: editor/editor_node.cpp
msgid "Imported resources can't be saved."
@@ -2383,7 +2368,7 @@ msgstr "예기치 못한 '%s' 파ì¼ì˜ ë."
#: editor/editor_node.cpp
msgid "Missing '%s' or its dependencies."
-msgstr "'%s' ë˜ëŠ” ì´ê²ƒì˜ ì¢…ì† í•­ëª©ì´ ì—†ìŠµë‹ˆë‹¤."
+msgstr "'%s' ë˜ëŠ” ì´ê²ƒì˜ ì¢…ì† í•­ëª©ì´ ëˆ„ë½ë˜ì–´ 있습니다."
#: editor/editor_node.cpp
msgid "Error while loading '%s'."
@@ -2446,8 +2431,8 @@ msgid ""
"An error occurred while trying to save the editor layout.\n"
"Make sure the editor's user data path is writable."
msgstr ""
-"편집기 ë ˆì´ì•„ì›ƒì˜ ì €ìž¥ì„ í•˜ë ¤ëŠ” ë™ì•ˆ 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤.\n"
-"íŽ¸ì§‘ê¸°ì˜ ì‚¬ìš©ìž ë°ì´í„° 경로가 쓰기 가능한지 확ì¸í•´ì£¼ì„¸ìš”."
+"ì—디터 ë ˆì´ì•„ì›ƒì˜ ì €ìž¥ì„ í•˜ë ¤ëŠ” ë™ì•ˆ 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤.\n"
+"ì—ë””í„°ì˜ ì‚¬ìš©ìž ë°ì´í„° 경로가 쓰기 가능한지 확ì¸í•´ì£¼ì„¸ìš”."
#: editor/editor_node.cpp
msgid ""
@@ -2455,9 +2440,9 @@ msgid ""
"To restore the Default layout to its base settings, use the Delete Layout "
"option and delete the Default layout."
msgstr ""
-"기본 편집기 ë ˆì´ì•„ì›ƒì´ ë®ì–´ 쓰여져 있습니디.\n"
-"기본 ë ˆì´ì•„ì›ƒì„ ì›ëž˜ 설정으로 복구하려면, ë ˆì´ì•„웃 ì‚­ì œ ì˜µì…˜ì„ ì‚¬ìš©í•˜ì—¬ 기본 "
-"ë ˆì´ì•„ì›ƒì„ ì‚­ì œí•˜ì„¸ìš”."
+"ë””í´íЏ ì—디터 ë ˆì´ì•„ì›ƒì´ ë®ì–´ 쓰여져 있습니다.\n"
+"ë””í´íЏ ë ˆì´ì•„ì›ƒì„ ì›ëž˜ 설정으로 ë³µì›í•˜ë ¤ë©´, ë ˆì´ì•„웃 ì‚­ì œ ì˜µì…˜ì„ ì‚¬ìš©í•˜ì—¬ ë””"
+"í´íЏ ë ˆì´ì•„ì›ƒì„ ì‚­ì œí•˜ì„¸ìš”."
#: editor/editor_node.cpp
msgid "Layout name not found!"
@@ -2465,7 +2450,7 @@ msgstr "ë ˆì´ì•„웃 ì´ë¦„ì„ ì°¾ì„ ìˆ˜ 없습니다!"
#: editor/editor_node.cpp
msgid "Restored the Default layout to its base settings."
-msgstr "기본 ë ˆì´ì•„ì›ƒì„ ì›ëž˜ 설정으로 복구하였습니다."
+msgstr "ë””í´íЏ ë ˆì´ì•„ì›ƒì„ ê¸°ë³¸ 설정으로 ë³µì›í•˜ì˜€ìŠµë‹ˆë‹¤."
#: editor/editor_node.cpp
msgid ""
@@ -2473,9 +2458,9 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
-"`ì´ ë¦¬ì†ŒìŠ¤ëŠ” 가져온 ì”¬ì— ì†í•œ 리소스ì´ë¯€ë¡œ 편집할 수 없습니다.\n"
-"ì´ ì›Œí¬í”Œë¡œë¥¼ ì´í•´í•˜ë ¤ë©´ 씬 가져오기(Importing Scenes)와 ê´€ë ¨ëœ ì„¤ëª…ë¬¸ì„œë¥¼ ì½"
-"어주세요."
+"ì´ ë¦¬ì†ŒìŠ¤ëŠ” 가져온 ì”¬ì— ì†í•œ 리소스ì´ë¯€ë¡œ 편집할 수 없습니다.\n"
+"ì´ ì›Œí¬í”Œë¡œë¥¼ ì´í•´í•˜ë ¤ë©´ 씬 가져오기(Importing Scenes)와 ê´€ë ¨ëœ ë¬¸ì„œë¥¼ ì½ì–´ì£¼"
+"세요."
#: editor/editor_node.cpp
msgid ""
@@ -2502,8 +2487,8 @@ msgid ""
msgstr ""
"ì´ ì”¬ì€ ê°€ì ¸ì˜¨ 것ì´ë¯€ë¡œ 변경 ì‚¬í•­ì´ ìœ ì§€ë˜ì§€ 않습니다.\n"
"ì´ ì”¬ì„ ì¸ìŠ¤í„´ìŠ¤í™”í•˜ê±°ë‚˜ ìƒì†í•˜ë©´ 편집할 수 있습니다.\n"
-"ì´ ì›Œí¬í”Œë¡œë¥¼ ì´í•´í•˜ë ¤ë©´ 씬 가져오기(Importing Scenes)와 ê´€ë ¨ëœ ì„¤ëª…ë¬¸ì„œë¥¼ ì½"
-"어주세요."
+"ì´ ì›Œí¬í”Œë¡œë¥¼ ì´í•´í•˜ë ¤ë©´ 씬 가져오기(Importing Scenes)와 ê´€ë ¨ëœ ë¬¸ì„œë¥¼ ì½ì–´ì£¼"
+"세요."
#: editor/editor_node.cpp
msgid ""
@@ -2511,12 +2496,12 @@ msgid ""
"Please read the documentation relevant to debugging to better understand "
"this workflow."
msgstr ""
-"ì›ê²© ê°ì²´ëŠ” ë³€ê²½ì‚¬í•­ì´ ì ìš©ë˜ì§€ 않습니다.\n"
-"ì´ ì›Œí¬í”Œë¡œë¥¼ ì´í•´í•˜ë ¤ë©´ 디버깅(Debugging)ê³¼ ê´€ë ¨ëœ ì„¤ëª…ë¬¸ì„œë¥¼ ì½ì–´ì£¼ì„¸ìš”."
+"ì›ê²© 오브ì íŠ¸ëŠ” ë³€ê²½ì‚¬í•­ì´ ì ìš©ë˜ì§€ 않습니다.\n"
+"ì´ ì›Œí¬í”Œë¡œë¥¼ ì´í•´í•˜ë ¤ë©´ 디버깅(Debugging)ê³¼ ê´€ë ¨ëœ ë¬¸ì„œë¥¼ ì½ì–´ì£¼ì„¸ìš”."
#: editor/editor_node.cpp
msgid "There is no defined scene to run."
-msgstr "실행할 ì”¬ì´ ì„¤ì •ë˜ì§€ 않았습니다."
+msgstr "실행할 ì”¬ì´ ì •ì˜ë˜ì§€ 않았습니다."
#: editor/editor_node.cpp
msgid "Save scene before running..."
@@ -2559,13 +2544,16 @@ msgid ""
"The current scene has no root node, but %d modified external resource(s) "
"were saved anyway."
msgstr ""
+"현재 씬ì—는 루트 노드가 없지만, ê·¸ëž˜ë„ ìˆ˜ì •ëœ ì™¸ë¶€ 리소스 %d개가 저장ë˜ì—ˆìŠµë‹ˆ"
+"다."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"A root node is required to save the scene. You can add a root node using the "
"Scene tree dock."
-msgstr "ì”¬ì„ ì €ìž¥í•˜ë ¤ë©´ 루트 노드가 필요합니다."
+msgstr ""
+"ì”¬ì„ ì €ìž¥í•˜ë ¤ë©´ 루트 노드가 필요합니다. 씬 트리 ë…ì„ ì‚¬ìš©í•˜ì—¬ 루트 노드를 ì¶”"
+"가할 수 있습니다."
#: editor/editor_node.cpp
msgid "Save Scene As..."
@@ -2596,6 +2584,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "현재 ì”¬ì´ ì €ìž¥ë˜ì–´ 있지 않습니다. 무시하고 여시겠습니까?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "ë˜ëŒë¦¬ê¸°"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "다시 실행"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "저장하지 ì•Šì€ ì”¬ì€ ìƒˆë¡œê³ ì¹¨í•  수 없습니다."
@@ -2609,7 +2623,7 @@ msgid ""
"Reload the saved scene anyway? This action cannot be undone."
msgstr ""
"현재 씬ì—는 저장하지 ì•Šì€ ë³€ê²½ì‚¬í•­ì´ ìžˆìŠµë‹ˆë‹¤.\n"
-"ê·¸ëž˜ë„ ì €ìž¥ëœ ì”¬ì„ ìƒˆë¡œê³ ì¹¨í•˜ì‹œê² ìŠµë‹ˆê¹Œ? ì´ ë™ìž‘ì€ ë˜ëŒë¦´ 수 없습니다."
+"무시하고 ì €ìž¥ëœ ì”¬ì„ ìƒˆë¡œê³ ì¹¨í•˜ì‹œê² ìŠµë‹ˆê¹Œ? ì´ ë™ìž‘ì€ ë˜ëŒë¦´ 수 없습니다."
#: editor/editor_node.cpp
msgid "Quick Run Scene..."
@@ -2625,7 +2639,7 @@ msgstr "예"
#: editor/editor_node.cpp
msgid "Exit the editor?"
-msgstr "편집기를 나가시겠습니까?"
+msgstr "ì—디터를 나가시겠습니까?"
#: editor/editor_node.cpp
msgid "Open Project Manager?"
@@ -2666,7 +2680,7 @@ msgstr "ë‹«ì€ ì”¬ 다시 열기"
#: editor/editor_node.cpp
msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
-"ë‹¤ìŒ ê²½ë¡œì— ìžˆëŠ” 애드온 플러그ì¸ì„ 활성화할 수 ì—†ìŒ: '%s' ì„¤ì •ì˜ êµ¬ë¬¸ ë¶„ì„ì„ "
+"ë‹¤ìŒ ê²½ë¡œì— ìžˆëŠ” 애드온 플러그ì¸ì„ 활성화할 수 ì—†ìŒ: '%s' êµ¬ì„±ì˜ êµ¬ë¬¸ ë¶„ì„ì„ "
"실패했습니다."
#: editor/editor_node.cpp
@@ -2714,7 +2728,7 @@ msgid ""
"Error loading scene, it must be inside the project path. Use 'Import' to "
"open the scene, then save it inside the project path."
msgstr ""
-"ì”¬ì„ ë¶ˆëŸ¬ì˜¤ëŠ” 중 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. ì”¬ì€ í”„ë¡œì íЏ 경로 ë‚´ì— ìžˆì–´ì•¼ 합니다. "
+"ì”¬ì„ ë¶ˆëŸ¬ì˜¤ëŠ” 중 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. ì”¬ì€ í”„ë¡œì íЏ 경로 ì•ˆì— ìžˆì–´ì•¼ 합니다. "
"'가져오기'를 사용해서 ì”¬ì„ ì—´ê³ , ê·¸ ì”¬ì„ í”„ë¡œì íЏ 경로 ì•ˆì— ì €ìž¥í•˜ì„¸ìš”."
#: editor/editor_node.cpp
@@ -2731,7 +2745,7 @@ msgid ""
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
-"ë©”ì¸ ì”¬ì„ ì§€ì •í•˜ì§€ 않았습니다. ì„ íƒí•˜ì‹œê² ìŠµë‹ˆê¹Œ?\n"
+"ë©”ì¸ ì”¬ì„ ì •ì˜í•˜ì§€ 않았습니다. ì„ íƒí•˜ì‹œê² ìŠµë‹ˆê¹Œ?\n"
"ë‚˜ì¤‘ì— \"프로ì íЏ 설정\"ì˜ 'application' 카테고리ì—서 변경할 수 있습니다."
#: editor/editor_node.cpp
@@ -2763,12 +2777,12 @@ msgstr "ë ˆì´ì•„웃 ì‚­ì œ"
#: editor/editor_node.cpp editor/import_dock.cpp
#: editor/script_create_dialog.cpp
msgid "Default"
-msgstr "기본"
+msgstr "ë””í´íЏ"
#: editor/editor_node.cpp editor/editor_resource_picker.cpp
#: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp
msgid "Show in FileSystem"
-msgstr "íŒŒì¼ ì‹œìŠ¤í…œì—서 보기"
+msgstr "파ì¼ì‹œìŠ¤í…œì—서 보기"
#: editor/editor_node.cpp
msgid "Play This Scene"
@@ -2820,7 +2834,7 @@ msgstr "집중 모드"
#: editor/editor_node.cpp
msgid "Toggle distraction-free mode."
-msgstr "집중 모드 토글."
+msgstr "집중 모드를 토글합니다."
#: editor/editor_node.cpp
msgid "Add a new scene."
@@ -2946,9 +2960,8 @@ msgid "Orphan Resource Explorer..."
msgstr "미사용 리소스 íƒìƒ‰ê¸°..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reload Current Project"
-msgstr "프로ì íЏ ì´ë¦„ 바꾸기"
+msgstr "현재 프로ì íЏ 새로고침"
#: editor/editor_node.cpp
msgid "Quit to Project List"
@@ -2972,15 +2985,15 @@ msgid ""
"mobile device).\n"
"You don't need to enable it to use the GDScript debugger locally."
msgstr ""
-"ì´ ì˜µì…˜ì´ í™œì„±í™” ëœ ê²½ìš° ì› í´ë¦­ ë°°í¬ë¥¼ 사용하면 ì‹¤í–‰ì¤‘ì¸ í”„ë¡œì íŠ¸ë¥¼ 디버깅 "
+"ì´ ì˜µì…˜ì´ í™œì„±í™”ëœ ê²½ìš° ì› í´ë¦­ ë°°í¬ë¥¼ 사용하면 ì‹¤í–‰ì¤‘ì¸ í”„ë¡œì íŠ¸ë¥¼ 디버깅 "
"í•  수 있ë„ë¡ì´ ì»´í“¨í„°ì˜ IPì— ì—°ê²°ì„ ì‹œë„합니다.\n"
"ì´ ì˜µì…˜ì€ ì›ê²© 디버깅 (ì¼ë°˜ì ìœ¼ë¡œ ëª¨ë°”ì¼ ê¸°ê¸° 사용)ì— ì‚¬ìš©í•˜ê¸° 위한 것입니"
"다.\n"
-"GDScript 디버거를 로컬ì—서 사용하기 위해 활성화 í•  필요는 없습니다."
+"GDScript 디버거를 로컬ì—서 사용하기 위해 활성화할 필요는 없습니다."
#: editor/editor_node.cpp
msgid "Small Deploy with Network Filesystem"
-msgstr "ë„¤íŠ¸ì›Œí¬ íŒŒì¼ ì‹œìŠ¤í…œì„ ì‚¬ìš©í•˜ì—¬ 작게 ë°°í¬"
+msgstr "ë„¤íŠ¸ì›Œí¬ íŒŒì¼ì‹œìŠ¤í…œì„ ì‚¬ìš©í•˜ì—¬ 작게 ë°°í¬"
#: editor/editor_node.cpp
msgid ""
@@ -2993,21 +3006,21 @@ msgid ""
msgstr ""
"ì´ ì˜µì…˜ì„ í™œì„±í™”í•˜ê³  Android ìš© ì› í´ë¦­ ë°°í¬ë¥¼ 사용하면 프로ì íЏ ë°ì´í„°ì—†ì´ "
"실행 파ì¼ë§Œ ë‚´ 보냅니다.\n"
-"íŒŒì¼ ì‹œìŠ¤í…œì€ ë„¤íŠ¸ì›Œí¬ë¥¼ 통해 íŽ¸ì§‘ê¸°ì— ì˜í•´ 프로ì íЏì—서 제공ë©ë‹ˆë‹¤.\n"
-"Androidì˜ ê²½ìš°, ë°°í¬ì‹œ ë” ë¹ ë¥¸ ì†ë„를 위해 USB ì¼€ì´ë¸”ì„ ì‚¬ìš©í•©ë‹ˆë‹¤. ì´ ì„¤ì •"
-"ì€ ìš©ëŸ‰ì´ í° ê²Œìž„ì˜ í…ŒìŠ¤íŠ¸ ì†ë„를 í–¥ìƒì‹œí‚µë‹ˆë‹¤."
+"파ì¼ì‹œìŠ¤í…œì€ ë„¤íŠ¸ì›Œí¬ë¥¼ 통해 ì—ë””í„°ì— ì˜í•´ 프로ì íЏì—서 제공ë©ë‹ˆë‹¤.\n"
+"Androidì˜ ê²½ìš°, ë°°í¬ì‹œ ë” ë¹ ë¥¸ ì†ë„를 위해 USB ì¼€ì´ë¸”ì„ ì‚¬ìš©í•©ë‹ˆë‹¤. ì´ ì˜µì…˜"
+"ì€ ì• ì…‹ì˜ ìš©ëŸ‰ì´ í° í”„ë¡œì íŠ¸ì˜ í…ŒìŠ¤íŠ¸ ì†ë„를 높입니다."
#: editor/editor_node.cpp
msgid "Visible Collision Shapes"
-msgstr "ì¶©ëŒ ëª¨ì–‘ ë³´ì´ê¸°"
+msgstr "콜리전 모양 ë³´ì´ê¸°"
#: editor/editor_node.cpp
msgid ""
"When this option is enabled, collision shapes and raycast nodes (for 2D and "
"3D) will be visible in the running project."
msgstr ""
-"ì´ ì„¤ì •ì„ ì¼œë©´ 프로ì íŠ¸ë¥¼ 실행하는 ë™ì•ˆ (2D와 3Dìš©) Collision 모양과 Raycast "
-"노드가 ë³´ì´ê²Œ ë©ë‹ˆë‹¤."
+"ì´ ì„¤ì •ì„ í™œì„±í™”í•˜ë©´ 프로ì íŠ¸ë¥¼ 실행하는 ë™ì•ˆ (2D와 3Dìš©) 콜리전 모양과 "
+"Raycast 노드가 ë³´ì´ê²Œ ë©ë‹ˆë‹¤."
#: editor/editor_node.cpp
msgid "Visible Navigation"
@@ -3018,8 +3031,8 @@ msgid ""
"When this option is enabled, navigation meshes and polygons will be visible "
"in the running project."
msgstr ""
-"ì´ ì„¤ì •ì„ ì¼œë©´,프로ì íŠ¸ë¥¼ 실행하는 ë™ì•ˆ Navigation 메시와 í´ë¦¬ê³¤ì´ ë³´ì´ê²Œ ë©"
-"니다."
+"ì´ ì„¤ì •ì´ í™œì„±í™”ë˜ë©´, 프로ì íŠ¸ë¥¼ 실행하는 ë™ì•ˆ 네비게ì´ì…˜ 메시와 í´ë¦¬ê³¤ì´ ë³´"
+"ì´ê²Œ ë©ë‹ˆë‹¤."
#: editor/editor_node.cpp
msgid "Synchronize Scene Changes"
@@ -3032,9 +3045,9 @@ msgid ""
"When used remotely on a device, this is more efficient when the network "
"filesystem option is enabled."
msgstr ""
-"ì´ ì„¤ì •ì´ í™œì„±í™”ëœ ê²½ìš°, 편집기ì—서 ì”¬ì„ ìˆ˜ì •í•˜ë©´ ì‹¤í–‰ì¤‘ì¸ í”„ë¡œì íŠ¸ì— ë°˜ì˜ë©"
-"니다.\n"
-"기기ì—서 ì›ê²©ìœ¼ë¡œ ì‚¬ìš©ì¤‘ì¸ ê²½ìš° ë„¤íŠ¸ì›Œí¬ íŒŒì¼ ì‹œìŠ¤í…œ ê¸°ëŠ¥ì„ í™œì„±í™”í•˜ë©´ ë”ìš± "
+"ì´ ì„¤ì •ì´ í™œì„±í™”ë˜ë©´, ì—디터ì—서 ì”¬ì„ ìˆ˜ì •í•˜ë©´ 실행 ì¤‘ì¸ í”„ë¡œì íŠ¸ì— ë°˜ì˜ë©ë‹ˆ"
+"다.\n"
+"기기ì—서 ì›ê²©ìœ¼ë¡œ 사용 ì¤‘ì¸ ê²½ìš° ë„¤íŠ¸ì›Œí¬ íŒŒì¼ì‹œìŠ¤í…œ ê¸°ëŠ¥ì„ í™œì„±í™”í•˜ë©´ ë”ìš± "
"효율ì ìž…니다."
#: editor/editor_node.cpp
@@ -3048,22 +3061,22 @@ msgid ""
"When used remotely on a device, this is more efficient when the network "
"filesystem option is enabled."
msgstr ""
-"ì´ ì˜µì…˜ì´ í™œì„±í™”ëœ ê²½ìš°, ì–´ë–¤ 스í¬ë¦½íŠ¸ë“ ì§€ 저장ë˜ë©´ 실행 ì¤‘ì¸ í”„ë¡œì íŠ¸ë¥¼ 다"
-"시 불러오게 ë©ë‹ˆë‹¤.\n"
-"기기ì—서 ì›ê²©ìœ¼ë¡œ 사용 ì¤‘ì¸ ê²½ìš°, ë„¤íŠ¸ì›Œí¬ íŒŒì¼ ì‹œìŠ¤í…œ ì˜µì…˜ì´ í™œì„±í™”ë˜ì–´ 있다"
-"ë©´ ë”ìš± 효율ì ìž…니다."
+"ì´ ì˜µì…˜ì´ í™œì„±í™”ë˜ë©´, ì–´ë–¤ 스í¬ë¦½íŠ¸ë“ ì§€ 저장ë˜ë©´ 실행 ì¤‘ì¸ í”„ë¡œì íŠ¸ë¥¼ 다시 불"
+"러오게 ë©ë‹ˆë‹¤.\n"
+"기기ì—서 ì›ê²©ìœ¼ë¡œ 사용 중ì´ë©´, ë„¤íŠ¸ì›Œí¬ íŒŒì¼ì‹œìŠ¤í…œ ì˜µì…˜ì´ í™œì„±í™”ë˜ì–´ 있다면 "
+"ë”ìš± 효율ì ìž…니다."
#: editor/editor_node.cpp editor/script_create_dialog.cpp
msgid "Editor"
-msgstr "편집기"
+msgstr "ì—디터"
#: editor/editor_node.cpp
msgid "Editor Settings..."
-msgstr "편집기 설정..."
+msgstr "ì—디터 설정..."
#: editor/editor_node.cpp
msgid "Editor Layout"
-msgstr "편집기 ë ˆì´ì•„웃"
+msgstr "ì—디터 ë ˆì´ì•„웃"
#: editor/editor_node.cpp
msgid "Take Screenshot"
@@ -3083,19 +3096,19 @@ msgstr "시스템 콘솔 토글"
#: editor/editor_node.cpp
msgid "Open Editor Data/Settings Folder"
-msgstr "편집기 ë°ì´í„°/설정 í´ë” 열기"
+msgstr "ì—디터 ë°ì´í„°/설정 í´ë” 열기"
#: editor/editor_node.cpp
msgid "Open Editor Data Folder"
-msgstr "편집기 ë°ì´í„° í´ë” 열기"
+msgstr "ì—디터 ë°ì´í„° í´ë” 열기"
#: editor/editor_node.cpp
msgid "Open Editor Settings Folder"
-msgstr "편집기 설정 í´ë” 열기"
+msgstr "ì—디터 설정 í´ë” 열기"
#: editor/editor_node.cpp
msgid "Manage Editor Features..."
-msgstr "편집기 기능 관리..."
+msgstr "ì—디터 기능 관리..."
#: editor/editor_node.cpp
msgid "Manage Export Templates..."
@@ -3107,20 +3120,19 @@ msgstr "ë„움ë§"
#: editor/editor_node.cpp
msgid "Online Documentation"
-msgstr "온ë¼ì¸ 설명문서"
+msgstr "온ë¼ì¸ 문서"
#: editor/editor_node.cpp
msgid "Questions & Answers"
-msgstr ""
+msgstr "질문과 답변"
#: editor/editor_node.cpp
msgid "Report a Bug"
msgstr "버그 보고"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Suggest a Feature"
-msgstr "값 설정"
+msgstr "기능 제안"
#: editor/editor_node.cpp
msgid "Send Docs Feedback"
@@ -3131,9 +3143,8 @@ msgid "Community"
msgstr "커뮤니티"
#: editor/editor_node.cpp
-#, fuzzy
msgid "About Godot"
-msgstr "ì •ë³´"
+msgstr "Godot ì •ë³´"
#: editor/editor_node.cpp
msgid "Support Godot Development"
@@ -3177,7 +3188,7 @@ msgstr "커스텀 씬 실행"
#: editor/editor_node.cpp
msgid "Changing the video driver requires restarting the editor."
-msgstr "비디오 드ë¼ì´ë²„를 변경하려면 편집기를 다시 ê»ë‹¤ 켜야 합니다."
+msgstr "비디오 드ë¼ì´ë²„를 변경하려면 ì—디터를 다시 시작해야 합니다."
#: editor/editor_node.cpp editor/project_settings_editor.cpp
#: editor/settings_config_dialog.cpp
@@ -3198,7 +3209,7 @@ msgstr "ì—…ë°ì´íЏ 스피너 숨기기"
#: editor/editor_node.cpp
msgid "FileSystem"
-msgstr "íŒŒì¼ ì‹œìŠ¤í…œ"
+msgstr "파ì¼ì‹œìŠ¤í…œ"
#: editor/editor_node.cpp
msgid "Inspector"
@@ -3218,14 +3229,13 @@ msgstr "저장하지 않ìŒ"
#: editor/editor_node.cpp
msgid "Android build template is missing, please install relevant templates."
-msgstr "Android 빌드 í…œí”Œë¦¿ì´ ì—†ìŠµë‹ˆë‹¤, 관련 í…œí”Œë¦¿ì„ ì„¤ì¹˜í•´ì£¼ì„¸ìš”."
+msgstr "Android 빌드 í…œí”Œë¦¿ì´ ëˆ„ë½ë˜ì–´ 있습니다, 관련 í…œí”Œë¦¿ì„ ì„¤ì¹˜í•´ì£¼ì„¸ìš”."
#: editor/editor_node.cpp
msgid "Manage Templates"
msgstr "템플릿 관리"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Install from file"
msgstr "파ì¼ì—서 설치"
@@ -3248,7 +3258,7 @@ msgstr ""
"그런 ë‹¤ìŒ ìˆ˜ì • ì‚¬í•­ì„ ì ìš©í•˜ê³  맞춤 APK를 만들어 내보낼 수 있습니다 (모듈 ì¶”"
"가, AndroidManifest.xml 바꾸기 등).\n"
"미리 ë¹Œë“œëœ APK를 사용하는 대신 맞춤 빌드를 만들려면, Android 내보내기 프리셋"
-"ì—서 \"맞춤 빌드 사용\" ì„¤ì •ì„ ì¼œ 놓아야 합니다."
+"ì—서 \"맞춤 빌드 사용\" ì„¤ì •ì„ í™œì„±í™”í•´ì•¼ 합니다."
#: editor/editor_node.cpp
msgid ""
@@ -3258,7 +3268,8 @@ msgid ""
"operation again."
msgstr ""
"Android 빌드 í…œí”Œë¦¿ì´ ì´ë¯¸ ì´ í”„ë¡œì íŠ¸ì— ì„¤ì¹˜í–ˆê³ , ë®ì–´ 쓸 수 없습니다.\n"
-"ì´ ëª…ë ¹ì„ ë‹¤ì‹œ 실행 ì „ì— \"res://android/build\" 디렉토리를 삭제하세요."
+"ì´ ëª…ë ¹ì„ ë‹¤ì‹œ 실행하기 ì „ì— \"res://android/build\" 디렉토리를 ì§ì ‘ 제거하세"
+"ìš”."
#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
@@ -3277,6 +3288,11 @@ msgid "Merge With Existing"
msgstr "ê¸°ì¡´ì˜ ê²ƒê³¼ 병합"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "애니메ì´ì…˜ 변형 바꾸기"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "스í¬ë¦½íЏ 열기 & 실행"
@@ -3311,21 +3327,20 @@ msgid "Select"
msgstr "ì„ íƒ"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Select Current"
-msgstr "현재 í´ë” ì„ íƒ"
+msgstr "현재 ì„ íƒ"
#: editor/editor_node.cpp
msgid "Open 2D Editor"
-msgstr "2D 편집기 열기"
+msgstr "2D ì—디터 열기"
#: editor/editor_node.cpp
msgid "Open 3D Editor"
-msgstr "3D 편집기 열기"
+msgstr "3D ì—디터 열기"
#: editor/editor_node.cpp
msgid "Open Script Editor"
-msgstr "스í¬ë¦½íЏ 편집기 열기"
+msgstr "스í¬ë¦½íЏ ì—디터 열기"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Open Asset Library"
@@ -3333,11 +3348,11 @@ msgstr "ì• ì…‹ ë¼ì´ë¸ŒëŸ¬ë¦¬ 열기"
#: editor/editor_node.cpp
msgid "Open the next Editor"
-msgstr "ë‹¤ìŒ íŽ¸ì§‘ê¸° 열기"
+msgstr "ë‹¤ìŒ ì—디터 열기"
#: editor/editor_node.cpp
msgid "Open the previous Editor"
-msgstr "ì´ì „ 편집기 열기"
+msgstr "ì´ì „ ì—디터 열기"
#: editor/editor_node.h
msgid "Warning!"
@@ -3348,9 +3363,8 @@ msgid "No sub-resources found."
msgstr "하위 리소스를 ì°¾ì„ ìˆ˜ 없습니다."
#: editor/editor_path.cpp
-#, fuzzy
msgid "Open a list of sub-resources."
-msgstr "하위 리소스를 ì°¾ì„ ìˆ˜ 없습니다."
+msgstr "하위 ë¦¬ì†ŒìŠ¤ì˜ ëª©ë¡ì„ 엽니다."
#: editor/editor_plugin.cpp
msgid "Creating Mesh Previews"
@@ -3362,7 +3376,7 @@ msgstr "ì¸ë„¤ì¼..."
#: editor/editor_plugin_settings.cpp
msgid "Main Script:"
-msgstr "기본 스í¬ë¦½íЏ:"
+msgstr "주 스í¬ë¦½íЏ:"
#: editor/editor_plugin_settings.cpp
msgid "Edit Plugin"
@@ -3381,7 +3395,6 @@ msgid "Version"
msgstr "버전"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Author"
msgstr "ì €ìž"
@@ -3396,14 +3409,12 @@ msgid "Measure:"
msgstr "측정:"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Frame Time (ms)"
-msgstr "프레임 시간 (초)"
+msgstr "프레임 시간 (ms)"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Average Time (ms)"
-msgstr "í‰ê·  시간 (ì´ˆ)"
+msgstr "í‰ê·  시간 (ms)"
#: editor/editor_profiler.cpp
msgid "Frame %"
@@ -3415,11 +3426,11 @@ msgstr "물리 프레임 %"
#: editor/editor_profiler.cpp
msgid "Inclusive"
-msgstr "í¬í•¨"
+msgstr "í¬ê´„ì "
#: editor/editor_profiler.cpp
msgid "Self"
-msgstr "셀프"
+msgstr "ìžì²´"
#: editor/editor_profiler.cpp
msgid ""
@@ -3430,6 +3441,12 @@ msgid ""
"functions called by that function.\n"
"Use this to find individual functions to optimize."
msgstr ""
+"í¬ê´„ì : ì´ í•¨ìˆ˜ì— ì˜í•´ í˜¸ì¶œëœ ë‹¤ë¥¸ 함수로부터 ì‹œê°„ì„ í¬í•¨í•©ë‹ˆë‹¤.\n"
+"ì´ë¥¼ 사용하여 병목 현ìƒì„ 찾아냅니다.\n"
+"\n"
+"ìžì²´: 해당 í•¨ìˆ˜ì— ì˜í•´ í˜¸ì¶œëœ ë‹¤ë¥¸ 함수ì—서가 아닌, 함수 ìžì²´ì—서 보낸 시간"
+"만 계산합니다.\n"
+"ì´ë¥¼ 사용하여 최ì í™”í•  개별 함수를 찾습니다."
#: editor/editor_profiler.cpp
msgid "Frame #:"
@@ -3510,7 +3527,7 @@ msgstr "페ì´ì§€: "
#: editor/editor_properties_array_dict.cpp
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Item"
-msgstr "항목 삭제"
+msgstr "항목 제거"
#: editor/editor_properties_array_dict.cpp
msgid "New Key:"
@@ -3528,7 +3545,11 @@ msgstr "키/ê°’ ìŒ ì¶”ê°€"
msgid ""
"The selected resource (%s) does not match any type expected for this "
"property (%s)."
-msgstr "ì„ íƒí•œ 리소스 (%s)ê°€ ì´ ì†ì„± (%s)ì— ì í•©í•œ 모든 ìœ í˜•ì— ë§žì§€ 않습니다."
+msgstr "ì„ íƒí•œ 리소스(%s)ê°€ ì´ ì†ì„±(%s)ì— ì í•©í•œ 모든 ìœ í˜•ì— ë§žì§€ 않습니다."
+
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
@@ -3549,7 +3570,6 @@ msgid "Paste"
msgstr "붙여넣기"
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
-#, fuzzy
msgid "Convert to %s"
msgstr "%s(으)로 변환"
@@ -3573,7 +3593,7 @@ msgid ""
msgstr ""
"ì´ í”Œëž«í¼ì„ 위한 실행할 수 있는 내보내기 í”„ë¦¬ì…‹ì´ ì—†ìŠµë‹ˆë‹¤.\n"
"내보내기 메뉴ì—서 실행할 수 있는 í”„ë¦¬ì…‹ì„ ì¶”ê°€í•˜ê±°ë‚˜ 기존 í”„ë¦¬ì…‹ì„ ì‹¤í–‰í•  수 "
-"있ë„ë¡ ì§€ì •í•´ì£¼ì„¸ìš”."
+"있ë„ë¡ ì •ì˜í•´ì£¼ì„¸ìš”."
#: editor/editor_run_script.cpp
msgid "Write your logic in the _run() method."
@@ -3600,10 +3620,8 @@ msgid "Did you forget the '_run' method?"
msgstr "'_run' 메서드를 잊었나요?"
#: editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Hold %s to round to integers. Hold Shift for more precise changes."
-msgstr ""
-"Ctrlì„ ëˆŒëŸ¬ 정수로 반올림합니다. Shift를 눌러 좀 ë” ì •ë°€í•˜ê²Œ 조작합니다."
+msgstr "%s를 눌러 정수로 반올림합니다. Shift를 눌러 좀 ë” ì •ë°€í•˜ê²Œ 조작합니다."
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
@@ -3623,32 +3641,29 @@ msgstr "노드ì—서 가져오기:"
#: editor/export_template_manager.cpp
msgid "Open the folder containing these templates."
-msgstr ""
+msgstr "ì´ í…œí”Œë¦¿ì„ í¬í•¨í•˜ëŠ” í´ë”를 엽니다."
#: editor/export_template_manager.cpp
msgid "Uninstall these templates."
msgstr "ì´ í…œí”Œë¦¿ì„ ì œê±°í•©ë‹ˆë‹¤."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "There are no mirrors available."
-msgstr "'%s' 파ì¼ì´ 없습니다."
+msgstr "사용 가능한 미러가 없습니다."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Retrieving the mirror list..."
-msgstr "미러를 검색 중입니다. 기다려주세요..."
+msgstr "미러 목ë¡ì„ 검색하는 중..."
#: editor/export_template_manager.cpp
msgid "Starting the download..."
-msgstr ""
+msgstr "다운로드를 시작하는 중..."
#: editor/export_template_manager.cpp
msgid "Error requesting URL:"
msgstr "URL 요청 중 오류:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Connecting to the mirror..."
msgstr "ë¯¸ëŸ¬ì— ì—°ê²° 중..."
@@ -3683,7 +3698,7 @@ msgstr "다운로드를 완료하여 í…œí”Œë¦¿ì„ ì••ì¶• í•´ì œ 중..."
#: editor/export_template_manager.cpp
msgid "Cannot remove temporary file:"
-msgstr "임시 파ì¼ì„ 삭제할 수 ì—†ìŒ:"
+msgstr "임시 파ì¼ì„ 제거할 수 ì—†ìŒ:"
#: editor/export_template_manager.cpp
msgid ""
@@ -3698,7 +3713,6 @@ msgid "Error getting the list of mirrors."
msgstr "미러 목ë¡ì„ 가져오는 중 오류."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error parsing JSON with the list of mirrors. Please report this issue!"
msgstr "미러 목ë¡ì˜ JSON 구문 ë¶„ì„ ì¤‘ 오류. ì´ ë¬¸ì œë¥¼ 신고해주세요!"
@@ -3757,24 +3771,20 @@ msgid "SSL Handshake Error"
msgstr "SSL 핸드셰ì´í¬ 오류"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't open the export templates file."
-msgstr "내보내기 템플릿 zip 파ì¼ì„ ì—´ 수 없습니다."
+msgstr "내보내기 템플릿 파ì¼ì„ ì—´ 수 없습니다."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Invalid version.txt format inside the export templates file: %s."
-msgstr "템플릿 ì†ì˜ version.txtê°€ ìž˜ëª»ëœ í˜•ì‹ìž„: %s."
+msgstr "내보내기 템플릿 íŒŒì¼ ì•ˆì˜ version.txtê°€ ìž˜ëª»ëœ í˜•ì‹ìž„: %s."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No version.txt found inside the export templates file."
-msgstr "í…œí”Œë¦¿ì— version.txt를 ì°¾ì„ ìˆ˜ 없습니다."
+msgstr "내보내기 템플릿 íŒŒì¼ ì•ˆì— version.txt를 ì°¾ì„ ìˆ˜ 없습니다."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for extracting templates:"
-msgstr "í…œí”Œë¦¿ì˜ ê²½ë¡œë¥¼ 만드는 중 오류:"
+msgstr "í…œí”Œë¦¿ì„ ì••ì¶• 풀기 위한 경로를 만드는 중 오류:"
#: editor/export_template_manager.cpp
msgid "Extracting Export Templates"
@@ -3785,9 +3795,8 @@ msgid "Importing:"
msgstr "가져오는 중:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Remove templates for the version '%s'?"
-msgstr "템플릿 버전 '%s'ì„(를) 삭제할까요?"
+msgstr "버전 '%s'ì˜ í…œí”Œë¦¿ì„ ì œê±°í•˜ì‹œê² ìŠµë‹ˆê¹Œ?"
#: editor/export_template_manager.cpp
msgid "Uncompressing Android Build Sources"
@@ -3804,19 +3813,19 @@ msgstr "현재 버전:"
#: editor/export_template_manager.cpp
msgid "Export templates are missing. Download them or install from a file."
msgstr ""
+"내보내기 í…œí”Œë¦¿ì´ ëˆ„ë½ë˜ì–´ 있습니다. 다운로드하거나 파ì¼ì—서 설치하세요."
#: editor/export_template_manager.cpp
msgid "Export templates are installed and ready to be used."
-msgstr ""
+msgstr "내보내기 í…œí”Œë¦¿ì´ ì„¤ì¹˜ë˜ì–´ ì‚¬ìš©ë  ì¤€ë¹„ê°€ ë˜ì—ˆìŠµë‹ˆë‹¤."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open Folder"
-msgstr "íŒŒì¼ ì—´ê¸°"
+msgstr "í´ë” 열기"
#: editor/export_template_manager.cpp
msgid "Open the folder containing installed templates for the current version."
-msgstr ""
+msgstr "현재 ë²„ì „ì„ ìœ„í•œ ì„¤ì¹˜ëœ í…œí”Œë¦¿ì„ í¬í•¨í•˜ëŠ” í´ë”를 엽니다."
#: editor/export_template_manager.cpp
msgid "Uninstall"
@@ -3827,36 +3836,33 @@ msgid "Uninstall templates for the current version."
msgstr "현재 ë²„ì „ì„ ìœ„í•œ í…œí”Œë¦¿ì„ ì œê±°í•©ë‹ˆë‹¤."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Download from:"
-msgstr "ë‹¤ìŒ ìœ„ì¹˜ì—서 다운로드:"
+msgstr "다ìŒìœ¼ë¡œë¶€í„° 다운로드:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "브ë¼ìš°ì €ì—서 실행"
+msgstr "웹 브ë¼ìš°ì €ì—서 열기"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "복사 오류"
+msgstr "미러 URL 복사"
#: editor/export_template_manager.cpp
msgid "Download and Install"
-msgstr ""
+msgstr "다운로드 ë° ì„¤ì¹˜"
#: editor/export_template_manager.cpp
msgid ""
"Download and install templates for the current version from the best "
"possible mirror."
msgstr ""
+"최ìƒì˜ 가능한 미러ì—서 현재 ë²„ì „ì„ ìœ„í•œ í…œí”Œë¦¿ì„ ë‹¤ìš´ë¡œë“œí•˜ê³  설치합니다."
#: editor/export_template_manager.cpp
msgid "Official export templates aren't available for development builds."
msgstr "ê³µì‹ ë‚´ë³´ë‚´ê¸° í…œí”Œë¦¿ì€ ê°œë°œ 빌드ì—서는 ì´ìš©í•  수 없습니다."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install from File"
msgstr "파ì¼ì—서 설치"
@@ -3870,14 +3876,12 @@ msgid "Cancel"
msgstr "취소"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Cancel the download of the templates."
-msgstr "내보내기 템플릿 zip 파ì¼ì„ ì—´ 수 없습니다."
+msgstr "í…œí”Œë¦¿ì˜ ë‹¤ìš´ë¡œë“œë¥¼ 취소합니다."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Other Installed Versions:"
-msgstr "ì„¤ì¹˜ëœ ë²„ì „:"
+msgstr "다른 ì„¤ì¹˜ëœ ë²„ì „:"
#: editor/export_template_manager.cpp
msgid "Uninstall Template"
@@ -3896,6 +3900,8 @@ msgid ""
"The templates will continue to download.\n"
"You may experience a short editor freeze when they finish."
msgstr ""
+"í…œí”Œë¦¿ì´ ë‹¤ìš´ë¡œë“œë¥¼ 계ì†í•  것입니다.\n"
+"완료ë˜ë©´ ì—디터가 짧게 멈추는 현ìƒì„ ê²ªì„ ìˆ˜ 있습니다."
#: editor/filesystem_dock.cpp
msgid "Favorites"
@@ -3911,7 +3917,7 @@ msgstr ""
msgid ""
"Importing has been disabled for this file, so it can't be opened for editing."
msgstr ""
-"ì´ íŒŒì¼ì— 대해 가져 오기가 비활성화ë˜ì—ˆìœ¼ë©° íŽ¸ì§‘ì„ ìœ„í•´ ì—´ 수 없습니다."
+"ì´ íŒŒì¼ì— 대해 가져오기가 비활성화ë˜ì—ˆìœ¼ë©°, íŽ¸ì§‘ì„ ìœ„í•´ ì—´ 수 없습니다."
#: editor/filesystem_dock.cpp
msgid "Cannot move/rename resources root."
@@ -3998,11 +4004,11 @@ msgstr "ì¸ìŠ¤í„´ìŠ¤í•˜ê¸°"
#: editor/filesystem_dock.cpp
msgid "Add to Favorites"
-msgstr "ì¦ê²¨ì°¾ê¸°ë¡œ 추가"
+msgstr "ì¦ê²¨ì°¾ê¸°ì— 추가"
#: editor/filesystem_dock.cpp
msgid "Remove from Favorites"
-msgstr "ì¦ê²¨ì°¾ê¸°ì—서 ì‚­ì œ"
+msgstr "ì¦ê²¨ì°¾ê¸°ì—서 제거"
#: editor/filesystem_dock.cpp
msgid "Edit Dependencies..."
@@ -4041,35 +4047,32 @@ msgid "Collapse All"
msgstr "ëª¨ë‘ ì ‘ê¸°"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort files"
-msgstr "íŒŒì¼ ê²€ìƒ‰"
+msgstr "íŒŒì¼ ì •ë ¬"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Ascending)"
-msgstr ""
+msgstr "ì´ë¦„순 ì •ë ¬ (오름차순)"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Descending)"
-msgstr ""
+msgstr "ì´ë¦„순 ì •ë ¬ (내림차순)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Ascending)"
-msgstr ""
+msgstr "유형별 정렬 (오름차순)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Descending)"
-msgstr ""
+msgstr "유형별 정렬 (내림차순)"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort by Last Modified"
-msgstr "마지막으로 수정ë¨"
+msgstr "마지막으로 ìˆ˜ì •ëœ ìˆœì„œë¡œ ì •ë ¬"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort by First Modified"
-msgstr "마지막으로 수정ë¨"
+msgstr "처ìŒìœ¼ë¡œ ìˆ˜ì •ëœ ìˆœì„œë¡œ ì •ë ¬"
#: editor/filesystem_dock.cpp
msgid "Duplicate..."
@@ -4081,7 +4084,7 @@ msgstr "ì´ë¦„ 바꾸기..."
#: editor/filesystem_dock.cpp
msgid "Focus the search box"
-msgstr ""
+msgstr "ê²€ìƒ‰ì°½ì— ì´ˆì  ë§žì¶”ê¸°"
#: editor/filesystem_dock.cpp
msgid "Previous Folder/File"
@@ -4093,7 +4096,7 @@ msgstr "ë‹¤ìŒ í´ë”/파ì¼"
#: editor/filesystem_dock.cpp
msgid "Re-Scan Filesystem"
-msgstr "íŒŒì¼ ì‹œìŠ¤í…œ 다시 스캔"
+msgstr "파ì¼ì‹œìŠ¤í…œ 다시 스캔"
#: editor/filesystem_dock.cpp
msgid "Toggle Split Mode"
@@ -4155,8 +4158,8 @@ msgid ""
"Include the files with the following extensions. Add or remove them in "
"ProjectSettings."
msgstr ""
-"해당 í™•ìž¥ìž ì´ë¦„ì„ ê°–ëŠ” 파ì¼ì´ 있습니다. 프로ì íЏ ì„¤ì •ì— íŒŒì¼ì„ 추가하거나 ì‚­"
-"제하세요."
+"해당 í™•ìž¥ìž ì´ë¦„ì„ ê°–ëŠ” 파ì¼ì´ í¬í•¨ë˜ì–´ 있습니다. 프로ì íЏ ì„¤ì •ì— íŒŒì¼ì„ 추가"
+"하거나 제거하세요."
#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
@@ -4201,7 +4204,7 @@ msgstr "ê·¸ë£¹ì— ì¶”ê°€"
#: editor/groups_editor.cpp
msgid "Remove from Group"
-msgstr "그룹ì—서 ì‚­ì œ"
+msgstr "그룹ì—서 제거"
#: editor/groups_editor.cpp
msgid "Group name already exists."
@@ -4238,11 +4241,11 @@ msgstr "ê·¸ë£¹ì— ì†í•œ 노드"
#: editor/groups_editor.cpp
msgid "Empty groups will be automatically removed."
-msgstr "빈 ê·¸ë£¹ì€ ìžë™ìœ¼ë¡œ ì‚­ì œë©ë‹ˆë‹¤."
+msgstr "빈 ê·¸ë£¹ì€ ìžë™ìœ¼ë¡œ 제거ë©ë‹ˆë‹¤."
#: editor/groups_editor.cpp
msgid "Group Editor"
-msgstr "그룹 편집기"
+msgstr "그룹 ì—디터"
#: editor/groups_editor.cpp
msgid "Manage Groups"
@@ -4262,15 +4265,15 @@ msgstr "ë¨¸í‹°ë¦¬ì–¼ì„ ë¶„ë¦¬í•´ì„œ 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects"
-msgstr "ê°ì²´ë¥¼ 분리해서 가져오기"
+msgstr "오브ì íŠ¸ë¥¼ 분리해서 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Materials"
-msgstr "ê°ì²´ì™€ ë¨¸í‹°ë¦¬ì–¼ì„ ë¶„ë¦¬í•´ì„œ 가져오기"
+msgstr "오브ì íŠ¸ì™€ ë¨¸í‹°ë¦¬ì–¼ì„ ë¶„ë¦¬í•´ì„œ 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Animations"
-msgstr "ê°ì²´ì™€ 애니메ì´ì…˜ì„ 분리해서 가져오기"
+msgstr "오브ì íŠ¸ì™€ 애니메ì´ì…˜ì„ 분리해서 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials+Animations"
@@ -4278,7 +4281,7 @@ msgstr "머티리얼과 애니메ì´ì…˜ì„ 분리해서 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Objects+Materials+Animations"
-msgstr "ê°ì²´, 머티리얼, 애니메ì´ì…˜ì„ 분리해서 가져오기"
+msgstr "오브ì íЏ, 머티리얼, 애니메ì´ì…˜ì„ 분리해서 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes"
@@ -4323,7 +4326,7 @@ msgstr "후 가져오기 스í¬ë¦½íЏ 실행 중 오류:"
#: editor/import/resource_importer_scene.cpp
msgid "Did you return a Node-derived object in the `post_import()` method?"
-msgstr "`post_import()` 메소드ì—서 Nodeì—서 ìƒì†ë°›ì€ ê°ì²´ë¥¼ 반환했습니까?"
+msgstr "`post_import()` 메소드ì—서 Nodeì—서 ìƒì†ë°›ì€ 오브ì íŠ¸ë¥¼ 반환했습니까?"
#: editor/import/resource_importer_scene.cpp
msgid "Saving..."
@@ -4339,7 +4342,7 @@ msgstr "ìž„í¬í„°:"
#: editor/import_defaults_editor.cpp
msgid "Reset to Defaults"
-msgstr "기본값으로 재설정"
+msgstr "ë””í´íŠ¸ë¡œ 재설정"
#: editor/import_dock.cpp
msgid "Keep File (No Import)"
@@ -4351,11 +4354,11 @@ msgstr "íŒŒì¼ %dê°œ"
#: editor/import_dock.cpp
msgid "Set as Default for '%s'"
-msgstr "'%s'ì„(를) 기본으로 설정"
+msgstr "'%s'ì„(를) ë””í´íŠ¸ìœ¼ë¡œ 설정"
#: editor/import_dock.cpp
msgid "Clear Default for '%s'"
-msgstr "'%s'ì„(를) 기본ì—서 지우기"
+msgstr "'%s'ì„(를) ë””í´íЏì—서 지우기"
#: editor/import_dock.cpp
msgid "Import As:"
@@ -4375,7 +4378,7 @@ msgstr "씬 저장, 다시 가져오기 ë° ë‹¤ì‹œ 시작"
#: editor/import_dock.cpp
msgid "Changing the type of an imported file requires editor restart."
-msgstr "가져온 파ì¼ì˜ ìœ í˜•ì„ ë°”ê¾¸ë ¤ë©´ 편집기를 다시 켜아 합니다."
+msgstr "가져온 파ì¼ì˜ ìœ í˜•ì„ ë°”ê¾¸ë ¤ë©´ ì—디터를 다시 시작해야 합니다."
#: editor/import_dock.cpp
msgid ""
@@ -4389,14 +4392,12 @@ msgid "Failed to load resource."
msgstr "리소스 ë¶ˆëŸ¬ì˜¤ê¸°ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Copy Properties"
-msgstr "ì†ì„±"
+msgstr "ì†ì„± 복사"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Paste Properties"
-msgstr "ì†ì„±"
+msgstr "ì†ì„± 붙여넣기"
#: editor/inspector_dock.cpp
msgid "Make Sub-Resources Unique"
@@ -4425,47 +4426,44 @@ msgid "Extra resource options."
msgstr "별ë„ì˜ ë¦¬ì†ŒìŠ¤ 옵션."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Edit Resource from Clipboard"
-msgstr "리소스 í´ë¦½ë³´ë“œ 편집"
+msgstr "í´ë¦½ë³´ë“œì—서 리소스 편집"
#: editor/inspector_dock.cpp
msgid "Copy Resource"
msgstr "리소스 복사"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Make Resource Built-In"
-msgstr "내장으로 만들기"
+msgstr "리소스를 내장으로 만들기"
#: editor/inspector_dock.cpp
msgid "Go to the previous edited object in history."
-msgstr "기ë¡ìƒ ì´ì „ì— íŽ¸ì§‘í–ˆë˜ ê°ì²´ë¡œ ì´ë™í•©ë‹ˆë‹¤."
+msgstr "기ë¡ìƒ ì´ì „ì— íŽ¸ì§‘í–ˆë˜ ì˜¤ë¸Œì íŠ¸ë¡œ ì´ë™í•©ë‹ˆë‹¤."
#: editor/inspector_dock.cpp
msgid "Go to the next edited object in history."
-msgstr "기ë¡ìƒ 다ìŒì— íŽ¸ì§‘í–ˆë˜ ê°ì²´ë¡œ ì´ë™í•©ë‹ˆë‹¤."
+msgstr "기ë¡ìƒ 다ìŒì— íŽ¸ì§‘í–ˆë˜ ì˜¤ë¸Œì íŠ¸ë¡œ ì´ë™í•©ë‹ˆë‹¤."
#: editor/inspector_dock.cpp
msgid "History of recently edited objects."
-msgstr "ìµœê·¼ì— íŽ¸ì§‘í•œ ê°ì²´ 기ë¡ìž…니다."
+msgstr "ìµœê·¼ì— íŽ¸ì§‘í•œ 오브ì íЏ 기ë¡ìž…니다."
#: editor/inspector_dock.cpp
msgid "Open documentation for this object."
-msgstr "ì´ ê°ì²´ë¥¼ 위한 설명문서를 엽니다."
+msgstr "ì´ ì˜¤ë¸Œì íŠ¸ë¥¼ 위한 문서를 엽니다."
#: editor/inspector_dock.cpp editor/scene_tree_dock.cpp
msgid "Open Documentation"
-msgstr "설명문서 열기"
+msgstr "문서 열기"
#: editor/inspector_dock.cpp
msgid "Filter properties"
msgstr "í•„í„° ì†ì„±"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Manage object properties."
-msgstr "ê°ì²´ ì†ì„±."
+msgstr "오브ì íЏ ì†ì„±ì„ 관리합니다."
#: editor/inspector_dock.cpp
msgid "Changes may be lost!"
@@ -4477,7 +4475,7 @@ msgstr "다중 노드 설정"
#: editor/node_dock.cpp
msgid "Select a single node to edit its signals and groups."
-msgstr "시그ë„ê³¼ ê·¸ë£¹ì„ íŽ¸ì§‘í•  노드 하나를 ì„ íƒí•˜ì„¸ìš”."
+msgstr "시그ë„ê³¼ ê·¸ë£¹ì„ íŽ¸ì§‘í•  ë‹¨ì¼ ë…¸ë“œë¥¼ ì„ íƒí•˜ì„¸ìš”."
#: editor/plugin_config_dialog.cpp
msgid "Edit a Plugin"
@@ -4552,11 +4550,11 @@ msgstr "ì  ì‚½ìž…"
#: editor/plugins/abstract_polygon_2d_editor.cpp
msgid "Edit Polygon (Remove Point)"
-msgstr "í´ë¦¬ê³¤ 편집 (ì  ì‚­ì œ)"
+msgstr "í´ë¦¬ê³¤ 편집 (ì  ì œê±°)"
#: editor/plugins/abstract_polygon_2d_editor.cpp
msgid "Remove Polygon And Point"
-msgstr "í´ë¦¬ê³¤ê³¼ ì  ì‚­ì œ"
+msgstr "í´ë¦¬ê³¤ê³¼ ì  ì œê±°"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4604,7 +4602,7 @@ msgstr "애니메ì´ì…˜ ì  ì¶”ê°€"
#: editor/plugins/animation_blend_space_1d_editor.cpp
msgid "Remove BlendSpace1D Point"
-msgstr "BlendSpace1D ì  ì‚­ì œ"
+msgstr "BlendSpace1D ì  ì œê±°"
#: editor/plugins/animation_blend_space_1d_editor.cpp
msgid "Move BlendSpace1D Node Point"
@@ -4618,8 +4616,9 @@ msgid ""
"AnimationTree is inactive.\n"
"Activate to enable playback, check node warnings if activation fails."
msgstr ""
-"AnimationTree가 꺼져 있습니다.\n"
-"재ìƒí•˜ë ¤ë©´ AnimationTree를 켜고, ì‹¤í–‰ì— ì‹¤íŒ¨í•˜ë©´ 노드 경고를 확ì¸í•˜ì„¸ìš”."
+"AnimationTreeê°€ 비활성 ìƒíƒœìž…니다.\n"
+"재ìƒì„ 활성화하려면 AnimationTree를 활성화하고, í™œì„±í™”ì— ì‹¤íŒ¨í•˜ë©´ 노드 경고"
+"를 확ì¸í•˜ì„¸ìš”."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4634,7 +4633,7 @@ msgstr "ì ì„ ì„ íƒí•˜ê³  ì´ë™í•©ë‹ˆë‹¤. ìš°í´ë¦­ìœ¼ë¡œ ì ì„ 만드세요
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp scene/gui/graph_edit.cpp
msgid "Enable snap and show grid."
-msgstr "ìŠ¤ëƒ…ì„ ì¼œê³  격ìžë¥¼ ë³´ì´ê²Œ 합니다."
+msgstr "ìŠ¤ëƒ…ì„ í™œì„±í™”í•˜ê³  격ìžë¥¼ ë³´ì´ê²Œ 합니다."
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4645,7 +4644,7 @@ msgstr "ì "
#: editor/plugins/animation_blend_space_2d_editor.cpp
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Open Editor"
-msgstr "편집기 열기"
+msgstr "ì—디터 열기"
#: editor/plugins/animation_blend_space_1d_editor.cpp
#: editor/plugins/animation_blend_space_2d_editor.cpp
@@ -4672,11 +4671,11 @@ msgstr "BlendSpace2D ë¼ë²¨ 바꾸기"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Remove BlendSpace2D Point"
-msgstr "BlendSpace2D ì  ì‚­ì œ"
+msgstr "BlendSpace2D ì  ì œê±°"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "Remove BlendSpace2D Triangle"
-msgstr "BlendSpace2D 삼ê°í˜• ì‚­ì œ"
+msgstr "BlendSpace2D 삼ê°í˜• 제거"
#: editor/plugins/animation_blend_space_2d_editor.cpp
msgid "BlendSpace2D does not belong to an AnimationTree node."
@@ -4813,7 +4812,7 @@ msgstr "필터 트랙 편집:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
msgid "Enable Filtering"
-msgstr "필터 켜기"
+msgstr "필터 활성화"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Toggle Autoplay"
@@ -4839,7 +4838,7 @@ msgstr "애니메ì´ì…˜ì„ 삭제할까요?"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Remove Animation"
-msgstr "애니메ì´ì…˜ ì‚­ì œ"
+msgstr "애니메ì´ì…˜ 제거"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Invalid animation name!"
@@ -4916,7 +4915,7 @@ msgstr "애니메ì´ì…˜ 위치 (ì´ˆ)."
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Scale animation playback globally for the node."
-msgstr "ë…¸ë“œì˜ ì• ë‹ˆë©”ì´ì…˜ ìž¬ìƒ ê¸¸ì´ë¥¼ ì „ì²´ì ìœ¼ë¡œ 조절합니다."
+msgstr "ë…¸ë“œì˜ ì• ë‹ˆë©”ì´ì…˜ ìž¬ìƒ ìŠ¤ì¼€ì¼ë¥¼ ì „ì²´ì ìœ¼ë¡œ 조절합니다."
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation Tools"
@@ -4949,7 +4948,7 @@ msgstr "불러올 시 ìžë™ìœ¼ë¡œ 재ìƒ"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Enable Onion Skinning"
-msgstr "어니언 ìŠ¤í‚¤ë‹ ì¼œê¸°"
+msgstr "어니언 ìŠ¤í‚¤ë‹ í™œì„±í™”"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Onion Skinning Options"
@@ -5073,11 +5072,11 @@ msgstr "ì´ ê²½ë¡œì— ì„¤ì •í•œ ìž¬ìƒ ë¦¬ì†ŒìŠ¤ê°€ ì—†ìŒ: %s."
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Node Removed"
-msgstr "노드 ì‚­ì œë¨"
+msgstr "노드 제거ë¨"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Transition Removed"
-msgstr "전환 ì‚­ì œë¨"
+msgstr "전환 제거ë¨"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Set Start Node (Autoplay)"
@@ -5103,7 +5102,7 @@ msgstr "노드를 연결합니다."
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Remove selected node or transition."
-msgstr "ì„ íƒí•œ 노드나 ì „í™˜ì„ ì‚­ì œí•©ë‹ˆë‹¤."
+msgstr "ì„ íƒí•œ 노드나 ì „í™˜ì„ ì œê±°í•©ë‹ˆë‹¤."
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Toggle autoplay this animation on start, restart or seek to zero."
@@ -5134,7 +5133,7 @@ msgstr "새 ì´ë¦„:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
-msgstr "í¬ê¸°:"
+msgstr "스케ì¼:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Fade In (s):"
@@ -5241,7 +5240,7 @@ msgstr "혼합4 노드"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "TimeScale Node"
-msgstr "시간 í¬ê¸° ì¡°ì ˆ 노드"
+msgstr "시간 ìŠ¤ì¼€ì¼ ë…¸ë“œ"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "TimeSeek Node"
@@ -5265,7 +5264,7 @@ msgstr "í•„í„°..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Contents:"
-msgstr "ë‚´ìš©:"
+msgstr "콘í…츠:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "View Files"
@@ -5437,11 +5436,11 @@ msgstr "모ë‘"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search templates, projects, and demos"
-msgstr ""
+msgstr "검색 템플릿, 프로ì íЏ, ë° ë°ëª¨"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search assets (excluding templates, projects, and demos)"
-msgstr ""
+msgstr "ì• ì…‹ 검색 (템플릿, 프로ì íЏ, ë° ë°ëª¨ 제외)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Import..."
@@ -5473,7 +5472,7 @@ msgstr "ê³µì‹"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Testing"
-msgstr "시험"
+msgstr "테스트"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Loading..."
@@ -5485,7 +5484,7 @@ msgstr "ì• ì…‹ ZIP 파ì¼"
#: editor/plugins/audio_stream_editor_plugin.cpp
msgid "Audio Preview Play/Pause"
-msgstr ""
+msgstr "오디오 미리 보기 재ìƒ/ì¼ì‹œ ì •ì§€"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5496,13 +5495,12 @@ msgstr ""
"ë‹¹ì‹ ì˜ ì”¬ì„ ì €ìž¥í•˜ê³  다시 시ë„하세요."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"No meshes to bake. Make sure they contain an UV2 channel and that the 'Use "
"In Baked Light' and 'Generate Lightmap' flags are on."
msgstr ""
-"ë¼ì´íŠ¸ë§µì„ êµ¬ìš¸ 메시가 없습니다. 메시가 UV2 채ë„ì„ ê°–ê³  있고 'Bake Light' 플"
-"래그가 켜져 있는지 확ì¸í•´ì£¼ì„¸ìš”."
+"구울 메시가 없습니다. UV2 채ë„ì„ í¬í•¨í•˜ê³  있고 'Use In Baked Light' ë° "
+"'Generate Lightmap' 플래그가 켜져 있는지 확ì¸í•´ì£¼ì„¸ìš”."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed creating lightmap images, make sure path is writable."
@@ -5525,7 +5523,7 @@ msgstr ""
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
-"Godot 편집기는 ë ˆì´ íŠ¸ë ˆì´ì‹± ì§€ì› ì—†ì´ ë¹Œë“œë˜ì—ˆìœ¼ë©° ë¼ì´íŠ¸ë§µì€ êµ¬ìš¸ 수 없습니"
+"Godot ì—디터는 ë ˆì´ íŠ¸ë ˆì´ì‹± ì§€ì› ì—†ì´ ë¹Œë“œë˜ì—ˆìœ¼ë©° ë¼ì´íŠ¸ë§µì€ êµ¬ìš¸ 수 없습니"
"다."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
@@ -5571,7 +5569,7 @@ msgstr "회전 단계:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Scale Step:"
-msgstr "í¬ê¸° ì¡°ì ˆ 단계:"
+msgstr "ìŠ¤ì¼€ì¼ ë‹¨ê³„:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move Vertical Guide"
@@ -5583,7 +5581,7 @@ msgstr "ìˆ˜ì§ ê°€ì´ë“œ 만들기"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Remove Vertical Guide"
-msgstr "ìˆ˜ì§ ê°€ì´ë“œ ì‚­ì œ"
+msgstr "ìˆ˜ì§ ê°€ì´ë“œ 제거"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move Horizontal Guide"
@@ -5595,7 +5593,7 @@ msgstr "ìˆ˜í‰ ê°€ì´ë“œ 만들기"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Remove Horizontal Guide"
-msgstr "ìˆ˜í‰ ê°€ì´ë“œ ì‚­ì œ"
+msgstr "ìˆ˜í‰ ê°€ì´ë“œ 제거"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Create Horizontal and Vertical Guides"
@@ -5619,7 +5617,7 @@ msgstr "CanvasItem \"%s\" 앵커 ì´ë™"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Scale Node2D \"%s\" to (%s, %s)"
-msgstr "Node2D \"%s\"를 (%s, %s)로 í¬ê¸° ì¡°ì ˆ"
+msgstr "Node2D \"%s\"를 (%s, %s)로 ìŠ¤ì¼€ì¼ ì¡°ì ˆ"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Resize Control \"%s\" to (%d, %d)"
@@ -5627,11 +5625,11 @@ msgstr "컨트롤 \"%s\"를 (%d, %d)로 í¬ê¸° ì¡°ì ˆ"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Scale %d CanvasItems"
-msgstr "CanvasItem %dê°œ í¬ê¸° ì¡°ì ˆ"
+msgstr "CanvasItem %dê°œ ìŠ¤ì¼€ì¼ ì¡°ì ˆ"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Scale CanvasItem \"%s\" to (%s, %s)"
-msgstr "CanvasItem \"%s\"를 (%s, %s)로 í¬ê¸° ì¡°ì ˆ"
+msgstr "CanvasItem \"%s\"를 (%s, %s)로 ìŠ¤ì¼€ì¼ ì¡°ì ˆ"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move %d CanvasItems"
@@ -5642,10 +5640,22 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "CanvasItem \"%s\"를 (%d, %d)로 ì´ë™"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "ì„ íƒ í•­ëª© 잠그기"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "그룹"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
-msgstr "컨테ì´ë„ˆì˜ ìžì‹ì€ 부모로 ì¸í•´ 재정ì˜ëœ 앵커와 여백 ê°’ì„ ê°€ì§‘ë‹ˆë‹¤."
+msgstr "컨테ì´ë„ˆì˜ ìžì†ì€ 부모로 ì¸í•´ 재정ì˜ëœ 앵커와 여백 ê°’ì„ ê°€ì§‘ë‹ˆë‹¤."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Presets for the anchors and margins values of a Control node."
@@ -5739,13 +5749,12 @@ msgstr "앵커 바꾸기"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid ""
"Project Camera Override\n"
"Overrides the running project's camera with the editor viewport camera."
msgstr ""
-"게임 ì¹´ë©”ë¼ ë‹¤ì‹œ ì •ì˜\n"
-"편집기 ë·°í¬íЏ ì¹´ë©”ë¼ë¡œ 게임 ì¹´ë©”ë¼ë¥¼ 다시 ì •ì˜í•©ë‹ˆë‹¤."
+"프로ì íЏ ì¹´ë©”ë¼ ìž¬ì •ì˜\n"
+"실행 ì¤‘ì¸ í”„ë¡œì íŠ¸ì˜ ì¹´ë©”ë¼ë¥¼ ì—디터 ë·°í¬íЏ ì¹´ë©”ë¼ë¡œ 재정ì˜í•©ë‹ˆë‹¤."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5754,6 +5763,9 @@ msgid ""
"No project instance running. Run the project from the editor to use this "
"feature."
msgstr ""
+"프로ì íЏ ì¹´ë©”ë¼ ìž¬ì •ì˜\n"
+"실행 ì¤‘ì¸ í”„ë¡œì íЏ ì¸ìŠ¤í„´ìŠ¤ê°€ 없습니다. ì´ ê¸°ëŠ¥ì„ ì‚¬ìš©í•˜ë ¤ë©´ ì—디터ì—서 프로"
+"ì íŠ¸ë¥¼ 실행하세요."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5803,14 +5815,14 @@ msgstr "IK ì²´ì¸ ì§€ìš°ê¸°"
msgid ""
"Warning: Children of a container get their position and size determined only "
"by their parent."
-msgstr "경고: 컨테ì´ë„ˆì˜ ìžì‹ 규모와 위치는 ë¶€ëª¨ì— ì˜í•´ ê²°ì •ë©ë‹ˆë‹¤."
+msgstr "경고: 컨테ì´ë„ˆì˜ ìžì† 위치와 í¬ê¸°ëŠ” ë¶€ëª¨ì— ì˜í•´ ê²°ì •ë©ë‹ˆë‹¤."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp scene/gui/graph_edit.cpp
msgid "Zoom Reset"
-msgstr "줌 초기화"
+msgstr "줌 재설정"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5838,7 +5850,7 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "RMB: Add node at position clicked."
-msgstr ""
+msgstr "ìš°í´ë¦­: í´ë¦­í•œ ìœ„ì¹˜ì— ë…¸ë“œë¥¼ 추가합니다."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5853,7 +5865,7 @@ msgstr "회전 모드"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Mode"
-msgstr "í¬ê¸° ì¡°ì ˆ 모드"
+msgstr "ìŠ¤ì¼€ì¼ ëª¨ë“œ"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5861,12 +5873,12 @@ msgid ""
"Show a list of all objects at the position clicked\n"
"(same as Alt+RMB in select mode)."
msgstr ""
-"í´ë¦­í•œ ìœ„ì¹˜ì— ìžˆëŠ” 모든 ê°ì²´ 목ë¡ì„ 보여줘요\n"
+"í´ë¦­í•œ ìœ„ì¹˜ì— ìžˆëŠ” 모든 오브ì íЏ 목ë¡ì„ ë³´ì—¬ì¤ë‹ˆë‹¤\n"
"(ì„ íƒ ëª¨ë“œì—서 Alt+ìš°í´ë¦­ê³¼ ê°™ìŒ)."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Click to change object's rotation pivot."
-msgstr "í´ë¦­ìœ¼ë¡œ ê°ì²´ì˜ 회전 í”¼ë²—ì„ ë°”ê¿‰ë‹ˆë‹¤."
+msgstr "í´ë¦­ìœ¼ë¡œ 오브ì íŠ¸ì˜ íšŒì „ í”¼ë²—ì„ ë°”ê¿‰ë‹ˆë‹¤."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Pan Mode"
@@ -5902,7 +5914,7 @@ msgstr "회전 스냅 사용"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Scale Snap"
-msgstr "í¬ê¸° ì¡°ì ˆ 스냅 사용"
+msgstr "ìŠ¤ì¼€ì¼ ìŠ¤ëƒ… 사용"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap Relative"
@@ -5948,22 +5960,22 @@ msgstr "ê°€ì´ë“œì— 스냅"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock the selected object in place (can't be moved)."
-msgstr "ì„ íƒí•œ ê°ì²´ë¥¼ ê·¸ ìžë¦¬ì— 잠가요 (움ì§ì¼ 수 없습니다)."
+msgstr "ì„ íƒëœ 오브ì íŠ¸ë¥¼ ê·¸ ìžë¦¬ì— 잠급니다 (움ì§ì¼ 수 없습니다)."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Unlock the selected object (can be moved)."
-msgstr "ì„ íƒí•œ ê°ì²´ë¥¼ 잠금ì—서 í’€ (움ì§ì¼ 수 있습니다)."
+msgstr "ì„ íƒëœ 오브ì íŠ¸ë¥¼ 잠금ì—서 풉니다 (움ì§ì¼ 수 있습니다)."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Makes sure the object's children are not selectable."
-msgstr "ê°ì²´ì˜ ìžì‹ì„ ì„ íƒí•˜ì§€ 않ë„ë¡ í•©ë‹ˆë‹¤."
+msgstr "오브ì íŠ¸ì˜ ìžì†ì„ ì„ íƒí•˜ì§€ 않ë„ë¡ í•©ë‹ˆë‹¤."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Restores the object's children's ability to be selected."
-msgstr "ê°ì²´ì˜ ìžì‹ì„ ì„ íƒí•  수 있ë„ë¡ í•©ë‹ˆë‹¤."
+msgstr "오브ì íŠ¸ì˜ ìžì†ì„ ì„ íƒí•  수 있ë„ë¡ ë³µì›í•©ë‹ˆë‹¤."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton Options"
@@ -6024,7 +6036,7 @@ msgstr "프레임 ì„ íƒ"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Preview Canvas Scale"
-msgstr "캔버스 í¬ê¸° ì¡°ì ˆ 미리 보기"
+msgstr "캔버스 ìŠ¤ì¼€ì¼ ë¯¸ë¦¬ 보기"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Translation mask for inserting keys."
@@ -6036,7 +6048,7 @@ msgstr "키를 삽입하기 위한 회전 마스í¬."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Scale mask for inserting keys."
-msgstr "키를 삽입하기 위한 í¬ê¸° ì¡°ì ˆ 마스í¬."
+msgstr "키를 삽입하기 위한 ìŠ¤ì¼€ì¼ ë§ˆìŠ¤í¬."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert keys (based on mask)."
@@ -6049,8 +6061,8 @@ msgid ""
"Keys are only added to existing tracks, no new tracks will be created.\n"
"Keys must be inserted manually for the first time."
msgstr ""
-"ê°ì²´ë¥¼ 전환, 회전 ë˜ëŠ” í¬ê¸° 조절할 때마다 ìžë™ìœ¼ë¡œ 키를 삽입합니다 (ë§ˆìŠ¤í¬ ê¸°"
-"준).\n"
+"오브ì íŠ¸ë¥¼ 전환, 회전 ë˜ëŠ” 스케ì¼ì„ 조절할 때마다 ìžë™ìœ¼ë¡œ 키를 삽입합니다 "
+"(ë§ˆìŠ¤í¬ ê¸°ì¤€).\n"
"키는 기존 트랙ì—ë§Œ 추가ë˜ê³ , 새 íŠ¸ëž™ì„ ì¶”ê°€í•˜ì§„ 않습니다.\n"
"처ìŒì—는 수ë™ìœ¼ë¡œ 키를 삽입해야 합니다."
@@ -6075,14 +6087,12 @@ msgid "Clear Pose"
msgstr "í¬ì¦ˆ 지우기"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Add Node Here"
-msgstr "노드 추가"
+msgstr "ì—¬ê¸°ì— ë…¸ë“œ 추가"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Instance Scene Here"
-msgstr "씬 ì¸ìŠ¤í„´ìŠ¤í™”"
+msgstr "ì—¬ê¸°ì— ì”¬ ì¸ìŠ¤í„´ìŠ¤í™”"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
@@ -6098,49 +6108,43 @@ msgstr "팬 보기"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 3.125%"
-msgstr ""
+msgstr "3.125%로 줌"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 6.25%"
-msgstr ""
+msgstr "6.25%로 줌"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 12.5%"
-msgstr ""
+msgstr "12.5%로 줌"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 25%"
-msgstr "줌 아웃"
+msgstr "25%로 줌"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 50%"
-msgstr "줌 아웃"
+msgstr "50%로 줌"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 100%"
-msgstr "줌 아웃"
+msgstr "100%로 줌"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 200%"
-msgstr "줌 아웃"
+msgstr "200%로 줌"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 400%"
-msgstr "줌 아웃"
+msgstr "400%로 줌"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 800%"
-msgstr "줌 아웃"
+msgstr "800%로 줌"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 1600%"
-msgstr ""
+msgstr "1600%로 줌"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
@@ -6166,14 +6170,14 @@ msgstr "'%s'ì—서 씬 ì¸ìŠ¤í„´ìŠ¤ 중 오류"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Default Type"
-msgstr "기본 유형 바꾸기"
+msgstr "ë””í´íЏ 유형 바꾸기"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
"Drag & drop + Alt : Change node type"
msgstr ""
-"드래그 & 드롭 + Shift : 형제 노드로 추가\n"
+"드래그 & 드롭 + Shift : ë™ê¸° 노드로 추가\n"
"드래그 & 드롭 + Alt : 노드 유형 바꾸기"
#: editor/plugins/collision_polygon_editor_plugin.cpp
@@ -6186,7 +6190,7 @@ msgstr "í´ë¦¬ê³¤ 편집"
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Edit Poly (Remove Point)"
-msgstr "í´ë¦¬ê³¤ 편집 (ì  ì‚­ì œ)"
+msgstr "í´ë¦¬ê³¤ 편집 (ì  ì œê±°)"
#: editor/plugins/collision_shape_2d_editor_plugin.cpp
msgid "Set Handle"
@@ -6252,7 +6256,7 @@ msgstr "ë°©ì¶œ 색ìƒ"
#: editor/plugins/cpu_particles_editor_plugin.cpp
msgid "CPUParticles"
-msgstr "CPU파티í´"
+msgstr "CPUParticles"
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -6302,7 +6306,7 @@ msgstr "ì  ì¶”ê°€"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Remove Point"
-msgstr "ì  ì‚­ì œ"
+msgstr "ì  ì œê±°"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Left Linear"
@@ -6318,7 +6322,7 @@ msgstr "프리셋 불러오기"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Remove Curve Point"
-msgstr "곡선 ì  ì‚­ì œ"
+msgstr "곡선 ì  ì œê±°"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Toggle Curve Linear Tangent"
@@ -6350,7 +6354,7 @@ msgstr "항목"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item List Editor"
-msgstr "항목 ëª©ë¡ íŽ¸ì§‘ê¸°"
+msgstr "항목 ëª©ë¡ ì—디터"
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
msgid "Create Occluder Polygon"
@@ -6362,7 +6366,7 @@ msgstr "메시가 없습니다!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a Trimesh collision shape."
-msgstr "Trimesh ì¶©ëŒ ëª¨ì–‘ì„ ë§Œë“¤ 수 없습니다."
+msgstr "Trimesh 콜리전 ëª¨ì–‘ì„ ë§Œë“¤ 수 없습니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
@@ -6378,32 +6382,31 @@ msgstr "Trimesh Static Shape 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
-msgstr "씬 루트ì—서 ë‹¨ì¼ convex ì¶©ëŒ Shape를 만들 수 없습니다."
+msgstr "씬 루트ì—서 ë‹¨ì¼ ì»¨ë²¡ìŠ¤ 콜리전 ëª¨ì–‘ì„ ë§Œë“¤ 수 없습니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
-msgstr "ë‹¨ì¼ convex ì¶©ëŒ ëª¨ì–‘ì„ ë§Œë“¤ 수 없습니다."
+msgstr "ë‹¨ì¼ ì»¨ë²¡ìŠ¤ 콜리전 ëª¨ì–‘ì„ ë§Œë“¤ 수 없습니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Shape"
-msgstr "개별 Convex 모양 만들기"
+msgstr "단순 컨벡스 모양 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Single Convex Shape"
-msgstr "개별 Convex 모양 만들기"
+msgstr "ë‹¨ì¼ ì»¨ë²¡ìŠ¤ 모양 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
-msgstr "씬 ë£¨íŠ¸ì— ë‹¤ì¤‘ convex ì¶©ëŒ ëª¨ì–‘ì„ ë§Œë“¤ 수 없습니다."
+msgstr "씬 ë£¨íŠ¸ì— ë‹¤ì¤‘ 컨벡스 콜리전 ëª¨ì–‘ì„ ë§Œë“¤ 수 없습니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create any collision shapes."
-msgstr "ì¶©ëŒ ëª¨ì–‘ì„ ë§Œë“¤ 수 없습니다."
+msgstr "콜리전 ëª¨ì–‘ì„ ë§Œë“¤ 수 없습니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Multiple Convex Shapes"
-msgstr "다중 Convex Shape 만들기"
+msgstr "다중 컨벡스 모양 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Navigation Mesh"
@@ -6431,7 +6434,7 @@ msgstr "MeshInstanceì— ë©”ì‹œê°€ 없습니다!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh has not surface to create outlines from!"
-msgstr "ë©”ì‹œì— ìœ¤ê³½ì„ ë§Œë“¤ í‘œë©´ì´ ì—†ìŠµë‹ˆë‹¤!"
+msgstr "ë©”ì‹œì— ìœ¤ê³½ì„ ì„ ë§Œë“¤ í‘œë©´ì´ ì—†ìŠµë‹ˆë‹¤!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh primitive type is not PRIMITIVE_TRIANGLES!"
@@ -6439,11 +6442,11 @@ msgstr "메시 기본 ìœ í˜•ì´ PRIMITIVE_TRIANGLESì´ ì•„ë‹™ë‹ˆë‹¤!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Could not create outline!"
-msgstr "ìœ¤ê³½ì„ ë§Œë“¤ 수 없습니다!"
+msgstr "ìœ¤ê³½ì„ ì„ ë§Œë“¤ 수 없습니다!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline"
-msgstr "윤곽 만들기"
+msgstr "윤곽선 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh"
@@ -6459,38 +6462,37 @@ msgid ""
"automatically.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
-"StaticBody를 하나 만들고 ê±°ê¸°ì— í´ë¦¬ê³¤ 기반 ì¶©ëŒ ëª¨ì–‘ì„ í•˜ë‚˜ ìžë™ìœ¼ë¡œ 만들어 "
-"붙입니다.\n"
-"ì´ ë°©ë²•ì€ ê°€ìž¥ 정확한 (하지만 가장 ëŠë¦°) ì¶©ëŒ íƒì§€ 방법입니다."
+"StaticBody를 만들고 ê±°ê¸°ì— í´ë¦¬ê³¤ 기반 콜리전 ëª¨ì–‘ì„ ìžë™ìœ¼ë¡œ 만들어 붙입니"
+"다.\n"
+"ì´ ë°©ë²•ì€ ê°€ìž¥ 정확한 (하지만 가장 ëŠë¦°) 콜리전 íƒì§€ 방법입니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
-msgstr "Trimesh ì¶©ëŒ í˜•ì œ 만들기"
+msgstr "Trimesh 콜리전 ë™ê¸° 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a polygon-based collision shape.\n"
"This is the most accurate (but slowest) option for collision detection."
msgstr ""
-"í´ë¦¬ê³¤ 기반 ì¶©ëŒ ëª¨ì–‘ì„ í•˜ë‚˜ 만듭니다.\n"
-"ì´ ë°©ë²•ì€ ê°€ìž¥ 정확한 (하지만 가장 ëŠë¦°) ì¶©ëŒ íƒì§€ 방법입니다."
+"í´ë¦¬ê³¤ 기반 콜리전 ëª¨ì–‘ì„ ë§Œë“­ë‹ˆë‹¤.\n"
+"ì´ ë°©ë²•ì€ ê°€ìž¥ 정확한 (하지만 가장 ëŠë¦°) 콜리전 íƒì§€ 방법입니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Single Convex Collision Sibling"
-msgstr "ë‹¨ì¼ Convex ì¶©ëŒ í˜•ì œ 만들기"
+msgstr "ë‹¨ì¼ ì»¨ë²¡ìŠ¤ 콜리전 ë™ê¸° 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
"Creates a single convex collision shape.\n"
"This is the fastest (but least accurate) option for collision detection."
msgstr ""
-"convex ì¶©ëŒ ëª¨ì–‘ì„ í•˜ë‚˜ 만듭니다.\n"
-"ì´ ë°©ë²•ì€ ê°€ìž¥ 빠른 (하지만 ëœ ì •í™•í•œ) ì¶©ëŒ íƒì§€ 방법입니다."
+"ë‹¨ì¼ ì»¨ë²¡ìŠ¤ 콜리전 ëª¨ì–‘ì„ ë§Œë“­ë‹ˆë‹¤.\n"
+"ì´ ë°©ë²•ì€ ê°€ìž¥ 빠른 (하지만 ëœ ì •í™•í•œ) 콜리전 ê°ì§€ 옵션입니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Collision Sibling"
-msgstr "ë‹¨ì¼ Convex ì¶©ëŒ í˜•ì œ 만들기"
+msgstr "단순 컨벡스 콜리전 ë™ê¸° 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6498,24 +6500,27 @@ msgid ""
"This is similar to single collision shape, but can result in a simpler "
"geometry in some cases, at the cost of accuracy."
msgstr ""
+"단순 컨벡스 콜리전 ëª¨ì–‘ì„ ë§Œë“­ë‹ˆë‹¤.\n"
+"ë‹¨ì¼ ì½œë¦¬ì „ 모양과 비슷하지만, ê²½ìš°ì— ë”°ë¼ ì •í™•ë„를 í¬ìƒì‹œì¼œ 지오메트리가 ë” "
+"단순해지는 결과를 초래할 수 있습니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Multiple Convex Collision Siblings"
-msgstr "다중 Convex ì¶©ëŒ í˜•ì œ 만들기"
+msgstr "다중 컨벡스 콜리전 ë™ê¸° 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between a single convex collision and a "
"polygon-based collision."
msgstr ""
-"í´ë¦¬ê³¤ 기반 ì¶©ëŒ ëª¨ì–‘ì„ í•˜ë‚˜ 만듭니다.\n"
-"ì´ ë°©ë²•ì€ ìœ„ ë‘ ê°€ì§€ ì˜µì…˜ì˜ ì¤‘ê°„ ì •ë„ ì„±ëŠ¥ìž…ë‹ˆë‹¤."
+"í´ë¦¬ê³¤ 기반 콜리전 ëª¨ì–‘ì„ ë§Œë“­ë‹ˆë‹¤.\n"
+"ì´ ë°©ë²•ì€ ë‹¨ì¼ ì»¨ë²¡ìŠ¤ 콜리전과 í´ë¦¬ê³¤ 기반 콜리전 사ì´ì˜ 중간 ì •ë„ ì„±ëŠ¥ìž…ë‹ˆ"
+"다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
-msgstr "윤곽 메시 만들기..."
+msgstr "윤곽선 메시 만들기..."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6524,7 +6529,8 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
-"ì •ì  ì™¸ê³½ì„  메시를 만듭니다. 외곽선 ë©”ì‹œì˜ ë²•ì„  벡터는 ìžë™ìœ¼ë¡œ 반전ë©ë‹ˆë‹¤.\n"
+"스태틱 윤곽선 메시를 만듭니다. 윤곽선 ë©”ì‹œì˜ ë²•ì„  벡터는 ìžë™ìœ¼ë¡œ 반전ë©ë‹ˆ"
+"다.\n"
"SpatialMaterialì˜ Grow ì†ì„±ì„ 사용할 수 ì—†ì„ ë•Œ 대신 사용할 수 있습니다."
#: editor/plugins/mesh_instance_editor_plugin.cpp
@@ -6541,11 +6547,11 @@ msgstr "ë¼ì´íŠ¸ë§µ/AO를 위한 UV2 펼치기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh"
-msgstr "윤곽 메시 만들기"
+msgstr "윤곽선 메시 만들기"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Outline Size:"
-msgstr "윤곽 í¬ê¸°:"
+msgstr "윤곽선 í¬ê¸°:"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "UV Channel Debug"
@@ -6553,7 +6559,7 @@ msgstr "UV ì±„ë„ ë””ë²„ê·¸"
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Remove item %d?"
-msgstr "%dê°œì˜ í•­ëª©ì„ ì‚­ì œí• ê¹Œìš”?"
+msgstr "항목 %d개를 제거하시겠습니까?"
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid ""
@@ -6573,10 +6579,16 @@ msgstr "항목 추가"
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Remove Selected Item"
-msgstr "ì„ íƒí•œ 항목 ì‚­ì œ"
+msgstr "ì„ íƒí•œ 항목 제거"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "씬ì—서 가져오기"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "씬ì—서 가져오기"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6615,7 +6627,7 @@ msgstr "표면 소스가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤ (ìž˜ëª»ëœ ê²½ë¡œ)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Surface source is invalid (no geometry)."
-msgstr "표면 소스가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤ (형태 ì—†ìŒ)."
+msgstr "표면 소스가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤ (지오메트리 ì—†ìŒ)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Surface source is invalid (no faces)."
@@ -6631,7 +6643,7 @@ msgstr "ëŒ€ìƒ í‘œë©´ì„ ì„ íƒí•˜ì„¸ìš”:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Populate Surface"
-msgstr "표면 만들기"
+msgstr "표면 채우기"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Populate MultiMesh"
@@ -6671,7 +6683,7 @@ msgstr "무작위 기울기:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Random Scale:"
-msgstr "무작위 í¬ê¸°:"
+msgstr "무작위 스케ì¼:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Populate"
@@ -6685,7 +6697,7 @@ msgstr "내비게ì´ì…˜ í´ë¦¬ê³¤ 만들기"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Convert to CPUParticles"
-msgstr "CPU파티í´ë¡œ 변환"
+msgstr "CPUParticles로 변환"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generating Visibility Rect"
@@ -6710,11 +6722,11 @@ msgstr "ìƒì„± 시간 (ì´ˆ):"
#: editor/plugins/particles_editor_plugin.cpp
msgid "The geometry's faces don't contain any area."
-msgstr "í˜•íƒœì˜ í‘œë©´ì— ì˜ì—­ì´ 없습니다."
+msgstr "ì§€ì˜¤ë©”íŠ¸ë¦¬ì˜ ë©´ì— ì˜ì—­ì´ í¬í•¨ë˜ì§€ 않습니다."
#: editor/plugins/particles_editor_plugin.cpp
msgid "The geometry doesn't contain any faces."
-msgstr "í˜•íƒœì— ë©´ì´ ì—†ìŠµë‹ˆë‹¤."
+msgstr "ì§€ì˜¤ë©”íŠ¸ë¦¬ì— ë©´ì´ í¬í•¨ë˜ì§€ 않습니다."
#: editor/plugins/particles_editor_plugin.cpp
msgid "\"%s\" doesn't inherit from Spatial."
@@ -6722,11 +6734,11 @@ msgstr "\"%s\"ì€(는) Spatialì„ ìƒì†ë°›ì§€ 않습니다."
#: editor/plugins/particles_editor_plugin.cpp
msgid "\"%s\" doesn't contain geometry."
-msgstr "\"%s\"ì— í˜•íƒœê°€ 없습니다."
+msgstr "\"%s\"ì— ì§€ì˜¤ë©”íŠ¸ë¦¬ê°€ í¬í•¨ë˜ì§€ 않습니다."
#: editor/plugins/particles_editor_plugin.cpp
msgid "\"%s\" doesn't contain face geometry."
-msgstr "\"%s\"ì— ë©´ 형태가 없습니다."
+msgstr "\"%s\"ì— ë©´ 지오메트리가 í¬í•¨ë˜ì§€ 않습니다."
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emitter"
@@ -6746,7 +6758,7 @@ msgstr "표면 ì +노멀 (ì§ì ‘)"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Volume"
-msgstr "부피"
+msgstr "볼륨"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Emission Source: "
@@ -6766,15 +6778,15 @@ msgstr "가시성 AABB 만들기"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
-msgstr "곡선ì—서 ì  ì‚­ì œ"
+msgstr "곡선ì—서 ì  ì œê±°"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Out-Control from Curve"
-msgstr "ê³¡ì„ ì˜ ì•„ì›ƒ-컨트롤 ì‚­ì œ"
+msgstr "ê³¡ì„ ì˜ ì•„ì›ƒ-컨트롤 제거"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove In-Control from Curve"
-msgstr "ê³¡ì„ ì˜ ì¸-컨트롤 ì‚­ì œ"
+msgstr "ê³¡ì„ ì˜ ì¸-컨트롤 제거"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
@@ -6879,15 +6891,15 @@ msgstr "경로 가르기"
#: editor/plugins/path_editor_plugin.cpp
msgid "Remove Path Point"
-msgstr "경로 ì  ì‚­ì œ"
+msgstr "경로 ì  ì œê±°"
#: editor/plugins/path_editor_plugin.cpp
msgid "Remove Out-Control Point"
-msgstr "아웃-컨트롤 ì  ì‚­ì œ"
+msgstr "아웃-컨트롤 ì  ì œê±°"
#: editor/plugins/path_editor_plugin.cpp
msgid "Remove In-Control Point"
-msgstr "ì¸-컨트롤 ì  ì‚­ì œ"
+msgstr "ì¸-컨트롤 ì  ì œê±°"
#: editor/plugins/path_editor_plugin.cpp
msgid "Split Segment (in curve)"
@@ -6935,7 +6947,7 @@ msgstr "ë‚´ë¶€ ê¼­ì§“ì  ë§Œë“¤ê¸°"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Remove Internal Vertex"
-msgstr "ë‚´ë¶€ ê¼­ì§“ì  ì‚­ì œ"
+msgstr "ë‚´ë¶€ ê¼­ì§“ì  ì œê±°"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Invalid Polygon (need 3 different vertices)"
@@ -6947,7 +6959,7 @@ msgstr "맞춤 í´ë¦¬ê³¤ 추가"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Remove Custom Polygon"
-msgstr "맞춤 í´ë¦¬ê³¤ ì‚­ì œ"
+msgstr "맞춤 í´ë¦¬ê³¤ 제거"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Transform UV Map"
@@ -6963,11 +6975,11 @@ msgstr "본 가중치 칠하기"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Open Polygon 2D UV editor."
-msgstr "í´ë¦¬ê³¤ 2D UV 편집기 열기."
+msgstr "í´ë¦¬ê³¤ 2D UV ì—디터를 엽니다."
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Polygon 2D UV Editor"
-msgstr "í´ë¦¬ê³¤ 2D UV 편집기"
+msgstr "í´ë¦¬ê³¤ 2D UV ì—디터"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "UV"
@@ -6999,7 +7011,7 @@ msgstr "Shift: ëª¨ë‘ ì´ë™"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Shift+Command: Scale"
-msgstr "Shift+Command: í¬ê¸° ì¡°ì ˆ"
+msgstr "Shift+Command: ìŠ¤ì¼€ì¼ ì¡°ì ˆ"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Ctrl: Rotate"
@@ -7007,7 +7019,7 @@ msgstr "Ctrl: 회전"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Shift+Ctrl: Scale"
-msgstr "Shift+Ctrl: í¬ê¸° ì¡°ì ˆ"
+msgstr "Shift+Ctrl: ìŠ¤ì¼€ì¼ ì¡°ì ˆ"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Move Polygon"
@@ -7019,19 +7031,19 @@ msgstr "í´ë¦¬ê³¤ 회전"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Scale Polygon"
-msgstr "í´ë¦¬ê³¤ í¬ê¸° ì¡°ì ˆ"
+msgstr "í´ë¦¬ê³¤ ìŠ¤ì¼€ì¼ ì¡°ì ˆ"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create a custom polygon. Enables custom polygon rendering."
-msgstr "맞춤 í´ë¦¬ê³¤ì„ 만듭니다. 맞춤 í´ë¦¬ê³¤ ë Œë”ë§ì„ 켜세요."
+msgstr "맞춤 í´ë¦¬ê³¤ì„ 만듭니다. 맞춤 í´ë¦¬ê³¤ ë Œë”ë§ì„ 활성화합니다."
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid ""
"Remove a custom polygon. If none remain, custom polygon rendering is "
"disabled."
msgstr ""
-"맞춤 í´ë¦¬ê³¤ì„ 삭제합니다. 남아있는 맞춤 í´ë¦¬ê³¤ì´ 없으면, 맞춤 í´ë¦¬ê³¤ ë Œë”ë§"
-"ì€ êº¼ì§‘ë‹ˆë‹¤."
+"맞춤 í´ë¦¬ê³¤ì„ 제거합니다. 남아있는 맞춤 í´ë¦¬ê³¤ì´ 없으면, 맞춤 í´ë¦¬ê³¤ ë Œë”ë§"
+"ì€ ë¹„í™œì„±í™”ë©ë‹ˆë‹¤."
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Paint weights with specified intensity."
@@ -7141,7 +7153,7 @@ msgstr "유형:"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
msgid "Open in Editor"
-msgstr "편집기ì—서 열기"
+msgstr "ì—디터ì—서 열기"
#: editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Load Resource"
@@ -7152,22 +7164,30 @@ msgid "ResourcePreloader"
msgstr "리소스 프리로ë”"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portals"
-msgstr "수í‰ìœ¼ë¡œ 뒤집기"
+msgstr "í¬í„¸ 뒤집기"
#: editor/plugins/room_manager_editor_plugin.cpp
msgid "Room Generate Points"
-msgstr "ë°© ìƒì„±í•œ ì  ê°œìˆ˜"
+msgstr "룸 ìƒì„±í•œ ì  ê°œìˆ˜"
#: editor/plugins/room_manager_editor_plugin.cpp
msgid "Generate Points"
msgstr "ìƒì„±í•œ ì  ê°œìˆ˜"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portal"
-msgstr "수í‰ìœ¼ë¡œ 뒤집기"
+msgstr "í¬í„¸ 뒤집기"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "변형 지우기"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "노드 만들기"
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
@@ -7402,7 +7422,7 @@ msgstr "디버거 í•­ìƒ ì—´ì–´ë†“ê¸°"
#: editor/plugins/script_editor_plugin.cpp
msgid "Debug with External Editor"
-msgstr "외부 편집기로 디버깅"
+msgstr "외부 ì—디터로 디버깅"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/shader_editor_plugin.cpp
@@ -7411,11 +7431,11 @@ msgstr "온ë¼ì¸ 문서"
#: editor/plugins/script_editor_plugin.cpp
msgid "Open Godot online documentation."
-msgstr "Godot 온ë¼ì¸ 설명문서를 엽니다."
+msgstr "Godot 온ë¼ì¸ 문서를 엽니다."
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the reference documentation."
-msgstr "참조 설명문서를 검색합니다."
+msgstr "참조 문서를 검색합니다."
#: editor/plugins/script_editor_plugin.cpp
msgid "Go to previous edited document."
@@ -7465,7 +7485,7 @@ msgstr "Target(대ìƒ)"
msgid ""
"Missing connected method '%s' for signal '%s' from node '%s' to node '%s'."
msgstr ""
-"메서드 '%s'ì´(ê°€) ì‹œê·¸ë„ '%s'ì„ ë…¸ë“œ '%s'ì—서 노드 '%s'으로 연결하지 않았습니"
+"메서드 '%s'ì´(ê°€) ì‹œê·¸ë„ '%s'ì„ ë…¸ë“œ '%s'ì—서 노드 '%s'으로 ì—°ê²°ë˜ì§€ 않았습니"
"다."
#: editor/plugins/script_text_editor.cpp
@@ -7482,7 +7502,7 @@ msgstr "함수로 ì´ë™"
#: editor/plugins/script_text_editor.cpp
msgid "Only resources from filesystem can be dropped."
-msgstr "íŒŒì¼ ì‹œìŠ¤í…œì˜ ë¦¬ì†ŒìŠ¤ë§Œ 드롭할 수 있습니다."
+msgstr "파ì¼ì‹œìŠ¤í…œì˜ ë¦¬ì†ŒìŠ¤ë§Œ 드롭할 수 있습니다."
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -7616,7 +7636,7 @@ msgstr "ì´ì „ ë¶ë§ˆí¬ë¡œ ì´ë™"
#: editor/plugins/script_text_editor.cpp
msgid "Remove All Bookmarks"
-msgstr "모든 ë¶ë§ˆí¬ ì‚­ì œ"
+msgstr "모든 ë¶ë§ˆí¬ 제거"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function..."
@@ -7633,7 +7653,7 @@ msgstr "ì¤‘ë‹¨ì  í† ê¸€"
#: editor/plugins/script_text_editor.cpp
msgid "Remove All Breakpoints"
-msgstr "모든 ì¤‘ë‹¨ì  ì‚­ì œ"
+msgstr "모든 ì¤‘ë‹¨ì  ì œê±°"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Next Breakpoint"
@@ -7657,7 +7677,7 @@ msgstr "ì…°ì´ë”"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "This skeleton has no bones, create some children Bone2D nodes."
-msgstr "ì´ ìŠ¤ì¼ˆë ˆí†¤ì—는 ë³¸ì´ ì—†ìŠµë‹ˆë‹¤. Bone2D노드를 ìžì‹ìœ¼ë¡œ 만드세요."
+msgstr "ì´ ìŠ¤ì¼ˆë ˆí†¤ì—는 ë³¸ì´ ì—†ìŠµë‹ˆë‹¤. Bone2D노드를 ìžì†ìœ¼ë¡œ 만드세요."
#: editor/plugins/skeleton_2d_editor_plugin.cpp
msgid "Create Rest Pose from Bones"
@@ -7672,12 +7692,14 @@ msgid "Skeleton2D"
msgstr "스켈레톤2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "(본ì˜) 대기 ìžì„¸ 만들기"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "ë³¸ì„ ëŒ€ê¸° ìžì„¸ë¡œ 설정"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "ë³¸ì„ ëŒ€ê¸° ìžì„¸ë¡œ 설정"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "ë®ì–´ 쓰기"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7697,11 +7719,76 @@ msgstr "IK 실행"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Orthogonal"
-msgstr "ì§êµë³´ê¸°"
+msgstr "ì§êµ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Perspective"
-msgstr "ì›ê·¼ë³´ê¸°"
+msgstr "ì›ê·¼"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "ì§êµ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "ì›ê·¼"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "ì§êµ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "ì›ê·¼"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "ì§êµ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "ì›ê·¼"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "ì§êµ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "ì§êµ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "ì›ê·¼"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "ì§êµ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "ì›ê·¼"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
@@ -7740,7 +7827,7 @@ msgstr "ì´ë™"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale"
-msgstr "í¬ê¸°"
+msgstr "스케ì¼"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scaling: "
@@ -7756,7 +7843,7 @@ msgstr "%së„로 회전."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Keying is disabled (no key inserted)."
-msgstr "키가 꺼져 있습니다 (키가 삽입ë˜ì§€ 않습니다)."
+msgstr "키가 비활성화ë˜ì–´ 있습니다 (키가 삽입ë˜ì§€ 않습니다)."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Animation Key Inserted."
@@ -7764,11 +7851,11 @@ msgstr "애니메ì´ì…˜ 키를 삽입했습니다."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Pitch:"
-msgstr "피치:"
+msgstr "Pitch:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Yaw:"
-msgstr ""
+msgstr "Yaw:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Size:"
@@ -7776,7 +7863,7 @@ msgstr "í¬ê¸°:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn:"
-msgstr "그려진 ê°ì²´:"
+msgstr "그려진 오브ì íЏ:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Material Changes:"
@@ -7800,7 +7887,7 @@ msgstr "ì •ì :"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "FPS: %d (%s ms)"
-msgstr ""
+msgstr "FPS: %d (%s ms)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
@@ -7811,42 +7898,22 @@ msgid "Bottom View."
msgstr "아랫면 보기."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "아랫면"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "왼쪽면 보기."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "왼쪽면"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "오른쪽면 보기."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "오른쪽면"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "정면 보기."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "ì •ë©´"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "뒷면 보기."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "ë’·ë©´"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "ë³€í˜•ì„ ë·°ì— ì •ë ¬"
@@ -7856,11 +7923,11 @@ msgstr "íšŒì „ì„ ë·°ì— ì •ë ¬"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
-msgstr "ìžì‹ì„ ì¸ìŠ¤í„´ìŠ¤í•  부모가 없습니다."
+msgstr "ìžì†ì„ ì¸ìŠ¤í„´ìŠ¤í•  부모가 없습니다."
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "This operation requires a single selected node."
-msgstr "ì´ ìž‘ì—…ì€ í•˜ë‚˜ì˜ ë…¸ë“œë¥¼ ì„ íƒí•´ì•¼ 합니다."
+msgstr "ì´ ìž‘ì—…ì€ ë‹¨ì¼ ë…¸ë“œê°€ ì„ íƒë˜ì–´ì•¼ 합니다."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Auto Orthogonal Enabled"
@@ -7912,7 +7979,7 @@ msgstr "오디오 리스너"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Enable Doppler"
-msgstr "íŒŒë™ ì™œê³¡ 켜기"
+msgstr "íŒŒë™ ì™œê³¡ 활성화"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Cinematic Preview"
@@ -7955,9 +8022,8 @@ msgid "Freelook Slow Modifier"
msgstr "ìžìœ  ì‹œì  ëŠë¦° 수정ìž"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Camera Preview"
-msgstr "ì¹´ë©”ë¼ í¬ê¸° 바꾸기"
+msgstr "ì¹´ë©”ë¼ ë¯¸ë¦¬ 보기 토글"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
@@ -7966,20 +8032,19 @@ msgstr "뷰 회전 잠김"
#: editor/plugins/spatial_editor_plugin.cpp
msgid ""
"To zoom further, change the camera's clipping planes (View -> Settings...)"
-msgstr "ë”ìš± 확대하려면, ì¹´ë©”ë¼ì˜ í´ë¦½í•‘ í‰ë©´ì„ 변경하세요 (보기 -> 설정...)"
+msgstr "ë”ìš± 확대하려면, ì¹´ë©”ë¼ì˜ í´ë¦¬í•‘ í‰ë©´ì„ 바꾸세요 (보기 -> 설정...)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid ""
"Note: The FPS value displayed is the editor's framerate.\n"
"It cannot be used as a reliable indication of in-game performance."
msgstr ""
-"참고: FPS ê°’ì€ íŽ¸ì§‘ê¸°ì˜ í”„ë ˆìž„ìœ¼ë¡œ 표시ë©ë‹ˆë‹¤.\n"
+"참고: FPS ê°’ì€ ì—ë””í„°ì˜ í”„ë ˆìž„ìœ¼ë¡œ 표시ë©ë‹ˆë‹¤.\n"
"ì´ê²ƒì´ 게임 ë‚´ ì„±ëŠ¥ì„ ë³´ìž¥í•  수 없습니다."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Convert Rooms"
-msgstr "%s(으)로 변환"
+msgstr "룸 변환"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
@@ -8000,7 +8065,6 @@ msgstr ""
"ë°˜ 열린 눈: 불투명한 표면ì—ë„ ê¸°ì¦ˆëª¨ê°€ 보입니다 (\"엑스레ì´\")."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Snap Nodes to Floor"
msgstr "노드를 ë°”ë‹¥ì— ìŠ¤ëƒ…"
@@ -8018,7 +8082,7 @@ msgstr "스냅 사용"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Converts rooms for portal culling."
-msgstr ""
+msgstr "í¬í„¸ 컬ë§ì„ 위한 ë£¸ì„ ë³€í™˜í•©ë‹ˆë‹¤."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom View"
@@ -8071,7 +8135,7 @@ msgstr "변형"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap Object to Floor"
-msgstr "개체를 ë°”ë‹¥ì— ìŠ¤ëƒ…"
+msgstr "오브ì íŠ¸ë¥¼ ë°”ë‹¥ì— ìŠ¤ëƒ…"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Dialog..."
@@ -8114,9 +8178,13 @@ msgid "View Grid"
msgstr "ê²©ìž ë³´ê¸°"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Portal Culling"
-msgstr "ë·°í¬íЏ 설정"
+msgstr "í¬í„¸ ì»¬ë§ ë³´ê¸°"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "í¬í„¸ ì»¬ë§ ë³´ê¸°"
#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
@@ -8137,7 +8205,7 @@ msgstr "회전 스냅 (ë„):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Snap (%):"
-msgstr "í¬ê¸° 스냅 (%):"
+msgstr "ìŠ¤ì¼€ì¼ ìŠ¤ëƒ… (%):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Viewport Settings"
@@ -8169,7 +8237,7 @@ msgstr "회전 (ë„):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale (ratio):"
-msgstr "í¬ê¸° (비율):"
+msgstr "ìŠ¤ì¼€ì¼ (비율):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Type"
@@ -8184,8 +8252,9 @@ msgid "Post"
msgstr "후"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "ì´ë¦„ 없는 기즈모"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "ì´ë¦„ 없는 프로ì íЏ"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8229,7 +8298,7 @@ msgstr "애니메ì´ì…˜ í”„ë ˆìž„ì„ ì‚¬ìš©í•˜ëŠ” 스프ë¼ì´íŠ¸ë¥¼ 메시로 ë
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't replace by mesh."
-msgstr "ìž˜ëª»ëœ í˜•íƒœ. 메시로 대체할 수 없습니다."
+msgstr "ìž˜ëª»ëœ ì§€ì˜¤ë©”íŠ¸ë¦¬. 메시로 대체할 수 없습니다."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Convert to Mesh2D"
@@ -8237,7 +8306,7 @@ msgstr "Mesh2D로 변환"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create polygon."
-msgstr "ìž˜ëª»ëœ í˜•íƒœ. í´ë¦¬ê³¤ì„ 만들 수 없습니다."
+msgstr "ìž˜ëª»ëœ ì§€ì˜¤ë©”íŠ¸ë¦¬. í´ë¦¬ê³¤ì„ 만들 수 없습니다."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Convert to Polygon2D"
@@ -8245,19 +8314,19 @@ msgstr "Polygon2D로 변환"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create collision polygon."
-msgstr "ìž˜ëª»ëœ í˜•íƒœ. ì¶©ëŒ í´ë¦¬ê³¤ì„ 만들 수 없습니다."
+msgstr "ìž˜ëª»ëœ ì§€ì˜¤ë©”íŠ¸ë¦¬. 콜리전 í´ë¦¬ê³¤ì„ 만들 수 없습니다."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create CollisionPolygon2D Sibling"
-msgstr "CollisionPolygon2D 노드 만들기"
+msgstr "CollisionPolygon2D ë™ê¸° 만들기"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create light occluder."
-msgstr "ìž˜ëª»ëœ í˜•íƒœ, 조명 ì–´í´ë£¨ë”를 만들 수 없습니다."
+msgstr "ìž˜ëª»ëœ ì§€ì˜¤ë©”íŠ¸ë¦¬. 조명 ì–´í´ë£¨ë”를 만들 수 없습니다."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create LightOccluder2D Sibling"
-msgstr "LightOccluder2D 노드 만들기"
+msgstr "LightOccluder2D ë™ê¸° 만들기"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Sprite"
@@ -8436,24 +8505,20 @@ msgid "TextureRegion"
msgstr "í…스처 ì˜ì—­"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Colors"
-msgstr "색깔"
+msgstr "색ìƒ"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Fonts"
msgstr "글꼴"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Icons"
msgstr "ì•„ì´ì½˜"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Styleboxes"
-msgstr "ìŠ¤íƒ€ì¼ ë°•ìŠ¤"
+msgstr "스타ì¼ë°•스"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} color(s)"
@@ -8513,12 +8578,11 @@ msgstr "항목 {n}/{n} 가져오는 중"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Updating the editor"
-msgstr "편집기를 ì—…ë°ì´íЏ 중"
+msgstr "ì—디터를 ì—…ë°ì´íЏ 중"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Finalizing"
-msgstr "ë¶„ì„ ì¤‘"
+msgstr "마무리 중"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Filter:"
@@ -8533,17 +8597,16 @@ msgid "Select by data type:"
msgstr "ë°ì´í„° 유형 별 ì„ íƒ:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible color items."
-msgstr "지우기 위한 ë¶„í•  위치를 ì„ íƒí•˜ê¸°."
+msgstr "ë³´ì´ëŠ” 모든 ìƒ‰ìƒ í•­ëª©ì„ ì„ íƒí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible color items and their data."
-msgstr ""
+msgstr "ë³´ì´ëŠ” 모든 ìƒ‰ìƒ í•­ëª©ê³¼ ê·¸ ë°ì´í„°ë¥¼ ì„ íƒí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible color items."
-msgstr ""
+msgstr "ë³´ì´ëŠ” 모든 ìƒ‰ìƒ í•­ëª©ì„ ì„ íƒ í•´ì œí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible constant items."
@@ -8551,11 +8614,11 @@ msgstr "ë³´ì´ëŠ” 모든 ìƒìˆ˜ í•­ëª©ì„ ì„ íƒí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible constant items and their data."
-msgstr ""
+msgstr "ë³´ì´ëŠ” 모든 ìƒìˆ˜ 항목과 ê·¸ ë°ì´í„°ë¥¼ ì„ íƒí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible constant items."
-msgstr ""
+msgstr "ë³´ì´ëŠ” 모든 ìƒìˆ˜ í•­ëª©ì„ ì„ íƒ í•´ì œí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible font items."
@@ -8563,11 +8626,11 @@ msgstr "ë³´ì´ëŠ” 모든 글꼴 í•­ëª©ì„ ì„ íƒí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible font items and their data."
-msgstr ""
+msgstr "ë³´ì´ëŠ” 모든 글꼴 항목과 ê·¸ ë°ì´í„°ë¥¼ ì„ íƒí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible font items."
-msgstr ""
+msgstr "ë³´ì´ëŠ” 모든 글꼴 í•­ëª©ì„ ì„ íƒ í•´ì œí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible icon items."
@@ -8575,7 +8638,7 @@ msgstr "ë³´ì´ëŠ” 모든 ì•„ì´ì½˜ í•­ëª©ì„ ì„ íƒí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible icon items and their data."
-msgstr "ë³´ì´ëŠ” 모든 ì•„ì´ì½˜ 항목과 ê·¸ í•­ëª©ì˜ ë°ì´í„°ë¥¼ ì„ íƒí•©ë‹ˆë‹¤."
+msgstr "ë³´ì´ëŠ” 모든 ì•„ì´ì½˜ 항목과 ê·¸ ë°ì´í„°ë¥¼ ì„ íƒí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible icon items."
@@ -8583,21 +8646,22 @@ msgstr "ë³´ì´ëŠ” 모든 ì•„ì´ì½˜ í•­ëª©ì„ ì„ íƒ í•´ì œí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items."
-msgstr ""
+msgstr "ë³´ì´ëŠ” 모든 스타ì¼ë°•스 í•­ëª©ì„ ì„ íƒí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items and their data."
-msgstr ""
+msgstr "ë³´ì´ëŠ” 모든 스타ì¼ë°•스 항목과 ê·¸ ë°ì´í„°ë¥¼ ì„ íƒí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible stylebox items."
-msgstr ""
+msgstr "ë³´ì´ëŠ” 모든 스타ì¼ë°•스 í•­ëª©ì„ ì„ íƒ í•´ì œí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Caution: Adding icon data may considerably increase the size of your Theme "
"resource."
msgstr ""
+"주ì˜: ì•„ì´ì½˜ ë°ì´í„°ë¥¼ 추가하면 테마 ë¦¬ì†ŒìŠ¤ì˜ í¬ê¸°ê°€ ìƒë‹¹ížˆ 커질 수 있습니다."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Collapse types."
@@ -8612,27 +8676,24 @@ msgid "Select all Theme items."
msgstr "모든 테마 í•­ëª©ì„ ì„ íƒí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select With Data"
-msgstr "ì  ì„ íƒ"
+msgstr "ë°ì´í„°ë¡œ ì„ íƒ"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all Theme items with item data."
-msgstr ""
+msgstr "항목 ë°ì´í„°ê°€ 있는 모든 테마 í•­ëª©ì„ ì„ íƒí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Deselect All"
-msgstr "ëª¨ë‘ ì„ íƒ"
+msgstr "ëª¨ë‘ ì„ íƒ í•´ì œ"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all Theme items."
-msgstr ""
+msgstr "모든 테마 í•­ëª©ì„ ì„ íƒ í•´ì œí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Selected"
-msgstr "씬 가져오기"
+msgstr "ì„ íƒëœ 항목 가져오기"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -8640,278 +8701,249 @@ msgid ""
"closing this window.\n"
"Close anyway?"
msgstr ""
+"항목 가져오기 íƒ­ì— ì¼ë¶€ í•­ëª©ì´ ì„ íƒë˜ì–´ 있습니다. ì´ ì°½ì„ ë‹«ìœ¼ë©´ ì„ íƒì„ 잃게 "
+"ë©ë‹ˆë‹¤.\n"
+"무시하고 닫으시겠습니까?"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Select a theme type from the list to edit its items.\n"
"You can add a custom type or import a type with its items from another theme."
msgstr ""
+"í…Œë§ˆì˜ í•­ëª©ì„ íŽ¸ì§‘í•˜ë ¤ë©´ 목ë¡ì—서 테마 ìœ í˜•ì„ ì„ íƒí•˜ì„¸ìš”.\n"
+"맞춤 ìœ í˜•ì„ ì¶”ê°€í•˜ê±°ë‚˜ 다른 테마ì—서 테마 항목으로 ìœ í˜•ì„ ê°€ì ¸ì˜¬ 수 있습니다."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Color Items"
-msgstr "모든 항목 삭제"
+msgstr "모든 ìƒ‰ìƒ í•­ëª© 제거"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Item"
-msgstr "항목 삭제"
+msgstr "항목 ì´ë¦„ 바꾸기"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Constant Items"
-msgstr "모든 항목 삭제"
+msgstr "모든 ìƒìˆ˜ 항목 제거"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Font Items"
-msgstr "모든 항목 삭제"
+msgstr "모든 글꼴 항목 제거"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Icon Items"
-msgstr "모든 항목 삭제"
+msgstr "모든 ì•„ì´ì½˜ 항목 제거"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All StyleBox Items"
-msgstr "모든 항목 삭제"
+msgstr "모든 스타ì¼ë°•스 항목 제거"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"This theme type is empty.\n"
"Add more items to it manually or by importing from another theme."
msgstr ""
+"ì´ í…Œë§ˆ ìœ í˜•ì€ ë¹„ì–´ 있습니다.\n"
+"ì§ì ‘ ë˜ëŠ” 다른 테마ì—서 가져와서 í…Œë§ˆì— ë” ë§Žì€ í•­ëª©ì„ ì¶”ê°€í•˜ì„¸ìš”."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Color Item"
-msgstr "í´ëž˜ìФ 항목 추가"
+msgstr "ìƒ‰ìƒ í•­ëª© 추가"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Constant Item"
-msgstr "í´ëž˜ìФ 항목 추가"
+msgstr "ìƒìˆ˜ 항목 추가"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Font Item"
-msgstr "항목 추가"
+msgstr "글꼴 항목 추가"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Icon Item"
-msgstr "항목 추가"
+msgstr "ì•„ì´ì½˜ 항목 추가"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Stylebox Item"
-msgstr "모든 항목 추가"
+msgstr "스타ì¼ë°•스 항목 추가"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Color Item"
-msgstr "í´ëž˜ìФ 항목 ì‚­ì œ"
+msgstr "ìƒ‰ìƒ í•­ëª© ì´ë¦„ 바꾸기"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Constant Item"
-msgstr "í´ëž˜ìФ 항목 ì‚­ì œ"
+msgstr "ìƒìˆ˜ 항목 ì´ë¦„ 바꾸기"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Font Item"
-msgstr "노드 ì´ë¦„ 바꾸기"
+msgstr "글꼴 항목 ì´ë¦„ 바꾸기"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Icon Item"
-msgstr "노드 ì´ë¦„ 바꾸기"
+msgstr "ì•„ì´ì½˜ 항목 ì´ë¦„ 바꾸기"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Stylebox Item"
-msgstr "ì„ íƒí•œ 항목 ì‚­ì œ"
+msgstr "스타ì¼ë°•스 항목 ì´ë¦„ 바꾸기"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Invalid file, not a Theme resource."
-msgstr "ìž˜ëª»ëœ íŒŒì¼. 오디오 버스 ë ˆì´ì•„ì›ƒì´ ì•„ë‹™ë‹ˆë‹¤."
+msgstr "ìž˜ëª»ëœ íŒŒì¼, 테마 리소스가 아닙니다."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Invalid file, same as the edited Theme resource."
-msgstr ""
+msgstr "ìž˜ëª»ëœ íŒŒì¼, íŽ¸ì§‘ëœ í…Œë§ˆ 리소스와 같습니다."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Theme Items"
-msgstr "템플릿 관리"
+msgstr "테마 항목 관리"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Edit Items"
-msgstr "편집할 수 있는 항목"
+msgstr "항목 편집"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Types:"
msgstr "유형:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type:"
-msgstr "유형:"
+msgstr "유형 추가:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Item:"
msgstr "항목 추가:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add StyleBox Item"
-msgstr "모든 항목 추가"
+msgstr "스타ì¼ë°•스 항목 추가"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Items:"
-msgstr "항목 삭제:"
+msgstr "항목 제거:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Class Items"
-msgstr "í´ëž˜ìФ 항목 ì‚­ì œ"
+msgstr "í´ëž˜ìФ 항목 제거"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Items"
-msgstr "í´ëž˜ìФ 항목 ì‚­ì œ"
+msgstr "맞춤 항목 제거"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Items"
-msgstr "모든 항목 삭제"
+msgstr "모든 항목 제거"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Theme Item"
-msgstr "GUI 테마 항목"
+msgstr "테마 항목 추가"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Old Name:"
-msgstr "노드 ì´ë¦„:"
+msgstr "ì´ì „ ì´ë¦„:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Items"
-msgstr "테마 가져오기"
+msgstr "항목 가져오기"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Theme"
-msgstr "기본"
+msgstr "ë””í´íЏ 테마"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Editor Theme"
-msgstr "테마 편집"
+msgstr "테마 ì—디터"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select Another Theme Resource:"
msgstr "다른 테마 리소스 ì„ íƒ:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Another Theme"
-msgstr "테마 가져오기"
+msgstr "다른 테마"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Confirm Item Rename"
-msgstr "애니메ì´ì…˜ 트랙 ì´ë¦„ 변경"
+msgstr "항목 ì´ë¦„ 바꾸기 확ì¸"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Cancel Item Rename"
-msgstr "ì¼ê´„ ì´ë¦„ 바꾸기"
+msgstr "항목 ì´ë¦„ 바꾸기 취소"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override Item"
-msgstr "재정ì˜"
+msgstr "항목 재정ì˜"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Unpin this StyleBox as a main style."
-msgstr ""
+msgstr "ì´ ìŠ¤íƒ€ì¼ë°•스를 주 스타ì¼ë¡œ ê³ ì •ì„ í•´ì œí•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Pin this StyleBox as a main style. Editing its properties will update the "
"same properties in all other StyleBoxes of this type."
msgstr ""
+"스타ì¼ë°•스를 주 스타ì¼ë¡œ 고정합니다. ì†ì„±ì„ 편집하면 ì´ ìœ í˜•ì˜ ë‹¤ë¥¸ 모든 스타"
+"ì¼ë°•스ì—서 ê°™ì€ ì†ì„±ì´ ì—…ë°ì´íЏë©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type"
-msgstr "유형"
+msgstr "유형 추가"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item Type"
-msgstr "항목 추가"
+msgstr "항목 유형 추가"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Node Types:"
msgstr "노드 유형:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Show Default"
-msgstr "기본값 불러오기"
+msgstr "ë””í´íЏ ë³´ì´ê¸°"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Show default type items alongside items that have been overridden."
-msgstr ""
+msgstr "재정ì˜ëœ 항목 ì˜†ì— ë””í´íЏ 유형 í•­ëª©ì„ ë³´ì—¬ì¤ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override All"
-msgstr "재정ì˜"
+msgstr "ëª¨ë‘ ìž¬ì •ì˜"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Override all default type items."
-msgstr ""
+msgstr "모든 ë””í´íЏ 유형 í•­ëª©ì„ ìž¬ì •ì˜í•©ë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme:"
msgstr "테마:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Items..."
-msgstr "내보내기 템플릿 관리..."
+msgstr "항목 관리..."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add, remove, organize and import Theme items."
-msgstr ""
+msgstr "테마 í•­ëª©ì„ ì¶”ê°€, 제거, 구성 ë° ê°€ì ¸ì˜µë‹ˆë‹¤."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Preview"
-msgstr "미리 보기"
+msgstr "미리 보기 추가"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Preview"
-msgstr "ì—…ë°ì´íЏ 미리 보기"
+msgstr "ë””í´íЏ 미리 보기"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select UI Scene:"
-msgstr "소스 메시를 ì„ íƒí•˜ì„¸ìš”:"
+msgstr "UI ì”¬ì„ ì„ íƒí•˜ì„¸ìš”:"
#: editor/plugins/theme_editor_preview.cpp
msgid ""
"Toggle the control picker, allowing to visually select control types for "
"edit."
msgstr ""
+"컨트롤 ì„ íƒê¸°ë¥¼ 토글하여, 편집할 컨트롤 ìœ í˜•ì„ ì‹œê°ì ìœ¼ë¡œ ì„ íƒí•  수 있게 합니"
+"다."
#: editor/plugins/theme_editor_preview.cpp
msgid "Toggle Button"
@@ -8919,7 +8951,7 @@ msgstr "토글 버튼"
#: editor/plugins/theme_editor_preview.cpp
msgid "Disabled Button"
-msgstr "꺼진 버튼"
+msgstr "ë¹„í™œì„±í™”ëœ ë²„íŠ¼"
#: editor/plugins/theme_editor_preview.cpp
msgid "Item"
@@ -8927,7 +8959,7 @@ msgstr "항목"
#: editor/plugins/theme_editor_preview.cpp
msgid "Disabled Item"
-msgstr "꺼진 항목"
+msgstr "ë¹„í™œì„±í™”ëœ í•­ëª©"
#: editor/plugins/theme_editor_preview.cpp
msgid "Check Item"
@@ -8971,7 +9003,7 @@ msgstr "ë§Žì€"
#: editor/plugins/theme_editor_preview.cpp
msgid "Disabled LineEdit"
-msgstr "꺼진 LineEdit"
+msgstr "ë¹„í™œì„±í™”ëœ LineEdit"
#: editor/plugins/theme_editor_preview.cpp
msgid "Tab 1"
@@ -8999,20 +9031,19 @@ msgstr "ë§Žì€,옵션,갖춤"
#: editor/plugins/theme_editor_preview.cpp
msgid "Invalid path, the PackedScene resource was probably moved or removed."
-msgstr ""
+msgstr "ìž˜ëª»ëœ ê²½ë¡œ, PackedScene 리소스가 ì´ë™ë˜ì—ˆê±°ë‚˜ 제거ë˜ì—ˆì„ 수 있습니다."
#: editor/plugins/theme_editor_preview.cpp
msgid "Invalid PackedScene resource, must have a Control node at its root."
-msgstr ""
+msgstr "ìž˜ëª»ëœ PackedScene 리소스, ë£¨íŠ¸ì— ì»¨íŠ¸ë¡¤ 노드가 있어야 합니다."
#: editor/plugins/theme_editor_preview.cpp
-#, fuzzy
msgid "Invalid file, not a PackedScene resource."
-msgstr "ìž˜ëª»ëœ íŒŒì¼. 오디오 버스 ë ˆì´ì•„ì›ƒì´ ì•„ë‹™ë‹ˆë‹¤."
+msgstr "ìž˜ëª»ëœ íŒŒì¼, PackedScene 리소스가 아닙니다."
#: editor/plugins/theme_editor_preview.cpp
msgid "Reload the scene to reflect its most actual state."
-msgstr ""
+msgstr "ì”¬ì„ ìƒˆë¡œ ê³ ì³ ê°€ìž¥ 실제 ìƒíƒœë¥¼ ë°˜ì˜í•©ë‹ˆë‹¤."
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase Selection"
@@ -9057,11 +9088,11 @@ msgstr "행렬 맞바꾸기"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Disable Autotile"
-msgstr "ì˜¤í† íƒ€ì¼ ë„기"
+msgstr "ì˜¤í† íƒ€ì¼ ë¹„í™œì„±í™”"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Enable Priority"
-msgstr "우선 순위 켜기"
+msgstr "우선 순위 활성화"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Filter tiles"
@@ -9121,7 +9152,7 @@ msgstr "TileSetì— í…스처를 추가합니다."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove selected Texture from TileSet."
-msgstr "ì„ íƒëœ í…스처를 TileSetì—서 삭제합니다."
+msgstr "ì„ íƒëœ í…스처를 TileSetì—서 제거합니다."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create from Scene"
@@ -9165,7 +9196,7 @@ msgstr "ì˜ì—­"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Collision"
-msgstr "ì¶©ëŒ"
+msgstr "콜리전"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Occlusion"
@@ -9197,7 +9228,7 @@ msgstr "ì˜ì—­ 모드"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Collision Mode"
-msgstr "ì¶©ëŒ ëª¨ë“œ"
+msgstr "콜리전 모드"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Occlusion Mode"
@@ -9257,11 +9288,11 @@ msgstr "ì„ íƒëœ 모양 ì‚­ì œ"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Keep polygon inside region Rect."
-msgstr "사ê°í˜• ì˜ì—­ ë‚´ì— í´ë¦¬ê³¤ì„ 유지합니다."
+msgstr "사ê°í˜• ì˜ì—­ ì•ˆì— í´ë¦¬ê³¤ì„ 유지합니다."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Enable snap and show grid (configurable via the Inspector)."
-msgstr "ìŠ¤ëƒ…ì„ ì¼œê³  격ìžë¥¼ ë³´ì´ê¸° (ì¸ìŠ¤íŽ™í„°ë¥¼ 통해 설정함)."
+msgstr "ìŠ¤ëƒ…ì„ í™œì„±í™”í•˜ê³  격ìžë¥¼ ë³´ì—¬ì¤ë‹ˆë‹¤ (ì¸ìŠ¤íŽ™í„°ë¥¼ 통해 구성함)."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Display Tile Names (Hold Alt Key)"
@@ -9276,23 +9307,24 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove selected texture? This will remove all tiles which use it."
msgstr ""
-"ì„ íƒí•œ í…스처를 삭제할까요? ì´ í…스처를 사용하는 모든 타ì¼ë„ ì‚­ì œë  ê²ƒìž…ë‹ˆë‹¤."
+"ì„ íƒí•œ í…스처를 제거하시겠습니까? ì´ í…스처를 사용하는 모든 타ì¼ë„ 제거ë©ë‹ˆ"
+"다."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "You haven't selected a texture to remove."
-msgstr "삭제할 í…스처를 ì„ íƒí•˜ì§€ 않았습니다."
+msgstr "제거할 í…스처를 ì„ íƒí•˜ì§€ 않았습니다."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create from scene? This will overwrite all current tiles."
-msgstr "씬ì—서 만들까요? 모든 현재 파ì¼ì„ ë®ì–´ 씌울 것입니다."
+msgstr "씬ì—서 만드시겠습니까? 모든 현재 파ì¼ì„ ë®ì–´ 씌울 것입니다."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Merge from scene?"
-msgstr "씬ì—서 병합할까요?"
+msgstr "씬ì—서 병합하시겠습니까?"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Texture"
-msgstr "í…스처 ì‚­ì œ"
+msgstr "í…스처 제거"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "%s file(s) were not added because was already on the list."
@@ -9378,7 +9410,7 @@ msgstr "íƒ€ì¼ ë¹„íŠ¸ ë§ˆìŠ¤í¬ íŽ¸ì§‘"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Collision Polygon"
-msgstr "ì¶©ëŒ í´ë¦¬ê³¤ 편집"
+msgstr "콜리전 í´ë¦¬ê³¤ 편집"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Occlusion Polygon"
@@ -9402,23 +9434,23 @@ msgstr "오목한 í´ë¦¬ê³¤ 만들기"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Make Polygon Convex"
-msgstr "ë³¼ë¡í•œ í´ë¦¬ê³¤ 만들기"
+msgstr "í´ë¦¬ê³¤ì„ ë³¼ë¡í•˜ê²Œ 만들기"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Tile"
-msgstr "íƒ€ì¼ ì‚­ì œ"
+msgstr "íƒ€ì¼ ì œê±°"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Collision Polygon"
-msgstr "ì¶©ëŒ í´ë¦¬ê³¤ ì‚­ì œ"
+msgstr "콜리전 í´ë¦¬ê³¤ 제거"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Occlusion Polygon"
-msgstr "ì–´í´ë£¨ì „ í´ë¦¬ê³¤ ì‚­ì œ"
+msgstr "ì–´í´ë£¨ì „ í´ë¦¬ê³¤ 제거"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Navigation Polygon"
-msgstr "내비게ì´ì…˜ í´ë¦¬ê³¤ ì‚­ì œ"
+msgstr "내비게ì´ì…˜ í´ë¦¬ê³¤ 제거"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Tile Priority"
@@ -9438,7 +9470,7 @@ msgstr "오목하게 만들기"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create Collision Polygon"
-msgstr "내비게ì´ì…˜ ì¶©ëŒ í´ë¦¬ê³¤ 만들기"
+msgstr "콜리전 í´ë¦¬ê³¤ 만들기"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create Occlusion Polygon"
@@ -9558,11 +9590,11 @@ msgstr "샘플러"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add input port"
-msgstr "ìž…ë ¥ í¬íЏ 추가하기"
+msgstr "ìž…ë ¥ í¬íЏ 추가"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add output port"
-msgstr "출력 í¬íЏ 추가하기"
+msgstr "출력 í¬íЏ 추가"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Change input port type"
@@ -9582,11 +9614,11 @@ msgstr "출력 í¬íЏ ì´ë¦„ 바꾸기"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Remove input port"
-msgstr "ìž…ë ¥ í¬íЏ 삭제하기"
+msgstr "ìž…ë ¥ í¬íЏ 제거"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Remove output port"
-msgstr "출력 í¬íЏ 삭제하기"
+msgstr "출력 í¬íЏ 제거"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Set expression"
@@ -9594,7 +9626,7 @@ msgstr "í‘œí˜„ì‹ ì„¤ì •"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Resize VisualShader node"
-msgstr "비주얼 ì…°ì´ë” 노드 í¬ê¸° ì¡°ì •"
+msgstr "비주얼셰ì´ë” 노드 í¬ê¸° ì¡°ì •"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Set Uniform Name"
@@ -9602,7 +9634,7 @@ msgstr "Uniform ì´ë¦„ 설정"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Set Input Default Port"
-msgstr "ìž…ë ¥ 기본 í¬íЏ 설정"
+msgstr "ìž…ë ¥ ë””í´íЏ í¬íЏ 설정"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Add Node to Visual Shader"
@@ -9647,7 +9679,7 @@ msgstr "조명"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Show resulted shader code."
-msgstr "ê²°ê³¼ ì…°ì´ë” 코드 ë³´ì´ê¸°."
+msgstr "ê²°ê³¼ ì…°ì´ë” 코드를 ë³´ì—¬ì¤ë‹ˆë‹¤."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Create Shader Node"
@@ -10308,7 +10340,7 @@ msgid ""
"light function, do not use it to write the function declarations inside."
msgstr ""
"맞춤 ìž…ë ¥ ë° ì¶œë ¥ í¬íŠ¸ë¡œ ì´ë£¨ì–´ì§„, 맞춤 Godot ì…°ì´ë” 언어 명령문. ê¼­ì§“ì /프래"
-"그먼트/조명 í•¨ìˆ˜ì— ì§ì ‘ 코드를 넣는 것ì´ë¯€ë¡œ 코드 ë‚´ì— í•¨ìˆ˜ ì„ ì–¸ì„ ìž‘ì„±í•˜ëŠ” "
+"그먼트/조명 í•¨ìˆ˜ì— ì§ì ‘ 코드를 넣는 것ì´ë¯€ë¡œ 코드 ì•ˆì— í•¨ìˆ˜ ì„ ì–¸ì„ ìž‘ì„±í•˜ëŠ” "
"ìš©ë„로 ì“°ì§€ 마세요."
#: editor/plugins/visual_shader_editor_plugin.cpp
@@ -10326,9 +10358,9 @@ msgid ""
"it later in the Expressions. You can also declare varyings, uniforms and "
"constants."
msgstr ""
-"ê²°ê³¼ ì…°ì´ë” ìœ„ì— ë°°ì¹˜ëœ, 맞춤 Godot ì…°ì´ë” 언어 표현ì‹. 다양한 함수 ì„ ì–¸ì„ ë†“"
-"ì€ ë’¤ ë‚˜ì¤‘ì— í‘œí˜„ì‹ì—서 호출할 수 있습니다. Varying, Uniform, ìƒìˆ˜ë„ ì •ì˜í•  "
-"수 있습니다."
+"ê²°ê³¼ ì…°ì´ë” ìœ„ì— ë°°ì¹˜ëœ, 맞춤 Godot ì…°ì´ë” 언어 표현ì‹. 다양한 함수 ì„ ì–¸ì„ ì•ˆ"
+"ì— ë†“ì€ ë’¤ ë‚˜ì¤‘ì— í‘œí˜„ì‹ì—서 호출할 수 있습니다. Varying, Uniform, ìƒìˆ˜ë„ ì„ "
+"언할 수 있습니다."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "A reference to an existing uniform."
@@ -10382,7 +10414,7 @@ msgstr "(프래그먼트/조명 모드만 가능) (스칼ë¼) 'x'와 'y'ì˜ ì ˆë
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "VisualShader"
-msgstr "비주얼 ì…°ì´ë”"
+msgstr "비주얼셰ì´ë”"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Edit Visual Property:"
@@ -10398,7 +10430,7 @@ msgstr "실행가능"
#: editor/project_export.cpp
msgid "Delete preset '%s'?"
-msgstr "'%s' í”„ë¦¬ì…‹ì„ ì‚­ì œí• ê¹Œìš”?"
+msgstr "'%s' í”„ë¦¬ì…‹ì„ ì‚­ì œí•˜ì‹œê² ìŠµë‹ˆê¹Œ?"
#: editor/project_export.cpp
msgid ""
@@ -10510,9 +10542,8 @@ msgid "Script"
msgstr "스í¬ë¦½íЏ"
#: editor/project_export.cpp
-#, fuzzy
msgid "GDScript Export Mode:"
-msgstr "스í¬ë¦½íЏ 내보내기 모드:"
+msgstr "GDScript 내보내기 모드:"
#: editor/project_export.cpp
msgid "Text"
@@ -10520,21 +10551,19 @@ msgstr "í…스트"
#: editor/project_export.cpp
msgid "Compiled Bytecode (Faster Loading)"
-msgstr ""
+msgstr "컴파ì¼ëœ ë°”ì´íŠ¸ì½”ë“œ (ë” ë¹ ë¥¸ 불러오기)"
#: editor/project_export.cpp
msgid "Encrypted (Provide Key Below)"
msgstr "암호화 (ì•„ëž˜ì— í‚¤ê°€ 필요합니다)"
#: editor/project_export.cpp
-#, fuzzy
msgid "Invalid Encryption Key (must be 64 hexadecimal characters long)"
-msgstr "ìž˜ëª»ëœ ì•”í˜¸í™” 키 (길ì´ê°€ 64ìžì´ì–´ì•¼ 합니다)"
+msgstr "ìž˜ëª»ëœ ì•”í˜¸í™” 키 (길ì´ê°€ 16진수 형ì‹ì˜ 64ìžì´ì–´ì•¼ 합니다)"
#: editor/project_export.cpp
-#, fuzzy
msgid "GDScript Encryption Key (256-bits as hexadecimal):"
-msgstr "스í¬ë¦½íЏ 암호화 키 (256-비트를 hex 형ì‹ìœ¼ë¡œ):"
+msgstr "GDScript 암호화 키 (256-비트를 16진수 형ì‹ìœ¼ë¡œ):"
#: editor/project_export.cpp
msgid "Export PCK/Zip"
@@ -10562,7 +10591,7 @@ msgstr "Godot 게임 팩"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
-msgstr "ì´ í”Œëž«í¼ì— 대한 내보내기 í…œí”Œë¦¿ì´ ì—†ìŒ:"
+msgstr "ì´ í”Œëž«í¼ì— 대한 내보내기 í…œí”Œë¦¿ì´ ëˆ„ë½ë¨:"
#: editor/project_export.cpp
msgid "Manage Export Templates"
@@ -10608,9 +10637,8 @@ msgid "Imported Project"
msgstr "가져온 프로ì íЏ"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project name."
-msgstr "ìž˜ëª»ëœ í”„ë¡œì íЏ ì´ë¦„."
+msgstr "ìž˜ëª»ëœ í”„ë¡œì íЏ ì´ë¦„입니다."
#: editor/project_manager.cpp
msgid "Couldn't create folder."
@@ -10750,7 +10778,7 @@ msgstr "누ë½ëœ 프로ì íЏ"
#: editor/project_manager.cpp
msgid "Error: Project is missing on the filesystem."
-msgstr "오류: 프로ì íŠ¸ê°€ íŒŒì¼ ì‹œìŠ¤í…œì—서 누ë½ë˜ì—ˆìŠµë‹ˆë‹¤."
+msgstr "오류: 프로ì íŠ¸ê°€ 파ì¼ì‹œìŠ¤í…œì—서 누ë½ë˜ì—ˆìŠµë‹ˆë‹¤."
#: editor/project_manager.cpp
msgid "Can't open project at '%s'."
@@ -10830,34 +10858,34 @@ msgstr "한 ë²ˆì— %dê°œì˜ í”„ë¡œì íŠ¸ë¥¼ 실행할 건가요?"
#: editor/project_manager.cpp
msgid "Remove %d projects from the list?"
-msgstr "목ë¡ì—서 프로ì íЏ %d개를 삭제하시겠습니까?"
+msgstr "목ë¡ì—서 프로ì íЏ %d개를 제거하시겠습니까?"
#: editor/project_manager.cpp
msgid "Remove this project from the list?"
-msgstr "목ë¡ì—서 ì´ í”„ë¡œì íŠ¸ë¥¼ 삭제하시겠습니까?"
+msgstr "목ë¡ì—서 ì´ í”„ë¡œì íŠ¸ë¥¼ 제거하시겠습니까?"
#: editor/project_manager.cpp
msgid ""
"Remove all missing projects from the list?\n"
"The project folders' contents won't be modified."
msgstr ""
-"모든 누ë½ëœ 프로ì íŠ¸ë¥¼ 삭제할까요?\n"
-"프로ì íЏ í´ë”ì˜ ë‚´ìš©ì€ ìˆ˜ì •ë˜ì§€ 않습니다."
+"모든 누ë½ëœ 프로ì íŠ¸ë¥¼ 목ë¡ì—서 제거하시겠습니까?\n"
+"프로ì íЏ í´ë”ì˜ ì½˜í…츠는 수정ë˜ì§€ 않습니다."
#: editor/project_manager.cpp
msgid ""
"Language changed.\n"
"The interface will update after restarting the editor or project manager."
msgstr ""
-"언어가 바뀌었.\n"
-"ì¸í„°íŽ˜ì´ìŠ¤ëŠ” 편집기나 프로ì íЏ 매니저를 다시 켜면 ì ìš©ë©ë‹ˆë‹¤."
+"언어가 바뀌었습니다.\n"
+"ì¸í„°íŽ˜ì´ìŠ¤ëŠ” ì—디터나 프로ì íЏ 매니저를 다시 시작하고 나서 갱신ë©ë‹ˆë‹¤."
#: editor/project_manager.cpp
msgid ""
"Are you sure to scan %s folders for existing Godot projects?\n"
"This could take a while."
msgstr ""
-"Godot 프로ì íŠ¸ë¥¼ 확ì¸í•˜ê¸° 위해 %s í´ë”를 스캔할까요?\n"
+"Godot 프로ì íŠ¸ë¥¼ 확ì¸í•˜ê¸° 위해 %s í´ë”를 스캔하시겠습니까?\n"
"ì‹œê°„ì´ ê±¸ë¦´ 수 있습니다."
#. TRANSLATORS: This refers to the application where users manage their Godot projects.
@@ -10866,9 +10894,8 @@ msgid "Project Manager"
msgstr "프로ì íЏ 매니저"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Local Projects"
-msgstr "프로ì íЏ"
+msgstr "로컬 프로ì íЏ"
#: editor/project_manager.cpp
msgid "Loading, please wait..."
@@ -10879,23 +10906,20 @@ msgid "Last Modified"
msgstr "마지막으로 수정ë¨"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Edit Project"
-msgstr "프로ì íЏ 내보내기"
+msgstr "프로ì íЏ 편집"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Run Project"
-msgstr "프로ì íЏ ì´ë¦„ 바꾸기"
+msgstr "프로ì íЏ 실행"
#: editor/project_manager.cpp
msgid "Scan"
msgstr "스캔"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Scan Projects"
-msgstr "프로ì íЏ"
+msgstr "프로ì íЏ 스캔"
#: editor/project_manager.cpp
msgid "Select a Folder to Scan"
@@ -10906,27 +10930,24 @@ msgid "New Project"
msgstr "새 프로ì íЏ"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Import Project"
-msgstr "가져온 프로ì íЏ"
+msgstr "프로ì íЏ 가져오기"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove Project"
-msgstr "프로ì íЏ ì´ë¦„ 바꾸기"
+msgstr "프로ì íЏ 제거"
#: editor/project_manager.cpp
msgid "Remove Missing"
-msgstr "누ë½ëœ 부분 ì‚­ì œ"
+msgstr "누ë½ëœ 부분 제거"
#: editor/project_manager.cpp
msgid "About"
msgstr "ì •ë³´"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Asset Library Projects"
-msgstr "ì• ì…‹ ë¼ì´ë¸ŒëŸ¬ë¦¬"
+msgstr "ì• ì…‹ ë¼ì´ë¸ŒëŸ¬ë¦¬ 프로ì íЏ"
#: editor/project_manager.cpp
msgid "Restart Now"
@@ -10934,11 +10955,11 @@ msgstr "지금 다시 시작"
#: editor/project_manager.cpp
msgid "Remove All"
-msgstr "ëª¨ë‘ ì‚­ì œ"
+msgstr "ëª¨ë‘ ì œê±°"
#: editor/project_manager.cpp
msgid "Also delete project contents (no undo!)"
-msgstr ""
+msgstr "프로ì íЏ 콘í…ì¸ ë„ ì‚­ì œ (ë˜ëŒë¦´ 수 없습니다!)"
#: editor/project_manager.cpp
msgid "Can't run project"
@@ -10953,20 +10974,18 @@ msgstr ""
"ì• ì…‹ ë¼ì´ë¸ŒëŸ¬ë¦¬ì—서 ê³µì‹ ì˜ˆì œ 프로ì íŠ¸ë¥¼ 찾아볼까요?"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Filter projects"
-msgstr "í•„í„° ì†ì„±"
+msgstr "프로ì íЏ í•„í„°"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"This field filters projects by name and last path component.\n"
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
-"ì´ ê²€ìƒ‰ì°½ì€ í”„ë¡œì íŠ¸ë¥¼ ì´ë¦„ê³¼ ê²½ë¡œì˜ ë§ˆì§€ë§‰ 부분으로 거릅니다.\n"
-"프로ì íŠ¸ë¥¼ ì „ì²´ 경로를 기준으로 걸러내려면 ê²€ìƒ‰ì–´ì— `/` ê°€ 한 ê¸€ìž ì´ìƒ í¬í•¨"
-"시키세요."
+"ì´ í•„ë“œëŠ” 프로ì íŠ¸ë¥¼ ì´ë¦„ê³¼ ê²½ë¡œì˜ ë§ˆì§€ë§‰ 부분으로 거릅니다.\n"
+"프로ì íŠ¸ë¥¼ ì´ë¦„ê³¼ ì „ì²´ 경로를 기준으로 걸러내려면, ê²€ìƒ‰ì–´ì— `/`를 한 ê¸€ìž ì´"
+"ìƒ í¬í•¨ì‹œì¼œì•¼ 합니다."
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -10974,7 +10993,7 @@ msgstr "키 "
#: editor/project_settings_editor.cpp
msgid "Physical Key"
-msgstr ""
+msgstr "물리 키"
#: editor/project_settings_editor.cpp
msgid "Joy Button"
@@ -11022,7 +11041,7 @@ msgstr "기기"
#: editor/project_settings_editor.cpp
msgid " (Physical)"
-msgstr ""
+msgstr " (물리)"
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key..."
@@ -11165,23 +11184,20 @@ msgid "Override for Feature"
msgstr "기능 재정ì˜"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Add %d Translations"
-msgstr "번역 추가"
+msgstr "번역 %d개 추가"
#: editor/project_settings_editor.cpp
msgid "Remove Translation"
-msgstr "번역 삭제"
+msgstr "번역 제거"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Translation Resource Remap: Add %d Path(s)"
-msgstr "리소스 리맵핑 추가"
+msgstr "리소스 리맵핑 번역: 경로 %d개 추가"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Translation Resource Remap: Add %d Remap(s)"
-msgstr "리소스 리맵핑 추가"
+msgstr "리소스 리맵핑 번역: 리매핑 %d개 추가"
#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
@@ -11189,11 +11205,11 @@ msgstr "리소스 리맵핑 언어 바꾸기"
#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
-msgstr "리소스 리맵핑 삭제"
+msgstr "리소스 리맵핑 제거"
#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
-msgstr "리소스 리맵핑 설정 삭제"
+msgstr "리소스 리맵핑 옵션 제거"
#: editor/project_settings_editor.cpp
msgid "Changed Locale Filter"
@@ -11213,11 +11229,11 @@ msgstr "ì¼ë°˜"
#: editor/project_settings_editor.cpp
msgid "Override For..."
-msgstr "재정ì˜..."
+msgstr "ìž¬ì •ì˜ ëŒ€ìƒ..."
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "The editor must be restarted for changes to take effect."
-msgstr "변경 ì‚¬í•­ì„ ì ìš©í•˜ë ¤ë©´ 편집기를 다시 켜야 합니다."
+msgstr "변경 ì‚¬í•­ì„ ë°˜ì˜í•˜ë ¤ë©´ ì—디터를 다시 시작해야 합니다."
#: editor/project_settings_editor.cpp
msgid "Input Map"
@@ -11277,11 +11293,11 @@ msgstr "ë¡œì¼€ì¼ í•„í„°"
#: editor/project_settings_editor.cpp
msgid "Show All Locales"
-msgstr "모든 ë¡œì¼€ì¼ ë³´ê¸°"
+msgstr "모든 ë¡œì¼€ì¼ ë³´ì´ê¸°"
#: editor/project_settings_editor.cpp
msgid "Show Selected Locales Only"
-msgstr "ì„ íƒí•œ 로케ì¼ë§Œ 보기"
+msgstr "ì„ íƒí•œ 로케ì¼ë§Œ ë³´ì´ê¸°"
#: editor/project_settings_editor.cpp
msgid "Filter mode:"
@@ -11301,7 +11317,7 @@ msgstr "플러그ì¸(Plugin)"
#: editor/project_settings_editor.cpp
msgid "Import Defaults"
-msgstr "기본값 가져오기"
+msgstr "ë””í´íЏ 가져오기"
#: editor/property_editor.cpp
msgid "Preset..."
@@ -11413,7 +11429,7 @@ msgid ""
"Compare counter options."
msgstr ""
"순차 정수 카운터.\n"
-"ì¹´ìš´í„° 옵션과 비êµí•©ë‹ˆë‹¤."
+"ì¹´ìš´í„° ì˜µì…˜ì„ ë¹„êµí•©ë‹ˆë‹¤."
#: editor/rename_dialog.cpp
msgid "Per-level Counter"
@@ -11421,7 +11437,7 @@ msgstr "단계별 카운터"
#: editor/rename_dialog.cpp
msgid "If set, the counter restarts for each group of child nodes."
-msgstr "설정하면 ê° ê·¸ë£¹ì˜ ìžì‹ ë…¸ë“œì˜ ì¹´ìš´í„°ë¥¼ 다시 시작합니다."
+msgstr "설정하면 ê° ê·¸ë£¹ì˜ ìžì† ë…¸ë“œì˜ ì¹´ìš´í„°ë¥¼ 다시 시작합니다."
#: editor/rename_dialog.cpp
msgid "Initial value for the counter"
@@ -11551,7 +11567,7 @@ msgstr "가지 씬으로 êµì²´"
#: editor/scene_tree_dock.cpp
msgid "Instance Child Scene"
-msgstr "ìžì‹ 씬 ì¸ìŠ¤í„´ìŠ¤í™”"
+msgstr "ìžì† 씬 ì¸ìŠ¤í„´ìŠ¤í™”"
#: editor/scene_tree_dock.cpp
msgid "Can't paste root node into the same scene."
@@ -11601,7 +11617,7 @@ msgstr "노드를 루트로 만들기"
#: editor/scene_tree_dock.cpp
msgid "Delete %d nodes and any children?"
-msgstr "%d ê°œì˜ ë…¸ë“œì™€ 모든 ìžì‹ 노드를 삭제할까요?"
+msgstr "%d ê°œì˜ ë…¸ë“œì™€ 모든 ìžì† 노드를 삭제할까요?"
#: editor/scene_tree_dock.cpp
msgid "Delete %d nodes?"
@@ -11613,7 +11629,7 @@ msgstr "루트 노드 \"%s\"ì„(를) 삭제할까요?"
#: editor/scene_tree_dock.cpp
msgid "Delete node \"%s\" and its children?"
-msgstr "노드 \"%s\"와(ê³¼) ìžì‹ì„ 삭제할까요?"
+msgstr "노드 \"%s\"와(ê³¼) ìžì†ì„ 삭제할까요?"
#: editor/scene_tree_dock.cpp
msgid "Delete node \"%s\"?"
@@ -11622,13 +11638,15 @@ msgstr "노드 \"%s\"ì„(를) 삭제할까요?"
#: editor/scene_tree_dock.cpp
msgid ""
"Saving the branch as a scene requires having a scene open in the editor."
-msgstr ""
+msgstr "가지를 씬으로 저장하려면 ì—디터ì—서 ì”¬ì„ ì—´ì–´ì•¼ 합니다."
#: editor/scene_tree_dock.cpp
msgid ""
"Saving the branch as a scene requires selecting only one node, but you have "
"selected %d nodes."
msgstr ""
+"가지를 씬으로 저장하려면 노드 한 개만 ì„ íƒí•´ì•¼ 하지만, 노드 %d개가 ì„ íƒë˜ì–´ "
+"있습니다."
#: editor/scene_tree_dock.cpp
msgid ""
@@ -11637,6 +11655,10 @@ msgid ""
"FileSystem dock context menu\n"
"or create an inherited scene using Scene > New Inherited Scene... instead."
msgstr ""
+"루트 노드 가지를 ì¸ìŠ¤í„´ìŠ¤ëœ ì”¬ìœ¼ë¡œ 저장할 수 없습니다.\n"
+"현재 ì”¬ì˜ íŽ¸ì§‘ 가능한 ë³µì‚¬ë³¸ì„ ë§Œë“œë ¤ë©´, 파ì¼ì‹œìŠ¤í…œ ë… ì»¨í…스트 메뉴를 사용하"
+"여 복제하거나\n"
+"ìƒì† ì”¬ì„ ì”¬ > 새 ìƒì† 씬...ì„ ëŒ€ì‹  사용하여 만드세요."
#: editor/scene_tree_dock.cpp
msgid ""
@@ -11644,6 +11666,9 @@ msgid ""
"To create a variation of a scene, you can make an inherited scene based on "
"the instanced scene using Scene > New Inherited Scene... instead."
msgstr ""
+"ì´ë¯¸ ì¸ìŠ¤í„´ìŠ¤ëœ ì”¬ì˜ ê°€ì§€ë¥¼ 저장할 수 없습니다.\n"
+"ì”¬ì˜ ë°”ë¦¬ì—ì´ì…˜ì„ 만드려면, ì¸ìŠ¤í„´ìŠ¤ëœ ì”¬ì„ ë°”íƒ•ìœ¼ë¡œ ìƒì† ì”¬ì„ ì”¬ > 새 ìƒì† "
+"씬...ì„ ëŒ€ì‹  사용하여 만들 수 있습니다."
#: editor/scene_tree_dock.cpp
msgid "Save New Scene As..."
@@ -11654,15 +11679,15 @@ msgid ""
"Disabling \"editable_instance\" will cause all properties of the node to be "
"reverted to their default."
msgstr ""
-"\"editable_instance\"를 ë„게 ë˜ë©´ ë…¸ë“œì˜ ëª¨ë“  ì†ì„±ì´ 기본 값으로 ë³µì›ë©ë‹ˆë‹¤."
+"\"editable_instance\"ê°€ 비활성화ë˜ë©´ ë…¸ë“œì˜ ëª¨ë“  ì†ì„±ì´ ë””í´íŠ¸ë¡œ ë³µì›ë©ë‹ˆë‹¤."
#: editor/scene_tree_dock.cpp
msgid ""
"Enabling \"Load As Placeholder\" will disable \"Editable Children\" and "
"cause all properties of the node to be reverted to their default."
msgstr ""
-"\"ìžë¦¬ 표시ìžë¡œ 불러오기\"를 켜면 \"편집할 수 있는 ìžì‹\" ì„¤ì •ì´ êº¼ì§€ê³ , 그러"
-"ë©´ ê·¸ ë…¸ë“œì˜ ëª¨ë“  ì†ì„±ì´ 기본값으로 ë³µì›ë©ë‹ˆë‹¤."
+"\"ìžë¦¬ 표시ìžë¡œ 불러오기\"를 활성화하면 \"편집할 수 있는 ìžì†\" ì„¤ì •ì´ ë¹„í™œì„±"
+"í™”ë˜ê³ , 그러면 ê·¸ ë…¸ë“œì˜ ëª¨ë“  ì†ì„±ì´ ë””í´íŠ¸ë¡œ ë³µì›ë©ë‹ˆë‹¤."
#: editor/scene_tree_dock.cpp
msgid "Make Local"
@@ -11714,7 +11739,7 @@ msgstr "노드 잘ë¼ë‚´ê¸°"
#: editor/scene_tree_dock.cpp
msgid "Remove Node(s)"
-msgstr "노드 삭제"
+msgstr "노드 제거"
#: editor/scene_tree_dock.cpp
msgid "Change type of node(s)"
@@ -11745,7 +11770,7 @@ msgstr "ìƒì† 지우기"
#: editor/scene_tree_dock.cpp
msgid "Editable Children"
-msgstr "편집할 수 있는 ìžì‹"
+msgstr "편집할 수 있는 ìžì†"
#: editor/scene_tree_dock.cpp
msgid "Load As Placeholder"
@@ -11758,11 +11783,11 @@ msgid ""
"disabled."
msgstr ""
"스í¬ë¦½íŠ¸ë¥¼ ë¶™ì¼ ìˆ˜ 없습니다: 언어가 í•˜ë‚˜ë„ ë“±ë¡ë˜ì§€ 않았습니다.\n"
-"ì—디터가 모든 언어를 비활성화한 채로 빌드ë˜ì–´ì„œ 그럴 ê°€ëŠ¥ì„±ì´ ë†’ìŠµë‹ˆë‹¤."
+"ì—디터가 모든 언어 ëª¨ë“ˆì„ ë¹„í™œì„±í™”í•œ 채로 빌드ë˜ì–´ì„œ 그럴 ê°€ëŠ¥ì„±ì´ ë†’ìŠµë‹ˆë‹¤."
#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
-msgstr "ìžì‹ 노드 추가"
+msgstr "ìžì† 노드 추가"
#: editor/scene_tree_dock.cpp
msgid "Expand/Collapse All"
@@ -11898,7 +11923,7 @@ msgid ""
"Children are not selectable.\n"
"Click to make selectable."
msgstr ""
-"ìžì‹ì„ ì„ íƒí•  수 없습니다.\n"
+"ìžì†ì„ ì„ íƒí•  수 없습니다.\n"
"í´ë¦­í•˜ë©´ ì„ íƒí•  수 있습니다."
#: editor/scene_tree_editor.cpp
@@ -11971,7 +11996,7 @@ msgstr "'%s' 템플릿 불러오는 중 오류"
#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
-msgstr "오류 - íŒŒì¼ ì‹œìŠ¤í…œì— ìŠ¤í¬ë¦½íŠ¸ë¥¼ 만들 수 없습니다."
+msgstr "오류 - 파ì¼ì‹œìŠ¤í…œì— ìŠ¤í¬ë¦½íŠ¸ë¥¼ 만들 수 없습니다."
#: editor/script_create_dialog.cpp
msgid "Error loading script from %s"
@@ -12038,7 +12063,7 @@ msgid ""
"Note: Built-in scripts have some limitations and can't be edited using an "
"external editor."
msgstr ""
-"참고: 내장 스í¬ë¦½íЏì—는 ì¼ë¶€ 제한 ì‚¬í•­ì´ ìžˆìœ¼ë©° 외부 편집기를 사용하여 편집"
+"참고: 내장 스í¬ë¦½íЏì—는 ì¼ë¶€ 제한 ì‚¬í•­ì´ ìžˆìœ¼ë©° 외부 ì—디터를 사용하여 편집"
"할 수 없습니다."
#: editor/script_create_dialog.cpp
@@ -12046,6 +12071,8 @@ msgid ""
"Warning: Having the script name be the same as a built-in type is usually "
"not desired."
msgstr ""
+"경고: 스í¬ë¦½íЏ ì´ë¦„ì„ ë‚´ìž¥ 유형과 같게 정하는 ì ì€ ì¼ë°˜ì ìœ¼ë¡œ 바람ì§í•˜ì§€ 않습"
+"니다."
#: editor/script_create_dialog.cpp
msgid "Class Name:"
@@ -12109,7 +12136,7 @@ msgstr "오류"
#: editor/script_editor_debugger.cpp
msgid "Child process connected."
-msgstr "ìžì‹ 프로세스 ì—°ê²°ë¨."
+msgstr "ìžì† 프로세스 ì—°ê²°ë¨."
#: editor/script_editor_debugger.cpp
msgid "Copy Error"
@@ -12117,7 +12144,7 @@ msgstr "복사 오류"
#: editor/script_editor_debugger.cpp
msgid "Open C++ Source on GitHub"
-msgstr ""
+msgstr "GitHubì—서 C++ 소스 열기"
#: editor/script_editor_debugger.cpp
msgid "Video RAM"
@@ -12229,7 +12256,7 @@ msgstr "단축키 바꾸기"
#: editor/settings_config_dialog.cpp
msgid "Editor Settings"
-msgstr "편집기 설정"
+msgstr "ì—디터 설정"
#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
@@ -12296,14 +12323,22 @@ msgid "Change Ray Shape Length"
msgstr "ê´‘ì„  모양 ê¸¸ì´ ë°”ê¾¸ê¸°"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Room Point Position"
-msgstr "곡선 ì  ìœ„ì¹˜ 설정"
+msgstr "룸 ì  ìœ„ì¹˜ 설정"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Portal Point Position"
-msgstr "곡선 ì  ìœ„ì¹˜ 설정"
+msgstr "í¬í„¸ ì  ìœ„ì¹˜ 설정"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "ìº¡ìŠ ëª¨ì–‘ 반지름 바꾸기"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "ê³¡ì„ ì˜ ì¸ ìœ„ì¹˜ 설정"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -12331,7 +12366,7 @@ msgstr "ì´ í•­ëª©ì˜ ë™ì  ë¼ì´ë¸ŒëŸ¬ë¦¬ì˜ ì¢…ì† ê´€ê³„ë¥¼ ì„ íƒ"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Remove current entry"
-msgstr "현재 엔트리 삭제"
+msgstr "현재 엔트리 제거"
#: modules/gdnative/gdnative_library_editor_plugin.cpp
msgid "Double click to create a new entry"
@@ -12359,11 +12394,11 @@ msgstr "GDNative ë¼ì´ë¸ŒëŸ¬ë¦¬"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Enabled GDNative Singleton"
-msgstr "켜진 GDNative 싱글톤"
+msgstr "í™œì„±í™”ëœ GDNative 싱글톤"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Disabled GDNative Singleton"
-msgstr "꺼진 GDNative 싱글톤"
+msgstr "ë¹„í™œì„±í™”ëœ GDNative 싱글톤"
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Library"
@@ -12395,33 +12430,31 @@ msgstr "리소스 파ì¼ì— 기반하지 않ìŒ"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (missing @path)"
-msgstr "ìž˜ëª»ëœ ì¸ìŠ¤í„´ìŠ¤ Dictionary í˜•ì‹ (@path ì—†ìŒ)"
+msgstr "ìž˜ëª»ëœ ì¸ìŠ¤í„´ìŠ¤ 딕셔너리 í˜•ì‹ (@path 누ë½ë¨)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (can't load script at @path)"
-msgstr "ìž˜ëª»ëœ ì¸ìŠ¤í„´ìŠ¤ Dictionary í˜•ì‹ (@path ì—서 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 ì—†ìŒ)"
+msgstr "ìž˜ëª»ëœ ì¸ìŠ¤í„´ìŠ¤ 딕셔너리 í˜•ì‹ (@pathì—서 스í¬ë¦½íŠ¸ë¥¼ 불러올 수 ì—†ìŒ)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (invalid script at @path)"
-msgstr "ìž˜ëª»ëœ ì¸ìŠ¤í„´ìŠ¤ Dictionary í˜•ì‹ (@pathì˜ ìŠ¤í¬ë¦½íŠ¸ê°€ 올바르지 않ìŒ)"
+msgstr "ìž˜ëª»ëœ ì¸ìŠ¤í„´ìŠ¤ 딕셔너리 í˜•ì‹ (ìž˜ëª»ëœ @pathì˜ ìŠ¤í¬ë¦½íЏ)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary (invalid subclasses)"
-msgstr "ìž˜ëª»ëœ ì¸ìŠ¤í„´ìŠ¤ Dictionary (하위 í´ëž˜ìŠ¤ê°€ 올바르지 않ìŒ)"
+msgstr "ìž˜ëª»ëœ ì¸ìŠ¤í„´ìŠ¤ 딕셔너리 (ìž˜ëª»ëœ í•˜ìœ„ í´ëž˜ìФ)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Object can't provide a length."
-msgstr "ê°ì²´ëŠ” 길ì´ë¥¼ 제공할 수 없습니다."
+msgstr "오브ì íŠ¸ëŠ” 길ì´ë¥¼ 제공할 수 없습니다."
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "Export Mesh GLTF2"
-msgstr "메시 ë¼ì´ë¸ŒëŸ¬ë¦¬ 내보내기"
+msgstr "메시 GLTF2 내보내기"
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "Export GLTF..."
-msgstr "내보내기..."
+msgstr "GLTF 내보내기..."
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
@@ -12464,9 +12497,8 @@ msgid "GridMap Paint"
msgstr "그리드맵 칠하기"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Selection"
-msgstr "그리드맵 ì„ íƒ í•­ëª© 채우기"
+msgstr "그리드맵 ì„ íƒ"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
@@ -12478,7 +12510,7 @@ msgstr "스냅 뷰"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Disabled"
-msgstr "í´ë¦½ 꺼ì§"
+msgstr "í´ë¦½ 비활성화"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Above"
@@ -12588,6 +12620,11 @@ msgstr "구분하는 조명"
msgid "Class name can't be a reserved keyword"
msgstr "í´ëž˜ìФ ì´ë¦„ì€ í‚¤ì›Œë“œê°€ ë  ìˆ˜ 없습니다"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "ì„ íƒ í•­ëª© 채우기"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "ë‚´ë¶€ 예외 ìŠ¤íƒ ì¶”ì ì˜ ë"
@@ -12646,7 +12683,7 @@ msgstr "내비게ì´ì…˜ 메시 ìƒì„±ê¸° 설정:"
#: modules/recast/navigation_mesh_generator.cpp
msgid "Parsing Geometry..."
-msgstr "형태 ë¶„ì„ ì¤‘..."
+msgstr "지오메트리 ë¶„ì„ ì¤‘..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Done!"
@@ -12717,14 +12754,12 @@ msgid "Add Output Port"
msgstr "출력 í¬íЏ 추가하기"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Type"
-msgstr "유형 바꾸기"
+msgstr "í¬íЏ 유형 바꾸기"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Name"
-msgstr "ìž…ë ¥ í¬íЏ ì´ë¦„ 바꾸기"
+msgstr "í¬íЏ ì´ë¦„ 바꾸기"
#: modules/visual_script/visual_script_editor.cpp
msgid "Override an existing built-in function."
@@ -12788,11 +12823,11 @@ msgstr "ì‹œê·¸ë„ ì¶”ê°€"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Input Port"
-msgstr "ìž…ë ¥ í¬íЏ 삭제하기"
+msgstr "ìž…ë ¥ í¬íЏ 제거"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Output Port"
-msgstr "출력 í¬íЏ 삭제하기"
+msgstr "출력 í¬íЏ 제거"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
@@ -12800,11 +12835,11 @@ msgstr "í‘œí˜„ì‹ ë°”ê¾¸ê¸°"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
-msgstr "비주얼 스í¬ë¦½íЏ 노드 ì‚­ì œ"
+msgstr "비주얼스í¬ë¦½íЏ 노드 제거"
#: modules/visual_script/visual_script_editor.cpp
msgid "Duplicate VisualScript Nodes"
-msgstr "비주얼 스í¬ë¦½íЏ 노드 복제"
+msgstr "비주얼스í¬ë¦½íЏ 노드 복제"
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a Getter. Hold Shift to drop a generic signature."
@@ -12839,7 +12874,6 @@ msgid "Add Preload Node"
msgstr "Preload 노드 추가"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Node(s)"
msgstr "노드 추가"
@@ -12874,7 +12908,7 @@ msgstr "노드 ì´ë™"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Node"
-msgstr "비주얼 스í¬ë¦½íЏ 노드 ì‚­ì œ"
+msgstr "비주얼스í¬ë¦½íЏ 노드 제거"
#: modules/visual_script/visual_script_editor.cpp
msgid "Connect Nodes"
@@ -12910,7 +12944,7 @@ msgstr "함수 노드를 복사할 수 없습니다."
#: modules/visual_script/visual_script_editor.cpp
msgid "Paste VisualScript Nodes"
-msgstr "비주얼 스í¬ë¦½íЏ 노드 붙여넣기"
+msgstr "비주얼스í¬ë¦½íЏ 노드 붙여넣기"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't create function with a function node."
@@ -12934,11 +12968,11 @@ msgstr "함수 만들기"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Function"
-msgstr "함수 삭제"
+msgstr "함수 제거"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Variable"
-msgstr "변수 삭제"
+msgstr "변수 제거"
#: modules/visual_script/visual_script_editor.cpp
msgid "Editing Variable:"
@@ -12946,7 +12980,7 @@ msgstr "변수 편집:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Signal"
-msgstr "ì‹œê·¸ë„ ì‚­ì œ"
+msgstr "ì‹œê·¸ë„ ì œê±°"
#: modules/visual_script/visual_script_editor.cpp
msgid "Editing Signal:"
@@ -13026,7 +13060,7 @@ msgstr "ìž˜ëª»ëœ ì¸ë±ìФ ì†ì„± ì´ë¦„."
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Base object is not a Node!"
-msgstr "기본 ê°ì²´ëŠ” 노드가 아닙니다!"
+msgstr "기본 오브ì íŠ¸ëŠ” 노드가 아닙니다!"
#: modules/visual_script/visual_script_func_nodes.cpp
msgid "Path does not lead Node!"
@@ -13066,75 +13100,73 @@ msgstr ""
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Search VisualScript"
-msgstr "비주얼 스í¬ë¦½íЏ 검색"
+msgstr "비주얼스í¬ë¦½íЏ 검색"
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Get %s"
msgstr "Get %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
-msgstr "패키지 ì´ë¦„ì´ ì—†ìŠµë‹ˆë‹¤."
+msgstr "패키지 ì´ë¦„ì´ ëˆ„ë½ë˜ì–´ 있습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "패키지 세그먼트는 길ì´ê°€ 0ì´ ì•„ë‹ˆì–´ì•¼ 합니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "ë¬¸ìž '%s'ì€(는) Android 애플리케ì´ì…˜ 패키지 ì´ë¦„으로 쓸 수 없습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "숫ìžëŠ” 패키지 ì„¸ê·¸ë¨¼íŠ¸ì˜ ì²« 문ìžë¡œ 쓸 수 없습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "ë¬¸ìž '%s'ì€(는) 패키지 ì„¸ê·¸ë¨¼íŠ¸ì˜ ì²« 문ìžë¡œ 쓸 수 없습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "패키지는 ì ì–´ë„ í•˜ë‚˜ì˜ '.' 분리 기호가 있어야 합니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "목ë¡ì—서 기기 ì„ íƒ"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr "%sì—서 실행"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr "APK로 내보내는 중..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr "제거 중..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
-msgstr "로드 중, 기다려 주세요..."
+msgstr "ê¸°ê¸°ì— ì„¤ì¹˜ 중, 기다려 주세요..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr "ê¸°ê¸°ì— ì„¤ì¹˜í•  수 ì—†ìŒ: %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr "기기ì—서 실행 중..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
-msgstr "í´ë”를 만들 수 없습니다."
+msgstr "기기ì—서 실행할 수 없었습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "'apksigner' ë„구를 ì°¾ì„ ìˆ˜ 없습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13142,7 +13174,7 @@ msgstr ""
"프로ì íŠ¸ì— Android 빌드 í…œí”Œë¦¿ì„ ì„¤ì¹˜í•˜ì§€ 않았습니다. 프로ì íЏ 메뉴ì—서 설치"
"하세요."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
@@ -13150,11 +13182,11 @@ msgstr ""
"Debug Keystore, Debug User ë° Debug Password ì„¤ì •ì„ êµ¬ì„±í•˜ê±°ë‚˜ ê·¸ 중 ì–´ëŠ ê²ƒ"
"ë„ ì—†ì–´ì•¼ 합니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
-msgstr "Debug keystore를 편집기 설정과 í”„ë¦¬ì…‹ì— êµ¬ì„±í•˜ì§€ 않았습니다."
+msgstr "Debug keystore를 ì—디터 설정과 í”„ë¦¬ì…‹ì— êµ¬ì„±í•˜ì§€ 않았습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
@@ -13162,47 +13194,47 @@ msgstr ""
"Release Keystore, Release User ë° Release Password ì„¤ì •ì„ êµ¬ì„±í•˜ê±°ë‚˜ ê·¸ 중 ì–´"
"ëŠ ê²ƒë„ ì—†ì–´ì•¼ 합니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr "내보내기 í”„ë¦¬ì…‹ì— ì¶œì‹œ keystorkeê°€ 잘못 구성ë˜ì–´ 있습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
-msgstr "편집기 설정ì—서 올바른 Android SDK 경로가 필요합니다."
+msgstr "ì—디터 설정ì—서 올바른 Android SDK 경로가 필요합니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
-msgstr "편집기 설정ì—서 ìž˜ëª»ëœ Android SDK 경로입니다."
+msgstr "ì—디터 설정ì—서 ìž˜ëª»ëœ Android SDK 경로입니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
-msgstr "'platform-tools' 디렉토리가 없습니다!"
+msgstr "'platform-tools' 디렉토리가 누ë½ë˜ì–´ 있습니다!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "Android SDK platform-toolsì˜ adb ëª…ë ¹ì„ ì°¾ì„ ìˆ˜ 없습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
-msgstr "편집기 설정ì—서 ì§€ì •ëœ Android SDK 디렉토리를 확ì¸í•´ì£¼ì„¸ìš”."
+msgstr "ì—디터 설정ì—서 ì§€ì •ëœ Android SDK 디렉토리를 확ì¸í•´ì£¼ì„¸ìš”."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
-msgstr "'build-tools' 디렉토리가 없습니다!"
+msgstr "'build-tools' 디렉토리가 누ë½ë˜ì–´ 있습니다!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr "Android SDK build-toolsì˜ apksigner ëª…ë ¹ì„ ì°¾ì„ ìˆ˜ 없습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "APK í™•ìž¥ì— ìž˜ëª»ëœ ê³µê°œ 키입니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "ìž˜ëª»ëœ íŒ¨í‚¤ì§€ ì´ë¦„:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13210,89 +13242,76 @@ msgstr ""
"\"android/modules\" 프로ì íЏ ì„¸íŒ…ì— ìž˜ëª»ëœ \"GodotPaymentV3\" ëª¨ë“ˆì´ í¬í•¨ë˜"
"ì–´ 있습니다. (Godot 3.2.2 ì—서 변경ë¨).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
-msgstr "플러그ì¸ì„ 사용하려면 \"커스텀 빌드 사용\"ì´ í™œì„±í™”ë˜ì–´ì•¼ 합니다."
+msgstr "플러그ì¸ì„ 사용하려면 \"Use Custom Build\"ê°€ 활성화ë˜ì–´ì•¼ 합니다."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"ìžìœ ë„(DoF)\"는 \"Xr 모드\" ê°€ \"Oculus Mobile VR\" ì¼ ë•Œë§Œ 사용 가능합니"
-"다."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"ì† ì¶”ì \" ì€ \"Xr 모드\" ê°€ \"Oculus Mobile VR\"ì¼ ë•Œë§Œ 사용 가능합니다."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"í¬ì»¤ìФ ì¸ì‹\"ì€ \"Xr 모드\"ê°€ \"Oculus Mobile VR\" ì¸ ê²½ìš°ì—ë§Œ 사용 가능합"
-"니다."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
-msgstr "\"Export AAB\"는 \"Use Custom Build\"ê°€ 활성화 ëœ ê²½ìš°ì—ë§Œ 유효합니다."
+msgstr "\"Export AAB\"는 \"Use Custom Build\"ê°€ í™œì„±í™”ëœ ê²½ìš°ì—ë§Œ 유효합니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
"directory.\n"
"The resulting %s is unsigned."
msgstr ""
+"'apksigner'를 ì°¾ì„ ìˆ˜ 없었습니다.\n"
+"ëª…ë ¹ì´ Android SDK build-tools 디렉토리ì—서 사용 가능한지 확ì¸í•´ì£¼ì„¸ìš”.\n"
+"ê²°ê³¼ %s는 서명ë˜ì§€ 않습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
-msgstr ""
+msgstr "디버그 %sì— ì„œëª… 중..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr "출시 %sì— ì„œëª… 중..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr "keystore를 ì°¾ì„ ìˆ˜ 없어, 내보낼 수 없었습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
-msgstr ""
+msgstr "'apksigner'ê°€ 오류 #%d로 반환ë˜ì—ˆìŠµë‹ˆë‹¤"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
-msgstr "%s 추가하는 중..."
+msgstr "%s ê²€ì¦ ì¤‘..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
-msgstr ""
+msgstr "%sì˜ 'apksigner' ê²€ì¦ì— 실패했습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr "Android용으로 내보내는 중"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr "ìž˜ëª»ëœ íŒŒì¼ëª…! Android App Bundleì—는 * .aab 확장ìžê°€ 필요합니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "APK í™•ìž¥ì€ Android App Bundleê³¼ 호환ë˜ì§€ 않습니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
-msgstr "ìž˜ëª»ëœ íŒŒì¼ëª…! Android APK는 *.apk 확장ìžê°€ 필요합니다."
+msgstr "ìž˜ëª»ëœ íŒŒì¼ì´ë¦„입니다! Android APK는 *.apk 확장ìžê°€ 필요합니다."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
-msgstr ""
+msgstr "ì§€ì›ë˜ì§€ 않는 내보내기 형ì‹ìž…니다!\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13300,7 +13319,7 @@ msgstr ""
"맞춤 빌드 템플릿으로 빌드하려 했으나, 버전 ì •ë³´ê°€ 없습니다. '프로ì íЏ' 메뉴ì—"
"서 다시 설치해주세요."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13312,36 +13331,37 @@ msgstr ""
" Godot 버전: %s\n"
"'프로ì íЏ' 메뉴ì—서 Android 빌드 í…œí”Œë¦¿ì„ ë‹¤ì‹œ 설치해주세요."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
+"res://android/build/res/*.xml 파ì¼ì„ 프로ì íЏ ì´ë¦„으로 ë®ì–´ì“¸ 수 없습니다"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr "프로ì íЏ 파ì¼ì„ gradle 프로ì íŠ¸ë¡œ 내보낼 수 없었습니다\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr "확장 패키지 파ì¼ì„ 쓸 수 없었습니다!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Android 프로ì íЏ 빌드 중 (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
"Android 프로ì íŠ¸ì˜ ë¹Œë“œì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤, ì¶œë ¥ëœ ì˜¤ë¥˜ë¥¼ 확ì¸í•˜ì„¸ìš”.\n"
-"ë˜ëŠ” docs.godotengine.orgì—서 Android 빌드 설명문서를 찾아보세요."
+"ë˜ëŠ” docs.godotengine.orgì—서 Android 빌드 문서를 찾아보세요."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "출력 ì´ë™ 중"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13349,16 +13369,15 @@ msgstr ""
"내보내기 파ì¼ì„ 복사하고 ì´ë¦„ì„ ë°”ê¿€ 수 없습니다, ì¶œë ¥ì— ëŒ€í•œ gradle 프로ì "
"트 디렉토리를 확ì¸í•˜ì„¸ìš”."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
-msgstr "애니메ì´ì…˜ì„ ì°¾ì„ ìˆ˜ ì—†ìŒ: '%s'"
+msgstr "패키지를 ì°¾ì„ ìˆ˜ ì—†ìŒ: %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr "APK를 만드는 중..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
@@ -13366,33 +13385,37 @@ msgstr ""
"내보낼 템플릿 APK를 ì°¾ì„ ìˆ˜ ì—†ìŒ:\n"
"%s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
"Please build a template with all required libraries, or uncheck the missing "
"architectures in the export preset."
msgstr ""
+"ì„ íƒëœ 아키í…처를 위한 내보내기 í…œí”Œë¦¿ì— ë¼ì´ë¸ŒëŸ¬ë¦¬ê°€ 누ë½ë˜ì–´ 있습니다: "
+"%s.\n"
+"모든 필수 ë¼ì´ë¸ŒëŸ¬ë¦¬ë¡œ í…œí”Œë¦¿ì„ ë¹Œë“œí•˜ê±°ë‚˜, 내보내기 프리셋ì—서 누ë½ëœ 아키í…"
+"처를 ì„ íƒ ì·¨ì†Œí•˜ì„¸ìš”."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr "파ì¼ì„ 추가하는 중..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr "프로ì íЏ 파ì¼ì„ 내보낼 수 없었습니다"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
-msgstr ""
+msgstr "APK를 정렬 중..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
-msgstr ""
+msgstr "임시 ì •ë ¬ë˜ì§€ ì•Šì€ APKì˜ ì••ì¶•ì„ í’€ 수 없었습니다."
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "Identifier is missing."
-msgstr "ì‹ë³„ìžê°€ 없습니다."
+msgstr "ì‹ë³„ìžê°€ 누ë½ë˜ì–´ 있습니다."
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "The character '%s' is not allowed in Identifier."
@@ -13456,19 +13479,19 @@ msgstr "ìž˜ëª»ëœ bundle ì‹ë³„ìž:"
#: platform/osx/export/export.cpp
msgid "Notarization: code signing required."
-msgstr ""
+msgstr "ê³µì¦: 코드 ì„œëª…ì´ í•„ìš”í•©ë‹ˆë‹¤."
#: platform/osx/export/export.cpp
msgid "Notarization: hardened runtime required."
-msgstr ""
+msgstr "ê³µì¦: ê°•í™”ëœ ëŸ°íƒ€ìž„ì´ í•„ìš”í•©ë‹ˆë‹¤."
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID name not specified."
-msgstr ""
+msgstr "ê³µì¦: Apple ID ì´ë¦„ì´ ì§€ì •ë˜ì§€ 않았습니다."
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID password not specified."
-msgstr ""
+msgstr "ê³µì¦: Apple ID 비밀번호가 지정ë˜ì§€ 않았습니다."
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -13535,8 +13558,8 @@ msgid ""
"Only one visible CanvasModulate is allowed per scene (or set of instanced "
"scenes). The first created one will work, while the rest will be ignored."
msgstr ""
-"CanvasModulate는 씬 당 단 하나만 ë³´ì¼ ìˆ˜ 있습니다. 처ìŒì— 만든 것만 ìž‘ë™í•˜"
-"ê³ , 나머지는 무시ë©ë‹ˆë‹¤."
+"CanvasModulate는 씬 (ë˜ëŠ” ì¸ìŠ¤í„´íŠ¸ëœ ì”¬ 세트) 당 단 하나만 ë³´ì¼ ìˆ˜ 있습니다. "
+"처ìŒì— 만든 것만 ìž‘ë™í•˜ê³ , 나머지는 무시ë©ë‹ˆë‹¤."
#: scene/2d/collision_object_2d.cpp
msgid ""
@@ -13544,9 +13567,9 @@ msgid ""
"Consider adding a CollisionShape2D or CollisionPolygon2D as a child to "
"define its shape."
msgstr ""
-"ì´ ë…¸ë“œëŠ” Shapeê°€ 없습니다, 다른 물체와 ì¶©ëŒí•˜ê±°ë‚˜ ìƒí˜¸ 작용할 수 없습니다.\n"
-"CollisionShape2D ë˜ëŠ” CollisionPolygon2D를 ìžì‹ 노드로 추가하여 Shape를 ì •ì˜"
-"하세요."
+"ì´ ë…¸ë“œëŠ” ëª¨ì–‘ì´ ì—†ìŠµë‹ˆë‹¤, 다른 물체와 ì¶©ëŒí•˜ê±°ë‚˜ ìƒí˜¸ 작용할 수 없습니다.\n"
+"CollisionShape2D ë˜ëŠ” CollisionPolygon2D를 ìžì† 노드로 추가하여 ëª¨ì–‘ì„ ì •ì˜í•˜"
+"는 ê²ƒì„ ê³ ë ¤í•˜ì„¸ìš”."
#: scene/2d/collision_polygon_2d.cpp
msgid ""
@@ -13554,13 +13577,13 @@ msgid ""
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
-"CollisionPolygon2D는 CollisionObject2Dì— ì¶©ëŒ ëª¨ì–‘ì„ ì§€ì •í•˜ëŠ” ìš©ë„로만 사용ë©"
-"니다. Shape를 ì •ì˜í•´ì•¼ 하는 Area2D, StaticBody2D, RigidBody2D, "
-"KinematicBody2D ë“±ì˜ ìžì‹ìœ¼ë¡œë§Œ 사용해주세요."
+"CollisionPolygon2D는 CollisionObject2Dì— ì½œë¦¬ì „ ëª¨ì–‘ì„ ì§€ì •í•˜ëŠ” ìš©ë„로만 사용"
+"ë©ë‹ˆë‹¤. ëª¨ì–‘ì„ ì •ì˜í•´ì•¼ 하는 Area2D, StaticBody2D, RigidBody2D, "
+"KinematicBody2D ë“±ì˜ ìžì†ìœ¼ë¡œë§Œ 사용해주세요."
#: scene/2d/collision_polygon_2d.cpp
msgid "An empty CollisionPolygon2D has no effect on collision."
-msgstr "빈 CollisionPolygon2D는 ì¶©ëŒì— ì˜í–¥ì„ 주지 않습니다."
+msgstr "빈 CollisionPolygon2D는 ì½œë¦¬ì „ì— ì˜í–¥ì„ 주지 않습니다."
#: scene/2d/collision_polygon_2d.cpp
msgid "Invalid polygon. At least 3 points are needed in 'Solids' build mode."
@@ -13576,24 +13599,24 @@ msgid ""
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
-"CollisionShape2D는 CollisionObject2Dì— ì¶©ëŒ ëª¨ì–‘ì„ ì§€ì •í•˜ëŠ” ìš©ë„로만 사용ë©ë‹ˆ"
-"다. Shape를 ì •ì˜í•´ì•¼ 하는 Area2D, StaticBody2D, RigidBody2D, KinematicBody2D "
-"ë“±ì˜ ìžì‹ìœ¼ë¡œë§Œ 사용해주세요."
+"CollisionShape2D는 CollisionObject2Dì— ì½œë¦¬ì „ ëª¨ì–‘ì„ ì§€ì •í•˜ëŠ” ìš©ë„로만 사용ë©"
+"니다. ëª¨ì–‘ì„ ì •ì˜í•´ì•¼ 하는 Area2D, StaticBody2D, RigidBody2D, "
+"KinematicBody2D ë“±ì˜ ìžì†ìœ¼ë¡œë§Œ 사용해주세요."
#: scene/2d/collision_shape_2d.cpp
msgid ""
"A shape must be provided for CollisionShape2D to function. Please create a "
"shape resource for it!"
msgstr ""
-"CollisionShape2Dê°€ ìž‘ë™í•˜ë ¤ë©´ 반드시 Shapeê°€ 있어야 합니다. Shape 리소스를 ë§Œ"
-"들어주세요!"
+"CollisionShape2Dê°€ ìž‘ë™í•˜ë ¤ë©´ 반드시 ëª¨ì–‘ì´ ìžˆì–´ì•¼ 합니다. 모양 리소스를 만들"
+"어주세요!"
#: scene/2d/collision_shape_2d.cpp
msgid ""
"Polygon-based shapes are not meant be used nor edited directly through the "
"CollisionShape2D node. Please use the CollisionPolygon2D node instead."
msgstr ""
-"í´ë¦¬ê³¤ 기반 Shape는 CollisionShape2Dì— ì¶”ê°€í•˜ê±°ë‚˜ 거기서 íŽ¸ì§‘í•˜ê²Œë” ì„¤ê³„í•˜ì§€ "
+"í´ë¦¬ê³¤ 기반 ëª¨ì–‘ì€ CollisionShape2Dì— ì¶”ê°€í•˜ê±°ë‚˜ 거기서 íŽ¸ì§‘í•˜ê²Œë” ì„¤ê³„í•˜ì§€ "
"않았습니다. 대신 CollisionPolygon2D 노드를 사용하십시오."
#: scene/2d/cpu_particles_2d.cpp
@@ -13601,7 +13624,7 @@ msgid ""
"CPUParticles2D animation requires the usage of a CanvasItemMaterial with "
"\"Particles Animation\" enabled."
msgstr ""
-"CPUParticles2D 애니메ì´ì…˜ì—는 \"Particles Animation\"ì´ ì¼œì§„ "
+"CPUParticles2D 애니메ì´ì…˜ì—는 \"Particles Animation\"ì´ í™œì„±í™”ëœ "
"CanvasItemMaterialì„ ì‚¬ìš©í•´ì•¼ 합니다."
#: scene/2d/joints_2d.cpp
@@ -13634,8 +13657,7 @@ msgstr "ì¡°ëª…ì˜ ëª¨ì–‘ì„ ë‚˜íƒ€ë‚¼ í…스처를 \"Texture\" ì†ì„±ì— 지정í
msgid ""
"An occluder polygon must be set (or drawn) for this occluder to take effect."
msgstr ""
-"ì´ Occluderê°€ ì˜í–¥ì„ 주게 하려면 Occluder í´ë¦¬ê³¤ì„ 설정해야 (í˜¹ì€ ê·¸ë ¤ì•¼) í•©"
-"니다."
+"ì´ Occluder를 ë°˜ì˜í•˜ë ¤ë©´ Occluder í´ë¦¬ê³¤ì„ 설정해야 (í˜¹ì€ ê·¸ë ¤ì•¼) 합니다."
#: scene/2d/light_occluder_2d.cpp
msgid "The occluder polygon for this occluder is empty. Please draw a polygon."
@@ -13654,14 +13676,14 @@ msgid ""
"NavigationPolygonInstance must be a child or grandchild to a Navigation2D "
"node. It only provides navigation data."
msgstr ""
-"NavigationPolygonInstance는 Navigation2D ë…¸ë“œì˜ ìžì‹ ë˜ëŠ” ê·¸ ì•„ëž˜ì— ìžˆì–´ì•¼ í•©"
-"니다. ì´ê²ƒì€ 내비게ì´ì…˜ ë°ì´í„°ë§Œì„ 제공합니다."
+"NavigationPolygonInstance는 Navigation2D ë…¸ë“œì˜ ìžì†ì´ë‚˜ ì†ì£¼ì— 있어야 합니"
+"다. ì´ê²ƒì€ 내비게ì´ì…˜ ë°ì´í„°ë§Œì„ 제공합니다."
#: scene/2d/parallax_layer.cpp
msgid ""
"ParallaxLayer node only works when set as child of a ParallaxBackground node."
msgstr ""
-"ParallaxLayer는 ParallaxBackground ë…¸ë“œì˜ ìžì‹ 노드로 ìžˆì„ ë•Œë§Œ ìž‘ë™í•©ë‹ˆë‹¤."
+"ParallaxLayer는 ParallaxBackground ë…¸ë“œì˜ ìžì† 노드로 ìžˆì„ ë•Œë§Œ ìž‘ë™í•©ë‹ˆë‹¤."
#: scene/2d/particles_2d.cpp
msgid ""
@@ -13670,15 +13692,15 @@ msgid ""
"CPUParticles\" option for this purpose."
msgstr ""
"GPU 기반 파티í´ì€ GLES2 비디오 드ë¼ì´ë²„ì—서 ì§€ì›í•˜ì§€ 않습니다.\n"
-"대신 CPUParticles2D 노드를 사용하세요. ì´ ê²½ìš° \"CPU파티í´ë¡œ 변환\" ì˜µì…˜ì„ ì‚¬"
-"용할 수 있습니다."
+"대신 CPUParticles2D 노드를 사용하세요. ì´ ê²½ìš° \"CPUParticles로 변환\" 옵션"
+"ì„ ì‚¬ìš©í•  수 있습니다."
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
msgid ""
"A material to process the particles is not assigned, so no behavior is "
"imprinted."
msgstr ""
-"파티í´ì„ 처리할 ë¨¸í‹°ë¦¬ì–¼ì„ ì§€ì •í•˜ì§€ 않았습니다. 아무런 ë™ìž‘ë„ ì°ížˆì§€ 않습니"
+"파티í´ì„ 처리할 ë¨¸í‹°ë¦¬ì–¼ì´ í• ë‹¹ë˜ì§€ 않았으므로, 아무런 ë™ìž‘ë„ ì°ížˆì§€ 않습니"
"다."
#: scene/2d/particles_2d.cpp
@@ -13686,12 +13708,12 @@ msgid ""
"Particles2D animation requires the usage of a CanvasItemMaterial with "
"\"Particles Animation\" enabled."
msgstr ""
-"Particles2D 애니메ì´ì…˜ì€ \"Particles Animation\"ì´ ì¼œì ¸ 있는 "
+"Particles2D 애니메ì´ì…˜ì€ \"Particles Animation\"ì´ í™œì„±í™”ë˜ì–´ 있는 "
"CanvasItemMaterialì„ ì‚¬ìš©í•´ì•¼ 합니다."
#: scene/2d/path_2d.cpp
msgid "PathFollow2D only works when set as a child of a Path2D node."
-msgstr "PathFollow2D는 Path2D ë…¸ë“œì˜ ìžì‹ 노드로 ìžˆì„ ë•Œë§Œ ìž‘ë™í•©ë‹ˆë‹¤."
+msgstr "PathFollow2D는 Path2D ë…¸ë“œì˜ ìžì† 노드로 ìžˆì„ ë•Œë§Œ ìž‘ë™í•©ë‹ˆë‹¤."
#: scene/2d/physics_body_2d.cpp
msgid ""
@@ -13701,7 +13723,7 @@ msgid ""
msgstr ""
"(ìºë¦­í„°ë‚˜ 리지드 모드ì—서) RigidBody2Dì˜ í¬ê¸° ë³€ê²½ì€ ë¬¼ë¦¬ ì—”ì§„ì´ ìž‘ë™í•˜ëŠ” ë™"
"안 í° ë¶€ë‹´ì´ ë©ë‹ˆë‹¤.\n"
-"대신 ìžì‹ ì¶©ëŒ í˜•íƒœì˜ í¬ê¸°ë¥¼ 변경해보세요."
+"대신 ìžì† 콜리전 ëª¨ì–‘ì˜ í¬ê¸°ë¥¼ 변경해보세요."
#: scene/2d/remote_transform_2d.cpp
msgid "Path property must point to a valid Node2D node to work."
@@ -13728,9 +13750,9 @@ msgid ""
"to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, "
"KinematicBody2D, etc. to give them a shape."
msgstr ""
-"Use Parentê°€ 켜진 TileMapì€ í˜•íƒœë¥¼ 주는 부모 CollisionObject2Dê°€ 필요합니다. "
-"형태를 주기 위해 Area2D, StaticBody2D, RigidBody2D, KinematicBody2D ë“±ì„ ìž"
-"ì‹ ë…¸ë“œë¡œ 사용해주세요."
+"Use Parentê°€ 켜진 TileMapì€ ëª¨ì–‘ì„ ì£¼ëŠ” 부모 CollisionObject2Dê°€ 필요합니다. "
+"ëª¨ì–‘ì„ ì£¼ê¸° 위해 Area2D, StaticBody2D, RigidBody2D, KinematicBody2D ë“±ì„ ìž"
+"ì† ë…¸ë“œë¡œ 사용해주세요."
#: scene/2d/visibility_notifier_2d.cpp
msgid ""
@@ -13767,15 +13789,15 @@ msgstr "앵커 IDê°€ 0ì´ ë˜ë©´ 앵커가 실제 ì•µì»¤ì— ë°”ì¸ë”©í•˜ì§€ 않ê
#: scene/3d/arvr_nodes.cpp
msgid "ARVROrigin requires an ARVRCamera child node."
-msgstr "ARVROriginì€ ìžì‹ìœ¼ë¡œ ARVRCamera 노드가 필요합니다."
+msgstr "ARVROriginì€ ìžì†ìœ¼ë¡œ ARVRCamera 노드가 필요합니다."
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr "메시 ë° ì¡°ëª… 찾는 중"
+msgstr "메시 ë° ì¡°ëª…ì„ ì°¾ëŠ” 중"
#: scene/3d/baked_lightmap.cpp
msgid "Preparing geometry (%d/%d)"
-msgstr "형태 준비 중 (%d/%d)"
+msgstr "지오메트리 준비 중 (%d/%d)"
#: scene/3d/baked_lightmap.cpp
msgid "Preparing environment"
@@ -13787,7 +13809,7 @@ msgstr "캡처 ìƒì„± 중"
#: scene/3d/baked_lightmap.cpp
msgid "Saving lightmaps"
-msgstr "ë¼ì´íŠ¸ë§µ 저장 중"
+msgstr "ë¼ì´íŠ¸ë§µì„ ì €ìž¥ 중"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -13799,9 +13821,9 @@ msgid ""
"Consider adding a CollisionShape or CollisionPolygon as a child to define "
"its shape."
msgstr ""
-"ì´ ë…¸ë“œëŠ” Shapeê°€ 없습니다. 다른 물체와 ì¶©ëŒí•˜ê±°ë‚˜ ìƒí˜¸ 작용할 수 없습니다.\n"
-"CollisionShape ë˜ëŠ” CollisionPolygonì„ ìžì‹ 노드로 추가해서 Shapeì„ ì •ì˜í•´ë³´"
-"세요."
+"ì´ ë…¸ë“œëŠ” ëª¨ì–‘ì´ ì—†ìŠµë‹ˆë‹¤. 다른 물체와 ì¶©ëŒí•˜ê±°ë‚˜ ìƒí˜¸ 작용할 수 없습니다.\n"
+"CollisionShape ë˜ëŠ” CollisionPolygonì„ ìžì† 노드로 추가해서 ëª¨ì–‘ì„ ì •ì˜í•˜ëŠ” "
+"ê²ƒì„ ê³ ë ¤í•˜ì„¸ìš”."
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -13809,13 +13831,13 @@ msgid ""
"CollisionObject derived node. Please only use it as a child of Area, "
"StaticBody, RigidBody, KinematicBody, etc. to give them a shape."
msgstr ""
-"CollisionPolygonì€ CollisionObjectì— ì¶©ëŒ Shape를 지정하는 ìš©ë„로만 사용ë©ë‹ˆ"
-"다. Area, StaticBody, RigidBody, KinematicBody ë“±ì— ìžì‹ 노드로 추가해서 사용"
+"CollisionPolygonì€ CollisionObjectì— ì½œë¦¬ì „ ëª¨ì–‘ì„ ì§€ì •í•˜ëŠ” ìš©ë„로만 사용ë©ë‹ˆ"
+"다. Area, StaticBody, RigidBody, KinematicBody ë“±ì— ìžì† 노드로 추가해서 사용"
"해주세요."
#: scene/3d/collision_polygon.cpp
msgid "An empty CollisionPolygon has no effect on collision."
-msgstr "빈 CollisionPolygon는 ì¶©ëŒì— ì˜í–¥ì„ 주지 않습니다."
+msgstr "빈 CollisionPolygon는 ì½œë¦¬ì „ì— ì˜í–¥ì„ 주지 않습니다."
#: scene/3d/collision_shape.cpp
msgid ""
@@ -13823,8 +13845,8 @@ msgid ""
"derived node. Please only use it as a child of Area, StaticBody, RigidBody, "
"KinematicBody, etc. to give them a shape."
msgstr ""
-"CollisionShapeì€ CollisionObjectì— ì¶©ëŒ Shape를 지정하는 ìš©ë„로만 사용ë©ë‹ˆ"
-"다. Area, StaticBody, RigidBody, KinematicBody ë“±ì— ìžì‹ 노드로 추가해서 사용"
+"CollisionShapeì€ CollisionObjectì— ì½œë¦¬ì „ ëª¨ì–‘ì„ ì§€ì •í•˜ëŠ” ìš©ë„로만 사용ë©ë‹ˆ"
+"다. Area, StaticBody, RigidBody, KinematicBody ë“±ì— ìžì† 노드로 추가해서 사용"
"해주세요."
#: scene/3d/collision_shape.cpp
@@ -13832,8 +13854,8 @@ msgid ""
"A shape must be provided for CollisionShape to function. Please create a "
"shape resource for it."
msgstr ""
-"CollisionShapeê°€ ì œ ê¸°ëŠ¥ì„ í•˜ë ¤ë©´ Shapeê°€ 있어야 합니다. Shape 리소스를 만들"
-"어주세요."
+"CollisionShapeê°€ ì œ ê¸°ëŠ¥ì„ í•˜ë ¤ë©´ ëª¨ì–‘ì´ ìžˆì–´ì•¼ 합니다. 모양 리소스를 만들어"
+"주세요."
#: scene/3d/collision_shape.cpp
msgid ""
@@ -13884,6 +13906,9 @@ msgid ""
"longer has any effect.\n"
"To remove this warning, disable the GIProbe's Compress property."
msgstr ""
+"GIProbe Compress ì†ì„±ì€ 알려진 버그로 ì¸í•´ ë” ì´ìƒ 사용ë˜ì§€ 않으며 ë” ì´ìƒ ì˜"
+"í–¥ì´ ì—†ìŠµë‹ˆë‹¤.\n"
+"ì´ ê²½ê³ ë¥¼ 제거하려면, GIProbeì˜ Compress ì†ì„±ì„ 비활성화하세요."
#: scene/3d/light.cpp
msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows."
@@ -13899,8 +13924,16 @@ msgid ""
"NavigationMeshInstance must be a child or grandchild to a Navigation node. "
"It only provides navigation data."
msgstr ""
-"NavigationMeshInstance는 Navigation ë…¸ë“œì˜ ìžì‹ì´ë‚˜ ë” í•˜ìœ„ì— ìžˆì–´ì•¼ 합니다. "
-"ì´ê²ƒì€ 내비게ì´ì…˜ ë°ì´í„°ë§Œ 제공합니다."
+"NavigationMeshInstance는 Navigation ë…¸ë“œì˜ ìžì†ì´ë‚˜ ì†ì£¼ì— 있어야 합니다. ì´"
+"ê²ƒì€ ë‚´ë¹„ê²Œì´ì…˜ ë°ì´í„°ë§Œ 제공합니다."
+
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
#: scene/3d/particles.cpp
msgid ""
@@ -13909,8 +13942,8 @@ msgid ""
"\" option for this purpose."
msgstr ""
"GPU 기반 파티í´ì€ GLES2 비디오 드ë¼ì´ë²„ì—서 ì§€ì›í•˜ì§€ 않습니다.\n"
-"대신 CPUParticles 노드를 사용하세요. ì´ ê²½ìš° \"CPU파티í´ë¡œ 변환\" ì„¤ì •ì„ ì‚¬ìš©"
-"할 수 있습니다."
+"대신 CPUParticles 노드를 사용하세요. ì´ ê²½ìš° \"CPUParticles로 변환\" ì„¤ì •ì„ "
+"사용할 수 있습니다."
#: scene/3d/particles.cpp
msgid ""
@@ -13927,7 +13960,7 @@ msgstr ""
#: scene/3d/path.cpp
msgid "PathFollow only works when set as a child of a Path node."
-msgstr "PathFollow는 Path ë…¸ë“œì˜ ìžì‹ìœ¼ë¡œ ìžˆì„ ë•Œë§Œ ìž‘ë™í•©ë‹ˆë‹¤."
+msgstr "PathFollow는 Path ë…¸ë“œì˜ ìžì†ìœ¼ë¡œ ìžˆì„ ë•Œë§Œ ìž‘ë™í•©ë‹ˆë‹¤."
#: scene/3d/path.cpp
msgid ""
@@ -13945,7 +13978,7 @@ msgid ""
msgstr ""
"(ìºë¦­í„°ë‚˜ 리지드 모드ì—서) RigidBodyì˜ í¬ê¸° ë³€ê²½ì€ ë¬¼ë¦¬ ì—”ì§„ì´ ìž‘ë™í•˜ëŠ” ë™ì•ˆ "
"í° ë¶€ë‹´ì´ ë©ë‹ˆë‹¤.\n"
-"대신 ìžì‹ ì¶©ëŒ ëª¨ì–‘ì˜ í¬ê¸°ë¥¼ 변경하세요."
+"대신 ìžì† 콜리전 ëª¨ì–‘ì˜ í¬ê¸°ë¥¼ 변경하세요."
#: scene/3d/physics_joint.cpp
msgid "Node A and Node B must be PhysicsBodies"
@@ -13969,15 +14002,15 @@ msgstr "노드 A와 노드 B는 서로 다른 PhysicsBody여야 합니다"
#: scene/3d/portal.cpp
msgid "The RoomManager should not be a child or grandchild of a Portal."
-msgstr ""
+msgstr "RoomManager는 Portalì˜ ìžì†ì´ë‚˜ ì†ì£¼ê°€ 아니어야 합니다."
#: scene/3d/portal.cpp
msgid "A Room should not be a child or grandchild of a Portal."
-msgstr ""
+msgstr "Roomì€ Portalì˜ ìžì†ì´ë‚˜ ì†ì£¼ê°€ 아니어야 합니다."
#: scene/3d/portal.cpp
msgid "A RoomGroup should not be a child or grandchild of a Portal."
-msgstr ""
+msgstr "RoomGroupì€ Portalì˜ ìžì†ì´ë‚˜ ì†ì£¼ê°€ 아니어야 합니다."
#: scene/3d/remote_transform.cpp
msgid ""
@@ -13989,79 +14022,93 @@ msgstr ""
#: scene/3d/room.cpp
msgid "A Room cannot have another Room as a child or grandchild."
-msgstr ""
+msgstr "Roomì€ ë‹¤ë¥¸ Roomì„ ìžì†ì´ë‚˜ ì†ì£¼ë¡œ 가질 수 없습니다."
#: scene/3d/room.cpp
msgid "The RoomManager should not be placed inside a Room."
-msgstr ""
+msgstr "RoomManager는 Room ì•ˆì— ë°°ì¹˜í•´ì„œëŠ” 안ë©ë‹ˆë‹¤."
#: scene/3d/room.cpp
msgid "A RoomGroup should not be placed inside a Room."
-msgstr ""
+msgstr "RoomGroupì€ Room ì•ˆì— ë°°ì¹˜í•´ì„œëŠ” 안ë©ë‹ˆë‹¤."
#: scene/3d/room.cpp
msgid ""
"Room convex hull contains a large number of planes.\n"
"Consider simplifying the room bound in order to increase performance."
msgstr ""
+"룸 컨벡스 í—ì—는 ë‹¤ìˆ˜ì˜ í‰ë©´ì´ 있습니다.\n"
+"ì„±ëŠ¥ì„ ë†’ì´ë ¤ë©´ 룸 경계를 단순화하는 ê²ƒì„ ê³ ë ¤í•˜ì„¸ìš”."
#: scene/3d/room_group.cpp
msgid "The RoomManager should not be placed inside a RoomGroup."
-msgstr ""
+msgstr "RoomManager는 RoomGroup ì•ˆì— ë°°ì¹˜í•´ì„œëŠ” 안ë©ë‹ˆë‹¤."
#: scene/3d/room_manager.cpp
msgid "The RoomList has not been assigned."
-msgstr ""
+msgstr "RoomListê°€ 할당ë˜ì–´ 있지 않습니다."
#: scene/3d/room_manager.cpp
msgid "The RoomList node should be a Spatial (or derived from Spatial)."
-msgstr ""
+msgstr "RoomList 노드는 Spatial(ë˜ëŠ” Spatialì—서 파ìƒ)ì´ì–´ì•¼ 합니다."
#: scene/3d/room_manager.cpp
msgid ""
"Portal Depth Limit is set to Zero.\n"
"Only the Room that the Camera is in will render."
msgstr ""
+"í¬í„¸ ê¹Šì´ ì œí•œì´ ì˜ìœ¼ë¡œ 설정ë©ë‹ˆë‹¤.\n"
+"ì¹´ë©”ë¼ê°€ 있는 룸만 ë Œë”ë§ë  것입니다."
#: scene/3d/room_manager.cpp
msgid "There should only be one RoomManager in the SceneTree."
-msgstr ""
+msgstr "SceneTreeì—는 RoomManager 하나만 있어야 합니다."
#: scene/3d/room_manager.cpp
msgid ""
"RoomList path is invalid.\n"
"Please check the RoomList branch has been assigned in the RoomManager."
msgstr ""
+"RoomList 경로가 잘못ë˜ì—ˆìŠµë‹ˆë‹¤.\n"
+"RoomList 가지가 RoomManagerì—서 할당ë˜ì—ˆëŠ”ì§€ 확ì¸í•´ì£¼ì„¸ìš”."
#: scene/3d/room_manager.cpp
msgid "RoomList contains no Rooms, aborting."
-msgstr ""
+msgstr "RoomListì— í¬í•¨ëœ Roomì´ ì—†ì–´, 중단합니다."
#: scene/3d/room_manager.cpp
msgid "Misnamed nodes detected, check output log for details. Aborting."
msgstr ""
+"ì´ë¦„ì´ ìž˜ëª»ëœ ë…¸ë“œê°€ ê°ì§€ë˜ì—ˆìœ¼ë©°, ìžì„¸í•œ ì‚¬í•­ì€ ì¶œë ¥ 로그를 확ì¸í•˜ì„¸ìš”. 중단"
+"합니다."
#: scene/3d/room_manager.cpp
msgid "Portal link room not found, check output log for details."
-msgstr ""
+msgstr "í¬í„¸ ì—°ê²° ë£¸ì„ ì°¾ì„ ìˆ˜ 없으며, ìžì„¸í•œ ì‚¬í•­ì€ ì¶œë ¥ 로그를 확ì¸í•˜ì„¸ìš”."
#: scene/3d/room_manager.cpp
msgid ""
"Portal autolink failed, check output log for details.\n"
"Check the portal is facing outwards from the source room."
msgstr ""
+"í¬í„¸ ìžë™ì—°ê²°ì— 실패했으며, ìžì„¸í•œ ì‚¬í•­ì€ ì¶œë ¥ 로그를 확ì¸í•˜ì„¸ìš”.\n"
+"í¬í„¸ì´ 소스 룸으로부터 ë°”ê¹¥ìª½ì„ í–¥í•˜ê³  있는지 확ì¸í•˜ì„¸ìš”."
#: scene/3d/room_manager.cpp
msgid ""
"Room overlap detected, cameras may work incorrectly in overlapping area.\n"
"Check output log for details."
msgstr ""
+"룸 ê²¹ì¹¨ì´ ê°ì§€ë˜ì–´, ì¹´ë©”ë¼ê°€ 겹치는 ì˜ì—­ì—서 잘못 ìž‘ë™í•  수 있습니다.\n"
+"ìžì„¸í•œ ì‚¬í•­ì€ ì¶œë ¥ 로그를 확ì¸í•˜ì„¸ìš”."
#: scene/3d/room_manager.cpp
msgid ""
"Error calculating room bounds.\n"
"Ensure all rooms contain geometry or manual bounds."
msgstr ""
+"룸 경계를 계산하는 중 오류.\n"
+"모든 ë£¸ì— ì§€ì˜¤ë©”íŠ¸ë¦¬ ë˜ëŠ” ìˆ˜ë™ ê²½ê³„ê°€ í¬í•¨ë˜ì–´ 있는지 확ì¸í•˜ì„¸ìš”."
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
@@ -14074,7 +14121,7 @@ msgid ""
"Change the size in children collision shapes instead."
msgstr ""
"실행 ì¤‘ì— SoftBodyì˜ í¬ê¸° ë³€ê²½ì€ ë¬¼ë¦¬ ì—”ì§„ì— ì˜í•´ 재정ì˜ë©ë‹ˆë‹¤.\n"
-"대신 ìžì‹ì˜ ì¶©ëŒ ëª¨ì–‘ í¬ê¸°ë¥¼ 변경하세요."
+"대신 ìžì† 콜리전 ëª¨ì–‘ì˜ í¬ê¸°ë¥¼ 변경하세요."
#: scene/3d/sprite_3d.cpp
msgid ""
@@ -14090,21 +14137,21 @@ msgid ""
"it as a child of a VehicleBody."
msgstr ""
"VehicleWheelì€ VehicleBody로 바퀴 ì‹œìŠ¤í…œì„ ì œê³µí•˜ëŠ” 역할입니다. VehicleBody"
-"ì˜ ìžì‹ìœ¼ë¡œ 사용해주세요."
+"ì˜ ìžì†ìœ¼ë¡œ 사용해주세요."
#: scene/3d/world_environment.cpp
msgid ""
"WorldEnvironment requires its \"Environment\" property to contain an "
"Environment to have a visible effect."
msgstr ""
-"WorldEnvironmentê°€ ì‹œê° íš¨ê³¼ë¥¼ ê°–ë„ë¡ Environment를 ê°–ê³  있는 \"Environment"
+"WorldEnvironmentê°€ ì‹œê° ì´íŽ™íŠ¸ë¥¼ ê°–ë„ë¡ Environment를 ê°–ê³  있는 \"Environment"
"\" ì†ì„±ì´ 필요합니다."
#: scene/3d/world_environment.cpp
msgid ""
"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
msgstr ""
-"씬마다 (í˜¹ì€ ì¸ìŠ¤í„´ìŠ¤ëœ ì”¬ 세트마다) WorldEnvironment는 하나만 허용ë©ë‹ˆë‹¤."
+"씬(ë˜ëŠ” ì¸ìŠ¤í„´ìŠ¤ëœ ì”¬ 세트마다) 당 WorldEnvironment는 하나만 허용ë©ë‹ˆë‹¤."
#: scene/3d/world_environment.cpp
msgid ""
@@ -14124,7 +14171,7 @@ msgstr "애니메ì´ì…˜ì„ ì°¾ì„ ìˆ˜ ì—†ìŒ: '%s'"
#: scene/animation/animation_player.cpp
msgid "Anim Apply Reset"
-msgstr ""
+msgstr "애니메ì´ì…˜ ì ìš© 재설정"
#: scene/animation/animation_tree.cpp
msgid "In node '%s', invalid animation: '%s'."
@@ -14169,11 +14216,11 @@ msgid ""
msgstr ""
"색ìƒ: #%s\n"
"좌í´ë¦­: ìƒ‰ìƒ ì„¤ì •\n"
-"ìš°í´ë¦­: 프리셋 ì‚­ì œ"
+"ìš°í´ë¦­: 프리셋 제거"
#: scene/gui/color_picker.cpp
msgid "Pick a color from the editor window."
-msgstr "편집기 ì°½ì—서 색ìƒì„ 고르세요."
+msgstr "ì—디터 ì°½ì—서 색ìƒì„ 고르세요."
#: scene/gui/color_picker.cpp
msgid "HSV"
@@ -14197,7 +14244,7 @@ msgid ""
"children placement behavior.\n"
"If you don't intend to add a script, use a plain Control node instead."
msgstr ""
-"Container ìžì²´ëŠ” ìžì‹ 배치 ìž‘ì—…ì„ êµ¬ì„±í•˜ëŠ” 스í¬ë¦½íЏ 외ì—는 목ì ì´ 없습니다.\n"
+"Container ìžì²´ëŠ” ìžì† 배치 ìž‘ì—…ì„ êµ¬ì„±í•˜ëŠ” 스í¬ë¦½íЏ 외ì—는 목ì ì´ 없습니다.\n"
"스í¬ë¦½íŠ¸ë¥¼ 추가하는 ì˜ë„ê°€ 없으면, 순수한 Control 노드를 사용해주세요."
#: scene/gui/control.cpp
@@ -14225,6 +14272,14 @@ msgstr "올바른 확장ìžë¥¼ 사용해야 합니다."
msgid "Enable grid minimap."
msgstr "그리드 ë¯¸ë‹ˆë§µì„ í™œì„±í™”í•©ë‹ˆë‹¤."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14236,7 +14291,7 @@ msgstr ""
#: scene/gui/range.cpp
msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0."
-msgstr "\"Exp Edit\"ì„ ì¼œë©´, \"Min Value\"는 반드시 0보다 커야 합니다."
+msgstr "\"Exp Edit\"ì„ í™œì„±í™”í•˜ë©´, \"Min Value\"는 반드시 0보다 커야 합니다."
#: scene/gui/scroll_container.cpp
msgid ""
@@ -14244,8 +14299,8 @@ msgid ""
"Use a container as child (VBox, HBox, etc.), or a Control and set the custom "
"minimum size manually."
msgstr ""
-"ScrollContainer는 ë‹¨ì¼ ìžì‹ Controlì„ ìž‘ì—…í•˜ê¸° 위한 것입니다.\n"
-"(VBox, HBox 등) 컨테ì´ë„ˆë¥¼ ìžì‹ìœ¼ë¡œ 사용하거나, Controlì„ ì‚¬ìš©í•˜ê³  맞춤 최소 "
+"ScrollContainer는 ë‹¨ì¼ ìžì† Controlì„ ìž‘ì—…í•˜ê¸° 위한 것입니다.\n"
+"(VBox, HBox 등) 컨테ì´ë„ˆë¥¼ ìžì†ìœ¼ë¡œ 사용하거나, Controlì„ ì‚¬ìš©í•˜ê³  맞춤 최소 "
"수치를 수ë™ìœ¼ë¡œ 설정하세요."
#: scene/gui/tree.cpp
@@ -14257,8 +14312,8 @@ msgid ""
"Default Environment as specified in Project Settings (Rendering -> "
"Environment -> Default Environment) could not be loaded."
msgstr ""
-"프로ì íЏ 설정 (Rendering -> Environment -> Default Environment)ì— ì§€ì •í•œ 기"
-"본 í™˜ê²½ì„ ë¶ˆëŸ¬ì˜¬ 수 없습니다."
+"프로ì íЏ 설정 (Rendering -> Environment -> Default Environment)ì— ì§€ì •í•œ ë””í´"
+"트 í™˜ê²½ì„ ë¶ˆëŸ¬ì˜¬ 수 없습니다."
#: scene/main/viewport.cpp
msgid ""
@@ -14268,7 +14323,7 @@ msgid ""
"texture to some node for display."
msgstr ""
"ë·°í¬íŠ¸ë¥¼ ë Œë” ëŒ€ìƒìœ¼ë¡œ 설정하지 않았습니다. ë·°í¬íŠ¸ì˜ ë‚´ìš©ì„ í™”ë©´ì— ì§ì ‘ 표시"
-"하려면, Controlì˜ ìžì‹ 노드로 만들어서 í¬ê¸°ë¥¼ 얻어야 합니다. 그렇지 ì•Šì„ ê²½"
+"하려면, Controlì˜ ìžì† 노드로 만들어서 í¬ê¸°ë¥¼ 얻어야 합니다. 그렇지 ì•Šì„ ê²½"
"ìš°, í™”ë©´ì— í‘œì‹œí•˜ê¸° 위해서는 ë·°í¬íŠ¸ë¥¼ RenderTarget으로 만들고 ë‚´ë¶€ì ì¸ í…스처"
"를 다른 ë…¸ë“œì— ì§€ì •í•´ì•¼ 합니다."
@@ -14276,6 +14331,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "무엇ì´ë“  ë Œë”ë§í•˜ë ¤ë©´ ë·°í¬íЏ í¬ê¸°ê°€ 0보다 커야 합니다."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14297,25 +14356,28 @@ msgid "Invalid comparison function for that type."
msgstr "해당 ìœ í˜•ì— ìž˜ëª»ëœ ë¹„êµ í•¨ìˆ˜."
#: servers/visual/shader_language.cpp
-#, fuzzy
msgid "Varying may not be assigned in the '%s' function."
-msgstr "Varyingì€ ê¼­ì§“ì  í•¨ìˆ˜ì—ë§Œ 지정할 수 있습니다."
+msgstr "Varyingì€ '%s' 함수ì—서 할당ë˜ì§€ ì•Šì„ ìˆ˜ 있습니다."
#: servers/visual/shader_language.cpp
msgid ""
"Varyings which assigned in 'vertex' function may not be reassigned in "
"'fragment' or 'light'."
msgstr ""
+"'vertex' 함수ì—서 í• ë‹¹ëœ Varyingì€ 'fragment' ë˜ëŠ” 'light'ì—서 재할당ë˜ì§€ 않"
+"ì„ ìˆ˜ 있습니다."
#: servers/visual/shader_language.cpp
msgid ""
"Varyings which assigned in 'fragment' function may not be reassigned in "
"'vertex' or 'light'."
msgstr ""
+"'fragment' 함수ì—서 í• ë‹¹ëœ Varyingì€ 'vertex' ë˜ëŠ” 'light'ì—서 재할당ë˜ì§€ 않"
+"ì„ ìˆ˜ 있습니다."
#: servers/visual/shader_language.cpp
msgid "Fragment-stage varying could not been accessed in custom function!"
-msgstr ""
+msgstr "맞춤 함수ì—서 Fragment-stage varyingì— ì ‘ê·¼í•  수 없습니다!"
#: servers/visual/shader_language.cpp
msgid "Assignment to function."
@@ -14329,6 +14391,41 @@ msgstr "Uniformì— ëŒ€ìž…."
msgid "Constants cannot be modified."
msgstr "ìƒìˆ˜ëŠ” 수정할 수 없습니다."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "(본ì˜) 대기 ìžì„¸ 만들기"
+
+#~ msgid "Bottom"
+#~ msgstr "아랫면"
+
+#~ msgid "Left"
+#~ msgstr "왼쪽면"
+
+#~ msgid "Right"
+#~ msgstr "오른쪽면"
+
+#~ msgid "Front"
+#~ msgstr "ì •ë©´"
+
+#~ msgid "Rear"
+#~ msgstr "ë’·ë©´"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "ì´ë¦„ 없는 기즈모"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"ìžìœ ë„(DoF)\"는 \"Xr 모드\" ê°€ \"Oculus Mobile VR\" ì¼ ë•Œë§Œ 사용 가능합"
+#~ "니다."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"í¬ì»¤ìФ ì¸ì‹\"ì€ \"Xr 모드\"ê°€ \"Oculus Mobile VR\" ì¸ ê²½ìš°ì—ë§Œ 사용 가능"
+#~ "합니다."
+
#~ msgid "Package Contents:"
#~ msgstr "패키지 내용:"
@@ -16407,9 +16504,6 @@ msgstr "ìƒìˆ˜ëŠ” 수정할 수 없습니다."
#~ msgid "Images:"
#~ msgstr "ì´ë¯¸ì§€:"
-#~ msgid "Group"
-#~ msgstr "그룹"
-
#~ msgid "Sample Conversion Mode: (.wav files):"
#~ msgstr "샘플 변환 모드: (.wav 파ì¼):"
diff --git a/editor/translations/lt.po b/editor/translations/lt.po
index f8bc356023..a853757f43 100644
--- a/editor/translations/lt.po
+++ b/editor/translations/lt.po
@@ -1037,7 +1037,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1669,13 +1669,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2067,7 +2067,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2556,6 +2556,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3191,6 +3215,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Animacija: Pakeisti TransformacijÄ…"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3443,6 +3472,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5572,6 +5605,17 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Panaikinti pasirinkimÄ…"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6500,7 +6544,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7098,6 +7146,16 @@ msgstr "Sukurti"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Animacija: Pakeisti TransformacijÄ…"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Ištrinti Efektą"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7610,11 +7668,12 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Sukurti NaujÄ…"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7642,6 +7701,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7750,42 +7863,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8050,6 +8143,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Priedai"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -8115,7 +8213,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12174,6 +12272,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12462,6 +12568,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Visas Pasirinkimas"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12947,163 +13058,152 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Redaguoti"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Išinstaliuoti"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Atsiųsti"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid package name:"
msgstr "Netinkamas šrifto dydis."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13111,57 +13211,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13169,55 +13269,55 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Animacijos Nodas"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13225,20 +13325,20 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Filtrai..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13698,6 +13798,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13992,6 +14100,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14032,6 +14148,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/lv.po b/editor/translations/lv.po
index 180cd1be1c..26674cb5b8 100644
--- a/editor/translations/lv.po
+++ b/editor/translations/lv.po
@@ -1029,7 +1029,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Atkarības"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Resurs"
@@ -1678,13 +1678,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2059,7 +2059,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2537,6 +2537,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3162,6 +3186,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim IzmainÄ«t TransformÄciju"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3406,6 +3435,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5459,6 +5492,17 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grupa Izvēlēta"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6370,7 +6414,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6962,6 +7010,15 @@ msgstr "Izveidot punktus."
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Izdzēst"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7468,11 +7525,12 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "IelÄdÄ“t NoklusÄ“jumu"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7500,6 +7558,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7610,42 +7722,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7909,6 +8001,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Izveidot"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7974,7 +8071,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11988,6 +12085,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12273,6 +12378,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Visa Izvēle"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12750,161 +12860,150 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Instalēt..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "IelÄdÄ“t..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Nederīgs paketes nosaukums:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12912,57 +13011,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12970,55 +13069,55 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "AnimÄcija netika atrasta: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13026,20 +13125,20 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Pievienot Mezglus..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13496,6 +13595,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13786,6 +13893,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13826,6 +13941,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/mi.po b/editor/translations/mi.po
index 3a70aade1a..456d89671e 100644
--- a/editor/translations/mi.po
+++ b/editor/translations/mi.po
@@ -985,7 +985,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1614,13 +1614,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1990,7 +1990,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2468,6 +2468,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3091,6 +3115,10 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+msgid "Apply MeshInstance Transforms"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3331,6 +3359,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5371,6 +5403,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6269,7 +6311,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6853,6 +6899,14 @@ msgstr ""
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Center Node"
+msgstr ""
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7347,11 +7401,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7379,6 +7433,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7486,42 +7594,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7783,6 +7871,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7848,7 +7940,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11748,6 +11840,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12028,6 +12128,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12494,159 +12598,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12654,57 +12747,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12712,54 +12805,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12767,19 +12860,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13229,6 +13322,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13518,6 +13619,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13558,6 +13667,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/mk.po b/editor/translations/mk.po
index bf449381bb..26d14a75ba 100644
--- a/editor/translations/mk.po
+++ b/editor/translations/mk.po
@@ -992,7 +992,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1621,13 +1621,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1998,7 +1998,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2476,6 +2476,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3100,6 +3124,10 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+msgid "Apply MeshInstance Transforms"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3340,6 +3368,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5383,6 +5415,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6282,7 +6324,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6868,6 +6914,14 @@ msgstr "ПромеÑти Безиер Точка"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Center Node"
+msgstr ""
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7362,11 +7416,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7394,6 +7448,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7501,42 +7609,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7798,6 +7886,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7863,7 +7955,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11763,6 +11855,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12043,6 +12143,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12509,159 +12613,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12669,57 +12762,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12727,54 +12820,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12782,19 +12875,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13244,6 +13337,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13533,6 +13634,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13573,6 +13682,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/ml.po b/editor/translations/ml.po
index b0d3a5a8d7..b9f86d4cf2 100644
--- a/editor/translations/ml.po
+++ b/editor/translations/ml.po
@@ -997,7 +997,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1627,13 +1627,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2003,7 +2003,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2483,6 +2483,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3106,6 +3130,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "പരിവർതàµà´¤à´¨à´‚ ചലിപàµà´ªà´¿à´•àµà´•àµà´•"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3346,6 +3375,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5390,6 +5423,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6290,7 +6333,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6876,6 +6923,14 @@ msgstr "ബെസിയർ ബിനàµà´¦àµ നീകàµà´•àµà´•"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Center Node"
+msgstr ""
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7370,11 +7425,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7402,6 +7457,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7509,42 +7618,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7806,6 +7895,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7871,7 +7964,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11772,6 +11865,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12052,6 +12153,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12520,159 +12625,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12680,57 +12774,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12738,54 +12832,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12793,19 +12887,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13255,6 +13349,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13544,6 +13646,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13584,6 +13694,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/mr.po b/editor/translations/mr.po
index af59635c8a..e305a8b937 100644
--- a/editor/translations/mr.po
+++ b/editor/translations/mr.po
@@ -993,7 +993,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1622,13 +1622,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1998,7 +1998,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2476,6 +2476,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3100,6 +3124,10 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+msgid "Apply MeshInstance Transforms"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3340,6 +3368,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5380,6 +5412,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6281,7 +6323,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6865,6 +6911,15 @@ msgstr ""
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "नोड हलवा"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7359,11 +7414,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7391,6 +7446,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7499,42 +7608,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7796,6 +7885,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7861,7 +7954,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11765,6 +11858,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12045,6 +12146,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12512,159 +12617,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12672,57 +12766,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12730,54 +12824,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12785,19 +12879,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13247,6 +13341,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13536,6 +13638,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13576,6 +13686,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/ms.po b/editor/translations/ms.po
index 5fd2547bcb..ca77c01937 100644
--- a/editor/translations/ms.po
+++ b/editor/translations/ms.po
@@ -14,7 +14,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-08-02 02:00+0000\n"
+"PO-Revision-Date: 2021-08-22 22:46+0000\n"
"Last-Translator: Keviindran Ramachandran <keviinx@yahoo.com>\n"
"Language-Team: Malay <https://hosted.weblate.org/projects/godot-engine/godot/"
"ms/>\n"
@@ -23,7 +23,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.8.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -372,7 +372,7 @@ msgstr "Masukkan Anim"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
msgid "node '%s'"
-msgstr ""
+msgstr "nod '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
@@ -599,7 +599,7 @@ msgstr "Pergi ke Langkah Sebelumnya"
#: editor/animation_track_editor.cpp
msgid "Apply Reset"
-msgstr ""
+msgstr "Guna Set Semula"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -966,11 +966,11 @@ msgstr "Cipta %s Baru"
#: editor/create_dialog.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "No results for \"%s\"."
-msgstr ""
+msgstr "Tiada hasil untuk \"%s\"."
#: editor/create_dialog.cpp editor/property_selector.cpp
msgid "No description available for %s."
-msgstr ""
+msgstr "Tiada keterangan tersedia untuk %s."
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
@@ -1030,7 +1030,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Kebergantungan"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Sumber"
@@ -1274,11 +1274,11 @@ msgstr "%s (Sudah Wujud)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
-msgstr ""
+msgstr "Kandungan aset \"%s\" - fail-fail %d bercanggah dengan projek anda:"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - No files conflict with your project:"
-msgstr ""
+msgstr "Kandungan aset \"%s\" - Tiada fail-fail bercanggah dengan projek anda:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
@@ -1544,11 +1544,11 @@ msgstr "Tidak boleh menambahkan autoload:"
#: editor/editor_autoload_settings.cpp
msgid "%s is an invalid path. File does not exist."
-msgstr ""
+msgstr "%s adalah laluan yang tidak sah. Fail tidak wujud."
#: editor/editor_autoload_settings.cpp
msgid "%s is an invalid path. Not in resource path (res://)."
-msgstr ""
+msgstr "%s adalah laluan yang tidak sah. Tidak dalam laluan sumber (res://)."
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1573,7 +1573,7 @@ msgstr "Nama"
#: editor/editor_autoload_settings.cpp
msgid "Global Variable"
-msgstr ""
+msgstr "Pembolehubah Global"
#: editor/editor_data.cpp
msgid "Paste Params"
@@ -1697,13 +1697,13 @@ msgstr ""
"Aktifkan 'Import Pvrtc' dalam Tetapan Projek, atau nyahaktifkan 'Driver "
"Fallback Enabled'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Templat nyahpepijat tersuai tidak dijumpai."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1748,15 +1748,16 @@ msgstr "Import Dok"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
-msgstr ""
+msgstr "Membenarkan untuk melihat dan menyunting adegan 3D."
#: editor/editor_feature_profile.cpp
msgid "Allows to edit scripts using the integrated script editor."
msgstr ""
+"Membenarkan untuk menyunting skrip-skrip menggunakan editor skrip bersepadu."
#: editor/editor_feature_profile.cpp
msgid "Provides built-in access to the Asset Library."
-msgstr ""
+msgstr "Memberikan akses terbina dalam kepada Perpustakaan Aset."
#: editor/editor_feature_profile.cpp
msgid "Allows editing the node hierarchy in the Scene dock."
@@ -2088,7 +2089,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "Mengimport (Semula) Aset"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Atas"
@@ -2599,6 +2600,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Adegan semasa tidak disimpan. Masih buka?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Buat Asal"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Buat Semula"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Tidak dapat memuatkan semula adegan yang tidak pernah disimpan."
@@ -3290,6 +3317,11 @@ msgid "Merge With Existing"
msgstr "Gabung Dengan Sedia Ada"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim Ubah Perubahan"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Buka & Jalankan Skrip"
@@ -3547,6 +3579,10 @@ msgstr ""
"Sumber yang dipilih (%s) tidak sesuai dengan jenis yang diharapkan untuk "
"sifat ini (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Buat Unik"
@@ -5656,6 +5692,17 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Kumpulan"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6569,7 +6616,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7155,6 +7206,16 @@ msgstr "Masukkan Titik"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Kosongkan Transformasi"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Semua Pilihan"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7650,12 +7711,14 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Set Semula ke Lalai"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Tulis Ganti"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7682,6 +7745,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7795,42 +7912,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8095,6 +8192,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -8160,7 +8261,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12141,6 +12242,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12428,6 +12537,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Semua Pilihan"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12901,165 +13015,154 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Eksport..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Nyahpasang"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Mengambil maklumat cermin, sila tunggu..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Tidak dapat memulakan subproses!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Menjalankan Skrip Tersuai..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Tidak dapat mencipta folder."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13067,60 +13170,60 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Mengimbas Fail,\n"
"Sila Tunggu..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13128,56 +13231,56 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Kandungan Pakej:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Menyambung..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13185,21 +13288,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Tapis Fail-fail..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Tidak dapat memulakan subproses!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13653,6 +13756,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13942,6 +14053,14 @@ msgstr "Mesti menggunakan sambungan yang sah."
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13982,6 +14101,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/nb.po b/editor/translations/nb.po
index 02f32b055b..0b9333655f 100644
--- a/editor/translations/nb.po
+++ b/editor/translations/nb.po
@@ -14,7 +14,7 @@
# Byzantin <kasper-hoel@hotmail.com>, 2018.
# Hans-Marius Øverås <hansmariusoveras@gmail.com>, 2019.
# Revolution <revosw@gmail.com>, 2019.
-# Petter Reinholdtsen <pere-weblate@hungry.com>, 2019, 2020.
+# Petter Reinholdtsen <pere-weblate@hungry.com>, 2019, 2020, 2021.
# Patrick Sletvold <patricksletvold@hotmail.com>, 2021.
# Kristoffer <kskau93@gmail.com>, 2021.
# Lili Zoey <sayaks1@gmail.com>, 2021.
@@ -22,8 +22,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-05-29 13:49+0000\n"
-"Last-Translator: Lili Zoey <sayaks1@gmail.com>\n"
+"PO-Revision-Date: 2021-08-12 21:32+0000\n"
+"Last-Translator: Petter Reinholdtsen <pere-weblate@hungry.com>\n"
"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/godot-"
"engine/godot/nb_NO/>\n"
"Language: nb\n"
@@ -31,7 +31,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.7-dev\n"
+"X-Generator: Weblate 4.8-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -1054,7 +1054,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Avhengigheter"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Ressurs"
@@ -1739,13 +1739,13 @@ msgstr ""
"Aktiver 'Importer Etc' i Prosjektinnstillinger, eller deaktiver "
"'Drivertilbakefall Aktivert'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Tilpasset feilsøkingsmal ble ikke funnet."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1929,7 +1929,7 @@ msgstr "Gjeldende:"
#: editor/editor_feature_profile.cpp editor/editor_node.cpp
#: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp
msgid "Import"
-msgstr "Importer"
+msgstr "importer"
#: editor/editor_feature_profile.cpp editor/project_export.cpp
msgid "Export"
@@ -2149,7 +2149,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Re)Importerer Assets"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Topp"
@@ -2681,6 +2681,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Gjeldende scene er ikke lagret. Ã…pne likevel?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Angre"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Gjenta"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Kan ikke laste en scene som aldri ble lagret."
@@ -3380,6 +3406,11 @@ msgid "Merge With Existing"
msgstr "Slå sammen Med Eksisterende"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim Forandre Omforming"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Åpne & Kjør et Skript"
@@ -3643,6 +3674,10 @@ msgstr ""
"Den valgte ressursen (%s) svarer ikke til noen forventede verdier for denne "
"egenskapen (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Gjør Unik"
@@ -5891,6 +5926,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Endre CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Slett Valgte"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grupper"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6874,7 +6921,13 @@ msgid "Remove Selected Item"
msgstr "Fjern Valgte Element"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Importer fra Scene"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Importer fra Scene"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7491,6 +7544,16 @@ msgstr "Fjern Punkt"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Nullstill Transformasjon"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Lag Node"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -8011,12 +8074,14 @@ msgid "Skeleton2D"
msgstr "Singleton"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Last Standard"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Overskriv"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -8045,6 +8110,67 @@ msgid "Perspective"
msgstr "Perspektiv"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspektiv"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspektiv"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Venstre knapp"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspektiv"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Høyre knapp"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspektiv"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspektiv"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -8162,42 +8288,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Venstre"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Høyrevisning."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Høyre"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Frontvisning."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Front"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Bakvisning."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Bak"
-
-#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Align Transform with View"
msgstr "Høyrevisning"
@@ -8468,6 +8574,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Rediger Poly"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Innstillinger …"
@@ -8533,7 +8644,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12746,6 +12857,15 @@ msgstr "Fjern Funksjon"
msgid "Set Portal Point Position"
msgstr "Fjern Funksjon"
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Fjern Funksjon"
+
#: modules/csg/csg_gizmos.cpp
#, fuzzy
msgid "Change Cylinder Radius"
@@ -13048,6 +13168,11 @@ msgstr "Genererer Lyskart"
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Alle valg"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13554,166 +13679,155 @@ msgstr "Lim inn Noder"
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Velg enhet fra listen"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Eksporter"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Avinstaller"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Henter fillager, vennligst vent..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Kunne ikke starta subprosess!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Kjører Tilpasser Skript..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Kunne ikke opprette mappe."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid package name:"
msgstr "Ugyldig navn."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13721,63 +13835,63 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Gjennomgår filer,\n"
"Vent…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "Kunne ikke opprette mappe."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Legger til %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Eksporter"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13785,59 +13899,59 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "Kunne ikke endre project.godot i projsektstien."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "Kunne ikke opprette mappe."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Animasjonsverktøy"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Lager konturer..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "Kunne ikke opprette mappe."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13845,21 +13959,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Legger til %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Kunne ikke opprette mappe."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14327,6 +14441,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14621,6 +14743,14 @@ msgstr "MÃ¥ ha en gyldig filutvidelse."
msgid "Enable grid minimap."
msgstr "Aktiver Snap"
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14661,6 +14791,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14713,6 +14847,18 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr "Konstanter kan ikke endres."
+#~ msgid "Left"
+#~ msgstr "Venstre"
+
+#~ msgid "Right"
+#~ msgstr "Høyre"
+
+#~ msgid "Front"
+#~ msgstr "Front"
+
+#~ msgid "Rear"
+#~ msgstr "Bak"
+
#, fuzzy
#~ msgid "Package Contents:"
#~ msgstr "Innhold:"
diff --git a/editor/translations/nl.po b/editor/translations/nl.po
index 00f87ef79c..d588afb791 100644
--- a/editor/translations/nl.po
+++ b/editor/translations/nl.po
@@ -1072,7 +1072,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Afhankelijkheden"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Bron"
@@ -1734,13 +1734,13 @@ msgstr ""
"Schakel 'Import Pvrtc' in bij de Projectinstellingen, of schakel de optie "
"'Driver Fallback Enabled' uit."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Aangepast debug pakket niet gevonden."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2124,7 +2124,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "Bronnen (her)importeren"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Boven"
@@ -2637,6 +2637,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "De huidige scène is niet opgeslagen. Toch openen?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Ongedaan maken"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Opnieuw"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Een scène die nooit opgeslagen is kan niet opnieuw laden worden."
@@ -3325,6 +3351,11 @@ msgid "Merge With Existing"
msgstr "Met bestaande samenvoegen"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim Wijzig Transform"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Voer Een Script Uit"
@@ -3582,6 +3613,10 @@ msgstr ""
"De geselecteerde hulpbron (%s) komt niet overeen met het verwachte type van "
"deze eigenschap (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Maak Uniek"
@@ -5717,6 +5752,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "CanvasItem \"%s\" naar (%d, %d) verplaatsen"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Slot Geselecteerd"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Groepen"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6672,7 +6719,13 @@ msgid "Remove Selected Item"
msgstr "Geselecteerd element verwijderen"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Vanuit scène importeren"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Vanuit scène importeren"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7270,6 +7323,16 @@ msgstr "Telling Gegenereerde Punten:"
msgid "Flip Portal"
msgstr "Horizontaal omdraaien"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Transform wissen"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Knoop maken"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "AnimationTree heeft geen ingesteld pad naar een AnimationPlayer"
@@ -7771,12 +7834,14 @@ msgid "Skeleton2D"
msgstr "Skeleton2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Maak Rustpose (van Botten)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Botten in rusthouding zetten"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Botten in rusthouding zetten"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Overschrijven"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7803,6 +7868,71 @@ msgid "Perspective"
msgstr "Perspectief"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Orthogonaal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspectief"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Orthogonaal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspectief"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Orthogonaal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspectief"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Orthogonaal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Orthogonaal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspectief"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Orthogonaal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspectief"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Transformatie Afgebroken."
@@ -7921,42 +8051,22 @@ msgid "Bottom View."
msgstr "Onderaanzicht."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Onder"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Linkeraanzicht."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Links"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Rechteraanzicht."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Rechts"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Vooraanzicht."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Voor"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Achteraanzicht."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Achter"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Uitlijnen Transform met aanzicht"
@@ -8230,6 +8340,11 @@ msgid "View Portal Culling"
msgstr "Beeldvensterinstellingen"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Beeldvensterinstellingen"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Instellingen..."
@@ -8295,8 +8410,9 @@ msgid "Post"
msgstr "Post"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Naamloze gizmo"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Naamloos Project"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -12497,6 +12613,16 @@ msgstr "Zet Curve Punt Positie"
msgid "Set Portal Point Position"
msgstr "Zet Curve Punt Positie"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Wijzig Cylinder Vorm Radius"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Zet Curve In Positie"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "Wijzig Cylinder Straal"
@@ -12781,6 +12907,11 @@ msgstr "Lightmaps plotten"
msgid "Class name can't be a reserved keyword"
msgstr "Klassennaam kan geen gereserveerd sleutelwoord zijn"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Vul selectie"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Einde van innerlijke exception stack trace"
@@ -13270,75 +13401,75 @@ msgstr "Zoek VisualScript"
msgid "Get %s"
msgstr "Krijg %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Package naam ontbreekt."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Pakketsegmenten moeten een lengte ongelijk aan nul hebben."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
"Het karakter '%s' is niet toegestaan in Android application pakketnamen."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "Een getal kan niet het eerste teken zijn in een pakket segment."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
"Het karakter '%s' kan niet het eerste teken zijn in een pakket segment."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "De pakketnaam moet ten minste een '.' bevatten."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Selecteer apparaat uit de lijst"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Exporteer alles"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Verwijderen"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Aan het laden, even wachten a.u.b..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Kon het subproces niet opstarten!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Aangepast script uitvoeren ..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Map kon niet gemaakt worden."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "Het hulpmiddel 'apksigner' kon niet gevonden worden."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13346,64 +13477,64 @@ msgstr ""
"Geen Android bouwsjabloon geïnstalleerd in dit project. Vanuit het "
"projectmenu kan het geïnstalleerd worden."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr "Debug Keystore is niet ingesteld of aanwezig in de Editor Settings."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr "Release-Keystore is verkeerd ingesteld in de exportinstelingen."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"Een geldig Android SDK-pad moet in de Editorinstellingen ingesteld zijn."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "Ongeldig Android SDK-pad in Editorinstellingen."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "'platform-tools' map ontbreekt!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr "Controleer de opgegeven Android SDK map in de Editor instellingen."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "'build tools' map ontbreekt!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Ongeldige publieke sleutel voor APK -uitbreiding."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Ongeldige pakketnaam:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13411,37 +13542,22 @@ msgstr ""
"Ongeldige \"GodotPaymentV3\" module ingesloten in de projectinstelling "
"\"android/modules\" (veranderd in Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "\"Use Custom Build\" moet geactiveerd zijn om plugins te gebruiken."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Degrees Of Freedom\" is alleen geldig als \"Xr Mode\" op \"Oculus Mobile VR"
-"\" staat."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"Hand Tracking\" is alleen geldig als \"Xr Mode\" op \"Oculus Mobile VR\" "
"staat."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Focus Awareness\" is alleen geldig als \"Xr Mode\" op \"Oculus Mobile VR\" "
-"staat."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr "\"Export AAB\" is alleen geldig als \"Use Custom Build\" aan staat."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13449,58 +13565,58 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Bestanden aan het doornemen,\n"
"Wacht alstublieft..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "Kon template niet openen voor export:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "%s aan het toevoegen..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Exporteer alles"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
"Bestandsnaam niet toegestaan! Android App Bundle vereist een *.aab extensie."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "APK Expansion werkt niet samen met Android App Bundle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "Bestandsnaam niet toegestaan! Android APK vereist een *.apk extensie."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13508,7 +13624,7 @@ msgstr ""
"Geprobeerd met een eigen bouwsjabloon te bouwen, maar versie info ontbreekt. "
"Installeer alstublieft opnieuw vanuit het 'Project' menu."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13520,26 +13636,26 @@ msgstr ""
" Godot versie: %s\n"
"Herinstalleer Android build template vanuit het 'Project' menu."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "Kan project.godot niet bewerken in projectpad."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "Kon bestand niet schrijven:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Bouwen van Android Project (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13547,11 +13663,11 @@ msgstr ""
"Bouwen van Androidproject mislukt, bekijk de foutmelding in de uitvoer.\n"
"Zie anders Android bouwdocumentatie op docs.godotengine.org."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "Output verplaatsen"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13559,24 +13675,24 @@ msgstr ""
"Niet in staat om het export bestand te kopiëren en hernoemen. Controleer de "
"gradle project folder voor outputs."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Animatie niet gevonden: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Contouren aan het creëeren..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "Kon template niet openen voor export:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13584,21 +13700,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "%s aan het toevoegen..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Kon bestand niet schrijven:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14138,6 +14254,14 @@ msgstr ""
"NavigationMeshInstance moet een (klein)kind zijn van een Navigation-knoop om "
"navigatiegevens door te geven."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14465,6 +14589,14 @@ msgstr "Een geldige extensie moet gebruikt worden."
msgid "Enable grid minimap."
msgstr "Rasteroverzicht inschakelen."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14518,6 +14650,10 @@ msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
"De grootte van een Viewport moet groter zijn dan 0 om iets weer te geven."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14569,6 +14705,41 @@ msgstr "Toewijzing aan uniform."
msgid "Constants cannot be modified."
msgstr "Constanten kunnen niet worden aangepast."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Maak Rustpose (van Botten)"
+
+#~ msgid "Bottom"
+#~ msgstr "Onder"
+
+#~ msgid "Left"
+#~ msgstr "Links"
+
+#~ msgid "Right"
+#~ msgstr "Rechts"
+
+#~ msgid "Front"
+#~ msgstr "Voor"
+
+#~ msgid "Rear"
+#~ msgstr "Achter"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Naamloze gizmo"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Degrees Of Freedom\" is alleen geldig als \"Xr Mode\" op \"Oculus "
+#~ "Mobile VR\" staat."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Focus Awareness\" is alleen geldig als \"Xr Mode\" op \"Oculus Mobile VR"
+#~ "\" staat."
+
#~ msgid "Package Contents:"
#~ msgstr "Pakketinhoud:"
diff --git a/editor/translations/or.po b/editor/translations/or.po
index 8bee62f8d5..c1036fa702 100644
--- a/editor/translations/or.po
+++ b/editor/translations/or.po
@@ -991,7 +991,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1620,13 +1620,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1996,7 +1996,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2474,6 +2474,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3097,6 +3121,10 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+msgid "Apply MeshInstance Transforms"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3337,6 +3365,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5377,6 +5409,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6275,7 +6317,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6859,6 +6905,14 @@ msgstr ""
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Center Node"
+msgstr ""
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7353,11 +7407,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7385,6 +7439,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7492,42 +7600,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7789,6 +7877,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7854,7 +7946,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11754,6 +11846,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12034,6 +12134,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12500,159 +12604,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12660,57 +12753,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12718,54 +12811,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12773,19 +12866,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13235,6 +13328,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13524,6 +13625,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13564,6 +13673,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/pl.po b/editor/translations/pl.po
index 24ad379ad0..7a5a0eb037 100644
--- a/editor/translations/pl.po
+++ b/editor/translations/pl.po
@@ -48,11 +48,12 @@
# gnu-ewm <gnu.ewm@protonmail.com>, 2021.
# vrid <patryksoon@live.com>, 2021.
# Suchy Talerz <kacperkubis06@gmail.com>, 2021.
+# Bartosz Stasiak <bs97086@amu.edu.pl>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-07-29 21:48+0000\n"
+"PO-Revision-Date: 2021-09-15 00:46+0000\n"
"Last-Translator: Tomek <kobewi4e@gmail.com>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/"
"godot/pl/>\n"
@@ -62,7 +63,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.7.2-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -411,15 +412,13 @@ msgstr "Wstaw animacjÄ™"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "Nie można otworzyć '%s'."
+msgstr "węzeł \"%s\""
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "Animacja"
+msgstr "animacja"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -428,9 +427,8 @@ msgstr ""
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "Właściwość \"%s\" nie istnieje."
+msgstr "właściwość \"%s\""
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -639,9 +637,8 @@ msgid "Go to Previous Step"
msgstr "Przejdź do poprzedniego kroku"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Apply Reset"
-msgstr "Resetuj"
+msgstr "Zastosuj reset"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -660,9 +657,8 @@ msgid "Use Bezier Curves"
msgstr "Użyj krzywych Beziera"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Create RESET Track(s)"
-msgstr "Wklej ścieżki"
+msgstr "Utwórz ścieżki RESET"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -986,7 +982,6 @@ msgid "Edit..."
msgstr "Edytuj..."
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Go to Method"
msgstr "Idź do metody"
@@ -1008,7 +1003,7 @@ msgstr "Brak wyników dla \"%s\"."
#: editor/create_dialog.cpp editor/property_selector.cpp
msgid "No description available for %s."
-msgstr ""
+msgstr "Brak dostępnego opisu dla %s."
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
@@ -1068,7 +1063,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Zależności"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Zasoby"
@@ -1108,17 +1103,16 @@ msgid "Owners Of:"
msgstr "Właściciele:"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"Remove the selected files from the project? (Cannot be undone.)\n"
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
"Usunąć wybrane pliki z projektu? (nie można tego cofnąć)\n"
-"Możesz znaleźć usunięte pliki w systemowym koszu, by je przywrócić."
+"W zależności od konfiguracji systemu plików, te pliki zostaną przeniesione "
+"do kosza albo usunięte na stałe."
#: editor/dependency_editor.cpp
-#, fuzzy
msgid ""
"The files being removed are required by other resources in order for them to "
"work.\n"
@@ -1128,7 +1122,8 @@ msgid ""
msgstr ""
"Usuwane pliki są wymagane przez inne zasoby, żeby mogły one działać.\n"
"Usunąć mimo to? (nie można tego cofnąć)\n"
-"Możesz znaleźć usunięte pliki w systemowym koszu, by je przywrócić."
+"W zależności od konfiguracji systemu plików, te pliki zostaną przeniesione "
+"do kosza albo usunięte na stałe."
#: editor/dependency_editor.cpp
msgid "Cannot remove:"
@@ -1298,41 +1293,37 @@ msgid "Licenses"
msgstr "Licencje"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Error opening asset file for \"%s\" (not in ZIP format)."
-msgstr "Błąd otwierania pliku pakietu (nie jest w formacie ZIP)."
+msgstr "Błąd otwierania pliku zasobu dla \"%s\" (nie jest w formacie ZIP)."
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "%s (already exists)"
msgstr "%s (już istnieje)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
-msgstr ""
+msgstr "Zawartość zasobu \"%s\" - %d plik(ów) konfliktuje z twoim projektem:"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - No files conflict with your project:"
msgstr ""
+"Zawartość zasobu \"%s\" - Żaden plik nie konfliktuje z twoim projektem:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
msgstr "Dekompresja zasobów"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "The following files failed extraction from asset \"%s\":"
-msgstr "Nie powiodło się wypakowanie z pakietu następujących plików:"
+msgstr "Nie powiodło się wypakowanie następujących plików z zasobu \"%s\":"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "(and %s more files)"
-msgstr "I jeszcze %s plików."
+msgstr "(i jeszcze %s plików)"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset \"%s\" installed successfully!"
-msgstr "Pakiet zainstalowano poprawnie!"
+msgstr "Zasób \"%s\" zainstalowany pomyślnie!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -1344,9 +1335,8 @@ msgid "Install"
msgstr "Zainstaluj"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Asset Installer"
-msgstr "Instalator pakietu"
+msgstr "Instalator zasobu"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
@@ -1409,7 +1399,6 @@ msgid "Bypass"
msgstr "Omiń"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Bus Options"
msgstr "Opcje magistrali"
@@ -1577,13 +1566,12 @@ msgid "Can't add autoload:"
msgstr "Nie można dodać Autoload:"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "%s is an invalid path. File does not exist."
-msgstr "Plik nie istnieje."
+msgstr "Ścieżka %s jest nieprawidłowa. Plik nie istnieje."
#: editor/editor_autoload_settings.cpp
msgid "%s is an invalid path. Not in resource path (res://)."
-msgstr ""
+msgstr "%s jest nieprawidłową ścieżką. Nie jest ścieżką zasobu (res://)."
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1607,9 +1595,8 @@ msgid "Name"
msgstr "Nazwa"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Global Variable"
-msgstr "Zmienna"
+msgstr "Zmienna globalna"
#: editor/editor_data.cpp
msgid "Paste Params"
@@ -1733,13 +1720,13 @@ msgstr ""
"Włącz \"Import Pvrtc\" w Ustawieniach Projektu lub wyłącz \"Driver Fallback "
"Enabled\"."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Nie znaleziono własnego szablonu debugowania."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1783,48 +1770,50 @@ msgstr "Dok importowania"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
-msgstr ""
+msgstr "Pozwala wyświetlać i edytować sceny 3D."
#: editor/editor_feature_profile.cpp
msgid "Allows to edit scripts using the integrated script editor."
-msgstr ""
+msgstr "Pozwala edytować skrypty, z użyciem zintegrowanego edytora skryptów."
#: editor/editor_feature_profile.cpp
msgid "Provides built-in access to the Asset Library."
-msgstr ""
+msgstr "Zapewnia wbudowany dostęp do Biblioteki Zasobów."
#: editor/editor_feature_profile.cpp
msgid "Allows editing the node hierarchy in the Scene dock."
-msgstr ""
+msgstr "Pozwala edytować hierarchię węzłów w doku sceny."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to work with signals and groups of the node selected in the Scene "
"dock."
msgstr ""
+"Pozwala pracować z sygnałami i grupami węzłów zaznaczonych w doku sceny."
#: editor/editor_feature_profile.cpp
msgid "Allows to browse the local file system via a dedicated dock."
-msgstr ""
+msgstr "Pozwala przeglądać lokalny system plików używając dedykowanego doku."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to configure import settings for individual assets. Requires the "
"FileSystem dock to function."
msgstr ""
+"Pozwala konfigurować ustawienia importu dla indywidualnych zasobów. Wymaga "
+"doku systemu plików do funkcjonowania."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(current)"
-msgstr "(Bieżący)"
+msgstr "(bieżący)"
#: editor/editor_feature_profile.cpp
msgid "(none)"
-msgstr ""
+msgstr "(żaden)"
#: editor/editor_feature_profile.cpp
msgid "Remove currently selected profile, '%s'? Cannot be undone."
-msgstr ""
+msgstr "Usunąć aktualnie wybrany profil, \"%s\"? Nie można cofnąć."
#: editor/editor_feature_profile.cpp
msgid "Profile must be a valid filename and must not contain '.'"
@@ -1855,19 +1844,16 @@ msgid "Enable Contextual Editor"
msgstr "Włącz edytor kontekstowy"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Properties:"
-msgstr "Właściwości:"
+msgstr "Właściwości klasy:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Main Features:"
-msgstr "Funkcje"
+msgstr "Główne funkcjonalności:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Nodes and Classes:"
-msgstr "Włączone klasy:"
+msgstr "Węzły i klasy:"
#: editor/editor_feature_profile.cpp
msgid "File '%s' format is invalid, import aborted."
@@ -1885,7 +1871,6 @@ msgid "Error saving profile to path: '%s'."
msgstr "Błąd zapisywania profilu do ścieżki \"%s\"."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Reset to Default"
msgstr "Resetuj do domyślnych"
@@ -1894,14 +1879,12 @@ msgid "Current Profile:"
msgstr "Bieżący profil:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Create Profile"
-msgstr "Usuń profil"
+msgstr "Utwórz profil"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Remove Profile"
-msgstr "Usuń Kafelek"
+msgstr "Usuń profil"
#: editor/editor_feature_profile.cpp
msgid "Available Profiles:"
@@ -1921,18 +1904,17 @@ msgid "Export"
msgstr "Eksportuj"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Configure Selected Profile:"
-msgstr "Bieżący profil:"
+msgstr "Konfiguruj wybrany profil:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Extra Options:"
-msgstr "Opcje Tekstury"
+msgstr "Opcje dodatkowe:"
#: editor/editor_feature_profile.cpp
msgid "Create or import a profile to edit available classes and properties."
msgstr ""
+"Utwórz lub zaimportuj profil, by edytować dostępne klasy i właściwości."
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
@@ -1959,7 +1941,6 @@ msgid "Select Current Folder"
msgstr "Wybierz bieżący katalog"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "File exists, overwrite?"
msgstr "Plik istnieje, nadpisać?"
@@ -2120,7 +2101,7 @@ msgstr "Istnieje wiele importerów różnych typów dla pliku %s, import przerwa
msgid "(Re)Importing Assets"
msgstr "(Ponowne) importowanie zasobów"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Góra"
@@ -2357,6 +2338,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"Kręci się, gdy edytor się przerysowuje.\n"
+"Ciągła aktualizacja jest włączona, co zwiększa pobór mocy. Kliknij, by ją "
+"wyłączyć."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2593,13 +2577,16 @@ msgid ""
"The current scene has no root node, but %d modified external resource(s) "
"were saved anyway."
msgstr ""
+"Aktualna scena nie ma korzenia, ale %s zmodyfikowane zasoby zostały zapisane "
+"i tak."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"A root node is required to save the scene. You can add a root node using the "
"Scene tree dock."
-msgstr "Scena musi posiadać korzeń, by ją zapisać."
+msgstr ""
+"Scena musi posiadać korzeń, by ją zapisać. Możesz dodać węzeł korzenia "
+"używając doku drzewa sceny."
#: editor/editor_node.cpp
msgid "Save Scene As..."
@@ -2630,6 +2617,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Aktualna scena nie została zapisana. Otworzyć mimo to?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Cofnij"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Ponów"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Nie można przeładować sceny która nie została zapisana."
@@ -2981,9 +2994,8 @@ msgid "Orphan Resource Explorer..."
msgstr "Eksplorator osieroconych zasobów..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reload Current Project"
-msgstr "Zmień nazwę projektu"
+msgstr "Wczytaj ponownie aktualny projekt"
#: editor/editor_node.cpp
msgid "Quit to Project List"
@@ -3142,22 +3154,20 @@ msgid "Help"
msgstr "Pomoc"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Online Documentation"
-msgstr "Otwórz dokumentację"
+msgstr "Dokumentacja online"
#: editor/editor_node.cpp
msgid "Questions & Answers"
-msgstr ""
+msgstr "Pytania i odpowiedzi"
#: editor/editor_node.cpp
msgid "Report a Bug"
msgstr "Zgłoś błąd"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Suggest a Feature"
-msgstr "Ustaw Wartość"
+msgstr "Zasugeruj funkcjonalność"
#: editor/editor_node.cpp
msgid "Send Docs Feedback"
@@ -3168,9 +3178,8 @@ msgid "Community"
msgstr "Społeczność"
#: editor/editor_node.cpp
-#, fuzzy
msgid "About Godot"
-msgstr "O silniku"
+msgstr "O Godocie"
#: editor/editor_node.cpp
msgid "Support Godot Development"
@@ -3262,14 +3271,12 @@ msgid "Manage Templates"
msgstr "ZarzÄ…dzaj szablonami"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Install from file"
msgstr "Zainstaluj z pliku"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Select android sources file"
-msgstr "Wybierz siatkę źródłową:"
+msgstr "Wybierz pliki źródłowe Androida"
#: editor/editor_node.cpp
msgid ""
@@ -3317,6 +3324,11 @@ msgid "Merge With Existing"
msgstr "Połącz z Istniejącym"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Zmiana transformacji"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Otwórz i Uruchom Skrypt"
@@ -3351,9 +3363,8 @@ msgid "Select"
msgstr "Zaznacz"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Select Current"
-msgstr "Wybierz bieżący katalog"
+msgstr "Wybierz aktualnÄ…"
#: editor/editor_node.cpp
msgid "Open 2D Editor"
@@ -3388,9 +3399,8 @@ msgid "No sub-resources found."
msgstr "Nie znaleziono podzasobów."
#: editor/editor_path.cpp
-#, fuzzy
msgid "Open a list of sub-resources."
-msgstr "Nie znaleziono podzasobów."
+msgstr "Otwórz listę pod-zasobów."
#: editor/editor_plugin.cpp
msgid "Creating Mesh Previews"
@@ -3417,14 +3427,12 @@ msgid "Update"
msgstr "Odśwież"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Version"
-msgstr "Wersja:"
+msgstr "Wersja"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Author"
-msgstr "Autorzy"
+msgstr "Autor"
#: editor/editor_plugin_settings.cpp
#: editor/plugins/version_control_editor_plugin.cpp
@@ -3437,14 +3445,12 @@ msgid "Measure:"
msgstr "Zmierzono:"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Frame Time (ms)"
-msgstr "Czas klatki (sek)"
+msgstr "Czas klatki (ms)"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Average Time (ms)"
-msgstr "Åšredni czas (sek)"
+msgstr "Åšredni czas (ms)"
#: editor/editor_profiler.cpp
msgid "Frame %"
@@ -3471,6 +3477,12 @@ msgid ""
"functions called by that function.\n"
"Use this to find individual functions to optimize."
msgstr ""
+"Inkluzyjny: Zawiera czas z innych funkcji wywołanych przez tę funkcję.\n"
+"Użyj tego, by znaleźć wąskie gardła.\n"
+"\n"
+"Własny: Licz tylko czas spędzony w samej funkcji, bez funkcji wywołanych "
+"przez niÄ….\n"
+"Użyj tego, by znaleźć pojedyncze funkcje do optymalizacji."
#: editor/editor_profiler.cpp
msgid "Frame #:"
@@ -3573,6 +3585,10 @@ msgstr ""
"Wybrany zasób (%s) nie zgadza się z żadnym rodzajem przewidywanym dla tego "
"użycia (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Zrób unikalny"
@@ -3592,9 +3608,8 @@ msgid "Paste"
msgstr "Wklej"
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
-#, fuzzy
msgid "Convert to %s"
-msgstr "Konwersja do %s"
+msgstr "Konwertuj do %s"
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "New %s"
@@ -3643,10 +3658,9 @@ msgid "Did you forget the '_run' method?"
msgstr "Zapomniano metody \"_run\"?"
#: editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Hold %s to round to integers. Hold Shift for more precise changes."
msgstr ""
-"Przytrzyma Ctrl, by zaokrąglić do liczb całkowitych. Przytrzymaj Shift dla "
+"Przytrzymaj %s, by zaokrąglić do liczb całkowitych. Przytrzymaj Shift dla "
"bardziej precyzyjnych zmian."
#: editor/editor_sub_scene.cpp
@@ -3667,49 +3681,43 @@ msgstr "Zaimportuj z węzła:"
#: editor/export_template_manager.cpp
msgid "Open the folder containing these templates."
-msgstr ""
+msgstr "Otwórz folder zawierający te szablony."
#: editor/export_template_manager.cpp
msgid "Uninstall these templates."
-msgstr ""
+msgstr "Odinstaluj te szablony."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "There are no mirrors available."
-msgstr "Nie ma pliku \"%s\"."
+msgstr "Brak dostępnych mirrorów."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Retrieving the mirror list..."
-msgstr "Pobieranie informacji o serwerach lustrzanych, proszę czekać..."
+msgstr "Pobieranie listy mirrorów..."
#: editor/export_template_manager.cpp
msgid "Starting the download..."
-msgstr ""
+msgstr "Zaczynam pobieranie..."
#: editor/export_template_manager.cpp
msgid "Error requesting URL:"
msgstr "Błąd podczas żądania adresu URL:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Connecting to the mirror..."
-msgstr "ÅÄ…czenie z serwerem lustrzanym..."
+msgstr "ÅÄ…czenie z mirrorem..."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't resolve the requested address."
-msgstr "Nie udało się odnaleźć hosta:"
+msgstr "Nie udało się rozstrzygnąć żądanego adresu."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't connect to the mirror."
-msgstr "Nie można połączyć do hosta:"
+msgstr "Nie można połączyć z mirrorem."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No response from the mirror."
-msgstr "Brak odpowiedzi hosta:"
+msgstr "Brak odpowiedzi mirrora."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3717,18 +3725,16 @@ msgid "Request failed."
msgstr "Żądanie nie powiodło się."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Request ended up in a redirect loop."
-msgstr "Żądanie nieudane, zbyt dużo przekierowań"
+msgstr "Żądanie skończyło w pętli przekierowań."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Request failed:"
-msgstr "Żądanie nie powiodło się."
+msgstr "Żądanie nie powiodło się:"
#: editor/export_template_manager.cpp
msgid "Download complete; extracting templates..."
-msgstr ""
+msgstr "Pobieranie ukończone; rozpakowuję szablony..."
#: editor/export_template_manager.cpp
msgid "Cannot remove temporary file:"
@@ -3747,13 +3753,12 @@ msgid "Error getting the list of mirrors."
msgstr "Błąd odbierania listy mirrorów."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error parsing JSON with the list of mirrors. Please report this issue!"
-msgstr "Błąd parsowania JSONa listy mirrorów. Zgłoś proszę ten błąd!"
+msgstr "Błąd parsowania JSONa z listą mirrorów. Zgłoś proszę ten błąd!"
#: editor/export_template_manager.cpp
msgid "Best available mirror"
-msgstr ""
+msgstr "Najlepszy dostępny mirror"
#: editor/export_template_manager.cpp
msgid ""
@@ -3806,24 +3811,20 @@ msgid "SSL Handshake Error"
msgstr "Błąd podczas wymiany (handshake) SSL"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't open the export templates file."
-msgstr "Nie można otworzyć pliku zip szablonów eksportu."
+msgstr "Nie można otworzyć pliku szablonów eksportu."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Invalid version.txt format inside the export templates file: %s."
-msgstr "Nieprawidłowy format pliku version.txt w szablonach: %s."
+msgstr "Nieprawidłowy format version.txt w pliku szablonów eksportu: %s."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No version.txt found inside the export templates file."
-msgstr "Nie znaleziono pliku version.txt w szablonach."
+msgstr "Nie znaleziono version.txt w pliku szablonu eksportu."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for extracting templates:"
-msgstr "Błąd tworzenia ścieżki dla szablonów:"
+msgstr "Błąd tworzenia ścieżki do rozpakowania szablonów:"
#: editor/export_template_manager.cpp
msgid "Extracting Export Templates"
@@ -3834,9 +3835,8 @@ msgid "Importing:"
msgstr "Importowanie:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Remove templates for the version '%s'?"
-msgstr "Usunąć wersję \"%s\" szablonu?"
+msgstr "Usunąć szablony dla wersji \"%s\"?"
#: editor/export_template_manager.cpp
msgid "Uncompressing Android Build Sources"
@@ -3852,54 +3852,51 @@ msgstr "Aktualna wersja:"
#: editor/export_template_manager.cpp
msgid "Export templates are missing. Download them or install from a file."
-msgstr ""
+msgstr "Brakuje szablonów eksportu. Pobierz je lub zainstaluj z pliku."
#: editor/export_template_manager.cpp
msgid "Export templates are installed and ready to be used."
-msgstr ""
+msgstr "Szablony eksportu są zainstalowane i gotowe do użycia."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open Folder"
-msgstr "Otwórz plik"
+msgstr "Otwórz folder"
#: editor/export_template_manager.cpp
msgid "Open the folder containing installed templates for the current version."
-msgstr ""
+msgstr "Otwórz folder zawierający zainstalowane szablony dla aktualnej wersji."
#: editor/export_template_manager.cpp
msgid "Uninstall"
msgstr "Odinstaluj"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uninstall templates for the current version."
-msgstr "Początkowa wartość dla licznika"
+msgstr "Odinstaluj szablony dla aktualnej wersji."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Download from:"
-msgstr "Błąd pobierania"
+msgstr "Pobierz z:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "Uruchom w przeglÄ…darce"
+msgstr "Otwórz w przeglądarce"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "Kopiuj błąd"
+msgstr "Kopiuj URL mirrora"
#: editor/export_template_manager.cpp
msgid "Download and Install"
-msgstr ""
+msgstr "Pobierz i zainstaluj"
#: editor/export_template_manager.cpp
msgid ""
"Download and install templates for the current version from the best "
"possible mirror."
msgstr ""
+"Pobierz i zainstaluj szablony dla aktualnej wersji z najlepszego dostępnego "
+"mirroru."
#: editor/export_template_manager.cpp
msgid "Official export templates aren't available for development builds."
@@ -3908,14 +3905,12 @@ msgstr ""
"programistycznych."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install from File"
msgstr "Zainstaluj z pliku"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install templates from a local file."
-msgstr "Zaimportuj Szablony z pliku ZIP"
+msgstr "Zainstaluj szablony z lokalnego pliku."
#: editor/export_template_manager.cpp editor/find_in_files.cpp
#: editor/progress_dialog.cpp scene/gui/dialogs.cpp
@@ -3923,19 +3918,16 @@ msgid "Cancel"
msgstr "Anuluj"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Cancel the download of the templates."
-msgstr "Nie można otworzyć pliku zip szablonów eksportu."
+msgstr "Anuluj pobieranie szablonów."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Other Installed Versions:"
-msgstr "Zainstalowane szablony:"
+msgstr "Inne zainstalowane wersje:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uninstall Template"
-msgstr "Odinstaluj"
+msgstr "Odinstaluj szablon"
#: editor/export_template_manager.cpp
msgid "Select Template File"
@@ -3950,6 +3942,8 @@ msgid ""
"The templates will continue to download.\n"
"You may experience a short editor freeze when they finish."
msgstr ""
+"Szablony kontynuujÄ… pobieranie.\n"
+"Możesz doświadczyć krótkiego zacięcia edytora, kiedy skończą."
#: editor/filesystem_dock.cpp
msgid "Favorites"
@@ -4097,35 +4091,32 @@ msgid "Collapse All"
msgstr "Zwiń wszystko"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort files"
-msgstr "Przeszukaj pliki"
+msgstr "Sortuj pliki"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Ascending)"
-msgstr ""
+msgstr "Sortuj po nazwie (rosnÄ…co)"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Descending)"
-msgstr ""
+msgstr "Sortuj po nazwie (malejÄ…co)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Ascending)"
-msgstr ""
+msgstr "Sortuj po typie (rosnÄ…co)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Descending)"
-msgstr ""
+msgstr "Sortuj po typie (malejÄ…co)"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort by Last Modified"
-msgstr "Data modyfikacji"
+msgstr "Ostatnie zmodyfikowane"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort by First Modified"
-msgstr "Data modyfikacji"
+msgstr "Pierwsze zmodyfikowane"
#: editor/filesystem_dock.cpp
msgid "Duplicate..."
@@ -4137,7 +4128,7 @@ msgstr "Zmień nazwę..."
#: editor/filesystem_dock.cpp
msgid "Focus the search box"
-msgstr ""
+msgstr "Przełącz na pasek wyszukiwania"
#: editor/filesystem_dock.cpp
msgid "Previous Folder/File"
@@ -4447,14 +4438,12 @@ msgid "Failed to load resource."
msgstr "Nie udało się wczytać zasobu."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Copy Properties"
-msgstr "Właściwości"
+msgstr "Skopiuj właściwości"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Paste Properties"
-msgstr "Właściwości"
+msgstr "Wklej właściwości"
#: editor/inspector_dock.cpp
msgid "Make Sub-Resources Unique"
@@ -4479,23 +4468,20 @@ msgid "Save As..."
msgstr "Zapisz jako..."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Extra resource options."
-msgstr "Nie znaleziono w ścieżce zasobów."
+msgstr "Dodatkowe opcje zasobów."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Edit Resource from Clipboard"
-msgstr "Edytuj schowek zasobów"
+msgstr "Edytuj zasób ze schowka"
#: editor/inspector_dock.cpp
msgid "Copy Resource"
msgstr "Kopiuj zasób"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Make Resource Built-In"
-msgstr "Stwórz wbudowany"
+msgstr "Uczyń zasób wbudowanym"
#: editor/inspector_dock.cpp
msgid "Go to the previous edited object in history."
@@ -4510,9 +4496,8 @@ msgid "History of recently edited objects."
msgstr "Historia ostatnio edytowanych obiektów."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Open documentation for this object."
-msgstr "Otwórz dokumentację"
+msgstr "Otwórz dokumentację dla tego obiektu."
#: editor/inspector_dock.cpp editor/scene_tree_dock.cpp
msgid "Open Documentation"
@@ -4523,9 +4508,8 @@ msgid "Filter properties"
msgstr "Filtruj właściwości"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Manage object properties."
-msgstr "Właściwości obiektu."
+msgstr "Zarządzaj właściwościami obiektu."
#: editor/inspector_dock.cpp
msgid "Changes may be lost!"
@@ -4770,9 +4754,8 @@ msgid "Blend:"
msgstr "Mieszanie:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Parameter Changed:"
-msgstr "Parametr zmieniony"
+msgstr "Parametr zmieniony:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -5503,11 +5486,11 @@ msgstr "Wszystko"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search templates, projects, and demos"
-msgstr ""
+msgstr "Przeszukaj szablony, projekty i dema"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search assets (excluding templates, projects, and demos)"
-msgstr ""
+msgstr "Przeszukaj zasoby (bez szablonów, projektów i dem)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Import..."
@@ -5551,7 +5534,7 @@ msgstr "Plik ZIP assetów"
#: editor/plugins/audio_stream_editor_plugin.cpp
msgid "Audio Preview Play/Pause"
-msgstr ""
+msgstr "Graj/Pauzuj podglÄ…d audio"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5710,6 +5693,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Przesuń CanvasItem \"%s\" na (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Zablokuj wybrane"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grupa"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -5812,13 +5807,12 @@ msgstr "Zmień zakotwiczenie"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid ""
"Project Camera Override\n"
"Overrides the running project's camera with the editor viewport camera."
msgstr ""
"Przejmij kamerÄ™ gry\n"
-"Zastępuje kamerę gry kamerą z widoku edytora."
+"Nadpisuje kamerÄ™ uruchomionego projektu kamerÄ… z widoku edytora."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5827,6 +5821,9 @@ msgid ""
"No project instance running. Run the project from the editor to use this "
"feature."
msgstr ""
+"Przejmij kamerÄ™ gry\n"
+"Nie ma uruchomionej instancji projektu. Uruchom projekt z edytora, by użyć "
+"tej funkcjonalności."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5894,31 +5891,27 @@ msgstr "Tryb zaznaczenia"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Drag: Rotate selected node around pivot."
-msgstr "Usuń zaznaczony węzeł lub przejście."
+msgstr "Przeciągnij: Obróć zaznaczony węzeł wokół osi obrotu."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Alt+Drag: Move selected node."
-msgstr "Alt+Przeciągnij: Przesuń"
+msgstr "Alt+Przeciągnij: Przesuń zaznaczony węzeł."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "V: Set selected node's pivot position."
-msgstr "Usuń zaznaczony węzeł lub przejście."
+msgstr "V: Ustaw pozycję osi obrotu zaznaczonego węzła."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Alt+RMB: Show list of all nodes at position clicked, including locked."
msgstr ""
-"Pokaż listę obiektów w miejscu kliknięcia\n"
-"(tak samo jak Alt+RMB w trybie zaznaczania)."
+"Alt+PPM: Pokaż listę wszystkich węzłów na klikniętej pozycji, wliczając "
+"zablokowane."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "RMB: Add node at position clicked."
-msgstr ""
+msgstr "Ctrl+PPM: Dodaj węzeł na klikniętej pozycji."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5990,7 +5983,7 @@ msgstr "Przyciągaj względnie"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Pixel Snap"
-msgstr "Użyj krokowania na poziomie pikseli"
+msgstr "PrzyciÄ…gaj do pikseli"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Smart Snapping"
@@ -6156,14 +6149,12 @@ msgid "Clear Pose"
msgstr "Wyczyść pozę"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Add Node Here"
-msgstr "Dodaj węzeł"
+msgstr "Dodaj węzeł tutaj"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Instance Scene Here"
-msgstr "Dodaj instancjÄ™ sceny"
+msgstr "Instancjonuj scenÄ™ tutaj"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
@@ -6179,49 +6170,43 @@ msgstr "Przesuń widok"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 3.125%"
-msgstr ""
+msgstr "Oddal do 3.125%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 6.25%"
-msgstr ""
+msgstr "Oddal do 6.25%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 12.5%"
-msgstr ""
+msgstr "Oddal do 12.5%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 25%"
-msgstr "Oddal"
+msgstr "Oddal do 25%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 50%"
-msgstr "Oddal"
+msgstr "Oddal do 50%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 100%"
-msgstr "Oddal"
+msgstr "Przybliż do 100%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 200%"
-msgstr "Oddal"
+msgstr "Przybliż do 200%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 400%"
-msgstr "Oddal"
+msgstr "Przybliż do 400%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 800%"
-msgstr "Oddal"
+msgstr "Przybliż do 800%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 1600%"
-msgstr ""
+msgstr "Przybliż do 1600%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
@@ -6468,9 +6453,8 @@ msgid "Couldn't create a single convex collision shape."
msgstr "Nie udało się utworzyć pojedynczego wypukłego kształtu kolizji."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Shape"
-msgstr "Utwórz pojedynczy wypukły kształt"
+msgstr "Utwórz uproszczony wypukły kształt"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Single Convex Shape"
@@ -6506,9 +6490,8 @@ msgid "No mesh to debug."
msgstr "Brak siatki do debugowania."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Mesh has no UV in layer %d."
-msgstr "Model nie posiada UV w tej warstwie"
+msgstr "Siatka nie posiada UV na warstwie %d."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "MeshInstance lacks a Mesh!"
@@ -6573,9 +6556,8 @@ msgstr ""
"To jest najszybsza (ale najmniej dokładna) opcja dla detekcji kolizji."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Collision Sibling"
-msgstr "Utwórz pojedynczego wypukłego sąsiada kolizji"
+msgstr "Utwórz uproszczonego wypukłego sąsiada kolizji"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6583,20 +6565,23 @@ msgid ""
"This is similar to single collision shape, but can result in a simpler "
"geometry in some cases, at the cost of accuracy."
msgstr ""
+"Tworzy uproszczony wypukły kształt kolizji.\n"
+"Podobne do pojedynczego kształtu, ale w niektórych przypadkach tworzy "
+"prostszą geometrię, kosztem dokładności."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Multiple Convex Collision Siblings"
msgstr "Utwórz wiele wypukłych sąsiadów kolizji"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between a single convex collision and a "
"polygon-based collision."
msgstr ""
"Tworzy kształt kolizji oparty o wielokąty.\n"
-"To jest złoty środek względem wydajności powyższych dwóch opcji."
+"To jest złoty środek względem wydajności pomiędzy pojedynczym kształtem, a "
+"kolizjÄ… opartÄ… o wielokÄ…ty."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -6663,7 +6648,13 @@ msgid "Remove Selected Item"
msgstr "Usuń zaznaczony element"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Import ze sceny"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Import ze sceny"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7238,24 +7229,30 @@ msgid "ResourcePreloader"
msgstr "Wstępny ładowacz zasobów"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portals"
-msgstr "Odbij poziomo"
+msgstr "Odbij portale"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Room Generate Points"
-msgstr "Wygeneruj chmurę punktów:"
+msgstr "Wygeneruj punkty pokoju"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Generate Points"
-msgstr "Wygeneruj chmurę punktów:"
+msgstr "Wygeneruj punkty"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portal"
-msgstr "Odbij poziomo"
+msgstr "Odbij portal"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Wyczyść przekształcenie"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Utwórz węzeł"
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
@@ -7760,12 +7757,14 @@ msgid "Skeleton2D"
msgstr "Szkielet 2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Utwórz pozę spoczynkową (z kości)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Ustaw kości do pozy spoczynkowej"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Ustaw kości do pozy spoczynkowej"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Nadpisz"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7792,6 +7791,71 @@ msgid "Perspective"
msgstr "Perspektywa"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ortogonalna"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspektywa"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ortogonalna"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspektywa"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ortogonalna"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspektywa"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ortogonalna"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ortogonalna"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspektywa"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ortogonalna"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspektywa"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Transformacja Zaniechana."
@@ -7818,20 +7882,17 @@ msgid "None"
msgstr "Brak"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Rotate"
-msgstr "Status:"
+msgstr "Obróć"
#. TRANSLATORS: This refers to the movement that changes the position of an object.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translate"
-msgstr "Przesuń:"
+msgstr "Przesuń"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scale"
-msgstr "Skala:"
+msgstr "Skaluj"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scaling: "
@@ -7854,52 +7915,44 @@ msgid "Animation Key Inserted."
msgstr "Wstawiono klucz animacji."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Pitch:"
-msgstr "Wysokość"
+msgstr "Pułap:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Yaw:"
-msgstr ""
+msgstr "Odchylenie:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Size:"
-msgstr "Rozmiar: "
+msgstr "Rozmiar:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Objects Drawn:"
-msgstr "Narysowane obiekty"
+msgstr "Narysowane obiekty:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Material Changes:"
-msgstr "Zmiany materiału"
+msgstr "Zmiany materiału:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Shader Changes:"
-msgstr "Zmiany Shadera"
+msgstr "Zmiany shadera:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes:"
-msgstr "Zmiany powierzchni"
+msgstr "Zmiany powierzchni:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Draw Calls:"
-msgstr "Wywołania rysowania"
+msgstr "Wywołania rysowania:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices:"
-msgstr "Wierzchołki"
+msgstr "Wierzchołki:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "FPS: %d (%s ms)"
-msgstr ""
+msgstr "FPS: %d (%s ms)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
@@ -7910,42 +7963,22 @@ msgid "Bottom View."
msgstr "Widok z dołu."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Dół"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Widok z lewej."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Lewa"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Widok z prawej."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Prawa"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Widok z przodu."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Przód"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Widok z tyłu."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Tył"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Dopasuj położenie do widoku"
@@ -8054,9 +8087,8 @@ msgid "Freelook Slow Modifier"
msgstr "Wolny modyfikator swobodnego widoku"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Camera Preview"
-msgstr "Zmień rozmiar kamery"
+msgstr "Przełącz podgląd kamery"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
@@ -8078,9 +8110,8 @@ msgstr ""
"Nie może być używana jako miarodajny wskaźnik wydajności w grze."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Convert Rooms"
-msgstr "Konwersja do %s"
+msgstr "Konwertuj pokoje"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
@@ -8102,7 +8133,6 @@ msgstr ""
"powierzchnie (\"x-ray\")."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Snap Nodes to Floor"
msgstr "Przyciągnij węzły do podłogi"
@@ -8120,7 +8150,7 @@ msgstr "Użyj przyciągania"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Converts rooms for portal culling."
-msgstr ""
+msgstr "Konwertuje pokoje do cullingu portali."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom View"
@@ -8216,9 +8246,13 @@ msgid "View Grid"
msgstr "Pokaż siatkę"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Portal Culling"
-msgstr "Ustawienia widoku"
+msgstr "Culling portali widoku"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Culling portali widoku"
#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
@@ -8286,8 +8320,9 @@ msgid "Post"
msgstr "Po"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Uchwyt bez nazwy"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Projekt bez nazwy"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8364,7 +8399,7 @@ msgstr "Utwórz równorzędny węzeł LightOccluder2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Sprite"
-msgstr "Postać"
+msgstr "Sprite"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Simplification: "
@@ -8539,221 +8574,196 @@ msgid "TextureRegion"
msgstr "Obszar tekstury"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Colors"
-msgstr "Kolor"
+msgstr "Kolory"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Fonts"
-msgstr "Font"
+msgstr "Fonty"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Icons"
-msgstr "Ikona"
+msgstr "Ikony"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Styleboxes"
-msgstr "StyleBox"
+msgstr "Styleboxy"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} color(s)"
-msgstr ""
+msgstr "{num} kolor(y)"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No colors found."
-msgstr "Nie znaleziono podzasobów."
+msgstr "Nie znaleziono kolorów."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "{num} constant(s)"
-msgstr "Stałe"
+msgstr "{num} stałych"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No constants found."
-msgstr "Stała koloru."
+msgstr "Nie znaleziono stałych."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} font(s)"
-msgstr ""
+msgstr "{num} czcionki"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No fonts found."
-msgstr "Nie znaleziono!"
+msgstr "Nie znaleziono czcionek."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} icon(s)"
-msgstr ""
+msgstr "{num} ikon"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No icons found."
-msgstr "Nie znaleziono!"
+msgstr "Nie znaleziono ikon."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} stylebox(es)"
-msgstr ""
+msgstr "{num} stylebox(y)"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No styleboxes found."
-msgstr "Nie znaleziono podzasobów."
+msgstr "Nie znaleziono styleboxów."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} currently selected"
-msgstr ""
+msgstr "{num} aktualnie wybrane"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Nothing was selected for the import."
-msgstr ""
+msgstr "Nic nie zostało wybrane do importu."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Importing Theme Items"
-msgstr "Zaimportuj motyw"
+msgstr "Importowanie elementów motywu"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Importing items {n}/{n}"
-msgstr ""
+msgstr "Importowanie elementów {n}/{n}"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Updating the editor"
-msgstr "Zamknąć edytor?"
+msgstr "Aktualizowanie edytora"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Finalizing"
-msgstr "Analizowanie"
+msgstr "Finalizowanie"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Filter:"
-msgstr "Filtr: "
+msgstr "Filtr:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "With Data"
-msgstr ""
+msgstr "z danymi"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select by data type:"
-msgstr "Wybierz węzeł"
+msgstr "Zaznacz po typie danych:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible color items."
-msgstr "Wybierz podział, by go usunąć."
+msgstr "Zaznacz wszystkie widoczne elementy kolorów."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible color items and their data."
-msgstr ""
+msgstr "Zaznacz wszystkie widoczne elementy kolorów oraz ich dane."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible color items."
-msgstr ""
+msgstr "Odznacz wszystkie widoczne elementy kolorów."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible constant items."
-msgstr "Najpierw wybierz ustawienie z listy!"
+msgstr "Zaznacz wszystkie widoczne elementy stałych."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible constant items and their data."
-msgstr ""
+msgstr "Zaznacz wszystkie widoczne elementy stałych i ich dane."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible constant items."
-msgstr ""
+msgstr "Odznacz wszystkie widoczne elementy stałych."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible font items."
-msgstr "Najpierw wybierz ustawienie z listy!"
+msgstr "Zaznacz wszystkie widoczne elementy czcionek."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible font items and their data."
-msgstr ""
+msgstr "Zaznacz wszystkie widoczne elementy czcionek i ich dane."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible font items."
-msgstr ""
+msgstr "Odznacz wszystkie widoczne elementy czcionek."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible icon items."
-msgstr "Najpierw wybierz ustawienie z listy!"
+msgstr "Zaznacz wszystkie widoczne elementy ikon."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible icon items and their data."
-msgstr "Najpierw wybierz ustawienie z listy!"
+msgstr "Zaznacz wszystkie widoczne elementy ikon i ich dane."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Deselect all visible icon items."
-msgstr "Najpierw wybierz ustawienie z listy!"
+msgstr "Odznacz wszystkie widoczne elementy ikon."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items."
-msgstr ""
+msgstr "Zaznacz wszystkie widoczne elementy styleboxów."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items and their data."
-msgstr ""
+msgstr "Zaznacz wszystkie widoczne elementy styleboxów i ich dane."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible stylebox items."
-msgstr ""
+msgstr "Odznacz wszystkie widoczne elementy styleboxów."
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Caution: Adding icon data may considerably increase the size of your Theme "
"resource."
msgstr ""
+"Uwaga: Dodanie danych ikon może znacząco zwiększyć rozmiar twojego zasobu "
+"Theme."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Collapse types."
-msgstr "Zwiń wszystko"
+msgstr "Zwiń typy."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Expand types."
-msgstr "Rozwiń wszystko"
+msgstr "Rozwiń typy."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all Theme items."
-msgstr "Wybierz plik szablonu"
+msgstr "Zaznacz wszystkie elementy motywu."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select With Data"
-msgstr "Zaznacz Punkty"
+msgstr "Zaznacz z danymi"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all Theme items with item data."
-msgstr ""
+msgstr "Zaznacz wszystkie elementy motywu z ich danymi."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Deselect All"
-msgstr "Zaznacz wszystko"
+msgstr "Odznacz wszystko"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all Theme items."
-msgstr ""
+msgstr "Odznacz wszystkie elementy motywu."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Selected"
-msgstr "Importuj ScenÄ™"
+msgstr "Importuj zaznaczone"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -8761,283 +8771,250 @@ msgid ""
"closing this window.\n"
"Close anyway?"
msgstr ""
+"Zakładka importu elementów ma zaznaczone elementy. Zaznaczenie zostanie "
+"utracone po zamknięciu tego okna.\n"
+"Zamknąć tak czy inaczej?"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Select a theme type from the list to edit its items.\n"
"You can add a custom type or import a type with its items from another theme."
msgstr ""
+"Wybierz typ motywu z listy, aby edytować jego elementy.\n"
+"Możesz dodać niestandardowy typ lub importować typ wraz z jego elementami z "
+"innego motywu."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Color Items"
-msgstr "Usuń wszystkie elementy"
+msgstr "Usuń wszystkie elementy kolorów"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Item"
-msgstr "Usuń element"
+msgstr "Zmień nazwę elementu"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Constant Items"
-msgstr "Usuń wszystkie elementy"
+msgstr "Usuń wszystkie elementy stałych"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Font Items"
-msgstr "Usuń wszystkie elementy"
+msgstr "Usuń wszystkie elementy czcionek"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Icon Items"
-msgstr "Usuń wszystkie elementy"
+msgstr "Usuń wszystkie elementy ikon"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All StyleBox Items"
-msgstr "Usuń wszystkie elementy"
+msgstr "Usuń wszystkie elementy styleboxów"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"This theme type is empty.\n"
"Add more items to it manually or by importing from another theme."
msgstr ""
+"Ten motyw jest pusty.\n"
+"Dodaj więcej elementów ręcznie albo importując z innego motywu."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Color Item"
-msgstr "Dodaj klasę elementów"
+msgstr "Dodaj element koloru"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Constant Item"
-msgstr "Dodaj klasę elementów"
+msgstr "Dodaj element stałej"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Font Item"
-msgstr "Dodaj element"
+msgstr "Dodaj element czcionki"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Icon Item"
-msgstr "Dodaj element"
+msgstr "Dodaj element ikony"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Stylebox Item"
-msgstr "Dodaj wszystkie elementy"
+msgstr "Dodaj element stylebox"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Color Item"
-msgstr "Usuń elementy klasy"
+msgstr "Zmień nazwę elementu koloru"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Constant Item"
-msgstr "Usuń elementy klasy"
+msgstr "Zmień nazwę elementu stałej"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Font Item"
-msgstr "Zmień nazwę węzła"
+msgstr "Zmień nazwę elementu czcionki"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Icon Item"
-msgstr "Zmień nazwę węzła"
+msgstr "Zmień nazwę elementu ikony"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Stylebox Item"
-msgstr "Usuń zaznaczony element"
+msgstr "Zmień nazwę elementu stylebox"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Invalid file, not a Theme resource."
-msgstr "Plik niepoprawny, nie jest układem magistral audio."
+msgstr "Plik niepoprawny, nie jest zasobem motywu (Theme)."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Invalid file, same as the edited Theme resource."
-msgstr ""
+msgstr "Nieprawidłowy plik, taki sam jak edytowany zasób motywu."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Theme Items"
-msgstr "ZarzÄ…dzaj szablonami"
+msgstr "ZarzÄ…dzaj elementami motywu"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Edit Items"
-msgstr "Edytowalny element"
+msgstr "Edytuj elementy"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Types:"
-msgstr "Typ:"
+msgstr "Typy:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type:"
-msgstr "Typ:"
+msgstr "Dodaj typ:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item:"
-msgstr "Dodaj element"
+msgstr "Dodaj element:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add StyleBox Item"
-msgstr "Dodaj wszystkie elementy"
+msgstr "Dodaj element stylebox"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Items:"
-msgstr "Usuń element"
+msgstr "Usuń elementy:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Class Items"
msgstr "Usuń elementy klasy"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Items"
-msgstr "Usuń elementy klasy"
+msgstr "Usuń własne elementy"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Items"
msgstr "Usuń wszystkie elementy"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Theme Item"
-msgstr "Elementy motywu interfejsu"
+msgstr "Dodaj element motywu"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Old Name:"
-msgstr "Nazwa węzła:"
+msgstr "Stara nazwa:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Items"
-msgstr "Zaimportuj motyw"
+msgstr "Importuj elementy"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Theme"
-msgstr "Domyślny"
+msgstr "Domyślny motyw"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Editor Theme"
-msgstr "Edytuj motyw"
+msgstr "Motyw edytora"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select Another Theme Resource:"
-msgstr "Usuń zasób"
+msgstr "Wybierz inny zasób motywu:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Another Theme"
-msgstr "Zaimportuj motyw"
+msgstr "Inny motyw"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Confirm Item Rename"
-msgstr "Zmień nazwę ściezki animacji"
+msgstr "Potwierdź zmianę nazwy elementu"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Cancel Item Rename"
-msgstr "Grupowa zmiana nazwy"
+msgstr "Anuluj zmianÄ™ nazwy elementu"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override Item"
-msgstr "Nadpisuje"
+msgstr "Nadpisz element"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Unpin this StyleBox as a main style."
-msgstr ""
+msgstr "Odepnij ten StyleBox jako główny styl."
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Pin this StyleBox as a main style. Editing its properties will update the "
"same properties in all other StyleBoxes of this type."
msgstr ""
+"Przypnij ten StyleBox jako główny styl. Edytowanie jego właściwości "
+"zaktualizuje te same właściwości we wszystkich innych StyleBoxach tego typu."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type"
-msgstr "Typ"
+msgstr "Dodaj typ"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item Type"
-msgstr "Dodaj element"
+msgstr "Dodaj typ elementu"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Node Types:"
-msgstr "Typ węzła"
+msgstr "Typy węzłów:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Show Default"
-msgstr "Wczytaj domyślny"
+msgstr "Pokaż domyślne"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Show default type items alongside items that have been overridden."
-msgstr ""
+msgstr "Pokaż domyślne elementy typu obok elementów, które zostały nadpisane."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override All"
-msgstr "Nadpisuje"
+msgstr "Nadpisz wszystkie"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Override all default type items."
-msgstr ""
+msgstr "Nadpisz wszystkie domyślne elementy typu."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Theme:"
-msgstr "Motyw"
+msgstr "Motyw:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Items..."
-msgstr "ZarzÄ…dzaj szablonami eksportu..."
+msgstr "ZarzÄ…dzaj elementami..."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add, remove, organize and import Theme items."
-msgstr ""
+msgstr "Dodaj, usuń, organizuj i importuj elementy motywu (Theme)."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Preview"
-msgstr "PodglÄ…d"
+msgstr "Dodaj podglÄ…d"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Preview"
-msgstr "Odśwież podgląd"
+msgstr "Domyślny podgląd"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select UI Scene:"
-msgstr "Wybierz siatkę źródłową:"
+msgstr "Wybierz scenÄ™ UI:"
#: editor/plugins/theme_editor_preview.cpp
msgid ""
"Toggle the control picker, allowing to visually select control types for "
"edit."
msgstr ""
+"Przełącz pobieranie kontrolek, pozwalające na wizualne wybranie typów "
+"kontrolek do edytowania."
#: editor/plugins/theme_editor_preview.cpp
msgid "Toggle Button"
@@ -9072,9 +9049,8 @@ msgid "Checked Radio Item"
msgstr "Zaznaczony element opcji"
#: editor/plugins/theme_editor_preview.cpp
-#, fuzzy
msgid "Named Separator"
-msgstr "Nazwany sep."
+msgstr "Nazwany separator"
#: editor/plugins/theme_editor_preview.cpp
msgid "Submenu"
@@ -9127,19 +9103,21 @@ msgstr "Ma,Wiele,Opcji"
#: editor/plugins/theme_editor_preview.cpp
msgid "Invalid path, the PackedScene resource was probably moved or removed."
msgstr ""
+"Nieprawidłowa ścieżka, zasób PackedScene został prawdopodobnie przeniesiony "
+"lub usunięty."
#: editor/plugins/theme_editor_preview.cpp
msgid "Invalid PackedScene resource, must have a Control node at its root."
msgstr ""
+"Nieprawidłowy zasób PackedScene, musi posiadać węzeł Control jako korzeń."
#: editor/plugins/theme_editor_preview.cpp
-#, fuzzy
msgid "Invalid file, not a PackedScene resource."
-msgstr "Plik niepoprawny, nie jest układem magistral audio."
+msgstr "Nieprawidłowy plik, nie jest zasobem PackedScene."
#: editor/plugins/theme_editor_preview.cpp
msgid "Reload the scene to reflect its most actual state."
-msgstr ""
+msgstr "Przeładuj scenę, by odzwierciedlić jej najbardziej aktualny stan."
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase Selection"
@@ -10540,9 +10518,8 @@ msgid "VisualShader"
msgstr "Shader wizualny"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Edit Visual Property:"
-msgstr "Edytuj Wizualną Właściwość"
+msgstr "Edytuj wizualną właściwość:"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Visual Shader Mode Changed"
@@ -10667,9 +10644,8 @@ msgid "Script"
msgstr "Skrypt"
#: editor/project_export.cpp
-#, fuzzy
msgid "GDScript Export Mode:"
-msgstr "Tryb eksportu skryptów:"
+msgstr "Tryb eksportu GDScript:"
#: editor/project_export.cpp
msgid "Text"
@@ -10677,21 +10653,20 @@ msgstr "Tekst"
#: editor/project_export.cpp
msgid "Compiled Bytecode (Faster Loading)"
-msgstr ""
+msgstr "Skompilowany kod bajtowy (szybsze ładowanie)"
#: editor/project_export.cpp
msgid "Encrypted (Provide Key Below)"
msgstr "Zaszyfrowany (podaj klucz poniżej)"
#: editor/project_export.cpp
-#, fuzzy
msgid "Invalid Encryption Key (must be 64 hexadecimal characters long)"
-msgstr "Nieprawidłowy klucz szyfrowania (długość musi wynosić 64 znaki)"
+msgstr ""
+"Nieprawidłowy klucz szyfrowania (długość musi wynosić 64 znaki szesnastkowe)"
#: editor/project_export.cpp
-#, fuzzy
msgid "GDScript Encryption Key (256-bits as hexadecimal):"
-msgstr "Klucz szyfrujÄ…cy skryptu (256-bit jako hex):"
+msgstr "Klucz szyfrujący GDScript (256 bitów jako szesnastkowy):"
#: editor/project_export.cpp
msgid "Export PCK/Zip"
@@ -10764,7 +10739,6 @@ msgid "Imported Project"
msgstr "Zaimportowano projekt"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project name."
msgstr "Nieprawidłowa nazwa projektu."
@@ -10991,14 +10965,12 @@ msgid "Are you sure to run %d projects at once?"
msgstr "Czy na pewno chcesz uruchomić %d projektów na raz?"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove %d projects from the list?"
-msgstr "Wybierz urzÄ…dzenie z listy"
+msgstr "Usunąć %d projektów z listy?"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove this project from the list?"
-msgstr "Wybierz urzÄ…dzenie z listy"
+msgstr "Usunąć ten projekt z listy?"
#: editor/project_manager.cpp
msgid ""
@@ -11031,9 +11003,8 @@ msgid "Project Manager"
msgstr "Menedżer projektów"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Local Projects"
-msgstr "Projekty"
+msgstr "Lokalne projekty"
#: editor/project_manager.cpp
msgid "Loading, please wait..."
@@ -11044,23 +11015,20 @@ msgid "Last Modified"
msgstr "Data modyfikacji"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Edit Project"
-msgstr "Wyeksportuj projekt"
+msgstr "Edytuj projekt"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Run Project"
-msgstr "Zmień nazwę projektu"
+msgstr "Uruchom projekt"
#: editor/project_manager.cpp
msgid "Scan"
msgstr "Skanuj"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Scan Projects"
-msgstr "Projekty"
+msgstr "Skanuj projekty"
#: editor/project_manager.cpp
msgid "Select a Folder to Scan"
@@ -11071,14 +11039,12 @@ msgid "New Project"
msgstr "Nowy projekt"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Import Project"
-msgstr "Zaimportowano projekt"
+msgstr "Importuj projekt"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove Project"
-msgstr "Zmień nazwę projektu"
+msgstr "Usuń projekt"
#: editor/project_manager.cpp
msgid "Remove Missing"
@@ -11089,9 +11055,8 @@ msgid "About"
msgstr "O silniku"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Asset Library Projects"
-msgstr "Biblioteka zasobów"
+msgstr "Projekty Biblioteki Zasobów"
#: editor/project_manager.cpp
msgid "Restart Now"
@@ -11103,7 +11068,7 @@ msgstr "Usuń wszystkie"
#: editor/project_manager.cpp
msgid "Also delete project contents (no undo!)"
-msgstr ""
+msgstr "Usuń także projekt (nie można cofnąć!)"
#: editor/project_manager.cpp
msgid "Can't run project"
@@ -11118,20 +11083,17 @@ msgstr ""
"Czy chcesz zobaczyć oficjalne przykładowe projekty w Bibliotece Zasobów?"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Filter projects"
-msgstr "Filtruj właściwości"
+msgstr "Filtruj projekty"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"This field filters projects by name and last path component.\n"
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
-"Pasek wyszukiwania filtruje projekty po nazwie i ostatnim komponencie "
-"ścieżki.\n"
-"By filtrować po nazwie i pełnej ścieżce, zapytanie musi zawierać "
+"To pole filtruje projekty po nazwie i ostatniej składowej ścieżki.\n"
+"By filtrować projekty po nazwie i pełnej ścieżce, zapytanie musi zawierać "
"przynajmniej jeden znak \"/\"."
#: editor/project_settings_editor.cpp
@@ -11140,7 +11102,7 @@ msgstr "Klawisz "
#: editor/project_settings_editor.cpp
msgid "Physical Key"
-msgstr ""
+msgstr "Fizyczny klawisz"
#: editor/project_settings_editor.cpp
msgid "Joy Button"
@@ -11188,7 +11150,7 @@ msgstr "UrzÄ…dzenie"
#: editor/project_settings_editor.cpp
msgid " (Physical)"
-msgstr ""
+msgstr " (fizyczny)"
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key..."
@@ -11331,23 +11293,20 @@ msgid "Override for Feature"
msgstr "Nadpisanie dla cechy"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Add %d Translations"
-msgstr "Dodaj tłumaczenie"
+msgstr "Dodaj %d tłumaczeń"
#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "Usuń tłumaczenie"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Translation Resource Remap: Add %d Path(s)"
-msgstr "Dodaj mapowanie zasobu"
+msgstr "Przemapowanie tłumaczenia zasobu: Dodaj %d ścieżek"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Translation Resource Remap: Add %d Remap(s)"
-msgstr "Dodaj mapowanie zasobu"
+msgstr "Przemapowanie tłumaczenia zasobu: Dodaj %d przemapowań"
#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
@@ -11790,13 +11749,15 @@ msgstr "Usunąć węzeł \"%s\"?"
#: editor/scene_tree_dock.cpp
msgid ""
"Saving the branch as a scene requires having a scene open in the editor."
-msgstr ""
+msgstr "Zapisane gałęzi jako scena wymaga, aby scena była otwarta w edytorze."
#: editor/scene_tree_dock.cpp
msgid ""
"Saving the branch as a scene requires selecting only one node, but you have "
"selected %d nodes."
msgstr ""
+"Zapisanie gałęzi jako scena wymaga wybrania tylko jednego węzła, a masz "
+"wybrane %d węzłów."
#: editor/scene_tree_dock.cpp
msgid ""
@@ -11805,6 +11766,10 @@ msgid ""
"FileSystem dock context menu\n"
"or create an inherited scene using Scene > New Inherited Scene... instead."
msgstr ""
+"Nie można zapisać gałęzi z korzenia jako instancji sceny.\n"
+"By utworzyć edytowalną kopię aktualnej sceny, zduplikuj ją z menu "
+"kontekstowego doku systemu plików\n"
+"lub utwórz scenę dziedziczącą używając Scena > Nowa scena dziedzicząca..."
#: editor/scene_tree_dock.cpp
msgid ""
@@ -11812,6 +11777,9 @@ msgid ""
"To create a variation of a scene, you can make an inherited scene based on "
"the instanced scene using Scene > New Inherited Scene... instead."
msgstr ""
+"Nie można zapisać gałęzi instancji sceny.\n"
+"By utworzyć wariację sceny, zamiast tego możesz stworzyć scenę dziedziczącą "
+"bazowaną na instancji sceny, używając Scena -> Nowa scena dziedzicząca..."
#: editor/scene_tree_dock.cpp
msgid "Save New Scene As..."
@@ -12218,6 +12186,8 @@ msgid ""
"Warning: Having the script name be the same as a built-in type is usually "
"not desired."
msgstr ""
+"Ostrzeżenie: Posiadanie skryptu z nazwą taką samą jak typ wbudowany jest "
+"zazwyczaj niepożądane."
#: editor/script_create_dialog.cpp
msgid "Class Name:"
@@ -12289,7 +12259,7 @@ msgstr "Kopiuj błąd"
#: editor/script_editor_debugger.cpp
msgid "Open C++ Source on GitHub"
-msgstr ""
+msgstr "Otwórz źródło C++ na GitHubie"
#: editor/script_editor_debugger.cpp
msgid "Video RAM"
@@ -12468,14 +12438,22 @@ msgid "Change Ray Shape Length"
msgstr "Zmień długość Ray Shape"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Room Point Position"
-msgstr "Ustaw pozycje punktu krzywej"
+msgstr "Ustaw pozycjÄ™ punktu pokoju"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Portal Point Position"
-msgstr "Ustaw pozycje punktu krzywej"
+msgstr "Ustaw pozycjÄ™ punktu portalu"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Zmień promień kształtu cylindra"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Ustaw punkt kontrolny wchodzÄ…cy z krzywej"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -12587,14 +12565,12 @@ msgid "Object can't provide a length."
msgstr "Obiekt nie może podać długości."
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "Export Mesh GLTF2"
-msgstr "Eksportuj bibliotekę Meshów"
+msgstr "Eksportowani siatki GLTF2"
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "Export GLTF..."
-msgstr "Eksport..."
+msgstr "Eksportuj GLTF..."
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
@@ -12637,9 +12613,8 @@ msgid "GridMap Paint"
msgstr "Malowanie GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Selection"
-msgstr "GridMap Wypełnij zaznaczenie"
+msgstr "Wybór GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
@@ -12762,6 +12737,11 @@ msgstr "Kreślenie map światła"
msgid "Class name can't be a reserved keyword"
msgstr "Nazwa klasy nie może być słowem zastrzeżonym"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Wypełnij zaznaczone"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Koniec śladu stosu wewnętrznego wyjątku"
@@ -12891,14 +12871,12 @@ msgid "Add Output Port"
msgstr "Dodaj port wyjściowy"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Type"
-msgstr "Zmień typ"
+msgstr "Zmień typ portu"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Name"
-msgstr "Zmień nazwę portu wejściowego"
+msgstr "Zmień nazwę portu"
#: modules/visual_script/visual_script_editor.cpp
msgid "Override an existing built-in function."
@@ -13013,9 +12991,8 @@ msgid "Add Preload Node"
msgstr "Dodaj wstępnie wczytany węzeł"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Node(s)"
-msgstr "Dodaj węzeł"
+msgstr "Dodaj węzeł(y)"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Node(s) From Tree"
@@ -13247,73 +13224,67 @@ msgstr "Przeszukaj VisualScript"
msgid "Get %s"
msgstr "Przyjmij %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Brakuje nazwy paczki."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Segmenty paczki muszą mieć niezerową długość."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "Znak \"%s\" nie jest dozwolony w nazwach paczek aplikacji Androida."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "Cyfra nie może być pierwszym znakiem w segmencie paczki."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "Znak \"%s\" nie może być pierwszym znakiem w segmencie paczki."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "Paczka musi mieć co najmniej jedną kropkę jako separator."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Wybierz urzÄ…dzenie z listy"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
-msgstr ""
+msgstr "Uruchamiam na %s"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
-msgstr "Eksportowanie wszystkiego"
+msgstr "Eksportowanie APK..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
-msgstr "Odinstaluj"
+msgstr "Odinstalowywanie..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
-msgstr "Wczytywanie, proszę czekać..."
+msgstr "Instalowanie na urządzeniu, proszę czekać..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
-msgstr "Nie można stworzyć instancji sceny!"
+msgstr "Nie udało się zainstalować na urządzeniu: %s"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
-msgstr "Uruchamiam skrypt..."
+msgstr "Uruchamiam na urzÄ…dzeniu..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
-msgstr "Nie można utworzyć katalogu."
+msgstr "Nie udało się uruchomić na urządzeniu."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "Nie udało się znaleźć narzędzia \"apksigner\"."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13321,7 +13292,7 @@ msgstr ""
"Szablon budowania Androida nie jest zainstalowany dla projektu. Zainstaluj "
"go z menu Projekt."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
@@ -13329,13 +13300,13 @@ msgstr ""
"Albo ustawienia Debug Keystore, Debug User ORAZ Debug Password muszą być "
"skonfigurowane, ALBO żadne z nich."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Debugowy keystore nieskonfigurowany w Ustawieniach Edytora ani w profilu "
"eksportu."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
@@ -13343,49 +13314,49 @@ msgstr ""
"Albo ustawienia Release Keystore, Release User ORAZ Release Password muszÄ… "
"być skonfigurowane, ALBO żadne z nich."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"Wydaniowy keystore jest niepoprawnie skonfigurowany w profilu eksportu."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr "Wymagana jest poprawna ścieżka SDK Androida w Ustawieniach Edytora."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "Niepoprawna ścieżka do SDK Androida w Ustawieniach Edytora."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "Folder \"platform-tools\" nie istnieje!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
"Nie udało się znaleźć komendy adb z narzędzi platformowych SDK Androida."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr "Sprawdź w folderze SDK Androida podanych w Ustawieniach Edytora."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "Brakuje folderu \"build-tools\"!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr "Nie udało się znaleźć komendy apksigner z narzędzi SDK Androida."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Niepoprawny klucz publiczny dla ekspansji APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Niepoprawna nazwa paczki:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13393,97 +13364,79 @@ msgstr ""
"Niepoprawny moduł \"GodotPaymentV3\" załączony w ustawieniu projektu "
"\"android/modules\" (zmieniony w Godocie 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "\"Use Custom Build\" musi być włączone, by używać wtyczek."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Degrees Of Freedom\" jest poprawne tylko gdy \"Xr Mode\" jest \"Oculus "
-"Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"Hand Tracking\" jest poprawne tylko gdy \"Xr Mode\" jest \"Oculus Mobile VR"
"\"."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Focus Awareness\" jest poprawne tylko gdy \"Xr Mode\" jest \"Oculus Mobile "
-"VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"\"Eksportuj AAB\" jest ważne tylko gdy \"Use Custom Build\" jest włączone."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
"directory.\n"
"The resulting %s is unsigned."
msgstr ""
+"\"apksigner\" nie został znaleziony.\n"
+"Sprawdź, czy komenda jest dostępna w folderze narzędzi SDK Androida.\n"
+"Wynikowy %s jest niepodpisany."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
-msgstr ""
+msgstr "Podpisywanie debugu %s..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
-msgstr ""
-"Skanowanie plików,\n"
-"Proszę czekać..."
+msgstr "Podpisywanie wydania %s..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
-msgstr "Nie można otworzyć szablonu dla eksportu:"
+msgstr "Nie udało się znaleźć keystore, nie można eksportować."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
-msgstr ""
+msgstr "\"apksigner\" zwrócił błąd #%d"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
-msgstr "Dodawanie %s..."
+msgstr "Weryfikowanie %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
-msgstr ""
+msgstr "Weryfikacja \"apksigner\" dla %s nieudana."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
-msgstr "Eksportowanie wszystkiego"
+msgstr "Eksportowanie na Androida"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
"Nieprawidłowa nazwa pliku! Android App Bundle wymaga rozszerzenia *.aab."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "APK Expansion nie jest kompatybilne z Android App Bundle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "Nieprawidłowa nazwa pliku! APK Androida wymaga rozszerzenia *.apk."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
-msgstr ""
+msgstr "Nieobsługiwany format eksportu!\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13491,7 +13444,7 @@ msgstr ""
"Próbowano zbudować z własnego szablonu, ale nie istnieje dla niego "
"informacja o wersji. Zainstaluj ponownie z menu \"Projekt\"."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13503,26 +13456,26 @@ msgstr ""
" Wersja Godota: %s\n"
"Zainstaluj ponownie szablon z menu \"Projekt\"."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
+"Nie udało się nadpisać plików \"res://android/build/res/*.xml\" nazwą "
+"projektu"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
-msgstr "Nie znaleziono project.godot w ścieżce projektu."
+msgstr "Nie udało się eksportować plików projektu do projektu gradle\n"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
-msgstr "Nie można zapisać pliku:"
+msgstr "Nie udało się zapisać pliku pakietu rozszerzenia!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Budowanie projektu Androida (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13531,11 +13484,11 @@ msgstr ""
"Alternatywnie, odwiedź docs.godotengine.org po dokumentację budowania dla "
"Androida."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "Przesuwam wyjście"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13543,48 +13496,48 @@ msgstr ""
"Nie udało się skopiować i przemianować pliku eksportu, sprawdź folder "
"projektu gradle po informacje."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
-msgstr "Animacja nie znaleziona: \"%s\""
+msgstr "Pakiet nie znaleziony: %s"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
-msgstr "Tworzenie konturów..."
+msgstr "Tworzenie APK..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
-msgstr "Nie można otworzyć szablonu dla eksportu:"
+msgstr ""
+"Nie udało się znaleźć szablonu APK do eksportu:\n"
+"%s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
"Please build a template with all required libraries, or uncheck the missing "
"architectures in the export preset."
msgstr ""
+"BrakujÄ…ce biblioteki w szablonie eksportu dla wybranej architektury: %s.\n"
+"Zbuduj szablon ze wszystkimi wymaganymi bibliotekami lub odznacz brakujÄ…ce "
+"architektury w profilu eksportu."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
-msgstr "Dodawanie %s..."
+msgstr "Dodawanie plików..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
-msgstr "Nie można zapisać pliku:"
+msgstr "Nie udało się eksportować plików projektu"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "Uzgadnianie APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
-msgstr ""
+msgstr "Nie udało się rozpakować tymczasowego niewyrównanego APK."
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "Identifier is missing."
@@ -13631,45 +13584,40 @@ msgid "Could not write file:"
msgstr "Nie można zapisać pliku:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file:"
-msgstr "Nie można zapisać pliku:"
+msgstr "Nie udało się odczytać pliku:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read HTML shell:"
-msgstr "Nie można odczytać niestandardowe powłoki HTML:"
+msgstr "Nie udało się odczytać powłoki HTML:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not create HTTP server directory:"
-msgstr "Nie można utworzyć katalogu."
+msgstr "Nie udało się utworzyć folderu serwera HTTP:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Error starting HTTP server:"
-msgstr "Błąd podczas zapisywania sceny."
+msgstr "Błąd uruchamiania serwera HTTP:"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid bundle identifier:"
-msgstr "Niepoprawny identyfikator:"
+msgstr "Nieprawidłowy identyfikator paczki:"
#: platform/osx/export/export.cpp
msgid "Notarization: code signing required."
-msgstr ""
+msgstr "Poświadczenie: wymagane podpisanie kodu."
#: platform/osx/export/export.cpp
msgid "Notarization: hardened runtime required."
-msgstr ""
+msgstr "Poświadczenie: wymagane wzmocnione środowisko wykonawcze."
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID name not specified."
-msgstr ""
+msgstr "Poświadczenie: Nazwa Apple ID nie podana."
#: platform/osx/export/export.cpp
msgid "Notarization: Apple ID password not specified."
-msgstr ""
+msgstr "Poświadczenie: Hasło Apple ID nie podane."
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -14113,6 +14061,9 @@ msgid ""
"longer has any effect.\n"
"To remove this warning, disable the GIProbe's Compress property."
msgstr ""
+"Właściwość GIProbe Compress jest przestarzała z powodu znanych błędów i nie "
+"ma już żadnego efektu.\n"
+"By usunąć to ostrzeżenie, wyłącz właściwość Compress w GIProbe."
#: scene/3d/light.cpp
msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows."
@@ -14132,6 +14083,14 @@ msgstr ""
"NavigationMeshInstance musi być dzieckiem lub wnukiem węzła typu Navigation. "
"Udostępnia on tylko dane nawigacyjne."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14200,15 +14159,15 @@ msgstr "Node A i Node B muszą być różnymi węzłami PhysicsBody"
#: scene/3d/portal.cpp
msgid "The RoomManager should not be a child or grandchild of a Portal."
-msgstr ""
+msgstr "RoomManager nie powinien być potomkiem Portalu."
#: scene/3d/portal.cpp
msgid "A Room should not be a child or grandchild of a Portal."
-msgstr ""
+msgstr "Room nie powinien być potomkiem Portalu."
#: scene/3d/portal.cpp
msgid "A RoomGroup should not be a child or grandchild of a Portal."
-msgstr ""
+msgstr "RoomGroup nie powinien być potomkiem Portalu."
#: scene/3d/remote_transform.cpp
msgid ""
@@ -14220,79 +14179,96 @@ msgstr ""
#: scene/3d/room.cpp
msgid "A Room cannot have another Room as a child or grandchild."
-msgstr ""
+msgstr "Room nie może mieć innego węzła Room jako potomka."
#: scene/3d/room.cpp
msgid "The RoomManager should not be placed inside a Room."
-msgstr ""
+msgstr "RoomManager nie powinien znajdować się w węźle Room."
#: scene/3d/room.cpp
msgid "A RoomGroup should not be placed inside a Room."
-msgstr ""
+msgstr "RoomGroup nie powinien znajdować się w węźle Room."
#: scene/3d/room.cpp
msgid ""
"Room convex hull contains a large number of planes.\n"
"Consider simplifying the room bound in order to increase performance."
msgstr ""
+"Otoczka wypukła pokoju zawiera dużą liczbę płaszczyzn.\n"
+"Rozważ uproszczenie granicy pokoju w celu zwiększenia wydajności."
#: scene/3d/room_group.cpp
msgid "The RoomManager should not be placed inside a RoomGroup."
-msgstr ""
+msgstr "RoomManager nie powinien znajdować się w węźle RoomGroup."
#: scene/3d/room_manager.cpp
msgid "The RoomList has not been assigned."
-msgstr ""
+msgstr "RoomList nie został przypisany."
#: scene/3d/room_manager.cpp
msgid "The RoomList node should be a Spatial (or derived from Spatial)."
-msgstr ""
+msgstr "Węzeł RoomList powinien być typu Spatial lub pochodnego."
#: scene/3d/room_manager.cpp
msgid ""
"Portal Depth Limit is set to Zero.\n"
"Only the Room that the Camera is in will render."
msgstr ""
+"Portal Depth Limit jest ustawione na zero.\n"
+"Tylko pokój, w którym jest kamera będzie się renderował."
#: scene/3d/room_manager.cpp
msgid "There should only be one RoomManager in the SceneTree."
-msgstr ""
+msgstr "Powinien być tylko jeden RoomManager w drzewie sceny."
#: scene/3d/room_manager.cpp
msgid ""
"RoomList path is invalid.\n"
"Please check the RoomList branch has been assigned in the RoomManager."
msgstr ""
+"Ścieżka RoomList jest nieprawidłowa.\n"
+"Sprawdź czy gałąź RoomList została przypisana w RoomManager."
#: scene/3d/room_manager.cpp
msgid "RoomList contains no Rooms, aborting."
-msgstr ""
+msgstr "RoomList nie zawiera żadnego węzła Room, przerywam."
#: scene/3d/room_manager.cpp
msgid "Misnamed nodes detected, check output log for details. Aborting."
msgstr ""
+"Wykryto błędnie nazwane węzły, sprawdź dziennik wyjściowy po więcej "
+"szczegółów. Przerywam."
#: scene/3d/room_manager.cpp
msgid "Portal link room not found, check output log for details."
msgstr ""
+"ÅÄ…cznik portali nie znaleziony, sprawdź dziennik wyjÅ›ciowy po wiÄ™cej "
+"szczegółów."
#: scene/3d/room_manager.cpp
msgid ""
"Portal autolink failed, check output log for details.\n"
"Check the portal is facing outwards from the source room."
msgstr ""
+"Autołączenie portali nieudane, sprawdź dziennik wyjścia po szczegóły.\n"
+"Sprawdź, czy portal jest zwrócony na zewnątrz ze źródłowego pokoju."
#: scene/3d/room_manager.cpp
msgid ""
"Room overlap detected, cameras may work incorrectly in overlapping area.\n"
"Check output log for details."
msgstr ""
+"Wykryto nachodzenie się pokoi, kamery mogą działać niepoprawnie na "
+"nachodzÄ…cym obszarze.\n"
+"Sprawdź dziennik wyjścia po szczegóły."
#: scene/3d/room_manager.cpp
msgid ""
"Error calculating room bounds.\n"
"Ensure all rooms contain geometry or manual bounds."
msgstr ""
+"Błąd liczenia granic pokoju.\n"
+"Upewnij się, że wszystkie pokoje zawierają geometrię lub ręczne granice."
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
@@ -14357,7 +14333,7 @@ msgstr "Animacja nie znaleziona: \"%s\""
#: scene/animation/animation_player.cpp
msgid "Anim Apply Reset"
-msgstr ""
+msgstr "Resetowanie animacji"
#: scene/animation/animation_tree.cpp
msgid "In node '%s', invalid animation: '%s'."
@@ -14457,6 +14433,14 @@ msgstr "Rozszerzenie musi być poprawne."
msgid "Enable grid minimap."
msgstr "Włącz minimapę siatki."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14509,6 +14493,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "Rozmiar węzła Viewport musi być większy niż 0, by coś wyrenderować."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14530,25 +14518,29 @@ msgid "Invalid comparison function for that type."
msgstr "Niewłaściwa funkcja porównania dla tego typu."
#: servers/visual/shader_language.cpp
-#, fuzzy
msgid "Varying may not be assigned in the '%s' function."
-msgstr "Varying może być przypisane tylko w funkcji wierzchołków."
+msgstr "Varying nie może zostać przypisane w funkcji \"%s\"."
#: servers/visual/shader_language.cpp
msgid ""
"Varyings which assigned in 'vertex' function may not be reassigned in "
"'fragment' or 'light'."
msgstr ""
+"Varyings przypisane w funkcji \"vertex\" nie mogą zostać przypisane ponownie "
+"we \"fragment\" ani \"light\"."
#: servers/visual/shader_language.cpp
msgid ""
"Varyings which assigned in 'fragment' function may not be reassigned in "
"'vertex' or 'light'."
msgstr ""
+"Varyings przypisane w funkcji \"fragment\" nie mogą zostać przypisane "
+"ponownie we \"vertex\" ani \"light\"."
#: servers/visual/shader_language.cpp
msgid "Fragment-stage varying could not been accessed in custom function!"
msgstr ""
+"Varying z etapu fragmentów nie jest dostępny w niestandardowej funkcji!"
#: servers/visual/shader_language.cpp
msgid "Assignment to function."
@@ -14562,6 +14554,41 @@ msgstr "Przypisanie do uniformu."
msgid "Constants cannot be modified."
msgstr "Stałe nie mogą być modyfikowane."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Utwórz pozę spoczynkową (z kości)"
+
+#~ msgid "Bottom"
+#~ msgstr "Dół"
+
+#~ msgid "Left"
+#~ msgstr "Lewa"
+
+#~ msgid "Right"
+#~ msgstr "Prawa"
+
+#~ msgid "Front"
+#~ msgstr "Przód"
+
+#~ msgid "Rear"
+#~ msgstr "Tył"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Uchwyt bez nazwy"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Degrees Of Freedom\" jest poprawne tylko gdy \"Xr Mode\" jest \"Oculus "
+#~ "Mobile VR\"."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Focus Awareness\" jest poprawne tylko gdy \"Xr Mode\" jest \"Oculus "
+#~ "Mobile VR\"."
+
#~ msgid "Package Contents:"
#~ msgstr "Zawartość paczki:"
@@ -16432,9 +16459,6 @@ msgstr "Stałe nie mogą być modyfikowane."
#~ msgid "Images:"
#~ msgstr "Obrazki:"
-#~ msgid "Group"
-#~ msgstr "Grupa"
-
#~ msgid "Compress (RAM - IMA-ADPCM)"
#~ msgstr "Kompresja (RAM - IMA-ADPCM)"
diff --git a/editor/translations/pr.po b/editor/translations/pr.po
index 96fab899cd..8f2aa04183 100644
--- a/editor/translations/pr.po
+++ b/editor/translations/pr.po
@@ -1037,7 +1037,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1676,14 +1676,14 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#, fuzzy
msgid "Custom debug template not found."
msgstr "Yer fancy debug package be nowhere."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#, fuzzy
@@ -2072,7 +2072,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2560,6 +2560,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3201,6 +3225,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Change yer Anim Transform"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3447,6 +3476,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5572,6 +5605,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Yar, Blow th' Selected Down!"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Yar, Blow th' Selected Down!"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6496,7 +6541,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7095,6 +7144,16 @@ msgstr "Yar, Blow th' Selected Down!"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Change yer Anim Transform"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Slit th' Node"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7614,11 +7673,12 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Yar, Blow th' Selected Down!"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7646,6 +7706,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7759,42 +7873,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8059,6 +8153,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Ye be fixin' Signal:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -8124,7 +8223,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12205,6 +12304,15 @@ msgstr "Discharge ye' Signal"
msgid "Set Portal Point Position"
msgstr "Discharge ye' Signal"
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Discharge ye' Signal"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12501,6 +12609,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "All yer Booty"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13016,161 +13129,150 @@ msgstr "Discharge ye' Variable"
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Edit"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid package name:"
msgstr "Yer unique name be evil."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13178,57 +13280,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13236,54 +13338,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13291,20 +13393,20 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Find ye Node Type"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13762,6 +13864,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14052,6 +14162,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14092,6 +14210,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/pt.po b/editor/translations/pt.po
index 1c8e2476a3..94bcea301b 100644
--- a/editor/translations/pt.po
+++ b/editor/translations/pt.po
@@ -23,7 +23,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-08-06 06:48+0000\n"
+"PO-Revision-Date: 2021-09-15 00:46+0000\n"
"Last-Translator: João Lopes <linux-man@hotmail.com>\n"
"Language-Team: Portuguese <https://hosted.weblate.org/projects/godot-engine/"
"godot/pt/>\n"
@@ -32,7 +32,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -381,15 +381,13 @@ msgstr "Anim Inserir"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "Impossível abrir '%s'."
+msgstr "nó '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "Animação"
+msgstr "animação"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -399,9 +397,8 @@ msgstr ""
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "Não existe a Propriedade '%s'."
+msgstr "propriedade '%s'"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -461,7 +458,7 @@ msgstr "Caminho da pista é inválido, não se consegue adicionar uma chave."
#: editor/animation_track_editor.cpp
msgid "Track is not of type Spatial, can't insert key"
-msgstr "Pista não é do tipo Spatial, não consigo inserir chave"
+msgstr "Pista não é do tipo Spatial, incapaz de inserir chave"
#: editor/animation_track_editor.cpp
msgid "Add Transform Track Key"
@@ -473,7 +470,7 @@ msgstr "Adicionar Chave da Pista"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
-msgstr "Caminho da pista é inválido, não consigo adicionar uma chave método."
+msgstr "Caminho da pista é inválido, incapaz de adicionar uma chave método."
#: editor/animation_track_editor.cpp
msgid "Add Method Track Key"
@@ -877,7 +874,7 @@ msgstr "Desconecta o sinal após a primeira emissão."
#: editor/connections_dialog.cpp
msgid "Cannot connect signal"
-msgstr "Não consigo conectar sinal"
+msgstr "Incapaz de conectar sinal"
#: editor/connections_dialog.cpp editor/dependency_editor.cpp
#: editor/export_template_manager.cpp editor/groups_editor.cpp
@@ -1037,7 +1034,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Dependências"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Recurso"
@@ -1082,7 +1079,7 @@ msgid ""
"Depending on your filesystem configuration, the files will either be moved "
"to the system trash or deleted permanently."
msgstr ""
-"Remover ficheiros selecionados do Projeto? (Sem desfazer.)\n"
+"Remover ficheiros selecionados do Projeto? (Não pode ser revertido.)\n"
"Dependendo da configuração, pode encontrar os ficheiros removidos na "
"Reciclagem do sistema ou apagados permanentemente."
@@ -1096,13 +1093,13 @@ msgid ""
msgstr ""
"Os ficheiros a serem removidos são necessários para que outros recursos "
"funcionem.\n"
-"Remover mesmo assim? (Sem desfazer.)\n"
+"Remover mesmo assim? (Não pode ser revertido.)\n"
"Dependendo da configuração, pode encontrar os ficheiros removidos na "
"Reciclagem do sistema ou apagados permanentemente."
#: editor/dependency_editor.cpp
msgid "Cannot remove:"
-msgstr "Não consigo remover:"
+msgstr "Incapaz de remover:"
#: editor/dependency_editor.cpp
msgid "Error loading:"
@@ -1279,14 +1276,16 @@ msgstr "%s (já existe)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
msgstr ""
+"Conteúdos do recurso \"%s\" - %d ficheiro(s) em conflito com o projeto:"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - No files conflict with your project:"
msgstr ""
+"Conteúdos do recurso \"%s\" - Nenhum ficheiro em conflito com o projeto:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
-msgstr "A Descomprimir Ativos"
+msgstr "A Descomprimir Recursos"
#: editor/editor_asset_installer.cpp
msgid "The following files failed extraction from asset \"%s\":"
@@ -1374,9 +1373,8 @@ msgid "Bypass"
msgstr "Ignorar"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Bus Options"
-msgstr "Opções de barramento"
+msgstr "Opções de Barramento"
#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -1540,16 +1538,15 @@ msgstr "Reorganizar Carregamentos Automáticos"
#: editor/editor_autoload_settings.cpp
msgid "Can't add autoload:"
-msgstr "Não consigo adicionar carregamento automático:"
+msgstr "Incapaz de adicionar carregamento automático:"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "%s is an invalid path. File does not exist."
-msgstr "O Ficheiro não existe."
+msgstr "%s é um caminho inválido. O ficheiro não existe."
#: editor/editor_autoload_settings.cpp
msgid "%s is an invalid path. Not in resource path (res://)."
-msgstr ""
+msgstr "%s é um caminho inválido. Não está no caminho do recurso (res://)."
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1573,9 +1570,8 @@ msgid "Name"
msgstr "Nome"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Global Variable"
-msgstr "Variável"
+msgstr "Variável Global"
#: editor/editor_data.cpp
msgid "Paste Params"
@@ -1699,13 +1695,13 @@ msgstr ""
"Ative 'Importar Pvrtc' nas Configurações do Projeto, ou desative 'Driver de "
"Recurso Ativo'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Modelo de depuração personalizado não encontrado."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1730,7 +1726,7 @@ msgstr "Editor de Script"
#: editor/editor_feature_profile.cpp
msgid "Asset Library"
-msgstr "Biblioteca de Ativos"
+msgstr "Biblioteca de Recursos"
#: editor/editor_feature_profile.cpp
msgid "Scene Tree Editing"
@@ -1750,48 +1746,50 @@ msgstr "Importar Doca"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
-msgstr ""
+msgstr "Permite ver e editar cenas 3D."
#: editor/editor_feature_profile.cpp
msgid "Allows to edit scripts using the integrated script editor."
-msgstr ""
+msgstr "Permite editar scripts com o editor de scripts integrado."
#: editor/editor_feature_profile.cpp
msgid "Provides built-in access to the Asset Library."
-msgstr ""
+msgstr "Fornece acesso integrado à Biblioteca de Recursos."
#: editor/editor_feature_profile.cpp
msgid "Allows editing the node hierarchy in the Scene dock."
-msgstr ""
+msgstr "Permite editar a hierarquia de nós na doca de Cena."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to work with signals and groups of the node selected in the Scene "
"dock."
msgstr ""
+"Permite trabalhar com sinais e grupos do nó selecionado na doca de Cena."
#: editor/editor_feature_profile.cpp
msgid "Allows to browse the local file system via a dedicated dock."
-msgstr ""
+msgstr "Permite navegar no sistema de ficheiros local por uma doca dedicada."
#: editor/editor_feature_profile.cpp
msgid ""
"Allows to configure import settings for individual assets. Requires the "
"FileSystem dock to function."
msgstr ""
+"Permite a configuração da importação para recursos individuais. Necessita da "
+"doca FileSystem."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(current)"
-msgstr "(Atual)"
+msgstr "(atual)"
#: editor/editor_feature_profile.cpp
msgid "(none)"
-msgstr ""
+msgstr "(nada)"
#: editor/editor_feature_profile.cpp
msgid "Remove currently selected profile, '%s'? Cannot be undone."
-msgstr ""
+msgstr "Remover perfil selecionado, '%s'? Não pode ser revertido."
#: editor/editor_feature_profile.cpp
msgid "Profile must be a valid filename and must not contain '.'"
@@ -1822,19 +1820,16 @@ msgid "Enable Contextual Editor"
msgstr "Ativar Editor de Contexto"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Properties:"
-msgstr "Propriedades:"
+msgstr "Propriedades da Classe:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Main Features:"
-msgstr "Características"
+msgstr "Características Principais:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Nodes and Classes:"
-msgstr "Ativar Classes:"
+msgstr "Nós e Classes:"
#: editor/editor_feature_profile.cpp
msgid "File '%s' format is invalid, import aborted."
@@ -1852,23 +1847,20 @@ msgid "Error saving profile to path: '%s'."
msgstr "Erro ao guardar perfil no caminho: '%s'."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Reset to Default"
-msgstr "Restaurar Predefinições"
+msgstr "Restaurar Predefinição"
#: editor/editor_feature_profile.cpp
msgid "Current Profile:"
msgstr "Perfil atual:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Create Profile"
-msgstr "Apagar Perfil"
+msgstr "Criar Perfil"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Remove Profile"
-msgstr "Remover Tile"
+msgstr "Remover Perfil"
#: editor/editor_feature_profile.cpp
msgid "Available Profiles:"
@@ -1888,18 +1880,17 @@ msgid "Export"
msgstr "Exportar"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Configure Selected Profile:"
-msgstr "Perfil atual:"
+msgstr "Configurar Perfil Selecionado:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Extra Options:"
-msgstr "Opções da Classe:"
+msgstr "Opções Extra:"
#: editor/editor_feature_profile.cpp
msgid "Create or import a profile to edit available classes and properties."
msgstr ""
+"Criar ou importar perfil para editar classes e propriedades disponíveis."
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
@@ -1926,9 +1917,8 @@ msgid "Select Current Folder"
msgstr "Selecionar pasta atual"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "File exists, overwrite?"
-msgstr "O Ficheiro existe, sobrescrever?"
+msgstr "O ficheiro existe, sobrescrever?"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Select This Folder"
@@ -2075,7 +2065,7 @@ msgstr "Ficheiro:"
#: editor/editor_file_system.cpp
msgid "ScanSources"
-msgstr "Analisar fontes"
+msgstr "PesquisarFontes"
#: editor/editor_file_system.cpp
msgid ""
@@ -2087,9 +2077,9 @@ msgstr ""
#: editor/editor_file_system.cpp
msgid "(Re)Importing Assets"
-msgstr "A (Re)Importar Ativos"
+msgstr "A (Re)Importar Recursos"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Topo"
@@ -2359,7 +2349,7 @@ msgstr "Guardar Recurso Como..."
#: editor/editor_node.cpp
msgid "Can't open file for writing:"
-msgstr "Não consigo abrir o ficheiro para escrita:"
+msgstr "Incapaz de abrir o ficheiro para escrita:"
#: editor/editor_node.cpp
msgid "Requested file format unknown:"
@@ -2371,7 +2361,7 @@ msgstr "Erro ao guardar."
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Can't open '%s'. The file could have been moved or deleted."
-msgstr "Não consigo abrir '%s'. O ficheiro pode ter sido movido ou apagado."
+msgstr "Incapaz de abrir '%s'. O ficheiro pode ter sido movido ou apagado."
#: editor/editor_node.cpp
msgid "Error while parsing '%s'."
@@ -2419,7 +2409,7 @@ msgid ""
"Couldn't save scene. Likely dependencies (instances or inheritance) couldn't "
"be satisfied."
msgstr ""
-"Não consigo guardar cena. Provavelmente, as dependências (instâncias ou "
+"Incapaz de guardar cena. Provavelmente, as dependências (instâncias ou "
"heranças) não puderam ser satisfeitas."
#: editor/editor_node.cpp editor/scene_tree_dock.cpp
@@ -2428,7 +2418,7 @@ msgstr "Não se consegue sobrescrever cena ainda aberta!"
#: editor/editor_node.cpp
msgid "Can't load MeshLibrary for merging!"
-msgstr "Não consigo carregar MeshLibrary para combinar!"
+msgstr "Incapaz de carregar MeshLibrary para combinar!"
#: editor/editor_node.cpp
msgid "Error saving MeshLibrary!"
@@ -2436,7 +2426,7 @@ msgstr "Erro ao guardar MeshLibrary!"
#: editor/editor_node.cpp
msgid "Can't load TileSet for merging!"
-msgstr "Não consigo carregar TileSet para combinar!"
+msgstr "Incapaz de carregar TileSet para combinar!"
#: editor/editor_node.cpp
msgid "Error saving TileSet!"
@@ -2563,13 +2553,16 @@ msgid ""
"The current scene has no root node, but %d modified external resource(s) "
"were saved anyway."
msgstr ""
+"A cena atual não tem nó raiz, mas %d recurso(s) externo(s) modificados foram "
+"guardados."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"A root node is required to save the scene. You can add a root node using the "
"Scene tree dock."
-msgstr "É necessário um nó raiz para guardar a cena."
+msgstr ""
+"É necessário um nó raiz para guardar a cena. Pode adicionar um nó raiz na "
+"doca de árvore da Cena."
#: editor/editor_node.cpp
msgid "Save Scene As..."
@@ -2600,8 +2593,34 @@ msgid "Current scene not saved. Open anyway?"
msgstr "A cena atual não foi guardada. Abrir na mesma?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Desfazer"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Refazer"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
-msgstr "Não consigo recarregar uma cena que nunca foi guardada."
+msgstr "Incapaz de recarregar uma cena que nunca foi guardada."
#: editor/editor_node.cpp
msgid "Reload Saved Scene"
@@ -2952,9 +2971,8 @@ msgid "Orphan Resource Explorer..."
msgstr "Explorador de Recursos Órfãos..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reload Current Project"
-msgstr "Renomear Projeto"
+msgstr "Recarregar Projeto Atual"
#: editor/editor_node.cpp
msgid "Quit to Project List"
@@ -3114,13 +3132,12 @@ msgid "Help"
msgstr "Ajuda"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Online Documentation"
-msgstr "Abrir documentação"
+msgstr "Documentação Online"
#: editor/editor_node.cpp
msgid "Questions & Answers"
-msgstr ""
+msgstr "Perguntas & Respostas"
#: editor/editor_node.cpp
msgid "Report a Bug"
@@ -3128,7 +3145,7 @@ msgstr "Denunciar um Bug"
#: editor/editor_node.cpp
msgid "Suggest a Feature"
-msgstr ""
+msgstr "Proponha uma Funcionalidade"
#: editor/editor_node.cpp
msgid "Send Docs Feedback"
@@ -3139,9 +3156,8 @@ msgid "Community"
msgstr "Comunidade"
#: editor/editor_node.cpp
-#, fuzzy
msgid "About Godot"
-msgstr "Sobre"
+msgstr "Sobre Godot"
#: editor/editor_node.cpp
msgid "Support Godot Development"
@@ -3233,14 +3249,12 @@ msgid "Manage Templates"
msgstr "Gerir Modelos"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Install from file"
-msgstr "Instalar do Ficheiro"
+msgstr "Instalar do ficheiro"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Select android sources file"
-msgstr "Selecione uma Fonte Malha:"
+msgstr "Selecione ficheiros fonte android"
#: editor/editor_node.cpp
msgid ""
@@ -3289,6 +3303,11 @@ msgid "Merge With Existing"
msgstr "Combinar com o Existente"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim Mudar Transformação"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Abrir & Executar um Script"
@@ -3323,9 +3342,8 @@ msgid "Select"
msgstr "Selecionar"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Select Current"
-msgstr "Selecionar pasta atual"
+msgstr "Selecionar Atual"
#: editor/editor_node.cpp
msgid "Open 2D Editor"
@@ -3341,7 +3359,7 @@ msgstr "Abrir Editor de Script"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Open Asset Library"
-msgstr "Abrir Biblioteca de Ativos"
+msgstr "Abrir Biblioteca de Recursos"
#: editor/editor_node.cpp
msgid "Open the next Editor"
@@ -3360,9 +3378,8 @@ msgid "No sub-resources found."
msgstr "Sub-recurso não encontrado."
#: editor/editor_path.cpp
-#, fuzzy
msgid "Open a list of sub-resources."
-msgstr "Sub-recurso não encontrado."
+msgstr "Abrir a lista de sub-recursos."
#: editor/editor_plugin.cpp
msgid "Creating Mesh Previews"
@@ -3389,14 +3406,12 @@ msgid "Update"
msgstr "Atualizar"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Version"
-msgstr "Versão:"
+msgstr "Versão"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Author"
-msgstr "Autores"
+msgstr "Autor"
#: editor/editor_plugin_settings.cpp
#: editor/plugins/version_control_editor_plugin.cpp
@@ -3409,14 +3424,12 @@ msgid "Measure:"
msgstr "Medida:"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Frame Time (ms)"
-msgstr "Tempo do Frame (seg)"
+msgstr "Tempo do Frame (ms)"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Average Time (ms)"
-msgstr "Tempo Médio (seg)"
+msgstr "Tempo Médio (ms)"
#: editor/editor_profiler.cpp
msgid "Frame %"
@@ -3545,6 +3558,10 @@ msgstr ""
"O recurso selecionado (%s) não corresponde a qualquer tipo esperado para "
"esta propriedade (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Fazer único"
@@ -3564,7 +3581,6 @@ msgid "Paste"
msgstr "Colar"
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
-#, fuzzy
msgid "Convert to %s"
msgstr "Converter em %s"
@@ -3616,10 +3632,9 @@ msgid "Did you forget the '_run' method?"
msgstr "Esqueceu-se do método '_run'?"
#: editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Hold %s to round to integers. Hold Shift for more precise changes."
msgstr ""
-"Pressione Ctrl para arredondar para inteiro. Pressione Shift para mudanças "
+"Pressione %s para arredondar para inteiro. Pressione Shift para mudanças "
"mais precisas."
#: editor/editor_sub_scene.cpp
@@ -3640,49 +3655,43 @@ msgstr "Importar do Nó:"
#: editor/export_template_manager.cpp
msgid "Open the folder containing these templates."
-msgstr ""
+msgstr "Abrir a pasta que contem estes modelos."
#: editor/export_template_manager.cpp
msgid "Uninstall these templates."
-msgstr ""
+msgstr "Desinstalar este modelos."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "There are no mirrors available."
-msgstr "Não existe ficheiro '%s'."
+msgstr "Não existem mirrors disponíveis."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Retrieving the mirror list..."
-msgstr "A readquirir servidores, espere por favor..."
+msgstr "A readquirir lista de mirror..."
#: editor/export_template_manager.cpp
msgid "Starting the download..."
-msgstr ""
+msgstr "A iniciar a transferência..."
#: editor/export_template_manager.cpp
msgid "Error requesting URL:"
msgstr "Erro ao solicitar URL:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Connecting to the mirror..."
-msgstr "A ligar ao servidor..."
+msgstr "A ligar ao mirror..."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't resolve the requested address."
-msgstr "Não consigo resolver hostname:"
+msgstr "Incapaz de resolver o endereço solicitado."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't connect to the mirror."
-msgstr "Não consigo ligar ao host:"
+msgstr "Incapaz de ligar ao mirror."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No response from the mirror."
-msgstr "Sem resposta do host:"
+msgstr "Sem resposta do mirror."
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3690,22 +3699,20 @@ msgid "Request failed."
msgstr "Pedido falhado."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Request ended up in a redirect loop."
-msgstr "Falha na solicitação, demasiados redirecionamentos"
+msgstr "Pedido acaba num loop de redirecionamento."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Request failed:"
-msgstr "Pedido falhado."
+msgstr "Pedido falhado:"
#: editor/export_template_manager.cpp
msgid "Download complete; extracting templates..."
-msgstr ""
+msgstr "Transferência completa; a extrair modelos..."
#: editor/export_template_manager.cpp
msgid "Cannot remove temporary file:"
-msgstr "Não consigo remover ficheiro temporário:"
+msgstr "Incapaz de remover ficheiro temporário:"
#: editor/export_template_manager.cpp
msgid ""
@@ -3720,14 +3727,12 @@ msgid "Error getting the list of mirrors."
msgstr "Erro na receção da lista de mirrors."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error parsing JSON with the list of mirrors. Please report this issue!"
-msgstr ""
-"Erro ao analisar a lista de mirrors JSON. Por favor denuncie o problema!"
+msgstr "Erro ao analisar a lista JSON de mirrors. Por favor relate o problema!"
#: editor/export_template_manager.cpp
msgid "Best available mirror"
-msgstr ""
+msgstr "Melhor mirror disponível"
#: editor/export_template_manager.cpp
msgid ""
@@ -3748,7 +3753,7 @@ msgstr "A resolver"
#: editor/export_template_manager.cpp
msgid "Can't Resolve"
-msgstr "Não consigo Resolver"
+msgstr "Incapaz de Resolver"
#: editor/export_template_manager.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -3757,7 +3762,7 @@ msgstr "A ligar..."
#: editor/export_template_manager.cpp
msgid "Can't Connect"
-msgstr "Não consigo Conectar"
+msgstr "Incapaz de Conectar"
#: editor/export_template_manager.cpp
msgid "Connected"
@@ -3781,24 +3786,23 @@ msgid "SSL Handshake Error"
msgstr "Erro SSL Handshake"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't open the export templates file."
-msgstr "Não consigo abrir zip de modelos de exportação."
+msgstr "Incapaz de abrir ficheiro de modelos de exportação."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Invalid version.txt format inside the export templates file: %s."
-msgstr "Formato de version.txt inválido dentro dos modelos: %s."
+msgstr ""
+"Formato de version.txt inválido dentro do ficheiro de exportação de modelos: "
+"%s."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No version.txt found inside the export templates file."
-msgstr "Não foi encontrado version.txt dentro dos Modelos."
+msgstr ""
+"Não foi encontrado version.txt dentro do ficheiro de exportação de modelos."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for extracting templates:"
-msgstr "Erro ao criar o caminho para os modelos:"
+msgstr "Erro ao criar o caminho para extrair os modelos:"
#: editor/export_template_manager.cpp
msgid "Extracting Export Templates"
@@ -3809,9 +3813,8 @@ msgid "Importing:"
msgstr "A Importar:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Remove templates for the version '%s'?"
-msgstr "Remover versão '%s' do Modelo?"
+msgstr "Remover modelos para a versão '%s'?"
#: editor/export_template_manager.cpp
msgid "Uncompressing Android Build Sources"
@@ -3828,53 +3831,51 @@ msgstr "Versão Atual:"
#: editor/export_template_manager.cpp
msgid "Export templates are missing. Download them or install from a file."
msgstr ""
+"Modelos de exportação em falta. Descarregue-os ou instale-os de um ficheiro."
#: editor/export_template_manager.cpp
msgid "Export templates are installed and ready to be used."
-msgstr ""
+msgstr "Modelos de exportação estão instalados e prontos para serem usados."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open Folder"
-msgstr "Abrir Ficheiro"
+msgstr "Abrir Pasta"
#: editor/export_template_manager.cpp
msgid "Open the folder containing installed templates for the current version."
-msgstr ""
+msgstr "Abrir a pasta que contem os modelos instalados para a versão atual."
#: editor/export_template_manager.cpp
msgid "Uninstall"
msgstr "Desinstalar"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uninstall templates for the current version."
-msgstr "Valor inicial do contador"
+msgstr "Desinstalar modelos para a versão atual."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Download from:"
-msgstr "Erro na transferência"
+msgstr "Transferir de:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "Executar no Navegador"
+msgstr "Abrir no Navegador"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "Copiar Erro"
+msgstr "Copiar URL do Mirror"
#: editor/export_template_manager.cpp
msgid "Download and Install"
-msgstr ""
+msgstr "Descarregar e Instalar"
#: editor/export_template_manager.cpp
msgid ""
"Download and install templates for the current version from the best "
"possible mirror."
msgstr ""
+"Descarregar do melhor mirror disponível e instalar modelos para a versão "
+"atual."
#: editor/export_template_manager.cpp
msgid "Official export templates aren't available for development builds."
@@ -3883,14 +3884,12 @@ msgstr ""
"desenvolvimento."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install from File"
msgstr "Instalar do Ficheiro"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install templates from a local file."
-msgstr "Importar Modelos a partir de um Ficheiro ZIP"
+msgstr "Instalar modelos a partir de um ficheiro local."
#: editor/export_template_manager.cpp editor/find_in_files.cpp
#: editor/progress_dialog.cpp scene/gui/dialogs.cpp
@@ -3898,19 +3897,16 @@ msgid "Cancel"
msgstr "Cancelar"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Cancel the download of the templates."
-msgstr "Não consigo abrir zip de modelos de exportação."
+msgstr "Cancelar a transferência dos modelos."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Other Installed Versions:"
-msgstr "Versões Instaladas:"
+msgstr "Outras Versões Instaladas:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uninstall Template"
-msgstr "Desinstalar"
+msgstr "Desinstalar Modelo"
#: editor/export_template_manager.cpp
msgid "Select Template File"
@@ -3925,6 +3921,8 @@ msgid ""
"The templates will continue to download.\n"
"You may experience a short editor freeze when they finish."
msgstr ""
+"Os modelos vão continuar a ser descarregados.\n"
+"Pode experimentar um curto bloqueio do editor quando terminar."
#: editor/filesystem_dock.cpp
msgid "Favorites"
@@ -4072,35 +4070,32 @@ msgid "Collapse All"
msgstr "Colapsar Tudo"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort files"
-msgstr "Procurar ficheiros"
+msgstr "Ordenar ficheiros"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Ascending)"
-msgstr ""
+msgstr "Ordenar por Nome (Ascendente)"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Descending)"
-msgstr ""
+msgstr "Ordenar por Nome (Descendente)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Ascending)"
-msgstr ""
+msgstr "Ordenar por Tipo (Ascendente)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Descending)"
-msgstr ""
+msgstr "Ordenar por Tipo (Descendente)"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort by Last Modified"
-msgstr "Última modificação"
+msgstr "Ordenar por Último Modificado"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort by First Modified"
-msgstr "Última modificação"
+msgstr "Ordenar por Primeiro Modificado"
#: editor/filesystem_dock.cpp
msgid "Duplicate..."
@@ -4112,7 +4107,7 @@ msgstr "Renomear..."
#: editor/filesystem_dock.cpp
msgid "Focus the search box"
-msgstr ""
+msgstr "Focar a caixa de pesquisa"
#: editor/filesystem_dock.cpp
msgid "Previous Folder/File"
@@ -4124,7 +4119,7 @@ msgstr "Próxima Pasta/Ficheiro"
#: editor/filesystem_dock.cpp
msgid "Re-Scan Filesystem"
-msgstr "Carregar novamente o Sistema de Ficheiros"
+msgstr "Re-pesquisar o Sistema de Ficheiros"
#: editor/filesystem_dock.cpp
msgid "Toggle Split Mode"
@@ -4139,7 +4134,7 @@ msgid ""
"Scanning Files,\n"
"Please Wait..."
msgstr ""
-"A analisar Ficheiros,\n"
+"A pesquisar Ficheiros,\n"
"Espere, por favor..."
#: editor/filesystem_dock.cpp
@@ -4412,7 +4407,7 @@ msgstr "Alterar o tipo de um ficheiro importado requer reiniciar o editor."
msgid ""
"WARNING: Assets exist that use this resource, they may stop loading properly."
msgstr ""
-"AVISO: Existem Ativos que usam este recurso, poderem não ser carregados "
+"AVISO: Outros recursos usam este recurso, e podem não ser carregados "
"corretamente."
#: editor/inspector_dock.cpp
@@ -4420,14 +4415,12 @@ msgid "Failed to load resource."
msgstr "Falha ao carregar recurso."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Copy Properties"
-msgstr "Propriedades"
+msgstr "Copiar Propriedades"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Paste Properties"
-msgstr "Propriedades"
+msgstr "Colar Propriedades"
#: editor/inspector_dock.cpp
msgid "Make Sub-Resources Unique"
@@ -4452,23 +4445,20 @@ msgid "Save As..."
msgstr "Guardar Como..."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Extra resource options."
-msgstr "Não está no caminho do recurso."
+msgstr "Opções de recurso extra."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Edit Resource from Clipboard"
-msgstr "Editar Ãrea de Transferência de Recursos"
+msgstr "Editar Recurso da Ãrea de Transferência"
#: editor/inspector_dock.cpp
msgid "Copy Resource"
msgstr "Copiar Recurso"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Make Resource Built-In"
-msgstr "Tornar Incorporado"
+msgstr "Tornar Recurso Incorporado"
#: editor/inspector_dock.cpp
msgid "Go to the previous edited object in history."
@@ -4483,9 +4473,8 @@ msgid "History of recently edited objects."
msgstr "Histórico de Objetos recentemente editados."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Open documentation for this object."
-msgstr "Abrir documentação"
+msgstr "Abrir documentação para este objeto."
#: editor/inspector_dock.cpp editor/scene_tree_dock.cpp
msgid "Open Documentation"
@@ -4496,9 +4485,8 @@ msgid "Filter properties"
msgstr "Propriedades do Filtro"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Manage object properties."
-msgstr "Propriedades do Objeto."
+msgstr "Gerir propriedades do objeto."
#: editor/inspector_dock.cpp
msgid "Changes may be lost!"
@@ -4742,9 +4730,8 @@ msgid "Blend:"
msgstr "Mistura:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Parameter Changed:"
-msgstr "Mudança de Parâmetro"
+msgstr "Parâmetro Alterado:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -5318,11 +5305,11 @@ msgstr "Erro de ligação, tente novamente."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't connect."
-msgstr "Não consigo conectar."
+msgstr "Incapaz de conectar."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't connect to host:"
-msgstr "Não consigo ligar ao host:"
+msgstr "Incapaz de ligar ao host:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "No response from host:"
@@ -5334,11 +5321,11 @@ msgstr "Sem resposta."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr "Não consigo resolver hostname:"
+msgstr "Incapaz de resolver hostname:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr "Não consigo resolver."
+msgstr "Incapaz de resolver."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Request failed, return code:"
@@ -5346,7 +5333,7 @@ msgstr "Falha na solicitação, código de retorno:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Cannot save response to:"
-msgstr "Não consigo guardar resposta para:"
+msgstr "Incapaz de guardar resposta para:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Write error."
@@ -5390,7 +5377,7 @@ msgstr "Falhou a verificação hash SHA-256"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr "Erro na transferência de Ativo:"
+msgstr "Erro na Transferência de Recurso:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Downloading (%s / %s)..."
@@ -5426,7 +5413,7 @@ msgstr "Erro na transferência"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr "A transferência deste Ativo já está em andamento!"
+msgstr "A transferência deste recurso já está em andamento!"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Recently Updated"
@@ -5474,11 +5461,11 @@ msgstr "Todos"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search templates, projects, and demos"
-msgstr ""
+msgstr "Procurar modelos, projetos e demos"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search assets (excluding templates, projects, and demos)"
-msgstr ""
+msgstr "Procurar recursos (excluindo modelos, projetos e demos)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Import..."
@@ -5518,28 +5505,27 @@ msgstr "A Carregar..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
-msgstr "Ficheiro ZIP de Ativos"
+msgstr "Ficheiro ZIP de Recursos"
#: editor/plugins/audio_stream_editor_plugin.cpp
msgid "Audio Preview Play/Pause"
-msgstr ""
+msgstr "Play/Pause Pré-visualização Ãudio"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
-"Não consigo determinar um caminho para guardar imagens lightmap.\n"
+"Incapaz de determinar um caminho para guardar imagens lightmap.\n"
"Guarde a sua cena e tente novamente."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"No meshes to bake. Make sure they contain an UV2 channel and that the 'Use "
"In Baked Light' and 'Generate Lightmap' flags are on."
msgstr ""
-"Não há malhas para consolidar. Assegure-se que contêm um canal UV2 e que a "
-"referência 'Bake Light' flag está on."
+"Não há malhas para consolidar. Assegure-se que contêm um canal UV2 e que "
+"'Use In Baked Light' e 'Generate Lightmap' estão ativas."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed creating lightmap images, make sure path is writable."
@@ -5680,6 +5666,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Mover CanvasItem \"%s\" para (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Bloquear Seleção"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grupos"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -5781,13 +5779,12 @@ msgstr "Mudar âncoras"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid ""
"Project Camera Override\n"
"Overrides the running project's camera with the editor viewport camera."
msgstr ""
-"Sobreposição de Câmara de Jogo\n"
-"Sobrepõe câmara de jogo com câmara viewport do editor."
+"Sobreposição de Câmara do Projeto\n"
+"Substitui a câmara do projeto pela câmara viewport do editor."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5863,31 +5860,27 @@ msgstr "Modo Seleção"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Drag: Rotate selected node around pivot."
-msgstr "Remover nó ou transição selecionado."
+msgstr "Arrastar: Roda o nó selecionado à volta do pivô."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Alt+Drag: Move selected node."
-msgstr "Alt+Arrastar: Mover"
+msgstr "Alt+Arrastar: Mover nó selecionado."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "V: Set selected node's pivot position."
-msgstr "Remover nó ou transição selecionado."
+msgstr "V: Define posição do pivô do nó selecionado."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Alt+RMB: Show list of all nodes at position clicked, including locked."
msgstr ""
-"Mostra lista de todos os Objetos na posição clicada\n"
-"(o mesmo que Alt+RMB no modo seleção)."
+"Alt+RMB: Mostra lista de todos os nós na posição clicada, incluindo os "
+"trancados."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "RMB: Add node at position clicked."
-msgstr ""
+msgstr "RMB: Adicionar nó na posição clicada."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6125,14 +6118,12 @@ msgid "Clear Pose"
msgstr "Limpar Pose"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Add Node Here"
-msgstr "Adicionar Nó"
+msgstr "Adicionar Nó Aqui"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Instance Scene Here"
-msgstr "Cena(s) da Instância"
+msgstr "Instância da Cena Aqui"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
@@ -6148,49 +6139,43 @@ msgstr "Vista Pan"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 3.125%"
-msgstr ""
+msgstr "Zoom a 3.125%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 6.25%"
-msgstr ""
+msgstr "Zoom a 6.25%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 12.5%"
-msgstr ""
+msgstr "Zoom a 12.5%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 25%"
-msgstr "Diminuir Zoom"
+msgstr "Zoom a 25%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 50%"
-msgstr "Diminuir Zoom"
+msgstr "Zoom a 50%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 100%"
-msgstr "Diminuir Zoom"
+msgstr "Zoom a 100%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 200%"
-msgstr "Diminuir Zoom"
+msgstr "Zoom a 200%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 400%"
-msgstr "Diminuir Zoom"
+msgstr "Zoom a 400%"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Zoom to 800%"
-msgstr "Diminuir Zoom"
+msgstr "Zoom a 800%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom to 1600%"
-msgstr ""
+msgstr "Zoom a 1600%"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
@@ -6202,7 +6187,7 @@ msgstr "A adicionar %s..."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Cannot instantiate multiple nodes without root."
-msgstr "Não consigo instanciar nós múltiplos sem raiz."
+msgstr "Incapaz de instanciar nós múltiplos sem raiz."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -6216,7 +6201,7 @@ msgstr "Erro a instanciar cena de %s"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Default Type"
-msgstr "Mudar Predefinição de Tipo"
+msgstr "Mudar Tipo Predefinido"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
@@ -6428,14 +6413,13 @@ msgstr "Criar Forma Estática Trimesh"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create a single convex collision shape for the scene root."
-msgstr "Não consigo criar uma única forma convexa para a raiz da cena."
+msgstr "Incapaz de criar uma única forma convexa para a raiz da cena."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create a single convex collision shape."
msgstr "Não consegui criar uma forma única de colisão convexa."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Shape"
msgstr "Criar Forma Convexa Simples"
@@ -6446,7 +6430,7 @@ msgstr "Criar Forma Convexa Simples"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Can't create multiple convex collision shapes for the scene root."
msgstr ""
-"Não consigo criar múltiplas formas de colisão convexas para a raiz da cena."
+"Incapaz de criar múltiplas formas de colisão convexas para a raiz da cena."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Couldn't create any collision shapes."
@@ -6473,9 +6457,8 @@ msgid "No mesh to debug."
msgstr "Nenhuma malha para depurar."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Mesh has no UV in layer %d."
-msgstr "O Modelo não tem UV nesta camada"
+msgstr "Malha não tem UV na camada %d."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "MeshInstance lacks a Mesh!"
@@ -6540,9 +6523,8 @@ msgstr ""
"Esta é a mais rápida (mas menos precisa) opção para deteção de colisão."
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid "Create Simplified Convex Collision Sibling"
-msgstr "Criar Irmãos Únicos de Colisão Convexa"
+msgstr "Criar Irmãos de Colisão Convexa Simples"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6556,14 +6538,14 @@ msgid "Create Multiple Convex Collision Siblings"
msgstr "Criar Vários Irmãos de Colisão Convexa"
#: editor/plugins/mesh_instance_editor_plugin.cpp
-#, fuzzy
msgid ""
"Creates a polygon-based collision shape.\n"
"This is a performance middle-ground between a single convex collision and a "
"polygon-based collision."
msgstr ""
"Cria uma forma de colisão baseada em polígonos.\n"
-"Esta uma opção de desempenho intermédio entre as duas opções acima."
+"Esta uma opção de desempenho intermédio entre uma colisão convexa única e "
+"uma colisão baseada em polígonos."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
@@ -6630,7 +6612,13 @@ msgid "Remove Selected Item"
msgstr "Remover item selecionado"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Importar da Cena"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Importar da Cena"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7205,24 +7193,30 @@ msgid "ResourcePreloader"
msgstr "ResourcePreloader"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portals"
-msgstr "Inverter na Horizontal"
+msgstr "Inverter Portais"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Room Generate Points"
-msgstr "Contagem de Pontos gerados:"
+msgstr "Quarto Gerar Pontos"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Generate Points"
-msgstr "Contagem de Pontos gerados:"
+msgstr "Gerar Pontos"
#: editor/plugins/room_manager_editor_plugin.cpp
-#, fuzzy
msgid "Flip Portal"
-msgstr "Inverter na Horizontal"
+msgstr "Inverter Portal"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Limpar Transformação"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Criar Nó"
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
@@ -7246,7 +7240,7 @@ msgstr "Erro ao escrever TextFile:"
#: editor/plugins/script_editor_plugin.cpp
msgid "Could not load file at:"
-msgstr "Não consigo carregar ficheiro em:"
+msgstr "Incapaz de carregar ficheiro em:"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error saving file!"
@@ -7282,7 +7276,7 @@ msgstr "Guardar Ficheiro Como..."
#: editor/plugins/script_editor_plugin.cpp
msgid "Can't obtain the script for running."
-msgstr "Não consigo obter o script para executar."
+msgstr "Incapaz de obter o script para executar."
#: editor/plugins/script_editor_plugin.cpp
msgid "Script failed reloading, check console for errors."
@@ -7540,7 +7534,7 @@ msgstr "Só podem ser largados recursos do Sistema de Ficheiros ."
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't drop nodes because script '%s' is not used in this scene."
-msgstr "Não consigo largar nós porque o script '%s' não é usado neste cena."
+msgstr "Incapaz de largar nós porque o script '%s' não é usado neste cena."
#: editor/plugins/script_text_editor.cpp
msgid "Lookup Symbol"
@@ -7724,12 +7718,14 @@ msgid "Skeleton2D"
msgstr "Esqueleto2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Criar Pose de Descanso (a partir de Ossos)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Pôr Ossos em Pose de Descanso"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Pôr Ossos em Pose de Descanso"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Sobrescrever"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7756,6 +7752,71 @@ msgid "Perspective"
msgstr "Perspetiva"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspetiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspetiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspetiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspetiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspetiva"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Transformação abortada."
@@ -7782,20 +7843,17 @@ msgid "None"
msgstr "Nenhum"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Rotate"
-msgstr "Modo Rodar"
+msgstr "Rodar"
#. TRANSLATORS: This refers to the movement that changes the position of an object.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translate"
-msgstr "Translação:"
+msgstr "Translação"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scale"
-msgstr "Escala:"
+msgstr "Escala"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scaling: "
@@ -7818,52 +7876,44 @@ msgid "Animation Key Inserted."
msgstr "Chave de Animação inserida."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Pitch:"
-msgstr "Inclinação"
+msgstr "Inclinação:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Yaw:"
-msgstr ""
+msgstr "Rotação:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Size:"
-msgstr "Tamanho: "
+msgstr "Tamanho:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Objects Drawn:"
-msgstr "Objetos desenhados"
+msgstr "Objetos Desenhados:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Material Changes:"
-msgstr "Mudanças de Material"
+msgstr "Mudanças de Material:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Shader Changes:"
-msgstr "Alterações do Shader"
+msgstr "Mudanças do Shader:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes:"
-msgstr "Mudanças de superfície"
+msgstr "Mudanças da Superfície:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Draw Calls:"
-msgstr "Chamadas de desenho"
+msgstr "Chamadas de Desenho:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices:"
-msgstr "Vértices"
+msgstr "Vértices:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "FPS: %d (%s ms)"
-msgstr ""
+msgstr "FPS: %d (%s ms)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
@@ -7874,42 +7924,22 @@ msgid "Bottom View."
msgstr "Vista de fundo."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Fundo"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Vista de esquerda."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Esquerda"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Vista de direita."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Direita"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Vista de frente."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Frente"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Vista de trás."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Trás"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Alinhar Transformação com Vista"
@@ -8018,9 +8048,8 @@ msgid "Freelook Slow Modifier"
msgstr "Freelook Modificador de Lentidão"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Camera Preview"
-msgstr "Mudar tamanho da Câmara"
+msgstr "Alternar Pré-visualização da Câmara"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
@@ -8042,9 +8071,8 @@ msgstr ""
"Não é uma indicação fiável do desempenho do jogo."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Convert Rooms"
-msgstr "Converter em %s"
+msgstr "Converter Quartos"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
@@ -8066,7 +8094,6 @@ msgstr ""
"(\"raios X\")."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Snap Nodes to Floor"
msgstr "Ajustar Nós ao Fundo"
@@ -8180,9 +8207,13 @@ msgid "View Grid"
msgstr "Ver grelha"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Portal Culling"
-msgstr "Configuração do Viewport"
+msgstr "Ver Culling do Portal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Ver Culling do Portal"
#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
@@ -8250,8 +8281,9 @@ msgid "Post"
msgstr "Pós"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Bugiganga sem Nome"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Projeto sem nome"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8291,7 +8323,7 @@ msgstr "Sprite está vazia!"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Can't convert a sprite using animation frames to mesh."
-msgstr "Não consigo converter sprite com frames de animação para malha."
+msgstr "Incapaz de converter sprite com frames de animação para malha."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't replace by mesh."
@@ -8303,7 +8335,7 @@ msgstr "Converter para Mesh2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create polygon."
-msgstr "Geometria inválida, não consigo criar polígono."
+msgstr "Geometria inválida, incapaz de criar polígono."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Convert to Polygon2D"
@@ -8311,7 +8343,7 @@ msgstr "Converter para Polygon2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create collision polygon."
-msgstr "Geometria inválida, não consigo criar polígono de colisão."
+msgstr "Geometria inválida, incapaz de criar polígono de colisão."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create CollisionPolygon2D Sibling"
@@ -8319,7 +8351,7 @@ msgstr "Criar Irmão de CollisionPolygon2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create light occluder."
-msgstr "Geometria inválida, não consigo criar oclusor de luz."
+msgstr "Geometria inválida, incapaz de criar oclusor de luz."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create LightOccluder2D Sibling"
@@ -8502,221 +8534,196 @@ msgid "TextureRegion"
msgstr "TextureRegion"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Colors"
-msgstr "Cor"
+msgstr "Cores"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Fonts"
-msgstr "Letra"
+msgstr "Fontes"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Icons"
-msgstr "Ãcone"
+msgstr "Ãcones"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Styleboxes"
-msgstr "StyleBox"
+msgstr "Caixas de Estilo"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} color(s)"
-msgstr ""
+msgstr "{num} cor(es)"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No colors found."
-msgstr "Sub-recurso não encontrado."
+msgstr "Cores não encontradas."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "{num} constant(s)"
-msgstr "Constantes"
+msgstr "{num} constante(s)"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No constants found."
-msgstr "Constante Cor."
+msgstr "Constantes não encontradas."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} font(s)"
-msgstr ""
+msgstr "{num} fonte(s)"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No fonts found."
-msgstr "Não encontrado!"
+msgstr "Fontes não encontradas."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} icon(s)"
-msgstr ""
+msgstr "{num} ícone(s)"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No icons found."
-msgstr "Não encontrado!"
+msgstr "Ãcones não encontrados."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} stylebox(es)"
-msgstr ""
+msgstr "{num} stylebox(es)"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No styleboxes found."
-msgstr "Sub-recurso não encontrado."
+msgstr "Styleboxes não encontradas."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} currently selected"
-msgstr ""
+msgstr "{num} selecionado atualmente"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Nothing was selected for the import."
-msgstr ""
+msgstr "Nada foi selecionado para importação."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Importing Theme Items"
-msgstr "Importar tema"
+msgstr "A Importar Itens do Tema"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Importing items {n}/{n}"
-msgstr ""
+msgstr "A importar itens {n}/{n}"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Updating the editor"
-msgstr "Sair do Editor?"
+msgstr "A atualizar o editor"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Finalizing"
-msgstr "A analisar"
+msgstr "A finalizar"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Filter:"
-msgstr "Filtros:"
+msgstr "Filtro:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "With Data"
-msgstr ""
+msgstr "Com Dados"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select by data type:"
-msgstr "Selecione um Nó"
+msgstr "Selecionar por tipo de dados:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible color items."
-msgstr "Selecionar uma separação para a apagar."
+msgstr "Selecionar todos os itens de cor visíveis."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible color items and their data."
-msgstr ""
+msgstr "Selecionar todos os itens cor visíveis e os seus dados."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible color items."
-msgstr ""
+msgstr "Desselecionar todos os itens cor visíveis."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible constant items."
-msgstr "Selecione primeiro um item de configuração!"
+msgstr "Selecione todos os itens constantes visíveis."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible constant items and their data."
-msgstr ""
+msgstr "Selecionar todos os itens constante visíveis e os seus dados."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible constant items."
-msgstr ""
+msgstr "Desselecionar todos os itens constante visíveis."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible font items."
-msgstr "Selecione primeiro um item de configuração!"
+msgstr "Selecione todos os itens fonte visíveis."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible font items and their data."
-msgstr ""
+msgstr "Selecionar todos os itens fonte visíveis e os seus dados."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible font items."
-msgstr ""
+msgstr "Desselecionar todos os itens fonte visíveis."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible icon items."
-msgstr "Selecione primeiro um item de configuração!"
+msgstr "Selecione todos os itens ícones visíveis."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all visible icon items and their data."
-msgstr "Selecione primeiro um item de configuração!"
+msgstr "Selecione todos os itens ícones visíveis e os seus dados."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Deselect all visible icon items."
-msgstr "Selecione primeiro um item de configuração!"
+msgstr "Desselecionar todos os itens ícone visíveis."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items."
-msgstr ""
+msgstr "Selecionar todos os itens stylebox visíveis."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items and their data."
-msgstr ""
+msgstr "Selecionar todos os itens stylebox visíveis e os seus dados."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible stylebox items."
-msgstr ""
+msgstr "Desselecionar todos os itens stylebox visíveis."
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Caution: Adding icon data may considerably increase the size of your Theme "
"resource."
msgstr ""
+"Aviso: Adicionar dados de ícone pode aumentar consideravelmente o tamanho do "
+"recurso Tema."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Collapse types."
-msgstr "Colapsar Tudo"
+msgstr "Colapsar tipos."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Expand types."
-msgstr "Expandir Tudo"
+msgstr "Expandir tipos."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all Theme items."
-msgstr "Selecionar Ficheiro de Modelo"
+msgstr "Selecione todos os itens Tema."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select With Data"
-msgstr "Selecionar Pontos"
+msgstr "Selecionar Com Dados"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all Theme items with item data."
-msgstr ""
+msgstr "Selecionar todos os itens Tema e os seus dados."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Deselect All"
-msgstr "Selecionar Tudo"
+msgstr "Desselecionar Tudo"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all Theme items."
-msgstr ""
+msgstr "Desselecionar todos os itens Tema."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Selected"
-msgstr "Importar Cena"
+msgstr "Importar Selecionado"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -8732,34 +8739,28 @@ msgid ""
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Color Items"
-msgstr "Remover Todos os Itens"
+msgstr "Remover Todos os Itens Cor"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Item"
-msgstr "Remover item"
+msgstr "Renomear Item"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Constant Items"
-msgstr "Remover Todos os Itens"
+msgstr "Remover Todos os Itens Constante"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Font Items"
-msgstr "Remover Todos os Itens"
+msgstr "Remover Todos os Itens Fonte"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Icon Items"
-msgstr "Remover Todos os Itens"
+msgstr "Remover Todos os Itens Ãcone"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All StyleBox Items"
-msgstr "Remover Todos os Itens"
+msgstr "Remover Todos os Itens StyleBox"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
@@ -8768,233 +8769,196 @@ msgid ""
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Color Item"
-msgstr "Adicionar Itens de Classe"
+msgstr "Adicionar Item Cor"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Constant Item"
-msgstr "Adicionar Itens de Classe"
+msgstr "Adicionar Item Constante"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Font Item"
-msgstr "Adicionar item"
+msgstr "Adicionar Item Fonte"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Icon Item"
-msgstr "Adicionar item"
+msgstr "Adicionar Item Ãcone"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Stylebox Item"
-msgstr "Adicionar Todos os Itens"
+msgstr "Adicionar Item Stylebox"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Color Item"
-msgstr "Remover Itens de Classe"
+msgstr "Renomear Item Cor"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Constant Item"
-msgstr "Remover Itens de Classe"
+msgstr "Renomear Item Constante"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Font Item"
-msgstr "Renomear Nó"
+msgstr "Renomear Item Fonte"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Icon Item"
-msgstr "Renomear Nó"
+msgstr "Renomear Item Ãcone"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Stylebox Item"
-msgstr "Remover item selecionado"
+msgstr "Renomear Item Stylebox"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Invalid file, not a Theme resource."
-msgstr "Ficheiro inválido, não é um Modelo válido de barramento de áudio."
+msgstr "Ficheiro inválido, não é um recurso de Tema."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Invalid file, same as the edited Theme resource."
-msgstr ""
+msgstr "Ficheiro inválido, o mesmo que o recurso do Tema editado."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Theme Items"
-msgstr "Gerir Modelos"
+msgstr "Gerir Itens de Tema"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Edit Items"
-msgstr "Item Editável"
+msgstr "Editar Itens"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Types:"
-msgstr "Tipo:"
+msgstr "Tipos:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type:"
-msgstr "Tipo:"
+msgstr "Adicionar Tipo:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item:"
-msgstr "Adicionar item"
+msgstr "Adicionar Item:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add StyleBox Item"
-msgstr "Adicionar Todos os Itens"
+msgstr "Adicionar Item StyleBox"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Items:"
-msgstr "Remover item"
+msgstr "Remover Itens:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Class Items"
msgstr "Remover Itens de Classe"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Items"
-msgstr "Remover Itens de Classe"
+msgstr "Remover Itens Personalizados"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Items"
msgstr "Remover Todos os Itens"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Theme Item"
-msgstr "Itens do tema GUI"
+msgstr "Adicionar Item Tema"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Old Name:"
-msgstr "Nome do Nó:"
+msgstr "Nome Antigo:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Items"
-msgstr "Importar tema"
+msgstr "Importar Itens"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Theme"
-msgstr "Predefinição"
+msgstr "Tema Predefinido"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Editor Theme"
-msgstr "Editar Tema"
+msgstr "Editor de Tema"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select Another Theme Resource:"
-msgstr "Apagar recurso"
+msgstr "Selecionar Outro Recurso Tema:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Another Theme"
-msgstr "Importar tema"
+msgstr "Outro Tema"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Confirm Item Rename"
-msgstr "Anim Renomear Pista"
+msgstr "Confirmar Renomear Item"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Cancel Item Rename"
-msgstr "Renomear em Massa"
+msgstr "Cancelar Renomear Item"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override Item"
-msgstr "Sobrepõe"
+msgstr "Sobrepor Item"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Unpin this StyleBox as a main style."
-msgstr ""
+msgstr "Desafixar este StyleBox como um estilo principal."
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Pin this StyleBox as a main style. Editing its properties will update the "
"same properties in all other StyleBoxes of this type."
msgstr ""
+"Fixar este StyleBox como um estilo principal. Editar as propriedades vai "
+"atualizar as mesmas em todos os StyleBoxes deste tipo."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type"
-msgstr "Tipo"
+msgstr "Adicionar Tipo"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item Type"
-msgstr "Adicionar item"
+msgstr "Adicionar Tipo de Item"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Node Types:"
-msgstr "Tipo de nó"
+msgstr "Tipos de Nó:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Show Default"
-msgstr "Carregar Predefinição"
+msgstr "Mostrar Predefinição"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Show default type items alongside items that have been overridden."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override All"
-msgstr "Sobrepõe"
+msgstr "Sobrepor Tudo"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Override all default type items."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Theme:"
-msgstr "Tema"
+msgstr "Tema:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Items..."
-msgstr "Gerir Modelos de Exportação..."
+msgstr "Gerir Itens..."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add, remove, organize and import Theme items."
-msgstr ""
+msgstr "Adicionar, remover, organizar e importar itens Tema."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Preview"
-msgstr "Pré-visualização"
+msgstr "Adicionar Pré-visualização"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Preview"
-msgstr "Atualizar Pré-visualização"
+msgstr "Pré-visualização Predefinida"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select UI Scene:"
-msgstr "Selecione uma Fonte Malha:"
+msgstr "Selecione Cena UI:"
#: editor/plugins/theme_editor_preview.cpp
msgid ""
@@ -9035,9 +8999,8 @@ msgid "Checked Radio Item"
msgstr "Item Rádio Marcado"
#: editor/plugins/theme_editor_preview.cpp
-#, fuzzy
msgid "Named Separator"
-msgstr "Sep. Nomeado"
+msgstr "Separador Nomeado"
#: editor/plugins/theme_editor_preview.cpp
msgid "Submenu"
@@ -9096,9 +9059,8 @@ msgid "Invalid PackedScene resource, must have a Control node at its root."
msgstr ""
#: editor/plugins/theme_editor_preview.cpp
-#, fuzzy
msgid "Invalid file, not a PackedScene resource."
-msgstr "Ficheiro inválido, não é um Modelo válido de barramento de áudio."
+msgstr "Ficheiro inválido, não é um recurso PackedScene."
#: editor/plugins/theme_editor_preview.cpp
msgid "Reload the scene to reflect its most actual state."
@@ -10495,9 +10457,8 @@ msgid "VisualShader"
msgstr "VIsualShader"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Edit Visual Property:"
-msgstr "Editar Propriedade Visual"
+msgstr "Editar Propriedade Visual:"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Visual Shader Mode Changed"
@@ -10624,9 +10585,8 @@ msgid "Script"
msgstr "Script"
#: editor/project_export.cpp
-#, fuzzy
msgid "GDScript Export Mode:"
-msgstr "Modo Exportação de Script:"
+msgstr "Modo de Exportação GDScript:"
#: editor/project_export.cpp
msgid "Text"
@@ -10634,21 +10594,19 @@ msgstr "Texto"
#: editor/project_export.cpp
msgid "Compiled Bytecode (Faster Loading)"
-msgstr ""
+msgstr "Bytecode compilado (Carregamento mais Rápido)"
#: editor/project_export.cpp
msgid "Encrypted (Provide Key Below)"
msgstr "Encriptado (Fornecer Chave em Baixo)"
#: editor/project_export.cpp
-#, fuzzy
msgid "Invalid Encryption Key (must be 64 hexadecimal characters long)"
-msgstr "Chave de Encriptação Inválida (tem de ter 64 caracteres)"
+msgstr "Chave de Encriptação Inválida (tem de ter 64 caracteres hexadecimais)"
#: editor/project_export.cpp
-#, fuzzy
msgid "GDScript Encryption Key (256-bits as hexadecimal):"
-msgstr "Chave de Encriptação de Script (Hexadecimal 256-bits):"
+msgstr "Chave de Encriptação GDScript (hexadecimal 256-bits):"
#: editor/project_export.cpp
msgid "Export PCK/Zip"
@@ -10722,13 +10680,12 @@ msgid "Imported Project"
msgstr "Projeto importado"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project name."
-msgstr "Nome do Projeto Inválido."
+msgstr "Nome do projeto inválido."
#: editor/project_manager.cpp
msgid "Couldn't create folder."
-msgstr "Não consigo criar pasta."
+msgstr "Incapaz de criar pasta."
#: editor/project_manager.cpp
msgid "There is already a folder in this path with the specified name."
@@ -10752,11 +10709,11 @@ msgstr ""
#: editor/project_manager.cpp
msgid "Couldn't edit project.godot in project path."
-msgstr "Não consigo editar project.godot no caminho do projeto."
+msgstr "Incapaz de editar project.godot no caminho do projeto."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
-msgstr "Não consigo criar project.godot no caminho do projeto."
+msgstr "Incapaz de criar project.godot no caminho do projeto."
#: editor/project_manager.cpp
msgid "Error opening package file, not in ZIP format."
@@ -10870,7 +10827,7 @@ msgstr "Erro: Projeto inexistente no sistema de ficheiros."
#: editor/project_manager.cpp
msgid "Can't open project at '%s'."
-msgstr "Não consigo abrir projeto em '%s'."
+msgstr "Incapaz de abrir projeto em '%s'."
#: editor/project_manager.cpp
msgid "Are you sure to open more than one project?"
@@ -10932,7 +10889,7 @@ msgid ""
"Please edit the project and set the main scene in the Project Settings under "
"the \"Application\" category."
msgstr ""
-"Não consigo executar o projeto: cena principal não definida.\n"
+"Incapaz de executar o projeto: cena principal não definida.\n"
"Edite o projeto e defina a cena principal em Configurações do Projeto dentro "
"da categoria \"Application\"."
@@ -10941,7 +10898,7 @@ msgid ""
"Can't run project: Assets need to be imported.\n"
"Please edit the project to trigger the initial import."
msgstr ""
-"Não consigo executar o projeto: Ativos têm de ser importados.\n"
+"Incapaz de executar o projeto: Recursos têm de ser importados.\n"
"Edite o projeto para desencadear a importação inicial."
#: editor/project_manager.cpp
@@ -10949,14 +10906,12 @@ msgid "Are you sure to run %d projects at once?"
msgstr "Está seguro que quer executar %d projetos em simultâneo?"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove %d projects from the list?"
-msgstr "Selecionar aparelho da lista"
+msgstr "Remover %d projetos da lista?"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove this project from the list?"
-msgstr "Selecionar aparelho da lista"
+msgstr "Remover este projeto da lista?"
#: editor/project_manager.cpp
msgid ""
@@ -10989,9 +10944,8 @@ msgid "Project Manager"
msgstr "Gestor de Projetos"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Local Projects"
-msgstr "Projetos"
+msgstr "Projetos Locais"
#: editor/project_manager.cpp
msgid "Loading, please wait..."
@@ -11002,41 +10956,36 @@ msgid "Last Modified"
msgstr "Última modificação"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Edit Project"
-msgstr "Exportar Projeto"
+msgstr "Editar Projeto"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Run Project"
-msgstr "Renomear Projeto"
+msgstr "Executar Projeto"
#: editor/project_manager.cpp
msgid "Scan"
-msgstr "Analisar"
+msgstr "Pequisar"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Scan Projects"
-msgstr "Projetos"
+msgstr "Pesquisar Projetos"
#: editor/project_manager.cpp
msgid "Select a Folder to Scan"
-msgstr "Selecione uma pasta para analisar"
+msgstr "Selecione uma Pasta para Pesquisar"
#: editor/project_manager.cpp
msgid "New Project"
msgstr "Novo Projeto"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Import Project"
-msgstr "Projeto importado"
+msgstr "Importar Projeto"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Remove Project"
-msgstr "Renomear Projeto"
+msgstr "Remover Projeto"
#: editor/project_manager.cpp
msgid "Remove Missing"
@@ -11047,9 +10996,8 @@ msgid "About"
msgstr "Sobre"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Asset Library Projects"
-msgstr "Biblioteca de Ativos"
+msgstr "Projetos Biblioteca de Recursos"
#: editor/project_manager.cpp
msgid "Restart Now"
@@ -11065,7 +11013,7 @@ msgstr ""
#: editor/project_manager.cpp
msgid "Can't run project"
-msgstr "Não consigo executar o Projeto"
+msgstr "Incapaz de executar o projeto"
#: editor/project_manager.cpp
msgid ""
@@ -11073,22 +11021,20 @@ msgid ""
"Would you like to explore official example projects in the Asset Library?"
msgstr ""
"Atualmente não tem quaisquer projetos.\n"
-"Gostaria de explorar os projetos de exemplo oficiais na Biblioteca de Ativos?"
+"Gostaria de explorar os projetos de exemplo oficiais na Biblioteca de "
+"Recursos?"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Filter projects"
-msgstr "Propriedades do Filtro"
+msgstr "Filtrar projetos"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"This field filters projects by name and last path component.\n"
"To filter projects by name and full path, the query must contain at least "
"one `/` character."
msgstr ""
-"A caixa de pesquisa filtra projetos por nome e último componente do "
-"caminho.\n"
+"Este campo filtra projetos por nome e última componente do caminho.\n"
"Para filtrar projetos por nome e caminho completo, a pesquisa tem de conter "
"pelo menos um caráter `/`."
@@ -11098,7 +11044,7 @@ msgstr "Tecla "
#: editor/project_settings_editor.cpp
msgid "Physical Key"
-msgstr ""
+msgstr "Chave Física"
#: editor/project_settings_editor.cpp
msgid "Joy Button"
@@ -11146,7 +11092,7 @@ msgstr "Aparelho"
#: editor/project_settings_editor.cpp
msgid " (Physical)"
-msgstr ""
+msgstr " (Físico)"
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key..."
@@ -11289,23 +11235,20 @@ msgid "Override for Feature"
msgstr "Sobrepor por Característica"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Add %d Translations"
-msgstr "Adicionar tradução"
+msgstr "Adicionar %t Traduções"
#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "Remover tradução"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Translation Resource Remap: Add %d Path(s)"
-msgstr "Recurso Remap Adicionar Remap"
+msgstr "Remapear Recurso Tradução: Adicionar %d Caminho(s)"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Translation Resource Remap: Add %d Remap(s)"
-msgstr "Recurso Remap Adicionar Remap"
+msgstr "Remapear Recurso Tradução: Adicionar %d Remap(s)"
#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
@@ -11664,7 +11607,7 @@ msgid ""
"Cannot instance the scene '%s' because the current scene exists within one "
"of its nodes."
msgstr ""
-"Não consigo instanciar a cena '%s' porque a cena atual existe dentro de um "
+"Incapaz de instanciar a cena '%s' porque a cena atual existe dentro de um "
"dos seus nós."
#: editor/scene_tree_dock.cpp
@@ -11681,7 +11624,7 @@ msgstr "Instanciar Cena Filha"
#: editor/scene_tree_dock.cpp
msgid "Can't paste root node into the same scene."
-msgstr "Não consigo colar o nó raiz na mesma cena."
+msgstr "Incapaz de colar o nó raiz na mesma cena."
#: editor/scene_tree_dock.cpp
msgid "Paste Node(s)"
@@ -11710,7 +11653,7 @@ msgstr "Duplicar Nó(s)"
#: editor/scene_tree_dock.cpp
msgid "Can't reparent nodes in inherited scenes, order of nodes can't change."
msgstr ""
-"Não consigo reassociar nós em cenas herdadas, a ordem dos nós não pode mudar."
+"Incapaz de reassociar nós em cenas herdadas, a ordem dos nós não pode mudar."
#: editor/scene_tree_dock.cpp
msgid "Node must belong to the edited scene to become root."
@@ -11821,11 +11764,11 @@ msgstr "Outro Nó"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes from a foreign scene!"
-msgstr "Não consigo operar em nós de uma cena externa!"
+msgstr "Incapaz de operar em nós de uma cena externa!"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes the current scene inherits from!"
-msgstr "Não consigo operar em nós herdados pela cena atual!"
+msgstr "Incapaz de operar em nós herdados pela cena atual!"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on instanced scenes."
@@ -11852,7 +11795,7 @@ msgid ""
"Couldn't save new scene. Likely dependencies (instances) couldn't be "
"satisfied."
msgstr ""
-"Não consigo guardar nova cena. Provavelmente dependências (instâncias) não "
+"Incapaz de guardar nova cena. Provavelmente dependências (instâncias) não "
"foram satisfeitas."
#: editor/scene_tree_dock.cpp
@@ -11885,7 +11828,7 @@ msgid ""
"This is probably because this editor was built with all language modules "
"disabled."
msgstr ""
-"Não consigo anexar um script: não há linguagens registadas.\n"
+"Incapaz de anexar um script: não há linguagens registadas.\n"
"Isto provavelmente acontece porque o editor foi compilado com todos os "
"módulos de linguagem desativados."
@@ -12101,7 +12044,7 @@ msgstr "Erro ao carregar Modelo '%s'"
#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
-msgstr "Erro - Não consigo criar script no sistema de ficheiros."
+msgstr "Erro - Incapaz de criar script no sistema de ficheiros."
#: editor/script_create_dialog.cpp
msgid "Error loading script from %s"
@@ -12247,7 +12190,7 @@ msgstr "Copiar Erro"
#: editor/script_editor_debugger.cpp
msgid "Open C++ Source on GitHub"
-msgstr ""
+msgstr "Abrir Código C++ no GitHub"
#: editor/script_editor_debugger.cpp
msgid "Video RAM"
@@ -12426,14 +12369,22 @@ msgid "Change Ray Shape Length"
msgstr "Mudar comprimento da forma raio"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Room Point Position"
-msgstr "Definir posição do Ponto da curva"
+msgstr "Definir Posição do Ponto do Quarto"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Portal Point Position"
-msgstr "Definir posição do Ponto da curva"
+msgstr "Definir Posição do Ponto do Portal"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Mudar Raio da Forma Cilindro"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Definir curva na posição"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -12530,8 +12481,8 @@ msgstr "Formato de dicionário de instância inválido (falta @path)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (can't load script at @path)"
msgstr ""
-"Formato de dicionário de instância inválido (não consigo carregar o script "
-"em @path)"
+"Formato de dicionário de instância inválido (incapaz de carregar o script em "
+"@path)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (invalid script at @path)"
@@ -12546,14 +12497,12 @@ msgid "Object can't provide a length."
msgstr "Objeto não fornece um comprimento."
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "Export Mesh GLTF2"
-msgstr "Exportar Biblioteca de Malhas"
+msgstr "Exportar Malha GLTF2"
#: modules/gltf/editor_scene_exporter_gltf_plugin.cpp
-#, fuzzy
msgid "Export GLTF..."
-msgstr "Exportar..."
+msgstr "Exportar GLTF..."
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
@@ -12596,9 +12545,8 @@ msgid "GridMap Paint"
msgstr "Pintura do GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Selection"
-msgstr "Seleção de Preenchimento de GridMap"
+msgstr "Seleção de GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Grid Map"
@@ -12720,6 +12668,11 @@ msgstr "A Traçar lightmaps"
msgid "Class name can't be a reserved keyword"
msgstr "Nome de classe não pode ser uma palavra-chave reservada"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Preencher Seleção"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Fim do stack trace de exceção interna"
@@ -12850,18 +12803,16 @@ msgid "Add Output Port"
msgstr "Adicionar Porta de Saída"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Type"
-msgstr "Mudar tipo"
+msgstr "Mudar Tipo de Porta"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Port Name"
-msgstr "Mudar nome de porta de entrada"
+msgstr "Mudar Nome da Porta"
#: modules/visual_script/visual_script_editor.cpp
msgid "Override an existing built-in function."
-msgstr "Sobrepõe-se a função incorporada existente."
+msgstr "Sobrepõe uma função incorporada existente."
#: modules/visual_script/visual_script_editor.cpp
msgid "Create a new function."
@@ -12972,9 +12923,8 @@ msgid "Add Preload Node"
msgstr "Adicionar Nó de Pré-carregamento"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Node(s)"
-msgstr "Adicionar Nó"
+msgstr "Adicionar Nó(s)"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Node(s) From Tree"
@@ -12985,8 +12935,7 @@ msgid ""
"Can't drop properties because script '%s' is not used in this scene.\n"
"Drop holding 'Shift' to just copy the signature."
msgstr ""
-"Não consigo largar propriedades porque o script '%s' não é usado neste "
-"cena.\n"
+"Incapaz de largar propriedades porque o script '%s' não é usado neste cena.\n"
"Largue com 'Shift' para copiar apenas a assinatura."
#: modules/visual_script/visual_script_editor.cpp
@@ -13039,7 +12988,7 @@ msgstr "Redimensionar Comentário"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
-msgstr "Não consigo copiar o nó função."
+msgstr "Incapaz de copiar o nó função."
#: modules/visual_script/visual_script_editor.cpp
msgid "Paste VisualScript Nodes"
@@ -13047,11 +12996,11 @@ msgstr "Colar Nós VisualScript"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't create function with a function node."
-msgstr "Não consigo criar função com um nó função."
+msgstr "Incapaz de criar função com um nó função."
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't create function of nodes from nodes of multiple functions."
-msgstr "Não consigo criar função de nós a partir de nós de várias funções."
+msgstr "Incapaz de criar função de nós a partir de nós de várias funções."
#: modules/visual_script/visual_script_editor.cpp
msgid "Select at least one node with sequence port."
@@ -13206,75 +13155,69 @@ msgstr "Procurar VisualScript"
msgid "Get %s"
msgstr "Obter %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Falta o nome do pacote."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Os segmentos de pacote devem ser de comprimento diferente de zero."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
"O carácter '%s' não é permitido em nomes de pacotes de aplicações Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "Um dígito não pode ser o primeiro carácter num segmento de pacote."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
"O carácter '%s' não pode ser o primeiro carácter num segmento de pacote."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "O pacote deve ter pelo menos um separador '.'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Selecionar aparelho da lista"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
-msgstr ""
+msgstr "A executar em %s"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
-msgstr "A Exportar Tudo"
+msgstr "A Exportar APK..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
-msgstr "Desinstalar"
+msgstr "A desinstalar..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
-msgstr "A carregar, espere por favor..."
+msgstr "A instalar no dispositivo, espere por favor..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
-msgstr "Não consegui iniciar o subprocesso!"
+msgstr "Incapaz de instalar o dispositivo: %s"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
-msgstr "A executar Script Customizado..."
+msgstr "A executar no dispositivo..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
-msgstr "Não consegui criar pasta."
+msgstr "Incapaz de executar no dispositivo."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "Incapaz de localizar a ferramenta 'apksigner'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13282,69 +13225,69 @@ msgstr ""
"Modelo de compilação Android não está instalado neste projeto. Instale-o no "
"menu Projeto."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Keystore de depuração não configurada nas Configurações do Editor e nem na "
"predefinição."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"Lançamento de keystore configurado incorretamente na predefinição exportada."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"É necessário um caminho válido para o Android SDK no Editor de Configurações."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "Caminho inválido para o Android SDK no Editor de Configurações."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "Diretoria 'platform-tools' em falta!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "Incapaz de encontrar o comando adb das ferramentas Android SDK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Por favor confirme a pasta do Android SDK especificada no Editor de "
"Configurações."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "Diretoria 'build-tools' em falta!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr "Incapaz de encontrar o comando apksigner das ferramentas Android SDK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Chave pública inválida para expansão APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Nome de pacote inválido:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13352,39 +13295,25 @@ msgstr ""
"Módulo inválido \"GodotPaymentV3\" incluído na configuração do projeto "
"\"android/modules\" (alterado em Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
"\"Usar Compilação Personalizada\" têm de estar ativa para usar os plugins."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Graus de Liberdade\" só é válido quando \"Modo Xr\" é \"Oculus Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"Rastreamento de Mão\" só é válido quando \"Modo Xr\" é \"Oculus Mobile VR"
"\"."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Consciência do Foco\" só é válido quando \"Modo Xr\" é \"Oculus Mobile VR"
-"\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"\"Exportar AAB\" só é válido quando \"Usar Compilação Personalizada\" está "
"ativa."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13392,58 +13321,52 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
-msgstr ""
+msgstr "A assinar depuração %s..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
-msgstr ""
-"A analisar Ficheiros,\n"
-"Espere, por favor..."
+msgstr "A assinar lançamento %s..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
-msgstr "Não consigo abrir modelo para exportação:"
+msgstr "Incapaz de encontrar keystore e exportar."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
-msgstr ""
+msgstr "'apksigner' devolvido com erro #%d"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
-msgstr "A adicionar %s..."
+msgstr "A verificar %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
-msgstr ""
+msgstr "Falhou a verificação 'apksigner' de %s."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
-msgstr "A Exportar Tudo"
+msgstr "A exportar para Android"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
"Nome de ficheiro inválido! O Pacote Android App exige a extensão *.aab."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "Expansão APK não compatível com Pacote Android App."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "Nome de ficheiro inválido! APK Android exige a extensão *.apk."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
-msgstr ""
+msgstr "Formato de exportação não suportado!\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13451,7 +13374,7 @@ msgstr ""
"A tentar compilar a partir de um modelo personalizado, mas sem informação de "
"versão. Reinstale no menu 'Projeto'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13463,26 +13386,24 @@ msgstr ""
" Versão Godot: %s\n"
"Reinstale o modelo de compilação Android no menu 'Projeto'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
-msgstr "Impossível encontrar project.godot no Caminho do Projeto."
+msgstr "Incapaz de exportar ficheiros do projeto para projeto gradle\n"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
-msgstr "Não consigo escrever ficheiro:"
+msgstr "Incapaz de escrever ficheiro de pacote de expansão!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "A compilar Projeto Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13491,11 +13412,11 @@ msgstr ""
"Em alternativa visite docs.godotengine.org para a documentação sobre "
"compilação Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "A mover saída"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13503,24 +13424,23 @@ msgstr ""
"Incapaz de copiar e renomear ficheiro de exportação, verifique diretoria de "
"projeto gradle por resultados."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
-msgstr "Animação não encontrada: '%s'"
+msgstr "Pacote não encontrado: '%s'"
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
-msgstr "A criar contornos..."
+msgstr "A criar APK..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
-msgstr "Não consigo abrir modelo para exportação:"
+msgstr ""
+"Incapaz de encontrar modelo APK para exportar:\n"
+"%s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13528,23 +13448,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
-msgstr "A adicionar %s..."
+msgstr "A adicionar ficheiros..."
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
-msgstr "Não consigo escrever ficheiro:"
+msgstr "Incapaz de exportar ficheiros do projeto"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "A alinhar APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
-msgstr ""
+msgstr "Incapaz de unzipar APK desalinhado temporário."
#: platform/iphone/export/export.cpp platform/osx/export/export.cpp
msgid "Identifier is missing."
@@ -13557,8 +13475,7 @@ msgstr "O carácter \"%s\" não é permitido no Identificador."
#: platform/iphone/export/export.cpp
msgid "App Store Team ID not specified - cannot configure the project."
msgstr ""
-"ID da equipa da App Store não especificado - não consigo configurar o "
-"projeto."
+"ID da equipa da App Store não especificado - incapaz de configurar o projeto."
#: platform/iphone/export/export.cpp
msgid "Invalid Identifier:"
@@ -13582,7 +13499,7 @@ msgstr "Executar HTML exportado no navegador predefinido do sistema."
#: platform/javascript/export/export.cpp
msgid "Could not open template for export:"
-msgstr "Não consigo abrir modelo para exportação:"
+msgstr "Incapaz de abrir modelo para exportação:"
#: platform/javascript/export/export.cpp
msgid "Invalid export template:"
@@ -13590,32 +13507,27 @@ msgstr "Modelo de exportação inválido:"
#: platform/javascript/export/export.cpp
msgid "Could not write file:"
-msgstr "Não consigo escrever ficheiro:"
+msgstr "Incapaz de escrever ficheiro:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file:"
-msgstr "Não consigo escrever ficheiro:"
+msgstr "Incapaz de ler ficheiro:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read HTML shell:"
-msgstr "Não consigo ler shell HTML personalizado:"
+msgstr "Incapaz de ler shell HTML:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not create HTTP server directory:"
-msgstr "Não consegui criar pasta."
+msgstr "Incapaz de criar diretoria do servidor HTTP:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Error starting HTTP server:"
-msgstr "Erro ao guardar cena."
+msgstr "Erro ao iniciar servidor HTTP:"
#: platform/osx/export/export.cpp
-#, fuzzy
msgid "Invalid bundle identifier:"
-msgstr "Identificador Inválido:"
+msgstr "Identificador de pacote inválido:"
#: platform/osx/export/export.cpp
msgid "Notarization: code signing required."
@@ -14082,6 +13994,14 @@ msgstr ""
"NavigationMeshInstance tem de ser filho ou neto de um nó Navigation. Apenas "
"fornece dados de navegação."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14170,7 +14090,7 @@ msgstr ""
#: scene/3d/room.cpp
msgid "A Room cannot have another Room as a child or grandchild."
-msgstr ""
+msgstr "Um Quarto não pode ter outro Quarto como filho ou neto."
#: scene/3d/room.cpp
msgid "The RoomManager should not be placed inside a Room."
@@ -14408,6 +14328,14 @@ msgstr "Deve usar uma extensão válida."
msgid "Enable grid minimap."
msgstr "Ativar grelha do minimapa."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14460,6 +14388,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "O tamanho do viewport tem de ser maior do que 0 para renderizar."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14481,9 +14413,8 @@ msgid "Invalid comparison function for that type."
msgstr "Função de comparação inválida para este tipo."
#: servers/visual/shader_language.cpp
-#, fuzzy
msgid "Varying may not be assigned in the '%s' function."
-msgstr "Variações só podem ser atribuídas na função vértice."
+msgstr "Variações não podem ser atribuídas na função '%s'."
#: servers/visual/shader_language.cpp
msgid ""
@@ -14513,6 +14444,41 @@ msgstr "Atribuição a uniforme."
msgid "Constants cannot be modified."
msgstr "Constantes não podem ser modificadas."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Criar Pose de Descanso (a partir de Ossos)"
+
+#~ msgid "Bottom"
+#~ msgstr "Fundo"
+
+#~ msgid "Left"
+#~ msgstr "Esquerda"
+
+#~ msgid "Right"
+#~ msgstr "Direita"
+
+#~ msgid "Front"
+#~ msgstr "Frente"
+
+#~ msgid "Rear"
+#~ msgstr "Trás"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Bugiganga sem Nome"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Graus de Liberdade\" só é válido quando \"Modo Xr\" é \"Oculus Mobile VR"
+#~ "\"."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Consciência do Foco\" só é válido quando \"Modo Xr\" é \"Oculus Mobile "
+#~ "VR\"."
+
#~ msgid "Package Contents:"
#~ msgstr "Conteúdo do Pacote:"
diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po
index b7bb7ce0c4..87c8792cbf 100644
--- a/editor/translations/pt_BR.po
+++ b/editor/translations/pt_BR.po
@@ -120,12 +120,14 @@
# PauloFRs <paulofr1@hotmail.com>, 2021.
# Diego Bloise <diego-dev@outlook.com>, 2021.
# Alkoarism <Alkoarism@gmail.com>, 2021.
+# リーLee <kaualee304@gmail.com>, 2021.
+# William Weber Berrutti <wwberrutti@protonmail.ch>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: 2016-05-30\n"
-"PO-Revision-Date: 2021-08-06 06:47+0000\n"
-"Last-Translator: Alkoarism <Alkoarism@gmail.com>\n"
+"PO-Revision-Date: 2021-09-11 20:05+0000\n"
+"Last-Translator: William Weber Berrutti <wwberrutti@protonmail.ch>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_BR/>\n"
"Language: pt_BR\n"
@@ -133,7 +135,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -481,15 +483,13 @@ msgstr "Inserir Anim"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "Não é possível abrir '%s'."
+msgstr "nodo '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "Animação"
+msgstr "animação"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -497,9 +497,8 @@ msgstr "AnimationPlayer não pode animar a si mesmo, apenas outros jogadores."
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "Nenhuma propriedade '%s' existe."
+msgstr "propriedade '%s'"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -1055,7 +1054,6 @@ msgid "Edit..."
msgstr "Editar..."
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Go to Method"
msgstr "Ir ao Método"
@@ -1137,7 +1135,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Dependências"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Recurso"
@@ -1372,9 +1370,8 @@ msgid "Error opening asset file for \"%s\" (not in ZIP format)."
msgstr "Erro ao abrir o pacote \"%s\" (não está em formato ZIP)."
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "%s (already exists)"
-msgstr "%s (Já existe)"
+msgstr "%s (já existe)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
@@ -1395,7 +1392,6 @@ msgid "The following files failed extraction from asset \"%s\":"
msgstr "Os seguintes arquivos falharam na extração do asset \"% s\":"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "(and %s more files)"
msgstr "(e %s mais arquivos)"
@@ -1477,9 +1473,8 @@ msgid "Bypass"
msgstr "Ignorar"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Bus Options"
-msgstr "Opções da pista"
+msgstr "Opções do canal"
#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
#: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -1645,9 +1640,8 @@ msgid "Can't add autoload:"
msgstr "Não pode adicionar autoload:"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "%s is an invalid path. File does not exist."
-msgstr "O %s é um caminho inválido. O arquivo não existe."
+msgstr "%s é um caminho inválido. O arquivo não existe."
#: editor/editor_autoload_settings.cpp
msgid "%s is an invalid path. Not in resource path (res://)."
@@ -1675,7 +1669,6 @@ msgid "Name"
msgstr "Nome"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Global Variable"
msgstr "Variável Global"
@@ -1802,13 +1795,13 @@ msgstr ""
"Habilite 'Importar Pvrtc' em Configurações do Projeto ou desabilite 'Driver "
"Reserva Ativado'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Modelo customizado de depuração não encontrado."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1851,12 +1844,10 @@ msgid "Import Dock"
msgstr "Importar Dock"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Allows to view and edit 3D scenes."
msgstr "Permite visualizar e editar cenas 3D."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Allows to edit scripts using the integrated script editor."
msgstr "Permite editar scripts usando o editor de script integrado."
@@ -1869,17 +1860,16 @@ msgid "Allows editing the node hierarchy in the Scene dock."
msgstr "Permite editar a hierarquia de nó na doca Cena."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid ""
"Allows to work with signals and groups of the node selected in the Scene "
"dock."
-msgstr "Permite trabalhar com sinais e grupos do nó selecionado na doca Cena."
+msgstr ""
+"Permite trabalhar com sinais e grupos do nó selecionado no painel Cena."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Allows to browse the local file system via a dedicated dock."
msgstr ""
-"Permite navegar pelo sistema de arquivos local através de uma doca dedicada."
+"Permite navegar pelo sistema de arquivos local através de um painel dedicado."
#: editor/editor_feature_profile.cpp
msgid ""
@@ -1890,9 +1880,8 @@ msgstr ""
"Requer a doca FileSystem para funcionar."
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "(current)"
-msgstr "(Atual)"
+msgstr "(atual)"
#: editor/editor_feature_profile.cpp
msgid "(none)"
@@ -1931,14 +1920,12 @@ msgid "Enable Contextual Editor"
msgstr "Habilitar Editor Contextual"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Properties:"
-msgstr "Propriedades de Classe:"
+msgstr "Propriedades da Classe:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Main Features:"
-msgstr "Características principais:"
+msgstr "Características Principais:"
#: editor/editor_feature_profile.cpp
msgid "Nodes and Classes:"
@@ -1968,12 +1955,10 @@ msgid "Current Profile:"
msgstr "Perfil Atual:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Create Profile"
msgstr "Criar Perfil"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Remove Profile"
msgstr "Remover Perfil"
@@ -1995,17 +1980,14 @@ msgid "Export"
msgstr "Exportação"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Configure Selected Profile:"
msgstr "Configurar Perfil Selecionado:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Extra Options:"
msgstr "Opções Extra:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Create or import a profile to edit available classes and properties."
msgstr ""
"Criar ou importar um perfil para editar as classes e propriedades "
@@ -2036,7 +2018,6 @@ msgid "Select Current Folder"
msgstr "Selecionar a Pasta Atual"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "File exists, overwrite?"
msgstr "O arquivo já existe. Sobrescrever?"
@@ -2199,7 +2180,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Re)Importando Assets"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Início"
@@ -2712,6 +2693,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Cena atual não salva. Abrir mesmo assim?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Desfazer"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Refazer"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Não foi possível recarregar a cena pois nunca foi salva."
@@ -3068,7 +3075,6 @@ msgid "Orphan Resource Explorer..."
msgstr "Explorador de Recursos Órfãos..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reload Current Project"
msgstr "Recarregar o projeto atual"
@@ -3230,12 +3236,10 @@ msgid "Help"
msgstr "Ajuda"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Online Documentation"
msgstr "Documentação Online"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Questions & Answers"
msgstr "Perguntas & Respostas"
@@ -3244,9 +3248,8 @@ msgid "Report a Bug"
msgstr "Reportar bug"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Suggest a Feature"
-msgstr "Sugira um recurso"
+msgstr "Sugira uma funcionalidade"
#: editor/editor_node.cpp
msgid "Send Docs Feedback"
@@ -3257,9 +3260,8 @@ msgid "Community"
msgstr "Comunidade"
#: editor/editor_node.cpp
-#, fuzzy
msgid "About Godot"
-msgstr "Sobre Godot"
+msgstr "Sobre o Godot"
#: editor/editor_node.cpp
msgid "Support Godot Development"
@@ -3353,7 +3355,6 @@ msgid "Manage Templates"
msgstr "Gerenciar Templates"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Install from file"
msgstr "Instalar do arquivo"
@@ -3408,6 +3409,11 @@ msgid "Merge With Existing"
msgstr "Fundir Com Existente"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Alterar Transformação da Animação"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Abrir e Rodar um Script"
@@ -3479,7 +3485,6 @@ msgid "No sub-resources found."
msgstr "Nenhum sub-recurso encontrado."
#: editor/editor_path.cpp
-#, fuzzy
msgid "Open a list of sub-resources."
msgstr "Abra uma lista de sub-recursos."
@@ -3508,12 +3513,10 @@ msgid "Update"
msgstr "Atualizar"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Version"
msgstr "Versão"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Author"
msgstr "Autor"
@@ -3663,6 +3666,10 @@ msgstr ""
"O recurso selecionado (%s) não corresponde ao tipo esperado para essa "
"propriedade (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Tornar Único"
@@ -3682,9 +3689,8 @@ msgid "Paste"
msgstr "Colar"
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
-#, fuzzy
msgid "Convert to %s"
-msgstr "Converter Para %s"
+msgstr "Converter para %s"
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "New %s"
@@ -3734,11 +3740,10 @@ msgid "Did you forget the '_run' method?"
msgstr "Você esqueceu o método '_run'?"
#: editor/editor_spin_slider.cpp
-#, fuzzy
msgid "Hold %s to round to integers. Hold Shift for more precise changes."
msgstr ""
-"Segure Ctrl para arredondar para números inteiros. Segure Shift para aplicar "
-"mudanças mais precisas."
+"Segure %s para arredondar para inteiros. Segure Shift para aplicar mudanças "
+"mais precisas."
#: editor/editor_sub_scene.cpp
msgid "Select Node(s) to Import"
@@ -3758,11 +3763,11 @@ msgstr "Importar a Partir do Nó:"
#: editor/export_template_manager.cpp
msgid "Open the folder containing these templates."
-msgstr ""
+msgstr "Abrir a pasta contendo esses modelos."
#: editor/export_template_manager.cpp
msgid "Uninstall these templates."
-msgstr ""
+msgstr "Desinstalar esses modelos."
#: editor/export_template_manager.cpp
#, fuzzy
@@ -3776,7 +3781,7 @@ msgstr "Reconectando, por favor aguarde."
#: editor/export_template_manager.cpp
msgid "Starting the download..."
-msgstr ""
+msgstr "Iniciando o download..."
#: editor/export_template_manager.cpp
msgid "Error requesting URL:"
@@ -3788,9 +3793,8 @@ msgid "Connecting to the mirror..."
msgstr "Conectando..."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't resolve the requested address."
-msgstr "Não foi possível resolver o hostname:"
+msgstr "Não é possível resolver o endereço solicitado."
#: editor/export_template_manager.cpp
#, fuzzy
@@ -3808,18 +3812,16 @@ msgid "Request failed."
msgstr "A solicitação falhou."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Request ended up in a redirect loop."
-msgstr "A solicitação falhou, muitos redirecionamentos"
+msgstr "A solicitação acabou em um loop de redirecionamento."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Request failed:"
-msgstr "A solicitação falhou."
+msgstr "Falha na solicitação:"
#: editor/export_template_manager.cpp
msgid "Download complete; extracting templates..."
-msgstr ""
+msgstr "Download completo; extraindo modelos..."
#: editor/export_template_manager.cpp
msgid "Cannot remove temporary file:"
@@ -3846,7 +3848,7 @@ msgstr ""
#: editor/export_template_manager.cpp
msgid "Best available mirror"
-msgstr ""
+msgstr "Melhor espelho disponível"
#: editor/export_template_manager.cpp
msgid ""
@@ -3899,24 +3901,24 @@ msgid "SSL Handshake Error"
msgstr "Erro SSL Handshake"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Can't open the export templates file."
-msgstr "Não se pôde abrir zip dos modelos de exportação."
+msgstr "Não foi possível abrir o arquivo de modelos de exportação."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Invalid version.txt format inside the export templates file: %s."
-msgstr "Formato do version.txt inválido dentro de templates: %s."
+msgstr ""
+"Formato de version.txt inválido dentro do arquivo de modelos de exportação: "
+"%s."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No version.txt found inside the export templates file."
-msgstr "Não foi encontrado um version.txt dentro dos modelos."
+msgstr ""
+"Não foi possível encontrar um version.txt dentro do arquivo de modelos de "
+"exportação."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for extracting templates:"
-msgstr "Erro ao criar caminho para modelos:"
+msgstr "Erro ao criar caminho para extrair modelos:"
#: editor/export_template_manager.cpp
msgid "Extracting Export Templates"
@@ -3946,10 +3948,13 @@ msgstr "Versão Atual:"
#: editor/export_template_manager.cpp
msgid "Export templates are missing. Download them or install from a file."
msgstr ""
+"Os modelos de exportação estão faltando. Baixe-os ou instale a partir de um "
+"arquivo."
#: editor/export_template_manager.cpp
msgid "Export templates are installed and ready to be used."
msgstr ""
+"As exportações de modelos estão instaladas e prontas para serem usadas."
#: editor/export_template_manager.cpp
#, fuzzy
@@ -3958,7 +3963,7 @@ msgstr "Abrir um arquivo"
#: editor/export_template_manager.cpp
msgid "Open the folder containing installed templates for the current version."
-msgstr ""
+msgstr "Abre a pasta contendo modelos instalados para a versão atual."
#: editor/export_template_manager.cpp
msgid "Uninstall"
@@ -3986,13 +3991,15 @@ msgstr "Copiar Erro"
#: editor/export_template_manager.cpp
msgid "Download and Install"
-msgstr ""
+msgstr "Baixar e Instalar"
#: editor/export_template_manager.cpp
msgid ""
"Download and install templates for the current version from the best "
"possible mirror."
msgstr ""
+"Baixa e instala modelos para a versão atual a partir do melhor espelho "
+"possível."
#: editor/export_template_manager.cpp
msgid "Official export templates aren't available for development builds."
@@ -4043,6 +4050,8 @@ msgid ""
"The templates will continue to download.\n"
"You may experience a short editor freeze when they finish."
msgstr ""
+"Os modelos continuarão sendo baixados.\n"
+"Você pode experienciar um pequeno congelamento no editor ao terminar."
#: editor/filesystem_dock.cpp
msgid "Favorites"
@@ -4230,7 +4239,7 @@ msgstr "Renomear..."
#: editor/filesystem_dock.cpp
msgid "Focus the search box"
-msgstr ""
+msgstr "Focar a caixa de pesquisa"
#: editor/filesystem_dock.cpp
msgid "Previous Folder/File"
@@ -5598,7 +5607,7 @@ msgstr "Todos"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search templates, projects, and demos"
-msgstr ""
+msgstr "Pesquisar modelos, projetos e demonstrações"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search assets (excluding templates, projects, and demos)"
@@ -5646,7 +5655,7 @@ msgstr "Arquivo ZIP de Assets"
#: editor/plugins/audio_stream_editor_plugin.cpp
msgid "Audio Preview Play/Pause"
-msgstr ""
+msgstr "Tocar/Pausar Pré-visualização do Ãudio"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5806,6 +5815,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Mover CanvaItem \"%s\" para (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Fixar Seleção"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grupo"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6755,7 +6776,13 @@ msgid "Remove Selected Item"
msgstr "Remover Item Selecionado"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Importar da Cena"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Importar da Cena"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7354,6 +7381,16 @@ msgstr "Gerar Contagem de Pontos:"
msgid "Flip Portal"
msgstr "Inverter Horizontalmente"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Limpar Transformação"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Criar Nó"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "AnimationTree não tem caminho definido para um AnimationPlayer"
@@ -7855,12 +7892,14 @@ msgid "Skeleton2D"
msgstr "Esqueleto2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Faça Resto Pose (De Ossos)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Definir os ossos para descansar Pose"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Definir os ossos para descansar Pose"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Sobrescrever Cena Existente"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7887,6 +7926,71 @@ msgid "Perspective"
msgstr "Perspectiva"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspectiva"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Transformação Abortada."
@@ -7924,9 +8028,8 @@ msgid "Translate"
msgstr "Translação:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scale"
-msgstr "Escala:"
+msgstr "Scale"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scaling: "
@@ -7958,9 +8061,8 @@ msgid "Yaw:"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Size:"
-msgstr "Tamanho: "
+msgstr "Tamanho:"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
@@ -8005,42 +8107,22 @@ msgid "Bottom View."
msgstr "Visão inferior."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Baixo"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Visão Esquerda."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Esquerda"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Visão Direita."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Direita"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Visão Frontal."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Frente"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Visão Traseira."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Traseira"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Alinhar Transformação com a Vista"
@@ -8316,6 +8398,11 @@ msgid "View Portal Culling"
msgstr "Configurações da Viewport"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Configurações da Viewport"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Configurações..."
@@ -8381,8 +8468,9 @@ msgid "Post"
msgstr "Pós"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Coisa sem nome"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Projeto Sem Nome"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -12570,6 +12658,16 @@ msgstr "Definir Posição do Ponto da Curva"
msgid "Set Portal Point Position"
msgstr "Definir Posição do Ponto da Curva"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Alterar o Raio da Forma do Cilindro"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Colocar a Curva na Posição"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "Alterar Raio do Cilindro"
@@ -12855,6 +12953,11 @@ msgstr "Traçando mapas de luz"
msgid "Class name can't be a reserved keyword"
msgstr "Nome da classe não pode ser uma palavra reservada"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Seleção de preenchimento"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Fim da pilha de rastreamento de exceção interna"
@@ -13342,76 +13445,76 @@ msgstr "Buscar VisualScript"
msgid "Get %s"
msgstr "Receba %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Nome do pacote está faltando."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Seguimentos de pacote necessitam ser de tamanho diferente de zero."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
"O caractere '%s' não é permitido em nomes de pacotes de aplicações Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
"Um dígito não pode ser o primeiro caractere em um seguimento de pacote."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
"O caractere '%s' não pode ser o primeiro caractere em um segmento de pacote."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "O pacote deve ter pelo menos um separador '.'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Selecione um dispositivo da lista"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Exportando tudo"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Desinstalar"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Carregando, por favor aguarde."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Não foi possível instanciar cena!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Rodando Script Personalizado..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Não foi possível criar a pasta."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "Não foi possível encontrar a ferramenta 'apksigner'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13419,7 +13522,7 @@ msgstr ""
"O modelo de compilação do Android não foi instalado no projeto. Instale "
"através do menu Projeto."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
@@ -13427,13 +13530,13 @@ msgstr ""
"As configurações Debug Keystore, Debug User E Debug Password devem ser "
"configuradas OU nenhuma delas."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Porta-chaves de depuração não configurado nas Configurações do Editor e nem "
"na predefinição."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
@@ -13441,54 +13544,54 @@ msgstr ""
"As configurações de Release Keystore, Release User AND Release Password "
"devem ser definidas OU nenhuma delas."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"Keystore de liberação incorretamente configurada na predefinição de "
"exportação."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr "Um caminho Android SDK é necessário nas Configurações do Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "Caminho do Android SDK está inválido para Configurações do Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "Diretório 'ferramentas-da-plataforma' ausente!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
"Não foi possível encontrar o comando adb nas ferramentas do Android SDK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Por favor, verifique o caminho do Android SDK especificado nas Configurações "
"do Editor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "Diretório 'ferramentas-da-plataforma' está faltando !"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
"Não foi possível encontrar o comando apksigner nas ferramentas de build do "
"Android SDK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Chave pública inválida para expansão do APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Nome de pacote inválido:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13496,40 +13599,25 @@ msgstr ""
"Módulo \"GodotPaymentV3\" inválido incluido na configuração de projeto "
"\"android/modules\" (alterado em Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
"\"Usar Compilação Customizada\" precisa estar ativo para ser possível "
"utilizar plugins."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Degrees Of Freedom\" só é válido quando o \"Xr Mode\" é \"Oculus Mobile VR"
-"\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"Hand Tracking\" só é válido quando o \"Xr Mode\" é \"Oculus Mobile VR\"."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Focus Awareness\" só é válido quando o \"Oculus Mobile VR\" está no \"Xr "
-"Mode\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"\"Exportar AAB\" só é válido quando \"Usar Compilação Customizada\" está "
"habilitado."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13537,57 +13625,56 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Escaneando arquivos,\n"
"Por favor aguarde..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "Não foi possível abrir o modelo para exportar:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Adicionando %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
-msgstr "Exportando tudo"
+msgstr "Exportando para Android"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr "Nome de arquivo invalido! Android App Bunlde requer a extensão *.aab."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "A expansão APK não é compatível com o Android App Bundle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "Nome de arquivo inválido! Android APK requer a extensão *.apk."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13596,7 +13683,7 @@ msgstr ""
"nenhuma informação de versão para ele existe. Por favor, reinstale pelo menu "
"'Projeto'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13608,26 +13695,26 @@ msgstr ""
" Versão do Godot: %s\n"
"Por favor reinstale o modelo de compilação do Android pelo menu 'Projeto'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
-#, fuzzy
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
-msgstr "Não foi possível encontrar project.godot no caminho do projeto."
+msgstr ""
+"Não foi possível exportar os arquivos do projeto ao projeto do gradle\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "Não foi possível escrever o arquivo:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Construindo Projeto Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13636,11 +13723,11 @@ msgstr ""
"Alternativamente, visite docs.godotengine.org para ver a documentação de "
"compilação do Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "Movendo saída"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13648,24 +13735,24 @@ msgstr ""
"Não foi possível copiar e renomear o arquivo de exportação, verifique o "
"diretório do projeto gradle por saídas."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Animação não encontrada: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Criando contornos..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "Não foi possível abrir o modelo para exportar:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13673,21 +13760,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Adicionando %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Não foi possível escrever o arquivo:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14225,6 +14312,14 @@ msgstr ""
"NavigationMeshInstance deve ser filho ou neto de um nó Navigation. Ele "
"apenas fornece dados de navegação."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14552,6 +14647,14 @@ msgstr "Deve usar uma extensão válida."
msgid "Enable grid minimap."
msgstr "Ativar minimapa de grade."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14606,6 +14709,10 @@ msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
"O tamanho da Viewport deve ser maior do que 0 para renderizar qualquer coisa."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14659,6 +14766,41 @@ msgstr "Atribuição à uniforme."
msgid "Constants cannot be modified."
msgstr "Constantes não podem serem modificadas."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Faça Resto Pose (De Ossos)"
+
+#~ msgid "Bottom"
+#~ msgstr "Baixo"
+
+#~ msgid "Left"
+#~ msgstr "Esquerda"
+
+#~ msgid "Right"
+#~ msgstr "Direita"
+
+#~ msgid "Front"
+#~ msgstr "Frente"
+
+#~ msgid "Rear"
+#~ msgstr "Traseira"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Coisa sem nome"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Degrees Of Freedom\" só é válido quando o \"Xr Mode\" é \"Oculus Mobile "
+#~ "VR\"."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Focus Awareness\" só é válido quando o \"Oculus Mobile VR\" está no "
+#~ "\"Xr Mode\"."
+
#~ msgid "Package Contents:"
#~ msgstr "Conteúdo:"
@@ -16604,9 +16746,6 @@ msgstr "Constantes não podem serem modificadas."
#~ msgid "Images:"
#~ msgstr "Imagens:"
-#~ msgid "Group"
-#~ msgstr "Grupo"
-
#~ msgid "Sample Conversion Mode: (.wav files):"
#~ msgstr "Modo de Conversão de Amostras (arquivos .wav):"
@@ -16716,9 +16855,6 @@ msgstr "Constantes não podem serem modificadas."
#~ msgid "Deploy File Server Clients"
#~ msgstr "Instalar Clientes do Servidor de Arquivos"
-#~ msgid "Overwrite Existing Scene"
-#~ msgstr "Sobrescrever Cena Existente"
-
#~ msgid "Overwrite Existing, Keep Materials"
#~ msgstr "Sobrescrever Existente, Manter Materiais"
diff --git a/editor/translations/ro.po b/editor/translations/ro.po
index 2b1626bfe2..ecf041058c 100644
--- a/editor/translations/ro.po
+++ b/editor/translations/ro.po
@@ -1036,7 +1036,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Dependențe"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Resursă"
@@ -1708,13 +1708,13 @@ msgstr ""
"Activați „Import Etc†în Setările de proiect sau dezactivați „Driver "
"Fallback Enabledâ€."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Fișierul șablon de depanare personalizat nu a fost găsit."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2101,7 +2101,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Re)Importând Asset-uri"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Sus"
@@ -2609,6 +2609,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Scena curentă nu este salvată. Deschizi oricum?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Revenire"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Reîntoarcere"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Nu pot reîncărca o scenă care nu a fost salvată niciodată."
@@ -3295,6 +3321,11 @@ msgid "Merge With Existing"
msgstr "Contopește Cu Existentul"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim Schimbare transformare"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Deschide și Execută un Script"
@@ -3543,6 +3574,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5701,6 +5736,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Editează ObiectulPânză"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Selectează"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grupuri"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6672,7 +6719,13 @@ msgid "Remove Selected Item"
msgstr "Elimină Obiectul Selectat"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Importă din Scenă"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Importă din Scenă"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7289,6 +7342,16 @@ msgstr "Număr de Puncte Generate:"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Anim Schimbare transformare"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Creează Nod"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7810,12 +7873,14 @@ msgid "Skeleton2D"
msgstr "Singleton (Unicat)"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Încărcați Implicit"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "extindere:"
#: editor/plugins/skeleton_editor_plugin.cpp
#, fuzzy
@@ -7844,6 +7909,61 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Mod Rotație"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7960,42 +8080,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8265,6 +8365,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Editează Poligon"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Setări ..."
@@ -8330,7 +8435,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12464,6 +12569,15 @@ msgstr "Setare poziție punct de curbă"
msgid "Set Portal Point Position"
msgstr "Setare poziție punct de curbă"
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Setare Curbă În Poziție"
+
#: modules/csg/csg_gizmos.cpp
#, fuzzy
msgid "Change Cylinder Radius"
@@ -12759,6 +12873,11 @@ msgstr "Se Genereaza Lightmaps"
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Toată selecția"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13245,165 +13364,154 @@ msgstr "Curăță Scriptul"
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Selectează un dispozitiv din listă"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Exportare"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Dezinstalează"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Se recuperează oglinzile, te rog așteaptă..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Nu s-a putut porni subprocesul!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Se Execută un Script Personalizat..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Directorul nu a putut fi creat."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Nume pachet nevalid:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13411,62 +13519,62 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Se Scanează Fișierele,\n"
"Te Rog Așteaptă..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Se adaugă %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Exportare"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13474,56 +13582,56 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Unelte Animație"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Crearea conturilor..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13531,21 +13639,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Se adaugă %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Nu s-a putut porni subprocesul!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14008,6 +14116,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14300,6 +14416,14 @@ msgstr "Trebuie să utilizaţi o extensie valida."
msgid "Enable grid minimap."
msgstr "Activează minimapa in format grilă."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14340,6 +14464,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/ru.po b/editor/translations/ru.po
index 50d4484e4b..c402e80ff1 100644
--- a/editor/translations/ru.po
+++ b/editor/translations/ru.po
@@ -102,7 +102,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-08-10 21:40+0000\n"
+"PO-Revision-Date: 2021-08-14 19:04+0000\n"
"Last-Translator: Danil Alexeev <danil@alexeev.xyz>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/"
"godot/ru/>\n"
@@ -462,15 +462,13 @@ msgstr "Ð’Ñтавить"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "Ðе удаётÑÑ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚ÑŒ '%s'."
+msgstr "узел «%s»"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "ÐнимациÑ"
+msgstr "анимациÑ"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -478,9 +476,8 @@ msgstr "AnimationPlayer не может анимировать Ñам ÑебÑ,
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "СвойÑтво «%s» не ÑущеÑтвует."
+msgstr "ÑвойÑтво «%s»"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -1118,7 +1115,7 @@ msgstr ""
msgid "Dependencies"
msgstr "ЗавиÑимоÑти"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "РеÑурÑ"
@@ -1773,13 +1770,13 @@ msgstr ""
"Включите «Import Pvrtc» в ÐаÑтройках проекта или отключите «Driver Fallback "
"Enabled»."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "ПользовательÑкий отладочный шаблон не найден."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2162,7 +2159,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Ре)Импортировать"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Верх"
@@ -2399,6 +2396,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"ВращаетÑÑ Ð¿Ñ€Ð¸ перериÑовке окна редактора.\n"
+"Включена Ð¾Ð¿Ñ†Ð¸Ñ Â«ÐžÐ±Ð½Ð¾Ð²Ð»Ñть непрерывно», ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð¼Ð¾Ð¶ÐµÑ‚ увеличить "
+"Ñнергопотребление. Щёлкните, чтобы отключить её."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2676,6 +2676,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ñцена не Ñохранена. Открыть в любом Ñлучае?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Отменить"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Повторить"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Ðе возможно загрузить Ñцену, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð½Ðµ была Ñохранена."
@@ -3361,6 +3387,11 @@ msgid "Merge With Existing"
msgstr "Объединить Ñ ÑущеÑтвующей"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Изменить положение"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Открыть и запуÑтить Ñкрипт"
@@ -3617,6 +3648,10 @@ msgstr ""
"Выбранные реÑурÑÑ‹ (%s) не ÑоответÑтвуют типам, ожидаемым Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ "
"ÑвойÑтва (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Сделать уникальным"
@@ -3909,14 +3944,12 @@ msgid "Download from:"
msgstr "Загрузить из:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "ЗапуÑтить в браузере"
+msgstr "Открыть в веб-браузере"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "Копировать ошибку"
+msgstr "Копировать URL зеркала"
#: editor/export_template_manager.cpp
msgid "Download and Install"
@@ -5720,6 +5753,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Передвинуть CanvasItem «%s» в (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Заблокировать выбранное"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Группа"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6658,7 +6703,13 @@ msgid "Remove Selected Item"
msgstr "Удалить выбранный Ñлемент"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Импортировать из Ñцены"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Импортировать из Ñцены"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7249,6 +7300,16 @@ msgstr "Генерировать точки"
msgid "Flip Portal"
msgstr "Перевернуть портал"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "ОчиÑтить преобразование"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Создать узел"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "AnimationTree - не задан путь к AnimationPlayer"
@@ -7753,12 +7814,14 @@ msgid "Skeleton2D"
msgstr "2D Ñкелет"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Сделать позу Ð¿Ð¾ÐºÐ¾Ñ (из коÑтей)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "УÑтановить коÑти в позу покоÑ"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "УÑтановить коÑти в позу покоÑ"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "ПерезапиÑать ÑущеÑтвующую Ñцену"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7785,6 +7848,71 @@ msgid "Perspective"
msgstr "ПерÑпективный"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ортогональный"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "ПерÑпективный"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ортогональный"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "ПерÑпективный"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ортогональный"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "ПерÑпективный"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ортогональный"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ортогональный"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "ПерÑпективный"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ортогональный"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "ПерÑпективный"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Преобразование прервано."
@@ -7892,42 +8020,22 @@ msgid "Bottom View."
msgstr "Вид Ñнизу."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Ðиз"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Вид Ñлева."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Лево"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Вид Ñправа."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Право"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Вид Ñпереди."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Перед"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Вид Ñзади."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Зад"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "ВыровнÑть транÑформации Ñ Ð²Ð¸Ð´Ð¾Ð¼"
@@ -8200,6 +8308,11 @@ msgid "View Portal Culling"
msgstr "Отображать portal culling"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Отображать portal culling"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "ÐаÑтройки..."
@@ -8265,8 +8378,9 @@ msgid "Post"
msgstr "ПоÑле"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "БезымÑнный гизмо"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "БезымÑнный проект"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8725,6 +8839,9 @@ msgid ""
"Select a theme type from the list to edit its items.\n"
"You can add a custom type or import a type with its items from another theme."
msgstr ""
+"Выберите тип темы из ÑпиÑка, чтобы отредактировать его Ñлементы.\n"
+"Ð’Ñ‹ можете добавить пользовательÑкий тип или импортировать тип Ñ ÐµÐ³Ð¾ "
+"Ñлементами из другой темы."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Color Items"
@@ -8755,6 +8872,8 @@ msgid ""
"This theme type is empty.\n"
"Add more items to it manually or by importing from another theme."
msgstr ""
+"Этот тип темы пуÑÑ‚.\n"
+"Добавьте в него Ñлементы вручную или импортировав из другой темы."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Color Item"
@@ -12385,14 +12504,22 @@ msgid "Change Ray Shape Length"
msgstr "Изменить длину луча"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Room Point Position"
-msgstr "УÑтановить положение точки кривой"
+msgstr "Задать положение точки комнаты"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Portal Point Position"
-msgstr "УÑтановить положение точки кривой"
+msgstr "Задать положение точки портала"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Изменить Ñ€Ð°Ð´Ð¸ÑƒÑ Ñ†Ð¸Ð»Ð¸Ð½Ð´Ñ€Ð°"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "УÑтановить позицию входа кривой"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -12676,6 +12803,11 @@ msgstr "ПоÑтроение карт оÑвещениÑ"
msgid "Class name can't be a reserved keyword"
msgstr "Ð˜Ð¼Ñ ÐºÐ»Ð°ÑÑа не может быть зарезервированным ключевым Ñловом"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Заполнить выбранное"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Конец траÑÑировки внутреннего Ñтека иÑключений"
@@ -13159,74 +13291,74 @@ msgstr "ИÑкать VisualScript"
msgid "Get %s"
msgstr "Получить %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "ОтÑутÑтвует Ð¸Ð¼Ñ Ð¿Ð°ÐºÐµÑ‚Ð°."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "ЧаÑти пакета не могут быть пуÑтыми."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "Символ «%s» не разрешён в имени пакета Android-приложениÑ."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "ЧиÑло не может быть первым Ñимволом в чаÑти пакета."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "Символ «%s» не может ÑтоÑть первым в Ñегменте пакета."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "Пакет должен иметь Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ один разделитель «.»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Выберите уÑтройÑтво из ÑпиÑка"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr "ВыполнÑетÑÑ Ð½Ð° %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr "ЭкÑпорт APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr "Удаление..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr "УÑтановка на уÑтройÑтво, пожалуйÑта, ждите..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr "Ðе удалоÑÑŒ уÑтановить на уÑтройÑтво: %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr "ЗапуÑк на уÑтройÑтве..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr "Ðе удалоÑÑŒ выполнить на уÑтройÑтве."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "Ðе удалоÑÑŒ найти инÑтрумент «apksigner»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
"Шаблон Ñборки Android не уÑтановлен в проекте. УÑтановите его в меню проекта."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
@@ -13234,13 +13366,13 @@ msgstr ""
"ЛИБО должны быть заданы наÑтройки Debug Keystore, Debug User И Debug "
"Password, ЛИБО ни одна из них."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Отладочное хранилище ключей не наÑтроено ни в наÑтройках редактора, ни в "
"предуÑтановках."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
@@ -13248,50 +13380,50 @@ msgstr ""
"ЛИБО должны быть заданы наÑтройки Release Keystore, Release User И Release "
"Password, ЛИБО ни одна из них."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"Хранилище ключей не наÑтроено ни в наÑтройках редактора, ни в предуÑтановках."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"ТребуетÑÑ ÑƒÐºÐ°Ð·Ð°Ñ‚ÑŒ дейÑтвительный путь к Android SDK в ÐаÑтройках редактора."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "ÐедейÑтвительный путь Android SDK в ÐаÑтройках редактора."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Â«platform-tools» отÑутÑтвует!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "Ðе удалоÑÑŒ найти команду adb в Android SDK platform-tools."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"ПожалуйÑта, проверьте каталог Android SDK, указанный в ÐаÑтройках редактора."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Â«build-tools» отÑутÑтвует!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr "Ðе удалоÑÑŒ найти команду apksigner в Android SDK build-tools."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "ÐедейÑтвительный публичный ключ Ð´Ð»Ñ Ñ€Ð°ÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "ÐедопуÑтимое Ð¸Ð¼Ñ Ð¿Ð°ÐºÐµÑ‚Ð°:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13299,39 +13431,24 @@ msgstr ""
"ÐедопуÑтимый модуль «GodotPaymentV3», включенный в наÑтройку проекта "
"«android/modules» (изменен в Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "«Use Custom Build» должен быть включен Ð´Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¿Ð»Ð°Ð³Ð¸Ð½Ð¾Ð²."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"«Степени Ñвободы» дейÑтвительны только тогда, когда «Xr Mode» - Ñто «Oculus "
-"Mobile VR»."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"«ОтÑлеживание рук» дейÑтвует только тогда, когда «Xr Mode» - Ñто «Oculus "
"Mobile VR»."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"«ОÑведомленноÑть о фокуÑе» дейÑтвительна только в том Ñлучае, еÑли «Режим "
-"Xr» - Ñто «Oculus Mobile VR»."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"«Export AAB» дейÑтвителен только при включённой опции «ИÑпользовать "
"пользовательÑкую Ñборку»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13342,51 +13459,51 @@ msgstr ""
"ПожалуйÑта, проверьте наличие программы в каталоге Android SDK build-tools.\n"
"Результат %s не подпиÑан."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr "ПодпиÑание отладочного %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr "ПодпиÑание релиза %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr "Ðе удалоÑÑŒ найти хранилище ключей, невозможно ÑкÑпортировать."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr "«apksigner» завершилÑÑ Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ¾Ð¹ #%d"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr "Проверка %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr "Проверка «apksigner» «%s» не удалаÑÑŒ."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr "ЭкÑпорт Ð´Ð»Ñ Android"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr "Ðеверное Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°! Android App Bundle требует раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ *.aab."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "APK Expansion неÑовмеÑтимо Ñ Android App Bundle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "Ðеверное Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°! Android APK требует раÑÑˆÐ¸Ñ€ÐµÐ½Ð¸Ñ *.apk."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr "Ðеподдерживаемый формат ÑкÑпорта!\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13394,7 +13511,7 @@ msgstr ""
"Попытка Ñборки из пользовательÑкого шаблона, но информации о верÑии Ð´Ð»Ñ Ð½ÐµÐ³Ð¾ "
"не ÑущеÑтвует. ПожалуйÑта, переуÑтановите из меню «Проект»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13406,25 +13523,25 @@ msgstr ""
" ВерÑÐ¸Ñ Godot: %s\n"
"ПожалуйÑта, переуÑтановите шаблон Ñборки Android из меню «Проект»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
"Ðевозможно перезапиÑать файлы res://android/build/res/*.xml Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ проекта"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr "Ðе удалоÑÑŒ ÑкÑпортировать файлы проекта в проект gradle\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr "Ðе удалоÑÑŒ запиÑать раÑширение файла пакета!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Сборка проекта Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13433,11 +13550,11 @@ msgstr ""
"Также поÑетите docs.godotengine.org Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ð¸ по Ñборке "
"Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "Перемещение выходных данных"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13445,15 +13562,15 @@ msgstr ""
"Ðевозможно Ñкопировать и переименовать файл ÑкÑпорта, проверьте диекторию "
"проекта gradle на наличие выходных данных."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr "Пакет не найден: %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr "Создание APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
@@ -13461,7 +13578,7 @@ msgstr ""
"Ðе удалоÑÑŒ найти шаблон APK Ð´Ð»Ñ ÑкÑпорта:\n"
"%s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13472,19 +13589,19 @@ msgstr ""
"ПожалуйÑта, Ñоздайте шаблон Ñо вÑеми необходимыми библиотеками или Ñнимите "
"флажки Ñ Ð¾Ñ‚ÑутÑтвующих архитектур в преÑете ÑкÑпорта."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr "Добавление файлов..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr "Ðе удалоÑÑŒ ÑкÑпортировать файлы проекта"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "Выравнивание APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr "Ðе удалоÑÑŒ раÑпаковать временный невыровненный APK."
@@ -14021,6 +14138,14 @@ msgstr ""
"NavigationMeshInstance должен быть дочерним или под-дочерним узлом "
"Navigation. Он предоÑтавлÑет только навигационные данные."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14156,36 +14281,50 @@ msgid ""
"RoomList path is invalid.\n"
"Please check the RoomList branch has been assigned in the RoomManager."
msgstr ""
+"Путь к RoomList недейÑтвителен.\n"
+"ПожалуйÑта, проверьте, назначена ли ветка RoomList в RoomManager."
#: scene/3d/room_manager.cpp
msgid "RoomList contains no Rooms, aborting."
-msgstr ""
+msgstr "RoomList не Ñодержит комнат, отмена."
#: scene/3d/room_manager.cpp
msgid "Misnamed nodes detected, check output log for details. Aborting."
msgstr ""
+"Обнаружены неверно названные узлы, подробноÑти Ñмотрите в журнале вывода. "
+"Отмена."
#: scene/3d/room_manager.cpp
msgid "Portal link room not found, check output log for details."
msgstr ""
+"СвÑÐ·Ð°Ð½Ð½Ð°Ñ Ñ Ð¿Ð¾Ñ€Ñ‚Ð°Ð»Ð¾Ð¼ комната не найдена, подробноÑти Ñмотрите в журнале "
+"вывода."
#: scene/3d/room_manager.cpp
msgid ""
"Portal autolink failed, check output log for details.\n"
"Check the portal is facing outwards from the source room."
msgstr ""
+"Сбой автопривÑзки портала, проверьте журнал вывода Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð´Ñ€Ð¾Ð±Ð½Ð¾Ð¹ "
+"информации.\n"
+"Проверьте, что портал обращен наружу от иÑходной комнаты."
#: scene/3d/room_manager.cpp
msgid ""
"Room overlap detected, cameras may work incorrectly in overlapping area.\n"
"Check output log for details."
msgstr ""
+"Обнаружено переÑечение комнат, камеры могут работать некорректно в зоне "
+"перекрытиÑ.\n"
+"Проверьте журнал вывода Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð´Ñ€Ð¾Ð±Ð½Ð¾Ð¹ информации."
#: scene/3d/room_manager.cpp
msgid ""
"Error calculating room bounds.\n"
"Ensure all rooms contain geometry or manual bounds."
msgstr ""
+"Ошибка при вычиÑлении границ комнаты.\n"
+"УбедитеÑÑŒ, что вÑе комнаты Ñодержат геометрию или границы заданы вручную."
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
@@ -14351,6 +14490,14 @@ msgstr "Ðужно иÑпользовать доÑтупное раÑширенÐ
msgid "Enable grid minimap."
msgstr "Включить миникарту Ñетки."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14405,6 +14552,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "Размер окна проÑмотра должен быть больше 0 Ð´Ð»Ñ Ñ€ÐµÐ½Ð´ÐµÑ€Ð¸Ð½Ð³Ð°."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14461,6 +14612,41 @@ msgstr "Ðазначить форму."
msgid "Constants cannot be modified."
msgstr "КонÑтанты не могут быть изменены."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Сделать позу Ð¿Ð¾ÐºÐ¾Ñ (из коÑтей)"
+
+#~ msgid "Bottom"
+#~ msgstr "Ðиз"
+
+#~ msgid "Left"
+#~ msgstr "Лево"
+
+#~ msgid "Right"
+#~ msgstr "Право"
+
+#~ msgid "Front"
+#~ msgstr "Перед"
+
+#~ msgid "Rear"
+#~ msgstr "Зад"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "БезымÑнный гизмо"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "«Степени Ñвободы» дейÑтвительны только тогда, когда «Xr Mode» - Ñто "
+#~ "«Oculus Mobile VR»."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "«ОÑведомленноÑть о фокуÑе» дейÑтвительна только в том Ñлучае, еÑли «Режим "
+#~ "Xr» - Ñто «Oculus Mobile VR»."
+
#~ msgid "Package Contents:"
#~ msgstr "Содержимое пакета:"
@@ -16430,9 +16616,6 @@ msgstr "КонÑтанты не могут быть изменены."
#~ msgid "Images:"
#~ msgstr "ИзображениÑ:"
-#~ msgid "Group"
-#~ msgstr "Группа"
-
#~ msgid "Sample Conversion Mode: (.wav files):"
#~ msgstr "Режим Ð¿Ñ€ÐµÐ¾Ð±Ñ€Ð°Ð·Ð¾Ð²Ð°Ð½Ð¸Ñ ÑÑмплов (.wav файлы):"
@@ -16556,9 +16739,6 @@ msgstr "КонÑтанты не могут быть изменены."
#~ msgid "Deploy File Server Clients"
#~ msgstr "Развернуть файловый Ñервер Ð´Ð»Ñ ÐºÐ»Ð¸ÐµÐ½Ñ‚Ð¾Ð²"
-#~ msgid "Overwrite Existing Scene"
-#~ msgstr "ПерезапиÑать ÑущеÑтвующую Ñцену"
-
#~ msgid "Overwrite Existing, Keep Materials"
#~ msgstr "ПерезапиÑать ÑущеÑтвующую Ñцену Ñ Ñохранением материалов"
diff --git a/editor/translations/si.po b/editor/translations/si.po
index 595e0041a9..7ff9aee6fb 100644
--- a/editor/translations/si.po
+++ b/editor/translations/si.po
@@ -1018,7 +1018,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1648,13 +1648,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2026,7 +2026,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2505,6 +2505,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3130,6 +3154,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim පරිවර්තනය වෙනස් කරන්න"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3371,6 +3400,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5428,6 +5461,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6339,7 +6382,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6923,6 +6970,16 @@ msgstr ""
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Anim පරිවර්තනය වෙනස් කරන්න"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "යතුරු මක෠දමන්න"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7418,11 +7475,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7450,6 +7507,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7557,42 +7668,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7854,6 +7945,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7919,7 +8014,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11862,6 +11957,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12143,6 +12246,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12623,159 +12730,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12783,57 +12879,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12841,54 +12937,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12896,19 +12992,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13358,6 +13454,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13647,6 +13751,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13687,6 +13799,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/sk.po b/editor/translations/sk.po
index 54736cff85..2395e28105 100644
--- a/editor/translations/sk.po
+++ b/editor/translations/sk.po
@@ -1025,7 +1025,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Závislostí"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Prostriedok"
@@ -1691,13 +1691,13 @@ msgstr ""
"Povoľte 'Import Etc' v Nastaveniach Projektu, alebo vipnite 'Driver Fallback "
"Enabled'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Vlastná debug šablóna sa nenašla."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2081,7 +2081,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Re)Importovanie Asset-ov"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Top"
@@ -2590,6 +2590,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Aktuálna scéna sa neuložila. Chcete ju aj tak otvoriť?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Späť"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Prerobiť"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Nemožno naÄítaÅ¥ scénu, ktorá nikdy nebola uložená."
@@ -3274,6 +3300,11 @@ msgid "Merge With Existing"
msgstr "ZlúÄiÅ¥ s existujúcim"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim Zmeniť Veľkosť"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Otvoriť a vykonať skript"
@@ -3529,6 +3560,10 @@ msgid ""
msgstr ""
"Vybraný prostriedok (%s) sa nezhoduje žiadnemu typu pre túto vlastnosť (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "SpraviÅ¥ JedineÄným"
@@ -5659,6 +5694,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Presunúť CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Zamknúť OznaÄené"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Skupiny"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6597,7 +6644,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7199,6 +7250,15 @@ msgstr "Generovaný Bodový PoÄet:"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Vytvoriť Node"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7716,12 +7776,14 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Obnoviť na východzie"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Prepísať"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7748,6 +7810,61 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Vľavo Dole"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7864,42 +7981,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Align Transform with View"
msgstr "Všetky vybrané"
@@ -8169,6 +8266,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Signály:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -8234,7 +8336,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12355,6 +12457,15 @@ msgstr "Všetky vybrané"
msgid "Set Portal Point Position"
msgstr "Všetky vybrané"
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Všetky vybrané"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12649,6 +12760,11 @@ msgstr "Generovanie Lightmaps"
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Všetky vybrané"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13142,166 +13258,155 @@ msgstr "Vložiť"
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Export..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Odinštalovať"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "NaÄítavanie zrkadiel, prosím Äakajte..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Subprocess sa nedá spustiť!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Spustiť Vlastný Script..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "PrieÄinok sa nepodarilo vytvoriÅ¥."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid package name:"
msgstr "Nesprávna veľkosť písma."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13309,61 +13414,61 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Skenujem Súbory,\n"
"PoÄkajte Prosím..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Pridávanie %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13371,57 +13476,57 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "Popis:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "BalíÄek Obsahu:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Pripájanie..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13429,21 +13534,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Pridávanie %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Popis:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13921,6 +14026,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14212,6 +14325,14 @@ msgstr "Musíte použiť platné rozšírenie."
msgid "Enable grid minimap."
msgstr "Povoliť Prichytávanie"
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14252,6 +14373,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/sl.po b/editor/translations/sl.po
index 725f88f0ab..d505ee913c 100644
--- a/editor/translations/sl.po
+++ b/editor/translations/sl.po
@@ -1081,7 +1081,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Odvisnosti"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Viri"
@@ -1741,14 +1741,14 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#, fuzzy
msgid "Custom debug template not found."
msgstr "Predloge ni mogoÄe najti:"
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2159,7 +2159,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "Uvoz Dodatkov"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Vrh"
@@ -2685,6 +2685,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Trenutna scena ni shranjena. Vseeno odprem?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Razveljavi"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Ponovi"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Ni mogoÄe osvežiti scene, ki ni bila shranjena."
@@ -3391,6 +3417,11 @@ msgid "Merge With Existing"
msgstr "Spoji z ObstojeÄim"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Animacija Spremeni transformacijo"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Odpri & Zaženi Skripto"
@@ -3642,6 +3673,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5878,6 +5913,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Uredi Platno Stvari"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Izbira Orodja"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Skupine"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6847,7 +6894,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7455,6 +7506,16 @@ msgstr "Ustavi ToÄko"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Preoblikovanje"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Izberi Gradnik"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7988,11 +8049,12 @@ msgid "Skeleton2D"
msgstr "Posameznik"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Naložite Prevzeto"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -8022,6 +8084,61 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "NaÄin Vrtenja"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -8137,42 +8254,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8441,6 +8538,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Uredi Poligon"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Settings..."
@@ -8507,7 +8609,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12700,6 +12802,15 @@ msgstr "Nastavi Položaj Krivuljne ToÄke"
msgid "Set Portal Point Position"
msgstr "Nastavi Položaj Krivuljne ToÄke"
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Nastavi Krivuljo na Položaj"
+
#: modules/csg/csg_gizmos.cpp
#, fuzzy
msgid "Change Cylinder Radius"
@@ -12997,6 +13108,11 @@ msgstr "Ustvarjanje Svetlobnih Kart"
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Celotna izbira"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13499,166 +13615,155 @@ msgstr "Odstrani Gradnik VizualnaSkripta"
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Izberite napravo s seznama"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Izvozi"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Odstrani"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Pridobivanje virov, poÄakajte..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Nemorem zaÄeti podprocesa!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Izvajanje Skripte Po Meri..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Mape ni mogoÄe ustvariti."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid package name:"
msgstr "Neveljavno ime."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13666,62 +13771,62 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Pregledovanje Datotek,\n"
"Prosimo, PoÄakajte..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Nastavitve ZaskoÄenja"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Izvozi"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13729,56 +13834,56 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Animacijska Orodja"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Povezovanje..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13786,21 +13891,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Filtriraj datoteke..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Nemorem zaÄeti podprocesa!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14283,6 +14388,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14582,6 +14695,14 @@ msgstr "Uporabiti moraš valjavno razširitev."
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
#, fuzzy
msgid ""
@@ -14626,6 +14747,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/sq.po b/editor/translations/sq.po
index ded08d5532..2cc63728a3 100644
--- a/editor/translations/sq.po
+++ b/editor/translations/sq.po
@@ -1020,7 +1020,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Varësitë"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Resursi"
@@ -1697,13 +1697,13 @@ msgstr ""
"Lejo 'Import Etc' in Opsionet e Projektit, ose çaktivizo 'Driver Fallback "
"Enabled'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Shablloni 'Custom debug' nuk u gjet."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2104,7 +2104,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "Duke (Ri)Importuar Asetet"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Siper"
@@ -2626,6 +2626,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Skena aktuale nuk është ruajtur. Hap gjithsesi?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Zhbëj"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Ribëj"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Nuk mund të ringarkojë një skenë që nuk është ruajtur më parë."
@@ -3326,6 +3352,10 @@ msgid "Merge With Existing"
msgstr "Bashko Me Ekzistuesin"
#: editor/editor_node.cpp
+msgid "Apply MeshInstance Transforms"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Hap & Fillo një Shkrim"
@@ -3582,6 +3612,10 @@ msgstr ""
"Resursi i zgjedhur (%s) nuk përputhet me ndonjë tip të pritur për këtë veti "
"(%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Bëje Unik"
@@ -5718,6 +5752,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Zgjidh"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grupet"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6637,7 +6683,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7226,6 +7276,16 @@ msgstr "Fut një Pikë"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Binari i Transformimeve 3D"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Fshi Nyjen"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7734,12 +7794,14 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Ngarko të Parazgjedhur"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Mbishkruaj"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7766,6 +7828,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7878,42 +7994,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8179,6 +8275,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Settings..."
@@ -8245,7 +8345,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12301,6 +12401,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12590,6 +12698,10 @@ msgstr "Duke Gjeneruar Hartat e Dritës"
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13075,165 +13187,154 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Zgjidh paisjen nga lista"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Eksporto"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Çinstalo"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Duke marrë pasqyrat, ju lutem prisni..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Nuk mund të fillojë subprocess-in!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Duke Ekzekutuar Shkrimin..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Nuk mund të krijoj folderin."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13241,61 +13342,61 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Duke Skanuar Skedarët,\n"
"Ju Lutem Prisini..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Duke u lidhur..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13303,56 +13404,56 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Instaluesi Paketave"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Duke u lidhur..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13360,21 +13461,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Filtro Skedarët..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Nuk mund të fillojë subprocess-in!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13832,6 +13933,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14121,6 +14230,14 @@ msgstr "Duhet të perdorësh një shtesë të lejuar."
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14161,6 +14278,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po
index 0a915e03bf..bb56bcbe29 100644
--- a/editor/translations/sr_Cyrl.po
+++ b/editor/translations/sr_Cyrl.po
@@ -1134,7 +1134,7 @@ msgstr ""
msgid "Dependencies"
msgstr "ЗавиÑноÑти"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "РеÑурÑ"
@@ -1824,14 +1824,14 @@ msgstr ""
"Омогући 'Увоз Etc' у подешавањима пројекта, или онемогући 'Поваратак "
"Управљача Омогућен'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#, fuzzy
msgid "Custom debug template not found."
msgstr "ШаблонÑка датотека није пронађена:\n"
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
#, fuzzy
@@ -2253,7 +2253,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Поновно) Увожење ÑредÑтава"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Врх"
@@ -2803,6 +2803,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Тренутна Ñцена није Ñачувана. Ипак отвори?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Опозови"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Поново уради"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Ðе могу поново учитати Ñцену која није Ñачувана."
@@ -3532,6 +3558,11 @@ msgid "Merge With Existing"
msgstr "Споји Ñа поÑтојећим"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Промени положај"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Отвори и покрени Ñкриптицу"
@@ -3812,6 +3843,10 @@ msgstr ""
"Одабрани реÑÑƒÑ€Ñ (%s) не одговара ни једној очекиваној врÑти за ову оÑобину "
"(%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
#, fuzzy
msgid "Make Unique"
@@ -6144,6 +6179,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Уреди CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Закључај одабрано"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Групе"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid ""
"Children of containers have their anchors and margins values overridden by "
@@ -7190,7 +7237,13 @@ msgid "Remove Selected Item"
msgstr "Обриши одабрану Ñтвар"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Увези из Ñцене"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Увези из Ñцене"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7834,6 +7887,16 @@ msgstr "Број генериÑаних тачака:"
msgid "Flip Portal"
msgstr "Обрни Хоризонтално"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "ОчиÑти ТранÑформацију"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Ðаправи чвор"
+
#: editor/plugins/root_motion_editor_plugin.cpp
#, fuzzy
msgid "AnimationTree has no path set to an AnimationPlayer"
@@ -8399,13 +8462,13 @@ msgstr "Синглетон2Д"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
-msgid "Make Rest Pose (From Bones)"
-msgstr "Ðаправи Одмор Позу(од КоÑтију)"
+msgid "Reset to Rest Pose"
+msgstr "ПоÑтави КоÑке у Одмор Позу"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
#, fuzzy
-msgid "Set Bones to Rest Pose"
-msgstr "ПоÑтави КоÑке у Одмор Позу"
+msgid "Overwrite Rest Pose"
+msgstr "Препиши"
#: editor/plugins/skeleton_editor_plugin.cpp
#, fuzzy
@@ -8436,6 +8499,71 @@ msgid "Perspective"
msgstr "ПерÑпективна пројекција"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ортогонална пројекција"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "ПерÑпективна пројекција"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ортогонална пројекција"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "ПерÑпективна пројекција"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ортогонална пројекција"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "ПерÑпективна пројекција"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ортогонална пројекција"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ортогонална пројекција"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "ПерÑпективна пројекција"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ортогонална пројекција"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "ПерÑпективна пројекција"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "ТранÑформација прекинута."
@@ -8555,42 +8683,22 @@ msgid "Bottom View."
msgstr "Поглед одоздо."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Доле"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Леви поглед."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Лево"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "ДеÑни поглед."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "деÑно"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Поглед Ñпреда."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "ИÑпред"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Бочни поглед."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Бок"
-
-#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Align Transform with View"
msgstr "Поравнавање Ñа погледом"
@@ -8873,6 +8981,11 @@ msgid "View Portal Culling"
msgstr "ПоÑтавке прозора"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "ПоÑтавке прозора"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Settings..."
@@ -8941,8 +9054,8 @@ msgstr "ПоÑле"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
-msgid "Nameless gizmo"
-msgstr "Безимена ручка"
+msgid "Unnamed Gizmo"
+msgstr "Ðеименован Пројекат"
#: editor/plugins/sprite_editor_plugin.cpp
#, fuzzy
@@ -13809,6 +13922,16 @@ msgstr "ПоÑтави позицију тачке криве"
msgid "Set Portal Point Position"
msgstr "ПоÑтави позицију тачке криве"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Промени ОпÑег Цилиндар Облика"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "ПоÑтави почетну позицију криве"
+
#: modules/csg/csg_gizmos.cpp
#, fuzzy
msgid "Change Cylinder Radius"
@@ -14155,6 +14278,11 @@ msgstr "Скована Светла:"
msgid "Class name can't be a reserved keyword"
msgstr "Има КлаÑе не може бити резервиÑана кључна реч"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "ИÑпуни одабрано"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
#, fuzzy
msgid "End of inner exception stack trace"
@@ -14685,79 +14813,79 @@ msgstr "Потражи VisualScript"
msgid "Get %s"
msgstr "Повуци %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package name is missing."
msgstr "ÐедоÑтаје име паковања."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package segments must be of non-zero length."
msgstr "Одломци паковања не могу бити нулте дужине."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "The character '%s' is not allowed in Android application package names."
msgstr "Карактер '%s' није дозвољен у именима паковања Android апликације."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "A digit cannot be the first character in a package segment."
msgstr "Цифра не може бити први карактер у одломку паковања."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "Карактер '%s' не може бити први карактер у одломку паковања."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "The package must have at least one '.' separator."
msgstr "Паковање мора имати бар један '.' раздвојник."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Одабери уређај Ñа лиÑте"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Извоз"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "ДеинÑталирај"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Прихватам одредишта, молим Ñачекајте..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Ðе могу покренути подпроцеÑ!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Обрађивање Ñкриптице..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "ÐеуÑпех при прављењу директоријума."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Android build template not installed in the project. Install it from the "
@@ -14766,107 +14894,96 @@ msgstr ""
"Android нацрт изградње није инÑталиран у пројекат. ИнÑталирај га из Пројекат "
"менија."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Сладиште кључева Разгрешеника није подешено у Подешавањима Уредника ни у "
"поÑтавкама."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"Сладиште кључева Разгрешеника није подешено у Подешавањима Уредника ни у "
"поÑтавкама."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"Ðеважећа Android SDK путања за произвољну изградњу у Подешавањима Уредника."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
"Ðеважећа Android SDK путања за произвољну изградњу у Подешавањима Уредника."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Ðеважећа Android SDK путања за произвољну изградњу у Подешавањима Уредника."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid public key for APK expansion."
msgstr "Ðеважећи јавни кључ за ÐПК проширење."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid package name:"
msgstr "Ðеважеће име паковања:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -14874,57 +14991,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Скенирање датотека,\n"
"Молим Ñачекајте..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "ÐеуÑпешно отварање нацрта за извоз:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Додавање %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Извоз"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Trying to build from a custom built template, but no version info for it "
@@ -14933,7 +15050,7 @@ msgstr ""
"Покушај изградње за произвољни нацрт изградње, али не поÑтоји инфо о "
"верзији. Молимо реинÑталирај из \"Пројекат\" менија."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Android build version mismatch:\n"
@@ -14946,27 +15063,27 @@ msgstr ""
" Годот Верзија: %s\n"
"Молимо реинÑталирајте Android нацрт изградње из \"Пројекат\" менија."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "ÐеуÑпешна измена project.godot-а у путањи пројекта."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "ÐеуÑпело упиÑивање фајла:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Building Android Project (gradle)"
msgstr "Изградња Android Пројекта (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Building of Android project failed, check output for the error.\n"
@@ -14975,34 +15092,34 @@ msgstr ""
"Изградња Android пројекта неуÑпешна, провери излаз за грешке.\n"
"Ðлтернативно поÑети docs.godotengine.org за Android документацију изградње."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Ðнимација није нађена: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Прављење контура..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "ÐеуÑпешно отварање нацрта за извоз:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -15010,21 +15127,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Додавање %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "ÐеуÑпело упиÑивање фајла:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -15625,6 +15742,14 @@ msgstr ""
"ÐавМрежнаИнÑтанца мора бити дете или прадете Ðавигационог чвора. Само "
"обезбећује навигационе податке."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
#, fuzzy
msgid ""
@@ -15976,6 +16101,14 @@ msgstr "Мора Ñе кориÑтити важећа екÑтензија."
msgid "Enable grid minimap."
msgstr "Укључи лепљење"
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
#, fuzzy
msgid ""
@@ -16036,6 +16169,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "Величина Viewport-а мора бити већа од 0 да би Ñе нешто иÑцртало."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -16094,6 +16231,29 @@ msgid "Constants cannot be modified."
msgstr "КонÑтанте није могуће мењати."
#, fuzzy
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Ðаправи Одмор Позу(од КоÑтију)"
+
+#~ msgid "Bottom"
+#~ msgstr "Доле"
+
+#~ msgid "Left"
+#~ msgstr "Лево"
+
+#~ msgid "Right"
+#~ msgstr "деÑно"
+
+#~ msgid "Front"
+#~ msgstr "ИÑпред"
+
+#~ msgid "Rear"
+#~ msgstr "Бок"
+
+#, fuzzy
+#~ msgid "Nameless gizmo"
+#~ msgstr "Безимена ручка"
+
+#, fuzzy
#~ msgid "Package Contents:"
#~ msgstr "Садржај:"
diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po
index 76982c0b00..eee30eb977 100644
--- a/editor/translations/sr_Latn.po
+++ b/editor/translations/sr_Latn.po
@@ -1025,7 +1025,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1655,13 +1655,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2036,7 +2036,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2517,6 +2517,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3145,6 +3169,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Animacija Promjeni Transformaciju"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3388,6 +3417,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5455,6 +5488,17 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Obriši Selekciju"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6374,7 +6418,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6967,6 +7015,16 @@ msgstr "Napravi"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Animacija Promjeni Transformaciju"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Animacija ObriÅ¡i KljuÄeve"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7468,11 +7526,12 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Napravi"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7500,6 +7559,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7608,42 +7721,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7906,6 +7999,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Napravi"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7971,7 +8069,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11967,6 +12065,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12252,6 +12358,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Sve sekcije"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12734,159 +12845,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12894,57 +12994,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12952,54 +13052,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13007,19 +13107,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13469,6 +13569,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13758,6 +13866,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13798,6 +13914,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/sv.po b/editor/translations/sv.po
index 373e3aad36..3b0b8a97dd 100644
--- a/editor/translations/sv.po
+++ b/editor/translations/sv.po
@@ -1043,7 +1043,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Beroenden"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Resurs"
@@ -1702,13 +1702,13 @@ msgstr ""
"Målplattformen kräver 'ETC' texturkomprimering för GLES2.\n"
"Aktivera 'Import Etc' i Projektinställningarna."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Mallfil hittades inte."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2102,7 +2102,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "(Om)Importerar Tillgångar"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Topp"
@@ -2636,6 +2636,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Nuvarande scen inte sparad. Öppna ändå?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Ã…ngra"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Återställ"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Kan inte ladda om en scen som aldrig har sparats."
@@ -3310,6 +3336,11 @@ msgid "Merge With Existing"
msgstr "Sammanfoga Med Existerande"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Anim Ändra Transformation"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Öppna & Kör ett Skript"
@@ -3563,6 +3594,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Gör Unik"
@@ -5728,6 +5763,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Välj"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Grupper"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6684,7 +6731,13 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Importera från Scen"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Importera från Scen"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7285,6 +7338,16 @@ msgstr "Infoga Punkt"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Transformera"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Skapa Node"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7809,12 +7872,14 @@ msgid "Skeleton2D"
msgstr "Singleton"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Ladda Standard"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Skriv över"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7843,6 +7908,65 @@ msgid "Perspective"
msgstr "Perspektiv"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Perspektiv"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Perspektiv"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Perspektiv"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Perspektiv"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Perspektiv"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7959,42 +8083,22 @@ msgid "Bottom View."
msgstr "Vy Underifrån."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Botten"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Vy från vänster."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Vänster"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Vy från höger."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Höger"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Vy Framifrån."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Framsida"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Vy Bakifrån."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Baksida"
-
-#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Align Transform with View"
msgstr "Vy från höger"
@@ -8264,6 +8368,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Redigera Polygon"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Inställningar..."
@@ -8329,8 +8438,9 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr ""
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Namnlöst Projekt"
#: editor/plugins/sprite_editor_plugin.cpp
#, fuzzy
@@ -12474,6 +12584,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12767,6 +12885,11 @@ msgstr "Genererar Lightmaps"
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Alla urval"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13249,165 +13372,154 @@ msgstr "Fäst Skript"
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Select device from the list"
msgstr "Välj enhet från listan"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Exportera"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Avinstallera"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Laddar..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Kunde inte starta underprocess!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Kunde inte skapa mapp."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Ogiltigt paket namn:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13415,63 +13527,63 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Skannar Filer,\n"
"Snälla Vänta..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "Kunde inte öppna mall för export:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Lägger till %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Exportera"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13479,58 +13591,58 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "Kunde inte skriva till filen:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Animeringsverktyg"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Skapar konturer..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "Kunde inte öppna mall för export:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13538,21 +13650,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Lägger till %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Kunde inte skriva till filen:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14035,6 +14147,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14330,6 +14450,14 @@ msgstr "Måste använda en giltigt filändelse."
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14370,6 +14498,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14423,6 +14555,21 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr ""
+#~ msgid "Bottom"
+#~ msgstr "Botten"
+
+#~ msgid "Left"
+#~ msgstr "Vänster"
+
+#~ msgid "Right"
+#~ msgstr "Höger"
+
+#~ msgid "Front"
+#~ msgstr "Framsida"
+
+#~ msgid "Rear"
+#~ msgstr "Baksida"
+
#~ msgid "Package Contents:"
#~ msgstr "Paketets Innehåll:"
diff --git a/editor/translations/ta.po b/editor/translations/ta.po
index 2ad954b971..f0a34987a2 100644
--- a/editor/translations/ta.po
+++ b/editor/translations/ta.po
@@ -1020,7 +1020,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1650,13 +1650,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2029,7 +2029,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2508,6 +2508,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3133,6 +3157,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "உரà¯à®®à®¾à®±à¯à®±à®®à¯ அசைவூடà¯à®Ÿà¯"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3375,6 +3404,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5433,6 +5466,17 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "அனைதà¯à®¤à¯ தேரà¯à®µà¯à®•ளà¯"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6338,7 +6382,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6924,6 +6972,16 @@ msgstr ""
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "உரà¯à®®à®¾à®±à¯à®±à®®à¯ அசைவூடà¯à®Ÿà¯"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "அனைதà¯à®¤à¯ தேரà¯à®µà¯à®•ளà¯"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7419,11 +7477,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7451,6 +7509,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7558,42 +7670,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7855,6 +7947,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7920,7 +8016,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11867,6 +11963,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12152,6 +12256,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "அனைதà¯à®¤à¯ தேரà¯à®µà¯à®•ளà¯"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12627,159 +12736,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12787,57 +12885,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12845,54 +12943,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12900,19 +12998,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13362,6 +13460,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13651,6 +13757,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13691,6 +13805,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/te.po b/editor/translations/te.po
index 74998009cd..a77af85920 100644
--- a/editor/translations/te.po
+++ b/editor/translations/te.po
@@ -994,7 +994,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1623,13 +1623,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1999,7 +1999,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2477,6 +2477,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3101,6 +3125,10 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+msgid "Apply MeshInstance Transforms"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3341,6 +3369,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5381,6 +5413,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6279,7 +6321,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6863,6 +6909,14 @@ msgstr ""
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Center Node"
+msgstr ""
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7357,11 +7411,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7389,6 +7443,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7496,42 +7604,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7793,6 +7881,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7858,7 +7950,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11759,6 +11851,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12039,6 +12139,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12505,159 +12609,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12665,57 +12758,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12723,54 +12816,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12778,19 +12871,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13240,6 +13333,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13529,6 +13630,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13569,6 +13678,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/th.po b/editor/translations/th.po
index 231051313a..3042188001 100644
--- a/editor/translations/th.po
+++ b/editor/translations/th.po
@@ -1035,7 +1035,7 @@ msgstr ""
msgid "Dependencies"
msgstr "à¸à¸²à¸£à¸­à¹‰à¸²à¸‡à¸­à¸´à¸‡"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "ทรัพยาà¸à¸£"
@@ -1695,13 +1695,13 @@ msgstr ""
"à¹à¸žà¸¥à¸•ฟอร์มเป้าหมายต้องà¸à¸²à¸£à¸à¸²à¸£à¸šà¸µà¸šà¸­à¸±à¸”เทà¸à¹€à¸ˆà¸­à¸£à¹Œ 'PVRTC' สำหรับà¸à¸²à¸£à¸à¸¥à¸±à¸šà¸¡à¸²à¹ƒà¸Šà¹‰ GLES2\n"
"เปิด 'Import Pvrtc' ในตั้งค่าโปรเจ็คหรือปิด 'Driver Fallback Enabled'"
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "ไม่พบเทมเพลตà¸à¸²à¸£à¸”ีบัà¸à¹à¸šà¸šà¸à¸³à¸«à¸™à¸”เอง"
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2081,7 +2081,7 @@ msgstr "มีà¸à¸²à¸£à¸™à¸³à¹€à¸‚้าไฟล์ %s หลายอัน à
msgid "(Re)Importing Assets"
msgstr "à¸à¸³à¸¥à¸±à¸‡à¸™à¸³à¹€à¸‚้าทรัพยาà¸à¸£(อีà¸à¸„รั้ง)"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "บนสุด"
@@ -2576,6 +2576,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "ฉาà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¸¢à¸±à¸‡à¹„ม่ได้บันทึภจะเปิดไฟล์หรือไม่?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "เลิà¸à¸—ำ"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "ทำซ้ำ"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "ฉาà¸à¸¢à¸±à¸‡à¹„ม่ได้บันทึภไม่สามารถโหลดใหม่ได้"
@@ -3245,6 +3271,11 @@ msgid "Merge With Existing"
msgstr "รวมà¸à¸±à¸šà¸—ี่มีอยู่เดิม"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "เคลื่อนย้ายà¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "เปิดà¹à¸¥à¸°à¸£à¸±à¸™à¸ªà¸„ริปต์"
@@ -3497,6 +3528,10 @@ msgid ""
"property (%s)."
msgstr "ทรัพยาà¸à¸£à¸—ี่เลือภ(%s) มีประเทไม่ตรงà¸à¸±à¸šà¸„่าที่ต้องà¸à¸²à¸£ (%s)"
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "ไม่ใช้ร่วมà¸à¸±à¸šà¸§à¸±à¸•ถุอื่น"
@@ -5600,6 +5635,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "เลื่อน CanvasItem \"%s\" ไปยัง (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "ล็อà¸à¸—ี่เลือà¸"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "à¸à¸¥à¸¸à¹ˆà¸¡"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6538,7 +6585,13 @@ msgid "Remove Selected Item"
msgstr "ลบไอเทมที่เลือà¸"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "นำเข้าจาà¸à¸‰à¸²à¸"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "นำเข้าจาà¸à¸‰à¸²à¸"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7130,6 +7183,16 @@ msgstr "จำนวนจุดที่สร้างขึ้น:"
msgid "Flip Portal"
msgstr "พลิà¸à¹à¸™à¸§à¸™à¸­à¸™"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "เคลียร์à¸à¸²à¸£à¹à¸›à¸¥à¸‡"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "สร้างโหนด"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "AnimationTree ไม่มีที่อยู่ไปยัง AnimationPlayer"
@@ -7629,12 +7692,14 @@ msgid "Skeleton2D"
msgstr "Skeleton2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "สร้างท่าโพส (จาà¸à¹‚ครง)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "ตั้งโครงไปยังท่าโพส"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "ตั้งโครงไปยังท่าโพส"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "เขียนทับ"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7661,6 +7726,71 @@ msgid "Perspective"
msgstr "เพอร์สเปà¸à¸—ีฟ"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "ขนาน"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "เพอร์สเปà¸à¸—ีฟ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "ขนาน"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "เพอร์สเปà¸à¸—ีฟ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "ขนาน"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "เพอร์สเปà¸à¸—ีฟ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "ขนาน"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "ขนาน"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "เพอร์สเปà¸à¸—ีฟ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "ขนาน"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "เพอร์สเปà¸à¸—ีฟ"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "ยà¸à¹€à¸¥à¸´à¸à¸à¸²à¸£à¹€à¸„ลื่อนย้าย"
@@ -7779,42 +7909,22 @@ msgid "Bottom View."
msgstr "มุมล่าง"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "ล่าง"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "มุมซ้าย"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "ซ้าย"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "มุมขวา"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "ขวา"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "มุมหน้า"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "หน้า"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "มุมหลัง"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "หลัง"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "จัดà¸à¸²à¸£à¹à¸›à¸¥à¸‡à¹ƒà¸«à¹‰à¹€à¸‚้าà¸à¸±à¸šà¸§à¸´à¸§"
@@ -8087,6 +8197,11 @@ msgid "View Portal Culling"
msgstr "ตั้งค่ามุมมอง"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "ตั้งค่ามุมมอง"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "ตั้งค่า..."
@@ -8152,8 +8267,9 @@ msgid "Post"
msgstr "หลัง"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "à¸à¸´à¸ªà¹‚มไม่มีชื่อ"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "โปรเจà¸à¸•์ไม่มีชื่อ"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -12275,6 +12391,16 @@ msgstr "à¸à¸³à¸«à¸™à¸”พิà¸à¸±à¸”จุดเส้นโค้ง"
msgid "Set Portal Point Position"
msgstr "à¸à¸³à¸«à¸™à¸”พิà¸à¸±à¸”จุดเส้นโค้ง"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "ปรับรัศมีทรงà¹à¸„ปซูล"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "à¸à¸³à¸«à¸™à¸”เส้นโค้งขาเข้า"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "ปรับรัศมีทรงà¸à¸£à¸°à¸šà¸­à¸"
@@ -12558,6 +12684,11 @@ msgstr "à¸à¸³à¸¥à¸±à¸‡à¸žà¸¥à¹‡à¸­à¸• lightmaps"
msgid "Class name can't be a reserved keyword"
msgstr "ชื่อคลาสไม่สามารถมีคีย์เวิร์ดได้"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "เติมส่วนที่เลือà¸"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "สิ้นสุดสà¹à¸•คข้อผิดพลาดภายใน"
@@ -13030,135 +13161,135 @@ msgstr "ค้นหาโหนด VisualScript"
msgid "Get %s"
msgstr "รับ %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "ชื่อà¹à¸žà¹‡à¸„เà¸à¸ˆà¸«à¸²à¸¢à¹„ป"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "ส่วนของà¹à¸žà¹‡à¸„เà¸à¸ˆà¸ˆà¸°à¸•้องมีความยาวไม่เป็นศูนย์"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "ตัวอัà¸à¸©à¸£ '%s' ไม่อนุà¸à¸²à¸•ให้ใช้ในชื่อของ Android application package"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "ไม่สามารถใช้ตัวเลขเป็นตัวà¹à¸£à¸à¹ƒà¸™à¸ªà¹ˆà¸§à¸™à¸‚องà¹à¸žà¹‡à¸„เà¸à¸ˆ"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "ตัวอัà¸à¸©à¸£ '%s' ไม่สามารถเป็นตัวอัà¸à¸©à¸£à¸•ัวà¹à¸£à¸à¹ƒà¸™à¸ªà¹ˆà¸§à¸™à¸‚องà¹à¸žà¹‡à¸„เà¸à¸ˆ"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "à¹à¸žà¹‡à¸„เà¸à¸ˆà¸ˆà¸³à¹€à¸›à¹‡à¸™à¸•้องมี '.' อย่างน้อยหนึ่งตัว"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "เลือà¸à¸­à¸¸à¸›à¸à¸£à¸“์จาà¸à¸£à¸²à¸¢à¸Šà¸·à¹ˆà¸­"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "ส่งออà¸à¸—ั้งหมด"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "ถอนà¸à¸²à¸£à¸•ิดตั้ง"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "à¸à¸³à¸¥à¸±à¸‡à¹‚หลด โปรดรอ..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "อินสà¹à¸•นซ์ฉาà¸à¹„ม่ได้!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "à¸à¸³à¸¥à¸±à¸‡à¸£à¸±à¸™à¸ªà¸„ริปต์..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "ไม่สามารถสร้างโฟลเดอร์"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "ไม่สามารถหาเครื่องมือ 'apksigner'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr "เทมเพลตà¸à¸²à¸£à¸ªà¸£à¹‰à¸²à¸‡à¸ªà¸³à¸«à¸£à¸±à¸šà¹à¸­à¸™à¸”รอยด์ไม่ถูà¸à¸•ิดตั้ง สามารถติดตั้งจาà¸à¹€à¸¡à¸™à¸¹à¹‚ปรเจà¸à¸•์"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr "ดีบัภKeystore ไม่ได้ถูà¸à¸•ั้งไว้ในตั้งค่าของตัวà¹à¸à¹‰à¹„ขหรือในพรีเซ็ต"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr "Release keystore à¸à¸³à¸«à¸™à¸”ค่าไว้อย่างไม่ถูà¸à¸•้องในพรีเซ็ตสำหรับà¸à¸²à¸£à¸ªà¹ˆà¸‡à¸­à¸­à¸"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr "ต้องà¸à¸²à¸£à¸—ี่อยู่ของ Android SDK ที่ถูà¸à¸•้อง ในà¸à¸²à¸£à¸•ั้งค่าตัวà¹à¸à¹‰à¹„ข"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "ที่อยู่ Android SDK ไม่ถูà¸à¸•้องในà¸à¸²à¸£à¸•ั้งค่าตัวà¹à¸à¹‰à¹„ข"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "ไดเร็à¸à¸—อรี 'platform-tools' หายไป!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "ไม่พบคำสั่ง adb ของ Android SDK platform-tools"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr "à¸à¸£à¸¸à¸“าตรวจสอบในตำà¹à¸«à¸™à¹ˆà¸‡à¸‚อง Android SDK ที่ระบุไว้ในà¸à¸²à¸£à¸•ั้งค่าตัวà¹à¸à¹‰à¹„ข"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "ไดเร็à¸à¸—อรี 'build-tools' หายไป!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr "ไม่พบคำสั่ง apksigner ของ Android SDK build-tools"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "public key ผิดพลาดสำหรับ APK expansion"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "ชื่อà¹à¸žà¹‡à¸„เà¸à¸ˆà¸œà¸´à¸”พลาด:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13166,33 +13297,20 @@ msgstr ""
"โมดูล \"GodotPaymentV3\" ที่ไม่ถูà¸à¸•้องได้รวมอยู่ในà¸à¸²à¸£à¸•ั้งค่าโปรเจà¸à¸•์ \"android/modules"
"\" (เปลี่ยนà¹à¸›à¸¥à¸‡à¹ƒà¸™ Godot 3.2.2)\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "\"Use Custom Build\" จำเป็นต้องเปิดà¸à¸²à¸£à¹ƒà¸Šà¹‰à¸‡à¸²à¸™à¸«à¸²à¸à¸ˆà¸°à¹ƒà¸Šà¹‰à¸›à¸¥à¸±à¹Šà¸à¸­à¸´à¸™"
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Degrees Of Freedom\" จะใช้ได้เฉพาะเมื่อ \"Xr Mode\" เป็น \"Oculus Mobile VR\""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr "\"Hand Tracking\" จะสามารถใช้ได้เมื่อ \"Xr Mode\" เป็น \"Oculus Mobile VR\""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Focus Awareness\" จะสามารถใช้ได้เมื่อ \"Xr Mode\" เป็น \"Oculus Mobile VR\""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr "\"Export AAB\" จะใช้ได้เฉพาะเมื่อเปิดใช้งาน \"Use Custom Build\""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13200,64 +13318,64 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"à¸à¸³à¸¥à¸±à¸‡à¸ªà¹à¸à¸™à¹„ฟล์,\n"
"à¸à¸£à¸¸à¸“ารอ..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "เปิดเทมเพลตเพื่อส่งออà¸à¹„ม่ได้:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "à¸à¸³à¸¥à¸±à¸‡à¹€à¸žà¸´à¹ˆà¸¡ %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "ส่งออà¸à¸—ั้งหมด"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr "ชื่อไฟล์ผิดพลาด! à¹à¸­à¸™à¸”รอยด์à¹à¸­à¸›à¸šà¸±à¸™à¹€à¸”ิลจำเป็นต้องมีนามสà¸à¸¸à¸¥ *.aab"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "à¸à¸²à¸£à¸‚ยาย APK เข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¹à¸­à¸™à¸”รอยด์à¹à¸­à¸›à¸šà¸±à¸™à¹€à¸”ิล"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "ชื่อไฟล์ผิดพลาด! à¹à¸­à¸™à¸”รอยด์ APK จำเป็นต้องมีนามสà¸à¸¸à¸¥ *.apk"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
"พยายามสร้างจาà¸à¹€à¸—มเพลตที่สร้างขึ้นเอง à¹à¸•่ไม่มีข้อมูลเวอร์ชัน โปรดติดตั้งใหม่จาà¸à¹€à¸¡à¸™à¸¹ \"โปรเจà¸à¸•์\""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13269,26 +13387,26 @@ msgstr ""
" Godot เวอร์ชัน:% s\n"
"โปรดติดตั้งเทมเพลตà¸à¸²à¸£à¸ªà¸£à¹‰à¸²à¸‡à¸ªà¸³à¸«à¸£à¸±à¸šà¹à¸­à¸™à¸”รอยด์ใหม่จาà¸à¹€à¸¡à¸™à¸¹ \"โปรเจà¸à¸•์\""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "ไม่พบไฟล์ project.godot"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "เขียนไฟล์ไม่ได้:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "à¸à¸³à¸¥à¸±à¸‡à¸ªà¸£à¹‰à¸²à¸‡à¹‚ปรเจคà¹à¸­à¸™à¸”รอยด์ (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13296,35 +13414,35 @@ msgstr ""
"à¸à¸²à¸£à¸ªà¸£à¹‰à¸²à¸‡à¹‚ปรเจà¸à¸•์à¹à¸­à¸™à¸”รอยด์ล้มเหลว ตรวจสอบผลลัพธ์เพื่อหาข้อผิดพลาด\n"
"หรือไปที่ docs.godotengine.org สำหรับเอà¸à¸ªà¸²à¸£à¸›à¸£à¸°à¸à¸­à¸šà¸à¸²à¸£à¸ªà¸£à¹‰à¸²à¸‡à¸ªà¸³à¸«à¸£à¸±à¸šà¹à¸­à¸™à¸”รอยด์"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "à¸à¸³à¸¥à¸±à¸‡à¸¢à¹‰à¸²à¸¢à¹€à¸­à¸²à¸•์พุต"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
"ไม่สามารถคัดลอà¸à¹à¸¥à¸°à¹€à¸›à¸¥à¸µà¹ˆà¸¢à¸™à¸Šà¸·à¹ˆà¸­à¹„ฟล์ส่งออภตรวจสอบไดเร็à¸à¸—อรีโปรเจ็à¸à¸•์ gradle สำหรับเอาต์พุต"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "ไม่พบà¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "à¸à¸³à¸¥à¸±à¸‡à¸ªà¸£à¹‰à¸²à¸‡à¸„อนทัวร์..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "เปิดเทมเพลตเพื่อส่งออà¸à¹„ม่ได้:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13332,21 +13450,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "à¸à¸³à¸¥à¸±à¸‡à¹€à¸žà¸´à¹ˆà¸¡ %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "เขียนไฟล์ไม่ได้:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "จัดเรียง APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13843,6 +13961,14 @@ msgstr ""
"NavigationMeshInstance ต้องเป็นโหนดลูà¸/หลานของโหนด Navigation "
"โดยจะให้ข้อมูลà¸à¸²à¸£à¸™à¸³à¸—างเท่านั้น"
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14156,6 +14282,14 @@ msgstr "นามสà¸à¸¸à¸¥à¹„ฟล์ไม่ถูà¸à¸•้อง"
msgid "Enable grid minimap."
msgstr "เปิดเส้นà¸à¸£à¸´à¸”มินิà¹à¸¡à¸ž"
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14205,6 +14339,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "ขนาดวิวพอร์ตจะต้องมาà¸à¸à¸§à¹ˆà¸² 0 เพื่อที่จะเรนเดอร์ได้"
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14256,6 +14394,39 @@ msgstr "à¸à¸²à¸£à¸à¸³à¸«à¸™à¸”ให้à¸à¸±à¸šà¸¢à¸¹à¸™à¸´à¸Ÿà¸­à¸£à¹Œà¸¡"
msgid "Constants cannot be modified."
msgstr "ค่าคงที่ไม่สามารถà¹à¸à¹‰à¹„ขได้"
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "สร้างท่าโพส (จาà¸à¹‚ครง)"
+
+#~ msgid "Bottom"
+#~ msgstr "ล่าง"
+
+#~ msgid "Left"
+#~ msgstr "ซ้าย"
+
+#~ msgid "Right"
+#~ msgstr "ขวา"
+
+#~ msgid "Front"
+#~ msgstr "หน้า"
+
+#~ msgid "Rear"
+#~ msgstr "หลัง"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "à¸à¸´à¸ªà¹‚มไม่มีชื่อ"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Degrees Of Freedom\" จะใช้ได้เฉพาะเมื่อ \"Xr Mode\" เป็น \"Oculus Mobile VR\""
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Focus Awareness\" จะสามารถใช้ได้เมื่อ \"Xr Mode\" เป็น \"Oculus Mobile VR\""
+
#~ msgid "Package Contents:"
#~ msgstr "เนื้อหาà¹à¸žà¸„เà¸à¸ˆ:"
diff --git a/editor/translations/tr.po b/editor/translations/tr.po
index 69a7ef73a2..e5a65500d1 100644
--- a/editor/translations/tr.po
+++ b/editor/translations/tr.po
@@ -61,12 +61,13 @@
# ali aydın <alimxaydin@gmail.com>, 2021.
# Cannur Daşkıran <canndask@gmail.com>, 2021.
# kahveciderin <kahveciderin@gmail.com>, 2021.
+# Lucifer25x <umudyt2006@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-07-13 06:13+0000\n"
-"Last-Translator: kahveciderin <kahveciderin@gmail.com>\n"
+"PO-Revision-Date: 2021-09-15 00:46+0000\n"
+"Last-Translator: Lucifer25x <umudyt2006@gmail.com>\n"
"Language-Team: Turkish <https://hosted.weblate.org/projects/godot-engine/"
"godot/tr/>\n"
"Language: tr\n"
@@ -74,7 +75,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.7.2-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -1020,7 +1021,7 @@ msgstr "\"%s\" için sonuç yok."
#: editor/create_dialog.cpp editor/property_selector.cpp
msgid "No description available for %s."
-msgstr ""
+msgstr "%s için açıklama yok."
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
@@ -1080,7 +1081,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Bağımlılıklar"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Kaynak"
@@ -1324,11 +1325,12 @@ msgstr "%s (Zaten Var)"
#: editor/editor_asset_installer.cpp
msgid "Contents of asset \"%s\" - %d file(s) conflict with your project:"
-msgstr ""
+msgstr "\"%s\" öğesinin içeriği - %d dosya(lar) projenizle çakışıyor:"
#: editor/editor_asset_installer.cpp
+#, fuzzy
msgid "Contents of asset \"%s\" - No files conflict with your project:"
-msgstr ""
+msgstr "\"%s\" öğesinin içeriği - Projenizle çakışan dosya yok:"
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
@@ -1597,8 +1599,9 @@ msgid "%s is an invalid path. File does not exist."
msgstr "Dosya yok."
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "%s is an invalid path. Not in resource path (res://)."
-msgstr ""
+msgstr "%s geçersiz bir yol. Kaynak yolunda değil (res://)."
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1748,13 +1751,13 @@ msgstr ""
"Proje Ayarlarında 'Import Etc' seçeneğini etkinleştirin veya 'Driver "
"Fallback Enabled' seçeneğini devre dışı bırakın."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Özel hata ayıklama şablonu bulunmadı."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1798,35 +1801,45 @@ msgstr "Dock İçe Aktar"
#: editor/editor_feature_profile.cpp
msgid "Allows to view and edit 3D scenes."
-msgstr ""
+msgstr "3D sahneleri görüntülemeye ve düzenlemeye izin verir."
#: editor/editor_feature_profile.cpp
msgid "Allows to edit scripts using the integrated script editor."
msgstr ""
+"Entegre komut dosyası düzenleyicisini kullanarak komut dosyalarını "
+"düzenlemeye izin verir."
#: editor/editor_feature_profile.cpp
+#, fuzzy
msgid "Provides built-in access to the Asset Library."
-msgstr ""
+msgstr "Varlık Kitaplığına yerleşik erişim sağlar."
#: editor/editor_feature_profile.cpp
msgid "Allows editing the node hierarchy in the Scene dock."
-msgstr ""
+msgstr "Scene dock'ta düğüm hiyerarşisini düzenlemeye izin verir."
#: editor/editor_feature_profile.cpp
+#, fuzzy
msgid ""
"Allows to work with signals and groups of the node selected in the Scene "
"dock."
msgstr ""
+"Scene dock'ta seçilen düğümün sinyalleri ve gruplarıyla çalışmaya izin verir."
#: editor/editor_feature_profile.cpp
+#, fuzzy
msgid "Allows to browse the local file system via a dedicated dock."
msgstr ""
+"Özel bir dock aracılığıyla yerel dosya sistemine göz atılmasına izin verir."
#: editor/editor_feature_profile.cpp
+#, fuzzy
msgid ""
"Allows to configure import settings for individual assets. Requires the "
"FileSystem dock to function."
msgstr ""
+"Bireysel varlıklar için içe aktarma ayarlarını yapılandırmaya izin verir. "
+"Çalışması için FileSystem fonksiyonunu gerektirir."
#: editor/editor_feature_profile.cpp
#, fuzzy
@@ -1838,8 +1851,9 @@ msgid "(none)"
msgstr ""
#: editor/editor_feature_profile.cpp
+#, fuzzy
msgid "Remove currently selected profile, '%s'? Cannot be undone."
-msgstr ""
+msgstr "Seçili olan '%s' profili kaldırılsın mı? (Geri alınamayan.)"
#: editor/editor_feature_profile.cpp
msgid "Profile must be a valid filename and must not contain '.'"
@@ -1948,6 +1962,8 @@ msgstr "Doku Seçenekleri"
#: editor/editor_feature_profile.cpp
msgid "Create or import a profile to edit available classes and properties."
msgstr ""
+"Kullanılabilir sınıfları ve özellikleri düzenlemek için bir profil oluşturun "
+"veya içe aktarın."
#: editor/editor_feature_profile.cpp
msgid "New profile name:"
@@ -2137,7 +2153,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "Varlıklar Yeniden-İçe Aktarılıyor"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Üst"
@@ -2369,11 +2385,15 @@ msgid "New Window"
msgstr "Yeni Pencere"
#: editor/editor_node.cpp
+#, fuzzy
msgid ""
"Spins when the editor window redraws.\n"
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"Düzenleyici penceresi yeniden çizildiğinde döner.\n"
+"Güç kullanımını artırabilecek Sürekli Güncelle etkindir. Devre dışı bırakmak "
+"için tıklayın."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2605,10 +2625,13 @@ msgid "Save changes to '%s' before closing?"
msgstr "Kapatmadan önce değişklikler buraya '%s' kaydedilsin mi?"
#: editor/editor_node.cpp
+#, fuzzy
msgid ""
"The current scene has no root node, but %d modified external resource(s) "
"were saved anyway."
msgstr ""
+"Geçerli sahnenin kök düğümü yok, ancak %d değiştirilmiş harici kaynak(lar) "
+"yine de kaydedildi."
#: editor/editor_node.cpp
#, fuzzy
@@ -2646,6 +2669,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Var olan sahne kaydedilmedi. Yine de açılsın mı?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Geri al"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Yeniden yap"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Hiç kaydedilmemiş bir sahne yeniden yüklenemiyor."
@@ -3167,7 +3216,7 @@ msgstr "Klavuzu Aç"
#: editor/editor_node.cpp
msgid "Questions & Answers"
-msgstr ""
+msgstr "Sorular & Cevaplar"
#: editor/editor_node.cpp
msgid "Report a Bug"
@@ -3338,6 +3387,11 @@ msgid "Merge With Existing"
msgstr "Var Olanla BirleÅŸtir"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Animasyon Değişikliği Dönüşümü"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Aç & Bir Betik Çalıştır"
@@ -3595,6 +3649,10 @@ msgstr ""
"Seçili kaynak (%s) bu özellik (%s) için beklenen herhangi bir tip ile "
"uyuÅŸmuyor."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Benzersiz Yap"
@@ -3689,11 +3747,11 @@ msgstr "Düğümden İçe Aktar:"
#: editor/export_template_manager.cpp
msgid "Open the folder containing these templates."
-msgstr ""
+msgstr "Bu şablonları içeren klasörü açın."
#: editor/export_template_manager.cpp
msgid "Uninstall these templates."
-msgstr ""
+msgstr "Bu şablonları kaldırın."
#: editor/export_template_manager.cpp
#, fuzzy
@@ -3707,7 +3765,7 @@ msgstr "Aynalar alınıyor, lütfen bekleyin..."
#: editor/export_template_manager.cpp
msgid "Starting the download..."
-msgstr ""
+msgstr "İndirme başlatılıyor..."
#: editor/export_template_manager.cpp
msgid "Error requesting URL:"
@@ -3749,8 +3807,9 @@ msgid "Request failed:"
msgstr "İstek başarısız."
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Download complete; extracting templates..."
-msgstr ""
+msgstr "İndirme tamamlandı; şablonlar ayıklanıyor..."
#: editor/export_template_manager.cpp
msgid "Cannot remove temporary file:"
@@ -3774,8 +3833,9 @@ msgid "Error parsing JSON with the list of mirrors. Please report this issue!"
msgstr "JSON sunucuları listesini alırken hata. Lütfen bu hatayı bildirin!"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Best available mirror"
-msgstr ""
+msgstr "Mevcut en iyi ayna"
#: editor/export_template_manager.cpp
msgid ""
@@ -3873,12 +3933,14 @@ msgid "Current Version:"
msgstr "Şu Anki Sürüm:"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Export templates are missing. Download them or install from a file."
msgstr ""
+"Dışa aktarma şablonları eksik. Bunları indirin veya bir dosyadan yükleyin."
#: editor/export_template_manager.cpp
msgid "Export templates are installed and ready to be used."
-msgstr ""
+msgstr "Dışa aktarma şablonları yüklenir ve kullanıma hazırdır."
#: editor/export_template_manager.cpp
#, fuzzy
@@ -3887,7 +3949,7 @@ msgstr "Dosya Aç"
#: editor/export_template_manager.cpp
msgid "Open the folder containing installed templates for the current version."
-msgstr ""
+msgstr "Geçerli sürüm için yüklü şablonları içeren klasörü açın."
#: editor/export_template_manager.cpp
msgid "Uninstall"
@@ -3915,13 +3977,14 @@ msgstr "Hatayı Kopyala"
#: editor/export_template_manager.cpp
msgid "Download and Install"
-msgstr ""
+msgstr "İndir ve Yükle"
#: editor/export_template_manager.cpp
msgid ""
"Download and install templates for the current version from the best "
"possible mirror."
msgstr ""
+"Mevcut sürüm için şablonları mümkün olan en iyi aynadan indirin ve yükleyin."
#: editor/export_template_manager.cpp
msgid "Official export templates aren't available for development builds."
@@ -3972,6 +4035,8 @@ msgid ""
"The templates will continue to download.\n"
"You may experience a short editor freeze when they finish."
msgstr ""
+"Åžablonlar indirilmeye devam edecek.\n"
+"Bitirdiklerinde kısa bir editör donması yaşayabilirsiniz."
#: editor/filesystem_dock.cpp
msgid "Favorites"
@@ -4119,25 +4184,24 @@ msgid "Collapse All"
msgstr "Hepsini Daralt"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Sort files"
-msgstr "Dosyaları ara"
+msgstr "Dosyaları sırala"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Ascending)"
-msgstr ""
+msgstr "Ada Göre Sırala (Artan)"
#: editor/filesystem_dock.cpp
msgid "Sort by Name (Descending)"
-msgstr ""
+msgstr "Ada Göre Sırala (Azalan)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Ascending)"
-msgstr ""
+msgstr "Türe Göre Sırala (Artan)"
#: editor/filesystem_dock.cpp
msgid "Sort by Type (Descending)"
-msgstr ""
+msgstr "Türe Göre Sırala (Artan)"
#: editor/filesystem_dock.cpp
#, fuzzy
@@ -4159,7 +4223,7 @@ msgstr "Yeniden Adlandır..."
#: editor/filesystem_dock.cpp
msgid "Focus the search box"
-msgstr ""
+msgstr "Arama kutusuna odaklan"
#: editor/filesystem_dock.cpp
msgid "Previous Folder/File"
@@ -4508,9 +4572,8 @@ msgid "Extra resource options."
msgstr "Kaynak yolunda deÄŸil."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Edit Resource from Clipboard"
-msgstr "Kaynak Panosunu Düzenle"
+msgstr "Panodan Kaynağı Düzenle"
#: editor/inspector_dock.cpp
msgid "Copy Resource"
@@ -4534,9 +4597,8 @@ msgid "History of recently edited objects."
msgstr "En son düzenlenen nesnelerin geçmişi."
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Open documentation for this object."
-msgstr "Klavuzu Aç"
+msgstr "Bu nesne için belgeleri açın."
#: editor/inspector_dock.cpp editor/scene_tree_dock.cpp
msgid "Open Documentation"
@@ -4547,9 +4609,8 @@ msgid "Filter properties"
msgstr "Özellikleri süz"
#: editor/inspector_dock.cpp
-#, fuzzy
msgid "Manage object properties."
-msgstr "Nesne özellikleri."
+msgstr "Nesne özelliklerini yönetin."
#: editor/inspector_dock.cpp
msgid "Changes may be lost!"
@@ -4793,9 +4854,8 @@ msgid "Blend:"
msgstr "Karışma:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
-#, fuzzy
msgid "Parameter Changed:"
-msgstr "Parametre DeÄŸiÅŸti"
+msgstr "Parametre DeÄŸiÅŸtirildi:"
#: editor/plugins/animation_blend_tree_editor_plugin.cpp
#: editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -5524,11 +5584,11 @@ msgstr "Hepsi"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search templates, projects, and demos"
-msgstr ""
+msgstr "Şablonları, projeleri ve demoları arayın"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Search assets (excluding templates, projects, and demos)"
-msgstr ""
+msgstr "Varlıkları arayın (şablonlar, projeler ve demolar hariç)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Import..."
@@ -5572,7 +5632,7 @@ msgstr "Varlıkların ZIP Dosyası"
#: editor/plugins/audio_stream_editor_plugin.cpp
msgid "Audio Preview Play/Pause"
-msgstr ""
+msgstr "Ses Önizleme Oynat/Duraklat"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5730,6 +5790,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "CanvasItem \"%s\" öğesini (%d,%d) konumuna taşı"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Seçimi Kilitle"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Öbek"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -5918,9 +5990,8 @@ msgid "Drag: Rotate selected node around pivot."
msgstr "Seçilen düğüm ya da geçişi sil."
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Alt+Drag: Move selected node."
-msgstr "Alt+Sürükle: Taşır"
+msgstr "Alt+Sürükle: Seçili düğümü taşıyın."
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -5929,15 +6000,14 @@ msgstr "Seçilen düğüm ya da geçişi sil."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Alt+RMB: Show list of all nodes at position clicked, including locked."
msgstr ""
-"Tıklanan konumdaki tüm nesnelerin bir listesini gösterin\n"
-"(Seçme biçiminde Alt + RMB ile özdeş)."
+"Alt+RMB: Kilitli dahil olmak üzere tıklanan konumdaki tüm düğümlerin "
+"listesini göster."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "RMB: Add node at position clicked."
-msgstr ""
+msgstr "RMB: Tıklanan konuma düğüm ekleyin."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6196,16 +6266,19 @@ msgid "Pan View"
msgstr "Yatay Kaydırma Görünümü"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Zoom to 3.125%"
-msgstr ""
+msgstr "%3.125'e yakınlaştır"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Zoom to 6.25%"
-msgstr ""
+msgstr "%6,25'e yakınlaştır"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Zoom to 12.5%"
-msgstr ""
+msgstr "%12,5'e yakınlaştır"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -6598,6 +6671,9 @@ msgid ""
"This is similar to single collision shape, but can result in a simpler "
"geometry in some cases, at the cost of accuracy."
msgstr ""
+"Basitleştirilmiş bir dışbükey çarpışma şekli oluşturur.\n"
+"Bu, tek çarpışma şekline benzer, ancak bazı durumlarda doğruluk pahasına "
+"daha basit bir geometriyle sonuçlanabilir."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Multiple Convex Collision Siblings"
@@ -6678,7 +6754,13 @@ msgid "Remove Selected Item"
msgstr "Seçilen Öğeyi Kaldır"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Sahneden İçe Aktar"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Sahneden İçe Aktar"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7272,6 +7354,16 @@ msgstr "Üretilen Nokta Sayısı:"
msgid "Flip Portal"
msgstr "Yatay Yansıt"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Dönüşümü Temizle"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Düğüm Oluştur"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "Animasyon ağacı AnimasyonOynatıcı'ya atanmış yola sahip değil"
@@ -7774,12 +7866,14 @@ msgid "Skeleton2D"
msgstr "İskelet2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Dinlenme duruÅŸu oluÅŸtur (kemiklerden)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Kemikleri Dinlenme DuruÅŸuna ata"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Kemikleri Dinlenme DuruÅŸuna ata"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Üzerine Yaz"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7806,6 +7900,71 @@ msgid "Perspective"
msgstr "Derinlik"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Dikey"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Derinlik"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Dikey"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Derinlik"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Dikey"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Derinlik"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Dikey"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Dikey"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Derinlik"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Dikey"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Derinlik"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Dönüşüm Durduruldu."
@@ -7832,20 +7991,17 @@ msgid "None"
msgstr "Düğüm"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Rotate"
-msgstr "Ülke"
+msgstr "Döndür"
#. TRANSLATORS: This refers to the movement that changes the position of an object.
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Translate"
-msgstr "Çevir:"
+msgstr "Çevir"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Scale"
-msgstr "Ölçekle:"
+msgstr "Ölçekle"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scaling: "
@@ -7868,13 +8024,12 @@ msgid "Animation Key Inserted."
msgstr "Animasyon Anahtarı Eklendi."
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Pitch:"
-msgstr "Perde"
+msgstr "Perde:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Yaw:"
-msgstr ""
+msgstr "Sapma:"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
@@ -7882,24 +8037,20 @@ msgid "Size:"
msgstr "Boyut: "
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Objects Drawn:"
-msgstr "Çizilmiş Nesneler"
+msgstr "Çizilmiş Nesneler:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Material Changes:"
-msgstr "Materyal DeÄŸiÅŸiklikleri"
+msgstr "Materyal DeÄŸiÅŸiklikleri:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Shader Changes:"
-msgstr "Shader DeÄŸiÅŸiklikleri"
+msgstr "Gölgelendirici Değişiklikleri:"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes:"
-msgstr "Yüzey Değişiklikleri"
+msgstr "Yüzey Değişiklikleri:"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
@@ -7907,13 +8058,13 @@ msgid "Draw Calls:"
msgstr "Çizim Çağrıları"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices:"
-msgstr "Köşenoktalar"
+msgstr "Köşenoktalar:"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "FPS: %d (%s ms)"
-msgstr ""
+msgstr "Kare hızı: %d (%s ms)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
@@ -7924,42 +8075,22 @@ msgid "Bottom View."
msgstr "Alttan Görünüm."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Alt"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "Soldan Görünüm."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Sol"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "Sağdan Görünüm."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "SaÄŸ"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "Önden Görünüm."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Ön"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "Arkadan Görünüm."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Arka"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "Dönüşümü Görünümle Eşle"
@@ -8132,8 +8263,9 @@ msgid "Use Snap"
msgstr "Yapışma Kullan"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Converts rooms for portal culling."
-msgstr ""
+msgstr "Odaları portal ayıklama için dönüştürür."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom View"
@@ -8234,6 +8366,11 @@ msgid "View Portal Culling"
msgstr "Görüntükapısı Ayarları"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Görüntükapısı Ayarları"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Ayarlar..."
@@ -8299,8 +8436,9 @@ msgid "Post"
msgstr "Sonrası"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "İsimsiz Gizmo"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Adsız Proje"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8552,14 +8690,12 @@ msgid "TextureRegion"
msgstr "DokuBölgesi"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Colors"
-msgstr "Renk"
+msgstr "Renkler"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Fonts"
-msgstr "Yazı Tipi"
+msgstr "Yazı Tipleri"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8573,7 +8709,7 @@ msgstr "StilKutusu"
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} color(s)"
-msgstr ""
+msgstr "{num} renk(lar)"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8595,9 +8731,8 @@ msgid "{num} font(s)"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No fonts found."
-msgstr "Bulunamadı!"
+msgstr "Yazı tipi bulunamadı."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} icon(s)"
@@ -8613,9 +8748,8 @@ msgid "{num} stylebox(es)"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "No styleboxes found."
-msgstr "Alt kaynağı bulunamadı."
+msgstr "Stil kutusu bulunamadı."
#: editor/plugins/theme_editor_plugin.cpp
msgid "{num} currently selected"
@@ -8623,7 +8757,7 @@ msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Nothing was selected for the import."
-msgstr ""
+msgstr "İçe aktarma için hiçbir şey seçilmedi."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8654,9 +8788,8 @@ msgid "With Data"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select by data type:"
-msgstr "Bir Düğüm Seç"
+msgstr "Veri türüne göre seçin:"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8665,11 +8798,11 @@ msgstr "Önce bir ayar öğesi seçin!"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible color items and their data."
-msgstr ""
+msgstr "Tüm görünür renk öğelerini ve verilerini seçin."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible color items."
-msgstr ""
+msgstr "Tüm görünür renk öğelerinin seçimini kaldırın."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8678,11 +8811,11 @@ msgstr "Önce bir ayar öğesi seçin!"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible constant items and their data."
-msgstr ""
+msgstr "Tüm görünür sabit öğeleri ve verilerini seçin."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible constant items."
-msgstr ""
+msgstr "Tüm görünür sabit öğelerin seçimini kaldırın."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8691,11 +8824,11 @@ msgstr "Önce bir ayar öğesi seçin!"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible font items and their data."
-msgstr ""
+msgstr "Tüm görünür yazı tipi öğelerini ve verilerini seçin."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible font items."
-msgstr ""
+msgstr "Tüm görünür yazı tipi öğelerinin seçimini kaldırın."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8714,36 +8847,35 @@ msgstr "Önce bir ayar öğesi seçin!"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items."
-msgstr ""
+msgstr "Tüm görünür stil kutusu öğelerini seçin."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all visible stylebox items and their data."
-msgstr ""
+msgstr "Tüm görünür stil kutusu öğelerini ve verilerini seçin."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all visible stylebox items."
-msgstr ""
+msgstr "Tüm görünür stil kutusu öğelerinin seçimini kaldırın."
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Caution: Adding icon data may considerably increase the size of your Theme "
"resource."
msgstr ""
+"Dikkat: Simge verileri eklemek, Tema kaynağınızın boyutunu önemli ölçüde "
+"artırabilir."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Collapse types."
-msgstr "Hepsini Daralt"
+msgstr "Hepsini Daralt."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Expand types."
-msgstr "Hepsini GeniÅŸlet"
+msgstr "Hepsini GeniÅŸlet."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select all Theme items."
-msgstr "Şablon Dosyası Seç"
+msgstr "Şablon Dosyası Seç."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8752,16 +8884,15 @@ msgstr "Noktaları Seç"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Select all Theme items with item data."
-msgstr ""
+msgstr "Öğe verileriyle tüm Tema öğelerini seçin."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Deselect All"
-msgstr "Hepsini Seç"
+msgstr "Tüm seçimleri kaldır"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Deselect all Theme items."
-msgstr ""
+msgstr "Tüm Tema öğelerinin seçimini kaldırın."
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
@@ -8774,287 +8905,255 @@ msgid ""
"closing this window.\n"
"Close anyway?"
msgstr ""
+"Öğeleri İçe Aktar sekmesinde bazı öğeler seçilidir. Bu pencere "
+"kapatıldığında seçim kaybolacaktır.\n"
+"Yine de kapat?"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Select a theme type from the list to edit its items.\n"
"You can add a custom type or import a type with its items from another theme."
msgstr ""
+"Öğelerini düzenlemek için listeden bir tema türü seçin.\n"
+"Özel bir tür ekleyebilir veya başka bir temadan öğeleriyle birlikte bir tür "
+"içe aktarabilirsiniz."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Color Items"
-msgstr "Bütün Öğeleri Kaldır"
+msgstr "Tüm Renk Öğelerini Kaldır"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Item"
-msgstr "Öğeyi Kaldır"
+msgstr "Öğeyi Yeniden Adlandır"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Constant Items"
-msgstr "Bütün Öğeleri Kaldır"
+msgstr "Tüm Sabit Öğeleri Kaldır"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Font Items"
-msgstr "Bütün Öğeleri Kaldır"
+msgstr "Tüm Yazı Tipi Öğelerini Kaldır"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Icon Items"
-msgstr "Bütün Öğeleri Kaldır"
+msgstr "Tüm Simge Öğelerini Kaldır"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All StyleBox Items"
-msgstr "Bütün Öğeleri Kaldır"
+msgstr "Tüm Stil Kutusu Öğelerini Kaldır"
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"This theme type is empty.\n"
"Add more items to it manually or by importing from another theme."
msgstr ""
+"Bu tema türü boş.\n"
+"El ile veya başka bir temadan içe aktararak daha fazla öğe ekleyin."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Color Item"
-msgstr "Sınıf Öğeleri Ekle"
+msgstr "Renk Öğesi Ekle"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Constant Item"
-msgstr "Sınıf Öğeleri Ekle"
+msgstr "Sabit Öğe Ekle"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Font Item"
-msgstr "Öğe Ekle"
+msgstr "Yazı Tipi Öğesi Ekle"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Icon Item"
-msgstr "Öğe Ekle"
+msgstr "Simge Öğesi Ekle"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Stylebox Item"
-msgstr "Tüm Öğeleri Ekle"
+msgstr "Stil Kutusu Öğesi Ekle"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Color Item"
-msgstr "Sınıf Öğelerini Kaldır"
+msgstr "Renk Öğesini Yeniden Adlandır"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Constant Item"
-msgstr "Sınıf Öğelerini Kaldır"
+msgstr "Sabit Öğeyi Yeniden Adlandır"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Font Item"
-msgstr "Düğümü Yeniden Adlandır"
+msgstr "Yazı Tipi Öğesini Yeniden Adlandır"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Icon Item"
-msgstr "Düğümü Yeniden Adlandır"
+msgstr "Simge Öğesini Yeniden Adlandır"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Rename Stylebox Item"
-msgstr "Seçilen Öğeyi Kaldır"
+msgstr "Stil Kutusu Öğesini Yeniden Adlandır"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Invalid file, not a Theme resource."
-msgstr "Geçersiz dosya, bu bir audio bus yerleşim düzeni değil."
+msgstr "Geçersiz dosya, Tema kaynağı değil."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Invalid file, same as the edited Theme resource."
-msgstr ""
+msgstr "Geçersiz dosya, düzenlenen Tema kaynağıyla aynı."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Theme Items"
-msgstr "Şablonlarını Yönet"
+msgstr "Tema Öğelerini Yönet"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Edit Items"
-msgstr "Düzenlenebilir Öge"
+msgstr "Öğeleri Düzenle"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Types:"
-msgstr "Tür:"
+msgstr "Türler:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type:"
-msgstr "Tür:"
+msgstr "Tür Ekle:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item:"
-msgstr "Öğe Ekle"
+msgstr "Öğe Ekle:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add StyleBox Item"
-msgstr "Tüm Öğeleri Ekle"
+msgstr "Stil Kutusu Öğesi Ekle"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Items:"
-msgstr "Öğeyi Kaldır"
+msgstr "Öğeleri kaldır:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Class Items"
msgstr "Sınıf Öğelerini Kaldır"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove Custom Items"
-msgstr "Sınıf Öğelerini Kaldır"
+msgstr "Özel Öğeleri Kaldır"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Items"
msgstr "Bütün Öğeleri Kaldır"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Theme Item"
-msgstr "Grafik Arayüzü Tema Öğeleri"
+msgstr "Tema Öğesi Ekle"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Old Name:"
-msgstr "Düğüm adı:"
+msgstr "Eski ad:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Import Items"
-msgstr "Kalıbı İçe Aktar"
+msgstr "Öğeleri İçe Aktar"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Theme"
-msgstr "Varsayılan"
+msgstr "Varsayılan tema"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Editor Theme"
-msgstr "Tema düzenle"
+msgstr "Editör Teması"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select Another Theme Resource:"
-msgstr "Kaynağı Sil"
+msgstr "Başka Bir Tema Kaynağı Seçin:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Another Theme"
-msgstr "Kalıbı İçe Aktar"
+msgstr "BaÅŸka Bir Tema"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Confirm Item Rename"
-msgstr "Animasyon İzini Yeniden Adlandır"
+msgstr "Öğeyi Yeniden Adlandırmayı Onayla"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Cancel Item Rename"
-msgstr "Tümden Yeniden Adlandır"
+msgstr "Öğe Yeniden Adlandırmayı İptal Et"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override Item"
-msgstr "Üzerine Yaz"
+msgstr "Öğeyi Geçersiz Kıl"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "Unpin this StyleBox as a main style."
-msgstr ""
+msgstr "Bu Stil Kutusunun ana stil olarak sabitlemesini kaldırın."
#: editor/plugins/theme_editor_plugin.cpp
msgid ""
"Pin this StyleBox as a main style. Editing its properties will update the "
"same properties in all other StyleBoxes of this type."
msgstr ""
+"Bu Stil Kutusunu ana stil olarak sabitleyin. Özelliklerini düzenlemek, bu "
+"tipteki diğer tüm StyleBox'larda aynı özellikleri güncelleyecektir."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Type"
-msgstr "Tür"
+msgstr "Tür Ekle"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Item Type"
-msgstr "Öğe Ekle"
+msgstr "Öğe Türü Ekle"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Node Types:"
-msgstr "Düğüm Türü"
+msgstr "Düğüm Türleri:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Show Default"
-msgstr "Varsayılanı Yükle"
+msgstr "Varsayılanı Göster"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Show default type items alongside items that have been overridden."
-msgstr ""
+msgstr "Geçersiz kılınan öğelerin yanında varsayılan tür öğelerini göster."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Override All"
-msgstr "Üzerine Yaz"
+msgstr "Tümünü Geçersiz Kıl"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Override all default type items."
-msgstr ""
+msgstr "Tüm varsayılan tür öğelerini geçersiz kıl."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Theme:"
-msgstr "Tema"
+msgstr "Tema:"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Manage Items..."
-msgstr "Dışa Aktarım Şablonlarını Yönet..."
+msgstr "Öğeleri Yönet..."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add, remove, organize and import Theme items."
-msgstr ""
+msgstr "Tema öğeleri ekleyin, kaldırın, düzenleyin ve içe aktarın."
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Add Preview"
-msgstr "Önizleme"
+msgstr "Önizleme Ekle"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Default Preview"
-msgstr "Önizlemeyi Güncelle"
+msgstr "Varsayılan Önizleme"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Select UI Scene:"
-msgstr "Bir Kaynak Örüntü Seçin:"
+msgstr "UI Sahnesi'ni seçin:"
#: editor/plugins/theme_editor_preview.cpp
msgid ""
"Toggle the control picker, allowing to visually select control types for "
"edit."
msgstr ""
+"Düzenleme için kontrol türlerini görsel olarak seçmeye izin vererek kontrol "
+"seçiciyi açın."
#: editor/plugins/theme_editor_preview.cpp
msgid "Toggle Button"
-msgstr "Değiştirme Düğmesi"
+msgstr "Geçiş Düğmesi"
#: editor/plugins/theme_editor_preview.cpp
msgid "Disabled Button"
@@ -12484,6 +12583,16 @@ msgstr "Eğri Noktası Konumu Ayarla"
msgid "Set Portal Point Position"
msgstr "Eğri Noktası Konumu Ayarla"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Silindir Şekli Yarıçapını Değiştir"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "EÄŸriyi Konumda Ayarla"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "Silindir Yarıçapını Değiştir"
@@ -12767,6 +12876,11 @@ msgstr "Işık haritalarını çizme"
msgid "Class name can't be a reserved keyword"
msgstr "Sınıf ismi ayrılmış anahtar kelime olamaz"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Seçimi Doldur"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "İç özel durum yığını izlemesinin sonu"
@@ -13251,80 +13365,80 @@ msgstr "Görsel Betikte Ara"
msgid "Get %s"
msgstr "Getir %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Paket ismi eksik."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Paket segmentleri sıfır olmayan uzunlukta olmalıdır."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "Android uygulama paketi adlarında '% s' karakterine izin verilmiyor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "Rakam, paket segmentindeki ilk karakter olamaz."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "'%s' karakteri bir paket segmentindeki ilk karakter olamaz."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "Paket en azından bir tane '.' ayıracına sahip olmalıdır."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Listeden aygıt seç"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Tümünü Dışa Aktarma"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Kaldır"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Yükleniyor, lütfen bekleyin..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Sahne Örneklenemedi!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Çalışan Özel Betik..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Klasör oluşturulamadı."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "'apksigner' aracı bulunamıyor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
"Android derleme şablonu projede yüklü değil. Proje menüsünden yükleyin."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
@@ -13332,13 +13446,13 @@ msgstr ""
"Hata Ayıklama Anahtar Deposu, Hata Ayıklama Kullanıcısı VE Hata Ayıklama "
"Şifresi konfigüre edilmelidir VEYA hiçbiri konfigüre edilmemelidir."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"Anahtar deposunda Hata Ayıklayıcı Ayarları'nda veya ön ayarda "
"yapılandırılmamış."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
@@ -13346,50 +13460,50 @@ msgstr ""
"Yayınlama Anahtar Deposu, Yayınlama Kullanıcısı be Yayınlama Şifresi "
"ayarları konfigüre edilmeli VEYA hiçbiri konfigüre edilmemelidir."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"Dışa aktarma ön kümesinde yanlış yapılandırılan anahtar deposunu (keystore) "
"serbest bırakın."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr "Editör Ayarlarında geçerli bir Android SDK yolu gerekli."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "Editör Ayarlarında geçersiz Android SDK yolu."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "Eksik 'platform araçları' dizini!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "Android SDK platform-tools'un adb komutu bulunamıyor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Lütfen Editör Ayarlarında girilen Android SDK klasörünü kontrol ediniz."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "Eksik 'inşa-araçları' dizini!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr "Android SDK platform-tools'un apksigner komutu bulunamıyor."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "APK genişletmesi için geçersiz ortak anahtar."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Geçersiz paket ismi:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13397,40 +13511,25 @@ msgstr ""
"Geçersiz \"GodotPaymentV3\" modülü \"android/modüller\" proje ayarına dahil "
"edildi (Godot 3.2.2'de deÄŸiÅŸtirildi).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
"Eklentileri kullanabilmek için \"Özel Derleme Kullan\" seçeneği aktif olmalı."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"\"Özgürlük Derecesi (Degrees Of Freedom)\" sadece \"Xr Modu\" \"Oculus "
-"Mobile VR\" olduğunda geçerlidir."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"El Takibi(Hand Tracking)\" sadece \"Xr Modu\" \"Oculus Mobile VR\" "
"olduğunda geçerlidir."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"\"Odak Farkındalığı(Focus Awareness)\" yalnızca \"Xr Modu\" \"Oculus Mobil VR"
-"\" olduğunda geçerlidir."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"\"AAB Dışa Aktar\" yalnızca \"Özel Yapı Kullan\" etkinleştirildiğinde "
"geçerlidir."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13438,57 +13537,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Dosyalar Taranıyor,\n"
"Lütfen Bekleyiniz..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "Dışa aktarma için şablon açılamadı:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Ekliyor %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Tümünü Dışa Aktarma"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr "Geçersiz dosya adı! Android Uygulama Paketi *.aab uzantısı gerektirir."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "APK GeniÅŸletme, Android Uygulama Paketi ile uyumlu deÄŸildir."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "Geçersiz dosya adı! Android APK, * .apk uzantısını gerektirir."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13496,7 +13595,7 @@ msgstr ""
"Özel olarak oluşturulmuş bir şablondan oluşturmaya çalışılıyor, ancak bunun "
"için sürüm bilgisi yok. Lütfen 'Proje' menüsünden yeniden yükleyin."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13508,26 +13607,26 @@ msgstr ""
" Godot Versiyonu: %s\n"
"Lütfen 'Proje' menüsünden Android derleme şablonunu yeniden yükleyin."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "Proje yolunda proje.godot alınamadı."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "Dosya yazılamadı:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Android Projesi OluÅŸturma (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13537,11 +13636,11 @@ msgstr ""
"Alternatif olarak, Android derleme dokümantasyonu için docs.godotengine.org "
"adresini ziyaret edin.."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "Çıktı taşınıyor"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13549,24 +13648,24 @@ msgstr ""
"Dışa aktarma dosyası kopyalanamıyor ve yeniden adlandırılamıyor, çıktılar "
"için gradle proje dizinini kontrol edin."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Animasyon bulunamadı: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Konturlar oluÅŸturuluyor..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "Dışa aktarma için şablon açılamadı:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13574,21 +13673,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Ekliyor %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Dosya yazılamadı:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "APK hizalanıyor ..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14125,6 +14224,14 @@ msgstr ""
"NavigationMeshInstance, bir Navigation düğümünün çocuğu ya da torunu "
"olmalıdır. O yalnızca yönlendirme verisi sağlar."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14453,6 +14560,14 @@ msgstr "Geçerli bir uzantı kullanılmalı."
msgid "Enable grid minimap."
msgstr "Izgara haritasını etkinleştir."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14506,6 +14621,10 @@ msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
"Herhangi bir şeyi işlemek için görüntükapısı boyutu 0'dan büyük olmalıdır."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14559,6 +14678,41 @@ msgstr "uniform için atama."
msgid "Constants cannot be modified."
msgstr "Sabit deÄŸerler deÄŸiÅŸtirilemez."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Dinlenme duruÅŸu oluÅŸtur (kemiklerden)"
+
+#~ msgid "Bottom"
+#~ msgstr "Alt"
+
+#~ msgid "Left"
+#~ msgstr "Sol"
+
+#~ msgid "Right"
+#~ msgstr "SaÄŸ"
+
+#~ msgid "Front"
+#~ msgstr "Ön"
+
+#~ msgid "Rear"
+#~ msgstr "Arka"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "İsimsiz Gizmo"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Özgürlük Derecesi (Degrees Of Freedom)\" sadece \"Xr Modu\" \"Oculus "
+#~ "Mobile VR\" olduğunda geçerlidir."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "\"Odak Farkındalığı(Focus Awareness)\" yalnızca \"Xr Modu\" \"Oculus "
+#~ "Mobil VR\" olduğunda geçerlidir."
+
#~ msgid "Package Contents:"
#~ msgstr "Paket İçerikleri:"
@@ -16496,9 +16650,6 @@ msgstr "Sabit deÄŸerler deÄŸiÅŸtirilemez."
#~ msgid "Images:"
#~ msgstr "Bedizler:"
-#~ msgid "Group"
-#~ msgstr "Öbek"
-
#~ msgid "Sample Conversion Mode: (.wav files):"
#~ msgstr "Örnek Dönüşüm Biçimi: (.wav dizeçleri):"
diff --git a/editor/translations/tt.po b/editor/translations/tt.po
index e7b37069b7..b169cafdc7 100644
--- a/editor/translations/tt.po
+++ b/editor/translations/tt.po
@@ -994,7 +994,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1623,13 +1623,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1999,7 +1999,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2477,6 +2477,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3100,6 +3124,10 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+msgid "Apply MeshInstance Transforms"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3340,6 +3368,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5380,6 +5412,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6278,7 +6320,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6862,6 +6908,14 @@ msgstr ""
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Center Node"
+msgstr ""
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7356,11 +7410,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7388,6 +7442,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7495,42 +7603,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7792,6 +7880,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7857,7 +7949,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11757,6 +11849,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12037,6 +12137,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12503,159 +12607,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12663,57 +12756,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12721,54 +12814,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12776,19 +12869,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13238,6 +13331,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13527,6 +13628,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13567,6 +13676,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/tzm.po b/editor/translations/tzm.po
index 8c7d3f272c..b0d9d05525 100644
--- a/editor/translations/tzm.po
+++ b/editor/translations/tzm.po
@@ -992,7 +992,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1621,13 +1621,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1997,7 +1997,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2475,6 +2475,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3098,6 +3122,10 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+msgid "Apply MeshInstance Transforms"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3338,6 +3366,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5378,6 +5410,16 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Locked"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Grouped"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6276,7 +6318,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -6860,6 +6906,14 @@ msgstr ""
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Center Node"
+msgstr ""
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7354,11 +7408,11 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
+msgid "Reset to Rest Pose"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7386,6 +7440,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7493,42 +7601,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -7790,6 +7878,10 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Occlusion Culling"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -7855,7 +7947,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -11755,6 +11847,14 @@ msgstr ""
msgid "Set Portal Point Position"
msgstr ""
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Position"
+msgstr ""
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12035,6 +12135,10 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+msgid "Build Solution"
+msgstr ""
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12501,159 +12605,148 @@ msgstr ""
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -12661,57 +12754,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -12719,54 +12812,54 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -12774,19 +12867,19 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13236,6 +13329,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13525,6 +13626,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13565,6 +13674,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/uk.po b/editor/translations/uk.po
index a889e83e19..fd9f2a1b8a 100644
--- a/editor/translations/uk.po
+++ b/editor/translations/uk.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Ukrainian (Godot Engine)\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-08-04 12:10+0000\n"
+"PO-Revision-Date: 2021-08-12 21:32+0000\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/"
"godot/uk/>\n"
@@ -383,15 +383,13 @@ msgstr "Ð’Ñтавити анімацію"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "Ðеможливо відкрити '%s'."
+msgstr "вузол «%s»"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
-msgstr "ÐнімаціÑ"
+msgstr "анімаціÑ"
#: editor/animation_track_editor.cpp
msgid "AnimationPlayer can't animate itself, only other players."
@@ -399,9 +397,8 @@ msgstr "AnimationPlayer не може анімувати Ñебе, лише ін
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "ВлаÑтивоÑті «%s» не Ñ–Ñнує."
+msgstr "влаÑтивіÑть «%s»"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -1042,7 +1039,7 @@ msgstr ""
msgid "Dependencies"
msgstr "ЗалежноÑті"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "РеÑурÑ"
@@ -1700,13 +1697,13 @@ msgstr ""
"Увімкніть пункт «Імпортувати Pvrtc» у параметрах проєкту або вимкніть пункт "
"«Увімкнено резервні драйвери»."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Ðетипового шаблону діагноÑтики не знайдено."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2092,7 +2089,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "Ð†Ð¼Ð¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñ€ÐµÑурÑів"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Верхівка"
@@ -2329,6 +2326,9 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"ОбертаєтьÑÑ Ð¿Ñ–Ð´ Ñ‡Ð°Ñ Ð¿ÐµÑ€ÐµÐ¼Ð°Ð»ÑŒÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ñ–ÐºÐ½Ð° редактора.\n"
+"Увімкнено неперервне оновленнÑ, Ñке може призвеÑти до Ð·Ð±Ñ–Ð»ÑŒÑˆÐµÐ½Ð½Ñ ÑÐ¿Ð¾Ð¶Ð¸Ð²Ð°Ð½Ð½Ñ "
+"енергії. Клацніть, щоб вимкнути його."
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2604,6 +2604,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Поточна Ñцена не збережена. Відкрити в будь-Ñкому випадку?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "СкаÑувати"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Повернути"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Ðеможливо перезавантажити Ñцену, Ñку ніколи не зберігали."
@@ -3293,6 +3319,11 @@ msgid "Merge With Existing"
msgstr "Об'єднати з Ñ–Ñнуючим"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Змінити перетвореннÑ"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Відкрити Ñ– запуÑтити Ñкрипт"
@@ -3550,6 +3581,10 @@ msgstr ""
"Тип вибраного реÑурÑу (%s) не відповідає типу, Ñкий Ñ” очікуваним Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— "
"влаÑтивоÑті (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Зробити унікальним"
@@ -3845,14 +3880,12 @@ msgid "Download from:"
msgstr "Джерело отриманнÑ:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "ЗапуÑтити в браузері"
+msgstr "Відкрити у браузері"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "Помилка копіюваннÑ"
+msgstr "Копіювати адреÑу дзеркала"
#: editor/export_template_manager.cpp
msgid "Download and Install"
@@ -5662,6 +5695,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "ПереÑунути CanvasItem «%s» до (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Заблокувати позначене"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Групи"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6602,7 +6647,13 @@ msgid "Remove Selected Item"
msgstr "Вилучити вибраний елемент"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Імпортувати зі Ñцени"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Імпортувати зі Ñцени"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7194,6 +7245,16 @@ msgstr "Створити точки"
msgid "Flip Portal"
msgstr "Віддзеркалити портал"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "ЗнÑти перетвореннÑ"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Створити вузол"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "AnimationTree не міÑтить вÑтановлено шлÑху до AnimationPlayer"
@@ -7700,12 +7761,14 @@ msgid "Skeleton2D"
msgstr "ПлоÑкий каркаÑ"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Створити вільну позу (з кіÑток)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Ð’Ñтановити кіÑтки Ð´Ð»Ñ Ð²Ñ–Ð»ÑŒÐ½Ð¾Ñ— пози"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Ð’Ñтановити кіÑтки Ð´Ð»Ñ Ð²Ñ–Ð»ÑŒÐ½Ð¾Ñ— пози"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "ПерезапиÑати"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7732,6 +7795,71 @@ msgid "Perspective"
msgstr "ПерÑпектива"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Ортогонально"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "ПерÑпектива"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Ортогонально"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "ПерÑпектива"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Ортогонально"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "ПерÑпектива"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Ортогонально"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Ортогонально"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "ПерÑпектива"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Ортогонально"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "ПерÑпектива"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "ÐŸÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÑ€Ð²Ð°Ð½Ð¾."
@@ -7839,42 +7967,22 @@ msgid "Bottom View."
msgstr "ВиглÑд знизу."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Знизу"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "ВиглÑд зліва."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Зліва"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "ВиглÑд Ñправа."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Справа"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "ВиглÑд Ñпереду."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Спереду"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "ВиглÑд ззаду."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "Ззаду"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "ВирівнÑти Ð¿ÐµÑ€ÐµÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð· переглÑдом"
@@ -8146,6 +8254,11 @@ msgid "View Portal Culling"
msgstr "ПереглÑнути Ð²Ñ–Ð´Ð±Ñ€Ð°ÐºÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Portal"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "ПереглÑнути Ð²Ñ–Ð´Ð±Ñ€Ð°ÐºÐ¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ Portal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Параметри…"
@@ -8211,8 +8324,9 @@ msgid "Post"
msgstr "ПіÑлÑ"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "Штука без назви"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Проєкт без назви"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8671,6 +8785,9 @@ msgid ""
"Select a theme type from the list to edit its items.\n"
"You can add a custom type or import a type with its items from another theme."
msgstr ""
+"Виберіть тип теми зі ÑпиÑку, щоб редагувати його запиÑи.\n"
+"Ви можете додати нетиповий тип або імпортувати тип із його запиÑами з іншої "
+"теми."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Color Items"
@@ -8701,6 +8818,8 @@ msgid ""
"This theme type is empty.\n"
"Add more items to it manually or by importing from another theme."
msgstr ""
+"Цей тип теми є порожнім.\n"
+"Додайте до нього запиÑи вручну або імпортуваннÑм з іншої теми."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Color Item"
@@ -12338,14 +12457,22 @@ msgid "Change Ray Shape Length"
msgstr "Змінити довжину форми променÑ"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Room Point Position"
-msgstr "Задати Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð½Ñ Ñ‚Ð¾Ñ‡ÐºÐ¸ кривої"
+msgstr "Задати Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð½Ñ Ñ‚Ð¾Ñ‡ÐºÐ¸ кімнати"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Portal Point Position"
-msgstr "Задати Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð½Ñ Ñ‚Ð¾Ñ‡ÐºÐ¸ кривої"
+msgstr "Задати Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð½Ñ Ñ‚Ð¾Ñ‡ÐºÐ¸ порталу"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Змінити Ñ€Ð°Ð´Ñ–ÑƒÑ Ñ„Ð¾Ñ€Ð¼Ð¸ циліндра"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Ð’Ñтановити криву в позиції"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -12630,6 +12757,11 @@ msgstr "КреÑÐ»ÐµÐ½Ð½Ñ ÐºÐ°Ñ€Ñ‚ оÑвітленнÑ"
msgid "Class name can't be a reserved keyword"
msgstr "Ðазвою клаÑу не може бути зарезервоване ключове Ñлово"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Заповнити позначене"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "Кінець траÑÑƒÐ²Ð°Ð½Ð½Ñ Ñтека Ð´Ð»Ñ Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½ÑŒÐ¾Ð³Ð¾ виключеннÑ"
@@ -13113,69 +13245,69 @@ msgstr "Шукати VisualScript"
msgid "Get %s"
msgstr "Отримати %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Ðе вказано назви пакунка."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Сегменти пакунка повинні мати ненульову довжину."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
"Ðе можна викориÑтовувати у назві пакунка програми на Android Ñимволи «%s»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "Цифра не може бути першим Ñимволом у Ñегменті пакунка."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
"Ðе можна викориÑтовувати Ñимвол «%s» Ñк перший Ñимвол назви Ñегмента пакунка."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "У назві пакунка має бути принаймні один роздільник «.»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Вибрати приÑтрій зі ÑпиÑку"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr "Запущено на %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr "ЕкÑÐ¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ APK…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr "ВилученнÑ…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr "Ð’ÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð½Ð° приÑтрій. Будь лаÑка, зачекайте..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr "Ðе вдалоÑÑ Ð²Ñтановити на приÑтрій: %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr "ЗапуÑк на приÑтрої…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ на приÑтрої."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ програму apksigner."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
@@ -13183,7 +13315,7 @@ msgstr ""
"У проєкті не вÑтановлено шаблон Ð·Ð±Ð¸Ñ€Ð°Ð½Ð½Ñ Android. Ð’Ñтановіть його за "
"допомогою меню «Проєкт»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
@@ -13191,13 +13323,13 @@ msgstr ""
"Має бути налаштовано діагноÑтику Ñховища ключів, діагноÑтику кориÑтувача ÐБО "
"діагноÑтику Ð¿Ð°Ñ€Ð¾Ð»Ñ ÐБО не налаштовано діагноÑтику жодного з цих компонентів."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
"ÐÑ– у параметрах редактора, ні у шаблоні не налаштовано діагноÑтичне Ñховище "
"ключів."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
@@ -13205,53 +13337,53 @@ msgstr ""
"Має бути налаштовано параметри Ñховища ключів випуÑку, кориÑтувача випуÑку Ñ– "
"Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð²Ð¸Ð¿ÑƒÑку або не налаштовано жоден з цих параметрів."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
"У шаблоні екÑÐ¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð½ÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð¾ налаштовано Ñховище ключів випуÑку."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
"У параметрах редактора має бути вказано коректний шлÑÑ… до SDK Ð´Ð»Ñ Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "Ðекоректний шлÑÑ… до SDK Ð´Ð»Ñ Android у параметрах редактора."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "Ðе знайдено каталогу «platform-tools»!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
"Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ програми adb із інÑтрументів платформи SDK Ð´Ð»Ñ Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Будь лаÑка, перевірте, чи правильно вказано каталог SDK Ð´Ð»Ñ Android у "
"параметрах редактора."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "Ðе знайдено каталогу «build-tools»!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
"Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ програми apksigner з інÑтрументів Ð·Ð±Ð¸Ñ€Ð°Ð½Ð½Ñ SDK Ð´Ð»Ñ Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Ðекоректний відкритий ключ Ð´Ð»Ñ Ñ€Ð¾Ð·Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ APK."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Ðекоректна назва пакунка:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13259,41 +13391,26 @@ msgstr ""
"Ðекоректний модуль «GodotPaymentV3» включено до параметрів проєкту «android/"
"modules» (змінено у Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
"Щоб можна було кориÑтуватиÑÑ Ð´Ð¾Ð´Ð°Ñ‚ÐºÐ°Ð¼Ð¸, Ñлід позначити пункт "
"«ВикориÑтовувати нетипову збірку»."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"«.Степені Ñвободи» працюють, лише Ñкщо «Режим Xr» має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«Oculus "
-"Mobile VR»."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"«СтеженнÑм за руками» можна ÑкориÑтатиÑÑ, лише Ñкщо «Режим Xr» дорівнює "
"«Oculus Mobile VR»."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"«ВрахуваннÑм фокуÑа» можна ÑкориÑтатиÑÑ, лише Ñкщо «Режим Xr» дорівнює "
-"«Oculus Mobile VR»."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"Пункт «ЕкÑпортувати AAB» Ñ” чинним, лише Ñкщо увімкнено «ВикориÑтовувати "
"нетипове збираннÑ»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13305,54 +13422,54 @@ msgstr ""
"заÑобів Ð´Ð»Ñ Ñ€Ð¾Ð·Ñ€Ð¾Ð±ÐºÐ¸ Android.\n"
"Отриманий у результаті %s не підпиÑано."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr "ПідпиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ñ–Ð°Ð³Ð½Ð¾Ñтики %s…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr "ПідпиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ð¸Ð¿ÑƒÑку %s…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr "Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ Ñховище ключів. Ðеможливо виконати екÑпортуваннÑ."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr "«apksigner» повернуто Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¾ помилку із номером %d"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr "ПеревірÑємо %s…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr "%s не пройдено перевірку за допомогою «apksigner»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr "ЕкÑпорт на Android"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
"Ðекоректна назва файла! Пакет програми Android повинен мати ÑÑƒÑ„Ñ–ÐºÑ Ð½Ð°Ð·Ð²Ð¸ *."
"aab."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "Ð Ð¾Ð·ÑˆÐ¸Ñ€ÐµÐ½Ð½Ñ APK Ñ” неÑуміÑним із Android App Bundle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
"Ðекоректна назва файла! Пакунок Android APK повинен мати ÑÑƒÑ„Ñ–ÐºÑ Ð½Ð°Ð·Ð²Ð¸ *.apk."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr "Ðепідтримуваний формат екÑпортуваннÑ!\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
@@ -13361,7 +13478,7 @@ msgstr ""
"виÑвлено даних щодо верÑÑ–Ñ—. Будь лаÑка, повторно вÑтановіть шаблон за "
"допомогою меню «Проєкт»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13374,25 +13491,25 @@ msgstr ""
"Будь лаÑка, повторно вÑтановіть шаблон Ð´Ð»Ñ Ð·Ð±Ð¸Ñ€Ð°Ð½Ð½Ñ Ð´Ð»Ñ Android за допомогою "
"меню «Проєкт»."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
"Ðе вдалоÑÑ Ð¿ÐµÑ€ÐµÐ·Ð°Ð¿Ð¸Ñати файли res://android/build/res/*.xml із назвою проєкту"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr "Ðе вдалоÑÑ ÐµÐºÑпортувати файли проєкту до проєкту gradle\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr "Ðе вдалоÑÑ Ð·Ð°Ð¿Ð¸Ñати файл пакунка розширеннÑ!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Ð—Ð±Ð¸Ñ€Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾Ñ”ÐºÑ‚Ñƒ Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13402,11 +13519,11 @@ msgstr ""
"Крім того, можете відвідати docs.godotengine.org Ñ– ознайомитиÑÑ Ñ–Ð· "
"документацією щодо Ð·Ð±Ð¸Ñ€Ð°Ð½Ð½Ñ Ð´Ð»Ñ Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "ПереÑÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ… даних"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13414,15 +13531,15 @@ msgstr ""
"Ðе вдалоÑÑ Ñкопіювати Ñ– перейменувати файл екÑпортованих даних. Виведені "
"дані можна знайти у каталозі проєкту gradle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr "Пакунок не знайдено: %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr "Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ APK…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
@@ -13430,7 +13547,7 @@ msgstr ""
"Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ шаблон APK Ð´Ð»Ñ ÐµÐºÑпортуваннÑ:\n"
"%s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13441,19 +13558,19 @@ msgstr ""
"Будь лаÑка, Ñтворіть шаблон з уÑіма необхідними бібліотеками або зніміть "
"позначку з архітектур із пропущеними бібліотеками у Ñтилі екÑпортуваннÑ."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr "Ð”Ð¾Ð´Ð°Ð²Ð°Ð½Ð½Ñ Ñ„Ð°Ð¹Ð»Ñ–Ð²â€¦"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr "Ðе вдалоÑÑ ÐµÐºÑпортувати файли проєкту"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "Вирівнюємо APK..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr "Ðе вдалоÑÑ Ñ€Ð¾Ð·Ð¿Ð°ÐºÑƒÐ²Ð°Ñ‚Ð¸ тимчаÑовий невирівнÑний APK."
@@ -14000,6 +14117,14 @@ msgstr ""
"NavigationMeshInstance має бути дочірнім елементом вузла Navigation або "
"елементом ще нижчої підпорÑдкованоÑті. Він надає лише навігаційні дані."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14144,36 +14269,50 @@ msgid ""
"RoomList path is invalid.\n"
"Please check the RoomList branch has been assigned in the RoomManager."
msgstr ""
+"ШлÑÑ… RoomList Ñ” некоректним.\n"
+"Будь лаÑка, перевірте, що у RoomManager вказано Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð³Ñ–Ð»ÐºÐ¸ RoomList."
#: scene/3d/room_manager.cpp
msgid "RoomList contains no Rooms, aborting."
-msgstr ""
+msgstr "RoomList не міÑтить запиÑів кімнат, перериваємо обробку."
#: scene/3d/room_manager.cpp
msgid "Misnamed nodes detected, check output log for details. Aborting."
msgstr ""
+"ВиÑвлено вузли із помилковими назвами. ОзнайомтеÑÑ Ñ–Ð· запиÑами журналу, щоб "
+"дізнатиÑÑ Ð±Ñ–Ð»ÑŒÑˆÐµ. Перериваємо обробку."
#: scene/3d/room_manager.cpp
msgid "Portal link room not found, check output log for details."
msgstr ""
+"Ðе виÑвлено кімнати поÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð½Ð° портал. ОзнайомтеÑÑ Ñ–Ð· журналом, щоб "
+"дізнатиÑÑ Ð±Ñ–Ð»ÑŒÑˆÐµ."
#: scene/3d/room_manager.cpp
msgid ""
"Portal autolink failed, check output log for details.\n"
"Check the portal is facing outwards from the source room."
msgstr ""
+"Помилка під Ñ‡Ð°Ñ Ñпроби автоматично пов'Ñзати портал. ОзнайомтеÑÑ Ñ–Ð· "
+"журналом, щоб дізнатиÑÑ Ð±Ñ–Ð»ÑŒÑˆÐµ.\n"
+"Перевірте, чи веде портал назовні щодо початкової кімнати."
#: scene/3d/room_manager.cpp
msgid ""
"Room overlap detected, cameras may work incorrectly in overlapping area.\n"
"Check output log for details."
msgstr ""
+"ВиÑвлено Ð¿ÐµÑ€ÐµÐºÑ€Ð¸Ñ‚Ñ‚Ñ ÐºÑ–Ð¼Ð½Ð°Ñ‚. У облаÑті Ð¿ÐµÑ€ÐµÐºÑ€Ð¸Ñ‚Ñ‚Ñ ÐºÐ°Ð¼ÐµÑ€Ð¸ можуть працювати із "
+"помилками.\n"
+"ОзнайомтеÑÑ Ñ–Ð· журналом, щоб дізнатиÑÑ Ð±Ñ–Ð»ÑŒÑˆÐµ."
#: scene/3d/room_manager.cpp
msgid ""
"Error calculating room bounds.\n"
"Ensure all rooms contain geometry or manual bounds."
msgstr ""
+"Помилка під Ñ‡Ð°Ñ Ñпроби обчиÑлити межі кімнат.\n"
+"ПереконайтеÑÑ, що Ð´Ð»Ñ ÑƒÑÑ–Ñ… кімнат вказано межі вручну або геометричні межі."
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
@@ -14340,6 +14479,14 @@ msgstr "Ðеобхідно викориÑтовувати допуÑтиме Ñ€Ð
msgid "Enable grid minimap."
msgstr "Увімкнути мінікарту ґратки."
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14395,6 +14542,10 @@ msgstr ""
"Щоб програма могла хоч щоÑÑŒ показати, розмір Ð¿Ð¾Ð»Ñ Ð¿ÐµÑ€ÐµÐ³Ð»Ñду має бути більшим "
"за 0."
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14453,6 +14604,41 @@ msgstr "ÐŸÑ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¾Ð´Ð½Ð¾Ñ€Ñ–Ð´Ð½Ð¾Ð³Ð¾."
msgid "Constants cannot be modified."
msgstr "Сталі не можна змінювати."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Створити вільну позу (з кіÑток)"
+
+#~ msgid "Bottom"
+#~ msgstr "Знизу"
+
+#~ msgid "Left"
+#~ msgstr "Зліва"
+
+#~ msgid "Right"
+#~ msgstr "Справа"
+
+#~ msgid "Front"
+#~ msgstr "Спереду"
+
+#~ msgid "Rear"
+#~ msgstr "Ззаду"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "Штука без назви"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "«.Степені Ñвободи» працюють, лише Ñкщо «Режим Xr» має Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Â«Oculus "
+#~ "Mobile VR»."
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "«ВрахуваннÑм фокуÑа» можна ÑкориÑтатиÑÑ, лише Ñкщо «Режим Xr» дорівнює "
+#~ "«Oculus Mobile VR»."
+
#~ msgid "Package Contents:"
#~ msgstr "ВміÑÑ‚ пакунка:"
diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po
index fb70bc5703..332f5bd681 100644
--- a/editor/translations/ur_PK.po
+++ b/editor/translations/ur_PK.po
@@ -1014,7 +1014,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr ""
@@ -1649,13 +1649,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2042,7 +2042,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr ""
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr ""
@@ -2528,6 +2528,30 @@ msgid "Current scene not saved. Open anyway?"
msgstr ""
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Undo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Redo: %s"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr ""
@@ -3162,6 +3186,10 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+msgid "Apply MeshInstance Transforms"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3406,6 +3434,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5510,6 +5542,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr ".تمام کا انتخاب"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr ".تمام کا انتخاب"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6435,7 +6479,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7035,6 +7083,15 @@ msgstr ".تمام کا انتخاب"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr ".اینیمیشن کی کیز کو ڈیلیٹ کرو"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7541,11 +7598,12 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "سب سکریپشن بنائیں"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
+msgid "Overwrite Rest Pose"
msgstr ""
#: editor/plugins/skeleton_editor_plugin.cpp
@@ -7574,6 +7632,60 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -7684,42 +7796,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "Align Transform with View"
msgstr ".تمام کا انتخاب"
@@ -7986,6 +8078,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "سب سکریپشن بنائیں"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr ""
@@ -8051,7 +8148,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12100,6 +12197,15 @@ msgstr ".تمام کا انتخاب"
msgid "Set Portal Point Position"
msgstr ".تمام کا انتخاب"
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr ".تمام کا انتخاب"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12392,6 +12498,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr ".تمام کا انتخاب"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -12880,162 +12991,151 @@ msgstr "سب سکریپشن بنائیں"
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr ".سپورٹ"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "سب سکریپشن بنائیں"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "سب سکریپشن بنائیں"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13043,57 +13143,57 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13101,55 +13201,55 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "سب سکریپشن بنائیں"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13157,21 +13257,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr ".تمام کا انتخاب"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "سب سکریپشن بنائیں"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13624,6 +13724,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13913,6 +14021,14 @@ msgstr ""
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -13953,6 +14069,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/vi.po b/editor/translations/vi.po
index d50d622215..518c301ca6 100644
--- a/editor/translations/vi.po
+++ b/editor/translations/vi.po
@@ -24,8 +24,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-08-02 02:00+0000\n"
-"Last-Translator: Rev <revolnoom7801@gmail.com>\n"
+"PO-Revision-Date: 2021-09-15 00:46+0000\n"
+"Last-Translator: IoeCmcomc <hopdaigia2004@gmail.com>\n"
"Language-Team: Vietnamese <https://hosted.weblate.org/projects/godot-engine/"
"godot/vi/>\n"
"Language: vi\n"
@@ -33,7 +33,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.9-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -383,7 +383,7 @@ msgstr "Chèn Anim"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
msgid "node '%s'"
-msgstr ""
+msgstr "nút '%s'"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
@@ -605,9 +605,8 @@ msgid "Go to Previous Step"
msgstr "Äến Bước trước đó"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Apply Reset"
-msgstr "Äặt lại phóng"
+msgstr "Ãp dụng đặt lại"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
@@ -803,8 +802,8 @@ msgid ""
"Target method not found. Specify a valid method or attach a script to the "
"target node."
msgstr ""
-"Phương thức không tìm thấy. Chỉ định phương thức hợp lệ hoặc đính kèm tệp "
-"lệnh vào nút."
+"Phương thức không được tìm thấy. Chỉ định phương thức hợp lệ hoặc đính kèm "
+"tệp lệnh vào nút."
#: editor/connections_dialog.cpp
msgid "Connect to Node:"
@@ -921,7 +920,7 @@ msgstr "Hủy kết nối"
#: editor/connections_dialog.cpp
msgid "Connect a Signal to a Method"
-msgstr "Kết nối tín hiệu vào hàm"
+msgstr "Kết nối tín hiệu vào một hàm"
#: editor/connections_dialog.cpp
msgid "Edit Connection:"
@@ -952,9 +951,8 @@ msgid "Edit..."
msgstr "Chỉnh sửa..."
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Go to Method"
-msgstr "Äến Method"
+msgstr "Äi đến phương thức"
#: editor/create_dialog.cpp
msgid "Change %s Type"
@@ -1034,7 +1032,7 @@ msgstr ""
msgid "Dependencies"
msgstr "Các phụ thuộc"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "Tài nguyên"
@@ -1166,7 +1164,7 @@ msgstr "Cảm ơn từ cộng đồng Godot!"
#: editor/editor_about.cpp editor/editor_node.cpp editor/project_manager.cpp
msgid "Click to copy."
-msgstr ""
+msgstr "Nháy để sao chép."
#: editor/editor_about.cpp
msgid "Godot Engine contributors"
@@ -1291,9 +1289,8 @@ msgid "The following files failed extraction from asset \"%s\":"
msgstr "Không thể lấy các tệp sau khá»i gói:"
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "(and %s more files)"
-msgstr "Và %s tệp nữa."
+msgstr "(và %s tệp nữa)"
#: editor/editor_asset_installer.cpp
#, fuzzy
@@ -1573,9 +1570,8 @@ msgid "Name"
msgstr "Tên"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Global Variable"
-msgstr "Äổi tên Biến"
+msgstr "Biến toàn cục"
#: editor/editor_data.cpp
msgid "Paste Params"
@@ -1697,13 +1693,13 @@ msgstr ""
"Chá»n kích hoạt 'Nhập PVRTC' trong Cài đặt Dá»± án, hoặc tắt 'Kích hoạt Driver "
"Tương thích Ngược'."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "Không tìm thấy mẫu gỡ lỗi tuỳ chỉnh."
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -1784,7 +1780,7 @@ msgstr "(Hiện tại)"
#: editor/editor_feature_profile.cpp
msgid "(none)"
-msgstr ""
+msgstr "(không có)"
#: editor/editor_feature_profile.cpp
msgid "Remove currently selected profile, '%s'? Cannot be undone."
@@ -1819,19 +1815,16 @@ msgid "Enable Contextual Editor"
msgstr "Bật trình chỉnh sửa ngữ cảnh"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Class Properties:"
-msgstr "Thuộc tính:"
+msgstr "Thuộc tính lớp:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Main Features:"
-msgstr "Tính năng"
+msgstr "Tính năng chính:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Nodes and Classes:"
-msgstr "Lớp đã bật:"
+msgstr "Các nút và lớp:"
#: editor/editor_feature_profile.cpp
msgid "File '%s' format is invalid, import aborted."
@@ -1857,14 +1850,12 @@ msgid "Current Profile:"
msgstr "Hồ sơ hiện tại:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Create Profile"
-msgstr "Xoá hồ sơ"
+msgstr "Tạo hồ sơ"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Remove Profile"
-msgstr "Xóa Ô"
+msgstr "Xóa hồ sơ"
#: editor/editor_feature_profile.cpp
msgid "Available Profiles:"
@@ -1884,14 +1875,12 @@ msgid "Export"
msgstr "Xuất ra"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Configure Selected Profile:"
-msgstr "Hồ sơ hiện tại:"
+msgstr "Cấu hình hồ sÆ¡ được chá»n:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Extra Options:"
-msgstr "Tuỳ chá»n Lá»›p:"
+msgstr "Tuỳ chá»n bổ sung:"
#: editor/editor_feature_profile.cpp
msgid "Create or import a profile to edit available classes and properties."
@@ -1922,9 +1911,8 @@ msgid "Select Current Folder"
msgstr "Chá»n thư mục hiện tại"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-#, fuzzy
msgid "File exists, overwrite?"
-msgstr "Tệp tin tồn tại, ghi đè?"
+msgstr "Tệp đã tồn tại, ghi đè chứ?"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Select This Folder"
@@ -2085,7 +2073,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "Nhập lại tài nguyên"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "Trên đầu"
@@ -2124,7 +2112,7 @@ msgstr "mặc định:"
#: editor/editor_help.cpp
msgid "Methods"
-msgstr "Hàm"
+msgstr "Phương thức"
#: editor/editor_help.cpp
msgid "Theme Properties"
@@ -2156,7 +2144,7 @@ msgstr ""
#: editor/editor_help.cpp
msgid "Method Descriptions"
-msgstr "Nội dung Hàm"
+msgstr "Mô tả phương thức"
#: editor/editor_help.cpp
msgid ""
@@ -2189,7 +2177,7 @@ msgstr "Chỉ tìm Lớp"
#: editor/editor_help_search.cpp
msgid "Methods Only"
-msgstr "Chỉ tìm Hàm"
+msgstr "Chỉ tìm phương thức"
#: editor/editor_help_search.cpp
msgid "Signals Only"
@@ -2217,7 +2205,7 @@ msgstr "Lá»›p"
#: editor/editor_help_search.cpp
msgid "Method"
-msgstr "Hàm"
+msgstr "Phương thức"
#: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp
msgid "Signal"
@@ -2590,6 +2578,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "Cảnh hiện tại chưa lưu. Kệ mở luôn?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "Hoàn tác"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "Làm lại"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "Không thể nạp má»™t cảnh chưa lưu bao giá»."
@@ -2938,9 +2952,8 @@ msgid "Orphan Resource Explorer..."
msgstr "Tìm kiếm tài nguyên mất gốc..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Reload Current Project"
-msgstr "Äổi tên Dá»± án"
+msgstr "Tải lại dự án hiện tại"
#: editor/editor_node.cpp
msgid "Quit to Project List"
@@ -2998,7 +3011,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Visible Navigation"
-msgstr ""
+msgstr "Äiá»u hướng nhìn thấy được"
#: editor/editor_node.cpp
msgid ""
@@ -3096,7 +3109,7 @@ msgstr "Mở Hướng dẫn"
#: editor/editor_node.cpp
msgid "Questions & Answers"
-msgstr ""
+msgstr "Há»i đáp"
#: editor/editor_node.cpp
msgid "Report a Bug"
@@ -3115,9 +3128,8 @@ msgid "Community"
msgstr "Cộng đồng"
#: editor/editor_node.cpp
-#, fuzzy
msgid "About Godot"
-msgstr "VỠchúng tôi"
+msgstr "Vá» Godot"
#: editor/editor_node.cpp
msgid "Support Godot Development"
@@ -3211,9 +3223,8 @@ msgid "Manage Templates"
msgstr "Quản lý Mẫu xuất bản"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Install from file"
-msgstr "Cài đặt từ File"
+msgstr "Cài đặt từ tệp"
#: editor/editor_node.cpp
#, fuzzy
@@ -3265,6 +3276,11 @@ msgid "Merge With Existing"
msgstr "Hợp nhất với Hiện có"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "Äổi Transform Animation"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "Mở & Chạy mã lệnh"
@@ -3365,9 +3381,8 @@ msgid "Update"
msgstr "Cập nhật"
#: editor/editor_plugin_settings.cpp
-#, fuzzy
msgid "Version"
-msgstr "Phiên bản:"
+msgstr "Phiên bản"
#: editor/editor_plugin_settings.cpp
#, fuzzy
@@ -3385,14 +3400,12 @@ msgid "Measure:"
msgstr "Äo đạc:"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Frame Time (ms)"
-msgstr "Thá»i gian khung hình (giây)"
+msgstr "Thá»i gian khung hình (ms)"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Average Time (ms)"
-msgstr "Thá»i gian trung bình (giây)"
+msgstr "Thá»i gian trung bình (ms)"
#: editor/editor_profiler.cpp
msgid "Frame %"
@@ -3516,6 +3529,10 @@ msgid ""
msgstr ""
"Kiểu cá»§a tài nguyên đã chá»n (%s) không dùng được cho thuá»™c tính này (%s)."
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "Duy nhất"
@@ -4211,7 +4228,7 @@ msgstr "Xoá Nhóm"
#: editor/groups_editor.cpp editor/node_dock.cpp
msgid "Groups"
-msgstr "Nhóm (Groups)"
+msgstr "Nhóm"
#: editor/groups_editor.cpp
msgid "Nodes Not in Group"
@@ -5623,6 +5640,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "Di chuyển CanvasItem \"%s\" tới (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "Khoá lá»±a chá»n"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Nhóm"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6564,7 +6593,13 @@ msgid "Remove Selected Item"
msgstr "Xóa mục đã chá»n"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "Nhập từ Cảnh"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "Nhập từ Cảnh"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7161,6 +7196,16 @@ msgstr "Xóa Point"
msgid "Flip Portal"
msgstr "Lật Ngang"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "Xóa biến đổi"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "Tạo Nút"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "AnimationTree chưa đặt đưá»ng dẫn đến AnimationPlayer nào"
@@ -7468,7 +7513,7 @@ msgstr "Dòng"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function"
-msgstr "Äi tá»›i Hàm"
+msgstr "Äi tá»›i hàm"
#: editor/plugins/script_text_editor.cpp
msgid "Only resources from filesystem can be dropped."
@@ -7611,7 +7656,7 @@ msgstr "Xóa hết má»i dấu trang"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Function..."
-msgstr "Äi tá»›i Hàm..."
+msgstr "Äi tá»›i hàm..."
#: editor/plugins/script_text_editor.cpp
msgid "Go to Line..."
@@ -7663,12 +7708,14 @@ msgid "Skeleton2D"
msgstr "Skeleton2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "Tạo tư thế nghỉ (Từ Xương)"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "Äặt Xương thành Tư thế Nghỉ"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "Äặt Xương thành Tư thế Nghỉ"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "Ghi đè"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7695,6 +7742,71 @@ msgid "Perspective"
msgstr "Phối cảnh"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "Vuông góc"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "Phối cảnh"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "Vuông góc"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "Phối cảnh"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "Vuông góc"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "Phối cảnh"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "Vuông góc"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "Vuông góc"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "Phối cảnh"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "Vuông góc"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "Phối cảnh"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "Hủy Biến đổi."
@@ -7811,42 +7923,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "Dưới"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "Trái"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "Phải"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "Trước"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8116,6 +8208,11 @@ msgid "View Portal Culling"
msgstr "Cài đặt Cổng xem"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "Cài đặt Cổng xem"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "Cài đặt..."
@@ -8181,8 +8278,9 @@ msgid "Post"
msgstr "Sau"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr ""
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "Dự án không tên"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8974,7 +9072,7 @@ msgstr ""
#: editor/plugins/theme_editor_preview.cpp
msgid "Submenu"
-msgstr "Menu phụ"
+msgstr "Bảng chá»n phụ"
#: editor/plugins/theme_editor_preview.cpp
msgid "Subitem 1"
@@ -9678,18 +9776,16 @@ msgid "Create Shader Node"
msgstr "Tạo nút Shader"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Color function."
-msgstr "Thêm Hàm"
+msgstr "hàm màu"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Color operator."
msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Grayscale function."
-msgstr "Tạo Function"
+msgstr "hàm đen trắng"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Converts HSV vector to RGB equivalent."
@@ -12339,6 +12435,16 @@ msgstr "Äặt vị trí Ä‘iểm uốn"
msgid "Set Portal Point Position"
msgstr "Äặt vị trí Ä‘iểm uốn"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "Chỉnh bán kính hình trụ"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "Äặt vị trí Ä‘iểm uốn"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "Thay Äổi Bán Kính Hình Trụ"
@@ -12630,6 +12736,11 @@ msgstr ""
msgid "Class name can't be a reserved keyword"
msgstr "Tên Lớp không được trùng với từ khóa"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "Chá»n tất cả"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13109,138 +13220,138 @@ msgstr "Tìm VisualScript"
msgid "Get %s"
msgstr "Lấy %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "Thiếu tên gói."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "Các phân đoạn của gói phải có độ dài khác không."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "Không được phép cho kí tá»± '%s' vào tên gói phần má»m Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "Không thể có chữ số làm kí tự đầu tiên trong một phần của gói."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "Kí tự '%s' không thể ở đầu trong một phân đoạn của gói."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "Kí tự phân cách '.' phải xuất hiện ít nhất một lần trong tên gói."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "Chá»n thiết bị trong danh sách"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "Xuất tất cả"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "Gỡ cài đặt"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "Äang tải, đợi xíu..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "Không thể bắt đầu quá trình phụ!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "Chạy Tệp lệnh Tá»± chá»n ..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "Không thể tạo folder."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "Không tìm thấy công cụ 'apksigner'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-"Mẫu xuất bản cho Android chưa được cài đặt trong dự án. Cài đặt nó từ menu "
-"Dá»± Ãn."
+"Bản mẫu dựng cho Android chưa được cài đặt trong dự án. Cài đặt nó từ bảng "
+"chá»n Dá»± Ãn."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr "Cài đặt Trình biên tập yêu cầu má»™t đưá»ng dẫn Android SDK hợp lệ."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "ÄÆ°á»ng dẫn Android SDK không hợp lệ trong Cài đặt Trình biên tập."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "Thiếu thư mục 'platform-tools'!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "Không tìm thấy lệnh adb trong bộ Android SDK platform-tools."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
"Hãy kiểm tra thư mục Android SDK được cung cấp ở Cài đặt Trình biên tập."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "Thiếu thư mục 'build-tools'!"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr "Không tìm thấy lệnh apksigner của bộ Android SDK build-tools."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "Khóa công khai của bộ APK mở rộng không hợp lệ."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "Tên gói không hợp lệ:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13248,34 +13359,23 @@ msgstr ""
"Cài đặt dự án chứa module không hợp lệ \"GodotPaymentV3\" ở mục \"android/"
"modules\" (đã thay đổi từ Godot 3.2.2).\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "\"Sử dụng Bản dựng tùy chỉnh\" phải được bật để sử dụng các tiện ích."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr "\"Bậc tự do\" chỉ dùng được khi \"Xr Mode\" là \"Oculus Mobile VR\"."
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"\"Theo dõi chuyển động tay\" chỉ dùng được khi \"Xr Mode\" là \"Oculus "
"Mobile VR\"."
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
"\"Xuất AAB\" chỉ dùng được khi \"Sử dụng Bản dựng tùy chỉnh\" được bật."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13283,97 +13383,97 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"Äang quét các tệp tin,\n"
"ChỠmột chút ..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "Không thể mở bản mẫu để xuất:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "Äang thêm %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "Xuất tất cả"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr "Tên tệp không hợp lệ! Android App Bundle cần đuôi *.aab ở cuối."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "Äuôi APK không tương thích vá»›i Android App Bundle."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "Tên tệp không hợp lệ! Android APK cần đuôi *.apk ở cuối."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-"Cố gắng xây dựng từ một mẫu xuất bản tùy chỉnh, nhưng không có thông tin "
-"phiên bản nào tồn tại. Vui lòng cài đặt lại từ menu 'Dự án'."
+"Cố gắng dựng từ một bản mẫu được dựng tùy chỉnh, nhưng không có thông tin "
+"phiên bản nào tồn tại. Vui lòng cài đặt lại từ bảng chá»n'Dá»± án'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
" Godot Version: %s\n"
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-"Phiên bản xây dựng Android không khớp:\n"
-" Mẫu xuất bản được cài đặt: %s\n"
-" Phiên bản Godot sử dụng: %s\n"
-"Vui lòng cài đặt lại mẫu xuất bản Android từ menu 'Dá»± Ãn'."
+"Phiên bản dựng Android không khớp:\n"
+" Bản mẫu được cài đặt: %s\n"
+" Phiên bản Godot: %s\n"
+"Vui lòng cài đặt lại bản mẫu Android từ bảng chá»n 'Dá»± Ãn'."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "Không thể chỉnh sá»­a 'project.godot' trong đưá»ng dẫn dá»± án."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "Không viết được file:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "Äang dá»±ng dá»± án Android (gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13381,11 +13481,11 @@ msgstr ""
"Xây dựng dự án Android thất bại, hãy kiểm tra đầu ra để biết lỗi.\n"
"Hoặc truy cập 'docs.godotengine.org' để xem cách xây dựng Android."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
@@ -13393,24 +13493,24 @@ msgstr ""
"Không thể sao chép và đổi tên tệp xuất, hãy kiểm tra thư mục Gradle của dự "
"án để xem kết quả."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "Không tìm thấy Animation: '%s'"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "Tạo đưá»ng viá»n ..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "Không thể mở bản mẫu để xuất:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13418,21 +13518,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "Äang thêm %s..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "Không viết được file:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13941,6 +14041,14 @@ msgstr ""
"NavigationMeshInstance phải là nút con hoặc cháu một nút Navigation. Nó chỉ "
"cung cấp dữ liệu Ä‘iá»u hướng."
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14237,6 +14345,14 @@ msgstr "Sử dụng phần mở rộng hợp lệ."
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
#, fuzzy
msgid ""
@@ -14283,6 +14399,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr ""
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14334,6 +14454,27 @@ msgstr ""
msgid "Constants cannot be modified."
msgstr "Không thể chỉnh sửa hằng số."
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "Tạo tư thế nghỉ (Từ Xương)"
+
+#~ msgid "Bottom"
+#~ msgstr "Dưới"
+
+#~ msgid "Left"
+#~ msgstr "Trái"
+
+#~ msgid "Right"
+#~ msgstr "Phải"
+
+#~ msgid "Front"
+#~ msgstr "Trước"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "\"Bậc tự do\" chỉ dùng được khi \"Xr Mode\" là \"Oculus Mobile VR\"."
+
#~ msgid "Package Contents:"
#~ msgstr "Trong Gói có:"
diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po
index 8284ac605e..e8084b8856 100644
--- a/editor/translations/zh_CN.po
+++ b/editor/translations/zh_CN.po
@@ -83,7 +83,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified) (Godot Engine)\n"
"POT-Creation-Date: 2018-01-20 12:15+0200\n"
-"PO-Revision-Date: 2021-08-12 14:48+0000\n"
+"PO-Revision-Date: 2021-09-06 16:32+0000\n"
"Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hans/>\n"
@@ -92,7 +92,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.8-dev\n"
+"X-Generator: Weblate 4.8.1-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -440,13 +440,11 @@ msgstr "æ’入动画"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "node '%s'"
-msgstr "无法打开 \"%s\"。"
+msgstr "节点“%sâ€"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "animation"
msgstr "动画"
@@ -456,9 +454,8 @@ msgstr "AnimationPlayer ä¸èƒ½åŠ¨ç”»åŒ–è‡ªå·±ï¼Œåªå¯åŠ¨ç”»åŒ–å…¶å®ƒ Player。"
#. TRANSLATORS: This describes the target of new animation track, will be inserted into another string.
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "property '%s'"
-msgstr "ä¸å­˜åœ¨å±žæ€§â€œ%sâ€ã€‚"
+msgstr "属性“%sâ€"
#: editor/animation_track_editor.cpp
msgid "Anim Create & Insert"
@@ -1086,7 +1083,7 @@ msgstr ""
msgid "Dependencies"
msgstr "ä¾èµ–"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "资æº"
@@ -1730,13 +1727,13 @@ msgstr ""
"目标平å°éœ€è¦ “PVRTC†纹ç†åŽ‹ç¼©ï¼Œä»¥ä¾¿é©±åŠ¨ç¨‹åºå›žé€€åˆ° GLES2。\n"
"在项目设置中å¯ç”¨ “Import Pvrtcâ€ï¼Œæˆ–ç¦ç”¨ “Driver Fallback Enabledâ€ã€‚"
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "找ä¸åˆ°è‡ªå®šä¹‰è°ƒè¯•模æ¿ã€‚"
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2086,11 +2083,11 @@ msgstr "目录与文件:"
#: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp
#: editor/plugins/style_box_editor_plugin.cpp editor/rename_dialog.cpp
msgid "Preview:"
-msgstr "预览:"
+msgstr "预览:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "File:"
-msgstr "文件:"
+msgstr "文件:"
#: editor/editor_file_system.cpp
msgid "ScanSources"
@@ -2106,13 +2103,13 @@ msgstr "文件 %s 有ä¸åŒç±»åž‹çš„多个导入器,已中止导入"
msgid "(Re)Importing Assets"
msgstr "æ­£åœ¨å¯¼å…¥æˆ–é‡æ–°å¯¼å…¥ç´ æ"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "顶部"
#: editor/editor_help.cpp
msgid "Class:"
-msgstr "ç±»:"
+msgstr "类:"
#: editor/editor_help.cpp editor/scene_tree_editor.cpp
#: editor/script_create_dialog.cpp
@@ -2258,7 +2255,7 @@ msgstr "主题属性"
#: editor/editor_inspector.cpp editor/project_settings_editor.cpp
msgid "Property:"
-msgstr "属性:"
+msgstr "属性:"
#: editor/editor_inspector.cpp editor/scene_tree_dock.cpp
#: modules/visual_script/visual_script_property_selector.cpp
@@ -2343,6 +2340,8 @@ msgid ""
"Update Continuously is enabled, which can increase power usage. Click to "
"disable it."
msgstr ""
+"编辑器窗å£é‡ç»˜æ—¶æ—‹è½¬ã€‚\n"
+"å·²å¯ç”¨è¿žç»­æ›´æ–°ï¼Œä¼šæå‡è€—电é‡ã€‚点击ç¦ç”¨ã€‚"
#: editor/editor_node.cpp
msgid "Spins when the editor window redraws."
@@ -2603,6 +2602,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "当å‰åœºæ™¯å°šæœªä¿å­˜ã€‚是å¦ä»è¦æ‰“开?"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "撤销"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "é‡åš"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "æ— æ³•é‡æ–°åŠ è½½ä»Žæœªä¿å­˜è¿‡çš„场景。"
@@ -2716,7 +2741,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Scene '%s' has broken dependencies:"
-msgstr "场景 “%s†的ä¾èµ–已被破å:"
+msgstr "场景 “%s†的ä¾èµ–已被破å:"
#: editor/editor_node.cpp
msgid "Clear Recent Scenes"
@@ -3260,6 +3285,11 @@ msgid "Merge With Existing"
msgstr "与现有åˆå¹¶"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "ä¿®æ”¹åŠ¨ç”»å˜æ¢"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "打开并è¿è¡Œè„šæœ¬"
@@ -3511,6 +3541,10 @@ msgid ""
"property (%s)."
msgstr "所选资æºï¼ˆ%s)与该属性(%s)所需的类型都ä¸åŒ¹é…。"
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "唯一化"
@@ -3796,14 +3830,12 @@ msgid "Download from:"
msgstr "下载:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Open in Web Browser"
-msgstr "在æµè§ˆå™¨ä¸­è¿è¡Œ"
+msgstr "在æµè§ˆå™¨ä¸­æ‰“å¼€"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Copy Mirror URL"
-msgstr "å¤åˆ¶é”™è¯¯ä¿¡æ¯"
+msgstr "å¤åˆ¶é•œåƒ URL"
#: editor/export_template_manager.cpp
msgid "Download and Install"
@@ -4266,7 +4298,7 @@ msgstr "执行自定义脚本..."
#: editor/import/resource_importer_scene.cpp
msgid "Couldn't load post-import script:"
-msgstr "无法载入åŽå¯¼å…¥è„šæœ¬:"
+msgstr "无法载入åŽå¯¼å…¥è„šæœ¬ï¼š"
#: editor/import/resource_importer_scene.cpp
msgid "Invalid/broken script for post-import (check console):"
@@ -4764,7 +4796,7 @@ msgstr "打开ï¼å…³é—­è‡ªåŠ¨æ’­æ”¾"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "New Animation Name:"
-msgstr "新动画åç§°:"
+msgstr "新动画å称:"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "New Anim"
@@ -4772,7 +4804,7 @@ msgstr "新建动画"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Change Animation Name:"
-msgstr "é‡å‘½å动画:"
+msgstr "é‡å‘½å动画:"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -4948,7 +4980,7 @@ msgstr "创建新动画"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation Name:"
-msgstr "动画åç§°:"
+msgstr "动画å称:"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
@@ -4963,7 +4995,7 @@ msgstr "æ··åˆæ—¶é—´ï¼š"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Next (Auto Queue):"
-msgstr "接下æ¥ï¼ˆè‡ªåŠ¨é˜Ÿåˆ—ï¼‰:"
+msgstr "接下æ¥ï¼ˆè‡ªåŠ¨é˜Ÿåˆ—ï¼‰ï¼š"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Cross-Animation Blend Times"
@@ -5071,7 +5103,7 @@ msgstr "动画树"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "New name:"
-msgstr "æ–°åç§°:"
+msgstr "æ–°å称:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
@@ -5096,15 +5128,15 @@ msgstr "æ··åˆ (Mix)"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Auto Restart:"
-msgstr "è‡ªåŠ¨é‡æ–°å¼€å§‹:"
+msgstr "è‡ªåŠ¨é‡æ–°å¼€å§‹ï¼š"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Restart (s):"
-msgstr "釿–°å¼€å§‹ï¼ˆç§’):"
+msgstr "釿–°å¼€å§‹ï¼ˆç§’):"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Random Restart (s):"
-msgstr "éšæœºå¼€å§‹ï¼ˆç§’):"
+msgstr "éšæœºå¼€å§‹ï¼ˆç§’):"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Start!"
@@ -5113,7 +5145,7 @@ msgstr "开始ï¼"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Amount:"
-msgstr "æ•°é‡:"
+msgstr "æ•°é‡ï¼š"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend 0:"
@@ -5207,7 +5239,7 @@ msgstr "筛选..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Contents:"
-msgstr "内容:"
+msgstr "内容:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "View Files"
@@ -5283,11 +5315,11 @@ msgstr "文件哈希值错误,该文件å¯èƒ½è¢«ç¯¡æ”¹ã€‚"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Expected:"
-msgstr "预计:"
+msgstr "预期:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Got:"
-msgstr "获得:"
+msgstr "获得:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Failed SHA-256 hash check"
@@ -5579,6 +5611,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "移动 CanvasItem “%s†至 (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "é”定所选项"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "分组"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -5735,7 +5779,7 @@ msgstr "添加 IK 链"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Clear IK Chain"
-msgstr "清除IK链"
+msgstr "清除 IK 链"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
@@ -6146,7 +6190,7 @@ msgstr "ç²’å­"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
-msgstr "生æˆé¡¶ç‚¹è®¡æ•°:"
+msgstr "生æˆé¡¶ç‚¹è®¡æ•°ï¼š"
#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
#: editor/plugins/particles_2d_editor_plugin.cpp
@@ -6502,7 +6546,13 @@ msgid "Remove Selected Item"
msgstr "移除选中项目"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "从场景中导入"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "从场景中导入"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7074,7 +7124,7 @@ msgstr "预加载资æº"
#: editor/plugins/room_manager_editor_plugin.cpp
msgid "Flip Portals"
-msgstr "翻转门户"
+msgstr "翻转入å£"
#: editor/plugins/room_manager_editor_plugin.cpp
msgid "Room Generate Points"
@@ -7086,7 +7136,17 @@ msgstr "生æˆç‚¹"
#: editor/plugins/room_manager_editor_plugin.cpp
msgid "Flip Portal"
-msgstr "翻转门户"
+msgstr "翻转入å£"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "æ¸…é™¤å˜æ¢"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "创建节点"
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
@@ -7179,12 +7239,12 @@ msgstr "主题å¦å­˜ä¸º..."
#: editor/plugins/script_editor_plugin.cpp
msgid "%s Class Reference"
-msgstr "%s 类引用"
+msgstr "%s ç±»å‚考手册"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
msgid "Find Next"
-msgstr "查找下一项"
+msgstr "查找下一个"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
@@ -7430,7 +7490,7 @@ msgstr "首字æ¯å¤§å†™"
#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
msgid "Syntax Highlighter"
-msgstr "语法高亮显示"
+msgstr "语法高亮器"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
@@ -7486,7 +7546,7 @@ msgstr "展开所有行"
#: editor/plugins/script_text_editor.cpp
msgid "Complete Symbol"
-msgstr "符å·è‡ªåŠ¨è¡¥å…¨"
+msgstr "补全符å·"
#: editor/plugins/script_text_editor.cpp
msgid "Evaluate Selection"
@@ -7586,12 +7646,14 @@ msgid "Skeleton2D"
msgstr "2D 骨骼节点"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "制作放æ¾å§¿åŠ¿ï¼ˆä»Žéª¨éª¼ï¼‰"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "将骨骼é‡ç½®ä¸ºæ”¾æ¾å§¿åŠ¿"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "将骨骼é‡ç½®ä¸ºæ”¾æ¾å§¿åŠ¿"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "覆盖"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7618,6 +7680,71 @@ msgid "Perspective"
msgstr "é€è§†"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "正交"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "é€è§†"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "正交"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "é€è§†"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "正交"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "é€è§†"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "正交"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "正交"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "é€è§†"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "正交"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "é€è§†"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "å·²å¿½ç•¥å˜æ¢ã€‚"
@@ -7725,42 +7852,22 @@ msgid "Bottom View."
msgstr "底视图。"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "底部"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "左视图。"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "左方"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "å³è§†å›¾ã€‚"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "峿–¹"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "å‰è§†å›¾ã€‚"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "å‰é¢"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "åŽè§†å›¾ã€‚"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "åŽæ–¹"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "å°†å˜æ¢ä¸Žè§†å›¾å¯¹é½"
@@ -7929,7 +8036,7 @@ msgstr "使用å¸é™„"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Converts rooms for portal culling."
-msgstr "ä¸ºé—¨æˆ·å‰”é™¤è½¬æ¢æˆ¿é—´ã€‚"
+msgstr "为入å£å‰”é™¤è½¬æ¢æˆ¿é—´ã€‚"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom View"
@@ -8026,7 +8133,12 @@ msgstr "显示网格"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Portal Culling"
-msgstr "显示门户剔除"
+msgstr "显示入å£å‰”除"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "显示入å£å‰”除"
#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
@@ -8043,7 +8155,7 @@ msgstr "平移å¸é™„:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate Snap (deg.):"
-msgstr "旋转å¸é™„(度):"
+msgstr "旋转å¸é™„(角度):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Snap (%):"
@@ -8059,11 +8171,11 @@ msgstr "é€è§†è§†è§’(角度):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Z-Near:"
-msgstr "查看 Z-Near:"
+msgstr "视图 Z-Near:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Z-Far:"
-msgstr "查看 Z-Far:"
+msgstr "视图 Z-Far:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Change"
@@ -8094,8 +8206,9 @@ msgid "Post"
msgstr "åŽç½®"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "æ— åæŽ§åˆ¶å™¨"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "未命å项目"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -8135,7 +8248,7 @@ msgstr "Sprite 是空的ï¼"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Can't convert a sprite using animation frames to mesh."
-msgstr "无法将使用动画帧将精çµè½¬æ¢ä¸ºç½‘格。"
+msgstr "无法将使用动画帧的精çµè½¬æ¢ä¸ºç½‘格。"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't replace by mesh."
@@ -8549,6 +8662,8 @@ msgid ""
"Select a theme type from the list to edit its items.\n"
"You can add a custom type or import a type with its items from another theme."
msgstr ""
+"从列表中选择一个主题类型以编辑其项目。\n"
+"ä½ å¯ä»¥æ·»åŠ ä¸€ä¸ªè‡ªå®šä¹‰ç±»åž‹ï¼Œæˆ–è€…ä»Žå…¶å®ƒä¸»é¢˜ä¸­å¯¼å…¥ä¸€ä¸ªç±»åž‹åŠå…¶é¡¹ç›®ã€‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Color Items"
@@ -8579,6 +8694,8 @@ msgid ""
"This theme type is empty.\n"
"Add more items to it manually or by importing from another theme."
msgstr ""
+"该主题类型为空。\n"
+"请手动添加或者从其它主题导入更多项目。"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Color Item"
@@ -9458,7 +9575,7 @@ msgstr "调整 VisualShader 节点大å°"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Set Uniform Name"
-msgstr "设置统一åç§°"
+msgstr "设置 Uniform åç§°"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Set Input Default Port"
@@ -9579,7 +9696,7 @@ msgstr "颜色常é‡ã€‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Color uniform."
-msgstr "颜色统一。"
+msgstr "颜色 Uniform。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Returns the boolean result of the %s comparison between two parameters."
@@ -9653,7 +9770,7 @@ msgstr "布尔常é‡ã€‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Boolean uniform."
-msgstr "布尔统一。"
+msgstr "布尔 Uniform。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "'%s' input parameter for all shader modes."
@@ -9930,7 +10047,7 @@ msgstr "æ ‡é‡å¸¸æ•°ã€‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Scalar uniform."
-msgstr "æ ‡é‡ä¸€è‡´ã€‚"
+msgstr "æ ‡é‡ Uniform。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Perform the cubic texture lookup."
@@ -9942,15 +10059,15 @@ msgstr "æ‰§è¡Œçº¹ç†æŸ¥æ‰¾ã€‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Cubic texture uniform lookup."
-msgstr "立方纹ç†å‡åŒ€æŸ¥æ‰¾ã€‚"
+msgstr "ç«‹æ–¹çº¹ç† Uniform 查找。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "2D texture uniform lookup."
-msgstr "2D 纹ç†å‡åŒ€æŸ¥æ‰¾ã€‚"
+msgstr "2D çº¹ç† Uniform 查找。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "2D texture uniform lookup with triplanar."
-msgstr "2D 纹ç†å‡åŒ€æŸ¥æ‰¾ä¸Žä¸‰å¹³é¢ã€‚"
+msgstr "2D çº¹ç† Uniform 查找与三平é¢ã€‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Transform function."
@@ -10006,7 +10123,7 @@ msgstr "å˜æ¢å¸¸æ•°ã€‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Transform uniform."
-msgstr "å˜æ¢ç»Ÿä¸€ã€‚"
+msgstr "å˜æ¢ Uniform。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector function."
@@ -10152,7 +10269,7 @@ msgstr "å‘é‡å¸¸æ•°ã€‚"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vector uniform."
-msgstr "å‘é‡ä¸€è‡´ã€‚"
+msgstr "å‘é‡ Uniform。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -10181,7 +10298,7 @@ msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "A reference to an existing uniform."
-msgstr "至现有一致的引用。"
+msgstr "对现有 Uniform 的引用。"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "(Fragment/Light mode only) Scalar derivative function."
@@ -10261,7 +10378,7 @@ msgid ""
"This might be due to a configuration issue in the export preset or your "
"export settings."
msgstr ""
-"æ— æ³•ä¸ºå¹³å° â€œï¼…s†导出项目。\n"
+"æ— æ³•ä¸ºå¹³å° â€œ%s†导出项目。\n"
"原因å¯èƒ½æ˜¯å¯¼å‡ºé¢„设或导出设置内的é…置有问题。"
#: editor/project_export.cpp
@@ -12114,14 +12231,22 @@ msgid "Change Ray Shape Length"
msgstr "修改射线形状长度"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Room Point Position"
-msgstr "è®¾ç½®æ›²çº¿çš„é¡¶ç‚¹åæ ‡"
+msgstr "设置房间点ä½ç½®"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Set Portal Point Position"
-msgstr "è®¾ç½®æ›²çº¿çš„é¡¶ç‚¹åæ ‡"
+msgstr "设置入å£ç‚¹ä½ç½®"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "修改圆柱体åŠå¾„"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "设置曲线内控点ä½ç½®"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
@@ -12241,11 +12366,11 @@ msgstr "导出 GLTF..."
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Plane"
-msgstr "下一个平é¢"
+msgstr "下一平é¢"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Previous Plane"
-msgstr "上一个平é¢"
+msgstr "上一平é¢"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
@@ -12257,7 +12382,7 @@ msgstr "下一层"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Previous Floor"
-msgstr "上一个层"
+msgstr "上一层"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Floor:"
@@ -12369,7 +12494,7 @@ msgstr "筛选网格"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Give a MeshLibrary resource to this GridMap to use its meshes."
-msgstr "呿­¤ GridMap æä¾›ç½‘格库资æºä»¥ä½¿ç”¨å…¶ç½‘格。"
+msgstr "呿­¤ GridMap æä¾› MeshLibrary 资æºä»¥ä½¿ç”¨å…¶ç½‘格。"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
@@ -12403,6 +12528,11 @@ msgstr "绘制光照图"
msgid "Class name can't be a reserved keyword"
msgstr "ç±»åä¸èƒ½æ˜¯ä¿ç•™å…³é”®å­—"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "填充选中项"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "内部异常堆栈追朔结æŸ"
@@ -12873,130 +13003,130 @@ msgstr "æœç´¢å¯è§†åŒ–脚本节点"
msgid "Get %s"
msgstr "èŽ·å– %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "包å缺失。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "包段的长度必须为éžé›¶ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "Android 应用程åºåŒ…å称中ä¸å…许使用字符 “%sâ€ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "包段中的第一个字符ä¸èƒ½æ˜¯æ•°å­—。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "包段中的第一个字符ä¸èƒ½æ˜¯ “%sâ€ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "包必须至少有一个 “.†分隔符。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "从列表中选择设备"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr "æ­£è¿è¡ŒäºŽ %d"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting APK..."
msgstr "正在导出 APK……"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Uninstalling..."
msgstr "正在å¸è½½â€¦â€¦"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Installing to device, please wait..."
msgstr "正在安装到设备,请ç¨å€™â€¦â€¦"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not install to device: %s"
msgstr "无法安装到设备:%s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on device..."
msgstr "正在设备上è¿è¡Œâ€¦â€¦"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not execute on device."
msgstr "无法在设备上è¿è¡Œã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "找ä¸åˆ°â€œapksignerâ€å·¥å…·ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr "未在项目中安装 Android 构建模æ¿ã€‚从项目èœå•安装它。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr "Debug Keystoreã€Debug Userã€Debug Password 必须全部填写或者全部留空。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr "未在编辑器设置或预设中é…置调试密钥库。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
"Release Keystoreã€Release Userã€Release Password 必须全部填写或者全部留空。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr "用于å‘布的密钥存储在导出预设中未被正确设置。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr "ç¼–è¾‘å™¨è®¾ç½®ä¸­éœ€è¦æœ‰æ•ˆçš„Android SDK路径。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "编辑器设置中的Android SDK路径无效。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "缺失“platform-toolsâ€ç›®å½•ï¼"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "找ä¸åˆ°Android SDKå¹³å°å·¥å…·çš„adb命令。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr "请签入编辑器设置中指定的Android SDK目录。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "缺失“build-toolsâ€ç›®å½•ï¼"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr "找ä¸åˆ°Android SDK生æˆå·¥å…·çš„apksigner命令。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "APK 扩展的公钥无效。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "无效的包å称:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13004,32 +13134,20 @@ msgstr ""
"“android/modulesâ€ é¡¹ç›®è®¾ç½®ï¼ˆå˜æ›´äºŽGodot 3.2.2)中包å«äº†æ— æ•ˆæ¨¡ç»„ "
"“GodotPaymentV3â€ã€‚\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "å¿…é¡»å¯ç”¨ “使用自定义构建†æ‰èƒ½ä½¿ç”¨æ’件。"
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"“Degrees Of Freedomâ€ åªæœ‰åœ¨å½“ “Xr Mode†是 “Oculus Mobile VRâ€ æ—¶æ‰æœ‰æ•ˆã€‚"
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr "“Hand Trackingâ€ åªæœ‰åœ¨å½“ “Xr Mode†是 “Oculus Mobile VRâ€ æ—¶æ‰æœ‰æ•ˆã€‚"
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr "“Focus Awarenessâ€ åªæœ‰åœ¨å½“ “Xr Mode†是 “Oculus Mobile VRâ€ æ—¶æ‰æœ‰æ•ˆã€‚"
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr "“Export AABâ€ åªæœ‰åœ¨å½“å¯ç”¨ “Use Custom Buildâ€ æ—¶æ‰æœ‰æ•ˆã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13040,58 +13158,58 @@ msgstr ""
"请检查 Android SDK çš„ build-tools ç›®å½•ä¸­æ˜¯å¦æœ‰æ­¤å‘½ä»¤ã€‚\n"
"生æˆçš„ %s 未签å。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr "正在签å调试 %s……"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing release %s..."
msgstr "正在签åå‘布 %s……"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not find keystore, unable to export."
msgstr "找ä¸åˆ°å¯†é’¥åº“,无法导出。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr "“apksignerâ€è¿”回错误 #%d"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Verifying %s..."
msgstr "正在校验 %s……"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr "“apksignerâ€æ ¡éªŒ %s 失败。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Exporting for Android"
msgstr "正在为 Android 导出"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr "无效文件åï¼Android App Bundle 必须有 *.aab 扩展。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "APK Expansion 与 Android App Bundle ä¸å…¼å®¹ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "无效文件åï¼Android APK 必须有 *.apk 扩展。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr "䏿”¯æŒçš„导出格å¼ï¼\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
"å°è¯•ä»Žè‡ªå®šä¹‰æž„å»ºçš„æ¨¡æ¿æž„建,但是ä¸å­˜åœ¨å…¶ç‰ˆæœ¬ä¿¡æ¯ã€‚请从“项目â€èœå•䏭釿–°å®‰è£…。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13103,24 +13221,24 @@ msgstr ""
" Godot 版本:%s\n"
"请从“项目â€èœå•䏭釿–°å®‰è£… Android 构建模æ¿ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr "无法使用项目å称覆盖 res://android/build/res/*.xml 文件"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr "无法将项目文件导出至 gradle 项目\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not write expansion package file!"
msgstr "无法写入扩展包文件ï¼"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "构建 Android 项目 (Gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13128,25 +13246,25 @@ msgstr ""
"Android 项目构建失败,请检查输出中显示的错误。\n"
"也å¯ä»¥è®¿é—® docs.godotengine.org 查看 Android 构建文档。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "移动输出"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr "无法å¤åˆ¶ä¸Žæ›´å导出文件,请在 Gradle 项目文件夹内确认输出。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package not found: %s"
msgstr "包ä¸å­˜åœ¨ï¼š%s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Creating APK..."
msgstr "正在创建 APK……"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Could not find template APK to export:\n"
"%s"
@@ -13154,7 +13272,7 @@ msgstr ""
"找ä¸åˆ°å¯¼å‡ºæ¨¡æ¿ APK:\n"
"%s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13164,19 +13282,19 @@ msgstr ""
"导出模æ¿ç¼ºå¤±æ‰€é€‰æž¶æž„的库:%s。\n"
"请使用全部所需的库构建模æ¿ï¼Œæˆ–è€…åœ¨å¯¼å‡ºé¢„è®¾ä¸­å–æ¶ˆå¯¹ç¼ºå¤±æž¶æž„的选择。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Adding files..."
msgstr "正在添加文件……"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files"
msgstr "无法导出项目文件"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "æ­£åœ¨å¯¹é½ APK……"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr "无法解压未对é½çš„临时 APK。"
@@ -13670,6 +13788,14 @@ msgstr ""
"NavigationMeshInstance 类型节点必须作为 Navigation 节点的å­èŠ‚ç‚¹æˆ–å­å­™èŠ‚ç‚¹æ‰èƒ½"
"æä¾›å¯¼èˆªæ•°æ®ã€‚"
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -13802,36 +13928,44 @@ msgid ""
"RoomList path is invalid.\n"
"Please check the RoomList branch has been assigned in the RoomManager."
msgstr ""
+"RoomList 路径无效。\n"
+"请检查 RoomList 分支是å¦å·²è¢«æŒ‡å®šç»™ RoomManager。"
#: scene/3d/room_manager.cpp
msgid "RoomList contains no Rooms, aborting."
-msgstr ""
+msgstr "RoomList 中ä¸åŒ…å« Room,正在中止。"
#: scene/3d/room_manager.cpp
msgid "Misnamed nodes detected, check output log for details. Aborting."
-msgstr ""
+msgstr "检测到错误命å的节点,详情请检查日志输出。正在中止。"
#: scene/3d/room_manager.cpp
msgid "Portal link room not found, check output log for details."
-msgstr ""
+msgstr "æœªæ‰¾åˆ°å…¥å£æ‰€è¿žæŽ¥çš„æˆ¿é—´ï¼Œè¯¦æƒ…请检查日志输出。"
#: scene/3d/room_manager.cpp
msgid ""
"Portal autolink failed, check output log for details.\n"
"Check the portal is facing outwards from the source room."
msgstr ""
+"å…¥å£è‡ªåŠ¨è¿žæŽ¥å¤±è´¥ï¼Œè¯¦æƒ…è¯·æ£€æŸ¥è¾“å‡ºæ—¥å¿—ã€‚\n"
+"è¯·æ£€æŸ¥è¯¥å…¥å£æ˜¯å¦æœå‘其所在房间的外部。"
#: scene/3d/room_manager.cpp
msgid ""
"Room overlap detected, cameras may work incorrectly in overlapping area.\n"
"Check output log for details."
msgstr ""
+"检测到é‡å çš„æˆ¿é—´ï¼Œæ‘„åƒæœºåœ¨é‡å åŒºåŸŸå¯èƒ½æ— æ³•正常工作。\n"
+"详情请检查日志输出。"
#: scene/3d/room_manager.cpp
msgid ""
"Error calculating room bounds.\n"
"Ensure all rooms contain geometry or manual bounds."
msgstr ""
+"计算房间边界时出错。\n"
+"è¯·ç¡®ä¿æ‰€æœ‰æˆ¿é—´éƒ½åŒ…å«å‡ ä½•ç»“æž„ï¼Œæˆ–è€…åŒ…å«æ‰‹åŠ¨è¾¹ç•Œã€‚"
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
@@ -13990,6 +14124,14 @@ msgstr "必须使用有效的扩展å。"
msgid "Enable grid minimap."
msgstr "å¯ç”¨ç½‘æ ¼å°åœ°å›¾ã€‚"
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14040,6 +14182,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "Viewport 大å°å¤§äºŽ 0 æ—¶æ‰èƒ½è¿›è¡Œæ¸²æŸ“。"
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14084,12 +14230,45 @@ msgstr "对函数的赋值。"
#: servers/visual/shader_language.cpp
msgid "Assignment to uniform."
-msgstr "对统一的赋值。"
+msgstr "对 Uniform 的赋值。"
#: servers/visual/shader_language.cpp
msgid "Constants cannot be modified."
msgstr "ä¸å…许修改常é‡ã€‚"
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "制作放æ¾å§¿åŠ¿ï¼ˆä»Žéª¨éª¼ï¼‰"
+
+#~ msgid "Bottom"
+#~ msgstr "底部"
+
+#~ msgid "Left"
+#~ msgstr "左方"
+
+#~ msgid "Right"
+#~ msgstr "峿–¹"
+
+#~ msgid "Front"
+#~ msgstr "å‰é¢"
+
+#~ msgid "Rear"
+#~ msgstr "åŽæ–¹"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "æ— åæŽ§åˆ¶å™¨"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "“Degrees Of Freedomâ€ åªæœ‰åœ¨å½“ “Xr Mode†是 “Oculus Mobile VRâ€ æ—¶æ‰æœ‰æ•ˆã€‚"
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "“Focus Awarenessâ€ åªæœ‰åœ¨å½“ “Xr Mode†是 “Oculus Mobile VRâ€ æ—¶æ‰æœ‰æ•ˆã€‚"
+
#~ msgid "Package Contents:"
#~ msgstr "包内容:"
@@ -16047,9 +16226,6 @@ msgstr "ä¸å…许修改常é‡ã€‚"
#~ msgid "Images:"
#~ msgstr "图片:"
-#~ msgid "Group"
-#~ msgstr "分组"
-
#~ msgid "Sample Conversion Mode: (.wav files):"
#~ msgstr "éŸ³æ•ˆè½¬æ¢æ–¹å¼ï¼ˆ.wav文件):"
diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po
index e5327f79d9..b9461bffd0 100644
--- a/editor/translations/zh_HK.po
+++ b/editor/translations/zh_HK.po
@@ -1067,7 +1067,7 @@ msgstr ""
msgid "Dependencies"
msgstr ""
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "資æº"
@@ -1731,13 +1731,13 @@ msgid ""
"Enabled'."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr ""
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2143,7 +2143,7 @@ msgstr ""
msgid "(Re)Importing Assets"
msgstr "導入中:"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
#, fuzzy
msgid "Top"
msgstr "最頂"
@@ -2646,6 +2646,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "未儲存當å‰å ´æ™¯ã€‚ä»è¦é–‹å•Ÿï¼Ÿ"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "復原"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "é‡è£½"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "ä¸èƒ½é‡æ–°è¼‰å…¥å¾žæœªå„²å­˜çš„場景。"
@@ -3328,6 +3354,11 @@ msgid "Merge With Existing"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "å‹•ç•«è®ŠåŒ–éŽæ¸¡"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
@@ -3584,6 +3615,10 @@ msgid ""
"property (%s)."
msgstr ""
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr ""
@@ -5809,6 +5844,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "所有é¸é …"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "Groups"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6762,7 +6809,11 @@ msgid "Remove Selected Item"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+msgid "Import from Scene (Ignore Transforms)"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene (Apply Transforms)"
msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7367,6 +7418,15 @@ msgstr "刪除"
msgid "Flip Portal"
msgstr ""
+#: editor/plugins/room_manager_editor_plugin.cpp
+msgid "Occluder Set Transform"
+msgstr ""
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "ä¸é¸"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr ""
@@ -7910,12 +7970,14 @@ msgid "Skeleton2D"
msgstr ""
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr ""
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "é è¨­"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr ""
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "覆蓋"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7944,6 +8006,61 @@ msgid "Perspective"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "å³ð¨«¡"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear Perspective"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr ""
@@ -8058,42 +8175,22 @@ msgid "Bottom View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr ""
@@ -8367,6 +8464,11 @@ msgid "View Portal Culling"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "æ’ä»¶"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
msgid "Settings..."
@@ -8433,7 +8535,7 @@ msgid "Post"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
+msgid "Unnamed Gizmo"
msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
@@ -12639,6 +12741,15 @@ msgstr "åªé™é¸ä¸­"
msgid "Set Portal Point Position"
msgstr "åªé™é¸ä¸­"
+#: editor/spatial_editor_gizmos.cpp
+msgid "Set Occluder Sphere Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "åªé™é¸ä¸­"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr ""
@@ -12940,6 +13051,11 @@ msgstr "光照圖生æˆä¸­"
msgid "Class name can't be a reserved keyword"
msgstr ""
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "所有é¸é …"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr ""
@@ -13442,166 +13558,155 @@ msgstr "貼上"
msgid "Get %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "從列表é¸å–設備"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "匯出"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "解除安è£"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "接收 mirrors中, è«‹ç¨ä¾¯..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "無法新增資料夾"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "正在é‹è¡Œè‡ªå®šç¾©è…³æœ¬..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "無法新增資料夾"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Invalid package name:"
msgstr "無效å稱"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13609,61 +13714,61 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr "æ­£åœ¨æŽƒææª”案, è«‹ç¨å€™..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "無法新增資料夾"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "設定"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "匯出"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13671,58 +13776,58 @@ msgid ""
"Please reinstall Android build template from 'Project' menu."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not export project files to gradle project\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "無法新增資料夾"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "時長(秒)。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "連接中..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "無法新增資料夾"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13730,21 +13835,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "ç¯©é¸æª”案..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "無法新增資料夾"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -14212,6 +14317,14 @@ msgid ""
"It only provides navigation data."
msgstr ""
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14505,6 +14618,14 @@ msgstr "請用有效的副檔å。"
msgid "Enable grid minimap."
msgstr ""
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14546,6 +14667,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "viewport大å°å¿…須大於ï¼ä»¥æ¸²æŸ“任何æ±è¥¿ã€‚"
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po
index 4fc48abd03..db1603cc9b 100644
--- a/editor/translations/zh_TW.po
+++ b/editor/translations/zh_TW.po
@@ -1036,7 +1036,7 @@ msgstr ""
msgid "Dependencies"
msgstr "ç›¸ä¾æ€§"
-#: editor/dependency_editor.cpp
+#: editor/dependency_editor.cpp editor/editor_resource_picker.cpp
msgid "Resource"
msgstr "資æº"
@@ -1695,13 +1695,13 @@ msgstr ""
"目標平å°ä¸Šçš„ GLES2 回退驅動器功能必須使用「PVRTCã€ç´‹ç†å£“縮。\n"
"請在專案設定中啟用「Import Pvrtcã€æˆ–是ç¦ç”¨ã€ŒDriver Fallback Enabledã€ã€‚"
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom debug template not found."
msgstr "找ä¸åˆ°è‡ªå®šç¾©åµéŒ¯æ¨£æ¿ã€‚"
-#: editor/editor_export.cpp platform/android/export/export.cpp
+#: editor/editor_export.cpp platform/android/export/export_plugin.cpp
#: platform/iphone/export/export.cpp platform/javascript/export/export.cpp
#: platform/osx/export/export.cpp platform/uwp/export/export.cpp
msgid "Custom release template not found."
@@ -2081,7 +2081,7 @@ msgstr "ç”±æ–¼æœ‰å¤šå€‹åŒ¯å…¥å™¨å°æª”案 %s æä¾›äº†ä¸åŒçš„型別,已中æ­
msgid "(Re)Importing Assets"
msgstr "ï¼ˆé‡æ–°ï¼‰åŒ¯å…¥ç´ æ"
-#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+#: editor/editor_help.cpp
msgid "Top"
msgstr "頂端"
@@ -2577,6 +2577,32 @@ msgid "Current scene not saved. Open anyway?"
msgstr "尚未ä¿å­˜ç›®å‰å ´æ™¯ã€‚ä»ç„¶è¦é–‹å•Ÿå—Žï¼Ÿ"
#: editor/editor_node.cpp
+msgid "Can't undo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to undo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Undo: %s"
+msgstr "復原"
+
+#: editor/editor_node.cpp
+msgid "Can't redo while mouse buttons are pressed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Nothing to redo."
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Redo: %s"
+msgstr "å–æ¶ˆå¾©åŽŸ"
+
+#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
msgstr "ç„¡æ³•é‡æ–°è¼‰å…¥å¾žæœªä¿å­˜éŽçš„場景。"
@@ -3238,6 +3264,11 @@ msgid "Merge With Existing"
msgstr "èˆ‡ç¾æœ‰çš„åˆä½µ"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "Apply MeshInstance Transforms"
+msgstr "更改動畫變æ›"
+
+#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr "開啟並執行腳本"
@@ -3490,6 +3521,10 @@ msgid ""
"property (%s)."
msgstr "所é¸è³‡æºï¼ˆ%s)ä¸ç¬¦åˆä»»è©²å±¬æ€§ï¼ˆ%s)的任何型別。"
+#: editor/editor_resource_picker.cpp
+msgid "Quick Load"
+msgstr ""
+
#: editor/editor_resource_picker.cpp editor/property_editor.cpp
msgid "Make Unique"
msgstr "ç¨ç«‹åŒ–"
@@ -5592,6 +5627,18 @@ msgid "Move CanvasItem \"%s\" to (%d, %d)"
msgstr "移動 CanvasItem「%sã€è‡³ (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Locked"
+msgstr "鎖定所é¸"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Grouped"
+msgstr "群組"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Children of containers have their anchors and margins values overridden by "
"their parent."
@@ -6530,7 +6577,13 @@ msgid "Remove Selected Item"
msgstr "移除所é¸é …ç›®"
#: editor/plugins/mesh_library_editor_plugin.cpp
-msgid "Import from Scene"
+#, fuzzy
+msgid "Import from Scene (Ignore Transforms)"
+msgstr "自場景匯入"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#, fuzzy
+msgid "Import from Scene (Apply Transforms)"
msgstr "自場景匯入"
#: editor/plugins/mesh_library_editor_plugin.cpp
@@ -7120,6 +7173,16 @@ msgstr "已產生的頂點數é‡ï¼š"
msgid "Flip Portal"
msgstr "水平翻轉"
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Occluder Set Transform"
+msgstr "清除變æ›"
+
+#: editor/plugins/room_manager_editor_plugin.cpp
+#, fuzzy
+msgid "Center Node"
+msgstr "建立節點"
+
#: editor/plugins/root_motion_editor_plugin.cpp
msgid "AnimationTree has no path set to an AnimationPlayer"
msgstr "AnimationTree 未設定至 AnimationPlayer 的路徑"
@@ -7618,12 +7681,14 @@ msgid "Skeleton2D"
msgstr "Sekeleton2D"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Make Rest Pose (From Bones)"
-msgstr "è£½ä½œéœæ­¢å§¿å‹¢ï¼ˆè‡ªéª¨éª¼ï¼‰"
+#, fuzzy
+msgid "Reset to Rest Pose"
+msgstr "è¨­å®šéª¨éª¼ç‚ºéœæ­¢å§¿å‹¢"
#: editor/plugins/skeleton_2d_editor_plugin.cpp
-msgid "Set Bones to Rest Pose"
-msgstr "è¨­å®šéª¨éª¼ç‚ºéœæ­¢å§¿å‹¢"
+#, fuzzy
+msgid "Overwrite Rest Pose"
+msgstr "複寫"
#: editor/plugins/skeleton_editor_plugin.cpp
msgid "Create physical bones"
@@ -7650,6 +7715,71 @@ msgid "Perspective"
msgstr "é€è¦–"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Orthogonal"
+msgstr "正交"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Top Perspective"
+msgstr "é€è¦–"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Orthogonal"
+msgstr "正交"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Bottom Perspective"
+msgstr "é€è¦–"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Left Orthogonal"
+msgstr "正交"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Perspective"
+msgstr "é€è¦–"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Right Orthogonal"
+msgstr "正交"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Orthogonal"
+msgstr "正交"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Front Perspective"
+msgstr "é€è¦–"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Orthogonal"
+msgstr "正交"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Rear Perspective"
+msgstr "é€è¦–"
+
+#. TRANSLATORS: This will be appended to the view name when Auto Orthogonal is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [auto]"
+msgstr ""
+
+#. TRANSLATORS: This will be appended to the view name when Portal Occulusion is enabled.
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid " [portals active]"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Aborted."
msgstr "已中止變æ›ã€‚"
@@ -7768,42 +7898,22 @@ msgid "Bottom View."
msgstr "仰視圖。"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Bottom"
-msgstr "底部"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
msgstr "左視圖。"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Left"
-msgstr "å·¦"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
msgstr "å³è¦–圖。"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Right"
-msgstr "å³"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
msgstr "å‰è¦–圖。"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Front"
-msgstr "æ­£é¢"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
msgstr "後視圖。"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Rear"
-msgstr "後"
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align Transform with View"
msgstr "將變æ›èˆ‡è¦–圖å°é½Š"
@@ -8076,6 +8186,11 @@ msgid "View Portal Culling"
msgstr "檢視å€è¨­å®š"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "View Occlusion Culling"
+msgstr "檢視å€è¨­å®š"
+
+#: editor/plugins/spatial_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings..."
msgstr "設定..."
@@ -8141,8 +8256,9 @@ msgid "Post"
msgstr "後置"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Nameless gizmo"
-msgstr "未命åçš„ Gizmo"
+#, fuzzy
+msgid "Unnamed Gizmo"
+msgstr "未命å專案"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create Mesh2D"
@@ -12252,6 +12368,16 @@ msgstr "設定曲線控制點ä½ç½®"
msgid "Set Portal Point Position"
msgstr "設定曲線控制點ä½ç½®"
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Radius"
+msgstr "更改圓柱形åŠå¾‘"
+
+#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
+msgid "Set Occluder Sphere Position"
+msgstr "設定曲線內控制點ä½ç½®"
+
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Radius"
msgstr "更改圓柱體åŠå¾‘"
@@ -12535,6 +12661,11 @@ msgstr "正在繪製光照"
msgid "Class name can't be a reserved keyword"
msgstr "類別å稱ä¸èƒ½ç‚ºä¿ç•™é—œéµå­—"
+#: modules/mono/csharp_script.cpp
+#, fuzzy
+msgid "Build Solution"
+msgstr "填充所é¸"
+
#: modules/mono/mono_gd/gd_mono_utils.cpp
msgid "End of inner exception stack trace"
msgstr "å…§éƒ¨ç•°å¸¸å †ç–Šå›žæº¯çµæŸ"
@@ -13007,135 +13138,135 @@ msgstr "æœå°‹è¦–覺腳本 (VisualScript)"
msgid "Get %s"
msgstr "å–å¾— %s"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package name is missing."
msgstr "缺少套件å稱。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Package segments must be of non-zero length."
msgstr "套件片段 (Segment) 的長度ä¸å¯ç‚º 0。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' is not allowed in Android application package names."
msgstr "Android 應用程å¼å¥—ä»¶å稱ä¸å¯ä½¿ç”¨å­—元「%sã€ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A digit cannot be the first character in a package segment."
msgstr "套件片段 (Segment) 的第一個字元ä¸å¯ç‚ºæ•¸å­—。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The character '%s' cannot be the first character in a package segment."
msgstr "套件片段 (Segment) 的第一個字元ä¸å¯ç‚ºã€Œ%sã€ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "The package must have at least one '.' separator."
msgstr "套件必須至少有一個「.ã€åˆ†éš”字元。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Select device from the list"
msgstr "è‡ªæ¸…å–®ä¸­é¸æ“‡è£ç½®"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Running on %s"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting APK..."
msgstr "全部匯出"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Uninstalling..."
msgstr "å–æ¶ˆå®‰è£"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Installing to device, please wait..."
msgstr "載入中,請ç¨å¾Œ..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not install to device: %s"
msgstr "無法啟動å­è™•ç†ç¨‹åºï¼"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Running on device..."
msgstr "正在執行自定腳本..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not execute on device."
msgstr "無法新增資料夾。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find the 'apksigner' tool."
msgstr "找ä¸åˆ°ã€Œapksignerã€å·¥å…·ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build template not installed in the project. Install it from the "
"Project menu."
msgstr "å°šæœªæ–¼å°ˆæ¡ˆä¸­å®‰è£ Android 建置樣æ¿ã€‚請先於專案目錄中進行安è£ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Debug Keystore, Debug User AND Debug Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr "尚未於編輯器設定或é è¨­è¨­å®šä¸­è¨­å®šé‡‘é‘°å„²å­˜å€ (Keystore)。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Either Release Keystore, Release User AND Release Password settings must be "
"configured OR none of them."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Release keystore incorrectly configured in the export preset."
msgstr "發行金鑰儲存å€ä¸­ä¸æ­£ç¢ºä¹‹çµ„態設定至匯出é è¨­è¨­å®šã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "A valid Android SDK path is required in Editor Settings."
msgstr "必須於 [編輯器設定] 中æä¾›ä¸€å€‹æœ‰æ•ˆçš„ Android SDK 路徑。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid Android SDK path in Editor Settings."
msgstr "[編輯器設定] 中所指定的 Android SDK 路徑無效。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'platform-tools' directory!"
msgstr "缺少「platform-toolsã€è³‡æ–™å¤¾ï¼"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr "找ä¸åˆ° Android SDK platform-tools çš„ adb 指令。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr "請檢查 [編輯器設定] 中所指定的 Android SDK 資料夾。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Missing 'build-tools' directory!"
msgstr "缺少「build-toolsã€è³‡æ–™å¤¾ï¼"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr "找ä¸åˆ° Android SDK build-tools çš„ apksigner 指令。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid public key for APK expansion."
msgstr "無效的 APK Expansion 公鑰。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid package name:"
msgstr "無效的套件å稱:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
"project setting (changed in Godot 3.2.2).\n"
@@ -13143,37 +13274,22 @@ msgstr ""
"「andoird/modulesã€å°ˆæ¡ˆè¨­å®šä¸­åŒ…å«äº†ç„¡æ•ˆçš„「GodotPaymentV3ã€æ¨¡çµ„(更改於 "
"Godot 3.2.2)。\n"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Use Custom Build\" must be enabled to use the plugins."
msgstr "「使用自定建置ã€å¿…須啟用以使用本外掛。"
-#: platform/android/export/export.cpp
-msgid ""
-"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
-"\"."
-msgstr ""
-"「Degrees Of Freedomã€ï¼ˆè‡ªç”±è§’度)僅å¯åœ¨ã€ŒXr Modeã€ï¼ˆXR 模å¼ï¼‰è¨­ç‚ºã€ŒOculus "
-"Mobile VRã€æ™‚å¯ç”¨ã€‚"
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
msgstr ""
"「Hand Trackingã€ï¼ˆæ‰‹éƒ¨è¿½è¹¤ï¼‰åƒ…å¯åœ¨ã€ŒXr Modeã€ï¼ˆXR 模å¼ï¼‰è¨­ç‚ºã€ŒOculus Mobile "
"VRã€æ™‚å¯ç”¨ã€‚"
-#: platform/android/export/export.cpp
-msgid ""
-"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
-msgstr ""
-"「Focus Awarenessã€ï¼ˆæé«˜é—œæ³¨åº¦ï¼‰åƒ…å¯åœ¨ã€ŒXr Modeã€ï¼ˆXR 模å¼ï¼‰è¨­ç‚ºã€ŒOculus "
-"Mobile VRã€æ™‚å¯ç”¨ã€‚"
-
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
msgstr "「Export AABã€åƒ…於「Use Custom Buildã€å•Ÿç”¨æ™‚å¯ç”¨ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"'apksigner' could not be found.\n"
"Please check the command is available in the Android SDK build-tools "
@@ -13181,64 +13297,64 @@ msgid ""
"The resulting %s is unsigned."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Signing debug %s..."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Signing release %s..."
msgstr ""
"æ­£åœ¨æŽƒææª”案,\n"
"è«‹ç¨å¾Œ..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not find keystore, unable to export."
msgstr "無法開啟樣æ¿ä»¥è¼¸å‡ºï¼š"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' returned with error #%d"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Verifying %s..."
msgstr "正在新增 %s…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "'apksigner' verification of %s failed."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Exporting for Android"
msgstr "全部匯出"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android App Bundle requires the *.aab extension."
msgstr "無效的檔案å稱ï¼Android App Bundle å¿…é ˆè¦æœ‰ *.aab 副檔å。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "APK Expansion not compatible with Android App Bundle."
msgstr "APK Expansion 與 Android App Bundle ä¸ç›¸å®¹ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Invalid filename! Android APK requires the *.apk extension."
msgstr "無效的檔案å稱ï¼Android APK å¿…é ˆè¦æœ‰ *.apk 副檔å。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Unsupported export format!\n"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Trying to build from a custom built template, but no version info for it "
"exists. Please reinstall from the 'Project' menu."
msgstr ""
"嘗試自自定建置樣æ¿é€²è¡Œå»ºç½®ï¼Œä½†ç„¡ç‰ˆæœ¬è³‡è¨Šå¯ç”¨ã€‚請自「專案ã€é¸å–®ä¸­é‡æ–°å®‰è£ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Android build version mismatch:\n"
" Template installed: %s\n"
@@ -13250,26 +13366,26 @@ msgstr ""
" Godot 版本:%s\n"
"請自「專案ã€ç›®éŒ„䏭釿–°å®‰è£ Android 建置樣æ¿ã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to overwrite res://android/build/res/*.xml files with project name"
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files to gradle project\n"
msgstr "無法在專案路徑中編輯 project.godot。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not write expansion package file!"
msgstr "無法寫入檔案:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Building Android Project (gradle)"
msgstr "建置 Android 專案(Gradle)"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Building of Android project failed, check output for the error.\n"
"Alternatively visit docs.godotengine.org for Android build documentation."
@@ -13277,34 +13393,34 @@ msgstr ""
"建置 Android 專案失敗,請檢查輸出以確èªéŒ¯èª¤ã€‚\n"
"也å¯ä»¥ç€è¦½ docs.godotengine.org 以ç€è¦½ Android 建置說明文件。"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Moving output"
msgstr "移動輸出"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Unable to copy and rename export file, check gradle project directory for "
"outputs."
msgstr "無法複製並更å匯出的檔案,請於 Gradle 專案資料夾內確èªè¼¸å‡ºã€‚"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Package not found: %s"
msgstr "未找到動畫:「%sã€"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Creating APK..."
msgstr "正在建立輪廓..."
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid ""
"Could not find template APK to export:\n"
"%s"
msgstr "無法開啟樣æ¿ä»¥è¼¸å‡ºï¼š"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid ""
"Missing libraries in the export template for the selected architectures: "
"%s.\n"
@@ -13312,21 +13428,21 @@ msgid ""
"architectures in the export preset."
msgstr ""
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Adding files..."
msgstr "正在新增 %s…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
#, fuzzy
msgid "Could not export project files"
msgstr "無法寫入檔案:"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Aligning APK..."
msgstr "正在å°é½Š APK…"
-#: platform/android/export/export.cpp
+#: platform/android/export/export_plugin.cpp
msgid "Could not unzip temporary unaligned APK."
msgstr ""
@@ -13822,6 +13938,14 @@ msgstr ""
"NavigationMeshInstance 必須為 Navigation 節點的å­ç¯€é»žæˆ–次級å­ç¯€é»žã€‚其僅æä¾›å°Ž"
"航資料。"
+#: scene/3d/occluder.cpp
+msgid "No shape is set."
+msgstr ""
+
+#: scene/3d/occluder.cpp
+msgid "Only uniform scales are supported."
+msgstr ""
+
#: scene/3d/particles.cpp
msgid ""
"GPU-based particles are not supported by the GLES2 video driver.\n"
@@ -14139,6 +14263,14 @@ msgstr "必須使用有效的副檔å。"
msgid "Enable grid minimap."
msgstr "啟用網格迷你地圖。"
+#: scene/gui/nine_patch_rect.cpp
+msgid ""
+"The Tile and Tile Fit options for Axis Stretch properties are only effective "
+"when using the GLES3 rendering backend.\n"
+"The GLES2 backend is currently in use, so these modes will act like Stretch "
+"instead."
+msgstr ""
+
#: scene/gui/popup.cpp
msgid ""
"Popups will hide by default unless you call popup() or any of the popup*() "
@@ -14189,6 +14321,10 @@ msgstr ""
msgid "Viewport size must be greater than 0 to render anything."
msgstr "Viewport 大å°å¿…須大於 0 æ‰å¯é€²è¡Œç®—繪。"
+#: scene/resources/occluder_shape.cpp
+msgid "OccluderShapeSphere Set Spheres"
+msgstr ""
+
#: scene/resources/visual_shader_nodes.cpp
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
@@ -14240,6 +14376,41 @@ msgstr "指派至å‡å‹»ã€‚"
msgid "Constants cannot be modified."
msgstr "ä¸å¯ä¿®æ”¹å¸¸æ•¸ã€‚"
+#~ msgid "Make Rest Pose (From Bones)"
+#~ msgstr "è£½ä½œéœæ­¢å§¿å‹¢ï¼ˆè‡ªéª¨éª¼ï¼‰"
+
+#~ msgid "Bottom"
+#~ msgstr "底部"
+
+#~ msgid "Left"
+#~ msgstr "å·¦"
+
+#~ msgid "Right"
+#~ msgstr "å³"
+
+#~ msgid "Front"
+#~ msgstr "æ­£é¢"
+
+#~ msgid "Rear"
+#~ msgstr "後"
+
+#~ msgid "Nameless gizmo"
+#~ msgstr "未命åçš„ Gizmo"
+
+#~ msgid ""
+#~ "\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile "
+#~ "VR\"."
+#~ msgstr ""
+#~ "「Degrees Of Freedomã€ï¼ˆè‡ªç”±è§’度)僅å¯åœ¨ã€ŒXr Modeã€ï¼ˆXR 模å¼ï¼‰è¨­ç‚º"
+#~ "「Oculus Mobile VRã€æ™‚å¯ç”¨ã€‚"
+
+#~ msgid ""
+#~ "\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+#~ "\"."
+#~ msgstr ""
+#~ "「Focus Awarenessã€ï¼ˆæé«˜é—œæ³¨åº¦ï¼‰åƒ…å¯åœ¨ã€ŒXr Modeã€ï¼ˆXR 模å¼ï¼‰è¨­ç‚ºã€ŒOculus "
+#~ "Mobile VRã€æ™‚å¯ç”¨ã€‚"
+
#~ msgid "Package Contents:"
#~ msgstr "套件內容:"
diff --git a/main/main.cpp b/main/main.cpp
index 6764332f16..7d7c9d7374 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -135,7 +135,6 @@ static int audio_driver_idx = -1;
// Engine config/tools
-static bool single_window = false;
static bool editor = false;
static bool project_manager = false;
static bool cmdline_tool = false;
@@ -145,6 +144,7 @@ static bool auto_quit = false;
static OS::ProcessID allow_focus_steal_pid = 0;
#ifdef TOOLS_ENABLED
static bool auto_build_solutions = false;
+static String debug_server_uri;
#endif
// Display
@@ -286,6 +286,7 @@ void Main::print_help(const char *p_binary) {
#ifdef TOOLS_ENABLED
OS::get_singleton()->print(" -e, --editor Start the editor instead of running the scene.\n");
OS::get_singleton()->print(" -p, --project-manager Start the project manager, even if a project is auto-detected.\n");
+ OS::get_singleton()->print(" --debug-server <uri> Start the editor debug server (<protocol>://<host/IP>[:<port>], e.g. tcp://127.0.0.1:6007)\n");
#endif
OS::get_singleton()->print(" -q, --quit Quit after the first iteration.\n");
OS::get_singleton()->print(" -l, --language <locale> Use a specific locale (<locale> being a two-letter code).\n");
@@ -403,6 +404,7 @@ Error Main::test_setup() {
GLOBAL_DEF("debug/settings/crash_handler/message",
String("Please include this when reporting the bug on https://github.com/godotengine/godot/issues"));
+ GLOBAL_DEF_RST("rendering/occlusion_culling/bvh_build_quality", 2);
translation_server = memnew(TranslationServer);
@@ -453,10 +455,10 @@ void Main::test_cleanup() {
ResourceLoader::remove_custom_loaders();
ResourceSaver::remove_custom_savers();
+ unregister_driver_types();
#ifdef TOOLS_ENABLED
EditorNode::unregister_editor_types();
#endif
- unregister_driver_types();
unregister_module_types();
unregister_platform_apis();
unregister_scene_types();
@@ -571,8 +573,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
List<String>::Element *I = args.front();
- I = args.front();
-
while (I) {
I->get() = unescape_cmdline(I->get().strip_edges());
I = I->next();
@@ -754,7 +754,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
} else if (I->get() == "--single-window") { // force single window
- single_window = true;
+ OS::get_singleton()->_single_window = true;
} else if (I->get() == "-t" || I->get() == "--always-on-top") { // force always-on-top window
init_always_on_top = true;
@@ -876,6 +876,18 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
} else if (I->get() == "-p" || I->get() == "--project-manager") { // starts project manager
project_manager = true;
+ } else if (I->get() == "--debug-server") {
+ if (I->next()) {
+ debug_server_uri = I->next()->get();
+ if (debug_server_uri.find("://") == -1) { // wrong address
+ OS::get_singleton()->print("Invalid debug server uri. It should be of the form <protocol>://<bind_address>:<port>.\n");
+ goto error;
+ }
+ N = I->next()->next();
+ } else {
+ OS::get_singleton()->print("Missing remote debug server uri, aborting.\n");
+ goto error;
+ }
} else if (I->get() == "--build-solutions") { // Build the scripting solution such C#
auto_build_solutions = true;
@@ -1078,7 +1090,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
editor = false;
#else
const String error_msg = "Error: Couldn't load project data at path \"" + project_path + "\". Is the .pck file missing?\nIf you've renamed the executable, the associated .pck file should also be renamed to match the executable's name (without the extension).\n";
- OS::get_singleton()->print("%s", error_msg.ascii().get_data());
+ OS::get_singleton()->print("%s", error_msg.utf8().get_data());
OS::get_singleton()->alert(error_msg);
goto error;
@@ -1172,7 +1184,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
#ifdef TOOLS_ENABLED
if (!editor && !project_manager) {
#endif
- OS::get_singleton()->print("Error: Can't run project: no main scene defined.\n");
+ const String error_msg = "Error: Can't run project: no main scene defined in the project.\n";
+ OS::get_singleton()->print("%s", error_msg.utf8().get_data());
+ OS::get_singleton()->alert(error_msg);
goto error;
#ifdef TOOLS_ENABLED
}
@@ -1561,8 +1575,8 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
{
GLOBAL_DEF_RST_NOVAL("input_devices/pen_tablet/driver", "");
- GLOBAL_DEF_RST_NOVAL("input_devices/pen_tablet/driver.Windows", "");
- ProjectSettings::get_singleton()->set_custom_property_info("input_devices/pen_tablet/driver.Windows", PropertyInfo(Variant::STRING, "input_devices/pen_tablet/driver.Windows", PROPERTY_HINT_ENUM, "wintab,winink"));
+ GLOBAL_DEF_RST_NOVAL("input_devices/pen_tablet/driver.windows", "");
+ ProjectSettings::get_singleton()->set_custom_property_info("input_devices/pen_tablet/driver.windows", PropertyInfo(Variant::STRING, "input_devices/pen_tablet/driver.windows", PROPERTY_HINT_ENUM, "wintab,winink"));
}
if (tablet_driver == "") { // specified in project.godot
@@ -1707,8 +1721,10 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
}
#ifdef TOOLS_ENABLED
- Ref<Image> icon = memnew(Image(app_icon_png));
- DisplayServer::get_singleton()->set_icon(icon);
+ if (OS::get_singleton()->get_bundle_icon_path().is_empty()) {
+ Ref<Image> icon = memnew(Image(app_icon_png));
+ DisplayServer::get_singleton()->set_icon(icon);
+ }
#endif
}
@@ -1969,7 +1985,7 @@ bool Main::start() {
for (int i = 0; i < _doc_data_class_path_count; i++) {
// Custom modules are always located by absolute path.
String path = _doc_data_class_paths[i].path;
- if (path.is_rel_path()) {
+ if (path.is_relative_path()) {
path = doc_tool_path.plus_file(path);
}
String name = _doc_data_class_paths[i].name;
@@ -2118,7 +2134,7 @@ bool Main::start() {
bool embed_subwindows = GLOBAL_DEF("display/window/subwindows/embed_subwindows", false);
- if (single_window || (!project_manager && !editor && embed_subwindows)) {
+ if (OS::get_singleton()->is_single_window() || (!project_manager && !editor && embed_subwindows)) {
sml->get_root()->set_embed_subwindows_hint(true);
}
ResourceLoader::add_custom_loaders();
@@ -2127,11 +2143,11 @@ bool Main::start() {
if (!project_manager && !editor) { // game
if (game_path != "" || script != "") {
//autoload
- Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
//first pass, add the constants so they exist before any script is loaded
- for (Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E; E = E->next()) {
- const ProjectSettings::AutoloadInfo &info = E->get();
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
+ const ProjectSettings::AutoloadInfo &info = E.get();
if (info.is_singleton) {
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
@@ -2142,8 +2158,8 @@ bool Main::start() {
//second pass, load into global constants
List<Node *> to_add;
- for (Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E; E = E->next()) {
- const ProjectSettings::AutoloadInfo &info = E->get();
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
+ const ProjectSettings::AutoloadInfo &info = E.get();
RES res = ResourceLoader::load(info.path);
ERR_CONTINUE_MSG(res.is_null(), "Can't autoload: " + info.path);
@@ -2203,7 +2219,7 @@ bool Main::start() {
//standard helpers that can be changed from main config
String stretch_mode = GLOBAL_DEF_BASIC("display/window/stretch/mode", "disabled");
- String stretch_aspect = GLOBAL_DEF_BASIC("display/window/stretch/aspect", "ignore");
+ String stretch_aspect = GLOBAL_DEF_BASIC("display/window/stretch/aspect", "keep");
Size2i stretch_size = Size2i(GLOBAL_DEF_BASIC("display/window/size/width", 0),
GLOBAL_DEF_BASIC("display/window/size/height", 0));
@@ -2242,6 +2258,10 @@ bool Main::start() {
DisplayServer::get_singleton()->window_set_title(appname);
#endif
+ // Define a very small minimum window size to prevent bugs such as GH-37242.
+ // It can still be overridden by the user in a script.
+ DisplayServer::get_singleton()->window_set_min_size(Size2i(64, 64));
+
bool snap_controls = GLOBAL_DEF("gui/common/snap_controls_to_pixels", true);
sml->get_root()->set_snap_controls_to_pixels(snap_controls);
@@ -2262,7 +2282,7 @@ bool Main::start() {
"display/window/stretch/mode",
PROPERTY_HINT_ENUM,
"disabled,canvas_items,viewport"));
- GLOBAL_DEF_BASIC("display/window/stretch/aspect", "ignore");
+ GLOBAL_DEF_BASIC("display/window/stretch/aspect", "keep");
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/aspect",
PropertyInfo(Variant::STRING,
"display/window/stretch/aspect",
@@ -2344,6 +2364,9 @@ bool Main::start() {
}
}
DisplayServer::get_singleton()->set_context(DisplayServer::CONTEXT_EDITOR);
+ if (!debug_server_uri.is_empty()) {
+ EditorDebuggerNode::get_singleton()->start(debug_server_uri);
+ }
}
#endif
if (!editor) {
@@ -2419,7 +2442,7 @@ bool Main::start() {
#endif
}
- if (!hasicon) {
+ if (!hasicon && OS::get_singleton()->get_bundle_icon_path().is_empty()) {
Ref<Image> icon = memnew(Image(app_icon_png));
DisplayServer::get_singleton()->set_icon(icon);
}
@@ -2667,23 +2690,29 @@ void Main::cleanup(bool p_force) {
//clear global shader variables before scene and other graphics stuff are deinitialized.
rendering_server->global_variables_clear();
+ if (xr_server) {
+ // Now that we're unregistering properly in plugins we need to keep access to xr_server for a little longer
+ // We do however unset our primary interface
+ xr_server->set_primary_interface(Ref<XRInterface>());
+ }
+
+ unregister_driver_types();
+
#ifdef TOOLS_ENABLED
EditorNode::unregister_editor_types();
#endif
- if (xr_server) {
- // cleanup now before we pull the rug from underneath...
- memdelete(xr_server);
- }
-
ImageLoader::cleanup();
- unregister_driver_types();
unregister_module_types();
unregister_platform_apis();
unregister_scene_types();
unregister_server_types();
+ if (xr_server) {
+ memdelete(xr_server);
+ }
+
if (audio_server) {
audio_server->finish();
memdelete(audio_server);
diff --git a/main/main_timer_sync.cpp b/main/main_timer_sync.cpp
index 0d172be65e..42023e5a2f 100644
--- a/main/main_timer_sync.cpp
+++ b/main/main_timer_sync.cpp
@@ -57,7 +57,7 @@ int MainTimerSync::get_average_physics_steps(double &p_min, double &p_max) {
const double typical_lower = typical_physics_steps[i];
const double current_min = typical_lower / (i + 1);
if (current_min > p_max) {
- return i; // bail out of further restrictions would void the interval
+ return i; // bail out if further restrictions would void the interval
} else if (current_min > p_min) {
p_min = current_min;
}
@@ -105,6 +105,12 @@ MainFrameTime MainTimerSync::advance_core(double p_physics_step, int p_physics_t
}
}
+#ifdef DEBUG_ENABLED
+ if (max_typical_steps < 0) {
+ WARN_PRINT_ONCE("`max_typical_steps` is negative. This could hint at an engine bug or system timer misconfiguration.");
+ }
+#endif
+
// try to keep it consistent with previous iterations
if (ret.physics_steps < min_typical_steps) {
const int max_possible_steps = floor((time_accum)*p_physics_ticks_per_second + get_physics_jitter_fix());
@@ -124,6 +130,10 @@ MainFrameTime MainTimerSync::advance_core(double p_physics_step, int p_physics_t
}
}
+ if (ret.physics_steps < 0) {
+ ret.physics_steps = 0;
+ }
+
time_accum -= ret.physics_steps * p_physics_step;
// keep track of accumulated step counts
@@ -151,6 +161,9 @@ MainFrameTime MainTimerSync::advance_checked(double p_physics_step, int p_physic
p_process_step = 1.0 / fixed_fps;
}
+ float min_output_step = p_process_step / 8;
+ min_output_step = MAX(min_output_step, 1E-6);
+
// compensate for last deficit
p_process_step += time_deficit;
@@ -177,9 +190,37 @@ MainFrameTime MainTimerSync::advance_checked(double p_physics_step, int p_physic
// last clamping: make sure time_accum is between 0 and p_physics_step for consistency between physics and process
ret.clamp_process_step(process_minus_accum, process_minus_accum + p_physics_step);
+ // all the operations above may have turned ret.p_process_step negative or zero, keep a minimal value
+ if (ret.process_step < min_output_step) {
+ ret.process_step = min_output_step;
+ }
+
// restore time_accum
time_accum = ret.process_step - process_minus_accum;
+ // forcing ret.process_step to be positive may trigger a violation of the
+ // promise that time_accum is between 0 and p_physics_step
+#ifdef DEBUG_ENABLED
+ if (time_accum < -1E-7) {
+ WARN_PRINT_ONCE("Intermediate value of `time_accum` is negative. This could hint at an engine bug or system timer misconfiguration.");
+ }
+#endif
+
+ if (time_accum > p_physics_step) {
+ const int extra_physics_steps = floor(time_accum * p_physics_ticks_per_second);
+ time_accum -= extra_physics_steps * p_physics_step;
+ ret.physics_steps += extra_physics_steps;
+ }
+
+#ifdef DEBUG_ENABLED
+ if (time_accum < -1E-7) {
+ WARN_PRINT_ONCE("Final value of `time_accum` is negative. It should always be between 0 and `p_physics_step`. This hints at an engine bug.");
+ }
+ if (time_accum > p_physics_step + 1E-7) {
+ WARN_PRINT_ONCE("Final value of `time_accum` is larger than `p_physics_step`. It should always be between 0 and `p_physics_step`. This hints at an engine bug.");
+ }
+#endif
+
// track deficit
time_deficit = p_process_step - ret.process_step;
diff --git a/methods.py b/methods.py
index 970bd10aa3..0e71adb40d 100644
--- a/methods.py
+++ b/methods.py
@@ -56,6 +56,17 @@ def disable_warnings(self):
self.Append(CXXFLAGS=["-w"])
+def force_optimization_on_debug(self):
+ # 'self' is the environment
+ if self["target"] != "debug":
+ return
+
+ if self.msvc:
+ self.Append(CCFLAGS=["/O2"])
+ else:
+ self.Append(CCFLAGS=["-O3"])
+
+
def add_module_version_string(self, s):
self.module_version_string += "." + s
@@ -319,7 +330,7 @@ def disable_module(self):
self.disabled_modules.append(self.current_module)
-def module_check_dependencies(self, module, dependencies):
+def module_check_dependencies(self, module, dependencies, silent=False):
"""
Checks if module dependencies are enabled for a given module,
and prints a warning if they aren't.
@@ -333,11 +344,12 @@ def module_check_dependencies(self, module, dependencies):
missing_deps.append(dep)
if missing_deps != []:
- print(
- "Disabling '{}' module as the following dependencies are not satisfied: {}".format(
- module, ", ".join(missing_deps)
+ if not silent:
+ print(
+ "Disabling '{}' module as the following dependencies are not satisfied: {}".format(
+ module, ", ".join(missing_deps)
+ )
)
- )
return False
else:
return True
@@ -934,9 +946,12 @@ def show_progress(env):
def progress_finish(target, source, env):
nonlocal node_count, progressor
- with open(node_count_fname, "w") as f:
- f.write("%d\n" % node_count)
- progressor.delete(progressor.file_list())
+ try:
+ with open(node_count_fname, "w") as f:
+ f.write("%d\n" % node_count)
+ progressor.delete(progressor.file_list())
+ except Exception:
+ pass
try:
with open(node_count_fname) as f:
diff --git a/misc/dist/document_icons/shader.svg b/misc/dist/document_icons/shader.svg
new file mode 100644
index 0000000000..30515cde3d
--- /dev/null
+++ b/misc/dist/document_icons/shader.svg
@@ -0,0 +1 @@
+<svg height="1024" width="1024" xmlns="http://www.w3.org/2000/svg"><path d="M812.681 293.783c-23.575-32.543-141.93-39.865-197.505-34.983 2.17-68.048 31.457-117.656-37.966-177.026M161.89 49.151H464c77.128-2.02 126.554 37.835 178.444 84.881l123.665 109.83c63.819 56.94 89.13 110.625 96 188.174v542.886H161.89z" fill="#eff1f5" stroke="#9f9fa1" stroke-linecap="round" stroke-linejoin="round" stroke-width="19.603"/><text style="font-weight:800;font-size:16px;font-family:Montserrat;letter-spacing:0;word-spacing:0;fill:#333f67" x="249.582" y="878.644"><tspan font-size="112" x="249.582" y="878.644">SHADER</tspan></text><path d="M640.44 348.066c-10.54 0-21.102 4.097-29.145 12.276l-35.64 36.254-47.725 48.529h-.004l-47.676 48.53-33.98 34.546 13.744 13.98h89.002l47.675-48.529 47.723-48.527h.006l25.12-25.543c6.375-6.486 10.147-14.571 11.468-22.986h-.002c2.01-12.81-1.762-26.38-11.469-36.254-8.042-8.18-18.558-12.276-29.098-12.276zM460.013 542.184l44.502 45.257 44.5-45.257h-89.002zm-46.848 13.834c-9.932.124-18.509 4.228-24.668 11.236-5.21 5.927-8.55 14.024-9.668 23.459-.254 2.153-.52 4.295-.52 6.588 0 33.842-55.28 6.971-28.53 41.94h117.626c6.64-15.57 5.836-33.447-2.13-48.528h-.003c-2.48-4.695-5.392-9.213-9.289-13.176-13.348-13.578-26.713-20.143-38.48-21.326h-.002a38.536 38.536 0 0 0-4.336-.193zm-63.387 83.224c4.467 5.84 10.605 12.952 20.33 22.844 21.446 21.814 64.428 16.264 85.875-5.547 5.035-5.12 8.751-11.034 11.422-17.297H349.78z" style="fill:#478cbf;fill-opacity:1"/></svg>
diff --git a/misc/dist/document_icons/shader_extra_small.svg b/misc/dist/document_icons/shader_extra_small.svg
new file mode 100644
index 0000000000..b9c9cd4811
--- /dev/null
+++ b/misc/dist/document_icons/shader_extra_small.svg
@@ -0,0 +1 @@
+<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M12.698 4.59c-.368-.508-2.218-.623-3.086-.546.034-1.064.492-1.839-.593-2.766m-6.49-.51H7.25c1.205-.032 1.977.591 2.788 1.326L11.97 3.81c.998.89 1.393 1.729 1.5 2.94v8.483H2.53z" fill="#eff1f5" stroke="#9f9fa1" stroke-linecap="round" stroke-linejoin="round"/><path d="M10.77 5.465a.88.88 0 0 0-.627.264l-.77.78-1.03 1.048-1.027 1.047-.734.744.299.3h1.918l1.027-1.044 1.03-1.047.54-.551a.902.902 0 0 0 .249-.496.91.91 0 0 0-.249-.781.877.877 0 0 0-.626-.264zM8.799 9.648 6.88 9.65l.959.975.959-.977zm-2.975.301a.715.715 0 0 0-.486.24.922.922 0 0 0-.21.506h.003c-.006.046-.014.093-.014.143 0 .73-1.19.15-.613.904.096.126.227.28.437.492.462.47 1.39.351 1.852-.119a1.21 1.21 0 0 0 .246-.373 1.22 1.22 0 0 0-.047-1.047 1.19 1.19 0 0 0-.199-.283c-.288-.293-.576-.436-.83-.46a.715.715 0 0 0-.139-.003z" style="fill:#478cbf;fill-opacity:1"/></svg>
diff --git a/misc/dist/document_icons/shader_small.svg b/misc/dist/document_icons/shader_small.svg
new file mode 100644
index 0000000000..e20bca9fdf
--- /dev/null
+++ b/misc/dist/document_icons/shader_small.svg
@@ -0,0 +1 @@
+<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><path d="M25.396 9.18c-.736-1.016-4.435-1.245-6.172-1.093.068-2.126.983-3.676-1.186-5.532M5.059 1.536H14.5c2.41-.063 3.955 1.182 5.576 2.652l3.865 3.433c1.994 1.779 2.785 3.457 3 5.88v16.965H5.059z" fill="#eff1f5" stroke="#9f9fa1" stroke-linecap="round" stroke-linejoin="round"/><path d="M21.295 11.242c-.434 0-.871.17-1.201.506l-1.471 1.494-1.965 2h-.002l-1.963 2-1.4 1.426.566.574 1.834 1.867 1.834-1.867 1.963-2 1.967-2 1.037-1.05a1.73 1.73 0 0 0 .473-.95 1.74 1.74 0 0 0-.475-1.494 1.676 1.676 0 0 0-1.197-.506zm-9.453 8.572a1.367 1.367 0 0 0-.932.463c-.215.244-.35.577-.396.965-.01.09-.024.179-.024.274 0 1.395-2.277.285-1.174 1.726.184.241.436.536.836.944.884.899 2.657.668 3.541-.23.207-.21.36-.455.47-.714a2.33 2.33 0 0 0-.089-2 2.273 2.273 0 0 0-.383-.543c-.55-.56-1.099-.829-1.584-.877a1.367 1.367 0 0 0-.265-.008z" style="fill:#478cbf;fill-opacity:1"/></svg>
diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html
index 347c22adf8..2cae215951 100644
--- a/misc/dist/html/editor.html
+++ b/misc/dist/html/editor.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+<html xmlns="https://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
diff --git a/misc/dist/html/full-size.html b/misc/dist/html/full-size.html
index 7afb6fdb6b..90e8167369 100644
--- a/misc/dist/html/full-size.html
+++ b/misc/dist/html/full-size.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html xmlns='http://www.w3.org/1999/xhtml' lang='' xml:lang=''>
+<html xmlns='https://www.w3.org/1999/xhtml' lang='' xml:lang=''>
<head>
<meta charset='utf-8' />
<meta name='viewport' content='width=device-width, user-scalable=no' />
diff --git a/misc/dist/linux/org.godotengine.Godot.xml b/misc/dist/linux/org.godotengine.Godot.xml
index d4452018c4..2f06bb3639 100644
--- a/misc/dist/linux/org.godotengine.Godot.xml
+++ b/misc/dist/linux/org.godotengine.Godot.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+<mime-info xmlns="https://specifications.freedesktop.org/shared-mime-info-spec">
<mime-type type="application/x-godot-project">
<comment>Godot Engine project</comment>
<sub-class-of type="text/plain"/>
diff --git a/misc/dist/osx_tools.app/Contents/Info.plist b/misc/dist/osx_tools.app/Contents/Info.plist
index 8e70d4c203..923bc7312a 100644
--- a/misc/dist/osx_tools.app/Contents/Info.plist
+++ b/misc/dist/osx_tools.app/Contents/Info.plist
@@ -84,7 +84,7 @@
<key>UTTypeReferenceURL</key>
<string></string>
<key>UTTypeDescription</key>
- <string>Godot Scene</string>
+ <string>Godot Engine scene</string>
<key>UTTypeIconFile</key>
<string>Scene.icns</string>
<key>UTTypeConformsTo</key>
@@ -97,6 +97,7 @@
<array>
<string>scn</string>
<string>tscn</string>
+ <string>escn</string>
</array>
<key>public.mime-type</key>
<string>application/x-godot-scene</string>
@@ -108,7 +109,7 @@
<key>UTTypeReferenceURL</key>
<string></string>
<key>UTTypeDescription</key>
- <string>Godot Script</string>
+ <string>GDScript script</string>
<key>UTTypeIconFile</key>
<string>GDScript.icns</string>
<key>UTTypeConformsTo</key>
@@ -122,7 +123,7 @@
<string>gd</string>
</array>
<key>public.mime-type</key>
- <string>text/x-gdscript</string>
+ <string>application/x-gdscript</string>
</dict>
</dict>
<dict>
@@ -131,7 +132,7 @@
<key>UTTypeReferenceURL</key>
<string></string>
<key>UTTypeDescription</key>
- <string>Godot Resource</string>
+ <string>Godot Engine resource</string>
<key>UTTypeIconFile</key>
<string>Resource.icns</string>
<key>UTTypeConformsTo</key>
@@ -151,11 +152,34 @@
</dict>
<dict>
<key>UTTypeIdentifier</key>
+ <string>public.gdshader</string>
+ <key>UTTypeReferenceURL</key>
+ <string></string>
+ <key>UTTypeDescription</key>
+ <string>Godot Engine shader</string>
+ <key>UTTypeIconFile</key>
+ <string>Shader.icns</string>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.script</string>
+ </array>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>gdshader</string>
+ </array>
+ <key>public.mime-type</key>
+ <string>application/x-godot-shader</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>UTTypeIdentifier</key>
<string>public.godot</string>
<key>UTTypeReferenceURL</key>
<string></string>
<key>UTTypeDescription</key>
- <string>Godot Project</string>
+ <string>Godot Engine project</string>
<key>UTTypeIconFile</key>
<string>Project.icns</string>
<key>UTTypeConformsTo</key>
@@ -169,7 +193,7 @@
<string>godot</string>
</array>
<key>public.mime-type</key>
- <string>text/x-godot-project</string>
+ <string>application/x-godot-project</string>
</dict>
</dict>
</array>
diff --git a/misc/dist/osx_tools.app/Contents/Resources/Godot.icns b/misc/dist/osx_tools.app/Contents/Resources/Godot.icns
index be9254630c..61697976c6 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/Godot.icns
+++ b/misc/dist/osx_tools.app/Contents/Resources/Godot.icns
Binary files differ
diff --git a/misc/dist/osx_tools.app/Contents/Resources/Shader.icns b/misc/dist/osx_tools.app/Contents/Resources/Shader.icns
new file mode 100644
index 0000000000..a76e648a1a
--- /dev/null
+++ b/misc/dist/osx_tools.app/Contents/Resources/Shader.icns
Binary files differ
diff --git a/misc/dist/windows/modpath.pas b/misc/dist/windows/modpath.pas
index ab09f18254..6d80d4201e 100644
--- a/misc/dist/windows/modpath.pas
+++ b/misc/dist/windows/modpath.pas
@@ -3,9 +3,9 @@
// Inno Setup Ver: 5.4.2
// Script Version: 1.4.2
// Author: Jared Breland <jbreland@legroom.net>
-// Homepage: http://www.legroom.net/software
+// Homepage: https://www.legroom.net/software
// License: GNU Lesser General Public License (LGPL), version 3
-// http://www.gnu.org/licenses/lgpl.html
+// https://www.gnu.org/licenses/lgpl.html
//
// Script Function:
// Allow modification of environmental path directly from Inno Setup installers
diff --git a/misc/hooks/canonicalize_filename.sh b/misc/hooks/canonicalize_filename.sh
index 5fcae6ee70..fe66999d8c 100755
--- a/misc/hooks/canonicalize_filename.sh
+++ b/misc/hooks/canonicalize_filename.sh
@@ -16,7 +16,7 @@
# specified filename. This should reproduce the results of the GNU version of
# readlink with the -f option.
#
-# Reference: http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac
+# Reference: https://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac
canonicalize_filename () {
local target_file="$1"
local physical_directory=""
diff --git a/misc/scripts/black_format.sh b/misc/scripts/black_format.sh
index f93e8cbc2a..2ad9a23832 100755
--- a/misc/scripts/black_format.sh
+++ b/misc/scripts/black_format.sh
@@ -15,7 +15,7 @@ PY_FILES=$(find \( -path "./.git" \
\) -print)
black -l 120 $PY_FILES
-git diff > patch.patch
+git diff --color > patch.patch
# If no patch has been generated all is OK, clean up, and exit.
if [ ! -s patch.patch ] ; then
diff --git a/misc/scripts/clang_format.sh b/misc/scripts/clang_format.sh
index 63c66d41c3..bcd63aa73b 100755
--- a/misc/scripts/clang_format.sh
+++ b/misc/scripts/clang_format.sh
@@ -40,7 +40,7 @@ while IFS= read -rd '' f; do
done
done
-git diff > patch.patch
+git diff --color > patch.patch
# If no patch has been generated all is OK, clean up, and exit.
if [ ! -s patch.patch ] ; then
diff --git a/misc/scripts/file_format.sh b/misc/scripts/file_format.sh
index 795431cd28..b241f3da70 100755
--- a/misc/scripts/file_format.sh
+++ b/misc/scripts/file_format.sh
@@ -20,6 +20,9 @@ while IFS= read -rd '' f; do
continue
elif [[ "$f" == *"sln" ]]; then
continue
+ elif [[ "$f" == *".out" ]]; then
+ # GDScript integration testing files.
+ continue
elif [[ "$f" == *"patch" ]]; then
continue
elif [[ "$f" == *"pot" ]]; then
@@ -42,7 +45,7 @@ while IFS= read -rd '' f; do
perl -i -ple 's/\s*$//g' "$f"
done
-git diff > patch.patch
+git diff --color > patch.patch
# If no patch has been generated all is OK, clean up, and exit.
if [ ! -s patch.patch ] ; then
diff --git a/misc/scripts/make_icons.sh b/misc/scripts/make_icons.sh
index b590f03d38..cbb9266055 100755
--- a/misc/scripts/make_icons.sh
+++ b/misc/scripts/make_icons.sh
@@ -20,7 +20,7 @@ zip godot-icons.zip icon*.png
icotool -c -o godot-icon.ico icon{16,24,32,48,64,128,256}.png
# icns for macOS
-# Only some sizes: http://iconhandbook.co.uk/reference/chart/osx/
+# Only some sizes: https://iconhandbook.co.uk/reference/chart/osx/
png2icns godot-icon.icns icon{16,32,128,256,512,1024}.png
rm -f icon*.png
diff --git a/modules/bullet/SCsub b/modules/bullet/SCsub
index ba57de303e..09509abc44 100644
--- a/modules/bullet/SCsub
+++ b/modules/bullet/SCsub
@@ -10,7 +10,7 @@ env_bullet = env_modules.Clone()
thirdparty_obj = []
if env["builtin_bullet"]:
- # Build only version 2 for now (as of 2.89)
+ # Build only "Bullet2" API (not "Bullet3" folders).
# Sync file list with relevant upstream CMakeLists.txt for each folder.
if env["float"] == "64":
env.Append(CPPDEFINES=["BT_USE_DOUBLE_PRECISION=1"])
@@ -189,6 +189,7 @@ if env["builtin_bullet"]:
"LinearMath/btGeometryUtil.cpp",
"LinearMath/btPolarDecomposition.cpp",
"LinearMath/btQuickprof.cpp",
+ "LinearMath/btReducedVector.cpp",
"LinearMath/btSerializer.cpp",
"LinearMath/btSerializer64.cpp",
"LinearMath/btThreads.cpp",
@@ -200,15 +201,11 @@ if env["builtin_bullet"]:
thirdparty_sources = [thirdparty_dir + file for file in bullet2_src]
- # Treat Bullet headers as system headers to avoid raising warnings. Not supported on MSVC.
- if not env.msvc:
- env_bullet.Append(CPPFLAGS=["-isystem", Dir(thirdparty_dir).path])
- else:
- env_bullet.Prepend(CPPPATH=[thirdparty_dir])
+ env_bullet.Prepend(CPPPATH=[thirdparty_dir])
if env["target"] == "debug" or env["target"] == "release_debug":
env_bullet.Append(CPPDEFINES=["DEBUG"])
- env_bullet.Append(CPPDEFINES=["BT_USE_OLD_DAMPING_METHOD"])
+ env_bullet.Append(CPPDEFINES=["BT_USE_OLD_DAMPING_METHOD", "BT_THREADSAFE"])
env_thirdparty = env_bullet.Clone()
env_thirdparty.disable_warnings()
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp
index fc876a81cf..3054debaec 100644
--- a/modules/bullet/bullet_physics_server.cpp
+++ b/modules/bullet/bullet_physics_server.cpp
@@ -87,8 +87,8 @@ RID BulletPhysicsServer3D::shape_create(ShapeType p_shape) {
ShapeBullet *shape = nullptr;
switch (p_shape) {
- case SHAPE_PLANE: {
- shape = bulletnew(PlaneShapeBullet);
+ case SHAPE_WORLD_BOUNDARY: {
+ shape = bulletnew(WorldBoundaryShapeBullet);
} break;
case SHAPE_SPHERE: {
shape = bulletnew(SphereShapeBullet);
@@ -124,7 +124,7 @@ RID BulletPhysicsServer3D::shape_create(ShapeType p_shape) {
}
void BulletPhysicsServer3D::shape_set_data(RID p_shape, const Variant &p_data) {
- ShapeBullet *shape = shape_owner.getornull(p_shape);
+ ShapeBullet *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
shape->set_data(p_data);
}
@@ -134,25 +134,25 @@ void BulletPhysicsServer3D::shape_set_custom_solver_bias(RID p_shape, real_t p_b
}
PhysicsServer3D::ShapeType BulletPhysicsServer3D::shape_get_type(RID p_shape) const {
- ShapeBullet *shape = shape_owner.getornull(p_shape);
+ ShapeBullet *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, PhysicsServer3D::SHAPE_CUSTOM);
return shape->get_type();
}
Variant BulletPhysicsServer3D::shape_get_data(RID p_shape) const {
- ShapeBullet *shape = shape_owner.getornull(p_shape);
+ ShapeBullet *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, Variant());
return shape->get_data();
}
void BulletPhysicsServer3D::shape_set_margin(RID p_shape, real_t p_margin) {
- ShapeBullet *shape = shape_owner.getornull(p_shape);
+ ShapeBullet *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
shape->set_margin(p_margin);
}
real_t BulletPhysicsServer3D::shape_get_margin(RID p_shape) const {
- ShapeBullet *shape = shape_owner.getornull(p_shape);
+ ShapeBullet *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, 0.0);
return shape->get_margin();
}
@@ -168,7 +168,7 @@ RID BulletPhysicsServer3D::space_create() {
}
void BulletPhysicsServer3D::space_set_active(RID p_space, bool p_active) {
- SpaceBullet *space = space_owner.getornull(p_space);
+ SpaceBullet *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
if (space_is_active(p_space) == p_active) {
@@ -185,47 +185,47 @@ void BulletPhysicsServer3D::space_set_active(RID p_space, bool p_active) {
}
bool BulletPhysicsServer3D::space_is_active(RID p_space) const {
- SpaceBullet *space = space_owner.getornull(p_space);
+ SpaceBullet *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, false);
return -1 != active_spaces.find(space);
}
void BulletPhysicsServer3D::space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) {
- SpaceBullet *space = space_owner.getornull(p_space);
+ SpaceBullet *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
space->set_param(p_param, p_value);
}
real_t BulletPhysicsServer3D::space_get_param(RID p_space, SpaceParameter p_param) const {
- SpaceBullet *space = space_owner.getornull(p_space);
+ SpaceBullet *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, 0);
return space->get_param(p_param);
}
PhysicsDirectSpaceState3D *BulletPhysicsServer3D::space_get_direct_state(RID p_space) {
- SpaceBullet *space = space_owner.getornull(p_space);
+ SpaceBullet *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, nullptr);
return space->get_direct_state();
}
void BulletPhysicsServer3D::space_set_debug_contacts(RID p_space, int p_max_contacts) {
- SpaceBullet *space = space_owner.getornull(p_space);
+ SpaceBullet *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
space->set_debug_contacts(p_max_contacts);
}
Vector<Vector3> BulletPhysicsServer3D::space_get_contacts(RID p_space) const {
- SpaceBullet *space = space_owner.getornull(p_space);
+ SpaceBullet *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, Vector<Vector3>());
return space->get_debug_contacts();
}
int BulletPhysicsServer3D::space_get_contact_count(RID p_space) const {
- SpaceBullet *space = space_owner.getornull(p_space);
+ SpaceBullet *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, 0);
return space->get_debug_contact_count();
@@ -239,91 +239,91 @@ RID BulletPhysicsServer3D::area_create() {
}
void BulletPhysicsServer3D::area_set_space(RID p_area, RID p_space) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
SpaceBullet *space = nullptr;
if (p_space.is_valid()) {
- space = space_owner.getornull(p_space);
+ space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
}
area->set_space(space);
}
RID BulletPhysicsServer3D::area_get_space(RID p_area) const {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
return area->get_space()->get_self();
}
void BulletPhysicsServer3D::area_set_space_override_mode(RID p_area, AreaSpaceOverrideMode p_mode) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_spOv_mode(p_mode);
}
PhysicsServer3D::AreaSpaceOverrideMode BulletPhysicsServer3D::area_get_space_override_mode(RID p_area) const {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, PhysicsServer3D::AREA_SPACE_OVERRIDE_DISABLED);
return area->get_spOv_mode();
}
void BulletPhysicsServer3D::area_add_shape(RID p_area, RID p_shape, const Transform3D &p_transform, bool p_disabled) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
- ShapeBullet *shape = shape_owner.getornull(p_shape);
+ ShapeBullet *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
area->add_shape(shape, p_transform, p_disabled);
}
void BulletPhysicsServer3D::area_set_shape(RID p_area, int p_shape_idx, RID p_shape) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
- ShapeBullet *shape = shape_owner.getornull(p_shape);
+ ShapeBullet *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
area->set_shape(p_shape_idx, shape);
}
void BulletPhysicsServer3D::area_set_shape_transform(RID p_area, int p_shape_idx, const Transform3D &p_transform) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_shape_transform(p_shape_idx, p_transform);
}
int BulletPhysicsServer3D::area_get_shape_count(RID p_area) const {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, 0);
return area->get_shape_count();
}
RID BulletPhysicsServer3D::area_get_shape(RID p_area, int p_shape_idx) const {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, RID());
return area->get_shape(p_shape_idx)->get_self();
}
Transform3D BulletPhysicsServer3D::area_get_shape_transform(RID p_area, int p_shape_idx) const {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, Transform3D());
return area->get_shape_transform(p_shape_idx);
}
void BulletPhysicsServer3D::area_remove_shape(RID p_area, int p_shape_idx) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
return area->remove_shape_full(p_shape_idx);
}
void BulletPhysicsServer3D::area_clear_shapes(RID p_area) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
for (int i = area->get_shape_count(); 0 < i; --i) {
@@ -332,7 +332,7 @@ void BulletPhysicsServer3D::area_clear_shapes(RID p_area) {
}
void BulletPhysicsServer3D::area_set_shape_disabled(RID p_area, int p_shape_idx, bool p_disabled) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_shape_disabled(p_shape_idx, p_disabled);
@@ -342,7 +342,7 @@ void BulletPhysicsServer3D::area_attach_object_instance_id(RID p_area, ObjectID
if (space_owner.owns(p_area)) {
return;
}
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_instance_id(p_id);
}
@@ -351,19 +351,19 @@ ObjectID BulletPhysicsServer3D::area_get_object_instance_id(RID p_area) const {
if (space_owner.owns(p_area)) {
return ObjectID();
}
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, ObjectID());
return area->get_instance_id();
}
void BulletPhysicsServer3D::area_set_param(RID p_area, AreaParameter p_param, const Variant &p_value) {
if (space_owner.owns(p_area)) {
- SpaceBullet *space = space_owner.getornull(p_area);
+ SpaceBullet *space = space_owner.get_or_null(p_area);
if (space) {
space->set_param(p_param, p_value);
}
} else {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_param(p_param, p_value);
@@ -372,10 +372,10 @@ void BulletPhysicsServer3D::area_set_param(RID p_area, AreaParameter p_param, co
Variant BulletPhysicsServer3D::area_get_param(RID p_area, AreaParameter p_param) const {
if (space_owner.owns(p_area)) {
- SpaceBullet *space = space_owner.getornull(p_area);
+ SpaceBullet *space = space_owner.get_or_null(p_area);
return space->get_param(p_param);
} else {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, Variant());
return area->get_param(p_param);
@@ -383,52 +383,52 @@ Variant BulletPhysicsServer3D::area_get_param(RID p_area, AreaParameter p_param)
}
void BulletPhysicsServer3D::area_set_transform(RID p_area, const Transform3D &p_transform) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_transform(p_transform);
}
Transform3D BulletPhysicsServer3D::area_get_transform(RID p_area) const {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, Transform3D());
return area->get_transform();
}
void BulletPhysicsServer3D::area_set_collision_mask(RID p_area, uint32_t p_mask) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_collision_mask(p_mask);
}
void BulletPhysicsServer3D::area_set_collision_layer(RID p_area, uint32_t p_layer) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_collision_layer(p_layer);
}
void BulletPhysicsServer3D::area_set_monitorable(RID p_area, bool p_monitorable) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_monitorable(p_monitorable);
}
void BulletPhysicsServer3D::area_set_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_event_callback(CollisionObjectBullet::TYPE_RIGID_BODY, p_receiver ? p_receiver->get_instance_id() : ObjectID(), p_method);
}
void BulletPhysicsServer3D::area_set_area_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_event_callback(CollisionObjectBullet::TYPE_AREA, p_receiver ? p_receiver->get_instance_id() : ObjectID(), p_method);
}
void BulletPhysicsServer3D::area_set_ray_pickable(RID p_area, bool p_enable) {
- AreaBullet *area = area_owner.getornull(p_area);
+ AreaBullet *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_ray_pickable(p_enable);
}
@@ -445,12 +445,12 @@ RID BulletPhysicsServer3D::body_create(BodyMode p_mode, bool p_init_sleeping) {
}
void BulletPhysicsServer3D::body_set_space(RID p_body, RID p_space) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
SpaceBullet *space = nullptr;
if (p_space.is_valid()) {
- space = space_owner.getornull(p_space);
+ space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
}
@@ -462,7 +462,7 @@ void BulletPhysicsServer3D::body_set_space(RID p_body, RID p_space) {
}
RID BulletPhysicsServer3D::body_get_space(RID p_body) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, RID());
SpaceBullet *space = body->get_space();
@@ -473,52 +473,52 @@ RID BulletPhysicsServer3D::body_get_space(RID p_body) const {
}
void BulletPhysicsServer3D::body_set_mode(RID p_body, PhysicsServer3D::BodyMode p_mode) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_mode(p_mode);
}
PhysicsServer3D::BodyMode BulletPhysicsServer3D::body_get_mode(RID p_body) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, BODY_MODE_STATIC);
return body->get_mode();
}
void BulletPhysicsServer3D::body_add_shape(RID p_body, RID p_shape, const Transform3D &p_transform, bool p_disabled) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
- ShapeBullet *shape = shape_owner.getornull(p_shape);
+ ShapeBullet *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
body->add_shape(shape, p_transform, p_disabled);
}
void BulletPhysicsServer3D::body_set_shape(RID p_body, int p_shape_idx, RID p_shape) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
- ShapeBullet *shape = shape_owner.getornull(p_shape);
+ ShapeBullet *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
body->set_shape(p_shape_idx, shape);
}
void BulletPhysicsServer3D::body_set_shape_transform(RID p_body, int p_shape_idx, const Transform3D &p_transform) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_shape_transform(p_shape_idx, p_transform);
}
int BulletPhysicsServer3D::body_get_shape_count(RID p_body) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_shape_count();
}
RID BulletPhysicsServer3D::body_get_shape(RID p_body, int p_shape_idx) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, RID());
ShapeBullet *shape = body->get_shape(p_shape_idx);
@@ -528,27 +528,27 @@ RID BulletPhysicsServer3D::body_get_shape(RID p_body, int p_shape_idx) const {
}
Transform3D BulletPhysicsServer3D::body_get_shape_transform(RID p_body, int p_shape_idx) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, Transform3D());
return body->get_shape_transform(p_shape_idx);
}
void BulletPhysicsServer3D::body_set_shape_disabled(RID p_body, int p_shape_idx, bool p_disabled) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_shape_disabled(p_shape_idx, p_disabled);
}
void BulletPhysicsServer3D::body_remove_shape(RID p_body, int p_shape_idx) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->remove_shape_full(p_shape_idx);
}
void BulletPhysicsServer3D::body_clear_shapes(RID p_body) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->remove_all_shapes();
@@ -569,42 +569,42 @@ ObjectID BulletPhysicsServer3D::body_get_object_instance_id(RID p_body) const {
}
void BulletPhysicsServer3D::body_set_enable_continuous_collision_detection(RID p_body, bool p_enable) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_continuous_collision_detection(p_enable);
}
bool BulletPhysicsServer3D::body_is_continuous_collision_detection_enabled(RID p_body) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, false);
return body->is_continuous_collision_detection_enabled();
}
void BulletPhysicsServer3D::body_set_collision_layer(RID p_body, uint32_t p_layer) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_collision_layer(p_layer);
}
uint32_t BulletPhysicsServer3D::body_get_collision_layer(RID p_body) const {
- const RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ const RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_collision_layer();
}
void BulletPhysicsServer3D::body_set_collision_mask(RID p_body, uint32_t p_mask) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_collision_mask(p_mask);
}
uint32_t BulletPhysicsServer3D::body_get_collision_mask(RID p_body) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_collision_mask();
@@ -620,21 +620,21 @@ uint32_t BulletPhysicsServer3D::body_get_user_flags(RID p_body) const {
}
void BulletPhysicsServer3D::body_set_param(RID p_body, BodyParameter p_param, real_t p_value) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_param(p_param, p_value);
}
real_t BulletPhysicsServer3D::body_get_param(RID p_body, BodyParameter p_param) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_param(p_param);
}
void BulletPhysicsServer3D::body_set_kinematic_safe_margin(RID p_body, real_t p_margin) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
if (body->get_kinematic_utilities()) {
@@ -643,7 +643,7 @@ void BulletPhysicsServer3D::body_set_kinematic_safe_margin(RID p_body, real_t p_
}
real_t BulletPhysicsServer3D::body_get_kinematic_safe_margin(RID p_body) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
if (body->get_kinematic_utilities()) {
@@ -654,90 +654,90 @@ real_t BulletPhysicsServer3D::body_get_kinematic_safe_margin(RID p_body) const {
}
void BulletPhysicsServer3D::body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_state(p_state, p_variant);
}
Variant BulletPhysicsServer3D::body_get_state(RID p_body, BodyState p_state) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, Variant());
return body->get_state(p_state);
}
void BulletPhysicsServer3D::body_set_applied_force(RID p_body, const Vector3 &p_force) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_applied_force(p_force);
}
Vector3 BulletPhysicsServer3D::body_get_applied_force(RID p_body) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, Vector3());
return body->get_applied_force();
}
void BulletPhysicsServer3D::body_set_applied_torque(RID p_body, const Vector3 &p_torque) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_applied_torque(p_torque);
}
Vector3 BulletPhysicsServer3D::body_get_applied_torque(RID p_body) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, Vector3());
return body->get_applied_torque();
}
void BulletPhysicsServer3D::body_add_central_force(RID p_body, const Vector3 &p_force) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->apply_central_force(p_force);
}
void BulletPhysicsServer3D::body_add_force(RID p_body, const Vector3 &p_force, const Vector3 &p_position) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->apply_force(p_force, p_position);
}
void BulletPhysicsServer3D::body_add_torque(RID p_body, const Vector3 &p_torque) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->apply_torque(p_torque);
}
void BulletPhysicsServer3D::body_apply_central_impulse(RID p_body, const Vector3 &p_impulse) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->apply_central_impulse(p_impulse);
}
void BulletPhysicsServer3D::body_apply_impulse(RID p_body, const Vector3 &p_impulse, const Vector3 &p_position) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->apply_impulse(p_impulse, p_position);
}
void BulletPhysicsServer3D::body_apply_torque_impulse(RID p_body, const Vector3 &p_impulse) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->apply_torque_impulse(p_impulse);
}
void BulletPhysicsServer3D::body_set_axis_velocity(RID p_body, const Vector3 &p_axis_velocity) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
Vector3 v = body->get_linear_velocity();
@@ -748,39 +748,39 @@ void BulletPhysicsServer3D::body_set_axis_velocity(RID p_body, const Vector3 &p_
}
void BulletPhysicsServer3D::body_set_axis_lock(RID p_body, BodyAxis p_axis, bool p_lock) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_axis_lock(p_axis, p_lock);
}
bool BulletPhysicsServer3D::body_is_axis_locked(RID p_body, BodyAxis p_axis) const {
- const RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ const RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->is_axis_locked(p_axis);
}
void BulletPhysicsServer3D::body_add_collision_exception(RID p_body, RID p_body_b) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
- RigidBodyBullet *other_body = rigid_body_owner.getornull(p_body_b);
+ RigidBodyBullet *other_body = rigid_body_owner.get_or_null(p_body_b);
ERR_FAIL_COND(!other_body);
body->add_collision_exception(other_body);
}
void BulletPhysicsServer3D::body_remove_collision_exception(RID p_body, RID p_body_b) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
- RigidBodyBullet *other_body = rigid_body_owner.getornull(p_body_b);
+ RigidBodyBullet *other_body = rigid_body_owner.get_or_null(p_body_b);
ERR_FAIL_COND(!other_body);
body->remove_collision_exception(other_body);
}
void BulletPhysicsServer3D::body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
for (int i = 0; i < body->get_exceptions().size(); i++) {
p_exceptions->push_back(body->get_exceptions()[i]);
@@ -788,14 +788,14 @@ void BulletPhysicsServer3D::body_get_collision_exceptions(RID p_body, List<RID>
}
void BulletPhysicsServer3D::body_set_max_contacts_reported(RID p_body, int p_contacts) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_max_collisions_detection(p_contacts);
}
int BulletPhysicsServer3D::body_get_max_contacts_reported(RID p_body) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_max_collisions_detection();
@@ -811,39 +811,39 @@ real_t BulletPhysicsServer3D::body_get_contacts_reported_depth_threshold(RID p_b
}
void BulletPhysicsServer3D::body_set_omit_force_integration(RID p_body, bool p_omit) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_omit_forces_integration(p_omit);
}
bool BulletPhysicsServer3D::body_is_omitting_force_integration(RID p_body) const {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, false);
return body->get_omit_forces_integration();
}
void BulletPhysicsServer3D::body_set_force_integration_callback(RID p_body, const Callable &p_callable, const Variant &p_udata) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_force_integration_callback(p_callable, p_udata);
}
void BulletPhysicsServer3D::body_set_ray_pickable(RID p_body, bool p_enable) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_ray_pickable(p_enable);
}
PhysicsDirectBodyState3D *BulletPhysicsServer3D::body_get_direct_state(RID p_body) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, nullptr);
return BulletPhysicsDirectBodyState3D::get_singleton(body);
}
bool BulletPhysicsServer3D::body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, bool p_infinite_inertia, MotionResult *r_result, bool p_exclude_raycast_shapes, const Set<RID> &p_exclude) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, false);
ERR_FAIL_COND_V(!body->get_space(), false);
@@ -851,7 +851,7 @@ bool BulletPhysicsServer3D::body_test_motion(RID p_body, const Transform3D &p_fr
}
int BulletPhysicsServer3D::body_test_ray_separation(RID p_body, const Transform3D &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, real_t p_margin) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
ERR_FAIL_COND_V(!body->get_space(), 0);
@@ -869,19 +869,19 @@ RID BulletPhysicsServer3D::soft_body_create(bool p_init_sleeping) {
}
void BulletPhysicsServer3D::soft_body_update_rendering_server(RID p_body, RenderingServerHandler *p_rendering_server_handler) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->update_rendering_server(p_rendering_server_handler);
}
void BulletPhysicsServer3D::soft_body_set_space(RID p_body, RID p_space) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
SpaceBullet *space = nullptr;
if (p_space.is_valid()) {
- space = space_owner.getornull(p_space);
+ space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
}
@@ -893,7 +893,7 @@ void BulletPhysicsServer3D::soft_body_set_space(RID p_body, RID p_space) {
}
RID BulletPhysicsServer3D::soft_body_get_space(RID p_body) const {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, RID());
SpaceBullet *space = body->get_space();
@@ -904,7 +904,7 @@ RID BulletPhysicsServer3D::soft_body_get_space(RID p_body) const {
}
void BulletPhysicsServer3D::soft_body_set_mesh(RID p_body, const REF &p_mesh) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_soft_mesh(p_mesh);
@@ -918,40 +918,40 @@ AABB BulletPhysicsServer::soft_body_get_bounds(RID p_body) const {
}
void BulletPhysicsServer3D::soft_body_set_collision_layer(RID p_body, uint32_t p_layer) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_collision_layer(p_layer);
}
uint32_t BulletPhysicsServer3D::soft_body_get_collision_layer(RID p_body) const {
- const SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ const SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_collision_layer();
}
void BulletPhysicsServer3D::soft_body_set_collision_mask(RID p_body, uint32_t p_mask) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_collision_mask(p_mask);
}
uint32_t BulletPhysicsServer3D::soft_body_get_collision_mask(RID p_body) const {
- const SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ const SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_collision_mask();
}
void BulletPhysicsServer3D::soft_body_add_collision_exception(RID p_body, RID p_body_b) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
- CollisionObjectBullet *other_body = rigid_body_owner.getornull(p_body_b);
+ CollisionObjectBullet *other_body = rigid_body_owner.get_or_null(p_body_b);
if (!other_body) {
- other_body = soft_body_owner.getornull(p_body_b);
+ other_body = soft_body_owner.get_or_null(p_body_b);
}
ERR_FAIL_COND(!other_body);
@@ -959,12 +959,12 @@ void BulletPhysicsServer3D::soft_body_add_collision_exception(RID p_body, RID p_
}
void BulletPhysicsServer3D::soft_body_remove_collision_exception(RID p_body, RID p_body_b) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
- CollisionObjectBullet *other_body = rigid_body_owner.getornull(p_body_b);
+ CollisionObjectBullet *other_body = rigid_body_owner.get_or_null(p_body_b);
if (!other_body) {
- other_body = soft_body_owner.getornull(p_body_b);
+ other_body = soft_body_owner.get_or_null(p_body_b);
}
ERR_FAIL_COND(!other_body);
@@ -972,7 +972,7 @@ void BulletPhysicsServer3D::soft_body_remove_collision_exception(RID p_body, RID
}
void BulletPhysicsServer3D::soft_body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
for (int i = 0; i < body->get_exceptions().size(); i++) {
p_exceptions->push_back(body->get_exceptions()[i]);
@@ -991,98 +991,98 @@ Variant BulletPhysicsServer3D::soft_body_get_state(RID p_body, BodyState p_state
}
void BulletPhysicsServer3D::soft_body_set_transform(RID p_body, const Transform3D &p_transform) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_soft_transform(p_transform);
}
void BulletPhysicsServer3D::soft_body_set_ray_pickable(RID p_body, bool p_enable) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_ray_pickable(p_enable);
}
void BulletPhysicsServer3D::soft_body_set_simulation_precision(RID p_body, int p_simulation_precision) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_simulation_precision(p_simulation_precision);
}
int BulletPhysicsServer3D::soft_body_get_simulation_precision(RID p_body) const {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0.f);
return body->get_simulation_precision();
}
void BulletPhysicsServer3D::soft_body_set_total_mass(RID p_body, real_t p_total_mass) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_total_mass(p_total_mass);
}
real_t BulletPhysicsServer3D::soft_body_get_total_mass(RID p_body) const {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0.f);
return body->get_total_mass();
}
void BulletPhysicsServer3D::soft_body_set_linear_stiffness(RID p_body, real_t p_stiffness) const {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_linear_stiffness(p_stiffness);
}
real_t BulletPhysicsServer3D::soft_body_get_linear_stiffness(RID p_body) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0.f);
return body->get_linear_stiffness();
}
void BulletPhysicsServer3D::soft_body_set_pressure_coefficient(RID p_body, real_t p_pressure_coefficient) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_pressure_coefficient(p_pressure_coefficient);
}
real_t BulletPhysicsServer3D::soft_body_get_pressure_coefficient(RID p_body) const {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0.f);
return body->get_pressure_coefficient();
}
void BulletPhysicsServer3D::soft_body_set_damping_coefficient(RID p_body, real_t p_damping_coefficient) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_damping_coefficient(p_damping_coefficient);
}
real_t BulletPhysicsServer3D::soft_body_get_damping_coefficient(RID p_body) const {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0.f);
return body->get_damping_coefficient();
}
void BulletPhysicsServer3D::soft_body_set_drag_coefficient(RID p_body, real_t p_drag_coefficient) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_drag_coefficient(p_drag_coefficient);
}
real_t BulletPhysicsServer3D::soft_body_get_drag_coefficient(RID p_body) const {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0.f);
return body->get_drag_coefficient();
}
void BulletPhysicsServer3D::soft_body_move_point(RID p_body, int p_point_index, const Vector3 &p_global_position) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_node_position(p_point_index, p_global_position);
}
Vector3 BulletPhysicsServer3D::soft_body_get_point_global_position(RID p_body, int p_point_index) const {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, Vector3(0., 0., 0.));
Vector3 pos;
body->get_node_position(p_point_index, pos);
@@ -1090,25 +1090,25 @@ Vector3 BulletPhysicsServer3D::soft_body_get_point_global_position(RID p_body, i
}
void BulletPhysicsServer3D::soft_body_remove_all_pinned_points(RID p_body) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->reset_all_node_mass();
}
void BulletPhysicsServer3D::soft_body_pin_point(RID p_body, int p_point_index, bool p_pin) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_node_mass(p_point_index, p_pin ? 0 : 1);
}
bool BulletPhysicsServer3D::soft_body_is_point_pinned(RID p_body, int p_point_index) const {
- SoftBodyBullet *body = soft_body_owner.getornull(p_body);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0.f);
return body->get_node_mass(p_point_index);
}
PhysicsServer3D::JointType BulletPhysicsServer3D::joint_get_type(RID p_joint) const {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, JOINT_PIN);
return joint->get_type();
}
@@ -1123,28 +1123,28 @@ int BulletPhysicsServer3D::joint_get_solver_priority(RID p_joint) const {
}
void BulletPhysicsServer3D::joint_disable_collisions_between_bodies(RID p_joint, const bool p_disable) {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
joint->disable_collisions_between_bodies(p_disable);
}
bool BulletPhysicsServer3D::joint_is_disabled_collisions_between_bodies(RID p_joint) const {
- JointBullet *joint(joint_owner.getornull(p_joint));
+ JointBullet *joint(joint_owner.get_or_null(p_joint));
ERR_FAIL_COND_V(!joint, false);
return joint->is_disabled_collisions_between_bodies();
}
RID BulletPhysicsServer3D::joint_create_pin(RID p_body_A, const Vector3 &p_local_A, RID p_body_B, const Vector3 &p_local_B) {
- RigidBodyBullet *body_A = rigid_body_owner.getornull(p_body_A);
+ RigidBodyBullet *body_A = rigid_body_owner.get_or_null(p_body_A);
ERR_FAIL_COND_V(!body_A, RID());
JointAssertSpace(body_A, "A", RID());
RigidBodyBullet *body_B = nullptr;
if (p_body_B.is_valid()) {
- body_B = rigid_body_owner.getornull(p_body_B);
+ body_B = rigid_body_owner.get_or_null(p_body_B);
JointAssertSpace(body_B, "B", RID());
JointAssertSameSpace(body_A, body_B, RID());
}
@@ -1158,7 +1158,7 @@ RID BulletPhysicsServer3D::joint_create_pin(RID p_body_A, const Vector3 &p_local
}
void BulletPhysicsServer3D::pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value) {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_PIN);
PinJointBullet *pin_joint = static_cast<PinJointBullet *>(joint);
@@ -1166,7 +1166,7 @@ void BulletPhysicsServer3D::pin_joint_set_param(RID p_joint, PinJointParam p_par
}
real_t BulletPhysicsServer3D::pin_joint_get_param(RID p_joint, PinJointParam p_param) const {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, 0);
ERR_FAIL_COND_V(joint->get_type() != JOINT_PIN, 0);
PinJointBullet *pin_joint = static_cast<PinJointBullet *>(joint);
@@ -1174,7 +1174,7 @@ real_t BulletPhysicsServer3D::pin_joint_get_param(RID p_joint, PinJointParam p_p
}
void BulletPhysicsServer3D::pin_joint_set_local_a(RID p_joint, const Vector3 &p_A) {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_PIN);
PinJointBullet *pin_joint = static_cast<PinJointBullet *>(joint);
@@ -1182,7 +1182,7 @@ void BulletPhysicsServer3D::pin_joint_set_local_a(RID p_joint, const Vector3 &p_
}
Vector3 BulletPhysicsServer3D::pin_joint_get_local_a(RID p_joint) const {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, Vector3());
ERR_FAIL_COND_V(joint->get_type() != JOINT_PIN, Vector3());
PinJointBullet *pin_joint = static_cast<PinJointBullet *>(joint);
@@ -1190,7 +1190,7 @@ Vector3 BulletPhysicsServer3D::pin_joint_get_local_a(RID p_joint) const {
}
void BulletPhysicsServer3D::pin_joint_set_local_b(RID p_joint, const Vector3 &p_B) {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_PIN);
PinJointBullet *pin_joint = static_cast<PinJointBullet *>(joint);
@@ -1198,7 +1198,7 @@ void BulletPhysicsServer3D::pin_joint_set_local_b(RID p_joint, const Vector3 &p_
}
Vector3 BulletPhysicsServer3D::pin_joint_get_local_b(RID p_joint) const {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, Vector3());
ERR_FAIL_COND_V(joint->get_type() != JOINT_PIN, Vector3());
PinJointBullet *pin_joint = static_cast<PinJointBullet *>(joint);
@@ -1206,13 +1206,13 @@ Vector3 BulletPhysicsServer3D::pin_joint_get_local_b(RID p_joint) const {
}
RID BulletPhysicsServer3D::joint_create_hinge(RID p_body_A, const Transform3D &p_hinge_A, RID p_body_B, const Transform3D &p_hinge_B) {
- RigidBodyBullet *body_A = rigid_body_owner.getornull(p_body_A);
+ RigidBodyBullet *body_A = rigid_body_owner.get_or_null(p_body_A);
ERR_FAIL_COND_V(!body_A, RID());
JointAssertSpace(body_A, "A", RID());
RigidBodyBullet *body_B = nullptr;
if (p_body_B.is_valid()) {
- body_B = rigid_body_owner.getornull(p_body_B);
+ body_B = rigid_body_owner.get_or_null(p_body_B);
JointAssertSpace(body_B, "B", RID());
JointAssertSameSpace(body_A, body_B, RID());
}
@@ -1226,13 +1226,13 @@ RID BulletPhysicsServer3D::joint_create_hinge(RID p_body_A, const Transform3D &p
}
RID BulletPhysicsServer3D::joint_create_hinge_simple(RID p_body_A, const Vector3 &p_pivot_A, const Vector3 &p_axis_A, RID p_body_B, const Vector3 &p_pivot_B, const Vector3 &p_axis_B) {
- RigidBodyBullet *body_A = rigid_body_owner.getornull(p_body_A);
+ RigidBodyBullet *body_A = rigid_body_owner.get_or_null(p_body_A);
ERR_FAIL_COND_V(!body_A, RID());
JointAssertSpace(body_A, "A", RID());
RigidBodyBullet *body_B = nullptr;
if (p_body_B.is_valid()) {
- body_B = rigid_body_owner.getornull(p_body_B);
+ body_B = rigid_body_owner.get_or_null(p_body_B);
JointAssertSpace(body_B, "B", RID());
JointAssertSameSpace(body_A, body_B, RID());
}
@@ -1246,7 +1246,7 @@ RID BulletPhysicsServer3D::joint_create_hinge_simple(RID p_body_A, const Vector3
}
void BulletPhysicsServer3D::hinge_joint_set_param(RID p_joint, HingeJointParam p_param, real_t p_value) {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_HINGE);
HingeJointBullet *hinge_joint = static_cast<HingeJointBullet *>(joint);
@@ -1254,7 +1254,7 @@ void BulletPhysicsServer3D::hinge_joint_set_param(RID p_joint, HingeJointParam p
}
real_t BulletPhysicsServer3D::hinge_joint_get_param(RID p_joint, HingeJointParam p_param) const {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, 0);
ERR_FAIL_COND_V(joint->get_type() != JOINT_HINGE, 0);
HingeJointBullet *hinge_joint = static_cast<HingeJointBullet *>(joint);
@@ -1262,7 +1262,7 @@ real_t BulletPhysicsServer3D::hinge_joint_get_param(RID p_joint, HingeJointParam
}
void BulletPhysicsServer3D::hinge_joint_set_flag(RID p_joint, HingeJointFlag p_flag, bool p_value) {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_HINGE);
HingeJointBullet *hinge_joint = static_cast<HingeJointBullet *>(joint);
@@ -1270,7 +1270,7 @@ void BulletPhysicsServer3D::hinge_joint_set_flag(RID p_joint, HingeJointFlag p_f
}
bool BulletPhysicsServer3D::hinge_joint_get_flag(RID p_joint, HingeJointFlag p_flag) const {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, false);
ERR_FAIL_COND_V(joint->get_type() != JOINT_HINGE, false);
HingeJointBullet *hinge_joint = static_cast<HingeJointBullet *>(joint);
@@ -1278,13 +1278,13 @@ bool BulletPhysicsServer3D::hinge_joint_get_flag(RID p_joint, HingeJointFlag p_f
}
RID BulletPhysicsServer3D::joint_create_slider(RID p_body_A, const Transform3D &p_local_frame_A, RID p_body_B, const Transform3D &p_local_frame_B) {
- RigidBodyBullet *body_A = rigid_body_owner.getornull(p_body_A);
+ RigidBodyBullet *body_A = rigid_body_owner.get_or_null(p_body_A);
ERR_FAIL_COND_V(!body_A, RID());
JointAssertSpace(body_A, "A", RID());
RigidBodyBullet *body_B = nullptr;
if (p_body_B.is_valid()) {
- body_B = rigid_body_owner.getornull(p_body_B);
+ body_B = rigid_body_owner.get_or_null(p_body_B);
JointAssertSpace(body_B, "B", RID());
JointAssertSameSpace(body_A, body_B, RID());
}
@@ -1298,7 +1298,7 @@ RID BulletPhysicsServer3D::joint_create_slider(RID p_body_A, const Transform3D &
}
void BulletPhysicsServer3D::slider_joint_set_param(RID p_joint, SliderJointParam p_param, real_t p_value) {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_SLIDER);
SliderJointBullet *slider_joint = static_cast<SliderJointBullet *>(joint);
@@ -1306,7 +1306,7 @@ void BulletPhysicsServer3D::slider_joint_set_param(RID p_joint, SliderJointParam
}
real_t BulletPhysicsServer3D::slider_joint_get_param(RID p_joint, SliderJointParam p_param) const {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, 0);
ERR_FAIL_COND_V(joint->get_type() != JOINT_SLIDER, 0);
SliderJointBullet *slider_joint = static_cast<SliderJointBullet *>(joint);
@@ -1314,13 +1314,13 @@ real_t BulletPhysicsServer3D::slider_joint_get_param(RID p_joint, SliderJointPar
}
RID BulletPhysicsServer3D::joint_create_cone_twist(RID p_body_A, const Transform3D &p_local_frame_A, RID p_body_B, const Transform3D &p_local_frame_B) {
- RigidBodyBullet *body_A = rigid_body_owner.getornull(p_body_A);
+ RigidBodyBullet *body_A = rigid_body_owner.get_or_null(p_body_A);
ERR_FAIL_COND_V(!body_A, RID());
JointAssertSpace(body_A, "A", RID());
RigidBodyBullet *body_B = nullptr;
if (p_body_B.is_valid()) {
- body_B = rigid_body_owner.getornull(p_body_B);
+ body_B = rigid_body_owner.get_or_null(p_body_B);
JointAssertSpace(body_B, "B", RID());
JointAssertSameSpace(body_A, body_B, RID());
}
@@ -1332,7 +1332,7 @@ RID BulletPhysicsServer3D::joint_create_cone_twist(RID p_body_A, const Transform
}
void BulletPhysicsServer3D::cone_twist_joint_set_param(RID p_joint, ConeTwistJointParam p_param, real_t p_value) {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_CONE_TWIST);
ConeTwistJointBullet *coneTwist_joint = static_cast<ConeTwistJointBullet *>(joint);
@@ -1340,7 +1340,7 @@ void BulletPhysicsServer3D::cone_twist_joint_set_param(RID p_joint, ConeTwistJoi
}
real_t BulletPhysicsServer3D::cone_twist_joint_get_param(RID p_joint, ConeTwistJointParam p_param) const {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, 0.);
ERR_FAIL_COND_V(joint->get_type() != JOINT_CONE_TWIST, 0.);
ConeTwistJointBullet *coneTwist_joint = static_cast<ConeTwistJointBullet *>(joint);
@@ -1348,13 +1348,13 @@ real_t BulletPhysicsServer3D::cone_twist_joint_get_param(RID p_joint, ConeTwistJ
}
RID BulletPhysicsServer3D::joint_create_generic_6dof(RID p_body_A, const Transform3D &p_local_frame_A, RID p_body_B, const Transform3D &p_local_frame_B) {
- RigidBodyBullet *body_A = rigid_body_owner.getornull(p_body_A);
+ RigidBodyBullet *body_A = rigid_body_owner.get_or_null(p_body_A);
ERR_FAIL_COND_V(!body_A, RID());
JointAssertSpace(body_A, "A", RID());
RigidBodyBullet *body_B = nullptr;
if (p_body_B.is_valid()) {
- body_B = rigid_body_owner.getornull(p_body_B);
+ body_B = rigid_body_owner.get_or_null(p_body_B);
JointAssertSpace(body_B, "B", RID());
JointAssertSameSpace(body_A, body_B, RID());
}
@@ -1368,7 +1368,7 @@ RID BulletPhysicsServer3D::joint_create_generic_6dof(RID p_body_A, const Transfo
}
void BulletPhysicsServer3D::generic_6dof_joint_set_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param, real_t p_value) {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_6DOF);
Generic6DOFJointBullet *generic_6dof_joint = static_cast<Generic6DOFJointBullet *>(joint);
@@ -1376,7 +1376,7 @@ void BulletPhysicsServer3D::generic_6dof_joint_set_param(RID p_joint, Vector3::A
}
real_t BulletPhysicsServer3D::generic_6dof_joint_get_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param) {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, 0);
ERR_FAIL_COND_V(joint->get_type() != JOINT_6DOF, 0);
Generic6DOFJointBullet *generic_6dof_joint = static_cast<Generic6DOFJointBullet *>(joint);
@@ -1384,7 +1384,7 @@ real_t BulletPhysicsServer3D::generic_6dof_joint_get_param(RID p_joint, Vector3:
}
void BulletPhysicsServer3D::generic_6dof_joint_set_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag, bool p_enable) {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_6DOF);
Generic6DOFJointBullet *generic_6dof_joint = static_cast<Generic6DOFJointBullet *>(joint);
@@ -1392,7 +1392,7 @@ void BulletPhysicsServer3D::generic_6dof_joint_set_flag(RID p_joint, Vector3::Ax
}
bool BulletPhysicsServer3D::generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag) {
- JointBullet *joint = joint_owner.getornull(p_joint);
+ JointBullet *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, false);
ERR_FAIL_COND_V(joint->get_type() != JOINT_6DOF, false);
Generic6DOFJointBullet *generic_6dof_joint = static_cast<Generic6DOFJointBullet *>(joint);
@@ -1401,7 +1401,7 @@ bool BulletPhysicsServer3D::generic_6dof_joint_get_flag(RID p_joint, Vector3::Ax
void BulletPhysicsServer3D::free(RID p_rid) {
if (shape_owner.owns(p_rid)) {
- ShapeBullet *shape = shape_owner.getornull(p_rid);
+ ShapeBullet *shape = shape_owner.get_or_null(p_rid);
// Notify the shape is configured
for (Map<ShapeOwnerBullet *, int>::Element *element = shape->get_owners().front(); element; element = element->next()) {
@@ -1411,7 +1411,7 @@ void BulletPhysicsServer3D::free(RID p_rid) {
shape_owner.free(p_rid);
bulletdelete(shape);
} else if (rigid_body_owner.owns(p_rid)) {
- RigidBodyBullet *body = rigid_body_owner.getornull(p_rid);
+ RigidBodyBullet *body = rigid_body_owner.get_or_null(p_rid);
body->set_space(nullptr);
@@ -1421,7 +1421,7 @@ void BulletPhysicsServer3D::free(RID p_rid) {
bulletdelete(body);
} else if (soft_body_owner.owns(p_rid)) {
- SoftBodyBullet *body = soft_body_owner.getornull(p_rid);
+ SoftBodyBullet *body = soft_body_owner.get_or_null(p_rid);
body->set_space(nullptr);
@@ -1429,7 +1429,7 @@ void BulletPhysicsServer3D::free(RID p_rid) {
bulletdelete(body);
} else if (area_owner.owns(p_rid)) {
- AreaBullet *area = area_owner.getornull(p_rid);
+ AreaBullet *area = area_owner.get_or_null(p_rid);
area->set_space(nullptr);
@@ -1439,13 +1439,13 @@ void BulletPhysicsServer3D::free(RID p_rid) {
bulletdelete(area);
} else if (joint_owner.owns(p_rid)) {
- JointBullet *joint = joint_owner.getornull(p_rid);
+ JointBullet *joint = joint_owner.get_or_null(p_rid);
joint->destroy_internal_constraint();
joint_owner.free(p_rid);
bulletdelete(joint);
} else if (space_owner.owns(p_rid)) {
- SpaceBullet *space = space_owner.getornull(p_rid);
+ SpaceBullet *space = space_owner.get_or_null(p_rid);
space->remove_all_collision_objects();
@@ -1493,38 +1493,38 @@ int BulletPhysicsServer3D::get_process_info(ProcessInfo p_info) {
SpaceBullet *BulletPhysicsServer3D::get_space(RID p_rid) const {
ERR_FAIL_COND_V_MSG(space_owner.owns(p_rid) == false, nullptr, "The RID is not valid.");
- return space_owner.getornull(p_rid);
+ return space_owner.get_or_null(p_rid);
}
ShapeBullet *BulletPhysicsServer3D::get_shape(RID p_rid) const {
ERR_FAIL_COND_V_MSG(shape_owner.owns(p_rid) == false, nullptr, "The RID is not valid.");
- return shape_owner.getornull(p_rid);
+ return shape_owner.get_or_null(p_rid);
}
CollisionObjectBullet *BulletPhysicsServer3D::get_collision_object(RID p_object) const {
if (rigid_body_owner.owns(p_object)) {
- return rigid_body_owner.getornull(p_object);
+ return rigid_body_owner.get_or_null(p_object);
}
if (area_owner.owns(p_object)) {
- return area_owner.getornull(p_object);
+ return area_owner.get_or_null(p_object);
}
if (soft_body_owner.owns(p_object)) {
- return soft_body_owner.getornull(p_object);
+ return soft_body_owner.get_or_null(p_object);
}
ERR_FAIL_V_MSG(nullptr, "The RID is no valid.");
}
RigidCollisionObjectBullet *BulletPhysicsServer3D::get_rigid_collision_object(RID p_object) const {
if (rigid_body_owner.owns(p_object)) {
- return rigid_body_owner.getornull(p_object);
+ return rigid_body_owner.get_or_null(p_object);
}
if (area_owner.owns(p_object)) {
- return area_owner.getornull(p_object);
+ return area_owner.get_or_null(p_object);
}
ERR_FAIL_V_MSG(nullptr, "The RID is no valid.");
}
JointBullet *BulletPhysicsServer3D::get_joint(RID p_rid) const {
ERR_FAIL_COND_V_MSG(joint_owner.owns(p_rid) == false, nullptr, "The RID is not valid.");
- return joint_owner.getornull(p_rid);
+ return joint_owner.get_or_null(p_rid);
}
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index 0d2cd1f5a0..7b20fad28c 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -303,6 +303,7 @@ RigidBodyBullet::~RigidBodyBullet() {
void RigidBodyBullet::init_kinematic_utilities() {
kinematic_utilities = memnew(KinematicUtilities(this));
+ reload_kinematic_shapes();
}
void RigidBodyBullet::destroy_kinematic_utilities() {
@@ -529,26 +530,23 @@ void RigidBodyBullet::set_mode(PhysicsServer3D::BodyMode p_mode) {
can_integrate_forces = false;
destroy_kinematic_utilities();
// The mode change is relevant to its mass
+ mode = p_mode;
switch (p_mode) {
case PhysicsServer3D::BODY_MODE_KINEMATIC:
- mode = PhysicsServer3D::BODY_MODE_KINEMATIC;
reload_axis_lock();
_internal_set_mass(0);
init_kinematic_utilities();
break;
case PhysicsServer3D::BODY_MODE_STATIC:
- mode = PhysicsServer3D::BODY_MODE_STATIC;
reload_axis_lock();
_internal_set_mass(0);
break;
case PhysicsServer3D::BODY_MODE_DYNAMIC:
- mode = PhysicsServer3D::BODY_MODE_DYNAMIC;
reload_axis_lock();
_internal_set_mass(0 == mass ? 1 : mass);
scratch_space_override_modificator();
break;
- case PhysicsServer3D::MODE_DYNAMIC_LOCKED:
- mode = PhysicsServer3D::MODE_DYNAMIC_LOCKED;
+ case PhysicsServer3D::MODE_DYNAMIC_LINEAR:
reload_axis_lock();
_internal_set_mass(0 == mass ? 1 : mass);
scratch_space_override_modificator();
@@ -721,7 +719,7 @@ bool RigidBodyBullet::is_axis_locked(PhysicsServer3D::BodyAxis p_axis) const {
void RigidBodyBullet::reload_axis_lock() {
btBody->setLinearFactor(btVector3(btScalar(!is_axis_locked(PhysicsServer3D::BODY_AXIS_LINEAR_X)), btScalar(!is_axis_locked(PhysicsServer3D::BODY_AXIS_LINEAR_Y)), btScalar(!is_axis_locked(PhysicsServer3D::BODY_AXIS_LINEAR_Z))));
- if (PhysicsServer3D::MODE_DYNAMIC_LOCKED == mode) {
+ if (PhysicsServer3D::MODE_DYNAMIC_LINEAR == mode) {
/// When character angular is always locked
btBody->setAngularFactor(btVector3(0., 0., 0.));
} else {
@@ -1016,7 +1014,7 @@ void RigidBodyBullet::_internal_set_mass(real_t p_mass) {
// Rigidbody is dynamic if and only if mass is non Zero, otherwise static
const bool isDynamic = p_mass != 0.f;
if (isDynamic) {
- if (PhysicsServer3D::BODY_MODE_DYNAMIC != mode && PhysicsServer3D::MODE_DYNAMIC_LOCKED != mode) {
+ if (PhysicsServer3D::BODY_MODE_DYNAMIC != mode && PhysicsServer3D::MODE_DYNAMIC_LINEAR != mode) {
return;
}
diff --git a/modules/bullet/rigid_body_bullet.h b/modules/bullet/rigid_body_bullet.h
index 5e102d8b05..01ac1e4836 100644
--- a/modules/bullet/rigid_body_bullet.h
+++ b/modules/bullet/rigid_body_bullet.h
@@ -301,7 +301,7 @@ public:
void reload_axis_lock();
/// Doc:
- /// https://web.archive.org/web/20180404091446/http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Anti_tunneling_by_Motion_Clamping
+ /// https://web.archive.org/web/20180404091446/https://www.bulletphysics.org/mediawiki-1.5.8/index.php/Anti_tunneling_by_Motion_Clamping
void set_continuous_collision_detection(bool p_enable);
bool is_continuous_collision_detection_enabled() const;
diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp
index 40e785d699..88ffb9ec67 100644
--- a/modules/bullet/shape_bullet.cpp
+++ b/modules/bullet/shape_bullet.cpp
@@ -110,7 +110,7 @@ btEmptyShape *ShapeBullet::create_shape_empty() {
return bulletnew(btEmptyShape);
}
-btStaticPlaneShape *ShapeBullet::create_shape_plane(const btVector3 &planeNormal, btScalar planeConstant) {
+btStaticPlaneShape *ShapeBullet::create_shape_world_boundary(const btVector3 &planeNormal, btScalar planeConstant) {
return bulletnew(btStaticPlaneShape(planeNormal, planeConstant));
}
@@ -164,32 +164,32 @@ btRayShape *ShapeBullet::create_shape_ray(real_t p_length, bool p_slips_on_slope
return r;
}
-/* PLANE */
+/* World boundary */
-PlaneShapeBullet::PlaneShapeBullet() :
+WorldBoundaryShapeBullet::WorldBoundaryShapeBullet() :
ShapeBullet() {}
-void PlaneShapeBullet::set_data(const Variant &p_data) {
+void WorldBoundaryShapeBullet::set_data(const Variant &p_data) {
setup(p_data);
}
-Variant PlaneShapeBullet::get_data() const {
+Variant WorldBoundaryShapeBullet::get_data() const {
return plane;
}
-PhysicsServer3D::ShapeType PlaneShapeBullet::get_type() const {
- return PhysicsServer3D::SHAPE_PLANE;
+PhysicsServer3D::ShapeType WorldBoundaryShapeBullet::get_type() const {
+ return PhysicsServer3D::SHAPE_WORLD_BOUNDARY;
}
-void PlaneShapeBullet::setup(const Plane &p_plane) {
+void WorldBoundaryShapeBullet::setup(const Plane &p_plane) {
plane = p_plane;
notifyShapeChanged();
}
-btCollisionShape *PlaneShapeBullet::create_bt_shape(const btVector3 &p_implicit_scale, real_t p_extra_edge) {
+btCollisionShape *WorldBoundaryShapeBullet::create_bt_shape(const btVector3 &p_implicit_scale, real_t p_extra_edge) {
btVector3 btPlaneNormal;
G_TO_B(plane.normal, btPlaneNormal);
- return prepare(PlaneShapeBullet::create_shape_plane(btPlaneNormal, plane.d));
+ return prepare(WorldBoundaryShapeBullet::create_shape_world_boundary(btPlaneNormal, plane.d));
}
/* Sphere */
diff --git a/modules/bullet/shape_bullet.h b/modules/bullet/shape_bullet.h
index 5080d13d99..0822399b5e 100644
--- a/modules/bullet/shape_bullet.h
+++ b/modules/bullet/shape_bullet.h
@@ -81,7 +81,7 @@ public:
public:
static class btEmptyShape *create_shape_empty();
- static class btStaticPlaneShape *create_shape_plane(const btVector3 &planeNormal, btScalar planeConstant);
+ static class btStaticPlaneShape *create_shape_world_boundary(const btVector3 &planeNormal, btScalar planeConstant);
static class btSphereShape *create_shape_sphere(btScalar radius);
static class btBoxShape *create_shape_box(const btVector3 &boxHalfExtents);
static class btCapsuleShape *create_shape_capsule(btScalar radius, btScalar height);
@@ -93,11 +93,11 @@ public:
static class btRayShape *create_shape_ray(real_t p_length, bool p_slips_on_slope);
};
-class PlaneShapeBullet : public ShapeBullet {
+class WorldBoundaryShapeBullet : public ShapeBullet {
Plane plane;
public:
- PlaneShapeBullet();
+ WorldBoundaryShapeBullet();
virtual void set_data(const Variant &p_data);
virtual Variant get_data() const;
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index c6d835742d..66d7370bd7 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -122,7 +122,7 @@ int BulletPhysicsDirectSpaceState::intersect_shape(const RID &p_shape, const Tra
return 0;
}
- ShapeBullet *shape = space->get_physics_server()->get_shape_owner()->getornull(p_shape);
+ ShapeBullet *shape = space->get_physics_server()->get_shape_owner()->get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, 0);
btCollisionShape *btShape = shape->create_bt_shape(p_xform.basis.get_scale_abs(), p_margin);
@@ -158,7 +158,7 @@ bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transf
btVector3 bt_motion;
G_TO_B(p_motion, bt_motion);
- ShapeBullet *shape = space->get_physics_server()->get_shape_owner()->getornull(p_shape);
+ ShapeBullet *shape = space->get_physics_server()->get_shape_owner()->get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, false);
btCollisionShape *btShape = shape->create_bt_shape(p_xform.basis.get_scale(), p_margin);
@@ -219,7 +219,7 @@ bool BulletPhysicsDirectSpaceState::collide_shape(RID p_shape, const Transform3D
return false;
}
- ShapeBullet *shape = space->get_physics_server()->get_shape_owner()->getornull(p_shape);
+ ShapeBullet *shape = space->get_physics_server()->get_shape_owner()->get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, false);
btCollisionShape *btShape = shape->create_bt_shape(p_shape_xform.basis.get_scale_abs(), p_margin);
@@ -251,7 +251,7 @@ bool BulletPhysicsDirectSpaceState::collide_shape(RID p_shape, const Transform3D
}
bool BulletPhysicsDirectSpaceState::rest_info(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
- ShapeBullet *shape = space->get_physics_server()->get_shape_owner()->getornull(p_shape);
+ ShapeBullet *shape = space->get_physics_server()->get_shape_owner()->get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, false);
btCollisionShape *btShape = shape->create_bt_shape(p_shape_xform.basis.get_scale_abs(), p_margin);
@@ -945,6 +945,10 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform3D &p
G_TO_B(p_from, body_transform);
UNSCALE_BT_BASIS(body_transform);
+ if (!p_body->get_kinematic_utilities()) {
+ p_body->init_kinematic_utilities();
+ }
+
btVector3 initial_recover_motion(0, 0, 0);
{ /// Phase one - multi shapes depenetration using margin
for (int t(RECOVERING_MOVEMENT_CYCLES); 0 < t; --t) {
@@ -958,6 +962,9 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform3D &p
btVector3 motion;
G_TO_B(p_motion, motion);
+ real_t total_length = motion.length();
+ real_t unsafe_fraction = 1.0;
+ real_t safe_fraction = 1.0;
{
// Phase two - sweep test, from a secure position without margin
@@ -1007,6 +1014,15 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform3D &p
dynamicsWorld->convexSweepTest(convex_shape_test, shape_world_from, shape_world_to, btResult, dynamicsWorld->getDispatchInfo().m_allowedCcdPenetration);
if (btResult.hasHit()) {
+ if (total_length > CMP_EPSILON) {
+ real_t hit_fraction = btResult.m_closestHitFraction * motion.length() / total_length;
+ if (hit_fraction < unsafe_fraction) {
+ unsafe_fraction = hit_fraction;
+ real_t margin = p_body->get_kinematic_utilities()->safe_margin;
+ safe_fraction = MAX(hit_fraction - (1 - ((total_length - margin) / total_length)), 0);
+ }
+ }
+
/// Since for each sweep test I fix the motion of new shapes in base the recover result,
/// if another shape will hit something it means that has a deepest penetration respect the previous shape
motion *= btResult.m_closestHitFraction;
@@ -1043,6 +1059,9 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform3D &p
r_result->collider_id = collisionObject->get_instance_id();
r_result->collider_shape = r_recover_result.other_compound_shape_index;
r_result->collision_local_shape = r_recover_result.local_shape_most_recovered;
+ r_result->collision_depth = Math::abs(r_recover_result.penetration_distance);
+ r_result->collision_safe_fraction = safe_fraction;
+ r_result->collision_unsafe_fraction = unsafe_fraction;
#if debug_test_motion
Vector3 sup_line2;
@@ -1067,6 +1086,10 @@ int SpaceBullet::test_ray_separation(RigidBodyBullet *p_body, const Transform3D
G_TO_B(p_transform, body_transform);
UNSCALE_BT_BASIS(body_transform);
+ if (!p_body->get_kinematic_utilities()) {
+ p_body->init_kinematic_utilities();
+ }
+
btVector3 recover_motion(0, 0, 0);
int rays_found = 0;
diff --git a/modules/bullet/space_bullet.h b/modules/bullet/space_bullet.h
index 2070e0e633..cf8549030d 100644
--- a/modules/bullet/space_bullet.h
+++ b/modules/bullet/space_bullet.h
@@ -76,13 +76,13 @@ private:
public:
BulletPhysicsDirectSpaceState(SpaceBullet *p_space);
- virtual int intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
- virtual bool intersect_ray(const Vector3 &p_from, const Vector3 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_ray = false) override;
- virtual int intersect_shape(const RID &p_shape, const Transform3D &p_xform, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
- virtual bool cast_motion(const RID &p_shape, const Transform3D &p_xform, const Vector3 &p_motion, real_t p_margin, real_t &r_closest_safe, real_t &r_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, ShapeRestInfo *r_info = nullptr) override;
+ virtual int intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual bool intersect_ray(const Vector3 &p_from, const Vector3 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_ray = false) override;
+ virtual int intersect_shape(const RID &p_shape, const Transform3D &p_xform, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual bool cast_motion(const RID &p_shape, const Transform3D &p_xform, const Vector3 &p_motion, real_t p_margin, real_t &r_closest_safe, real_t &r_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, ShapeRestInfo *r_info = nullptr) override;
/// Returns the list of contacts pairs in this order: Local contact, other body contact
- virtual bool collide_shape(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
- virtual bool rest_info(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual bool collide_shape(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual bool rest_info(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
virtual Vector3 get_closest_point_to_object_volume(RID p_object, const Vector3 p_point) const override;
};
diff --git a/modules/camera/camera_osx.mm b/modules/camera/camera_osx.mm
index 4875eb578a..02f7287d1b 100644
--- a/modules/camera/camera_osx.mm
+++ b/modules/camera/camera_osx.mm
@@ -33,6 +33,7 @@
#include "camera_osx.h"
#include "servers/camera/camera_feed.h"
+
#import <AVFoundation/AVFoundation.h>
//////////////////////////////////////////////////////////////////////////
@@ -253,10 +254,25 @@ CameraFeedOSX::~CameraFeedOSX() {
bool CameraFeedOSX::activate_feed() {
if (capture_session) {
- // already recording!
+ // Already recording!
} else {
- // start camera capture
- capture_session = [[MyCaptureSession alloc] initForFeed:this andDevice:device];
+ // Start camera capture, check permission.
+ if (@available(macOS 10.14, *)) {
+ AVAuthorizationStatus status = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
+ if (status == AVAuthorizationStatusAuthorized) {
+ capture_session = [[MyCaptureSession alloc] initForFeed:this andDevice:device];
+ } else if (status == AVAuthorizationStatusNotDetermined) {
+ // Request permission.
+ [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo
+ completionHandler:^(BOOL granted) {
+ if (granted) {
+ capture_session = [[MyCaptureSession alloc] initForFeed:this andDevice:device];
+ }
+ }];
+ }
+ } else {
+ capture_session = [[MyCaptureSession alloc] initForFeed:this andDevice:device];
+ }
};
return true;
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp
index cb82b65307..229e1e2724 100644
--- a/modules/csg/csg.cpp
+++ b/modules/csg/csg.cpp
@@ -37,16 +37,16 @@
// Static helper functions.
inline static bool is_snapable(const Vector3 &p_point1, const Vector3 &p_point2, real_t p_distance) {
- return (p_point1 - p_point2).length_squared() < p_distance * p_distance;
+ return p_point2.distance_squared_to(p_point1) < p_distance * p_distance;
}
-inline static Vector2 interpolate_segment_uv(const Vector2 p_segement_points[2], const Vector2 p_uvs[2], const Vector2 &p_interpolation_point) {
- float segment_length = (p_segement_points[1] - p_segement_points[0]).length();
- if (p_segement_points[0].is_equal_approx(p_segement_points[1])) {
+inline static Vector2 interpolate_segment_uv(const Vector2 p_segment_points[2], const Vector2 p_uvs[2], const Vector2 &p_interpolation_point) {
+ if (p_segment_points[0].is_equal_approx(p_segment_points[1])) {
return p_uvs[0];
}
- float distance = (p_interpolation_point - p_segement_points[0]).length();
+ float segment_length = p_segment_points[0].distance_to(p_segment_points[1]);
+ float distance = p_segment_points[0].distance_to(p_interpolation_point);
float fraction = distance / segment_length;
return p_uvs[0].lerp(p_uvs[1], fraction);
@@ -162,7 +162,7 @@ inline static bool is_triangle_degenerate(const Vector2 p_vertices[3], real_t p_
return det < p_vertex_snap2;
}
-inline static bool are_segements_parallel(const Vector2 p_segment1_points[2], const Vector2 p_segment2_points[2], float p_vertex_snap2) {
+inline static bool are_segments_parallel(const Vector2 p_segment1_points[2], const Vector2 p_segment2_points[2], float p_vertex_snap2) {
Vector2 segment1 = p_segment1_points[1] - p_segment1_points[0];
Vector2 segment2 = p_segment2_points[1] - p_segment2_points[0];
real_t segment1_length2 = segment1.dot(segment1);
@@ -517,7 +517,7 @@ int CSGBrushOperation::MeshMerge::_create_bvh(FaceBVH *facebvhptr, FaceBVH **fac
int index = r_max_alloc++;
FaceBVH *_new = &facebvhptr[index];
_new->aabb = aabb;
- _new->center = aabb.position + aabb.size * 0.5;
+ _new->center = aabb.get_center();
_new->face = -1;
_new->left = left;
_new->right = right;
@@ -596,7 +596,7 @@ bool CSGBrushOperation::MeshMerge::_bvh_inside(FaceBVH *facebvhptr, int p_max_de
_add_distance(intersectionsA, intersectionsB, current_face.from_b, 0);
}
} else if (ray_intersects_triangle(face_center, face_normal, current_points, CMP_EPSILON, intersection_point)) {
- real_t distance = (intersection_point - face_center).length();
+ real_t distance = face_center.distance_to(intersection_point);
_add_distance(intersectionsA, intersectionsB, current_face.from_b, distance);
}
}
@@ -678,7 +678,7 @@ void CSGBrushOperation::MeshMerge::mark_inside_faces() {
facebvh[i].aabb.position = points[faces[i].points[0]];
facebvh[i].aabb.expand_to(points[faces[i].points[1]]);
facebvh[i].aabb.expand_to(points[faces[i].points[2]]);
- facebvh[i].center = facebvh[i].aabb.position + facebvh[i].aabb.size * 0.5;
+ facebvh[i].center = facebvh[i].aabb.get_center();
facebvh[i].aabb.grow_by(vertex_snap);
facebvh[i].next = -1;
@@ -781,7 +781,7 @@ void CSGBrushOperation::MeshMerge::add_face(const Vector3 p_points[], const Vect
int CSGBrushOperation::Build2DFaces::_get_point_idx(const Vector2 &p_point) {
for (int vertex_idx = 0; vertex_idx < vertices.size(); ++vertex_idx) {
- if ((p_point - vertices[vertex_idx].point).length_squared() < vertex_snap2) {
+ if (vertices[vertex_idx].point.distance_squared_to(p_point) < vertex_snap2) {
return vertex_idx;
}
}
@@ -911,7 +911,7 @@ void CSGBrushOperation::Build2DFaces::_merge_faces(const Vector<int> &p_segment_
vertices[outer_edge_idx[1]].point,
vertices[p_segment_indices[closest_idx]].point
};
- if (are_segements_parallel(edge1, edge2, vertex_snap2)) {
+ if (are_segments_parallel(edge1, edge2, vertex_snap2)) {
if (!degenerate_points.find(outer_edge_idx[0])) {
degenerate_points.push_back(outer_edge_idx[0]);
}
@@ -961,7 +961,7 @@ void CSGBrushOperation::Build2DFaces::_merge_faces(const Vector<int> &p_segment_
// Check if point is existing face vertex.
bool existing = false;
for (int i = 0; i < 3; ++i) {
- if ((point_2D - face_vertices[i].point).length_squared() < vertex_snap2) {
+ if (face_vertices[i].point.distance_squared_to(point_2D) < vertex_snap2) {
existing = true;
break;
}
@@ -978,7 +978,7 @@ void CSGBrushOperation::Build2DFaces::_merge_faces(const Vector<int> &p_segment_
};
Vector2 closest_point = Geometry2D::get_closest_point_to_segment(point_2D, edge_points);
- if ((closest_point - point_2D).length_squared() < vertex_snap2) {
+ if (point_2D.distance_squared_to(closest_point) < vertex_snap2) {
int opposite_vertex_idx = face.vertex_idx[(face_edge_idx + 2) % 3];
// If new vertex snaps to degenerate vertex, just delete this face.
@@ -1041,7 +1041,7 @@ void CSGBrushOperation::Build2DFaces::_find_edge_intersections(const Vector2 p_s
bool on_edge = false;
for (int edge_point_idx = 0; edge_point_idx < 2; ++edge_point_idx) {
intersection_point = Geometry2D::get_closest_point_to_segment(p_segment_points[edge_point_idx], edge_points);
- if ((intersection_point - p_segment_points[edge_point_idx]).length_squared() < vertex_snap2) {
+ if (p_segment_points[edge_point_idx].distance_squared_to(intersection_point) < vertex_snap2) {
on_edge = true;
break;
}
@@ -1050,13 +1050,13 @@ void CSGBrushOperation::Build2DFaces::_find_edge_intersections(const Vector2 p_s
// Else check if the segment intersects the edge.
if (on_edge || Geometry2D::segment_intersects_segment(p_segment_points[0], p_segment_points[1], edge_points[0], edge_points[1], &intersection_point)) {
// Check if intersection point is an edge point.
- if ((intersection_point - edge_points[0]).length_squared() < vertex_snap2 ||
- (intersection_point - edge_points[1]).length_squared() < vertex_snap2) {
+ if ((edge_points[0].distance_squared_to(intersection_point) < vertex_snap2) ||
+ (edge_points[1].distance_squared_to(intersection_point) < vertex_snap2)) {
continue;
}
// Check if edge exists, by checking if the intersecting segment is parallel to the edge.
- if (are_segements_parallel(p_segment_points, edge_points, vertex_snap2)) {
+ if (are_segments_parallel(p_segment_points, edge_points, vertex_snap2)) {
continue;
}
@@ -1078,7 +1078,7 @@ void CSGBrushOperation::Build2DFaces::_find_edge_intersections(const Vector2 p_s
// If opposite point is on the segment, add its index to segment indices too.
Vector2 closest_point = Geometry2D::get_closest_point_to_segment(vertices[opposite_vertex_idx].point, p_segment_points);
- if ((closest_point - vertices[opposite_vertex_idx].point).length_squared() < vertex_snap2) {
+ if (vertices[opposite_vertex_idx].point.distance_squared_to(closest_point) < vertex_snap2) {
_add_vertex_idx_sorted(r_segment_indices, opposite_vertex_idx);
}
@@ -1132,7 +1132,7 @@ int CSGBrushOperation::Build2DFaces::_insert_point(const Vector2 &p_point) {
// Check if point is existing face vertex.
for (int i = 0; i < 3; ++i) {
- if ((p_point - face_vertices[i].point).length_squared() < vertex_snap2) {
+ if (face_vertices[i].point.distance_squared_to(p_point) < vertex_snap2) {
return face.vertex_idx[i];
}
}
@@ -1150,7 +1150,7 @@ int CSGBrushOperation::Build2DFaces::_insert_point(const Vector2 &p_point) {
};
Vector2 closest_point = Geometry2D::get_closest_point_to_segment(p_point, edge_points);
- if ((closest_point - p_point).length_squared() < vertex_snap2) {
+ if (p_point.distance_squared_to(closest_point) < vertex_snap2) {
on_edge = true;
// Add the point as a new vertex.
@@ -1172,8 +1172,8 @@ int CSGBrushOperation::Build2DFaces::_insert_point(const Vector2 &p_point) {
Vector2 split_edge1[2] = { vertices[new_vertex_idx].point, edge_points[0] };
Vector2 split_edge2[2] = { vertices[new_vertex_idx].point, edge_points[1] };
Vector2 new_edge[2] = { vertices[new_vertex_idx].point, vertices[opposite_vertex_idx].point };
- if (are_segements_parallel(split_edge1, new_edge, vertex_snap2) &&
- are_segements_parallel(split_edge2, new_edge, vertex_snap2)) {
+ if (are_segments_parallel(split_edge1, new_edge, vertex_snap2) &&
+ are_segments_parallel(split_edge2, new_edge, vertex_snap2)) {
break;
}
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index bf11cc7f68..e4297a593e 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -280,7 +280,7 @@ void CSGShape3D::mikktSetTSpaceDefault(const SMikkTSpaceContext *pContext, const
}
void CSGShape3D::_update_shape() {
- if (parent) {
+ if (parent || !is_inside_tree()) {
return;
}
@@ -1732,6 +1732,7 @@ CSGBrush *CSGPolygon3D::_build_brush() {
int extrusion_face_count = shape_sides * 2;
int end_count = 0;
int shape_face_count = shape_faces.size() / 3;
+ real_t curve_length = 1.0;
switch (mode) {
case MODE_DEPTH:
extrusions = 1;
@@ -1744,7 +1745,12 @@ CSGBrush *CSGPolygon3D::_build_brush() {
}
break;
case MODE_PATH: {
- extrusions = Math::ceil(1.0 * curve->get_point_count() / path_interval);
+ curve_length = curve->get_baked_length();
+ if (path_interval_type == PATH_INTERVAL_DISTANCE) {
+ extrusions = MAX(1, Math::ceil(curve_length / path_interval)) + 1;
+ } else {
+ extrusions = Math::ceil(1.0 * curve->get_point_count() / path_interval);
+ }
if (!path_joined) {
end_count = 2;
extrusions -= 1;
@@ -1767,212 +1773,245 @@ CSGBrush *CSGPolygon3D::_build_brush() {
smooth.resize(face_count);
materials.resize(face_count);
invert.resize(face_count);
+ int faces_removed = 0;
- Vector3 *facesw = faces.ptrw();
- Vector2 *uvsw = uvs.ptrw();
- bool *smoothw = smooth.ptrw();
- Ref<Material> *materialsw = materials.ptrw();
- bool *invertw = invert.ptrw();
-
- int face = 0;
- Transform3D base_xform;
- Transform3D current_xform;
- Transform3D previous_xform;
- double u_step = 1.0 / extrusions;
- double v_step = 1.0 / shape_sides;
- double spin_step = Math::deg2rad(spin_degrees / spin_sides);
- double extrusion_step = 1.0 / extrusions;
- if (mode == MODE_PATH) {
- if (path_joined) {
- extrusion_step = 1.0 / (extrusions - 1);
- }
- extrusion_step *= curve->get_baked_length();
- }
+ {
+ Vector3 *facesw = faces.ptrw();
+ Vector2 *uvsw = uvs.ptrw();
+ bool *smoothw = smooth.ptrw();
+ Ref<Material> *materialsw = materials.ptrw();
+ bool *invertw = invert.ptrw();
- if (mode == MODE_PATH) {
- if (!path_local) {
- base_xform = path->get_global_transform();
+ int face = 0;
+ Transform3D base_xform;
+ Transform3D current_xform;
+ Transform3D previous_xform;
+ Transform3D previous_previous_xform;
+ double u_step = 1.0 / extrusions;
+ if (path_u_distance > 0.0) {
+ u_step *= curve_length / path_u_distance;
+ }
+ double v_step = 1.0 / shape_sides;
+ double spin_step = Math::deg2rad(spin_degrees / spin_sides);
+ double extrusion_step = 1.0 / extrusions;
+ if (mode == MODE_PATH) {
+ if (path_joined) {
+ extrusion_step = 1.0 / (extrusions - 1);
+ }
+ extrusion_step *= curve_length;
}
- Vector3 current_point = curve->interpolate_baked(0);
- Vector3 next_point = curve->interpolate_baked(extrusion_step);
- Vector3 current_up = Vector3(0, 1, 0);
- Vector3 direction = next_point - current_point;
+ if (mode == MODE_PATH) {
+ if (!path_local) {
+ base_xform = path->get_global_transform();
+ }
- if (path_joined) {
- Vector3 last_point = curve->interpolate_baked(curve->get_baked_length());
- direction = next_point - last_point;
- }
+ Vector3 current_point = curve->interpolate_baked(0);
+ Vector3 next_point = curve->interpolate_baked(extrusion_step);
+ Vector3 current_up = Vector3(0, 1, 0);
+ Vector3 direction = next_point - current_point;
+
+ if (path_joined) {
+ Vector3 last_point = curve->interpolate_baked(curve->get_baked_length());
+ direction = next_point - last_point;
+ }
- switch (path_rotation) {
- case PATH_ROTATION_POLYGON:
- direction = Vector3(0, 0, -1);
- break;
- case PATH_ROTATION_PATH:
- break;
- case PATH_ROTATION_PATH_FOLLOW:
- current_up = curve->interpolate_baked_up_vector(0);
- break;
+ switch (path_rotation) {
+ case PATH_ROTATION_POLYGON:
+ direction = Vector3(0, 0, -1);
+ break;
+ case PATH_ROTATION_PATH:
+ break;
+ case PATH_ROTATION_PATH_FOLLOW:
+ current_up = curve->interpolate_baked_up_vector(0);
+ break;
+ }
+
+ Transform3D facing = Transform3D().looking_at(direction, current_up);
+ current_xform = base_xform.translated(current_point) * facing;
}
- Transform3D facing = Transform3D().looking_at(direction, current_up);
- current_xform = base_xform.translated(current_point) * facing;
- }
+ // Create the mesh.
+ if (end_count > 0) {
+ // Add front end face.
+ for (int face_idx = 0; face_idx < shape_face_count; face_idx++) {
+ for (int face_vertex_idx = 0; face_vertex_idx < 3; face_vertex_idx++) {
+ // We need to reverse the rotation of the shape face vertices.
+ int index = shape_faces[face_idx * 3 + 2 - face_vertex_idx];
+ Point2 p = shape_polygon[index];
+ Point2 uv = (p - shape_rect.position) / shape_rect.size;
+
+ // Use the left side of the bottom half of the y-inverted texture.
+ uv.x = uv.x / 2;
+ uv.y = 1 - (uv.y / 2);
+
+ facesw[face * 3 + face_vertex_idx] = current_xform.xform(Vector3(p.x, p.y, 0));
+ uvsw[face * 3 + face_vertex_idx] = uv;
+ }
- // Create the mesh.
- if (end_count > 0) {
- // Add front end face.
- for (int face_idx = 0; face_idx < shape_face_count; face_idx++) {
- for (int face_vertex_idx = 0; face_vertex_idx < 3; face_vertex_idx++) {
- // We need to reverse the rotation of the shape face vertices.
- int index = shape_faces[face_idx * 3 + 2 - face_vertex_idx];
- Point2 p = shape_polygon[index];
- Point2 uv = (p - shape_rect.position) / shape_rect.size;
-
- // Use the left side of the bottom half of the y-inverted texture.
- uv.x = uv.x / 2;
- uv.y = 1 - (uv.y / 2);
-
- facesw[face * 3 + face_vertex_idx] = current_xform.xform(Vector3(p.x, p.y, 0));
- uvsw[face * 3 + face_vertex_idx] = uv;
+ smoothw[face] = false;
+ materialsw[face] = material;
+ invertw[face] = invert_faces;
+ face++;
}
-
- smoothw[face] = false;
- materialsw[face] = material;
- invertw[face] = invert_faces;
- face++;
}
- }
- // Add extrusion faces.
- for (int x0 = 0; x0 < extrusions; x0++) {
- previous_xform = current_xform;
-
- switch (mode) {
- case MODE_DEPTH: {
- current_xform.translate(Vector3(0, 0, -depth));
- } break;
- case MODE_SPIN: {
- current_xform.rotate(Vector3(0, 1, 0), spin_step);
- } break;
- case MODE_PATH: {
- double previous_offset = x0 * extrusion_step;
- double current_offset = (x0 + 1) * extrusion_step;
- double next_offset = (x0 + 2) * extrusion_step;
- if (x0 == extrusions - 1) {
- if (path_joined) {
- current_offset = 0;
- next_offset = extrusion_step;
+ real_t angle_simplify_dot = Math::cos(Math::deg2rad(path_simplify_angle));
+ Vector3 previous_simplify_dir = Vector3(0, 0, 0);
+ int faces_combined = 0;
+
+ // Add extrusion faces.
+ for (int x0 = 0; x0 < extrusions; x0++) {
+ previous_previous_xform = previous_xform;
+ previous_xform = current_xform;
+
+ switch (mode) {
+ case MODE_DEPTH: {
+ current_xform.translate(Vector3(0, 0, -depth));
+ } break;
+ case MODE_SPIN: {
+ current_xform.rotate(Vector3(0, 1, 0), spin_step);
+ } break;
+ case MODE_PATH: {
+ double previous_offset = x0 * extrusion_step;
+ double current_offset = (x0 + 1) * extrusion_step;
+ double next_offset = (x0 + 2) * extrusion_step;
+ if (x0 == extrusions - 1) {
+ if (path_joined) {
+ current_offset = 0;
+ next_offset = extrusion_step;
+ } else {
+ next_offset = current_offset;
+ }
+ }
+
+ Vector3 previous_point = curve->interpolate_baked(previous_offset);
+ Vector3 current_point = curve->interpolate_baked(current_offset);
+ Vector3 next_point = curve->interpolate_baked(next_offset);
+ Vector3 current_up = Vector3(0, 1, 0);
+ Vector3 direction = next_point - previous_point;
+ Vector3 current_dir = (current_point - previous_point).normalized();
+
+ // If the angles are similar, remove the previous face and replace it with this one.
+ if (path_simplify_angle > 0.0 && x0 > 0 && previous_simplify_dir.dot(current_dir) > angle_simplify_dot) {
+ faces_combined += 1;
+ previous_xform = previous_previous_xform;
+ face -= extrusion_face_count;
+ faces_removed += extrusion_face_count;
} else {
- next_offset = current_offset;
+ faces_combined = 0;
+ previous_simplify_dir = current_dir;
}
- }
- Vector3 previous_point = curve->interpolate_baked(previous_offset);
- Vector3 current_point = curve->interpolate_baked(current_offset);
- Vector3 next_point = curve->interpolate_baked(next_offset);
- Vector3 current_up = Vector3(0, 1, 0);
- Vector3 direction = next_point - previous_point;
+ switch (path_rotation) {
+ case PATH_ROTATION_POLYGON:
+ direction = Vector3(0, 0, -1);
+ break;
+ case PATH_ROTATION_PATH:
+ break;
+ case PATH_ROTATION_PATH_FOLLOW:
+ current_up = curve->interpolate_baked_up_vector(current_offset);
+ break;
+ }
- switch (path_rotation) {
- case PATH_ROTATION_POLYGON:
- direction = Vector3(0, 0, -1);
- break;
- case PATH_ROTATION_PATH:
- break;
- case PATH_ROTATION_PATH_FOLLOW:
- current_up = curve->interpolate_baked_up_vector(current_offset);
- break;
- }
+ Transform3D facing = Transform3D().looking_at(direction, current_up);
+ current_xform = base_xform.translated(current_point) * facing;
+ } break;
+ }
- Transform3D facing = Transform3D().looking_at(direction, current_up);
- current_xform = base_xform.translated(current_point) * facing;
- } break;
- }
+ double u0 = (x0 - faces_combined) * u_step;
+ double u1 = ((x0 + 1) * u_step);
+ if (mode == MODE_PATH && !path_continuous_u) {
+ u0 = 0.0;
+ u1 = 1.0;
+ }
- double u0 = x0 * u_step;
- double u1 = ((x0 + 1) * u_step);
- if (mode == MODE_PATH && !path_continuous_u) {
- u0 = 0.0;
- u1 = 1.0;
- }
+ for (int y0 = 0; y0 < shape_sides; y0++) {
+ int y1 = (y0 + 1) % shape_sides;
+ // Use the top half of the texture.
+ double v0 = (y0 * v_step) / 2;
+ double v1 = ((y0 + 1) * v_step) / 2;
- for (int y0 = 0; y0 < shape_sides; y0++) {
- int y1 = (y0 + 1) % shape_sides;
- // Use the top half of the texture.
- double v0 = (y0 * v_step) / 2;
- double v1 = ((y0 + 1) * v_step) / 2;
-
- Vector3 v[4] = {
- previous_xform.xform(Vector3(shape_polygon[y0].x, shape_polygon[y0].y, 0)),
- current_xform.xform(Vector3(shape_polygon[y0].x, shape_polygon[y0].y, 0)),
- current_xform.xform(Vector3(shape_polygon[y1].x, shape_polygon[y1].y, 0)),
- previous_xform.xform(Vector3(shape_polygon[y1].x, shape_polygon[y1].y, 0)),
- };
-
- Vector2 u[4] = {
- Vector2(u0, v0),
- Vector2(u1, v0),
- Vector2(u1, v1),
- Vector2(u0, v1),
- };
-
- // Face 1
- facesw[face * 3 + 0] = v[0];
- facesw[face * 3 + 1] = v[1];
- facesw[face * 3 + 2] = v[2];
-
- uvsw[face * 3 + 0] = u[0];
- uvsw[face * 3 + 1] = u[1];
- uvsw[face * 3 + 2] = u[2];
-
- smoothw[face] = smooth_faces;
- invertw[face] = invert_faces;
- materialsw[face] = material;
-
- face++;
-
- // Face 2
- facesw[face * 3 + 0] = v[2];
- facesw[face * 3 + 1] = v[3];
- facesw[face * 3 + 2] = v[0];
-
- uvsw[face * 3 + 0] = u[2];
- uvsw[face * 3 + 1] = u[3];
- uvsw[face * 3 + 2] = u[0];
-
- smoothw[face] = smooth_faces;
- invertw[face] = invert_faces;
- materialsw[face] = material;
-
- face++;
- }
- }
+ Vector3 v[4] = {
+ previous_xform.xform(Vector3(shape_polygon[y0].x, shape_polygon[y0].y, 0)),
+ current_xform.xform(Vector3(shape_polygon[y0].x, shape_polygon[y0].y, 0)),
+ current_xform.xform(Vector3(shape_polygon[y1].x, shape_polygon[y1].y, 0)),
+ previous_xform.xform(Vector3(shape_polygon[y1].x, shape_polygon[y1].y, 0)),
+ };
+
+ Vector2 u[4] = {
+ Vector2(u0, v0),
+ Vector2(u1, v0),
+ Vector2(u1, v1),
+ Vector2(u0, v1),
+ };
+
+ // Face 1
+ facesw[face * 3 + 0] = v[0];
+ facesw[face * 3 + 1] = v[1];
+ facesw[face * 3 + 2] = v[2];
+
+ uvsw[face * 3 + 0] = u[0];
+ uvsw[face * 3 + 1] = u[1];
+ uvsw[face * 3 + 2] = u[2];
+
+ smoothw[face] = smooth_faces;
+ invertw[face] = invert_faces;
+ materialsw[face] = material;
+
+ face++;
+
+ // Face 2
+ facesw[face * 3 + 0] = v[2];
+ facesw[face * 3 + 1] = v[3];
+ facesw[face * 3 + 2] = v[0];
- if (end_count > 1) {
- // Add back end face.
- for (int face_idx = 0; face_idx < shape_face_count; face_idx++) {
- for (int face_vertex_idx = 0; face_vertex_idx < 3; face_vertex_idx++) {
- int index = shape_faces[face_idx * 3 + face_vertex_idx];
- Point2 p = shape_polygon[index];
- Point2 uv = (p - shape_rect.position) / shape_rect.size;
+ uvsw[face * 3 + 0] = u[2];
+ uvsw[face * 3 + 1] = u[3];
+ uvsw[face * 3 + 2] = u[0];
- // Use the x-inverted ride side of the bottom half of the y-inverted texture.
- uv.x = 1 - uv.x / 2;
- uv.y = 1 - (uv.y / 2);
+ smoothw[face] = smooth_faces;
+ invertw[face] = invert_faces;
+ materialsw[face] = material;
- facesw[face * 3 + face_vertex_idx] = current_xform.xform(Vector3(p.x, p.y, 0));
- uvsw[face * 3 + face_vertex_idx] = uv;
+ face++;
}
+ }
- smoothw[face] = false;
- materialsw[face] = material;
- invertw[face] = invert_faces;
- face++;
+ if (end_count > 1) {
+ // Add back end face.
+ for (int face_idx = 0; face_idx < shape_face_count; face_idx++) {
+ for (int face_vertex_idx = 0; face_vertex_idx < 3; face_vertex_idx++) {
+ int index = shape_faces[face_idx * 3 + face_vertex_idx];
+ Point2 p = shape_polygon[index];
+ Point2 uv = (p - shape_rect.position) / shape_rect.size;
+
+ // Use the x-inverted ride side of the bottom half of the y-inverted texture.
+ uv.x = 1 - uv.x / 2;
+ uv.y = 1 - (uv.y / 2);
+
+ facesw[face * 3 + face_vertex_idx] = current_xform.xform(Vector3(p.x, p.y, 0));
+ uvsw[face * 3 + face_vertex_idx] = uv;
+ }
+
+ smoothw[face] = false;
+ materialsw[face] = material;
+ invertw[face] = invert_faces;
+ face++;
+ }
}
+
+ face_count -= faces_removed;
+ ERR_FAIL_COND_V_MSG(face != face_count, brush, "Bug: Failed to create the CSGPolygon mesh correctly.");
}
- ERR_FAIL_COND_V_MSG(face != face_count, brush, "Bug: Failed to create the CSGPolygon mesh correctly.");
+ if (faces_removed > 0) {
+ faces.resize(face_count * 3);
+ uvs.resize(face_count * 3);
+ smooth.resize(face_count);
+ materials.resize(face_count);
+ invert.resize(face_count);
+ }
brush->build_from_faces(faces, uvs, smooth, materials, invert);
@@ -2031,9 +2070,15 @@ void CSGPolygon3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_path_node", "path"), &CSGPolygon3D::set_path_node);
ClassDB::bind_method(D_METHOD("get_path_node"), &CSGPolygon3D::get_path_node);
+ ClassDB::bind_method(D_METHOD("set_path_interval_type", "interval_type"), &CSGPolygon3D::set_path_interval_type);
+ ClassDB::bind_method(D_METHOD("get_path_interval_type"), &CSGPolygon3D::get_path_interval_type);
+
ClassDB::bind_method(D_METHOD("set_path_interval", "interval"), &CSGPolygon3D::set_path_interval);
ClassDB::bind_method(D_METHOD("get_path_interval"), &CSGPolygon3D::get_path_interval);
+ ClassDB::bind_method(D_METHOD("set_path_simplify_angle", "degrees"), &CSGPolygon3D::set_path_simplify_angle);
+ ClassDB::bind_method(D_METHOD("get_path_simplify_angle"), &CSGPolygon3D::get_path_simplify_angle);
+
ClassDB::bind_method(D_METHOD("set_path_rotation", "path_rotation"), &CSGPolygon3D::set_path_rotation);
ClassDB::bind_method(D_METHOD("get_path_rotation"), &CSGPolygon3D::get_path_rotation);
@@ -2043,6 +2088,9 @@ void CSGPolygon3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_path_continuous_u", "enable"), &CSGPolygon3D::set_path_continuous_u);
ClassDB::bind_method(D_METHOD("is_path_continuous_u"), &CSGPolygon3D::is_path_continuous_u);
+ ClassDB::bind_method(D_METHOD("set_path_u_distance", "distance"), &CSGPolygon3D::set_path_u_distance);
+ ClassDB::bind_method(D_METHOD("get_path_u_distance"), &CSGPolygon3D::get_path_u_distance);
+
ClassDB::bind_method(D_METHOD("set_path_joined", "enable"), &CSGPolygon3D::set_path_joined);
ClassDB::bind_method(D_METHOD("is_path_joined"), &CSGPolygon3D::is_path_joined);
@@ -2061,10 +2109,13 @@ void CSGPolygon3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "spin_degrees", PROPERTY_HINT_RANGE, "1,360,0.1"), "set_spin_degrees", "get_spin_degrees");
ADD_PROPERTY(PropertyInfo(Variant::INT, "spin_sides", PROPERTY_HINT_RANGE, "3,64,1"), "set_spin_sides", "get_spin_sides");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "path_node", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "Path3D"), "set_path_node", "get_path_node");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_interval", PROPERTY_HINT_RANGE, "0.1,1.0,0.05,exp"), "set_path_interval", "get_path_interval");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "path_interval_type", PROPERTY_HINT_ENUM, "Distance,Subdivide"), "set_path_interval_type", "get_path_interval_type");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_interval", PROPERTY_HINT_RANGE, "0.01,1.0,0.01,exp,or_greater"), "set_path_interval", "get_path_interval");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_simplify_angle", PROPERTY_HINT_RANGE, "0.0,180.0,0.1,exp"), "set_path_simplify_angle", "get_path_simplify_angle");
ADD_PROPERTY(PropertyInfo(Variant::INT, "path_rotation", PROPERTY_HINT_ENUM, "Polygon,Path,PathFollow"), "set_path_rotation", "get_path_rotation");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "path_local"), "set_path_local", "is_path_local");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "path_continuous_u"), "set_path_continuous_u", "is_path_continuous_u");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "path_u_distance", PROPERTY_HINT_RANGE, "0.0,10.0,0.01,or_greater"), "set_path_u_distance", "get_path_u_distance");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "path_joined"), "set_path_joined", "is_path_joined");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "smooth_faces"), "set_smooth_faces", "get_smooth_faces");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "BaseMaterial3D,ShaderMaterial"), "set_material", "get_material");
@@ -2076,6 +2127,9 @@ void CSGPolygon3D::_bind_methods() {
BIND_ENUM_CONSTANT(PATH_ROTATION_POLYGON);
BIND_ENUM_CONSTANT(PATH_ROTATION_PATH);
BIND_ENUM_CONSTANT(PATH_ROTATION_PATH_FOLLOW);
+
+ BIND_ENUM_CONSTANT(PATH_INTERVAL_DISTANCE);
+ BIND_ENUM_CONSTANT(PATH_INTERVAL_SUBDIVIDE);
}
void CSGPolygon3D::set_polygon(const Vector<Vector2> &p_polygon) {
@@ -2119,6 +2173,16 @@ bool CSGPolygon3D::is_path_continuous_u() const {
return path_continuous_u;
}
+void CSGPolygon3D::set_path_u_distance(real_t p_path_u_distance) {
+ path_u_distance = p_path_u_distance;
+ _make_dirty();
+ update_gizmos();
+}
+
+real_t CSGPolygon3D::get_path_u_distance() const {
+ return path_u_distance;
+}
+
void CSGPolygon3D::set_spin_degrees(const float p_spin_degrees) {
ERR_FAIL_COND(p_spin_degrees < 0.01 || p_spin_degrees > 360);
spin_degrees = p_spin_degrees;
@@ -2151,8 +2215,17 @@ NodePath CSGPolygon3D::get_path_node() const {
return path_node;
}
+void CSGPolygon3D::set_path_interval_type(PathIntervalType p_interval_type) {
+ path_interval_type = p_interval_type;
+ _make_dirty();
+ update_gizmos();
+}
+
+CSGPolygon3D::PathIntervalType CSGPolygon3D::get_path_interval_type() const {
+ return path_interval_type;
+}
+
void CSGPolygon3D::set_path_interval(float p_interval) {
- ERR_FAIL_COND_MSG(p_interval <= 0 || p_interval > 1, "Path interval must be greater than 0 and less than or equal to 1.0.");
path_interval = p_interval;
_make_dirty();
update_gizmos();
@@ -2162,6 +2235,16 @@ float CSGPolygon3D::get_path_interval() const {
return path_interval;
}
+void CSGPolygon3D::set_path_simplify_angle(float p_angle) {
+ path_simplify_angle = p_angle;
+ _make_dirty();
+ update_gizmos();
+}
+
+float CSGPolygon3D::get_path_simplify_angle() const {
+ return path_simplify_angle;
+}
+
void CSGPolygon3D::set_path_rotation(PathRotation p_rotation) {
path_rotation = p_rotation;
_make_dirty();
@@ -2229,10 +2312,13 @@ CSGPolygon3D::CSGPolygon3D() {
spin_degrees = 360;
spin_sides = 8;
smooth_faces = false;
+ path_interval_type = PATH_INTERVAL_DISTANCE;
path_interval = 1.0;
+ path_simplify_angle = 0.0;
path_rotation = PATH_ROTATION_PATH_FOLLOW;
path_local = false;
path_continuous_u = true;
+ path_u_distance = 1.0;
path_joined = false;
path = nullptr;
}
diff --git a/modules/csg/csg_shape.h b/modules/csg/csg_shape.h
index 5cf371665e..c85cce776b 100644
--- a/modules/csg/csg_shape.h
+++ b/modules/csg/csg_shape.h
@@ -336,6 +336,11 @@ public:
MODE_PATH
};
+ enum PathIntervalType {
+ PATH_INTERVAL_DISTANCE,
+ PATH_INTERVAL_SUBDIVIDE
+ };
+
enum PathRotation {
PATH_ROTATION_POLYGON,
PATH_ROTATION_PATH,
@@ -356,7 +361,9 @@ private:
int spin_sides;
NodePath path_node;
+ PathIntervalType path_interval_type;
float path_interval;
+ float path_simplify_angle;
PathRotation path_rotation;
bool path_local;
@@ -364,6 +371,7 @@ private:
bool smooth_faces;
bool path_continuous_u;
+ real_t path_u_distance;
bool path_joined;
bool _is_editable_3d_polygon() const;
@@ -396,9 +404,15 @@ public:
void set_path_node(const NodePath &p_path);
NodePath get_path_node() const;
+ void set_path_interval_type(PathIntervalType p_interval_type);
+ PathIntervalType get_path_interval_type() const;
+
void set_path_interval(float p_interval);
float get_path_interval() const;
+ void set_path_simplify_angle(float p_angle);
+ float get_path_simplify_angle() const;
+
void set_path_rotation(PathRotation p_rotation);
PathRotation get_path_rotation() const;
@@ -408,6 +422,9 @@ public:
void set_path_continuous_u(bool p_enable);
bool is_path_continuous_u() const;
+ void set_path_u_distance(real_t p_path_u_distance);
+ real_t get_path_u_distance() const;
+
void set_path_joined(bool p_enable);
bool is_path_joined() const;
@@ -422,5 +439,6 @@ public:
VARIANT_ENUM_CAST(CSGPolygon3D::Mode)
VARIANT_ENUM_CAST(CSGPolygon3D::PathRotation)
+VARIANT_ENUM_CAST(CSGPolygon3D::PathIntervalType)
#endif // CSG_SHAPE_H
diff --git a/modules/csg/doc_classes/CSGBox3D.xml b/modules/csg/doc_classes/CSGBox3D.xml
index 5bb1c4e75b..d64e58ae4d 100644
--- a/modules/csg/doc_classes/CSGBox3D.xml
+++ b/modules/csg/doc_classes/CSGBox3D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="material" type="Material" setter="set_material" getter="get_material">
The material used to render the box.
@@ -18,6 +16,4 @@
The box's width, height and depth.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/csg/doc_classes/CSGCombiner3D.xml b/modules/csg/doc_classes/CSGCombiner3D.xml
index b55111eee4..422c5d35b7 100644
--- a/modules/csg/doc_classes/CSGCombiner3D.xml
+++ b/modules/csg/doc_classes/CSGCombiner3D.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/csg/doc_classes/CSGCylinder3D.xml b/modules/csg/doc_classes/CSGCylinder3D.xml
index bfd2a5d5f2..40e989bfb3 100644
--- a/modules/csg/doc_classes/CSGCylinder3D.xml
+++ b/modules/csg/doc_classes/CSGCylinder3D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="cone" type="bool" setter="set_cone" getter="is_cone" default="false">
If [code]true[/code] a cone is created, the [member radius] will only apply to one side.
@@ -30,6 +28,4 @@
If [code]true[/code] the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If [code]false[/code] the cylinder will have a flat shaded look.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/csg/doc_classes/CSGMesh3D.xml b/modules/csg/doc_classes/CSGMesh3D.xml
index 5fa8427843..2810343139 100644
--- a/modules/csg/doc_classes/CSGMesh3D.xml
+++ b/modules/csg/doc_classes/CSGMesh3D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="material" type="Material" setter="set_material" getter="get_material">
The [Material] used in drawing the CSG shape.
@@ -19,6 +17,4 @@
[b]Note:[/b] When using an [ArrayMesh], avoid meshes with vertex normals unless a flat shader is required. By default, CSGMesh will ignore the mesh's vertex normals and use a smooth shader calculated using the faces' normals. If a flat shader is required, ensure that all faces' vertex normals are parallel.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/csg/doc_classes/CSGPolygon3D.xml b/modules/csg/doc_classes/CSGPolygon3D.xml
index 5309cde956..ecbb7962d1 100644
--- a/modules/csg/doc_classes/CSGPolygon3D.xml
+++ b/modules/csg/doc_classes/CSGPolygon3D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0">
When [member mode] is [constant MODE_DEPTH], the depth of the extrusion.
@@ -26,6 +24,9 @@
<member name="path_interval" type="float" setter="set_path_interval" getter="get_path_interval">
When [member mode] is [constant MODE_PATH], the path interval or ratio of path points to extrusions.
</member>
+ <member name="path_interval_type" type="int" setter="set_path_interval_type" getter="get_path_interval_type" enum="CSGPolygon3D.PathIntervalType">
+ When [member mode] is [constant MODE_PATH], this will determine if the interval should be by distance ([constant PATH_INTERVAL_DISTANCE]) or subdivision fractions ([constant PATH_INTERVAL_SUBDIVIDE]).
+ </member>
<member name="path_joined" type="bool" setter="set_path_joined" getter="is_path_joined">
When [member mode] is [constant MODE_PATH], if [code]true[/code] the ends of the path are joined, by adding an extrusion between the last and first points of the path.
</member>
@@ -38,6 +39,12 @@
<member name="path_rotation" type="int" setter="set_path_rotation" getter="get_path_rotation" enum="CSGPolygon3D.PathRotation">
When [member mode] is [constant MODE_PATH], the [enum PathRotation] method used to rotate the [member polygon] as it is extruded.
</member>
+ <member name="path_simplify_angle" type="float" setter="set_path_simplify_angle" getter="get_path_simplify_angle">
+ When [member mode] is [constant MODE_PATH], extrusions that are less than this angle, will be merged together to reduce polygon count.
+ </member>
+ <member name="path_u_distance" type="float" setter="set_path_u_distance" getter="get_path_u_distance">
+ When [member mode] is [constant MODE_PATH], this is the distance along the path, in meters, the texture coordinates will tile. When set to 0, texture coordinates will match geometry exactly with no tiling.
+ </member>
<member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array(0, 0, 0, 1, 1, 1, 1, 0)">
The point array that defines the 2D polygon that is extruded.
</member>
@@ -72,5 +79,11 @@
<constant name="PATH_ROTATION_PATH_FOLLOW" value="2" enum="PathRotation">
The [member polygon] shape follows the path and its rotations around the path axis.
</constant>
+ <constant name="PATH_INTERVAL_DISTANCE" value="0" enum="PathIntervalType">
+ When [member mode] is set to [constant MODE_PATH], [member path_interval] will determine the distance, in meters, each interval of the path will extrude.
+ </constant>
+ <constant name="PATH_INTERVAL_SUBDIVIDE" value="1" enum="PathIntervalType">
+ When [member mode] is set to [constant MODE_PATH], [member path_interval] will subdivide the polygons along the path.
+ </constant>
</constants>
</class>
diff --git a/modules/csg/doc_classes/CSGPrimitive3D.xml b/modules/csg/doc_classes/CSGPrimitive3D.xml
index 31b7360fac..8f4c8b9451 100644
--- a/modules/csg/doc_classes/CSGPrimitive3D.xml
+++ b/modules/csg/doc_classes/CSGPrimitive3D.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="invert_faces" type="bool" setter="set_invert_faces" getter="is_inverting_faces" default="false">
Invert the faces of the mesh.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/csg/doc_classes/CSGSphere3D.xml b/modules/csg/doc_classes/CSGSphere3D.xml
index 4d5b3be099..b8dfb4cf5f 100644
--- a/modules/csg/doc_classes/CSGSphere3D.xml
+++ b/modules/csg/doc_classes/CSGSphere3D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="material" type="Material" setter="set_material" getter="get_material">
The material used to render the sphere.
@@ -27,6 +25,4 @@
If [code]true[/code] the normals of the sphere are set to give a smooth effect making the sphere seem rounded. If [code]false[/code] the sphere will have a flat shaded look.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/csg/doc_classes/CSGTorus3D.xml b/modules/csg/doc_classes/CSGTorus3D.xml
index abe3eab913..91ee63a4c9 100644
--- a/modules/csg/doc_classes/CSGTorus3D.xml
+++ b/modules/csg/doc_classes/CSGTorus3D.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="inner_radius" type="float" setter="set_inner_radius" getter="get_inner_radius" default="2.0">
The inner radius of the torus.
@@ -30,6 +28,4 @@
If [code]true[/code] the normals of the torus are set to give a smooth effect making the torus seem rounded. If [code]false[/code] the torus will have a flat shaded look.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/enet/doc_classes/ENetConnection.xml b/modules/enet/doc_classes/ENetConnection.xml
index c2a85ffdf8..00469ab44c 100644
--- a/modules/enet/doc_classes/ENetConnection.xml
+++ b/modules/enet/doc_classes/ENetConnection.xml
@@ -40,6 +40,7 @@
<description>
Sets the compression method used for network packets. These have different tradeoffs of compression speed versus bandwidth, you may need to test which one works best for your use case if you use compression at all.
[b]Note:[/b] Most games' network design involve sending many small packets frequently (smaller than 4 KB each). If in doubt, it is recommended to keep the default compression algorithm as it works best on these small packets.
+ [b]Note:[/b] The compression mode must be set to the same value on both the server and all its clients. Clients will fail to connect if the compression mode set on the client differs from the one set on the server.
</description>
</method>
<method name="connect_to_host">
@@ -155,7 +156,7 @@
ENet's built-in range encoding. Works well on small packets, but is not the most efficient algorithm on packets larger than 4 KB.
</constant>
<constant name="COMPRESS_FASTLZ" value="2" enum="CompressionMode">
- [url=http://fastlz.org/]FastLZ[/url] compression. This option uses less CPU resources compared to [constant COMPRESS_ZLIB], at the expense of using more bandwidth.
+ [url=https://fastlz.org/]FastLZ[/url] compression. This option uses less CPU resources compared to [constant COMPRESS_ZLIB], at the expense of using more bandwidth.
</constant>
<constant name="COMPRESS_ZLIB" value="3" enum="CompressionMode">
[url=https://www.zlib.net/]Zlib[/url] compression. This option uses less bandwidth compared to [constant COMPRESS_FASTLZ], at the expense of using more CPU resources.
diff --git a/modules/enet/doc_classes/ENetMultiplayerPeer.xml b/modules/enet/doc_classes/ENetMultiplayerPeer.xml
index 3a37b396a4..f9659c092a 100644
--- a/modules/enet/doc_classes/ENetMultiplayerPeer.xml
+++ b/modules/enet/doc_classes/ENetMultiplayerPeer.xml
@@ -4,7 +4,7 @@
A MultiplayerPeer implementation using the [url=http://enet.bespin.org/index.html]ENet[/url] library.
</brief_description>
<description>
- A MultiplayerPeer implementation that should be passed to [member MultiplayerAPI.network_peer] after being initialized as either a client, server, or mesh. Events can then be handled by connecting to [MultiplayerAPI] signals. See [ENetConnection] for more information on the ENet library wrapper.
+ A MultiplayerPeer implementation that should be passed to [member MultiplayerAPI.multiplayer_peer] after being initialized as either a client, server, or mesh. Events can then be handled by connecting to [MultiplayerAPI] signals. See [ENetConnection] for more information on the ENet library wrapper.
[b]Note:[/b] ENet only uses UDP, not TCP. When forwarding the server port to make your server accessible on the public Internet, you only need to forward the server port in UDP. You can use the [UPNP] class to try to forward the server port automatically when starting the server.
</description>
<tutorials>
@@ -44,7 +44,7 @@
<return type="int" enum="Error" />
<argument index="0" name="unique_id" type="int" />
<description>
- Initialize this [MultiplayerPeer] in mesh mode. The provided [code]unique_id[/code] will be used as the local peer network unique ID once assigned as the [member MultiplayerAPI.network_peer]. In the mesh configuration you will need to set up each new peer manually using [ENetConnection] before calling [method add_mesh_peer]. While this technique is more advanced, it allows for better control over the connection process (e.g. when dealing with NAT punch-through) and for better distribution of the network load (which would otherwise be more taxing on the server).
+ Initialize this [MultiplayerPeer] in mesh mode. The provided [code]unique_id[/code] will be used as the local peer network unique ID once assigned as the [member MultiplayerAPI.multiplayer_peer]. In the mesh configuration you will need to set up each new peer manually using [ENetConnection] before calling [method add_mesh_peer]. While this technique is more advanced, it allows for better control over the connection process (e.g. when dealing with NAT punch-through) and for better distribution of the network load (which would otherwise be more taxing on the server).
</description>
</method>
<method name="create_server">
@@ -77,12 +77,8 @@
<member name="host" type="ENetConnection" setter="" getter="get_host">
The underlying [ENetConnection] created after [method create_client] and [method create_server].
</member>
- <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" override="true" default="false" />
<member name="server_relay" type="bool" setter="set_server_relay_enabled" getter="is_server_relay_enabled" default="true">
Enable or disable the server feature that notifies clients of other peers' connection/disconnection, and relays messages between them. When this option is [code]false[/code], clients won't be automatically notified of other peers and won't be able to send them packets through the server.
</member>
- <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" override="true" enum="MultiplayerPeer.TransferMode" default="2" />
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/enet/doc_classes/ENetPacketPeer.xml b/modules/enet/doc_classes/ENetPacketPeer.xml
index 8f0693fb01..4116ba17f2 100644
--- a/modules/enet/doc_classes/ENetPacketPeer.xml
+++ b/modules/enet/doc_classes/ENetPacketPeer.xml
@@ -6,6 +6,7 @@
<description>
A PacketPeer implementation representing a peer of an [ENetConnection].
This class cannot be instantiated directly but can be retrieved during [method ENetConnection.service] or via [method ENetConnection.get_peers].
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
<link title="API documentation on the ENet website">http://enet.bespin.org/usergroup0.html</link>
diff --git a/modules/enet/enet_multiplayer_peer.cpp b/modules/enet/enet_multiplayer_peer.cpp
index 38ca38385c..52eb46f070 100644
--- a/modules/enet/enet_multiplayer_peer.cpp
+++ b/modules/enet/enet_multiplayer_peer.cpp
@@ -33,22 +33,6 @@
#include "core/io/marshalls.h"
#include "core/os/os.h"
-void ENetMultiplayerPeer::set_transfer_channel(int p_channel) {
- transfer_channel = p_channel;
-}
-
-int ENetMultiplayerPeer::get_transfer_channel() const {
- return transfer_channel;
-}
-
-void ENetMultiplayerPeer::set_transfer_mode(TransferMode p_mode) {
- transfer_mode = p_mode;
-}
-
-MultiplayerPeer::TransferMode ENetMultiplayerPeer::get_transfer_mode() const {
- return transfer_mode;
-}
-
void ENetMultiplayerPeer::set_target_peer(int p_peer) {
target_peer = p_peer;
}
@@ -62,6 +46,7 @@ int ENetMultiplayerPeer::get_packet_peer() const {
Error ENetMultiplayerPeer::create_server(int p_port, int p_max_clients, int p_max_channels, int p_in_bandwidth, int p_out_bandwidth) {
ERR_FAIL_COND_V_MSG(_is_active(), ERR_ALREADY_IN_USE, "The multiplayer instance is already active.");
+ set_refuse_new_connections(false);
Ref<ENetConnection> host;
host.instantiate();
Error err = host->create_host_bound(bind_ip, p_port, p_max_clients, 0, p_max_channels > 0 ? p_max_channels + SYSCH_MAX : 0, p_out_bandwidth);
@@ -70,7 +55,6 @@ Error ENetMultiplayerPeer::create_server(int p_port, int p_max_clients, int p_ma
}
active_mode = MODE_SERVER;
- refuse_connections = false;
unique_id = 1;
connection_status = CONNECTION_CONNECTED;
hosts[0] = host;
@@ -79,6 +63,7 @@ Error ENetMultiplayerPeer::create_server(int p_port, int p_max_clients, int p_ma
Error ENetMultiplayerPeer::create_client(const String &p_address, int p_port, int p_channel_count, int p_in_bandwidth, int p_out_bandwidth, int p_local_port) {
ERR_FAIL_COND_V_MSG(_is_active(), ERR_ALREADY_IN_USE, "The multiplayer instance is already active.");
+ set_refuse_new_connections(false);
Ref<ENetConnection> host;
host.instantiate();
Error err;
@@ -102,7 +87,6 @@ Error ENetMultiplayerPeer::create_client(const String &p_address, int p_port, in
// Need to wait for CONNECT event.
connection_status = CONNECTION_CONNECTING;
active_mode = MODE_CLIENT;
- refuse_connections = false;
peers[1] = peer;
hosts[0] = host;
@@ -113,7 +97,6 @@ Error ENetMultiplayerPeer::create_mesh(int p_id) {
ERR_FAIL_COND_V_MSG(p_id <= 0, ERR_INVALID_PARAMETER, "The unique ID must be greater then 0");
ERR_FAIL_COND_V_MSG(_is_active(), ERR_ALREADY_IN_USE, "The multiplayer instance is already active.");
active_mode = MODE_MESH;
- refuse_connections = false;
unique_id = p_id;
connection_status = CONNECTION_CONNECTED;
return OK;
@@ -145,7 +128,7 @@ bool ENetMultiplayerPeer::_poll_server() {
}
switch (ret) {
case ENetConnection::EVENT_CONNECT: {
- if (refuse_connections) {
+ if (is_refusing_new_connections()) {
event.peer->reset();
return false;
}
@@ -173,7 +156,7 @@ bool ENetMultiplayerPeer::_poll_server() {
emit_signal(SNAME("peer_disconnected"), id);
peers.erase(id);
- if (!server_relay) {
+ if (server_relay) {
_notify_peers(id, false);
}
return false;
@@ -393,7 +376,9 @@ bool ENetMultiplayerPeer::is_server() const {
}
void ENetMultiplayerPeer::close_connection(uint32_t wait_usec) {
- ERR_FAIL_COND_MSG(!_is_active(), "The multiplayer instance isn't currently active.");
+ if (!_is_active()) {
+ return;
+ }
_pop_current_packet();
@@ -421,6 +406,7 @@ void ENetMultiplayerPeer::close_connection(uint32_t wait_usec) {
hosts.clear();
unique_id = 0;
connection_status = CONNECTION_DISCONNECTED;
+ set_refuse_new_connections(false);
}
int ENetMultiplayerPeer::get_available_packet_count() const {
@@ -449,19 +435,20 @@ Error ENetMultiplayerPeer::put_packet(const uint8_t *p_buffer, int p_buffer_size
int packet_flags = 0;
int channel = SYSCH_RELIABLE;
+ int transfer_channel = get_transfer_channel();
if (transfer_channel > 0) {
channel = SYSCH_MAX + transfer_channel - 1;
} else {
- switch (transfer_mode) {
- case TRANSFER_MODE_UNRELIABLE: {
+ switch (get_transfer_mode()) {
+ case Multiplayer::TRANSFER_MODE_UNRELIABLE: {
packet_flags = ENET_PACKET_FLAG_UNSEQUENCED;
channel = SYSCH_UNRELIABLE;
} break;
- case TRANSFER_MODE_UNRELIABLE_ORDERED: {
+ case Multiplayer::TRANSFER_MODE_ORDERED: {
packet_flags = 0;
channel = SYSCH_UNRELIABLE;
} break;
- case TRANSFER_MODE_RELIABLE: {
+ case Multiplayer::TRANSFER_MODE_RELIABLE: {
packet_flags = ENET_PACKET_FLAG_RELIABLE;
channel = SYSCH_RELIABLE;
} break;
@@ -543,19 +530,15 @@ int ENetMultiplayerPeer::get_unique_id() const {
return unique_id;
}
-void ENetMultiplayerPeer::set_refuse_new_connections(bool p_enable) {
- refuse_connections = p_enable;
+void ENetMultiplayerPeer::set_refuse_new_connections(bool p_enabled) {
#ifdef GODOT_ENET
if (_is_active()) {
for (KeyValue<int, Ref<ENetConnection>> &E : hosts) {
- E.value->refuse_new_connections(p_enable);
+ E.value->refuse_new_connections(p_enabled);
}
}
#endif
-}
-
-bool ENetMultiplayerPeer::is_refusing_new_connections() const {
- return refuse_connections;
+ MultiplayerPeer::set_refuse_new_connections(p_enabled);
}
void ENetMultiplayerPeer::set_server_relay_enabled(bool p_enabled) {
diff --git a/modules/enet/enet_multiplayer_peer.h b/modules/enet/enet_multiplayer_peer.h
index 78e280db7c..7a60e2359c 100644
--- a/modules/enet/enet_multiplayer_peer.h
+++ b/modules/enet/enet_multiplayer_peer.h
@@ -32,7 +32,7 @@
#define NETWORKED_MULTIPLAYER_ENET_H
#include "core/crypto/crypto.h"
-#include "core/io/multiplayer_peer.h"
+#include "core/multiplayer/multiplayer_peer.h"
#include "enet_connection.h"
#include <enet/enet.h>
@@ -65,10 +65,7 @@ private:
uint32_t unique_id = 0;
int target_peer = 0;
- int transfer_channel = 0;
- TransferMode transfer_mode = TRANSFER_MODE_RELIABLE;
- bool refuse_connections = false;
bool server_relay = true;
ConnectionStatus connection_status = CONNECTION_DISCONNECTED;
@@ -101,40 +98,31 @@ protected:
static void _bind_methods();
public:
- virtual void set_transfer_channel(int p_channel) override;
- virtual int get_transfer_channel() const override;
-
- virtual void set_transfer_mode(TransferMode p_mode) override;
- virtual TransferMode get_transfer_mode() const override;
virtual void set_target_peer(int p_peer) override;
-
virtual int get_packet_peer() const override;
- Error create_server(int p_port, int p_max_clients = 32, int p_max_channels = 0, int p_in_bandwidth = 0, int p_out_bandwidth = 0);
- Error create_client(const String &p_address, int p_port, int p_channel_count = 0, int p_in_bandwidth = 0, int p_out_bandwidth = 0, int p_local_port = 0);
- Error create_mesh(int p_id);
- Error add_mesh_peer(int p_id, Ref<ENetConnection> p_host);
-
- void close_connection(uint32_t wait_usec = 100);
-
- void disconnect_peer(int p_peer, bool now = false);
-
virtual void poll() override;
-
virtual bool is_server() const override;
+ // Overriden so we can instrument the DTLSServer when needed.
+ virtual void set_refuse_new_connections(bool p_enabled) override;
- virtual int get_available_packet_count() const override;
- virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) override; ///< buffer is GONE after next get_packet
- virtual Error put_packet(const uint8_t *p_buffer, int p_buffer_size) override;
+ virtual ConnectionStatus get_connection_status() const override;
+
+ virtual int get_unique_id() const override;
virtual int get_max_packet_size() const override;
+ virtual int get_available_packet_count() const override;
+ virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) override;
+ virtual Error put_packet(const uint8_t *p_buffer, int p_buffer_size) override;
- virtual ConnectionStatus get_connection_status() const override;
+ Error create_server(int p_port, int p_max_clients = 32, int p_max_channels = 0, int p_in_bandwidth = 0, int p_out_bandwidth = 0);
+ Error create_client(const String &p_address, int p_port, int p_channel_count = 0, int p_in_bandwidth = 0, int p_out_bandwidth = 0, int p_local_port = 0);
+ Error create_mesh(int p_id);
+ Error add_mesh_peer(int p_id, Ref<ENetConnection> p_host);
- virtual void set_refuse_new_connections(bool p_enable) override;
- virtual bool is_refusing_new_connections() const override;
+ void close_connection(uint32_t wait_usec = 100);
- virtual int get_unique_id() const override;
+ void disconnect_peer(int p_peer, bool now = false);
void set_bind_ip(const IPAddress &p_ip);
void set_server_relay_enabled(bool p_enabled);
diff --git a/modules/etcpak/image_compress_etcpak.cpp b/modules/etcpak/image_compress_etcpak.cpp
index abc3c26188..aff7538fb6 100644
--- a/modules/etcpak/image_compress_etcpak.cpp
+++ b/modules/etcpak/image_compress_etcpak.cpp
@@ -165,9 +165,9 @@ void _compress_etcpak(EtcpakType p_compresstype, Image *r_img, float p_lossy_qua
if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC1) {
CompressEtc1RgbDither(src_mip_read, dest_mip_write, blocks, mip_w);
} else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2 || p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2_RA_AS_RG) {
- CompressEtc2Rgb(src_mip_read, dest_mip_write, blocks, mip_w);
+ CompressEtc2Rgb(src_mip_read, dest_mip_write, blocks, mip_w, true);
} else if (p_compresstype == EtcpakType::ETCPAK_TYPE_ETC2_ALPHA) {
- CompressEtc2Rgba(src_mip_read, dest_mip_write, blocks, mip_w);
+ CompressEtc2Rgba(src_mip_read, dest_mip_write, blocks, mip_w, true);
} else if (p_compresstype == EtcpakType::ETCPAK_TYPE_DXT1) {
CompressDxt1Dither(src_mip_read, dest_mip_write, blocks, mip_w);
} else if (p_compresstype == EtcpakType::ETCPAK_TYPE_DXT5 || p_compresstype == EtcpakType::ETCPAK_TYPE_DXT5_RA_AS_RG) {
diff --git a/modules/fbx/data/fbx_material.cpp b/modules/fbx/data/fbx_material.cpp
index fb6c67f7b9..86baec4244 100644
--- a/modules/fbx/data/fbx_material.cpp
+++ b/modules/fbx/data/fbx_material.cpp
@@ -31,7 +31,7 @@
#include "fbx_material.h"
// FIXME: Shouldn't depend on core_bind.h! Use DirAccessRef like the rest of
-// the engine instead of _Directory.
+// the engine instead of core_bind::Directory.
#include "core/core_bind.h"
#include "scene/resources/material.h"
#include "scene/resources/texture.h"
@@ -55,7 +55,7 @@ void FBXMaterial::add_search_string(String p_filename, String p_current_director
}
String find_file(const String &p_base, const String &p_file_to_find) {
- _Directory dir;
+ core_bind::Directory dir;
dir.open(p_base);
dir.list_dir_begin();
@@ -84,7 +84,7 @@ String find_file(const String &p_base, const String &p_file_to_find) {
// fbx will not give us good path information and let's not regex them to fix them
// no relative paths are in fbx generally they have a rel field but it's populated incorrectly by the SDK.
String FBXMaterial::find_texture_path_by_filename(const String p_filename, const String p_current_directory) {
- _Directory dir;
+ core_bind::Directory dir;
Vector<String> paths;
add_search_string(p_filename, p_current_directory, "", paths);
add_search_string(p_filename, p_current_directory, "texture", paths);
diff --git a/modules/fbx/doc_classes/EditorSceneImporterFBX.xml b/modules/fbx/doc_classes/EditorSceneImporterFBX.xml
index da1a68c27c..6f83871772 100644
--- a/modules/fbx/doc_classes/EditorSceneImporterFBX.xml
+++ b/modules/fbx/doc_classes/EditorSceneImporterFBX.xml
@@ -29,8 +29,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/fbx/fbx_parser/FBXParser.cpp b/modules/fbx/fbx_parser/FBXParser.cpp
index a92b23f4ee..d9ef025a16 100644
--- a/modules/fbx/fbx_parser/FBXParser.cpp
+++ b/modules/fbx/fbx_parser/FBXParser.cpp
@@ -575,7 +575,7 @@ void ReadBinaryDataArray(char type, uint32_t count, const char *&data, const cha
std::copy(data, end, buff.begin());
} else if (encmode == 1) {
// zlib/deflate, next comes ZIP head (0x78 0x01)
- // see http://www.ietf.org/rfc/rfc1950.txt
+ // see https://www.ietf.org/rfc/rfc1950.txt
z_stream zstream;
zstream.opaque = Z_NULL;
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index 45354ce692..94bda04d12 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -16,8 +16,6 @@ env_gdnative.Prepend(CPPPATH=["#modules/gdnative/include/"])
Export("env_gdnative")
-SConscript("net/SCsub")
-SConscript("xr/SCsub")
SConscript("pluginscript/SCsub")
SConscript("videodecoder/SCsub")
SConscript("text/SCsub")
diff --git a/modules/gdnative/config.py b/modules/gdnative/config.py
index fd860e9763..026a84a70f 100644
--- a/modules/gdnative/config.py
+++ b/modules/gdnative/config.py
@@ -8,17 +8,11 @@ def configure(env):
def get_doc_classes():
return [
- "XRInterfaceGDNative",
"GDNative",
"GDNativeLibrary",
- "MultiplayerPeerGDNative",
"NativeScript",
- "PacketPeerGDNative",
"PluginScript",
- "StreamPeerGDNative",
"VideoStreamGDNative",
- "WebRTCPeerConnectionGDNative",
- "WebRTCDataChannelGDNative",
]
diff --git a/modules/gdnative/doc_classes/GDNative.xml b/modules/gdnative/doc_classes/GDNative.xml
index e4c5d34a2c..4bc149b119 100644
--- a/modules/gdnative/doc_classes/GDNative.xml
+++ b/modules/gdnative/doc_classes/GDNative.xml
@@ -30,6 +30,4 @@
<member name="library" type="GDNativeLibrary" setter="set_library" getter="get_library">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gdnative/doc_classes/GDNativeLibrary.xml b/modules/gdnative/doc_classes/GDNativeLibrary.xml
index f84d4e60f3..3654870b09 100644
--- a/modules/gdnative/doc_classes/GDNativeLibrary.xml
+++ b/modules/gdnative/doc_classes/GDNativeLibrary.xml
@@ -4,7 +4,7 @@
An external library containing functions or script classes to use in Godot.
</brief_description>
<description>
- A GDNative library can implement [NativeScript]s, global functions to call with the [GDNative] class, or low-level engine extensions through interfaces such as [XRInterfaceGDNative]. The library must be compiled for each platform and architecture that the project will run on.
+ A GDNative library can implement [NativeScript]s, global functions to call with the [GDNative] class, or low-level engine extensions through interfaces such as XRInterfaceGDNative. The library must be compiled for each platform and architecture that the project will run on.
</description>
<tutorials>
<link title="GDNative C example">https://docs.godotengine.org/en/latest/tutorials/plugins/gdnative/gdnative-c-example.html</link>
@@ -45,6 +45,4 @@
On platforms that require statically linking libraries (currently only iOS), each library must have a different [code]symbol_prefix[/code].
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gdnative/doc_classes/MultiplayerPeerGDNative.xml b/modules/gdnative/doc_classes/MultiplayerPeerGDNative.xml
deleted file mode 100644
index b88f5e7e1e..0000000000
--- a/modules/gdnative/doc_classes/MultiplayerPeerGDNative.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerPeerGDNative" inherits="MultiplayerPeer" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/modules/gdnative/doc_classes/NativeScript.xml b/modules/gdnative/doc_classes/NativeScript.xml
index 397d12a3a9..9d34e89f02 100644
--- a/modules/gdnative/doc_classes/NativeScript.xml
+++ b/modules/gdnative/doc_classes/NativeScript.xml
@@ -52,6 +52,4 @@
<member name="script_class_name" type="String" setter="set_script_class_name" getter="get_script_class_name" default="&quot;&quot;">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gdnative/doc_classes/PluginScript.xml b/modules/gdnative/doc_classes/PluginScript.xml
index 8e28187482..ec80ade394 100644
--- a/modules/gdnative/doc_classes/PluginScript.xml
+++ b/modules/gdnative/doc_classes/PluginScript.xml
@@ -14,6 +14,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/modules/gdnative/doc_classes/StreamPeerGDNative.xml b/modules/gdnative/doc_classes/StreamPeerGDNative.xml
deleted file mode 100644
index de76277fff..0000000000
--- a/modules/gdnative/doc_classes/StreamPeerGDNative.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerGDNative" inherits="StreamPeer" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/modules/gdnative/doc_classes/VideoStreamGDNative.xml b/modules/gdnative/doc_classes/VideoStreamGDNative.xml
index 8b1a3210df..dc64e8fc18 100644
--- a/modules/gdnative/doc_classes/VideoStreamGDNative.xml
+++ b/modules/gdnative/doc_classes/VideoStreamGDNative.xml
@@ -24,6 +24,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/modules/gdnative/doc_classes/WebRTCDataChannelGDNative.xml b/modules/gdnative/doc_classes/WebRTCDataChannelGDNative.xml
deleted file mode 100644
index f32a4f0a23..0000000000
--- a/modules/gdnative/doc_classes/WebRTCDataChannelGDNative.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebRTCDataChannelGDNative" inherits="WebRTCDataChannel" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/modules/gdnative/doc_classes/WebRTCPeerConnectionGDNative.xml b/modules/gdnative/doc_classes/WebRTCPeerConnectionGDNative.xml
deleted file mode 100644
index 82f8633bb6..0000000000
--- a/modules/gdnative/doc_classes/WebRTCPeerConnectionGDNative.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebRTCPeerConnectionGDNative" inherits="WebRTCPeerConnection" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/modules/gdnative/doc_classes/XRInterfaceGDNative.xml b/modules/gdnative/doc_classes/XRInterfaceGDNative.xml
deleted file mode 100644
index 13de815793..0000000000
--- a/modules/gdnative/doc_classes/XRInterfaceGDNative.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="XRInterfaceGDNative" inherits="XRInterface" version="4.0">
- <brief_description>
- GDNative wrapper for an XR interface.
- </brief_description>
- <description>
- This is a wrapper class for GDNative implementations of the XR interface. To use a GDNative XR interface, simply instantiate this object and set your GDNative library containing the XR interface implementation.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index 8c65447e5d..627883886c 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -5048,169 +5048,6 @@
]
},
{
- "name": "xr",
- "type": "XR",
- "version": {
- "major": 1,
- "minor": 1
- },
- "next": null,
- "api": [
- {
- "name": "godot_xr_register_interface",
- "return_type": "void",
- "arguments": [
- [
- "const godot_xr_interface_gdnative *",
- "p_interface"
- ]
- ]
- },
- {
- "name": "godot_xr_get_worldscale",
- "return_type": "godot_real_t",
- "arguments": []
- },
- {
- "name": "godot_xr_get_reference_frame",
- "return_type": "godot_transform3d",
- "arguments": []
- },
- {
- "name": "godot_xr_blit",
- "return_type": "void",
- "arguments": [
- [
- "godot_int",
- "p_eye"
- ],
- [
- "godot_rid *",
- "p_render_target"
- ],
- [
- "godot_rect2 *",
- "p_screen_rect"
- ]
- ]
- },
- {
- "name": "godot_xr_get_texid",
- "return_type": "godot_int",
- "arguments": [
- [
- "godot_rid *",
- "p_render_target"
- ]
- ]
- },
- {
- "name": "godot_xr_add_controller",
- "return_type": "godot_int",
- "arguments": [
- [
- "char *",
- "p_device_name"
- ],
- [
- "godot_int",
- "p_hand"
- ],
- [
- "godot_bool",
- "p_tracks_orientation"
- ],
- [
- "godot_bool",
- "p_tracks_position"
- ]
- ]
- },
- {
- "name": "godot_xr_remove_controller",
- "return_type": "void",
- "arguments": [
- [
- "godot_int",
- "p_controller_id"
- ]
- ]
- },
- {
- "name": "godot_xr_set_controller_transform",
- "return_type": "void",
- "arguments": [
- [
- "godot_int",
- "p_controller_id"
- ],
- [
- "godot_transform3d *",
- "p_transform"
- ],
- [
- "godot_bool",
- "p_tracks_orientation"
- ],
- [
- "godot_bool",
- "p_tracks_position"
- ]
- ]
- },
- {
- "name": "godot_xr_set_controller_button",
- "return_type": "void",
- "arguments": [
- [
- "godot_int",
- "p_controller_id"
- ],
- [
- "godot_int",
- "p_button"
- ],
- [
- "godot_bool",
- "p_is_pressed"
- ]
- ]
- },
- {
- "name": "godot_xr_set_controller_axis",
- "return_type": "void",
- "arguments": [
- [
- "godot_int",
- "p_controller_id"
- ],
- [
- "godot_int",
- "p_exis"
- ],
- [
- "godot_real_t",
- "p_value"
- ],
- [
- "godot_bool",
- "p_can_be_negative"
- ]
- ]
- },
- {
- "name": "godot_xr_get_controller_rumble",
- "return_type": "godot_real_t",
- "arguments": [
- [
- "godot_int",
- "p_controller_id"
- ]
- ]
- }
- ]
- },
- {
"name": "videodecoder",
"type": "VIDEODECODER",
"version": {
@@ -5268,97 +5105,6 @@
]
},
{
- "name": "net",
- "type": "NET",
- "version": {
- "major": 4,
- "minor": 0
- },
- "next": null,
- "api": [
- {
- "name": "godot_net_bind_stream_peer",
- "return_type": "void",
- "arguments": [
- [
- "godot_object *",
- "p_obj"
- ],
- [
- "const godot_net_stream_peer *",
- "p_interface"
- ]
- ]
- },
- {
- "name": "godot_net_bind_packet_peer",
- "return_type": "void",
- "arguments": [
- [
- "godot_object *",
- "p_obj"
- ],
- [
- "const godot_net_packet_peer *",
- "p_interface"
- ]
- ]
- },
- {
- "name": "godot_net_bind_multiplayer_peer",
- "return_type": "void",
- "arguments": [
- [
- "godot_object *",
- "p_obj"
- ],
- [
- "const godot_net_multiplayer_peer *",
- "p_interface"
- ]
- ]
- },
- {
- "name": "godot_net_set_webrtc_library",
- "return_type": "godot_error",
- "arguments": [
- [
- "const godot_net_webrtc_library *",
- "p_library"
- ]
- ]
- },
- {
- "name": "godot_net_bind_webrtc_peer_connection",
- "return_type": "void",
- "arguments": [
- [
- "godot_object *",
- "p_obj"
- ],
- [
- "const godot_net_webrtc_peer_connection *",
- "p_interface"
- ]
- ]
- },
- {
- "name": "godot_net_bind_webrtc_data_channel",
- "return_type": "void",
- "arguments": [
- [
- "godot_object *",
- "p_obj"
- ],
- [
- "const godot_net_webrtc_data_channel *",
- "p_interface"
- ]
- ]
- }
- ]
- },
- {
"name": "text",
"type": "TEXT",
"version": {
@@ -5517,7 +5263,7 @@
},
{
"name": "godot_glyph_get_advance",
- "return_type": "godot_float",
+ "return_type": "godot_real_t",
"arguments": [
[
"const godot_glyph *",
@@ -5534,7 +5280,7 @@
"p_self"
],
[
- "godot_float",
+ "godot_real_t",
"p_advance"
]
]
diff --git a/modules/gdnative/gdnative_builders.py b/modules/gdnative/gdnative_builders.py
index d03298d7a9..4986b173cf 100644
--- a/modules/gdnative/gdnative_builders.py
+++ b/modules/gdnative/gdnative_builders.py
@@ -19,9 +19,7 @@ def _build_gdnative_api_struct_header(api):
"",
"#include <gdnative/gdnative.h>",
"#include <android/godot_android.h>",
- "#include <xr/godot_xr.h>",
"#include <nativescript/godot_nativescript.h>",
- "#include <net/godot_net.h>",
"#include <pluginscript/godot_pluginscript.h>",
"#include <videodecoder/godot_videodecoder.h>",
"#include <text/godot_text.h>",
diff --git a/modules/gdnative/include/nativescript/godot_nativescript.h b/modules/gdnative/include/nativescript/godot_nativescript.h
index c97f5f0389..09eac2492f 100644
--- a/modules/gdnative/include/nativescript/godot_nativescript.h
+++ b/modules/gdnative/include/nativescript/godot_nativescript.h
@@ -39,12 +39,8 @@ extern "C" {
typedef enum {
GODOT_METHOD_RPC_MODE_DISABLED,
- GODOT_METHOD_RPC_MODE_REMOTE,
- GODOT_METHOD_RPC_MODE_MASTER,
- GODOT_METHOD_RPC_MODE_PUPPET,
- GODOT_METHOD_RPC_MODE_REMOTESYNC,
- GODOT_METHOD_RPC_MODE_MASTERSYNC,
- GODOT_METHOD_RPC_MODE_PUPPETSYNC,
+ GODOT_METHOD_RPC_MODE_ANY,
+ GODOT_METHOD_RPC_MODE_AUTHORITY,
} godot_nativescript_method_rpc_mode;
typedef enum {
diff --git a/modules/gdnative/include/net/godot_net.h b/modules/gdnative/include/net/godot_net.h
deleted file mode 100644
index 3fb7b9e1cc..0000000000
--- a/modules/gdnative/include/net/godot_net.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*************************************************************************/
-/* godot_net.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef GODOT_NATIVENET_H
-#define GODOT_NATIVENET_H
-
-#include <gdnative/gdnative.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// For future versions of the API we should only add new functions at the end of the structure and use the
-// version info to detect whether a call is available
-
-// Use these to populate version in your plugin
-#define GODOT_NET_API_MAJOR 3
-#define GODOT_NET_API_MINOR 1
-
-typedef struct {
- godot_gdnative_api_version version; /* version of our API */
- godot_object *data; /* User reference */
-
- /* This is StreamPeer */
- godot_error (*get_data)(void *user, uint8_t *p_buffer, int p_bytes);
- godot_error (*get_partial_data)(void *user, uint8_t *p_buffer, int p_bytes, int *r_received);
- godot_error (*put_data)(void *user, const uint8_t *p_data, int p_bytes);
- godot_error (*put_partial_data)(void *user, const uint8_t *p_data, int p_bytes, int *r_sent);
-
- int (*get_available_bytes)(const void *user);
-
- void *next; /* For extension? */
-} godot_net_stream_peer;
-
-/* Binds a StreamPeerGDNative to the provided interface */
-void godot_net_bind_stream_peer(godot_object *p_obj, const godot_net_stream_peer *p_interface);
-
-typedef struct {
- godot_gdnative_api_version version; /* version of our API */
-
- godot_object *data; /* User reference */
-
- /* This is PacketPeer */
- godot_error (*get_packet)(void *, const uint8_t **, int *);
- godot_error (*put_packet)(void *, const uint8_t *, int);
- godot_int (*get_available_packet_count)(const void *);
- godot_int (*get_max_packet_size)(const void *);
-
- void *next; /* For extension? */
-} godot_net_packet_peer;
-
-/* Binds a PacketPeerGDNative to the provided interface */
-void GDAPI godot_net_bind_packet_peer(godot_object *p_obj, const godot_net_packet_peer *);
-
-typedef struct {
- godot_gdnative_api_version version; /* version of our API */
-
- godot_object *data; /* User reference */
-
- /* This is PacketPeer */
- godot_error (*get_packet)(void *, const uint8_t **, int *);
- godot_error (*put_packet)(void *, const uint8_t *, int);
- godot_int (*get_available_packet_count)(const void *);
- godot_int (*get_max_packet_size)(const void *);
-
- /* This is MultiplayerPeer */
- void (*set_transfer_channel)(void *, godot_int);
- godot_int (*get_transfer_channel)(void *);
- void (*set_transfer_mode)(void *, godot_int);
- godot_int (*get_transfer_mode)(const void *);
- // 0 = broadcast, 1 = server, <0 = all but abs(value)
- void (*set_target_peer)(void *, godot_int);
- godot_int (*get_packet_peer)(const void *);
- godot_bool (*is_server)(const void *);
- void (*poll)(void *);
- // Must be > 0, 1 is for server
- int32_t (*get_unique_id)(const void *);
- void (*set_refuse_new_connections)(void *, godot_bool);
- godot_bool (*is_refusing_new_connections)(const void *);
- godot_int (*get_connection_status)(const void *);
-
- void *next; /* For extension? Or maybe not... */
-} godot_net_multiplayer_peer;
-
-/* Binds a MultiplayerPeerGDNative to the provided interface */
-void GDAPI godot_net_bind_multiplayer_peer(godot_object *p_obj, const godot_net_multiplayer_peer *);
-
-#ifdef __cplusplus
-}
-#endif
-
-// WebRTC Bindings
-#include "net/godot_webrtc.h"
-
-#endif /* GODOT_NATIVENET_H */
diff --git a/modules/gdnative/include/net/godot_webrtc.h b/modules/gdnative/include/net/godot_webrtc.h
deleted file mode 100644
index 52006e56ec..0000000000
--- a/modules/gdnative/include/net/godot_webrtc.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*************************************************************************/
-/* godot_webrtc.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef GODOT_NATIVEWEBRTC_H
-#define GODOT_NATIVEWEBRTC_H
-
-#include <gdnative/gdnative.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define GODOT_NET_WEBRTC_API_MAJOR 4
-#define GODOT_NET_WEBRTC_API_MINOR 0
-
-/* Library Interface (used to set default GDNative WebRTC implementation */
-typedef struct {
- godot_gdnative_api_version version; /* version of our API */
-
- /* Called when the library is unset as default interface via godot_net_set_webrtc_library */
- void (*unregistered)();
-
- /* Used by WebRTCPeerConnection create when GDNative is the default implementation. */
- /* Takes a pointer to WebRTCPeerConnectionGDNative, should bind and return OK, failure if binding was unsuccessful. */
- godot_error (*create_peer_connection)(godot_object *);
-
- void *next; /* For extension */
-} godot_net_webrtc_library;
-
-/* WebRTCPeerConnection interface */
-typedef struct {
- godot_gdnative_api_version version; /* version of our API */
-
- godot_object *data; /* User reference */
-
- /* This is WebRTCPeerConnection */
- godot_int (*get_connection_state)(const void *);
-
- godot_error (*initialize)(void *, const godot_dictionary *);
- godot_object *(*create_data_channel)(void *, const char *p_channel_name, const godot_dictionary *);
- godot_error (*create_offer)(void *);
- godot_error (*create_answer)(void *); /* unused for now, should be done automatically on set_local_description */
- godot_error (*set_remote_description)(void *, const char *, const char *);
- godot_error (*set_local_description)(void *, const char *, const char *);
- godot_error (*add_ice_candidate)(void *, const char *, int, const char *);
- godot_error (*poll)(void *);
- void (*close)(void *);
-
- void *next; /* For extension? */
-} godot_net_webrtc_peer_connection;
-
-/* WebRTCDataChannel interface */
-typedef struct {
- godot_gdnative_api_version version; /* version of our API */
-
- godot_object *data; /* User reference */
-
- /* This is PacketPeer */
- godot_error (*get_packet)(void *, const uint8_t **, int *);
- godot_error (*put_packet)(void *, const uint8_t *, int);
- godot_int (*get_available_packet_count)(const void *);
- godot_int (*get_max_packet_size)(const void *);
-
- /* This is WebRTCDataChannel */
- void (*set_write_mode)(void *, godot_int);
- godot_int (*get_write_mode)(const void *);
- bool (*was_string_packet)(const void *);
-
- godot_int (*get_ready_state)(const void *);
- const char *(*get_label)(const void *);
- bool (*is_ordered)(const void *);
- int (*get_id)(const void *);
- int (*get_max_packet_life_time)(const void *);
- int (*get_max_retransmits)(const void *);
- const char *(*get_protocol)(const void *);
- bool (*is_negotiated)(const void *);
- int (*get_buffered_amount)(const void *);
-
- godot_error (*poll)(void *);
- void (*close)(void *);
-
- void *next; /* For extension? */
-} godot_net_webrtc_data_channel;
-
-/* Set the default GDNative library */
-godot_error GDAPI godot_net_set_webrtc_library(const godot_net_webrtc_library *);
-/* Binds a WebRTCPeerConnectionGDNative to the provided interface */
-void GDAPI godot_net_bind_webrtc_peer_connection(godot_object *p_obj, const godot_net_webrtc_peer_connection *);
-/* Binds a WebRTCDataChannelGDNative to the provided interface */
-void GDAPI godot_net_bind_webrtc_data_channel(godot_object *p_obj, const godot_net_webrtc_data_channel *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/modules/gdnative/include/text/godot_text.h b/modules/gdnative/include/text/godot_text.h
index 6428f2f149..940cfd11f8 100644
--- a/modules/gdnative/include/text/godot_text.h
+++ b/modules/gdnative/include/text/godot_text.h
@@ -60,68 +60,109 @@ typedef struct {
typedef struct {
godot_gdnative_api_version version;
+
void *(*constructor)(godot_object *);
void (*destructor)(void *);
+
godot_string (*get_name)(const void *);
godot_bool (*has_feature)(const void *, godot_int);
+
+ void (*free)(void *, godot_rid *);
+ bool (*has)(void *, godot_rid *);
+
bool (*load_support_data)(void *, const godot_string *);
godot_string (*get_support_data_filename)(const void *);
godot_string (*get_support_data_info)(const void *);
bool (*save_support_data)(void *, const godot_string *);
+
bool (*is_locale_right_to_left)(void *, const godot_string *);
- void (*free)(void *, godot_rid *);
- bool (*has)(void *, godot_rid *);
- godot_rid (*create_font_system)(void *, const godot_string *, int);
- godot_rid (*create_font_resource)(void *, const godot_string *, int);
- godot_rid (*create_font_memory)(void *, const uint8_t *, size_t, godot_string *, int);
- godot_rid (*create_font_bitmap)(void *, float, float, int);
- void (*font_bitmap_add_texture)(void *, godot_rid *, const godot_object *);
- void (*font_bitmap_add_char)(void *, godot_rid *, char32_t, int, const godot_rect2 *, const godot_vector2 *, float);
- void (*font_bitmap_add_kerning_pair)(void *, godot_rid *, char32_t, char32_t, int);
- float (*font_get_height)(void *, godot_rid *, int);
- float (*font_get_ascent)(void *, godot_rid *, int);
- float (*font_get_descent)(void *, godot_rid *, int);
- float (*font_get_underline_position)(void *, godot_rid *, int);
- float (*font_get_underline_thickness)(void *, godot_rid *, int);
- int (*font_get_spacing_space)(void *, godot_rid *);
- void (*font_set_spacing_space)(void *, godot_rid *, int);
- int (*font_get_spacing_glyph)(void *, godot_rid *);
- void (*font_set_spacing_glyph)(void *, godot_rid *, int);
+ int32_t (*name_to_tag)(const void *, const godot_string *);
+ godot_string (*tag_to_name)(const void *, int32_t);
+
+ godot_rid (*create_font)(void *);
+ void (*font_set_data)(void *, godot_rid *, const godot_packed_byte_array *);
+ void (*font_set_data_ptr)(void *, godot_rid *, const uint8_t *, size_t);
void (*font_set_antialiased)(void *, godot_rid *, bool);
- bool (*font_get_antialiased)(void *, godot_rid *);
- godot_dictionary (*font_get_feature_list)(void *, godot_rid *);
- godot_dictionary (*font_get_variation_list)(void *, godot_rid *);
- void (*font_set_variation)(void *, godot_rid *, const godot_string *, double);
- double (*font_get_variation)(void *, godot_rid *, const godot_string *);
- void (*font_set_distance_field_hint)(void *, godot_rid *, bool);
- bool (*font_get_distance_field_hint)(void *, godot_rid *);
- void (*font_set_hinting)(void *, godot_rid *, godot_int);
- godot_int (*font_get_hinting)(void *, godot_rid *);
+ bool (*font_is_antialiased)(const void *, godot_rid *);
+ void (*font_set_multichannel_signed_distance_field)(void *, godot_rid *, bool);
+ bool (*font_is_multichannel_signed_distance_field)(const void *, godot_rid *);
+ void (*font_set_msdf_pixel_range)(void *, godot_rid *, godot_int);
+ godot_int (*font_get_msdf_pixel_range)(const void *, godot_rid *);
+ void (*font_set_msdf_size)(void *, godot_rid *, godot_int);
+ godot_int (*font_get_msdf_size)(const void *, godot_rid *);
+ void (*font_set_fixed_size)(void *, godot_rid *, godot_int);
+ godot_int (*font_get_fixed_size)(const void *, godot_rid *);
void (*font_set_force_autohinter)(void *, godot_rid *, bool);
- bool (*font_get_force_autohinter)(void *, godot_rid *);
- bool (*font_has_char)(void *, godot_rid *, char32_t);
- godot_string (*font_get_supported_chars)(void *, godot_rid *);
- bool (*font_has_outline)(void *, godot_rid *);
- int (*font_get_base_size)(void *, godot_rid *);
- bool (*font_is_language_supported)(void *, godot_rid *, const godot_string *);
+ bool (*font_is_force_autohinter)(const void *, godot_rid *);
+ void (*font_set_hinting)(void *, godot_rid *, godot_int);
+ godot_int (*font_get_hinting)(const void *, godot_rid *);
+ void (*font_set_variation_coordinates)(void *, godot_rid *, const godot_dictionary *);
+ godot_dictionary (*font_get_variation_coordinates)(const void *, godot_rid *);
+ void (*font_set_oversampling)(void *, godot_rid *, godot_real_t);
+ godot_real_t (*font_get_oversampling)(const void *, godot_rid *);
+ godot_array (*font_get_size_cache_list)(const void *, godot_rid *);
+ void (*font_clear_size_cache)(void *, godot_rid *);
+ void (*font_remove_size_cache)(void *, godot_rid *, const godot_vector2i *);
+ void (*font_set_ascent)(void *, godot_rid *, godot_int, godot_real_t);
+ godot_real_t (*font_get_ascent)(const void *, godot_rid *, godot_int);
+ void (*font_set_descent)(void *, godot_rid *, godot_int, godot_real_t);
+ godot_real_t (*font_get_descent)(const void *, godot_rid *, godot_int);
+ void (*font_set_underline_position)(void *, godot_rid *, godot_int, godot_real_t);
+ godot_real_t (*font_get_underline_position)(const void *, godot_rid *, godot_int);
+ void (*font_set_underline_thickness)(void *, godot_rid *, godot_int, godot_real_t);
+ godot_real_t (*font_get_underline_thickness)(const void *, godot_rid *, godot_int);
+ void (*font_set_scale)(void *, godot_rid *, godot_int, godot_real_t);
+ godot_real_t (*font_get_scale)(const void *, godot_rid *, godot_int);
+ void (*font_set_spacing)(void *, godot_rid *, godot_int, godot_int, godot_int);
+ godot_int (*font_get_spacing)(const void *, godot_rid *, godot_int, godot_int);
+ godot_int (*font_get_texture_count)(const void *, godot_rid *, const godot_vector2i *);
+ void (*font_clear_textures)(void *, godot_rid *, const godot_vector2i *);
+ void (*font_remove_texture)(void *, godot_rid *, const godot_vector2i *, godot_int);
+ void (*font_set_texture_image)(void *, godot_rid *, const godot_vector2i *, godot_int, const godot_object *);
+ godot_object *(*font_get_texture_image)(const void *, godot_rid *, const godot_vector2i *, godot_int);
+ void (*font_set_texture_offsets)(void *, godot_rid *, const godot_vector2i *, godot_int, const godot_packed_int32_array *);
+ godot_packed_int32_array (*font_get_texture_offsets)(const void *, godot_rid *, const godot_vector2i *, godot_int);
+ godot_array (*font_get_glyph_list)(const void *, godot_rid *, const godot_vector2i *);
+ void (*font_clear_glyphs)(void *, godot_rid *, const godot_vector2i *);
+ void (*font_remove_glyph)(void *, godot_rid *, const godot_vector2i *, int32_t);
+ godot_vector2 (*font_get_glyph_advance)(const void *, godot_rid *, godot_int, int32_t);
+ void (*font_set_glyph_advance)(void *, godot_rid *, godot_int, int32_t, const godot_vector2 *);
+ godot_vector2 (*font_get_glyph_offset)(const void *, godot_rid *, const godot_vector2i *, int32_t);
+ void (*font_set_glyph_offset)(void *, godot_rid *, const godot_vector2i *, int32_t, const godot_vector2 *);
+ godot_vector2 (*font_get_glyph_size)(const void *, godot_rid *, const godot_vector2i *, int32_t);
+ void (*font_set_glyph_size)(void *, godot_rid *, const godot_vector2i *, int32_t, const godot_vector2 *);
+ godot_rect2 (*font_get_glyph_uv_rect)(const void *, godot_rid *, const godot_vector2i *, int32_t);
+ void (*font_set_glyph_uv_rect)(void *, godot_rid *, const godot_vector2i *, int32_t, const godot_rect2 *);
+ godot_int (*font_get_glyph_texture_idx)(const void *, godot_rid *, const godot_vector2i *, int32_t);
+ void (*font_set_glyph_texture_idx)(void *, godot_rid *, const godot_vector2i *, int32_t, godot_int);
+ bool (*font_get_glyph_contours)(const void *, godot_rid *, godot_int, int32_t, godot_packed_vector3_array *, godot_packed_int32_array *, bool *);
+ godot_array (*font_get_kerning_list)(const void *, godot_rid *, godot_int);
+ void (*font_clear_kerning_map)(void *, godot_rid *, godot_int);
+ void (*font_remove_kerning)(void *, godot_rid *, godot_int, const godot_vector2i *);
+ void (*font_set_kerning)(void *, godot_rid *, godot_int, const godot_vector2i *, const godot_vector2 *);
+ godot_vector2 (*font_get_kerning)(const void *, godot_rid *, godot_int, const godot_vector2i *);
+ int32_t (*font_get_glyph_index)(const void *, godot_rid *, godot_int, char32_t, char32_t);
+ bool (*font_has_char)(const void *, godot_rid *, char32_t);
+ godot_string (*font_get_supported_chars)(const void *, godot_rid *);
+ void (*font_render_range)(void *, godot_rid *, const godot_vector2i *, char32_t, char32_t);
+ void (*font_render_glyph)(void *, godot_rid *, const godot_vector2i *, int32_t);
+ void (*font_draw_glyph)(const void *, godot_rid *, godot_rid *, godot_int, const godot_vector2 *, int32_t, const godot_color *);
+ void (*font_draw_glyph_outline)(const void *, godot_rid *, godot_rid *, godot_int, godot_int, const godot_vector2 *, int32_t, const godot_color *);
+ bool (*font_is_language_supported)(const void *, godot_rid *, const godot_string *);
void (*font_set_language_support_override)(void *, godot_rid *, const godot_string *, bool);
- bool (*font_get_language_support_override)(void *, godot_rid *, const godot_string *);
+ bool (*font_get_language_support_override)(const void *, godot_rid *, const godot_string *);
void (*font_remove_language_support_override)(void *, godot_rid *, const godot_string *);
- godot_packed_string_array (*font_get_language_support_overrides)(void *, godot_rid *);
- bool (*font_is_script_supported)(void *, godot_rid *, const godot_string *);
+ godot_packed_string_array (*font_get_language_support_overrides)(const void *, godot_rid *);
+ bool (*font_is_script_supported)(const void *, godot_rid *, const godot_string *);
void (*font_set_script_support_override)(void *, godot_rid *, const godot_string *, bool);
- bool (*font_get_script_support_override)(void *, godot_rid *, const godot_string *);
+ bool (*font_get_script_support_override)(const void *, godot_rid *, const godot_string *);
void (*font_remove_script_support_override)(void *, godot_rid *, const godot_string *);
- godot_packed_string_array (*font_get_script_support_overrides)(void *, godot_rid *);
- uint32_t (*font_get_glyph_index)(void *, godot_rid *, char32_t, char32_t);
- godot_vector2 (*font_get_glyph_advance)(void *, godot_rid *, uint32_t, int);
- godot_vector2 (*font_get_glyph_kerning)(void *, godot_rid *, uint32_t, uint32_t, int);
- godot_vector2 (*font_draw_glyph)(void *, godot_rid *, godot_rid *, int, const godot_vector2 *, uint32_t, const godot_color *);
- godot_vector2 (*font_draw_glyph_outline)(void *, godot_rid *, godot_rid *, int, int, const godot_vector2 *, uint32_t, const godot_color *);
- bool (*font_get_glyph_contours)(void *, godot_rid *, int, uint32_t, godot_packed_vector3_array *, godot_packed_int32_array *, bool *);
- float (*font_get_oversampling)(void *);
- void (*font_set_oversampling)(void *, float);
- godot_packed_string_array (*get_system_fonts)(void *);
+ godot_packed_string_array (*font_get_script_support_overrides)(const void *, godot_rid *);
+ godot_dictionary (*font_supported_feature_list)(const void *, godot_rid *);
+ godot_dictionary (*font_supported_variation_list)(const void *, godot_rid *);
+ godot_real_t (*font_get_global_oversampling)(const void *);
+ void (*font_set_global_oversampling)(void *, godot_real_t);
+
godot_rid (*create_shaped_text)(void *, godot_int, godot_int);
void (*shaped_text_clear)(void *, godot_rid *);
void (*shaped_text_set_direction)(void *, godot_rid *, godot_int);
@@ -138,27 +179,28 @@ typedef struct {
bool (*shaped_text_resize_object)(void *, godot_rid *, const godot_variant *, const godot_vector2 *, godot_int);
godot_rid (*shaped_text_substr)(void *, godot_rid *, godot_int, godot_int);
godot_rid (*shaped_text_get_parent)(void *, godot_rid *);
- float (*shaped_text_fit_to_width)(void *, godot_rid *, float, uint8_t);
- float (*shaped_text_tab_align)(void *, godot_rid *, godot_packed_float32_array *);
+ godot_real_t (*shaped_text_fit_to_width)(void *, godot_rid *, godot_real_t, uint8_t);
+ godot_real_t (*shaped_text_tab_align)(void *, godot_rid *, godot_packed_float32_array *);
bool (*shaped_text_shape)(void *, godot_rid *);
bool (*shaped_text_update_breaks)(void *, godot_rid *);
bool (*shaped_text_update_justification_ops)(void *, godot_rid *);
- void (*shaped_text_overrun_trim_to_width)(void *, godot_rid *, float, uint8_t);
+ void (*shaped_text_overrun_trim_to_width)(void *, godot_rid *, godot_real_t, uint8_t);
bool (*shaped_text_is_ready)(void *, godot_rid *);
godot_packed_glyph_array (*shaped_text_get_glyphs)(void *, godot_rid *);
godot_vector2i (*shaped_text_get_range)(void *, godot_rid *);
godot_packed_glyph_array (*shaped_text_sort_logical)(void *, godot_rid *);
godot_packed_vector2i_array (*shaped_text_get_line_breaks_adv)(void *, godot_rid *, godot_packed_float32_array *, int, bool, uint8_t);
- godot_packed_vector2i_array (*shaped_text_get_line_breaks)(void *, godot_rid *, float, int, uint8_t);
+ godot_packed_vector2i_array (*shaped_text_get_line_breaks)(void *, godot_rid *, godot_real_t, int, uint8_t);
godot_packed_vector2i_array (*shaped_text_get_word_breaks)(void *, godot_rid *, int);
godot_array (*shaped_text_get_objects)(void *, godot_rid *);
godot_rect2 (*shaped_text_get_object_rect)(void *, godot_rid *, const godot_variant *);
godot_vector2 (*shaped_text_get_size)(void *, godot_rid *);
- float (*shaped_text_get_ascent)(void *, godot_rid *);
- float (*shaped_text_get_descent)(void *, godot_rid *);
- float (*shaped_text_get_width)(void *, godot_rid *);
- float (*shaped_text_get_underline_position)(void *, godot_rid *);
- float (*shaped_text_get_underline_thickness)(void *, godot_rid *);
+ godot_real_t (*shaped_text_get_ascent)(void *, godot_rid *);
+ godot_real_t (*shaped_text_get_descent)(void *, godot_rid *);
+ godot_real_t (*shaped_text_get_width)(void *, godot_rid *);
+ godot_real_t (*shaped_text_get_underline_position)(void *, godot_rid *);
+ godot_real_t (*shaped_text_get_underline_thickness)(void *, godot_rid *);
+
godot_string (*format_number)(void *, const godot_string *, const godot_string *);
godot_string (*parse_number)(void *, const godot_string *, const godot_string *);
godot_string (*percent_sign)(void *, const godot_string *);
@@ -185,8 +227,8 @@ void GDAPI godot_glyph_set_flags(godot_glyph *p_self, godot_int p_flags);
godot_vector2 GDAPI godot_glyph_get_offset(const godot_glyph *p_self);
void GDAPI godot_glyph_set_offset(godot_glyph *p_self, const godot_vector2 *p_offset);
-godot_float GDAPI godot_glyph_get_advance(const godot_glyph *p_self);
-void GDAPI godot_glyph_set_advance(godot_glyph *p_self, godot_float p_advance);
+godot_real_t GDAPI godot_glyph_get_advance(const godot_glyph *p_self);
+void GDAPI godot_glyph_set_advance(godot_glyph *p_self, godot_real_t p_advance);
godot_rid GDAPI godot_glyph_get_font(const godot_glyph *p_self);
void GDAPI godot_glyph_set_font(godot_glyph *p_self, godot_rid *p_font);
diff --git a/modules/gdnative/include/xr/godot_xr.h b/modules/gdnative/include/xr/godot_xr.h
deleted file mode 100644
index 53cb830cbb..0000000000
--- a/modules/gdnative/include/xr/godot_xr.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*************************************************************************/
-/* godot_xr.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef GODOT_NATIVEXR_H
-#define GODOT_NATIVEXR_H
-
-#include <gdnative/gdnative.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// For future versions of the API we should only add new functions at the end of the structure and use the
-// version info to detect whether a call is available
-
-// Use these to populate version in your plugin
-#define GODOTVR_API_MAJOR 4
-#define GODOTVR_API_MINOR 0
-
-typedef struct {
- godot_gdnative_api_version version; /* version of our API */
- void *(*constructor)(godot_object *);
- void (*destructor)(void *);
- godot_string (*get_name)(const void *);
- godot_int (*get_capabilities)(const void *);
- godot_bool (*get_anchor_detection_is_enabled)(const void *);
- void (*set_anchor_detection_is_enabled)(void *, godot_bool);
- godot_int (*get_view_count)(const void *);
- godot_bool (*is_initialized)(const void *);
- godot_bool (*initialize)(void *);
- void (*uninitialize)(void *);
- godot_vector2 (*get_render_targetsize)(const void *);
-
- godot_transform3d (*get_camera_transform)(void *);
- godot_transform3d (*get_transform_for_view)(void *, godot_int, godot_transform3d *);
- void (*fill_projection_for_view)(void *, godot_real_t *, godot_int, godot_real_t, godot_real_t, godot_real_t);
- void (*commit_views)(void *, godot_rid *, godot_rect2 *);
-
- void (*process)(void *);
- void (*notification)(void *, godot_int);
- godot_int (*get_camera_feed_id)(void *);
-
- // possibly deprecate but adding/keeping as a reminder these are in Godot 3
- void (*commit_for_eye)(void *, godot_int, godot_rid *, godot_rect2 *);
- godot_int (*get_external_texture_for_eye)(void *, godot_int);
- godot_int (*get_external_depth_for_eye)(void *, godot_int);
-} godot_xr_interface_gdnative;
-
-void GDAPI godot_xr_register_interface(const godot_xr_interface_gdnative *p_interface);
-
-// helper functions to access XRServer data
-godot_real_t GDAPI godot_xr_get_worldscale();
-godot_transform3d GDAPI godot_xr_get_reference_frame();
-
-// helper functions for rendering
-void GDAPI godot_xr_blit(godot_int p_eye, godot_rid *p_render_target, godot_rect2 *p_rect);
-godot_int GDAPI godot_xr_get_texid(godot_rid *p_render_target);
-
-// helper functions for updating XR controllers
-godot_int GDAPI godot_xr_add_controller(char *p_device_name, godot_int p_hand, godot_bool p_tracks_orientation, godot_bool p_tracks_position);
-void GDAPI godot_xr_remove_controller(godot_int p_controller_id);
-void GDAPI godot_xr_set_controller_transform(godot_int p_controller_id, godot_transform3d *p_transform, godot_bool p_tracks_orientation, godot_bool p_tracks_position);
-void GDAPI godot_xr_set_controller_button(godot_int p_controller_id, godot_int p_button, godot_bool p_is_pressed);
-void GDAPI godot_xr_set_controller_axis(godot_int p_controller_id, godot_int p_axis, godot_real_t p_value, godot_bool p_can_be_negative);
-godot_real_t GDAPI godot_xr_get_controller_rumble(godot_int p_controller_id);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !GODOT_NATIVEXR_H */
diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp
index df0f29277e..2d9b45cb07 100644
--- a/modules/gdnative/nativescript/api_generator.cpp
+++ b/modules/gdnative/nativescript/api_generator.cpp
@@ -242,13 +242,9 @@ List<ClassAPI> generate_c_api_classes() {
class_api.class_name = class_name;
class_api.super_class_name = ClassDB::get_parent_class(class_name);
{
- String name = class_name;
- if (name.begins_with("_")) {
- name.remove(0);
- }
- class_api.is_singleton = Engine::get_singleton()->has_singleton(name);
+ class_api.is_singleton = Engine::get_singleton()->has_singleton(class_name);
if (class_api.is_singleton) {
- class_api.singleton_name = name;
+ class_api.singleton_name = class_name;
}
}
class_api.is_instantiable = !class_api.is_singleton && ClassDB::can_instantiate(class_name);
diff --git a/modules/gdnative/nativescript/godot_nativescript.cpp b/modules/gdnative/nativescript/godot_nativescript.cpp
index 70b14836bf..dadd1a9d10 100644
--- a/modules/gdnative/nativescript/godot_nativescript.cpp
+++ b/modules/gdnative/nativescript/godot_nativescript.cpp
@@ -127,9 +127,9 @@ void GDAPI godot_nativescript_register_method(void *p_gdnative_handle, const cha
E->get().methods.insert(p_function_name, method);
if (p_attr.rpc_type != GODOT_METHOD_RPC_MODE_DISABLED) {
- MultiplayerAPI::RPCConfig nd;
+ Multiplayer::RPCConfig nd;
nd.name = String(p_name);
- nd.rpc_mode = MultiplayerAPI::RPCMode(p_attr.rpc_type);
+ nd.rpc_mode = Multiplayer::RPCMode(p_attr.rpc_type);
E->get().rpc_methods.push_back(nd);
}
}
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index 26d3aed702..92ba9bd452 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -431,9 +431,9 @@ void NativeScript::get_script_property_list(List<PropertyInfo> *p_list) const {
}
}
-const Vector<MultiplayerAPI::RPCConfig> NativeScript::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> NativeScript::get_rpc_methods() const {
NativeScriptDesc *script_data = get_script_desc();
- ERR_FAIL_COND_V(!script_data, Vector<MultiplayerAPI::RPCConfig>());
+ ERR_FAIL_COND_V(!script_data, Vector<Multiplayer::RPCConfig>());
return script_data->rpc_methods;
}
@@ -828,7 +828,7 @@ Ref<Script> NativeScriptInstance::get_script() const {
return script;
}
-const Vector<MultiplayerAPI::RPCConfig> NativeScriptInstance::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> NativeScriptInstance::get_rpc_methods() const {
return script->get_rpc_methods();
}
diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h
index 777a878660..a7647e8c59 100644
--- a/modules/gdnative/nativescript/nativescript.h
+++ b/modules/gdnative/nativescript/nativescript.h
@@ -71,7 +71,7 @@ struct NativeScriptDesc {
};
Map<StringName, Method> methods;
- Vector<MultiplayerAPI::RPCConfig> rpc_methods;
+ Vector<Multiplayer::RPCConfig> rpc_methods;
OrderedHashMap<StringName, Property> properties;
Map<StringName, Signal> signals_; // QtCreator doesn't like the name signals
StringName base;
@@ -175,7 +175,7 @@ public:
virtual void get_script_method_list(List<MethodInfo> *p_list) const override;
virtual void get_script_property_list(List<PropertyInfo> *p_list) const override;
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const override;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override;
String get_class_documentation() const;
String get_method_documentation(const StringName &p_method) const;
@@ -213,7 +213,7 @@ public:
String to_string(bool *r_valid);
virtual Ref<Script> get_script() const;
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const;
virtual ScriptLanguage *get_language();
diff --git a/modules/gdnative/net/SCsub b/modules/gdnative/net/SCsub
deleted file mode 100644
index b76500c003..0000000000
--- a/modules/gdnative/net/SCsub
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env python
-
-Import("env")
-Import("env_gdnative")
-
-env_net = env_gdnative.Clone()
-
-has_webrtc = env_net["module_webrtc_enabled"]
-if has_webrtc:
- env_net.Append(CPPDEFINES=["WEBRTC_GDNATIVE_ENABLED"])
-
-env_net.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/gdnative/net/multiplayer_peer_gdnative.cpp b/modules/gdnative/net/multiplayer_peer_gdnative.cpp
deleted file mode 100644
index 9908ed4533..0000000000
--- a/modules/gdnative/net/multiplayer_peer_gdnative.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/*************************************************************************/
-/* multiplayer_peer_gdnative.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "multiplayer_peer_gdnative.h"
-
-MultiplayerPeerGDNative::MultiplayerPeerGDNative() {
- interface = nullptr;
-}
-
-MultiplayerPeerGDNative::~MultiplayerPeerGDNative() {
-}
-
-void MultiplayerPeerGDNative::set_native_multiplayer_peer(const godot_net_multiplayer_peer *p_interface) {
- interface = p_interface;
-}
-
-Error MultiplayerPeerGDNative::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->get_packet(interface->data, r_buffer, &r_buffer_size);
-}
-
-Error MultiplayerPeerGDNative::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->put_packet(interface->data, p_buffer, p_buffer_size);
-}
-
-int MultiplayerPeerGDNative::get_max_packet_size() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_max_packet_size(interface->data);
-}
-
-int MultiplayerPeerGDNative::get_available_packet_count() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_available_packet_count(interface->data);
-}
-
-/* MultiplayerPeer */
-void MultiplayerPeerGDNative::set_transfer_channel(int p_channel) {
- ERR_FAIL_COND(interface == nullptr);
- return interface->set_transfer_channel(interface->data, p_channel);
-}
-
-int MultiplayerPeerGDNative::get_transfer_channel() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_transfer_channel(interface->data);
-}
-
-void MultiplayerPeerGDNative::set_transfer_mode(TransferMode p_mode) {
- ERR_FAIL_COND(interface == nullptr);
- interface->set_transfer_mode(interface->data, (godot_int)p_mode);
-}
-
-MultiplayerPeer::TransferMode MultiplayerPeerGDNative::get_transfer_mode() const {
- ERR_FAIL_COND_V(interface == nullptr, TRANSFER_MODE_UNRELIABLE);
- return (TransferMode)interface->get_transfer_mode(interface->data);
-}
-
-void MultiplayerPeerGDNative::set_target_peer(int p_peer_id) {
- ERR_FAIL_COND(interface == nullptr);
- interface->set_target_peer(interface->data, p_peer_id);
-}
-
-int MultiplayerPeerGDNative::get_packet_peer() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_packet_peer(interface->data);
-}
-
-bool MultiplayerPeerGDNative::is_server() const {
- ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->is_server(interface->data);
-}
-
-void MultiplayerPeerGDNative::poll() {
- ERR_FAIL_COND(interface == nullptr);
- interface->poll(interface->data);
-}
-
-int MultiplayerPeerGDNative::get_unique_id() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_unique_id(interface->data);
-}
-
-void MultiplayerPeerGDNative::set_refuse_new_connections(bool p_enable) {
- ERR_FAIL_COND(interface == nullptr);
- interface->set_refuse_new_connections(interface->data, p_enable);
-}
-
-bool MultiplayerPeerGDNative::is_refusing_new_connections() const {
- ERR_FAIL_COND_V(interface == nullptr, true);
- return interface->is_refusing_new_connections(interface->data);
-}
-
-MultiplayerPeer::ConnectionStatus MultiplayerPeerGDNative::get_connection_status() const {
- ERR_FAIL_COND_V(interface == nullptr, CONNECTION_DISCONNECTED);
- return (ConnectionStatus)interface->get_connection_status(interface->data);
-}
-
-void MultiplayerPeerGDNative::_bind_methods() {
- ADD_PROPERTY_DEFAULT("transfer_channel", 0);
- ADD_PROPERTY_DEFAULT("transfer_mode", TRANSFER_MODE_UNRELIABLE);
- ADD_PROPERTY_DEFAULT("refuse_new_connections", true);
-}
-
-extern "C" {
-
-void GDAPI godot_net_bind_multiplayer_peer(godot_object *p_obj, const godot_net_multiplayer_peer *p_impl) {
- ((MultiplayerPeerGDNative *)p_obj)->set_native_multiplayer_peer(p_impl);
-}
-}
diff --git a/modules/gdnative/net/register_types.cpp b/modules/gdnative/net/register_types.cpp
deleted file mode 100644
index 46c383e5ae..0000000000
--- a/modules/gdnative/net/register_types.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*************************************************************************/
-/* register_types.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "register_types.h"
-#include "multiplayer_peer_gdnative.h"
-#include "packet_peer_gdnative.h"
-#include "stream_peer_gdnative.h"
-
-void register_net_types() {
- GDREGISTER_CLASS(MultiplayerPeerGDNative);
- GDREGISTER_CLASS(PacketPeerGDNative);
- GDREGISTER_CLASS(StreamPeerGDNative);
-}
-
-void unregister_net_types() {
-}
diff --git a/modules/gdnative/net/stream_peer_gdnative.h b/modules/gdnative/net/stream_peer_gdnative.h
deleted file mode 100644
index dd5abceb83..0000000000
--- a/modules/gdnative/net/stream_peer_gdnative.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************************************/
-/* stream_peer_gdnative.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef STREAM_PEER_GDNATIVE_H
-#define STREAM_PEER_GDNATIVE_H
-
-#include "core/io/stream_peer.h"
-#include "modules/gdnative/gdnative.h"
-#include "modules/gdnative/include/net/godot_net.h"
-
-class StreamPeerGDNative : public StreamPeer {
- GDCLASS(StreamPeerGDNative, StreamPeer);
-
-protected:
- static void _bind_methods();
- const godot_net_stream_peer *interface;
-
-public:
- StreamPeerGDNative();
- ~StreamPeerGDNative();
-
- /* Sets the interface implementation from GDNative */
- void set_native_stream_peer(const godot_net_stream_peer *p_interface);
-
- /* Specific to StreamPeer */
- Error put_data(const uint8_t *p_data, int p_bytes) override;
- Error put_partial_data(const uint8_t *p_data, int p_bytes, int &r_sent) override;
- Error get_data(uint8_t *p_buffer, int p_bytes) override;
- Error get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_received) override;
- int get_available_bytes() const override;
-};
-
-#endif // STREAM_PEER_GDNATIVE_H
diff --git a/modules/gdnative/net/webrtc_gdnative.cpp b/modules/gdnative/net/webrtc_gdnative.cpp
deleted file mode 100644
index 76ccbad009..0000000000
--- a/modules/gdnative/net/webrtc_gdnative.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************************************/
-/* webrtc_gdnative.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "modules/gdnative/gdnative.h"
-#include "modules/gdnative/include/net/godot_net.h"
-
-#ifdef WEBRTC_GDNATIVE_ENABLED
-#include "modules/webrtc/webrtc_data_channel_gdnative.h"
-#include "modules/webrtc/webrtc_peer_connection_gdnative.h"
-#endif
-
-extern "C" {
-
-void GDAPI godot_net_bind_webrtc_peer_connection(godot_object *p_obj, const godot_net_webrtc_peer_connection *p_impl) {
-#ifdef WEBRTC_GDNATIVE_ENABLED
- ((WebRTCPeerConnectionGDNative *)p_obj)->set_native_webrtc_peer_connection(p_impl);
-#endif
-}
-
-void GDAPI godot_net_bind_webrtc_data_channel(godot_object *p_obj, const godot_net_webrtc_data_channel *p_impl) {
-#ifdef WEBRTC_GDNATIVE_ENABLED
- ((WebRTCDataChannelGDNative *)p_obj)->set_native_webrtc_data_channel(p_impl);
-#endif
-}
-
-godot_error GDAPI godot_net_set_webrtc_library(const godot_net_webrtc_library *p_lib) {
-#ifdef WEBRTC_GDNATIVE_ENABLED
- return (godot_error)WebRTCPeerConnectionGDNative::set_default_library(p_lib);
-#else
- return (godot_error)ERR_UNAVAILABLE;
-#endif
-}
-}
diff --git a/modules/gdnative/pluginscript/pluginscript_instance.cpp b/modules/gdnative/pluginscript/pluginscript_instance.cpp
index ed1c0af3ed..feae81397e 100644
--- a/modules/gdnative/pluginscript/pluginscript_instance.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_instance.cpp
@@ -100,7 +100,7 @@ String PluginScriptInstance::to_string(bool *r_valid) {
return str_ret;
}
-const Vector<MultiplayerAPI::RPCConfig> PluginScriptInstance::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> PluginScriptInstance::get_rpc_methods() const {
return _script->get_rpc_methods();
}
diff --git a/modules/gdnative/pluginscript/pluginscript_instance.h b/modules/gdnative/pluginscript/pluginscript_instance.h
index 25b62ae8ab..bdae265db2 100644
--- a/modules/gdnative/pluginscript/pluginscript_instance.h
+++ b/modules/gdnative/pluginscript/pluginscript_instance.h
@@ -71,7 +71,7 @@ public:
void set_path(const String &p_path);
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const;
virtual void refcount_incremented();
virtual bool refcount_decremented();
diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp
index 5380858582..2b4ceda49d 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_script.cpp
@@ -334,9 +334,9 @@ Error PluginScript::reload(bool p_keep_state) {
// rpc_mode is passed as an optional field and is not part of MethodInfo
Variant var = v["rpc_mode"];
if (var != Variant()) {
- MultiplayerAPI::RPCConfig nd;
+ Multiplayer::RPCConfig nd;
nd.name = mi.name;
- nd.rpc_mode = MultiplayerAPI::RPCMode(int(var));
+ nd.rpc_mode = Multiplayer::RPCMode(int(var));
// TODO Transfer Channel
if (_rpc_methods.find(nd) == -1) {
_rpc_methods.push_back(nd);
@@ -345,7 +345,7 @@ Error PluginScript::reload(bool p_keep_state) {
}
// Sort so we are 100% that they are always the same.
- _rpc_methods.sort_custom<MultiplayerAPI::SortRPCConfig>();
+ _rpc_methods.sort_custom<Multiplayer::SortRPCConfig>();
Array *signals = (Array *)&manifest.signals;
for (int i = 0; i < signals->size(); ++i) {
@@ -484,7 +484,7 @@ int PluginScript::get_member_line(const StringName &p_member) const {
return -1;
}
-const Vector<MultiplayerAPI::RPCConfig> PluginScript::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> PluginScript::get_rpc_methods() const {
return _rpc_methods;
}
diff --git a/modules/gdnative/pluginscript/pluginscript_script.h b/modules/gdnative/pluginscript/pluginscript_script.h
index 838195147f..1a12a130d1 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.h
+++ b/modules/gdnative/pluginscript/pluginscript_script.h
@@ -61,7 +61,7 @@ private:
Map<StringName, PropertyInfo> _properties_info;
Map<StringName, MethodInfo> _signals_info;
Map<StringName, MethodInfo> _methods_info;
- Vector<MultiplayerAPI::RPCConfig> _rpc_methods;
+ Vector<Multiplayer::RPCConfig> _rpc_methods;
Set<Object *> _instances;
//exported members
@@ -136,7 +136,7 @@ public:
virtual int get_member_line(const StringName &p_member) const override;
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const override;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override;
PluginScript();
void init(PluginScriptLanguage *language);
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index a41c4f7b19..a4ab5663ef 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -35,10 +35,8 @@
#include "gdnative.h"
#include "nativescript/register_types.h"
-#include "net/register_types.h"
#include "pluginscript/register_types.h"
#include "videodecoder/register_types.h"
-#include "xr/register_types.h"
#include "core/config/engine.h"
#include "core/config/project_settings.h"
@@ -266,8 +264,6 @@ void register_gdnative_types() {
GDNativeCallRegistry::singleton->register_native_call_type("standard_varcall", cb_standard_varcall);
- register_net_types();
- register_xr_types();
register_nativescript_types();
register_pluginscript_types();
register_videodecoder_types();
@@ -331,8 +327,6 @@ void unregister_gdnative_types() {
unregister_videodecoder_types();
unregister_pluginscript_types();
unregister_nativescript_types();
- unregister_xr_types();
- unregister_net_types();
memdelete(GDNativeCallRegistry::singleton);
diff --git a/modules/gdnative/text/text_server_gdnative.cpp b/modules/gdnative/text/text_server_gdnative.cpp
index 3ed3f5449e..39db8ae636 100644
--- a/modules/gdnative/text/text_server_gdnative.cpp
+++ b/modules/gdnative/text/text_server_gdnative.cpp
@@ -88,299 +88,479 @@ bool TextServerGDNative::is_locale_right_to_left(const String &p_locale) {
return interface->is_locale_right_to_left(data, (godot_string *)&p_locale);
}
+int32_t TextServerGDNative::name_to_tag(const String &p_name) const {
+ ERR_FAIL_COND_V(interface == nullptr, 0);
+ return interface->name_to_tag(data, (godot_string *)&p_name);
+}
+
+String TextServerGDNative::tag_to_name(int32_t p_tag) const {
+ ERR_FAIL_COND_V(interface == nullptr, String());
+ godot_string result = interface->tag_to_name(data, p_tag);
+ String name = *(String *)&result;
+ godot_string_destroy(&result);
+ return name;
+}
+
/*************************************************************************/
-/* Font interface */
+/* Font */
/*************************************************************************/
-RID TextServerGDNative::create_font_system(const String &p_name, int p_base_size) {
+RID TextServerGDNative::create_font() {
ERR_FAIL_COND_V(interface == nullptr, RID());
- godot_rid result = interface->create_font_system(data, (const godot_string *)&p_name, p_base_size);
+ godot_rid result = interface->create_font(data);
RID rid = *(RID *)&result;
return rid;
}
-RID TextServerGDNative::create_font_resource(const String &p_filename, int p_base_size) {
- ERR_FAIL_COND_V(interface == nullptr, RID());
- godot_rid result = interface->create_font_resource(data, (const godot_string *)&p_filename, p_base_size);
- RID rid = *(RID *)&result;
- return rid;
+void TextServerGDNative::font_set_data(RID p_font_rid, const PackedByteArray &p_data) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_data(data, (godot_rid *)&p_font_rid, (const godot_packed_byte_array *)&p_data);
}
-RID TextServerGDNative::create_font_memory(const uint8_t *p_data, size_t p_size, const String &p_type, int p_base_size) {
- ERR_FAIL_COND_V(interface == nullptr, RID());
- godot_rid result = interface->create_font_memory(data, p_data, p_size, (godot_string *)&p_type, p_base_size);
- RID rid = *(RID *)&result;
- return rid;
+void TextServerGDNative::font_set_data_ptr(RID p_font_rid, const uint8_t *p_data_ptr, size_t p_data_size) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_data_ptr(data, (godot_rid *)&p_font_rid, p_data_ptr, p_data_size);
}
-RID TextServerGDNative::create_font_bitmap(float p_height, float p_ascent, int p_base_size) {
- ERR_FAIL_COND_V(interface == nullptr, RID());
- godot_rid result = interface->create_font_bitmap(data, p_height, p_ascent, p_base_size);
- RID rid = *(RID *)&result;
- return rid;
+void TextServerGDNative::font_set_antialiased(RID p_font_rid, bool p_antialiased) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_antialiased(data, (godot_rid *)&p_font_rid, p_antialiased);
}
-void TextServerGDNative::font_bitmap_add_texture(RID p_font, const Ref<Texture> &p_texture) {
+bool TextServerGDNative::font_is_antialiased(RID p_font_rid) const {
+ ERR_FAIL_COND_V(interface == nullptr, false);
+ return interface->font_is_antialiased(data, (godot_rid *)&p_font_rid);
+}
+
+void TextServerGDNative::font_set_multichannel_signed_distance_field(RID p_font_rid, bool p_msdf) {
ERR_FAIL_COND(interface == nullptr);
- interface->font_bitmap_add_texture(data, (godot_rid *)&p_font, (const godot_object *)p_texture.ptr());
+ interface->font_set_multichannel_signed_distance_field(data, (godot_rid *)&p_font_rid, p_msdf);
+}
+
+bool TextServerGDNative::font_is_multichannel_signed_distance_field(RID p_font_rid) const {
+ ERR_FAIL_COND_V(interface == nullptr, false);
+ return interface->font_is_multichannel_signed_distance_field(data, (godot_rid *)&p_font_rid);
}
-void TextServerGDNative::font_bitmap_add_char(RID p_font, char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) {
+void TextServerGDNative::font_set_msdf_pixel_range(RID p_font_rid, int p_msdf_pixel_range) {
ERR_FAIL_COND(interface == nullptr);
- interface->font_bitmap_add_char(data, (godot_rid *)&p_font, p_char, p_texture_idx, (const godot_rect2 *)&p_rect, (const godot_vector2 *)&p_align, p_advance);
+ interface->font_set_msdf_pixel_range(data, (godot_rid *)&p_font_rid, p_msdf_pixel_range);
}
-void TextServerGDNative::font_bitmap_add_kerning_pair(RID p_font, char32_t p_A, char32_t p_B, int p_kerning) {
+int TextServerGDNative::font_get_msdf_pixel_range(RID p_font_rid) const {
+ ERR_FAIL_COND_V(interface == nullptr, 0);
+ return interface->font_get_msdf_pixel_range(data, (godot_rid *)&p_font_rid);
+}
+
+void TextServerGDNative::font_set_msdf_size(RID p_font_rid, int p_msdf_size) {
ERR_FAIL_COND(interface == nullptr);
- interface->font_bitmap_add_kerning_pair(data, (godot_rid *)&p_font, p_A, p_B, p_kerning);
+ interface->font_set_msdf_size(data, (godot_rid *)&p_font_rid, p_msdf_size);
}
-float TextServerGDNative::font_get_height(RID p_font, int p_size) const {
- ERR_FAIL_COND_V(interface == nullptr, 0.f);
- return interface->font_get_height(data, (godot_rid *)&p_font, p_size);
+int TextServerGDNative::font_get_msdf_size(RID p_font_rid) const {
+ ERR_FAIL_COND_V(interface == nullptr, 0);
+ return interface->font_get_msdf_size(data, (godot_rid *)&p_font_rid);
}
-float TextServerGDNative::font_get_ascent(RID p_font, int p_size) const {
- ERR_FAIL_COND_V(interface == nullptr, 0.f);
- return interface->font_get_ascent(data, (godot_rid *)&p_font, p_size);
+void TextServerGDNative::font_set_fixed_size(RID p_font_rid, int p_fixed_size) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_fixed_size(data, (godot_rid *)&p_font_rid, p_fixed_size);
}
-float TextServerGDNative::font_get_descent(RID p_font, int p_size) const {
- ERR_FAIL_COND_V(interface == nullptr, 0.f);
- return interface->font_get_descent(data, (godot_rid *)&p_font, p_size);
+int TextServerGDNative::font_get_fixed_size(RID p_font_rid) const {
+ ERR_FAIL_COND_V(interface == nullptr, 0);
+ return interface->font_get_fixed_size(data, (godot_rid *)&p_font_rid);
}
-float TextServerGDNative::font_get_underline_position(RID p_font, int p_size) const {
- ERR_FAIL_COND_V(interface == nullptr, 0.f);
- return interface->font_get_underline_position(data, (godot_rid *)&p_font, p_size);
+void TextServerGDNative::font_set_force_autohinter(RID p_font_rid, bool p_force_autohinter) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_force_autohinter(data, (godot_rid *)&p_font_rid, p_force_autohinter);
}
-float TextServerGDNative::font_get_underline_thickness(RID p_font, int p_size) const {
- ERR_FAIL_COND_V(interface == nullptr, 0.f);
- return interface->font_get_underline_thickness(data, (godot_rid *)&p_font, p_size);
+bool TextServerGDNative::font_is_force_autohinter(RID p_font_rid) const {
+ ERR_FAIL_COND_V(interface == nullptr, false);
+ return interface->font_is_force_autohinter(data, (godot_rid *)&p_font_rid);
}
-int TextServerGDNative::font_get_spacing_space(RID p_font) const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->font_get_spacing_space(data, (godot_rid *)&p_font);
+void TextServerGDNative::font_set_hinting(RID p_font_rid, TextServer::Hinting p_hinting) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_hinting(data, (godot_rid *)&p_font_rid, (godot_int)p_hinting);
}
-void TextServerGDNative::font_set_spacing_space(RID p_font, int p_value) {
+TextServer::Hinting TextServerGDNative::font_get_hinting(RID p_font_rid) const {
+ ERR_FAIL_COND_V(interface == nullptr, TextServer::HINTING_NONE);
+ return (TextServer::Hinting)interface->font_get_hinting(data, (godot_rid *)&p_font_rid);
+}
+
+void TextServerGDNative::font_set_variation_coordinates(RID p_font_rid, const Dictionary &p_variation_coordinates) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_variation_coordinates(data, (godot_rid *)&p_font_rid, (const godot_dictionary *)&p_variation_coordinates);
+}
+
+Dictionary TextServerGDNative::font_get_variation_coordinates(RID p_font_rid) const {
+ ERR_FAIL_COND_V(interface == nullptr, Dictionary());
+ godot_dictionary result = interface->font_get_variation_coordinates(data, (godot_rid *)&p_font_rid);
+ Dictionary dict = *(Dictionary *)&result;
+ godot_dictionary_destroy(&result);
+ return dict;
+}
+
+void TextServerGDNative::font_set_oversampling(RID p_font_rid, real_t p_oversampling) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_oversampling(data, (godot_rid *)&p_font_rid, p_oversampling);
+}
+
+real_t TextServerGDNative::font_get_oversampling(RID p_font_rid) const {
+ ERR_FAIL_COND_V(interface == nullptr, 0.0f);
+ return interface->font_get_oversampling(data, (godot_rid *)&p_font_rid);
+}
+
+Array TextServerGDNative::font_get_size_cache_list(RID p_font_rid) const {
+ ERR_FAIL_COND_V(interface == nullptr, Array());
+ godot_array result = interface->font_get_size_cache_list(data, (godot_rid *)&p_font_rid);
+ Array list = *(Array *)&result;
+ godot_array_destroy(&result);
+ return list;
+}
+
+void TextServerGDNative::font_clear_size_cache(RID p_font_rid) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_clear_size_cache(data, (godot_rid *)&p_font_rid);
+}
+
+void TextServerGDNative::font_remove_size_cache(RID p_font_rid, const Vector2i &p_size) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_remove_size_cache(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size);
+}
+
+void TextServerGDNative::font_set_ascent(RID p_font_rid, int p_size, real_t p_ascent) {
ERR_FAIL_COND(interface == nullptr);
- interface->font_set_spacing_space(data, (godot_rid *)&p_font, p_value);
+ interface->font_set_ascent(data, (godot_rid *)&p_font_rid, p_size, p_ascent);
+}
+
+real_t TextServerGDNative::font_get_ascent(RID p_font_rid, int p_size) const {
+ ERR_FAIL_COND_V(interface == nullptr, 0.0f);
+ return interface->font_get_ascent(data, (godot_rid *)&p_font_rid, p_size);
}
-int TextServerGDNative::font_get_spacing_glyph(RID p_font) const {
+void TextServerGDNative::font_set_descent(RID p_font_rid, int p_size, real_t p_descent) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_descent(data, (godot_rid *)&p_font_rid, p_size, p_descent);
+}
+
+real_t TextServerGDNative::font_get_descent(RID p_font_rid, int p_size) const {
+ ERR_FAIL_COND_V(interface == nullptr, 0.0f);
+ return interface->font_get_descent(data, (godot_rid *)&p_font_rid, p_size);
+}
+
+void TextServerGDNative::font_set_underline_position(RID p_font_rid, int p_size, real_t p_underline_position) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_underline_position(data, (godot_rid *)&p_font_rid, p_size, p_underline_position);
+}
+
+real_t TextServerGDNative::font_get_underline_position(RID p_font_rid, int p_size) const {
+ ERR_FAIL_COND_V(interface == nullptr, 0.0f);
+ return interface->font_get_underline_position(data, (godot_rid *)&p_font_rid, p_size);
+}
+
+void TextServerGDNative::font_set_underline_thickness(RID p_font_rid, int p_size, real_t p_underline_thickness) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_underline_thickness(data, (godot_rid *)&p_font_rid, p_size, p_underline_thickness);
+}
+
+real_t TextServerGDNative::font_get_underline_thickness(RID p_font_rid, int p_size) const {
+ ERR_FAIL_COND_V(interface == nullptr, 0.0f);
+ return interface->font_get_underline_thickness(data, (godot_rid *)&p_font_rid, p_size);
+}
+
+void TextServerGDNative::font_set_scale(RID p_font_rid, int p_size, real_t p_scale) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_scale(data, (godot_rid *)&p_font_rid, p_size, p_scale);
+}
+
+real_t TextServerGDNative::font_get_scale(RID p_font_rid, int p_size) const {
+ ERR_FAIL_COND_V(interface == nullptr, 0.0f);
+ return interface->font_get_scale(data, (godot_rid *)&p_font_rid, p_size);
+}
+
+void TextServerGDNative::font_set_spacing(RID p_font_rid, int p_size, TextServer::SpacingType p_spacing, int p_value) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_spacing(data, (godot_rid *)&p_font_rid, p_size, (godot_int)p_spacing, p_value);
+}
+
+int TextServerGDNative::font_get_spacing(RID p_font_rid, int p_size, TextServer::SpacingType p_spacing) const {
ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->font_get_spacing_glyph(data, (godot_rid *)&p_font);
+ return interface->font_get_spacing(data, (godot_rid *)&p_font_rid, p_size, (godot_int)p_spacing);
}
-void TextServerGDNative::font_set_spacing_glyph(RID p_font, int p_value) {
+int TextServerGDNative::font_get_texture_count(RID p_font_rid, const Vector2i &p_size) const {
+ ERR_FAIL_COND_V(interface == nullptr, -1);
+ return interface->font_get_texture_count(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size);
+}
+
+void TextServerGDNative::font_clear_textures(RID p_font_rid, const Vector2i &p_size) {
ERR_FAIL_COND(interface == nullptr);
- interface->font_set_spacing_glyph(data, (godot_rid *)&p_font, p_value);
+ interface->font_clear_textures(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size);
}
-void TextServerGDNative::font_set_antialiased(RID p_font, bool p_antialiased) {
+void TextServerGDNative::font_remove_texture(RID p_font_rid, const Vector2i &p_size, int p_texture_index) {
ERR_FAIL_COND(interface == nullptr);
- interface->font_set_antialiased(data, (godot_rid *)&p_font, p_antialiased);
+ interface->font_remove_texture(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_texture_index);
}
-bool TextServerGDNative::font_get_antialiased(RID p_font) const {
- ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->font_get_antialiased(data, (godot_rid *)&p_font);
+void TextServerGDNative::font_set_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const Ref<Image> &p_image) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_texture_image(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_texture_index, (const godot_object *)p_image.ptr());
}
-Dictionary TextServerGDNative::font_get_variation_list(RID p_font) const {
- ERR_FAIL_COND_V(interface == nullptr, Dictionary());
- godot_dictionary result = interface->font_get_variation_list(data, (godot_rid *)&p_font);
- Dictionary info = *(Dictionary *)&result;
- godot_dictionary_destroy(&result);
+Ref<Image> TextServerGDNative::font_get_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const {
+ ERR_FAIL_COND_V(interface == nullptr, Ref<Image>());
+ godot_object *result = interface->font_get_texture_image(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_texture_index);
+ return Ref<Image>((Image *)result);
+}
- return info;
+void TextServerGDNative::font_set_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const PackedInt32Array &p_offset) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_texture_offsets(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_texture_index, (const godot_packed_int32_array *)&p_offset);
+}
+
+PackedInt32Array TextServerGDNative::font_get_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const {
+ ERR_FAIL_COND_V(interface == nullptr, PackedInt32Array());
+ godot_packed_int32_array result = interface->font_get_texture_offsets(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_texture_index);
+ PackedInt32Array offset = *(PackedInt32Array *)&result;
+ godot_packed_int32_array_destroy(&result);
+ return offset;
+}
+
+Array TextServerGDNative::font_get_glyph_list(RID p_font_rid, const Vector2i &p_size) const {
+ ERR_FAIL_COND_V(interface == nullptr, Array());
+ godot_array result = interface->font_get_glyph_list(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size);
+ Array list = *(Array *)&result;
+ godot_array_destroy(&result);
+ return list;
+}
+
+void TextServerGDNative::font_clear_glyphs(RID p_font_rid, const Vector2i &p_size) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_clear_glyphs(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size);
}
-void TextServerGDNative::font_set_variation(RID p_font, const String &p_name, double p_value) {
+void TextServerGDNative::font_remove_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) {
ERR_FAIL_COND(interface == nullptr);
- interface->font_set_variation(data, (godot_rid *)&p_font, (godot_string *)&p_name, p_value);
+ interface->font_remove_glyph(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_glyph);
}
-double TextServerGDNative::font_get_variation(RID p_font, const String &p_name) const {
- return interface->font_get_variation(data, (godot_rid *)&p_font, (godot_string *)&p_name);
+Vector2 TextServerGDNative::font_get_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph) const {
+ ERR_FAIL_COND_V(interface == nullptr, Vector2());
+ godot_vector2 result = interface->font_get_glyph_advance(data, (godot_rid *)&p_font_rid, p_size, p_glyph);
+ Vector2 adv = *(Vector2 *)&result;
+ return adv;
}
-void TextServerGDNative::font_set_hinting(RID p_font, TextServer::Hinting p_hinting) {
+void TextServerGDNative::font_set_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph, const Vector2 &p_advance) {
ERR_FAIL_COND(interface == nullptr);
- interface->font_set_hinting(data, (godot_rid *)&p_font, (godot_int)p_hinting);
+ interface->font_set_glyph_advance(data, (godot_rid *)&p_font_rid, p_size, p_glyph, (const godot_vector2 *)&p_advance);
}
-TextServer::Hinting TextServerGDNative::font_get_hinting(RID p_font) const {
- ERR_FAIL_COND_V(interface == nullptr, TextServer::HINTING_NONE);
- return (TextServer::Hinting)interface->font_get_hinting(data, (godot_rid *)&p_font);
+Vector2 TextServerGDNative::font_get_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const {
+ ERR_FAIL_COND_V(interface == nullptr, Vector2());
+ godot_vector2 result = interface->font_get_glyph_offset(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_glyph);
+ Vector2 off = *(Vector2 *)&result;
+ return off;
}
-Dictionary TextServerGDNative::font_get_feature_list(RID p_font) const {
- ERR_FAIL_COND_V(interface == nullptr, Dictionary());
- godot_dictionary result = interface->font_get_feature_list(data, (godot_rid *)&p_font);
- Dictionary info = *(Dictionary *)&result;
- godot_dictionary_destroy(&result);
+void TextServerGDNative::font_set_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_offset) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_glyph_offset(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_glyph, (const godot_vector2 *)&p_offset);
+}
- return info;
+Vector2 TextServerGDNative::font_get_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const {
+ ERR_FAIL_COND_V(interface == nullptr, Vector2());
+ godot_vector2 result = interface->font_get_glyph_size(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_glyph);
+ Vector2 sz = *(Vector2 *)&result;
+ return sz;
}
-void TextServerGDNative::font_set_distance_field_hint(RID p_font, bool p_distance_field) {
+void TextServerGDNative::font_set_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_gl_size) {
ERR_FAIL_COND(interface == nullptr);
- interface->font_set_distance_field_hint(data, (godot_rid *)&p_font, p_distance_field);
+ interface->font_set_glyph_size(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_glyph, (const godot_vector2 *)&p_gl_size);
}
-bool TextServerGDNative::font_get_distance_field_hint(RID p_font) const {
- ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->font_get_distance_field_hint(data, (godot_rid *)&p_font);
+Rect2 TextServerGDNative::font_get_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const {
+ ERR_FAIL_COND_V(interface == nullptr, Rect2());
+ godot_rect2 result = interface->font_get_glyph_uv_rect(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_glyph);
+ Rect2 uv = *(Rect2 *)&result;
+ return uv;
}
-void TextServerGDNative::font_set_force_autohinter(RID p_font, bool p_enabeld) {
+void TextServerGDNative::font_set_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Rect2 &p_uv_rect) {
ERR_FAIL_COND(interface == nullptr);
- interface->font_set_force_autohinter(data, (godot_rid *)&p_font, p_enabeld);
+ interface->font_set_glyph_uv_rect(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_glyph, (const godot_rect2 *)&p_uv_rect);
}
-bool TextServerGDNative::font_get_force_autohinter(RID p_font) const {
- ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->font_get_force_autohinter(data, (godot_rid *)&p_font);
+int TextServerGDNative::font_get_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const {
+ ERR_FAIL_COND_V(interface == nullptr, -1);
+ return interface->font_get_glyph_texture_idx(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_glyph);
+}
+
+void TextServerGDNative::font_set_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, int p_texture_idx) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_glyph_texture_idx(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_glyph, p_texture_idx);
}
-bool TextServerGDNative::font_has_char(RID p_font, char32_t p_char) const {
+bool TextServerGDNative::font_get_glyph_contours(RID p_font_rid, int p_size, int32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const {
ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->font_has_char(data, (godot_rid *)&p_font, p_char);
+ return interface->font_get_glyph_contours(data, (godot_rid *)&p_font_rid, p_size, p_index, (godot_packed_vector3_array *)&r_points, (godot_packed_int32_array *)&r_contours, &r_orientation);
}
-String TextServerGDNative::font_get_supported_chars(RID p_font) const {
- ERR_FAIL_COND_V(interface == nullptr, String());
- godot_string result = interface->font_get_supported_chars(data, (godot_rid *)&p_font);
- String ret = *(String *)&result;
- godot_string_destroy(&result);
- return ret;
+Array TextServerGDNative::font_get_kerning_list(RID p_font_rid, int p_size) const {
+ ERR_FAIL_COND_V(interface == nullptr, Array());
+ godot_array result = interface->font_get_kerning_list(data, (godot_rid *)&p_font_rid, p_size);
+ Array list = *(Array *)&result;
+ godot_array_destroy(&result);
+ return list;
}
-bool TextServerGDNative::font_has_outline(RID p_font) const {
- ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->font_has_outline(data, (godot_rid *)&p_font);
+void TextServerGDNative::font_clear_kerning_map(RID p_font_rid, int p_size) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_clear_kerning_map(data, (godot_rid *)&p_font_rid, p_size);
}
-float TextServerGDNative::font_get_base_size(RID p_font) const {
- ERR_FAIL_COND_V(interface == nullptr, 0.f);
- return interface->font_get_base_size(data, (godot_rid *)&p_font);
+void TextServerGDNative::font_remove_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_remove_kerning(data, (godot_rid *)&p_font_rid, p_size, (const godot_vector2i *)&p_glyph_pair);
+}
+
+void TextServerGDNative::font_set_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_kerning(data, (godot_rid *)&p_font_rid, p_size, (const godot_vector2i *)&p_glyph_pair, (const godot_vector2 *)&p_kerning);
+}
+
+Vector2 TextServerGDNative::font_get_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) const {
+ ERR_FAIL_COND_V(interface == nullptr, Vector2());
+ godot_vector2 result = interface->font_get_kerning(data, (godot_rid *)&p_font_rid, p_size, (const godot_vector2i *)&p_glyph_pair);
+ Vector2 kern = *(Vector2 *)&result;
+ return kern;
}
-bool TextServerGDNative::font_is_language_supported(RID p_font, const String &p_language) const {
+int32_t TextServerGDNative::font_get_glyph_index(RID p_font_rid, int p_size, char32_t p_char, char32_t p_variation_selector) const {
+ ERR_FAIL_COND_V(interface == nullptr, 0);
+ return interface->font_get_glyph_index(data, (godot_rid *)&p_font_rid, p_size, p_char, p_variation_selector);
+}
+
+bool TextServerGDNative::font_has_char(RID p_font_rid, char32_t p_char) const {
ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->font_is_language_supported(data, (godot_rid *)&p_font, (godot_string *)&p_language);
+ return interface->font_has_char(data, (godot_rid *)&p_font_rid, p_char);
+}
+
+String TextServerGDNative::font_get_supported_chars(RID p_font_rid) const {
+ ERR_FAIL_COND_V(interface == nullptr, String());
+ godot_string result = interface->font_get_supported_chars(data, (godot_rid *)&p_font_rid);
+ String chars = *(String *)&result;
+ godot_string_destroy(&result);
+ return chars;
}
-void TextServerGDNative::font_set_language_support_override(RID p_font, const String &p_language, bool p_supported) {
+void TextServerGDNative::font_render_range(RID p_font_rid, const Vector2i &p_size, char32_t p_start, char32_t p_end) {
ERR_FAIL_COND(interface == nullptr);
- return interface->font_set_language_support_override(data, (godot_rid *)&p_font, (godot_string *)&p_language, p_supported);
+ interface->font_render_range(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_start, p_end);
}
-bool TextServerGDNative::font_get_language_support_override(RID p_font, const String &p_language) {
- ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->font_get_language_support_override(data, (godot_rid *)&p_font, (godot_string *)&p_language);
+void TextServerGDNative::font_render_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_index) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_render_glyph(data, (godot_rid *)&p_font_rid, (const godot_vector2i *)&p_size, p_index);
}
-void TextServerGDNative::font_remove_language_support_override(RID p_font, const String &p_language) {
+void TextServerGDNative::font_draw_glyph(RID p_font_rid, RID p_canvas, int p_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color) const {
ERR_FAIL_COND(interface == nullptr);
- interface->font_remove_language_support_override(data, (godot_rid *)&p_font, (godot_string *)&p_language);
+ interface->font_draw_glyph(data, (godot_rid *)&p_font_rid, (godot_rid *)&p_canvas, p_size, (const godot_vector2 *)&p_pos, p_index, (const godot_color *)&p_color);
}
-Vector<String> TextServerGDNative::font_get_language_support_overrides(RID p_font) {
- ERR_FAIL_COND_V(interface == nullptr, Vector<String>());
- godot_packed_string_array result = interface->font_get_language_support_overrides(data, (godot_rid *)&p_font);
- Vector<String> ret = *(Vector<String> *)&result;
- godot_packed_string_array_destroy(&result);
- return ret;
+void TextServerGDNative::font_draw_glyph_outline(RID p_font_rid, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color) const {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_draw_glyph_outline(data, (godot_rid *)&p_font_rid, (godot_rid *)&p_canvas, p_size, p_outline_size, (const godot_vector2 *)&p_pos, p_index, (const godot_color *)&p_color);
}
-bool TextServerGDNative::font_is_script_supported(RID p_font, const String &p_script) const {
+bool TextServerGDNative::font_is_language_supported(RID p_font_rid, const String &p_language) const {
ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->font_is_script_supported(data, (godot_rid *)&p_font, (godot_string *)&p_script);
+ return interface->font_is_language_supported(data, (godot_rid *)&p_font_rid, (const godot_string *)&p_language);
}
-void TextServerGDNative::font_set_script_support_override(RID p_font, const String &p_script, bool p_supported) {
+void TextServerGDNative::font_set_language_support_override(RID p_font_rid, const String &p_language, bool p_supported) {
ERR_FAIL_COND(interface == nullptr);
- return interface->font_set_script_support_override(data, (godot_rid *)&p_font, (godot_string *)&p_script, p_supported);
+ interface->font_set_language_support_override(data, (godot_rid *)&p_font_rid, (const godot_string *)&p_language, p_supported);
}
-bool TextServerGDNative::font_get_script_support_override(RID p_font, const String &p_script) {
+bool TextServerGDNative::font_get_language_support_override(RID p_font_rid, const String &p_language) {
ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->font_get_script_support_override(data, (godot_rid *)&p_font, (godot_string *)&p_script);
+ return interface->font_get_language_support_override(data, (godot_rid *)&p_font_rid, (const godot_string *)&p_language);
}
-void TextServerGDNative::font_remove_script_support_override(RID p_font, const String &p_script) {
+void TextServerGDNative::font_remove_language_support_override(RID p_font_rid, const String &p_language) {
ERR_FAIL_COND(interface == nullptr);
- interface->font_remove_script_support_override(data, (godot_rid *)&p_font, (godot_string *)&p_script);
+ interface->font_remove_language_support_override(data, (godot_rid *)&p_font_rid, (const godot_string *)&p_language);
}
-Vector<String> TextServerGDNative::font_get_script_support_overrides(RID p_font) {
- ERR_FAIL_COND_V(interface == nullptr, Vector<String>());
- godot_packed_string_array result = interface->font_get_script_support_overrides(data, (godot_rid *)&p_font);
- Vector<String> ret = *(Vector<String> *)&result;
+Vector<String> TextServerGDNative::font_get_language_support_overrides(RID p_font_rid) {
+ ERR_FAIL_COND_V(interface == nullptr, PackedStringArray());
+ godot_packed_string_array result = interface->font_get_language_support_overrides(data, (godot_rid *)&p_font_rid);
+ PackedStringArray list = *(PackedStringArray *)&result;
godot_packed_string_array_destroy(&result);
- return ret;
+ return list;
}
-uint32_t TextServerGDNative::font_get_glyph_index(RID p_font, char32_t p_char, char32_t p_variation_selector) const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->font_get_glyph_index(data, (godot_rid *)&p_font, p_char, p_variation_selector);
+bool TextServerGDNative::font_is_script_supported(RID p_font_rid, const String &p_script) const {
+ ERR_FAIL_COND_V(interface == nullptr, false);
+ return interface->font_is_script_supported(data, (godot_rid *)&p_font_rid, (const godot_string *)&p_script);
}
-Vector2 TextServerGDNative::font_get_glyph_advance(RID p_font, uint32_t p_index, int p_size) const {
- ERR_FAIL_COND_V(interface == nullptr, Vector2());
- godot_vector2 result = interface->font_get_glyph_advance(data, (godot_rid *)&p_font, p_index, p_size);
- Vector2 advance = *(Vector2 *)&result;
- return advance;
+void TextServerGDNative::font_set_script_support_override(RID p_font_rid, const String &p_script, bool p_supported) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_script_support_override(data, (godot_rid *)&p_font_rid, (const godot_string *)&p_script, p_supported);
}
-Vector2 TextServerGDNative::font_get_glyph_kerning(RID p_font, uint32_t p_index_a, uint32_t p_index_b, int p_size) const {
- ERR_FAIL_COND_V(interface == nullptr, Vector2());
- godot_vector2 result = interface->font_get_glyph_kerning(data, (godot_rid *)&p_font, p_index_a, p_index_b, p_size);
- Vector2 kerning = *(Vector2 *)&result;
- return kerning;
+bool TextServerGDNative::font_get_script_support_override(RID p_font_rid, const String &p_script) {
+ ERR_FAIL_COND_V(interface == nullptr, false);
+ return interface->font_get_script_support_override(data, (godot_rid *)&p_font_rid, (const godot_string *)&p_script);
}
-Vector2 TextServerGDNative::font_draw_glyph(RID p_font, RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- ERR_FAIL_COND_V(interface == nullptr, Vector2());
- godot_vector2 result = interface->font_draw_glyph(data, (godot_rid *)&p_font, (godot_rid *)&p_canvas, p_size, (const godot_vector2 *)&p_pos, p_index, (const godot_color *)&p_color);
- Vector2 advance = *(Vector2 *)&result;
- return advance;
+void TextServerGDNative::font_remove_script_support_override(RID p_font_rid, const String &p_script) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_remove_script_support_override(data, (godot_rid *)&p_font_rid, (const godot_string *)&p_script);
}
-Vector2 TextServerGDNative::font_draw_glyph_outline(RID p_font, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- ERR_FAIL_COND_V(interface == nullptr, Vector2());
- godot_vector2 result = interface->font_draw_glyph_outline(data, (godot_rid *)&p_font, (godot_rid *)&p_canvas, p_size, p_outline_size, (const godot_vector2 *)&p_pos, p_index, (const godot_color *)&p_color);
- Vector2 advance = *(Vector2 *)&result;
- return advance;
+Vector<String> TextServerGDNative::font_get_script_support_overrides(RID p_font_rid) {
+ ERR_FAIL_COND_V(interface == nullptr, PackedStringArray());
+ godot_packed_string_array result = interface->font_get_script_support_overrides(data, (godot_rid *)&p_font_rid);
+ PackedStringArray list = *(PackedStringArray *)&result;
+ godot_packed_string_array_destroy(&result);
+ return list;
}
-bool TextServerGDNative::font_get_glyph_contours(RID p_font, int p_size, uint32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const {
- ERR_FAIL_COND_V(interface == nullptr, false);
- ERR_FAIL_COND_V(interface->font_get_glyph_contours == nullptr, false);
- return interface->font_get_glyph_contours(data, (godot_rid *)&p_font, p_size, p_index, (godot_packed_vector3_array *)&r_points, (godot_packed_int32_array *)&r_contours, (bool *)&r_orientation);
+Dictionary TextServerGDNative::font_supported_feature_list(RID p_font_rid) const {
+ ERR_FAIL_COND_V(interface == nullptr, Dictionary());
+ godot_dictionary result = interface->font_supported_feature_list(data, (godot_rid *)&p_font_rid);
+ Dictionary dict = *(Dictionary *)&result;
+ godot_dictionary_destroy(&result);
+ return dict;
}
-float TextServerGDNative::font_get_oversampling() const {
- ERR_FAIL_COND_V(interface == nullptr, 1.f);
- return interface->font_get_oversampling(data);
+Dictionary TextServerGDNative::font_supported_variation_list(RID p_font_rid) const {
+ ERR_FAIL_COND_V(interface == nullptr, Dictionary());
+ godot_dictionary result = interface->font_supported_variation_list(data, (godot_rid *)&p_font_rid);
+ Dictionary dict = *(Dictionary *)&result;
+ godot_dictionary_destroy(&result);
+ return dict;
}
-void TextServerGDNative::font_set_oversampling(float p_oversampling) {
- ERR_FAIL_COND(interface == nullptr);
- return interface->font_set_oversampling(data, p_oversampling);
+real_t TextServerGDNative::font_get_global_oversampling() const {
+ ERR_FAIL_COND_V(interface == nullptr, 0.0f);
+ return interface->font_get_global_oversampling(data);
}
-Vector<String> TextServerGDNative::get_system_fonts() const {
- ERR_FAIL_COND_V(interface == nullptr, Vector<String>());
- godot_packed_string_array result = interface->get_system_fonts(data);
- Vector<String> fonts = *(Vector<String> *)&result;
- godot_packed_string_array_destroy(&result);
- return fonts;
+void TextServerGDNative::font_set_global_oversampling(real_t p_oversampling) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_global_oversampling(data, p_oversampling);
}
/*************************************************************************/
@@ -473,12 +653,12 @@ RID TextServerGDNative::shaped_text_get_parent(RID p_shaped) const {
return rid;
}
-float TextServerGDNative::shaped_text_fit_to_width(RID p_shaped, float p_width, uint8_t p_jst_flags) {
+real_t TextServerGDNative::shaped_text_fit_to_width(RID p_shaped, real_t p_width, uint8_t p_jst_flags) {
ERR_FAIL_COND_V(interface == nullptr, 0.f);
return interface->shaped_text_fit_to_width(data, (godot_rid *)&p_shaped, p_width, p_jst_flags);
}
-float TextServerGDNative::shaped_text_tab_align(RID p_shaped, const Vector<float> &p_tab_stops) {
+real_t TextServerGDNative::shaped_text_tab_align(RID p_shaped, const Vector<real_t> &p_tab_stops) {
ERR_FAIL_COND_V(interface == nullptr, 0.f);
return interface->shaped_text_tab_align(data, (godot_rid *)&p_shaped, (godot_packed_float32_array *)&p_tab_stops);
}
@@ -498,7 +678,7 @@ bool TextServerGDNative::shaped_text_update_justification_ops(RID p_shaped) {
return interface->shaped_text_update_justification_ops(data, (godot_rid *)&p_shaped);
}
-void TextServerGDNative::shaped_text_overrun_trim_to_width(RID p_shaped_line, float p_width, uint8_t p_trim_flags) {
+void TextServerGDNative::shaped_text_overrun_trim_to_width(RID p_shaped_line, real_t p_width, uint8_t p_trim_flags) {
ERR_FAIL_COND(interface == nullptr);
interface->shaped_text_overrun_trim_to_width(data, (godot_rid *)&p_shaped_line, p_width, p_trim_flags);
};
@@ -531,7 +711,7 @@ Vector<TextServer::Glyph> TextServerGDNative::shaped_text_sort_logical(RID p_sha
return glyphs;
}
-Vector<Vector2i> TextServerGDNative::shaped_text_get_line_breaks_adv(RID p_shaped, const Vector<float> &p_width, int p_start, bool p_once, uint8_t p_break_flags) const {
+Vector<Vector2i> TextServerGDNative::shaped_text_get_line_breaks_adv(RID p_shaped, const Vector<real_t> &p_width, int p_start, bool p_once, uint8_t p_break_flags) const {
ERR_FAIL_COND_V(interface == nullptr, Vector<Vector2i>());
if (interface->shaped_text_get_line_breaks_adv != nullptr) {
godot_packed_vector2i_array result = interface->shaped_text_get_line_breaks_adv(data, (godot_rid *)&p_shaped, (godot_packed_float32_array *)&p_width, p_start, p_once, p_break_flags);
@@ -543,7 +723,7 @@ Vector<Vector2i> TextServerGDNative::shaped_text_get_line_breaks_adv(RID p_shape
}
}
-Vector<Vector2i> TextServerGDNative::shaped_text_get_line_breaks(RID p_shaped, float p_width, int p_start, uint8_t p_break_flags) const {
+Vector<Vector2i> TextServerGDNative::shaped_text_get_line_breaks(RID p_shaped, real_t p_width, int p_start, uint8_t p_break_flags) const {
ERR_FAIL_COND_V(interface == nullptr, Vector<Vector2i>());
if (interface->shaped_text_get_line_breaks != nullptr) {
godot_packed_vector2i_array result = interface->shaped_text_get_line_breaks(data, (godot_rid *)&p_shaped, p_width, p_start, p_break_flags);
@@ -588,27 +768,27 @@ Size2 TextServerGDNative::shaped_text_get_size(RID p_shaped) const {
return size;
}
-float TextServerGDNative::shaped_text_get_ascent(RID p_shaped) const {
+real_t TextServerGDNative::shaped_text_get_ascent(RID p_shaped) const {
ERR_FAIL_COND_V(interface == nullptr, 0.f);
return interface->shaped_text_get_ascent(data, (godot_rid *)&p_shaped);
}
-float TextServerGDNative::shaped_text_get_descent(RID p_shaped) const {
+real_t TextServerGDNative::shaped_text_get_descent(RID p_shaped) const {
ERR_FAIL_COND_V(interface == nullptr, 0.f);
return interface->shaped_text_get_descent(data, (godot_rid *)&p_shaped);
}
-float TextServerGDNative::shaped_text_get_width(RID p_shaped) const {
+real_t TextServerGDNative::shaped_text_get_width(RID p_shaped) const {
ERR_FAIL_COND_V(interface == nullptr, 0.f);
return interface->shaped_text_get_width(data, (godot_rid *)&p_shaped);
}
-float TextServerGDNative::shaped_text_get_underline_position(RID p_shaped) const {
+real_t TextServerGDNative::shaped_text_get_underline_position(RID p_shaped) const {
ERR_FAIL_COND_V(interface == nullptr, 0.f);
return interface->shaped_text_get_underline_position(data, (godot_rid *)&p_shaped);
}
-float TextServerGDNative::shaped_text_get_underline_thickness(RID p_shaped) const {
+real_t TextServerGDNative::shaped_text_get_underline_thickness(RID p_shaped) const {
ERR_FAIL_COND_V(interface == nullptr, 0.f);
return interface->shaped_text_get_underline_thickness(data, (godot_rid *)&p_shaped);
}
@@ -756,12 +936,12 @@ void GDAPI godot_glyph_set_offset(godot_glyph *p_self, const godot_vector2 *p_of
self->y_off = offset->y;
}
-godot_float GDAPI godot_glyph_get_advance(const godot_glyph *p_self) {
+godot_real_t GDAPI godot_glyph_get_advance(const godot_glyph *p_self) {
const TextServer::Glyph *self = (const TextServer::Glyph *)p_self;
return self->advance;
}
-void GDAPI godot_glyph_set_advance(godot_glyph *p_self, godot_float p_advance) {
+void GDAPI godot_glyph_set_advance(godot_glyph *p_self, godot_real_t p_advance) {
TextServer::Glyph *self = (TextServer::Glyph *)p_self;
self->advance = p_advance;
}
diff --git a/modules/gdnative/text/text_server_gdnative.h b/modules/gdnative/text/text_server_gdnative.h
index e1b36f4264..f081637e23 100644
--- a/modules/gdnative/text/text_server_gdnative.h
+++ b/modules/gdnative/text/text_server_gdnative.h
@@ -60,78 +60,130 @@ public:
virtual bool is_locale_right_to_left(const String &p_locale) override;
+ virtual int32_t name_to_tag(const String &p_name) const override;
+ virtual String tag_to_name(int32_t p_tag) const override;
+
/* Font interface */
- virtual RID create_font_system(const String &p_name, int p_base_size = 16) override;
- virtual RID create_font_resource(const String &p_filename, int p_base_size = 16) override;
- virtual RID create_font_memory(const uint8_t *p_data, size_t p_size, const String &p_type, int p_base_size = 16) override;
- virtual RID create_font_bitmap(float p_height, float p_ascent, int p_base_size = 16) override;
+ virtual RID create_font() override;
+
+ virtual void font_set_data(RID p_font_rid, const PackedByteArray &p_data) override;
+ virtual void font_set_data_ptr(RID p_font_rid, const uint8_t *p_data_ptr, size_t p_data_size) override;
+
+ virtual void font_set_antialiased(RID p_font_rid, bool p_antialiased) override;
+ virtual bool font_is_antialiased(RID p_font_rid) const override;
+
+ virtual void font_set_multichannel_signed_distance_field(RID p_font_rid, bool p_msdf) override;
+ virtual bool font_is_multichannel_signed_distance_field(RID p_font_rid) const override;
+
+ virtual void font_set_msdf_pixel_range(RID p_font_rid, int p_msdf_pixel_range) override;
+ virtual int font_get_msdf_pixel_range(RID p_font_rid) const override;
+
+ virtual void font_set_msdf_size(RID p_font_rid, int p_msdf_size) override;
+ virtual int font_get_msdf_size(RID p_font_rid) const override;
+
+ virtual void font_set_fixed_size(RID p_font_rid, int p_fixed_size) override;
+ virtual int font_get_fixed_size(RID p_font_rid) const override;
+
+ virtual void font_set_force_autohinter(RID p_font_rid, bool p_force_autohinter) override;
+ virtual bool font_is_force_autohinter(RID p_font_rid) const override;
+
+ virtual void font_set_hinting(RID p_font_rid, TextServer::Hinting p_hinting) override;
+ virtual TextServer::Hinting font_get_hinting(RID p_font_rid) const override;
+
+ virtual void font_set_variation_coordinates(RID p_font_rid, const Dictionary &p_variation_coordinates) override;
+ virtual Dictionary font_get_variation_coordinates(RID p_font_rid) const override;
+
+ virtual void font_set_oversampling(RID p_font_rid, real_t p_oversampling) override;
+ virtual real_t font_get_oversampling(RID p_font_rid) const override;
+
+ virtual Array font_get_size_cache_list(RID p_font_rid) const override;
+ virtual void font_clear_size_cache(RID p_font_rid) override;
+ virtual void font_remove_size_cache(RID p_font_rid, const Vector2i &p_size) override;
+
+ virtual void font_set_ascent(RID p_font_rid, int p_size, real_t p_ascent) override;
+ virtual real_t font_get_ascent(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_descent(RID p_font_rid, int p_size, real_t p_descent) override;
+ virtual real_t font_get_descent(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_underline_position(RID p_font_rid, int p_size, real_t p_underline_position) override;
+ virtual real_t font_get_underline_position(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_underline_thickness(RID p_font_rid, int p_size, real_t p_underline_thickness) override;
+ virtual real_t font_get_underline_thickness(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_scale(RID p_font_rid, int p_size, real_t p_scale) override;
+ virtual real_t font_get_scale(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_spacing(RID p_font_rid, int p_size, SpacingType p_spacing, int p_value) override;
+ virtual int font_get_spacing(RID p_font_rid, int p_size, SpacingType p_spacing) const override;
- virtual void font_bitmap_add_texture(RID p_font, const Ref<Texture> &p_texture) override;
- virtual void font_bitmap_add_char(RID p_font, char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) override;
- virtual void font_bitmap_add_kerning_pair(RID p_font, char32_t p_A, char32_t p_B, int p_kerning) override;
+ virtual int font_get_texture_count(RID p_font_rid, const Vector2i &p_size) const override;
+ virtual void font_clear_textures(RID p_font_rid, const Vector2i &p_size) override;
+ virtual void font_remove_texture(RID p_font_rid, const Vector2i &p_size, int p_texture_index) override;
- virtual float font_get_height(RID p_font, int p_size) const override;
- virtual float font_get_ascent(RID p_font, int p_size) const override;
- virtual float font_get_descent(RID p_font, int p_size) const override;
+ virtual void font_set_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const Ref<Image> &p_image) override;
+ virtual Ref<Image> font_get_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const override;
- virtual float font_get_underline_position(RID p_font, int p_size) const override;
- virtual float font_get_underline_thickness(RID p_font, int p_size) const override;
+ virtual void font_set_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const PackedInt32Array &p_offset) override;
+ virtual PackedInt32Array font_get_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const override;
- virtual int font_get_spacing_space(RID p_font) const override;
- virtual void font_set_spacing_space(RID p_font, int p_value) override;
+ virtual Array font_get_glyph_list(RID p_font_rid, const Vector2i &p_size) const override;
+ virtual void font_clear_glyphs(RID p_font_rid, const Vector2i &p_size) override;
+ virtual void font_remove_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) override;
- virtual int font_get_spacing_glyph(RID p_font) const override;
- virtual void font_set_spacing_glyph(RID p_font, int p_value) override;
+ virtual Vector2 font_get_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph, const Vector2 &p_advance) override;
- virtual void font_set_antialiased(RID p_font, bool p_antialiased) override;
- virtual bool font_get_antialiased(RID p_font) const override;
+ virtual Vector2 font_get_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_offset) override;
- virtual Dictionary font_get_feature_list(RID p_font) const override;
- virtual Dictionary font_get_variation_list(RID p_font) const override;
+ virtual Vector2 font_get_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_gl_size) override;
- virtual void font_set_variation(RID p_font, const String &p_name, double p_value) override;
- virtual double font_get_variation(RID p_font, const String &p_name) const override;
+ virtual Rect2 font_get_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Rect2 &p_uv_rect) override;
- virtual void font_set_hinting(RID p_font, Hinting p_hinting) override;
- virtual Hinting font_get_hinting(RID p_font) const override;
+ virtual int font_get_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, int p_texture_idx) override;
- virtual void font_set_distance_field_hint(RID p_font, bool p_distance_field) override;
- virtual bool font_get_distance_field_hint(RID p_font) const override;
+ virtual bool font_get_glyph_contours(RID p_font, int p_size, int32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const override;
- virtual void font_set_force_autohinter(RID p_font, bool p_enabeld) override;
- virtual bool font_get_force_autohinter(RID p_font) const override;
+ virtual Array font_get_kerning_list(RID p_font_rid, int p_size) const override;
+ virtual void font_clear_kerning_map(RID p_font_rid, int p_size) override;
+ virtual void font_remove_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) override;
- virtual bool font_has_char(RID p_font, char32_t p_char) const override;
- virtual String font_get_supported_chars(RID p_font) const override;
+ virtual void font_set_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) override;
+ virtual Vector2 font_get_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) const override;
- virtual bool font_has_outline(RID p_font) const override;
- virtual float font_get_base_size(RID p_font) const override;
+ virtual int32_t font_get_glyph_index(RID p_font_rid, int p_size, char32_t p_char, char32_t p_variation_selector = 0) const override;
- virtual bool font_is_language_supported(RID p_font, const String &p_language) const override;
- virtual void font_set_language_support_override(RID p_font, const String &p_language, bool p_supported) override;
- virtual bool font_get_language_support_override(RID p_font, const String &p_language) override;
- virtual void font_remove_language_support_override(RID p_font, const String &p_language) override;
- Vector<String> font_get_language_support_overrides(RID p_font) override;
+ virtual bool font_has_char(RID p_font_rid, char32_t p_char) const override;
+ virtual String font_get_supported_chars(RID p_font_rid) const override;
- virtual bool font_is_script_supported(RID p_font, const String &p_script) const override;
- virtual void font_set_script_support_override(RID p_font, const String &p_script, bool p_supported) override;
- virtual bool font_get_script_support_override(RID p_font, const String &p_script) override;
- virtual void font_remove_script_support_override(RID p_font, const String &p_script) override;
- Vector<String> font_get_script_support_overrides(RID p_font) override;
+ virtual void font_render_range(RID p_font, const Vector2i &p_size, char32_t p_start, char32_t p_end) override;
+ virtual void font_render_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_index) override;
- virtual uint32_t font_get_glyph_index(RID p_font, char32_t p_char, char32_t p_variation_selector = 0x0000) const override;
- virtual Vector2 font_get_glyph_advance(RID p_font, uint32_t p_index, int p_size) const override;
- virtual Vector2 font_get_glyph_kerning(RID p_font, uint32_t p_index_a, uint32_t p_index_b, int p_size) const override;
+ virtual void font_draw_glyph(RID p_font, RID p_canvas, int p_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
+ virtual void font_draw_glyph_outline(RID p_font, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
- virtual Vector2 font_draw_glyph(RID p_font, RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
- virtual Vector2 font_draw_glyph_outline(RID p_font, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
+ virtual bool font_is_language_supported(RID p_font_rid, const String &p_language) const override;
+ virtual void font_set_language_support_override(RID p_font_rid, const String &p_language, bool p_supported) override;
+ virtual bool font_get_language_support_override(RID p_font_rid, const String &p_language) override;
+ virtual void font_remove_language_support_override(RID p_font_rid, const String &p_language) override;
+ virtual Vector<String> font_get_language_support_overrides(RID p_font_rid) override;
- virtual bool font_get_glyph_contours(RID p_font, int p_size, uint32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const override;
+ virtual bool font_is_script_supported(RID p_font_rid, const String &p_script) const override;
+ virtual void font_set_script_support_override(RID p_font_rid, const String &p_script, bool p_supported) override;
+ virtual bool font_get_script_support_override(RID p_font_rid, const String &p_script) override;
+ virtual void font_remove_script_support_override(RID p_font_rid, const String &p_script) override;
+ virtual Vector<String> font_get_script_support_overrides(RID p_font_rid) override;
- virtual float font_get_oversampling() const override;
- virtual void font_set_oversampling(float p_oversampling) override;
+ virtual Dictionary font_supported_feature_list(RID p_font_rid) const override;
+ virtual Dictionary font_supported_variation_list(RID p_font_rid) const override;
- virtual Vector<String> get_system_fonts() const override;
+ virtual real_t font_get_global_oversampling() const override;
+ virtual void font_set_global_oversampling(real_t p_oversampling) override;
/* Shaped text buffer interface */
@@ -160,14 +212,14 @@ public:
virtual RID shaped_text_substr(RID p_shaped, int p_start, int p_length) const override;
virtual RID shaped_text_get_parent(RID p_shaped) const override;
- virtual float shaped_text_fit_to_width(RID p_shaped, float p_width, uint8_t /*JustificationFlag*/ p_jst_flags = JUSTIFICATION_WORD_BOUND | JUSTIFICATION_KASHIDA) override;
- virtual float shaped_text_tab_align(RID p_shaped, const Vector<float> &p_tab_stops) override;
+ virtual real_t shaped_text_fit_to_width(RID p_shaped, real_t p_width, uint8_t /*JustificationFlag*/ p_jst_flags = JUSTIFICATION_WORD_BOUND | JUSTIFICATION_KASHIDA) override;
+ virtual real_t shaped_text_tab_align(RID p_shaped, const Vector<real_t> &p_tab_stops) override;
virtual bool shaped_text_shape(RID p_shaped) override;
virtual bool shaped_text_update_breaks(RID p_shaped) override;
virtual bool shaped_text_update_justification_ops(RID p_shaped) override;
- virtual void shaped_text_overrun_trim_to_width(RID p_shaped, float p_width, uint8_t p_trim_flags) override;
+ virtual void shaped_text_overrun_trim_to_width(RID p_shaped, real_t p_width, uint8_t p_trim_flags) override;
virtual bool shaped_text_is_ready(RID p_shaped) const override;
@@ -176,18 +228,18 @@ public:
virtual Vector2i shaped_text_get_range(RID p_shaped) const override;
virtual Vector<Glyph> shaped_text_sort_logical(RID p_shaped) override;
- virtual Vector<Vector2i> shaped_text_get_line_breaks_adv(RID p_shaped, const Vector<float> &p_width, int p_start = 0, bool p_once = true, uint8_t /*TextBreakFlag*/ p_break_flags = BREAK_MANDATORY | BREAK_WORD_BOUND) const override;
- virtual Vector<Vector2i> shaped_text_get_line_breaks(RID p_shaped, float p_width, int p_start = 0, uint8_t p_break_flags = BREAK_MANDATORY | BREAK_WORD_BOUND) const override;
+ virtual Vector<Vector2i> shaped_text_get_line_breaks_adv(RID p_shaped, const Vector<real_t> &p_width, int p_start = 0, bool p_once = true, uint8_t /*TextBreakFlag*/ p_break_flags = BREAK_MANDATORY | BREAK_WORD_BOUND) const override;
+ virtual Vector<Vector2i> shaped_text_get_line_breaks(RID p_shaped, real_t p_width, int p_start = 0, uint8_t p_break_flags = BREAK_MANDATORY | BREAK_WORD_BOUND) const override;
virtual Vector<Vector2i> shaped_text_get_word_breaks(RID p_shaped, int p_grapheme_flags = GRAPHEME_IS_SPACE | GRAPHEME_IS_PUNCTUATION) const override;
virtual Array shaped_text_get_objects(RID p_shaped) const override;
virtual Rect2 shaped_text_get_object_rect(RID p_shaped, Variant p_key) const override;
virtual Size2 shaped_text_get_size(RID p_shaped) const override;
- virtual float shaped_text_get_ascent(RID p_shaped) const override;
- virtual float shaped_text_get_descent(RID p_shaped) const override;
- virtual float shaped_text_get_width(RID p_shaped) const override;
- virtual float shaped_text_get_underline_position(RID p_shaped) const override;
- virtual float shaped_text_get_underline_thickness(RID p_shaped) const override;
+ virtual real_t shaped_text_get_ascent(RID p_shaped) const override;
+ virtual real_t shaped_text_get_descent(RID p_shaped) const override;
+ virtual real_t shaped_text_get_width(RID p_shaped) const override;
+ virtual real_t shaped_text_get_underline_position(RID p_shaped) const override;
+ virtual real_t shaped_text_get_underline_thickness(RID p_shaped) const override;
virtual String format_number(const String &p_string, const String &p_language = "") const override;
virtual String parse_number(const String &p_string, const String &p_language = "") const override;
diff --git a/modules/gdnative/xr/SCsub b/modules/gdnative/xr/SCsub
deleted file mode 100644
index 0b2db3b504..0000000000
--- a/modules/gdnative/xr/SCsub
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env python
-
-Import("env")
-Import("env_gdnative")
-
-env_gdnative.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/gdnative/xr/xr_interface_gdnative.cpp b/modules/gdnative/xr/xr_interface_gdnative.cpp
deleted file mode 100644
index e51542e23d..0000000000
--- a/modules/gdnative/xr/xr_interface_gdnative.cpp
+++ /dev/null
@@ -1,450 +0,0 @@
-/*************************************************************************/
-/* xr_interface_gdnative.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "xr_interface_gdnative.h"
-#include "core/input/input.h"
-#include "servers/rendering/rendering_server_globals.h"
-#include "servers/xr/xr_positional_tracker.h"
-
-void XRInterfaceGDNative::_bind_methods() {
- ADD_PROPERTY_DEFAULT("interface_is_initialized", false);
- ADD_PROPERTY_DEFAULT("ar_is_anchor_detection_enabled", false);
-}
-
-XRInterfaceGDNative::XRInterfaceGDNative() {
- print_verbose("Construct gdnative interface\n");
-
- // we won't have our data pointer until our library gets set
- data = nullptr;
-
- interface = nullptr;
-}
-
-XRInterfaceGDNative::~XRInterfaceGDNative() {
- print_verbose("Destruct gdnative interface\n");
-
- if (interface != nullptr && is_initialized()) {
- uninitialize();
- };
-
- // cleanup after ourselves
- cleanup();
-}
-
-void XRInterfaceGDNative::cleanup() {
- if (interface != nullptr) {
- interface->destructor(data);
- data = nullptr;
- interface = nullptr;
- }
-}
-
-void XRInterfaceGDNative::set_interface(const godot_xr_interface_gdnative *p_interface) {
- // this should only be called once, just being paranoid..
- if (interface) {
- cleanup();
- interface = NULL;
- }
-
- // validate
- ERR_FAIL_NULL(p_interface);
- ERR_FAIL_COND_MSG(p_interface->version.major < 4, "This is an incompatible GDNative XR plugin.");
-
- // bind to our interface
- interface = p_interface;
-
- // Now we do our constructing...
- data = interface->constructor((godot_object *)this);
-}
-
-StringName XRInterfaceGDNative::get_name() const {
- ERR_FAIL_COND_V(interface == nullptr, StringName());
-
- godot_string result = interface->get_name(data);
-
- StringName name = *(String *)&result;
-
- godot_string_destroy(&result);
-
- return name;
-}
-
-int XRInterfaceGDNative::get_capabilities() const {
- int capabilities;
-
- ERR_FAIL_COND_V(interface == nullptr, 0); // 0 = None
-
- capabilities = interface->get_capabilities(data);
-
- return capabilities;
-}
-
-bool XRInterfaceGDNative::get_anchor_detection_is_enabled() const {
- ERR_FAIL_COND_V(interface == nullptr, false);
-
- return interface->get_anchor_detection_is_enabled(data);
-}
-
-void XRInterfaceGDNative::set_anchor_detection_is_enabled(bool p_enable) {
- ERR_FAIL_COND(interface == nullptr);
-
- interface->set_anchor_detection_is_enabled(data, p_enable);
-}
-
-int XRInterfaceGDNative::get_camera_feed_id() {
- ERR_FAIL_COND_V(interface == nullptr, 0);
-
- return (unsigned int)interface->get_camera_feed_id(data);
-}
-
-uint32_t XRInterfaceGDNative::get_view_count() {
- uint32_t view_count;
-
- ERR_FAIL_COND_V(interface == nullptr, 1);
-
- view_count = interface->get_view_count(data);
-
- return view_count;
-}
-
-bool XRInterfaceGDNative::is_initialized() const {
- ERR_FAIL_COND_V(interface == nullptr, false);
-
- return interface->is_initialized(data);
-}
-
-bool XRInterfaceGDNative::initialize() {
- ERR_FAIL_COND_V(interface == nullptr, false);
-
- bool initialized = interface->initialize(data);
-
- if (initialized) {
- // if we successfully initialize our interface and we don't have a primary interface yet, this becomes our primary interface
-
- XRServer *xr_server = XRServer::get_singleton();
- if ((xr_server != nullptr) && (xr_server->get_primary_interface() == nullptr)) {
- xr_server->set_primary_interface(this);
- };
- };
-
- return initialized;
-}
-
-void XRInterfaceGDNative::uninitialize() {
- ERR_FAIL_COND(interface == nullptr);
-
- XRServer *xr_server = XRServer::get_singleton();
- if (xr_server != nullptr) {
- // Whatever happens, make sure this is no longer our primary interface
- xr_server->clear_primary_interface_if(this);
- }
-
- interface->uninitialize(data);
-}
-
-Size2 XRInterfaceGDNative::get_render_targetsize() {
- ERR_FAIL_COND_V(interface == nullptr, Size2());
-
- godot_vector2 result = interface->get_render_targetsize(data);
- Vector2 *vec = (Vector2 *)&result;
-
- return *vec;
-}
-
-Transform3D XRInterfaceGDNative::get_camera_transform() {
- Transform3D *ret;
-
- ERR_FAIL_COND_V(interface == nullptr, Transform3D());
-
- godot_transform3d t = interface->get_camera_transform(data);
-
- ret = (Transform3D *)&t;
-
- return *ret;
-}
-
-Transform3D XRInterfaceGDNative::get_transform_for_view(uint32_t p_view, const Transform3D &p_cam_transform) {
- Transform3D *ret;
-
- ERR_FAIL_COND_V(interface == nullptr, Transform3D());
-
- godot_transform3d t = interface->get_transform_for_view(data, (int)p_view, (godot_transform3d *)&p_cam_transform);
-
- ret = (Transform3D *)&t;
-
- return *ret;
-}
-
-CameraMatrix XRInterfaceGDNative::get_projection_for_view(uint32_t p_view, real_t p_aspect, real_t p_z_near, real_t p_z_far) {
- CameraMatrix cm;
-
- ERR_FAIL_COND_V(interface == nullptr, CameraMatrix());
-
- interface->fill_projection_for_view(data, (godot_real_t *)cm.matrix, (godot_int)p_view, p_aspect, p_z_near, p_z_far);
-
- return cm;
-}
-
-Vector<BlitToScreen> XRInterfaceGDNative::commit_views(RID p_render_target, const Rect2 &p_screen_rect) {
- // possibly move this as a member variable and add a callback to populate?
- Vector<BlitToScreen> blit_to_screen;
-
- ERR_FAIL_COND_V(interface == nullptr, blit_to_screen);
-
- // must implement
- interface->commit_views(data, (godot_rid *)&p_render_target, (godot_rect2 *)&p_screen_rect);
-
- return blit_to_screen;
-}
-
-unsigned int XRInterfaceGDNative::get_external_texture_for_eye(XRInterface::Eyes p_eye) {
- ERR_FAIL_COND_V(interface == nullptr, 0);
-
- return (unsigned int)interface->get_external_texture_for_eye(data, (godot_int)p_eye);
-}
-
-void XRInterfaceGDNative::commit_for_eye(XRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) {
- ERR_FAIL_COND(interface == nullptr);
-
- interface->commit_for_eye(data, (godot_int)p_eye, (godot_rid *)&p_render_target, (godot_rect2 *)&p_screen_rect);
-}
-
-void XRInterfaceGDNative::process() {
- ERR_FAIL_COND(interface == nullptr);
-
- interface->process(data);
-}
-
-void XRInterfaceGDNative::notification(int p_what) {
- ERR_FAIL_COND(interface == nullptr);
-
- interface->notification(data, p_what);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////
-// some helper callbacks
-
-extern "C" {
-
-void GDAPI godot_xr_register_interface(const godot_xr_interface_gdnative *p_interface) {
- // Must be on a version 4 plugin
- ERR_FAIL_COND_MSG(p_interface->version.major < 4, "GDNative XR interfaces build for Godot 3.x are not supported.");
-
- Ref<XRInterfaceGDNative> new_interface;
- new_interface.instantiate();
- new_interface->set_interface((const godot_xr_interface_gdnative *)p_interface);
- XRServer::get_singleton()->add_interface(new_interface);
-}
-
-godot_real_t GDAPI godot_xr_get_worldscale() {
- XRServer *xr_server = XRServer::get_singleton();
- ERR_FAIL_NULL_V(xr_server, 1.0);
-
- return xr_server->get_world_scale();
-}
-
-godot_transform3d GDAPI godot_xr_get_reference_frame() {
- godot_transform3d reference_frame;
- Transform3D *reference_frame_ptr = (Transform3D *)&reference_frame;
-
- XRServer *xr_server = XRServer::get_singleton();
- if (xr_server != nullptr) {
- *reference_frame_ptr = xr_server->get_reference_frame();
- } else {
- memnew_placement(&reference_frame, Transform3D);
- }
-
- return reference_frame;
-}
-
-void GDAPI godot_xr_blit(godot_int p_eye, godot_rid *p_render_target, godot_rect2 *p_rect) {
- // blits out our texture as is, handy for preview display of one of the eyes that is already rendered with lens distortion on an external HMD
- XRInterface::Eyes eye = (XRInterface::Eyes)p_eye;
-#if 0
- RID *render_target = (RID *)p_render_target;
-#endif
- Rect2 screen_rect = *(Rect2 *)p_rect;
-
- if (eye == XRInterface::EYE_LEFT) {
- screen_rect.size.x /= 2.0;
- } else if (p_eye == XRInterface::EYE_RIGHT) {
- screen_rect.size.x /= 2.0;
- screen_rect.position.x += screen_rect.size.x;
- }
-#ifndef _MSC_VER
-#warning this needs to be redone
-#endif
-#if 0
- RSG::rasterizer->blit_render_target_to_screen(*render_target, screen_rect, 0);
-#endif
-}
-
-godot_int GDAPI godot_xr_get_texid(godot_rid *p_render_target) {
- // In order to send off our textures to display on our hardware we need the opengl texture ID instead of the render target RID
- // This is a handy function to expose that.
-#if 0
- RID *render_target = (RID *)p_render_target;
-
- RID eye_texture = RSG::storage->render_target_get_texture(*render_target);
-#endif
-
-#ifndef _MSC_VER
-#warning need to obtain this ID again
-#endif
- uint32_t texid = 0; //RS::get_singleton()->texture_get_texid(eye_texture);
-
- return texid;
-}
-
-godot_int GDAPI godot_xr_add_controller(char *p_device_name, godot_int p_hand, godot_bool p_tracks_orientation, godot_bool p_tracks_position) {
- XRServer *xr_server = XRServer::get_singleton();
- ERR_FAIL_NULL_V(xr_server, 0);
-
- Input *input = Input::get_singleton();
- ERR_FAIL_NULL_V(input, 0);
-
- Ref<XRPositionalTracker> new_tracker;
- new_tracker.instantiate();
- new_tracker->set_tracker_name(p_device_name);
- new_tracker->set_tracker_type(XRServer::TRACKER_CONTROLLER);
- if (p_hand == 1) {
- new_tracker->set_tracker_hand(XRPositionalTracker::TRACKER_HAND_LEFT);
- } else if (p_hand == 2) {
- new_tracker->set_tracker_hand(XRPositionalTracker::TRACKER_HAND_RIGHT);
- }
-
- // also register as joystick...
- int joyid = input->get_unused_joy_id();
- if (joyid != -1) {
- new_tracker->set_joy_id(joyid);
- input->joy_connection_changed(joyid, true, p_device_name, "");
- }
-
- if (p_tracks_orientation) {
- Basis orientation;
- new_tracker->set_orientation(orientation);
- }
- if (p_tracks_position) {
- Vector3 position;
- new_tracker->set_position(position);
- }
-
- // add our tracker to our server and remember its pointer
- xr_server->add_tracker(new_tracker);
-
- // note, this ID is only unique within controllers!
- return new_tracker->get_tracker_id();
-}
-
-void GDAPI godot_xr_remove_controller(godot_int p_controller_id) {
- XRServer *xr_server = XRServer::get_singleton();
- ERR_FAIL_NULL(xr_server);
-
- Input *input = Input::get_singleton();
- ERR_FAIL_NULL(input);
-
- Ref<XRPositionalTracker> remove_tracker = xr_server->find_by_type_and_id(XRServer::TRACKER_CONTROLLER, p_controller_id);
- if (remove_tracker.is_valid()) {
- // unset our joystick if applicable
- int joyid = remove_tracker->get_joy_id();
- if (joyid != -1) {
- input->joy_connection_changed(joyid, false, "", "");
- remove_tracker->set_joy_id(-1);
- }
-
- // remove our tracker from our server
- xr_server->remove_tracker(remove_tracker);
- remove_tracker.unref();
- }
-}
-
-void GDAPI godot_xr_set_controller_transform(godot_int p_controller_id, godot_transform3d *p_transform, godot_bool p_tracks_orientation, godot_bool p_tracks_position) {
- XRServer *xr_server = XRServer::get_singleton();
- ERR_FAIL_NULL(xr_server);
-
- Ref<XRPositionalTracker> tracker = xr_server->find_by_type_and_id(XRServer::TRACKER_CONTROLLER, p_controller_id);
- if (tracker.is_valid()) {
- Transform3D *transform = (Transform3D *)p_transform;
- if (p_tracks_orientation) {
- tracker->set_orientation(transform->basis);
- }
- if (p_tracks_position) {
- tracker->set_rw_position(transform->origin);
- }
- }
-}
-
-void GDAPI godot_xr_set_controller_button(godot_int p_controller_id, godot_int p_button, godot_bool p_is_pressed) {
- XRServer *xr_server = XRServer::get_singleton();
- ERR_FAIL_NULL(xr_server);
-
- Input *input = Input::get_singleton();
- ERR_FAIL_NULL(input);
-
- Ref<XRPositionalTracker> tracker = xr_server->find_by_type_and_id(XRServer::TRACKER_CONTROLLER, p_controller_id);
- if (tracker.is_valid()) {
- int joyid = tracker->get_joy_id();
- if (joyid != -1) {
- input->joy_button(joyid, (JoyButton)p_button, p_is_pressed);
- }
- }
-}
-
-void GDAPI godot_xr_set_controller_axis(godot_int p_controller_id, godot_int p_axis, godot_real_t p_value, godot_bool p_can_be_negative) {
- XRServer *xr_server = XRServer::get_singleton();
- ERR_FAIL_NULL(xr_server);
-
- Input *input = Input::get_singleton();
- ERR_FAIL_NULL(input);
-
- Ref<XRPositionalTracker> tracker = xr_server->find_by_type_and_id(XRServer::TRACKER_CONTROLLER, p_controller_id);
- if (tracker.is_valid()) {
- int joyid = tracker->get_joy_id();
- if (joyid != -1) {
- Input::JoyAxisValue jx;
- jx.min = p_can_be_negative ? -1 : 0;
- jx.value = p_value;
- input->joy_axis(joyid, (JoyAxis)p_axis, jx);
- }
- }
-}
-
-godot_real_t GDAPI godot_xr_get_controller_rumble(godot_int p_controller_id) {
- XRServer *xr_server = XRServer::get_singleton();
- ERR_FAIL_NULL_V(xr_server, 0.0);
-
- Ref<XRPositionalTracker> tracker = xr_server->find_by_type_and_id(XRServer::TRACKER_CONTROLLER, p_controller_id);
- if (tracker.is_valid()) {
- return tracker->get_rumble();
- }
-
- return 0.0;
-}
-}
diff --git a/modules/gdscript/doc_classes/GDScript.xml b/modules/gdscript/doc_classes/GDScript.xml
index 72738f027a..d45202bd40 100644
--- a/modules/gdscript/doc_classes/GDScript.xml
+++ b/modules/gdscript/doc_classes/GDScript.xml
@@ -30,6 +30,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp
index 3441233811..6529154e5c 100644
--- a/modules/gdscript/editor/gdscript_highlighter.cpp
+++ b/modules/gdscript/editor/gdscript_highlighter.cpp
@@ -45,7 +45,7 @@ static bool _is_bin_symbol(char32_t c) {
return (c == '0' || c == '1');
}
-Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting(int p_line) {
+Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting_impl(int p_line) {
Dictionary color_map;
Type next_type = NONE;
@@ -459,11 +459,7 @@ void GDScriptSyntaxHighlighter::_update_cache() {
List<StringName> types;
ClassDB::get_class_list(&types);
for (const StringName &E : types) {
- String n = E;
- if (n.begins_with("_")) {
- n = n.substr(1, n.length());
- }
- keywords[n] = types_color;
+ keywords[E] = types_color;
}
/* User types. */
@@ -471,13 +467,13 @@ void GDScriptSyntaxHighlighter::_update_cache() {
List<StringName> global_classes;
ScriptServer::get_global_class_list(&global_classes);
for (const StringName &E : global_classes) {
- keywords[String(E)] = usertype_color;
+ keywords[E] = usertype_color;
}
/* Autoloads. */
- Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
- for (Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E; E = E->next()) {
- const ProjectSettings::AutoloadInfo &info = E->value();
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
+ const ProjectSettings::AutoloadInfo &info = E.value();
if (info.is_singleton) {
keywords[info.name] = usertype_color;
}
@@ -490,7 +486,7 @@ void GDScriptSyntaxHighlighter::_update_cache() {
List<String> core_types;
gdscript->get_core_type_words(&core_types);
for (const String &E : core_types) {
- keywords[E] = basetype_color;
+ keywords[StringName(E)] = basetype_color;
}
/* Reserved words. */
@@ -500,9 +496,9 @@ void GDScriptSyntaxHighlighter::_update_cache() {
gdscript->get_reserved_words(&keyword_list);
for (const String &E : keyword_list) {
if (gdscript->is_control_flow_keyword(E)) {
- keywords[E] = control_flow_keyword_color;
+ keywords[StringName(E)] = control_flow_keyword_color;
} else {
- keywords[E] = keyword_color;
+ keywords[StringName(E)] = keyword_color;
}
}
diff --git a/modules/gdscript/editor/gdscript_highlighter.h b/modules/gdscript/editor/gdscript_highlighter.h
index d07c182aa6..07f21b34ae 100644
--- a/modules/gdscript/editor/gdscript_highlighter.h
+++ b/modules/gdscript/editor/gdscript_highlighter.h
@@ -47,8 +47,8 @@ private:
Vector<ColorRegion> color_regions;
Map<int, int> color_region_cache;
- Dictionary keywords;
- Dictionary member_keywords;
+ HashMap<StringName, Color> keywords;
+ HashMap<StringName, Color> member_keywords;
enum Type {
NONE,
@@ -80,7 +80,7 @@ private:
public:
virtual void _update_cache() override;
- virtual Dictionary _get_line_syntax_highlighting(int p_line) override;
+ virtual Dictionary _get_line_syntax_highlighting_impl(int p_line) override;
virtual String _get_name() const override;
virtual Array _get_supported_languages() const override;
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 8957b00a1b..bc8801b8b9 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -87,6 +87,19 @@ Object *GDScriptNativeClass::instantiate() {
return ClassDB::instantiate(name);
}
+GDScriptFunction *GDScript::_super_constructor(GDScript *p_script) {
+ if (p_script->initializer) {
+ return p_script->initializer;
+ } else {
+ GDScript *base = p_script->_base;
+ if (base != nullptr) {
+ return _super_constructor(base);
+ } else {
+ return nullptr;
+ }
+ }
+}
+
void GDScript::_super_implicit_constructor(GDScript *p_script, GDScriptInstance *p_instance, Callable::CallError &r_error) {
GDScript *base = p_script->_base;
if (base != nullptr) {
@@ -135,6 +148,8 @@ GDScriptInstance *GDScript::_create_instance(const Variant **p_args, int p_argco
if (p_argcount < 0) {
return instance;
}
+
+ initializer = _super_constructor(this);
if (initializer != nullptr) {
initializer->call(instance, p_args, p_argcount, r_error);
if (r_error.error != Callable::CallError::CALL_OK) {
@@ -625,9 +640,9 @@ bool GDScript::_update_exports(bool *r_err, bool p_recursive_call, PlaceHolderSc
String path = "";
if (String(c->extends_path) != "" && String(c->extends_path) != get_path()) {
path = c->extends_path;
- if (path.is_rel_path()) {
+ if (path.is_relative_path()) {
String base = get_path();
- if (base == "" || base.is_rel_path()) {
+ if (base == "" || base.is_relative_path()) {
ERR_PRINT(("Could not resolve relative path for parent class: " + path).utf8().get_data());
} else {
path = base.get_base_dir().plus_file(path);
@@ -900,7 +915,7 @@ void GDScript::get_members(Set<StringName> *p_members) {
}
}
-const Vector<MultiplayerAPI::RPCConfig> GDScript::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> GDScript::get_rpc_methods() const {
return rpc_functions;
}
@@ -1164,8 +1179,8 @@ void GDScript::_init_rpc_methods_properties() {
while (cscript) {
// RPC Methods
for (Map<StringName, GDScriptFunction *>::Element *E = cscript->member_functions.front(); E; E = E->next()) {
- MultiplayerAPI::RPCConfig config = E->get()->get_rpc_config();
- if (config.rpc_mode != MultiplayerAPI::RPC_MODE_DISABLED) {
+ Multiplayer::RPCConfig config = E->get()->get_rpc_config();
+ if (config.rpc_mode != Multiplayer::RPC_MODE_DISABLED) {
config.name = E->get()->get_name();
if (rpc_functions.find(config) == -1) {
rpc_functions.push_back(config);
@@ -1185,7 +1200,7 @@ void GDScript::_init_rpc_methods_properties() {
}
// Sort so we are 100% that they are always the same.
- rpc_functions.sort_custom<MultiplayerAPI::SortRPCConfig>();
+ rpc_functions.sort_custom<Multiplayer::SortRPCConfig>();
}
GDScript::~GDScript() {
@@ -1541,7 +1556,7 @@ ScriptLanguage *GDScriptInstance::get_language() {
return GDScriptLanguage::get_singleton();
}
-const Vector<MultiplayerAPI::RPCConfig> GDScriptInstance::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> GDScriptInstance::get_rpc_methods() const {
return script->get_rpc_methods();
}
@@ -1644,16 +1659,11 @@ void GDScriptLanguage::init() {
List<StringName> class_list;
ClassDB::get_class_list(&class_list);
for (const StringName &n : class_list) {
- String s = String(n);
- if (s.begins_with("_")) {
- s = s.substr(1, s.length());
- }
-
- if (globals.has(s)) {
+ if (globals.has(n)) {
continue;
}
Ref<GDScriptNativeClass> nc = memnew(GDScriptNativeClass(n));
- _add_global(s, nc);
+ _add_global(n, nc);
}
//populate singletons
@@ -2064,7 +2074,7 @@ String GDScriptLanguage::get_global_class_name(const String &p_path, String *r_b
if (r_icon_path) {
if (c->icon_path.is_empty() || c->icon_path.is_absolute_path()) {
*r_icon_path = c->icon_path;
- } else if (c->icon_path.is_rel_path()) {
+ } else if (c->icon_path.is_relative_path()) {
*r_icon_path = p_path.get_base_dir().plus_file(c->icon_path).simplify_path();
}
}
@@ -2092,7 +2102,7 @@ String GDScriptLanguage::get_global_class_name(const String &p_path, String *r_b
break;
}
String subpath = subclass->extends_path;
- if (subpath.is_rel_path()) {
+ if (subpath.is_relative_path()) {
subpath = path.get_base_dir().plus_file(subpath).simplify_path();
}
diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h
index 24809ad5fd..791f8a1431 100644
--- a/modules/gdscript/gdscript.h
+++ b/modules/gdscript/gdscript.h
@@ -85,7 +85,7 @@ class GDScript : public Script {
Map<StringName, MemberInfo> member_indices; //members are just indices to the instantiated script.
Map<StringName, Ref<GDScript>> subclasses;
Map<StringName, Vector<StringName>> _signals;
- Vector<MultiplayerAPI::RPCConfig> rpc_functions;
+ Vector<Multiplayer::RPCConfig> rpc_functions;
#ifdef TOOLS_ENABLED
@@ -130,6 +130,7 @@ class GDScript : public Script {
SelfList<GDScriptFunctionState>::List pending_func_states;
+ GDScriptFunction *_super_constructor(GDScript *p_script);
void _super_implicit_constructor(GDScript *p_script, GDScriptInstance *p_instance, Callable::CallError &r_error);
GDScriptInstance *_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_is_ref_counted, Callable::CallError &r_error);
@@ -245,7 +246,7 @@ public:
virtual void get_constants(Map<StringName, Variant> *p_constants) override;
virtual void get_members(Set<StringName> *p_members) override;
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const override;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override;
#ifdef TOOLS_ENABLED
virtual bool is_placeholder_fallback_enabled() const override { return placeholder_fallback_enabled; }
@@ -298,7 +299,7 @@ public:
void reload_members();
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const;
GDScriptInstance();
~GDScriptInstance();
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index c9b20463f6..2485e9f432 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -30,6 +30,7 @@
#include "gdscript_analyzer.h"
+#include "core/config/engine.h"
#include "core/config/project_settings.h"
#include "core/io/file_access.h"
#include "core/io/resource_loader.h"
@@ -112,11 +113,10 @@ static GDScriptParser::DataType make_native_enum_type(const StringName &p_native
type.is_meta_type = true;
List<StringName> enum_values;
- StringName real_native_name = GDScriptParser::get_real_class_name(p_native_class);
- ClassDB::get_enum_constants(real_native_name, p_enum_name, &enum_values);
+ ClassDB::get_enum_constants(p_native_class, p_enum_name, &enum_values);
for (const StringName &E : enum_values) {
- type.enum_values[E] = ClassDB::get_integer_constant(real_native_name, E);
+ type.enum_values[E] = ClassDB::get_integer_constant(p_native_class, E);
}
return type;
@@ -132,6 +132,81 @@ static GDScriptParser::DataType make_builtin_meta_type(Variant::Type p_type) {
return type;
}
+bool GDScriptAnalyzer::has_member_name_conflict_in_script_class(const StringName &p_member_name, const GDScriptParser::ClassNode *p_class) {
+ if (p_class->members_indices.has(p_member_name)) {
+ int index = p_class->members_indices[p_member_name];
+ const GDScriptParser::ClassNode::Member *member = &p_class->members[index];
+
+ if (member->type == GDScriptParser::ClassNode::Member::VARIABLE ||
+ member->type == GDScriptParser::ClassNode::Member::CONSTANT ||
+ member->type == GDScriptParser::ClassNode::Member::ENUM ||
+ member->type == GDScriptParser::ClassNode::Member::ENUM_VALUE ||
+ member->type == GDScriptParser::ClassNode::Member::CLASS ||
+ member->type == GDScriptParser::ClassNode::Member::SIGNAL) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool GDScriptAnalyzer::has_member_name_conflict_in_native_type(const StringName &p_member_name, const StringName &p_native_type_string) {
+ if (ClassDB::has_signal(p_native_type_string, p_member_name)) {
+ return true;
+ }
+ if (ClassDB::has_property(p_native_type_string, p_member_name)) {
+ return true;
+ }
+ if (ClassDB::has_integer_constant(p_native_type_string, p_member_name)) {
+ return true;
+ }
+
+ return false;
+}
+
+Error GDScriptAnalyzer::check_native_member_name_conflict(const StringName &p_member_name, const GDScriptParser::Node *p_member_node, const StringName &p_native_type_string) {
+ if (has_member_name_conflict_in_native_type(p_member_name, p_native_type_string)) {
+ push_error(vformat(R"(Member "%s" redefined (original in native class '%s'))", p_member_name, p_native_type_string), p_member_node);
+ return ERR_PARSE_ERROR;
+ }
+
+ if (class_exists(p_member_name)) {
+ push_error(vformat(R"(The member "%s" shadows a native class.)", p_member_name), p_member_node);
+ return ERR_PARSE_ERROR;
+ }
+
+ if (GDScriptParser::get_builtin_type(p_member_name) != Variant::VARIANT_MAX) {
+ push_error(vformat(R"(The member "%s" cannot have the same name as a builtin type.)", p_member_name), p_member_node);
+ return ERR_PARSE_ERROR;
+ }
+
+ return OK;
+}
+
+Error GDScriptAnalyzer::check_class_member_name_conflict(const GDScriptParser::ClassNode *p_class_node, const StringName &p_member_name, const GDScriptParser::Node *p_member_node) {
+ const GDScriptParser::DataType *current_data_type = &p_class_node->base_type;
+ while (current_data_type && current_data_type->kind == GDScriptParser::DataType::Kind::CLASS) {
+ GDScriptParser::ClassNode *current_class_node = current_data_type->class_type;
+ if (has_member_name_conflict_in_script_class(p_member_name, current_class_node)) {
+ push_error(vformat(R"(The member "%s" already exists in a parent class.)", p_member_name),
+ p_member_node);
+ return ERR_PARSE_ERROR;
+ }
+ current_data_type = &current_class_node->base_type;
+ }
+
+ if (current_data_type && current_data_type->kind == GDScriptParser::DataType::Kind::NATIVE) {
+ if (current_data_type->native_type != StringName("")) {
+ return check_native_member_name_conflict(
+ p_member_name,
+ p_member_node,
+ current_data_type->native_type);
+ }
+ }
+
+ return OK;
+}
+
Error GDScriptAnalyzer::resolve_inheritance(GDScriptParser::ClassNode *p_class, bool p_recursive) {
if (p_class->base_type.is_set()) {
// Already resolved
@@ -148,6 +223,17 @@ Error GDScriptAnalyzer::resolve_inheritance(GDScriptParser::ClassNode *p_class,
p_class->fqcn = p_class->outer->fqcn + "::" + String(p_class->identifier->name);
}
+ if (p_class->identifier) {
+ StringName class_name = p_class->identifier->name;
+ if (class_exists(class_name)) {
+ push_error(vformat(R"(Class "%s" hides a native class.)", class_name), p_class->identifier);
+ } else if (ScriptServer::is_global_class(class_name) && (ScriptServer::get_global_class_path(class_name) != parser->script_path || p_class != parser->head)) {
+ push_error(vformat(R"(Class "%s" hides a global script class.)", class_name), p_class->identifier);
+ } else if (ProjectSettings::get_singleton()->has_autoload(class_name) && ProjectSettings::get_singleton()->get_autoload(class_name).is_singleton) {
+ push_error(vformat(R"(Class "%s" hides an autoload singleton.)", class_name), p_class->identifier);
+ }
+ }
+
GDScriptParser::DataType result;
// Set datatype for class.
@@ -172,6 +258,9 @@ Error GDScriptAnalyzer::resolve_inheritance(GDScriptParser::ClassNode *p_class,
int extends_index = 0;
if (!p_class->extends_path.is_empty()) {
+ if (p_class->extends_path.is_relative_path()) {
+ p_class->extends_path = class_type.script_path.get_base_dir().plus_file(p_class->extends_path).simplify_path();
+ }
Ref<GDScriptParserRef> parser = get_parser_for(p_class->extends_path);
if (parser.is_null()) {
push_error(vformat(R"(Could not resolve super class path "%s".)", p_class->extends_path), p_class);
@@ -229,7 +318,7 @@ Error GDScriptAnalyzer::resolve_inheritance(GDScriptParser::ClassNode *p_class,
push_error(vformat(R"(Could not resolve super class inheritance from "%s".)", name), p_class);
return err;
}
- } else if (class_exists(name) && ClassDB::can_instantiate(GDScriptParser::get_real_class_name(name))) {
+ } else if (class_exists(name) && ClassDB::can_instantiate(name)) {
base.kind = GDScriptParser::DataType::NATIVE;
base.native_type = name;
} else {
@@ -406,7 +495,7 @@ GDScriptParser::DataType GDScriptAnalyzer::resolve_datatype(GDScriptParser::Type
return GDScriptParser::DataType();
}
result = ref->get_parser()->head->get_datatype();
- } else if (ClassDB::has_enum(GDScriptParser::get_real_class_name(parser->current_class->base_type.native_type), first)) {
+ } else if (ClassDB::has_enum(parser->current_class->base_type.native_type, first)) {
// Native enum in current class.
result = make_native_enum_type(parser->current_class->base_type.native_type, first);
} else {
@@ -433,8 +522,28 @@ GDScriptParser::DataType GDScriptAnalyzer::resolve_datatype(GDScriptParser::Type
case GDScriptParser::ClassNode::Member::CONSTANT:
if (member.constant->get_datatype().is_meta_type) {
result = member.constant->get_datatype();
+ result.is_meta_type = false;
found = true;
break;
+ } else if (Ref<Script>(member.constant->initializer->reduced_value).is_valid()) {
+ Ref<GDScript> gdscript = member.constant->initializer->reduced_value;
+ if (gdscript.is_valid()) {
+ Ref<GDScriptParserRef> ref = get_parser_for(gdscript->get_path());
+ if (ref->raise_status(GDScriptParserRef::INTERFACE_SOLVED) != OK) {
+ push_error(vformat(R"(Could not parse script from "%s".)", gdscript->get_path()), p_type);
+ return GDScriptParser::DataType();
+ }
+ result = ref->get_parser()->head->get_datatype();
+ result.is_meta_type = false;
+ } else {
+ Ref<GDScript> script = member.constant->initializer->reduced_value;
+ result.kind = GDScriptParser::DataType::SCRIPT;
+ result.builtin_type = Variant::OBJECT;
+ result.script_type = script;
+ result.script_path = script->get_path();
+ result.native_type = script->get_instance_base_type();
+ }
+ break;
}
[[fallthrough]];
default:
@@ -469,7 +578,7 @@ GDScriptParser::DataType GDScriptAnalyzer::resolve_datatype(GDScriptParser::Type
}
} else if (result.kind == GDScriptParser::DataType::NATIVE) {
// Only enums allowed for native.
- if (ClassDB::has_enum(GDScriptParser::get_real_class_name(result.native_type), p_type->type_chain[1]->name)) {
+ if (ClassDB::has_enum(result.native_type, p_type->type_chain[1]->name)) {
if (p_type->type_chain.size() > 2) {
push_error(R"(Enums cannot contain nested types.)", p_type->type_chain[2]);
} else {
@@ -505,6 +614,8 @@ void GDScriptAnalyzer::resolve_class_interface(GDScriptParser::ClassNode *p_clas
switch (member.type) {
case GDScriptParser::ClassNode::Member::VARIABLE: {
+ check_class_member_name_conflict(p_class, member.variable->identifier->name, member.variable);
+
GDScriptParser::DataType datatype;
datatype.kind = GDScriptParser::DataType::VARIANT;
datatype.type_source = GDScriptParser::DataType::UNDETECTED;
@@ -578,6 +689,8 @@ void GDScriptAnalyzer::resolve_class_interface(GDScriptParser::ClassNode *p_clas
}
} break;
case GDScriptParser::ClassNode::Member::CONSTANT: {
+ check_class_member_name_conflict(p_class, member.constant->identifier->name, member.constant);
+
reduce_expression(member.constant->initializer);
GDScriptParser::DataType specified_type;
@@ -587,8 +700,9 @@ void GDScriptAnalyzer::resolve_class_interface(GDScriptParser::ClassNode *p_clas
specified_type.is_meta_type = false;
}
- GDScriptParser::DataType datatype = member.constant->get_datatype();
+ GDScriptParser::DataType datatype;
if (member.constant->initializer) {
+ datatype = member.constant->initializer->get_datatype();
if (member.constant->initializer->type == GDScriptParser::Node::ARRAY) {
GDScriptParser::ArrayNode *array = static_cast<GDScriptParser::ArrayNode *>(member.constant->initializer);
const_fold_array(array);
@@ -627,6 +741,8 @@ void GDScriptAnalyzer::resolve_class_interface(GDScriptParser::ClassNode *p_clas
}
} break;
case GDScriptParser::ClassNode::Member::SIGNAL: {
+ check_class_member_name_conflict(p_class, member.signal->identifier->name, member.signal);
+
for (int j = 0; j < member.signal->parameters.size(); j++) {
GDScriptParser::DataType signal_type = resolve_datatype(member.signal->parameters[j]->datatype_specifier);
signal_type.is_meta_type = false;
@@ -646,6 +762,8 @@ void GDScriptAnalyzer::resolve_class_interface(GDScriptParser::ClassNode *p_clas
}
} break;
case GDScriptParser::ClassNode::Member::ENUM: {
+ check_class_member_name_conflict(p_class, member.m_enum->identifier->name, member.m_enum);
+
GDScriptParser::DataType enum_type;
enum_type.type_source = GDScriptParser::DataType::ANNOTATED_EXPLICIT;
enum_type.kind = GDScriptParser::DataType::ENUM;
@@ -697,6 +815,8 @@ void GDScriptAnalyzer::resolve_class_interface(GDScriptParser::ClassNode *p_clas
break;
case GDScriptParser::ClassNode::Member::ENUM_VALUE: {
if (member.enum_value.custom_value) {
+ check_class_member_name_conflict(p_class, member.enum_value.identifier->name, member.enum_value.custom_value);
+
current_enum = member.enum_value.parent_enum;
reduce_expression(member.enum_value.custom_value);
current_enum = nullptr;
@@ -710,6 +830,8 @@ void GDScriptAnalyzer::resolve_class_interface(GDScriptParser::ClassNode *p_clas
member.enum_value.resolved = true;
}
} else {
+ check_class_member_name_conflict(p_class, member.enum_value.identifier->name, member.enum_value.parent_enum);
+
if (member.enum_value.index > 0) {
member.enum_value.value = member.enum_value.parent_enum->values[member.enum_value.index - 1].value + 1;
} else {
@@ -722,7 +844,8 @@ void GDScriptAnalyzer::resolve_class_interface(GDScriptParser::ClassNode *p_clas
p_class->members.write[i].enum_value = member.enum_value;
} break;
case GDScriptParser::ClassNode::Member::CLASS:
- break; // Done later.
+ check_class_member_name_conflict(p_class, member.m_class->identifier->name, member.m_class);
+ break;
case GDScriptParser::ClassNode::Member::UNDEFINED:
ERR_PRINT("Trying to resolve undefined member.");
break;
@@ -1069,12 +1192,28 @@ void GDScriptAnalyzer::resolve_for(GDScriptParser::ForNode *p_for) {
}
}
- if (!list_resolved) {
+ GDScriptParser::DataType variable_type;
+ if (list_resolved) {
+ variable_type.type_source = GDScriptParser::DataType::ANNOTATED_INFERRED;
+ variable_type.kind = GDScriptParser::DataType::BUILTIN;
+ variable_type.builtin_type = Variant::INT; // Can this ever be a float or something else?
+ p_for->variable->set_datatype(variable_type);
+ } else {
resolve_node(p_for->list);
+ if (p_for->list->datatype.has_container_element_type()) {
+ variable_type = p_for->list->datatype.get_container_element_type();
+ variable_type.type_source = GDScriptParser::DataType::ANNOTATED_INFERRED;
+ } else if (p_for->list->datatype.is_typed_container_type()) {
+ variable_type = p_for->list->datatype.get_typed_container_type();
+ variable_type.type_source = GDScriptParser::DataType::ANNOTATED_INFERRED;
+ } else {
+ // Last resort
+ // TODO: Must other cases be handled? Must we mark as unsafe?
+ variable_type.type_source = GDScriptParser::DataType::UNDETECTED;
+ variable_type.kind = GDScriptParser::DataType::VARIANT;
+ }
}
-
- // TODO: If list is a typed array, the variable should be an element.
- // Also applicable for constant range() (so variable is int or float).
+ p_for->variable->set_datatype(variable_type);
resolve_suite(p_for->loop);
p_for->set_datatype(p_for->loop->get_datatype());
@@ -1362,8 +1501,7 @@ void GDScriptAnalyzer::resolve_parameter(GDScriptParser::ParameterNode *p_parame
}
if (p_parameter->datatype_specifier != nullptr) {
- resolve_datatype(p_parameter->datatype_specifier);
- result = p_parameter->datatype_specifier->get_datatype();
+ result = resolve_datatype(p_parameter->datatype_specifier);
result.is_meta_type = false;
if (p_parameter->default_value != nullptr) {
@@ -1375,6 +1513,10 @@ void GDScriptAnalyzer::resolve_parameter(GDScriptParser::ParameterNode *p_parame
}
}
+ if (result.builtin_type == Variant::Type::NIL && result.type_source == GDScriptParser::DataType::ANNOTATED_INFERRED && p_parameter->datatype_specifier == nullptr) {
+ push_error(vformat(R"(Could not infer the type of the variable "%s" because the initial value is "null".)", p_parameter->identifier->name), p_parameter->default_value);
+ }
+
p_parameter->set_datatype(result);
}
@@ -1617,7 +1759,6 @@ void GDScriptAnalyzer::reduce_assignment(GDScriptParser::AssignmentNode *p_assig
} else {
// TODO: Warning in this case.
mark_node_unsafe(p_assignment);
- p_assignment->use_conversion_assign = true;
}
}
} else {
@@ -1645,6 +1786,15 @@ void GDScriptAnalyzer::reduce_assignment(GDScriptParser::AssignmentNode *p_assig
identifier->variable_source->set_datatype(id_type);
}
} break;
+ case GDScriptParser::IdentifierNode::FUNCTION_PARAMETER: {
+ GDScriptParser::DataType id_type = identifier->parameter_source->get_datatype();
+ if (!id_type.is_hard_type()) {
+ id_type = assigned_value_type;
+ id_type.type_source = GDScriptParser::DataType::INFERRED;
+ id_type.is_constant = false;
+ identifier->parameter_source->set_datatype(id_type);
+ }
+ } break;
case GDScriptParser::IdentifierNode::LOCAL_VARIABLE: {
GDScriptParser::DataType id_type = identifier->variable_source->get_datatype();
if (!id_type.is_hard_type()) {
@@ -2138,6 +2288,9 @@ void GDScriptAnalyzer::reduce_call(GDScriptParser::CallNode *p_call, bool is_awa
if (is_self && parser->current_function != nullptr && parser->current_function->is_static && !is_static) {
push_error(vformat(R"*(Cannot call non-static function "%s()" from static function "%s()".)*", p_call->function_name, parser->current_function->identifier->name), p_call->callee);
+ } else if (!is_self && base_type.is_meta_type && !is_static) {
+ base_type.is_meta_type = false; // For `to_string()`.
+ push_error(vformat(R"*(Cannot call non-static function "%s()" on the class "%s" directly. Make an instance instead.)*", p_call->function_name, base_type.to_string()), p_call->callee);
} else if (is_self && !is_static && !lambda_stack.is_empty()) {
push_error(vformat(R"*(Cannot call non-static function "%s()" from a lambda function.)*", p_call->function_name), p_call->callee);
}
@@ -2260,7 +2413,7 @@ void GDScriptAnalyzer::reduce_get_node(GDScriptParser::GetNodeNode *p_get_node)
result.native_type = "Node";
result.builtin_type = Variant::OBJECT;
- if (!ClassDB::is_parent_class(GDScriptParser::get_real_class_name(parser->current_class->base_type.native_type), result.native_type)) {
+ if (!ClassDB::is_parent_class(parser->current_class->base_type.native_type, result.native_type)) {
push_error(R"*(Cannot use shorthand "get_node()" notation ("$") on a class that isn't a node.)*", p_get_node);
} else if (!lambda_stack.is_empty()) {
push_error(R"*(Cannot use shorthand "get_node()" notation ("$") inside a lambda. Use a captured variable instead.)*", p_get_node);
@@ -2311,13 +2464,15 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
p_identifier->is_constant = true;
p_identifier->reduced_value = result;
p_identifier->set_datatype(type_from_variant(result, p_identifier));
- } else {
+ } else if (base.is_hard_type()) {
push_error(vformat(R"(Cannot find constant "%s" on type "%s".)", name, base.to_string()), p_identifier);
}
} else {
switch (base.builtin_type) {
case Variant::NIL: {
- push_error(vformat(R"(Invalid get index "%s" on base Nil)", name), p_identifier);
+ if (base.is_hard_type()) {
+ push_error(vformat(R"(Invalid get index "%s" on base Nil)", name), p_identifier);
+ }
return;
}
case Variant::DICTIONARY: {
@@ -2338,7 +2493,9 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
return;
}
}
- push_error(vformat(R"(Cannot find property "%s" on base "%s".)", name, base.to_string()), p_identifier);
+ if (base.is_hard_type()) {
+ push_error(vformat(R"(Cannot find property "%s" on base "%s".)", name, base.to_string()), p_identifier);
+ }
}
}
}
@@ -2399,11 +2556,17 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
case GDScriptParser::ClassNode::Member::VARIABLE:
p_identifier->source = GDScriptParser::IdentifierNode::MEMBER_VARIABLE;
p_identifier->variable_source = member.variable;
+ member.variable->usages += 1;
break;
case GDScriptParser::ClassNode::Member::FUNCTION:
resolve_function_signature(member.function);
p_identifier->set_datatype(make_callable_type(member.function->info));
break;
+ case GDScriptParser::ClassNode::Member::CLASS:
+ // For out-of-order resolution:
+ resolve_class_interface(member.m_class);
+ p_identifier->set_datatype(member.m_class->get_datatype());
+ break;
default:
break; // Type already set.
}
@@ -2415,14 +2578,29 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
while (outer != nullptr) {
if (outer->has_member(name)) {
const GDScriptParser::ClassNode::Member &member = outer->get_member(name);
- if (member.type == GDScriptParser::ClassNode::Member::CONSTANT) {
- // TODO: Make sure loops won't cause problem. And make special error message for those.
- // For out-of-order resolution:
- reduce_expression(member.constant->initializer);
- p_identifier->set_datatype(member.get_datatype());
- p_identifier->is_constant = true;
- p_identifier->reduced_value = member.constant->initializer->reduced_value;
- return;
+ switch (member.type) {
+ case GDScriptParser::ClassNode::Member::CONSTANT: {
+ // TODO: Make sure loops won't cause problem. And make special error message for those.
+ // For out-of-order resolution:
+ reduce_expression(member.constant->initializer);
+ p_identifier->set_datatype(member.get_datatype());
+ p_identifier->is_constant = true;
+ p_identifier->reduced_value = member.constant->initializer->reduced_value;
+ return;
+ } break;
+ case GDScriptParser::ClassNode::Member::ENUM_VALUE: {
+ p_identifier->set_datatype(member.get_datatype());
+ p_identifier->is_constant = true;
+ p_identifier->reduced_value = member.enum_value.value;
+ return;
+ } break;
+ case GDScriptParser::ClassNode::Member::ENUM: {
+ p_identifier->set_datatype(member.get_datatype());
+ p_identifier->is_constant = false;
+ return;
+ } break;
+ default:
+ break;
}
}
outer = outer->outer;
@@ -2432,7 +2610,7 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
}
// Check native members.
- const StringName &native = GDScriptParser::get_real_class_name(base.native_type);
+ const StringName &native = base.native_type;
if (class_exists(native)) {
PropertyInfo prop_info;
@@ -2710,7 +2888,7 @@ void GDScriptAnalyzer::reduce_preload(GDScriptParser::PreloadNode *p_preload) {
} else {
p_preload->resolved_path = p_preload->path->reduced_value;
// TODO: Save this as script dependency.
- if (p_preload->resolved_path.is_rel_path()) {
+ if (p_preload->resolved_path.is_relative_path()) {
p_preload->resolved_path = parser->script_path.get_base_dir().plus_file(p_preload->resolved_path);
}
p_preload->resolved_path = p_preload->resolved_path.simplify_path();
@@ -2736,6 +2914,9 @@ void GDScriptAnalyzer::reduce_self(GDScriptParser::SelfNode *p_self) {
}
void GDScriptAnalyzer::reduce_subscript(GDScriptParser::SubscriptNode *p_subscript) {
+ if (p_subscript->base == nullptr) {
+ return;
+ }
if (p_subscript->base->type == GDScriptParser::Node::IDENTIFIER) {
reduce_identifier(static_cast<GDScriptParser::IdentifierNode *>(p_subscript->base), true);
} else {
@@ -3213,7 +3394,7 @@ GDScriptParser::DataType GDScriptAnalyzer::type_from_property(const PropertyInfo
return result;
}
-bool GDScriptAnalyzer::get_function_signature(GDScriptParser::Node *p_source, GDScriptParser::DataType p_base_type, const StringName &p_function, GDScriptParser::DataType &r_return_type, List<GDScriptParser::DataType> &r_par_types, int &r_default_arg_count, bool &r_static, bool &r_vararg) {
+bool GDScriptAnalyzer::get_function_signature(GDScriptParser::CallNode *p_source, GDScriptParser::DataType p_base_type, const StringName &p_function, GDScriptParser::DataType &r_return_type, List<GDScriptParser::DataType> &r_par_types, int &r_default_arg_count, bool &r_static, bool &r_vararg) {
r_static = false;
r_vararg = false;
r_default_arg_count = 0;
@@ -3232,14 +3413,16 @@ bool GDScriptAnalyzer::get_function_signature(GDScriptParser::Node *p_source, GD
for (const MethodInfo &E : methods) {
if (E.name == p_function) {
- return function_signature_from_info(E, r_return_type, r_par_types, r_default_arg_count, r_static, r_vararg);
+ function_signature_from_info(E, r_return_type, r_par_types, r_default_arg_count, r_static, r_vararg);
+ r_static = Variant::is_builtin_method_static(p_base_type.builtin_type, function_name);
+ return true;
}
}
return false;
}
- bool is_constructor = p_base_type.is_meta_type && p_function == "new";
+ bool is_constructor = (p_base_type.is_meta_type || (p_source->callee && p_source->callee->type == GDScriptParser::Node::IDENTIFIER)) && p_function == StaticCString::create("new");
if (is_constructor) {
function_name = "_init";
r_static = true;
@@ -3269,6 +3452,7 @@ bool GDScriptAnalyzer::get_function_signature(GDScriptParser::Node *p_source, GD
}
}
r_return_type = found_function->get_datatype();
+ r_return_type.is_meta_type = false;
r_return_type.is_coroutine = found_function->is_coroutine;
return true;
@@ -3314,11 +3498,13 @@ bool GDScriptAnalyzer::get_function_signature(GDScriptParser::Node *p_source, GD
return true;
}
- StringName real_native = GDScriptParser::get_real_class_name(base_native);
-
MethodInfo info;
- if (ClassDB::get_method_info(real_native, function_name, &info)) {
- return function_signature_from_info(info, r_return_type, r_par_types, r_default_arg_count, r_static, r_vararg);
+ if (ClassDB::get_method_info(base_native, function_name, &info)) {
+ bool valid = function_signature_from_info(info, r_return_type, r_par_types, r_default_arg_count, r_static, r_vararg);
+ if (valid && Engine::get_singleton()->has_singleton(base_native)) {
+ r_static = true;
+ }
+ return valid;
}
return false;
@@ -3409,24 +3595,23 @@ bool GDScriptAnalyzer::is_shadowing(GDScriptParser::IdentifierNode *p_local, con
StringName parent = base_native;
while (parent != StringName()) {
- StringName real_class_name = GDScriptParser::get_real_class_name(parent);
- if (ClassDB::has_method(real_class_name, name, true)) {
+ if (ClassDB::has_method(parent, name, true)) {
parser->push_warning(p_local, GDScriptWarning::SHADOWED_VARIABLE_BASE_CLASS, p_context, p_local->name, "method", parent);
return true;
- } else if (ClassDB::has_signal(real_class_name, name, true)) {
+ } else if (ClassDB::has_signal(parent, name, true)) {
parser->push_warning(p_local, GDScriptWarning::SHADOWED_VARIABLE_BASE_CLASS, p_context, p_local->name, "signal", parent);
return true;
- } else if (ClassDB::has_property(real_class_name, name, true)) {
+ } else if (ClassDB::has_property(parent, name, true)) {
parser->push_warning(p_local, GDScriptWarning::SHADOWED_VARIABLE_BASE_CLASS, p_context, p_local->name, "property", parent);
return true;
- } else if (ClassDB::has_integer_constant(real_class_name, name, true)) {
+ } else if (ClassDB::has_integer_constant(parent, name, true)) {
parser->push_warning(p_local, GDScriptWarning::SHADOWED_VARIABLE_BASE_CLASS, p_context, p_local->name, "constant", parent);
return true;
- } else if (ClassDB::has_enum(real_class_name, name, true)) {
+ } else if (ClassDB::has_enum(parent, name, true)) {
parser->push_warning(p_local, GDScriptWarning::SHADOWED_VARIABLE_BASE_CLASS, p_context, p_local->name, "enum", parent);
return true;
}
- parent = ClassDB::get_parent_class(real_class_name);
+ parent = ClassDB::get_parent_class(parent);
}
return false;
@@ -3576,16 +3761,12 @@ bool GDScriptAnalyzer::is_type_compatible(const GDScriptParser::DataType &p_targ
break; // Already solved before.
}
- // Get underscore-prefixed version for some classes.
- src_native = GDScriptParser::get_real_class_name(src_native);
-
switch (p_target.kind) {
case GDScriptParser::DataType::NATIVE: {
if (p_target.is_meta_type) {
return ClassDB::is_parent_class(src_native, GDScriptNativeClass::get_class_static());
}
- StringName tgt_native = GDScriptParser::get_real_class_name(p_target.native_type);
- return ClassDB::is_parent_class(src_native, tgt_native);
+ return ClassDB::is_parent_class(src_native, p_target.native_type);
}
case GDScriptParser::DataType::SCRIPT:
if (p_target.is_meta_type) {
@@ -3634,8 +3815,7 @@ void GDScriptAnalyzer::mark_node_unsafe(const GDScriptParser::Node *p_node) {
}
bool GDScriptAnalyzer::class_exists(const StringName &p_class) const {
- StringName real_name = GDScriptParser::get_real_class_name(p_class);
- return ClassDB::class_exists(real_name) && ClassDB::is_class_exposed(real_name);
+ return ClassDB::class_exists(p_class) && ClassDB::is_class_exposed(p_class);
}
Ref<GDScriptParserRef> GDScriptAnalyzer::get_parser_for(const String &p_path) {
diff --git a/modules/gdscript/gdscript_analyzer.h b/modules/gdscript/gdscript_analyzer.h
index 8cd3fcf837..2e17e15452 100644
--- a/modules/gdscript/gdscript_analyzer.h
+++ b/modules/gdscript/gdscript_analyzer.h
@@ -44,6 +44,12 @@ class GDScriptAnalyzer {
const GDScriptParser::EnumNode *current_enum = nullptr;
List<const GDScriptParser::LambdaNode *> lambda_stack;
+ // Tests for detecting invalid overloading of script members
+ static _FORCE_INLINE_ bool has_member_name_conflict_in_script_class(const StringName &p_name, const GDScriptParser::ClassNode *p_current_class_node);
+ static _FORCE_INLINE_ bool has_member_name_conflict_in_native_type(const StringName &p_name, const StringName &p_native_type_string);
+ Error check_native_member_name_conflict(const StringName &p_member_name, const GDScriptParser::Node *p_member_node, const StringName &p_native_type_string);
+ Error check_class_member_name_conflict(const GDScriptParser::ClassNode *p_class_node, const StringName &p_member_name, const GDScriptParser::Node *p_member_node);
+
Error resolve_inheritance(GDScriptParser::ClassNode *p_class, bool p_recursive = true);
GDScriptParser::DataType resolve_datatype(GDScriptParser::TypeNode *p_type);
@@ -99,7 +105,7 @@ class GDScriptAnalyzer {
GDScriptParser::DataType type_from_metatype(const GDScriptParser::DataType &p_meta_type) const;
GDScriptParser::DataType type_from_property(const PropertyInfo &p_property) const;
GDScriptParser::DataType make_global_class_meta_type(const StringName &p_class_name, const GDScriptParser::Node *p_source);
- bool get_function_signature(GDScriptParser::Node *p_source, GDScriptParser::DataType base_type, const StringName &p_function, GDScriptParser::DataType &r_return_type, List<GDScriptParser::DataType> &r_par_types, int &r_default_arg_count, bool &r_static, bool &r_vararg);
+ bool get_function_signature(GDScriptParser::CallNode *p_source, GDScriptParser::DataType base_type, const StringName &p_function, GDScriptParser::DataType &r_return_type, List<GDScriptParser::DataType> &r_par_types, int &r_default_arg_count, bool &r_static, bool &r_vararg);
bool function_signature_from_info(const MethodInfo &p_info, GDScriptParser::DataType &r_return_type, List<GDScriptParser::DataType> &r_par_types, int &r_default_arg_count, bool &r_static, bool &r_vararg);
bool validate_call_arg(const List<GDScriptParser::DataType> &p_par_types, int p_default_args_count, bool p_is_vararg, const GDScriptParser::CallNode *p_call);
bool validate_call_arg(const MethodInfo &p_method, const GDScriptParser::CallNode *p_call);
diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp
index 5958326315..1127488db8 100644
--- a/modules/gdscript/gdscript_byte_codegen.cpp
+++ b/modules/gdscript/gdscript_byte_codegen.cpp
@@ -155,7 +155,7 @@ void GDScriptByteCodeGenerator::end_parameters() {
function->default_arguments.reverse();
}
-void GDScriptByteCodeGenerator::write_start(GDScript *p_script, const StringName &p_function_name, bool p_static, MultiplayerAPI::RPCConfig p_rpc_config, const GDScriptDataType &p_return_type) {
+void GDScriptByteCodeGenerator::write_start(GDScript *p_script, const StringName &p_function_name, bool p_static, Multiplayer::RPCConfig p_rpc_config, const GDScriptDataType &p_return_type) {
function = memnew(GDScriptFunction);
debug_stack = EngineDebugger::is_active();
@@ -864,6 +864,12 @@ void GDScriptByteCodeGenerator::write_assign_default_parameter(const Address &p_
function->default_arguments.push_back(opcodes.size());
}
+void GDScriptByteCodeGenerator::write_store_global(const Address &p_dst, int p_global_index) {
+ append(GDScriptFunction::OPCODE_STORE_GLOBAL, 1);
+ append(p_dst);
+ append(p_global_index);
+}
+
void GDScriptByteCodeGenerator::write_store_named_global(const Address &p_dst, const StringName &p_global) {
append(GDScriptFunction::OPCODE_STORE_NAMED_GLOBAL, 1);
append(p_dst);
diff --git a/modules/gdscript/gdscript_byte_codegen.h b/modules/gdscript/gdscript_byte_codegen.h
index 3d6fb291ad..dcc11ebdce 100644
--- a/modules/gdscript/gdscript_byte_codegen.h
+++ b/modules/gdscript/gdscript_byte_codegen.h
@@ -419,7 +419,7 @@ public:
virtual void start_block() override;
virtual void end_block() override;
- virtual void write_start(GDScript *p_script, const StringName &p_function_name, bool p_static, MultiplayerAPI::RPCConfig p_rpc_config, const GDScriptDataType &p_return_type) override;
+ virtual void write_start(GDScript *p_script, const StringName &p_function_name, bool p_static, Multiplayer::RPCConfig p_rpc_config, const GDScriptDataType &p_return_type) override;
virtual GDScriptFunction *write_end() override;
#ifdef DEBUG_ENABLED
@@ -454,6 +454,7 @@ public:
virtual void write_assign_true(const Address &p_target) override;
virtual void write_assign_false(const Address &p_target) override;
virtual void write_assign_default_parameter(const Address &p_dst, const Address &p_src) override;
+ virtual void write_store_global(const Address &p_dst, int p_global_index) override;
virtual void write_store_named_global(const Address &p_dst, const StringName &p_global) override;
virtual void write_cast(const Address &p_target, const Address &p_source, const GDScriptDataType &p_type) override;
virtual void write_call(const Address &p_target, const Address &p_base, const StringName &p_function_name, const Vector<Address> &p_arguments) override;
diff --git a/modules/gdscript/gdscript_cache.cpp b/modules/gdscript/gdscript_cache.cpp
index 07f50d14dc..8121053245 100644
--- a/modules/gdscript/gdscript_cache.cpp
+++ b/modules/gdscript/gdscript_cache.cpp
@@ -51,7 +51,9 @@ GDScriptParser *GDScriptParserRef::get_parser() const {
Error GDScriptParserRef::raise_status(Status p_new_status) {
ERR_FAIL_COND_V(parser == nullptr, ERR_INVALID_DATA);
- Error result = OK;
+ if (result != OK) {
+ return result;
+ }
while (p_new_status > status) {
switch (status) {
@@ -86,14 +88,6 @@ Error GDScriptParserRef::raise_status(Status p_new_status) {
}
}
if (result != OK) {
- if (parser != nullptr) {
- memdelete(parser);
- parser = nullptr;
- }
- if (analyzer != nullptr) {
- memdelete(analyzer);
- analyzer = nullptr;
- }
return result;
}
}
diff --git a/modules/gdscript/gdscript_cache.h b/modules/gdscript/gdscript_cache.h
index 943638d29f..9fb661d031 100644
--- a/modules/gdscript/gdscript_cache.h
+++ b/modules/gdscript/gdscript_cache.h
@@ -54,6 +54,7 @@ private:
GDScriptParser *parser = nullptr;
GDScriptAnalyzer *analyzer = nullptr;
Status status = EMPTY;
+ Error result = OK;
String path;
friend class GDScriptCache;
diff --git a/modules/gdscript/gdscript_codegen.h b/modules/gdscript/gdscript_codegen.h
index ecc86c37f3..e6ecc92d55 100644
--- a/modules/gdscript/gdscript_codegen.h
+++ b/modules/gdscript/gdscript_codegen.h
@@ -31,7 +31,7 @@
#ifndef GDSCRIPT_CODEGEN
#define GDSCRIPT_CODEGEN
-#include "core/io/multiplayer_api.h"
+#include "core/multiplayer/multiplayer.h"
#include "core/string/string_name.h"
#include "core/variant/variant.h"
#include "gdscript_function.h"
@@ -80,7 +80,7 @@ public:
virtual void start_block() = 0;
virtual void end_block() = 0;
- virtual void write_start(GDScript *p_script, const StringName &p_function_name, bool p_static, MultiplayerAPI::RPCConfig p_rpc_config, const GDScriptDataType &p_return_type) = 0;
+ virtual void write_start(GDScript *p_script, const StringName &p_function_name, bool p_static, Multiplayer::RPCConfig p_rpc_config, const GDScriptDataType &p_return_type) = 0;
virtual GDScriptFunction *write_end() = 0;
#ifdef DEBUG_ENABLED
@@ -115,6 +115,7 @@ public:
virtual void write_assign_true(const Address &p_target) = 0;
virtual void write_assign_false(const Address &p_target) = 0;
virtual void write_assign_default_parameter(const Address &dst, const Address &src) = 0;
+ virtual void write_store_global(const Address &p_dst, int p_global_index) = 0;
virtual void write_store_named_global(const Address &p_dst, const StringName &p_global) = 0;
virtual void write_cast(const Address &p_target, const Address &p_source, const GDScriptDataType &p_type) = 0;
virtual void write_call(const Address &p_target, const Address &p_base, const StringName &p_function_name, const Vector<Address> &p_arguments) = 0;
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index fe827a5b72..947224e93e 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -35,6 +35,8 @@
#include "gdscript_cache.h"
#include "gdscript_utility_functions.h"
+#include "core/config/project_settings.h"
+
bool GDScriptCompiler::_is_class_member_property(CodeGen &codegen, const StringName &p_name) {
if (codegen.function_node && codegen.function_node->is_static) {
return false;
@@ -126,8 +128,7 @@ GDScriptDataType GDScriptCompiler::_gdtype_from_datatype(const GDScriptParser::D
names.pop_back();
}
result.kind = GDScriptDataType::GDSCRIPT;
- result.script_type_ref = script;
- result.script_type = result.script_type_ref.ptr();
+ result.script_type = script.ptr();
result.native_type = script->get_instance_base_type();
} else {
result.kind = GDScriptDataType::GDSCRIPT;
@@ -317,10 +318,21 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
}
}
+ // Try globals.
if (GDScriptLanguage::get_singleton()->get_global_map().has(identifier)) {
- int idx = GDScriptLanguage::get_singleton()->get_global_map()[identifier];
- Variant global = GDScriptLanguage::get_singleton()->get_global_array()[idx];
- return codegen.add_constant(global); // TODO: Get type.
+ // If it's an autoload singleton, we postpone to load it at runtime.
+ // This is so one autoload doesn't try to load another before it's compiled.
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
+ if (autoloads.has(identifier) && autoloads[identifier].is_singleton) {
+ GDScriptCodeGenerator::Address global = codegen.add_temporary(_gdtype_from_datatype(in->get_datatype()));
+ int idx = GDScriptLanguage::get_singleton()->get_global_map()[identifier];
+ gen->write_store_global(global, idx);
+ return global;
+ } else {
+ int idx = GDScriptLanguage::get_singleton()->get_global_map()[identifier];
+ Variant global = GDScriptLanguage::get_singleton()->get_global_array()[idx];
+ return codegen.add_constant(global);
+ }
}
// Try global classes.
@@ -428,7 +440,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
break;
case GDScriptParser::DictionaryNode::LUA_TABLE:
// Lua-style: key is an identifier interpreted as StringName.
- StringName key = static_cast<const GDScriptParser::IdentifierNode *>(dn->elements[i].key)->name;
+ StringName key = dn->elements[i].key->reduced_value.operator StringName();
element = codegen.add_constant(key);
break;
}
@@ -952,7 +964,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
// Perform operator if any.
if (assignment->operation != GDScriptParser::AssignmentNode::OP_NONE) {
- GDScriptCodeGenerator::Address value = codegen.add_temporary();
+ GDScriptCodeGenerator::Address value = codegen.add_temporary(_gdtype_from_datatype(subscript->get_datatype()));
if (subscript->is_attribute) {
gen->write_get_named(value, name, prev_base);
} else {
@@ -1059,19 +1071,25 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
}
}
- GDScriptCodeGenerator::Address assigned = _parse_expression(codegen, r_error, assignment->assigned_value);
- GDScriptCodeGenerator::Address op_result;
+ GDScriptCodeGenerator::Address assigned_value = _parse_expression(codegen, r_error, assignment->assigned_value);
if (r_error) {
return GDScriptCodeGenerator::Address();
}
- if (assignment->operation != GDScriptParser::AssignmentNode::OP_NONE) {
+ GDScriptCodeGenerator::Address to_assign;
+ bool has_operation = assignment->operation != GDScriptParser::AssignmentNode::OP_NONE;
+ if (has_operation) {
// Perform operation.
- op_result = codegen.add_temporary();
- gen->write_binary_operator(op_result, assignment->variant_op, target, assigned);
+ GDScriptCodeGenerator::Address op_result = codegen.add_temporary();
+ GDScriptCodeGenerator::Address og_value = _parse_expression(codegen, r_error, assignment->assignee);
+ gen->write_binary_operator(op_result, assignment->variant_op, og_value, assigned_value);
+ to_assign = op_result;
+
+ if (og_value.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
+ gen->pop_temporary();
+ }
} else {
- op_result = assigned;
- assigned = GDScriptCodeGenerator::Address();
+ to_assign = assigned_value;
}
GDScriptDataType assign_type = _gdtype_from_datatype(assignment->assignee->get_datatype());
@@ -1079,25 +1097,25 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
if (has_setter && !is_in_setter) {
// Call setter.
Vector<GDScriptCodeGenerator::Address> args;
- args.push_back(op_result);
+ args.push_back(to_assign);
gen->write_call(GDScriptCodeGenerator::Address(), GDScriptCodeGenerator::Address(GDScriptCodeGenerator::Address::SELF), setter_function, args);
} else {
// Just assign.
if (assignment->use_conversion_assign) {
- gen->write_assign_with_conversion(target, op_result);
+ gen->write_assign_with_conversion(target, to_assign);
} else {
- gen->write_assign(target, op_result);
+ gen->write_assign(target, to_assign);
}
}
- if (op_result.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
- gen->pop_temporary();
+ if (to_assign.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
+ gen->pop_temporary(); // Pop assigned value or temp operation result.
}
- if (assigned.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
- gen->pop_temporary();
+ if (has_operation && assigned_value.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
+ gen->pop_temporary(); // Pop assigned value if not done before.
}
if (target.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
- gen->pop_temporary();
+ gen->pop_temporary(); // Pop the target to assignment.
}
}
return GDScriptCodeGenerator::Address(); // Assignment does not return a value.
@@ -1858,7 +1876,7 @@ GDScriptFunction *GDScriptCompiler::_parse_function(Error &r_error, GDScript *p_
StringName func_name;
bool is_static = false;
- MultiplayerAPI::RPCConfig rpc_config;
+ Multiplayer::RPCConfig rpc_config;
GDScriptDataType return_type;
return_type.has_type = true;
return_type.kind = GDScriptDataType::BUILTIN;
@@ -2087,7 +2105,7 @@ Error GDScriptCompiler::_parse_setter_getter(GDScript *p_script, const GDScriptP
return_type = _gdtype_from_datatype(p_variable->get_datatype(), p_script);
}
- codegen.generator->write_start(p_script, func_name, false, MultiplayerAPI::RPCConfig(), return_type);
+ codegen.generator->write_start(p_script, func_name, false, Multiplayer::RPCConfig(), return_type);
if (p_is_setter) {
uint32_t par_addr = codegen.generator->add_parameter(p_variable->setter_parameter->name, false, _gdtype_from_datatype(p_variable->get_datatype()));
@@ -2187,6 +2205,13 @@ Error GDScriptCompiler::_parse_class_level(GDScript *p_script, const GDScriptPar
p_script->tool = parser->is_tool();
p_script->name = p_class->identifier ? p_class->identifier->name : "";
+ if (p_script->name != "") {
+ if (ClassDB::class_exists(p_script->name) && ClassDB::is_class_exposed(p_script->name)) {
+ _set_error("The class '" + p_script->name + "' shadows a native class", p_class);
+ return ERR_ALREADY_EXISTS;
+ }
+ }
+
Ref<GDScriptNativeClass> native;
GDScriptDataType base_type = _gdtype_from_datatype(p_class->base_type);
@@ -2338,28 +2363,6 @@ Error GDScriptCompiler::_parse_class_level(GDScript *p_script, const GDScriptPar
const GDScriptParser::SignalNode *signal = member.signal;
StringName name = signal->identifier->name;
- GDScript *c = p_script;
-
- while (c) {
- if (c->_signals.has(name)) {
- _set_error("Signal '" + name + "' redefined (in current or parent class)", p_class);
- return ERR_ALREADY_EXISTS;
- }
-
- if (c->base.is_valid()) {
- c = c->base.ptr();
- } else {
- c = nullptr;
- }
- }
-
- if (native.is_valid()) {
- if (ClassDB::has_signal(native->get_name(), name)) {
- _set_error("Signal '" + name + "' redefined (original in native class '" + String(native->get_name()) + "')", p_class);
- return ERR_ALREADY_EXISTS;
- }
- }
-
Vector<StringName> parameters_names;
parameters_names.resize(signal->parameters.size());
for (int j = 0; j < signal->parameters.size(); j++) {
diff --git a/modules/gdscript/gdscript_disassembler.cpp b/modules/gdscript/gdscript_disassembler.cpp
index 1acb9ceddc..9287df2ea0 100644
--- a/modules/gdscript/gdscript_disassembler.cpp
+++ b/modules/gdscript/gdscript_disassembler.cpp
@@ -914,6 +914,14 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
incr += 5;
} break;
DISASSEMBLE_ITERATE_TYPES(DISASSEMBLE_ITERATE);
+ case OPCODE_STORE_GLOBAL: {
+ text += "store global ";
+ text += DADDR(1);
+ text += " = ";
+ text += String::num_int64(_code_ptr[ip + 2]);
+
+ incr += 3;
+ } break;
case OPCODE_STORE_NAMED_GLOBAL: {
text += "store named global ";
text += DADDR(1);
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 73661855b4..044ac4b661 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -637,7 +637,7 @@ static void _get_directory_contents(EditorFileSystemDirectory *p_dir, Map<String
}
static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_annotation, int p_argument, const String p_quote_style, Map<String, ScriptCodeCompletionOption> &r_result) {
- if (p_annotation->name == "@export_range" || p_annotation->name == "@export_exp_range") {
+ if (p_annotation->name == "@export_range") {
if (p_argument == 3 || p_argument == 4) {
// Slider hint.
ScriptCodeCompletionOption slider1("or_greater", ScriptCodeCompletionOption::KIND_PLAIN_TEXT);
@@ -731,9 +731,9 @@ static void _list_available_types(bool p_inherit_only, GDScriptParser::Completio
}
// Autoload singletons
- Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
- for (const Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E != nullptr; E = E->next()) {
- const ProjectSettings::AutoloadInfo &info = E->get();
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
+ const ProjectSettings::AutoloadInfo &info = E.get();
if (!info.is_singleton || info.path.get_extension().to_lower() != "gd") {
continue;
}
@@ -781,6 +781,9 @@ static void _find_identifiers_in_class(const GDScriptParser::ClassNode *p_class,
if (p_only_functions) {
continue;
}
+ if (r_result.has(member.constant->identifier->name)) {
+ continue;
+ }
option = ScriptCodeCompletionOption(member.constant->identifier->name, ScriptCodeCompletionOption::KIND_CONSTANT);
if (member.constant->initializer) {
option.default_value = member.constant->initializer->reduced_value;
@@ -912,7 +915,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base
}
} break;
case GDScriptParser::DataType::NATIVE: {
- StringName type = GDScriptParser::get_real_class_name(base_type.native_type);
+ StringName type = base_type.native_type;
if (!ClassDB::class_exists(type)) {
return;
}
@@ -1086,12 +1089,12 @@ static void _find_identifiers(GDScriptParser::CompletionContext &p_context, bool
kwa++;
}
- Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
- for (const Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E != nullptr; E = E->next()) {
- if (!E->value().is_singleton) {
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
+ if (!E.value().is_singleton) {
continue;
}
- ScriptCodeCompletionOption option(E->key(), ScriptCodeCompletionOption::KIND_CONSTANT);
+ ScriptCodeCompletionOption option(E.key(), ScriptCodeCompletionOption::KIND_CONSTANT);
r_result.insert(option.display, option);
}
@@ -1326,10 +1329,7 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
native_type.kind = GDScriptParser::DataType::NATIVE;
native_type.native_type = native_type.script_type->get_instance_base_type();
if (!ClassDB::class_exists(native_type.native_type)) {
- native_type.native_type = String("_") + native_type.native_type;
- if (!ClassDB::class_exists(native_type.native_type)) {
- native_type.kind = GDScriptParser::DataType::UNRESOLVED;
- }
+ native_type.kind = GDScriptParser::DataType::UNRESOLVED;
}
}
}
@@ -1362,12 +1362,12 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
r_type = _type_from_variant(GDScriptLanguage::get_singleton()->get_named_globals_map()[which]);
found = true;
} else {
- Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
- for (Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E; E = E->next()) {
- String name = E->key();
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
+ String name = E.key();
if (name == which) {
- String script = E->value().path;
+ String script = E.value().path;
if (!script.begins_with("res://")) {
script = "res://" + script;
@@ -1736,7 +1736,7 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context,
}
}
- if (is_function_parameter && p_context.current_function && p_context.current_class) {
+ if (is_function_parameter && p_context.current_function && p_context.current_function->source_lambda == nullptr && p_context.current_class) {
// Check if it's override of native function, then we can assume the type from the signature.
GDScriptParser::DataType base_type = p_context.current_class->base_type;
while (base_type.is_set()) {
@@ -1765,9 +1765,8 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context,
base_type = GDScriptParser::DataType();
break;
}
- StringName real_native = GDScriptParser::get_real_class_name(base_type.native_type);
MethodInfo info;
- if (ClassDB::get_method_info(real_native, p_context.current_function->identifier->name, &info)) {
+ if (ClassDB::get_method_info(base_type.native_type, p_context.current_function->identifier->name, &info)) {
for (const PropertyInfo &E : info.arguments) {
if (E.name == p_identifier) {
r_type = _type_from_property(E);
@@ -1836,13 +1835,12 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context,
}
// Check ClassDB.
- StringName class_name = GDScriptParser::get_real_class_name(p_identifier);
- if (ClassDB::class_exists(class_name) && ClassDB::is_class_exposed(class_name)) {
+ if (ClassDB::class_exists(p_identifier) && ClassDB::is_class_exposed(p_identifier)) {
r_type.type.type_source = GDScriptParser::DataType::ANNOTATED_EXPLICIT;
r_type.type.kind = GDScriptParser::DataType::NATIVE;
r_type.type.native_type = p_identifier;
r_type.type.is_constant = true;
- r_type.type.is_meta_type = !Engine::get_singleton()->has_singleton(class_name);
+ r_type.type.is_meta_type = !Engine::get_singleton()->has_singleton(p_identifier);
r_type.value = Variant();
}
@@ -1951,7 +1949,7 @@ static bool _guess_identifier_type_from_base(GDScriptParser::CompletionContext &
}
} break;
case GDScriptParser::DataType::NATIVE: {
- StringName class_name = GDScriptParser::get_real_class_name(base_type.native_type);
+ StringName class_name = base_type.native_type;
if (!ClassDB::class_exists(class_name)) {
return false;
}
@@ -2113,11 +2111,10 @@ static bool _guess_method_return_type_from_base(GDScriptParser::CompletionContex
}
} break;
case GDScriptParser::DataType::NATIVE: {
- StringName native = GDScriptParser::get_real_class_name(base_type.native_type);
- if (!ClassDB::class_exists(native)) {
+ if (!ClassDB::class_exists(base_type.native_type)) {
return false;
}
- MethodBind *mb = ClassDB::get_method(native, p_method);
+ MethodBind *mb = ClassDB::get_method(base_type.native_type, p_method);
if (mb) {
r_type = _type_from_property(mb->get_return_info());
return true;
@@ -2209,7 +2206,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
base_type = base_type.class_type->base_type;
} break;
case GDScriptParser::DataType::NATIVE: {
- StringName class_name = GDScriptParser::get_real_class_name(base_type.native_type);
+ StringName class_name = base_type.native_type;
if (!ClassDB::class_exists(class_name)) {
base_type.kind = GDScriptParser::DataType::UNRESOLVED;
break;
@@ -2592,7 +2589,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
break;
}
- StringName class_name = GDScriptParser::get_real_class_name(native_type.native_type);
+ StringName class_name = native_type.native_type;
if (!ClassDB::class_exists(class_name)) {
break;
}
@@ -2666,10 +2663,10 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
}
// Get autoloads.
- Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
- for (Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E; E = E->next()) {
- String path = "/root/" + E->key();
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
+ String path = "/root/" + E.key();
ScriptCodeCompletionOption option(path.quote(quote_style), ScriptCodeCompletionOption::KIND_NODE_PATH);
options.insert(option.display, option);
}
@@ -2821,7 +2818,7 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
}
} break;
case GDScriptParser::DataType::NATIVE: {
- StringName class_name = GDScriptParser::get_real_class_name(base_type.native_type);
+ StringName class_name = base_type.native_type;
if (!ClassDB::class_exists(class_name)) {
base_type.kind = GDScriptParser::DataType::UNRESOLVED;
break;
@@ -2873,11 +2870,7 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
StringName parent = ClassDB::get_parent_class(class_name);
if (parent != StringName()) {
- if (String(parent).begins_with("_")) {
- base_type.native_type = String(parent).substr(1);
- } else {
- base_type.native_type = parent;
- }
+ base_type.native_type = parent;
} else {
base_type.kind = GDScriptParser::DataType::UNRESOLVED;
}
@@ -2931,18 +2924,11 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
}
::Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol, const String &p_path, Object *p_owner, LookupResult &r_result) {
- //before parsing, try the usual stuff
+ // Before parsing, try the usual stuff
if (ClassDB::class_exists(p_symbol)) {
r_result.type = ScriptLanguage::LookupResult::RESULT_CLASS;
r_result.class_name = p_symbol;
return OK;
- } else {
- String under_prefix = "_" + p_symbol;
- if (ClassDB::class_exists(under_prefix)) {
- r_result.type = ScriptLanguage::LookupResult::RESULT_CLASS;
- r_result.class_name = p_symbol;
- return OK;
- }
}
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
@@ -3095,6 +3081,15 @@ static Error _lookup_symbol_from_base(const GDScriptParser::DataType &p_base, co
r_result.class_member = p_symbol;
return OK;
}
+ } else {
+ List<StringName> utility_functions;
+ Variant::get_utility_function_list(&utility_functions);
+ if (utility_functions.find(p_symbol) != nullptr) {
+ r_result.type = ScriptLanguage::LookupResult::RESULT_CLASS_TBD_GLOBALSCOPE;
+ r_result.class_name = "@GlobalScope";
+ r_result.class_member = p_symbol;
+ return OK;
+ }
}
}
} break;
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h
index 9e5ef0f632..9d076a8e4c 100644
--- a/modules/gdscript/gdscript_function.h
+++ b/modules/gdscript/gdscript_function.h
@@ -111,11 +111,7 @@ public:
}
if (!ClassDB::is_parent_class(obj->get_class_name(), native_type)) {
- // Try with underscore prefix
- StringName underscore_native_type = "_" + native_type;
- if (!ClassDB::is_parent_class(obj->get_class_name(), underscore_native_type)) {
- return false;
- }
+ return false;
}
return true;
} break;
@@ -352,6 +348,7 @@ public:
OPCODE_ITERATE_PACKED_VECTOR3_ARRAY,
OPCODE_ITERATE_PACKED_COLOR_ARRAY,
OPCODE_ITERATE_OBJECT,
+ OPCODE_STORE_GLOBAL,
OPCODE_STORE_NAMED_GLOBAL,
OPCODE_TYPE_ADJUST_BOOL,
OPCODE_TYPE_ADJUST_INT,
@@ -472,7 +469,7 @@ private:
int _initial_line = 0;
bool _static = false;
- MultiplayerAPI::RPCConfig rpc_config;
+ Multiplayer::RPCConfig rpc_config;
GDScript *_script = nullptr;
@@ -592,7 +589,7 @@ public:
void disassemble(const Vector<String> &p_code_lines) const;
#endif
- _FORCE_INLINE_ MultiplayerAPI::RPCConfig get_rpc_config() const { return rpc_config; }
+ _FORCE_INLINE_ Multiplayer::RPCConfig get_rpc_config() const { return rpc_config; }
GDScriptFunction();
~GDScriptFunction();
};
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 8c3bb1ea57..025accf4ba 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -94,43 +94,8 @@ Variant::Type GDScriptParser::get_builtin_type(const StringName &p_type) {
return Variant::VARIANT_MAX;
}
-// TODO: Move this to a central location (maybe core?).
-static HashMap<StringName, StringName> underscore_map;
-static const char *underscore_classes[] = {
- "ClassDB",
- "Directory",
- "Engine",
- "File",
- "Geometry",
- "GodotSharp",
- "JSON",
- "Marshalls",
- "Mutex",
- "OS",
- "ResourceLoader",
- "ResourceSaver",
- "Semaphore",
- "Thread",
- "VisualScriptEditor",
- nullptr,
-};
-StringName GDScriptParser::get_real_class_name(const StringName &p_source) {
- if (underscore_map.is_empty()) {
- const char **class_name = underscore_classes;
- while (*class_name != nullptr) {
- underscore_map[*class_name] = String("_") + *class_name;
- class_name++;
- }
- }
- if (underscore_map.has(p_source)) {
- return underscore_map[p_source];
- }
- return p_source;
-}
-
void GDScriptParser::cleanup() {
builtin_types.clear();
- underscore_map.clear();
}
void GDScriptParser::get_annotation_list(List<MethodInfo> *r_annotations) const {
@@ -168,7 +133,7 @@ GDScriptParser::GDScriptParser() {
register_annotation(MethodInfo("@export_flags_3d_physics"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_LAYERS_3D_PHYSICS, Variant::INT>);
register_annotation(MethodInfo("@export_flags_3d_navigation"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_LAYERS_3D_NAVIGATION, Variant::INT>);
// Networking.
- register_annotation(MethodInfo("@rpc", { Variant::STRING, "mode" }, { Variant::STRING, "sync" }, { Variant::STRING, "transfer_mode" }, { Variant::INT, "transfer_channel" }), AnnotationInfo::FUNCTION, &GDScriptParser::network_annotations<MultiplayerAPI::RPC_MODE_PUPPET>, 4, true);
+ register_annotation(MethodInfo("@rpc", { Variant::STRING, "mode" }, { Variant::STRING, "sync" }, { Variant::STRING, "transfer_mode" }, { Variant::INT, "transfer_channel" }), AnnotationInfo::FUNCTION, &GDScriptParser::network_annotations<Multiplayer::RPC_MODE_AUTHORITY>, 4, true);
// TODO: Warning annotations.
}
@@ -372,12 +337,29 @@ Error GDScriptParser::parse(const String &p_source_code, const String &p_script_
tokenizer.set_cursor_position(cursor_line, cursor_column);
script_path = p_script_path;
current = tokenizer.scan();
- // Avoid error as the first token.
- while (current.type == GDScriptTokenizer::Token::ERROR) {
- push_error(current.literal);
+ // Avoid error or newline as the first token.
+ // The latter can mess with the parser when opening files filled exclusively with comments and newlines.
+ while (current.type == GDScriptTokenizer::Token::ERROR || current.type == GDScriptTokenizer::Token::NEWLINE) {
+ if (current.type == GDScriptTokenizer::Token::ERROR) {
+ push_error(current.literal);
+ }
current = tokenizer.scan();
}
+#ifdef DEBUG_ENABLED
+ // Warn about parsing an empty script file:
+ if (current.type == GDScriptTokenizer::Token::TK_EOF) {
+ // Create a dummy Node for the warning, pointing to the very beginning of the file
+ Node *nd = alloc_node<PassNode>();
+ nd->start_line = 1;
+ nd->start_column = 0;
+ nd->end_line = 1;
+ nd->leftmost_column = 0;
+ nd->rightmost_column = 0;
+ push_warning(nd, GDScriptWarning::EMPTY_FILE);
+ }
+#endif
+
push_multiline(false); // Keep one for the whole parsing.
parse_program();
pop_multiline();
@@ -597,7 +579,7 @@ void GDScriptParser::parse_program() {
}
}
- parse_class_body();
+ parse_class_body(true);
#ifdef TOOLS_ENABLED
for (Map<int, GDScriptTokenizer::CommentData>::Element *E = tokenizer.get_comments().front(); E; E = E->next()) {
@@ -633,9 +615,10 @@ GDScriptParser::ClassNode *GDScriptParser::parse_class() {
}
consume(GDScriptTokenizer::Token::COLON, R"(Expected ":" after class declaration.)");
- consume(GDScriptTokenizer::Token::NEWLINE, R"(Expected newline after class declaration.)");
- if (!consume(GDScriptTokenizer::Token::INDENT, R"(Expected indented block after class declaration.)")) {
+ bool multiline = match(GDScriptTokenizer::Token::NEWLINE);
+
+ if (multiline && !consume(GDScriptTokenizer::Token::INDENT, R"(Expected indented block after class declaration.)")) {
current_class = previous_class;
return n_class;
}
@@ -648,9 +631,11 @@ GDScriptParser::ClassNode *GDScriptParser::parse_class() {
end_statement("superclass");
}
- parse_class_body();
+ parse_class_body(multiline);
- consume(GDScriptTokenizer::Token::DEDENT, R"(Missing unindent at the end of the class body.)");
+ if (multiline) {
+ consume(GDScriptTokenizer::Token::DEDENT, R"(Missing unindent at the end of the class body.)");
+ }
current_class = previous_class;
return n_class;
@@ -765,7 +750,7 @@ void GDScriptParser::parse_class_member(T *(GDScriptParser::*p_parse_function)()
}
}
-void GDScriptParser::parse_class_body() {
+void GDScriptParser::parse_class_body(bool p_is_multiline) {
bool class_end = false;
while (!class_end && !is_at_end()) {
switch (current.type) {
@@ -811,6 +796,9 @@ void GDScriptParser::parse_class_body() {
if (panic_mode) {
synchronize();
}
+ if (!p_is_multiline) {
+ class_end = true;
+ }
}
}
@@ -1071,7 +1059,9 @@ GDScriptParser::SignalNode *GDScriptParser::parse_signal() {
SignalNode *signal = alloc_node<SignalNode>();
signal->identifier = parse_identifier();
- if (match(GDScriptTokenizer::Token::PARENTHESIS_OPEN)) {
+ if (check(GDScriptTokenizer::Token::PARENTHESIS_OPEN)) {
+ push_multiline(true);
+ advance();
do {
if (check(GDScriptTokenizer::Token::PARENTHESIS_CLOSE)) {
// Allow for trailing comma.
@@ -1094,6 +1084,7 @@ GDScriptParser::SignalNode *GDScriptParser::parse_signal() {
}
} while (match(GDScriptTokenizer::Token::COMMA) && !is_at_end());
+ pop_multiline();
consume(GDScriptTokenizer::Token::PARENTHESIS_CLOSE, R"*(Expected closing ")" after signal parameters.)*");
}
@@ -1152,7 +1143,6 @@ GDScriptParser::EnumNode *GDScriptParser::parse_enum() {
}
item.custom_value = value;
}
- item.rightmost_column = previous.rightmost_column;
item.index = enum_node->values.size();
enum_node->values.push_back(item);
@@ -1377,6 +1367,9 @@ GDScriptParser::SuiteNode *GDScriptParser::parse_suite(const String &p_context,
int error_count = 0;
do {
+ if (!multiline && previous.type == GDScriptTokenizer::Token::SEMICOLON && check(GDScriptTokenizer::Token::NEWLINE)) {
+ break;
+ }
Node *statement = parse_statement();
if (statement == nullptr) {
if (error_count++ > 100) {
@@ -1417,7 +1410,7 @@ GDScriptParser::SuiteNode *GDScriptParser::parse_suite(const String &p_context,
break;
}
- } while (multiline && !check(GDScriptTokenizer::Token::DEDENT) && !lambda_ended && !is_at_end());
+ } while ((multiline || previous.type == GDScriptTokenizer::Token::SEMICOLON) && !check(GDScriptTokenizer::Token::DEDENT) && !lambda_ended && !is_at_end());
if (multiline) {
if (!lambda_ended) {
@@ -1718,6 +1711,7 @@ GDScriptParser::MatchNode *GDScriptParser::parse_match() {
while (!check(GDScriptTokenizer::Token::DEDENT) && !is_at_end()) {
MatchBranchNode *branch = parse_match_branch();
if (branch == nullptr) {
+ advance();
continue;
}
@@ -1781,7 +1775,9 @@ GDScriptParser::MatchBranchNode *GDScriptParser::parse_match_branch() {
push_error(R"(No pattern found for "match" branch.)");
}
- consume(GDScriptTokenizer::Token::COLON, R"(Expected ":" after "match" patterns.)");
+ if (!consume(GDScriptTokenizer::Token::COLON, R"(Expected ":" after "match" patterns.)")) {
+ return nullptr;
+ }
// Save continue state.
bool could_continue = can_continue;
@@ -1814,15 +1810,6 @@ GDScriptParser::PatternNode *GDScriptParser::parse_match_pattern(PatternNode *p_
PatternNode *pattern = alloc_node<PatternNode>();
switch (current.type) {
- case GDScriptTokenizer::Token::LITERAL:
- advance();
- pattern->pattern_type = PatternNode::PT_LITERAL;
- pattern->literal = parse_literal();
- if (pattern->literal == nullptr) {
- // Error happened.
- return nullptr;
- }
- break;
case GDScriptTokenizer::Token::VAR: {
// Bind.
advance();
@@ -1885,44 +1872,44 @@ GDScriptParser::PatternNode *GDScriptParser::parse_match_pattern(PatternNode *p_
// Dictionary.
advance();
pattern->pattern_type = PatternNode::PT_DICTIONARY;
-
- if (!check(GDScriptTokenizer::Token::BRACE_CLOSE) && !is_at_end()) {
- do {
- if (match(GDScriptTokenizer::Token::PERIOD_PERIOD)) {
- // Rest.
+ do {
+ if (check(GDScriptTokenizer::Token::BRACE_CLOSE) || is_at_end()) {
+ break;
+ }
+ if (match(GDScriptTokenizer::Token::PERIOD_PERIOD)) {
+ // Rest.
+ if (pattern->rest_used) {
+ push_error(R"(The ".." pattern must be the last element in the pattern dictionary.)");
+ } else {
+ PatternNode *sub_pattern = alloc_node<PatternNode>();
+ sub_pattern->pattern_type = PatternNode::PT_REST;
+ pattern->dictionary.push_back({ nullptr, sub_pattern });
+ pattern->rest_used = true;
+ }
+ } else {
+ ExpressionNode *key = parse_expression(false);
+ if (key == nullptr) {
+ push_error(R"(Expected expression as key for dictionary pattern.)");
+ }
+ if (match(GDScriptTokenizer::Token::COLON)) {
+ // Value pattern.
+ PatternNode *sub_pattern = parse_match_pattern(p_root_pattern != nullptr ? p_root_pattern : pattern);
+ if (sub_pattern == nullptr) {
+ continue;
+ }
if (pattern->rest_used) {
push_error(R"(The ".." pattern must be the last element in the pattern dictionary.)");
+ } else if (sub_pattern->pattern_type == PatternNode::PT_REST) {
+ push_error(R"(The ".." pattern cannot be used as a value.)");
} else {
- PatternNode *sub_pattern = alloc_node<PatternNode>();
- sub_pattern->pattern_type = PatternNode::PT_REST;
- pattern->dictionary.push_back({ nullptr, sub_pattern });
- pattern->rest_used = true;
+ pattern->dictionary.push_back({ key, sub_pattern });
}
} else {
- ExpressionNode *key = parse_expression(false);
- if (key == nullptr) {
- push_error(R"(Expected expression as key for dictionary pattern.)");
- }
- if (match(GDScriptTokenizer::Token::COLON)) {
- // Value pattern.
- PatternNode *sub_pattern = parse_match_pattern(p_root_pattern != nullptr ? p_root_pattern : pattern);
- if (sub_pattern == nullptr) {
- continue;
- }
- if (pattern->rest_used) {
- push_error(R"(The ".." pattern must be the last element in the pattern dictionary.)");
- } else if (sub_pattern->pattern_type == PatternNode::PT_REST) {
- push_error(R"(The ".." pattern cannot be used as a value.)");
- } else {
- pattern->dictionary.push_back({ key, sub_pattern });
- }
- } else {
- // Key match only.
- pattern->dictionary.push_back({ key, nullptr });
- }
+ // Key match only.
+ pattern->dictionary.push_back({ key, nullptr });
}
- } while (match(GDScriptTokenizer::Token::COMMA));
- }
+ }
+ } while (match(GDScriptTokenizer::Token::COMMA));
consume(GDScriptTokenizer::Token::BRACE_CLOSE, R"(Expected "}" to close the dictionary pattern.)");
break;
}
@@ -1931,8 +1918,13 @@ GDScriptParser::PatternNode *GDScriptParser::parse_match_pattern(PatternNode *p_
ExpressionNode *expression = parse_expression(false);
if (expression == nullptr) {
push_error(R"(Expected expression for match pattern.)");
+ return nullptr;
} else {
- pattern->pattern_type = PatternNode::PT_EXPRESSION;
+ if (expression->type == GDScriptParser::Node::LITERAL) {
+ pattern->pattern_type = PatternNode::PT_LITERAL;
+ } else {
+ pattern->pattern_type = PatternNode::PT_EXPRESSION;
+ }
pattern->expression = expression;
}
break;
@@ -2143,22 +2135,34 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_unary_operator(ExpressionN
operation->operation = UnaryOpNode::OP_NEGATIVE;
operation->variant_op = Variant::OP_NEGATE;
operation->operand = parse_precedence(PREC_SIGN, false);
+ if (operation->operand == nullptr) {
+ push_error(R"(Expected expression after "-" operator.)");
+ }
break;
case GDScriptTokenizer::Token::PLUS:
operation->operation = UnaryOpNode::OP_POSITIVE;
operation->variant_op = Variant::OP_POSITIVE;
operation->operand = parse_precedence(PREC_SIGN, false);
+ if (operation->operand == nullptr) {
+ push_error(R"(Expected expression after "+" operator.)");
+ }
break;
case GDScriptTokenizer::Token::TILDE:
operation->operation = UnaryOpNode::OP_COMPLEMENT;
operation->variant_op = Variant::OP_BIT_NEGATE;
operation->operand = parse_precedence(PREC_BIT_NOT, false);
+ if (operation->operand == nullptr) {
+ push_error(R"(Expected expression after "~" operator.)");
+ }
break;
case GDScriptTokenizer::Token::NOT:
case GDScriptTokenizer::Token::BANG:
operation->operation = UnaryOpNode::OP_LOGIC_NOT;
operation->variant_op = Variant::OP_NOT;
operation->operand = parse_precedence(PREC_LOGIC_NOT, false);
+ if (operation->operand == nullptr) {
+ push_error(vformat(R"(Expected expression after "%s" operator.)", op_type == GDScriptTokenizer::Token::NOT ? "not" : "!"));
+ }
break;
default:
return nullptr; // Unreachable.
@@ -2295,6 +2299,10 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_ternary_operator(Expressio
operation->false_expr = parse_precedence(PREC_TERNARY, false);
+ if (operation->false_expr == nullptr) {
+ push_error(R"(Expected expression after "else".)");
+ }
+
return operation;
}
@@ -2401,10 +2409,17 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_assignment(ExpressionNode
}
assignment->assignee = p_previous_operand;
assignment->assigned_value = parse_expression(false);
+ if (assignment->assigned_value == nullptr) {
+ push_error(R"(Expected an expression after "=".)");
+ }
#ifdef DEBUG_ENABLED
- if (has_operator && source_variable != nullptr && source_variable->assignments == 0) {
- push_warning(assignment, GDScriptWarning::UNASSIGNED_VARIABLE_OP_ASSIGN, source_variable->identifier->name);
+ if (source_variable != nullptr) {
+ if (has_operator && source_variable->assignments == 0) {
+ push_warning(assignment, GDScriptWarning::UNASSIGNED_VARIABLE_OP_ASSIGN, source_variable->identifier->name);
+ }
+
+ source_variable->assignments += 1;
}
#endif
@@ -2413,9 +2428,15 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_assignment(ExpressionNode
GDScriptParser::ExpressionNode *GDScriptParser::parse_await(ExpressionNode *p_previous_operand, bool p_can_assign) {
AwaitNode *await = alloc_node<AwaitNode>();
- await->to_await = parse_precedence(PREC_AWAIT, false);
+ ExpressionNode *element = parse_precedence(PREC_AWAIT, false);
+ if (element == nullptr) {
+ push_error(R"(Expected signal or coroutine after "await".)");
+ }
+ await->to_await = element;
- current_function->is_coroutine = true;
+ if (current_function) { // Might be null in a getter or setter.
+ current_function->is_coroutine = true;
+ }
return await;
}
@@ -2479,8 +2500,13 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_dictionary(ExpressionNode
switch (dictionary->style) {
case DictionaryNode::LUA_TABLE:
- if (key != nullptr && key->type != Node::IDENTIFIER) {
- push_error("Expected identifier as LUA-style dictionary key.");
+ if (key != nullptr && key->type != Node::IDENTIFIER && key->type != Node::LITERAL) {
+ push_error("Expected identifier or string as LUA-style dictionary key.");
+ advance();
+ break;
+ }
+ if (key != nullptr && key->type == Node::LITERAL && static_cast<LiteralNode *>(key)->value.get_type() != Variant::STRING) {
+ push_error("Expected identifier or string as LUA-style dictionary key.");
advance();
break;
}
@@ -2492,8 +2518,14 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_dictionary(ExpressionNode
push_error(R"(Expected "=" after dictionary key.)");
}
}
- key->is_constant = true;
- key->reduced_value = static_cast<IdentifierNode *>(key)->name;
+ if (key != nullptr) {
+ key->is_constant = true;
+ if (key->type == Node::IDENTIFIER) {
+ key->reduced_value = static_cast<IdentifierNode *>(key)->name;
+ } else if (key->type == Node::LITERAL) {
+ key->reduced_value = StringName(static_cast<LiteralNode *>(key)->value.operator String());
+ }
+ }
break;
case DictionaryNode::PYTHON_DICT:
if (!match(GDScriptTokenizer::Token::COLON)) {
@@ -2572,6 +2604,10 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_subscript(ExpressionNode *
subscript->base = p_previous_operand;
subscript->index = parse_expression(false);
+ if (subscript->index == nullptr) {
+ push_error(R"(Expected expression after "[".)");
+ }
+
pop_multiline();
consume(GDScriptTokenizer::Token::BRACKET_CLOSE, R"(Expected "]" after subscription index.)");
@@ -2786,6 +2822,11 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_lambda(ExpressionNode *p_p
return lambda;
}
+GDScriptParser::ExpressionNode *GDScriptParser::parse_yield(ExpressionNode *p_previous_operand, bool p_can_assign) {
+ push_error(R"("yield" was removed in Godot 4.0. Use "await" instead.)");
+ return nullptr;
+}
+
GDScriptParser::ExpressionNode *GDScriptParser::parse_invalid_token(ExpressionNode *p_previous_operand, bool p_can_assign) {
// Just for better error messages.
GDScriptTokenizer::Token::Type invalid = previous.type;
@@ -2986,7 +3027,7 @@ void GDScriptParser::get_class_doc_comment(int p_line, String &p_brief, String &
} else {
/* Syntax:
- @tutorial ( The Title Here ) : http://the.url/
+ @tutorial ( The Title Here ) : https://the.url/
^ open ^ close ^ colon ^ url
*/
int open_bracket_pos = begin_scan, close_bracket_pos = 0;
@@ -3142,7 +3183,7 @@ GDScriptParser::ParseRule *GDScriptParser::get_rule(GDScriptTokenizer::Token::Ty
{ nullptr, nullptr, PREC_NONE }, // TRAIT,
{ nullptr, nullptr, PREC_NONE }, // VAR,
{ nullptr, nullptr, PREC_NONE }, // VOID,
- { nullptr, nullptr, PREC_NONE }, // YIELD,
+ { &GDScriptParser::parse_yield, nullptr, PREC_NONE }, // YIELD,
// Punctuation
{ &GDScriptParser::parse_array, &GDScriptParser::parse_subscript, PREC_SUBSCRIPT }, // BRACKET_OPEN,
{ nullptr, nullptr, PREC_NONE }, // BRACKET_CLOSE,
@@ -3363,10 +3404,10 @@ bool GDScriptParser::export_annotations(const AnnotationNode *p_annotation, Node
variable->export_info.hint_string = Variant::get_type_name(export_type.builtin_type);
break;
case GDScriptParser::DataType::NATIVE:
- if (ClassDB::is_parent_class(get_real_class_name(export_type.native_type), "Resource")) {
+ if (ClassDB::is_parent_class(export_type.native_type, "Resource")) {
variable->export_info.type = Variant::OBJECT;
variable->export_info.hint = PROPERTY_HINT_RESOURCE_TYPE;
- variable->export_info.hint_string = get_real_class_name(export_type.native_type);
+ variable->export_info.hint_string = export_type.native_type;
} else {
push_error(R"(Export type can only be built-in, a resource, or an enum.)", variable);
return false;
@@ -3422,55 +3463,47 @@ bool GDScriptParser::warning_annotations(const AnnotationNode *p_annotation, Nod
ERR_FAIL_V_MSG(false, "Not implemented.");
}
-template <MultiplayerAPI::RPCMode t_mode>
+template <Multiplayer::RPCMode t_mode>
bool GDScriptParser::network_annotations(const AnnotationNode *p_annotation, Node *p_node) {
ERR_FAIL_COND_V_MSG(p_node->type != Node::VARIABLE && p_node->type != Node::FUNCTION, false, vformat(R"("%s" annotation can only be applied to variables and functions.)", p_annotation->name));
- MultiplayerAPI::RPCConfig rpc_config;
+ Multiplayer::RPCConfig rpc_config;
rpc_config.rpc_mode = t_mode;
- for (int i = 0; i < p_annotation->resolved_arguments.size(); i++) {
- if (i == 0) {
+ if (p_annotation->resolved_arguments.size()) {
+ int last = p_annotation->resolved_arguments.size() - 1;
+ if (p_annotation->resolved_arguments[last].get_type() == Variant::INT) {
+ rpc_config.channel = p_annotation->resolved_arguments[last].operator int();
+ last -= 1;
+ }
+ if (last > 3) {
+ push_error(R"(Invalid RPC arguments. At most 4 arguments are allowed, where only the last argument can be an integer to specify the channel.')", p_annotation);
+ return false;
+ }
+ for (int i = last; i >= 0; i--) {
String mode = p_annotation->resolved_arguments[i].operator String();
if (mode == "any") {
- rpc_config.rpc_mode = MultiplayerAPI::RPC_MODE_REMOTE;
- } else if (mode == "master") {
- rpc_config.rpc_mode = MultiplayerAPI::RPC_MODE_MASTER;
- } else if (mode == "puppet") {
- rpc_config.rpc_mode = MultiplayerAPI::RPC_MODE_PUPPET;
- } else {
- push_error(R"(Invalid RPC mode. Must be one of: 'any', 'master', or 'puppet')", p_annotation);
- return false;
- }
- } else if (i == 1) {
- String sync = p_annotation->resolved_arguments[i].operator String();
- if (sync == "sync") {
+ rpc_config.rpc_mode = Multiplayer::RPC_MODE_ANY;
+ } else if (mode == "auth") {
+ rpc_config.rpc_mode = Multiplayer::RPC_MODE_AUTHORITY;
+ } else if (mode == "sync") {
rpc_config.sync = true;
- } else if (sync == "nosync") {
+ } else if (mode == "nosync") {
rpc_config.sync = false;
- } else {
- push_error(R"(Invalid RPC sync mode. Must be one of: 'sync' or 'nosync')", p_annotation);
- return false;
- }
- } else if (i == 2) {
- String mode = p_annotation->resolved_arguments[i].operator String();
- if (mode == "reliable") {
- rpc_config.transfer_mode = MultiplayerPeer::TRANSFER_MODE_RELIABLE;
+ } else if (mode == "reliable") {
+ rpc_config.transfer_mode = Multiplayer::TRANSFER_MODE_RELIABLE;
} else if (mode == "unreliable") {
- rpc_config.transfer_mode = MultiplayerPeer::TRANSFER_MODE_UNRELIABLE;
+ rpc_config.transfer_mode = Multiplayer::TRANSFER_MODE_UNRELIABLE;
} else if (mode == "ordered") {
- rpc_config.transfer_mode = MultiplayerPeer::TRANSFER_MODE_UNRELIABLE_ORDERED;
+ rpc_config.transfer_mode = Multiplayer::TRANSFER_MODE_ORDERED;
} else {
- push_error(R"(Invalid RPC transfer mode. Must be one of: 'reliable', 'unreliable', 'ordered')", p_annotation);
- return false;
+ push_error(R"(Invalid RPC argument. Must be one of: 'sync'/'nosync' (local calls), 'any'/'auth' (permission), 'reliable'/'unreliable'/'ordered' (transfer mode).)", p_annotation);
}
- } else if (i == 3) {
- rpc_config.channel = p_annotation->resolved_arguments[i].operator int();
}
}
switch (p_node->type) {
case Node::FUNCTION: {
FunctionNode *function = static_cast<FunctionNode *>(p_node);
- if (function->rpc_config.rpc_mode != MultiplayerAPI::RPC_MODE_DISABLED) {
+ if (function->rpc_config.rpc_mode != Multiplayer::RPC_MODE_DISABLED) {
push_error(R"(RPC annotations can only be used once per function.)", p_annotation);
return false;
}
@@ -3575,6 +3608,39 @@ String GDScriptParser::DataType::to_string() const {
ERR_FAIL_V_MSG("<unresolved type", "Kind set outside the enum range.");
}
+static Variant::Type _variant_type_to_typed_array_element_type(Variant::Type p_type) {
+ switch (p_type) {
+ case Variant::PACKED_BYTE_ARRAY:
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ return Variant::INT;
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
+ return Variant::FLOAT;
+ case Variant::PACKED_STRING_ARRAY:
+ return Variant::STRING;
+ case Variant::PACKED_VECTOR2_ARRAY:
+ return Variant::VECTOR2;
+ case Variant::PACKED_VECTOR3_ARRAY:
+ return Variant::VECTOR3;
+ case Variant::PACKED_COLOR_ARRAY:
+ return Variant::COLOR;
+ default:
+ return Variant::NIL;
+ }
+}
+
+bool GDScriptParser::DataType::is_typed_container_type() const {
+ return kind == GDScriptParser::DataType::BUILTIN && _variant_type_to_typed_array_element_type(builtin_type) != Variant::NIL;
+}
+
+GDScriptParser::DataType GDScriptParser::DataType::get_typed_container_type() const {
+ GDScriptParser::DataType type;
+ type.kind = GDScriptParser::DataType::BUILTIN;
+ type.builtin_type = _variant_type_to_typed_array_element_type(builtin_type);
+ return type;
+}
+
/*---------- PRETTY PRINT FOR DEBUG ----------*/
#ifdef DEBUG_ENABLED
diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h
index 6a227a55e5..593fb0cc5e 100644
--- a/modules/gdscript/gdscript_parser.h
+++ b/modules/gdscript/gdscript_parser.h
@@ -31,8 +31,8 @@
#ifndef GDSCRIPT_PARSER_H
#define GDSCRIPT_PARSER_H
-#include "core/io/multiplayer_api.h"
#include "core/io/resource.h"
+#include "core/multiplayer/multiplayer.h"
#include "core/object/ref_counted.h"
#include "core/object/script_language.h"
#include "core/string/string_name.h"
@@ -161,6 +161,10 @@ public:
container_element_type = nullptr;
}
+ bool is_typed_container_type() const;
+
+ GDScriptParser::DataType get_typed_container_type() const;
+
bool operator==(const DataType &p_other) const {
if (type_source == UNDETECTED || p_other.type_source == UNDETECTED) {
return true; // Can be consireded equal for parsing purposes.
@@ -729,7 +733,7 @@ public:
SuiteNode *body = nullptr;
bool is_static = false;
bool is_coroutine = false;
- MultiplayerAPI::RPCConfig rpc_config;
+ Multiplayer::RPCConfig rpc_config;
MethodInfo info;
LambdaNode *source_lambda = nullptr;
#ifdef TOOLS_ENABLED
@@ -1320,7 +1324,7 @@ private:
ClassNode *parse_class();
void parse_class_name();
void parse_extends();
- void parse_class_body();
+ void parse_class_body(bool p_is_multiline);
template <class T>
void parse_class_member(T *(GDScriptParser::*p_parse_function)(), AnnotationInfo::TargetKind p_target, const String &p_member_kind);
SignalNode *parse_signal();
@@ -1340,7 +1344,7 @@ private:
template <PropertyHint t_hint, Variant::Type t_type>
bool export_annotations(const AnnotationNode *p_annotation, Node *p_target);
bool warning_annotations(const AnnotationNode *p_annotation, Node *p_target);
- template <MultiplayerAPI::RPCMode t_mode>
+ template <Multiplayer::RPCMode t_mode>
bool network_annotations(const AnnotationNode *p_annotation, Node *p_target);
// Statements.
Node *parse_statement();
@@ -1384,6 +1388,7 @@ private:
ExpressionNode *parse_attribute(ExpressionNode *p_previous_operand, bool p_can_assign);
ExpressionNode *parse_subscript(ExpressionNode *p_previous_operand, bool p_can_assign);
ExpressionNode *parse_lambda(ExpressionNode *p_previous_operand, bool p_can_assign);
+ ExpressionNode *parse_yield(ExpressionNode *p_previous_operand, bool p_can_assign);
ExpressionNode *parse_invalid_token(ExpressionNode *p_previous_operand, bool p_can_assign);
TypeNode *parse_type(bool p_allow_void = false);
#ifdef TOOLS_ENABLED
@@ -1399,7 +1404,6 @@ public:
ClassNode *get_tree() const { return head; }
bool is_tool() const { return _is_tool; }
static Variant::Type get_builtin_type(const StringName &p_type);
- static StringName get_real_class_name(const StringName &p_source);
CompletionContext get_completion_context() const { return completion_context; }
CompletionCall get_completion_call() const { return completion_call; }
diff --git a/modules/gdscript/gdscript_vm.cpp b/modules/gdscript/gdscript_vm.cpp
index 8a261a88e3..6186d0edee 100644
--- a/modules/gdscript/gdscript_vm.cpp
+++ b/modules/gdscript/gdscript_vm.cpp
@@ -88,9 +88,9 @@ static String _get_var_type(const Variant *p_var) {
Object *bobj = p_var->get_validated_object_with_check(was_freed);
if (!bobj) {
if (was_freed) {
- basestr = "null instance";
- } else {
basestr = "previously freed";
+ } else {
+ basestr = "null instance";
}
} else {
basestr = bobj->get_class();
@@ -174,7 +174,7 @@ void (*type_init_function_table[])(Variant *) = {
&VariantInitializer<StringName>::init, // STRING_NAME.
&VariantInitializer<NodePath>::init, // NODE_PATH.
&VariantInitializer<RID>::init, // RID.
- &VariantTypeAdjust<Object *>::adjust, // OBJECT.
+ &VariantInitializer<Object *>::init, // OBJECT.
&VariantInitializer<Callable>::init, // CALLABLE.
&VariantInitializer<Signal>::init, // SIGNAL.
&VariantInitializer<Dictionary>::init, // DICTIONARY.
@@ -322,6 +322,7 @@ void (*type_init_function_table[])(Variant *) = {
&&OPCODE_ITERATE_PACKED_VECTOR3_ARRAY, \
&&OPCODE_ITERATE_PACKED_COLOR_ARRAY, \
&&OPCODE_ITERATE_OBJECT, \
+ &&OPCODE_STORE_GLOBAL, \
&&OPCODE_STORE_NAMED_GLOBAL, \
&&OPCODE_TYPE_ADJUST_BOOL, \
&&OPCODE_TYPE_ADJUST_INT, \
@@ -1231,6 +1232,13 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
GD_ERR_BREAK(to_type < 0 || to_type >= Variant::VARIANT_MAX);
+#ifdef DEBUG_ENABLED
+ if (src->operator Object *() && !src->get_validated_object()) {
+ err_text = "Trying to cast a freed object.";
+ OPCODE_BREAK;
+ }
+#endif
+
Callable::CallError err;
Variant::construct(to_type, *dst, (const Variant **)&src, 1, err);
@@ -1255,6 +1263,10 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
GD_ERR_BREAK(!nc);
#ifdef DEBUG_ENABLED
+ if (src->operator Object *() && !src->get_validated_object()) {
+ err_text = "Trying to cast a freed object.";
+ OPCODE_BREAK;
+ }
if (src->get_type() != Variant::OBJECT && src->get_type() != Variant::NIL) {
err_text = "Invalid cast: can't convert a non-object value to an object type.";
OPCODE_BREAK;
@@ -1283,6 +1295,10 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
GD_ERR_BREAK(!base_type);
#ifdef DEBUG_ENABLED
+ if (src->operator Object *() && !src->get_validated_object()) {
+ err_text = "Trying to cast a freed object.";
+ OPCODE_BREAK;
+ }
if (src->get_type() != Variant::OBJECT && src->get_type() != Variant::NIL) {
err_text = "Trying to assign a non-object value to a variable of type '" + base_type->get_path().get_file() + "'.";
OPCODE_BREAK;
@@ -2122,7 +2138,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
retvalue = gdfs;
- Error err = sig.connect(Callable(gdfs.ptr(), "_signal_callback"), varray(gdfs), Object::CONNECT_ONESHOT);
+ Error err = sig.connect(callable_bind(Callable(gdfs.ptr(), "_signal_callback"), retvalue), Object::CONNECT_ONESHOT);
if (err != OK) {
err_text = "Error connecting to signal: " + sig.get_name() + " during await.";
OPCODE_BREAK;
@@ -3116,6 +3132,18 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
}
DISPATCH_OPCODE;
+ OPCODE(OPCODE_STORE_GLOBAL) {
+ CHECK_SPACE(3);
+ int global_idx = _code_ptr[ip + 2];
+ GD_ERR_BREAK(global_idx < 0 || global_idx >= GDScriptLanguage::get_singleton()->get_global_array_size());
+
+ GET_INSTRUCTION_ARG(dst, 0);
+ *dst = GDScriptLanguage::get_singleton()->get_global_array()[global_idx];
+
+ ip += 3;
+ }
+ DISPATCH_OPCODE;
+
OPCODE(OPCODE_STORE_NAMED_GLOBAL) {
CHECK_SPACE(3);
int globalname_idx = _code_ptr[ip + 2];
diff --git a/modules/gdscript/gdscript_warning.cpp b/modules/gdscript/gdscript_warning.cpp
index ad41b60a4e..7a483a16ba 100644
--- a/modules/gdscript/gdscript_warning.cpp
+++ b/modules/gdscript/gdscript_warning.cpp
@@ -145,6 +145,9 @@ String GDScriptWarning::get_message() const {
case REDUNDANT_AWAIT: {
return R"("await" keyword not needed in this case, because the expression isn't a coroutine nor a signal.)";
}
+ case EMPTY_FILE: {
+ return "Empty script file.";
+ }
case WARNING_MAX:
break; // Can't happen, but silences warning
}
@@ -190,6 +193,7 @@ String GDScriptWarning::get_name_from_code(Code p_code) {
"ASSERT_ALWAYS_TRUE",
"ASSERT_ALWAYS_FALSE",
"REDUNDANT_AWAIT",
+ "EMPTY_FILE",
};
static_assert((sizeof(names) / sizeof(*names)) == WARNING_MAX, "Amount of warning types don't match the amount of warning names.");
diff --git a/modules/gdscript/gdscript_warning.h b/modules/gdscript/gdscript_warning.h
index 4b295b5eb8..8de46b08c1 100644
--- a/modules/gdscript/gdscript_warning.h
+++ b/modules/gdscript/gdscript_warning.h
@@ -68,6 +68,7 @@ public:
ASSERT_ALWAYS_TRUE, // Expression for assert argument is always true.
ASSERT_ALWAYS_FALSE, // Expression for assert argument is always false.
REDUNDANT_AWAIT, // await is used but expression is synchronous (not a signal nor a coroutine).
+ EMPTY_FILE, // A script file is empty.
WARNING_MAX,
};
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp
index b6c48468f5..bd5a9f01b2 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.cpp
+++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp
@@ -284,6 +284,23 @@ void GDScriptLanguageProtocol::notify_client(const String &p_method, const Varia
peer->res_queue.push_back(msg.utf8());
}
+void GDScriptLanguageProtocol::request_client(const String &p_method, const Variant &p_params, int p_client_id) {
+ if (p_client_id == -1) {
+ ERR_FAIL_COND_MSG(latest_client_id == -1,
+ "GDScript LSP: Can't notify client as none was connected.");
+ p_client_id = latest_client_id;
+ }
+ ERR_FAIL_COND(!clients.has(p_client_id));
+ Ref<LSPeer> peer = clients.get(p_client_id);
+ ERR_FAIL_COND(peer == nullptr);
+
+ Dictionary message = make_request(p_method, p_params, next_server_id);
+ next_server_id++;
+ String msg = Variant(message).to_json_string();
+ msg = format_output(msg);
+ peer->res_queue.push_back(msg.utf8());
+}
+
bool GDScriptLanguageProtocol::is_smart_resolve_enabled() const {
return bool(_EDITOR_GET("network/language_server/enable_smart_resolve"));
}
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.h b/modules/gdscript/language_server/gdscript_language_protocol.h
index 5a2dd55c46..899446fb42 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.h
+++ b/modules/gdscript/language_server/gdscript_language_protocol.h
@@ -79,6 +79,8 @@ private:
int latest_client_id = 0;
int next_client_id = 0;
+ int next_server_id = 0;
+
Ref<GDScriptTextDocument> text_document;
Ref<GDScriptWorkspace> workspace;
@@ -107,6 +109,7 @@ public:
void stop();
void notify_client(const String &p_method, const Variant &p_params = Variant(), int p_client_id = -1);
+ void request_client(const String &p_method, const Variant &p_params = Variant(), int p_client_id = -1);
bool is_smart_resolve_enabled() const;
bool is_goto_native_symbols_enabled() const;
diff --git a/modules/gdscript/language_server/gdscript_language_server.cpp b/modules/gdscript/language_server/gdscript_language_server.cpp
index c47164d95b..41a2f9e4ad 100644
--- a/modules/gdscript/language_server/gdscript_language_server.cpp
+++ b/modules/gdscript/language_server/gdscript_language_server.cpp
@@ -36,6 +36,7 @@
#include "editor/editor_node.h"
GDScriptLanguageServer::GDScriptLanguageServer() {
+ _EDITOR_DEF("network/language_server/remote_host", host);
_EDITOR_DEF("network/language_server/remote_port", port);
_EDITOR_DEF("network/language_server/enable_smart_resolve", true);
_EDITOR_DEF("network/language_server/show_native_symbols_in_editor", false);
@@ -56,9 +57,10 @@ void GDScriptLanguageServer::_notification(int p_what) {
}
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+ String host = String(_EDITOR_GET("network/language_server/remote_host"));
int port = (int)_EDITOR_GET("network/language_server/remote_port");
bool use_thread = (bool)_EDITOR_GET("network/language_server/use_thread");
- if (port != this->port || use_thread != this->use_thread) {
+ if (host != this->host || port != this->port || use_thread != this->use_thread) {
this->stop();
this->start();
}
@@ -76,9 +78,10 @@ void GDScriptLanguageServer::thread_main(void *p_userdata) {
}
void GDScriptLanguageServer::start() {
+ host = String(_EDITOR_GET("network/language_server/remote_host"));
port = (int)_EDITOR_GET("network/language_server/remote_port");
use_thread = (bool)_EDITOR_GET("network/language_server/use_thread");
- if (protocol.start(port, IPAddress("127.0.0.1")) == OK) {
+ if (protocol.start(port, IPAddress(host)) == OK) {
EditorNode::get_log()->add_message("--- GDScript language server started ---", EditorLog::MSG_TYPE_EDITOR);
if (use_thread) {
thread_running = true;
diff --git a/modules/gdscript/language_server/gdscript_language_server.h b/modules/gdscript/language_server/gdscript_language_server.h
index 29c5ddd70e..85a44a8cc1 100644
--- a/modules/gdscript/language_server/gdscript_language_server.h
+++ b/modules/gdscript/language_server/gdscript_language_server.h
@@ -44,6 +44,7 @@ class GDScriptLanguageServer : public EditorPlugin {
bool thread_running = false;
bool started = false;
bool use_thread = false;
+ String host = "127.0.0.1";
int port = 6008;
static void thread_main(void *p_userdata);
diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp
index 1512b4bb89..f4b55cac02 100644
--- a/modules/gdscript/language_server/gdscript_workspace.cpp
+++ b/modules/gdscript/language_server/gdscript_workspace.cpp
@@ -42,6 +42,7 @@
#include "scene/resources/packed_scene.h"
void GDScriptWorkspace::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("apply_new_signal"), &GDScriptWorkspace::apply_new_signal);
ClassDB::bind_method(D_METHOD("didDeleteFiles"), &GDScriptWorkspace::did_delete_files);
ClassDB::bind_method(D_METHOD("symbol"), &GDScriptWorkspace::symbol);
ClassDB::bind_method(D_METHOD("parse_script", "path", "content"), &GDScriptWorkspace::parse_script);
@@ -52,6 +53,54 @@ void GDScriptWorkspace::_bind_methods() {
ClassDB::bind_method(D_METHOD("generate_script_api", "path"), &GDScriptWorkspace::generate_script_api);
}
+void GDScriptWorkspace::apply_new_signal(Object *obj, String function, PackedStringArray args) {
+ String function_signature = "func " + function;
+ Ref<Script> script = obj->get_script();
+
+ String source = script->get_source_code();
+
+ if (source.find(function_signature) != -1) {
+ return;
+ }
+
+ int first_class = source.find("\nclass ");
+ int start_line = 0;
+ if (first_class != -1) {
+ start_line = source.substr(0, first_class).split("\n").size();
+ } else {
+ start_line = source.split("\n").size();
+ }
+
+ String function_body = "\n\n" + function_signature + "(";
+ for (int i = 0; i < args.size(); ++i) {
+ function_body += args[i];
+ if (i < args.size() - 1) {
+ function_body += ", ";
+ }
+ }
+ function_body += ")";
+ if (EditorSettings::get_singleton()->get_setting("text_editor/completion/add_type_hints")) {
+ function_body += " -> void";
+ }
+ function_body += ":\n\tpass # Replace with function body.\n";
+
+ lsp::TextEdit text_edit;
+
+ if (first_class != -1) {
+ function_body += "\n\n";
+ }
+ text_edit.range.end.line = text_edit.range.start.line = start_line;
+
+ text_edit.newText = function_body;
+
+ String uri = get_file_uri(script->get_path());
+
+ lsp::ApplyWorkspaceEditParams params;
+ params.edit.add_edit(uri, text_edit);
+
+ GDScriptLanguageProtocol::get_singleton()->request_client("workspace/applyEdit", params.to_json());
+}
+
void GDScriptWorkspace::did_delete_files(const Dictionary &p_params) {
Array files = p_params["files"];
for (int i = 0; i < files.size(); ++i) {
@@ -360,6 +409,9 @@ Error GDScriptWorkspace::initialize() {
}
}
+ EditorNode *editor_node = EditorNode::get_singleton();
+ editor_node->connect("script_add_function_request", callable_mp(this, &GDScriptWorkspace::apply_new_signal));
+
return OK;
}
@@ -551,7 +603,7 @@ void GDScriptWorkspace::completion(const lsp::CompletionParams &p_params, List<S
}
}
-const lsp::DocumentSymbol *GDScriptWorkspace::resolve_symbol(const lsp::TextDocumentPositionParams &p_doc_pos, const String &p_symbol_name, bool p_func_requred) {
+const lsp::DocumentSymbol *GDScriptWorkspace::resolve_symbol(const lsp::TextDocumentPositionParams &p_doc_pos, const String &p_symbol_name, bool p_func_required) {
const lsp::DocumentSymbol *symbol = nullptr;
String path = get_file_path(p_doc_pos.textDocument.uri);
@@ -576,7 +628,10 @@ const lsp::DocumentSymbol *GDScriptWorkspace::resolve_symbol(const lsp::TextDocu
} else {
ScriptLanguage::LookupResult ret;
- if (OK == GDScriptLanguage::get_singleton()->lookup_code(parser->get_text_for_lookup_symbol(pos, symbol_identifier, p_func_requred), symbol_identifier, path, nullptr, ret)) {
+ if (symbol_identifier == "new" && parser->get_lines()[p_doc_pos.position.line].replace(" ", "").replace("\t", "").find("new(") > -1) {
+ symbol_identifier = "_init";
+ }
+ if (OK == GDScriptLanguage::get_singleton()->lookup_code(parser->get_text_for_lookup_symbol(pos, symbol_identifier, p_func_required), symbol_identifier, path, nullptr, ret)) {
if (ret.type == ScriptLanguage::LookupResult::RESULT_SCRIPT_LOCATION) {
String target_script_path = path;
if (!ret.script.is_null()) {
diff --git a/modules/gdscript/language_server/gdscript_workspace.h b/modules/gdscript/language_server/gdscript_workspace.h
index 9496677449..6f5600b5cf 100644
--- a/modules/gdscript/language_server/gdscript_workspace.h
+++ b/modules/gdscript/language_server/gdscript_workspace.h
@@ -62,6 +62,8 @@ protected:
void list_script_files(const String &p_root_dir, List<String> &r_files);
+ void apply_new_signal(Object *obj, String function, PackedStringArray args);
+
public:
String root;
String root_uri;
@@ -85,7 +87,7 @@ public:
void publish_diagnostics(const String &p_path);
void completion(const lsp::CompletionParams &p_params, List<ScriptCodeCompletionOption> *r_options);
- const lsp::DocumentSymbol *resolve_symbol(const lsp::TextDocumentPositionParams &p_doc_pos, const String &p_symbol_name = "", bool p_func_requred = false);
+ const lsp::DocumentSymbol *resolve_symbol(const lsp::TextDocumentPositionParams &p_doc_pos, const String &p_symbol_name = "", bool p_func_required = false);
void resolve_related_symbols(const lsp::TextDocumentPositionParams &p_doc_pos, List<const lsp::DocumentSymbol *> &r_list);
const lsp::DocumentSymbol *resolve_native_symbol(const lsp::NativeSymbolInspectParams &p_params);
void resolve_document_links(const String &p_uri, List<lsp::DocumentLink> &r_list);
diff --git a/modules/gdscript/language_server/lsp.hpp b/modules/gdscript/language_server/lsp.hpp
index 9ac6c6bd4e..662382d279 100644
--- a/modules/gdscript/language_server/lsp.hpp
+++ b/modules/gdscript/language_server/lsp.hpp
@@ -263,6 +263,16 @@ struct WorkspaceEdit {
*/
Map<String, Vector<TextEdit>> changes;
+ _FORCE_INLINE_ void add_edit(const String &uri, const TextEdit &edit) {
+ if (changes.has(uri)) {
+ changes[uri].push_back(edit);
+ } else {
+ Vector<TextEdit> edits;
+ edits.push_back(edit);
+ changes[uri] = edits;
+ }
+ }
+
_FORCE_INLINE_ Dictionary to_json() const {
Dictionary dict;
@@ -1322,6 +1332,18 @@ struct DocumentSymbol {
}
};
+struct ApplyWorkspaceEditParams {
+ WorkspaceEdit edit;
+
+ Dictionary to_json() {
+ Dictionary dict;
+
+ dict["edit"] = edit.to_json();
+
+ return dict;
+ }
+};
+
struct NativeSymbolInspectParams {
String native_class;
String symbol_name;
diff --git a/modules/gdscript/tests/README.md b/modules/gdscript/tests/README.md
new file mode 100644
index 0000000000..6e54085962
--- /dev/null
+++ b/modules/gdscript/tests/README.md
@@ -0,0 +1,8 @@
+# GDScript integration tests
+
+The `scripts/` folder contains integration tests in the form of GDScript files
+and output files.
+
+See the
+[Integration tests for GDScript documentation](https://docs.godotengine.org/en/latest/development/cpp/unit_testing.html#integration-tests-for-gdscript)
+for information about creating and running GDScript integration tests.
diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp
index 03a48bf071..c383830c82 100644
--- a/modules/gdscript/tests/gdscript_test_runner.cpp
+++ b/modules/gdscript/tests/gdscript_test_runner.cpp
@@ -48,11 +48,11 @@
namespace GDScriptTests {
void init_autoloads() {
- Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
// First pass, add the constants so they exist before any script is loaded.
- for (Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E; E = E->next()) {
- const ProjectSettings::AutoloadInfo &info = E->get();
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
+ const ProjectSettings::AutoloadInfo &info = E.get();
if (info.is_singleton) {
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
@@ -62,8 +62,8 @@ void init_autoloads() {
}
// Second pass, load into global constants.
- for (Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E; E = E->next()) {
- const ProjectSettings::AutoloadInfo &info = E->get();
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
+ const ProjectSettings::AutoloadInfo &info = E.get();
if (!info.is_singleton) {
// Skip non-singletons since we don't have a scene tree here anyway.
@@ -415,6 +415,7 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
TestResult result;
result.status = GDTEST_OK;
result.output = String();
+ result.passed = false;
Error err = OK;
@@ -496,7 +497,12 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
}
return result;
}
-
+ // Script files matching this pattern are allowed to not contain a test() function.
+ if (source_file.match("*.notest.gd")) {
+ enable_stdout();
+ result.passed = check_output(result.output);
+ return result;
+ }
// Test running.
const Map<StringName, GDScriptFunction *>::Element *test_function_element = script->get_member_functions().find(GDScriptTestRunner::test_function_name);
if (test_function_element == nullptr) {
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.gd b/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.gd
new file mode 100644
index 0000000000..9b722ea50a
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.gd
@@ -0,0 +1,3 @@
+func test():
+ # Error here.
+ print(2.2 << 4)
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.out b/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.out
new file mode 100644
index 0000000000..7dee854d1a
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Invalid operands to operator <<, float and int.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.gd b/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.gd
new file mode 100644
index 0000000000..0a4f647f57
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.gd
@@ -0,0 +1,3 @@
+func test():
+ # Error here.
+ print(2 >> 4.4)
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.out b/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.out
new file mode 100644
index 0000000000..1edbf47ec0
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Invalid operands to operator >>, int and float.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.gd b/modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.gd
new file mode 100644
index 0000000000..b84ccdce81
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.gd
@@ -0,0 +1,5 @@
+class Vector2:
+ pass
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.out b/modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.out
new file mode 100644
index 0000000000..87863baf75
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+The member "Vector2" cannot have the same name as a builtin type.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.gd b/modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.gd
new file mode 100644
index 0000000000..a7c0a29a69
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.gd
@@ -0,0 +1,4 @@
+const Vector2 = 0
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.out b/modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.out
new file mode 100644
index 0000000000..87863baf75
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+The member "Vector2" cannot have the same name as a builtin type.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.gd b/modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.gd
new file mode 100644
index 0000000000..0ad2337c15
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.gd
@@ -0,0 +1,5 @@
+const CONSTANT = 25
+
+
+func test():
+ CONSTANT(123)
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.out b/modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.out
new file mode 100644
index 0000000000..f4051cd02c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Member "CONSTANT" is not a function.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.gd b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.gd
new file mode 100644
index 0000000000..7a922cd73e
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.gd
@@ -0,0 +1,6 @@
+func test():
+ var lua_dict = {
+ a = 1,
+ b = 2,
+ a = 3, # Duplicate isn't allowed.
+ }
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.out b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.out
new file mode 100644
index 0000000000..ffdfa56645
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Key "a" was already used in this dictionary (at line 3).
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.gd b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.gd
new file mode 100644
index 0000000000..933e737ac7
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.gd
@@ -0,0 +1,6 @@
+func test():
+ var lua_dict_with_string = {
+ a = 1,
+ b = 2,
+ "a" = 3, # Duplicate isn't allowed.
+ }
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.out b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.out
new file mode 100644
index 0000000000..ffdfa56645
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Key "a" was already used in this dictionary (at line 3).
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.gd b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.gd
new file mode 100644
index 0000000000..3b8c83e9cb
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.gd
@@ -0,0 +1,6 @@
+func test():
+ var python_dict = {
+ "a": 1,
+ "b": 2,
+ "a": 3, # Duplicate isn't allowed.
+ }
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.out b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.out
new file mode 100644
index 0000000000..ffdfa56645
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Key "a" was already used in this dictionary (at line 3).
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.gd b/modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.gd
new file mode 100644
index 0000000000..cf9a0ce038
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.gd
@@ -0,0 +1,7 @@
+enum Size {
+ # Error here. Enum values must be integers.
+ S = 0.0,
+}
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.out
new file mode 100644
index 0000000000..b315d20508
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Enum values must be integers.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.gd b/modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.gd
new file mode 100644
index 0000000000..930f91b389
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.gd
@@ -0,0 +1,4 @@
+enum Vector2 { A, B }
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.out
new file mode 100644
index 0000000000..87863baf75
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+The member "Vector2" cannot have the same name as a builtin type.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.gd b/modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.gd
new file mode 100644
index 0000000000..cd9b8fabc4
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.gd
@@ -0,0 +1,7 @@
+enum Size {
+ # Error here. Enum values must be integers.
+ S = "hello",
+}
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.out b/modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.out
new file mode 100644
index 0000000000..b315d20508
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Enum values must be integers.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.gd b/modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.gd
new file mode 100644
index 0000000000..4346503fc2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.gd
@@ -0,0 +1,6 @@
+func function():
+ pass
+
+
+func test():
+ function = 25
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.out b/modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.out
new file mode 100644
index 0000000000..5275183da2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Cannot assign a new value to a constant.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_array_index.gd b/modules/gdscript/tests/scripts/analyzer/errors/invalid_array_index.gd
new file mode 100644
index 0000000000..b8c0b7a8d3
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_array_index.gd
@@ -0,0 +1,3 @@
+func test():
+ # Error here. Array indices must be integers.
+ print([0, 1][true])
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_array_index.out b/modules/gdscript/tests/scripts/analyzer/errors/invalid_array_index.out
new file mode 100644
index 0000000000..015ad756f8
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_array_index.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Invalid index type "bool" for a base of type "Array".
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_bool.gd b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_bool.gd
new file mode 100644
index 0000000000..c159e03140
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_bool.gd
@@ -0,0 +1,2 @@
+func test():
+ print(true + true)
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_bool.out b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_bool.out
new file mode 100644
index 0000000000..c1dc7c7d08
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_bool.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Invalid operands to operator +, bool and bool.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_dictionary.gd b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_dictionary.gd
new file mode 100644
index 0000000000..6aec2e0796
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_dictionary.gd
@@ -0,0 +1,2 @@
+func test():
+ print({"hello": "world"} + {"godot": "engine"})
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_dictionary.out b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_dictionary.out
new file mode 100644
index 0000000000..1b4451edbe
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_dictionary.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Invalid operands "Dictionary" and "Dictionary" for "+" operator.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_mixed.gd b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_mixed.gd
new file mode 100644
index 0000000000..eb2a6a0ce7
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_mixed.gd
@@ -0,0 +1,2 @@
+func test():
+ print("hello" + ["world"])
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_mixed.out b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_mixed.out
new file mode 100644
index 0000000000..6d44c6c1bd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_concatenation_mixed.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Invalid operands "String" and "Array" for "+" operator.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_constant.gd b/modules/gdscript/tests/scripts/analyzer/errors/invalid_constant.gd
new file mode 100644
index 0000000000..a7426e88da
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_constant.gd
@@ -0,0 +1,5 @@
+func test():
+ var i = 12
+ # Constants must be made of a constant, deterministic expression.
+ # A constant that depends on a variable's value is not a constant expression.
+ const TEST = 13 + i
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/invalid_constant.out b/modules/gdscript/tests/scripts/analyzer/errors/invalid_constant.out
new file mode 100644
index 0000000000..c40830f123
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/invalid_constant.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Assigned value for constant "TEST" isn't a constant expression.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/leading_number_separator.gd b/modules/gdscript/tests/scripts/analyzer/errors/leading_number_separator.gd
new file mode 100644
index 0000000000..d88c02d6ee
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/leading_number_separator.gd
@@ -0,0 +1,3 @@
+func test():
+ # Number separators may not be placed at the beginning of a number.
+ var __ = _123
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/leading_number_separator.out b/modules/gdscript/tests/scripts/analyzer/errors/leading_number_separator.out
new file mode 100644
index 0000000000..cfb558bf45
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/leading_number_separator.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Identifier "_123" not declared in the current scope.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/missing_argument.gd b/modules/gdscript/tests/scripts/analyzer/errors/missing_argument.gd
new file mode 100644
index 0000000000..70bdadf291
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/missing_argument.gd
@@ -0,0 +1,6 @@
+func args(a, b):
+ print(a)
+ print(b)
+
+func test():
+ args(1,)
diff --git a/modules/gdscript/tests/scripts/parser/errors/missing_argument.out b/modules/gdscript/tests/scripts/analyzer/errors/missing_argument.out
index fc2a891109..fc2a891109 100644
--- a/modules/gdscript/tests/scripts/parser/errors/missing_argument.out
+++ b/modules/gdscript/tests/scripts/analyzer/errors/missing_argument.out
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_used_as_function.gd b/modules/gdscript/tests/scripts/analyzer/errors/property_used_as_function.gd
new file mode 100644
index 0000000000..059d774927
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/property_used_as_function.gd
@@ -0,0 +1,4 @@
+var property = 25
+
+func test():
+ property()
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_used_as_function.out b/modules/gdscript/tests/scripts/analyzer/errors/property_used_as_function.out
new file mode 100644
index 0000000000..94d6c26a1a
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/property_used_as_function.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Member "property" is not a function.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/redefine_class_constant.gd b/modules/gdscript/tests/scripts/analyzer/errors/redefine_class_constant.gd
new file mode 100644
index 0000000000..91401d32fc
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/redefine_class_constant.gd
@@ -0,0 +1,7 @@
+# See also `parser-warnings/shadowed-constant.gd`.
+const TEST = 25
+
+
+func test():
+ # Error here (trying to set a new value to a constant).
+ TEST = 50
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/redefine_class_constant.out b/modules/gdscript/tests/scripts/analyzer/errors/redefine_class_constant.out
new file mode 100644
index 0000000000..5275183da2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/redefine_class_constant.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Cannot assign a new value to a constant.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/redefine_local_constant.gd b/modules/gdscript/tests/scripts/analyzer/errors/redefine_local_constant.gd
new file mode 100644
index 0000000000..97f3e55e81
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/redefine_local_constant.gd
@@ -0,0 +1,5 @@
+func test():
+ const TEST = 25
+
+ # Error here (can't assign a new value to a constant).
+ TEST = 50
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/redefine_local_constant.out b/modules/gdscript/tests/scripts/analyzer/errors/redefine_local_constant.out
new file mode 100644
index 0000000000..5275183da2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/redefine_local_constant.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Cannot assign a new value to a constant.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/super_nonexistent_base_method.gd b/modules/gdscript/tests/scripts/analyzer/errors/super_nonexistent_base_method.gd
new file mode 100644
index 0000000000..722a8fcdb7
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/super_nonexistent_base_method.gd
@@ -0,0 +1,11 @@
+# `class` extends RefCounted by default.
+class Say:
+ func say():
+ super()
+ print("say something")
+
+
+func test():
+ # RefCounted doesn't have a `say()` method, so the `super()` call in the method
+ # definition will cause a run-time error.
+ Say.new().say()
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/super_nonexistent_base_method.out b/modules/gdscript/tests/scripts/analyzer/errors/super_nonexistent_base_method.out
new file mode 100644
index 0000000000..e3dbf81850
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/super_nonexistent_base_method.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Function "say()" not found in base RefCounted.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/variable_name_shadows_builtin_type.gd b/modules/gdscript/tests/scripts/analyzer/errors/variable_name_shadows_builtin_type.gd
new file mode 100644
index 0000000000..7cba29884c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/variable_name_shadows_builtin_type.gd
@@ -0,0 +1,4 @@
+var Vector2
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/variable_name_shadows_builtin_type.out b/modules/gdscript/tests/scripts/analyzer/errors/variable_name_shadows_builtin_type.out
new file mode 100644
index 0000000000..87863baf75
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/variable_name_shadows_builtin_type.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+The member "Vector2" cannot have the same name as a builtin type.
diff --git a/modules/gdscript/tests/scripts/analyzer/features/as.gd b/modules/gdscript/tests/scripts/analyzer/features/as.gd
new file mode 100644
index 0000000000..13a36147c0
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/as.gd
@@ -0,0 +1,16 @@
+func test():
+ var some_bool = 5 as bool
+ var some_int = 5 as int
+ var some_float = 5 as float
+ print(typeof(some_bool))
+ print(typeof(some_int))
+ print(typeof(some_float))
+
+ print()
+
+ var some_bool_typed := 5 as bool
+ var some_int_typed := 5 as int
+ var some_float_typed := 5 as float
+ print(typeof(some_bool_typed))
+ print(typeof(some_int_typed))
+ print(typeof(some_float_typed))
diff --git a/modules/gdscript/tests/scripts/analyzer/features/as.out b/modules/gdscript/tests/scripts/analyzer/features/as.out
new file mode 100644
index 0000000000..bcf84aa6f6
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/as.out
@@ -0,0 +1,8 @@
+GDTEST_OK
+1
+2
+3
+
+1
+2
+3
diff --git a/modules/gdscript/tests/scripts/analyzer/features/auto_inferred_type_dont_error.gd b/modules/gdscript/tests/scripts/analyzer/features/auto_inferred_type_dont_error.gd
new file mode 100644
index 0000000000..f64dce26c9
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/auto_inferred_type_dont_error.gd
@@ -0,0 +1,9 @@
+func inferred_parameter(param = null):
+ if param == null:
+ param = Node.new()
+ param.name = "Ok"
+ print(param.name)
+ param.free()
+
+func test():
+ inferred_parameter()
diff --git a/modules/gdscript/tests/scripts/analyzer/features/auto_inferred_type_dont_error.out b/modules/gdscript/tests/scripts/analyzer/features/auto_inferred_type_dont_error.out
new file mode 100644
index 0000000000..0e9f482af4
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/auto_inferred_type_dont_error.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+Ok
diff --git a/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.out b/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.out
index dc4348d9c3..2c8cc9c03f 100644
--- a/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.out
+++ b/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.out
@@ -1,3 +1,3 @@
GDTEST_OK
Name is equal
-True
+true
diff --git a/modules/gdscript/tests/scripts/analyzer/features/call_static_builtin_function.gd b/modules/gdscript/tests/scripts/analyzer/features/call_static_builtin_function.gd
new file mode 100644
index 0000000000..ac66b78220
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/call_static_builtin_function.gd
@@ -0,0 +1,3 @@
+func test():
+ print(Color.html_is_valid("00ffff"))
+ print("OK")
diff --git a/modules/gdscript/tests/scripts/analyzer/features/call_static_builtin_function.out b/modules/gdscript/tests/scripts/analyzer/features/call_static_builtin_function.out
new file mode 100644
index 0000000000..ad6beeb646
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/call_static_builtin_function.out
@@ -0,0 +1,3 @@
+GDTEST_OK
+true
+OK
diff --git a/modules/gdscript/tests/scripts/analyzer/features/constants_from_parent.gd b/modules/gdscript/tests/scripts/analyzer/features/constants_from_parent.gd
new file mode 100644
index 0000000000..135b6c3d85
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/constants_from_parent.gd
@@ -0,0 +1,16 @@
+extends Node
+
+const NO_TYPE_CONST = 0
+const TYPE_CONST: int = 1
+const GUESS_TYPE_CONST := 2
+
+class Test:
+ var a = NO_TYPE_CONST
+ var b = TYPE_CONST
+ var c = GUESS_TYPE_CONST
+
+func test():
+ var test_instance = Test.new()
+ prints("a", test_instance.a, test_instance.a == NO_TYPE_CONST)
+ prints("b", test_instance.b, test_instance.b == TYPE_CONST)
+ prints("c", test_instance.c, test_instance.c == GUESS_TYPE_CONST)
diff --git a/modules/gdscript/tests/scripts/analyzer/features/constants_from_parent.out b/modules/gdscript/tests/scripts/analyzer/features/constants_from_parent.out
new file mode 100644
index 0000000000..a96bb84246
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/constants_from_parent.out
@@ -0,0 +1,4 @@
+GDTEST_OK
+a 0 true
+b 1 true
+c 2 true
diff --git a/modules/gdscript/tests/scripts/analyzer/features/enum_from_parent.gd b/modules/gdscript/tests/scripts/analyzer/features/enum_from_parent.gd
new file mode 100644
index 0000000000..5f57c5b8c2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/enum_from_parent.gd
@@ -0,0 +1,14 @@
+extends Node
+
+enum Named { VALUE_A, VALUE_B, VALUE_C = 42 }
+
+class Test:
+ var a = Named.VALUE_A
+ var b = Named.VALUE_B
+ var c = Named.VALUE_C
+
+func test():
+ var test_instance = Test.new()
+ prints("a", test_instance.a, test_instance.a == Named.VALUE_A)
+ prints("b", test_instance.b, test_instance.b == Named.VALUE_B)
+ prints("c", test_instance.c, test_instance.c == Named.VALUE_C)
diff --git a/modules/gdscript/tests/scripts/analyzer/features/enum_from_parent.out b/modules/gdscript/tests/scripts/analyzer/features/enum_from_parent.out
new file mode 100644
index 0000000000..c160839da3
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/enum_from_parent.out
@@ -0,0 +1,4 @@
+GDTEST_OK
+a 0 true
+b 1 true
+c 42 true
diff --git a/modules/gdscript/tests/scripts/analyzer/features/enum_value_from_parent.gd b/modules/gdscript/tests/scripts/analyzer/features/enum_value_from_parent.gd
new file mode 100644
index 0000000000..26edce353d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/enum_value_from_parent.gd
@@ -0,0 +1,14 @@
+extends Node
+
+enum { VALUE_A, VALUE_B, VALUE_C = 42 }
+
+class Test:
+ var a = VALUE_A
+ var b = VALUE_B
+ var c = VALUE_C
+
+func test():
+ var test_instance = Test.new()
+ prints("a", test_instance.a, test_instance.a == VALUE_A)
+ prints("b", test_instance.b, test_instance.b == VALUE_B)
+ prints("c", test_instance.c, test_instance.c == VALUE_C)
diff --git a/modules/gdscript/tests/scripts/analyzer/features/enum_value_from_parent.out b/modules/gdscript/tests/scripts/analyzer/features/enum_value_from_parent.out
new file mode 100644
index 0000000000..c160839da3
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/enum_value_from_parent.out
@@ -0,0 +1,4 @@
+GDTEST_OK
+a 0 true
+b 1 true
+c 42 true
diff --git a/modules/gdscript/tests/scripts/analyzer/features/gdscript_to_preload.gd b/modules/gdscript/tests/scripts/analyzer/features/gdscript_to_preload.gd
new file mode 100644
index 0000000000..fb0ace6a90
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/gdscript_to_preload.gd
@@ -0,0 +1,5 @@
+func test():
+ pass
+
+func something():
+ return "OK"
diff --git a/modules/gdscript/tests/scripts/analyzer/features/gdscript_to_preload.out b/modules/gdscript/tests/scripts/analyzer/features/gdscript_to_preload.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/gdscript_to_preload.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/analyzer/features/inner_class_as_return_type.gd b/modules/gdscript/tests/scripts/analyzer/features/inner_class_as_return_type.gd
new file mode 100644
index 0000000000..4f4b7a4897
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/inner_class_as_return_type.gd
@@ -0,0 +1,11 @@
+class InnerClass:
+ var val := "OK"
+ static func create_instance() -> InnerClass:
+ return new()
+
+func create_inner_instance() -> InnerClass:
+ return InnerClass.create_instance()
+
+func test():
+ var instance = create_inner_instance()
+ print(instance.val)
diff --git a/modules/gdscript/tests/scripts/analyzer/features/inner_class_as_return_type.out b/modules/gdscript/tests/scripts/analyzer/features/inner_class_as_return_type.out
new file mode 100644
index 0000000000..1ccb591560
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/inner_class_as_return_type.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+OK
diff --git a/modules/gdscript/tests/scripts/analyzer/features/static_method_builtin_type.gd b/modules/gdscript/tests/scripts/analyzer/features/static_method_builtin_type.gd
new file mode 100644
index 0000000000..569f95850f
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/static_method_builtin_type.gd
@@ -0,0 +1,2 @@
+func test():
+ print(Color.html_is_valid("00ffff"))
diff --git a/modules/gdscript/tests/scripts/analyzer/features/static_method_builtin_type.out b/modules/gdscript/tests/scripts/analyzer/features/static_method_builtin_type.out
new file mode 100644
index 0000000000..55482c2b52
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/static_method_builtin_type.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+true
diff --git a/modules/gdscript/tests/scripts/analyzer/features/use_preload_script_as_type.gd b/modules/gdscript/tests/scripts/analyzer/features/use_preload_script_as_type.gd
new file mode 100644
index 0000000000..5f73064cc0
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/use_preload_script_as_type.gd
@@ -0,0 +1,5 @@
+const preloaded : GDScript = preload("gdscript_to_preload.gd")
+
+func test():
+ var preloaded_instance: preloaded = preloaded.new()
+ print(preloaded_instance.something())
diff --git a/modules/gdscript/tests/scripts/analyzer/features/use_preload_script_as_type.out b/modules/gdscript/tests/scripts/analyzer/features/use_preload_script_as_type.out
new file mode 100644
index 0000000000..1ccb591560
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/use_preload_script_as_type.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+OK
diff --git a/modules/gdscript/tests/scripts/parser/errors/array_consecutive_commas.gd b/modules/gdscript/tests/scripts/parser/errors/array_consecutive_commas.gd
new file mode 100644
index 0000000000..b45f99fdd0
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/array_consecutive_commas.gd
@@ -0,0 +1,3 @@
+func test():
+ # Arrays with consecutive commas are not allowed.
+ var array = ["arrays",,,,]
diff --git a/modules/gdscript/tests/scripts/parser/errors/array_consecutive_commas.out b/modules/gdscript/tests/scripts/parser/errors/array_consecutive_commas.out
new file mode 100644
index 0000000000..4ef8526065
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/array_consecutive_commas.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected expression as array element.
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_2_equal_signs.gd b/modules/gdscript/tests/scripts/parser/errors/assignment_2_equal_signs.gd
new file mode 100644
index 0000000000..17d5e078e5
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_2_equal_signs.gd
@@ -0,0 +1,2 @@
+func test():
+ var hello == "world"
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_2_equal_signs.out b/modules/gdscript/tests/scripts/parser/errors/assignment_2_equal_signs.out
new file mode 100644
index 0000000000..b150fc0d16
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_2_equal_signs.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected end of statement after variable declaration, found "==" instead.
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_3_equal_signs.gd b/modules/gdscript/tests/scripts/parser/errors/assignment_3_equal_signs.gd
new file mode 100644
index 0000000000..8b5f620889
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_3_equal_signs.gd
@@ -0,0 +1,2 @@
+func test():
+ var hello === "world"
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_3_equal_signs.out b/modules/gdscript/tests/scripts/parser/errors/assignment_3_equal_signs.out
new file mode 100644
index 0000000000..b150fc0d16
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_3_equal_signs.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected end of statement after variable declaration, found "==" instead.
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.gd b/modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.gd
new file mode 100644
index 0000000000..17c65ad60a
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.gd
@@ -0,0 +1,3 @@
+func test():
+ var a = 0
+ a =
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.out b/modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.out
new file mode 100644
index 0000000000..1369a7a0dc
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected an expression after "=".
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_in_if.gd b/modules/gdscript/tests/scripts/parser/errors/assignment_in_if.gd
new file mode 100644
index 0000000000..8c3a908532
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_in_if.gd
@@ -0,0 +1,4 @@
+func test():
+ # Error here.
+ if foo = 25:
+ print(foo)
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_in_if.out b/modules/gdscript/tests/scripts/parser/errors/assignment_in_if.out
new file mode 100644
index 0000000000..e8f9130706
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_in_if.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Assignment is not allowed inside an expression.
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_in_var.gd b/modules/gdscript/tests/scripts/parser/errors/assignment_in_var.gd
new file mode 100644
index 0000000000..126a3227ea
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_in_var.gd
@@ -0,0 +1,2 @@
+func test():
+ var hello = "world" = "test"
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_in_var.out b/modules/gdscript/tests/scripts/parser/errors/assignment_in_var.out
new file mode 100644
index 0000000000..e8f9130706
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_in_var.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Assignment is not allowed inside an expression.
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_in_var_if.gd b/modules/gdscript/tests/scripts/parser/errors/assignment_in_var_if.gd
new file mode 100644
index 0000000000..a99557fa3c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_in_var_if.gd
@@ -0,0 +1,4 @@
+func test():
+ # Error here.
+ if var foo = 25:
+ print(foo)
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_in_var_if.out b/modules/gdscript/tests/scripts/parser/errors/assignment_in_var_if.out
new file mode 100644
index 0000000000..e84f4652ac
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_in_var_if.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected conditional expression after "if".
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_without_identifier.gd b/modules/gdscript/tests/scripts/parser/errors/assignment_without_identifier.gd
new file mode 100644
index 0000000000..031ea523c8
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_without_identifier.gd
@@ -0,0 +1,2 @@
+func test():
+ var = "world"
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_without_identifier.out b/modules/gdscript/tests/scripts/parser/errors/assignment_without_identifier.out
new file mode 100644
index 0000000000..a4bd8beef1
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_without_identifier.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected variable name after "var".
diff --git a/modules/gdscript/tests/scripts/parser/errors/binary_complement_without_argument.gd b/modules/gdscript/tests/scripts/parser/errors/binary_complement_without_argument.gd
new file mode 100644
index 0000000000..b52a6defcb
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/binary_complement_without_argument.gd
@@ -0,0 +1,2 @@
+func test():
+ print(~)
diff --git a/modules/gdscript/tests/scripts/parser/errors/binary_complement_without_argument.out b/modules/gdscript/tests/scripts/parser/errors/binary_complement_without_argument.out
new file mode 100644
index 0000000000..ceabe42d3c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/binary_complement_without_argument.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected expression after "~" operator.
diff --git a/modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument.gd b/modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument.gd
new file mode 100644
index 0000000000..b3ea1ba1f6
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument.gd
@@ -0,0 +1,2 @@
+func test():
+ print(not)
diff --git a/modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument.out b/modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument.out
new file mode 100644
index 0000000000..6cf191ea98
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected expression after "not" operator.
diff --git a/modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument_using_bang.gd b/modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument_using_bang.gd
new file mode 100644
index 0000000000..8a33079193
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument_using_bang.gd
@@ -0,0 +1,2 @@
+func test():
+ print(!)
diff --git a/modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument_using_bang.out b/modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument_using_bang.out
new file mode 100644
index 0000000000..87fcc5e2b0
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/boolean_negation_without_argument_using_bang.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected expression after "!" operator.
diff --git a/modules/gdscript/tests/scripts/parser/errors/brace_syntax.gd b/modules/gdscript/tests/scripts/parser/errors/brace_syntax.gd
new file mode 100644
index 0000000000..ab66537c93
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/brace_syntax.gd
@@ -0,0 +1,3 @@
+func test() {
+ print("Hello world!");
+}
diff --git a/modules/gdscript/tests/scripts/parser/errors/brace_syntax.out b/modules/gdscript/tests/scripts/parser/errors/brace_syntax.out
new file mode 100644
index 0000000000..2f37a740ab
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/brace_syntax.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected ":" after function declaration.
diff --git a/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.gd b/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.gd
new file mode 100644
index 0000000000..d13d713454
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.gd
@@ -0,0 +1,6 @@
+# Error here. `class_name` should be used *before* annotations, not after.
+@icon("res://path/to/optional/icon.svg")
+class_name HelloWorld
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.out b/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.out
new file mode 100644
index 0000000000..0bcc8acc55
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+"class_name" should be used before annotations.
diff --git a/modules/gdscript/tests/scripts/parser/errors/constant_conflicts_variable.gd b/modules/gdscript/tests/scripts/parser/errors/constant_conflicts_variable.gd
new file mode 100644
index 0000000000..49fb4ffedf
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/constant_conflicts_variable.gd
@@ -0,0 +1,3 @@
+func test():
+ var TEST = 50
+ const TEST = 25
diff --git a/modules/gdscript/tests/scripts/parser/errors/constant_conflicts_variable.out b/modules/gdscript/tests/scripts/parser/errors/constant_conflicts_variable.out
new file mode 100644
index 0000000000..407f094ca0
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/constant_conflicts_variable.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+There is already a variable named "TEST" declared in this scope.
diff --git a/modules/gdscript/tests/scripts/parser/errors/default_value_in_function_call.gd b/modules/gdscript/tests/scripts/parser/errors/default_value_in_function_call.gd
new file mode 100644
index 0000000000..2581d873dd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/default_value_in_function_call.gd
@@ -0,0 +1,7 @@
+func hello(arg1):
+ print(arg1)
+
+
+func test():
+ # Error here.
+ hello(arg1 = 25)
diff --git a/modules/gdscript/tests/scripts/parser/errors/default_value_in_function_call.out b/modules/gdscript/tests/scripts/parser/errors/default_value_in_function_call.out
new file mode 100644
index 0000000000..e8f9130706
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/default_value_in_function_call.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Assignment is not allowed inside an expression.
diff --git a/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd b/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd
new file mode 100644
index 0000000000..92dfb2366d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd
@@ -0,0 +1,2 @@
+func test():
+ var dictionary = { hello = "world",, }
diff --git a/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.out b/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.out
new file mode 100644
index 0000000000..d1dcd1cb4b
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected expression as dictionary key.
diff --git a/modules/gdscript/tests/scripts/parser/errors/function_conflicts_constant.gd b/modules/gdscript/tests/scripts/parser/errors/function_conflicts_constant.gd
new file mode 100644
index 0000000000..a8f7cf1810
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/function_conflicts_constant.gd
@@ -0,0 +1,5 @@
+const test = 25
+
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/parser/errors/function_conflicts_constant.out b/modules/gdscript/tests/scripts/parser/errors/function_conflicts_constant.out
new file mode 100644
index 0000000000..c614acd094
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/function_conflicts_constant.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Function "test" has the same name as a previously declared constant.
diff --git a/modules/gdscript/tests/scripts/parser/errors/function_conflicts_variable.gd b/modules/gdscript/tests/scripts/parser/errors/function_conflicts_variable.gd
new file mode 100644
index 0000000000..5c86710a40
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/function_conflicts_variable.gd
@@ -0,0 +1,7 @@
+func test():
+ pass
+
+
+# Error here. The difference with `variable-conflicts-function.gd` is that here,
+# the function is defined *before* the variable.
+var test = 25
diff --git a/modules/gdscript/tests/scripts/parser/errors/function_conflicts_variable.out b/modules/gdscript/tests/scripts/parser/errors/function_conflicts_variable.out
new file mode 100644
index 0000000000..551db61531
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/function_conflicts_variable.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Variable "test" has the same name as a previously declared function.
diff --git a/modules/gdscript/tests/scripts/parser/errors/invalid_escape_sequence.gd b/modules/gdscript/tests/scripts/parser/errors/invalid_escape_sequence.gd
new file mode 100644
index 0000000000..3b52f6e324
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/invalid_escape_sequence.gd
@@ -0,0 +1,2 @@
+func test():
+ var escape = "invalid escape \h <- here"
diff --git a/modules/gdscript/tests/scripts/parser/errors/invalid_escape_sequence.out b/modules/gdscript/tests/scripts/parser/errors/invalid_escape_sequence.out
new file mode 100644
index 0000000000..32b4d004db
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/invalid_escape_sequence.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Invalid escape in string.
diff --git a/modules/gdscript/tests/scripts/parser/errors/invalid_identifier_number.gd b/modules/gdscript/tests/scripts/parser/errors/invalid_identifier_number.gd
new file mode 100644
index 0000000000..081b9faf4b
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/invalid_identifier_number.gd
@@ -0,0 +1,3 @@
+func test():
+ # Error here.
+ var 23test = "is not a valid identifier"
diff --git a/modules/gdscript/tests/scripts/parser/errors/invalid_identifier_number.out b/modules/gdscript/tests/scripts/parser/errors/invalid_identifier_number.out
new file mode 100644
index 0000000000..a4bd8beef1
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/invalid_identifier_number.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected variable name after "var".
diff --git a/modules/gdscript/tests/scripts/parser/errors/invalid_identifier_string.gd b/modules/gdscript/tests/scripts/parser/errors/invalid_identifier_string.gd
new file mode 100644
index 0000000000..fa4d6b5cac
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/invalid_identifier_string.gd
@@ -0,0 +1,3 @@
+func test():
+ # Error here.
+ var "yes" = "is not a valid identifier"
diff --git a/modules/gdscript/tests/scripts/parser/errors/invalid_identifier_string.out b/modules/gdscript/tests/scripts/parser/errors/invalid_identifier_string.out
new file mode 100644
index 0000000000..a4bd8beef1
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/invalid_identifier_string.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected variable name after "var".
diff --git a/modules/gdscript/tests/scripts/parser/errors/invalid_ternary_operator.gd b/modules/gdscript/tests/scripts/parser/errors/invalid_ternary_operator.gd
new file mode 100644
index 0000000000..c835ce15e1
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/invalid_ternary_operator.gd
@@ -0,0 +1,5 @@
+func test():
+ var amount = 50
+ # C-style ternary operator is invalid in GDScript.
+ # The valid syntax is `"yes" if amount < 60 else "no"`, like in Python.
+ var ternary = amount < 60 ? "yes" : "no"
diff --git a/modules/gdscript/tests/scripts/parser/errors/invalid_ternary_operator.out b/modules/gdscript/tests/scripts/parser/errors/invalid_ternary_operator.out
new file mode 100644
index 0000000000..ac82d691b7
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/invalid_ternary_operator.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Unexpected "?" in source. If you want a ternary operator, use "truthy_value if true_condition else falsy_value".
diff --git a/modules/gdscript/tests/scripts/parser/errors/missing_argument.gd b/modules/gdscript/tests/scripts/parser/errors/missing_argument.gd
deleted file mode 100644
index c56ad94095..0000000000
--- a/modules/gdscript/tests/scripts/parser/errors/missing_argument.gd
+++ /dev/null
@@ -1,6 +0,0 @@
-func args(a, b):
- print(a)
- print(b)
-
-func test():
- args(1,)
diff --git a/modules/gdscript/tests/scripts/parser/errors/missing_closing_expr_paren.gd b/modules/gdscript/tests/scripts/parser/errors/missing_closing_expr_paren.gd
index a1077e1985..8af5f123cc 100644
--- a/modules/gdscript/tests/scripts/parser/errors/missing_closing_expr_paren.gd
+++ b/modules/gdscript/tests/scripts/parser/errors/missing_closing_expr_paren.gd
@@ -1,2 +1,2 @@
func test():
- var a = ("missing paren ->"
+ var a = ("missing paren ->"
diff --git a/modules/gdscript/tests/scripts/parser/errors/missing_colon.gd b/modules/gdscript/tests/scripts/parser/errors/missing_colon.gd
index 62cb633e9e..0e5e5ce060 100644
--- a/modules/gdscript/tests/scripts/parser/errors/missing_colon.gd
+++ b/modules/gdscript/tests/scripts/parser/errors/missing_colon.gd
@@ -1,3 +1,3 @@
func test():
- if true # Missing colon here.
- print("true")
+ if true # Missing colon here.
+ print("true")
diff --git a/modules/gdscript/tests/scripts/parser/errors/missing_expression_after_ternary_else.gd b/modules/gdscript/tests/scripts/parser/errors/missing_expression_after_ternary_else.gd
new file mode 100644
index 0000000000..1f66935329
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/missing_expression_after_ternary_else.gd
@@ -0,0 +1,4 @@
+func test():
+ var x = 1 if false else
+ print("oops")
+ print(x)
diff --git a/modules/gdscript/tests/scripts/parser/errors/missing_expression_after_ternary_else.out b/modules/gdscript/tests/scripts/parser/errors/missing_expression_after_ternary_else.out
new file mode 100644
index 0000000000..dab6b0a1ad
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/missing_expression_after_ternary_else.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected expression after "else".
diff --git a/modules/gdscript/tests/scripts/parser/errors/missing_paren_after_args.gd b/modules/gdscript/tests/scripts/parser/errors/missing_paren_after_args.gd
index 116b0151da..7a35bf688c 100644
--- a/modules/gdscript/tests/scripts/parser/errors/missing_paren_after_args.gd
+++ b/modules/gdscript/tests/scripts/parser/errors/missing_paren_after_args.gd
@@ -1,6 +1,6 @@
func args(a, b):
- print(a)
- print(b)
+ print(a)
+ print(b)
func test():
- args(1,2
+ args(1,2
diff --git a/modules/gdscript/tests/scripts/parser/errors/mistaken_decrement_operator.gd b/modules/gdscript/tests/scripts/parser/errors/mistaken_decrement_operator.gd
new file mode 100644
index 0000000000..193f824702
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/mistaken_decrement_operator.gd
@@ -0,0 +1,3 @@
+func test():
+ var a = 0
+ print(a--)
diff --git a/modules/gdscript/tests/scripts/parser/errors/mistaken_decrement_operator.out b/modules/gdscript/tests/scripts/parser/errors/mistaken_decrement_operator.out
new file mode 100644
index 0000000000..b6b577a277
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/mistaken_decrement_operator.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected expression after "-" operator.
diff --git a/modules/gdscript/tests/scripts/parser/errors/mistaken_increment_operator.gd b/modules/gdscript/tests/scripts/parser/errors/mistaken_increment_operator.gd
new file mode 100644
index 0000000000..035d27638c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/mistaken_increment_operator.gd
@@ -0,0 +1,3 @@
+func test():
+ var a = 0
+ print(a++)
diff --git a/modules/gdscript/tests/scripts/parser/errors/mistaken_increment_operator.out b/modules/gdscript/tests/scripts/parser/errors/mistaken_increment_operator.out
new file mode 100644
index 0000000000..24eb76593a
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/mistaken_increment_operator.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected expression after "+" operator.
diff --git a/modules/gdscript/tests/scripts/parser/errors/multiple_number_separators.gd b/modules/gdscript/tests/scripts/parser/errors/multiple_number_separators.gd
new file mode 100644
index 0000000000..71a03fbc0d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/multiple_number_separators.gd
@@ -0,0 +1,3 @@
+func test():
+ # Number separators may not be placed right next to each other.
+ var __ = 1__23
diff --git a/modules/gdscript/tests/scripts/parser/errors/multiple_number_separators.out b/modules/gdscript/tests/scripts/parser/errors/multiple_number_separators.out
new file mode 100644
index 0000000000..71a3c2fd6a
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/multiple_number_separators.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Only one underscore can be used as a numeric separator.
diff --git a/modules/gdscript/tests/scripts/parser/errors/nothing_after_dollar.gd b/modules/gdscript/tests/scripts/parser/errors/nothing_after_dollar.gd
index 3875ce3936..df388a21de 100644
--- a/modules/gdscript/tests/scripts/parser/errors/nothing_after_dollar.gd
+++ b/modules/gdscript/tests/scripts/parser/errors/nothing_after_dollar.gd
@@ -1,3 +1,5 @@
extends Node
+
+
func test():
- var a = $ # Expected some node path.
+ var a = $ # Expected some node path.
diff --git a/modules/gdscript/tests/scripts/parser/errors/redefine_keyword.gd b/modules/gdscript/tests/scripts/parser/errors/redefine_keyword.gd
new file mode 100644
index 0000000000..c289c9d976
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/redefine_keyword.gd
@@ -0,0 +1,2 @@
+func test():
+ var while = "it's been a while"
diff --git a/modules/gdscript/tests/scripts/parser/errors/redefine_keyword.out b/modules/gdscript/tests/scripts/parser/errors/redefine_keyword.out
new file mode 100644
index 0000000000..a4bd8beef1
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/redefine_keyword.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected variable name after "var".
diff --git a/modules/gdscript/tests/scripts/parser/errors/redefine_local_constant_with_keyword.gd b/modules/gdscript/tests/scripts/parser/errors/redefine_local_constant_with_keyword.gd
new file mode 100644
index 0000000000..204259f981
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/redefine_local_constant_with_keyword.gd
@@ -0,0 +1,5 @@
+func test():
+ const TEST = 25
+
+ # Error here (can't redeclare a constant on the same scope).
+ const TEST = 50
diff --git a/modules/gdscript/tests/scripts/parser/errors/redefine_local_constant_with_keyword.out b/modules/gdscript/tests/scripts/parser/errors/redefine_local_constant_with_keyword.out
new file mode 100644
index 0000000000..d67cc92953
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/redefine_local_constant_with_keyword.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+There is already a constant named "TEST" declared in this scope.
diff --git a/modules/gdscript/tests/scripts/parser/errors/subscript_without_index.gd b/modules/gdscript/tests/scripts/parser/errors/subscript_without_index.gd
new file mode 100644
index 0000000000..c30c05e4da
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/subscript_without_index.gd
@@ -0,0 +1,3 @@
+func test():
+ var array = [1, 2, 3]
+ array[] = 4
diff --git a/modules/gdscript/tests/scripts/parser/errors/subscript_without_index.out b/modules/gdscript/tests/scripts/parser/errors/subscript_without_index.out
new file mode 100644
index 0000000000..7017c7b4aa
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/subscript_without_index.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected expression after "[".
diff --git a/modules/gdscript/tests/scripts/parser/errors/variable_conflicts_constant.gd b/modules/gdscript/tests/scripts/parser/errors/variable_conflicts_constant.gd
new file mode 100644
index 0000000000..0d8843df20
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/variable_conflicts_constant.gd
@@ -0,0 +1,3 @@
+func test():
+ const TEST = 25
+ var TEST = 50
diff --git a/modules/gdscript/tests/scripts/parser/errors/variable_conflicts_constant.out b/modules/gdscript/tests/scripts/parser/errors/variable_conflicts_constant.out
new file mode 100644
index 0000000000..d67cc92953
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/variable_conflicts_constant.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+There is already a constant named "TEST" declared in this scope.
diff --git a/modules/gdscript/tests/scripts/parser/errors/variable_conflicts_function.gd b/modules/gdscript/tests/scripts/parser/errors/variable_conflicts_function.gd
new file mode 100644
index 0000000000..ce2c8784d6
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/variable_conflicts_function.gd
@@ -0,0 +1,6 @@
+var test = 25
+
+# Error here. The difference with `variable-conflicts-function.gd` is that here,
+# the function is defined *before* the variable.
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/parser/errors/variable_conflicts_function.out b/modules/gdscript/tests/scripts/parser/errors/variable_conflicts_function.out
new file mode 100644
index 0000000000..daeaca40ec
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/variable_conflicts_function.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Function "test" has the same name as a previously declared variable.
diff --git a/modules/gdscript/tests/scripts/parser/errors/vcs_conflict_marker.gd b/modules/gdscript/tests/scripts/parser/errors/vcs_conflict_marker.gd
new file mode 100644
index 0000000000..8850892f2d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/vcs_conflict_marker.gd
@@ -0,0 +1,13 @@
+# The VCS conflict marker has only 6 `=` signs instead of 7 to prevent editors like
+# Visual Studio Code from recognizing it as an actual VCS conflict marker.
+# Nonetheless, the GDScript parser is still expected to find and report the VCS
+# conflict marker error correctly.
+
+<<<<<<< HEAD
+Hello world
+======
+Goodbye
+>>>>>>> 77976da35a11db4580b80ae27e8d65caf5208086
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/parser/errors/vcs_conflict_marker.out b/modules/gdscript/tests/scripts/parser/errors/vcs_conflict_marker.out
new file mode 100644
index 0000000000..df9dab2223
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/vcs_conflict_marker.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Unexpected "VCS conflict marker" in class body.
diff --git a/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar.gd b/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar.gd
index 6fd2692d47..babe39068c 100644
--- a/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar.gd
+++ b/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar.gd
@@ -1,3 +1,5 @@
extends Node
+
+
func test():
- $23 # Can't use number here.
+ $23 # Can't use number here.
diff --git a/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar_slash.gd b/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar_slash.gd
index 1836d42226..b6b1cf3e52 100644
--- a/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar_slash.gd
+++ b/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar_slash.gd
@@ -1,3 +1,5 @@
extends Node
+
+
func test():
- $MyNode/23 # Can't use number here.
+ $MyNode/23 # Can't use number here.
diff --git a/modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.gd b/modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.gd
new file mode 100644
index 0000000000..7862eff6ec
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.gd
@@ -0,0 +1,6 @@
+#GDTEST_PARSER_ERROR
+
+signal event
+
+func test():
+ yield("event")
diff --git a/modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.out b/modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.out
new file mode 100644
index 0000000000..36cb699e92
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/yield_instead_of_await.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+"yield" was removed in Godot 4.0. Use "await" instead.
diff --git a/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.gd b/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.gd
new file mode 100644
index 0000000000..43b513045b
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.gd
@@ -0,0 +1,34 @@
+func foo(x):
+ match x:
+ 1 + 1:
+ print("1+1")
+ [1,2,[1,{1:2,2:var z,..}]]:
+ print("[1,2,[1,{1:2,2:var z,..}]]")
+ print(z)
+ 1 if true else 2:
+ print("1 if true else 2")
+ 1 < 2:
+ print("1 < 2")
+ 1 or 2 and 1:
+ print("1 or 2 and 1")
+ 6 | 1:
+ print("1 | 1")
+ 1 >> 1:
+ print("1 >> 1")
+ 1, 2 or 3, 4:
+ print("1, 2 or 3, 4")
+ _:
+ print("wildcard")
+
+func test():
+ foo(6 | 1)
+ foo(1 >> 1)
+ foo(2)
+ foo(1)
+ foo(1+1)
+ foo(1 < 2)
+ foo([2, 1])
+ foo(4)
+ foo([1, 2, [1, {1 : 2, 2:3}]])
+ foo([1, 2, [1, {1 : 2, 2:[1,3,5, "123"], 4:2}]])
+ foo([1, 2, [1, {1 : 2}]])
diff --git a/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.out b/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.out
new file mode 100644
index 0000000000..67c7e28046
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.out
@@ -0,0 +1,14 @@
+GDTEST_OK
+1 | 1
+1 >> 1
+1+1
+1 if true else 2
+1+1
+1 < 2
+wildcard
+1, 2 or 3, 4
+[1,2,[1,{1:2,2:var z,..}]]
+3
+[1,2,[1,{1:2,2:var z,..}]]
+[1, 3, 5, 123]
+wildcard
diff --git a/modules/gdscript/tests/scripts/parser/features/array.gd b/modules/gdscript/tests/scripts/parser/features/array.gd
new file mode 100644
index 0000000000..828ce8d134
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/array.gd
@@ -0,0 +1,16 @@
+func test():
+ # Indexing from the beginning:
+ print([1, 2, 3][0])
+ print([1, 2, 3][1])
+ print([1, 2, 3][2])
+
+ # Indexing from the end:
+ print([1, 2, 3][-1])
+ print([1, 2, 3][-2])
+ print([1, 2, 3][-3])
+
+ # Float indices are currently allowed, but should probably be an error?
+ print([1, 2, 3][0.4])
+ print([1, 2, 3][0.8])
+ print([1, 2, 3][1.0])
+ print([1, 2, 3][-1.0])
diff --git a/modules/gdscript/tests/scripts/parser/features/array.out b/modules/gdscript/tests/scripts/parser/features/array.out
new file mode 100644
index 0000000000..cf576c59e0
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/array.out
@@ -0,0 +1,11 @@
+GDTEST_OK
+1
+2
+3
+3
+2
+1
+1
+1
+2
+3
diff --git a/modules/gdscript/tests/scripts/parser/features/basic_expression_matching.gd b/modules/gdscript/tests/scripts/parser/features/basic_expression_matching.gd
new file mode 100644
index 0000000000..2b46f1e88a
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/basic_expression_matching.gd
@@ -0,0 +1,27 @@
+func foo(x):
+ match x:
+ 1:
+ print("1")
+ 2:
+ print("2")
+ [1, 2]:
+ print("[1, 2]")
+ 3 or 4:
+ print("3 or 4")
+ 4:
+ print("4")
+ {1 : 2, 2 : 3}:
+ print("{1 : 2, 2 : 3}")
+ _:
+ print("wildcard")
+
+func test():
+ foo(0)
+ foo(1)
+ foo(2)
+ foo([1, 2])
+ foo(3)
+ foo(4)
+ foo([4,4])
+ foo({1 : 2, 2 : 3})
+ foo({1 : 2, 4 : 3})
diff --git a/modules/gdscript/tests/scripts/parser/features/basic_expression_matching.out b/modules/gdscript/tests/scripts/parser/features/basic_expression_matching.out
new file mode 100644
index 0000000000..46ee4b04da
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/basic_expression_matching.out
@@ -0,0 +1,10 @@
+GDTEST_OK
+wildcard
+1
+2
+[1, 2]
+wildcard
+4
+wildcard
+{1 : 2, 2 : 3}
+wildcard
diff --git a/modules/gdscript/tests/scripts/parser/features/bitwise_operators.gd b/modules/gdscript/tests/scripts/parser/features/bitwise_operators.gd
new file mode 100644
index 0000000000..de502c6ed1
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/bitwise_operators.gd
@@ -0,0 +1,50 @@
+enum Flags {
+ FIRE = 1 << 1,
+ ICE = 1 << 2,
+ SLIPPERY = 1 << 3,
+ STICKY = 1 << 4,
+ NONSOLID = 1 << 5,
+
+ ALL = FIRE | ICE | SLIPPERY | STICKY | NONSOLID,
+}
+
+
+func test():
+ var flags = Flags.FIRE | Flags.SLIPPERY
+ print(flags)
+
+ flags = Flags.FIRE & Flags.SLIPPERY
+ print(flags)
+
+ flags = Flags.FIRE ^ Flags.SLIPPERY
+ print(flags)
+
+ flags = Flags.ALL & (Flags.FIRE | Flags.ICE)
+ print(flags)
+
+ flags = (Flags.ALL & Flags.FIRE) | Flags.ICE
+ print(flags)
+
+ flags = Flags.ALL & Flags.FIRE | Flags.ICE
+ print(flags)
+
+ # Enum value must be casted to an integer. Otherwise, a parser error is emitted.
+ flags &= int(Flags.ICE)
+ print(flags)
+
+ flags ^= int(Flags.ICE)
+ print(flags)
+
+ flags |= int(Flags.STICKY | Flags.SLIPPERY)
+ print(flags)
+
+ print()
+
+ var num = 2 << 4
+ print(num)
+
+ num <<= 2
+ print(num)
+
+ num >>= 2
+ print(num)
diff --git a/modules/gdscript/tests/scripts/parser/features/bitwise_operators.out b/modules/gdscript/tests/scripts/parser/features/bitwise_operators.out
new file mode 100644
index 0000000000..410e358a05
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/bitwise_operators.out
@@ -0,0 +1,14 @@
+GDTEST_OK
+10
+0
+10
+6
+6
+6
+4
+0
+24
+
+32
+128
+32
diff --git a/modules/gdscript/tests/scripts/parser/features/class.gd b/modules/gdscript/tests/scripts/parser/features/class.gd
new file mode 100644
index 0000000000..6652f85ad9
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/class.gd
@@ -0,0 +1,25 @@
+# Test non-nested/slightly nested class architecture.
+class Test:
+ var number = 25
+ var string = "hello"
+
+
+class TestSub extends Test:
+ var other_string = "bye"
+
+
+class TestConstructor:
+ func _init(argument = 10):
+ print(str("constructor with argument ", argument))
+
+
+func test():
+ var test_instance = Test.new()
+ test_instance.number = 42
+
+ var test_sub = TestSub.new()
+ assert(test_sub.number == 25) # From Test.
+ assert(test_sub.other_string == "bye") # From TestSub.
+
+ TestConstructor.new()
+ TestConstructor.new(500)
diff --git a/modules/gdscript/tests/scripts/parser/features/class.out b/modules/gdscript/tests/scripts/parser/features/class.out
new file mode 100644
index 0000000000..94dc2d6003
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/class.out
@@ -0,0 +1,3 @@
+GDTEST_OK
+constructor with argument 10
+constructor with argument 500
diff --git a/modules/gdscript/tests/scripts/parser/features/class_inheritance.gd b/modules/gdscript/tests/scripts/parser/features/class_inheritance.gd
new file mode 100644
index 0000000000..3f9b4ea86e
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/class_inheritance.gd
@@ -0,0 +1,33 @@
+# Test deeply nested class architectures.
+class Test:
+ var depth = 1
+
+ class Nested:
+ var depth_nested = 10
+
+
+class Test2 extends Test:
+ var depth2 = 2
+
+
+class Test3 extends Test2:
+ var depth3 = 3
+
+
+class Test4 extends Test3:
+ var depth4 = 4
+
+ class Nested2:
+ var depth4_nested = 100
+
+
+func test():
+ print(Test.new().depth)
+ print(Test2.new().depth)
+ print(Test2.new().depth2)
+ print(Test3.new().depth)
+ print(Test3.new().depth3)
+ print(Test4.new().depth)
+ print(Test4.new().depth4)
+ print(Test.Nested.new().depth_nested)
+ print(Test4.Nested2.new().depth4_nested)
diff --git a/modules/gdscript/tests/scripts/parser/features/class_inheritance.out b/modules/gdscript/tests/scripts/parser/features/class_inheritance.out
new file mode 100644
index 0000000000..75bdde3d94
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/class_inheritance.out
@@ -0,0 +1,10 @@
+GDTEST_OK
+1
+1
+2
+1
+3
+1
+4
+10
+100
diff --git a/modules/gdscript/tests/scripts/parser/features/class_name.gd b/modules/gdscript/tests/scripts/parser/features/class_name.gd
new file mode 100644
index 0000000000..8bd188e247
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/class_name.gd
@@ -0,0 +1,5 @@
+class_name HelloWorld
+@icon("res://path/to/optional/icon.svg")
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/parser/features/class_name.out b/modules/gdscript/tests/scripts/parser/features/class_name.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/class_name.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/parser/features/concatenation.gd b/modules/gdscript/tests/scripts/parser/features/concatenation.gd
new file mode 100644
index 0000000000..e8335c9823
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/concatenation.gd
@@ -0,0 +1,4 @@
+func test():
+ print(20 + 20)
+ print("hello" + "world")
+ print([1, 2] + [3, 4])
diff --git a/modules/gdscript/tests/scripts/parser/features/concatenation.out b/modules/gdscript/tests/scripts/parser/features/concatenation.out
new file mode 100644
index 0000000000..23bff08f49
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/concatenation.out
@@ -0,0 +1,4 @@
+GDTEST_OK
+40
+helloworld
+[1, 2, 3, 4]
diff --git a/modules/gdscript/tests/scripts/parser/features/constants.gd b/modules/gdscript/tests/scripts/parser/features/constants.gd
new file mode 100644
index 0000000000..013c9c074f
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/constants.gd
@@ -0,0 +1,11 @@
+func test():
+ const _TEST = 12 + 34 - 56 * 78
+ const _STRING = "yes"
+ const _VECTOR = Vector2(5, 6)
+ const _ARRAY = []
+ const _DICTIONARY = {"this": "dictionary"}
+
+ # Create user constants from built-in constants.
+ const _HELLO = PI + TAU
+ const _INFINITY = INF
+ const _NOT_A_NUMBER = NAN
diff --git a/modules/gdscript/tests/scripts/parser/features/constants.out b/modules/gdscript/tests/scripts/parser/features/constants.out
new file mode 100644
index 0000000000..6093e4a6ca
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/constants.out
@@ -0,0 +1,33 @@
+GDTEST_OK
+>> WARNING
+>> Line: 2
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant '_TEST' is declared but never used in the block. If this is intended, prefix it with an underscore: '__TEST'
+>> WARNING
+>> Line: 3
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant '_STRING' is declared but never used in the block. If this is intended, prefix it with an underscore: '__STRING'
+>> WARNING
+>> Line: 4
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant '_VECTOR' is declared but never used in the block. If this is intended, prefix it with an underscore: '__VECTOR'
+>> WARNING
+>> Line: 5
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant '_ARRAY' is declared but never used in the block. If this is intended, prefix it with an underscore: '__ARRAY'
+>> WARNING
+>> Line: 6
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant '_DICTIONARY' is declared but never used in the block. If this is intended, prefix it with an underscore: '__DICTIONARY'
+>> WARNING
+>> Line: 9
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant '_HELLO' is declared but never used in the block. If this is intended, prefix it with an underscore: '__HELLO'
+>> WARNING
+>> Line: 10
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant '_INFINITY' is declared but never used in the block. If this is intended, prefix it with an underscore: '__INFINITY'
+>> WARNING
+>> Line: 11
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant '_NOT_A_NUMBER' is declared but never used in the block. If this is intended, prefix it with an underscore: '__NOT_A_NUMBER'
diff --git a/modules/gdscript/tests/scripts/parser/features/dictionary.gd b/modules/gdscript/tests/scripts/parser/features/dictionary.gd
new file mode 100644
index 0000000000..99afe166c7
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/dictionary.gd
@@ -0,0 +1,37 @@
+func test():
+ # Non-string keys are valid.
+ print({ 12: "world" }[12])
+
+ var contents = {
+ 0: "zero",
+ 0.0: "zero point zero",
+ null: "null",
+ false: "false",
+ []: "empty array",
+ Vector2i(): "zero Vector2i",
+ 15: {
+ 22: {
+ 4: ["nesting", "arrays"],
+ },
+ },
+ }
+
+ print(contents[0.0])
+ # Making sure declaration order doesn't affect things...
+ print({ 0.0: "zero point zero", 0: "zero", null: "null", false: "false", []: "empty array" }[0])
+ print({ 0.0: "zero point zero", 0: "zero", null: "null", false: "false", []: "empty array" }[0.0])
+
+ print(contents[null])
+ print(contents[false])
+ print(contents[[]])
+ print(contents[Vector2i()])
+ print(contents[15])
+ print(contents[15][22])
+ print(contents[15][22][4])
+ print(contents[15][22][4][0])
+ print(contents[15][22][4][1])
+
+ # Currently fails with "invalid get index 'hello' on base Dictionary".
+ # Both syntaxes are valid however.
+ #print({ "hello": "world" }["hello"])
+ #print({ "hello": "world" }.hello)
diff --git a/modules/gdscript/tests/scripts/parser/features/dictionary.out b/modules/gdscript/tests/scripts/parser/features/dictionary.out
new file mode 100644
index 0000000000..54083c1afc
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/dictionary.out
@@ -0,0 +1,14 @@
+GDTEST_OK
+world
+zero point zero
+zero
+zero point zero
+null
+false
+empty array
+zero Vector2i
+{22:{4:[nesting, arrays]}}
+{4:[nesting, arrays]}
+[nesting, arrays]
+nesting
+arrays
diff --git a/modules/gdscript/tests/scripts/parser/features/dictionary_lua_style.gd b/modules/gdscript/tests/scripts/parser/features/dictionary_lua_style.gd
new file mode 100644
index 0000000000..fdd6de2348
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/dictionary_lua_style.gd
@@ -0,0 +1,9 @@
+func test():
+ var lua_dict = {
+ a = 1,
+ "b" = 2, # Using strings are allowed too.
+ "with spaces" = 3, # Especially useful when key has spaces...
+ "2" = 4, # ... or invalid identifiers.
+ }
+
+ print(lua_dict)
diff --git a/modules/gdscript/tests/scripts/parser/features/dictionary_lua_style.out b/modules/gdscript/tests/scripts/parser/features/dictionary_lua_style.out
new file mode 100644
index 0000000000..447d7e223c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/dictionary_lua_style.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+{2:4, a:1, b:2, with spaces:3}
diff --git a/modules/gdscript/tests/scripts/parser/features/dictionary_mixed_syntax.gd b/modules/gdscript/tests/scripts/parser/features/dictionary_mixed_syntax.gd
new file mode 100644
index 0000000000..cce8538ddd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/dictionary_mixed_syntax.gd
@@ -0,0 +1,12 @@
+func test():
+ # Mixing Python-style and Lua-style syntax in the same dictionary declaration
+ # is allowed.
+ var dict = {
+ "hello": {
+ world = {
+ "is": "beautiful",
+ },
+ },
+ }
+
+ print(dict)
diff --git a/modules/gdscript/tests/scripts/parser/features/dictionary_mixed_syntax.out b/modules/gdscript/tests/scripts/parser/features/dictionary_mixed_syntax.out
new file mode 100644
index 0000000000..62be807a1f
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/dictionary_mixed_syntax.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+{hello:{world:{is:beautiful}}}
diff --git a/modules/gdscript/tests/scripts/parser/features/dollar_node_paths.gd b/modules/gdscript/tests/scripts/parser/features/dollar_node_paths.gd
new file mode 100644
index 0000000000..8ba558e91d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/dollar_node_paths.gd
@@ -0,0 +1,20 @@
+extends Node
+
+
+func test():
+ # Create the required node structure.
+ var hello = Node.new()
+ hello.name = "Hello"
+ add_child(hello)
+ var world = Node.new()
+ world.name = "World"
+ hello.add_child(world)
+
+ # All the ways of writing node paths below with the `$` operator are valid.
+ # Results are assigned to variables to avoid warnings.
+ var __ = $Hello
+ __ = $"Hello"
+ __ = $Hello/World
+ __ = $"Hello/World"
+ __ = $"Hello/.."
+ __ = $"Hello/../Hello/World"
diff --git a/modules/gdscript/tests/scripts/parser/features/dollar_node_paths.out b/modules/gdscript/tests/scripts/parser/features/dollar_node_paths.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/dollar_node_paths.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/parser/features/enum.gd b/modules/gdscript/tests/scripts/parser/features/enum.gd
new file mode 100644
index 0000000000..bbc66f6f3d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/enum.gd
@@ -0,0 +1,14 @@
+enum Size {
+ S = -10,
+ M,
+ L = 0,
+ XL = 10,
+ XXL,
+}
+
+func test():
+ print(Size.S)
+ print(Size.M)
+ print(Size.L)
+ print(Size.XL)
+ print(Size.XXL)
diff --git a/modules/gdscript/tests/scripts/parser/features/enum.out b/modules/gdscript/tests/scripts/parser/features/enum.out
new file mode 100644
index 0000000000..6f3a4a3e49
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/enum.out
@@ -0,0 +1,6 @@
+GDTEST_OK
+-10
+-9
+0
+10
+11
diff --git a/modules/gdscript/tests/scripts/parser/features/export_variable.gd b/modules/gdscript/tests/scripts/parser/features/export_variable.gd
new file mode 100644
index 0000000000..1e072728fc
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/export_variable.gd
@@ -0,0 +1,18 @@
+@export var example = 99
+@export_range(0, 100) var example_range = 100
+@export_range(0, 100, 1) var example_range_step = 101
+@export_range(0, 100, 1, "or_greater") var example_range_step_or_greater = 102
+
+@export var color: Color
+@export_color_no_alpha var color_no_alpha: Color
+@export_node_path(Sprite2D, Sprite3D, Control, Node) var nodepath := ^"hello"
+
+
+func test():
+ print(example)
+ print(example_range)
+ print(example_range_step)
+ print(example_range_step_or_greater)
+ print(color)
+ print(color_no_alpha)
+ print(nodepath)
diff --git a/modules/gdscript/tests/scripts/parser/features/export_variable.out b/modules/gdscript/tests/scripts/parser/features/export_variable.out
new file mode 100644
index 0000000000..bae35e75c6
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/export_variable.out
@@ -0,0 +1,8 @@
+GDTEST_OK
+99
+100
+101
+102
+(0, 0, 0, 1)
+(0, 0, 0, 1)
+hello
diff --git a/modules/gdscript/tests/scripts/parser/features/float_notation.gd b/modules/gdscript/tests/scripts/parser/features/float_notation.gd
new file mode 100644
index 0000000000..b207b88820
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/float_notation.gd
@@ -0,0 +1,24 @@
+func test():
+ # The following floating-point notations are all valid:
+ print(is_equal_approx(123., 123))
+ print(is_equal_approx(.123, 0.123))
+ print(is_equal_approx(.123e4, 1230))
+ print(is_equal_approx(123.e4, 1.23e6))
+ print(is_equal_approx(.123e-1, 0.0123))
+ print(is_equal_approx(123.e-1, 12.3))
+
+ # Same as above, but with negative numbers.
+ print(is_equal_approx(-123., -123))
+ print(is_equal_approx(-.123, -0.123))
+ print(is_equal_approx(-.123e4, -1230))
+ print(is_equal_approx(-123.e4, -1.23e6))
+ print(is_equal_approx(-.123e-1, -0.0123))
+ print(is_equal_approx(-123.e-1, -12.3))
+
+ # Same as above, but with explicit positive numbers (which is redundant).
+ print(is_equal_approx(+123., +123))
+ print(is_equal_approx(+.123, +0.123))
+ print(is_equal_approx(+.123e4, +1230))
+ print(is_equal_approx(+123.e4, +1.23e6))
+ print(is_equal_approx(+.123e-1, +0.0123))
+ print(is_equal_approx(+123.e-1, +12.3))
diff --git a/modules/gdscript/tests/scripts/parser/features/float_notation.out b/modules/gdscript/tests/scripts/parser/features/float_notation.out
new file mode 100644
index 0000000000..041c4439b0
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/float_notation.out
@@ -0,0 +1,19 @@
+GDTEST_OK
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
diff --git a/modules/gdscript/tests/scripts/parser/features/for_range.gd b/modules/gdscript/tests/scripts/parser/features/for_range.gd
new file mode 100644
index 0000000000..fd1d002b82
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/for_range.gd
@@ -0,0 +1,39 @@
+func test():
+ for i in range(5):
+ print(i)
+
+ print()
+
+ # Equivalent to the above `for` loop:
+ for i in 5:
+ print(i)
+
+ print()
+
+ for i in range(1, 5):
+ print(i)
+
+ print()
+
+ for i in range(1, -5, -1):
+ print(i)
+
+ print()
+
+ for i in [2, 4, 6, -8]:
+ print(i)
+
+ print()
+
+ for i in [true, false]:
+ print(i)
+
+ print()
+
+ for i in [Vector2i(10, 20), Vector2i(-30, -40)]:
+ print(i)
+
+ print()
+
+ for i in "Hello_Unicôde_world!_🦄":
+ print(i)
diff --git a/modules/gdscript/tests/scripts/parser/features/for_range.out b/modules/gdscript/tests/scripts/parser/features/for_range.out
new file mode 100644
index 0000000000..50b2c856c5
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/for_range.out
@@ -0,0 +1,58 @@
+GDTEST_OK
+0
+1
+2
+3
+4
+
+0
+1
+2
+3
+4
+
+1
+2
+3
+4
+
+1
+0
+-1
+-2
+-3
+-4
+
+2
+4
+6
+-8
+
+true
+false
+
+(10, 20)
+(-30, -40)
+
+H
+e
+l
+l
+o
+_
+U
+n
+i
+c
+ô
+d
+e
+_
+w
+o
+r
+l
+d
+!
+_
+🦄
diff --git a/modules/gdscript/tests/scripts/parser/features/function_default_parameter_type_inference.gd b/modules/gdscript/tests/scripts/parser/features/function_default_parameter_type_inference.gd
new file mode 100644
index 0000000000..f5098b00ae
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/function_default_parameter_type_inference.gd
@@ -0,0 +1,5 @@
+func example(_number: int, _number2: int = 5, number3 := 10):
+ return number3
+
+func test():
+ print(example(3))
diff --git a/modules/gdscript/tests/scripts/parser/features/function_default_parameter_type_inference.out b/modules/gdscript/tests/scripts/parser/features/function_default_parameter_type_inference.out
new file mode 100644
index 0000000000..404cd41fe5
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/function_default_parameter_type_inference.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+10
diff --git a/modules/gdscript/tests/scripts/parser/features/function_many_parameters.gd b/modules/gdscript/tests/scripts/parser/features/function_many_parameters.gd
new file mode 100644
index 0000000000..01edb37cec
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/function_many_parameters.gd
@@ -0,0 +1,5 @@
+func example(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24, arg25, arg26, arg27, arg28, arg29, arg30, arg31, arg32, arg33, arg34, arg35, arg36, arg37, arg38, arg39, arg40, arg41, arg42, arg43, arg44, arg45, arg46, arg47, arg48 = false, arg49 = true, arg50 = null):
+ print(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24, arg25, arg26, arg27, arg28, arg29, arg30, arg31, arg32, arg33, arg34, arg35, arg36, arg37, arg38, arg39, arg40, arg41, arg42, arg43, arg44, arg45, arg46, arg47, arg48, arg49, arg50)
+
+func test():
+ example(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47)
diff --git a/modules/gdscript/tests/scripts/parser/features/function_many_parameters.out b/modules/gdscript/tests/scripts/parser/features/function_many_parameters.out
new file mode 100644
index 0000000000..3a979227d4
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/function_many_parameters.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+123456789101112131415161718192212223242526272829303132333435363738394041424344454647falsetruenull
diff --git a/modules/gdscript/tests/scripts/parser/features/in.gd b/modules/gdscript/tests/scripts/parser/features/in.gd
new file mode 100644
index 0000000000..f7296017c5
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/in.gd
@@ -0,0 +1,14 @@
+func test():
+ print("dot" in "Godot")
+ print(not "i" in "team")
+
+ print(true in [true, false])
+ print(not null in [true, false])
+ print(null in [null])
+
+ print(26 in [8, 26, 64, 100])
+ print(not Vector2i(10, 20) in [Vector2i(20, 10)])
+
+ print("apple" in { "apple": "fruit" })
+ print("apple" in { "apple": null })
+ print(not "apple" in { "fruit": "apple" })
diff --git a/modules/gdscript/tests/scripts/parser/features/in.out b/modules/gdscript/tests/scripts/parser/features/in.out
new file mode 100644
index 0000000000..7533f6ff54
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/in.out
@@ -0,0 +1,11 @@
+GDTEST_OK
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
diff --git a/modules/gdscript/tests/scripts/parser/features/lambda_callable.gd b/modules/gdscript/tests/scripts/parser/features/lambda_callable.gd
new file mode 100644
index 0000000000..c3b2506156
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/lambda_callable.gd
@@ -0,0 +1,4 @@
+func test():
+ var my_lambda = func(x):
+ print(x)
+ my_lambda.call("hello")
diff --git a/modules/gdscript/tests/scripts/parser/features/lambda_callable.out b/modules/gdscript/tests/scripts/parser/features/lambda_callable.out
new file mode 100644
index 0000000000..58774d2d3f
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/lambda_callable.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+hello
diff --git a/modules/gdscript/tests/scripts/parser/features/lambda_capture_callable.gd b/modules/gdscript/tests/scripts/parser/features/lambda_capture_callable.gd
new file mode 100644
index 0000000000..f081a0b6a7
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/lambda_capture_callable.gd
@@ -0,0 +1,4 @@
+func test():
+ var x = 42
+ var my_lambda = func(): print(x)
+ my_lambda.call() # Prints "42".
diff --git a/modules/gdscript/tests/scripts/parser/features/lambda_capture_callable.out b/modules/gdscript/tests/scripts/parser/features/lambda_capture_callable.out
new file mode 100644
index 0000000000..0982f3718c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/lambda_capture_callable.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+42
diff --git a/modules/gdscript/tests/scripts/parser/features/lambda_named_callable.gd b/modules/gdscript/tests/scripts/parser/features/lambda_named_callable.gd
new file mode 100644
index 0000000000..7971ca72a6
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/lambda_named_callable.gd
@@ -0,0 +1,10 @@
+func i_take_lambda(lambda: Callable, param: String):
+ lambda.call(param)
+
+
+func test():
+ var my_lambda := func this_is_lambda(x):
+ print("Hello")
+ print("This is %s" % x)
+
+ i_take_lambda(my_lambda, "a lambda")
diff --git a/modules/gdscript/tests/scripts/parser/features/lambda_named_callable.out b/modules/gdscript/tests/scripts/parser/features/lambda_named_callable.out
new file mode 100644
index 0000000000..c627187d82
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/lambda_named_callable.out
@@ -0,0 +1,3 @@
+GDTEST_OK
+Hello
+This is a lambda
diff --git a/modules/gdscript/tests/scripts/parser/features/match.gd b/modules/gdscript/tests/scripts/parser/features/match.gd
new file mode 100644
index 0000000000..4d05490aa5
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/match.gd
@@ -0,0 +1,18 @@
+func test():
+ var i = "Hello"
+ match i:
+ "Hello":
+ print("hello")
+ # This will fall through to the default case below.
+ continue
+ "Good bye":
+ print("bye")
+ _:
+ print("default")
+
+ var j = 25
+ match j:
+ 26:
+ print("This won't match")
+ _:
+ print("This will match")
diff --git a/modules/gdscript/tests/scripts/parser/features/match.out b/modules/gdscript/tests/scripts/parser/features/match.out
new file mode 100644
index 0000000000..732885c7a2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/match.out
@@ -0,0 +1,4 @@
+GDTEST_OK
+hello
+default
+This will match
diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_arrays.gd b/modules/gdscript/tests/scripts/parser/features/multiline_arrays.gd
new file mode 100644
index 0000000000..3b30998853
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/multiline_arrays.gd
@@ -0,0 +1,7 @@
+func test():
+ var __ = [
+ "this",
+ "is", "a","multiline",
+
+ "array", "with mixed indentation and trailing comma",
+ ]
diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_arrays.out b/modules/gdscript/tests/scripts/parser/features/multiline_arrays.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/multiline_arrays.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_dictionaries.gd b/modules/gdscript/tests/scripts/parser/features/multiline_dictionaries.gd
new file mode 100644
index 0000000000..e108cd23d4
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/multiline_dictionaries.gd
@@ -0,0 +1,10 @@
+func test():
+ var __ = {
+ "multiline": "dictionary","should": "work",
+ "even with": "a trailing comma",
+ }
+
+ __ = {
+ this_also_applies = "to the",
+ lua_style_syntax = null, foo = null,
+ }
diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_dictionaries.out b/modules/gdscript/tests/scripts/parser/features/multiline_dictionaries.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/multiline_dictionaries.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_if.gd b/modules/gdscript/tests/scripts/parser/features/multiline_if.gd
new file mode 100644
index 0000000000..86152f4543
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/multiline_if.gd
@@ -0,0 +1,14 @@
+func test():
+ # Line breaks are allowed within parentheses.
+ if (
+ 1 == 1
+ and 2 == 2 and
+ 3 == 3
+ ):
+ pass
+
+ # Alternatively, backslashes can be used.
+ if 1 == 1 \
+ and 2 == 2 and \
+ 3 == 3:
+ pass
diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_if.out b/modules/gdscript/tests/scripts/parser/features/multiline_if.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/multiline_if.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_strings.gd b/modules/gdscript/tests/scripts/parser/features/multiline_strings.gd
new file mode 100644
index 0000000000..7f5bba85e7
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/multiline_strings.gd
@@ -0,0 +1,15 @@
+func test():
+ var __ = """
+ This is a standalone string, not a multiline comment.
+ Writing both "double" quotes and 'simple' quotes is fine as
+ long as there is only ""one"" or ''two'' of those in a row, not more.
+
+ If you have more quotes, they need to be escaped like this: \"\"\"
+ """
+ __ = '''
+ Another standalone string, this time with single quotes.
+ Writing both "double" quotes and 'simple' quotes is fine as
+ long as there is only ""one"" or ''two'' of those in a row, not more.
+
+ If you have more quotes, they need to be escaped like this: \'\'\'
+ '''
diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_strings.out b/modules/gdscript/tests/scripts/parser/features/multiline_strings.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/multiline_strings.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_vector.gd b/modules/gdscript/tests/scripts/parser/features/multiline_vector.gd
new file mode 100644
index 0000000000..11a40fc00e
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/multiline_vector.gd
@@ -0,0 +1,17 @@
+func test():
+ Vector2(
+ 1,
+ 2
+ )
+
+ Vector3(
+ 3,
+ 3.5,
+ 4, # Trailing comma should work.
+ )
+
+ Vector2i(1, 2,) # Trailing comma should work.
+
+ Vector3i(6,
+ 9,
+ 12)
diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_vector.out b/modules/gdscript/tests/scripts/parser/features/multiline_vector.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/multiline_vector.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_arithmetic.gd b/modules/gdscript/tests/scripts/parser/features/nested_arithmetic.gd
new file mode 100644
index 0000000000..b9bd19c9c5
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_arithmetic.gd
@@ -0,0 +1,22 @@
+func test():
+ print(+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++2.718)
+
+ print()
+
+ print(------------------------------------------------------------------2.718)
+ print(-------------------------------------------------------------------2.718)
+
+ print()
+
+ print(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~999)
+
+ print()
+
+ print(+-+-+-----+------------+++++++---++--++--+--+---+--++2.718)
+
+ print()
+
+ print(2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 / 2 / 2 / 2 / 2 / 2 / 2 / 2 / 2 / 2 / 2 / 2 / 2 / 2 / 2 / 2 / 2 / 2 / 0.444)
+ print(153023902390239 % 550 % 29 % 27 % 23 % 17)
+ print(2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 << 2 >> 2 >> 2 >> 2 >> 2 >> 2 >> 2 >> 2 >> 2 >> 2 >> 2 >> 2 >> 2 >> 2 >> 2 >> 2 >> 2 >> 2 >> 2)
+ print(8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8 ^ -8 ^ 8 ^ 8 ^ 8 ^ 8 ^ 8)
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_arithmetic.out b/modules/gdscript/tests/scripts/parser/features/nested_arithmetic.out
new file mode 100644
index 0000000000..048cfbdfae
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_arithmetic.out
@@ -0,0 +1,82 @@
+GDTEST_OK
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+>> WARNING
+>> Line: 19
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
+2.718
+
+2.718
+-2.718
+
+-1000
+
+-2.718
+
+36900.9009009009
+2
+8192
+-8
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_array.gd b/modules/gdscript/tests/scripts/parser/features/nested_array.gd
new file mode 100644
index 0000000000..3caef96391
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_array.gd
@@ -0,0 +1,5 @@
+func test():
+ var array = [[[[[[[[[[15]]]]]]]]]]
+ print(array[0][0][0][0][0][0][0][0])
+ print(array[0][0][0][0][0][0][0][0][0])
+ print(array[0][0][0][0][0][0][0][0][0][0])
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_array.out b/modules/gdscript/tests/scripts/parser/features/nested_array.out
new file mode 100644
index 0000000000..46c6ce3874
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_array.out
@@ -0,0 +1,4 @@
+GDTEST_OK
+[[15]]
+[15]
+15
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_dictionary.gd b/modules/gdscript/tests/scripts/parser/features/nested_dictionary.gd
new file mode 100644
index 0000000000..d67e142156
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_dictionary.gd
@@ -0,0 +1,6 @@
+func test():
+ var dictionary = {1: {2: {3: {4: {5: {6: {7: {8: {"key": "value"}}}}}}}}}
+ print(dictionary[1][2][3][4][5][6][7])
+ print(dictionary[1][2][3][4][5][6][7][8])
+ print(dictionary[1][2][3][4][5][6][7][8].key)
+ print(dictionary[1][2][3][4][5][6][7][8]["key"])
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_dictionary.out b/modules/gdscript/tests/scripts/parser/features/nested_dictionary.out
new file mode 100644
index 0000000000..4009160439
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_dictionary.out
@@ -0,0 +1,5 @@
+GDTEST_OK
+{8:{key:value}}
+{key:value}
+value
+value
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_function_calls.gd b/modules/gdscript/tests/scripts/parser/features/nested_function_calls.gd
new file mode 100644
index 0000000000..59cdc7d6c2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_function_calls.gd
@@ -0,0 +1,5 @@
+func foo(x):
+ return x + 1
+
+func test():
+ print(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(foo(0)))))))))))))))))))))))))
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_function_calls.out b/modules/gdscript/tests/scripts/parser/features/nested_function_calls.out
new file mode 100644
index 0000000000..28a6636a7b
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_function_calls.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+24
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_if.gd b/modules/gdscript/tests/scripts/parser/features/nested_if.gd
new file mode 100644
index 0000000000..7282d08497
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_if.gd
@@ -0,0 +1,57 @@
+func test():
+ # 20 levels of nesting (and then some).
+ if true:
+ print("1")
+ if true:
+ print("2")
+ if true:
+ print("3")
+ if true:
+ print("4")
+ if true:
+ print("5")
+ if true:
+ print("6")
+ if true:
+ print("7")
+ if true:
+ print("8")
+ if true:
+ print("9")
+ if true:
+ print("10")
+ if true:
+ print("11")
+ if true:
+ print("12")
+ if true:
+ print("13")
+ if true:
+ print("14")
+ if true:
+ print("15")
+ if true:
+ print("16")
+ if true:
+ print("17")
+ if true:
+ print("18")
+ if true:
+ print("19")
+ if true:
+ print("20")
+ if false:
+ print("End")
+ if true:
+ if true:
+ if true:
+ if true:
+ if true:
+ if true:
+ if true:
+ if true:
+ if true:
+ if true:
+ if true:
+ if true:
+ print("This won't be printed")
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_if.out b/modules/gdscript/tests/scripts/parser/features/nested_if.out
new file mode 100644
index 0000000000..c2d2e29a06
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_if.out
@@ -0,0 +1,21 @@
+GDTEST_OK
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_match.gd b/modules/gdscript/tests/scripts/parser/features/nested_match.gd
new file mode 100644
index 0000000000..aaddcc7e83
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_match.gd
@@ -0,0 +1,79 @@
+func test():
+ # 20 levels of nesting (and then some).
+ var number = 1234
+ match number:
+ 1234:
+ print("1")
+ match number:
+ 1234:
+ print("2")
+ match number:
+ 1234:
+ print("3")
+ continue
+ _:
+ print("Should also be printed")
+ match number:
+ 1234:
+ print("4")
+ match number:
+ _:
+ print("5")
+ match number:
+ false:
+ print("Should not be printed")
+ true:
+ print("Should not be printed")
+ "hello":
+ print("Should not be printed")
+ 1234:
+ print("6")
+ match number:
+ _:
+ print("7")
+ match number:
+ 1234:
+ print("8")
+ match number:
+ _:
+ print("9")
+ match number:
+ 1234:
+ print("10")
+ match number:
+ _:
+ print("11")
+ match number:
+ 1234:
+ print("12")
+ match number:
+ _:
+ print("13")
+ match number:
+ 1234:
+ print("14")
+ match number:
+ _:
+ print("15")
+ match number:
+ _:
+ print("16")
+ match number:
+ 1234:
+ print("17")
+ match number:
+ _:
+ print("18")
+ match number:
+ 1234:
+ print("19")
+ match number:
+ _:
+ print("20")
+ match number:
+ []:
+ print("Should not be printed")
+ _:
+ print("Should not be printed")
+ 5678:
+ print("Should not be printed either")
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_match.out b/modules/gdscript/tests/scripts/parser/features/nested_match.out
new file mode 100644
index 0000000000..651d76cc59
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_match.out
@@ -0,0 +1,22 @@
+GDTEST_OK
+1
+2
+3
+Should also be printed
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_parentheses.gd b/modules/gdscript/tests/scripts/parser/features/nested_parentheses.gd
new file mode 100644
index 0000000000..3fef73b9be
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_parentheses.gd
@@ -0,0 +1,65 @@
+func test():
+ (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((print("Hello world!"))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+
+ print(((((((((((((((((((((((((((((((((((((((((((((((((((((((((("Hello world 2!"))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+
+ print(
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (
+ (2)) + ((4))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
diff --git a/modules/gdscript/tests/scripts/parser/features/nested_parentheses.out b/modules/gdscript/tests/scripts/parser/features/nested_parentheses.out
new file mode 100644
index 0000000000..27221a56bb
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/nested_parentheses.out
@@ -0,0 +1,4 @@
+GDTEST_OK
+Hello world!
+Hello world 2!
+6
diff --git a/modules/gdscript/tests/scripts/parser/features/number_separators.gd b/modules/gdscript/tests/scripts/parser/features/number_separators.gd
new file mode 100644
index 0000000000..f5f5661cae
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/number_separators.gd
@@ -0,0 +1,12 @@
+func test():
+ # `_` can be used as a separator for numbers in GDScript.
+ # It can be placed anywhere in the number, except at the beginning.
+ # Currently, GDScript in the `master` branch only allows using one separator
+ # per number.
+ # Results are assigned to variables to avoid warnings.
+ var __ = 1_23
+ __ = 123_ # Trailing number separators are OK.
+ __ = 12_3
+ __ = 123_456
+ __ = 0x1234_5678
+ __ = 0b1001_0101
diff --git a/modules/gdscript/tests/scripts/parser/features/number_separators.out b/modules/gdscript/tests/scripts/parser/features/number_separators.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/number_separators.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/parser/features/operator_assign.gd b/modules/gdscript/tests/scripts/parser/features/operator_assign.gd
new file mode 100644
index 0000000000..b5f07675ca
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/operator_assign.gd
@@ -0,0 +1,8 @@
+func test():
+ var i = 0
+ i += 5
+ i -= 4
+ i *= 10
+ i %= 8
+ i /= 0.25
+ print(round(i))
diff --git a/modules/gdscript/tests/scripts/parser/features/operator_assign.out b/modules/gdscript/tests/scripts/parser/features/operator_assign.out
new file mode 100644
index 0000000000..b0cb63ef59
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/operator_assign.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+8
diff --git a/modules/gdscript/tests/scripts/parser/features/property_setter_getter.gd b/modules/gdscript/tests/scripts/parser/features/property_setter_getter.gd
new file mode 100644
index 0000000000..9e4b360fb2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/property_setter_getter.gd
@@ -0,0 +1,37 @@
+# 4.0+ replacement for `setget`:
+var _backing: int = 0
+var property:
+ get:
+ return _backing + 1000
+ set(value):
+ _backing = value - 1000
+
+
+func test():
+ print("Not using self:")
+ print(property)
+ print(_backing)
+ property = 5000
+ print(property)
+ print(_backing)
+ _backing = -50
+ print(property)
+ print(_backing)
+ property = 5000
+ print(property)
+ print(_backing)
+
+ # In Godot 4.0 and later, using `self` no longer makes a difference for
+ # getter/setter execution in GDScript.
+ print("Using self:")
+ print(self.property)
+ print(self._backing)
+ self.property = 5000
+ print(self.property)
+ print(self._backing)
+ self._backing = -50
+ print(self.property)
+ print(self._backing)
+ self.property = 5000
+ print(self.property)
+ print(self._backing)
diff --git a/modules/gdscript/tests/scripts/parser/features/property_setter_getter.out b/modules/gdscript/tests/scripts/parser/features/property_setter_getter.out
new file mode 100644
index 0000000000..560e0c3bd7
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/property_setter_getter.out
@@ -0,0 +1,19 @@
+GDTEST_OK
+Not using self:
+1000
+0
+5000
+4000
+950
+-50
+5000
+4000
+Using self:
+5000
+4000
+5000
+4000
+950
+-50
+5000
+4000
diff --git a/modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.gd b/modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.gd
index 08f2eedb2d..d50776c25c 100644
--- a/modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.gd
+++ b/modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.gd
@@ -1,2 +1,5 @@
func test():
- print("A"); print("B")
+ print("A"); print("B")
+
+ # Multiple semicolons and whitespace between them is also valid.
+ print("A"); ;;;;; ; print("B");;
diff --git a/modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.out b/modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.out
index fc03f3efe8..bd7f38f516 100644
--- a/modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.out
+++ b/modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.out
@@ -1,3 +1,5 @@
GDTEST_OK
A
B
+A
+B
diff --git a/modules/gdscript/tests/scripts/parser/features/semicolon_as_terminator.gd b/modules/gdscript/tests/scripts/parser/features/semicolon_as_terminator.gd
new file mode 100644
index 0000000000..0f4aebb459
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/semicolon_as_terminator.gd
@@ -0,0 +1,22 @@
+#GDTEST_OK
+
+func test():
+ a();
+ b();
+ c();
+ d();
+ e();
+
+func a(): print("a");
+
+func b(): print("b1"); print("b2")
+
+func c(): print("c1"); print("c2");
+
+func d():
+ print("d1");
+ print("d2")
+
+func e():
+ print("e1");
+ print("e2");
diff --git a/modules/gdscript/tests/scripts/parser/features/semicolon_as_terminator.out b/modules/gdscript/tests/scripts/parser/features/semicolon_as_terminator.out
new file mode 100644
index 0000000000..387cbd8fc2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/semicolon_as_terminator.out
@@ -0,0 +1,10 @@
+GDTEST_OK
+a
+b1
+b2
+c1
+c2
+d1
+d2
+e1
+e2
diff --git a/modules/gdscript/tests/scripts/parser/features/signal_declaration.gd b/modules/gdscript/tests/scripts/parser/features/signal_declaration.gd
new file mode 100644
index 0000000000..9ad98b78a8
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/signal_declaration.gd
@@ -0,0 +1,20 @@
+#GDTEST_OK
+
+# No parentheses.
+signal a
+
+# No parameters.
+signal b()
+
+# With paramters.
+signal c(a, b, c)
+
+# With parameters multiline.
+signal d(
+ a,
+ b,
+ c,
+)
+
+func test():
+ print("Ok")
diff --git a/modules/gdscript/tests/scripts/parser/features/signal_declaration.out b/modules/gdscript/tests/scripts/parser/features/signal_declaration.out
new file mode 100644
index 0000000000..0e9f482af4
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/signal_declaration.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+Ok
diff --git a/modules/gdscript/tests/scripts/parser/features/single_line_declaration.gd b/modules/gdscript/tests/scripts/parser/features/single_line_declaration.gd
new file mode 100644
index 0000000000..650500663b
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/single_line_declaration.gd
@@ -0,0 +1,11 @@
+#GDTEST_OK
+
+func test(): C.new().test("Ok"); test2()
+
+func test2(): print("Ok 2")
+
+class A: pass
+
+class B extends RefCounted: pass
+
+class C extends RefCounted: func test(x): print(x)
diff --git a/modules/gdscript/tests/scripts/parser/features/single_line_declaration.out b/modules/gdscript/tests/scripts/parser/features/single_line_declaration.out
new file mode 100644
index 0000000000..e021923dc2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/single_line_declaration.out
@@ -0,0 +1,3 @@
+GDTEST_OK
+Ok
+Ok 2
diff --git a/modules/gdscript/tests/scripts/parser/features/space_indentation.gd b/modules/gdscript/tests/scripts/parser/features/space_indentation.gd
new file mode 100644
index 0000000000..0a4887c199
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/space_indentation.gd
@@ -0,0 +1,4 @@
+func test():
+ # 2-space indentation should work, even though the GDScript style guide recommends tabs.
+ if true:
+ pass
diff --git a/modules/gdscript/tests/scripts/parser/features/space_indentation.out b/modules/gdscript/tests/scripts/parser/features/space_indentation.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/space_indentation.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/parser/features/static_typing.gd b/modules/gdscript/tests/scripts/parser/features/static_typing.gd
new file mode 100644
index 0000000000..d42632c82d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/static_typing.gd
@@ -0,0 +1,13 @@
+func test():
+ # The following lines are equivalent:
+ var _integer: int = 1
+ var _integer2 : int = 1
+ var _inferred := 1
+ var _inferred2 : = 1
+
+ # Type inference is automatic for constants.
+ const _INTEGER = 1
+ const _INTEGER_REDUNDANT_TYPED : int = 1
+ const _INTEGER_REDUNDANT_TYPED2 : int = 1
+ const _INTEGER_REDUNDANT_INFERRED := 1
+ const _INTEGER_REDUNDANT_INFERRED2 : = 1
diff --git a/modules/gdscript/tests/scripts/parser/features/static_typing.out b/modules/gdscript/tests/scripts/parser/features/static_typing.out
new file mode 100644
index 0000000000..92ce7bc0e0
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/static_typing.out
@@ -0,0 +1,21 @@
+GDTEST_OK
+>> WARNING
+>> Line: 9
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant '_INTEGER' is declared but never used in the block. If this is intended, prefix it with an underscore: '__INTEGER'
+>> WARNING
+>> Line: 10
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant '_INTEGER_REDUNDANT_TYPED' is declared but never used in the block. If this is intended, prefix it with an underscore: '__INTEGER_REDUNDANT_TYPED'
+>> WARNING
+>> Line: 11
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant '_INTEGER_REDUNDANT_TYPED2' is declared but never used in the block. If this is intended, prefix it with an underscore: '__INTEGER_REDUNDANT_TYPED2'
+>> WARNING
+>> Line: 12
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant '_INTEGER_REDUNDANT_INFERRED' is declared but never used in the block. If this is intended, prefix it with an underscore: '__INTEGER_REDUNDANT_INFERRED'
+>> WARNING
+>> Line: 13
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant '_INTEGER_REDUNDANT_INFERRED2' is declared but never used in the block. If this is intended, prefix it with an underscore: '__INTEGER_REDUNDANT_INFERRED2'
diff --git a/modules/gdscript/tests/scripts/parser/features/str_preserves_case.gd b/modules/gdscript/tests/scripts/parser/features/str_preserves_case.gd
new file mode 100644
index 0000000000..9e48a7f0da
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/str_preserves_case.gd
@@ -0,0 +1,7 @@
+func test():
+ var null_var = null
+ var true_var: bool = true
+ var false_var: bool = false
+ print(str(null_var))
+ print(str(true_var))
+ print(str(false_var))
diff --git a/modules/gdscript/tests/scripts/parser/features/str_preserves_case.out b/modules/gdscript/tests/scripts/parser/features/str_preserves_case.out
new file mode 100644
index 0000000000..abba38e87c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/str_preserves_case.out
@@ -0,0 +1,4 @@
+GDTEST_OK
+null
+true
+false
diff --git a/modules/gdscript/tests/scripts/parser/features/string_formatting.gd b/modules/gdscript/tests/scripts/parser/features/string_formatting.gd
new file mode 100644
index 0000000000..a91837145d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/string_formatting.gd
@@ -0,0 +1,18 @@
+func test():
+ print("hello %s" % "world" == "hello world")
+ print("hello %s" % true == "hello true")
+ print("hello %s" % false == "hello false")
+
+ print("hello %d" % 25 == "hello 25")
+ print("hello %d %d" % [25, 42] == "hello 25 42")
+ # Pad with spaces.
+ print("hello %3d" % 25 == "hello 25")
+ # Pad with zeroes.
+ print("hello %03d" % 25 == "hello 025")
+
+ print("hello %.02f" % 0.123456 == "hello 0.12")
+
+ # Dynamic padding:
+ # <https://docs.godotengine.org/en/stable/getting_started/scripting/gdscript/gdscript_format_string.html#dynamic-padding>
+ print("hello %*.*f" % [7, 3, 0.123456] == "hello 0.123")
+ print("hello %0*.*f" % [7, 3, 0.123456] == "hello 000.123")
diff --git a/modules/gdscript/tests/scripts/parser/features/string_formatting.out b/modules/gdscript/tests/scripts/parser/features/string_formatting.out
new file mode 100644
index 0000000000..7533f6ff54
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/string_formatting.out
@@ -0,0 +1,11 @@
+GDTEST_OK
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
diff --git a/modules/gdscript/tests/scripts/parser/features/super.gd b/modules/gdscript/tests/scripts/parser/features/super.gd
new file mode 100644
index 0000000000..f5ae2a74a7
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/super.gd
@@ -0,0 +1,60 @@
+class Say:
+ var prefix = "S"
+
+ func greet():
+ prefix = "S Greeted"
+ print("hello")
+
+ func say(name):
+ print(prefix, " say something ", name)
+
+
+class SayAnotherThing extends Say:
+ # This currently crashes the engine.
+ #var prefix = "SAT"
+
+ func greet():
+ prefix = "SAT Greeted"
+ print("hi")
+
+ func say(name):
+ print(prefix, " say another thing ", name)
+
+
+class SayNothing extends Say:
+ # This currently crashes the engine.
+ #var prefix = "SN"
+
+ func greet():
+ super()
+ prefix = "SN Greeted"
+ print("howdy, see above")
+
+ func greet_prefix_before_super():
+ prefix = "SN Greeted"
+ super.greet()
+ print("howdy, see above")
+
+ func say(name):
+ super(name + " super'd")
+ print(prefix, " say nothing... or not? ", name)
+
+
+func test():
+ var say = Say.new()
+ say.greet()
+ say.say("foo")
+ print()
+
+ var say_another_thing = SayAnotherThing.new()
+ say_another_thing.greet()
+ say_another_thing.say("bar")
+ print()
+
+ var say_nothing = SayNothing.new()
+ say_nothing.greet()
+ print(say_nothing.prefix)
+ say_nothing.greet_prefix_before_super()
+ print(say_nothing.prefix)
+ # This currently triggers a compiler bug: "compiler bug, function name not found"
+ #say_nothing.say("baz")
diff --git a/modules/gdscript/tests/scripts/parser/features/super.out b/modules/gdscript/tests/scripts/parser/features/super.out
new file mode 100644
index 0000000000..e0d4f4f098
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/super.out
@@ -0,0 +1,13 @@
+GDTEST_OK
+hello
+S Greeted say something foo
+
+hi
+SAT Greeted say another thing bar
+
+hello
+howdy, see above
+SN Greeted
+hello
+howdy, see above
+S Greeted
diff --git a/modules/gdscript/tests/scripts/parser/features/truthiness.gd b/modules/gdscript/tests/scripts/parser/features/truthiness.gd
new file mode 100644
index 0000000000..9c67a152f5
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/truthiness.gd
@@ -0,0 +1,30 @@
+func test():
+ # The assertions below should all evaluate to `true` for this test to pass.
+ assert(true)
+ assert(not false)
+ assert(500)
+ assert(not 0)
+ assert(500.5)
+ assert(not 0.0)
+ assert("non-empty string")
+ assert(["non-empty array"])
+ assert({"non-empty": "dictionary"})
+ assert(Vector2(1, 0))
+ assert(Vector2i(-1, -1))
+ assert(Vector3(0, 0, 0.0001))
+ assert(Vector3i(0, 0, 10000))
+
+ # Zero position is `true` only if the Rect2's size is non-zero.
+ assert(Rect2(0, 0, 0, 1))
+
+ # Zero size is `true` only if the position is non-zero.
+ assert(Rect2(1, 1, 0, 0))
+
+ # Zero position is `true` only if the Rect2's size is non-zero.
+ assert(Rect2i(0, 0, 0, 1))
+
+ # Zero size is `true` only if the position is non-zero.
+ assert(Rect2i(1, 1, 0, 0))
+
+ # A fully black color is only truthy if its alpha component is not equal to `1`.
+ assert(Color(0, 0, 0, 0.5))
diff --git a/modules/gdscript/tests/scripts/parser/features/truthiness.out b/modules/gdscript/tests/scripts/parser/features/truthiness.out
new file mode 100644
index 0000000000..705524857b
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/truthiness.out
@@ -0,0 +1,65 @@
+GDTEST_OK
+>> WARNING
+>> Line: 3
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 4
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 5
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 6
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 7
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 8
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 9
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 12
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 13
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 14
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 15
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 18
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 21
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 24
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 27
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 30
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
diff --git a/modules/gdscript/tests/scripts/parser/features/typed_arrays.gd b/modules/gdscript/tests/scripts/parser/features/typed_arrays.gd
new file mode 100644
index 0000000000..21bf3fdfcf
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/typed_arrays.gd
@@ -0,0 +1,5 @@
+func test():
+ var my_array: Array[int] = [1, 2, 3]
+ var inferred_array := [1, 2, 3] # This is Array[int].
+ print(my_array)
+ print(inferred_array)
diff --git a/modules/gdscript/tests/scripts/parser/features/typed_arrays.out b/modules/gdscript/tests/scripts/parser/features/typed_arrays.out
new file mode 100644
index 0000000000..953d54d5e0
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/typed_arrays.out
@@ -0,0 +1,3 @@
+GDTEST_OK
+[1, 2, 3]
+[1, 2, 3]
diff --git a/modules/gdscript/tests/scripts/parser/features/variable_declaration.gd b/modules/gdscript/tests/scripts/parser/features/variable_declaration.gd
index 3b48f10ca7..65013c4301 100644
--- a/modules/gdscript/tests/scripts/parser/features/variable_declaration.gd
+++ b/modules/gdscript/tests/scripts/parser/features/variable_declaration.gd
@@ -1,12 +1,20 @@
-var a # No init.
-var b = 42 # Init.
+var m1 # No init.
+var m2 = 22 # Init.
+var m3: String # No init, typed.
+var m4: String = "44" # Init, typed.
+
func test():
- var c # No init, local.
- var d = 23 # Init, local.
+ var loc5 # No init, local.
+ var loc6 = 66 # Init, local.
+ var loc7: String # No init, typed.
+ var loc8: String = "88" # Init, typed.
+
+ m1 = 11
+ m3 = "33"
- a = 1
- c = 2
+ loc5 = 55
+ loc7 = "77"
- prints(a, b, c, d)
+ prints(m1, m2, m3, m4, loc5, loc6, loc7, loc8)
print("OK")
diff --git a/modules/gdscript/tests/scripts/parser/features/variable_declaration.out b/modules/gdscript/tests/scripts/parser/features/variable_declaration.out
index 2e0a63c024..7817dd3169 100644
--- a/modules/gdscript/tests/scripts/parser/features/variable_declaration.out
+++ b/modules/gdscript/tests/scripts/parser/features/variable_declaration.out
@@ -1,7 +1,3 @@
GDTEST_OK
->> WARNING
->> Line: 5
->> UNASSIGNED_VARIABLE
->> The variable 'c' was used but never assigned a value.
-1 42 2 23
+11 22 33 44 55 66 77 88
OK
diff --git a/modules/gdscript/tests/scripts/parser/features/while.gd b/modules/gdscript/tests/scripts/parser/features/while.gd
new file mode 100644
index 0000000000..17dd4fbad2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/while.gd
@@ -0,0 +1,5 @@
+func test():
+ var i = 0
+ while i < 5:
+ print(i)
+ i += 1
diff --git a/modules/gdscript/tests/scripts/parser/features/while.out b/modules/gdscript/tests/scripts/parser/features/while.out
new file mode 100644
index 0000000000..b4a50885c7
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/while.out
@@ -0,0 +1,6 @@
+GDTEST_OK
+0
+1
+2
+3
+4
diff --git a/modules/gdscript/tests/scripts/parser/warnings/assert_always_true.gd b/modules/gdscript/tests/scripts/parser/warnings/assert_always_true.gd
new file mode 100644
index 0000000000..8feaed899f
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/assert_always_true.gd
@@ -0,0 +1,5 @@
+func test():
+ # These statements always evaluate to `true`, and therefore emit a warning.
+ assert(true)
+ assert(-1.234)
+ assert(2 + 3 == 5)
diff --git a/modules/gdscript/tests/scripts/parser/warnings/assert_always_true.out b/modules/gdscript/tests/scripts/parser/warnings/assert_always_true.out
new file mode 100644
index 0000000000..5132792cb7
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/assert_always_true.out
@@ -0,0 +1,13 @@
+GDTEST_OK
+>> WARNING
+>> Line: 3
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 4
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
+>> WARNING
+>> Line: 5
+>> ASSERT_ALWAYS_TRUE
+>> Assert statement is redundant because the expression is always true.
diff --git a/modules/gdscript/tests/scripts/parser/warnings/deprecated_operators.gd b/modules/gdscript/tests/scripts/parser/warnings/deprecated_operators.gd
new file mode 100644
index 0000000000..f72b10213f
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/deprecated_operators.gd
@@ -0,0 +1,8 @@
+func test():
+ # `and` should be used instead.
+ if true && true:
+ pass
+
+ # `or` should be used instead.
+ if false || true:
+ pass
diff --git a/modules/gdscript/tests/scripts/parser/warnings/deprecated_operators.out b/modules/gdscript/tests/scripts/parser/warnings/deprecated_operators.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/deprecated_operators.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.gd b/modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.gd
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.gd
@@ -0,0 +1 @@
+
diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.out b/modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.out
new file mode 100644
index 0000000000..20eec212ba
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file.notest.out
@@ -0,0 +1,4 @@
+>> WARNING
+>> Line: 1
+>> EMPTY_FILE
+>> Empty script file.
diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.gd b/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.gd
new file mode 100644
index 0000000000..15cd95ff2b
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.gd
@@ -0,0 +1 @@
+#a comment
diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.out b/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.out
new file mode 100644
index 0000000000..20eec212ba
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file_comment.notest.out
@@ -0,0 +1,4 @@
+>> WARNING
+>> Line: 1
+>> EMPTY_FILE
+>> Empty script file.
diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.gd b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.gd
new file mode 100644
index 0000000000..b28b04f643
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.gd
@@ -0,0 +1,3 @@
+
+
+
diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.out b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.out
new file mode 100644
index 0000000000..20eec212ba
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline.notest.out
@@ -0,0 +1,4 @@
+>> WARNING
+>> Line: 1
+>> EMPTY_FILE
+>> Empty script file.
diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.gd b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.gd
new file mode 100644
index 0000000000..ecdba44d21
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.gd
@@ -0,0 +1,4 @@
+#a comment, followed by a bunch of newlines
+
+
+
diff --git a/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.out b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.out
new file mode 100644
index 0000000000..20eec212ba
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment.notest.out
@@ -0,0 +1,4 @@
+>> WARNING
+>> Line: 1
+>> EMPTY_FILE
+>> Empty script file.
diff --git a/modules/gdscript/tests/scripts/parser/warnings/incompatible_ternary.gd b/modules/gdscript/tests/scripts/parser/warnings/incompatible_ternary.gd
new file mode 100644
index 0000000000..a93ecb66b1
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/incompatible_ternary.gd
@@ -0,0 +1,8 @@
+func test():
+ # The ternary operator below returns values of different types and the
+ # result is assigned to a typed variable. This will cause a run-time error
+ # if the branch with the incompatible type is picked. Here, it won't happen
+ # since the `false` condition never evaluates to `true`. Instead, a warning
+ # will be emitted.
+ var __: int = 25
+ __ = "hello" if false else -2
diff --git a/modules/gdscript/tests/scripts/parser/warnings/incompatible_ternary.out b/modules/gdscript/tests/scripts/parser/warnings/incompatible_ternary.out
new file mode 100644
index 0000000000..7d1558c6fc
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/incompatible_ternary.out
@@ -0,0 +1,5 @@
+GDTEST_OK
+>> WARNING
+>> Line: 8
+>> INCOMPATIBLE_TERNARY
+>> Values of the ternary conditional are not mutually compatible.
diff --git a/modules/gdscript/tests/scripts/parser/warnings/integer_division.gd b/modules/gdscript/tests/scripts/parser/warnings/integer_division.gd
new file mode 100644
index 0000000000..6117425528
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/integer_division.gd
@@ -0,0 +1,10 @@
+func test():
+ # This should emit a warning.
+ var __ = 5 / 2
+
+ # These should not emit warnings.
+ __ = float(5) / 2
+ __ = 5 / float(2)
+ __ = 5.0 / 2
+ __ = 5 / 2.0
+ __ = 5.0 / 2.0
diff --git a/modules/gdscript/tests/scripts/parser/warnings/integer_division.out b/modules/gdscript/tests/scripts/parser/warnings/integer_division.out
new file mode 100644
index 0000000000..40eb63ffcb
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/integer_division.out
@@ -0,0 +1,5 @@
+GDTEST_OK
+>> WARNING
+>> Line: 3
+>> INTEGER_DIVISION
+>> Integer division, decimal part will be discarded.
diff --git a/modules/gdscript/tests/scripts/parser/warnings/match_default_not_at_end.gd b/modules/gdscript/tests/scripts/parser/warnings/match_default_not_at_end.gd
new file mode 100644
index 0000000000..1eb54059dd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/match_default_not_at_end.gd
@@ -0,0 +1,9 @@
+func test():
+ var i = 25
+ # The default branch (`_`) should be at the end of the `match` statement.
+ # Otherwise, a warning will be emitted
+ match i:
+ _:
+ print("default")
+ 25:
+ print("is 25")
diff --git a/modules/gdscript/tests/scripts/parser/warnings/match_default_not_at_end.out b/modules/gdscript/tests/scripts/parser/warnings/match_default_not_at_end.out
new file mode 100644
index 0000000000..8630fab420
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/match_default_not_at_end.out
@@ -0,0 +1,6 @@
+GDTEST_OK
+>> WARNING
+>> Line: 8
+>> UNREACHABLE_PATTERN
+>> Unreachable pattern (pattern after wildcard or bind).
+default
diff --git a/modules/gdscript/tests/scripts/parser/warnings/narrowing_conversion.gd b/modules/gdscript/tests/scripts/parser/warnings/narrowing_conversion.gd
new file mode 100644
index 0000000000..954e697145
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/narrowing_conversion.gd
@@ -0,0 +1,5 @@
+func i_accept_ints_only(_i: int):
+ pass
+
+func test():
+ i_accept_ints_only(12.345)
diff --git a/modules/gdscript/tests/scripts/parser/warnings/narrowing_conversion.out b/modules/gdscript/tests/scripts/parser/warnings/narrowing_conversion.out
new file mode 100644
index 0000000000..6fb592117b
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/narrowing_conversion.out
@@ -0,0 +1,5 @@
+GDTEST_OK
+>> WARNING
+>> Line: 5
+>> NARROWING_CONVERSION
+>> Narrowing conversion (float is converted to int and loses precision).
diff --git a/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.gd b/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.gd
new file mode 100644
index 0000000000..00598e4d50
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.gd
@@ -0,0 +1,6 @@
+func i_return_int() -> int:
+ return 4
+
+
+func test():
+ i_return_int()
diff --git a/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out b/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/return_value_discarded.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/parser/warnings/shadowed_constant.gd b/modules/gdscript/tests/scripts/parser/warnings/shadowed_constant.gd
new file mode 100644
index 0000000000..d565d38365
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/shadowed_constant.gd
@@ -0,0 +1,8 @@
+# See also `parser-errors/redefine-class-constant.gd`.
+const TEST = 25
+
+
+func test():
+ # Warning here. This is not an error because a new constant is created,
+ # rather than attempting to set the value of an existing constant.
+ const TEST = 50
diff --git a/modules/gdscript/tests/scripts/parser/warnings/shadowed_constant.out b/modules/gdscript/tests/scripts/parser/warnings/shadowed_constant.out
new file mode 100644
index 0000000000..9c9417e11d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/shadowed_constant.out
@@ -0,0 +1,9 @@
+GDTEST_OK
+>> WARNING
+>> Line: 8
+>> UNUSED_LOCAL_CONSTANT
+>> The local constant 'TEST' is declared but never used in the block. If this is intended, prefix it with an underscore: '_TEST'
+>> WARNING
+>> Line: 8
+>> SHADOWED_VARIABLE
+>> The local constant "TEST" is shadowing an already-declared constant at line 2.
diff --git a/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_class.gd b/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_class.gd
new file mode 100644
index 0000000000..66dcf309e8
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_class.gd
@@ -0,0 +1,8 @@
+var foo = 123
+
+
+func test():
+ # Notice the `var` keyword. Without this keyword, no warning would be emitted
+ # because no new variable would be created. Instead, the class variable's value
+ # would be overwritten.
+ var foo = 456
diff --git a/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_class.out b/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_class.out
new file mode 100644
index 0000000000..82e467b368
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_class.out
@@ -0,0 +1,9 @@
+GDTEST_OK
+>> WARNING
+>> Line: 8
+>> UNUSED_VARIABLE
+>> The local variable 'foo' is declared but never used in the block. If this is intended, prefix it with an underscore: '_foo'
+>> WARNING
+>> Line: 8
+>> SHADOWED_VARIABLE
+>> The local variable "foo" is shadowing an already-declared variable at line 1.
diff --git a/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_function.gd b/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_function.gd
new file mode 100644
index 0000000000..2c55d68be8
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_function.gd
@@ -0,0 +1,2 @@
+func test():
+ var test = "This variable has the same name as the test() function."
diff --git a/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_function.out b/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_function.out
new file mode 100644
index 0000000000..26ce0465b1
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/shadowed_variable_function.out
@@ -0,0 +1,9 @@
+GDTEST_OK
+>> WARNING
+>> Line: 2
+>> UNUSED_VARIABLE
+>> The local variable 'test' is declared but never used in the block. If this is intended, prefix it with an underscore: '_test'
+>> WARNING
+>> Line: 2
+>> SHADOWED_VARIABLE
+>> The local variable "test" is shadowing an already-declared function at line 1.
diff --git a/modules/gdscript/tests/scripts/parser/warnings/standalone_expression.gd b/modules/gdscript/tests/scripts/parser/warnings/standalone_expression.gd
new file mode 100644
index 0000000000..18ea260fa2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/standalone_expression.gd
@@ -0,0 +1,9 @@
+func test():
+ # The following statements should all be reported as standalone expressions:
+ "This is a standalone expression"
+ 1234
+ 0.0 + 0.0
+ Color(1, 1, 1)
+ Vector3.ZERO
+ [true, false]
+ float(125)
diff --git a/modules/gdscript/tests/scripts/parser/warnings/standalone_expression.out b/modules/gdscript/tests/scripts/parser/warnings/standalone_expression.out
new file mode 100644
index 0000000000..99ec87438e
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/standalone_expression.out
@@ -0,0 +1,21 @@
+GDTEST_OK
+>> WARNING
+>> Line: 3
+>> STANDALONE_EXPRESSION
+>> Standalone expression (the line has no effect).
+>> WARNING
+>> Line: 4
+>> STANDALONE_EXPRESSION
+>> Standalone expression (the line has no effect).
+>> WARNING
+>> Line: 5
+>> STANDALONE_EXPRESSION
+>> Standalone expression (the line has no effect).
+>> WARNING
+>> Line: 7
+>> STANDALONE_EXPRESSION
+>> Standalone expression (the line has no effect).
+>> WARNING
+>> Line: 8
+>> STANDALONE_EXPRESSION
+>> Standalone expression (the line has no effect).
diff --git a/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable.gd b/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable.gd
new file mode 100644
index 0000000000..afb5059eea
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable.gd
@@ -0,0 +1,2 @@
+func test():
+ var __
diff --git a/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable.out b/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable.out
new file mode 100644
index 0000000000..cf14502e9a
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable.out
@@ -0,0 +1,5 @@
+GDTEST_OK
+>> WARNING
+>> Line: 2
+>> UNASSIGNED_VARIABLE
+>> The variable '__' was used but never assigned a value.
diff --git a/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable_op_assign.gd b/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable_op_assign.gd
new file mode 100644
index 0000000000..d77791f4c5
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable_op_assign.gd
@@ -0,0 +1,4 @@
+func test():
+ var __: int
+ # Variable has no set value at this point (even though it's implicitly `0` here).
+ __ += 15
diff --git a/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable_op_assign.out b/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable_op_assign.out
new file mode 100644
index 0000000000..ba55a4e0f8
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/unassigned_variable_op_assign.out
@@ -0,0 +1,5 @@
+GDTEST_OK
+>> WARNING
+>> Line: 4
+>> UNASSIGNED_VARIABLE_OP_ASSIGN
+>> Using assignment with operation but the variable '__' was not previously assigned a value.
diff --git a/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return.gd b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return.gd
new file mode 100644
index 0000000000..3311f342ab
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return.gd
@@ -0,0 +1,7 @@
+func test():
+ var i = 25
+
+ return
+
+ # This will never be run due to the `return` statement above.
+ print(i)
diff --git a/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return.out b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return.out
new file mode 100644
index 0000000000..9316abd5eb
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/unreachable_code_after_return.out
@@ -0,0 +1,5 @@
+GDTEST_OK
+>> WARNING
+>> Line: 7
+>> UNREACHABLE_CODE
+>> Unreachable code (statement after return) in function 'test()'.
diff --git a/modules/gdscript/tests/scripts/parser/warnings/unused_argument.gd b/modules/gdscript/tests/scripts/parser/warnings/unused_argument.gd
new file mode 100644
index 0000000000..e6e24dc6f2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/unused_argument.gd
@@ -0,0 +1,12 @@
+# This should emit a warning since the unused argument is not prefixed with an underscore.
+func function_with_unused_argument(p_arg1, p_arg2):
+ print(p_arg1)
+
+
+# This shouldn't emit a warning since the unused argument is prefixed with an underscore.
+func function_with_ignored_unused_argument(p_arg1, _p_arg2):
+ print(p_arg1)
+
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/parser/warnings/unused_argument.out b/modules/gdscript/tests/scripts/parser/warnings/unused_argument.out
new file mode 100644
index 0000000000..92f3308f85
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/unused_argument.out
@@ -0,0 +1,5 @@
+GDTEST_OK
+>> WARNING
+>> Line: 2
+>> UNUSED_PARAMETER
+>> The parameter 'p_arg2' is never used in the function 'function_with_unused_argument'. If this is intended, prefix it with an underscore: '_p_arg2'
diff --git a/modules/gdscript/tests/scripts/parser/warnings/unused_variable.gd b/modules/gdscript/tests/scripts/parser/warnings/unused_variable.gd
index 68e3bd424f..013a2e4beb 100644
--- a/modules/gdscript/tests/scripts/parser/warnings/unused_variable.gd
+++ b/modules/gdscript/tests/scripts/parser/warnings/unused_variable.gd
@@ -1,2 +1,4 @@
func test():
- var unused = "not used"
+ var unused = "not used"
+
+ var _unused = "not used, but no warning since the variable name starts with an underscore"
diff --git a/modules/gdscript/tests/scripts/parser/warnings/void_assignment.gd b/modules/gdscript/tests/scripts/parser/warnings/void_assignment.gd
new file mode 100644
index 0000000000..b4a42b3e3d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/void_assignment.gd
@@ -0,0 +1,6 @@
+func i_return_void() -> void:
+ return
+
+
+func test():
+ var __ = i_return_void()
diff --git a/modules/gdscript/tests/scripts/parser/warnings/void_assignment.out b/modules/gdscript/tests/scripts/parser/warnings/void_assignment.out
new file mode 100644
index 0000000000..84c9598f9a
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/warnings/void_assignment.out
@@ -0,0 +1,5 @@
+GDTEST_OK
+>> WARNING
+>> Line: 6
+>> VOID_ASSIGNMENT
+>> Assignment operation, but the function 'i_return_void()' returns void.
diff --git a/modules/gdscript/tests/scripts/runtime/features/compare-builtin-equals-null.gd b/modules/gdscript/tests/scripts/runtime/features/compare-builtin-equals-null.gd
new file mode 100644
index 0000000000..c6645c2c34
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/compare-builtin-equals-null.gd
@@ -0,0 +1,138 @@
+func test():
+ var value
+
+ # null
+ value = null
+ print(value == null)
+
+ # bool
+ value = false
+ print(value == null)
+
+ # int
+ value = 0
+ print(value == null)
+
+ # float
+ value = 0.0
+ print(value == null)
+
+ # String
+ value = ""
+ print(value == null)
+
+ # Vector2
+ value = Vector2()
+ print(value == null)
+
+ # Vector2i
+ value = Vector2i()
+ print(value == null)
+
+ # Rect2
+ value = Rect2()
+ print(value == null)
+
+ # Rect2i
+ value = Rect2i()
+ print(value == null)
+
+ # Vector3
+ value = Vector3()
+ print(value == null)
+
+ # Vector3i
+ value = Vector3i()
+ print(value == null)
+
+ # Transform2D
+ value = Transform2D()
+ print(value == null)
+
+ # Plane
+ value = Plane()
+ print(value == null)
+
+ # Quaternion
+ value = Quaternion()
+ print(value == null)
+
+ # AABB
+ value = AABB()
+ print(value == null)
+
+ # Basis
+ value = Basis()
+ print(value == null)
+
+ # Transform3D
+ value = Transform3D()
+ print(value == null)
+
+ # Color
+ value = Color()
+ print(value == null)
+
+ # StringName
+ value = &""
+ print(value == null)
+
+ # NodePath
+ value = ^""
+ print(value == null)
+
+ # RID
+ value = RID()
+ print(value == null)
+
+ # Callable
+ value = Callable()
+ print(value == null)
+
+ # Signal
+ value = Signal()
+ print(value == null)
+
+ # Dictionary
+ value = {}
+ print(value == null)
+
+ # Array
+ value = []
+ print(value == null)
+
+ # PackedByteArray
+ value = PackedByteArray()
+ print(value == null)
+
+ # PackedInt32Array
+ value = PackedInt32Array()
+ print(value == null)
+
+ # PackedInt64Array
+ value = PackedInt64Array()
+ print(value == null)
+
+ # PackedFloat32Array
+ value = PackedFloat32Array()
+ print(value == null)
+
+ # PackedFloat64Array
+ value = PackedFloat64Array()
+ print(value == null)
+
+ # PackedStringArray
+ value = PackedStringArray()
+ print(value == null)
+
+ # PackedVector2Array
+ value = PackedVector2Array()
+ print(value == null)
+
+ # PackedVector3Array
+ value = PackedVector3Array()
+ print(value == null)
+
+ # PackedColorArray
+ value = PackedColorArray()
+ print(value == null)
diff --git a/modules/gdscript/tests/scripts/runtime/features/compare-builtin-equals-null.out b/modules/gdscript/tests/scripts/runtime/features/compare-builtin-equals-null.out
new file mode 100644
index 0000000000..639f6027b9
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/compare-builtin-equals-null.out
@@ -0,0 +1,35 @@
+GDTEST_OK
+true
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
diff --git a/modules/gdscript/tests/scripts/runtime/features/compare-builtin-not-equals-null.gd b/modules/gdscript/tests/scripts/runtime/features/compare-builtin-not-equals-null.gd
new file mode 100644
index 0000000000..ee622bf22f
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/compare-builtin-not-equals-null.gd
@@ -0,0 +1,138 @@
+func test():
+ var value
+
+ # null
+ value = null
+ print(value != null)
+
+ # bool
+ value = false
+ print(value != null)
+
+ # int
+ value = 0
+ print(value != null)
+
+ # float
+ value = 0.0
+ print(value != null)
+
+ # String
+ value = ""
+ print(value != null)
+
+ # Vector2
+ value = Vector2()
+ print(value != null)
+
+ # Vector2i
+ value = Vector2i()
+ print(value != null)
+
+ # Rect2
+ value = Rect2()
+ print(value != null)
+
+ # Rect2i
+ value = Rect2i()
+ print(value != null)
+
+ # Vector3
+ value = Vector3()
+ print(value != null)
+
+ # Vector3i
+ value = Vector3i()
+ print(value != null)
+
+ # Transform2D
+ value = Transform2D()
+ print(value != null)
+
+ # Plane
+ value = Plane()
+ print(value != null)
+
+ # Quaternion
+ value = Quaternion()
+ print(value != null)
+
+ # AABB
+ value = AABB()
+ print(value != null)
+
+ # Basis
+ value = Basis()
+ print(value != null)
+
+ # Transform3D
+ value = Transform3D()
+ print(value != null)
+
+ # Color
+ value = Color()
+ print(value != null)
+
+ # StringName
+ value = &""
+ print(value != null)
+
+ # NodePath
+ value = ^""
+ print(value != null)
+
+ # RID
+ value = RID()
+ print(value != null)
+
+ # Callable
+ value = Callable()
+ print(value != null)
+
+ # Signal
+ value = Signal()
+ print(value != null)
+
+ # Dictionary
+ value = {}
+ print(value != null)
+
+ # Array
+ value = []
+ print(value != null)
+
+ # PackedByteArray
+ value = PackedByteArray()
+ print(value != null)
+
+ # PackedInt32Array
+ value = PackedInt32Array()
+ print(value != null)
+
+ # PackedInt64Array
+ value = PackedInt64Array()
+ print(value != null)
+
+ # PackedFloat32Array
+ value = PackedFloat32Array()
+ print(value != null)
+
+ # PackedFloat64Array
+ value = PackedFloat64Array()
+ print(value != null)
+
+ # PackedStringArray
+ value = PackedStringArray()
+ print(value != null)
+
+ # PackedVector2Array
+ value = PackedVector2Array()
+ print(value != null)
+
+ # PackedVector3Array
+ value = PackedVector3Array()
+ print(value != null)
+
+ # PackedColorArray
+ value = PackedColorArray()
+ print(value != null)
diff --git a/modules/gdscript/tests/scripts/runtime/features/compare-builtin-not-equals-null.out b/modules/gdscript/tests/scripts/runtime/features/compare-builtin-not-equals-null.out
new file mode 100644
index 0000000000..d1e332afba
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/compare-builtin-not-equals-null.out
@@ -0,0 +1,35 @@
+GDTEST_OK
+false
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
diff --git a/modules/gdscript/tests/scripts/runtime/features/compare-null-equals-builtin.gd b/modules/gdscript/tests/scripts/runtime/features/compare-null-equals-builtin.gd
new file mode 100644
index 0000000000..7649062fda
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/compare-null-equals-builtin.gd
@@ -0,0 +1,138 @@
+func test():
+ var value
+
+ # null
+ value = null
+ print(null == value)
+
+ # bool
+ value = false
+ print(null == value)
+
+ # int
+ value = 0
+ print(null == value)
+
+ # float
+ value = 0.0
+ print(null == value)
+
+ # String
+ value = ""
+ print(null == value)
+
+ # Vector2
+ value = Vector2()
+ print(null == value)
+
+ # Vector2i
+ value = Vector2i()
+ print(null == value)
+
+ # Rect2
+ value = Rect2()
+ print(null == value)
+
+ # Rect2i
+ value = Rect2i()
+ print(null == value)
+
+ # Vector3
+ value = Vector3()
+ print(null == value)
+
+ # Vector3i
+ value = Vector3i()
+ print(null == value)
+
+ # Transform2D
+ value = Transform2D()
+ print(null == value)
+
+ # Plane
+ value = Plane()
+ print(null == value)
+
+ # Quaternion
+ value = Quaternion()
+ print(null == value)
+
+ # AABB
+ value = AABB()
+ print(null == value)
+
+ # Basis
+ value = Basis()
+ print(null == value)
+
+ # Transform3D
+ value = Transform3D()
+ print(null == value)
+
+ # Color
+ value = Color()
+ print(null == value)
+
+ # StringName
+ value = &""
+ print(null == value)
+
+ # NodePath
+ value = ^""
+ print(null == value)
+
+ # RID
+ value = RID()
+ print(null == value)
+
+ # Callable
+ value = Callable()
+ print(null == value)
+
+ # Signal
+ value = Signal()
+ print(null == value)
+
+ # Dictionary
+ value = {}
+ print(null == value)
+
+ # Array
+ value = []
+ print(null == value)
+
+ # PackedByteArray
+ value = PackedByteArray()
+ print(null == value)
+
+ # PackedInt32Array
+ value = PackedInt32Array()
+ print(null == value)
+
+ # PackedInt64Array
+ value = PackedInt64Array()
+ print(null == value)
+
+ # PackedFloat32Array
+ value = PackedFloat32Array()
+ print(null == value)
+
+ # PackedFloat64Array
+ value = PackedFloat64Array()
+ print(null == value)
+
+ # PackedStringArray
+ value = PackedStringArray()
+ print(null == value)
+
+ # PackedVector2Array
+ value = PackedVector2Array()
+ print(null == value)
+
+ # PackedVector3Array
+ value = PackedVector3Array()
+ print(null == value)
+
+ # PackedColorArray
+ value = PackedColorArray()
+ print(null == value)
diff --git a/modules/gdscript/tests/scripts/runtime/features/compare-null-equals-builtin.out b/modules/gdscript/tests/scripts/runtime/features/compare-null-equals-builtin.out
new file mode 100644
index 0000000000..639f6027b9
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/compare-null-equals-builtin.out
@@ -0,0 +1,35 @@
+GDTEST_OK
+true
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
diff --git a/modules/gdscript/tests/scripts/runtime/features/compare-null-not-equals-builtin.gd b/modules/gdscript/tests/scripts/runtime/features/compare-null-not-equals-builtin.gd
new file mode 100644
index 0000000000..8d5f9df1b8
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/compare-null-not-equals-builtin.gd
@@ -0,0 +1,138 @@
+func test():
+ var value
+
+ # null
+ value = null
+ print(null != value)
+
+ # bool
+ value = false
+ print(null != value)
+
+ # int
+ value = 0
+ print(null != value)
+
+ # float
+ value = 0.0
+ print(null != value)
+
+ # String
+ value = ""
+ print(null != value)
+
+ # Vector2
+ value = Vector2()
+ print(null != value)
+
+ # Vector2i
+ value = Vector2i()
+ print(null != value)
+
+ # Rect2
+ value = Rect2()
+ print(null != value)
+
+ # Rect2i
+ value = Rect2i()
+ print(null != value)
+
+ # Vector3
+ value = Vector3()
+ print(null != value)
+
+ # Vector3i
+ value = Vector3i()
+ print(null != value)
+
+ # Transform2D
+ value = Transform2D()
+ print(null != value)
+
+ # Plane
+ value = Plane()
+ print(null != value)
+
+ # Quaternion
+ value = Quaternion()
+ print(null != value)
+
+ # AABB
+ value = AABB()
+ print(null != value)
+
+ # Basis
+ value = Basis()
+ print(null != value)
+
+ # Transform3D
+ value = Transform3D()
+ print(null != value)
+
+ # Color
+ value = Color()
+ print(null != value)
+
+ # StringName
+ value = &""
+ print(null != value)
+
+ # NodePath
+ value = ^""
+ print(null != value)
+
+ # RID
+ value = RID()
+ print(null != value)
+
+ # Callable
+ value = Callable()
+ print(null != value)
+
+ # Signal
+ value = Signal()
+ print(null != value)
+
+ # Dictionary
+ value = {}
+ print(null != value)
+
+ # Array
+ value = []
+ print(null != value)
+
+ # PackedByteArray
+ value = PackedByteArray()
+ print(null != value)
+
+ # PackedInt32Array
+ value = PackedInt32Array()
+ print(null != value)
+
+ # PackedInt64Array
+ value = PackedInt64Array()
+ print(null != value)
+
+ # PackedFloat32Array
+ value = PackedFloat32Array()
+ print(null != value)
+
+ # PackedFloat64Array
+ value = PackedFloat64Array()
+ print(null != value)
+
+ # PackedStringArray
+ value = PackedStringArray()
+ print(null != value)
+
+ # PackedVector2Array
+ value = PackedVector2Array()
+ print(null != value)
+
+ # PackedVector3Array
+ value = PackedVector3Array()
+ print(null != value)
+
+ # PackedColorArray
+ value = PackedColorArray()
+ print(null != value)
diff --git a/modules/gdscript/tests/scripts/runtime/features/compare-null-not-equals-builtin.out b/modules/gdscript/tests/scripts/runtime/features/compare-null-not-equals-builtin.out
new file mode 100644
index 0000000000..d1e332afba
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/compare-null-not-equals-builtin.out
@@ -0,0 +1,35 @@
+GDTEST_OK
+false
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
+true
diff --git a/modules/gdscript/tests/scripts/runtime/features/property_with_operator_assignment.gd b/modules/gdscript/tests/scripts/runtime/features/property_with_operator_assignment.gd
new file mode 100644
index 0000000000..3eb02816ed
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/property_with_operator_assignment.gd
@@ -0,0 +1,11 @@
+#GDTEST_OK
+var prop : int = 0:
+ get:
+ return prop
+ set(value):
+ prop = value % 7
+
+func test():
+ for i in 7:
+ prop += 1
+ print(prop)
diff --git a/modules/gdscript/tests/scripts/runtime/features/property_with_operator_assignment.out b/modules/gdscript/tests/scripts/runtime/features/property_with_operator_assignment.out
new file mode 100644
index 0000000000..76157853f2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/property_with_operator_assignment.out
@@ -0,0 +1,8 @@
+GDTEST_OK
+1
+2
+3
+4
+5
+6
+0
diff --git a/modules/gdscript/tests/scripts/runtime/features/recursion.gd b/modules/gdscript/tests/scripts/runtime/features/recursion.gd
new file mode 100644
index 0000000000..a35485022e
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/recursion.gd
@@ -0,0 +1,19 @@
+func is_prime(number: int, divisor: int = 2) -> bool:
+ print(divisor)
+ if number <= 2:
+ return (number == 2)
+ elif number % divisor == 0:
+ return false
+ elif divisor * divisor > number:
+ return true
+
+ return is_prime(number, divisor + 1)
+
+func test():
+ # Not a prime number.
+ print(is_prime(989))
+
+ print()
+
+ # Largest prime number below 10000.
+ print(is_prime(9973))
diff --git a/modules/gdscript/tests/scripts/runtime/features/recursion.out b/modules/gdscript/tests/scripts/runtime/features/recursion.out
new file mode 100644
index 0000000000..2bd8f24988
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/recursion.out
@@ -0,0 +1,125 @@
+GDTEST_OK
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+false
+
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+true
diff --git a/modules/glslang/SCsub b/modules/glslang/SCsub
index 182272ffc7..1954a32697 100644
--- a/modules/glslang/SCsub
+++ b/modules/glslang/SCsub
@@ -13,46 +13,47 @@ if env["builtin_glslang"]:
thirdparty_dir = "#thirdparty/glslang/"
thirdparty_sources = [
"glslang/CInterface/glslang_c_interface.cpp",
- "glslang/MachineIndependent/RemoveTree.cpp",
- "glslang/MachineIndependent/ParseHelper.cpp",
- "glslang/MachineIndependent/iomapper.cpp",
- "glslang/MachineIndependent/propagateNoContraction.cpp",
- "glslang/MachineIndependent/Intermediate.cpp",
- "glslang/MachineIndependent/linkValidate.cpp",
"glslang/MachineIndependent/attribute.cpp",
- "glslang/MachineIndependent/Scan.cpp",
- "glslang/MachineIndependent/Initialize.cpp",
"glslang/MachineIndependent/Constant.cpp",
- "glslang/MachineIndependent/reflection.cpp",
+ "glslang/MachineIndependent/glslang_tab.cpp",
+ "glslang/MachineIndependent/InfoSink.cpp",
+ "glslang/MachineIndependent/Initialize.cpp",
+ "glslang/MachineIndependent/Intermediate.cpp",
+ "glslang/MachineIndependent/intermOut.cpp",
+ "glslang/MachineIndependent/IntermTraverse.cpp",
+ "glslang/MachineIndependent/iomapper.cpp",
"glslang/MachineIndependent/limits.cpp",
- "glslang/MachineIndependent/preprocessor/PpScanner.cpp",
- "glslang/MachineIndependent/preprocessor/PpTokens.cpp",
+ "glslang/MachineIndependent/linkValidate.cpp",
+ "glslang/MachineIndependent/parseConst.cpp",
+ "glslang/MachineIndependent/ParseContextBase.cpp",
+ "glslang/MachineIndependent/ParseHelper.cpp",
+ "glslang/MachineIndependent/PoolAlloc.cpp",
"glslang/MachineIndependent/preprocessor/PpAtom.cpp",
"glslang/MachineIndependent/preprocessor/PpContext.cpp",
"glslang/MachineIndependent/preprocessor/Pp.cpp",
- "glslang/MachineIndependent/InfoSink.cpp",
- "glslang/MachineIndependent/intermOut.cpp",
+ "glslang/MachineIndependent/preprocessor/PpScanner.cpp",
+ "glslang/MachineIndependent/preprocessor/PpTokens.cpp",
+ "glslang/MachineIndependent/propagateNoContraction.cpp",
+ "glslang/MachineIndependent/reflection.cpp",
+ "glslang/MachineIndependent/RemoveTree.cpp",
+ "glslang/MachineIndependent/Scan.cpp",
+ "glslang/MachineIndependent/ShaderLang.cpp",
+ "glslang/MachineIndependent/SpirvIntrinsics.cpp",
"glslang/MachineIndependent/SymbolTable.cpp",
- "glslang/MachineIndependent/glslang_tab.cpp",
"glslang/MachineIndependent/Versions.cpp",
- "glslang/MachineIndependent/ShaderLang.cpp",
- "glslang/MachineIndependent/parseConst.cpp",
- "glslang/MachineIndependent/PoolAlloc.cpp",
- "glslang/MachineIndependent/ParseContextBase.cpp",
- "glslang/MachineIndependent/IntermTraverse.cpp",
- "glslang/GenericCodeGen/Link.cpp",
"glslang/GenericCodeGen/CodeGen.cpp",
+ "glslang/GenericCodeGen/Link.cpp",
"OGLCompilersDLL/InitializeDll.cpp",
"SPIRV/CInterface/spirv_c_interface.cpp",
- "SPIRV/InReadableOrder.cpp",
- "SPIRV/GlslangToSpv.cpp",
- "SPIRV/SpvBuilder.cpp",
- "SPIRV/SpvTools.cpp",
"SPIRV/disassemble.cpp",
"SPIRV/doc.cpp",
- "SPIRV/SPVRemapper.cpp",
- "SPIRV/SpvPostProcess.cpp",
+ "SPIRV/GlslangToSpv.cpp",
+ "SPIRV/InReadableOrder.cpp",
"SPIRV/Logger.cpp",
+ "SPIRV/SpvBuilder.cpp",
+ "SPIRV/SpvPostProcess.cpp",
+ "SPIRV/SPVRemapper.cpp",
+ "SPIRV/SpvTools.cpp",
"StandAlone/ResourceLimits.cpp",
]
diff --git a/modules/gltf/config.py b/modules/gltf/config.py
index a4ee871eff..52a97c93aa 100644
--- a/modules/gltf/config.py
+++ b/modules/gltf/config.py
@@ -22,7 +22,6 @@ def get_doc_classes():
"GLTFSpecGloss",
"GLTFState",
"GLTFTexture",
- "PackedSceneGLTF",
]
diff --git a/modules/gltf/doc_classes/EditorSceneImporterGLTF.xml b/modules/gltf/doc_classes/EditorSceneImporterGLTF.xml
index e717b30f73..c85fce7b9d 100644
--- a/modules/gltf/doc_classes/EditorSceneImporterGLTF.xml
+++ b/modules/gltf/doc_classes/EditorSceneImporterGLTF.xml
@@ -6,8 +6,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/GLTFAccessor.xml b/modules/gltf/doc_classes/GLTFAccessor.xml
index 41a318ce19..ae81cae81a 100644
--- a/modules/gltf/doc_classes/GLTFAccessor.xml
+++ b/modules/gltf/doc_classes/GLTFAccessor.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="buffer_view" type="int" setter="set_buffer_view" getter="get_buffer_view" default="0">
</member>
@@ -38,6 +36,4 @@
<member name="type" type="int" setter="set_type" getter="get_type" default="0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/GLTFAnimation.xml b/modules/gltf/doc_classes/GLTFAnimation.xml
index 5c1fa02f11..70480c2b38 100644
--- a/modules/gltf/doc_classes/GLTFAnimation.xml
+++ b/modules/gltf/doc_classes/GLTFAnimation.xml
@@ -6,12 +6,8 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="loop" type="bool" setter="set_loop" getter="get_loop" default="false">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/GLTFBufferView.xml b/modules/gltf/doc_classes/GLTFBufferView.xml
index edaad85e0a..f58aa46508 100644
--- a/modules/gltf/doc_classes/GLTFBufferView.xml
+++ b/modules/gltf/doc_classes/GLTFBufferView.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="buffer" type="int" setter="set_buffer" getter="get_buffer" default="-1">
</member>
@@ -20,6 +18,4 @@
<member name="indices" type="bool" setter="set_indices" getter="get_indices" default="false">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/GLTFCamera.xml b/modules/gltf/doc_classes/GLTFCamera.xml
index 0b95f2c802..3682df5951 100644
--- a/modules/gltf/doc_classes/GLTFCamera.xml
+++ b/modules/gltf/doc_classes/GLTFCamera.xml
@@ -6,18 +6,14 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
- <member name="fov_size" type="float" setter="set_fov_size" getter="get_fov_size" default="75.0">
+ <member name="depth_far" type="float" setter="set_depth_far" getter="get_depth_far" default="4000.0">
</member>
- <member name="perspective" type="bool" setter="set_perspective" getter="get_perspective" default="true">
+ <member name="depth_near" type="float" setter="set_depth_near" getter="get_depth_near" default="0.05">
</member>
- <member name="zfar" type="float" setter="set_zfar" getter="get_zfar" default="4000.0">
+ <member name="fov_size" type="float" setter="set_fov_size" getter="get_fov_size" default="75.0">
</member>
- <member name="znear" type="float" setter="set_znear" getter="get_znear" default="0.05">
+ <member name="perspective" type="bool" setter="set_perspective" getter="get_perspective" default="true">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/GLTFDocument.xml b/modules/gltf/doc_classes/GLTFDocument.xml
index 04c40dd752..16e649f390 100644
--- a/modules/gltf/doc_classes/GLTFDocument.xml
+++ b/modules/gltf/doc_classes/GLTFDocument.xml
@@ -7,7 +7,27 @@
<tutorials>
</tutorials>
<methods>
+ <method name="import_scene">
+ <return type="Node" />
+ <argument index="0" name="path" type="String" />
+ <argument index="1" name="flags" type="int" default="0" />
+ <argument index="2" name="bake_fps" type="int" default="30" />
+ <argument index="3" name="state" type="GLTFState" default="null" />
+ <description>
+ Import a scene from glTF2 ".gltf" or ".glb" file.
+ </description>
+ </method>
+ <method name="save_scene">
+ <return type="int" enum="Error" />
+ <argument index="0" name="node" type="Node" />
+ <argument index="1" name="path" type="String" />
+ <argument index="2" name="src_path" type="String" />
+ <argument index="3" name="flags" type="int" default="0" />
+ <argument index="4" name="bake_fps" type="float" default="30" />
+ <argument index="5" name="state" type="GLTFState" default="null" />
+ <description>
+ Save a scene as a glTF2 ".glb" or ".gltf" file.
+ </description>
+ </method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/GLTFLight.xml b/modules/gltf/doc_classes/GLTFLight.xml
index f51d287685..b4f03cd1ed 100644
--- a/modules/gltf/doc_classes/GLTFLight.xml
+++ b/modules/gltf/doc_classes/GLTFLight.xml
@@ -6,22 +6,26 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
- <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(0, 0, 0, 1)">
+ <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
+ The [Color] of the light. Defaults to white. A black color causes the light to have no effect.
</member>
<member name="inner_cone_angle" type="float" setter="set_inner_cone_angle" getter="get_inner_cone_angle" default="0.0">
+ The inner angle of the cone in a spotlight. Must be less than or equal to the outer cone angle.
+ Within this angle, the light is at full brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. When creating a Godot [SpotLight3D], the ratio between the inner and outer cone angles is used to calculate the attenuation of the light.
</member>
- <member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="0.0">
+ <member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="1.0">
+ The intensity of the light. This is expressed in candelas (lumens per steradian) for point and spot lights, and lux (lumens per m²) for directional lights. When creating a Godot light, this value is converted to a unitless multiplier.
</member>
- <member name="outer_cone_angle" type="float" setter="set_outer_cone_angle" getter="get_outer_cone_angle" default="0.0">
+ <member name="light_type" type="String" setter="set_light_type" getter="get_light_type" default="&quot;&quot;">
+ The type of the light. The values accepted by Godot are "point", "spot", and "directional", which correspond to Godot's [OmniLight3D], [SpotLight3D], and [DirectionalLight3D] respectively.
</member>
- <member name="range" type="float" setter="set_range" getter="get_range" default="0.0">
+ <member name="outer_cone_angle" type="float" setter="set_outer_cone_angle" getter="get_outer_cone_angle" default="0.785398">
+ The outer angle of the cone in a spotlight. Must be greater than or equal to the inner angle.
+ At this angle, the light drops off to zero brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. If this angle is a half turn, then the spotlight emits in all directions. When creating a Godot [SpotLight3D], the outer cone angle is used as the angle of the spotlight.
</member>
- <member name="type" type="String" setter="set_type" getter="get_type" default="&quot;&quot;">
+ <member name="range" type="float" setter="set_range" getter="get_range" default="inf">
+ The range of the light, beyond which the light has no effect. GLTF lights with no range defined behave like physical lights (which have infinite range). When creating a Godot light, the range is clamped to 4096.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/GLTFMesh.xml b/modules/gltf/doc_classes/GLTFMesh.xml
index fd7e4a169e..51e9fc032a 100644
--- a/modules/gltf/doc_classes/GLTFMesh.xml
+++ b/modules/gltf/doc_classes/GLTFMesh.xml
@@ -6,14 +6,10 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="blend_weights" type="PackedFloat32Array" setter="set_blend_weights" getter="get_blend_weights" default="PackedFloat32Array()">
</member>
<member name="mesh" type="EditorSceneImporterMesh" setter="set_mesh" getter="get_mesh">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/GLTFNode.xml b/modules/gltf/doc_classes/GLTFNode.xml
index bfbb12df4d..f27965ea07 100644
--- a/modules/gltf/doc_classes/GLTFNode.xml
+++ b/modules/gltf/doc_classes/GLTFNode.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="camera" type="int" setter="set_camera" getter="get_camera" default="-1">
</member>
@@ -23,6 +21,8 @@
</member>
<member name="parent" type="int" setter="set_parent" getter="get_parent" default="-1">
</member>
+ <member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3(0, 0, 0)">
+ </member>
<member name="rotation" type="Quaternion" setter="set_rotation" getter="get_rotation" default="Quaternion(0, 0, 0, 1)">
</member>
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)">
@@ -31,11 +31,7 @@
</member>
<member name="skin" type="int" setter="set_skin" getter="get_skin" default="-1">
</member>
- <member name="translation" type="Vector3" setter="set_translation" getter="get_translation" default="Vector3(0, 0, 0)">
- </member>
<member name="xform" type="Transform3D" setter="set_xform" getter="get_xform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/GLTFSkeleton.xml b/modules/gltf/doc_classes/GLTFSkeleton.xml
index 6e83cec252..037c3545a6 100644
--- a/modules/gltf/doc_classes/GLTFSkeleton.xml
+++ b/modules/gltf/doc_classes/GLTFSkeleton.xml
@@ -52,6 +52,4 @@
<member name="roots" type="PackedInt32Array" setter="set_roots" getter="get_roots" default="PackedInt32Array()">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/GLTFSkin.xml b/modules/gltf/doc_classes/GLTFSkin.xml
index 107ca960cd..ad4f017584 100644
--- a/modules/gltf/doc_classes/GLTFSkin.xml
+++ b/modules/gltf/doc_classes/GLTFSkin.xml
@@ -57,6 +57,4 @@
<member name="skin_root" type="int" setter="set_skin_root" getter="get_skin_root" default="-1">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/GLTFSpecGloss.xml b/modules/gltf/doc_classes/GLTFSpecGloss.xml
index 6e9c419649..6b8f86ed1c 100644
--- a/modules/gltf/doc_classes/GLTFSpecGloss.xml
+++ b/modules/gltf/doc_classes/GLTFSpecGloss.xml
@@ -6,8 +6,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="diffuse_factor" type="Color" setter="set_diffuse_factor" getter="get_diffuse_factor" default="Color(1, 1, 1, 1)">
</member>
@@ -20,6 +18,4 @@
<member name="specular_factor" type="Color" setter="set_specular_factor" getter="get_specular_factor" default="Color(1, 1, 1, 1)">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/GLTFState.xml b/modules/gltf/doc_classes/GLTFState.xml
index ae976fc04c..6d03d0ecf8 100644
--- a/modules/gltf/doc_classes/GLTFState.xml
+++ b/modules/gltf/doc_classes/GLTFState.xml
@@ -209,6 +209,4 @@
<member name="use_named_skin_binds" type="bool" setter="set_use_named_skin_binds" getter="get_use_named_skin_binds" default="false">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/GLTFTexture.xml b/modules/gltf/doc_classes/GLTFTexture.xml
index 33bd8fddeb..7c88d2318e 100644
--- a/modules/gltf/doc_classes/GLTFTexture.xml
+++ b/modules/gltf/doc_classes/GLTFTexture.xml
@@ -6,12 +6,8 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="src_image" type="int" setter="set_src_image" getter="get_src_image" default="0">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gltf/doc_classes/PackedSceneGLTF.xml b/modules/gltf/doc_classes/PackedSceneGLTF.xml
deleted file mode 100644
index d0136c6402..0000000000
--- a/modules/gltf/doc_classes/PackedSceneGLTF.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedSceneGLTF" inherits="PackedScene" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="export_gltf">
- <return type="int" enum="Error" />
- <argument index="0" name="node" type="Node" />
- <argument index="1" name="path" type="String" />
- <argument index="2" name="flags" type="int" default="0" />
- <argument index="3" name="bake_fps" type="float" default="1000.0" />
- <description>
- </description>
- </method>
- <method name="import_gltf_scene">
- <return type="Node" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="flags" type="int" default="0" />
- <argument index="2" name="bake_fps" type="float" default="1000.0" />
- <argument index="3" name="state" type="GLTFState" default="null" />
- <description>
- </description>
- </method>
- <method name="pack_gltf">
- <return type="void" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="flags" type="int" default="0" />
- <argument index="2" name="bake_fps" type="float" default="1000.0" />
- <argument index="3" name="state" type="GLTFState" default="null" />
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" override="true" default="{&quot;conn_count&quot;: 0,&quot;conns&quot;: PackedInt32Array(),&quot;editable_instances&quot;: [],&quot;names&quot;: PackedStringArray(),&quot;node_count&quot;: 0,&quot;node_paths&quot;: [],&quot;nodes&quot;: PackedInt32Array(),&quot;variants&quot;: [],&quot;version&quot;: 2}" />
- </members>
- <constants>
- </constants>
-</class>
diff --git a/modules/gltf/editor_scene_exporter_gltf_plugin.cpp b/modules/gltf/editor_scene_exporter_gltf_plugin.cpp
index ae080bcc9a..3ce5ea23dc 100644
--- a/modules/gltf/editor_scene_exporter_gltf_plugin.cpp
+++ b/modules/gltf/editor_scene_exporter_gltf_plugin.cpp
@@ -30,9 +30,11 @@
#include "editor_scene_exporter_gltf_plugin.h"
#include "core/config/project_settings.h"
+#include "core/error/error_list.h"
#include "core/object/object.h"
#include "core/templates/vector.h"
#include "editor/editor_file_system.h"
+#include "gltf_document.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/gui/check_box.h"
#include "scene/main/node.h"
@@ -49,7 +51,6 @@ bool SceneExporterGLTFPlugin::has_main_screen() const {
SceneExporterGLTFPlugin::SceneExporterGLTFPlugin(EditorNode *p_node) {
editor = p_node;
- convert_gltf2.instantiate();
file_export_lib = memnew(EditorFileDialog);
editor->get_gui_base()->add_child(file_export_lib);
file_export_lib->connect("file_selected", callable_mp(this, &SceneExporterGLTFPlugin::_gltf2_dialog_action));
@@ -71,8 +72,12 @@ void SceneExporterGLTFPlugin::_gltf2_dialog_action(String p_file) {
return;
}
List<String> deps;
- convert_gltf2->save_scene(root, p_file, p_file, 0, 1000.0f, &deps);
- EditorFileSystem::get_singleton()->scan_changes();
+ Ref<GLTFDocument> doc;
+ doc.instantiate();
+ Error err = doc->save_scene(root, p_file, p_file, 0, 30.0f, Ref<GLTFState>());
+ if (err != OK) {
+ ERR_PRINT(vformat("glTF2 save scene error %s.", itos(err)));
+ }
}
void SceneExporterGLTFPlugin::convert_scene_to_gltf2() {
@@ -81,7 +86,7 @@ void SceneExporterGLTFPlugin::convert_scene_to_gltf2() {
editor->show_accept(TTR("This operation can't be done without a scene."), TTR("OK"));
return;
}
- String filename = String(root->get_filename().get_file().get_basename());
+ String filename = String(root->get_scene_file_path().get_file().get_basename());
if (filename.is_empty()) {
filename = root->get_name();
}
diff --git a/modules/gltf/editor_scene_exporter_gltf_plugin.h b/modules/gltf/editor_scene_exporter_gltf_plugin.h
index d952894c16..c4f277fca2 100644
--- a/modules/gltf/editor_scene_exporter_gltf_plugin.h
+++ b/modules/gltf/editor_scene_exporter_gltf_plugin.h
@@ -37,7 +37,6 @@
class SceneExporterGLTFPlugin : public EditorPlugin {
GDCLASS(SceneExporterGLTFPlugin, EditorPlugin);
- Ref<PackedSceneGLTF> convert_gltf2;
EditorNode *editor = nullptr;
EditorFileDialog *file_export_lib = nullptr;
void _gltf2_dialog_action(String p_file);
diff --git a/modules/gltf/editor_scene_importer_gltf.cpp b/modules/gltf/editor_scene_importer_gltf.cpp
index eca1c85bf3..12796c41d7 100644
--- a/modules/gltf/editor_scene_importer_gltf.cpp
+++ b/modules/gltf/editor_scene_importer_gltf.cpp
@@ -50,9 +50,9 @@ Node *EditorSceneImporterGLTF::import_scene(const String &p_path,
uint32_t p_flags, int p_bake_fps,
List<String> *r_missing_deps,
Error *r_err) {
- Ref<PackedSceneGLTF> importer;
- importer.instantiate();
- return importer->import_scene(p_path, p_flags, p_bake_fps, r_missing_deps, r_err, Ref<GLTFState>());
+ Ref<GLTFDocument> doc;
+ doc.instantiate();
+ return doc->import_scene_gltf(p_path, p_flags, p_bake_fps, Ref<GLTFState>(), r_missing_deps, r_err);
}
Ref<Animation> EditorSceneImporterGLTF::import_animation(const String &p_path,
@@ -60,114 +60,3 @@ Ref<Animation> EditorSceneImporterGLTF::import_animation(const String &p_path,
int p_bake_fps) {
return Ref<Animation>();
}
-
-void PackedSceneGLTF::_bind_methods() {
- ClassDB::bind_method(
- D_METHOD("export_gltf", "node", "path", "flags", "bake_fps"),
- &PackedSceneGLTF::export_gltf, DEFVAL(0), DEFVAL(1000.0f));
- ClassDB::bind_method(D_METHOD("pack_gltf", "path", "flags", "bake_fps", "state"),
- &PackedSceneGLTF::pack_gltf, DEFVAL(0), DEFVAL(1000.0f), DEFVAL(Ref<GLTFState>()));
- ClassDB::bind_method(D_METHOD("import_gltf_scene", "path", "flags", "bake_fps", "state"),
- &PackedSceneGLTF::import_gltf_scene, DEFVAL(0), DEFVAL(1000.0f), DEFVAL(Ref<GLTFState>()));
-}
-Node *PackedSceneGLTF::import_gltf_scene(const String &p_path, uint32_t p_flags, float p_bake_fps, Ref<GLTFState> r_state) {
- Error err = FAILED;
- List<String> deps;
- return import_scene(p_path, p_flags, p_bake_fps, &deps, &err, r_state);
-}
-
-Node *PackedSceneGLTF::import_scene(const String &p_path, uint32_t p_flags,
- int p_bake_fps,
- List<String> *r_missing_deps,
- Error *r_err,
- Ref<GLTFState> r_state) {
- if (r_state == Ref<GLTFState>()) {
- r_state.instantiate();
- }
- r_state->use_named_skin_binds =
- p_flags & EditorSceneImporter::IMPORT_USE_NAMED_SKIN_BINDS;
-
- Ref<GLTFDocument> gltf_document;
- gltf_document.instantiate();
- Error err = gltf_document->parse(r_state, p_path);
- if (r_err) {
- *r_err = err;
- }
- ERR_FAIL_COND_V(err != Error::OK, nullptr);
-
- Node3D *root = memnew(Node3D);
- for (int32_t root_i = 0; root_i < r_state->root_nodes.size(); root_i++) {
- gltf_document->_generate_scene_node(r_state, root, root, r_state->root_nodes[root_i]);
- }
- gltf_document->_process_mesh_instances(r_state, root);
- if (r_state->animations.size()) {
- AnimationPlayer *ap = memnew(AnimationPlayer);
- root->add_child(ap);
- ap->set_owner(root);
- for (int i = 0; i < r_state->animations.size(); i++) {
- gltf_document->_import_animation(r_state, ap, i, p_bake_fps);
- }
- }
-
- return cast_to<Node3D>(root);
-}
-
-void PackedSceneGLTF::pack_gltf(String p_path, int32_t p_flags,
- real_t p_bake_fps, Ref<GLTFState> r_state) {
- Error err = FAILED;
- List<String> deps;
- Node *root = import_scene(p_path, p_flags, p_bake_fps, &deps, &err, r_state);
- ERR_FAIL_COND(err != OK);
- pack(root);
-}
-
-void PackedSceneGLTF::save_scene(Node *p_node, const String &p_path,
- const String &p_src_path, uint32_t p_flags,
- int p_bake_fps, List<String> *r_missing_deps,
- Error *r_err) {
- Error err = FAILED;
- if (r_err) {
- *r_err = err;
- }
- Ref<GLTFDocument> gltf_document;
- gltf_document.instantiate();
- Ref<GLTFState> state;
- state.instantiate();
- err = gltf_document->serialize(state, p_node, p_path);
- if (r_err) {
- *r_err = err;
- }
-}
-
-void PackedSceneGLTF::_build_parent_hierachy(Ref<GLTFState> state) {
- // build the hierarchy
- for (GLTFNodeIndex node_i = 0; node_i < state->nodes.size(); node_i++) {
- for (int j = 0; j < state->nodes[node_i]->children.size(); j++) {
- GLTFNodeIndex child_i = state->nodes[node_i]->children[j];
- ERR_FAIL_INDEX(child_i, state->nodes.size());
- if (state->nodes.write[child_i]->parent != -1) {
- continue;
- }
- state->nodes.write[child_i]->parent = node_i;
- }
- }
-}
-
-Error PackedSceneGLTF::export_gltf(Node *p_root, String p_path,
- int32_t p_flags,
- real_t p_bake_fps) {
- ERR_FAIL_COND_V(!p_root, FAILED);
- List<String> deps;
- Error err;
- String path = p_path;
- int32_t flags = p_flags;
- real_t baked_fps = p_bake_fps;
- Ref<PackedSceneGLTF> exporter;
- exporter.instantiate();
- exporter->save_scene(p_root, path, "", flags, baked_fps, &deps, &err);
- int32_t error_code = err;
- if (error_code != 0) {
- return Error(error_code);
- }
- return OK;
-}
diff --git a/modules/gltf/editor_scene_importer_gltf.h b/modules/gltf/editor_scene_importer_gltf.h
index 7bc5f594ed..eb8775b137 100644
--- a/modules/gltf/editor_scene_importer_gltf.h
+++ b/modules/gltf/editor_scene_importer_gltf.h
@@ -46,35 +46,9 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
public:
virtual uint32_t get_import_flags() const override;
virtual void get_extensions(List<String> *r_extensions) const override;
- virtual Node *import_scene(const String &p_path, uint32_t p_flags,
- int p_bake_fps,
- List<String> *r_missing_deps = nullptr,
- Error *r_err = nullptr) override;
+ virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = nullptr) override;
virtual Ref<Animation> import_animation(const String &p_path,
uint32_t p_flags, int p_bake_fps) override;
};
#endif
-
-class PackedSceneGLTF : public PackedScene {
- GDCLASS(PackedSceneGLTF, PackedScene);
-
-protected:
- static void _bind_methods();
-
-public:
- virtual void save_scene(Node *p_node, const String &p_path, const String &p_src_path,
- uint32_t p_flags, int p_bake_fps,
- List<String> *r_missing_deps, Error *r_err = nullptr);
- virtual void _build_parent_hierachy(Ref<GLTFState> state);
- virtual Error export_gltf(Node *p_root, String p_path, int32_t p_flags = 0,
- real_t p_bake_fps = 1000.0f);
- virtual Node *import_scene(const String &p_path, uint32_t p_flags,
- int p_bake_fps,
- List<String> *r_missing_deps,
- Error *r_err,
- Ref<GLTFState> r_state);
- virtual Node *import_gltf_scene(const String &p_path, uint32_t p_flags, float p_bake_fps, Ref<GLTFState> r_state = Ref<GLTFState>());
- virtual void pack_gltf(String p_path, int32_t p_flags = 0,
- real_t p_bake_fps = 1000.0f, Ref<GLTFState> r_state = Ref<GLTFState>());
-};
#endif // EDITOR_SCENE_IMPORTER_GLTF_H
diff --git a/modules/gltf/gltf_accessor.h b/modules/gltf/gltf_accessor.h
index 949a601730..57aea1026c 100644
--- a/modules/gltf/gltf_accessor.h
+++ b/modules/gltf/gltf_accessor.h
@@ -44,8 +44,7 @@ private:
int component_type = 0;
bool normalized = false;
int count = 0;
- GLTFDocument::GLTFType
- type = GLTFDocument::TYPE_SCALAR;
+ GLTFDocument::GLTFType type = GLTFDocument::TYPE_SCALAR;
Vector<double> min;
Vector<double> max;
int sparse_count = 0;
diff --git a/modules/gltf/gltf_animation.h b/modules/gltf/gltf_animation.h
index 216d2161c4..be0ed2d4c6 100644
--- a/modules/gltf/gltf_animation.h
+++ b/modules/gltf/gltf_animation.h
@@ -55,7 +55,7 @@ public:
};
struct Track {
- Channel<Vector3> translation_track;
+ Channel<Vector3> position_track;
Channel<Quaternion> rotation_track;
Channel<Vector3> scale_track;
Vector<Channel<float>> weight_tracks;
diff --git a/modules/gltf/gltf_camera.cpp b/modules/gltf/gltf_camera.cpp
index efa7c5d6d7..0f895fb989 100644
--- a/modules/gltf/gltf_camera.cpp
+++ b/modules/gltf/gltf_camera.cpp
@@ -35,13 +35,13 @@ void GLTFCamera::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_perspective", "perspective"), &GLTFCamera::set_perspective);
ClassDB::bind_method(D_METHOD("get_fov_size"), &GLTFCamera::get_fov_size);
ClassDB::bind_method(D_METHOD("set_fov_size", "fov_size"), &GLTFCamera::set_fov_size);
- ClassDB::bind_method(D_METHOD("get_zfar"), &GLTFCamera::get_zfar);
- ClassDB::bind_method(D_METHOD("set_zfar", "zfar"), &GLTFCamera::set_zfar);
- ClassDB::bind_method(D_METHOD("get_znear"), &GLTFCamera::get_znear);
- ClassDB::bind_method(D_METHOD("set_znear", "znear"), &GLTFCamera::set_znear);
+ ClassDB::bind_method(D_METHOD("get_depth_far"), &GLTFCamera::get_depth_far);
+ ClassDB::bind_method(D_METHOD("set_depth_far", "zdepth_far"), &GLTFCamera::set_depth_far);
+ ClassDB::bind_method(D_METHOD("get_depth_near"), &GLTFCamera::get_depth_near);
+ ClassDB::bind_method(D_METHOD("set_depth_near", "zdepth_near"), &GLTFCamera::set_depth_near);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "perspective"), "set_perspective", "get_perspective"); // bool
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fov_size"), "set_fov_size", "get_fov_size"); // float
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "zfar"), "set_zfar", "get_zfar"); // float
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "znear"), "set_znear", "get_znear"); // float
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth_far"), "set_depth_far", "get_depth_far"); // float
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth_near"), "set_depth_near", "get_depth_near"); // float
}
diff --git a/modules/gltf/gltf_camera.h b/modules/gltf/gltf_camera.h
index bf94b80bef..843ff417a4 100644
--- a/modules/gltf/gltf_camera.h
+++ b/modules/gltf/gltf_camera.h
@@ -39,8 +39,8 @@ class GLTFCamera : public Resource {
private:
bool perspective = true;
float fov_size = 75.0;
- float zfar = 4000.0;
- float znear = 0.05;
+ float depth_far = 4000.0;
+ float depth_near = 0.05;
protected:
static void _bind_methods();
@@ -50,9 +50,9 @@ public:
void set_perspective(bool p_val) { perspective = p_val; }
float get_fov_size() const { return fov_size; }
void set_fov_size(float p_val) { fov_size = p_val; }
- float get_zfar() const { return zfar; }
- void set_zfar(float p_val) { zfar = p_val; }
- float get_znear() const { return znear; }
- void set_znear(float p_val) { znear = p_val; }
+ float get_depth_far() const { return depth_far; }
+ void set_depth_far(float p_val) { depth_far = p_val; }
+ float get_depth_near() const { return depth_near; }
+ void set_depth_near(float p_val) { depth_near = p_val; }
};
#endif // GLTF_CAMERA_H
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index ff0579a11c..5f2e8d4ba6 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -48,6 +48,7 @@
#include "core/io/file_access.h"
#include "core/io/json.h"
#include "core/math/disjoint_set.h"
+#include "core/math/vector2.h"
#include "core/variant/typed_array.h"
#include "core/variant/variant.h"
#include "core/version.h"
@@ -61,6 +62,7 @@
#include "scene/resources/surface_tool.h"
#include "modules/modules_enabled.gen.h"
+
#ifdef MODULE_CSG_ENABLED
#include "modules/csg/csg_shape.h"
#endif // MODULE_CSG_ENABLED
@@ -70,12 +72,16 @@
#include <stdio.h>
#include <stdlib.h>
+#include <cstdint>
#include <limits>
Error GLTFDocument::serialize(Ref<GLTFState> state, Node *p_root, const String &p_path) {
uint64_t begin_time = OS::get_singleton()->get_ticks_usec();
- _convert_scene_node(state, p_root, p_root, -1, -1);
+ state->skeleton3d_to_gltf_skeleton.clear();
+ state->skin_and_skeleton3d_to_gltf_skin.clear();
+
+ _convert_scene_node(state, p_root, -1, -1);
if (!state->buffers.size()) {
state->buffers.push_back(Vector<uint8_t>());
}
@@ -94,11 +100,7 @@ Error GLTFDocument::serialize(Ref<GLTFState> state, Node *p_root, const String &
if (err != OK) {
return Error::FAILED;
}
- /* STEP 4 CREATE BONE ATTACHMENTS */
- err = _serialize_bone_attachment(state);
- if (err != OK) {
- return Error::FAILED;
- }
+
/* STEP 5 SERIALIZE MESHES (we have enough info now) */
err = _serialize_meshes(state);
if (err != OK) {
@@ -246,30 +248,6 @@ Error GLTFDocument::_parse_json(const String &p_path, Ref<GLTFState> state) {
return OK;
}
-Error GLTFDocument::_serialize_bone_attachment(Ref<GLTFState> state) {
- for (int skeleton_i = 0; skeleton_i < state->skeletons.size(); skeleton_i++) {
- for (int attachment_i = 0; attachment_i < state->skeletons[skeleton_i]->bone_attachments.size(); attachment_i++) {
- BoneAttachment3D *bone_attachment = state->skeletons[skeleton_i]->bone_attachments[attachment_i];
- String bone_name = bone_attachment->get_bone_name();
- bone_name = _sanitize_bone_name(bone_name);
- int32_t bone = state->skeletons[skeleton_i]->godot_skeleton->find_bone(bone_name);
- ERR_CONTINUE(bone == -1);
- for (int skin_i = 0; skin_i < state->skins.size(); skin_i++) {
- if (state->skins[skin_i]->skeleton != skeleton_i) {
- continue;
- }
-
- for (int node_i = 0; node_i < bone_attachment->get_child_count(); node_i++) {
- ERR_CONTINUE(bone >= state->skins[skin_i]->joints.size());
- _convert_scene_node(state, bone_attachment->get_child(node_i), bone_attachment->get_owner(), state->skins[skin_i]->joints[bone], 0);
- }
- break;
- }
- }
- }
- return OK;
-}
-
Error GLTFDocument::_parse_glb(const String &p_path, Ref<GLTFState> state) {
Error err;
FileAccessRef f = FileAccess::open(p_path, FileAccess::READ, &err);
@@ -426,8 +404,8 @@ Error GLTFDocument::_serialize_nodes(Ref<GLTFState> state) {
node["scale"] = _vec3_to_arr(n->scale);
}
- if (!n->translation.is_equal_approx(Vector3())) {
- node["translation"] = _vec3_to_arr(n->translation);
+ if (!n->position.is_equal_approx(Vector3())) {
+ node["translation"] = _vec3_to_arr(n->position);
}
if (n->children.size()) {
Array children;
@@ -581,7 +559,7 @@ Error GLTFDocument::_parse_nodes(Ref<GLTFState> state) {
node->xform = _arr_to_xform(n["matrix"]);
} else {
if (n.has("translation")) {
- node->translation = _arr_to_vec3(n["translation"]);
+ node->position = _arr_to_vec3(n["translation"]);
}
if (n.has("rotation")) {
node->rotation = _arr_to_quaternion(n["rotation"]);
@@ -591,7 +569,7 @@ Error GLTFDocument::_parse_nodes(Ref<GLTFState> state) {
}
node->xform.basis.set_quaternion_scale(node->rotation, node->scale);
- node->xform.origin = node->translation;
+ node->xform.origin = node->position;
}
if (n.has("extensions")) {
@@ -2128,11 +2106,14 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) {
continue;
}
Array primitives;
- Array targets;
Dictionary gltf_mesh;
Array target_names;
Array weights;
+ for (int morph_i = 0; morph_i < import_mesh->get_blend_shape_count(); morph_i++) {
+ target_names.push_back(import_mesh->get_blend_shape_name(morph_i));
+ }
for (int surface_i = 0; surface_i < import_mesh->get_surface_count(); surface_i++) {
+ Array targets;
Dictionary primitive;
Mesh::PrimitiveType primitive_type = import_mesh->get_surface_primitive_type(surface_i);
switch (primitive_type) {
@@ -2170,11 +2151,14 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) {
}
Array array = import_mesh->get_surface_arrays(surface_i);
+ uint32_t format = import_mesh->get_surface_format(surface_i);
+ int32_t vertex_num = 0;
Dictionary attributes;
{
Vector<Vector3> a = array[Mesh::ARRAY_VERTEX];
ERR_FAIL_COND_V(!a.size(), ERR_INVALID_DATA);
attributes["POSITION"] = _encode_accessor_as_vec3(state, a, true);
+ vertex_num = a.size();
}
{
Vector<real_t> a = array[Mesh::ARRAY_TANGENT];
@@ -2217,6 +2201,58 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) {
attributes["TEXCOORD_1"] = _encode_accessor_as_vec2(state, a, true);
}
}
+ for (int custom_i = 0; custom_i < 3; custom_i++) {
+ Vector<float> a = array[Mesh::ARRAY_CUSTOM0 + custom_i];
+ if (a.size()) {
+ int num_channels = 4;
+ int custom_shift = Mesh::ARRAY_FORMAT_CUSTOM0_SHIFT + custom_i * Mesh::ARRAY_FORMAT_CUSTOM_BITS;
+ switch ((format >> custom_shift) & Mesh::ARRAY_FORMAT_CUSTOM_MASK) {
+ case Mesh::ARRAY_CUSTOM_R_FLOAT:
+ num_channels = 1;
+ break;
+ case Mesh::ARRAY_CUSTOM_RG_FLOAT:
+ num_channels = 2;
+ break;
+ case Mesh::ARRAY_CUSTOM_RGB_FLOAT:
+ num_channels = 3;
+ break;
+ case Mesh::ARRAY_CUSTOM_RGBA_FLOAT:
+ num_channels = 4;
+ break;
+ }
+ int texcoord_i = 2 + 2 * custom_i;
+ String gltf_texcoord_key;
+ for (int prev_texcoord_i = 0; prev_texcoord_i < texcoord_i; prev_texcoord_i++) {
+ gltf_texcoord_key = vformat("TEXCOORD_%d", prev_texcoord_i);
+ if (!attributes.has(gltf_texcoord_key)) {
+ Vector<Vector2> empty;
+ empty.resize(vertex_num);
+ attributes[gltf_texcoord_key] = _encode_accessor_as_vec2(state, empty, true);
+ }
+ }
+
+ LocalVector<Vector2> first_channel;
+ first_channel.resize(vertex_num);
+ LocalVector<Vector2> second_channel;
+ second_channel.resize(vertex_num);
+ for (int32_t vert_i = 0; vert_i < vertex_num; vert_i++) {
+ float u = a[vert_i * num_channels + 0];
+ float v = (num_channels == 1 ? 0.0f : a[vert_i * num_channels + 1]);
+ first_channel[vert_i] = Vector2(u, v);
+ u = 0;
+ v = 0;
+ if (num_channels >= 3) {
+ u = a[vert_i * num_channels + 2];
+ v = (num_channels == 3 ? 0.0f : a[vert_i * num_channels + 3]);
+ second_channel[vert_i] = Vector2(u, v);
+ }
+ }
+ gltf_texcoord_key = vformat("TEXCOORD_%d", texcoord_i);
+ attributes[gltf_texcoord_key] = _encode_accessor_as_vec2(state, first_channel, true);
+ gltf_texcoord_key = vformat("TEXCOORD_%d", texcoord_i + 1);
+ attributes[gltf_texcoord_key] = _encode_accessor_as_vec2(state, second_channel, true);
+ }
+ }
{
Vector<Color> a = array[Mesh::ARRAY_COLOR];
if (a.size()) {
@@ -2252,13 +2288,12 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) {
}
attributes["JOINTS_0"] = _encode_accessor_as_joints(state, attribs, true);
} else if ((a.size() / (JOINT_GROUP_SIZE * 2)) >= vertex_array.size()) {
- int32_t vertex_count = vertex_array.size();
Vector<Color> joints_0;
- joints_0.resize(vertex_count);
+ joints_0.resize(vertex_num);
Vector<Color> joints_1;
- joints_1.resize(vertex_count);
+ joints_1.resize(vertex_num);
int32_t weights_8_count = JOINT_GROUP_SIZE * 2;
- for (int32_t vertex_i = 0; vertex_i < vertex_count; vertex_i++) {
+ for (int32_t vertex_i = 0; vertex_i < vertex_num; vertex_i++) {
Color joint_0;
joint_0.r = a[vertex_i * weights_8_count + 0];
joint_0.g = a[vertex_i * weights_8_count + 1];
@@ -2280,21 +2315,20 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) {
const Array &a = array[Mesh::ARRAY_WEIGHTS];
const Vector<Vector3> &vertex_array = array[Mesh::ARRAY_VERTEX];
if ((a.size() / JOINT_GROUP_SIZE) == vertex_array.size()) {
- const int ret_size = a.size() / JOINT_GROUP_SIZE;
+ int32_t vertex_count = vertex_array.size();
Vector<Color> attribs;
- attribs.resize(ret_size);
- for (int i = 0; i < ret_size; i++) {
+ attribs.resize(vertex_count);
+ for (int i = 0; i < vertex_count; i++) {
attribs.write[i] = Color(a[(i * JOINT_GROUP_SIZE) + 0], a[(i * JOINT_GROUP_SIZE) + 1], a[(i * JOINT_GROUP_SIZE) + 2], a[(i * JOINT_GROUP_SIZE) + 3]);
}
attributes["WEIGHTS_0"] = _encode_accessor_as_weights(state, attribs, true);
} else if ((a.size() / (JOINT_GROUP_SIZE * 2)) >= vertex_array.size()) {
- int32_t vertex_count = vertex_array.size();
Vector<Color> weights_0;
- weights_0.resize(vertex_count);
+ weights_0.resize(vertex_num);
Vector<Color> weights_1;
- weights_1.resize(vertex_count);
+ weights_1.resize(vertex_num);
int32_t weights_8_count = JOINT_GROUP_SIZE * 2;
- for (int32_t vertex_i = 0; vertex_i < vertex_count; vertex_i++) {
+ for (int32_t vertex_i = 0; vertex_i < vertex_num; vertex_i++) {
Color weight_0;
weight_0.r = a[vertex_i * weights_8_count + 0];
weight_0.g = a[vertex_i * weights_8_count + 1];
@@ -2354,7 +2388,6 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) {
ArrayMesh::BlendShapeMode shape_mode = import_mesh->get_blend_shape_mode();
for (int morph_i = 0; morph_i < import_mesh->get_blend_shape_count(); morph_i++) {
Array array_morph = import_mesh->get_surface_blend_shape_arrays(surface_i, morph_i);
- target_names.push_back(import_mesh->get_blend_shape_name(morph_i));
Dictionary t;
Vector<Vector3> varr = array_morph[Mesh::ARRAY_VERTEX];
Array mesh_arrays = import_mesh->get_surface_arrays(surface_i);
@@ -2371,22 +2404,21 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) {
}
Vector<Vector3> narr = array_morph[Mesh::ARRAY_NORMAL];
- if (varr.size()) {
+ if (narr.size()) {
t["NORMAL"] = _encode_accessor_as_vec3(state, narr, true);
}
Vector<real_t> tarr = array_morph[Mesh::ARRAY_TANGENT];
if (tarr.size()) {
const int ret_size = tarr.size() / 4;
- Vector<Color> attribs;
+ Vector<Vector3> attribs;
attribs.resize(ret_size);
for (int i = 0; i < ret_size; i++) {
- Color tangent;
- tangent.r = tarr[(i * 4) + 0];
- tangent.g = tarr[(i * 4) + 1];
- tangent.b = tarr[(i * 4) + 2];
- tangent.a = tarr[(i * 4) + 3];
+ Vector3 vec3;
+ vec3.x = tarr[(i * 4) + 0];
+ vec3.y = tarr[(i * 4) + 1];
+ vec3.z = tarr[(i * 4) + 2];
}
- t["TANGENT"] = _encode_accessor_as_color(state, attribs, true);
+ t["TANGENT"] = _encode_accessor_as_vec3(state, attribs, true);
}
targets.push_back(t);
}
@@ -2415,12 +2447,13 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) {
Dictionary e;
e["targetNames"] = target_names;
- for (int j = 0; j < target_names.size(); j++) {
+ weights.resize(target_names.size());
+ for (int name_i = 0; name_i < target_names.size(); name_i++) {
real_t weight = 0.0;
- if (j < state->meshes.write[gltf_mesh_i]->get_blend_weights().size()) {
- weight = state->meshes.write[gltf_mesh_i]->get_blend_weights()[j];
+ if (name_i < state->meshes.write[gltf_mesh_i]->get_blend_weights().size()) {
+ weight = state->meshes.write[gltf_mesh_i]->get_blend_weights()[name_i];
}
- weights.push_back(weight);
+ weights[name_i] = weight;
}
if (weights.size()) {
gltf_mesh["weights"] = weights;
@@ -2458,7 +2491,8 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> state) {
ERR_FAIL_COND_V(!d.has("primitives"), ERR_PARSE_ERROR);
Array primitives = d["primitives"];
- const Dictionary &extras = d.has("extras") ? (Dictionary)d["extras"] : Dictionary();
+ const Dictionary &extras = d.has("extras") ? (Dictionary)d["extras"] :
+ Dictionary();
Ref<EditorSceneImporterMesh> import_mesh;
import_mesh.instantiate();
String mesh_name = "mesh";
@@ -2468,6 +2502,7 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> state) {
import_mesh->set_name(_gen_unique_name(state, vformat("%s_%s", state->scene_name, mesh_name)));
for (int j = 0; j < primitives.size(); j++) {
+ uint32_t flags = 0;
Dictionary p = primitives[j];
Array array;
@@ -2499,8 +2534,11 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> state) {
}
ERR_FAIL_COND_V(!a.has("POSITION"), ERR_PARSE_ERROR);
+ int32_t vertex_num = 0;
if (a.has("POSITION")) {
- array[Mesh::ARRAY_VERTEX] = _decode_accessor_as_vec3(state, a["POSITION"], true);
+ PackedVector3Array vertices = _decode_accessor_as_vec3(state, a["POSITION"], true);
+ array[Mesh::ARRAY_VERTEX] = vertices;
+ vertex_num = vertices.size();
}
if (a.has("NORMAL")) {
array[Mesh::ARRAY_NORMAL] = _decode_accessor_as_vec3(state, a["NORMAL"], true);
@@ -2514,6 +2552,60 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> state) {
if (a.has("TEXCOORD_1")) {
array[Mesh::ARRAY_TEX_UV2] = _decode_accessor_as_vec2(state, a["TEXCOORD_1"], true);
}
+ for (int custom_i = 0; custom_i < 3; custom_i++) {
+ Vector<float> cur_custom;
+ Vector<Vector2> texcoord_first;
+ Vector<Vector2> texcoord_second;
+
+ int texcoord_i = 2 + 2 * custom_i;
+ String gltf_texcoord_key = vformat("TEXCOORD_%d", texcoord_i);
+ int num_channels = 0;
+ if (a.has(gltf_texcoord_key)) {
+ texcoord_first = _decode_accessor_as_vec2(state, a[gltf_texcoord_key], true);
+ num_channels = 2;
+ }
+ gltf_texcoord_key = vformat("TEXCOORD_%d", texcoord_i + 1);
+ if (a.has(gltf_texcoord_key)) {
+ texcoord_second = _decode_accessor_as_vec2(state, a[gltf_texcoord_key], true);
+ num_channels = 4;
+ }
+ if (!num_channels) {
+ break;
+ }
+ if (num_channels == 2 || num_channels == 4) {
+ cur_custom.resize(vertex_num * num_channels);
+ for (int32_t uv_i = 0; uv_i < texcoord_first.size() && uv_i < vertex_num; uv_i++) {
+ cur_custom.write[uv_i * num_channels + 0] = texcoord_first[uv_i].x;
+ cur_custom.write[uv_i * num_channels + 1] = texcoord_first[uv_i].y;
+ }
+ // Vector.resize seems to not zero-initialize. Ensure all unused elements are 0:
+ for (int32_t uv_i = texcoord_first.size(); uv_i < vertex_num; uv_i++) {
+ cur_custom.write[uv_i * num_channels + 0] = 0;
+ cur_custom.write[uv_i * num_channels + 1] = 0;
+ }
+ }
+ if (num_channels == 4) {
+ for (int32_t uv_i = 0; uv_i < texcoord_second.size() && uv_i < vertex_num; uv_i++) {
+ // num_channels must be 4
+ cur_custom.write[uv_i * num_channels + 2] = texcoord_second[uv_i].x;
+ cur_custom.write[uv_i * num_channels + 3] = texcoord_second[uv_i].y;
+ }
+ // Vector.resize seems to not zero-initialize. Ensure all unused elements are 0:
+ for (int32_t uv_i = texcoord_second.size(); uv_i < vertex_num; uv_i++) {
+ cur_custom.write[uv_i * num_channels + 2] = 0;
+ cur_custom.write[uv_i * num_channels + 3] = 0;
+ }
+ }
+ if (cur_custom.size() > 0) {
+ array[Mesh::ARRAY_CUSTOM0 + custom_i] = cur_custom;
+ int custom_shift = Mesh::ARRAY_FORMAT_CUSTOM0_SHIFT + custom_i * Mesh::ARRAY_FORMAT_CUSTOM_BITS;
+ if (num_channels == 2) {
+ flags |= Mesh::ARRAY_CUSTOM_RG_FLOAT << custom_shift;
+ } else {
+ flags |= Mesh::ARRAY_CUSTOM_RGBA_FLOAT << custom_shift;
+ }
+ }
+ }
if (a.has("COLOR_0")) {
array[Mesh::ARRAY_COLOR] = _decode_accessor_as_color(state, a["COLOR_0"], true);
has_vertex_color = true;
@@ -2525,10 +2617,9 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> state) {
PackedInt32Array joints_1 = _decode_accessor_as_ints(state, a["JOINTS_1"], true);
ERR_FAIL_COND_V(joints_0.size() != joints_0.size(), ERR_INVALID_DATA);
int32_t weight_8_count = JOINT_GROUP_SIZE * 2;
- int32_t vertex_count = joints_0.size() / JOINT_GROUP_SIZE;
Vector<int> joints;
- joints.resize(vertex_count * weight_8_count);
- for (int32_t vertex_i = 0; vertex_i < vertex_count; vertex_i++) {
+ joints.resize(vertex_num * weight_8_count);
+ for (int32_t vertex_i = 0; vertex_i < vertex_num; vertex_i++) {
joints.write[vertex_i * weight_8_count + 0] = joints_0[vertex_i * JOINT_GROUP_SIZE + 0];
joints.write[vertex_i * weight_8_count + 1] = joints_0[vertex_i * JOINT_GROUP_SIZE + 1];
joints.write[vertex_i * weight_8_count + 2] = joints_0[vertex_i * JOINT_GROUP_SIZE + 2];
@@ -2567,9 +2658,8 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> state) {
Vector<float> weights;
ERR_FAIL_COND_V(weights_0.size() != weights_1.size(), ERR_INVALID_DATA);
int32_t weight_8_count = JOINT_GROUP_SIZE * 2;
- int32_t vertex_count = weights_0.size() / JOINT_GROUP_SIZE;
- weights.resize(vertex_count * weight_8_count);
- for (int32_t vertex_i = 0; vertex_i < vertex_count; vertex_i++) {
+ weights.resize(vertex_num * weight_8_count);
+ for (int32_t vertex_i = 0; vertex_i < vertex_num; vertex_i++) {
weights.write[vertex_i * weight_8_count + 0] = weights_0[vertex_i * JOINT_GROUP_SIZE + 0];
weights.write[vertex_i * weight_8_count + 1] = weights_0[vertex_i * JOINT_GROUP_SIZE + 1];
weights.write[vertex_i * weight_8_count + 2] = weights_0[vertex_i * JOINT_GROUP_SIZE + 2];
@@ -2797,7 +2887,7 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> state) {
mat = mat3d;
}
- import_mesh->add_surface(primitive, array, morphs, Dictionary(), mat, mat.is_valid() ? mat->get_name() : String());
+ import_mesh->add_surface(primitive, array, morphs, Dictionary(), mat, mat.is_valid() ? mat->get_name() : String(), flags);
}
Vector<float> blend_weights;
@@ -2953,6 +3043,7 @@ Error GLTFDocument::_parse_images(Ref<GLTFState> state, const String &p_base_pat
}
}
} else { // Relative path to an external image file.
+ uri = uri.uri_decode();
uri = p_base_path.plus_file(uri).replace("\\", "/"); // Fix for Windows.
// ResourceLoader will rely on the file extension to use the relevant loader.
// The spec says that if mimeType is defined, it should take precedence (e.g.
@@ -3643,10 +3734,7 @@ void GLTFDocument::spec_gloss_to_metal_base_color(const Color &p_specular_factor
r_base_color.g = Math::lerp(base_color_from_diffuse.g, base_color_from_specular.g, r_metallic * r_metallic);
r_base_color.b = Math::lerp(base_color_from_diffuse.b, base_color_from_specular.b, r_metallic * r_metallic);
r_base_color.a = p_diffuse.a;
- r_base_color.r = CLAMP(r_base_color.r, 0.0f, 1.0f);
- r_base_color.g = CLAMP(r_base_color.g, 0.0f, 1.0f);
- r_base_color.b = CLAMP(r_base_color.b, 0.0f, 1.0f);
- r_base_color.a = CLAMP(r_base_color.a, 0.0f, 1.0f);
+ r_base_color = r_base_color.clamp();
}
GLTFNodeIndex GLTFDocument::_find_highest_node(Ref<GLTFState> state, const Vector<GLTFNodeIndex> &subset) {
@@ -4174,6 +4262,7 @@ Error GLTFDocument::_create_skeletons(Ref<GLTFState> state) {
Skeleton3D *skeleton = memnew(Skeleton3D);
gltf_skeleton->godot_skeleton = skeleton;
+ state->skeleton3d_to_gltf_skeleton[skeleton->get_instance_id()] = skel_i;
// Make a unique name, no gltf node represents this skeleton
skeleton->set_name(_gen_unique_name(state, "Skeleton3D"));
@@ -4259,6 +4348,16 @@ Error GLTFDocument::_map_skin_joints_indices_to_skeleton_bone_indices(Ref<GLTFSt
Error GLTFDocument::_serialize_skins(Ref<GLTFState> state) {
_remove_duplicate_skins(state);
+ Array json_skins;
+ for (int skin_i = 0; skin_i < state->skins.size(); skin_i++) {
+ Ref<GLTFSkin> gltf_skin = state->skins[skin_i];
+ Dictionary json_skin;
+ json_skin["inverseBindMatrices"] = _encode_accessor_as_xform(state, gltf_skin->inverse_binds, false);
+ json_skin["joints"] = gltf_skin->get_joints();
+ json_skin["name"] = gltf_skin->get_name();
+ json_skins.push_back(json_skin);
+ }
+ state->json["skins"] = json_skins;
return OK;
}
@@ -4356,8 +4455,8 @@ Error GLTFDocument::_serialize_lights(Ref<GLTFState> state) {
color[1] = light->color.g;
color[2] = light->color.b;
d["color"] = color;
- d["type"] = light->type;
- if (light->type == "spot") {
+ d["type"] = light->light_type;
+ if (light->light_type == "spot") {
Dictionary s;
float inner_cone_angle = light->inner_cone_angle;
s["innerConeAngle"] = inner_cone_angle;
@@ -4403,16 +4502,16 @@ Error GLTFDocument::_serialize_cameras(Ref<GLTFState> state) {
Dictionary og;
og["ymag"] = Math::deg2rad(camera->get_fov_size());
og["xmag"] = Math::deg2rad(camera->get_fov_size());
- og["zfar"] = camera->get_zfar();
- og["znear"] = camera->get_znear();
+ og["zfar"] = camera->get_depth_far();
+ og["znear"] = camera->get_depth_near();
d["orthographic"] = og;
d["type"] = "orthographic";
} else if (camera->get_perspective()) {
Dictionary ppt;
// GLTF spec is in radians, Godot's camera is in degrees.
ppt["yfov"] = Math::deg2rad(camera->get_fov_size());
- ppt["zfar"] = camera->get_zfar();
- ppt["znear"] = camera->get_znear();
+ ppt["zfar"] = camera->get_depth_far();
+ ppt["znear"] = camera->get_depth_near();
d["perspective"] = ppt;
d["type"] = "perspective";
}
@@ -4452,7 +4551,7 @@ Error GLTFDocument::_parse_lights(Ref<GLTFState> state) {
light.instantiate();
ERR_FAIL_COND_V(!d.has("type"), ERR_PARSE_ERROR);
const String &type = d["type"];
- light->type = type;
+ light->light_type = type;
if (d.has("color")) {
const Array &arr = d["color"];
@@ -4503,8 +4602,8 @@ Error GLTFDocument::_parse_cameras(Ref<GLTFState> state) {
const Dictionary &og = d["orthographic"];
// GLTF spec is in radians, Godot's camera is in degrees.
camera->set_fov_size(Math::rad2deg(real_t(og["ymag"])));
- camera->set_zfar(og["zfar"]);
- camera->set_znear(og["znear"]);
+ camera->set_depth_far(og["zfar"]);
+ camera->set_depth_near(og["znear"]);
} else {
camera->set_fov_size(10);
}
@@ -4514,8 +4613,8 @@ Error GLTFDocument::_parse_cameras(Ref<GLTFState> state) {
const Dictionary &ppt = d["perspective"];
// GLTF spec is in radians, Godot's camera is in degrees.
camera->set_fov_size(Math::rad2deg(real_t(ppt["yfov"])));
- camera->set_zfar(ppt["zfar"]);
- camera->set_znear(ppt["znear"]);
+ camera->set_depth_far(ppt["zfar"]);
+ camera->set_depth_near(ppt["znear"]);
} else {
camera->set_fov_size(10);
}
@@ -4576,15 +4675,15 @@ Error GLTFDocument::_serialize_animations(Ref<GLTFState> state) {
for (Map<int, GLTFAnimation::Track>::Element *track_i = gltf_animation->get_tracks().front(); track_i; track_i = track_i->next()) {
GLTFAnimation::Track track = track_i->get();
- if (track.translation_track.times.size()) {
+ if (track.position_track.times.size()) {
Dictionary t;
t["sampler"] = samplers.size();
Dictionary s;
- s["interpolation"] = interpolation_to_string(track.translation_track.interpolation);
- Vector<real_t> times = Variant(track.translation_track.times);
+ s["interpolation"] = interpolation_to_string(track.position_track.interpolation);
+ Vector<real_t> times = Variant(track.position_track.times);
s["input"] = _encode_accessor_as_floats(state, times, false);
- Vector<Vector3> values = Variant(track.translation_track.values);
+ Vector<Vector3> values = Variant(track.position_track.values);
s["output"] = _encode_accessor_as_vec3(state, values, false);
samplers.push_back(s);
@@ -4637,30 +4736,74 @@ Error GLTFDocument::_serialize_animations(Ref<GLTFState> state) {
channels.push_back(t);
}
if (track.weight_tracks.size()) {
+ double length = 0.0f;
+
+ for (int32_t track_idx = 0; track_idx < track.weight_tracks.size(); track_idx++) {
+ int32_t last_time_index = track.weight_tracks[track_idx].times.size() - 1;
+ length = MAX(length, track.weight_tracks[track_idx].times[last_time_index]);
+ }
+
Dictionary t;
t["sampler"] = samplers.size();
Dictionary s;
-
Vector<real_t> times;
- Vector<real_t> values;
+ const double increment = 1.0 / BAKE_FPS;
+ {
+ double time = 0.0;
+ bool last = false;
+ while (true) {
+ times.push_back(time);
+ if (last) {
+ break;
+ }
+ time += increment;
+ if (time >= length) {
+ last = true;
+ time = length;
+ }
+ }
+ }
- for (int32_t times_i = 0; times_i < track.weight_tracks[0].times.size(); times_i++) {
- real_t time = track.weight_tracks[0].times[times_i];
- times.push_back(time);
+ for (int32_t track_idx = 0; track_idx < track.weight_tracks.size(); track_idx++) {
+ double time = 0.0;
+ bool last = false;
+ Vector<real_t> weight_track;
+ while (true) {
+ float weight = _interpolate_track<float>(track.weight_tracks[track_idx].times,
+ track.weight_tracks[track_idx].values,
+ time,
+ track.weight_tracks[track_idx].interpolation);
+ weight_track.push_back(weight);
+ if (last) {
+ break;
+ }
+ time += increment;
+ if (time >= length) {
+ last = true;
+ time = length;
+ }
+ }
+ track.weight_tracks.write[track_idx].times = times;
+ track.weight_tracks.write[track_idx].values = weight_track;
}
- values.resize(times.size() * track.weight_tracks.size());
- // TODO Sort by order in blend shapes
+ Vector<real_t> all_track_times = times;
+ Vector<real_t> all_track_values;
+ int32_t values_size = track.weight_tracks[0].values.size();
+ int32_t weight_tracks_size = track.weight_tracks.size();
+ all_track_values.resize(weight_tracks_size * values_size);
for (int k = 0; k < track.weight_tracks.size(); k++) {
Vector<float> wdata = track.weight_tracks[k].values;
for (int l = 0; l < wdata.size(); l++) {
- values.write[l * track.weight_tracks.size() + k] = wdata.write[l];
+ int32_t index = l * weight_tracks_size + k;
+ ERR_BREAK(index >= all_track_values.size());
+ all_track_values.write[index] = wdata.write[l];
}
}
s["interpolation"] = interpolation_to_string(track.weight_tracks[track.weight_tracks.size() - 1].interpolation);
- s["input"] = _encode_accessor_as_floats(state, times, false);
- s["output"] = _encode_accessor_as_floats(state, values, false);
+ s["input"] = _encode_accessor_as_floats(state, all_track_times, false);
+ s["output"] = _encode_accessor_as_floats(state, all_track_values, false);
samplers.push_back(s);
@@ -4769,10 +4912,10 @@ Error GLTFDocument::_parse_animations(Ref<GLTFState> state) {
const Vector<float> times = _decode_accessor_as_floats(state, input, false);
if (path == "translation") {
- const Vector<Vector3> translations = _decode_accessor_as_vec3(state, output, false);
- track->translation_track.interpolation = interp;
- track->translation_track.times = Variant(times); //convert via variant
- track->translation_track.values = Variant(translations); //convert via variant
+ const Vector<Vector3> positions = _decode_accessor_as_vec3(state, output, false);
+ track->position_track.interpolation = interp;
+ track->position_track.times = Variant(times); //convert via variant
+ track->position_track.values = Variant(positions); //convert via variant
} else if (path == "rotation") {
const Vector<Quaternion> rotations = _decode_accessor_as_quaternion(state, output, false);
track->rotation_track.interpolation = interp;
@@ -4794,7 +4937,7 @@ Error GLTFDocument::_parse_animations(Ref<GLTFState> state) {
track->weight_tracks.resize(wc);
const int expected_value_count = times.size() * output_count * wc;
- ERR_FAIL_COND_V_MSG(weights.size() != expected_value_count, ERR_PARSE_ERROR, "Invalid weight data, expected " + itos(expected_value_count) + " weight values, got " + itos(weights.size()) + " instead.");
+ ERR_CONTINUE_MSG(weights.size() != expected_value_count, "Invalid weight data, expected " + itos(expected_value_count) + " weight values, got " + itos(weights.size()) + " instead.");
const int wlen = weights.size() / wc;
for (int k = 0; k < wc; k++) { //separate tracks, having them together is not such a good idea
@@ -4859,7 +5002,7 @@ BoneAttachment3D *GLTFDocument::_generate_bone_attachment(Ref<GLTFState> state,
return bone_attachment;
}
-GLTFMeshIndex GLTFDocument::_convert_mesh_instance(Ref<GLTFState> state, MeshInstance3D *p_mesh_instance) {
+GLTFMeshIndex GLTFDocument::_convert_mesh_to_gltf(Ref<GLTFState> state, MeshInstance3D *p_mesh_instance) {
ERR_FAIL_NULL_V(p_mesh_instance, -1);
if (p_mesh_instance->get_mesh().is_null()) {
return -1;
@@ -4896,7 +5039,7 @@ GLTFMeshIndex GLTFDocument::_convert_mesh_instance(Ref<GLTFState> state, MeshIns
if (p_mesh_instance->get_material_override().is_valid()) {
mat = p_mesh_instance->get_material_override();
}
- import_mesh->add_surface(primitive_type, arrays, blend_shape_arrays, Dictionary(), mat, surface_name);
+ import_mesh->add_surface(primitive_type, arrays, blend_shape_arrays, Dictionary(), mat, surface_name, godot_mesh->surface_get_format(surface_i));
}
for (int32_t blend_i = 0; blend_i < blend_count; blend_i++) {
blend_weights.write[blend_i] = 0.0f;
@@ -4950,7 +5093,7 @@ Node3D *GLTFDocument::_generate_light(Ref<GLTFState> state, Node *scene_parent,
intensity /= 100;
}
- if (l->type == "directional") {
+ if (l->light_type == "directional") {
DirectionalLight3D *light = memnew(DirectionalLight3D);
light->set_param(Light3D::PARAM_ENERGY, intensity);
light->set_color(l->color);
@@ -4960,15 +5103,15 @@ Node3D *GLTFDocument::_generate_light(Ref<GLTFState> state, Node *scene_parent,
const float range = CLAMP(l->range, 0, 4096);
// Doubling the range will double the effective brightness, so we need double attenuation (half brightness).
// We want to have double intensity give double brightness, so we need half the attenuation.
- const float attenuation = range / intensity;
- if (l->type == "point") {
+ const float attenuation = range / (intensity * 2048);
+ if (l->light_type == "point") {
OmniLight3D *light = memnew(OmniLight3D);
light->set_param(OmniLight3D::PARAM_ATTENUATION, attenuation);
light->set_param(OmniLight3D::PARAM_RANGE, range);
light->set_color(l->color);
return light;
}
- if (l->type == "spot") {
+ if (l->light_type == "spot") {
SpotLight3D *light = memnew(SpotLight3D);
light->set_param(SpotLight3D::PARAM_ATTENUATION, attenuation);
light->set_param(SpotLight3D::PARAM_RANGE, range);
@@ -4995,9 +5138,9 @@ Camera3D *GLTFDocument::_generate_camera(Ref<GLTFState> state, Node *scene_paren
Ref<GLTFCamera> c = state->cameras[gltf_node->camera];
if (c->get_perspective()) {
- camera->set_perspective(c->get_fov_size(), c->get_znear(), c->get_zfar());
+ camera->set_perspective(c->get_fov_size(), c->get_depth_near(), c->get_depth_far());
} else {
- camera->set_orthogonal(c->get_fov_size(), c->get_znear(), c->get_zfar());
+ camera->set_orthogonal(c->get_fov_size(), c->get_depth_near(), c->get_depth_far());
}
return camera;
@@ -5011,14 +5154,10 @@ GLTFCameraIndex GLTFDocument::_convert_camera(Ref<GLTFState> state, Camera3D *p_
if (p_camera->get_projection() == Camera3D::Projection::PROJECTION_PERSPECTIVE) {
c->set_perspective(true);
- c->set_fov_size(p_camera->get_fov());
- c->set_zfar(p_camera->get_far());
- c->set_znear(p_camera->get_near());
- } else {
- c->set_fov_size(p_camera->get_fov());
- c->set_zfar(p_camera->get_far());
- c->set_znear(p_camera->get_near());
}
+ c->set_fov_size(p_camera->get_fov());
+ c->set_depth_far(p_camera->get_far());
+ c->set_depth_near(p_camera->get_near());
GLTFCameraIndex camera_index = state->cameras.size();
state->cameras.push_back(c);
return camera_index;
@@ -5031,22 +5170,22 @@ GLTFLightIndex GLTFDocument::_convert_light(Ref<GLTFState> state, Light3D *p_lig
l.instantiate();
l->color = p_light->get_color();
if (cast_to<DirectionalLight3D>(p_light)) {
- l->type = "directional";
+ l->light_type = "directional";
DirectionalLight3D *light = cast_to<DirectionalLight3D>(p_light);
l->intensity = light->get_param(DirectionalLight3D::PARAM_ENERGY);
l->range = FLT_MAX; // Range for directional lights is infinite in Godot.
} else if (cast_to<OmniLight3D>(p_light)) {
- l->type = "point";
+ l->light_type = "point";
OmniLight3D *light = cast_to<OmniLight3D>(p_light);
l->range = light->get_param(OmniLight3D::PARAM_RANGE);
float attenuation = p_light->get_param(OmniLight3D::PARAM_ATTENUATION);
- l->intensity = l->range / attenuation;
+ l->intensity = l->range / (attenuation * 2048);
} else if (cast_to<SpotLight3D>(p_light)) {
- l->type = "spot";
+ l->light_type = "spot";
SpotLight3D *light = cast_to<SpotLight3D>(p_light);
l->range = light->get_param(SpotLight3D::PARAM_RANGE);
float attenuation = light->get_param(SpotLight3D::PARAM_ATTENUATION);
- l->intensity = l->range / attenuation;
+ l->intensity = l->range / (attenuation * 2048);
l->outer_cone_angle = Math::deg2rad(light->get_param(SpotLight3D::PARAM_SPOT_ANGLE));
// This equation is the inverse of the import equation (which has a desmos link).
@@ -5060,22 +5199,11 @@ GLTFLightIndex GLTFDocument::_convert_light(Ref<GLTFState> state, Light3D *p_lig
return light_index;
}
-GLTFSkeletonIndex GLTFDocument::_convert_skeleton(Ref<GLTFState> state, Skeleton3D *p_skeleton) {
- print_verbose("glTF: Converting skeleton: " + p_skeleton->get_name());
- Ref<GLTFSkeleton> gltf_skeleton;
- gltf_skeleton.instantiate();
- gltf_skeleton->set_name(_gen_unique_name(state, p_skeleton->get_name()));
- gltf_skeleton->godot_skeleton = p_skeleton;
- GLTFSkeletonIndex skeleton_i = state->skeletons.size();
- state->skeletons.push_back(gltf_skeleton);
- return skeleton_i;
-}
-
void GLTFDocument::_convert_spatial(Ref<GLTFState> state, Node3D *p_spatial, Ref<GLTFNode> p_node) {
Transform3D xform = p_spatial->get_transform();
p_node->scale = xform.basis.get_scale();
p_node->rotation = xform.basis.get_rotation_quaternion();
- p_node->translation = xform.origin;
+ p_node->position = xform.origin;
}
Node3D *GLTFDocument::_generate_spatial(Ref<GLTFState> state, Node *scene_parent, const GLTFNodeIndex node_index) {
@@ -5086,7 +5214,7 @@ Node3D *GLTFDocument::_generate_spatial(Ref<GLTFState> state, Node *scene_parent
return spatial;
}
-void GLTFDocument::_convert_scene_node(Ref<GLTFState> state, Node *p_current, Node *p_root, const GLTFNodeIndex p_gltf_parent, const GLTFNodeIndex p_gltf_root) {
+void GLTFDocument::_convert_scene_node(Ref<GLTFState> state, Node *p_current, const GLTFNodeIndex p_gltf_parent, const GLTFNodeIndex p_gltf_root) {
bool retflag = true;
_check_visibility(p_current, retflag);
if (retflag) {
@@ -5100,37 +5228,41 @@ void GLTFDocument::_convert_scene_node(Ref<GLTFState> state, Node *p_current, No
_convert_spatial(state, spatial, gltf_node);
}
if (cast_to<MeshInstance3D>(p_current)) {
- Node3D *spatial = cast_to<Node3D>(p_current);
- _convert_mesh_to_gltf(p_current, state, spatial, gltf_node);
+ MeshInstance3D *mi = cast_to<MeshInstance3D>(p_current);
+ _convert_mesh_instance_to_gltf(mi, state, gltf_node);
} else if (cast_to<BoneAttachment3D>(p_current)) {
- _convert_bone_attachment_to_gltf(p_current, state, gltf_node, retflag);
- // TODO 2020-12-21 iFire Handle the case of objects under the bone attachment.
+ BoneAttachment3D *bone = cast_to<BoneAttachment3D>(p_current);
+ _convert_bone_attachment_to_gltf(bone, state, p_gltf_parent, p_gltf_root, gltf_node);
return;
} else if (cast_to<Skeleton3D>(p_current)) {
- _convert_skeleton_to_gltf(p_current, state, p_gltf_parent, p_gltf_root, gltf_node, p_root);
+ Skeleton3D *skel = cast_to<Skeleton3D>(p_current);
+ _convert_skeleton_to_gltf(skel, state, p_gltf_parent, p_gltf_root, gltf_node);
// We ignore the Godot Engine node that is the skeleton.
return;
} else if (cast_to<MultiMeshInstance3D>(p_current)) {
- _convert_mult_mesh_instance_to_gltf(p_current, p_gltf_parent, p_gltf_root, gltf_node, state, p_root);
+ MultiMeshInstance3D *multi = cast_to<MultiMeshInstance3D>(p_current);
+ _convert_mult_mesh_instance_to_gltf(multi, p_gltf_parent, p_gltf_root, gltf_node, state);
#ifdef MODULE_CSG_ENABLED
} else if (cast_to<CSGShape3D>(p_current)) {
- if (p_current->get_parent() && cast_to<CSGShape3D>(p_current)->is_root_shape()) {
- _convert_csg_shape_to_gltf(p_current, p_gltf_parent, gltf_node, state);
+ CSGShape3D *shape = cast_to<CSGShape3D>(p_current);
+ if (shape->get_parent() && shape->is_root_shape()) {
+ _convert_csg_shape_to_gltf(shape, p_gltf_parent, gltf_node, state);
}
#endif // MODULE_CSG_ENABLED
#ifdef MODULE_GRIDMAP_ENABLED
} else if (cast_to<GridMap>(p_current)) {
- _convert_grid_map_to_gltf(p_current, p_gltf_parent, p_gltf_root, gltf_node, state, p_root);
+ GridMap *gridmap = Object::cast_to<GridMap>(p_current);
+ _convert_grid_map_to_gltf(gridmap, p_gltf_parent, p_gltf_root, gltf_node, state);
#endif // MODULE_GRIDMAP_ENABLED
} else if (cast_to<Camera3D>(p_current)) {
Camera3D *camera = Object::cast_to<Camera3D>(p_current);
- _convert_camera_to_gltf(camera, state, camera, gltf_node);
+ _convert_camera_to_gltf(camera, state, gltf_node);
} else if (cast_to<Light3D>(p_current)) {
Light3D *light = Object::cast_to<Light3D>(p_current);
- _convert_light_to_gltf(light, state, light, gltf_node);
+ _convert_light_to_gltf(light, state, gltf_node);
} else if (cast_to<AnimationPlayer>(p_current)) {
AnimationPlayer *animation_player = Object::cast_to<AnimationPlayer>(p_current);
- _convert_animation_player_to_gltf(animation_player, state, p_gltf_parent, p_gltf_root, gltf_node, p_current, p_root);
+ _convert_animation_player_to_gltf(animation_player, state, p_gltf_parent, p_gltf_root, gltf_node, p_current);
}
GLTFNodeIndex current_node_i = state->nodes.size();
GLTFNodeIndex gltf_root = p_gltf_root;
@@ -5142,13 +5274,13 @@ void GLTFDocument::_convert_scene_node(Ref<GLTFState> state, Node *p_current, No
}
_create_gltf_node(state, p_current, current_node_i, p_gltf_parent, gltf_root, gltf_node);
for (int node_i = 0; node_i < p_current->get_child_count(); node_i++) {
- _convert_scene_node(state, p_current->get_child(node_i), p_root, current_node_i, gltf_root);
+ _convert_scene_node(state, p_current->get_child(node_i), current_node_i, gltf_root);
}
}
#ifdef MODULE_CSG_ENABLED
-void GLTFDocument::_convert_csg_shape_to_gltf(Node *p_current, GLTFNodeIndex p_gltf_parent, Ref<GLTFNode> gltf_node, Ref<GLTFState> state) {
- CSGShape3D *csg = Object::cast_to<CSGShape3D>(p_current);
+void GLTFDocument::_convert_csg_shape_to_gltf(CSGShape3D *p_current, GLTFNodeIndex p_gltf_parent, Ref<GLTFNode> gltf_node, Ref<GLTFState> state) {
+ CSGShape3D *csg = p_current;
csg->call("_update_shape");
Array meshes = csg->get_meshes();
if (meshes.size() != 2) {
@@ -5179,16 +5311,15 @@ void GLTFDocument::_create_gltf_node(Ref<GLTFState> state, Node *p_scene_parent,
GLTFNodeIndex p_parent_node_index, GLTFNodeIndex p_root_gltf_node, Ref<GLTFNode> gltf_node) {
state->scene_nodes.insert(current_node_i, p_scene_parent);
state->nodes.push_back(gltf_node);
- if (current_node_i == p_parent_node_index) {
- return;
- }
+ ERR_FAIL_COND(current_node_i == p_parent_node_index);
+ state->nodes.write[current_node_i]->parent = p_parent_node_index;
if (p_parent_node_index == -1) {
return;
}
state->nodes.write[p_parent_node_index]->children.push_back(current_node_i);
}
-void GLTFDocument::_convert_animation_player_to_gltf(AnimationPlayer *animation_player, Ref<GLTFState> state, const GLTFNodeIndex &p_gltf_current, const GLTFNodeIndex &p_gltf_root_index, Ref<GLTFNode> p_gltf_node, Node *p_scene_parent, Node *p_root) {
+void GLTFDocument::_convert_animation_player_to_gltf(AnimationPlayer *animation_player, Ref<GLTFState> state, GLTFNodeIndex p_gltf_current, GLTFNodeIndex p_gltf_root_index, Ref<GLTFNode> p_gltf_node, Node *p_scene_parent) {
ERR_FAIL_COND(!animation_player);
state->animation_players.push_back(animation_player);
print_verbose(String("glTF: Converting animation player: ") + animation_player->get_name());
@@ -5207,7 +5338,7 @@ void GLTFDocument::_check_visibility(Node *p_node, bool &retflag) {
retflag = false;
}
-void GLTFDocument::_convert_camera_to_gltf(Camera3D *camera, Ref<GLTFState> state, Node3D *spatial, Ref<GLTFNode> gltf_node) {
+void GLTFDocument::_convert_camera_to_gltf(Camera3D *camera, Ref<GLTFState> state, Ref<GLTFNode> gltf_node) {
ERR_FAIL_COND(!camera);
GLTFCameraIndex camera_index = _convert_camera(state, camera);
if (camera_index != -1) {
@@ -5215,7 +5346,7 @@ void GLTFDocument::_convert_camera_to_gltf(Camera3D *camera, Ref<GLTFState> stat
}
}
-void GLTFDocument::_convert_light_to_gltf(Light3D *light, Ref<GLTFState> state, Node3D *spatial, Ref<GLTFNode> gltf_node) {
+void GLTFDocument::_convert_light_to_gltf(Light3D *light, Ref<GLTFState> state, Ref<GLTFNode> gltf_node) {
ERR_FAIL_COND(!light);
GLTFLightIndex light_index = _convert_light(state, light);
if (light_index != -1) {
@@ -5224,43 +5355,39 @@ void GLTFDocument::_convert_light_to_gltf(Light3D *light, Ref<GLTFState> state,
}
#ifdef MODULE_GRIDMAP_ENABLED
-void GLTFDocument::_convert_grid_map_to_gltf(Node *p_scene_parent, const GLTFNodeIndex &p_parent_node_index, const GLTFNodeIndex &p_root_node_index, Ref<GLTFNode> gltf_node, Ref<GLTFState> state, Node *p_root_node) {
- GridMap *grid_map = Object::cast_to<GridMap>(p_scene_parent);
- ERR_FAIL_COND(!grid_map);
- Array cells = grid_map->get_used_cells();
+void GLTFDocument::_convert_grid_map_to_gltf(GridMap *p_grid_map, GLTFNodeIndex p_parent_node_index, GLTFNodeIndex p_root_node_index, Ref<GLTFNode> gltf_node, Ref<GLTFState> state) {
+ Array cells = p_grid_map->get_used_cells();
for (int32_t k = 0; k < cells.size(); k++) {
GLTFNode *new_gltf_node = memnew(GLTFNode);
gltf_node->children.push_back(state->nodes.size());
state->nodes.push_back(new_gltf_node);
Vector3 cell_location = cells[k];
- int32_t cell = grid_map->get_cell_item(
+ int32_t cell = p_grid_map->get_cell_item(
Vector3(cell_location.x, cell_location.y, cell_location.z));
EditorSceneImporterMeshNode3D *import_mesh_node = memnew(EditorSceneImporterMeshNode3D);
- import_mesh_node->set_mesh(grid_map->get_mesh_library()->get_item_mesh(cell));
+ import_mesh_node->set_mesh(p_grid_map->get_mesh_library()->get_item_mesh(cell));
Transform3D cell_xform;
cell_xform.basis.set_orthogonal_index(
- grid_map->get_cell_item_orientation(
+ p_grid_map->get_cell_item_orientation(
Vector3(cell_location.x, cell_location.y, cell_location.z)));
- cell_xform.basis.scale(Vector3(grid_map->get_cell_scale(),
- grid_map->get_cell_scale(),
- grid_map->get_cell_scale()));
- cell_xform.set_origin(grid_map->map_to_world(
+ cell_xform.basis.scale(Vector3(p_grid_map->get_cell_scale(),
+ p_grid_map->get_cell_scale(),
+ p_grid_map->get_cell_scale()));
+ cell_xform.set_origin(p_grid_map->map_to_world(
Vector3(cell_location.x, cell_location.y, cell_location.z)));
Ref<GLTFMesh> gltf_mesh;
gltf_mesh.instantiate();
gltf_mesh = import_mesh_node;
new_gltf_node->mesh = state->meshes.size();
state->meshes.push_back(gltf_mesh);
- new_gltf_node->xform = cell_xform * grid_map->get_transform();
- new_gltf_node->set_name(_gen_unique_name(state, grid_map->get_mesh_library()->get_item_name(cell)));
+ new_gltf_node->xform = cell_xform * p_grid_map->get_transform();
+ new_gltf_node->set_name(_gen_unique_name(state, p_grid_map->get_mesh_library()->get_item_name(cell)));
}
}
#endif // MODULE_GRIDMAP_ENABLED
-void GLTFDocument::_convert_mult_mesh_instance_to_gltf(Node *p_scene_parent, const GLTFNodeIndex &p_parent_node_index, const GLTFNodeIndex &p_root_node_index, Ref<GLTFNode> gltf_node, Ref<GLTFState> state, Node *p_root_node) {
- MultiMeshInstance3D *multi_mesh_instance = Object::cast_to<MultiMeshInstance3D>(p_scene_parent);
- ERR_FAIL_COND(!multi_mesh_instance);
- Ref<MultiMesh> multi_mesh = multi_mesh_instance->get_multimesh();
+void GLTFDocument::_convert_mult_mesh_instance_to_gltf(MultiMeshInstance3D *p_multi_mesh_instance, GLTFNodeIndex p_parent_node_index, GLTFNodeIndex p_root_node_index, Ref<GLTFNode> gltf_node, Ref<GLTFState> state) {
+ Ref<MultiMesh> multi_mesh = p_multi_mesh_instance->get_multimesh();
if (multi_mesh.is_valid()) {
for (int32_t instance_i = 0; instance_i < multi_mesh->get_instance_count();
instance_i++) {
@@ -5276,9 +5403,9 @@ void GLTFDocument::_convert_mult_mesh_instance_to_gltf(Node *p_scene_parent, con
transform.basis.set_quaternion_scale(quaternion,
Vector3(scale.x, 0, scale.y));
transform =
- multi_mesh_instance->get_transform() * transform;
+ p_multi_mesh_instance->get_transform() * transform;
} else if (multi_mesh->get_transform_format() == MultiMesh::TRANSFORM_3D) {
- transform = multi_mesh_instance->get_transform() *
+ transform = p_multi_mesh_instance->get_transform() *
multi_mesh->get_instance_transform(instance_i);
}
Ref<ArrayMesh> mm = multi_mesh->get_mesh();
@@ -5298,56 +5425,102 @@ void GLTFDocument::_convert_mult_mesh_instance_to_gltf(Node *p_scene_parent, con
state->meshes.push_back(gltf_mesh);
}
new_gltf_node->xform = transform;
- new_gltf_node->set_name(_gen_unique_name(state, multi_mesh_instance->get_name()));
+ new_gltf_node->set_name(_gen_unique_name(state, p_multi_mesh_instance->get_name()));
gltf_node->children.push_back(state->nodes.size());
state->nodes.push_back(new_gltf_node);
}
}
}
-void GLTFDocument::_convert_skeleton_to_gltf(Node *p_scene_parent, Ref<GLTFState> state, const GLTFNodeIndex &p_parent_node_index, const GLTFNodeIndex &p_root_node_index, Ref<GLTFNode> gltf_node, Node *p_root_node) {
- Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(p_scene_parent);
- if (skeleton) {
- // Remove placeholder skeleton3d node by not creating the gltf node
- // Skins are per mesh
- for (int node_i = 0; node_i < skeleton->get_child_count(); node_i++) {
- _convert_scene_node(state, skeleton->get_child(node_i), p_root_node, p_parent_node_index, p_root_node_index);
+void GLTFDocument::_convert_skeleton_to_gltf(Skeleton3D *p_skeleton3d, Ref<GLTFState> state, GLTFNodeIndex p_parent_node_index, GLTFNodeIndex p_root_node_index, Ref<GLTFNode> gltf_node) {
+ Skeleton3D *skeleton = p_skeleton3d;
+ Ref<GLTFSkeleton> gltf_skeleton;
+ gltf_skeleton.instantiate();
+ // GLTFSkeleton is only used to hold internal state data. It will not be written to the document.
+ //
+ gltf_skeleton->godot_skeleton = skeleton;
+ GLTFSkeletonIndex skeleton_i = state->skeletons.size();
+ state->skeleton3d_to_gltf_skeleton[skeleton->get_instance_id()] = skeleton_i;
+ state->skeletons.push_back(gltf_skeleton);
+
+ BoneId bone_count = skeleton->get_bone_count();
+ for (BoneId bone_i = 0; bone_i < bone_count; bone_i++) {
+ Ref<GLTFNode> joint_node;
+ joint_node.instantiate();
+ // Note that we cannot use _gen_unique_bone_name here, because glTF spec requires all node
+ // names to be unique regardless of whether or not they are used as joints.
+ joint_node->set_name(_gen_unique_name(state, skeleton->get_bone_name(bone_i)));
+ Transform3D xform = skeleton->get_bone_rest(bone_i) * skeleton->get_bone_pose(bone_i);
+ joint_node->scale = xform.basis.get_scale();
+ joint_node->rotation = xform.basis.get_rotation_quaternion();
+ joint_node->position = xform.origin;
+ joint_node->joint = true;
+ GLTFNodeIndex current_node_i = state->nodes.size();
+ state->scene_nodes.insert(current_node_i, skeleton);
+ state->nodes.push_back(joint_node);
+
+ gltf_skeleton->joints.push_back(current_node_i);
+ if (skeleton->get_bone_parent(bone_i) == -1) {
+ gltf_skeleton->roots.push_back(current_node_i);
+ }
+ gltf_skeleton->godot_bone_node.insert(bone_i, current_node_i);
+ }
+ for (BoneId bone_i = 0; bone_i < bone_count; bone_i++) {
+ GLTFNodeIndex current_node_i = gltf_skeleton->godot_bone_node[bone_i];
+ BoneId parent_bone_id = skeleton->get_bone_parent(bone_i);
+ if (parent_bone_id == -1) {
+ if (p_parent_node_index != -1) {
+ state->nodes.write[current_node_i]->parent = p_parent_node_index;
+ state->nodes.write[p_parent_node_index]->children.push_back(current_node_i);
+ }
+ } else {
+ GLTFNodeIndex parent_node_i = gltf_skeleton->godot_bone_node[parent_bone_id];
+ state->nodes.write[current_node_i]->parent = parent_node_i;
+ state->nodes.write[parent_node_i]->children.push_back(current_node_i);
}
}
+ // Remove placeholder skeleton3d node by not creating the gltf node
+ // Skins are per mesh
+ for (int node_i = 0; node_i < skeleton->get_child_count(); node_i++) {
+ _convert_scene_node(state, skeleton->get_child(node_i), p_parent_node_index, p_root_node_index);
+ }
}
-void GLTFDocument::_convert_bone_attachment_to_gltf(Node *p_scene_parent, Ref<GLTFState> state, Ref<GLTFNode> gltf_node, bool &retflag) {
- retflag = true;
- BoneAttachment3D *bone_attachment = Object::cast_to<BoneAttachment3D>(p_scene_parent);
- if (bone_attachment) {
- Node *node = bone_attachment->get_parent();
- while (node) {
- Skeleton3D *bone_attachment_skeleton = Object::cast_to<Skeleton3D>(node);
- if (bone_attachment_skeleton) {
- for (GLTFSkeletonIndex skeleton_i = 0; skeleton_i < state->skeletons.size(); skeleton_i++) {
- if (state->skeletons[skeleton_i]->godot_skeleton != bone_attachment_skeleton) {
- continue;
- }
- state->skeletons.write[skeleton_i]->bone_attachments.push_back(bone_attachment);
- break;
- }
- break;
- }
- node = node->get_parent();
+void GLTFDocument::_convert_bone_attachment_to_gltf(BoneAttachment3D *p_bone_attachment, Ref<GLTFState> state, GLTFNodeIndex p_parent_node_index, GLTFNodeIndex p_root_node_index, Ref<GLTFNode> gltf_node) {
+ Skeleton3D *skeleton;
+ // Note that relative transforms to external skeletons and pose overrides are not supported.
+ if (p_bone_attachment->get_use_external_skeleton()) {
+ skeleton = cast_to<Skeleton3D>(p_bone_attachment->get_node_or_null(p_bone_attachment->get_external_skeleton()));
+ } else {
+ skeleton = cast_to<Skeleton3D>(p_bone_attachment->get_parent());
+ }
+ GLTFSkeletonIndex skel_gltf_i = -1;
+ if (skeleton != nullptr && state->skeleton3d_to_gltf_skeleton.has(skeleton->get_instance_id())) {
+ skel_gltf_i = state->skeleton3d_to_gltf_skeleton[skeleton->get_instance_id()];
+ }
+ int bone_idx = -1;
+ if (skeleton != nullptr) {
+ bone_idx = p_bone_attachment->get_bone_idx();
+ if (bone_idx == -1) {
+ bone_idx = skeleton->find_bone(p_bone_attachment->get_bone_name());
}
- gltf_node.unref();
- return;
}
- retflag = false;
+ GLTFNodeIndex par_node_index = p_parent_node_index;
+ if (skeleton != nullptr && bone_idx != -1 && skel_gltf_i != -1) {
+ Ref<GLTFSkeleton> gltf_skeleton = state->skeletons.write[skel_gltf_i];
+ gltf_skeleton->bone_attachments.push_back(p_bone_attachment);
+ par_node_index = gltf_skeleton->joints[bone_idx];
+ }
+
+ for (int node_i = 0; node_i < p_bone_attachment->get_child_count(); node_i++) {
+ _convert_scene_node(state, p_bone_attachment->get_child(node_i), par_node_index, p_root_node_index);
+ }
}
-void GLTFDocument::_convert_mesh_to_gltf(Node *p_scene_parent, Ref<GLTFState> state, Node3D *spatial, Ref<GLTFNode> gltf_node) {
- MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(p_scene_parent);
- if (mi) {
- GLTFMeshIndex gltf_mesh_index = _convert_mesh_instance(state, mi);
- if (gltf_mesh_index != -1) {
- gltf_node->mesh = gltf_mesh_index;
- }
+void GLTFDocument::_convert_mesh_instance_to_gltf(MeshInstance3D *p_scene_parent, Ref<GLTFState> state, Ref<GLTFNode> gltf_node) {
+ GLTFMeshIndex gltf_mesh_index = _convert_mesh_to_gltf(state, p_scene_parent);
+ if (gltf_mesh_index != -1) {
+ gltf_node->mesh = gltf_mesh_index;
}
}
@@ -5658,8 +5831,8 @@ void GLTFDocument::_import_animation(Ref<GLTFState> state, AnimationPlayer *ap,
for (int i = 0; i < track.rotation_track.times.size(); i++) {
length = MAX(length, track.rotation_track.times[i]);
}
- for (int i = 0; i < track.translation_track.times.size(); i++) {
- length = MAX(length, track.translation_track.times[i]);
+ for (int i = 0; i < track.position_track.times.size(); i++) {
+ length = MAX(length, track.position_track.times[i]);
}
for (int i = 0; i < track.scale_track.times.size(); i++) {
length = MAX(length, track.scale_track.times[i]);
@@ -5673,7 +5846,7 @@ void GLTFDocument::_import_animation(Ref<GLTFState> state, AnimationPlayer *ap,
// Animated TRS properties will not affect a skinned mesh.
const bool transform_affects_skinned_mesh_instance = gltf_node->skeleton < 0 && gltf_node->skin >= 0;
- if ((track.rotation_track.values.size() || track.translation_track.values.size() || track.scale_track.values.size()) && !transform_affects_skinned_mesh_instance) {
+ if ((track.rotation_track.values.size() || track.position_track.values.size() || track.scale_track.values.size()) && !transform_affects_skinned_mesh_instance) {
//make transform track
int track_idx = animation->get_track_count();
animation->add_track(Animation::TYPE_TRANSFORM3D);
@@ -5691,8 +5864,8 @@ void GLTFDocument::_import_animation(Ref<GLTFState> state, AnimationPlayer *ap,
base_rot = state->nodes[track_i->key()]->rotation.normalized();
}
- if (!track.translation_track.values.size()) {
- base_pos = state->nodes[track_i->key()]->translation;
+ if (!track.position_track.values.size()) {
+ base_pos = state->nodes[track_i->key()]->position;
}
if (!track.scale_track.values.size()) {
@@ -5705,8 +5878,8 @@ void GLTFDocument::_import_animation(Ref<GLTFState> state, AnimationPlayer *ap,
Quaternion rot = base_rot;
Vector3 scale = base_scale;
- if (track.translation_track.times.size()) {
- pos = _interpolate_track<Vector3>(track.translation_track.times, track.translation_track.values, time, track.translation_track.interpolation);
+ if (track.position_track.times.size()) {
+ pos = _interpolate_track<Vector3>(track.position_track.times, track.position_track.values, time, track.position_track.interpolation);
}
if (track.rotation_track.times.size()) {
@@ -5801,10 +5974,6 @@ void GLTFDocument::_convert_mesh_instances(Ref<GLTFState> state) {
if (node->mesh < 0) {
continue;
}
- Array json_skins;
- if (state->json.has("skins")) {
- json_skins = state->json["skins"];
- }
Map<GLTFNodeIndex, Node *>::Element *mi_element = state->scene_nodes.find(mi_node_i);
if (!mi_element) {
continue;
@@ -5814,9 +5983,8 @@ void GLTFDocument::_convert_mesh_instances(Ref<GLTFState> state) {
Transform3D mi_xform = mi->get_transform();
node->scale = mi_xform.basis.get_scale();
node->rotation = mi_xform.basis.get_rotation_quaternion();
- node->translation = mi_xform.origin;
+ node->position = mi_xform.origin;
- Dictionary json_skin;
Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(mi->get_node(mi->get_skeleton_path()));
if (!skeleton) {
continue;
@@ -5825,121 +5993,75 @@ void GLTFDocument::_convert_mesh_instances(Ref<GLTFState> state) {
continue;
}
Ref<Skin> skin = mi->get_skin();
- if (skin.is_null()) {
- skin = skeleton->register_skin(nullptr)->get_skin();
- }
Ref<GLTFSkin> gltf_skin;
gltf_skin.instantiate();
Array json_joints;
- GLTFSkeletonIndex skeleton_gltf_i = -1;
NodePath skeleton_path = mi->get_skeleton_path();
- bool is_unique = true;
- for (int32_t skin_i = 0; skin_i < state->skins.size(); skin_i++) {
- Ref<GLTFSkin> prev_gltf_skin = state->skins.write[skin_i];
- if (gltf_skin.is_null()) {
- continue;
- }
- GLTFSkeletonIndex prev_skeleton = prev_gltf_skin->get_skeleton();
- if (prev_skeleton == -1 || prev_skeleton >= state->skeletons.size()) {
- continue;
- }
- if (prev_gltf_skin->get_godot_skin() == skin && state->skeletons[prev_skeleton]->godot_skeleton == skeleton) {
- node->skin = skin_i;
- node->skeleton = prev_skeleton;
- is_unique = false;
- break;
- }
- }
- if (!is_unique) {
- continue;
- }
- GLTFSkeletonIndex skeleton_i = _convert_skeleton(state, skeleton);
- skeleton_gltf_i = skeleton_i;
- ERR_CONTINUE(skeleton_gltf_i == -1);
- gltf_skin->skeleton = skeleton_gltf_i;
- Ref<GLTFSkeleton> gltf_skeleton = state->skeletons.write[skeleton_gltf_i];
- for (int32_t bind_i = 0; bind_i < skin->get_bind_count(); bind_i++) {
- String godot_bone_name = skin->get_bind_name(bind_i);
- if (godot_bone_name.is_empty()) {
- int32_t bone = skin->get_bind_bone(bind_i);
- godot_bone_name = skeleton->get_bone_name(bone);
- }
- if (skeleton->find_bone(godot_bone_name) == -1) {
- godot_bone_name = skeleton->get_bone_name(0);
- }
- BoneId bone_index = skeleton->find_bone(godot_bone_name);
- ERR_CONTINUE(bone_index == -1);
- Ref<GLTFNode> joint_node;
- joint_node.instantiate();
- String gltf_bone_name = _gen_unique_bone_name(state, skeleton_gltf_i, godot_bone_name);
- joint_node->set_name(gltf_bone_name);
-
- Transform3D bone_rest_xform = skeleton->get_bone_rest(bone_index);
- joint_node->scale = bone_rest_xform.basis.get_scale();
- joint_node->rotation = bone_rest_xform.basis.get_rotation_quaternion();
- joint_node->translation = bone_rest_xform.origin;
- joint_node->joint = true;
-
- int32_t joint_node_i = state->nodes.size();
- state->nodes.push_back(joint_node);
- gltf_skeleton->godot_bone_node.insert(bone_index, joint_node_i);
- int32_t joint_index = gltf_skin->joints.size();
- gltf_skin->joint_i_to_bone_i.insert(joint_index, bone_index);
- gltf_skin->joints.push_back(joint_node_i);
- gltf_skin->joints_original.push_back(joint_node_i);
- gltf_skin->inverse_binds.push_back(skin->get_bind_pose(bind_i));
- json_joints.push_back(joint_node_i);
- for (Map<GLTFNodeIndex, Node *>::Element *skin_scene_node_i = state->scene_nodes.front(); skin_scene_node_i; skin_scene_node_i = skin_scene_node_i->next()) {
- if (skin_scene_node_i->get() == skeleton) {
- gltf_skin->skin_root = skin_scene_node_i->key();
- json_skin["skeleton"] = skin_scene_node_i->key();
- }
- }
- gltf_skin->godot_skin = skin;
- gltf_skin->set_name(_gen_unique_name(state, skin->get_name()));
- }
- for (int32_t bind_i = 0; bind_i < skin->get_bind_count(); bind_i++) {
- String bone_name = skeleton->get_bone_name(bind_i);
- String godot_bone_name = skin->get_bind_name(bind_i);
- int32_t bone = -1;
- if (skin->get_bind_bone(bind_i) != -1) {
- bone = skin->get_bind_bone(bind_i);
- godot_bone_name = skeleton->get_bone_name(bone);
- }
- bone = skeleton->find_bone(godot_bone_name);
- if (bone == -1) {
- continue;
- }
- BoneId bone_parent = skeleton->get_bone_parent(bone);
- GLTFNodeIndex joint_node_i = gltf_skeleton->godot_bone_node[bone];
- ERR_CONTINUE(joint_node_i >= state->nodes.size());
- if (bone_parent != -1) {
- GLTFNodeIndex parent_joint_gltf_node = gltf_skin->joints[bone_parent];
- Ref<GLTFNode> parent_joint_node = state->nodes.write[parent_joint_gltf_node];
- parent_joint_node->children.push_back(joint_node_i);
+ Node *skel_node = mi->get_node_or_null(skeleton_path);
+ Skeleton3D *godot_skeleton = nullptr;
+ if (skel_node != nullptr) {
+ godot_skeleton = cast_to<Skeleton3D>(skel_node);
+ }
+ if (godot_skeleton != nullptr && state->skeleton3d_to_gltf_skeleton.has(godot_skeleton->get_instance_id())) {
+ // This is a skinned mesh. If the mesh has no ARRAY_WEIGHTS or ARRAY_BONES, it will be invisible.
+ const GLTFSkeletonIndex skeleton_gltf_i = state->skeleton3d_to_gltf_skeleton[godot_skeleton->get_instance_id()];
+ Ref<GLTFSkeleton> gltf_skeleton = state->skeletons[skeleton_gltf_i];
+ int bone_cnt = skeleton->get_bone_count();
+ ERR_FAIL_COND(bone_cnt != gltf_skeleton->joints.size());
+
+ ObjectID gltf_skin_key = skin->get_instance_id();
+ ObjectID gltf_skel_key = godot_skeleton->get_instance_id();
+ GLTFSkinIndex skin_gltf_i = -1;
+ GLTFNodeIndex root_gltf_i = -1;
+ if (!gltf_skeleton->roots.is_empty()) {
+ root_gltf_i = gltf_skeleton->roots[0];
+ }
+ if (state->skin_and_skeleton3d_to_gltf_skin.has(gltf_skin_key) && state->skin_and_skeleton3d_to_gltf_skin[gltf_skin_key].has(gltf_skel_key)) {
+ skin_gltf_i = state->skin_and_skeleton3d_to_gltf_skin[gltf_skin_key][gltf_skel_key];
} else {
- Node *node_parent = skeleton->get_parent();
- ERR_CONTINUE(!node_parent);
- for (Map<GLTFNodeIndex, Node *>::Element *E = state->scene_nodes.front(); E; E = E->next()) {
- if (E->get() == node_parent) {
- GLTFNodeIndex gltf_node_i = E->key();
- Ref<GLTFNode> gltf_node = state->nodes.write[gltf_node_i];
- gltf_node->children.push_back(joint_node_i);
- break;
+ if (skin.is_null()) {
+ // Note that gltf_skin_key should remain null, so these can share a reference.
+ skin = skeleton->register_skin(nullptr)->get_skin();
+ }
+ gltf_skin.instantiate();
+ gltf_skin->godot_skin = skin;
+ gltf_skin->set_name(skin->get_name());
+ gltf_skin->skeleton = skeleton_gltf_i;
+ gltf_skin->skin_root = root_gltf_i;
+ //gltf_state->godot_to_gltf_node[skel_node]
+ HashMap<StringName, int> bone_name_to_idx;
+ for (int bone_i = 0; bone_i < bone_cnt; bone_i++) {
+ bone_name_to_idx[skeleton->get_bone_name(bone_i)] = bone_i;
+ }
+ for (int bind_i = 0, cnt = skin->get_bind_count(); bind_i < cnt; bind_i++) {
+ int bone_i = skin->get_bind_bone(bind_i);
+ Transform3D bind_pose = skin->get_bind_pose(bind_i);
+ StringName bind_name = skin->get_bind_name(bind_i);
+ if (bind_name != StringName()) {
+ bone_i = bone_name_to_idx[bind_name];
+ }
+ ERR_CONTINUE(bone_i < 0 || bone_i >= bone_cnt);
+ if (bind_name == StringName()) {
+ bind_name = skeleton->get_bone_name(bone_i);
}
+ GLTFNodeIndex skeleton_bone_i = gltf_skeleton->joints[bone_i];
+ gltf_skin->joints_original.push_back(skeleton_bone_i);
+ gltf_skin->joints.push_back(skeleton_bone_i);
+ gltf_skin->inverse_binds.push_back(bind_pose);
+ if (skeleton->get_bone_parent(bone_i) == -1) {
+ gltf_skin->roots.push_back(skeleton_bone_i);
+ }
+ gltf_skin->joint_i_to_bone_i[bind_i] = bone_i;
+ gltf_skin->joint_i_to_name[bind_i] = bind_name;
}
+ skin_gltf_i = state->skins.size();
+ state->skins.push_back(gltf_skin);
+ state->skin_and_skeleton3d_to_gltf_skin[gltf_skin_key][gltf_skel_key] = skin_gltf_i;
}
+ node->skin = skin_gltf_i;
+ node->skeleton = skeleton_gltf_i;
}
- _expand_skin(state, gltf_skin);
- node->skin = state->skins.size();
- state->skins.push_back(gltf_skin);
-
- json_skin["inverseBindMatrices"] = _encode_accessor_as_xform(state, gltf_skin->inverse_binds, false);
- json_skin["joints"] = json_joints;
- json_skin["name"] = gltf_skin->get_name();
- json_skins.push_back(json_skin);
- state->json["skins"] = json_skins;
}
}
@@ -6022,10 +6144,9 @@ GLTFAnimation::Track GLTFDocument::_convert_animation_track(Ref<GLTFState> state
for (int32_t key_i = 0; key_i < key_count; key_i++) {
times.write[key_i] = p_animation->track_get_key_time(p_track_i, key_i);
}
- const float BAKE_FPS = 30.0f;
if (track_type == Animation::TYPE_TRANSFORM3D) {
- p_track.translation_track.times = times;
- p_track.translation_track.interpolation = gltf_interpolation;
+ p_track.position_track.times = times;
+ p_track.position_track.interpolation = gltf_interpolation;
p_track.rotation_track.times = times;
p_track.rotation_track.interpolation = gltf_interpolation;
p_track.scale_track.times = times;
@@ -6033,27 +6154,27 @@ GLTFAnimation::Track GLTFDocument::_convert_animation_track(Ref<GLTFState> state
p_track.scale_track.values.resize(key_count);
p_track.scale_track.interpolation = gltf_interpolation;
- p_track.translation_track.values.resize(key_count);
- p_track.translation_track.interpolation = gltf_interpolation;
+ p_track.position_track.values.resize(key_count);
+ p_track.position_track.interpolation = gltf_interpolation;
p_track.rotation_track.values.resize(key_count);
p_track.rotation_track.interpolation = gltf_interpolation;
for (int32_t key_i = 0; key_i < key_count; key_i++) {
- Vector3 translation;
+ Vector3 position;
Quaternion rotation;
Vector3 scale;
- Error err = p_animation->transform_track_get_key(p_track_i, key_i, &translation, &rotation, &scale);
+ Error err = p_animation->transform_track_get_key(p_track_i, key_i, &position, &rotation, &scale);
ERR_CONTINUE(err != OK);
Transform3D xform;
xform.basis.set_quaternion_scale(rotation, scale);
- xform.origin = translation;
+ xform.origin = position;
xform = p_bone_rest * xform;
- p_track.translation_track.values.write[key_i] = xform.get_origin();
+ p_track.position_track.values.write[key_i] = xform.get_origin();
p_track.rotation_track.values.write[key_i] = xform.basis.get_rotation_quaternion();
p_track.scale_track.values.write[key_i] = xform.basis.get_scale();
}
} else if (path.find(":transform") != -1) {
- p_track.translation_track.times = times;
- p_track.translation_track.interpolation = gltf_interpolation;
+ p_track.position_track.times = times;
+ p_track.position_track.interpolation = gltf_interpolation;
p_track.rotation_track.times = times;
p_track.rotation_track.interpolation = gltf_interpolation;
p_track.scale_track.times = times;
@@ -6061,13 +6182,13 @@ GLTFAnimation::Track GLTFDocument::_convert_animation_track(Ref<GLTFState> state
p_track.scale_track.values.resize(key_count);
p_track.scale_track.interpolation = gltf_interpolation;
- p_track.translation_track.values.resize(key_count);
- p_track.translation_track.interpolation = gltf_interpolation;
+ p_track.position_track.values.resize(key_count);
+ p_track.position_track.interpolation = gltf_interpolation;
p_track.rotation_track.values.resize(key_count);
p_track.rotation_track.interpolation = gltf_interpolation;
for (int32_t key_i = 0; key_i < key_count; key_i++) {
Transform3D xform = p_animation->track_get_key_value(p_track_i, key_i);
- p_track.translation_track.values.write[key_i] = xform.get_origin();
+ p_track.position_track.values.write[key_i] = xform.get_origin();
p_track.rotation_track.values.write[key_i] = xform.basis.get_rotation_quaternion();
p_track.scale_track.values.write[key_i] = xform.basis.get_scale();
}
@@ -6083,16 +6204,16 @@ GLTFAnimation::Track GLTFDocument::_convert_animation_track(Ref<GLTFState> state
Quaternion rotation_track = p_animation->track_get_key_value(p_track_i, key_i);
p_track.rotation_track.values.write[key_i] = rotation_track;
}
- } else if (path.find(":translation") != -1) {
- p_track.translation_track.times = times;
- p_track.translation_track.interpolation = gltf_interpolation;
+ } else if (path.find(":position") != -1) {
+ p_track.position_track.times = times;
+ p_track.position_track.interpolation = gltf_interpolation;
- p_track.translation_track.values.resize(key_count);
- p_track.translation_track.interpolation = gltf_interpolation;
+ p_track.position_track.values.resize(key_count);
+ p_track.position_track.interpolation = gltf_interpolation;
for (int32_t key_i = 0; key_i < key_count; key_i++) {
- Vector3 translation = p_animation->track_get_key_value(p_track_i, key_i);
- p_track.translation_track.values.write[key_i] = translation;
+ Vector3 position = p_animation->track_get_key_value(p_track_i, key_i);
+ p_track.position_track.values.write[key_i] = position;
}
} else if (path.find(":rotation") != -1) {
p_track.rotation_track.times = times;
@@ -6151,34 +6272,34 @@ GLTFAnimation::Track GLTFDocument::_convert_animation_track(Ref<GLTFState> state
}
p_track.scale_track.values.write[key_i] = bezier_track;
}
- } else if (path.find("/translation") != -1) {
+ } else if (path.find("/position") != -1) {
const int32_t keys = p_animation->track_get_key_time(p_track_i, key_count - 1) * BAKE_FPS;
- if (!p_track.translation_track.times.size()) {
+ if (!p_track.position_track.times.size()) {
Vector<float> new_times;
new_times.resize(keys);
for (int32_t key_i = 0; key_i < keys; key_i++) {
new_times.write[key_i] = key_i / BAKE_FPS;
}
- p_track.translation_track.times = new_times;
- p_track.translation_track.interpolation = gltf_interpolation;
+ p_track.position_track.times = new_times;
+ p_track.position_track.interpolation = gltf_interpolation;
- p_track.translation_track.values.resize(keys);
- p_track.translation_track.interpolation = gltf_interpolation;
+ p_track.position_track.values.resize(keys);
+ p_track.position_track.interpolation = gltf_interpolation;
}
for (int32_t key_i = 0; key_i < keys; key_i++) {
- Vector3 bezier_track = p_track.translation_track.values[key_i];
- if (path.find("/translation:x") != -1) {
+ Vector3 bezier_track = p_track.position_track.values[key_i];
+ if (path.find("/position:x") != -1) {
bezier_track.x = p_animation->bezier_track_interpolate(p_track_i, key_i / BAKE_FPS);
bezier_track.x = p_bone_rest.affine_inverse().origin.x * bezier_track.x;
- } else if (path.find("/translation:y") != -1) {
+ } else if (path.find("/position:y") != -1) {
bezier_track.y = p_animation->bezier_track_interpolate(p_track_i, key_i / BAKE_FPS);
bezier_track.y = p_bone_rest.affine_inverse().origin.y * bezier_track.y;
- } else if (path.find("/translation:z") != -1) {
+ } else if (path.find("/position:z") != -1) {
bezier_track.z = p_animation->bezier_track_interpolate(p_track_i, key_i / BAKE_FPS);
bezier_track.z = p_bone_rest.affine_inverse().origin.z * bezier_track.z;
}
- p_track.translation_track.values.write[key_i] = bezier_track;
+ p_track.position_track.values.write[key_i] = bezier_track;
}
}
}
@@ -6197,17 +6318,17 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap,
continue;
}
String orig_track_path = animation->track_get_path(track_i);
- if (String(orig_track_path).find(":translation") != -1) {
- const Vector<String> node_suffix = String(orig_track_path).split(":translation");
+ if (String(orig_track_path).find(":position") != -1) {
+ const Vector<String> node_suffix = String(orig_track_path).split(":position");
const NodePath path = node_suffix[0];
const Node *node = ap->get_parent()->get_node_or_null(path);
- for (Map<GLTFNodeIndex, Node *>::Element *translation_scene_node_i = state->scene_nodes.front(); translation_scene_node_i; translation_scene_node_i = translation_scene_node_i->next()) {
- if (translation_scene_node_i->get() == node) {
- GLTFNodeIndex node_index = translation_scene_node_i->key();
- Map<int, GLTFAnimation::Track>::Element *translation_track_i = gltf_animation->get_tracks().find(node_index);
+ for (Map<GLTFNodeIndex, Node *>::Element *position_scene_node_i = state->scene_nodes.front(); position_scene_node_i; position_scene_node_i = position_scene_node_i->next()) {
+ if (position_scene_node_i->get() == node) {
+ GLTFNodeIndex node_index = position_scene_node_i->key();
+ Map<int, GLTFAnimation::Track>::Element *position_track_i = gltf_animation->get_tracks().find(node_index);
GLTFAnimation::Track track;
- if (translation_track_i) {
- track = translation_track_i->get();
+ if (position_track_i) {
+ track = position_track_i->get();
}
track = _convert_animation_track(state, track, animation, Transform3D(), track_i, node_index);
gltf_animation->get_tracks().insert(node_index, track);
@@ -6260,69 +6381,58 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap,
const Vector<String> node_suffix = String(orig_track_path).split(":blend_shapes/");
const NodePath path = node_suffix[0];
const String suffix = node_suffix[1];
- const Node *node = ap->get_parent()->get_node_or_null(path);
- for (Map<GLTFNodeIndex, Node *>::Element *transform_track_i = state->scene_nodes.front(); transform_track_i; transform_track_i = transform_track_i->next()) {
- if (transform_track_i->get() == node) {
- const MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(node);
- if (!mi) {
- continue;
- }
- Ref<ArrayMesh> array_mesh = mi->get_mesh();
- if (array_mesh.is_null()) {
+ Node *node = ap->get_parent()->get_node_or_null(path);
+ MeshInstance3D *mi = cast_to<MeshInstance3D>(node);
+ Ref<Mesh> mesh = mi->get_mesh();
+ ERR_CONTINUE(mesh.is_null());
+ int32_t mesh_index = -1;
+ for (Map<GLTFNodeIndex, Node *>::Element *mesh_track_i = state->scene_nodes.front(); mesh_track_i; mesh_track_i = mesh_track_i->next()) {
+ if (mesh_track_i->get() == node) {
+ mesh_index = mesh_track_i->key();
+ }
+ }
+ ERR_CONTINUE(mesh_index == -1);
+ Map<int, GLTFAnimation::Track> &tracks = gltf_animation->get_tracks();
+ GLTFAnimation::Track track = gltf_animation->get_tracks().has(mesh_index) ? gltf_animation->get_tracks()[mesh_index] : GLTFAnimation::Track();
+ if (!tracks.has(mesh_index)) {
+ for (int32_t shape_i = 0; shape_i < mesh->get_blend_shape_count(); shape_i++) {
+ String shape_name = mesh->get_blend_shape_name(shape_i);
+ NodePath shape_path = String(path) + ":blend_shapes/" + shape_name;
+ int32_t shape_track_i = animation->find_track(shape_path);
+ if (shape_track_i == -1) {
+ GLTFAnimation::Channel<float> weight;
+ weight.interpolation = GLTFAnimation::INTERP_LINEAR;
+ weight.times.push_back(0.0f);
+ weight.times.push_back(0.0f);
+ weight.values.push_back(0.0f);
+ weight.values.push_back(0.0f);
+ track.weight_tracks.push_back(weight);
continue;
}
- if (node_suffix.size() != 2) {
- continue;
+ Animation::InterpolationType interpolation = animation->track_get_interpolation_type(track_i);
+ GLTFAnimation::Interpolation gltf_interpolation = GLTFAnimation::INTERP_LINEAR;
+ if (interpolation == Animation::InterpolationType::INTERPOLATION_LINEAR) {
+ gltf_interpolation = GLTFAnimation::INTERP_LINEAR;
+ } else if (interpolation == Animation::InterpolationType::INTERPOLATION_NEAREST) {
+ gltf_interpolation = GLTFAnimation::INTERP_STEP;
+ } else if (interpolation == Animation::InterpolationType::INTERPOLATION_CUBIC) {
+ gltf_interpolation = GLTFAnimation::INTERP_CUBIC_SPLINE;
}
- GLTFNodeIndex mesh_index = -1;
- for (GLTFNodeIndex node_i = 0; node_i < state->scene_nodes.size(); node_i++) {
- if (state->scene_nodes[node_i] == node) {
- mesh_index = node_i;
- break;
- }
+ int32_t key_count = animation->track_get_key_count(shape_track_i);
+ GLTFAnimation::Channel<float> weight;
+ weight.interpolation = gltf_interpolation;
+ weight.times.resize(key_count);
+ for (int32_t time_i = 0; time_i < key_count; time_i++) {
+ weight.times.write[time_i] = animation->track_get_key_time(shape_track_i, time_i);
}
- ERR_CONTINUE(mesh_index == -1);
- Ref<Mesh> mesh = mi->get_mesh();
- ERR_CONTINUE(mesh.is_null());
- for (int32_t shape_i = 0; shape_i < mesh->get_blend_shape_count(); shape_i++) {
- if (mesh->get_blend_shape_name(shape_i) != suffix) {
- continue;
- }
- GLTFAnimation::Track track;
- Map<int, GLTFAnimation::Track>::Element *blend_shape_track_i = gltf_animation->get_tracks().find(mesh_index);
- if (blend_shape_track_i) {
- track = blend_shape_track_i->get();
- }
- Animation::InterpolationType interpolation = animation->track_get_interpolation_type(track_i);
-
- GLTFAnimation::Interpolation gltf_interpolation = GLTFAnimation::INTERP_LINEAR;
- if (interpolation == Animation::InterpolationType::INTERPOLATION_LINEAR) {
- gltf_interpolation = GLTFAnimation::INTERP_LINEAR;
- } else if (interpolation == Animation::InterpolationType::INTERPOLATION_NEAREST) {
- gltf_interpolation = GLTFAnimation::INTERP_STEP;
- } else if (interpolation == Animation::InterpolationType::INTERPOLATION_CUBIC) {
- gltf_interpolation = GLTFAnimation::INTERP_CUBIC_SPLINE;
- }
- Animation::TrackType track_type = animation->track_get_type(track_i);
- if (track_type == Animation::TYPE_VALUE) {
- int32_t key_count = animation->track_get_key_count(track_i);
- GLTFAnimation::Channel<float> weight;
- weight.interpolation = gltf_interpolation;
- weight.times.resize(key_count);
- for (int32_t time_i = 0; time_i < key_count; time_i++) {
- weight.times.write[time_i] = animation->track_get_key_time(track_i, time_i);
- }
- weight.values.resize(key_count);
- for (int32_t value_i = 0; value_i < key_count; value_i++) {
- weight.values.write[value_i] = animation->track_get_key_value(track_i, value_i);
- }
- track.weight_tracks.push_back(weight);
- }
- gltf_animation->get_tracks()[mesh_index] = track;
+ weight.values.resize(key_count);
+ for (int32_t value_i = 0; value_i < key_count; value_i++) {
+ weight.values.write[value_i] = animation->track_get_key_value(shape_track_i, value_i);
}
+ track.weight_tracks.push_back(weight);
}
+ tracks[mesh_index] = track;
}
-
} else if (String(orig_track_path).find(":") != -1) {
//Process skeleton
const Vector<String> node_suffix = String(orig_track_path).split(":");
@@ -6630,3 +6740,80 @@ Error GLTFDocument::_serialize_file(Ref<GLTFState> state, const String p_path) {
}
return err;
}
+
+Error GLTFDocument::save_scene(Node *p_node, const String &p_path,
+ const String &p_src_path, uint32_t p_flags,
+ float p_bake_fps, Ref<GLTFState> r_state) {
+ ERR_FAIL_NULL_V(p_node, ERR_INVALID_PARAMETER);
+
+ Ref<GLTFDocument> gltf_document;
+ gltf_document.instantiate();
+ if (r_state == Ref<GLTFState>()) {
+ r_state.instantiate();
+ }
+ return gltf_document->serialize(r_state, p_node, p_path);
+}
+
+Node *GLTFDocument::import_scene_gltf(const String &p_path, uint32_t p_flags, int32_t p_bake_fps, Ref<GLTFState> r_state, List<String> *r_missing_deps, Error *r_err) {
+ // TODO Add missing texture and missing .bin file paths to r_missing_deps 2021-09-10 fire
+ if (r_state == Ref<GLTFState>()) {
+ r_state.instantiate();
+ }
+ r_state->use_named_skin_binds =
+ p_flags & EditorSceneImporter::IMPORT_USE_NAMED_SKIN_BINDS;
+
+ Ref<GLTFDocument> gltf_document;
+ gltf_document.instantiate();
+ Error err = gltf_document->parse(r_state, p_path);
+ if (r_err) {
+ *r_err = err;
+ }
+ ERR_FAIL_COND_V(err != Error::OK, nullptr);
+
+ Node3D *root = memnew(Node3D);
+ for (int32_t root_i = 0; root_i < r_state->root_nodes.size(); root_i++) {
+ gltf_document->_generate_scene_node(r_state, root, root, r_state->root_nodes[root_i]);
+ }
+ gltf_document->_process_mesh_instances(r_state, root);
+ if (r_state->animations.size()) {
+ AnimationPlayer *ap = memnew(AnimationPlayer);
+ root->add_child(ap);
+ ap->set_owner(root);
+ for (int i = 0; i < r_state->animations.size(); i++) {
+ gltf_document->_import_animation(r_state, ap, i, p_bake_fps);
+ }
+ }
+
+ return root;
+}
+
+void GLTFDocument::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("save_scene", "node", "path", "src_path", "flags", "bake_fps", "state"),
+ &GLTFDocument::save_scene, DEFVAL(0), DEFVAL(30), DEFVAL(Ref<GLTFState>()));
+ ClassDB::bind_method(D_METHOD("import_scene", "path", "flags", "bake_fps", "state"),
+ &GLTFDocument::import_scene, DEFVAL(0), DEFVAL(30), DEFVAL(Ref<GLTFState>()));
+}
+
+void GLTFDocument::_build_parent_hierachy(Ref<GLTFState> state) {
+ // build the hierarchy
+ for (GLTFNodeIndex node_i = 0; node_i < state->nodes.size(); node_i++) {
+ for (int j = 0; j < state->nodes[node_i]->children.size(); j++) {
+ GLTFNodeIndex child_i = state->nodes[node_i]->children[j];
+ ERR_FAIL_INDEX(child_i, state->nodes.size());
+ if (state->nodes.write[child_i]->parent != -1) {
+ continue;
+ }
+ state->nodes.write[child_i]->parent = node_i;
+ }
+ }
+}
+
+Node *GLTFDocument::import_scene(const String &p_path, uint32_t p_flags, int32_t p_bake_fps, Ref<GLTFState> r_state) {
+ Error err = FAILED;
+ List<String> deps;
+ Node *node = import_scene_gltf(p_path, p_flags, p_bake_fps, r_state, &deps, &err);
+ if (err != OK) {
+ return nullptr;
+ }
+ return node;
+}
diff --git a/modules/gltf/gltf_document.h b/modules/gltf/gltf_document.h
index 3e8ea19045..18aeb81bc0 100644
--- a/modules/gltf/gltf_document.h
+++ b/modules/gltf/gltf_document.h
@@ -44,12 +44,16 @@
#include "scene/resources/texture.h"
#include "modules/modules_enabled.gen.h"
+#include <cstdint>
class GLTFState;
class GLTFSkin;
class GLTFNode;
class GLTFSpecGloss;
class GLTFSkeleton;
+class CSGShape3D;
+class GridMap;
+class MultiMeshInstance3D;
using GLTFAccessorIndex = int;
using GLTFAnimationIndex = int;
@@ -71,6 +75,9 @@ class GLTFDocument : public Resource {
friend class GLTFSkin;
friend class GLTFSkeleton;
+private:
+ const float BAKE_FPS = 30.0f;
+
public:
const int32_t JOINT_GROUP_SIZE = 4;
enum GLTFType {
@@ -102,6 +109,16 @@ public:
COMPONENT_TYPE_FLOAT = 5126,
};
+protected:
+ static void _bind_methods();
+
+public:
+ Node *import_scene(const String &p_path, uint32_t p_flags, int32_t p_bake_fps, Ref<GLTFState> r_state);
+ Node *import_scene_gltf(const String &p_path, uint32_t p_flags, int32_t p_bake_fps, Ref<GLTFState> r_state, List<String> *r_missing_deps, Error *r_err = nullptr);
+ Error save_scene(Node *p_node, const String &p_path,
+ const String &p_src_path, uint32_t p_flags,
+ float p_bake_fps, Ref<GLTFState> r_state);
+
private:
template <class T>
static Array to_array(const Vector<T> &p_inp) {
@@ -155,6 +172,7 @@ private:
r_out[keys[i]] = p_inp[keys[i]];
}
}
+ void _build_parent_hierachy(Ref<GLTFState> state);
double _filter_number(double p_float);
String _get_component_type_name(const uint32_t p_component);
int _get_component_type_size(const int component_type);
@@ -338,7 +356,6 @@ private:
GLTFNodeIndex p_node_i);
Error _encode_buffer_bins(Ref<GLTFState> state, const String &p_path);
Error _encode_buffer_glb(Ref<GLTFState> state, const String &p_path);
- Error _serialize_bone_attachment(Ref<GLTFState> state);
Dictionary _serialize_texture_transform_uv1(Ref<BaseMaterial3D> p_material);
Dictionary _serialize_texture_transform_uv2(Ref<BaseMaterial3D> p_material);
Error _serialize_version(Ref<GLTFState> state);
@@ -346,8 +363,8 @@ private:
Error _serialize_extensions(Ref<GLTFState> state) const;
public:
- // http://www.itu.int/rec/R-REC-BT.601
- // http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.601-7-201103-I!!PDF-E.pdf
+ // https://www.itu.int/rec/R-REC-BT.601
+ // https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.601-7-201103-I!!PDF-E.pdf
static constexpr float R_BRIGHTNESS_COEFF = 0.299f;
static constexpr float G_BRIGHTNESS_COEFF = 0.587f;
static constexpr float B_BRIGHTNESS_COEFF = 0.114f;
@@ -369,20 +386,17 @@ public:
void _generate_skeleton_bone_node(Ref<GLTFState> state, Node *scene_parent, Node3D *scene_root, const GLTFNodeIndex node_index);
void _import_animation(Ref<GLTFState> state, AnimationPlayer *ap,
const GLTFAnimationIndex index, const int bake_fps);
- GLTFMeshIndex _convert_mesh_instance(Ref<GLTFState> state,
- MeshInstance3D *p_mesh_instance);
void _convert_mesh_instances(Ref<GLTFState> state);
GLTFCameraIndex _convert_camera(Ref<GLTFState> state, Camera3D *p_camera);
- void _convert_light_to_gltf(Light3D *light, Ref<GLTFState> state, Node3D *spatial, Ref<GLTFNode> gltf_node);
+ void _convert_light_to_gltf(Light3D *light, Ref<GLTFState> state, Ref<GLTFNode> gltf_node);
GLTFLightIndex _convert_light(Ref<GLTFState> state, Light3D *p_light);
- GLTFSkeletonIndex _convert_skeleton(Ref<GLTFState> state, Skeleton3D *p_skeleton);
void _convert_spatial(Ref<GLTFState> state, Node3D *p_spatial, Ref<GLTFNode> p_node);
- void _convert_scene_node(Ref<GLTFState> state, Node *p_current, Node *p_root,
+ void _convert_scene_node(Ref<GLTFState> state, Node *p_current,
const GLTFNodeIndex p_gltf_current,
const GLTFNodeIndex p_gltf_root);
#ifdef MODULE_CSG_ENABLED
- void _convert_csg_shape_to_gltf(Node *p_current, GLTFNodeIndex p_gltf_parent, Ref<GLTFNode> gltf_node, Ref<GLTFState> state);
+ void _convert_csg_shape_to_gltf(CSGShape3D *p_current, GLTFNodeIndex p_gltf_parent, Ref<GLTFNode> gltf_node, Ref<GLTFState> state);
#endif // MODULE_CSG_ENABLED
void _create_gltf_node(Ref<GLTFState> state,
@@ -393,40 +407,39 @@ public:
Ref<GLTFNode> gltf_node);
void _convert_animation_player_to_gltf(
AnimationPlayer *animation_player, Ref<GLTFState> state,
- const GLTFNodeIndex &p_gltf_current,
- const GLTFNodeIndex &p_gltf_root_index,
- Ref<GLTFNode> p_gltf_node, Node *p_scene_parent,
- Node *p_root);
+ GLTFNodeIndex p_gltf_current,
+ GLTFNodeIndex p_gltf_root_index,
+ Ref<GLTFNode> p_gltf_node, Node *p_scene_parent);
void _check_visibility(Node *p_node, bool &retflag);
void _convert_camera_to_gltf(Camera3D *camera, Ref<GLTFState> state,
- Node3D *spatial,
Ref<GLTFNode> gltf_node);
#ifdef MODULE_GRIDMAP_ENABLED
void _convert_grid_map_to_gltf(
- Node *p_scene_parent,
- const GLTFNodeIndex &p_parent_node_index,
- const GLTFNodeIndex &p_root_node_index,
- Ref<GLTFNode> gltf_node, Ref<GLTFState> state,
- Node *p_root_node);
+ GridMap *p_grid_map,
+ GLTFNodeIndex p_parent_node_index,
+ GLTFNodeIndex p_root_node_index,
+ Ref<GLTFNode> gltf_node, Ref<GLTFState> state);
#endif // MODULE_GRIDMAP_ENABLED
void _convert_mult_mesh_instance_to_gltf(
- Node *p_scene_parent,
- const GLTFNodeIndex &p_parent_node_index,
- const GLTFNodeIndex &p_root_node_index,
- Ref<GLTFNode> gltf_node, Ref<GLTFState> state,
- Node *p_root_node);
+ MultiMeshInstance3D *p_scene_parent,
+ GLTFNodeIndex p_parent_node_index,
+ GLTFNodeIndex p_root_node_index,
+ Ref<GLTFNode> gltf_node, Ref<GLTFState> state);
void _convert_skeleton_to_gltf(
- Node *p_scene_parent, Ref<GLTFState> state,
- const GLTFNodeIndex &p_parent_node_index,
- const GLTFNodeIndex &p_root_node_index,
- Ref<GLTFNode> gltf_node, Node *p_root_node);
- void _convert_bone_attachment_to_gltf(Node *p_scene_parent,
+ Skeleton3D *p_scene_parent, Ref<GLTFState> state,
+ GLTFNodeIndex p_parent_node_index,
+ GLTFNodeIndex p_root_node_index,
+ Ref<GLTFNode> gltf_node);
+ void _convert_bone_attachment_to_gltf(BoneAttachment3D *p_bone_attachment,
+ Ref<GLTFState> state,
+ GLTFNodeIndex p_parent_node_index,
+ GLTFNodeIndex p_root_node_index,
+ Ref<GLTFNode> gltf_node);
+ void _convert_mesh_instance_to_gltf(MeshInstance3D *p_mesh_instance,
Ref<GLTFState> state,
- Ref<GLTFNode> gltf_node,
- bool &retflag);
- void _convert_mesh_to_gltf(Node *p_scene_parent,
- Ref<GLTFState> state, Node3D *spatial,
Ref<GLTFNode> gltf_node);
+ GLTFMeshIndex _convert_mesh_to_gltf(Ref<GLTFState> state,
+ MeshInstance3D *p_mesh_instance);
void _convert_animation(Ref<GLTFState> state, AnimationPlayer *ap,
String p_animation_track_name);
Error serialize(Ref<GLTFState> state, Node *p_root, const String &p_path);
diff --git a/modules/gltf/gltf_light.cpp b/modules/gltf/gltf_light.cpp
index 95cca9cf71..c5aa8d5724 100644
--- a/modules/gltf/gltf_light.cpp
+++ b/modules/gltf/gltf_light.cpp
@@ -35,8 +35,8 @@ void GLTFLight::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_color", "color"), &GLTFLight::set_color);
ClassDB::bind_method(D_METHOD("get_intensity"), &GLTFLight::get_intensity);
ClassDB::bind_method(D_METHOD("set_intensity", "intensity"), &GLTFLight::set_intensity);
- ClassDB::bind_method(D_METHOD("get_type"), &GLTFLight::get_type);
- ClassDB::bind_method(D_METHOD("set_type", "type"), &GLTFLight::set_type);
+ ClassDB::bind_method(D_METHOD("get_light_type"), &GLTFLight::get_light_type);
+ ClassDB::bind_method(D_METHOD("set_light_type", "light_type"), &GLTFLight::set_light_type);
ClassDB::bind_method(D_METHOD("get_range"), &GLTFLight::get_range);
ClassDB::bind_method(D_METHOD("set_range", "range"), &GLTFLight::set_range);
ClassDB::bind_method(D_METHOD("get_inner_cone_angle"), &GLTFLight::get_inner_cone_angle);
@@ -46,7 +46,7 @@ void GLTFLight::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color"); // Color
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "intensity"), "set_intensity", "get_intensity"); // float
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "type"), "set_type", "get_type"); // String
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "light_type"), "set_light_type", "get_light_type"); // String
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "range"), "set_range", "get_range"); // float
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inner_cone_angle"), "set_inner_cone_angle", "get_inner_cone_angle"); // float
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "outer_cone_angle"), "set_outer_cone_angle", "get_outer_cone_angle"); // float
@@ -68,12 +68,12 @@ void GLTFLight::set_intensity(float p_intensity) {
intensity = p_intensity;
}
-String GLTFLight::get_type() {
- return type;
+String GLTFLight::get_light_type() {
+ return light_type;
}
-void GLTFLight::set_type(String p_type) {
- type = p_type;
+void GLTFLight::set_light_type(String p_light_type) {
+ light_type = p_light_type;
}
float GLTFLight::get_range() {
diff --git a/modules/gltf/gltf_light.h b/modules/gltf/gltf_light.h
index a859ca1833..62a20d2f16 100644
--- a/modules/gltf/gltf_light.h
+++ b/modules/gltf/gltf_light.h
@@ -42,12 +42,12 @@ protected:
static void _bind_methods();
private:
- Color color;
- float intensity = 0.0f;
- String type;
- float range = 0.0f;
+ Color color = Color(1.0f, 1.0f, 1.0f);
+ float intensity = 1.0f;
+ String light_type;
+ float range = INFINITY;
float inner_cone_angle = 0.0f;
- float outer_cone_angle = 0.0f;
+ float outer_cone_angle = Math_TAU / 8.0f;
public:
Color get_color();
@@ -56,8 +56,8 @@ public:
float get_intensity();
void set_intensity(float p_intensity);
- String get_type();
- void set_type(String p_type);
+ String get_light_type();
+ void set_light_type(String p_light_type);
float get_range();
void set_range(float p_range);
diff --git a/modules/gltf/gltf_node.cpp b/modules/gltf/gltf_node.cpp
index 5db7ad66c3..9f925c7bbc 100644
--- a/modules/gltf/gltf_node.cpp
+++ b/modules/gltf/gltf_node.cpp
@@ -47,8 +47,8 @@ void GLTFNode::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_skeleton", "skeleton"), &GLTFNode::set_skeleton);
ClassDB::bind_method(D_METHOD("get_joint"), &GLTFNode::get_joint);
ClassDB::bind_method(D_METHOD("set_joint", "joint"), &GLTFNode::set_joint);
- ClassDB::bind_method(D_METHOD("get_translation"), &GLTFNode::get_translation);
- ClassDB::bind_method(D_METHOD("set_translation", "translation"), &GLTFNode::set_translation);
+ ClassDB::bind_method(D_METHOD("get_position"), &GLTFNode::get_position);
+ ClassDB::bind_method(D_METHOD("set_position", "position"), &GLTFNode::set_position);
ClassDB::bind_method(D_METHOD("get_rotation"), &GLTFNode::get_rotation);
ClassDB::bind_method(D_METHOD("set_rotation", "rotation"), &GLTFNode::set_rotation);
ClassDB::bind_method(D_METHOD("get_scale"), &GLTFNode::get_scale);
@@ -66,7 +66,7 @@ void GLTFNode::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "skin"), "set_skin", "get_skin"); // GLTFSkinIndex
ADD_PROPERTY(PropertyInfo(Variant::INT, "skeleton"), "set_skeleton", "get_skeleton"); // GLTFSkeletonIndex
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "joint"), "set_joint", "get_joint"); // bool
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "translation"), "set_translation", "get_translation"); // Vector3
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "position"), "set_position", "get_position"); // Vector3
ADD_PROPERTY(PropertyInfo(Variant::QUATERNION, "rotation"), "set_rotation", "get_rotation"); // Quaternion
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "scale"), "set_scale", "get_scale"); // Vector3
ADD_PROPERTY(PropertyInfo(Variant::PACKED_INT32_ARRAY, "children"), "set_children", "get_children"); // Vector<int>
@@ -137,12 +137,12 @@ void GLTFNode::set_joint(bool p_joint) {
joint = p_joint;
}
-Vector3 GLTFNode::get_translation() {
- return translation;
+Vector3 GLTFNode::get_position() {
+ return position;
}
-void GLTFNode::set_translation(Vector3 p_translation) {
- translation = p_translation;
+void GLTFNode::set_position(Vector3 p_position) {
+ position = p_position;
}
Quaternion GLTFNode::get_rotation() {
diff --git a/modules/gltf/gltf_node.h b/modules/gltf/gltf_node.h
index 378b6da8bf..3b6e061449 100644
--- a/modules/gltf/gltf_node.h
+++ b/modules/gltf/gltf_node.h
@@ -37,7 +37,6 @@
class GLTFNode : public Resource {
GDCLASS(GLTFNode, Resource);
friend class GLTFDocument;
- friend class PackedSceneGLTF;
private:
// matrices need to be transformed to this
@@ -49,7 +48,7 @@ private:
GLTFSkinIndex skin = -1;
GLTFSkeletonIndex skeleton = -1;
bool joint = false;
- Vector3 translation;
+ Vector3 position;
Quaternion rotation;
Vector3 scale = Vector3(1, 1, 1);
Vector<int> children;
@@ -83,8 +82,8 @@ public:
bool get_joint();
void set_joint(bool p_joint);
- Vector3 get_translation();
- void set_translation(Vector3 p_translation);
+ Vector3 get_position();
+ void set_position(Vector3 p_position);
Quaternion get_rotation();
void set_rotation(Quaternion p_rotation);
diff --git a/modules/gltf/gltf_state.h b/modules/gltf/gltf_state.h
index d8209523c5..d6614da804 100644
--- a/modules/gltf/gltf_state.h
+++ b/modules/gltf/gltf_state.h
@@ -44,6 +44,8 @@
#include "gltf_texture.h"
#include "core/io/resource.h"
+#include "core/templates/map.h"
+#include "core/templates/pair.h"
#include "core/templates/vector.h"
#include "scene/animation/animation_player.h"
#include "scene/resources/texture.h"
@@ -51,7 +53,6 @@
class GLTFState : public Resource {
GDCLASS(GLTFState, Resource);
friend class GLTFDocument;
- friend class PackedSceneGLTF;
String filename;
Dictionary json;
@@ -88,6 +89,9 @@ class GLTFState : public Resource {
Vector<Ref<GLTFAnimation>> animations;
Map<GLTFNodeIndex, Node *> scene_nodes;
+ Map<ObjectID, GLTFSkeletonIndex> skeleton3d_to_gltf_skeleton;
+ Map<ObjectID, Map<ObjectID, GLTFSkinIndex>> skin_and_skeleton3d_to_gltf_skin;
+
protected:
static void _bind_methods();
diff --git a/modules/gltf/register_types.cpp b/modules/gltf/register_types.cpp
index 85921490d2..d6020f50f0 100644
--- a/modules/gltf/register_types.cpp
+++ b/modules/gltf/register_types.cpp
@@ -80,7 +80,6 @@ void register_gltf_types() {
GDREGISTER_CLASS(GLTFLight);
GDREGISTER_CLASS(GLTFState);
GDREGISTER_CLASS(GLTFDocument);
- GDREGISTER_CLASS(PackedSceneGLTF);
#endif
}
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index 8e8b6f14ad..116c0e00f9 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -377,10 +377,7 @@ int GridMap::get_cell_item_orientation(const Vector3i &p_position) const {
}
Vector3i GridMap::world_to_map(const Vector3 &p_world_position) const {
- Vector3 map_position = p_world_position / cell_size;
- map_position.x = floor(map_position.x);
- map_position.y = floor(map_position.y);
- map_position.z = floor(map_position.z);
+ Vector3 map_position = (p_world_position / cell_size).floor();
return Vector3i(map_position);
}
@@ -475,7 +472,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
}
Pair<Transform3D, IndexKey> p;
- p.first = xform;
+ p.first = xform * mesh_library->get_item_mesh_transform(c.item);
p.second = E->get();
multimesh_items[c.item].push_back(p);
}
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index f101c43e89..c170bb107e 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -255,6 +255,12 @@ void GridMapEditor::_update_cursor_transform() {
cursor_transform.basis *= node->get_cell_scale();
cursor_transform = node->get_global_transform() * cursor_transform;
+ if (selected_palette >= 0) {
+ if (node && !node->get_mesh_library().is_null()) {
+ cursor_transform *= node->get_mesh_library()->get_item_mesh_transform(selected_palette);
+ }
+ }
+
if (cursor_instance.is_valid()) {
RenderingServer::get_singleton()->instance_set_transform(cursor_instance, cursor_transform);
RenderingServer::get_singleton()->instance_set_visible(cursor_instance, cursor_visible);
@@ -790,7 +796,7 @@ void GridMapEditor::_sbox_input(const Ref<InputEvent> &p_ie) {
if (k.is_valid() && (k->get_keycode() == KEY_UP || k->get_keycode() == KEY_DOWN || k->get_keycode() == KEY_PAGEUP || k->get_keycode() == KEY_PAGEDOWN)) {
// Forward the key input to the ItemList so it can be scrolled
- mesh_library_palette->call("_gui_input", k);
+ mesh_library_palette->gui_input(k);
search_box->accept_event();
}
}
diff --git a/modules/lightmapper_rd/SCsub b/modules/lightmapper_rd/SCsub
index 2f04f1833e..5cc9d8ee8b 100644
--- a/modules/lightmapper_rd/SCsub
+++ b/modules/lightmapper_rd/SCsub
@@ -7,6 +7,9 @@ env_lightmapper_rd = env_modules.Clone()
env_lightmapper_rd.GLSL_HEADER("lm_raster.glsl")
env_lightmapper_rd.GLSL_HEADER("lm_compute.glsl")
env_lightmapper_rd.GLSL_HEADER("lm_blendseams.glsl")
+env_lightmapper_rd.Depends("lm_raster.glsl.gen.h", "lm_common_inc.glsl")
+env_lightmapper_rd.Depends("lm_compute.glsl.gen.h", "lm_common_inc.glsl")
+env_lightmapper_rd.Depends("lm_blendseams.glsl.gen.h", "lm_common_inc.glsl")
# Godot source files
env_lightmapper_rd.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp
index fe941e25e7..ba4ef3be8d 100644
--- a/modules/lightmapper_rd/lightmapper_rd.cpp
+++ b/modules/lightmapper_rd/lightmapper_rd.cpp
@@ -274,13 +274,12 @@ Lightmapper::BakeError LightmapperRD::_blit_meshes_into_atlas(int p_max_texture_
return BAKE_OK;
}
-void LightmapperRD::_create_acceleration_structures(RenderingDevice *rd, Size2i atlas_size, int atlas_slices, AABB &bounds, int grid_size, Vector<Probe> &probe_positions, GenerateProbes p_generate_probes, Vector<int> &slice_triangle_count, Vector<int> &slice_seam_count, RID &vertex_buffer, RID &triangle_buffer, RID &box_buffer, RID &lights_buffer, RID &triangle_cell_indices_buffer, RID &probe_positions_buffer, RID &grid_texture, RID &seams_buffer, BakeStepFunc p_step_function, void *p_bake_userdata) {
+void LightmapperRD::_create_acceleration_structures(RenderingDevice *rd, Size2i atlas_size, int atlas_slices, AABB &bounds, int grid_size, Vector<Probe> &probe_positions, GenerateProbes p_generate_probes, Vector<int> &slice_triangle_count, Vector<int> &slice_seam_count, RID &vertex_buffer, RID &triangle_buffer, RID &lights_buffer, RID &triangle_cell_indices_buffer, RID &probe_positions_buffer, RID &grid_texture, RID &seams_buffer, BakeStepFunc p_step_function, void *p_bake_userdata) {
HashMap<Vertex, uint32_t, VertexHash> vertex_map;
//fill triangles array and vertex array
LocalVector<Triangle> triangles;
LocalVector<Vertex> vertex_array;
- LocalVector<Box> box_array;
LocalVector<Seam> seams;
slice_triangle_count.resize(atlas_slices);
@@ -387,16 +386,13 @@ void LightmapperRD::_create_acceleration_structures(RenderingDevice *rd, Size2i
}
}
- Box box;
- box.min_bounds[0] = taabb.position.x;
- box.min_bounds[1] = taabb.position.y;
- box.min_bounds[2] = taabb.position.z;
- box.max_bounds[0] = taabb.position.x + MAX(taabb.size.x, 0.0001);
- box.max_bounds[1] = taabb.position.y + MAX(taabb.size.y, 0.0001);
- box.max_bounds[2] = taabb.position.z + MAX(taabb.size.z, 0.0001);
- box.pad0 = box.pad1 = 0; //make valgrind not complain
- box_array.push_back(box);
-
+ t.min_bounds[0] = taabb.position.x;
+ t.min_bounds[1] = taabb.position.y;
+ t.min_bounds[2] = taabb.position.z;
+ t.max_bounds[0] = taabb.position.x + MAX(taabb.size.x, 0.0001);
+ t.max_bounds[1] = taabb.position.y + MAX(taabb.size.y, 0.0001);
+ t.max_bounds[2] = taabb.position.z + MAX(taabb.size.z, 0.0001);
+ t.pad0 = t.pad1 = 0; //make valgrind not complain
triangles.push_back(t);
slice_triangle_count.write[t.slice]++;
}
@@ -505,9 +501,6 @@ void LightmapperRD::_create_acceleration_structures(RenderingDevice *rd, Size2i
Vector<uint8_t> tb = triangles.to_byte_array();
triangle_buffer = rd->storage_buffer_create(tb.size(), tb);
- Vector<uint8_t> bb = box_array.to_byte_array();
- box_buffer = rd->storage_buffer_create(bb.size(), bb);
-
Vector<uint8_t> tib = triangle_indices.to_byte_array();
triangle_cell_indices_buffer = rd->storage_buffer_create(tib.size(), tib);
@@ -755,7 +748,6 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
Vector<int> slice_triangle_count;
RID vertex_buffer;
RID triangle_buffer;
- RID box_buffer;
RID lights_buffer;
RID triangle_cell_indices_buffer;
RID grid_texture;
@@ -767,14 +759,13 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
#define FREE_BUFFERS \
rd->free(vertex_buffer); \
rd->free(triangle_buffer); \
- rd->free(box_buffer); \
rd->free(lights_buffer); \
rd->free(triangle_cell_indices_buffer); \
rd->free(grid_texture); \
rd->free(seams_buffer); \
rd->free(probe_positions_buffer);
- _create_acceleration_structures(rd, atlas_size, atlas_slices, bounds, grid_size, probe_positions, p_generate_probes, slice_triangle_count, slice_seam_count, vertex_buffer, triangle_buffer, box_buffer, lights_buffer, triangle_cell_indices_buffer, probe_positions_buffer, grid_texture, seams_buffer, p_step_function, p_bake_userdata);
+ _create_acceleration_structures(rd, atlas_size, atlas_slices, bounds, grid_size, probe_positions, p_generate_probes, slice_triangle_count, slice_seam_count, vertex_buffer, triangle_buffer, lights_buffer, triangle_cell_indices_buffer, probe_positions_buffer, grid_texture, seams_buffer, p_step_function, p_bake_userdata);
if (p_step_function) {
p_step_function(0.47, TTR("Preparing shaders"), p_bake_userdata, true);
@@ -828,62 +819,55 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 3;
- u.ids.push_back(box_buffer);
- base_uniforms.push_back(u);
- }
- {
- RD::Uniform u;
- u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
- u.binding = 4;
u.ids.push_back(triangle_cell_indices_buffer);
base_uniforms.push_back(u);
}
{
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
- u.binding = 5;
+ u.binding = 4;
u.ids.push_back(lights_buffer);
base_uniforms.push_back(u);
}
{
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
- u.binding = 6;
+ u.binding = 5;
u.ids.push_back(seams_buffer);
base_uniforms.push_back(u);
}
{
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
- u.binding = 7;
+ u.binding = 6;
u.ids.push_back(probe_positions_buffer);
base_uniforms.push_back(u);
}
{
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
- u.binding = 8;
+ u.binding = 7;
u.ids.push_back(grid_texture);
base_uniforms.push_back(u);
}
{
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
- u.binding = 9;
+ u.binding = 8;
u.ids.push_back(albedo_array_tex);
base_uniforms.push_back(u);
}
{
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
- u.binding = 10;
+ u.binding = 9;
u.ids.push_back(emission_array_tex);
base_uniforms.push_back(u);
}
{
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_SAMPLER;
- u.binding = 11;
+ u.binding = 10;
u.ids.push_back(sampler);
base_uniforms.push_back(u);
}
diff --git a/modules/lightmapper_rd/lightmapper_rd.h b/modules/lightmapper_rd/lightmapper_rd.h
index 7ab7f34464..a6a3740051 100644
--- a/modules/lightmapper_rd/lightmapper_rd.h
+++ b/modules/lightmapper_rd/lightmapper_rd.h
@@ -157,16 +157,13 @@ class LightmapperRD : public Lightmapper {
}
};
- struct Box {
+ struct Triangle {
+ uint32_t indices[3] = {};
+ uint32_t slice = 0;
float min_bounds[3] = {};
float pad0 = 0.0;
float max_bounds[3] = {};
float pad1 = 0.0;
- };
-
- struct Triangle {
- uint32_t indices[3] = {};
- uint32_t slice = 0;
bool operator<(const Triangle &p_triangle) const {
return slice < p_triangle.slice;
}
@@ -231,7 +228,7 @@ class LightmapperRD : public Lightmapper {
Vector<Color> probe_values;
BakeError _blit_meshes_into_atlas(int p_max_texture_size, Vector<Ref<Image>> &albedo_images, Vector<Ref<Image>> &emission_images, AABB &bounds, Size2i &atlas_size, int &atlas_slices, BakeStepFunc p_step_function, void *p_bake_userdata);
- void _create_acceleration_structures(RenderingDevice *rd, Size2i atlas_size, int atlas_slices, AABB &bounds, int grid_size, Vector<Probe> &probe_positions, GenerateProbes p_generate_probes, Vector<int> &slice_triangle_count, Vector<int> &slice_seam_count, RID &vertex_buffer, RID &triangle_buffer, RID &box_buffer, RID &lights_buffer, RID &triangle_cell_indices_buffer, RID &probe_positions_buffer, RID &grid_texture, RID &seams_buffer, BakeStepFunc p_step_function, void *p_bake_userdata);
+ void _create_acceleration_structures(RenderingDevice *rd, Size2i atlas_size, int atlas_slices, AABB &bounds, int grid_size, Vector<Probe> &probe_positions, GenerateProbes p_generate_probes, Vector<int> &slice_triangle_count, Vector<int> &slice_seam_count, RID &vertex_buffer, RID &triangle_buffer, RID &lights_buffer, RID &triangle_cell_indices_buffer, RID &probe_positions_buffer, RID &grid_texture, RID &seams_buffer, BakeStepFunc p_step_function, void *p_bake_userdata);
void _raster_geometry(RenderingDevice *rd, Size2i atlas_size, int atlas_slices, int grid_size, AABB bounds, float p_bias, Vector<int> slice_triangle_count, RID position_tex, RID unocclude_tex, RID normal_tex, RID raster_depth_buffer, RID rasterize_shader, RID raster_base_uniform);
public:
diff --git a/modules/lightmapper_rd/lm_common_inc.glsl b/modules/lightmapper_rd/lm_common_inc.glsl
index 1581639036..22172d50e4 100644
--- a/modules/lightmapper_rd/lm_common_inc.glsl
+++ b/modules/lightmapper_rd/lm_common_inc.glsl
@@ -16,26 +16,18 @@ vertices;
struct Triangle {
uvec3 indices;
uint slice;
-};
-
-layout(set = 0, binding = 2, std430) restrict readonly buffer Triangles {
- Triangle data[];
-}
-triangles;
-
-struct Box {
vec3 min_bounds;
uint pad0;
vec3 max_bounds;
uint pad1;
};
-layout(set = 0, binding = 3, std430) restrict readonly buffer Boxes {
- Box data[];
+layout(set = 0, binding = 2, std430) restrict readonly buffer Triangles {
+ Triangle data[];
}
-boxes;
+triangles;
-layout(set = 0, binding = 4, std430) restrict readonly buffer GridIndices {
+layout(set = 0, binding = 3, std430) restrict readonly buffer GridIndices {
uint data[];
}
grid_indices;
@@ -63,7 +55,7 @@ struct Light {
uint pad[3];
};
-layout(set = 0, binding = 5, std430) restrict readonly buffer Lights {
+layout(set = 0, binding = 4, std430) restrict readonly buffer Lights {
Light data[];
}
lights;
@@ -73,19 +65,19 @@ struct Seam {
uvec2 b;
};
-layout(set = 0, binding = 6, std430) restrict readonly buffer Seams {
+layout(set = 0, binding = 5, std430) restrict readonly buffer Seams {
Seam data[];
}
seams;
-layout(set = 0, binding = 7, std430) restrict readonly buffer Probes {
+layout(set = 0, binding = 6, std430) restrict readonly buffer Probes {
vec4 data[];
}
probe_positions;
-layout(set = 0, binding = 8) uniform utexture3D grid;
+layout(set = 0, binding = 7) uniform utexture3D grid;
-layout(set = 0, binding = 9) uniform texture2DArray albedo_tex;
-layout(set = 0, binding = 10) uniform texture2DArray emission_tex;
+layout(set = 0, binding = 8) uniform texture2DArray albedo_tex;
+layout(set = 0, binding = 9) uniform texture2DArray emission_tex;
-layout(set = 0, binding = 11) uniform sampler linear_sampler;
+layout(set = 0, binding = 10) uniform sampler linear_sampler;
diff --git a/modules/lightmapper_rd/lm_compute.glsl b/modules/lightmapper_rd/lm_compute.glsl
index 9ca40535f9..25b334c5eb 100644
--- a/modules/lightmapper_rd/lm_compute.glsl
+++ b/modules/lightmapper_rd/lm_compute.glsl
@@ -115,7 +115,12 @@ bool ray_hits_triangle(vec3 from, vec3 dir, float max_dist, vec3 p0, vec3 p1, ve
return (r_distance > params.bias) && (r_distance < max_dist) && all(greaterThanEqual(r_barycentric, vec3(0.0)));
}
-bool trace_ray(vec3 p_from, vec3 p_to
+const uint RAY_MISS = 0;
+const uint RAY_FRONT = 1;
+const uint RAY_BACK = 2;
+const uint RAY_ANY = 3;
+
+uint trace_ray(vec3 p_from, vec3 p_to
#if defined(MODE_BOUNCE_LIGHT) || defined(MODE_LIGHT_PROBES)
,
out uint r_triangle, out vec3 r_barycentric
@@ -125,6 +130,7 @@ bool trace_ray(vec3 p_from, vec3 p_to
out float r_distance, out vec3 r_normal
#endif
) {
+
/* world coords */
vec3 rel = p_to - p_from;
@@ -150,79 +156,66 @@ bool trace_ray(vec3 p_from, vec3 p_to
while (all(greaterThanEqual(icell, ivec3(0))) && all(lessThan(icell, ivec3(params.grid_size))) && iters < 1000) {
uvec2 cell_data = texelFetch(usampler3D(grid, linear_sampler), icell, 0).xy;
if (cell_data.x > 0) { //triangles here
- bool hit = false;
-#if defined(MODE_UNOCCLUDE)
- bool hit_backface = false;
-#endif
+ uint hit = RAY_MISS;
float best_distance = 1e20;
for (uint i = 0; i < cell_data.x; i++) {
uint tidx = grid_indices.data[cell_data.y + i];
//Ray-Box test
- vec3 t0 = (boxes.data[tidx].min_bounds - p_from) * inv_dir;
- vec3 t1 = (boxes.data[tidx].max_bounds - p_from) * inv_dir;
+ Triangle triangle = triangles.data[tidx];
+ vec3 t0 = (triangle.min_bounds - p_from) * inv_dir;
+ vec3 t1 = (triangle.max_bounds - p_from) * inv_dir;
vec3 tmin = min(t0, t1), tmax = max(t0, t1);
- if (max(tmin.x, max(tmin.y, tmin.z)) <= min(tmax.x, min(tmax.y, tmax.z))) {
+ if (max(tmin.x, max(tmin.y, tmin.z)) > min(tmax.x, min(tmax.y, tmax.z))) {
continue; //ray box failed
}
//prepare triangle vertices
- vec3 vtx0 = vertices.data[triangles.data[tidx].indices.x].position;
- vec3 vtx1 = vertices.data[triangles.data[tidx].indices.y].position;
- vec3 vtx2 = vertices.data[triangles.data[tidx].indices.z].position;
-#if defined(MODE_UNOCCLUDE)
+ vec3 vtx0 = vertices.data[triangle.indices.x].position;
+ vec3 vtx1 = vertices.data[triangle.indices.y].position;
+ vec3 vtx2 = vertices.data[triangle.indices.z].position;
+#if defined(MODE_UNOCCLUDE) || defined(MODE_BOUNCE_LIGHT) || defined(MODE_LIGHT_PROBES)
vec3 normal = -normalize(cross((vtx0 - vtx1), (vtx0 - vtx2)));
bool backface = dot(normal, dir) >= 0.0;
#endif
+
float distance;
vec3 barycentric;
if (ray_hits_triangle(p_from, dir, rel_len, vtx0, vtx1, vtx2, distance, barycentric)) {
#ifdef MODE_DIRECT_LIGHT
- return true; //any hit good
+ return RAY_ANY; //any hit good
#endif
-#if defined(MODE_UNOCCLUDE)
+#if defined(MODE_UNOCCLUDE) || defined(MODE_BOUNCE_LIGHT) || defined(MODE_LIGHT_PROBES)
if (!backface) {
// the case of meshes having both a front and back face in the same plane is more common than
// expected, so if this is a front-face, bias it closer to the ray origin, so it always wins over the back-face
distance = max(params.bias, distance - params.bias);
}
- hit = true;
-
if (distance < best_distance) {
- hit_backface = backface;
+ hit = backface ? RAY_BACK : RAY_FRONT;
best_distance = distance;
+#if defined(MODE_UNOCCLUDE)
r_distance = distance;
r_normal = normal;
- }
-
#endif
-
#if defined(MODE_BOUNCE_LIGHT) || defined(MODE_LIGHT_PROBES)
-
- hit = true;
- if (distance < best_distance) {
- best_distance = distance;
r_triangle = tidx;
r_barycentric = barycentric;
+#endif
}
#endif
}
}
-#if defined(MODE_UNOCCLUDE)
+#if defined(MODE_UNOCCLUDE) || defined(MODE_BOUNCE_LIGHT) || defined(MODE_LIGHT_PROBES)
- if (hit) {
- return hit_backface;
- }
-#endif
-#if defined(MODE_BOUNCE_LIGHT) || defined(MODE_LIGHT_PROBES)
- if (hit) {
- return true;
+ if (hit != RAY_MISS) {
+ return hit;
}
#endif
}
@@ -238,7 +231,7 @@ bool trace_ray(vec3 p_from, vec3 p_to
iters++;
}
- return false;
+ return RAY_MISS;
}
const float PI = 3.14159265f;
@@ -338,7 +331,7 @@ void main() {
continue; //no need to do anything
}
- if (!trace_ray(position + light_dir * params.bias, light_pos)) {
+ if (trace_ray(position + light_dir * params.bias, light_pos) == RAY_MISS) {
vec3 light = lights.data[i].color * lights.data[i].energy * attenuation;
if (lights.data[i].static_bake) {
static_light += light;
@@ -409,6 +402,7 @@ void main() {
vec4(0.0, 0.0, 0.0, 1.0));
#endif
vec3 light_average = vec3(0.0);
+ float active_rays = 0.0;
for (uint i = params.ray_from; i < params.ray_to; i++) {
vec3 ray_dir = normal_mat * vogel_hemisphere(i, params.ray_count, quick_hash(vec2(atlas_pos)));
@@ -416,7 +410,8 @@ void main() {
vec3 barycentric;
vec3 light = vec3(0.0);
- if (trace_ray(position + ray_dir * params.bias, position + ray_dir * length(params.world_size), tidx, barycentric)) {
+ uint trace_result = trace_ray(position + ray_dir * params.bias, position + ray_dir * length(params.world_size), tidx, barycentric);
+ if (trace_result == RAY_FRONT) {
//hit a triangle
vec2 uv0 = vertices.data[triangles.data[tidx].indices.x].uv;
vec2 uv1 = vertices.data[triangles.data[tidx].indices.y].uv;
@@ -424,7 +419,8 @@ void main() {
vec3 uvw = vec3(barycentric.x * uv0 + barycentric.y * uv1 + barycentric.z * uv2, float(triangles.data[tidx].slice));
light = textureLod(sampler2DArray(source_light, linear_sampler), uvw, 0.0).rgb;
- } else if (params.env_transform[0][3] == 0.0) { // Use env_transform[0][3] to indicate when we are computing the first bounce
+ active_rays += 1.0;
+ } else if (trace_result == RAY_MISS && params.env_transform[0][3] == 0.0) { // Use env_transform[0][3] to indicate when we are computing the first bounce
// Did not hit a triangle, reach out for the sky
vec3 sky_dir = normalize(mat3(params.env_transform) * ray_dir);
@@ -438,6 +434,7 @@ void main() {
st /= vec2(PI * 2.0, PI);
light = textureLod(sampler2D(environment, linear_sampler), st, 0.0).rgb;
+ active_rays += 1.0;
}
light_average += light;
@@ -461,7 +458,9 @@ void main() {
if (params.ray_from == 0) {
light_total = vec3(0.0);
} else {
- light_total = imageLoad(bounce_accum, ivec3(atlas_pos, params.atlas_slice)).rgb;
+ vec4 accum = imageLoad(bounce_accum, ivec3(atlas_pos, params.atlas_slice));
+ light_total = accum.rgb;
+ active_rays += accum.a;
}
light_total += light_average;
@@ -476,7 +475,9 @@ void main() {
#endif
if (params.ray_to == params.ray_count) {
- light_total /= float(params.ray_count);
+ if (active_rays > 0) {
+ light_total /= active_rays;
+ }
imageStore(dest_light, ivec3(atlas_pos, params.atlas_slice), vec4(light_total, 1.0));
#ifndef USE_SH_LIGHTMAPS
vec4 accum = imageLoad(accum_light, ivec3(atlas_pos, params.atlas_slice));
@@ -484,7 +485,7 @@ void main() {
imageStore(accum_light, ivec3(atlas_pos, params.atlas_slice), accum);
#endif
} else {
- imageStore(bounce_accum, ivec3(atlas_pos, params.atlas_slice), vec4(light_total, 1.0));
+ imageStore(bounce_accum, ivec3(atlas_pos, params.atlas_slice), vec4(light_total, active_rays));
}
#endif
@@ -517,7 +518,7 @@ void main() {
float d;
vec3 norm;
- if (trace_ray(base_pos, ray_to, d, norm)) {
+ if (trace_ray(base_pos, ray_to, d, norm) == RAY_BACK) {
if (d < min_d) {
vertex_pos = base_pos + rays[i] * d + norm * params.bias * 10.0; //this bias needs to be greater than the regular bias, because otherwise later, rays will go the other side when pointing back.
min_d = d;
@@ -557,7 +558,8 @@ void main() {
vec3 barycentric;
vec3 light;
- if (trace_ray(position + ray_dir * params.bias, position + ray_dir * length(params.world_size), tidx, barycentric)) {
+ uint trace_result = trace_ray(position + ray_dir * params.bias, position + ray_dir * length(params.world_size), tidx, barycentric);
+ if (trace_result == RAY_FRONT) {
vec2 uv0 = vertices.data[triangles.data[tidx].indices.x].uv;
vec2 uv1 = vertices.data[triangles.data[tidx].indices.y].uv;
vec2 uv2 = vertices.data[triangles.data[tidx].indices.z].uv;
@@ -565,7 +567,7 @@ void main() {
light = textureLod(sampler2DArray(source_light, linear_sampler), uvw, 0.0).rgb;
light += textureLod(sampler2DArray(source_direct_light, linear_sampler), uvw, 0.0).rgb;
- } else {
+ } else if (trace_result == RAY_MISS) {
//did not hit a triangle, reach out for the sky
vec3 sky_dir = normalize(mat3(params.env_transform) * ray_dir);
diff --git a/modules/minimp3/audio_stream_mp3.cpp b/modules/minimp3/audio_stream_mp3.cpp
index 2cc974322d..7b52ef178a 100644
--- a/modules/minimp3/audio_stream_mp3.cpp
+++ b/modules/minimp3/audio_stream_mp3.cpp
@@ -37,11 +37,13 @@
#include "core/io/file_access.h"
-void AudioStreamPlaybackMP3::_mix_internal(AudioFrame *p_buffer, int p_frames) {
- ERR_FAIL_COND(!active);
+int AudioStreamPlaybackMP3::_mix_internal(AudioFrame *p_buffer, int p_frames) {
+ ERR_FAIL_COND_V(!active, 0);
int todo = p_frames;
+ int frames_mixed_this_step = p_frames;
+
while (todo && active) {
mp3dec_frame_info_t frame_info;
mp3d_sample_t *buf_frame = nullptr;
@@ -60,6 +62,7 @@ void AudioStreamPlaybackMP3::_mix_internal(AudioFrame *p_buffer, int p_frames) {
seek(mp3_stream->loop_offset);
loops++;
} else {
+ frames_mixed_this_step = p_frames - todo;
//fill remainder with silence
for (int i = p_frames - todo; i < p_frames; i++) {
p_buffer[i] = AudioFrame(0, 0);
@@ -69,6 +72,7 @@ void AudioStreamPlaybackMP3::_mix_internal(AudioFrame *p_buffer, int p_frames) {
}
}
}
+ return frames_mixed_this_step;
}
float AudioStreamPlaybackMP3::get_stream_sampling_rate() {
@@ -210,6 +214,10 @@ float AudioStreamMP3::get_length() const {
return length;
}
+bool AudioStreamMP3::is_monophonic() const {
+ return false;
+}
+
void AudioStreamMP3::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_data", "data"), &AudioStreamMP3::set_data);
ClassDB::bind_method(D_METHOD("get_data"), &AudioStreamMP3::get_data);
diff --git a/modules/minimp3/audio_stream_mp3.h b/modules/minimp3/audio_stream_mp3.h
index ce001fc418..3c8bdd8c53 100644
--- a/modules/minimp3/audio_stream_mp3.h
+++ b/modules/minimp3/audio_stream_mp3.h
@@ -51,7 +51,7 @@ class AudioStreamPlaybackMP3 : public AudioStreamPlaybackResampled {
Ref<AudioStreamMP3> mp3_stream;
protected:
- virtual void _mix_internal(AudioFrame *p_buffer, int p_frames) override;
+ virtual int _mix_internal(AudioFrame *p_buffer, int p_frames) override;
virtual float get_stream_sampling_rate() override;
public:
@@ -103,6 +103,8 @@ public:
virtual float get_length() const override;
+ virtual bool is_monophonic() const override;
+
AudioStreamMP3();
virtual ~AudioStreamMP3();
};
diff --git a/modules/minimp3/doc_classes/AudioStreamMP3.xml b/modules/minimp3/doc_classes/AudioStreamMP3.xml
index 5507329a18..e4f56614ee 100644
--- a/modules/minimp3/doc_classes/AudioStreamMP3.xml
+++ b/modules/minimp3/doc_classes/AudioStreamMP3.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray()">
Contains the audio data in bytes.
@@ -21,6 +19,4 @@
Time in seconds at which the stream starts after being looped.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/mobile_vr/doc_classes/MobileVRInterface.xml b/modules/mobile_vr/doc_classes/MobileVRInterface.xml
index 120535bd41..04ba82ef51 100644
--- a/modules/mobile_vr/doc_classes/MobileVRInterface.xml
+++ b/modules/mobile_vr/doc_classes/MobileVRInterface.xml
@@ -15,8 +15,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="display_to_lens" type="float" setter="set_display_to_lens" getter="get_display_to_lens" default="4.0">
The distance between the display and the lenses inside of the device in centimeters.
@@ -40,6 +38,4 @@
The oversample setting. Because of the lens distortion we have to render our buffers at a higher resolution then the screen can natively handle. A value between 1.5 and 2.0 often provides good results but at the cost of performance.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp
index 590b95ab79..fc1a118e4f 100644
--- a/modules/mobile_vr/mobile_vr_interface.cpp
+++ b/modules/mobile_vr/mobile_vr_interface.cpp
@@ -39,7 +39,7 @@ StringName MobileVRInterface::get_name() const {
return "Native mobile";
};
-int MobileVRInterface::get_capabilities() const {
+uint32_t MobileVRInterface::get_capabilities() const {
return XRInterface::XR_STEREO;
};
@@ -244,59 +244,59 @@ void MobileVRInterface::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "k2", PROPERTY_HINT_RANGE, "0.1,10.0,0.0001"), "set_k2", "get_k2");
}
-void MobileVRInterface::set_eye_height(const real_t p_eye_height) {
+void MobileVRInterface::set_eye_height(const double p_eye_height) {
eye_height = p_eye_height;
}
-real_t MobileVRInterface::get_eye_height() const {
+double MobileVRInterface::get_eye_height() const {
return eye_height;
}
-void MobileVRInterface::set_iod(const real_t p_iod) {
+void MobileVRInterface::set_iod(const double p_iod) {
intraocular_dist = p_iod;
};
-real_t MobileVRInterface::get_iod() const {
+double MobileVRInterface::get_iod() const {
return intraocular_dist;
};
-void MobileVRInterface::set_display_width(const real_t p_display_width) {
+void MobileVRInterface::set_display_width(const double p_display_width) {
display_width = p_display_width;
};
-real_t MobileVRInterface::get_display_width() const {
+double MobileVRInterface::get_display_width() const {
return display_width;
};
-void MobileVRInterface::set_display_to_lens(const real_t p_display_to_lens) {
+void MobileVRInterface::set_display_to_lens(const double p_display_to_lens) {
display_to_lens = p_display_to_lens;
};
-real_t MobileVRInterface::get_display_to_lens() const {
+double MobileVRInterface::get_display_to_lens() const {
return display_to_lens;
};
-void MobileVRInterface::set_oversample(const real_t p_oversample) {
+void MobileVRInterface::set_oversample(const double p_oversample) {
oversample = p_oversample;
};
-real_t MobileVRInterface::get_oversample() const {
+double MobileVRInterface::get_oversample() const {
return oversample;
};
-void MobileVRInterface::set_k1(const real_t p_k1) {
+void MobileVRInterface::set_k1(const double p_k1) {
k1 = p_k1;
};
-real_t MobileVRInterface::get_k1() const {
+double MobileVRInterface::get_k1() const {
return k1;
};
-void MobileVRInterface::set_k2(const real_t p_k2) {
+void MobileVRInterface::set_k2(const double p_k2) {
k2 = p_k2;
};
-real_t MobileVRInterface::get_k2() const {
+double MobileVRInterface::get_k2() const {
return k2;
};
@@ -305,6 +305,10 @@ uint32_t MobileVRInterface::get_view_count() {
return 2;
};
+XRInterface::TrackingStatus MobileVRInterface::get_tracking_status() const {
+ return tracking_state;
+}
+
bool MobileVRInterface::is_initialized() const {
return (initialized);
};
@@ -340,16 +344,16 @@ bool MobileVRInterface::initialize() {
void MobileVRInterface::uninitialize() {
if (initialized) {
XRServer *xr_server = XRServer::get_singleton();
- if (xr_server != nullptr) {
+ if (xr_server != nullptr && xr_server->get_primary_interface() == this) {
// no longer our primary interface
- xr_server->clear_primary_interface_if(this);
+ xr_server->set_primary_interface(nullptr);
}
initialized = false;
};
};
-Size2 MobileVRInterface::get_render_targetsize() {
+Size2 MobileVRInterface::get_render_target_size() {
_THREAD_SAFE_METHOD_
// we use half our window size
@@ -418,7 +422,7 @@ Transform3D MobileVRInterface::get_transform_for_view(uint32_t p_view, const Tra
return transform_for_eye;
};
-CameraMatrix MobileVRInterface::get_projection_for_view(uint32_t p_view, real_t p_aspect, real_t p_z_near, real_t p_z_far) {
+CameraMatrix MobileVRInterface::get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) {
_THREAD_SAFE_METHOD_
CameraMatrix eye;
@@ -429,31 +433,6 @@ CameraMatrix MobileVRInterface::get_projection_for_view(uint32_t p_view, real_t
return eye;
};
-void MobileVRInterface::commit_for_eye(XRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) {
- _THREAD_SAFE_METHOD_
-
- // We must have a valid render target
- ERR_FAIL_COND(!p_render_target.is_valid());
-
- // Because we are rendering to our device we must use our main viewport!
- ERR_FAIL_COND(p_screen_rect == Rect2());
-
- Rect2 dest = p_screen_rect;
- Vector2 eye_center;
-
- // we output half a screen
- dest.size.x *= 0.5;
-
- if (p_eye == XRInterface::EYE_LEFT) {
- eye_center.x = ((-intraocular_dist / 2.0) + (display_width / 4.0)) / (display_width / 2.0);
- } else if (p_eye == XRInterface::EYE_RIGHT) {
- dest.position.x = dest.size.x;
- eye_center.x = ((intraocular_dist / 2.0) - (display_width / 4.0)) / (display_width / 2.0);
- }
- // we don't offset the eye center vertically (yet)
- eye_center.y = 0.0;
-}
-
Vector<BlitToScreen> MobileVRInterface::commit_views(RID p_render_target, const Rect2 &p_screen_rect) {
_THREAD_SAFE_METHOD_
@@ -476,16 +455,16 @@ Vector<BlitToScreen> MobileVRInterface::commit_views(RID p_render_target, const
blit.lens_distortion.aspect_ratio = aspect;
// left eye
- blit.rect = p_screen_rect;
- blit.rect.size.width *= 0.5;
+ blit.dst_rect = p_screen_rect;
+ blit.dst_rect.size.width *= 0.5;
blit.multi_view.layer = 0;
blit.lens_distortion.eye_center.x = ((-intraocular_dist / 2.0) + (display_width / 4.0)) / (display_width / 2.0);
blit_to_screen.push_back(blit);
// right eye
- blit.rect = p_screen_rect;
- blit.rect.size.width *= 0.5;
- blit.rect.position.x = blit.rect.size.width;
+ blit.dst_rect = p_screen_rect;
+ blit.dst_rect.size.width *= 0.5;
+ blit.dst_rect.position.x = blit.dst_rect.size.width;
blit.multi_view.layer = 1;
blit.lens_distortion.eye_center.x = ((intraocular_dist / 2.0) - (display_width / 4.0)) / (display_width / 2.0);
blit_to_screen.push_back(blit);
diff --git a/modules/mobile_vr/mobile_vr_interface.h b/modules/mobile_vr/mobile_vr_interface.h
index 0c05dc1ebb..a843e1188b 100644
--- a/modules/mobile_vr/mobile_vr_interface.h
+++ b/modules/mobile_vr/mobile_vr_interface.h
@@ -52,20 +52,21 @@ class MobileVRInterface : public XRInterface {
private:
bool initialized = false;
+ XRInterface::TrackingStatus tracking_state;
Basis orientation;
// Just set some defaults for these. At some point we need to look at adding a lookup table for common device + headset combos and/or support reading cardboard QR codes
- float eye_height = 1.85;
+ double eye_height = 1.85;
uint64_t last_ticks = 0;
- real_t intraocular_dist = 6.0;
- real_t display_width = 14.5;
- real_t display_to_lens = 4.0;
- real_t oversample = 1.5;
+ double intraocular_dist = 6.0;
+ double display_width = 14.5;
+ double display_to_lens = 4.0;
+ double oversample = 1.5;
- real_t k1 = 0.215;
- real_t k2 = 0.215;
- real_t aspect = 1.0;
+ double k1 = 0.215;
+ double k2 = 0.215;
+ double aspect = 1.0;
/*
logic for processing our sensor data, this was originally in our positional tracker logic but I think
@@ -109,49 +110,47 @@ protected:
static void _bind_methods();
public:
- void set_eye_height(const real_t p_eye_height);
- real_t get_eye_height() const;
+ void set_eye_height(const double p_eye_height);
+ double get_eye_height() const;
- void set_iod(const real_t p_iod);
- real_t get_iod() const;
+ void set_iod(const double p_iod);
+ double get_iod() const;
- void set_display_width(const real_t p_display_width);
- real_t get_display_width() const;
+ void set_display_width(const double p_display_width);
+ double get_display_width() const;
- void set_display_to_lens(const real_t p_display_to_lens);
- real_t get_display_to_lens() const;
+ void set_display_to_lens(const double p_display_to_lens);
+ double get_display_to_lens() const;
- void set_oversample(const real_t p_oversample);
- real_t get_oversample() const;
+ void set_oversample(const double p_oversample);
+ double get_oversample() const;
- void set_k1(const real_t p_k1);
- real_t get_k1() const;
+ void set_k1(const double p_k1);
+ double get_k1() const;
- void set_k2(const real_t p_k2);
- real_t get_k2() const;
+ void set_k2(const double p_k2);
+ double get_k2() const;
virtual StringName get_name() const override;
- virtual int get_capabilities() const override;
+ virtual uint32_t get_capabilities() const override;
+
+ virtual TrackingStatus get_tracking_status() const override;
virtual bool is_initialized() const override;
virtual bool initialize() override;
virtual void uninitialize() override;
- virtual Size2 get_render_targetsize() override;
+ virtual Size2 get_render_target_size() override;
virtual uint32_t get_view_count() override;
virtual Transform3D get_camera_transform() override;
virtual Transform3D get_transform_for_view(uint32_t p_view, const Transform3D &p_cam_transform) override;
- virtual CameraMatrix get_projection_for_view(uint32_t p_view, real_t p_aspect, real_t p_z_near, real_t p_z_far) override;
+ virtual CameraMatrix get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) override;
virtual Vector<BlitToScreen> commit_views(RID p_render_target, const Rect2 &p_screen_rect) override;
virtual void process() override;
- virtual void notification(int p_what) override {}
MobileVRInterface();
~MobileVRInterface();
-
- // deprecated
- virtual void commit_for_eye(XRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) override;
};
#endif // !MOBILE_VR_INTERFACE_H
diff --git a/modules/mobile_vr/register_types.cpp b/modules/mobile_vr/register_types.cpp
index 47d1fe482c..233c16531a 100644
--- a/modules/mobile_vr/register_types.cpp
+++ b/modules/mobile_vr/register_types.cpp
@@ -32,15 +32,30 @@
#include "mobile_vr_interface.h"
+Ref<MobileVRInterface> mobile_vr;
+
void register_mobile_vr_types() {
GDREGISTER_CLASS(MobileVRInterface);
if (XRServer::get_singleton()) {
- Ref<MobileVRInterface> mobile_vr;
mobile_vr.instantiate();
XRServer::get_singleton()->add_interface(mobile_vr);
}
}
void unregister_mobile_vr_types() {
+ if (mobile_vr.is_valid()) {
+ // uninitialise our interface if it is initialised
+ if (mobile_vr->is_initialized()) {
+ mobile_vr->uninitialize();
+ }
+
+ // unregister our interface from the XR server
+ if (XRServer::get_singleton()) {
+ XRServer::get_singleton()->remove_interface(mobile_vr);
+ }
+
+ // and release
+ mobile_vr.unref();
+ }
}
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 1f7f1390ea..af7c54dd5b 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -43,8 +43,10 @@
#include "core/os/thread.h"
#ifdef TOOLS_ENABLED
+#include "core/os/keyboard.h"
#include "editor/bindings_generator.h"
#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
#include "editor/node_dock.h"
#endif
@@ -337,7 +339,7 @@ void CSharpLanguage::get_comment_delimiters(List<String> *p_delimiters) const {
void CSharpLanguage::get_string_delimiters(List<String> *p_delimiters) const {
p_delimiters->push_back("' '"); // character literal
p_delimiters->push_back("\" \""); // regular string literal
- // Verbatim string literals (`@" "`) don't render correctly, so don't highlight them.
+ p_delimiters->push_back("@\" \""); // verbatim string literal
// Generic string highlighting suffices as a workaround for now.
}
@@ -1353,6 +1355,7 @@ void CSharpLanguage::_editor_init_callback() {
// Enable it as a plugin
EditorNode::add_editor_plugin(godotsharp_editor);
+ ED_SHORTCUT("mono/build_solution", TTR("Build Solution"), KEY_MASK_ALT | KEY_B);
godotsharp_editor->enable_plugin();
get_singleton()->godotsharp_editor = godotsharp_editor;
@@ -1861,6 +1864,28 @@ Variant::Type CSharpInstance::get_property_type(const StringName &p_name, bool *
return Variant::NIL;
}
+void CSharpInstance::get_method_list(List<MethodInfo> *p_list) const {
+ if (!script->is_valid() || !script->script_class)
+ return;
+
+ GD_MONO_SCOPE_THREAD_ATTACH;
+
+ // TODO: We're filtering out constructors but there may be other methods unsuitable for explicit calls.
+ GDMonoClass *top = script->script_class;
+
+ while (top && top != script->native) {
+ const Vector<GDMonoMethod *> &methods = top->get_all_methods();
+ for (int i = 0; i < methods.size(); ++i) {
+ MethodInfo minfo = methods[i]->get_method_info();
+ if (minfo.name != CACHED_STRING_NAME(dotctor)) {
+ p_list->push_back(minfo);
+ }
+ }
+
+ top = top->get_parent_class();
+ }
+}
+
bool CSharpInstance::has_method(const StringName &p_method) const {
if (!script.is_valid()) {
return false;
@@ -2124,7 +2149,7 @@ bool CSharpInstance::refcount_decremented() {
return ref_dying;
}
-const Vector<MultiplayerAPI::RPCConfig> CSharpInstance::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> CSharpInstance::get_rpc_methods() const {
return script->get_rpc_methods();
}
@@ -2866,12 +2891,24 @@ int CSharpScript::_try_get_member_export_hint(IMonoClassMember *p_member, Manage
ERR_FAIL_COND_V_MSG(elem_variant_type == Variant::NIL, -1, "Unknown array element type.");
- int hint_res = _try_get_member_export_hint(p_member, elem_type, elem_variant_type, /* allow_generics: */ false, elem_hint, elem_hint_string);
+ bool preset_hint = false;
+ if (elem_variant_type == Variant::STRING) {
+ MonoObject *attr = p_member->get_attribute(CACHED_CLASS(ExportAttribute));
+ if (PropertyHint(CACHED_FIELD(ExportAttribute, hint)->get_int_value(attr)) == PROPERTY_HINT_ENUM) {
+ r_hint_string = itos(elem_variant_type) + "/" + itos(PROPERTY_HINT_ENUM) + ":" + CACHED_FIELD(ExportAttribute, hintString)->get_string_value(attr);
+ preset_hint = true;
+ }
+ }
- ERR_FAIL_COND_V_MSG(hint_res == -1, -1, "Error while trying to determine information about the array element type.");
+ if (!preset_hint) {
+ int hint_res = _try_get_member_export_hint(p_member, elem_type, elem_variant_type, /* allow_generics: */ false, elem_hint, elem_hint_string);
+
+ ERR_FAIL_COND_V_MSG(hint_res == -1, -1, "Error while trying to determine information about the array element type.");
+
+ // Format: type/hint:hint_string
+ r_hint_string = itos(elem_variant_type) + "/" + itos(elem_hint) + ":" + elem_hint_string;
+ }
- // Format: type/hint:hint_string
- r_hint_string = itos(elem_variant_type) + "/" + itos(elem_hint) + ":" + elem_hint_string;
r_hint = PROPERTY_HINT_TYPE_STRING;
} else if (p_allow_generics && p_variant_type == Variant::DICTIONARY) {
@@ -3034,13 +3071,13 @@ void CSharpScript::update_script_class_info(Ref<CSharpScript> p_script) {
Vector<GDMonoMethod *> methods = top->get_all_methods();
for (int i = 0; i < methods.size(); i++) {
if (!methods[i]->is_static()) {
- MultiplayerAPI::RPCMode mode = p_script->_member_get_rpc_mode(methods[i]);
- if (MultiplayerAPI::RPC_MODE_DISABLED != mode) {
- MultiplayerAPI::RPCConfig nd;
+ Multiplayer::RPCMode mode = p_script->_member_get_rpc_mode(methods[i]);
+ if (Multiplayer::RPC_MODE_DISABLED != mode) {
+ Multiplayer::RPCConfig nd;
nd.name = methods[i]->get_name();
nd.rpc_mode = mode;
// TODO Transfer mode, channel
- nd.transfer_mode = MultiplayerPeer::TRANSFER_MODE_RELIABLE;
+ nd.transfer_mode = Multiplayer::TRANSFER_MODE_RELIABLE;
nd.channel = 0;
if (-1 == p_script->rpc_functions.find(nd)) {
p_script->rpc_functions.push_back(nd);
@@ -3054,7 +3091,7 @@ void CSharpScript::update_script_class_info(Ref<CSharpScript> p_script) {
}
// Sort so we are 100% that they are always the same.
- p_script->rpc_functions.sort_custom<MultiplayerAPI::SortRPCConfig>();
+ p_script->rpc_functions.sort_custom<Multiplayer::SortRPCConfig>();
p_script->load_script_signals(p_script->script_class, p_script->native);
}
@@ -3280,10 +3317,19 @@ void CSharpScript::get_script_method_list(List<MethodInfo> *p_list) const {
GD_MONO_SCOPE_THREAD_ATTACH;
- // TODO: Filter out things unsuitable for explicit calls, like constructors.
- const Vector<GDMonoMethod *> &methods = script_class->get_all_methods();
- for (int i = 0; i < methods.size(); ++i) {
- p_list->push_back(methods[i]->get_method_info());
+ // TODO: We're filtering out constructors but there may be other methods unsuitable for explicit calls.
+ GDMonoClass *top = script_class;
+
+ while (top && top != native) {
+ const Vector<GDMonoMethod *> &methods = top->get_all_methods();
+ for (int i = 0; i < methods.size(); ++i) {
+ MethodInfo minfo = methods[i]->get_method_info();
+ if (minfo.name != CACHED_STRING_NAME(dotctor)) {
+ p_list->push_back(methods[i]->get_method_info());
+ }
+ }
+
+ top = top->get_parent_class();
}
}
@@ -3464,21 +3510,18 @@ int CSharpScript::get_member_line(const StringName &p_member) const {
return -1;
}
-MultiplayerAPI::RPCMode CSharpScript::_member_get_rpc_mode(IMonoClassMember *p_member) const {
- if (p_member->has_attribute(CACHED_CLASS(RemoteAttribute))) {
- return MultiplayerAPI::RPC_MODE_REMOTE;
- }
- if (p_member->has_attribute(CACHED_CLASS(MasterAttribute))) {
- return MultiplayerAPI::RPC_MODE_MASTER;
+Multiplayer::RPCMode CSharpScript::_member_get_rpc_mode(IMonoClassMember *p_member) const {
+ if (p_member->has_attribute(CACHED_CLASS(AnyAttribute))) {
+ return Multiplayer::RPC_MODE_ANY;
}
- if (p_member->has_attribute(CACHED_CLASS(PuppetAttribute))) {
- return MultiplayerAPI::RPC_MODE_PUPPET;
+ if (p_member->has_attribute(CACHED_CLASS(AuthorityAttribute))) {
+ return Multiplayer::RPC_MODE_AUTHORITY;
}
- return MultiplayerAPI::RPC_MODE_DISABLED;
+ return Multiplayer::RPC_MODE_DISABLED;
}
-const Vector<MultiplayerAPI::RPCConfig> CSharpScript::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> CSharpScript::get_rpc_methods() const {
return rpc_functions;
}
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h
index 4552f376d0..afc17f694a 100644
--- a/modules/mono/csharp_script.h
+++ b/modules/mono/csharp_script.h
@@ -136,7 +136,7 @@ private:
Map<StringName, EventSignal> event_signals;
bool signals_invalidated = true;
- Vector<MultiplayerAPI::RPCConfig> rpc_functions;
+ Vector<Multiplayer::RPCConfig> rpc_functions;
#ifdef TOOLS_ENABLED
List<PropertyInfo> exported_members_cache; // members_cache
@@ -179,7 +179,7 @@ private:
static void update_script_class_info(Ref<CSharpScript> p_script);
static void initialize_for_managed_type(Ref<CSharpScript> p_script, GDMonoClass *p_class, GDMonoClass *p_native);
- MultiplayerAPI::RPCMode _member_get_rpc_mode(IMonoClassMember *p_member) const;
+ Multiplayer::RPCMode _member_get_rpc_mode(IMonoClassMember *p_member) const;
protected:
static void _bind_methods();
@@ -234,7 +234,7 @@ public:
int get_member_line(const StringName &p_member) const override;
- const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const override;
+ const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override;
#ifdef TOOLS_ENABLED
bool is_placeholder_fallback_enabled() const override { return placeholder_fallback_enabled; }
@@ -293,7 +293,7 @@ public:
void get_property_list(List<PropertyInfo> *p_properties) const override;
Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid) const override;
- /* TODO */ void get_method_list(List<MethodInfo> *p_list) const override {}
+ void get_method_list(List<MethodInfo> *p_list) const override;
bool has_method(const StringName &p_method) const override;
Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) override;
@@ -311,7 +311,7 @@ public:
void refcount_incremented() override;
bool refcount_decremented() override;
- const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const override;
+ const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override;
void notification(int p_notification) override;
void _call_notification(int p_notification);
diff --git a/modules/mono/editor/GodotTools/GodotTools.BuildLogger/GodotBuildLogger.cs b/modules/mono/editor/GodotTools/GodotTools.BuildLogger/GodotBuildLogger.cs
index 9b7b422276..2bf1cb7a18 100644
--- a/modules/mono/editor/GodotTools/GodotTools.BuildLogger/GodotBuildLogger.cs
+++ b/modules/mono/editor/GodotTools/GodotTools.BuildLogger/GodotBuildLogger.cs
@@ -12,12 +12,16 @@ namespace GodotTools.BuildLogger
public string Parameters { get; set; }
public LoggerVerbosity Verbosity { get; set; }
+ private StreamWriter _logStreamWriter;
+ private StreamWriter _issuesStreamWriter;
+ private int _indent;
+
public void Initialize(IEventSource eventSource)
{
if (null == Parameters)
throw new LoggerException("Log directory parameter not specified.");
- var parameters = Parameters.Split(new[] { ';' });
+ string[] parameters = Parameters.Split(new[] { ';' });
string logDir = parameters[0];
@@ -35,8 +39,8 @@ namespace GodotTools.BuildLogger
if (!Directory.Exists(logDir))
Directory.CreateDirectory(logDir);
- logStreamWriter = new StreamWriter(logFile);
- issuesStreamWriter = new StreamWriter(issuesFile);
+ _logStreamWriter = new StreamWriter(logFile);
+ _issuesStreamWriter = new StreamWriter(issuesFile);
}
catch (Exception ex)
{
@@ -66,12 +70,12 @@ namespace GodotTools.BuildLogger
private void eventSource_ProjectStarted(object sender, ProjectStartedEventArgs e)
{
WriteLine(e.Message);
- indent++;
+ _indent++;
}
private void eventSource_ProjectFinished(object sender, ProjectFinishedEventArgs e)
{
- indent--;
+ _indent--;
WriteLine(e.Message);
}
@@ -87,7 +91,7 @@ namespace GodotTools.BuildLogger
string errorLine = $@"error,{e.File.CsvEscape()},{e.LineNumber},{e.ColumnNumber}," +
$"{e.Code?.CsvEscape() ?? string.Empty},{e.Message.CsvEscape()}," +
$"{e.ProjectFile?.CsvEscape() ?? string.Empty}";
- issuesStreamWriter.WriteLine(errorLine);
+ _issuesStreamWriter.WriteLine(errorLine);
}
private void eventSource_WarningRaised(object sender, BuildWarningEventArgs e)
@@ -102,7 +106,7 @@ namespace GodotTools.BuildLogger
string warningLine = $@"warning,{e.File.CsvEscape()},{e.LineNumber},{e.ColumnNumber}," +
$"{e.Code?.CsvEscape() ?? string.Empty},{e.Message.CsvEscape()}," +
$"{e.ProjectFile?.CsvEscape() ?? string.Empty}";
- issuesStreamWriter.WriteLine(warningLine);
+ _issuesStreamWriter.WriteLine(warningLine);
}
private void eventSource_MessageRaised(object sender, BuildMessageEventArgs e)
@@ -136,28 +140,24 @@ namespace GodotTools.BuildLogger
private void WriteLine(string line)
{
- for (int i = indent; i > 0; i--)
+ for (int i = _indent; i > 0; i--)
{
- logStreamWriter.Write("\t");
+ _logStreamWriter.Write("\t");
}
- logStreamWriter.WriteLine(line);
+ _logStreamWriter.WriteLine(line);
}
public void Shutdown()
{
- logStreamWriter.Close();
- issuesStreamWriter.Close();
+ _logStreamWriter.Close();
+ _issuesStreamWriter.Close();
}
private bool IsVerbosityAtLeast(LoggerVerbosity checkVerbosity)
{
return Verbosity >= checkVerbosity;
}
-
- private StreamWriter logStreamWriter;
- private StreamWriter issuesStreamWriter;
- private int indent;
}
internal static class StringExtensions
diff --git a/modules/mono/editor/GodotTools/GodotTools.Core/ProcessExtensions.cs b/modules/mono/editor/GodotTools/GodotTools.Core/ProcessExtensions.cs
index 43d40f2ad9..a4d7dedbd5 100644
--- a/modules/mono/editor/GodotTools/GodotTools.Core/ProcessExtensions.cs
+++ b/modules/mono/editor/GodotTools/GodotTools.Core/ProcessExtensions.cs
@@ -7,7 +7,7 @@ namespace GodotTools.Core
{
public static class ProcessExtensions
{
- public static async Task WaitForExitAsync(this Process process, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task WaitForExitAsync(this Process process, CancellationToken cancellationToken = default)
{
var tcs = new TaskCompletionSource<bool>();
diff --git a/modules/mono/editor/GodotTools/GodotTools.Core/StringExtensions.cs b/modules/mono/editor/GodotTools/GodotTools.Core/StringExtensions.cs
index b217ae4bf7..60a4f297c9 100644
--- a/modules/mono/editor/GodotTools/GodotTools.Core/StringExtensions.cs
+++ b/modules/mono/editor/GodotTools/GodotTools.Core/StringExtensions.cs
@@ -7,6 +7,8 @@ namespace GodotTools.Core
{
public static class StringExtensions
{
+ private static readonly string _driveRoot = Path.GetPathRoot(Environment.CurrentDirectory);
+
public static string RelativeToPath(this string path, string dir)
{
// Make sure the directory ends with a path separator
@@ -49,13 +51,11 @@ namespace GodotTools.Core
return Path.DirectorySeparatorChar + path;
}
- private static readonly string DriveRoot = Path.GetPathRoot(Environment.CurrentDirectory);
-
public static bool IsAbsolutePath(this string path)
{
return path.StartsWith("/", StringComparison.Ordinal) ||
path.StartsWith("\\", StringComparison.Ordinal) ||
- path.StartsWith(DriveRoot, StringComparison.Ordinal);
+ path.StartsWith(_driveRoot, StringComparison.Ordinal);
}
public static string ToSafeDirName(this string dirName, bool allowDirSeparator = false)
diff --git a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs
index 284e94810a..355b21d63a 100644
--- a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs
+++ b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs
@@ -9,15 +9,40 @@ namespace GodotTools.ProjectEditor
{
public class DotNetSolution
{
- private string directoryPath;
- private readonly Dictionary<string, ProjectInfo> projects = new Dictionary<string, ProjectInfo>();
+ private const string _solutionTemplate =
+@"Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+{0}
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+{1}
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+{2}
+ EndGlobalSection
+EndGlobal
+";
+
+ private const string _projectDeclaration =
+@"Project(""{{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}}"") = ""{0}"", ""{1}"", ""{{{2}}}""
+EndProject";
+
+ private const string _solutionPlatformsConfig =
+@" {0}|Any CPU = {0}|Any CPU";
+
+ private const string _projectPlatformsConfig =
+@" {{{0}}}.{1}|Any CPU.ActiveCfg = {1}|Any CPU
+ {{{0}}}.{1}|Any CPU.Build.0 = {1}|Any CPU";
+
+ private string _directoryPath;
+ private readonly Dictionary<string, ProjectInfo> _projects = new Dictionary<string, ProjectInfo>();
public string Name { get; }
public string DirectoryPath
{
- get => directoryPath;
- set => directoryPath = value.IsAbsolutePath() ? value : Path.GetFullPath(value);
+ get => _directoryPath;
+ set => _directoryPath = value.IsAbsolutePath() ? value : Path.GetFullPath(value);
}
public class ProjectInfo
@@ -29,22 +54,22 @@ namespace GodotTools.ProjectEditor
public void AddNewProject(string name, ProjectInfo projectInfo)
{
- projects[name] = projectInfo;
+ _projects[name] = projectInfo;
}
public bool HasProject(string name)
{
- return projects.ContainsKey(name);
+ return _projects.ContainsKey(name);
}
public ProjectInfo GetProjectInfo(string name)
{
- return projects[name];
+ return _projects[name];
}
public bool RemoveProject(string name)
{
- return projects.Remove(name);
+ return _projects.Remove(name);
}
public void Save()
@@ -58,7 +83,7 @@ namespace GodotTools.ProjectEditor
bool isFirstProject = true;
- foreach (var pair in projects)
+ foreach (var pair in _projects)
{
string name = pair.Key;
ProjectInfo projectInfo = pair.Value;
@@ -66,7 +91,7 @@ namespace GodotTools.ProjectEditor
if (!isFirstProject)
projectsDecl += "\n";
- projectsDecl += string.Format(ProjectDeclaration,
+ projectsDecl += string.Format(_projectDeclaration,
name, projectInfo.PathRelativeToSolution.Replace("/", "\\"), projectInfo.Guid);
for (int i = 0; i < projectInfo.Configs.Count; i++)
@@ -79,15 +104,15 @@ namespace GodotTools.ProjectEditor
projPlatformsCfg += "\n";
}
- slnPlatformsCfg += string.Format(SolutionPlatformsConfig, config);
- projPlatformsCfg += string.Format(ProjectPlatformsConfig, projectInfo.Guid, config);
+ slnPlatformsCfg += string.Format(_solutionPlatformsConfig, config);
+ projPlatformsCfg += string.Format(_projectPlatformsConfig, projectInfo.Guid, config);
}
isFirstProject = false;
}
string solutionPath = Path.Combine(DirectoryPath, Name + ".sln");
- string content = string.Format(SolutionTemplate, projectsDecl, slnPlatformsCfg, projPlatformsCfg);
+ string content = string.Format(_solutionTemplate, projectsDecl, slnPlatformsCfg, projPlatformsCfg);
File.WriteAllText(solutionPath, content, Encoding.UTF8); // UTF-8 with BOM
}
@@ -97,37 +122,12 @@ namespace GodotTools.ProjectEditor
Name = name;
}
- const string SolutionTemplate =
-@"Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-{0}
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
-{1}
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
-{2}
- EndGlobalSection
-EndGlobal
-";
-
- const string ProjectDeclaration =
-@"Project(""{{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}}"") = ""{0}"", ""{1}"", ""{{{2}}}""
-EndProject";
-
- const string SolutionPlatformsConfig =
-@" {0}|Any CPU = {0}|Any CPU";
-
- const string ProjectPlatformsConfig =
-@" {{{0}}}.{1}|Any CPU.ActiveCfg = {1}|Any CPU
- {{{0}}}.{1}|Any CPU.Build.0 = {1}|Any CPU";
-
public static void MigrateFromOldConfigNames(string slnPath)
{
if (!File.Exists(slnPath))
return;
- var input = File.ReadAllText(slnPath);
+ string input = File.ReadAllText(slnPath);
if (!Regex.IsMatch(input, Regex.Escape("Tools|Any CPU")))
return;
@@ -151,7 +151,7 @@ EndProject";
};
var regex = new Regex(string.Join("|", dict.Keys.Select(Regex.Escape)));
- var result = regex.Replace(input, m => dict[m.Value]);
+ string result = regex.Replace(input, m => dict[m.Value]);
if (result != input)
{
diff --git a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/IdentifierUtils.cs b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/IdentifierUtils.cs
index ed77076df3..31363df9ef 100644
--- a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/IdentifierUtils.cs
+++ b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/IdentifierUtils.cs
@@ -91,7 +91,7 @@ namespace GodotTools.ProjectEditor
return identifier;
}
- static bool IsKeyword(string value, bool anyDoubleUnderscore)
+ private static bool IsKeyword(string value, bool anyDoubleUnderscore)
{
// Identifiers that start with double underscore are meant to be used for reserved keywords.
// Only existing keywords are enforced, but it may be useful to forbid any identifier
@@ -103,14 +103,14 @@ namespace GodotTools.ProjectEditor
}
else
{
- if (DoubleUnderscoreKeywords.Contains(value))
+ if (_doubleUnderscoreKeywords.Contains(value))
return true;
}
- return Keywords.Contains(value);
+ return _keywords.Contains(value);
}
- private static readonly HashSet<string> DoubleUnderscoreKeywords = new HashSet<string>
+ private static readonly HashSet<string> _doubleUnderscoreKeywords = new HashSet<string>
{
"__arglist",
"__makeref",
@@ -118,7 +118,7 @@ namespace GodotTools.ProjectEditor
"__refvalue",
};
- private static readonly HashSet<string> Keywords = new HashSet<string>
+ private static readonly HashSet<string> _keywords = new HashSet<string>
{
"as",
"do",
diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs b/modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs
index 27737c3da0..28bf57dc21 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs
@@ -13,7 +13,8 @@ namespace GodotTools.Build
public string[] Targets { get; }
public string Configuration { get; }
public bool Restore { get; }
- public Array<string> CustomProperties { get; } = new Array<string>(); // TODO Use List once we have proper serialization
+ // TODO Use List once we have proper serialization
+ public Array<string> CustomProperties { get; } = new Array<string>();
public string LogsDirPath => Path.Combine(GodotSharpDirs.BuildLogsDirs, $"{Solution.MD5Text()}_{Configuration}");
@@ -32,12 +33,12 @@ namespace GodotTools.Build
unchecked
{
int hash = 17;
- hash = hash * 29 + Solution.GetHashCode();
- hash = hash * 29 + Targets.GetHashCode();
- hash = hash * 29 + Configuration.GetHashCode();
- hash = hash * 29 + Restore.GetHashCode();
- hash = hash * 29 + CustomProperties.GetHashCode();
- hash = hash * 29 + LogsDirPath.GetHashCode();
+ hash = (hash * 29) + Solution.GetHashCode();
+ hash = (hash * 29) + Targets.GetHashCode();
+ hash = (hash * 29) + Configuration.GetHashCode();
+ hash = (hash * 29) + Restore.GetHashCode();
+ hash = (hash * 29) + CustomProperties.GetHashCode();
+ hash = (hash * 29) + LogsDirPath.GetHashCode();
return hash;
}
}
diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/BuildManager.cs b/modules/mono/editor/GodotTools/GodotTools/Build/BuildManager.cs
index 2b6f972529..21bff70b15 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Build/BuildManager.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Build/BuildManager.cs
@@ -32,7 +32,7 @@ namespace GodotTools.Build
private static void RemoveOldIssuesFile(BuildInfo buildInfo)
{
- var issuesFile = GetIssuesFilePath(buildInfo);
+ string issuesFile = GetIssuesFilePath(buildInfo);
if (!File.Exists(issuesFile))
return;
diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs b/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs
index 25e260beed..b53347fc4c 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs
@@ -22,14 +22,6 @@ namespace GodotTools.Build
public string ProjectFile { get; set; }
}
- private readonly Array<BuildIssue> issues = new Array<BuildIssue>(); // TODO Use List once we have proper serialization
- private ItemList issuesList;
- private TextEdit buildLog;
- private PopupMenu issuesListContextMenu;
-
- private readonly object pendingBuildLogTextLock = new object();
- [NotNull] private string pendingBuildLogText = string.Empty;
-
[Signal] public event Action BuildStateChanged;
public bool HasBuildExited { get; private set; } = false;
@@ -60,13 +52,21 @@ namespace GodotTools.Build
}
}
- private BuildInfo BuildInfo { get; set; }
-
public bool LogVisible
{
- set => buildLog.Visible = value;
+ set => _buildLog.Visible = value;
}
+ // TODO Use List once we have proper serialization.
+ private readonly Array<BuildIssue> _issues = new Array<BuildIssue>();
+ private ItemList _issuesList;
+ private PopupMenu _issuesListContextMenu;
+ private TextEdit _buildLog;
+ private BuildInfo _buildInfo;
+
+ private readonly object _pendingBuildLogTextLock = new object();
+ [NotNull] private string _pendingBuildLogText = string.Empty;
+
private void LoadIssuesFromFile(string csvFile)
{
using (var file = new Godot.File())
@@ -107,7 +107,7 @@ namespace GodotTools.Build
else
ErrorCount += 1;
- issues.Add(issue);
+ _issues.Add(issue);
}
}
finally
@@ -119,21 +119,21 @@ namespace GodotTools.Build
private void IssueActivated(int idx)
{
- if (idx < 0 || idx >= issuesList.GetItemCount())
+ if (idx < 0 || idx >= _issuesList.GetItemCount())
throw new IndexOutOfRangeException("Item list index out of range");
// Get correct issue idx from issue list
- int issueIndex = (int)(long)issuesList.GetItemMetadata(idx);
+ int issueIndex = (int)(long)_issuesList.GetItemMetadata(idx);
- if (issueIndex < 0 || issueIndex >= issues.Count)
+ if (issueIndex < 0 || issueIndex >= _issues.Count)
throw new IndexOutOfRangeException("Issue index out of range");
- BuildIssue issue = issues[issueIndex];
+ BuildIssue issue = _issues[issueIndex];
if (string.IsNullOrEmpty(issue.ProjectFile) && string.IsNullOrEmpty(issue.File))
return;
- string projectDir = issue.ProjectFile.Length > 0 ? issue.ProjectFile.GetBaseDir() : BuildInfo.Solution.GetBaseDir();
+ string projectDir = issue.ProjectFile.Length > 0 ? issue.ProjectFile.GetBaseDir() : _buildInfo.Solution.GetBaseDir();
string file = Path.Combine(projectDir.SimplifyGodotPath(), issue.File.SimplifyGodotPath());
@@ -153,14 +153,14 @@ namespace GodotTools.Build
public void UpdateIssuesList()
{
- issuesList.Clear();
+ _issuesList.Clear();
using (var warningIcon = GetThemeIcon("Warning", "EditorIcons"))
using (var errorIcon = GetThemeIcon("Error", "EditorIcons"))
{
- for (int i = 0; i < issues.Count; i++)
+ for (int i = 0; i < _issues.Count; i++)
{
- BuildIssue issue = issues[i];
+ BuildIssue issue = _issues[i];
if (!(issue.Warning ? WarningsVisible : ErrorsVisible))
continue;
@@ -191,11 +191,11 @@ namespace GodotTools.Build
int lineBreakIdx = text.IndexOf("\n", StringComparison.Ordinal);
string itemText = lineBreakIdx == -1 ? text : text.Substring(0, lineBreakIdx);
- issuesList.AddItem(itemText, issue.Warning ? warningIcon : errorIcon);
+ _issuesList.AddItem(itemText, issue.Warning ? warningIcon : errorIcon);
- int index = issuesList.GetItemCount() - 1;
- issuesList.SetItemTooltip(index, tooltip);
- issuesList.SetItemMetadata(index, i);
+ int index = _issuesList.GetItemCount() - 1;
+ _issuesList.SetItemTooltip(index, tooltip);
+ _issuesList.SetItemMetadata(index, i);
}
}
}
@@ -205,12 +205,12 @@ namespace GodotTools.Build
HasBuildExited = true;
BuildResult = Build.BuildResult.Error;
- issuesList.Clear();
+ _issuesList.Clear();
var issue = new BuildIssue {Message = cause, Warning = false};
ErrorCount += 1;
- issues.Add(issue);
+ _issues.Add(issue);
UpdateIssuesList();
@@ -219,13 +219,13 @@ namespace GodotTools.Build
private void BuildStarted(BuildInfo buildInfo)
{
- BuildInfo = buildInfo;
+ _buildInfo = buildInfo;
HasBuildExited = false;
- issues.Clear();
+ _issues.Clear();
WarningCount = 0;
ErrorCount = 0;
- buildLog.Text = string.Empty;
+ _buildLog.Text = string.Empty;
UpdateIssuesList();
@@ -237,7 +237,7 @@ namespace GodotTools.Build
HasBuildExited = true;
BuildResult = result;
- LoadIssuesFromFile(Path.Combine(BuildInfo.LogsDirPath, BuildManager.MsBuildIssuesFileName));
+ LoadIssuesFromFile(Path.Combine(_buildInfo.LogsDirPath, BuildManager.MsBuildIssuesFileName));
UpdateIssuesList();
@@ -246,46 +246,46 @@ namespace GodotTools.Build
private void UpdateBuildLogText()
{
- lock (pendingBuildLogTextLock)
+ lock (_pendingBuildLogTextLock)
{
- buildLog.Text += pendingBuildLogText;
- pendingBuildLogText = string.Empty;
+ _buildLog.Text += _pendingBuildLogText;
+ _pendingBuildLogText = string.Empty;
ScrollToLastNonEmptyLogLine();
}
}
private void StdOutputReceived(string text)
{
- lock (pendingBuildLogTextLock)
+ lock (_pendingBuildLogTextLock)
{
- if (pendingBuildLogText.Length == 0)
+ if (_pendingBuildLogText.Length == 0)
CallDeferred(nameof(UpdateBuildLogText));
- pendingBuildLogText += text + "\n";
+ _pendingBuildLogText += text + "\n";
}
}
private void StdErrorReceived(string text)
{
- lock (pendingBuildLogTextLock)
+ lock (_pendingBuildLogTextLock)
{
- if (pendingBuildLogText.Length == 0)
+ if (_pendingBuildLogText.Length == 0)
CallDeferred(nameof(UpdateBuildLogText));
- pendingBuildLogText += text + "\n";
+ _pendingBuildLogText += text + "\n";
}
}
private void ScrollToLastNonEmptyLogLine()
{
int line;
- for (line = buildLog.GetLineCount(); line > 0; line--)
+ for (line = _buildLog.GetLineCount(); line > 0; line--)
{
- string lineText = buildLog.GetLine(line);
+ string lineText = _buildLog.GetLine(line);
if (!string.IsNullOrEmpty(lineText) || !string.IsNullOrEmpty(lineText?.Trim()))
break;
}
- buildLog.SetCaretLine(line);
+ _buildLog.SetCaretLine(line);
}
public void RestartBuild()
@@ -318,11 +318,11 @@ namespace GodotTools.Build
// We don't allow multi-selection but just in case that changes later...
string text = null;
- foreach (int issueIndex in issuesList.GetSelectedItems())
+ foreach (int issueIndex in _issuesList.GetSelectedItems())
{
if (text != null)
text += "\n";
- text += issuesList.GetItemText(issueIndex);
+ text += _issuesList.GetItemText(issueIndex);
}
if (text != null)
@@ -338,20 +338,20 @@ namespace GodotTools.Build
{
_ = index; // Unused
- issuesListContextMenu.Clear();
- issuesListContextMenu.Size = new Vector2i(1, 1);
+ _issuesListContextMenu.Clear();
+ _issuesListContextMenu.Size = new Vector2i(1, 1);
- if (issuesList.IsAnythingSelected())
+ if (_issuesList.IsAnythingSelected())
{
// Add menu entries for the selected item
- issuesListContextMenu.AddIconItem(GetThemeIcon("ActionCopy", "EditorIcons"),
+ _issuesListContextMenu.AddIconItem(GetThemeIcon("ActionCopy", "EditorIcons"),
label: "Copy Error".TTR(), (int)IssuesContextMenuOption.Copy);
}
- if (issuesListContextMenu.GetItemCount() > 0)
+ if (_issuesListContextMenu.GetItemCount() > 0)
{
- issuesListContextMenu.Position = (Vector2i)(issuesList.RectGlobalPosition + atPosition);
- issuesListContextMenu.Popup();
+ _issuesListContextMenu.Position = (Vector2i)(_issuesList.RectGlobalPosition + atPosition);
+ _issuesListContextMenu.Popup();
}
}
@@ -368,27 +368,27 @@ namespace GodotTools.Build
};
AddChild(hsc);
- issuesList = new ItemList
+ _issuesList = new ItemList
{
SizeFlagsVertical = (int)SizeFlags.ExpandFill,
SizeFlagsHorizontal = (int)SizeFlags.ExpandFill // Avoid being squashed by the build log
};
- issuesList.ItemActivated += IssueActivated;
- issuesList.AllowRmbSelect = true;
- issuesList.ItemRmbSelected += IssuesListRmbSelected;
- hsc.AddChild(issuesList);
+ _issuesList.ItemActivated += IssueActivated;
+ _issuesList.AllowRmbSelect = true;
+ _issuesList.ItemRmbSelected += IssuesListRmbSelected;
+ hsc.AddChild(_issuesList);
- issuesListContextMenu = new PopupMenu();
- issuesListContextMenu.IdPressed += IssuesListContextOptionPressed;
- issuesList.AddChild(issuesListContextMenu);
+ _issuesListContextMenu = new PopupMenu();
+ _issuesListContextMenu.IdPressed += IssuesListContextOptionPressed;
+ _issuesList.AddChild(_issuesListContextMenu);
- buildLog = new TextEdit
+ _buildLog = new TextEdit
{
Editable = false,
SizeFlagsVertical = (int)SizeFlags.ExpandFill,
SizeFlagsHorizontal = (int)SizeFlags.ExpandFill // Avoid being squashed by the issues list
};
- hsc.AddChild(buildLog);
+ hsc.AddChild(_buildLog);
AddBuildEventListeners();
}
diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs b/modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs
index 5f35d506de..e9cf7911be 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs
@@ -11,10 +11,10 @@ namespace GodotTools.Build
{
public BuildOutputView BuildOutputView { get; private set; }
- private MenuButton buildMenuBtn;
- private Button errorsBtn;
- private Button warningsBtn;
- private Button viewLogBtn;
+ private MenuButton _buildMenuBtn;
+ private Button _errorsBtn;
+ private Button _warningsBtn;
+ private Button _viewLogBtn;
private void WarningsToggled(bool pressed)
{
@@ -132,16 +132,16 @@ namespace GodotTools.Build
var toolBarHBox = new HBoxContainer { SizeFlagsHorizontal = (int)SizeFlags.ExpandFill };
AddChild(toolBarHBox);
- buildMenuBtn = new MenuButton { Text = "Build", Icon = GetThemeIcon("Play", "EditorIcons") };
- toolBarHBox.AddChild(buildMenuBtn);
+ _buildMenuBtn = new MenuButton { Text = "Build", Icon = GetThemeIcon("Play", "EditorIcons") };
+ toolBarHBox.AddChild(_buildMenuBtn);
- var buildMenu = buildMenuBtn.GetPopup();
+ var buildMenu = _buildMenuBtn.GetPopup();
buildMenu.AddItem("Build Solution".TTR(), (int)BuildMenuOptions.BuildSolution);
buildMenu.AddItem("Rebuild Solution".TTR(), (int)BuildMenuOptions.RebuildSolution);
buildMenu.AddItem("Clean Solution".TTR(), (int)BuildMenuOptions.CleanSolution);
buildMenu.IdPressed += BuildMenuOptionPressed;
- errorsBtn = new Button
+ _errorsBtn = new Button
{
HintTooltip = "Show Errors".TTR(),
Icon = GetThemeIcon("StatusError", "EditorIcons"),
@@ -150,10 +150,10 @@ namespace GodotTools.Build
Pressed = true,
FocusMode = FocusModeEnum.None
};
- errorsBtn.Toggled += ErrorsToggled;
- toolBarHBox.AddChild(errorsBtn);
+ _errorsBtn.Toggled += ErrorsToggled;
+ toolBarHBox.AddChild(_errorsBtn);
- warningsBtn = new Button
+ _warningsBtn = new Button
{
HintTooltip = "Show Warnings".TTR(),
Icon = GetThemeIcon("NodeWarning", "EditorIcons"),
@@ -162,18 +162,18 @@ namespace GodotTools.Build
Pressed = true,
FocusMode = FocusModeEnum.None
};
- warningsBtn.Toggled += WarningsToggled;
- toolBarHBox.AddChild(warningsBtn);
+ _warningsBtn.Toggled += WarningsToggled;
+ toolBarHBox.AddChild(_warningsBtn);
- viewLogBtn = new Button
+ _viewLogBtn = new Button
{
Text = "Show Output".TTR(),
ToggleMode = true,
Pressed = true,
FocusMode = FocusModeEnum.None
};
- viewLogBtn.Toggled += ViewLogToggled;
- toolBarHBox.AddChild(viewLogBtn);
+ _viewLogBtn.Toggled += ViewLogToggled;
+ toolBarHBox.AddChild(_viewLogBtn);
BuildOutputView = new BuildOutputView();
AddChild(BuildOutputView);
@@ -185,12 +185,12 @@ namespace GodotTools.Build
if (what == NotificationThemeChanged)
{
- if (buildMenuBtn != null)
- buildMenuBtn.Icon = GetThemeIcon("Play", "EditorIcons");
- if (errorsBtn != null)
- errorsBtn.Icon = GetThemeIcon("StatusError", "EditorIcons");
- if (warningsBtn != null)
- warningsBtn.Icon = GetThemeIcon("NodeWarning", "EditorIcons");
+ if (_buildMenuBtn != null)
+ _buildMenuBtn.Icon = GetThemeIcon("Play", "EditorIcons");
+ if (_errorsBtn != null)
+ _errorsBtn.Icon = GetThemeIcon("StatusError", "EditorIcons");
+ if (_warningsBtn != null)
+ _warningsBtn.Icon = GetThemeIcon("NodeWarning", "EditorIcons");
}
}
}
diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs b/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs
index 774c49e705..a859c6f717 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs
@@ -61,7 +61,7 @@ namespace GodotTools.Build
}
case BuildTool.JetBrainsMsBuild:
{
- var editorPath = (string)editorSettings.GetSetting(RiderPathManager.EditorPathSettingName);
+ string editorPath = (string)editorSettings.GetSetting(RiderPathManager.EditorPathSettingName);
if (!File.Exists(editorPath))
throw new FileNotFoundException($"Cannot find Rider executable. Tried with path: {editorPath}");
@@ -165,7 +165,9 @@ namespace GodotTools.Build
// Try to find 15.0 with vswhere
- var envNames = Internal.GodotIs32Bits() ? new[] {"ProgramFiles", "ProgramW6432"} : new[] {"ProgramFiles(x86)", "ProgramFiles"};
+ string[] envNames = Internal.GodotIs32Bits() ?
+ envNames = new[] { "ProgramFiles", "ProgramW6432" } :
+ envNames = new[] { "ProgramFiles(x86)", "ProgramFiles" };
string vsWherePath = null;
foreach (var envName in envNames)
diff --git a/modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs b/modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs
index f69307104f..37e6a34977 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs
@@ -65,12 +65,12 @@ namespace GodotTools.Export
if (platform == OS.Platforms.iOS)
{
- var architectures = GetEnablediOSArchs(features).ToArray();
+ string[] architectures = GetEnablediOSArchs(features).ToArray();
CompileAssembliesForiOS(exporter, isDebug, architectures, aotOpts, aotTempDir, assembliesPrepared, bclDir);
}
else if (platform == OS.Platforms.Android)
{
- var abis = GetEnabledAndroidAbis(features).ToArray();
+ string[] abis = GetEnabledAndroidAbis(features).ToArray();
CompileAssembliesForAndroid(exporter, isDebug, abis, aotOpts, aotTempDir, assembliesPrepared, bclDir);
}
else
@@ -138,7 +138,8 @@ namespace GodotTools.Export
}
else
{
- string outputDataLibDir = Path.Combine(outputDataDir, "Mono", platform == OS.Platforms.Windows ? "bin" : "lib");
+ string libDir = platform == OS.Platforms.Windows ? "bin" : "lib";
+ string outputDataLibDir = Path.Combine(outputDataDir, "Mono", libDir);
File.Copy(tempOutputFilePath, Path.Combine(outputDataLibDir, outputFileName));
}
}
diff --git a/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs b/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs
index 0b5aa72a81..3e46a89b7c 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs
@@ -20,7 +20,7 @@ namespace GodotTools.Export
public class ExportPlugin : EditorExportPlugin
{
[Flags]
- enum I18NCodesets : long
+ private enum I18NCodesets : long
{
None = 0,
CJK = 1,
@@ -31,6 +31,8 @@ namespace GodotTools.Export
All = CJK | MidEast | Other | Rare | West
}
+ private string _maybeLastExportError;
+
private void AddI18NAssemblies(Godot.Collections.Dictionary<string, string> assemblies, string bclDir)
{
var codesets = (I18NCodesets)ProjectSettings.GetSetting("mono/export/i18n_codesets");
@@ -83,8 +85,6 @@ namespace GodotTools.Export
GlobalDef("mono/export/aot/android_toolchain_path", "");
}
- private string maybeLastExportError;
-
private void AddFile(string srcPath, string dstPath, bool remap = false)
{
// Add file to the PCK
@@ -129,14 +129,14 @@ namespace GodotTools.Export
}
catch (Exception e)
{
- maybeLastExportError = e.Message;
+ _maybeLastExportError = e.Message;
// 'maybeLastExportError' cannot be null or empty if there was an error, so we
// must consider the possibility of exceptions being thrown without a message.
- if (string.IsNullOrEmpty(maybeLastExportError))
- maybeLastExportError = $"Exception thrown: {e.GetType().Name}";
+ if (string.IsNullOrEmpty(_maybeLastExportError))
+ _maybeLastExportError = $"Exception thrown: {e.GetType().Name}";
- GD.PushError($"Failed to export project: {maybeLastExportError}");
+ GD.PushError($"Failed to export project: {_maybeLastExportError}");
Console.Error.WriteLine(e);
// TODO: Do something on error once _ExportBegin supports failing.
}
@@ -317,10 +317,10 @@ namespace GodotTools.Export
Directory.Delete(aotTempDir, recursive: true);
// TODO: Just a workaround until the export plugins can be made to abort with errors
- if (!string.IsNullOrEmpty(maybeLastExportError)) // Check empty as well, because it's set to empty after hot-reloading
+ if (!string.IsNullOrEmpty(_maybeLastExportError)) // Check empty as well, because it's set to empty after hot-reloading
{
- string lastExportError = maybeLastExportError;
- maybeLastExportError = null;
+ string lastExportError = _maybeLastExportError;
+ _maybeLastExportError = null;
GodotSharpEditor.Instance.ShowErrorDialog(lastExportError, "Failed to export C# project");
}
@@ -470,7 +470,7 @@ namespace GodotTools.Export
private static string DetermineDataDirNameForProject()
{
- var appName = (string)ProjectSettings.GetSetting("application/config/name");
+ string appName = (string)ProjectSettings.GetSetting("application/config/name");
string appNameSafe = appName.ToSafeDirName();
return $"data_{appNameSafe}";
}
diff --git a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
index 1faa6eeac0..98c6881166 100644
--- a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
@@ -21,18 +21,19 @@ namespace GodotTools
{
public class GodotSharpEditor : EditorPlugin, ISerializationListener
{
- private EditorSettings editorSettings;
+ private EditorSettings _editorSettings;
- private PopupMenu menuPopup;
+ private PopupMenu _menuPopup;
- private AcceptDialog errorDialog;
+ private AcceptDialog _errorDialog;
- private Button bottomPanelBtn;
- private Button toolBarBuildButton;
+ private Button _bottomPanelBtn;
+ private Button _toolBarBuildButton;
- public GodotIdeManager GodotIdeManager { get; private set; }
+ // TODO Use WeakReference once we have proper serialization.
+ private WeakRef _exportPluginWeak;
- private WeakRef exportPluginWeak; // TODO Use WeakReference once we have proper serialization
+ public GodotIdeManager GodotIdeManager { get; private set; }
public MSBuildPanel MSBuildPanel { get; private set; }
@@ -42,7 +43,7 @@ namespace GodotTools
{
get
{
- var projectAssemblyName = (string)ProjectSettings.GetSetting("application/config/name");
+ string projectAssemblyName = (string)ProjectSettings.GetSetting("application/config/name");
projectAssemblyName = projectAssemblyName.ToSafeDirName();
if (string.IsNullOrEmpty(projectAssemblyName))
projectAssemblyName = "UnnamedProject";
@@ -123,9 +124,9 @@ namespace GodotTools
private void _RemoveCreateSlnMenuOption()
{
- menuPopup.RemoveItem(menuPopup.GetItemIndex((int)MenuOptions.CreateSln));
- bottomPanelBtn.Show();
- toolBarBuildButton.Show();
+ _menuPopup.RemoveItem(_menuPopup.GetItemIndex((int)MenuOptions.CreateSln));
+ _bottomPanelBtn.Show();
+ _toolBarBuildButton.Show();
}
private void _MenuOptionPressed(int id)
@@ -181,9 +182,9 @@ namespace GodotTools
public void ShowErrorDialog(string message, string title = "Error")
{
- errorDialog.Title = title;
- errorDialog.DialogText = message;
- errorDialog.PopupCentered();
+ _errorDialog.Title = title;
+ _errorDialog.DialogText = message;
+ _errorDialog.PopupCentered();
}
private static string _vsCodePath = string.Empty;
@@ -196,7 +197,7 @@ namespace GodotTools
[UsedImplicitly]
public Error OpenInExternalEditor(Script script, int line, int col)
{
- var editorId = (ExternalEditorId)editorSettings.GetSetting("mono/editor/external_editor");
+ var editorId = (ExternalEditorId)_editorSettings.GetSetting("mono/editor/external_editor");
switch (editorId)
{
@@ -287,7 +288,7 @@ namespace GodotTools
}
}
- var resourcePath = ProjectSettings.GlobalizePath("res://");
+ string resourcePath = ProjectSettings.GlobalizePath("res://");
args.Add(resourcePath);
string scriptPath = ProjectSettings.GlobalizePath(script.ResourcePath);
@@ -346,7 +347,7 @@ namespace GodotTools
[UsedImplicitly]
public bool OverridesExternalEditor()
{
- return (ExternalEditorId)editorSettings.GetSetting("mono/editor/external_editor") != ExternalEditorId.None;
+ return (ExternalEditorId)_editorSettings.GetSetting("mono/editor/external_editor") != ExternalEditorId.None;
}
public override bool _Build()
@@ -387,8 +388,8 @@ namespace GodotTools
private void BuildStateChanged()
{
- if (bottomPanelBtn != null)
- bottomPanelBtn.Icon = MSBuildPanel.BuildOutputView.BuildStateIcon;
+ if (_bottomPanelBtn != null)
+ _bottomPanelBtn.Icon = MSBuildPanel.BuildOutputView.BuildStateIcon;
}
public override void _EnablePlugin()
@@ -402,29 +403,33 @@ namespace GodotTools
var editorInterface = GetEditorInterface();
var editorBaseControl = editorInterface.GetBaseControl();
- editorSettings = editorInterface.GetEditorSettings();
+ _editorSettings = editorInterface.GetEditorSettings();
- errorDialog = new AcceptDialog();
- editorBaseControl.AddChild(errorDialog);
+ _errorDialog = new AcceptDialog();
+ editorBaseControl.AddChild(_errorDialog);
MSBuildPanel = new MSBuildPanel();
- bottomPanelBtn = AddControlToBottomPanel(MSBuildPanel, "MSBuild".TTR());
+ _bottomPanelBtn = AddControlToBottomPanel(MSBuildPanel, "MSBuild".TTR());
AddChild(new HotReloadAssemblyWatcher {Name = "HotReloadAssemblyWatcher"});
- menuPopup = new PopupMenu();
- menuPopup.Hide();
+ _menuPopup = new PopupMenu();
+ _menuPopup.Hide();
+
+ AddToolSubmenuItem("C#", _menuPopup);
- AddToolSubmenuItem("C#", menuPopup);
+ var buildSolutionShortcut = (Shortcut)EditorShortcut("mono/build_solution");
- toolBarBuildButton = new Button
+ _toolBarBuildButton = new Button
{
Text = "Build",
- HintTooltip = "Build solution",
- FocusMode = Control.FocusModeEnum.None
+ HintTooltip = "Build Solution".TTR(),
+ FocusMode = Control.FocusModeEnum.None,
+ Shortcut = buildSolutionShortcut,
+ ShortcutInTooltip = true
};
- toolBarBuildButton.PressedSignal += BuildSolutionPressed;
- AddControlToContainer(CustomControlContainer.Toolbar, toolBarBuildButton);
+ _toolBarBuildButton.PressedSignal += BuildSolutionPressed;
+ AddControlToContainer(CustomControlContainer.Toolbar, _toolBarBuildButton);
if (File.Exists(GodotSharpDirs.ProjectSlnPath) && File.Exists(GodotSharpDirs.ProjectCsProjPath))
{
@@ -432,12 +437,12 @@ namespace GodotTools
}
else
{
- bottomPanelBtn.Hide();
- toolBarBuildButton.Hide();
- menuPopup.AddItem("Create C# solution".TTR(), (int)MenuOptions.CreateSln);
+ _bottomPanelBtn.Hide();
+ _toolBarBuildButton.Hide();
+ _menuPopup.AddItem("Create C# solution".TTR(), (int)MenuOptions.CreateSln);
}
- menuPopup.IdPressed += _MenuOptionPressed;
+ _menuPopup.IdPressed += _MenuOptionPressed;
// External editor settings
EditorDef("mono/editor/external_editor", ExternalEditorId.None);
@@ -465,7 +470,7 @@ namespace GodotTools
$",JetBrains Rider:{(int)ExternalEditorId.Rider}";
}
- editorSettings.AddPropertyInfo(new Godot.Collections.Dictionary
+ _editorSettings.AddPropertyInfo(new Godot.Collections.Dictionary
{
["type"] = Variant.Type.Int,
["name"] = "mono/editor/external_editor",
@@ -477,7 +482,7 @@ namespace GodotTools
var exportPlugin = new ExportPlugin();
AddExportPlugin(exportPlugin);
exportPlugin.RegisterExportSettings();
- exportPluginWeak = WeakRef(exportPlugin);
+ _exportPluginWeak = WeakRef(exportPlugin);
try
{
@@ -500,15 +505,15 @@ namespace GodotTools
{
base.Dispose(disposing);
- if (exportPluginWeak != null)
+ if (_exportPluginWeak != null)
{
// We need to dispose our export plugin before the editor destroys EditorSettings.
// Otherwise, if the GC disposes it at a later time, EditorExportPlatformAndroid
// will be freed after EditorSettings already was, and its device polling thread
// will try to access the EditorSettings singleton, resulting in null dereferencing.
- (exportPluginWeak.GetRef() as ExportPlugin)?.Dispose();
+ (_exportPluginWeak.GetRef() as ExportPlugin)?.Dispose();
- exportPluginWeak.Dispose();
+ _exportPluginWeak.Dispose();
}
GodotIdeManager?.Dispose();
diff --git a/modules/mono/editor/GodotTools/GodotTools/HotReloadAssemblyWatcher.cs b/modules/mono/editor/GodotTools/GodotTools/HotReloadAssemblyWatcher.cs
index b30c857c64..dd05f28af0 100644
--- a/modules/mono/editor/GodotTools/GodotTools/HotReloadAssemblyWatcher.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/HotReloadAssemblyWatcher.cs
@@ -6,7 +6,7 @@ namespace GodotTools
{
public class HotReloadAssemblyWatcher : Node
{
- private Timer watchTimer;
+ private Timer _watchTimer;
public override void _Notification(int what)
{
@@ -27,22 +27,22 @@ namespace GodotTools
public void RestartTimer()
{
- watchTimer.Stop();
- watchTimer.Start();
+ _watchTimer.Stop();
+ _watchTimer.Start();
}
public override void _Ready()
{
base._Ready();
- watchTimer = new Timer
+ _watchTimer = new Timer
{
OneShot = false,
WaitTime = (float)EditorDef("mono/assembly_watch_interval_sec", 0.5)
};
- watchTimer.Timeout += TimerTimeout;
- AddChild(watchTimer);
- watchTimer.Start();
+ _watchTimer.Timeout += TimerTimeout;
+ AddChild(_watchTimer);
+ _watchTimer.Start();
}
}
}
diff --git a/modules/mono/editor/GodotTools/GodotTools/Ides/GodotIdeManager.cs b/modules/mono/editor/GodotTools/GodotTools/Ides/GodotIdeManager.cs
index 451ce39f5c..23339fe50b 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Ides/GodotIdeManager.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Ides/GodotIdeManager.cs
@@ -10,22 +10,22 @@ namespace GodotTools.Ides
{
public sealed class GodotIdeManager : Node, ISerializationListener
{
- private MessagingServer MessagingServer { get; set; }
+ private MessagingServer _messagingServer;
- private MonoDevelop.Instance monoDevelInstance;
- private MonoDevelop.Instance vsForMacInstance;
+ private MonoDevelop.Instance _monoDevelInstance;
+ private MonoDevelop.Instance _vsForMacInstance;
private MessagingServer GetRunningOrNewServer()
{
- if (MessagingServer != null && !MessagingServer.IsDisposed)
- return MessagingServer;
+ if (_messagingServer != null && !_messagingServer.IsDisposed)
+ return _messagingServer;
- MessagingServer?.Dispose();
- MessagingServer = new MessagingServer(OS.GetExecutablePath(), ProjectSettings.GlobalizePath(GodotSharpDirs.ResMetadataDir), new GodotLogger());
+ _messagingServer?.Dispose();
+ _messagingServer = new MessagingServer(OS.GetExecutablePath(), ProjectSettings.GlobalizePath(GodotSharpDirs.ResMetadataDir), new GodotLogger());
- _ = MessagingServer.Listen();
+ _ = _messagingServer.Listen();
- return MessagingServer;
+ return _messagingServer;
}
public override void _Ready()
@@ -48,7 +48,7 @@ namespace GodotTools.Ides
if (disposing)
{
- MessagingServer?.Dispose();
+ _messagingServer?.Dispose();
}
}
@@ -113,14 +113,14 @@ namespace GodotTools.Ides
{
if (Utils.OS.IsMacOS && editorId == ExternalEditorId.VisualStudioForMac)
{
- vsForMacInstance = (vsForMacInstance?.IsDisposed ?? true ? null : vsForMacInstance) ??
+ _vsForMacInstance = (_vsForMacInstance?.IsDisposed ?? true ? null : _vsForMacInstance) ??
new MonoDevelop.Instance(solutionPath, MonoDevelop.EditorId.VisualStudioForMac);
- return vsForMacInstance;
+ return _vsForMacInstance;
}
- monoDevelInstance = (monoDevelInstance?.IsDisposed ?? true ? null : monoDevelInstance) ??
+ _monoDevelInstance = (_monoDevelInstance?.IsDisposed ?? true ? null : _monoDevelInstance) ??
new MonoDevelop.Instance(solutionPath, MonoDevelop.EditorId.MonoDevelop);
- return monoDevelInstance;
+ return _monoDevelInstance;
}
try
@@ -159,15 +159,15 @@ namespace GodotTools.Ides
public readonly struct EditorPick
{
- private readonly string identity;
+ private readonly string _identity;
public EditorPick(string identity)
{
- this.identity = identity;
+ _identity = identity;
}
public bool IsAnyConnected() =>
- GodotSharpEditor.Instance.GodotIdeManager.GetRunningOrNewServer().IsAnyConnected(identity);
+ GodotSharpEditor.Instance.GodotIdeManager.GetRunningOrNewServer().IsAnyConnected(_identity);
private void SendRequest<TResponse>(Request request)
where TResponse : Response, new()
@@ -175,7 +175,7 @@ namespace GodotTools.Ides
// Logs an error if no client is connected with the specified identity
GodotSharpEditor.Instance.GodotIdeManager
.GetRunningOrNewServer()
- .BroadcastRequest<TResponse>(identity, request);
+ .BroadcastRequest<TResponse>(_identity, request);
}
public void SendOpenFile(string file)
diff --git a/modules/mono/editor/GodotTools/GodotTools/Ides/MessagingServer.cs b/modules/mono/editor/GodotTools/GodotTools/Ides/MessagingServer.cs
index eb34a2d0f7..6f11831b80 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Ides/MessagingServer.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Ides/MessagingServer.cs
@@ -21,24 +21,26 @@ namespace GodotTools.Ides
{
public sealed class MessagingServer : IDisposable
{
- private readonly ILogger logger;
+ private readonly ILogger _logger;
- private readonly FileStream metaFile;
- private string MetaFilePath { get; }
+ private readonly FileStream _metaFile;
+ private string _metaFilePath;
- private readonly SemaphoreSlim peersSem = new SemaphoreSlim(1);
+ private readonly SemaphoreSlim _peersSem = new SemaphoreSlim(1);
- private readonly TcpListener listener;
+ private readonly TcpListener _listener;
- private readonly Dictionary<string, Queue<NotifyAwaiter<bool>>> clientConnectedAwaiters = new Dictionary<string, Queue<NotifyAwaiter<bool>>>();
- private readonly Dictionary<string, Queue<NotifyAwaiter<bool>>> clientDisconnectedAwaiters = new Dictionary<string, Queue<NotifyAwaiter<bool>>>();
+ private readonly Dictionary<string, Queue<NotifyAwaiter<bool>>> _clientConnectedAwaiters =
+ new Dictionary<string, Queue<NotifyAwaiter<bool>>>();
+ private readonly Dictionary<string, Queue<NotifyAwaiter<bool>>> _clientDisconnectedAwaiters =
+ new Dictionary<string, Queue<NotifyAwaiter<bool>>>();
public async Task<bool> AwaitClientConnected(string identity)
{
- if (!clientConnectedAwaiters.TryGetValue(identity, out var queue))
+ if (!_clientConnectedAwaiters.TryGetValue(identity, out var queue))
{
queue = new Queue<NotifyAwaiter<bool>>();
- clientConnectedAwaiters.Add(identity, queue);
+ _clientConnectedAwaiters.Add(identity, queue);
}
var awaiter = new NotifyAwaiter<bool>();
@@ -48,10 +50,10 @@ namespace GodotTools.Ides
public async Task<bool> AwaitClientDisconnected(string identity)
{
- if (!clientDisconnectedAwaiters.TryGetValue(identity, out var queue))
+ if (!_clientDisconnectedAwaiters.TryGetValue(identity, out var queue))
{
queue = new Queue<NotifyAwaiter<bool>>();
- clientDisconnectedAwaiters.Add(identity, queue);
+ _clientDisconnectedAwaiters.Add(identity, queue);
}
var awaiter = new NotifyAwaiter<bool>();
@@ -77,7 +79,7 @@ namespace GodotTools.Ides
if (IsDisposed)
return;
- using (await peersSem.UseAsync())
+ using (await _peersSem.UseAsync())
{
if (IsDisposed) // lock may not be fair
return;
@@ -95,19 +97,19 @@ namespace GodotTools.Ides
foreach (var connection in Peers)
connection.Dispose();
Peers.Clear();
- listener?.Stop();
+ _listener?.Stop();
- metaFile?.Dispose();
+ _metaFile?.Dispose();
- File.Delete(MetaFilePath);
+ File.Delete(_metaFilePath);
}
}
public MessagingServer(string editorExecutablePath, string projectMetadataDir, ILogger logger)
{
- this.logger = logger;
+ this._logger = logger;
- MetaFilePath = Path.Combine(projectMetadataDir, GodotIdeMetadata.DefaultFileName);
+ _metaFilePath = Path.Combine(projectMetadataDir, GodotIdeMetadata.DefaultFileName);
// Make sure the directory exists
Directory.CreateDirectory(projectMetadataDir);
@@ -115,13 +117,13 @@ namespace GodotTools.Ides
// The Godot editor's file system thread can keep the file open for writing, so we are forced to allow write sharing...
const FileShare metaFileShare = FileShare.ReadWrite;
- metaFile = File.Open(MetaFilePath, FileMode.Create, FileAccess.Write, metaFileShare);
+ _metaFile = File.Open(_metaFilePath, FileMode.Create, FileAccess.Write, metaFileShare);
- listener = new TcpListener(new IPEndPoint(IPAddress.Loopback, port: 0));
- listener.Start();
+ _listener = new TcpListener(new IPEndPoint(IPAddress.Loopback, port: 0));
+ _listener.Start();
- int port = ((IPEndPoint)listener.Server.LocalEndPoint).Port;
- using (var metaFileWriter = new StreamWriter(metaFile, Encoding.UTF8))
+ int port = ((IPEndPoint)_listener.Server.LocalEndPoint).Port;
+ using (var metaFileWriter = new StreamWriter(_metaFile, Encoding.UTF8))
{
metaFileWriter.WriteLine(port);
metaFileWriter.WriteLine(editorExecutablePath);
@@ -130,30 +132,30 @@ namespace GodotTools.Ides
private async Task AcceptClient(TcpClient tcpClient)
{
- logger.LogDebug("Accept client...");
+ _logger.LogDebug("Accept client...");
- using (var peer = new Peer(tcpClient, new ServerHandshake(), new ServerMessageHandler(), logger))
+ using (var peer = new Peer(tcpClient, new ServerHandshake(), new ServerMessageHandler(), _logger))
{
// ReSharper disable AccessToDisposedClosure
peer.Connected += () =>
{
- logger.LogInfo("Connection open with Ide Client");
+ _logger.LogInfo("Connection open with Ide Client");
- if (clientConnectedAwaiters.TryGetValue(peer.RemoteIdentity, out var queue))
+ if (_clientConnectedAwaiters.TryGetValue(peer.RemoteIdentity, out var queue))
{
while (queue.Count > 0)
queue.Dequeue().SetResult(true);
- clientConnectedAwaiters.Remove(peer.RemoteIdentity);
+ _clientConnectedAwaiters.Remove(peer.RemoteIdentity);
}
};
peer.Disconnected += () =>
{
- if (clientDisconnectedAwaiters.TryGetValue(peer.RemoteIdentity, out var queue))
+ if (_clientDisconnectedAwaiters.TryGetValue(peer.RemoteIdentity, out var queue))
{
while (queue.Count > 0)
queue.Dequeue().SetResult(true);
- clientDisconnectedAwaiters.Remove(peer.RemoteIdentity);
+ _clientDisconnectedAwaiters.Remove(peer.RemoteIdentity);
}
};
// ReSharper restore AccessToDisposedClosure
@@ -162,17 +164,17 @@ namespace GodotTools.Ides
{
if (!await peer.DoHandshake("server"))
{
- logger.LogError("Handshake failed");
+ _logger.LogError("Handshake failed");
return;
}
}
catch (Exception e)
{
- logger.LogError("Handshake failed with unhandled exception: ", e);
+ _logger.LogError("Handshake failed with unhandled exception: ", e);
return;
}
- using (await peersSem.UseAsync())
+ using (await _peersSem.UseAsync())
Peers.Add(peer);
try
@@ -181,7 +183,7 @@ namespace GodotTools.Ides
}
finally
{
- using (await peersSem.UseAsync())
+ using (await _peersSem.UseAsync())
Peers.Remove(peer);
}
}
@@ -192,7 +194,7 @@ namespace GodotTools.Ides
try
{
while (!IsDisposed)
- _ = AcceptClient(await listener.AcceptTcpClientAsync());
+ _ = AcceptClient(await _listener.AcceptTcpClientAsync());
}
catch (Exception e)
{
@@ -204,11 +206,11 @@ namespace GodotTools.Ides
public async void BroadcastRequest<TResponse>(string identity, Request request)
where TResponse : Response, new()
{
- using (await peersSem.UseAsync())
+ using (await _peersSem.UseAsync())
{
if (!IsAnyConnected(identity))
{
- logger.LogError("Cannot write request. No client connected to the Godot Ide Server.");
+ _logger.LogError("Cannot write request. No client connected to the Godot Ide Server.");
return;
}
@@ -225,16 +227,19 @@ namespace GodotTools.Ides
private class ServerHandshake : IHandshake
{
- private static readonly string ServerHandshakeBase = $"{Peer.ServerHandshakeName},Version={Peer.ProtocolVersionMajor}.{Peer.ProtocolVersionMinor}.{Peer.ProtocolVersionRevision}";
- private static readonly string ClientHandshakePattern = $@"{Regex.Escape(Peer.ClientHandshakeName)},Version=([0-9]+)\.([0-9]+)\.([0-9]+),([_a-zA-Z][_a-zA-Z0-9]{{0,63}})";
+ private static readonly string _serverHandshakeBase =
+ $"{Peer.ServerHandshakeName},Version={Peer.ProtocolVersionMajor}.{Peer.ProtocolVersionMinor}.{Peer.ProtocolVersionRevision}";
- public string GetHandshakeLine(string identity) => $"{ServerHandshakeBase},{identity}";
+ private static readonly string _clientHandshakePattern =
+ $@"{Regex.Escape(Peer.ClientHandshakeName)},Version=([0-9]+)\.([0-9]+)\.([0-9]+),([_a-zA-Z][_a-zA-Z0-9]{{0,63}})";
+
+ public string GetHandshakeLine(string identity) => $"{_serverHandshakeBase},{identity}";
public bool IsValidPeerHandshake(string handshake, out string identity, ILogger logger)
{
identity = null;
- var match = Regex.Match(handshake, ClientHandshakePattern);
+ var match = Regex.Match(handshake, _clientHandshakePattern);
if (!match.Success)
return false;
diff --git a/modules/mono/editor/GodotTools/GodotTools/Ides/MonoDevelop/Instance.cs b/modules/mono/editor/GodotTools/GodotTools/Ides/MonoDevelop/Instance.cs
index fd7bbd5578..3f1d5ac3ca 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Ides/MonoDevelop/Instance.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Ides/MonoDevelop/Instance.cs
@@ -10,17 +10,17 @@ namespace GodotTools.Ides.MonoDevelop
public class Instance : IDisposable
{
public DateTime LaunchTime { get; private set; }
- private readonly string solutionFile;
- private readonly EditorId editorId;
+ private readonly string _solutionFile;
+ private readonly EditorId _editorId;
- private Process process;
+ private Process _process;
- public bool IsRunning => process != null && !process.HasExited;
+ public bool IsRunning => _process != null && !_process.HasExited;
public bool IsDisposed { get; private set; }
public void Execute()
{
- bool newWindow = process == null || process.HasExited;
+ bool newWindow = _process == null || _process.HasExited;
var args = new List<string>();
@@ -28,7 +28,7 @@ namespace GodotTools.Ides.MonoDevelop
if (OS.IsMacOS)
{
- string bundleId = BundleIds[editorId];
+ string bundleId = BundleIds[_editorId];
if (Internal.IsOsxAppBundleInstalled(bundleId))
{
@@ -45,18 +45,18 @@ namespace GodotTools.Ides.MonoDevelop
}
else
{
- command = OS.PathWhich(ExecutableNames[editorId]);
+ command = OS.PathWhich(ExecutableNames[_editorId]);
}
}
else
{
- command = OS.PathWhich(ExecutableNames[editorId]);
+ command = OS.PathWhich(ExecutableNames[_editorId]);
}
args.Add("--ipc-tcp");
if (newWindow)
- args.Add("\"" + Path.GetFullPath(solutionFile) + "\"");
+ args.Add("\"" + Path.GetFullPath(_solutionFile) + "\"");
if (command == null)
throw new FileNotFoundException();
@@ -65,7 +65,7 @@ namespace GodotTools.Ides.MonoDevelop
if (newWindow)
{
- process = Process.Start(new ProcessStartInfo
+ _process = Process.Start(new ProcessStartInfo
{
FileName = command,
Arguments = string.Join(" ", args),
@@ -88,14 +88,14 @@ namespace GodotTools.Ides.MonoDevelop
if (editorId == EditorId.VisualStudioForMac && !OS.IsMacOS)
throw new InvalidOperationException($"{nameof(EditorId.VisualStudioForMac)} not supported on this platform");
- this.solutionFile = solutionFile;
- this.editorId = editorId;
+ _solutionFile = solutionFile;
+ _editorId = editorId;
}
public void Dispose()
{
IsDisposed = true;
- process?.Dispose();
+ _process?.Dispose();
}
private static readonly IReadOnlyDictionary<EditorId, string> ExecutableNames;
diff --git a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs
index 821532f759..71055f0125 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathLocator.cs
@@ -11,6 +11,7 @@ using Environment = System.Environment;
using File = System.IO.File;
using Path = System.IO.Path;
using OS = GodotTools.Utils.OS;
+
// ReSharper disable UnassignedField.Local
// ReSharper disable InconsistentNaming
// ReSharper disable UnassignedField.Global
@@ -53,10 +54,10 @@ namespace GodotTools.Ides.Rider
private static RiderInfo[] CollectAllRiderPathsLinux()
{
var installInfos = new List<RiderInfo>();
- var home = Environment.GetEnvironmentVariable("HOME");
+ string home = Environment.GetEnvironmentVariable("HOME");
if (!string.IsNullOrEmpty(home))
{
- var toolboxRiderRootPath = GetToolboxBaseDir();
+ string toolboxRiderRootPath = GetToolboxBaseDir();
installInfos.AddRange(CollectPathsFromToolbox(toolboxRiderRootPath, "bin", "rider.sh", false)
.Select(a => new RiderInfo(a, true)).ToList());
@@ -65,12 +66,12 @@ namespace GodotTools.Ides.Rider
if (shortcut.Exists)
{
- var lines = File.ReadAllLines(shortcut.FullName);
- foreach (var line in lines)
+ string[] lines = File.ReadAllLines(shortcut.FullName);
+ foreach (string line in lines)
{
if (!line.StartsWith("Exec=\""))
continue;
- var path = line.Split('"').Where((item, index) => index == 1).SingleOrDefault();
+ string path = line.Split('"').Where((item, index) => index == 1).SingleOrDefault();
if (string.IsNullOrEmpty(path))
continue;
@@ -82,7 +83,7 @@ namespace GodotTools.Ides.Rider
}
// snap install
- var snapInstallPath = "/snap/rider/current/bin/rider.sh";
+ string snapInstallPath = "/snap/rider/current/bin/rider.sh";
if (new FileInfo(snapInstallPath).Exists)
installInfos.Add(new RiderInfo(snapInstallPath, false));
@@ -98,15 +99,15 @@ namespace GodotTools.Ides.Rider
if (folder.Exists)
{
installInfos.AddRange(folder.GetDirectories("*Rider*.app")
- .Select(a => new RiderInfo(Path.Combine(a.FullName, "Contents/MacOS/rider"), false))
- .ToList());
+ .Select(a => new RiderInfo(Path.Combine(a.FullName, "Contents/MacOS/rider"), false))
+ .ToList());
}
// /Users/user/Library/Application Support/JetBrains/Toolbox/apps/Rider/ch-1/181.3870.267/Rider EAP.app
// should be combined with "Contents/MacOS/rider"
- var toolboxRiderRootPath = GetToolboxBaseDir();
+ string toolboxRiderRootPath = GetToolboxBaseDir();
var paths = CollectPathsFromToolbox(toolboxRiderRootPath, "", "Rider*.app", true)
- .Select(a => new RiderInfo(Path.Combine(a, "Contents/MacOS/rider"), true));
+ .Select(a => new RiderInfo(Path.Combine(a, "Contents/MacOS/rider"), true));
installInfos.AddRange(paths);
return installInfos.ToArray();
@@ -134,7 +135,7 @@ namespace GodotTools.Ides.Rider
{
if (OS.IsWindows)
{
- var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
+ string localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
return GetToolboxRiderRootPath(localAppData);
}
diff --git a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs
index 60dd565ef2..ac29efb716 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs
@@ -49,7 +49,7 @@ namespace GodotTools.Ides.Rider
if (!paths.Any())
return;
- var newPath = paths.Last().Path;
+ string newPath = paths.Last().Path;
Globals.EditorDef(EditorPathSettingName, newPath);
editorSettings.SetSetting(EditorPathSettingName, newPath);
}
@@ -57,7 +57,8 @@ namespace GodotTools.Ides.Rider
public static bool IsExternalEditorSetToRider(EditorSettings editorSettings)
{
- return editorSettings.HasSetting(EditorPathSettingName) && IsRider((string)editorSettings.GetSetting(EditorPathSettingName));
+ return editorSettings.HasSetting(EditorPathSettingName) &&
+ IsRider((string)editorSettings.GetSetting(EditorPathSettingName));
}
public static bool IsRider(string path)
@@ -66,7 +67,7 @@ namespace GodotTools.Ides.Rider
return false;
var fileInfo = new FileInfo(path);
- var filename = fileInfo.Name.ToLowerInvariant();
+ string filename = fileInfo.Name.ToLowerInvariant();
return filename.StartsWith("rider", StringComparison.Ordinal);
}
@@ -83,7 +84,7 @@ namespace GodotTools.Ides.Rider
if (!paths.Any())
return null;
- var newPath = paths.Last().Path;
+ string newPath = paths.Last().Path;
editorSettings.SetSetting(EditorPathSettingName, newPath);
Globals.EditorDef(EditorPathSettingName, newPath);
return newPath;
@@ -96,8 +97,8 @@ namespace GodotTools.Ides.Rider
public static void OpenFile(string slnPath, string scriptPath, int line)
{
- var pathFromSettings = GetRiderPathFromSettings();
- var path = CheckAndUpdatePath(pathFromSettings);
+ string pathFromSettings = GetRiderPathFromSettings();
+ string path = CheckAndUpdatePath(pathFromSettings);
var args = new List<string>();
args.Add(slnPath);
diff --git a/modules/mono/editor/GodotTools/GodotTools/Internals/Globals.cs b/modules/mono/editor/GodotTools/GodotTools/Internals/Globals.cs
index 793f84fd77..5c5ced8c29 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Internals/Globals.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Internals/Globals.cs
@@ -13,6 +13,9 @@ namespace GodotTools.Internals
public static object EditorDef(string setting, object defaultValue, bool restartIfChanged = false) =>
internal_EditorDef(setting, defaultValue, restartIfChanged);
+ public static object EditorShortcut(string setting) =>
+ internal_EditorShortcut(setting);
+
[SuppressMessage("ReSharper", "InconsistentNaming")]
public static string TTR(this string text) => internal_TTR(text);
@@ -28,6 +31,9 @@ namespace GodotTools.Internals
private static extern object internal_EditorDef(string setting, object defaultValue, bool restartIfChanged);
[MethodImpl(MethodImplOptions.InternalCall)]
+ private static extern object internal_EditorShortcut(string setting);
+
+ [MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_TTR(string text);
}
}
diff --git a/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs b/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs
index 6893bc1974..5e70c399b2 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs
@@ -39,45 +39,57 @@ namespace GodotTools.Internals
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_ResDataDir();
+
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_ResMetadataDir();
+
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_ResAssembliesBaseDir();
+
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_ResAssembliesDir();
+
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_ResConfigDir();
+
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_ResTempDir();
+
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_ResTempAssembliesBaseDir();
+
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_ResTempAssembliesDir();
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_MonoUserDir();
+
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_MonoLogsDir();
#region Tools-only
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_MonoSolutionsDir();
+
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_BuildLogsDirs();
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_ProjectSlnPath();
+
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_ProjectCsProjPath();
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_DataEditorToolsDir();
+
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_DataEditorPrebuiltApiDir();
#endregion
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_DataMonoEtcDir();
+
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string internal_DataMonoLibDir();
diff --git a/modules/mono/editor/GodotTools/GodotTools/Utils/FsPathUtils.cs b/modules/mono/editor/GodotTools/GodotTools/Utils/FsPathUtils.cs
index c6724ccaf7..05499339b1 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Utils/FsPathUtils.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Utils/FsPathUtils.cs
@@ -8,7 +8,7 @@ namespace GodotTools.Utils
{
public static class FsPathUtils
{
- private static readonly string ResourcePath = ProjectSettings.GlobalizePath("res://");
+ private static readonly string _resourcePath = ProjectSettings.GlobalizePath("res://");
private static bool PathStartsWithAlreadyNorm(this string childPath, string parentPath)
{
@@ -34,7 +34,7 @@ namespace GodotTools.Utils
public static string LocalizePathWithCaseChecked(string path)
{
string pathNorm = path.NormalizePath() + Path.DirectorySeparatorChar;
- string resourcePathNorm = ResourcePath.NormalizePath() + Path.DirectorySeparatorChar;
+ string resourcePathNorm = _resourcePath.NormalizePath() + Path.DirectorySeparatorChar;
if (!pathNorm.PathStartsWithAlreadyNorm(resourcePathNorm))
return null;
diff --git a/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs b/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs
index 4624439665..93a1360cb6 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs
@@ -13,10 +13,10 @@ namespace GodotTools.Utils
public static class OS
{
[MethodImpl(MethodImplOptions.InternalCall)]
- static extern string GetPlatformName();
+ private static extern string GetPlatformName();
[MethodImpl(MethodImplOptions.InternalCall)]
- static extern bool UnixFileHasExecutableAccess(string filePath);
+ private static extern bool UnixFileHasExecutableAccess(string filePath);
public static class Names
{
@@ -106,7 +106,10 @@ namespace GodotTools.Utils
public static string PathWhich([NotNull] string name)
{
- return IsWindows ? PathWhichWindows(name) : PathWhichUnix(name);
+ if (IsWindows)
+ return PathWhichWindows(name);
+
+ return PathWhichUnix(name);
}
private static string PathWhichWindows([NotNull] string name)
@@ -129,7 +132,8 @@ namespace GodotTools.Utils
}
string nameExt = Path.GetExtension(name);
- bool hasPathExt = !string.IsNullOrEmpty(nameExt) && windowsExts.Contains(nameExt, StringComparer.OrdinalIgnoreCase);
+ bool hasPathExt = !string.IsNullOrEmpty(nameExt) &&
+ windowsExts.Contains(nameExt, StringComparer.OrdinalIgnoreCase);
searchDirs.Add(System.IO.Directory.GetCurrentDirectory()); // last in the list
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 632f7d61cc..e03c5fd248 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -387,7 +387,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
xml_output.append(link_target);
xml_output.append("</c>");
}
- } else if (link_tag == "const") {
+ } else if (link_tag == "constant") {
if (!target_itype || !target_itype->is_object_type) {
if (OS::get_singleton()->is_stdout_verbose()) {
if (target_itype) {
@@ -2610,7 +2610,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
Map<StringName, StringName> accessor_methods;
for (const PropertyInfo &property : property_list) {
- if (property.usage & PROPERTY_USAGE_GROUP || property.usage & PROPERTY_USAGE_SUBGROUP || property.usage & PROPERTY_USAGE_CATEGORY) {
+ if (property.usage & PROPERTY_USAGE_GROUP || property.usage & PROPERTY_USAGE_SUBGROUP || property.usage & PROPERTY_USAGE_CATEGORY || (property.type == Variant::NIL && property.usage & PROPERTY_USAGE_ARRAY)) {
continue;
}
@@ -3130,8 +3130,18 @@ bool BindingsGenerator::_arg_default_value_from_variant(const Variant &p_val, Ar
r_iarg.def_param_mode = ArgumentInterface::NULLABLE_VAL;
} break;
case Variant::CALLABLE:
+ ERR_FAIL_COND_V_MSG(r_iarg.type.cname != name_cache.type_Callable, false,
+ "Parameter of type '" + String(r_iarg.type.cname) + "' cannot have a default value of type '" + String(name_cache.type_Callable) + "'.");
+ ERR_FAIL_COND_V_MSG(!p_val.is_zero(), false,
+ "Parameter of type '" + String(r_iarg.type.cname) + "' can only have null/zero as the default value.");
+ r_iarg.default_argument = "default";
+ break;
case Variant::SIGNAL:
- CRASH_NOW_MSG("Parameter of type '" + String(r_iarg.type.cname) + "' cannot have a default value.");
+ ERR_FAIL_COND_V_MSG(r_iarg.type.cname != name_cache.type_Signal, false,
+ "Parameter of type '" + String(r_iarg.type.cname) + "' cannot have a default value of type '" + String(name_cache.type_Signal) + "'.");
+ ERR_FAIL_COND_V_MSG(!p_val.is_zero(), false,
+ "Parameter of type '" + String(r_iarg.type.cname) + "' can only have null/zero as the default value.");
+ r_iarg.default_argument = "default";
break;
default:
CRASH_NOW_MSG("Unexpected Variant type: " + itos(p_val.get_type()));
diff --git a/modules/mono/editor/bindings_generator.h b/modules/mono/editor/bindings_generator.h
index a649181b20..51a27ee934 100644
--- a/modules/mono/editor/bindings_generator.h
+++ b/modules/mono/editor/bindings_generator.h
@@ -536,6 +536,8 @@ class BindingsGenerator {
StringName type_Object = StaticCString::create("Object");
StringName type_RefCounted = StaticCString::create("RefCounted");
StringName type_RID = StaticCString::create("RID");
+ StringName type_Callable = StaticCString::create("Callable");
+ StringName type_Signal = StaticCString::create("Signal");
StringName type_String = StaticCString::create("String");
StringName type_StringName = StaticCString::create("StringName");
StringName type_NodePath = StaticCString::create("NodePath");
@@ -573,7 +575,7 @@ class BindingsGenerator {
StaticCString::create(_STR(PackedByteArray)),
StaticCString::create(_STR(PackedInt32Array)),
- StaticCString::create(_STR(PackedInt64rray)),
+ StaticCString::create(_STR(PackedInt64Array)),
StaticCString::create(_STR(PackedFloat32Array)),
StaticCString::create(_STR(PackedFloat64Array)),
StaticCString::create(_STR(PackedStringArray)),
diff --git a/modules/mono/editor/code_completion.cpp b/modules/mono/editor/code_completion.cpp
index b7b36a92d8..7433c865f5 100644
--- a/modules/mono/editor/code_completion.cpp
+++ b/modules/mono/editor/code_completion.cpp
@@ -121,10 +121,10 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr
case CompletionKind::NODE_PATHS: {
{
// AutoLoads
- Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
+ OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
- for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : autoloads) {
- const ProjectSettings::AutoloadInfo &info = E.value;
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
+ const ProjectSettings::AutoloadInfo &info = E.value();
suggestions.push_back(quoted("/root/" + String(info.name)));
}
}
diff --git a/modules/mono/editor/editor_internal_calls.cpp b/modules/mono/editor/editor_internal_calls.cpp
index 8164f459ca..9a61b63c12 100644
--- a/modules/mono/editor/editor_internal_calls.cpp
+++ b/modules/mono/editor/editor_internal_calls.cpp
@@ -241,7 +241,7 @@ MonoBoolean godot_icall_Internal_IsAssembliesReloadingNeeded() {
void godot_icall_Internal_ReloadAssemblies(MonoBoolean p_soft_reload) {
#ifdef GD_MONO_HOT_RELOAD
- _GodotSharp::get_singleton()->call_deferred(SNAME("_reload_assemblies"), (bool)p_soft_reload);
+ mono_bind::GodotSharp::get_singleton()->call_deferred(SNAME("_reload_assemblies"), (bool)p_soft_reload);
#endif
}
@@ -306,6 +306,12 @@ MonoObject *godot_icall_Globals_EditorDef(MonoString *p_setting, MonoObject *p_d
return GDMonoMarshal::variant_to_mono_object(result);
}
+MonoObject *godot_icall_Globals_EditorShortcut(MonoString *p_setting) {
+ String setting = GDMonoMarshal::mono_string_to_godot(p_setting);
+ Ref<Shortcut> result = ED_GET_SHORTCUT(setting);
+ return GDMonoMarshal::variant_to_mono_object(result);
+}
+
MonoString *godot_icall_Globals_TTR(MonoString *p_text) {
String text = GDMonoMarshal::mono_string_to_godot(p_text);
return GDMonoMarshal::mono_string_from_godot(TTR(text));
@@ -380,6 +386,7 @@ void register_editor_internal_calls() {
GDMonoUtils::add_internal_call("GodotTools.Internals.Globals::internal_EditorScale", godot_icall_Globals_EditorScale);
GDMonoUtils::add_internal_call("GodotTools.Internals.Globals::internal_GlobalDef", godot_icall_Globals_GlobalDef);
GDMonoUtils::add_internal_call("GodotTools.Internals.Globals::internal_EditorDef", godot_icall_Globals_EditorDef);
+ GDMonoUtils::add_internal_call("GodotTools.Internals.Globals::internal_EditorShortcut", godot_icall_Globals_EditorShortcut);
GDMonoUtils::add_internal_call("GodotTools.Internals.Globals::internal_TTR", godot_icall_Globals_TTR);
// Utils.OS
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/AABB.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/AABB.cs
index 1a3b81487f..70a2cf5695 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/AABB.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/AABB.cs
@@ -20,7 +20,7 @@ namespace Godot
private Vector3 _size;
/// <summary>
- /// Beginning corner. Typically has values lower than End.
+ /// Beginning corner. Typically has values lower than <see cref="End"/>.
/// </summary>
/// <value>Directly uses a private field.</value>
public Vector3 Position
@@ -30,7 +30,7 @@ namespace Godot
}
/// <summary>
- /// Size from Position to End. Typically all components are positive.
+ /// Size from <see cref="Position"/> to <see cref="End"/>. Typically all components are positive.
/// If the size is negative, you can use <see cref="Abs"/> to fix it.
/// </summary>
/// <value>Directly uses a private field.</value>
@@ -44,7 +44,10 @@ namespace Godot
/// Ending corner. This is calculated as <see cref="Position"/> plus
/// <see cref="Size"/>. Setting this value will change the size.
/// </summary>
- /// <value>Getting is equivalent to `value = Position + Size`, setting is equivalent to `Size = value - Position`.</value>
+ /// <value>
+ /// Getting is equivalent to <paramref name="value"/> = <see cref="Position"/> + <see cref="Size"/>,
+ /// setting is equivalent to <see cref="Size"/> = <paramref name="value"/> - <see cref="Position"/>
+ /// </value>
public Vector3 End
{
get { return _position + _size; }
@@ -52,10 +55,10 @@ namespace Godot
}
/// <summary>
- /// Returns an AABB with equivalent position and size, modified so that
+ /// Returns an <see cref="AABB"/> with equivalent position and size, modified so that
/// the most-negative corner is the origin and the size is positive.
/// </summary>
- /// <returns>The modified AABB.</returns>
+ /// <returns>The modified <see cref="AABB"/>.</returns>
public AABB Abs()
{
Vector3 end = End;
@@ -64,30 +67,42 @@ namespace Godot
}
/// <summary>
- /// Returns true if this AABB completely encloses another one.
+ /// Returns the center of the <see cref="AABB"/>, which is equal
+ /// to <see cref="Position"/> + (<see cref="Size"/> / 2).
/// </summary>
- /// <param name="with">The other AABB that may be enclosed.</param>
- /// <returns>A bool for whether or not this AABB encloses `b`.</returns>
+ /// <returns>The center.</returns>
+ public Vector3 GetCenter()
+ {
+ return _position + (_size * 0.5f);
+ }
+
+ /// <summary>
+ /// Returns <see langword="true"/> if this <see cref="AABB"/> completely encloses another one.
+ /// </summary>
+ /// <param name="with">The other <see cref="AABB"/> that may be enclosed.</param>
+ /// <returns>
+ /// A <see langword="bool"/> for whether or not this <see cref="AABB"/> encloses <paramref name="with"/>.
+ /// </returns>
public bool Encloses(AABB with)
{
- Vector3 src_min = _position;
- Vector3 src_max = _position + _size;
- Vector3 dst_min = with._position;
- Vector3 dst_max = with._position + with._size;
+ Vector3 srcMin = _position;
+ Vector3 srcMax = _position + _size;
+ Vector3 dstMin = with._position;
+ Vector3 dstMax = with._position + with._size;
- return src_min.x <= dst_min.x &&
- src_max.x > dst_max.x &&
- src_min.y <= dst_min.y &&
- src_max.y > dst_max.y &&
- src_min.z <= dst_min.z &&
- src_max.z > dst_max.z;
+ return srcMin.x <= dstMin.x &&
+ srcMax.x > dstMax.x &&
+ srcMin.y <= dstMin.y &&
+ srcMax.y > dstMax.y &&
+ srcMin.z <= dstMin.z &&
+ srcMax.z > dstMax.z;
}
/// <summary>
- /// Returns this AABB expanded to include a given point.
+ /// Returns this <see cref="AABB"/> expanded to include a given point.
/// </summary>
/// <param name="point">The point to include.</param>
- /// <returns>The expanded AABB.</returns>
+ /// <returns>The expanded <see cref="AABB"/>.</returns>
public AABB Expand(Vector3 point)
{
Vector3 begin = _position;
@@ -123,7 +138,7 @@ namespace Godot
}
/// <summary>
- /// Returns the area of the AABB.
+ /// Returns the area of the <see cref="AABB"/>.
/// </summary>
/// <returns>The area.</returns>
public real_t GetArea()
@@ -132,10 +147,10 @@ namespace Godot
}
/// <summary>
- /// Gets the position of one of the 8 endpoints of the AABB.
+ /// Gets the position of one of the 8 endpoints of the <see cref="AABB"/>.
/// </summary>
/// <param name="idx">Which endpoint to get.</param>
- /// <returns>An endpoint of the AABB.</returns>
+ /// <returns>An endpoint of the <see cref="AABB"/>.</returns>
public Vector3 GetEndpoint(int idx)
{
switch (idx)
@@ -157,26 +172,29 @@ namespace Godot
case 7:
return new Vector3(_position.x + _size.x, _position.y + _size.y, _position.z + _size.z);
default:
- throw new ArgumentOutOfRangeException(nameof(idx), String.Format("Index is {0}, but a value from 0 to 7 is expected.", idx));
+ {
+ throw new ArgumentOutOfRangeException(nameof(idx),
+ $"Index is {idx}, but a value from 0 to 7 is expected.");
+ }
}
}
/// <summary>
- /// Returns the normalized longest axis of the AABB.
+ /// Returns the normalized longest axis of the <see cref="AABB"/>.
/// </summary>
- /// <returns>A vector representing the normalized longest axis of the AABB.</returns>
+ /// <returns>A vector representing the normalized longest axis of the <see cref="AABB"/>.</returns>
public Vector3 GetLongestAxis()
{
var axis = new Vector3(1f, 0f, 0f);
- real_t max_size = _size.x;
+ real_t maxSize = _size.x;
- if (_size.y > max_size)
+ if (_size.y > maxSize)
{
axis = new Vector3(0f, 1f, 0f);
- max_size = _size.y;
+ maxSize = _size.y;
}
- if (_size.z > max_size)
+ if (_size.z > maxSize)
{
axis = new Vector3(0f, 0f, 1f);
}
@@ -185,21 +203,21 @@ namespace Godot
}
/// <summary>
- /// Returns the <see cref="Vector3.Axis"/> index of the longest axis of the AABB.
+ /// Returns the <see cref="Vector3.Axis"/> index of the longest axis of the <see cref="AABB"/>.
/// </summary>
/// <returns>A <see cref="Vector3.Axis"/> index for which axis is longest.</returns>
public Vector3.Axis GetLongestAxisIndex()
{
var axis = Vector3.Axis.X;
- real_t max_size = _size.x;
+ real_t maxSize = _size.x;
- if (_size.y > max_size)
+ if (_size.y > maxSize)
{
axis = Vector3.Axis.Y;
- max_size = _size.y;
+ maxSize = _size.y;
}
- if (_size.z > max_size)
+ if (_size.z > maxSize)
{
axis = Vector3.Axis.Z;
}
@@ -208,38 +226,38 @@ namespace Godot
}
/// <summary>
- /// Returns the scalar length of the longest axis of the AABB.
+ /// Returns the scalar length of the longest axis of the <see cref="AABB"/>.
/// </summary>
- /// <returns>The scalar length of the longest axis of the AABB.</returns>
+ /// <returns>The scalar length of the longest axis of the <see cref="AABB"/>.</returns>
public real_t GetLongestAxisSize()
{
- real_t max_size = _size.x;
+ real_t maxSize = _size.x;
- if (_size.y > max_size)
- max_size = _size.y;
+ if (_size.y > maxSize)
+ maxSize = _size.y;
- if (_size.z > max_size)
- max_size = _size.z;
+ if (_size.z > maxSize)
+ maxSize = _size.z;
- return max_size;
+ return maxSize;
}
/// <summary>
- /// Returns the normalized shortest axis of the AABB.
+ /// Returns the normalized shortest axis of the <see cref="AABB"/>.
/// </summary>
- /// <returns>A vector representing the normalized shortest axis of the AABB.</returns>
+ /// <returns>A vector representing the normalized shortest axis of the <see cref="AABB"/>.</returns>
public Vector3 GetShortestAxis()
{
var axis = new Vector3(1f, 0f, 0f);
- real_t max_size = _size.x;
+ real_t maxSize = _size.x;
- if (_size.y < max_size)
+ if (_size.y < maxSize)
{
axis = new Vector3(0f, 1f, 0f);
- max_size = _size.y;
+ maxSize = _size.y;
}
- if (_size.z < max_size)
+ if (_size.z < maxSize)
{
axis = new Vector3(0f, 0f, 1f);
}
@@ -248,21 +266,21 @@ namespace Godot
}
/// <summary>
- /// Returns the <see cref="Vector3.Axis"/> index of the shortest axis of the AABB.
+ /// Returns the <see cref="Vector3.Axis"/> index of the shortest axis of the <see cref="AABB"/>.
/// </summary>
/// <returns>A <see cref="Vector3.Axis"/> index for which axis is shortest.</returns>
public Vector3.Axis GetShortestAxisIndex()
{
var axis = Vector3.Axis.X;
- real_t max_size = _size.x;
+ real_t maxSize = _size.x;
- if (_size.y < max_size)
+ if (_size.y < maxSize)
{
axis = Vector3.Axis.Y;
- max_size = _size.y;
+ maxSize = _size.y;
}
- if (_size.z < max_size)
+ if (_size.z < maxSize)
{
axis = Vector3.Axis.Z;
}
@@ -271,20 +289,20 @@ namespace Godot
}
/// <summary>
- /// Returns the scalar length of the shortest axis of the AABB.
+ /// Returns the scalar length of the shortest axis of the <see cref="AABB"/>.
/// </summary>
- /// <returns>The scalar length of the shortest axis of the AABB.</returns>
+ /// <returns>The scalar length of the shortest axis of the <see cref="AABB"/>.</returns>
public real_t GetShortestAxisSize()
{
- real_t max_size = _size.x;
+ real_t maxSize = _size.x;
- if (_size.y < max_size)
- max_size = _size.y;
+ if (_size.y < maxSize)
+ maxSize = _size.y;
- if (_size.z < max_size)
- max_size = _size.z;
+ if (_size.z < maxSize)
+ maxSize = _size.z;
- return max_size;
+ return maxSize;
}
/// <summary>
@@ -295,23 +313,23 @@ namespace Godot
/// <returns>A vector representing the support.</returns>
public Vector3 GetSupport(Vector3 dir)
{
- Vector3 half_extents = _size * 0.5f;
- Vector3 ofs = _position + half_extents;
+ Vector3 halfExtents = _size * 0.5f;
+ Vector3 ofs = _position + halfExtents;
return ofs + new Vector3(
- dir.x > 0f ? -half_extents.x : half_extents.x,
- dir.y > 0f ? -half_extents.y : half_extents.y,
- dir.z > 0f ? -half_extents.z : half_extents.z);
+ dir.x > 0f ? -halfExtents.x : halfExtents.x,
+ dir.y > 0f ? -halfExtents.y : halfExtents.y,
+ dir.z > 0f ? -halfExtents.z : halfExtents.z);
}
/// <summary>
- /// Returns a copy of the AABB grown a given amount of units towards all the sides.
+ /// Returns a copy of the <see cref="AABB"/> grown a given amount of units towards all the sides.
/// </summary>
/// <param name="by">The amount to grow by.</param>
- /// <returns>The grown AABB.</returns>
+ /// <returns>The grown <see cref="AABB"/>.</returns>
public AABB Grow(real_t by)
{
- var res = this;
+ AABB res = this;
res._position.x -= by;
res._position.y -= by;
@@ -324,28 +342,37 @@ namespace Godot
}
/// <summary>
- /// Returns true if the AABB is flat or empty, or false otherwise.
+ /// Returns <see langword="true"/> if the <see cref="AABB"/> is flat or empty,
+ /// or <see langword="false"/> otherwise.
/// </summary>
- /// <returns>A bool for whether or not the AABB has area.</returns>
+ /// <returns>
+ /// A <see langword="bool"/> for whether or not the <see cref="AABB"/> has area.
+ /// </returns>
public bool HasNoArea()
{
return _size.x <= 0f || _size.y <= 0f || _size.z <= 0f;
}
/// <summary>
- /// Returns true if the AABB has no surface (no size), or false otherwise.
+ /// Returns <see langword="true"/> if the <see cref="AABB"/> has no surface (no size),
+ /// or <see langword="false"/> otherwise.
/// </summary>
- /// <returns>A bool for whether or not the AABB has area.</returns>
+ /// <returns>
+ /// A <see langword="bool"/> for whether or not the <see cref="AABB"/> has area.
+ /// </returns>
public bool HasNoSurface()
{
return _size.x <= 0f && _size.y <= 0f && _size.z <= 0f;
}
/// <summary>
- /// Returns true if the AABB contains a point, or false otherwise.
+ /// Returns <see langword="true"/> if the <see cref="AABB"/> contains a point,
+ /// or <see langword="false"/> otherwise.
/// </summary>
/// <param name="point">The point to check.</param>
- /// <returns>A bool for whether or not the AABB contains `point`.</returns>
+ /// <returns>
+ /// A <see langword="bool"/> for whether or not the <see cref="AABB"/> contains <paramref name="point"/>.
+ /// </returns>
public bool HasPoint(Vector3 point)
{
if (point.x < _position.x)
@@ -365,56 +392,59 @@ namespace Godot
}
/// <summary>
- /// Returns the intersection of this AABB and `b`.
+ /// Returns the intersection of this <see cref="AABB"/> and <paramref name="with"/>.
/// </summary>
- /// <param name="with">The other AABB.</param>
- /// <returns>The clipped AABB.</returns>
+ /// <param name="with">The other <see cref="AABB"/>.</param>
+ /// <returns>The clipped <see cref="AABB"/>.</returns>
public AABB Intersection(AABB with)
{
- Vector3 src_min = _position;
- Vector3 src_max = _position + _size;
- Vector3 dst_min = with._position;
- Vector3 dst_max = with._position + with._size;
+ Vector3 srcMin = _position;
+ Vector3 srcMax = _position + _size;
+ Vector3 dstMin = with._position;
+ Vector3 dstMax = with._position + with._size;
Vector3 min, max;
- if (src_min.x > dst_max.x || src_max.x < dst_min.x)
+ if (srcMin.x > dstMax.x || srcMax.x < dstMin.x)
{
return new AABB();
}
- min.x = src_min.x > dst_min.x ? src_min.x : dst_min.x;
- max.x = src_max.x < dst_max.x ? src_max.x : dst_max.x;
+ min.x = srcMin.x > dstMin.x ? srcMin.x : dstMin.x;
+ max.x = srcMax.x < dstMax.x ? srcMax.x : dstMax.x;
- if (src_min.y > dst_max.y || src_max.y < dst_min.y)
+ if (srcMin.y > dstMax.y || srcMax.y < dstMin.y)
{
return new AABB();
}
- min.y = src_min.y > dst_min.y ? src_min.y : dst_min.y;
- max.y = src_max.y < dst_max.y ? src_max.y : dst_max.y;
+ min.y = srcMin.y > dstMin.y ? srcMin.y : dstMin.y;
+ max.y = srcMax.y < dstMax.y ? srcMax.y : dstMax.y;
- if (src_min.z > dst_max.z || src_max.z < dst_min.z)
+ if (srcMin.z > dstMax.z || srcMax.z < dstMin.z)
{
return new AABB();
}
- min.z = src_min.z > dst_min.z ? src_min.z : dst_min.z;
- max.z = src_max.z < dst_max.z ? src_max.z : dst_max.z;
+ min.z = srcMin.z > dstMin.z ? srcMin.z : dstMin.z;
+ max.z = srcMax.z < dstMax.z ? srcMax.z : dstMax.z;
return new AABB(min, max - min);
}
/// <summary>
- /// Returns true if the AABB overlaps with `b`
+ /// Returns <see langword="true"/> if the <see cref="AABB"/> overlaps with <paramref name="with"/>
/// (i.e. they have at least one point in common).
///
- /// If `includeBorders` is true, they will also be considered overlapping
- /// if their borders touch, even without intersection.
+ /// If <paramref name="includeBorders"/> is <see langword="true"/>,
+ /// they will also be considered overlapping if their borders touch,
+ /// even without intersection.
/// </summary>
- /// <param name="with">The other AABB to check for intersections with.</param>
+ /// <param name="with">The other <see cref="AABB"/> to check for intersections with.</param>
/// <param name="includeBorders">Whether or not to consider borders.</param>
- /// <returns>A bool for whether or not they are intersecting.</returns>
+ /// <returns>
+ /// A <see langword="bool"/> for whether or not they are intersecting.
+ /// </returns>
public bool Intersects(AABB with, bool includeBorders = false)
{
if (includeBorders)
@@ -452,10 +482,12 @@ namespace Godot
}
/// <summary>
- /// Returns true if the AABB is on both sides of `plane`.
+ /// Returns <see langword="true"/> if the <see cref="AABB"/> is on both sides of <paramref name="plane"/>.
/// </summary>
- /// <param name="plane">The plane to check for intersection.</param>
- /// <returns>A bool for whether or not the AABB intersects the plane.</returns>
+ /// <param name="plane">The <see cref="Plane"/> to check for intersection.</param>
+ /// <returns>
+ /// A <see langword="bool"/> for whether or not the <see cref="AABB"/> intersects the <see cref="Plane"/>.
+ /// </returns>
public bool IntersectsPlane(Plane plane)
{
Vector3[] points =
@@ -489,11 +521,14 @@ namespace Godot
}
/// <summary>
- /// Returns true if the AABB intersects the line segment between `from` and `to`.
+ /// Returns <see langword="true"/> if the <see cref="AABB"/> intersects
+ /// the line segment between <paramref name="from"/> and <paramref name="to"/>.
/// </summary>
/// <param name="from">The start of the line segment.</param>
/// <param name="to">The end of the line segment.</param>
- /// <returns>A bool for whether or not the AABB intersects the line segment.</returns>
+ /// <returns>
+ /// A <see langword="bool"/> for whether or not the <see cref="AABB"/> intersects the line segment.
+ /// </returns>
public bool IntersectsSegment(Vector3 from, Vector3 to)
{
real_t min = 0f;
@@ -549,10 +584,10 @@ namespace Godot
}
/// <summary>
- /// Returns a larger AABB that contains this AABB and `b`.
+ /// Returns a larger <see cref="AABB"/> that contains this <see cref="AABB"/> and <paramref name="with"/>.
/// </summary>
- /// <param name="with">The other AABB.</param>
- /// <returns>The merged AABB.</returns>
+ /// <param name="with">The other <see cref="AABB"/>.</param>
+ /// <returns>The merged <see cref="AABB"/>.</returns>
public AABB Merge(AABB with)
{
Vector3 beg1 = _position;
@@ -561,22 +596,22 @@ namespace Godot
var end2 = new Vector3(with._size.x, with._size.y, with._size.z) + beg2;
var min = new Vector3(
- beg1.x < beg2.x ? beg1.x : beg2.x,
- beg1.y < beg2.y ? beg1.y : beg2.y,
- beg1.z < beg2.z ? beg1.z : beg2.z
- );
+ beg1.x < beg2.x ? beg1.x : beg2.x,
+ beg1.y < beg2.y ? beg1.y : beg2.y,
+ beg1.z < beg2.z ? beg1.z : beg2.z
+ );
var max = new Vector3(
- end1.x > end2.x ? end1.x : end2.x,
- end1.y > end2.y ? end1.y : end2.y,
- end1.z > end2.z ? end1.z : end2.z
- );
+ end1.x > end2.x ? end1.x : end2.x,
+ end1.y > end2.y ? end1.y : end2.y,
+ end1.z > end2.z ? end1.z : end2.z
+ );
return new AABB(min, max - min);
}
/// <summary>
- /// Constructs an AABB from a position and size.
+ /// Constructs an <see cref="AABB"/> from a position and size.
/// </summary>
/// <param name="position">The position.</param>
/// <param name="size">The size, typically positive.</param>
@@ -587,7 +622,8 @@ namespace Godot
}
/// <summary>
- /// Constructs an AABB from a position, width, height, and depth.
+ /// Constructs an <see cref="AABB"/> from a <paramref name="position"/>,
+ /// <paramref name="width"/>, <paramref name="height"/>, and <paramref name="depth"/>.
/// </summary>
/// <param name="position">The position.</param>
/// <param name="width">The width, typically positive.</param>
@@ -600,7 +636,8 @@ namespace Godot
}
/// <summary>
- /// Constructs an AABB from x, y, z, and size.
+ /// Constructs an <see cref="AABB"/> from <paramref name="x"/>,
+ /// <paramref name="y"/>, <paramref name="z"/>, and <paramref name="size"/>.
/// </summary>
/// <param name="x">The position's X coordinate.</param>
/// <param name="y">The position's Y coordinate.</param>
@@ -613,7 +650,9 @@ namespace Godot
}
/// <summary>
- /// Constructs an AABB from x, y, z, width, height, and depth.
+ /// Constructs an <see cref="AABB"/> from <paramref name="x"/>,
+ /// <paramref name="y"/>, <paramref name="z"/>, <paramref name="width"/>,
+ /// <paramref name="height"/>, and <paramref name="depth"/>.
/// </summary>
/// <param name="x">The position's X coordinate.</param>
/// <param name="y">The position's Y coordinate.</param>
@@ -637,6 +676,11 @@ namespace Godot
return !left.Equals(right);
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this AABB and <paramref name="obj"/> are equal.
+ /// </summary>
+ /// <param name="obj">The other object to compare.</param>
+ /// <returns>Whether or not the AABB structure and the other object are equal.</returns>
public override bool Equals(object obj)
{
if (obj is AABB)
@@ -647,32 +691,49 @@ namespace Godot
return false;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this AABB and <paramref name="other"/> are equal
+ /// </summary>
+ /// <param name="other">The other AABB to compare.</param>
+ /// <returns>Whether or not the AABBs are equal.</returns>
public bool Equals(AABB other)
{
return _position == other._position && _size == other._size;
}
/// <summary>
- /// Returns true if this AABB and `other` are approximately equal, by running
- /// <see cref="Vector3.IsEqualApprox(Vector3)"/> on each component.
+ /// Returns <see langword="true"/> if this AABB and <paramref name="other"/> are approximately equal,
+ /// by running <see cref="Vector3.IsEqualApprox(Vector3)"/> on each component.
/// </summary>
/// <param name="other">The other AABB to compare.</param>
- /// <returns>Whether or not the AABBs are approximately equal.</returns>
+ /// <returns>Whether or not the AABBs structures are approximately equal.</returns>
public bool IsEqualApprox(AABB other)
{
return _position.IsEqualApprox(other._position) && _size.IsEqualApprox(other._size);
}
+ /// <summary>
+ /// Serves as the hash function for <see cref="AABB"/>.
+ /// </summary>
+ /// <returns>A hash code for this AABB.</returns>
public override int GetHashCode()
{
return _position.GetHashCode() ^ _size.GetHashCode();
}
+ /// <summary>
+ /// Converts this <see cref="AABB"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this AABB.</returns>
public override string ToString()
{
return $"{_position}, {_size}";
}
+ /// <summary>
+ /// Converts this <see cref="AABB"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this AABB.</returns>
public string ToString(string format)
{
return $"{_position.ToString(format)}, {_size.ToString(format)}";
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs
index f52a767018..a412047196 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs
@@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
namespace Godot.Collections
{
- class ArraySafeHandle : SafeHandle
+ internal class ArraySafeHandle : SafeHandle
{
public ArraySafeHandle(IntPtr handle) : base(IntPtr.Zero, true)
{
@@ -33,15 +33,15 @@ namespace Godot.Collections
/// </summary>
public class Array : IList, IDisposable
{
- ArraySafeHandle safeHandle;
- bool disposed = false;
+ private ArraySafeHandle _safeHandle;
+ private bool _disposed = false;
/// <summary>
/// Constructs a new empty <see cref="Array"/>.
/// </summary>
public Array()
{
- safeHandle = new ArraySafeHandle(godot_icall_Array_Ctor());
+ _safeHandle = new ArraySafeHandle(godot_icall_Array_Ctor());
}
/// <summary>
@@ -69,31 +69,31 @@ namespace Godot.Collections
{
throw new NullReferenceException($"Parameter '{nameof(array)} cannot be null.'");
}
- safeHandle = new ArraySafeHandle(godot_icall_Array_Ctor_MonoArray(array));
+ _safeHandle = new ArraySafeHandle(godot_icall_Array_Ctor_MonoArray(array));
}
internal Array(ArraySafeHandle handle)
{
- safeHandle = handle;
+ _safeHandle = handle;
}
internal Array(IntPtr handle)
{
- safeHandle = new ArraySafeHandle(handle);
+ _safeHandle = new ArraySafeHandle(handle);
}
internal IntPtr GetPtr()
{
- if (disposed)
+ if (_disposed)
throw new ObjectDisposedException(GetType().FullName);
- return safeHandle.DangerousGetHandle();
+ return _safeHandle.DangerousGetHandle();
}
/// <summary>
/// Duplicates this <see cref="Array"/>.
/// </summary>
- /// <param name="deep">If true, performs a deep copy.</param>
+ /// <param name="deep">If <see langword="true"/>, performs a deep copy.</param>
/// <returns>A new Godot Array.</returns>
public Array Duplicate(bool deep = false)
{
@@ -136,16 +136,16 @@ namespace Godot.Collections
/// </summary>
public void Dispose()
{
- if (disposed)
+ if (_disposed)
return;
- if (safeHandle != null)
+ if (_safeHandle != null)
{
- safeHandle.Dispose();
- safeHandle = null;
+ _safeHandle.Dispose();
+ _safeHandle = null;
}
- disposed = true;
+ _disposed = true;
}
// IList
@@ -155,9 +155,9 @@ namespace Godot.Collections
bool IList.IsFixedSize => false;
/// <summary>
- /// Returns the object at the given index.
+ /// Returns the object at the given <paramref name="index"/>.
/// </summary>
- /// <value>The object at the given index.</value>
+ /// <value>The object at the given <paramref name="index"/>.</value>
public object this[int index]
{
get => godot_icall_Array_At(GetPtr(), index);
@@ -166,7 +166,7 @@ namespace Godot.Collections
/// <summary>
/// Adds an object to the end of this <see cref="Array"/>.
- /// This is the same as `append` or `push_back` in GDScript.
+ /// This is the same as <c>append</c> or <c>push_back</c> in GDScript.
/// </summary>
/// <param name="value">The object to add.</param>
/// <returns>The new size after adding the object.</returns>
@@ -203,7 +203,7 @@ namespace Godot.Collections
public void Insert(int index, object value) => godot_icall_Array_Insert(GetPtr(), index, value);
/// <summary>
- /// Removes the first occurrence of the specified value
+ /// Removes the first occurrence of the specified <paramref name="value"/>
/// from this <see cref="Array"/>.
/// </summary>
/// <param name="value">The value to remove.</param>
@@ -272,67 +272,67 @@ namespace Godot.Collections
}
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static IntPtr godot_icall_Array_Ctor();
+ internal static extern IntPtr godot_icall_Array_Ctor();
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static IntPtr godot_icall_Array_Ctor_MonoArray(System.Array array);
+ internal static extern IntPtr godot_icall_Array_Ctor_MonoArray(System.Array array);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_Array_Dtor(IntPtr ptr);
+ internal static extern void godot_icall_Array_Dtor(IntPtr ptr);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static object godot_icall_Array_At(IntPtr ptr, int index);
+ internal static extern object godot_icall_Array_At(IntPtr ptr, int index);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static object godot_icall_Array_At_Generic(IntPtr ptr, int index, int elemTypeEncoding, IntPtr elemTypeClass);
+ internal static extern object godot_icall_Array_At_Generic(IntPtr ptr, int index, int elemTypeEncoding, IntPtr elemTypeClass);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_Array_SetAt(IntPtr ptr, int index, object value);
+ internal static extern void godot_icall_Array_SetAt(IntPtr ptr, int index, object value);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static int godot_icall_Array_Count(IntPtr ptr);
+ internal static extern int godot_icall_Array_Count(IntPtr ptr);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static int godot_icall_Array_Add(IntPtr ptr, object item);
+ internal static extern int godot_icall_Array_Add(IntPtr ptr, object item);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_Array_Clear(IntPtr ptr);
+ internal static extern void godot_icall_Array_Clear(IntPtr ptr);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static IntPtr godot_icall_Array_Concatenate(IntPtr left, IntPtr right);
+ internal static extern IntPtr godot_icall_Array_Concatenate(IntPtr left, IntPtr right);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static bool godot_icall_Array_Contains(IntPtr ptr, object item);
+ internal static extern bool godot_icall_Array_Contains(IntPtr ptr, object item);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_Array_CopyTo(IntPtr ptr, System.Array array, int arrayIndex);
+ internal static extern void godot_icall_Array_CopyTo(IntPtr ptr, System.Array array, int arrayIndex);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static IntPtr godot_icall_Array_Duplicate(IntPtr ptr, bool deep);
+ internal static extern IntPtr godot_icall_Array_Duplicate(IntPtr ptr, bool deep);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static int godot_icall_Array_IndexOf(IntPtr ptr, object item);
+ internal static extern int godot_icall_Array_IndexOf(IntPtr ptr, object item);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_Array_Insert(IntPtr ptr, int index, object item);
+ internal static extern void godot_icall_Array_Insert(IntPtr ptr, int index, object item);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static bool godot_icall_Array_Remove(IntPtr ptr, object item);
+ internal static extern bool godot_icall_Array_Remove(IntPtr ptr, object item);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_Array_RemoveAt(IntPtr ptr, int index);
+ internal static extern void godot_icall_Array_RemoveAt(IntPtr ptr, int index);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static Error godot_icall_Array_Resize(IntPtr ptr, int newSize);
+ internal static extern Error godot_icall_Array_Resize(IntPtr ptr, int newSize);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static Error godot_icall_Array_Shuffle(IntPtr ptr);
+ internal static extern Error godot_icall_Array_Shuffle(IntPtr ptr);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_Array_Generic_GetElementTypeInfo(Type elemType, out int elemTypeEncoding, out IntPtr elemTypeClass);
+ internal static extern void godot_icall_Array_Generic_GetElementTypeInfo(Type elemType, out int elemTypeEncoding, out IntPtr elemTypeClass);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static string godot_icall_Array_ToString(IntPtr ptr);
+ internal static extern string godot_icall_Array_ToString(IntPtr ptr);
}
/// <summary>
@@ -344,7 +344,7 @@ namespace Godot.Collections
/// <typeparam name="T">The type of the array.</typeparam>
public class Array<T> : IList<T>, ICollection<T>, IEnumerable<T>
{
- Array objectArray;
+ private Array _objectArray;
internal static int elemTypeEncoding;
internal static IntPtr elemTypeClass;
@@ -359,7 +359,7 @@ namespace Godot.Collections
/// </summary>
public Array()
{
- objectArray = new Array();
+ _objectArray = new Array();
}
/// <summary>
@@ -372,7 +372,7 @@ namespace Godot.Collections
if (collection == null)
throw new NullReferenceException($"Parameter '{nameof(collection)} cannot be null.'");
- objectArray = new Array(collection);
+ _objectArray = new Array(collection);
}
/// <summary>
@@ -386,7 +386,7 @@ namespace Godot.Collections
{
throw new NullReferenceException($"Parameter '{nameof(array)} cannot be null.'");
}
- objectArray = new Array(array);
+ _objectArray = new Array(array);
}
/// <summary>
@@ -395,22 +395,22 @@ namespace Godot.Collections
/// <param name="array">The untyped array to construct from.</param>
public Array(Array array)
{
- objectArray = array;
+ _objectArray = array;
}
internal Array(IntPtr handle)
{
- objectArray = new Array(handle);
+ _objectArray = new Array(handle);
}
internal Array(ArraySafeHandle handle)
{
- objectArray = new Array(handle);
+ _objectArray = new Array(handle);
}
internal IntPtr GetPtr()
{
- return objectArray.GetPtr();
+ return _objectArray.GetPtr();
}
/// <summary>
@@ -419,17 +419,17 @@ namespace Godot.Collections
/// <param name="from">The typed array to convert.</param>
public static explicit operator Array(Array<T> from)
{
- return from.objectArray;
+ return from._objectArray;
}
/// <summary>
/// Duplicates this <see cref="Array{T}"/>.
/// </summary>
- /// <param name="deep">If true, performs a deep copy.</param>
+ /// <param name="deep">If <see langword="true"/>, performs a deep copy.</param>
/// <returns>A new Godot Array.</returns>
public Array<T> Duplicate(bool deep = false)
{
- return new Array<T>(objectArray.Duplicate(deep));
+ return new Array<T>(_objectArray.Duplicate(deep));
}
/// <summary>
@@ -439,7 +439,7 @@ namespace Godot.Collections
/// <returns><see cref="Error.Ok"/> if successful, or an error code.</returns>
public Error Resize(int newSize)
{
- return objectArray.Resize(newSize);
+ return _objectArray.Resize(newSize);
}
/// <summary>
@@ -447,7 +447,7 @@ namespace Godot.Collections
/// </summary>
public void Shuffle()
{
- objectArray.Shuffle();
+ _objectArray.Shuffle();
}
/// <summary>
@@ -458,19 +458,19 @@ namespace Godot.Collections
/// <returns>A new Godot Array with the contents of both arrays.</returns>
public static Array<T> operator +(Array<T> left, Array<T> right)
{
- return new Array<T>(left.objectArray + right.objectArray);
+ return new Array<T>(left._objectArray + right._objectArray);
}
// IList<T>
/// <summary>
- /// Returns the value at the given index.
+ /// Returns the value at the given <paramref name="index"/>.
/// </summary>
- /// <value>The value at the given index.</value>
+ /// <value>The value at the given <paramref name="index"/>.</value>
public T this[int index]
{
get { return (T)Array.godot_icall_Array_At_Generic(GetPtr(), index, elemTypeEncoding, elemTypeClass); }
- set { objectArray[index] = value; }
+ set { _objectArray[index] = value; }
}
/// <summary>
@@ -481,7 +481,7 @@ namespace Godot.Collections
/// <returns>The index of the item, or -1 if not found.</returns>
public int IndexOf(T item)
{
- return objectArray.IndexOf(item);
+ return _objectArray.IndexOf(item);
}
/// <summary>
@@ -494,7 +494,7 @@ namespace Godot.Collections
/// <param name="item">The item to insert.</param>
public void Insert(int index, T item)
{
- objectArray.Insert(index, item);
+ _objectArray.Insert(index, item);
}
/// <summary>
@@ -503,7 +503,7 @@ namespace Godot.Collections
/// <param name="index">The index of the element to remove.</param>
public void RemoveAt(int index)
{
- objectArray.RemoveAt(index);
+ _objectArray.RemoveAt(index);
}
// ICollection<T>
@@ -515,20 +515,20 @@ namespace Godot.Collections
/// <returns>The number of elements.</returns>
public int Count
{
- get { return objectArray.Count; }
+ get { return _objectArray.Count; }
}
bool ICollection<T>.IsReadOnly => false;
/// <summary>
/// Adds an item to the end of this <see cref="Array{T}"/>.
- /// This is the same as `append` or `push_back` in GDScript.
+ /// This is the same as <c>append</c> or <c>push_back</c> in GDScript.
/// </summary>
/// <param name="item">The item to add.</param>
/// <returns>The new size after adding the item.</returns>
public void Add(T item)
{
- objectArray.Add(item);
+ _objectArray.Add(item);
}
/// <summary>
@@ -536,7 +536,7 @@ namespace Godot.Collections
/// </summary>
public void Clear()
{
- objectArray.Clear();
+ _objectArray.Clear();
}
/// <summary>
@@ -546,7 +546,7 @@ namespace Godot.Collections
/// <returns>Whether or not this array contains the given item.</returns>
public bool Contains(T item)
{
- return objectArray.Contains(item);
+ return _objectArray.Contains(item);
}
/// <summary>
@@ -566,7 +566,7 @@ namespace Godot.Collections
// TODO This may be quite slow because every element access is an internal call.
// It could be moved entirely to an internal call if we find out how to do the cast there.
- int count = objectArray.Count;
+ int count = _objectArray.Count;
if (array.Length < (arrayIndex + count))
throw new ArgumentException("Destination array was not long enough. Check destIndex and length, and the array's lower bounds.");
@@ -583,7 +583,7 @@ namespace Godot.Collections
/// from this <see cref="Array{T}"/>.
/// </summary>
/// <param name="item">The value to remove.</param>
- /// <returns>A bool indicating success or failure.</returns>
+ /// <returns>A <see langword="bool"/> indicating success or failure.</returns>
public bool Remove(T item)
{
return Array.godot_icall_Array_Remove(GetPtr(), item);
@@ -597,7 +597,7 @@ namespace Godot.Collections
/// <returns>An enumerator.</returns>
public IEnumerator<T> GetEnumerator()
{
- int count = objectArray.Count;
+ int count = _objectArray.Count;
for (int i = 0; i < count; i++)
{
@@ -614,6 +614,6 @@ namespace Godot.Collections
/// Converts this <see cref="Array{T}"/> to a string.
/// </summary>
/// <returns>A string representation of this array.</returns>
- public override string ToString() => objectArray.ToString();
+ public override string ToString() => _objectArray.ToString();
}
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/DisableGodotGeneratorsAttribute.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/DisableGodotGeneratorsAttribute.cs
index ac6cffceb2..e93bc89811 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/DisableGodotGeneratorsAttribute.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/DisableGodotGeneratorsAttribute.cs
@@ -3,7 +3,5 @@ using System;
namespace Godot
{
[AttributeUsage(AttributeTargets.Class)]
- public class DisableGodotGeneratorsAttribute : Attribute
- {
- }
+ public class DisableGodotGeneratorsAttribute : Attribute { }
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttributes.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttributes.cs
index 6cec8773b2..1da91ea867 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttributes.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RPCAttributes.cs
@@ -3,11 +3,8 @@ using System;
namespace Godot
{
[AttributeUsage(AttributeTargets.Method)]
- public class RemoteAttribute : Attribute {}
+ public class AnyAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Method)]
- public class MasterAttribute : Attribute {}
-
- [AttributeUsage(AttributeTargets.Method)]
- public class PuppetAttribute : Attribute {}
+ public class AuthorityAttribute : Attribute { }
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/SignalAttribute.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/SignalAttribute.cs
index 39d5782db8..07a214f543 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/SignalAttribute.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/SignalAttribute.cs
@@ -3,7 +3,5 @@ using System;
namespace Godot
{
[AttributeUsage(AttributeTargets.Delegate | AttributeTargets.Event)]
- public class SignalAttribute : Attribute
- {
- }
+ public class SignalAttribute : Attribute { }
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/ToolAttribute.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/ToolAttribute.cs
index d0437409af..d2344389f4 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/ToolAttribute.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/ToolAttribute.cs
@@ -3,5 +3,5 @@ using System;
namespace Godot
{
[AttributeUsage(AttributeTargets.Class)]
- public class ToolAttribute : Attribute {}
+ public class ToolAttribute : Attribute { }
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs
index 968f853c2d..0fb1df6c2f 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Basis.cs
@@ -31,7 +31,7 @@ namespace Godot
/// <summary>
/// The basis matrix's X vector (column 0).
/// </summary>
- /// <value>Equivalent to <see cref="Column0"/> and array index `[0]`.</value>
+ /// <value>Equivalent to <see cref="Column0"/> and array index <c>[0]</c>.</value>
public Vector3 x
{
get => Column0;
@@ -41,7 +41,7 @@ namespace Godot
/// <summary>
/// The basis matrix's Y vector (column 1).
/// </summary>
- /// <value>Equivalent to <see cref="Column1"/> and array index `[1]`.</value>
+ /// <value>Equivalent to <see cref="Column1"/> and array index <c>[1]</c>.</value>
public Vector3 y
{
get => Column1;
@@ -51,7 +51,7 @@ namespace Godot
/// <summary>
/// The basis matrix's Z vector (column 2).
/// </summary>
- /// <value>Equivalent to <see cref="Column2"/> and array index `[2]`.</value>
+ /// <value>Equivalent to <see cref="Column2"/> and array index <c>[2]</c>.</value>
public Vector3 z
{
get => Column2;
@@ -82,45 +82,45 @@ namespace Godot
/// <summary>
/// Column 0 of the basis matrix (the X vector).
/// </summary>
- /// <value>Equivalent to <see cref="x"/> and array index `[0]`.</value>
+ /// <value>Equivalent to <see cref="x"/> and array index <c>[0]</c>.</value>
public Vector3 Column0
{
get => new Vector3(Row0.x, Row1.x, Row2.x);
set
{
- this.Row0.x = value.x;
- this.Row1.x = value.y;
- this.Row2.x = value.z;
+ Row0.x = value.x;
+ Row1.x = value.y;
+ Row2.x = value.z;
}
}
/// <summary>
/// Column 1 of the basis matrix (the Y vector).
/// </summary>
- /// <value>Equivalent to <see cref="y"/> and array index `[1]`.</value>
+ /// <value>Equivalent to <see cref="y"/> and array index <c>[1]</c>.</value>
public Vector3 Column1
{
get => new Vector3(Row0.y, Row1.y, Row2.y);
set
{
- this.Row0.y = value.x;
- this.Row1.y = value.y;
- this.Row2.y = value.z;
+ Row0.y = value.x;
+ Row1.y = value.y;
+ Row2.y = value.z;
}
}
/// <summary>
/// Column 2 of the basis matrix (the Z vector).
/// </summary>
- /// <value>Equivalent to <see cref="z"/> and array index `[2]`.</value>
+ /// <value>Equivalent to <see cref="z"/> and array index <c>[2]</c>.</value>
public Vector3 Column2
{
get => new Vector3(Row0.z, Row1.z, Row2.z);
set
{
- this.Row0.z = value.x;
- this.Row1.z = value.y;
- this.Row2.z = value.z;
+ Row0.z = value.x;
+ Row1.z = value.y;
+ Row2.z = value.z;
}
}
@@ -150,9 +150,10 @@ namespace Godot
}
/// <summary>
- /// Access whole columns in the form of Vector3.
+ /// Access whole columns in the form of <see cref="Vector3"/>.
/// </summary>
/// <param name="column">Which column vector.</param>
+ /// <value>The basis column.</value>
public Vector3 this[int column]
{
get
@@ -193,6 +194,7 @@ namespace Godot
/// </summary>
/// <param name="column">Which column, the matrix horizontal position.</param>
/// <param name="row">Which row, the matrix vertical position.</param>
+ /// <value>The matrix element.</value>
public real_t this[int column, int row]
{
get
@@ -207,6 +209,13 @@ namespace Godot
}
}
+ /// <summary>
+ /// Returns the <see cref="Basis"/>'s rotation in the form of a
+ /// <see cref="Quaternion"/>. See <see cref="GetEuler"/> if you
+ /// need Euler angles, but keep in mind quaternions should generally
+ /// be preferred to Euler angles.
+ /// </summary>
+ /// <returns>The basis rotation.</returns>
public Quaternion GetRotationQuaternion()
{
Basis orthonormalizedBasis = Orthonormalized();
@@ -263,10 +272,10 @@ namespace Godot
/// The returned vector contains the rotation angles in
/// the format (X angle, Y angle, Z angle).
///
- /// Consider using the <see cref="Basis.Quaternion()"/> method instead, which
+ /// Consider using the <see cref="Quaternion()"/> method instead, which
/// returns a <see cref="Godot.Quaternion"/> quaternion instead of Euler angles.
/// </summary>
- /// <returns>A Vector3 representing the basis rotation in Euler angles.</returns>
+ /// <returns>A <see cref="Vector3"/> representing the basis rotation in Euler angles.</returns>
public Vector3 GetEuler()
{
Basis m = Orthonormalized();
@@ -304,7 +313,10 @@ namespace Godot
/// but are more efficient for some internal calculations.
/// </summary>
/// <param name="index">Which row.</param>
- /// <returns>One of `Row0`, `Row1`, or `Row2`.</returns>
+ /// <exception cref="IndexOutOfRangeException">
+ /// Thrown when the <paramref name="index"/> is not 0, 1 or 2.
+ /// </exception>
+ /// <returns>One of <c>Row0</c>, <c>Row1</c>, or <c>Row2</c>.</returns>
public Vector3 GetRow(int index)
{
switch (index)
@@ -326,6 +338,9 @@ namespace Godot
/// </summary>
/// <param name="index">Which row.</param>
/// <param name="value">The vector to set the row to.</param>
+ /// <exception cref="IndexOutOfRangeException">
+ /// Thrown when the <paramref name="index"/> is not 0, 1 or 2.
+ /// </exception>
public void SetRow(int index, Vector3 value)
{
switch (index)
@@ -452,8 +467,8 @@ namespace Godot
}
/// <summary>
- /// Introduce an additional rotation around the given `axis`
- /// by `phi` (in radians). The axis must be a normalized vector.
+ /// Introduce an additional rotation around the given <paramref name="axis"/>
+ /// by <paramref name="phi"/> (in radians). The axis must be a normalized vector.
/// </summary>
/// <param name="axis">The axis to rotate around. Must be normalized.</param>
/// <param name="phi">The angle to rotate, in radians.</param>
@@ -504,7 +519,7 @@ namespace Godot
/// <returns>The resulting dot product.</returns>
public real_t Tdotx(Vector3 with)
{
- return this.Row0[0] * with[0] + this.Row1[0] * with[1] + this.Row2[0] * with[2];
+ return Row0[0] * with[0] + Row1[0] * with[1] + Row2[0] * with[2];
}
/// <summary>
@@ -514,7 +529,7 @@ namespace Godot
/// <returns>The resulting dot product.</returns>
public real_t Tdoty(Vector3 with)
{
- return this.Row0[1] * with[0] + this.Row1[1] * with[1] + this.Row2[1] * with[2];
+ return Row0[1] * with[0] + Row1[1] * with[1] + Row2[1] * with[2];
}
/// <summary>
@@ -524,7 +539,7 @@ namespace Godot
/// <returns>The resulting dot product.</returns>
public real_t Tdotz(Vector3 with)
{
- return this.Row0[2] * with[0] + this.Row1[2] * with[1] + this.Row2[2] * with[2];
+ return Row0[2] * with[0] + Row1[2] * with[1] + Row2[2] * with[2];
}
/// <summary>
@@ -533,7 +548,7 @@ namespace Godot
/// <returns>The transposed basis matrix.</returns>
public Basis Transposed()
{
- var tr = this;
+ Basis tr = this;
real_t temp = tr.Row0[1];
tr.Row0[1] = tr.Row1[0];
@@ -553,15 +568,16 @@ namespace Godot
/// <summary>
/// Returns a vector transformed (multiplied) by the basis matrix.
/// </summary>
+ /// <seealso cref="XformInv(Vector3)"/>
/// <param name="v">A vector to transform.</param>
/// <returns>The transformed vector.</returns>
public Vector3 Xform(Vector3 v)
{
return new Vector3
(
- this.Row0.Dot(v),
- this.Row1.Dot(v),
- this.Row2.Dot(v)
+ Row0.Dot(v),
+ Row1.Dot(v),
+ Row2.Dot(v)
);
}
@@ -571,15 +587,16 @@ namespace Godot
/// Note: This results in a multiplication by the inverse of the
/// basis matrix only if it represents a rotation-reflection.
/// </summary>
+ /// <seealso cref="Xform(Vector3)"/>
/// <param name="v">A vector to inversely transform.</param>
/// <returns>The inversely transformed vector.</returns>
public Vector3 XformInv(Vector3 v)
{
return new Vector3
(
- this.Row0[0] * v.x + this.Row1[0] * v.y + this.Row2[0] * v.z,
- this.Row0[1] * v.x + this.Row1[1] * v.y + this.Row2[1] * v.z,
- this.Row0[2] * v.x + this.Row1[2] * v.y + this.Row2[2] * v.z
+ Row0[0] * v.x + Row1[0] * v.y + Row2[0] * v.z,
+ Row0[1] * v.x + Row1[1] * v.y + Row2[1] * v.z,
+ Row0[2] * v.x + Row1[2] * v.y + Row2[2] * v.z
);
}
@@ -675,25 +692,25 @@ namespace Godot
/// <summary>
/// The identity basis, with no rotation or scaling applied.
- /// This is used as a replacement for `Basis()` in GDScript.
- /// Do not use `new Basis()` with no arguments in C#, because it sets all values to zero.
+ /// This is used as a replacement for <c>Basis()</c> in GDScript.
+ /// Do not use <c>new Basis()</c> with no arguments in C#, because it sets all values to zero.
/// </summary>
- /// <value>Equivalent to `new Basis(Vector3.Right, Vector3.Up, Vector3.Back)`.</value>
+ /// <value>Equivalent to <c>new Basis(Vector3.Right, Vector3.Up, Vector3.Back)</c>.</value>
public static Basis Identity { get { return _identity; } }
/// <summary>
/// The basis that will flip something along the X axis when used in a transformation.
/// </summary>
- /// <value>Equivalent to `new Basis(Vector3.Left, Vector3.Up, Vector3.Back)`.</value>
+ /// <value>Equivalent to <c>new Basis(Vector3.Left, Vector3.Up, Vector3.Back)</c>.</value>
public static Basis FlipX { get { return _flipX; } }
/// <summary>
/// The basis that will flip something along the Y axis when used in a transformation.
/// </summary>
- /// <value>Equivalent to `new Basis(Vector3.Right, Vector3.Down, Vector3.Back)`.</value>
+ /// <value>Equivalent to <c>new Basis(Vector3.Right, Vector3.Down, Vector3.Back)</c>.</value>
public static Basis FlipY { get { return _flipY; } }
/// <summary>
/// The basis that will flip something along the Z axis when used in a transformation.
/// </summary>
- /// <value>Equivalent to `new Basis(Vector3.Right, Vector3.Up, Vector3.Forward)`.</value>
+ /// <value>Equivalent to <c>new Basis(Vector3.Right, Vector3.Up, Vector3.Forward)</c>.</value>
public static Basis FlipZ { get { return _flipZ; } }
/// <summary>
@@ -752,8 +769,8 @@ namespace Godot
}
/// <summary>
- /// Constructs a pure rotation basis matrix, rotated around the given `axis`
- /// by `phi` (in radians). The axis must be a normalized vector.
+ /// Constructs a pure rotation basis matrix, rotated around the given <paramref name="axis"/>
+ /// by <paramref name="phi"/> (in radians). The axis must be a normalized vector.
/// </summary>
/// <param name="axis">The axis to rotate around. Must be normalized.</param>
/// <param name="phi">The angle to rotate, in radians.</param>
@@ -830,6 +847,11 @@ namespace Godot
return !left.Equals(right);
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this basis and <paramref name="obj"/> are equal.
+ /// </summary>
+ /// <param name="obj">The other object to compare.</param>
+ /// <returns>Whether or not the basis and the other object are equal.</returns>
public override bool Equals(object obj)
{
if (obj is Basis)
@@ -840,32 +862,49 @@ namespace Godot
return false;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this basis and <paramref name="other"/> are equal
+ /// </summary>
+ /// <param name="other">The other basis to compare.</param>
+ /// <returns>Whether or not the bases are equal.</returns>
public bool Equals(Basis other)
{
return Row0.Equals(other.Row0) && Row1.Equals(other.Row1) && Row2.Equals(other.Row2);
}
/// <summary>
- /// Returns true if this basis and `other` are approximately equal, by running
- /// <see cref="Vector3.IsEqualApprox(Vector3)"/> on each component.
+ /// Returns <see langword="true"/> if this basis and <paramref name="other"/> are approximately equal,
+ /// by running <see cref="Vector3.IsEqualApprox(Vector3)"/> on each component.
/// </summary>
/// <param name="other">The other basis to compare.</param>
- /// <returns>Whether or not the matrices are approximately equal.</returns>
+ /// <returns>Whether or not the bases are approximately equal.</returns>
public bool IsEqualApprox(Basis other)
{
return Row0.IsEqualApprox(other.Row0) && Row1.IsEqualApprox(other.Row1) && Row2.IsEqualApprox(other.Row2);
}
+ /// <summary>
+ /// Serves as the hash function for <see cref="Basis"/>.
+ /// </summary>
+ /// <returns>A hash code for this basis.</returns>
public override int GetHashCode()
{
return Row0.GetHashCode() ^ Row1.GetHashCode() ^ Row2.GetHashCode();
}
+ /// <summary>
+ /// Converts this <see cref="Basis"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this basis.</returns>
public override string ToString()
{
return $"[X: {x}, Y: {y}, Z: {z}]";
}
+ /// <summary>
+ /// Converts this <see cref="Basis"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this basis.</returns>
public string ToString(string format)
{
return $"[X: {x.ToString(format)}, Y: {y.ToString(format)}, Z: {z.ToString(format)}]";
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Callable.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Callable.cs
index c85cc1884c..a28a46896b 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Callable.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Callable.cs
@@ -2,18 +2,58 @@ using System;
namespace Godot
{
+ /// <summary>
+ /// Callable is a first class object which can be held in variables and passed to functions.
+ /// It represents a given method in an Object, and is typically used for signal callbacks.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// public void PrintArgs(object ar1, object arg2, object arg3 = null)
+ /// {
+ /// GD.PrintS(arg1, arg2, arg3);
+ /// }
+ ///
+ /// public void Test()
+ /// {
+ /// // This Callable object will call the PrintArgs method defined above.
+ /// Callable callable = new Callable(this, nameof(PrintArgs));
+ /// callable.Call("hello", "world"); // Prints "hello world null".
+ /// callable.Call(Vector2.Up, 42, callable); // Prints "(0, -1) 42 Node(Node.cs)::PrintArgs".
+ /// callable.Call("invalid"); // Invalid call, should have at least 2 arguments.
+ /// }
+ /// </code>
+ /// </example>
public struct Callable
{
private readonly Object _target;
private readonly StringName _method;
private readonly Delegate _delegate;
+ /// <summary>
+ /// Object that contains the method.
+ /// </summary>
public Object Target => _target;
+ /// <summary>
+ /// Name of the method that will be called.
+ /// </summary>
public StringName Method => _method;
+ /// <summary>
+ /// Delegate of the method that will be called.
+ /// </summary>
public Delegate Delegate => _delegate;
+ /// <summary>
+ /// Converts a <see cref="Delegate"/> to a <see cref="Callable"/>.
+ /// </summary>
+ /// <param name="delegate">The delegate to convert.</param>
public static implicit operator Callable(Delegate @delegate) => new Callable(@delegate);
+ /// <summary>
+ /// Constructs a new <see cref="Callable"/> for the method called <paramref name="method"/>
+ /// in the specified <paramref name="target"/>.
+ /// </summary>
+ /// <param name="target">Object that contains the method.</param>
+ /// <param name="method">Name of the method that will be called.</param>
public Callable(Object target, StringName method)
{
_target = target;
@@ -21,6 +61,10 @@ namespace Godot
_delegate = null;
}
+ /// <summary>
+ /// Constructs a new <see cref="Callable"/> for the given <paramref name="delegate"/>.
+ /// </summary>
+ /// <param name="delegate">Delegate method that will be called.</param>
public Callable(Delegate @delegate)
{
_target = null;
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
index b9a98ba9c7..2a869bc335 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
@@ -7,11 +7,11 @@ namespace Godot
/// A color represented by red, green, blue, and alpha (RGBA) components.
/// The alpha component is often used for transparency.
/// Values are in floating-point and usually range from 0 to 1.
- /// Some properties (such as CanvasItem.modulate) may accept values
+ /// Some properties (such as <see cref="CanvasItem.Modulate"/>) may accept values
/// greater than 1 (overbright or HDR colors).
///
/// If you want to supply values in a range of 0 to 255, you should use
- /// <see cref="Color8"/> and the `r8`/`g8`/`b8`/`a8` properties.
+ /// <see cref="Color8"/> and the <c>r8</c>/<c>g8</c>/<c>b8</c>/<c>a8</c> properties.
/// </summary>
[Serializable]
[StructLayout(LayoutKind.Sequential)]
@@ -127,11 +127,11 @@ namespace Godot
}
else if (g == max)
{
- h = 2 + (b - r) / delta; // Between cyan & yellow
+ h = 2 + ((b - r) / delta); // Between cyan & yellow
}
else
{
- h = 4 + (r - g) / delta; // Between magenta & cyan
+ h = 4 + ((r - g) / delta); // Between magenta & cyan
}
h /= 6.0f;
@@ -173,7 +173,7 @@ namespace Godot
/// <summary>
/// The HSV value (brightness) of this color, on the range 0 to 1.
/// </summary>
- /// <value>Getting is equivalent to using `Max()` on the RGB components. Setting uses <see cref="FromHSV"/>.</value>
+ /// <value>Getting is equivalent to using <see cref="Math.Max(float, float)"/> on the RGB components. Setting uses <see cref="FromHSV"/>.</value>
public float v
{
get
@@ -189,7 +189,12 @@ namespace Godot
/// <summary>
/// Access color components using their index.
/// </summary>
- /// <value>`[0]` is equivalent to `.r`, `[1]` is equivalent to `.g`, `[2]` is equivalent to `.b`, `[3]` is equivalent to `.a`.</value>
+ /// <value>
+ /// <c>[0]</c> is equivalent to <see cref="r"/>,
+ /// <c>[1]</c> is equivalent to <see cref="g"/>,
+ /// <c>[2]</c> is equivalent to <see cref="b"/>,
+ /// <c>[3]</c> is equivalent to <see cref="a"/>.
+ /// </value>
public float this[int index]
{
get
@@ -236,30 +241,30 @@ namespace Godot
/// The second color may have a range of alpha values.
/// </summary>
/// <param name="over">The color to blend over.</param>
- /// <returns>This color blended over `over`.</returns>
+ /// <returns>This color blended over <paramref name="over"/>.</returns>
public Color Blend(Color over)
{
Color res;
float sa = 1.0f - over.a;
- res.a = a * sa + over.a;
+ res.a = (a * sa) + over.a;
if (res.a == 0)
{
return new Color(0, 0, 0, 0);
}
- res.r = (r * a * sa + over.r * over.a) / res.a;
- res.g = (g * a * sa + over.g * over.a) / res.a;
- res.b = (b * a * sa + over.b * over.a) / res.a;
+ res.r = ((r * a * sa) + (over.r * over.a)) / res.a;
+ res.g = ((g * a * sa) + (over.g * over.a)) / res.a;
+ res.b = ((b * a * sa) + (over.b * over.a)) / res.a;
return res;
}
/// <summary>
/// Returns a new color with all components clamped between the
- /// components of `min` and `max` using
- /// <see cref="Mathf.Clamp(float, float, float)"/>.
+ /// components of <paramref name="min"/> and <paramref name="max"/>
+ /// using <see cref="Mathf.Clamp(float, float, float)"/>.
/// </summary>
/// <param name="min">The color with minimum allowed values.</param>
/// <param name="max">The color with maximum allowed values.</param>
@@ -286,14 +291,14 @@ namespace Godot
public Color Darkened(float amount)
{
Color res = this;
- res.r = res.r * (1.0f - amount);
- res.g = res.g * (1.0f - amount);
- res.b = res.b * (1.0f - amount);
+ res.r *= 1.0f - amount;
+ res.g *= 1.0f - amount;
+ res.b *= 1.0f - amount;
return res;
}
/// <summary>
- /// Returns the inverted color: `(1 - r, 1 - g, 1 - b, a)`.
+ /// Returns the inverted color: <c>(1 - r, 1 - g, 1 - b, a)</c>.
/// </summary>
/// <returns>The inverted color.</returns>
public Color Inverted()
@@ -315,15 +320,15 @@ namespace Godot
public Color Lightened(float amount)
{
Color res = this;
- res.r = res.r + (1.0f - res.r) * amount;
- res.g = res.g + (1.0f - res.g) * amount;
- res.b = res.b + (1.0f - res.b) * amount;
+ res.r += (1.0f - res.r) * amount;
+ res.g += (1.0f - res.g) * amount;
+ res.b += (1.0f - res.b) * amount;
return res;
}
/// <summary>
/// Returns the result of the linear interpolation between
- /// this color and `to` by amount `weight`.
+ /// this color and <paramref name="to"/> by amount <paramref name="weight"/>.
/// </summary>
/// <param name="to">The destination color for interpolation.</param>
/// <param name="weight">A value on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
@@ -341,7 +346,7 @@ namespace Godot
/// <summary>
/// Returns the result of the linear interpolation between
- /// this color and `to` by color amount `weight`.
+ /// this color and <paramref name="to"/> by color amount <paramref name="weight"/>.
/// </summary>
/// <param name="to">The destination color for interpolation.</param>
/// <param name="weight">A color with components on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
@@ -362,7 +367,7 @@ namespace Godot
/// format (each byte represents a color channel).
/// ABGR is the reversed version of the default format.
/// </summary>
- /// <returns>A uint representing this color in ABGR32 format.</returns>
+ /// <returns>A <see langword="uint"/> representing this color in ABGR32 format.</returns>
public uint ToAbgr32()
{
uint c = (byte)Math.Round(a * 255);
@@ -381,7 +386,7 @@ namespace Godot
/// format (each word represents a color channel).
/// ABGR is the reversed version of the default format.
/// </summary>
- /// <returns>A ulong representing this color in ABGR64 format.</returns>
+ /// <returns>A <see langword="ulong"/> representing this color in ABGR64 format.</returns>
public ulong ToAbgr64()
{
ulong c = (ushort)Math.Round(a * 65535);
@@ -400,7 +405,7 @@ namespace Godot
/// format (each byte represents a color channel).
/// ARGB is more compatible with DirectX, but not used much in Godot.
/// </summary>
- /// <returns>A uint representing this color in ARGB32 format.</returns>
+ /// <returns>A <see langword="uint"/> representing this color in ARGB32 format.</returns>
public uint ToArgb32()
{
uint c = (byte)Math.Round(a * 255);
@@ -419,7 +424,7 @@ namespace Godot
/// format (each word represents a color channel).
/// ARGB is more compatible with DirectX, but not used much in Godot.
/// </summary>
- /// <returns>A ulong representing this color in ARGB64 format.</returns>
+ /// <returns>A <see langword="ulong"/> representing this color in ARGB64 format.</returns>
public ulong ToArgb64()
{
ulong c = (ushort)Math.Round(a * 65535);
@@ -438,7 +443,7 @@ namespace Godot
/// format (each byte represents a color channel).
/// RGBA is Godot's default and recommended format.
/// </summary>
- /// <returns>A uint representing this color in RGBA32 format.</returns>
+ /// <returns>A <see langword="uint"/> representing this color in RGBA32 format.</returns>
public uint ToRgba32()
{
uint c = (byte)Math.Round(r * 255);
@@ -457,7 +462,7 @@ namespace Godot
/// format (each word represents a color channel).
/// RGBA is Godot's default and recommended format.
/// </summary>
- /// <returns>A ulong representing this color in RGBA64 format.</returns>
+ /// <returns>A <see langword="ulong"/> representing this color in RGBA64 format.</returns>
public ulong ToRgba64()
{
ulong c = (ushort)Math.Round(r * 65535);
@@ -474,11 +479,13 @@ namespace Godot
/// <summary>
/// Returns the color's HTML hexadecimal color string in RGBA format.
/// </summary>
- /// <param name="includeAlpha">Whether or not to include alpha. If false, the color is RGB instead of RGBA.</param>
+ /// <param name="includeAlpha">
+ /// Whether or not to include alpha. If <see langword="false"/>, the color is RGB instead of RGBA.
+ /// </param>
/// <returns>A string for the HTML hexadecimal representation of this color.</returns>
public string ToHTML(bool includeAlpha = true)
{
- var txt = string.Empty;
+ string txt = string.Empty;
txt += ToHex32(r);
txt += ToHex32(g);
@@ -493,7 +500,7 @@ namespace Godot
}
/// <summary>
- /// Constructs a color from RGBA values, typically on the range of 0 to 1.
+ /// Constructs a <see cref="Color"/> from RGBA values, typically on the range of 0 to 1.
/// </summary>
/// <param name="r">The color's red component, typically on the range of 0 to 1.</param>
/// <param name="g">The color's green component, typically on the range of 0 to 1.</param>
@@ -508,7 +515,7 @@ namespace Godot
}
/// <summary>
- /// Constructs a color from an existing color and an alpha value.
+ /// Constructs a <see cref="Color"/> from an existing color and an alpha value.
/// </summary>
/// <param name="c">The color to construct from. Only its RGB values are used.</param>
/// <param name="a">The color's alpha (transparency) value, typically on the range of 0 to 1. Default: 1.</param>
@@ -521,10 +528,10 @@ namespace Godot
}
/// <summary>
- /// Constructs a color from an unsigned 32-bit integer in RGBA format
+ /// Constructs a <see cref="Color"/> from an unsigned 32-bit integer in RGBA format
/// (each byte represents a color channel).
/// </summary>
- /// <param name="rgba">The uint representing the color.</param>
+ /// <param name="rgba">The <see langword="uint"/> representing the color.</param>
public Color(uint rgba)
{
a = (rgba & 0xFF) / 255.0f;
@@ -537,10 +544,10 @@ namespace Godot
}
/// <summary>
- /// Constructs a color from an unsigned 64-bit integer in RGBA format
+ /// Constructs a <see cref="Color"/> from an unsigned 64-bit integer in RGBA format
/// (each word represents a color channel).
/// </summary>
- /// <param name="rgba">The ulong representing the color.</param>
+ /// <param name="rgba">The <see langword="ulong"/> representing the color.</param>
public Color(ulong rgba)
{
a = (rgba & 0xFFFF) / 65535.0f;
@@ -553,9 +560,9 @@ namespace Godot
}
/// <summary>
- /// Constructs a color either from an HTML color code or from a
- /// standardized color name. Supported
- /// color names are the same as the <see cref="Colors"/> constants.
+ /// Constructs a <see cref="Color"/> either from an HTML color code or from a
+ /// standardized color name. Supported color names are the same as the
+ /// <see cref="Colors"/> constants.
/// </summary>
/// <param name="code">The HTML color code or color name to construct from.</param>
public Color(string code)
@@ -571,8 +578,8 @@ namespace Godot
}
/// <summary>
- /// Constructs a color either from an HTML color code or from a
- /// standardized color name, with `alpha` on the range of 0 to 1. Supported
+ /// Constructs a <see cref="Color"/> either from an HTML color code or from a
+ /// standardized color name, with <paramref name="alpha"/> on the range of 0 to 1. Supported
/// color names are the same as the <see cref="Colors"/> constants.
/// </summary>
/// <param name="code">The HTML color code or color name to construct from.</param>
@@ -584,9 +591,12 @@ namespace Godot
}
/// <summary>
- /// Constructs a color from the HTML hexadecimal color string in RGBA format.
+ /// Constructs a <see cref="Color"/> from the HTML hexadecimal color string in RGBA format.
/// </summary>
/// <param name="rgba">A string for the HTML hexadecimal representation of this color.</param>
+ /// <exception name="ArgumentOutOfRangeException">
+ /// Thrown when the given <paramref name="rgba"/> color code is invalid.
+ /// </exception>
private static Color FromHTML(string rgba)
{
Color c;
@@ -627,7 +637,8 @@ namespace Godot
}
else
{
- throw new ArgumentOutOfRangeException("Invalid color code. Length is " + rgba.Length + " but a length of 6 or 8 is expected: " + rgba);
+ throw new ArgumentOutOfRangeException(
+ $"Invalid color code. Length is {rgba.Length}, but a length of 6 or 8 is expected: {rgba}");
}
c.a = 1.0f;
@@ -697,11 +708,11 @@ namespace Godot
/// <returns>The constructed color.</returns>
private static Color Named(string name)
{
- name = name.Replace(" ", String.Empty);
- name = name.Replace("-", String.Empty);
- name = name.Replace("_", String.Empty);
- name = name.Replace("'", String.Empty);
- name = name.Replace(".", String.Empty);
+ name = name.Replace(" ", string.Empty);
+ name = name.Replace("-", string.Empty);
+ name = name.Replace("_", string.Empty);
+ name = name.Replace("'", string.Empty);
+ name = name.Replace(".", string.Empty);
name = name.ToUpper();
if (!Colors.namedColors.ContainsKey(name))
@@ -715,7 +726,7 @@ namespace Godot
/// <summary>
/// Constructs a color from an HSV profile, with values on the
/// range of 0 to 1. This is equivalent to using each of
- /// the `h`/`s`/`v` properties, but much more efficient.
+ /// the <c>h</c>/<c>s</c>/<c>v</c> properties, but much more efficient.
/// </summary>
/// <param name="hue">The HSV hue, typically on the range of 0 to 1.</param>
/// <param name="saturation">The HSV saturation, typically on the range of 0 to 1.</param>
@@ -739,8 +750,8 @@ namespace Godot
f = hue - i;
p = value * (1 - saturation);
- q = value * (1 - saturation * f);
- t = value * (1 - saturation * (1 - f));
+ q = value * (1 - (saturation * f));
+ t = value * (1 - (saturation * (1 - f)));
switch (i)
{
@@ -761,7 +772,7 @@ namespace Godot
/// <summary>
/// Converts a color to HSV values. This is equivalent to using each of
- /// the `h`/`s`/`v` properties, but much more efficient.
+ /// the <c>h</c>/<c>s</c>/<c>v</c> properties, but much more efficient.
/// </summary>
/// <param name="hue">Output parameter for the HSV hue.</param>
/// <param name="saturation">Output parameter for the HSV saturation.</param>
@@ -785,22 +796,24 @@ namespace Godot
}
else if (g == max)
{
- hue = 2 + (b - r) / delta; // Between cyan & yellow
+ hue = 2 + ((b - r) / delta); // Between cyan & yellow
}
else
{
- hue = 4 + (r - g) / delta; // Between magenta & cyan
+ hue = 4 + ((r - g) / delta); // Between magenta & cyan
}
hue /= 6.0f;
if (hue < 0)
- {
hue += 1.0f;
- }
}
- saturation = max == 0 ? 0 : 1f - 1f * min / max;
+ if (max == 0)
+ saturation = 0;
+ else
+ saturation = 1 - (min / max);
+
value = max;
}
@@ -977,6 +990,11 @@ namespace Godot
return left.r > right.r;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this color and <paramref name="obj"/> are equal.
+ /// </summary>
+ /// <param name="obj">The other object to compare.</param>
+ /// <returns>Whether or not the color and the other object are equal.</returns>
public override bool Equals(object obj)
{
if (obj is Color)
@@ -987,14 +1005,19 @@ namespace Godot
return false;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this color and <paramref name="other"/> are equal
+ /// </summary>
+ /// <param name="other">The other color to compare.</param>
+ /// <returns>Whether or not the colors are equal.</returns>
public bool Equals(Color other)
{
return r == other.r && g == other.g && b == other.b && a == other.a;
}
/// <summary>
- /// Returns true if this color and `other` are approximately equal, by running
- /// <see cref="Godot.Mathf.IsEqualApprox(float, float)"/> on each component.
+ /// Returns <see langword="true"/> if this color and <paramref name="other"/> are approximately equal,
+ /// by running <see cref="Mathf.IsEqualApprox(float, float)"/> on each component.
/// </summary>
/// <param name="other">The other color to compare.</param>
/// <returns>Whether or not the colors are approximately equal.</returns>
@@ -1003,16 +1026,28 @@ namespace Godot
return Mathf.IsEqualApprox(r, other.r) && Mathf.IsEqualApprox(g, other.g) && Mathf.IsEqualApprox(b, other.b) && Mathf.IsEqualApprox(a, other.a);
}
+ /// <summary>
+ /// Serves as the hash function for <see cref="Color"/>.
+ /// </summary>
+ /// <returns>A hash code for this color.</returns>
public override int GetHashCode()
{
return r.GetHashCode() ^ g.GetHashCode() ^ b.GetHashCode() ^ a.GetHashCode();
}
+ /// <summary>
+ /// Converts this <see cref="Color"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this color.</returns>
public override string ToString()
{
return $"({r}, {g}, {b}, {a})";
}
+ /// <summary>
+ /// Converts this <see cref="Color"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this color.</returns>
public string ToString(string format)
{
return $"({r.ToString(format)}, {g.ToString(format)}, {b.ToString(format)}, {a.ToString(format)})";
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs
index 61a34bfc87..2dfe304aaa 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Dictionary.cs
@@ -7,7 +7,7 @@ using System.Diagnostics.CodeAnalysis;
namespace Godot.Collections
{
- class DictionarySafeHandle : SafeHandle
+ internal class DictionarySafeHandle : SafeHandle
{
public DictionarySafeHandle(IntPtr handle) : base(IntPtr.Zero, true)
{
@@ -31,19 +31,17 @@ namespace Godot.Collections
/// typed elements allocated in the engine in C++. Useful when
/// interfacing with the engine.
/// </summary>
- public class Dictionary :
- IDictionary,
- IDisposable
+ public class Dictionary : IDictionary, IDisposable
{
- DictionarySafeHandle safeHandle;
- bool disposed = false;
+ private DictionarySafeHandle _safeHandle;
+ private bool _disposed = false;
/// <summary>
/// Constructs a new empty <see cref="Dictionary"/>.
/// </summary>
public Dictionary()
{
- safeHandle = new DictionarySafeHandle(godot_icall_Dictionary_Ctor());
+ _safeHandle = new DictionarySafeHandle(godot_icall_Dictionary_Ctor());
}
/// <summary>
@@ -62,20 +60,20 @@ namespace Godot.Collections
internal Dictionary(DictionarySafeHandle handle)
{
- safeHandle = handle;
+ _safeHandle = handle;
}
internal Dictionary(IntPtr handle)
{
- safeHandle = new DictionarySafeHandle(handle);
+ _safeHandle = new DictionarySafeHandle(handle);
}
internal IntPtr GetPtr()
{
- if (disposed)
+ if (_disposed)
throw new ObjectDisposedException(GetType().FullName);
- return safeHandle.DangerousGetHandle();
+ return _safeHandle.DangerousGetHandle();
}
/// <summary>
@@ -83,16 +81,16 @@ namespace Godot.Collections
/// </summary>
public void Dispose()
{
- if (disposed)
+ if (_disposed)
return;
- if (safeHandle != null)
+ if (_safeHandle != null)
{
- safeHandle.Dispose();
- safeHandle = null;
+ _safeHandle.Dispose();
+ _safeHandle = null;
}
- disposed = true;
+ _disposed = true;
}
/// <summary>
@@ -230,17 +228,17 @@ namespace Godot.Collections
private class DictionaryEnumerator : IDictionaryEnumerator
{
- private readonly Dictionary dictionary;
- private readonly int count;
- private int index = -1;
- private bool dirty = true;
+ private readonly Dictionary _dictionary;
+ private readonly int _count;
+ private int _index = -1;
+ private bool _dirty = true;
- private DictionaryEntry entry;
+ private DictionaryEntry _entry;
public DictionaryEnumerator(Dictionary dictionary)
{
- this.dictionary = dictionary;
- count = dictionary.Count;
+ _dictionary = dictionary;
+ _count = dictionary.Count;
}
public object Current => Entry;
@@ -249,19 +247,19 @@ namespace Godot.Collections
{
get
{
- if (dirty)
+ if (_dirty)
{
UpdateEntry();
}
- return entry;
+ return _entry;
}
}
private void UpdateEntry()
{
- dirty = false;
- godot_icall_Dictionary_KeyValuePairAt(dictionary.GetPtr(), index, out object key, out object value);
- entry = new DictionaryEntry(key, value);
+ _dirty = false;
+ godot_icall_Dictionary_KeyValuePairAt(_dictionary.GetPtr(), _index, out object key, out object value);
+ _entry = new DictionaryEntry(key, value);
}
public object Key => Entry.Key;
@@ -270,15 +268,15 @@ namespace Godot.Collections
public bool MoveNext()
{
- index++;
- dirty = true;
- return index < count;
+ _index++;
+ _dirty = true;
+ return _index < _count;
}
public void Reset()
{
- index = -1;
- dirty = true;
+ _index = -1;
+ _dirty = true;
}
}
@@ -292,28 +290,28 @@ namespace Godot.Collections
}
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static IntPtr godot_icall_Dictionary_Ctor();
+ internal static extern IntPtr godot_icall_Dictionary_Ctor();
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_Dictionary_Dtor(IntPtr ptr);
+ internal static extern void godot_icall_Dictionary_Dtor(IntPtr ptr);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static object godot_icall_Dictionary_GetValue(IntPtr ptr, object key);
+ internal static extern object godot_icall_Dictionary_GetValue(IntPtr ptr, object key);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static object godot_icall_Dictionary_GetValue_Generic(IntPtr ptr, object key, int valTypeEncoding, IntPtr valTypeClass);
+ internal static extern object godot_icall_Dictionary_GetValue_Generic(IntPtr ptr, object key, int valTypeEncoding, IntPtr valTypeClass);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_Dictionary_SetValue(IntPtr ptr, object key, object value);
+ internal static extern void godot_icall_Dictionary_SetValue(IntPtr ptr, object key, object value);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static IntPtr godot_icall_Dictionary_Keys(IntPtr ptr);
+ internal static extern IntPtr godot_icall_Dictionary_Keys(IntPtr ptr);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static IntPtr godot_icall_Dictionary_Values(IntPtr ptr);
+ internal static extern IntPtr godot_icall_Dictionary_Values(IntPtr ptr);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static int godot_icall_Dictionary_Count(IntPtr ptr);
+ internal static extern int godot_icall_Dictionary_Count(IntPtr ptr);
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern static int godot_icall_Dictionary_KeyValuePairs(IntPtr ptr, out IntPtr keys, out IntPtr values);
@@ -325,34 +323,34 @@ namespace Godot.Collections
internal extern static void godot_icall_Dictionary_Add(IntPtr ptr, object key, object value);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_Dictionary_Clear(IntPtr ptr);
+ internal static extern void godot_icall_Dictionary_Clear(IntPtr ptr);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static bool godot_icall_Dictionary_Contains(IntPtr ptr, object key, object value);
+ internal static extern bool godot_icall_Dictionary_Contains(IntPtr ptr, object key, object value);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static bool godot_icall_Dictionary_ContainsKey(IntPtr ptr, object key);
+ internal static extern bool godot_icall_Dictionary_ContainsKey(IntPtr ptr, object key);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static IntPtr godot_icall_Dictionary_Duplicate(IntPtr ptr, bool deep);
+ internal static extern IntPtr godot_icall_Dictionary_Duplicate(IntPtr ptr, bool deep);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static bool godot_icall_Dictionary_RemoveKey(IntPtr ptr, object key);
+ internal static extern bool godot_icall_Dictionary_RemoveKey(IntPtr ptr, object key);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static bool godot_icall_Dictionary_Remove(IntPtr ptr, object key, object value);
+ internal static extern bool godot_icall_Dictionary_Remove(IntPtr ptr, object key, object value);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static bool godot_icall_Dictionary_TryGetValue(IntPtr ptr, object key, out object value);
+ internal static extern bool godot_icall_Dictionary_TryGetValue(IntPtr ptr, object key, out object value);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static bool godot_icall_Dictionary_TryGetValue_Generic(IntPtr ptr, object key, out object value, int valTypeEncoding, IntPtr valTypeClass);
+ internal static extern bool godot_icall_Dictionary_TryGetValue_Generic(IntPtr ptr, object key, out object value, int valTypeEncoding, IntPtr valTypeClass);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_Dictionary_Generic_GetValueTypeInfo(Type valueType, out int valTypeEncoding, out IntPtr valTypeClass);
+ internal static extern void godot_icall_Dictionary_Generic_GetValueTypeInfo(Type valueType, out int valTypeEncoding, out IntPtr valTypeClass);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static string godot_icall_Dictionary_ToString(IntPtr ptr);
+ internal static extern string godot_icall_Dictionary_ToString(IntPtr ptr);
}
/// <summary>
@@ -363,10 +361,9 @@ namespace Godot.Collections
/// </summary>
/// <typeparam name="TKey">The type of the dictionary's keys.</typeparam>
/// <typeparam name="TValue">The type of the dictionary's values.</typeparam>
- public class Dictionary<TKey, TValue> :
- IDictionary<TKey, TValue>
+ public class Dictionary<TKey, TValue> : IDictionary<TKey, TValue>
{
- private readonly Dictionary objectDict;
+ private readonly Dictionary _objectDict;
internal static int valTypeEncoding;
internal static IntPtr valTypeClass;
@@ -381,7 +378,7 @@ namespace Godot.Collections
/// </summary>
public Dictionary()
{
- objectDict = new Dictionary();
+ _objectDict = new Dictionary();
}
/// <summary>
@@ -391,7 +388,7 @@ namespace Godot.Collections
/// <returns>A new Godot Dictionary.</returns>
public Dictionary(IDictionary<TKey, TValue> dictionary)
{
- objectDict = new Dictionary();
+ _objectDict = new Dictionary();
if (dictionary == null)
throw new NullReferenceException($"Parameter '{nameof(dictionary)} cannot be null.'");
@@ -413,17 +410,17 @@ namespace Godot.Collections
/// <returns>A new Godot Dictionary.</returns>
public Dictionary(Dictionary dictionary)
{
- objectDict = dictionary;
+ _objectDict = dictionary;
}
internal Dictionary(IntPtr handle)
{
- objectDict = new Dictionary(handle);
+ _objectDict = new Dictionary(handle);
}
internal Dictionary(DictionarySafeHandle handle)
{
- objectDict = new Dictionary(handle);
+ _objectDict = new Dictionary(handle);
}
/// <summary>
@@ -432,12 +429,12 @@ namespace Godot.Collections
/// <param name="from">The typed dictionary to convert.</param>
public static explicit operator Dictionary(Dictionary<TKey, TValue> from)
{
- return from.objectDict;
+ return from._objectDict;
}
internal IntPtr GetPtr()
{
- return objectDict.GetPtr();
+ return _objectDict.GetPtr();
}
/// <summary>
@@ -447,7 +444,7 @@ namespace Godot.Collections
/// <returns>A new Godot Dictionary.</returns>
public Dictionary<TKey, TValue> Duplicate(bool deep = false)
{
- return new Dictionary<TKey, TValue>(objectDict.Duplicate(deep));
+ return new Dictionary<TKey, TValue>(_objectDict.Duplicate(deep));
}
// IDictionary<TKey, TValue>
@@ -458,8 +455,8 @@ namespace Godot.Collections
/// <value>The value at the given <paramref name="key"/>.</value>
public TValue this[TKey key]
{
- get { return (TValue)Dictionary.godot_icall_Dictionary_GetValue_Generic(objectDict.GetPtr(), key, valTypeEncoding, valTypeClass); }
- set { objectDict[key] = value; }
+ get { return (TValue)Dictionary.godot_icall_Dictionary_GetValue_Generic(_objectDict.GetPtr(), key, valTypeEncoding, valTypeClass); }
+ set { _objectDict[key] = value; }
}
/// <summary>
@@ -469,7 +466,7 @@ namespace Godot.Collections
{
get
{
- IntPtr handle = Dictionary.godot_icall_Dictionary_Keys(objectDict.GetPtr());
+ IntPtr handle = Dictionary.godot_icall_Dictionary_Keys(_objectDict.GetPtr());
return new Array<TKey>(new ArraySafeHandle(handle));
}
}
@@ -481,7 +478,7 @@ namespace Godot.Collections
{
get
{
- IntPtr handle = Dictionary.godot_icall_Dictionary_Values(objectDict.GetPtr());
+ IntPtr handle = Dictionary.godot_icall_Dictionary_Values(_objectDict.GetPtr());
return new Array<TValue>(new ArraySafeHandle(handle));
}
}
@@ -500,7 +497,7 @@ namespace Godot.Collections
/// <param name="value">The object to add.</param>
public void Add(TKey key, TValue value)
{
- objectDict.Add(key, value);
+ _objectDict.Add(key, value);
}
/// <summary>
@@ -510,7 +507,7 @@ namespace Godot.Collections
/// <returns>Whether or not this dictionary contains the given key.</returns>
public bool ContainsKey(TKey key)
{
- return objectDict.Contains(key);
+ return _objectDict.Contains(key);
}
/// <summary>
@@ -544,14 +541,14 @@ namespace Godot.Collections
/// <returns>The number of elements.</returns>
public int Count
{
- get { return objectDict.Count; }
+ get { return _objectDict.Count; }
}
bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
{
- objectDict.Add(item.Key, item.Value);
+ _objectDict.Add(item.Key, item.Value);
}
/// <summary>
@@ -559,12 +556,12 @@ namespace Godot.Collections
/// </summary>
public void Clear()
{
- objectDict.Clear();
+ _objectDict.Clear();
}
bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item)
{
- return objectDict.Contains(new KeyValuePair<object, object>(item.Key, item.Value));
+ return _objectDict.Contains(new KeyValuePair<object, object>(item.Key, item.Value));
}
/// <summary>
@@ -622,6 +619,6 @@ namespace Godot.Collections
/// Converts this <see cref="Dictionary{TKey, TValue}"/> to a string.
/// </summary>
/// <returns>A string representation of this dictionary.</returns>
- public override string ToString() => objectDict.ToString();
+ public override string ToString() => _objectDict.ToString();
}
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/DynamicObject.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/DynamicObject.cs
index 0c21bcaa3f..26d5f9c796 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/DynamicObject.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/DynamicObject.cs
@@ -7,20 +7,20 @@ using System.Runtime.CompilerServices;
namespace Godot
{
/// <summary>
- /// Represents an <see cref="Godot.Object"/> whose members can be dynamically accessed at runtime through the Variant API.
+ /// Represents an <see cref="Object"/> whose members can be dynamically accessed at runtime through the Variant API.
/// </summary>
/// <remarks>
/// <para>
- /// The <see cref="Godot.DynamicGodotObject"/> class enables access to the Variant
- /// members of a <see cref="Godot.Object"/> instance at runtime.
+ /// The <see cref="DynamicGodotObject"/> class enables access to the Variant
+ /// members of a <see cref="Object"/> instance at runtime.
/// </para>
/// <para>
/// This allows accessing the class members using their original names in the engine as well as the members from the
- /// script attached to the <see cref="Godot.Object"/>, regardless of the scripting language it was written in.
+ /// script attached to the <see cref="Object"/>, regardless of the scripting language it was written in.
/// </para>
/// </remarks>
/// <example>
- /// This sample shows how to use <see cref="Godot.DynamicGodotObject"/> to dynamically access the engine members of a <see cref="Godot.Object"/>.
+ /// This sample shows how to use <see cref="DynamicGodotObject"/> to dynamically access the engine members of a <see cref="Object"/>.
/// <code>
/// dynamic sprite = GetNode("Sprite2D").DynamicGodotObject;
/// sprite.add_child(this);
@@ -30,7 +30,7 @@ namespace Godot
/// </code>
/// </example>
/// <example>
- /// This sample shows how to use <see cref="Godot.DynamicGodotObject"/> to dynamically access the members of the script attached to a <see cref="Godot.Object"/>.
+ /// This sample shows how to use <see cref="DynamicGodotObject"/> to dynamically access the members of the script attached to a <see cref="Object"/>.
/// <code>
/// dynamic childNode = GetNode("ChildNode").DynamicGodotObject;
///
@@ -54,32 +54,34 @@ namespace Godot
public class DynamicGodotObject : DynamicObject
{
/// <summary>
- /// Gets the <see cref="Godot.Object"/> associated with this <see cref="Godot.DynamicGodotObject"/>.
+ /// Gets the <see cref="Object"/> associated with this <see cref="DynamicGodotObject"/>.
/// </summary>
public Object Value { get; }
/// <summary>
- /// Initializes a new instance of the <see cref="Godot.DynamicGodotObject"/> class.
+ /// Initializes a new instance of the <see cref="DynamicGodotObject"/> class.
/// </summary>
/// <param name="godotObject">
- /// The <see cref="Godot.Object"/> that will be associated with this <see cref="Godot.DynamicGodotObject"/>.
+ /// The <see cref="Object"/> that will be associated with this <see cref="DynamicGodotObject"/>.
/// </param>
- /// <exception cref="System.ArgumentNullException">
- /// Thrown when the <paramref name="godotObject"/> parameter is null.
+ /// <exception cref="ArgumentNullException">
+ /// Thrown when the <paramref name="godotObject"/> parameter is <see langword="null"/>.
/// </exception>
public DynamicGodotObject(Object godotObject)
{
if (godotObject == null)
throw new ArgumentNullException(nameof(godotObject));
- this.Value = godotObject;
+ Value = godotObject;
}
+ /// <inheritdoc/>
public override IEnumerable<string> GetDynamicMemberNames()
{
return godot_icall_DynamicGodotObject_SetMemberList(Object.GetPtr(Value));
}
+ /// <inheritdoc/>
public override bool TryBinaryOperation(BinaryOperationBinder binder, object arg, out object result)
{
switch (binder.Operation)
@@ -121,6 +123,7 @@ namespace Godot
return base.TryBinaryOperation(binder, arg, out result);
}
+ /// <inheritdoc/>
public override bool TryConvert(ConvertBinder binder, out object result)
{
if (binder.Type == typeof(Object))
@@ -139,6 +142,7 @@ namespace Godot
return base.TryConvert(binder, out result);
}
+ /// <inheritdoc/>
public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result)
{
if (indexes.Length == 1)
@@ -152,16 +156,19 @@ namespace Godot
return base.TryGetIndex(binder, indexes, out result);
}
+ /// <inheritdoc/>
public override bool TryGetMember(GetMemberBinder binder, out object result)
{
return godot_icall_DynamicGodotObject_GetMember(Object.GetPtr(Value), binder.Name, out result);
}
+ /// <inheritdoc/>
public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
{
return godot_icall_DynamicGodotObject_InvokeMember(Object.GetPtr(Value), binder.Name, args, out result);
}
+ /// <inheritdoc/>
public override bool TrySetIndex(SetIndexBinder binder, object[] indexes, object value)
{
if (indexes.Length == 1)
@@ -175,22 +182,23 @@ namespace Godot
return base.TrySetIndex(binder, indexes, value);
}
+ /// <inheritdoc/>
public override bool TrySetMember(SetMemberBinder binder, object value)
{
return godot_icall_DynamicGodotObject_SetMember(Object.GetPtr(Value), binder.Name, value);
}
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static string[] godot_icall_DynamicGodotObject_SetMemberList(IntPtr godotObject);
+ internal static extern string[] godot_icall_DynamicGodotObject_SetMemberList(IntPtr godotObject);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static bool godot_icall_DynamicGodotObject_InvokeMember(IntPtr godotObject, string name, object[] args, out object result);
+ internal static extern bool godot_icall_DynamicGodotObject_InvokeMember(IntPtr godotObject, string name, object[] args, out object result);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static bool godot_icall_DynamicGodotObject_GetMember(IntPtr godotObject, string name, out object result);
+ internal static extern bool godot_icall_DynamicGodotObject_GetMember(IntPtr godotObject, string name, out object result);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static bool godot_icall_DynamicGodotObject_SetMember(IntPtr godotObject, string name, object value);
+ internal static extern bool godot_icall_DynamicGodotObject_SetMember(IntPtr godotObject, string name, object value);
#region We don't override these methods
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/NodeExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/NodeExtensions.cs
index 5d16260f5d..1dc21b6303 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/NodeExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/NodeExtensions.cs
@@ -1,42 +1,192 @@
+using System;
+
namespace Godot
{
public partial class Node
{
+ /// <summary>
+ /// Fetches a node. The <see cref="NodePath"/> can be either a relative path (from
+ /// the current node) or an absolute path (in the scene tree) to a node. If the path
+ /// does not exist, a <see langword="null"/> instance is returned and an error
+ /// is logged. Attempts to access methods on the return value will result in an
+ /// "Attempt to call &lt;method&gt; on a null instance." error.
+ /// Note: Fetching absolute paths only works when the node is inside the scene tree
+ /// (see <see cref="IsInsideTree"/>).
+ /// </summary>
+ /// <example>
+ /// Example: Assume your current node is Character and the following tree:
+ /// <code>
+ /// /root
+ /// /root/Character
+ /// /root/Character/Sword
+ /// /root/Character/Backpack/Dagger
+ /// /root/MyGame
+ /// /root/Swamp/Alligator
+ /// /root/Swamp/Mosquito
+ /// /root/Swamp/Goblin
+ /// </code>
+ /// Possible paths are:
+ /// <code>
+ /// GetNode("Sword");
+ /// GetNode("Backpack/Dagger");
+ /// GetNode("../Swamp/Alligator");
+ /// GetNode("/root/MyGame");
+ /// </code>
+ /// </example>
+ /// <seealso cref="GetNodeOrNull{T}(NodePath)"/>
+ /// <param name="path">The path to the node to fetch.</param>
+ /// <exception cref="InvalidCastException">
+ /// Thrown when the given the fetched node can't be casted to the given type <typeparamref name="T"/>.
+ /// </exception>
+ /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Node"/>.</typeparam>
+ /// <returns>
+ /// The <see cref="Node"/> at the given <paramref name="path"/>.
+ /// </returns>
public T GetNode<T>(NodePath path) where T : class
{
return (T)(object)GetNode(path);
}
+ /// <summary>
+ /// Fetches a node. The <see cref="NodePath"/> can be either a relative path (from
+ /// the current node) or an absolute path (in the scene tree) to a node. If the path
+ /// does not exist, a <see langword="null"/> instance is returned and an error
+ /// is logged. Attempts to access methods on the return value will result in an
+ /// "Attempt to call &lt;method&gt; on a null instance." error.
+ /// Note: Fetching absolute paths only works when the node is inside the scene tree
+ /// (see <see cref="IsInsideTree"/>).
+ /// </summary>
+ /// <example>
+ /// Example: Assume your current node is Character and the following tree:
+ /// <code>
+ /// /root
+ /// /root/Character
+ /// /root/Character/Sword
+ /// /root/Character/Backpack/Dagger
+ /// /root/MyGame
+ /// /root/Swamp/Alligator
+ /// /root/Swamp/Mosquito
+ /// /root/Swamp/Goblin
+ /// </code>
+ /// Possible paths are:
+ /// <code>
+ /// GetNode("Sword");
+ /// GetNode("Backpack/Dagger");
+ /// GetNode("../Swamp/Alligator");
+ /// GetNode("/root/MyGame");
+ /// </code>
+ /// </example>
+ /// <seealso cref="GetNode{T}(NodePath)"/>
+ /// <param name="path">The path to the node to fetch.</param>
+ /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Node"/>.</typeparam>
+ /// <returns>
+ /// The <see cref="Node"/> at the given <paramref name="path"/>, or <see langword="null"/> if not found.
+ /// </returns>
public T GetNodeOrNull<T>(NodePath path) where T : class
{
return GetNodeOrNull(path) as T;
}
+ /// <summary>
+ /// Returns a child node by its index (see <see cref="GetChildCount"/>).
+ /// This method is often used for iterating all children of a node.
+ /// Negative indices access the children from the last one.
+ /// To access a child node via its name, use <see cref="GetNode"/>.
+ /// </summary>
+ /// <seealso cref="GetChildOrNull{T}(int)"/>
+ /// <param name="idx">Child index.</param>
+ /// <exception cref="InvalidCastException">
+ /// Thrown when the given the fetched node can't be casted to the given type <typeparamref name="T"/>.
+ /// </exception>
+ /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Node"/>.</typeparam>
+ /// <returns>
+ /// The child <see cref="Node"/> at the given index <paramref name="idx"/>.
+ /// </returns>
public T GetChild<T>(int idx) where T : class
{
return (T)(object)GetChild(idx);
}
+ /// <summary>
+ /// Returns a child node by its index (see <see cref="GetChildCount"/>).
+ /// This method is often used for iterating all children of a node.
+ /// Negative indices access the children from the last one.
+ /// To access a child node via its name, use <see cref="GetNode"/>.
+ /// </summary>
+ /// <seealso cref="GetChild{T}(int)"/>
+ /// <param name="idx">Child index.</param>
+ /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Node"/>.</typeparam>
+ /// <returns>
+ /// The child <see cref="Node"/> at the given index <paramref name="idx"/>, or <see langword="null"/> if not found.
+ /// </returns>
public T GetChildOrNull<T>(int idx) where T : class
{
return GetChild(idx) as T;
}
+ /// <summary>
+ /// The node owner. A node can have any other node as owner (as long as it is
+ /// a valid parent, grandparent, etc. ascending in the tree). When saving a
+ /// node (using <see cref="PackedScene"/>), all the nodes it owns will be saved
+ /// with it. This allows for the creation of complex <see cref="SceneTree"/>s,
+ /// with instancing and subinstancing.
+ /// </summary>
+ /// <seealso cref="GetOwnerOrNull{T}"/>
+ /// <exception cref="InvalidCastException">
+ /// Thrown when the given the fetched node can't be casted to the given type <typeparamref name="T"/>.
+ /// </exception>
+ /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Node"/>.</typeparam>
+ /// <returns>
+ /// The owner <see cref="Node"/>.
+ /// </returns>
public T GetOwner<T>() where T : class
{
return (T)(object)Owner;
}
+ /// <summary>
+ /// The node owner. A node can have any other node as owner (as long as it is
+ /// a valid parent, grandparent, etc. ascending in the tree). When saving a
+ /// node (using <see cref="PackedScene"/>), all the nodes it owns will be saved
+ /// with it. This allows for the creation of complex <see cref="SceneTree"/>s,
+ /// with instancing and subinstancing.
+ /// </summary>
+ /// <seealso cref="GetOwner{T}"/>
+ /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Node"/>.</typeparam>
+ /// <returns>
+ /// The owner <see cref="Node"/>, or <see langword="null"/> if there is no owner.
+ /// </returns>
public T GetOwnerOrNull<T>() where T : class
{
return Owner as T;
}
+ /// <summary>
+ /// Returns the parent node of the current node, or a <see langword="null"/> instance
+ /// if the node lacks a parent.
+ /// </summary>
+ /// <seealso cref="GetParentOrNull{T}"/>
+ /// <exception cref="InvalidCastException">
+ /// Thrown when the given the fetched node can't be casted to the given type <typeparamref name="T"/>.
+ /// </exception>
+ /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Node"/>.</typeparam>
+ /// <returns>
+ /// The parent <see cref="Node"/>.
+ /// </returns>
public T GetParent<T>() where T : class
{
return (T)(object)GetParent();
}
+ /// <summary>
+ /// Returns the parent node of the current node, or a <see langword="null"/> instance
+ /// if the node lacks a parent.
+ /// </summary>
+ /// <seealso cref="GetParent{T}"/>
+ /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Node"/>.</typeparam>
+ /// <returns>
+ /// The parent <see cref="Node"/>, or <see langword="null"/> if the node has no parent.
+ /// </returns>
public T GetParentOrNull<T>() where T : class
{
return GetParent() as T;
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ObjectExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ObjectExtensions.cs
index 9ef0959750..691fd85964 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ObjectExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ObjectExtensions.cs
@@ -5,17 +5,37 @@ namespace Godot
{
public partial class Object
{
+ /// <summary>
+ /// Returns whether <paramref name="instance"/> is a valid object
+ /// (e.g. has not been deleted from memory).
+ /// </summary>
+ /// <param name="instance">The instance to check.</param>
+ /// <returns>If the instance is a valid object.</returns>
public static bool IsInstanceValid(Object instance)
{
return instance != null && instance.NativeInstance != IntPtr.Zero;
}
+ /// <summary>
+ /// Returns a weak reference to an object, or <see langword="null"/>
+ /// if the argument is invalid.
+ /// A weak reference to an object is not enough to keep the object alive:
+ /// when the only remaining references to a referent are weak references,
+ /// garbage collection is free to destroy the referent and reuse its memory
+ /// for something else. However, until the object is actually destroyed the
+ /// weak reference may return the object even if there are no strong references
+ /// to it.
+ /// </summary>
+ /// <param name="obj">The object.</param>
+ /// <returns>
+ /// The <see cref="WeakRef"/> reference to the object or <see langword="null"/>.
+ /// </returns>
public static WeakRef WeakRef(Object obj)
{
- return godot_icall_Object_weakref(Object.GetPtr(obj));
+ return godot_icall_Object_weakref(GetPtr(obj));
}
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static WeakRef godot_icall_Object_weakref(IntPtr obj);
+ internal static extern WeakRef godot_icall_Object_weakref(IntPtr obj);
}
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/PackedSceneExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/PackedSceneExtensions.cs
index 214bbf5179..435b59d5f3 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/PackedSceneExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/PackedSceneExtensions.cs
@@ -1,3 +1,5 @@
+using System;
+
namespace Godot
{
public partial class PackedScene
@@ -5,20 +7,27 @@ namespace Godot
/// <summary>
/// Instantiates the scene's node hierarchy, erroring on failure.
/// Triggers child scene instantiation(s). Triggers a
- /// `Node.NotificationInstanced` notification on the root node.
+ /// <see cref="Node.NotificationInstanced"/> notification on the root node.
/// </summary>
- /// <typeparam name="T">The type to cast to. Should be a descendant of Node.</typeparam>
+ /// <seealso cref="InstantiateOrNull{T}(GenEditState)"/>
+ /// <exception cref="InvalidCastException">
+ /// Thrown when the given the instantiated node can't be casted to the given type <typeparamref name="T"/>.
+ /// </exception>
+ /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Node"/>.</typeparam>
+ /// <returns>The instantiated scene.</returns>
public T Instantiate<T>(PackedScene.GenEditState editState = (PackedScene.GenEditState)0) where T : class
{
return (T)(object)Instantiate(editState);
}
/// <summary>
- /// Instantiates the scene's node hierarchy, returning null on failure.
+ /// Instantiates the scene's node hierarchy, returning <see langword="null"/> on failure.
/// Triggers child scene instantiation(s). Triggers a
- /// `Node.NotificationInstanced` notification on the root node.
+ /// <see cref="Node.NotificationInstanced"/> notification on the root node.
/// </summary>
- /// <typeparam name="T">The type to cast to. Should be a descendant of Node.</typeparam>
+ /// <seealso cref="Instantiate{T}(GenEditState)"/>
+ /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Node"/>.</typeparam>
+ /// <returns>The instantiated scene.</returns>
public T InstantiateOrNull<T>(PackedScene.GenEditState editState = (PackedScene.GenEditState)0) where T : class
{
return Instantiate(editState) as T;
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs
index 74fa05d1fd..25c11d5cf6 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs
@@ -1,10 +1,30 @@
+using System;
+
namespace Godot
{
public static partial class ResourceLoader
{
- public static T Load<T>(string path, string typeHint = null, CacheMode noCache = CacheMode.Reuse) where T : class
+ /// <summary>
+ /// Loads a resource at the given <paramref name="path"/>, caching the result
+ /// for further access.
+ /// The registered <see cref="ResourceFormatLoader"/> instances are queried sequentially
+ /// to find the first one which can handle the file's extension, and then attempt
+ /// loading. If loading fails, the remaining ResourceFormatLoaders are also attempted.
+ /// An optional <paramref name="typeHint"/> can be used to further specify the
+ /// <see cref="Resource"/> type that should be handled by the <see cref="ResourceFormatLoader"/>.
+ /// Anything that inherits from <see cref="Resource"/> can be used as a type hint,
+ /// for example <see cref="Image"/>.
+ /// The <paramref name="cacheMode"/> property defines whether and how the cache should
+ /// be used or updated when loading the resource. See <see cref="CacheMode"/> for details.
+ /// Returns an empty resource if no <see cref="ResourceFormatLoader"/> could handle the file.
+ /// </summary>
+ /// <exception cref="InvalidCastException">
+ /// Thrown when the given the loaded resource can't be casted to the given type <typeparamref name="T"/>.
+ /// </exception>
+ /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Resource"/>.</typeparam>
+ public static T Load<T>(string path, string typeHint = null, CacheMode cacheMode = CacheMode.Reuse) where T : class
{
- return (T)(object)Load(path, typeHint, noCache);
+ return (T)(object)Load(path, typeHint, cacheMode);
}
}
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/SceneTreeExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/SceneTreeExtensions.cs
index 20b11a48dd..df130a5c77 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/SceneTreeExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/SceneTreeExtensions.cs
@@ -6,12 +6,16 @@ namespace Godot
{
public partial class SceneTree
{
+ /// <summary>
+ /// Returns a list of all nodes assigned to the given <paramref name="group"/>.
+ /// </summary>
+ /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Node"/>.</typeparam>
public Array<T> GetNodesInGroup<T>(StringName group) where T : class
{
- return new Array<T>(godot_icall_SceneTree_get_nodes_in_group_Generic(Object.GetPtr(this), StringName.GetPtr(group), typeof(T)));
+ return new Array<T>(godot_icall_SceneTree_get_nodes_in_group_Generic(GetPtr(this), StringName.GetPtr(group), typeof(T)));
}
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static IntPtr godot_icall_SceneTree_get_nodes_in_group_Generic(IntPtr obj, IntPtr group, Type elemType);
+ internal static extern IntPtr godot_icall_SceneTree_get_nodes_in_group_Generic(IntPtr obj, IntPtr group, Type elemType);
}
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs
index 71d0593916..ef42374041 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs
@@ -7,22 +7,56 @@ using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
-// TODO: Add comments describing what this class does. It is not obvious.
-
namespace Godot
{
+ /// <summary>
+ /// Godot's global functions.
+ /// </summary>
public static partial class GD
{
+ /// <summary>
+ /// Decodes a byte array back to a <c>Variant</c> value.
+ /// If <paramref name="allowObjects"/> is <see langword="true"/> decoding objects is allowed.
+ ///
+ /// WARNING: Deserialized object can contain code which gets executed.
+ /// Do not set <paramref name="allowObjects"/> to <see langword="true"/>
+ /// if the serialized object comes from untrusted sources to avoid
+ /// potential security threats (remote code execution).
+ /// </summary>
+ /// <param name="bytes">Byte array that will be decoded to a <c>Variant</c>.</param>
+ /// <param name="allowObjects">If objects should be decoded.</param>
+ /// <returns>The decoded <c>Variant</c>.</returns>
public static object Bytes2Var(byte[] bytes, bool allowObjects = false)
{
return godot_icall_GD_bytes2var(bytes, allowObjects);
}
+ /// <summary>
+ /// Converts from a <c>Variant</c> type to another in the best way possible.
+ /// The <paramref name="type"/> parameter uses the <see cref="Variant.Type"/> values.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// var a = new Vector2(1, 0);
+ /// // Prints 1
+ /// GD.Print(a.Length());
+ /// var b = GD.Convert(a, Variant.Type.String)
+ /// // Prints 6 as "(1, 0)" is 6 characters
+ /// GD.Print(b.Length);
+ /// </code>
+ /// </example>
+ /// <returns>The <c>Variant</c> converted to the given <paramref name="type"/>.</returns>
public static object Convert(object what, Variant.Type type)
{
return godot_icall_GD_convert(what, type);
}
+ /// <summary>
+ /// Converts from decibels to linear energy (audio).
+ /// </summary>
+ /// <seealso cref="Linear2Db(real_t)"/>
+ /// <param name="db">Decibels to convert.</param>
+ /// <returns>Audio volume as linear energy.</returns>
public static real_t Db2Linear(real_t db)
{
return (real_t)Math.Exp(db * 0.11512925464970228420089957273422);
@@ -38,111 +72,360 @@ namespace Godot
return Array.ConvertAll(parameters, x => x?.ToString() ?? "null");
}
+ /// <summary>
+ /// Returns the integer hash of the variable passed.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// GD.Print(GD.Hash("a")); // Prints 177670
+ /// </code>
+ /// </example>
+ /// <param name="var">Variable that will be hashed.</param>
+ /// <returns>Hash of the variable passed.</returns>
public static int Hash(object var)
{
return godot_icall_GD_hash(var);
}
+ /// <summary>
+ /// Returns the <see cref="Object"/> that corresponds to <paramref name="instanceId"/>.
+ /// All Objects have a unique instance ID.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// public class MyNode : Node
+ /// {
+ /// public string foo = "bar";
+ ///
+ /// public override void _Ready()
+ /// {
+ /// ulong id = GetInstanceId();
+ /// var inst = (MyNode)GD.InstanceFromId(Id);
+ /// GD.Print(inst.foo); // Prints bar
+ /// }
+ /// }
+ /// </code>
+ /// </example>
+ /// <param name="instanceId">Instance ID of the Object to retrieve.</param>
+ /// <returns>The <see cref="Object"/> instance.</returns>
public static Object InstanceFromId(ulong instanceId)
{
return godot_icall_GD_instance_from_id(instanceId);
}
+ /// <summary>
+ /// Converts from linear energy to decibels (audio).
+ /// This can be used to implement volume sliders that behave as expected (since volume isn't linear).
+ /// </summary>
+ /// <seealso cref="Db2Linear(real_t)"/>
+ /// <example>
+ /// <code>
+ /// // "slider" refers to a node that inherits Range such as HSlider or VSlider.
+ /// // Its range must be configured to go from 0 to 1.
+ /// // Change the bus name if you'd like to change the volume of a specific bus only.
+ /// AudioServer.SetBusVolumeDb(AudioServer.GetBusIndex("Master"), GD.Linear2Db(slider.value));
+ /// </code>
+ /// </example>
+ /// <param name="linear">The linear energy to convert.</param>
+ /// <returns>Audio as decibels</returns>
public static real_t Linear2Db(real_t linear)
{
return (real_t)(Math.Log(linear) * 8.6858896380650365530225783783321);
}
+ /// <summary>
+ /// Loads a resource from the filesystem located at <paramref name="path"/>.
+ /// The resource is loaded on the method call (unless it's referenced already
+ /// elsewhere, e.g. in another script or in the scene), which might cause slight delay,
+ /// especially when loading scenes. To avoid unnecessary delays when loading something
+ /// multiple times, either store the resource in a variable.
+ ///
+ /// Note: Resource paths can be obtained by right-clicking on a resource in the FileSystem
+ /// dock and choosing "Copy Path" or by dragging the file from the FileSystem dock into the script.
+ ///
+ /// Important: The path must be absolute, a local path will just return <see langword="null"/>.
+ /// This method is a simplified version of <see cref="ResourceLoader.Load"/>, which can be used
+ /// for more advanced scenarios.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// // Load a scene called main located in the root of the project directory and cache it in a variable.
+ /// var main = GD.Load("res://main.tscn"); // main will contain a PackedScene resource.
+ /// </code>
+ /// </example>
+ /// <param name="path">Path of the <see cref="Resource"/> to load.</param>
+ /// <returns>The loaded <see cref="Resource"/>.</returns>
public static Resource Load(string path)
{
return ResourceLoader.Load(path);
}
+ /// <summary>
+ /// Loads a resource from the filesystem located at <paramref name="path"/>.
+ /// The resource is loaded on the method call (unless it's referenced already
+ /// elsewhere, e.g. in another script or in the scene), which might cause slight delay,
+ /// especially when loading scenes. To avoid unnecessary delays when loading something
+ /// multiple times, either store the resource in a variable.
+ ///
+ /// Note: Resource paths can be obtained by right-clicking on a resource in the FileSystem
+ /// dock and choosing "Copy Path" or by dragging the file from the FileSystem dock into the script.
+ ///
+ /// Important: The path must be absolute, a local path will just return <see langword="null"/>.
+ /// This method is a simplified version of <see cref="ResourceLoader.Load"/>, which can be used
+ /// for more advanced scenarios.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// // Load a scene called main located in the root of the project directory and cache it in a variable.
+ /// var main = GD.Load&lt;PackedScene&gt;("res://main.tscn"); // main will contain a PackedScene resource.
+ /// </code>
+ /// </example>
+ /// <param name="path">Path of the <see cref="Resource"/> to load.</param>
+ /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Resource"/>.</typeparam>
public static T Load<T>(string path) where T : class
{
return ResourceLoader.Load<T>(path);
}
+ /// <summary>
+ /// Pushes an error message to Godot's built-in debugger and to the OS terminal.
+ ///
+ /// Note: Errors printed this way will not pause project execution.
+ /// To print an error message and pause project execution in debug builds,
+ /// use [code]assert(false, "test error")[/code] instead.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// GD.PushError("test_error"); // Prints "test error" to debugger and terminal as error call
+ /// </code>
+ /// </example>
+ /// <param name="message">Error message.</param>
public static void PushError(string message)
{
godot_icall_GD_pusherror(message);
}
+ /// <summary>
+ /// Pushes a warning message to Godot's built-in debugger and to the OS terminal.
+ /// </summary>
+ /// <example>
+ /// GD.PushWarning("test warning"); // Prints "test warning" to debugger and terminal as warning call
+ /// </example>
+ /// <param name="message">Warning message.</param>
public static void PushWarning(string message)
{
godot_icall_GD_pushwarning(message);
}
+ /// <summary>
+ /// Converts one or more arguments of any type to string in the best way possible
+ /// and prints them to the console.
+ ///
+ /// Note: Consider using <see cref="PushError(string)"/> and <see cref="PushWarning(string)"/>
+ /// to print error and warning messages instead of <see cref="Print(object[])"/>.
+ /// This distinguishes them from print messages used for debugging purposes,
+ /// while also displaying a stack trace when an error or warning is printed.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// var a = new int[] { 1, 2, 3 };
+ /// GD.Print("a", "b", a); // Prints ab[1, 2, 3]
+ /// </code>
+ /// </example>
+ /// <param name="what">Arguments that will be printed.</param>
public static void Print(params object[] what)
{
godot_icall_GD_print(GetPrintParams(what));
}
+ /// <summary>
+ /// Prints the current stack trace information to the console.
+ /// </summary>
public static void PrintStack()
{
Print(System.Environment.StackTrace);
}
+ /// <summary>
+ /// Prints one or more arguments to strings in the best way possible to standard error line.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// GD.PrintErr("prints to stderr");
+ /// </code>
+ /// </example>
+ /// <param name="what">Arguments that will be printed.</param>
public static void PrintErr(params object[] what)
{
godot_icall_GD_printerr(GetPrintParams(what));
}
+ /// <summary>
+ /// Prints one or more arguments to strings in the best way possible to console.
+ /// No newline is added at the end.
+ ///
+ /// Note: Due to limitations with Godot's built-in console, this only prints to the terminal.
+ /// If you need to print in the editor, use another method, such as <see cref="Print(object[])"/>.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// GD.PrintRaw("A");
+ /// GD.PrintRaw("B");
+ /// // Prints AB
+ /// </code>
+ /// </example>
+ /// <param name="what">Arguments that will be printed.</param>
public static void PrintRaw(params object[] what)
{
godot_icall_GD_printraw(GetPrintParams(what));
}
+ /// <summary>
+ /// Prints one or more arguments to the console with a space between each argument.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// GD.PrintS("A", "B", "C"); // Prints A B C
+ /// </code>
+ /// </example>
+ /// <param name="what">Arguments that will be printed.</param>
public static void PrintS(params object[] what)
{
godot_icall_GD_prints(GetPrintParams(what));
}
+ /// <summary>
+ /// Prints one or more arguments to the console with a tab between each argument.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// GD.PrintT("A", "B", "C"); // Prints A B C
+ /// </code>
+ /// </example>
+ /// <param name="what">Arguments that will be printed.</param>
public static void PrintT(params object[] what)
{
godot_icall_GD_printt(GetPrintParams(what));
}
+ /// <summary>
+ /// Returns a random floating point value between <c>0.0</c> and <c>1.0</c> (inclusive).
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// GD.Randf(); // Returns e.g. 0.375671
+ /// </code>
+ /// </example>
+ /// <returns>A random <see langword="float"/> number.</returns>
public static float Randf()
{
return godot_icall_GD_randf();
}
+ /// <summary>
+ /// Returns a random unsigned 32-bit integer.
+ /// Use remainder to obtain a random value in the interval <c>[0, N - 1]</c> (where N is smaller than 2^32).
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// GD.Randi(); // Returns random integer between 0 and 2^32 - 1
+ /// GD.Randi() % 20; // Returns random integer between 0 and 19
+ /// GD.Randi() % 100; // Returns random integer between 0 and 99
+ /// GD.Randi() % 100 + 1; // Returns random integer between 1 and 100
+ /// </code>
+ /// </example>
+ /// <returns>A random <see langword="uint"/> number.</returns>
public static uint Randi()
{
return godot_icall_GD_randi();
}
+ /// <summary>
+ /// Randomizes the seed (or the internal state) of the random number generator.
+ /// Current implementation reseeds using a number based on time.
+ ///
+ /// Note: This method is called automatically when the project is run.
+ /// If you need to fix the seed to have reproducible results, use <see cref="Seed(ulong)"/>
+ /// to initialize the random number generator.
+ /// </summary>
public static void Randomize()
{
godot_icall_GD_randomize();
}
+ /// <summary>
+ /// Returns a random floating point value on the interval between <paramref name="from"/>
+ /// and <paramref name="to"/> (inclusive).
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// GD.PrintS(GD.RandRange(-10.0, 10.0), GD.RandRange(-10.0, 10.0)); // Prints e.g. -3.844535 7.45315
+ /// </code>
+ /// </example>
+ /// <returns>A random <see langword="double"/> number inside the given range.</returns>
public static double RandRange(double from, double to)
{
return godot_icall_GD_randf_range(from, to);
}
+ /// <summary>
+ /// Returns a random signed 32-bit integer between <paramref name="from"/>
+ /// and <paramref name="to"/> (inclusive). If <paramref name="to"/> is lesser than
+ /// <paramref name="from"/>, they are swapped.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// GD.Print(GD.RandRange(0, 1)); // Prints 0 or 1
+ /// GD.Print(GD.RandRange(-10, 1000)); // Prints any number from -10 to 1000
+ /// </code>
+ /// </example>
+ /// <returns>A random <see langword="int"/> number inside the given range.</returns>
public static int RandRange(int from, int to)
{
return godot_icall_GD_randi_range(from, to);
}
+ /// <summary>
+ /// Returns a random unsigned 32-bit integer, using the given <paramref name="seed"/>.
+ /// </summary>
+ /// <param name="seed">
+ /// Seed to use to generate the random number.
+ /// If a different seed is used, its value will be modfied.
+ /// </param>
+ /// <returns>A random <see langword="uint"/> number.</returns>
public static uint RandFromSeed(ref ulong seed)
{
return godot_icall_GD_rand_seed(seed, out seed);
}
+ /// <summary>
+ /// Returns a <see cref="IEnumerable{T}"/> that iterates from
+ /// <c>0</c> to <paramref name="end"/> in steps of <c>1</c>.
+ /// </summary>
+ /// <param name="end">The last index.</param>
public static IEnumerable<int> Range(int end)
{
return Range(0, end, 1);
}
+ /// <summary>
+ /// Returns a <see cref="IEnumerable{T}"/> that iterates from
+ /// <paramref name="start"/> to <paramref name="end"/> in steps of <c>1</c>.
+ /// </summary>
+ /// <param name="start">The first index.</param>
+ /// <param name="end">The last index.</param>
public static IEnumerable<int> Range(int start, int end)
{
return Range(start, end, 1);
}
+ /// <summary>
+ /// Returns a <see cref="IEnumerable{T}"/> that iterates from
+ /// <paramref name="start"/> to <paramref name="end"/> in steps of <paramref name="step"/>.
+ /// </summary>
+ /// <param name="start">The first index.</param>
+ /// <param name="end">The last index.</param>
+ /// <param name="step">The amount by which to increment the index on each iteration.</param>
public static IEnumerable<int> Range(int start, int end, int step)
{
if (end < start && step > 0)
@@ -163,109 +446,164 @@ namespace Godot
}
}
+ /// <summary>
+ /// Sets seed for the random number generator.
+ /// </summary>
+ /// <param name="seed">Seed that will be used.</param>
public static void Seed(ulong seed)
{
godot_icall_GD_seed(seed);
}
+ /// <summary>
+ /// Converts one or more arguments of any type to string in the best way possible.
+ /// </summary>
+ /// <param name="what">Arguments that will converted to string.</param>
+ /// <returns>The string formed by the given arguments.</returns>
public static string Str(params object[] what)
{
return godot_icall_GD_str(what);
}
+ /// <summary>
+ /// Converts a formatted string that was returned by <see cref="Var2Str(object)"/> to the original value.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// string a = "{\"a\": 1, \"b\": 2 }";
+ /// var b = (Godot.Collections.Dictionary)GD.Str2Var(a);
+ /// GD.Print(b["a"]); // Prints 1
+ /// </code>
+ /// </example>
+ /// <param name="str">String that will be converted to Variant.</param>
+ /// <returns>The decoded <c>Variant</c>.</returns>
public static object Str2Var(string str)
{
return godot_icall_GD_str2var(str);
}
+ /// <summary>
+ /// Returns whether the given class exists in <see cref="ClassDB"/>.
+ /// </summary>
+ /// <returns>If the class exists in <see cref="ClassDB"/>.</returns>
public static bool TypeExists(StringName type)
{
return godot_icall_GD_type_exists(StringName.GetPtr(type));
}
+ /// <summary>
+ /// Encodes a <c>Variant</c> value to a byte array.
+ /// If <paramref name="fullObjects"/> is <see langword="true"/> encoding objects is allowed
+ /// (and can potentially include code).
+ /// Deserialization can be done with <see cref="Bytes2Var(byte[], bool)"/>.
+ /// </summary>
+ /// <param name="var">Variant that will be encoded.</param>
+ /// <param name="fullObjects">If objects should be serialized.</param>
+ /// <returns>The <c>Variant</c> encoded as an array of bytes.</returns>
public static byte[] Var2Bytes(object var, bool fullObjects = false)
{
return godot_icall_GD_var2bytes(var, fullObjects);
}
+ /// <summary>
+ /// Converts a <c>Variant</c> <paramref name="var"/> to a formatted string that
+ /// can later be parsed using <see cref="Str2Var(string)"/>.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// var a = new Godot.Collections.Dictionary { ["a"] = 1, ["b"] = 2 };
+ /// GD.Print(GD.Var2Str(a));
+ /// // Prints
+ /// // {
+ /// // "a": 1,
+ /// // "b": 2
+ /// // }
+ /// </code>
+ /// </example>
+ /// <param name="var">Variant that will be converted to string.</param>
+ /// <returns>The <c>Variant</c> encoded as a string.</returns>
public static string Var2Str(object var)
{
return godot_icall_GD_var2str(var);
}
+ /// <summary>
+ /// Get the <see cref="Variant.Type"/> that corresponds for the given <see cref="Type"/>.
+ /// </summary>
+ /// <returns>The <see cref="Variant.Type"/> for the given <paramref name="type"/>.</returns>
public static Variant.Type TypeToVariantType(Type type)
{
return godot_icall_TypeToVariantType(type);
}
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static object godot_icall_GD_bytes2var(byte[] bytes, bool allowObjects);
+ internal static extern object godot_icall_GD_bytes2var(byte[] bytes, bool allowObjects);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static object godot_icall_GD_convert(object what, Variant.Type type);
+ internal static extern object godot_icall_GD_convert(object what, Variant.Type type);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static int godot_icall_GD_hash(object var);
+ internal static extern int godot_icall_GD_hash(object var);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static Object godot_icall_GD_instance_from_id(ulong instanceId);
+ internal static extern Object godot_icall_GD_instance_from_id(ulong instanceId);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_GD_print(object[] what);
+ internal static extern void godot_icall_GD_print(object[] what);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_GD_printerr(object[] what);
+ internal static extern void godot_icall_GD_printerr(object[] what);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_GD_printraw(object[] what);
+ internal static extern void godot_icall_GD_printraw(object[] what);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_GD_prints(object[] what);
+ internal static extern void godot_icall_GD_prints(object[] what);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_GD_printt(object[] what);
+ internal static extern void godot_icall_GD_printt(object[] what);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static float godot_icall_GD_randf();
+ internal static extern float godot_icall_GD_randf();
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static uint godot_icall_GD_randi();
+ internal static extern uint godot_icall_GD_randi();
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_GD_randomize();
+ internal static extern void godot_icall_GD_randomize();
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static double godot_icall_GD_randf_range(double from, double to);
+ internal static extern double godot_icall_GD_randf_range(double from, double to);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static int godot_icall_GD_randi_range(int from, int to);
+ internal static extern int godot_icall_GD_randi_range(int from, int to);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static uint godot_icall_GD_rand_seed(ulong seed, out ulong newSeed);
+ internal static extern uint godot_icall_GD_rand_seed(ulong seed, out ulong newSeed);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_GD_seed(ulong seed);
+ internal static extern void godot_icall_GD_seed(ulong seed);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static string godot_icall_GD_str(object[] what);
+ internal static extern string godot_icall_GD_str(object[] what);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static object godot_icall_GD_str2var(string str);
+ internal static extern object godot_icall_GD_str2var(string str);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static bool godot_icall_GD_type_exists(IntPtr type);
+ internal static extern bool godot_icall_GD_type_exists(IntPtr type);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static byte[] godot_icall_GD_var2bytes(object what, bool fullObjects);
+ internal static extern byte[] godot_icall_GD_var2bytes(object what, bool fullObjects);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static string godot_icall_GD_var2str(object var);
+ internal static extern string godot_icall_GD_var2str(object var);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_GD_pusherror(string type);
+ internal static extern void godot_icall_GD_pusherror(string type);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_GD_pushwarning(string type);
+ internal static extern void godot_icall_GD_pushwarning(string type);
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern Variant.Type godot_icall_TypeToVariantType(Type type);
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/GodotSynchronizationContext.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/GodotSynchronizationContext.cs
index 4b5e3f8761..c01c926e82 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/GodotSynchronizationContext.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/GodotSynchronizationContext.cs
@@ -6,7 +6,8 @@ namespace Godot
{
public class GodotSynchronizationContext : SynchronizationContext
{
- private readonly BlockingCollection<KeyValuePair<SendOrPostCallback, object>> _queue = new BlockingCollection<KeyValuePair<SendOrPostCallback, object>>();
+ private readonly BlockingCollection<KeyValuePair<SendOrPostCallback, object>> _queue =
+ new BlockingCollection<KeyValuePair<SendOrPostCallback, object>>();
public override void Post(SendOrPostCallback d, object state)
{
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/GodotTraceListener.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/GodotTraceListener.cs
index a566b53659..9ccac1faaf 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/GodotTraceListener.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/GodotTraceListener.cs
@@ -24,7 +24,7 @@ namespace Godot
try
{
- var stackTrace = new StackTrace(true).ToString();
+ string stackTrace = new StackTrace(true).ToString();
GD.PrintErr(stackTrace);
}
catch
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/MarshalUtils.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/MarshalUtils.cs
index f508211f68..3051bcedc7 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/MarshalUtils.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/MarshalUtils.cs
@@ -3,60 +3,135 @@ using System.Collections.Generic;
namespace Godot
{
- static class MarshalUtils
+ internal static class MarshalUtils
{
/// <summary>
/// Returns <see langword="true"/> if the generic type definition of <paramref name="type"/>
- /// is <see cref="Godot.Collections.Array{T}"/>; otherwise returns <see langword="false"/>.
+ /// is <see cref="Collections.Array{T}"/>; otherwise returns <see langword="false"/>.
/// </summary>
- /// <exception cref="System.InvalidOperationException">
- /// <paramref name="type"/> is not a generic type. That is, IsGenericType returns false.
+ /// <exception cref="InvalidOperationException">
+ /// Thrown when the given <paramref name="type"/> is not a generic type.
+ /// That is, <see cref="Type.IsGenericType"/> returns <see langword="false"/>.
/// </exception>
- static bool TypeIsGenericArray(Type type) =>
- type.GetGenericTypeDefinition() == typeof(Godot.Collections.Array<>);
+ private static bool TypeIsGenericArray(Type type) =>
+ type.GetGenericTypeDefinition() == typeof(Collections.Array<>);
/// <summary>
/// Returns <see langword="true"/> if the generic type definition of <paramref name="type"/>
- /// is <see cref="Godot.Collections.Dictionary{TKey, TValue}"/>; otherwise returns <see langword="false"/>.
+ /// is <see cref="Collections.Dictionary{TKey, TValue}"/>; otherwise returns <see langword="false"/>.
/// </summary>
- /// <exception cref="System.InvalidOperationException">
- /// <paramref name="type"/> is not a generic type. That is, IsGenericType returns false.
+ /// <exception cref="InvalidOperationException">
+ /// Thrown when the given <paramref name="type"/> is not a generic type.
+ /// That is, <see cref="Type.IsGenericType"/> returns <see langword="false"/>.
/// </exception>
- static bool TypeIsGenericDictionary(Type type) =>
- type.GetGenericTypeDefinition() == typeof(Godot.Collections.Dictionary<,>);
+ private static bool TypeIsGenericDictionary(Type type) =>
+ type.GetGenericTypeDefinition() == typeof(Collections.Dictionary<,>);
- static bool TypeIsSystemGenericList(Type type) =>
- type.GetGenericTypeDefinition() == typeof(System.Collections.Generic.List<>);
+ /// <summary>
+ /// Returns <see langword="true"/> if the generic type definition of <paramref name="type"/>
+ /// is <see cref="List{T}"/>; otherwise returns <see langword="false"/>.
+ /// </summary>
+ /// <exception cref="InvalidOperationException">
+ /// Thrown when the given <paramref name="type"/> is not a generic type.
+ /// That is, <see cref="Type.IsGenericType"/> returns <see langword="false"/>.
+ /// </exception>
+ private static bool TypeIsSystemGenericList(Type type) =>
+ type.GetGenericTypeDefinition() == typeof(List<>);
- static bool TypeIsSystemGenericDictionary(Type type) =>
- type.GetGenericTypeDefinition() == typeof(System.Collections.Generic.Dictionary<,>);
+ /// <summary>
+ /// Returns <see langword="true"/> if the generic type definition of <paramref name="type"/>
+ /// is <see cref="Dictionary{TKey, TValue}"/>; otherwise returns <see langword="false"/>.
+ /// </summary>
+ /// <exception cref="InvalidOperationException">
+ /// Thrown when the given <paramref name="type"/> is not a generic type.
+ /// That is, <see cref="Type.IsGenericType"/> returns <see langword="false"/>.
+ /// </exception>
+ private static bool TypeIsSystemGenericDictionary(Type type) =>
+ type.GetGenericTypeDefinition() == typeof(Dictionary<,>);
- static bool TypeIsGenericIEnumerable(Type type) => type.GetGenericTypeDefinition() == typeof(IEnumerable<>);
+ /// <summary>
+ /// Returns <see langword="true"/> if the generic type definition of <paramref name="type"/>
+ /// is <see cref="IEnumerable{T}"/>; otherwise returns <see langword="false"/>.
+ /// </summary>
+ /// <exception cref="InvalidOperationException">
+ /// Thrown when the given <paramref name="type"/> is not a generic type.
+ /// That is, <see cref="Type.IsGenericType"/> returns <see langword="false"/>.
+ /// </exception>
+ private static bool TypeIsGenericIEnumerable(Type type) => type.GetGenericTypeDefinition() == typeof(IEnumerable<>);
- static bool TypeIsGenericICollection(Type type) => type.GetGenericTypeDefinition() == typeof(ICollection<>);
+ /// <summary>
+ /// Returns <see langword="true"/> if the generic type definition of <paramref name="type"/>
+ /// is <see cref="ICollection{T}"/>; otherwise returns <see langword="false"/>.
+ /// </summary>
+ /// <exception cref="InvalidOperationException">
+ /// Thrown when the given <paramref name="type"/> is not a generic type.
+ /// That is, <see cref="Type.IsGenericType"/> returns <see langword="false"/>.
+ /// </exception>
+ private static bool TypeIsGenericICollection(Type type) => type.GetGenericTypeDefinition() == typeof(ICollection<>);
- static bool TypeIsGenericIDictionary(Type type) => type.GetGenericTypeDefinition() == typeof(IDictionary<,>);
+ /// <summary>
+ /// Returns <see langword="true"/> if the generic type definition of <paramref name="type"/>
+ /// is <see cref="IDictionary{TKey, TValue}"/>; otherwise returns <see langword="false"/>.
+ /// </summary>
+ /// <exception cref="InvalidOperationException">
+ /// Thrown when the given <paramref name="type"/> is not a generic type.
+ /// That is, <see cref="Type.IsGenericType"/> returns <see langword="false"/>.
+ /// </exception>
+ private static bool TypeIsGenericIDictionary(Type type) => type.GetGenericTypeDefinition() == typeof(IDictionary<,>);
- static void ArrayGetElementType(Type arrayType, out Type elementType)
+ /// <summary>
+ /// Gets the element type for the given <paramref name="arrayType"/>.
+ /// </summary>
+ /// <param name="arrayType">Type for the generic array.</param>
+ /// <param name="elementType">Element type for the generic array.</param>
+ /// <exception cref="InvalidOperationException">
+ /// Thrown when the given <paramref name="arrayType"/> is not a generic type.
+ /// That is, <see cref="Type.IsGenericType"/> returns <see langword="false"/>.
+ /// </exception>
+ private static void ArrayGetElementType(Type arrayType, out Type elementType)
{
elementType = arrayType.GetGenericArguments()[0];
}
- static void DictionaryGetKeyValueTypes(Type dictionaryType, out Type keyType, out Type valueType)
+ /// <summary>
+ /// Gets the key type and the value type for the given <paramref name="dictionaryType"/>.
+ /// </summary>
+ /// <param name="dictionaryType">The type for the generic dictionary.</param>
+ /// <param name="keyType">Key type for the generic dictionary.</param>
+ /// <param name="valueType">Value type for the generic dictionary.</param>
+ /// <exception cref="InvalidOperationException">
+ /// Thrown when the given <paramref name="dictionaryType"/> is not a generic type.
+ /// That is, <see cref="Type.IsGenericType"/> returns <see langword="false"/>.
+ /// </exception>
+ private static void DictionaryGetKeyValueTypes(Type dictionaryType, out Type keyType, out Type valueType)
{
var genericArgs = dictionaryType.GetGenericArguments();
keyType = genericArgs[0];
valueType = genericArgs[1];
}
- static Type MakeGenericArrayType(Type elemType)
+ /// <summary>
+ /// Constructs a new <see cref="Type"/> from <see cref="Collections.Array{T}"/>
+ /// where the generic type for the elements is <paramref name="elemType"/>.
+ /// </summary>
+ /// <param name="elemType">Element type for the array.</param>
+ /// <returns>The generic array type with the specified element type.</returns>
+ private static Type MakeGenericArrayType(Type elemType)
{
- return typeof(Godot.Collections.Array<>).MakeGenericType(elemType);
+ return typeof(Collections.Array<>).MakeGenericType(elemType);
}
- static Type MakeGenericDictionaryType(Type keyType, Type valueType)
+ /// <summary>
+ /// Constructs a new <see cref="Type"/> from <see cref="Collections.Dictionary{TKey, TValue}"/>
+ /// where the generic type for the keys is <paramref name="keyType"/> and
+ /// for the values is <paramref name="valueType"/>.
+ /// </summary>
+ /// <param name="keyType">Key type for the dictionary.</param>
+ /// <param name="valueType">Key type for the dictionary.</param>
+ /// <returns>The generic dictionary type with the specified key and value types.</returns>
+ private static Type MakeGenericDictionaryType(Type keyType, Type valueType)
{
- return typeof(Godot.Collections.Dictionary<,>).MakeGenericType(keyType, valueType);
+ return typeof(Collections.Dictionary<,>).MakeGenericType(keyType, valueType);
}
}
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs
index 213f84ad73..6f7fac7429 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs
@@ -7,6 +7,9 @@ using System;
namespace Godot
{
+ /// <summary>
+ /// Provides constants and static methods for common mathematical functions.
+ /// </summary>
public static partial class Mathf
{
// Define constants with Decimal precision and cast down to double or float.
@@ -19,121 +22,120 @@ namespace Godot
/// <summary>
/// Constant that represents how many times the diameter of a circle
- /// fits around its perimeter. This is equivalent to `Mathf.Tau / 2`.
+ /// fits around its perimeter. This is equivalent to <c>Mathf.Tau / 2</c>.
/// </summary>
// 3.1415927f and 3.14159265358979
public const real_t Pi = (real_t)3.1415926535897932384626433833M;
/// <summary>
- /// Positive infinity. For negative infinity, use `-Mathf.Inf`.
+ /// Positive infinity. For negative infinity, use <c>-Mathf.Inf</c>.
/// </summary>
public const real_t Inf = real_t.PositiveInfinity;
/// <summary>
- /// "Not a Number", an invalid value. `NaN` has special properties, including
+ /// "Not a Number", an invalid value. <c>NaN</c> has special properties, including
/// that it is not equal to itself. It is output by some invalid operations,
/// such as dividing zero by zero.
/// </summary>
public const real_t NaN = real_t.NaN;
// 0.0174532924f and 0.0174532925199433
- private const real_t Deg2RadConst = (real_t)0.0174532925199432957692369077M;
+ private const real_t _deg2RadConst = (real_t)0.0174532925199432957692369077M;
// 57.29578f and 57.2957795130823
- private const real_t Rad2DegConst = (real_t)57.295779513082320876798154814M;
+ private const real_t _rad2DegConst = (real_t)57.295779513082320876798154814M;
/// <summary>
- /// Returns the absolute value of `s` (i.e. positive value).
+ /// Returns the absolute value of <paramref name="s"/> (i.e. positive value).
/// </summary>
/// <param name="s">The input number.</param>
- /// <returns>The absolute value of `s`.</returns>
+ /// <returns>The absolute value of <paramref name="s"/>.</returns>
public static int Abs(int s)
{
return Math.Abs(s);
}
/// <summary>
- /// Returns the absolute value of `s` (i.e. positive value).
+ /// Returns the absolute value of <paramref name="s"/> (i.e. positive value).
/// </summary>
/// <param name="s">The input number.</param>
- /// <returns>The absolute value of `s`.</returns>
+ /// <returns>The absolute value of <paramref name="s"/>.</returns>
public static real_t Abs(real_t s)
{
return Math.Abs(s);
}
/// <summary>
- /// Returns the arc cosine of `s` in radians. Use to get the angle of cosine s.
+ /// Returns the arc cosine of <paramref name="s"/> in radians.
+ /// Use to get the angle of cosine <paramref name="s"/>.
/// </summary>
/// <param name="s">The input cosine value. Must be on the range of -1.0 to 1.0.</param>
- /// <returns>An angle that would result in the given cosine value. On the range `0` to `Tau/2`.</returns>
+ /// <returns>
+ /// An angle that would result in the given cosine value. On the range <c>0</c> to <c>Tau/2</c>.
+ /// </returns>
public static real_t Acos(real_t s)
{
return (real_t)Math.Acos(s);
}
/// <summary>
- /// Returns the arc sine of `s` in radians. Use to get the angle of sine s.
+ /// Returns the arc sine of <paramref name="s"/> in radians.
+ /// Use to get the angle of sine <paramref name="s"/>.
/// </summary>
/// <param name="s">The input sine value. Must be on the range of -1.0 to 1.0.</param>
- /// <returns>An angle that would result in the given sine value. On the range `-Tau/4` to `Tau/4`.</returns>
+ /// <returns>
+ /// An angle that would result in the given sine value. On the range <c>-Tau/4</c> to <c>Tau/4</c>.
+ /// </returns>
public static real_t Asin(real_t s)
{
return (real_t)Math.Asin(s);
}
/// <summary>
- /// Returns the arc tangent of `s` in radians. Use to get the angle of tangent s.
+ /// Returns the arc tangent of <paramref name="s"/> in radians.
+ /// Use to get the angle of tangent <paramref name="s"/>.
///
/// The method cannot know in which quadrant the angle should fall.
- /// See <see cref="Atan2(real_t, real_t)"/> if you have both `y` and `x`.
+ /// See <see cref="Atan2(real_t, real_t)"/> if you have both <c>y</c> and <c>x</c>.
/// </summary>
/// <param name="s">The input tangent value.</param>
- /// <returns>An angle that would result in the given tangent value. On the range `-Tau/4` to `Tau/4`.</returns>
+ /// <returns>
+ /// An angle that would result in the given tangent value. On the range <c>-Tau/4</c> to <c>Tau/4</c>.
+ /// </returns>
public static real_t Atan(real_t s)
{
return (real_t)Math.Atan(s);
}
/// <summary>
- /// Returns the arc tangent of `y` and `x` in radians. Use to get the angle
- /// of the tangent of `y/x`. To compute the value, the method takes into
+ /// Returns the arc tangent of <paramref name="y"/> and <paramref name="x"/> in radians.
+ /// Use to get the angle of the tangent of <c>y/x</c>. To compute the value, the method takes into
/// account the sign of both arguments in order to determine the quadrant.
///
/// Important note: The Y coordinate comes first, by convention.
/// </summary>
/// <param name="y">The Y coordinate of the point to find the angle to.</param>
/// <param name="x">The X coordinate of the point to find the angle to.</param>
- /// <returns>An angle that would result in the given tangent value. On the range `-Tau/2` to `Tau/2`.</returns>
+ /// <returns>
+ /// An angle that would result in the given tangent value. On the range <c>-Tau/2</c> to <c>Tau/2</c>.
+ /// </returns>
public static real_t Atan2(real_t y, real_t x)
{
return (real_t)Math.Atan2(y, x);
}
/// <summary>
- /// Converts a 2D point expressed in the cartesian coordinate
- /// system (X and Y axis) to the polar coordinate system
- /// (a distance from the origin and an angle).
- /// </summary>
- /// <param name="x">The input X coordinate.</param>
- /// <param name="y">The input Y coordinate.</param>
- /// <returns>A <see cref="Vector2"/> with X representing the distance and Y representing the angle.</returns>
- public static Vector2 Cartesian2Polar(real_t x, real_t y)
- {
- return new Vector2(Sqrt(x * x + y * y), Atan2(y, x));
- }
-
- /// <summary>
- /// Rounds `s` upward (towards positive infinity).
+ /// Rounds <paramref name="s"/> upward (towards positive infinity).
/// </summary>
/// <param name="s">The number to ceil.</param>
- /// <returns>The smallest whole number that is not less than `s`.</returns>
+ /// <returns>The smallest whole number that is not less than <paramref name="s"/>.</returns>
public static real_t Ceil(real_t s)
{
return (real_t)Math.Ceiling(s);
}
/// <summary>
- /// Clamps a `value` so that it is not less than `min` and not more than `max`.
+ /// Clamps a <paramref name="value"/> so that it is not less than <paramref name="min"/>
+ /// and not more than <paramref name="max"/>.
/// </summary>
/// <param name="value">The value to clamp.</param>
/// <param name="min">The minimum allowed value.</param>
@@ -145,7 +147,8 @@ namespace Godot
}
/// <summary>
- /// Clamps a `value` so that it is not less than `min` and not more than `max`.
+ /// Clamps a <paramref name="value"/> so that it is not less than <paramref name="min"/>
+ /// and not more than <paramref name="max"/>.
/// </summary>
/// <param name="value">The value to clamp.</param>
/// <param name="min">The minimum allowed value.</param>
@@ -157,7 +160,7 @@ namespace Godot
}
/// <summary>
- /// Returns the cosine of angle `s` in radians.
+ /// Returns the cosine of angle <paramref name="s"/> in radians.
/// </summary>
/// <param name="s">The angle in radians.</param>
/// <returns>The cosine of that angle.</returns>
@@ -167,7 +170,7 @@ namespace Godot
}
/// <summary>
- /// Returns the hyperbolic cosine of angle `s` in radians.
+ /// Returns the hyperbolic cosine of angle <paramref name="s"/> in radians.
/// </summary>
/// <param name="s">The angle in radians.</param>
/// <returns>The hyperbolic cosine of that angle.</returns>
@@ -183,16 +186,18 @@ namespace Godot
/// <returns>The same angle expressed in radians.</returns>
public static real_t Deg2Rad(real_t deg)
{
- return deg * Deg2RadConst;
+ return deg * _deg2RadConst;
}
/// <summary>
- /// Easing function, based on exponent. The curve values are:
- /// `0` is constant, `1` is linear, `0` to `1` is ease-in, `1` or more is ease-out.
+ /// Easing function, based on exponent. The <paramref name="curve"/> values are:
+ /// <c>0</c> is constant, <c>1</c> is linear, <c>0</c> to <c>1</c> is ease-in, <c>1</c> or more is ease-out.
/// Negative values are in-out/out-in.
/// </summary>
/// <param name="s">The value to ease.</param>
- /// <param name="curve">`0` is constant, `1` is linear, `0` to `1` is ease-in, `1` or more is ease-out.</param>
+ /// <param name="curve">
+ /// <c>0</c> is constant, <c>1</c> is linear, <c>0</c> to <c>1</c> is ease-in, <c>1</c> or more is ease-out.
+ /// </param>
/// <returns>The eased value.</returns>
public static real_t Ease(real_t s, real_t curve)
{
@@ -222,7 +227,7 @@ namespace Godot
return Pow(s * 2.0f, -curve) * 0.5f;
}
- return (1.0f - Pow(1.0f - (s - 0.5f) * 2.0f, -curve)) * 0.5f + 0.5f;
+ return ((1.0f - Pow(1.0f - ((s - 0.5f) * 2.0f), -curve)) * 0.5f) + 0.5f;
}
return 0f;
@@ -230,20 +235,20 @@ namespace Godot
/// <summary>
/// The natural exponential function. It raises the mathematical
- /// constant `e` to the power of `s` and returns it.
+ /// constant <c>e</c> to the power of <paramref name="s"/> and returns it.
/// </summary>
- /// <param name="s">The exponent to raise `e` to.</param>
- /// <returns>`e` raised to the power of `s`.</returns>
+ /// <param name="s">The exponent to raise <c>e</c> to.</param>
+ /// <returns><c>e</c> raised to the power of <paramref name="s"/>.</returns>
public static real_t Exp(real_t s)
{
return (real_t)Math.Exp(s);
}
/// <summary>
- /// Rounds `s` downward (towards negative infinity).
+ /// Rounds <paramref name="s"/> downward (towards negative infinity).
/// </summary>
/// <param name="s">The number to floor.</param>
- /// <returns>The largest whole number that is not more than `s`.</returns>
+ /// <returns>The largest whole number that is not more than <paramref name="s"/>.</returns>
public static real_t Floor(real_t s)
{
return (real_t)Math.Floor(s);
@@ -263,12 +268,13 @@ namespace Godot
}
/// <summary>
- /// Returns true if `a` and `b` are approximately equal to each other.
+ /// Returns <see langword="true"/> if <paramref name="a"/> and <paramref name="b"/> are approximately equal
+ /// to each other.
/// The comparison is done using a tolerance calculation with <see cref="Epsilon"/>.
/// </summary>
/// <param name="a">One of the values.</param>
/// <param name="b">The other value.</param>
- /// <returns>A bool for whether or not the two values are approximately equal.</returns>
+ /// <returns>A <see langword="bool"/> for whether or not the two values are approximately equal.</returns>
public static bool IsEqualApprox(real_t a, real_t b)
{
// Check for exact equality first, required to handle "infinity" values.
@@ -286,33 +292,33 @@ namespace Godot
}
/// <summary>
- /// Returns whether `s` is an infinity value (either positive infinity or negative infinity).
+ /// Returns whether <paramref name="s"/> is an infinity value (either positive infinity or negative infinity).
/// </summary>
/// <param name="s">The value to check.</param>
- /// <returns>A bool for whether or not the value is an infinity value.</returns>
+ /// <returns>A <see langword="bool"/> for whether or not the value is an infinity value.</returns>
public static bool IsInf(real_t s)
{
return real_t.IsInfinity(s);
}
/// <summary>
- /// Returns whether `s` is a `NaN` ("Not a Number" or invalid) value.
+ /// Returns whether <paramref name="s"/> is a <c>NaN</c> ("Not a Number" or invalid) value.
/// </summary>
/// <param name="s">The value to check.</param>
- /// <returns>A bool for whether or not the value is a `NaN` value.</returns>
+ /// <returns>A <see langword="bool"/> for whether or not the value is a <c>NaN</c> value.</returns>
public static bool IsNaN(real_t s)
{
return real_t.IsNaN(s);
}
/// <summary>
- /// Returns true if `s` is approximately zero.
+ /// Returns <see langword="true"/> if <paramref name="s"/> is approximately zero.
/// The comparison is done using a tolerance calculation with <see cref="Epsilon"/>.
///
/// This method is faster than using <see cref="IsEqualApprox(real_t, real_t)"/> with one value as zero.
/// </summary>
/// <param name="s">The value to check.</param>
- /// <returns>A bool for whether or not the value is nearly zero.</returns>
+ /// <returns>A <see langword="bool"/> for whether or not the value is nearly zero.</returns>
public static bool IsZeroApprox(real_t s)
{
return Abs(s) < Epsilon;
@@ -328,7 +334,7 @@ namespace Godot
/// <returns>The resulting value of the interpolation.</returns>
public static real_t Lerp(real_t from, real_t to, real_t weight)
{
- return from + (to - from) * weight;
+ return from + ((to - from) * weight);
}
/// <summary>
@@ -345,7 +351,7 @@ namespace Godot
{
real_t difference = (to - from) % Mathf.Tau;
real_t distance = ((2 * difference) % Mathf.Tau) - difference;
- return from + distance * weight;
+ return from + (distance * weight);
}
/// <summary>
@@ -354,7 +360,7 @@ namespace Godot
/// Note: This is not the same as the "log" function on most calculators, which uses a base 10 logarithm.
/// </summary>
/// <param name="s">The input value.</param>
- /// <returns>The natural log of `s`.</returns>
+ /// <returns>The natural log of <paramref name="s"/>.</returns>
public static real_t Log(real_t s)
{
return (real_t)Math.Log(s);
@@ -405,9 +411,9 @@ namespace Godot
}
/// <summary>
- /// Moves `from` toward `to` by the `delta` value.
+ /// Moves <paramref name="from"/> toward <paramref name="to"/> by the <paramref name="delta"/> value.
///
- /// Use a negative delta value to move away.
+ /// Use a negative <paramref name="delta"/> value to move away.
/// </summary>
/// <param name="from">The start value.</param>
/// <param name="to">The value to move towards.</param>
@@ -415,11 +421,14 @@ namespace Godot
/// <returns>The value after moving.</returns>
public static real_t MoveToward(real_t from, real_t to, real_t delta)
{
- return Abs(to - from) <= delta ? to : from + Sign(to - from) * delta;
+ if (Abs(to - from) <= delta)
+ return to;
+
+ return from + (Sign(to - from) * delta);
}
/// <summary>
- /// Returns the nearest larger power of 2 for the integer `value`.
+ /// Returns the nearest larger power of 2 for the integer <paramref name="value"/>.
/// </summary>
/// <param name="value">The input value.</param>
/// <returns>The nearest larger power of 2.</returns>
@@ -436,23 +445,10 @@ namespace Godot
}
/// <summary>
- /// Converts a 2D point expressed in the polar coordinate
- /// system (a distance from the origin `r` and an angle `th`)
- /// to the cartesian coordinate system (X and Y axis).
- /// </summary>
- /// <param name="r">The distance from the origin.</param>
- /// <param name="th">The angle of the point.</param>
- /// <returns>A <see cref="Vector2"/> representing the cartesian coordinate.</returns>
- public static Vector2 Polar2Cartesian(real_t r, real_t th)
- {
- return new Vector2(r * Cos(th), r * Sin(th));
- }
-
- /// <summary>
- /// Performs a canonical Modulus operation, where the output is on the range `[0, b)`.
+ /// Performs a canonical Modulus operation, where the output is on the range [0, <paramref name="b"/>).
/// </summary>
/// <param name="a">The dividend, the primary input.</param>
- /// <param name="b">The divisor. The output is on the range `[0, b)`.</param>
+ /// <param name="b">The divisor. The output is on the range [0, <paramref name="b"/>).</param>
/// <returns>The resulting output.</returns>
public static int PosMod(int a, int b)
{
@@ -465,10 +461,10 @@ namespace Godot
}
/// <summary>
- /// Performs a canonical Modulus operation, where the output is on the range `[0, b)`.
+ /// Performs a canonical Modulus operation, where the output is on the range [0, <paramref name="b"/>).
/// </summary>
/// <param name="a">The dividend, the primary input.</param>
- /// <param name="b">The divisor. The output is on the range `[0, b)`.</param>
+ /// <param name="b">The divisor. The output is on the range [0, <paramref name="b"/>).</param>
/// <returns>The resulting output.</returns>
public static real_t PosMod(real_t a, real_t b)
{
@@ -481,11 +477,11 @@ namespace Godot
}
/// <summary>
- /// Returns the result of `x` raised to the power of `y`.
+ /// Returns the result of <paramref name="x"/> raised to the power of <paramref name="y"/>.
/// </summary>
/// <param name="x">The base.</param>
/// <param name="y">The exponent.</param>
- /// <returns>`x` raised to the power of `y`.</returns>
+ /// <returns><paramref name="x"/> raised to the power of <paramref name="y"/>.</returns>
public static real_t Pow(real_t x, real_t y)
{
return (real_t)Math.Pow(x, y);
@@ -498,11 +494,11 @@ namespace Godot
/// <returns>The same angle expressed in degrees.</returns>
public static real_t Rad2Deg(real_t rad)
{
- return rad * Rad2DegConst;
+ return rad * _rad2DegConst;
}
/// <summary>
- /// Rounds `s` to the nearest whole number,
+ /// Rounds <paramref name="s"/> to the nearest whole number,
/// with halfway cases rounded towards the nearest multiple of two.
/// </summary>
/// <param name="s">The number to round.</param>
@@ -513,10 +509,11 @@ namespace Godot
}
/// <summary>
- /// Returns the sign of `s`: `-1` or `1`. Returns `0` if `s` is `0`.
+ /// Returns the sign of <paramref name="s"/>: <c>-1</c> or <c>1</c>.
+ /// Returns <c>0</c> if <paramref name="s"/> is <c>0</c>.
/// </summary>
/// <param name="s">The input number.</param>
- /// <returns>One of three possible values: `1`, `-1`, or `0`.</returns>
+ /// <returns>One of three possible values: <c>1</c>, <c>-1</c>, or <c>0</c>.</returns>
public static int Sign(int s)
{
if (s == 0)
@@ -525,10 +522,11 @@ namespace Godot
}
/// <summary>
- /// Returns the sign of `s`: `-1` or `1`. Returns `0` if `s` is `0`.
+ /// Returns the sign of <paramref name="s"/>: <c>-1</c> or <c>1</c>.
+ /// Returns <c>0</c> if <paramref name="s"/> is <c>0</c>.
/// </summary>
/// <param name="s">The input number.</param>
- /// <returns>One of three possible values: `1`, `-1`, or `0`.</returns>
+ /// <returns>One of three possible values: <c>1</c>, <c>-1</c>, or <c>0</c>.</returns>
public static int Sign(real_t s)
{
if (s == 0)
@@ -537,7 +535,7 @@ namespace Godot
}
/// <summary>
- /// Returns the sine of angle `s` in radians.
+ /// Returns the sine of angle <paramref name="s"/> in radians.
/// </summary>
/// <param name="s">The angle in radians.</param>
/// <returns>The sine of that angle.</returns>
@@ -547,7 +545,7 @@ namespace Godot
}
/// <summary>
- /// Returns the hyperbolic sine of angle `s` in radians.
+ /// Returns the hyperbolic sine of angle <paramref name="s"/> in radians.
/// </summary>
/// <param name="s">The angle in radians.</param>
/// <returns>The hyperbolic sine of that angle.</returns>
@@ -557,8 +555,8 @@ namespace Godot
}
/// <summary>
- /// Returns a number smoothly interpolated between `from` and `to`,
- /// based on the `weight`. Similar to <see cref="Lerp(real_t, real_t, real_t)"/>,
+ /// Returns a number smoothly interpolated between <paramref name="from"/> and <paramref name="to"/>,
+ /// based on the <paramref name="weight"/>. Similar to <see cref="Lerp(real_t, real_t, real_t)"/>,
/// but interpolates faster at the beginning and slower at the end.
/// </summary>
/// <param name="from">The start value for interpolation.</param>
@@ -572,16 +570,16 @@ namespace Godot
return from;
}
real_t x = Clamp((weight - from) / (to - from), (real_t)0.0, (real_t)1.0);
- return x * x * (3 - 2 * x);
+ return x * x * (3 - (2 * x));
}
/// <summary>
- /// Returns the square root of `s`, where `s` is a non-negative number.
+ /// Returns the square root of <paramref name="s"/>, where <paramref name="s"/> is a non-negative number.
///
- /// If you need negative inputs, use `System.Numerics.Complex`.
+ /// If you need negative inputs, use <see cref="System.Numerics.Complex"/>.
/// </summary>
/// <param name="s">The input number. Must not be negative.</param>
- /// <returns>The square root of `s`.</returns>
+ /// <returns>The square root of <paramref name="s"/>.</returns>
public static real_t Sqrt(real_t s)
{
return (real_t)Math.Sqrt(s);
@@ -596,7 +594,8 @@ namespace Godot
/// <returns>The position of the first non-zero digit.</returns>
public static int StepDecimals(real_t step)
{
- double[] sd = new double[] {
+ double[] sd = new double[]
+ {
0.9999,
0.09999,
0.009999,
@@ -607,7 +606,7 @@ namespace Godot
0.00000009999,
0.000000009999,
};
- double abs = Mathf.Abs(step);
+ double abs = Abs(step);
double decs = abs - (int)abs; // Strip away integer part
for (int i = 0; i < sd.Length; i++)
{
@@ -620,9 +619,8 @@ namespace Godot
}
/// <summary>
- /// Snaps float value `s` to a given `step`.
- /// This can also be used to round a floating point
- /// number to an arbitrary number of decimals.
+ /// Snaps float value <paramref name="s"/> to a given <paramref name="step"/>.
+ /// This can also be used to round a floating point number to an arbitrary number of decimals.
/// </summary>
/// <param name="s">The value to snap.</param>
/// <param name="step">The step size to snap to.</param>
@@ -631,14 +629,14 @@ namespace Godot
{
if (step != 0f)
{
- return Floor(s / step + 0.5f) * step;
+ return Floor((s / step) + 0.5f) * step;
}
return s;
}
/// <summary>
- /// Returns the tangent of angle `s` in radians.
+ /// Returns the tangent of angle <paramref name="s"/> in radians.
/// </summary>
/// <param name="s">The angle in radians.</param>
/// <returns>The tangent of that angle.</returns>
@@ -648,7 +646,7 @@ namespace Godot
}
/// <summary>
- /// Returns the hyperbolic tangent of angle `s` in radians.
+ /// Returns the hyperbolic tangent of angle <paramref name="s"/> in radians.
/// </summary>
/// <param name="s">The angle in radians.</param>
/// <returns>The hyperbolic tangent of that angle.</returns>
@@ -658,8 +656,9 @@ namespace Godot
}
/// <summary>
- /// Wraps `value` between `min` and `max`. Usable for creating loop-alike
- /// behavior or infinite surfaces. If `min` is `0`, this is equivalent
+ /// Wraps <paramref name="value"/> between <paramref name="min"/> and <paramref name="max"/>.
+ /// Usable for creating loop-alike behavior or infinite surfaces.
+ /// If <paramref name="min"/> is <c>0</c>, this is equivalent
/// to <see cref="PosMod(int, int)"/>, so prefer using that instead.
/// </summary>
/// <param name="value">The value to wrap.</param>
@@ -669,12 +668,16 @@ namespace Godot
public static int Wrap(int value, int min, int max)
{
int range = max - min;
- return range == 0 ? min : min + ((value - min) % range + range) % range;
+ if (range == 0)
+ return min;
+
+ return min + ((((value - min) % range) + range) % range);
}
/// <summary>
- /// Wraps `value` between `min` and `max`. Usable for creating loop-alike
- /// behavior or infinite surfaces. If `min` is `0`, this is equivalent
+ /// Wraps <paramref name="value"/> between <paramref name="min"/> and <paramref name="max"/>.
+ /// Usable for creating loop-alike behavior or infinite surfaces.
+ /// If <paramref name="min"/> is <c>0</c>, this is equivalent
/// to <see cref="PosMod(real_t, real_t)"/>, so prefer using that instead.
/// </summary>
/// <param name="value">The value to wrap.</param>
@@ -684,7 +687,11 @@ namespace Godot
public static real_t Wrap(real_t value, real_t min, real_t max)
{
real_t range = max - min;
- return IsZeroApprox(range) ? min : min + ((value - min) % range + range) % range;
+ if (IsZeroApprox(range))
+ {
+ return min;
+ }
+ return min + ((((value - min) % range) + range) % range);
}
}
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/MathfEx.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/MathfEx.cs
index 0888e33090..9bb73ce7dd 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/MathfEx.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/MathfEx.cs
@@ -12,7 +12,7 @@ namespace Godot
// Define constants with Decimal precision and cast down to double or float.
/// <summary>
- /// The natural number `e`.
+ /// The natural number <c>e</c>.
/// </summary>
public const real_t E = (real_t)2.7182818284590452353602874714M; // 2.7182817f and 2.718281828459045
@@ -23,7 +23,7 @@ namespace Godot
/// <summary>
/// A very small number used for float comparison with error tolerance.
- /// 1e-06 with single-precision floats, but 1e-14 if `REAL_T_IS_DOUBLE`.
+ /// 1e-06 with single-precision floats, but 1e-14 if <c>REAL_T_IS_DOUBLE</c>.
/// </summary>
#if REAL_T_IS_DOUBLE
public const real_t Epsilon = 1e-14; // Epsilon size should depend on the precision used.
@@ -44,7 +44,7 @@ namespace Godot
/// <summary>
/// Returns the amount of digits after the decimal place.
/// </summary>
- /// <param name="s">The input <see cref="System.Decimal"/> value.</param>
+ /// <param name="s">The input <see cref="decimal"/> value.</param>
/// <returns>The amount of digits.</returns>
public static int DecimalCount(decimal s)
{
@@ -52,48 +52,51 @@ namespace Godot
}
/// <summary>
- /// Rounds `s` upward (towards positive infinity).
+ /// Rounds <paramref name="s"/> upward (towards positive infinity).
///
- /// This is the same as <see cref="Ceil(real_t)"/>, but returns an `int`.
+ /// This is the same as <see cref="Ceil(real_t)"/>, but returns an <c>int</c>.
/// </summary>
/// <param name="s">The number to ceil.</param>
- /// <returns>The smallest whole number that is not less than `s`.</returns>
+ /// <returns>The smallest whole number that is not less than <paramref name="s"/>.</returns>
public static int CeilToInt(real_t s)
{
return (int)Math.Ceiling(s);
}
/// <summary>
- /// Rounds `s` downward (towards negative infinity).
+ /// Rounds <paramref name="s"/> downward (towards negative infinity).
///
- /// This is the same as <see cref="Floor(real_t)"/>, but returns an `int`.
+ /// This is the same as <see cref="Floor(real_t)"/>, but returns an <c>int</c>.
/// </summary>
/// <param name="s">The number to floor.</param>
- /// <returns>The largest whole number that is not more than `s`.</returns>
+ /// <returns>The largest whole number that is not more than <paramref name="s"/>.</returns>
public static int FloorToInt(real_t s)
{
return (int)Math.Floor(s);
}
/// <summary>
+ /// Rounds <paramref name="s"/> to the nearest whole number.
///
+ /// This is the same as <see cref="Round(real_t)"/>, but returns an <c>int</c>.
/// </summary>
- /// <param name="s"></param>
- /// <returns></returns>
+ /// <param name="s">The number to round.</param>
+ /// <returns>The rounded number.</returns>
public static int RoundToInt(real_t s)
{
return (int)Math.Round(s);
}
/// <summary>
- /// Returns true if `a` and `b` are approximately equal to each other.
+ /// Returns <see langword="true"/> if <paramref name="a"/> and <paramref name="b"/> are approximately
+ /// equal to each other.
/// The comparison is done using the provided tolerance value.
/// If you want the tolerance to be calculated for you, use <see cref="IsEqualApprox(real_t, real_t)"/>.
/// </summary>
/// <param name="a">One of the values.</param>
/// <param name="b">The other value.</param>
/// <param name="tolerance">The pre-calculated tolerance value.</param>
- /// <returns>A bool for whether or not the two values are equal.</returns>
+ /// <returns>A <see langword="bool"/> for whether or not the two values are equal.</returns>
public static bool IsEqualApprox(real_t a, real_t b, real_t tolerance)
{
// Check for exact equality first, required to handle "infinity" values.
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NodePath.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NodePath.cs
index 4ecc55f94e..f53b5dc904 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NodePath.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NodePath.cs
@@ -3,9 +3,45 @@ using System.Runtime.CompilerServices;
namespace Godot
{
+ /// <summary>
+ /// A pre-parsed relative or absolute path in a scene tree,
+ /// for use with <see cref="Node.GetNode(NodePath)"/> and similar functions.
+ /// It can reference a node, a resource within a node, or a property
+ /// of a node or resource.
+ /// For instance, <c>"Path2D/PathFollow2D/Sprite2D:texture:size"</c>
+ /// would refer to the <c>size</c> property of the <c>texture</c>
+ /// resource on the node named <c>"Sprite2D"</c> which is a child of
+ /// the other named nodes in the path.
+ /// You will usually just pass a string to <see cref="Node.GetNode(NodePath)"/>
+ /// and it will be automatically converted, but you may occasionally
+ /// want to parse a path ahead of time with NodePath.
+ /// Exporting a NodePath variable will give you a node selection widget
+ /// in the properties panel of the editor, which can often be useful.
+ /// A NodePath is composed of a list of slash-separated node names
+ /// (like a filesystem path) and an optional colon-separated list of
+ /// "subnames" which can be resources or properties.
+ ///
+ /// Note: In the editor, NodePath properties are automatically updated when moving,
+ /// renaming or deleting a node in the scene tree, but they are never updated at runtime.
+ /// </summary>
+ /// <example>
+ /// Some examples of NodePaths include the following:
+ /// <code>
+ /// // No leading slash means it is relative to the current node.
+ /// new NodePath("A"); // Immediate child A.
+ /// new NodePath("A/B"); // A's child B.
+ /// new NodePath("."); // The current node.
+ /// new NodePath(".."); // The parent node.
+ /// new NodePath("../C"); // A sibling node C.
+ /// // A leading slash means it is absolute from the SceneTree.
+ /// new NodePath("/root"); // Equivalent to GetTree().Root
+ /// new NodePath("/root/Main"); // If your main scene's root node were named "Main".
+ /// new NodePath("/root/MyAutoload"); // If you have an autoloaded node or scene.
+ /// </code>
+ /// </example>
public sealed partial class NodePath : IDisposable
{
- private bool disposed = false;
+ private bool _disposed = false;
private IntPtr ptr;
@@ -14,7 +50,7 @@ namespace Godot
if (instance == null)
throw new NullReferenceException($"The instance of type {nameof(NodePath)} is null.");
- if (instance.disposed)
+ if (instance._disposed)
throw new ObjectDisposedException(instance.GetType().FullName);
return instance.ptr;
@@ -25,6 +61,9 @@ namespace Godot
Dispose(false);
}
+ /// <summary>
+ /// Disposes of this <see cref="NodePath"/>.
+ /// </summary>
public void Dispose()
{
Dispose(true);
@@ -33,7 +72,7 @@ namespace Godot
private void Dispose(bool disposing)
{
- if (disposed)
+ if (_disposed)
return;
if (ptr != IntPtr.Zero)
@@ -42,7 +81,7 @@ namespace Godot
ptr = IntPtr.Zero;
}
- disposed = true;
+ _disposed = true;
}
internal NodePath(IntPtr ptr)
@@ -50,57 +89,168 @@ namespace Godot
this.ptr = ptr;
}
- public NodePath() : this(string.Empty) {}
-
+ /// <summary>
+ /// Constructs an empty <see cref="NodePath"/>.
+ /// </summary>
+ public NodePath() : this(string.Empty) { }
+
+ /// <summary>
+ /// Constructs a <see cref="NodePath"/> from a string <paramref name="path"/>,
+ /// e.g.: <c>"Path2D/PathFollow2D/Sprite2D:texture:size"</c>.
+ /// A path is absolute if it starts with a slash. Absolute paths
+ /// are only valid in the global scene tree, not within individual
+ /// scenes. In a relative path, <c>"."</c> and <c>".."</c> indicate
+ /// the current node and its parent.
+ /// The "subnames" optionally included after the path to the target
+ /// node can point to resources or properties, and can also be nested.
+ /// </summary>
+ /// <example>
+ /// Examples of valid NodePaths (assuming that those nodes exist and
+ /// have the referenced resources or properties):
+ /// <code>
+ /// // Points to the Sprite2D node.
+ /// "Path2D/PathFollow2D/Sprite2D"
+ /// // Points to the Sprite2D node and its "texture" resource.
+ /// // GetNode() would retrieve "Sprite2D", while GetNodeAndResource()
+ /// // would retrieve both the Sprite2D node and the "texture" resource.
+ /// "Path2D/PathFollow2D/Sprite2D:texture"
+ /// // Points to the Sprite2D node and its "position" property.
+ /// "Path2D/PathFollow2D/Sprite2D:position"
+ /// // Points to the Sprite2D node and the "x" component of its "position" property.
+ /// "Path2D/PathFollow2D/Sprite2D:position:x"
+ /// // Absolute path (from "root")
+ /// "/root/Level/Path2D"
+ /// </code>
+ /// </example>
+ /// <param name="path"></param>
public NodePath(string path)
{
ptr = godot_icall_NodePath_Ctor(path);
}
+ /// <summary>
+ /// Converts a string to a <see cref="NodePath"/>.
+ /// </summary>
+ /// <param name="from">The string to convert.</param>
public static implicit operator NodePath(string from) => new NodePath(from);
+ /// <summary>
+ /// Converts this <see cref="NodePath"/> to a string.
+ /// </summary>
+ /// <param name="from">The <see cref="NodePath"/> to convert.</param>
public static implicit operator string(NodePath from) => from.ToString();
+ /// <summary>
+ /// Converts this <see cref="NodePath"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this <see cref="NodePath"/>.</returns>
public override string ToString()
{
return godot_icall_NodePath_operator_String(GetPtr(this));
}
+ /// <summary>
+ /// Returns a node path with a colon character (<c>:</c>) prepended,
+ /// transforming it to a pure property path with no node name (defaults
+ /// to resolving from the current node).
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// // This will be parsed as a node path to the "x" property in the "position" node.
+ /// var nodePath = new NodePath("position:x");
+ /// // This will be parsed as a node path to the "x" component of the "position" property in the current node.
+ /// NodePath propertyPath = nodePath.GetAsPropertyPath();
+ /// GD.Print(propertyPath); // :position:x
+ /// </code>
+ /// </example>
+ /// <returns>The <see cref="NodePath"/> as a pure property path.</returns>
public NodePath GetAsPropertyPath()
{
return new NodePath(godot_icall_NodePath_get_as_property_path(GetPtr(this)));
}
+ /// <summary>
+ /// Returns all subnames concatenated with a colon character (<c>:</c>)
+ /// as separator, i.e. the right side of the first colon in a node path.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// var nodepath = new NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path");
+ /// GD.Print(nodepath.GetConcatenatedSubnames()); // texture:load_path
+ /// </code>
+ /// </example>
+ /// <returns>The subnames concatenated with <c>:</c>.</returns>
public string GetConcatenatedSubnames()
{
return godot_icall_NodePath_get_concatenated_subnames(GetPtr(this));
}
+ /// <summary>
+ /// Gets the node name indicated by <paramref name="idx"/> (0 to <see cref="GetNameCount"/>).
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// var nodePath = new NodePath("Path2D/PathFollow2D/Sprite2D");
+ /// GD.Print(nodePath.GetName(0)); // Path2D
+ /// GD.Print(nodePath.GetName(1)); // PathFollow2D
+ /// GD.Print(nodePath.GetName(2)); // Sprite
+ /// </code>
+ /// </example>
+ /// <param name="idx">The name index.</param>
+ /// <returns>The name at the given index <paramref name="idx"/>.</returns>
public string GetName(int idx)
{
return godot_icall_NodePath_get_name(GetPtr(this), idx);
}
+ /// <summary>
+ /// Gets the number of node names which make up the path.
+ /// Subnames (see <see cref="GetSubnameCount"/>) are not included.
+ /// For example, <c>"Path2D/PathFollow2D/Sprite2D"</c> has 3 names.
+ /// </summary>
+ /// <returns>The number of node names which make up the path.</returns>
public int GetNameCount()
{
return godot_icall_NodePath_get_name_count(GetPtr(this));
}
+ /// <summary>
+ /// Gets the resource or property name indicated by <paramref name="idx"/> (0 to <see cref="GetSubnameCount"/>).
+ /// </summary>
+ /// <param name="idx">The subname index.</param>
+ /// <returns>The subname at the given index <paramref name="idx"/>.</returns>
public string GetSubname(int idx)
{
return godot_icall_NodePath_get_subname(GetPtr(this), idx);
}
+ /// <summary>
+ /// Gets the number of resource or property names ("subnames") in the path.
+ /// Each subname is listed after a colon character (<c>:</c>) in the node path.
+ /// For example, <c>"Path2D/PathFollow2D/Sprite2D:texture:load_path"</c> has 2 subnames.
+ /// </summary>
+ /// <returns>The number of subnames in the path.</returns>
public int GetSubnameCount()
{
return godot_icall_NodePath_get_subname_count(GetPtr(this));
}
+ /// <summary>
+ /// Returns <see langword="true"/> if the node path is absolute (as opposed to relative),
+ /// which means that it starts with a slash character (<c>/</c>). Absolute node paths can
+ /// be used to access the root node (<c>"/root"</c>) or autoloads (e.g. <c>"/global"</c>
+ /// if a "global" autoload was registered).
+ /// </summary>
+ /// <returns>If the <see cref="NodePath"/> is an absolute path.</returns>
public bool IsAbsolute()
{
return godot_icall_NodePath_is_absolute(GetPtr(this));
}
+ /// <summary>
+ /// Returns <see langword="true"/> if the node path is empty.
+ /// </summary>
+ /// <returns>If the <see cref="NodePath"/> is empty.</returns>
public bool IsEmpty()
{
return godot_icall_NodePath_is_empty(GetPtr(this));
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Object.base.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Object.base.cs
index d486d79557..8fe08e7e1d 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Object.base.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Object.base.cs
@@ -5,13 +5,16 @@ namespace Godot
{
public partial class Object : IDisposable
{
- private bool disposed = false;
+ private bool _disposed = false;
private static StringName nativeName = "Object";
internal IntPtr ptr;
internal bool memoryOwn;
+ /// <summary>
+ /// Constructs a new <see cref="Object"/>.
+ /// </summary>
public Object() : this(false)
{
if (ptr == IntPtr.Zero)
@@ -29,6 +32,9 @@ namespace Godot
this.memoryOwn = memoryOwn;
}
+ /// <summary>
+ /// The pointer to the native instance of this <see cref="Object"/>.
+ /// </summary>
public IntPtr NativeInstance
{
get { return ptr; }
@@ -39,7 +45,7 @@ namespace Godot
if (instance == null)
return IntPtr.Zero;
- if (instance.disposed)
+ if (instance._disposed)
throw new ObjectDisposedException(instance.GetType().FullName);
return instance.ptr;
@@ -50,15 +56,21 @@ namespace Godot
Dispose(false);
}
+ /// <summary>
+ /// Disposes of this <see cref="Object"/>.
+ /// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
+ /// <summary>
+ /// Disposes implementation of this <see cref="Object"/>.
+ /// </summary>
protected virtual void Dispose(bool disposing)
{
- if (disposed)
+ if (_disposed)
return;
if (ptr != IntPtr.Zero)
@@ -73,19 +85,23 @@ namespace Godot
godot_icall_Object_Disposed(this, ptr);
}
- this.ptr = IntPtr.Zero;
+ ptr = IntPtr.Zero;
}
- disposed = true;
+ _disposed = true;
}
+ /// <summary>
+ /// Converts this <see cref="Object"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this object.</returns>
public override string ToString()
{
return godot_icall_Object_ToString(GetPtr(this));
}
/// <summary>
- /// Returns a new <see cref="Godot.SignalAwaiter"/> awaiter configured to complete when the instance
+ /// Returns a new <see cref="SignalAwaiter"/> awaiter configured to complete when the instance
/// <paramref name="source"/> emits the signal specified by the <paramref name="signal"/> parameter.
/// </summary>
/// <param name="source">
@@ -107,13 +123,17 @@ namespace Godot
/// }
/// </code>
/// </example>
+ /// <returns>
+ /// A <see cref="SignalAwaiter"/> that completes when
+ /// <paramref name="source"/> emits the <paramref name="signal"/>.
+ /// </returns>
public SignalAwaiter ToSignal(Object source, StringName signal)
{
return new SignalAwaiter(source, signal, this);
}
/// <summary>
- /// Gets a new <see cref="Godot.DynamicGodotObject"/> associated with this instance.
+ /// Gets a new <see cref="DynamicGodotObject"/> associated with this instance.
/// </summary>
public dynamic DynamicObject => new DynamicGodotObject(this);
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs
index 6972102730..66f7b745f7 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Plane.cs
@@ -21,10 +21,10 @@ namespace Godot
/// <summary>
/// The normal of the plane, which must be normalized.
- /// In the scalar equation of the plane `ax + by + cz = d`, this is
- /// the vector `(a, b, c)`, where `d` is the <see cref="D"/> property.
+ /// In the scalar equation of the plane <c>ax + by + cz = d</c>, this is
+ /// the vector <c>(a, b, c)</c>, where <c>d</c> is the <see cref="D"/> property.
/// </summary>
- /// <value>Equivalent to `x`, `y`, and `z`.</value>
+ /// <value>Equivalent to <see cref="x"/>, <see cref="y"/>, and <see cref="z"/>.</value>
public Vector3 Normal
{
get { return _normal; }
@@ -82,8 +82,8 @@ namespace Godot
/// <summary>
/// The distance from the origin to the plane (in the direction of
/// <see cref="Normal"/>). This value is typically non-negative.
- /// In the scalar equation of the plane `ax + by + cz = d`,
- /// this is `d`, while the `(a, b, c)` coordinates are represented
+ /// In the scalar equation of the plane <c>ax + by + cz = d</c>,
+ /// this is <c>d</c>, while the <c>(a, b, c)</c> coordinates are represented
/// by the <see cref="Normal"/> property.
/// </summary>
/// <value>The plane's distance from the origin.</value>
@@ -92,7 +92,7 @@ namespace Godot
/// <summary>
/// The center of the plane, the point where the normal line intersects the plane.
/// </summary>
- /// <value>Equivalent to <see cref="Normal"/> multiplied by `D`.</value>
+ /// <value>Equivalent to <see cref="Normal"/> multiplied by <see cref="D"/>.</value>
public Vector3 Center
{
get
@@ -107,7 +107,7 @@ namespace Godot
}
/// <summary>
- /// Returns the shortest distance from this plane to the position `point`.
+ /// Returns the shortest distance from this plane to the position <paramref name="point"/>.
/// </summary>
/// <param name="point">The position to use for the calculation.</param>
/// <returns>The shortest distance.</returns>
@@ -117,12 +117,12 @@ namespace Godot
}
/// <summary>
- /// Returns true if point is inside the plane.
+ /// Returns <see langword="true"/> if point is inside the plane.
/// Comparison uses a custom minimum epsilon threshold.
/// </summary>
/// <param name="point">The point to check.</param>
/// <param name="epsilon">The tolerance threshold.</param>
- /// <returns>A bool for whether or not the plane has the point.</returns>
+ /// <returns>A <see langword="bool"/> for whether or not the plane has the point.</returns>
public bool HasPoint(Vector3 point, real_t epsilon = Mathf.Epsilon)
{
real_t dist = _normal.Dot(point) - D;
@@ -130,12 +130,12 @@ namespace Godot
}
/// <summary>
- /// Returns the intersection point of the three planes: `b`, `c`,
- /// and this plane. If no intersection is found, `null` is returned.
+ /// Returns the intersection point of the three planes: <paramref name="b"/>, <paramref name="c"/>,
+ /// and this plane. If no intersection is found, <see langword="null"/> is returned.
/// </summary>
/// <param name="b">One of the three planes to use in the calculation.</param>
/// <param name="c">One of the three planes to use in the calculation.</param>
- /// <returns>The intersection, or `null` if none is found.</returns>
+ /// <returns>The intersection, or <see langword="null"/> if none is found.</returns>
public Vector3? Intersect3(Plane b, Plane c)
{
real_t denom = _normal.Cross(b._normal).Dot(c._normal);
@@ -145,21 +145,21 @@ namespace Godot
return null;
}
- Vector3 result = b._normal.Cross(c._normal) * D +
- c._normal.Cross(_normal) * b.D +
- _normal.Cross(b._normal) * c.D;
+ Vector3 result = (b._normal.Cross(c._normal) * D) +
+ (c._normal.Cross(_normal) * b.D) +
+ (_normal.Cross(b._normal) * c.D);
return result / denom;
}
/// <summary>
- /// Returns the intersection point of a ray consisting of the
- /// position `from` and the direction normal `dir` with this plane.
- /// If no intersection is found, `null` is returned.
+ /// Returns the intersection point of a ray consisting of the position <paramref name="from"/>
+ /// and the direction normal <paramref name="dir"/> with this plane.
+ /// If no intersection is found, <see langword="null"/> is returned.
/// </summary>
/// <param name="from">The start of the ray.</param>
/// <param name="dir">The direction of the ray, normalized.</param>
- /// <returns>The intersection, or `null` if none is found.</returns>
+ /// <returns>The intersection, or <see langword="null"/> if none is found.</returns>
public Vector3? IntersectRay(Vector3 from, Vector3 dir)
{
real_t den = _normal.Dot(dir);
@@ -182,12 +182,12 @@ namespace Godot
/// <summary>
/// Returns the intersection point of a line segment from
- /// position `begin` to position `end` with this plane.
- /// If no intersection is found, `null` is returned.
+ /// position <paramref name="begin"/> to position <paramref name="end"/> with this plane.
+ /// If no intersection is found, <see langword="null"/> is returned.
/// </summary>
/// <param name="begin">The start of the line segment.</param>
/// <param name="end">The end of the line segment.</param>
- /// <returns>The intersection, or `null` if none is found.</returns>
+ /// <returns>The intersection, or <see langword="null"/> if none is found.</returns>
public Vector3? IntersectSegment(Vector3 begin, Vector3 end)
{
Vector3 segment = begin - end;
@@ -210,10 +210,10 @@ namespace Godot
}
/// <summary>
- /// Returns true if `point` is located above the plane.
+ /// Returns <see langword="true"/> if <paramref name="point"/> is located above the plane.
/// </summary>
/// <param name="point">The point to check.</param>
- /// <returns>A bool for whether or not the point is above the plane.</returns>
+ /// <returns>A <see langword="bool"/> for whether or not the point is above the plane.</returns>
public bool IsPointOver(Vector3 point)
{
return _normal.Dot(point) > D;
@@ -236,13 +236,13 @@ namespace Godot
}
/// <summary>
- /// Returns the orthogonal projection of `point` into the plane.
+ /// Returns the orthogonal projection of <paramref name="point"/> into the plane.
/// </summary>
/// <param name="point">The point to project.</param>
/// <returns>The projected point.</returns>
public Vector3 Project(Vector3 point)
{
- return point - _normal * DistanceTo(point);
+ return point - (_normal * DistanceTo(point));
}
// Constants
@@ -251,27 +251,28 @@ namespace Godot
private static readonly Plane _planeXY = new Plane(0, 0, 1, 0);
/// <summary>
- /// A plane that extends in the Y and Z axes (normal vector points +X).
+ /// A <see cref="Plane"/> that extends in the Y and Z axes (normal vector points +X).
/// </summary>
- /// <value>Equivalent to `new Plane(1, 0, 0, 0)`.</value>
+ /// <value>Equivalent to <c>new Plane(1, 0, 0, 0)</c>.</value>
public static Plane PlaneYZ { get { return _planeYZ; } }
/// <summary>
- /// A plane that extends in the X and Z axes (normal vector points +Y).
+ /// A <see cref="Plane"/> that extends in the X and Z axes (normal vector points +Y).
/// </summary>
- /// <value>Equivalent to `new Plane(0, 1, 0, 0)`.</value>
+ /// <value>Equivalent to <c>new Plane(0, 1, 0, 0)</c>.</value>
public static Plane PlaneXZ { get { return _planeXZ; } }
/// <summary>
- /// A plane that extends in the X and Y axes (normal vector points +Z).
+ /// A <see cref="Plane"/> that extends in the X and Y axes (normal vector points +Z).
/// </summary>
- /// <value>Equivalent to `new Plane(0, 0, 1, 0)`.</value>
+ /// <value>Equivalent to <c>new Plane(0, 0, 1, 0)</c>.</value>
public static Plane PlaneXY { get { return _planeXY; } }
/// <summary>
- /// Constructs a plane from four values. `a`, `b` and `c` become the
+ /// Constructs a <see cref="Plane"/> from four values.
+ /// <paramref name="a"/>, <paramref name="b"/> and <paramref name="c"/> become the
/// components of the resulting plane's <see cref="Normal"/> vector.
- /// `d` becomes the plane's distance from the origin.
+ /// <paramref name="d"/> becomes the plane's distance from the origin.
/// </summary>
/// <param name="a">The X component of the plane's normal vector.</param>
/// <param name="b">The Y component of the plane's normal vector.</param>
@@ -280,22 +281,23 @@ namespace Godot
public Plane(real_t a, real_t b, real_t c, real_t d)
{
_normal = new Vector3(a, b, c);
- this.D = d;
+ D = d;
}
/// <summary>
- /// Constructs a plane from a normal vector and the plane's distance to the origin.
+ /// Constructs a <see cref="Plane"/> from a <paramref name="normal"/> vector and
+ /// the plane's distance to the origin <paramref name="d"/>.
/// </summary>
/// <param name="normal">The normal of the plane, must be normalized.</param>
/// <param name="d">The plane's distance from the origin. This value is typically non-negative.</param>
public Plane(Vector3 normal, real_t d)
{
- this._normal = normal;
- this.D = d;
+ _normal = normal;
+ D = d;
}
/// <summary>
- /// Constructs a plane from the three points, given in clockwise order.
+ /// Constructs a <see cref="Plane"/> from the three points, given in clockwise order.
/// </summary>
/// <param name="v1">The first point.</param>
/// <param name="v2">The second point.</param>
@@ -322,6 +324,11 @@ namespace Godot
return !left.Equals(right);
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this plane and <paramref name="obj"/> are equal.
+ /// </summary>
+ /// <param name="obj">The other object to compare.</param>
+ /// <returns>Whether or not the plane and the other object are equal.</returns>
public override bool Equals(object obj)
{
if (obj is Plane)
@@ -332,14 +339,19 @@ namespace Godot
return false;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this plane and <paramref name="other"/> are equal.
+ /// </summary>
+ /// <param name="other">The other plane to compare.</param>
+ /// <returns>Whether or not the planes are equal.</returns>
public bool Equals(Plane other)
{
return _normal == other._normal && D == other.D;
}
/// <summary>
- /// Returns true if this plane and `other` are approximately equal, by running
- /// <see cref="Mathf.IsEqualApprox(real_t, real_t)"/> on each component.
+ /// Returns <see langword="true"/> if this plane and <paramref name="other"/> are
+ /// approximately equal, by running <see cref="Mathf.IsEqualApprox(real_t, real_t)"/> on each component.
/// </summary>
/// <param name="other">The other plane to compare.</param>
/// <returns>Whether or not the planes are approximately equal.</returns>
@@ -348,16 +360,28 @@ namespace Godot
return _normal.IsEqualApprox(other._normal) && Mathf.IsEqualApprox(D, other.D);
}
+ /// <summary>
+ /// Serves as the hash function for <see cref="Plane"/>.
+ /// </summary>
+ /// <returns>A hash code for this plane.</returns>
public override int GetHashCode()
{
return _normal.GetHashCode() ^ D.GetHashCode();
}
+ /// <summary>
+ /// Converts this <see cref="Plane"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this plane.</returns>
public override string ToString()
{
return $"{_normal}, {D}";
}
+ /// <summary>
+ /// Converts this <see cref="Plane"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this plane.</returns>
public string ToString(string format)
{
return $"{_normal.ToString(format)}, {D.ToString(format)}";
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs
index 0fed55cc30..1694ac0320 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Quaternion.cs
@@ -12,10 +12,10 @@ namespace Godot
/// A unit quaternion used for representing 3D rotations.
/// Quaternions need to be normalized to be used for rotation.
///
- /// It is similar to Basis, which implements matrix representation of
- /// rotations, and can be parametrized using both an axis-angle pair
- /// or Euler angles. Basis stores rotation, scale, and shearing,
- /// while Quaternion only stores rotation.
+ /// It is similar to <see cref="Basis"/>, which implements matrix
+ /// representation of rotations, and can be parametrized using both
+ /// an axis-angle pair or Euler angles. Basis stores rotation, scale,
+ /// and shearing, while Quaternion only stores rotation.
///
/// Due to its compactness and the way it is stored in memory, certain
/// operations (obtaining axis-angle and performing SLERP, in particular)
@@ -26,19 +26,19 @@ namespace Godot
public struct Quaternion : IEquatable<Quaternion>
{
/// <summary>
- /// X component of the quaternion (imaginary `i` axis part).
+ /// X component of the quaternion (imaginary <c>i</c> axis part).
/// Quaternion components should usually not be manipulated directly.
/// </summary>
public real_t x;
/// <summary>
- /// Y component of the quaternion (imaginary `j` axis part).
+ /// Y component of the quaternion (imaginary <c>j</c> axis part).
/// Quaternion components should usually not be manipulated directly.
/// </summary>
public real_t y;
/// <summary>
- /// Z component of the quaternion (imaginary `k` axis part).
+ /// Z component of the quaternion (imaginary <c>k</c> axis part).
/// Quaternion components should usually not be manipulated directly.
/// </summary>
public real_t z;
@@ -52,7 +52,12 @@ namespace Godot
/// <summary>
/// Access quaternion components using their index.
/// </summary>
- /// <value>`[0]` is equivalent to `.x`, `[1]` is equivalent to `.y`, `[2]` is equivalent to `.z`, `[3]` is equivalent to `.w`.</value>
+ /// <value>
+ /// <c>[0]</c> is equivalent to <see cref="x"/>,
+ /// <c>[1]</c> is equivalent to <see cref="y"/>,
+ /// <c>[2]</c> is equivalent to <see cref="z"/>,
+ /// <c>[3]</c> is equivalent to <see cref="w"/>.
+ /// </value>
public real_t this[int index]
{
get
@@ -96,7 +101,8 @@ namespace Godot
/// <summary>
/// Returns the length (magnitude) of the quaternion.
/// </summary>
- /// <value>Equivalent to `Mathf.Sqrt(LengthSquared)`.</value>
+ /// <seealso cref="LengthSquared"/>
+ /// <value>Equivalent to <c>Mathf.Sqrt(LengthSquared)</c>.</value>
public real_t Length
{
get { return Mathf.Sqrt(LengthSquared); }
@@ -107,14 +113,14 @@ namespace Godot
/// This method runs faster than <see cref="Length"/>, so prefer it if
/// you need to compare quaternions or need the squared length for some formula.
/// </summary>
- /// <value>Equivalent to `Dot(this)`.</value>
+ /// <value>Equivalent to <c>Dot(this)</c>.</value>
public real_t LengthSquared
{
get { return Dot(this); }
}
/// <summary>
- /// Returns the angle between this quaternion and `to`.
+ /// Returns the angle between this quaternion and <paramref name="to"/>.
/// This is the magnitude of the angle you would need to rotate
/// by to get from one to the other.
///
@@ -131,12 +137,12 @@ namespace Godot
}
/// <summary>
- /// Performs a cubic spherical interpolation between quaternions `preA`,
- /// this vector, `b`, and `postB`, by the given amount `t`.
+ /// Performs a cubic spherical interpolation between quaternions <paramref name="preA"/>, this quaternion,
+ /// <paramref name="b"/>, and <paramref name="postB"/>, by the given amount <paramref name="weight"/>.
/// </summary>
/// <param name="b">The destination quaternion.</param>
/// <param name="preA">A quaternion before this quaternion.</param>
- /// <param name="postB">A quaternion after `b`.</param>
+ /// <param name="postB">A quaternion after <paramref name="b"/>.</param>
/// <param name="weight">A value on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
/// <returns>The interpolated quaternion.</returns>
public Quaternion CubicSlerp(Quaternion b, Quaternion preA, Quaternion postB, real_t weight)
@@ -154,7 +160,7 @@ namespace Godot
/// <returns>The dot product.</returns>
public real_t Dot(Quaternion b)
{
- return x * b.x + y * b.y + z * b.z + w * b.w;
+ return (x * b.x) + (y * b.y) + (z * b.z) + (w * b.w);
}
/// <summary>
@@ -194,7 +200,7 @@ namespace Godot
/// <summary>
/// Returns whether the quaternion is normalized or not.
/// </summary>
- /// <returns>A bool for whether the quaternion is normalized or not.</returns>
+ /// <returns>A <see langword="bool"/> for whether the quaternion is normalized or not.</returns>
public bool IsNormalized()
{
return Mathf.Abs(LengthSquared - 1) <= Mathf.Epsilon;
@@ -211,7 +217,7 @@ namespace Godot
/// <summary>
/// Returns the result of the spherical linear interpolation between
- /// this quaternion and `to` by amount `weight`.
+ /// this quaternion and <paramref name="to"/> by amount <paramref name="weight"/>.
///
/// Note: Both quaternions must be normalized.
/// </summary>
@@ -274,16 +280,16 @@ namespace Godot
// Calculate final values.
return new Quaternion
(
- scale0 * x + scale1 * to1.x,
- scale0 * y + scale1 * to1.y,
- scale0 * z + scale1 * to1.z,
- scale0 * w + scale1 * to1.w
+ (scale0 * x) + (scale1 * to1.x),
+ (scale0 * y) + (scale1 * to1.y),
+ (scale0 * z) + (scale1 * to1.z),
+ (scale0 * w) + (scale1 * to1.w)
);
}
/// <summary>
/// Returns the result of the spherical linear interpolation between
- /// this quaternion and `to` by amount `weight`, but without
+ /// this quaternion and <paramref name="to"/> by amount <paramref name="weight"/>, but without
/// checking if the rotation path is not bigger than 90 degrees.
/// </summary>
/// <param name="to">The destination quaternion for interpolation. Must be normalized.</param>
@@ -305,10 +311,10 @@ namespace Godot
return new Quaternion
(
- invFactor * x + newFactor * to.x,
- invFactor * y + newFactor * to.y,
- invFactor * z + newFactor * to.z,
- invFactor * w + newFactor * to.w
+ (invFactor * x) + (newFactor * to.x),
+ (invFactor * y) + (newFactor * to.y),
+ (invFactor * z) + (newFactor * to.z),
+ (invFactor * w) + (newFactor * to.w)
);
}
@@ -327,7 +333,7 @@ namespace Godot
#endif
var u = new Vector3(x, y, z);
Vector3 uv = u.Cross(v);
- return v + ((uv * w) + u.Cross(uv)) * 2;
+ return v + (((uv * w) + u.Cross(uv)) * 2);
}
// Constants
@@ -338,15 +344,15 @@ namespace Godot
/// Equivalent to an identity <see cref="Basis"/> matrix. If a vector is transformed by
/// an identity quaternion, it will not change.
/// </summary>
- /// <value>Equivalent to `new Quaternion(0, 0, 0, 1)`.</value>
+ /// <value>Equivalent to <c>new Quaternion(0, 0, 0, 1)</c>.</value>
public static Quaternion Identity { get { return _identity; } }
/// <summary>
- /// Constructs a quaternion defined by the given values.
+ /// Constructs a <see cref="Quaternion"/> defined by the given values.
/// </summary>
- /// <param name="x">X component of the quaternion (imaginary `i` axis part).</param>
- /// <param name="y">Y component of the quaternion (imaginary `j` axis part).</param>
- /// <param name="z">Z component of the quaternion (imaginary `k` axis part).</param>
+ /// <param name="x">X component of the quaternion (imaginary <c>i</c> axis part).</param>
+ /// <param name="y">Y component of the quaternion (imaginary <c>j</c> axis part).</param>
+ /// <param name="z">Z component of the quaternion (imaginary <c>k</c> axis part).</param>
/// <param name="w">W component of the quaternion (real part).</param>
public Quaternion(real_t x, real_t y, real_t z, real_t w)
{
@@ -357,7 +363,7 @@ namespace Godot
}
/// <summary>
- /// Constructs a quaternion from the given quaternion.
+ /// Constructs a <see cref="Quaternion"/> from the given <see cref="Quaternion"/>.
/// </summary>
/// <param name="q">The existing quaternion.</param>
public Quaternion(Quaternion q)
@@ -366,46 +372,45 @@ namespace Godot
}
/// <summary>
- /// Constructs a quaternion from the given <see cref="Basis"/>.
+ /// Constructs a <see cref="Quaternion"/> from the given <see cref="Basis"/>.
/// </summary>
- /// <param name="basis">The basis to construct from.</param>
+ /// <param name="basis">The <see cref="Basis"/> to construct from.</param>
public Quaternion(Basis basis)
{
this = basis.Quaternion();
}
/// <summary>
- /// Constructs a quaternion that will perform a rotation specified by
- /// Euler angles (in the YXZ convention: when decomposing,
- /// first Z, then X, and Y last),
+ /// Constructs a <see cref="Quaternion"/> that will perform a rotation specified by
+ /// Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last),
/// given in the vector format as (X angle, Y angle, Z angle).
/// </summary>
- /// <param name="eulerYXZ"></param>
+ /// <param name="eulerYXZ">Euler angles that the quaternion will be rotated by.</param>
public Quaternion(Vector3 eulerYXZ)
{
- real_t half_a1 = eulerYXZ.y * 0.5f;
- real_t half_a2 = eulerYXZ.x * 0.5f;
- real_t half_a3 = eulerYXZ.z * 0.5f;
+ real_t halfA1 = eulerYXZ.y * 0.5f;
+ real_t halfA2 = eulerYXZ.x * 0.5f;
+ real_t halfA3 = eulerYXZ.z * 0.5f;
// R = Y(a1).X(a2).Z(a3) convention for Euler angles.
// Conversion to quaternion as listed in https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19770024290.pdf (page A-6)
// a3 is the angle of the first rotation, following the notation in this reference.
- real_t cos_a1 = Mathf.Cos(half_a1);
- real_t sin_a1 = Mathf.Sin(half_a1);
- real_t cos_a2 = Mathf.Cos(half_a2);
- real_t sin_a2 = Mathf.Sin(half_a2);
- real_t cos_a3 = Mathf.Cos(half_a3);
- real_t sin_a3 = Mathf.Sin(half_a3);
+ real_t cosA1 = Mathf.Cos(halfA1);
+ real_t sinA1 = Mathf.Sin(halfA1);
+ real_t cosA2 = Mathf.Cos(halfA2);
+ real_t sinA2 = Mathf.Sin(halfA2);
+ real_t cosA3 = Mathf.Cos(halfA3);
+ real_t sinA3 = Mathf.Sin(halfA3);
- x = sin_a1 * cos_a2 * sin_a3 + cos_a1 * sin_a2 * cos_a3;
- y = sin_a1 * cos_a2 * cos_a3 - cos_a1 * sin_a2 * sin_a3;
- z = cos_a1 * cos_a2 * sin_a3 - sin_a1 * sin_a2 * cos_a3;
- w = sin_a1 * sin_a2 * sin_a3 + cos_a1 * cos_a2 * cos_a3;
+ x = (sinA1 * cosA2 * sinA3) + (cosA1 * sinA2 * cosA3);
+ y = (sinA1 * cosA2 * cosA3) - (cosA1 * sinA2 * sinA3);
+ z = (cosA1 * cosA2 * sinA3) - (sinA1 * sinA2 * cosA3);
+ w = (sinA1 * sinA2 * sinA3) + (cosA1 * cosA2 * cosA3);
}
/// <summary>
- /// Constructs a quaternion that will rotate around the given axis
+ /// Constructs a <see cref="Quaternion"/> that will rotate around the given axis
/// by the specified angle. The axis must be a normalized vector.
/// </summary>
/// <param name="axis">The axis to rotate around. Must be normalized.</param>
@@ -445,10 +450,10 @@ namespace Godot
{
return new Quaternion
(
- left.w * right.x + left.x * right.w + left.y * right.z - left.z * right.y,
- left.w * right.y + left.y * right.w + left.z * right.x - left.x * right.z,
- left.w * right.z + left.z * right.w + left.x * right.y - left.y * right.x,
- left.w * right.w - left.x * right.x - left.y * right.y - left.z * right.z
+ (left.w * right.x) + (left.x * right.w) + (left.y * right.z) - (left.z * right.y),
+ (left.w * right.y) + (left.y * right.w) + (left.z * right.x) - (left.x * right.z),
+ (left.w * right.z) + (left.z * right.w) + (left.x * right.y) - (left.y * right.x),
+ (left.w * right.w) - (left.x * right.x) - (left.y * right.y) - (left.z * right.z)
);
}
@@ -471,10 +476,10 @@ namespace Godot
{
return new Quaternion
(
- left.w * right.x + left.y * right.z - left.z * right.y,
- left.w * right.y + left.z * right.x - left.x * right.z,
- left.w * right.z + left.x * right.y - left.y * right.x,
- -left.x * right.x - left.y * right.y - left.z * right.z
+ (left.w * right.x) + (left.y * right.z) - (left.z * right.y),
+ (left.w * right.y) + (left.z * right.x) - (left.x * right.z),
+ (left.w * right.z) + (left.x * right.y) - (left.y * right.x),
+ -(left.x * right.x) - (left.y * right.y) - (left.z * right.z)
);
}
@@ -482,10 +487,10 @@ namespace Godot
{
return new Quaternion
(
- right.w * left.x + right.y * left.z - right.z * left.y,
- right.w * left.y + right.z * left.x - right.x * left.z,
- right.w * left.z + right.x * left.y - right.y * left.x,
- -right.x * left.x - right.y * left.y - right.z * left.z
+ (right.w * left.x) + (right.y * left.z) - (right.z * left.y),
+ (right.w * left.y) + (right.z * left.x) - (right.x * left.z),
+ (right.w * left.z) + (right.x * left.y) - (right.y * left.x),
+ -(right.x * left.x) - (right.y * left.y) - (right.z * left.z)
);
}
@@ -514,6 +519,11 @@ namespace Godot
return !left.Equals(right);
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this quaternion and <paramref name="obj"/> are equal.
+ /// </summary>
+ /// <param name="obj">The other object to compare.</param>
+ /// <returns>Whether or not the quaternion and the other object are equal.</returns>
public override bool Equals(object obj)
{
if (obj is Quaternion)
@@ -524,14 +534,19 @@ namespace Godot
return false;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this quaternion and <paramref name="other"/> are equal.
+ /// </summary>
+ /// <param name="other">The other quaternion to compare.</param>
+ /// <returns>Whether or not the quaternions are equal.</returns>
public bool Equals(Quaternion other)
{
return x == other.x && y == other.y && z == other.z && w == other.w;
}
/// <summary>
- /// Returns true if this quaternion and `other` are approximately equal, by running
- /// <see cref="Mathf.IsEqualApprox(real_t, real_t)"/> on each component.
+ /// Returns <see langword="true"/> if this quaternion and <paramref name="other"/> are approximately equal,
+ /// by running <see cref="Mathf.IsEqualApprox(real_t, real_t)"/> on each component.
/// </summary>
/// <param name="other">The other quaternion to compare.</param>
/// <returns>Whether or not the quaternions are approximately equal.</returns>
@@ -540,16 +555,28 @@ namespace Godot
return Mathf.IsEqualApprox(x, other.x) && Mathf.IsEqualApprox(y, other.y) && Mathf.IsEqualApprox(z, other.z) && Mathf.IsEqualApprox(w, other.w);
}
+ /// <summary>
+ /// Serves as the hash function for <see cref="Quaternion"/>.
+ /// </summary>
+ /// <returns>A hash code for this quaternion.</returns>
public override int GetHashCode()
{
return y.GetHashCode() ^ x.GetHashCode() ^ z.GetHashCode() ^ w.GetHashCode();
}
+ /// <summary>
+ /// Converts this <see cref="Quaternion"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this quaternion.</returns>
public override string ToString()
{
return $"({x}, {y}, {z}, {w})";
}
+ /// <summary>
+ /// Converts this <see cref="Quaternion"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this quaternion.</returns>
public string ToString(string format)
{
return $"({x.ToString(format)}, {y.ToString(format)}, {z.ToString(format)}, {w.ToString(format)})";
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/RID.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/RID.cs
index 94761531b1..1588869ec0 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/RID.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/RID.cs
@@ -3,9 +3,15 @@ using System.Runtime.CompilerServices;
namespace Godot
{
+ /// <summary>
+ /// The RID type is used to access the unique integer ID of a resource.
+ /// They are opaque, which means they do not grant access to the associated
+ /// resource by themselves. They are used by and with the low-level Server
+ /// classes such as <see cref="RenderingServer"/>.
+ /// </summary>
public sealed partial class RID : IDisposable
{
- private bool disposed = false;
+ private bool _disposed = false;
internal IntPtr ptr;
@@ -14,7 +20,7 @@ namespace Godot
if (instance == null)
throw new NullReferenceException($"The instance of type {nameof(RID)} is null.");
- if (instance.disposed)
+ if (instance._disposed)
throw new ObjectDisposedException(instance.GetType().FullName);
return instance.ptr;
@@ -25,6 +31,9 @@ namespace Godot
Dispose(false);
}
+ /// <summary>
+ /// Disposes of this <see cref="RID"/>.
+ /// </summary>
public void Dispose()
{
Dispose(true);
@@ -33,7 +42,7 @@ namespace Godot
private void Dispose(bool disposing)
{
- if (disposed)
+ if (_disposed)
return;
if (ptr != IntPtr.Zero)
@@ -42,7 +51,7 @@ namespace Godot
ptr = IntPtr.Zero;
}
- disposed = true;
+ _disposed = true;
}
internal RID(IntPtr ptr)
@@ -50,6 +59,9 @@ namespace Godot
this.ptr = ptr;
}
+ /// <summary>
+ /// The pointer to the native instance of this <see cref="RID"/>.
+ /// </summary>
public IntPtr NativeInstance
{
get { return ptr; }
@@ -60,25 +72,36 @@ namespace Godot
this.ptr = IntPtr.Zero;
}
+ /// <summary>
+ /// Constructs a new <see cref="RID"/> for the given <see cref="Object"/> <paramref name="from"/>.
+ /// </summary>
public RID(Object from)
{
this.ptr = godot_icall_RID_Ctor(Object.GetPtr(from));
}
+ /// <summary>
+ /// Returns the ID of the referenced resource.
+ /// </summary>
+ /// <returns>The ID of the referenced resource.</returns>
public int GetId()
{
- return godot_icall_RID_get_id(RID.GetPtr(this));
+ return godot_icall_RID_get_id(GetPtr(this));
}
+ /// <summary>
+ /// Converts this <see cref="RID"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this RID.</returns>
public override string ToString() => "[RID]";
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static IntPtr godot_icall_RID_Ctor(IntPtr from);
+ internal static extern IntPtr godot_icall_RID_Ctor(IntPtr from);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_RID_Dtor(IntPtr ptr);
+ internal static extern void godot_icall_RID_Dtor(IntPtr ptr);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static int godot_icall_RID_get_id(IntPtr ptr);
+ internal static extern int godot_icall_RID_get_id(IntPtr ptr);
}
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs
index dec69c7f94..af94484577 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2.cs
@@ -20,7 +20,7 @@ namespace Godot
private Vector2 _size;
/// <summary>
- /// Beginning corner. Typically has values lower than End.
+ /// Beginning corner. Typically has values lower than <see cref="End"/>.
/// </summary>
/// <value>Directly uses a private field.</value>
public Vector2 Position
@@ -30,7 +30,7 @@ namespace Godot
}
/// <summary>
- /// Size from Position to End. Typically all components are positive.
+ /// Size from <see cref="Position"/> to <see cref="End"/>. Typically all components are positive.
/// If the size is negative, you can use <see cref="Abs"/> to fix it.
/// </summary>
/// <value>Directly uses a private field.</value>
@@ -41,10 +41,13 @@ namespace Godot
}
/// <summary>
- /// Ending corner. This is calculated as <see cref="Position"/> plus
- /// <see cref="Size"/>. Setting this value will change the size.
+ /// Ending corner. This is calculated as <see cref="Position"/> plus <see cref="Size"/>.
+ /// Setting this value will change the size.
/// </summary>
- /// <value>Getting is equivalent to `value = Position + Size`, setting is equivalent to `Size = value - Position`.</value>
+ /// <value>
+ /// Getting is equivalent to <paramref name="value"/> = <see cref="Position"/> + <see cref="Size"/>,
+ /// setting is equivalent to <see cref="Size"/> = <paramref name="value"/> - <see cref="Position"/>
+ /// </value>
public Vector2 End
{
get { return _position + _size; }
@@ -52,7 +55,7 @@ namespace Godot
}
/// <summary>
- /// The area of this Rect2.
+ /// The area of this <see cref="Rect2"/>.
/// </summary>
/// <value>Equivalent to <see cref="GetArea()"/>.</value>
public real_t Area
@@ -61,10 +64,10 @@ namespace Godot
}
/// <summary>
- /// Returns a Rect2 with equivalent position and size, modified so that
+ /// Returns a <see cref="Rect2"/> with equivalent position and size, modified so that
/// the top-left corner is the origin and width and height are positive.
/// </summary>
- /// <returns>The modified Rect2.</returns>
+ /// <returns>The modified <see cref="Rect2"/>.</returns>
public Rect2 Abs()
{
Vector2 end = End;
@@ -73,14 +76,17 @@ namespace Godot
}
/// <summary>
- /// Returns the intersection of this Rect2 and `b`.
- /// If the rectangles do not intersect, an empty Rect2 is returned.
+ /// Returns the intersection of this <see cref="Rect2"/> and <paramref name="b"/>.
+ /// If the rectangles do not intersect, an empty <see cref="Rect2"/> is returned.
/// </summary>
- /// <param name="b">The other Rect2.</param>
- /// <returns>The intersection of this Rect2 and `b`, or an empty Rect2 if they do not intersect.</returns>
+ /// <param name="b">The other <see cref="Rect2"/>.</param>
+ /// <returns>
+ /// The intersection of this <see cref="Rect2"/> and <paramref name="b"/>,
+ /// or an empty <see cref="Rect2"/> if they do not intersect.
+ /// </returns>
public Rect2 Intersection(Rect2 b)
{
- var newRect = b;
+ Rect2 newRect = b;
if (!Intersects(newRect))
{
@@ -100,10 +106,12 @@ namespace Godot
}
/// <summary>
- /// Returns true if this Rect2 completely encloses another one.
+ /// Returns <see langword="true"/> if this <see cref="Rect2"/> completely encloses another one.
/// </summary>
- /// <param name="b">The other Rect2 that may be enclosed.</param>
- /// <returns>A bool for whether or not this Rect2 encloses `b`.</returns>
+ /// <param name="b">The other <see cref="Rect2"/> that may be enclosed.</param>
+ /// <returns>
+ /// A <see langword="bool"/> for whether or not this <see cref="Rect2"/> encloses <paramref name="b"/>.
+ /// </returns>
public bool Encloses(Rect2 b)
{
return b._position.x >= _position.x && b._position.y >= _position.y &&
@@ -112,13 +120,13 @@ namespace Godot
}
/// <summary>
- /// Returns this Rect2 expanded to include a given point.
+ /// Returns this <see cref="Rect2"/> expanded to include a given point.
/// </summary>
/// <param name="to">The point to include.</param>
- /// <returns>The expanded Rect2.</returns>
+ /// <returns>The expanded <see cref="Rect2"/>.</returns>
public Rect2 Expand(Vector2 to)
{
- var expanded = this;
+ Rect2 expanded = this;
Vector2 begin = expanded._position;
Vector2 end = expanded._position + expanded._size;
@@ -148,7 +156,7 @@ namespace Godot
}
/// <summary>
- /// Returns the area of the Rect2.
+ /// Returns the area of the <see cref="Rect2"/>.
/// </summary>
/// <returns>The area.</returns>
public real_t GetArea()
@@ -157,13 +165,26 @@ namespace Godot
}
/// <summary>
- /// Returns a copy of the Rect2 grown by the specified amount on all sides.
+ /// Returns the center of the <see cref="Rect2"/>, which is equal
+ /// to <see cref="Position"/> + (<see cref="Size"/> / 2).
/// </summary>
+ /// <returns>The center.</returns>
+ public Vector2 GetCenter()
+ {
+ return _position + (_size * 0.5f);
+ }
+
+ /// <summary>
+ /// Returns a copy of the <see cref="Rect2"/> grown by the specified amount
+ /// on all sides.
+ /// </summary>
+ /// <seealso cref="GrowIndividual(real_t, real_t, real_t, real_t)"/>
+ /// <seealso cref="GrowSide(Side, real_t)"/>
/// <param name="by">The amount to grow by.</param>
- /// <returns>The grown Rect2.</returns>
+ /// <returns>The grown <see cref="Rect2"/>.</returns>
public Rect2 Grow(real_t by)
{
- var g = this;
+ Rect2 g = this;
g._position.x -= by;
g._position.y -= by;
@@ -174,16 +195,19 @@ namespace Godot
}
/// <summary>
- /// Returns a copy of the Rect2 grown by the specified amount on each side individually.
+ /// Returns a copy of the <see cref="Rect2"/> grown by the specified amount
+ /// on each side individually.
/// </summary>
+ /// <seealso cref="Grow(real_t)"/>
+ /// <seealso cref="GrowSide(Side, real_t)"/>
/// <param name="left">The amount to grow by on the left side.</param>
/// <param name="top">The amount to grow by on the top side.</param>
/// <param name="right">The amount to grow by on the right side.</param>
/// <param name="bottom">The amount to grow by on the bottom side.</param>
- /// <returns>The grown Rect2.</returns>
+ /// <returns>The grown <see cref="Rect2"/>.</returns>
public Rect2 GrowIndividual(real_t left, real_t top, real_t right, real_t bottom)
{
- var g = this;
+ Rect2 g = this;
g._position.x -= left;
g._position.y -= top;
@@ -194,14 +218,17 @@ namespace Godot
}
/// <summary>
- /// Returns a copy of the Rect2 grown by the specified amount on the specified Side.
+ /// Returns a copy of the <see cref="Rect2"/> grown by the specified amount
+ /// on the specified <see cref="Side"/>.
/// </summary>
+ /// <seealso cref="Grow(real_t)"/>
+ /// <seealso cref="GrowIndividual(real_t, real_t, real_t, real_t)"/>
/// <param name="side">The side to grow.</param>
/// <param name="by">The amount to grow by.</param>
- /// <returns>The grown Rect2.</returns>
+ /// <returns>The grown <see cref="Rect2"/>.</returns>
public Rect2 GrowSide(Side side, real_t by)
{
- var g = this;
+ Rect2 g = this;
g = g.GrowIndividual(Side.Left == side ? by : 0,
Side.Top == side ? by : 0,
@@ -212,19 +239,25 @@ namespace Godot
}
/// <summary>
- /// Returns true if the Rect2 is flat or empty, or false otherwise.
+ /// Returns <see langword="true"/> if the <see cref="Rect2"/> is flat or empty,
+ /// or <see langword="false"/> otherwise.
/// </summary>
- /// <returns>A bool for whether or not the Rect2 has area.</returns>
+ /// <returns>
+ /// A <see langword="bool"/> for whether or not the <see cref="Rect2"/> has area.
+ /// </returns>
public bool HasNoArea()
{
return _size.x <= 0 || _size.y <= 0;
}
/// <summary>
- /// Returns true if the Rect2 contains a point, or false otherwise.
+ /// Returns <see langword="true"/> if the <see cref="Rect2"/> contains a point,
+ /// or <see langword="false"/> otherwise.
/// </summary>
/// <param name="point">The point to check.</param>
- /// <returns>A bool for whether or not the Rect2 contains `point`.</returns>
+ /// <returns>
+ /// A <see langword="bool"/> for whether or not the <see cref="Rect2"/> contains <paramref name="point"/>.
+ /// </returns>
public bool HasPoint(Vector2 point)
{
if (point.x < _position.x)
@@ -241,15 +274,16 @@ namespace Godot
}
/// <summary>
- /// Returns true if the Rect2 overlaps with `b`
+ /// Returns <see langword="true"/> if the <see cref="Rect2"/> overlaps with <paramref name="b"/>
/// (i.e. they have at least one point in common).
///
- /// If `includeBorders` is true, they will also be considered overlapping
- /// if their borders touch, even without intersection.
+ /// If <paramref name="includeBorders"/> is <see langword="true"/>,
+ /// they will also be considered overlapping if their borders touch,
+ /// even without intersection.
/// </summary>
- /// <param name="b">The other Rect2 to check for intersections with.</param>
+ /// <param name="b">The other <see cref="Rect2"/> to check for intersections with.</param>
/// <param name="includeBorders">Whether or not to consider borders.</param>
- /// <returns>A bool for whether or not they are intersecting.</returns>
+ /// <returns>A <see langword="bool"/> for whether or not they are intersecting.</returns>
public bool Intersects(Rect2 b, bool includeBorders = false)
{
if (includeBorders)
@@ -295,10 +329,10 @@ namespace Godot
}
/// <summary>
- /// Returns a larger Rect2 that contains this Rect2 and `b`.
+ /// Returns a larger <see cref="Rect2"/> that contains this <see cref="Rect2"/> and <paramref name="b"/>.
/// </summary>
- /// <param name="b">The other Rect2.</param>
- /// <returns>The merged Rect2.</returns>
+ /// <param name="b">The other <see cref="Rect2"/>.</param>
+ /// <returns>The merged <see cref="Rect2"/>.</returns>
public Rect2 Merge(Rect2 b)
{
Rect2 newRect;
@@ -315,7 +349,7 @@ namespace Godot
}
/// <summary>
- /// Constructs a Rect2 from a position and size.
+ /// Constructs a <see cref="Rect2"/> from a position and size.
/// </summary>
/// <param name="position">The position.</param>
/// <param name="size">The size.</param>
@@ -326,7 +360,7 @@ namespace Godot
}
/// <summary>
- /// Constructs a Rect2 from a position, width, and height.
+ /// Constructs a <see cref="Rect2"/> from a position, width, and height.
/// </summary>
/// <param name="position">The position.</param>
/// <param name="width">The width.</param>
@@ -338,7 +372,7 @@ namespace Godot
}
/// <summary>
- /// Constructs a Rect2 from x, y, and size.
+ /// Constructs a <see cref="Rect2"/> from x, y, and size.
/// </summary>
/// <param name="x">The position's X coordinate.</param>
/// <param name="y">The position's Y coordinate.</param>
@@ -350,7 +384,7 @@ namespace Godot
}
/// <summary>
- /// Constructs a Rect2 from x, y, width, and height.
+ /// Constructs a <see cref="Rect2"/> from x, y, width, and height.
/// </summary>
/// <param name="x">The position's X coordinate.</param>
/// <param name="y">The position's Y coordinate.</param>
@@ -372,6 +406,11 @@ namespace Godot
return !left.Equals(right);
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this rect and <paramref name="obj"/> are equal.
+ /// </summary>
+ /// <param name="obj">The other object to compare.</param>
+ /// <returns>Whether or not the rect and the other object are equal.</returns>
public override bool Equals(object obj)
{
if (obj is Rect2)
@@ -382,32 +421,49 @@ namespace Godot
return false;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this rect and <paramref name="other"/> are equal.
+ /// </summary>
+ /// <param name="other">The other rect to compare.</param>
+ /// <returns>Whether or not the rects are equal.</returns>
public bool Equals(Rect2 other)
{
return _position.Equals(other._position) && _size.Equals(other._size);
}
/// <summary>
- /// Returns true if this Rect2 and `other` are approximately equal, by running
- /// <see cref="Vector2.IsEqualApprox(Vector2)"/> on each component.
+ /// Returns <see langword="true"/> if this rect and <paramref name="other"/> are approximately equal,
+ /// by running <see cref="Vector2.IsEqualApprox(Vector2)"/> on each component.
/// </summary>
- /// <param name="other">The other Rect2 to compare.</param>
- /// <returns>Whether or not the Rect2s are approximately equal.</returns>
+ /// <param name="other">The other rect to compare.</param>
+ /// <returns>Whether or not the rects are approximately equal.</returns>
public bool IsEqualApprox(Rect2 other)
{
return _position.IsEqualApprox(other._position) && _size.IsEqualApprox(other.Size);
}
+ /// <summary>
+ /// Serves as the hash function for <see cref="Rect2"/>.
+ /// </summary>
+ /// <returns>A hash code for this rect.</returns>
public override int GetHashCode()
{
return _position.GetHashCode() ^ _size.GetHashCode();
}
+ /// <summary>
+ /// Converts this <see cref="Rect2"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this rect.</returns>
public override string ToString()
{
return $"{_position}, {_size}";
}
+ /// <summary>
+ /// Converts this <see cref="Rect2"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this rect.</returns>
public string ToString(string format)
{
return $"{_position.ToString(format)}, {_size.ToString(format)}";
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2i.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2i.cs
index 7fb6614d2c..03f406a910 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2i.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Rect2i.cs
@@ -15,7 +15,7 @@ namespace Godot
private Vector2i _size;
/// <summary>
- /// Beginning corner. Typically has values lower than End.
+ /// Beginning corner. Typically has values lower than <see cref="End"/>.
/// </summary>
/// <value>Directly uses a private field.</value>
public Vector2i Position
@@ -25,7 +25,7 @@ namespace Godot
}
/// <summary>
- /// Size from Position to End. Typically all components are positive.
+ /// Size from <see cref="Position"/> to <see cref="End"/>. Typically all components are positive.
/// If the size is negative, you can use <see cref="Abs"/> to fix it.
/// </summary>
/// <value>Directly uses a private field.</value>
@@ -36,10 +36,13 @@ namespace Godot
}
/// <summary>
- /// Ending corner. This is calculated as <see cref="Position"/> plus
- /// <see cref="Size"/>. Setting this value will change the size.
+ /// Ending corner. This is calculated as <see cref="Position"/> plus <see cref="Size"/>.
+ /// Setting this value will change the size.
/// </summary>
- /// <value>Getting is equivalent to `value = Position + Size`, setting is equivalent to `Size = value - Position`.</value>
+ /// <value>
+ /// Getting is equivalent to <paramref name="value"/> = <see cref="Position"/> + <see cref="Size"/>,
+ /// setting is equivalent to <see cref="Size"/> = <paramref name="value"/> - <see cref="Position"/>
+ /// </value>
public Vector2i End
{
get { return _position + _size; }
@@ -47,7 +50,7 @@ namespace Godot
}
/// <summary>
- /// The area of this Rect2i.
+ /// The area of this <see cref="Rect2i"/>.
/// </summary>
/// <value>Equivalent to <see cref="GetArea()"/>.</value>
public int Area
@@ -56,10 +59,10 @@ namespace Godot
}
/// <summary>
- /// Returns a Rect2i with equivalent position and size, modified so that
+ /// Returns a <see cref="Rect2i"/> with equivalent position and size, modified so that
/// the top-left corner is the origin and width and height are positive.
/// </summary>
- /// <returns>The modified Rect2i.</returns>
+ /// <returns>The modified <see cref="Rect2i"/>.</returns>
public Rect2i Abs()
{
Vector2i end = End;
@@ -68,14 +71,17 @@ namespace Godot
}
/// <summary>
- /// Returns the intersection of this Rect2i and `b`.
- /// If the rectangles do not intersect, an empty Rect2i is returned.
+ /// Returns the intersection of this <see cref="Rect2i"/> and <paramref name="b"/>.
+ /// If the rectangles do not intersect, an empty <see cref="Rect2i"/> is returned.
/// </summary>
- /// <param name="b">The other Rect2i.</param>
- /// <returns>The intersection of this Rect2i and `b`, or an empty Rect2i if they do not intersect.</returns>
+ /// <param name="b">The other <see cref="Rect2i"/>.</param>
+ /// <returns>
+ /// The intersection of this <see cref="Rect2i"/> and <paramref name="b"/>,
+ /// or an empty <see cref="Rect2i"/> if they do not intersect.
+ /// </returns>
public Rect2i Intersection(Rect2i b)
{
- var newRect = b;
+ Rect2i newRect = b;
if (!Intersects(newRect))
{
@@ -95,10 +101,12 @@ namespace Godot
}
/// <summary>
- /// Returns true if this Rect2i completely encloses another one.
+ /// Returns <see langword="true"/> if this <see cref="Rect2i"/> completely encloses another one.
/// </summary>
- /// <param name="b">The other Rect2i that may be enclosed.</param>
- /// <returns>A bool for whether or not this Rect2i encloses `b`.</returns>
+ /// <param name="b">The other <see cref="Rect2i"/> that may be enclosed.</param>
+ /// <returns>
+ /// A <see langword="bool"/> for whether or not this <see cref="Rect2i"/> encloses <paramref name="b"/>.
+ /// </returns>
public bool Encloses(Rect2i b)
{
return b._position.x >= _position.x && b._position.y >= _position.y &&
@@ -107,13 +115,13 @@ namespace Godot
}
/// <summary>
- /// Returns this Rect2i expanded to include a given point.
+ /// Returns this <see cref="Rect2i"/> expanded to include a given point.
/// </summary>
/// <param name="to">The point to include.</param>
- /// <returns>The expanded Rect2i.</returns>
+ /// <returns>The expanded <see cref="Rect2i"/>.</returns>
public Rect2i Expand(Vector2i to)
{
- var expanded = this;
+ Rect2i expanded = this;
Vector2i begin = expanded._position;
Vector2i end = expanded._position + expanded._size;
@@ -143,7 +151,7 @@ namespace Godot
}
/// <summary>
- /// Returns the area of the Rect2.
+ /// Returns the area of the <see cref="Rect2i"/>.
/// </summary>
/// <returns>The area.</returns>
public int GetArea()
@@ -152,13 +160,28 @@ namespace Godot
}
/// <summary>
- /// Returns a copy of the Rect2i grown by the specified amount on all sides.
+ /// Returns the center of the <see cref="Rect2i"/>, which is equal
+ /// to <see cref="Position"/> + (<see cref="Size"/> / 2).
+ /// If <see cref="Size"/> is an odd number, the returned center
+ /// value will be rounded towards <see cref="Position"/>.
/// </summary>
+ /// <returns>The center.</returns>
+ public Vector2i GetCenter()
+ {
+ return _position + (_size / 2);
+ }
+
+ /// <summary>
+ /// Returns a copy of the <see cref="Rect2i"/> grown by the specified amount
+ /// on all sides.
+ /// </summary>
+ /// <seealso cref="GrowIndividual(int, int, int, int)"/>
+ /// <seealso cref="GrowSide(Side, int)"/>
/// <param name="by">The amount to grow by.</param>
- /// <returns>The grown Rect2i.</returns>
+ /// <returns>The grown <see cref="Rect2i"/>.</returns>
public Rect2i Grow(int by)
{
- var g = this;
+ Rect2i g = this;
g._position.x -= by;
g._position.y -= by;
@@ -169,16 +192,19 @@ namespace Godot
}
/// <summary>
- /// Returns a copy of the Rect2i grown by the specified amount on each side individually.
+ /// Returns a copy of the <see cref="Rect2i"/> grown by the specified amount
+ /// on each side individually.
/// </summary>
+ /// <seealso cref="Grow(int)"/>
+ /// <seealso cref="GrowSide(Side, int)"/>
/// <param name="left">The amount to grow by on the left side.</param>
/// <param name="top">The amount to grow by on the top side.</param>
/// <param name="right">The amount to grow by on the right side.</param>
/// <param name="bottom">The amount to grow by on the bottom side.</param>
- /// <returns>The grown Rect2i.</returns>
+ /// <returns>The grown <see cref="Rect2i"/>.</returns>
public Rect2i GrowIndividual(int left, int top, int right, int bottom)
{
- var g = this;
+ Rect2i g = this;
g._position.x -= left;
g._position.y -= top;
@@ -189,14 +215,17 @@ namespace Godot
}
/// <summary>
- /// Returns a copy of the Rect2i grown by the specified amount on the specified Side.
+ /// Returns a copy of the <see cref="Rect2i"/> grown by the specified amount
+ /// on the specified <see cref="Side"/>.
/// </summary>
+ /// <seealso cref="Grow(int)"/>
+ /// <seealso cref="GrowIndividual(int, int, int, int)"/>
/// <param name="side">The side to grow.</param>
/// <param name="by">The amount to grow by.</param>
- /// <returns>The grown Rect2i.</returns>
+ /// <returns>The grown <see cref="Rect2i"/>.</returns>
public Rect2i GrowSide(Side side, int by)
{
- var g = this;
+ Rect2i g = this;
g = g.GrowIndividual(Side.Left == side ? by : 0,
Side.Top == side ? by : 0,
@@ -207,19 +236,25 @@ namespace Godot
}
/// <summary>
- /// Returns true if the Rect2i is flat or empty, or false otherwise.
+ /// Returns <see langword="true"/> if the <see cref="Rect2i"/> is flat or empty,
+ /// or <see langword="false"/> otherwise.
/// </summary>
- /// <returns>A bool for whether or not the Rect2i has area.</returns>
+ /// <returns>
+ /// A <see langword="bool"/> for whether or not the <see cref="Rect2i"/> has area.
+ /// </returns>
public bool HasNoArea()
{
return _size.x <= 0 || _size.y <= 0;
}
/// <summary>
- /// Returns true if the Rect2i contains a point, or false otherwise.
+ /// Returns <see langword="true"/> if the <see cref="Rect2i"/> contains a point,
+ /// or <see langword="false"/> otherwise.
/// </summary>
/// <param name="point">The point to check.</param>
- /// <returns>A bool for whether or not the Rect2i contains `point`.</returns>
+ /// <returns>
+ /// A <see langword="bool"/> for whether or not the <see cref="Rect2i"/> contains <paramref name="point"/>.
+ /// </returns>
public bool HasPoint(Vector2i point)
{
if (point.x < _position.x)
@@ -236,15 +271,16 @@ namespace Godot
}
/// <summary>
- /// Returns true if the Rect2i overlaps with `b`
+ /// Returns <see langword="true"/> if the <see cref="Rect2i"/> overlaps with <paramref name="b"/>
/// (i.e. they have at least one point in common).
///
- /// If `includeBorders` is true, they will also be considered overlapping
- /// if their borders touch, even without intersection.
+ /// If <paramref name="includeBorders"/> is <see langword="true"/>,
+ /// they will also be considered overlapping if their borders touch,
+ /// even without intersection.
/// </summary>
- /// <param name="b">The other Rect2i to check for intersections with.</param>
+ /// <param name="b">The other <see cref="Rect2i"/> to check for intersections with.</param>
/// <param name="includeBorders">Whether or not to consider borders.</param>
- /// <returns>A bool for whether or not they are intersecting.</returns>
+ /// <returns>A <see langword="bool"/> for whether or not they are intersecting.</returns>
public bool Intersects(Rect2i b, bool includeBorders = false)
{
if (includeBorders)
@@ -274,10 +310,10 @@ namespace Godot
}
/// <summary>
- /// Returns a larger Rect2i that contains this Rect2i and `b`.
+ /// Returns a larger <see cref="Rect2i"/> that contains this <see cref="Rect2i"/> and <paramref name="b"/>.
/// </summary>
- /// <param name="b">The other Rect2i.</param>
- /// <returns>The merged Rect2i.</returns>
+ /// <param name="b">The other <see cref="Rect2i"/>.</param>
+ /// <returns>The merged <see cref="Rect2i"/>.</returns>
public Rect2i Merge(Rect2i b)
{
Rect2i newRect;
@@ -294,7 +330,7 @@ namespace Godot
}
/// <summary>
- /// Constructs a Rect2i from a position and size.
+ /// Constructs a <see cref="Rect2i"/> from a position and size.
/// </summary>
/// <param name="position">The position.</param>
/// <param name="size">The size.</param>
@@ -305,7 +341,7 @@ namespace Godot
}
/// <summary>
- /// Constructs a Rect2i from a position, width, and height.
+ /// Constructs a <see cref="Rect2i"/> from a position, width, and height.
/// </summary>
/// <param name="position">The position.</param>
/// <param name="width">The width.</param>
@@ -317,7 +353,7 @@ namespace Godot
}
/// <summary>
- /// Constructs a Rect2i from x, y, and size.
+ /// Constructs a <see cref="Rect2i"/> from x, y, and size.
/// </summary>
/// <param name="x">The position's X coordinate.</param>
/// <param name="y">The position's Y coordinate.</param>
@@ -329,7 +365,7 @@ namespace Godot
}
/// <summary>
- /// Constructs a Rect2i from x, y, width, and height.
+ /// Constructs a <see cref="Rect2i"/> from x, y, width, and height.
/// </summary>
/// <param name="x">The position's X coordinate.</param>
/// <param name="y">The position's Y coordinate.</param>
@@ -351,16 +387,29 @@ namespace Godot
return !left.Equals(right);
}
+ /// <summary>
+ /// Converts this <see cref="Rect2i"/> to a <see cref="Rect2"/>.
+ /// </summary>
+ /// <param name="value">The rect to convert.</param>
public static implicit operator Rect2(Rect2i value)
{
return new Rect2(value._position, value._size);
}
+ /// <summary>
+ /// Converts a <see cref="Rect2"/> to a <see cref="Rect2i"/>.
+ /// </summary>
+ /// <param name="value">The rect to convert.</param>
public static explicit operator Rect2i(Rect2 value)
{
return new Rect2i((Vector2i)value.Position, (Vector2i)value.Size);
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this rect and <paramref name="obj"/> are equal.
+ /// </summary>
+ /// <param name="obj">The other object to compare.</param>
+ /// <returns>Whether or not the rect and the other object are equal.</returns>
public override bool Equals(object obj)
{
if (obj is Rect2i)
@@ -371,21 +420,38 @@ namespace Godot
return false;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this rect and <paramref name="other"/> are equal.
+ /// </summary>
+ /// <param name="other">The other rect to compare.</param>
+ /// <returns>Whether or not the rects are equal.</returns>
public bool Equals(Rect2i other)
{
return _position.Equals(other._position) && _size.Equals(other._size);
}
+ /// <summary>
+ /// Serves as the hash function for <see cref="Rect2i"/>.
+ /// </summary>
+ /// <returns>A hash code for this rect.</returns>
public override int GetHashCode()
{
return _position.GetHashCode() ^ _size.GetHashCode();
}
+ /// <summary>
+ /// Converts this <see cref="Rect2i"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this rect.</returns>
public override string ToString()
{
return $"{_position}, {_size}";
}
+ /// <summary>
+ /// Converts this <see cref="Rect2i"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this rect.</returns>
public string ToString(string format)
{
return $"{_position.ToString(format)}, {_size.ToString(format)}";
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/SignalAwaiter.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/SignalAwaiter.cs
index 4dc630238b..2ba0493002 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/SignalAwaiter.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/SignalAwaiter.cs
@@ -5,9 +5,9 @@ namespace Godot
{
public class SignalAwaiter : IAwaiter<object[]>, IAwaitable<object[]>
{
- private bool completed;
- private object[] result;
- private Action action;
+ private bool _completed;
+ private object[] _result;
+ private Action _action;
public SignalAwaiter(Object source, StringName signal, Object target)
{
@@ -15,24 +15,24 @@ namespace Godot
}
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static Error godot_icall_SignalAwaiter_connect(IntPtr source, IntPtr signal, IntPtr target, SignalAwaiter awaiter);
+ internal static extern Error godot_icall_SignalAwaiter_connect(IntPtr source, IntPtr signal, IntPtr target, SignalAwaiter awaiter);
public bool IsCompleted
{
get
{
- return completed;
+ return _completed;
}
}
public void OnCompleted(Action action)
{
- this.action = action;
+ this._action = action;
}
public object[] GetResult()
{
- return result;
+ return _result;
}
public IAwaiter<object[]> GetAwaiter()
@@ -42,13 +42,9 @@ namespace Godot
internal void SignalCallback(object[] args)
{
- completed = true;
- result = args;
-
- if (action != null)
- {
- action();
- }
+ _completed = true;
+ _result = args;
+ _action?.Invoke();
}
}
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/SignalInfo.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/SignalInfo.cs
index dc92de7a61..5680c9d55a 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/SignalInfo.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/SignalInfo.cs
@@ -1,13 +1,28 @@
namespace Godot
{
+ /// <summary>
+ /// Represents a signal defined in an object.
+ /// </summary>
public struct SignalInfo
{
private readonly Object _owner;
private readonly StringName _signalName;
+ /// <summary>
+ /// Object that contains the signal.
+ /// </summary>
public Object Owner => _owner;
+ /// <summary>
+ /// Name of the signal.
+ /// </summary>
public StringName Name => _signalName;
+ /// <summary>
+ /// Creates a new <see cref="Signal"/> with the name <paramref name="name"/>
+ /// in the specified <paramref name="owner"/>.
+ /// </summary>
+ /// <param name="owner">Object that contains the signal.</param>
+ /// <param name="name">Name of the signal.</param>
public SignalInfo(Object owner, StringName name)
{
_owner = owner;
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
index d9665cbf2b..6b3eb09581 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
@@ -8,6 +8,9 @@ using System.Text.RegularExpressions;
namespace Godot
{
+ /// <summary>
+ /// Extension methods to manipulate strings.
+ /// </summary>
public static class StringExtensions
{
private static int GetSliceCount(this string instance, string splitter)
@@ -64,7 +67,12 @@ namespace Godot
/// <summary>
/// If the string is a path to a file, return the path to the file without the extension.
/// </summary>
- public static string BaseName(this string instance)
+ /// <seealso cref="GetExtension(string)"/>
+ /// <seealso cref="GetBaseDir(string)"/>
+ /// <seealso cref="GetFile(string)"/>
+ /// <param name="instance">The path to a file.</param>
+ /// <returns>The path to the file without the extension.</returns>
+ public static string GetBaseName(this string instance)
{
int index = instance.LastIndexOf('.');
@@ -75,19 +83,25 @@ namespace Godot
}
/// <summary>
- /// Return <see langword="true"/> if the strings begins with the given string.
+ /// Returns <see langword="true"/> if the strings begins
+ /// with the given string <paramref name="text"/>.
/// </summary>
+ /// <param name="instance">The string to check.</param>
+ /// <param name="text">The beginning string.</param>
+ /// <returns>If the string begins with the given string.</returns>
public static bool BeginsWith(this string instance, string text)
{
return instance.StartsWith(text);
}
/// <summary>
- /// Return the bigrams (pairs of consecutive letters) of this string.
+ /// Returns the bigrams (pairs of consecutive letters) of this string.
/// </summary>
+ /// <param name="instance">The string that will be used.</param>
+ /// <returns>The bigrams of this string.</returns>
public static string[] Bigrams(this string instance)
{
- var b = new string[instance.Length - 1];
+ string[] b = new string[instance.Length - 1];
for (int i = 0; i < b.Length; i++)
{
@@ -99,8 +113,8 @@ namespace Godot
/// <summary>
/// Converts a string containing a binary number into an integer.
- /// Binary strings can either be prefixed with `0b` or not,
- /// and they can also start with a `-` before the optional prefix.
+ /// Binary strings can either be prefixed with <c>0b</c> or not,
+ /// and they can also start with a <c>-</c> before the optional prefix.
/// </summary>
/// <param name="instance">The string to convert.</param>
/// <returns>The converted string.</returns>
@@ -128,8 +142,14 @@ namespace Godot
}
/// <summary>
- /// Return the amount of substrings in string.
+ /// Returns the amount of substrings <paramref name="what"/> in the string.
/// </summary>
+ /// <param name="instance">The string where the substring will be searched.</param>
+ /// <param name="what">The substring that will be counted.</param>
+ /// <param name="caseSensitive">If the search is case sensitive.</param>
+ /// <param name="from">Index to start searching from.</param>
+ /// <param name="to">Index to stop searching at.</param>
+ /// <returns>Amount of substrings in the string.</returns>
public static int Count(this string instance, string what, bool caseSensitive = true, int from = 0, int to = 0)
{
if (what.Length == 0)
@@ -188,8 +208,10 @@ namespace Godot
}
/// <summary>
- /// Return a copy of the string with special characters escaped using the C language standard.
+ /// Returns a copy of the string with special characters escaped using the C language standard.
/// </summary>
+ /// <param name="instance">The string to escape.</param>
+ /// <returns>The escaped string.</returns>
public static string CEscape(this string instance)
{
var sb = new StringBuilder(string.Copy(instance));
@@ -210,9 +232,11 @@ namespace Godot
}
/// <summary>
- /// Return a copy of the string with escaped characters replaced by their meanings
+ /// Returns a copy of the string with escaped characters replaced by their meanings
/// according to the C language standard.
/// </summary>
+ /// <param name="instance">The string to unescape.</param>
+ /// <returns>The unescaped string.</returns>
public static string CUnescape(this string instance)
{
var sb = new StringBuilder(string.Copy(instance));
@@ -233,15 +257,17 @@ namespace Godot
}
/// <summary>
- /// Change the case of some letters. Replace underscores with spaces, convert all letters
+ /// Changes the case of some letters. Replace underscores with spaces, convert all letters
/// to lowercase then capitalize first and every letter following the space character.
/// For <c>capitalize camelCase mixed_with_underscores</c> it will return
/// <c>Capitalize Camelcase Mixed With Underscores</c>.
/// </summary>
+ /// <param name="instance">The string to capitalize.</param>
+ /// <returns>The capitalized string.</returns>
public static string Capitalize(this string instance)
{
string aux = instance.Replace("_", " ").ToLower();
- var cap = string.Empty;
+ string cap = string.Empty;
for (int i = 0; i < aux.GetSliceCount(" "); i++)
{
@@ -259,16 +285,27 @@ namespace Godot
}
/// <summary>
- /// Perform a case-sensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
+ /// Performs a case-sensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
/// </summary>
+ /// <seealso cref="NocasecmpTo(string, string)"/>
+ /// <seealso cref="CompareTo(string, string, bool)"/>
+ /// <param name="instance">The string to compare.</param>
+ /// <param name="to">The other string to compare.</param>
+ /// <returns>-1 if less, 0 if equal and +1 if greater.</returns>
public static int CasecmpTo(this string instance, string to)
{
return instance.CompareTo(to, caseSensitive: true);
}
/// <summary>
- /// Perform a comparison to another string, return -1 if less, 0 if equal and +1 if greater.
+ /// Performs a comparison to another string, return -1 if less, 0 if equal and +1 if greater.
/// </summary>
+ /// <param name="instance">The string to compare.</param>
+ /// <param name="to">The other string to compare.</param>
+ /// <param name="caseSensitive">
+ /// If <see langword="true"/>, the comparison will be case sensitive.
+ /// </param>
+ /// <returns>-1 if less, 0 if equal and +1 if greater.</returns>
public static int CompareTo(this string instance, string to, bool caseSensitive = true)
{
if (string.IsNullOrEmpty(instance))
@@ -321,8 +358,12 @@ namespace Godot
}
/// <summary>
- /// Return <see langword="true"/> if the strings ends with the given string.
+ /// Returns <see langword="true"/> if the strings ends
+ /// with the given string <paramref name="text"/>.
/// </summary>
+ /// <param name="instance">The string to check.</param>
+ /// <param name="text">The ending string.</param>
+ /// <returns>If the string ends with the given string.</returns>
public static bool EndsWith(this string instance, string text)
{
return instance.EndsWith(text);
@@ -331,15 +372,37 @@ namespace Godot
/// <summary>
/// Erase <paramref name="chars"/> characters from the string starting from <paramref name="pos"/>.
/// </summary>
+ /// <param name="instance">The string to modify.</param>
+ /// <param name="pos">Starting position from which to erase.</param>
+ /// <param name="chars">Amount of characters to erase.</param>
public static void Erase(this StringBuilder instance, int pos, int chars)
{
instance.Remove(pos, chars);
}
/// <summary>
- /// If the string is a path to a file, return the extension.
- /// </summary>
- public static string Extension(this string instance)
+ /// Returns the extension without the leading period character (<c>.</c>)
+ /// if the string is a valid file name or path. If the string does not contain
+ /// an extension, returns an empty string instead.
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// GD.Print("/path/to/file.txt".GetExtension()) // "txt"
+ /// GD.Print("file.txt".GetExtension()) // "txt"
+ /// GD.Print("file.sample.txt".GetExtension()) // "txt"
+ /// GD.Print(".txt".GetExtension()) // "txt"
+ /// GD.Print("file.txt.".GetExtension()) // "" (empty string)
+ /// GD.Print("file.txt..".GetExtension()) // "" (empty string)
+ /// GD.Print("txt".GetExtension()) // "" (empty string)
+ /// GD.Print("".GetExtension()) // "" (empty string)
+ /// </code>
+ /// </example>
+ /// <seealso cref="GetBaseName(string)"/>
+ /// <seealso cref="GetBaseDir(string)"/>
+ /// <seealso cref="GetFile(string)"/>
+ /// <param name="instance">The path to a file.</param>
+ /// <returns>The extension of the file or an empty string.</returns>
+ public static string GetExtension(this string instance)
{
int pos = instance.FindLast(".");
@@ -352,6 +415,10 @@ namespace Godot
/// <summary>
/// Find the first occurrence of a substring. Optionally, the search starting position can be passed.
/// </summary>
+ /// <param name="instance">The string that will be searched.</param>
+ /// <param name="what">The substring to find.</param>
+ /// <param name="from">The search starting position.</param>
+ /// <param name="caseSensitive">If <see langword="true"/>, the search is case sensitive.</param>
/// <returns>The starting position of the substring, or -1 if not found.</returns>
public static int Find(this string instance, string what, int from = 0, bool caseSensitive = true)
{
@@ -361,6 +428,14 @@ namespace Godot
/// <summary>
/// Find the first occurrence of a char. Optionally, the search starting position can be passed.
/// </summary>
+ /// <seealso cref="Find(string, string, int, bool)"/>
+ /// <seealso cref="FindLast(string, string, bool)"/>
+ /// <seealso cref="FindLast(string, string, int, bool)"/>
+ /// <seealso cref="FindN(string, string, int)"/>
+ /// <param name="instance">The string that will be searched.</param>
+ /// <param name="what">The substring to find.</param>
+ /// <param name="from">The search starting position.</param>
+ /// <param name="caseSensitive">If <see langword="true"/>, the search is case sensitive.</param>
/// <returns>The first instance of the char, or -1 if not found.</returns>
public static int Find(this string instance, char what, int from = 0, bool caseSensitive = true)
{
@@ -370,6 +445,13 @@ namespace Godot
}
/// <summary>Find the last occurrence of a substring.</summary>
+ /// <seealso cref="Find(string, string, int, bool)"/>
+ /// <seealso cref="Find(string, char, int, bool)"/>
+ /// <seealso cref="FindLast(string, string, int, bool)"/>
+ /// <seealso cref="FindN(string, string, int)"/>
+ /// <param name="instance">The string that will be searched.</param>
+ /// <param name="what">The substring to find.</param>
+ /// <param name="caseSensitive">If <see langword="true"/>, the search is case sensitive.</param>
/// <returns>The starting position of the substring, or -1 if not found.</returns>
public static int FindLast(this string instance, string what, bool caseSensitive = true)
{
@@ -377,6 +459,14 @@ namespace Godot
}
/// <summary>Find the last occurrence of a substring specifying the search starting position.</summary>
+ /// <seealso cref="Find(string, string, int, bool)"/>
+ /// <seealso cref="Find(string, char, int, bool)"/>
+ /// <seealso cref="FindLast(string, string, bool)"/>
+ /// <seealso cref="FindN(string, string, int)"/>
+ /// <param name="instance">The string that will be searched.</param>
+ /// <param name="what">The substring to find.</param>
+ /// <param name="from">The search starting position.</param>
+ /// <param name="caseSensitive">If <see langword="true"/>, the search is case sensitive.</param>
/// <returns>The starting position of the substring, or -1 if not found.</returns>
public static int FindLast(this string instance, string what, int from, bool caseSensitive = true)
{
@@ -387,6 +477,13 @@ namespace Godot
/// Find the first occurrence of a substring but search as case-insensitive.
/// Optionally, the search starting position can be passed.
/// </summary>
+ /// <seealso cref="Find(string, string, int, bool)"/>
+ /// <seealso cref="Find(string, char, int, bool)"/>
+ /// <seealso cref="FindLast(string, string, bool)"/>
+ /// <seealso cref="FindLast(string, string, int, bool)"/>
+ /// <param name="instance">The string that will be searched.</param>
+ /// <param name="what">The substring to find.</param>
+ /// <param name="from">The search starting position.</param>
/// <returns>The starting position of the substring, or -1 if not found.</returns>
public static int FindN(this string instance, string what, int from = 0)
{
@@ -396,25 +493,30 @@ namespace Godot
/// <summary>
/// If the string is a path to a file, return the base directory.
/// </summary>
+ /// <seealso cref="GetBaseName(string)"/>
+ /// <seealso cref="GetExtension(string)"/>
+ /// <seealso cref="GetFile(string)"/>
+ /// <param name="instance">The path to a file.</param>
+ /// <returns>The base directory.</returns>
public static string GetBaseDir(this string instance)
{
int basepos = instance.Find("://");
string rs;
- var @base = string.Empty;
+ string directory = string.Empty;
if (basepos != -1)
{
- var end = basepos + 3;
+ int end = basepos + 3;
rs = instance.Substring(end);
- @base = instance.Substring(0, end);
+ directory = instance.Substring(0, end);
}
else
{
if (instance.BeginsWith("/"))
{
rs = instance.Substring(1);
- @base = "/";
+ directory = "/";
}
else
{
@@ -425,14 +527,19 @@ namespace Godot
int sep = Mathf.Max(rs.FindLast("/"), rs.FindLast("\\"));
if (sep == -1)
- return @base;
+ return directory;
- return @base + rs.Substr(0, sep);
+ return directory + rs.Substr(0, sep);
}
/// <summary>
/// If the string is a path to a file, return the file and ignore the base directory.
/// </summary>
+ /// <seealso cref="GetBaseName(string)"/>
+ /// <seealso cref="GetExtension(string)"/>
+ /// <seealso cref="GetBaseDir(string)"/>
+ /// <param name="instance">The path to a file.</param>
+ /// <returns>The file name.</returns>
public static string GetFile(this string instance)
{
int sep = Mathf.Max(instance.FindLast("/"), instance.FindLast("\\"));
@@ -475,6 +582,8 @@ namespace Godot
/// <summary>
/// Hash the string and return a 32 bits unsigned integer.
/// </summary>
+ /// <param name="instance">The string to hash.</param>
+ /// <returns>The calculated hash of the string.</returns>
public static uint Hash(this string instance)
{
uint hash = 5381;
@@ -494,7 +603,7 @@ namespace Godot
/// <returns>The hexadecimal representation of this byte.</returns>
internal static string HexEncode(this byte b)
{
- var ret = string.Empty;
+ string ret = string.Empty;
for (int i = 0; i < 2; i++)
{
@@ -524,7 +633,7 @@ namespace Godot
/// <returns>The hexadecimal representation of this byte array.</returns>
public static string HexEncode(this byte[] bytes)
{
- var ret = string.Empty;
+ string ret = string.Empty;
foreach (byte b in bytes)
{
@@ -536,8 +645,8 @@ namespace Godot
/// <summary>
/// Converts a string containing a hexadecimal number into an integer.
- /// Hexadecimal strings can either be prefixed with `0x` or not,
- /// and they can also start with a `-` before the optional prefix.
+ /// Hexadecimal strings can either be prefixed with <c>0x</c> or not,
+ /// and they can also start with a <c>-</c> before the optional prefix.
/// </summary>
/// <param name="instance">The string to convert.</param>
/// <returns>The converted string.</returns>
@@ -565,17 +674,29 @@ namespace Godot
}
/// <summary>
- /// Insert a substring at a given position.
+ /// Inserts a substring at a given position.
/// </summary>
+ /// <param name="instance">The string to modify.</param>
+ /// <param name="pos">Position at which to insert the substring.</param>
+ /// <param name="what">Substring to insert.</param>
+ /// <returns>
+ /// The string with <paramref name="what"/> inserted at the given
+ /// position <paramref name="pos"/>.
+ /// </returns>
public static string Insert(this string instance, int pos, string what)
{
return instance.Insert(pos, what);
}
/// <summary>
- /// If the string is a path to a file or directory, return <see langword="true"/> if the path is absolute.
+ /// Returns <see langword="true"/> if the string is a path to a file or
+ /// directory and its startign point is explicitly defined. This includes
+ /// <c>res://</c>, <c>user://</c>, <c>C:\</c>, <c>/</c>, etc.
/// </summary>
- public static bool IsAbsPath(this string instance)
+ /// <seealso cref="IsRelativePath(string)"/>
+ /// <param name="instance">The string to check.</param>
+ /// <returns>If the string is an absolute path.</returns>
+ public static bool IsAbsolutePath(this string instance)
{
if (string.IsNullOrEmpty(instance))
return false;
@@ -586,16 +707,27 @@ namespace Godot
}
/// <summary>
- /// If the string is a path to a file or directory, return <see langword="true"/> if the path is relative.
+ /// Returns <see langword="true"/> if the string is a path to a file or
+ /// directory and its starting point is implicitly defined within the
+ /// context it is being used. The starting point may refer to the current
+ /// directory (<c>./</c>), or the current <see cref="Node"/>.
/// </summary>
- public static bool IsRelPath(this string instance)
+ /// <seealso cref="IsAbsolutePath(string)"/>
+ /// <param name="instance">The string to check.</param>
+ /// <returns>If the string is a relative path.</returns>
+ public static bool IsRelativePath(this string instance)
{
- return !IsAbsPath(instance);
+ return !IsAbsolutePath(instance);
}
/// <summary>
/// Check whether this string is a subsequence of the given string.
/// </summary>
+ /// <seealso cref="IsSubsequenceOfI(string, string)"/>
+ /// <param name="instance">The subsequence to search.</param>
+ /// <param name="text">The string that contains the subsequence.</param>
+ /// <param name="caseSensitive">If <see langword="true"/>, the check is case sensitive.</param>
+ /// <returns>If the string is a subsequence of the given string.</returns>
public static bool IsSubsequenceOf(this string instance, string text, bool caseSensitive = true)
{
int len = instance.Length;
@@ -639,6 +771,10 @@ namespace Godot
/// <summary>
/// Check whether this string is a subsequence of the given string, ignoring case differences.
/// </summary>
+ /// <seealso cref="IsSubsequenceOf(string, string, bool)"/>
+ /// <param name="instance">The subsequence to search.</param>
+ /// <param name="text">The string that contains the subsequence.</param>
+ /// <returns>If the string is a subsequence of the given string.</returns>
public static bool IsSubsequenceOfI(this string instance, string text)
{
return instance.IsSubsequenceOf(text, caseSensitive: false);
@@ -647,6 +783,8 @@ namespace Godot
/// <summary>
/// Check whether the string contains a valid <see langword="float"/>.
/// </summary>
+ /// <param name="instance">The string to check.</param>
+ /// <returns>If the string contains a valid floating point number.</returns>
public static bool IsValidFloat(this string instance)
{
float f;
@@ -656,6 +794,8 @@ namespace Godot
/// <summary>
/// Check whether the string contains a valid color in HTML notation.
/// </summary>
+ /// <param name="instance">The string to check.</param>
+ /// <returns>If the string contains a valid HTML color.</returns>
public static bool IsValidHtmlColor(this string instance)
{
return Color.HtmlIsValid(instance);
@@ -666,6 +806,8 @@ namespace Godot
/// programming languages, a valid identifier may contain only letters,
/// digits and underscores (_) and the first character may not be a digit.
/// </summary>
+ /// <param name="instance">The string to check.</param>
+ /// <returns>If the string contains a valid identifier.</returns>
public static bool IsValidIdentifier(this string instance)
{
int len = instance.Length;
@@ -673,18 +815,15 @@ namespace Godot
if (len == 0)
return false;
+ if (instance[0] >= '0' && instance[0] <= '9')
+ return false; // Identifiers cannot start with numbers.
+
for (int i = 0; i < len; i++)
{
- if (i == 0)
- {
- if (instance[0] >= '0' && instance[0] <= '9')
- return false; // Don't start with number plz
- }
-
- bool validChar = instance[i] >= '0' &&
- instance[i] <= '9' || instance[i] >= 'a' &&
- instance[i] <= 'z' || instance[i] >= 'A' &&
- instance[i] <= 'Z' || instance[i] == '_';
+ bool validChar = instance[i] == '_' ||
+ (instance[i] >= 'a' && instance[i] <= 'z') ||
+ (instance[i] >= 'A' && instance[i] <= 'Z') ||
+ (instance[i] >= '0' && instance[i] <= '9');
if (!validChar)
return false;
@@ -696,6 +835,8 @@ namespace Godot
/// <summary>
/// Check whether the string contains a valid integer.
/// </summary>
+ /// <param name="instance">The string to check.</param>
+ /// <returns>If the string contains a valid integer.</returns>
public static bool IsValidInteger(this string instance)
{
int f;
@@ -705,6 +846,8 @@ namespace Godot
/// <summary>
/// Check whether the string contains a valid IP address.
/// </summary>
+ /// <param name="instance">The string to check.</param>
+ /// <returns>If the string contains a valid IP address.</returns>
public static bool IsValidIPAddress(this string instance)
{
// TODO: Support IPv6 addresses
@@ -728,8 +871,10 @@ namespace Godot
}
/// <summary>
- /// Return a copy of the string with special characters escaped using the JSON standard.
+ /// Returns a copy of the string with special characters escaped using the JSON standard.
/// </summary>
+ /// <param name="instance">The string to escape.</param>
+ /// <returns>The escaped string.</returns>
public static string JSONEscape(this string instance)
{
var sb = new StringBuilder(string.Copy(instance));
@@ -747,8 +892,12 @@ namespace Godot
}
/// <summary>
- /// Return an amount of characters from the left of the string.
+ /// Returns an amount of characters from the left of the string.
/// </summary>
+ /// <seealso cref="Right(string, int)"/>
+ /// <param name="instance">The original string.</param>
+ /// <param name="pos">The position in the string where the left side ends.</param>
+ /// <returns>The left side of the string from the given position.</returns>
public static string Left(this string instance, int pos)
{
if (pos <= 0)
@@ -761,8 +910,10 @@ namespace Godot
}
/// <summary>
- /// Return the length of the string in characters.
+ /// Returns the length of the string in characters.
/// </summary>
+ /// <param name="instance">The string to check.</param>
+ /// <returns>The length of the string.</returns>
public static int Length(this string instance)
{
return instance.Length;
@@ -771,6 +922,7 @@ namespace Godot
/// <summary>
/// Returns a copy of the string with characters removed from the left.
/// </summary>
+ /// <seealso cref="RStrip(string, string)"/>
/// <param name="instance">The string to remove characters from.</param>
/// <param name="chars">The characters to be removed.</param>
/// <returns>A copy of the string with characters removed from the left.</returns>
@@ -799,6 +951,12 @@ namespace Godot
/// Do a simple expression match, where '*' matches zero or more
/// arbitrary characters and '?' matches any single character except '.'.
/// </summary>
+ /// <param name="instance">The string to check.</param>
+ /// <param name="expr">Expression to check.</param>
+ /// <param name="caseSensitive">
+ /// If <see langword="true"/>, the check will be case sensitive.
+ /// </param>
+ /// <returns>If the expression has any matches.</returns>
private static bool ExprMatch(this string instance, string expr, bool caseSensitive)
{
// case '\0':
@@ -824,6 +982,13 @@ namespace Godot
/// Do a simple case sensitive expression match, using ? and * wildcards
/// (see <see cref="ExprMatch(string, string, bool)"/>).
/// </summary>
+ /// <seealso cref="MatchN(string, string)"/>
+ /// <param name="instance">The string to check.</param>
+ /// <param name="expr">Expression to check.</param>
+ /// <param name="caseSensitive">
+ /// If <see langword="true"/>, the check will be case sensitive.
+ /// </param>
+ /// <returns>If the expression has any matches.</returns>
public static bool Match(this string instance, string expr, bool caseSensitive = true)
{
if (instance.Length == 0 || expr.Length == 0)
@@ -836,6 +1001,10 @@ namespace Godot
/// Do a simple case insensitive expression match, using ? and * wildcards
/// (see <see cref="ExprMatch(string, string, bool)"/>).
/// </summary>
+ /// <seealso cref="Match(string, string, bool)"/>
+ /// <param name="instance">The string to check.</param>
+ /// <param name="expr">Expression to check.</param>
+ /// <returns>If the expression has any matches.</returns>
public static bool MatchN(this string instance, string expr)
{
if (instance.Length == 0 || expr.Length == 0)
@@ -845,46 +1014,65 @@ namespace Godot
}
/// <summary>
- /// Return the MD5 hash of the string as an array of bytes.
+ /// Returns the MD5 hash of the string as an array of bytes.
/// </summary>
+ /// <seealso cref="MD5Text(string)"/>
+ /// <param name="instance">The string to hash.</param>
+ /// <returns>The MD5 hash of the string.</returns>
public static byte[] MD5Buffer(this string instance)
{
return godot_icall_String_md5_buffer(instance);
}
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static byte[] godot_icall_String_md5_buffer(string str);
+ internal static extern byte[] godot_icall_String_md5_buffer(string str);
/// <summary>
- /// Return the MD5 hash of the string as a string.
+ /// Returns the MD5 hash of the string as a string.
/// </summary>
+ /// <seealso cref="MD5Buffer(string)"/>
+ /// <param name="instance">The string to hash.</param>
+ /// <returns>The MD5 hash of the string.</returns>
public static string MD5Text(this string instance)
{
return godot_icall_String_md5_text(instance);
}
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static string godot_icall_String_md5_text(string str);
+ internal static extern string godot_icall_String_md5_text(string str);
/// <summary>
/// Perform a case-insensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
/// </summary>
+ /// <seealso cref="CasecmpTo(string, string)"/>
+ /// <seealso cref="CompareTo(string, string, bool)"/>
+ /// <param name="instance">The string to compare.</param>
+ /// <param name="to">The other string to compare.</param>
+ /// <returns>-1 if less, 0 if equal and +1 if greater.</returns>
public static int NocasecmpTo(this string instance, string to)
{
return instance.CompareTo(to, caseSensitive: false);
}
/// <summary>
- /// Return the character code at position <paramref name="at"/>.
+ /// Returns the character code at position <paramref name="at"/>.
/// </summary>
+ /// <param name="instance">The string to check.</param>
+ /// <param name="at">The position int the string for the character to check.</param>
+ /// <returns>The character code.</returns>
public static int OrdAt(this string instance, int at)
{
return instance[at];
}
/// <summary>
- /// Format a number to have an exact number of <paramref name="digits"/> after the decimal point.
+ /// Format a number to have an exact number of <paramref name="digits"/>
+ /// after the decimal point.
/// </summary>
+ /// <seealso cref="PadZeros(string, int)"/>
+ /// <param name="instance">The string to pad.</param>
+ /// <param name="digits">Amount of digits after the decimal point.</param>
+ /// <returns>The string padded with zeroes.</returns>
public static string PadDecimals(this string instance, int digits)
{
int c = instance.Find(".");
@@ -919,8 +1107,13 @@ namespace Godot
}
/// <summary>
- /// Format a number to have an exact number of <paramref name="digits"/> before the decimal point.
+ /// Format a number to have an exact number of <paramref name="digits"/>
+ /// before the decimal point.
/// </summary>
+ /// <seealso cref="PadDecimals(string, int)"/>
+ /// <param name="instance">The string to pad.</param>
+ /// <param name="digits">Amount of digits before the decimal point.</param>
+ /// <returns>The string padded with zeroes.</returns>
public static string PadZeros(this string instance, int digits)
{
string s = instance;
@@ -952,9 +1145,13 @@ namespace Godot
}
/// <summary>
- /// If the string is a path, this concatenates <paramref name="file"/> at the end of the string as a subpath.
+ /// If the string is a path, this concatenates <paramref name="file"/>
+ /// at the end of the string as a subpath.
/// E.g. <c>"this/is".PlusFile("path") == "this/is/path"</c>.
/// </summary>
+ /// <param name="instance">The path that will be concatenated.</param>
+ /// <param name="file">File name to concatenate with the path.</param>
+ /// <returns>The concatenated path with the given file name.</returns>
public static string PlusFile(this string instance, string file)
{
if (instance.Length > 0 && instance[instance.Length - 1] == '/')
@@ -965,6 +1162,11 @@ namespace Godot
/// <summary>
/// Replace occurrences of a substring for different ones inside the string.
/// </summary>
+ /// <seealso cref="ReplaceN(string, string, string)"/>
+ /// <param name="instance">The string to modify.</param>
+ /// <param name="what">The substring to be replaced in the string.</param>
+ /// <param name="forwhat">The substring that replaces <paramref name="what"/>.</param>
+ /// <returns>The string with the substring occurrences replaced.</returns>
public static string Replace(this string instance, string what, string forwhat)
{
return instance.Replace(what, forwhat);
@@ -973,6 +1175,11 @@ namespace Godot
/// <summary>
/// Replace occurrences of a substring for different ones inside the string, but search case-insensitive.
/// </summary>
+ /// <seealso cref="Replace(string, string, string)"/>
+ /// <param name="instance">The string to modify.</param>
+ /// <param name="what">The substring to be replaced in the string.</param>
+ /// <param name="forwhat">The substring that replaces <paramref name="what"/>.</param>
+ /// <returns>The string with the substring occurrences replaced.</returns>
public static string ReplaceN(this string instance, string what, string forwhat)
{
return Regex.Replace(instance, what, forwhat, RegexOptions.IgnoreCase);
@@ -981,29 +1188,43 @@ namespace Godot
/// <summary>
/// Perform a search for a substring, but start from the end of the string instead of the beginning.
/// </summary>
+ /// <seealso cref="RFindN(string, string, int)"/>
+ /// <param name="instance">The string that will be searched.</param>
+ /// <param name="what">The substring to search in the string.</param>
+ /// <param name="from">The position at which to start searching.</param>
+ /// <returns>The position at which the substring was found, or -1 if not found.</returns>
public static int RFind(this string instance, string what, int from = -1)
{
return godot_icall_String_rfind(instance, what, from);
}
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static int godot_icall_String_rfind(string str, string what, int from);
+ internal static extern int godot_icall_String_rfind(string str, string what, int from);
/// <summary>
/// Perform a search for a substring, but start from the end of the string instead of the beginning.
/// Also search case-insensitive.
/// </summary>
+ /// <seealso cref="RFind(string, string, int)"/>
+ /// <param name="instance">The string that will be searched.</param>
+ /// <param name="what">The substring to search in the string.</param>
+ /// <param name="from">The position at which to start searching.</param>
+ /// <returns>The position at which the substring was found, or -1 if not found.</returns>
public static int RFindN(this string instance, string what, int from = -1)
{
return godot_icall_String_rfindn(instance, what, from);
}
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static int godot_icall_String_rfindn(string str, string what, int from);
+ internal static extern int godot_icall_String_rfindn(string str, string what, int from);
/// <summary>
- /// Return the right side of the string from a given position.
+ /// Returns the right side of the string from a given position.
/// </summary>
+ /// <seealso cref="Left(string, int)"/>
+ /// <param name="instance">The original string.</param>
+ /// <param name="pos">The position in the string from which the right side starts.</param>
+ /// <returns>The right side of the string from the given position.</returns>
public static string Right(this string instance, int pos)
{
if (pos >= instance.Length)
@@ -1018,6 +1239,7 @@ namespace Godot
/// <summary>
/// Returns a copy of the string with characters removed from the right.
/// </summary>
+ /// <seealso cref="LStrip(string, string)"/>
/// <param name="instance">The string to remove characters from.</param>
/// <param name="chars">The characters to be removed.</param>
/// <returns>A copy of the string with characters removed from the right.</returns>
@@ -1042,29 +1264,41 @@ namespace Godot
return instance.Substr(0, end + 1);
}
+ /// <summary>
+ /// Returns the SHA-256 hash of the string as an array of bytes.
+ /// </summary>
+ /// <seealso cref="SHA256Text(string)"/>
+ /// <param name="instance">The string to hash.</param>
+ /// <returns>The SHA-256 hash of the string.</returns>
public static byte[] SHA256Buffer(this string instance)
{
return godot_icall_String_sha256_buffer(instance);
}
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static byte[] godot_icall_String_sha256_buffer(string str);
+ internal static extern byte[] godot_icall_String_sha256_buffer(string str);
/// <summary>
- /// Return the SHA-256 hash of the string as a string.
+ /// Returns the SHA-256 hash of the string as a string.
/// </summary>
+ /// <seealso cref="SHA256Buffer(string)"/>
+ /// <param name="instance">The string to hash.</param>
+ /// <returns>The SHA-256 hash of the string.</returns>
public static string SHA256Text(this string instance)
{
return godot_icall_String_sha256_text(instance);
}
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static string godot_icall_String_sha256_text(string str);
+ internal static extern string godot_icall_String_sha256_text(string str);
/// <summary>
- /// Return the similarity index of the text compared to this string.
+ /// Returns the similarity index of the text compared to this string.
/// 1 means totally similar and 0 means totally dissimilar.
/// </summary>
+ /// <param name="instance">The string to compare.</param>
+ /// <param name="text">The other string to compare.</param>
+ /// <returns>The similarity index.</returns>
public static float Similarity(this string instance, string text)
{
if (instance == text)
@@ -1103,9 +1337,27 @@ namespace Godot
}
/// <summary>
+ /// Returns a simplified canonical path.
+ /// </summary>
+ public static string SimplifyPath(this string instance)
+ {
+ return godot_icall_String_simplify_path(instance);
+ }
+
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ internal extern static string godot_icall_String_simplify_path(string str);
+
+ /// <summary>
/// Split the string by a divisor string, return an array of the substrings.
/// Example "One,Two,Three" will return ["One","Two","Three"] if split by ",".
/// </summary>
+ /// <seealso cref="SplitFloats(string, string, bool)"/>
+ /// <param name="instance">The string to split.</param>
+ /// <param name="divisor">The divisor string that splits the string.</param>
+ /// <param name="allowEmpty">
+ /// If <see langword="true"/>, the array may include empty strings.
+ /// </param>
+ /// <returns>The array of strings split from the string.</returns>
public static string[] Split(this string instance, string divisor, bool allowEmpty = true)
{
return instance.Split(new[] { divisor }, allowEmpty ? StringSplitOptions.None : StringSplitOptions.RemoveEmptyEntries);
@@ -1115,6 +1367,13 @@ namespace Godot
/// Split the string in floats by using a divisor string, return an array of the substrings.
/// Example "1,2.5,3" will return [1,2.5,3] if split by ",".
/// </summary>
+ /// <seealso cref="Split(string, string, bool)"/>
+ /// <param name="instance">The string to split.</param>
+ /// <param name="divisor">The divisor string that splits the string.</param>
+ /// <param name="allowEmpty">
+ /// If <see langword="true"/>, the array may include empty floats.
+ /// </param>
+ /// <returns>The array of floats split from the string.</returns>
public static float[] SplitFloats(this string instance, string divisor, bool allowEmpty = true)
{
var ret = new List<float>();
@@ -1137,7 +1396,8 @@ namespace Godot
return ret.ToArray();
}
- private static readonly char[] _nonPrintable = {
+ private static readonly char[] _nonPrintable =
+ {
(char)00, (char)01, (char)02, (char)03, (char)04, (char)05,
(char)06, (char)07, (char)08, (char)09, (char)10, (char)11,
(char)12, (char)13, (char)14, (char)15, (char)16, (char)17,
@@ -1147,9 +1407,13 @@ namespace Godot
};
/// <summary>
- /// Return a copy of the string stripped of any non-printable character at the beginning and the end.
+ /// Returns a copy of the string stripped of any non-printable character at the beginning and the end.
/// The optional arguments are used to toggle stripping on the left and right edges respectively.
/// </summary>
+ /// <param name="instance">The string to strip.</param>
+ /// <param name="left">If the left side should be stripped.</param>
+ /// <param name="right">If the right side should be stripped.</param>
+ /// <returns>The string stripped of any non-printable characters.</returns>
public static string StripEdges(this string instance, bool left = true, bool right = true)
{
if (left)
@@ -1163,8 +1427,14 @@ namespace Godot
}
/// <summary>
- /// Return part of the string from the position <paramref name="from"/>, with length <paramref name="len"/>.
+ /// Returns part of the string from the position <paramref name="from"/>, with length <paramref name="len"/>.
/// </summary>
+ /// <param name="instance">The string to slice.</param>
+ /// <param name="from">The position in the string that the part starts from.</param>
+ /// <param name="len">The length of the returned part.</param>
+ /// <returns>
+ /// Part of the string from the position <paramref name="from"/>, with length <paramref name="len"/>.
+ /// </returns>
public static string Substr(this string instance, int from, int len)
{
int max = instance.Length - from;
@@ -1172,52 +1442,70 @@ namespace Godot
}
/// <summary>
- /// Convert the String (which is a character array) to PackedByteArray (which is an array of bytes).
+ /// Converts the String (which is a character array) to PackedByteArray (which is an array of bytes).
/// The conversion is speeded up in comparison to <see cref="ToUTF8(string)"/> with the assumption
/// that all the characters the String contains are only ASCII characters.
/// </summary>
+ /// <seealso cref="ToUTF8(string)"/>
+ /// <param name="instance">The string to convert.</param>
+ /// <returns>The string as ASCII encoded bytes.</returns>
public static byte[] ToAscii(this string instance)
{
return Encoding.ASCII.GetBytes(instance);
}
/// <summary>
- /// Convert a string, containing a decimal number, into a <see langword="float" />.
+ /// Converts a string, containing a decimal number, into a <see langword="float" />.
/// </summary>
+ /// <seealso cref="ToInt(string)"/>
+ /// <param name="instance">The string to convert.</param>
+ /// <returns>The number representation of the string.</returns>
public static float ToFloat(this string instance)
{
return float.Parse(instance);
}
/// <summary>
- /// Convert a string, containing an integer number, into an <see langword="int" />.
+ /// Converts a string, containing an integer number, into an <see langword="int" />.
/// </summary>
+ /// <seealso cref="ToFloat(string)"/>
+ /// <param name="instance">The string to convert.</param>
+ /// <returns>The number representation of the string.</returns>
public static int ToInt(this string instance)
{
return int.Parse(instance);
}
/// <summary>
- /// Return the string converted to lowercase.
+ /// Returns the string converted to lowercase.
/// </summary>
+ /// <seealso cref="ToUpper(string)"/>
+ /// <param name="instance">The string to convert.</param>
+ /// <returns>The string converted to lowercase.</returns>
public static string ToLower(this string instance)
{
return instance.ToLower();
}
/// <summary>
- /// Return the string converted to uppercase.
+ /// Returns the string converted to uppercase.
/// </summary>
+ /// <seealso cref="ToLower(string)"/>
+ /// <param name="instance">The string to convert.</param>
+ /// <returns>The string converted to uppercase.</returns>
public static string ToUpper(this string instance)
{
return instance.ToUpper();
}
/// <summary>
- /// Convert the String (which is an array of characters) to PackedByteArray (which is an array of bytes).
+ /// Converts the String (which is an array of characters) to PackedByteArray (which is an array of bytes).
/// The conversion is a bit slower than <see cref="ToAscii(string)"/>, but supports all UTF-8 characters.
/// Therefore, you should prefer this function over <see cref="ToAscii(string)"/>.
/// </summary>
+ /// <seealso cref="ToAscii(string)"/>
+ /// <param name="instance">The string to convert.</param>
+ /// <returns>The string as UTF-8 encoded bytes.</returns>
public static byte[] ToUTF8(this string instance)
{
return Encoding.UTF8.GetBytes(instance);
@@ -1226,8 +1514,8 @@ namespace Godot
/// <summary>
/// Decodes a string in URL encoded format. This is meant to
/// decode parameters in a URL when receiving an HTTP request.
- /// This mostly wraps around `System.Uri.UnescapeDataString()`,
- /// but also handles `+`.
+ /// This mostly wraps around <see cref="Uri.UnescapeDataString"/>,
+ /// but also handles <c>+</c>.
/// See <see cref="URIEncode"/> for encoding.
/// </summary>
/// <param name="instance">The string to decode.</param>
@@ -1240,7 +1528,7 @@ namespace Godot
/// <summary>
/// Encodes a string to URL friendly format. This is meant to
/// encode parameters in a URL when sending an HTTP request.
- /// This wraps around `System.Uri.EscapeDataString()`.
+ /// This wraps around <see cref="Uri.EscapeDataString"/>.
/// See <see cref="URIDecode"/> for decoding.
/// </summary>
/// <param name="instance">The string to encode.</param>
@@ -1251,17 +1539,23 @@ namespace Godot
}
/// <summary>
- /// Return a copy of the string with special characters escaped using the XML standard.
+ /// Returns a copy of the string with special characters escaped using the XML standard.
/// </summary>
+ /// <seealso cref="XMLUnescape(string)"/>
+ /// <param name="instance">The string to escape.</param>
+ /// <returns>The escaped string.</returns>
public static string XMLEscape(this string instance)
{
return SecurityElement.Escape(instance);
}
/// <summary>
- /// Return a copy of the string with escaped characters replaced by their meanings
+ /// Returns a copy of the string with escaped characters replaced by their meanings
/// according to the XML standard.
/// </summary>
+ /// <seealso cref="XMLEscape(string)"/>
+ /// <param name="instance">The string to unescape.</param>
+ /// <returns>The unescaped string.</returns>
public static string XMLUnescape(this string instance)
{
return SecurityElement.FromString(instance).Text;
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringName.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringName.cs
index 7700b6d4ed..b1d504410b 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringName.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringName.cs
@@ -3,6 +3,13 @@ using System.Runtime.CompilerServices;
namespace Godot
{
+ /// <summary>
+ /// StringNames are immutable strings designed for general-purpose representation of unique names.
+ /// StringName ensures that only one instance of a given name exists (so two StringNames with the
+ /// same value are the same object).
+ /// Comparing them is much faster than with regular strings, because only the pointers are compared,
+ /// not the whole strings.
+ /// </summary>
public sealed partial class StringName : IDisposable
{
private IntPtr ptr;
@@ -23,6 +30,9 @@ namespace Godot
Dispose(false);
}
+ /// <summary>
+ /// Disposes of this <see cref="StringName"/>.
+ /// </summary>
public void Dispose()
{
Dispose(true);
@@ -43,25 +53,48 @@ namespace Godot
this.ptr = ptr;
}
+ /// <summary>
+ /// Constructs an empty <see cref="StringName"/>.
+ /// </summary>
public StringName()
{
ptr = IntPtr.Zero;
}
+ /// <summary>
+ /// Constructs a <see cref="StringName"/> from the given <paramref name="path"/> string.
+ /// </summary>
+ /// <param name="path">String to construct the <see cref="StringName"/> from.</param>
public StringName(string path)
{
ptr = path == null ? IntPtr.Zero : godot_icall_StringName_Ctor(path);
}
+ /// <summary>
+ /// Converts a string to a <see cref="StringName"/>.
+ /// </summary>
+ /// <param name="from">The string to convert.</param>
public static implicit operator StringName(string from) => new StringName(from);
+ /// <summary>
+ /// Converts a <see cref="StringName"/> to a string.
+ /// </summary>
+ /// <param name="from">The <see cref="StringName"/> to convert.</param>
public static implicit operator string(StringName from) => from.ToString();
+ /// <summary>
+ /// Converts this <see cref="StringName"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this <see cref="StringName"/>.</returns>
public override string ToString()
{
return ptr == IntPtr.Zero ? string.Empty : godot_icall_StringName_operator_String(GetPtr(this));
}
+ /// <summary>
+ /// Check whether this <see cref="StringName"/> is empty.
+ /// </summary>
+ /// <returns>If the <see cref="StringName"/> is empty.</returns>
public bool IsEmpty()
{
return ptr == IntPtr.Zero || godot_icall_StringName_is_empty(GetPtr(this));
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs
index 62a6fe6959..c82c5f4588 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs
@@ -21,18 +21,18 @@ namespace Godot
public struct Transform2D : IEquatable<Transform2D>
{
/// <summary>
- /// The basis matrix's X vector (column 0). Equivalent to array index `[0]`.
+ /// The basis matrix's X vector (column 0). Equivalent to array index <c>[0]</c>.
/// </summary>
/// <value></value>
public Vector2 x;
/// <summary>
- /// The basis matrix's Y vector (column 1). Equivalent to array index `[1]`.
+ /// The basis matrix's Y vector (column 1). Equivalent to array index <c>[1]</c>.
/// </summary>
public Vector2 y;
/// <summary>
- /// The origin vector (column 2, the third column). Equivalent to array index `[2]`.
+ /// The origin vector (column 2, the third column). Equivalent to array index <c>[2]</c>.
/// The origin vector represents translation.
/// </summary>
public Vector2 origin;
@@ -77,7 +77,8 @@ namespace Godot
}
/// <summary>
- /// Access whole columns in the form of Vector2. The third column is the origin vector.
+ /// Access whole columns in the form of <see cref="Vector2"/>.
+ /// The third column is the <see cref="origin"/> vector.
/// </summary>
/// <param name="column">Which column vector.</param>
public Vector2 this[int column]
@@ -116,7 +117,8 @@ namespace Godot
}
/// <summary>
- /// Access matrix elements in column-major order. The third column is the origin vector.
+ /// Access matrix elements in column-major order.
+ /// The third column is the <see cref="origin"/> vector.
/// </summary>
/// <param name="column">Which column, the matrix horizontal position.</param>
/// <param name="row">Which row, the matrix vertical position.</param>
@@ -138,6 +140,7 @@ namespace Godot
/// Returns the inverse of the transform, under the assumption that
/// the transformation is composed of rotation, scaling, and translation.
/// </summary>
+ /// <seealso cref="Inverse"/>
/// <returns>The inverse transformation matrix.</returns>
public Transform2D AffineInverse()
{
@@ -146,7 +149,7 @@ namespace Godot
if (det == 0)
throw new InvalidOperationException("Matrix determinant is zero and cannot be inverted.");
- var inv = this;
+ Transform2D inv = this;
real_t temp = inv[0, 0];
inv[0, 0] = inv[1, 1];
@@ -173,13 +176,14 @@ namespace Godot
/// <returns>The determinant of the basis matrix.</returns>
private real_t BasisDeterminant()
{
- return x.x * y.y - x.y * y.x;
+ return (x.x * y.y) - (x.y * y.x);
}
/// <summary>
/// Returns a vector transformed (multiplied) by the basis matrix.
- /// This method does not account for translation (the origin vector).
+ /// This method does not account for translation (the <see cref="origin"/> vector).
/// </summary>
+ /// <seealso cref="BasisXformInv(Vector2)"/>
/// <param name="v">A vector to transform.</param>
/// <returns>The transformed vector.</returns>
public Vector2 BasisXform(Vector2 v)
@@ -189,11 +193,12 @@ namespace Godot
/// <summary>
/// Returns a vector transformed (multiplied) by the inverse basis matrix.
- /// This method does not account for translation (the origin vector).
+ /// This method does not account for translation (the <see cref="origin"/> vector).
///
/// Note: This results in a multiplication by the inverse of the
/// basis matrix only if it represents a rotation-reflection.
/// </summary>
+ /// <seealso cref="BasisXform(Vector2)"/>
/// <param name="v">A vector to inversely transform.</param>
/// <returns>The inversely transformed vector.</returns>
public Vector2 BasisXformInv(Vector2 v)
@@ -202,7 +207,7 @@ namespace Godot
}
/// <summary>
- /// Interpolates this transform to the other `transform` by `weight`.
+ /// Interpolates this transform to the other <paramref name="transform"/> by <paramref name="weight"/>.
/// </summary>
/// <param name="transform">The other transform.</param>
/// <param name="weight">A value on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
@@ -233,8 +238,8 @@ namespace Godot
else
{
real_t angle = weight * Mathf.Acos(dot);
- Vector2 v3 = (v2 - v1 * dot).Normalized();
- v = v1 * Mathf.Cos(angle) + v3 * Mathf.Sin(angle);
+ Vector2 v3 = (v2 - (v1 * dot)).Normalized();
+ v = (v1 * Mathf.Cos(angle)) + (v3 * Mathf.Sin(angle));
}
// Extract parameters
@@ -258,7 +263,7 @@ namespace Godot
/// <returns>The inverse matrix.</returns>
public Transform2D Inverse()
{
- var inv = this;
+ Transform2D inv = this;
// Swap
real_t temp = inv.x.y;
@@ -277,13 +282,13 @@ namespace Godot
/// <returns>The orthonormalized transform.</returns>
public Transform2D Orthonormalized()
{
- var on = this;
+ Transform2D on = this;
Vector2 onX = on.x;
Vector2 onY = on.y;
onX.Normalize();
- onY = onY - onX * onX.Dot(onY);
+ onY = onY - (onX * onX.Dot(onY));
onY.Normalize();
on.x = onX;
@@ -293,7 +298,7 @@ namespace Godot
}
/// <summary>
- /// Rotates the transform by `phi` (in radians), using matrix multiplication.
+ /// Rotates the transform by <paramref name="phi"/> (in radians), using matrix multiplication.
/// </summary>
/// <param name="phi">The angle to rotate, in radians.</param>
/// <returns>The rotated transformation matrix.</returns>
@@ -309,7 +314,7 @@ namespace Godot
/// <returns>The scaled transformation matrix.</returns>
public Transform2D Scaled(Vector2 scale)
{
- var copy = this;
+ Transform2D copy = this;
copy.x *= scale;
copy.y *= scale;
copy.origin *= scale;
@@ -326,16 +331,16 @@ namespace Godot
private real_t Tdotx(Vector2 with)
{
- return this[0, 0] * with[0] + this[1, 0] * with[1];
+ return (this[0, 0] * with[0]) + (this[1, 0] * with[1]);
}
private real_t Tdoty(Vector2 with)
{
- return this[0, 1] * with[0] + this[1, 1] * with[1];
+ return (this[0, 1] * with[0]) + (this[1, 1] * with[1]);
}
/// <summary>
- /// Translates the transform by the given `offset`,
+ /// Translates the transform by the given <paramref name="offset"/>,
/// relative to the transform's basis vectors.
///
/// Unlike <see cref="Rotated"/> and <see cref="Scaled"/>,
@@ -345,7 +350,7 @@ namespace Godot
/// <returns>The translated matrix.</returns>
public Transform2D Translated(Vector2 offset)
{
- var copy = this;
+ Transform2D copy = this;
copy.origin += copy.BasisXform(offset);
return copy;
}
@@ -353,8 +358,10 @@ namespace Godot
/// <summary>
/// Returns a vector transformed (multiplied) by this transformation matrix.
/// </summary>
+ /// <seealso cref="XformInv(Vector2)"/>
/// <param name="v">A vector to transform.</param>
/// <returns>The transformed vector.</returns>
+ [Obsolete("Xform is deprecated. Use the multiplication operator (Transform2D * Vector2) instead.")]
public Vector2 Xform(Vector2 v)
{
return new Vector2(Tdotx(v), Tdoty(v)) + origin;
@@ -363,8 +370,10 @@ namespace Godot
/// <summary>
/// Returns a vector transformed (multiplied) by the inverse transformation matrix.
/// </summary>
+ /// <seealso cref="Xform(Vector2)"/>
/// <param name="v">A vector to inversely transform.</param>
/// <returns>The inversely transformed vector.</returns>
+ [Obsolete("XformInv is deprecated. Use the multiplication operator (Vector2 * Transform2D) instead.")]
public Vector2 XformInv(Vector2 v)
{
Vector2 vInv = v - origin;
@@ -378,20 +387,20 @@ namespace Godot
/// <summary>
/// The identity transform, with no translation, rotation, or scaling applied.
- /// This is used as a replacement for `Transform2D()` in GDScript.
- /// Do not use `new Transform2D()` with no arguments in C#, because it sets all values to zero.
+ /// This is used as a replacement for <c>Transform2D()</c> in GDScript.
+ /// Do not use <c>new Transform2D()</c> with no arguments in C#, because it sets all values to zero.
/// </summary>
- /// <value>Equivalent to `new Transform2D(Vector2.Right, Vector2.Down, Vector2.Zero)`.</value>
+ /// <value>Equivalent to <c>new Transform2D(Vector2.Right, Vector2.Down, Vector2.Zero)</c>.</value>
public static Transform2D Identity { get { return _identity; } }
/// <summary>
/// The transform that will flip something along the X axis.
/// </summary>
- /// <value>Equivalent to `new Transform2D(Vector2.Left, Vector2.Down, Vector2.Zero)`.</value>
+ /// <value>Equivalent to <c>new Transform2D(Vector2.Left, Vector2.Down, Vector2.Zero)</c>.</value>
public static Transform2D FlipX { get { return _flipX; } }
/// <summary>
/// The transform that will flip something along the Y axis.
/// </summary>
- /// <value>Equivalent to `new Transform2D(Vector2.Right, Vector2.Up, Vector2.Zero)`.</value>
+ /// <value>Equivalent to <c>new Transform2D(Vector2.Right, Vector2.Up, Vector2.Zero)</c>.</value>
public static Transform2D FlipY { get { return _flipY; } }
/// <summary>
@@ -411,12 +420,12 @@ namespace Godot
/// Constructs a transformation matrix from the given components.
/// Arguments are named such that xy is equal to calling x.y
/// </summary>
- /// <param name="xx">The X component of the X column vector, accessed via `t.x.x` or `[0][0]`</param>
- /// <param name="xy">The Y component of the X column vector, accessed via `t.x.y` or `[0][1]`</param>
- /// <param name="yx">The X component of the Y column vector, accessed via `t.y.x` or `[1][0]`</param>
- /// <param name="yy">The Y component of the Y column vector, accessed via `t.y.y` or `[1][1]`</param>
- /// <param name="ox">The X component of the origin vector, accessed via `t.origin.x` or `[2][0]`</param>
- /// <param name="oy">The Y component of the origin vector, accessed via `t.origin.y` or `[2][1]`</param>
+ /// <param name="xx">The X component of the X column vector, accessed via <c>t.x.x</c> or <c>[0][0]</c></param>
+ /// <param name="xy">The Y component of the X column vector, accessed via <c>t.x.y</c> or <c>[0][1]</c></param>
+ /// <param name="yx">The X component of the Y column vector, accessed via <c>t.y.x</c> or <c>[1][0]</c></param>
+ /// <param name="yy">The Y component of the Y column vector, accessed via <c>t.y.y</c> or <c>[1][1]</c></param>
+ /// <param name="ox">The X component of the origin vector, accessed via <c>t.origin.x</c> or <c>[2][0]</c></param>
+ /// <param name="oy">The Y component of the origin vector, accessed via <c>t.origin.y</c> or <c>[2][1]</c></param>
public Transform2D(real_t xx, real_t xy, real_t yx, real_t yy, real_t ox, real_t oy)
{
x = new Vector2(xx, xy);
@@ -425,21 +434,22 @@ namespace Godot
}
/// <summary>
- /// Constructs a transformation matrix from a rotation value and origin vector.
+ /// Constructs a transformation matrix from a <paramref name="rotation"/> value and
+ /// <paramref name="origin"/> vector.
/// </summary>
- /// <param name="rot">The rotation of the new transform, in radians.</param>
- /// <param name="pos">The origin vector, or column index 2.</param>
- public Transform2D(real_t rot, Vector2 pos)
+ /// <param name="rotation">The rotation of the new transform, in radians.</param>
+ /// <param name="origin">The origin vector, or column index 2.</param>
+ public Transform2D(real_t rotation, Vector2 origin)
{
- x.x = y.y = Mathf.Cos(rot);
- x.y = y.x = Mathf.Sin(rot);
+ x.x = y.y = Mathf.Cos(rotation);
+ x.y = y.x = Mathf.Sin(rotation);
y.x *= -1;
- origin = pos;
+ this.origin = origin;
}
public static Transform2D operator *(Transform2D left, Transform2D right)
{
- left.origin = left.Xform(right.origin);
+ left.origin = left * right.origin;
real_t x0 = left.Tdotx(right.x);
real_t x1 = left.Tdoty(right.x);
@@ -454,6 +464,96 @@ namespace Godot
return left;
}
+ /// <summary>
+ /// Returns a Vector2 transformed (multiplied) by transformation matrix.
+ /// </summary>
+ /// <param name="transform">The transformation to apply.</param>
+ /// <param name="vector">A Vector2 to transform.</param>
+ /// <returns>The transformed Vector2.</returns>
+ public static Vector2 operator *(Transform2D transform, Vector2 vector)
+ {
+ return new Vector2(transform.Tdotx(vector), transform.Tdoty(vector)) + transform.origin;
+ }
+
+ /// <summary>
+ /// Returns a Vector2 transformed (multiplied) by the inverse transformation matrix.
+ /// </summary>
+ /// <param name="vector">A Vector2 to inversely transform.</param>
+ /// <param name="transform">The transformation to apply.</param>
+ /// <returns>The inversely transformed Vector2.</returns>
+ public static Vector2 operator *(Vector2 vector, Transform2D transform)
+ {
+ Vector2 vInv = vector - transform.origin;
+ return new Vector2(transform.x.Dot(vInv), transform.y.Dot(vInv));
+ }
+
+ /// <summary>
+ /// Returns a Rect2 transformed (multiplied) by transformation matrix.
+ /// </summary>
+ /// <param name="transform">The transformation to apply.</param>
+ /// <param name="rect">A Rect2 to transform.</param>
+ /// <returns>The transformed Rect2.</returns>
+ public static Rect2 operator *(Transform2D transform, Rect2 rect)
+ {
+ Vector2 pos = transform * rect.Position;
+ Vector2 toX = transform.x * rect.Size.x;
+ Vector2 toY = transform.y * rect.Size.y;
+
+ return new Rect2(pos, rect.Size).Expand(pos + toX).Expand(pos + toY).Expand(pos + toX + toY);
+ }
+
+ /// <summary>
+ /// Returns a Rect2 transformed (multiplied) by the inverse transformation matrix.
+ /// </summary>
+ /// <param name="rect">A Rect2 to inversely transform.</param>
+ /// <param name="transform">The transformation to apply.</param>
+ /// <returns>The inversely transformed Rect2.</returns>
+ public static Rect2 operator *(Rect2 rect, Transform2D transform)
+ {
+ Vector2 pos = rect.Position * transform;
+ Vector2 to1 = new Vector2(rect.Position.x, rect.Position.y + rect.Size.y) * transform;
+ Vector2 to2 = new Vector2(rect.Position.x + rect.Size.x, rect.Position.y + rect.Size.y) * transform;
+ Vector2 to3 = new Vector2(rect.Position.x + rect.Size.x, rect.Position.y) * transform;
+
+ return new Rect2(pos, rect.Size).Expand(to1).Expand(to2).Expand(to3);
+ }
+
+ /// <summary>
+ /// Returns a copy of the given Vector2[] transformed (multiplied) by transformation matrix.
+ /// </summary>
+ /// <param name="transform">The transformation to apply.</param>
+ /// <param name="array">A Vector2[] to transform.</param>
+ /// <returns>The transformed copy of the Vector2[].</returns>
+ public static Vector2[] operator *(Transform2D transform, Vector2[] array)
+ {
+ Vector2[] newArray = new Vector2[array.Length];
+
+ for (int i = 0; i < array.Length; i++)
+ {
+ newArray[i] = transform * array[i];
+ }
+
+ return newArray;
+ }
+
+ /// <summary>
+ /// Returns a copy of the given Vector2[] transformed (multiplied) by the inverse transformation matrix.
+ /// </summary>
+ /// <param name="array">A Vector2[] to inversely transform.</param>
+ /// <param name="transform">The transformation to apply.</param>
+ /// <returns>The inversely transformed copy of the Vector2[].</returns>
+ public static Vector2[] operator *(Vector2[] array, Transform2D transform)
+ {
+ Vector2[] newArray = new Vector2[array.Length];
+
+ for (int i = 0; i < array.Length; i++)
+ {
+ newArray[i] = array[i] * transform;
+ }
+
+ return newArray;
+ }
+
public static bool operator ==(Transform2D left, Transform2D right)
{
return left.Equals(right);
@@ -464,19 +564,29 @@ namespace Godot
return !left.Equals(right);
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this transform and <paramref name="obj"/> are equal.
+ /// </summary>
+ /// <param name="obj">The other object to compare.</param>
+ /// <returns>Whether or not the transform and the other object are equal.</returns>
public override bool Equals(object obj)
{
return obj is Transform2D transform2D && Equals(transform2D);
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this transform and <paramref name="other"/> are equal.
+ /// </summary>
+ /// <param name="other">The other transform to compare.</param>
+ /// <returns>Whether or not the matrices are equal.</returns>
public bool Equals(Transform2D other)
{
return x.Equals(other.x) && y.Equals(other.y) && origin.Equals(other.origin);
}
/// <summary>
- /// Returns true if this transform and `other` are approximately equal, by running
- /// <see cref="Vector2.IsEqualApprox(Vector2)"/> on each component.
+ /// Returns <see langword="true"/> if this transform and <paramref name="other"/> are approximately equal,
+ /// by running <see cref="Vector2.IsEqualApprox(Vector2)"/> on each component.
/// </summary>
/// <param name="other">The other transform to compare.</param>
/// <returns>Whether or not the matrices are approximately equal.</returns>
@@ -485,16 +595,28 @@ namespace Godot
return x.IsEqualApprox(other.x) && y.IsEqualApprox(other.y) && origin.IsEqualApprox(other.origin);
}
+ /// <summary>
+ /// Serves as the hash function for <see cref="Transform2D"/>.
+ /// </summary>
+ /// <returns>A hash code for this transform.</returns>
public override int GetHashCode()
{
return x.GetHashCode() ^ y.GetHashCode() ^ origin.GetHashCode();
}
+ /// <summary>
+ /// Converts this <see cref="Transform2D"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this transform.</returns>
public override string ToString()
{
return $"[X: {x}, Y: {y}, O: {origin}]";
}
+ /// <summary>
+ /// Converts this <see cref="Transform2D"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this transform.</returns>
public string ToString(string format)
{
return $"[X: {x.ToString(format)}, Y: {y.ToString(format)}, O: {origin.ToString(format)}]";
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs
index afc6a65a45..7176cd60dc 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs
@@ -28,12 +28,13 @@ namespace Godot
public Basis basis;
/// <summary>
- /// The origin vector (column 3, the fourth column). Equivalent to array index `[3]`.
+ /// The origin vector (column 3, the fourth column). Equivalent to array index <c>[3]</c>.
/// </summary>
public Vector3 origin;
/// <summary>
- /// Access whole columns in the form of Vector3. The fourth column is the origin vector.
+ /// Access whole columns in the form of <see cref="Vector3"/>.
+ /// The fourth column is the <see cref="origin"/> vector.
/// </summary>
/// <param name="column">Which column vector.</param>
public Vector3 this[int column]
@@ -77,7 +78,8 @@ namespace Godot
}
/// <summary>
- /// Access matrix elements in column-major order. The fourth column is the origin vector.
+ /// Access matrix elements in column-major order.
+ /// The fourth column is the <see cref="origin"/> vector.
/// </summary>
/// <param name="column">Which column, the matrix horizontal position.</param>
/// <param name="row">Which row, the matrix vertical position.</param>
@@ -106,6 +108,7 @@ namespace Godot
/// Returns the inverse of the transform, under the assumption that
/// the transformation is composed of rotation, scaling, and translation.
/// </summary>
+ /// <seealso cref="Inverse"/>
/// <returns>The inverse transformation matrix.</returns>
public Transform3D AffineInverse()
{
@@ -114,7 +117,7 @@ namespace Godot
}
/// <summary>
- /// Interpolates this transform to the other `transform` by `weight`.
+ /// Interpolates this transform to the other <paramref name="transform"/> by <paramref name="weight"/>.
/// </summary>
/// <param name="transform">The other transform.</param>
/// <param name="weight">A value on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
@@ -132,7 +135,9 @@ namespace Godot
Vector3 destinationLocation = transform.origin;
var interpolated = new Transform3D();
- interpolated.basis.SetQuaternionScale(sourceRotation.Slerp(destinationRotation, weight).Normalized(), sourceScale.Lerp(destinationScale, weight));
+ Quaternion quaternion = sourceRotation.Slerp(destinationRotation, weight).Normalized();
+ Vector3 scale = sourceScale.Lerp(destinationScale, weight);
+ interpolated.basis.SetQuaternionScale(quaternion, scale);
interpolated.origin = sourceLocation.Lerp(destinationLocation, weight);
return interpolated;
@@ -152,11 +157,11 @@ namespace Godot
/// <summary>
/// Returns a copy of the transform rotated such that its
- /// -Z axis (forward) points towards the target position.
+ /// -Z axis (forward) points towards the <paramref name="target"/> position.
///
- /// The transform will first be rotated around the given up vector,
- /// and then fully aligned to the target by a further rotation around
- /// an axis perpendicular to both the target and up vectors.
+ /// The transform will first be rotated around the given <paramref name="up"/> vector,
+ /// and then fully aligned to the <paramref name="target"/> by a further rotation around
+ /// an axis perpendicular to both the <paramref name="target"/> and <paramref name="up"/> vectors.
///
/// Operations take place in global space.
/// </summary>
@@ -165,7 +170,7 @@ namespace Godot
/// <returns>The resulting transform.</returns>
public Transform3D LookingAt(Vector3 target, Vector3 up)
{
- var t = this;
+ Transform3D t = this;
t.SetLookAt(origin, target, up);
return t;
}
@@ -181,7 +186,7 @@ namespace Godot
}
/// <summary>
- /// Rotates the transform around the given `axis` by `phi` (in radians),
+ /// Rotates the transform around the given <paramref name="axis"/> by <paramref name="phi"/> (in radians),
/// using matrix multiplication. The axis must be a normalized vector.
/// </summary>
/// <param name="axis">The axis to rotate around. Must be normalized.</param>
@@ -226,7 +231,7 @@ namespace Godot
}
/// <summary>
- /// Translates the transform by the given `offset`,
+ /// Translates the transform by the given <paramref name="offset"/>,
/// relative to the transform's basis vectors.
///
/// Unlike <see cref="Rotated"/> and <see cref="Scaled"/>,
@@ -247,6 +252,7 @@ namespace Godot
/// <summary>
/// Returns a vector transformed (multiplied) by this transformation matrix.
/// </summary>
+ /// <seealso cref="XformInv(Vector3)"/>
/// <param name="v">A vector to transform.</param>
/// <returns>The transformed vector.</returns>
public Vector3 Xform(Vector3 v)
@@ -265,6 +271,7 @@ namespace Godot
/// Note: This results in a multiplication by the inverse of the
/// transformation matrix only if it represents a rotation-reflection.
/// </summary>
+ /// <seealso cref="Xform(Vector3)"/>
/// <param name="v">A vector to inversely transform.</param>
/// <returns>The inversely transformed vector.</returns>
public Vector3 XformInv(Vector3 v)
@@ -273,9 +280,9 @@ namespace Godot
return new Vector3
(
- basis.Row0[0] * vInv.x + basis.Row1[0] * vInv.y + basis.Row2[0] * vInv.z,
- basis.Row0[1] * vInv.x + basis.Row1[1] * vInv.y + basis.Row2[1] * vInv.z,
- basis.Row0[2] * vInv.x + basis.Row1[2] * vInv.y + basis.Row2[2] * vInv.z
+ (basis.Row0[0] * vInv.x) + (basis.Row1[0] * vInv.y) + (basis.Row2[0] * vInv.z),
+ (basis.Row0[1] * vInv.x) + (basis.Row1[1] * vInv.y) + (basis.Row2[1] * vInv.z),
+ (basis.Row0[2] * vInv.x) + (basis.Row1[2] * vInv.y) + (basis.Row2[2] * vInv.z)
);
}
@@ -287,25 +294,25 @@ namespace Godot
/// <summary>
/// The identity transform, with no translation, rotation, or scaling applied.
- /// This is used as a replacement for `Transform()` in GDScript.
- /// Do not use `new Transform()` with no arguments in C#, because it sets all values to zero.
+ /// This is used as a replacement for <c>Transform()</c> in GDScript.
+ /// Do not use <c>new Transform()</c> with no arguments in C#, because it sets all values to zero.
/// </summary>
- /// <value>Equivalent to `new Transform(Vector3.Right, Vector3.Up, Vector3.Back, Vector3.Zero)`.</value>
+ /// <value>Equivalent to <c>new Transform(Vector3.Right, Vector3.Up, Vector3.Back, Vector3.Zero)</c>.</value>
public static Transform3D Identity { get { return _identity; } }
/// <summary>
/// The transform that will flip something along the X axis.
/// </summary>
- /// <value>Equivalent to `new Transform(Vector3.Left, Vector3.Up, Vector3.Back, Vector3.Zero)`.</value>
+ /// <value>Equivalent to <c>new Transform(Vector3.Left, Vector3.Up, Vector3.Back, Vector3.Zero)</c>.</value>
public static Transform3D FlipX { get { return _flipX; } }
/// <summary>
/// The transform that will flip something along the Y axis.
/// </summary>
- /// <value>Equivalent to `new Transform(Vector3.Right, Vector3.Down, Vector3.Back, Vector3.Zero)`.</value>
+ /// <value>Equivalent to <c>new Transform(Vector3.Right, Vector3.Down, Vector3.Back, Vector3.Zero)</c>.</value>
public static Transform3D FlipY { get { return _flipY; } }
/// <summary>
/// The transform that will flip something along the Z axis.
/// </summary>
- /// <value>Equivalent to `new Transform(Vector3.Right, Vector3.Up, Vector3.Forward, Vector3.Zero)`.</value>
+ /// <value>Equivalent to <c>new Transform(Vector3.Right, Vector3.Up, Vector3.Forward, Vector3.Zero)</c>.</value>
public static Transform3D FlipZ { get { return _flipZ; } }
/// <summary>
@@ -322,9 +329,10 @@ namespace Godot
}
/// <summary>
- /// Constructs a transformation matrix from the given quaternion and origin vector.
+ /// Constructs a transformation matrix from the given <paramref name="quaternion"/>
+ /// and <paramref name="origin"/> vector.
/// </summary>
- /// <param name="quaternion">The <see cref="Godot.Quaternion"/> to create the basis from.</param>
+ /// <param name="quaternion">The <see cref="Quaternion"/> to create the basis from.</param>
/// <param name="origin">The origin vector, or column index 3.</param>
public Transform3D(Quaternion quaternion, Vector3 origin)
{
@@ -333,9 +341,10 @@ namespace Godot
}
/// <summary>
- /// Constructs a transformation matrix from the given basis and origin vector.
+ /// Constructs a transformation matrix from the given <paramref name="basis"/> and
+ /// <paramref name="origin"/> vector.
/// </summary>
- /// <param name="basis">The <see cref="Godot.Basis"/> to create the basis from.</param>
+ /// <param name="basis">The <see cref="Basis"/> to create the basis from.</param>
/// <param name="origin">The origin vector, or column index 3.</param>
public Transform3D(Basis basis, Vector3 origin)
{
@@ -360,6 +369,11 @@ namespace Godot
return !left.Equals(right);
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this transform and <paramref name="obj"/> are equal.
+ /// </summary>
+ /// <param name="obj">The other object to compare.</param>
+ /// <returns>Whether or not the transform and the other object are equal.</returns>
public override bool Equals(object obj)
{
if (obj is Transform3D)
@@ -370,14 +384,19 @@ namespace Godot
return false;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this transform and <paramref name="other"/> are equal.
+ /// </summary>
+ /// <param name="other">The other transform to compare.</param>
+ /// <returns>Whether or not the matrices are equal.</returns>
public bool Equals(Transform3D other)
{
return basis.Equals(other.basis) && origin.Equals(other.origin);
}
/// <summary>
- /// Returns true if this transform and `other` are approximately equal, by running
- /// <see cref="Vector3.IsEqualApprox(Vector3)"/> on each component.
+ /// Returns <see langword="true"/> if this transform and <paramref name="other"/> are approximately equal,
+ /// by running <see cref="Vector3.IsEqualApprox(Vector3)"/> on each component.
/// </summary>
/// <param name="other">The other transform to compare.</param>
/// <returns>Whether or not the matrices are approximately equal.</returns>
@@ -386,16 +405,28 @@ namespace Godot
return basis.IsEqualApprox(other.basis) && origin.IsEqualApprox(other.origin);
}
+ /// <summary>
+ /// Serves as the hash function for <see cref="Transform3D"/>.
+ /// </summary>
+ /// <returns>A hash code for this transform.</returns>
public override int GetHashCode()
{
return basis.GetHashCode() ^ origin.GetHashCode();
}
+ /// <summary>
+ /// Converts this <see cref="Transform3D"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this transform.</returns>
public override string ToString()
{
return $"[X: {basis.x}, Y: {basis.y}, Z: {basis.z}, O: {origin}]";
}
+ /// <summary>
+ /// Converts this <see cref="Transform3D"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this transform.</returns>
public string ToString(string format)
{
return $"[X: {basis.x.ToString(format)}, Y: {basis.y.ToString(format)}, Z: {basis.z.ToString(format)}, O: {origin.ToString(format)}]";
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/UnhandledExceptionArgs.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/UnhandledExceptionArgs.cs
index be01674568..eae8927ceb 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/UnhandledExceptionArgs.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/UnhandledExceptionArgs.cs
@@ -8,7 +8,7 @@ namespace Godot
public class UnhandledExceptionArgs
{
/// <summary>
- /// Exception object
+ /// Exception object.
/// </summary>
public Exception Exception { get; private set; }
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs
index 8bb5e90a68..fe70d71cce 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs
@@ -21,23 +21,36 @@ namespace Godot
/// </summary>
public enum Axis
{
+ /// <summary>
+ /// The vector's X axis.
+ /// </summary>
X = 0,
+ /// <summary>
+ /// The vector's Y axis.
+ /// </summary>
Y
}
/// <summary>
- /// The vector's X component. Also accessible by using the index position `[0]`.
+ /// The vector's X component. Also accessible by using the index position <c>[0]</c>.
/// </summary>
public real_t x;
+
/// <summary>
- /// The vector's Y component. Also accessible by using the index position `[1]`.
+ /// The vector's Y component. Also accessible by using the index position <c>[1]</c>.
/// </summary>
public real_t y;
/// <summary>
/// Access vector components using their index.
/// </summary>
- /// <value>`[0]` is equivalent to `.x`, `[1]` is equivalent to `.y`.</value>
+ /// <exception cref="IndexOutOfRangeException">
+ /// Thrown when the given the <paramref name="index"/> is not 0 or 1.
+ /// </exception>
+ /// <value>
+ /// <c>[0]</c> is equivalent to <see cref="x"/>,
+ /// <c>[1]</c> is equivalent to <see cref="y"/>.
+ /// </value>
public real_t this[int index]
{
get
@@ -97,7 +110,7 @@ namespace Godot
/// Returns this vector's angle with respect to the X axis, or (1, 0) vector, in radians.
///
/// Equivalent to the result of <see cref="Mathf.Atan2(real_t, real_t)"/> when
- /// called with the vector's `y` and `x` as parameters: `Mathf.Atan2(v.y, v.x)`.
+ /// called with the vector's <see cref="y"/> and <see cref="x"/> as parameters: <c>Mathf.Atan2(v.y, v.x)</c>.
/// </summary>
/// <returns>The angle of this vector, in radians.</returns>
public real_t Angle()
@@ -126,9 +139,9 @@ namespace Godot
}
/// <summary>
- /// Returns the aspect ratio of this vector, the ratio of `x` to `y`.
+ /// Returns the aspect ratio of this vector, the ratio of <see cref="x"/> to <see cref="y"/>.
/// </summary>
- /// <returns>The `x` component divided by the `y` component.</returns>
+ /// <returns>The <see cref="x"/> component divided by the <see cref="y"/> component.</returns>
public real_t Aspect()
{
return x / y;
@@ -155,7 +168,7 @@ namespace Godot
/// <summary>
/// Returns a new vector with all components clamped between the
- /// components of `min` and `max` using
+ /// components of <paramref name="min"/> and <paramref name="max"/> using
/// <see cref="Mathf.Clamp(real_t, real_t, real_t)"/>.
/// </summary>
/// <param name="min">The vector with minimum allowed values.</param>
@@ -171,21 +184,22 @@ namespace Godot
}
/// <summary>
- /// Returns the cross product of this vector and `b`.
+ /// Returns the cross product of this vector and <paramref name="b"/>.
/// </summary>
/// <param name="b">The other vector.</param>
/// <returns>The cross product value.</returns>
public real_t Cross(Vector2 b)
{
- return x * b.y - y * b.x;
+ return (x * b.y) - (y * b.x);
}
/// <summary>
- /// Performs a cubic interpolation between vectors `preA`, this vector, `b`, and `postB`, by the given amount `t`.
+ /// Performs a cubic interpolation between vectors <paramref name="preA"/>, this vector,
+ /// <paramref name="b"/>, and <paramref name="postB"/>, by the given amount <paramref name="weight"/>.
/// </summary>
/// <param name="b">The destination vector.</param>
/// <param name="preA">A vector before this vector.</param>
- /// <param name="postB">A vector after `b`.</param>
+ /// <param name="postB">A vector after <paramref name="b"/>.</param>
/// <param name="weight">A value on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
/// <returns>The interpolated vector.</returns>
public Vector2 CubicInterpolate(Vector2 b, Vector2 preA, Vector2 postB, real_t weight)
@@ -199,24 +213,26 @@ namespace Godot
real_t t2 = t * t;
real_t t3 = t2 * t;
- return 0.5f * (p1 * 2.0f +
- (-p0 + p2) * t +
- (2.0f * p0 - 5.0f * p1 + 4 * p2 - p3) * t2 +
- (-p0 + 3.0f * p1 - 3.0f * p2 + p3) * t3);
+ return 0.5f * (
+ (p1 * 2.0f) +
+ ((-p0 + p2) * t) +
+ (((2.0f * p0) - (5.0f * p1) + (4 * p2) - p3) * t2) +
+ ((-p0 + (3.0f * p1) - (3.0f * p2) + p3) * t3)
+ );
}
/// <summary>
- /// Returns the normalized vector pointing from this vector to `b`.
+ /// Returns the normalized vector pointing from this vector to <paramref name="b"/>.
/// </summary>
/// <param name="b">The other vector to point towards.</param>
- /// <returns>The direction from this vector to `b`.</returns>
+ /// <returns>The direction from this vector to <paramref name="b"/>.</returns>
public Vector2 DirectionTo(Vector2 b)
{
return new Vector2(b.x - x, b.y - y).Normalized();
}
/// <summary>
- /// Returns the squared distance between this vector and `to`.
+ /// Returns the squared distance between this vector and <paramref name="to"/>.
/// This method runs faster than <see cref="DistanceTo"/>, so prefer it if
/// you need to compare vectors or need the squared distance for some formula.
/// </summary>
@@ -228,7 +244,7 @@ namespace Godot
}
/// <summary>
- /// Returns the distance between this vector and `to`.
+ /// Returns the distance between this vector and <paramref name="to"/>.
/// </summary>
/// <param name="to">The other vector to use.</param>
/// <returns>The distance between the two vectors.</returns>
@@ -238,13 +254,13 @@ namespace Godot
}
/// <summary>
- /// Returns the dot product of this vector and `with`.
+ /// Returns the dot product of this vector and <paramref name="with"/>.
/// </summary>
/// <param name="with">The other vector to use.</param>
/// <returns>The dot product of the two vectors.</returns>
public real_t Dot(Vector2 with)
{
- return x * with.x + y * with.y;
+ return (x * with.x) + (y * with.y);
}
/// <summary>
@@ -257,7 +273,7 @@ namespace Godot
}
/// <summary>
- /// Returns the inverse of this vector. This is the same as `new Vector2(1 / v.x, 1 / v.y)`.
+ /// Returns the inverse of this vector. This is the same as <c>new Vector2(1 / v.x, 1 / v.y)</c>.
/// </summary>
/// <returns>The inverse of this vector.</returns>
public Vector2 Inverse()
@@ -266,9 +282,9 @@ namespace Godot
}
/// <summary>
- /// Returns true if the vector is normalized, and false otherwise.
+ /// Returns <see langword="true"/> if the vector is normalized, and <see langword="false"/> otherwise.
/// </summary>
- /// <returns>A bool indicating whether or not the vector is normalized.</returns>
+ /// <returns>A <see langword="bool"/> indicating whether or not the vector is normalized.</returns>
public bool IsNormalized()
{
return Mathf.Abs(LengthSquared() - 1.0f) < Mathf.Epsilon;
@@ -277,10 +293,11 @@ namespace Godot
/// <summary>
/// Returns the length (magnitude) of this vector.
/// </summary>
+ /// <seealso cref="LengthSquared"/>
/// <returns>The length of this vector.</returns>
public real_t Length()
{
- return Mathf.Sqrt(x * x + y * y);
+ return Mathf.Sqrt((x * x) + (y * y));
}
/// <summary>
@@ -291,12 +308,12 @@ namespace Godot
/// <returns>The squared length of this vector.</returns>
public real_t LengthSquared()
{
- return x * x + y * y;
+ return (x * x) + (y * y);
}
/// <summary>
/// Returns the result of the linear interpolation between
- /// this vector and `to` by amount `weight`.
+ /// this vector and <paramref name="to"/> by amount <paramref name="weight"/>.
/// </summary>
/// <param name="to">The destination vector for interpolation.</param>
/// <param name="weight">A value on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
@@ -312,10 +329,12 @@ namespace Godot
/// <summary>
/// Returns the result of the linear interpolation between
- /// this vector and `to` by the vector amount `weight`.
+ /// this vector and <paramref name="to"/> by the vector amount <paramref name="weight"/>.
/// </summary>
/// <param name="to">The destination vector for interpolation.</param>
- /// <param name="weight">A vector with components on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
+ /// <param name="weight">
+ /// A vector with components on the range of 0.0 to 1.0, representing the amount of interpolation.
+ /// </param>
/// <returns>The resulting vector of the interpolation.</returns>
public Vector2 Lerp(Vector2 to, Vector2 weight)
{
@@ -327,7 +346,7 @@ namespace Godot
}
/// <summary>
- /// Returns the vector with a maximum length by limiting its length to `length`.
+ /// Returns the vector with a maximum length by limiting its length to <paramref name="length"/>.
/// </summary>
/// <param name="length">The length to limit to.</param>
/// <returns>The vector with its length limited.</returns>
@@ -366,35 +385,41 @@ namespace Godot
}
/// <summary>
- /// Moves this vector toward `to` by the fixed `delta` amount.
+ /// Moves this vector toward <paramref name="to"/> by the fixed <paramref name="delta"/> amount.
/// </summary>
/// <param name="to">The vector to move towards.</param>
/// <param name="delta">The amount to move towards by.</param>
/// <returns>The resulting vector.</returns>
public Vector2 MoveToward(Vector2 to, real_t delta)
{
- var v = this;
- var vd = to - v;
- var len = vd.Length();
- return len <= delta || len < Mathf.Epsilon ? to : v + vd / len * delta;
+ Vector2 v = this;
+ Vector2 vd = to - v;
+ real_t len = vd.Length();
+ if (len <= delta || len < Mathf.Epsilon)
+ return to;
+
+ return v + (vd / len * delta);
}
/// <summary>
- /// Returns the vector scaled to unit length. Equivalent to `v / v.Length()`.
+ /// Returns the vector scaled to unit length. Equivalent to <c>v / v.Length()</c>.
/// </summary>
/// <returns>A normalized version of the vector.</returns>
public Vector2 Normalized()
{
- var v = this;
+ Vector2 v = this;
v.Normalize();
return v;
}
/// <summary>
- /// Returns a vector composed of the <see cref="Mathf.PosMod(real_t, real_t)"/> of this vector's components and `mod`.
+ /// Returns a vector composed of the <see cref="Mathf.PosMod(real_t, real_t)"/> of this vector's components
+ /// and <paramref name="mod"/>.
/// </summary>
/// <param name="mod">A value representing the divisor of the operation.</param>
- /// <returns>A vector with each component <see cref="Mathf.PosMod(real_t, real_t)"/> by `mod`.</returns>
+ /// <returns>
+ /// A vector with each component <see cref="Mathf.PosMod(real_t, real_t)"/> by <paramref name="mod"/>.
+ /// </returns>
public Vector2 PosMod(real_t mod)
{
Vector2 v;
@@ -404,10 +429,13 @@ namespace Godot
}
/// <summary>
- /// Returns a vector composed of the <see cref="Mathf.PosMod(real_t, real_t)"/> of this vector's components and `modv`'s components.
+ /// Returns a vector composed of the <see cref="Mathf.PosMod(real_t, real_t)"/> of this vector's components
+ /// and <paramref name="modv"/>'s components.
/// </summary>
/// <param name="modv">A vector representing the divisors of the operation.</param>
- /// <returns>A vector with each component <see cref="Mathf.PosMod(real_t, real_t)"/> by `modv`'s components.</returns>
+ /// <returns>
+ /// A vector with each component <see cref="Mathf.PosMod(real_t, real_t)"/> by <paramref name="modv"/>'s components.
+ /// </returns>
public Vector2 PosMod(Vector2 modv)
{
Vector2 v;
@@ -417,7 +445,7 @@ namespace Godot
}
/// <summary>
- /// Returns this vector projected onto another vector `b`.
+ /// Returns this vector projected onto another vector <paramref name="onNormal"/>.
/// </summary>
/// <param name="onNormal">The vector to project onto.</param>
/// <returns>The projected vector.</returns>
@@ -427,7 +455,7 @@ namespace Godot
}
/// <summary>
- /// Returns this vector reflected from a plane defined by the given `normal`.
+ /// Returns this vector reflected from a plane defined by the given <paramref name="normal"/>.
/// </summary>
/// <param name="normal">The normal vector defining the plane to reflect from. Must be normalized.</param>
/// <returns>The reflected vector.</returns>
@@ -439,11 +467,11 @@ namespace Godot
throw new ArgumentException("Argument is not normalized", nameof(normal));
}
#endif
- return 2 * Dot(normal) * normal - this;
+ return (2 * Dot(normal) * normal) - this;
}
/// <summary>
- /// Rotates this vector by `phi` radians.
+ /// Rotates this vector by <paramref name="phi"/> radians.
/// </summary>
/// <param name="phi">The angle to rotate by, in radians.</param>
/// <returns>The rotated vector.</returns>
@@ -471,7 +499,7 @@ namespace Godot
/// on the signs of this vector's components, or zero if the component is zero,
/// by calling <see cref="Mathf.Sign(real_t)"/> on each component.
/// </summary>
- /// <returns>A vector with all components as either `1`, `-1`, or `0`.</returns>
+ /// <returns>A vector with all components as either <c>1</c>, <c>-1</c>, or <c>0</c>.</returns>
public Vector2 Sign()
{
Vector2 v;
@@ -482,7 +510,7 @@ namespace Godot
/// <summary>
/// Returns the result of the spherical linear interpolation between
- /// this vector and `to` by amount `weight`.
+ /// this vector and <paramref name="to"/> by amount <paramref name="weight"/>.
///
/// Note: Both vectors must be normalized.
/// </summary>
@@ -498,24 +526,24 @@ namespace Godot
}
if (!to.IsNormalized())
{
- throw new InvalidOperationException("Vector2.Slerp: `to` is not normalized.");
+ throw new InvalidOperationException($"Vector2.Slerp: `{nameof(to)}` is not normalized.");
}
#endif
return Rotated(AngleTo(to) * weight);
}
/// <summary>
- /// Returns this vector slid along a plane defined by the given normal.
+ /// Returns this vector slid along a plane defined by the given <paramref name="normal"/>.
/// </summary>
/// <param name="normal">The normal vector defining the plane to slide on.</param>
/// <returns>The slid vector.</returns>
public Vector2 Slide(Vector2 normal)
{
- return this - normal * Dot(normal);
+ return this - (normal * Dot(normal));
}
/// <summary>
- /// Returns this vector with each component snapped to the nearest multiple of `step`.
+ /// Returns this vector with each component snapped to the nearest multiple of <paramref name="step"/>.
/// This can also be used to round to an arbitrary number of decimals.
/// </summary>
/// <param name="step">A vector value representing the step size to snap to.</param>
@@ -546,40 +574,40 @@ namespace Godot
private static readonly Vector2 _left = new Vector2(-1, 0);
/// <summary>
- /// Zero vector, a vector with all components set to `0`.
+ /// Zero vector, a vector with all components set to <c>0</c>.
/// </summary>
- /// <value>Equivalent to `new Vector2(0, 0)`</value>
+ /// <value>Equivalent to <c>new Vector2(0, 0)</c>.</value>
public static Vector2 Zero { get { return _zero; } }
/// <summary>
- /// One vector, a vector with all components set to `1`.
+ /// One vector, a vector with all components set to <c>1</c>.
/// </summary>
- /// <value>Equivalent to `new Vector2(1, 1)`</value>
+ /// <value>Equivalent to <c>new Vector2(1, 1)</c>.</value>
public static Vector2 One { get { return _one; } }
/// <summary>
- /// Infinity vector, a vector with all components set to `Mathf.Inf`.
+ /// Infinity vector, a vector with all components set to <see cref="Mathf.Inf"/>.
/// </summary>
- /// <value>Equivalent to `new Vector2(Mathf.Inf, Mathf.Inf)`</value>
+ /// <value>Equivalent to <c>new Vector2(Mathf.Inf, Mathf.Inf)</c>.</value>
public static Vector2 Inf { get { return _inf; } }
/// <summary>
/// Up unit vector. Y is down in 2D, so this vector points -Y.
/// </summary>
- /// <value>Equivalent to `new Vector2(0, -1)`</value>
+ /// <value>Equivalent to <c>new Vector2(0, -1)</c>.</value>
public static Vector2 Up { get { return _up; } }
/// <summary>
/// Down unit vector. Y is down in 2D, so this vector points +Y.
/// </summary>
- /// <value>Equivalent to `new Vector2(0, 1)`</value>
+ /// <value>Equivalent to <c>new Vector2(0, 1)</c>.</value>
public static Vector2 Down { get { return _down; } }
/// <summary>
/// Right unit vector. Represents the direction of right.
/// </summary>
- /// <value>Equivalent to `new Vector2(1, 0)`</value>
+ /// <value>Equivalent to <c>new Vector2(1, 0)</c>.</value>
public static Vector2 Right { get { return _right; } }
/// <summary>
/// Left unit vector. Represents the direction of left.
/// </summary>
- /// <value>Equivalent to `new Vector2(-1, 0)`</value>
+ /// <value>Equivalent to <c>new Vector2(-1, 0)</c>.</value>
public static Vector2 Left { get { return _left; } }
/// <summary>
@@ -603,6 +631,17 @@ namespace Godot
y = v.y;
}
+ /// <summary>
+ /// Creates a unit Vector2 rotated to the given angle. This is equivalent to doing
+ /// <c>Vector2(Mathf.Cos(angle), Mathf.Sin(angle))</c> or <c>Vector2.Right.Rotated(angle)</c>.
+ /// </summary>
+ /// <param name="angle">Angle of the vector, in radians.</param>
+ /// <returns>The resulting vector.</returns>
+ public static Vector2 FromAngle(real_t angle)
+ {
+ return new Vector2(Mathf.Cos(angle), Mathf.Sin(angle));
+ }
+
public static Vector2 operator +(Vector2 left, Vector2 right)
{
left.x += right.x;
@@ -719,6 +758,11 @@ namespace Godot
return left.x >= right.x;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this vector and <paramref name="obj"/> are equal.
+ /// </summary>
+ /// <param name="obj">The other object to compare.</param>
+ /// <returns>Whether or not the vector and the other object are equal.</returns>
public override bool Equals(object obj)
{
if (obj is Vector2)
@@ -728,14 +772,19 @@ namespace Godot
return false;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this vector and <paramref name="other"/> are equal.
+ /// </summary>
+ /// <param name="other">The other vector to compare.</param>
+ /// <returns>Whether or not the vectors are equal.</returns>
public bool Equals(Vector2 other)
{
return x == other.x && y == other.y;
}
/// <summary>
- /// Returns true if this vector and `other` are approximately equal, by running
- /// <see cref="Mathf.IsEqualApprox(real_t, real_t)"/> on each component.
+ /// Returns <see langword="true"/> if this vector and <paramref name="other"/> are approximately equal,
+ /// by running <see cref="Mathf.IsEqualApprox(real_t, real_t)"/> on each component.
/// </summary>
/// <param name="other">The other vector to compare.</param>
/// <returns>Whether or not the vectors are approximately equal.</returns>
@@ -744,16 +793,28 @@ namespace Godot
return Mathf.IsEqualApprox(x, other.x) && Mathf.IsEqualApprox(y, other.y);
}
+ /// <summary>
+ /// Serves as the hash function for <see cref="Vector2"/>.
+ /// </summary>
+ /// <returns>A hash code for this vector.</returns>
public override int GetHashCode()
{
return y.GetHashCode() ^ x.GetHashCode();
}
+ /// <summary>
+ /// Converts this <see cref="Vector2"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this vector.</returns>
public override string ToString()
{
return $"({x}, {y})";
}
+ /// <summary>
+ /// Converts this <see cref="Vector2"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this vector.</returns>
public string ToString(string format)
{
return $"({x.ToString(format)}, {y.ToString(format)})";
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs
index 959f262f52..ca4531d885 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs
@@ -21,23 +21,36 @@ namespace Godot
/// </summary>
public enum Axis
{
+ /// <summary>
+ /// The vector's X axis.
+ /// </summary>
X = 0,
+ /// <summary>
+ /// The vector's Y axis.
+ /// </summary>
Y
}
/// <summary>
- /// The vector's X component. Also accessible by using the index position `[0]`.
+ /// The vector's X component. Also accessible by using the index position <c>[0]</c>.
/// </summary>
public int x;
+
/// <summary>
- /// The vector's Y component. Also accessible by using the index position `[1]`.
+ /// The vector's Y component. Also accessible by using the index position <c>[1]</c>.
/// </summary>
public int y;
/// <summary>
/// Access vector components using their index.
/// </summary>
- /// <value>`[0]` is equivalent to `.x`, `[1]` is equivalent to `.y`.</value>
+ /// <exception cref="IndexOutOfRangeException">
+ /// Thrown when the given the <paramref name="index"/> is not 0 or 1.
+ /// </exception>
+ /// <value>
+ /// <c>[0]</c> is equivalent to <see cref="x"/>,
+ /// <c>[1]</c> is equivalent to <see cref="y"/>.
+ /// </value>
public int this[int index]
{
get
@@ -81,7 +94,7 @@ namespace Godot
/// Returns this vector's angle with respect to the X axis, or (1, 0) vector, in radians.
///
/// Equivalent to the result of <see cref="Mathf.Atan2(real_t, real_t)"/> when
- /// called with the vector's `y` and `x` as parameters: `Mathf.Atan2(v.y, v.x)`.
+ /// called with the vector's <see cref="y"/> and <see cref="x"/> as parameters: <c>Mathf.Atan2(v.y, v.x)</c>.
/// </summary>
/// <returns>The angle of this vector, in radians.</returns>
public real_t Angle()
@@ -110,9 +123,9 @@ namespace Godot
}
/// <summary>
- /// Returns the aspect ratio of this vector, the ratio of `x` to `y`.
+ /// Returns the aspect ratio of this vector, the ratio of <see cref="x"/> to <see cref="y"/>.
/// </summary>
- /// <returns>The `x` component divided by the `y` component.</returns>
+ /// <returns>The <see cref="x"/> component divided by the <see cref="y"/> component.</returns>
public real_t Aspect()
{
return x / (real_t)y;
@@ -120,7 +133,7 @@ namespace Godot
/// <summary>
/// Returns a new vector with all components clamped between the
- /// components of `min` and `max` using
+ /// components of <paramref name="min"/> and <paramref name="max"/> using
/// <see cref="Mathf.Clamp(int, int, int)"/>.
/// </summary>
/// <param name="min">The vector with minimum allowed values.</param>
@@ -136,7 +149,7 @@ namespace Godot
}
/// <summary>
- /// Returns the cross product of this vector and `b`.
+ /// Returns the cross product of this vector and <paramref name="b"/>.
/// </summary>
/// <param name="b">The other vector.</param>
/// <returns>The cross product vector.</returns>
@@ -146,7 +159,7 @@ namespace Godot
}
/// <summary>
- /// Returns the squared distance between this vector and `b`.
+ /// Returns the squared distance between this vector and <paramref name="b"/>.
/// This method runs faster than <see cref="DistanceTo"/>, so prefer it if
/// you need to compare vectors or need the squared distance for some formula.
/// </summary>
@@ -158,7 +171,7 @@ namespace Godot
}
/// <summary>
- /// Returns the distance between this vector and `b`.
+ /// Returns the distance between this vector and <paramref name="b"/>.
/// </summary>
/// <param name="b">The other vector to use.</param>
/// <returns>The distance between the two vectors.</returns>
@@ -168,7 +181,7 @@ namespace Godot
}
/// <summary>
- /// Returns the dot product of this vector and `b`.
+ /// Returns the dot product of this vector and <paramref name="b"/>.
/// </summary>
/// <param name="b">The other vector to use.</param>
/// <returns>The dot product of the two vectors.</returns>
@@ -180,6 +193,7 @@ namespace Godot
/// <summary>
/// Returns the length (magnitude) of this vector.
/// </summary>
+ /// <seealso cref="LengthSquared"/>
/// <returns>The length of this vector.</returns>
public real_t Length()
{
@@ -224,10 +238,13 @@ namespace Godot
}
/// <summary>
- /// Returns a vector composed of the <see cref="Mathf.PosMod(int, int)"/> of this vector's components and `mod`.
+ /// Returns a vector composed of the <see cref="Mathf.PosMod(int, int)"/> of this vector's components
+ /// and <paramref name="mod"/>.
/// </summary>
/// <param name="mod">A value representing the divisor of the operation.</param>
- /// <returns>A vector with each component <see cref="Mathf.PosMod(int, int)"/> by `mod`.</returns>
+ /// <returns>
+ /// A vector with each component <see cref="Mathf.PosMod(int, int)"/> by <paramref name="mod"/>.
+ /// </returns>
public Vector2i PosMod(int mod)
{
Vector2i v = this;
@@ -237,10 +254,13 @@ namespace Godot
}
/// <summary>
- /// Returns a vector composed of the <see cref="Mathf.PosMod(int, int)"/> of this vector's components and `modv`'s components.
+ /// Returns a vector composed of the <see cref="Mathf.PosMod(int, int)"/> of this vector's components
+ /// and <paramref name="modv"/>'s components.
/// </summary>
/// <param name="modv">A vector representing the divisors of the operation.</param>
- /// <returns>A vector with each component <see cref="Mathf.PosMod(int, int)"/> by `modv`'s components.</returns>
+ /// <returns>
+ /// A vector with each component <see cref="Mathf.PosMod(int, int)"/> by <paramref name="modv"/>'s components.
+ /// </returns>
public Vector2i PosMod(Vector2i modv)
{
Vector2i v = this;
@@ -254,7 +274,7 @@ namespace Godot
/// on the signs of this vector's components, or zero if the component is zero,
/// by calling <see cref="Mathf.Sign(int)"/> on each component.
/// </summary>
- /// <returns>A vector with all components as either `1`, `-1`, or `0`.</returns>
+ /// <returns>A vector with all components as either <c>1</c>, <c>-1</c>, or <c>0</c>.</returns>
public Vector2i Sign()
{
Vector2i v = this;
@@ -283,35 +303,35 @@ namespace Godot
private static readonly Vector2i _left = new Vector2i(-1, 0);
/// <summary>
- /// Zero vector, a vector with all components set to `0`.
+ /// Zero vector, a vector with all components set to <c>0</c>.
/// </summary>
- /// <value>Equivalent to `new Vector2i(0, 0)`</value>
+ /// <value>Equivalent to <c>new Vector2i(0, 0)</c>.</value>
public static Vector2i Zero { get { return _zero; } }
/// <summary>
- /// One vector, a vector with all components set to `1`.
+ /// One vector, a vector with all components set to <c>1</c>.
/// </summary>
- /// <value>Equivalent to `new Vector2i(1, 1)`</value>
+ /// <value>Equivalent to <c>new Vector2i(1, 1)</c>.</value>
public static Vector2i One { get { return _one; } }
/// <summary>
/// Up unit vector. Y is down in 2D, so this vector points -Y.
/// </summary>
- /// <value>Equivalent to `new Vector2i(0, -1)`</value>
+ /// <value>Equivalent to <c>new Vector2i(0, -1)</c>.</value>
public static Vector2i Up { get { return _up; } }
/// <summary>
/// Down unit vector. Y is down in 2D, so this vector points +Y.
/// </summary>
- /// <value>Equivalent to `new Vector2i(0, 1)`</value>
+ /// <value>Equivalent to <c>new Vector2i(0, 1)</c>.</value>
public static Vector2i Down { get { return _down; } }
/// <summary>
/// Right unit vector. Represents the direction of right.
/// </summary>
- /// <value>Equivalent to `new Vector2i(1, 0)`</value>
+ /// <value>Equivalent to <c>new Vector2i(1, 0)</c>.</value>
public static Vector2i Right { get { return _right; } }
/// <summary>
/// Left unit vector. Represents the direction of left.
/// </summary>
- /// <value>Equivalent to `new Vector2i(-1, 0)`</value>
+ /// <value>Equivalent to <c>new Vector2i(-1, 0)</c>.</value>
public static Vector2i Left { get { return _left; } }
/// <summary>
@@ -476,16 +496,29 @@ namespace Godot
return left.x >= right.x;
}
+ /// <summary>
+ /// Converts this <see cref="Vector2i"/> to a <see cref="Vector2"/>.
+ /// </summary>
+ /// <param name="value">The vector to convert.</param>
public static implicit operator Vector2(Vector2i value)
{
return new Vector2(value.x, value.y);
}
+ /// <summary>
+ /// Converts a <see cref="Vector2"/> to a <see cref="Vector2i"/>.
+ /// </summary>
+ /// <param name="value">The vector to convert.</param>
public static explicit operator Vector2i(Vector2 value)
{
return new Vector2i(value);
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this vector and <paramref name="obj"/> are equal.
+ /// </summary>
+ /// <param name="obj">The other object to compare.</param>
+ /// <returns>Whether or not the vector and the other object are equal.</returns>
public override bool Equals(object obj)
{
if (obj is Vector2i)
@@ -496,21 +529,38 @@ namespace Godot
return false;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this vector and <paramref name="other"/> are equal.
+ /// </summary>
+ /// <param name="other">The other vector to compare.</param>
+ /// <returns>Whether or not the vectors are equal.</returns>
public bool Equals(Vector2i other)
{
return x == other.x && y == other.y;
}
+ /// <summary>
+ /// Serves as the hash function for <see cref="Vector2i"/>.
+ /// </summary>
+ /// <returns>A hash code for this vector.</returns>
public override int GetHashCode()
{
return y.GetHashCode() ^ x.GetHashCode();
}
+ /// <summary>
+ /// Converts this <see cref="Vector2i"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this vector.</returns>
public override string ToString()
{
return $"({x}, {y})";
}
+ /// <summary>
+ /// Converts this <see cref="Vector2i"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this vector.</returns>
public string ToString(string format)
{
return $"({x.ToString(format)}, {y.ToString(format)})";
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs
index bdf64159e9..01e3a71bcb 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs
@@ -21,28 +21,46 @@ namespace Godot
/// </summary>
public enum Axis
{
+ /// <summary>
+ /// The vector's X axis.
+ /// </summary>
X = 0,
+ /// <summary>
+ /// The vector's Y axis.
+ /// </summary>
Y,
+ /// <summary>
+ /// The vector's Z axis.
+ /// </summary>
Z
}
/// <summary>
- /// The vector's X component. Also accessible by using the index position `[0]`.
+ /// The vector's X component. Also accessible by using the index position <c>[0]</c>.
/// </summary>
public real_t x;
+
/// <summary>
- /// The vector's Y component. Also accessible by using the index position `[1]`.
+ /// The vector's Y component. Also accessible by using the index position <c>[1]</c>.
/// </summary>
public real_t y;
+
/// <summary>
- /// The vector's Z component. Also accessible by using the index position `[2]`.
+ /// The vector's Z component. Also accessible by using the index position <c>[2]</c>.
/// </summary>
public real_t z;
/// <summary>
/// Access vector components using their index.
/// </summary>
- /// <value>`[0]` is equivalent to `.x`, `[1]` is equivalent to `.y`, `[2]` is equivalent to `.z`.</value>
+ /// <exception cref="IndexOutOfRangeException">
+ /// Thrown when the given the <paramref name="index"/> is not 0, 1 or 2.
+ /// </exception>
+ /// <value>
+ /// <c>[0]</c> is equivalent to <see cref="x"/>,
+ /// <c>[1]</c> is equivalent to <see cref="y"/>,
+ /// <c>[2]</c> is equivalent to <see cref="z"/>.
+ /// </value>
public real_t this[int index]
{
get
@@ -135,7 +153,7 @@ namespace Godot
/// <summary>
/// Returns a new vector with all components clamped between the
- /// components of `min` and `max` using
+ /// components of <paramref name="min"/> and <paramref name="max"/> using
/// <see cref="Mathf.Clamp(real_t, real_t, real_t)"/>.
/// </summary>
/// <param name="min">The vector with minimum allowed values.</param>
@@ -152,7 +170,7 @@ namespace Godot
}
/// <summary>
- /// Returns the cross product of this vector and `b`.
+ /// Returns the cross product of this vector and <paramref name="b"/>.
/// </summary>
/// <param name="b">The other vector.</param>
/// <returns>The cross product vector.</returns>
@@ -160,19 +178,19 @@ namespace Godot
{
return new Vector3
(
- y * b.z - z * b.y,
- z * b.x - x * b.z,
- x * b.y - y * b.x
+ (y * b.z) - (z * b.y),
+ (z * b.x) - (x * b.z),
+ (x * b.y) - (y * b.x)
);
}
/// <summary>
- /// Performs a cubic interpolation between vectors `preA`, this vector,
- /// `b`, and `postB`, by the given amount `t`.
+ /// Performs a cubic interpolation between vectors <paramref name="preA"/>, this vector,
+ /// <paramref name="b"/>, and <paramref name="postB"/>, by the given amount <paramref name="weight"/>.
/// </summary>
/// <param name="b">The destination vector.</param>
/// <param name="preA">A vector before this vector.</param>
- /// <param name="postB">A vector after `b`.</param>
+ /// <param name="postB">A vector after <paramref name="b"/>.</param>
/// <param name="weight">A value on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
/// <returns>The interpolated vector.</returns>
public Vector3 CubicInterpolate(Vector3 b, Vector3 preA, Vector3 postB, real_t weight)
@@ -187,24 +205,24 @@ namespace Godot
real_t t3 = t2 * t;
return 0.5f * (
- p1 * 2.0f + (-p0 + p2) * t +
- (2.0f * p0 - 5.0f * p1 + 4f * p2 - p3) * t2 +
- (-p0 + 3.0f * p1 - 3.0f * p2 + p3) * t3
- );
+ (p1 * 2.0f) + ((-p0 + p2) * t) +
+ (((2.0f * p0) - (5.0f * p1) + (4f * p2) - p3) * t2) +
+ ((-p0 + (3.0f * p1) - (3.0f * p2) + p3) * t3)
+ );
}
/// <summary>
- /// Returns the normalized vector pointing from this vector to `b`.
+ /// Returns the normalized vector pointing from this vector to <paramref name="b"/>.
/// </summary>
/// <param name="b">The other vector to point towards.</param>
- /// <returns>The direction from this vector to `b`.</returns>
+ /// <returns>The direction from this vector to <paramref name="b"/>.</returns>
public Vector3 DirectionTo(Vector3 b)
{
return new Vector3(b.x - x, b.y - y, b.z - z).Normalized();
}
/// <summary>
- /// Returns the squared distance between this vector and `b`.
+ /// Returns the squared distance between this vector and <paramref name="b"/>.
/// This method runs faster than <see cref="DistanceTo"/>, so prefer it if
/// you need to compare vectors or need the squared distance for some formula.
/// </summary>
@@ -216,8 +234,9 @@ namespace Godot
}
/// <summary>
- /// Returns the distance between this vector and `b`.
+ /// Returns the distance between this vector and <paramref name="b"/>.
/// </summary>
+ /// <seealso cref="DistanceSquaredTo(Vector3)"/>
/// <param name="b">The other vector to use.</param>
/// <returns>The distance between the two vectors.</returns>
public real_t DistanceTo(Vector3 b)
@@ -226,13 +245,13 @@ namespace Godot
}
/// <summary>
- /// Returns the dot product of this vector and `b`.
+ /// Returns the dot product of this vector and <paramref name="b"/>.
/// </summary>
/// <param name="b">The other vector to use.</param>
/// <returns>The dot product of the two vectors.</returns>
public real_t Dot(Vector3 b)
{
- return x * b.x + y * b.y + z * b.z;
+ return (x * b.x) + (y * b.y) + (z * b.z);
}
/// <summary>
@@ -245,7 +264,7 @@ namespace Godot
}
/// <summary>
- /// Returns the inverse of this vector. This is the same as `new Vector3(1 / v.x, 1 / v.y, 1 / v.z)`.
+ /// Returns the inverse of this vector. This is the same as <c>new Vector3(1 / v.x, 1 / v.y, 1 / v.z)</c>.
/// </summary>
/// <returns>The inverse of this vector.</returns>
public Vector3 Inverse()
@@ -254,9 +273,9 @@ namespace Godot
}
/// <summary>
- /// Returns true if the vector is normalized, and false otherwise.
+ /// Returns <see langword="true"/> if the vector is normalized, and <see langword="false"/> otherwise.
/// </summary>
- /// <returns>A bool indicating whether or not the vector is normalized.</returns>
+ /// <returns>A <see langword="bool"/> indicating whether or not the vector is normalized.</returns>
public bool IsNormalized()
{
return Mathf.Abs(LengthSquared() - 1.0f) < Mathf.Epsilon;
@@ -265,6 +284,7 @@ namespace Godot
/// <summary>
/// Returns the length (magnitude) of this vector.
/// </summary>
+ /// <seealso cref="LengthSquared"/>
/// <returns>The length of this vector.</returns>
public real_t Length()
{
@@ -292,7 +312,7 @@ namespace Godot
/// <summary>
/// Returns the result of the linear interpolation between
- /// this vector and `to` by amount `weight`.
+ /// this vector and <paramref name="to"/> by amount <paramref name="weight"/>.
/// </summary>
/// <param name="to">The destination vector for interpolation.</param>
/// <param name="weight">A value on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
@@ -309,7 +329,7 @@ namespace Godot
/// <summary>
/// Returns the result of the linear interpolation between
- /// this vector and `to` by the vector amount `weight`.
+ /// this vector and <paramref name="to"/> by the vector amount <paramref name="weight"/>.
/// </summary>
/// <param name="to">The destination vector for interpolation.</param>
/// <param name="weight">A vector with components on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
@@ -325,7 +345,7 @@ namespace Godot
}
/// <summary>
- /// Returns the vector with a maximum length by limiting its length to `length`.
+ /// Returns the vector with a maximum length by limiting its length to <paramref name="length"/>.
/// </summary>
/// <param name="length">The length to limit to.</param>
/// <returns>The vector with its length limited.</returns>
@@ -364,32 +384,35 @@ namespace Godot
}
/// <summary>
- /// Moves this vector toward `to` by the fixed `delta` amount.
+ /// Moves this vector toward <paramref name="to"/> by the fixed <paramref name="delta"/> amount.
/// </summary>
/// <param name="to">The vector to move towards.</param>
/// <param name="delta">The amount to move towards by.</param>
/// <returns>The resulting vector.</returns>
public Vector3 MoveToward(Vector3 to, real_t delta)
{
- var v = this;
- var vd = to - v;
- var len = vd.Length();
- return len <= delta || len < Mathf.Epsilon ? to : v + vd / len * delta;
+ Vector3 v = this;
+ Vector3 vd = to - v;
+ real_t len = vd.Length();
+ if (len <= delta || len < Mathf.Epsilon)
+ return to;
+
+ return v + (vd / len * delta);
}
/// <summary>
- /// Returns the vector scaled to unit length. Equivalent to `v / v.Length()`.
+ /// Returns the vector scaled to unit length. Equivalent to <c>v / v.Length()</c>.
/// </summary>
/// <returns>A normalized version of the vector.</returns>
public Vector3 Normalized()
{
- var v = this;
+ Vector3 v = this;
v.Normalize();
return v;
}
/// <summary>
- /// Returns the outer product with `b`.
+ /// Returns the outer product with <paramref name="b"/>.
/// </summary>
/// <param name="b">The other vector.</param>
/// <returns>A <see cref="Basis"/> representing the outer product matrix.</returns>
@@ -403,10 +426,13 @@ namespace Godot
}
/// <summary>
- /// Returns a vector composed of the <see cref="Mathf.PosMod(real_t, real_t)"/> of this vector's components and `mod`.
+ /// Returns a vector composed of the <see cref="Mathf.PosMod(real_t, real_t)"/> of this vector's components
+ /// and <paramref name="mod"/>.
/// </summary>
/// <param name="mod">A value representing the divisor of the operation.</param>
- /// <returns>A vector with each component <see cref="Mathf.PosMod(real_t, real_t)"/> by `mod`.</returns>
+ /// <returns>
+ /// A vector with each component <see cref="Mathf.PosMod(real_t, real_t)"/> by <paramref name="mod"/>.
+ /// </returns>
public Vector3 PosMod(real_t mod)
{
Vector3 v;
@@ -417,10 +443,13 @@ namespace Godot
}
/// <summary>
- /// Returns a vector composed of the <see cref="Mathf.PosMod(real_t, real_t)"/> of this vector's components and `modv`'s components.
+ /// Returns a vector composed of the <see cref="Mathf.PosMod(real_t, real_t)"/> of this vector's components
+ /// and <paramref name="modv"/>'s components.
/// </summary>
/// <param name="modv">A vector representing the divisors of the operation.</param>
- /// <returns>A vector with each component <see cref="Mathf.PosMod(real_t, real_t)"/> by `modv`'s components.</returns>
+ /// <returns>
+ /// A vector with each component <see cref="Mathf.PosMod(real_t, real_t)"/> by <paramref name="modv"/>'s components.
+ /// </returns>
public Vector3 PosMod(Vector3 modv)
{
Vector3 v;
@@ -431,7 +460,7 @@ namespace Godot
}
/// <summary>
- /// Returns this vector projected onto another vector `b`.
+ /// Returns this vector projected onto another vector <paramref name="onNormal"/>.
/// </summary>
/// <param name="onNormal">The vector to project onto.</param>
/// <returns>The projected vector.</returns>
@@ -441,7 +470,7 @@ namespace Godot
}
/// <summary>
- /// Returns this vector reflected from a plane defined by the given `normal`.
+ /// Returns this vector reflected from a plane defined by the given <paramref name="normal"/>.
/// </summary>
/// <param name="normal">The normal vector defining the plane to reflect from. Must be normalized.</param>
/// <returns>The reflected vector.</returns>
@@ -453,12 +482,12 @@ namespace Godot
throw new ArgumentException("Argument is not normalized", nameof(normal));
}
#endif
- return 2.0f * Dot(normal) * normal - this;
+ return (2.0f * Dot(normal) * normal) - this;
}
/// <summary>
- /// Rotates this vector around a given `axis` vector by `phi` radians.
- /// The `axis` vector must be a normalized vector.
+ /// Rotates this vector around a given <paramref name="axis"/> vector by <paramref name="phi"/> radians.
+ /// The <paramref name="axis"/> vector must be a normalized vector.
/// </summary>
/// <param name="axis">The vector to rotate around. Must be normalized.</param>
/// <param name="phi">The angle to rotate by, in radians.</param>
@@ -489,7 +518,7 @@ namespace Godot
/// on the signs of this vector's components, or zero if the component is zero,
/// by calling <see cref="Mathf.Sign(real_t)"/> on each component.
/// </summary>
- /// <returns>A vector with all components as either `1`, `-1`, or `0`.</returns>
+ /// <returns>A vector with all components as either <c>1</c>, <c>-1</c>, or <c>0</c>.</returns>
public Vector3 Sign()
{
Vector3 v;
@@ -503,7 +532,7 @@ namespace Godot
/// Returns the signed angle to the given vector, in radians.
/// The sign of the angle is positive in a counter-clockwise
/// direction and negative in a clockwise direction when viewed
- /// from the side specified by the `axis`.
+ /// from the side specified by the <paramref name="axis"/>.
/// </summary>
/// <param name="to">The other vector to compare this vector to.</param>
/// <param name="axis">The reference axis to use for the angle sign.</param>
@@ -518,7 +547,7 @@ namespace Godot
/// <summary>
/// Returns the result of the spherical linear interpolation between
- /// this vector and `to` by amount `weight`.
+ /// this vector and <paramref name="to"/> by amount <paramref name="weight"/>.
///
/// Note: Both vectors must be normalized.
/// </summary>
@@ -534,7 +563,7 @@ namespace Godot
}
if (!to.IsNormalized())
{
- throw new InvalidOperationException("Vector3.Slerp: `to` is not normalized.");
+ throw new InvalidOperationException($"Vector3.Slerp: `{nameof(to)}` is not normalized.");
}
#endif
real_t theta = AngleTo(to);
@@ -542,17 +571,17 @@ namespace Godot
}
/// <summary>
- /// Returns this vector slid along a plane defined by the given normal.
+ /// Returns this vector slid along a plane defined by the given <paramref name="normal"/>.
/// </summary>
/// <param name="normal">The normal vector defining the plane to slide on.</param>
/// <returns>The slid vector.</returns>
public Vector3 Slide(Vector3 normal)
{
- return this - normal * Dot(normal);
+ return this - (normal * Dot(normal));
}
/// <summary>
- /// Returns this vector with each component snapped to the nearest multiple of `step`.
+ /// Returns this vector with each component snapped to the nearest multiple of <paramref name="step"/>.
/// This can also be used to round to an arbitrary number of decimals.
/// </summary>
/// <param name="step">A vector value representing the step size to snap to.</param>
@@ -570,10 +599,10 @@ namespace Godot
/// <summary>
/// Returns a diagonal matrix with the vector as main diagonal.
///
- /// This is equivalent to a Basis with no rotation or shearing and
+ /// This is equivalent to a <see cref="Basis"/> with no rotation or shearing and
/// this vector's components set as the scale.
/// </summary>
- /// <returns>A Basis with the vector as its main diagonal.</returns>
+ /// <returns>A <see cref="Basis"/> with the vector as its main diagonal.</returns>
public Basis ToDiagonalMatrix()
{
return new Basis(
@@ -596,54 +625,54 @@ namespace Godot
private static readonly Vector3 _back = new Vector3(0, 0, 1);
/// <summary>
- /// Zero vector, a vector with all components set to `0`.
+ /// Zero vector, a vector with all components set to <c>0</c>.
/// </summary>
- /// <value>Equivalent to `new Vector3(0, 0, 0)`</value>
+ /// <value>Equivalent to <c>new Vector3(0, 0, 0)</c>.</value>
public static Vector3 Zero { get { return _zero; } }
/// <summary>
- /// One vector, a vector with all components set to `1`.
+ /// One vector, a vector with all components set to <c>1</c>.
/// </summary>
- /// <value>Equivalent to `new Vector3(1, 1, 1)`</value>
+ /// <value>Equivalent to <c>new Vector3(1, 1, 1)</c>.</value>
public static Vector3 One { get { return _one; } }
/// <summary>
- /// Infinity vector, a vector with all components set to `Mathf.Inf`.
+ /// Infinity vector, a vector with all components set to <see cref="Mathf.Inf"/>.
/// </summary>
- /// <value>Equivalent to `new Vector3(Mathf.Inf, Mathf.Inf, Mathf.Inf)`</value>
+ /// <value>Equivalent to <c>new Vector3(Mathf.Inf, Mathf.Inf, Mathf.Inf)</c>.</value>
public static Vector3 Inf { get { return _inf; } }
/// <summary>
/// Up unit vector.
/// </summary>
- /// <value>Equivalent to `new Vector3(0, 1, 0)`</value>
+ /// <value>Equivalent to <c>new Vector3(0, 1, 0)</c>.</value>
public static Vector3 Up { get { return _up; } }
/// <summary>
/// Down unit vector.
/// </summary>
- /// <value>Equivalent to `new Vector3(0, -1, 0)`</value>
+ /// <value>Equivalent to <c>new Vector3(0, -1, 0)</c>.</value>
public static Vector3 Down { get { return _down; } }
/// <summary>
/// Right unit vector. Represents the local direction of right,
/// and the global direction of east.
/// </summary>
- /// <value>Equivalent to `new Vector3(1, 0, 0)`</value>
+ /// <value>Equivalent to <c>new Vector3(1, 0, 0)</c>.</value>
public static Vector3 Right { get { return _right; } }
/// <summary>
/// Left unit vector. Represents the local direction of left,
/// and the global direction of west.
/// </summary>
- /// <value>Equivalent to `new Vector3(-1, 0, 0)`</value>
+ /// <value>Equivalent to <c>new Vector3(-1, 0, 0)</c>.</value>
public static Vector3 Left { get { return _left; } }
/// <summary>
/// Forward unit vector. Represents the local direction of forward,
/// and the global direction of north.
/// </summary>
- /// <value>Equivalent to `new Vector3(0, 0, -1)`</value>
+ /// <value>Equivalent to <c>new Vector3(0, 0, -1)</c>.</value>
public static Vector3 Forward { get { return _forward; } }
/// <summary>
/// Back unit vector. Represents the local direction of back,
/// and the global direction of south.
/// </summary>
- /// <value>Equivalent to `new Vector3(0, 0, 1)`</value>
+ /// <value>Equivalent to <c>new Vector3(0, 0, 1)</c>.</value>
public static Vector3 Back { get { return _back; } }
/// <summary>
@@ -812,6 +841,11 @@ namespace Godot
return left.x > right.x;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this vector and <paramref name="obj"/> are equal.
+ /// </summary>
+ /// <param name="obj">The other object to compare.</param>
+ /// <returns>Whether or not the vector and the other object are equal.</returns>
public override bool Equals(object obj)
{
if (obj is Vector3)
@@ -822,14 +856,19 @@ namespace Godot
return false;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this vector and <paramref name="other"/> are equal
+ /// </summary>
+ /// <param name="other">The other vector to compare.</param>
+ /// <returns>Whether or not the vectors are equal.</returns>
public bool Equals(Vector3 other)
{
return x == other.x && y == other.y && z == other.z;
}
/// <summary>
- /// Returns true if this vector and `other` are approximately equal, by running
- /// <see cref="Mathf.IsEqualApprox(real_t, real_t)"/> on each component.
+ /// Returns <see langword="true"/> if this vector and <paramref name="other"/> are approximately equal,
+ /// by running <see cref="Mathf.IsEqualApprox(real_t, real_t)"/> on each component.
/// </summary>
/// <param name="other">The other vector to compare.</param>
/// <returns>Whether or not the vectors are approximately equal.</returns>
@@ -838,16 +877,28 @@ namespace Godot
return Mathf.IsEqualApprox(x, other.x) && Mathf.IsEqualApprox(y, other.y) && Mathf.IsEqualApprox(z, other.z);
}
+ /// <summary>
+ /// Serves as the hash function for <see cref="Vector3"/>.
+ /// </summary>
+ /// <returns>A hash code for this vector.</returns>
public override int GetHashCode()
{
return y.GetHashCode() ^ x.GetHashCode() ^ z.GetHashCode();
}
+ /// <summary>
+ /// Converts this <see cref="Vector3"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this vector.</returns>
public override string ToString()
{
return $"({x}, {y}, {z})";
}
+ /// <summary>
+ /// Converts this <see cref="Vector3"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this vector.</returns>
public string ToString(string format)
{
return $"({x.ToString(format)}, {y.ToString(format)}, {z.ToString(format)})";
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3i.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3i.cs
index c96a7cf1b0..2a7771cdfc 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3i.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3i.cs
@@ -21,28 +21,46 @@ namespace Godot
/// </summary>
public enum Axis
{
+ /// <summary>
+ /// The vector's X axis.
+ /// </summary>
X = 0,
+ /// <summary>
+ /// The vector's Y axis.
+ /// </summary>
Y,
+ /// <summary>
+ /// The vector's Z axis.
+ /// </summary>
Z
}
/// <summary>
- /// The vector's X component. Also accessible by using the index position `[0]`.
+ /// The vector's X component. Also accessible by using the index position <c>[0]</c>.
/// </summary>
public int x;
+
/// <summary>
- /// The vector's Y component. Also accessible by using the index position `[1]`.
+ /// The vector's Y component. Also accessible by using the index position <c>[1]</c>.
/// </summary>
public int y;
+
/// <summary>
- /// The vector's Z component. Also accessible by using the index position `[2]`.
+ /// The vector's Z component. Also accessible by using the index position <c>[2]</c>.
/// </summary>
public int z;
/// <summary>
- /// Access vector components using their index.
+ /// Access vector components using their <paramref name="index"/>.
/// </summary>
- /// <value>`[0]` is equivalent to `.x`, `[1]` is equivalent to `.y`, `[2]` is equivalent to `.z`.</value>
+ /// <exception cref="IndexOutOfRangeException">
+ /// Thrown when the given the <paramref name="index"/> is not 0, 1 or 2.
+ /// </exception>
+ /// <value>
+ /// <c>[0]</c> is equivalent to <see cref="x"/>,
+ /// <c>[1]</c> is equivalent to <see cref="y"/>,
+ /// <c>[2]</c> is equivalent to <see cref="z"/>.
+ /// </value>
public int this[int index]
{
get
@@ -89,7 +107,7 @@ namespace Godot
/// <summary>
/// Returns a new vector with all components clamped between the
- /// components of `min` and `max` using
+ /// components of <paramref name="min"/> and <paramref name="max"/> using
/// <see cref="Mathf.Clamp(int, int, int)"/>.
/// </summary>
/// <param name="min">The vector with minimum allowed values.</param>
@@ -106,7 +124,7 @@ namespace Godot
}
/// <summary>
- /// Returns the squared distance between this vector and `b`.
+ /// Returns the squared distance between this vector and <paramref name="b"/>.
/// This method runs faster than <see cref="DistanceTo"/>, so prefer it if
/// you need to compare vectors or need the squared distance for some formula.
/// </summary>
@@ -118,8 +136,9 @@ namespace Godot
}
/// <summary>
- /// Returns the distance between this vector and `b`.
+ /// Returns the distance between this vector and <paramref name="b"/>.
/// </summary>
+ /// <seealso cref="DistanceSquaredTo(Vector3i)"/>
/// <param name="b">The other vector to use.</param>
/// <returns>The distance between the two vectors.</returns>
public real_t DistanceTo(Vector3i b)
@@ -128,7 +147,7 @@ namespace Godot
}
/// <summary>
- /// Returns the dot product of this vector and `b`.
+ /// Returns the dot product of this vector and <paramref name="b"/>.
/// </summary>
/// <param name="b">The other vector to use.</param>
/// <returns>The dot product of the two vectors.</returns>
@@ -140,6 +159,7 @@ namespace Godot
/// <summary>
/// Returns the length (magnitude) of this vector.
/// </summary>
+ /// <seealso cref="LengthSquared"/>
/// <returns>The length of this vector.</returns>
public real_t Length()
{
@@ -186,10 +206,13 @@ namespace Godot
}
/// <summary>
- /// Returns a vector composed of the <see cref="Mathf.PosMod(int, int)"/> of this vector's components and `mod`.
+ /// Returns a vector composed of the <see cref="Mathf.PosMod(int, int)"/> of this vector's components
+ /// and <paramref name="mod"/>.
/// </summary>
/// <param name="mod">A value representing the divisor of the operation.</param>
- /// <returns>A vector with each component <see cref="Mathf.PosMod(int, int)"/> by `mod`.</returns>
+ /// <returns>
+ /// A vector with each component <see cref="Mathf.PosMod(int, int)"/> by <paramref name="mod"/>.
+ /// </returns>
public Vector3i PosMod(int mod)
{
Vector3i v = this;
@@ -200,10 +223,13 @@ namespace Godot
}
/// <summary>
- /// Returns a vector composed of the <see cref="Mathf.PosMod(int, int)"/> of this vector's components and `modv`'s components.
+ /// Returns a vector composed of the <see cref="Mathf.PosMod(int, int)"/> of this vector's components
+ /// and <paramref name="modv"/>'s components.
/// </summary>
/// <param name="modv">A vector representing the divisors of the operation.</param>
- /// <returns>A vector with each component <see cref="Mathf.PosMod(int, int)"/> by `modv`'s components.</returns>
+ /// <returns>
+ /// A vector with each component <see cref="Mathf.PosMod(int, int)"/> by <paramref name="modv"/>'s components.
+ /// </returns>
public Vector3i PosMod(Vector3i modv)
{
Vector3i v = this;
@@ -218,7 +244,7 @@ namespace Godot
/// on the signs of this vector's components, or zero if the component is zero,
/// by calling <see cref="Mathf.Sign(int)"/> on each component.
/// </summary>
- /// <returns>A vector with all components as either `1`, `-1`, or `0`.</returns>
+ /// <returns>A vector with all components as either <c>1</c>, <c>-1</c>, or <c>0</c>.</returns>
public Vector3i Sign()
{
Vector3i v = this;
@@ -240,49 +266,49 @@ namespace Godot
private static readonly Vector3i _back = new Vector3i(0, 0, 1);
/// <summary>
- /// Zero vector, a vector with all components set to `0`.
+ /// Zero vector, a vector with all components set to <c>0</c>.
/// </summary>
- /// <value>Equivalent to `new Vector3i(0, 0, 0)`</value>
+ /// <value>Equivalent to <c>new Vector3i(0, 0, 0)</c>.</value>
public static Vector3i Zero { get { return _zero; } }
/// <summary>
- /// One vector, a vector with all components set to `1`.
+ /// One vector, a vector with all components set to <c>1</c>.
/// </summary>
- /// <value>Equivalent to `new Vector3i(1, 1, 1)`</value>
+ /// <value>Equivalent to <c>new Vector3i(1, 1, 1)</c>.</value>
public static Vector3i One { get { return _one; } }
/// <summary>
/// Up unit vector.
/// </summary>
- /// <value>Equivalent to `new Vector3i(0, 1, 0)`</value>
+ /// <value>Equivalent to <c>new Vector3i(0, 1, 0)</c>.</value>
public static Vector3i Up { get { return _up; } }
/// <summary>
/// Down unit vector.
/// </summary>
- /// <value>Equivalent to `new Vector3i(0, -1, 0)`</value>
+ /// <value>Equivalent to <c>new Vector3i(0, -1, 0)</c>.</value>
public static Vector3i Down { get { return _down; } }
/// <summary>
/// Right unit vector. Represents the local direction of right,
/// and the global direction of east.
/// </summary>
- /// <value>Equivalent to `new Vector3i(1, 0, 0)`</value>
+ /// <value>Equivalent to <c>new Vector3i(1, 0, 0)</c>.</value>
public static Vector3i Right { get { return _right; } }
/// <summary>
/// Left unit vector. Represents the local direction of left,
/// and the global direction of west.
/// </summary>
- /// <value>Equivalent to `new Vector3i(-1, 0, 0)`</value>
+ /// <value>Equivalent to <c>new Vector3i(-1, 0, 0)</c>.</value>
public static Vector3i Left { get { return _left; } }
/// <summary>
/// Forward unit vector. Represents the local direction of forward,
/// and the global direction of north.
/// </summary>
- /// <value>Equivalent to `new Vector3i(0, 0, -1)`</value>
+ /// <value>Equivalent to <c>new Vector3i(0, 0, -1)</c>.</value>
public static Vector3i Forward { get { return _forward; } }
/// <summary>
/// Back unit vector. Represents the local direction of back,
/// and the global direction of south.
/// </summary>
- /// <value>Equivalent to `new Vector3i(0, 0, 1)`</value>
+ /// <value>Equivalent to <c>new Vector3i(0, 0, 1)</c>.</value>
public static Vector3i Back { get { return _back; } }
/// <summary>
@@ -479,16 +505,29 @@ namespace Godot
return left.x > right.x;
}
+ /// <summary>
+ /// Converts this <see cref="Vector3i"/> to a <see cref="Vector3"/>.
+ /// </summary>
+ /// <param name="value">The vector to convert.</param>
public static implicit operator Vector3(Vector3i value)
{
return new Vector3(value.x, value.y, value.z);
}
+ /// <summary>
+ /// Converts a <see cref="Vector3"/> to a <see cref="Vector3i"/>.
+ /// </summary>
+ /// <param name="value">The vector to convert.</param>
public static explicit operator Vector3i(Vector3 value)
{
return new Vector3i(value);
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this vector and <paramref name="obj"/> are equal.
+ /// </summary>
+ /// <param name="obj">The other object to compare.</param>
+ /// <returns>Whether or not the vector and the other object are equal.</returns>
public override bool Equals(object obj)
{
if (obj is Vector3i)
@@ -499,21 +538,38 @@ namespace Godot
return false;
}
+ /// <summary>
+ /// Returns <see langword="true"/> if this vector and <paramref name="other"/> are equal
+ /// </summary>
+ /// <param name="other">The other vector to compare.</param>
+ /// <returns>Whether or not the vectors are equal.</returns>
public bool Equals(Vector3i other)
{
return x == other.x && y == other.y && z == other.z;
}
+ /// <summary>
+ /// Serves as the hash function for <see cref="Vector3i"/>.
+ /// </summary>
+ /// <returns>A hash code for this vector.</returns>
public override int GetHashCode()
{
return y.GetHashCode() ^ x.GetHashCode() ^ z.GetHashCode();
}
+ /// <summary>
+ /// Converts this <see cref="Vector3i"/> to a string.
+ /// </summary>
+ /// <returns>A string representation of this vector.</returns>
public override string ToString()
{
return $"({x}, {y}, {z})";
}
+ /// <summary>
+ /// Converts this <see cref="Vector3i"/> to a string with the given <paramref name="format"/>.
+ /// </summary>
+ /// <returns>A string representation of this vector.</returns>
public string ToString(string format)
{
return $"({x.ToString(format)}, {y.ToString(format)}, {z.ToString(format)})";
diff --git a/modules/mono/glue/string_glue.cpp b/modules/mono/glue/string_glue.cpp
index 18a9221f89..bb80a836ad 100644
--- a/modules/mono/glue/string_glue.cpp
+++ b/modules/mono/glue/string_glue.cpp
@@ -67,6 +67,11 @@ MonoString *godot_icall_String_sha256_text(MonoString *p_str) {
return GDMonoMarshal::mono_string_from_godot(ret);
}
+MonoString *godot_icall_String_simplify_path(MonoString *p_str) {
+ String ret = GDMonoMarshal::mono_string_to_godot(p_str).simplify_path();
+ return GDMonoMarshal::mono_string_from_godot(ret);
+}
+
void godot_register_string_icalls() {
GDMonoUtils::add_internal_call("Godot.StringExtensions::godot_icall_String_md5_buffer", godot_icall_String_md5_buffer);
GDMonoUtils::add_internal_call("Godot.StringExtensions::godot_icall_String_md5_text", godot_icall_String_md5_text);
@@ -74,6 +79,7 @@ void godot_register_string_icalls() {
GDMonoUtils::add_internal_call("Godot.StringExtensions::godot_icall_String_rfindn", godot_icall_String_rfindn);
GDMonoUtils::add_internal_call("Godot.StringExtensions::godot_icall_String_sha256_buffer", godot_icall_String_sha256_buffer);
GDMonoUtils::add_internal_call("Godot.StringExtensions::godot_icall_String_sha256_text", godot_icall_String_sha256_text);
+ GDMonoUtils::add_internal_call("Godot.StringExtensions::godot_icall_String_simplify_path", godot_icall_String_simplify_path);
}
#endif // MONO_GLUE_ENABLED
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index 299344bb93..1b1349a3a3 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -73,7 +73,7 @@
#endif
// TODO:
-// This has turn into a gigantic mess. There's too much going on here. Too much #ifdef as well.
+// This has turned into a gigantic mess. There's too much going on here. Too much #ifdef as well.
// It's just painful to read... It needs to be re-structured. Please, clean this up, future me.
GDMono *GDMono::singleton = nullptr;
@@ -1335,23 +1335,25 @@ GDMono::~GDMono() {
singleton = nullptr;
}
-_GodotSharp *_GodotSharp::singleton = nullptr;
+namespace mono_bind {
-void _GodotSharp::attach_thread() {
+GodotSharp *GodotSharp::singleton = nullptr;
+
+void GodotSharp::attach_thread() {
GDMonoUtils::attach_current_thread();
}
-void _GodotSharp::detach_thread() {
+void GodotSharp::detach_thread() {
GDMonoUtils::detach_current_thread();
}
-int32_t _GodotSharp::get_domain_id() {
+int32_t GodotSharp::get_domain_id() {
MonoDomain *domain = mono_domain_get();
ERR_FAIL_NULL_V(domain, -1);
return mono_domain_get_id(domain);
}
-int32_t _GodotSharp::get_scripts_domain_id() {
+int32_t GodotSharp::get_scripts_domain_id() {
ERR_FAIL_NULL_V_MSG(GDMono::get_singleton(),
-1, "The Mono runtime is not initialized");
MonoDomain *domain = GDMono::get_singleton()->get_scripts_domain();
@@ -1359,21 +1361,21 @@ int32_t _GodotSharp::get_scripts_domain_id() {
return mono_domain_get_id(domain);
}
-bool _GodotSharp::is_scripts_domain_loaded() {
+bool GodotSharp::is_scripts_domain_loaded() {
return GDMono::get_singleton() != nullptr &&
GDMono::get_singleton()->is_runtime_initialized() &&
GDMono::get_singleton()->get_scripts_domain() != nullptr;
}
-bool _GodotSharp::_is_domain_finalizing_for_unload(int32_t p_domain_id) {
+bool GodotSharp::_is_domain_finalizing_for_unload(int32_t p_domain_id) {
return is_domain_finalizing_for_unload(p_domain_id);
}
-bool _GodotSharp::is_domain_finalizing_for_unload(int32_t p_domain_id) {
+bool GodotSharp::is_domain_finalizing_for_unload(int32_t p_domain_id) {
return is_domain_finalizing_for_unload(mono_domain_get_by_id(p_domain_id));
}
-bool _GodotSharp::is_domain_finalizing_for_unload(MonoDomain *p_domain) {
+bool GodotSharp::is_domain_finalizing_for_unload(MonoDomain *p_domain) {
GDMono *gd_mono = GDMono::get_singleton();
ERR_FAIL_COND_V_MSG(!gd_mono || !gd_mono->is_runtime_initialized(),
@@ -1388,15 +1390,15 @@ bool _GodotSharp::is_domain_finalizing_for_unload(MonoDomain *p_domain) {
return mono_domain_is_unloading(p_domain);
}
-bool _GodotSharp::is_runtime_shutting_down() {
+bool GodotSharp::is_runtime_shutting_down() {
return mono_runtime_is_shutting_down();
}
-bool _GodotSharp::is_runtime_initialized() {
+bool GodotSharp::is_runtime_initialized() {
return GDMono::get_singleton() != nullptr && GDMono::get_singleton()->is_runtime_initialized();
}
-void _GodotSharp::_reload_assemblies(bool p_soft_reload) {
+void GodotSharp::_reload_assemblies(bool p_soft_reload) {
#ifdef GD_MONO_HOT_RELOAD
CRASH_COND(CSharpLanguage::get_singleton() == nullptr);
// This method may be called more than once with `call_deferred`, so we need to check
@@ -1407,24 +1409,26 @@ void _GodotSharp::_reload_assemblies(bool p_soft_reload) {
#endif
}
-void _GodotSharp::_bind_methods() {
- ClassDB::bind_method(D_METHOD("attach_thread"), &_GodotSharp::attach_thread);
- ClassDB::bind_method(D_METHOD("detach_thread"), &_GodotSharp::detach_thread);
+void GodotSharp::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("attach_thread"), &GodotSharp::attach_thread);
+ ClassDB::bind_method(D_METHOD("detach_thread"), &GodotSharp::detach_thread);
- ClassDB::bind_method(D_METHOD("get_domain_id"), &_GodotSharp::get_domain_id);
- ClassDB::bind_method(D_METHOD("get_scripts_domain_id"), &_GodotSharp::get_scripts_domain_id);
- ClassDB::bind_method(D_METHOD("is_scripts_domain_loaded"), &_GodotSharp::is_scripts_domain_loaded);
- ClassDB::bind_method(D_METHOD("is_domain_finalizing_for_unload", "domain_id"), &_GodotSharp::_is_domain_finalizing_for_unload);
+ ClassDB::bind_method(D_METHOD("get_domain_id"), &GodotSharp::get_domain_id);
+ ClassDB::bind_method(D_METHOD("get_scripts_domain_id"), &GodotSharp::get_scripts_domain_id);
+ ClassDB::bind_method(D_METHOD("is_scripts_domain_loaded"), &GodotSharp::is_scripts_domain_loaded);
+ ClassDB::bind_method(D_METHOD("is_domain_finalizing_for_unload", "domain_id"), &GodotSharp::_is_domain_finalizing_for_unload);
- ClassDB::bind_method(D_METHOD("is_runtime_shutting_down"), &_GodotSharp::is_runtime_shutting_down);
- ClassDB::bind_method(D_METHOD("is_runtime_initialized"), &_GodotSharp::is_runtime_initialized);
- ClassDB::bind_method(D_METHOD("_reload_assemblies"), &_GodotSharp::_reload_assemblies);
+ ClassDB::bind_method(D_METHOD("is_runtime_shutting_down"), &GodotSharp::is_runtime_shutting_down);
+ ClassDB::bind_method(D_METHOD("is_runtime_initialized"), &GodotSharp::is_runtime_initialized);
+ ClassDB::bind_method(D_METHOD("_reload_assemblies"), &GodotSharp::_reload_assemblies);
}
-_GodotSharp::_GodotSharp() {
+GodotSharp::GodotSharp() {
singleton = this;
}
-_GodotSharp::~_GodotSharp() {
+GodotSharp::~GodotSharp() {
singleton = nullptr;
}
+
+} // namespace mono_bind
diff --git a/modules/mono/mono_gd/gd_mono.h b/modules/mono/mono_gd/gd_mono.h
index 5accc21f8e..4170e5053f 100644
--- a/modules/mono/mono_gd/gd_mono.h
+++ b/modules/mono/mono_gd/gd_mono.h
@@ -293,8 +293,10 @@ public:
gdmono::ScopeExitDomainUnload __gdmono__scope__exit__domain__unload__(m_mono_domain); \
(void)__gdmono__scope__exit__domain__unload__;
-class _GodotSharp : public Object {
- GDCLASS(_GodotSharp, Object);
+namespace mono_bind {
+
+class GodotSharp : public Object {
+ GDCLASS(GodotSharp, Object);
friend class GDMono;
@@ -303,11 +305,11 @@ class _GodotSharp : public Object {
void _reload_assemblies(bool p_soft_reload);
protected:
- static _GodotSharp *singleton;
+ static GodotSharp *singleton;
static void _bind_methods();
public:
- static _GodotSharp *get_singleton() { return singleton; }
+ static GodotSharp *get_singleton() { return singleton; }
void attach_thread();
void detach_thread();
@@ -323,8 +325,10 @@ public:
bool is_runtime_shutting_down();
bool is_runtime_initialized();
- _GodotSharp();
- ~_GodotSharp();
+ GodotSharp();
+ ~GodotSharp();
};
+} // namespace mono_bind
+
#endif // GD_MONO_H
diff --git a/modules/mono/mono_gd/gd_mono_cache.cpp b/modules/mono/mono_gd/gd_mono_cache.cpp
index 0b36796d98..34e845a589 100644
--- a/modules/mono/mono_gd/gd_mono_cache.cpp
+++ b/modules/mono/mono_gd/gd_mono_cache.cpp
@@ -140,9 +140,8 @@ void CachedData::clear_godot_api_cache() {
field_ExportAttribute_hintString = nullptr;
class_SignalAttribute = nullptr;
class_ToolAttribute = nullptr;
- class_RemoteAttribute = nullptr;
- class_MasterAttribute = nullptr;
- class_PuppetAttribute = nullptr;
+ class_AnyAttribute = nullptr;
+ class_AuthorityAttribute = nullptr;
class_GodotMethodAttribute = nullptr;
field_GodotMethodAttribute_methodName = nullptr;
class_ScriptPathAttribute = nullptr;
@@ -266,9 +265,8 @@ void update_godot_api_cache() {
CACHE_FIELD_AND_CHECK(ExportAttribute, hintString, CACHED_CLASS(ExportAttribute)->get_field("hintString"));
CACHE_CLASS_AND_CHECK(SignalAttribute, GODOT_API_CLASS(SignalAttribute));
CACHE_CLASS_AND_CHECK(ToolAttribute, GODOT_API_CLASS(ToolAttribute));
- CACHE_CLASS_AND_CHECK(RemoteAttribute, GODOT_API_CLASS(RemoteAttribute));
- CACHE_CLASS_AND_CHECK(MasterAttribute, GODOT_API_CLASS(MasterAttribute));
- CACHE_CLASS_AND_CHECK(PuppetAttribute, GODOT_API_CLASS(PuppetAttribute));
+ CACHE_CLASS_AND_CHECK(AnyAttribute, GODOT_API_CLASS(AnyAttribute));
+ CACHE_CLASS_AND_CHECK(AuthorityAttribute, GODOT_API_CLASS(AuthorityAttribute));
CACHE_CLASS_AND_CHECK(GodotMethodAttribute, GODOT_API_CLASS(GodotMethodAttribute));
CACHE_FIELD_AND_CHECK(GodotMethodAttribute, methodName, CACHED_CLASS(GodotMethodAttribute)->get_field("methodName"));
CACHE_CLASS_AND_CHECK(ScriptPathAttribute, GODOT_API_CLASS(ScriptPathAttribute));
diff --git a/modules/mono/mono_gd/gd_mono_cache.h b/modules/mono/mono_gd/gd_mono_cache.h
index 6d49da0af3..e60a4d5279 100644
--- a/modules/mono/mono_gd/gd_mono_cache.h
+++ b/modules/mono/mono_gd/gd_mono_cache.h
@@ -111,9 +111,8 @@ struct CachedData {
GDMonoField *field_ExportAttribute_hintString;
GDMonoClass *class_SignalAttribute;
GDMonoClass *class_ToolAttribute;
- GDMonoClass *class_RemoteAttribute;
- GDMonoClass *class_MasterAttribute;
- GDMonoClass *class_PuppetAttribute;
+ GDMonoClass *class_AnyAttribute;
+ GDMonoClass *class_AuthorityAttribute;
GDMonoClass *class_GodotMethodAttribute;
GDMonoField *field_GodotMethodAttribute_methodName;
GDMonoClass *class_ScriptPathAttribute;
diff --git a/modules/mono/mono_gd/gd_mono_internals.cpp b/modules/mono/mono_gd/gd_mono_internals.cpp
index 60047545c4..cf76c23926 100644
--- a/modules/mono/mono_gd/gd_mono_internals.cpp
+++ b/modules/mono/mono_gd/gd_mono_internals.cpp
@@ -91,7 +91,11 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) {
// The object was just created, no script instance binding should have been attached
CRASH_COND(CSharpLanguage::has_instance_binding(unmanaged));
- void *data = (void *)CSharpLanguage::get_singleton()->insert_script_binding(unmanaged, script_binding);
+ void *data;
+ {
+ MutexLock lock(CSharpLanguage::get_singleton()->get_language_bind_mutex());
+ data = (void *)CSharpLanguage::get_singleton()->insert_script_binding(unmanaged, script_binding);
+ }
// Should be thread safe because the object was just created and nothing else should be referencing it
CSharpLanguage::set_instance_binding(unmanaged, data);
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp
index 9f2977bfa2..c9789bf270 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.cpp
+++ b/modules/mono/mono_gd/gd_mono_marshal.cpp
@@ -1686,7 +1686,9 @@ Callable managed_to_callable(const M_Callable &p_managed_callable) {
Object *target = p_managed_callable.target ?
unbox<Object *>(CACHED_FIELD(GodotObject, ptr)->get_value(p_managed_callable.target)) :
nullptr;
- StringName *method_ptr = unbox<StringName *>(CACHED_FIELD(StringName, ptr)->get_value(p_managed_callable.method_string_name));
+ StringName *method_ptr = p_managed_callable.method_string_name ?
+ unbox<StringName *>(CACHED_FIELD(StringName, ptr)->get_value(p_managed_callable.method_string_name)) :
+ nullptr;
StringName method = method_ptr ? *method_ptr : StringName();
return Callable(target, method);
}
@@ -1732,7 +1734,9 @@ Signal managed_to_signal_info(const M_SignalInfo &p_managed_signal) {
Object *owner = p_managed_signal.owner ?
unbox<Object *>(CACHED_FIELD(GodotObject, ptr)->get_value(p_managed_signal.owner)) :
nullptr;
- StringName *name_ptr = unbox<StringName *>(CACHED_FIELD(StringName, ptr)->get_value(p_managed_signal.name_string_name));
+ StringName *name_ptr = p_managed_signal.name_string_name ?
+ unbox<StringName *>(CACHED_FIELD(StringName, ptr)->get_value(p_managed_signal.name_string_name)) :
+ nullptr;
StringName name = name_ptr ? *name_ptr : StringName();
return Signal(owner, name);
}
diff --git a/modules/mono/register_types.cpp b/modules/mono/register_types.cpp
index 2ba89eac55..98e83335e9 100644
--- a/modules/mono/register_types.cpp
+++ b/modules/mono/register_types.cpp
@@ -38,15 +38,15 @@ CSharpLanguage *script_language_cs = nullptr;
Ref<ResourceFormatLoaderCSharpScript> resource_loader_cs;
Ref<ResourceFormatSaverCSharpScript> resource_saver_cs;
-_GodotSharp *_godotsharp = nullptr;
+mono_bind::GodotSharp *_godotsharp = nullptr;
void register_mono_types() {
GDREGISTER_CLASS(CSharpScript);
- _godotsharp = memnew(_GodotSharp);
+ _godotsharp = memnew(mono_bind::GodotSharp);
- GDREGISTER_CLASS(_GodotSharp);
- Engine::get_singleton()->add_singleton(Engine::Singleton("GodotSharp", _GodotSharp::get_singleton()));
+ GDREGISTER_CLASS(mono_bind::GodotSharp);
+ Engine::get_singleton()->add_singleton(Engine::Singleton("GodotSharp", mono_bind::GodotSharp::get_singleton()));
script_language_cs = memnew(CSharpLanguage);
script_language_cs->set_language_index(ScriptServer::get_language_count());
diff --git a/modules/mono/utils/string_utils.cpp b/modules/mono/utils/string_utils.cpp
index 053618ebe4..2fb5e446da 100644
--- a/modules/mono/utils/string_utils.cpp
+++ b/modules/mono/utils/string_utils.cpp
@@ -200,7 +200,7 @@ String str_format(const char *p_format, ...) {
return res;
}
-#if defined(MINGW_ENABLED) || defined(_MSC_VER) && _MSC_VER < 1900
+#if defined(MINGW_ENABLED)
#define gd_vsnprintf(m_buffer, m_count, m_format, m_args_copy) vsnprintf_s(m_buffer, m_count, _TRUNCATE, m_format, m_args_copy)
#define gd_vscprintf(m_format, m_args_copy) _vscprintf(m_format, m_args_copy)
#else
diff --git a/modules/msdfgen/SCsub b/modules/msdfgen/SCsub
new file mode 100644
index 0000000000..227369f4bd
--- /dev/null
+++ b/modules/msdfgen/SCsub
@@ -0,0 +1,66 @@
+#!/usr/bin/env python
+
+Import("env")
+Import("env_modules")
+
+env_msdfgen = env_modules.Clone()
+
+# Thirdparty source files
+
+thirdparty_obj = []
+
+if env["builtin_msdfgen"]:
+ env_msdfgen.disable_warnings()
+
+ thirdparty_dir = "#thirdparty/msdfgen/"
+ thirdparty_sources = [
+ "core/Contour.cpp",
+ "core/EdgeHolder.cpp",
+ "core/MSDFErrorCorrection.cpp",
+ "core/Projection.cpp",
+ "core/Scanline.cpp",
+ "core/Shape.cpp",
+ "core/SignedDistance.cpp",
+ "core/Vector2.cpp",
+ "core/contour-combiners.cpp",
+ "core/edge-coloring.cpp",
+ "core/edge-segments.cpp",
+ "core/edge-selectors.cpp",
+ "core/equation-solver.cpp",
+ "core/msdf-error-correction.cpp",
+ "core/msdfgen.cpp",
+ "core/rasterization.cpp",
+ "core/render-sdf.cpp",
+ "core/sdf-error-estimation.cpp",
+ "core/shape-description.cpp",
+ ]
+ thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
+
+ env_msdfgen.Append(CPPPATH=["#thirdparty/freetype/include", "#thirdparty/msdfgen", "#thirdparty/nanosvg"])
+
+ lib = env_msdfgen.add_library("msdfgen_builtin", thirdparty_sources)
+ thirdparty_obj += lib
+
+ # Needs to be appended to arrive after libscene in the linker call,
+ # but we don't want it to arrive *after* system libs, so manual hack
+ # LIBS contains first SCons Library objects ("SCons.Node.FS.File object")
+ # and then plain strings for system library. We insert between the two.
+ inserted = False
+ for idx, linklib in enumerate(env["LIBS"]):
+ if isinstance(linklib, (str, bytes)): # first system lib such as "X11", otherwise SCons lib object
+ env["LIBS"].insert(idx, lib)
+ inserted = True
+ break
+ if not inserted:
+ env.Append(LIBS=[lib])
+
+
+# Godot source files
+
+module_obj = []
+
+env_msdfgen.add_source_files(module_obj, "*.cpp")
+env.modules_sources += module_obj
+
+# Needed to force rebuilding the module files when the thirdparty library is updated.
+env.Depends(module_obj, thirdparty_obj)
diff --git a/modules/msdfgen/config.py b/modules/msdfgen/config.py
new file mode 100644
index 0000000000..653e466a74
--- /dev/null
+++ b/modules/msdfgen/config.py
@@ -0,0 +1,6 @@
+def can_build(env, platform):
+ return env.module_check_dependencies("msdfgen", ["freetype"])
+
+
+def configure(env):
+ pass
diff --git a/modules/gdnative/net/register_types.h b/modules/msdfgen/register_types.cpp
index c99c6f6fbf..ad60a66d2d 100644
--- a/modules/gdnative/net/register_types.h
+++ b/modules/msdfgen/register_types.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* register_types.h */
+/* register_types.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,10 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef NET_REGISTER_TYPES_H
-#define NET_REGISTER_TYPES_H
+#include "register_types.h"
-void register_net_types();
-void unregister_net_types();
+void register_msdfgen_types() {}
-#endif // NET_REGISTER_TYPES_H
+void unregister_msdfgen_types() {}
diff --git a/modules/gdnative/xr/register_types.h b/modules/msdfgen/register_types.h
index 4e7469abe9..fb776c14ed 100644
--- a/modules/gdnative/xr/register_types.h
+++ b/modules/msdfgen/register_types.h
@@ -28,10 +28,10 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef XR_REGISTER_TYPES_H
-#define XR_REGISTER_TYPES_H
+#ifndef MSDFGEN_REGISTER_TYPES_H
+#define MSDFGEN_REGISTER_TYPES_H
-void register_xr_types();
-void unregister_xr_types();
+void register_msdfgen_types();
+void unregister_msdfgen_types();
-#endif // XR_REGISTER_TYPES_H
+#endif // MSDFGEN_REGISTER_TYPES_H
diff --git a/modules/navigation/godot_navigation_server.cpp b/modules/navigation/godot_navigation_server.cpp
index fd965674d6..f600f07c87 100644
--- a/modules/navigation/godot_navigation_server.cpp
+++ b/modules/navigation/godot_navigation_server.cpp
@@ -133,13 +133,13 @@ RID GodotNavigationServer::map_create() const {
GodotNavigationServer *mut_this = const_cast<GodotNavigationServer *>(this);
MutexLock lock(mut_this->operations_mutex);
RID rid = map_owner.make_rid();
- NavMap *space = map_owner.getornull(rid);
+ NavMap *space = map_owner.get_or_null(rid);
space->set_self(rid);
return rid;
}
COMMAND_2(map_set_active, RID, p_map, bool, p_active) {
- NavMap *map = map_owner.getornull(p_map);
+ NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND(map == nullptr);
if (p_active) {
@@ -156,84 +156,84 @@ COMMAND_2(map_set_active, RID, p_map, bool, p_active) {
}
bool GodotNavigationServer::map_is_active(RID p_map) const {
- NavMap *map = map_owner.getornull(p_map);
+ NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND_V(map == nullptr, false);
return active_maps.find(map) >= 0;
}
COMMAND_2(map_set_up, RID, p_map, Vector3, p_up) {
- NavMap *map = map_owner.getornull(p_map);
+ NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND(map == nullptr);
map->set_up(p_up);
}
Vector3 GodotNavigationServer::map_get_up(RID p_map) const {
- const NavMap *map = map_owner.getornull(p_map);
+ const NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND_V(map == nullptr, Vector3());
return map->get_up();
}
COMMAND_2(map_set_cell_size, RID, p_map, real_t, p_cell_size) {
- NavMap *map = map_owner.getornull(p_map);
+ NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND(map == nullptr);
map->set_cell_size(p_cell_size);
}
real_t GodotNavigationServer::map_get_cell_size(RID p_map) const {
- const NavMap *map = map_owner.getornull(p_map);
+ const NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND_V(map == nullptr, 0);
return map->get_cell_size();
}
COMMAND_2(map_set_edge_connection_margin, RID, p_map, real_t, p_connection_margin) {
- NavMap *map = map_owner.getornull(p_map);
+ NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND(map == nullptr);
map->set_edge_connection_margin(p_connection_margin);
}
real_t GodotNavigationServer::map_get_edge_connection_margin(RID p_map) const {
- const NavMap *map = map_owner.getornull(p_map);
+ const NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND_V(map == nullptr, 0);
return map->get_edge_connection_margin();
}
Vector<Vector3> GodotNavigationServer::map_get_path(RID p_map, Vector3 p_origin, Vector3 p_destination, bool p_optimize, uint32_t p_layers) const {
- const NavMap *map = map_owner.getornull(p_map);
+ const NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND_V(map == nullptr, Vector<Vector3>());
return map->get_path(p_origin, p_destination, p_optimize, p_layers);
}
Vector3 GodotNavigationServer::map_get_closest_point_to_segment(RID p_map, const Vector3 &p_from, const Vector3 &p_to, const bool p_use_collision) const {
- const NavMap *map = map_owner.getornull(p_map);
+ const NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND_V(map == nullptr, Vector3());
return map->get_closest_point_to_segment(p_from, p_to, p_use_collision);
}
Vector3 GodotNavigationServer::map_get_closest_point(RID p_map, const Vector3 &p_point) const {
- const NavMap *map = map_owner.getornull(p_map);
+ const NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND_V(map == nullptr, Vector3());
return map->get_closest_point(p_point);
}
Vector3 GodotNavigationServer::map_get_closest_point_normal(RID p_map, const Vector3 &p_point) const {
- const NavMap *map = map_owner.getornull(p_map);
+ const NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND_V(map == nullptr, Vector3());
return map->get_closest_point_normal(p_point);
}
RID GodotNavigationServer::map_get_closest_point_owner(RID p_map, const Vector3 &p_point) const {
- const NavMap *map = map_owner.getornull(p_map);
+ const NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND_V(map == nullptr, RID());
return map->get_closest_point_owner(p_point);
@@ -243,13 +243,13 @@ RID GodotNavigationServer::region_create() const {
GodotNavigationServer *mut_this = const_cast<GodotNavigationServer *>(this);
MutexLock lock(mut_this->operations_mutex);
RID rid = region_owner.make_rid();
- NavRegion *reg = region_owner.getornull(rid);
+ NavRegion *reg = region_owner.get_or_null(rid);
reg->set_self(rid);
return rid;
}
COMMAND_2(region_set_map, RID, p_region, RID, p_map) {
- NavRegion *region = region_owner.getornull(p_region);
+ NavRegion *region = region_owner.get_or_null(p_region);
ERR_FAIL_COND(region == nullptr);
if (region->get_map() != nullptr) {
@@ -262,7 +262,7 @@ COMMAND_2(region_set_map, RID, p_region, RID, p_map) {
}
if (p_map.is_valid()) {
- NavMap *map = map_owner.getornull(p_map);
+ NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND(map == nullptr);
map->add_region(region);
@@ -271,28 +271,28 @@ COMMAND_2(region_set_map, RID, p_region, RID, p_map) {
}
COMMAND_2(region_set_transform, RID, p_region, Transform3D, p_transform) {
- NavRegion *region = region_owner.getornull(p_region);
+ NavRegion *region = region_owner.get_or_null(p_region);
ERR_FAIL_COND(region == nullptr);
region->set_transform(p_transform);
}
COMMAND_2(region_set_layers, RID, p_region, uint32_t, p_layers) {
- NavRegion *region = region_owner.getornull(p_region);
+ NavRegion *region = region_owner.get_or_null(p_region);
ERR_FAIL_COND(region == nullptr);
region->set_layers(p_layers);
}
uint32_t GodotNavigationServer::region_get_layers(RID p_region) const {
- NavRegion *region = region_owner.getornull(p_region);
+ NavRegion *region = region_owner.get_or_null(p_region);
ERR_FAIL_COND_V(region == nullptr, 0);
return region->get_layers();
}
COMMAND_2(region_set_navmesh, RID, p_region, Ref<NavigationMesh>, p_nav_mesh) {
- NavRegion *region = region_owner.getornull(p_region);
+ NavRegion *region = region_owner.get_or_null(p_region);
ERR_FAIL_COND(region == nullptr);
region->set_mesh(p_nav_mesh);
@@ -309,21 +309,21 @@ void GodotNavigationServer::region_bake_navmesh(Ref<NavigationMesh> r_mesh, Node
}
int GodotNavigationServer::region_get_connections_count(RID p_region) const {
- NavRegion *region = region_owner.getornull(p_region);
+ NavRegion *region = region_owner.get_or_null(p_region);
ERR_FAIL_COND_V(!region, 0);
return region->get_connections_count();
}
Vector3 GodotNavigationServer::region_get_connection_pathway_start(RID p_region, int p_connection_id) const {
- NavRegion *region = region_owner.getornull(p_region);
+ NavRegion *region = region_owner.get_or_null(p_region);
ERR_FAIL_COND_V(!region, Vector3());
return region->get_connection_pathway_start(p_connection_id);
}
Vector3 GodotNavigationServer::region_get_connection_pathway_end(RID p_region, int p_connection_id) const {
- NavRegion *region = region_owner.getornull(p_region);
+ NavRegion *region = region_owner.get_or_null(p_region);
ERR_FAIL_COND_V(!region, Vector3());
return region->get_connection_pathway_end(p_connection_id);
@@ -333,13 +333,13 @@ RID GodotNavigationServer::agent_create() const {
GodotNavigationServer *mut_this = const_cast<GodotNavigationServer *>(this);
MutexLock lock(mut_this->operations_mutex);
RID rid = agent_owner.make_rid();
- RvoAgent *agent = agent_owner.getornull(rid);
+ RvoAgent *agent = agent_owner.get_or_null(rid);
agent->set_self(rid);
return rid;
}
COMMAND_2(agent_set_map, RID, p_agent, RID, p_map) {
- RvoAgent *agent = agent_owner.getornull(p_agent);
+ RvoAgent *agent = agent_owner.get_or_null(p_agent);
ERR_FAIL_COND(agent == nullptr);
if (agent->get_map()) {
@@ -353,7 +353,7 @@ COMMAND_2(agent_set_map, RID, p_agent, RID, p_map) {
agent->set_map(nullptr);
if (p_map.is_valid()) {
- NavMap *map = map_owner.getornull(p_map);
+ NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_COND(map == nullptr);
agent->set_map(map);
@@ -366,77 +366,77 @@ COMMAND_2(agent_set_map, RID, p_agent, RID, p_map) {
}
COMMAND_2(agent_set_neighbor_dist, RID, p_agent, real_t, p_dist) {
- RvoAgent *agent = agent_owner.getornull(p_agent);
+ RvoAgent *agent = agent_owner.get_or_null(p_agent);
ERR_FAIL_COND(agent == nullptr);
agent->get_agent()->neighborDist_ = p_dist;
}
COMMAND_2(agent_set_max_neighbors, RID, p_agent, int, p_count) {
- RvoAgent *agent = agent_owner.getornull(p_agent);
+ RvoAgent *agent = agent_owner.get_or_null(p_agent);
ERR_FAIL_COND(agent == nullptr);
agent->get_agent()->maxNeighbors_ = p_count;
}
COMMAND_2(agent_set_time_horizon, RID, p_agent, real_t, p_time) {
- RvoAgent *agent = agent_owner.getornull(p_agent);
+ RvoAgent *agent = agent_owner.get_or_null(p_agent);
ERR_FAIL_COND(agent == nullptr);
agent->get_agent()->timeHorizon_ = p_time;
}
COMMAND_2(agent_set_radius, RID, p_agent, real_t, p_radius) {
- RvoAgent *agent = agent_owner.getornull(p_agent);
+ RvoAgent *agent = agent_owner.get_or_null(p_agent);
ERR_FAIL_COND(agent == nullptr);
agent->get_agent()->radius_ = p_radius;
}
COMMAND_2(agent_set_max_speed, RID, p_agent, real_t, p_max_speed) {
- RvoAgent *agent = agent_owner.getornull(p_agent);
+ RvoAgent *agent = agent_owner.get_or_null(p_agent);
ERR_FAIL_COND(agent == nullptr);
agent->get_agent()->maxSpeed_ = p_max_speed;
}
COMMAND_2(agent_set_velocity, RID, p_agent, Vector3, p_velocity) {
- RvoAgent *agent = agent_owner.getornull(p_agent);
+ RvoAgent *agent = agent_owner.get_or_null(p_agent);
ERR_FAIL_COND(agent == nullptr);
agent->get_agent()->velocity_ = RVO::Vector3(p_velocity.x, p_velocity.y, p_velocity.z);
}
COMMAND_2(agent_set_target_velocity, RID, p_agent, Vector3, p_velocity) {
- RvoAgent *agent = agent_owner.getornull(p_agent);
+ RvoAgent *agent = agent_owner.get_or_null(p_agent);
ERR_FAIL_COND(agent == nullptr);
agent->get_agent()->prefVelocity_ = RVO::Vector3(p_velocity.x, p_velocity.y, p_velocity.z);
}
COMMAND_2(agent_set_position, RID, p_agent, Vector3, p_position) {
- RvoAgent *agent = agent_owner.getornull(p_agent);
+ RvoAgent *agent = agent_owner.get_or_null(p_agent);
ERR_FAIL_COND(agent == nullptr);
agent->get_agent()->position_ = RVO::Vector3(p_position.x, p_position.y, p_position.z);
}
COMMAND_2(agent_set_ignore_y, RID, p_agent, bool, p_ignore) {
- RvoAgent *agent = agent_owner.getornull(p_agent);
+ RvoAgent *agent = agent_owner.get_or_null(p_agent);
ERR_FAIL_COND(agent == nullptr);
agent->get_agent()->ignore_y_ = p_ignore;
}
bool GodotNavigationServer::agent_is_map_changed(RID p_agent) const {
- RvoAgent *agent = agent_owner.getornull(p_agent);
+ RvoAgent *agent = agent_owner.get_or_null(p_agent);
ERR_FAIL_COND_V(agent == nullptr, false);
return agent->is_map_changed();
}
COMMAND_4(agent_set_callback, RID, p_agent, Object *, p_receiver, StringName, p_method, Variant, p_udata) {
- RvoAgent *agent = agent_owner.getornull(p_agent);
+ RvoAgent *agent = agent_owner.get_or_null(p_agent);
ERR_FAIL_COND(agent == nullptr);
agent->set_callback(p_receiver == nullptr ? ObjectID() : p_receiver->get_instance_id(), p_method, p_udata);
@@ -452,7 +452,7 @@ COMMAND_4(agent_set_callback, RID, p_agent, Object *, p_receiver, StringName, p_
COMMAND_1(free, RID, p_object) {
if (map_owner.owns(p_object)) {
- NavMap *map = map_owner.getornull(p_object);
+ NavMap *map = map_owner.get_or_null(p_object);
// Removes any assigned region
std::vector<NavRegion *> regions = map->get_regions();
@@ -474,7 +474,7 @@ COMMAND_1(free, RID, p_object) {
map_owner.free(p_object);
} else if (region_owner.owns(p_object)) {
- NavRegion *region = region_owner.getornull(p_object);
+ NavRegion *region = region_owner.get_or_null(p_object);
// Removes this region from the map if assigned
if (region->get_map() != nullptr) {
@@ -485,7 +485,7 @@ COMMAND_1(free, RID, p_object) {
region_owner.free(p_object);
} else if (agent_owner.owns(p_object)) {
- RvoAgent *agent = agent_owner.getornull(p_object);
+ RvoAgent *agent = agent_owner.get_or_null(p_object);
// Removes this agent from the map if assigned
if (agent->get_map() != nullptr) {
diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp
index 3150ca0bc8..962bf79150 100644
--- a/modules/navigation/nav_map.cpp
+++ b/modules/navigation/nav_map.cpp
@@ -664,7 +664,7 @@ void NavMap::sync() {
} else {
other1 = other_edge_p1.lerp(other_edge_p2, (1.0 - projected_p1_ratio) / (projected_p2_ratio - projected_p1_ratio));
}
- if ((self1 - other1).length() > edge_connection_margin) {
+ if (other1.distance_to(self1) > edge_connection_margin) {
continue;
}
@@ -675,7 +675,7 @@ void NavMap::sync() {
} else {
other2 = other_edge_p1.lerp(other_edge_p2, (0.0 - projected_p1_ratio) / (projected_p2_ratio - projected_p1_ratio));
}
- if ((self2 - other2).length() > edge_connection_margin) {
+ if (other2.distance_to(self2) > edge_connection_margin) {
continue;
}
diff --git a/modules/navigation/navigation_mesh_generator.cpp b/modules/navigation/navigation_mesh_generator.cpp
index 905d10c9d4..bb6bc578a4 100644
--- a/modules/navigation/navigation_mesh_generator.cpp
+++ b/modules/navigation/navigation_mesh_generator.cpp
@@ -45,7 +45,7 @@
#include "scene/resources/primitive_meshes.h"
#include "scene/resources/shape_3d.h"
#include "scene/resources/sphere_shape_3d.h"
-#include "scene/resources/world_margin_shape_3d.h"
+#include "scene/resources/world_boundary_shape_3d.h"
#ifdef TOOLS_ENABLED
#include "editor/editor_node.h"
diff --git a/modules/ogg/config.py b/modules/ogg/config.py
index d22f9454ed..5a417ba8dd 100644
--- a/modules/ogg/config.py
+++ b/modules/ogg/config.py
@@ -4,3 +4,14 @@ def can_build(env, platform):
def configure(env):
pass
+
+
+def get_doc_classes():
+ return [
+ "OGGPacketSequence",
+ "OGGPacketSequencePlayback",
+ ]
+
+
+def get_doc_path():
+ return "doc_classes"
diff --git a/modules/ogg/doc_classes/OGGPacketSequence.xml b/modules/ogg/doc_classes/OGGPacketSequence.xml
new file mode 100644
index 0000000000..deac5b67e2
--- /dev/null
+++ b/modules/ogg/doc_classes/OGGPacketSequence.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="OGGPacketSequence" inherits="Resource" version="4.0">
+ <brief_description>
+ A sequence of OGG packets.
+ </brief_description>
+ <description>
+ A sequence of OGG packets.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_length" qualifiers="const">
+ <return type="float" />
+ <description>
+ The length of this stream, in seconds.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="granule_positions" type="Array" setter="set_packet_granule_positions" getter="get_packet_granule_positions" default="[]">
+ Contains the granule positions for each page in this packet sequence.
+ </member>
+ <member name="packet_data" type="Array" setter="set_packet_data" getter="get_packet_data" default="[]">
+ Contains the raw packets that make up this OGGPacketSequence.
+ </member>
+ <member name="sampling_rate" type="float" setter="set_sampling_rate" getter="get_sampling_rate" default="0.0">
+ Holds sample rate information about this sequence. Must be set by another class that actually understands the codec.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/TextFile.xml b/modules/ogg/doc_classes/OGGPacketSequencePlayback.xml
index 1c2c2ff25c..86dee15567 100644
--- a/doc/classes/TextFile.xml
+++ b/modules/ogg/doc_classes/OGGPacketSequencePlayback.xml
@@ -1,13 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextFile" inherits="Resource" version="4.0">
+<class name="OGGPacketSequencePlayback" inherits="RefCounted" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/ogg/ogg_packet_sequence.cpp b/modules/ogg/ogg_packet_sequence.cpp
new file mode 100644
index 0000000000..b7a3ad2876
--- /dev/null
+++ b/modules/ogg/ogg_packet_sequence.cpp
@@ -0,0 +1,220 @@
+/*************************************************************************/
+/* ogg_packet_sequence.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "ogg_packet_sequence.h"
+#include "core/variant/typed_array.h"
+
+void OGGPacketSequence::push_page(int64_t p_granule_pos, const Vector<PackedByteArray> &p_data) {
+ Vector<PackedByteArray> data_stored;
+ for (int i = 0; i < p_data.size(); i++) {
+ data_stored.push_back(p_data[i]);
+ }
+ page_granule_positions.push_back(p_granule_pos);
+ page_data.push_back(data_stored);
+ data_version++;
+}
+
+void OGGPacketSequence::set_packet_data(const Array &p_data) {
+ data_version++; // Update the data version so old playbacks know that they can't rely on us anymore.
+ page_data.clear();
+ for (int page_idx = 0; page_idx < p_data.size(); page_idx++) {
+ // Push a new page. We cleared the vector so this will be at index `page_idx`.
+ page_data.push_back(Vector<PackedByteArray>());
+ TypedArray<PackedByteArray> this_page_data = p_data[page_idx];
+ for (int packet = 0; packet < this_page_data.size(); packet++) {
+ page_data.write[page_idx].push_back(this_page_data[packet]);
+ }
+ }
+}
+
+Array OGGPacketSequence::get_packet_data() const {
+ Array ret;
+ for (const Vector<PackedByteArray> &page : page_data) {
+ Array page_variant;
+ for (const PackedByteArray &packet : page) {
+ page_variant.push_back(packet);
+ }
+ ret.push_back(page_variant);
+ }
+ return ret;
+}
+
+void OGGPacketSequence::set_packet_granule_positions(const Array &p_granule_positions) {
+ data_version++; // Update the data version so old playbacks know that they can't rely on us anymore.
+ page_granule_positions.clear();
+ for (int page_idx = 0; page_idx < p_granule_positions.size(); page_idx++) {
+ int64_t granule_pos = p_granule_positions[page_idx];
+ page_granule_positions.push_back(granule_pos);
+ }
+}
+
+Array OGGPacketSequence::get_packet_granule_positions() const {
+ Array ret;
+ for (int64_t granule_pos : page_granule_positions) {
+ ret.push_back(granule_pos);
+ }
+ return ret;
+}
+
+void OGGPacketSequence::set_sampling_rate(float p_sampling_rate) {
+ sampling_rate = p_sampling_rate;
+}
+
+float OGGPacketSequence::get_sampling_rate() const {
+ return sampling_rate;
+}
+
+int64_t OGGPacketSequence::get_final_granule_pos() const {
+ if (!page_granule_positions.is_empty()) {
+ return page_granule_positions[page_granule_positions.size() - 1];
+ }
+ return -1;
+}
+
+float OGGPacketSequence::get_length() const {
+ int64_t granule_pos = get_final_granule_pos();
+ if (granule_pos < 0) {
+ return 0;
+ }
+ return granule_pos / sampling_rate;
+}
+
+Ref<OGGPacketSequencePlayback> OGGPacketSequence::instance_playback() {
+ Ref<OGGPacketSequencePlayback> playback;
+ playback.instantiate();
+ playback->ogg_packet_sequence = Ref<OGGPacketSequence>(this);
+ playback->data_version = data_version;
+
+ return playback;
+}
+
+void OGGPacketSequence::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_packet_data", "packet_data"), &OGGPacketSequence::set_packet_data);
+ ClassDB::bind_method(D_METHOD("get_packet_data"), &OGGPacketSequence::get_packet_data);
+
+ ClassDB::bind_method(D_METHOD("set_packet_granule_positions", "granule_positions"), &OGGPacketSequence::set_packet_granule_positions);
+ ClassDB::bind_method(D_METHOD("get_packet_granule_positions"), &OGGPacketSequence::get_packet_granule_positions);
+
+ ClassDB::bind_method(D_METHOD("set_sampling_rate", "sampling_rate"), &OGGPacketSequence::set_sampling_rate);
+ ClassDB::bind_method(D_METHOD("get_sampling_rate"), &OGGPacketSequence::get_sampling_rate);
+
+ ClassDB::bind_method(D_METHOD("get_length"), &OGGPacketSequence::get_length);
+
+ ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "packet_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_packet_data", "get_packet_data");
+ ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "granule_positions", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_packet_granule_positions", "get_packet_granule_positions");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sampling_rate", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_sampling_rate", "get_sampling_rate");
+}
+
+bool OGGPacketSequencePlayback::next_ogg_packet(ogg_packet **p_packet) const {
+ ERR_FAIL_COND_V(data_version != ogg_packet_sequence->data_version, false);
+ ERR_FAIL_COND_V(ogg_packet_sequence->page_data.is_empty(), false);
+ ERR_FAIL_COND_V(ogg_packet_sequence->page_granule_positions.is_empty(), false);
+ // Move on to the next page if need be. This happens first to help simplify seek logic.
+ while (packet_cursor >= ogg_packet_sequence->page_data[page_cursor].size()) {
+ packet_cursor = 0;
+ page_cursor++;
+ if (page_cursor >= ogg_packet_sequence->page_data.size()) {
+ return false;
+ }
+ }
+
+ ERR_FAIL_COND_V(page_cursor >= ogg_packet_sequence->page_data.size(), false);
+
+ packet->b_o_s = page_cursor == 0 && packet_cursor == 0;
+ packet->e_o_s = page_cursor == ogg_packet_sequence->page_data.size() - 1 && packet_cursor == ogg_packet_sequence->page_data[page_cursor].size() - 1;
+ packet->granulepos = packet_cursor == ogg_packet_sequence->page_data[page_cursor].size() - 1 ? ogg_packet_sequence->page_granule_positions[page_cursor] : -1;
+ packet->packetno = packetno++;
+ packet->bytes = ogg_packet_sequence->page_data[page_cursor][packet_cursor].size();
+ packet->packet = (unsigned char *)(ogg_packet_sequence->page_data[page_cursor][packet_cursor].ptr());
+
+ *p_packet = packet;
+
+ packet_cursor++;
+
+ return true;
+}
+
+uint32_t OGGPacketSequencePlayback::seek_page_internal(int64_t granule, uint32_t after_page_inclusive, uint32_t before_page_inclusive) {
+ if (before_page_inclusive == after_page_inclusive) {
+ return before_page_inclusive;
+ }
+ uint32_t actual_middle_page = after_page_inclusive + (before_page_inclusive - after_page_inclusive) / 2;
+ // Complicating the bisection search algorithm, the middle page might not have a packet that ends on it,
+ // which means it might not have a correct granule position. Find a nearby page that does have a packet ending on it.
+ uint32_t bisection_page = -1;
+ for (uint32_t test_page = actual_middle_page; test_page <= before_page_inclusive; test_page++) {
+ if (ogg_packet_sequence->page_data[test_page].size() > 0) {
+ bisection_page = test_page;
+ break;
+ }
+ }
+ // Check if we have to go backwards.
+ if (bisection_page == (unsigned int)-1) {
+ for (uint32_t test_page = actual_middle_page; test_page >= after_page_inclusive; test_page--) {
+ if (ogg_packet_sequence->page_data[test_page].size() > 0) {
+ bisection_page = test_page;
+ break;
+ }
+ }
+ }
+ if (bisection_page == (unsigned int)-1) {
+ return -1;
+ }
+
+ int64_t bisection_granule_pos = ogg_packet_sequence->page_granule_positions[bisection_page];
+ if (granule > bisection_granule_pos) {
+ return seek_page_internal(granule, bisection_page + 1, before_page_inclusive);
+ } else {
+ return seek_page_internal(granule, after_page_inclusive, bisection_page);
+ }
+}
+
+bool OGGPacketSequencePlayback::seek_page(int64_t p_granule_pos) {
+ int correct_page = seek_page_internal(p_granule_pos, 0, ogg_packet_sequence->page_data.size() - 1);
+ if (correct_page == -1) {
+ return false;
+ }
+
+ packet_cursor = 0;
+ page_cursor = correct_page;
+
+ // Don't pretend subsequent packets are contiguous with previous ones.
+ packetno = 0;
+
+ return true;
+}
+
+OGGPacketSequencePlayback::OGGPacketSequencePlayback() {
+ packet = new ogg_packet();
+}
+
+OGGPacketSequencePlayback::~OGGPacketSequencePlayback() {
+ delete packet;
+}
diff --git a/modules/ogg/ogg_packet_sequence.h b/modules/ogg/ogg_packet_sequence.h
new file mode 100644
index 0000000000..b00ada06c1
--- /dev/null
+++ b/modules/ogg/ogg_packet_sequence.h
@@ -0,0 +1,128 @@
+/*************************************************************************/
+/* ogg_packet_sequence.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef OGG_PACKET_SEQUENCE_H
+#define OGG_PACKET_SEQUENCE_H
+
+#include "core/io/resource.h"
+#include "core/object/gdvirtual.gen.inc"
+#include "core/variant/native_ptr.h"
+#include "core/variant/typed_array.h"
+#include "core/variant/variant.h"
+#include "thirdparty/libogg/ogg/ogg.h"
+
+class OGGPacketSequencePlayback;
+
+class OGGPacketSequence : public Resource {
+ GDCLASS(OGGPacketSequence, Resource);
+
+ friend class OGGPacketSequencePlayback;
+
+ // List of pages, each of which is a list of packets on that page. The innermost PackedByteArrays contain complete ogg packets.
+ Vector<Vector<PackedByteArray>> page_data;
+
+ // List of the granule position for each page.
+ Vector<uint64_t> page_granule_positions;
+
+ // The page after the current last page. Similar semantics to an end() iterator.
+ int64_t end_page = 0;
+
+ uint64_t data_version = 0;
+
+ float sampling_rate = 0;
+ float length = 0;
+
+protected:
+ static void _bind_methods();
+
+public:
+ // Pushes information about all the pages that ended on this page.
+ // This should be called for each page, even for pages that no packets ended on.
+ void push_page(int64_t p_granule_pos, const Vector<PackedByteArray> &p_data);
+
+ void set_packet_data(const Array &p_data);
+ Array get_packet_data() const;
+
+ void set_packet_granule_positions(const Array &p_granule_positions);
+ Array get_packet_granule_positions() const;
+
+ // Sets a sampling rate associated with this object. OGGPacketSequence doesn't understand codecs,
+ // so this value is naively stored as a convenience.
+ void set_sampling_rate(float p_sampling_rate);
+
+ // Returns a sampling rate previously set by set_sampling_rate().
+ float get_sampling_rate() const;
+
+ // Returns a length previously set by set_length().
+ float get_length() const;
+
+ // Returns the granule position of the last page in this sequence.
+ int64_t get_final_granule_pos() const;
+
+ Ref<OGGPacketSequencePlayback> instance_playback();
+
+ OGGPacketSequence() {}
+ virtual ~OGGPacketSequence() {}
+};
+
+class OGGPacketSequencePlayback : public RefCounted {
+ GDCLASS(OGGPacketSequencePlayback, RefCounted);
+
+ friend class OGGPacketSequence;
+
+ Ref<OGGPacketSequence> ogg_packet_sequence;
+
+ mutable int64_t page_cursor = 0;
+ mutable int32_t packet_cursor = 0;
+
+ mutable ogg_packet *packet;
+
+ uint64_t data_version;
+
+ mutable int64_t packetno = 0;
+
+ // Recursive bisection search for the correct page.
+ uint32_t seek_page_internal(int64_t granule, uint32_t after_page_inclusive, uint32_t before_page_inclusive);
+
+public:
+ // Calling functions must not modify this packet.
+ // Returns true on success, false on error or if there is no next packet.
+ bool next_ogg_packet(ogg_packet **p_packet) const;
+
+ // Seeks to the page such that the previous page has a granule position less than or equal to this value,
+ // and the current page has a granule position greater than this value.
+ // Returns true on success, false on failure.
+ bool seek_page(int64_t p_granule_pos);
+
+ OGGPacketSequencePlayback();
+ virtual ~OGGPacketSequencePlayback();
+};
+
+#endif // OGG_PACKET_SEQUENCE_H
diff --git a/modules/ogg/register_types.cpp b/modules/ogg/register_types.cpp
index b23ea65378..3448e7063a 100644
--- a/modules/ogg/register_types.cpp
+++ b/modules/ogg/register_types.cpp
@@ -30,8 +30,11 @@
#include "register_types.h"
-// Dummy module as libogg is needed by other modules (vorbis, theora, opus, ...)
+#include "ogg_packet_sequence.h"
-void register_ogg_types() {}
+void register_ogg_types() {
+ GDREGISTER_CLASS(OGGPacketSequence);
+ GDREGISTER_CLASS(OGGPacketSequencePlayback);
+}
void unregister_ogg_types() {}
diff --git a/modules/opensimplex/doc_classes/NoiseTexture.xml b/modules/opensimplex/doc_classes/NoiseTexture.xml
index 2ae7f8cad9..8a10411cf6 100644
--- a/modules/opensimplex/doc_classes/NoiseTexture.xml
+++ b/modules/opensimplex/doc_classes/NoiseTexture.xml
@@ -16,8 +16,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="as_normal_map" type="bool" setter="set_as_normal_map" getter="is_normal_map" default="false">
If [code]true[/code], the resulting texture contains a normal map created from the original noise interpreted as a bump map.
@@ -42,6 +40,4 @@
Width of the generated texture.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/opensimplex/doc_classes/OpenSimplexNoise.xml b/modules/opensimplex/doc_classes/OpenSimplexNoise.xml
index c470f3e1ab..604b07b645 100644
--- a/modules/opensimplex/doc_classes/OpenSimplexNoise.xml
+++ b/modules/opensimplex/doc_classes/OpenSimplexNoise.xml
@@ -109,6 +109,4 @@
Seed used to generate random values, different seeds will generate different noise maps.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/raycast/SCsub b/modules/raycast/SCsub
index 6e7b3e7b8d..4820cf7608 100644
--- a/modules/raycast/SCsub
+++ b/modules/raycast/SCsub
@@ -55,6 +55,9 @@ if env["builtin_embree"]:
"kernels/bvh/bvh_builder_sah_mb.cpp",
"kernels/bvh/bvh_builder_twolevel.cpp",
"kernels/bvh/bvh_intersector1_bvh4.cpp",
+ "kernels/bvh/bvh_intersector_hybrid4_bvh4.cpp",
+ "kernels/bvh/bvh_intersector_stream_bvh4.cpp",
+ "kernels/bvh/bvh_intersector_stream_filters.cpp",
]
thirdparty_sources = [thirdparty_dir + file for file in embree_src]
@@ -76,6 +79,7 @@ if env["builtin_embree"]:
env.Append(LIBS=["psapi"])
env_thirdparty = env_raycast.Clone()
+ env_thirdparty.force_optimization_on_debug()
env_thirdparty.disable_warnings()
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
diff --git a/modules/raycast/godot_update_embree.py b/modules/raycast/godot_update_embree.py
index 31a25a318f..e31d88b741 100644
--- a/modules/raycast/godot_update_embree.py
+++ b/modules/raycast/godot_update_embree.py
@@ -61,6 +61,11 @@ cpp_files = [
"kernels/bvh/bvh_builder_twolevel.cpp",
"kernels/bvh/bvh_intersector1.cpp",
"kernels/bvh/bvh_intersector1_bvh4.cpp",
+ "kernels/bvh/bvh_intersector_hybrid4_bvh4.cpp",
+ "kernels/bvh/bvh_intersector_stream_bvh4.cpp",
+ "kernels/bvh/bvh_intersector_stream_filters.cpp",
+ "kernels/bvh/bvh_intersector_hybrid.cpp",
+ "kernels/bvh/bvh_intersector_stream.cpp",
]
os.chdir("../../thirdparty")
@@ -117,7 +122,7 @@ with open(os.path.join(dest_dir, "kernels/config.h"), "w") as config_file:
/* #undef EMBREE_GEOMETRY_INSTANCE */
/* #undef EMBREE_GEOMETRY_GRID */
/* #undef EMBREE_GEOMETRY_POINT */
-/* #undef EMBREE_RAY_PACKETS */
+#define EMBREE_RAY_PACKETS
/* #undef EMBREE_COMPACT_POLYS */
#define EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR 2.0
@@ -249,3 +254,8 @@ with open(os.path.join(dest_dir, "include/embree3/rtcore_config.h"), "w") as con
os.chdir("..")
shutil.rmtree("embree-tmp")
+
+subprocess.run(["git", "restore", "embree/patches"])
+
+for patch in os.listdir("embree/patches"):
+ subprocess.run(["git", "apply", "embree/patches/" + patch])
diff --git a/modules/raycast/raycast_occlusion_cull.cpp b/modules/raycast/raycast_occlusion_cull.cpp
index 88c0145ebc..3975e83797 100644
--- a/modules/raycast/raycast_occlusion_cull.cpp
+++ b/modules/raycast/raycast_occlusion_cull.cpp
@@ -66,28 +66,45 @@ void RaycastOcclusionCull::RaycastHZBuffer::resize(const Size2i &p_size) {
void RaycastOcclusionCull::RaycastHZBuffer::update_camera_rays(const Transform3D &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, ThreadWorkPool &p_thread_work_pool) {
CameraRayThreadData td;
- td.camera_matrix = p_cam_projection;
- td.camera_transform = p_cam_transform;
- td.camera_orthogonal = p_cam_orthogonal;
td.thread_count = p_thread_work_pool.get_thread_count();
+ td.z_near = p_cam_projection.get_z_near();
+ td.z_far = p_cam_projection.get_z_far() * 1.05f;
+ td.camera_pos = p_cam_transform.origin;
+ td.camera_dir = -p_cam_transform.basis.get_axis(2);
+ td.camera_orthogonal = p_cam_orthogonal;
+
+ CameraMatrix inv_camera_matrix = p_cam_projection.inverse();
+ Vector3 camera_corner_proj = Vector3(-1.0f, -1.0f, -1.0f);
+ Vector3 camera_corner_view = inv_camera_matrix.xform(camera_corner_proj);
+ td.pixel_corner = p_cam_transform.xform(camera_corner_view);
+
+ Vector3 top_corner_proj = Vector3(-1.0f, 1.0f, -1.0f);
+ Vector3 top_corner_view = inv_camera_matrix.xform(top_corner_proj);
+ Vector3 top_corner_world = p_cam_transform.xform(top_corner_view);
+
+ Vector3 left_corner_proj = Vector3(1.0f, -1.0f, -1.0f);
+ Vector3 left_corner_view = inv_camera_matrix.xform(left_corner_proj);
+ Vector3 left_corner_world = p_cam_transform.xform(left_corner_view);
+
+ td.pixel_u_interp = left_corner_world - td.pixel_corner;
+ td.pixel_v_interp = top_corner_world - td.pixel_corner;
+
+ debug_tex_range = td.z_far;
+
p_thread_work_pool.do_work(td.thread_count, this, &RaycastHZBuffer::_camera_rays_threaded, &td);
}
-void RaycastOcclusionCull::RaycastHZBuffer::_camera_rays_threaded(uint32_t p_thread, RaycastOcclusionCull::RaycastHZBuffer::CameraRayThreadData *p_data) {
+void RaycastOcclusionCull::RaycastHZBuffer::_camera_rays_threaded(uint32_t p_thread, const CameraRayThreadData *p_data) {
uint32_t packs_total = camera_rays.size();
uint32_t total_threads = p_data->thread_count;
uint32_t from = p_thread * packs_total / total_threads;
uint32_t to = (p_thread + 1 == total_threads) ? packs_total : ((p_thread + 1) * packs_total / total_threads);
- _generate_camera_rays(p_data->camera_transform, p_data->camera_matrix, p_data->camera_orthogonal, from, to);
+ _generate_camera_rays(p_data, from, to);
}
-void RaycastOcclusionCull::RaycastHZBuffer::_generate_camera_rays(const Transform3D &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, int p_from, int p_to) {
- Size2i buffer_size = sizes[0];
-
- CameraMatrix inv_camera_matrix = p_cam_projection.inverse();
- float z_far = p_cam_projection.get_z_far() * 1.05f;
- debug_tex_range = z_far;
+void RaycastOcclusionCull::RaycastHZBuffer::_generate_camera_rays(const CameraRayThreadData *p_data, int p_from, int p_to) {
+ const Size2i &buffer_size = sizes[0];
RayPacket *ray_packets = camera_rays.ptr();
uint32_t *ray_masks = camera_ray_masks.ptr();
@@ -98,56 +115,52 @@ void RaycastOcclusionCull::RaycastHZBuffer::_generate_camera_rays(const Transfor
int tile_y = (i / packs_size.x) * TILE_SIZE;
for (int j = 0; j < TILE_RAYS; j++) {
- float x = tile_x + j % TILE_SIZE;
- float y = tile_y + j / TILE_SIZE;
-
- ray_masks[i * TILE_RAYS + j] = ~0U;
+ int x = tile_x + j % TILE_SIZE;
+ int y = tile_y + j / TILE_SIZE;
if (x >= buffer_size.x || y >= buffer_size.y) {
ray_masks[i * TILE_RAYS + j] = 0U;
- } else {
- float u = x / (buffer_size.x - 1);
- float v = y / (buffer_size.y - 1);
- u = u * 2.0f - 1.0f;
- v = v * 2.0f - 1.0f;
-
- Plane pixel_proj = Plane(u, v, -1.0, 1.0);
- Plane pixel_view = inv_camera_matrix.xform4(pixel_proj);
- Vector3 pixel_world = p_cam_transform.xform(pixel_view.normal);
-
- Vector3 dir;
- if (p_cam_orthogonal) {
- dir = -p_cam_transform.basis.get_axis(2);
- } else {
- dir = (pixel_world - p_cam_transform.origin).normalized();
- }
-
- packet.ray.org_x[j] = pixel_world.x;
- packet.ray.org_y[j] = pixel_world.y;
- packet.ray.org_z[j] = pixel_world.z;
+ continue;
+ }
- packet.ray.dir_x[j] = dir.x;
- packet.ray.dir_y[j] = dir.y;
- packet.ray.dir_z[j] = dir.z;
+ ray_masks[i * TILE_RAYS + j] = ~0U;
- packet.ray.tnear[j] = 0.0f;
+ float u = (float(x) + 0.5f) / buffer_size.x;
+ float v = (float(y) + 0.5f) / buffer_size.y;
+ Vector3 pixel_pos = p_data->pixel_corner + u * p_data->pixel_u_interp + v * p_data->pixel_v_interp;
- packet.ray.time[j] = 0.0f;
+ packet.ray.tnear[j] = p_data->z_near;
- packet.ray.flags[j] = 0;
- packet.ray.mask[j] = -1;
- packet.hit.geomID[j] = RTC_INVALID_GEOMETRY_ID;
+ Vector3 dir;
+ if (p_data->camera_orthogonal) {
+ dir = -p_data->camera_dir;
+ packet.ray.org_x[j] = pixel_pos.x - dir.x * p_data->z_near;
+ packet.ray.org_y[j] = pixel_pos.y - dir.y * p_data->z_near;
+ packet.ray.org_z[j] = pixel_pos.z - dir.z * p_data->z_near;
+ } else {
+ dir = (pixel_pos - p_data->camera_pos).normalized();
+ packet.ray.org_x[j] = p_data->camera_pos.x;
+ packet.ray.org_y[j] = p_data->camera_pos.y;
+ packet.ray.org_z[j] = p_data->camera_pos.z;
+ packet.ray.tnear[j] /= dir.dot(p_data->camera_dir);
}
- packet.ray.tfar[j] = z_far;
+ packet.ray.dir_x[j] = dir.x;
+ packet.ray.dir_y[j] = dir.y;
+ packet.ray.dir_z[j] = dir.z;
+
+ packet.ray.tfar[j] = p_data->z_far;
+ packet.ray.time[j] = 0.0f;
+
+ packet.ray.flags[j] = 0;
+ packet.ray.mask[j] = -1;
+ packet.hit.geomID[j] = RTC_INVALID_GEOMETRY_ID;
}
}
}
-void RaycastOcclusionCull::RaycastHZBuffer::sort_rays() {
- if (is_empty()) {
- return;
- }
+void RaycastOcclusionCull::RaycastHZBuffer::sort_rays(const Vector3 &p_camera_dir, bool p_orthogonal) {
+ ERR_FAIL_COND(is_empty());
Size2i buffer_size = sizes[0];
for (int i = 0; i < packs_size.y; i++) {
@@ -161,7 +174,17 @@ void RaycastOcclusionCull::RaycastHZBuffer::sort_rays() {
}
int k = tile_i * TILE_SIZE + tile_j;
int packet_index = i * packs_size.x + j;
- mips[0][y * buffer_size.x + x] = camera_rays[packet_index].ray.tfar[k];
+ float d = camera_rays[packet_index].ray.tfar[k];
+
+ if (!p_orthogonal) {
+ const float &dir_x = camera_rays[packet_index].ray.dir_x[k];
+ const float &dir_y = camera_rays[packet_index].ray.dir_y[k];
+ const float &dir_z = camera_rays[packet_index].ray.dir_z[k];
+ float cos_theta = p_camera_dir.x * dir_x + p_camera_dir.y * dir_y + p_camera_dir.z * dir_z;
+ d *= cos_theta;
+ }
+
+ mips[0][y * buffer_size.x + x] = d;
}
}
}
@@ -184,7 +207,7 @@ void RaycastOcclusionCull::occluder_initialize(RID p_occluder) {
}
void RaycastOcclusionCull::occluder_set_mesh(RID p_occluder, const PackedVector3Array &p_vertices, const PackedInt32Array &p_indices) {
- Occluder *occluder = occluder_owner.getornull(p_occluder);
+ Occluder *occluder = occluder_owner.get_or_null(p_occluder);
ERR_FAIL_COND(!occluder);
occluder->vertices = p_vertices;
@@ -205,7 +228,7 @@ void RaycastOcclusionCull::occluder_set_mesh(RID p_occluder, const PackedVector3
}
void RaycastOcclusionCull::free_occluder(RID p_occluder) {
- Occluder *occluder = occluder_owner.getornull(p_occluder);
+ Occluder *occluder = occluder_owner.get_or_null(p_occluder);
ERR_FAIL_COND(!occluder);
memdelete(occluder);
occluder_owner.free(p_occluder);
@@ -245,7 +268,7 @@ void RaycastOcclusionCull::scenario_set_instance(RID p_scenario, RID p_instance,
bool changed = false;
if (instance.occluder != p_occluder) {
- Occluder *old_occluder = occluder_owner.getornull(instance.occluder);
+ Occluder *old_occluder = occluder_owner.get_or_null(instance.occluder);
if (old_occluder) {
old_occluder->users.erase(InstanceID(p_scenario, p_instance));
}
@@ -253,7 +276,7 @@ void RaycastOcclusionCull::scenario_set_instance(RID p_scenario, RID p_instance,
instance.occluder = p_occluder;
if (p_occluder.is_valid()) {
- Occluder *occluder = occluder_owner.getornull(p_occluder);
+ Occluder *occluder = occluder_owner.get_or_null(p_occluder);
ERR_FAIL_COND(!occluder);
occluder->users.insert(InstanceID(p_scenario, p_instance));
}
@@ -285,7 +308,7 @@ void RaycastOcclusionCull::scenario_remove_instance(RID p_scenario, RID p_instan
OccluderInstance &instance = scenario.instances[p_instance];
if (!instance.removed) {
- Occluder *occluder = occluder_owner.getornull(instance.occluder);
+ Occluder *occluder = occluder_owner.get_or_null(instance.occluder);
if (occluder) {
occluder->users.erase(InstanceID(p_scenario, p_instance));
}
@@ -307,7 +330,7 @@ void RaycastOcclusionCull::Scenario::_update_dirty_instance(int p_idx, RID *p_in
return;
}
- Occluder *occ = raycast_singleton->occluder_owner.getornull(occ_inst->occluder);
+ Occluder *occ = raycast_singleton->occluder_owner.get_or_null(occ_inst->occluder);
if (!occ) {
return;
@@ -423,7 +446,7 @@ bool RaycastOcclusionCull::Scenario::update(ThreadWorkPool &p_thread_pool) {
const RID *inst_rid = nullptr;
while ((inst_rid = instances.next(inst_rid))) {
OccluderInstance *occ_inst = instances.getptr(*inst_rid);
- Occluder *occ = raycast_singleton->occluder_owner.getornull(occ_inst->occluder);
+ Occluder *occ = raycast_singleton->occluder_owner.get_or_null(occ_inst->occluder);
if (!occ || !occ_inst->enabled) {
continue;
@@ -514,7 +537,7 @@ void RaycastOcclusionCull::buffer_update(RID p_buffer, const Transform3D &p_cam_
buffer.update_camera_rays(p_cam_transform, p_cam_projection, p_cam_orthogonal, p_thread_pool);
scenario.raycast(buffer.camera_rays, buffer.camera_ray_masks, p_thread_pool);
- buffer.sort_rays();
+ buffer.sort_rays(-p_cam_transform.basis.get_axis(2), p_cam_orthogonal);
buffer.update_mips();
}
diff --git a/modules/raycast/raycast_occlusion_cull.h b/modules/raycast/raycast_occlusion_cull.h
index 85710a790c..cc87a6342c 100644
--- a/modules/raycast/raycast_occlusion_cull.h
+++ b/modules/raycast/raycast_occlusion_cull.h
@@ -51,15 +51,20 @@ public:
Size2i packs_size;
struct CameraRayThreadData {
- CameraMatrix camera_matrix;
- Transform3D camera_transform;
- bool camera_orthogonal;
int thread_count;
+ float z_near;
+ float z_far;
+ Vector3 camera_dir;
+ Vector3 camera_pos;
+ Vector3 pixel_corner;
+ Vector3 pixel_u_interp;
+ Vector3 pixel_v_interp;
+ bool camera_orthogonal;
Size2i buffer_size;
};
- void _camera_rays_threaded(uint32_t p_thread, CameraRayThreadData *p_data);
- void _generate_camera_rays(const Transform3D &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, int p_from, int p_to);
+ void _camera_rays_threaded(uint32_t p_thread, const CameraRayThreadData *p_data);
+ void _generate_camera_rays(const CameraRayThreadData *p_data, int p_from, int p_to);
public:
LocalVector<RayPacket> camera_rays;
@@ -68,7 +73,7 @@ public:
virtual void clear() override;
virtual void resize(const Size2i &p_size) override;
- void sort_rays();
+ void sort_rays(const Vector3 &p_camera_dir, bool p_orthogonal);
void update_camera_rays(const Transform3D &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, ThreadWorkPool &p_thread_work_pool);
};
diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml
index 9c84974ff6..2ae2e53b02 100644
--- a/modules/regex/doc_classes/RegEx.xml
+++ b/modules/regex/doc_classes/RegEx.xml
@@ -116,6 +116,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/modules/regex/doc_classes/RegExMatch.xml b/modules/regex/doc_classes/RegExMatch.xml
index 3cde2836cc..20680b41fd 100644
--- a/modules/regex/doc_classes/RegExMatch.xml
+++ b/modules/regex/doc_classes/RegExMatch.xml
@@ -51,6 +51,4 @@
The source string used with the search pattern to find this matching result.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/stb_vorbis/SCsub b/modules/stb_vorbis/SCsub
deleted file mode 100644
index 8fddb23dc8..0000000000
--- a/modules/stb_vorbis/SCsub
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python
-
-Import("env")
-Import("env_modules")
-
-env_stb_vorbis = env_modules.Clone()
-
-# Thirdparty source files
-
-thirdparty_obj = []
-
-thirdparty_sources = ["#thirdparty/misc/stb_vorbis.c"]
-
-env_thirdparty = env_stb_vorbis.Clone()
-env_thirdparty.disable_warnings()
-env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
-env.modules_sources += thirdparty_obj
-
-# Godot source files
-
-module_obj = []
-
-env_stb_vorbis.add_source_files(module_obj, "*.cpp")
-env.modules_sources += module_obj
-
-# Needed to force rebuilding the module files when the thirdparty library is updated.
-env.Depends(module_obj, thirdparty_obj)
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
deleted file mode 100644
index 768b419348..0000000000
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
+++ /dev/null
@@ -1,270 +0,0 @@
-/*************************************************************************/
-/* audio_stream_ogg_vorbis.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "audio_stream_ogg_vorbis.h"
-
-#include "core/io/file_access.h"
-
-void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_frames) {
- ERR_FAIL_COND(!active);
-
- int todo = p_frames;
-
- int start_buffer = 0;
-
- while (todo && active) {
- float *buffer = (float *)p_buffer;
- if (start_buffer > 0) {
- buffer = (buffer + start_buffer * 2);
- }
- int mixed = stb_vorbis_get_samples_float_interleaved(ogg_stream, 2, buffer, todo * 2);
- if (vorbis_stream->channels == 1 && mixed > 0) {
- //mix mono to stereo
- for (int i = start_buffer; i < start_buffer + mixed; i++) {
- p_buffer[i].r = p_buffer[i].l;
- }
- }
- todo -= mixed;
- frames_mixed += mixed;
-
- if (todo) {
- //end of file!
- bool is_not_empty = mixed > 0 || stb_vorbis_stream_length_in_samples(ogg_stream) > 0;
- if (vorbis_stream->loop && is_not_empty) {
- //loop
- seek(vorbis_stream->loop_offset);
- loops++;
- // we still have buffer to fill, start from this element in the next iteration.
- start_buffer = p_frames - todo;
- } else {
- for (int i = p_frames - todo; i < p_frames; i++) {
- p_buffer[i] = AudioFrame(0, 0);
- }
- active = false;
- todo = 0;
- }
- }
- }
-}
-
-float AudioStreamPlaybackOGGVorbis::get_stream_sampling_rate() {
- return vorbis_stream->sample_rate;
-}
-
-void AudioStreamPlaybackOGGVorbis::start(float p_from_pos) {
- active = true;
- seek(p_from_pos);
- loops = 0;
- _begin_resample();
-}
-
-void AudioStreamPlaybackOGGVorbis::stop() {
- active = false;
-}
-
-bool AudioStreamPlaybackOGGVorbis::is_playing() const {
- return active;
-}
-
-int AudioStreamPlaybackOGGVorbis::get_loop_count() const {
- return loops;
-}
-
-float AudioStreamPlaybackOGGVorbis::get_playback_position() const {
- return float(frames_mixed) / vorbis_stream->sample_rate;
-}
-
-void AudioStreamPlaybackOGGVorbis::seek(float p_time) {
- if (!active) {
- return;
- }
-
- if (p_time >= vorbis_stream->get_length()) {
- p_time = 0;
- }
- frames_mixed = uint32_t(vorbis_stream->sample_rate * p_time);
-
- stb_vorbis_seek(ogg_stream, frames_mixed);
-}
-
-AudioStreamPlaybackOGGVorbis::~AudioStreamPlaybackOGGVorbis() {
- if (ogg_alloc.alloc_buffer) {
- stb_vorbis_close(ogg_stream);
- memfree(ogg_alloc.alloc_buffer);
- }
-}
-
-Ref<AudioStreamPlayback> AudioStreamOGGVorbis::instance_playback() {
- Ref<AudioStreamPlaybackOGGVorbis> ovs;
-
- ERR_FAIL_COND_V_MSG(data == nullptr, ovs,
- "This AudioStreamOGGVorbis does not have an audio file assigned "
- "to it. AudioStreamOGGVorbis should not be created from the "
- "inspector or with `.new()`. Instead, load an audio file.");
-
- ovs.instantiate();
- ovs->vorbis_stream = Ref<AudioStreamOGGVorbis>(this);
- ovs->ogg_alloc.alloc_buffer = (char *)memalloc(decode_mem_size);
- ovs->ogg_alloc.alloc_buffer_length_in_bytes = decode_mem_size;
- ovs->frames_mixed = 0;
- ovs->active = false;
- ovs->loops = 0;
- int error;
- ovs->ogg_stream = stb_vorbis_open_memory((const unsigned char *)data, data_len, &error, &ovs->ogg_alloc);
- if (!ovs->ogg_stream) {
- memfree(ovs->ogg_alloc.alloc_buffer);
- ovs->ogg_alloc.alloc_buffer = nullptr;
- ERR_FAIL_COND_V(!ovs->ogg_stream, Ref<AudioStreamPlaybackOGGVorbis>());
- }
-
- return ovs;
-}
-
-String AudioStreamOGGVorbis::get_stream_name() const {
- return ""; //return stream_name;
-}
-
-void AudioStreamOGGVorbis::clear_data() {
- if (data) {
- memfree(data);
- data = nullptr;
- data_len = 0;
- }
-}
-
-void AudioStreamOGGVorbis::set_data(const Vector<uint8_t> &p_data) {
- int src_data_len = p_data.size();
- uint32_t alloc_try = 1024;
- Vector<char> alloc_mem;
- char *w;
- stb_vorbis *ogg_stream = nullptr;
- stb_vorbis_alloc ogg_alloc;
-
- // Vorbis comments may be up to UINT32_MAX, but that's arguably pretty rare.
- // Let's go with 2^30 so we don't risk going out of bounds.
- const uint32_t MAX_TEST_MEM = 1 << 30;
-
- while (alloc_try < MAX_TEST_MEM) {
- alloc_mem.resize(alloc_try);
- w = alloc_mem.ptrw();
-
- ogg_alloc.alloc_buffer = w;
- ogg_alloc.alloc_buffer_length_in_bytes = alloc_try;
-
- const uint8_t *src_datar = p_data.ptr();
-
- int error;
- ogg_stream = stb_vorbis_open_memory((const unsigned char *)src_datar, src_data_len, &error, &ogg_alloc);
-
- if (!ogg_stream && error == VORBIS_outofmem) {
- alloc_try *= 2;
- } else {
- ERR_FAIL_COND(alloc_try == MAX_TEST_MEM);
- ERR_FAIL_COND(ogg_stream == nullptr);
-
- stb_vorbis_info info = stb_vorbis_get_info(ogg_stream);
-
- channels = info.channels;
- sample_rate = info.sample_rate;
- decode_mem_size = alloc_try;
- //does this work? (it's less mem..)
- //decode_mem_size = ogg_alloc.alloc_buffer_length_in_bytes + info.setup_memory_required + info.temp_memory_required + info.max_frame_size;
-
- length = stb_vorbis_stream_length_in_seconds(ogg_stream);
- stb_vorbis_close(ogg_stream);
-
- // free any existing data
- clear_data();
-
- data = memalloc(src_data_len);
- memcpy(data, src_datar, src_data_len);
- data_len = src_data_len;
-
- break;
- }
- }
-
- ERR_FAIL_COND_MSG(alloc_try == MAX_TEST_MEM, vformat("Couldn't set vorbis data even with an alloc buffer of %d bytes, report bug.", MAX_TEST_MEM));
-}
-
-Vector<uint8_t> AudioStreamOGGVorbis::get_data() const {
- Vector<uint8_t> vdata;
-
- if (data_len && data) {
- vdata.resize(data_len);
- {
- uint8_t *w = vdata.ptrw();
- memcpy(w, data, data_len);
- }
- }
-
- return vdata;
-}
-
-void AudioStreamOGGVorbis::set_loop(bool p_enable) {
- loop = p_enable;
-}
-
-bool AudioStreamOGGVorbis::has_loop() const {
- return loop;
-}
-
-void AudioStreamOGGVorbis::set_loop_offset(float p_seconds) {
- loop_offset = p_seconds;
-}
-
-float AudioStreamOGGVorbis::get_loop_offset() const {
- return loop_offset;
-}
-
-float AudioStreamOGGVorbis::get_length() const {
- return length;
-}
-
-void AudioStreamOGGVorbis::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_data", "data"), &AudioStreamOGGVorbis::set_data);
- ClassDB::bind_method(D_METHOD("get_data"), &AudioStreamOGGVorbis::get_data);
-
- ClassDB::bind_method(D_METHOD("set_loop", "enable"), &AudioStreamOGGVorbis::set_loop);
- ClassDB::bind_method(D_METHOD("has_loop"), &AudioStreamOGGVorbis::has_loop);
-
- ClassDB::bind_method(D_METHOD("set_loop_offset", "seconds"), &AudioStreamOGGVorbis::set_loop_offset);
- ClassDB::bind_method(D_METHOD("get_loop_offset"), &AudioStreamOGGVorbis::get_loop_offset);
-
- ADD_PROPERTY(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_data", "get_data");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "loop_offset"), "set_loop_offset", "get_loop_offset");
-}
-
-AudioStreamOGGVorbis::AudioStreamOGGVorbis() {}
-
-AudioStreamOGGVorbis::~AudioStreamOGGVorbis() {
- clear_data();
-}
diff --git a/modules/stb_vorbis/config.py b/modules/stb_vorbis/config.py
deleted file mode 100644
index 1eb0a8cf33..0000000000
--- a/modules/stb_vorbis/config.py
+++ /dev/null
@@ -1,16 +0,0 @@
-def can_build(env, platform):
- return True
-
-
-def configure(env):
- pass
-
-
-def get_doc_classes():
- return [
- "AudioStreamOGGVorbis",
- ]
-
-
-def get_doc_path():
- return "doc_classes"
diff --git a/modules/stb_vorbis/register_types.h b/modules/stb_vorbis/register_types.h
deleted file mode 100644
index d36d87606c..0000000000
--- a/modules/stb_vorbis/register_types.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*************************************************************************/
-/* register_types.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef STB_VORBIS_REGISTER_TYPES_H
-#define STB_VORBIS_REGISTER_TYPES_H
-
-void register_stb_vorbis_types();
-void unregister_stb_vorbis_types();
-
-#endif // STB_VORBIS_REGISTER_TYPES_H
diff --git a/modules/text_server_adv/SCsub b/modules/text_server_adv/SCsub
index d06c5c2f14..7cd4db6f67 100644
--- a/modules/text_server_adv/SCsub
+++ b/modules/text_server_adv/SCsub
@@ -15,7 +15,7 @@ def make_icu_data(target, source, env):
g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
g.write("/* (C) 2016 and later: Unicode, Inc. and others. */\n")
- g.write("/* License & terms of use: http://www.unicode.org/copyright.html */\n")
+ g.write("/* License & terms of use: https://www.unicode.org/copyright.html */\n")
g.write("#ifndef _ICU_DATA_H\n")
g.write("#define _ICU_DATA_H\n")
g.write('#include "unicode/utypes.h"\n')
@@ -38,7 +38,8 @@ def make_icu_data(target, source, env):
# Thirdparty source files
thirdparty_obj = []
-freetype_enabled = env.module_check_dependencies("text_server_adv", ["freetype"])
+freetype_enabled = env.module_check_dependencies("text_server_adv", ["freetype"], True)
+msdngen_enabled = env.module_check_dependencies("text_server_adv", ["msdfgen"], True)
if env["builtin_harfbuzz"]:
env_harfbuzz = env_modules.Clone()
@@ -63,6 +64,7 @@ if env["builtin_harfbuzz"]:
#'src/hb-gobject-structs.cc',
"src/hb-icu.cc",
"src/hb-map.cc",
+ "src/hb-ms-feature-ranges.cc",
"src/hb-number.cc",
"src/hb-ot-cff1-table.cc",
"src/hb-ot-cff2-table.cc",
@@ -509,6 +511,13 @@ env_text_server_adv.Append(
]
)
+if msdngen_enabled:
+ env_text_server_adv.Append(
+ CPPPATH=[
+ "#thirdparty/msdfgen",
+ ]
+ )
+
if freetype_enabled:
env_text_server_adv.Append(
CPPPATH=[
diff --git a/modules/text_server_adv/bitmap_font_adv.cpp b/modules/text_server_adv/bitmap_font_adv.cpp
deleted file mode 100644
index df7b42eac6..0000000000
--- a/modules/text_server_adv/bitmap_font_adv.cpp
+++ /dev/null
@@ -1,585 +0,0 @@
-/*************************************************************************/
-/* bitmap_font_adv.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "bitmap_font_adv.h"
-
-/*************************************************************************/
-/* hb_bmp_font_t HarfBuzz Bitmap font interface */
-/*************************************************************************/
-
-struct hb_bmp_font_t {
- BitmapFontDataAdvanced *face = nullptr;
- float font_size = 0.0;
- bool unref = false; /* Whether to destroy bm_face when done. */
-};
-
-static hb_bmp_font_t *_hb_bmp_font_create(BitmapFontDataAdvanced *p_face, float p_font_size, bool p_unref) {
- hb_bmp_font_t *bm_font = reinterpret_cast<hb_bmp_font_t *>(calloc(1, sizeof(hb_bmp_font_t)));
-
- if (!bm_font) {
- return nullptr;
- }
-
- bm_font->face = p_face;
- bm_font->font_size = p_font_size;
- bm_font->unref = p_unref;
-
- return bm_font;
-}
-
-static void _hb_bmp_font_destroy(void *data) {
- hb_bmp_font_t *bm_font = reinterpret_cast<hb_bmp_font_t *>(data);
- free(bm_font);
-}
-
-static hb_bool_t hb_bmp_get_nominal_glyph(hb_font_t *font, void *font_data, hb_codepoint_t unicode, hb_codepoint_t *glyph, void *user_data) {
- const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(font_data);
-
- if (!bm_font->face) {
- return false;
- }
-
- if (!bm_font->face->has_char(unicode)) {
- if (bm_font->face->has_char(0xF000u + unicode)) {
- *glyph = 0xF000u + unicode;
- return true;
- } else {
- return false;
- }
- }
-
- *glyph = unicode;
- return true;
-}
-
-static hb_position_t hb_bmp_get_glyph_h_advance(hb_font_t *font, void *font_data, hb_codepoint_t glyph, void *user_data) {
- const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(font_data);
-
- if (!bm_font->face) {
- return 0;
- }
-
- if (!bm_font->face->has_char(glyph)) {
- return 0;
- }
-
- return bm_font->face->get_advance(glyph, bm_font->font_size).x * 64;
-}
-
-static hb_position_t hb_bmp_get_glyph_v_advance(hb_font_t *font, void *font_data, hb_codepoint_t glyph, void *user_data) {
- const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(font_data);
-
- if (!bm_font->face) {
- return 0;
- }
-
- if (!bm_font->face->has_char(glyph)) {
- return 0;
- }
-
- return -bm_font->face->get_advance(glyph, bm_font->font_size).y * 64;
-}
-
-static hb_position_t hb_bmp_get_glyph_h_kerning(hb_font_t *font, void *font_data, hb_codepoint_t left_glyph, hb_codepoint_t right_glyph, void *user_data) {
- const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(font_data);
-
- if (!bm_font->face) {
- return 0;
- }
-
- if (!bm_font->face->has_char(left_glyph)) {
- return 0;
- }
-
- if (!bm_font->face->has_char(right_glyph)) {
- return 0;
- }
-
- return bm_font->face->get_kerning(left_glyph, right_glyph, bm_font->font_size).x * 64;
-}
-
-static hb_bool_t hb_bmp_get_glyph_v_origin(hb_font_t *font, void *font_data, hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y, void *user_data) {
- const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(font_data);
-
- if (!bm_font->face) {
- return false;
- }
-
- if (!bm_font->face->has_char(glyph)) {
- return false;
- }
-
- *x = bm_font->face->get_advance(glyph, bm_font->font_size).x * 32;
- *y = bm_font->face->get_ascent(bm_font->font_size) * 64;
-
- return true;
-}
-
-static hb_bool_t hb_bmp_get_glyph_extents(hb_font_t *font, void *font_data, hb_codepoint_t glyph, hb_glyph_extents_t *extents, void *user_data) {
- const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(font_data);
-
- if (!bm_font->face) {
- return false;
- }
-
- if (!bm_font->face->has_char(glyph)) {
- return false;
- }
-
- extents->x_bearing = 0;
- extents->y_bearing = 0;
- extents->width = bm_font->face->get_size(glyph, bm_font->font_size).x * 64;
- extents->height = bm_font->face->get_size(glyph, bm_font->font_size).y * 64;
-
- return true;
-}
-
-static hb_bool_t hb_bmp_get_font_h_extents(hb_font_t *font, void *font_data, hb_font_extents_t *metrics, void *user_data) {
- const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(font_data);
-
- if (!bm_font->face) {
- return false;
- }
-
- metrics->ascender = bm_font->face->get_ascent(bm_font->font_size);
- metrics->descender = bm_font->face->get_descent(bm_font->font_size);
- metrics->line_gap = 0;
-
- return true;
-}
-
-static hb_font_funcs_t *funcs = nullptr;
-void hb_bmp_create_font_funcs() {
- funcs = hb_font_funcs_create();
-
- hb_font_funcs_set_font_h_extents_func(funcs, hb_bmp_get_font_h_extents, nullptr, nullptr);
- //hb_font_funcs_set_font_v_extents_func (funcs, hb_bmp_get_font_v_extents, nullptr, nullptr);
- hb_font_funcs_set_nominal_glyph_func(funcs, hb_bmp_get_nominal_glyph, nullptr, nullptr);
- //hb_font_funcs_set_variation_glyph_func (funcs, hb_bmp_get_variation_glyph, nullptr, nullptr);
- hb_font_funcs_set_glyph_h_advance_func(funcs, hb_bmp_get_glyph_h_advance, nullptr, nullptr);
- hb_font_funcs_set_glyph_v_advance_func(funcs, hb_bmp_get_glyph_v_advance, nullptr, nullptr);
- //hb_font_funcs_set_glyph_h_origin_func(funcs, hb_bmp_get_glyph_h_origin, nullptr, nullptr);
- hb_font_funcs_set_glyph_v_origin_func(funcs, hb_bmp_get_glyph_v_origin, nullptr, nullptr);
- hb_font_funcs_set_glyph_h_kerning_func(funcs, hb_bmp_get_glyph_h_kerning, nullptr, nullptr);
- //hb_font_funcs_set_glyph_v_kerning_func (funcs, hb_bmp_get_glyph_v_kerning, nullptr, nullptr);
- hb_font_funcs_set_glyph_extents_func(funcs, hb_bmp_get_glyph_extents, nullptr, nullptr);
- //hb_font_funcs_set_glyph_contour_point_func (funcs, hb_bmp_get_glyph_contour_point, nullptr, nullptr);
- //hb_font_funcs_set_glyph_name_func (funcs, hb_bmp_get_glyph_name, nullptr, nullptr);
- //hb_font_funcs_set_glyph_from_name_func (funcs, hb_bmp_get_glyph_from_name, nullptr, nullptr);
-
- hb_font_funcs_make_immutable(funcs);
-}
-
-void hb_bmp_free_font_funcs() {
- if (funcs != nullptr) {
- hb_font_funcs_destroy(funcs);
- funcs = nullptr;
- }
-}
-
-static void _hb_bmp_font_set_funcs(hb_font_t *p_font, BitmapFontDataAdvanced *p_face, int p_size, bool p_unref) {
- hb_font_set_funcs(p_font, funcs, _hb_bmp_font_create(p_face, p_size, p_unref), _hb_bmp_font_destroy);
-}
-
-hb_font_t *hb_bmp_font_create(BitmapFontDataAdvanced *p_face, int p_size, hb_destroy_func_t p_destroy) {
- hb_font_t *font;
- hb_face_t *face = hb_face_create(nullptr, 0);
-
- font = hb_font_create(face);
- hb_face_destroy(face);
- _hb_bmp_font_set_funcs(font, p_face, p_size, false);
- return font;
-}
-
-/*************************************************************************/
-/* BitmapFontDataAdvanced */
-/*************************************************************************/
-
-Error BitmapFontDataAdvanced::load_from_file(const String &p_filename, int p_base_size) {
- _THREAD_SAFE_METHOD_
- //fnt format used by angelcode bmfont
- //http://www.angelcode.com/products/bmfont/
-
- FileAccess *f = FileAccess::open(p_filename, FileAccess::READ);
- ERR_FAIL_COND_V_MSG(!f, ERR_FILE_NOT_FOUND, "Can't open font: " + p_filename + ".");
-
- while (true) {
- String line = f->get_line();
-
- int delimiter = line.find(" ");
- String type = line.substr(0, delimiter);
- int pos = delimiter + 1;
- Map<String, String> keys;
-
- while (pos < line.size() && line[pos] == ' ') {
- pos++;
- }
-
- while (pos < line.size()) {
- int eq = line.find("=", pos);
- if (eq == -1) {
- break;
- }
- String key = line.substr(pos, eq - pos);
- int end = -1;
- String value;
- if (line[eq + 1] == '"') {
- end = line.find("\"", eq + 2);
- if (end == -1) {
- break;
- }
- value = line.substr(eq + 2, end - 1 - eq - 1);
- pos = end + 1;
- } else {
- end = line.find(" ", eq + 1);
- if (end == -1) {
- end = line.size();
- }
- value = line.substr(eq + 1, end - eq);
- pos = end;
- }
-
- while (pos < line.size() && line[pos] == ' ') {
- pos++;
- }
-
- keys[key] = value;
- }
-
- if (type == "info") {
- if (keys.has("size")) {
- base_size = keys["size"].to_int();
- }
- } else if (type == "common") {
- if (keys.has("lineHeight")) {
- height = keys["lineHeight"].to_int();
- }
- if (keys.has("base")) {
- ascent = keys["base"].to_int();
- }
- } else if (type == "page") {
- if (keys.has("file")) {
- String base_dir = p_filename.get_base_dir();
- String file = base_dir.plus_file(keys["file"]);
- if (RenderingServer::get_singleton() != nullptr) {
- Ref<Texture2D> tex = ResourceLoader::load(file);
- if (tex.is_null()) {
- ERR_PRINT("Can't load font texture!");
- } else {
- ERR_FAIL_COND_V_MSG(tex.is_null(), ERR_FILE_CANT_READ, "It's not a reference to a valid Texture object.");
- textures.push_back(tex);
- }
- }
- }
- } else if (type == "char") {
- Character c;
- char32_t idx = 0;
- if (keys.has("id")) {
- idx = keys["id"].to_int();
- }
- if (keys.has("x")) {
- c.rect.position.x = keys["x"].to_int();
- }
- if (keys.has("y")) {
- c.rect.position.y = keys["y"].to_int();
- }
- if (keys.has("width")) {
- c.rect.size.width = keys["width"].to_int();
- }
- if (keys.has("height")) {
- c.rect.size.height = keys["height"].to_int();
- }
- if (keys.has("xoffset")) {
- c.align.x = keys["xoffset"].to_int();
- }
- if (keys.has("yoffset")) {
- c.align.y = keys["yoffset"].to_int();
- }
- if (keys.has("page")) {
- c.texture_idx = keys["page"].to_int();
- }
- if (keys.has("xadvance")) {
- c.advance.x = keys["xadvance"].to_int();
- }
- if (keys.has("yadvance")) {
- c.advance.x = keys["yadvance"].to_int();
- }
- if (c.advance.x < 0) {
- c.advance.x = c.rect.size.width + 1;
- }
- if (c.advance.y < 0) {
- c.advance.y = c.rect.size.height + 1;
- }
- char_map[idx] = c;
- } else if (type == "kerning") {
- KerningPairKey kpk;
- float k = 0.0;
- if (keys.has("first")) {
- kpk.A = keys["first"].to_int();
- }
- if (keys.has("second")) {
- kpk.B = keys["second"].to_int();
- }
- if (keys.has("amount")) {
- k = keys["amount"].to_int();
- }
- kerning_map[kpk] = k;
- }
-
- if (f->eof_reached()) {
- break;
- }
- }
- if (base_size == 0) {
- base_size = height;
- }
-
- if (hb_handle) {
- hb_font_destroy(hb_handle);
- }
- hb_handle = hb_bmp_font_create(this, base_size, nullptr);
- valid = true;
-
- memdelete(f);
- return OK;
-}
-
-Error BitmapFontDataAdvanced::bitmap_new(float p_height, float p_ascent, int p_base_size) {
- height = p_height;
- ascent = p_ascent;
-
- base_size = p_base_size;
- if (base_size == 0) {
- base_size = height;
- }
-
- char_map.clear();
- textures.clear();
- kerning_map.clear();
- if (hb_handle) {
- hb_font_destroy(hb_handle);
- }
- hb_handle = hb_bmp_font_create(this, base_size, nullptr);
- valid = true;
-
- return OK;
-}
-
-void BitmapFontDataAdvanced::bitmap_add_texture(const Ref<Texture> &p_texture) {
- ERR_FAIL_COND(!valid);
- ERR_FAIL_COND_MSG(p_texture.is_null(), "It's not a reference to a valid Texture object.");
-
- textures.push_back(p_texture);
-}
-
-void BitmapFontDataAdvanced::bitmap_add_char(char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) {
- ERR_FAIL_COND(!valid);
-
- Character chr;
- chr.rect = p_rect;
- chr.texture_idx = p_texture_idx;
- if (p_advance < 0) {
- chr.advance.x = chr.rect.size.x;
- } else {
- chr.advance.x = p_advance;
- }
- chr.align = p_align;
- char_map[p_char] = chr;
-}
-
-void BitmapFontDataAdvanced::bitmap_add_kerning_pair(char32_t p_A, char32_t p_B, int p_kerning) {
- ERR_FAIL_COND(!valid);
-
- KerningPairKey kpk;
- kpk.A = p_A;
- kpk.B = p_B;
-
- if (p_kerning == 0 && kerning_map.has(kpk)) {
- kerning_map.erase(kpk);
- } else {
- kerning_map[kpk] = p_kerning;
- }
-}
-
-float BitmapFontDataAdvanced::get_height(int p_size) const {
- ERR_FAIL_COND_V(!valid, 0.f);
- return height * (float(p_size) / float(base_size));
-}
-
-float BitmapFontDataAdvanced::get_ascent(int p_size) const {
- ERR_FAIL_COND_V(!valid, 0.f);
- return ascent * (float(p_size) / float(base_size));
-}
-
-float BitmapFontDataAdvanced::get_descent(int p_size) const {
- ERR_FAIL_COND_V(!valid, 0.f);
- return (height - ascent) * (float(p_size) / float(base_size));
-}
-
-float BitmapFontDataAdvanced::get_underline_position(int p_size) const {
- ERR_FAIL_COND_V(!valid, 0.f);
- return 2 * (float(p_size) / float(base_size));
-}
-
-float BitmapFontDataAdvanced::get_underline_thickness(int p_size) const {
- ERR_FAIL_COND_V(!valid, 0.f);
- return 1 * (float(p_size) / float(base_size));
-}
-
-void BitmapFontDataAdvanced::set_distance_field_hint(bool p_distance_field) {
- distance_field_hint = p_distance_field;
-}
-
-bool BitmapFontDataAdvanced::get_distance_field_hint() const {
- return distance_field_hint;
-}
-
-float BitmapFontDataAdvanced::get_base_size() const {
- return base_size;
-}
-
-hb_font_t *BitmapFontDataAdvanced::get_hb_handle(int p_size) {
- _THREAD_SAFE_METHOD_
- ERR_FAIL_COND_V(!valid, nullptr);
- return hb_handle;
-}
-
-bool BitmapFontDataAdvanced::has_char(char32_t p_char) const {
- _THREAD_SAFE_METHOD_
- ERR_FAIL_COND_V(!valid, false);
- return char_map.has(p_char);
-}
-
-String BitmapFontDataAdvanced::get_supported_chars() const {
- _THREAD_SAFE_METHOD_
- ERR_FAIL_COND_V(!valid, String());
- String chars;
- const uint32_t *k = nullptr;
- while ((k = char_map.next(k))) {
- chars += char32_t(*k);
- }
- return chars;
-}
-
-Vector2 BitmapFontDataAdvanced::get_advance(uint32_t p_char, int p_size) const {
- _THREAD_SAFE_METHOD_
- ERR_FAIL_COND_V(!valid, Vector2());
- const Character *c = char_map.getptr(p_char);
- ERR_FAIL_COND_V(c == nullptr, Vector2());
-
- return c->advance * (float(p_size) / float(base_size));
-}
-
-Vector2 BitmapFontDataAdvanced::get_align(uint32_t p_char, int p_size) const {
- _THREAD_SAFE_METHOD_
- ERR_FAIL_COND_V(!valid, Vector2());
- const Character *c = char_map.getptr(p_char);
- ERR_FAIL_COND_V(c == nullptr, Vector2());
-
- return c->align * (float(p_size) / float(base_size));
-}
-
-Vector2 BitmapFontDataAdvanced::get_size(uint32_t p_char, int p_size) const {
- _THREAD_SAFE_METHOD_
- ERR_FAIL_COND_V(!valid, Vector2());
- const Character *c = char_map.getptr(p_char);
- ERR_FAIL_COND_V(c == nullptr, Vector2());
-
- return c->rect.size * (float(p_size) / float(base_size));
-}
-
-float BitmapFontDataAdvanced::get_font_scale(int p_size) const {
- return float(p_size) / float(base_size);
-}
-
-Vector2 BitmapFontDataAdvanced::get_kerning(uint32_t p_char, uint32_t p_next, int p_size) const {
- _THREAD_SAFE_METHOD_
- ERR_FAIL_COND_V(!valid, Vector2());
- KerningPairKey kpk;
- kpk.A = p_char;
- kpk.B = p_next;
-
- const Map<KerningPairKey, int>::Element *E = kerning_map.find(kpk);
- if (E) {
- return Vector2(-E->get() * (float(p_size) / float(base_size)), 0.f);
- } else {
- return Vector2();
- }
-}
-
-Vector2 BitmapFontDataAdvanced::draw_glyph(RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- _THREAD_SAFE_METHOD_
- if (p_index == 0) {
- return Vector2();
- }
- ERR_FAIL_COND_V(!valid, Vector2());
- const Character *c = char_map.getptr(p_index);
-
- ERR_FAIL_COND_V(c == nullptr, Vector2());
- ERR_FAIL_COND_V(c->texture_idx < -1 || c->texture_idx >= textures.size(), Vector2());
- if (c->texture_idx != -1) {
- Point2i cpos = p_pos;
- cpos += (c->align + Vector2(0, -ascent)) * (float(p_size) / float(base_size));
- Size2i csize = c->rect.size * (float(p_size) / float(base_size));
- if (RenderingServer::get_singleton() != nullptr) {
- //if (distance_field_hint) { // Not implemented.
- // RenderingServer::get_singleton()->canvas_item_set_distance_field_mode(p_canvas, true);
- //}
- RenderingServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas, Rect2(cpos, csize), textures[c->texture_idx]->get_rid(), c->rect, p_color, false, false);
- //if (distance_field_hint) {
- // RenderingServer::get_singleton()->canvas_item_set_distance_field_mode(p_canvas, false);
- //}
- }
- }
-
- return c->advance * (float(p_size) / float(base_size));
-}
-
-Vector2 BitmapFontDataAdvanced::draw_glyph_outline(RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- _THREAD_SAFE_METHOD_
- if (p_index == 0) {
- return Vector2();
- }
- ERR_FAIL_COND_V(!valid, Vector2());
- const Character *c = char_map.getptr(p_index);
-
- ERR_FAIL_COND_V(c == nullptr, Vector2());
- ERR_FAIL_COND_V(c->texture_idx < -1 || c->texture_idx >= textures.size(), Vector2());
-
- // Not supported, return advance for compatibility.
-
- return c->advance * (float(p_size) / float(base_size));
-}
-
-BitmapFontDataAdvanced::~BitmapFontDataAdvanced() {
- if (hb_handle) {
- hb_font_destroy(hb_handle);
- }
-}
diff --git a/modules/text_server_adv/bitmap_font_adv.h b/modules/text_server_adv/bitmap_font_adv.h
deleted file mode 100644
index 7b620021e1..0000000000
--- a/modules/text_server_adv/bitmap_font_adv.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*************************************************************************/
-/* bitmap_font_adv.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef BITMAP_FONT_ADV_H
-#define BITMAP_FONT_ADV_H
-
-#include "font_adv.h"
-
-void hb_bmp_create_font_funcs();
-void hb_bmp_free_font_funcs();
-
-struct BitmapFontDataAdvanced : public FontDataAdvanced {
- _THREAD_SAFE_CLASS_
-
-private:
- Vector<Ref<Texture2D>> textures;
-
- struct Character {
- int texture_idx = 0;
- Rect2 rect;
- Vector2 align;
- Vector2 advance = Vector2(-1, -1);
- };
-
- struct KerningPairKey {
- union {
- struct {
- uint32_t A, B;
- };
-
- uint64_t pair = 0;
- };
-
- _FORCE_INLINE_ bool operator<(const KerningPairKey &p_r) const { return pair < p_r.pair; }
- };
-
- HashMap<uint32_t, Character> char_map;
- Map<KerningPairKey, int> kerning_map;
- hb_font_t *hb_handle = nullptr;
-
- float height = 0.f;
- float ascent = 0.f;
- int base_size = 0;
- bool distance_field_hint = false;
-
-public:
- virtual void clear_cache() override{};
-
- virtual Error load_from_file(const String &p_filename, int p_base_size) override;
- virtual Error bitmap_new(float p_height, float p_ascent, int p_base_size) override;
-
- virtual void bitmap_add_texture(const Ref<Texture> &p_texture) override;
- virtual void bitmap_add_char(char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) override;
- virtual void bitmap_add_kerning_pair(char32_t p_A, char32_t p_B, int p_kerning) override;
-
- virtual float get_height(int p_size) const override;
- virtual float get_ascent(int p_size) const override;
- virtual float get_descent(int p_size) const override;
-
- virtual float get_underline_position(int p_size) const override;
- virtual float get_underline_thickness(int p_size) const override;
-
- virtual void set_antialiased(bool p_antialiased) override{};
- virtual bool get_antialiased() const override { return false; };
-
- virtual void set_hinting(TextServer::Hinting p_hinting) override{};
- virtual TextServer::Hinting get_hinting() const override { return TextServer::HINTING_NONE; };
-
- virtual void set_distance_field_hint(bool p_distance_field) override;
- virtual bool get_distance_field_hint() const override;
-
- virtual void set_force_autohinter(bool p_enabeld) override{};
- virtual bool get_force_autohinter() const override { return false; };
-
- virtual bool has_outline() const override { return false; };
- virtual float get_base_size() const override;
- virtual float get_font_scale(int p_size) const override;
-
- virtual hb_font_t *get_hb_handle(int p_size) override;
-
- virtual bool has_char(char32_t p_char) const override;
- virtual String get_supported_chars() const override;
-
- virtual Vector2 get_advance(uint32_t p_char, int p_size) const override;
- Vector2 get_align(uint32_t p_char, int p_size) const;
- Vector2 get_size(uint32_t p_char, int p_size) const;
- virtual Vector2 get_kerning(uint32_t p_char, uint32_t p_next, int p_size) const override;
- virtual uint32_t get_glyph_index(char32_t p_char, char32_t p_variation_selector) const override { return (uint32_t)p_char; };
-
- virtual Vector2 draw_glyph(RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const override;
- virtual Vector2 draw_glyph_outline(RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const override;
-
- virtual ~BitmapFontDataAdvanced();
-};
-
-#endif // BITMAP_FONT_ADV_H
diff --git a/modules/text_server_adv/dynamic_font_adv.cpp b/modules/text_server_adv/dynamic_font_adv.cpp
deleted file mode 100644
index 62eedebb59..0000000000
--- a/modules/text_server_adv/dynamic_font_adv.cpp
+++ /dev/null
@@ -1,1030 +0,0 @@
-/*************************************************************************/
-/* dynamic_font_adv.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "dynamic_font_adv.h"
-
-#ifdef MODULE_FREETYPE_ENABLED
-
-#include FT_STROKER_H
-#include FT_ADVANCES_H
-#include FT_MULTIPLE_MASTERS_H
-
-DynamicFontDataAdvanced::DataAtSize *DynamicFontDataAdvanced::get_data_for_size(int p_size, int p_outline_size) {
- ERR_FAIL_COND_V(!valid, nullptr);
- ERR_FAIL_COND_V(p_size < 0 || p_size > UINT16_MAX, nullptr);
- ERR_FAIL_COND_V(p_outline_size < 0 || p_outline_size > UINT16_MAX, nullptr);
-
- CacheID id;
- id.size = p_size;
- id.outline_size = p_outline_size;
-
- DataAtSize *fds = nullptr;
- Map<CacheID, DataAtSize *>::Element *E = nullptr;
- if (p_outline_size != 0) {
- E = size_cache_outline.find(id);
- } else {
- E = size_cache.find(id);
- }
-
- if (E != nullptr) {
- fds = E->get();
- } else {
- if (font_mem == nullptr && font_path != String()) {
- if (!font_mem_cache.is_empty()) {
- font_mem = font_mem_cache.ptr();
- font_mem_size = font_mem_cache.size();
- } else {
- FileAccess *f = FileAccess::open(font_path, FileAccess::READ);
- if (!f) {
- ERR_FAIL_V_MSG(nullptr, "Cannot open font file '" + font_path + "'.");
- }
-
- uint64_t len = f->get_length();
- font_mem_cache.resize(len);
- f->get_buffer(font_mem_cache.ptrw(), len);
- font_mem = font_mem_cache.ptr();
- font_mem_size = len;
- f->close();
- }
- }
-
- int error = 0;
- fds = memnew(DataAtSize);
- if (font_mem) {
- memset(&fds->stream, 0, sizeof(FT_StreamRec));
- fds->stream.base = (unsigned char *)font_mem;
- fds->stream.size = font_mem_size;
- fds->stream.pos = 0;
-
- FT_Open_Args fargs;
- memset(&fargs, 0, sizeof(FT_Open_Args));
- fargs.memory_base = (unsigned char *)font_mem;
- fargs.memory_size = font_mem_size;
- fargs.flags = FT_OPEN_MEMORY;
- fargs.stream = &fds->stream;
- error = FT_Open_Face(library, &fargs, 0, &fds->face);
-
- } else {
- memdelete(fds);
- ERR_FAIL_V_MSG(nullptr, "DynamicFont uninitialized.");
- }
-
- if (error == FT_Err_Unknown_File_Format) {
- memdelete(fds);
- ERR_FAIL_V_MSG(nullptr, "Unknown font format.");
- } else if (error) {
- memdelete(fds);
- ERR_FAIL_V_MSG(nullptr, "Error loading font.");
- }
-
- oversampling = TS->font_get_oversampling();
-
- if (FT_HAS_COLOR(fds->face) && fds->face->num_fixed_sizes > 0) {
- int best_match = 0;
- int diff = ABS(p_size - ((int64_t)fds->face->available_sizes[0].width));
- fds->scale_color_font = float(p_size * oversampling) / fds->face->available_sizes[0].width;
- for (int i = 1; i < fds->face->num_fixed_sizes; i++) {
- int ndiff = ABS(p_size - ((int64_t)fds->face->available_sizes[i].width));
- if (ndiff < diff) {
- best_match = i;
- diff = ndiff;
- fds->scale_color_font = float(p_size * oversampling) / fds->face->available_sizes[i].width;
- }
- }
- FT_Select_Size(fds->face, best_match);
- } else {
- FT_Set_Pixel_Sizes(fds->face, 0, p_size * oversampling);
- }
-
- fds->size = p_size;
- fds->ascent = (fds->face->size->metrics.ascender / 64.0) / oversampling * fds->scale_color_font;
- fds->descent = (-fds->face->size->metrics.descender / 64.0) / oversampling * fds->scale_color_font;
- fds->underline_position = (-FT_MulFix(fds->face->underline_position, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font;
- fds->underline_thickness = (FT_MulFix(fds->face->underline_thickness, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font;
-
- //Load os2 TTF table
- fds->os2 = (TT_OS2 *)FT_Get_Sfnt_Table(fds->face, FT_SFNT_OS2);
-
- fds->hb_handle = hb_ft_font_create(fds->face, nullptr);
- if (fds->hb_handle == nullptr) {
- memdelete(fds);
- ERR_FAIL_V_MSG(nullptr, "Error loading HB font.");
- }
-
- if (p_outline_size != 0) {
- size_cache_outline[id] = fds;
- } else {
- size_cache[id] = fds;
- }
-
- // Write variations.
- if (fds->face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS) {
- FT_MM_Var *amaster;
-
- FT_Get_MM_Var(fds->face, &amaster);
-
- Vector<hb_variation_t> hb_vars;
- Vector<FT_Fixed> coords;
- coords.resize(amaster->num_axis);
-
- FT_Get_Var_Design_Coordinates(fds->face, coords.size(), coords.ptrw());
-
- for (FT_UInt i = 0; i < amaster->num_axis; i++) {
- hb_variation_t var;
-
- // Reset to default.
- var.tag = amaster->axis[i].tag;
- var.value = (double)amaster->axis[i].def / 65536.f;
- coords.write[i] = amaster->axis[i].def;
-
- if (variations.has(var.tag)) {
- var.value = variations[var.tag];
- coords.write[i] = CLAMP(variations[var.tag] * 65536.f, amaster->axis[i].minimum, amaster->axis[i].maximum);
- }
-
- hb_vars.push_back(var);
- }
-
- FT_Set_Var_Design_Coordinates(fds->face, coords.size(), coords.ptrw());
- hb_font_set_variations(fds->hb_handle, hb_vars.is_empty() ? nullptr : &hb_vars[0], hb_vars.size());
-
- FT_Done_MM_Var(library, amaster);
- }
- }
- return fds;
-}
-
-Dictionary DynamicFontDataAdvanced::get_variation_list() const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(base_size);
- if (fds == nullptr) {
- return Dictionary();
- }
-
- Dictionary ret;
- // Read variations.
- if (fds->face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS) {
- FT_MM_Var *amaster;
-
- FT_Get_MM_Var(fds->face, &amaster);
-
- for (FT_UInt i = 0; i < amaster->num_axis; i++) {
- ret[(int32_t)amaster->axis[i].tag] = Vector3i(amaster->axis[i].minimum / 65536, amaster->axis[i].maximum / 65536, amaster->axis[i].def / 65536);
- }
-
- FT_Done_MM_Var(library, amaster);
- }
- return ret;
-}
-
-void DynamicFontDataAdvanced::set_variation(const String &p_name, double p_value) {
- _THREAD_SAFE_METHOD_
- int32_t tag = TS->name_to_tag(p_name);
- if (!variations.has(tag) || (variations[tag] != p_value)) {
- variations[tag] = p_value;
- clear_cache();
- }
-}
-
-double DynamicFontDataAdvanced::get_variation(const String &p_name) const {
- _THREAD_SAFE_METHOD_
- int32_t tag = TS->name_to_tag(p_name);
- if (!variations.has(tag)) {
- return 0.f;
- }
- return variations[tag];
-}
-
-Dictionary DynamicFontDataAdvanced::get_feature_list() const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(base_size);
- if (fds == nullptr) {
- return Dictionary();
- }
-
- Dictionary out;
- // Read feature flags.
- unsigned int count = hb_ot_layout_table_get_feature_tags(hb_font_get_face(fds->hb_handle), HB_OT_TAG_GSUB, 0, nullptr, nullptr);
- if (count != 0) {
- hb_tag_t *feature_tags = (hb_tag_t *)memalloc(count * sizeof(hb_tag_t));
- hb_ot_layout_table_get_feature_tags(hb_font_get_face(fds->hb_handle), HB_OT_TAG_GSUB, 0, &count, feature_tags);
- for (unsigned int i = 0; i < count; i++) {
- out[feature_tags[i]] = 1;
- }
- memfree(feature_tags);
- }
- count = hb_ot_layout_table_get_feature_tags(hb_font_get_face(fds->hb_handle), HB_OT_TAG_GPOS, 0, nullptr, nullptr);
- if (count != 0) {
- hb_tag_t *feature_tags = (hb_tag_t *)memalloc(count * sizeof(hb_tag_t));
- hb_ot_layout_table_get_feature_tags(hb_font_get_face(fds->hb_handle), HB_OT_TAG_GPOS, 0, &count, feature_tags);
- for (unsigned int i = 0; i < count; i++) {
- out[feature_tags[i]] = 1;
- }
- memfree(feature_tags);
- }
-
- return out;
-}
-
-DynamicFontDataAdvanced::TexturePosition DynamicFontDataAdvanced::find_texture_pos_for_glyph(DynamicFontDataAdvanced::DataAtSize *p_data, int p_color_size, Image::Format p_image_format, int p_width, int p_height) {
- TexturePosition ret;
- ret.index = -1;
-
- int mw = p_width;
- int mh = p_height;
-
- for (int i = 0; i < p_data->textures.size(); i++) {
- const CharTexture &ct = p_data->textures[i];
-
- if (RenderingServer::get_singleton() != nullptr) {
- if (ct.texture->get_format() != p_image_format) {
- continue;
- }
- }
-
- if (mw > ct.texture_size || mh > ct.texture_size) { //too big for this texture
- continue;
- }
-
- ret.y = 0x7FFFFFFF;
- ret.x = 0;
-
- for (int j = 0; j < ct.texture_size - mw; j++) {
- int max_y = 0;
-
- for (int k = j; k < j + mw; k++) {
- int y = ct.offsets[k];
- if (y > max_y) {
- max_y = y;
- }
- }
-
- if (max_y < ret.y) {
- ret.y = max_y;
- ret.x = j;
- }
- }
-
- if (ret.y == 0x7FFFFFFF || ret.y + mh > ct.texture_size) {
- continue; //fail, could not fit it here
- }
-
- ret.index = i;
- break;
- }
-
- if (ret.index == -1) {
- //could not find texture to fit, create one
- ret.x = 0;
- ret.y = 0;
-
- int texsize = MAX(p_data->size * oversampling * 8, 256);
- if (mw > texsize) {
- texsize = mw; //special case, adapt to it?
- }
- if (mh > texsize) {
- texsize = mh; //special case, adapt to it?
- }
-
- texsize = next_power_of_2(texsize);
-
- texsize = MIN(texsize, 4096);
-
- CharTexture tex;
- tex.texture_size = texsize;
- tex.imgdata.resize(texsize * texsize * p_color_size); //grayscale alpha
-
- {
- //zero texture
- uint8_t *w = tex.imgdata.ptrw();
- ERR_FAIL_COND_V(texsize * texsize * p_color_size > tex.imgdata.size(), ret);
- // Initialize the texture to all-white pixels to prevent artifacts when the
- // font is displayed at a non-default scale with filtering enabled.
- if (p_color_size == 2) {
- for (int i = 0; i < texsize * texsize * p_color_size; i += 2) { // FORMAT_LA8
- w[i + 0] = 255;
- w[i + 1] = 0;
- }
- } else if (p_color_size == 4) {
- for (int i = 0; i < texsize * texsize * p_color_size; i += 4) { // FORMAT_RGBA8
- w[i + 0] = 255;
- w[i + 1] = 255;
- w[i + 2] = 255;
- w[i + 3] = 0;
- }
- } else {
- ERR_FAIL_V(ret);
- }
- }
- tex.offsets.resize(texsize);
- for (int i = 0; i < texsize; i++) { //zero offsets
- tex.offsets.write[i] = 0;
- }
-
- p_data->textures.push_back(tex);
- ret.index = p_data->textures.size() - 1;
- }
-
- return ret;
-}
-
-DynamicFontDataAdvanced::Character DynamicFontDataAdvanced::Character::not_found() {
- Character ch;
- return ch;
-}
-
-DynamicFontDataAdvanced::Character DynamicFontDataAdvanced::bitmap_to_character(DynamicFontDataAdvanced::DataAtSize *p_data, FT_Bitmap bitmap, int yofs, int xofs, const Vector2 &advance) {
- int w = bitmap.width;
- int h = bitmap.rows;
-
- int mw = w + rect_margin * 2;
- int mh = h + rect_margin * 2;
-
- ERR_FAIL_COND_V(mw > 4096, Character::not_found());
- ERR_FAIL_COND_V(mh > 4096, Character::not_found());
-
- int color_size = bitmap.pixel_mode == FT_PIXEL_MODE_BGRA ? 4 : 2;
- Image::Format require_format = color_size == 4 ? Image::FORMAT_RGBA8 : Image::FORMAT_LA8;
-
- TexturePosition tex_pos = find_texture_pos_for_glyph(p_data, color_size, require_format, mw, mh);
- ERR_FAIL_COND_V(tex_pos.index < 0, Character::not_found());
-
- //fit character in char texture
-
- CharTexture &tex = p_data->textures.write[tex_pos.index];
-
- {
- uint8_t *wr = tex.imgdata.ptrw();
-
- for (int i = 0; i < h; i++) {
- for (int j = 0; j < w; j++) {
- int ofs = ((i + tex_pos.y + rect_margin) * tex.texture_size + j + tex_pos.x + rect_margin) * color_size;
- ERR_FAIL_COND_V(ofs >= tex.imgdata.size(), Character::not_found());
- switch (bitmap.pixel_mode) {
- case FT_PIXEL_MODE_MONO: {
- int byte = i * bitmap.pitch + (j >> 3);
- int bit = 1 << (7 - (j % 8));
- wr[ofs + 0] = 255; //grayscale as 1
- wr[ofs + 1] = (bitmap.buffer[byte] & bit) ? 255 : 0;
- } break;
- case FT_PIXEL_MODE_GRAY:
- wr[ofs + 0] = 255; //grayscale as 1
- wr[ofs + 1] = bitmap.buffer[i * bitmap.pitch + j];
- break;
- case FT_PIXEL_MODE_BGRA: {
- int ofs_color = i * bitmap.pitch + (j << 2);
- wr[ofs + 2] = bitmap.buffer[ofs_color + 0];
- wr[ofs + 1] = bitmap.buffer[ofs_color + 1];
- wr[ofs + 0] = bitmap.buffer[ofs_color + 2];
- wr[ofs + 3] = bitmap.buffer[ofs_color + 3];
- } break;
- // TODO: FT_PIXEL_MODE_LCD
- default:
- ERR_FAIL_V_MSG(Character::not_found(), "Font uses unsupported pixel format: " + itos(bitmap.pixel_mode) + ".");
- break;
- }
- }
- }
- }
-
- //blit to image and texture
- {
- if (RenderingServer::get_singleton() != nullptr) {
- Ref<Image> img = memnew(Image(tex.texture_size, tex.texture_size, 0, require_format, tex.imgdata));
-
- if (tex.texture.is_null()) {
- tex.texture.instantiate();
- tex.texture->create_from_image(img);
- } else {
- tex.texture->update(img); //update
- }
- }
- }
-
- // update height array
- for (int k = tex_pos.x; k < tex_pos.x + mw; k++) {
- tex.offsets.write[k] = tex_pos.y + mh;
- }
-
- Character chr;
- chr.align = (Vector2(xofs, -yofs) * p_data->scale_color_font / oversampling).round();
- chr.advance = (advance * p_data->scale_color_font / oversampling).round();
- chr.texture_idx = tex_pos.index;
- chr.found = true;
-
- chr.rect_uv = Rect2(tex_pos.x + rect_margin, tex_pos.y + rect_margin, w, h);
- chr.rect = chr.rect_uv;
- chr.rect.position /= oversampling;
- chr.rect.size *= (p_data->scale_color_font / oversampling);
- return chr;
-}
-
-void DynamicFontDataAdvanced::update_glyph(int p_size, uint32_t p_index) {
- DataAtSize *fds = get_data_for_size(p_size, false);
- ERR_FAIL_COND(fds == nullptr);
-
- if (fds->glyph_map.has(p_index)) {
- return;
- }
-
- Character character = Character::not_found();
- FT_GlyphSlot slot = fds->face->glyph;
-
- if (p_index == 0) {
- fds->glyph_map[p_index] = character;
- return;
- }
-
- int ft_hinting;
- switch (hinting) {
- case TextServer::HINTING_NONE:
- ft_hinting = FT_LOAD_NO_HINTING;
- break;
- case TextServer::HINTING_LIGHT:
- ft_hinting = FT_LOAD_TARGET_LIGHT;
- break;
- default:
- ft_hinting = FT_LOAD_TARGET_NORMAL;
- break;
- }
-
- FT_Fixed v, h;
- FT_Get_Advance(fds->face, p_index, FT_HAS_COLOR(fds->face) ? FT_LOAD_COLOR : FT_LOAD_DEFAULT | (force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0) | ft_hinting, &h);
- FT_Get_Advance(fds->face, p_index, FT_HAS_COLOR(fds->face) ? FT_LOAD_COLOR : FT_LOAD_DEFAULT | (force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0) | ft_hinting | FT_LOAD_VERTICAL_LAYOUT, &v);
-
- int error = FT_Load_Glyph(fds->face, p_index, FT_HAS_COLOR(fds->face) ? FT_LOAD_COLOR : FT_LOAD_DEFAULT | (force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0) | ft_hinting);
- if (error) {
- fds->glyph_map[p_index] = character;
- return;
- }
-
- error = FT_Render_Glyph(fds->face->glyph, antialiased ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO);
- if (!error) {
- character = bitmap_to_character(fds, slot->bitmap, slot->bitmap_top, slot->bitmap_left, Vector2((h + (1 << 9)) >> 10, (v + (1 << 9)) >> 10) / 64.0);
- }
-
- fds->glyph_map[p_index] = character;
-}
-
-void DynamicFontDataAdvanced::update_glyph_outline(int p_size, int p_outline_size, uint32_t p_index) {
- DataAtSize *fds = get_data_for_size(p_size, p_outline_size);
- ERR_FAIL_COND(fds == nullptr);
-
- if (fds->glyph_map.has(p_index)) {
- return;
- }
-
- Character character = Character::not_found();
- if (p_index == 0) {
- fds->glyph_map[p_index] = character;
- return;
- }
-
- int error = FT_Load_Glyph(fds->face, p_index, FT_LOAD_NO_BITMAP | (force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0));
- if (error) {
- fds->glyph_map[p_index] = character;
- return;
- }
-
- FT_Stroker stroker;
- if (FT_Stroker_New(library, &stroker) != 0) {
- fds->glyph_map[p_index] = character;
- return;
- }
-
- FT_Stroker_Set(stroker, (int)(p_outline_size * oversampling * 64.0), FT_STROKER_LINECAP_BUTT, FT_STROKER_LINEJOIN_ROUND, 0);
- FT_Glyph glyph;
- FT_BitmapGlyph glyph_bitmap;
-
- if (FT_Get_Glyph(fds->face->glyph, &glyph) != 0) {
- goto cleanup_stroker;
- }
- if (FT_Glyph_Stroke(&glyph, stroker, 1) != 0) {
- goto cleanup_glyph;
- }
- if (FT_Glyph_To_Bitmap(&glyph, antialiased ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO, nullptr, 1) != 0) {
- goto cleanup_glyph;
- }
-
- glyph_bitmap = (FT_BitmapGlyph)glyph;
- character = bitmap_to_character(fds, glyph_bitmap->bitmap, glyph_bitmap->top, glyph_bitmap->left, Vector2());
-
-cleanup_glyph:
- FT_Done_Glyph(glyph);
-cleanup_stroker:
- FT_Stroker_Done(stroker);
-
- fds->glyph_map[p_index] = character;
-}
-
-void DynamicFontDataAdvanced::clear_cache() {
- _THREAD_SAFE_METHOD_
- for (Map<CacheID, DataAtSize *>::Element *E = size_cache.front(); E; E = E->next()) {
- memdelete(E->get());
- }
- size_cache.clear();
- for (Map<CacheID, DataAtSize *>::Element *E = size_cache_outline.front(); E; E = E->next()) {
- memdelete(E->get());
- }
- size_cache_outline.clear();
-}
-
-Error DynamicFontDataAdvanced::load_from_file(const String &p_filename, int p_base_size) {
- _THREAD_SAFE_METHOD_
- if (library == nullptr) {
- int error = FT_Init_FreeType(&library);
- ERR_FAIL_COND_V_MSG(error != 0, ERR_CANT_CREATE, "Error initializing FreeType.");
- }
- clear_cache();
-
- font_path = p_filename;
- base_size = p_base_size;
-
- valid = true;
- DataAtSize *fds = get_data_for_size(base_size); // load base size.
- if (fds == nullptr) {
- valid = false;
- ERR_FAIL_V(ERR_CANT_CREATE);
- }
-
- return OK;
-}
-
-Error DynamicFontDataAdvanced::load_from_memory(const uint8_t *p_data, size_t p_size, int p_base_size) {
- _THREAD_SAFE_METHOD_
- if (library == nullptr) {
- int error = FT_Init_FreeType(&library);
- ERR_FAIL_COND_V_MSG(error != 0, ERR_CANT_CREATE, "Error initializing FreeType.");
- }
- clear_cache();
-
- font_mem = p_data;
- font_mem_size = p_size;
- base_size = p_base_size;
-
- valid = true;
- DataAtSize *fds = get_data_for_size(base_size); // load base size.
- if (fds == nullptr) {
- valid = false;
- ERR_FAIL_V(ERR_CANT_CREATE);
- }
-
- return OK;
-}
-
-float DynamicFontDataAdvanced::get_height(int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, 0.f);
- return fds->ascent + fds->descent;
-}
-
-float DynamicFontDataAdvanced::get_ascent(int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, 0.f);
- return fds->ascent;
-}
-
-float DynamicFontDataAdvanced::get_descent(int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, 0.f);
- return fds->descent;
-}
-
-float DynamicFontDataAdvanced::get_underline_position(int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, 0.f);
- return fds->underline_position;
-}
-
-float DynamicFontDataAdvanced::get_underline_thickness(int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, 0.f);
- return fds->underline_thickness;
-}
-
-bool DynamicFontDataAdvanced::is_script_supported(uint32_t p_script) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(base_size);
- ERR_FAIL_COND_V(fds == nullptr, false);
-
- unsigned int count = hb_ot_layout_table_get_script_tags(hb_font_get_face(fds->hb_handle), HB_OT_TAG_GSUB, 0, nullptr, nullptr);
- if (count != 0) {
- hb_tag_t *script_tags = (hb_tag_t *)memalloc(count * sizeof(hb_tag_t));
- hb_ot_layout_table_get_script_tags(hb_font_get_face(fds->hb_handle), HB_OT_TAG_GSUB, 0, &count, script_tags);
- for (unsigned int i = 0; i < count; i++) {
- if (p_script == script_tags[i]) {
- memfree(script_tags);
- return true;
- }
- }
- memfree(script_tags);
- }
- count = hb_ot_layout_table_get_script_tags(hb_font_get_face(fds->hb_handle), HB_OT_TAG_GPOS, 0, nullptr, nullptr);
- if (count != 0) {
- hb_tag_t *script_tags = (hb_tag_t *)memalloc(count * sizeof(hb_tag_t));
- hb_ot_layout_table_get_script_tags(hb_font_get_face(fds->hb_handle), HB_OT_TAG_GPOS, 0, &count, script_tags);
- for (unsigned int i = 0; i < count; i++) {
- if (p_script == script_tags[i]) {
- memfree(script_tags);
- return true;
- }
- }
- memfree(script_tags);
- }
-
- if (!fds->os2) {
- return false;
- }
-
- switch (p_script) {
- case HB_SCRIPT_COMMON:
- return (fds->os2->ulUnicodeRange1 & 1L << 4) || (fds->os2->ulUnicodeRange1 & 1L << 5) || (fds->os2->ulUnicodeRange1 & 1L << 6) || (fds->os2->ulUnicodeRange1 & 1L << 31) || (fds->os2->ulUnicodeRange2 & 1L << 0) || (fds->os2->ulUnicodeRange2 & 1L << 1) || (fds->os2->ulUnicodeRange2 & 1L << 2) || (fds->os2->ulUnicodeRange2 & 1L << 3) || (fds->os2->ulUnicodeRange2 & 1L << 4) || (fds->os2->ulUnicodeRange2 & 1L << 5) || (fds->os2->ulUnicodeRange2 & 1L << 6) || (fds->os2->ulUnicodeRange2 & 1L << 7) || (fds->os2->ulUnicodeRange2 & 1L << 8) || (fds->os2->ulUnicodeRange2 & 1L << 9) || (fds->os2->ulUnicodeRange2 & 1L << 10) || (fds->os2->ulUnicodeRange2 & 1L << 11) || (fds->os2->ulUnicodeRange2 & 1L << 12) || (fds->os2->ulUnicodeRange2 & 1L << 13) || (fds->os2->ulUnicodeRange2 & 1L << 14) || (fds->os2->ulUnicodeRange2 & 1L << 15) || (fds->os2->ulUnicodeRange2 & 1L << 30) || (fds->os2->ulUnicodeRange3 & 1L << 0) || (fds->os2->ulUnicodeRange3 & 1L << 1) || (fds->os2->ulUnicodeRange3 & 1L << 2) || (fds->os2->ulUnicodeRange3 & 1L << 4) || (fds->os2->ulUnicodeRange3 & 1L << 5) || (fds->os2->ulUnicodeRange3 & 1L << 18) || (fds->os2->ulUnicodeRange3 & 1L << 24) || (fds->os2->ulUnicodeRange3 & 1L << 25) || (fds->os2->ulUnicodeRange3 & 1L << 26) || (fds->os2->ulUnicodeRange3 & 1L << 27) || (fds->os2->ulUnicodeRange3 & 1L << 28) || (fds->os2->ulUnicodeRange4 & 1L << 3) || (fds->os2->ulUnicodeRange4 & 1L << 6) || (fds->os2->ulUnicodeRange4 & 1L << 15) || (fds->os2->ulUnicodeRange4 & 1L << 23) || (fds->os2->ulUnicodeRange4 & 1L << 24) || (fds->os2->ulUnicodeRange4 & 1L << 26);
- case HB_SCRIPT_LATIN:
- return (fds->os2->ulUnicodeRange1 & 1L << 0) || (fds->os2->ulUnicodeRange1 & 1L << 1) || (fds->os2->ulUnicodeRange1 & 1L << 2) || (fds->os2->ulUnicodeRange1 & 1L << 3) || (fds->os2->ulUnicodeRange1 & 1L << 29);
- case HB_SCRIPT_GREEK:
- return (fds->os2->ulUnicodeRange1 & 1L << 7) || (fds->os2->ulUnicodeRange1 & 1L << 30);
- case HB_SCRIPT_COPTIC:
- return (fds->os2->ulUnicodeRange1 & 1L << 8);
- case HB_SCRIPT_CYRILLIC:
- return (fds->os2->ulUnicodeRange1 & 1L << 9);
- case HB_SCRIPT_ARMENIAN:
- return (fds->os2->ulUnicodeRange1 & 1L << 10);
- case HB_SCRIPT_HEBREW:
- return (fds->os2->ulUnicodeRange1 & 1L << 11);
- case HB_SCRIPT_VAI:
- return (fds->os2->ulUnicodeRange1 & 1L << 12);
- case HB_SCRIPT_ARABIC:
- return (fds->os2->ulUnicodeRange1 & 1L << 13) || (fds->os2->ulUnicodeRange2 & 1L << 31) || (fds->os2->ulUnicodeRange3 & 1L << 3);
- case HB_SCRIPT_NKO:
- return (fds->os2->ulUnicodeRange1 & 1L << 14);
- case HB_SCRIPT_DEVANAGARI:
- return (fds->os2->ulUnicodeRange1 & 1L << 15);
- case HB_SCRIPT_BENGALI:
- return (fds->os2->ulUnicodeRange1 & 1L << 16);
- case HB_SCRIPT_GURMUKHI:
- return (fds->os2->ulUnicodeRange1 & 1L << 17);
- case HB_SCRIPT_GUJARATI:
- return (fds->os2->ulUnicodeRange1 & 1L << 18);
- case HB_SCRIPT_ORIYA:
- return (fds->os2->ulUnicodeRange1 & 1L << 19);
- case HB_SCRIPT_TAMIL:
- return (fds->os2->ulUnicodeRange1 & 1L << 20);
- case HB_SCRIPT_TELUGU:
- return (fds->os2->ulUnicodeRange1 & 1L << 21);
- case HB_SCRIPT_KANNADA:
- return (fds->os2->ulUnicodeRange1 & 1L << 22);
- case HB_SCRIPT_MALAYALAM:
- return (fds->os2->ulUnicodeRange1 & 1L << 23);
- case HB_SCRIPT_THAI:
- return (fds->os2->ulUnicodeRange1 & 1L << 24);
- case HB_SCRIPT_LAO:
- return (fds->os2->ulUnicodeRange1 & 1L << 25);
- case HB_SCRIPT_GEORGIAN:
- return (fds->os2->ulUnicodeRange1 & 1L << 26);
- case HB_SCRIPT_BALINESE:
- return (fds->os2->ulUnicodeRange1 & 1L << 27);
- case HB_SCRIPT_HANGUL:
- return (fds->os2->ulUnicodeRange1 & 1L << 28) || (fds->os2->ulUnicodeRange2 & 1L << 20) || (fds->os2->ulUnicodeRange2 & 1L << 24);
- case HB_SCRIPT_HAN:
- return (fds->os2->ulUnicodeRange2 & 1L << 21) || (fds->os2->ulUnicodeRange2 & 1L << 22) || (fds->os2->ulUnicodeRange2 & 1L << 23) || (fds->os2->ulUnicodeRange2 & 1L << 26) || (fds->os2->ulUnicodeRange2 & 1L << 27) || (fds->os2->ulUnicodeRange2 & 1L << 29);
- case HB_SCRIPT_HIRAGANA:
- return (fds->os2->ulUnicodeRange2 & 1L << 17);
- case HB_SCRIPT_KATAKANA:
- return (fds->os2->ulUnicodeRange2 & 1L << 18);
- case HB_SCRIPT_BOPOMOFO:
- return (fds->os2->ulUnicodeRange2 & 1L << 19);
- case HB_SCRIPT_TIBETAN:
- return (fds->os2->ulUnicodeRange3 & 1L << 6);
- case HB_SCRIPT_SYRIAC:
- return (fds->os2->ulUnicodeRange3 & 1L << 7);
- case HB_SCRIPT_THAANA:
- return (fds->os2->ulUnicodeRange3 & 1L << 8);
- case HB_SCRIPT_SINHALA:
- return (fds->os2->ulUnicodeRange3 & 1L << 9);
- case HB_SCRIPT_MYANMAR:
- return (fds->os2->ulUnicodeRange3 & 1L << 10);
- case HB_SCRIPT_ETHIOPIC:
- return (fds->os2->ulUnicodeRange3 & 1L << 11);
- case HB_SCRIPT_CHEROKEE:
- return (fds->os2->ulUnicodeRange3 & 1L << 12);
- case HB_SCRIPT_CANADIAN_SYLLABICS:
- return (fds->os2->ulUnicodeRange3 & 1L << 13);
- case HB_SCRIPT_OGHAM:
- return (fds->os2->ulUnicodeRange3 & 1L << 14);
- case HB_SCRIPT_RUNIC:
- return (fds->os2->ulUnicodeRange3 & 1L << 15);
- case HB_SCRIPT_KHMER:
- return (fds->os2->ulUnicodeRange3 & 1L << 16);
- case HB_SCRIPT_MONGOLIAN:
- return (fds->os2->ulUnicodeRange3 & 1L << 17);
- case HB_SCRIPT_YI:
- return (fds->os2->ulUnicodeRange3 & 1L << 19);
- case HB_SCRIPT_HANUNOO:
- case HB_SCRIPT_TAGBANWA:
- case HB_SCRIPT_BUHID:
- case HB_SCRIPT_TAGALOG:
- return (fds->os2->ulUnicodeRange3 & 1L << 20);
- case HB_SCRIPT_OLD_ITALIC:
- return (fds->os2->ulUnicodeRange3 & 1L << 21);
- case HB_SCRIPT_GOTHIC:
- return (fds->os2->ulUnicodeRange3 & 1L << 22);
- case HB_SCRIPT_DESERET:
- return (fds->os2->ulUnicodeRange3 & 1L << 23);
- case HB_SCRIPT_LIMBU:
- return (fds->os2->ulUnicodeRange3 & 1L << 29);
- case HB_SCRIPT_TAI_LE:
- return (fds->os2->ulUnicodeRange3 & 1L << 30);
- case HB_SCRIPT_NEW_TAI_LUE:
- return (fds->os2->ulUnicodeRange3 & 1L << 31);
- case HB_SCRIPT_BUGINESE:
- return (fds->os2->ulUnicodeRange4 & 1L << 0);
- case HB_SCRIPT_GLAGOLITIC:
- return (fds->os2->ulUnicodeRange4 & 1L << 1);
- case HB_SCRIPT_TIFINAGH:
- return (fds->os2->ulUnicodeRange4 & 1L << 2);
- case HB_SCRIPT_SYLOTI_NAGRI:
- return (fds->os2->ulUnicodeRange4 & 1L << 4);
- case HB_SCRIPT_LINEAR_B:
- return (fds->os2->ulUnicodeRange4 & 1L << 5);
- case HB_SCRIPT_UGARITIC:
- return (fds->os2->ulUnicodeRange4 & 1L << 7);
- case HB_SCRIPT_OLD_PERSIAN:
- return (fds->os2->ulUnicodeRange4 & 1L << 8);
- case HB_SCRIPT_SHAVIAN:
- return (fds->os2->ulUnicodeRange4 & 1L << 9);
- case HB_SCRIPT_OSMANYA:
- return (fds->os2->ulUnicodeRange4 & 1L << 10);
- case HB_SCRIPT_CYPRIOT:
- return (fds->os2->ulUnicodeRange4 & 1L << 11);
- case HB_SCRIPT_KHAROSHTHI:
- return (fds->os2->ulUnicodeRange4 & 1L << 12);
- case HB_SCRIPT_TAI_VIET:
- return (fds->os2->ulUnicodeRange4 & 1L << 13);
- case HB_SCRIPT_CUNEIFORM:
- return (fds->os2->ulUnicodeRange4 & 1L << 14);
- case HB_SCRIPT_SUNDANESE:
- return (fds->os2->ulUnicodeRange4 & 1L << 16);
- case HB_SCRIPT_LEPCHA:
- return (fds->os2->ulUnicodeRange4 & 1L << 17);
- case HB_SCRIPT_OL_CHIKI:
- return (fds->os2->ulUnicodeRange4 & 1L << 18);
- case HB_SCRIPT_SAURASHTRA:
- return (fds->os2->ulUnicodeRange4 & 1L << 19);
- case HB_SCRIPT_KAYAH_LI:
- return (fds->os2->ulUnicodeRange4 & 1L << 20);
- case HB_SCRIPT_REJANG:
- return (fds->os2->ulUnicodeRange4 & 1L << 21);
- case HB_SCRIPT_CHAM:
- return (fds->os2->ulUnicodeRange4 & 1L << 22);
- case HB_SCRIPT_ANATOLIAN_HIEROGLYPHS:
- return (fds->os2->ulUnicodeRange4 & 1L << 25);
- default:
- return false;
- };
-}
-
-void DynamicFontDataAdvanced::set_antialiased(bool p_antialiased) {
- if (antialiased != p_antialiased) {
- clear_cache();
- antialiased = p_antialiased;
- }
-}
-
-bool DynamicFontDataAdvanced::get_antialiased() const {
- return antialiased;
-}
-
-void DynamicFontDataAdvanced::set_force_autohinter(bool p_enabled) {
- if (force_autohinter != p_enabled) {
- clear_cache();
- force_autohinter = p_enabled;
- }
-}
-
-bool DynamicFontDataAdvanced::get_force_autohinter() const {
- return force_autohinter;
-}
-
-void DynamicFontDataAdvanced::set_hinting(TextServer::Hinting p_hinting) {
- if (hinting != p_hinting) {
- clear_cache();
- hinting = p_hinting;
- }
-}
-
-TextServer::Hinting DynamicFontDataAdvanced::get_hinting() const {
- return hinting;
-}
-
-bool DynamicFontDataAdvanced::has_outline() const {
- return true;
-}
-
-float DynamicFontDataAdvanced::get_base_size() const {
- return base_size;
-}
-
-String DynamicFontDataAdvanced::get_supported_chars() const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(base_size);
- ERR_FAIL_COND_V(fds == nullptr, String());
-
- String chars;
-
- FT_UInt gindex;
- FT_ULong charcode = FT_Get_First_Char(fds->face, &gindex);
- while (gindex != 0) {
- if (charcode != 0) {
- chars += char32_t(charcode);
- }
- charcode = FT_Get_Next_Char(fds->face, charcode, &gindex);
- }
-
- return chars;
-}
-
-float DynamicFontDataAdvanced::get_font_scale(int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, 1.0f);
-
- return fds->scale_color_font / oversampling;
-}
-
-bool DynamicFontDataAdvanced::has_char(char32_t p_char) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(base_size);
- ERR_FAIL_COND_V(fds == nullptr, false);
-
- const_cast<DynamicFontDataAdvanced *>(this)->update_glyph(base_size, FT_Get_Char_Index(fds->face, p_char));
- Character ch = fds->glyph_map[FT_Get_Char_Index(fds->face, p_char)];
-
- return (ch.found);
-}
-
-hb_font_t *DynamicFontDataAdvanced::get_hb_handle(int p_size) {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, nullptr);
-
- return fds->hb_handle;
-}
-
-uint32_t DynamicFontDataAdvanced::get_glyph_index(char32_t p_char, char32_t p_variation_selector) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(base_size);
- ERR_FAIL_COND_V(fds == nullptr, 0);
-
- if (p_variation_selector == 0x0000) {
- return FT_Get_Char_Index(fds->face, p_char);
- } else {
- return FT_Face_GetCharVariantIndex(fds->face, p_char, p_variation_selector);
- }
-}
-
-Vector2 DynamicFontDataAdvanced::get_advance(uint32_t p_index, int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, Vector2());
-
- const_cast<DynamicFontDataAdvanced *>(this)->update_glyph(p_size, p_index);
- Character ch = fds->glyph_map[p_index];
-
- return ch.advance;
-}
-
-Vector2 DynamicFontDataAdvanced::get_kerning(uint32_t p_char, uint32_t p_next, int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, Vector2());
-
- FT_Vector delta;
- FT_Get_Kerning(fds->face, p_char, p_next, FT_KERNING_DEFAULT, &delta);
- return Vector2(delta.x, delta.y);
-}
-
-Vector2 DynamicFontDataAdvanced::draw_glyph(RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, Vector2());
-
- const_cast<DynamicFontDataAdvanced *>(this)->update_glyph(p_size, p_index);
- Character ch = fds->glyph_map[p_index];
-
- Vector2 advance;
- if (ch.found) {
- ERR_FAIL_COND_V(ch.texture_idx < -1 || ch.texture_idx >= fds->textures.size(), Vector2());
-
- if (ch.texture_idx != -1) {
- Point2i cpos = p_pos;
- cpos += ch.align;
- Color modulate = p_color;
- if (FT_HAS_COLOR(fds->face)) {
- modulate.r = modulate.g = modulate.b = 1.0;
- }
- if (RenderingServer::get_singleton() != nullptr) {
- RID texture = fds->textures[ch.texture_idx].texture->get_rid();
- RenderingServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas, Rect2(cpos, ch.rect.size), texture, ch.rect_uv, modulate, false, false);
- }
- }
-
- advance = ch.advance;
- }
-
- return advance;
-}
-
-Vector2 DynamicFontDataAdvanced::draw_glyph_outline(RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(p_size, p_outline_size);
- ERR_FAIL_COND_V(fds == nullptr, Vector2());
-
- const_cast<DynamicFontDataAdvanced *>(this)->update_glyph_outline(p_size, p_outline_size, p_index);
- Character ch = fds->glyph_map[p_index];
-
- Vector2 advance;
- if (ch.found) {
- ERR_FAIL_COND_V(ch.texture_idx < -1 || ch.texture_idx >= fds->textures.size(), Vector2());
-
- if (ch.texture_idx != -1) {
- Point2i cpos = p_pos;
- cpos += ch.align;
- Color modulate = p_color;
- if (FT_HAS_COLOR(fds->face)) {
- modulate.r = modulate.g = modulate.b = 1.0;
- }
- if (RenderingServer::get_singleton() != nullptr) {
- RID texture = fds->textures[ch.texture_idx].texture->get_rid();
- RenderingServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas, Rect2(cpos, ch.rect.size), texture, ch.rect_uv, modulate, false, false);
- }
- }
-
- advance = ch.advance;
- }
-
- return advance;
-}
-
-bool DynamicFontDataAdvanced::get_glyph_contours(int p_size, uint32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataAdvanced *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, false);
-
- int error = FT_Load_Glyph(fds->face, p_index, FT_LOAD_NO_BITMAP | (force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0));
- ERR_FAIL_COND_V(error, false);
-
- r_points.clear();
- r_contours.clear();
-
- float h = fds->ascent;
- float scale = (1.0 / 64.0) / oversampling * fds->scale_color_font;
- for (short i = 0; i < fds->face->glyph->outline.n_points; i++) {
- r_points.push_back(Vector3(fds->face->glyph->outline.points[i].x * scale, h - fds->face->glyph->outline.points[i].y * scale, FT_CURVE_TAG(fds->face->glyph->outline.tags[i])));
- }
- for (short i = 0; i < fds->face->glyph->outline.n_contours; i++) {
- r_contours.push_back(fds->face->glyph->outline.contours[i]);
- }
- r_orientation = (FT_Outline_Get_Orientation(&fds->face->glyph->outline) == FT_ORIENTATION_FILL_RIGHT);
- return true;
-}
-
-DynamicFontDataAdvanced::~DynamicFontDataAdvanced() {
- clear_cache();
- if (library != nullptr) {
- FT_Done_FreeType(library);
- }
-}
-
-#endif // MODULE_FREETYPE_ENABLED
diff --git a/modules/text_server_adv/dynamic_font_adv.h b/modules/text_server_adv/dynamic_font_adv.h
deleted file mode 100644
index b3f97bb029..0000000000
--- a/modules/text_server_adv/dynamic_font_adv.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/*************************************************************************/
-/* dynamic_font_adv.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef DYNAMIC_FONT_ADV_H
-#define DYNAMIC_FONT_ADV_H
-
-#include "font_adv.h"
-
-#include "modules/modules_enabled.gen.h"
-#ifdef MODULE_FREETYPE_ENABLED
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_TRUETYPE_TABLES_H
-
-#include <hb-ft.h>
-#include <hb-ot.h>
-
-struct DynamicFontDataAdvanced : public FontDataAdvanced {
- _THREAD_SAFE_CLASS_
-
-private:
- struct CharTexture {
- Vector<uint8_t> imgdata;
- int texture_size = 0;
- Vector<int> offsets;
- Ref<ImageTexture> texture;
- };
-
- struct Character {
- bool found = false;
- int texture_idx = 0;
- Rect2 rect;
- Rect2 rect_uv;
- Vector2 align;
- Vector2 advance = Vector2(-1, -1);
-
- static Character not_found();
- };
-
- struct TexturePosition {
- int index = 0;
- int x = 0;
- int y = 0;
- };
-
- struct CacheID {
- union {
- struct {
- uint32_t size : 16;
- uint32_t outline_size : 16;
- };
- uint32_t key = 0;
- };
- bool operator<(CacheID right) const {
- return key < right.key;
- }
- };
-
- struct DataAtSize {
- FT_Face face = nullptr;
- TT_OS2 *os2 = nullptr;
- FT_StreamRec stream;
-
- int size = 0;
- float scale_color_font = 1.f;
- float ascent = 0.0;
- float descent = 0.0;
- float underline_position = 0.0;
- float underline_thickness = 0.0;
-
- Vector<CharTexture> textures;
- HashMap<uint32_t, Character> glyph_map;
-
- hb_font_t *hb_handle = nullptr;
- ~DataAtSize() {
- if (hb_handle != nullptr) {
- hb_font_destroy(hb_handle);
- }
- if (face != nullptr) {
- FT_Done_Face(face);
- }
- }
- };
-
- FT_Library library = nullptr;
-
- // Source data.
- const uint8_t *font_mem = nullptr;
- int font_mem_size = 0;
- String font_path;
- Vector<uint8_t> font_mem_cache;
-
- Map<int32_t, double> variations;
-
- float rect_margin = 1.f;
- int base_size = 16;
- float oversampling = 1.f;
- bool antialiased = true;
- bool force_autohinter = false;
- TextServer::Hinting hinting = TextServer::HINTING_LIGHT;
-
- Map<CacheID, DataAtSize *> size_cache;
- Map<CacheID, DataAtSize *> size_cache_outline;
-
- DataAtSize *get_data_for_size(int p_size, int p_outline_size = 0);
-
- TexturePosition find_texture_pos_for_glyph(DataAtSize *p_data, int p_color_size, Image::Format p_image_format, int p_width, int p_height);
- Character bitmap_to_character(DataAtSize *p_data, FT_Bitmap bitmap, int yofs, int xofs, const Vector2 &advance);
- _FORCE_INLINE_ void update_glyph(int p_size, uint32_t p_index);
- _FORCE_INLINE_ void update_glyph_outline(int p_size, int p_outline_size, uint32_t p_index);
-
-public:
- virtual void clear_cache() override;
-
- virtual Error load_from_file(const String &p_filename, int p_base_size) override;
- virtual Error load_from_memory(const uint8_t *p_data, size_t p_size, int p_base_size) override;
-
- virtual float get_height(int p_size) const override;
- virtual float get_ascent(int p_size) const override;
- virtual float get_descent(int p_size) const override;
-
- virtual Dictionary get_feature_list() const override;
- virtual Dictionary get_variation_list() const override;
-
- virtual void set_variation(const String &p_name, double p_value) override;
- virtual double get_variation(const String &p_name) const override;
-
- virtual float get_underline_position(int p_size) const override;
- virtual float get_underline_thickness(int p_size) const override;
-
- virtual void set_antialiased(bool p_antialiased) override;
- virtual bool get_antialiased() const override;
-
- virtual void set_hinting(TextServer::Hinting p_hinting) override;
- virtual TextServer::Hinting get_hinting() const override;
-
- virtual void set_force_autohinter(bool p_enabled) override;
- virtual bool get_force_autohinter() const override;
-
- virtual void set_distance_field_hint(bool p_distance_field) override{};
- virtual bool get_distance_field_hint() const override { return false; };
-
- virtual bool has_outline() const override;
- virtual float get_base_size() const override;
-
- virtual bool is_script_supported(uint32_t p_script) const override;
-
- virtual bool has_char(char32_t p_char) const override;
- virtual String get_supported_chars() const override;
- virtual float get_font_scale(int p_size) const override;
-
- virtual hb_font_t *get_hb_handle(int p_size) override;
- virtual uint32_t get_glyph_index(char32_t p_char, char32_t p_variation_selector) const override;
- virtual Vector2 get_advance(uint32_t p_index, int p_size) const override;
- virtual Vector2 get_kerning(uint32_t p_char, uint32_t p_next, int p_size) const override;
-
- virtual Vector2 draw_glyph(RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const override;
- virtual Vector2 draw_glyph_outline(RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const override;
-
- virtual bool get_glyph_contours(int p_size, uint32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const override;
-
- virtual ~DynamicFontDataAdvanced() override;
-};
-
-#endif // MODULE_FREETYPE_ENABLED
-
-#endif // DYNAMIC_FONT_ADV_H
diff --git a/modules/text_server_adv/font_adv.h b/modules/text_server_adv/font_adv.h
deleted file mode 100644
index 4fadefc569..0000000000
--- a/modules/text_server_adv/font_adv.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*************************************************************************/
-/* font_adv.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef FONT_ADV_H
-#define FONT_ADV_H
-
-#include "servers/text_server.h"
-
-#include <hb.h>
-
-struct FontDataAdvanced {
- Map<String, bool> lang_support_overrides;
- Map<String, bool> script_support_overrides;
- bool valid = false;
- int spacing_space = 0;
- int spacing_glyph = 0;
-
- virtual void clear_cache() = 0;
-
- virtual Error load_from_file(const String &p_filename, int p_base_size) { return ERR_CANT_CREATE; };
- virtual Error load_from_memory(const uint8_t *p_data, size_t p_size, int p_base_size) { return ERR_CANT_CREATE; };
- virtual Error bitmap_new(float p_height, float p_ascent, int p_base_size) { return ERR_CANT_CREATE; };
-
- virtual void bitmap_add_texture(const Ref<Texture> &p_texture) { ERR_FAIL_MSG("Not supported."); };
- virtual void bitmap_add_char(char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) { ERR_FAIL_MSG("Not supported."); };
- virtual void bitmap_add_kerning_pair(char32_t p_A, char32_t p_B, int p_kerning) { ERR_FAIL_MSG("Not supported."); };
-
- virtual float get_height(int p_size) const = 0;
- virtual float get_ascent(int p_size) const = 0;
- virtual float get_descent(int p_size) const = 0;
-
- virtual Dictionary get_feature_list() const { return Dictionary(); };
- virtual Dictionary get_variation_list() const { return Dictionary(); };
-
- virtual void set_variation(const String &p_name, double p_value){};
- virtual double get_variation(const String &p_name) const { return 0; };
-
- virtual float get_underline_position(int p_size) const = 0;
- virtual float get_underline_thickness(int p_size) const = 0;
-
- virtual int get_spacing_space() const { return spacing_space; };
- virtual void set_spacing_space(int p_value) {
- spacing_space = p_value;
- clear_cache();
- };
-
- virtual int get_spacing_glyph() const { return spacing_glyph; };
- virtual void set_spacing_glyph(int p_value) {
- spacing_glyph = p_value;
- clear_cache();
- };
-
- virtual void set_antialiased(bool p_antialiased) = 0;
- virtual bool get_antialiased() const = 0;
-
- virtual void set_hinting(TextServer::Hinting p_hinting) = 0;
- virtual TextServer::Hinting get_hinting() const = 0;
-
- virtual void set_distance_field_hint(bool p_distance_field) = 0;
- virtual bool get_distance_field_hint() const = 0;
-
- virtual void set_force_autohinter(bool p_enabeld) = 0;
- virtual bool get_force_autohinter() const = 0;
-
- virtual bool has_outline() const = 0;
- virtual float get_base_size() const = 0;
-
- virtual bool is_lang_supported(const String &p_lang) const { return true; };
- virtual bool is_script_supported(uint32_t p_script) const { return true; };
-
- virtual bool has_char(char32_t p_char) const = 0;
- virtual String get_supported_chars() const = 0;
- virtual float get_font_scale(int p_size) const { return 1.0f; };
-
- virtual hb_font_t *get_hb_handle(int p_size) = 0;
- virtual uint32_t get_glyph_index(char32_t p_char, char32_t p_variation_selector) const = 0;
- virtual Vector2 get_advance(uint32_t p_char, int p_size) const = 0;
- virtual Vector2 get_kerning(uint32_t p_char, uint32_t p_next, int p_size) const = 0;
-
- virtual Vector2 draw_glyph(RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const = 0;
- virtual Vector2 draw_glyph_outline(RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const = 0;
-
- virtual bool get_glyph_contours(int p_size, uint32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const { return false; };
-
- virtual ~FontDataAdvanced(){};
-};
-
-#endif // FONT_ADV_H
diff --git a/modules/text_server_adv/script_iterator.cpp b/modules/text_server_adv/script_iterator.cpp
index f9bbd25a5f..d1e849def8 100644
--- a/modules/text_server_adv/script_iterator.cpp
+++ b/modules/text_server_adv/script_iterator.cpp
@@ -30,6 +30,8 @@
#include "script_iterator.h"
+// This implementation is derived from ICU: icu4c/source/extra/scrptrun/scrptrun.cpp
+
bool ScriptIterator::same_script(int32_t p_script_one, int32_t p_script_two) {
return p_script_one <= USCRIPT_INHERITED || p_script_two <= USCRIPT_INHERITED || p_script_one == p_script_two;
}
@@ -48,7 +50,8 @@ ScriptIterator::ScriptIterator(const String &p_string, int p_start, int p_length
p_start = 0;
}
- ParenStackEntry paren_stack[128];
+ int paren_size = PAREN_STACK_DEPTH;
+ ParenStackEntry *paren_stack = (ParenStackEntry *)memalloc(paren_size * sizeof(ParenStackEntry));
int script_start;
int script_end = p_start;
@@ -64,13 +67,22 @@ ScriptIterator::ScriptIterator(const String &p_string, int p_start, int p_length
UChar32 ch = str[script_end];
UScriptCode sc = uscript_getScript(ch, &err);
if (U_FAILURE(err)) {
+ memfree(paren_stack);
ERR_FAIL_MSG(u_errorName(err));
}
if (u_getIntPropertyValue(ch, UCHAR_BIDI_PAIRED_BRACKET_TYPE) != U_BPT_NONE) {
if (u_getIntPropertyValue(ch, UCHAR_BIDI_PAIRED_BRACKET_TYPE) == U_BPT_OPEN) {
- paren_stack[++paren_sp].pair_index = ch;
+ // If it's an open character, push it onto the stack.
+ paren_sp++;
+ if (unlikely(paren_sp >= paren_size)) {
+ // If the stack is full, allocate more space to handle deeply nested parentheses. This is unlikely to happen with any real text.
+ paren_size += PAREN_STACK_DEPTH;
+ paren_stack = (ParenStackEntry *)memrealloc(paren_stack, paren_size * sizeof(ParenStackEntry));
+ }
+ paren_stack[paren_sp].pair_index = ch;
paren_stack[paren_sp].script_code = script_code;
} else if (paren_sp >= 0) {
+ // If it's a close character, find the matching open on the stack, and use that script code. Any non-matching open characters above it on the stack will be poped.
UChar32 paired_ch = u_getBidiPairedBracket(ch);
while (paren_sp >= 0 && paren_stack[paren_sp].pair_index != paired_ch) {
paren_sp -= 1;
@@ -87,11 +99,13 @@ ScriptIterator::ScriptIterator(const String &p_string, int p_start, int p_length
if (same_script(script_code, sc)) {
if (script_code <= USCRIPT_INHERITED && sc > USCRIPT_INHERITED) {
script_code = sc;
+ // Now that we have a final script code, fix any open characters we pushed before we knew the script code.
while (start_sp < paren_sp) {
paren_stack[++start_sp].script_code = script_code;
}
}
if ((u_getIntPropertyValue(ch, UCHAR_BIDI_PAIRED_BRACKET_TYPE) == U_BPT_CLOSE) && paren_sp >= 0) {
+ // If this character is a close paired character pop the matching open character from the stack.
paren_sp -= 1;
if (start_sp >= 0) {
start_sp -= 1;
@@ -109,4 +123,6 @@ ScriptIterator::ScriptIterator(const String &p_string, int p_start, int p_length
script_ranges.push_back(rng);
} while (script_end < p_length);
+
+ memfree(paren_stack);
}
diff --git a/modules/text_server_adv/script_iterator.h b/modules/text_server_adv/script_iterator.h
index 896a0e5c15..5efd40f7c4 100644
--- a/modules/text_server_adv/script_iterator.h
+++ b/modules/text_server_adv/script_iterator.h
@@ -43,6 +43,8 @@
#include <hb.h>
class ScriptIterator {
+ static const int PAREN_STACK_DEPTH = 128;
+
public:
struct ScriptRange {
int start = 0;
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp
index 9ecb0de5b8..acc447018d 100644
--- a/modules/text_server_adv/text_server_adv.cpp
+++ b/modules/text_server_adv/text_server_adv.cpp
@@ -29,15 +29,199 @@
/*************************************************************************/
#include "text_server_adv.h"
-#include "bitmap_font_adv.h"
-#include "dynamic_font_adv.h"
+#include "core/error/error_macros.h"
+#include "core/string/print_string.h"
#include "core/string/translation.h"
#ifdef ICU_STATIC_DATA
#include "thirdparty/icu4c/icudata.gen.h"
#endif
+#ifdef MODULE_MSDFGEN_ENABLED
+#include "core/ShapeDistanceFinder.h"
+#include "core/contour-combiners.h"
+#include "core/edge-selectors.h"
+#include "msdfgen.h"
+#endif
+
+/*************************************************************************/
+/* hb_bmp_font_t HarfBuzz Bitmap font interface */
+/*************************************************************************/
+
+hb_font_funcs_t *TextServerAdvanced::funcs = nullptr;
+
+TextServerAdvanced::hb_bmp_font_t *TextServerAdvanced::_hb_bmp_font_create(TextServerAdvanced::FontDataForSizeAdvanced *p_face, bool p_unref) {
+ hb_bmp_font_t *bm_font = memnew(hb_bmp_font_t);
+
+ if (!bm_font) {
+ return nullptr;
+ }
+
+ bm_font->face = p_face;
+ bm_font->unref = p_unref;
+
+ return bm_font;
+}
+
+void TextServerAdvanced::_hb_bmp_font_destroy(void *p_data) {
+ hb_bmp_font_t *bm_font = reinterpret_cast<hb_bmp_font_t *>(p_data);
+ memdelete(bm_font);
+}
+
+hb_bool_t TextServerAdvanced::hb_bmp_get_nominal_glyph(hb_font_t *p_font, void *p_font_data, hb_codepoint_t p_unicode, hb_codepoint_t *r_glyph, void *p_user_data) {
+ const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(p_font_data);
+
+ if (!bm_font->face) {
+ return false;
+ }
+
+ if (!bm_font->face->glyph_map.has(p_unicode)) {
+ if (bm_font->face->glyph_map.has(0xF000u + p_unicode)) {
+ *r_glyph = 0xF000u + p_unicode;
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ *r_glyph = p_unicode;
+ return true;
+}
+
+hb_position_t TextServerAdvanced::hb_bmp_get_glyph_h_advance(hb_font_t *p_font, void *p_font_data, hb_codepoint_t p_glyph, void *p_user_data) {
+ const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(p_font_data);
+
+ if (!bm_font->face) {
+ return 0;
+ }
+
+ if (!bm_font->face->glyph_map.has(p_glyph)) {
+ return 0;
+ }
+
+ return bm_font->face->glyph_map[p_glyph].advance.x * 64;
+}
+
+hb_position_t TextServerAdvanced::hb_bmp_get_glyph_v_advance(hb_font_t *p_font, void *p_font_data, hb_codepoint_t p_glyph, void *p_user_data) {
+ const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(p_font_data);
+
+ if (!bm_font->face) {
+ return 0;
+ }
+
+ if (!bm_font->face->glyph_map.has(p_glyph)) {
+ return 0;
+ }
+
+ return -bm_font->face->glyph_map[p_glyph].advance.y * 64;
+}
+
+hb_position_t TextServerAdvanced::hb_bmp_get_glyph_h_kerning(hb_font_t *p_font, void *p_font_data, hb_codepoint_t p_left_glyph, hb_codepoint_t p_right_glyph, void *p_user_data) {
+ const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(p_font_data);
+
+ if (!bm_font->face) {
+ return 0;
+ }
+
+ if (!bm_font->face->kerning_map.has(Vector2i(p_left_glyph, p_right_glyph))) {
+ return 0;
+ }
+
+ return bm_font->face->kerning_map[Vector2i(p_left_glyph, p_right_glyph)].x * 64;
+}
+
+hb_bool_t TextServerAdvanced::hb_bmp_get_glyph_v_origin(hb_font_t *p_font, void *p_font_data, hb_codepoint_t p_glyph, hb_position_t *r_x, hb_position_t *r_y, void *p_user_data) {
+ const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(p_font_data);
+
+ if (!bm_font->face) {
+ return false;
+ }
+
+ if (!bm_font->face->glyph_map.has(p_glyph)) {
+ return false;
+ }
+
+ *r_x = bm_font->face->glyph_map[p_glyph].advance.x * 32;
+ *r_y = -bm_font->face->ascent * 64;
+
+ return true;
+}
+
+hb_bool_t TextServerAdvanced::hb_bmp_get_glyph_extents(hb_font_t *p_font, void *p_font_data, hb_codepoint_t p_glyph, hb_glyph_extents_t *r_extents, void *p_user_data) {
+ const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(p_font_data);
+
+ if (!bm_font->face) {
+ return false;
+ }
+
+ if (!bm_font->face->glyph_map.has(p_glyph)) {
+ return false;
+ }
+
+ r_extents->x_bearing = 0;
+ r_extents->y_bearing = 0;
+ r_extents->width = bm_font->face->glyph_map[p_glyph].rect.size.x * 64;
+ r_extents->height = bm_font->face->glyph_map[p_glyph].rect.size.y * 64;
+
+ return true;
+}
+
+hb_bool_t TextServerAdvanced::hb_bmp_get_font_h_extents(hb_font_t *p_font, void *p_font_data, hb_font_extents_t *r_metrics, void *p_user_data) {
+ const hb_bmp_font_t *bm_font = reinterpret_cast<const hb_bmp_font_t *>(p_font_data);
+
+ if (!bm_font->face) {
+ return false;
+ }
+
+ r_metrics->ascender = bm_font->face->ascent;
+ r_metrics->descender = bm_font->face->descent;
+ r_metrics->line_gap = 0;
+
+ return true;
+}
+
+void TextServerAdvanced::hb_bmp_create_font_funcs() {
+ if (funcs == nullptr) {
+ funcs = hb_font_funcs_create();
+
+ hb_font_funcs_set_font_h_extents_func(funcs, hb_bmp_get_font_h_extents, nullptr, nullptr);
+ hb_font_funcs_set_nominal_glyph_func(funcs, hb_bmp_get_nominal_glyph, nullptr, nullptr);
+ hb_font_funcs_set_glyph_h_advance_func(funcs, hb_bmp_get_glyph_h_advance, nullptr, nullptr);
+ hb_font_funcs_set_glyph_v_advance_func(funcs, hb_bmp_get_glyph_v_advance, nullptr, nullptr);
+ hb_font_funcs_set_glyph_v_origin_func(funcs, hb_bmp_get_glyph_v_origin, nullptr, nullptr);
+ hb_font_funcs_set_glyph_h_kerning_func(funcs, hb_bmp_get_glyph_h_kerning, nullptr, nullptr);
+ hb_font_funcs_set_glyph_extents_func(funcs, hb_bmp_get_glyph_extents, nullptr, nullptr);
+
+ hb_font_funcs_make_immutable(funcs);
+ }
+}
+
+void TextServerAdvanced::hb_bmp_free_font_funcs() {
+ if (funcs != nullptr) {
+ hb_font_funcs_destroy(funcs);
+ funcs = nullptr;
+ }
+}
+
+void TextServerAdvanced::_hb_bmp_font_set_funcs(hb_font_t *p_font, TextServerAdvanced::FontDataForSizeAdvanced *p_face, bool p_unref) {
+ hb_font_set_funcs(p_font, funcs, _hb_bmp_font_create(p_face, p_unref), _hb_bmp_font_destroy);
+}
+
+hb_font_t *TextServerAdvanced::hb_bmp_font_create(TextServerAdvanced::FontDataForSizeAdvanced *p_face, hb_destroy_func_t p_destroy) {
+ hb_font_t *font;
+ hb_face_t *face = hb_face_create(nullptr, 0);
+
+ font = hb_font_create(face);
+ hb_face_destroy(face);
+ _hb_bmp_font_set_funcs(font, p_face, false);
+ return font;
+}
+
+/*************************************************************************/
+/* Character properties. */
+/*************************************************************************/
+
_FORCE_INLINE_ bool is_ain(char32_t p_chr) {
return u_getIntPropertyValue(p_chr, UCHAR_JOINING_GROUP) == U_JG_AIN;
}
@@ -149,11 +333,11 @@ String TextServerAdvanced::get_name() const {
void TextServerAdvanced::free(RID p_rid) {
_THREAD_SAFE_METHOD_
if (font_owner.owns(p_rid)) {
- FontDataAdvanced *fd = font_owner.getornull(p_rid);
+ FontDataAdvanced *fd = font_owner.get_or_null(p_rid);
font_owner.free(p_rid);
memdelete(fd);
} else if (shaped_owner.owns(p_rid)) {
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_rid);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_rid);
shaped_owner.free(p_rid);
memdelete(sd);
}
@@ -242,276 +426,270 @@ bool TextServerAdvanced::is_locale_right_to_left(const String &p_locale) {
}
}
-struct FeatureInfo {
- int32_t tag;
- String name;
-};
+static Map<StringName, int32_t> feature_sets;
-static FeatureInfo feature_set[] = {
+static void _insert_feature_sets() {
// Registered OpenType feature tags.
- { HB_TAG('a', 'a', 'l', 't'), "access_all_alternates" },
- { HB_TAG('a', 'b', 'v', 'f'), "above_base_forms" },
- { HB_TAG('a', 'b', 'v', 'm'), "above_base_mark_positioning" },
- { HB_TAG('a', 'b', 'v', 's'), "above_base_substitutions" },
- { HB_TAG('a', 'f', 'r', 'c'), "alternative_fractions" },
- { HB_TAG('a', 'k', 'h', 'n'), "akhands" },
- { HB_TAG('b', 'l', 'w', 'f'), "below_base_forms" },
- { HB_TAG('b', 'l', 'w', 'm'), "below_base_mark_positioning" },
- { HB_TAG('b', 'l', 'w', 's'), "below_base_substitutions" },
- { HB_TAG('c', 'a', 'l', 't'), "contextual_alternates" },
- { HB_TAG('c', 'a', 's', 'e'), "case_sensitive_forms" },
- { HB_TAG('c', 'c', 'm', 'p'), "glyph_composition" },
- { HB_TAG('c', 'f', 'a', 'r'), "conjunct_form_after_ro" },
- { HB_TAG('c', 'j', 'c', 't'), "conjunct_forms" },
- { HB_TAG('c', 'l', 'i', 'g'), "contextual_ligatures" },
- { HB_TAG('c', 'p', 'c', 't'), "centered_cjk_punctuation" },
- { HB_TAG('c', 'p', 's', 'p'), "capital_spacing" },
- { HB_TAG('c', 's', 'w', 'h'), "contextual_swash" },
- { HB_TAG('c', 'u', 'r', 's'), "cursive_positioning" },
- { HB_TAG('c', 'v', '0', '1'), "character_variant_01" },
- { HB_TAG('c', 'v', '0', '2'), "character_variant_02" },
- { HB_TAG('c', 'v', '0', '3'), "character_variant_03" },
- { HB_TAG('c', 'v', '0', '4'), "character_variant_04" },
- { HB_TAG('c', 'v', '0', '5'), "character_variant_05" },
- { HB_TAG('c', 'v', '0', '6'), "character_variant_06" },
- { HB_TAG('c', 'v', '0', '7'), "character_variant_07" },
- { HB_TAG('c', 'v', '0', '8'), "character_variant_08" },
- { HB_TAG('c', 'v', '0', '9'), "character_variant_09" },
- { HB_TAG('c', 'v', '1', '0'), "character_variant_10" },
- { HB_TAG('c', 'v', '1', '1'), "character_variant_11" },
- { HB_TAG('c', 'v', '1', '2'), "character_variant_12" },
- { HB_TAG('c', 'v', '1', '3'), "character_variant_13" },
- { HB_TAG('c', 'v', '1', '4'), "character_variant_14" },
- { HB_TAG('c', 'v', '1', '5'), "character_variant_15" },
- { HB_TAG('c', 'v', '1', '6'), "character_variant_16" },
- { HB_TAG('c', 'v', '1', '7'), "character_variant_17" },
- { HB_TAG('c', 'v', '1', '8'), "character_variant_18" },
- { HB_TAG('c', 'v', '1', '9'), "character_variant_19" },
- { HB_TAG('c', 'v', '2', '0'), "character_variant_20" },
- { HB_TAG('c', 'v', '2', '1'), "character_variant_21" },
- { HB_TAG('c', 'v', '2', '2'), "character_variant_22" },
- { HB_TAG('c', 'v', '2', '3'), "character_variant_23" },
- { HB_TAG('c', 'v', '2', '4'), "character_variant_24" },
- { HB_TAG('c', 'v', '2', '5'), "character_variant_25" },
- { HB_TAG('c', 'v', '2', '6'), "character_variant_26" },
- { HB_TAG('c', 'v', '2', '7'), "character_variant_27" },
- { HB_TAG('c', 'v', '2', '8'), "character_variant_28" },
- { HB_TAG('c', 'v', '2', '9'), "character_variant_29" },
- { HB_TAG('c', 'v', '3', '0'), "character_variant_30" },
- { HB_TAG('c', 'v', '3', '1'), "character_variant_31" },
- { HB_TAG('c', 'v', '3', '2'), "character_variant_32" },
- { HB_TAG('c', 'v', '3', '3'), "character_variant_33" },
- { HB_TAG('c', 'v', '3', '4'), "character_variant_34" },
- { HB_TAG('c', 'v', '3', '5'), "character_variant_35" },
- { HB_TAG('c', 'v', '3', '6'), "character_variant_36" },
- { HB_TAG('c', 'v', '3', '7'), "character_variant_37" },
- { HB_TAG('c', 'v', '3', '8'), "character_variant_38" },
- { HB_TAG('c', 'v', '3', '9'), "character_variant_39" },
- { HB_TAG('c', 'v', '4', '0'), "character_variant_40" },
- { HB_TAG('c', 'v', '4', '1'), "character_variant_41" },
- { HB_TAG('c', 'v', '4', '2'), "character_variant_42" },
- { HB_TAG('c', 'v', '4', '3'), "character_variant_43" },
- { HB_TAG('c', 'v', '4', '4'), "character_variant_44" },
- { HB_TAG('c', 'v', '4', '5'), "character_variant_45" },
- { HB_TAG('c', 'v', '4', '6'), "character_variant_46" },
- { HB_TAG('c', 'v', '4', '7'), "character_variant_47" },
- { HB_TAG('c', 'v', '4', '8'), "character_variant_48" },
- { HB_TAG('c', 'v', '4', '9'), "character_variant_49" },
- { HB_TAG('c', 'v', '5', '0'), "character_variant_50" },
- { HB_TAG('c', 'v', '5', '1'), "character_variant_51" },
- { HB_TAG('c', 'v', '5', '2'), "character_variant_52" },
- { HB_TAG('c', 'v', '5', '3'), "character_variant_53" },
- { HB_TAG('c', 'v', '5', '4'), "character_variant_54" },
- { HB_TAG('c', 'v', '5', '5'), "character_variant_55" },
- { HB_TAG('c', 'v', '5', '6'), "character_variant_56" },
- { HB_TAG('c', 'v', '5', '7'), "character_variant_57" },
- { HB_TAG('c', 'v', '5', '8'), "character_variant_58" },
- { HB_TAG('c', 'v', '5', '9'), "character_variant_59" },
- { HB_TAG('c', 'v', '6', '0'), "character_variant_60" },
- { HB_TAG('c', 'v', '6', '1'), "character_variant_61" },
- { HB_TAG('c', 'v', '6', '2'), "character_variant_62" },
- { HB_TAG('c', 'v', '6', '3'), "character_variant_63" },
- { HB_TAG('c', 'v', '6', '4'), "character_variant_64" },
- { HB_TAG('c', 'v', '6', '5'), "character_variant_65" },
- { HB_TAG('c', 'v', '6', '6'), "character_variant_66" },
- { HB_TAG('c', 'v', '6', '7'), "character_variant_67" },
- { HB_TAG('c', 'v', '6', '8'), "character_variant_68" },
- { HB_TAG('c', 'v', '6', '9'), "character_variant_69" },
- { HB_TAG('c', 'v', '7', '0'), "character_variant_70" },
- { HB_TAG('c', 'v', '7', '1'), "character_variant_71" },
- { HB_TAG('c', 'v', '7', '2'), "character_variant_72" },
- { HB_TAG('c', 'v', '7', '3'), "character_variant_73" },
- { HB_TAG('c', 'v', '7', '4'), "character_variant_74" },
- { HB_TAG('c', 'v', '7', '5'), "character_variant_75" },
- { HB_TAG('c', 'v', '7', '6'), "character_variant_76" },
- { HB_TAG('c', 'v', '7', '7'), "character_variant_77" },
- { HB_TAG('c', 'v', '7', '8'), "character_variant_78" },
- { HB_TAG('c', 'v', '7', '9'), "character_variant_79" },
- { HB_TAG('c', 'v', '8', '0'), "character_variant_80" },
- { HB_TAG('c', 'v', '8', '1'), "character_variant_81" },
- { HB_TAG('c', 'v', '8', '2'), "character_variant_82" },
- { HB_TAG('c', 'v', '8', '3'), "character_variant_83" },
- { HB_TAG('c', 'v', '8', '4'), "character_variant_84" },
- { HB_TAG('c', 'v', '8', '5'), "character_variant_85" },
- { HB_TAG('c', 'v', '8', '6'), "character_variant_86" },
- { HB_TAG('c', 'v', '8', '7'), "character_variant_87" },
- { HB_TAG('c', 'v', '8', '8'), "character_variant_88" },
- { HB_TAG('c', 'v', '8', '9'), "character_variant_89" },
- { HB_TAG('c', 'v', '9', '0'), "character_variant_90" },
- { HB_TAG('c', 'v', '9', '1'), "character_variant_91" },
- { HB_TAG('c', 'v', '9', '2'), "character_variant_92" },
- { HB_TAG('c', 'v', '9', '3'), "character_variant_93" },
- { HB_TAG('c', 'v', '9', '4'), "character_variant_94" },
- { HB_TAG('c', 'v', '9', '5'), "character_variant_95" },
- { HB_TAG('c', 'v', '9', '6'), "character_variant_96" },
- { HB_TAG('c', 'v', '9', '7'), "character_variant_97" },
- { HB_TAG('c', 'v', '9', '8'), "character_variant_98" },
- { HB_TAG('c', 'v', '9', '9'), "character_variant_99" },
- { HB_TAG('c', '2', 'p', 'c'), "petite_capitals_from_capitals" },
- { HB_TAG('c', '2', 's', 'c'), "small_capitals_from_capitals" },
- { HB_TAG('d', 'i', 's', 't'), "distances" },
- { HB_TAG('d', 'l', 'i', 'g'), "discretionary_ligatures" },
- { HB_TAG('d', 'n', 'o', 'm'), "denominators" },
- { HB_TAG('d', 't', 'l', 's'), "dotless_forms" },
- { HB_TAG('e', 'x', 'p', 't'), "expert_forms" },
- { HB_TAG('f', 'a', 'l', 't'), "final_glyph_on_line_alternates" },
- { HB_TAG('f', 'i', 'n', '2'), "terminal_forms_2" },
- { HB_TAG('f', 'i', 'n', '3'), "terminal_forms_3" },
- { HB_TAG('f', 'i', 'n', 'a'), "terminal_forms" },
- { HB_TAG('f', 'l', 'a', 'c'), "flattened_accent_forms" },
- { HB_TAG('f', 'r', 'a', 'c'), "fractions" },
- { HB_TAG('f', 'w', 'i', 'd'), "full_widths" },
- { HB_TAG('h', 'a', 'l', 'f'), "half_forms" },
- { HB_TAG('h', 'a', 'l', 'n'), "halant_forms" },
- { HB_TAG('h', 'a', 'l', 't'), "alternate_half_widths" },
- { HB_TAG('h', 'i', 's', 't'), "historical_forms" },
- { HB_TAG('h', 'k', 'n', 'a'), "horizontal_kana_alternates" },
- { HB_TAG('h', 'l', 'i', 'g'), "historical_ligatures" },
- { HB_TAG('h', 'n', 'g', 'l'), "hangul" },
- { HB_TAG('h', 'o', 'j', 'o'), "hojo_kanji_forms" },
- { HB_TAG('h', 'w', 'i', 'd'), "half_widths" },
- { HB_TAG('i', 'n', 'i', 't'), "initial_forms" },
- { HB_TAG('i', 's', 'o', 'l'), "isolated_forms" },
- { HB_TAG('i', 't', 'a', 'l'), "italics" },
- { HB_TAG('j', 'a', 'l', 't'), "justification_alternates" },
- { HB_TAG('j', 'p', '7', '8'), "jis78_forms" },
- { HB_TAG('j', 'p', '8', '3'), "jis83_forms" },
- { HB_TAG('j', 'p', '9', '0'), "jis90_forms" },
- { HB_TAG('j', 'p', '0', '4'), "jis2004_forms" },
- { HB_TAG('k', 'e', 'r', 'n'), "kerning" },
- { HB_TAG('l', 'f', 'b', 'd'), "left_bounds" },
- { HB_TAG('l', 'i', 'g', 'a'), "standard_ligatures" },
- { HB_TAG('l', 'j', 'm', 'o'), "leading_jamo_forms" },
- { HB_TAG('l', 'n', 'u', 'm'), "lining_figures" },
- { HB_TAG('l', 'o', 'c', 'l'), "localized_forms" },
- { HB_TAG('l', 't', 'r', 'a'), "left_to_right_alternates" },
- { HB_TAG('l', 't', 'r', 'm'), "left_to_right_mirrored_forms" },
- { HB_TAG('m', 'a', 'r', 'k'), "mark_positioning" },
- { HB_TAG('m', 'e', 'd', '2'), "medial_forms_2" },
- { HB_TAG('m', 'e', 'd', 'i'), "medial_forms" },
- { HB_TAG('m', 'g', 'r', 'k'), "mathematical_greek" },
- { HB_TAG('m', 'k', 'm', 'k'), "mark_to_mark_positioning" },
- { HB_TAG('m', 's', 'e', 't'), "mark_positioning_via_substitution" },
- { HB_TAG('n', 'a', 'l', 't'), "alternate_annotation_forms" },
- { HB_TAG('n', 'l', 'c', 'k'), "nlc_kanji_forms" },
- { HB_TAG('n', 'u', 'k', 't'), "nukta_forms" },
- { HB_TAG('n', 'u', 'm', 'r'), "numerators" },
- { HB_TAG('o', 'n', 'u', 'm'), "oldstyle_figures" },
- { HB_TAG('o', 'p', 'b', 'd'), "optical_bounds" },
- { HB_TAG('o', 'r', 'd', 'n'), "ordinals" },
- { HB_TAG('o', 'r', 'n', 'm'), "ornaments" },
- { HB_TAG('p', 'a', 'l', 't'), "proportional_alternate_widths" },
- { HB_TAG('p', 'c', 'a', 'p'), "petite_capitals" },
- { HB_TAG('p', 'k', 'n', 'a'), "proportional_kana" },
- { HB_TAG('p', 'n', 'u', 'm'), "proportional_figures" },
- { HB_TAG('p', 'r', 'e', 'f'), "pre_base_forms" },
- { HB_TAG('p', 'r', 'e', 's'), "pre_base_substitutions" },
- { HB_TAG('p', 's', 't', 'f'), "post_base_forms" },
- { HB_TAG('p', 's', 't', 's'), "post_base_substitutions" },
- { HB_TAG('p', 'w', 'i', 'd'), "proportional_widths" },
- { HB_TAG('q', 'w', 'i', 'd'), "quarter_widths" },
- { HB_TAG('r', 'a', 'n', 'd'), "randomize" },
- { HB_TAG('r', 'c', 'l', 't'), "required_contextual_alternates" },
- { HB_TAG('r', 'k', 'r', 'f'), "rakar_forms" },
- { HB_TAG('r', 'l', 'i', 'g'), "required_ligatures" },
- { HB_TAG('r', 'p', 'h', 'f'), "reph_forms" },
- { HB_TAG('r', 't', 'b', 'd'), "right_bounds" },
- { HB_TAG('r', 't', 'l', 'a'), "right_to_left_alternates" },
- { HB_TAG('r', 't', 'l', 'm'), "right_to_left_mirrored_forms" },
- { HB_TAG('r', 'u', 'b', 'y'), "ruby_notation_forms" },
- { HB_TAG('r', 'v', 'r', 'n'), "required_variation_alternates" },
- { HB_TAG('s', 'a', 'l', 't'), "stylistic_alternates" },
- { HB_TAG('s', 'i', 'n', 'f'), "scientific_inferiors" },
- { HB_TAG('s', 'i', 'z', 'e'), "optical_size" },
- { HB_TAG('s', 'm', 'c', 'p'), "small_capitals" },
- { HB_TAG('s', 'm', 'p', 'l'), "simplified_forms" },
- { HB_TAG('s', 's', '0', '1'), "stylistic_set_01" },
- { HB_TAG('s', 's', '0', '2'), "stylistic_set_02" },
- { HB_TAG('s', 's', '0', '3'), "stylistic_set_03" },
- { HB_TAG('s', 's', '0', '4'), "stylistic_set_04" },
- { HB_TAG('s', 's', '0', '5'), "stylistic_set_05" },
- { HB_TAG('s', 's', '0', '6'), "stylistic_set_06" },
- { HB_TAG('s', 's', '0', '7'), "stylistic_set_07" },
- { HB_TAG('s', 's', '0', '8'), "stylistic_set_08" },
- { HB_TAG('s', 's', '0', '9'), "stylistic_set_09" },
- { HB_TAG('s', 's', '1', '0'), "stylistic_set_10" },
- { HB_TAG('s', 's', '1', '1'), "stylistic_set_11" },
- { HB_TAG('s', 's', '1', '2'), "stylistic_set_12" },
- { HB_TAG('s', 's', '1', '3'), "stylistic_set_13" },
- { HB_TAG('s', 's', '1', '4'), "stylistic_set_14" },
- { HB_TAG('s', 's', '1', '5'), "stylistic_set_15" },
- { HB_TAG('s', 's', '1', '6'), "stylistic_set_16" },
- { HB_TAG('s', 's', '1', '7'), "stylistic_set_17" },
- { HB_TAG('s', 's', '1', '8'), "stylistic_set_18" },
- { HB_TAG('s', 's', '1', '9'), "stylistic_set_19" },
- { HB_TAG('s', 's', '2', '0'), "stylistic_set_20" },
- { HB_TAG('s', 's', 't', 'y'), "math_script_style_alternates" },
- { HB_TAG('s', 't', 'c', 'h'), "stretching_glyph_decomposition" },
- { HB_TAG('s', 'u', 'b', 's'), "subscript" },
- { HB_TAG('s', 'u', 'p', 's'), "superscript" },
- { HB_TAG('s', 'w', 's', 'h'), "swash" },
- { HB_TAG('t', 'i', 't', 'l'), "titling" },
- { HB_TAG('t', 'j', 'm', 'o'), "trailing_jamo_forms" },
- { HB_TAG('t', 'n', 'a', 'm'), "traditional_name_forms" },
- { HB_TAG('t', 'n', 'u', 'm'), "tabular_figures" },
- { HB_TAG('t', 'r', 'a', 'd'), "traditional_forms" },
- { HB_TAG('t', 'w', 'i', 'd'), "third_widths" },
- { HB_TAG('u', 'n', 'i', 'c'), "unicase" },
- { HB_TAG('v', 'a', 'l', 't'), "alternate_vertical_metrics" },
- { HB_TAG('v', 'a', 't', 'u'), "vattu_variants" },
- { HB_TAG('v', 'e', 'r', 't'), "vertical_writing" },
- { HB_TAG('v', 'h', 'a', 'l'), "alternate_vertical_half_metrics" },
- { HB_TAG('v', 'j', 'm', 'o'), "vowel_jamo_forms" },
- { HB_TAG('v', 'k', 'n', 'a'), "vertical_kana_alternates" },
- { HB_TAG('v', 'k', 'r', 'n'), "vertical_kerning" },
- { HB_TAG('v', 'p', 'a', 'l'), "proportional_alternate_vertical_metrics" },
- { HB_TAG('v', 'r', 't', '2'), "vertical_alternates_and_rotation" },
- { HB_TAG('v', 'r', 't', 'r'), "vertical_alternates_for_rotation" },
- { HB_TAG('z', 'e', 'r', 'o'), "slashed_zero" },
- // Registered OpenType variation tags.
- { HB_TAG('i', 't', 'a', 'l'), "italic" },
- { HB_TAG('o', 'p', 's', 'z'), "optical_size" },
- { HB_TAG('s', 'l', 'n', 't'), "slant" },
- { HB_TAG('w', 'd', 't', 'h'), "width" },
- { HB_TAG('w', 'g', 'h', 't'), "weight" },
- { 0, String() },
-};
-
-int32_t TextServerAdvanced::name_to_tag(const String &p_name) {
- for (int i = 0; feature_set[i].tag != 0; i++) {
- if (feature_set[i].name == p_name) {
- return feature_set[i].tag;
- }
+ feature_sets.insert("access_all_alternates", HB_TAG('a', 'a', 'l', 't'));
+ feature_sets.insert("above_base_forms", HB_TAG('a', 'b', 'v', 'f'));
+ feature_sets.insert("above_base_mark_positioning", HB_TAG('a', 'b', 'v', 'm'));
+ feature_sets.insert("above_base_substitutions", HB_TAG('a', 'b', 'v', 's'));
+ feature_sets.insert("alternative_fractions", HB_TAG('a', 'f', 'r', 'c'));
+ feature_sets.insert("akhands", HB_TAG('a', 'k', 'h', 'n'));
+ feature_sets.insert("below_base_forms", HB_TAG('b', 'l', 'w', 'f'));
+ feature_sets.insert("below_base_mark_positioning", HB_TAG('b', 'l', 'w', 'm'));
+ feature_sets.insert("below_base_substitutions", HB_TAG('b', 'l', 'w', 's'));
+ feature_sets.insert("contextual_alternates", HB_TAG('c', 'a', 'l', 't'));
+ feature_sets.insert("case_sensitive_forms", HB_TAG('c', 'a', 's', 'e'));
+ feature_sets.insert("glyph_composition", HB_TAG('c', 'c', 'm', 'p'));
+ feature_sets.insert("conjunct_form_after_ro", HB_TAG('c', 'f', 'a', 'r'));
+ feature_sets.insert("conjunct_forms", HB_TAG('c', 'j', 'c', 't'));
+ feature_sets.insert("contextual_ligatures", HB_TAG('c', 'l', 'i', 'g'));
+ feature_sets.insert("centered_cjk_punctuation", HB_TAG('c', 'p', 'c', 't'));
+ feature_sets.insert("capital_spacing", HB_TAG('c', 'p', 's', 'p'));
+ feature_sets.insert("contextual_swash", HB_TAG('c', 's', 'w', 'h'));
+ feature_sets.insert("cursive_positioning", HB_TAG('c', 'u', 'r', 's'));
+ feature_sets.insert("character_variant_01", HB_TAG('c', 'v', '0', '1'));
+ feature_sets.insert("character_variant_02", HB_TAG('c', 'v', '0', '2'));
+ feature_sets.insert("character_variant_03", HB_TAG('c', 'v', '0', '3'));
+ feature_sets.insert("character_variant_04", HB_TAG('c', 'v', '0', '4'));
+ feature_sets.insert("character_variant_05", HB_TAG('c', 'v', '0', '5'));
+ feature_sets.insert("character_variant_06", HB_TAG('c', 'v', '0', '6'));
+ feature_sets.insert("character_variant_07", HB_TAG('c', 'v', '0', '7'));
+ feature_sets.insert("character_variant_08", HB_TAG('c', 'v', '0', '8'));
+ feature_sets.insert("character_variant_09", HB_TAG('c', 'v', '0', '9'));
+ feature_sets.insert("character_variant_10", HB_TAG('c', 'v', '1', '0'));
+ feature_sets.insert("character_variant_11", HB_TAG('c', 'v', '1', '1'));
+ feature_sets.insert("character_variant_12", HB_TAG('c', 'v', '1', '2'));
+ feature_sets.insert("character_variant_13", HB_TAG('c', 'v', '1', '3'));
+ feature_sets.insert("character_variant_14", HB_TAG('c', 'v', '1', '4'));
+ feature_sets.insert("character_variant_15", HB_TAG('c', 'v', '1', '5'));
+ feature_sets.insert("character_variant_16", HB_TAG('c', 'v', '1', '6'));
+ feature_sets.insert("character_variant_17", HB_TAG('c', 'v', '1', '7'));
+ feature_sets.insert("character_variant_18", HB_TAG('c', 'v', '1', '8'));
+ feature_sets.insert("character_variant_19", HB_TAG('c', 'v', '1', '9'));
+ feature_sets.insert("character_variant_20", HB_TAG('c', 'v', '2', '0'));
+ feature_sets.insert("character_variant_21", HB_TAG('c', 'v', '2', '1'));
+ feature_sets.insert("character_variant_22", HB_TAG('c', 'v', '2', '2'));
+ feature_sets.insert("character_variant_23", HB_TAG('c', 'v', '2', '3'));
+ feature_sets.insert("character_variant_24", HB_TAG('c', 'v', '2', '4'));
+ feature_sets.insert("character_variant_25", HB_TAG('c', 'v', '2', '5'));
+ feature_sets.insert("character_variant_26", HB_TAG('c', 'v', '2', '6'));
+ feature_sets.insert("character_variant_27", HB_TAG('c', 'v', '2', '7'));
+ feature_sets.insert("character_variant_28", HB_TAG('c', 'v', '2', '8'));
+ feature_sets.insert("character_variant_29", HB_TAG('c', 'v', '2', '9'));
+ feature_sets.insert("character_variant_30", HB_TAG('c', 'v', '3', '0'));
+ feature_sets.insert("character_variant_31", HB_TAG('c', 'v', '3', '1'));
+ feature_sets.insert("character_variant_32", HB_TAG('c', 'v', '3', '2'));
+ feature_sets.insert("character_variant_33", HB_TAG('c', 'v', '3', '3'));
+ feature_sets.insert("character_variant_34", HB_TAG('c', 'v', '3', '4'));
+ feature_sets.insert("character_variant_35", HB_TAG('c', 'v', '3', '5'));
+ feature_sets.insert("character_variant_36", HB_TAG('c', 'v', '3', '6'));
+ feature_sets.insert("character_variant_37", HB_TAG('c', 'v', '3', '7'));
+ feature_sets.insert("character_variant_38", HB_TAG('c', 'v', '3', '8'));
+ feature_sets.insert("character_variant_39", HB_TAG('c', 'v', '3', '9'));
+ feature_sets.insert("character_variant_40", HB_TAG('c', 'v', '4', '0'));
+ feature_sets.insert("character_variant_41", HB_TAG('c', 'v', '4', '1'));
+ feature_sets.insert("character_variant_42", HB_TAG('c', 'v', '4', '2'));
+ feature_sets.insert("character_variant_43", HB_TAG('c', 'v', '4', '3'));
+ feature_sets.insert("character_variant_44", HB_TAG('c', 'v', '4', '4'));
+ feature_sets.insert("character_variant_45", HB_TAG('c', 'v', '4', '5'));
+ feature_sets.insert("character_variant_46", HB_TAG('c', 'v', '4', '6'));
+ feature_sets.insert("character_variant_47", HB_TAG('c', 'v', '4', '7'));
+ feature_sets.insert("character_variant_48", HB_TAG('c', 'v', '4', '8'));
+ feature_sets.insert("character_variant_49", HB_TAG('c', 'v', '4', '9'));
+ feature_sets.insert("character_variant_50", HB_TAG('c', 'v', '5', '0'));
+ feature_sets.insert("character_variant_51", HB_TAG('c', 'v', '5', '1'));
+ feature_sets.insert("character_variant_52", HB_TAG('c', 'v', '5', '2'));
+ feature_sets.insert("character_variant_53", HB_TAG('c', 'v', '5', '3'));
+ feature_sets.insert("character_variant_54", HB_TAG('c', 'v', '5', '4'));
+ feature_sets.insert("character_variant_55", HB_TAG('c', 'v', '5', '5'));
+ feature_sets.insert("character_variant_56", HB_TAG('c', 'v', '5', '6'));
+ feature_sets.insert("character_variant_57", HB_TAG('c', 'v', '5', '7'));
+ feature_sets.insert("character_variant_58", HB_TAG('c', 'v', '5', '8'));
+ feature_sets.insert("character_variant_59", HB_TAG('c', 'v', '5', '9'));
+ feature_sets.insert("character_variant_60", HB_TAG('c', 'v', '6', '0'));
+ feature_sets.insert("character_variant_61", HB_TAG('c', 'v', '6', '1'));
+ feature_sets.insert("character_variant_62", HB_TAG('c', 'v', '6', '2'));
+ feature_sets.insert("character_variant_63", HB_TAG('c', 'v', '6', '3'));
+ feature_sets.insert("character_variant_64", HB_TAG('c', 'v', '6', '4'));
+ feature_sets.insert("character_variant_65", HB_TAG('c', 'v', '6', '5'));
+ feature_sets.insert("character_variant_66", HB_TAG('c', 'v', '6', '6'));
+ feature_sets.insert("character_variant_67", HB_TAG('c', 'v', '6', '7'));
+ feature_sets.insert("character_variant_68", HB_TAG('c', 'v', '6', '8'));
+ feature_sets.insert("character_variant_69", HB_TAG('c', 'v', '6', '9'));
+ feature_sets.insert("character_variant_70", HB_TAG('c', 'v', '7', '0'));
+ feature_sets.insert("character_variant_71", HB_TAG('c', 'v', '7', '1'));
+ feature_sets.insert("character_variant_72", HB_TAG('c', 'v', '7', '2'));
+ feature_sets.insert("character_variant_73", HB_TAG('c', 'v', '7', '3'));
+ feature_sets.insert("character_variant_74", HB_TAG('c', 'v', '7', '4'));
+ feature_sets.insert("character_variant_75", HB_TAG('c', 'v', '7', '5'));
+ feature_sets.insert("character_variant_76", HB_TAG('c', 'v', '7', '6'));
+ feature_sets.insert("character_variant_77", HB_TAG('c', 'v', '7', '7'));
+ feature_sets.insert("character_variant_78", HB_TAG('c', 'v', '7', '8'));
+ feature_sets.insert("character_variant_79", HB_TAG('c', 'v', '7', '9'));
+ feature_sets.insert("character_variant_80", HB_TAG('c', 'v', '8', '0'));
+ feature_sets.insert("character_variant_81", HB_TAG('c', 'v', '8', '1'));
+ feature_sets.insert("character_variant_82", HB_TAG('c', 'v', '8', '2'));
+ feature_sets.insert("character_variant_83", HB_TAG('c', 'v', '8', '3'));
+ feature_sets.insert("character_variant_84", HB_TAG('c', 'v', '8', '4'));
+ feature_sets.insert("character_variant_85", HB_TAG('c', 'v', '8', '5'));
+ feature_sets.insert("character_variant_86", HB_TAG('c', 'v', '8', '6'));
+ feature_sets.insert("character_variant_87", HB_TAG('c', 'v', '8', '7'));
+ feature_sets.insert("character_variant_88", HB_TAG('c', 'v', '8', '8'));
+ feature_sets.insert("character_variant_89", HB_TAG('c', 'v', '8', '9'));
+ feature_sets.insert("character_variant_90", HB_TAG('c', 'v', '9', '0'));
+ feature_sets.insert("character_variant_91", HB_TAG('c', 'v', '9', '1'));
+ feature_sets.insert("character_variant_92", HB_TAG('c', 'v', '9', '2'));
+ feature_sets.insert("character_variant_93", HB_TAG('c', 'v', '9', '3'));
+ feature_sets.insert("character_variant_94", HB_TAG('c', 'v', '9', '4'));
+ feature_sets.insert("character_variant_95", HB_TAG('c', 'v', '9', '5'));
+ feature_sets.insert("character_variant_96", HB_TAG('c', 'v', '9', '6'));
+ feature_sets.insert("character_variant_97", HB_TAG('c', 'v', '9', '7'));
+ feature_sets.insert("character_variant_98", HB_TAG('c', 'v', '9', '8'));
+ feature_sets.insert("character_variant_99", HB_TAG('c', 'v', '9', '9'));
+ feature_sets.insert("petite_capitals_from_capitals", HB_TAG('c', '2', 'p', 'c'));
+ feature_sets.insert("small_capitals_from_capitals", HB_TAG('c', '2', 's', 'c'));
+ feature_sets.insert("distances", HB_TAG('d', 'i', 's', 't'));
+ feature_sets.insert("discretionary_ligatures", HB_TAG('d', 'l', 'i', 'g'));
+ feature_sets.insert("denominators", HB_TAG('d', 'n', 'o', 'm'));
+ feature_sets.insert("dotless_forms", HB_TAG('d', 't', 'l', 's'));
+ feature_sets.insert("expert_forms", HB_TAG('e', 'x', 'p', 't'));
+ feature_sets.insert("final_glyph_on_line_alternates", HB_TAG('f', 'a', 'l', 't'));
+ feature_sets.insert("terminal_forms_2", HB_TAG('f', 'i', 'n', '2'));
+ feature_sets.insert("terminal_forms_3", HB_TAG('f', 'i', 'n', '3'));
+ feature_sets.insert("terminal_forms", HB_TAG('f', 'i', 'n', 'a'));
+ feature_sets.insert("flattened_accent_forms", HB_TAG('f', 'l', 'a', 'c'));
+ feature_sets.insert("fractions", HB_TAG('f', 'r', 'a', 'c'));
+ feature_sets.insert("full_widths", HB_TAG('f', 'w', 'i', 'd'));
+ feature_sets.insert("half_forms", HB_TAG('h', 'a', 'l', 'f'));
+ feature_sets.insert("halant_forms", HB_TAG('h', 'a', 'l', 'n'));
+ feature_sets.insert("alternate_half_widths", HB_TAG('h', 'a', 'l', 't'));
+ feature_sets.insert("historical_forms", HB_TAG('h', 'i', 's', 't'));
+ feature_sets.insert("horizontal_kana_alternates", HB_TAG('h', 'k', 'n', 'a'));
+ feature_sets.insert("historical_ligatures", HB_TAG('h', 'l', 'i', 'g'));
+ feature_sets.insert("hangul", HB_TAG('h', 'n', 'g', 'l'));
+ feature_sets.insert("hojo_kanji_forms", HB_TAG('h', 'o', 'j', 'o'));
+ feature_sets.insert("half_widths", HB_TAG('h', 'w', 'i', 'd'));
+ feature_sets.insert("initial_forms", HB_TAG('i', 'n', 'i', 't'));
+ feature_sets.insert("isolated_forms", HB_TAG('i', 's', 'o', 'l'));
+ feature_sets.insert("italics", HB_TAG('i', 't', 'a', 'l'));
+ feature_sets.insert("justification_alternates", HB_TAG('j', 'a', 'l', 't'));
+ feature_sets.insert("jis78_forms", HB_TAG('j', 'p', '7', '8'));
+ feature_sets.insert("jis83_forms", HB_TAG('j', 'p', '8', '3'));
+ feature_sets.insert("jis90_forms", HB_TAG('j', 'p', '9', '0'));
+ feature_sets.insert("jis2004_forms", HB_TAG('j', 'p', '0', '4'));
+ feature_sets.insert("kerning", HB_TAG('k', 'e', 'r', 'n'));
+ feature_sets.insert("left_bounds", HB_TAG('l', 'f', 'b', 'd'));
+ feature_sets.insert("standard_ligatures", HB_TAG('l', 'i', 'g', 'a'));
+ feature_sets.insert("leading_jamo_forms", HB_TAG('l', 'j', 'm', 'o'));
+ feature_sets.insert("lining_figures", HB_TAG('l', 'n', 'u', 'm'));
+ feature_sets.insert("localized_forms", HB_TAG('l', 'o', 'c', 'l'));
+ feature_sets.insert("left_to_right_alternates", HB_TAG('l', 't', 'r', 'a'));
+ feature_sets.insert("left_to_right_mirrored_forms", HB_TAG('l', 't', 'r', 'm'));
+ feature_sets.insert("mark_positioning", HB_TAG('m', 'a', 'r', 'k'));
+ feature_sets.insert("medial_forms_2", HB_TAG('m', 'e', 'd', '2'));
+ feature_sets.insert("medial_forms", HB_TAG('m', 'e', 'd', 'i'));
+ feature_sets.insert("mathematical_greek", HB_TAG('m', 'g', 'r', 'k'));
+ feature_sets.insert("mark_to_mark_positioning", HB_TAG('m', 'k', 'm', 'k'));
+ feature_sets.insert("mark_positioning_via_substitution", HB_TAG('m', 's', 'e', 't'));
+ feature_sets.insert("alternate_annotation_forms", HB_TAG('n', 'a', 'l', 't'));
+ feature_sets.insert("nlc_kanji_forms", HB_TAG('n', 'l', 'c', 'k'));
+ feature_sets.insert("nukta_forms", HB_TAG('n', 'u', 'k', 't'));
+ feature_sets.insert("numerators", HB_TAG('n', 'u', 'm', 'r'));
+ feature_sets.insert("oldstyle_figures", HB_TAG('o', 'n', 'u', 'm'));
+ feature_sets.insert("optical_bounds", HB_TAG('o', 'p', 'b', 'd'));
+ feature_sets.insert("ordinals", HB_TAG('o', 'r', 'd', 'n'));
+ feature_sets.insert("ornaments", HB_TAG('o', 'r', 'n', 'm'));
+ feature_sets.insert("proportional_alternate_widths", HB_TAG('p', 'a', 'l', 't'));
+ feature_sets.insert("petite_capitals", HB_TAG('p', 'c', 'a', 'p'));
+ feature_sets.insert("proportional_kana", HB_TAG('p', 'k', 'n', 'a'));
+ feature_sets.insert("proportional_figures", HB_TAG('p', 'n', 'u', 'm'));
+ feature_sets.insert("pre_base_forms", HB_TAG('p', 'r', 'e', 'f'));
+ feature_sets.insert("pre_base_substitutions", HB_TAG('p', 'r', 'e', 's'));
+ feature_sets.insert("post_base_forms", HB_TAG('p', 's', 't', 'f'));
+ feature_sets.insert("post_base_substitutions", HB_TAG('p', 's', 't', 's'));
+ feature_sets.insert("proportional_widths", HB_TAG('p', 'w', 'i', 'd'));
+ feature_sets.insert("quarter_widths", HB_TAG('q', 'w', 'i', 'd'));
+ feature_sets.insert("randomize", HB_TAG('r', 'a', 'n', 'd'));
+ feature_sets.insert("required_contextual_alternates", HB_TAG('r', 'c', 'l', 't'));
+ feature_sets.insert("rakar_forms", HB_TAG('r', 'k', 'r', 'f'));
+ feature_sets.insert("required_ligatures", HB_TAG('r', 'l', 'i', 'g'));
+ feature_sets.insert("reph_forms", HB_TAG('r', 'p', 'h', 'f'));
+ feature_sets.insert("right_bounds", HB_TAG('r', 't', 'b', 'd'));
+ feature_sets.insert("right_to_left_alternates", HB_TAG('r', 't', 'l', 'a'));
+ feature_sets.insert("right_to_left_mirrored_forms", HB_TAG('r', 't', 'l', 'm'));
+ feature_sets.insert("ruby_notation_forms", HB_TAG('r', 'u', 'b', 'y'));
+ feature_sets.insert("required_variation_alternates", HB_TAG('r', 'v', 'r', 'n'));
+ feature_sets.insert("stylistic_alternates", HB_TAG('s', 'a', 'l', 't'));
+ feature_sets.insert("scientific_inferiors", HB_TAG('s', 'i', 'n', 'f'));
+ feature_sets.insert("optical_size", HB_TAG('s', 'i', 'z', 'e'));
+ feature_sets.insert("small_capitals", HB_TAG('s', 'm', 'c', 'p'));
+ feature_sets.insert("simplified_forms", HB_TAG('s', 'm', 'p', 'l'));
+ feature_sets.insert("stylistic_set_01", HB_TAG('s', 's', '0', '1'));
+ feature_sets.insert("stylistic_set_02", HB_TAG('s', 's', '0', '2'));
+ feature_sets.insert("stylistic_set_03", HB_TAG('s', 's', '0', '3'));
+ feature_sets.insert("stylistic_set_04", HB_TAG('s', 's', '0', '4'));
+ feature_sets.insert("stylistic_set_05", HB_TAG('s', 's', '0', '5'));
+ feature_sets.insert("stylistic_set_06", HB_TAG('s', 's', '0', '6'));
+ feature_sets.insert("stylistic_set_07", HB_TAG('s', 's', '0', '7'));
+ feature_sets.insert("stylistic_set_08", HB_TAG('s', 's', '0', '8'));
+ feature_sets.insert("stylistic_set_09", HB_TAG('s', 's', '0', '9'));
+ feature_sets.insert("stylistic_set_10", HB_TAG('s', 's', '1', '0'));
+ feature_sets.insert("stylistic_set_11", HB_TAG('s', 's', '1', '1'));
+ feature_sets.insert("stylistic_set_12", HB_TAG('s', 's', '1', '2'));
+ feature_sets.insert("stylistic_set_13", HB_TAG('s', 's', '1', '3'));
+ feature_sets.insert("stylistic_set_14", HB_TAG('s', 's', '1', '4'));
+ feature_sets.insert("stylistic_set_15", HB_TAG('s', 's', '1', '5'));
+ feature_sets.insert("stylistic_set_16", HB_TAG('s', 's', '1', '6'));
+ feature_sets.insert("stylistic_set_17", HB_TAG('s', 's', '1', '7'));
+ feature_sets.insert("stylistic_set_18", HB_TAG('s', 's', '1', '8'));
+ feature_sets.insert("stylistic_set_19", HB_TAG('s', 's', '1', '9'));
+ feature_sets.insert("stylistic_set_20", HB_TAG('s', 's', '2', '0'));
+ feature_sets.insert("math_script_style_alternates", HB_TAG('s', 's', 't', 'y'));
+ feature_sets.insert("stretching_glyph_decomposition", HB_TAG('s', 't', 'c', 'h'));
+ feature_sets.insert("subscript", HB_TAG('s', 'u', 'b', 's'));
+ feature_sets.insert("superscript", HB_TAG('s', 'u', 'p', 's'));
+ feature_sets.insert("swash", HB_TAG('s', 'w', 's', 'h'));
+ feature_sets.insert("titling", HB_TAG('t', 'i', 't', 'l'));
+ feature_sets.insert("trailing_jamo_forms", HB_TAG('t', 'j', 'm', 'o'));
+ feature_sets.insert("traditional_name_forms", HB_TAG('t', 'n', 'a', 'm'));
+ feature_sets.insert("tabular_figures", HB_TAG('t', 'n', 'u', 'm'));
+ feature_sets.insert("traditional_forms", HB_TAG('t', 'r', 'a', 'd'));
+ feature_sets.insert("third_widths", HB_TAG('t', 'w', 'i', 'd'));
+ feature_sets.insert("unicase", HB_TAG('u', 'n', 'i', 'c'));
+ feature_sets.insert("alternate_vertical_metrics", HB_TAG('v', 'a', 'l', 't'));
+ feature_sets.insert("vattu_variants", HB_TAG('v', 'a', 't', 'u'));
+ feature_sets.insert("vertical_writing", HB_TAG('v', 'e', 'r', 't'));
+ feature_sets.insert("alternate_vertical_half_metrics", HB_TAG('v', 'h', 'a', 'l'));
+ feature_sets.insert("vowel_jamo_forms", HB_TAG('v', 'j', 'm', 'o'));
+ feature_sets.insert("vertical_kana_alternates", HB_TAG('v', 'k', 'n', 'a'));
+ feature_sets.insert("vertical_kerning", HB_TAG('v', 'k', 'r', 'n'));
+ feature_sets.insert("proportional_alternate_vertical_metrics", HB_TAG('v', 'p', 'a', 'l'));
+ feature_sets.insert("vertical_alternates_and_rotation", HB_TAG('v', 'r', 't', '2'));
+ feature_sets.insert("vertical_alternates_for_rotation", HB_TAG('v', 'r', 't', 'r'));
+ feature_sets.insert("slashed_zero", HB_TAG('z', 'e', 'r', 'o'));
+ // Registered OpenType variation tag.
+ feature_sets.insert("italic", HB_TAG('i', 't', 'a', 'l'));
+ feature_sets.insert("optical_size", HB_TAG('o', 'p', 's', 'z'));
+ feature_sets.insert("slant", HB_TAG('s', 'l', 'n', 't'));
+ feature_sets.insert("width", HB_TAG('w', 'd', 't', 'h'));
+ feature_sets.insert("weight", HB_TAG('w', 'g', 'h', 't'));
+}
+
+int32_t TextServerAdvanced::name_to_tag(const String &p_name) const {
+ if (feature_sets.has(p_name)) {
+ return feature_sets[p_name];
}
// No readable name, use tag string.
return hb_tag_from_string(p_name.replace("custom_", "").ascii().get_data(), -1);
}
-String TextServerAdvanced::tag_to_name(int32_t p_tag) {
- for (int i = 0; feature_set[i].tag != 0; i++) {
- if (feature_set[i].tag == p_tag) {
- return feature_set[i].name;
+String TextServerAdvanced::tag_to_name(int32_t p_tag) const {
+ for (const KeyValue<StringName, int32_t> &E : feature_sets) {
+ if (E.value == p_tag) {
+ return E.key;
}
}
@@ -523,426 +701,2087 @@ String TextServerAdvanced::tag_to_name(int32_t p_tag) {
}
/*************************************************************************/
-/* Font interface */
+/* Font Glyph Rendering */
/*************************************************************************/
-RID TextServerAdvanced::create_font_system(const String &p_name, int p_base_size) {
- ERR_FAIL_V_MSG(RID(), "System fonts are not supported by this text server.");
+_FORCE_INLINE_ TextServerAdvanced::FontTexturePosition TextServerAdvanced::find_texture_pos_for_glyph(FontDataForSizeAdvanced *p_data, int p_color_size, Image::Format p_image_format, int p_width, int p_height) const {
+ FontTexturePosition ret;
+ ret.index = -1;
+
+ int mw = p_width;
+ int mh = p_height;
+
+ for (int i = 0; i < p_data->textures.size(); i++) {
+ const FontTexture &ct = p_data->textures[i];
+
+ if (RenderingServer::get_singleton() != nullptr) {
+ if (ct.texture->get_format() != p_image_format) {
+ continue;
+ }
+ }
+
+ if (mw > ct.texture_w || mh > ct.texture_h) { // Too big for this texture.
+ continue;
+ }
+
+ ret.y = 0x7FFFFFFF;
+ ret.x = 0;
+
+ for (int j = 0; j < ct.texture_w - mw; j++) {
+ int max_y = 0;
+
+ for (int k = j; k < j + mw; k++) {
+ int y = ct.offsets[k];
+ if (y > max_y) {
+ max_y = y;
+ }
+ }
+
+ if (max_y < ret.y) {
+ ret.y = max_y;
+ ret.x = j;
+ }
+ }
+
+ if (ret.y == 0x7FFFFFFF || ret.y + mh > ct.texture_h) {
+ continue; // Fail, could not fit it here.
+ }
+
+ ret.index = i;
+ break;
+ }
+
+ if (ret.index == -1) {
+ // Could not find texture to fit, create one.
+ ret.x = 0;
+ ret.y = 0;
+
+ int texsize = MAX(p_data->size.x * p_data->oversampling * 8, 256);
+ if (mw > texsize) {
+ texsize = mw; // Special case, adapt to it?
+ }
+ if (mh > texsize) {
+ texsize = mh; // Special case, adapt to it?
+ }
+
+ texsize = next_power_of_2(texsize);
+
+ texsize = MIN(texsize, 4096);
+
+ FontTexture tex;
+ tex.texture_w = texsize;
+ tex.texture_h = texsize;
+ tex.format = p_image_format;
+ tex.imgdata.resize(texsize * texsize * p_color_size);
+
+ {
+ // Zero texture.
+ uint8_t *w = tex.imgdata.ptrw();
+ ERR_FAIL_COND_V(texsize * texsize * p_color_size > tex.imgdata.size(), ret);
+ // Initialize the texture to all-white pixels to prevent artifacts when the
+ // font is displayed at a non-default scale with filtering enabled.
+ if (p_color_size == 2) {
+ for (int i = 0; i < texsize * texsize * p_color_size; i += 2) { // FORMAT_LA8, BW font.
+ w[i + 0] = 255;
+ w[i + 1] = 0;
+ }
+ } else if (p_color_size == 4) {
+ for (int i = 0; i < texsize * texsize * p_color_size; i += 4) { // FORMAT_RGBA8, Color font, Multichannel(+True) SDF.
+ w[i + 0] = 255;
+ w[i + 1] = 255;
+ w[i + 2] = 255;
+ w[i + 3] = 0;
+ }
+ } else {
+ ERR_FAIL_V(ret);
+ }
+ }
+ tex.offsets.resize(texsize);
+ for (int i = 0; i < texsize; i++) { // Zero offsets.
+ tex.offsets.write[i] = 0;
+ }
+
+ p_data->textures.push_back(tex);
+ ret.index = p_data->textures.size() - 1;
+ }
+
+ return ret;
}
-RID TextServerAdvanced::create_font_resource(const String &p_filename, int p_base_size) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = nullptr;
- if (p_filename.get_extension() == "fnt" || p_filename.get_extension() == "font") {
- fd = memnew(BitmapFontDataAdvanced);
+#ifdef MODULE_MSDFGEN_ENABLED
+
+struct MSContext {
+ msdfgen::Point2 position;
+ msdfgen::Shape *shape;
+ msdfgen::Contour *contour;
+};
+
+class DistancePixelConversion {
+ double invRange;
+
+public:
+ _FORCE_INLINE_ explicit DistancePixelConversion(double range) :
+ invRange(1 / range) {}
+ _FORCE_INLINE_ void operator()(float *pixels, const msdfgen::MultiAndTrueDistance &distance) const {
+ pixels[0] = float(invRange * distance.r + .5);
+ pixels[1] = float(invRange * distance.g + .5);
+ pixels[2] = float(invRange * distance.b + .5);
+ pixels[3] = float(invRange * distance.a + .5);
+ }
+};
+
+struct MSDFThreadData {
+ msdfgen::Bitmap<float, 4> *output;
+ msdfgen::Shape *shape;
+ msdfgen::Projection *projection;
+ DistancePixelConversion *distancePixelConversion;
+};
+
+static msdfgen::Point2 ft_point2(const FT_Vector &vector) {
+ return msdfgen::Point2(vector.x / 60.0f, vector.y / 60.0f);
+}
+
+static int ft_move_to(const FT_Vector *to, void *user) {
+ MSContext *context = reinterpret_cast<MSContext *>(user);
+ if (!(context->contour && context->contour->edges.empty())) {
+ context->contour = &context->shape->addContour();
+ }
+ context->position = ft_point2(*to);
+ return 0;
+}
+
+static int ft_line_to(const FT_Vector *to, void *user) {
+ MSContext *context = reinterpret_cast<MSContext *>(user);
+ msdfgen::Point2 endpoint = ft_point2(*to);
+ if (endpoint != context->position) {
+ context->contour->addEdge(new msdfgen::LinearSegment(context->position, endpoint));
+ context->position = endpoint;
+ }
+ return 0;
+}
+
+static int ft_conic_to(const FT_Vector *control, const FT_Vector *to, void *user) {
+ MSContext *context = reinterpret_cast<MSContext *>(user);
+ context->contour->addEdge(new msdfgen::QuadraticSegment(context->position, ft_point2(*control), ft_point2(*to)));
+ context->position = ft_point2(*to);
+ return 0;
+}
+
+static int ft_cubic_to(const FT_Vector *control1, const FT_Vector *control2, const FT_Vector *to, void *user) {
+ MSContext *context = reinterpret_cast<MSContext *>(user);
+ context->contour->addEdge(new msdfgen::CubicSegment(context->position, ft_point2(*control1), ft_point2(*control2), ft_point2(*to)));
+ context->position = ft_point2(*to);
+ return 0;
+}
+
+void TextServerAdvanced::_generateMTSDF_threaded(uint32_t y, void *p_td) const {
+ MSDFThreadData *td = (MSDFThreadData *)p_td;
+
+ msdfgen::ShapeDistanceFinder<msdfgen::OverlappingContourCombiner<msdfgen::MultiAndTrueDistanceSelector>> distanceFinder(*td->shape);
+ int row = td->shape->inverseYAxis ? td->output->height() - y - 1 : y;
+ for (int col = 0; col < td->output->width(); ++col) {
+ int x = (y % 2) ? td->output->width() - col - 1 : col;
+ msdfgen::Point2 p = td->projection->unproject(msdfgen::Point2(x + .5, y + .5));
+ msdfgen::MultiAndTrueDistance distance = distanceFinder.distance(p);
+ td->distancePixelConversion->operator()(td->output->operator()(x, row), distance);
+ }
+}
+
+_FORCE_INLINE_ TextServerAdvanced::FontGlyph TextServerAdvanced::rasterize_msdf(FontDataAdvanced *p_font_data, FontDataForSizeAdvanced *p_data, int p_pixel_range, int p_rect_margin, FT_Outline *outline, const Vector2 &advance) const {
+ msdfgen::Shape shape;
+
+ shape.contours.clear();
+ shape.inverseYAxis = false;
+
+ MSContext context = {};
+ context.shape = &shape;
+ FT_Outline_Funcs ft_functions;
+ ft_functions.move_to = &ft_move_to;
+ ft_functions.line_to = &ft_line_to;
+ ft_functions.conic_to = &ft_conic_to;
+ ft_functions.cubic_to = &ft_cubic_to;
+ ft_functions.shift = 0;
+ ft_functions.delta = 0;
+
+ int error = FT_Outline_Decompose(outline, &ft_functions, &context);
+ ERR_FAIL_COND_V_MSG(error, FontGlyph(), "FreeType: Outline decomposition error: '" + String(FT_Error_String(error)) + "'.");
+ if (!shape.contours.empty() && shape.contours.back().edges.empty()) {
+ shape.contours.pop_back();
+ }
+
+ if (FT_Outline_Get_Orientation(outline) == 1) {
+ for (int i = 0; i < (int)shape.contours.size(); ++i) {
+ shape.contours[i].reverse();
+ }
+ }
+
+ shape.inverseYAxis = true;
+ shape.normalize();
+
+ msdfgen::Shape::Bounds bounds = shape.getBounds(p_pixel_range);
+
+ FontGlyph chr;
+ chr.found = true;
+ chr.advance = advance.round();
+
+ if (shape.validate() && shape.contours.size() > 0) {
+ int w = (bounds.r - bounds.l);
+ int h = (bounds.t - bounds.b);
+
+ int mw = w + p_rect_margin * 2;
+ int mh = h + p_rect_margin * 2;
+
+ ERR_FAIL_COND_V(mw > 4096, FontGlyph());
+ ERR_FAIL_COND_V(mh > 4096, FontGlyph());
+
+ FontTexturePosition tex_pos = find_texture_pos_for_glyph(p_data, 4, Image::FORMAT_RGBA8, mw, mh);
+ ERR_FAIL_COND_V(tex_pos.index < 0, FontGlyph());
+ FontTexture &tex = p_data->textures.write[tex_pos.index];
+
+ edgeColoringSimple(shape, 3.0); // Max. angle.
+ msdfgen::Bitmap<float, 4> image(w, h); // Texture size.
+ //msdfgen::generateMTSDF(image, shape, p_pixel_range, 1.0, msdfgen::Vector2(-bounds.l, -bounds.b)); // Range, scale, translation.
+
+ DistancePixelConversion distancePixelConversion(p_pixel_range);
+ msdfgen::Projection projection(msdfgen::Vector2(1.0, 1.0), msdfgen::Vector2(-bounds.l, -bounds.b));
+ msdfgen::MSDFGeneratorConfig config(true, msdfgen::ErrorCorrectionConfig());
+
+ MSDFThreadData td;
+ td.output = &image;
+ td.shape = &shape;
+ td.projection = &projection;
+ td.distancePixelConversion = &distancePixelConversion;
+
+ if (p_font_data->work_pool.get_thread_count() == 0) {
+ p_font_data->work_pool.init();
+ }
+ p_font_data->work_pool.do_work(h, this, &TextServerAdvanced::_generateMTSDF_threaded, &td);
+
+ msdfgen::msdfErrorCorrection(image, shape, projection, p_pixel_range, config);
+
+ {
+ uint8_t *wr = tex.imgdata.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs = ((i + tex_pos.y + p_rect_margin) * tex.texture_w + j + tex_pos.x + p_rect_margin) * 4;
+ ERR_FAIL_COND_V(ofs >= tex.imgdata.size(), FontGlyph());
+ wr[ofs + 0] = (uint8_t)(CLAMP(image(j, i)[0] * 256.f, 0.f, 255.f));
+ wr[ofs + 1] = (uint8_t)(CLAMP(image(j, i)[1] * 256.f, 0.f, 255.f));
+ wr[ofs + 2] = (uint8_t)(CLAMP(image(j, i)[2] * 256.f, 0.f, 255.f));
+ wr[ofs + 3] = (uint8_t)(CLAMP(image(j, i)[3] * 256.f, 0.f, 255.f));
+ //wr[ofs + 0] = 100;
+ //wr[ofs + 1] = 100;
+ //wr[ofs + 2] = 100;
+ //wr[ofs + 3] = 100;
+ }
+ }
+ }
+
+ // Blit to image and texture.
+ {
+ if (RenderingServer::get_singleton() != nullptr) {
+ Ref<Image> img = memnew(Image(tex.texture_w, tex.texture_h, 0, Image::FORMAT_RGBA8, tex.imgdata));
+ if (tex.texture.is_null()) {
+ tex.texture.instantiate();
+ tex.texture->create_from_image(img);
+ } else {
+ tex.texture->update(img);
+ }
+ }
+ }
+
+ // Update height array.
+ for (int k = tex_pos.x; k < tex_pos.x + mw; k++) {
+ tex.offsets.write[k] = tex_pos.y + mh;
+ }
+
+ chr.texture_idx = tex_pos.index;
+
+ chr.uv_rect = Rect2(tex_pos.x + p_rect_margin, tex_pos.y + p_rect_margin, w, h);
+ chr.rect.position = Vector2(bounds.l, -bounds.t);
+ chr.rect.size = chr.uv_rect.size;
+ }
+ return chr;
+}
+#endif
+
#ifdef MODULE_FREETYPE_ENABLED
- } else if (p_filename.get_extension() == "ttf" || p_filename.get_extension() == "otf" || p_filename.get_extension() == "woff") {
- fd = memnew(DynamicFontDataAdvanced);
+_FORCE_INLINE_ TextServerAdvanced::FontGlyph TextServerAdvanced::rasterize_bitmap(FontDataForSizeAdvanced *p_data, int p_rect_margin, FT_Bitmap bitmap, int yofs, int xofs, const Vector2 &advance) const {
+ int w = bitmap.width;
+ int h = bitmap.rows;
+
+ int mw = w + p_rect_margin * 2;
+ int mh = h + p_rect_margin * 2;
+
+ ERR_FAIL_COND_V(mw > 4096, FontGlyph());
+ ERR_FAIL_COND_V(mh > 4096, FontGlyph());
+
+ int color_size = bitmap.pixel_mode == FT_PIXEL_MODE_BGRA ? 4 : 2;
+ Image::Format require_format = color_size == 4 ? Image::FORMAT_RGBA8 : Image::FORMAT_LA8;
+
+ FontTexturePosition tex_pos = find_texture_pos_for_glyph(p_data, color_size, require_format, mw, mh);
+ ERR_FAIL_COND_V(tex_pos.index < 0, FontGlyph());
+
+ // Fit character in char texture.
+
+ FontTexture &tex = p_data->textures.write[tex_pos.index];
+
+ {
+ uint8_t *wr = tex.imgdata.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs = ((i + tex_pos.y + p_rect_margin) * tex.texture_w + j + tex_pos.x + p_rect_margin) * color_size;
+ ERR_FAIL_COND_V(ofs >= tex.imgdata.size(), FontGlyph());
+ switch (bitmap.pixel_mode) {
+ case FT_PIXEL_MODE_MONO: {
+ int byte = i * bitmap.pitch + (j >> 3);
+ int bit = 1 << (7 - (j % 8));
+ wr[ofs + 0] = 255; //grayscale as 1
+ wr[ofs + 1] = (bitmap.buffer[byte] & bit) ? 255 : 0;
+ } break;
+ case FT_PIXEL_MODE_GRAY:
+ wr[ofs + 0] = 255; //grayscale as 1
+ wr[ofs + 1] = bitmap.buffer[i * bitmap.pitch + j];
+ //wr[ofs + 1] = 100;
+ break;
+ case FT_PIXEL_MODE_BGRA: {
+ int ofs_color = i * bitmap.pitch + (j << 2);
+ wr[ofs + 2] = bitmap.buffer[ofs_color + 0];
+ wr[ofs + 1] = bitmap.buffer[ofs_color + 1];
+ wr[ofs + 0] = bitmap.buffer[ofs_color + 2];
+ wr[ofs + 3] = bitmap.buffer[ofs_color + 3];
+ } break;
+ default:
+ ERR_FAIL_V_MSG(FontGlyph(), "Font uses unsupported pixel format: " + itos(bitmap.pixel_mode) + ".");
+ break;
+ }
+ }
+ }
+ }
+
+ // Blit to image and texture.
+ {
+ if (RenderingServer::get_singleton() != nullptr) {
+ Ref<Image> img = memnew(Image(tex.texture_w, tex.texture_h, 0, require_format, tex.imgdata));
+
+ if (tex.texture.is_null()) {
+ tex.texture.instantiate();
+ tex.texture->create_from_image(img);
+ } else {
+ tex.texture->update(img);
+ }
+ }
+ }
+
+ // Update height array.
+ for (int k = tex_pos.x; k < tex_pos.x + mw; k++) {
+ tex.offsets.write[k] = tex_pos.y + mh;
+ }
+
+ FontGlyph chr;
+ chr.advance = (advance * p_data->scale / p_data->oversampling).round();
+ chr.texture_idx = tex_pos.index;
+ chr.found = true;
+
+ chr.uv_rect = Rect2(tex_pos.x + p_rect_margin, tex_pos.y + p_rect_margin, w, h);
+ chr.rect.position = (Vector2(xofs, -yofs) * p_data->scale / p_data->oversampling).round();
+ chr.rect.size = chr.uv_rect.size * p_data->scale / p_data->oversampling;
+ return chr;
+}
#endif
- } else {
- return RID();
+
+/*************************************************************************/
+/* Font Cache */
+/*************************************************************************/
+
+_FORCE_INLINE_ bool TextServerAdvanced::_ensure_glyph(FontDataAdvanced *p_font_data, const Vector2i &p_size, int32_t p_glyph) const {
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(p_font_data, p_size), false);
+
+ FontDataForSizeAdvanced *fd = p_font_data->cache[p_size];
+ if (fd->glyph_map.has(p_glyph)) {
+ return fd->glyph_map[p_glyph].found;
}
- Error err = fd->load_from_file(p_filename, p_base_size);
- if (err != OK) {
- memdelete(fd);
- return RID();
+ if (p_glyph == 0) { // Non graphical or invalid glyph, do not render.
+ fd->glyph_map[p_glyph] = FontGlyph();
+ return true;
}
- return font_owner.make_rid(fd);
+#ifdef MODULE_FREETYPE_ENABLED
+ FontGlyph gl;
+ if (fd->face) {
+ FT_Int32 flags = FT_LOAD_DEFAULT;
+
+ bool outline = p_size.y > 0;
+ switch (p_font_data->hinting) {
+ case TextServer::HINTING_NONE:
+ flags |= FT_LOAD_NO_HINTING;
+ break;
+ case TextServer::HINTING_LIGHT:
+ flags |= FT_LOAD_TARGET_LIGHT;
+ break;
+ default:
+ flags |= FT_LOAD_TARGET_NORMAL;
+ break;
+ }
+ if (p_font_data->force_autohinter) {
+ flags |= FT_LOAD_FORCE_AUTOHINT;
+ }
+ if (outline) {
+ flags |= FT_LOAD_NO_BITMAP;
+ } else if (FT_HAS_COLOR(fd->face)) {
+ flags |= FT_LOAD_COLOR;
+ }
+
+ FT_Fixed v, h;
+ FT_Get_Advance(fd->face, p_glyph, flags, &h);
+ FT_Get_Advance(fd->face, p_glyph, flags | FT_LOAD_VERTICAL_LAYOUT, &v);
+
+ int error = FT_Load_Glyph(fd->face, p_glyph, flags);
+ if (error) {
+ fd->glyph_map[p_glyph] = FontGlyph();
+ ERR_FAIL_V_MSG(false, "FreeType: Failed to load glyph.");
+ }
+
+ if (!outline) {
+ if (!p_font_data->msdf) {
+ error = FT_Render_Glyph(fd->face->glyph, p_font_data->antialiased ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO);
+ }
+ FT_GlyphSlot slot = fd->face->glyph;
+ if (!error) {
+ if (p_font_data->msdf) {
+#ifdef MODULE_MSDFGEN_ENABLED
+ gl = rasterize_msdf(p_font_data, fd, p_font_data->msdf_range, rect_range, &slot->outline, Vector2((h + (1 << 9)) >> 10, (v + (1 << 9)) >> 10) / 64.0);
+#else
+ fd->glyph_map[p_glyph] = FontGlyph();
+ ERR_FAIL_V_MSG(false, "Compiled without MSDFGEN support!");
+#endif
+ } else {
+ gl = rasterize_bitmap(fd, rect_range, slot->bitmap, slot->bitmap_top, slot->bitmap_left, Vector2((h + (1 << 9)) >> 10, (v + (1 << 9)) >> 10) / 64.0);
+ }
+ }
+ } else {
+ FT_Stroker stroker;
+ if (FT_Stroker_New(library, &stroker) != 0) {
+ fd->glyph_map[p_glyph] = FontGlyph();
+ ERR_FAIL_V_MSG(false, "FreeType: Failed to load glyph stroker.");
+ }
+
+ FT_Stroker_Set(stroker, (int)(fd->size.y * fd->oversampling * 16.0), FT_STROKER_LINECAP_BUTT, FT_STROKER_LINEJOIN_ROUND, 0);
+ FT_Glyph glyph;
+ FT_BitmapGlyph glyph_bitmap;
+
+ if (FT_Get_Glyph(fd->face->glyph, &glyph) != 0) {
+ goto cleanup_stroker;
+ }
+ if (FT_Glyph_Stroke(&glyph, stroker, 1) != 0) {
+ goto cleanup_glyph;
+ }
+ if (FT_Glyph_To_Bitmap(&glyph, p_font_data->antialiased ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO, nullptr, 1) != 0) {
+ goto cleanup_glyph;
+ }
+ glyph_bitmap = (FT_BitmapGlyph)glyph;
+ gl = rasterize_bitmap(fd, rect_range, glyph_bitmap->bitmap, glyph_bitmap->top, glyph_bitmap->left, Vector2());
+
+ cleanup_glyph:
+ FT_Done_Glyph(glyph);
+ cleanup_stroker:
+ FT_Stroker_Done(stroker);
+ }
+ fd->glyph_map[p_glyph] = gl;
+ return gl.found;
+ }
+#endif
+ fd->glyph_map[p_glyph] = FontGlyph();
+ return false;
}
-RID TextServerAdvanced::create_font_memory(const uint8_t *p_data, size_t p_size, const String &p_type, int p_base_size) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = nullptr;
- if (p_type == "fnt" || p_type == "font") {
- fd = memnew(BitmapFontDataAdvanced);
+_FORCE_INLINE_ bool TextServerAdvanced::_ensure_cache_for_size(FontDataAdvanced *p_font_data, const Vector2i &p_size) const {
+ if (p_font_data->cache.has(p_size)) {
+ return true;
+ }
+
+ FontDataForSizeAdvanced *fd = memnew(FontDataForSizeAdvanced);
+ fd->size = p_size;
+ if (p_font_data->data_ptr) {
+ // Init dynamic font.
#ifdef MODULE_FREETYPE_ENABLED
- } else if (p_type == "ttf" || p_type == "otf" || p_type == "woff") {
- fd = memnew(DynamicFontDataAdvanced);
+ int error = 0;
+ if (!library) {
+ error = FT_Init_FreeType(&library);
+ ERR_FAIL_COND_V_MSG(error != 0, false, "FreeType: Error initializing library: '" + String(FT_Error_String(error)) + "'.");
+ }
+
+ memset(&fd->stream, 0, sizeof(FT_StreamRec));
+ fd->stream.base = (unsigned char *)p_font_data->data_ptr;
+ fd->stream.size = p_font_data->data_size;
+ fd->stream.pos = 0;
+
+ FT_Open_Args fargs;
+ memset(&fargs, 0, sizeof(FT_Open_Args));
+ fargs.memory_base = (unsigned char *)p_font_data->data_ptr;
+ fargs.memory_size = p_font_data->data_size;
+ fargs.flags = FT_OPEN_MEMORY;
+ fargs.stream = &fd->stream;
+ error = FT_Open_Face(library, &fargs, 0, &fd->face);
+ if (error) {
+ FT_Done_Face(fd->face);
+ fd->face = nullptr;
+ ERR_FAIL_V_MSG(false, "FreeType: Error loading font: '" + String(FT_Error_String(error)) + "'.");
+ }
+
+ if (p_font_data->msdf) {
+ fd->oversampling = 1.0f;
+ fd->size.x = p_font_data->msdf_source_size;
+ } else if (p_font_data->oversampling <= 0.0f) {
+ fd->oversampling = TS->font_get_global_oversampling();
+ } else {
+ fd->oversampling = p_font_data->oversampling;
+ }
+
+ if (FT_HAS_COLOR(fd->face) && fd->face->num_fixed_sizes > 0) {
+ int best_match = 0;
+ int diff = ABS(fd->size.x - ((int64_t)fd->face->available_sizes[0].width));
+ fd->scale = real_t(fd->size.x * fd->oversampling) / fd->face->available_sizes[0].width;
+ for (int i = 1; i < fd->face->num_fixed_sizes; i++) {
+ int ndiff = ABS(fd->size.x - ((int64_t)fd->face->available_sizes[i].width));
+ if (ndiff < diff) {
+ best_match = i;
+ diff = ndiff;
+ fd->scale = real_t(fd->size.x * fd->oversampling) / fd->face->available_sizes[i].width;
+ }
+ }
+ FT_Select_Size(fd->face, best_match);
+ } else {
+ FT_Set_Pixel_Sizes(fd->face, 0, fd->size.x * fd->oversampling);
+ }
+
+ fd->hb_handle = hb_ft_font_create(fd->face, nullptr);
+
+ fd->ascent = (fd->face->size->metrics.ascender / 64.0) / fd->oversampling * fd->scale;
+ fd->descent = (-fd->face->size->metrics.descender / 64.0) / fd->oversampling * fd->scale;
+ fd->underline_position = (-FT_MulFix(fd->face->underline_position, fd->face->size->metrics.y_scale) / 64.0) / fd->oversampling * fd->scale;
+ fd->underline_thickness = (FT_MulFix(fd->face->underline_thickness, fd->face->size->metrics.y_scale) / 64.0) / fd->oversampling * fd->scale;
+
+ if (!p_font_data->face_init) {
+ // Get supported scripts from OpenType font data.
+ p_font_data->supported_scripts.clear();
+ unsigned int count = hb_ot_layout_table_get_script_tags(hb_font_get_face(fd->hb_handle), HB_OT_TAG_GSUB, 0, nullptr, nullptr);
+ if (count != 0) {
+ hb_tag_t *script_tags = (hb_tag_t *)memalloc(count * sizeof(hb_tag_t));
+ hb_ot_layout_table_get_script_tags(hb_font_get_face(fd->hb_handle), HB_OT_TAG_GSUB, 0, &count, script_tags);
+ for (unsigned int i = 0; i < count; i++) {
+ p_font_data->supported_scripts.insert(script_tags[i]);
+ }
+ memfree(script_tags);
+ }
+ count = hb_ot_layout_table_get_script_tags(hb_font_get_face(fd->hb_handle), HB_OT_TAG_GPOS, 0, nullptr, nullptr);
+ if (count != 0) {
+ hb_tag_t *script_tags = (hb_tag_t *)memalloc(count * sizeof(hb_tag_t));
+ hb_ot_layout_table_get_script_tags(hb_font_get_face(fd->hb_handle), HB_OT_TAG_GPOS, 0, &count, script_tags);
+ for (unsigned int i = 0; i < count; i++) {
+ p_font_data->supported_scripts.insert(script_tags[i]);
+ }
+ memfree(script_tags);
+ }
+
+ // Get supported scripts from OS2 table.
+ TT_OS2 *os2 = (TT_OS2 *)FT_Get_Sfnt_Table(fd->face, FT_SFNT_OS2);
+ if (os2) {
+ if ((os2->ulUnicodeRange1 & 1L << 4) || (os2->ulUnicodeRange1 & 1L << 5) || (os2->ulUnicodeRange1 & 1L << 6) || (os2->ulUnicodeRange1 & 1L << 31) || (os2->ulUnicodeRange2 & 1L << 0) || (os2->ulUnicodeRange2 & 1L << 1) || (os2->ulUnicodeRange2 & 1L << 2) || (os2->ulUnicodeRange2 & 1L << 3) || (os2->ulUnicodeRange2 & 1L << 4) || (os2->ulUnicodeRange2 & 1L << 5) || (os2->ulUnicodeRange2 & 1L << 6) || (os2->ulUnicodeRange2 & 1L << 7) || (os2->ulUnicodeRange2 & 1L << 8) || (os2->ulUnicodeRange2 & 1L << 9) || (os2->ulUnicodeRange2 & 1L << 10) || (os2->ulUnicodeRange2 & 1L << 11) || (os2->ulUnicodeRange2 & 1L << 12) || (os2->ulUnicodeRange2 & 1L << 13) || (os2->ulUnicodeRange2 & 1L << 14) || (os2->ulUnicodeRange2 & 1L << 15) || (os2->ulUnicodeRange2 & 1L << 30) || (os2->ulUnicodeRange3 & 1L << 0) || (os2->ulUnicodeRange3 & 1L << 1) || (os2->ulUnicodeRange3 & 1L << 2) || (os2->ulUnicodeRange3 & 1L << 4) || (os2->ulUnicodeRange3 & 1L << 5) || (os2->ulUnicodeRange3 & 1L << 18) || (os2->ulUnicodeRange3 & 1L << 24) || (os2->ulUnicodeRange3 & 1L << 25) || (os2->ulUnicodeRange3 & 1L << 26) || (os2->ulUnicodeRange3 & 1L << 27) || (os2->ulUnicodeRange3 & 1L << 28) || (os2->ulUnicodeRange4 & 1L << 3) || (os2->ulUnicodeRange4 & 1L << 6) || (os2->ulUnicodeRange4 & 1L << 15) || (os2->ulUnicodeRange4 & 1L << 23) || (os2->ulUnicodeRange4 & 1L << 24) || (os2->ulUnicodeRange4 & 1L << 26)) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_COMMON);
+ }
+ if ((os2->ulUnicodeRange1 & 1L << 0) || (os2->ulUnicodeRange1 & 1L << 1) || (os2->ulUnicodeRange1 & 1L << 2) || (os2->ulUnicodeRange1 & 1L << 3) || (os2->ulUnicodeRange1 & 1L << 29)) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_LATIN);
+ }
+ if ((os2->ulUnicodeRange1 & 1L << 7) || (os2->ulUnicodeRange1 & 1L << 30)) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_GREEK);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 8) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_COPTIC);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 9) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_CYRILLIC);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 10) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_ARMENIAN);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 11) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_HEBREW);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 12) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_VAI);
+ }
+ if ((os2->ulUnicodeRange1 & 1L << 13) || (os2->ulUnicodeRange2 & 1L << 31) || (os2->ulUnicodeRange3 & 1L << 3)) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_ARABIC);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 14) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_NKO);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 15) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_DEVANAGARI);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 16) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_BENGALI);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 17) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_GURMUKHI);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 18) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_GUJARATI);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 19) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_ORIYA);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 20) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_TAMIL);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 21) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_TELUGU);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 22) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_KANNADA);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 23) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_MALAYALAM);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 24) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_THAI);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 25) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_LAO);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 26) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_GEORGIAN);
+ }
+ if (os2->ulUnicodeRange1 & 1L << 27) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_BALINESE);
+ }
+ if ((os2->ulUnicodeRange1 & 1L << 28) || (os2->ulUnicodeRange2 & 1L << 20) || (os2->ulUnicodeRange2 & 1L << 24)) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_HANGUL);
+ }
+ if ((os2->ulUnicodeRange2 & 1L << 21) || (os2->ulUnicodeRange2 & 1L << 22) || (os2->ulUnicodeRange2 & 1L << 23) || (os2->ulUnicodeRange2 & 1L << 26) || (os2->ulUnicodeRange2 & 1L << 27) || (os2->ulUnicodeRange2 & 1L << 29)) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_HAN);
+ }
+ if (os2->ulUnicodeRange2 & 1L << 17) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_HIRAGANA);
+ }
+ if (os2->ulUnicodeRange2 & 1L << 18) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_KATAKANA);
+ }
+ if (os2->ulUnicodeRange2 & 1L << 19) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_BOPOMOFO);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 6) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_TIBETAN);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 7) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_SYRIAC);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 8) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_THAANA);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 9) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_SINHALA);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 10) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_MYANMAR);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 11) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_ETHIOPIC);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 12) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_CHEROKEE);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 13) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_CANADIAN_SYLLABICS);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 14) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_OGHAM);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 15) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_RUNIC);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 16) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_KHMER);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 17) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_MONGOLIAN);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 19) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_YI);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 20) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_HANUNOO);
+ p_font_data->supported_scripts.insert(HB_SCRIPT_TAGBANWA);
+ p_font_data->supported_scripts.insert(HB_SCRIPT_BUHID);
+ p_font_data->supported_scripts.insert(HB_SCRIPT_TAGALOG);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 21) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_OLD_ITALIC);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 22) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_GOTHIC);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 23) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_DESERET);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 29) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_LIMBU);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 30) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_TAI_LE);
+ }
+ if (os2->ulUnicodeRange3 & 1L << 31) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_NEW_TAI_LUE);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 0) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_BUGINESE);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 1) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_GLAGOLITIC);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 2) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_TIFINAGH);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 4) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_SYLOTI_NAGRI);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 5) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_LINEAR_B);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 7) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_UGARITIC);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 8) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_OLD_PERSIAN);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 9) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_SHAVIAN);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 10) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_OSMANYA);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 11) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_CYPRIOT);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 12) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_KHAROSHTHI);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 13) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_TAI_VIET);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 14) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_CUNEIFORM);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 16) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_SUNDANESE);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 17) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_LEPCHA);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 18) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_OL_CHIKI);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 19) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_SAURASHTRA);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 20) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_KAYAH_LI);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 21) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_REJANG);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 22) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_CHAM);
+ }
+ if (os2->ulUnicodeRange4 & 1L << 25) {
+ p_font_data->supported_scripts.insert(HB_SCRIPT_ANATOLIAN_HIEROGLYPHS);
+ }
+ }
+
+ // Read OpenType feature tags.
+ p_font_data->supported_features.clear();
+ count = hb_ot_layout_table_get_feature_tags(hb_font_get_face(fd->hb_handle), HB_OT_TAG_GSUB, 0, nullptr, nullptr);
+ if (count != 0) {
+ hb_tag_t *feature_tags = (hb_tag_t *)memalloc(count * sizeof(hb_tag_t));
+ hb_ot_layout_table_get_feature_tags(hb_font_get_face(fd->hb_handle), HB_OT_TAG_GSUB, 0, &count, feature_tags);
+ for (unsigned int i = 0; i < count; i++) {
+ p_font_data->supported_features[feature_tags[i]] = 1;
+ }
+ memfree(feature_tags);
+ }
+ count = hb_ot_layout_table_get_feature_tags(hb_font_get_face(fd->hb_handle), HB_OT_TAG_GPOS, 0, nullptr, nullptr);
+ if (count != 0) {
+ hb_tag_t *feature_tags = (hb_tag_t *)memalloc(count * sizeof(hb_tag_t));
+ hb_ot_layout_table_get_feature_tags(hb_font_get_face(fd->hb_handle), HB_OT_TAG_GPOS, 0, &count, feature_tags);
+ for (unsigned int i = 0; i < count; i++) {
+ p_font_data->supported_features[feature_tags[i]] = 1;
+ }
+ memfree(feature_tags);
+ }
+
+ // Read OpenType variations.
+ p_font_data->supported_varaitions.clear();
+ if (fd->face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS) {
+ FT_MM_Var *amaster;
+ FT_Get_MM_Var(fd->face, &amaster);
+ for (FT_UInt i = 0; i < amaster->num_axis; i++) {
+ p_font_data->supported_varaitions[(int32_t)amaster->axis[i].tag] = Vector3i(amaster->axis[i].minimum / 65536, amaster->axis[i].maximum / 65536, amaster->axis[i].def / 65536);
+ }
+ FT_Done_MM_Var(library, amaster);
+ }
+ p_font_data->face_init = true;
+ }
+
+ // Write variations.
+ if (fd->face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS) {
+ FT_MM_Var *amaster;
+
+ FT_Get_MM_Var(fd->face, &amaster);
+
+ Vector<hb_variation_t> hb_vars;
+ Vector<FT_Fixed> coords;
+ coords.resize(amaster->num_axis);
+
+ FT_Get_Var_Design_Coordinates(fd->face, coords.size(), coords.ptrw());
+
+ for (FT_UInt i = 0; i < amaster->num_axis; i++) {
+ hb_variation_t var;
+
+ // Reset to default.
+ var.tag = amaster->axis[i].tag;
+ var.value = (double)amaster->axis[i].def / 65536.f;
+ coords.write[i] = amaster->axis[i].def;
+
+ if (p_font_data->variation_coordinates.has(var.tag)) {
+ var.value = p_font_data->variation_coordinates[var.tag];
+ coords.write[i] = CLAMP(var.value * 65536.f, amaster->axis[i].minimum, amaster->axis[i].maximum);
+ }
+
+ if (p_font_data->variation_coordinates.has(tag_to_name(var.tag))) {
+ var.value = p_font_data->variation_coordinates[tag_to_name(var.tag)];
+ coords.write[i] = CLAMP(var.value * 65536.f, amaster->axis[i].minimum, amaster->axis[i].maximum);
+ }
+
+ hb_vars.push_back(var);
+ }
+
+ FT_Set_Var_Design_Coordinates(fd->face, coords.size(), coords.ptrw());
+ hb_font_set_variations(fd->hb_handle, hb_vars.is_empty() ? nullptr : &hb_vars[0], hb_vars.size());
+ FT_Done_MM_Var(library, amaster);
+ }
+#else
+ ERR_FAIL_V_MSG(false, "FreeType: Can't load dynamic font, engine is compiled without FreeType support!");
#endif
} else {
- return RID();
+ // Init bitmap font.
+ fd->hb_handle = hb_bmp_font_create(fd, nullptr);
}
+ p_font_data->cache[p_size] = fd;
+ return true;
+}
- Error err = fd->load_from_memory(p_data, p_size, p_base_size);
- if (err != OK) {
- memdelete(fd);
- return RID();
+_FORCE_INLINE_ void TextServerAdvanced::_font_clear_cache(FontDataAdvanced *p_font_data) {
+ for (const Map<Vector2i, FontDataForSizeAdvanced *>::Element *E = p_font_data->cache.front(); E; E = E->next()) {
+ memdelete(E->get());
}
+ p_font_data->cache.clear();
+ p_font_data->face_init = false;
+ p_font_data->supported_features.clear();
+ p_font_data->supported_varaitions.clear();
+ p_font_data->supported_scripts.clear();
+}
+
+hb_font_t *TextServerAdvanced::_font_get_hb_handle(RID p_font_rid, int p_size) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, nullptr);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), nullptr);
+
+ return fd->cache[size]->hb_handle;
+}
+
+RID TextServerAdvanced::create_font() {
+ FontDataAdvanced *fd = memnew(FontDataAdvanced);
return font_owner.make_rid(fd);
}
-RID TextServerAdvanced::create_font_bitmap(float p_height, float p_ascent, int p_base_size) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = memnew(BitmapFontDataAdvanced);
- Error err = fd->bitmap_new(p_height, p_ascent, p_base_size);
- if (err != OK) {
- memdelete(fd);
- return RID();
+void TextServerAdvanced::font_set_data(RID p_font_rid, const PackedByteArray &p_data) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ _font_clear_cache(fd);
+ fd->data = p_data;
+ fd->data_ptr = fd->data.ptr();
+ fd->data_size = fd->data.size();
+}
+
+void TextServerAdvanced::font_set_data_ptr(RID p_font_rid, const uint8_t *p_data_ptr, size_t p_data_size) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ _font_clear_cache(fd);
+ fd->data.clear();
+ fd->data_ptr = p_data_ptr;
+ fd->data_size = p_data_size;
+}
+
+void TextServerAdvanced::font_set_antialiased(RID p_font_rid, bool p_antialiased) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->antialiased != p_antialiased) {
+ _font_clear_cache(fd);
+ fd->antialiased = p_antialiased;
}
+}
- return font_owner.make_rid(fd);
+bool TextServerAdvanced::font_is_antialiased(RID p_font_rid) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->antialiased;
}
-void TextServerAdvanced::font_bitmap_add_texture(RID p_font, const Ref<Texture> &p_texture) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+void TextServerAdvanced::font_set_multichannel_signed_distance_field(RID p_font_rid, bool p_msdf) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->bitmap_add_texture(p_texture);
+
+ MutexLock lock(fd->mutex);
+ if (fd->msdf != p_msdf) {
+ _font_clear_cache(fd);
+ fd->msdf = p_msdf;
+ }
}
-void TextServerAdvanced::font_bitmap_add_char(RID p_font, char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+bool TextServerAdvanced::font_is_multichannel_signed_distance_field(RID p_font_rid) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->msdf;
+}
+
+void TextServerAdvanced::font_set_msdf_pixel_range(RID p_font_rid, int p_msdf_pixel_range) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->bitmap_add_char(p_char, p_texture_idx, p_rect, p_align, p_advance);
+
+ MutexLock lock(fd->mutex);
+ if (fd->msdf_range != p_msdf_pixel_range) {
+ _font_clear_cache(fd);
+ fd->msdf_range = p_msdf_pixel_range;
+ }
}
-void TextServerAdvanced::font_bitmap_add_kerning_pair(RID p_font, char32_t p_A, char32_t p_B, int p_kerning) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+int TextServerAdvanced::font_get_msdf_pixel_range(RID p_font_rid) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->msdf_range;
+}
+
+void TextServerAdvanced::font_set_msdf_size(RID p_font_rid, int p_msdf_size) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->bitmap_add_kerning_pair(p_A, p_B, p_kerning);
+
+ MutexLock lock(fd->mutex);
+ if (fd->msdf_source_size != p_msdf_size) {
+ _font_clear_cache(fd);
+ fd->msdf_source_size = p_msdf_size;
+ }
}
-float TextServerAdvanced::font_get_height(RID p_font, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
+int TextServerAdvanced::font_get_msdf_size(RID p_font_rid) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->msdf_source_size;
+}
+
+void TextServerAdvanced::font_set_fixed_size(RID p_font_rid, int p_fixed_size) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->fixed_size != p_fixed_size) {
+ fd->fixed_size = p_fixed_size;
+ }
+}
+
+int TextServerAdvanced::font_get_fixed_size(RID p_font_rid) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->fixed_size;
+}
+
+void TextServerAdvanced::font_set_force_autohinter(RID p_font_rid, bool p_force_autohinter) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->force_autohinter != p_force_autohinter) {
+ _font_clear_cache(fd);
+ fd->force_autohinter = p_force_autohinter;
+ }
+}
+
+bool TextServerAdvanced::font_is_force_autohinter(RID p_font_rid) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->force_autohinter;
+}
+
+void TextServerAdvanced::font_set_hinting(RID p_font_rid, TextServer::Hinting p_hinting) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->hinting != p_hinting) {
+ _font_clear_cache(fd);
+ fd->hinting = p_hinting;
+ }
+}
+
+TextServer::Hinting TextServerAdvanced::font_get_hinting(RID p_font_rid) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, HINTING_NONE);
+
+ MutexLock lock(fd->mutex);
+ return fd->hinting;
+}
+
+void TextServerAdvanced::font_set_variation_coordinates(RID p_font_rid, const Dictionary &p_variation_coordinates) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->variation_coordinates != p_variation_coordinates) {
+ _font_clear_cache(fd);
+ fd->variation_coordinates = p_variation_coordinates;
+ }
+}
+
+Dictionary TextServerAdvanced::font_get_variation_coordinates(RID p_font_rid) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Dictionary());
+
+ MutexLock lock(fd->mutex);
+ return fd->variation_coordinates;
+}
+
+void TextServerAdvanced::font_set_oversampling(RID p_font_rid, real_t p_oversampling) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->oversampling != p_oversampling) {
+ _font_clear_cache(fd);
+ fd->oversampling = p_oversampling;
+ }
+}
+
+real_t TextServerAdvanced::font_get_oversampling(RID p_font_rid) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.f);
- return fd->get_height(p_size);
+
+ MutexLock lock(fd->mutex);
+ return fd->oversampling;
}
-float TextServerAdvanced::font_get_ascent(RID p_font, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
+Array TextServerAdvanced::font_get_size_cache_list(RID p_font_rid) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Array());
+
+ MutexLock lock(fd->mutex);
+ Array ret;
+ for (const Map<Vector2i, FontDataForSizeAdvanced *>::Element *E = fd->cache.front(); E; E = E->next()) {
+ ret.push_back(E->key());
+ }
+ return ret;
+}
+
+void TextServerAdvanced::font_clear_size_cache(RID p_font_rid) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ for (const Map<Vector2i, FontDataForSizeAdvanced *>::Element *E = fd->cache.front(); E; E = E->next()) {
+ memdelete(E->get());
+ }
+ fd->cache.clear();
+}
+
+void TextServerAdvanced::font_remove_size_cache(RID p_font_rid, const Vector2i &p_size) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->cache.has(p_size)) {
+ memdelete(fd->cache[p_size]);
+ fd->cache.erase(p_size);
+ }
+}
+
+void TextServerAdvanced::font_set_ascent(RID p_font_rid, int p_size, real_t p_ascent) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->ascent = p_ascent;
+}
+
+real_t TextServerAdvanced::font_get_ascent(RID p_font_rid, int p_size) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.f);
- return fd->get_ascent(p_size);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0.f);
+
+ if (fd->msdf) {
+ return fd->cache[size]->ascent * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->ascent;
+ }
}
-float TextServerAdvanced::font_get_descent(RID p_font, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
+void TextServerAdvanced::font_set_descent(RID p_font_rid, int p_size, real_t p_descent) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->descent = p_descent;
+}
+
+real_t TextServerAdvanced::font_get_descent(RID p_font_rid, int p_size) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.f);
- return fd->get_descent(p_size);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0.f);
+
+ if (fd->msdf) {
+ return fd->cache[size]->descent * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->descent;
+ }
}
-float TextServerAdvanced::font_get_underline_position(RID p_font, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
+void TextServerAdvanced::font_set_underline_position(RID p_font_rid, int p_size, real_t p_underline_position) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->underline_position = p_underline_position;
+}
+
+real_t TextServerAdvanced::font_get_underline_position(RID p_font_rid, int p_size) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.f);
- return fd->get_underline_position(p_size);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0.f);
+
+ if (fd->msdf) {
+ return fd->cache[size]->underline_position * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->underline_position;
+ }
}
-float TextServerAdvanced::font_get_underline_thickness(RID p_font, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
+void TextServerAdvanced::font_set_underline_thickness(RID p_font_rid, int p_size, real_t p_underline_thickness) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->underline_thickness = p_underline_thickness;
+}
+
+real_t TextServerAdvanced::font_get_underline_thickness(RID p_font_rid, int p_size) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.f);
- return fd->get_underline_thickness(p_size);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0.f);
+
+ if (fd->msdf) {
+ return fd->cache[size]->underline_thickness * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->underline_thickness;
+ }
}
-int TextServerAdvanced::font_get_spacing_space(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, 0);
- return fd->get_spacing_space();
+void TextServerAdvanced::font_set_scale(RID p_font_rid, int p_size, real_t p_scale) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->scale = p_scale;
}
-void TextServerAdvanced::font_set_spacing_space(RID p_font, int p_value) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+real_t TextServerAdvanced::font_get_scale(RID p_font_rid, int p_size) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, 0.f);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0.f);
+
+ if (fd->msdf) {
+ return fd->cache[size]->scale * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->scale / fd->cache[size]->oversampling;
+ }
+}
+
+void TextServerAdvanced::font_set_spacing(RID p_font_rid, int p_size, TextServer::SpacingType p_spacing, int p_value) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->set_spacing_space(p_value);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ switch (p_spacing) {
+ case TextServer::SPACING_GLYPH: {
+ fd->cache[size]->spacing_glyph = p_value;
+ } break;
+ case TextServer::SPACING_SPACE: {
+ fd->cache[size]->spacing_space = p_value;
+ } break;
+ default: {
+ ERR_FAIL_MSG("Invalid spacing type: " + itos(p_spacing));
+ } break;
+ }
}
-int TextServerAdvanced::font_get_spacing_glyph(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
+int TextServerAdvanced::font_get_spacing(RID p_font_rid, int p_size, TextServer::SpacingType p_spacing) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0);
- return fd->get_spacing_glyph();
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0);
+
+ switch (p_spacing) {
+ case TextServer::SPACING_GLYPH: {
+ if (fd->msdf) {
+ return fd->cache[size]->spacing_glyph * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->spacing_glyph;
+ }
+ } break;
+ case TextServer::SPACING_SPACE: {
+ if (fd->msdf) {
+ return fd->cache[size]->spacing_space * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->spacing_space;
+ }
+ } break;
+ default: {
+ ERR_FAIL_V_MSG(0, "Invalid spacing type: " + itos(p_spacing));
+ } break;
+ }
+ return 0;
}
-void TextServerAdvanced::font_set_spacing_glyph(RID p_font, int p_value) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+int TextServerAdvanced::font_get_texture_count(RID p_font_rid, const Vector2i &p_size) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, 0);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0);
+
+ return fd->cache[size]->textures.size();
+}
+
+void TextServerAdvanced::font_clear_textures(RID p_font_rid, const Vector2i &p_size) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->set_spacing_glyph(p_value);
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->textures.clear();
}
-void TextServerAdvanced::font_set_antialiased(RID p_font, bool p_antialiased) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+void TextServerAdvanced::font_remove_texture(RID p_font_rid, const Vector2i &p_size, int p_texture_index) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->set_antialiased(p_antialiased);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ ERR_FAIL_INDEX(p_texture_index, fd->cache[size]->textures.size());
+
+ fd->cache[size]->textures.remove(p_texture_index);
}
-Dictionary TextServerAdvanced::font_get_feature_list(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, Dictionary());
- return fd->get_feature_list();
+void TextServerAdvanced::font_set_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const Ref<Image> &p_image) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+ ERR_FAIL_COND(p_image.is_null());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ ERR_FAIL_COND(p_texture_index < 0);
+ if (p_texture_index >= fd->cache[size]->textures.size()) {
+ fd->cache[size]->textures.resize(p_texture_index + 1);
+ }
+
+ FontTexture &tex = fd->cache[size]->textures.write[p_texture_index];
+
+ tex.imgdata = p_image->get_data();
+ tex.texture_w = p_image->get_width();
+ tex.texture_h = p_image->get_height();
+ tex.format = p_image->get_format();
+
+ Ref<Image> img = memnew(Image(tex.texture_w, tex.texture_h, 0, tex.format, tex.imgdata));
+ tex.texture = Ref<ImageTexture>();
+ tex.texture.instantiate();
+ tex.texture->create_from_image(img);
}
-bool TextServerAdvanced::font_get_antialiased(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, false);
- return fd->get_antialiased();
+Ref<Image> TextServerAdvanced::font_get_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Ref<Image>());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Ref<Image>());
+ ERR_FAIL_INDEX_V(p_texture_index, fd->cache[size]->textures.size(), Ref<Image>());
+
+ const FontTexture &tex = fd->cache[size]->textures.write[p_texture_index];
+ Ref<Image> img = memnew(Image(tex.texture_w, tex.texture_h, 0, tex.format, tex.imgdata));
+
+ return img;
}
-Dictionary TextServerAdvanced::font_get_variation_list(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, Dictionary());
- return fd->get_variation_list();
+void TextServerAdvanced::font_set_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const PackedInt32Array &p_offset) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ if (p_texture_index >= fd->cache[size]->textures.size()) {
+ fd->cache[size]->textures.resize(p_texture_index + 1);
+ }
+
+ FontTexture &tex = fd->cache[size]->textures.write[p_texture_index];
+ tex.offsets = p_offset;
}
-void TextServerAdvanced::font_set_variation(RID p_font, const String &p_name, double p_value) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+PackedInt32Array TextServerAdvanced::font_get_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, PackedInt32Array());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), PackedInt32Array());
+ ERR_FAIL_INDEX_V(p_texture_index, fd->cache[size]->textures.size(), PackedInt32Array());
+
+ const FontTexture &tex = fd->cache[size]->textures.write[p_texture_index];
+ return tex.offsets;
+}
+
+Array TextServerAdvanced::font_get_glyph_list(RID p_font_rid, const Vector2i &p_size) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Array());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Array());
+
+ Array ret;
+ const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+ const int32_t *E = nullptr;
+ while ((E = gl.next(E))) {
+ ret.push_back(*E);
+ }
+ return ret;
+}
+
+void TextServerAdvanced::font_clear_glyphs(RID p_font_rid, const Vector2i &p_size) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->set_variation(p_name, p_value);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ fd->cache[size]->glyph_map.clear();
}
-double TextServerAdvanced::font_get_variation(RID p_font, const String &p_name) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, 0);
- return fd->get_variation(p_name);
+void TextServerAdvanced::font_remove_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ fd->cache[size]->glyph_map.erase(p_glyph);
}
-void TextServerAdvanced::font_set_distance_field_hint(RID p_font, bool p_distance_field) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+Vector2 TextServerAdvanced::font_get_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Vector2());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Vector2());
+ if (!_ensure_glyph(fd, size, p_glyph)) {
+ return Vector2(); // Invalid or non graphicl glyph, do not display errors.
+ }
+
+ const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ if (fd->msdf) {
+ return gl[p_glyph].advance * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return gl[p_glyph].advance;
+ }
+}
+
+void TextServerAdvanced::font_set_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph, const Vector2 &p_advance) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->set_distance_field_hint(p_distance_field);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ gl[p_glyph].advance = p_advance;
+ gl[p_glyph].found = true;
}
-bool TextServerAdvanced::font_get_distance_field_hint(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, false);
- return fd->get_distance_field_hint();
+Vector2 TextServerAdvanced::font_get_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Vector2());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Vector2());
+ if (!_ensure_glyph(fd, size, p_glyph)) {
+ return Vector2(); // Invalid or non graphicl glyph, do not display errors.
+ }
+
+ const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ if (fd->msdf) {
+ return gl[p_glyph].rect.position * (real_t)p_size.x / (real_t)fd->msdf_source_size;
+ } else {
+ return gl[p_glyph].rect.position;
+ }
}
-void TextServerAdvanced::font_set_hinting(RID p_font, TextServer::Hinting p_hinting) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+void TextServerAdvanced::font_set_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_offset) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->set_hinting(p_hinting);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ gl[p_glyph].rect.position = p_offset;
+ gl[p_glyph].found = true;
}
-TextServer::Hinting TextServerAdvanced::font_get_hinting(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, TextServer::HINTING_NONE);
- return fd->get_hinting();
+Vector2 TextServerAdvanced::font_get_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Vector2());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Vector2());
+ if (!_ensure_glyph(fd, size, p_glyph)) {
+ return Vector2(); // Invalid or non graphicl glyph, do not display errors.
+ }
+
+ const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ if (fd->msdf) {
+ return gl[p_glyph].rect.size * (real_t)p_size.x / (real_t)fd->msdf_source_size;
+ } else {
+ return gl[p_glyph].rect.size;
+ }
}
-void TextServerAdvanced::font_set_force_autohinter(RID p_font, bool p_enabeld) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+void TextServerAdvanced::font_set_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_gl_size) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ gl[p_glyph].rect.size = p_gl_size;
+ gl[p_glyph].found = true;
+}
+
+Rect2 TextServerAdvanced::font_get_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Rect2());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Rect2());
+ if (!_ensure_glyph(fd, size, p_glyph)) {
+ return Rect2(); // Invalid or non graphicl glyph, do not display errors.
+ }
+
+ const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+ return gl[p_glyph].uv_rect;
+}
+
+void TextServerAdvanced::font_set_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Rect2 &p_uv_rect) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->set_force_autohinter(p_enabeld);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ gl[p_glyph].uv_rect = p_uv_rect;
+ gl[p_glyph].found = true;
}
-bool TextServerAdvanced::font_get_force_autohinter(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
+int TextServerAdvanced::font_get_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, -1);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), -1);
+ if (!_ensure_glyph(fd, size, p_glyph)) {
+ return -1; // Invalid or non graphicl glyph, do not display errors.
+ }
+
+ const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+ return gl[p_glyph].texture_idx;
+}
+
+void TextServerAdvanced::font_set_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, int p_texture_idx) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ gl[p_glyph].texture_idx = p_texture_idx;
+ gl[p_glyph].found = true;
+}
+
+bool TextServerAdvanced::font_get_glyph_contours(RID p_font_rid, int p_size, int32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
- return fd->get_force_autohinter();
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), false);
+
+#ifdef MODULE_FREETYPE_ENABLED
+ int error = FT_Load_Glyph(fd->cache[size]->face, p_index, FT_LOAD_NO_BITMAP | (fd->force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0));
+ ERR_FAIL_COND_V(error, false);
+
+ r_points.clear();
+ r_contours.clear();
+
+ real_t h = fd->cache[size]->ascent;
+ real_t scale = (1.0 / 64.0) / fd->cache[size]->oversampling * fd->cache[size]->scale;
+ if (fd->msdf) {
+ scale = scale * (real_t)p_size / (real_t)fd->msdf_source_size;
+ }
+ for (short i = 0; i < fd->cache[size]->face->glyph->outline.n_points; i++) {
+ r_points.push_back(Vector3(fd->cache[size]->face->glyph->outline.points[i].x * scale, h - fd->cache[size]->face->glyph->outline.points[i].y * scale, FT_CURVE_TAG(fd->cache[size]->face->glyph->outline.tags[i])));
+ }
+ for (short i = 0; i < fd->cache[size]->face->glyph->outline.n_contours; i++) {
+ r_contours.push_back(fd->cache[size]->face->glyph->outline.contours[i]);
+ }
+ r_orientation = (FT_Outline_Get_Orientation(&fd->cache[size]->face->glyph->outline) == FT_ORIENTATION_FILL_RIGHT);
+#else
+ return false;
+#endif
+ return true;
}
-bool TextServerAdvanced::font_has_char(RID p_font, char32_t p_char) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
+Array TextServerAdvanced::font_get_kerning_list(RID p_font_rid, int p_size) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Array());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Array());
+
+ Array ret;
+ for (const Map<Vector2i, Vector2>::Element *E = fd->cache[size]->kerning_map.front(); E; E = E->next()) {
+ ret.push_back(E->key());
+ }
+ return ret;
+}
+
+void TextServerAdvanced::font_clear_kerning_map(RID p_font_rid, int p_size) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->kerning_map.clear();
+}
+
+void TextServerAdvanced::font_remove_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->kerning_map.erase(p_glyph_pair);
+}
+
+void TextServerAdvanced::font_set_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->kerning_map[p_glyph_pair] = p_kerning;
+}
+
+Vector2 TextServerAdvanced::font_get_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Vector2());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Vector2());
+
+ const Map<Vector2i, Vector2> &kern = fd->cache[size]->kerning_map;
+
+ if (kern.has(p_glyph_pair)) {
+ if (fd->msdf) {
+ return kern[p_glyph_pair] * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return kern[p_glyph_pair];
+ }
+ } else {
+#ifdef MODULE_FREETYPE_ENABLED
+ if (fd->cache[size]->face) {
+ FT_Vector delta;
+ FT_Get_Kerning(fd->cache[size]->face, p_glyph_pair.x, p_glyph_pair.y, FT_KERNING_DEFAULT, &delta);
+ if (fd->msdf) {
+ return Vector2(delta.x, delta.y) * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return Vector2(delta.x, delta.y);
+ }
+ }
+#endif
+ }
+ return Vector2();
+}
+
+int32_t TextServerAdvanced::font_get_glyph_index(RID p_font_rid, int p_size, char32_t p_char, char32_t p_variation_selector) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, 0);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0);
+
+#ifdef MODULE_FREETYPE_ENABLED
+ if (fd->cache[size]->face) {
+ if (p_variation_selector) {
+ return FT_Face_GetCharVariantIndex(fd->cache[size]->face, p_char, p_variation_selector);
+ } else {
+ return FT_Get_Char_Index(fd->cache[size]->face, p_char);
+ }
+ } else {
+ return 0;
+ }
+#else
+ return (int32_t)p_char;
+#endif
+}
+
+bool TextServerAdvanced::font_has_char(RID p_font_rid, char32_t p_char) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
- return fd->has_char(p_char);
+
+ MutexLock lock(fd->mutex);
+ if (fd->cache.is_empty()) {
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, fd->msdf ? Vector2i(fd->msdf_source_size, 0) : Vector2i(16, 0)), false);
+ }
+ FontDataForSizeAdvanced *at_size = fd->cache.front()->get();
+
+#ifdef MODULE_FREETYPE_ENABLED
+ if (at_size && at_size->face) {
+ return FT_Get_Char_Index(at_size->face, p_char) != 0;
+ }
+#endif
+ return (at_size) ? at_size->glyph_map.has((int32_t)p_char) : false;
}
-String TextServerAdvanced::font_get_supported_chars(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
+String TextServerAdvanced::font_get_supported_chars(RID p_font_rid) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, String());
- return fd->get_supported_chars();
+
+ MutexLock lock(fd->mutex);
+ if (fd->cache.is_empty()) {
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, fd->msdf ? Vector2i(fd->msdf_source_size, 0) : Vector2i(16, 0)), String());
+ }
+ FontDataForSizeAdvanced *at_size = fd->cache.front()->get();
+
+ String chars;
+#ifdef MODULE_FREETYPE_ENABLED
+ if (at_size && at_size->face) {
+ FT_UInt gindex;
+ FT_ULong charcode = FT_Get_First_Char(at_size->face, &gindex);
+ while (gindex != 0) {
+ if (charcode != 0) {
+ chars += char32_t(charcode);
+ }
+ charcode = FT_Get_Next_Char(at_size->face, charcode, &gindex);
+ }
+ return chars;
+ }
+#endif
+ if (at_size) {
+ const HashMap<int32_t, FontGlyph> &gl = at_size->glyph_map;
+ const int32_t *E = nullptr;
+ while ((E = gl.next(E))) {
+ chars += char32_t(*E);
+ }
+ }
+ return chars;
}
-bool TextServerAdvanced::font_has_outline(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, false);
- return fd->has_outline();
+void TextServerAdvanced::font_render_range(RID p_font_rid, const Vector2i &p_size, char32_t p_start, char32_t p_end) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ for (char32_t i = p_start; i <= p_end; i++) {
+#ifdef MODULE_FREETYPE_ENABLED
+ if (fd->cache[size]->face) {
+ _ensure_glyph(fd, size, FT_Get_Char_Index(fd->cache[size]->face, i));
+ continue;
+ }
+#endif
+ _ensure_glyph(fd, size, (int32_t)i);
+ }
}
-float TextServerAdvanced::font_get_base_size(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, 0.f);
- return fd->get_base_size();
+void TextServerAdvanced::font_render_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_index) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ ERR_FAIL_COND(!_ensure_glyph(fd, size, p_index));
}
-bool TextServerAdvanced::font_is_language_supported(RID p_font, const String &p_language) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, false);
- if (fd->lang_support_overrides.has(p_language)) {
- return fd->lang_support_overrides[p_language];
- } else {
- Vector<String> tags = p_language.replace("-", "_").split("_");
- if (tags.size() > 0) {
- if (fd->lang_support_overrides.has(tags[0])) {
- return fd->lang_support_overrides[tags[0]];
+void TextServerAdvanced::font_draw_glyph(RID p_font_rid, RID p_canvas, int p_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ if (!_ensure_glyph(fd, size, p_index)) {
+ return; // // Invalid or non graphicl glyph, do not display errors, nothing to draw.
+ }
+
+ const FontGlyph &gl = fd->cache[size]->glyph_map[p_index];
+ if (gl.found) {
+ ERR_FAIL_COND(gl.texture_idx < -1 || gl.texture_idx >= fd->cache[size]->textures.size());
+
+ if (gl.texture_idx != -1) {
+ Color modulate = p_color;
+#ifdef MODULE_FREETYPE_ENABLED
+ if (fd->cache[size]->face && FT_HAS_COLOR(fd->cache[size]->face)) {
+ modulate.r = modulate.g = modulate.b = 1.0;
+ }
+#endif
+ if (RenderingServer::get_singleton() != nullptr) {
+ RID texture = fd->cache[size]->textures[gl.texture_idx].texture->get_rid();
+ if (fd->msdf) {
+ Point2 cpos = p_pos;
+ cpos += gl.rect.position * (real_t)p_size / (real_t)fd->msdf_source_size;
+ Size2 csize = gl.rect.size * (real_t)p_size / (real_t)fd->msdf_source_size;
+ RenderingServer::get_singleton()->canvas_item_add_msdf_texture_rect_region(p_canvas, Rect2(cpos, csize), texture, gl.uv_rect, modulate, 0, fd->msdf_range);
+ } else {
+ Point2i cpos = p_pos;
+ cpos += gl.rect.position;
+ Size2i csize = gl.rect.size;
+ RenderingServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas, Rect2(cpos, csize), texture, gl.uv_rect, modulate, false, false);
+ }
}
}
- return fd->is_lang_supported(p_language);
}
}
-void TextServerAdvanced::font_set_language_support_override(RID p_font, const String &p_language, bool p_supported) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+void TextServerAdvanced::font_draw_glyph_outline(RID p_font_rid, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->lang_support_overrides[p_language] = p_supported;
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, Vector2i(p_size, p_outline_size));
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ if (!_ensure_glyph(fd, size, p_index)) {
+ return; // // Invalid or non graphicl glyph, do not display errors, nothing to draw.
+ }
+
+ const FontGlyph &gl = fd->cache[size]->glyph_map[p_index];
+ if (gl.found) {
+ ERR_FAIL_COND(gl.texture_idx < -1 || gl.texture_idx >= fd->cache[size]->textures.size());
+
+ if (gl.texture_idx != -1) {
+ Color modulate = p_color;
+#ifdef MODULE_FREETYPE_ENABLED
+ if (fd->cache[size]->face && FT_HAS_COLOR(fd->cache[size]->face)) {
+ modulate.r = modulate.g = modulate.b = 1.0;
+ }
+#endif
+ if (RenderingServer::get_singleton() != nullptr) {
+ RID texture = fd->cache[size]->textures[gl.texture_idx].texture->get_rid();
+ if (fd->msdf) {
+ Point2 cpos = p_pos;
+ cpos += gl.rect.position * (real_t)p_size / (real_t)fd->msdf_source_size;
+ Size2 csize = gl.rect.size * (real_t)p_size / (real_t)fd->msdf_source_size;
+ RenderingServer::get_singleton()->canvas_item_add_msdf_texture_rect_region(p_canvas, Rect2(cpos, csize), texture, gl.uv_rect, modulate, p_outline_size * 2, fd->msdf_range);
+ } else {
+ Point2i cpos = p_pos;
+ cpos += gl.rect.position;
+ Size2i csize = gl.rect.size;
+ RenderingServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas, Rect2(cpos, csize), texture, gl.uv_rect, modulate, false, false);
+ }
+ }
+ }
+ }
}
-bool TextServerAdvanced::font_get_language_support_override(RID p_font, const String &p_language) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+bool TextServerAdvanced::font_is_language_supported(RID p_font_rid, const String &p_language) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
- return fd->lang_support_overrides[p_language];
+
+ MutexLock lock(fd->mutex);
+ if (fd->language_support_overrides.has(p_language)) {
+ return fd->language_support_overrides[p_language];
+ } else {
+ return true;
+ }
}
-void TextServerAdvanced::font_remove_language_support_override(RID p_font, const String &p_language) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+void TextServerAdvanced::font_set_language_support_override(RID p_font_rid, const String &p_language, bool p_supported) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->lang_support_overrides.erase(p_language);
+
+ MutexLock lock(fd->mutex);
+ fd->language_support_overrides[p_language] = p_supported;
}
-Vector<String> TextServerAdvanced::font_get_language_support_overrides(RID p_font) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+bool TextServerAdvanced::font_get_language_support_override(RID p_font_rid, const String &p_language) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->language_support_overrides[p_language];
+}
+
+void TextServerAdvanced::font_remove_language_support_override(RID p_font_rid, const String &p_language) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ fd->language_support_overrides.erase(p_language);
+}
+
+Vector<String> TextServerAdvanced::font_get_language_support_overrides(RID p_font_rid) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Vector<String>());
- Vector<String> ret;
- for (Map<String, bool>::Element *E = fd->lang_support_overrides.front(); E; E = E->next()) {
- ret.push_back(E->key());
+
+ MutexLock lock(fd->mutex);
+ Vector<String> out;
+ for (const Map<String, bool>::Element *E = fd->language_support_overrides.front(); E; E = E->next()) {
+ out.push_back(E->key());
}
- return ret;
+ return out;
}
-bool TextServerAdvanced::font_is_script_supported(RID p_font, const String &p_script) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
+bool TextServerAdvanced::font_is_script_supported(RID p_font_rid, const String &p_script) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
if (fd->script_support_overrides.has(p_script)) {
return fd->script_support_overrides[p_script];
} else {
- hb_script_t scr = hb_script_from_string(p_script.ascii().get_data(), -1);
- return fd->is_script_supported(scr);
+ Vector2i size = _get_size(fd, 16);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), false);
+ return fd->supported_scripts.has(TS->name_to_tag(p_script));
}
}
-void TextServerAdvanced::font_set_script_support_override(RID p_font, const String &p_script, bool p_supported) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+void TextServerAdvanced::font_set_script_support_override(RID p_font_rid, const String &p_script, bool p_supported) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
fd->script_support_overrides[p_script] = p_supported;
}
-bool TextServerAdvanced::font_get_script_support_override(RID p_font, const String &p_script) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+bool TextServerAdvanced::font_get_script_support_override(RID p_font_rid, const String &p_script) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
return fd->script_support_overrides[p_script];
}
-void TextServerAdvanced::font_remove_script_support_override(RID p_font, const String &p_script) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+void TextServerAdvanced::font_remove_script_support_override(RID p_font_rid, const String &p_script) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
fd->script_support_overrides.erase(p_script);
}
-Vector<String> TextServerAdvanced::font_get_script_support_overrides(RID p_font) {
- _THREAD_SAFE_METHOD_
- FontDataAdvanced *fd = font_owner.getornull(p_font);
+Vector<String> TextServerAdvanced::font_get_script_support_overrides(RID p_font_rid) {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Vector<String>());
- Vector<String> ret;
- for (Map<String, bool>::Element *E = fd->script_support_overrides.front(); E; E = E->next()) {
- ret.push_back(E->key());
- }
- return ret;
-}
-uint32_t TextServerAdvanced::font_get_glyph_index(RID p_font, char32_t p_char, char32_t p_variation_selector) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, 0);
- return fd->get_glyph_index(p_char, p_variation_selector);
-}
-
-Vector2 TextServerAdvanced::font_get_glyph_advance(RID p_font, uint32_t p_index, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, Vector2());
- return fd->get_advance(p_index, p_size);
+ MutexLock lock(fd->mutex);
+ Vector<String> out;
+ for (const Map<String, bool>::Element *E = fd->script_support_overrides.front(); E; E = E->next()) {
+ out.push_back(E->key());
+ }
+ return out;
}
-Vector2 TextServerAdvanced::font_get_glyph_kerning(RID p_font, uint32_t p_index_a, uint32_t p_index_b, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, Vector2());
- return fd->get_kerning(p_index_a, p_index_b, p_size);
-}
+Dictionary TextServerAdvanced::font_supported_feature_list(RID p_font_rid) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Dictionary());
-Vector2 TextServerAdvanced::font_draw_glyph(RID p_font, RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, Vector2());
- return fd->draw_glyph(p_canvas, p_size, p_pos, p_index, p_color);
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, 16);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Dictionary());
+ return fd->supported_features;
}
-Vector2 TextServerAdvanced::font_draw_glyph_outline(RID p_font, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, Vector2());
- return fd->draw_glyph_outline(p_canvas, p_size, p_outline_size, p_pos, p_index, p_color);
-}
+Dictionary TextServerAdvanced::font_supported_variation_list(RID p_font_rid) const {
+ FontDataAdvanced *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Dictionary());
-bool TextServerAdvanced::font_get_glyph_contours(RID p_font, int p_size, uint32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const {
- _THREAD_SAFE_METHOD_
- const FontDataAdvanced *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, false);
- return fd->get_glyph_contours(p_size, p_index, r_points, r_contours, r_orientation);
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, 16);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Dictionary());
+ return fd->supported_varaitions;
}
-float TextServerAdvanced::font_get_oversampling() const {
+real_t TextServerAdvanced::font_get_global_oversampling() const {
return oversampling;
}
-void TextServerAdvanced::font_set_oversampling(float p_oversampling) {
+void TextServerAdvanced::font_set_global_oversampling(real_t p_oversampling) {
_THREAD_SAFE_METHOD_
if (oversampling != p_oversampling) {
oversampling = p_oversampling;
List<RID> fonts;
font_owner.get_owned_list(&fonts);
+ bool font_cleared = false;
for (const RID &E : fonts) {
- font_owner.getornull(E)->clear_cache();
+ if (!font_is_multichannel_signed_distance_field(E) && font_get_oversampling(E) <= 0) {
+ font_clear_size_cache(E);
+ font_cleared = true;
+ }
}
- List<RID> text_bufs;
- shaped_owner.get_owned_list(&text_bufs);
- for (const RID &E : text_bufs) {
- invalidate(shaped_owner.getornull(E));
+ if (font_cleared) {
+ List<RID> text_bufs;
+ shaped_owner.get_owned_list(&text_bufs);
+ for (const RID &E : text_bufs) {
+ invalidate(shaped_owner.get_or_null(E));
+ }
}
}
}
-Vector<String> TextServerAdvanced::get_system_fonts() const {
- return Vector<String>();
-}
-
/*************************************************************************/
/* Shaped text buffer interface */
/*************************************************************************/
@@ -998,7 +2837,7 @@ void TextServerAdvanced::invalidate(TextServerAdvanced::ShapedTextDataAdvanced *
}
void TextServerAdvanced::full_copy(ShapedTextDataAdvanced *p_shaped) {
- ShapedTextDataAdvanced *parent = shaped_owner.getornull(p_shaped->parent);
+ ShapedTextDataAdvanced *parent = shaped_owner.get_or_null(p_shaped->parent);
for (Map<Variant, ShapedTextData::EmbeddedObject>::Element *E = parent->objects.front(); E; E = E->next()) {
if (E->get().pos >= p_shaped->start && E->get().pos < p_shaped->end) {
@@ -1029,10 +2868,10 @@ RID TextServerAdvanced::create_shaped_text(TextServer::Direction p_direction, Te
}
void TextServerAdvanced::shaped_text_clear(RID p_shaped) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
+ MutexLock lock(sd->mutex);
sd->parent = RID();
sd->start = 0;
sd->end = 0;
@@ -1044,10 +2883,10 @@ void TextServerAdvanced::shaped_text_clear(RID p_shaped) {
}
void TextServerAdvanced::shaped_text_set_direction(RID p_shaped, TextServer::Direction p_direction) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
+ MutexLock lock(sd->mutex);
if (sd->direction != p_direction) {
if (sd->parent != RID()) {
full_copy(sd);
@@ -1058,16 +2897,18 @@ void TextServerAdvanced::shaped_text_set_direction(RID p_shaped, TextServer::Dir
}
TextServer::Direction TextServerAdvanced::shaped_text_get_direction(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, TextServer::DIRECTION_LTR);
+
+ MutexLock lock(sd->mutex);
return sd->direction;
}
void TextServerAdvanced::shaped_text_set_bidi_override(RID p_shaped, const Vector<Vector2i> &p_override) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
+
+ MutexLock lock(sd->mutex);
if (sd->parent != RID()) {
full_copy(sd);
}
@@ -1076,9 +2917,10 @@ void TextServerAdvanced::shaped_text_set_bidi_override(RID p_shaped, const Vecto
}
void TextServerAdvanced::shaped_text_set_orientation(RID p_shaped, TextServer::Orientation p_orientation) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
+
+ MutexLock lock(sd->mutex);
if (sd->orientation != p_orientation) {
if (sd->parent != RID()) {
full_copy(sd);
@@ -1089,9 +2931,10 @@ void TextServerAdvanced::shaped_text_set_orientation(RID p_shaped, TextServer::O
}
void TextServerAdvanced::shaped_text_set_preserve_invalid(RID p_shaped, bool p_enabled) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
+
+ MutexLock lock(sd->mutex);
ERR_FAIL_COND(sd->parent != RID());
if (sd->preserve_invalid != p_enabled) {
sd->preserve_invalid = p_enabled;
@@ -1100,16 +2943,18 @@ void TextServerAdvanced::shaped_text_set_preserve_invalid(RID p_shaped, bool p_e
}
bool TextServerAdvanced::shaped_text_get_preserve_invalid(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
return sd->preserve_invalid;
}
void TextServerAdvanced::shaped_text_set_preserve_control(RID p_shaped, bool p_enabled) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
+
+ MutexLock lock(sd->mutex);
if (sd->preserve_control != p_enabled) {
if (sd->parent != RID()) {
full_copy(sd);
@@ -1120,25 +2965,31 @@ void TextServerAdvanced::shaped_text_set_preserve_control(RID p_shaped, bool p_e
}
bool TextServerAdvanced::shaped_text_get_preserve_control(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
return sd->preserve_control;
}
TextServer::Orientation TextServerAdvanced::shaped_text_get_orientation(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, TextServer::ORIENTATION_HORIZONTAL);
+
+ MutexLock lock(sd->mutex);
return sd->orientation;
}
bool TextServerAdvanced::shaped_text_add_string(RID p_shaped, const String &p_text, const Vector<RID> &p_fonts, int p_size, const Dictionary &p_opentype_features, const String &p_language) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
ERR_FAIL_COND_V(p_size <= 0, false);
+ MutexLock lock(sd->mutex);
+ for (int i = 0; i < p_fonts.size(); i++) {
+ ERR_FAIL_COND_V(!font_owner.get_or_null(p_fonts[i]), false);
+ }
+
if (p_text.is_empty()) {
return true;
}
@@ -1165,7 +3016,7 @@ bool TextServerAdvanced::shaped_text_add_string(RID p_shaped, const String &p_te
bool TextServerAdvanced::shaped_text_add_object(RID p_shaped, Variant p_key, const Size2 &p_size, InlineAlign p_inline_align, int p_length) {
_THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
ERR_FAIL_COND_V(p_key == Variant(), false);
ERR_FAIL_COND_V(sd->objects.has(p_key), false);
@@ -1194,9 +3045,10 @@ bool TextServerAdvanced::shaped_text_add_object(RID p_shaped, Variant p_key, con
}
bool TextServerAdvanced::shaped_text_resize_object(RID p_shaped, Variant p_key, const Size2 &p_size, InlineAlign p_inline_align) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
ERR_FAIL_COND_V(!sd->objects.has(p_key), false);
sd->objects[p_key].rect.size = p_size;
sd->objects[p_key].inline_align = p_inline_align;
@@ -1231,14 +3083,13 @@ bool TextServerAdvanced::shaped_text_resize_object(RID p_shaped, Variant p_key,
sd->glyphs.write[i].advance = sd->objects[key].rect.size.y;
}
} else {
- const FontDataAdvanced *fd = font_owner.getornull(gl.font_rid);
- if (fd != nullptr) {
+ if (gl.font_rid.is_valid()) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
- sd->ascent = MAX(sd->ascent, MAX(fd->get_ascent(gl.font_size), -gl.y_off));
- sd->descent = MAX(sd->descent, MAX(fd->get_descent(gl.font_size), gl.y_off));
+ sd->ascent = MAX(sd->ascent, MAX(font_get_ascent(gl.font_rid, gl.font_size), -gl.y_off));
+ sd->descent = MAX(sd->descent, MAX(font_get_descent(gl.font_rid, gl.font_size), gl.y_off));
} else {
- sd->ascent = MAX(sd->ascent, Math::round(fd->get_advance(gl.index, gl.font_size).x * 0.5));
- sd->descent = MAX(sd->descent, Math::round(fd->get_advance(gl.index, gl.font_size).x * 0.5));
+ sd->ascent = MAX(sd->ascent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ sd->descent = MAX(sd->descent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
}
sd->upos = MAX(sd->upos, font_get_underline_position(gl.font_rid, gl.font_size));
sd->uthk = MAX(sd->uthk, font_get_underline_thickness(gl.font_rid, gl.font_size));
@@ -1257,8 +3108,8 @@ bool TextServerAdvanced::shaped_text_resize_object(RID p_shaped, Variant p_key,
}
// Align embedded objects to baseline.
- float full_ascent = sd->ascent;
- float full_descent = sd->descent;
+ real_t full_ascent = sd->ascent;
+ real_t full_descent = sd->descent;
for (Map<Variant, ShapedTextData::EmbeddedObject>::Element *E = sd->objects.front(); E; E = E->next()) {
if ((E->get().pos >= sd->start) && (E->get().pos < sd->end)) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
@@ -1327,9 +3178,10 @@ bool TextServerAdvanced::shaped_text_resize_object(RID p_shaped, Variant p_key,
}
RID TextServerAdvanced::shaped_text_substr(RID p_shaped, int p_start, int p_length) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, RID());
+
+ MutexLock lock(sd->mutex);
if (sd->parent != RID()) {
return shaped_text_substr(sd->parent, p_start, p_length);
}
@@ -1363,9 +3215,6 @@ RID TextServerAdvanced::shaped_text_substr(RID p_shaped, int p_start, int p_leng
int sd_size = sd->glyphs.size();
const Glyph *sd_glyphs = sd->glyphs.ptr();
- const FontDataAdvanced *fd = nullptr;
- RID prev_rid = RID();
-
for (int ov = 0; ov < sd->bidi_override.size(); ov++) {
UErrorCode err = U_ZERO_ERROR;
@@ -1423,17 +3272,13 @@ RID TextServerAdvanced::shaped_text_substr(RID p_shaped, int p_start, int p_leng
new_sd->width += new_sd->objects[key].rect.size.y;
}
} else {
- if (prev_rid != gl.font_rid) {
- fd = font_owner.getornull(gl.font_rid);
- prev_rid = gl.font_rid;
- }
- if (fd != nullptr) {
+ if (gl.font_rid.is_valid()) {
if (new_sd->orientation == ORIENTATION_HORIZONTAL) {
- new_sd->ascent = MAX(new_sd->ascent, MAX(fd->get_ascent(gl.font_size), -gl.y_off));
- new_sd->descent = MAX(new_sd->descent, MAX(fd->get_descent(gl.font_size), gl.y_off));
+ new_sd->ascent = MAX(new_sd->ascent, MAX(font_get_ascent(gl.font_rid, gl.font_size), -gl.y_off));
+ new_sd->descent = MAX(new_sd->descent, MAX(font_get_descent(gl.font_rid, gl.font_size), gl.y_off));
} else {
- new_sd->ascent = MAX(new_sd->ascent, Math::round(fd->get_advance(gl.index, gl.font_size).x * 0.5));
- new_sd->descent = MAX(new_sd->descent, Math::round(fd->get_advance(gl.index, gl.font_size).x * 0.5));
+ new_sd->ascent = MAX(new_sd->ascent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ new_sd->descent = MAX(new_sd->descent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
}
} else if (new_sd->preserve_invalid || (new_sd->preserve_control && is_control(gl.index))) {
// Glyph not found, replace with hex code box.
@@ -1454,8 +3299,8 @@ RID TextServerAdvanced::shaped_text_substr(RID p_shaped, int p_start, int p_leng
}
// Align embedded objects to baseline.
- float full_ascent = new_sd->ascent;
- float full_descent = new_sd->descent;
+ real_t full_ascent = new_sd->ascent;
+ real_t full_descent = new_sd->descent;
for (Map<Variant, ShapedTextData::EmbeddedObject>::Element *E = new_sd->objects.front(); E; E = E->next()) {
if ((E->get().pos >= new_sd->start) && (E->get().pos < new_sd->end)) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
@@ -1526,16 +3371,18 @@ RID TextServerAdvanced::shaped_text_substr(RID p_shaped, int p_start, int p_leng
}
RID TextServerAdvanced::shaped_text_get_parent(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, RID());
+
+ MutexLock lock(sd->mutex);
return sd->parent;
}
-float TextServerAdvanced::shaped_text_fit_to_width(RID p_shaped, float p_width, uint8_t /*JustificationFlag*/ p_jst_flags) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerAdvanced::shaped_text_fit_to_width(RID p_shaped, real_t p_width, uint8_t /*JustificationFlag*/ p_jst_flags) {
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
}
@@ -1572,7 +3419,7 @@ float TextServerAdvanced::shaped_text_fit_to_width(RID p_shaped, float p_width,
}
}
- float justification_width;
+ real_t justification_width;
if ((p_jst_flags & JUSTIFICATION_CONSTRAIN_ELLIPSIS) == JUSTIFICATION_CONSTRAIN_ELLIPSIS) {
if (sd->overrun_trim_data.trim_pos >= 0) {
start_pos = sd->overrun_trim_data.trim_pos;
@@ -1612,7 +3459,7 @@ float TextServerAdvanced::shaped_text_fit_to_width(RID p_shaped, float p_width,
}
if ((elongation_count > 0) && ((p_jst_flags & JUSTIFICATION_KASHIDA) == JUSTIFICATION_KASHIDA)) {
- float delta_width_per_kashida = (p_width - justification_width) / elongation_count;
+ real_t delta_width_per_kashida = (p_width - justification_width) / elongation_count;
for (int i = start_pos; i <= end_pos; i++) {
Glyph &gl = sd->glyphs.write[i];
if (gl.count > 0) {
@@ -1627,19 +3474,19 @@ float TextServerAdvanced::shaped_text_fit_to_width(RID p_shaped, float p_width,
}
}
}
- float adv_remain = 0;
+ real_t adv_remain = 0;
if ((space_count > 0) && ((p_jst_flags & JUSTIFICATION_WORD_BOUND) == JUSTIFICATION_WORD_BOUND)) {
- float delta_width_per_space = (p_width - justification_width) / space_count;
+ real_t delta_width_per_space = (p_width - justification_width) / space_count;
for (int i = start_pos; i <= end_pos; i++) {
Glyph &gl = sd->glyphs.write[i];
if (gl.count > 0) {
if ((gl.flags & GRAPHEME_IS_SPACE) == GRAPHEME_IS_SPACE) {
- float old_adv = gl.advance;
- float new_advance;
+ real_t old_adv = gl.advance;
+ real_t new_advance;
if ((gl.flags & GRAPHEME_IS_VIRTUAL) == GRAPHEME_IS_VIRTUAL) {
new_advance = MAX(gl.advance + delta_width_per_space, 0.f);
} else {
- new_advance = MAX(gl.advance + delta_width_per_space, 0.05 * gl.font_size);
+ new_advance = MAX(gl.advance + delta_width_per_space, 0.1 * gl.font_size);
}
gl.advance = new_advance;
adv_remain += (new_advance - gl.advance);
@@ -1667,10 +3514,11 @@ float TextServerAdvanced::shaped_text_fit_to_width(RID p_shaped, float p_width,
return sd->width;
}
-float TextServerAdvanced::shaped_text_tab_align(RID p_shaped, const Vector<float> &p_tab_stops) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerAdvanced::shaped_text_tab_align(RID p_shaped, const Vector<real_t> &p_tab_stops) {
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
}
@@ -1679,7 +3527,7 @@ float TextServerAdvanced::shaped_text_tab_align(RID p_shaped, const Vector<float
}
int tab_index = 0;
- float off = 0.f;
+ real_t off = 0.f;
int start, end, delta;
if (sd->para_direction == DIRECTION_LTR) {
@@ -1696,7 +3544,7 @@ float TextServerAdvanced::shaped_text_tab_align(RID p_shaped, const Vector<float
for (int i = start; i != end; i += delta) {
if ((gl[i].flags & GRAPHEME_IS_TAB) == GRAPHEME_IS_TAB) {
- float tab_off = 0.f;
+ real_t tab_off = 0.f;
while (tab_off <= off) {
tab_off += p_tab_stops[tab_index];
tab_index++;
@@ -1704,7 +3552,7 @@ float TextServerAdvanced::shaped_text_tab_align(RID p_shaped, const Vector<float
tab_index = 0;
}
}
- float old_adv = gl[i].advance;
+ real_t old_adv = gl[i].advance;
gl[i].advance = tab_off - off;
sd->width += gl[i].advance - old_adv;
off = 0;
@@ -1716,14 +3564,16 @@ float TextServerAdvanced::shaped_text_tab_align(RID p_shaped, const Vector<float
return 0.f;
}
-void TextServerAdvanced::shaped_text_overrun_trim_to_width(RID p_shaped_line, float p_width, uint8_t p_trim_flags) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped_line);
+void TextServerAdvanced::shaped_text_overrun_trim_to_width(RID p_shaped_line, real_t p_width, uint8_t p_trim_flags) {
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped_line);
ERR_FAIL_COND_MSG(!sd, "ShapedTextDataAdvanced invalid.");
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
shaped_text_shape(p_shaped_line);
}
+ sd->text_trimmed = false;
sd->overrun_trim_data.ellipsis_glyph_buf.clear();
bool add_ellipsis = (p_trim_flags & OVERRUN_ADD_ELLIPSIS) == OVERRUN_ADD_ELLIPSIS;
@@ -1746,18 +3596,18 @@ void TextServerAdvanced::shaped_text_overrun_trim_to_width(RID p_shaped_line, fl
int sd_size = sd->glyphs.size();
RID last_gl_font_rid = sd_glyphs[sd_size - 1].font_rid;
int last_gl_font_size = sd_glyphs[sd_size - 1].font_size;
- uint32_t dot_gl_idx = font_get_glyph_index(last_gl_font_rid, '.');
- Vector2 dot_adv = font_get_glyph_advance(last_gl_font_rid, dot_gl_idx, last_gl_font_size);
- uint32_t whitespace_gl_idx = font_get_glyph_index(last_gl_font_rid, ' ');
- Vector2 whitespace_adv = font_get_glyph_advance(last_gl_font_rid, whitespace_gl_idx, last_gl_font_size);
+ int32_t dot_gl_idx = font_get_glyph_index(last_gl_font_rid, last_gl_font_size, '.');
+ Vector2 dot_adv = font_get_glyph_advance(last_gl_font_rid, last_gl_font_size, dot_gl_idx);
+ int32_t whitespace_gl_idx = font_get_glyph_index(last_gl_font_rid, last_gl_font_size, ' ');
+ Vector2 whitespace_adv = font_get_glyph_advance(last_gl_font_rid, last_gl_font_size, whitespace_gl_idx);
int ellipsis_width = 0;
if (add_ellipsis) {
- ellipsis_width = 3 * dot_adv.x + font_get_spacing_glyph(last_gl_font_rid) + (cut_per_word ? whitespace_adv.x : 0);
+ ellipsis_width = 3 * dot_adv.x + font_get_spacing(last_gl_font_rid, last_gl_font_size, SPACING_GLYPH) + (cut_per_word ? whitespace_adv.x : 0);
}
int ell_min_characters = 6;
- float width = sd->width;
+ real_t width = sd->width;
bool is_rtl = sd->direction == DIRECTION_RTL || (sd->direction == DIRECTION_AUTO && sd->para_direction == DIRECTION_RTL);
@@ -1842,16 +3692,18 @@ void TextServerAdvanced::shaped_text_overrun_trim_to_width(RID p_shaped_line, fl
}
TextServer::TrimData TextServerAdvanced::shaped_text_get_trim_data(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V_MSG(!sd, TrimData(), "ShapedTextDataAdvanced invalid.");
+
+ MutexLock lock(sd->mutex);
return sd->overrun_trim_data;
}
bool TextServerAdvanced::shaped_text_update_breaks(RID p_shaped) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
shaped_text_shape(p_shaped);
}
@@ -1938,7 +3790,12 @@ bool TextServerAdvanced::shaped_text_update_breaks(RID p_shaped) {
gl.font_rid = sd_glyphs[i].font_rid;
gl.font_size = sd_glyphs[i].font_size;
gl.flags = GRAPHEME_IS_BREAK_SOFT | GRAPHEME_IS_VIRTUAL;
- sd->glyphs.insert(i + sd_glyphs[i].count, gl); // Insert after.
+ if (sd->glyphs[i].flags & GRAPHEME_IS_RTL) {
+ gl.flags |= GRAPHEME_IS_RTL;
+ sd->glyphs.insert(i, gl); // Insert before.
+ } else {
+ sd->glyphs.insert(i + sd_glyphs[i].count, gl); // Insert after.
+ }
// Update write pointer and size.
sd_size = sd->glyphs.size();
@@ -2035,9 +3892,10 @@ _FORCE_INLINE_ int _generate_kashida_justification_opportunies(const String &p_d
}
bool TextServerAdvanced::shaped_text_update_justification_ops(RID p_shaped) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
shaped_text_shape(p_shaped);
}
@@ -2131,7 +3989,12 @@ bool TextServerAdvanced::shaped_text_update_justification_ops(RID p_shaped) {
gl.font_rid = sd->glyphs[i].font_rid;
gl.font_size = sd->glyphs[i].font_size;
gl.flags = GRAPHEME_IS_SPACE | GRAPHEME_IS_VIRTUAL;
- sd->glyphs.insert(i + sd->glyphs[i].count, gl); // Insert after.
+ if (sd->glyphs[i].flags & GRAPHEME_IS_RTL) {
+ gl.flags |= GRAPHEME_IS_RTL;
+ sd->glyphs.insert(i, gl); // Insert before.
+ } else {
+ sd->glyphs.insert(i + sd->glyphs[i].count, gl); // Insert after.
+ }
i += sd->glyphs[i].count;
continue;
}
@@ -2145,8 +4008,8 @@ bool TextServerAdvanced::shaped_text_update_justification_ops(RID p_shaped) {
}
TextServer::Glyph TextServerAdvanced::_shape_single_glyph(ShapedTextDataAdvanced *p_sd, char32_t p_char, hb_script_t p_script, hb_direction_t p_direction, RID p_font, int p_font_size) {
- FontDataAdvanced *fd = font_owner.getornull(p_font);
- hb_font_t *hb_font = fd->get_hb_handle(p_font_size);
+ hb_font_t *hb_font = _font_get_hb_handle(p_font, p_font_size);
+ ERR_FAIL_COND_V(hb_font == nullptr, TextServer::Glyph());
hb_buffer_clear_contents(p_sd->hb_buffer);
hb_buffer_set_direction(p_sd->hb_buffer, p_direction);
@@ -2171,16 +4034,17 @@ TextServer::Glyph TextServerAdvanced::_shape_single_glyph(ShapedTextDataAdvanced
gl.font_size = p_font_size;
if (glyph_count > 0) {
+ real_t scale = font_get_scale(p_font, p_font_size);
if (p_sd->orientation == ORIENTATION_HORIZONTAL) {
- gl.advance = Math::round(glyph_pos[0].x_advance / (64.0 / fd->get_font_scale(p_font_size)));
+ gl.advance = Math::round(glyph_pos[0].x_advance / (64.0 / scale));
} else {
- gl.advance = -Math::round(glyph_pos[0].y_advance / (64.0 / fd->get_font_scale(p_font_size)));
+ gl.advance = -Math::round(glyph_pos[0].y_advance / (64.0 / scale));
}
gl.count = 1;
gl.index = glyph_info[0].codepoint;
- gl.x_off = Math::round(glyph_pos[0].x_offset / (64.0 / fd->get_font_scale(p_font_size)));
- gl.y_off = -Math::round(glyph_pos[0].y_offset / (64.0 / fd->get_font_scale(p_font_size)));
+ gl.x_off = Math::round(glyph_pos[0].x_offset / (64.0 / scale));
+ gl.y_off = -Math::round(glyph_pos[0].y_offset / (64.0 / scale));
if ((glyph_info[0].codepoint != 0) || !u_isgraph(p_char)) {
gl.flags |= GRAPHEME_IS_VALID;
@@ -2190,13 +4054,8 @@ TextServer::Glyph TextServerAdvanced::_shape_single_glyph(ShapedTextDataAdvanced
}
void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int32_t p_start, int32_t p_end, hb_script_t p_script, hb_direction_t p_direction, Vector<RID> p_fonts, int p_span, int p_fb_index) {
- FontDataAdvanced *fd = nullptr;
- if (p_fb_index < p_fonts.size()) {
- fd = font_owner.getornull(p_fonts[p_fb_index]);
- }
-
int fs = p_sd->spans[p_span].font_size;
- if (fd == nullptr) {
+ if (p_fb_index >= p_fonts.size()) {
// Add fallback glyphs.
for (int i = p_start; i < p_end; i++) {
if (p_sd->preserve_invalid || (p_sd->preserve_control && is_control(p_sd->text[i]))) {
@@ -2227,7 +4086,8 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int32_t p_star
return;
}
- hb_font_t *hb_font = fd->get_hb_handle(fs);
+ RID f = p_fonts[p_fb_index];
+ hb_font_t *hb_font = _font_get_hb_handle(f, fs);
ERR_FAIL_COND(hb_font == nullptr);
hb_buffer_clear_contents(p_sd->hb_buffer);
@@ -2283,7 +4143,7 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int32_t p_star
}
}
if (p_direction == HB_DIRECTION_RTL || p_direction == HB_DIRECTION_BTT) {
- w[last_cluster_index].flags |= TextServer::GRAPHEME_IS_RTL;
+ w[last_cluster_index].flags |= GRAPHEME_IS_RTL;
}
if (last_cluster_valid) {
w[last_cluster_index].flags |= GRAPHEME_IS_VALID;
@@ -2305,26 +4165,31 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int32_t p_star
gl.font_rid = p_fonts[p_fb_index];
gl.font_size = fs;
+ if (glyph_info[i].mask & HB_GLYPH_FLAG_DEFINED) {
+ gl.flags |= GRAPHEME_IS_CONNECTED;
+ }
+
gl.index = glyph_info[i].codepoint;
if (gl.index != 0) {
+ real_t scale = font_get_scale(f, fs);
if (p_sd->orientation == ORIENTATION_HORIZONTAL) {
- gl.advance = Math::round(glyph_pos[i].x_advance / (64.0 / fd->get_font_scale(fs)));
+ gl.advance = Math::round(glyph_pos[i].x_advance / (64.0 / scale));
} else {
- gl.advance = -Math::round(glyph_pos[i].y_advance / (64.0 / fd->get_font_scale(fs)));
+ gl.advance = -Math::round(glyph_pos[i].y_advance / (64.0 / scale));
}
- gl.x_off = Math::round(glyph_pos[i].x_offset / (64.0 / fd->get_font_scale(fs)));
- gl.y_off = -Math::round(glyph_pos[i].y_offset / (64.0 / fd->get_font_scale(fs)));
+ gl.x_off = Math::round(glyph_pos[i].x_offset / (64.0 / scale));
+ gl.y_off = -Math::round(glyph_pos[i].y_offset / (64.0 / scale));
}
- if (fd->get_spacing_space() && is_whitespace(p_sd->text[glyph_info[i].cluster])) {
- gl.advance += fd->get_spacing_space();
+ if (font_get_spacing(f, fs, SPACING_SPACE) && is_whitespace(p_sd->text[glyph_info[i].cluster])) {
+ gl.advance += font_get_spacing(f, fs, SPACING_SPACE);
} else {
- gl.advance += fd->get_spacing_glyph();
+ gl.advance += font_get_spacing(f, fs, SPACING_GLYPH);
}
if (p_sd->preserve_control) {
- last_cluster_valid = last_cluster_valid && ((glyph_info[i].codepoint != 0) || is_whitespace(p_sd->text[glyph_info[i].cluster]) || is_linebreak(p_sd->text[glyph_info[i].cluster]));
+ last_cluster_valid = last_cluster_valid && ((glyph_info[i].codepoint != 0) || (p_sd->text[glyph_info[i].cluster] == 0x0009) || (u_isblank(p_sd->text[glyph_info[i].cluster]) && (gl.advance != 0)) || (!u_isblank(p_sd->text[glyph_info[i].cluster]) && is_linebreak(p_sd->text[glyph_info[i].cluster])));
} else {
- last_cluster_valid = last_cluster_valid && ((glyph_info[i].codepoint != 0) || !u_isgraph(p_sd->text[glyph_info[i].cluster]));
+ last_cluster_valid = last_cluster_valid && ((glyph_info[i].codepoint != 0) || (p_sd->text[glyph_info[i].cluster] == 0x0009) || (u_isblank(p_sd->text[glyph_info[i].cluster]) && (gl.advance != 0)) || (!u_isblank(p_sd->text[glyph_info[i].cluster]) && !u_isgraph(p_sd->text[glyph_info[i].cluster])));
}
}
if (p_direction == HB_DIRECTION_LTR || p_direction == HB_DIRECTION_TTB) {
@@ -2334,7 +4199,7 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int32_t p_star
}
w[last_cluster_index].count = glyph_count - last_cluster_index;
if (p_direction == HB_DIRECTION_RTL || p_direction == HB_DIRECTION_BTT) {
- w[last_cluster_index].flags |= TextServer::GRAPHEME_IS_RTL;
+ w[last_cluster_index].flags |= GRAPHEME_IS_RTL;
}
if (last_cluster_valid) {
w[last_cluster_index].flags |= GRAPHEME_IS_VALID;
@@ -2356,8 +4221,8 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int32_t p_star
p_sd->ascent = MAX(p_sd->ascent, -w[i + j].y_off);
p_sd->descent = MAX(p_sd->descent, w[i + j].y_off);
} else {
- p_sd->ascent = MAX(p_sd->ascent, Math::round(fd->get_advance(w[i + j].index, fs).x * 0.5));
- p_sd->descent = MAX(p_sd->descent, Math::round(fd->get_advance(w[i + j].index, fs).x * 0.5));
+ p_sd->ascent = MAX(p_sd->ascent, Math::round(font_get_glyph_advance(f, fs, w[i + j].index).x * 0.5));
+ p_sd->descent = MAX(p_sd->descent, Math::round(font_get_glyph_advance(f, fs, w[i + j].index).x * 0.5));
}
p_sd->width += w[i + j].advance;
p_sd->glyphs.push_back(w[i + j]);
@@ -2376,18 +4241,18 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int32_t p_star
if (failed_subrun_start != p_end + 1) {
_shape_run(p_sd, failed_subrun_start, failed_subrun_end, p_script, p_direction, p_fonts, p_span, p_fb_index + 1);
}
- p_sd->ascent = MAX(p_sd->ascent, fd->get_ascent(fs));
- p_sd->descent = MAX(p_sd->descent, fd->get_descent(fs));
- p_sd->upos = MAX(p_sd->upos, fd->get_underline_position(fs));
- p_sd->uthk = MAX(p_sd->uthk, fd->get_underline_thickness(fs));
+ p_sd->ascent = MAX(p_sd->ascent, font_get_ascent(f, fs));
+ p_sd->descent = MAX(p_sd->descent, font_get_descent(f, fs));
+ p_sd->upos = MAX(p_sd->upos, font_get_underline_position(f, fs));
+ p_sd->uthk = MAX(p_sd->uthk, font_get_underline_thickness(f, fs));
}
}
bool TextServerAdvanced::shaped_text_shape(RID p_shaped) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+ MutexLock lock(sd->mutex);
if (sd->valid) {
return true;
}
@@ -2546,8 +4411,8 @@ bool TextServerAdvanced::shaped_text_shape(RID p_shaped) {
}
// Align embedded objects to baseline.
- float full_ascent = sd->ascent;
- float full_descent = sd->descent;
+ real_t full_ascent = sd->ascent;
+ real_t full_descent = sd->descent;
for (Map<Variant, ShapedTextData::EmbeddedObject>::Element *E = sd->objects.front(); E; E = E->next()) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
switch (E->get().inline_align & INLINE_ALIGN_TEXT_MASK) {
@@ -2614,16 +4479,18 @@ bool TextServerAdvanced::shaped_text_shape(RID p_shaped) {
}
bool TextServerAdvanced::shaped_text_is_ready(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
return sd->valid;
}
Vector<TextServer::Glyph> TextServerAdvanced::shaped_text_get_glyphs(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Vector<TextServer::Glyph>());
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
}
@@ -2631,16 +4498,18 @@ Vector<TextServer::Glyph> TextServerAdvanced::shaped_text_get_glyphs(RID p_shape
}
Vector2i TextServerAdvanced::shaped_text_get_range(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Vector2i());
+
+ MutexLock lock(sd->mutex);
return Vector2(sd->start, sd->end);
}
Vector<TextServer::Glyph> TextServerAdvanced::shaped_text_sort_logical(RID p_shaped) {
- _THREAD_SAFE_METHOD_
- ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Vector<TextServer::Glyph>());
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
}
@@ -2655,10 +4524,11 @@ Vector<TextServer::Glyph> TextServerAdvanced::shaped_text_sort_logical(RID p_sha
}
Array TextServerAdvanced::shaped_text_get_objects(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
Array ret;
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, ret);
+
+ MutexLock lock(sd->mutex);
for (const Map<Variant, ShapedTextData::EmbeddedObject>::Element *E = sd->objects.front(); E; E = E->next()) {
ret.push_back(E->key());
}
@@ -2667,9 +4537,10 @@ Array TextServerAdvanced::shaped_text_get_objects(RID p_shaped) const {
}
Rect2 TextServerAdvanced::shaped_text_get_object_rect(RID p_shaped, Variant p_key) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Rect2());
+
+ MutexLock lock(sd->mutex);
ERR_FAIL_COND_V(!sd->objects.has(p_key), Rect2());
if (!sd->valid) {
const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
@@ -2678,9 +4549,10 @@ Rect2 TextServerAdvanced::shaped_text_get_object_rect(RID p_shaped, Variant p_ke
}
Size2 TextServerAdvanced::shaped_text_get_size(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Size2());
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
}
@@ -2691,40 +4563,44 @@ Size2 TextServerAdvanced::shaped_text_get_size(RID p_shaped) const {
}
}
-float TextServerAdvanced::shaped_text_get_ascent(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerAdvanced::shaped_text_get_ascent(RID p_shaped) const {
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
}
return sd->ascent;
}
-float TextServerAdvanced::shaped_text_get_descent(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerAdvanced::shaped_text_get_descent(RID p_shaped) const {
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
}
return sd->descent;
}
-float TextServerAdvanced::shaped_text_get_width(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerAdvanced::shaped_text_get_width(RID p_shaped) const {
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
}
return (sd->text_trimmed ? sd->width_trimmed : sd->width);
}
-float TextServerAdvanced::shaped_text_get_underline_position(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerAdvanced::shaped_text_get_underline_position(RID p_shaped) const {
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
}
@@ -2732,10 +4608,11 @@ float TextServerAdvanced::shaped_text_get_underline_position(RID p_shaped) const
return sd->upos;
}
-float TextServerAdvanced::shaped_text_get_underline_thickness(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextDataAdvanced *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerAdvanced::shaped_text_get_underline_thickness(RID p_shaped) const {
+ const ShapedTextDataAdvanced *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerAdvanced *>(this)->shaped_text_shape(p_shaped);
}
@@ -2744,31 +4621,76 @@ float TextServerAdvanced::shaped_text_get_underline_thickness(RID p_shaped) cons
}
struct num_system_data {
- String lang;
+ Set<String> lang;
String digits;
String percent_sign;
String exp;
};
static num_system_data num_systems[]{
- { "ar,ar_AR,ar_BH,ar_DJ,ar_EG,ar_ER,ar_IL,ar_IQ,ar_JO,ar_KM,ar_KW,ar_LB,ar_MR,ar_OM,ar_PS,ar_QA,ar_SA,ar_SD,ar_SO,ar_SS,ar_SY,ar_TD,ar_YE", U"٠١٢٣٤٥٦٧٨٩٫", U"٪", U"اس" },
- { "fa,ks,pa_Arab,ps,ug,ur_IN,ur,uz_Arab", U"۰۱۲۳۴۵۶۷۸۹٫", U"٪", U"اس" },
- { "as,bn,mni", U"০১২৩৪৫৬৭৮৯.", U"%", U"e" },
- { "mr,ne", U"०१२३४५६७८९.", U"%", U"e" },
- { "dz", U"༠༡༢༣༤༥༦༧༨༩.", U"%", U"e" },
- { "sat", U"á±á±‘᱒᱓᱔᱕᱖᱗᱘᱙.", U"%", U"e" },
- { "my", U"á€áá‚áƒá„á…á†á‡áˆá‰.", U"%", U"e" },
- { String(), String(), String(), String() },
+ { Set<String>(), U"٠١٢٣٤٥٦٧٨٩٫", U"٪", U"اس" },
+ { Set<String>(), U"۰۱۲۳۴۵۶۷۸۹٫", U"٪", U"اس" },
+ { Set<String>(), U"০১২৩৪৫৬৭৮৯.", U"%", U"e" },
+ { Set<String>(), U"०१२३४५६७८९.", U"%", U"e" },
+ { Set<String>(), U"༠༡༢༣༤༥༦༧༨༩.", U"%", U"e" },
+ { Set<String>(), U"á±á±‘᱒᱓᱔᱕᱖᱗᱘᱙.", U"%", U"e" },
+ { Set<String>(), U"á€áá‚áƒá„á…á†á‡áˆá‰.", U"%", U"e" },
+ { Set<String>(), String(), String(), String() },
};
+static void _insert_num_systems_lang() {
+ num_systems[0].lang.insert(StringName("ar"));
+ num_systems[0].lang.insert(StringName("ar_AR"));
+ num_systems[0].lang.insert(StringName("ar_BH"));
+ num_systems[0].lang.insert(StringName("ar_DJ"));
+ num_systems[0].lang.insert(StringName("ar_EG"));
+ num_systems[0].lang.insert(StringName("ar_ER"));
+ num_systems[0].lang.insert(StringName("ar_IL"));
+ num_systems[0].lang.insert(StringName("ar_IQ"));
+ num_systems[0].lang.insert(StringName("ar_JO"));
+ num_systems[0].lang.insert(StringName("ar_KM"));
+ num_systems[0].lang.insert(StringName("ar_KW"));
+ num_systems[0].lang.insert(StringName("ar_LB"));
+ num_systems[0].lang.insert(StringName("ar_MR"));
+ num_systems[0].lang.insert(StringName("ar_OM"));
+ num_systems[0].lang.insert(StringName("ar_PS"));
+ num_systems[0].lang.insert(StringName("ar_QA"));
+ num_systems[0].lang.insert(StringName("ar_SA"));
+ num_systems[0].lang.insert(StringName("ar_SD"));
+ num_systems[0].lang.insert(StringName("ar_SO"));
+ num_systems[0].lang.insert(StringName("ar_SS"));
+ num_systems[0].lang.insert(StringName("ar_SY"));
+ num_systems[0].lang.insert(StringName("ar_TD"));
+ num_systems[0].lang.insert(StringName("ar_YE"));
+
+ num_systems[1].lang.insert(StringName("fa"));
+ num_systems[1].lang.insert(StringName("ks"));
+ num_systems[1].lang.insert(StringName("pa_Arab"));
+ num_systems[1].lang.insert(StringName("ug"));
+ num_systems[1].lang.insert(StringName("ur_IN"));
+ num_systems[1].lang.insert(StringName("ur"));
+ num_systems[1].lang.insert(StringName("uz_Arab"));
+
+ num_systems[2].lang.insert(StringName("as"));
+ num_systems[2].lang.insert(StringName("bn"));
+ num_systems[2].lang.insert(StringName("mni"));
+
+ num_systems[3].lang.insert(StringName("mr"));
+ num_systems[3].lang.insert(StringName("ne"));
+
+ num_systems[4].lang.insert(StringName("dz"));
+
+ num_systems[5].lang.insert(StringName("sat"));
+
+ num_systems[6].lang.insert(StringName("my"));
+}
+
String TextServerAdvanced::format_number(const String &p_string, const String &p_language) const {
- _THREAD_SAFE_METHOD_
- String lang = (p_language == "") ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
+ const StringName lang = (p_language == "") ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
String res = p_string;
- for (int i = 0; num_systems[i].lang != String(); i++) {
- Vector<String> langs = num_systems[i].lang.split(",");
- if (langs.has(lang)) {
+ for (int i = 0; num_systems[i].lang.size() != 0; i++) {
+ if (num_systems[i].lang.has(lang)) {
if (num_systems[i].digits == String()) {
return p_string;
}
@@ -2789,13 +4711,11 @@ String TextServerAdvanced::format_number(const String &p_string, const String &p
}
String TextServerAdvanced::parse_number(const String &p_string, const String &p_language) const {
- _THREAD_SAFE_METHOD_
- String lang = (p_language == "") ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
+ const StringName lang = (p_language == "") ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
String res = p_string;
- for (int i = 0; num_systems[i].lang != String(); i++) {
- Vector<String> langs = num_systems[i].lang.split(",");
- if (langs.has(lang)) {
+ for (int i = 0; num_systems[i].lang.size() != 0; i++) {
+ if (num_systems[i].lang.has(lang)) {
if (num_systems[i].digits == String()) {
return p_string;
}
@@ -2819,12 +4739,10 @@ String TextServerAdvanced::parse_number(const String &p_string, const String &p_
}
String TextServerAdvanced::percent_sign(const String &p_language) const {
- _THREAD_SAFE_METHOD_
- String lang = (p_language == "") ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
+ const StringName lang = (p_language == "") ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
- for (int i = 0; num_systems[i].lang != String(); i++) {
- Vector<String> langs = num_systems[i].lang.split(",");
- if (langs.has(lang)) {
+ for (int i = 0; num_systems[i].lang.size() != 0; i++) {
+ if (num_systems[i].lang.has(lang)) {
if (num_systems[i].percent_sign == String()) {
return "%";
}
@@ -2844,11 +4762,16 @@ void TextServerAdvanced::register_server() {
}
TextServerAdvanced::TextServerAdvanced() {
+ _insert_num_systems_lang();
+ _insert_feature_sets();
hb_bmp_create_font_funcs();
}
TextServerAdvanced::~TextServerAdvanced() {
hb_bmp_free_font_funcs();
+ if (library != nullptr) {
+ FT_Done_FreeType(library);
+ }
u_cleanup();
#ifndef ICU_STATIC_DATA
if (icu_data != nullptr) {
diff --git a/modules/text_server_adv/text_server_adv.h b/modules/text_server_adv/text_server_adv.h
index d19ba41a1a..fc0e7a09a7 100644
--- a/modules/text_server_adv/text_server_adv.h
+++ b/modules/text_server_adv/text_server_adv.h
@@ -39,6 +39,7 @@
#include "servers/text_server.h"
#include "core/templates/rid_owner.h"
+#include "core/templates/thread_work_pool.h"
#include "scene/resources/texture.h"
#include "script_iterator.h"
@@ -53,11 +54,24 @@
#include <unicode/ustring.h>
#include <unicode/utypes.h>
+#include "modules/modules_enabled.gen.h"
+
+#ifdef MODULE_FREETYPE_ENABLED
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_TRUETYPE_TABLES_H
+#include FT_STROKER_H
+#include FT_ADVANCES_H
+#include FT_MULTIPLE_MASTERS_H
+#include FT_BBOX_H
+
+#include <hb-ft.h>
+#include <hb-ot.h>
+#endif
+
#include <hb-icu.h>
#include <hb.h>
-#include "font_adv.h"
-
class TextServerAdvanced : public TextServer {
GDCLASS(TextServerAdvanced, TextServer);
_THREAD_SAFE_CLASS_
@@ -65,8 +79,149 @@ class TextServerAdvanced : public TextServer {
static String interface_name;
static uint32_t interface_features;
+ // ICU support data.
+
uint8_t *icu_data = nullptr;
+ // Font cache data.
+
+#ifdef MODULE_FREETYPE_ENABLED
+ mutable FT_Library library = nullptr;
+#endif
+
+ const int rect_range = 2;
+
+ struct FontTexture {
+ Image::Format format;
+ PackedByteArray imgdata;
+ int texture_w = 0;
+ int texture_h = 0;
+ PackedInt32Array offsets;
+ Ref<ImageTexture> texture;
+ };
+
+ struct FontTexturePosition {
+ int index = 0;
+ int x = 0;
+ int y = 0;
+ };
+
+ struct FontGlyph {
+ bool found = false;
+ int texture_idx = -1;
+ Rect2 rect;
+ Rect2 uv_rect;
+ Vector2 advance;
+ };
+
+ struct FontDataForSizeAdvanced {
+ real_t ascent = 0.f;
+ real_t descent = 0.f;
+ real_t underline_position = 0.f;
+ real_t underline_thickness = 0.f;
+ real_t scale = 1.f;
+ real_t oversampling = 1.f;
+
+ int spacing_glyph = 0;
+ int spacing_space = 0;
+
+ Vector2i size;
+
+ Vector<FontTexture> textures;
+ HashMap<int32_t, FontGlyph> glyph_map;
+ Map<Vector2i, Vector2> kerning_map;
+
+ hb_font_t *hb_handle = nullptr;
+
+#ifdef MODULE_FREETYPE_ENABLED
+ FT_Face face = nullptr;
+ FT_StreamRec stream;
+#endif
+
+ ~FontDataForSizeAdvanced() {
+ if (hb_handle != nullptr) {
+ hb_font_destroy(hb_handle);
+ }
+#ifdef MODULE_FREETYPE_ENABLED
+ if (face != nullptr) {
+ FT_Done_Face(face);
+ }
+#endif
+ }
+ };
+
+ struct FontDataAdvanced {
+ Mutex mutex;
+
+ bool antialiased = true;
+ bool msdf = false;
+ int msdf_range = 14;
+ int msdf_source_size = 48;
+ int fixed_size = 0;
+ bool force_autohinter = false;
+ TextServer::Hinting hinting = TextServer::HINTING_LIGHT;
+ Dictionary variation_coordinates;
+ real_t oversampling = 0.f;
+
+ Map<Vector2i, FontDataForSizeAdvanced *> cache;
+
+ bool face_init = false;
+ Set<uint32_t> supported_scripts;
+ Dictionary supported_features;
+ Dictionary supported_varaitions;
+
+ // Language/script support override.
+ Map<String, bool> language_support_overrides;
+ Map<String, bool> script_support_overrides;
+
+ PackedByteArray data;
+ const uint8_t *data_ptr;
+ size_t data_size;
+ mutable ThreadWorkPool work_pool;
+
+ ~FontDataAdvanced() {
+ work_pool.finish();
+ for (const Map<Vector2i, FontDataForSizeAdvanced *>::Element *E = cache.front(); E; E = E->next()) {
+ memdelete(E->get());
+ }
+ cache.clear();
+ }
+ };
+
+ _FORCE_INLINE_ FontTexturePosition find_texture_pos_for_glyph(FontDataForSizeAdvanced *p_data, int p_color_size, Image::Format p_image_format, int p_width, int p_height) const;
+#ifdef MODULE_MSDFGEN_ENABLED
+ _FORCE_INLINE_ FontGlyph rasterize_msdf(FontDataAdvanced *p_font_data, FontDataForSizeAdvanced *p_data, int p_pixel_range, int p_rect_margin, FT_Outline *outline, const Vector2 &advance) const;
+#endif
+#ifdef MODULE_FREETYPE_ENABLED
+ _FORCE_INLINE_ FontGlyph rasterize_bitmap(FontDataForSizeAdvanced *p_data, int p_rect_margin, FT_Bitmap bitmap, int yofs, int xofs, const Vector2 &advance) const;
+#endif
+ _FORCE_INLINE_ bool _ensure_glyph(FontDataAdvanced *p_font_data, const Vector2i &p_size, int32_t p_glyph) const;
+ _FORCE_INLINE_ bool _ensure_cache_for_size(FontDataAdvanced *p_font_data, const Vector2i &p_size) const;
+ _FORCE_INLINE_ void _font_clear_cache(FontDataAdvanced *p_font_data);
+ void _generateMTSDF_threaded(uint32_t y, void *p_td) const;
+
+ _FORCE_INLINE_ Vector2i _get_size(const FontDataAdvanced *p_font_data, int p_size) const {
+ if (p_font_data->msdf) {
+ return Vector2i(p_font_data->msdf_source_size, 0);
+ } else if (p_font_data->fixed_size > 0) {
+ return Vector2i(p_font_data->fixed_size, 0);
+ } else {
+ return Vector2i(p_size, 0);
+ }
+ }
+
+ _FORCE_INLINE_ Vector2i _get_size_outline(const FontDataAdvanced *p_font_data, const Vector2i &p_size) const {
+ if (p_font_data->msdf) {
+ return Vector2i(p_font_data->msdf_source_size, 0);
+ } else if (p_font_data->fixed_size > 0) {
+ return Vector2i(p_font_data->fixed_size, MIN(p_size.y, 1));
+ } else {
+ return p_size;
+ }
+ }
+
+ // Shaped text cache data.
+
struct ShapedTextDataAdvanced : public ShapedTextData {
/* Intermediate data */
Char16String utf16;
@@ -88,7 +243,9 @@ class TextServerAdvanced : public TextServer {
}
};
- float oversampling = 1.f;
+ // Common data.
+
+ real_t oversampling = 1.f;
mutable RID_PtrOwner<FontDataAdvanced> font_owner;
mutable RID_PtrOwner<ShapedTextDataAdvanced> shaped_owner;
@@ -97,6 +254,29 @@ class TextServerAdvanced : public TextServer {
void _shape_run(ShapedTextDataAdvanced *p_sd, int32_t p_start, int32_t p_end, hb_script_t p_script, hb_direction_t p_direction, Vector<RID> p_fonts, int p_span, int p_fb_index);
TextServer::Glyph _shape_single_glyph(ShapedTextDataAdvanced *p_sd, char32_t p_char, hb_script_t p_script, hb_direction_t p_direction, RID p_font, int p_font_size);
+ // HarfBuzz bitmap font interface.
+
+ static hb_font_funcs_t *funcs;
+
+ struct hb_bmp_font_t {
+ TextServerAdvanced::FontDataForSizeAdvanced *face = nullptr;
+ bool unref = false; /* Whether to destroy bm_face when done. */
+ };
+
+ static hb_bmp_font_t *_hb_bmp_font_create(TextServerAdvanced::FontDataForSizeAdvanced *p_face, bool p_unref);
+ static void _hb_bmp_font_destroy(void *p_data);
+ static hb_bool_t hb_bmp_get_nominal_glyph(hb_font_t *p_font, void *p_font_data, hb_codepoint_t p_unicode, hb_codepoint_t *r_glyph, void *p_user_data);
+ static hb_position_t hb_bmp_get_glyph_h_advance(hb_font_t *p_font, void *p_font_data, hb_codepoint_t p_glyph, void *p_user_data);
+ static hb_position_t hb_bmp_get_glyph_v_advance(hb_font_t *p_font, void *p_font_data, hb_codepoint_t p_glyph, void *p_user_data);
+ static hb_position_t hb_bmp_get_glyph_h_kerning(hb_font_t *p_font, void *p_font_data, hb_codepoint_t p_left_glyph, hb_codepoint_t p_right_glyph, void *p_user_data);
+ static hb_bool_t hb_bmp_get_glyph_v_origin(hb_font_t *p_font, void *p_font_data, hb_codepoint_t p_glyph, hb_position_t *r_x, hb_position_t *r_y, void *p_user_data);
+ static hb_bool_t hb_bmp_get_glyph_extents(hb_font_t *p_font, void *p_font_data, hb_codepoint_t p_glyph, hb_glyph_extents_t *r_extents, void *p_user_data);
+ static hb_bool_t hb_bmp_get_font_h_extents(hb_font_t *p_font, void *p_font_data, hb_font_extents_t *r_metrics, void *p_user_data);
+ static void hb_bmp_create_font_funcs();
+ static void hb_bmp_free_font_funcs();
+ static void _hb_bmp_font_set_funcs(hb_font_t *p_font, TextServerAdvanced::FontDataForSizeAdvanced *p_face, bool p_unref);
+ static hb_font_t *hb_bmp_font_create(TextServerAdvanced::FontDataForSizeAdvanced *p_face, hb_destroy_func_t p_destroy);
+
protected:
static void _bind_methods(){};
@@ -119,81 +299,132 @@ public:
virtual bool is_locale_right_to_left(const String &p_locale) override;
- virtual int32_t name_to_tag(const String &p_name) override;
- virtual String tag_to_name(int32_t p_tag) override;
+ virtual int32_t name_to_tag(const String &p_name) const override;
+ virtual String tag_to_name(int32_t p_tag) const override;
/* Font interface */
- virtual RID create_font_system(const String &p_name, int p_base_size = 16) override;
- virtual RID create_font_resource(const String &p_filename, int p_base_size = 16) override;
- virtual RID create_font_memory(const uint8_t *p_data, size_t p_size, const String &p_type, int p_base_size = 16) override;
- virtual RID create_font_bitmap(float p_height, float p_ascent, int p_base_size = 16) override;
+ virtual RID create_font() override;
+
+ virtual void font_set_data(RID p_font_rid, const PackedByteArray &p_data) override;
+ virtual void font_set_data_ptr(RID p_font_rid, const uint8_t *p_data_ptr, size_t p_data_size) override;
+
+ virtual void font_set_antialiased(RID p_font_rid, bool p_antialiased) override;
+ virtual bool font_is_antialiased(RID p_font_rid) const override;
+
+ virtual void font_set_multichannel_signed_distance_field(RID p_font_rid, bool p_msdf) override;
+ virtual bool font_is_multichannel_signed_distance_field(RID p_font_rid) const override;
+
+ virtual void font_set_msdf_pixel_range(RID p_font_rid, int p_msdf_pixel_range) override;
+ virtual int font_get_msdf_pixel_range(RID p_font_rid) const override;
+
+ virtual void font_set_msdf_size(RID p_font_rid, int p_msdf_size) override;
+ virtual int font_get_msdf_size(RID p_font_rid) const override;
+
+ virtual void font_set_fixed_size(RID p_font_rid, int p_fixed_size) override;
+ virtual int font_get_fixed_size(RID p_font_rid) const override;
+
+ virtual void font_set_force_autohinter(RID p_font_rid, bool p_force_autohinter) override;
+ virtual bool font_is_force_autohinter(RID p_font_rid) const override;
+
+ virtual void font_set_hinting(RID p_font_rid, TextServer::Hinting p_hinting) override;
+ virtual TextServer::Hinting font_get_hinting(RID p_font_rid) const override;
+
+ virtual void font_set_variation_coordinates(RID p_font_rid, const Dictionary &p_variation_coordinates) override;
+ virtual Dictionary font_get_variation_coordinates(RID p_font_rid) const override;
+
+ virtual void font_set_oversampling(RID p_font_rid, real_t p_oversampling) override;
+ virtual real_t font_get_oversampling(RID p_font_rid) const override;
+
+ virtual Array font_get_size_cache_list(RID p_font_rid) const override;
+ virtual void font_clear_size_cache(RID p_font_rid) override;
+ virtual void font_remove_size_cache(RID p_font_rid, const Vector2i &p_size) override;
+
+ hb_font_t *_font_get_hb_handle(RID p_font, int p_font_size) const;
+
+ virtual void font_set_ascent(RID p_font_rid, int p_size, real_t p_ascent) override;
+ virtual real_t font_get_ascent(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_descent(RID p_font_rid, int p_size, real_t p_descent) override;
+ virtual real_t font_get_descent(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_underline_position(RID p_font_rid, int p_size, real_t p_underline_position) override;
+ virtual real_t font_get_underline_position(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_underline_thickness(RID p_font_rid, int p_size, real_t p_underline_thickness) override;
+ virtual real_t font_get_underline_thickness(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_scale(RID p_font_rid, int p_size, real_t p_scale) override;
+ virtual real_t font_get_scale(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_spacing(RID p_font_rid, int p_size, SpacingType p_spacing, int p_value) override;
+ virtual int font_get_spacing(RID p_font_rid, int p_size, SpacingType p_spacing) const override;
- virtual void font_bitmap_add_texture(RID p_font, const Ref<Texture> &p_texture) override;
- virtual void font_bitmap_add_char(RID p_font, char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) override;
- virtual void font_bitmap_add_kerning_pair(RID p_font, char32_t p_A, char32_t p_B, int p_kerning) override;
+ virtual int font_get_texture_count(RID p_font_rid, const Vector2i &p_size) const override;
+ virtual void font_clear_textures(RID p_font_rid, const Vector2i &p_size) override;
+ virtual void font_remove_texture(RID p_font_rid, const Vector2i &p_size, int p_texture_index) override;
- virtual float font_get_height(RID p_font, int p_size) const override;
- virtual float font_get_ascent(RID p_font, int p_size) const override;
- virtual float font_get_descent(RID p_font, int p_size) const override;
+ virtual void font_set_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const Ref<Image> &p_image) override;
+ virtual Ref<Image> font_get_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const override;
- virtual float font_get_underline_position(RID p_font, int p_size) const override;
- virtual float font_get_underline_thickness(RID p_font, int p_size) const override;
+ virtual void font_set_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const PackedInt32Array &p_offset) override;
+ virtual PackedInt32Array font_get_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const override;
- virtual int font_get_spacing_space(RID p_font) const override;
- virtual void font_set_spacing_space(RID p_font, int p_value) override;
+ virtual Array font_get_glyph_list(RID p_font_rid, const Vector2i &p_size) const override;
+ virtual void font_clear_glyphs(RID p_font_rid, const Vector2i &p_size) override;
+ virtual void font_remove_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) override;
- virtual int font_get_spacing_glyph(RID p_font) const override;
- virtual void font_set_spacing_glyph(RID p_font, int p_value) override;
+ virtual Vector2 font_get_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph, const Vector2 &p_advance) override;
- virtual void font_set_antialiased(RID p_font, bool p_antialiased) override;
- virtual bool font_get_antialiased(RID p_font) const override;
+ virtual Vector2 font_get_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_offset) override;
- virtual Dictionary font_get_feature_list(RID p_font) const override;
- virtual Dictionary font_get_variation_list(RID p_font) const override;
+ virtual Vector2 font_get_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_gl_size) override;
- virtual void font_set_variation(RID p_font, const String &p_name, double p_value) override;
- virtual double font_get_variation(RID p_font, const String &p_name) const override;
+ virtual Rect2 font_get_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Rect2 &p_uv_rect) override;
- virtual void font_set_hinting(RID p_font, Hinting p_hinting) override;
- virtual Hinting font_get_hinting(RID p_font) const override;
+ virtual int font_get_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, int p_texture_idx) override;
- virtual void font_set_distance_field_hint(RID p_font, bool p_distance_field) override;
- virtual bool font_get_distance_field_hint(RID p_font) const override;
+ virtual bool font_get_glyph_contours(RID p_font, int p_size, int32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const override;
- virtual void font_set_force_autohinter(RID p_font, bool p_enabeld) override;
- virtual bool font_get_force_autohinter(RID p_font) const override;
+ virtual Array font_get_kerning_list(RID p_font_rid, int p_size) const override;
+ virtual void font_clear_kerning_map(RID p_font_rid, int p_size) override;
+ virtual void font_remove_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) override;
- virtual bool font_has_char(RID p_font, char32_t p_char) const override;
- virtual String font_get_supported_chars(RID p_font) const override;
+ virtual void font_set_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) override;
+ virtual Vector2 font_get_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) const override;
- virtual bool font_has_outline(RID p_font) const override;
- virtual float font_get_base_size(RID p_font) const override;
+ virtual int32_t font_get_glyph_index(RID p_font_rid, int p_size, char32_t p_char, char32_t p_variation_selector = 0) const override;
- virtual bool font_is_language_supported(RID p_font, const String &p_language) const override;
- virtual void font_set_language_support_override(RID p_font, const String &p_language, bool p_supported) override;
- virtual bool font_get_language_support_override(RID p_font, const String &p_language) override;
- virtual void font_remove_language_support_override(RID p_font, const String &p_language) override;
- Vector<String> font_get_language_support_overrides(RID p_font) override;
+ virtual bool font_has_char(RID p_font_rid, char32_t p_char) const override;
+ virtual String font_get_supported_chars(RID p_font_rid) const override;
- virtual bool font_is_script_supported(RID p_font, const String &p_script) const override;
- virtual void font_set_script_support_override(RID p_font, const String &p_script, bool p_supported) override;
- virtual bool font_get_script_support_override(RID p_font, const String &p_script) override;
- virtual void font_remove_script_support_override(RID p_font, const String &p_script) override;
- Vector<String> font_get_script_support_overrides(RID p_font) override;
+ virtual void font_render_range(RID p_font, const Vector2i &p_size, char32_t p_start, char32_t p_end) override;
+ virtual void font_render_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_index) override;
- virtual uint32_t font_get_glyph_index(RID p_font, char32_t p_char, char32_t p_variation_selector = 0x0000) const override;
- virtual Vector2 font_get_glyph_advance(RID p_font, uint32_t p_index, int p_size) const override;
- virtual Vector2 font_get_glyph_kerning(RID p_font, uint32_t p_index_a, uint32_t p_index_b, int p_size) const override;
+ virtual void font_draw_glyph(RID p_font, RID p_canvas, int p_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
+ virtual void font_draw_glyph_outline(RID p_font, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
- virtual Vector2 font_draw_glyph(RID p_font, RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
- virtual Vector2 font_draw_glyph_outline(RID p_font, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
+ virtual bool font_is_language_supported(RID p_font_rid, const String &p_language) const override;
+ virtual void font_set_language_support_override(RID p_font_rid, const String &p_language, bool p_supported) override;
+ virtual bool font_get_language_support_override(RID p_font_rid, const String &p_language) override;
+ virtual void font_remove_language_support_override(RID p_font_rid, const String &p_language) override;
+ virtual Vector<String> font_get_language_support_overrides(RID p_font_rid) override;
- virtual bool font_get_glyph_contours(RID p_font, int p_size, uint32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const override;
+ virtual bool font_is_script_supported(RID p_font_rid, const String &p_script) const override;
+ virtual void font_set_script_support_override(RID p_font_rid, const String &p_script, bool p_supported) override;
+ virtual bool font_get_script_support_override(RID p_font_rid, const String &p_script) override;
+ virtual void font_remove_script_support_override(RID p_font_rid, const String &p_script) override;
+ virtual Vector<String> font_get_script_support_overrides(RID p_font_rid) override;
- virtual float font_get_oversampling() const override;
- virtual void font_set_oversampling(float p_oversampling) override;
+ virtual Dictionary font_supported_feature_list(RID p_font_rid) const override;
+ virtual Dictionary font_supported_variation_list(RID p_font_rid) const override;
- virtual Vector<String> get_system_fonts() const override;
+ virtual real_t font_get_global_oversampling() const override;
+ virtual void font_set_global_oversampling(real_t p_oversampling) override;
/* Shaped text buffer interface */
@@ -222,14 +453,14 @@ public:
virtual RID shaped_text_substr(RID p_shaped, int p_start, int p_length) const override;
virtual RID shaped_text_get_parent(RID p_shaped) const override;
- virtual float shaped_text_fit_to_width(RID p_shaped, float p_width, uint8_t /*JustificationFlag*/ p_jst_flags = JUSTIFICATION_WORD_BOUND | JUSTIFICATION_KASHIDA) override;
- virtual float shaped_text_tab_align(RID p_shaped, const Vector<float> &p_tab_stops) override;
+ virtual real_t shaped_text_fit_to_width(RID p_shaped, real_t p_width, uint8_t /*JustificationFlag*/ p_jst_flags = JUSTIFICATION_WORD_BOUND | JUSTIFICATION_KASHIDA) override;
+ virtual real_t shaped_text_tab_align(RID p_shaped, const Vector<real_t> &p_tab_stops) override;
virtual bool shaped_text_shape(RID p_shaped) override;
virtual bool shaped_text_update_breaks(RID p_shaped) override;
virtual bool shaped_text_update_justification_ops(RID p_shaped) override;
- virtual void shaped_text_overrun_trim_to_width(RID p_shaped, float p_width, uint8_t p_trim_flags) override;
+ virtual void shaped_text_overrun_trim_to_width(RID p_shaped, real_t p_width, uint8_t p_trim_flags) override;
virtual TrimData shaped_text_get_trim_data(RID p_shaped) const override;
virtual bool shaped_text_is_ready(RID p_shaped) const override;
@@ -244,11 +475,11 @@ public:
virtual Rect2 shaped_text_get_object_rect(RID p_shaped, Variant p_key) const override;
virtual Size2 shaped_text_get_size(RID p_shaped) const override;
- virtual float shaped_text_get_ascent(RID p_shaped) const override;
- virtual float shaped_text_get_descent(RID p_shaped) const override;
- virtual float shaped_text_get_width(RID p_shaped) const override;
- virtual float shaped_text_get_underline_position(RID p_shaped) const override;
- virtual float shaped_text_get_underline_thickness(RID p_shaped) const override;
+ virtual real_t shaped_text_get_ascent(RID p_shaped) const override;
+ virtual real_t shaped_text_get_descent(RID p_shaped) const override;
+ virtual real_t shaped_text_get_width(RID p_shaped) const override;
+ virtual real_t shaped_text_get_underline_position(RID p_shaped) const override;
+ virtual real_t shaped_text_get_underline_thickness(RID p_shaped) const override;
virtual String format_number(const String &p_string, const String &p_language = "") const override;
virtual String parse_number(const String &p_string, const String &p_language = "") const override;
diff --git a/modules/text_server_fb/SCsub b/modules/text_server_fb/SCsub
index 03eccbe7bd..31d1db6167 100644
--- a/modules/text_server_fb/SCsub
+++ b/modules/text_server_fb/SCsub
@@ -3,11 +3,23 @@
Import("env")
Import("env_modules")
+freetype_enabled = env.module_check_dependencies("text_server_fb", ["freetype"], True)
+msdngen_enabled = env.module_check_dependencies("text_server_fb", ["msdfgen"], True)
+
env_text_server_fb = env_modules.Clone()
-env_text_server_fb.Append(
- CPPPATH=[
- "#thirdparty/freetype/include",
- ]
-)
+
+if msdngen_enabled:
+ env_text_server_fb.Append(
+ CPPPATH=[
+ "#thirdparty/msdfgen",
+ ]
+ )
+
+if freetype_enabled:
+ env_text_server_fb.Append(
+ CPPPATH=[
+ "#thirdparty/freetype/include",
+ ]
+ )
env_text_server_fb.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/text_server_fb/bitmap_font_fb.cpp b/modules/text_server_fb/bitmap_font_fb.cpp
deleted file mode 100644
index 313f170f04..0000000000
--- a/modules/text_server_fb/bitmap_font_fb.cpp
+++ /dev/null
@@ -1,352 +0,0 @@
-/*************************************************************************/
-/* bitmap_font_fb.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "bitmap_font_fb.h"
-
-Error BitmapFontDataFallback::load_from_file(const String &p_filename, int p_base_size) {
- _THREAD_SAFE_METHOD_
- //fnt format used by angelcode bmfont
- //http://www.angelcode.com/products/bmfont/
-
- FileAccess *f = FileAccess::open(p_filename, FileAccess::READ);
- ERR_FAIL_COND_V_MSG(!f, ERR_FILE_NOT_FOUND, "Can't open font: " + p_filename + ".");
-
- while (true) {
- String line = f->get_line();
-
- int delimiter = line.find(" ");
- String type = line.substr(0, delimiter);
- int pos = delimiter + 1;
- Map<String, String> keys;
-
- while (pos < line.size() && line[pos] == ' ') {
- pos++;
- }
-
- while (pos < line.size()) {
- int eq = line.find("=", pos);
- if (eq == -1) {
- break;
- }
- String key = line.substr(pos, eq - pos);
- int end = -1;
- String value;
- if (line[eq + 1] == '"') {
- end = line.find("\"", eq + 2);
- if (end == -1) {
- break;
- }
- value = line.substr(eq + 2, end - 1 - eq - 1);
- pos = end + 1;
- } else {
- end = line.find(" ", eq + 1);
- if (end == -1) {
- end = line.size();
- }
- value = line.substr(eq + 1, end - eq);
- pos = end;
- }
-
- while (pos < line.size() && line[pos] == ' ') {
- pos++;
- }
-
- keys[key] = value;
- }
-
- if (type == "info") {
- if (keys.has("size")) {
- base_size = keys["size"].to_int();
- }
- } else if (type == "common") {
- if (keys.has("lineHeight")) {
- height = keys["lineHeight"].to_int();
- }
- if (keys.has("base")) {
- ascent = keys["base"].to_int();
- }
- } else if (type == "page") {
- if (keys.has("file")) {
- String base_dir = p_filename.get_base_dir();
- String file = base_dir.plus_file(keys["file"]);
- if (RenderingServer::get_singleton() != nullptr) {
- Ref<Texture2D> tex = ResourceLoader::load(file);
- if (tex.is_null()) {
- ERR_PRINT("Can't load font texture!");
- } else {
- ERR_FAIL_COND_V_MSG(tex.is_null(), ERR_FILE_CANT_READ, "It's not a reference to a valid Texture object.");
- textures.push_back(tex);
- }
- }
- }
- } else if (type == "char") {
- Character c;
- char32_t idx = 0;
- if (keys.has("id")) {
- idx = keys["id"].to_int();
- }
- if (keys.has("x")) {
- c.rect.position.x = keys["x"].to_int();
- }
- if (keys.has("y")) {
- c.rect.position.y = keys["y"].to_int();
- }
- if (keys.has("width")) {
- c.rect.size.width = keys["width"].to_int();
- }
- if (keys.has("height")) {
- c.rect.size.height = keys["height"].to_int();
- }
- if (keys.has("xoffset")) {
- c.align.x = keys["xoffset"].to_int();
- }
- if (keys.has("yoffset")) {
- c.align.y = keys["yoffset"].to_int();
- }
- if (keys.has("page")) {
- c.texture_idx = keys["page"].to_int();
- }
- if (keys.has("xadvance")) {
- c.advance.x = keys["xadvance"].to_int();
- }
- if (keys.has("yadvance")) {
- c.advance.y = keys["yadvance"].to_int();
- }
- if (c.advance.x < 0) {
- c.advance.x = c.rect.size.width + 1;
- }
- if (c.advance.y < 0) {
- c.advance.y = c.rect.size.height + 1;
- }
- char_map[idx] = c;
- } else if (type == "kerning") {
- KerningPairKey kpk;
- float k = 0.0;
- if (keys.has("first")) {
- kpk.A = keys["first"].to_int();
- }
- if (keys.has("second")) {
- kpk.B = keys["second"].to_int();
- }
- if (keys.has("amount")) {
- k = keys["amount"].to_int();
- }
- kerning_map[kpk] = k;
- }
-
- if (f->eof_reached()) {
- break;
- }
- }
- if (base_size == 0) {
- base_size = height;
- }
-
- valid = true;
-
- memdelete(f);
- return OK;
-}
-
-Error BitmapFontDataFallback::bitmap_new(float p_height, float p_ascent, int p_base_size) {
- height = p_height;
- ascent = p_ascent;
-
- base_size = p_base_size;
- if (base_size == 0) {
- base_size = height;
- }
-
- char_map.clear();
- textures.clear();
- kerning_map.clear();
-
- valid = true;
-
- return OK;
-}
-
-void BitmapFontDataFallback::bitmap_add_texture(const Ref<Texture> &p_texture) {
- ERR_FAIL_COND(!valid);
- ERR_FAIL_COND_MSG(p_texture.is_null(), "It's not a reference to a valid Texture object.");
-
- textures.push_back(p_texture);
-}
-
-void BitmapFontDataFallback::bitmap_add_char(char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) {
- ERR_FAIL_COND(!valid);
-
- Character chr;
- chr.rect = p_rect;
- chr.texture_idx = p_texture_idx;
- if (p_advance < 0) {
- chr.advance.x = chr.rect.size.x;
- } else {
- chr.advance.x = p_advance;
- }
- chr.align = p_align;
- char_map[p_char] = chr;
-}
-
-void BitmapFontDataFallback::bitmap_add_kerning_pair(char32_t p_A, char32_t p_B, int p_kerning) {
- ERR_FAIL_COND(!valid);
-
- KerningPairKey kpk;
- kpk.A = p_A;
- kpk.B = p_B;
-
- if (p_kerning == 0 && kerning_map.has(kpk)) {
- kerning_map.erase(kpk);
- } else {
- kerning_map[kpk] = p_kerning;
- }
-}
-
-float BitmapFontDataFallback::get_height(int p_size) const {
- ERR_FAIL_COND_V(!valid, 0.f);
- return height * (float(p_size) / float(base_size));
-}
-
-float BitmapFontDataFallback::get_ascent(int p_size) const {
- ERR_FAIL_COND_V(!valid, 0.f);
- return ascent * (float(p_size) / float(base_size));
-}
-
-float BitmapFontDataFallback::get_descent(int p_size) const {
- ERR_FAIL_COND_V(!valid, 0.f);
- return (height - ascent) * (float(p_size) / float(base_size));
-}
-
-float BitmapFontDataFallback::get_underline_position(int p_size) const {
- ERR_FAIL_COND_V(!valid, 0.f);
- return 2 * (float(p_size) / float(base_size));
-}
-
-float BitmapFontDataFallback::get_underline_thickness(int p_size) const {
- ERR_FAIL_COND_V(!valid, 0.f);
- return 1 * (float(p_size) / float(base_size));
-}
-
-void BitmapFontDataFallback::set_distance_field_hint(bool p_distance_field) {
- distance_field_hint = p_distance_field;
-}
-
-bool BitmapFontDataFallback::get_distance_field_hint() const {
- return distance_field_hint;
-}
-
-float BitmapFontDataFallback::get_base_size() const {
- return base_size;
-}
-
-bool BitmapFontDataFallback::has_char(char32_t p_char) const {
- _THREAD_SAFE_METHOD_
- ERR_FAIL_COND_V(!valid, false);
- return char_map.has(p_char);
-}
-
-String BitmapFontDataFallback::get_supported_chars() const {
- _THREAD_SAFE_METHOD_
- ERR_FAIL_COND_V(!valid, String());
- String chars;
- const char32_t *k = nullptr;
- while ((k = char_map.next(k))) {
- chars += char32_t(*k);
- }
- return chars;
-}
-
-Vector2 BitmapFontDataFallback::get_advance(char32_t p_char, int p_size) const {
- _THREAD_SAFE_METHOD_
- ERR_FAIL_COND_V(!valid, Vector2());
- const Character *c = char_map.getptr(p_char);
- ERR_FAIL_COND_V(c == nullptr, Vector2());
-
- return c->advance * (float(p_size) / float(base_size));
-}
-
-Vector2 BitmapFontDataFallback::get_kerning(char32_t p_char, char32_t p_next, int p_size) const {
- _THREAD_SAFE_METHOD_
- ERR_FAIL_COND_V(!valid, Vector2());
- KerningPairKey kpk;
- kpk.A = p_char;
- kpk.B = p_next;
-
- const Map<KerningPairKey, int>::Element *E = kerning_map.find(kpk);
- if (E) {
- return Vector2(-E->get() * (float(p_size) / float(base_size)), 0);
- } else {
- return Vector2();
- }
-}
-
-Vector2 BitmapFontDataFallback::draw_glyph(RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- _THREAD_SAFE_METHOD_
- if (p_index == 0) {
- return Vector2();
- }
- ERR_FAIL_COND_V(!valid, Vector2());
- const Character *c = char_map.getptr(p_index);
-
- ERR_FAIL_COND_V(c == nullptr, Vector2());
- ERR_FAIL_COND_V(c->texture_idx < -1 || c->texture_idx >= textures.size(), Vector2());
- if (c->texture_idx != -1) {
- Point2i cpos = p_pos;
- cpos += (c->align + Vector2(0, -ascent)) * (float(p_size) / float(base_size));
- Size2i csize = c->rect.size * (float(p_size) / float(base_size));
- if (RenderingServer::get_singleton() != nullptr) {
- //if (distance_field_hint) { // Not implemented.
- // RenderingServer::get_singleton()->canvas_item_set_distance_field_mode(p_canvas, true);
- //}
- RenderingServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas, Rect2(cpos, csize), textures[c->texture_idx]->get_rid(), c->rect, p_color, false, false);
- //if (distance_field_hint) {
- // RenderingServer::get_singleton()->canvas_item_set_distance_field_mode(p_canvas, false);
- //}
- }
- }
-
- return c->advance * (float(p_size) / float(base_size));
-}
-
-Vector2 BitmapFontDataFallback::draw_glyph_outline(RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- _THREAD_SAFE_METHOD_
- if (p_index == 0) {
- return Vector2();
- }
- ERR_FAIL_COND_V(!valid, Vector2());
- const Character *c = char_map.getptr(p_index);
-
- ERR_FAIL_COND_V(c == nullptr, Vector2());
- ERR_FAIL_COND_V(c->texture_idx < -1 || c->texture_idx >= textures.size(), Vector2());
-
- // Not supported, return advance for compatibility.
-
- return c->advance * (float(p_size) / float(base_size));
-}
diff --git a/modules/text_server_fb/bitmap_font_fb.h b/modules/text_server_fb/bitmap_font_fb.h
deleted file mode 100644
index 7cd7507ebc..0000000000
--- a/modules/text_server_fb/bitmap_font_fb.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*************************************************************************/
-/* bitmap_font_fb.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef BITMAP_FONT_FALLBACK_H
-#define BITMAP_FONT_FALLBACK_H
-
-#include "font_fb.h"
-
-struct BitmapFontDataFallback : public FontDataFallback {
- _THREAD_SAFE_CLASS_
-
-private:
- Vector<Ref<Texture2D>> textures;
-
- struct Character {
- int texture_idx = 0;
- Rect2 rect;
- Vector2 align;
- Vector2 advance = Vector2(-1, -1);
- };
-
- struct KerningPairKey {
- union {
- struct {
- uint32_t A, B;
- };
-
- uint64_t pair = 0;
- };
-
- _FORCE_INLINE_ bool operator<(const KerningPairKey &p_r) const { return pair < p_r.pair; }
- };
-
- HashMap<char32_t, Character> char_map;
- Map<KerningPairKey, int> kerning_map;
-
- float height = 0.f;
- float ascent = 0.f;
- int base_size = 0;
- bool distance_field_hint = false;
-
-public:
- virtual void clear_cache() override{};
-
- virtual Error load_from_file(const String &p_filename, int p_base_size) override;
- virtual Error bitmap_new(float p_height, float p_ascent, int p_base_size) override;
-
- virtual void bitmap_add_texture(const Ref<Texture> &p_texture) override;
- virtual void bitmap_add_char(char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) override;
- virtual void bitmap_add_kerning_pair(char32_t p_A, char32_t p_B, int p_kerning) override;
-
- virtual float get_height(int p_size) const override;
- virtual float get_ascent(int p_size) const override;
- virtual float get_descent(int p_size) const override;
-
- virtual float get_underline_position(int p_size) const override;
- virtual float get_underline_thickness(int p_size) const override;
-
- virtual void set_antialiased(bool p_antialiased) override{};
- virtual bool get_antialiased() const override { return false; };
-
- virtual void set_hinting(TextServer::Hinting p_hinting) override{};
- virtual TextServer::Hinting get_hinting() const override { return TextServer::HINTING_NONE; };
-
- virtual void set_distance_field_hint(bool p_distance_field) override;
- virtual bool get_distance_field_hint() const override;
-
- virtual void set_force_autohinter(bool p_enabeld) override{};
- virtual bool get_force_autohinter() const override { return false; };
-
- virtual bool has_outline() const override { return false; };
- virtual float get_base_size() const override;
-
- virtual bool has_char(char32_t p_char) const override;
- virtual String get_supported_chars() const override;
-
- virtual Vector2 get_advance(char32_t p_char, int p_size) const override;
- virtual Vector2 get_kerning(char32_t p_char, char32_t p_next, int p_size) const override;
-
- virtual Vector2 draw_glyph(RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const override;
- virtual Vector2 draw_glyph_outline(RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const override;
-};
-
-#endif // BITMAP_FONT_FALLBACK_H
diff --git a/modules/text_server_fb/dynamic_font_fb.cpp b/modules/text_server_fb/dynamic_font_fb.cpp
deleted file mode 100644
index 7e77987074..0000000000
--- a/modules/text_server_fb/dynamic_font_fb.cpp
+++ /dev/null
@@ -1,713 +0,0 @@
-/*************************************************************************/
-/* dynamic_font_fb.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "dynamic_font_fb.h"
-
-#ifdef MODULE_FREETYPE_ENABLED
-
-#include FT_STROKER_H
-#include FT_ADVANCES_H
-
-DynamicFontDataFallback::DataAtSize *DynamicFontDataFallback::get_data_for_size(int p_size, int p_outline_size) {
- ERR_FAIL_COND_V(!valid, nullptr);
- ERR_FAIL_COND_V(p_size < 0 || p_size > UINT16_MAX, nullptr);
- ERR_FAIL_COND_V(p_outline_size < 0 || p_outline_size > UINT16_MAX, nullptr);
-
- CacheID id;
- id.size = p_size;
- id.outline_size = p_outline_size;
-
- DataAtSize *fds = nullptr;
- Map<CacheID, DataAtSize *>::Element *E = nullptr;
- if (p_outline_size != 0) {
- E = size_cache_outline.find(id);
- } else {
- E = size_cache.find(id);
- }
-
- if (E != nullptr) {
- fds = E->get();
- } else {
- if (font_mem == nullptr && font_path != String()) {
- if (!font_mem_cache.is_empty()) {
- font_mem = font_mem_cache.ptr();
- font_mem_size = font_mem_cache.size();
- } else {
- FileAccess *f = FileAccess::open(font_path, FileAccess::READ);
- if (!f) {
- ERR_FAIL_V_MSG(nullptr, "Cannot open font file '" + font_path + "'.");
- }
-
- uint64_t len = f->get_length();
- font_mem_cache.resize(len);
- f->get_buffer(font_mem_cache.ptrw(), len);
- font_mem = font_mem_cache.ptr();
- font_mem_size = len;
- f->close();
- }
- }
-
- int error = 0;
- fds = memnew(DataAtSize);
- if (font_mem) {
- memset(&fds->stream, 0, sizeof(FT_StreamRec));
- fds->stream.base = (unsigned char *)font_mem;
- fds->stream.size = font_mem_size;
- fds->stream.pos = 0;
-
- FT_Open_Args fargs;
- memset(&fargs, 0, sizeof(FT_Open_Args));
- fargs.memory_base = (unsigned char *)font_mem;
- fargs.memory_size = font_mem_size;
- fargs.flags = FT_OPEN_MEMORY;
- fargs.stream = &fds->stream;
- error = FT_Open_Face(library, &fargs, 0, &fds->face);
-
- } else {
- memdelete(fds);
- ERR_FAIL_V_MSG(nullptr, "DynamicFont uninitialized.");
- }
-
- if (error == FT_Err_Unknown_File_Format) {
- memdelete(fds);
- ERR_FAIL_V_MSG(nullptr, "Unknown font format.");
-
- } else if (error) {
- memdelete(fds);
- ERR_FAIL_V_MSG(nullptr, "Error loading font.");
- }
-
- oversampling = TS->font_get_oversampling();
-
- if (FT_HAS_COLOR(fds->face) && fds->face->num_fixed_sizes > 0) {
- int best_match = 0;
- int diff = ABS(p_size - ((int64_t)fds->face->available_sizes[0].width));
- fds->scale_color_font = float(p_size * oversampling) / fds->face->available_sizes[0].width;
- for (int i = 1; i < fds->face->num_fixed_sizes; i++) {
- int ndiff = ABS(p_size - ((int64_t)fds->face->available_sizes[i].width));
- if (ndiff < diff) {
- best_match = i;
- diff = ndiff;
- fds->scale_color_font = float(p_size * oversampling) / fds->face->available_sizes[i].width;
- }
- }
- FT_Select_Size(fds->face, best_match);
- } else {
- FT_Set_Pixel_Sizes(fds->face, 0, p_size * oversampling);
- }
-
- fds->size = p_size;
- fds->ascent = (fds->face->size->metrics.ascender / 64.0) / oversampling * fds->scale_color_font;
- fds->descent = (-fds->face->size->metrics.descender / 64.0) / oversampling * fds->scale_color_font;
- fds->underline_position = (-FT_MulFix(fds->face->underline_position, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font;
- fds->underline_thickness = (FT_MulFix(fds->face->underline_thickness, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font;
-
- if (p_outline_size != 0) {
- size_cache_outline[id] = fds;
- } else {
- size_cache[id] = fds;
- }
- }
-
- return fds;
-}
-
-DynamicFontDataFallback::TexturePosition DynamicFontDataFallback::find_texture_pos_for_glyph(DynamicFontDataFallback::DataAtSize *p_data, int p_color_size, Image::Format p_image_format, int p_width, int p_height) {
- TexturePosition ret;
- ret.index = -1;
-
- int mw = p_width;
- int mh = p_height;
-
- for (int i = 0; i < p_data->textures.size(); i++) {
- const CharTexture &ct = p_data->textures[i];
-
- if (RenderingServer::get_singleton() != nullptr) {
- if (ct.texture->get_format() != p_image_format) {
- continue;
- }
- }
-
- if (mw > ct.texture_size || mh > ct.texture_size) { //too big for this texture
- continue;
- }
-
- ret.y = 0x7FFFFFFF;
- ret.x = 0;
-
- for (int j = 0; j < ct.texture_size - mw; j++) {
- int max_y = 0;
-
- for (int k = j; k < j + mw; k++) {
- int y = ct.offsets[k];
- if (y > max_y) {
- max_y = y;
- }
- }
-
- if (max_y < ret.y) {
- ret.y = max_y;
- ret.x = j;
- }
- }
-
- if (ret.y == 0x7FFFFFFF || ret.y + mh > ct.texture_size) {
- continue; //fail, could not fit it here
- }
-
- ret.index = i;
- break;
- }
-
- if (ret.index == -1) {
- //could not find texture to fit, create one
- ret.x = 0;
- ret.y = 0;
-
- int texsize = MAX(p_data->size * oversampling * 8, 256);
- if (mw > texsize) {
- texsize = mw; //special case, adapt to it?
- }
- if (mh > texsize) {
- texsize = mh; //special case, adapt to it?
- }
-
- texsize = next_power_of_2(texsize);
-
- texsize = MIN(texsize, 4096);
-
- CharTexture tex;
- tex.texture_size = texsize;
- tex.imgdata.resize(texsize * texsize * p_color_size); //grayscale alpha
-
- {
- //zero texture
- uint8_t *w = tex.imgdata.ptrw();
- ERR_FAIL_COND_V(texsize * texsize * p_color_size > tex.imgdata.size(), ret);
- // Initialize the texture to all-white pixels to prevent artifacts when the
- // font is displayed at a non-default scale with filtering enabled.
- if (p_color_size == 2) {
- for (int i = 0; i < texsize * texsize * p_color_size; i += 2) { // FORMAT_LA8
- w[i + 0] = 255;
- w[i + 1] = 0;
- }
- } else if (p_color_size == 4) {
- for (int i = 0; i < texsize * texsize * p_color_size; i += 4) { // FORMAT_RGBA8
- w[i + 0] = 255;
- w[i + 1] = 255;
- w[i + 2] = 255;
- w[i + 3] = 0;
- }
- } else {
- ERR_FAIL_V(ret);
- }
- }
- tex.offsets.resize(texsize);
- for (int i = 0; i < texsize; i++) { //zero offsets
- tex.offsets.write[i] = 0;
- }
-
- p_data->textures.push_back(tex);
- ret.index = p_data->textures.size() - 1;
- }
-
- return ret;
-}
-
-DynamicFontDataFallback::Character DynamicFontDataFallback::Character::not_found() {
- Character ch;
- return ch;
-}
-
-DynamicFontDataFallback::Character DynamicFontDataFallback::bitmap_to_character(DynamicFontDataFallback::DataAtSize *p_data, FT_Bitmap bitmap, int yofs, int xofs, const Vector2 &advance) {
- int w = bitmap.width;
- int h = bitmap.rows;
-
- int mw = w + rect_margin * 2;
- int mh = h + rect_margin * 2;
-
- ERR_FAIL_COND_V(mw > 4096, Character::not_found());
- ERR_FAIL_COND_V(mh > 4096, Character::not_found());
-
- int color_size = bitmap.pixel_mode == FT_PIXEL_MODE_BGRA ? 4 : 2;
- Image::Format require_format = color_size == 4 ? Image::FORMAT_RGBA8 : Image::FORMAT_LA8;
-
- TexturePosition tex_pos = find_texture_pos_for_glyph(p_data, color_size, require_format, mw, mh);
- ERR_FAIL_COND_V(tex_pos.index < 0, Character::not_found());
-
- //fit character in char texture
-
- CharTexture &tex = p_data->textures.write[tex_pos.index];
-
- {
- uint8_t *wr = tex.imgdata.ptrw();
-
- for (int i = 0; i < h; i++) {
- for (int j = 0; j < w; j++) {
- int ofs = ((i + tex_pos.y + rect_margin) * tex.texture_size + j + tex_pos.x + rect_margin) * color_size;
- ERR_FAIL_COND_V(ofs >= tex.imgdata.size(), Character::not_found());
- switch (bitmap.pixel_mode) {
- case FT_PIXEL_MODE_MONO: {
- int byte = i * bitmap.pitch + (j >> 3);
- int bit = 1 << (7 - (j % 8));
- wr[ofs + 0] = 255; //grayscale as 1
- wr[ofs + 1] = (bitmap.buffer[byte] & bit) ? 255 : 0;
- } break;
- case FT_PIXEL_MODE_GRAY:
- wr[ofs + 0] = 255; //grayscale as 1
- wr[ofs + 1] = bitmap.buffer[i * bitmap.pitch + j];
- break;
- case FT_PIXEL_MODE_BGRA: {
- int ofs_color = i * bitmap.pitch + (j << 2);
- wr[ofs + 2] = bitmap.buffer[ofs_color + 0];
- wr[ofs + 1] = bitmap.buffer[ofs_color + 1];
- wr[ofs + 0] = bitmap.buffer[ofs_color + 2];
- wr[ofs + 3] = bitmap.buffer[ofs_color + 3];
- } break;
- // TODO: FT_PIXEL_MODE_LCD
- default:
- ERR_FAIL_V_MSG(Character::not_found(), "Font uses unsupported pixel format: " + itos(bitmap.pixel_mode) + ".");
- break;
- }
- }
- }
- }
-
- //blit to image and texture
- {
- if (RenderingServer::get_singleton() != nullptr) {
- Ref<Image> img = memnew(Image(tex.texture_size, tex.texture_size, 0, require_format, tex.imgdata));
-
- if (tex.texture.is_null()) {
- tex.texture.instantiate();
- tex.texture->create_from_image(img);
- } else {
- tex.texture->update(img); //update
- }
- }
- }
-
- // update height array
- for (int k = tex_pos.x; k < tex_pos.x + mw; k++) {
- tex.offsets.write[k] = tex_pos.y + mh;
- }
-
- Character chr;
- chr.align = (Vector2(xofs, -yofs) * p_data->scale_color_font / oversampling).round();
- chr.advance = (advance * p_data->scale_color_font / oversampling).round();
- chr.texture_idx = tex_pos.index;
- chr.found = true;
-
- chr.rect_uv = Rect2(tex_pos.x + rect_margin, tex_pos.y + rect_margin, w, h);
- chr.rect = chr.rect_uv;
- chr.rect.position /= oversampling;
- chr.rect.size *= (p_data->scale_color_font / oversampling);
- return chr;
-}
-
-void DynamicFontDataFallback::update_char(int p_size, char32_t p_char) {
- DataAtSize *fds = get_data_for_size(p_size, false);
- ERR_FAIL_COND(fds == nullptr);
-
- if (fds->char_map.has(p_char)) {
- return;
- }
-
- Character character = Character::not_found();
-
- FT_GlyphSlot slot = fds->face->glyph;
- FT_UInt gl_index = FT_Get_Char_Index(fds->face, p_char);
-
- if (gl_index == 0) {
- fds->char_map[p_char] = character;
- return;
- }
-
- int ft_hinting;
- switch (hinting) {
- case TextServer::HINTING_NONE:
- ft_hinting = FT_LOAD_NO_HINTING;
- break;
- case TextServer::HINTING_LIGHT:
- ft_hinting = FT_LOAD_TARGET_LIGHT;
- break;
- default:
- ft_hinting = FT_LOAD_TARGET_NORMAL;
- break;
- }
-
- FT_Fixed v, h;
- FT_Get_Advance(fds->face, gl_index, FT_HAS_COLOR(fds->face) ? FT_LOAD_COLOR : FT_LOAD_DEFAULT | (force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0) | ft_hinting, &h);
- FT_Get_Advance(fds->face, gl_index, FT_HAS_COLOR(fds->face) ? FT_LOAD_COLOR : FT_LOAD_DEFAULT | (force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0) | ft_hinting | FT_LOAD_VERTICAL_LAYOUT, &v);
-
- int error = FT_Load_Glyph(fds->face, gl_index, FT_HAS_COLOR(fds->face) ? FT_LOAD_COLOR : FT_LOAD_DEFAULT | (force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0) | ft_hinting);
- if (error) {
- fds->char_map[p_char] = character;
- return;
- }
-
- error = FT_Render_Glyph(fds->face->glyph, antialiased ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO);
- if (!error) {
- character = bitmap_to_character(fds, slot->bitmap, slot->bitmap_top, slot->bitmap_left, Vector2((h + (1 << 9)) >> 10, (v + (1 << 9)) >> 10) / 64.0);
- }
-
- fds->char_map[p_char] = character;
-}
-
-void DynamicFontDataFallback::update_char_outline(int p_size, int p_outline_size, char32_t p_char) {
- DataAtSize *fds = get_data_for_size(p_size, p_outline_size);
- ERR_FAIL_COND(fds == nullptr);
-
- if (fds->char_map.has(p_char)) {
- return;
- }
-
- Character character = Character::not_found();
- FT_UInt gl_index = FT_Get_Char_Index(fds->face, p_char);
-
- if (gl_index == 0) {
- fds->char_map[p_char] = character;
- return;
- }
-
- int error = FT_Load_Glyph(fds->face, gl_index, FT_LOAD_NO_BITMAP | (force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0));
- if (error) {
- fds->char_map[p_char] = character;
- return;
- }
-
- FT_Stroker stroker;
- if (FT_Stroker_New(library, &stroker) != 0) {
- fds->char_map[p_char] = character;
- return;
- }
-
- FT_Stroker_Set(stroker, (int)(p_outline_size * oversampling * 64.0), FT_STROKER_LINECAP_BUTT, FT_STROKER_LINEJOIN_ROUND, 0);
- FT_Glyph glyph;
- FT_BitmapGlyph glyph_bitmap;
-
- if (FT_Get_Glyph(fds->face->glyph, &glyph) != 0) {
- goto cleanup_stroker;
- }
- if (FT_Glyph_Stroke(&glyph, stroker, 1) != 0) {
- goto cleanup_glyph;
- }
- if (FT_Glyph_To_Bitmap(&glyph, antialiased ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO, nullptr, 1) != 0) {
- goto cleanup_glyph;
- }
-
- glyph_bitmap = (FT_BitmapGlyph)glyph;
- character = bitmap_to_character(fds, glyph_bitmap->bitmap, glyph_bitmap->top, glyph_bitmap->left, Vector2());
-
-cleanup_glyph:
- FT_Done_Glyph(glyph);
-cleanup_stroker:
- FT_Stroker_Done(stroker);
-
- fds->char_map[p_char] = character;
-}
-
-void DynamicFontDataFallback::clear_cache() {
- _THREAD_SAFE_METHOD_
- for (Map<CacheID, DataAtSize *>::Element *E = size_cache.front(); E; E = E->next()) {
- memdelete(E->get());
- }
- size_cache.clear();
- for (Map<CacheID, DataAtSize *>::Element *E = size_cache_outline.front(); E; E = E->next()) {
- memdelete(E->get());
- }
- size_cache_outline.clear();
-}
-
-Error DynamicFontDataFallback::load_from_file(const String &p_filename, int p_base_size) {
- _THREAD_SAFE_METHOD_
- if (library == nullptr) {
- int error = FT_Init_FreeType(&library);
- ERR_FAIL_COND_V_MSG(error != 0, ERR_CANT_CREATE, "Error initializing FreeType.");
- }
- clear_cache();
-
- font_path = p_filename;
- base_size = p_base_size;
-
- valid = true;
- DataAtSize *fds = get_data_for_size(base_size); // load base size.
- if (fds == nullptr) {
- valid = false;
- ERR_FAIL_V(ERR_CANT_CREATE);
- }
-
- return OK;
-}
-
-Error DynamicFontDataFallback::load_from_memory(const uint8_t *p_data, size_t p_size, int p_base_size) {
- _THREAD_SAFE_METHOD_
- if (library == nullptr) {
- int error = FT_Init_FreeType(&library);
- ERR_FAIL_COND_V_MSG(error != 0, ERR_CANT_CREATE, "Error initializing FreeType.");
- }
- clear_cache();
-
- font_mem = p_data;
- font_mem_size = p_size;
- base_size = p_base_size;
-
- valid = true;
- DataAtSize *fds = get_data_for_size(base_size); // load base size.
- if (fds == nullptr) {
- valid = false;
- ERR_FAIL_V(ERR_CANT_CREATE);
- }
-
- return OK;
-}
-
-float DynamicFontDataFallback::get_height(int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataFallback *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, 0.f);
- return fds->ascent + fds->descent;
-}
-
-float DynamicFontDataFallback::get_ascent(int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataFallback *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, 0.f);
- return fds->ascent;
-}
-
-float DynamicFontDataFallback::get_descent(int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataFallback *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, 0.f);
- return fds->descent;
-}
-
-float DynamicFontDataFallback::get_underline_position(int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataFallback *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, 0.f);
- return fds->underline_position;
-}
-
-float DynamicFontDataFallback::get_underline_thickness(int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataFallback *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, 0.f);
- return fds->underline_thickness;
-}
-
-void DynamicFontDataFallback::set_antialiased(bool p_antialiased) {
- if (antialiased != p_antialiased) {
- clear_cache();
- antialiased = p_antialiased;
- }
-}
-
-bool DynamicFontDataFallback::get_antialiased() const {
- return antialiased;
-}
-
-void DynamicFontDataFallback::set_force_autohinter(bool p_enabled) {
- if (force_autohinter != p_enabled) {
- clear_cache();
- force_autohinter = p_enabled;
- }
-}
-
-bool DynamicFontDataFallback::get_force_autohinter() const {
- return force_autohinter;
-}
-
-void DynamicFontDataFallback::set_hinting(TextServer::Hinting p_hinting) {
- if (hinting != p_hinting) {
- clear_cache();
- hinting = p_hinting;
- }
-}
-
-TextServer::Hinting DynamicFontDataFallback::get_hinting() const {
- return hinting;
-}
-
-bool DynamicFontDataFallback::has_outline() const {
- return true;
-}
-
-float DynamicFontDataFallback::get_base_size() const {
- return base_size;
-}
-
-bool DynamicFontDataFallback::has_char(char32_t p_char) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataFallback *>(this)->get_data_for_size(base_size);
- ERR_FAIL_COND_V(fds == nullptr, false);
-
- const_cast<DynamicFontDataFallback *>(this)->update_char(base_size, p_char);
- Character ch = fds->char_map[p_char];
-
- return (ch.found);
-}
-
-String DynamicFontDataFallback::get_supported_chars() const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataFallback *>(this)->get_data_for_size(base_size);
- ERR_FAIL_COND_V(fds == nullptr, String());
-
- String chars;
-
- FT_UInt gindex;
- FT_ULong charcode = FT_Get_First_Char(fds->face, &gindex);
- while (gindex != 0) {
- if (charcode != 0) {
- chars += char32_t(charcode);
- }
- charcode = FT_Get_Next_Char(fds->face, charcode, &gindex);
- }
-
- return chars;
-}
-
-Vector2 DynamicFontDataFallback::get_advance(char32_t p_char, int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataFallback *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, Vector2());
-
- const_cast<DynamicFontDataFallback *>(this)->update_char(p_size, p_char);
- Character ch = fds->char_map[p_char];
-
- return ch.advance;
-}
-
-Vector2 DynamicFontDataFallback::get_kerning(char32_t p_char, char32_t p_next, int p_size) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataFallback *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, Vector2());
-
- FT_Vector delta;
- FT_Get_Kerning(fds->face, FT_Get_Char_Index(fds->face, p_char), FT_Get_Char_Index(fds->face, p_next), FT_KERNING_DEFAULT, &delta);
- return Vector2(delta.x, delta.y);
-}
-
-Vector2 DynamicFontDataFallback::draw_glyph(RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataFallback *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, Vector2());
-
- const_cast<DynamicFontDataFallback *>(this)->update_char(p_size, p_index);
- Character ch = fds->char_map[p_index];
-
- Vector2 advance;
- if (ch.found) {
- ERR_FAIL_COND_V(ch.texture_idx < -1 || ch.texture_idx >= fds->textures.size(), Vector2());
-
- if (ch.texture_idx != -1) {
- Point2i cpos = p_pos;
- cpos += ch.align;
-
- Color modulate = p_color;
- if (FT_HAS_COLOR(fds->face)) {
- modulate.r = modulate.g = modulate.b = 1.0;
- }
- if (RenderingServer::get_singleton() != nullptr) {
- RID texture = fds->textures[ch.texture_idx].texture->get_rid();
- RenderingServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas, Rect2(cpos, ch.rect.size), texture, ch.rect_uv, modulate, false, false);
- }
- }
-
- advance = ch.advance;
- }
-
- return advance;
-}
-
-Vector2 DynamicFontDataFallback::draw_glyph_outline(RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataFallback *>(this)->get_data_for_size(p_size, p_outline_size);
- ERR_FAIL_COND_V(fds == nullptr, Vector2());
-
- const_cast<DynamicFontDataFallback *>(this)->update_char_outline(p_size, p_outline_size, p_index);
- Character ch = fds->char_map[p_index];
-
- Vector2 advance;
- if (ch.found) {
- ERR_FAIL_COND_V(ch.texture_idx < -1 || ch.texture_idx >= fds->textures.size(), Vector2());
-
- if (ch.texture_idx != -1) {
- Point2i cpos = p_pos;
- cpos += ch.align;
-
- Color modulate = p_color;
- if (FT_HAS_COLOR(fds->face)) {
- modulate.r = modulate.g = modulate.b = 1.0;
- }
- if (RenderingServer::get_singleton() != nullptr) {
- RID texture = fds->textures[ch.texture_idx].texture->get_rid();
- RenderingServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas, Rect2(cpos, ch.rect.size), texture, ch.rect_uv, modulate, false, false);
- }
- }
-
- advance = ch.advance;
- }
-
- return advance;
-}
-
-bool DynamicFontDataFallback::get_glyph_contours(int p_size, uint32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const {
- _THREAD_SAFE_METHOD_
- DataAtSize *fds = const_cast<DynamicFontDataFallback *>(this)->get_data_for_size(p_size);
- ERR_FAIL_COND_V(fds == nullptr, false);
-
- int error = FT_Load_Glyph(fds->face, p_index, FT_LOAD_NO_BITMAP | (force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0));
- ERR_FAIL_COND_V(error, false);
-
- r_points.clear();
- r_contours.clear();
-
- float h = fds->ascent;
- float scale = (1.0 / 64.0) / oversampling * fds->scale_color_font;
- for (short i = 0; i < fds->face->glyph->outline.n_points; i++) {
- r_points.push_back(Vector3(fds->face->glyph->outline.points[i].x * scale, h - fds->face->glyph->outline.points[i].y * scale, FT_CURVE_TAG(fds->face->glyph->outline.tags[i])));
- }
- for (short i = 0; i < fds->face->glyph->outline.n_contours; i++) {
- r_contours.push_back(fds->face->glyph->outline.contours[i]);
- }
- r_orientation = (FT_Outline_Get_Orientation(&fds->face->glyph->outline) == FT_ORIENTATION_FILL_RIGHT);
- return true;
-}
-
-DynamicFontDataFallback::~DynamicFontDataFallback() {
- clear_cache();
- if (library != nullptr) {
- FT_Done_FreeType(library);
- }
-}
-
-#endif // MODULE_FREETYPE_ENABLED
diff --git a/modules/text_server_fb/dynamic_font_fb.h b/modules/text_server_fb/dynamic_font_fb.h
deleted file mode 100644
index 82e59fa607..0000000000
--- a/modules/text_server_fb/dynamic_font_fb.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/*************************************************************************/
-/* dynamic_font_fb.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef DYNAMIC_FONT_FALLBACK_H
-#define DYNAMIC_FONT_FALLBACK_H
-
-#include "font_fb.h"
-
-#include "modules/modules_enabled.gen.h"
-#ifdef MODULE_FREETYPE_ENABLED
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-struct DynamicFontDataFallback : public FontDataFallback {
- _THREAD_SAFE_CLASS_
-
-private:
- struct CharTexture {
- Vector<uint8_t> imgdata;
- int texture_size = 0;
- Vector<int> offsets;
- Ref<ImageTexture> texture;
- };
-
- struct Character {
- bool found = false;
- int texture_idx = 0;
- Rect2 rect;
- Rect2 rect_uv;
- Vector2 align;
- Vector2 advance = Vector2(-1, -1);
-
- static Character not_found();
- };
-
- struct TexturePosition {
- int index = 0;
- int x = 0;
- int y = 0;
- };
-
- struct CacheID {
- union {
- struct {
- uint32_t size : 16;
- uint32_t outline_size : 16;
- };
- uint32_t key = 0;
- };
- bool operator<(CacheID right) const {
- return key < right.key;
- }
- };
-
- struct DataAtSize {
- FT_Face face = nullptr;
- FT_StreamRec stream;
-
- int size = 0;
- float scale_color_font = 1.f;
- float ascent = 0.0;
- float descent = 0.0;
- float underline_position = 0.0;
- float underline_thickness = 0.0;
-
- Vector<CharTexture> textures;
- HashMap<char32_t, Character> char_map;
-
- ~DataAtSize() {
- if (face != nullptr) {
- FT_Done_Face(face);
- }
- }
- };
-
- FT_Library library = nullptr;
-
- // Source data.
- const uint8_t *font_mem = nullptr;
- int font_mem_size = 0;
- String font_path;
- Vector<uint8_t> font_mem_cache;
-
- float rect_margin = 1.f;
- int base_size = 16;
- float oversampling = 1.f;
- bool antialiased = true;
- bool force_autohinter = false;
- TextServer::Hinting hinting = TextServer::HINTING_LIGHT;
-
- Map<CacheID, DataAtSize *> size_cache;
- Map<CacheID, DataAtSize *> size_cache_outline;
-
- DataAtSize *get_data_for_size(int p_size, int p_outline_size = 0);
-
- TexturePosition find_texture_pos_for_glyph(DataAtSize *p_data, int p_color_size, Image::Format p_image_format, int p_width, int p_height);
- Character bitmap_to_character(DataAtSize *p_data, FT_Bitmap bitmap, int yofs, int xofs, const Vector2 &advance);
- _FORCE_INLINE_ void update_char(int p_size, char32_t p_char);
- _FORCE_INLINE_ void update_char_outline(int p_size, int p_outline_size, char32_t p_char);
-
-public:
- virtual void clear_cache() override;
-
- virtual Error load_from_file(const String &p_filename, int p_base_size) override;
- virtual Error load_from_memory(const uint8_t *p_data, size_t p_size, int p_base_size) override;
-
- virtual float get_height(int p_size) const override;
- virtual float get_ascent(int p_size) const override;
- virtual float get_descent(int p_size) const override;
-
- virtual float get_underline_position(int p_size) const override;
- virtual float get_underline_thickness(int p_size) const override;
-
- virtual void set_antialiased(bool p_antialiased) override;
- virtual bool get_antialiased() const override;
-
- virtual void set_hinting(TextServer::Hinting p_hinting) override;
- virtual TextServer::Hinting get_hinting() const override;
-
- virtual void set_force_autohinter(bool p_enabeld) override;
- virtual bool get_force_autohinter() const override;
-
- virtual void set_distance_field_hint(bool p_distance_field) override{};
- virtual bool get_distance_field_hint() const override { return false; };
-
- virtual bool has_outline() const override;
- virtual float get_base_size() const override;
-
- virtual bool has_char(char32_t p_char) const override;
- virtual String get_supported_chars() const override;
-
- virtual Vector2 get_advance(char32_t p_char, int p_size) const override;
- virtual Vector2 get_kerning(char32_t p_char, char32_t p_next, int p_size) const override;
-
- virtual Vector2 draw_glyph(RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const override;
- virtual Vector2 draw_glyph_outline(RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const override;
-
- virtual bool get_glyph_contours(int p_size, uint32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const override;
-
- virtual ~DynamicFontDataFallback() override;
-};
-
-#endif // MODULE_FREETYPE_ENABLED
-
-#endif // DYNAMIC_FONT_FALLBACK_H
diff --git a/modules/text_server_fb/font_fb.h b/modules/text_server_fb/font_fb.h
deleted file mode 100644
index fe9888b7f4..0000000000
--- a/modules/text_server_fb/font_fb.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*************************************************************************/
-/* font_fb.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef FONT_FALLBACK_H
-#define FONT_FALLBACK_H
-
-#include "servers/text_server.h"
-
-struct FontDataFallback {
- Map<String, bool> lang_support_overrides;
- Map<String, bool> script_support_overrides;
- bool valid = false;
- int spacing_space = 0;
- int spacing_glyph = 0;
-
- virtual void clear_cache() = 0;
-
- virtual Error load_from_file(const String &p_filename, int p_base_size) { return ERR_CANT_CREATE; };
- virtual Error load_from_memory(const uint8_t *p_data, size_t p_size, int p_base_size) { return ERR_CANT_CREATE; };
- virtual Error bitmap_new(float p_height, float p_ascent, int p_base_size) { return ERR_CANT_CREATE; };
-
- virtual void bitmap_add_texture(const Ref<Texture> &p_texture) { ERR_FAIL_MSG("Not supported."); };
- virtual void bitmap_add_char(char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) { ERR_FAIL_MSG("Not supported."); };
- virtual void bitmap_add_kerning_pair(char32_t p_A, char32_t p_B, int p_kerning) { ERR_FAIL_MSG("Not supported."); };
-
- virtual float get_height(int p_size) const = 0;
- virtual float get_ascent(int p_size) const = 0;
- virtual float get_descent(int p_size) const = 0;
-
- virtual float get_underline_position(int p_size) const = 0;
- virtual float get_underline_thickness(int p_size) const = 0;
-
- virtual int get_spacing_space() const { return spacing_space; };
- virtual void set_spacing_space(int p_value) {
- spacing_space = p_value;
- clear_cache();
- };
-
- virtual int get_spacing_glyph() const { return spacing_glyph; };
- virtual void set_spacing_glyph(int p_value) {
- spacing_glyph = p_value;
- clear_cache();
- };
-
- virtual void set_antialiased(bool p_antialiased) = 0;
- virtual bool get_antialiased() const = 0;
-
- virtual void set_hinting(TextServer::Hinting p_hinting) = 0;
- virtual TextServer::Hinting get_hinting() const = 0;
-
- virtual void set_distance_field_hint(bool p_distance_field) = 0;
- virtual bool get_distance_field_hint() const = 0;
-
- virtual void set_force_autohinter(bool p_enabeld) = 0;
- virtual bool get_force_autohinter() const = 0;
-
- virtual bool has_outline() const = 0;
- virtual float get_base_size() const = 0;
-
- virtual bool has_char(char32_t p_char) const = 0;
- virtual String get_supported_chars() const = 0;
-
- virtual Vector2 get_advance(char32_t p_char, int p_size) const = 0;
- virtual Vector2 get_kerning(char32_t p_char, char32_t p_next, int p_size) const = 0;
-
- virtual Vector2 draw_glyph(RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const = 0;
- virtual Vector2 draw_glyph_outline(RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const = 0;
-
- virtual bool get_glyph_contours(int p_size, uint32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const { return false; };
-
- virtual ~FontDataFallback(){};
-};
-
-#endif // FONT_FALLBACK_H
diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp
index 110194c373..b1ce85d505 100644
--- a/modules/text_server_fb/text_server_fb.cpp
+++ b/modules/text_server_fb/text_server_fb.cpp
@@ -30,8 +30,19 @@
#include "text_server_fb.h"
-#include "bitmap_font_fb.h"
-#include "dynamic_font_fb.h"
+#include "core/error/error_macros.h"
+#include "core/string/print_string.h"
+
+#ifdef MODULE_MSDFGEN_ENABLED
+#include "core/ShapeDistanceFinder.h"
+#include "core/contour-combiners.h"
+#include "core/edge-selectors.h"
+#include "msdfgen.h"
+#endif
+
+/*************************************************************************/
+/* Character properties. */
+/*************************************************************************/
_FORCE_INLINE_ bool is_control(char32_t p_char) {
return (p_char <= 0x001f) || (p_char >= 0x007f && p_char <= 0x009F);
@@ -69,11 +80,11 @@ String TextServerFallback::get_name() const {
void TextServerFallback::free(RID p_rid) {
_THREAD_SAFE_METHOD_
if (font_owner.owns(p_rid)) {
- FontDataFallback *fd = font_owner.getornull(p_rid);
+ FontDataFallback *fd = font_owner.get_or_null(p_rid);
font_owner.free(p_rid);
memdelete(fd);
} else if (shaped_owner.owns(p_rid)) {
- ShapedTextData *sd = shaped_owner.getornull(p_rid);
+ ShapedTextData *sd = shaped_owner.get_or_null(p_rid);
shaped_owner.free(p_rid);
memdelete(sd);
}
@@ -100,291 +111,1758 @@ bool TextServerFallback::is_locale_right_to_left(const String &p_locale) {
return false; // No RTL support.
}
+#define OT_TAG(c1, c2, c3, c4) ((int32_t)((((uint32_t)(c1)&0xFF) << 24) | (((uint32_t)(c2)&0xFF) << 16) | (((uint32_t)(c3)&0xFF) << 8) | ((uint32_t)(c4)&0xFF)))
+
+struct FeatureInfo {
+ int32_t tag;
+ String name;
+};
+
+static FeatureInfo feature_set[] = {
+ // Registered OpenType variation tags.
+ { OT_TAG('i', 't', 'a', 'l'), "italic" },
+ { OT_TAG('o', 'p', 's', 'z'), "optical_size" },
+ { OT_TAG('s', 'l', 'n', 't'), "slant" },
+ { OT_TAG('w', 'd', 't', 'h'), "width" },
+ { OT_TAG('w', 'g', 'h', 't'), "weight" },
+ { 0, String() },
+};
+
+_FORCE_INLINE_ int32_t ot_tag_from_string(const char *p_str, int p_len) {
+ char tag[4];
+ uint32_t i;
+
+ if (!p_str || !p_len || !*p_str)
+ return OT_TAG(0, 0, 0, 0);
+
+ if (p_len < 0 || p_len > 4) {
+ p_len = 4;
+ }
+ for (i = 0; i < (uint32_t)p_len && p_str[i]; i++) {
+ tag[i] = p_str[i];
+ }
+
+ for (; i < 4; i++) {
+ tag[i] = ' ';
+ }
+
+ return OT_TAG(tag[0], tag[1], tag[2], tag[3]);
+}
+
+int32_t TextServerFallback::name_to_tag(const String &p_name) const {
+ for (int i = 0; feature_set[i].tag != 0; i++) {
+ if (feature_set[i].name == p_name) {
+ return feature_set[i].tag;
+ }
+ }
+
+ // No readable name, use tag string.
+ return ot_tag_from_string(p_name.replace("custom_", "").ascii().get_data(), -1);
+}
+
+_FORCE_INLINE_ void ot_tag_to_string(int32_t p_tag, char *p_buf) {
+ p_buf[0] = (char)(uint8_t)(p_tag >> 24);
+ p_buf[1] = (char)(uint8_t)(p_tag >> 16);
+ p_buf[2] = (char)(uint8_t)(p_tag >> 8);
+ p_buf[3] = (char)(uint8_t)(p_tag >> 0);
+}
+
+String TextServerFallback::tag_to_name(int32_t p_tag) const {
+ for (int i = 0; feature_set[i].tag != 0; i++) {
+ if (feature_set[i].tag == p_tag) {
+ return feature_set[i].name;
+ }
+ }
+
+ // No readable name, use tag string.
+ char name[5];
+ memset(name, 0, 5);
+ ot_tag_to_string(p_tag, name);
+ return String("custom_") + String(name);
+}
+
/*************************************************************************/
-/* Font interface */
+/* Font Glyph Rendering */
/*************************************************************************/
-RID TextServerFallback::create_font_system(const String &p_name, int p_base_size) {
- ERR_FAIL_V_MSG(RID(), "System fonts are not supported by this text server.");
+_FORCE_INLINE_ TextServerFallback::FontTexturePosition TextServerFallback::find_texture_pos_for_glyph(FontDataForSizeFallback *p_data, int p_color_size, Image::Format p_image_format, int p_width, int p_height) const {
+ FontTexturePosition ret;
+ ret.index = -1;
+
+ int mw = p_width;
+ int mh = p_height;
+
+ for (int i = 0; i < p_data->textures.size(); i++) {
+ const FontTexture &ct = p_data->textures[i];
+
+ if (RenderingServer::get_singleton() != nullptr) {
+ if (ct.texture->get_format() != p_image_format) {
+ continue;
+ }
+ }
+
+ if (mw > ct.texture_w || mh > ct.texture_h) { // Too big for this texture.
+ continue;
+ }
+
+ ret.y = 0x7FFFFFFF;
+ ret.x = 0;
+
+ for (int j = 0; j < ct.texture_w - mw; j++) {
+ int max_y = 0;
+
+ for (int k = j; k < j + mw; k++) {
+ int y = ct.offsets[k];
+ if (y > max_y) {
+ max_y = y;
+ }
+ }
+
+ if (max_y < ret.y) {
+ ret.y = max_y;
+ ret.x = j;
+ }
+ }
+
+ if (ret.y == 0x7FFFFFFF || ret.y + mh > ct.texture_h) {
+ continue; // Fail, could not fit it here.
+ }
+
+ ret.index = i;
+ break;
+ }
+
+ if (ret.index == -1) {
+ // Could not find texture to fit, create one.
+ ret.x = 0;
+ ret.y = 0;
+
+ int texsize = MAX(p_data->size.x * p_data->oversampling * 8, 256);
+ if (mw > texsize) {
+ texsize = mw; // Special case, adapt to it?
+ }
+ if (mh > texsize) {
+ texsize = mh; // Special case, adapt to it?
+ }
+
+ texsize = next_power_of_2(texsize);
+
+ texsize = MIN(texsize, 4096);
+
+ FontTexture tex;
+ tex.texture_w = texsize;
+ tex.texture_h = texsize;
+ tex.format = p_image_format;
+ tex.imgdata.resize(texsize * texsize * p_color_size);
+
+ {
+ // Zero texture.
+ uint8_t *w = tex.imgdata.ptrw();
+ ERR_FAIL_COND_V(texsize * texsize * p_color_size > tex.imgdata.size(), ret);
+ // Initialize the texture to all-white pixels to prevent artifacts when the
+ // font is displayed at a non-default scale with filtering enabled.
+ if (p_color_size == 2) {
+ for (int i = 0; i < texsize * texsize * p_color_size; i += 2) { // FORMAT_LA8, BW font.
+ w[i + 0] = 255;
+ w[i + 1] = 0;
+ }
+ } else if (p_color_size == 4) {
+ for (int i = 0; i < texsize * texsize * p_color_size; i += 4) { // FORMAT_RGBA8, Color font, Multichannel(+True) SDF.
+ w[i + 0] = 255;
+ w[i + 1] = 255;
+ w[i + 2] = 255;
+ w[i + 3] = 0;
+ }
+ } else {
+ ERR_FAIL_V(ret);
+ }
+ }
+ tex.offsets.resize(texsize);
+ for (int i = 0; i < texsize; i++) { // Zero offsets.
+ tex.offsets.write[i] = 0;
+ }
+
+ p_data->textures.push_back(tex);
+ ret.index = p_data->textures.size() - 1;
+ }
+
+ return ret;
}
-RID TextServerFallback::create_font_resource(const String &p_filename, int p_base_size) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = nullptr;
- if (p_filename.get_extension() == "fnt" || p_filename.get_extension() == "font") {
- fd = memnew(BitmapFontDataFallback);
+#ifdef MODULE_MSDFGEN_ENABLED
+
+struct MSContext {
+ msdfgen::Point2 position;
+ msdfgen::Shape *shape;
+ msdfgen::Contour *contour;
+};
+
+class DistancePixelConversion {
+ double invRange;
+
+public:
+ _FORCE_INLINE_ explicit DistancePixelConversion(double range) :
+ invRange(1 / range) {}
+ _FORCE_INLINE_ void operator()(float *pixels, const msdfgen::MultiAndTrueDistance &distance) const {
+ pixels[0] = float(invRange * distance.r + .5);
+ pixels[1] = float(invRange * distance.g + .5);
+ pixels[2] = float(invRange * distance.b + .5);
+ pixels[3] = float(invRange * distance.a + .5);
+ }
+};
+
+struct MSDFThreadData {
+ msdfgen::Bitmap<float, 4> *output;
+ msdfgen::Shape *shape;
+ msdfgen::Projection *projection;
+ DistancePixelConversion *distancePixelConversion;
+};
+
+static msdfgen::Point2 ft_point2(const FT_Vector &vector) {
+ return msdfgen::Point2(vector.x / 60.0f, vector.y / 60.0f);
+}
+
+static int ft_move_to(const FT_Vector *to, void *user) {
+ MSContext *context = reinterpret_cast<MSContext *>(user);
+ if (!(context->contour && context->contour->edges.empty())) {
+ context->contour = &context->shape->addContour();
+ }
+ context->position = ft_point2(*to);
+ return 0;
+}
+
+static int ft_line_to(const FT_Vector *to, void *user) {
+ MSContext *context = reinterpret_cast<MSContext *>(user);
+ msdfgen::Point2 endpoint = ft_point2(*to);
+ if (endpoint != context->position) {
+ context->contour->addEdge(new msdfgen::LinearSegment(context->position, endpoint));
+ context->position = endpoint;
+ }
+ return 0;
+}
+
+static int ft_conic_to(const FT_Vector *control, const FT_Vector *to, void *user) {
+ MSContext *context = reinterpret_cast<MSContext *>(user);
+ context->contour->addEdge(new msdfgen::QuadraticSegment(context->position, ft_point2(*control), ft_point2(*to)));
+ context->position = ft_point2(*to);
+ return 0;
+}
+
+static int ft_cubic_to(const FT_Vector *control1, const FT_Vector *control2, const FT_Vector *to, void *user) {
+ MSContext *context = reinterpret_cast<MSContext *>(user);
+ context->contour->addEdge(new msdfgen::CubicSegment(context->position, ft_point2(*control1), ft_point2(*control2), ft_point2(*to)));
+ context->position = ft_point2(*to);
+ return 0;
+}
+
+void TextServerFallback::_generateMTSDF_threaded(uint32_t y, void *p_td) const {
+ MSDFThreadData *td = (MSDFThreadData *)p_td;
+
+ msdfgen::ShapeDistanceFinder<msdfgen::OverlappingContourCombiner<msdfgen::MultiAndTrueDistanceSelector>> distanceFinder(*td->shape);
+ int row = td->shape->inverseYAxis ? td->output->height() - y - 1 : y;
+ for (int col = 0; col < td->output->width(); ++col) {
+ int x = (y % 2) ? td->output->width() - col - 1 : col;
+ msdfgen::Point2 p = td->projection->unproject(msdfgen::Point2(x + .5, y + .5));
+ msdfgen::MultiAndTrueDistance distance = distanceFinder.distance(p);
+ td->distancePixelConversion->operator()(td->output->operator()(x, row), distance);
+ }
+}
+
+_FORCE_INLINE_ TextServerFallback::FontGlyph TextServerFallback::rasterize_msdf(FontDataFallback *p_font_data, FontDataForSizeFallback *p_data, int p_pixel_range, int p_rect_margin, FT_Outline *outline, const Vector2 &advance) const {
+ msdfgen::Shape shape;
+
+ shape.contours.clear();
+ shape.inverseYAxis = false;
+
+ MSContext context = {};
+ context.shape = &shape;
+ FT_Outline_Funcs ft_functions;
+ ft_functions.move_to = &ft_move_to;
+ ft_functions.line_to = &ft_line_to;
+ ft_functions.conic_to = &ft_conic_to;
+ ft_functions.cubic_to = &ft_cubic_to;
+ ft_functions.shift = 0;
+ ft_functions.delta = 0;
+
+ int error = FT_Outline_Decompose(outline, &ft_functions, &context);
+ ERR_FAIL_COND_V_MSG(error, FontGlyph(), "FreeType: Outline decomposition error: '" + String(FT_Error_String(error)) + "'.");
+ if (!shape.contours.empty() && shape.contours.back().edges.empty()) {
+ shape.contours.pop_back();
+ }
+
+ if (FT_Outline_Get_Orientation(outline) == 1) {
+ for (int i = 0; i < (int)shape.contours.size(); ++i) {
+ shape.contours[i].reverse();
+ }
+ }
+
+ shape.inverseYAxis = true;
+ shape.normalize();
+
+ msdfgen::Shape::Bounds bounds = shape.getBounds(p_pixel_range);
+
+ FontGlyph chr;
+ chr.found = true;
+ chr.advance = advance.round();
+
+ if (shape.validate() && shape.contours.size() > 0) {
+ int w = (bounds.r - bounds.l);
+ int h = (bounds.t - bounds.b);
+
+ int mw = w + p_rect_margin * 2;
+ int mh = h + p_rect_margin * 2;
+
+ ERR_FAIL_COND_V(mw > 4096, FontGlyph());
+ ERR_FAIL_COND_V(mh > 4096, FontGlyph());
+
+ FontTexturePosition tex_pos = find_texture_pos_for_glyph(p_data, 4, Image::FORMAT_RGBA8, mw, mh);
+ ERR_FAIL_COND_V(tex_pos.index < 0, FontGlyph());
+ FontTexture &tex = p_data->textures.write[tex_pos.index];
+
+ edgeColoringSimple(shape, 3.0); // Max. angle.
+ msdfgen::Bitmap<real_t, 4> image(w, h); // Texture size.
+ //msdfgen::generateMTSDF(image, shape, p_pixel_range, 1.0, msdfgen::Vector2(-bounds.l, -bounds.b)); // Range, scale, translation.
+
+ DistancePixelConversion distancePixelConversion(p_pixel_range);
+ msdfgen::Projection projection(msdfgen::Vector2(1.0, 1.0), msdfgen::Vector2(-bounds.l, -bounds.b));
+ msdfgen::MSDFGeneratorConfig config(true, msdfgen::ErrorCorrectionConfig());
+
+ MSDFThreadData td;
+ td.output = &image;
+ td.shape = &shape;
+ td.projection = &projection;
+ td.distancePixelConversion = &distancePixelConversion;
+
+ if (p_font_data->work_pool.get_thread_count() == 0) {
+ p_font_data->work_pool.init();
+ }
+ p_font_data->work_pool.do_work(h, this, &TextServerFallback::_generateMTSDF_threaded, &td);
+
+ msdfgen::msdfErrorCorrection(image, shape, projection, p_pixel_range, config);
+
+ {
+ uint8_t *wr = tex.imgdata.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs = ((i + tex_pos.y + p_rect_margin) * tex.texture_w + j + tex_pos.x + p_rect_margin) * 4;
+ ERR_FAIL_COND_V(ofs >= tex.imgdata.size(), FontGlyph());
+ wr[ofs + 0] = (uint8_t)(CLAMP(image(j, i)[0] * 256.f, 0.f, 255.f));
+ wr[ofs + 1] = (uint8_t)(CLAMP(image(j, i)[1] * 256.f, 0.f, 255.f));
+ wr[ofs + 2] = (uint8_t)(CLAMP(image(j, i)[2] * 256.f, 0.f, 255.f));
+ wr[ofs + 3] = (uint8_t)(CLAMP(image(j, i)[3] * 256.f, 0.f, 255.f));
+ }
+ }
+ }
+
+ // Blit to image and texture.
+ {
+ if (RenderingServer::get_singleton() != nullptr) {
+ Ref<Image> img = memnew(Image(tex.texture_w, tex.texture_h, 0, Image::FORMAT_RGBA8, tex.imgdata));
+ if (tex.texture.is_null()) {
+ tex.texture.instantiate();
+ tex.texture->create_from_image(img);
+ } else {
+ tex.texture->update(img);
+ }
+ }
+ }
+
+ // Update height array.
+ for (int k = tex_pos.x; k < tex_pos.x + mw; k++) {
+ tex.offsets.write[k] = tex_pos.y + mh;
+ }
+
+ chr.texture_idx = tex_pos.index;
+
+ chr.uv_rect = Rect2(tex_pos.x + p_rect_margin, tex_pos.y + p_rect_margin, w, h);
+ chr.rect.position = Vector2(bounds.l, -bounds.t);
+ chr.rect.size = chr.uv_rect.size;
+ }
+ return chr;
+}
+#endif
+
#ifdef MODULE_FREETYPE_ENABLED
- } else if (p_filename.get_extension() == "ttf" || p_filename.get_extension() == "otf" || p_filename.get_extension() == "woff") {
- fd = memnew(DynamicFontDataFallback);
+_FORCE_INLINE_ TextServerFallback::FontGlyph TextServerFallback::rasterize_bitmap(FontDataForSizeFallback *p_data, int p_rect_margin, FT_Bitmap bitmap, int yofs, int xofs, const Vector2 &advance) const {
+ int w = bitmap.width;
+ int h = bitmap.rows;
+
+ int mw = w + p_rect_margin * 2;
+ int mh = h + p_rect_margin * 2;
+
+ ERR_FAIL_COND_V(mw > 4096, FontGlyph());
+ ERR_FAIL_COND_V(mh > 4096, FontGlyph());
+
+ int color_size = bitmap.pixel_mode == FT_PIXEL_MODE_BGRA ? 4 : 2;
+ Image::Format require_format = color_size == 4 ? Image::FORMAT_RGBA8 : Image::FORMAT_LA8;
+
+ FontTexturePosition tex_pos = find_texture_pos_for_glyph(p_data, color_size, require_format, mw, mh);
+ ERR_FAIL_COND_V(tex_pos.index < 0, FontGlyph());
+
+ // Fit character in char texture.
+
+ FontTexture &tex = p_data->textures.write[tex_pos.index];
+
+ {
+ uint8_t *wr = tex.imgdata.ptrw();
+
+ for (int i = 0; i < h; i++) {
+ for (int j = 0; j < w; j++) {
+ int ofs = ((i + tex_pos.y + p_rect_margin) * tex.texture_w + j + tex_pos.x + p_rect_margin) * color_size;
+ ERR_FAIL_COND_V(ofs >= tex.imgdata.size(), FontGlyph());
+ switch (bitmap.pixel_mode) {
+ case FT_PIXEL_MODE_MONO: {
+ int byte = i * bitmap.pitch + (j >> 3);
+ int bit = 1 << (7 - (j % 8));
+ wr[ofs + 0] = 255; //grayscale as 1
+ wr[ofs + 1] = (bitmap.buffer[byte] & bit) ? 255 : 0;
+ } break;
+ case FT_PIXEL_MODE_GRAY:
+ wr[ofs + 0] = 255; //grayscale as 1
+ wr[ofs + 1] = bitmap.buffer[i * bitmap.pitch + j];
+ break;
+ case FT_PIXEL_MODE_BGRA: {
+ int ofs_color = i * bitmap.pitch + (j << 2);
+ wr[ofs + 2] = bitmap.buffer[ofs_color + 0];
+ wr[ofs + 1] = bitmap.buffer[ofs_color + 1];
+ wr[ofs + 0] = bitmap.buffer[ofs_color + 2];
+ wr[ofs + 3] = bitmap.buffer[ofs_color + 3];
+ } break;
+ default:
+ ERR_FAIL_V_MSG(FontGlyph(), "Font uses unsupported pixel format: " + itos(bitmap.pixel_mode) + ".");
+ break;
+ }
+ }
+ }
+ }
+
+ // Blit to image and texture.
+ {
+ if (RenderingServer::get_singleton() != nullptr) {
+ Ref<Image> img = memnew(Image(tex.texture_w, tex.texture_h, 0, require_format, tex.imgdata));
+
+ if (tex.texture.is_null()) {
+ tex.texture.instantiate();
+ tex.texture->create_from_image(img);
+ } else {
+ tex.texture->update(img);
+ }
+ }
+ }
+
+ // Update height array.
+ for (int k = tex_pos.x; k < tex_pos.x + mw; k++) {
+ tex.offsets.write[k] = tex_pos.y + mh;
+ }
+
+ FontGlyph chr;
+ chr.advance = (advance * p_data->scale / p_data->oversampling).round();
+ chr.texture_idx = tex_pos.index;
+ chr.found = true;
+
+ chr.uv_rect = Rect2(tex_pos.x + p_rect_margin, tex_pos.y + p_rect_margin, w, h);
+ chr.rect.position = (Vector2(xofs, -yofs) * p_data->scale / p_data->oversampling).round();
+ chr.rect.size = chr.uv_rect.size * p_data->scale / p_data->oversampling;
+ return chr;
+}
#endif
- } else {
- return RID();
+
+/*************************************************************************/
+/* Font Cache */
+/*************************************************************************/
+
+_FORCE_INLINE_ bool TextServerFallback::_ensure_glyph(FontDataFallback *p_font_data, const Vector2i &p_size, int32_t p_glyph) const {
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(p_font_data, p_size), false);
+
+ FontDataForSizeFallback *fd = p_font_data->cache[p_size];
+ if (fd->glyph_map.has(p_glyph)) {
+ return fd->glyph_map[p_glyph].found;
}
- Error err = fd->load_from_file(p_filename, p_base_size);
- if (err != OK) {
- memdelete(fd);
- return RID();
+ if (p_glyph == 0) { // Non graphical or invalid glyph, do not render.
+ fd->glyph_map[p_glyph] = FontGlyph();
+ return true;
}
- return font_owner.make_rid(fd);
+#ifdef MODULE_FREETYPE_ENABLED
+ FontGlyph gl;
+ if (fd->face) {
+ FT_Int32 flags = FT_LOAD_DEFAULT;
+
+ bool outline = p_size.y > 0;
+ switch (p_font_data->hinting) {
+ case TextServer::HINTING_NONE:
+ flags |= FT_LOAD_NO_HINTING;
+ break;
+ case TextServer::HINTING_LIGHT:
+ flags |= FT_LOAD_TARGET_LIGHT;
+ break;
+ default:
+ flags |= FT_LOAD_TARGET_NORMAL;
+ break;
+ }
+ if (p_font_data->force_autohinter) {
+ flags |= FT_LOAD_FORCE_AUTOHINT;
+ }
+ if (outline) {
+ flags |= FT_LOAD_NO_BITMAP;
+ } else if (FT_HAS_COLOR(fd->face)) {
+ flags |= FT_LOAD_COLOR;
+ }
+
+ int32_t glyph_index = FT_Get_Char_Index(fd->face, p_glyph);
+
+ FT_Fixed v, h;
+ FT_Get_Advance(fd->face, glyph_index, flags, &h);
+ FT_Get_Advance(fd->face, glyph_index, flags | FT_LOAD_VERTICAL_LAYOUT, &v);
+
+ int error = FT_Load_Glyph(fd->face, glyph_index, flags);
+ if (error) {
+ fd->glyph_map[p_glyph] = FontGlyph();
+ ERR_FAIL_V_MSG(false, "FreeType: Failed to load glyph.");
+ }
+
+ if (!outline) {
+ if (!p_font_data->msdf) {
+ error = FT_Render_Glyph(fd->face->glyph, p_font_data->antialiased ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO);
+ }
+ FT_GlyphSlot slot = fd->face->glyph;
+ if (!error) {
+ if (p_font_data->msdf) {
+#ifdef MODULE_MSDFGEN_ENABLED
+ gl = rasterize_msdf(p_font_data, fd, p_font_data->msdf_range, rect_range, &slot->outline, Vector2((h + (1 << 9)) >> 10, (v + (1 << 9)) >> 10) / 64.0);
+#else
+ fd->glyph_map[p_glyph] = FontGlyph();
+ ERR_FAIL_V_MSG(false, "Compiled without MSDFGEN support!");
+#endif
+ } else {
+ gl = rasterize_bitmap(fd, rect_range, slot->bitmap, slot->bitmap_top, slot->bitmap_left, Vector2((h + (1 << 9)) >> 10, (v + (1 << 9)) >> 10) / 64.0);
+ }
+ }
+ } else {
+ FT_Stroker stroker;
+ if (FT_Stroker_New(library, &stroker) != 0) {
+ fd->glyph_map[p_glyph] = FontGlyph();
+ ERR_FAIL_V_MSG(false, "FreeType: Failed to load glyph stroker.");
+ }
+
+ FT_Stroker_Set(stroker, (int)(fd->size.y * fd->oversampling * 16.0), FT_STROKER_LINECAP_BUTT, FT_STROKER_LINEJOIN_ROUND, 0);
+ FT_Glyph glyph;
+ FT_BitmapGlyph glyph_bitmap;
+
+ if (FT_Get_Glyph(fd->face->glyph, &glyph) != 0) {
+ goto cleanup_stroker;
+ }
+ if (FT_Glyph_Stroke(&glyph, stroker, 1) != 0) {
+ goto cleanup_glyph;
+ }
+ if (FT_Glyph_To_Bitmap(&glyph, p_font_data->antialiased ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO, nullptr, 1) != 0) {
+ goto cleanup_glyph;
+ }
+ glyph_bitmap = (FT_BitmapGlyph)glyph;
+ gl = rasterize_bitmap(fd, rect_range, glyph_bitmap->bitmap, glyph_bitmap->top, glyph_bitmap->left, Vector2());
+
+ cleanup_glyph:
+ FT_Done_Glyph(glyph);
+ cleanup_stroker:
+ FT_Stroker_Done(stroker);
+ }
+ fd->glyph_map[p_glyph] = gl;
+ return gl.found;
+ }
+#endif
+ fd->glyph_map[p_glyph] = FontGlyph();
+ return false;
}
-RID TextServerFallback::create_font_memory(const uint8_t *p_data, size_t p_size, const String &p_type, int p_base_size) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = nullptr;
- if (p_type == "fnt" || p_type == "font") {
- fd = memnew(BitmapFontDataFallback);
+_FORCE_INLINE_ bool TextServerFallback::_ensure_cache_for_size(FontDataFallback *p_font_data, const Vector2i &p_size) const {
+ if (p_font_data->cache.has(p_size)) {
+ return true;
+ }
+
+ FontDataForSizeFallback *fd = memnew(FontDataForSizeFallback);
+ fd->size = p_size;
+ if (p_font_data->data_ptr) {
+ // Init dynamic font.
#ifdef MODULE_FREETYPE_ENABLED
- } else if (p_type == "ttf" || p_type == "otf" || p_type == "woff") {
- fd = memnew(DynamicFontDataFallback);
+ int error = 0;
+ if (!library) {
+ error = FT_Init_FreeType(&library);
+ ERR_FAIL_COND_V_MSG(error != 0, false, "FreeType: Error initializing library: '" + String(FT_Error_String(error)) + "'.");
+ }
+
+ memset(&fd->stream, 0, sizeof(FT_StreamRec));
+ fd->stream.base = (unsigned char *)p_font_data->data_ptr;
+ fd->stream.size = p_font_data->data_size;
+ fd->stream.pos = 0;
+
+ FT_Open_Args fargs;
+ memset(&fargs, 0, sizeof(FT_Open_Args));
+ fargs.memory_base = (unsigned char *)p_font_data->data_ptr;
+ fargs.memory_size = p_font_data->data_size;
+ fargs.flags = FT_OPEN_MEMORY;
+ fargs.stream = &fd->stream;
+ error = FT_Open_Face(library, &fargs, 0, &fd->face);
+ if (error) {
+ FT_Done_Face(fd->face);
+ fd->face = nullptr;
+ ERR_FAIL_V_MSG(false, "FreeType: Error loading font: '" + String(FT_Error_String(error)) + "'.");
+ }
+
+ if (p_font_data->msdf) {
+ fd->oversampling = 1.0f;
+ fd->size.x = p_font_data->msdf_source_size;
+ } else if (p_font_data->oversampling <= 0.0f) {
+ fd->oversampling = TS->font_get_global_oversampling();
+ } else {
+ fd->oversampling = p_font_data->oversampling;
+ }
+
+ if (FT_HAS_COLOR(fd->face) && fd->face->num_fixed_sizes > 0) {
+ int best_match = 0;
+ int diff = ABS(fd->size.x - ((int64_t)fd->face->available_sizes[0].width));
+ fd->scale = real_t(fd->size.x * fd->oversampling) / fd->face->available_sizes[0].width;
+ for (int i = 1; i < fd->face->num_fixed_sizes; i++) {
+ int ndiff = ABS(fd->size.x - ((int64_t)fd->face->available_sizes[i].width));
+ if (ndiff < diff) {
+ best_match = i;
+ diff = ndiff;
+ fd->scale = real_t(fd->size.x * fd->oversampling) / fd->face->available_sizes[i].width;
+ }
+ }
+ FT_Select_Size(fd->face, best_match);
+ } else {
+ FT_Set_Pixel_Sizes(fd->face, 0, fd->size.x * fd->oversampling);
+ }
+
+ fd->ascent = (fd->face->size->metrics.ascender / 64.0) / fd->oversampling * fd->scale;
+ fd->descent = (-fd->face->size->metrics.descender / 64.0) / fd->oversampling * fd->scale;
+ fd->underline_position = (-FT_MulFix(fd->face->underline_position, fd->face->size->metrics.y_scale) / 64.0) / fd->oversampling * fd->scale;
+ fd->underline_thickness = (FT_MulFix(fd->face->underline_thickness, fd->face->size->metrics.y_scale) / 64.0) / fd->oversampling * fd->scale;
+
+ if (!p_font_data->face_init) {
+ // Read OpenType variations.
+ p_font_data->supported_varaitions.clear();
+ if (fd->face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS) {
+ FT_MM_Var *amaster;
+ FT_Get_MM_Var(fd->face, &amaster);
+ for (FT_UInt i = 0; i < amaster->num_axis; i++) {
+ p_font_data->supported_varaitions[(int32_t)amaster->axis[i].tag] = Vector3i(amaster->axis[i].minimum / 65536, amaster->axis[i].maximum / 65536, amaster->axis[i].def / 65536);
+ }
+ FT_Done_MM_Var(library, amaster);
+ }
+ p_font_data->face_init = true;
+ }
+
+ // Write variations.
+ if (fd->face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS) {
+ FT_MM_Var *amaster;
+
+ FT_Get_MM_Var(fd->face, &amaster);
+
+ Vector<FT_Fixed> coords;
+ coords.resize(amaster->num_axis);
+
+ FT_Get_Var_Design_Coordinates(fd->face, coords.size(), coords.ptrw());
+
+ for (FT_UInt i = 0; i < amaster->num_axis; i++) {
+ // Reset to default.
+ int32_t var_tag = amaster->axis[i].tag;
+ real_t var_value = (double)amaster->axis[i].def / 65536.f;
+ coords.write[i] = amaster->axis[i].def;
+
+ if (p_font_data->variation_coordinates.has(var_tag)) {
+ var_value = p_font_data->variation_coordinates[var_tag];
+ coords.write[i] = CLAMP(var_value * 65536.f, amaster->axis[i].minimum, amaster->axis[i].maximum);
+ }
+
+ if (p_font_data->variation_coordinates.has(tag_to_name(var_tag))) {
+ var_value = p_font_data->variation_coordinates[tag_to_name(var_tag)];
+ coords.write[i] = CLAMP(var_value * 65536.f, amaster->axis[i].minimum, amaster->axis[i].maximum);
+ }
+ }
+
+ FT_Set_Var_Design_Coordinates(fd->face, coords.size(), coords.ptrw());
+ FT_Done_MM_Var(library, amaster);
+ }
+#else
+ ERR_FAIL_V_MSG(false, "FreeType: Can't load dynamic font, engine is compiled without FreeType support!");
#endif
- } else {
- return RID();
}
+ p_font_data->cache[p_size] = fd;
+ return true;
+}
- Error err = fd->load_from_memory(p_data, p_size, p_base_size);
- if (err != OK) {
- memdelete(fd);
- return RID();
+_FORCE_INLINE_ void TextServerFallback::_font_clear_cache(FontDataFallback *p_font_data) {
+ for (const Map<Vector2i, FontDataForSizeFallback *>::Element *E = p_font_data->cache.front(); E; E = E->next()) {
+ memdelete(E->get());
}
+ p_font_data->cache.clear();
+ p_font_data->face_init = false;
+ p_font_data->supported_varaitions.clear();
+}
+
+RID TextServerFallback::create_font() {
+ FontDataFallback *fd = memnew(FontDataFallback);
+
return font_owner.make_rid(fd);
}
-RID TextServerFallback::create_font_bitmap(float p_height, float p_ascent, int p_base_size) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = memnew(BitmapFontDataFallback);
- Error err = fd->bitmap_new(p_height, p_ascent, p_base_size);
- if (err != OK) {
- memdelete(fd);
- return RID();
+void TextServerFallback::font_set_data(RID p_font_rid, const PackedByteArray &p_data) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ _font_clear_cache(fd);
+ fd->data = p_data;
+ fd->data_ptr = fd->data.ptr();
+ fd->data_size = fd->data.size();
+}
+
+void TextServerFallback::font_set_data_ptr(RID p_font_rid, const uint8_t *p_data_ptr, size_t p_data_size) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ _font_clear_cache(fd);
+ fd->data.clear();
+ fd->data_ptr = p_data_ptr;
+ fd->data_size = p_data_size;
+}
+
+void TextServerFallback::font_set_antialiased(RID p_font_rid, bool p_antialiased) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->antialiased != p_antialiased) {
+ _font_clear_cache(fd);
+ fd->antialiased = p_antialiased;
}
+}
- return font_owner.make_rid(fd);
+bool TextServerFallback::font_is_antialiased(RID p_font_rid) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->antialiased;
}
-void TextServerFallback::font_bitmap_add_texture(RID p_font, const Ref<Texture> &p_texture) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+void TextServerFallback::font_set_multichannel_signed_distance_field(RID p_font_rid, bool p_msdf) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->bitmap_add_texture(p_texture);
+
+ MutexLock lock(fd->mutex);
+ if (fd->msdf != p_msdf) {
+ _font_clear_cache(fd);
+ fd->msdf = p_msdf;
+ }
}
-void TextServerFallback::font_bitmap_add_char(RID p_font, char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+bool TextServerFallback::font_is_multichannel_signed_distance_field(RID p_font_rid) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->msdf;
+}
+
+void TextServerFallback::font_set_msdf_pixel_range(RID p_font_rid, int p_msdf_pixel_range) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->bitmap_add_char(p_char, p_texture_idx, p_rect, p_align, p_advance);
+
+ MutexLock lock(fd->mutex);
+ if (fd->msdf_range != p_msdf_pixel_range) {
+ _font_clear_cache(fd);
+ fd->msdf_range = p_msdf_pixel_range;
+ }
}
-void TextServerFallback::font_bitmap_add_kerning_pair(RID p_font, char32_t p_A, char32_t p_B, int p_kerning) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+int TextServerFallback::font_get_msdf_pixel_range(RID p_font_rid) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->msdf_range;
+}
+
+void TextServerFallback::font_set_msdf_size(RID p_font_rid, int p_msdf_size) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->bitmap_add_kerning_pair(p_A, p_B, p_kerning);
+
+ MutexLock lock(fd->mutex);
+ if (fd->msdf_source_size != p_msdf_size) {
+ _font_clear_cache(fd);
+ fd->msdf_source_size = p_msdf_size;
+ }
}
-float TextServerFallback::font_get_height(RID p_font, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
+int TextServerFallback::font_get_msdf_size(RID p_font_rid) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->msdf_source_size;
+}
+
+void TextServerFallback::font_set_fixed_size(RID p_font_rid, int p_fixed_size) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->fixed_size != p_fixed_size) {
+ fd->fixed_size = p_fixed_size;
+ }
+}
+
+int TextServerFallback::font_get_fixed_size(RID p_font_rid) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->fixed_size;
+}
+
+void TextServerFallback::font_set_force_autohinter(RID p_font_rid, bool p_force_autohinter) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->force_autohinter != p_force_autohinter) {
+ _font_clear_cache(fd);
+ fd->force_autohinter = p_force_autohinter;
+ }
+}
+
+bool TextServerFallback::font_is_force_autohinter(RID p_font_rid) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->force_autohinter;
+}
+
+void TextServerFallback::font_set_hinting(RID p_font_rid, TextServer::Hinting p_hinting) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->hinting != p_hinting) {
+ _font_clear_cache(fd);
+ fd->hinting = p_hinting;
+ }
+}
+
+TextServer::Hinting TextServerFallback::font_get_hinting(RID p_font_rid) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, HINTING_NONE);
+
+ MutexLock lock(fd->mutex);
+ return fd->hinting;
+}
+
+void TextServerFallback::font_set_variation_coordinates(RID p_font_rid, const Dictionary &p_variation_coordinates) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->variation_coordinates != p_variation_coordinates) {
+ _font_clear_cache(fd);
+ fd->variation_coordinates = p_variation_coordinates;
+ }
+}
+
+Dictionary TextServerFallback::font_get_variation_coordinates(RID p_font_rid) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Dictionary());
+
+ MutexLock lock(fd->mutex);
+ return fd->variation_coordinates;
+}
+
+void TextServerFallback::font_set_oversampling(RID p_font_rid, real_t p_oversampling) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->oversampling != p_oversampling) {
+ _font_clear_cache(fd);
+ fd->oversampling = p_oversampling;
+ }
+}
+
+real_t TextServerFallback::font_get_oversampling(RID p_font_rid) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.f);
- return fd->get_height(p_size);
+
+ MutexLock lock(fd->mutex);
+ return fd->oversampling;
}
-float TextServerFallback::font_get_ascent(RID p_font, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
+Array TextServerFallback::font_get_size_cache_list(RID p_font_rid) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Array());
+
+ MutexLock lock(fd->mutex);
+ Array ret;
+ for (const Map<Vector2i, FontDataForSizeFallback *>::Element *E = fd->cache.front(); E; E = E->next()) {
+ ret.push_back(E->key());
+ }
+ return ret;
+}
+
+void TextServerFallback::font_clear_size_cache(RID p_font_rid) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ for (const Map<Vector2i, FontDataForSizeFallback *>::Element *E = fd->cache.front(); E; E = E->next()) {
+ memdelete(E->get());
+ }
+ fd->cache.clear();
+}
+
+void TextServerFallback::font_remove_size_cache(RID p_font_rid, const Vector2i &p_size) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ if (fd->cache.has(p_size)) {
+ memdelete(fd->cache[p_size]);
+ fd->cache.erase(p_size);
+ }
+}
+
+void TextServerFallback::font_set_ascent(RID p_font_rid, int p_size, real_t p_ascent) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->ascent = p_ascent;
+}
+
+real_t TextServerFallback::font_get_ascent(RID p_font_rid, int p_size) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.f);
- return fd->get_ascent(p_size);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0.f);
+
+ if (fd->msdf) {
+ return fd->cache[size]->ascent * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->ascent;
+ }
}
-float TextServerFallback::font_get_descent(RID p_font, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
+void TextServerFallback::font_set_descent(RID p_font_rid, int p_size, real_t p_descent) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->descent = p_descent;
+}
+
+real_t TextServerFallback::font_get_descent(RID p_font_rid, int p_size) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.f);
- return fd->get_descent(p_size);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0.f);
+
+ if (fd->msdf) {
+ return fd->cache[size]->descent * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->descent;
+ }
}
-float TextServerFallback::font_get_underline_position(RID p_font, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
+void TextServerFallback::font_set_underline_position(RID p_font_rid, int p_size, real_t p_underline_position) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->underline_position = p_underline_position;
+}
+
+real_t TextServerFallback::font_get_underline_position(RID p_font_rid, int p_size) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.f);
- return fd->get_underline_position(p_size);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0.f);
+
+ if (fd->msdf) {
+ return fd->cache[size]->underline_position * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->underline_position;
+ }
}
-float TextServerFallback::font_get_underline_thickness(RID p_font, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
+void TextServerFallback::font_set_underline_thickness(RID p_font_rid, int p_size, real_t p_underline_thickness) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->underline_thickness = p_underline_thickness;
+}
+
+real_t TextServerFallback::font_get_underline_thickness(RID p_font_rid, int p_size) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0.f);
- return fd->get_underline_thickness(p_size);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0.f);
+
+ if (fd->msdf) {
+ return fd->cache[size]->underline_thickness * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->underline_thickness;
+ }
}
-int TextServerFallback::font_get_spacing_space(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, 0);
- return fd->get_spacing_space();
+void TextServerFallback::font_set_scale(RID p_font_rid, int p_size, real_t p_scale) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->scale = p_scale;
}
-void TextServerFallback::font_set_spacing_space(RID p_font, int p_value) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+real_t TextServerFallback::font_get_scale(RID p_font_rid, int p_size) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, 0.f);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0.f);
+
+ if (fd->msdf) {
+ return fd->cache[size]->scale * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->scale / fd->cache[size]->oversampling;
+ }
+}
+
+void TextServerFallback::font_set_spacing(RID p_font_rid, int p_size, TextServer::SpacingType p_spacing, int p_value) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->set_spacing_space(p_value);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ switch (p_spacing) {
+ case TextServer::SPACING_GLYPH: {
+ fd->cache[size]->spacing_glyph = p_value;
+ } break;
+ case TextServer::SPACING_SPACE: {
+ fd->cache[size]->spacing_space = p_value;
+ } break;
+ default: {
+ ERR_FAIL_MSG("Invalid spacing type: " + itos(p_spacing));
+ } break;
+ }
}
-int TextServerFallback::font_get_spacing_glyph(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
+int TextServerFallback::font_get_spacing(RID p_font_rid, int p_size, TextServer::SpacingType p_spacing) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, 0);
- return fd->get_spacing_glyph();
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0);
+
+ switch (p_spacing) {
+ case TextServer::SPACING_GLYPH: {
+ if (fd->msdf) {
+ return fd->cache[size]->spacing_glyph * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->spacing_glyph;
+ }
+ } break;
+ case TextServer::SPACING_SPACE: {
+ if (fd->msdf) {
+ return fd->cache[size]->spacing_space * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return fd->cache[size]->spacing_space;
+ }
+ } break;
+ default: {
+ ERR_FAIL_V_MSG(0, "Invalid spacing type: " + itos(p_spacing));
+ } break;
+ }
+ return 0;
}
-void TextServerFallback::font_set_spacing_glyph(RID p_font, int p_value) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+int TextServerFallback::font_get_texture_count(RID p_font_rid, const Vector2i &p_size) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, 0);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), 0);
+
+ return fd->cache[size]->textures.size();
+}
+
+void TextServerFallback::font_clear_textures(RID p_font_rid, const Vector2i &p_size) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->set_spacing_glyph(p_value);
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->textures.clear();
}
-void TextServerFallback::font_set_antialiased(RID p_font, bool p_antialiased) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+void TextServerFallback::font_remove_texture(RID p_font_rid, const Vector2i &p_size, int p_texture_index) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ ERR_FAIL_INDEX(p_texture_index, fd->cache[size]->textures.size());
+
+ fd->cache[size]->textures.remove(p_texture_index);
+}
+
+void TextServerFallback::font_set_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const Ref<Image> &p_image) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->set_antialiased(p_antialiased);
+ ERR_FAIL_COND(p_image.is_null());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ ERR_FAIL_COND(p_texture_index < 0);
+ if (p_texture_index >= fd->cache[size]->textures.size()) {
+ fd->cache[size]->textures.resize(p_texture_index + 1);
+ }
+
+ FontTexture &tex = fd->cache[size]->textures.write[p_texture_index];
+
+ tex.imgdata = p_image->get_data();
+ tex.texture_w = p_image->get_width();
+ tex.texture_h = p_image->get_height();
+ tex.format = p_image->get_format();
+
+ Ref<Image> img = memnew(Image(tex.texture_w, tex.texture_h, 0, tex.format, tex.imgdata));
+ tex.texture = Ref<ImageTexture>();
+ tex.texture.instantiate();
+ tex.texture->create_from_image(img);
}
-bool TextServerFallback::font_get_antialiased(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, false);
- return fd->get_antialiased();
+Ref<Image> TextServerFallback::font_get_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Ref<Image>());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Ref<Image>());
+ ERR_FAIL_INDEX_V(p_texture_index, fd->cache[size]->textures.size(), Ref<Image>());
+
+ const FontTexture &tex = fd->cache[size]->textures.write[p_texture_index];
+ Ref<Image> img = memnew(Image(tex.texture_w, tex.texture_h, 0, tex.format, tex.imgdata));
+
+ return img;
}
-void TextServerFallback::font_set_distance_field_hint(RID p_font, bool p_distance_field) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+void TextServerFallback::font_set_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const PackedInt32Array &p_offset) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->set_distance_field_hint(p_distance_field);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ if (p_texture_index >= fd->cache[size]->textures.size()) {
+ fd->cache[size]->textures.resize(p_texture_index + 1);
+ }
+
+ FontTexture &tex = fd->cache[size]->textures.write[p_texture_index];
+ tex.offsets = p_offset;
}
-bool TextServerFallback::font_get_distance_field_hint(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, false);
- return fd->get_distance_field_hint();
+PackedInt32Array TextServerFallback::font_get_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, PackedInt32Array());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), PackedInt32Array());
+ ERR_FAIL_INDEX_V(p_texture_index, fd->cache[size]->textures.size(), PackedInt32Array());
+
+ const FontTexture &tex = fd->cache[size]->textures.write[p_texture_index];
+ return tex.offsets;
}
-void TextServerFallback::font_set_hinting(RID p_font, TextServer::Hinting p_hinting) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+Array TextServerFallback::font_get_glyph_list(RID p_font_rid, const Vector2i &p_size) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Array());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Array());
+
+ Array ret;
+ const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+ const int32_t *E = nullptr;
+ while ((E = gl.next(E))) {
+ ret.push_back(*E);
+ }
+ return ret;
+}
+
+void TextServerFallback::font_clear_glyphs(RID p_font_rid, const Vector2i &p_size) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->set_hinting(p_hinting);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ fd->cache[size]->glyph_map.clear();
}
-TextServer::Hinting TextServerFallback::font_get_hinting(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, TextServer::HINTING_NONE);
- return fd->get_hinting();
+void TextServerFallback::font_remove_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ fd->cache[size]->glyph_map.erase(p_glyph);
}
-void TextServerFallback::font_set_force_autohinter(RID p_font, bool p_enabeld) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+Vector2 TextServerFallback::font_get_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Vector2());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Vector2());
+ if (!_ensure_glyph(fd, size, p_glyph)) {
+ return Vector2(); // Invalid or non graphicl glyph, do not display errors.
+ }
+
+ const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ if (fd->msdf) {
+ return gl[p_glyph].advance * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return gl[p_glyph].advance;
+ }
+}
+
+void TextServerFallback::font_set_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph, const Vector2 &p_advance) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->set_force_autohinter(p_enabeld);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ gl[p_glyph].advance = p_advance;
+ gl[p_glyph].found = true;
}
-bool TextServerFallback::font_get_force_autohinter(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
+Vector2 TextServerFallback::font_get_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Vector2());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Vector2());
+ if (!_ensure_glyph(fd, size, p_glyph)) {
+ return Vector2(); // Invalid or non graphicl glyph, do not display errors.
+ }
+
+ const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ if (fd->msdf) {
+ return gl[p_glyph].rect.position * (real_t)p_size.x / (real_t)fd->msdf_source_size;
+ } else {
+ return gl[p_glyph].rect.position;
+ }
+}
+
+void TextServerFallback::font_set_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_offset) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ gl[p_glyph].rect.position = p_offset;
+ gl[p_glyph].found = true;
+}
+
+Vector2 TextServerFallback::font_get_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Vector2());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Vector2());
+ if (!_ensure_glyph(fd, size, p_glyph)) {
+ return Vector2(); // Invalid or non graphicl glyph, do not display errors.
+ }
+
+ const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ if (fd->msdf) {
+ return gl[p_glyph].rect.size * (real_t)p_size.x / (real_t)fd->msdf_source_size;
+ } else {
+ return gl[p_glyph].rect.size;
+ }
+}
+
+void TextServerFallback::font_set_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_gl_size) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ gl[p_glyph].rect.size = p_gl_size;
+ gl[p_glyph].found = true;
+}
+
+Rect2 TextServerFallback::font_get_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Rect2());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Rect2());
+ if (!_ensure_glyph(fd, size, p_glyph)) {
+ return Rect2(); // Invalid or non graphicl glyph, do not display errors.
+ }
+
+ const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+ return gl[p_glyph].uv_rect;
+}
+
+void TextServerFallback::font_set_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Rect2 &p_uv_rect) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ gl[p_glyph].uv_rect = p_uv_rect;
+ gl[p_glyph].found = true;
+}
+
+int TextServerFallback::font_get_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, -1);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), -1);
+ if (!_ensure_glyph(fd, size, p_glyph)) {
+ return -1; // Invalid or non graphicl glyph, do not display errors.
+ }
+
+ const HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+ return gl[p_glyph].texture_idx;
+}
+
+void TextServerFallback::font_set_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, int p_texture_idx) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+
+ HashMap<int32_t, FontGlyph> &gl = fd->cache[size]->glyph_map;
+
+ gl[p_glyph].texture_idx = p_texture_idx;
+ gl[p_glyph].found = true;
+}
+
+bool TextServerFallback::font_get_glyph_contours(RID p_font_rid, int p_size, int32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
- return fd->get_force_autohinter();
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), false);
+
+#ifdef MODULE_FREETYPE_ENABLED
+ int error = FT_Load_Glyph(fd->cache[size]->face, FT_Get_Char_Index(fd->cache[size]->face, p_index), FT_LOAD_NO_BITMAP | (fd->force_autohinter ? FT_LOAD_FORCE_AUTOHINT : 0));
+ ERR_FAIL_COND_V(error, false);
+
+ r_points.clear();
+ r_contours.clear();
+
+ real_t h = fd->cache[size]->ascent;
+ real_t scale = (1.0 / 64.0) / fd->cache[size]->oversampling * fd->cache[size]->scale;
+ if (fd->msdf) {
+ scale = scale * (real_t)p_size / (real_t)fd->msdf_source_size;
+ }
+ for (short i = 0; i < fd->cache[size]->face->glyph->outline.n_points; i++) {
+ r_points.push_back(Vector3(fd->cache[size]->face->glyph->outline.points[i].x * scale, h - fd->cache[size]->face->glyph->outline.points[i].y * scale, FT_CURVE_TAG(fd->cache[size]->face->glyph->outline.tags[i])));
+ }
+ for (short i = 0; i < fd->cache[size]->face->glyph->outline.n_contours; i++) {
+ r_contours.push_back(fd->cache[size]->face->glyph->outline.contours[i]);
+ }
+ r_orientation = (FT_Outline_Get_Orientation(&fd->cache[size]->face->glyph->outline) == FT_ORIENTATION_FILL_RIGHT);
+#else
+ return false;
+#endif
+ return true;
}
-bool TextServerFallback::font_has_char(RID p_font, char32_t p_char) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
+Array TextServerFallback::font_get_kerning_list(RID p_font_rid, int p_size) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Array());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Array());
+
+ Array ret;
+ for (const Map<Vector2i, Vector2>::Element *E = fd->cache[size]->kerning_map.front(); E; E = E->next()) {
+ ret.push_back(E->key());
+ }
+ return ret;
+}
+
+void TextServerFallback::font_clear_kerning_map(RID p_font_rid, int p_size) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->kerning_map.clear();
+}
+
+void TextServerFallback::font_remove_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->kerning_map.erase(p_glyph_pair);
+}
+
+void TextServerFallback::font_set_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ fd->cache[size]->kerning_map[p_glyph_pair] = p_kerning;
+}
+
+Vector2 TextServerFallback::font_get_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Vector2());
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Vector2());
+
+ const Map<Vector2i, Vector2> &kern = fd->cache[size]->kerning_map;
+
+ if (kern.has(p_glyph_pair)) {
+ if (fd->msdf) {
+ return kern[p_glyph_pair] * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return kern[p_glyph_pair];
+ }
+ } else {
+#ifdef MODULE_FREETYPE_ENABLED
+ if (fd->cache[size]->face) {
+ FT_Vector delta;
+ int32_t glyph_a = FT_Get_Char_Index(fd->cache[size]->face, p_glyph_pair.x);
+ int32_t glyph_b = FT_Get_Char_Index(fd->cache[size]->face, p_glyph_pair.y);
+ FT_Get_Kerning(fd->cache[size]->face, glyph_a, glyph_b, FT_KERNING_DEFAULT, &delta);
+ if (fd->msdf) {
+ return Vector2(delta.x, delta.y) * (real_t)p_size / (real_t)fd->msdf_source_size;
+ } else {
+ return Vector2(delta.x, delta.y);
+ }
+ }
+#endif
+ }
+ return Vector2();
+}
+
+int32_t TextServerFallback::font_get_glyph_index(RID p_font_rid, int p_size, char32_t p_char, char32_t p_variation_selector) const {
+ return (int32_t)p_char;
+}
+
+bool TextServerFallback::font_has_char(RID p_font_rid, char32_t p_char) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
- return fd->has_char(p_char);
+
+ MutexLock lock(fd->mutex);
+ if (fd->cache.is_empty()) {
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, fd->msdf ? Vector2i(fd->msdf_source_size, 0) : Vector2i(16, 0)), false);
+ }
+ FontDataForSizeFallback *at_size = fd->cache.front()->get();
+
+#ifdef MODULE_FREETYPE_ENABLED
+ if (at_size && at_size->face) {
+ return FT_Get_Char_Index(at_size->face, p_char) != 0;
+ }
+#endif
+ return (at_size) ? at_size->glyph_map.has((int32_t)p_char) : false;
}
-String TextServerFallback::font_get_supported_chars(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
+String TextServerFallback::font_get_supported_chars(RID p_font_rid) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, String());
- return fd->get_supported_chars();
+
+ MutexLock lock(fd->mutex);
+ if (fd->cache.is_empty()) {
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, fd->msdf ? Vector2i(fd->msdf_source_size, 0) : Vector2i(16, 0)), String());
+ }
+ FontDataForSizeFallback *at_size = fd->cache.front()->get();
+
+ String chars;
+#ifdef MODULE_FREETYPE_ENABLED
+ if (at_size && at_size->face) {
+ FT_UInt gindex;
+ FT_ULong charcode = FT_Get_First_Char(at_size->face, &gindex);
+ while (gindex != 0) {
+ if (charcode != 0) {
+ chars += char32_t(charcode);
+ }
+ charcode = FT_Get_Next_Char(at_size->face, charcode, &gindex);
+ }
+ return chars;
+ }
+#endif
+ if (at_size) {
+ const HashMap<int32_t, FontGlyph> &gl = at_size->glyph_map;
+ const int32_t *E = nullptr;
+ while ((E = gl.next(E))) {
+ chars += char32_t(*E);
+ }
+ }
+ return chars;
}
-bool TextServerFallback::font_has_outline(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, false);
- return fd->has_outline();
+void TextServerFallback::font_render_range(RID p_font_rid, const Vector2i &p_size, char32_t p_start, char32_t p_end) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ for (char32_t i = p_start; i <= p_end; i++) {
+ _ensure_glyph(fd, size, (int32_t)i);
+ }
}
-float TextServerFallback::font_get_base_size(RID p_font) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, 0.f);
- return fd->get_base_size();
+void TextServerFallback::font_render_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_index) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ ERR_FAIL_COND(!_ensure_glyph(fd, size, p_index));
}
-bool TextServerFallback::font_is_language_supported(RID p_font, const String &p_language) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, false);
- if (fd->lang_support_overrides.has(p_language)) {
- return fd->lang_support_overrides[p_language];
- } else {
- Vector<String> tags = p_language.replace("-", "_").split("_");
- if (tags.size() > 0) {
- if (fd->lang_support_overrides.has(tags[0])) {
- return fd->lang_support_overrides[tags[0]];
+void TextServerFallback::font_draw_glyph(RID p_font_rid, RID p_canvas, int p_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, p_size);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ if (!_ensure_glyph(fd, size, p_index)) {
+ return; // // Invalid or non graphicl glyph, do not display errors, nothing to draw.
+ }
+
+ const FontGlyph &gl = fd->cache[size]->glyph_map[p_index];
+ if (gl.found) {
+ ERR_FAIL_COND(gl.texture_idx < -1 || gl.texture_idx >= fd->cache[size]->textures.size());
+
+ if (gl.texture_idx != -1) {
+ Color modulate = p_color;
+#ifdef MODULE_FREETYPE_ENABLED
+ if (fd->cache[size]->face && FT_HAS_COLOR(fd->cache[size]->face)) {
+ modulate.r = modulate.g = modulate.b = 1.0;
+ }
+#endif
+ if (RenderingServer::get_singleton() != nullptr) {
+ RID texture = fd->cache[size]->textures[gl.texture_idx].texture->get_rid();
+ if (fd->msdf) {
+ Point2 cpos = p_pos;
+ cpos += gl.rect.position * (real_t)p_size / (real_t)fd->msdf_source_size;
+ Size2 csize = gl.rect.size * (real_t)p_size / (real_t)fd->msdf_source_size;
+ RenderingServer::get_singleton()->canvas_item_add_msdf_texture_rect_region(p_canvas, Rect2(cpos, csize), texture, gl.uv_rect, modulate, 0, fd->msdf_range);
+ } else {
+ Point2i cpos = p_pos;
+ cpos += gl.rect.position;
+ Size2i csize = gl.rect.size;
+ RenderingServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas, Rect2(cpos, csize), texture, gl.uv_rect, modulate, false, false);
+ }
}
}
- return false;
}
}
-void TextServerFallback::font_set_language_support_override(RID p_font, const String &p_language, bool p_supported) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+void TextServerFallback::font_draw_glyph_outline(RID p_font_rid, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->lang_support_overrides[p_language] = p_supported;
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size_outline(fd, Vector2i(p_size, p_outline_size));
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
+ if (!_ensure_glyph(fd, size, p_index)) {
+ return; // // Invalid or non graphicl glyph, do not display errors, nothing to draw.
+ }
+
+ const FontGlyph &gl = fd->cache[size]->glyph_map[p_index];
+ if (gl.found) {
+ ERR_FAIL_COND(gl.texture_idx < -1 || gl.texture_idx >= fd->cache[size]->textures.size());
+
+ if (gl.texture_idx != -1) {
+ Color modulate = p_color;
+#ifdef MODULE_FREETYPE_ENABLED
+ if (fd->cache[size]->face && FT_HAS_COLOR(fd->cache[size]->face)) {
+ modulate.r = modulate.g = modulate.b = 1.0;
+ }
+#endif
+ if (RenderingServer::get_singleton() != nullptr) {
+ RID texture = fd->cache[size]->textures[gl.texture_idx].texture->get_rid();
+ if (fd->msdf) {
+ Point2 cpos = p_pos;
+ cpos += gl.rect.position * (real_t)p_size / (real_t)fd->msdf_source_size;
+ Size2 csize = gl.rect.size * (real_t)p_size / (real_t)fd->msdf_source_size;
+ RenderingServer::get_singleton()->canvas_item_add_msdf_texture_rect_region(p_canvas, Rect2(cpos, csize), texture, gl.uv_rect, modulate, p_outline_size * 2, fd->msdf_range);
+ } else {
+ Point2i cpos = p_pos;
+ cpos += gl.rect.position;
+ Size2i csize = gl.rect.size;
+ RenderingServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas, Rect2(cpos, csize), texture, gl.uv_rect, modulate, false, false);
+ }
+ }
+ }
+ }
}
-bool TextServerFallback::font_get_language_support_override(RID p_font, const String &p_language) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+bool TextServerFallback::font_is_language_supported(RID p_font_rid, const String &p_language) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
- return fd->lang_support_overrides[p_language];
+
+ MutexLock lock(fd->mutex);
+ if (fd->language_support_overrides.has(p_language)) {
+ return fd->language_support_overrides[p_language];
+ } else {
+ return true;
+ }
}
-void TextServerFallback::font_remove_language_support_override(RID p_font, const String &p_language) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+void TextServerFallback::font_set_language_support_override(RID p_font_rid, const String &p_language, bool p_supported) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
- fd->lang_support_overrides.erase(p_language);
+
+ MutexLock lock(fd->mutex);
+ fd->language_support_overrides[p_language] = p_supported;
}
-Vector<String> TextServerFallback::font_get_language_support_overrides(RID p_font) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+bool TextServerFallback::font_get_language_support_override(RID p_font_rid, const String &p_language) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
+ return fd->language_support_overrides[p_language];
+}
+
+void TextServerFallback::font_remove_language_support_override(RID p_font_rid, const String &p_language) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ fd->language_support_overrides.erase(p_language);
+}
+
+Vector<String> TextServerFallback::font_get_language_support_overrides(RID p_font_rid) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Vector<String>());
- Vector<String> ret;
- for (Map<String, bool>::Element *E = fd->lang_support_overrides.front(); E; E = E->next()) {
- ret.push_back(E->key());
+
+ MutexLock lock(fd->mutex);
+ Vector<String> out;
+ for (const Map<String, bool>::Element *E = fd->language_support_overrides.front(); E; E = E->next()) {
+ out.push_back(E->key());
}
- return ret;
+ return out;
}
-bool TextServerFallback::font_is_script_supported(RID p_font, const String &p_script) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
+bool TextServerFallback::font_is_script_supported(RID p_font_rid, const String &p_script) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
if (fd->script_support_overrides.has(p_script)) {
return fd->script_support_overrides[p_script];
} else {
@@ -392,95 +1870,84 @@ bool TextServerFallback::font_is_script_supported(RID p_font, const String &p_sc
}
}
-void TextServerFallback::font_set_script_support_override(RID p_font, const String &p_script, bool p_supported) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+void TextServerFallback::font_set_script_support_override(RID p_font_rid, const String &p_script, bool p_supported) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
fd->script_support_overrides[p_script] = p_supported;
}
-bool TextServerFallback::font_get_script_support_override(RID p_font, const String &p_script) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+bool TextServerFallback::font_get_script_support_override(RID p_font_rid, const String &p_script) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, false);
+
+ MutexLock lock(fd->mutex);
return fd->script_support_overrides[p_script];
}
-void TextServerFallback::font_remove_script_support_override(RID p_font, const String &p_script) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+void TextServerFallback::font_remove_script_support_override(RID p_font_rid, const String &p_script) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND(!fd);
+
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, 16);
+ ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
fd->script_support_overrides.erase(p_script);
}
-Vector<String> TextServerFallback::font_get_script_support_overrides(RID p_font) {
- _THREAD_SAFE_METHOD_
- FontDataFallback *fd = font_owner.getornull(p_font);
+Vector<String> TextServerFallback::font_get_script_support_overrides(RID p_font_rid) {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_COND_V(!fd, Vector<String>());
- Vector<String> ret;
- for (Map<String, bool>::Element *E = fd->script_support_overrides.front(); E; E = E->next()) {
- ret.push_back(E->key());
- }
- return ret;
-}
-
-uint32_t TextServerFallback::font_get_glyph_index(RID p_font, char32_t p_char, char32_t p_variation_selector) const {
- return (uint32_t)p_char;
-}
-Vector2 TextServerFallback::font_get_glyph_advance(RID p_font, uint32_t p_index, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, Vector2());
- return fd->get_advance(p_index, p_size);
+ MutexLock lock(fd->mutex);
+ Vector<String> out;
+ for (const Map<String, bool>::Element *E = fd->script_support_overrides.front(); E; E = E->next()) {
+ out.push_back(E->key());
+ }
+ return out;
}
-Vector2 TextServerFallback::font_get_glyph_kerning(RID p_font, uint32_t p_index_a, uint32_t p_index_b, int p_size) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, Vector2());
- return fd->get_kerning(p_index_a, p_index_b, p_size);
+Dictionary TextServerFallback::font_supported_feature_list(RID p_font_rid) const {
+ return Dictionary();
}
-Vector2 TextServerFallback::font_draw_glyph(RID p_font, RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, Vector2());
- return fd->draw_glyph(p_canvas, p_size, p_pos, p_index, p_color);
-}
+Dictionary TextServerFallback::font_supported_variation_list(RID p_font_rid) const {
+ FontDataFallback *fd = font_owner.get_or_null(p_font_rid);
+ ERR_FAIL_COND_V(!fd, Dictionary());
-Vector2 TextServerFallback::font_draw_glyph_outline(RID p_font, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, Vector2());
- return fd->draw_glyph_outline(p_canvas, p_size, p_outline_size, p_pos, p_index, p_color);
+ MutexLock lock(fd->mutex);
+ Vector2i size = _get_size(fd, 16);
+ ERR_FAIL_COND_V(!_ensure_cache_for_size(fd, size), Dictionary());
+ return fd->supported_varaitions;
}
-bool TextServerFallback::font_get_glyph_contours(RID p_font, int p_size, uint32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const {
- _THREAD_SAFE_METHOD_
- const FontDataFallback *fd = font_owner.getornull(p_font);
- ERR_FAIL_COND_V(!fd, false);
- return fd->get_glyph_contours(p_size, p_index, r_points, r_contours, r_orientation);
-}
-
-float TextServerFallback::font_get_oversampling() const {
+real_t TextServerFallback::font_get_global_oversampling() const {
return oversampling;
}
-void TextServerFallback::font_set_oversampling(float p_oversampling) {
+void TextServerFallback::font_set_global_oversampling(real_t p_oversampling) {
_THREAD_SAFE_METHOD_
if (oversampling != p_oversampling) {
oversampling = p_oversampling;
List<RID> fonts;
font_owner.get_owned_list(&fonts);
+ bool font_cleared = false;
for (const RID &E : fonts) {
- font_owner.getornull(E)->clear_cache();
+ if (!font_is_multichannel_signed_distance_field(E) && font_get_oversampling(E) <= 0) {
+ font_clear_size_cache(E);
+ font_cleared = true;
+ }
}
- }
-}
-Vector<String> TextServerFallback::get_system_fonts() const {
- return Vector<String>();
+ if (font_cleared) {
+ List<RID> text_bufs;
+ shaped_owner.get_owned_list(&text_bufs);
+ for (const RID &E : text_bufs) {
+ invalidate(shaped_owner.get_or_null(E));
+ }
+ }
+ }
}
/*************************************************************************/
@@ -502,7 +1969,7 @@ void TextServerFallback::invalidate(ShapedTextData *p_shaped) {
}
void TextServerFallback::full_copy(ShapedTextData *p_shaped) {
- ShapedTextData *parent = shaped_owner.getornull(p_shaped->parent);
+ ShapedTextData *parent = shaped_owner.get_or_null(p_shaped->parent);
for (Map<Variant, ShapedTextData::EmbeddedObject>::Element *E = parent->objects.front(); E; E = E->next()) {
if (E->get().pos >= p_shaped->start && E->get().pos < p_shaped->end) {
@@ -533,10 +2000,10 @@ RID TextServerFallback::create_shaped_text(TextServer::Direction p_direction, Te
}
void TextServerFallback::shaped_text_clear(RID p_shaped) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
+ MutexLock lock(sd->mutex);
sd->parent = RID();
sd->start = 0;
sd->end = 0;
@@ -557,9 +2024,10 @@ TextServer::Direction TextServerFallback::shaped_text_get_direction(RID p_shaped
}
void TextServerFallback::shaped_text_set_orientation(RID p_shaped, TextServer::Orientation p_orientation) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
+
+ MutexLock lock(sd->mutex);
if (sd->orientation != p_orientation) {
if (sd->parent != RID()) {
full_copy(sd);
@@ -574,15 +2042,17 @@ void TextServerFallback::shaped_text_set_bidi_override(RID p_shaped, const Vecto
}
TextServer::Orientation TextServerFallback::shaped_text_get_orientation(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, TextServer::ORIENTATION_HORIZONTAL);
+
+ MutexLock lock(sd->mutex);
return sd->orientation;
}
void TextServerFallback::shaped_text_set_preserve_invalid(RID p_shaped, bool p_enabled) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
+
+ MutexLock lock(sd->mutex);
ERR_FAIL_COND(!sd);
if (sd->preserve_invalid != p_enabled) {
if (sd->parent != RID()) {
@@ -594,16 +2064,18 @@ void TextServerFallback::shaped_text_set_preserve_invalid(RID p_shaped, bool p_e
}
bool TextServerFallback::shaped_text_get_preserve_invalid(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
return sd->preserve_invalid;
}
void TextServerFallback::shaped_text_set_preserve_control(RID p_shaped, bool p_enabled) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND(!sd);
+
+ MutexLock lock(sd->mutex);
if (sd->preserve_control != p_enabled) {
if (sd->parent != RID()) {
full_copy(sd);
@@ -614,18 +2086,24 @@ void TextServerFallback::shaped_text_set_preserve_control(RID p_shaped, bool p_e
}
bool TextServerFallback::shaped_text_get_preserve_control(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
return sd->preserve_control;
}
bool TextServerFallback::shaped_text_add_string(RID p_shaped, const String &p_text, const Vector<RID> &p_fonts, int p_size, const Dictionary &p_opentype_features, const String &p_language) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
ERR_FAIL_COND_V(p_size <= 0, false);
+ for (int i = 0; i < p_fonts.size(); i++) {
+ ERR_FAIL_COND_V(!font_owner.get_or_null(p_fonts[i]), false);
+ }
+
if (p_text.is_empty()) {
return true;
}
@@ -637,6 +2115,7 @@ bool TextServerFallback::shaped_text_add_string(RID p_shaped, const String &p_te
ShapedTextData::Span span;
span.start = sd->text.length();
span.end = span.start + p_text.length();
+
// Pre-sort fonts, push fonts with the language support first.
Vector<RID> fonts_no_match;
int font_count = p_fonts.size();
@@ -662,9 +2141,10 @@ bool TextServerFallback::shaped_text_add_string(RID p_shaped, const String &p_te
}
bool TextServerFallback::shaped_text_add_object(RID p_shaped, Variant p_key, const Size2 &p_size, InlineAlign p_inline_align, int p_length) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
ERR_FAIL_COND_V(p_key == Variant(), false);
ERR_FAIL_COND_V(sd->objects.has(p_key), false);
@@ -692,9 +2172,10 @@ bool TextServerFallback::shaped_text_add_object(RID p_shaped, Variant p_key, con
}
bool TextServerFallback::shaped_text_resize_object(RID p_shaped, Variant p_key, const Size2 &p_size, InlineAlign p_inline_align) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
ERR_FAIL_COND_V(!sd->objects.has(p_key), false);
sd->objects[p_key].rect.size = p_size;
sd->objects[p_key].inline_align = p_inline_align;
@@ -706,8 +2187,6 @@ bool TextServerFallback::shaped_text_resize_object(RID p_shaped, Variant p_key,
sd->upos = 0;
sd->uthk = 0;
int sd_size = sd->glyphs.size();
- const FontDataFallback *fd = nullptr;
- RID prev_rid = RID();
for (int i = 0; i < sd_size; i++) {
Glyph gl = sd->glyphs[i];
@@ -731,17 +2210,13 @@ bool TextServerFallback::shaped_text_resize_object(RID p_shaped, Variant p_key,
sd->glyphs.write[i].advance = sd->objects[key].rect.size.y;
}
} else {
- if (prev_rid != gl.font_rid) {
- fd = font_owner.getornull(gl.font_rid);
- prev_rid = gl.font_rid;
- }
- if (fd != nullptr) {
+ if (gl.font_rid.is_valid()) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
- sd->ascent = MAX(sd->ascent, fd->get_ascent(gl.font_size));
- sd->descent = MAX(sd->descent, fd->get_descent(gl.font_size));
+ sd->ascent = MAX(sd->ascent, font_get_ascent(gl.font_rid, gl.font_size));
+ sd->descent = MAX(sd->descent, font_get_descent(gl.font_rid, gl.font_size));
} else {
- sd->ascent = MAX(sd->ascent, Math::round(fd->get_advance(gl.index, gl.font_size).x * 0.5));
- sd->descent = MAX(sd->descent, Math::round(fd->get_advance(gl.index, gl.font_size).x * 0.5));
+ sd->ascent = MAX(sd->ascent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ sd->descent = MAX(sd->descent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
}
sd->upos = MAX(sd->upos, font_get_underline_position(gl.font_rid, gl.font_size));
sd->uthk = MAX(sd->uthk, font_get_underline_thickness(gl.font_rid, gl.font_size));
@@ -760,8 +2235,8 @@ bool TextServerFallback::shaped_text_resize_object(RID p_shaped, Variant p_key,
}
// Align embedded objects to baseline.
- float full_ascent = sd->ascent;
- float full_descent = sd->descent;
+ real_t full_ascent = sd->ascent;
+ real_t full_descent = sd->descent;
for (Map<Variant, ShapedTextData::EmbeddedObject>::Element *E = sd->objects.front(); E; E = E->next()) {
if ((E->get().pos >= sd->start) && (E->get().pos < sd->end)) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
@@ -830,9 +2305,10 @@ bool TextServerFallback::shaped_text_resize_object(RID p_shaped, Variant p_key,
}
RID TextServerFallback::shaped_text_substr(RID p_shaped, int p_start, int p_length) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, RID());
+
+ MutexLock lock(sd->mutex);
if (sd->parent != RID()) {
return shaped_text_substr(sd->parent, p_start, p_length);
}
@@ -886,14 +2362,13 @@ RID TextServerFallback::shaped_text_substr(RID p_shaped, int p_start, int p_leng
new_sd->width += new_sd->objects[key].rect.size.y;
}
} else {
- const FontDataFallback *fd = font_owner.getornull(gl.font_rid);
- if (fd != nullptr) {
+ if (gl.font_rid.is_valid()) {
if (new_sd->orientation == ORIENTATION_HORIZONTAL) {
- new_sd->ascent = MAX(new_sd->ascent, fd->get_ascent(gl.font_size));
- new_sd->descent = MAX(new_sd->descent, fd->get_descent(gl.font_size));
+ new_sd->ascent = MAX(new_sd->ascent, font_get_ascent(gl.font_rid, gl.font_size));
+ new_sd->descent = MAX(new_sd->descent, font_get_descent(gl.font_rid, gl.font_size));
} else {
- new_sd->ascent = MAX(new_sd->ascent, Math::round(fd->get_advance(gl.index, gl.font_size).x * 0.5));
- new_sd->descent = MAX(new_sd->descent, Math::round(fd->get_advance(gl.index, gl.font_size).x * 0.5));
+ new_sd->ascent = MAX(new_sd->ascent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ new_sd->descent = MAX(new_sd->descent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
}
} else if (new_sd->preserve_invalid || (new_sd->preserve_control && is_control(gl.index))) {
// Glyph not found, replace with hex code box.
@@ -912,8 +2387,8 @@ RID TextServerFallback::shaped_text_substr(RID p_shaped, int p_start, int p_leng
}
// Align embedded objects to baseline.
- float full_ascent = new_sd->ascent;
- float full_descent = new_sd->descent;
+ real_t full_ascent = new_sd->ascent;
+ real_t full_descent = new_sd->descent;
for (Map<Variant, ShapedTextData::EmbeddedObject>::Element *E = new_sd->objects.front(); E; E = E->next()) {
if ((E->get().pos >= new_sd->start) && (E->get().pos < new_sd->end)) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
@@ -984,16 +2459,18 @@ RID TextServerFallback::shaped_text_substr(RID p_shaped, int p_start, int p_leng
}
RID TextServerFallback::shaped_text_get_parent(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, RID());
+
+ MutexLock lock(sd->mutex);
return sd->parent;
}
-float TextServerFallback::shaped_text_fit_to_width(RID p_shaped, float p_width, uint8_t /*JustificationFlag*/ p_jst_flags) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerFallback::shaped_text_fit_to_width(RID p_shaped, real_t p_width, uint8_t /*JustificationFlag*/ p_jst_flags) {
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
}
@@ -1053,13 +2530,13 @@ float TextServerFallback::shaped_text_fit_to_width(RID p_shaped, float p_width,
}
if ((space_count > 0) && ((p_jst_flags & JUSTIFICATION_WORD_BOUND) == JUSTIFICATION_WORD_BOUND)) {
- float delta_width_per_space = (p_width - sd->width) / space_count;
+ real_t delta_width_per_space = (p_width - sd->width) / space_count;
for (int i = start_pos; i <= end_pos; i++) {
Glyph &gl = sd->glyphs.write[i];
if (gl.count > 0) {
if ((gl.flags & GRAPHEME_IS_SPACE) == GRAPHEME_IS_SPACE) {
- float old_adv = gl.advance;
- gl.advance = Math::round(MAX(gl.advance + delta_width_per_space, 0.05 * gl.font_size));
+ real_t old_adv = gl.advance;
+ gl.advance = MAX(gl.advance + delta_width_per_space, Math::round(0.1 * gl.font_size));
sd->width += (gl.advance - old_adv);
}
}
@@ -1069,10 +2546,11 @@ float TextServerFallback::shaped_text_fit_to_width(RID p_shaped, float p_width,
return sd->width;
}
-float TextServerFallback::shaped_text_tab_align(RID p_shaped, const Vector<float> &p_tab_stops) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerFallback::shaped_text_tab_align(RID p_shaped, const Vector<real_t> &p_tab_stops) {
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
}
@@ -1081,7 +2559,7 @@ float TextServerFallback::shaped_text_tab_align(RID p_shaped, const Vector<float
}
int tab_index = 0;
- float off = 0.f;
+ real_t off = 0.f;
int start, end, delta;
if (sd->para_direction == DIRECTION_LTR) {
@@ -1098,7 +2576,7 @@ float TextServerFallback::shaped_text_tab_align(RID p_shaped, const Vector<float
for (int i = start; i != end; i += delta) {
if ((gl[i].flags & GRAPHEME_IS_TAB) == GRAPHEME_IS_TAB) {
- float tab_off = 0.f;
+ real_t tab_off = 0.f;
while (tab_off <= off) {
tab_off += p_tab_stops[tab_index];
tab_index++;
@@ -1106,7 +2584,7 @@ float TextServerFallback::shaped_text_tab_align(RID p_shaped, const Vector<float
tab_index = 0;
}
}
- float old_adv = gl[i].advance;
+ real_t old_adv = gl[i].advance;
gl[i].advance = tab_off - off;
sd->width += gl[i].advance - old_adv;
off = 0;
@@ -1119,9 +2597,10 @@ float TextServerFallback::shaped_text_tab_align(RID p_shaped, const Vector<float
}
bool TextServerFallback::shaped_text_update_breaks(RID p_shaped) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
shaped_text_shape(p_shaped);
}
@@ -1159,9 +2638,10 @@ bool TextServerFallback::shaped_text_update_breaks(RID p_shaped) {
}
bool TextServerFallback::shaped_text_update_justification_ops(RID p_shaped) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
shaped_text_shape(p_shaped);
}
@@ -1173,14 +2653,16 @@ bool TextServerFallback::shaped_text_update_justification_ops(RID p_shaped) {
return true;
}
-void TextServerFallback::shaped_text_overrun_trim_to_width(RID p_shaped_line, float p_width, uint8_t p_trim_flags) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped_line);
- ERR_FAIL_COND_MSG(!sd, "ShapedTextDataAdvanced invalid.");
+void TextServerFallback::shaped_text_overrun_trim_to_width(RID p_shaped_line, real_t p_width, uint8_t p_trim_flags) {
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped_line);
+ ERR_FAIL_COND_MSG(!sd, "ShapedTextDataFallback invalid.");
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
shaped_text_shape(p_shaped_line);
}
+ sd->text_trimmed = false;
sd->overrun_trim_data.ellipsis_glyph_buf.clear();
bool add_ellipsis = (p_trim_flags & OVERRUN_ADD_ELLIPSIS) == OVERRUN_ADD_ELLIPSIS;
@@ -1203,18 +2685,18 @@ void TextServerFallback::shaped_text_overrun_trim_to_width(RID p_shaped_line, fl
int sd_size = sd->glyphs.size();
RID last_gl_font_rid = sd_glyphs[sd_size - 1].font_rid;
int last_gl_font_size = sd_glyphs[sd_size - 1].font_size;
- uint32_t dot_gl_idx = font_get_glyph_index(last_gl_font_rid, '.');
- Vector2 dot_adv = font_get_glyph_advance(last_gl_font_rid, dot_gl_idx, last_gl_font_size);
- uint32_t whitespace_gl_idx = font_get_glyph_index(last_gl_font_rid, ' ');
- Vector2 whitespace_adv = font_get_glyph_advance(last_gl_font_rid, whitespace_gl_idx, last_gl_font_size);
+ int32_t dot_gl_idx = font_get_glyph_index(last_gl_font_rid, '.', 0);
+ Vector2 dot_adv = font_get_glyph_advance(last_gl_font_rid, last_gl_font_size, dot_gl_idx);
+ int32_t whitespace_gl_idx = font_get_glyph_index(last_gl_font_rid, ' ', 0);
+ Vector2 whitespace_adv = font_get_glyph_advance(last_gl_font_rid, last_gl_font_size, whitespace_gl_idx);
int ellipsis_width = 0;
if (add_ellipsis) {
- ellipsis_width = 3 * dot_adv.x + font_get_spacing_glyph(last_gl_font_rid) + (cut_per_word ? whitespace_adv.x : 0);
+ ellipsis_width = 3 * dot_adv.x + font_get_spacing(last_gl_font_rid, last_gl_font_size, TextServer::SPACING_GLYPH) + (cut_per_word ? whitespace_adv.x : 0);
}
int ell_min_characters = 6;
- float width = sd->width;
+ real_t width = sd->width;
int trim_pos = 0;
int ellipsis_pos = (enforce_ellipsis) ? 0 : -1;
@@ -1289,16 +2771,18 @@ void TextServerFallback::shaped_text_overrun_trim_to_width(RID p_shaped_line, fl
}
TextServer::TrimData TextServerFallback::shaped_text_get_trim_data(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
- ERR_FAIL_COND_V_MSG(!sd, TrimData(), "ShapedTextDataAdvanced invalid.");
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
+ ERR_FAIL_COND_V_MSG(!sd, TrimData(), "ShapedTextDataFallback invalid.");
+
+ MutexLock lock(sd->mutex);
return sd->overrun_trim_data;
}
bool TextServerFallback::shaped_text_shape(RID p_shaped) {
- _THREAD_SAFE_METHOD_
- ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
if (sd->valid) {
return true;
}
@@ -1347,14 +2831,12 @@ bool TextServerFallback::shaped_text_shape(RID p_shaped) {
} else {
// Text span.
for (int j = span.start; j < span.end; j++) {
- const FontDataFallback *fd = nullptr;
-
Glyph gl;
gl.start = j;
gl.end = j + 1;
gl.count = 1;
gl.font_size = span.font_size;
- gl.index = (uint32_t)sd->text[j]; // Use codepoint.
+ gl.index = (int32_t)sd->text[j]; // Use codepoint.
if (gl.index == 0x0009 || gl.index == 0x000b) {
gl.index = 0x0020;
}
@@ -1363,45 +2845,44 @@ bool TextServerFallback::shaped_text_shape(RID p_shaped) {
}
// Select first font which has character (font are already sorted by span language).
for (int k = 0; k < span.fonts.size(); k++) {
- fd = font_owner.getornull(span.fonts[k]);
- if (fd != nullptr && fd->has_char(gl.index)) {
+ if (font_has_char(span.fonts[k], gl.index)) {
gl.font_rid = span.fonts[k];
break;
}
}
- if (gl.font_rid != RID()) {
+ if (gl.font_rid.is_valid()) {
if (sd->text[j] != 0 && !is_linebreak(sd->text[j])) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
- gl.advance = fd->get_advance(gl.index, gl.font_size).x;
+ gl.advance = font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x;
gl.x_off = 0;
gl.y_off = 0;
- sd->ascent = MAX(sd->ascent, fd->get_ascent(gl.font_size));
- sd->descent = MAX(sd->descent, fd->get_descent(gl.font_size));
+ sd->ascent = MAX(sd->ascent, font_get_ascent(gl.font_rid, gl.font_size));
+ sd->descent = MAX(sd->descent, font_get_descent(gl.font_rid, gl.font_size));
} else {
- gl.advance = fd->get_advance(gl.index, gl.font_size).y;
- gl.x_off = -Math::round(fd->get_advance(gl.index, gl.font_size).x * 0.5);
- gl.y_off = fd->get_ascent(gl.font_size);
- sd->ascent = MAX(sd->ascent, Math::round(fd->get_advance(gl.index, gl.font_size).x * 0.5));
- sd->descent = MAX(sd->descent, Math::round(fd->get_advance(gl.index, gl.font_size).x * 0.5));
+ gl.advance = font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).y;
+ gl.x_off = -Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5);
+ gl.y_off = font_get_ascent(gl.font_rid, gl.font_size);
+ sd->ascent = MAX(sd->ascent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
+ sd->descent = MAX(sd->descent, Math::round(font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
}
}
- if (fd->get_spacing_space() && is_whitespace(sd->text[j])) {
- gl.advance += fd->get_spacing_space();
+ if (font_get_spacing(gl.font_rid, gl.font_size, TextServer::SPACING_SPACE) && is_whitespace(sd->text[j])) {
+ gl.advance += font_get_spacing(gl.font_rid, gl.font_size, TextServer::SPACING_SPACE);
} else {
- gl.advance += fd->get_spacing_glyph();
+ gl.advance += font_get_spacing(gl.font_rid, gl.font_size, TextServer::SPACING_GLYPH);
}
- sd->upos = MAX(sd->upos, fd->get_underline_position(gl.font_size));
- sd->uthk = MAX(sd->uthk, fd->get_underline_thickness(gl.font_size));
+ sd->upos = MAX(sd->upos, font_get_underline_position(gl.font_rid, gl.font_size));
+ sd->uthk = MAX(sd->uthk, font_get_underline_thickness(gl.font_rid, gl.font_size));
// Add kerning to previous glyph.
if (sd->glyphs.size() > 0) {
Glyph &prev_gl = sd->glyphs.write[sd->glyphs.size() - 1];
if (prev_gl.font_rid == gl.font_rid && prev_gl.font_size == gl.font_size) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
- prev_gl.advance += fd->get_kerning(prev_gl.index, gl.index, gl.font_size).x;
+ prev_gl.advance += font_get_kerning(gl.font_rid, gl.font_size, Vector2i(prev_gl.index, gl.index)).x;
} else {
- prev_gl.advance += fd->get_kerning(prev_gl.index, gl.index, gl.font_size).y;
+ prev_gl.advance += font_get_kerning(gl.font_rid, gl.font_size, Vector2i(prev_gl.index, gl.index)).y;
}
}
}
@@ -1424,8 +2905,8 @@ bool TextServerFallback::shaped_text_shape(RID p_shaped) {
}
// Align embedded objects to baseline.
- float full_ascent = sd->ascent;
- float full_descent = sd->descent;
+ real_t full_ascent = sd->ascent;
+ real_t full_descent = sd->descent;
for (Map<Variant, ShapedTextData::EmbeddedObject>::Element *E = sd->objects.front(); E; E = E->next()) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
switch (E->get().inline_align & INLINE_ALIGN_TEXT_MASK) {
@@ -1492,16 +2973,18 @@ bool TextServerFallback::shaped_text_shape(RID p_shaped) {
}
bool TextServerFallback::shaped_text_is_ready(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, false);
+
+ MutexLock lock(sd->mutex);
return sd->valid;
}
Vector<TextServer::Glyph> TextServerFallback::shaped_text_get_glyphs(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Vector<TextServer::Glyph>());
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
}
@@ -1509,16 +2992,18 @@ Vector<TextServer::Glyph> TextServerFallback::shaped_text_get_glyphs(RID p_shape
}
Vector2i TextServerFallback::shaped_text_get_range(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Vector2i());
+
+ MutexLock lock(sd->mutex);
return Vector2(sd->start, sd->end);
}
Vector<TextServer::Glyph> TextServerFallback::shaped_text_sort_logical(RID p_shaped) {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Vector<TextServer::Glyph>());
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
}
@@ -1527,10 +3012,11 @@ Vector<TextServer::Glyph> TextServerFallback::shaped_text_sort_logical(RID p_sha
}
Array TextServerFallback::shaped_text_get_objects(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
Array ret;
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, ret);
+
+ MutexLock lock(sd->mutex);
for (const Map<Variant, ShapedTextData::EmbeddedObject>::Element *E = sd->objects.front(); E; E = E->next()) {
ret.push_back(E->key());
}
@@ -1539,9 +3025,10 @@ Array TextServerFallback::shaped_text_get_objects(RID p_shaped) const {
}
Rect2 TextServerFallback::shaped_text_get_object_rect(RID p_shaped, Variant p_key) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Rect2());
+
+ MutexLock lock(sd->mutex);
ERR_FAIL_COND_V(!sd->objects.has(p_key), Rect2());
if (!sd->valid) {
const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
@@ -1550,9 +3037,10 @@ Rect2 TextServerFallback::shaped_text_get_object_rect(RID p_shaped, Variant p_ke
}
Size2 TextServerFallback::shaped_text_get_size(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, Size2());
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
}
@@ -1563,40 +3051,44 @@ Size2 TextServerFallback::shaped_text_get_size(RID p_shaped) const {
}
}
-float TextServerFallback::shaped_text_get_ascent(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerFallback::shaped_text_get_ascent(RID p_shaped) const {
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
}
return sd->ascent;
}
-float TextServerFallback::shaped_text_get_descent(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerFallback::shaped_text_get_descent(RID p_shaped) const {
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
}
return sd->descent;
}
-float TextServerFallback::shaped_text_get_width(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerFallback::shaped_text_get_width(RID p_shaped) const {
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
}
return sd->width;
}
-float TextServerFallback::shaped_text_get_underline_position(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerFallback::shaped_text_get_underline_position(RID p_shaped) const {
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
}
@@ -1604,10 +3096,11 @@ float TextServerFallback::shaped_text_get_underline_position(RID p_shaped) const
return sd->upos;
}
-float TextServerFallback::shaped_text_get_underline_thickness(RID p_shaped) const {
- _THREAD_SAFE_METHOD_
- const ShapedTextData *sd = shaped_owner.getornull(p_shaped);
+real_t TextServerFallback::shaped_text_get_underline_thickness(RID p_shaped) const {
+ const ShapedTextData *sd = shaped_owner.get_or_null(p_shaped);
ERR_FAIL_COND_V(!sd, 0.f);
+
+ MutexLock lock(sd->mutex);
if (!sd->valid) {
const_cast<TextServerFallback *>(this)->shaped_text_shape(p_shaped);
}
@@ -1623,3 +3116,11 @@ TextServer *TextServerFallback::create_func(Error &r_error, void *p_user_data) {
void TextServerFallback::register_server() {
TextServerManager::register_create_function(interface_name, interface_features, create_func, nullptr);
}
+
+TextServerFallback::TextServerFallback(){};
+
+TextServerFallback::~TextServerFallback() {
+ if (library != nullptr) {
+ FT_Done_FreeType(library);
+ }
+};
diff --git a/modules/text_server_fb/text_server_fb.h b/modules/text_server_fb/text_server_fb.h
index d4cab2409a..fde75e7135 100644
--- a/modules/text_server_fb/text_server_fb.h
+++ b/modules/text_server_fb/text_server_fb.h
@@ -39,22 +39,165 @@
#include "servers/text_server.h"
#include "core/templates/rid_owner.h"
-
+#include "core/templates/thread_work_pool.h"
#include "scene/resources/texture.h"
-#include "font_fb.h"
+#include "modules/modules_enabled.gen.h"
+
+#ifdef MODULE_FREETYPE_ENABLED
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_TRUETYPE_TABLES_H
+#include FT_STROKER_H
+#include FT_ADVANCES_H
+#include FT_MULTIPLE_MASTERS_H
+#include FT_BBOX_H
+#endif
class TextServerFallback : public TextServer {
GDCLASS(TextServerFallback, TextServer);
_THREAD_SAFE_CLASS_
- float oversampling = 1.f;
- mutable RID_PtrOwner<FontDataFallback> font_owner;
- mutable RID_PtrOwner<ShapedTextData> shaped_owner;
-
static String interface_name;
static uint32_t interface_features;
+ // Font cache data.
+
+#ifdef MODULE_FREETYPE_ENABLED
+ mutable FT_Library library = nullptr;
+#endif
+
+ const int rect_range = 2;
+
+ struct FontTexture {
+ Image::Format format;
+ PackedByteArray imgdata;
+ int texture_w = 0;
+ int texture_h = 0;
+ PackedInt32Array offsets;
+ Ref<ImageTexture> texture;
+ };
+
+ struct FontTexturePosition {
+ int index = 0;
+ int x = 0;
+ int y = 0;
+ };
+
+ struct FontGlyph {
+ bool found = false;
+ int texture_idx = -1;
+ Rect2 rect;
+ Rect2 uv_rect;
+ Vector2 advance;
+ };
+
+ struct FontDataForSizeFallback {
+ real_t ascent = 0.f;
+ real_t descent = 0.f;
+ real_t underline_position = 0.f;
+ real_t underline_thickness = 0.f;
+ real_t scale = 1.f;
+ real_t oversampling = 1.f;
+
+ int spacing_glyph = 0;
+ int spacing_space = 0;
+
+ Vector2i size;
+
+ Vector<FontTexture> textures;
+ HashMap<int32_t, FontGlyph> glyph_map;
+ Map<Vector2i, Vector2> kerning_map;
+
+#ifdef MODULE_FREETYPE_ENABLED
+ FT_Face face = nullptr;
+ FT_StreamRec stream;
+#endif
+
+ ~FontDataForSizeFallback() {
+#ifdef MODULE_FREETYPE_ENABLED
+ if (face != nullptr) {
+ FT_Done_Face(face);
+ }
+#endif
+ }
+ };
+
+ struct FontDataFallback {
+ Mutex mutex;
+
+ bool antialiased = true;
+ bool msdf = false;
+ int msdf_range = 14;
+ int msdf_source_size = 48;
+ int fixed_size = 0;
+ bool force_autohinter = false;
+ TextServer::Hinting hinting = TextServer::HINTING_LIGHT;
+ Dictionary variation_coordinates;
+ real_t oversampling = 0.f;
+
+ Map<Vector2i, FontDataForSizeFallback *> cache;
+
+ bool face_init = false;
+ Dictionary supported_varaitions;
+
+ // Language/script support override.
+ Map<String, bool> language_support_overrides;
+ Map<String, bool> script_support_overrides;
+
+ PackedByteArray data;
+ const uint8_t *data_ptr;
+ size_t data_size;
+
+ mutable ThreadWorkPool work_pool;
+
+ ~FontDataFallback() {
+ work_pool.finish();
+ for (const Map<Vector2i, FontDataForSizeFallback *>::Element *E = cache.front(); E; E = E->next()) {
+ memdelete(E->get());
+ }
+ cache.clear();
+ }
+ };
+
+ _FORCE_INLINE_ FontTexturePosition find_texture_pos_for_glyph(FontDataForSizeFallback *p_data, int p_color_size, Image::Format p_image_format, int p_width, int p_height) const;
+#ifdef MODULE_MSDFGEN_ENABLED
+ _FORCE_INLINE_ FontGlyph rasterize_msdf(FontDataFallback *p_font_data, FontDataForSizeFallback *p_data, int p_pixel_range, int p_rect_margin, FT_Outline *outline, const Vector2 &advance) const;
+#endif
+#ifdef MODULE_FREETYPE_ENABLED
+ _FORCE_INLINE_ FontGlyph rasterize_bitmap(FontDataForSizeFallback *p_data, int p_rect_margin, FT_Bitmap bitmap, int yofs, int xofs, const Vector2 &advance) const;
+#endif
+ _FORCE_INLINE_ bool _ensure_glyph(FontDataFallback *p_font_data, const Vector2i &p_size, int32_t p_glyph) const;
+ _FORCE_INLINE_ bool _ensure_cache_for_size(FontDataFallback *p_font_data, const Vector2i &p_size) const;
+ _FORCE_INLINE_ void _font_clear_cache(FontDataFallback *p_font_data);
+ void _generateMTSDF_threaded(uint32_t y, void *p_td) const;
+
+ _FORCE_INLINE_ Vector2i _get_size(const FontDataFallback *p_font_data, int p_size) const {
+ if (p_font_data->msdf) {
+ return Vector2i(p_font_data->msdf_source_size, 0);
+ } else if (p_font_data->fixed_size > 0) {
+ return Vector2i(p_font_data->fixed_size, 0);
+ } else {
+ return Vector2i(p_size, 0);
+ }
+ }
+
+ _FORCE_INLINE_ Vector2i _get_size_outline(const FontDataFallback *p_font_data, const Vector2i &p_size) const {
+ if (p_font_data->msdf) {
+ return Vector2i(p_font_data->msdf_source_size, 0);
+ } else if (p_font_data->fixed_size > 0) {
+ return Vector2i(p_font_data->fixed_size, MIN(p_size.y, 1));
+ } else {
+ return p_size;
+ }
+ }
+
+ // Common data.
+
+ real_t oversampling = 1.f;
+ mutable RID_PtrOwner<FontDataFallback> font_owner;
+ mutable RID_PtrOwner<ShapedTextData> shaped_owner;
+
protected:
static void _bind_methods(){};
@@ -77,72 +220,130 @@ public:
virtual bool is_locale_right_to_left(const String &p_locale) override;
+ virtual int32_t name_to_tag(const String &p_name) const override;
+ virtual String tag_to_name(int32_t p_tag) const override;
+
/* Font interface */
- virtual RID create_font_system(const String &p_name, int p_base_size = 16) override;
- virtual RID create_font_resource(const String &p_filename, int p_base_size = 16) override;
- virtual RID create_font_memory(const uint8_t *p_data, size_t p_size, const String &p_type, int p_base_size = 16) override;
- virtual RID create_font_bitmap(float p_height, float p_ascent, int p_base_size = 16) override;
+ virtual RID create_font() override;
+
+ virtual void font_set_data(RID p_font_rid, const PackedByteArray &p_data) override;
+ virtual void font_set_data_ptr(RID p_font_rid, const uint8_t *p_data_ptr, size_t p_data_size) override;
+
+ virtual void font_set_antialiased(RID p_font_rid, bool p_antialiased) override;
+ virtual bool font_is_antialiased(RID p_font_rid) const override;
+
+ virtual void font_set_multichannel_signed_distance_field(RID p_font_rid, bool p_msdf) override;
+ virtual bool font_is_multichannel_signed_distance_field(RID p_font_rid) const override;
+
+ virtual void font_set_msdf_pixel_range(RID p_font_rid, int p_msdf_pixel_range) override;
+ virtual int font_get_msdf_pixel_range(RID p_font_rid) const override;
+
+ virtual void font_set_msdf_size(RID p_font_rid, int p_msdf_size) override;
+ virtual int font_get_msdf_size(RID p_font_rid) const override;
+
+ virtual void font_set_fixed_size(RID p_font_rid, int p_fixed_size) override;
+ virtual int font_get_fixed_size(RID p_font_rid) const override;
+
+ virtual void font_set_force_autohinter(RID p_font_rid, bool p_force_autohinter) override;
+ virtual bool font_is_force_autohinter(RID p_font_rid) const override;
+
+ virtual void font_set_hinting(RID p_font_rid, TextServer::Hinting p_hinting) override;
+ virtual TextServer::Hinting font_get_hinting(RID p_font_rid) const override;
+
+ virtual void font_set_variation_coordinates(RID p_font_rid, const Dictionary &p_variation_coordinates) override;
+ virtual Dictionary font_get_variation_coordinates(RID p_font_rid) const override;
+
+ virtual void font_set_oversampling(RID p_font_rid, real_t p_oversampling) override;
+ virtual real_t font_get_oversampling(RID p_font_rid) const override;
+
+ virtual Array font_get_size_cache_list(RID p_font_rid) const override;
+ virtual void font_clear_size_cache(RID p_font_rid) override;
+ virtual void font_remove_size_cache(RID p_font_rid, const Vector2i &p_size) override;
+
+ virtual void font_set_ascent(RID p_font_rid, int p_size, real_t p_ascent) override;
+ virtual real_t font_get_ascent(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_descent(RID p_font_rid, int p_size, real_t p_descent) override;
+ virtual real_t font_get_descent(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_underline_position(RID p_font_rid, int p_size, real_t p_underline_position) override;
+ virtual real_t font_get_underline_position(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_underline_thickness(RID p_font_rid, int p_size, real_t p_underline_thickness) override;
+ virtual real_t font_get_underline_thickness(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_scale(RID p_font_rid, int p_size, real_t p_scale) override;
+ virtual real_t font_get_scale(RID p_font_rid, int p_size) const override;
+
+ virtual void font_set_spacing(RID p_font_rid, int p_size, SpacingType p_spacing, int p_value) override;
+ virtual int font_get_spacing(RID p_font_rid, int p_size, SpacingType p_spacing) const override;
+
+ virtual int font_get_texture_count(RID p_font_rid, const Vector2i &p_size) const override;
+ virtual void font_clear_textures(RID p_font_rid, const Vector2i &p_size) override;
+ virtual void font_remove_texture(RID p_font_rid, const Vector2i &p_size, int p_texture_index) override;
+
+ virtual void font_set_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const Ref<Image> &p_image) override;
+ virtual Ref<Image> font_get_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const override;
- virtual void font_bitmap_add_texture(RID p_font, const Ref<Texture> &p_texture) override;
- virtual void font_bitmap_add_char(RID p_font, char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) override;
- virtual void font_bitmap_add_kerning_pair(RID p_font, char32_t p_A, char32_t p_B, int p_kerning) override;
+ virtual void font_set_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const PackedInt32Array &p_offset) override;
+ virtual PackedInt32Array font_get_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const override;
- virtual float font_get_height(RID p_font, int p_size) const override;
- virtual float font_get_ascent(RID p_font, int p_size) const override;
- virtual float font_get_descent(RID p_font, int p_size) const override;
+ virtual Array font_get_glyph_list(RID p_font_rid, const Vector2i &p_size) const override;
+ virtual void font_clear_glyphs(RID p_font_rid, const Vector2i &p_size) override;
+ virtual void font_remove_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) override;
- virtual float font_get_underline_position(RID p_font, int p_size) const override;
- virtual float font_get_underline_thickness(RID p_font, int p_size) const override;
+ virtual Vector2 font_get_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph, const Vector2 &p_advance) override;
- virtual int font_get_spacing_space(RID p_font) const override;
- virtual void font_set_spacing_space(RID p_font, int p_value) override;
+ virtual Vector2 font_get_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_offset) override;
- virtual int font_get_spacing_glyph(RID p_font) const override;
- virtual void font_set_spacing_glyph(RID p_font, int p_value) override;
+ virtual Vector2 font_get_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_gl_size) override;
- virtual void font_set_antialiased(RID p_font, bool p_antialiased) override;
- virtual bool font_get_antialiased(RID p_font) const override;
+ virtual Rect2 font_get_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Rect2 &p_uv_rect) override;
- virtual void font_set_hinting(RID p_font, Hinting p_hinting) override;
- virtual Hinting font_get_hinting(RID p_font) const override;
+ virtual int font_get_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const override;
+ virtual void font_set_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, int p_texture_idx) override;
- virtual void font_set_force_autohinter(RID p_font, bool p_enabeld) override;
- virtual bool font_get_force_autohinter(RID p_font) const override;
+ virtual bool font_get_glyph_contours(RID p_font, int p_size, int32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const override;
- virtual bool font_has_char(RID p_font, char32_t p_char) const override;
- virtual String font_get_supported_chars(RID p_font) const override;
+ virtual Array font_get_kerning_list(RID p_font_rid, int p_size) const override;
+ virtual void font_clear_kerning_map(RID p_font_rid, int p_size) override;
+ virtual void font_remove_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) override;
- virtual void font_set_distance_field_hint(RID p_font, bool p_distance_field) override;
- virtual bool font_get_distance_field_hint(RID p_font) const override;
+ virtual void font_set_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) override;
+ virtual Vector2 font_get_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) const override;
- virtual bool font_has_outline(RID p_font) const override;
- virtual float font_get_base_size(RID p_font) const override;
+ virtual int32_t font_get_glyph_index(RID p_font_rid, int p_size, char32_t p_char, char32_t p_variation_selector = 0) const override;
- virtual bool font_is_language_supported(RID p_font, const String &p_language) const override;
- virtual void font_set_language_support_override(RID p_font, const String &p_language, bool p_supported) override;
- virtual bool font_get_language_support_override(RID p_font, const String &p_language) override;
- virtual void font_remove_language_support_override(RID p_font, const String &p_language) override;
- Vector<String> font_get_language_support_overrides(RID p_font) override;
+ virtual bool font_has_char(RID p_font_rid, char32_t p_char) const override;
+ virtual String font_get_supported_chars(RID p_font_rid) const override;
- virtual bool font_is_script_supported(RID p_font, const String &p_script) const override;
- virtual void font_set_script_support_override(RID p_font, const String &p_script, bool p_supported) override;
- virtual bool font_get_script_support_override(RID p_font, const String &p_script) override;
- virtual void font_remove_script_support_override(RID p_font, const String &p_script) override;
- Vector<String> font_get_script_support_overrides(RID p_font) override;
+ virtual void font_render_range(RID p_font, const Vector2i &p_size, char32_t p_start, char32_t p_end) override;
+ virtual void font_render_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_index) override;
- virtual uint32_t font_get_glyph_index(RID p_font, char32_t p_char, char32_t p_variation_selector = 0x0000) const override;
- virtual Vector2 font_get_glyph_advance(RID p_font, uint32_t p_index, int p_size) const override;
- virtual Vector2 font_get_glyph_kerning(RID p_font, uint32_t p_index_a, uint32_t p_index_b, int p_size) const override;
+ virtual void font_draw_glyph(RID p_font, RID p_canvas, int p_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
+ virtual void font_draw_glyph_outline(RID p_font, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
- virtual Vector2 font_draw_glyph(RID p_font, RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
- virtual Vector2 font_draw_glyph_outline(RID p_font, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color = Color(1, 1, 1)) const override;
+ virtual bool font_is_language_supported(RID p_font_rid, const String &p_language) const override;
+ virtual void font_set_language_support_override(RID p_font_rid, const String &p_language, bool p_supported) override;
+ virtual bool font_get_language_support_override(RID p_font_rid, const String &p_language) override;
+ virtual void font_remove_language_support_override(RID p_font_rid, const String &p_language) override;
+ virtual Vector<String> font_get_language_support_overrides(RID p_font_rid) override;
- virtual bool font_get_glyph_contours(RID p_font, int p_size, uint32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const override;
+ virtual bool font_is_script_supported(RID p_font_rid, const String &p_script) const override;
+ virtual void font_set_script_support_override(RID p_font_rid, const String &p_script, bool p_supported) override;
+ virtual bool font_get_script_support_override(RID p_font_rid, const String &p_script) override;
+ virtual void font_remove_script_support_override(RID p_font_rid, const String &p_script) override;
+ virtual Vector<String> font_get_script_support_overrides(RID p_font_rid) override;
- virtual float font_get_oversampling() const override;
- virtual void font_set_oversampling(float p_oversampling) override;
+ virtual Dictionary font_supported_feature_list(RID p_font_rid) const override;
+ virtual Dictionary font_supported_variation_list(RID p_font_rid) const override;
- virtual Vector<String> get_system_fonts() const override;
+ virtual real_t font_get_global_oversampling() const override;
+ virtual void font_set_global_oversampling(real_t p_oversampling) override;
/* Shaped text buffer interface */
@@ -171,14 +372,14 @@ public:
virtual RID shaped_text_substr(RID p_shaped, int p_start, int p_length) const override;
virtual RID shaped_text_get_parent(RID p_shaped) const override;
- virtual float shaped_text_fit_to_width(RID p_shaped, float p_width, uint8_t /*JustificationFlag*/ p_jst_flags = JUSTIFICATION_WORD_BOUND | JUSTIFICATION_KASHIDA) override;
- virtual float shaped_text_tab_align(RID p_shaped, const Vector<float> &p_tab_stops) override;
+ virtual real_t shaped_text_fit_to_width(RID p_shaped, real_t p_width, uint8_t /*JustificationFlag*/ p_jst_flags = JUSTIFICATION_WORD_BOUND | JUSTIFICATION_KASHIDA) override;
+ virtual real_t shaped_text_tab_align(RID p_shaped, const Vector<real_t> &p_tab_stops) override;
virtual bool shaped_text_shape(RID p_shaped) override;
virtual bool shaped_text_update_breaks(RID p_shaped) override;
virtual bool shaped_text_update_justification_ops(RID p_shaped) override;
- virtual void shaped_text_overrun_trim_to_width(RID p_shaped, float p_width, uint8_t p_trim_flags) override;
+ virtual void shaped_text_overrun_trim_to_width(RID p_shaped, real_t p_width, uint8_t p_trim_flags) override;
virtual TrimData shaped_text_get_trim_data(RID p_shaped) const override;
virtual bool shaped_text_is_ready(RID p_shaped) const override;
@@ -193,17 +394,17 @@ public:
virtual Rect2 shaped_text_get_object_rect(RID p_shaped, Variant p_key) const override;
virtual Size2 shaped_text_get_size(RID p_shaped) const override;
- virtual float shaped_text_get_ascent(RID p_shaped) const override;
- virtual float shaped_text_get_descent(RID p_shaped) const override;
- virtual float shaped_text_get_width(RID p_shaped) const override;
- virtual float shaped_text_get_underline_position(RID p_shaped) const override;
- virtual float shaped_text_get_underline_thickness(RID p_shaped) const override;
+ virtual real_t shaped_text_get_ascent(RID p_shaped) const override;
+ virtual real_t shaped_text_get_descent(RID p_shaped) const override;
+ virtual real_t shaped_text_get_width(RID p_shaped) const override;
+ virtual real_t shaped_text_get_underline_position(RID p_shaped) const override;
+ virtual real_t shaped_text_get_underline_thickness(RID p_shaped) const override;
static TextServer *create_func(Error &r_error, void *p_user_data);
static void register_server();
- TextServerFallback(){};
- ~TextServerFallback(){};
+ TextServerFallback();
+ ~TextServerFallback();
};
#endif // TEXT_SERVER_FALLBACK_H
diff --git a/modules/theora/doc_classes/VideoStreamTheora.xml b/modules/theora/doc_classes/VideoStreamTheora.xml
index e7bf9b202d..2dfcd27dff 100644
--- a/modules/theora/doc_classes/VideoStreamTheora.xml
+++ b/modules/theora/doc_classes/VideoStreamTheora.xml
@@ -24,6 +24,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/modules/vhacd/register_types.cpp b/modules/vhacd/register_types.cpp
index 2b48e94604..54240e66fc 100644
--- a/modules/vhacd/register_types.cpp
+++ b/modules/vhacd/register_types.cpp
@@ -32,48 +32,55 @@
#include "scene/resources/mesh.h"
#include "thirdparty/vhacd/public/VHACD.h"
-static Vector<Vector<Face3>> convex_decompose(const Vector<Face3> &p_faces, int p_max_convex_hulls = -1) {
- Vector<real_t> vertices;
- vertices.resize(p_faces.size() * 9);
- Vector<uint32_t> indices;
- indices.resize(p_faces.size() * 3);
-
- for (int i = 0; i < p_faces.size(); i++) {
- for (int j = 0; j < 3; j++) {
- vertices.write[i * 9 + j * 3 + 0] = p_faces[i].vertex[j].x;
- vertices.write[i * 9 + j * 3 + 1] = p_faces[i].vertex[j].y;
- vertices.write[i * 9 + j * 3 + 2] = p_faces[i].vertex[j].z;
- indices.write[i * 3 + j] = i * 3 + j;
- }
- }
-
+static Vector<Vector<Vector3>> convex_decompose(const real_t *p_vertices, int p_vertex_count, const uint32_t *p_triangles, int p_triangle_count, const Mesh::ConvexDecompositionSettings &p_settings, Vector<Vector<uint32_t>> *r_convex_indices) {
VHACD::IVHACD::Parameters params;
- if (p_max_convex_hulls > 0) {
- params.m_maxConvexHulls = p_max_convex_hulls;
- }
+ params.m_concavity = p_settings.max_concavity;
+ params.m_alpha = p_settings.symmetry_planes_clipping_bias;
+ params.m_beta = p_settings.revolution_axes_clipping_bias;
+ params.m_minVolumePerCH = p_settings.min_volume_per_convex_hull;
+ params.m_resolution = p_settings.resolution;
+ params.m_maxNumVerticesPerCH = p_settings.max_num_vertices_per_convex_hull;
+ params.m_planeDownsampling = p_settings.plane_downsampling;
+ params.m_convexhullDownsampling = p_settings.convexhull_downsampling;
+ params.m_pca = p_settings.normalize_mesh;
+ params.m_mode = p_settings.mode;
+ params.m_convexhullApproximation = p_settings.convexhull_approximation;
+ params.m_oclAcceleration = true;
+ params.m_maxConvexHulls = p_settings.max_convex_hulls;
+ params.m_projectHullVertices = p_settings.project_hull_vertices;
VHACD::IVHACD *decomposer = VHACD::CreateVHACD();
- decomposer->Compute(vertices.ptr(), vertices.size() / 3, indices.ptr(), indices.size() / 3, params);
+ decomposer->Compute(p_vertices, p_vertex_count, p_triangles, p_triangle_count, params);
int hull_count = decomposer->GetNConvexHulls();
- Vector<Vector<Face3>> ret;
+ Vector<Vector<Vector3>> ret;
+ ret.resize(hull_count);
+
+ if (r_convex_indices) {
+ r_convex_indices->resize(hull_count);
+ }
for (int i = 0; i < hull_count; i++) {
- Vector<Face3> triangles;
VHACD::IVHACD::ConvexHull hull;
decomposer->GetConvexHull(i, hull);
- triangles.resize(hull.m_nTriangles);
- for (uint32_t j = 0; j < hull.m_nTriangles; j++) {
- Face3 f;
+
+ Vector<Vector3> &points = ret.write[i];
+ points.resize(hull.m_nPoints);
+
+ Vector3 *w = points.ptrw();
+ for (uint32_t j = 0; j < hull.m_nPoints; ++j) {
for (int k = 0; k < 3; k++) {
- for (int l = 0; l < 3; l++) {
- f.vertex[k][l] = hull.m_points[hull.m_triangles[j * 3 + k] * 3 + l];
- }
+ w[j][k] = hull.m_points[j * 3 + k];
}
- triangles.write[j] = f;
}
- ret.push_back(triangles);
+
+ if (r_convex_indices) {
+ Vector<uint32_t> &indices = r_convex_indices->write[i];
+ indices.resize(hull.m_nTriangles * 3);
+
+ memcpy(indices.ptrw(), hull.m_triangles, hull.m_nTriangles * 3 * sizeof(uint32_t));
+ }
}
decomposer->Clean();
@@ -83,9 +90,9 @@ static Vector<Vector<Face3>> convex_decompose(const Vector<Face3> &p_faces, int
}
void register_vhacd_types() {
- Mesh::convex_composition_function = convex_decompose;
+ Mesh::convex_decomposition_function = convex_decompose;
}
void unregister_vhacd_types() {
- Mesh::convex_composition_function = nullptr;
+ Mesh::convex_decomposition_function = nullptr;
}
diff --git a/modules/visual_script/doc_classes/VisualScript.xml b/modules/visual_script/doc_classes/VisualScript.xml
index 2327fc0009..372d46bc10 100644
--- a/modules/visual_script/doc_classes/VisualScript.xml
+++ b/modules/visual_script/doc_classes/VisualScript.xml
@@ -354,6 +354,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
index 4d07f878a2..ed5b814bb7 100644
--- a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type" default="0">
The type to get the constant from.
@@ -18,6 +16,4 @@
The name of the constant to return.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
index 195d766c1d..942d92311b 100644
--- a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="function" type="int" setter="set_func" getter="get_func" enum="VisualScriptBuiltinFunc.BuiltinFunc" default="0">
The function to be executed.
@@ -138,81 +136,77 @@
<constant name="MATH_DB2LINEAR" value="40" enum="BuiltinFunc">
Convert the input from decibel volume to linear volume.
</constant>
- <constant name="MATH_POLAR2CARTESIAN" value="41" enum="BuiltinFunc">
- Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis).
+ <constant name="MATH_WRAP" value="41" enum="BuiltinFunc">
</constant>
- <constant name="MATH_CARTESIAN2POLAR" value="42" enum="BuiltinFunc">
- Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle).
+ <constant name="MATH_WRAPF" value="42" enum="BuiltinFunc">
</constant>
- <constant name="MATH_WRAP" value="43" enum="BuiltinFunc">
- </constant>
- <constant name="MATH_WRAPF" value="44" enum="BuiltinFunc">
- </constant>
- <constant name="LOGIC_MAX" value="45" enum="BuiltinFunc">
+ <constant name="LOGIC_MAX" value="43" enum="BuiltinFunc">
Return the greater of the two numbers, also known as their maximum.
</constant>
- <constant name="LOGIC_MIN" value="46" enum="BuiltinFunc">
+ <constant name="LOGIC_MIN" value="44" enum="BuiltinFunc">
Return the lesser of the two numbers, also known as their minimum.
</constant>
- <constant name="LOGIC_CLAMP" value="47" enum="BuiltinFunc">
+ <constant name="LOGIC_CLAMP" value="45" enum="BuiltinFunc">
Return the input clamped inside the given range, ensuring the result is never outside it. Equivalent to [code]min(max(input, range_low), range_high)[/code].
</constant>
- <constant name="LOGIC_NEAREST_PO2" value="48" enum="BuiltinFunc">
+ <constant name="LOGIC_NEAREST_PO2" value="46" enum="BuiltinFunc">
Return the nearest power of 2 to the input.
</constant>
- <constant name="OBJ_WEAKREF" value="49" enum="BuiltinFunc">
+ <constant name="OBJ_WEAKREF" value="47" enum="BuiltinFunc">
Create a [WeakRef] from the input.
</constant>
- <constant name="TYPE_CONVERT" value="50" enum="BuiltinFunc">
+ <constant name="TYPE_CONVERT" value="48" enum="BuiltinFunc">
Convert between types.
</constant>
- <constant name="TYPE_OF" value="51" enum="BuiltinFunc">
+ <constant name="TYPE_OF" value="49" enum="BuiltinFunc">
Return the type of the input as an integer. Check [enum Variant.Type] for the integers that might be returned.
</constant>
- <constant name="TYPE_EXISTS" value="52" enum="BuiltinFunc">
+ <constant name="TYPE_EXISTS" value="50" enum="BuiltinFunc">
Checks if a type is registered in the [ClassDB].
</constant>
- <constant name="TEXT_CHAR" value="53" enum="BuiltinFunc">
+ <constant name="TEXT_CHAR" value="51" enum="BuiltinFunc">
Return a character with the given ascii value.
</constant>
- <constant name="TEXT_STR" value="54" enum="BuiltinFunc">
+ <constant name="TEXT_STR" value="52" enum="BuiltinFunc">
Convert the input to a string.
</constant>
- <constant name="TEXT_PRINT" value="55" enum="BuiltinFunc">
+ <constant name="TEXT_PRINT" value="53" enum="BuiltinFunc">
Print the given string to the output window.
</constant>
- <constant name="TEXT_PRINTERR" value="56" enum="BuiltinFunc">
+ <constant name="TEXT_PRINTERR" value="54" enum="BuiltinFunc">
Print the given string to the standard error output.
</constant>
- <constant name="TEXT_PRINTRAW" value="57" enum="BuiltinFunc">
+ <constant name="TEXT_PRINTRAW" value="55" enum="BuiltinFunc">
Print the given string to the standard output, without adding a newline.
</constant>
- <constant name="VAR_TO_STR" value="58" enum="BuiltinFunc">
+ <constant name="TEXT_PRINT_VERBOSE" value="56" enum="BuiltinFunc">
+ </constant>
+ <constant name="VAR_TO_STR" value="57" enum="BuiltinFunc">
Serialize a [Variant] to a string.
</constant>
- <constant name="STR_TO_VAR" value="59" enum="BuiltinFunc">
+ <constant name="STR_TO_VAR" value="58" enum="BuiltinFunc">
Deserialize a [Variant] from a string serialized using [constant VAR_TO_STR].
</constant>
- <constant name="VAR_TO_BYTES" value="60" enum="BuiltinFunc">
+ <constant name="VAR_TO_BYTES" value="59" enum="BuiltinFunc">
Serialize a [Variant] to a [PackedByteArray].
</constant>
- <constant name="BYTES_TO_VAR" value="61" enum="BuiltinFunc">
+ <constant name="BYTES_TO_VAR" value="60" enum="BuiltinFunc">
Deserialize a [Variant] from a [PackedByteArray] serialized using [constant VAR_TO_BYTES].
</constant>
- <constant name="MATH_SMOOTHSTEP" value="62" enum="BuiltinFunc">
+ <constant name="MATH_SMOOTHSTEP" value="61" enum="BuiltinFunc">
Return a number smoothly interpolated between the first two inputs, based on the third input. Similar to [constant MATH_LERP], but interpolates faster at the beginning and slower at the end. Using Hermite interpolation formula:
[codeblock]
var t = clamp((weight - from) / (to - from), 0.0, 1.0)
return t * t * (3.0 - 2.0 * t)
[/codeblock]
</constant>
- <constant name="MATH_POSMOD" value="63" enum="BuiltinFunc">
+ <constant name="MATH_POSMOD" value="62" enum="BuiltinFunc">
</constant>
- <constant name="MATH_LERP_ANGLE" value="64" enum="BuiltinFunc">
+ <constant name="MATH_LERP_ANGLE" value="63" enum="BuiltinFunc">
</constant>
- <constant name="TEXT_ORD" value="65" enum="BuiltinFunc">
+ <constant name="TEXT_ORD" value="64" enum="BuiltinFunc">
</constant>
- <constant name="FUNC_MAX" value="66" enum="BuiltinFunc">
+ <constant name="FUNC_MAX" value="65" enum="BuiltinFunc">
Represents the size of the [enum BuiltinFunc] enum.
</constant>
</constants>
diff --git a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
index d6b96957f5..ae32500d2f 100644
--- a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
@@ -12,8 +12,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="&amp;&quot;Object&quot;">
The constant's parent class.
@@ -22,6 +20,4 @@
The constant to return. See the given class for its available constants.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptComment.xml b/modules/visual_script/doc_classes/VisualScriptComment.xml
index 02cec97b27..5024aae384 100644
--- a/modules/visual_script/doc_classes/VisualScriptComment.xml
+++ b/modules/visual_script/doc_classes/VisualScriptComment.xml
@@ -9,8 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="description" type="String" setter="set_description" getter="get_description" default="&quot;&quot;">
The text inside the comment node.
@@ -22,6 +20,4 @@
The comment node's title.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptComposeArray.xml b/modules/visual_script/doc_classes/VisualScriptComposeArray.xml
index dec182abf6..ed065759c5 100644
--- a/modules/visual_script/doc_classes/VisualScriptComposeArray.xml
+++ b/modules/visual_script/doc_classes/VisualScriptComposeArray.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptCondition.xml b/modules/visual_script/doc_classes/VisualScriptCondition.xml
index a9981c1f57..a5dd8c7c1b 100644
--- a/modules/visual_script/doc_classes/VisualScriptCondition.xml
+++ b/modules/visual_script/doc_classes/VisualScriptCondition.xml
@@ -15,8 +15,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptConstant.xml b/modules/visual_script/doc_classes/VisualScriptConstant.xml
index 69676c4bba..388c2bddde 100644
--- a/modules/visual_script/doc_classes/VisualScriptConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptConstant.xml
@@ -12,8 +12,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="type" type="int" setter="set_constant_type" getter="get_constant_type" enum="Variant.Type" default="0">
The constant's type.
@@ -22,6 +20,4 @@
The constant's value.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptConstructor.xml b/modules/visual_script/doc_classes/VisualScriptConstructor.xml
index 4743594ec3..4a3d10aa8e 100644
--- a/modules/visual_script/doc_classes/VisualScriptConstructor.xml
+++ b/modules/visual_script/doc_classes/VisualScriptConstructor.xml
@@ -32,6 +32,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
index 8aa34f8cae..2c6313c80a 100644
--- a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
@@ -9,118 +9,118 @@
<tutorials>
</tutorials>
<methods>
- <method name="_get_caption" qualifiers="virtual">
+ <method name="_get_caption" qualifiers="virtual const">
<return type="String" />
<description>
Return the node's title.
</description>
</method>
- <method name="_get_category" qualifiers="virtual">
+ <method name="_get_category" qualifiers="virtual const">
<return type="String" />
<description>
Return the node's category.
</description>
</method>
- <method name="_get_input_value_port_count" qualifiers="virtual">
+ <method name="_get_input_value_port_count" qualifiers="virtual const">
<return type="int" />
<description>
Return the count of input value ports.
</description>
</method>
- <method name="_get_input_value_port_hint" qualifiers="virtual">
+ <method name="_get_input_value_port_hint" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="input_idx" type="int" />
<description>
Return the specified input port's hint. See the [enum @GlobalScope.PropertyHint] hints.
</description>
</method>
- <method name="_get_input_value_port_hint_string" qualifiers="virtual">
+ <method name="_get_input_value_port_hint_string" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="input_idx" type="int" />
<description>
Return the specified input port's hint string.
</description>
</method>
- <method name="_get_input_value_port_name" qualifiers="virtual">
+ <method name="_get_input_value_port_name" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="input_idx" type="int" />
<description>
Return the specified input port's name.
</description>
</method>
- <method name="_get_input_value_port_type" qualifiers="virtual">
+ <method name="_get_input_value_port_type" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="input_idx" type="int" />
<description>
Return the specified input port's type. See the [enum Variant.Type] values.
</description>
</method>
- <method name="_get_output_sequence_port_count" qualifiers="virtual">
+ <method name="_get_output_sequence_port_count" qualifiers="virtual const">
<return type="int" />
<description>
Return the amount of output [b]sequence[/b] ports.
</description>
</method>
- <method name="_get_output_sequence_port_text" qualifiers="virtual">
+ <method name="_get_output_sequence_port_text" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="seq_idx" type="int" />
<description>
Return the specified [b]sequence[/b] output's name.
</description>
</method>
- <method name="_get_output_value_port_count" qualifiers="virtual">
+ <method name="_get_output_value_port_count" qualifiers="virtual const">
<return type="int" />
<description>
Return the amount of output value ports.
</description>
</method>
- <method name="_get_output_value_port_hint" qualifiers="virtual">
+ <method name="_get_output_value_port_hint" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="output_idx" type="int" />
<description>
Return the specified output port's hint. See the [enum @GlobalScope.PropertyHint] hints.
</description>
</method>
- <method name="_get_output_value_port_hint_string" qualifiers="virtual">
+ <method name="_get_output_value_port_hint_string" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="output_idx" type="int" />
<description>
Return the specified output port's hint string.
</description>
</method>
- <method name="_get_output_value_port_name" qualifiers="virtual">
+ <method name="_get_output_value_port_name" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="output_idx" type="int" />
<description>
Return the specified output port's name.
</description>
</method>
- <method name="_get_output_value_port_type" qualifiers="virtual">
+ <method name="_get_output_value_port_type" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="idx" type="int" />
+ <argument index="0" name="output_idx" type="int" />
<description>
Return the specified output port's type. See the [enum Variant.Type] values.
</description>
</method>
- <method name="_get_text" qualifiers="virtual">
+ <method name="_get_text" qualifiers="virtual const">
<return type="String" />
<description>
Return the custom node's text, which is shown right next to the input [b]sequence[/b] port (if there is none, on the place that is usually taken by it).
</description>
</method>
- <method name="_get_working_memory_size" qualifiers="virtual">
+ <method name="_get_working_memory_size" qualifiers="virtual const">
<return type="int" />
<description>
Return the size of the custom node's working memory. See [method _step] for more details.
</description>
</method>
- <method name="_has_input_sequence_port" qualifiers="virtual">
+ <method name="_has_input_sequence_port" qualifiers="virtual const">
<return type="bool" />
<description>
Return whether the custom node has an input [b]sequence[/b] port.
</description>
</method>
- <method name="_step" qualifiers="virtual">
+ <method name="_step" qualifiers="virtual const">
<return type="Variant" />
<argument index="0" name="inputs" type="Array" />
<argument index="1" name="outputs" type="Array" />
@@ -131,7 +131,7 @@
The [code]inputs[/code] array contains the values of the input ports.
[code]outputs[/code] is an array whose indices should be set to the respective outputs.
The [code]start_mode[/code] is usually [constant START_MODE_BEGIN_SEQUENCE], unless you have used the [code]STEP_*[/code] constants.
- [code]working_mem[/code] is an array which can be used to persist information between runs of the custom node.
+ [code]working_mem[/code] is an array which can be used to persist information between runs of the custom node. The size needs to be predefined using [method _get_working_memory_size].
When returning, you can mask the returned value with one of the [code]STEP_*[/code] constants.
</description>
</method>
diff --git a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
index 530c80530e..fd9a91c2a5 100644
--- a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
+++ b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="type" type="int" setter="set_deconstruct_type" getter="get_deconstruct_type" enum="Variant.Type" default="0">
The type to deconstruct.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
index df3121d093..e102e02aa9 100644
--- a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
@@ -12,13 +12,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="signal" type="StringName" setter="set_signal" getter="get_signal" default="&amp;&quot;&quot;">
The signal to emit.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml b/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
index 8b7fd3a612..468cae852f 100644
--- a/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="constant" type="String" setter="set_singleton" getter="get_singleton" default="&quot;&quot;">
The singleton's name.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptExpression.xml b/modules/visual_script/doc_classes/VisualScriptExpression.xml
index 223adbbb96..15e16a15f0 100644
--- a/modules/visual_script/doc_classes/VisualScriptExpression.xml
+++ b/modules/visual_script/doc_classes/VisualScriptExpression.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunction.xml b/modules/visual_script/doc_classes/VisualScriptFunction.xml
index 652418bd64..e0ca9eb280 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunction.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunction.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
index f0b666e57a..a98cb79106 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
The script to be used when [member call_mode] is set to [constant CALL_MODE_INSTANCE].
diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionState.xml b/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
index 18c3826df8..0d7833446d 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
@@ -32,6 +32,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml b/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
index 87fdfd4e53..c6b5b22590 100644
--- a/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
@@ -8,13 +8,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="constant" type="int" setter="set_global_constant" getter="get_global_constant" default="0">
The constant to be used.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptIndexGet.xml b/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
index b348048298..78fd17c5fc 100644
--- a/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptIndexSet.xml b/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
index d7fe7340ad..0e5e832c65 100644
--- a/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptInputAction.xml b/modules/visual_script/doc_classes/VisualScriptInputAction.xml
index d6fa111500..eb06d52314 100644
--- a/modules/visual_script/doc_classes/VisualScriptInputAction.xml
+++ b/modules/visual_script/doc_classes/VisualScriptInputAction.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="action" type="StringName" setter="set_action_name" getter="get_action_name" default="&amp;&quot;&quot;">
Name of the action.
diff --git a/modules/visual_script/doc_classes/VisualScriptIterator.xml b/modules/visual_script/doc_classes/VisualScriptIterator.xml
index 1d4ab4daa9..d8305728c6 100644
--- a/modules/visual_script/doc_classes/VisualScriptIterator.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIterator.xml
@@ -15,8 +15,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptLists.xml b/modules/visual_script/doc_classes/VisualScriptLists.xml
index d5bff1341a..373e3c7191 100644
--- a/modules/visual_script/doc_classes/VisualScriptLists.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLists.xml
@@ -74,6 +74,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
index 185f0f1ffb..29dbddcdf4 100644
--- a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
@@ -12,8 +12,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type" default="0">
The local variable's type.
@@ -22,6 +20,4 @@
The local variable's name.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
index 865f0153c9..96de8ebfdd 100644
--- a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
@@ -14,8 +14,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type" default="0">
The local variable's type.
@@ -24,6 +22,4 @@
The local variable's name.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptMathConstant.xml b/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
index 18a1f030bc..f559083c80 100644
--- a/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
@@ -12,8 +12,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="constant" type="int" setter="set_math_constant" getter="get_math_constant" enum="VisualScriptMathConstant.MathConstant" default="0">
The math constant.
diff --git a/modules/visual_script/doc_classes/VisualScriptNode.xml b/modules/visual_script/doc_classes/VisualScriptNode.xml
index 23574a5ea8..d080d9eac1 100644
--- a/modules/visual_script/doc_classes/VisualScriptNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptNode.xml
@@ -44,6 +44,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptOperator.xml b/modules/visual_script/doc_classes/VisualScriptOperator.xml
index cbbefa7f71..73d28899f6 100644
--- a/modules/visual_script/doc_classes/VisualScriptOperator.xml
+++ b/modules/visual_script/doc_classes/VisualScriptOperator.xml
@@ -12,8 +12,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="operator" type="int" setter="set_operator" getter="get_operator" enum="Variant.Operator" default="6">
The operation to be performed. See [enum Variant.Operator] for available options.
@@ -22,6 +20,4 @@
The type of the values for this operation. See [enum Variant.Type] for available options.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptPreload.xml b/modules/visual_script/doc_classes/VisualScriptPreload.xml
index e11af6c805..e3d60c77bb 100644
--- a/modules/visual_script/doc_classes/VisualScriptPreload.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPreload.xml
@@ -12,13 +12,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="resource" type="Resource" setter="set_preload" getter="get_preload">
The [Resource] to load.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
index c1bf443ea3..e9f30cb605 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
The script to be used when [member set_mode] is set to [constant CALL_MODE_INSTANCE].
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
index 75d6a63469..96261d2c5e 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="assign_op" type="int" setter="set_assign_op" getter="get_assign_op" enum="VisualScriptPropertySet.AssignOp" default="0">
The additional operation to perform when assigning. See [enum AssignOp] for options.
diff --git a/modules/visual_script/doc_classes/VisualScriptResourcePath.xml b/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
index ea891be05f..77e97a7219 100644
--- a/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
+++ b/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
@@ -6,12 +6,8 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="path" type="String" setter="set_resource_path" getter="get_resource_path" default="&quot;&quot;">
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptReturn.xml b/modules/visual_script/doc_classes/VisualScriptReturn.xml
index 502628925d..2193f45dc8 100644
--- a/modules/visual_script/doc_classes/VisualScriptReturn.xml
+++ b/modules/visual_script/doc_classes/VisualScriptReturn.xml
@@ -13,8 +13,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="return_enabled" type="bool" setter="set_enable_return_value" getter="is_return_value_enabled" default="false">
If [code]true[/code], the [code]return[/code] input port is available.
@@ -23,6 +21,4 @@
The return value's data type.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptSceneNode.xml b/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
index ffe187a00e..ac672d9b3f 100644
--- a/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
@@ -12,13 +12,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="node_path" type="NodePath" setter="set_node_path" getter="get_node_path" default="NodePath(&quot;.&quot;)">
The node's path in the scene tree.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptSceneTree.xml b/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
index 8cddd02c77..fc383593c5 100644
--- a/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
@@ -8,8 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptSelect.xml b/modules/visual_script/doc_classes/VisualScriptSelect.xml
index 1dbc066e32..d536e623f7 100644
--- a/modules/visual_script/doc_classes/VisualScriptSelect.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSelect.xml
@@ -14,13 +14,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="type" type="int" setter="set_typed" getter="get_typed" enum="Variant.Type" default="0">
The input variables' type.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptSelf.xml b/modules/visual_script/doc_classes/VisualScriptSelf.xml
index bb24f158c1..3c2bd16302 100644
--- a/modules/visual_script/doc_classes/VisualScriptSelf.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSelf.xml
@@ -12,8 +12,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptSequence.xml b/modules/visual_script/doc_classes/VisualScriptSequence.xml
index 664722574d..32dcbb9837 100644
--- a/modules/visual_script/doc_classes/VisualScriptSequence.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSequence.xml
@@ -14,13 +14,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="steps" type="int" setter="set_steps" getter="get_steps" default="1">
The number of steps in the sequence.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptSubCall.xml b/modules/visual_script/doc_classes/VisualScriptSubCall.xml
index 374e7d0f35..fdf0e24d3e 100644
--- a/modules/visual_script/doc_classes/VisualScriptSubCall.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSubCall.xml
@@ -8,15 +8,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="_subcall" qualifiers="virtual">
- <return type="Variant" />
- <argument index="0" name="arguments" type="Variant" />
- <description>
- Called by this node.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptSwitch.xml b/modules/visual_script/doc_classes/VisualScriptSwitch.xml
index 74504948f0..8e176b56f0 100644
--- a/modules/visual_script/doc_classes/VisualScriptSwitch.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSwitch.xml
@@ -17,8 +17,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
index 5dd1ad3421..ee8e2ad31e 100644
--- a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
+++ b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="base_script" type="String" setter="set_base_script" getter="get_base_script" default="&quot;&quot;">
The target script class to be converted to. If none, only the [member base_type] will be used.
@@ -18,6 +16,4 @@
The target type to be converted to.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
index df20ac53f2..e29765d616 100644
--- a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
@@ -12,13 +12,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="var_name" type="StringName" setter="set_variable" getter="get_variable" default="&amp;&quot;&quot;">
The variable's name.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
index eb8ebbe338..b2cc70d62e 100644
--- a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
@@ -13,13 +13,9 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="var_name" type="StringName" setter="set_variable" getter="get_variable" default="&amp;&quot;&quot;">
The variable's name.
</member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptWhile.xml b/modules/visual_script/doc_classes/VisualScriptWhile.xml
index f187957ad2..f090568608 100644
--- a/modules/visual_script/doc_classes/VisualScriptWhile.xml
+++ b/modules/visual_script/doc_classes/VisualScriptWhile.xml
@@ -14,8 +14,4 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptYield.xml b/modules/visual_script/doc_classes/VisualScriptYield.xml
index b04ab7b014..bb7fd8bfb5 100644
--- a/modules/visual_script/doc_classes/VisualScriptYield.xml
+++ b/modules/visual_script/doc_classes/VisualScriptYield.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="mode" type="int" setter="set_yield_mode" getter="get_yield_mode" enum="VisualScriptYield.YieldMode" default="1">
The mode to use for yielding. See [enum YieldMode] for available options.
diff --git a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
index c6c3188d08..ad6a7fb4e2 100644
--- a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
+++ b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
<member name="base_type" type="StringName" setter="set_base_type" getter="get_base_type" default="&amp;&quot;Object&quot;">
The base type to be used when [member call_mode] is set to [constant CALL_MODE_INSTANCE].
diff --git a/modules/visual_script/register_types.cpp b/modules/visual_script/register_types.cpp
index f20ef046a3..890861cf82 100644
--- a/modules/visual_script/register_types.cpp
+++ b/modules/visual_script/register_types.cpp
@@ -43,7 +43,7 @@
VisualScriptLanguage *visual_script_language = nullptr;
#ifdef TOOLS_ENABLED
-static _VisualScriptEditor *vs_editor_singleton = nullptr;
+static VisualScriptCustomNodes *vs_custom_nodes_singleton = nullptr;
#endif
void register_visual_script_types() {
@@ -114,10 +114,10 @@ void register_visual_script_types() {
#ifdef TOOLS_ENABLED
ClassDB::set_current_api(ClassDB::API_EDITOR);
- GDREGISTER_CLASS(_VisualScriptEditor);
+ GDREGISTER_CLASS(VisualScriptCustomNodes);
ClassDB::set_current_api(ClassDB::API_CORE);
- vs_editor_singleton = memnew(_VisualScriptEditor);
- Engine::get_singleton()->add_singleton(Engine::Singleton("VisualScriptEditor", _VisualScriptEditor::get_singleton()));
+ vs_custom_nodes_singleton = memnew(VisualScriptCustomNodes);
+ Engine::get_singleton()->add_singleton(Engine::Singleton("VisualScriptCustomNodes", VisualScriptCustomNodes::get_singleton()));
VisualScriptEditor::register_editor();
#endif
@@ -130,8 +130,8 @@ void unregister_visual_script_types() {
#ifdef TOOLS_ENABLED
VisualScriptEditor::free_clipboard();
- if (vs_editor_singleton) {
- memdelete(vs_editor_singleton);
+ if (vs_custom_nodes_singleton) {
+ memdelete(vs_custom_nodes_singleton);
}
#endif
if (visual_script_language) {
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 86793af77f..4d5f3420b8 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -955,7 +955,7 @@ bool VisualScript::are_subnodes_edited() const {
}
#endif
-const Vector<MultiplayerAPI::RPCConfig> VisualScript::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> VisualScript::get_rpc_methods() const {
return rpc_functions;
}
@@ -1022,11 +1022,11 @@ void VisualScript::_set_data(const Dictionary &p_data) {
if (functions[E].func_id >= 0 && nodes.has(functions[E].func_id)) {
Ref<VisualScriptFunction> vsf = nodes[functions[E].func_id].node;
if (vsf.is_valid()) {
- if (vsf->get_rpc_mode() != MultiplayerAPI::RPC_MODE_DISABLED) {
- MultiplayerAPI::RPCConfig nd;
+ if (vsf->get_rpc_mode() != Multiplayer::RPC_MODE_DISABLED) {
+ Multiplayer::RPCConfig nd;
nd.name = E;
nd.rpc_mode = vsf->get_rpc_mode();
- nd.transfer_mode = MultiplayerPeer::TRANSFER_MODE_RELIABLE; // TODO
+ nd.transfer_mode = Multiplayer::TRANSFER_MODE_RELIABLE; // TODO
if (rpc_functions.find(nd) == -1) {
rpc_functions.push_back(nd);
}
@@ -1036,7 +1036,7 @@ void VisualScript::_set_data(const Dictionary &p_data) {
}
// Sort so we are 100% that they are always the same.
- rpc_functions.sort_custom<MultiplayerAPI::SortRPCConfig>();
+ rpc_functions.sort_custom<Multiplayer::SortRPCConfig>();
}
Dictionary VisualScript::_get_data() const {
@@ -1833,7 +1833,7 @@ Ref<Script> VisualScriptInstance::get_script() const {
return script;
}
-const Vector<MultiplayerAPI::RPCConfig> VisualScriptInstance::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> VisualScriptInstance::get_rpc_methods() const {
return script->get_rpc_methods();
}
@@ -1845,26 +1845,6 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o
max_input_args = 0;
max_output_args = 0;
- if (Object::cast_to<Node>(p_owner)) {
- // Turn on these if they exist and base is a node.
- Node *node = Object::cast_to<Node>(p_owner);
- if (p_script->functions.has("_process")) {
- node->set_process(true);
- }
- if (p_script->functions.has("_physics_process")) {
- node->set_physics_process(true);
- }
- if (p_script->functions.has("_input")) {
- node->set_process_input(true);
- }
- if (p_script->functions.has("_unhandled_input")) {
- node->set_process_unhandled_input(true);
- }
- if (p_script->functions.has("_unhandled_key_input")) {
- node->set_process_unhandled_key_input(true);
- }
- }
-
// Setup variables.
{
List<StringName> keys;
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index 932ebeb27f..39cef8f68b 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -234,7 +234,7 @@ private:
HashMap<StringName, Function> functions;
HashMap<StringName, Variable> variables;
Map<StringName, Vector<Argument>> custom_signals;
- Vector<MultiplayerAPI::RPCConfig> rpc_functions;
+ Vector<Multiplayer::RPCConfig> rpc_functions;
Map<Object *, VisualScriptInstance *> instances;
@@ -362,7 +362,7 @@ public:
virtual int get_member_line(const StringName &p_member) const override;
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const override;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override;
#ifdef TOOLS_ENABLED
virtual bool are_subnodes_edited() const;
@@ -443,7 +443,7 @@ public:
virtual ScriptLanguage *get_language();
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const;
VisualScriptInstance();
~VisualScriptInstance();
diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp
index c61c3ae272..7e01031128 100644
--- a/modules/visual_script/visual_script_builtin_funcs.cpp
+++ b/modules/visual_script/visual_script_builtin_funcs.cpp
@@ -79,8 +79,6 @@ const char *VisualScriptBuiltinFunc::func_name[VisualScriptBuiltinFunc::FUNC_MAX
"rad2deg",
"linear2db",
"db2linear",
- "polar2cartesian",
- "cartesian2polar",
"wrapi",
"wrapf",
"max",
@@ -96,6 +94,7 @@ const char *VisualScriptBuiltinFunc::func_name[VisualScriptBuiltinFunc::FUNC_MAX
"print",
"printerr",
"printraw",
+ "print_verbose",
"var2str",
"str2var",
"var2bytes",
@@ -131,6 +130,7 @@ bool VisualScriptBuiltinFunc::has_input_sequence_port() const {
case TEXT_PRINT:
case TEXT_PRINTERR:
case TEXT_PRINTRAW:
+ case TEXT_PRINT_VERBOSE:
case MATH_SEED:
return true;
default:
@@ -179,6 +179,7 @@ int VisualScriptBuiltinFunc::get_func_argument_count(BuiltinFunc p_func) {
case TEXT_PRINT:
case TEXT_PRINTERR:
case TEXT_PRINTRAW:
+ case TEXT_PRINT_VERBOSE:
case VAR_TO_STR:
case STR_TO_VAR:
case TYPE_EXISTS:
@@ -194,8 +195,6 @@ int VisualScriptBuiltinFunc::get_func_argument_count(BuiltinFunc p_func) {
case MATH_SNAPPED:
case MATH_RANDF_RANGE:
case MATH_RANDI_RANGE:
- case MATH_POLAR2CARTESIAN:
- case MATH_CARTESIAN2POLAR:
case LOGIC_MAX:
case LOGIC_MIN:
case TYPE_CONVERT:
@@ -227,6 +226,7 @@ int VisualScriptBuiltinFunc::get_output_value_port_count() const {
case TEXT_PRINT:
case TEXT_PRINTERR:
case TEXT_PRINTRAW:
+ case TEXT_PRINT_VERBOSE:
case MATH_SEED:
return 0;
case MATH_RANDSEED:
@@ -381,20 +381,6 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
case MATH_DB2LINEAR: {
return PropertyInfo(Variant::FLOAT, "db");
} break;
- case MATH_POLAR2CARTESIAN: {
- if (p_idx == 0) {
- return PropertyInfo(Variant::FLOAT, "r");
- } else {
- return PropertyInfo(Variant::FLOAT, "th");
- }
- } break;
- case MATH_CARTESIAN2POLAR: {
- if (p_idx == 0) {
- return PropertyInfo(Variant::FLOAT, "x");
- } else {
- return PropertyInfo(Variant::FLOAT, "y");
- }
- } break;
case MATH_WRAP: {
if (p_idx == 0) {
return PropertyInfo(Variant::INT, "value");
@@ -442,7 +428,8 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
case TEXT_STR:
case TEXT_PRINT:
case TEXT_PRINTERR:
- case TEXT_PRINTRAW: {
+ case TEXT_PRINTRAW:
+ case TEXT_PRINT_VERBOSE: {
return PropertyInfo(Variant::NIL, "value");
} break;
case STR_TO_VAR: {
@@ -553,10 +540,6 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
case MATH_DB2LINEAR: {
t = Variant::FLOAT;
} break;
- case MATH_POLAR2CARTESIAN:
- case MATH_CARTESIAN2POLAR: {
- t = Variant::VECTOR2;
- } break;
case MATH_WRAP: {
t = Variant::INT;
} break;
@@ -594,6 +577,8 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
} break;
case TEXT_PRINTRAW: {
} break;
+ case TEXT_PRINT_VERBOSE: {
+ } break;
case VAR_TO_STR: {
t = Variant::STRING;
} break;
@@ -874,20 +859,6 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
VALIDATE_ARG_NUM(0);
*r_return = Math::db2linear((double)*p_inputs[0]);
} break;
- case VisualScriptBuiltinFunc::MATH_POLAR2CARTESIAN: {
- VALIDATE_ARG_NUM(0);
- VALIDATE_ARG_NUM(1);
- double r = *p_inputs[0];
- double th = *p_inputs[1];
- *r_return = Vector2(r * Math::cos(th), r * Math::sin(th));
- } break;
- case VisualScriptBuiltinFunc::MATH_CARTESIAN2POLAR: {
- VALIDATE_ARG_NUM(0);
- VALIDATE_ARG_NUM(1);
- double x = *p_inputs[0];
- double y = *p_inputs[1];
- *r_return = Vector2(Math::sqrt(x * x + y * y), Math::atan2(y, x));
- } break;
case VisualScriptBuiltinFunc::MATH_WRAP: {
VALIDATE_ARG_NUM(0);
VALIDATE_ARG_NUM(1);
@@ -1056,6 +1027,10 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
OS::get_singleton()->print("%s", str.utf8().get_data());
} break;
+ case VisualScriptBuiltinFunc::TEXT_PRINT_VERBOSE: {
+ String str = *p_inputs[0];
+ print_verbose(str);
+ } break;
case VisualScriptBuiltinFunc::VAR_TO_STR: {
String vars;
VariantWriter::write_to_string(*p_inputs[0], vars);
@@ -1229,8 +1204,6 @@ void VisualScriptBuiltinFunc::_bind_methods() {
BIND_ENUM_CONSTANT(MATH_RAD2DEG);
BIND_ENUM_CONSTANT(MATH_LINEAR2DB);
BIND_ENUM_CONSTANT(MATH_DB2LINEAR);
- BIND_ENUM_CONSTANT(MATH_POLAR2CARTESIAN);
- BIND_ENUM_CONSTANT(MATH_CARTESIAN2POLAR);
BIND_ENUM_CONSTANT(MATH_WRAP);
BIND_ENUM_CONSTANT(MATH_WRAPF);
BIND_ENUM_CONSTANT(LOGIC_MAX);
@@ -1246,6 +1219,7 @@ void VisualScriptBuiltinFunc::_bind_methods() {
BIND_ENUM_CONSTANT(TEXT_PRINT);
BIND_ENUM_CONSTANT(TEXT_PRINTERR);
BIND_ENUM_CONSTANT(TEXT_PRINTRAW);
+ BIND_ENUM_CONSTANT(TEXT_PRINT_VERBOSE);
BIND_ENUM_CONSTANT(VAR_TO_STR);
BIND_ENUM_CONSTANT(STR_TO_VAR);
BIND_ENUM_CONSTANT(VAR_TO_BYTES);
@@ -1320,8 +1294,6 @@ void register_visual_script_builtin_func_node() {
VisualScriptLanguage::singleton->add_register_func("functions/built_in/rad2deg", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_RAD2DEG>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/linear2db", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_LINEAR2DB>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/db2linear", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_DB2LINEAR>);
- VisualScriptLanguage::singleton->add_register_func("functions/built_in/polar2cartesian", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_POLAR2CARTESIAN>);
- VisualScriptLanguage::singleton->add_register_func("functions/built_in/cartesian2polar", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_CARTESIAN2POLAR>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/wrapi", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_WRAP>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/wrapf", create_builtin_func_node<VisualScriptBuiltinFunc::MATH_WRAPF>);
@@ -1340,6 +1312,7 @@ void register_visual_script_builtin_func_node() {
VisualScriptLanguage::singleton->add_register_func("functions/built_in/print", create_builtin_func_node<VisualScriptBuiltinFunc::TEXT_PRINT>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/printerr", create_builtin_func_node<VisualScriptBuiltinFunc::TEXT_PRINTERR>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/printraw", create_builtin_func_node<VisualScriptBuiltinFunc::TEXT_PRINTRAW>);
+ VisualScriptLanguage::singleton->add_register_func("functions/built_in/print_verbose", create_builtin_func_node<VisualScriptBuiltinFunc::TEXT_PRINT_VERBOSE>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/var2str", create_builtin_func_node<VisualScriptBuiltinFunc::VAR_TO_STR>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/str2var", create_builtin_func_node<VisualScriptBuiltinFunc::STR_TO_VAR>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/var2bytes", create_builtin_func_node<VisualScriptBuiltinFunc::VAR_TO_BYTES>);
diff --git a/modules/visual_script/visual_script_builtin_funcs.h b/modules/visual_script/visual_script_builtin_funcs.h
index f59a7a0f0c..f9eb7e983f 100644
--- a/modules/visual_script/visual_script_builtin_funcs.h
+++ b/modules/visual_script/visual_script_builtin_funcs.h
@@ -79,8 +79,6 @@ public:
MATH_RAD2DEG,
MATH_LINEAR2DB,
MATH_DB2LINEAR,
- MATH_POLAR2CARTESIAN,
- MATH_CARTESIAN2POLAR,
MATH_WRAP,
MATH_WRAPF,
LOGIC_MAX,
@@ -96,6 +94,7 @@ public:
TEXT_PRINT,
TEXT_PRINTERR,
TEXT_PRINTRAW,
+ TEXT_PRINT_VERBOSE,
VAR_TO_STR,
STR_TO_VAR,
VAR_TO_BYTES,
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index f3b6d74b7d..0a6bcedf31 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -1816,7 +1816,7 @@ void VisualScriptEditor::_generic_search(String p_base_type, Vector2 pos, bool n
}
}
-void VisualScriptEditor::_input(const Ref<InputEvent> &p_event) {
+void VisualScriptEditor::input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
// GUI input for VS Editor Plugin
@@ -2546,16 +2546,11 @@ void VisualScriptEditor::goto_line(int p_line, bool p_with_error) {
error_line = p_line;
}
- List<StringName> functions;
- script->get_function_list(&functions);
- for (const StringName &E : functions) {
- if (script->has_node(p_line)) {
- _update_graph();
- _update_members();
+ if (script->has_node(p_line)) {
+ _update_graph();
+ _update_members();
- call_deferred(SNAME("call_deferred"), "_center_on_node", E, p_line); //editor might be just created and size might not exist yet
- return;
- }
+ call_deferred(SNAME("call_deferred"), "_center_on_node", p_line); // The editor might be just created and size might not exist yet.
}
}
@@ -3592,6 +3587,11 @@ void VisualScriptEditor::_hide_timer() {
hint_text->hide();
}
+void VisualScriptEditor::_toggle_scripts_pressed() {
+ ScriptEditor::get_singleton()->toggle_scripts_panel();
+ update_toggle_scripts_button();
+}
+
void VisualScriptEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
@@ -3606,6 +3606,8 @@ void VisualScriptEditor::_notification(int p_what) {
return;
}
+ update_toggle_scripts_button();
+
edit_variable_edit->add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
edit_signal_edit->add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
func_input_scroll->add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
@@ -3650,6 +3652,7 @@ void VisualScriptEditor::_notification(int p_what) {
}
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
+ update_toggle_scripts_button();
members_section->set_visible(is_visible_in_tree());
} break;
}
@@ -4232,6 +4235,15 @@ void VisualScriptEditor::add_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_h
void VisualScriptEditor::set_syntax_highlighter(Ref<EditorSyntaxHighlighter> p_highlighter) {
}
+void VisualScriptEditor::update_toggle_scripts_button() {
+ if (is_layout_rtl()) {
+ toggle_scripts_button->set_icon(Control::get_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Forward") : SNAME("Back"), SNAME("EditorIcons")));
+ } else {
+ toggle_scripts_button->set_icon(Control::get_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Back") : SNAME("Forward"), SNAME("EditorIcons")));
+ }
+ toggle_scripts_button->set_tooltip(vformat("%s (%s)", TTR("Toggle Scripts Panel"), ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text()));
+}
+
void VisualScriptEditor::_bind_methods() {
ClassDB::bind_method("_move_node", &VisualScriptEditor::_move_node);
ClassDB::bind_method("_update_graph", &VisualScriptEditor::_update_graph, DEFVAL(-1));
@@ -4246,8 +4258,6 @@ void VisualScriptEditor::_bind_methods() {
ClassDB::bind_method("_can_drop_data_fw", &VisualScriptEditor::can_drop_data_fw);
ClassDB::bind_method("_drop_data_fw", &VisualScriptEditor::drop_data_fw);
- ClassDB::bind_method("_input", &VisualScriptEditor::_input);
-
ClassDB::bind_method("_update_graph_connections", &VisualScriptEditor::_update_graph_connections);
ClassDB::bind_method("_update_members", &VisualScriptEditor::_update_members);
@@ -4335,6 +4345,16 @@ VisualScriptEditor::VisualScriptEditor() {
graph->hide();
graph->connect("scroll_offset_changed", callable_mp(this, &VisualScriptEditor::_graph_ofs_changed));
+ status_bar = memnew(HBoxContainer);
+ add_child(status_bar);
+ status_bar->set_h_size_flags(SIZE_EXPAND_FILL);
+ status_bar->set_custom_minimum_size(Size2(0, 24 * EDSCALE));
+
+ toggle_scripts_button = memnew(Button);
+ toggle_scripts_button->set_flat(true);
+ toggle_scripts_button->connect("pressed", callable_mp(this, &VisualScriptEditor::_toggle_scripts_pressed));
+ status_bar->add_child(toggle_scripts_button);
+
/// Add Buttons to Top Bar/Zoom bar.
HBoxContainer *graph_hbc = graph->get_zoom_hbox();
@@ -4521,44 +4541,47 @@ void VisualScriptEditor::register_editor() {
EditorNode::add_plugin_init_callback(register_editor_callback);
}
-Ref<VisualScriptNode> _VisualScriptEditor::create_node_custom(const String &p_name) {
+void VisualScriptEditor::validate() {
+}
+
+// VisualScriptCustomNodes
+
+Ref<VisualScriptNode> VisualScriptCustomNodes::create_node_custom(const String &p_name) {
Ref<VisualScriptCustomNode> node;
node.instantiate();
node->set_script(singleton->custom_nodes[p_name]);
return node;
}
-_VisualScriptEditor *_VisualScriptEditor::singleton = nullptr;
-Map<String, REF> _VisualScriptEditor::custom_nodes;
+VisualScriptCustomNodes *VisualScriptCustomNodes::singleton = nullptr;
+Map<String, REF> VisualScriptCustomNodes::custom_nodes;
-_VisualScriptEditor::_VisualScriptEditor() {
+VisualScriptCustomNodes::VisualScriptCustomNodes() {
singleton = this;
}
-_VisualScriptEditor::~_VisualScriptEditor() {
+VisualScriptCustomNodes::~VisualScriptCustomNodes() {
custom_nodes.clear();
}
-void _VisualScriptEditor::add_custom_node(const String &p_name, const String &p_category, const Ref<Script> &p_script) {
+void VisualScriptCustomNodes::add_custom_node(const String &p_name, const String &p_category, const Ref<Script> &p_script) {
String node_name = "custom/" + p_category + "/" + p_name;
custom_nodes.insert(node_name, p_script);
- VisualScriptLanguage::singleton->add_register_func(node_name, &_VisualScriptEditor::create_node_custom);
+ VisualScriptLanguage::singleton->add_register_func(node_name, &VisualScriptCustomNodes::create_node_custom);
emit_signal(SNAME("custom_nodes_updated"));
}
-void _VisualScriptEditor::remove_custom_node(const String &p_name, const String &p_category) {
+void VisualScriptCustomNodes::remove_custom_node(const String &p_name, const String &p_category) {
String node_name = "custom/" + p_category + "/" + p_name;
custom_nodes.erase(node_name);
VisualScriptLanguage::singleton->remove_register_func(node_name);
emit_signal(SNAME("custom_nodes_updated"));
}
-void _VisualScriptEditor::_bind_methods() {
- ClassDB::bind_method(D_METHOD("add_custom_node", "name", "category", "script"), &_VisualScriptEditor::add_custom_node);
- ClassDB::bind_method(D_METHOD("remove_custom_node", "name", "category"), &_VisualScriptEditor::remove_custom_node);
+void VisualScriptCustomNodes::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("add_custom_node", "name", "category", "script"), &VisualScriptCustomNodes::add_custom_node);
+ ClassDB::bind_method(D_METHOD("remove_custom_node", "name", "category"), &VisualScriptCustomNodes::remove_custom_node);
ADD_SIGNAL(MethodInfo("custom_nodes_updated"));
}
-void VisualScriptEditor::validate() {
-}
#endif
diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h
index 962ea380aa..19f5aabac9 100644
--- a/modules/visual_script/visual_script_editor.h
+++ b/modules/visual_script/visual_script_editor.h
@@ -43,13 +43,14 @@ class VisualScriptEditorVariableEdit;
#ifdef TOOLS_ENABLED
+// TODO: Maybe this class should be refactored.
+// See https://github.com/godotengine/godot/issues/51913
class VisualScriptEditor : public ScriptEditorBase {
GDCLASS(VisualScriptEditor, ScriptEditorBase);
enum {
TYPE_SEQUENCE = 1000,
INDEX_BASE_SEQUENCE = 1024
-
};
enum {
@@ -71,7 +72,6 @@ class VisualScriptEditor : public ScriptEditorBase {
enum MemberAction {
MEMBER_EDIT,
MEMBER_REMOVE
-
};
enum MemberType {
@@ -93,6 +93,8 @@ class VisualScriptEditor : public ScriptEditorBase {
ConfirmationDialog *function_create_dialog;
GraphEdit *graph;
+ HBoxContainer *status_bar;
+ Button *toggle_scripts_button;
VisualScriptEditorSignalEdit *signal_editor;
@@ -236,7 +238,7 @@ class VisualScriptEditor : public ScriptEditorBase {
void _generic_search(String p_base_type = "", Vector2 pos = Vector2(), bool node_centered = false);
- void _input(const Ref<InputEvent> &p_event);
+ virtual void input(const Ref<InputEvent> &p_event) override;
void _graph_gui_input(const Ref<InputEvent> &p_event);
void _members_gui_input(const Ref<InputEvent> &p_event);
void _fn_name_box_input(const Ref<InputEvent> &p_event);
@@ -281,6 +283,8 @@ class VisualScriptEditor : public ScriptEditorBase {
void _member_rmb_selected(const Vector2 &p_pos);
void _member_option(int p_option);
+ void _toggle_scripts_pressed();
+
protected:
void _notification(int p_what);
static void _bind_methods();
@@ -311,6 +315,8 @@ public:
virtual void tag_saved_version() override;
virtual void reload(bool p_soft) override;
virtual Array get_breakpoints() override;
+ virtual void set_breakpoint(int p_line, bool p_enable) override{};
+ virtual void clear_breakpoints() override{};
virtual void add_callback(const String &p_function, PackedStringArray p_args) override;
virtual void update_settings() override;
virtual bool show_members_overview() override;
@@ -328,32 +334,35 @@ public:
static void free_clipboard();
+ void update_toggle_scripts_button() override;
+
VisualScriptEditor();
~VisualScriptEditor();
};
// Singleton
-class _VisualScriptEditor : public Object {
- GDCLASS(_VisualScriptEditor, Object);
+class VisualScriptCustomNodes : public Object {
+ GDCLASS(VisualScriptCustomNodes, Object);
friend class VisualScriptLanguage;
protected:
static void _bind_methods();
- static _VisualScriptEditor *singleton;
+ static VisualScriptCustomNodes *singleton;
static Map<String, REF> custom_nodes;
static Ref<VisualScriptNode> create_node_custom(const String &p_name);
public:
- static _VisualScriptEditor *get_singleton() { return singleton; }
+ static VisualScriptCustomNodes *get_singleton() { return singleton; }
void add_custom_node(const String &p_name, const String &p_category, const Ref<Script> &p_script);
void remove_custom_node(const String &p_name, const String &p_category);
- _VisualScriptEditor();
- ~_VisualScriptEditor();
+ VisualScriptCustomNodes();
+ ~VisualScriptCustomNodes();
};
+
#endif
#endif // VISUALSCRIPT_EDITOR_H
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index 6ba5ad4fd6..205918a5f0 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -1010,7 +1010,7 @@ PropertyInfo VisualScriptPropertySet::get_input_value_port_info(int p_idx) const
if (index != StringName()) {
detail_prop_name += "." + String(index);
}
- PropertyInfo pinfo = PropertyInfo(E.type, detail_prop_name, PROPERTY_HINT_TYPE_STRING, E.hint_string);
+ PropertyInfo pinfo = PropertyInfo(E.type, detail_prop_name, E.hint, E.hint_string);
_adjust_input_index(pinfo);
return pinfo;
}
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index c517d89aa5..ef77c0cef3 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -90,7 +90,7 @@ bool VisualScriptFunction::_set(const StringName &p_name, const Variant &p_value
}
if (p_name == "rpc/mode") {
- rpc_mode = MultiplayerAPI::RPCMode(int(p_value));
+ rpc_mode = Multiplayer::RPCMode(int(p_value));
return true;
}
@@ -163,7 +163,7 @@ void VisualScriptFunction::_get_property_list(List<PropertyInfo> *p_list) const
p_list->push_back(PropertyInfo(Variant::INT, "stack/size", PROPERTY_HINT_RANGE, "1,100000"));
}
p_list->push_back(PropertyInfo(Variant::BOOL, "stack/stackless"));
- p_list->push_back(PropertyInfo(Variant::INT, "rpc/mode", PROPERTY_HINT_ENUM, "Disabled,Remote,Master,Puppet,Remote Sync,Master Sync,Puppet Sync"));
+ p_list->push_back(PropertyInfo(Variant::INT, "rpc/mode", PROPERTY_HINT_ENUM, "Disabled,Any,Authority"));
}
int VisualScriptFunction::get_output_sequence_port_count() const {
@@ -261,11 +261,11 @@ int VisualScriptFunction::get_argument_count() const {
return arguments.size();
}
-void VisualScriptFunction::set_rpc_mode(MultiplayerAPI::RPCMode p_mode) {
+void VisualScriptFunction::set_rpc_mode(Multiplayer::RPCMode p_mode) {
rpc_mode = p_mode;
}
-MultiplayerAPI::RPCMode VisualScriptFunction::get_rpc_mode() const {
+Multiplayer::RPCMode VisualScriptFunction::get_rpc_mode() const {
return rpc_mode;
}
@@ -311,14 +311,14 @@ void VisualScriptFunction::reset_state() {
stack_size = 256;
stack_less = false;
sequenced = true;
- rpc_mode = MultiplayerAPI::RPC_MODE_DISABLED;
+ rpc_mode = Multiplayer::RPC_MODE_DISABLED;
}
VisualScriptFunction::VisualScriptFunction() {
stack_size = 256;
stack_less = false;
sequenced = true;
- rpc_mode = MultiplayerAPI::RPC_MODE_DISABLED;
+ rpc_mode = Multiplayer::RPC_MODE_DISABLED;
}
void VisualScriptFunction::set_stack_less(bool p_enable) {
@@ -2825,36 +2825,41 @@ VisualScriptSelf::VisualScriptSelf() {
//////////////////////////////////////////
int VisualScriptCustomNode::get_output_sequence_port_count() const {
- if (get_script_instance() && get_script_instance()->has_method("_get_output_sequence_port_count")) {
- return get_script_instance()->call("_get_output_sequence_port_count");
+ int ret;
+ if (GDVIRTUAL_CALL(_get_output_sequence_port_count, ret)) {
+ return ret;
}
return 0;
}
bool VisualScriptCustomNode::has_input_sequence_port() const {
- if (get_script_instance() && get_script_instance()->has_method("_has_input_sequence_port")) {
- return get_script_instance()->call("_has_input_sequence_port");
+ bool ret;
+ if (GDVIRTUAL_CALL(_has_input_sequence_port, ret)) {
+ return ret;
}
return false;
}
int VisualScriptCustomNode::get_input_value_port_count() const {
- if (get_script_instance() && get_script_instance()->has_method("_get_input_value_port_count")) {
- return get_script_instance()->call("_get_input_value_port_count");
+ int ret;
+ if (GDVIRTUAL_CALL(_get_input_value_port_count, ret)) {
+ return ret;
}
return 0;
}
int VisualScriptCustomNode::get_output_value_port_count() const {
- if (get_script_instance() && get_script_instance()->has_method("_get_output_value_port_count")) {
- return get_script_instance()->call("_get_output_value_port_count");
+ int ret;
+ if (GDVIRTUAL_CALL(_get_output_value_port_count, ret)) {
+ return ret;
}
return 0;
}
String VisualScriptCustomNode::get_output_sequence_port_text(int p_port) const {
- if (get_script_instance() && get_script_instance()->has_method("_get_output_sequence_port_text")) {
- return get_script_instance()->call("_get_output_sequence_port_text", p_port);
+ String ret;
+ if (GDVIRTUAL_CALL(_get_output_sequence_port_text, p_port, ret)) {
+ return ret;
}
return String();
@@ -2862,34 +2867,61 @@ String VisualScriptCustomNode::get_output_sequence_port_text(int p_port) const {
PropertyInfo VisualScriptCustomNode::get_input_value_port_info(int p_idx) const {
PropertyInfo info;
- if (get_script_instance() && get_script_instance()->has_method("_get_input_value_port_type")) {
- info.type = Variant::Type(int(get_script_instance()->call("_get_input_value_port_type", p_idx)));
+ {
+ int type;
+ if (GDVIRTUAL_CALL(_get_input_value_port_type, p_idx, type)) {
+ info.type = Variant::Type(type);
+ }
}
- if (get_script_instance() && get_script_instance()->has_method("_get_input_value_port_name")) {
- info.name = get_script_instance()->call("_get_input_value_port_name", p_idx);
+ {
+ String name;
+ if (GDVIRTUAL_CALL(_get_input_value_port_name, p_idx, name)) {
+ info.name = name;
+ }
}
- if (get_script_instance() && get_script_instance()->has_method("_get_input_value_port_hint")) {
- info.hint = PropertyHint(int(get_script_instance()->call("_get_input_value_port_hint", p_idx)));
+ {
+ int hint;
+ if (GDVIRTUAL_CALL(_get_input_value_port_hint, p_idx, hint)) {
+ info.hint = PropertyHint(hint);
+ }
}
- if (get_script_instance() && get_script_instance()->has_method("_get_input_value_port_hint_string")) {
- info.hint_string = get_script_instance()->call("_get_input_value_port_hint_string", p_idx);
+
+ {
+ String hint_string;
+ if (GDVIRTUAL_CALL(_get_input_value_port_hint_string, p_idx, hint_string)) {
+ info.hint_string = hint_string;
+ }
}
+
return info;
}
PropertyInfo VisualScriptCustomNode::get_output_value_port_info(int p_idx) const {
PropertyInfo info;
- if (get_script_instance() && get_script_instance()->has_method("_get_output_value_port_type")) {
- info.type = Variant::Type(int(get_script_instance()->call("_get_output_value_port_type", p_idx)));
+ {
+ int type;
+ if (GDVIRTUAL_CALL(_get_output_value_port_type, p_idx, type)) {
+ info.type = Variant::Type(type);
+ }
}
- if (get_script_instance() && get_script_instance()->has_method("_get_output_value_port_name")) {
- info.name = get_script_instance()->call("_get_output_value_port_name", p_idx);
+ {
+ String name;
+ if (GDVIRTUAL_CALL(_get_output_value_port_name, p_idx, name)) {
+ info.name = name;
+ }
}
- if (get_script_instance() && get_script_instance()->has_method("_get_output_value_port_hint")) {
- info.hint = PropertyHint(int(get_script_instance()->call("_get_output_value_port_hint", p_idx)));
+ {
+ int hint;
+ if (GDVIRTUAL_CALL(_get_output_value_port_hint, p_idx, hint)) {
+ info.hint = PropertyHint(hint);
+ }
}
- if (get_script_instance() && get_script_instance()->has_method("_get_output_value_port_hint_string")) {
- info.hint_string = get_script_instance()->call("_get_output_value_port_hint_string", p_idx);
+
+ {
+ String hint_string;
+ if (GDVIRTUAL_CALL(_get_output_value_port_hint_string, p_idx, hint_string)) {
+ info.hint_string = hint_string;
+ }
}
return info;
}
@@ -2911,22 +2943,25 @@ VisualScriptCustomNode::TypeGuess VisualScriptCustomNode::guess_output_type(Type
}
String VisualScriptCustomNode::get_caption() const {
- if (get_script_instance() && get_script_instance()->has_method("_get_caption")) {
- return get_script_instance()->call("_get_caption");
+ String ret;
+ if (GDVIRTUAL_CALL(_get_caption, ret)) {
+ return ret;
}
return "CustomNode";
}
String VisualScriptCustomNode::get_text() const {
- if (get_script_instance() && get_script_instance()->has_method("_get_text")) {
- return get_script_instance()->call("_get_text");
+ String ret;
+ if (GDVIRTUAL_CALL(_get_text, ret)) {
+ return ret;
}
return "";
}
String VisualScriptCustomNode::get_category() const {
- if (get_script_instance() && get_script_instance()->has_method("_get_category")) {
- return get_script_instance()->call("_get_category");
+ String ret;
+ if (GDVIRTUAL_CALL(_get_category, ret)) {
+ return ret;
}
return "Custom";
}
@@ -2941,14 +2976,7 @@ public:
virtual int get_working_memory_size() const { return work_mem_size; }
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) {
- if (node->get_script_instance()) {
-#ifdef DEBUG_ENABLED
- if (!node->get_script_instance()->has_method(VisualScriptLanguage::singleton->_step)) {
- r_error_str = RTR("Custom node has no _step() method, can't process graph.");
- r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
- return 0;
- }
-#endif
+ if (GDVIRTUAL_IS_OVERRIDDEN_PTR(node, _step)) {
Array in_values;
Array out_values;
Array work_mem;
@@ -2969,7 +2997,8 @@ public:
int ret_out;
- Variant ret = node->get_script_instance()->call(VisualScriptLanguage::singleton->_step, in_values, out_values, p_start_mode, work_mem);
+ Variant ret;
+ GDVIRTUAL_CALL_PTR(node, _step, in_values, out_values, p_start_mode, work_mem, ret);
if (ret.get_type() == Variant::STRING) {
r_error_str = ret;
r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
@@ -2995,6 +3024,9 @@ public:
}
return ret_out;
+ } else {
+ r_error_str = RTR("Custom node has no _step() method, can't process graph.");
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
}
return 0;
@@ -3008,11 +3040,8 @@ VisualScriptNodeInstance *VisualScriptCustomNode::instantiate(VisualScriptInstan
instance->in_count = get_input_value_port_count();
instance->out_count = get_output_value_port_count();
- if (get_script_instance() && get_script_instance()->has_method("_get_working_memory_size")) {
- instance->work_mem_size = get_script_instance()->call("_get_working_memory_size");
- } else {
- instance->work_mem_size = 0;
- }
+ instance->work_mem_size = 0;
+ GDVIRTUAL_CALL(_get_working_memory_size, instance->work_mem_size);
return instance;
}
@@ -3022,32 +3051,29 @@ void VisualScriptCustomNode::_script_changed() {
}
void VisualScriptCustomNode::_bind_methods() {
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_output_sequence_port_count"));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_has_input_sequence_port"));
-
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_output_sequence_port_text", PropertyInfo(Variant::INT, "idx")));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_input_value_port_count"));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_output_value_port_count"));
+ GDVIRTUAL_BIND(_get_output_sequence_port_count);
+ GDVIRTUAL_BIND(_has_input_sequence_port);
+ GDVIRTUAL_BIND(_get_output_sequence_port_text, "seq_idx");
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_input_value_port_type", PropertyInfo(Variant::INT, "idx")));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_input_value_port_name", PropertyInfo(Variant::INT, "idx")));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_input_value_port_hint", PropertyInfo(Variant::INT, "idx")));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_input_value_port_hint_string", PropertyInfo(Variant::INT, "idx")));
+ GDVIRTUAL_BIND(_get_input_value_port_count);
+ GDVIRTUAL_BIND(_get_input_value_port_type, "input_idx");
+ GDVIRTUAL_BIND(_get_input_value_port_name, "input_idx");
+ GDVIRTUAL_BIND(_get_input_value_port_hint, "input_idx");
+ GDVIRTUAL_BIND(_get_input_value_port_hint_string, "input_idx");
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_output_value_port_type", PropertyInfo(Variant::INT, "idx")));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_output_value_port_name", PropertyInfo(Variant::INT, "idx")));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_output_value_port_hint", PropertyInfo(Variant::INT, "idx")));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_output_value_port_hint_string", PropertyInfo(Variant::INT, "idx")));
+ GDVIRTUAL_BIND(_get_output_value_port_count);
+ GDVIRTUAL_BIND(_get_output_value_port_type, "output_idx");
+ GDVIRTUAL_BIND(_get_output_value_port_name, "output_idx");
+ GDVIRTUAL_BIND(_get_output_value_port_hint, "output_idx");
+ GDVIRTUAL_BIND(_get_output_value_port_hint_string, "output_idx");
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_caption"));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_text"));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_category"));
+ GDVIRTUAL_BIND(_get_caption);
+ GDVIRTUAL_BIND(_get_text);
+ GDVIRTUAL_BIND(_get_category);
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_working_memory_size"));
+ GDVIRTUAL_BIND(_get_working_memory_size);
- MethodInfo stepmi(Variant::NIL, "_step", PropertyInfo(Variant::ARRAY, "inputs"), PropertyInfo(Variant::ARRAY, "outputs"), PropertyInfo(Variant::INT, "start_mode"), PropertyInfo(Variant::ARRAY, "working_mem"));
- stepmi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
- BIND_VMETHOD(stepmi);
+ GDVIRTUAL_BIND(_step, "inputs", "outputs", "start_mode", "working_mem");
BIND_ENUM_CONSTANT(START_MODE_BEGIN_SEQUENCE);
BIND_ENUM_CONSTANT(START_MODE_CONTINUE_SEQUENCE);
@@ -3170,9 +3196,7 @@ VisualScriptNodeInstance *VisualScriptSubCall::instantiate(VisualScriptInstance
}
void VisualScriptSubCall::_bind_methods() {
- MethodInfo scmi(Variant::NIL, "_subcall", PropertyInfo(Variant::NIL, "arguments"));
- scmi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
- BIND_VMETHOD(scmi);
+ // Since this is script only, registering virtual function is no longer valid. Will have to go in docs.
}
VisualScriptSubCall::VisualScriptSubCall() {
diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h
index 2390e5c7bc..bf2d8e9683 100644
--- a/modules/visual_script/visual_script_nodes.h
+++ b/modules/visual_script/visual_script_nodes.h
@@ -31,6 +31,8 @@
#ifndef VISUAL_SCRIPT_NODES_H
#define VISUAL_SCRIPT_NODES_H
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
#include "visual_script.h"
class VisualScriptFunction : public VisualScriptNode {
@@ -47,7 +49,7 @@ class VisualScriptFunction : public VisualScriptNode {
bool stack_less;
int stack_size;
- MultiplayerAPI::RPCMode rpc_mode;
+ Multiplayer::RPCMode rpc_mode;
bool sequenced;
protected:
@@ -94,8 +96,8 @@ public:
void set_return_type(Variant::Type p_type);
Variant::Type get_return_type() const;
- void set_rpc_mode(MultiplayerAPI::RPCMode p_mode);
- MultiplayerAPI::RPCMode get_rpc_mode() const;
+ void set_rpc_mode(Multiplayer::RPCMode p_mode);
+ Multiplayer::RPCMode get_rpc_mode() const;
virtual VisualScriptNodeInstance *instantiate(VisualScriptInstance *p_instance) override;
@@ -757,6 +759,30 @@ class VisualScriptCustomNode : public VisualScriptNode {
protected:
static void _bind_methods();
+ friend class VisualScriptNodeInstanceCustomNode;
+ GDVIRTUAL0RC(int, _get_output_sequence_port_count)
+ GDVIRTUAL0RC(bool, _has_input_sequence_port)
+ GDVIRTUAL1RC(String, _get_output_sequence_port_text, int)
+
+ GDVIRTUAL0RC(int, _get_input_value_port_count)
+ GDVIRTUAL1RC(int, _get_input_value_port_type, int)
+ GDVIRTUAL1RC(String, _get_input_value_port_name, int)
+ GDVIRTUAL1RC(int, _get_input_value_port_hint, int)
+ GDVIRTUAL1RC(String, _get_input_value_port_hint_string, int)
+
+ GDVIRTUAL0RC(int, _get_output_value_port_count)
+ GDVIRTUAL1RC(int, _get_output_value_port_type, int)
+ GDVIRTUAL1RC(String, _get_output_value_port_name, int)
+ GDVIRTUAL1RC(int, _get_output_value_port_hint, int)
+ GDVIRTUAL1RC(String, _get_output_value_port_hint_string, int)
+
+ GDVIRTUAL0RC(String, _get_caption)
+ GDVIRTUAL0RC(String, _get_text)
+ GDVIRTUAL0RC(String, _get_category)
+
+ GDVIRTUAL0RC(int, _get_working_memory_size)
+
+ GDVIRTUAL4RC(Variant, _step, Array, Array, int, Array)
public:
enum StartMode { //replicated for step
diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp
index bacb1947be..d8b88d6cd3 100644
--- a/modules/visual_script/visual_script_property_selector.cpp
+++ b/modules/visual_script/visual_script_property_selector.cpp
@@ -55,7 +55,7 @@ void VisualScriptPropertySelector::_sbox_input(const Ref<InputEvent> &p_ie) {
case KEY_DOWN:
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
- search_options->call("_gui_input", k);
+ search_options->gui_input(k);
search_box->accept_event();
TreeItem *root = search_options->get_root();
diff --git a/modules/vorbis/SCsub b/modules/vorbis/SCsub
index bc31fff066..322314487f 100644
--- a/modules/vorbis/SCsub
+++ b/modules/vorbis/SCsub
@@ -3,9 +3,6 @@
Import("env")
Import("env_modules")
-# Only kept to build the thirdparty library used by the theora and webm
-# modules. We now use stb_vorbis for AudioStreamOGGVorbis.
-
env_vorbis = env_modules.Clone()
# Thirdparty source files
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp
new file mode 100644
index 0000000000..e4a80c339f
--- /dev/null
+++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp
@@ -0,0 +1,435 @@
+/*************************************************************************/
+/* audio_stream_ogg_vorbis.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "audio_stream_ogg_vorbis.h"
+
+#include "core/io/file_access.h"
+#include "core/variant/typed_array.h"
+#include "thirdparty/libogg/ogg/ogg.h"
+
+int AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_frames) {
+ ERR_FAIL_COND_V(!ready, 0);
+ ERR_FAIL_COND_V(!active, 0);
+
+ int todo = p_frames;
+
+ int start_buffer = 0;
+
+ int frames_mixed_this_step = p_frames;
+
+ while (todo && active) {
+ AudioFrame *buffer = p_buffer;
+ if (start_buffer > 0) {
+ buffer = buffer + start_buffer;
+ }
+ int mixed = _mix_frames_vorbis(buffer, todo);
+ if (mixed < 0) {
+ return 0;
+ }
+ todo -= mixed;
+ frames_mixed += mixed;
+ start_buffer += mixed;
+ if (!have_packets_left) {
+ //end of file!
+ bool is_not_empty = mixed > 0 || vorbis_stream->get_length() > 0;
+ if (vorbis_stream->loop && is_not_empty) {
+ //loop
+
+ seek(vorbis_stream->loop_offset);
+ loops++;
+ // we still have buffer to fill, start from this element in the next iteration.
+ start_buffer = p_frames - todo;
+ } else {
+ frames_mixed_this_step = p_frames - todo;
+ for (int i = p_frames - todo; i < p_frames; i++) {
+ p_buffer[i] = AudioFrame(0, 0);
+ }
+ active = false;
+ todo = 0;
+ }
+ }
+ }
+ return frames_mixed_this_step;
+}
+
+int AudioStreamPlaybackOGGVorbis::_mix_frames_vorbis(AudioFrame *p_buffer, int p_frames) {
+ ERR_FAIL_COND_V(!ready, 0);
+ if (!have_samples_left) {
+ ogg_packet *packet = nullptr;
+ int err;
+
+ if (!vorbis_data_playback->next_ogg_packet(&packet)) {
+ have_packets_left = false;
+ WARN_PRINT("ran out of packets in stream");
+ return -1;
+ }
+
+ ERR_FAIL_COND_V_MSG((err = vorbis_synthesis(&block, packet)), 0, "Error during vorbis synthesis " + itos(err));
+ ERR_FAIL_COND_V_MSG((err = vorbis_synthesis_blockin(&dsp_state, &block)), 0, "Error during vorbis block processing " + itos(err));
+
+ have_packets_left = !packet->e_o_s;
+ }
+
+ float **pcm; // Accessed with pcm[channel_idx][sample_idx].
+
+ int frames = vorbis_synthesis_pcmout(&dsp_state, &pcm);
+ if (frames > p_frames) {
+ frames = p_frames;
+ have_samples_left = true;
+ } else {
+ have_samples_left = false;
+ }
+
+ if (info.channels > 1) {
+ for (int frame = 0; frame < frames; frame++) {
+ p_buffer[frame].l = pcm[0][frame];
+ p_buffer[frame].r = pcm[0][frame];
+ }
+ } else {
+ for (int frame = 0; frame < frames; frame++) {
+ p_buffer[frame].l = pcm[0][frame];
+ p_buffer[frame].r = pcm[0][frame];
+ }
+ }
+ vorbis_synthesis_read(&dsp_state, frames);
+ return frames;
+}
+
+float AudioStreamPlaybackOGGVorbis::get_stream_sampling_rate() {
+ return vorbis_data->get_sampling_rate();
+}
+
+bool AudioStreamPlaybackOGGVorbis::_alloc_vorbis() {
+ vorbis_info_init(&info);
+ info_is_allocated = true;
+ vorbis_comment_init(&comment);
+ comment_is_allocated = true;
+
+ ERR_FAIL_COND_V(vorbis_data.is_null(), false);
+ vorbis_data_playback = vorbis_data->instance_playback();
+
+ ogg_packet *packet;
+ int err;
+
+ for (int i = 0; i < 3; i++) {
+ if (!vorbis_data_playback->next_ogg_packet(&packet)) {
+ WARN_PRINT("Not enough packets to parse header");
+ return false;
+ }
+
+ err = vorbis_synthesis_headerin(&info, &comment, packet);
+ ERR_FAIL_COND_V_MSG(err != 0, false, "Error parsing header");
+ }
+
+ err = vorbis_synthesis_init(&dsp_state, &info);
+ ERR_FAIL_COND_V_MSG(err != 0, false, "Error initializing dsp state");
+ dsp_state_is_allocated = true;
+
+ err = vorbis_block_init(&dsp_state, &block);
+ ERR_FAIL_COND_V_MSG(err != 0, false, "Error initializing block");
+ block_is_allocated = true;
+
+ ready = true;
+
+ return true;
+}
+
+void AudioStreamPlaybackOGGVorbis::start(float p_from_pos) {
+ ERR_FAIL_COND(!ready);
+ active = true;
+ seek(p_from_pos);
+ loops = 0;
+ _begin_resample();
+}
+
+void AudioStreamPlaybackOGGVorbis::stop() {
+ active = false;
+}
+
+bool AudioStreamPlaybackOGGVorbis::is_playing() const {
+ return active;
+}
+
+int AudioStreamPlaybackOGGVorbis::get_loop_count() const {
+ return loops;
+}
+
+float AudioStreamPlaybackOGGVorbis::get_playback_position() const {
+ return float(frames_mixed) / vorbis_data->get_sampling_rate();
+}
+
+void AudioStreamPlaybackOGGVorbis::seek(float p_time) {
+ ERR_FAIL_COND(!ready);
+ ERR_FAIL_COND(vorbis_stream.is_null());
+ if (!active) {
+ return;
+ }
+
+ vorbis_synthesis_restart(&dsp_state);
+
+ if (p_time >= vorbis_stream->get_length()) {
+ p_time = 0;
+ }
+ frames_mixed = uint32_t(vorbis_data->get_sampling_rate() * p_time);
+
+ const int64_t desired_sample = p_time * get_stream_sampling_rate();
+
+ if (!vorbis_data_playback->seek_page(desired_sample)) {
+ WARN_PRINT("seek failed");
+ return;
+ }
+
+ ogg_packet *packet;
+ if (!vorbis_data_playback->next_ogg_packet(&packet)) {
+ WARN_PRINT_ONCE("seeking beyond limits");
+ return;
+ }
+
+ // The granule position of the page we're seeking through.
+ int64_t granule_pos = 0;
+
+ int headers_remaining = 0;
+ int samples_in_page = 0;
+ int err;
+ while (true) {
+ if (vorbis_synthesis_idheader(packet)) {
+ headers_remaining = 3;
+ }
+ if (!headers_remaining) {
+ ERR_FAIL_COND_MSG((err = vorbis_synthesis(&block, packet)), "Error during vorbis synthesis " + itos(err));
+ ERR_FAIL_COND_MSG((err = vorbis_synthesis_blockin(&dsp_state, &block)), "Error during vorbis block processing " + itos(err));
+
+ int samples_out = vorbis_synthesis_pcmout(&dsp_state, nullptr);
+ ERR_FAIL_COND_MSG((err = vorbis_synthesis_read(&dsp_state, samples_out)), "Error during vorbis read updating " + itos(err));
+
+ samples_in_page += samples_out;
+
+ } else {
+ headers_remaining--;
+ }
+ if (packet->granulepos != -1 && headers_remaining == 0) {
+ // This indicates the end of the page.
+ granule_pos = packet->granulepos;
+ break;
+ }
+ if (packet->e_o_s) {
+ break;
+ }
+ if (!vorbis_data_playback->next_ogg_packet(&packet)) {
+ // We should get an e_o_s flag before this happens.
+ WARN_PRINT("Vorbis file ended without warning.");
+ break;
+ }
+ }
+
+ int64_t samples_to_burn = samples_in_page - (granule_pos - desired_sample);
+
+ if (samples_to_burn > samples_in_page) {
+ WARN_PRINT("Burning more samples than we have in this page. Check seek algorithm.");
+ } else if (samples_to_burn < 0) {
+ WARN_PRINT("Burning negative samples doesn't make sense. Check seek algorithm.");
+ }
+
+ // Seek again, this time we'll burn a specific number of samples instead of all of them.
+ if (!vorbis_data_playback->seek_page(desired_sample)) {
+ WARN_PRINT("seek failed");
+ return;
+ }
+
+ if (!vorbis_data_playback->next_ogg_packet(&packet)) {
+ WARN_PRINT_ONCE("seeking beyond limits");
+ return;
+ }
+ vorbis_synthesis_restart(&dsp_state);
+
+ while (true) {
+ if (vorbis_synthesis_idheader(packet)) {
+ headers_remaining = 3;
+ }
+ if (!headers_remaining) {
+ ERR_FAIL_COND_MSG((err = vorbis_synthesis(&block, packet)), "Error during vorbis synthesis " + itos(err));
+ ERR_FAIL_COND_MSG((err = vorbis_synthesis_blockin(&dsp_state, &block)), "Error during vorbis block processing " + itos(err));
+
+ int samples_out = vorbis_synthesis_pcmout(&dsp_state, nullptr);
+ int read_samples = samples_to_burn > samples_out ? samples_out : samples_to_burn;
+ ERR_FAIL_COND_MSG((err = vorbis_synthesis_read(&dsp_state, samples_out)), "Error during vorbis read updating " + itos(err));
+ samples_to_burn -= read_samples;
+
+ if (samples_to_burn <= 0) {
+ break;
+ }
+ } else {
+ headers_remaining--;
+ }
+ if (packet->granulepos != -1 && headers_remaining == 0) {
+ // This indicates the end of the page.
+ break;
+ }
+ if (packet->e_o_s) {
+ break;
+ }
+ if (!vorbis_data_playback->next_ogg_packet(&packet)) {
+ // We should get an e_o_s flag before this happens.
+ WARN_PRINT("Vorbis file ended without warning.");
+ break;
+ }
+ }
+}
+
+AudioStreamPlaybackOGGVorbis::~AudioStreamPlaybackOGGVorbis() {
+ if (block_is_allocated) {
+ vorbis_block_clear(&block);
+ }
+ if (dsp_state_is_allocated) {
+ vorbis_dsp_clear(&dsp_state);
+ }
+ if (comment_is_allocated) {
+ vorbis_comment_clear(&comment);
+ }
+ if (info_is_allocated) {
+ vorbis_info_clear(&info);
+ }
+}
+
+Ref<AudioStreamPlayback> AudioStreamOGGVorbis::instance_playback() {
+ Ref<AudioStreamPlaybackOGGVorbis> ovs;
+
+ ERR_FAIL_COND_V(packet_sequence.is_null(), nullptr);
+
+ ovs.instantiate();
+ ovs->vorbis_stream = Ref<AudioStreamOGGVorbis>(this);
+ ovs->vorbis_data = packet_sequence;
+ ovs->frames_mixed = 0;
+ ovs->active = false;
+ ovs->loops = 0;
+ if (ovs->_alloc_vorbis()) {
+ return ovs;
+ }
+ // Failed to allocate data structures.
+ return nullptr;
+}
+
+String AudioStreamOGGVorbis::get_stream_name() const {
+ return ""; //return stream_name;
+}
+
+void AudioStreamOGGVorbis::maybe_update_info() {
+ ERR_FAIL_COND(packet_sequence.is_null());
+
+ vorbis_info info;
+ vorbis_comment comment;
+ int err;
+
+ vorbis_info_init(&info);
+ vorbis_comment_init(&comment);
+
+ int packet_count = 0;
+ Ref<OGGPacketSequencePlayback> packet_sequence_playback = packet_sequence->instance_playback();
+
+ for (int i = 0; i < 3; i++) {
+ ogg_packet *packet;
+ if (!packet_sequence_playback->next_ogg_packet(&packet)) {
+ WARN_PRINT("Failed to get header packet");
+ break;
+ }
+ if (i == 0) {
+ packet->b_o_s = 1;
+ }
+
+ if (i == 0) {
+ ERR_FAIL_COND(!vorbis_synthesis_idheader(packet));
+ }
+
+ err = vorbis_synthesis_headerin(&info, &comment, packet);
+ ERR_FAIL_COND_MSG(err != 0, "Error parsing header packet " + itos(i) + ": " + itos(err));
+
+ packet_count++;
+ }
+
+ packet_sequence->set_sampling_rate(info.rate);
+
+ vorbis_comment_clear(&comment);
+ vorbis_info_clear(&info);
+}
+
+void AudioStreamOGGVorbis::set_packet_sequence(Ref<OGGPacketSequence> p_packet_sequence) {
+ packet_sequence = p_packet_sequence;
+ if (packet_sequence.is_valid()) {
+ maybe_update_info();
+ }
+}
+
+Ref<OGGPacketSequence> AudioStreamOGGVorbis::get_packet_sequence() const {
+ return packet_sequence;
+}
+
+void AudioStreamOGGVorbis::set_loop(bool p_enable) {
+ loop = p_enable;
+}
+
+bool AudioStreamOGGVorbis::has_loop() const {
+ return loop;
+}
+
+void AudioStreamOGGVorbis::set_loop_offset(float p_seconds) {
+ loop_offset = p_seconds;
+}
+
+float AudioStreamOGGVorbis::get_loop_offset() const {
+ return loop_offset;
+}
+
+float AudioStreamOGGVorbis::get_length() const {
+ ERR_FAIL_COND_V(packet_sequence.is_null(), 0);
+ return packet_sequence->get_length();
+}
+
+bool AudioStreamOGGVorbis::is_monophonic() const {
+ return false;
+}
+
+void AudioStreamOGGVorbis::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_packet_sequence", "packet_sequence"), &AudioStreamOGGVorbis::set_packet_sequence);
+ ClassDB::bind_method(D_METHOD("get_packet_sequence"), &AudioStreamOGGVorbis::get_packet_sequence);
+
+ ClassDB::bind_method(D_METHOD("set_loop", "enable"), &AudioStreamOGGVorbis::set_loop);
+ ClassDB::bind_method(D_METHOD("has_loop"), &AudioStreamOGGVorbis::has_loop);
+
+ ClassDB::bind_method(D_METHOD("set_loop_offset", "seconds"), &AudioStreamOGGVorbis::set_loop_offset);
+ ClassDB::bind_method(D_METHOD("get_loop_offset"), &AudioStreamOGGVorbis::get_loop_offset);
+
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "packet_sequence", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_packet_sequence", "get_packet_sequence");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "loop"), "set_loop", "has_loop");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "loop_offset"), "set_loop_offset", "get_loop_offset");
+}
+
+AudioStreamOGGVorbis::AudioStreamOGGVorbis() {}
+
+AudioStreamOGGVorbis::~AudioStreamOGGVorbis() {}
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h
index 2bd70a2722..59a1318a6b 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/vorbis/audio_stream_ogg_vorbis.h
@@ -28,31 +28,51 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef AUDIO_STREAM_STB_VORBIS_H
-#define AUDIO_STREAM_STB_VORBIS_H
+#ifndef AUDIO_STREAM_LIBVORBIS_H
+#define AUDIO_STREAM_LIBVORBIS_H
-#include "core/io/resource_loader.h"
+#include "core/variant/variant.h"
+#include "modules/ogg/ogg_packet_sequence.h"
#include "servers/audio/audio_stream.h"
-
-#include "thirdparty/misc/stb_vorbis.h"
+#include "thirdparty/libvorbis/vorbis/codec.h"
class AudioStreamOGGVorbis;
class AudioStreamPlaybackOGGVorbis : public AudioStreamPlaybackResampled {
GDCLASS(AudioStreamPlaybackOGGVorbis, AudioStreamPlaybackResampled);
- stb_vorbis *ogg_stream = nullptr;
- stb_vorbis_alloc ogg_alloc;
uint32_t frames_mixed = 0;
bool active = false;
int loops = 0;
+ vorbis_info info;
+ vorbis_comment comment;
+ vorbis_dsp_state dsp_state;
+ vorbis_block block;
+
+ bool info_is_allocated = false;
+ bool comment_is_allocated = false;
+ bool dsp_state_is_allocated = false;
+ bool block_is_allocated = false;
+
+ bool ready = false;
+
+ bool have_samples_left = false;
+ bool have_packets_left = false;
+
friend class AudioStreamOGGVorbis;
+ Ref<OGGPacketSequence> vorbis_data;
+ Ref<OGGPacketSequencePlayback> vorbis_data_playback;
Ref<AudioStreamOGGVorbis> vorbis_stream;
+ int _mix_frames_vorbis(AudioFrame *p_buffer, int p_frames);
+
+ // Allocates vorbis data structures. Returns true upon success, false on failure.
+ bool _alloc_vorbis();
+
protected:
- virtual void _mix_internal(AudioFrame *p_buffer, int p_frames) override;
+ virtual int _mix_internal(AudioFrame *p_buffer, int p_frames) override;
virtual float get_stream_sampling_rate() override;
public:
@@ -72,20 +92,20 @@ public:
class AudioStreamOGGVorbis : public AudioStream {
GDCLASS(AudioStreamOGGVorbis, AudioStream);
OBJ_SAVE_TYPE(AudioStream); // Saves derived classes with common type so they can be interchanged.
- RES_BASE_EXTENSION("oggstr");
+ RES_BASE_EXTENSION("oggvorbisstr");
friend class AudioStreamPlaybackOGGVorbis;
- void *data = nullptr;
- uint32_t data_len = 0;
-
- int decode_mem_size = 0;
- float sample_rate = 1.0;
int channels = 1;
float length = 0.0;
bool loop = false;
float loop_offset = 0.0;
- void clear_data();
+
+ // Performs a seek to the beginning of the stream, should not be called during playback!
+ // Also causes allocation and deallocation.
+ void maybe_update_info();
+
+ Ref<OGGPacketSequence> packet_sequence;
protected:
static void _bind_methods();
@@ -100,13 +120,15 @@ public:
virtual Ref<AudioStreamPlayback> instance_playback() override;
virtual String get_stream_name() const override;
- void set_data(const Vector<uint8_t> &p_data);
- Vector<uint8_t> get_data() const;
+ void set_packet_sequence(Ref<OGGPacketSequence> p_packet_sequence);
+ Ref<OGGPacketSequence> get_packet_sequence() const;
virtual float get_length() const override; //if supported, otherwise return 0
+ virtual bool is_monophonic() const override;
+
AudioStreamOGGVorbis();
virtual ~AudioStreamOGGVorbis();
};
-#endif
+#endif // AUDIO_STREAM_LIBVORBIS_H
diff --git a/modules/vorbis/config.py b/modules/vorbis/config.py
index 8a384e3066..978eccb29f 100644
--- a/modules/vorbis/config.py
+++ b/modules/vorbis/config.py
@@ -4,3 +4,14 @@ def can_build(env, platform):
def configure(env):
pass
+
+
+def get_doc_classes():
+ return [
+ "AudioStreamOGGVorbis",
+ "AudioStreamPlaybackOGGVorbis",
+ ]
+
+
+def get_doc_path():
+ return "doc_classes"
diff --git a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml b/modules/vorbis/doc_classes/AudioStreamOGGVorbis.xml
index 94fdff5d43..4cd278fe83 100644
--- a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
+++ b/modules/vorbis/doc_classes/AudioStreamOGGVorbis.xml
@@ -1,26 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamOGGVorbis" inherits="AudioStream" version="4.0">
<brief_description>
- OGG Vorbis audio stream driver.
</brief_description>
<description>
- OGG Vorbis audio stream driver.
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
<members>
- <member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray()">
- Contains the audio data in bytes.
- </member>
<member name="loop" type="bool" setter="set_loop" getter="has_loop" default="false">
If [code]true[/code], the stream will automatically loop when it reaches the end.
</member>
<member name="loop_offset" type="float" setter="set_loop_offset" getter="get_loop_offset" default="0.0">
Time in seconds at which the stream starts after being looped.
</member>
+ <member name="packet_sequence" type="OGGPacketSequence" setter="set_packet_sequence" getter="get_packet_sequence">
+ Contains the raw OGG data for this stream.
+ </member>
</members>
- <constants>
- </constants>
</class>
diff --git a/modules/gdnative/doc_classes/PacketPeerGDNative.xml b/modules/vorbis/doc_classes/AudioStreamPlaybackOGGVorbis.xml
index ea9869cc58..05c70d88da 100644
--- a/modules/gdnative/doc_classes/PacketPeerGDNative.xml
+++ b/modules/vorbis/doc_classes/AudioStreamPlaybackOGGVorbis.xml
@@ -1,13 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeerGDNative" inherits="PacketPeer" version="4.0">
+<class name="AudioStreamPlaybackOGGVorbis" inherits="AudioStreamPlaybackResampled" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
</class>
diff --git a/modules/vorbis/register_types.cpp b/modules/vorbis/register_types.cpp
index d3e77ea629..de3f41afdd 100644
--- a/modules/vorbis/register_types.cpp
+++ b/modules/vorbis/register_types.cpp
@@ -30,8 +30,19 @@
#include "register_types.h"
-// Dummy module as libvorbis is needed by other modules (theora ...)
+#include "audio_stream_ogg_vorbis.h"
+#include "resource_importer_ogg_vorbis.h"
-void register_vorbis_types() {}
+void register_vorbis_types() {
+#ifdef TOOLS_ENABLED
+ if (Engine::get_singleton()->is_editor_hint()) {
+ Ref<ResourceImporterOGGVorbis> ogg_vorbis_importer;
+ ogg_vorbis_importer.instantiate();
+ ResourceFormatImporter::get_singleton()->add_importer(ogg_vorbis_importer);
+ }
+#endif
+ GDREGISTER_CLASS(AudioStreamOGGVorbis);
+ GDREGISTER_CLASS(AudioStreamPlaybackOGGVorbis);
+}
void unregister_vorbis_types() {}
diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp b/modules/vorbis/resource_importer_ogg_vorbis.cpp
index 85de698efd..33ee6cf359 100644
--- a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
+++ b/modules/vorbis/resource_importer_ogg_vorbis.cpp
@@ -30,16 +30,19 @@
#include "resource_importer_ogg_vorbis.h"
+#include "audio_stream_ogg_vorbis.h"
#include "core/io/file_access.h"
#include "core/io/resource_saver.h"
#include "scene/resources/texture.h"
+#include "thirdparty/libogg/ogg/ogg.h"
+#include "thirdparty/libvorbis/vorbis/codec.h"
String ResourceImporterOGGVorbis::get_importer_name() const {
- return "ogg_vorbis";
+ return "oggvorbisstr";
}
String ResourceImporterOGGVorbis::get_visible_name() const {
- return "OGGVorbis";
+ return "oggvorbisstr";
}
void ResourceImporterOGGVorbis::get_recognized_extensions(List<String> *p_extensions) const {
@@ -47,7 +50,7 @@ void ResourceImporterOGGVorbis::get_recognized_extensions(List<String> *p_extens
}
String ResourceImporterOGGVorbis::get_save_extension() const {
- return "oggstr";
+ return "oggvorbisstr";
}
String ResourceImporterOGGVorbis::get_resource_type() const {
@@ -81,23 +84,106 @@ Error ResourceImporterOGGVorbis::import(const String &p_source_file, const Strin
uint64_t len = f->get_length();
- Vector<uint8_t> data;
- data.resize(len);
- uint8_t *w = data.ptrw();
+ Vector<uint8_t> file_data;
+ file_data.resize(len);
+ uint8_t *w = file_data.ptrw();
f->get_buffer(w, len);
memdelete(f);
- Ref<AudioStreamOGGVorbis> ogg_stream;
- ogg_stream.instantiate();
-
- ogg_stream->set_data(data);
- ERR_FAIL_COND_V(!ogg_stream->get_data().size(), ERR_FILE_CORRUPT);
- ogg_stream->set_loop(loop);
- ogg_stream->set_loop_offset(loop_offset);
-
- return ResourceSaver::save(p_save_path + ".oggstr", ogg_stream);
+ Ref<AudioStreamOGGVorbis> ogg_vorbis_stream;
+ ogg_vorbis_stream.instantiate();
+
+ Ref<OGGPacketSequence> ogg_packet_sequence;
+ ogg_packet_sequence.instantiate();
+
+ ogg_stream_state stream_state;
+ ogg_sync_state sync_state;
+ ogg_page page;
+ ogg_packet packet;
+ bool initialized_stream = false;
+
+ ogg_sync_init(&sync_state);
+ int err;
+ size_t cursor = 0;
+ size_t packet_count = 0;
+ bool done = false;
+ while (!done) {
+ ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Error::ERR_INVALID_DATA, "Ogg sync error " + itos(err));
+ while (ogg_sync_pageout(&sync_state, &page) != 1) {
+ if (cursor >= len) {
+ done = true;
+ break;
+ }
+ ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Error::ERR_INVALID_DATA, "Ogg sync error " + itos(err));
+ char *sync_buf = ogg_sync_buffer(&sync_state, OGG_SYNC_BUFFER_SIZE);
+ ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Error::ERR_INVALID_DATA, "Ogg sync error " + itos(err));
+ ERR_FAIL_COND_V(cursor > len, Error::ERR_INVALID_DATA);
+ size_t copy_size = len - cursor;
+ if (copy_size > OGG_SYNC_BUFFER_SIZE) {
+ copy_size = OGG_SYNC_BUFFER_SIZE;
+ }
+ memcpy(sync_buf, &file_data[cursor], copy_size);
+ ogg_sync_wrote(&sync_state, copy_size);
+ cursor += copy_size;
+ ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Error::ERR_INVALID_DATA, "Ogg sync error " + itos(err));
+ }
+ if (done) {
+ break;
+ }
+ ERR_FAIL_COND_V_MSG((err = ogg_sync_check(&sync_state)), Error::ERR_INVALID_DATA, "Ogg sync error " + itos(err));
+
+ // Have a page now.
+ if (!initialized_stream) {
+ ogg_stream_init(&stream_state, ogg_page_serialno(&page));
+ ERR_FAIL_COND_V_MSG((err = ogg_stream_check(&stream_state)), Error::ERR_INVALID_DATA, "Ogg stream error " + itos(err));
+ initialized_stream = true;
+ }
+ ERR_FAIL_COND_V_MSG((err = ogg_stream_check(&stream_state)), Error::ERR_INVALID_DATA, "Ogg stream error " + itos(err));
+ ogg_stream_pagein(&stream_state, &page);
+ ERR_FAIL_COND_V_MSG((err = ogg_stream_check(&stream_state)), Error::ERR_INVALID_DATA, "Ogg stream error " + itos(err));
+ int desync_iters = 0;
+
+ Vector<Vector<uint8_t>> packet_data;
+ int64_t granule_pos = 0;
+
+ while (true) {
+ err = ogg_stream_packetout(&stream_state, &packet);
+ if (err == -1) {
+ // According to the docs this is usually recoverable, but don't sit here spinning forever.
+ desync_iters++;
+ ERR_FAIL_COND_V_MSG(desync_iters > 100, Error::ERR_INVALID_DATA, "Packet sync issue during ogg import");
+ continue;
+ } else if (err == 0) {
+ // Not enough data to fully reconstruct a packet. Go on to the next page.
+ break;
+ }
+ if (packet_count == 0 && vorbis_synthesis_idheader(&packet) == 0) {
+ WARN_PRINT("Found a non-vorbis-header packet in a header position");
+ // Clearly this logical stream is not a vorbis stream, so destroy it and try again with the next page.
+ ogg_stream_destroy(&stream_state);
+ initialized_stream = false;
+ break;
+ }
+ granule_pos = packet.granulepos;
+
+ PackedByteArray data;
+ data.resize(packet.bytes);
+ memcpy(data.ptrw(), packet.packet, packet.bytes);
+ packet_data.push_back(data);
+ packet_count++;
+ }
+ if (initialized_stream) {
+ ogg_packet_sequence->push_page(granule_pos, packet_data);
+ }
+ }
+
+ ogg_vorbis_stream->set_packet_sequence(ogg_packet_sequence);
+ ogg_vorbis_stream->set_loop(loop);
+ ogg_vorbis_stream->set_loop_offset(loop_offset);
+
+ return ResourceSaver::save(p_save_path + ".oggvorbisstr", ogg_vorbis_stream);
}
ResourceImporterOGGVorbis::ResourceImporterOGGVorbis() {
diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.h b/modules/vorbis/resource_importer_ogg_vorbis.h
index 60fe3381fb..acdc1a3d38 100644
--- a/modules/stb_vorbis/resource_importer_ogg_vorbis.h
+++ b/modules/vorbis/resource_importer_ogg_vorbis.h
@@ -28,25 +28,29 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef RESOURCEIMPORTEROGGVORBIS_H
-#define RESOURCEIMPORTEROGGVORBIS_H
+#ifndef RESOURCE_IMPORTER_OGG_VORBIS_H
+#define RESOURCE_IMPORTER_OGG_VORBIS_H
-#include "audio_stream_ogg_vorbis.h"
#include "core/io/resource_importer.h"
class ResourceImporterOGGVorbis : public ResourceImporter {
GDCLASS(ResourceImporterOGGVorbis, ResourceImporter);
+ enum {
+ OGG_SYNC_BUFFER_SIZE = 8192,
+ };
+
+private:
+ // virtual int get_samples_in_packet(Vector<uint8_t> p_packet) = 0;
+
public:
- virtual String get_importer_name() const override;
- virtual String get_visible_name() const override;
virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual String get_save_extension() const override;
virtual String get_resource_type() const override;
-
+ virtual String get_importer_name() const override;
+ virtual String get_visible_name() const override;
virtual int get_preset_count() const override;
virtual String get_preset_name(int p_idx) const override;
-
virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const override;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override;
@@ -55,4 +59,4 @@ public:
ResourceImporterOGGVorbis();
};
-#endif // RESOURCEIMPORTEROGGVORBIS_H
+#endif // RESOURCE_IMPORTER_OGG_VORBIS_H
diff --git a/modules/webm/doc_classes/VideoStreamWebm.xml b/modules/webm/doc_classes/VideoStreamWebm.xml
index 3b9acfd873..e04d02d6ab 100644
--- a/modules/webm/doc_classes/VideoStreamWebm.xml
+++ b/modules/webm/doc_classes/VideoStreamWebm.xml
@@ -25,6 +25,4 @@
</description>
</method>
</methods>
- <constants>
- </constants>
</class>
diff --git a/modules/webrtc/SCsub b/modules/webrtc/SCsub
index 31b8a73bf2..e6b9959840 100644
--- a/modules/webrtc/SCsub
+++ b/modules/webrtc/SCsub
@@ -4,11 +4,6 @@ Import("env")
Import("env_modules")
env_webrtc = env_modules.Clone()
-use_gdnative = env_webrtc["module_gdnative_enabled"]
-
-if use_gdnative: # GDNative is retained in Javascript for export compatibility
- env_webrtc.Append(CPPDEFINES=["WEBRTC_GDNATIVE_ENABLED"])
- env_webrtc.Prepend(CPPPATH=["#modules/gdnative/include/"])
if env["platform"] == "javascript":
# Our JavaScript/C++ interface.
diff --git a/modules/webrtc/config.py b/modules/webrtc/config.py
index 3281415f38..4ad918833a 100644
--- a/modules/webrtc/config.py
+++ b/modules/webrtc/config.py
@@ -11,6 +11,8 @@ def get_doc_classes():
"WebRTCPeerConnection",
"WebRTCDataChannel",
"WebRTCMultiplayerPeer",
+ "WebRTCPeerConnectionExtension",
+ "WebRTCDataChannelExtension",
]
diff --git a/modules/webrtc/doc_classes/WebRTCDataChannelExtension.xml b/modules/webrtc/doc_classes/WebRTCDataChannelExtension.xml
new file mode 100644
index 0000000000..746fabd6e5
--- /dev/null
+++ b/modules/webrtc/doc_classes/WebRTCDataChannelExtension.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="WebRTCDataChannelExtension" inherits="WebRTCDataChannel" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_close" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_available_packet_count" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_buffered_amount" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_id" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_label" qualifiers="virtual const">
+ <return type="String" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_max_packet_life_time" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_max_packet_size" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_max_retransmits" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_packet" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="r_buffer" type="const uint8_t **" />
+ <argument index="1" name="r_buffer_size" type="int32_t*" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_protocol" qualifiers="virtual const">
+ <return type="String" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_ready_state" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_write_mode" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_is_negotiated" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_is_ordered" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_poll" qualifiers="virtual">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_put_packet" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="p_buffer" type="const uint8_t*" />
+ <argument index="1" name="p_buffer_size" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_write_mode" qualifiers="virtual">
+ <return type="void" />
+ <argument index="0" name="p_write_mode" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_was_string_packet" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml b/modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml
index c53af22ae1..a8360a4d45 100644
--- a/modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml
+++ b/modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml
@@ -4,9 +4,10 @@
A simple interface to create a peer-to-peer mesh network composed of [WebRTCPeerConnection] that is compatible with the [MultiplayerAPI].
</brief_description>
<description>
- This class constructs a full mesh of [WebRTCPeerConnection] (one connection for each peer) that can be used as a [member MultiplayerAPI.network_peer].
+ This class constructs a full mesh of [WebRTCPeerConnection] (one connection for each peer) that can be used as a [member MultiplayerAPI.multiplayer_peer].
You can add each [WebRTCPeerConnection] via [method add_peer] or remove them via [method remove_peer]. Peers must be added in [constant WebRTCPeerConnection.STATE_NEW] state to allow it to create the appropriate channels. This class will not create offers nor set descriptions, it will only poll them, and notify connections and disconnections.
[signal MultiplayerPeer.connection_succeeded] and [signal MultiplayerPeer.server_disconnected] will not be emitted unless [code]server_compatibility[/code] is [code]true[/code] in [method initialize]. Beside that data transfer works like in a [MultiplayerPeer].
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
</tutorials>
@@ -56,7 +57,7 @@
Initialize the multiplayer peer with the given [code]peer_id[/code] (must be between 1 and 2147483647).
If [code]server_compatibilty[/code] is [code]false[/code] (default), the multiplayer peer will be immediately in state [constant MultiplayerPeer.CONNECTION_CONNECTED] and [signal MultiplayerPeer.connection_succeeded] will not be emitted.
If [code]server_compatibilty[/code] is [code]true[/code] the peer will suppress all [signal MultiplayerPeer.peer_connected] signals until a peer with id [constant MultiplayerPeer.TARGET_PEER_SERVER] connects and then emit [signal MultiplayerPeer.connection_succeeded]. After that the signal [signal MultiplayerPeer.peer_connected] will be emitted for every already connected peer, and any new peer that might connect. If the server peer disconnects after that, signal [signal MultiplayerPeer.server_disconnected] will be emitted and state will become [constant MultiplayerPeer.CONNECTION_CONNECTED].
- You can optionally specify a [code]channels_config[/code] array of [enum MultiplayerPeer.TransferMode] which will be used to create extra channels (WebRTC only supports one transfer mode per channel).
+ You can optionally specify a [code]channels_config[/code] array of [enum TransferMode] which will be used to create extra channels (WebRTC only supports one transfer mode per channel).
</description>
</method>
<method name="remove_peer">
@@ -67,10 +68,4 @@
</description>
</method>
</methods>
- <members>
- <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" override="true" default="false" />
- <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" override="true" enum="MultiplayerPeer.TransferMode" default="2" />
- </members>
- <constants>
- </constants>
</class>
diff --git a/modules/webrtc/doc_classes/WebRTCPeerConnectionExtension.xml b/modules/webrtc/doc_classes/WebRTCPeerConnectionExtension.xml
new file mode 100644
index 0000000000..d296fcd6e7
--- /dev/null
+++ b/modules/webrtc/doc_classes/WebRTCPeerConnectionExtension.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="WebRTCPeerConnectionExtension" inherits="WebRTCPeerConnection" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_add_ice_candidate" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="p_sdp_mid_name" type="String" />
+ <argument index="1" name="p_sdp_mline_index" type="int" />
+ <argument index="2" name="p_sdp_name" type="String" />
+ <description>
+ </description>
+ </method>
+ <method name="_close" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="_create_data_channel" qualifiers="virtual">
+ <return type="Object" />
+ <argument index="0" name="p_label" type="String" />
+ <argument index="1" name="p_config" type="Dictionary" />
+ <description>
+ </description>
+ </method>
+ <method name="_create_offer" qualifiers="virtual">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_connection_state" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_initialize" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="p_config" type="Dictionary" />
+ <description>
+ </description>
+ </method>
+ <method name="_poll" qualifiers="virtual">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_local_description" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="p_type" type="String" />
+ <argument index="1" name="p_sdp" type="String" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_remote_description" qualifiers="virtual">
+ <return type="int" />
+ <argument index="0" name="p_type" type="String" />
+ <argument index="1" name="p_sdp" type="String" />
+ <description>
+ </description>
+ </method>
+ <method name="make_default">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/modules/webrtc/register_types.cpp b/modules/webrtc/register_types.cpp
index 63ecc03a4c..8110e4a048 100644
--- a/modules/webrtc/register_types.cpp
+++ b/modules/webrtc/register_types.cpp
@@ -31,17 +31,11 @@
#include "register_types.h"
#include "core/config/project_settings.h"
#include "webrtc_data_channel.h"
+#include "webrtc_multiplayer_peer.h"
#include "webrtc_peer_connection.h"
-#ifdef JAVASCRIPT_ENABLED
-#include "emscripten.h"
-#include "webrtc_peer_connection_js.h"
-#endif
-#ifdef WEBRTC_GDNATIVE_ENABLED
-#include "webrtc_data_channel_gdnative.h"
-#include "webrtc_peer_connection_gdnative.h"
-#endif
-#include "webrtc_multiplayer_peer.h"
+#include "webrtc_data_channel_extension.h"
+#include "webrtc_peer_connection_extension.h"
void register_webrtc_types() {
#define _SET_HINT(NAME, _VAL_, _MAX_) \
@@ -50,18 +44,12 @@ void register_webrtc_types() {
_SET_HINT(WRTC_IN_BUF, 64, 4096);
-#ifdef JAVASCRIPT_ENABLED
- WebRTCPeerConnectionJS::make_default();
-#elif defined(WEBRTC_GDNATIVE_ENABLED)
- WebRTCPeerConnectionGDNative::make_default();
-#endif
-
ClassDB::register_custom_instance_class<WebRTCPeerConnection>();
-#ifdef WEBRTC_GDNATIVE_ENABLED
- GDREGISTER_CLASS(WebRTCPeerConnectionGDNative);
- GDREGISTER_CLASS(WebRTCDataChannelGDNative);
-#endif
+ GDREGISTER_CLASS(WebRTCPeerConnectionExtension);
+
GDREGISTER_VIRTUAL_CLASS(WebRTCDataChannel);
+ GDREGISTER_CLASS(WebRTCDataChannelExtension);
+
GDREGISTER_CLASS(WebRTCMultiplayerPeer);
}
diff --git a/modules/webrtc/webrtc_data_channel_extension.cpp b/modules/webrtc/webrtc_data_channel_extension.cpp
new file mode 100644
index 0000000000..ae346f6d8e
--- /dev/null
+++ b/modules/webrtc/webrtc_data_channel_extension.cpp
@@ -0,0 +1,215 @@
+/*************************************************************************/
+/* webrtc_data_channel_extension.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "webrtc_data_channel_extension.h"
+
+void WebRTCDataChannelExtension::_bind_methods() {
+ ADD_PROPERTY_DEFAULT("write_mode", WRITE_MODE_BINARY);
+
+ GDVIRTUAL_BIND(_get_packet, "r_buffer", "r_buffer_size");
+ GDVIRTUAL_BIND(_put_packet, "p_buffer", "p_buffer_size");
+ GDVIRTUAL_BIND(_get_available_packet_count);
+ GDVIRTUAL_BIND(_get_max_packet_size);
+
+ GDVIRTUAL_BIND(_poll);
+ GDVIRTUAL_BIND(_close);
+
+ GDVIRTUAL_BIND(_set_write_mode, "p_write_mode");
+ GDVIRTUAL_BIND(_get_write_mode);
+
+ GDVIRTUAL_BIND(_was_string_packet);
+ GDVIRTUAL_BIND(_get_ready_state);
+ GDVIRTUAL_BIND(_get_label);
+ GDVIRTUAL_BIND(_is_ordered);
+ GDVIRTUAL_BIND(_get_id);
+ GDVIRTUAL_BIND(_get_max_packet_life_time);
+ GDVIRTUAL_BIND(_get_max_retransmits);
+ GDVIRTUAL_BIND(_get_protocol);
+ GDVIRTUAL_BIND(_is_negotiated);
+ GDVIRTUAL_BIND(_get_buffered_amount);
+}
+
+int WebRTCDataChannelExtension::get_available_packet_count() const {
+ int count;
+ if (GDVIRTUAL_CALL(_get_available_packet_count, count)) {
+ return count;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_get_available_packet_count is unimplemented!");
+ return -1;
+}
+
+Error WebRTCDataChannelExtension::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
+ int err;
+ if (GDVIRTUAL_CALL(_get_packet, r_buffer, &r_buffer_size, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_get_packet_native is unimplemented!");
+ return FAILED;
+}
+
+Error WebRTCDataChannelExtension::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
+ int err;
+ if (GDVIRTUAL_CALL(_put_packet, p_buffer, p_buffer_size, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_put_packet_native is unimplemented!");
+ return FAILED;
+}
+
+int WebRTCDataChannelExtension::get_max_packet_size() const {
+ int size;
+ if (GDVIRTUAL_CALL(_get_max_packet_size, size)) {
+ return size;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_get_max_packet_size is unimplemented!");
+ return 0;
+}
+
+Error WebRTCDataChannelExtension::poll() {
+ int err;
+ if (GDVIRTUAL_CALL(_poll, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_poll is unimplemented!");
+ return ERR_UNCONFIGURED;
+}
+
+void WebRTCDataChannelExtension::close() {
+ if (GDVIRTUAL_CALL(_close)) {
+ return;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_close is unimplemented!");
+}
+
+void WebRTCDataChannelExtension::set_write_mode(WriteMode p_mode) {
+ if (GDVIRTUAL_CALL(_set_write_mode, p_mode)) {
+ return;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_set_write_mode is unimplemented!");
+}
+
+WebRTCDataChannel::WriteMode WebRTCDataChannelExtension::get_write_mode() const {
+ int mode;
+ if (GDVIRTUAL_CALL(_get_write_mode, mode)) {
+ return (WriteMode)mode;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_get_write_mode is unimplemented!");
+ return WRITE_MODE_BINARY;
+}
+
+bool WebRTCDataChannelExtension::was_string_packet() const {
+ bool was_string;
+ if (GDVIRTUAL_CALL(_was_string_packet, was_string)) {
+ return was_string;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_was_string_packet is unimplemented!");
+ return false;
+}
+
+WebRTCDataChannel::ChannelState WebRTCDataChannelExtension::get_ready_state() const {
+ int state;
+ if (GDVIRTUAL_CALL(_get_ready_state, state)) {
+ return (ChannelState)state;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_get_ready_state is unimplemented!");
+ return STATE_CLOSED;
+}
+
+String WebRTCDataChannelExtension::get_label() const {
+ String label;
+ if (GDVIRTUAL_CALL(_get_label, label)) {
+ return label;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_get_label is unimplemented!");
+ return label;
+}
+
+bool WebRTCDataChannelExtension::is_ordered() const {
+ bool ordered;
+ if (GDVIRTUAL_CALL(_is_ordered, ordered)) {
+ return ordered;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_is_ordered is unimplemented!");
+ return false;
+}
+
+int WebRTCDataChannelExtension::get_id() const {
+ int id;
+ if (GDVIRTUAL_CALL(_get_id, id)) {
+ return id;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_get_id is unimplemented!");
+ return -1;
+}
+
+int WebRTCDataChannelExtension::get_max_packet_life_time() const {
+ int lifetime;
+ if (GDVIRTUAL_CALL(_get_max_packet_life_time, lifetime)) {
+ return lifetime;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_get_max_packet_life_time is unimplemented!");
+ return -1;
+}
+
+int WebRTCDataChannelExtension::get_max_retransmits() const {
+ int retransmits;
+ if (GDVIRTUAL_CALL(_get_max_retransmits, retransmits)) {
+ return retransmits;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_get_max_retransmits is unimplemented!");
+ return -1;
+}
+
+String WebRTCDataChannelExtension::get_protocol() const {
+ String protocol;
+ if (GDVIRTUAL_CALL(_get_protocol, protocol)) {
+ return protocol;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_get_protocol is unimplemented!");
+ return protocol;
+}
+
+bool WebRTCDataChannelExtension::is_negotiated() const {
+ bool negotiated;
+ if (GDVIRTUAL_CALL(_is_negotiated, negotiated)) {
+ return negotiated;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_is_negotiated is unimplemented!");
+ return false;
+}
+
+int WebRTCDataChannelExtension::get_buffered_amount() const {
+ int amount;
+ if (GDVIRTUAL_CALL(_get_buffered_amount, amount)) {
+ return amount;
+ }
+ WARN_PRINT_ONCE("WebRTCDataChannelExtension::_get_buffered_amount is unimplemented!");
+ return -1;
+}
diff --git a/modules/webrtc/webrtc_data_channel_gdnative.h b/modules/webrtc/webrtc_data_channel_extension.h
index 5c80edd48c..eec96b4c62 100644
--- a/modules/webrtc/webrtc_data_channel_gdnative.h
+++ b/modules/webrtc/webrtc_data_channel_extension.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* webrtc_data_channel_gdnative.h */
+/* webrtc_data_channel_extension.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,26 +28,22 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef WEBRTC_DATA_CHANNEL_GDNATIVE_H
-#define WEBRTC_DATA_CHANNEL_GDNATIVE_H
+#ifndef WEBRTC_DATA_CHANNEL_EXTENSION_H
+#define WEBRTC_DATA_CHANNEL_EXTENSION_H
-#ifdef WEBRTC_GDNATIVE_ENABLED
-
-#include "modules/gdnative/include/net/godot_net.h"
#include "webrtc_data_channel.h"
-class WebRTCDataChannelGDNative : public WebRTCDataChannel {
- GDCLASS(WebRTCDataChannelGDNative, WebRTCDataChannel);
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
+#include "core/variant/native_ptr.h"
+
+class WebRTCDataChannelExtension : public WebRTCDataChannel {
+ GDCLASS(WebRTCDataChannelExtension, WebRTCDataChannel);
protected:
static void _bind_methods();
-private:
- const godot_net_webrtc_data_channel *interface;
-
public:
- void set_native_webrtc_data_channel(const godot_net_webrtc_data_channel *p_impl);
-
virtual void set_write_mode(WriteMode mode) override;
virtual WriteMode get_write_mode() const override;
virtual bool was_string_packet() const override;
@@ -72,10 +68,31 @@ public:
virtual int get_max_packet_size() const override;
- WebRTCDataChannelGDNative();
- ~WebRTCDataChannelGDNative();
-};
+ /** GDExtension **/
+ GDVIRTUAL0RC(int, _get_available_packet_count);
+ GDVIRTUAL2R(int, _get_packet, GDNativeConstPtr<const uint8_t *>, GDNativePtr<int>);
+ GDVIRTUAL2R(int, _put_packet, GDNativeConstPtr<const uint8_t>, int);
+ GDVIRTUAL0RC(int, _get_max_packet_size);
-#endif // WEBRTC_GDNATIVE_ENABLED
+ GDVIRTUAL0R(int, _poll);
+ GDVIRTUAL0(_close);
+
+ GDVIRTUAL1(_set_write_mode, int);
+ GDVIRTUAL0RC(int, _get_write_mode);
+
+ GDVIRTUAL0RC(bool, _was_string_packet);
+
+ GDVIRTUAL0RC(int, _get_ready_state);
+ GDVIRTUAL0RC(String, _get_label);
+ GDVIRTUAL0RC(bool, _is_ordered);
+ GDVIRTUAL0RC(int, _get_id);
+ GDVIRTUAL0RC(int, _get_max_packet_life_time);
+ GDVIRTUAL0RC(int, _get_max_retransmits);
+ GDVIRTUAL0RC(String, _get_protocol);
+ GDVIRTUAL0RC(bool, _is_negotiated);
+ GDVIRTUAL0RC(int, _get_buffered_amount);
+
+ WebRTCDataChannelExtension() {}
+};
-#endif // WEBRTC_DATA_CHANNEL_GDNATIVE_H
+#endif // WEBRTC_DATA_CHANNEL_EXTENSION_H
diff --git a/modules/webrtc/webrtc_data_channel_gdnative.cpp b/modules/webrtc/webrtc_data_channel_gdnative.cpp
deleted file mode 100644
index 10a3367557..0000000000
--- a/modules/webrtc/webrtc_data_channel_gdnative.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-/*************************************************************************/
-/* webrtc_data_channel_gdnative.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifdef WEBRTC_GDNATIVE_ENABLED
-
-#include "webrtc_data_channel_gdnative.h"
-
-#include "core/io/resource_loader.h"
-#include "modules/gdnative/nativescript/nativescript.h"
-
-void WebRTCDataChannelGDNative::_bind_methods() {
- ADD_PROPERTY_DEFAULT("write_mode", WRITE_MODE_BINARY);
-}
-
-WebRTCDataChannelGDNative::WebRTCDataChannelGDNative() {
- interface = nullptr;
-}
-
-WebRTCDataChannelGDNative::~WebRTCDataChannelGDNative() {
-}
-
-Error WebRTCDataChannelGDNative::poll() {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->poll(interface->data);
-}
-
-void WebRTCDataChannelGDNative::close() {
- ERR_FAIL_COND(interface == nullptr);
- interface->close(interface->data);
-}
-
-void WebRTCDataChannelGDNative::set_write_mode(WriteMode p_mode) {
- ERR_FAIL_COND(interface == nullptr);
- interface->set_write_mode(interface->data, p_mode);
-}
-
-WebRTCDataChannel::WriteMode WebRTCDataChannelGDNative::get_write_mode() const {
- ERR_FAIL_COND_V(interface == nullptr, WRITE_MODE_BINARY);
- return (WriteMode)interface->get_write_mode(interface->data);
-}
-
-bool WebRTCDataChannelGDNative::was_string_packet() const {
- ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->was_string_packet(interface->data);
-}
-
-WebRTCDataChannel::ChannelState WebRTCDataChannelGDNative::get_ready_state() const {
- ERR_FAIL_COND_V(interface == nullptr, STATE_CLOSED);
- return (ChannelState)interface->get_ready_state(interface->data);
-}
-
-String WebRTCDataChannelGDNative::get_label() const {
- ERR_FAIL_COND_V(interface == nullptr, "");
- return String(interface->get_label(interface->data));
-}
-
-bool WebRTCDataChannelGDNative::is_ordered() const {
- ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->is_ordered(interface->data);
-}
-
-int WebRTCDataChannelGDNative::get_id() const {
- ERR_FAIL_COND_V(interface == nullptr, -1);
- return interface->get_id(interface->data);
-}
-
-int WebRTCDataChannelGDNative::get_max_packet_life_time() const {
- ERR_FAIL_COND_V(interface == nullptr, -1);
- return interface->get_max_packet_life_time(interface->data);
-}
-
-int WebRTCDataChannelGDNative::get_max_retransmits() const {
- ERR_FAIL_COND_V(interface == nullptr, -1);
- return interface->get_max_retransmits(interface->data);
-}
-
-String WebRTCDataChannelGDNative::get_protocol() const {
- ERR_FAIL_COND_V(interface == nullptr, "");
- return String(interface->get_protocol(interface->data));
-}
-
-bool WebRTCDataChannelGDNative::is_negotiated() const {
- ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->is_negotiated(interface->data);
-}
-
-int WebRTCDataChannelGDNative::get_buffered_amount() const {
- ERR_FAIL_COND_V(interface == NULL, 0);
- return interface->get_buffered_amount(interface->data);
-}
-
-Error WebRTCDataChannelGDNative::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->get_packet(interface->data, r_buffer, &r_buffer_size);
-}
-
-Error WebRTCDataChannelGDNative::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->put_packet(interface->data, p_buffer, p_buffer_size);
-}
-
-int WebRTCDataChannelGDNative::get_max_packet_size() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_max_packet_size(interface->data);
-}
-
-int WebRTCDataChannelGDNative::get_available_packet_count() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_available_packet_count(interface->data);
-}
-
-void WebRTCDataChannelGDNative::set_native_webrtc_data_channel(const godot_net_webrtc_data_channel *p_impl) {
- interface = p_impl;
-}
-
-#endif // WEBRTC_GDNATIVE_ENABLED
diff --git a/modules/webrtc/webrtc_multiplayer_peer.cpp b/modules/webrtc/webrtc_multiplayer_peer.cpp
index 95c8c13449..48117f05f2 100644
--- a/modules/webrtc/webrtc_multiplayer_peer.cpp
+++ b/modules/webrtc/webrtc_multiplayer_peer.cpp
@@ -43,22 +43,6 @@ void WebRTCMultiplayerPeer::_bind_methods() {
ClassDB::bind_method(D_METHOD("close"), &WebRTCMultiplayerPeer::close);
}
-void WebRTCMultiplayerPeer::set_transfer_channel(int p_channel) {
- transfer_channel = p_channel;
-}
-
-int WebRTCMultiplayerPeer::get_transfer_channel() const {
- return transfer_channel;
-}
-
-void WebRTCMultiplayerPeer::set_transfer_mode(TransferMode p_mode) {
- transfer_mode = p_mode;
-}
-
-MultiplayerPeer::TransferMode WebRTCMultiplayerPeer::get_transfer_mode() const {
- return transfer_mode;
-}
-
void WebRTCMultiplayerPeer::set_target_peer(int p_peer_id) {
target_peer = p_peer_id;
}
@@ -188,14 +172,6 @@ void WebRTCMultiplayerPeer::_find_next_peer() {
next_packet_peer = 0;
}
-void WebRTCMultiplayerPeer::set_refuse_new_connections(bool p_enable) {
- refuse_connections = p_enable;
-}
-
-bool WebRTCMultiplayerPeer::is_refusing_new_connections() const {
- return refuse_connections;
-}
-
MultiplayerPeer::ConnectionStatus WebRTCMultiplayerPeer::get_connection_status() const {
return connection_status;
}
@@ -204,7 +180,7 @@ Error WebRTCMultiplayerPeer::initialize(int p_self_id, bool p_server_compat, Arr
ERR_FAIL_COND_V(p_self_id < 1 || p_self_id > ~(1 << 31), ERR_INVALID_PARAMETER);
channels_config.clear();
for (int i = 0; i < p_channels_config.size(); i++) {
- ERR_FAIL_COND_V_MSG(p_channels_config[i].get_type() != Variant::INT, ERR_INVALID_PARAMETER, "The 'channels_config' array must contain only enum values from 'MultiplayerPeer.TransferMode'");
+ ERR_FAIL_COND_V_MSG(p_channels_config[i].get_type() != Variant::INT, ERR_INVALID_PARAMETER, "The 'channels_config' array must contain only enum values from 'MultiplayerPeer.Multiplayer::TransferMode'");
int mode = p_channels_config[i].operator int();
// Initialize data channel configurations.
Dictionary cfg;
@@ -213,17 +189,17 @@ Error WebRTCMultiplayerPeer::initialize(int p_self_id, bool p_server_compat, Arr
cfg["ordered"] = true;
switch (mode) {
- case TRANSFER_MODE_UNRELIABLE_ORDERED:
+ case Multiplayer::TRANSFER_MODE_ORDERED:
cfg["maxPacketLifetime"] = 1;
break;
- case TRANSFER_MODE_UNRELIABLE:
+ case Multiplayer::TRANSFER_MODE_UNRELIABLE:
cfg["maxPacketLifetime"] = 1;
cfg["ordered"] = false;
break;
- case TRANSFER_MODE_RELIABLE:
+ case Multiplayer::TRANSFER_MODE_RELIABLE:
break;
default:
- ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, vformat("The 'channels_config' array must contain only enum values from 'MultiplayerPeer.TransferMode'. Got: %d", mode));
+ ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, vformat("The 'channels_config' array must contain only enum values from 'MultiplayerPeer.Multiplayer::TransferMode'. Got: %d", mode));
}
channels_config.push_back(cfg);
}
@@ -279,7 +255,7 @@ Dictionary WebRTCMultiplayerPeer::get_peers() {
Error WebRTCMultiplayerPeer::add_peer(Ref<WebRTCPeerConnection> p_peer, int p_peer_id, int p_unreliable_lifetime) {
ERR_FAIL_COND_V(p_peer_id < 0 || p_peer_id > ~(1 << 31), ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(p_unreliable_lifetime < 0, ERR_INVALID_PARAMETER);
- ERR_FAIL_COND_V(refuse_connections, ERR_UNAUTHORIZED);
+ ERR_FAIL_COND_V(is_refusing_new_connections(), ERR_UNAUTHORIZED);
// Peer must be valid, and in new state (to create data channels)
ERR_FAIL_COND_V(!p_peer.is_valid(), ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(p_peer->get_connection_state() != WebRTCPeerConnection::STATE_NEW, ERR_INVALID_PARAMETER);
@@ -352,16 +328,16 @@ Error WebRTCMultiplayerPeer::get_packet(const uint8_t **r_buffer, int &r_buffer_
Error WebRTCMultiplayerPeer::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
ERR_FAIL_COND_V(connection_status == CONNECTION_DISCONNECTED, ERR_UNCONFIGURED);
- int ch = transfer_channel;
+ int ch = get_transfer_channel();
if (ch == 0) {
- switch (transfer_mode) {
- case TRANSFER_MODE_RELIABLE:
+ switch (get_transfer_mode()) {
+ case Multiplayer::TRANSFER_MODE_RELIABLE:
ch = CH_RELIABLE;
break;
- case TRANSFER_MODE_UNRELIABLE_ORDERED:
+ case Multiplayer::TRANSFER_MODE_ORDERED:
ch = CH_ORDERED;
break;
- case TRANSFER_MODE_UNRELIABLE:
+ case Multiplayer::TRANSFER_MODE_UNRELIABLE:
ch = CH_UNRELIABLE;
break;
}
diff --git a/modules/webrtc/webrtc_multiplayer_peer.h b/modules/webrtc/webrtc_multiplayer_peer.h
index ef4fe1678c..4a7e9ad7c8 100644
--- a/modules/webrtc/webrtc_multiplayer_peer.h
+++ b/modules/webrtc/webrtc_multiplayer_peer.h
@@ -31,7 +31,7 @@
#ifndef WEBRTC_MULTIPLAYER_H
#define WEBRTC_MULTIPLAYER_H
-#include "core/io/multiplayer_peer.h"
+#include "core/multiplayer/multiplayer_peer.h"
#include "webrtc_peer_connection.h"
class WebRTCMultiplayerPeer : public MultiplayerPeer {
@@ -65,10 +65,7 @@ private:
uint32_t unique_id = 0;
int target_peer = 0;
int client_count = 0;
- bool refuse_connections = false;
ConnectionStatus connection_status = CONNECTION_DISCONNECTED;
- int transfer_channel = 0;
- TransferMode transfer_mode = TRANSFER_MODE_RELIABLE;
int next_packet_peer = 0;
bool server_compat = false;
@@ -97,10 +94,6 @@ public:
int get_max_packet_size() const override;
// MultiplayerPeer
- void set_transfer_channel(int p_channel) override;
- int get_transfer_channel() const override;
- void set_transfer_mode(TransferMode p_mode) override;
- TransferMode get_transfer_mode() const override;
void set_target_peer(int p_peer_id) override;
int get_unique_id() const override;
@@ -110,9 +103,6 @@ public:
void poll() override;
- void set_refuse_new_connections(bool p_enable) override;
- bool is_refusing_new_connections() const override;
-
ConnectionStatus get_connection_status() const override;
};
diff --git a/modules/webrtc/webrtc_peer_connection.cpp b/modules/webrtc/webrtc_peer_connection.cpp
index 3e2938bf7d..ad28aa76c7 100644
--- a/modules/webrtc/webrtc_peer_connection.cpp
+++ b/modules/webrtc/webrtc_peer_connection.cpp
@@ -30,17 +30,29 @@
#include "webrtc_peer_connection.h"
-WebRTCPeerConnection *(*WebRTCPeerConnection::_create)() = nullptr;
+#ifdef JAVASCRIPT_ENABLED
+#include "webrtc_peer_connection_js.h"
+#else
+#include "webrtc_peer_connection_extension.h"
+#endif
-Ref<WebRTCPeerConnection> WebRTCPeerConnection::create_ref() {
- return create();
+StringName WebRTCPeerConnection::default_extension;
+
+void WebRTCPeerConnection::set_default_extension(const StringName &p_extension) {
+ default_extension = p_extension;
}
WebRTCPeerConnection *WebRTCPeerConnection::create() {
- if (!_create) {
- return nullptr;
+#ifdef JAVASCRIPT_ENABLED
+ return memnew(WebRTCPeerConnectionJS);
+#else
+ if (default_extension == String()) {
+ WARN_PRINT_ONCE("No default WebRTC extension configured.");
+ return memnew(WebRTCPeerConnectionExtension);
}
- return _create();
+ Object *obj = ClassDB::instantiate(default_extension);
+ return Object::cast_to<WebRTCPeerConnectionExtension>(obj);
+#endif
}
void WebRTCPeerConnection::_bind_methods() {
diff --git a/modules/webrtc/webrtc_peer_connection.h b/modules/webrtc/webrtc_peer_connection.h
index fcfb9ae9ae..e2ef3e55ad 100644
--- a/modules/webrtc/webrtc_peer_connection.h
+++ b/modules/webrtc/webrtc_peer_connection.h
@@ -47,11 +47,15 @@ public:
STATE_CLOSED
};
+private:
+ static StringName default_extension;
+
protected:
static void _bind_methods();
- static WebRTCPeerConnection *(*_create)();
public:
+ static void set_default_extension(const StringName &p_name);
+
virtual ConnectionState get_connection_state() const = 0;
virtual Error initialize(Dictionary p_config = Dictionary()) = 0;
@@ -63,7 +67,6 @@ public:
virtual Error poll() = 0;
virtual void close() = 0;
- static Ref<WebRTCPeerConnection> create_ref();
static WebRTCPeerConnection *create();
WebRTCPeerConnection();
diff --git a/modules/webrtc/webrtc_peer_connection_extension.cpp b/modules/webrtc/webrtc_peer_connection_extension.cpp
new file mode 100644
index 0000000000..33288e66d6
--- /dev/null
+++ b/modules/webrtc/webrtc_peer_connection_extension.cpp
@@ -0,0 +1,131 @@
+/*************************************************************************/
+/* webrtc_peer_connection_extension.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "webrtc_peer_connection_extension.h"
+
+void WebRTCPeerConnectionExtension::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("make_default"), &WebRTCPeerConnectionExtension::make_default);
+
+ GDVIRTUAL_BIND(_get_connection_state);
+ GDVIRTUAL_BIND(_initialize, "p_config");
+ GDVIRTUAL_BIND(_create_data_channel, "p_label", "p_config");
+ GDVIRTUAL_BIND(_create_offer);
+ GDVIRTUAL_BIND(_set_remote_description, "p_type", "p_sdp");
+ GDVIRTUAL_BIND(_set_local_description, "p_type", "p_sdp");
+ GDVIRTUAL_BIND(_add_ice_candidate, "p_sdp_mid_name", "p_sdp_mline_index", "p_sdp_name");
+ GDVIRTUAL_BIND(_poll);
+ GDVIRTUAL_BIND(_close);
+}
+
+void WebRTCPeerConnectionExtension::make_default() {
+ ERR_FAIL_COND_MSG(!_get_extension(), vformat("Can't make %s the default without extending it.", get_class()));
+ WebRTCPeerConnection::set_default_extension(get_class());
+}
+
+WebRTCPeerConnection::ConnectionState WebRTCPeerConnectionExtension::get_connection_state() const {
+ int state;
+ if (GDVIRTUAL_CALL(_get_connection_state, state)) {
+ return (ConnectionState)state;
+ }
+ WARN_PRINT_ONCE("WebRTCPeerConnectionExtension::_get_connection_state is unimplemented!");
+ return STATE_DISCONNECTED;
+}
+
+Error WebRTCPeerConnectionExtension::initialize(Dictionary p_config) {
+ int err;
+ if (GDVIRTUAL_CALL(_initialize, p_config, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("WebRTCPeerConnectionExtension::_initialize is unimplemented!");
+ return ERR_UNCONFIGURED;
+}
+
+Ref<WebRTCDataChannel> WebRTCPeerConnectionExtension::create_data_channel(String p_label, Dictionary p_options) {
+ Object *ret = nullptr;
+ if (GDVIRTUAL_CALL(_create_data_channel, p_label, p_options, ret)) {
+ WebRTCDataChannel *ch = Object::cast_to<WebRTCDataChannel>(ret);
+ ERR_FAIL_COND_V_MSG(ret && !ch, nullptr, "Returned object must be an instance of WebRTCDataChannel.");
+ return ch;
+ }
+ WARN_PRINT_ONCE("WebRTCPeerConnectionExtension::_create_data_channel is unimplemented!");
+ return nullptr;
+}
+
+Error WebRTCPeerConnectionExtension::create_offer() {
+ int err;
+ if (GDVIRTUAL_CALL(_create_offer, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("WebRTCPeerConnectionExtension::_create_offer is unimplemented!");
+ return ERR_UNCONFIGURED;
+}
+
+Error WebRTCPeerConnectionExtension::set_local_description(String p_type, String p_sdp) {
+ int err;
+ if (GDVIRTUAL_CALL(_set_local_description, p_type, p_sdp, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("WebRTCPeerConnectionExtension::_set_local_description is unimplemented!");
+ return ERR_UNCONFIGURED;
+}
+
+Error WebRTCPeerConnectionExtension::set_remote_description(String p_type, String p_sdp) {
+ int err;
+ if (GDVIRTUAL_CALL(_set_remote_description, p_type, p_sdp, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("WebRTCPeerConnectionExtension::_set_remote_description is unimplemented!");
+ return ERR_UNCONFIGURED;
+}
+
+Error WebRTCPeerConnectionExtension::add_ice_candidate(String p_sdp_mid_name, int p_sdp_mline_index, String p_sdp_name) {
+ int err;
+ if (GDVIRTUAL_CALL(_add_ice_candidate, p_sdp_mid_name, p_sdp_mline_index, p_sdp_name, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("WebRTCPeerConnectionExtension::_add_ice_candidate is unimplemented!");
+ return ERR_UNCONFIGURED;
+}
+
+Error WebRTCPeerConnectionExtension::poll() {
+ int err;
+ if (GDVIRTUAL_CALL(_poll, err)) {
+ return (Error)err;
+ }
+ WARN_PRINT_ONCE("WebRTCPeerConnectionExtension::_poll is unimplemented!");
+ return ERR_UNCONFIGURED;
+}
+
+void WebRTCPeerConnectionExtension::close() {
+ if (GDVIRTUAL_CALL(_close)) {
+ return;
+ }
+ WARN_PRINT_ONCE("WebRTCPeerConnectionExtension::_close is unimplemented!");
+}
diff --git a/modules/webrtc/webrtc_peer_connection_gdnative.h b/modules/webrtc/webrtc_peer_connection_extension.h
index 578af0202f..b3c2039fc1 100644
--- a/modules/webrtc/webrtc_peer_connection_gdnative.h
+++ b/modules/webrtc/webrtc_peer_connection_extension.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* webrtc_peer_connection_gdnative.h */
+/* webrtc_peer_connection_extension.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,30 +28,23 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef WEBRTC_PEER_CONNECTION_GDNATIVE_H
-#define WEBRTC_PEER_CONNECTION_GDNATIVE_H
+#ifndef WEBRTC_PEER_CONNECTION_EXTENSION_H
+#define WEBRTC_PEER_CONNECTION_EXTENSION_H
-#ifdef WEBRTC_GDNATIVE_ENABLED
-
-#include "modules/gdnative/include/net/godot_net.h"
#include "webrtc_peer_connection.h"
-class WebRTCPeerConnectionGDNative : public WebRTCPeerConnection {
- GDCLASS(WebRTCPeerConnectionGDNative, WebRTCPeerConnection);
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
+#include "core/variant/native_ptr.h"
+
+class WebRTCPeerConnectionExtension : public WebRTCPeerConnection {
+ GDCLASS(WebRTCPeerConnectionExtension, WebRTCPeerConnection);
protected:
static void _bind_methods();
- static WebRTCPeerConnection *_create();
-
-private:
- static const godot_net_webrtc_library *default_library;
- const godot_net_webrtc_peer_connection *interface;
public:
- static Error set_default_library(const godot_net_webrtc_library *p_library);
- static void make_default() { WebRTCPeerConnection::_create = WebRTCPeerConnectionGDNative::_create; }
-
- void set_native_webrtc_peer_connection(const godot_net_webrtc_peer_connection *p_impl);
+ void make_default();
virtual ConnectionState get_connection_state() const override;
@@ -60,14 +53,22 @@ public:
virtual Error create_offer() override;
virtual Error set_remote_description(String type, String sdp) override;
virtual Error set_local_description(String type, String sdp) override;
- virtual Error add_ice_candidate(String sdpMidName, int sdpMlineIndexName, String sdpName) override;
+ virtual Error add_ice_candidate(String p_sdp_mid_name, int p_sdp_mline_index, String p_sdp_name) override;
virtual Error poll() override;
virtual void close() override;
- WebRTCPeerConnectionGDNative();
- ~WebRTCPeerConnectionGDNative();
-};
+ /** GDExtension **/
+ GDVIRTUAL0RC(int, _get_connection_state);
+ GDVIRTUAL1R(int, _initialize, Dictionary);
+ GDVIRTUAL2R(Object *, _create_data_channel, String, Dictionary);
+ GDVIRTUAL0R(int, _create_offer);
+ GDVIRTUAL2R(int, _set_remote_description, String, String);
+ GDVIRTUAL2R(int, _set_local_description, String, String);
+ GDVIRTUAL3R(int, _add_ice_candidate, String, int, String);
+ GDVIRTUAL0R(int, _poll);
+ GDVIRTUAL0(_close);
-#endif // WEBRTC_GDNATIVE_ENABLED
+ WebRTCPeerConnectionExtension() {}
+};
-#endif // WEBRTC_PEER_CONNECTION_GDNATIVE_H
+#endif // WEBRTC_PEER_CONNECTION_EXTENSION_H
diff --git a/modules/webrtc/webrtc_peer_connection_gdnative.cpp b/modules/webrtc/webrtc_peer_connection_gdnative.cpp
deleted file mode 100644
index dcf78dfb73..0000000000
--- a/modules/webrtc/webrtc_peer_connection_gdnative.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/*************************************************************************/
-/* webrtc_peer_connection_gdnative.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifdef WEBRTC_GDNATIVE_ENABLED
-
-#include "webrtc_peer_connection_gdnative.h"
-
-#include "core/io/resource_loader.h"
-#include "modules/gdnative/nativescript/nativescript.h"
-#include "webrtc_data_channel_gdnative.h"
-
-const godot_net_webrtc_library *WebRTCPeerConnectionGDNative::default_library = nullptr;
-
-Error WebRTCPeerConnectionGDNative::set_default_library(const godot_net_webrtc_library *p_lib) {
- if (default_library) {
- const godot_net_webrtc_library *old = default_library;
- default_library = nullptr;
- old->unregistered();
- }
- default_library = p_lib;
- return OK; // Maybe add version check and fail accordingly
-}
-
-WebRTCPeerConnection *WebRTCPeerConnectionGDNative::_create() {
- WebRTCPeerConnectionGDNative *obj = memnew(WebRTCPeerConnectionGDNative);
- ERR_FAIL_COND_V_MSG(!default_library, obj, "Default GDNative WebRTC implementation not defined.");
-
- // Call GDNative constructor
- Error err = (Error)default_library->create_peer_connection(obj);
- ERR_FAIL_COND_V_MSG(err != OK, obj, "GDNative default library constructor returned an error.");
-
- return obj;
-}
-
-void WebRTCPeerConnectionGDNative::_bind_methods() {
-}
-
-WebRTCPeerConnectionGDNative::WebRTCPeerConnectionGDNative() {
- interface = nullptr;
-}
-
-WebRTCPeerConnectionGDNative::~WebRTCPeerConnectionGDNative() {
-}
-
-Error WebRTCPeerConnectionGDNative::initialize(Dictionary p_config) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->initialize(interface->data, (const godot_dictionary *)&p_config);
-}
-
-Ref<WebRTCDataChannel> WebRTCPeerConnectionGDNative::create_data_channel(String p_label, Dictionary p_options) {
- ERR_FAIL_COND_V(interface == nullptr, nullptr);
- return (WebRTCDataChannel *)interface->create_data_channel(interface->data, p_label.utf8().get_data(), (const godot_dictionary *)&p_options);
-}
-
-Error WebRTCPeerConnectionGDNative::create_offer() {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->create_offer(interface->data);
-}
-
-Error WebRTCPeerConnectionGDNative::set_local_description(String p_type, String p_sdp) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->set_local_description(interface->data, p_type.utf8().get_data(), p_sdp.utf8().get_data());
-}
-
-Error WebRTCPeerConnectionGDNative::set_remote_description(String p_type, String p_sdp) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->set_remote_description(interface->data, p_type.utf8().get_data(), p_sdp.utf8().get_data());
-}
-
-Error WebRTCPeerConnectionGDNative::add_ice_candidate(String sdpMidName, int sdpMlineIndexName, String sdpName) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->add_ice_candidate(interface->data, sdpMidName.utf8().get_data(), sdpMlineIndexName, sdpName.utf8().get_data());
-}
-
-Error WebRTCPeerConnectionGDNative::poll() {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->poll(interface->data);
-}
-
-void WebRTCPeerConnectionGDNative::close() {
- ERR_FAIL_COND(interface == nullptr);
- interface->close(interface->data);
-}
-
-WebRTCPeerConnection::ConnectionState WebRTCPeerConnectionGDNative::get_connection_state() const {
- ERR_FAIL_COND_V(interface == nullptr, STATE_DISCONNECTED);
- return (ConnectionState)interface->get_connection_state(interface->data);
-}
-
-void WebRTCPeerConnectionGDNative::set_native_webrtc_peer_connection(const godot_net_webrtc_peer_connection *p_impl) {
- interface = p_impl;
-}
-
-#endif // WEBRTC_GDNATIVE_ENABLED
diff --git a/modules/webrtc/webrtc_peer_connection_js.h b/modules/webrtc/webrtc_peer_connection_js.h
index 0272e67f6f..d2beccaf03 100644
--- a/modules/webrtc/webrtc_peer_connection_js.h
+++ b/modules/webrtc/webrtc_peer_connection_js.h
@@ -63,9 +63,6 @@ private:
static void _on_error(void *p_obj);
public:
- static WebRTCPeerConnection *_create() { return memnew(WebRTCPeerConnectionJS); }
- static void make_default() { WebRTCPeerConnection::_create = WebRTCPeerConnectionJS::_create; }
-
virtual ConnectionState get_connection_state() const;
virtual Error initialize(Dictionary configuration = Dictionary());
diff --git a/modules/websocket/doc_classes/WebSocketClient.xml b/modules/websocket/doc_classes/WebSocketClient.xml
index 1549a907b4..4b515c12a1 100644
--- a/modules/websocket/doc_classes/WebSocketClient.xml
+++ b/modules/websocket/doc_classes/WebSocketClient.xml
@@ -5,9 +5,10 @@
</brief_description>
<description>
This class implements a WebSocket client compatible with any RFC 6455-compliant WebSocket server.
- This client can be optionally used as a network peer for the [MultiplayerAPI].
+ This client can be optionally used as a multiplayer peer for the [MultiplayerAPI].
After starting the client ([method connect_to_url]), you will need to [method MultiplayerPeer.poll] it at regular intervals (e.g. inside [method Node._process]).
You will receive appropriate signals when connecting, disconnecting, or when new data is available.
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
</tutorials>
@@ -20,7 +21,7 @@
<argument index="3" name="custom_headers" type="PackedStringArray" default="PackedStringArray()" />
<description>
Connects to the given URL requesting one of the given [code]protocols[/code] as sub-protocol. If the list empty (default), no sub-protocol will be requested.
- If [code]true[/code] is passed as [code]gd_mp_api[/code], the client will behave like a network peer for the [MultiplayerAPI], connections to non-Godot servers will not work, and [signal data_received] will not be emitted.
+ If [code]true[/code] is passed as [code]gd_mp_api[/code], the client will behave like a multiplayer peer for the [MultiplayerAPI], connections to non-Godot servers will not work, and [signal data_received] will not be emitted.
If [code]false[/code] is passed instead (default), you must call [PacketPeer] functions ([code]put_packet[/code], [code]get_packet[/code], etc.) on the [WebSocketPeer] returned via [code]get_peer(1)[/code] and not on this object directly (e.g. [code]get_peer(1).put_packet(data)[/code]).
You can optionally pass a list of [code]custom_headers[/code] to be added to the handshake HTTP request.
[b]Note:[/b] To avoid mixed content warnings or errors in HTML5, you may have to use a [code]url[/code] that starts with [code]wss://[/code] (secure) instead of [code]ws://[/code]. When doing so, make sure to use the fully qualified domain name that matches the one defined in the server's SSL certificate. Do not connect directly via the IP address for [code]wss://[/code] connections, as it won't match with the SSL certificate.
@@ -90,6 +91,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml b/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml
index cd41e9a1fb..8d8ab220e2 100644
--- a/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml
+++ b/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml
@@ -4,7 +4,8 @@
Base class for WebSocket server and client.
</brief_description>
<description>
- Base class for WebSocket server and client, allowing them to be used as network peer for the [MultiplayerAPI].
+ Base class for WebSocket server and client, allowing them to be used as multiplayer peer for the [MultiplayerAPI].
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
</tutorials>
@@ -30,10 +31,6 @@
</description>
</method>
</methods>
- <members>
- <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" override="true" default="false" />
- <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" override="true" enum="MultiplayerPeer.TransferMode" default="2" />
- </members>
<signals>
<signal name="peer_packet">
<argument index="0" name="peer_source" type="int" />
@@ -43,6 +40,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/modules/websocket/doc_classes/WebSocketServer.xml b/modules/websocket/doc_classes/WebSocketServer.xml
index 90182de4c2..f901b089ea 100644
--- a/modules/websocket/doc_classes/WebSocketServer.xml
+++ b/modules/websocket/doc_classes/WebSocketServer.xml
@@ -7,6 +7,7 @@
This class implements a WebSocket server that can also support the high-level multiplayer API.
After starting the server ([method listen]), you will need to [method MultiplayerPeer.poll] it at regular intervals (e.g. inside [method Node._process]). When clients connect, disconnect, or send data, you will receive the appropriate signal.
[b]Note:[/b] Not available in HTML5 exports.
+ [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
</tutorials>
@@ -55,7 +56,7 @@
<description>
Starts listening on the given port.
You can specify the desired subprotocols via the "protocols" array. If the list empty (default), no sub-protocol will be requested.
- If [code]true[/code] is passed as [code]gd_mp_api[/code], the server will behave like a network peer for the [MultiplayerAPI], connections from non-Godot clients will not work, and [signal data_received] will not be emitted.
+ If [code]true[/code] is passed as [code]gd_mp_api[/code], the server will behave like a multiplayer peer for the [MultiplayerAPI], connections from non-Godot clients will not work, and [signal data_received] will not be emitted.
If [code]false[/code] is passed instead (default), you must call [PacketPeer] functions ([code]put_packet[/code], [code]get_packet[/code], etc.), on the [WebSocketPeer] returned via [code]get_peer(id)[/code] to communicate with the peer with given [code]id[/code] (e.g. [code]get_peer(id).get_available_packet_count[/code]).
</description>
</method>
@@ -116,6 +117,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/modules/websocket/editor_debugger_server_websocket.cpp b/modules/websocket/editor_debugger_server_websocket.cpp
index 2e61cbfc08..d248433d82 100644
--- a/modules/websocket/editor_debugger_server_websocket.cpp
+++ b/modules/websocket/editor_debugger_server_websocket.cpp
@@ -48,11 +48,19 @@ void EditorDebuggerServerWebSocket::poll() {
server->poll();
}
-Error EditorDebuggerServerWebSocket::start() {
- int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
+Error EditorDebuggerServerWebSocket::start(const String &p_uri) {
+ int bind_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
+ String bind_host = EditorSettings::get_singleton()->get("network/debug/remote_host");
+ if (!p_uri.is_empty() && p_uri != "ws://") {
+ String scheme, path;
+ Error err = p_uri.parse_url(scheme, bind_host, bind_port, path);
+ ERR_FAIL_COND_V(err != OK, ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(!bind_host.is_valid_ip_address() && bind_host != "*", ERR_INVALID_PARAMETER);
+ }
+ server->set_bind_ip(bind_host);
Vector<String> compatible_protocols;
compatible_protocols.push_back("binary"); // compatibility with EMSCRIPTEN TCP-to-WebSocket layer.
- return server->listen(remote_port, compatible_protocols);
+ return server->listen(bind_port, compatible_protocols);
}
void EditorDebuggerServerWebSocket::stop() {
diff --git a/modules/websocket/editor_debugger_server_websocket.h b/modules/websocket/editor_debugger_server_websocket.h
index d9543bb647..14ab0109b2 100644
--- a/modules/websocket/editor_debugger_server_websocket.h
+++ b/modules/websocket/editor_debugger_server_websocket.h
@@ -48,7 +48,7 @@ public:
void _peer_disconnected(int p_peer, bool p_was_clean);
void poll() override;
- Error start() override;
+ Error start(const String &p_uri) override;
void stop() override;
bool is_active() const override;
bool is_connection_available() const override;
diff --git a/modules/websocket/websocket_multiplayer_peer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp
index 163cc7706b..3a27855a5e 100644
--- a/modules/websocket/websocket_multiplayer_peer.cpp
+++ b/modules/websocket/websocket_multiplayer_peer.cpp
@@ -105,23 +105,6 @@ Error WebSocketMultiplayerPeer::put_packet(const uint8_t *p_buffer, int p_buffer
//
// MultiplayerPeer
//
-void WebSocketMultiplayerPeer::set_transfer_channel(int p_channel) {
- // Websocket does not have channels.
-}
-
-int WebSocketMultiplayerPeer::get_transfer_channel() const {
- return 0;
-}
-
-void WebSocketMultiplayerPeer::set_transfer_mode(TransferMode p_mode) {
- // Websocket uses TCP, reliable
-}
-
-MultiplayerPeer::TransferMode WebSocketMultiplayerPeer::get_transfer_mode() const {
- // Websocket uses TCP, reliable
- return TRANSFER_MODE_RELIABLE;
-}
-
void WebSocketMultiplayerPeer::set_target_peer(int p_target_peer) {
_target_peer = p_target_peer;
}
@@ -137,14 +120,6 @@ int WebSocketMultiplayerPeer::get_unique_id() const {
return _peer_id;
}
-void WebSocketMultiplayerPeer::set_refuse_new_connections(bool p_enable) {
- _refusing = p_enable;
-}
-
-bool WebSocketMultiplayerPeer::is_refusing_new_connections() const {
- return _refusing;
-}
-
void WebSocketMultiplayerPeer::_send_sys(Ref<WebSocketPeer> p_peer, uint8_t p_type, int32_t p_peer_id) {
ERR_FAIL_COND(!p_peer.is_valid());
ERR_FAIL_COND(!p_peer->is_connected_to_host());
diff --git a/modules/websocket/websocket_multiplayer_peer.h b/modules/websocket/websocket_multiplayer_peer.h
index 0fee196f41..380edf67ed 100644
--- a/modules/websocket/websocket_multiplayer_peer.h
+++ b/modules/websocket/websocket_multiplayer_peer.h
@@ -32,7 +32,7 @@
#define WEBSOCKET_MULTIPLAYER_PEER_H
#include "core/error/error_list.h"
-#include "core/io/multiplayer_peer.h"
+#include "core/multiplayer/multiplayer_peer.h"
#include "core/templates/list.h"
#include "websocket_peer.h"
@@ -68,7 +68,6 @@ protected:
bool _is_multiplayer = false;
int _target_peer = 0;
int _peer_id = 0;
- int _refusing = false;
static void _bind_methods();
@@ -78,15 +77,9 @@ protected:
public:
/* MultiplayerPeer */
- void set_transfer_channel(int p_channel) override;
- int get_transfer_channel() const override;
- void set_transfer_mode(TransferMode p_mode) override;
- TransferMode get_transfer_mode() const override;
void set_target_peer(int p_target_peer) override;
int get_packet_peer() const override;
int get_unique_id() const override;
- void set_refuse_new_connections(bool p_enable) override;
- bool is_refusing_new_connections() const override;
/* PacketPeer */
virtual int get_available_packet_count() const override;
diff --git a/modules/websocket/wsl_client.cpp b/modules/websocket/wsl_client.cpp
index 49997b42d3..26c0176ea4 100644
--- a/modules/websocket/wsl_client.cpp
+++ b/modules/websocket/wsl_client.cpp
@@ -161,22 +161,28 @@ Error WSLClient::connect_to_host(String p_host, String p_path, uint16_t p_port,
ERR_FAIL_COND_V(p_path.is_empty(), ERR_INVALID_PARAMETER);
_peer = Ref<WSLPeer>(memnew(WSLPeer));
- IPAddress addr;
- if (!p_host.is_valid_ip_address()) {
- addr = IP::get_singleton()->resolve_hostname(p_host);
+ if (p_host.is_valid_ip_address()) {
+ ip_candidates.clear();
+ ip_candidates.push_back(IPAddress(p_host));
} else {
- addr = p_host;
+ ip_candidates = IP::get_singleton()->resolve_hostname_addresses(p_host);
}
- ERR_FAIL_COND_V(!addr.is_valid(), ERR_INVALID_PARAMETER);
+ ERR_FAIL_COND_V(ip_candidates.is_empty(), ERR_INVALID_PARAMETER);
String port = "";
if ((p_port != 80 && !p_ssl) || (p_port != 443 && p_ssl)) {
port = ":" + itos(p_port);
}
- Error err = _tcp->connect_to_host(addr, p_port);
+ Error err = ERR_BUG; // Should be at least one entry.
+ while (ip_candidates.size() > 0) {
+ err = _tcp->connect_to_host(ip_candidates.pop_front(), p_port);
+ if (err == OK) {
+ break;
+ }
+ }
if (err != OK) {
_tcp->disconnect_from_host();
_on_error();
@@ -185,6 +191,7 @@ Error WSLClient::connect_to_host(String p_host, String p_path, uint16_t p_port,
_connection = _tcp;
_use_ssl = p_ssl;
_host = p_host;
+ _port = p_port;
// Strip edges from protocols.
_protocols.resize(p_protocols.size());
String *pw = _protocols.ptrw();
@@ -244,6 +251,7 @@ void WSLClient::poll() {
_on_error();
break;
case StreamPeerTCP::STATUS_CONNECTED: {
+ ip_candidates.clear();
Ref<StreamPeerSSL> ssl;
if (_use_ssl) {
if (_connection == _tcp) {
@@ -274,6 +282,12 @@ void WSLClient::poll() {
_do_handshake();
} break;
case StreamPeerTCP::STATUS_ERROR:
+ while (ip_candidates.size() > 0) {
+ _tcp->disconnect_from_host();
+ if (_tcp->connect_to_host(ip_candidates.pop_front(), _port) == OK) {
+ return;
+ }
+ }
disconnect_from_host();
_on_error();
break;
@@ -315,6 +329,8 @@ void WSLClient::disconnect_from_host(int p_code, String p_reason) {
memset(_resp_buf, 0, sizeof(_resp_buf));
_resp_pos = 0;
+
+ ip_candidates.clear();
}
IPAddress WSLClient::get_connected_host() const {
diff --git a/modules/websocket/wsl_client.h b/modules/websocket/wsl_client.h
index 849639ee8b..3972977910 100644
--- a/modules/websocket/wsl_client.h
+++ b/modules/websocket/wsl_client.h
@@ -63,6 +63,8 @@ private:
String _key;
String _host;
+ int _port;
+ Array ip_candidates;
Vector<String> _protocols;
bool _use_ssl = false;
diff --git a/modules/webxr/doc_classes/WebXRInterface.xml b/modules/webxr/doc_classes/WebXRInterface.xml
index ff7c46bbae..16d671c9e9 100644
--- a/modules/webxr/doc_classes/WebXRInterface.xml
+++ b/modules/webxr/doc_classes/WebXRInterface.xml
@@ -239,6 +239,4 @@
</description>
</signal>
</signals>
- <constants>
- </constants>
</class>
diff --git a/modules/webxr/godot_webxr.h b/modules/webxr/godot_webxr.h
index 41a690f473..7aac0a6508 100644
--- a/modules/webxr/godot_webxr.h
+++ b/modules/webxr/godot_webxr.h
@@ -62,7 +62,7 @@ extern void godot_webxr_initialize(
extern void godot_webxr_uninitialize();
extern int godot_webxr_get_view_count();
-extern int *godot_webxr_get_render_targetsize();
+extern int *godot_webxr_get_render_target_size();
extern float *godot_webxr_get_transform_for_eye(int p_eye);
extern float *godot_webxr_get_projection_for_eye(int p_eye);
extern int godot_webxr_get_external_texture_for_eye(int p_eye);
diff --git a/modules/webxr/native/library_godot_webxr.js b/modules/webxr/native/library_godot_webxr.js
index 6e19a8ac6e..c4b21defce 100644
--- a/modules/webxr/native/library_godot_webxr.js
+++ b/modules/webxr/native/library_godot_webxr.js
@@ -406,9 +406,9 @@ const GodotWebXR = {
return GodotWebXR.pose.views.length;
},
- godot_webxr_get_render_targetsize__proxy: 'sync',
- godot_webxr_get_render_targetsize__sig: 'i',
- godot_webxr_get_render_targetsize: function () {
+ godot_webxr_get_render_target_size__proxy: 'sync',
+ godot_webxr_get_render_target_size__sig: 'i',
+ godot_webxr_get_render_target_size: function () {
if (!GodotWebXR.session || !GodotWebXR.pose) {
return 0;
}
diff --git a/modules/webxr/register_types.cpp b/modules/webxr/register_types.cpp
index 078a6547cf..16b483c39e 100644
--- a/modules/webxr/register_types.cpp
+++ b/modules/webxr/register_types.cpp
@@ -33,15 +33,34 @@
#include "webxr_interface.h"
#include "webxr_interface_js.h"
+#ifdef JAVASCRIPT_ENABLED
+Ref<WebXRInterfaceJS> webxr;
+#endif
+
void register_webxr_types() {
GDREGISTER_VIRTUAL_CLASS(WebXRInterface);
#ifdef JAVASCRIPT_ENABLED
- Ref<WebXRInterfaceJS> webxr;
webxr.instantiate();
XRServer::get_singleton()->add_interface(webxr);
#endif
}
void unregister_webxr_types() {
+#ifdef JAVASCRIPT_ENABLED
+ if (webxr.is_valid()) {
+ // uninitialise our interface if it is initialised
+ if (webxr->is_initialized()) {
+ webxr->uninitialize();
+ }
+
+ // unregister our interface from the XR server
+ if (XRServer::get_singleton()) {
+ XRServer::get_singleton()->remove_interface(webxr);
+ }
+
+ // and release
+ webxr.unref();
+ }
+#endif
}
diff --git a/modules/webxr/webxr_interface_js.cpp b/modules/webxr/webxr_interface_js.cpp
index 099e769303..10c17aa672 100644
--- a/modules/webxr/webxr_interface_js.cpp
+++ b/modules/webxr/webxr_interface_js.cpp
@@ -199,7 +199,7 @@ StringName WebXRInterfaceJS::get_name() const {
return "WebXR";
};
-int WebXRInterfaceJS::get_capabilities() const {
+uint32_t WebXRInterfaceJS::get_capabilities() const {
return XRInterface::XR_STEREO | XRInterface::XR_MONO;
};
@@ -254,9 +254,9 @@ bool WebXRInterfaceJS::initialize() {
void WebXRInterfaceJS::uninitialize() {
if (initialized) {
XRServer *xr_server = XRServer::get_singleton();
- if (xr_server != nullptr) {
+ if (xr_server != nullptr && xr_server->get_primary_interface() == this) {
// no longer our primary interface
- xr_server->clear_primary_interface_if(this);
+ xr_server->set_primary_interface(nullptr);
}
godot_webxr_uninitialize();
@@ -285,12 +285,12 @@ Transform3D WebXRInterfaceJS::_js_matrix_to_transform(float *p_js_matrix) {
return transform;
}
-Size2 WebXRInterfaceJS::get_render_targetsize() {
+Size2 WebXRInterfaceJS::get_render_target_size() {
if (render_targetsize.width != 0 && render_targetsize.height != 0) {
return render_targetsize;
}
- int *js_size = godot_webxr_get_render_targetsize();
+ int *js_size = godot_webxr_get_render_target_size();
if (!initialized || js_size == nullptr) {
// As a temporary default (until WebXR is fully initialized), use half the window size.
Size2 temp = DisplayServer::get_singleton()->window_get_size();
@@ -341,7 +341,7 @@ Transform3D WebXRInterfaceJS::get_transform_for_view(uint32_t p_view, const Tran
return p_cam_transform * xr_server->get_reference_frame() * transform_for_eye;
};
-CameraMatrix WebXRInterfaceJS::get_projection_for_view(uint32_t p_view, real_t p_aspect, real_t p_z_near, real_t p_z_far) {
+CameraMatrix WebXRInterfaceJS::get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) {
CameraMatrix eye;
float *js_matrix = godot_webxr_get_projection_for_eye(p_view + 1);
@@ -365,20 +365,6 @@ CameraMatrix WebXRInterfaceJS::get_projection_for_view(uint32_t p_view, real_t p
return eye;
}
-unsigned int WebXRInterfaceJS::get_external_texture_for_eye(XRInterface::Eyes p_eye) {
- if (!initialized) {
- return 0;
- }
- return godot_webxr_get_external_texture_for_eye(p_eye);
-}
-
-void WebXRInterfaceJS::commit_for_eye(XRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) {
- if (!initialized) {
- return;
- }
- godot_webxr_commit_for_eye(p_eye);
-}
-
Vector<BlitToScreen> WebXRInterfaceJS::commit_views(RID p_render_target, const Rect2 &p_screen_rect) {
Vector<BlitToScreen> blit_to_screen;
@@ -474,10 +460,6 @@ void WebXRInterfaceJS::_on_controller_changed() {
}
}
-void WebXRInterfaceJS::notification(int p_what) {
- // Nothing to do here.
-}
-
WebXRInterfaceJS::WebXRInterfaceJS() {
initialized = false;
session_mode = "inline";
diff --git a/modules/webxr/webxr_interface_js.h b/modules/webxr/webxr_interface_js.h
index f9368582b7..eb77f35f39 100644
--- a/modules/webxr/webxr_interface_js.h
+++ b/modules/webxr/webxr_interface_js.h
@@ -76,23 +76,20 @@ public:
virtual PackedVector3Array get_bounds_geometry() const override;
virtual StringName get_name() const override;
- virtual int get_capabilities() const override;
+ virtual uint32_t get_capabilities() const override;
virtual bool is_initialized() const override;
virtual bool initialize() override;
virtual void uninitialize() override;
- virtual Size2 get_render_targetsize() override;
+ virtual Size2 get_render_target_size() override;
virtual uint32_t get_view_count() override;
virtual Transform3D get_camera_transform() override;
virtual Transform3D get_transform_for_view(uint32_t p_view, const Transform3D &p_cam_transform) override;
- virtual CameraMatrix get_projection_for_view(uint32_t p_view, real_t p_aspect, real_t p_z_near, real_t p_z_far) override;
- virtual unsigned int get_external_texture_for_eye(XRInterface::Eyes p_eye) override;
- virtual void commit_for_eye(XRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) override;
+ virtual CameraMatrix get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) override;
virtual Vector<BlitToScreen> commit_views(RID p_render_target, const Rect2 &p_screen_rect) override;
virtual void process() override;
- virtual void notification(int p_what) override;
void _on_controller_changed();
diff --git a/platform/android/README.md b/platform/android/README.md
new file mode 100644
index 0000000000..343e588553
--- /dev/null
+++ b/platform/android/README.md
@@ -0,0 +1,14 @@
+# Android platform port
+
+This folder contains the Java and C++ (JNI) code for the Android platform port,
+using [Gradle](https://gradle.org/) as a build system.
+
+## Artwork license
+
+[`logo.png`](logo.png) and [`run_icon.png`](run_icon.png) are licensed under
+[Creative Commons Attribution 3.0 Unported](https://developer.android.com/distribute/marketing-tools/brand-guidelines#android_robot)
+per the Android logo usage guidelines:
+
+> The Android robot is reproduced or modified from work created and shared by
+> Google and used according to terms described in the Creative Commons 3.0
+> Attribution License.
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 7a993e9ca6..61ccad9ac3 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -93,7 +93,7 @@ def configure(env):
install_ndk_if_needed(env)
# Workaround for MinGW. See:
- # http://www.scons.org/wiki/LongCmdLinesOnWin32
+ # https://www.scons.org/wiki/LongCmdLinesOnWin32
if os.name == "nt":
import subprocess
diff --git a/platform/android/dir_access_jandroid.cpp b/platform/android/dir_access_jandroid.cpp
index 0bae090702..0eeee8215d 100644
--- a/platform/android/dir_access_jandroid.cpp
+++ b/platform/android/dir_access_jandroid.cpp
@@ -161,7 +161,7 @@ bool DirAccessJAndroid::dir_exists(String p_dir) {
if (current_dir == "")
sd = p_dir;
else {
- if (p_dir.is_rel_path())
+ if (p_dir.is_relative_path())
sd = current_dir.plus_file(p_dir);
else
sd = fix_path(p_dir);
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index fc86abb6f1..8df61831c2 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -48,6 +48,8 @@ void register_android_exporter() {
EDITOR_DEF("export/android/shutdown_adb_on_exit", true);
+ EDITOR_DEF("export/android/one_click_deploy_clear_previous_install", false);
+
Ref<EditorExportPlatformAndroid> exporter = Ref<EditorExportPlatformAndroid>(memnew(EditorExportPlatformAndroid));
EditorExport::get_singleton()->add_export_platform(exporter);
}
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index 8ed2d4e60a..60ba1c558a 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -221,6 +221,9 @@ static const LauncherIcon launcher_adaptive_icon_backgrounds[icon_densities_coun
static const int EXPORT_FORMAT_APK = 0;
static const int EXPORT_FORMAT_AAB = 1;
+static const char *APK_ASSETS_DIRECTORY = "res://android/build/assets";
+static const char *AAB_ASSETS_DIRECTORY = "res://android/build/assetPacks/installTime/src/main/assets";
+
void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) {
EditorExportPlatformAndroid *ea = (EditorExportPlatformAndroid *)ud;
@@ -426,6 +429,11 @@ String EditorExportPlatformAndroid::get_package_name(const String &p_package) co
return pname;
}
+String EditorExportPlatformAndroid::get_assets_directory(const Ref<EditorExportPreset> &p_preset) const {
+ int export_format = int(p_preset->get("custom_template/export_format"));
+ return export_format == EXPORT_FORMAT_AAB ? AAB_ASSETS_DIRECTORY : APK_ASSETS_DIRECTORY;
+}
+
bool EditorExportPlatformAndroid::is_package_name_valid(const String &p_package, String *r_error) const {
String pname = p_package;
@@ -977,6 +985,11 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref<EditorExportPreset> &p
Vector<int> feature_versions;
if (xr_mode_index == 1 /* XRMode.OVR */) {
+ // Set degrees of freedom
+ feature_names.push_back("android.hardware.vr.headtracking");
+ feature_required_list.push_back(true);
+ feature_versions.push_back(1);
+
// Check for hand tracking
int hand_tracking_index = p_preset->get("xr_features/hand_tracking"); // 0: none, 1: optional, 2: required
if (hand_tracking_index > 0) {
@@ -1646,8 +1659,6 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/release_user"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/release_password"), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "one_click_deploy/clear_previous_install"), false));
-
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "version/code", PROPERTY_HINT_RANGE, "1,4096,1,or_greater"), 1));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "version/name"), "1.0"));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "package/unique_name", PROPERTY_HINT_PLACEHOLDER_TEXT, "ext.domain.name"), "org.godotengine.$genname"));
@@ -1794,7 +1805,7 @@ Error EditorExportPlatformAndroid::run(const Ref<EditorExportPreset> &p_preset,
int rv;
String output;
- bool remove_prev = p_preset->get("one_click_deploy/clear_previous_install");
+ bool remove_prev = EDITOR_GET("export/android/one_click_deploy_clear_previous_install");
String version_name = p_preset->get("version/name");
String package_name = p_preset->get("package/unique_name");
@@ -2332,11 +2343,21 @@ Error EditorExportPlatformAndroid::sign_apk(const Ref<EditorExportPreset> &p_pre
void EditorExportPlatformAndroid::_clear_assets_directory() {
DirAccessRef da_res = DirAccess::create(DirAccess::ACCESS_RESOURCES);
- if (da_res->dir_exists("res://android/build/assets")) {
- print_verbose("Clearing assets directory..");
- DirAccessRef da_assets = DirAccess::open("res://android/build/assets");
+
+ // Clear the APK assets directory
+ if (da_res->dir_exists(APK_ASSETS_DIRECTORY)) {
+ print_verbose("Clearing APK assets directory..");
+ DirAccessRef da_assets = DirAccess::open(APK_ASSETS_DIRECTORY);
+ da_assets->erase_contents_recursive();
+ da_res->remove(APK_ASSETS_DIRECTORY);
+ }
+
+ // Clear the AAB assets directory
+ if (da_res->dir_exists(AAB_ASSETS_DIRECTORY)) {
+ print_verbose("Clearing AAB assets directory..");
+ DirAccessRef da_assets = DirAccess::open(AAB_ASSETS_DIRECTORY);
da_assets->erase_contents_recursive();
- da_res->remove("res://android/build/assets");
+ da_res->remove(AAB_ASSETS_DIRECTORY);
}
}
@@ -2456,6 +2477,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
return ERR_UNCONFIGURED;
}
}
+ const String assets_directory = get_assets_directory(p_preset);
String sdk_path = EDITOR_GET("export/android/android_sdk_path");
ERR_FAIL_COND_V_MSG(sdk_path.is_empty(), ERR_UNCONFIGURED, "Android SDK path must be configured in Editor Settings at 'export/android/android_sdk_path'.");
print_verbose("Android sdk path: " + sdk_path);
@@ -2477,6 +2499,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
if (!apk_expansion) {
print_verbose("Exporting project files..");
CustomExportData user_data;
+ user_data.assets_directory = assets_directory;
user_data.debug = p_debug;
err = export_project_files(p_preset, rename_and_store_file_in_gradle_project, &user_data, copy_gradle_so);
if (err != OK) {
@@ -2498,7 +2521,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
}
}
print_verbose("Storing command line flags..");
- store_file_at_path("res://android/build/assets/_cl_", command_line_flags);
+ store_file_at_path(assets_directory + "/_cl_", command_line_flags);
print_verbose("Updating ANDROID_HOME environment to " + sdk_path);
OS::get_singleton()->set_environment("ANDROID_HOME", sdk_path); //set and overwrite if required
@@ -2611,7 +2634,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
String export_filename = p_path.get_file();
String export_path = p_path.get_base_dir();
- if (export_path.is_rel_path()) {
+ if (export_path.is_relative_path()) {
export_path = OS::get_singleton()->get_resource_dir().plus_file(export_path);
}
export_path = ProjectSettings::get_singleton()->globalize_path(export_path).simplify_path();
@@ -2939,7 +2962,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
void EditorExportPlatformAndroid::get_platform_features(List<String> *r_features) {
r_features->push_back("mobile");
- r_features->push_back("Android");
+ r_features->push_back("android");
}
void EditorExportPlatformAndroid::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) {
diff --git a/platform/android/export/export_plugin.h b/platform/android/export/export_plugin.h
index b061ee4e04..d33f616f11 100644
--- a/platform/android/export/export_plugin.h
+++ b/platform/android/export/export_plugin.h
@@ -87,11 +87,6 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
EditorProgress *ep = nullptr;
};
- struct CustomExportData {
- bool debug;
- Vector<String> libs;
- };
-
Vector<PluginConfigAndroid> plugins;
String last_plugin_names;
uint64_t last_custom_build_time = 0;
@@ -109,6 +104,8 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
String get_package_name(const String &p_package) const;
+ String get_assets_directory(const Ref<EditorExportPreset> &p_preset) const;
+
bool is_package_name_valid(const String &p_package, String *r_error = nullptr) const;
static bool _should_compress_asset(const String &p_path, const Vector<uint8_t> &p_data);
diff --git a/platform/android/export/gradle_export_util.cpp b/platform/android/export/gradle_export_util.cpp
index b9e28a7937..851bd0ac52 100644
--- a/platform/android/export/gradle_export_util.cpp
+++ b/platform/android/export/gradle_export_util.cpp
@@ -121,7 +121,8 @@ Error store_string_at_path(const String &p_path, const String &p_data) {
// It's functionality mirrors that of the method save_apk_file.
// This method will be called ONLY when custom build is enabled.
Error rename_and_store_file_in_gradle_project(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key) {
- String dst_path = p_path.replace_first("res://", "res://android/build/assets/");
+ CustomExportData *export_data = (CustomExportData *)p_userdata;
+ String dst_path = p_path.replace_first("res://", export_data->assets_directory + "/");
print_verbose("Saving project files from " + p_path + " into " + dst_path);
Error err = store_file_at_path(dst_path, p_data);
return err;
@@ -197,6 +198,8 @@ String _get_xr_features_tag(const Ref<EditorExportPreset> &p_preset) {
String manifest_xr_features;
bool uses_xr = (int)(p_preset->get("xr_features/xr_mode")) == 1;
if (uses_xr) {
+ manifest_xr_features += " <uses-feature tools:node=\"replace\" android:name=\"android.hardware.vr.headtracking\" android:required=\"true\" android:version=\"1\" />\n";
+
int hand_tracking_index = p_preset->get("xr_features/hand_tracking"); // 0: none, 1: optional, 2: required
if (hand_tracking_index == 1) {
manifest_xr_features += " <uses-feature tools:node=\"replace\" android:name=\"oculus.software.handtracking\" android:required=\"false\" />\n";
@@ -228,7 +231,9 @@ String _get_activity_tag(const Ref<EditorExportPreset> &p_preset) {
"tools:replace=\"android:screenOrientation\" "
"android:screenOrientation=\"%s\">\n",
orientation);
- if (!uses_xr) {
+ if (uses_xr) {
+ manifest_activity_text += " <meta-data tools:node=\"replace\" android:name=\"com.oculus.vr.focusaware\" android:value=\"true\" />\n";
+ } else {
manifest_activity_text += " <meta-data tools:node=\"remove\" android:name=\"com.oculus.vr.focusaware\" />\n";
}
manifest_activity_text += " </activity>\n";
diff --git a/platform/android/export/gradle_export_util.h b/platform/android/export/gradle_export_util.h
index 8a93c25d79..744022f1f9 100644
--- a/platform/android/export/gradle_export_util.h
+++ b/platform/android/export/gradle_export_util.h
@@ -44,6 +44,12 @@ const String godot_project_name_xml_string = R"(<?xml version="1.0" encoding="ut
</resources>
)";
+struct CustomExportData {
+ String assets_directory;
+ bool debug;
+ Vector<String> libs;
+};
+
int _get_android_orientation_value(DisplayServer::ScreenOrientation screen_orientation);
String _get_android_orientation_label(DisplayServer::ScreenOrientation screen_orientation);
diff --git a/platform/android/java/app/AndroidManifest.xml b/platform/android/java/app/AndroidManifest.xml
index 00e01884cf..d7bf6cef30 100644
--- a/platform/android/java/app/AndroidManifest.xml
+++ b/platform/android/java/app/AndroidManifest.xml
@@ -49,6 +49,10 @@
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
+
+ <!-- Enable access to OpenXR on Oculus mobile devices, no-op on other Android
+ platforms. -->
+ <category android:name="com.oculus.intent.category.VR" />
</intent-filter>
</activity>
diff --git a/platform/android/java/app/assetPacks/installTime/build.gradle b/platform/android/java/app/assetPacks/installTime/build.gradle
new file mode 100644
index 0000000000..b06faac374
--- /dev/null
+++ b/platform/android/java/app/assetPacks/installTime/build.gradle
@@ -0,0 +1,8 @@
+apply plugin: 'com.android.asset-pack'
+
+assetPack {
+ packName = "installTime" // Directory name for the asset pack
+ dynamicDelivery {
+ deliveryType = "install-time" // Delivery mode
+ }
+}
diff --git a/platform/android/java/app/build.gradle b/platform/android/java/app/build.gradle
index 18e07c3762..a391a3ca9a 100644
--- a/platform/android/java/app/build.gradle
+++ b/platform/android/java/app/build.gradle
@@ -34,9 +34,8 @@ allprojects {
}
dependencies {
- implementation libraries.supportCoreUtils
implementation libraries.kotlinStdLib
- implementation libraries.v4Support
+ implementation libraries.androidxFragment
if (rootProject.findProject(":lib")) {
implementation project(":lib")
@@ -73,6 +72,8 @@ android {
targetCompatibility versions.javaVersion
}
+ assetPacks = [":assetPacks:installTime"]
+
defaultConfig {
// The default ignore pattern for the 'assets' directory includes hidden files and directories which are used by Godot projects.
aaptOptions {
diff --git a/platform/android/java/app/config.gradle b/platform/android/java/app/config.gradle
index fad64c675f..fcee54e493 100644
--- a/platform/android/java/app/config.gradle
+++ b/platform/android/java/app/config.gradle
@@ -4,9 +4,8 @@ ext.versions = [
minSdk : 19,
targetSdk : 30,
buildTools : '30.0.3',
- supportCoreUtils : '1.0.0',
kotlinVersion : '1.5.10',
- v4Support : '1.0.0',
+ fragmentVersion : '1.3.6',
javaVersion : 1.8,
ndkVersion : '21.4.7075529' // Also update 'platform/android/detect.py#get_project_ndk_version()' when this is updated.
@@ -14,10 +13,9 @@ ext.versions = [
ext.libraries = [
androidGradlePlugin: "com.android.tools.build:gradle:$versions.androidGradlePlugin",
- supportCoreUtils : "androidx.legacy:legacy-support-core-utils:$versions.supportCoreUtils",
kotlinGradlePlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlinVersion",
kotlinStdLib : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlinVersion",
- v4Support : "androidx.legacy:legacy-support-v4:$versions.v4Support"
+ androidxFragment : "androidx.fragment:fragment:$versions.fragmentVersion",
]
ext.getExportPackageName = { ->
diff --git a/platform/android/java/app/gradle.properties b/platform/android/java/app/gradle.properties
index 19587bd81f..0ad8e611ca 100644
--- a/platform/android/java/app/gradle.properties
+++ b/platform/android/java/app/gradle.properties
@@ -4,7 +4,7 @@
# where otherwise specified.
# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
+# https://www.gradle.org/docs/current/userguide/build_environment.html
android.enableJetifier=true
android.useAndroidX=true
@@ -15,7 +15,7 @@ org.gradle.jvmargs=-Xmx4536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# https://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
org.gradle.warning.mode=all
diff --git a/platform/android/java/app/settings.gradle b/platform/android/java/app/settings.gradle
index 33b863c7bf..e38d7b2ba6 100644
--- a/platform/android/java/app/settings.gradle
+++ b/platform/android/java/app/settings.gradle
@@ -1,2 +1,2 @@
-// Empty settings.gradle file to denote this directory as being the root project
-// of the Godot custom build.
+// This is the root directory of the Godot custom build.
+include ':assetPacks:installTime'
diff --git a/platform/android/java/gradle.properties b/platform/android/java/gradle.properties
index b51a19a005..5cd94e85d9 100644
--- a/platform/android/java/gradle.properties
+++ b/platform/android/java/gradle.properties
@@ -7,7 +7,7 @@
# any settings specified in this file.
# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
+# https://www.gradle.org/docs/current/userguide/build_environment.html
android.enableJetifier=true
android.useAndroidX=true
@@ -18,7 +18,7 @@ org.gradle.jvmargs=-Xmx4536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# https://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
org.gradle.warning.mode=all
diff --git a/platform/android/java/lib/build.gradle b/platform/android/java/lib/build.gradle
index 663ba73d40..fbed4ed078 100644
--- a/platform/android/java/lib/build.gradle
+++ b/platform/android/java/lib/build.gradle
@@ -2,9 +2,8 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
dependencies {
- implementation libraries.supportCoreUtils
implementation libraries.kotlinStdLib
- implementation libraries.v4Support
+ implementation libraries.androidxFragment
}
def pathToRootDir = "../../../../"
diff --git a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/Helpers.java b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/Helpers.java
index 2a72c9818d..9aa65fd786 100644
--- a/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/Helpers.java
+++ b/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/Helpers.java
@@ -54,7 +54,7 @@ public class Helpers {
/*
* Parse the Content-Disposition HTTP Header. The format of the header is defined here:
- * http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html This header provides a filename for
+ * https://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html This header provides a filename for
* content that is going to be downloaded to the file system. We only support the attachment
* type.
*/
diff --git a/platform/android/java/lib/src/org/godotengine/godot/FullScreenGodotApp.java b/platform/android/java/lib/src/org/godotengine/godot/FullScreenGodotApp.java
index ad7048cbf3..3600706c7c 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/FullScreenGodotApp.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/FullScreenGodotApp.java
@@ -30,6 +30,7 @@
package org.godotengine.godot;
+import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
@@ -86,6 +87,26 @@ public abstract class FullScreenGodotApp extends FragmentActivity implements God
}
@Override
+ public final void onGodotRestartRequested(Godot instance) {
+ if (instance == godotFragment) {
+ // HACK:
+ //
+ // Currently it's very hard to properly deinitialize Godot on Android to restart the game
+ // from scratch. Therefore, we need to kill the whole app process and relaunch it.
+ //
+ // Restarting only the activity, wouldn't be enough unless it did proper cleanup (including
+ // releasing and reloading native libs or resetting their state somehow and clearing statics).
+ //
+ // Using instrumentation is a way of making the whole app process restart, because Android
+ // will kill any process of the same package which was already running.
+ //
+ Bundle args = new Bundle();
+ args.putParcelable("intent", getIntent());
+ startInstrumentation(new ComponentName(this, GodotInstrumentation.class), null, args);
+ }
+ }
+
+ @Override
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
if (godotFragment != null) {
diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.java b/platform/android/java/lib/src/org/godotengine/godot/Godot.java
index 317175858b..70bc73b9ad 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.java
@@ -295,7 +295,11 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
View pluginView = plugin.onMainCreate(activity);
if (pluginView != null) {
- containerLayout.addView(pluginView);
+ if (plugin.shouldBeOnTop()) {
+ containerLayout.addView(pluginView);
+ } else {
+ containerLayout.addView(pluginView, 0);
+ }
}
}
}
@@ -317,7 +321,7 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
@SuppressLint("MissingPermission")
@Keep
private void vibrate(int durationMs) {
- if (requestPermission("VIBRATE")) {
+ if (durationMs > 0 && requestPermission("VIBRATE")) {
Vibrator v = (Vibrator)getContext().getSystemService(Context.VIBRATOR_SERVICE);
if (v != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@@ -331,22 +335,8 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
}
public void restart() {
- // HACK:
- //
- // Currently it's very hard to properly deinitialize Godot on Android to restart the game
- // from scratch. Therefore, we need to kill the whole app process and relaunch it.
- //
- // Restarting only the activity, wouldn't be enough unless it did proper cleanup (including
- // releasing and reloading native libs or resetting their state somehow and clearing statics).
- //
- // Using instrumentation is a way of making the whole app process restart, because Android
- // will kill any process of the same package which was already running.
- //
- final Activity activity = getActivity();
- if (activity != null) {
- Bundle args = new Bundle();
- args.putParcelable("intent", mCurrentIntent);
- activity.startInstrumentation(new ComponentName(activity, GodotInstrumentation.class), null, args);
+ if (godotHost != null) {
+ godotHost.onGodotRestartRequested(this);
}
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java b/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java
index 58e982c569..7b22895994 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java
@@ -58,4 +58,10 @@ public interface GodotHost {
* Invoked on the UI thread as the last step of the Godot instance clean up phase.
*/
default void onGodotForceQuit(Godot instance) {}
+
+ /**
+ * Invoked on the GL thread when the Godot instance wants to be restarted. It's up to the host
+ * to perform the appropriate action(s).
+ */
+ default void onGodotRestartRequested(Godot instance) {}
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
index 2dc8359615..4536c21ed3 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
@@ -191,6 +191,9 @@ public abstract class GodotPlugin {
* The plugin can return a non-null {@link View} layout in order to add it to the Godot view
* hierarchy.
*
+ * Use shouldBeOnTop() to set whether the plugin's {@link View} should be added on top or behind
+ * the main Godot view.
+ *
* @see Activity#onCreate(Bundle)
* @return the plugin's view to be included; null if no views should be included.
*/
@@ -311,6 +314,17 @@ public abstract class GodotPlugin {
}
/**
+ * Returns whether the plugin's {@link View} returned in onMainCreate() should be placed on
+ * top of the main Godot view.
+ *
+ * Returning false causes the plugin's {@link View} to be placed behind, which can be useful
+ * when used with transparency in order to let the Godot view handle inputs.
+ */
+ public boolean shouldBeOnTop() {
+ return true;
+ }
+
+ /**
* Runs the specified action on the UI thread. If the current thread is the UI
* thread, then the action is executed immediately. If the current thread is
* not the UI thread, the action is posted to the event queue of the UI thread.
diff --git a/platform/android/java/settings.gradle b/platform/android/java/settings.gradle
index 524031d93f..584b626900 100644
--- a/platform/android/java/settings.gradle
+++ b/platform/android/java/settings.gradle
@@ -4,3 +4,6 @@ rootProject.name = "Godot"
include ':app'
include ':lib'
include ':nativeSrcsConfigs'
+
+include ':assetPacks:installTime'
+project(':assetPacks:installTime').projectDir = file("app/assetPacks/installTime")
diff --git a/platform/android/logo.png b/platform/android/logo.png
index f44d360a25..9c8be93646 100644
--- a/platform/android/logo.png
+++ b/platform/android/logo.png
Binary files differ
diff --git a/platform/iphone/export/export_plugin.h b/platform/iphone/export/export_plugin.h
index 8d3af6e057..359f855d86 100644
--- a/platform/iphone/export/export_plugin.h
+++ b/platform/iphone/export/export_plugin.h
@@ -204,7 +204,7 @@ public:
virtual void get_platform_features(List<String> *r_features) override {
r_features->push_back("mobile");
- r_features->push_back("iOS");
+ r_features->push_back("ios");
}
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override {
diff --git a/platform/javascript/.eslintrc.js b/platform/javascript/.eslintrc.js
index 0ff9d67d26..2c81f1f02d 100644
--- a/platform/javascript/.eslintrc.js
+++ b/platform/javascript/.eslintrc.js
@@ -39,5 +39,13 @@ module.exports = {
// Closure compiler (exported properties)
"quote-props": ["error", "consistent"],
"dot-notation": "off",
+ // No comma dangle for functions (it's madness, and ES2017)
+ "comma-dangle": ["error", {
+ "arrays": "always-multiline",
+ "objects": "always-multiline",
+ "imports": "always-multiline",
+ "exports": "always-multiline",
+ "functions": "never"
+ }],
}
};
diff --git a/platform/javascript/README.md b/platform/javascript/README.md
new file mode 100644
index 0000000000..f181bea9e0
--- /dev/null
+++ b/platform/javascript/README.md
@@ -0,0 +1,15 @@
+# HTML5 platform port
+
+This folder contains the C++ and JavaScript code for the HTML5/WebAssembly platform port,
+compiled using [Emscripten](https://emscripten.org/).
+
+It also contains a ESLint linting setup (see [`package.json`](package.json)).
+
+See also [`misc/dist/html`](/misc/dist/html) folder for files used by this platform
+such as the HTML5 shell.
+
+## Artwork license
+
+[`logo.png`](logo.png) and [`run_icon.png`](run_icon.png) are licensed under
+[Creative Commons Attribution 3.0 Unported](https://www.w3.org/html/logo/faq.html#how-licenced)
+per the HTML5 logo usage guidelines.
diff --git a/platform/javascript/api/javascript_tools_editor_plugin.cpp b/platform/javascript/api/javascript_tools_editor_plugin.cpp
index 54f541f607..45a2cd595a 100644
--- a/platform/javascript/api/javascript_tools_editor_plugin.cpp
+++ b/platform/javascript/api/javascript_tools_editor_plugin.cpp
@@ -35,6 +35,7 @@
#include "core/config/project_settings.h"
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
+#include "core/os/time.h"
#include "editor/editor_node.h"
#include <emscripten/emscripten.h>
@@ -58,23 +59,40 @@ JavaScriptToolsEditorPlugin::JavaScriptToolsEditorPlugin(EditorNode *p_editor) {
void JavaScriptToolsEditorPlugin::_download_zip(Variant p_v) {
if (!Engine::get_singleton() || !Engine::get_singleton()->is_editor_hint()) {
- WARN_PRINT("Project download is only available in Editor mode");
+ ERR_PRINT("Downloading the project as a ZIP archive is only available in Editor mode.");
return;
}
String resource_path = ProjectSettings::get_singleton()->get_resource_path();
FileAccess *src_f;
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
- zipFile zip = zipOpen2("/tmp/project.zip", APPEND_STATUS_CREATE, nullptr, &io);
- String base_path = resource_path.substr(0, resource_path.rfind("/")) + "/";
+
+ // Name the downloded ZIP file to contain the project name and download date for easier organization.
+ // Replace characters not allowed (or risky) in Windows file names with safe characters.
+ // In the project name, all invalid characters become an empty string so that a name
+ // like "Platformer 2: Godette's Revenge" becomes "platformer_2-_godette-s_revenge".
+ const String project_name = GLOBAL_GET("application/config/name");
+ const String project_name_safe = project_name.to_lower().replace(" ", "_");
+ const String datetime_safe =
+ Time::get_singleton()->get_datetime_string_from_system(false, true).replace(" ", "_");
+ const String output_name = OS::get_singleton()->get_safe_dir_name(vformat("%s_%s.zip"));
+ const String output_path = String("/tmp").plus_file(output_name);
+
+ zipFile zip = zipOpen2(output_path.utf8().get_data(), APPEND_STATUS_CREATE, nullptr, &io);
+ const String base_path = resource_path.substr(0, resource_path.rfind("/")) + "/";
_zip_recursive(resource_path, base_path, zip);
zipClose(zip, nullptr);
- FileAccess *f = FileAccess::open("/tmp/project.zip", FileAccess::READ);
- ERR_FAIL_COND_MSG(!f, "Unable to create zip file");
+ FileAccess *f = FileAccess::open(output_path, FileAccess::READ);
+ ERR_FAIL_COND_MSG(!f, "Unable to create ZIP file.");
Vector<uint8_t> buf;
buf.resize(f->get_length());
f->get_buffer(buf.ptrw(), buf.size());
- godot_js_os_download_buffer(buf.ptr(), buf.size(), "project.zip", "application/zip");
+ godot_js_os_download_buffer(buf.ptr(), buf.size(), output_name.utf8().get_data(), "application/zip");
+
+ f->close();
+ memdelete(f);
+ // Remove the temporary file since it was sent to the user's native filesystem as a download.
+ DirAccess::remove_file_or_error(output_path);
}
void JavaScriptToolsEditorPlugin::_zip_file(String p_path, String p_base_path, zipFile p_zip) {
@@ -108,7 +126,7 @@ void JavaScriptToolsEditorPlugin::_zip_file(String p_path, String p_base_path, z
void JavaScriptToolsEditorPlugin::_zip_recursive(String p_path, String p_base_path, zipFile p_zip) {
DirAccess *dir = DirAccess::open(p_path);
if (!dir) {
- WARN_PRINT("Unable to open dir for zipping: " + p_path);
+ WARN_PRINT("Unable to open directory for zipping: " + p_path);
return;
}
dir->list_dir_begin();
diff --git a/platform/javascript/audio_driver_javascript.cpp b/platform/javascript/audio_driver_javascript.cpp
index 478e848675..cfe6c69072 100644
--- a/platform/javascript/audio_driver_javascript.cpp
+++ b/platform/javascript/audio_driver_javascript.cpp
@@ -34,22 +34,18 @@
#include <emscripten.h>
-AudioDriverJavaScript *AudioDriverJavaScript::singleton = nullptr;
+AudioDriverJavaScript::AudioContext AudioDriverJavaScript::audio_context;
bool AudioDriverJavaScript::is_available() {
return godot_audio_is_available() != 0;
}
-const char *AudioDriverJavaScript::get_name() const {
- return "JavaScript";
-}
-
void AudioDriverJavaScript::_state_change_callback(int p_state) {
- singleton->state = p_state;
+ AudioDriverJavaScript::audio_context.state = p_state;
}
void AudioDriverJavaScript::_latency_update_callback(float p_latency) {
- singleton->output_latency = p_latency;
+ AudioDriverJavaScript::audio_context.output_latency = p_latency;
}
void AudioDriverJavaScript::_audio_driver_process(int p_from, int p_samples) {
@@ -105,17 +101,19 @@ void AudioDriverJavaScript::_audio_driver_capture(int p_from, int p_samples) {
}
Error AudioDriverJavaScript::init() {
- mix_rate = GLOBAL_GET("audio/driver/mix_rate");
int latency = GLOBAL_GET("audio/driver/output_latency");
-
- channel_count = godot_audio_init(mix_rate, latency, &_state_change_callback, &_latency_update_callback);
+ if (!audio_context.inited) {
+ audio_context.mix_rate = GLOBAL_GET("audio/driver/mix_rate");
+ audio_context.channel_count = godot_audio_init(&audio_context.mix_rate, latency, &_state_change_callback, &_latency_update_callback);
+ audio_context.inited = true;
+ }
+ mix_rate = audio_context.mix_rate;
+ channel_count = audio_context.channel_count;
buffer_length = closest_power_of_2((latency * mix_rate / 1000));
-#ifndef NO_THREADS
- node = memnew(WorkletNode);
-#else
- node = memnew(ScriptProcessorNode);
-#endif
- buffer_length = node->create(buffer_length, channel_count);
+ Error err = create(buffer_length, channel_count);
+ if (err != OK) {
+ return err;
+ }
if (output_rb) {
memdelete_arr(output_rb);
}
@@ -134,19 +132,17 @@ Error AudioDriverJavaScript::init() {
}
void AudioDriverJavaScript::start() {
- if (node) {
- node->start(output_rb, memarr_len(output_rb), input_rb, memarr_len(input_rb));
- }
+ start(output_rb, memarr_len(output_rb), input_rb, memarr_len(input_rb));
}
void AudioDriverJavaScript::resume() {
- if (state == 0) { // 'suspended'
+ if (audio_context.state == 0) { // 'suspended'
godot_audio_resume();
}
}
float AudioDriverJavaScript::get_latency() {
- return output_latency + (float(buffer_length) / mix_rate);
+ return audio_context.output_latency + (float(buffer_length) / mix_rate);
}
int AudioDriverJavaScript::get_mix_rate() const {
@@ -157,24 +153,8 @@ AudioDriver::SpeakerMode AudioDriverJavaScript::get_speaker_mode() const {
return get_speaker_mode_by_total_channels(channel_count);
}
-void AudioDriverJavaScript::lock() {
- if (node) {
- node->unlock();
- }
-}
-
-void AudioDriverJavaScript::unlock() {
- if (node) {
- node->unlock();
- }
-}
-
void AudioDriverJavaScript::finish() {
- if (node) {
- node->finish();
- memdelete(node);
- node = nullptr;
- }
+ finish_driver();
if (output_rb) {
memdelete_arr(output_rb);
output_rb = nullptr;
@@ -203,41 +183,66 @@ Error AudioDriverJavaScript::capture_stop() {
return OK;
}
-AudioDriverJavaScript::AudioDriverJavaScript() {
- singleton = this;
-}
-
#ifdef NO_THREADS
/// ScriptProcessorNode implementation
-void AudioDriverJavaScript::ScriptProcessorNode::_process_callback() {
- AudioDriverJavaScript::singleton->_audio_driver_capture();
- AudioDriverJavaScript::singleton->_audio_driver_process();
+AudioDriverScriptProcessor *AudioDriverScriptProcessor::singleton = nullptr;
+
+void AudioDriverScriptProcessor::_process_callback() {
+ AudioDriverScriptProcessor::singleton->_audio_driver_capture();
+ AudioDriverScriptProcessor::singleton->_audio_driver_process();
}
-int AudioDriverJavaScript::ScriptProcessorNode::create(int p_buffer_samples, int p_channels) {
- return godot_audio_script_create(p_buffer_samples, p_channels);
+Error AudioDriverScriptProcessor::create(int &p_buffer_samples, int p_channels) {
+ if (!godot_audio_has_script_processor()) {
+ return ERR_UNAVAILABLE;
+ }
+ return (Error)godot_audio_script_create(&p_buffer_samples, p_channels);
}
-void AudioDriverJavaScript::ScriptProcessorNode::start(float *p_out_buf, int p_out_buf_size, float *p_in_buf, int p_in_buf_size) {
+void AudioDriverScriptProcessor::start(float *p_out_buf, int p_out_buf_size, float *p_in_buf, int p_in_buf_size) {
godot_audio_script_start(p_in_buf, p_in_buf_size, p_out_buf, p_out_buf_size, &_process_callback);
}
+
+/// AudioWorkletNode implementation (no threads)
+AudioDriverWorklet *AudioDriverWorklet::singleton = nullptr;
+
+Error AudioDriverWorklet::create(int &p_buffer_size, int p_channels) {
+ if (!godot_audio_has_worklet()) {
+ return ERR_UNAVAILABLE;
+ }
+ return (Error)godot_audio_worklet_create(p_channels);
+}
+
+void AudioDriverWorklet::start(float *p_out_buf, int p_out_buf_size, float *p_in_buf, int p_in_buf_size) {
+ _audio_driver_process();
+ godot_audio_worklet_start_no_threads(p_out_buf, p_out_buf_size, &_process_callback, p_in_buf, p_in_buf_size, &_capture_callback);
+}
+
+void AudioDriverWorklet::_process_callback(int p_pos, int p_samples) {
+ AudioDriverWorklet *driver = AudioDriverWorklet::singleton;
+ driver->_audio_driver_process(p_pos, p_samples);
+}
+
+void AudioDriverWorklet::_capture_callback(int p_pos, int p_samples) {
+ AudioDriverWorklet *driver = AudioDriverWorklet::singleton;
+ driver->_audio_driver_capture(p_pos, p_samples);
+}
#else
-/// AudioWorkletNode implementation
-void AudioDriverJavaScript::WorkletNode::_audio_thread_func(void *p_data) {
- AudioDriverJavaScript::WorkletNode *obj = static_cast<AudioDriverJavaScript::WorkletNode *>(p_data);
- AudioDriverJavaScript *driver = AudioDriverJavaScript::singleton;
- const int out_samples = memarr_len(driver->output_rb);
- const int in_samples = memarr_len(driver->input_rb);
+/// AudioWorkletNode implementation (threads)
+void AudioDriverWorklet::_audio_thread_func(void *p_data) {
+ AudioDriverWorklet *driver = static_cast<AudioDriverWorklet *>(p_data);
+ const int out_samples = memarr_len(driver->get_output_rb());
+ const int in_samples = memarr_len(driver->get_input_rb());
int wpos = 0;
int to_write = out_samples;
int rpos = 0;
int to_read = 0;
int32_t step = 0;
- while (!obj->quit) {
+ while (!driver->quit) {
if (to_read) {
driver->lock();
driver->_audio_driver_capture(rpos, to_read);
- godot_audio_worklet_state_add(obj->state, STATE_SAMPLES_IN, -to_read);
+ godot_audio_worklet_state_add(driver->state, STATE_SAMPLES_IN, -to_read);
driver->unlock();
rpos += to_read;
if (rpos >= in_samples) {
@@ -247,38 +252,40 @@ void AudioDriverJavaScript::WorkletNode::_audio_thread_func(void *p_data) {
if (to_write) {
driver->lock();
driver->_audio_driver_process(wpos, to_write);
- godot_audio_worklet_state_add(obj->state, STATE_SAMPLES_OUT, to_write);
+ godot_audio_worklet_state_add(driver->state, STATE_SAMPLES_OUT, to_write);
driver->unlock();
wpos += to_write;
if (wpos >= out_samples) {
wpos -= out_samples;
}
}
- step = godot_audio_worklet_state_wait(obj->state, STATE_PROCESS, step, 1);
- to_write = out_samples - godot_audio_worklet_state_get(obj->state, STATE_SAMPLES_OUT);
- to_read = godot_audio_worklet_state_get(obj->state, STATE_SAMPLES_IN);
+ step = godot_audio_worklet_state_wait(driver->state, STATE_PROCESS, step, 1);
+ to_write = out_samples - godot_audio_worklet_state_get(driver->state, STATE_SAMPLES_OUT);
+ to_read = godot_audio_worklet_state_get(driver->state, STATE_SAMPLES_IN);
}
}
-int AudioDriverJavaScript::WorkletNode::create(int p_buffer_size, int p_channels) {
- godot_audio_worklet_create(p_channels);
- return p_buffer_size;
+Error AudioDriverWorklet::create(int &p_buffer_size, int p_channels) {
+ if (!godot_audio_has_worklet()) {
+ return ERR_UNAVAILABLE;
+ }
+ return (Error)godot_audio_worklet_create(p_channels);
}
-void AudioDriverJavaScript::WorkletNode::start(float *p_out_buf, int p_out_buf_size, float *p_in_buf, int p_in_buf_size) {
+void AudioDriverWorklet::start(float *p_out_buf, int p_out_buf_size, float *p_in_buf, int p_in_buf_size) {
godot_audio_worklet_start(p_in_buf, p_in_buf_size, p_out_buf, p_out_buf_size, state);
thread.start(_audio_thread_func, this);
}
-void AudioDriverJavaScript::WorkletNode::lock() {
+void AudioDriverWorklet::lock() {
mutex.lock();
}
-void AudioDriverJavaScript::WorkletNode::unlock() {
+void AudioDriverWorklet::unlock() {
mutex.unlock();
}
-void AudioDriverJavaScript::WorkletNode::finish() {
+void AudioDriverWorklet::finish_driver() {
quit = true; // Ask thread to quit.
thread.wait_to_finish();
}
diff --git a/platform/javascript/audio_driver_javascript.h b/platform/javascript/audio_driver_javascript.h
index 393693640f..6a0b4bcb0e 100644
--- a/platform/javascript/audio_driver_javascript.h
+++ b/platform/javascript/audio_driver_javascript.h
@@ -38,52 +38,15 @@
#include "godot_audio.h"
class AudioDriverJavaScript : public AudioDriver {
-public:
- class AudioNode {
- public:
- virtual int create(int p_buffer_size, int p_output_channels) = 0;
- virtual void start(float *p_out_buf, int p_out_buf_size, float *p_in_buf, int p_in_buf_size) = 0;
- virtual void finish() {}
- virtual void lock() {}
- virtual void unlock() {}
- virtual ~AudioNode() {}
- };
-
- class WorkletNode : public AudioNode {
- private:
- enum {
- STATE_LOCK,
- STATE_PROCESS,
- STATE_SAMPLES_IN,
- STATE_SAMPLES_OUT,
- STATE_MAX,
- };
- Mutex mutex;
- Thread thread;
- bool quit = false;
- int32_t state[STATE_MAX] = { 0 };
-
- static void _audio_thread_func(void *p_data);
-
- public:
- int create(int p_buffer_size, int p_output_channels) override;
- void start(float *p_out_buf, int p_out_buf_size, float *p_in_buf, int p_in_buf_size) override;
- void finish() override;
- void lock() override;
- void unlock() override;
- };
-
- class ScriptProcessorNode : public AudioNode {
- private:
- static void _process_callback();
-
- public:
- int create(int p_buffer_samples, int p_channels) override;
- void start(float *p_out_buf, int p_out_buf_size, float *p_in_buf, int p_in_buf_size) override;
- };
-
private:
- AudioNode *node = nullptr;
+ struct AudioContext {
+ bool inited = false;
+ float output_latency = 0.0;
+ int state = -1;
+ int channel_count = 0;
+ int mix_rate = 0;
+ };
+ static AudioContext audio_context;
float *output_rb = nullptr;
float *input_rb = nullptr;
@@ -91,36 +54,108 @@ private:
int buffer_length = 0;
int mix_rate = 0;
int channel_count = 0;
- int state = 0;
- float output_latency = 0.0;
static void _state_change_callback(int p_state);
static void _latency_update_callback(float p_latency);
+ static AudioDriverJavaScript *singleton;
+
protected:
void _audio_driver_process(int p_from = 0, int p_samples = 0);
void _audio_driver_capture(int p_from = 0, int p_samples = 0);
+ float *get_output_rb() const { return output_rb; }
+ float *get_input_rb() const { return input_rb; }
+
+ virtual Error create(int &p_buffer_samples, int p_channels) = 0;
+ virtual void start(float *p_out_buf, int p_out_buf_size, float *p_in_buf, int p_in_buf_size) = 0;
+ virtual void finish_driver() {}
public:
static bool is_available();
- static AudioDriverJavaScript *singleton;
+ virtual Error init() final;
+ virtual void start() final;
+ virtual void finish() final;
+
+ virtual float get_latency() override;
+ virtual int get_mix_rate() const override;
+ virtual SpeakerMode get_speaker_mode() const override;
+
+ virtual Error capture_start() override;
+ virtual Error capture_stop() override;
+
+ static void resume();
+
+ AudioDriverJavaScript() {}
+};
+
+#ifdef NO_THREADS
+class AudioDriverScriptProcessor : public AudioDriverJavaScript {
+private:
+ static void _process_callback();
+
+ static AudioDriverScriptProcessor *singleton;
+
+protected:
+ Error create(int &p_buffer_samples, int p_channels) override;
+ void start(float *p_out_buf, int p_out_buf_size, float *p_in_buf, int p_in_buf_size) override;
+
+public:
+ virtual const char *get_name() const override { return "ScriptProcessor"; }
+
+ virtual void lock() override {}
+ virtual void unlock() override {}
+
+ AudioDriverScriptProcessor() { singleton = this; }
+};
+
+class AudioDriverWorklet : public AudioDriverJavaScript {
+private:
+ static void _process_callback(int p_pos, int p_samples);
+ static void _capture_callback(int p_pos, int p_samples);
+
+ static AudioDriverWorklet *singleton;
+
+protected:
+ virtual Error create(int &p_buffer_size, int p_output_channels) override;
+ virtual void start(float *p_out_buf, int p_out_buf_size, float *p_in_buf, int p_in_buf_size) override;
- virtual const char *get_name() const;
+public:
+ virtual const char *get_name() const override { return "AudioWorklet"; }
+
+ virtual void lock() override {}
+ virtual void unlock() override {}
- virtual Error init();
- virtual void start();
- void resume();
- virtual float get_latency();
- virtual int get_mix_rate() const;
- virtual SpeakerMode get_speaker_mode() const;
- virtual void lock();
- virtual void unlock();
- virtual void finish();
+ AudioDriverWorklet() { singleton = this; }
+};
+#else
+class AudioDriverWorklet : public AudioDriverJavaScript {
+private:
+ enum {
+ STATE_LOCK,
+ STATE_PROCESS,
+ STATE_SAMPLES_IN,
+ STATE_SAMPLES_OUT,
+ STATE_MAX,
+ };
+ Mutex mutex;
+ Thread thread;
+ bool quit = false;
+ int32_t state[STATE_MAX] = { 0 };
- virtual Error capture_start();
- virtual Error capture_stop();
+ static void _audio_thread_func(void *p_data);
- AudioDriverJavaScript();
+protected:
+ virtual Error create(int &p_buffer_size, int p_output_channels) override;
+ virtual void start(float *p_out_buf, int p_out_buf_size, float *p_in_buf, int p_in_buf_size) override;
+ virtual void finish_driver() override;
+
+public:
+ virtual const char *get_name() const override { return "AudioWorklet"; }
+
+ void lock() override;
+ void unlock() override;
};
#endif
+
+#endif
diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp
index fda18a5c19..124b4ee1c8 100644
--- a/platform/javascript/display_server_javascript.cpp
+++ b/platform/javascript/display_server_javascript.cpp
@@ -158,6 +158,10 @@ EM_BOOL DisplayServerJavaScript::keydown_callback(int p_event_type, const Emscri
return false;
}
Input::get_singleton()->parse_input_event(ev);
+
+ // Make sure to flush all events so we can call restricted APIs inside the event.
+ Input::get_singleton()->flush_buffered_events();
+
return true;
}
@@ -165,6 +169,10 @@ EM_BOOL DisplayServerJavaScript::keypress_callback(int p_event_type, const Emscr
DisplayServerJavaScript *display = get_singleton();
display->deferred_key_event->set_unicode(p_event->charCode);
Input::get_singleton()->parse_input_event(display->deferred_key_event);
+
+ // Make sure to flush all events so we can call restricted APIs inside the event.
+ Input::get_singleton()->flush_buffered_events();
+
return true;
}
@@ -172,6 +180,10 @@ EM_BOOL DisplayServerJavaScript::keyup_callback(int p_event_type, const Emscript
Ref<InputEventKey> ev = setup_key_event(p_event);
ev->set_pressed(false);
Input::get_singleton()->parse_input_event(ev);
+
+ // Make sure to flush all events so we can call restricted APIs inside the event.
+ Input::get_singleton()->flush_buffered_events();
+
return ev->get_keycode() != KEY_UNKNOWN && ev->get_keycode() != (Key)0;
}
@@ -245,6 +257,10 @@ EM_BOOL DisplayServerJavaScript::mouse_button_callback(int p_event_type, const E
ev->set_button_mask(mask);
input->parse_input_event(ev);
+
+ // Make sure to flush all events so we can call restricted APIs inside the event.
+ Input::get_singleton()->flush_buffered_events();
+
// Prevent multi-click text selection and wheel-click scrolling anchor.
// Context menu is prevented through contextmenu event.
return true;
@@ -481,9 +497,10 @@ EM_BOOL DisplayServerJavaScript::wheel_callback(int p_event_type, const Emscript
ev->set_button_mask(MouseButton(input->get_mouse_button_mask() | button_flag));
input->parse_input_event(ev);
- ev->set_pressed(false);
- ev->set_button_mask(MouseButton(input->get_mouse_button_mask() & ~button_flag));
- input->parse_input_event(ev);
+ Ref<InputEventMouseButton> release = ev->duplicate();
+ release->set_pressed(false);
+ release->set_button_mask(MouseButton(input->get_mouse_button_mask() & ~button_flag));
+ input->parse_input_event(release);
return true;
}
@@ -492,7 +509,6 @@ EM_BOOL DisplayServerJavaScript::wheel_callback(int p_event_type, const Emscript
EM_BOOL DisplayServerJavaScript::touch_press_callback(int p_event_type, const EmscriptenTouchEvent *p_event, void *p_user_data) {
DisplayServerJavaScript *display = get_singleton();
Ref<InputEventScreenTouch> ev;
- ev.instantiate();
int lowest_id_index = -1;
for (int i = 0; i < p_event->numTouches; ++i) {
const EmscriptenTouchPoint &touch = p_event->touches[i];
@@ -500,6 +516,7 @@ EM_BOOL DisplayServerJavaScript::touch_press_callback(int p_event_type, const Em
lowest_id_index = i;
if (!touch.isChanged)
continue;
+ ev.instantiate();
ev->set_index(touch.identifier);
ev->set_position(compute_position_in_canvas(touch.clientX, touch.clientY));
display->touches[i] = ev->get_position();
@@ -507,6 +524,10 @@ EM_BOOL DisplayServerJavaScript::touch_press_callback(int p_event_type, const Em
Input::get_singleton()->parse_input_event(ev);
}
+
+ // Make sure to flush all events so we can call restricted APIs inside the event.
+ Input::get_singleton()->flush_buffered_events();
+
// Resume audio context after input in case autoplay was denied.
return true;
}
@@ -514,7 +535,6 @@ EM_BOOL DisplayServerJavaScript::touch_press_callback(int p_event_type, const Em
EM_BOOL DisplayServerJavaScript::touchmove_callback(int p_event_type, const EmscriptenTouchEvent *p_event, void *p_user_data) {
DisplayServerJavaScript *display = get_singleton();
Ref<InputEventScreenDrag> ev;
- ev.instantiate();
int lowest_id_index = -1;
for (int i = 0; i < p_event->numTouches; ++i) {
const EmscriptenTouchPoint &touch = p_event->touches[i];
@@ -522,6 +542,7 @@ EM_BOOL DisplayServerJavaScript::touchmove_callback(int p_event_type, const Emsc
lowest_id_index = i;
if (!touch.isChanged)
continue;
+ ev.instantiate();
ev->set_index(touch.identifier);
ev->set_position(compute_position_in_canvas(touch.clientX, touch.clientY));
Point2 &prev = display->touches[i];
@@ -574,6 +595,12 @@ void DisplayServerJavaScript::virtual_keyboard_hide() {
godot_js_display_vk_hide();
}
+// Window blur callback
+EM_BOOL DisplayServerJavaScript::blur_callback(int p_event_type, const EmscriptenFocusEvent *p_event, void *p_user_data) {
+ Input::get_singleton()->release_pressed_events();
+ return false;
+}
+
// Gamepad
void DisplayServerJavaScript::gamepad_callback(int p_index, int p_connected, const char *p_id, const char *p_guid) {
Input *input = Input::get_singleton();
@@ -776,6 +803,7 @@ DisplayServerJavaScript::DisplayServerJavaScript(const String &p_rendering_drive
SET_EM_CALLBACK(canvas_id, mousedown, mouse_button_callback)
SET_EM_WINDOW_CALLBACK(mousemove, mousemove_callback)
SET_EM_WINDOW_CALLBACK(mouseup, mouse_button_callback)
+ SET_EM_WINDOW_CALLBACK(blur, blur_callback)
SET_EM_CALLBACK(canvas_id, wheel, wheel_callback)
SET_EM_CALLBACK(canvas_id, touchstart, touch_press_callback)
SET_EM_CALLBACK(canvas_id, touchmove, touchmove_callback)
@@ -1019,6 +1047,7 @@ bool DisplayServerJavaScript::can_any_window_draw() const {
}
void DisplayServerJavaScript::process_events() {
+ Input::get_singleton()->flush_buffered_events();
if (godot_js_display_gamepad_sample() == OK) {
process_joypads();
}
diff --git a/platform/javascript/display_server_javascript.h b/platform/javascript/display_server_javascript.h
index bf5e229c9a..1863ddefeb 100644
--- a/platform/javascript/display_server_javascript.h
+++ b/platform/javascript/display_server_javascript.h
@@ -85,6 +85,8 @@ private:
static EM_BOOL touch_press_callback(int p_event_type, const EmscriptenTouchEvent *p_event, void *p_user_data);
static EM_BOOL touchmove_callback(int p_event_type, const EmscriptenTouchEvent *p_event, void *p_user_data);
+ static EM_BOOL blur_callback(int p_event_type, const EmscriptenFocusEvent *p_event, void *p_user_data);
+
static void gamepad_callback(int p_index, int p_connected, const char *p_id, const char *p_guid);
void process_joypads();
diff --git a/platform/javascript/emscripten_helpers.py b/platform/javascript/emscripten_helpers.py
index ab98838e20..4dad2d5204 100644
--- a/platform/javascript/emscripten_helpers.py
+++ b/platform/javascript/emscripten_helpers.py
@@ -24,7 +24,10 @@ def get_build_version():
v = "%d.%d" % (version.major, version.minor)
if version.patch > 0:
v += ".%d" % version.patch
- v += ".%s.%s" % (version.status, name)
+ status = version.status
+ if os.getenv("GODOT_VERSION_STATUS") != None:
+ status = str(os.getenv("GODOT_VERSION_STATUS"))
+ v += ".%s.%s" % (status, name)
return v
diff --git a/platform/javascript/export/export_plugin.h b/platform/javascript/export/export_plugin.h
index 736edfe3a8..bdd1235259 100644
--- a/platform/javascript/export/export_plugin.h
+++ b/platform/javascript/export/export_plugin.h
@@ -134,7 +134,7 @@ public:
virtual void get_platform_features(List<String> *r_features) override {
r_features->push_back("web");
- r_features->push_back(get_os_name());
+ r_features->push_back(get_os_name().to_lower());
}
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override {
diff --git a/platform/javascript/godot_audio.h b/platform/javascript/godot_audio.h
index 54fc8fa3b5..eba025ab63 100644
--- a/platform/javascript/godot_audio.h
+++ b/platform/javascript/godot_audio.h
@@ -38,7 +38,9 @@ extern "C" {
#include "stddef.h"
extern int godot_audio_is_available();
-extern int godot_audio_init(int p_mix_rate, int p_latency, void (*_state_cb)(int), void (*_latency_cb)(float));
+extern int godot_audio_has_worklet();
+extern int godot_audio_has_script_processor();
+extern int godot_audio_init(int *p_mix_rate, int p_latency, void (*_state_cb)(int), void (*_latency_cb)(float));
extern void godot_audio_resume();
extern int godot_audio_capture_start();
@@ -46,14 +48,15 @@ extern void godot_audio_capture_stop();
// Worklet
typedef int32_t GodotAudioState[4];
-extern void godot_audio_worklet_create(int p_channels);
+extern int godot_audio_worklet_create(int p_channels);
extern void godot_audio_worklet_start(float *p_in_buf, int p_in_size, float *p_out_buf, int p_out_size, GodotAudioState p_state);
+extern void godot_audio_worklet_start_no_threads(float *p_out_buf, int p_out_size, void (*p_out_cb)(int p_pos, int p_frames), float *p_in_buf, int p_in_size, void (*p_in_cb)(int p_pos, int p_frames));
extern int godot_audio_worklet_state_add(GodotAudioState p_state, int p_idx, int p_value);
extern int godot_audio_worklet_state_get(GodotAudioState p_state, int p_idx);
extern int godot_audio_worklet_state_wait(int32_t *p_state, int p_idx, int32_t p_expected, int p_timeout);
// Script
-extern int godot_audio_script_create(int p_buffer_size, int p_channels);
+extern int godot_audio_script_create(int *p_buffer_size, int p_channels);
extern void godot_audio_script_start(float *p_in_buf, int p_in_size, float *p_out_buf, int p_out_size, void (*p_cb)());
#ifdef __cplusplus
diff --git a/platform/javascript/js/libs/audio.worklet.js b/platform/javascript/js/libs/audio.worklet.js
index 866f845139..52b3aedf8c 100644
--- a/platform/javascript/js/libs/audio.worklet.js
+++ b/platform/javascript/js/libs/audio.worklet.js
@@ -29,15 +29,16 @@
/*************************************************************************/
class RingBuffer {
- constructor(p_buffer, p_state) {
+ constructor(p_buffer, p_state, p_threads) {
this.buffer = p_buffer;
this.avail = p_state;
+ this.threads = p_threads;
this.rpos = 0;
this.wpos = 0;
}
data_left() {
- return Atomics.load(this.avail, 0);
+ return this.threads ? Atomics.load(this.avail, 0) : this.avail;
}
space_left() {
@@ -55,10 +56,16 @@ class RingBuffer {
to_write -= high;
this.rpos = 0;
}
- output.set(this.buffer.subarray(this.rpos, this.rpos + to_write), from);
+ if (to_write) {
+ output.set(this.buffer.subarray(this.rpos, this.rpos + to_write), from);
+ }
this.rpos += to_write;
- Atomics.add(this.avail, 0, -output.length);
- Atomics.notify(this.avail, 0);
+ if (this.threads) {
+ Atomics.add(this.avail, 0, -output.length);
+ Atomics.notify(this.avail, 0);
+ } else {
+ this.avail -= output.length;
+ }
}
write(p_buffer) {
@@ -66,25 +73,30 @@ class RingBuffer {
const mw = this.buffer.length - this.wpos;
if (mw >= to_write) {
this.buffer.set(p_buffer, this.wpos);
+ this.wpos += to_write;
+ if (mw === to_write) {
+ this.wpos = 0;
+ }
} else {
- const high = p_buffer.subarray(0, to_write - mw);
- const low = p_buffer.subarray(to_write - mw);
+ const high = p_buffer.subarray(0, mw);
+ const low = p_buffer.subarray(mw);
this.buffer.set(high, this.wpos);
this.buffer.set(low);
+ this.wpos = low.length;
}
- let diff = to_write;
- if (this.wpos + diff >= this.buffer.length) {
- diff -= this.buffer.length;
+ if (this.threads) {
+ Atomics.add(this.avail, 0, to_write);
+ Atomics.notify(this.avail, 0);
+ } else {
+ this.avail += to_write;
}
- this.wpos += diff;
- Atomics.add(this.avail, 0, to_write);
- Atomics.notify(this.avail, 0);
}
}
class GodotProcessor extends AudioWorkletProcessor {
constructor() {
super();
+ this.threads = false;
this.running = true;
this.lock = null;
this.notifier = null;
@@ -100,24 +112,31 @@ class GodotProcessor extends AudioWorkletProcessor {
}
process_notify() {
- Atomics.add(this.notifier, 0, 1);
- Atomics.notify(this.notifier, 0);
+ if (this.notifier) {
+ Atomics.add(this.notifier, 0, 1);
+ Atomics.notify(this.notifier, 0);
+ }
}
parse_message(p_cmd, p_data) {
if (p_cmd === 'start' && p_data) {
const state = p_data[0];
let idx = 0;
+ this.threads = true;
this.lock = state.subarray(idx, ++idx);
this.notifier = state.subarray(idx, ++idx);
const avail_in = state.subarray(idx, ++idx);
const avail_out = state.subarray(idx, ++idx);
- this.input = new RingBuffer(p_data[1], avail_in);
- this.output = new RingBuffer(p_data[2], avail_out);
+ this.input = new RingBuffer(p_data[1], avail_in, true);
+ this.output = new RingBuffer(p_data[2], avail_out, true);
} else if (p_cmd === 'stop') {
this.running = false;
this.output = null;
this.input = null;
+ } else if (p_cmd === 'start_nothreads') {
+ this.output = new RingBuffer(p_data[0], p_data[0].length, false);
+ } else if (p_cmd === 'chunk') {
+ this.output.write(p_data);
}
}
@@ -139,7 +158,10 @@ class GodotProcessor extends AudioWorkletProcessor {
if (this.input_buffer.length !== chunk) {
this.input_buffer = new Float32Array(chunk);
}
- if (this.input.space_left() >= chunk) {
+ if (!this.threads) {
+ GodotProcessor.write_input(this.input_buffer, input);
+ this.port.postMessage({ 'cmd': 'input', 'data': this.input_buffer });
+ } else if (this.input.space_left() >= chunk) {
GodotProcessor.write_input(this.input_buffer, input);
this.input.write(this.input_buffer);
} else {
@@ -156,6 +178,9 @@ class GodotProcessor extends AudioWorkletProcessor {
if (this.output.data_left() >= chunk) {
this.output.read(this.output_buffer);
GodotProcessor.write_output(output, this.output_buffer);
+ if (!this.threads) {
+ this.port.postMessage({ 'cmd': 'read', 'data': chunk });
+ }
} else {
this.port.postMessage('Output buffer has not enough frames! Skipping output frame.');
}
diff --git a/platform/javascript/js/libs/library_godot_audio.js b/platform/javascript/js/libs/library_godot_audio.js
index 45c3a3fe2e..6cbb0567f4 100644
--- a/platform/javascript/js/libs/library_godot_audio.js
+++ b/platform/javascript/js/libs/library_godot_audio.js
@@ -37,10 +37,14 @@ const GodotAudio = {
interval: 0,
init: function (mix_rate, latency, onstatechange, onlatencyupdate) {
- const ctx = new (window.AudioContext || window.webkitAudioContext)({
- sampleRate: mix_rate,
- // latencyHint: latency / 1000 // Do not specify, leave 'interactive' for good performance.
- });
+ const opts = {};
+ // If mix_rate is 0, let the browser choose.
+ if (mix_rate) {
+ opts['sampleRate'] = mix_rate;
+ }
+ // Do not specify, leave 'interactive' for good performance.
+ // opts['latencyHint'] = latency / 1000;
+ const ctx = new (window.AudioContext || window.webkitAudioContext)(opts);
GodotAudio.ctx = ctx;
ctx.onstatechange = function () {
let state = 0;
@@ -155,11 +159,24 @@ const GodotAudio = {
return 1;
},
+ godot_audio_has_worklet__sig: 'i',
+ godot_audio_has_worklet: function () {
+ return (GodotAudio.ctx && GodotAudio.ctx.audioWorklet) ? 1 : 0;
+ },
+
+ godot_audio_has_script_processor__sig: 'i',
+ godot_audio_has_script_processor: function () {
+ return (GodotAudio.ctx && GodotAudio.ctx.createScriptProcessor) ? 1 : 0;
+ },
+
godot_audio_init__sig: 'iiiii',
godot_audio_init: function (p_mix_rate, p_latency, p_state_change, p_latency_update) {
const statechange = GodotRuntime.get_func(p_state_change);
const latencyupdate = GodotRuntime.get_func(p_latency_update);
- return GodotAudio.init(p_mix_rate, p_latency, statechange, latencyupdate);
+ const mix_rate = GodotRuntime.getHeapValue(p_mix_rate, 'i32');
+ const channels = GodotAudio.init(mix_rate, p_latency, statechange, latencyupdate);
+ GodotRuntime.setHeapValue(p_mix_rate, GodotAudio.ctx.sampleRate, 'i32');
+ return channels;
},
godot_audio_resume__sig: 'v',
@@ -202,6 +219,7 @@ const GodotAudioWorklet = {
$GodotAudioWorklet: {
promise: null,
worklet: null,
+ ring_buffer: null,
create: function (channels) {
const path = GodotConfig.locate_file('godot.audio.worklet.js');
@@ -211,7 +229,7 @@ const GodotAudioWorklet = {
'godot-processor',
{
'outputChannelCount': [channels],
- },
+ }
);
return Promise.resolve();
});
@@ -232,6 +250,86 @@ const GodotAudioWorklet = {
});
},
+ start_no_threads: function (p_out_buf, p_out_size, out_callback, p_in_buf, p_in_size, in_callback) {
+ function RingBuffer() {
+ let wpos = 0;
+ let rpos = 0;
+ let pending_samples = 0;
+ const wbuf = new Float32Array(p_out_size);
+
+ function send(port) {
+ if (pending_samples === 0) {
+ return;
+ }
+ const buffer = GodotRuntime.heapSub(HEAPF32, p_out_buf, p_out_size);
+ const size = buffer.length;
+ const tot_sent = pending_samples;
+ out_callback(wpos, pending_samples);
+ if (wpos + pending_samples >= size) {
+ const high = size - wpos;
+ wbuf.set(buffer.subarray(wpos, size));
+ pending_samples -= high;
+ wpos = 0;
+ }
+ if (pending_samples > 0) {
+ wbuf.set(buffer.subarray(wpos, wpos + pending_samples), tot_sent - pending_samples);
+ }
+ port.postMessage({ 'cmd': 'chunk', 'data': wbuf.subarray(0, tot_sent) });
+ wpos += pending_samples;
+ pending_samples = 0;
+ }
+ this.receive = function (recv_buf) {
+ const buffer = GodotRuntime.heapSub(HEAPF32, p_in_buf, p_in_size);
+ const from = rpos;
+ let to_write = recv_buf.length;
+ let high = 0;
+ if (rpos + to_write >= p_in_size) {
+ high = p_in_size - rpos;
+ buffer.set(recv_buf.subarray(0, high), rpos);
+ to_write -= high;
+ rpos = 0;
+ }
+ if (to_write) {
+ buffer.set(recv_buf.subarray(high, to_write), rpos);
+ }
+ in_callback(from, recv_buf.length);
+ rpos += to_write;
+ };
+ this.consumed = function (size, port) {
+ pending_samples += size;
+ send(port);
+ };
+ }
+ GodotAudioWorklet.ring_buffer = new RingBuffer();
+ GodotAudioWorklet.promise.then(function () {
+ const node = GodotAudioWorklet.worklet;
+ const buffer = GodotRuntime.heapSlice(HEAPF32, p_out_buf, p_out_size);
+ node.connect(GodotAudio.ctx.destination);
+ node.port.postMessage({
+ 'cmd': 'start_nothreads',
+ 'data': [buffer, p_in_size],
+ });
+ node.port.onmessage = function (event) {
+ if (!GodotAudioWorklet.worklet) {
+ return;
+ }
+ if (event.data['cmd'] === 'read') {
+ const read = event.data['data'];
+ GodotAudioWorklet.ring_buffer.consumed(read, GodotAudioWorklet.worklet.port);
+ } else if (event.data['cmd'] === 'input') {
+ const buf = event.data['data'];
+ if (buf.length > p_in_size) {
+ GodotRuntime.error('Input chunk is too big');
+ return;
+ }
+ GodotAudioWorklet.ring_buffer.receive(buf);
+ } else {
+ GodotRuntime.error(event.data);
+ }
+ };
+ });
+ },
+
get_node: function () {
return GodotAudioWorklet.worklet;
},
@@ -255,9 +353,15 @@ const GodotAudioWorklet = {
},
},
- godot_audio_worklet_create__sig: 'vi',
+ godot_audio_worklet_create__sig: 'ii',
godot_audio_worklet_create: function (channels) {
- GodotAudioWorklet.create(channels);
+ try {
+ GodotAudioWorklet.create(channels);
+ } catch (e) {
+ GodotRuntime.error('Error starting AudioDriverWorklet', e);
+ return 1;
+ }
+ return 0;
},
godot_audio_worklet_start__sig: 'viiiii',
@@ -268,6 +372,13 @@ const GodotAudioWorklet = {
GodotAudioWorklet.start(in_buffer, out_buffer, state);
},
+ godot_audio_worklet_start_no_threads__sig: 'viiiiii',
+ godot_audio_worklet_start_no_threads: function (p_out_buf, p_out_size, p_out_callback, p_in_buf, p_in_size, p_in_callback) {
+ const out_callback = GodotRuntime.get_func(p_out_callback);
+ const in_callback = GodotRuntime.get_func(p_in_callback);
+ GodotAudioWorklet.start_no_threads(p_out_buf, p_out_size, out_callback, p_in_buf, p_in_size, in_callback);
+ },
+
godot_audio_worklet_state_wait__sig: 'iiii',
godot_audio_worklet_state_wait: function (p_state, p_idx, p_expected, p_timeout) {
Atomics.wait(HEAP32, (p_state >> 2) + p_idx, p_expected, p_timeout);
@@ -351,7 +462,15 @@ const GodotAudioScript = {
godot_audio_script_create__sig: 'iii',
godot_audio_script_create: function (buffer_length, channel_count) {
- return GodotAudioScript.create(buffer_length, channel_count);
+ const buf_len = GodotRuntime.getHeapValue(buffer_length, 'i32');
+ try {
+ const out_len = GodotAudioScript.create(buf_len, channel_count);
+ GodotRuntime.setHeapValue(buffer_length, out_len, 'i32');
+ } catch (e) {
+ GodotRuntime.error('Error starting AudioDriverScriptProcessor', e);
+ return 1;
+ }
+ return 0;
},
godot_audio_script_start__sig: 'viiiii',
diff --git a/platform/javascript/js/libs/library_godot_os.js b/platform/javascript/js/libs/library_godot_os.js
index 5aa750757c..99e7ee8b5f 100644
--- a/platform/javascript/js/libs/library_godot_os.js
+++ b/platform/javascript/js/libs/library_godot_os.js
@@ -106,7 +106,7 @@ autoAddDeps(GodotConfig, '$GodotConfig');
mergeInto(LibraryManager.library, GodotConfig);
const GodotFS = {
- $GodotFS__deps: ['$FS', '$IDBFS', '$GodotRuntime'],
+ $GodotFS__deps: ['$ERRNO_CODES', '$FS', '$IDBFS', '$GodotRuntime'],
$GodotFS__postset: [
'Module["initFS"] = GodotFS.init;',
'Module["copyToFS"] = GodotFS.copy_to_fs;',
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index 76102d941b..4431bd5f1b 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -63,9 +63,7 @@ void OS_JavaScript::initialize() {
}
void OS_JavaScript::resume_audio() {
- if (audio_driver_javascript) {
- audio_driver_javascript->resume();
- }
+ AudioDriverJavaScript::resume();
}
void OS_JavaScript::set_main_loop(MainLoop *p_main_loop) {
@@ -101,10 +99,10 @@ void OS_JavaScript::delete_main_loop() {
void OS_JavaScript::finalize() {
delete_main_loop();
- if (audio_driver_javascript) {
- memdelete(audio_driver_javascript);
- audio_driver_javascript = nullptr;
+ for (AudioDriverJavaScript *driver : audio_drivers) {
+ memdelete(driver);
}
+ audio_drivers.clear();
}
// Miscellaneous
@@ -137,12 +135,12 @@ int OS_JavaScript::get_processor_count() const {
}
bool OS_JavaScript::_check_internal_feature_support(const String &p_feature) {
- if (p_feature == "HTML5" || p_feature == "web") {
+ if (p_feature == "html5" || p_feature == "web") {
return true;
}
#ifdef JAVASCRIPT_EVAL_ENABLED
- if (p_feature == "JavaScript") {
+ if (p_feature == "javascript") {
return true;
}
#endif
@@ -229,8 +227,13 @@ OS_JavaScript::OS_JavaScript() {
setenv("LANG", locale_ptr, true);
if (AudioDriverJavaScript::is_available()) {
- audio_driver_javascript = memnew(AudioDriverJavaScript);
- AudioDriverManager::add_driver(audio_driver_javascript);
+#ifdef NO_THREADS
+ audio_drivers.push_back(memnew(AudioDriverScriptProcessor));
+#endif
+ audio_drivers.push_back(memnew(AudioDriverWorklet));
+ }
+ for (int i = 0; i < audio_drivers.size(); i++) {
+ AudioDriverManager::add_driver(audio_drivers[i]);
}
idb_available = godot_js_os_fs_is_persistent();
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h
index efac2dbca7..d053082d92 100644
--- a/platform/javascript/os_javascript.h
+++ b/platform/javascript/os_javascript.h
@@ -40,7 +40,7 @@
class OS_JavaScript : public OS_Unix {
MainLoop *main_loop = nullptr;
- AudioDriverJavaScript *audio_driver_javascript = nullptr;
+ List<AudioDriverJavaScript *> audio_drivers;
bool idb_is_syncing = false;
bool idb_available = false;
diff --git a/platform/linuxbsd/README.md b/platform/linuxbsd/README.md
new file mode 100644
index 0000000000..0d3fb37be5
--- /dev/null
+++ b/platform/linuxbsd/README.md
@@ -0,0 +1,11 @@
+# Linux/*BSD platform port
+
+This folder contains the C++ code for the Linux/*BSD platform port.
+
+## Artwork license
+
+[`logo.png`](logo.png) is derived from the [Linux logo](https://isc.tamu.edu/~lewing/linux/):
+
+> Permission to use and/or modify this image is granted provided you acknowledge me
+ <lewing@isc.tamu.edu> and [The GIMP](https://isc.tamu.edu/~lewing/gimp/)
+ if someone asks.
diff --git a/platform/linuxbsd/crash_handler_linuxbsd.cpp b/platform/linuxbsd/crash_handler_linuxbsd.cpp
index ea0222cb19..0e98af71fa 100644
--- a/platform/linuxbsd/crash_handler_linuxbsd.cpp
+++ b/platform/linuxbsd/crash_handler_linuxbsd.cpp
@@ -32,6 +32,8 @@
#include "core/config/project_settings.h"
#include "core/os/os.h"
+#include "core/version.h"
+#include "core/version_hash.gen.h"
#include "main/main.h"
#ifdef DEBUG_ENABLED
@@ -61,12 +63,19 @@ static void handle_crash(int sig) {
}
// Dump the backtrace to stderr with a message to the user
+ fprintf(stderr, "\n================================================================\n");
fprintf(stderr, "%s: Program crashed with signal %d\n", __FUNCTION__, sig);
if (OS::get_singleton()->get_main_loop()) {
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_CRASH);
}
+ // Print the engine version just before, so that people are reminded to include the version in backtrace reports.
+ if (String(VERSION_HASH).length() != 0) {
+ fprintf(stderr, "Engine version: " VERSION_FULL_NAME " (" VERSION_HASH ")\n");
+ } else {
+ fprintf(stderr, "Engine version: " VERSION_FULL_NAME "\n");
+ }
fprintf(stderr, "Dumping the backtrace. %s\n", msg.utf8().get_data());
char **strings = backtrace_symbols(bt_buffer, size);
if (strings) {
@@ -115,6 +124,7 @@ static void handle_crash(int sig) {
free(strings);
}
fprintf(stderr, "-- END OF BACKTRACE --\n");
+ fprintf(stderr, "================================================================\n");
// Abort to pass the error to the OS
abort();
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index 3e3ed469ed..8eb22c1c72 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -18,40 +18,42 @@ def can_build():
# Check the minimal dependencies
x11_error = os.system("pkg-config --version > /dev/null")
if x11_error:
+ print("Error: pkg-config not found. Aborting.")
return False
- x11_error = os.system("pkg-config x11 --modversion > /dev/null ")
+ x11_error = os.system("pkg-config x11 --modversion > /dev/null")
if x11_error:
+ print("Error: X11 libraries not found. Aborting.")
return False
- x11_error = os.system("pkg-config xcursor --modversion > /dev/null ")
+ x11_error = os.system("pkg-config xcursor --modversion > /dev/null")
if x11_error:
- print("xcursor not found.. x11 disabled.")
+ print("Error: Xcursor library not found. Aborting.")
return False
- x11_error = os.system("pkg-config xinerama --modversion > /dev/null ")
+ x11_error = os.system("pkg-config xinerama --modversion > /dev/null")
if x11_error:
- print("xinerama not found.. x11 disabled.")
+ print("Error: Xinerama library not found. Aborting.")
return False
- x11_error = os.system("pkg-config xext --modversion > /dev/null ")
+ x11_error = os.system("pkg-config xext --modversion > /dev/null")
if x11_error:
- print("xext not found.. x11 disabled.")
+ print("Error: Xext library not found. Aborting.")
return False
- x11_error = os.system("pkg-config xrandr --modversion > /dev/null ")
+ x11_error = os.system("pkg-config xrandr --modversion > /dev/null")
if x11_error:
- print("xrandr not found.. x11 disabled.")
+ print("Error: XrandR library not found. Aborting.")
return False
- x11_error = os.system("pkg-config xrender --modversion > /dev/null ")
+ x11_error = os.system("pkg-config xrender --modversion > /dev/null")
if x11_error:
- print("xrender not found.. x11 disabled.")
+ print("Error: XRender library not found. Aborting.")
return False
- x11_error = os.system("pkg-config xi --modversion > /dev/null ")
+ x11_error = os.system("pkg-config xi --modversion > /dev/null")
if x11_error:
- print("xi not found.. Aborting.")
+ print("Error: Xi library not found. Aborting.")
return False
return True
@@ -138,7 +140,7 @@ def configure(env):
# A convenience so you don't need to write use_lto too when using SCons
env["use_lto"] = True
else:
- print("Using LLD with GCC is not supported yet, try compiling with 'use_llvm=yes'.")
+ print("Using LLD with GCC is not supported yet. Try compiling with 'use_llvm=yes'.")
sys.exit(255)
if env["use_coverage"]:
@@ -201,11 +203,6 @@ def configure(env):
env.Append(CCFLAGS=["-pipe"])
env.Append(LINKFLAGS=["-pipe"])
- # -fpie and -no-pie is supported on GCC 6+ and Clang 4+, both below our
- # minimal requirements.
- env.Append(CCFLAGS=["-fpie"])
- env.Append(LINKFLAGS=["-no-pie"])
-
## Dependencies
env.ParseConfig("pkg-config x11 --cflags --libs")
@@ -334,36 +331,32 @@ def configure(env):
## Flags
if os.system("pkg-config --exists alsa") == 0: # 0 means found
- print("Enabling ALSA")
env["alsa"] = True
env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"])
else:
- print("ALSA libraries not found, disabling driver")
+ print("Warning: ALSA libraries not found. Disabling the ALSA audio driver.")
if env["pulseaudio"]:
if os.system("pkg-config --exists libpulse") == 0: # 0 means found
- print("Enabling PulseAudio")
env.Append(CPPDEFINES=["PULSEAUDIO_ENABLED"])
env.ParseConfig("pkg-config --cflags libpulse")
else:
- print("PulseAudio development libraries not found, disabling driver")
+ print("Warning: PulseAudio development libraries not found. Disabling the PulseAudio audio driver.")
if env["dbus"]:
if os.system("pkg-config --exists dbus-1") == 0: # 0 means found
- print("Enabling D-Bus")
env.Append(CPPDEFINES=["DBUS_ENABLED"])
env.ParseConfig("pkg-config --cflags --libs dbus-1")
else:
- print("D-Bus development libraries not found, disabling dependent features")
+ print("Warning: D-Bus development libraries not found. Disabling screensaver prevention.")
if platform.system() == "Linux":
env.Append(CPPDEFINES=["JOYDEV_ENABLED"])
if env["udev"]:
if os.system("pkg-config --exists libudev") == 0: # 0 means found
- print("Enabling udev support")
env.Append(CPPDEFINES=["UDEV_ENABLED"])
else:
- print("libudev development libraries not found, disabling udev support")
+ print("Warning: libudev development libraries not found. Disabling controller hotplugging support.")
else:
env["udev"] = False # Linux specific
@@ -412,7 +405,7 @@ def configure(env):
gnu_ld_version = re.search("^GNU ld [^$]*(\d+\.\d+)$", linker_version_str, re.MULTILINE)
if not gnu_ld_version:
print(
- "Warning: Creating template binaries enabled for PCK embedding is currently only supported with GNU ld"
+ "Warning: Creating template binaries enabled for PCK embedding is currently only supported with GNU ld, not gold or LLD."
)
else:
if float(gnu_ld_version.group(1)) >= 2.30:
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index a39941339a..5c6824cf44 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -3614,7 +3614,8 @@ DisplayServer *DisplayServerX11::create_func(const String &p_rendering_driver, W
DisplayServer *ds = memnew(DisplayServerX11(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error));
if (r_error != OK) {
OS::get_singleton()->alert("Your video card driver does not support any of the supported Vulkan versions.\n"
- "Please update your drivers or if you have a very old or integrated GPU upgrade it.",
+ "Please update your drivers or if you have a very old or integrated GPU, upgrade it.\n"
+ "If you have updated your graphics drivers recently, try rebooting.",
"Unable to initialize Video driver");
}
return ds;
diff --git a/platform/linuxbsd/export/export.cpp b/platform/linuxbsd/export/export.cpp
index 5c6be2d7d4..965a38ef4e 100644
--- a/platform/linuxbsd/export/export.cpp
+++ b/platform/linuxbsd/export/export.cpp
@@ -53,7 +53,7 @@ void register_linuxbsd_exporter() {
platform->set_debug_32("linux_x11_32_debug");
platform->set_release_64("linux_x11_64_release");
platform->set_debug_64("linux_x11_64_debug");
- platform->set_os_name("X11");
+ platform->set_os_name("LinuxBSD");
platform->set_chmod_flags(0755);
platform->set_fixup_embedded_pck_func(&fixup_embedded_pck);
diff --git a/platform/osx/crash_handler_osx.mm b/platform/osx/crash_handler_osx.mm
index 0f128d504f..31228b10b4 100644
--- a/platform/osx/crash_handler_osx.mm
+++ b/platform/osx/crash_handler_osx.mm
@@ -32,6 +32,8 @@
#include "core/config/project_settings.h"
#include "core/os/os.h"
+#include "core/version.h"
+#include "core/version_hash.gen.h"
#include "main/main.h"
#include <string.h>
@@ -85,11 +87,18 @@ static void handle_crash(int sig) {
}
// Dump the backtrace to stderr with a message to the user
+ fprintf(stderr, "\n================================================================\n");
fprintf(stderr, "%s: Program crashed with signal %d\n", __FUNCTION__, sig);
if (OS::get_singleton()->get_main_loop())
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_CRASH);
+ // Print the engine version just before, so that people are reminded to include the version in backtrace reports.
+ if (String(VERSION_HASH).length() != 0) {
+ fprintf(stderr, "Engine version: " VERSION_FULL_NAME " (" VERSION_HASH ")\n");
+ } else {
+ fprintf(stderr, "Engine version: " VERSION_FULL_NAME "\n");
+ }
fprintf(stderr, "Dumping the backtrace. %s\n", msg.utf8().get_data());
char **strings = backtrace_symbols(bt_buffer, size);
if (strings) {
@@ -148,6 +157,7 @@ static void handle_crash(int sig) {
free(strings);
}
fprintf(stderr, "-- END OF BACKTRACE --\n");
+ fprintf(stderr, "================================================================\n");
// Abort to pass the error to the OS
abort();
diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm
index 43b7d7c1e0..f037d75fbd 100644
--- a/platform/osx/display_server_osx.mm
+++ b/platform/osx/display_server_osx.mm
@@ -190,6 +190,8 @@ static NSCursor *_cursorFromSelector(SEL selector, SEL fallback = nil) {
[wd.window_object setContentMinSize:NSMakeSize(0, 0)];
[wd.window_object setContentMaxSize:NSMakeSize(FLT_MAX, FLT_MAX)];
+ // Force window resize event.
+ [self windowDidResize:notification];
}
- (void)windowDidExitFullScreen:(NSNotification *)notification {
@@ -217,6 +219,8 @@ static NSCursor *_cursorFromSelector(SEL selector, SEL fallback = nil) {
if (wd.on_top) {
[wd.window_object setLevel:NSFloatingWindowLevel];
}
+ // Force window resize event.
+ [self windowDidResize:notification];
}
- (void)windowDidChangeBackingProperties:(NSNotification *)notification {
diff --git a/platform/osx/export/export_plugin.cpp b/platform/osx/export/export_plugin.cpp
index 5b959d6da4..2404c20153 100644
--- a/platform/osx/export/export_plugin.cpp
+++ b/platform/osx/export/export_plugin.cpp
@@ -95,6 +95,7 @@ void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options)
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/entitlements/app_sandbox/files_pictures", PROPERTY_HINT_ENUM, "No,Read-only,Read-write"), 0));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/entitlements/app_sandbox/files_music", PROPERTY_HINT_ENUM, "No,Read-only,Read-write"), 0));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/entitlements/app_sandbox/files_movies", PROPERTY_HINT_ENUM, "No,Read-only,Read-write"), 0));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::ARRAY, "codesign/entitlements/app_sandbox/helper_executables", PROPERTY_HINT_ARRAY_TYPE, itos(Variant::STRING) + "/" + itos(PROPERTY_HINT_GLOBAL_FILE) + ":"), Array()));
r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "codesign/custom_options"), PackedStringArray()));
@@ -535,6 +536,8 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
err = ERR_CANT_CREATE;
}
+ Array helpers = p_preset->get("codesign/entitlements/app_sandbox/helper_executables");
+
// Create our folder structure.
if (err == OK) {
print_line("Creating " + tmp_app_path_name + "/Contents/MacOS");
@@ -546,6 +549,11 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
err = tmp_app_dir->make_dir_recursive(tmp_app_path_name + "/Contents/Frameworks");
}
+ if ((err == OK) && helpers.size() > 0) {
+ print_line("Creating " + tmp_app_path_name + "/Contents/Helpers");
+ err = tmp_app_dir->make_dir_recursive(tmp_app_path_name + "/Contents/Helpers");
+ }
+
if (err == OK) {
print_line("Creating " + tmp_app_path_name + "/Contents/Resources");
err = tmp_app_dir->make_dir_recursive(tmp_app_path_name + "/Contents/Resources");
@@ -688,6 +696,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
bool sign_enabled = p_preset->get("codesign/enable");
String ent_path = p_preset->get("codesign/entitlements/custom_file");
+ String hlp_ent_path = EditorPaths::get_singleton()->get_cache_dir().plus_file(pkg_name + "_helper.entitlements");
if (sign_enabled && (ent_path == "")) {
ent_path = EditorPaths::get_singleton()->get_cache_dir().plus_file(pkg_name + ".entitlements");
@@ -819,10 +828,43 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
} else {
err = ERR_CANT_CREATE;
}
+
+ if ((err == OK) && helpers.size() > 0) {
+ ent_f = FileAccess::open(hlp_ent_path, FileAccess::WRITE);
+ if (ent_f) {
+ ent_f->store_line("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+ ent_f->store_line("<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">");
+ ent_f->store_line("<plist version=\"1.0\">");
+ ent_f->store_line("<dict>");
+ ent_f->store_line("<key>com.apple.security.app-sandbox</key>");
+ ent_f->store_line("<true/>");
+ ent_f->store_line("<key>com.apple.security.inherit</key>");
+ ent_f->store_line("<true/>");
+ ent_f->store_line("</dict>");
+ ent_f->store_line("</plist>");
+
+ ent_f->close();
+ memdelete(ent_f);
+ } else {
+ err = ERR_CANT_CREATE;
+ }
+ }
+ }
+
+ if ((err == OK) && helpers.size() > 0) {
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ for (int i = 0; i < helpers.size(); i++) {
+ String hlp_path = helpers[i];
+ err = da->copy(hlp_path, tmp_app_path_name + "/Contents/Helpers/" + hlp_path.get_file());
+ if (err == OK && sign_enabled) {
+ err = _code_sign(p_preset, tmp_app_path_name + "/Contents/Helpers/" + hlp_path.get_file(), hlp_ent_path);
+ }
+ FileAccess::set_unix_permissions(tmp_app_path_name + "/Contents/Helpers/" + hlp_path.get_file(), 0755);
+ }
}
if (err == OK) {
- DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
for (int i = 0; i < shared_objects.size(); i++) {
String src_path = ProjectSettings::get_singleton()->globalize_path(shared_objects[i].path);
if (da->dir_exists(src_path)) {
@@ -842,7 +884,6 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
err = _code_sign(p_preset, tmp_app_path_name + "/Contents/Frameworks/" + src_path.get_file(), ent_path);
}
}
- memdelete(da);
}
if (sign_enabled) {
@@ -903,6 +944,9 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
err = _notarize(p_preset, p_path);
}
+ // Clean up temporary entitlements files.
+ DirAccess::remove_file_or_error(hlp_ent_path);
+
// Clean up temporary .app dir.
tmp_app_dir->change_dir(tmp_app_path_name);
tmp_app_dir->erase_contents_recursive();
@@ -916,7 +960,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
void EditorExportPlatformOSX::_zip_folder_recursive(zipFile &p_zip, const String &p_root_path, const String &p_folder, const String &p_pkg_name) {
String dir = p_root_path.plus_file(p_folder);
- DirAccess *da = DirAccess::open(dir);
+ DirAccessRef da = DirAccess::open(dir);
da->list_dir_begin();
String f;
while ((f = da->get_next()) != "") {
@@ -931,7 +975,7 @@ void EditorExportPlatformOSX::_zip_folder_recursive(zipFile &p_zip, const String
zipfi.tmz_date.tm_hour = time.hour;
zipfi.tmz_date.tm_mday = date.day;
zipfi.tmz_date.tm_min = time.minute;
- zipfi.tmz_date.tm_mon = date.month - 1; // Note: "tm" month range - 0..11, Godot month range - 1..12, http://www.cplusplus.com/reference/ctime/tm/
+ zipfi.tmz_date.tm_mon = date.month - 1; // Note: "tm" month range - 0..11, Godot month range - 1..12, https://www.cplusplus.com/reference/ctime/tm/
zipfi.tmz_date.tm_sec = time.second;
zipfi.tmz_date.tm_year = date.year;
zipfi.dosDate = 0;
@@ -967,7 +1011,7 @@ void EditorExportPlatformOSX::_zip_folder_recursive(zipFile &p_zip, const String
} else if (da->current_is_dir()) {
_zip_folder_recursive(p_zip, p_root_path, p_folder.plus_file(f), p_pkg_name);
} else {
- bool is_executable = (p_folder.ends_with("MacOS") && (f == p_pkg_name));
+ bool is_executable = (p_folder.ends_with("MacOS") && (f == p_pkg_name)) || p_folder.ends_with("Helpers");
OS::Time time = OS::get_singleton()->get_time();
OS::Date date = OS::get_singleton()->get_date();
@@ -976,7 +1020,7 @@ void EditorExportPlatformOSX::_zip_folder_recursive(zipFile &p_zip, const String
zipfi.tmz_date.tm_hour = time.hour;
zipfi.tmz_date.tm_mday = date.day;
zipfi.tmz_date.tm_min = time.minute;
- zipfi.tmz_date.tm_mon = date.month - 1; // Note: "tm" month range - 0..11, Godot month range - 1..12, http://www.cplusplus.com/reference/ctime/tm/
+ zipfi.tmz_date.tm_mon = date.month - 1; // Note: "tm" month range - 0..11, Godot month range - 1..12, https://www.cplusplus.com/reference/ctime/tm/
zipfi.tmz_date.tm_sec = time.second;
zipfi.tmz_date.tm_year = date.year;
zipfi.dosDate = 0;
@@ -1012,7 +1056,6 @@ void EditorExportPlatformOSX::_zip_folder_recursive(zipFile &p_zip, const String
}
}
da->list_dir_end();
- memdelete(da);
}
bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
diff --git a/platform/osx/export/export_plugin.h b/platform/osx/export/export_plugin.h
index cd85ce2aad..ca5086622e 100644
--- a/platform/osx/export/export_plugin.h
+++ b/platform/osx/export/export_plugin.h
@@ -115,7 +115,7 @@ public:
virtual void get_platform_features(List<String> *r_features) override {
r_features->push_back("pc");
r_features->push_back("s3tc");
- r_features->push_back("macOS");
+ r_features->push_back("macos");
}
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override {
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index df41ccd892..a52436a70a 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -82,6 +82,7 @@ public:
virtual String get_data_path() const override;
virtual String get_cache_path() const override;
virtual String get_bundle_resource_dir() const override;
+ virtual String get_bundle_icon_path() const override;
virtual String get_godot_dir_name() const override;
virtual String get_system_dir(SystemDir p_dir, bool p_shared_storage = true) const override;
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index c6e35fee83..6ef1bdbd11 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -379,14 +379,26 @@ String OS_OSX::get_cache_path() const {
}
String OS_OSX::get_bundle_resource_dir() const {
+ String ret;
+
NSBundle *main = [NSBundle mainBundle];
- NSString *resourcePath = [main resourcePath];
+ if (main) {
+ NSString *resourcePath = [main resourcePath];
+ ret.parse_utf8([resourcePath UTF8String]);
+ }
+ return ret;
+}
- char *utfs = strdup([resourcePath UTF8String]);
+String OS_OSX::get_bundle_icon_path() const {
String ret;
- ret.parse_utf8(utfs);
- free(utfs);
+ NSBundle *main = [NSBundle mainBundle];
+ if (main) {
+ NSString *iconPath = [[main infoDictionary] objectForKey:@"CFBundleIconFile"];
+ if (iconPath) {
+ ret.parse_utf8([iconPath UTF8String]);
+ }
+ }
return ret;
}
diff --git a/platform/uwp/SCsub b/platform/uwp/SCsub
index 71c402358f..8726d32d61 100644
--- a/platform/uwp/SCsub
+++ b/platform/uwp/SCsub
@@ -7,7 +7,7 @@ files = [
"#platform/windows/windows_terminal_logger.cpp",
"joypad_uwp.cpp",
"context_egl_uwp.cpp",
- "app.cpp",
+ "app_uwp.cpp",
"os_uwp.cpp",
]
diff --git a/platform/uwp/app.cpp b/platform/uwp/app_uwp.cpp
index 1da17ffc5d..50e33e6c49 100644
--- a/platform/uwp/app.cpp
+++ b/platform/uwp/app_uwp.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* app.cpp */
+/* app_uwp.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -32,7 +32,7 @@
// This file demonstrates how to initialize EGL in a Windows Store app, using ICoreWindow.
//
-#include "app.h"
+#include "app_uwp.h"
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
diff --git a/platform/uwp/app.h b/platform/uwp/app_uwp.h
index 0b02527dae..8d4a0b90c3 100644
--- a/platform/uwp/app.h
+++ b/platform/uwp/app_uwp.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* app.h */
+/* app_uwp.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#pragma once
+#ifndef APP_UWP_H
+#define APP_UWP_H
#include <string>
@@ -111,3 +112,4 @@ namespace GodotUWP
}
/* clang-format on */
+#endif // APP_UWP_H
diff --git a/platform/uwp/export/export_plugin.cpp b/platform/uwp/export/export_plugin.cpp
index 5bd00b1549..a54b85a803 100644
--- a/platform/uwp/export/export_plugin.cpp
+++ b/platform/uwp/export/export_plugin.cpp
@@ -485,7 +485,7 @@ Error EditorExportPlatformUWP::export_project(const Ref<EditorExportPreset> &p_p
void EditorExportPlatformUWP::get_platform_features(List<String> *r_features) {
r_features->push_back("pc");
- r_features->push_back("UWP");
+ r_features->push_back("uwp");
}
void EditorExportPlatformUWP::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) {
diff --git a/platform/windows/crash_handler_windows.cpp b/platform/windows/crash_handler_windows.cpp
index e2d507eddd..1b4dae207f 100644
--- a/platform/windows/crash_handler_windows.cpp
+++ b/platform/windows/crash_handler_windows.cpp
@@ -32,6 +32,8 @@
#include "core/config/project_settings.h"
#include "core/os/os.h"
+#include "core/version.h"
+#include "core/version_hash.gen.h"
#include "main/main.h"
#ifdef CRASH_HANDLER_EXCEPTION
@@ -127,6 +129,7 @@ DWORD CrashHandlerException(EXCEPTION_POINTERS *ep) {
return EXCEPTION_CONTINUE_SEARCH;
}
+ fprintf(stderr, "\n================================================================\n");
fprintf(stderr, "%s: Program crashed\n", __FUNCTION__);
if (OS::get_singleton()->get_main_loop())
@@ -175,6 +178,12 @@ DWORD CrashHandlerException(EXCEPTION_POINTERS *ep) {
msg = proj_settings->get("debug/settings/crash_handler/message");
}
+ // Print the engine version just before, so that people are reminded to include the version in backtrace reports.
+ if (String(VERSION_HASH).length() != 0) {
+ fprintf(stderr, "Engine version: " VERSION_FULL_NAME " (" VERSION_HASH ")\n");
+ } else {
+ fprintf(stderr, "Engine version: " VERSION_FULL_NAME "\n");
+ }
fprintf(stderr, "Dumping the backtrace. %s\n", msg.utf8().get_data());
int n = 0;
@@ -200,6 +209,7 @@ DWORD CrashHandlerException(EXCEPTION_POINTERS *ep) {
} while (frame.AddrReturn.Offset != 0 && n < 256);
fprintf(stderr, "-- END OF BACKTRACE --\n");
+ fprintf(stderr, "================================================================\n");
SymCleanup(process);
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 9154f7749e..3961480d23 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -321,7 +321,7 @@ def configure_msvc(env, manual_msvc_config):
def configure_mingw(env):
# Workaround for MinGW. See:
- # http://www.scons.org/wiki/LongCmdLinesOnWin32
+ # https://www.scons.org/wiki/LongCmdLinesOnWin32
env.use_windows_spawn_fix()
## Build type
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index b6489e7a95..6402702415 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -80,7 +80,7 @@ String DisplayServerWindows::get_name() const {
}
void DisplayServerWindows::_set_mouse_mode_impl(MouseMode p_mode) {
- if (p_mode == MOUSE_MODE_CAPTURED || p_mode == MOUSE_MODE_CONFINED || p_mode == MOUSE_MODE_CONFINED_HIDDEN) {
+ if (windows.has(MAIN_WINDOW_ID) && (p_mode == MOUSE_MODE_CAPTURED || p_mode == MOUSE_MODE_CONFINED || p_mode == MOUSE_MODE_CONFINED_HIDDEN)) {
// Mouse is grabbed (captured or confined).
WindowData &wd = windows[MAIN_WINDOW_ID];
@@ -118,8 +118,10 @@ void DisplayServerWindows::_set_mouse_mode_impl(MouseMode p_mode) {
void DisplayServerWindows::mouse_set_mode(MouseMode p_mode) {
_THREAD_SAFE_METHOD_
- if (mouse_mode == p_mode)
+ if (mouse_mode == p_mode) {
+ // Already in the same mode; do nothing.
return;
+ }
mouse_mode = p_mode;
@@ -134,7 +136,7 @@ void DisplayServerWindows::mouse_warp_to_position(const Point2i &p_to) {
_THREAD_SAFE_METHOD_
if (!windows.has(last_focused_window)) {
- return; //no window focused?
+ return; // No focused window?
}
if (mouse_mode == MOUSE_MODE_CAPTURED) {
@@ -154,7 +156,6 @@ Point2i DisplayServerWindows::mouse_get_position() const {
POINT p;
GetCursorPos(&p);
return Point2i(p.x, p.y);
- //return Point2(old_x, old_y);
}
MouseButton DisplayServerWindows::mouse_get_button_state() const {
@@ -165,12 +166,12 @@ void DisplayServerWindows::clipboard_set(const String &p_text) {
_THREAD_SAFE_METHOD_
if (!windows.has(last_focused_window)) {
- return; //no window focused?
+ return; // No focused window?
}
- // Convert LF line endings to CRLF in clipboard content
- // Otherwise, line endings won't be visible when pasted in other software
- String text = p_text.replace("\r\n", "\n").replace("\n", "\r\n"); // avoid \r\r\n
+ // Convert LF line endings to CRLF in clipboard content.
+ // Otherwise, line endings won't be visible when pasted in other software.
+ String text = p_text.replace("\r\n", "\n").replace("\n", "\r\n"); // Avoid \r\r\n.
if (!OpenClipboard(windows[last_focused_window].hWnd)) {
ERR_FAIL_MSG("Unable to open clipboard.");
@@ -187,7 +188,7 @@ void DisplayServerWindows::clipboard_set(const String &p_text) {
SetClipboardData(CF_UNICODETEXT, mem);
- // set the CF_TEXT version (not needed?)
+ // Set the CF_TEXT version (not needed?).
CharString utf8 = text.utf8();
mem = GlobalAlloc(GMEM_MOVEABLE, utf8.length() + 1);
ERR_FAIL_COND_MSG(mem == nullptr, "Unable to allocate memory for clipboard contents.");
@@ -206,7 +207,7 @@ String DisplayServerWindows::clipboard_get() const {
_THREAD_SAFE_METHOD_
if (!windows.has(last_focused_window)) {
- return String(); //no window focused?
+ return String(); // No focused window?
}
String ret;
@@ -498,16 +499,18 @@ DisplayServer::WindowID DisplayServerWindows::create_sub_window(WindowMode p_mod
}
void DisplayServerWindows::show_window(WindowID p_id) {
+ ERR_FAIL_COND(!windows.has(p_id));
+
WindowData &wd = windows[p_id];
if (p_id != MAIN_WINDOW_ID) {
_update_window_style(p_id);
}
- ShowWindow(wd.hWnd, wd.no_focus ? SW_SHOWNOACTIVATE : SW_SHOW); // Show The Window
+ ShowWindow(wd.hWnd, wd.no_focus ? SW_SHOWNOACTIVATE : SW_SHOW); // Show the window.
if (!wd.no_focus) {
- SetForegroundWindow(wd.hWnd); // Slightly Higher Priority
- SetFocus(wd.hWnd); // Sets Keyboard Focus To
+ SetForegroundWindow(wd.hWnd); // Slightly higher priority.
+ SetFocus(wd.hWnd); // Set keyboard focus.
}
}
@@ -606,6 +609,8 @@ void DisplayServerWindows::window_set_mouse_passthrough(const Vector<Vector2> &p
}
void DisplayServerWindows::_update_window_mouse_passthrough(WindowID p_window) {
+ ERR_FAIL_COND(!windows.has(p_window));
+
if (windows[p_window].mpath.size() == 0) {
SetWindowRgn(windows[p_window].hWnd, nullptr, TRUE);
} else {
@@ -664,16 +669,11 @@ Point2i DisplayServerWindows::window_get_position(WindowID p_window) const {
ClientToScreen(wd.hWnd, &point);
return Point2i(point.x, point.y);
-
-#if 0
- //do not use this method, as it includes windows decorations
- RECT r;
- GetWindowRect(wd.hWnd, &r);
- return Point2(r.left, r.top);
-#endif
}
void DisplayServerWindows::_update_real_mouse_position(WindowID p_window) {
+ ERR_FAIL_COND(!windows.has(p_window));
+
POINT mouse_pos;
if (GetCursorPos(&mouse_pos) && ScreenToClient(windows[p_window].hWnd, &mouse_pos)) {
if (mouse_pos.x > 0 && mouse_pos.y > 0 && mouse_pos.x <= windows[p_window].width && mouse_pos.y <= windows[p_window].height) {
@@ -691,14 +691,9 @@ void DisplayServerWindows::window_set_position(const Point2i &p_position, Window
ERR_FAIL_COND(!windows.has(p_window));
WindowData &wd = windows[p_window];
- if (wd.fullscreen)
+ if (wd.fullscreen) {
return;
-#if 0
- //wrong needs to account properly for decorations
- RECT r;
- GetWindowRect(wd.hWnd, &r);
- MoveWindow(wd.hWnd, p_position.x, p_position.y, r.right - r.left, r.bottom - r.top, TRUE);
-#else
+ }
RECT rc;
rc.left = p_position.x;
@@ -711,8 +706,8 @@ void DisplayServerWindows::window_set_position(const Point2i &p_position, Window
AdjustWindowRectEx(&rc, style, false, exStyle);
MoveWindow(wd.hWnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);
-#endif
- // Don't let the mouse leave the window when moved
+
+ // Don't let the mouse leave the window when moved.
if (mouse_mode == MOUSE_MODE_CONFINED || mouse_mode == MOUSE_MODE_CONFINED_HIDDEN) {
RECT rect;
GetClientRect(wd.hWnd, &rect);
@@ -729,16 +724,15 @@ void DisplayServerWindows::window_set_transient(WindowID p_window, WindowID p_pa
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(p_window == p_parent);
-
ERR_FAIL_COND(!windows.has(p_window));
+
WindowData &wd_window = windows[p_window];
ERR_FAIL_COND(wd_window.transient_parent == p_parent);
-
ERR_FAIL_COND_MSG(wd_window.always_on_top, "Windows with the 'on top' can't become transient.");
if (p_parent == INVALID_WINDOW_ID) {
- //remove transient
+ // Remove transient.
ERR_FAIL_COND(wd_window.transient_parent == INVALID_WINDOW_ID);
ERR_FAIL_COND(!windows.has(wd_window.transient_parent));
@@ -838,7 +832,7 @@ void DisplayServerWindows::window_set_size(const Size2i p_size, WindowID p_windo
MoveWindow(wd.hWnd, rect.left, rect.top, w, h, TRUE);
- // Don't let the mouse leave the window when resizing to a smaller resolution
+ // Don't let the mouse leave the window when resizing to a smaller resolution.
if (mouse_mode == MOUSE_MODE_CONFINED || mouse_mode == MOUSE_MODE_CONFINED_HIDDEN) {
RECT crect;
GetClientRect(wd.hWnd, &crect);
@@ -854,12 +848,13 @@ Size2i DisplayServerWindows::window_get_size(WindowID p_window) const {
ERR_FAIL_COND_V(!windows.has(p_window), Size2i());
const WindowData &wd = windows[p_window];
+ // GetClientRect() returns a zero rect for a minimized window, so we need to get the size in another way.
if (wd.minimized) {
return Size2(wd.width, wd.height);
}
RECT r;
- if (GetClientRect(wd.hWnd, &r)) { // Only area inside of window border
+ if (GetClientRect(wd.hWnd, &r)) { // Retrieves area inside of window border, including decoration.
return Size2(r.right - r.left, r.bottom - r.top);
}
return Size2();
@@ -872,13 +867,17 @@ Size2i DisplayServerWindows::window_get_real_size(WindowID p_window) const {
const WindowData &wd = windows[p_window];
RECT r;
- if (GetWindowRect(wd.hWnd, &r)) { // Includes area of the window border
+ if (GetWindowRect(wd.hWnd, &r)) { // Retrieves area inside of window border, including decoration.
return Size2(r.right - r.left, r.bottom - r.top);
}
return Size2();
}
void DisplayServerWindows::_get_window_style(bool p_main_window, bool p_fullscreen, bool p_borderless, bool p_resizable, bool p_maximized, bool p_no_activate_focus, DWORD &r_style, DWORD &r_style_ex) {
+ // Windows docs for window styles:
+ // https://docs.microsoft.com/en-us/windows/win32/winmsg/window-styles
+ // https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles
+
r_style = 0;
r_style_ex = WS_EX_WINDOWEDGE;
if (p_main_window) {
@@ -886,10 +885,7 @@ void DisplayServerWindows::_get_window_style(bool p_main_window, bool p_fullscre
}
if (p_fullscreen || p_borderless) {
- r_style |= WS_POPUP;
- //if (p_borderless) {
- // r_style_ex |= WS_EX_TOOLWINDOW;
- //}
+ r_style |= WS_POPUP; // p_borderless was WS_EX_TOOLWINDOW in the past.
} else {
if (p_resizable) {
if (p_maximized) {
@@ -959,6 +955,11 @@ void DisplayServerWindows::window_set_mode(WindowMode p_mode, WindowID p_window)
_update_window_style(p_window, false);
MoveWindow(wd.hWnd, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, TRUE);
+
+ if (restore_mouse_trails > 1) {
+ SystemParametersInfoA(SPI_SETMOUSETRAILS, restore_mouse_trails, 0, 0);
+ restore_mouse_trails = 0;
+ }
} else if (p_mode == WINDOW_MODE_WINDOWED) {
ShowWindow(wd.hWnd, SW_RESTORE);
wd.maximized = false;
@@ -998,6 +999,13 @@ void DisplayServerWindows::window_set_mode(WindowMode p_mode, WindowID p_window)
_update_window_style(false);
MoveWindow(wd.hWnd, pos.x, pos.y, size.width, size.height, TRUE);
+
+ // If the user has mouse trails enabled in windows, then sometimes the cursor disappears in fullscreen mode.
+ // Save number of trails so we can restore when exiting, then turn off mouse trails
+ SystemParametersInfoA(SPI_GETMOUSETRAILS, 0, &restore_mouse_trails, 0);
+ if (restore_mouse_trails > 1) {
+ SystemParametersInfoA(SPI_SETMOUSETRAILS, 0, 0, 0);
+ }
}
}
@@ -1025,7 +1033,7 @@ bool DisplayServerWindows::window_is_maximize_allowed(WindowID p_window) const {
// FIXME: Implement this, or confirm that it should always be true.
- return true; //no idea
+ return true;
}
void DisplayServerWindows::window_set_flag(WindowFlags p_flag, bool p_enabled, WindowID p_window) {
@@ -1170,8 +1178,9 @@ void DisplayServerWindows::window_set_ime_position(const Point2i &p_pos, WindowI
void DisplayServerWindows::console_set_visible(bool p_enabled) {
_THREAD_SAFE_METHOD_
- if (console_visible == p_enabled)
+ if (console_visible == p_enabled) {
return;
+ }
ShowWindow(GetConsoleWindow(), p_enabled ? SW_SHOW : SW_HIDE);
console_visible = p_enabled;
}
@@ -1185,8 +1194,9 @@ void DisplayServerWindows::cursor_set_shape(CursorShape p_shape) {
ERR_FAIL_INDEX(p_shape, CURSOR_MAX);
- if (cursor_shape == p_shape)
+ if (cursor_shape == p_shape) {
return;
+ }
if (mouse_mode != MOUSE_MODE_VISIBLE && mouse_mode != MOUSE_MODE_CONFINED) {
cursor_shape = p_shape;
@@ -1196,7 +1206,7 @@ void DisplayServerWindows::cursor_set_shape(CursorShape p_shape) {
static const LPCTSTR win_cursors[CURSOR_MAX] = {
IDC_ARROW,
IDC_IBEAM,
- IDC_HAND, //finger
+ IDC_HAND, // Finger.
IDC_CROSS,
IDC_WAIT,
IDC_APPSTARTING,
@@ -1227,49 +1237,49 @@ DisplayServer::CursorShape DisplayServerWindows::cursor_get_shape() const {
}
void DisplayServerWindows::GetMaskBitmaps(HBITMAP hSourceBitmap, COLORREF clrTransparent, OUT HBITMAP &hAndMaskBitmap, OUT HBITMAP &hXorMaskBitmap) {
- // Get the system display DC
+ // Get the system display DC.
HDC hDC = GetDC(nullptr);
- // Create helper DC
+ // Create helper DC.
HDC hMainDC = CreateCompatibleDC(hDC);
HDC hAndMaskDC = CreateCompatibleDC(hDC);
HDC hXorMaskDC = CreateCompatibleDC(hDC);
- // Get the dimensions of the source bitmap
+ // Get the dimensions of the source bitmap.
BITMAP bm;
GetObject(hSourceBitmap, sizeof(BITMAP), &bm);
- // Create the mask bitmaps
- hAndMaskBitmap = CreateCompatibleBitmap(hDC, bm.bmWidth, bm.bmHeight); // color
- hXorMaskBitmap = CreateCompatibleBitmap(hDC, bm.bmWidth, bm.bmHeight); // color
+ // Create the mask bitmaps.
+ hAndMaskBitmap = CreateCompatibleBitmap(hDC, bm.bmWidth, bm.bmHeight); // Color.
+ hXorMaskBitmap = CreateCompatibleBitmap(hDC, bm.bmWidth, bm.bmHeight); // Color.
- // Release the system display DC
+ // Release the system display DC.
ReleaseDC(nullptr, hDC);
- // Select the bitmaps to helper DC
+ // Select the bitmaps to helper DC.
HBITMAP hOldMainBitmap = (HBITMAP)SelectObject(hMainDC, hSourceBitmap);
HBITMAP hOldAndMaskBitmap = (HBITMAP)SelectObject(hAndMaskDC, hAndMaskBitmap);
HBITMAP hOldXorMaskBitmap = (HBITMAP)SelectObject(hXorMaskDC, hXorMaskBitmap);
// Assign the monochrome AND mask bitmap pixels so that the pixels of the source bitmap
- // with 'clrTransparent' will be white pixels of the monochrome bitmap
+ // with 'clrTransparent' will be white pixels of the monochrome bitmap.
SetBkColor(hMainDC, clrTransparent);
BitBlt(hAndMaskDC, 0, 0, bm.bmWidth, bm.bmHeight, hMainDC, 0, 0, SRCCOPY);
// Assign the color XOR mask bitmap pixels so that the pixels of the source bitmap
// with 'clrTransparent' will be black and rest the pixels same as corresponding
- // pixels of the source bitmap
+ // pixels of the source bitmap.
SetBkColor(hXorMaskDC, RGB(0, 0, 0));
SetTextColor(hXorMaskDC, RGB(255, 255, 255));
BitBlt(hXorMaskDC, 0, 0, bm.bmWidth, bm.bmHeight, hAndMaskDC, 0, 0, SRCCOPY);
BitBlt(hXorMaskDC, 0, 0, bm.bmWidth, bm.bmHeight, hMainDC, 0, 0, SRCAND);
- // Deselect bitmaps from the helper DC
+ // Deselect bitmaps from the helper DC.
SelectObject(hMainDC, hOldMainBitmap);
SelectObject(hAndMaskDC, hOldAndMaskBitmap);
SelectObject(hXorMaskDC, hOldXorMaskBitmap);
- // Delete the helper DC
+ // Delete the helper DC.
DeleteDC(hXorMaskDC);
DeleteDC(hAndMaskDC);
DeleteDC(hMainDC);
@@ -1326,7 +1336,7 @@ void DisplayServerWindows::cursor_set_custom_image(const RES &p_cursor, CursorSh
UINT image_size = texture_size.width * texture_size.height;
- // Create the BITMAP with alpha channel
+ // Create the BITMAP with alpha channel.
COLORREF *buffer = (COLORREF *)memalloc(sizeof(COLORREF) * image_size);
for (UINT index = 0; index < image_size; index++) {
@@ -1341,11 +1351,11 @@ void DisplayServerWindows::cursor_set_custom_image(const RES &p_cursor, CursorSh
*(buffer + index) = image->get_pixel(column_index, row_index).to_argb32();
}
- // Using 4 channels, so 4 * 8 bits
+ // Using 4 channels, so 4 * 8 bits.
HBITMAP bitmap = CreateBitmap(texture_size.width, texture_size.height, 1, 4 * 8, buffer);
COLORREF clrTransparent = -1;
- // Create the AND and XOR masks for the bitmap
+ // Create the AND and XOR masks for the bitmap.
HBITMAP hAndMask = nullptr;
HBITMAP hXorMask = nullptr;
@@ -1357,7 +1367,7 @@ void DisplayServerWindows::cursor_set_custom_image(const RES &p_cursor, CursorSh
return;
}
- // Finally, create the icon
+ // Finally, create the icon.
ICONINFO iconinfo;
iconinfo.fIcon = FALSE;
iconinfo.xHotspot = p_hotspot.x;
@@ -1365,8 +1375,9 @@ void DisplayServerWindows::cursor_set_custom_image(const RES &p_cursor, CursorSh
iconinfo.hbmMask = hAndMask;
iconinfo.hbmColor = hXorMask;
- if (cursors[p_shape])
+ if (cursors[p_shape]) {
DestroyIcon(cursors[p_shape]);
+ }
cursors[p_shape] = CreateIconIndirect(&iconinfo);
@@ -1392,7 +1403,7 @@ void DisplayServerWindows::cursor_set_custom_image(const RES &p_cursor, CursorSh
memfree(buffer);
DeleteObject(bitmap);
} else {
- // Reset to default system cursor
+ // Reset to default system cursor.
if (cursors[p_shape]) {
DestroyIcon(cursors[p_shape]);
cursors[p_shape] = nullptr;
@@ -1574,9 +1585,9 @@ void DisplayServerWindows::set_native_icon(const String &p_filename) {
icon_dir = (ICONDIR *)memrealloc(icon_dir, 3 * sizeof(WORD) + icon_dir->idCount * sizeof(ICONDIRENTRY));
f->get_buffer((uint8_t *)&icon_dir->idEntries[0], icon_dir->idCount * sizeof(ICONDIRENTRY));
- int small_icon_index = -1; // Select 16x16 with largest color count
+ int small_icon_index = -1; // Select 16x16 with largest color count.
int small_icon_cc = 0;
- int big_icon_index = -1; // Select largest
+ int big_icon_index = -1; // Select largest.
int big_icon_width = 16;
int big_icon_cc = 0;
@@ -1606,7 +1617,7 @@ void DisplayServerWindows::set_native_icon(const String &p_filename) {
small_icon_cc = big_icon_cc;
}
- // Read the big icon
+ // Read the big icon.
DWORD bytecount_big = icon_dir->idEntries[big_icon_index].dwBytesInRes;
Vector<uint8_t> data_big;
data_big.resize(bytecount_big);
@@ -1616,7 +1627,7 @@ void DisplayServerWindows::set_native_icon(const String &p_filename) {
HICON icon_big = CreateIconFromResource((PBYTE)&data_big.write[0], bytecount_big, TRUE, 0x00030000);
ERR_FAIL_COND_MSG(!icon_big, "Could not create " + itos(big_icon_width) + "x" + itos(big_icon_width) + " @" + itos(big_icon_cc) + " icon, error: " + format_error_message(GetLastError()) + ".");
- // Read the small icon
+ // Read the small icon.
DWORD bytecount_small = icon_dir->idEntries[small_icon_index].dwBytesInRes;
Vector<uint8_t> data_small;
data_small.resize(bytecount_small);
@@ -1626,7 +1637,7 @@ void DisplayServerWindows::set_native_icon(const String &p_filename) {
HICON icon_small = CreateIconFromResource((PBYTE)&data_small.write[0], bytecount_small, TRUE, 0x00030000);
ERR_FAIL_COND_MSG(!icon_small, "Could not create 16x16 @" + itos(small_icon_cc) + " icon, error: " + format_error_message(GetLastError()) + ".");
- // Online tradition says to be sure last error is cleared and set the small icon first
+ // Online tradition says to be sure last error is cleared and set the small icon first.
int err = 0;
SetLastError(err);
@@ -1647,12 +1658,13 @@ void DisplayServerWindows::set_icon(const Ref<Image> &p_icon) {
ERR_FAIL_COND(!p_icon.is_valid());
Ref<Image> icon = p_icon->duplicate();
- if (icon->get_format() != Image::FORMAT_RGBA8)
+ if (icon->get_format() != Image::FORMAT_RGBA8) {
icon->convert(Image::FORMAT_RGBA8);
+ }
int w = icon->get_width();
int h = icon->get_height();
- /* Create temporary bitmap buffer */
+ // Create temporary bitmap buffer.
int icon_len = 40 + h * w * 4;
Vector<BYTE> v;
v.resize(icon_len);
@@ -1686,10 +1698,10 @@ void DisplayServerWindows::set_icon(const Ref<Image> &p_icon) {
HICON hicon = CreateIconFromResource(icon_bmp, icon_len, TRUE, 0x00030000);
- /* Set the icon for the window */
+ // Set the icon for the window.
SendMessage(windows[MAIN_WINDOW_ID].hWnd, WM_SETICON, ICON_SMALL, (LPARAM)hicon);
- /* Set the icon in the task manager (should we do this?) */
+ // Set the icon in the task manager (should we do this?).
SendMessage(windows[MAIN_WINDOW_ID].hWnd, WM_SETICON, ICON_BIG, (LPARAM)hicon);
}
@@ -1717,13 +1729,13 @@ void DisplayServerWindows::set_context(Context p_context) {
// Keeping the name suggested by Microsoft, but this macro really answers:
// Is this mouse event emulated from touch or pen input?
#define IsPenEvent(dw) (((dw)&SIGNATURE_MASK) == MI_WP_SIGNATURE)
-// This one tells whether the event comes from touchscreen (and not from pen)
+// This one tells whether the event comes from touchscreen (and not from pen).
#define IsTouchEvent(dw) (IsPenEvent(dw) && ((dw)&0x80))
void DisplayServerWindows::_touch_event(WindowID p_window, bool p_pressed, float p_x, float p_y, int idx) {
- // Defensive
- if (touch_state.has(idx) == p_pressed)
+ if (touch_state.has(idx) == p_pressed) {
return;
+ }
if (p_pressed) {
touch_state.insert(idx, Vector2(p_x, p_y));
@@ -1743,12 +1755,13 @@ void DisplayServerWindows::_touch_event(WindowID p_window, bool p_pressed, float
void DisplayServerWindows::_drag_event(WindowID p_window, float p_x, float p_y, int idx) {
Map<int, Vector2>::Element *curr = touch_state.find(idx);
- // Defensive
- if (!curr)
+ if (!curr) {
return;
+ }
- if (curr->get() == Vector2(p_x, p_y))
+ if (curr->get() == Vector2(p_x, p_y)) {
return;
+ }
Ref<InputEventScreenDrag> event;
event.instantiate();
@@ -1790,7 +1803,7 @@ void DisplayServerWindows::_dispatch_input_event(const Ref<InputEvent> &p_event)
Ref<InputEventFromWindow> event_from_window = p_event;
if (event_from_window.is_valid() && event_from_window->get_window_id() != INVALID_WINDOW_ID) {
- //send to a window
+ // Send to a single window.
if (!windows.has(event_from_window->get_window_id())) {
in_dispatch_input_event = false;
ERR_FAIL_MSG("DisplayServerWindows: Invalid window id in input event.");
@@ -1802,7 +1815,7 @@ void DisplayServerWindows::_dispatch_input_event(const Ref<InputEvent> &p_event)
}
callable.call((const Variant **)&evp, 1, ret, ce);
} else {
- //send to all windows
+ // Send to all windows.
for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) {
Callable callable = E->get().input_event_callback;
if (callable.is_null()) {
@@ -1815,6 +1828,9 @@ void DisplayServerWindows::_dispatch_input_event(const Ref<InputEvent> &p_event)
in_dispatch_input_event = false;
}
+// Our default window procedure to handle processing of window-related system messages/events.
+// Also known as DefProc or DefWindowProc.
+// See: https://docs.microsoft.com/en-us/windows/win32/winmsg/window-procedures
LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
if (drop_events) {
if (user_proc) {
@@ -1827,6 +1843,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
WindowID window_id = INVALID_WINDOW_ID;
bool window_created = false;
+ // Check whether window exists.
for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) {
if (E->get().hWnd == hWnd) {
window_id = E->key();
@@ -1835,19 +1852,19 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
}
+ // Window doesn't exist or creation in progress, don't handle messages yet.
if (!window_created) {
- // Window creation in progress.
window_id = window_id_counter;
ERR_FAIL_COND_V(!windows.has(window_id), 0);
}
- switch (uMsg) // Check For Windows Messages
- {
+ // Process window messages.
+ switch (uMsg) {
case WM_SETFOCUS: {
windows[window_id].window_has_focus = true;
last_focused_window = window_id;
- // Restore mouse mode
+ // Restore mouse mode.
_set_mouse_mode_impl(mouse_mode);
if (!app_focused) {
@@ -1856,16 +1873,15 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
app_focused = true;
}
- break;
- }
+ } break;
case WM_KILLFOCUS: {
windows[window_id].window_has_focus = false;
last_focused_window = window_id;
- // Release capture unconditionally because it can be set due to dragging, in addition to captured mode
+ // Release capture unconditionally because it can be set due to dragging, in addition to captured mode.
ReleaseCapture();
- // Release every touch to avoid sticky points
+ // Release every touch to avoid sticky points.
for (Map<int, Vector2>::Element *E = touch_state.front(); E; E = E->next()) {
_touch_event(window_id, false, E->get().x, E->get().y, E->key());
}
@@ -1883,10 +1899,8 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
app_focused = false;
}
-
- break;
- }
- case WM_ACTIVATE: { // Watch For Window Activate Message
+ } break;
+ case WM_ACTIVATE: { // Watch for window activate message.
if (!windows[window_id].window_focused) {
_process_activate_event(window_id, wParam, lParam);
} else {
@@ -1896,11 +1910,13 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
// Run a timer to prevent event catching warning if the focused window is closing.
windows[window_id].focus_timer_id = SetTimer(windows[window_id].hWnd, 2, USER_TIMER_MINIMUM, (TIMERPROC) nullptr);
}
- return 0; // Return To The Message Loop
- }
+ return 0; // Return to the message loop.
+ } break;
case WM_GETMINMAXINFO: {
if (windows[window_id].resizable && !windows[window_id].fullscreen) {
- Size2 decor = window_get_size(window_id) - window_get_real_size(window_id); // Size of window decorations
+ // Size of window decorations.
+ Size2 decor = window_get_real_size(window_id) - window_get_size(window_id);
+
MINMAXINFO *min_max_info = (MINMAXINFO *)lParam;
if (windows[window_id].min_size != Size2()) {
min_max_info->ptMinTrackSize.x = windows[window_id].min_size.x + decor.x;
@@ -1911,37 +1927,31 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
min_max_info->ptMaxTrackSize.y = windows[window_id].max_size.y + decor.y;
}
return 0;
- } else {
- break;
}
- }
- case WM_PAINT:
-
+ } break;
+ case WM_PAINT: {
Main::force_redraw();
- break;
-
- case WM_SYSCOMMAND: // Intercept System Commands
+ } break;
+ case WM_SYSCOMMAND: // Intercept system commands.
{
- switch (wParam) // Check System Calls
+ switch (wParam) // Check system calls.
{
- case SC_SCREENSAVE: // Screensaver Trying To Start?
- case SC_MONITORPOWER: // Monitor Trying To Enter Powersave?
- return 0; // Prevent From Happening
+ case SC_SCREENSAVE: // Screensaver trying to start?
+ case SC_MONITORPOWER: // Monitor trying to enter powersave?
+ return 0; // Prevent from happening.
case SC_KEYMENU:
if ((lParam >> 16) <= 0)
return 0;
}
- break; // Exit
- }
-
- case WM_CLOSE: // Did We Receive A Close Message?
+ } break;
+ case WM_CLOSE: // Did we receive a close message?
{
if (windows[window_id].focus_timer_id != 0U) {
KillTimer(windows[window_id].hWnd, windows[window_id].focus_timer_id);
}
_send_window_event(windows[window_id], WINDOW_EVENT_CLOSE_REQUEST);
- return 0; // Jump Back
+ return 0; // Jump back.
}
case WM_MOUSELEAVE: {
old_invalid = true;
@@ -1983,7 +1993,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
Point2i c(windows[window_id].width / 2, windows[window_id].height / 2);
- // centering just so it works as before
+ // Centering just so it works as before.
POINT pos = { (int)c.x, (int)c.y };
ClientToScreen(windows[window_id].hWnd, &pos);
SetCursorPos(pos.x, pos.y);
@@ -2006,7 +2016,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
(double(raw->data.mouse.lLastX) - 65536.0 / (nScreenWidth)) * nScreenWidth / 65536.0 + nScreenLeft,
(double(raw->data.mouse.lLastY) - 65536.0 / (nScreenHeight)) * nScreenHeight / 65536.0 + nScreenTop);
- POINT coords; //client coords
+ POINT coords; // Client coords.
coords.x = abs_pos.x;
coords.y = abs_pos.y;
@@ -2015,14 +2025,11 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
mm->set_relative(Vector2(coords.x - old_x, coords.y - old_y));
old_x = coords.x;
old_y = coords.y;
-
- /*Input.mi.dx = (int)((((double)(pos.x)-nScreenLeft) * 65536) / nScreenWidth + 65536 / (nScreenWidth));
- Input.mi.dy = (int)((((double)(pos.y)-nScreenTop) * 65536) / nScreenHeight + 65536 / (nScreenHeight));
- */
}
- if (windows[window_id].window_has_focus && mm->get_relative() != Vector2())
+ if (windows[window_id].window_has_focus && mm->get_relative() != Vector2()) {
Input::get_singleton()->parse_input_event(mm);
+ }
}
delete[] lpb;
} break;
@@ -2167,7 +2174,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
if (Input::get_singleton()->is_emulating_mouse_from_touch()) {
- // Universal translation enabled; ignore OS translation
+ // Universal translation enabled; ignore OS translation.
LPARAM extra = GetMessageExtraInfo();
if (IsTouchEvent(extra)) {
break;
@@ -2175,7 +2182,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
if (outside) {
- //mouse enter
+ // Mouse enter.
if (mouse_mode != MOUSE_MODE_CAPTURED) {
_send_window_event(windows[window_id], WINDOW_EVENT_MOUSE_ENTER);
@@ -2186,7 +2193,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
cursor_set_shape(c);
outside = false;
- //Once-Off notification, must call again....
+ // Once-off notification, must call again.
TRACKMOUSEEVENT tme;
tme.cbSize = sizeof(TRACKMOUSEEVENT);
tme.dwFlags = TME_LEAVE;
@@ -2219,7 +2226,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
mm->set_button_mask(last_button_state);
- POINT coords; //client coords
+ POINT coords; // Client coords.
coords.x = GET_X_LPARAM(lParam);
coords.y = GET_Y_LPARAM(lParam);
@@ -2261,7 +2268,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
Input::get_singleton()->parse_input_event(mm);
}
- return 0; //Pointer event handled return 0 to avoid duplicate WM_MOUSEMOVE event
+ return 0; // Pointer event handled return 0 to avoid duplicate WM_MOUSEMOVE event.
} break;
case WM_MOUSEMOVE: {
if (windows[window_id].block_mm) {
@@ -2273,7 +2280,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
if (Input::get_singleton()->is_emulating_mouse_from_touch()) {
- // Universal translation enabled; ignore OS translation
+ // Universal translation enabled; ignore OS translation.
LPARAM extra = GetMessageExtraInfo();
if (IsTouchEvent(extra)) {
break;
@@ -2281,7 +2288,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
if (outside) {
- //mouse enter
+ // Mouse enter.
if (mouse_mode != MOUSE_MODE_CAPTURED) {
_send_window_event(windows[window_id], WINDOW_EVENT_MOUSE_ENTER);
@@ -2292,7 +2299,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
cursor_set_shape(c);
outside = false;
- //Once-Off notification, must call again....
+ // Once-off notification, must call again.
TRACKMOUSEEVENT tme;
tme.cbSize = sizeof(TRACKMOUSEEVENT);
tme.dwFlags = TME_LEAVE;
@@ -2370,7 +2377,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
if (Input::get_singleton()->is_emulating_mouse_from_touch()) {
- // Universal translation enabled; ignore OS translations for left button
+ // Universal translation enabled; ignore OS translations for left button.
LPARAM extra = GetMessageExtraInfo();
if (IsTouchEvent(extra)) {
break;
@@ -2494,7 +2501,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
mb->set_ctrl_pressed((wParam & MK_CONTROL) != 0);
mb->set_shift_pressed((wParam & MK_SHIFT) != 0);
mb->set_alt_pressed(alt_mem);
- //mb->is_alt_pressed()=(wParam&MK_MENU)!=0;
+ // mb->is_alt_pressed()=(wParam&MK_MENU)!=0;
if (mb->is_pressed()) {
last_button_state |= MouseButton(1 << (mb->get_button_index() - 1));
} else {
@@ -2521,7 +2528,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
}
} else {
- // for reasons unknown to mankind, wheel comes in screen coordinates
+ // For reasons unknown to mankind, wheel comes in screen coordinates.
POINT coords;
coords.x = mb->get_position().x;
coords.y = mb->get_position().y;
@@ -2535,7 +2542,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
Input::get_singleton()->parse_input_event(mb);
if (mb->is_pressed() && mb->get_button_index() > 3 && mb->get_button_index() < 8) {
- //send release for mouse wheel
+ // Send release for mouse wheel.
Ref<InputEventMouseButton> mbd = mb->duplicate();
mbd->set_window_id(window_id);
last_button_state &= (MouseButton) ~(1 << (mbd->get_button_index() - 1));
@@ -2545,7 +2552,6 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
} break;
-
case WM_MOVE: {
if (!IsIconic(windows[window_id].hWnd)) {
int x = int16_t(LOWORD(lParam));
@@ -2561,12 +2567,14 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
}
} break;
-
case WM_SIZE: {
- // Ignore size when a SIZE_MINIMIZED event is triggered
+ // Ignore window size change when a SIZE_MINIMIZED event is triggered.
if (wParam != SIZE_MINIMIZED) {
+ // The new width and height of the client area.
int window_w = LOWORD(lParam);
int window_h = HIWORD(lParam);
+
+ // Set new value to the size if it isn't preserved.
if (window_w > 0 && window_h > 0 && !windows[window_id].preserve_window_size) {
windows[window_id].width = window_w;
windows[window_id].height = window_h;
@@ -2577,29 +2585,38 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
#endif
- } else {
+ } else { // If the size is preserved.
windows[window_id].preserve_window_size = false;
+
+ // Restore the old size.
window_set_size(Size2(windows[window_id].width, windows[window_id].height), window_id);
}
- } else {
+ } else { // When the window has been minimized, preserve its size.
windows[window_id].preserve_window_size = true;
}
+ // Call windows rect change callback.
if (!windows[window_id].rect_changed_callback.is_null()) {
Variant size = Rect2i(windows[window_id].last_pos.x, windows[window_id].last_pos.y, windows[window_id].width, windows[window_id].height);
- Variant *sizep = &size;
+ Variant *size_ptr = &size;
Variant ret;
Callable::CallError ce;
- windows[window_id].rect_changed_callback.call((const Variant **)&sizep, 1, ret, ce);
+ windows[window_id].rect_changed_callback.call((const Variant **)&size_ptr, 1, ret, ce);
}
+ // The window has been maximized.
if (wParam == SIZE_MAXIMIZED) {
windows[window_id].maximized = true;
windows[window_id].minimized = false;
- } else if (wParam == SIZE_MINIMIZED) {
+ }
+ // The window has been minimized.
+ else if (wParam == SIZE_MINIMIZED) {
windows[window_id].maximized = false;
windows[window_id].minimized = true;
- } else if (wParam == SIZE_RESTORED) {
+ windows[window_id].preserve_window_size = false;
+ }
+ // The window has been resized, but neither the SIZE_MINIMIZED nor SIZE_MAXIMIZED value applies.
+ else if (wParam == SIZE_RESTORED) {
windows[window_id].maximized = false;
windows[window_id].minimized = false;
}
@@ -2626,9 +2643,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
ZeroMemory(dib_data, dib_size.x * dib_size.y * 4);
}
#endif
- //return 0; // Jump Back
} break;
-
case WM_ENTERSIZEMOVE: {
Input::get_singleton()->release_pressed_events();
windows[window_id].move_timer_id = SetTimer(windows[window_id].hWnd, 1, USER_TIMER_MINIMUM, (TIMERPROC) nullptr);
@@ -2648,7 +2663,6 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
windows[window_id].focus_timer_id = 0U;
}
} break;
-
case WM_SYSKEYDOWN:
case WM_SYSKEYUP:
case WM_KEYUP:
@@ -2700,7 +2714,6 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
case WM_INPUTLANGCHANGEREQUEST: {
// FIXME: Do something?
} break;
-
case WM_TOUCH: {
BOOL bHandled = FALSE;
UINT cInputs = LOWORD(wParam);
@@ -2714,7 +2727,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
TOUCH_COORD_TO_PIXEL(ti.y),
};
ScreenToClient(hWnd, &touch_pos);
- //do something with each touch input entry
+ // Do something with each touch input entry.
if (ti.dwFlags & TOUCHEVENTF_MOVE) {
_drag_event(window_id, touch_pos.x, touch_pos.y, ti.dwID);
} else if (ti.dwFlags & (TOUCHEVENTF_UP | TOUCHEVENTF_DOWN)) {
@@ -2723,11 +2736,11 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
bHandled = TRUE;
} else {
- /* handle the error here */
+ // TODO: Handle the error here.
}
memdelete_arr(pInputs);
} else {
- /* handle the error here, probably out of memory */
+ // TODO: Handle the error here, probably out of memory.
}
if (bHandled) {
CloseTouchInputHandle((HTOUCHINPUT)lParam);
@@ -2735,14 +2748,13 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
};
} break;
-
case WM_DEVICECHANGE: {
joypad->probe_joypads();
} break;
case WM_SETCURSOR: {
if (LOWORD(lParam) == HTCLIENT) {
if (windows[window_id].window_has_focus && (mouse_mode == MOUSE_MODE_HIDDEN || mouse_mode == MOUSE_MODE_CAPTURED || mouse_mode == MOUSE_MODE_CONFINED_HIDDEN)) {
- //Hide the cursor
+ // Hide the cursor.
if (hCursor == nullptr) {
hCursor = SetCursor(nullptr);
} else {
@@ -2757,7 +2769,6 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
}
}
-
} break;
case WM_DROPFILES: {
HDROP hDropInfo = (HDROP)wParam;
@@ -2781,9 +2792,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
Callable::CallError ce;
windows[window_id].drop_files_callback.call((const Variant **)&vp, 1, ret, ce);
}
-
} break;
-
default: {
if (user_proc) {
return CallWindowProcW(user_proc, hWnd, uMsg, wParam, lParam);
@@ -2809,7 +2818,7 @@ void DisplayServerWindows::_process_activate_event(WindowID p_window_id, WPARAM
alt_mem = false;
control_mem = false;
shift_mem = false;
- } else { // WM_INACTIVE
+ } else { // WM_INACTIVE.
Input::get_singleton()->release_pressed_events();
_send_window_event(windows[p_window_id], WINDOW_EVENT_FOCUS_OUT);
windows[p_window_id].window_focused = false;
@@ -2826,7 +2835,7 @@ void DisplayServerWindows::_process_key_events() {
KeyEvent &ke = key_event_buffer[i];
switch (ke.uMsg) {
case WM_CHAR: {
- // extended keys should only be processed as WM_KEYDOWN message.
+ // Extended keys should only be processed as WM_KEYDOWN message.
if (!KeyMappingWindows::is_extended_key(ke.wParam) && ((i == 0 && ke.uMsg == WM_CHAR) || (i > 0 && key_event_buffer[i - 1].uMsg == WM_CHAR))) {
static char32_t prev_wc = 0;
char32_t unicode = ke.wParam;
@@ -2867,9 +2876,9 @@ void DisplayServerWindows::_process_key_events() {
k->set_unicode(0);
Input::get_singleton()->parse_input_event(k);
+ } else {
+ // Do nothing.
}
-
- //do nothing
} break;
case WM_KEYUP:
case WM_KEYDOWN: {
@@ -2885,7 +2894,7 @@ void DisplayServerWindows::_process_key_events() {
k->set_pressed(ke.uMsg == WM_KEYDOWN);
if ((ke.lParam & (1 << 24)) && (ke.wParam == VK_RETURN)) {
- // Special case for Numpad Enter key
+ // Special case for Numpad Enter key.
k->set_keycode(KEY_KP_ENTER);
} else {
k->set_keycode((Key)KeyMappingWindows::get_keysym(ke.wParam));
@@ -3031,8 +3040,8 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode,
if (p_mode != WINDOW_MODE_FULLSCREEN) {
wd.pre_fs_valid = true;
}
-#ifdef VULKAN_ENABLED
+#ifdef VULKAN_ENABLED
if (rendering_driver == "vulkan") {
if (context_vulkan->window_create(id, p_vsync_mode, wd.hWnd, hInstance, WindowRect.right - WindowRect.left, WindowRect.bottom - WindowRect.top) == -1) {
memdelete(context_vulkan);
@@ -3087,7 +3096,7 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode,
wd.last_pressure_update = 0;
wd.last_tilt = Vector2();
- // IME
+ // IME.
wd.im_himc = ImmGetContext(wd.hWnd);
ImmReleaseContext(wd.hWnd, wd.im_himc);
@@ -3102,7 +3111,7 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode,
return id;
}
-// WinTab API
+// WinTab API.
bool DisplayServerWindows::wintab_available = false;
WTOpenPtr DisplayServerWindows::wintab_WTOpen = nullptr;
WTClosePtr DisplayServerWindows::wintab_WTClose = nullptr;
@@ -3110,7 +3119,7 @@ WTInfoPtr DisplayServerWindows::wintab_WTInfo = nullptr;
WTPacketPtr DisplayServerWindows::wintab_WTPacket = nullptr;
WTEnablePtr DisplayServerWindows::wintab_WTEnable = nullptr;
-// Windows Ink API
+// Windows Ink API.
bool DisplayServerWindows::winink_available = false;
GetPointerTypePtr DisplayServerWindows::win8p_GetPointerType = nullptr;
GetPointerPenInfoPtr DisplayServerWindows::win8p_GetPointerPenInfo = nullptr;
@@ -3173,7 +3182,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
outside = true;
- //Note: Wacom WinTab driver API for pen input, for devices incompatible with Windows Ink.
+ // Note: Wacom WinTab driver API for pen input, for devices incompatible with Windows Ink.
HMODULE wintab_lib = LoadLibraryW(L"wintab32.dll");
if (wintab_lib) {
wintab_WTOpen = (WTOpenPtr)GetProcAddress(wintab_lib, "WTOpenW");
@@ -3189,7 +3198,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
tablet_drivers.push_back("wintab");
}
- //Note: Windows Ink API for pen input, available on Windows 8+ only.
+ // Note: Windows Ink API for pen input, available on Windows 8+ only.
HMODULE user32_lib = LoadLibraryW(L"user32.dll");
if (user32_lib) {
win8p_GetPointerType = (GetPointerTypePtr)GetProcAddress(user32_lib, "GetPointerType");
@@ -3222,7 +3231,6 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
wc.lpfnWndProc = (WNDPROC)::WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
- //wc.hInstance = hInstance;
wc.hInstance = hInstance ? hInstance : GetModuleHandle(nullptr);
wc.hIcon = LoadIcon(nullptr, IDI_WINLOGO);
wc.hCursor = nullptr; //LoadCursor(nullptr, IDC_ARROW);
@@ -3246,7 +3254,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
Rid[0].hwndTarget = 0;
if (RegisterRawInputDevices(Rid, 1, sizeof(Rid[0])) == FALSE) {
- //registration failed.
+ // Registration failed.
use_raw_input = false;
}
@@ -3263,6 +3271,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
}
}
#endif
+
#if defined(OPENGL_ENABLED)
if (rendering_driver_index == VIDEO_DRIVER_GLES2) {
context_gles2 = memnew(ContextGL_Windows(hWnd, false));
@@ -3285,6 +3294,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
}
}
#endif
+
Point2i window_position(
(screen_get_size(0).width - p_resolution.width) / 2,
(screen_get_size(0).height - p_resolution.height) / 2);
@@ -3313,7 +3323,6 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
//set_ime_active(false);
if (!OS::get_singleton()->is_in_low_processor_usage_mode()) {
- //SetPriorityClass(GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS);
SetPriorityClass(GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS);
DWORD index = 0;
HANDLE handle = AvSetMmThreadCharacteristics("Games", &index);
@@ -3321,7 +3330,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
AvSetMmThreadPriority(handle, AVRT_PRIORITY_CRITICAL);
// This is needed to make sure that background work does not starve the main thread.
- // This is only setting priority of this thread, not the whole process.
+ // This is only setting the priority of this thread, not the whole process.
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
}
@@ -3398,4 +3407,8 @@ DisplayServerWindows::~DisplayServerWindows() {
memdelete(context_vulkan);
}
#endif
+
+ if (restore_mouse_trails > 1) {
+ SystemParametersInfoA(SPI_SETMOUSETRAILS, restore_mouse_trails, 0, 0);
+ }
}
diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h
index 06014fbabe..c02a90c543 100644
--- a/platform/windows/display_server_windows.h
+++ b/platform/windows/display_server_windows.h
@@ -403,6 +403,7 @@ class DisplayServerWindows : public DisplayServer {
void _get_window_style(bool p_main_window, bool p_fullscreen, bool p_borderless, bool p_resizable, bool p_maximized, bool p_no_activate_focus, DWORD &r_style, DWORD &r_style_ex);
MouseMode mouse_mode;
+ int restore_mouse_trails = 0;
bool alt_mem = false;
bool gr_mem = false;
bool shift_mem = false;
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 2a0a509d43..78b7be8a30 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -557,8 +557,27 @@ String OS_Windows::get_stdin_string(bool p_block) {
}
Error OS_Windows::shell_open(String p_uri) {
- ShellExecuteW(nullptr, nullptr, (LPCWSTR)(p_uri.utf16().get_data()), nullptr, nullptr, SW_SHOWNORMAL);
- return OK;
+ INT_PTR ret = (INT_PTR)ShellExecuteW(nullptr, nullptr, (LPCWSTR)(p_uri.utf16().get_data()), nullptr, nullptr, SW_SHOWNORMAL);
+ if (ret > 32) {
+ return OK;
+ } else {
+ switch (ret) {
+ case ERROR_FILE_NOT_FOUND:
+ case SE_ERR_DLLNOTFOUND:
+ return ERR_FILE_NOT_FOUND;
+ case ERROR_PATH_NOT_FOUND:
+ return ERR_FILE_BAD_PATH;
+ case ERROR_BAD_FORMAT:
+ return ERR_FILE_CORRUPT;
+ case SE_ERR_ACCESSDENIED:
+ return ERR_UNAUTHORIZED;
+ case 0:
+ case SE_ERR_OOM:
+ return ERR_OUT_OF_MEMORY;
+ default:
+ return FAILED;
+ }
+ }
}
String OS_Windows::get_locale() const {
diff --git a/modules/gdnative/net/packet_peer_gdnative.cpp b/scene/2d/audio_listener_2d.cpp
index 3bcdfed8ff..f16e359a1d 100644
--- a/modules/gdnative/net/packet_peer_gdnative.cpp
+++ b/scene/2d/audio_listener_2d.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* packet_peer_gdnative.cpp */
+/* audio_listener_2d.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,45 +28,85 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "packet_peer_gdnative.h"
+#include "audio_listener_2d.h"
-PacketPeerGDNative::PacketPeerGDNative() {
- interface = nullptr;
+bool AudioListener2D::_set(const StringName &p_name, const Variant &p_value) {
+ if (p_name == "current") {
+ if (p_value.operator bool()) {
+ make_current();
+ } else {
+ clear_current();
+ }
+ } else {
+ return false;
+ }
+ return true;
}
-PacketPeerGDNative::~PacketPeerGDNative() {
+bool AudioListener2D::_get(const StringName &p_name, Variant &r_ret) const {
+ if (p_name == "current") {
+ if (is_inside_tree() && get_tree()->is_node_being_edited(this)) {
+ r_ret = current;
+ } else {
+ r_ret = is_current();
+ }
+ } else {
+ return false;
+ }
+ return true;
}
-void PacketPeerGDNative::set_native_packet_peer(const godot_net_packet_peer *p_impl) {
- interface = p_impl;
+void AudioListener2D::_get_property_list(List<PropertyInfo> *p_list) const {
+ p_list->push_back(PropertyInfo(Variant::BOOL, "current"));
}
-void PacketPeerGDNative::_bind_methods() {
+void AudioListener2D::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ if (!get_tree()->is_node_being_edited(this) && current) {
+ make_current();
+ }
+ } break;
+ case NOTIFICATION_EXIT_TREE: {
+ if (!get_tree()->is_node_being_edited(this)) {
+ if (is_current()) {
+ clear_current();
+ current = true; // Keep it true.
+ } else {
+ current = false;
+ }
+ }
+ } break;
+ }
}
-Error PacketPeerGDNative::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->get_packet(interface->data, r_buffer, &r_buffer_size);
+void AudioListener2D::make_current() {
+ current = true;
+ if (!is_inside_tree()) {
+ return;
+ }
+ get_viewport()->_audio_listener_2d_set(this);
}
-Error PacketPeerGDNative::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->put_packet(interface->data, p_buffer, p_buffer_size);
+void AudioListener2D::clear_current() {
+ current = false;
+ if (!is_inside_tree()) {
+ return;
+ }
+ get_viewport()->_audio_listener_2d_remove(this);
}
-int PacketPeerGDNative::get_max_packet_size() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_max_packet_size(interface->data);
+bool AudioListener2D::is_current() const {
+ if (is_inside_tree() && !get_tree()->is_node_being_edited(this)) {
+ return get_viewport()->get_audio_listener_2d() == this;
+ } else {
+ return current;
+ }
+ return false;
}
-int PacketPeerGDNative::get_available_packet_count() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_available_packet_count(interface->data);
-}
-
-extern "C" {
-
-void GDAPI godot_net_bind_packet_peer(godot_object *p_obj, const godot_net_packet_peer *p_impl) {
- ((PacketPeerGDNative *)p_obj)->set_native_packet_peer(p_impl);
-}
+void AudioListener2D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("make_current"), &AudioListener2D::make_current);
+ ClassDB::bind_method(D_METHOD("clear_current"), &AudioListener2D::clear_current);
+ ClassDB::bind_method(D_METHOD("is_current"), &AudioListener2D::is_current);
}
diff --git a/modules/stb_vorbis/register_types.cpp b/scene/2d/audio_listener_2d.h
index bdb1cf69cf..875887acc6 100644
--- a/modules/stb_vorbis/register_types.cpp
+++ b/scene/2d/audio_listener_2d.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* register_types.cpp */
+/* audio_listener_2d.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,25 +28,34 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "register_types.h"
+#ifndef LISTENER_2D_H
+#define LISTENER_2D_H
-#include "audio_stream_ogg_vorbis.h"
+#include "scene/2d/node_2d.h"
+#include "scene/main/window.h"
-#ifdef TOOLS_ENABLED
-#include "core/config/engine.h"
-#include "resource_importer_ogg_vorbis.h"
-#endif
+class AudioListener2D : public Node2D {
+ GDCLASS(AudioListener2D, Node2D);
-void register_stb_vorbis_types() {
-#ifdef TOOLS_ENABLED
- if (Engine::get_singleton()->is_editor_hint()) {
- Ref<ResourceImporterOGGVorbis> ogg_import;
- ogg_import.instantiate();
- ResourceFormatImporter::get_singleton()->add_importer(ogg_import);
- }
-#endif
- GDREGISTER_CLASS(AudioStreamOGGVorbis);
-}
+private:
+ bool current = false;
+
+ friend class Viewport;
+
+protected:
+ void _update_listener();
-void unregister_stb_vorbis_types() {
-}
+ bool _set(const StringName &p_name, const Variant &p_value);
+ bool _get(const StringName &p_name, Variant &r_ret) const;
+ void _get_property_list(List<PropertyInfo> *p_list) const;
+ void _notification(int p_what);
+
+ static void _bind_methods();
+
+public:
+ void make_current();
+ void clear_current();
+ bool is_current() const;
+};
+
+#endif
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index e0b994f27d..bddc342c1a 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -31,127 +31,20 @@
#include "audio_stream_player_2d.h"
#include "scene/2d/area_2d.h"
+#include "scene/2d/audio_listener_2d.h"
#include "scene/main/window.h"
-void AudioStreamPlayer2D::_mix_audio() {
- if (!stream_playback.is_valid() || !active.is_set() ||
- (stream_paused && !stream_paused_fade_out)) {
- return;
- }
-
- if (setseek.get() >= 0.0) {
- stream_playback->start(setseek.get());
- setseek.set(-1.0); //reset seek
- }
-
- //get data
- AudioFrame *buffer = mix_buffer.ptrw();
- int buffer_size = mix_buffer.size();
-
- if (stream_paused_fade_out) {
- // Short fadeout ramp
- buffer_size = MIN(buffer_size, 128);
- }
-
- stream_playback->mix(buffer, pitch_scale, buffer_size);
-
- //write all outputs
- int oc = output_count.get();
- for (int i = 0; i < oc; i++) {
- Output current = outputs[i];
-
- //see if current output exists, to keep volume ramp
- bool found = false;
- for (int j = i; j < prev_output_count; j++) {
- if (prev_outputs[j].viewport == current.viewport) {
- if (j != i) {
- SWAP(prev_outputs[j], prev_outputs[i]);
- }
- found = true;
- break;
- }
- }
-
- if (!found) {
- //create new if was not used before
- if (prev_output_count < MAX_OUTPUTS) {
- prev_outputs[prev_output_count] = prev_outputs[i]; //may be owned by another viewport
- prev_output_count++;
- }
- prev_outputs[i] = current;
- }
-
- //mix!
- AudioFrame target_volume = stream_paused_fade_out ? AudioFrame(0.f, 0.f) : current.vol;
- AudioFrame vol_prev = stream_paused_fade_in ? AudioFrame(0.f, 0.f) : prev_outputs[i].vol;
- AudioFrame vol_inc = (target_volume - vol_prev) / float(buffer_size);
- AudioFrame vol = vol_prev;
-
- int cc = AudioServer::get_singleton()->get_channel_count();
-
- if (cc == 1) {
- if (!AudioServer::get_singleton()->thread_has_channel_mix_buffer(current.bus_index, 0)) {
- continue; //may have been removed
- }
-
- AudioFrame *target = AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.bus_index, 0);
-
- for (int j = 0; j < buffer_size; j++) {
- target[j] += buffer[j] * vol;
- vol += vol_inc;
- }
-
- } else {
- AudioFrame *targets[4];
- bool valid = true;
-
- for (int k = 0; k < cc; k++) {
- if (!AudioServer::get_singleton()->thread_has_channel_mix_buffer(current.bus_index, k)) {
- valid = false; //may have been removed
- break;
- }
-
- targets[k] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.bus_index, k);
- }
-
- if (!valid) {
- continue;
- }
-
- for (int j = 0; j < buffer_size; j++) {
- AudioFrame frame = buffer[j] * vol;
- for (int k = 0; k < cc; k++) {
- targets[k][j] += frame;
- }
- vol += vol_inc;
- }
- }
-
- prev_outputs[i] = current;
- }
-
- prev_output_count = oc;
-
- //stream is no longer active, disable this.
- if (!stream_playback->is_playing()) {
- active.clear();
- }
-
- output_ready.clear();
- stream_paused_fade_in = false;
- stream_paused_fade_out = false;
-}
-
void AudioStreamPlayer2D::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- AudioServer::get_singleton()->add_callback(_mix_audios, this);
+ AudioServer::get_singleton()->add_listener_changed_callback(_listener_changed_cb, this);
if (autoplay && !Engine::get_singleton()->is_editor_hint()) {
play();
}
}
if (p_what == NOTIFICATION_EXIT_TREE) {
- AudioServer::get_singleton()->remove_callback(_mix_audios, this);
+ stop();
+ AudioServer::get_singleton()->remove_listener_changed_callback(_listener_changed_cb, this);
}
if (p_what == NOTIFICATION_PAUSED) {
@@ -167,120 +60,143 @@ void AudioStreamPlayer2D::_notification(int p_what) {
if (p_what == NOTIFICATION_INTERNAL_PHYSICS_PROCESS) {
//update anything related to position first, if possible of course
+ if (setplay.get() > 0 || (active.is_set() && last_mix_count != AudioServer::get_singleton()->get_mix_count())) {
+ _update_panning();
+ }
- if (!output_ready.is_set()) {
- Ref<World2D> world_2d = get_world_2d();
- ERR_FAIL_COND(world_2d.is_null());
-
- int new_output_count = 0;
-
- Vector2 global_pos = get_global_position();
-
- int bus_index = AudioServer::get_singleton()->thread_find_bus_index(bus);
-
- //check if any area is diverting sound into a bus
+ if (setplay.get() >= 0 && stream.is_valid()) {
+ active.set();
+ Ref<AudioStreamPlayback> new_playback = stream->instance_playback();
+ ERR_FAIL_COND_MSG(new_playback.is_null(), "Failed to instantiate playback.");
+ AudioServer::get_singleton()->start_playback_stream(new_playback, _get_actual_bus(), volume_vector, setplay.get());
+ stream_playbacks.push_back(new_playback);
+ setplay.set(-1);
+ }
- PhysicsDirectSpaceState2D *space_state = PhysicsServer2D::get_singleton()->space_get_direct_state(world_2d->get_space());
+ if (!stream_playbacks.is_empty() && active.is_set()) {
+ // Stop playing if no longer active.
+ Vector<Ref<AudioStreamPlayback>> playbacks_to_remove;
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ if (playback.is_valid() && !AudioServer::get_singleton()->is_playback_active(playback) && !AudioServer::get_singleton()->is_playback_paused(playback)) {
+ emit_signal(SNAME("finished"));
+ playbacks_to_remove.push_back(playback);
+ }
+ }
+ // Now go through and remove playbacks that have finished. Removing elements from a Vector in a range based for is asking for trouble.
+ for (Ref<AudioStreamPlayback> &playback : playbacks_to_remove) {
+ stream_playbacks.erase(playback);
+ }
+ if (!playbacks_to_remove.is_empty() && stream_playbacks.is_empty()) {
+ // This node is no longer actively playing audio.
+ active.clear();
+ set_physics_process_internal(false);
+ }
+ }
- PhysicsDirectSpaceState2D::ShapeResult sr[MAX_INTERSECT_AREAS];
+ while (stream_playbacks.size() > max_polyphony) {
+ AudioServer::get_singleton()->stop_playback_stream(stream_playbacks[0]);
+ stream_playbacks.remove(0);
+ }
+ }
+}
- int areas = space_state->intersect_point(global_pos, sr, MAX_INTERSECT_AREAS, Set<RID>(), area_mask, false, true);
+StringName AudioStreamPlayer2D::_get_actual_bus() {
+ Vector2 global_pos = get_global_position();
- for (int i = 0; i < areas; i++) {
- Area2D *area2d = Object::cast_to<Area2D>(sr[i].collider);
- if (!area2d) {
- continue;
- }
+ //check if any area is diverting sound into a bus
+ Ref<World2D> world_2d = get_world_2d();
+ ERR_FAIL_COND_V(world_2d.is_null(), SNAME("Master"));
- if (!area2d->is_overriding_audio_bus()) {
- continue;
- }
+ PhysicsDirectSpaceState2D *space_state = PhysicsServer2D::get_singleton()->space_get_direct_state(world_2d->get_space());
+ PhysicsDirectSpaceState2D::ShapeResult sr[MAX_INTERSECT_AREAS];
- StringName bus_name = area2d->get_audio_bus_name();
- bus_index = AudioServer::get_singleton()->thread_find_bus_index(bus_name);
- break;
- }
+ int areas = space_state->intersect_point(global_pos, sr, MAX_INTERSECT_AREAS, Set<RID>(), area_mask, false, true);
- const Set<Viewport *> viewports = world_2d->get_viewports();
+ for (int i = 0; i < areas; i++) {
+ Area2D *area2d = Object::cast_to<Area2D>(sr[i].collider);
+ if (!area2d) {
+ continue;
+ }
- for (Set<Viewport *>::Element *E = viewports.front(); E; E = E->next()) {
- Viewport *vp = E->get();
- if (vp->is_audio_listener_2d()) {
- //compute matrix to convert to screen
- Transform2D to_screen = vp->get_global_canvas_transform() * vp->get_canvas_transform();
- Vector2 screen_size = vp->get_visible_rect().size;
+ if (!area2d->is_overriding_audio_bus()) {
+ continue;
+ }
- //screen in global is used for attenuation
- Vector2 screen_in_global = to_screen.affine_inverse().xform(screen_size * 0.5);
+ return area2d->get_audio_bus_name();
+ }
+ return default_bus;
+}
- float dist = global_pos.distance_to(screen_in_global); //distance to screen center
+void AudioStreamPlayer2D::_update_panning() {
+ if (!active.is_set() || stream.is_null()) {
+ return;
+ }
- if (dist > max_distance) {
- continue; //can't hear this sound in this viewport
- }
+ Ref<World2D> world_2d = get_world_2d();
+ ERR_FAIL_COND(world_2d.is_null());
- float multiplier = Math::pow(1.0f - dist / max_distance, attenuation);
- multiplier *= Math::db2linear(volume_db); //also apply player volume!
+ Vector2 global_pos = get_global_position();
- //point in screen is used for panning
- Vector2 point_in_screen = to_screen.xform(global_pos);
+ Set<Viewport *> viewports = world_2d->get_viewports();
+ viewports.insert(get_viewport()); // TODO: This is a mediocre workaround for #50958. Remove when that bug is fixed!
- float pan = CLAMP(point_in_screen.x / screen_size.width, 0.0, 1.0);
+ volume_vector.resize(4);
+ volume_vector.write[0] = AudioFrame(0, 0);
+ volume_vector.write[1] = AudioFrame(0, 0);
+ volume_vector.write[2] = AudioFrame(0, 0);
+ volume_vector.write[3] = AudioFrame(0, 0);
- float l = 1.0 - pan;
- float r = pan;
+ for (Viewport *vp : viewports) {
+ if (!vp->is_audio_listener_2d()) {
+ continue;
+ }
+ //compute matrix to convert to screen
+ Vector2 screen_size = vp->get_visible_rect().size;
+ Vector2 listener_in_global;
+ Vector2 relative_to_listener;
+
+ //screen in global is used for attenuation
+ AudioListener2D *listener = vp->get_audio_listener_2d();
+ if (listener) {
+ listener_in_global = listener->get_global_position();
+ relative_to_listener = global_pos - listener_in_global;
+ } else {
+ Transform2D to_listener = vp->get_global_canvas_transform() * vp->get_canvas_transform();
+ listener_in_global = to_listener.affine_inverse().xform(screen_size * 0.5);
+ relative_to_listener = to_listener.xform(global_pos) - screen_size * 0.5;
+ }
- outputs[new_output_count].vol = AudioFrame(l, r) * multiplier;
- outputs[new_output_count].bus_index = bus_index;
- outputs[new_output_count].viewport = vp; //keep pointer only for reference
- new_output_count++;
- if (new_output_count == MAX_OUTPUTS) {
- break;
- }
- }
- }
+ float dist = global_pos.distance_to(listener_in_global); // Distance to listener, or screen if none.
- output_count.set(new_output_count);
- output_ready.set();
+ if (dist > max_distance) {
+ continue; //can't hear this sound in this viewport
}
- //start playing if requested
- if (setplay.get() >= 0.0) {
- setseek.set(setplay.get());
- active.set();
- setplay.set(-1);
- }
+ float multiplier = Math::pow(1.0f - dist / max_distance, attenuation);
+ multiplier *= Math::db2linear(volume_db); //also apply player volume!
- //stop playing if no longer active
- if (!active.is_set()) {
- set_physics_process_internal(false);
- emit_signal(SNAME("finished"));
- }
- }
-}
+ float pan = CLAMP((relative_to_listener.x + screen_size.x * 0.5) / screen_size.x, 0.0, 1.0);
-void AudioStreamPlayer2D::set_stream(Ref<AudioStream> p_stream) {
- AudioServer::get_singleton()->lock();
+ float l = 1.0 - pan;
+ float r = pan;
- mix_buffer.resize(AudioServer::get_singleton()->thread_get_mix_buffer_size());
+ volume_vector.write[0] = AudioFrame(l, r) * multiplier;
+ }
- if (stream_playback.is_valid()) {
- stream_playback.unref();
- stream.unref();
- active.clear();
- setseek.set(-1);
+ for (const Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->set_playback_bus_exclusive(playback, _get_actual_bus(), volume_vector);
}
- if (p_stream.is_valid()) {
- stream = p_stream;
- stream_playback = p_stream->instance_playback();
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->set_playback_pitch_scale(playback, pitch_scale);
}
- AudioServer::get_singleton()->unlock();
+ last_mix_count = AudioServer::get_singleton()->get_mix_count();
+}
- if (p_stream.is_valid() && stream_playback.is_null()) {
- stream.unref();
- }
+void AudioStreamPlayer2D::set_stream(Ref<AudioStream> p_stream) {
+ stop();
+ stream = p_stream;
}
Ref<AudioStream> AudioStreamPlayer2D::get_stream() const {
@@ -298,6 +214,9 @@ float AudioStreamPlayer2D::get_volume_db() const {
void AudioStreamPlayer2D::set_pitch_scale(float p_pitch_scale) {
ERR_FAIL_COND(p_pitch_scale <= 0.0);
pitch_scale = p_pitch_scale;
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->set_playback_pitch_scale(playback, p_pitch_scale);
+ }
}
float AudioStreamPlayer2D::get_pitch_scale() const {
@@ -305,66 +224,64 @@ float AudioStreamPlayer2D::get_pitch_scale() const {
}
void AudioStreamPlayer2D::play(float p_from_pos) {
- if (!is_playing()) {
- // Reset the prev_output_count if the stream is stopped
- prev_output_count = 0;
+ if (stream.is_null()) {
+ return;
}
-
- if (stream_playback.is_valid()) {
- setplay.set(p_from_pos);
- output_ready.clear();
- set_physics_process_internal(true);
+ ERR_FAIL_COND_MSG(!is_inside_tree(), "Playback can only happen when a node is inside the scene tree");
+ if (stream->is_monophonic() && is_playing()) {
+ stop();
}
+
+ setplay.set(p_from_pos);
+ active.set();
+ set_physics_process_internal(true);
}
void AudioStreamPlayer2D::seek(float p_seconds) {
- if (stream_playback.is_valid()) {
- setseek.set(p_seconds);
+ if (is_playing()) {
+ stop();
+ play(p_seconds);
}
}
void AudioStreamPlayer2D::stop() {
- if (stream_playback.is_valid()) {
- active.clear();
- set_physics_process_internal(false);
- setplay.set(-1);
+ setplay.set(-1);
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->stop_playback_stream(playback);
}
+ stream_playbacks.clear();
+ active.clear();
+ set_physics_process_internal(false);
}
bool AudioStreamPlayer2D::is_playing() const {
- if (stream_playback.is_valid()) {
- return active.is_set() || setplay.get() >= 0;
+ for (const Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ if (AudioServer::get_singleton()->is_playback_active(playback)) {
+ return true;
+ }
}
-
return false;
}
float AudioStreamPlayer2D::get_playback_position() {
- if (stream_playback.is_valid()) {
- float ss = setseek.get();
- if (ss >= 0.0) {
- return ss;
- }
- return stream_playback->get_playback_position();
+ // Return the playback position of the most recently started playback stream.
+ if (!stream_playbacks.is_empty()) {
+ return AudioServer::get_singleton()->get_playback_position(stream_playbacks[stream_playbacks.size() - 1]);
}
-
return 0;
}
void AudioStreamPlayer2D::set_bus(const StringName &p_bus) {
- //if audio is active, must lock this
- AudioServer::get_singleton()->lock();
- bus = p_bus;
- AudioServer::get_singleton()->unlock();
+ default_bus = p_bus; // This will be pushed to the audio server during the next physics timestep, which is fast enough.
}
StringName AudioStreamPlayer2D::get_bus() const {
for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {
- if (AudioServer::get_singleton()->get_bus_name(i) == bus) {
- return bus;
+ if (AudioServer::get_singleton()->get_bus_name(i) == default_bus) {
+ return default_bus;
}
}
- return "Master";
+ return SNAME("Master");
}
void AudioStreamPlayer2D::set_autoplay(bool p_enable) {
@@ -432,19 +349,35 @@ uint32_t AudioStreamPlayer2D::get_area_mask() const {
}
void AudioStreamPlayer2D::set_stream_paused(bool p_pause) {
- if (p_pause != stream_paused) {
- stream_paused = p_pause;
- stream_paused_fade_in = !p_pause;
- stream_paused_fade_out = p_pause;
+ // TODO this does not have perfect recall, fix that maybe? If there are zero playbacks registered with the AudioServer, this bool isn't persisted.
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->set_playback_paused(playback, p_pause);
}
}
bool AudioStreamPlayer2D::get_stream_paused() const {
- return stream_paused;
+ // There's currently no way to pause some playback streams but not others. Check the first and don't bother looking at the rest.
+ if (!stream_playbacks.is_empty()) {
+ return AudioServer::get_singleton()->is_playback_paused(stream_playbacks[0]);
+ }
+ return false;
}
Ref<AudioStreamPlayback> AudioStreamPlayer2D::get_stream_playback() {
- return stream_playback;
+ if (!stream_playbacks.is_empty()) {
+ return stream_playbacks[stream_playbacks.size() - 1];
+ }
+ return nullptr;
+}
+
+void AudioStreamPlayer2D::set_max_polyphony(int p_max_polyphony) {
+ if (p_max_polyphony > 0) {
+ max_polyphony = p_max_polyphony;
+ }
+}
+
+int AudioStreamPlayer2D::get_max_polyphony() const {
+ return max_polyphony;
}
void AudioStreamPlayer2D::_bind_methods() {
@@ -485,6 +418,9 @@ void AudioStreamPlayer2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_stream_paused", "pause"), &AudioStreamPlayer2D::set_stream_paused);
ClassDB::bind_method(D_METHOD("get_stream_paused"), &AudioStreamPlayer2D::get_stream_paused);
+ ClassDB::bind_method(D_METHOD("set_max_polyphony", "max_polyphony"), &AudioStreamPlayer2D::set_max_polyphony);
+ ClassDB::bind_method(D_METHOD("get_max_polyphony"), &AudioStreamPlayer2D::get_max_polyphony);
+
ClassDB::bind_method(D_METHOD("get_stream_playback"), &AudioStreamPlayer2D::get_stream_playback);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream");
@@ -495,6 +431,7 @@ void AudioStreamPlayer2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_RANGE, "1,4096,1,or_greater,exp"), "set_max_distance", "get_max_distance");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "attenuation", PROPERTY_HINT_EXP_EASING, "attenuation"), "set_attenuation", "get_attenuation");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "max_polyphony", PROPERTY_HINT_NONE, ""), "set_max_polyphony", "get_max_polyphony");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask");
diff --git a/scene/2d/audio_stream_player_2d.h b/scene/2d/audio_stream_player_2d.h
index cf05a49b00..5360fd4934 100644
--- a/scene/2d/audio_stream_player_2d.h
+++ b/scene/2d/audio_stream_player_2d.h
@@ -51,38 +51,31 @@ private:
Viewport *viewport = nullptr; //pointer only used for reference to previous mix
};
- Output outputs[MAX_OUTPUTS];
- SafeNumeric<int> output_count;
- SafeFlag output_ready;
-
- //these are used by audio thread to have a reference of previous volumes (for ramping volume and avoiding clicks)
- Output prev_outputs[MAX_OUTPUTS];
- int prev_output_count = 0;
-
- Ref<AudioStreamPlayback> stream_playback;
+ Vector<Ref<AudioStreamPlayback>> stream_playbacks;
Ref<AudioStream> stream;
- Vector<AudioFrame> mix_buffer;
- SafeNumeric<float> setseek{ -1.0 };
- SafeFlag active;
+ SafeFlag active{ false };
SafeNumeric<float> setplay{ -1.0 };
+ Vector<AudioFrame> volume_vector;
+
+ uint64_t last_mix_count = -1;
+
float volume_db = 0.0;
float pitch_scale = 1.0;
bool autoplay = false;
- bool stream_paused = false;
- bool stream_paused_fade_in = false;
- bool stream_paused_fade_out = false;
- StringName bus;
-
- void _mix_audio();
- static void _mix_audios(void *self) { reinterpret_cast<AudioStreamPlayer2D *>(self)->_mix_audio(); }
+ StringName default_bus = SNAME("Master");
+ int max_polyphony = 1;
void _set_playing(bool p_enable);
bool _is_active() const;
+ StringName _get_actual_bus();
+ void _update_panning();
void _bus_layout_changed();
+ static void _listener_changed_cb(void *self) { reinterpret_cast<AudioStreamPlayer2D *>(self)->_update_panning(); }
+
uint32_t area_mask = 1;
float max_distance = 2000.0;
@@ -127,6 +120,9 @@ public:
void set_stream_paused(bool p_pause);
bool get_stream_paused() const;
+ void set_max_polyphony(int p_max_polyphony);
+ int get_max_polyphony() const;
+
Ref<AudioStreamPlayback> get_stream_playback();
AudioStreamPlayer2D();
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 13b37aa2b2..8195d98f55 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -198,7 +198,7 @@ Transform2D Camera2D::get_camera_transform() {
screen_rect.position += offset;
}
- camera_screen_center = screen_rect.position + screen_rect.size * 0.5;
+ camera_screen_center = screen_rect.get_center();
Transform2D xform;
xform.scale_basis(zoom);
@@ -261,6 +261,7 @@ void Camera2D::_notification(int p_what) {
if (viewport && !(custom_viewport && !ObjectDB::get_instance(custom_viewport_id))) {
viewport->set_canvas_transform(Transform2D());
clear_current();
+ current = true;
}
}
remove_from_group(group_name);
diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp
index 60f29ca163..5d3a538f60 100644
--- a/scene/2d/collision_object_2d.cpp
+++ b/scene/2d/collision_object_2d.cpp
@@ -481,10 +481,8 @@ bool CollisionObject2D::is_pickable() const {
return pickable;
}
-void CollisionObject2D::_input_event(Node *p_viewport, const Ref<InputEvent> &p_input_event, int p_shape) {
- if (get_script_instance()) {
- get_script_instance()->call(SceneStringNames::get_singleton()->_input_event, p_viewport, p_input_event, p_shape);
- }
+void CollisionObject2D::_input_event_call(Viewport *p_viewport, const Ref<InputEvent> &p_input_event, int p_shape) {
+ GDVIRTUAL_CALL(_input_event, p_viewport, p_input_event, p_shape);
emit_signal(SceneStringNames::get_singleton()->input_event, p_viewport, p_input_event, p_shape);
}
@@ -597,7 +595,7 @@ void CollisionObject2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("shape_owner_clear_shapes", "owner_id"), &CollisionObject2D::shape_owner_clear_shapes);
ClassDB::bind_method(D_METHOD("shape_find_owner", "shape_index"), &CollisionObject2D::shape_find_owner);
- BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "viewport"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::INT, "shape_idx")));
+ GDVIRTUAL_BIND(_input_event, "viewport", "event", "shape_idx");
ADD_SIGNAL(MethodInfo("input_event", PropertyInfo(Variant::OBJECT, "viewport", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::INT, "shape_idx")));
ADD_SIGNAL(MethodInfo("mouse_entered"));
diff --git a/scene/2d/collision_object_2d.h b/scene/2d/collision_object_2d.h
index 11e11d1382..19abacb201 100644
--- a/scene/2d/collision_object_2d.h
+++ b/scene/2d/collision_object_2d.h
@@ -32,6 +32,7 @@
#define COLLISION_OBJECT_2D_H
#include "scene/2d/node_2d.h"
+#include "scene/main/viewport.h"
#include "scene/resources/shape_2d.h"
#include "servers/physics_server_2d.h"
@@ -88,7 +89,7 @@ protected:
void _update_pickable();
friend class Viewport;
- void _input_event(Node *p_viewport, const Ref<InputEvent> &p_input_event, int p_shape);
+ void _input_event_call(Viewport *p_viewport, const Ref<InputEvent> &p_input_event, int p_shape);
void _mouse_enter();
void _mouse_exit();
@@ -100,6 +101,7 @@ protected:
void set_body_mode(PhysicsServer2D::BodyMode p_mode);
+ GDVIRTUAL3(_input_event, Viewport *, Ref<InputEvent>, int)
public:
void set_collision_layer(uint32_t p_layer);
uint32_t get_collision_layer() const;
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index 8c8a292ad7..271a4da705 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -243,7 +243,7 @@ TypedArray<String> CollisionPolygon2D::get_configuration_warnings() const {
TypedArray<String> warnings = Node::get_configuration_warnings();
if (!Object::cast_to<CollisionObject2D>(get_parent())) {
- warnings.push_back(TTR("CollisionPolygon2D only serves to provide a collision shape to a CollisionObject2D derived node. Please only use it as a child of Area2D, StaticBody2D, RigidBody2D, CharacterBody2D, etc. to give them a shape."));
+ warnings.push_back(TTR("CollisionPolygon2D only serves to provide a collision shape to a CollisionObject2D derived node. Please only use it as a child of Area2D, StaticBody2D, RigidDynamicBody2D, CharacterBody2D, etc. to give them a shape."));
}
int polygon_count = polygon.size();
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index d52795f0d5..54cb851216 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -175,7 +175,7 @@ TypedArray<String> CollisionShape2D::get_configuration_warnings() const {
TypedArray<String> warnings = Node::get_configuration_warnings();
if (!Object::cast_to<CollisionObject2D>(get_parent())) {
- warnings.push_back(TTR("CollisionShape2D only serves to provide a collision shape to a CollisionObject2D derived node. Please only use it as a child of Area2D, StaticBody2D, RigidBody2D, CharacterBody2D, etc. to give them a shape."));
+ warnings.push_back(TTR("CollisionShape2D only serves to provide a collision shape to a CollisionObject2D derived node. Please only use it as a child of Area2D, StaticBody2D, RigidDynamicBody2D, CharacterBody2D, etc. to give them a shape."));
}
if (!shape.is_valid()) {
warnings.push_back(TTR("A shape must be provided for CollisionShape2D to function. Please create a shape resource for it!"));
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp
index 559bd2fd16..bf26ec1f20 100644
--- a/scene/2d/cpu_particles_2d.cpp
+++ b/scene/2d/cpu_particles_2d.cpp
@@ -155,7 +155,7 @@ void CPUParticles2D::_update_mesh_texture() {
Vector<Vector2> vertices;
vertices.push_back(-tex_size * 0.5);
vertices.push_back(-tex_size * 0.5 + Vector2(tex_size.x, 0));
- vertices.push_back(-tex_size * 0.5 + Vector2(tex_size.x, tex_size.y));
+ vertices.push_back(-tex_size * 0.5 + tex_size);
vertices.push_back(-tex_size * 0.5 + Vector2(0, tex_size.y));
Vector<Vector2> uvs;
AtlasTexture *atlas_texure = Object::cast_to<AtlasTexture>(*texture);
@@ -248,7 +248,7 @@ TypedArray<String> CPUParticles2D::get_configuration_warnings() const {
CanvasItemMaterial *mat = Object::cast_to<CanvasItemMaterial>(get_material().ptr());
if (get_material().is_null() || (mat && !mat->get_particles_animation())) {
- if (get_param(PARAM_ANIM_SPEED) != 0.0 || get_param(PARAM_ANIM_OFFSET) != 0.0 ||
+ if (get_param_max(PARAM_ANIM_SPEED) != 0.0 || get_param_max(PARAM_ANIM_OFFSET) != 0.0 ||
get_param_curve(PARAM_ANIM_SPEED).is_valid() || get_param_curve(PARAM_ANIM_OFFSET).is_valid()) {
warnings.push_back(TTR("CPUParticles2D animation requires the usage of a CanvasItemMaterial with \"Particles Animation\" enabled."));
}
@@ -292,28 +292,34 @@ real_t CPUParticles2D::get_spread() const {
return spread;
}
-void CPUParticles2D::set_param(Parameter p_param, real_t p_value) {
+void CPUParticles2D::set_param_min(Parameter p_param, real_t p_value) {
ERR_FAIL_INDEX(p_param, PARAM_MAX);
- parameters[p_param] = p_value;
+ parameters_min[p_param] = p_value;
+ if (parameters_min[p_param] > parameters_max[p_param]) {
+ set_param_max(p_param, p_value);
+ }
}
-real_t CPUParticles2D::get_param(Parameter p_param) const {
+real_t CPUParticles2D::get_param_min(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
- return parameters[p_param];
+ return parameters_min[p_param];
}
-void CPUParticles2D::set_param_randomness(Parameter p_param, real_t p_value) {
+void CPUParticles2D::set_param_max(Parameter p_param, real_t p_value) {
ERR_FAIL_INDEX(p_param, PARAM_MAX);
- randomness[p_param] = p_value;
+ parameters_max[p_param] = p_value;
+ if (parameters_min[p_param] > parameters_max[p_param]) {
+ set_param_min(p_param, p_value);
+ }
}
-real_t CPUParticles2D::get_param_randomness(Parameter p_param) const {
+real_t CPUParticles2D::get_param_max(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
- return randomness[p_param];
+ return parameters_max[p_param];
}
static void _adjust_curve_range(const Ref<Curve> &p_curve, real_t p_min, real_t p_max) {
@@ -460,6 +466,31 @@ Vector2 CPUParticles2D::get_gravity() const {
return gravity;
}
+void CPUParticles2D::set_scale_curve_x(Ref<Curve> p_scale_curve) {
+ scale_curve_x = p_scale_curve;
+}
+
+void CPUParticles2D::set_scale_curve_y(Ref<Curve> p_scale_curve) {
+ scale_curve_y = p_scale_curve;
+}
+
+void CPUParticles2D::set_split_scale(bool p_split_scale) {
+ split_scale = p_split_scale;
+ notify_property_list_changed();
+}
+
+Ref<Curve> CPUParticles2D::get_scale_curve_x() const {
+ return scale_curve_x;
+}
+
+Ref<Curve> CPUParticles2D::get_scale_curve_y() const {
+ return scale_curve_y;
+}
+
+bool CPUParticles2D::get_split_scale() {
+ return split_scale;
+}
+
void CPUParticles2D::_validate_property(PropertyInfo &property) const {
if (property.name == "emission_sphere_radius" && emission_shape != EMISSION_SHAPE_SPHERE) {
property.usage = PROPERTY_USAGE_NONE;
@@ -484,6 +515,9 @@ void CPUParticles2D::_validate_property(PropertyInfo &property) const {
if (property.name == "emission_colors" && emission_shape != EMISSION_SHAPE_POINTS && emission_shape != EMISSION_SHAPE_DIRECTED_POINTS) {
property.usage = PROPERTY_USAGE_NONE;
}
+ if (property.name.begins_with("scale_curve_") && !split_scale) {
+ property.usage = PROPERTY_USAGE_NONE;
+ }
}
static uint32_t idhash(uint32_t x) {
@@ -693,16 +727,16 @@ void CPUParticles2D::_particles_process(double p_delta) {
p.hue_rot_rand = Math::randf();
p.anim_offset_rand = Math::randf();
- real_t angle1_rad = Math::atan2(direction.y, direction.x) + Math::deg2rad((Math::randf() * 2.0 - 1.0) * spread);
+ real_t angle1_rad = direction.angle() + Math::deg2rad((Math::randf() * 2.0 - 1.0) * spread);
Vector2 rot = Vector2(Math::cos(angle1_rad), Math::sin(angle1_rad));
- p.velocity = rot * parameters[PARAM_INITIAL_LINEAR_VELOCITY] * Math::lerp((real_t)1.0, real_t(Math::randf()), randomness[PARAM_INITIAL_LINEAR_VELOCITY]);
+ p.velocity = rot * Math::lerp(parameters_min[PARAM_INITIAL_LINEAR_VELOCITY], parameters_min[PARAM_INITIAL_LINEAR_VELOCITY], Math::randf());
- real_t base_angle = (parameters[PARAM_ANGLE] + tex_angle) * Math::lerp((real_t)1.0, p.angle_rand, randomness[PARAM_ANGLE]);
+ real_t base_angle = tex_angle * Math::lerp(parameters_min[PARAM_ANGLE], parameters_max[PARAM_ANGLE], p.angle_rand);
p.rotation = Math::deg2rad(base_angle);
p.custom[0] = 0.0; // unused
p.custom[1] = 0.0; // phase [0..1]
- p.custom[2] = (parameters[PARAM_ANIM_OFFSET] + tex_anim_offset) * Math::lerp((real_t)1.0, p.anim_offset_rand, randomness[PARAM_ANIM_OFFSET]); //animation phase [0..1]
+ p.custom[2] = tex_anim_offset * Math::lerp(parameters_min[PARAM_ANIM_OFFSET], parameters_max[PARAM_ANIM_OFFSET], p.anim_offset_rand);
p.custom[3] = 0.0;
p.transform = Transform2D();
p.time = 0;
@@ -766,51 +800,51 @@ void CPUParticles2D::_particles_process(double p_delta) {
p.custom[1] = p.time / lifetime;
tv = p.time / p.lifetime;
- real_t tex_linear_velocity = 0.0;
+ real_t tex_linear_velocity = 1.0;
if (curve_parameters[PARAM_INITIAL_LINEAR_VELOCITY].is_valid()) {
tex_linear_velocity = curve_parameters[PARAM_INITIAL_LINEAR_VELOCITY]->interpolate(tv);
}
- real_t tex_orbit_velocity = 0.0;
+ real_t tex_orbit_velocity = 1.0;
if (curve_parameters[PARAM_ORBIT_VELOCITY].is_valid()) {
tex_orbit_velocity = curve_parameters[PARAM_ORBIT_VELOCITY]->interpolate(tv);
}
- real_t tex_angular_velocity = 0.0;
+ real_t tex_angular_velocity = 1.0;
if (curve_parameters[PARAM_ANGULAR_VELOCITY].is_valid()) {
tex_angular_velocity = curve_parameters[PARAM_ANGULAR_VELOCITY]->interpolate(tv);
}
- real_t tex_linear_accel = 0.0;
+ real_t tex_linear_accel = 1.0;
if (curve_parameters[PARAM_LINEAR_ACCEL].is_valid()) {
tex_linear_accel = curve_parameters[PARAM_LINEAR_ACCEL]->interpolate(tv);
}
- real_t tex_tangential_accel = 0.0;
+ real_t tex_tangential_accel = 1.0;
if (curve_parameters[PARAM_TANGENTIAL_ACCEL].is_valid()) {
tex_tangential_accel = curve_parameters[PARAM_TANGENTIAL_ACCEL]->interpolate(tv);
}
- real_t tex_radial_accel = 0.0;
+ real_t tex_radial_accel = 1.0;
if (curve_parameters[PARAM_RADIAL_ACCEL].is_valid()) {
tex_radial_accel = curve_parameters[PARAM_RADIAL_ACCEL]->interpolate(tv);
}
- real_t tex_damping = 0.0;
+ real_t tex_damping = 1.0;
if (curve_parameters[PARAM_DAMPING].is_valid()) {
tex_damping = curve_parameters[PARAM_DAMPING]->interpolate(tv);
}
- real_t tex_angle = 0.0;
+ real_t tex_angle = 1.0;
if (curve_parameters[PARAM_ANGLE].is_valid()) {
tex_angle = curve_parameters[PARAM_ANGLE]->interpolate(tv);
}
- real_t tex_anim_speed = 0.0;
+ real_t tex_anim_speed = 1.0;
if (curve_parameters[PARAM_ANIM_SPEED].is_valid()) {
tex_anim_speed = curve_parameters[PARAM_ANIM_SPEED]->interpolate(tv);
}
- real_t tex_anim_offset = 0.0;
+ real_t tex_anim_offset = 1.0;
if (curve_parameters[PARAM_ANIM_OFFSET].is_valid()) {
tex_anim_offset = curve_parameters[PARAM_ANIM_OFFSET]->interpolate(tv);
}
@@ -819,18 +853,18 @@ void CPUParticles2D::_particles_process(double p_delta) {
Vector2 pos = p.transform[2];
//apply linear acceleration
- force += p.velocity.length() > 0.0 ? p.velocity.normalized() * (parameters[PARAM_LINEAR_ACCEL] + tex_linear_accel) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed), randomness[PARAM_LINEAR_ACCEL]) : Vector2();
+ force += p.velocity.length() > 0.0 ? p.velocity.normalized() * tex_linear_accel * Math::lerp(parameters_min[PARAM_LINEAR_ACCEL], parameters_max[PARAM_LINEAR_ACCEL], rand_from_seed(alt_seed)) : Vector2();
//apply radial acceleration
Vector2 org = emission_xform[2];
Vector2 diff = pos - org;
- force += diff.length() > 0.0 ? diff.normalized() * (parameters[PARAM_RADIAL_ACCEL] + tex_radial_accel) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed), randomness[PARAM_RADIAL_ACCEL]) : Vector2();
+ force += diff.length() > 0.0 ? diff.normalized() * (tex_radial_accel)*Math::lerp(parameters_min[PARAM_RADIAL_ACCEL], parameters_max[PARAM_RADIAL_ACCEL], rand_from_seed(alt_seed)) : Vector2();
//apply tangential acceleration;
Vector2 yx = Vector2(diff.y, diff.x);
- force += yx.length() > 0.0 ? (yx * Vector2(-1.0, 1.0)).normalized() * ((parameters[PARAM_TANGENTIAL_ACCEL] + tex_tangential_accel) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed), randomness[PARAM_TANGENTIAL_ACCEL])) : Vector2();
+ force += yx.length() > 0.0 ? yx.normalized() * (tex_tangential_accel * Math::lerp(parameters_min[PARAM_TANGENTIAL_ACCEL], parameters_max[PARAM_TANGENTIAL_ACCEL], rand_from_seed(alt_seed))) : Vector2();
//apply attractor forces
p.velocity += force * local_delta;
//orbit velocity
- real_t orbit_amount = (parameters[PARAM_ORBIT_VELOCITY] + tex_orbit_velocity) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed), randomness[PARAM_ORBIT_VELOCITY]);
+ real_t orbit_amount = tex_orbit_velocity * Math::lerp(parameters_min[PARAM_ORBIT_VELOCITY], parameters_max[PARAM_ORBIT_VELOCITY], rand_from_seed(alt_seed));
if (orbit_amount != 0.0) {
real_t ang = orbit_amount * local_delta * Math_TAU;
// Not sure why the ParticlesMaterial code uses a clockwise rotation matrix,
@@ -843,9 +877,9 @@ void CPUParticles2D::_particles_process(double p_delta) {
p.velocity = p.velocity.normalized() * tex_linear_velocity;
}
- if (parameters[PARAM_DAMPING] + tex_damping > 0.0) {
+ if (parameters_max[PARAM_DAMPING] + tex_damping > 0.0) {
real_t v = p.velocity.length();
- real_t damp = (parameters[PARAM_DAMPING] + tex_damping) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed), randomness[PARAM_DAMPING]);
+ real_t damp = tex_damping * Math::lerp(parameters_min[PARAM_DAMPING], parameters_max[PARAM_DAMPING], rand_from_seed(alt_seed));
v -= damp * local_delta;
if (v < 0.0) {
p.velocity = Vector2();
@@ -853,18 +887,32 @@ void CPUParticles2D::_particles_process(double p_delta) {
p.velocity = p.velocity.normalized() * v;
}
}
- real_t base_angle = (parameters[PARAM_ANGLE] + tex_angle) * Math::lerp((real_t)1.0, p.angle_rand, randomness[PARAM_ANGLE]);
- base_angle += p.custom[1] * lifetime * (parameters[PARAM_ANGULAR_VELOCITY] + tex_angular_velocity) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed) * 2.0f - 1.0f, randomness[PARAM_ANGULAR_VELOCITY]);
+ real_t base_angle = (tex_angle)*Math::lerp(parameters_min[PARAM_ANGLE], parameters_max[PARAM_ANGLE], p.angle_rand);
+ base_angle += p.custom[1] * lifetime * tex_angular_velocity * Math::lerp(parameters_min[PARAM_ANGULAR_VELOCITY], parameters_max[PARAM_ANGULAR_VELOCITY], rand_from_seed(alt_seed));
p.rotation = Math::deg2rad(base_angle); //angle
- real_t animation_phase = (parameters[PARAM_ANIM_OFFSET] + tex_anim_offset) * Math::lerp((real_t)1.0, p.anim_offset_rand, randomness[PARAM_ANIM_OFFSET]) + p.custom[1] * (parameters[PARAM_ANIM_SPEED] + tex_anim_speed) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed), randomness[PARAM_ANIM_SPEED]);
- p.custom[2] = animation_phase;
+ p.custom[2] = tex_anim_offset * Math::lerp(parameters_min[PARAM_ANIM_OFFSET], parameters_max[PARAM_ANIM_OFFSET], p.anim_offset_rand) + p.custom[1] * tex_anim_speed * Math::lerp(parameters_min[PARAM_ANIM_SPEED], parameters_max[PARAM_ANIM_SPEED], rand_from_seed(alt_seed));
}
//apply color
//apply hue rotation
- real_t tex_scale = 1.0;
- if (curve_parameters[PARAM_SCALE].is_valid()) {
- tex_scale = curve_parameters[PARAM_SCALE]->interpolate(tv);
+ Vector2 tex_scale = Vector2(1.0, 1.0);
+ if (split_scale) {
+ if (scale_curve_x.is_valid()) {
+ tex_scale.x = scale_curve_x->interpolate(tv);
+ } else {
+ tex_scale.x = 1.0;
+ }
+ if (scale_curve_y.is_valid()) {
+ tex_scale.y = scale_curve_y->interpolate(tv);
+ } else {
+ tex_scale.y = 1.0;
+ }
+ } else {
+ if (curve_parameters[PARAM_SCALE].is_valid()) {
+ real_t tmp_scale = curve_parameters[PARAM_SCALE]->interpolate(tv);
+ tex_scale.x = tmp_scale;
+ tex_scale.y = tmp_scale;
+ }
}
real_t tex_hue_variation = 0.0;
@@ -872,7 +920,7 @@ void CPUParticles2D::_particles_process(double p_delta) {
tex_hue_variation = curve_parameters[PARAM_HUE_VARIATION]->interpolate(tv);
}
- real_t hue_rot_angle = (parameters[PARAM_HUE_VARIATION] + tex_hue_variation) * Math_TAU * Math::lerp(1, p.hue_rot_rand * 2.0f - 1.0f, randomness[PARAM_HUE_VARIATION]);
+ real_t hue_rot_angle = (tex_hue_variation)*Math_TAU * Math::lerp(parameters_min[PARAM_HUE_VARIATION], parameters_max[PARAM_HUE_VARIATION], p.hue_rot_rand);
real_t hue_rot_c = Math::cos(hue_rot_angle);
real_t hue_rot_s = Math::sin(hue_rot_angle);
@@ -912,13 +960,15 @@ void CPUParticles2D::_particles_process(double p_delta) {
}
//scale by scale
- real_t base_scale = tex_scale * Math::lerp(parameters[PARAM_SCALE], (real_t)1.0, p.scale_rand * randomness[PARAM_SCALE]);
- if (base_scale < 0.000001) {
- base_scale = 0.000001;
+ Vector2 base_scale = tex_scale * Math::lerp(parameters_min[PARAM_SCALE], parameters_max[PARAM_SCALE], p.scale_rand);
+ if (base_scale.x < 0.00001) {
+ base_scale.x = 0.00001;
}
-
- p.transform.elements[0] *= base_scale;
- p.transform.elements[1] *= base_scale;
+ if (base_scale.y < 0.00001) {
+ base_scale.y = 0.00001;
+ }
+ p.transform.elements[0] *= base_scale.x;
+ p.transform.elements[1] *= base_scale.y;
p.transform[2] += p.velocity * local_delta;
}
@@ -1130,18 +1180,24 @@ void CPUParticles2D::convert_from_particles(Node *p_particles) {
Vector2 rect_extents = Vector2(material->get_emission_box_extents().x, material->get_emission_box_extents().y);
set_emission_rect_extents(rect_extents);
+ Ref<CurveXYZTexture> scale3D = material->get_param_texture(ParticlesMaterial::PARAM_SCALE);
+ if (scale3D.is_valid()) {
+ split_scale = true;
+ scale_curve_x = scale3D->get_curve_x();
+ scale_curve_y = scale3D->get_curve_y();
+ }
Vector2 gravity = Vector2(material->get_gravity().x, material->get_gravity().y);
set_gravity(gravity);
set_lifetime_randomness(material->get_lifetime_randomness());
#define CONVERT_PARAM(m_param) \
- set_param(m_param, material->get_param(ParticlesMaterial::m_param)); \
+ set_param_min(m_param, material->get_param_min(ParticlesMaterial::m_param)); \
{ \
Ref<CurveTexture> ctex = material->get_param_texture(ParticlesMaterial::m_param); \
if (ctex.is_valid()) \
set_param_curve(m_param, ctex->get_curve()); \
} \
- set_param_randomness(m_param, material->get_param_randomness(ParticlesMaterial::m_param));
+ set_param_max(m_param, material->get_param_max(ParticlesMaterial::m_param));
CONVERT_PARAM(PARAM_INITIAL_LINEAR_VELOCITY);
CONVERT_PARAM(PARAM_ANGULAR_VELOCITY);
@@ -1224,11 +1280,11 @@ void CPUParticles2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_spread", "degrees"), &CPUParticles2D::set_spread);
ClassDB::bind_method(D_METHOD("get_spread"), &CPUParticles2D::get_spread);
- ClassDB::bind_method(D_METHOD("set_param", "param", "value"), &CPUParticles2D::set_param);
- ClassDB::bind_method(D_METHOD("get_param", "param"), &CPUParticles2D::get_param);
+ ClassDB::bind_method(D_METHOD("set_param_min", "param", "value"), &CPUParticles2D::set_param_min);
+ ClassDB::bind_method(D_METHOD("get_param_min", "param"), &CPUParticles2D::get_param_min);
- ClassDB::bind_method(D_METHOD("set_param_randomness", "param", "randomness"), &CPUParticles2D::set_param_randomness);
- ClassDB::bind_method(D_METHOD("get_param_randomness", "param"), &CPUParticles2D::get_param_randomness);
+ ClassDB::bind_method(D_METHOD("set_param_max", "param", "value"), &CPUParticles2D::set_param_max);
+ ClassDB::bind_method(D_METHOD("get_param_max", "param"), &CPUParticles2D::get_param_max);
ClassDB::bind_method(D_METHOD("set_param_curve", "param", "curve"), &CPUParticles2D::set_param_curve);
ClassDB::bind_method(D_METHOD("get_param_curve", "param"), &CPUParticles2D::get_param_curve);
@@ -1263,6 +1319,15 @@ void CPUParticles2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_gravity"), &CPUParticles2D::get_gravity);
ClassDB::bind_method(D_METHOD("set_gravity", "accel_vec"), &CPUParticles2D::set_gravity);
+ ClassDB::bind_method(D_METHOD("get_split_scale"), &CPUParticles2D::get_split_scale);
+ ClassDB::bind_method(D_METHOD("set_split_scale", "split_scale"), &CPUParticles2D::set_split_scale);
+
+ ClassDB::bind_method(D_METHOD("get_scale_curve_x"), &CPUParticles2D::get_scale_curve_x);
+ ClassDB::bind_method(D_METHOD("set_scale_curve_x", "scale_curve"), &CPUParticles2D::set_scale_curve_x);
+
+ ClassDB::bind_method(D_METHOD("get_scale_curve_y"), &CPUParticles2D::get_scale_curve_y);
+ ClassDB::bind_method(D_METHOD("set_scale_curve_y", "scale_curve"), &CPUParticles2D::set_scale_curve_y);
+
ClassDB::bind_method(D_METHOD("convert_from_particles", "particles"), &CPUParticles2D::convert_from_particles);
ADD_GROUP("Emission Shape", "emission_");
@@ -1280,54 +1345,58 @@ void CPUParticles2D::_bind_methods() {
ADD_GROUP("Gravity", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "gravity"), "set_gravity", "get_gravity");
ADD_GROUP("Initial Velocity", "initial_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_min", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param_min", "get_param_min", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_max", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param_max", "get_param_max", PARAM_INITIAL_LINEAR_VELOCITY);
ADD_GROUP("Angular Velocity", "angular_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_min", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_max", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_ANGULAR_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angular_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGULAR_VELOCITY);
ADD_GROUP("Orbit Velocity", "orbit_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_min", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_max", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_ORBIT_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orbit_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ORBIT_VELOCITY);
ADD_GROUP("Linear Accel", "linear_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_min", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_max", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_LINEAR_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "linear_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_LINEAR_ACCEL);
ADD_GROUP("Radial Accel", "radial_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_min", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_max", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_RADIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "radial_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_RADIAL_ACCEL);
ADD_GROUP("Tangential Accel", "tangential_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_min", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_max", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_TANGENTIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "tangential_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_TANGENTIAL_ACCEL);
ADD_GROUP("Damping", "");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_min", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param_min", "get_param_min", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_max", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param_max", "get_param_max", PARAM_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "damping_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_DAMPING);
ADD_GROUP("Angle", "");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater,degrees"), "set_param", "get_param", PARAM_ANGLE);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_min", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater,degrees"), "set_param_min", "get_param_min", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_max", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater,degrees"), "set_param_max", "get_param_max", PARAM_ANGLE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGLE);
ADD_GROUP("Scale", "");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount_min", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param_min", "get_param_min", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount_max", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param_max", "get_param_max", PARAM_SCALE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_amount_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_SCALE);
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "split_scale"), "set_split_scale", "get_split_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "scale_curve_x", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_scale_curve_x", "get_scale_curve_x");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "scale_curve_y", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_scale_curve_y", "get_scale_curve_y");
+
ADD_GROUP("Color", "");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_color_ramp", "get_color_ramp");
ADD_GROUP("Hue Variation", "hue_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_min", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param_min", "get_param_min", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_max", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param_max", "get_param_max", PARAM_HUE_VARIATION);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "hue_variation_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_HUE_VARIATION);
ADD_GROUP("Animation", "anim_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_min", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater,or_lesser"), "set_param_min", "get_param_min", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_max", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater,or_lesser"), "set_param_max", "get_param_max", PARAM_ANIM_SPEED);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_speed_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_min", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_min", "get_param_min", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_max", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_max", "get_param_max", PARAM_ANIM_OFFSET);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_OFFSET);
BIND_ENUM_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY);
@@ -1366,22 +1435,31 @@ CPUParticles2D::CPUParticles2D() {
set_amount(8);
set_use_local_coordinates(true);
- set_param(PARAM_INITIAL_LINEAR_VELOCITY, 0);
- set_param(PARAM_ANGULAR_VELOCITY, 0);
- set_param(PARAM_ORBIT_VELOCITY, 0);
- set_param(PARAM_LINEAR_ACCEL, 0);
- set_param(PARAM_RADIAL_ACCEL, 0);
- set_param(PARAM_TANGENTIAL_ACCEL, 0);
- set_param(PARAM_DAMPING, 0);
- set_param(PARAM_ANGLE, 0);
- set_param(PARAM_SCALE, 1);
- set_param(PARAM_HUE_VARIATION, 0);
- set_param(PARAM_ANIM_SPEED, 0);
- set_param(PARAM_ANIM_OFFSET, 0);
-
- for (int i = 0; i < PARAM_MAX; i++) {
- set_param_randomness(Parameter(i), 0);
- }
+ set_param_min(PARAM_INITIAL_LINEAR_VELOCITY, 0);
+ set_param_min(PARAM_ANGULAR_VELOCITY, 0);
+ set_param_min(PARAM_ORBIT_VELOCITY, 0);
+ set_param_min(PARAM_LINEAR_ACCEL, 0);
+ set_param_min(PARAM_RADIAL_ACCEL, 0);
+ set_param_min(PARAM_TANGENTIAL_ACCEL, 0);
+ set_param_min(PARAM_DAMPING, 0);
+ set_param_min(PARAM_ANGLE, 0);
+ set_param_min(PARAM_SCALE, 1);
+ set_param_min(PARAM_HUE_VARIATION, 0);
+ set_param_min(PARAM_ANIM_SPEED, 0);
+ set_param_min(PARAM_ANIM_OFFSET, 0);
+
+ set_param_max(PARAM_INITIAL_LINEAR_VELOCITY, 0);
+ set_param_max(PARAM_ANGULAR_VELOCITY, 0);
+ set_param_max(PARAM_ORBIT_VELOCITY, 0);
+ set_param_max(PARAM_LINEAR_ACCEL, 0);
+ set_param_max(PARAM_RADIAL_ACCEL, 0);
+ set_param_max(PARAM_TANGENTIAL_ACCEL, 0);
+ set_param_max(PARAM_DAMPING, 0);
+ set_param_max(PARAM_ANGLE, 0);
+ set_param_max(PARAM_SCALE, 1);
+ set_param_max(PARAM_HUE_VARIATION, 0);
+ set_param_max(PARAM_ANIM_SPEED, 0);
+ set_param_max(PARAM_ANIM_OFFSET, 0);
for (int i = 0; i < PARTICLE_FLAG_MAX; i++) {
particle_flags[i] = false;
diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h
index 0f8950375f..4990d443e3 100644
--- a/scene/2d/cpu_particles_2d.h
+++ b/scene/2d/cpu_particles_2d.h
@@ -150,8 +150,8 @@ private:
Vector2 direction = Vector2(1, 0);
real_t spread = 45.0;
- real_t parameters[PARAM_MAX];
- real_t randomness[PARAM_MAX];
+ real_t parameters_min[PARAM_MAX];
+ real_t parameters_max[PARAM_MAX];
Ref<Curve> curve_parameters[PARAM_MAX];
Color color;
@@ -167,6 +167,10 @@ private:
Vector<Color> emission_colors;
int emission_point_count = 0;
+ Ref<Curve> scale_curve_x;
+ Ref<Curve> scale_curve_y;
+ bool split_scale = false;
+
Vector2 gravity = Vector2(0, 980);
void _update_internal();
@@ -236,11 +240,11 @@ public:
void set_spread(real_t p_spread);
real_t get_spread() const;
- void set_param(Parameter p_param, real_t p_value);
- real_t get_param(Parameter p_param) const;
+ void set_param_min(Parameter p_param, real_t p_value);
+ real_t get_param_min(Parameter p_param) const;
- void set_param_randomness(Parameter p_param, real_t p_value);
- real_t get_param_randomness(Parameter p_param) const;
+ void set_param_max(Parameter p_param, real_t p_value);
+ real_t get_param_max(Parameter p_param) const;
void set_param_curve(Parameter p_param, const Ref<Curve> &p_curve);
Ref<Curve> get_param_curve(Parameter p_param) const;
@@ -261,6 +265,9 @@ public:
void set_emission_normals(const Vector<Vector2> &p_normals);
void set_emission_colors(const Vector<Color> &p_colors);
void set_emission_point_count(int p_count);
+ void set_scale_curve_x(Ref<Curve> p_scale_curve);
+ void set_scale_curve_y(Ref<Curve> p_scale_curve);
+ void set_split_scale(bool p_split_scale);
EmissionShape get_emission_shape() const;
real_t get_emission_sphere_radius() const;
@@ -269,6 +276,9 @@ public:
Vector<Vector2> get_emission_normals() const;
Vector<Color> get_emission_colors() const;
int get_emission_point_count() const;
+ Ref<Curve> get_scale_curve_x() const;
+ Ref<Curve> get_scale_curve_y() const;
+ bool get_split_scale();
void set_gravity(const Vector2 &p_gravity);
Vector2 get_gravity() const;
diff --git a/scene/2d/gpu_particles_2d.cpp b/scene/2d/gpu_particles_2d.cpp
index 47bf1bc77c..5bce705dd5 100644
--- a/scene/2d/gpu_particles_2d.cpp
+++ b/scene/2d/gpu_particles_2d.cpp
@@ -295,7 +295,7 @@ TypedArray<String> GPUParticles2D::get_configuration_warnings() const {
if (get_material().is_null() || (mat && !mat->get_particles_animation())) {
const ParticlesMaterial *process = Object::cast_to<ParticlesMaterial>(process_material.ptr());
if (process &&
- (process->get_param(ParticlesMaterial::PARAM_ANIM_SPEED) != 0.0 || process->get_param(ParticlesMaterial::PARAM_ANIM_OFFSET) != 0.0 ||
+ (process->get_param_max(ParticlesMaterial::PARAM_ANIM_SPEED) != 0.0 || process->get_param_max(ParticlesMaterial::PARAM_ANIM_OFFSET) != 0.0 ||
process->get_param_texture(ParticlesMaterial::PARAM_ANIM_SPEED).is_valid() || process->get_param_texture(ParticlesMaterial::PARAM_ANIM_OFFSET).is_valid())) {
warnings.push_back(TTR("Particles2D animation requires the usage of a CanvasItemMaterial with \"Particles Animation\" enabled."));
}
diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp
index 72ea6541e3..cbf0d50c4e 100644
--- a/scene/2d/navigation_region_2d.cpp
+++ b/scene/2d/navigation_region_2d.cpp
@@ -464,7 +464,7 @@ void NavigationRegion2D::_notification(int p_what) {
draw_line(a, b, doors_color);
// Draw a circle to illustrate the margins.
- real_t angle = (b - a).angle();
+ real_t angle = b.angle_to_point(a);
draw_arc(a, radius, angle + Math_PI / 2.0, angle - Math_PI / 2.0 + Math_TAU, 10, doors_color);
draw_arc(b, radius, angle - Math_PI / 2.0, angle + Math_PI / 2.0, 10, doors_color);
}
diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp
index 1fe6a4a4b8..67e35cc7a3 100644
--- a/scene/2d/parallax_layer.cpp
+++ b/scene/2d/parallax_layer.cpp
@@ -100,6 +100,10 @@ void ParallaxLayer::_notification(int p_what) {
_update_mirroring();
} break;
case NOTIFICATION_EXIT_TREE: {
+ if (Engine::get_singleton()->is_editor_hint()) {
+ break;
+ }
+
set_position(orig_offset);
set_scale(orig_scale);
} break;
diff --git a/scene/2d/physical_bone_2d.cpp b/scene/2d/physical_bone_2d.cpp
index d547914e16..48817679bc 100644
--- a/scene/2d/physical_bone_2d.cpp
+++ b/scene/2d/physical_bone_2d.cpp
@@ -33,7 +33,7 @@
void PhysicalBone2D::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
- // Position the RigidBody in the correct position.
+ // Position the RigidDynamicBody in the correct position.
if (follow_bone_when_simulating) {
_position_at_bone2d();
}
@@ -150,27 +150,15 @@ void PhysicalBone2D::_start_physics_simulation() {
return;
}
- // Reset to Bone2D position
+ // Reset to Bone2D position.
_position_at_bone2d();
- // Apply the layers and masks
+ // Apply the layers and masks.
PhysicsServer2D::get_singleton()->body_set_collision_layer(get_rid(), get_collision_layer());
PhysicsServer2D::get_singleton()->body_set_collision_mask(get_rid(), get_collision_mask());
- // Apply the correct mode
- RigidBody2D::Mode rigid_mode = get_mode();
- if (rigid_mode == RigidBody2D::MODE_STATIC) {
- set_body_mode(PhysicsServer2D::BODY_MODE_STATIC);
- } else if (rigid_mode == RigidBody2D::MODE_DYNAMIC) {
- set_body_mode(PhysicsServer2D::BODY_MODE_DYNAMIC);
- } else if (rigid_mode == RigidBody2D::MODE_KINEMATIC) {
- set_body_mode(PhysicsServer2D::BODY_MODE_KINEMATIC);
- } else if (rigid_mode == RigidBody2D::MODE_DYNAMIC_LOCKED) {
- set_body_mode(PhysicsServer2D::BODY_MODE_DYNAMIC_LOCKED);
- } else {
- // Default to Dynamic.
- set_body_mode(PhysicsServer2D::BODY_MODE_DYNAMIC);
- }
+ // Apply the correct mode.
+ _apply_body_mode();
_internal_simulate_physics = true;
set_physics_process_internal(true);
@@ -295,7 +283,7 @@ void PhysicalBone2D::_bind_methods() {
}
PhysicalBone2D::PhysicalBone2D() {
- // Stop the RigidBody from executing its force integration.
+ // Stop the RigidDynamicBody from executing its force integration.
PhysicsServer2D::get_singleton()->body_set_collision_layer(get_rid(), 0);
PhysicsServer2D::get_singleton()->body_set_collision_mask(get_rid(), 0);
PhysicsServer2D::get_singleton()->body_set_mode(get_rid(), PhysicsServer2D::BodyMode::BODY_MODE_STATIC);
diff --git a/scene/2d/physical_bone_2d.h b/scene/2d/physical_bone_2d.h
index 46a2772bad..a250d0aadd 100644
--- a/scene/2d/physical_bone_2d.h
+++ b/scene/2d/physical_bone_2d.h
@@ -36,8 +36,8 @@
#include "scene/2d/skeleton_2d.h"
-class PhysicalBone2D : public RigidBody2D {
- GDCLASS(PhysicalBone2D, RigidBody2D);
+class PhysicalBone2D : public RigidDynamicBody2D {
+ GDCLASS(PhysicalBone2D, RigidDynamicBody2D);
protected:
void _notification(int p_what);
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index dd1a4671d9..d34a1e1c62 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -34,8 +34,8 @@
#include "scene/scene_string_names.h"
void PhysicsBody2D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("move_and_collide", "rel_vec", "test_only", "safe_margin"), &PhysicsBody2D::_move, DEFVAL(false), DEFVAL(0.08));
- ClassDB::bind_method(D_METHOD("test_move", "from", "rel_vec", "collision", "safe_margin"), &PhysicsBody2D::test_move, DEFVAL(Variant()), DEFVAL(0.08));
+ ClassDB::bind_method(D_METHOD("move_and_collide", "linear_velocity", "test_only", "safe_margin"), &PhysicsBody2D::_move, DEFVAL(false), DEFVAL(0.08));
+ ClassDB::bind_method(D_METHOD("test_move", "from", "linear_velocity", "collision", "safe_margin"), &PhysicsBody2D::test_move, DEFVAL(Variant()), DEFVAL(0.08));
ClassDB::bind_method(D_METHOD("get_collision_exceptions"), &PhysicsBody2D::get_collision_exceptions);
ClassDB::bind_method(D_METHOD("add_collision_exception_with", "body"), &PhysicsBody2D::add_collision_exception_with);
@@ -57,8 +57,12 @@ PhysicsBody2D::~PhysicsBody2D() {
Ref<KinematicCollision2D> PhysicsBody2D::_move(const Vector2 &p_motion, bool p_test_only, real_t p_margin) {
PhysicsServer2D::MotionResult result;
- if (move_and_collide(p_motion, result, p_margin, p_test_only)) {
- if (motion_cache.is_null()) {
+ // Hack in order to work with calling from _process as well as from _physics_process; calling from thread is risky.
+ double delta = Engine::get_singleton()->is_in_physics_frame() ? get_physics_process_delta_time() : get_process_delta_time();
+
+ if (move_and_collide(p_motion * delta, result, p_margin, p_test_only)) {
+ // Create a new instance when the cached reference is invalid or still in use in script.
+ if (motion_cache.is_null() || motion_cache->reference_get_count() > 1) {
motion_cache.instantiate();
motion_cache->owner = this;
}
@@ -70,12 +74,12 @@ Ref<KinematicCollision2D> PhysicsBody2D::_move(const Vector2 &p_motion, bool p_t
return Ref<KinematicCollision2D>();
}
-bool PhysicsBody2D::move_and_collide(const Vector2 &p_motion, PhysicsServer2D::MotionResult &r_result, real_t p_margin, bool p_test_only, bool p_cancel_sliding, const Set<RID> &p_exclude) {
+bool PhysicsBody2D::move_and_collide(const Vector2 &p_motion, PhysicsServer2D::MotionResult &r_result, real_t p_margin, bool p_test_only, bool p_cancel_sliding, bool p_collide_separation_ray, const Set<RID> &p_exclude) {
if (is_only_update_transform_changes_enabled()) {
ERR_PRINT("Move functions do not work together with 'sync to physics' option. Please read the documentation.");
}
Transform2D gt = get_global_transform();
- bool colliding = PhysicsServer2D::get_singleton()->body_test_motion(get_rid(), gt, p_motion, p_margin, &r_result, p_exclude);
+ bool colliding = PhysicsServer2D::get_singleton()->body_test_motion(get_rid(), gt, p_motion, p_margin, &r_result, p_collide_separation_ray, p_exclude);
// Restore direction of motion to be along original motion,
// in order to avoid sliding due to recovery,
@@ -132,7 +136,10 @@ bool PhysicsBody2D::test_move(const Transform2D &p_from, const Vector2 &p_motion
r = const_cast<PhysicsServer2D::MotionResult *>(&r_collision->result);
}
- return PhysicsServer2D::get_singleton()->body_test_motion(get_rid(), p_from, p_motion, p_margin, r);
+ // Hack in order to work with calling from _process as well as from _physics_process; calling from thread is risky.
+ double delta = Engine::get_singleton()->is_in_physics_frame() ? get_physics_process_delta_time() : get_process_delta_time();
+
+ return PhysicsServer2D::get_singleton()->body_test_motion(get_rid(), p_from, p_motion * delta, p_margin, r);
}
TypedArray<PhysicsBody2D> PhysicsBody2D::get_collision_exceptions() {
@@ -165,21 +172,13 @@ void PhysicsBody2D::remove_collision_exception_with(Node *p_node) {
void StaticBody2D::set_constant_linear_velocity(const Vector2 &p_vel) {
constant_linear_velocity = p_vel;
- if (kinematic_motion) {
- _update_kinematic_motion();
- } else {
- PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_LINEAR_VELOCITY, constant_linear_velocity);
- }
+ PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_LINEAR_VELOCITY, constant_linear_velocity);
}
void StaticBody2D::set_constant_angular_velocity(real_t p_vel) {
constant_angular_velocity = p_vel;
- if (kinematic_motion) {
- _update_kinematic_motion();
- } else {
- PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_ANGULAR_VELOCITY, constant_angular_velocity);
- }
+ PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_ANGULAR_VELOCITY, constant_angular_velocity);
}
Vector2 StaticBody2D::get_constant_linear_velocity() const {
@@ -209,94 +208,98 @@ Ref<PhysicsMaterial> StaticBody2D::get_physics_material_override() const {
return physics_material_override;
}
-void StaticBody2D::set_kinematic_motion_enabled(bool p_enabled) {
- if (p_enabled == kinematic_motion) {
- return;
- }
-
- kinematic_motion = p_enabled;
+void StaticBody2D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_constant_linear_velocity", "vel"), &StaticBody2D::set_constant_linear_velocity);
+ ClassDB::bind_method(D_METHOD("set_constant_angular_velocity", "vel"), &StaticBody2D::set_constant_angular_velocity);
+ ClassDB::bind_method(D_METHOD("get_constant_linear_velocity"), &StaticBody2D::get_constant_linear_velocity);
+ ClassDB::bind_method(D_METHOD("get_constant_angular_velocity"), &StaticBody2D::get_constant_angular_velocity);
- if (kinematic_motion) {
- set_body_mode(PhysicsServer2D::BODY_MODE_KINEMATIC);
- } else {
- set_body_mode(PhysicsServer2D::BODY_MODE_STATIC);
- }
+ ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &StaticBody2D::set_physics_material_override);
+ ClassDB::bind_method(D_METHOD("get_physics_material_override"), &StaticBody2D::get_physics_material_override);
-#ifdef TOOLS_ENABLED
- if (Engine::get_singleton()->is_editor_hint()) {
- update_configuration_warnings();
- return;
- }
-#endif
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "constant_linear_velocity"), "set_constant_linear_velocity", "get_constant_linear_velocity");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "constant_angular_velocity"), "set_constant_angular_velocity", "get_constant_angular_velocity");
+}
- _update_kinematic_motion();
+StaticBody2D::StaticBody2D(PhysicsServer2D::BodyMode p_mode) :
+ PhysicsBody2D(p_mode) {
}
-bool StaticBody2D::is_kinematic_motion_enabled() const {
- return kinematic_motion;
+void StaticBody2D::_reload_physics_characteristics() {
+ if (physics_material_override.is_null()) {
+ PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_BOUNCE, 0);
+ PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_FRICTION, 1);
+ } else {
+ PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_BOUNCE, physics_material_override->computed_bounce());
+ PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_FRICTION, physics_material_override->computed_friction());
+ }
}
-void StaticBody2D::set_sync_to_physics(bool p_enable) {
+void AnimatableBody2D::set_sync_to_physics(bool p_enable) {
if (sync_to_physics == p_enable) {
return;
}
sync_to_physics = p_enable;
+ _update_kinematic_motion();
+}
+
+bool AnimatableBody2D::is_sync_to_physics_enabled() const {
+ return sync_to_physics;
+}
+
+void AnimatableBody2D::_update_kinematic_motion() {
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
- update_configuration_warnings();
return;
}
#endif
- if (kinematic_motion) {
- _update_kinematic_motion();
+ if (sync_to_physics) {
+ PhysicsServer2D::get_singleton()->body_set_state_sync_callback(get_rid(), this, _body_state_changed_callback);
+ set_only_update_transform_changes(true);
+ set_notify_local_transform(true);
+ } else {
+ PhysicsServer2D::get_singleton()->body_set_state_sync_callback(get_rid(), nullptr, nullptr);
+ set_only_update_transform_changes(false);
+ set_notify_local_transform(false);
}
}
-bool StaticBody2D::is_sync_to_physics_enabled() const {
- return sync_to_physics;
+void AnimatableBody2D::_body_state_changed_callback(void *p_instance, PhysicsDirectBodyState2D *p_state) {
+ AnimatableBody2D *body = (AnimatableBody2D *)p_instance;
+ body->_body_state_changed(p_state);
}
-void StaticBody2D::_direct_state_changed(Object *p_state) {
+void AnimatableBody2D::_body_state_changed(PhysicsDirectBodyState2D *p_state) {
if (!sync_to_physics) {
return;
}
- PhysicsDirectBodyState2D *state = Object::cast_to<PhysicsDirectBodyState2D>(p_state);
- ERR_FAIL_NULL_MSG(state, "Method '_direct_state_changed' must receive a valid PhysicsDirectBodyState2D object as argument");
-
- last_valid_transform = state->get_transform();
+ last_valid_transform = p_state->get_transform();
set_notify_local_transform(false);
set_global_transform(last_valid_transform);
set_notify_local_transform(true);
}
-TypedArray<String> StaticBody2D::get_configuration_warnings() const {
- TypedArray<String> warnings = PhysicsBody2D::get_configuration_warnings();
-
- if (sync_to_physics && !kinematic_motion) {
- warnings.push_back(TTR("Sync to physics works only when kinematic motion is enabled."));
- }
-
- return warnings;
-}
-
-void StaticBody2D::_notification(int p_what) {
+void AnimatableBody2D::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
last_valid_transform = get_global_transform();
+ _update_kinematic_motion();
+ } break;
+
+ case NOTIFICATION_EXIT_TREE: {
+ set_only_update_transform_changes(false);
+ set_notify_local_transform(false);
} break;
case NOTIFICATION_LOCAL_TRANSFORM_CHANGED: {
// Used by sync to physics, send the new transform to the physics...
Transform2D new_transform = get_global_transform();
- real_t delta_time = get_physics_process_delta_time();
- new_transform.translate(constant_linear_velocity * delta_time);
- new_transform.set_rotation(new_transform.get_rotation() + constant_angular_velocity * delta_time);
-
PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_TRANSFORM, new_transform);
// ... but then revert changes.
@@ -304,101 +307,21 @@ void StaticBody2D::_notification(int p_what) {
set_global_transform(last_valid_transform);
set_notify_local_transform(true);
} break;
-
- case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
-#ifdef TOOLS_ENABLED
- if (Engine::get_singleton()->is_editor_hint()) {
- return;
- }
-#endif
-
- ERR_FAIL_COND(!kinematic_motion);
-
- Transform2D new_transform = get_global_transform();
-
- real_t delta_time = get_physics_process_delta_time();
- new_transform.translate(constant_linear_velocity * delta_time);
- new_transform.set_rotation(new_transform.get_rotation() + constant_angular_velocity * delta_time);
-
- if (sync_to_physics) {
- // Propagate transform change to node.
- set_global_transform(new_transform);
- } else {
- PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_TRANSFORM, new_transform);
-
- // Propagate transform change to node.
- set_block_transform_notify(true);
- set_global_transform(new_transform);
- set_block_transform_notify(false);
- }
- } break;
}
}
-void StaticBody2D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_constant_linear_velocity", "vel"), &StaticBody2D::set_constant_linear_velocity);
- ClassDB::bind_method(D_METHOD("set_constant_angular_velocity", "vel"), &StaticBody2D::set_constant_angular_velocity);
- ClassDB::bind_method(D_METHOD("get_constant_linear_velocity"), &StaticBody2D::get_constant_linear_velocity);
- ClassDB::bind_method(D_METHOD("get_constant_angular_velocity"), &StaticBody2D::get_constant_angular_velocity);
-
- ClassDB::bind_method(D_METHOD("set_kinematic_motion_enabled", "enabled"), &StaticBody2D::set_kinematic_motion_enabled);
- ClassDB::bind_method(D_METHOD("is_kinematic_motion_enabled"), &StaticBody2D::is_kinematic_motion_enabled);
+void AnimatableBody2D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_sync_to_physics", "enable"), &AnimatableBody2D::set_sync_to_physics);
+ ClassDB::bind_method(D_METHOD("is_sync_to_physics_enabled"), &AnimatableBody2D::is_sync_to_physics_enabled);
- ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &StaticBody2D::set_physics_material_override);
- ClassDB::bind_method(D_METHOD("get_physics_material_override"), &StaticBody2D::get_physics_material_override);
-
- ClassDB::bind_method(D_METHOD("set_sync_to_physics", "enable"), &StaticBody2D::set_sync_to_physics);
- ClassDB::bind_method(D_METHOD("is_sync_to_physics_enabled"), &StaticBody2D::is_sync_to_physics_enabled);
-
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "constant_linear_velocity"), "set_constant_linear_velocity", "get_constant_linear_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "constant_angular_velocity"), "set_constant_angular_velocity", "get_constant_angular_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "kinematic_motion"), "set_kinematic_motion_enabled", "is_kinematic_motion_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sync_to_physics"), "set_sync_to_physics", "is_sync_to_physics_enabled");
}
-StaticBody2D::StaticBody2D() :
- PhysicsBody2D(PhysicsServer2D::BODY_MODE_STATIC) {
-}
-
-void StaticBody2D::_reload_physics_characteristics() {
- if (physics_material_override.is_null()) {
- PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_BOUNCE, 0);
- PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_FRICTION, 1);
- } else {
- PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_BOUNCE, physics_material_override->computed_bounce());
- PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_FRICTION, physics_material_override->computed_friction());
- }
+AnimatableBody2D::AnimatableBody2D() :
+ StaticBody2D(PhysicsServer2D::BODY_MODE_KINEMATIC) {
}
-void StaticBody2D::_update_kinematic_motion() {
-#ifdef TOOLS_ENABLED
- if (Engine::get_singleton()->is_editor_hint()) {
- return;
- }
-#endif
-
- if (kinematic_motion && sync_to_physics) {
- PhysicsServer2D::get_singleton()->body_set_force_integration_callback(get_rid(), callable_mp(this, &StaticBody2D::_direct_state_changed));
- set_only_update_transform_changes(true);
- set_notify_local_transform(true);
- } else {
- PhysicsServer2D::get_singleton()->body_set_force_integration_callback(get_rid(), Callable());
- set_only_update_transform_changes(false);
- set_notify_local_transform(false);
- }
-
- bool needs_physics_process = false;
- if (kinematic_motion) {
- if (!Math::is_zero_approx(constant_angular_velocity) || !constant_linear_velocity.is_equal_approx(Vector2())) {
- needs_physics_process = true;
- }
- }
-
- set_physics_process_internal(needs_physics_process);
-}
-
-void RigidBody2D::_body_enter_tree(ObjectID p_id) {
+void RigidDynamicBody2D::_body_enter_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
@@ -420,7 +343,7 @@ void RigidBody2D::_body_enter_tree(ObjectID p_id) {
contact_monitor->locked = false;
}
-void RigidBody2D::_body_exit_tree(ObjectID p_id) {
+void RigidDynamicBody2D::_body_exit_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
@@ -441,7 +364,7 @@ void RigidBody2D::_body_exit_tree(ObjectID p_id) {
contact_monitor->locked = false;
}
-void RigidBody2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, int p_body_shape, int p_local_shape) {
+void RigidDynamicBody2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, int p_body_shape, int p_local_shape) {
bool body_in = p_status == 1;
ObjectID objid = p_instance;
@@ -460,8 +383,8 @@ void RigidBody2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instan
//E->get().rc=0;
E->get().in_scene = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidBody2D::_body_enter_tree), make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidBody2D::_body_exit_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody2D::_body_enter_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody2D::_body_exit_tree), make_binds(objid));
if (E->get().in_scene) {
emit_signal(SceneStringNames::get_singleton()->body_entered, node);
}
@@ -489,8 +412,8 @@ void RigidBody2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instan
if (E->get().shapes.is_empty()) {
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidBody2D::_body_enter_tree));
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidBody2D::_body_exit_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody2D::_body_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody2D::_body_exit_tree));
if (in_scene) {
emit_signal(SceneStringNames::get_singleton()->body_exited, node);
}
@@ -504,34 +427,34 @@ void RigidBody2D::_body_inout(int p_status, const RID &p_body, ObjectID p_instan
}
}
-struct _RigidBody2DInOut {
+struct _RigidDynamicBody2DInOut {
RID rid;
ObjectID id;
int shape = 0;
int local_shape = 0;
};
-void RigidBody2D::_direct_state_changed(Object *p_state) {
-#ifdef DEBUG_ENABLED
- state = Object::cast_to<PhysicsDirectBodyState2D>(p_state);
- ERR_FAIL_NULL_MSG(state, "Method '_direct_state_changed' must receive a valid PhysicsDirectBodyState2D object as argument");
-#else
- state = (PhysicsDirectBodyState2D *)p_state; //trust it
-#endif
+void RigidDynamicBody2D::_body_state_changed_callback(void *p_instance, PhysicsDirectBodyState2D *p_state) {
+ RigidDynamicBody2D *body = (RigidDynamicBody2D *)p_instance;
+ body->_body_state_changed(p_state);
+}
+void RigidDynamicBody2D::_body_state_changed(PhysicsDirectBodyState2D *p_state) {
set_block_transform_notify(true); // don't want notify (would feedback loop)
- if (mode != MODE_KINEMATIC) {
- set_global_transform(state->get_transform());
+ if (!freeze || freeze_mode != FREEZE_MODE_KINEMATIC) {
+ set_global_transform(p_state->get_transform());
}
- linear_velocity = state->get_linear_velocity();
- angular_velocity = state->get_angular_velocity();
- if (sleeping != state->is_sleeping()) {
- sleeping = state->is_sleeping();
+
+ linear_velocity = p_state->get_linear_velocity();
+ angular_velocity = p_state->get_angular_velocity();
+
+ if (sleeping != p_state->is_sleeping()) {
+ sleeping = p_state->is_sleeping();
emit_signal(SceneStringNames::get_singleton()->sleeping_state_changed);
}
- if (get_script_instance()) {
- get_script_instance()->call("_integrate_forces", state);
- }
+
+ GDVIRTUAL_CALL(_integrate_forces, p_state);
+
set_block_transform_notify(false); // want it back
if (contact_monitor) {
@@ -546,20 +469,18 @@ void RigidBody2D::_direct_state_changed(Object *p_state) {
}
}
- _RigidBody2DInOut *toadd = (_RigidBody2DInOut *)alloca(state->get_contact_count() * sizeof(_RigidBody2DInOut));
+ _RigidDynamicBody2DInOut *toadd = (_RigidDynamicBody2DInOut *)alloca(p_state->get_contact_count() * sizeof(_RigidDynamicBody2DInOut));
int toadd_count = 0; //state->get_contact_count();
- RigidBody2D_RemoveAction *toremove = (RigidBody2D_RemoveAction *)alloca(rc * sizeof(RigidBody2D_RemoveAction));
+ RigidDynamicBody2D_RemoveAction *toremove = (RigidDynamicBody2D_RemoveAction *)alloca(rc * sizeof(RigidDynamicBody2D_RemoveAction));
int toremove_count = 0;
//put the ones to add
- for (int i = 0; i < state->get_contact_count(); i++) {
- RID rid = state->get_contact_collider(i);
- ObjectID obj = state->get_contact_collider_id(i);
- int local_shape = state->get_contact_local_shape(i);
- int shape = state->get_contact_collider_shape(i);
-
- //bool found=false;
+ for (int i = 0; i < p_state->get_contact_count(); i++) {
+ RID rid = p_state->get_contact_collider(i);
+ ObjectID obj = p_state->get_contact_collider_id(i);
+ int local_shape = p_state->get_contact_local_shape(i);
+ int shape = p_state->get_contact_collider_shape(i);
Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(obj);
if (!E) {
@@ -612,142 +533,199 @@ void RigidBody2D::_direct_state_changed(Object *p_state) {
contact_monitor->locked = false;
}
+}
- state = nullptr;
+void RigidDynamicBody2D::_apply_body_mode() {
+ if (freeze) {
+ switch (freeze_mode) {
+ case FREEZE_MODE_STATIC: {
+ set_body_mode(PhysicsServer2D::BODY_MODE_STATIC);
+ } break;
+ case FREEZE_MODE_KINEMATIC: {
+ set_body_mode(PhysicsServer2D::BODY_MODE_KINEMATIC);
+ } break;
+ }
+ } else if (lock_rotation) {
+ set_body_mode(PhysicsServer2D::BODY_MODE_DYNAMIC_LINEAR);
+ } else {
+ set_body_mode(PhysicsServer2D::BODY_MODE_DYNAMIC);
+ }
}
-void RigidBody2D::set_mode(Mode p_mode) {
- mode = p_mode;
- switch (p_mode) {
- case MODE_DYNAMIC: {
- set_body_mode(PhysicsServer2D::BODY_MODE_DYNAMIC);
- } break;
- case MODE_STATIC: {
- set_body_mode(PhysicsServer2D::BODY_MODE_STATIC);
+void RigidDynamicBody2D::set_lock_rotation_enabled(bool p_lock_rotation) {
+ if (p_lock_rotation == lock_rotation) {
+ return;
+ }
- } break;
- case MODE_KINEMATIC: {
- set_body_mode(PhysicsServer2D::BODY_MODE_KINEMATIC);
+ lock_rotation = p_lock_rotation;
+ _apply_body_mode();
+}
- } break;
- case MODE_DYNAMIC_LOCKED: {
- set_body_mode(PhysicsServer2D::BODY_MODE_DYNAMIC_LOCKED);
+bool RigidDynamicBody2D::is_lock_rotation_enabled() const {
+ return lock_rotation;
+}
- } break;
+void RigidDynamicBody2D::set_freeze_enabled(bool p_freeze) {
+ if (p_freeze == freeze) {
+ return;
}
+
+ freeze = p_freeze;
+ _apply_body_mode();
}
-RigidBody2D::Mode RigidBody2D::get_mode() const {
- return mode;
+bool RigidDynamicBody2D::is_freeze_enabled() const {
+ return freeze;
}
-void RigidBody2D::set_mass(real_t p_mass) {
+void RigidDynamicBody2D::set_freeze_mode(FreezeMode p_freeze_mode) {
+ if (p_freeze_mode == freeze_mode) {
+ return;
+ }
+
+ freeze_mode = p_freeze_mode;
+ _apply_body_mode();
+}
+
+RigidDynamicBody2D::FreezeMode RigidDynamicBody2D::get_freeze_mode() const {
+ return freeze_mode;
+}
+
+void RigidDynamicBody2D::set_mass(real_t p_mass) {
ERR_FAIL_COND(p_mass <= 0);
mass = p_mass;
PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_MASS, mass);
}
-real_t RigidBody2D::get_mass() const {
+real_t RigidDynamicBody2D::get_mass() const {
return mass;
}
-void RigidBody2D::set_inertia(real_t p_inertia) {
+void RigidDynamicBody2D::set_inertia(real_t p_inertia) {
ERR_FAIL_COND(p_inertia < 0);
- PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_INERTIA, p_inertia);
+ inertia = p_inertia;
+ PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_INERTIA, inertia);
}
-real_t RigidBody2D::get_inertia() const {
- return PhysicsServer2D::get_singleton()->body_get_param(get_rid(), PhysicsServer2D::BODY_PARAM_INERTIA);
+real_t RigidDynamicBody2D::get_inertia() const {
+ return inertia;
}
-void RigidBody2D::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) {
+void RigidDynamicBody2D::set_center_of_mass_mode(CenterOfMassMode p_mode) {
+ if (center_of_mass_mode == p_mode) {
+ return;
+ }
+
+ center_of_mass_mode = p_mode;
+
+ switch (center_of_mass_mode) {
+ case CENTER_OF_MASS_MODE_AUTO: {
+ center_of_mass = Vector2();
+ PhysicsServer2D::get_singleton()->body_reset_mass_properties(get_rid());
+ if (inertia != 0.0) {
+ PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_INERTIA, inertia);
+ }
+ } break;
+
+ case CENTER_OF_MASS_MODE_CUSTOM: {
+ PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_CENTER_OF_MASS, center_of_mass);
+ } break;
+ }
+}
+
+RigidDynamicBody2D::CenterOfMassMode RigidDynamicBody2D::get_center_of_mass_mode() const {
+ return center_of_mass_mode;
+}
+
+void RigidDynamicBody2D::set_center_of_mass(const Vector2 &p_center_of_mass) {
+ if (center_of_mass == p_center_of_mass) {
+ return;
+ }
+
+ ERR_FAIL_COND(center_of_mass_mode != CENTER_OF_MASS_MODE_CUSTOM);
+ center_of_mass = p_center_of_mass;
+
+ PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_CENTER_OF_MASS, center_of_mass);
+}
+
+const Vector2 &RigidDynamicBody2D::get_center_of_mass() const {
+ return center_of_mass;
+}
+
+void RigidDynamicBody2D::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) {
if (physics_material_override.is_valid()) {
- if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidBody2D::_reload_physics_characteristics))) {
- physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidBody2D::_reload_physics_characteristics));
+ if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidDynamicBody2D::_reload_physics_characteristics))) {
+ physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidDynamicBody2D::_reload_physics_characteristics));
}
}
physics_material_override = p_physics_material_override;
if (physics_material_override.is_valid()) {
- physics_material_override->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidBody2D::_reload_physics_characteristics));
+ physics_material_override->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidDynamicBody2D::_reload_physics_characteristics));
}
_reload_physics_characteristics();
}
-Ref<PhysicsMaterial> RigidBody2D::get_physics_material_override() const {
+Ref<PhysicsMaterial> RigidDynamicBody2D::get_physics_material_override() const {
return physics_material_override;
}
-void RigidBody2D::set_gravity_scale(real_t p_gravity_scale) {
+void RigidDynamicBody2D::set_gravity_scale(real_t p_gravity_scale) {
gravity_scale = p_gravity_scale;
PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_GRAVITY_SCALE, gravity_scale);
}
-real_t RigidBody2D::get_gravity_scale() const {
+real_t RigidDynamicBody2D::get_gravity_scale() const {
return gravity_scale;
}
-void RigidBody2D::set_linear_damp(real_t p_linear_damp) {
+void RigidDynamicBody2D::set_linear_damp(real_t p_linear_damp) {
ERR_FAIL_COND(p_linear_damp < -1);
linear_damp = p_linear_damp;
PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_LINEAR_DAMP, linear_damp);
}
-real_t RigidBody2D::get_linear_damp() const {
+real_t RigidDynamicBody2D::get_linear_damp() const {
return linear_damp;
}
-void RigidBody2D::set_angular_damp(real_t p_angular_damp) {
+void RigidDynamicBody2D::set_angular_damp(real_t p_angular_damp) {
ERR_FAIL_COND(p_angular_damp < -1);
angular_damp = p_angular_damp;
PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_ANGULAR_DAMP, angular_damp);
}
-real_t RigidBody2D::get_angular_damp() const {
+real_t RigidDynamicBody2D::get_angular_damp() const {
return angular_damp;
}
-void RigidBody2D::set_axis_velocity(const Vector2 &p_axis) {
- Vector2 v = state ? state->get_linear_velocity() : linear_velocity;
+void RigidDynamicBody2D::set_axis_velocity(const Vector2 &p_axis) {
Vector2 axis = p_axis.normalized();
- v -= axis * axis.dot(v);
- v += p_axis;
- if (state) {
- set_linear_velocity(v);
- } else {
- PhysicsServer2D::get_singleton()->body_set_axis_velocity(get_rid(), p_axis);
- linear_velocity = v;
- }
+ linear_velocity -= axis * axis.dot(linear_velocity);
+ linear_velocity += p_axis;
+ PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_LINEAR_VELOCITY, linear_velocity);
}
-void RigidBody2D::set_linear_velocity(const Vector2 &p_velocity) {
+void RigidDynamicBody2D::set_linear_velocity(const Vector2 &p_velocity) {
linear_velocity = p_velocity;
- if (state) {
- state->set_linear_velocity(linear_velocity);
- } else {
- PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_LINEAR_VELOCITY, linear_velocity);
- }
+ PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_LINEAR_VELOCITY, linear_velocity);
}
-Vector2 RigidBody2D::get_linear_velocity() const {
+Vector2 RigidDynamicBody2D::get_linear_velocity() const {
return linear_velocity;
}
-void RigidBody2D::set_angular_velocity(real_t p_velocity) {
+void RigidDynamicBody2D::set_angular_velocity(real_t p_velocity) {
angular_velocity = p_velocity;
- if (state) {
- state->set_angular_velocity(angular_velocity);
- } else {
- PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_ANGULAR_VELOCITY, angular_velocity);
- }
+ PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_ANGULAR_VELOCITY, angular_velocity);
}
-real_t RigidBody2D::get_angular_velocity() const {
+real_t RigidDynamicBody2D::get_angular_velocity() const {
return angular_velocity;
}
-void RigidBody2D::set_use_custom_integrator(bool p_enable) {
+void RigidDynamicBody2D::set_use_custom_integrator(bool p_enable) {
if (custom_integrator == p_enable) {
return;
}
@@ -756,87 +734,87 @@ void RigidBody2D::set_use_custom_integrator(bool p_enable) {
PhysicsServer2D::get_singleton()->body_set_omit_force_integration(get_rid(), p_enable);
}
-bool RigidBody2D::is_using_custom_integrator() {
+bool RigidDynamicBody2D::is_using_custom_integrator() {
return custom_integrator;
}
-void RigidBody2D::set_sleeping(bool p_sleeping) {
+void RigidDynamicBody2D::set_sleeping(bool p_sleeping) {
sleeping = p_sleeping;
PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_SLEEPING, sleeping);
}
-void RigidBody2D::set_can_sleep(bool p_active) {
+void RigidDynamicBody2D::set_can_sleep(bool p_active) {
can_sleep = p_active;
PhysicsServer2D::get_singleton()->body_set_state(get_rid(), PhysicsServer2D::BODY_STATE_CAN_SLEEP, p_active);
}
-bool RigidBody2D::is_able_to_sleep() const {
+bool RigidDynamicBody2D::is_able_to_sleep() const {
return can_sleep;
}
-bool RigidBody2D::is_sleeping() const {
+bool RigidDynamicBody2D::is_sleeping() const {
return sleeping;
}
-void RigidBody2D::set_max_contacts_reported(int p_amount) {
+void RigidDynamicBody2D::set_max_contacts_reported(int p_amount) {
max_contacts_reported = p_amount;
PhysicsServer2D::get_singleton()->body_set_max_contacts_reported(get_rid(), p_amount);
}
-int RigidBody2D::get_max_contacts_reported() const {
+int RigidDynamicBody2D::get_max_contacts_reported() const {
return max_contacts_reported;
}
-void RigidBody2D::apply_central_impulse(const Vector2 &p_impulse) {
+void RigidDynamicBody2D::apply_central_impulse(const Vector2 &p_impulse) {
PhysicsServer2D::get_singleton()->body_apply_central_impulse(get_rid(), p_impulse);
}
-void RigidBody2D::apply_impulse(const Vector2 &p_impulse, const Vector2 &p_position) {
+void RigidDynamicBody2D::apply_impulse(const Vector2 &p_impulse, const Vector2 &p_position) {
PhysicsServer2D::get_singleton()->body_apply_impulse(get_rid(), p_impulse, p_position);
}
-void RigidBody2D::apply_torque_impulse(real_t p_torque) {
+void RigidDynamicBody2D::apply_torque_impulse(real_t p_torque) {
PhysicsServer2D::get_singleton()->body_apply_torque_impulse(get_rid(), p_torque);
}
-void RigidBody2D::set_applied_force(const Vector2 &p_force) {
+void RigidDynamicBody2D::set_applied_force(const Vector2 &p_force) {
PhysicsServer2D::get_singleton()->body_set_applied_force(get_rid(), p_force);
};
-Vector2 RigidBody2D::get_applied_force() const {
+Vector2 RigidDynamicBody2D::get_applied_force() const {
return PhysicsServer2D::get_singleton()->body_get_applied_force(get_rid());
};
-void RigidBody2D::set_applied_torque(const real_t p_torque) {
+void RigidDynamicBody2D::set_applied_torque(const real_t p_torque) {
PhysicsServer2D::get_singleton()->body_set_applied_torque(get_rid(), p_torque);
};
-real_t RigidBody2D::get_applied_torque() const {
+real_t RigidDynamicBody2D::get_applied_torque() const {
return PhysicsServer2D::get_singleton()->body_get_applied_torque(get_rid());
};
-void RigidBody2D::add_central_force(const Vector2 &p_force) {
+void RigidDynamicBody2D::add_central_force(const Vector2 &p_force) {
PhysicsServer2D::get_singleton()->body_add_central_force(get_rid(), p_force);
}
-void RigidBody2D::add_force(const Vector2 &p_force, const Vector2 &p_position) {
+void RigidDynamicBody2D::add_force(const Vector2 &p_force, const Vector2 &p_position) {
PhysicsServer2D::get_singleton()->body_add_force(get_rid(), p_force, p_position);
}
-void RigidBody2D::add_torque(const real_t p_torque) {
+void RigidDynamicBody2D::add_torque(const real_t p_torque) {
PhysicsServer2D::get_singleton()->body_add_torque(get_rid(), p_torque);
}
-void RigidBody2D::set_continuous_collision_detection_mode(CCDMode p_mode) {
+void RigidDynamicBody2D::set_continuous_collision_detection_mode(CCDMode p_mode) {
ccd_mode = p_mode;
PhysicsServer2D::get_singleton()->body_set_continuous_collision_detection_mode(get_rid(), PhysicsServer2D::CCDMode(p_mode));
}
-RigidBody2D::CCDMode RigidBody2D::get_continuous_collision_detection_mode() const {
+RigidDynamicBody2D::CCDMode RigidDynamicBody2D::get_continuous_collision_detection_mode() const {
return ccd_mode;
}
-TypedArray<Node2D> RigidBody2D::get_colliding_bodies() const {
+TypedArray<Node2D> RigidDynamicBody2D::get_colliding_bodies() const {
ERR_FAIL_COND_V(!contact_monitor, Array());
TypedArray<Node2D> ret;
@@ -854,7 +832,7 @@ TypedArray<Node2D> RigidBody2D::get_colliding_bodies() const {
return ret;
}
-void RigidBody2D::set_contact_monitor(bool p_enabled) {
+void RigidDynamicBody2D::set_contact_monitor(bool p_enabled) {
if (p_enabled == is_contact_monitor_enabled()) {
return;
}
@@ -868,8 +846,8 @@ void RigidBody2D::set_contact_monitor(bool p_enabled) {
Node *node = Object::cast_to<Node>(obj);
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidBody2D::_body_enter_tree));
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidBody2D::_body_exit_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody2D::_body_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody2D::_body_exit_tree));
}
}
@@ -881,11 +859,11 @@ void RigidBody2D::set_contact_monitor(bool p_enabled) {
}
}
-bool RigidBody2D::is_contact_monitor_enabled() const {
+bool RigidDynamicBody2D::is_contact_monitor_enabled() const {
return contact_monitor != nullptr;
}
-void RigidBody2D::_notification(int p_what) {
+void RigidDynamicBody2D::_notification(int p_what) {
#ifdef TOOLS_ENABLED
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
@@ -903,86 +881,100 @@ void RigidBody2D::_notification(int p_what) {
#endif
}
-TypedArray<String> RigidBody2D::get_configuration_warnings() const {
+TypedArray<String> RigidDynamicBody2D::get_configuration_warnings() const {
Transform2D t = get_transform();
TypedArray<String> warnings = CollisionObject2D::get_configuration_warnings();
- if ((get_mode() == MODE_DYNAMIC || get_mode() == MODE_DYNAMIC_LOCKED) && (ABS(t.elements[0].length() - 1.0) > 0.05 || ABS(t.elements[1].length() - 1.0) > 0.05)) {
- warnings.push_back(TTR("Size changes to RigidBody2D (in dynamic modes) will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."));
+ if (ABS(t.elements[0].length() - 1.0) > 0.05 || ABS(t.elements[1].length() - 1.0) > 0.05) {
+ warnings.push_back(TTR("Size changes to RigidDynamicBody2D will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."));
}
return warnings;
}
-void RigidBody2D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_mode", "mode"), &RigidBody2D::set_mode);
- ClassDB::bind_method(D_METHOD("get_mode"), &RigidBody2D::get_mode);
+void RigidDynamicBody2D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_mass", "mass"), &RigidDynamicBody2D::set_mass);
+ ClassDB::bind_method(D_METHOD("get_mass"), &RigidDynamicBody2D::get_mass);
+
+ ClassDB::bind_method(D_METHOD("get_inertia"), &RigidDynamicBody2D::get_inertia);
+ ClassDB::bind_method(D_METHOD("set_inertia", "inertia"), &RigidDynamicBody2D::set_inertia);
+
+ ClassDB::bind_method(D_METHOD("set_center_of_mass_mode", "mode"), &RigidDynamicBody2D::set_center_of_mass_mode);
+ ClassDB::bind_method(D_METHOD("get_center_of_mass_mode"), &RigidDynamicBody2D::get_center_of_mass_mode);
+
+ ClassDB::bind_method(D_METHOD("set_center_of_mass", "center_of_mass"), &RigidDynamicBody2D::set_center_of_mass);
+ ClassDB::bind_method(D_METHOD("get_center_of_mass"), &RigidDynamicBody2D::get_center_of_mass);
- ClassDB::bind_method(D_METHOD("set_mass", "mass"), &RigidBody2D::set_mass);
- ClassDB::bind_method(D_METHOD("get_mass"), &RigidBody2D::get_mass);
+ ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &RigidDynamicBody2D::set_physics_material_override);
+ ClassDB::bind_method(D_METHOD("get_physics_material_override"), &RigidDynamicBody2D::get_physics_material_override);
- ClassDB::bind_method(D_METHOD("get_inertia"), &RigidBody2D::get_inertia);
- ClassDB::bind_method(D_METHOD("set_inertia", "inertia"), &RigidBody2D::set_inertia);
+ ClassDB::bind_method(D_METHOD("set_gravity_scale", "gravity_scale"), &RigidDynamicBody2D::set_gravity_scale);
+ ClassDB::bind_method(D_METHOD("get_gravity_scale"), &RigidDynamicBody2D::get_gravity_scale);
- ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &RigidBody2D::set_physics_material_override);
- ClassDB::bind_method(D_METHOD("get_physics_material_override"), &RigidBody2D::get_physics_material_override);
+ ClassDB::bind_method(D_METHOD("set_linear_damp", "linear_damp"), &RigidDynamicBody2D::set_linear_damp);
+ ClassDB::bind_method(D_METHOD("get_linear_damp"), &RigidDynamicBody2D::get_linear_damp);
- ClassDB::bind_method(D_METHOD("set_gravity_scale", "gravity_scale"), &RigidBody2D::set_gravity_scale);
- ClassDB::bind_method(D_METHOD("get_gravity_scale"), &RigidBody2D::get_gravity_scale);
+ ClassDB::bind_method(D_METHOD("set_angular_damp", "angular_damp"), &RigidDynamicBody2D::set_angular_damp);
+ ClassDB::bind_method(D_METHOD("get_angular_damp"), &RigidDynamicBody2D::get_angular_damp);
- ClassDB::bind_method(D_METHOD("set_linear_damp", "linear_damp"), &RigidBody2D::set_linear_damp);
- ClassDB::bind_method(D_METHOD("get_linear_damp"), &RigidBody2D::get_linear_damp);
+ ClassDB::bind_method(D_METHOD("set_linear_velocity", "linear_velocity"), &RigidDynamicBody2D::set_linear_velocity);
+ ClassDB::bind_method(D_METHOD("get_linear_velocity"), &RigidDynamicBody2D::get_linear_velocity);
- ClassDB::bind_method(D_METHOD("set_angular_damp", "angular_damp"), &RigidBody2D::set_angular_damp);
- ClassDB::bind_method(D_METHOD("get_angular_damp"), &RigidBody2D::get_angular_damp);
+ ClassDB::bind_method(D_METHOD("set_angular_velocity", "angular_velocity"), &RigidDynamicBody2D::set_angular_velocity);
+ ClassDB::bind_method(D_METHOD("get_angular_velocity"), &RigidDynamicBody2D::get_angular_velocity);
- ClassDB::bind_method(D_METHOD("set_linear_velocity", "linear_velocity"), &RigidBody2D::set_linear_velocity);
- ClassDB::bind_method(D_METHOD("get_linear_velocity"), &RigidBody2D::get_linear_velocity);
+ ClassDB::bind_method(D_METHOD("set_max_contacts_reported", "amount"), &RigidDynamicBody2D::set_max_contacts_reported);
+ ClassDB::bind_method(D_METHOD("get_max_contacts_reported"), &RigidDynamicBody2D::get_max_contacts_reported);
- ClassDB::bind_method(D_METHOD("set_angular_velocity", "angular_velocity"), &RigidBody2D::set_angular_velocity);
- ClassDB::bind_method(D_METHOD("get_angular_velocity"), &RigidBody2D::get_angular_velocity);
+ ClassDB::bind_method(D_METHOD("set_use_custom_integrator", "enable"), &RigidDynamicBody2D::set_use_custom_integrator);
+ ClassDB::bind_method(D_METHOD("is_using_custom_integrator"), &RigidDynamicBody2D::is_using_custom_integrator);
- ClassDB::bind_method(D_METHOD("set_max_contacts_reported", "amount"), &RigidBody2D::set_max_contacts_reported);
- ClassDB::bind_method(D_METHOD("get_max_contacts_reported"), &RigidBody2D::get_max_contacts_reported);
+ ClassDB::bind_method(D_METHOD("set_contact_monitor", "enabled"), &RigidDynamicBody2D::set_contact_monitor);
+ ClassDB::bind_method(D_METHOD("is_contact_monitor_enabled"), &RigidDynamicBody2D::is_contact_monitor_enabled);
- ClassDB::bind_method(D_METHOD("set_use_custom_integrator", "enable"), &RigidBody2D::set_use_custom_integrator);
- ClassDB::bind_method(D_METHOD("is_using_custom_integrator"), &RigidBody2D::is_using_custom_integrator);
+ ClassDB::bind_method(D_METHOD("set_continuous_collision_detection_mode", "mode"), &RigidDynamicBody2D::set_continuous_collision_detection_mode);
+ ClassDB::bind_method(D_METHOD("get_continuous_collision_detection_mode"), &RigidDynamicBody2D::get_continuous_collision_detection_mode);
- ClassDB::bind_method(D_METHOD("set_contact_monitor", "enabled"), &RigidBody2D::set_contact_monitor);
- ClassDB::bind_method(D_METHOD("is_contact_monitor_enabled"), &RigidBody2D::is_contact_monitor_enabled);
+ ClassDB::bind_method(D_METHOD("set_axis_velocity", "axis_velocity"), &RigidDynamicBody2D::set_axis_velocity);
+ ClassDB::bind_method(D_METHOD("apply_central_impulse", "impulse"), &RigidDynamicBody2D::apply_central_impulse, Vector2());
+ ClassDB::bind_method(D_METHOD("apply_impulse", "impulse", "position"), &RigidDynamicBody2D::apply_impulse, Vector2());
+ ClassDB::bind_method(D_METHOD("apply_torque_impulse", "torque"), &RigidDynamicBody2D::apply_torque_impulse);
- ClassDB::bind_method(D_METHOD("set_continuous_collision_detection_mode", "mode"), &RigidBody2D::set_continuous_collision_detection_mode);
- ClassDB::bind_method(D_METHOD("get_continuous_collision_detection_mode"), &RigidBody2D::get_continuous_collision_detection_mode);
+ ClassDB::bind_method(D_METHOD("set_applied_force", "force"), &RigidDynamicBody2D::set_applied_force);
+ ClassDB::bind_method(D_METHOD("get_applied_force"), &RigidDynamicBody2D::get_applied_force);
- ClassDB::bind_method(D_METHOD("set_axis_velocity", "axis_velocity"), &RigidBody2D::set_axis_velocity);
- ClassDB::bind_method(D_METHOD("apply_central_impulse", "impulse"), &RigidBody2D::apply_central_impulse, Vector2());
- ClassDB::bind_method(D_METHOD("apply_impulse", "impulse", "position"), &RigidBody2D::apply_impulse, Vector2());
- ClassDB::bind_method(D_METHOD("apply_torque_impulse", "torque"), &RigidBody2D::apply_torque_impulse);
+ ClassDB::bind_method(D_METHOD("set_applied_torque", "torque"), &RigidDynamicBody2D::set_applied_torque);
+ ClassDB::bind_method(D_METHOD("get_applied_torque"), &RigidDynamicBody2D::get_applied_torque);
- ClassDB::bind_method(D_METHOD("set_applied_force", "force"), &RigidBody2D::set_applied_force);
- ClassDB::bind_method(D_METHOD("get_applied_force"), &RigidBody2D::get_applied_force);
+ ClassDB::bind_method(D_METHOD("add_central_force", "force"), &RigidDynamicBody2D::add_central_force);
+ ClassDB::bind_method(D_METHOD("add_force", "force", "position"), &RigidDynamicBody2D::add_force, Vector2());
+ ClassDB::bind_method(D_METHOD("add_torque", "torque"), &RigidDynamicBody2D::add_torque);
- ClassDB::bind_method(D_METHOD("set_applied_torque", "torque"), &RigidBody2D::set_applied_torque);
- ClassDB::bind_method(D_METHOD("get_applied_torque"), &RigidBody2D::get_applied_torque);
+ ClassDB::bind_method(D_METHOD("set_sleeping", "sleeping"), &RigidDynamicBody2D::set_sleeping);
+ ClassDB::bind_method(D_METHOD("is_sleeping"), &RigidDynamicBody2D::is_sleeping);
- ClassDB::bind_method(D_METHOD("add_central_force", "force"), &RigidBody2D::add_central_force);
- ClassDB::bind_method(D_METHOD("add_force", "force", "position"), &RigidBody2D::add_force, Vector2());
- ClassDB::bind_method(D_METHOD("add_torque", "torque"), &RigidBody2D::add_torque);
+ ClassDB::bind_method(D_METHOD("set_can_sleep", "able_to_sleep"), &RigidDynamicBody2D::set_can_sleep);
+ ClassDB::bind_method(D_METHOD("is_able_to_sleep"), &RigidDynamicBody2D::is_able_to_sleep);
- ClassDB::bind_method(D_METHOD("set_sleeping", "sleeping"), &RigidBody2D::set_sleeping);
- ClassDB::bind_method(D_METHOD("is_sleeping"), &RigidBody2D::is_sleeping);
+ ClassDB::bind_method(D_METHOD("set_lock_rotation_enabled", "lock_rotation"), &RigidDynamicBody2D::set_lock_rotation_enabled);
+ ClassDB::bind_method(D_METHOD("is_lock_rotation_enabled"), &RigidDynamicBody2D::is_lock_rotation_enabled);
- ClassDB::bind_method(D_METHOD("set_can_sleep", "able_to_sleep"), &RigidBody2D::set_can_sleep);
- ClassDB::bind_method(D_METHOD("is_able_to_sleep"), &RigidBody2D::is_able_to_sleep);
+ ClassDB::bind_method(D_METHOD("set_freeze_enabled", "freeze_mode"), &RigidDynamicBody2D::set_freeze_enabled);
+ ClassDB::bind_method(D_METHOD("is_freeze_enabled"), &RigidDynamicBody2D::is_freeze_enabled);
- ClassDB::bind_method(D_METHOD("get_colliding_bodies"), &RigidBody2D::get_colliding_bodies);
+ ClassDB::bind_method(D_METHOD("set_freeze_mode", "freeze_mode"), &RigidDynamicBody2D::set_freeze_mode);
+ ClassDB::bind_method(D_METHOD("get_freeze_mode"), &RigidDynamicBody2D::get_freeze_mode);
- BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectBodyState2D")));
+ ClassDB::bind_method(D_METHOD("get_colliding_bodies"), &RigidDynamicBody2D::get_colliding_bodies);
- ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Dynamic,Static,DynamicLocked,Kinematic"), "set_mode", "get_mode");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,65535,0.01,exp"), "set_mass", "get_mass");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inertia", PROPERTY_HINT_RANGE, "0.01,65535,0.01,exp", PROPERTY_USAGE_NONE), "set_inertia", "get_inertia");
+ GDVIRTUAL_BIND(_integrate_forces, "state");
+
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,1000,0.01,or_greater,exp"), "set_mass", "get_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "inertia", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater,exp"), "set_inertia", "get_inertia");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "center_of_mass_mode", PROPERTY_HINT_ENUM, "Auto,Custom", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_center_of_mass_mode", "get_center_of_mass_mode");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "center_of_mass", PROPERTY_HINT_RANGE, "-10,10,0.01,or_lesser,or_greater"), "set_center_of_mass", "get_center_of_mass");
+ ADD_LINKED_PROPERTY("center_of_mass_mode", "center_of_mass");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "custom_integrator"), "set_use_custom_integrator", "is_using_custom_integrator");
@@ -991,6 +983,9 @@ void RigidBody2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "contact_monitor"), "set_contact_monitor", "is_contact_monitor_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sleeping"), "set_sleeping", "is_sleeping");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "can_sleep"), "set_can_sleep", "is_able_to_sleep");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "lock_rotation"), "set_lock_rotation_enabled", "is_lock_rotation_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "freeze"), "set_freeze_enabled", "is_freeze_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "freeze_mode", PROPERTY_HINT_ENUM, "Static,Kinematic"), "set_freeze_mode", "get_freeze_mode");
ADD_GROUP("Linear", "linear_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "linear_velocity"), "set_linear_velocity", "get_linear_velocity");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
@@ -1007,28 +1002,37 @@ void RigidBody2D::_bind_methods() {
ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
ADD_SIGNAL(MethodInfo("sleeping_state_changed"));
- BIND_ENUM_CONSTANT(MODE_DYNAMIC);
- BIND_ENUM_CONSTANT(MODE_STATIC);
- BIND_ENUM_CONSTANT(MODE_DYNAMIC_LOCKED);
- BIND_ENUM_CONSTANT(MODE_KINEMATIC);
+ BIND_ENUM_CONSTANT(FREEZE_MODE_STATIC);
+ BIND_ENUM_CONSTANT(FREEZE_MODE_KINEMATIC);
+
+ BIND_ENUM_CONSTANT(CENTER_OF_MASS_MODE_AUTO);
+ BIND_ENUM_CONSTANT(CENTER_OF_MASS_MODE_CUSTOM);
BIND_ENUM_CONSTANT(CCD_MODE_DISABLED);
BIND_ENUM_CONSTANT(CCD_MODE_CAST_RAY);
BIND_ENUM_CONSTANT(CCD_MODE_CAST_SHAPE);
}
-RigidBody2D::RigidBody2D() :
+void RigidDynamicBody2D::_validate_property(PropertyInfo &property) const {
+ if (center_of_mass_mode != CENTER_OF_MASS_MODE_CUSTOM) {
+ if (property.name == "center_of_mass") {
+ property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL;
+ }
+ }
+}
+
+RigidDynamicBody2D::RigidDynamicBody2D() :
PhysicsBody2D(PhysicsServer2D::BODY_MODE_DYNAMIC) {
- PhysicsServer2D::get_singleton()->body_set_force_integration_callback(get_rid(), callable_mp(this, &RigidBody2D::_direct_state_changed));
+ PhysicsServer2D::get_singleton()->body_set_state_sync_callback(get_rid(), this, _body_state_changed_callback);
}
-RigidBody2D::~RigidBody2D() {
+RigidDynamicBody2D::~RigidDynamicBody2D() {
if (contact_monitor) {
memdelete(contact_monitor);
}
}
-void RigidBody2D::_reload_physics_characteristics() {
+void RigidDynamicBody2D::_reload_physics_characteristics() {
if (physics_material_override.is_null()) {
PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_BOUNCE, 0);
PhysicsServer2D::get_singleton()->body_set_param(get_rid(), PhysicsServer2D::BODY_PARAM_FRICTION, 1);
@@ -1045,14 +1049,19 @@ void RigidBody2D::_reload_physics_characteristics() {
bool CharacterBody2D::move_and_slide() {
// Hack in order to work with calling from _process as well as from _physics_process; calling from thread is risky.
- float delta = Engine::get_singleton()->is_in_physics_frame() ? get_physics_process_delta_time() : get_process_delta_time();
+ double delta = Engine::get_singleton()->is_in_physics_frame() ? get_physics_process_delta_time() : get_process_delta_time();
Vector2 current_platform_velocity = platform_velocity;
if ((on_floor || on_wall) && platform_rid.is_valid()) {
- bool excluded = (moving_platform_ignore_layers & platform_layer) != 0;
+ bool excluded = false;
+ if (on_floor) {
+ excluded = (moving_platform_floor_layers & platform_layer) == 0;
+ } else if (on_wall) {
+ excluded = (moving_platform_wall_layers & platform_layer) == 0;
+ }
if (!excluded) {
- // This approach makes sure there is less delay between the actual body velocity and the one we saved.
+ //this approach makes sure there is less delay between the actual body velocity and the one we saved
PhysicsDirectBodyState2D *bs = PhysicsServer2D::get_singleton()->body_get_direct_state(platform_rid);
if (bs) {
Transform2D gt = get_global_transform();
@@ -1075,16 +1084,30 @@ bool CharacterBody2D::move_and_slide() {
PhysicsServer2D::MotionResult floor_result;
Set<RID> exclude;
exclude.insert(platform_rid);
- if (move_and_collide(current_platform_velocity * delta, floor_result, margin, false, false, exclude)) {
+ if (move_and_collide(current_platform_velocity * delta, floor_result, margin, false, false, false, exclude)) {
motion_results.push_back(floor_result);
_set_collision_direction(floor_result);
}
}
- Vector2 motion = linear_velocity * delta;
+ if (motion_mode == MOTION_MODE_GROUNDED) {
+ _move_and_slide_grounded(delta, was_on_floor, current_platform_velocity);
+ } else {
+ _move_and_slide_free(delta);
+ }
+
+ if (!on_floor && !on_wall) {
+ // Add last platform velocity when just left a moving platform.
+ linear_velocity += current_platform_velocity;
+ }
+
+ return motion_results.size() > 0;
+}
+
+void CharacterBody2D::_move_and_slide_grounded(double p_delta, bool p_was_on_floor, const Vector2 &p_prev_platform_velocity) {
+ Vector2 motion = linear_velocity * p_delta;
Vector2 motion_slide_up = motion.slide(up_direction);
- Vector2 prev_platform_velocity = current_platform_velocity;
Vector2 prev_floor_normal = floor_normal;
RID prev_platform_rid = platform_rid;
int prev_platform_layer = platform_layer;
@@ -1095,7 +1118,7 @@ bool CharacterBody2D::move_and_slide() {
// No sliding on first attempt to keep floor motion stable when possible,
// When stop on slope is enabled or when there is no up direction.
- bool sliding_enabled = !floor_stop_on_slope || up_direction == Vector2();
+ bool sliding_enabled = !floor_stop_on_slope;
// Constant speed can be applied only the first time sliding is enabled.
bool can_apply_constant_speed = sliding_enabled;
bool first_slide = true;
@@ -1115,9 +1138,7 @@ bool CharacterBody2D::move_and_slide() {
if (on_floor && floor_stop_on_slope && (linear_velocity.normalized() + up_direction).length() < 0.01) {
Transform2D gt = get_global_transform();
- if (result.travel.length() > margin) {
- gt.elements[2] -= result.travel.slide(up_direction);
- } else {
+ if (result.travel.length() <= margin + CMP_EPSILON) {
gt.elements[2] -= result.travel;
}
set_global_transform(gt);
@@ -1134,9 +1155,9 @@ bool CharacterBody2D::move_and_slide() {
// Move on floor only checks.
if (floor_block_on_wall && on_wall && motion_slide_up.dot(result.collision_normal) <= 0) {
// Avoid to move forward on a wall if floor_block_on_wall is true.
- if (was_on_floor && !on_floor && !vel_dir_facing_up) {
+ if (p_was_on_floor && !on_floor && !vel_dir_facing_up) {
// If the movement is large the body can be prevented from reaching the walls.
- if (result.travel.length() <= margin) {
+ if (result.travel.length() <= margin + CMP_EPSILON) {
// Cancels the motion.
Transform2D gt = get_global_transform();
gt.elements[2] -= result.travel;
@@ -1145,8 +1166,7 @@ bool CharacterBody2D::move_and_slide() {
on_floor = true;
platform_rid = prev_platform_rid;
platform_layer = prev_platform_layer;
-
- platform_velocity = prev_platform_velocity;
+ platform_velocity = p_prev_platform_velocity;
floor_normal = prev_floor_normal;
linear_velocity = Vector2();
motion = Vector2();
@@ -1161,7 +1181,7 @@ bool CharacterBody2D::move_and_slide() {
}
}
// Constant Speed when the slope is upward.
- else if (floor_constant_speed && is_on_floor_only() && can_apply_constant_speed && was_on_floor && motion.dot(result.collision_normal) < 0) {
+ else if (floor_constant_speed && is_on_floor_only() && can_apply_constant_speed && p_was_on_floor && motion.dot(result.collision_normal) < 0) {
can_apply_constant_speed = false;
Vector2 motion_slide_norm = result.remainder.slide(result.collision_normal).normalized();
motion = motion_slide_norm * (motion_slide_up.length() - result.travel.slide(up_direction).length() - last_travel.slide(up_direction).length());
@@ -1197,7 +1217,7 @@ bool CharacterBody2D::move_and_slide() {
}
// When you move forward in a downward slope you don’t collide because you will be in the air.
// This test ensures that constant speed is applied, only if the player is still on the ground after the snap is applied.
- else if (floor_constant_speed && first_slide && _on_floor_if_snapped(was_on_floor, vel_dir_facing_up)) {
+ else if (floor_constant_speed && first_slide && _on_floor_if_snapped(p_was_on_floor, vel_dir_facing_up)) {
can_apply_constant_speed = false;
sliding_enabled = true;
Transform2D gt = get_global_transform();
@@ -1218,34 +1238,68 @@ bool CharacterBody2D::move_and_slide() {
}
}
- _snap_on_floor(was_on_floor, vel_dir_facing_up);
-
- if (!on_floor && !on_wall) {
- // Add last platform velocity when just left a moving platform.
- linear_velocity += current_platform_velocity;
- }
+ _snap_on_floor(p_was_on_floor, vel_dir_facing_up);
// Reset the gravity accumulation when touching the ground.
if (on_floor && !vel_dir_facing_up) {
linear_velocity = linear_velocity.slide(up_direction);
}
+}
- return motion_results.size() > 0;
+void CharacterBody2D::_move_and_slide_free(double p_delta) {
+ Vector2 motion = linear_velocity * p_delta;
+
+ platform_rid = RID();
+ floor_normal = Vector2();
+ platform_velocity = Vector2();
+
+ bool first_slide = true;
+ for (int iteration = 0; iteration < max_slides; ++iteration) {
+ PhysicsServer2D::MotionResult result;
+
+ bool collided = move_and_collide(motion, result, margin, false, false);
+
+ if (collided) {
+ motion_results.push_back(result);
+ _set_collision_direction(result);
+
+ if (free_mode_min_slide_angle != 0 && result.get_angle(-linear_velocity.normalized()) < free_mode_min_slide_angle + FLOOR_ANGLE_THRESHOLD) {
+ motion = Vector2();
+ } else if (first_slide) {
+ Vector2 motion_slide_norm = result.remainder.slide(result.collision_normal).normalized();
+ motion = motion_slide_norm * (motion.length() - result.travel.length());
+ } else {
+ motion = result.remainder.slide(result.collision_normal);
+ }
+
+ if (motion.dot(linear_velocity) <= 0.0) {
+ motion = Vector2();
+ }
+ }
+
+ first_slide = false;
+
+ if (!collided || motion.is_equal_approx(Vector2())) {
+ break;
+ }
+ }
}
void CharacterBody2D::_snap_on_floor(bool was_on_floor, bool vel_dir_facing_up) {
- if (Math::is_equal_approx(floor_snap_length, 0) || up_direction == Vector2() || on_floor || !was_on_floor || vel_dir_facing_up) {
+ if (on_floor || !was_on_floor || vel_dir_facing_up) {
return;
}
+ // Snap by at least collision margin to keep floor state consistent.
+ real_t length = MAX(floor_snap_length, margin);
+
Transform2D gt = get_global_transform();
PhysicsServer2D::MotionResult result;
- if (move_and_collide(up_direction * -floor_snap_length, result, margin, true, false)) {
+ if (move_and_collide(-up_direction * length, result, margin, true, false, true)) {
bool apply = true;
if (result.get_angle(up_direction) <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) {
on_floor = true;
floor_normal = result.collision_normal;
- platform_velocity = result.collider_velocity;
_set_platform_data(result);
if (floor_stop_on_slope) {
@@ -1269,12 +1323,15 @@ void CharacterBody2D::_snap_on_floor(bool was_on_floor, bool vel_dir_facing_up)
}
bool CharacterBody2D::_on_floor_if_snapped(bool was_on_floor, bool vel_dir_facing_up) {
- if (Math::is_equal_approx(floor_snap_length, 0) || up_direction == Vector2() || on_floor || !was_on_floor || vel_dir_facing_up) {
+ if (up_direction == Vector2() || on_floor || !was_on_floor || vel_dir_facing_up) {
return false;
}
+ // Snap by at least collision margin to keep floor state consistent.
+ real_t length = MAX(floor_snap_length, margin);
+
PhysicsServer2D::MotionResult result;
- if (move_and_collide(up_direction * -floor_snap_length, result, margin, true, false)) {
+ if (move_and_collide(-up_direction * length, result, margin, true, false, true)) {
if (result.get_angle(up_direction) <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) {
return true;
}
@@ -1284,31 +1341,25 @@ bool CharacterBody2D::_on_floor_if_snapped(bool was_on_floor, bool vel_dir_facin
}
void CharacterBody2D::_set_collision_direction(const PhysicsServer2D::MotionResult &p_result) {
- if (up_direction == Vector2()) {
- return;
- }
-
- if (p_result.get_angle(up_direction) <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) { //floor
+ if (motion_mode == MOTION_MODE_GROUNDED && p_result.get_angle(up_direction) <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) { //floor
on_floor = true;
floor_normal = p_result.collision_normal;
- platform_velocity = p_result.collider_velocity;
_set_platform_data(p_result);
- } else if (p_result.get_angle(-up_direction) <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) { //ceiling
+ } else if (motion_mode == MOTION_MODE_GROUNDED && p_result.get_angle(-up_direction) <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) { //ceiling
on_ceiling = true;
} else {
on_wall = true;
- platform_velocity = p_result.collider_velocity;
- _set_platform_data(p_result);
+ // Don't apply wall velocity when the collider is a CharacterBody2D.
+ if (Object::cast_to<CharacterBody2D>(ObjectDB::get_instance(p_result.collider_id)) == nullptr) {
+ _set_platform_data(p_result);
+ }
}
}
void CharacterBody2D::_set_platform_data(const PhysicsServer2D::MotionResult &p_result) {
platform_rid = p_result.collider;
- platform_layer = 0;
- CollisionObject2D *collision_object = Object::cast_to<CollisionObject2D>(ObjectDB::get_instance(p_result.collider_id));
- if (collision_object) {
- platform_layer = collision_object->get_collision_layer();
- }
+ platform_velocity = p_result.collider_velocity;
+ platform_layer = PhysicsServer2D::get_singleton()->body_get_collision_layer(platform_rid);
}
const Vector2 &CharacterBody2D::get_linear_velocity() const {
@@ -1371,7 +1422,8 @@ Ref<KinematicCollision2D> CharacterBody2D::_get_slide_collision(int p_bounce) {
slide_colliders.resize(p_bounce + 1);
}
- if (slide_colliders[p_bounce].is_null()) {
+ // Create a new instance when the cached reference is invalid or still in use in script.
+ if (slide_colliders[p_bounce].is_null() || slide_colliders[p_bounce]->reference_get_count() > 1) {
slide_colliders.write[p_bounce].instantiate();
slide_colliders.write[p_bounce]->owner = this;
}
@@ -1427,12 +1479,28 @@ void CharacterBody2D::set_slide_on_ceiling_enabled(bool p_enabled) {
slide_on_ceiling = p_enabled;
}
-uint32_t CharacterBody2D::get_moving_platform_ignore_layers() const {
- return moving_platform_ignore_layers;
+uint32_t CharacterBody2D::get_moving_platform_floor_layers() const {
+ return moving_platform_floor_layers;
+}
+
+void CharacterBody2D::set_moving_platform_floor_layers(uint32_t p_exclude_layers) {
+ moving_platform_floor_layers = p_exclude_layers;
+}
+
+uint32_t CharacterBody2D::get_moving_platform_wall_layers() const {
+ return moving_platform_wall_layers;
+}
+
+void CharacterBody2D::set_moving_platform_wall_layers(uint32_t p_exclude_layers) {
+ moving_platform_wall_layers = p_exclude_layers;
+}
+
+void CharacterBody2D::set_motion_mode(MotionMode p_mode) {
+ motion_mode = p_mode;
}
-void CharacterBody2D::set_moving_platform_ignore_layers(uint32_t p_exclude_layers) {
- moving_platform_ignore_layers = p_exclude_layers;
+CharacterBody2D::MotionMode CharacterBody2D::get_motion_mode() const {
+ return motion_mode;
}
int CharacterBody2D::get_max_slides() const {
@@ -1461,11 +1529,20 @@ void CharacterBody2D::set_floor_snap_length(real_t p_floor_snap_length) {
floor_snap_length = p_floor_snap_length;
}
+real_t CharacterBody2D::get_free_mode_min_slide_angle() const {
+ return free_mode_min_slide_angle;
+}
+
+void CharacterBody2D::set_free_mode_min_slide_angle(real_t p_radians) {
+ free_mode_min_slide_angle = p_radians;
+}
+
const Vector2 &CharacterBody2D::get_up_direction() const {
return up_direction;
}
void CharacterBody2D::set_up_direction(const Vector2 &p_up_direction) {
+ ERR_FAIL_COND_MSG(p_up_direction == Vector2(), "up_direction can't be equal to Vector2.ZERO, consider using Free motion mode instead.");
up_direction = p_up_direction.normalized();
}
@@ -1500,8 +1577,10 @@ void CharacterBody2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_slide_on_ceiling_enabled", "enabled"), &CharacterBody2D::set_slide_on_ceiling_enabled);
ClassDB::bind_method(D_METHOD("is_slide_on_ceiling_enabled"), &CharacterBody2D::is_slide_on_ceiling_enabled);
- ClassDB::bind_method(D_METHOD("set_moving_platform_ignore_layers", "exclude_layer"), &CharacterBody2D::set_moving_platform_ignore_layers);
- ClassDB::bind_method(D_METHOD("get_moving_platform_ignore_layers"), &CharacterBody2D::get_moving_platform_ignore_layers);
+ ClassDB::bind_method(D_METHOD("set_moving_platform_floor_layers", "exclude_layer"), &CharacterBody2D::set_moving_platform_floor_layers);
+ ClassDB::bind_method(D_METHOD("get_moving_platform_floor_layers"), &CharacterBody2D::get_moving_platform_floor_layers);
+ ClassDB::bind_method(D_METHOD("set_moving_platform_wall_layers", "exclude_layer"), &CharacterBody2D::set_moving_platform_wall_layers);
+ ClassDB::bind_method(D_METHOD("get_moving_platform_wall_layers"), &CharacterBody2D::get_moving_platform_wall_layers);
ClassDB::bind_method(D_METHOD("get_max_slides"), &CharacterBody2D::get_max_slides);
ClassDB::bind_method(D_METHOD("set_max_slides", "max_slides"), &CharacterBody2D::set_max_slides);
@@ -1509,8 +1588,12 @@ void CharacterBody2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_floor_max_angle", "radians"), &CharacterBody2D::set_floor_max_angle);
ClassDB::bind_method(D_METHOD("get_floor_snap_length"), &CharacterBody2D::get_floor_snap_length);
ClassDB::bind_method(D_METHOD("set_floor_snap_length", "floor_snap_length"), &CharacterBody2D::set_floor_snap_length);
+ ClassDB::bind_method(D_METHOD("get_free_mode_min_slide_angle"), &CharacterBody2D::get_free_mode_min_slide_angle);
+ ClassDB::bind_method(D_METHOD("set_free_mode_min_slide_angle", "radians"), &CharacterBody2D::set_free_mode_min_slide_angle);
ClassDB::bind_method(D_METHOD("get_up_direction"), &CharacterBody2D::get_up_direction);
ClassDB::bind_method(D_METHOD("set_up_direction", "up_direction"), &CharacterBody2D::set_up_direction);
+ ClassDB::bind_method(D_METHOD("set_motion_mode", "mode"), &CharacterBody2D::set_motion_mode);
+ ClassDB::bind_method(D_METHOD("get_motion_mode"), &CharacterBody2D::get_motion_mode);
ClassDB::bind_method(D_METHOD("is_on_floor"), &CharacterBody2D::is_on_floor);
ClassDB::bind_method(D_METHOD("is_on_floor_only"), &CharacterBody2D::is_on_floor_only);
@@ -1525,19 +1608,38 @@ void CharacterBody2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_slide_collision", "slide_idx"), &CharacterBody2D::_get_slide_collision);
ClassDB::bind_method(D_METHOD("get_last_slide_collision"), &CharacterBody2D::_get_last_slide_collision);
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "motion_mode", PROPERTY_HINT_ENUM, "Grounded,Free", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_motion_mode", "get_motion_mode");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "linear_velocity"), "set_linear_velocity", "get_linear_velocity");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slide_on_ceiling"), "set_slide_on_ceiling_enabled", "is_slide_on_ceiling_enabled");
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_slides", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_max_slides", "get_max_slides");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "up_direction"), "set_up_direction", "get_up_direction");
+ ADD_GROUP("Free Mode", "free_mode_");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "free_mode_min_slide_angle", PROPERTY_HINT_RANGE, "0,180,0.1,radians", PROPERTY_USAGE_DEFAULT), "set_free_mode_min_slide_angle", "get_free_mode_min_slide_angle");
ADD_GROUP("Floor", "floor_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "floor_stop_on_slope"), "set_floor_stop_on_slope_enabled", "is_floor_stop_on_slope_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "floor_constant_speed"), "set_floor_constant_speed_enabled", "is_floor_constant_speed_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "floor_block_on_wall"), "set_floor_block_on_wall_enabled", "is_floor_block_on_wall_enabled");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "floor_max_angle", PROPERTY_HINT_RANGE, "0,180,0.1,radians"), "set_floor_max_angle", "get_floor_max_angle");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "floor_snap_length", PROPERTY_HINT_RANGE, "0,1000,0.1"), "set_floor_snap_length", "get_floor_snap_length");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "floor_snap_length", PROPERTY_HINT_RANGE, "0,32,0.1,or_greater"), "set_floor_snap_length", "get_floor_snap_length");
ADD_GROUP("Moving platform", "moving_platform");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "moving_platform_ignore_layers", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_moving_platform_ignore_layers", "get_moving_platform_ignore_layers");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "moving_platform_floor_layers", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_moving_platform_floor_layers", "get_moving_platform_floor_layers");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "moving_platform_wall_layers", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_moving_platform_wall_layers", "get_moving_platform_wall_layers");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin");
+
+ BIND_ENUM_CONSTANT(MOTION_MODE_GROUNDED);
+ BIND_ENUM_CONSTANT(MOTION_MODE_FREE);
+}
+
+void CharacterBody2D::_validate_property(PropertyInfo &property) const {
+ if (motion_mode == MOTION_MODE_FREE) {
+ if (property.name.begins_with("floor_") || property.name == "up_direction" || property.name == "slide_on_ceiling") {
+ property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL;
+ }
+ } else {
+ if (property.name == "free_mode_min_slide_angle") {
+ property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL;
+ }
+ }
}
CharacterBody2D::CharacterBody2D() :
diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h
index 81c5067146..e789ac4cb7 100644
--- a/scene/2d/physics_body_2d.h
+++ b/scene/2d/physics_body_2d.h
@@ -50,7 +50,7 @@ protected:
Ref<KinematicCollision2D> _move(const Vector2 &p_motion, bool p_test_only = false, real_t p_margin = 0.08);
public:
- bool move_and_collide(const Vector2 &p_motion, PhysicsServer2D::MotionResult &r_result, real_t p_margin, bool p_test_only = false, bool p_cancel_sliding = true, const Set<RID> &p_exclude = Set<RID>());
+ bool move_and_collide(const Vector2 &p_motion, PhysicsServer2D::MotionResult &r_result, real_t p_margin, bool p_test_only = false, bool p_cancel_sliding = true, bool p_collide_separation_ray = false, const Set<RID> &p_exclude = Set<RID>());
bool test_move(const Transform2D &p_from, const Vector2 &p_motion, const Ref<KinematicCollision2D> &r_collision = Ref<KinematicCollision2D>(), real_t p_margin = 0.08);
TypedArray<PhysicsBody2D> get_collision_exceptions();
@@ -63,20 +63,13 @@ public:
class StaticBody2D : public PhysicsBody2D {
GDCLASS(StaticBody2D, PhysicsBody2D);
+private:
Vector2 constant_linear_velocity;
real_t constant_angular_velocity = 0.0;
Ref<PhysicsMaterial> physics_material_override;
- bool kinematic_motion = false;
- bool sync_to_physics = false;
-
- Transform2D last_valid_transform;
-
- void _direct_state_changed(Object *p_state);
-
protected:
- void _notification(int p_what);
static void _bind_methods();
public:
@@ -89,31 +82,49 @@ public:
Vector2 get_constant_linear_velocity() const;
real_t get_constant_angular_velocity() const;
- virtual TypedArray<String> get_configuration_warnings() const override;
-
- StaticBody2D();
+ StaticBody2D(PhysicsServer2D::BodyMode p_mode = PhysicsServer2D::BODY_MODE_STATIC);
private:
void _reload_physics_characteristics();
+};
- void _update_kinematic_motion();
+class AnimatableBody2D : public StaticBody2D {
+ GDCLASS(AnimatableBody2D, StaticBody2D);
+
+private:
+ bool sync_to_physics = true;
+
+ Transform2D last_valid_transform;
+
+ static void _body_state_changed_callback(void *p_instance, PhysicsDirectBodyState2D *p_state);
+ void _body_state_changed(PhysicsDirectBodyState2D *p_state);
+
+protected:
+ void _notification(int p_what);
+ static void _bind_methods();
+
+public:
+ AnimatableBody2D();
- void set_kinematic_motion_enabled(bool p_enabled);
- bool is_kinematic_motion_enabled() const;
+private:
+ void _update_kinematic_motion();
void set_sync_to_physics(bool p_enable);
bool is_sync_to_physics_enabled() const;
};
-class RigidBody2D : public PhysicsBody2D {
- GDCLASS(RigidBody2D, PhysicsBody2D);
+class RigidDynamicBody2D : public PhysicsBody2D {
+ GDCLASS(RigidDynamicBody2D, PhysicsBody2D);
public:
- enum Mode {
- MODE_DYNAMIC,
- MODE_STATIC,
- MODE_DYNAMIC_LOCKED,
- MODE_KINEMATIC,
+ enum FreezeMode {
+ FREEZE_MODE_STATIC,
+ FREEZE_MODE_KINEMATIC,
+ };
+
+ enum CenterOfMassMode {
+ CENTER_OF_MASS_MODE_AUTO,
+ CENTER_OF_MASS_MODE_CUSTOM,
};
enum CCDMode {
@@ -124,10 +135,15 @@ public:
private:
bool can_sleep = true;
- PhysicsDirectBodyState2D *state = nullptr;
- Mode mode = MODE_DYNAMIC;
+ bool lock_rotation = false;
+ bool freeze = false;
+ FreezeMode freeze_mode = FREEZE_MODE_STATIC;
real_t mass = 1.0;
+ real_t inertia = 0.0;
+ CenterOfMassMode center_of_mass_mode = CENTER_OF_MASS_MODE_AUTO;
+ Vector2 center_of_mass;
+
Ref<PhysicsMaterial> physics_material_override;
real_t gravity_scale = 1.0;
real_t linear_damp = -1.0;
@@ -161,7 +177,7 @@ private:
local_shape = p_ls;
}
};
- struct RigidBody2D_RemoveAction {
+ struct RigidDynamicBody2D_RemoveAction {
RID rid;
ObjectID body_id;
ShapePair pair;
@@ -183,15 +199,29 @@ private:
void _body_exit_tree(ObjectID p_id);
void _body_inout(int p_status, const RID &p_body, ObjectID p_instance, int p_body_shape, int p_local_shape);
- void _direct_state_changed(Object *p_state);
+
+ static void _body_state_changed_callback(void *p_instance, PhysicsDirectBodyState2D *p_state);
+ void _body_state_changed(PhysicsDirectBodyState2D *p_state);
protected:
void _notification(int p_what);
static void _bind_methods();
+ virtual void _validate_property(PropertyInfo &property) const override;
+
+ GDVIRTUAL1(_integrate_forces, PhysicsDirectBodyState2D *)
+
+ void _apply_body_mode();
+
public:
- void set_mode(Mode p_mode);
- Mode get_mode() const;
+ void set_lock_rotation_enabled(bool p_lock_rotation);
+ bool is_lock_rotation_enabled() const;
+
+ void set_freeze_enabled(bool p_freeze);
+ bool is_freeze_enabled() const;
+
+ void set_freeze_mode(FreezeMode p_freeze_mode);
+ FreezeMode get_freeze_mode() const;
void set_mass(real_t p_mass);
real_t get_mass() const;
@@ -199,6 +229,12 @@ public:
void set_inertia(real_t p_inertia);
real_t get_inertia() const;
+ void set_center_of_mass_mode(CenterOfMassMode p_mode);
+ CenterOfMassMode get_center_of_mass_mode() const;
+
+ void set_center_of_mass(const Vector2 &p_center_of_mass);
+ const Vector2 &get_center_of_mass() const;
+
void set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override);
Ref<PhysicsMaterial> get_physics_material_override() const;
@@ -255,32 +291,62 @@ public:
virtual TypedArray<String> get_configuration_warnings() const override;
- RigidBody2D();
- ~RigidBody2D();
+ RigidDynamicBody2D();
+ ~RigidDynamicBody2D();
private:
void _reload_physics_characteristics();
};
-VARIANT_ENUM_CAST(RigidBody2D::Mode);
-VARIANT_ENUM_CAST(RigidBody2D::CCDMode);
+VARIANT_ENUM_CAST(RigidDynamicBody2D::FreezeMode);
+VARIANT_ENUM_CAST(RigidDynamicBody2D::CenterOfMassMode);
+VARIANT_ENUM_CAST(RigidDynamicBody2D::CCDMode);
class CharacterBody2D : public PhysicsBody2D {
GDCLASS(CharacterBody2D, PhysicsBody2D);
+public:
+ enum MotionMode {
+ MOTION_MODE_GROUNDED,
+ MOTION_MODE_FREE,
+ };
+ bool move_and_slide();
+
+ const Vector2 &get_linear_velocity() const;
+ void set_linear_velocity(const Vector2 &p_velocity);
+
+ bool is_on_floor() const;
+ bool is_on_floor_only() const;
+ bool is_on_wall() const;
+ bool is_on_wall_only() const;
+ bool is_on_ceiling() const;
+ bool is_on_ceiling_only() const;
+ Vector2 get_floor_normal() const;
+ real_t get_floor_angle(const Vector2 &p_up_direction = Vector2(0.0, -1.0)) const;
+ Vector2 get_platform_velocity() const;
+
+ int get_slide_collision_count() const;
+ PhysicsServer2D::MotionResult get_slide_collision(int p_bounce) const;
+
+ CharacterBody2D();
+ ~CharacterBody2D();
+
private:
real_t margin = 0.08;
+ MotionMode motion_mode = MOTION_MODE_GROUNDED;
- bool floor_stop_on_slope = false;
bool floor_constant_speed = false;
+ bool floor_stop_on_slope = true;
bool floor_block_on_wall = true;
bool slide_on_ceiling = true;
int max_slides = 4;
int platform_layer;
real_t floor_max_angle = Math::deg2rad((real_t)45.0);
- float floor_snap_length = 0;
+ real_t floor_snap_length = 1;
+ real_t free_mode_min_slide_angle = Math::deg2rad((real_t)15.0);
Vector2 up_direction = Vector2(0.0, -1.0);
- uint32_t moving_platform_ignore_layers = 0;
+ uint32_t moving_platform_floor_layers = UINT32_MAX;
+ uint32_t moving_platform_wall_layers = 0;
Vector2 linear_velocity;
Vector2 floor_normal;
@@ -317,8 +383,20 @@ private:
real_t get_floor_snap_length();
void set_floor_snap_length(real_t p_floor_snap_length);
- uint32_t get_moving_platform_ignore_layers() const;
- void set_moving_platform_ignore_layers(const uint32_t p_exclude_layer);
+ real_t get_free_mode_min_slide_angle() const;
+ void set_free_mode_min_slide_angle(real_t p_radians);
+
+ uint32_t get_moving_platform_floor_layers() const;
+ void set_moving_platform_floor_layers(const uint32_t p_exclude_layer);
+
+ uint32_t get_moving_platform_wall_layers() const;
+ void set_moving_platform_wall_layers(const uint32_t p_exclude_layer);
+
+ void set_motion_mode(MotionMode p_mode);
+ MotionMode get_motion_mode() const;
+
+ void _move_and_slide_free(double p_delta);
+ void _move_and_slide_grounded(double p_delta, bool p_was_on_floor, const Vector2 &p_prev_platform_velocity);
Ref<KinematicCollision2D> _get_slide_collision(int p_bounce);
Ref<KinematicCollision2D> _get_last_slide_collision();
@@ -332,30 +410,11 @@ private:
protected:
void _notification(int p_what);
static void _bind_methods();
-
-public:
- bool move_and_slide();
-
- const Vector2 &get_linear_velocity() const;
- void set_linear_velocity(const Vector2 &p_velocity);
-
- bool is_on_floor() const;
- bool is_on_floor_only() const;
- bool is_on_wall() const;
- bool is_on_wall_only() const;
- bool is_on_ceiling() const;
- bool is_on_ceiling_only() const;
- Vector2 get_floor_normal() const;
- real_t get_floor_angle(const Vector2 &p_up_direction = Vector2(0.0, -1.0)) const;
- Vector2 get_platform_velocity() const;
-
- int get_slide_collision_count() const;
- PhysicsServer2D::MotionResult get_slide_collision(int p_bounce) const;
-
- CharacterBody2D();
- ~CharacterBody2D();
+ virtual void _validate_property(PropertyInfo &property) const override;
};
+VARIANT_ENUM_CAST(CharacterBody2D::MotionMode);
+
class KinematicCollision2D : public RefCounted {
GDCLASS(KinematicCollision2D, RefCounted);
diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp
index 4bbbc3575d..63a0fb9b89 100644
--- a/scene/2d/skeleton_2d.cpp
+++ b/scene/2d/skeleton_2d.cpp
@@ -456,7 +456,7 @@ void Bone2D::calculate_length_and_rotation() {
if (child) {
Vector2 child_local_pos = to_local(child->get_global_position());
length = child_local_pos.length();
- bone_angle = Math::atan2(child_local_pos.normalized().y, child_local_pos.normalized().x);
+ bone_angle = child_local_pos.normalized().angle();
calculated = true;
break;
}
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 74eb3f2fc2..78d018ac53 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -236,6 +236,8 @@ Vector2i TileMap::transform_coords_layout(Vector2i p_coords, TileSet::TileOffset
}
int TileMap::get_effective_quadrant_size(int p_layer) const {
+ ERR_FAIL_INDEX_V(p_layer, (int)layers.size(), 1);
+
// When using YSort, the quadrant size is reduced to 1 to have one CanvasItem per quadrant
if (is_y_sort_enabled() && layers[p_layer].y_sort_enabled) {
return 1;
@@ -259,6 +261,7 @@ void TileMap::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
pending_update = true;
+ _clear_internals();
_recreate_internals();
} break;
case NOTIFICATION_EXIT_TREE: {
@@ -296,6 +299,7 @@ void TileMap::set_tileset(const Ref<TileSet> &p_tileset) {
if (tile_set.is_valid()) {
tile_set->connect("changed", callable_mp(this, &TileMap::_tile_set_changed));
+ _clear_internals();
_recreate_internals();
}
@@ -306,6 +310,7 @@ void TileMap::set_quadrant_size(int p_size) {
ERR_FAIL_COND_MSG(p_size < 1, "TileMapQuadrant size cannot be smaller than 1.");
quadrant_size = p_size;
+ _clear_internals();
_recreate_internals();
emit_signal(SNAME("changed"));
}
@@ -314,16 +319,44 @@ int TileMap::get_quadrant_size() const {
return quadrant_size;
}
-void TileMap::set_layers_count(int p_layers_count) {
- ERR_FAIL_COND(p_layers_count < 0);
+int TileMap::get_layers_count() const {
+ return layers.size();
+}
+
+void TileMap::add_layer(int p_to_pos) {
+ if (p_to_pos < 0) {
+ p_to_pos = layers.size();
+ }
+
+ ERR_FAIL_INDEX(p_to_pos, (int)layers.size() + 1);
+
+ // Must clear before adding the layer.
+ _clear_internals();
+
+ layers.insert(p_to_pos, TileMapLayer());
+ _recreate_internals();
+ notify_property_list_changed();
+
+ emit_signal(SNAME("changed"));
+
+ update_configuration_warnings();
+}
+
+void TileMap::move_layer(int p_layer, int p_to_pos) {
+ ERR_FAIL_INDEX(p_layer, (int)layers.size());
+ ERR_FAIL_INDEX(p_to_pos, (int)layers.size() + 1);
+
+ // Clear before shuffling layers.
_clear_internals();
- layers.resize(p_layers_count);
+ TileMapLayer tl = layers[p_layer];
+ layers.insert(p_to_pos, tl);
+ layers.remove(p_to_pos < p_layer ? p_layer + 1 : p_layer);
_recreate_internals();
notify_property_list_changed();
- if (selected_layer >= p_layers_count) {
- selected_layer = -1;
+ if (selected_layer == p_layer) {
+ selected_layer = p_to_pos < p_layer ? p_to_pos - 1 : p_to_pos;
}
emit_signal(SNAME("changed"));
@@ -331,8 +364,23 @@ void TileMap::set_layers_count(int p_layers_count) {
update_configuration_warnings();
}
-int TileMap::get_layers_count() const {
- return layers.size();
+void TileMap::remove_layer(int p_layer) {
+ ERR_FAIL_INDEX(p_layer, (int)layers.size());
+
+ // Clear before removing the layer.
+ _clear_internals();
+
+ layers.remove(p_layer);
+ _recreate_internals();
+ notify_property_list_changed();
+
+ if (selected_layer >= p_layer) {
+ selected_layer -= 1;
+ }
+
+ emit_signal(SNAME("changed"));
+
+ update_configuration_warnings();
}
void TileMap::set_layer_name(int p_layer, String p_name) {
@@ -349,6 +397,7 @@ String TileMap::get_layer_name(int p_layer) const {
void TileMap::set_layer_enabled(int p_layer, bool p_enabled) {
ERR_FAIL_INDEX(p_layer, (int)layers.size());
layers[p_layer].enabled = p_enabled;
+ _clear_internals();
_recreate_internals();
emit_signal(SNAME("changed"));
@@ -363,6 +412,7 @@ bool TileMap::is_layer_enabled(int p_layer) const {
void TileMap::set_layer_y_sort_enabled(int p_layer, bool p_y_sort_enabled) {
ERR_FAIL_INDEX(p_layer, (int)layers.size());
layers[p_layer].y_sort_enabled = p_y_sort_enabled;
+ _clear_internals();
_recreate_internals();
emit_signal(SNAME("changed"));
@@ -377,6 +427,7 @@ bool TileMap::is_layer_y_sort_enabled(int p_layer) const {
void TileMap::set_layer_y_sort_origin(int p_layer, int p_y_sort_origin) {
ERR_FAIL_INDEX(p_layer, (int)layers.size());
layers[p_layer].y_sort_origin = p_y_sort_origin;
+ _clear_internals();
_recreate_internals();
emit_signal(SNAME("changed"));
}
@@ -389,6 +440,7 @@ int TileMap::get_layer_y_sort_origin(int p_layer) const {
void TileMap::set_layer_z_index(int p_layer, int p_z_index) {
ERR_FAIL_INDEX(p_layer, (int)layers.size());
layers[p_layer].z_index = p_z_index;
+ _clear_internals();
_recreate_internals();
emit_signal(SNAME("changed"));
@@ -400,8 +452,22 @@ int TileMap::get_layer_z_index(int p_layer) const {
return layers[p_layer].z_index;
}
+void TileMap::set_collision_animatable(bool p_enabled) {
+ collision_animatable = p_enabled;
+ _clear_internals();
+ set_notify_local_transform(p_enabled);
+ set_physics_process_internal(p_enabled);
+ _recreate_internals();
+ emit_signal(SNAME("changed"));
+}
+
+bool TileMap::is_collision_animatable() const {
+ return collision_animatable;
+}
+
void TileMap::set_collision_visibility_mode(TileMap::VisibilityMode p_show_collision) {
collision_visibility_mode = p_show_collision;
+ _clear_internals();
_recreate_internals();
emit_signal(SNAME("changed"));
}
@@ -412,6 +478,7 @@ TileMap::VisibilityMode TileMap::get_collision_visibility_mode() {
void TileMap::set_navigation_visibility_mode(TileMap::VisibilityMode p_show_navigation) {
navigation_visibility_mode = p_show_navigation;
+ _clear_internals();
_recreate_internals();
emit_signal(SNAME("changed"));
}
@@ -422,6 +489,7 @@ TileMap::VisibilityMode TileMap::get_navigation_visibility_mode() {
void TileMap::set_y_sort_enabled(bool p_enable) {
Node2D::set_y_sort_enabled(p_enable);
+ _clear_internals();
_recreate_internals();
emit_signal(SNAME("changed"));
}
@@ -453,7 +521,6 @@ Map<Vector2i, TileMapQuadrant>::Element *TileMap::_create_quadrant(int p_layer,
// Call the create_quadrant method on plugins
if (tile_set.is_valid()) {
_rendering_create_quadrant(&q);
- _physics_create_quadrant(&q);
}
return layers[p_layer].quadrant_map.insert(p_qk, q);
@@ -542,10 +609,10 @@ void TileMap::_update_dirty_quadrants() {
}
void TileMap::_recreate_internals() {
- // Clear all internals.
- _clear_internals();
-
for (unsigned int layer = 0; layer < layers.size(); layer++) {
+ // Make sure that _clear_internals() was called prior.
+ ERR_FAIL_COND_MSG(layers[layer].quadrant_map.size() > 0, "TileMap layer " + itos(layer) + " had a non-empty quadrant map.");
+
if (!layers[layer].enabled) {
continue;
}
@@ -781,8 +848,8 @@ void TileMap::_rendering_update_dirty_quadrants(SelfList<TileMapQuadrant>::List
if (atlas_source) {
// Get the tile data.
TileData *tile_data = Object::cast_to<TileData>(atlas_source->get_tile_data(c.get_atlas_coords(), c.alternative_tile));
- Ref<ShaderMaterial> mat = tile_data->tile_get_material();
- int z_index = layers[q.layer].z_index + tile_data->get_z_index();
+ Ref<ShaderMaterial> mat = tile_data->get_material();
+ int z_index = tile_data->get_z_index();
// Quandrant pos.
Vector2 position = map_to_world(q.coords * get_effective_quadrant_size(q.layer));
@@ -836,7 +903,7 @@ void TileMap::_rendering_update_dirty_quadrants(SelfList<TileMapQuadrant>::List
modulate.a *= 0.3;
}
}
- draw_tile(canvas_item, E_cell->key() - position, tile_set, c.source_id, c.get_atlas_coords(), c.alternative_tile, modulate);
+ draw_tile(canvas_item, E_cell->key() - position, tile_set, c.source_id, c.get_atlas_coords(), c.alternative_tile, -1, modulate);
// --- Occluders ---
for (int i = 0; i < tile_set->get_occlusion_layers_count(); i++) {
@@ -953,15 +1020,19 @@ void TileMap::_rendering_draw_quadrant_debug(TileMapQuadrant *p_quadrant) {
}
}
-void TileMap::draw_tile(RID p_canvas_item, Vector2i p_position, const Ref<TileSet> p_tile_set, int p_atlas_source_id, Vector2i p_atlas_coords, int p_alternative_tile, Color p_modulation) {
+void TileMap::draw_tile(RID p_canvas_item, Vector2i p_position, const Ref<TileSet> p_tile_set, int p_atlas_source_id, Vector2i p_atlas_coords, int p_alternative_tile, int p_frame, Color p_modulation) {
ERR_FAIL_COND(!p_tile_set.is_valid());
ERR_FAIL_COND(!p_tile_set->has_source(p_atlas_source_id));
ERR_FAIL_COND(!p_tile_set->get_source(p_atlas_source_id)->has_tile(p_atlas_coords));
ERR_FAIL_COND(!p_tile_set->get_source(p_atlas_source_id)->has_alternative_tile(p_atlas_coords, p_alternative_tile));
-
TileSetSource *source = *p_tile_set->get_source(p_atlas_source_id);
TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source);
if (atlas_source) {
+ // Check for the frame.
+ if (p_frame >= 0) {
+ ERR_FAIL_INDEX(p_frame, atlas_source->get_tile_animation_frames_count(p_atlas_coords));
+ }
+
// Get the texture.
Ref<Texture2D> tex = atlas_source->get_texture();
if (!tex.is_valid()) {
@@ -977,13 +1048,15 @@ void TileMap::draw_tile(RID p_canvas_item, Vector2i p_position, const Ref<TileSe
// Get tile data.
TileData *tile_data = Object::cast_to<TileData>(atlas_source->get_tile_data(p_atlas_coords, p_alternative_tile));
- // Compute the offset
- Rect2i source_rect = atlas_source->get_tile_texture_region(p_atlas_coords);
+ // Get the tile modulation.
+ Color modulate = tile_data->get_modulate() * p_modulation;
+
+ // Compute the offset.
Vector2i tile_offset = atlas_source->get_tile_effective_texture_offset(p_atlas_coords, p_alternative_tile);
- // Compute the destination rectangle in the CanvasItem.
+ // Get destination rect.
Rect2 dest_rect;
- dest_rect.size = source_rect.size;
+ dest_rect.size = atlas_source->get_tile_texture_region(p_atlas_coords).size;
dest_rect.size.x += FP_ADJUST;
dest_rect.size.y += FP_ADJUST;
@@ -1002,12 +1075,28 @@ void TileMap::draw_tile(RID p_canvas_item, Vector2i p_position, const Ref<TileSe
dest_rect.size.y = -dest_rect.size.y;
}
- // Get the tile modulation.
- Color modulate = tile_data->get_modulate();
- modulate = Color(modulate.r * p_modulation.r, modulate.g * p_modulation.g, modulate.b * p_modulation.b, modulate.a * p_modulation.a);
-
// Draw the tile.
- tex->draw_rect_region(p_canvas_item, dest_rect, source_rect, modulate, transpose, p_tile_set->is_uv_clipping());
+ if (p_frame >= 0) {
+ Rect2i source_rect = atlas_source->get_tile_texture_region(p_atlas_coords, p_frame);
+ tex->draw_rect_region(p_canvas_item, dest_rect, source_rect, modulate, transpose, p_tile_set->is_uv_clipping());
+ } else if (atlas_source->get_tile_animation_frames_count(p_atlas_coords) == 1) {
+ Rect2i source_rect = atlas_source->get_tile_texture_region(p_atlas_coords, 0);
+ tex->draw_rect_region(p_canvas_item, dest_rect, source_rect, modulate, transpose, p_tile_set->is_uv_clipping());
+ } else {
+ real_t speed = atlas_source->get_tile_animation_speed(p_atlas_coords);
+ real_t animation_duration = atlas_source->get_tile_animation_total_duration(p_atlas_coords) / speed;
+ real_t time = 0.0;
+ for (int frame = 0; frame < atlas_source->get_tile_animation_frames_count(p_atlas_coords); frame++) {
+ real_t frame_duration = atlas_source->get_tile_animation_frame_duration(p_atlas_coords, frame) / speed;
+ RenderingServer::get_singleton()->canvas_item_add_animation_slice(p_canvas_item, animation_duration, time, time + frame_duration, 0.0);
+
+ Rect2i source_rect = atlas_source->get_tile_texture_region(p_atlas_coords, frame);
+ tex->draw_rect_region(p_canvas_item, dest_rect, source_rect, modulate, transpose, p_tile_set->is_uv_clipping());
+
+ time += frame_duration;
+ }
+ RenderingServer::get_singleton()->canvas_item_add_animation_slice(p_canvas_item, 1.0, 0.0, 1.0, 0.0);
+ }
}
}
@@ -1015,24 +1104,67 @@ void TileMap::draw_tile(RID p_canvas_item, Vector2i p_position, const Ref<TileSe
void TileMap::_physics_notification(int p_what) {
switch (p_what) {
+ case CanvasItem::NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
+ bool in_editor = false;
+#ifdef TOOLS_ENABLED
+ in_editor = Engine::get_singleton()->is_editor_hint();
+#endif
+ if (is_inside_tree() && collision_animatable && !in_editor) {
+ // Update tranform on the physics tick when in animatable mode.
+ last_valid_transform = new_transform;
+ set_notify_local_transform(false);
+ set_global_transform(new_transform);
+ set_notify_local_transform(true);
+ }
+ } break;
case CanvasItem::NOTIFICATION_TRANSFORM_CHANGED: {
- // Update the bodies transforms.
- if (is_inside_tree()) {
+ bool in_editor = false;
+#ifdef TOOLS_ENABLED
+ in_editor = Engine::get_singleton()->is_editor_hint();
+#endif
+ if (is_inside_tree() && (!collision_animatable || in_editor)) {
+ // Update the new transform directly if we are not in animatable mode.
+ Transform2D global_transform = get_global_transform();
for (int layer = 0; layer < (int)layers.size(); layer++) {
- Transform2D global_transform = get_global_transform();
+ for (Map<Vector2i, TileMapQuadrant>::Element *E = layers[layer].quadrant_map.front(); E; E = E->next()) {
+ TileMapQuadrant &q = E->get();
+ for (RID body : q.bodies) {
+ Transform2D xform;
+ xform.set_origin(map_to_world(bodies_coords[body]));
+ xform = global_transform * xform;
+ PhysicsServer2D::get_singleton()->body_set_state(body, PhysicsServer2D::BODY_STATE_TRANSFORM, xform);
+ }
+ }
+ }
+ }
+ } break;
+ case NOTIFICATION_LOCAL_TRANSFORM_CHANGED: {
+ bool in_editor = false;
+#ifdef TOOLS_ENABLED
+ in_editor = Engine::get_singleton()->is_editor_hint();
+#endif
+ if (is_inside_tree() && !in_editor && collision_animatable) {
+ // Only active when animatable. Send the new transform to the physics...
+ new_transform = get_global_transform();
+ for (int layer = 0; layer < (int)layers.size(); layer++) {
for (Map<Vector2i, TileMapQuadrant>::Element *E = layers[layer].quadrant_map.front(); E; E = E->next()) {
TileMapQuadrant &q = E->get();
- Transform2D xform;
- xform.set_origin(map_to_world(E->key() * get_effective_quadrant_size(layer)));
- xform = global_transform * xform;
+ for (RID body : q.bodies) {
+ Transform2D xform;
+ xform.set_origin(map_to_world(bodies_coords[body]));
+ xform = new_transform * xform;
- for (int body_index = 0; body_index < q.bodies.size(); body_index++) {
- PhysicsServer2D::get_singleton()->body_set_state(q.bodies[body_index], PhysicsServer2D::BODY_STATE_TRANSFORM, xform);
+ PhysicsServer2D::get_singleton()->body_set_state(body, PhysicsServer2D::BODY_STATE_TRANSFORM, xform);
}
}
}
+
+ // ... but then revert changes.
+ set_notify_local_transform(false);
+ set_global_transform(last_valid_transform);
+ set_notify_local_transform(true);
}
} break;
}
@@ -1043,25 +1175,23 @@ void TileMap::_physics_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r
ERR_FAIL_COND(!tile_set.is_valid());
Transform2D global_transform = get_global_transform();
+ last_valid_transform = global_transform;
+ new_transform = global_transform;
PhysicsServer2D *ps = PhysicsServer2D::get_singleton();
+ RID space = get_world_2d()->get_space();
SelfList<TileMapQuadrant> *q_list_element = r_dirty_quadrant_list.first();
while (q_list_element) {
TileMapQuadrant &q = *q_list_element->self();
- Vector2 quadrant_pos = map_to_world(q.coords * get_effective_quadrant_size(q.layer));
-
- // Clear shapes.
- for (int body_index = 0; body_index < q.bodies.size(); body_index++) {
- ps->body_clear_shapes(q.bodies[body_index]);
-
- // Position the bodies.
- Transform2D xform;
- xform.set_origin(quadrant_pos);
- xform = global_transform * xform;
- ps->body_set_state(q.bodies[body_index], PhysicsServer2D::BODY_STATE_TRANSFORM, xform);
+ // Clear bodies.
+ for (RID body : q.bodies) {
+ bodies_coords.erase(body);
+ ps->free(body);
}
+ q.bodies.clear();
+ // Recreate bodies and shapes.
for (Set<Vector2i>::Element *E_cell = q.cells.front(); E_cell; E_cell = E_cell->next()) {
TileMapCell c = get_cell(q.layer, E_cell->get(), true);
@@ -1077,22 +1207,53 @@ void TileMap::_physics_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r
if (atlas_source) {
TileData *tile_data = Object::cast_to<TileData>(atlas_source->get_tile_data(c.get_atlas_coords(), c.alternative_tile));
- for (int body_index = 0; body_index < q.bodies.size(); body_index++) {
- // Add the shapes again.
- for (int polygon_index = 0; polygon_index < tile_data->get_collision_polygons_count(body_index); polygon_index++) {
- bool one_way_collision = tile_data->is_collision_polygon_one_way(body_index, polygon_index);
- float one_way_collision_margin = tile_data->get_collision_polygon_one_way_margin(body_index, polygon_index);
+ for (int tile_set_physics_layer = 0; tile_set_physics_layer < tile_set->get_physics_layers_count(); tile_set_physics_layer++) {
+ Ref<PhysicsMaterial> physics_material = tile_set->get_physics_layer_physics_material(tile_set_physics_layer);
+ uint32_t physics_layer = tile_set->get_physics_layer_collision_layer(tile_set_physics_layer);
+ uint32_t physics_mask = tile_set->get_physics_layer_collision_mask(tile_set_physics_layer);
- int shapes_count = tile_data->get_collision_polygon_shapes_count(body_index, polygon_index);
- for (int shape_index = 0; shape_index < shapes_count; shape_index++) {
- Transform2D xform = Transform2D();
- xform.set_origin(map_to_world(E_cell->get()) - quadrant_pos);
+ // Create the body.
+ RID body = ps->body_create();
+ bodies_coords[body] = E_cell->get();
+ ps->body_set_mode(body, collision_animatable ? PhysicsServer2D::BODY_MODE_KINEMATIC : PhysicsServer2D::BODY_MODE_STATIC);
+ ps->body_set_space(body, space);
+ Transform2D xform;
+ xform.set_origin(map_to_world(E_cell->get()));
+ xform = global_transform * xform;
+ ps->body_set_state(body, PhysicsServer2D::BODY_STATE_TRANSFORM, xform);
+
+ ps->body_attach_object_instance_id(body, get_instance_id());
+ ps->body_set_collision_layer(body, physics_layer);
+ ps->body_set_collision_mask(body, physics_mask);
+ ps->body_set_pickable(body, false);
+ ps->body_set_state(body, PhysicsServer2D::BODY_STATE_LINEAR_VELOCITY, tile_data->get_constant_linear_velocity(tile_set_physics_layer));
+ ps->body_set_state(body, PhysicsServer2D::BODY_STATE_ANGULAR_VELOCITY, tile_data->get_constant_angular_velocity(tile_set_physics_layer));
+
+ if (!physics_material.is_valid()) {
+ ps->body_set_param(body, PhysicsServer2D::BODY_PARAM_BOUNCE, 0);
+ ps->body_set_param(body, PhysicsServer2D::BODY_PARAM_FRICTION, 1);
+ } else {
+ ps->body_set_param(body, PhysicsServer2D::BODY_PARAM_BOUNCE, physics_material->computed_bounce());
+ ps->body_set_param(body, PhysicsServer2D::BODY_PARAM_FRICTION, physics_material->computed_friction());
+ }
+
+ q.bodies.push_back(body);
+
+ // Add the shapes to the body.
+ int body_shape_index = 0;
+ for (int polygon_index = 0; polygon_index < tile_data->get_collision_polygons_count(tile_set_physics_layer); polygon_index++) {
+ // Iterate over the polygons.
+ bool one_way_collision = tile_data->is_collision_polygon_one_way(tile_set_physics_layer, polygon_index);
+ float one_way_collision_margin = tile_data->get_collision_polygon_one_way_margin(tile_set_physics_layer, polygon_index);
+ int shapes_count = tile_data->get_collision_polygon_shapes_count(tile_set_physics_layer, polygon_index);
+ for (int shape_index = 0; shape_index < shapes_count; shape_index++) {
// Add decomposed convex shapes.
- Ref<ConvexPolygonShape2D> shape = tile_data->get_collision_polygon_shape(body_index, polygon_index, shape_index);
- ps->body_add_shape(q.bodies[body_index], shape->get_rid(), xform);
- ps->body_set_shape_metadata(q.bodies[body_index], shape_index, E_cell->get());
- ps->body_set_shape_as_one_way_collision(q.bodies[body_index], shape_index, one_way_collision, one_way_collision_margin);
+ Ref<ConvexPolygonShape2D> shape = tile_data->get_collision_polygon_shape(tile_set_physics_layer, polygon_index, shape_index);
+ ps->body_add_shape(body, shape->get_rid());
+ ps->body_set_shape_as_one_way_collision(body, body_shape_index, one_way_collision, one_way_collision_margin);
+
+ body_shape_index++;
}
}
}
@@ -1104,54 +1265,11 @@ void TileMap::_physics_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r
}
}
-void TileMap::_physics_create_quadrant(TileMapQuadrant *p_quadrant) {
- ERR_FAIL_COND(!tile_set.is_valid());
-
- //Get the TileMap's gobla transform.
- Transform2D global_transform;
- if (is_inside_tree()) {
- global_transform = get_global_transform();
- }
-
- // Clear all bodies.
- p_quadrant->bodies.clear();
-
- // Create the body and set its parameters.
- for (int layer = 0; layer < tile_set->get_physics_layers_count(); layer++) {
- RID body = PhysicsServer2D::get_singleton()->body_create();
- PhysicsServer2D::get_singleton()->body_set_mode(body, PhysicsServer2D::BODY_MODE_STATIC);
-
- PhysicsServer2D::get_singleton()->body_attach_object_instance_id(body, get_instance_id());
- PhysicsServer2D::get_singleton()->body_set_collision_layer(body, tile_set->get_physics_layer_collision_layer(layer));
- PhysicsServer2D::get_singleton()->body_set_collision_mask(body, tile_set->get_physics_layer_collision_mask(layer));
-
- Ref<PhysicsMaterial> physics_material = tile_set->get_physics_layer_physics_material(layer);
- if (!physics_material.is_valid()) {
- PhysicsServer2D::get_singleton()->body_set_param(body, PhysicsServer2D::BODY_PARAM_BOUNCE, 0);
- PhysicsServer2D::get_singleton()->body_set_param(body, PhysicsServer2D::BODY_PARAM_FRICTION, 1);
- } else {
- PhysicsServer2D::get_singleton()->body_set_param(body, PhysicsServer2D::BODY_PARAM_BOUNCE, physics_material->computed_bounce());
- PhysicsServer2D::get_singleton()->body_set_param(body, PhysicsServer2D::BODY_PARAM_FRICTION, physics_material->computed_friction());
- }
-
- if (is_inside_tree()) {
- RID space = get_world_2d()->get_space();
- PhysicsServer2D::get_singleton()->body_set_space(body, space);
-
- Transform2D xform;
- xform.set_origin(map_to_world(p_quadrant->coords * get_effective_quadrant_size(layer)));
- xform = global_transform * xform;
- PhysicsServer2D::get_singleton()->body_set_state(body, PhysicsServer2D::BODY_STATE_TRANSFORM, xform);
- }
-
- p_quadrant->bodies.push_back(body);
- }
-}
-
void TileMap::_physics_cleanup_quadrant(TileMapQuadrant *p_quadrant) {
// Remove a quadrant.
- for (int body_index = 0; body_index < p_quadrant->bodies.size(); body_index++) {
- PhysicsServer2D::get_singleton()->free(p_quadrant->bodies[body_index]);
+ for (RID body : p_quadrant->bodies) {
+ bodies_coords.erase(body);
+ PhysicsServer2D::get_singleton()->free(body);
}
p_quadrant->bodies.clear();
}
@@ -1167,7 +1285,7 @@ void TileMap::_physics_draw_quadrant_debug(TileMapQuadrant *p_quadrant) {
bool show_collision = false;
switch (collision_visibility_mode) {
case TileMap::VISIBILITY_MODE_DEFAULT:
- show_collision = !Engine::get_singleton()->is_editor_hint() && (get_tree() && get_tree()->is_debugging_navigation_hint());
+ show_collision = !Engine::get_singleton()->is_editor_hint() && (get_tree() && get_tree()->is_debugging_collisions_hint());
break;
case TileMap::VISIBILITY_MODE_FORCE_HIDE:
show_collision = false;
@@ -1181,39 +1299,28 @@ void TileMap::_physics_draw_quadrant_debug(TileMapQuadrant *p_quadrant) {
}
RenderingServer *rs = RenderingServer::get_singleton();
-
- Vector2 quadrant_pos = map_to_world(p_quadrant->coords * get_effective_quadrant_size(p_quadrant->layer));
+ PhysicsServer2D *ps = PhysicsServer2D::get_singleton();
Color debug_collision_color = get_tree()->get_debug_collisions_color();
- for (Set<Vector2i>::Element *E_cell = p_quadrant->cells.front(); E_cell; E_cell = E_cell->next()) {
- TileMapCell c = get_cell(p_quadrant->layer, E_cell->get(), true);
-
- Transform2D xform;
- xform.set_origin(map_to_world(E_cell->get()) - quadrant_pos);
- rs->canvas_item_add_set_transform(p_quadrant->debug_canvas_item, xform);
-
- if (tile_set->has_source(c.source_id)) {
- TileSetSource *source = *tile_set->get_source(c.source_id);
-
- if (!source->has_tile(c.get_atlas_coords()) || !source->has_alternative_tile(c.get_atlas_coords(), c.alternative_tile)) {
- continue;
- }
+ Vector<Color> color;
+ color.push_back(debug_collision_color);
- TileSetAtlasSource *atlas_source = Object::cast_to<TileSetAtlasSource>(source);
- if (atlas_source) {
- TileData *tile_data = Object::cast_to<TileData>(atlas_source->get_tile_data(c.get_atlas_coords(), c.alternative_tile));
+ Vector2 quadrant_pos = map_to_world(p_quadrant->coords * get_effective_quadrant_size(p_quadrant->layer));
+ Transform2D qudrant_xform;
+ qudrant_xform.set_origin(quadrant_pos);
+ Transform2D global_transform_inv = (get_global_transform() * qudrant_xform).affine_inverse();
- for (int body_index = 0; body_index < p_quadrant->bodies.size(); body_index++) {
- for (int polygon_index = 0; polygon_index < tile_data->get_collision_polygons_count(body_index); polygon_index++) {
- // Draw the debug polygon.
- Vector<Vector2> polygon = tile_data->get_collision_polygon_points(body_index, polygon_index);
- if (polygon.size() >= 3) {
- Vector<Color> color;
- color.push_back(debug_collision_color);
- rs->canvas_item_add_polygon(p_quadrant->debug_canvas_item, polygon, color);
- }
- }
- }
+ for (RID body : p_quadrant->bodies) {
+ Transform2D xform = Transform2D(ps->body_get_state(body, PhysicsServer2D::BODY_STATE_TRANSFORM)) * global_transform_inv;
+ rs->canvas_item_add_set_transform(p_quadrant->debug_canvas_item, xform);
+ for (int shape_index = 0; shape_index < ps->body_get_shape_count(body); shape_index++) {
+ const RID &shape = ps->body_get_shape(body, shape_index);
+ PhysicsServer2D::ShapeType type = ps->shape_get_type(shape);
+ if (type == PhysicsServer2D::SHAPE_CONVEX_POLYGON) {
+ Vector<Vector2> polygon = ps->shape_get_data(shape);
+ rs->canvas_item_add_polygon(p_quadrant->debug_canvas_item, polygon, color);
+ } else {
+ WARN_PRINT("Wrong shape type for a tile, should be SHAPE_CONVEX_POLYGON.");
}
}
rs->canvas_item_add_set_transform(p_quadrant->debug_canvas_item, Transform2D());
@@ -1773,6 +1880,11 @@ Map<Vector2i, TileMapQuadrant> *TileMap::get_quadrant_map(int p_layer) {
return &layers[p_layer].quadrant_map;
}
+Vector2i TileMap::get_coords_for_body_rid(RID p_physics_body) {
+ ERR_FAIL_COND_V_MSG(!bodies_coords.has(p_physics_body), Vector2i(), vformat("No tiles for the given body RID %d.", p_physics_body));
+ return bodies_coords[p_physics_body];
+}
+
void TileMap::fix_invalid_tiles() {
ERR_FAIL_COND_MSG(tile_set.is_null(), "Cannot fix invalid tiles if Tileset is not open.");
@@ -1949,10 +2061,22 @@ bool TileMap::_set(const StringName &p_name, const Variant &p_value) {
return false;
} else if (components.size() == 2 && components[0].begins_with("layer_") && components[0].trim_prefix("layer_").is_valid_int()) {
int index = components[0].trim_prefix("layer_").to_int();
- if (index < 0 || index >= (int)layers.size()) {
+ if (index < 0) {
return false;
}
+ if (index >= (int)layers.size()) {
+ _clear_internals();
+ while (index >= (int)layers.size()) {
+ layers.push_back(TileMapLayer());
+ }
+ _recreate_internals();
+
+ notify_property_list_changed();
+ emit_signal(SNAME("changed"));
+ update_configuration_warnings();
+ }
+
if (components[1] == "name") {
set_layer_name(index, p_value);
return true;
@@ -2813,50 +2937,57 @@ void TileMap::draw_cells_outline(Control *p_control, Set<Vector2i> p_cells, Colo
// Create a set.
Vector2i tile_size = tile_set->get_tile_size();
- Vector<Vector2> uvs;
+ Vector<Vector2> polygon = tile_set->get_tile_shape_polygon();
+ TileSet::TileShape shape = tile_set->get_tile_shape();
- if (tile_set->get_tile_shape() == TileSet::TILE_SHAPE_SQUARE) {
- uvs.append(Vector2(1.0, 0.0));
- uvs.append(Vector2(1.0, 1.0));
- uvs.append(Vector2(0.0, 1.0));
- uvs.append(Vector2(0.0, 0.0));
- } else {
- float overlap = 0.0;
- switch (tile_set->get_tile_shape()) {
- case TileSet::TILE_SHAPE_ISOMETRIC:
- overlap = 0.5;
- break;
- case TileSet::TILE_SHAPE_HEXAGON:
- overlap = 0.25;
- break;
- case TileSet::TILE_SHAPE_HALF_OFFSET_SQUARE:
- overlap = 0.0;
- break;
- default:
- break;
- }
- uvs.append(Vector2(1.0, overlap));
- uvs.append(Vector2(1.0, 1.0 - overlap));
- uvs.append(Vector2(0.5, 1.0));
- uvs.append(Vector2(0.0, 1.0 - overlap));
- uvs.append(Vector2(0.0, overlap));
- uvs.append(Vector2(0.5, 0.0));
- if (tile_set->get_tile_offset_axis() == TileSet::TILE_OFFSET_AXIS_VERTICAL) {
- for (int i = 0; i < uvs.size(); i++) {
- uvs.write[i] = Vector2(uvs[i].y, uvs[i].x);
- }
- }
+ for (Set<Vector2i>::Element *E = p_cells.front(); E; E = E->next()) {
+ Vector2 center = map_to_world(E->get());
+
+#define DRAW_SIDE_IF_NEEDED(side, polygon_index_from, polygon_index_to) \
+ if (!p_cells.has(get_neighbor_cell(E->get(), side))) { \
+ Vector2 from = p_transform.xform(center + polygon[polygon_index_from] * tile_size); \
+ Vector2 to = p_transform.xform(center + polygon[polygon_index_to] * tile_size); \
+ p_control->draw_line(from, to, p_color); \
}
- for (Set<Vector2i>::Element *E = p_cells.front(); E; E = E->next()) {
- Vector2 top_left = map_to_world(E->get()) - tile_size / 2;
- TypedArray<Vector2i> surrounding_tiles = get_surrounding_tiles(E->get());
- for (int i = 0; i < surrounding_tiles.size(); i++) {
- if (!p_cells.has(surrounding_tiles[i])) {
- p_control->draw_line(p_transform.xform(top_left + uvs[i] * tile_size), p_transform.xform(top_left + uvs[(i + 1) % uvs.size()] * tile_size), p_color);
+ if (shape == TileSet::TILE_SHAPE_SQUARE) {
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_RIGHT_SIDE, 1, 2);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_BOTTOM_SIDE, 2, 3);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_LEFT_SIDE, 3, 0);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_TOP_SIDE, 0, 1);
+ } else {
+ if (tile_set->get_tile_offset_axis() == TileSet::TILE_OFFSET_AXIS_HORIZONTAL) {
+ if (shape == TileSet::TILE_SHAPE_ISOMETRIC) {
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE, 3, 4);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_SIDE, 2, 3);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_TOP_LEFT_SIDE, 0, 1);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_TOP_RIGHT_SIDE, 5, 0);
+ } else {
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE, 3, 4);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_SIDE, 2, 3);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_LEFT_SIDE, 1, 2);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_TOP_LEFT_SIDE, 0, 1);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_TOP_RIGHT_SIDE, 5, 0);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_RIGHT_SIDE, 4, 5);
+ }
+ } else {
+ if (shape == TileSet::TILE_SHAPE_ISOMETRIC) {
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE, 3, 4);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_SIDE, 5, 0);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_TOP_LEFT_SIDE, 0, 1);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_TOP_RIGHT_SIDE, 2, 3);
+ } else {
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE, 3, 4);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_BOTTOM_SIDE, 4, 5);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_SIDE, 5, 0);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_TOP_LEFT_SIDE, 0, 1);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_TOP_SIDE, 1, 2);
+ DRAW_SIDE_IF_NEEDED(TileSet::CELL_NEIGHBOR_TOP_RIGHT_SIDE, 2, 3);
+ }
}
}
}
+#undef DRAW_SIDE_IF_NEEDED
}
TypedArray<String> TileMap::get_configuration_warnings() const {
@@ -2888,8 +3019,10 @@ void TileMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_quadrant_size", "size"), &TileMap::set_quadrant_size);
ClassDB::bind_method(D_METHOD("get_quadrant_size"), &TileMap::get_quadrant_size);
- ClassDB::bind_method(D_METHOD("set_layers_count", "layers_count"), &TileMap::set_layers_count);
ClassDB::bind_method(D_METHOD("get_layers_count"), &TileMap::get_layers_count);
+ ClassDB::bind_method(D_METHOD("add_layer", "to_position"), &TileMap::add_layer);
+ ClassDB::bind_method(D_METHOD("move_layer", "layer", "to_position"), &TileMap::move_layer);
+ ClassDB::bind_method(D_METHOD("remove_layer", "layer"), &TileMap::remove_layer);
ClassDB::bind_method(D_METHOD("set_layer_name", "layer", "name"), &TileMap::set_layer_name);
ClassDB::bind_method(D_METHOD("get_layer_name", "layer"), &TileMap::get_layer_name);
ClassDB::bind_method(D_METHOD("set_layer_enabled", "layer", "enabled"), &TileMap::set_layer_enabled);
@@ -2899,8 +3032,10 @@ void TileMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_layer_y_sort_origin", "layer", "y_sort_origin"), &TileMap::set_layer_y_sort_origin);
ClassDB::bind_method(D_METHOD("get_layer_y_sort_origin", "layer"), &TileMap::get_layer_y_sort_origin);
ClassDB::bind_method(D_METHOD("set_layer_z_index", "layer", "z_index"), &TileMap::set_layer_z_index);
- ClassDB::bind_method(D_METHOD("get_layer_z_indexd", "layer"), &TileMap::get_layer_z_index);
+ ClassDB::bind_method(D_METHOD("get_layer_z_index", "layer"), &TileMap::get_layer_z_index);
+ ClassDB::bind_method(D_METHOD("set_collision_animatable", "enabled"), &TileMap::set_collision_animatable);
+ ClassDB::bind_method(D_METHOD("is_collision_animatable"), &TileMap::is_collision_animatable);
ClassDB::bind_method(D_METHOD("set_collision_visibility_mode", "collision_visibility_mode"), &TileMap::set_collision_visibility_mode);
ClassDB::bind_method(D_METHOD("get_collision_visibility_mode"), &TileMap::get_collision_visibility_mode);
@@ -2912,10 +3047,14 @@ void TileMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_cell_atlas_coords", "layer", "coords", "use_proxies"), &TileMap::get_cell_atlas_coords);
ClassDB::bind_method(D_METHOD("get_cell_alternative_tile", "layer", "coords", "use_proxies"), &TileMap::get_cell_alternative_tile);
+ ClassDB::bind_method(D_METHOD("get_coords_for_body_rid", "body"), &TileMap::get_coords_for_body_rid);
+
ClassDB::bind_method(D_METHOD("fix_invalid_tiles"), &TileMap::fix_invalid_tiles);
- ClassDB::bind_method(D_METHOD("get_surrounding_tiles", "coords"), &TileMap::get_surrounding_tiles);
+ ClassDB::bind_method(D_METHOD("clear_layer", "layer"), &TileMap::clear_layer);
ClassDB::bind_method(D_METHOD("clear"), &TileMap::clear);
+ ClassDB::bind_method(D_METHOD("get_surrounding_tiles", "coords"), &TileMap::get_surrounding_tiles);
+
ClassDB::bind_method(D_METHOD("get_used_cells", "layer"), &TileMap::get_used_cells);
ClassDB::bind_method(D_METHOD("get_used_rect"), &TileMap::get_used_rect);
@@ -2931,12 +3070,11 @@ void TileMap::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "tile_set", PROPERTY_HINT_RESOURCE_TYPE, "TileSet"), "set_tileset", "get_tileset");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cell_quadrant_size", PROPERTY_HINT_RANGE, "1,128,1"), "set_quadrant_size", "get_quadrant_size");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collision_animatable"), "set_collision_animatable", "is_collision_animatable");
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_visibility_mode", PROPERTY_HINT_ENUM, "Default,Force Show,Force Hide"), "set_collision_visibility_mode", "get_collision_visibility_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "navigation_visibility_mode", PROPERTY_HINT_ENUM, "Default,Force Show,Force Hide"), "set_navigation_visibility_mode", "get_navigation_visibility_mode");
- ADD_GROUP("Layers", "");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "layers_count"), "set_layers_count", "get_layers_count");
- ADD_PROPERTY_DEFAULT("layers_count", 1);
+ ADD_ARRAY("layers", "layer_");
ADD_PROPERTY_DEFAULT("format", FORMAT_1);
@@ -2949,6 +3087,7 @@ void TileMap::_bind_methods() {
void TileMap::_tile_set_changed() {
emit_signal(SNAME("changed"));
+ _clear_internals();
_recreate_internals();
}
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index 4e2d76a7b7..2faede2445 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -202,6 +202,7 @@ private:
// Properties.
Ref<TileSet> tile_set;
int quadrant_size = 16;
+ bool collision_animatable = false;
VisibilityMode collision_visibility_mode = VISIBILITY_MODE_DEFAULT;
VisibilityMode navigation_visibility_mode = VISIBILITY_MODE_DEFAULT;
@@ -229,6 +230,9 @@ private:
LocalVector<TileMapLayer> layers;
int selected_layer = -1;
+ // Mapping for RID to coords.
+ Map<RID, Vector2i> bodies_coords;
+
// Quadrants and internals management.
Vector2i _coords_to_quadrant_coords(int p_layer, const Vector2i &p_coords) const;
@@ -259,9 +263,10 @@ private:
void _rendering_cleanup_quadrant(TileMapQuadrant *p_quadrant);
void _rendering_draw_quadrant_debug(TileMapQuadrant *p_quadrant);
+ Transform2D last_valid_transform;
+ Transform2D new_transform;
void _physics_notification(int p_what);
void _physics_update_dirty_quadrants(SelfList<TileMapQuadrant>::List &r_dirty_quadrant_list);
- void _physics_create_quadrant(TileMapQuadrant *p_quadrant);
void _physics_cleanup_quadrant(TileMapQuadrant *p_quadrant);
void _physics_draw_quadrant_debug(TileMapQuadrant *p_quadrant);
@@ -305,11 +310,13 @@ public:
void set_quadrant_size(int p_size);
int get_quadrant_size() const;
- static void draw_tile(RID p_canvas_item, Vector2i p_position, const Ref<TileSet> p_tile_set, int p_atlas_source_id, Vector2i p_atlas_coords, int p_alternative_tile, Color p_modulation = Color(1.0, 1.0, 1.0, 1.0));
+ static void draw_tile(RID p_canvas_item, Vector2i p_position, const Ref<TileSet> p_tile_set, int p_atlas_source_id, Vector2i p_atlas_coords, int p_alternative_tile, int p_frame = -1, Color p_modulation = Color(1.0, 1.0, 1.0, 1.0));
// Layers management.
- void set_layers_count(int p_layers_count);
int get_layers_count() const;
+ void add_layer(int p_to_pos);
+ void move_layer(int p_layer, int p_to_pos);
+ void remove_layer(int p_layer);
void set_layer_name(int p_layer, String p_name);
String get_layer_name(int p_layer) const;
void set_layer_enabled(int p_layer, bool p_visible);
@@ -323,6 +330,9 @@ public:
void set_selected_layer(int p_layer_id); // For editor use.
int get_selected_layer() const;
+ void set_collision_animatable(bool p_enabled);
+ bool is_collision_animatable() const;
+
void set_collision_visibility_mode(VisibilityMode p_show_collision);
VisibilityMode get_collision_visibility_mode();
@@ -362,6 +372,9 @@ public:
virtual void set_texture_filter(CanvasItem::TextureFilter p_texture_filter) override;
virtual void set_texture_repeat(CanvasItem::TextureRepeat p_texture_repeat) override;
+ // For finding tiles from collision.
+ Vector2i get_coords_for_body_rid(RID p_physics_body);
+
// Fixing a nclearing methods.
void fix_invalid_tiles();
diff --git a/scene/2d/touch_screen_button.cpp b/scene/2d/touch_screen_button.cpp
index 00e4e1dc62..8bd7b696f2 100644
--- a/scene/2d/touch_screen_button.cpp
+++ b/scene/2d/touch_screen_button.cpp
@@ -185,7 +185,7 @@ String TouchScreenButton::get_action() const {
return action;
}
-void TouchScreenButton::_input(const Ref<InputEvent> &p_event) {
+void TouchScreenButton::input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (!get_tree()) {
@@ -288,7 +288,7 @@ void TouchScreenButton::_press(int p_finger_pressed) {
iea.instantiate();
iea->set_action(action);
iea->set_pressed(true);
- get_viewport()->input(iea, true);
+ get_viewport()->push_input(iea, true);
}
emit_signal(SNAME("pressed"));
@@ -305,7 +305,7 @@ void TouchScreenButton::_release(bool p_exiting_tree) {
iea.instantiate();
iea->set_action(action);
iea->set_pressed(false);
- get_viewport()->input(iea, true);
+ get_viewport()->push_input(iea, true);
}
}
@@ -384,8 +384,6 @@ void TouchScreenButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_pressed"), &TouchScreenButton::is_pressed);
- ClassDB::bind_method(D_METHOD("_input"), &TouchScreenButton::_input);
-
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "normal", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture", "get_texture");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "pressed", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_texture_pressed", "get_texture_pressed");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "bitmask", PROPERTY_HINT_RESOURCE_TYPE, "BitMap"), "set_bitmask", "get_bitmask");
diff --git a/scene/2d/touch_screen_button.h b/scene/2d/touch_screen_button.h
index 10820ad059..1c515149d4 100644
--- a/scene/2d/touch_screen_button.h
+++ b/scene/2d/touch_screen_button.h
@@ -61,7 +61,7 @@ private:
VisibilityMode visibility = VISIBILITY_ALWAYS;
- void _input(const Ref<InputEvent> &p_event);
+ virtual void input(const Ref<InputEvent> &p_event) override;
bool _is_point_inside(const Point2 &p_point);
diff --git a/scene/3d/area_3d.cpp b/scene/3d/area_3d.cpp
index 2e917c4a42..943586f43c 100644
--- a/scene/3d/area_3d.cpp
+++ b/scene/3d/area_3d.cpp
@@ -105,6 +105,61 @@ real_t Area3D::get_priority() const {
return priority;
}
+void Area3D::set_wind_force_magnitude(real_t p_wind_force_magnitude) {
+ wind_force_magnitude = p_wind_force_magnitude;
+ if (is_inside_tree()) {
+ _initialize_wind();
+ }
+}
+
+real_t Area3D::get_wind_force_magnitude() const {
+ return wind_force_magnitude;
+}
+
+void Area3D::set_wind_attenuation_factor(real_t p_wind_force_attenuation_factor) {
+ wind_attenuation_factor = p_wind_force_attenuation_factor;
+ if (is_inside_tree()) {
+ _initialize_wind();
+ }
+}
+
+real_t Area3D::get_wind_attenuation_factor() const {
+ return wind_attenuation_factor;
+}
+
+void Area3D::set_wind_source_path(const NodePath &p_wind_source_path) {
+ wind_source_path = p_wind_source_path;
+ if (is_inside_tree()) {
+ _initialize_wind();
+ }
+}
+
+const NodePath &Area3D::get_wind_source_path() const {
+ return wind_source_path;
+}
+
+void Area3D::_initialize_wind() {
+ real_t temp_magnitude = 0.0;
+ Vector3 wind_direction(0., 0., 0.);
+ Vector3 wind_source(0., 0., 0.);
+
+ // Overwrite with area-specified info if available
+ if (!wind_source_path.is_empty()) {
+ Node3D *p_wind_source = Object::cast_to<Node3D>(get_node(wind_source_path));
+ ERR_FAIL_NULL(p_wind_source);
+ Transform3D global_transform = p_wind_source->get_transform();
+ wind_direction = -global_transform.basis.get_axis(Vector3::AXIS_Z).normalized();
+ wind_source = global_transform.origin;
+ temp_magnitude = wind_force_magnitude;
+ }
+
+ // Set force, source and direction in the physics server.
+ PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_WIND_ATTENUATION_FACTOR, wind_attenuation_factor);
+ PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_WIND_SOURCE, wind_source);
+ PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_WIND_DIRECTION, wind_direction);
+ PhysicsServer3D::get_singleton()->area_set_param(get_rid(), PhysicsServer3D::AREA_PARAM_WIND_FORCE_MAGNITUDE, temp_magnitude);
+}
+
void Area3D::_body_enter_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
Node *node = Object::cast_to<Node>(obj);
@@ -264,6 +319,8 @@ void Area3D::_clear_monitoring() {
void Area3D::_notification(int p_what) {
if (p_what == NOTIFICATION_EXIT_TREE) {
_clear_monitoring();
+ } else if (p_what == NOTIFICATION_ENTER_TREE) {
+ _initialize_wind();
}
}
@@ -550,6 +607,15 @@ void Area3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_priority", "priority"), &Area3D::set_priority);
ClassDB::bind_method(D_METHOD("get_priority"), &Area3D::get_priority);
+ ClassDB::bind_method(D_METHOD("set_wind_force_magnitude", "wind_force_magnitude"), &Area3D::set_wind_force_magnitude);
+ ClassDB::bind_method(D_METHOD("get_wind_force_magnitude"), &Area3D::get_wind_force_magnitude);
+
+ ClassDB::bind_method(D_METHOD("set_wind_attenuation_factor", "wind_attenuation_factor"), &Area3D::set_wind_attenuation_factor);
+ ClassDB::bind_method(D_METHOD("get_wind_attenuation_factor"), &Area3D::get_wind_attenuation_factor);
+
+ ClassDB::bind_method(D_METHOD("set_wind_source_path", "wind_source_path"), &Area3D::set_wind_source_path);
+ ClassDB::bind_method(D_METHOD("get_wind_source_path"), &Area3D::get_wind_source_path);
+
ClassDB::bind_method(D_METHOD("set_monitorable", "enable"), &Area3D::set_monitorable);
ClassDB::bind_method(D_METHOD("is_monitorable"), &Area3D::is_monitorable);
@@ -605,6 +671,9 @@ void Area3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity", PROPERTY_HINT_RANGE, "-32,32,0.001,or_lesser,or_greater"), "set_gravity", "get_gravity");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), "set_angular_damp", "get_angular_damp");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wind_force_magnitude", PROPERTY_HINT_RANGE, "0,10,0.001,or_greater"), "set_wind_force_magnitude", "get_wind_force_magnitude");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wind_attenuation_factor", PROPERTY_HINT_RANGE, "0.0,3.0,0.001,or_greater"), "set_wind_attenuation_factor", "get_wind_attenuation_factor");
+ ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "wind_source_path", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "Node3D"), "set_wind_source_path", "get_wind_source_path");
ADD_GROUP("Audio Bus", "audio_bus_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_bus_override"), "set_audio_bus_override", "is_overriding_audio_bus");
diff --git a/scene/3d/area_3d.h b/scene/3d/area_3d.h
index 5b8d612717..847d1c5966 100644
--- a/scene/3d/area_3d.h
+++ b/scene/3d/area_3d.h
@@ -55,6 +55,9 @@ private:
real_t angular_damp = 0.1;
real_t linear_damp = 0.1;
int priority = 0;
+ real_t wind_force_magnitude = 0.0;
+ real_t wind_attenuation_factor = 0.0;
+ NodePath wind_source_path;
bool monitoring = false;
bool monitorable = false;
bool locked = false;
@@ -134,6 +137,8 @@ private:
void _validate_property(PropertyInfo &property) const override;
+ void _initialize_wind();
+
protected:
void _notification(int p_what);
static void _bind_methods();
@@ -163,6 +168,15 @@ public:
void set_priority(real_t p_priority);
real_t get_priority() const;
+ void set_wind_force_magnitude(real_t p_wind_force_magnitude);
+ real_t get_wind_force_magnitude() const;
+
+ void set_wind_attenuation_factor(real_t p_wind_attenuation_factor);
+ real_t get_wind_attenuation_factor() const;
+
+ void set_wind_source_path(const NodePath &p_wind_source_path);
+ const NodePath &get_wind_source_path() const;
+
void set_monitoring(bool p_enable);
bool is_monitoring() const;
diff --git a/scene/3d/listener_3d.cpp b/scene/3d/audio_listener_3d.cpp
index 1c52933ee5..b2319e40d7 100644
--- a/scene/3d/listener_3d.cpp
+++ b/scene/3d/audio_listener_3d.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* listener_3d.cpp */
+/* audio_listener_3d.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,18 +28,18 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "listener_3d.h"
+#include "audio_listener_3d.h"
#include "scene/main/viewport.h"
-void Listener3D::_update_audio_listener_state() {
+void AudioListener3D::_update_audio_listener_state() {
}
-void Listener3D::_request_listener_update() {
+void AudioListener3D::_request_listener_update() {
_update_listener();
}
-bool Listener3D::_set(const StringName &p_name, const Variant &p_value) {
+bool AudioListener3D::_set(const StringName &p_name, const Variant &p_value) {
if (p_name == "current") {
if (p_value.operator bool()) {
make_current();
@@ -53,7 +53,7 @@ bool Listener3D::_set(const StringName &p_name, const Variant &p_value) {
return true;
}
-bool Listener3D::_get(const StringName &p_name, Variant &r_ret) const {
+bool AudioListener3D::_get(const StringName &p_name, Variant &r_ret) const {
if (p_name == "current") {
if (is_inside_tree() && get_tree()->is_node_being_edited(this)) {
r_ret = current;
@@ -67,20 +67,20 @@ bool Listener3D::_get(const StringName &p_name, Variant &r_ret) const {
return true;
}
-void Listener3D::_get_property_list(List<PropertyInfo> *p_list) const {
+void AudioListener3D::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::BOOL, "current"));
}
-void Listener3D::_update_listener() {
+void AudioListener3D::_update_listener() {
if (is_inside_tree() && is_current()) {
get_viewport()->_listener_transform_3d_changed_notify();
}
}
-void Listener3D::_notification(int p_what) {
+void AudioListener3D::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_WORLD: {
- bool first_listener = get_viewport()->_listener_3d_add(this);
+ bool first_listener = get_viewport()->_audio_listener_3d_add(this);
if (!get_tree()->is_node_being_edited(this) && (current || first_listener)) {
make_current();
}
@@ -99,41 +99,41 @@ void Listener3D::_notification(int p_what) {
}
}
- get_viewport()->_listener_3d_remove(this);
+ get_viewport()->_audio_listener_3d_remove(this);
} break;
}
}
-Transform3D Listener3D::get_listener_transform() const {
+Transform3D AudioListener3D::get_listener_transform() const {
return get_global_transform().orthonormalized();
}
-void Listener3D::make_current() {
+void AudioListener3D::make_current() {
current = true;
if (!is_inside_tree()) {
return;
}
- get_viewport()->_listener_3d_set(this);
+ get_viewport()->_audio_listener_3d_set(this);
}
-void Listener3D::clear_current() {
+void AudioListener3D::clear_current() {
current = false;
if (!is_inside_tree()) {
return;
}
- if (get_viewport()->get_listener_3d() == this) {
- get_viewport()->_listener_3d_set(nullptr);
- get_viewport()->_listener_3d_make_next_current(this);
+ if (get_viewport()->get_audio_listener_3d() == this) {
+ get_viewport()->_audio_listener_3d_set(nullptr);
+ get_viewport()->_audio_listener_3d_make_next_current(this);
}
}
-bool Listener3D::is_current() const {
+bool AudioListener3D::is_current() const {
if (is_inside_tree() && !get_tree()->is_node_being_edited(this)) {
- return get_viewport()->get_listener_3d() == this;
+ return get_viewport()->get_audio_listener_3d() == this;
} else {
return current;
}
@@ -141,27 +141,16 @@ bool Listener3D::is_current() const {
return false;
}
-bool Listener3D::_can_gizmo_scale() const {
- return false;
-}
-
-RES Listener3D::_get_gizmo_geometry() const {
- Ref<ArrayMesh> mesh = memnew(ArrayMesh);
-
- return mesh;
-}
-
-void Listener3D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("make_current"), &Listener3D::make_current);
- ClassDB::bind_method(D_METHOD("clear_current"), &Listener3D::clear_current);
- ClassDB::bind_method(D_METHOD("is_current"), &Listener3D::is_current);
- ClassDB::bind_method(D_METHOD("get_listener_transform"), &Listener3D::get_listener_transform);
+void AudioListener3D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("make_current"), &AudioListener3D::make_current);
+ ClassDB::bind_method(D_METHOD("clear_current"), &AudioListener3D::clear_current);
+ ClassDB::bind_method(D_METHOD("is_current"), &AudioListener3D::is_current);
+ ClassDB::bind_method(D_METHOD("get_listener_transform"), &AudioListener3D::get_listener_transform);
}
-Listener3D::Listener3D() {
+AudioListener3D::AudioListener3D() {
set_notify_transform(true);
- //active=false;
}
-Listener3D::~Listener3D() {
+AudioListener3D::~AudioListener3D() {
}
diff --git a/scene/3d/listener_3d.h b/scene/3d/audio_listener_3d.h
index 25eacf5135..492cacb0e9 100644
--- a/scene/3d/listener_3d.h
+++ b/scene/3d/audio_listener_3d.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* listener_3d.h */
+/* audio_listener_3d.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -33,8 +33,8 @@
#include "scene/3d/node_3d.h"
-class Listener3D : public Node3D {
- GDCLASS(Listener3D, Node3D);
+class AudioListener3D : public Node3D {
+ GDCLASS(AudioListener3D, Node3D);
private:
bool force_change = false;
@@ -42,9 +42,6 @@ private:
RID scenario_id;
- virtual bool _can_gizmo_scale() const;
- virtual RES _get_gizmo_geometry() const;
-
friend class Viewport;
void _update_audio_listener_state();
@@ -69,8 +66,8 @@ public:
void set_visible_layers(uint32_t p_layers);
uint32_t get_visible_layers() const;
- Listener3D();
- ~Listener3D();
+ AudioListener3D();
+ ~AudioListener3D();
};
#endif
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index d2424c9a3b..a54b10ba70 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -31,8 +31,8 @@
#include "audio_stream_player_3d.h"
#include "scene/3d/area_3d.h"
+#include "scene/3d/audio_listener_3d.h"
#include "scene/3d/camera_3d.h"
-#include "scene/3d/listener_3d.h"
#include "scene/main/viewport.h"
// Based on "A Novel Multichannel Panning Method for Standard and Arbitrary Loudspeaker Configurations" by Ramy Sadek and Chris Kyriakakis (2004)
@@ -95,7 +95,7 @@ static const Vector3 speaker_directions[7] = {
Vector3(1.0, 0.0, 0.0).normalized(), // side-right
};
-void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tightness, AudioStreamPlayer3D::Output &output) {
+void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tightness, Vector<AudioFrame> &output) {
unsigned int speaker_count = 0; // only main speakers (no LFE)
switch (AudioServer::get_singleton()->get_speaker_mode()) {
case AudioServer::SPEAKER_MODE_STEREO:
@@ -118,182 +118,94 @@ void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tig
switch (AudioServer::get_singleton()->get_speaker_mode()) {
case AudioServer::SPEAKER_SURROUND_71:
- output.vol[3].l = volumes[5]; // side-left
- output.vol[3].r = volumes[6]; // side-right
+ output.write[3].l = volumes[5]; // side-left
+ output.write[3].r = volumes[6]; // side-right
[[fallthrough]];
case AudioServer::SPEAKER_SURROUND_51:
- output.vol[2].l = volumes[3]; // rear-left
- output.vol[2].r = volumes[4]; // rear-right
+ output.write[2].l = volumes[3]; // rear-left
+ output.write[2].r = volumes[4]; // rear-right
[[fallthrough]];
case AudioServer::SPEAKER_SURROUND_31:
- output.vol[1].r = 1.0; // LFE - always full power
- output.vol[1].l = volumes[2]; // center
+ output.write[1].r = 1.0; // LFE - always full power
+ output.write[1].l = volumes[2]; // center
[[fallthrough]];
case AudioServer::SPEAKER_MODE_STEREO:
- output.vol[0].r = volumes[1]; // front-right
- output.vol[0].l = volumes[0]; // front-left
+ output.write[0].r = volumes[1]; // front-right
+ output.write[0].l = volumes[0]; // front-left
break;
}
}
-void AudioStreamPlayer3D::_mix_audio() {
- if (!stream_playback.is_valid() || !active.is_set() ||
- (stream_paused && !stream_paused_fade_out)) {
- return;
- }
-
- bool started = false;
- if (setseek.get() >= 0.0) {
- stream_playback->start(setseek.get());
- setseek.set(-1.0); //reset seek
- started = true;
- }
+void AudioStreamPlayer3D::_calc_reverb_vol(Area3D *area, Vector3 listener_area_pos, Vector<AudioFrame> direct_path_vol, Vector<AudioFrame> &reverb_vol) {
+ reverb_vol.resize(4);
+ reverb_vol.write[0] = AudioFrame(0, 0);
+ reverb_vol.write[1] = AudioFrame(0, 0);
+ reverb_vol.write[2] = AudioFrame(0, 0);
+ reverb_vol.write[3] = AudioFrame(0, 0);
- //get data
- AudioFrame *buffer = mix_buffer.ptrw();
- int buffer_size = mix_buffer.size();
+ float uniformity = area->get_reverb_uniformity();
+ float area_send = area->get_reverb_amount();
- if (stream_paused_fade_out) {
- // Short fadeout ramp
- buffer_size = MIN(buffer_size, 128);
- }
-
- // Mix if we're not paused or we're fading out
- if ((output_count.get() > 0 || out_of_range_mode == OUT_OF_RANGE_MIX)) {
- float output_pitch_scale = 0.0;
- if (output_count.get()) {
- //used for doppler, not realistic but good enough
- for (int i = 0; i < output_count.get(); i++) {
- output_pitch_scale += outputs[i].pitch_scale;
- }
- output_pitch_scale /= float(output_count.get());
- } else {
- output_pitch_scale = 1.0;
- }
+ if (uniformity > 0.0) {
+ float distance = listener_area_pos.length();
+ float attenuation = Math::db2linear(_get_attenuation_db(distance));
- stream_playback->mix(buffer, pitch_scale * output_pitch_scale, buffer_size);
- }
+ // Determine the fraction of sound that would come from each speaker if they were all driven uniformly.
+ float center_val[3] = { 0.5f, 0.25f, 0.16666f };
+ int channel_count = AudioServer::get_singleton()->get_channel_count();
+ AudioFrame center_frame(center_val[channel_count - 1], center_val[channel_count - 1]);
- //write all outputs
- for (int i = 0; i < output_count.get(); i++) {
- Output current = outputs[i];
+ if (attenuation < 1.0) {
+ //pan the uniform sound
+ Vector3 rev_pos = listener_area_pos;
+ rev_pos.y = 0;
+ rev_pos.normalize();
- //see if current output exists, to keep volume ramp
- bool found = false;
- for (int j = i; j < prev_output_count; j++) {
- if (prev_outputs[j].viewport == current.viewport) {
- if (j != i) {
- SWAP(prev_outputs[j], prev_outputs[i]);
- }
- found = true;
- break;
+ if (channel_count >= 1) {
+ // Stereo pair
+ float c = rev_pos.x * 0.5 + 0.5;
+ reverb_vol.write[0].l = 1.0 - c;
+ reverb_vol.write[0].r = c;
}
- }
- bool interpolate_filter = !started;
+ if (channel_count >= 3) {
+ // Center pair + Side pair
+ float xl = Vector3(-1, 0, -1).normalized().dot(rev_pos) * 0.5 + 0.5;
+ float xr = Vector3(1, 0, -1).normalized().dot(rev_pos) * 0.5 + 0.5;
- if (!found) {
- //create new if was not used before
- if (prev_output_count < MAX_OUTPUTS) {
- prev_outputs[prev_output_count] = prev_outputs[i]; //may be owned by another viewport
- prev_output_count++;
+ reverb_vol.write[1].l = xl;
+ reverb_vol.write[1].r = xr;
+ reverb_vol.write[2].l = 1.0 - xr;
+ reverb_vol.write[2].r = 1.0 - xl;
}
- prev_outputs[i] = current;
- interpolate_filter = false;
- }
-
- //mix!
-
- int buffers = AudioServer::get_singleton()->get_channel_count();
-
- for (int k = 0; k < buffers; k++) {
- AudioFrame target_volume = stream_paused_fade_out ? AudioFrame(0.f, 0.f) : current.vol[k];
- AudioFrame vol_prev = stream_paused_fade_in ? AudioFrame(0.f, 0.f) : prev_outputs[i].vol[k];
- AudioFrame vol_inc = (target_volume - vol_prev) / float(buffer_size);
- AudioFrame vol = vol_prev;
- if (!AudioServer::get_singleton()->thread_has_channel_mix_buffer(current.bus_index, k)) {
- continue; //may have been deleted, will be updated on process
+ if (channel_count >= 4) {
+ // Rear pair
+ // FIXME: Not sure what math should be done here
+ float c = rev_pos.x * 0.5 + 0.5;
+ reverb_vol.write[3].l = 1.0 - c;
+ reverb_vol.write[3].r = c;
}
- AudioFrame *target = AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.bus_index, k);
- current.filter.set_mode(AudioFilterSW::HIGHSHELF);
- current.filter.set_sampling_rate(AudioServer::get_singleton()->get_mix_rate());
- current.filter.set_cutoff(attenuation_filter_cutoff_hz);
- current.filter.set_resonance(1);
- current.filter.set_stages(1);
- current.filter.set_gain(current.filter_gain);
-
- if (interpolate_filter) {
- current.filter_process[k * 2 + 0] = prev_outputs[i].filter_process[k * 2 + 0];
- current.filter_process[k * 2 + 1] = prev_outputs[i].filter_process[k * 2 + 1];
-
- current.filter_process[k * 2 + 0].set_filter(&current.filter, false);
- current.filter_process[k * 2 + 1].set_filter(&current.filter, false);
-
- current.filter_process[k * 2 + 0].update_coeffs(buffer_size);
- current.filter_process[k * 2 + 1].update_coeffs(buffer_size);
- for (int j = 0; j < buffer_size; j++) {
- AudioFrame f = buffer[j] * vol;
- current.filter_process[k * 2 + 0].process_one_interp(f.l);
- current.filter_process[k * 2 + 1].process_one_interp(f.r);
-
- target[j] += f;
- vol += vol_inc;
- }
- } else {
- current.filter_process[k * 2 + 0].set_filter(&current.filter);
- current.filter_process[k * 2 + 1].set_filter(&current.filter);
-
- current.filter_process[k * 2 + 0].update_coeffs();
- current.filter_process[k * 2 + 1].update_coeffs();
- for (int j = 0; j < buffer_size; j++) {
- AudioFrame f = buffer[j] * vol;
- current.filter_process[k * 2 + 0].process_one(f.l);
- current.filter_process[k * 2 + 1].process_one(f.r);
-
- target[j] += f;
- vol += vol_inc;
- }
+ for (int i = 0; i < channel_count; i++) {
+ reverb_vol.write[i] = reverb_vol[i].lerp(center_frame, attenuation);
}
-
- if (current.reverb_bus_index >= 0) {
- if (!AudioServer::get_singleton()->thread_has_channel_mix_buffer(current.reverb_bus_index, k)) {
- continue; //may have been deleted, will be updated on process
- }
-
- AudioFrame *rtarget = AudioServer::get_singleton()->thread_get_channel_mix_buffer(current.reverb_bus_index, k);
-
- if (current.reverb_bus_index == prev_outputs[i].reverb_bus_index) {
- AudioFrame rvol_inc = (current.reverb_vol[k] - prev_outputs[i].reverb_vol[k]) / float(buffer_size);
- AudioFrame rvol = prev_outputs[i].reverb_vol[k];
-
- for (int j = 0; j < buffer_size; j++) {
- rtarget[j] += buffer[j] * rvol;
- rvol += rvol_inc;
- }
- } else {
- AudioFrame rvol = current.reverb_vol[k];
- for (int j = 0; j < buffer_size; j++) {
- rtarget[j] += buffer[j] * rvol;
- }
- }
+ } else {
+ for (int i = 0; i < channel_count; i++) {
+ reverb_vol.write[i] = center_frame;
}
}
- prev_outputs[i] = current;
- }
-
- prev_output_count = output_count.get();
+ for (int i = 0; i < channel_count; i++) {
+ reverb_vol.write[i] = direct_path_vol[i].lerp(reverb_vol[i] * attenuation, uniformity);
+ reverb_vol.write[i] *= area_send;
+ }
- //stream is no longer active, disable this.
- if (!stream_playback->is_playing()) {
- active.clear();
+ } else {
+ for (int i = 0; i < 4; i++) {
+ reverb_vol.write[i] = direct_path_vol[i] * area_send;
+ }
}
-
- output_ready.clear();
- stream_paused_fade_in = false;
- stream_paused_fade_out = false;
}
float AudioStreamPlayer3D::_get_attenuation_db(float p_distance) const {
@@ -329,14 +241,15 @@ float AudioStreamPlayer3D::_get_attenuation_db(float p_distance) const {
void AudioStreamPlayer3D::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
velocity_tracker->reset(get_global_transform().origin);
- AudioServer::get_singleton()->add_callback(_mix_audios, this);
+ AudioServer::get_singleton()->add_listener_changed_callback(_listener_changed_cb, this);
if (autoplay && !Engine::get_singleton()->is_editor_hint()) {
play();
}
}
if (p_what == NOTIFICATION_EXIT_TREE) {
- AudioServer::get_singleton()->remove_callback(_mix_audios, this);
+ stop();
+ AudioServer::get_singleton()->remove_listener_changed_callback(_listener_changed_cb, this);
}
if (p_what == NOTIFICATION_PAUSED) {
@@ -358,281 +271,240 @@ void AudioStreamPlayer3D::_notification(int p_what) {
if (p_what == NOTIFICATION_INTERNAL_PHYSICS_PROCESS) {
//update anything related to position first, if possible of course
+ Vector<AudioFrame> volume_vector;
+ if (setplay.get() > 0 || (active.is_set() && last_mix_count != AudioServer::get_singleton()->get_mix_count())) {
+ volume_vector = _update_panning();
+ }
- if (!output_ready.is_set()) {
- Vector3 linear_velocity;
+ if (setplay.get() >= 0 && stream.is_valid()) {
+ active.set();
+ Ref<AudioStreamPlayback> new_playback = stream->instance_playback();
+ ERR_FAIL_COND_MSG(new_playback.is_null(), "Failed to instantiate playback.");
+ Map<StringName, Vector<AudioFrame>> bus_map;
+ bus_map[_get_actual_bus()] = volume_vector;
+ AudioServer::get_singleton()->start_playback_stream(new_playback, bus_map, setplay.get(), linear_attenuation, attenuation_filter_cutoff_hz, actual_pitch_scale);
+ stream_playbacks.push_back(new_playback);
+ setplay.set(-1);
+ }
- //compute linear velocity for doppler
- if (doppler_tracking != DOPPLER_TRACKING_DISABLED) {
- linear_velocity = velocity_tracker->get_tracked_linear_velocity();
+ if (!stream_playbacks.is_empty() && active.is_set()) {
+ // Stop playing if no longer active.
+ Vector<Ref<AudioStreamPlayback>> playbacks_to_remove;
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ if (playback.is_valid() && !AudioServer::get_singleton()->is_playback_active(playback) && !AudioServer::get_singleton()->is_playback_paused(playback)) {
+ emit_signal(SNAME("finished"));
+ playbacks_to_remove.push_back(playback);
+ }
}
+ // Now go through and remove playbacks that have finished. Removing elements from a Vector in a range based for is asking for trouble.
+ for (Ref<AudioStreamPlayback> &playback : playbacks_to_remove) {
+ stream_playbacks.erase(playback);
+ }
+ if (!playbacks_to_remove.is_empty() && stream_playbacks.is_empty()) {
+ // This node is no longer actively playing audio.
+ active.clear();
+ set_physics_process_internal(false);
+ }
+ }
- Ref<World3D> world_3d = get_world_3d();
- ERR_FAIL_COND(world_3d.is_null());
-
- int new_output_count = 0;
-
- Vector3 global_pos = get_global_transform().origin;
+ while (stream_playbacks.size() > max_polyphony) {
+ AudioServer::get_singleton()->stop_playback_stream(stream_playbacks[0]);
+ stream_playbacks.remove(0);
+ }
+ }
+}
- int bus_index = AudioServer::get_singleton()->thread_find_bus_index(bus);
+Area3D *AudioStreamPlayer3D::_get_overriding_area() {
+ //check if any area is diverting sound into a bus
+ Ref<World3D> world_3d = get_world_3d();
+ ERR_FAIL_COND_V(world_3d.is_null(), nullptr);
- //check if any area is diverting sound into a bus
+ Vector3 global_pos = get_global_transform().origin;
- PhysicsDirectSpaceState3D *space_state = PhysicsServer3D::get_singleton()->space_get_direct_state(world_3d->get_space());
+ PhysicsDirectSpaceState3D *space_state = PhysicsServer3D::get_singleton()->space_get_direct_state(world_3d->get_space());
- PhysicsDirectSpaceState3D::ShapeResult sr[MAX_INTERSECT_AREAS];
+ PhysicsDirectSpaceState3D::ShapeResult sr[MAX_INTERSECT_AREAS];
- int areas = space_state->intersect_point(global_pos, sr, MAX_INTERSECT_AREAS, Set<RID>(), area_mask, false, true);
- Area3D *area = nullptr;
+ int areas = space_state->intersect_point(global_pos, sr, MAX_INTERSECT_AREAS, Set<RID>(), area_mask, false, true);
- for (int i = 0; i < areas; i++) {
- if (!sr[i].collider) {
- continue;
- }
+ for (int i = 0; i < areas; i++) {
+ if (!sr[i].collider) {
+ continue;
+ }
- Area3D *tarea = Object::cast_to<Area3D>(sr[i].collider);
- if (!tarea) {
- continue;
- }
+ Area3D *tarea = Object::cast_to<Area3D>(sr[i].collider);
+ if (!tarea) {
+ continue;
+ }
- if (!tarea->is_overriding_audio_bus() && !tarea->is_using_reverb_bus()) {
- continue;
- }
+ if (!tarea->is_overriding_audio_bus() && !tarea->is_using_reverb_bus()) {
+ continue;
+ }
- area = tarea;
- break;
- }
+ return tarea;
+ }
+ return nullptr;
+}
- for (const Set<Camera3D *>::Element *E = world_3d->get_cameras().front(); E; E = E->next()) {
- Camera3D *camera = E->get();
- Viewport *vp = camera->get_viewport();
- if (!vp->is_audio_listener_3d()) {
- continue;
- }
+StringName AudioStreamPlayer3D::_get_actual_bus() {
+ Area3D *overriding_area = _get_overriding_area();
+ if (overriding_area && overriding_area->is_overriding_audio_bus() && !overriding_area->is_using_reverb_bus()) {
+ return overriding_area->get_audio_bus_name();
+ }
+ return bus;
+}
- bool listener_is_camera = true;
- Node3D *listener_node = camera;
+Vector<AudioFrame> AudioStreamPlayer3D::_update_panning() {
+ Vector<AudioFrame> output_volume_vector;
+ output_volume_vector.resize(4);
+ for (AudioFrame &frame : output_volume_vector) {
+ frame = AudioFrame(0, 0);
+ }
- Listener3D *listener = vp->get_listener_3d();
- if (listener) {
- listener_node = listener;
- listener_is_camera = false;
- }
+ if (!active.is_set() || stream.is_null()) {
+ return output_volume_vector;
+ }
- Vector3 local_pos = listener_node->get_global_transform().orthonormalized().affine_inverse().xform(global_pos);
+ Vector3 linear_velocity;
- float dist = local_pos.length();
+ //compute linear velocity for doppler
+ if (doppler_tracking != DOPPLER_TRACKING_DISABLED) {
+ linear_velocity = velocity_tracker->get_tracked_linear_velocity();
+ }
- Vector3 area_sound_pos;
- Vector3 listener_area_pos;
+ Vector3 global_pos = get_global_transform().origin;
- if (area && area->is_using_reverb_bus() && area->get_reverb_uniformity() > 0) {
- area_sound_pos = space_state->get_closest_point_to_object_volume(area->get_rid(), listener_node->get_global_transform().origin);
- listener_area_pos = listener_node->to_local(area_sound_pos);
- }
+ Ref<World3D> world_3d = get_world_3d();
+ ERR_FAIL_COND_V(world_3d.is_null(), output_volume_vector);
- if (max_distance > 0) {
- float total_max = max_distance;
+ Set<Camera3D *> cameras = world_3d->get_cameras();
+ cameras.insert(get_viewport()->get_camera_3d());
- if (area && area->is_using_reverb_bus() && area->get_reverb_uniformity() > 0) {
- total_max = MAX(total_max, listener_area_pos.length());
- }
- if (total_max > max_distance) {
- continue; //can't hear this sound in this listener
- }
- }
+ PhysicsDirectSpaceState3D *space_state = PhysicsServer3D::get_singleton()->space_get_direct_state(world_3d->get_space());
- float multiplier = Math::db2linear(_get_attenuation_db(dist));
- if (max_distance > 0) {
- multiplier *= MAX(0, 1.0 - (dist / max_distance));
- }
+ for (Camera3D *camera : cameras) {
+ Viewport *vp = camera->get_viewport();
+ if (!vp->is_audio_listener_3d()) {
+ continue;
+ }
- Output output;
- output.bus_index = bus_index;
- output.reverb_bus_index = -1; //no reverb by default
- output.viewport = vp;
+ bool listener_is_camera = true;
+ Node3D *listener_node = camera;
- float db_att = (1.0 - MIN(1.0, multiplier)) * attenuation_filter_db;
+ AudioListener3D *listener = vp->get_audio_listener_3d();
+ if (listener) {
+ listener_node = listener;
+ listener_is_camera = false;
+ }
- if (emission_angle_enabled) {
- Vector3 listenertopos = global_pos - listener_node->get_global_transform().origin;
- float c = listenertopos.normalized().dot(get_global_transform().basis.get_axis(2).normalized()); //it's z negative
- float angle = Math::rad2deg(Math::acos(c));
- if (angle > emission_angle) {
- db_att -= -emission_angle_filter_attenuation_db;
- }
- }
+ Vector3 local_pos = listener_node->get_global_transform().orthonormalized().affine_inverse().xform(global_pos);
- output.filter_gain = Math::db2linear(db_att);
+ float dist = local_pos.length();
- //TODO: The lower the second parameter (tightness) the more the sound will "enclose" the listener (more undirected / playing from
- // speakers not facing the source) - this could be made distance dependent.
- _calc_output_vol(local_pos.normalized(), 4.0, output);
+ Vector3 area_sound_pos;
+ Vector3 listener_area_pos;
- unsigned int cc = AudioServer::get_singleton()->get_channel_count();
- for (unsigned int k = 0; k < cc; k++) {
- output.vol[k] *= multiplier;
- }
+ Area3D *area = _get_overriding_area();
- bool filled_reverb = false;
- int vol_index_max = AudioServer::get_singleton()->get_speaker_mode() + 1;
-
- if (area) {
- if (area->is_overriding_audio_bus()) {
- //override audio bus
- StringName bus_name = area->get_audio_bus_name();
- output.bus_index = AudioServer::get_singleton()->thread_find_bus_index(bus_name);
- }
-
- if (area->is_using_reverb_bus()) {
- filled_reverb = true;
- StringName bus_name = area->get_reverb_bus();
- output.reverb_bus_index = AudioServer::get_singleton()->thread_find_bus_index(bus_name);
-
- float uniformity = area->get_reverb_uniformity();
- float area_send = area->get_reverb_amount();
-
- if (uniformity > 0.0) {
- float distance = listener_area_pos.length();
- float attenuation = Math::db2linear(_get_attenuation_db(distance));
-
- //float dist_att_db = -20 * Math::log(dist + 0.00001); //logarithmic attenuation, like in real life
-
- float center_val[3] = { 0.5f, 0.25f, 0.16666f };
- AudioFrame center_frame(center_val[vol_index_max - 1], center_val[vol_index_max - 1]);
-
- if (attenuation < 1.0) {
- //pan the uniform sound
- Vector3 rev_pos = listener_area_pos;
- rev_pos.y = 0;
- rev_pos.normalize();
-
- if (cc >= 1) {
- // Stereo pair
- float c = rev_pos.x * 0.5 + 0.5;
- output.reverb_vol[0].l = 1.0 - c;
- output.reverb_vol[0].r = c;
- }
-
- if (cc >= 3) {
- // Center pair + Side pair
- float xl = Vector3(-1, 0, -1).normalized().dot(rev_pos) * 0.5 + 0.5;
- float xr = Vector3(1, 0, -1).normalized().dot(rev_pos) * 0.5 + 0.5;
-
- output.reverb_vol[1].l = xl;
- output.reverb_vol[1].r = xr;
- output.reverb_vol[2].l = 1.0 - xr;
- output.reverb_vol[2].r = 1.0 - xl;
- }
-
- if (cc >= 4) {
- // Rear pair
- // FIXME: Not sure what math should be done here
- float c = rev_pos.x * 0.5 + 0.5;
- output.reverb_vol[3].l = 1.0 - c;
- output.reverb_vol[3].r = c;
- }
-
- for (int i = 0; i < vol_index_max; i++) {
- output.reverb_vol[i] = output.reverb_vol[i].lerp(center_frame, attenuation);
- }
- } else {
- for (int i = 0; i < vol_index_max; i++) {
- output.reverb_vol[i] = center_frame;
- }
- }
-
- for (int i = 0; i < vol_index_max; i++) {
- output.reverb_vol[i] = output.vol[i].lerp(output.reverb_vol[i] * attenuation, uniformity);
- output.reverb_vol[i] *= area_send;
- }
-
- } else {
- for (int i = 0; i < vol_index_max; i++) {
- output.reverb_vol[i] = output.vol[i] * area_send;
- }
- }
- }
- }
+ if (area && area->is_using_reverb_bus() && area->get_reverb_uniformity() > 0) {
+ area_sound_pos = space_state->get_closest_point_to_object_volume(area->get_rid(), listener_node->get_global_transform().origin);
+ listener_area_pos = listener_node->get_global_transform().affine_inverse().xform(area_sound_pos);
+ }
- if (doppler_tracking != DOPPLER_TRACKING_DISABLED) {
- Vector3 listener_velocity;
+ if (max_distance > 0) {
+ float total_max = max_distance;
- if (listener_is_camera) {
- listener_velocity = camera->get_doppler_tracked_velocity();
- }
+ if (area && area->is_using_reverb_bus() && area->get_reverb_uniformity() > 0) {
+ total_max = MAX(total_max, listener_area_pos.length());
+ }
+ if (total_max > max_distance) {
+ continue; //can't hear this sound in this listener
+ }
+ }
- Vector3 local_velocity = listener_node->get_global_transform().orthonormalized().basis.xform_inv(linear_velocity - listener_velocity);
+ float multiplier = Math::db2linear(_get_attenuation_db(dist));
+ if (max_distance > 0) {
+ multiplier *= MAX(0, 1.0 - (dist / max_distance));
+ }
- if (local_velocity == Vector3()) {
- output.pitch_scale = 1.0;
- } else {
- float approaching = local_pos.normalized().dot(local_velocity.normalized());
- float velocity = local_velocity.length();
- float speed_of_sound = 343.0;
+ float db_att = (1.0 - MIN(1.0, multiplier)) * attenuation_filter_db;
- output.pitch_scale = speed_of_sound / (speed_of_sound + velocity * approaching);
- output.pitch_scale = CLAMP(output.pitch_scale, (1 / 8.0), 8.0); //avoid crazy stuff
- }
+ if (emission_angle_enabled) {
+ Vector3 listenertopos = global_pos - listener_node->get_global_transform().origin;
+ float c = listenertopos.normalized().dot(get_global_transform().basis.get_axis(2).normalized()); //it's z negative
+ float angle = Math::rad2deg(Math::acos(c));
+ if (angle > emission_angle) {
+ db_att -= -emission_angle_filter_attenuation_db;
+ }
+ }
- } else {
- output.pitch_scale = 1.0;
- }
+ linear_attenuation = Math::db2linear(db_att);
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->set_playback_highshelf_params(playback, linear_attenuation, attenuation_filter_cutoff_hz);
+ }
+ //TODO: The lower the second parameter (tightness) the more the sound will "enclose" the listener (more undirected / playing from
+ // speakers not facing the source) - this could be made distance dependent.
+ _calc_output_vol(local_pos.normalized(), 4.0, output_volume_vector);
- if (!filled_reverb) {
- for (int i = 0; i < vol_index_max; i++) {
- output.reverb_vol[i] = AudioFrame(0, 0);
- }
- }
+ for (unsigned int k = 0; k < 4; k++) {
+ output_volume_vector.write[k] = multiplier * output_volume_vector[k];
+ }
- outputs[new_output_count] = output;
- new_output_count++;
- if (new_output_count == MAX_OUTPUTS) {
- break;
- }
+ Map<StringName, Vector<AudioFrame>> bus_volumes;
+ if (area) {
+ if (area->is_overriding_audio_bus()) {
+ //override audio bus
+ bus_volumes[area->get_audio_bus_name()] = output_volume_vector;
}
- output_count.set(new_output_count);
- output_ready.set();
- }
-
- //start playing if requested
- if (setplay.get() >= 0.0) {
- setseek.set(setplay.get());
- active.set();
- setplay.set(-1);
+ if (area->is_using_reverb_bus()) {
+ StringName reverb_bus_name = area->get_reverb_bus();
+ Vector<AudioFrame> reverb_vol;
+ _calc_reverb_vol(area, listener_area_pos, output_volume_vector, reverb_vol);
+ bus_volumes[reverb_bus_name] = reverb_vol;
+ }
+ } else {
+ bus_volumes[bus] = output_volume_vector;
}
- //stop playing if no longer active
- if (!active.is_set()) {
- set_physics_process_internal(false);
- emit_signal(SNAME("finished"));
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->set_playback_bus_volumes_linear(playback, bus_volumes);
}
- }
-}
-void AudioStreamPlayer3D::set_stream(Ref<AudioStream> p_stream) {
- AudioServer::get_singleton()->lock();
+ if (doppler_tracking != DOPPLER_TRACKING_DISABLED) {
+ Vector3 listener_velocity;
- mix_buffer.resize(AudioServer::get_singleton()->thread_get_mix_buffer_size());
+ if (listener_is_camera) {
+ listener_velocity = camera->get_doppler_tracked_velocity();
+ }
- if (stream_playback.is_valid()) {
- stream_playback.unref();
- stream.unref();
- active.clear();
- setseek.set(-1);
- }
+ Vector3 local_velocity = listener_node->get_global_transform().orthonormalized().basis.xform_inv(linear_velocity - listener_velocity);
- if (p_stream.is_valid()) {
- stream = p_stream;
- stream_playback = p_stream->instance_playback();
- }
+ if (local_velocity != Vector3()) {
+ float approaching = local_pos.normalized().dot(local_velocity.normalized());
+ float velocity = local_velocity.length();
+ float speed_of_sound = 343.0;
- AudioServer::get_singleton()->unlock();
+ float doppler_pitch_scale = pitch_scale * speed_of_sound / (speed_of_sound + velocity * approaching);
+ doppler_pitch_scale = CLAMP(doppler_pitch_scale, (1 / 8.0), 8.0); //avoid crazy stuff
- if (p_stream.is_valid() && stream_playback.is_null()) {
- stream.unref();
+ actual_pitch_scale = doppler_pitch_scale;
+ } else {
+ actual_pitch_scale = pitch_scale;
+ }
+ } else {
+ actual_pitch_scale = pitch_scale;
+ }
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->set_playback_pitch_scale(playback, actual_pitch_scale);
+ }
}
+ return output_volume_vector;
+}
+
+void AudioStreamPlayer3D::set_stream(Ref<AudioStream> p_stream) {
+ stop();
+ stream = p_stream;
}
Ref<AudioStream> AudioStreamPlayer3D::get_stream() const {
@@ -673,49 +545,47 @@ float AudioStreamPlayer3D::get_pitch_scale() const {
}
void AudioStreamPlayer3D::play(float p_from_pos) {
- if (!is_playing()) {
- // Reset the prev_output_count if the stream is stopped
- prev_output_count = 0;
+ if (stream.is_null()) {
+ return;
}
-
- if (stream_playback.is_valid()) {
- setplay.set(p_from_pos);
- output_ready.clear();
- set_physics_process_internal(true);
+ ERR_FAIL_COND_MSG(!is_inside_tree(), "Playback can only happen when a node is inside the scene tree");
+ if (stream->is_monophonic() && is_playing()) {
+ stop();
}
+ setplay.set(p_from_pos);
+ active.set();
+ set_physics_process_internal(true);
}
void AudioStreamPlayer3D::seek(float p_seconds) {
- if (stream_playback.is_valid()) {
- setseek.set(p_seconds);
- }
+ stop();
+ play(p_seconds);
}
void AudioStreamPlayer3D::stop() {
- if (stream_playback.is_valid()) {
- active.clear();
- set_physics_process_internal(false);
- setplay.set(-1);
+ setplay.set(-1);
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->stop_playback_stream(playback);
}
+ stream_playbacks.clear();
+ active.clear();
+ set_physics_process_internal(false);
}
bool AudioStreamPlayer3D::is_playing() const {
- if (stream_playback.is_valid()) {
- return active.is_set() || setplay.get() >= 0;
+ for (const Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ if (AudioServer::get_singleton()->is_playback_active(playback)) {
+ return true;
+ }
}
-
return false;
}
float AudioStreamPlayer3D::get_playback_position() {
- if (stream_playback.is_valid()) {
- float ss = setseek.get();
- if (ss >= 0.0) {
- return ss;
- }
- return stream_playback->get_playback_position();
+ // Return the playback position of the most recently started playback stream.
+ if (!stream_playbacks.is_empty()) {
+ return AudioServer::get_singleton()->get_playback_position(stream_playbacks[stream_playbacks.size() - 1]);
}
-
return 0;
}
@@ -732,7 +602,7 @@ StringName AudioStreamPlayer3D::get_bus() const {
return bus;
}
}
- return "Master";
+ return SNAME("Master");
}
void AudioStreamPlayer3D::set_autoplay(bool p_enable) {
@@ -843,15 +713,6 @@ AudioStreamPlayer3D::AttenuationModel AudioStreamPlayer3D::get_attenuation_model
return attenuation_model;
}
-void AudioStreamPlayer3D::set_out_of_range_mode(OutOfRangeMode p_mode) {
- ERR_FAIL_INDEX((int)p_mode, 2);
- out_of_range_mode = p_mode;
-}
-
-AudioStreamPlayer3D::OutOfRangeMode AudioStreamPlayer3D::get_out_of_range_mode() const {
- return out_of_range_mode;
-}
-
void AudioStreamPlayer3D::set_doppler_tracking(DopplerTracking p_tracking) {
if (doppler_tracking == p_tracking) {
return;
@@ -875,19 +736,35 @@ AudioStreamPlayer3D::DopplerTracking AudioStreamPlayer3D::get_doppler_tracking()
}
void AudioStreamPlayer3D::set_stream_paused(bool p_pause) {
- if (p_pause != stream_paused) {
- stream_paused = p_pause;
- stream_paused_fade_in = !stream_paused;
- stream_paused_fade_out = stream_paused;
+ // TODO this does not have perfect recall, fix that maybe? If there are zero playbacks registered with the AudioServer, this bool isn't persisted.
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->set_playback_paused(playback, p_pause);
}
}
bool AudioStreamPlayer3D::get_stream_paused() const {
- return stream_paused;
+ // There's currently no way to pause some playback streams but not others. Check the first and don't bother looking at the rest.
+ if (!stream_playbacks.is_empty()) {
+ return AudioServer::get_singleton()->is_playback_paused(stream_playbacks[0]);
+ }
+ return false;
}
Ref<AudioStreamPlayback> AudioStreamPlayer3D::get_stream_playback() {
- return stream_playback;
+ if (!stream_playbacks.is_empty()) {
+ return stream_playbacks[stream_playbacks.size() - 1];
+ }
+ return nullptr;
+}
+
+void AudioStreamPlayer3D::set_max_polyphony(int p_max_polyphony) {
+ if (p_max_polyphony > 0) {
+ max_polyphony = p_max_polyphony;
+ }
+}
+
+int AudioStreamPlayer3D::get_max_polyphony() const {
+ return max_polyphony;
}
void AudioStreamPlayer3D::_bind_methods() {
@@ -946,15 +823,15 @@ void AudioStreamPlayer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_attenuation_model", "model"), &AudioStreamPlayer3D::set_attenuation_model);
ClassDB::bind_method(D_METHOD("get_attenuation_model"), &AudioStreamPlayer3D::get_attenuation_model);
- ClassDB::bind_method(D_METHOD("set_out_of_range_mode", "mode"), &AudioStreamPlayer3D::set_out_of_range_mode);
- ClassDB::bind_method(D_METHOD("get_out_of_range_mode"), &AudioStreamPlayer3D::get_out_of_range_mode);
-
ClassDB::bind_method(D_METHOD("set_doppler_tracking", "mode"), &AudioStreamPlayer3D::set_doppler_tracking);
ClassDB::bind_method(D_METHOD("get_doppler_tracking"), &AudioStreamPlayer3D::get_doppler_tracking);
ClassDB::bind_method(D_METHOD("set_stream_paused", "pause"), &AudioStreamPlayer3D::set_stream_paused);
ClassDB::bind_method(D_METHOD("get_stream_paused"), &AudioStreamPlayer3D::get_stream_paused);
+ ClassDB::bind_method(D_METHOD("set_max_polyphony", "max_polyphony"), &AudioStreamPlayer3D::set_max_polyphony);
+ ClassDB::bind_method(D_METHOD("get_max_polyphony"), &AudioStreamPlayer3D::get_max_polyphony);
+
ClassDB::bind_method(D_METHOD("get_stream_playback"), &AudioStreamPlayer3D::get_stream_playback);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream");
@@ -967,7 +844,7 @@ void AudioStreamPlayer3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "max_distance", PROPERTY_HINT_RANGE, "0,4096,1,or_greater,exp"), "set_max_distance", "get_max_distance");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "out_of_range_mode", PROPERTY_HINT_ENUM, "Mix,Pause"), "set_out_of_range_mode", "get_out_of_range_mode");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "max_polyphony", PROPERTY_HINT_NONE, ""), "set_max_polyphony", "get_max_polyphony");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask");
ADD_GROUP("Emission Angle", "emission_angle");
@@ -985,9 +862,6 @@ void AudioStreamPlayer3D::_bind_methods() {
BIND_ENUM_CONSTANT(ATTENUATION_LOGARITHMIC);
BIND_ENUM_CONSTANT(ATTENUATION_DISABLED);
- BIND_ENUM_CONSTANT(OUT_OF_RANGE_MIX);
- BIND_ENUM_CONSTANT(OUT_OF_RANGE_PAUSE);
-
BIND_ENUM_CONSTANT(DOPPLER_TRACKING_DISABLED);
BIND_ENUM_CONSTANT(DOPPLER_TRACKING_IDLE_STEP);
BIND_ENUM_CONSTANT(DOPPLER_TRACKING_PHYSICS_STEP);
diff --git a/scene/3d/audio_stream_player_3d.h b/scene/3d/audio_stream_player_3d.h
index f86e19403c..697bbe2381 100644
--- a/scene/3d/audio_stream_player_3d.h
+++ b/scene/3d/audio_stream_player_3d.h
@@ -31,10 +31,13 @@
#ifndef AUDIO_STREAM_PLAYER_3D_H
#define AUDIO_STREAM_PLAYER_3D_H
+#include "core/os/mutex.h"
+#include "scene/3d/area_3d.h"
#include "scene/3d/node_3d.h"
#include "scene/3d/velocity_tracker_3d.h"
#include "servers/audio/audio_filter_sw.h"
#include "servers/audio/audio_stream.h"
+#include "servers/audio_server.h"
class Camera3D;
class AudioStreamPlayer3D : public Node3D {
@@ -48,11 +51,6 @@ public:
ATTENUATION_DISABLED,
};
- enum OutOfRangeMode {
- OUT_OF_RANGE_MIX,
- OUT_OF_RANGE_PAUSE,
- };
-
enum DopplerTracking {
DOPPLER_TRACKING_DISABLED,
DOPPLER_TRACKING_IDLE_STEP,
@@ -66,32 +64,10 @@ private:
};
- struct Output {
- AudioFilterSW filter;
- AudioFilterSW::Processor filter_process[8];
- AudioFrame vol[4];
- float filter_gain = 0.0;
- float pitch_scale = 0.0;
- int bus_index = -1;
- int reverb_bus_index = -1;
- AudioFrame reverb_vol[4];
- Viewport *viewport = nullptr; //pointer only used for reference to previous mix
- };
-
- Output outputs[MAX_OUTPUTS];
- SafeNumeric<int> output_count;
- SafeFlag output_ready;
-
- //these are used by audio thread to have a reference of previous volumes (for ramping volume and avoiding clicks)
- Output prev_outputs[MAX_OUTPUTS];
- int prev_output_count = 0;
-
- Ref<AudioStreamPlayback> stream_playback;
+ Vector<Ref<AudioStreamPlayback>> stream_playbacks;
Ref<AudioStream> stream;
- Vector<AudioFrame> mix_buffer;
- SafeNumeric<float> setseek{ -1.0 };
- SafeFlag active;
+ SafeFlag active{ false };
SafeNumeric<float> setplay{ -1.0 };
AttenuationModel attenuation_model = ATTENUATION_INVERSE_DISTANCE;
@@ -99,18 +75,25 @@ private:
float unit_size = 10.0;
float max_db = 3.0;
float pitch_scale = 1.0;
+ // Internally used to take doppler tracking into account.
+ float actual_pitch_scale = 1.0;
bool autoplay = false;
- bool stream_paused = false;
- bool stream_paused_fade_in = false;
- bool stream_paused_fade_out = false;
- StringName bus;
+ StringName bus = SNAME("Master");
+ int max_polyphony = 1;
+
+ uint64_t last_mix_count = -1;
- static void _calc_output_vol(const Vector3 &source_dir, real_t tightness, Output &output);
- void _mix_audio();
- static void _mix_audios(void *self) { reinterpret_cast<AudioStreamPlayer3D *>(self)->_mix_audio(); }
+ static void _calc_output_vol(const Vector3 &source_dir, real_t tightness, Vector<AudioFrame> &output);
+
+ void _calc_reverb_vol(Area3D *area, Vector3 listener_area_pos, Vector<AudioFrame> direct_path_vol, Vector<AudioFrame> &reverb_vol);
+
+ static void _listener_changed_cb(void *self) { reinterpret_cast<AudioStreamPlayer3D *>(self)->_update_panning(); }
void _set_playing(bool p_enable);
bool _is_active() const;
+ StringName _get_actual_bus();
+ Area3D *_get_overriding_area();
+ Vector<AudioFrame> _update_panning();
void _bus_layout_changed();
@@ -122,14 +105,14 @@ private:
float attenuation_filter_cutoff_hz = 5000.0;
float attenuation_filter_db = -24.0;
+ float linear_attenuation = 0;
+
float max_distance = 0.0;
Ref<VelocityTracker3D> velocity_tracker;
DopplerTracking doppler_tracking = DOPPLER_TRACKING_DISABLED;
- OutOfRangeMode out_of_range_mode = OUT_OF_RANGE_MIX;
-
float _get_attenuation_db(float p_distance) const;
protected:
@@ -162,6 +145,9 @@ public:
void set_bus(const StringName &p_bus);
StringName get_bus() const;
+ void set_max_polyphony(int p_max_polyphony);
+ int get_max_polyphony() const;
+
void set_autoplay(bool p_enable);
bool is_autoplay_enabled();
@@ -189,9 +175,6 @@ public:
void set_attenuation_model(AttenuationModel p_model);
AttenuationModel get_attenuation_model() const;
- void set_out_of_range_mode(OutOfRangeMode p_mode);
- OutOfRangeMode get_out_of_range_mode() const;
-
void set_doppler_tracking(DopplerTracking p_tracking);
DopplerTracking get_doppler_tracking() const;
@@ -205,6 +188,5 @@ public:
};
VARIANT_ENUM_CAST(AudioStreamPlayer3D::AttenuationModel)
-VARIANT_ENUM_CAST(AudioStreamPlayer3D::OutOfRangeMode)
VARIANT_ENUM_CAST(AudioStreamPlayer3D::DopplerTracking)
#endif // AUDIO_STREAM_PLAYER_3D_H
diff --git a/scene/3d/bone_attachment_3d.cpp b/scene/3d/bone_attachment_3d.cpp
index 70361f4787..afd11482e3 100644
--- a/scene/3d/bone_attachment_3d.cpp
+++ b/scene/3d/bone_attachment_3d.cpp
@@ -110,7 +110,7 @@ TypedArray<String> BoneAttachment3D::get_configuration_warnings() const {
} else {
Skeleton3D *parent = Object::cast_to<Skeleton3D>(get_parent());
if (!parent) {
- warnings.append(TTR("Parent node is not a Skeleton3D node! Please use an extenral Skeleton3D if you intend to use the BoneAttachment3D without it being a child of a Skeleton3D node."));
+ warnings.append(TTR("Parent node is not a Skeleton3D node! Please use an external Skeleton3D if you intend to use the BoneAttachment3D without it being a child of a Skeleton3D node."));
}
}
@@ -161,7 +161,7 @@ void BoneAttachment3D::_check_bind() {
bone_idx = sk->find_bone(bone_name);
}
if (bone_idx != -1) {
- sk->call_deferred("connect", "bone_pose_changed", callable_mp(this, &BoneAttachment3D::on_bone_pose_update));
+ sk->call_deferred(SNAME("connect"), "bone_pose_changed", callable_mp(this, &BoneAttachment3D::on_bone_pose_update));
bound = true;
call_deferred(SNAME("on_bone_pose_update"), bone_idx);
}
diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp
index 3ada9072c2..9aad338d15 100644
--- a/scene/3d/camera_3d.cpp
+++ b/scene/3d/camera_3d.cpp
@@ -254,10 +254,6 @@ bool Camera3D::is_current() const {
}
}
-bool Camera3D::_can_gizmo_scale() const {
- return false;
-}
-
Vector3 Camera3D::project_ray_normal(const Point2 &p_pos) const {
Vector3 ray = project_local_ray_normal(p_pos);
return get_camera_transform().basis.xform(ray).normalized();
diff --git a/scene/3d/camera_3d.h b/scene/3d/camera_3d.h
index 3b704944b0..c1af7fa4f7 100644
--- a/scene/3d/camera_3d.h
+++ b/scene/3d/camera_3d.h
@@ -79,8 +79,6 @@ private:
Ref<Environment> environment;
Ref<CameraEffects> effects;
- virtual bool _can_gizmo_scale() const;
-
// void _camera_make_current(Node *p_camera);
friend class Viewport;
void _update_audio_listener_state();
diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp
index 36d9bfba82..e2f953974a 100644
--- a/scene/3d/collision_object_3d.cpp
+++ b/scene/3d/collision_object_3d.cpp
@@ -254,10 +254,8 @@ void CollisionObject3D::_apply_enabled() {
}
}
-void CollisionObject3D::_input_event(Node *p_camera, const Ref<InputEvent> &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape) {
- if (get_script_instance()) {
- get_script_instance()->call(SceneStringNames::get_singleton()->_input_event, p_camera, p_input_event, p_pos, p_normal, p_shape);
- }
+void CollisionObject3D::_input_event_call(Camera3D *p_camera, const Ref<InputEvent> &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape) {
+ GDVIRTUAL_CALL(_input_event, p_camera, p_input_event, p_pos, p_normal, p_shape);
emit_signal(SceneStringNames::get_singleton()->input_event, p_camera, p_input_event, p_pos, p_normal, p_shape);
}
@@ -453,7 +451,7 @@ void CollisionObject3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("shape_owner_clear_shapes", "owner_id"), &CollisionObject3D::shape_owner_clear_shapes);
ClassDB::bind_method(D_METHOD("shape_find_owner", "shape_index"), &CollisionObject3D::shape_find_owner);
- BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "camera"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::VECTOR3, "position"), PropertyInfo(Variant::VECTOR3, "normal"), PropertyInfo(Variant::INT, "shape_idx")));
+ GDVIRTUAL_BIND(_input_event, "camera", "event", "position", "normal", "shape_idx");
ADD_SIGNAL(MethodInfo("input_event", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Node"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::VECTOR3, "position"), PropertyInfo(Variant::VECTOR3, "normal"), PropertyInfo(Variant::INT, "shape_idx")));
ADD_SIGNAL(MethodInfo("mouse_entered"));
diff --git a/scene/3d/collision_object_3d.h b/scene/3d/collision_object_3d.h
index c066960eb4..1c7e205888 100644
--- a/scene/3d/collision_object_3d.h
+++ b/scene/3d/collision_object_3d.h
@@ -31,6 +31,7 @@
#ifndef COLLISION_OBJECT_3D_H
#define COLLISION_OBJECT_3D_H
+#include "scene/3d/camera_3d.h"
#include "scene/3d/node_3d.h"
class CollisionObject3D : public Node3D {
@@ -101,7 +102,7 @@ protected:
void _on_transform_changed();
friend class Viewport;
- virtual void _input_event(Node *p_camera, const Ref<InputEvent> &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape);
+ virtual void _input_event_call(Camera3D *p_camera, const Ref<InputEvent> &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape);
virtual void _mouse_enter();
virtual void _mouse_exit();
@@ -110,6 +111,7 @@ protected:
void set_only_update_transform_changes(bool p_enable);
bool is_only_update_transform_changes_enabled() const;
+ GDVIRTUAL5(_input_event, Camera3D *, Ref<InputEvent>, Vector3, Vector3, int)
public:
void set_collision_layer(uint32_t p_layer);
uint32_t get_collision_layer() const;
diff --git a/scene/3d/collision_polygon_3d.cpp b/scene/3d/collision_polygon_3d.cpp
index d5835586f9..6328d9c67d 100644
--- a/scene/3d/collision_polygon_3d.cpp
+++ b/scene/3d/collision_polygon_3d.cpp
@@ -170,7 +170,7 @@ TypedArray<String> CollisionPolygon3D::get_configuration_warnings() const {
TypedArray<String> warnings = Node::get_configuration_warnings();
if (!Object::cast_to<CollisionObject3D>(get_parent())) {
- warnings.push_back(TTR("CollisionPolygon3D only serves to provide a collision shape to a CollisionObject3D derived node. Please only use it as a child of Area3D, StaticBody3D, RigidBody3D, CharacterBody3D, etc. to give them a shape."));
+ warnings.push_back(TTR("CollisionPolygon3D only serves to provide a collision shape to a CollisionObject3D derived node. Please only use it as a child of Area3D, StaticBody3D, RigidDynamicBody3D, CharacterBody3D, etc. to give them a shape."));
}
if (polygon.is_empty()) {
diff --git a/scene/3d/collision_shape_3d.cpp b/scene/3d/collision_shape_3d.cpp
index d4668a24f2..4e496fba47 100644
--- a/scene/3d/collision_shape_3d.cpp
+++ b/scene/3d/collision_shape_3d.cpp
@@ -115,7 +115,7 @@ TypedArray<String> CollisionShape3D::get_configuration_warnings() const {
TypedArray<String> warnings = Node::get_configuration_warnings();
if (!Object::cast_to<CollisionObject3D>(get_parent())) {
- warnings.push_back(TTR("CollisionShape3D only serves to provide a collision shape to a CollisionObject3D derived node. Please only use it as a child of Area3D, StaticBody3D, RigidBody3D, CharacterBody3D, etc. to give them a shape."));
+ warnings.push_back(TTR("CollisionShape3D only serves to provide a collision shape to a CollisionObject3D derived node. Please only use it as a child of Area3D, StaticBody3D, RigidDynamicBody3D, CharacterBody3D, etc. to give them a shape."));
}
if (!shape.is_valid()) {
@@ -123,10 +123,9 @@ TypedArray<String> CollisionShape3D::get_configuration_warnings() const {
}
if (shape.is_valid() &&
- Object::cast_to<RigidBody3D>(get_parent()) &&
- Object::cast_to<ConcavePolygonShape3D>(*shape) &&
- Object::cast_to<RigidBody3D>(get_parent())->get_mode() != RigidBody3D::MODE_STATIC) {
- warnings.push_back(TTR("ConcavePolygonShape3D doesn't support RigidBody3D in another mode than static."));
+ Object::cast_to<RigidDynamicBody3D>(get_parent()) &&
+ Object::cast_to<ConcavePolygonShape3D>(*shape)) {
+ warnings.push_back(TTR("ConcavePolygonShape3D doesn't support RigidDynamicBody3D in another mode than static."));
}
return warnings;
diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp
index e2095940ff..48ef41e015 100644
--- a/scene/3d/cpu_particles_3d.cpp
+++ b/scene/3d/cpu_particles_3d.cpp
@@ -212,7 +212,7 @@ TypedArray<String> CPUParticles3D::get_configuration_warnings() const {
warnings.push_back(TTR("Nothing is visible because no mesh has been assigned."));
}
- if (!anim_material_found && (get_param(PARAM_ANIM_SPEED) != 0.0 || get_param(PARAM_ANIM_OFFSET) != 0.0 ||
+ if (!anim_material_found && (get_param_max(PARAM_ANIM_SPEED) != 0.0 || get_param_max(PARAM_ANIM_OFFSET) != 0.0 ||
get_param_curve(PARAM_ANIM_SPEED).is_valid() || get_param_curve(PARAM_ANIM_OFFSET).is_valid())) {
warnings.push_back(TTR("CPUParticles3D animation requires the usage of a StandardMaterial3D whose Billboard Mode is set to \"Particle Billboard\"."));
}
@@ -263,28 +263,33 @@ real_t CPUParticles3D::get_flatness() const {
return flatness;
}
-void CPUParticles3D::set_param(Parameter p_param, real_t p_value) {
+void CPUParticles3D::set_param_min(Parameter p_param, real_t p_value) {
ERR_FAIL_INDEX(p_param, PARAM_MAX);
- parameters[p_param] = p_value;
+ parameters_min[p_param] = p_value;
+ if (parameters_min[p_param] > parameters_max[p_param]) {
+ set_param_max(p_param, p_value);
+ }
}
-real_t CPUParticles3D::get_param(Parameter p_param) const {
+real_t CPUParticles3D::get_param_min(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
- return parameters[p_param];
+ return parameters_min[p_param];
}
-void CPUParticles3D::set_param_randomness(Parameter p_param, real_t p_value) {
+void CPUParticles3D::set_param_max(Parameter p_param, real_t p_value) {
ERR_FAIL_INDEX(p_param, PARAM_MAX);
-
- randomness[p_param] = p_value;
+ parameters_max[p_param] = p_value;
+ if (parameters_min[p_param] > parameters_max[p_param]) {
+ set_param_min(p_param, p_value);
+ }
}
-real_t CPUParticles3D::get_param_randomness(Parameter p_param) const {
+real_t CPUParticles3D::get_param_max(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
- return randomness[p_param];
+ return parameters_max[p_param];
}
static void _adjust_curve_range(const Ref<Curve> &p_curve, real_t p_min, real_t p_max) {
@@ -417,6 +422,23 @@ void CPUParticles3D::set_emission_ring_inner_radius(real_t p_radius) {
emission_ring_inner_radius = p_radius;
}
+void CPUParticles3D::set_scale_curve_x(Ref<Curve> p_scale_curve) {
+ scale_curve_x = p_scale_curve;
+}
+
+void CPUParticles3D::set_scale_curve_y(Ref<Curve> p_scale_curve) {
+ scale_curve_y = p_scale_curve;
+}
+
+void CPUParticles3D::set_scale_curve_z(Ref<Curve> p_scale_curve) {
+ scale_curve_z = p_scale_curve;
+}
+
+void CPUParticles3D::set_split_scale(bool p_split_scale) {
+ split_scale = p_split_scale;
+ notify_property_list_changed();
+}
+
real_t CPUParticles3D::get_emission_sphere_radius() const {
return emission_sphere_radius;
}
@@ -465,6 +487,22 @@ Vector3 CPUParticles3D::get_gravity() const {
return gravity;
}
+Ref<Curve> CPUParticles3D::get_scale_curve_x() const {
+ return scale_curve_x;
+}
+
+Ref<Curve> CPUParticles3D::get_scale_curve_y() const {
+ return scale_curve_y;
+}
+
+Ref<Curve> CPUParticles3D::get_scale_curve_z() const {
+ return scale_curve_z;
+}
+
+bool CPUParticles3D::get_split_scale() {
+ return split_scale;
+}
+
void CPUParticles3D::_validate_property(PropertyInfo &property) const {
if (property.name == "emission_sphere_radius" && emission_shape != EMISSION_SHAPE_SPHERE) {
property.usage = PROPERTY_USAGE_NONE;
@@ -489,6 +527,10 @@ void CPUParticles3D::_validate_property(PropertyInfo &property) const {
if (property.name.begins_with("orbit_") && !particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
property.usage = PROPERTY_USAGE_NONE;
}
+
+ if (property.name.begins_with("scale_curve_") && !split_scale) {
+ property.usage = PROPERTY_USAGE_NONE;
+ }
}
static uint32_t idhash(uint32_t x) {
@@ -707,7 +749,7 @@ void CPUParticles3D::_particles_process(double p_delta) {
if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
real_t angle1_rad = Math::atan2(direction.y, direction.x) + Math::deg2rad((Math::randf() * 2.0 - 1.0) * spread);
Vector3 rot = Vector3(Math::cos(angle1_rad), Math::sin(angle1_rad), 0.0);
- p.velocity = rot * parameters[PARAM_INITIAL_LINEAR_VELOCITY] * Math::lerp((real_t)1.0, real_t(Math::randf()), randomness[PARAM_INITIAL_LINEAR_VELOCITY]);
+ p.velocity = rot * Math::lerp(parameters_min[PARAM_INITIAL_LINEAR_VELOCITY], parameters_max[PARAM_INITIAL_LINEAR_VELOCITY], Math::randf());
} else {
//initiate velocity spread in 3D
real_t angle1_rad = Math::deg2rad((Math::randf() * (real_t)2.0 - (real_t)1.0) * spread);
@@ -731,13 +773,13 @@ void CPUParticles3D::_particles_process(double p_delta) {
binormal.normalize();
Vector3 normal = binormal.cross(direction_nrm);
spread_direction = binormal * spread_direction.x + normal * spread_direction.y + direction_nrm * spread_direction.z;
- p.velocity = spread_direction * parameters[PARAM_INITIAL_LINEAR_VELOCITY] * Math::lerp((real_t)1.0, real_t(Math::randf()), randomness[PARAM_INITIAL_LINEAR_VELOCITY]);
+ p.velocity = spread_direction * Math::lerp(parameters_min[PARAM_INITIAL_LINEAR_VELOCITY], parameters_max[PARAM_INITIAL_LINEAR_VELOCITY], float(Math::randf()));
}
- real_t base_angle = (parameters[PARAM_ANGLE] + tex_angle) * Math::lerp((real_t)1.0, p.angle_rand, randomness[PARAM_ANGLE]);
+ real_t base_angle = tex_angle * Math::lerp(parameters_min[PARAM_ANGLE], parameters_max[PARAM_ANGLE], p.angle_rand);
p.custom[0] = Math::deg2rad(base_angle); //angle
p.custom[1] = 0.0; //phase
- p.custom[2] = (parameters[PARAM_ANIM_OFFSET] + tex_anim_offset) * Math::lerp((real_t)1.0, p.anim_offset_rand, randomness[PARAM_ANIM_OFFSET]); //animation offset (0-1)
+ p.custom[2] = tex_anim_offset * Math::lerp(parameters_min[PARAM_ANIM_OFFSET], parameters_max[PARAM_ANIM_OFFSET], p.anim_offset_rand); //animation offset (0-1)
p.transform = Transform3D();
p.time = 0;
p.lifetime = lifetime * (1.0 - Math::randf() * lifetime_randomness);
@@ -894,26 +936,25 @@ void CPUParticles3D::_particles_process(double p_delta) {
position.z = 0.0;
}
//apply linear acceleration
- force += p.velocity.length() > 0.0 ? p.velocity.normalized() * (parameters[PARAM_LINEAR_ACCEL] + tex_linear_accel) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed), randomness[PARAM_LINEAR_ACCEL]) : Vector3();
+ force += p.velocity.length() > 0.0 ? p.velocity.normalized() * tex_linear_accel * Math::lerp(parameters_min[PARAM_LINEAR_ACCEL], parameters_max[PARAM_LINEAR_ACCEL], rand_from_seed(alt_seed)) : Vector3();
//apply radial acceleration
Vector3 org = emission_xform.origin;
Vector3 diff = position - org;
- force += diff.length() > 0.0 ? diff.normalized() * (parameters[PARAM_RADIAL_ACCEL] + tex_radial_accel) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed), randomness[PARAM_RADIAL_ACCEL]) : Vector3();
- //apply tangential acceleration;
+ force += diff.length() > 0.0 ? diff.normalized() * (tex_radial_accel)*Math::lerp(parameters_min[PARAM_RADIAL_ACCEL], parameters_max[PARAM_RADIAL_ACCEL], rand_from_seed(alt_seed)) : Vector3();
if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
Vector2 yx = Vector2(diff.y, diff.x);
Vector2 yx2 = (yx * Vector2(-1.0, 1.0)).normalized();
- force += yx.length() > 0.0 ? Vector3(yx2.x, yx2.y, 0.0) * ((parameters[PARAM_TANGENTIAL_ACCEL] + tex_tangential_accel) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed), randomness[PARAM_TANGENTIAL_ACCEL])) : Vector3();
+ force += yx.length() > 0.0 ? Vector3(yx2.x, yx2.y, 0.0) * (tex_tangential_accel * Math::lerp(parameters_min[PARAM_TANGENTIAL_ACCEL], parameters_max[PARAM_TANGENTIAL_ACCEL], rand_from_seed(alt_seed))) : Vector3();
} else {
Vector3 crossDiff = diff.normalized().cross(gravity.normalized());
- force += crossDiff.length() > 0.0 ? crossDiff.normalized() * ((parameters[PARAM_TANGENTIAL_ACCEL] + tex_tangential_accel) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed), randomness[PARAM_TANGENTIAL_ACCEL])) : Vector3();
+ force += crossDiff.length() > 0.0 ? crossDiff.normalized() * (tex_tangential_accel * Math::lerp(parameters_min[PARAM_TANGENTIAL_ACCEL], parameters_max[PARAM_TANGENTIAL_ACCEL], rand_from_seed(alt_seed))) : Vector3();
}
//apply attractor forces
p.velocity += force * local_delta;
//orbit velocity
if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
- real_t orbit_amount = (parameters[PARAM_ORBIT_VELOCITY] + tex_orbit_velocity) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed), randomness[PARAM_ORBIT_VELOCITY]);
+ real_t orbit_amount = tex_orbit_velocity * Math::lerp(parameters_min[PARAM_ORBIT_VELOCITY], parameters_max[PARAM_ORBIT_VELOCITY], rand_from_seed(alt_seed));
if (orbit_amount != 0.0) {
real_t ang = orbit_amount * local_delta * Math_TAU;
// Not sure why the ParticlesMaterial code uses a clockwise rotation matrix,
@@ -927,9 +968,10 @@ void CPUParticles3D::_particles_process(double p_delta) {
if (curve_parameters[PARAM_INITIAL_LINEAR_VELOCITY].is_valid()) {
p.velocity = p.velocity.normalized() * tex_linear_velocity;
}
- if (parameters[PARAM_DAMPING] + tex_damping > 0.0) {
+
+ if (parameters_max[PARAM_DAMPING] + tex_damping > 0.0) {
real_t v = p.velocity.length();
- real_t damp = (parameters[PARAM_DAMPING] + tex_damping) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed), randomness[PARAM_DAMPING]);
+ real_t damp = tex_damping * Math::lerp(parameters_min[PARAM_DAMPING], parameters_max[PARAM_DAMPING], rand_from_seed(alt_seed));
v -= damp * local_delta;
if (v < 0.0) {
p.velocity = Vector3();
@@ -937,17 +979,38 @@ void CPUParticles3D::_particles_process(double p_delta) {
p.velocity = p.velocity.normalized() * v;
}
}
- real_t base_angle = (parameters[PARAM_ANGLE] + tex_angle) * Math::lerp((real_t)1.0, p.angle_rand, randomness[PARAM_ANGLE]);
- base_angle += p.custom[1] * lifetime * (parameters[PARAM_ANGULAR_VELOCITY] + tex_angular_velocity) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed) * 2.0f - 1.0f, randomness[PARAM_ANGULAR_VELOCITY]);
+ real_t base_angle = (tex_angle)*Math::lerp(parameters_min[PARAM_ANGLE], parameters_max[PARAM_ANGLE], p.angle_rand);
+ base_angle += p.custom[1] * lifetime * tex_angular_velocity * Math::lerp(parameters_min[PARAM_ANGULAR_VELOCITY], parameters_max[PARAM_ANGULAR_VELOCITY], rand_from_seed(alt_seed));
p.custom[0] = Math::deg2rad(base_angle); //angle
- p.custom[2] = (parameters[PARAM_ANIM_OFFSET] + tex_anim_offset) * Math::lerp((real_t)1.0, p.anim_offset_rand, randomness[PARAM_ANIM_OFFSET]) + p.custom[1] * (parameters[PARAM_ANIM_SPEED] + tex_anim_speed) * Math::lerp((real_t)1.0, rand_from_seed(alt_seed), randomness[PARAM_ANIM_SPEED]); //angle
+ p.custom[2] = tex_anim_offset * Math::lerp(parameters_min[PARAM_ANIM_OFFSET], parameters_max[PARAM_ANIM_OFFSET], p.anim_offset_rand) + p.custom[1] * tex_anim_speed * Math::lerp(parameters_min[PARAM_ANIM_SPEED], parameters_max[PARAM_ANIM_SPEED], rand_from_seed(alt_seed)); //angle
}
//apply color
//apply hue rotation
- real_t tex_scale = 1.0;
- if (curve_parameters[PARAM_SCALE].is_valid()) {
- tex_scale = curve_parameters[PARAM_SCALE]->interpolate(tv);
+ Vector3 tex_scale = Vector3(1.0, 1.0, 1.0);
+ if (split_scale) {
+ if (scale_curve_x.is_valid()) {
+ tex_scale.x = scale_curve_x->interpolate(tv);
+ } else {
+ tex_scale.x = 1.0;
+ }
+ if (scale_curve_y.is_valid()) {
+ tex_scale.y = scale_curve_y->interpolate(tv);
+ } else {
+ tex_scale.y = 1.0;
+ }
+ if (scale_curve_z.is_valid()) {
+ tex_scale.z = scale_curve_z->interpolate(tv);
+ } else {
+ tex_scale.z = 1.0;
+ }
+ } else {
+ if (curve_parameters[PARAM_SCALE].is_valid()) {
+ float tmp_scale = curve_parameters[PARAM_SCALE]->interpolate(tv);
+ tex_scale.x = tmp_scale;
+ tex_scale.y = tmp_scale;
+ tex_scale.z = tmp_scale;
+ }
}
real_t tex_hue_variation = 0.0;
@@ -955,7 +1018,7 @@ void CPUParticles3D::_particles_process(double p_delta) {
tex_hue_variation = curve_parameters[PARAM_HUE_VARIATION]->interpolate(tv);
}
- real_t hue_rot_angle = (parameters[PARAM_HUE_VARIATION] + tex_hue_variation) * Math_TAU * Math::lerp(1, p.hue_rot_rand * 2.0f - 1.0f, randomness[PARAM_HUE_VARIATION]);
+ real_t hue_rot_angle = (tex_hue_variation)*Math_TAU * Math::lerp(parameters_min[PARAM_HUE_VARIATION], parameters_max[PARAM_HUE_VARIATION], p.hue_rot_rand);
real_t hue_rot_c = Math::cos(hue_rot_angle);
real_t hue_rot_s = Math::sin(hue_rot_angle);
@@ -1025,13 +1088,21 @@ void CPUParticles3D::_particles_process(double p_delta) {
}
}
+ p.transform.basis = p.transform.basis.orthonormalized();
//scale by scale
- real_t base_scale = tex_scale * Math::lerp(parameters[PARAM_SCALE], (real_t)1.0, p.scale_rand * randomness[PARAM_SCALE]);
- if (base_scale < CMP_EPSILON) {
- base_scale = CMP_EPSILON;
+
+ Vector3 base_scale = tex_scale * Math::lerp(parameters_min[PARAM_SCALE], parameters_max[PARAM_SCALE], p.scale_rand);
+ if (base_scale.x < CMP_EPSILON) {
+ base_scale.x = CMP_EPSILON;
+ }
+ if (base_scale.y < CMP_EPSILON) {
+ base_scale.y = CMP_EPSILON;
+ }
+ if (base_scale.z < CMP_EPSILON) {
+ base_scale.z = CMP_EPSILON;
}
- p.transform.basis.scale(Vector3(1, 1, 1) * base_scale);
+ p.transform.basis.scale(base_scale);
if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
p.velocity.z = 0.0;
@@ -1267,18 +1338,25 @@ void CPUParticles3D::convert_from_particles(Node *p_particles) {
set_emission_shape(EmissionShape(material->get_emission_shape()));
set_emission_sphere_radius(material->get_emission_sphere_radius());
set_emission_box_extents(material->get_emission_box_extents());
+ Ref<CurveXYZTexture> scale3D = material->get_param_texture(ParticlesMaterial::PARAM_SCALE);
+ if (scale3D.is_valid()) {
+ split_scale = true;
+ scale_curve_x = scale3D->get_curve_x();
+ scale_curve_y = scale3D->get_curve_y();
+ scale_curve_z = scale3D->get_curve_z();
+ }
set_gravity(material->get_gravity());
set_lifetime_randomness(material->get_lifetime_randomness());
#define CONVERT_PARAM(m_param) \
- set_param(m_param, material->get_param(ParticlesMaterial::m_param)); \
+ set_param_min(m_param, material->get_param_min(ParticlesMaterial::m_param)); \
{ \
Ref<CurveTexture> ctex = material->get_param_texture(ParticlesMaterial::m_param); \
if (ctex.is_valid()) \
set_param_curve(m_param, ctex->get_curve()); \
} \
- set_param_randomness(m_param, material->get_param_randomness(ParticlesMaterial::m_param));
+ set_param_max(m_param, material->get_param_max(ParticlesMaterial::m_param));
CONVERT_PARAM(PARAM_INITIAL_LINEAR_VELOCITY);
CONVERT_PARAM(PARAM_ANGULAR_VELOCITY);
@@ -1364,11 +1442,11 @@ void CPUParticles3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_flatness", "amount"), &CPUParticles3D::set_flatness);
ClassDB::bind_method(D_METHOD("get_flatness"), &CPUParticles3D::get_flatness);
- ClassDB::bind_method(D_METHOD("set_param", "param", "value"), &CPUParticles3D::set_param);
- ClassDB::bind_method(D_METHOD("get_param", "param"), &CPUParticles3D::get_param);
+ ClassDB::bind_method(D_METHOD("set_param_min", "param", "value"), &CPUParticles3D::set_param_min);
+ ClassDB::bind_method(D_METHOD("get_param_min", "param"), &CPUParticles3D::get_param_min);
- ClassDB::bind_method(D_METHOD("set_param_randomness", "param", "randomness"), &CPUParticles3D::set_param_randomness);
- ClassDB::bind_method(D_METHOD("get_param_randomness", "param"), &CPUParticles3D::get_param_randomness);
+ ClassDB::bind_method(D_METHOD("set_param_max", "param", "value"), &CPUParticles3D::set_param_max);
+ ClassDB::bind_method(D_METHOD("get_param_max", "param"), &CPUParticles3D::get_param_max);
ClassDB::bind_method(D_METHOD("set_param_curve", "param", "curve"), &CPUParticles3D::set_param_curve);
ClassDB::bind_method(D_METHOD("get_param_curve", "param"), &CPUParticles3D::get_param_curve);
@@ -1415,6 +1493,18 @@ void CPUParticles3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_gravity"), &CPUParticles3D::get_gravity);
ClassDB::bind_method(D_METHOD("set_gravity", "accel_vec"), &CPUParticles3D::set_gravity);
+ ClassDB::bind_method(D_METHOD("get_split_scale"), &CPUParticles3D::get_split_scale);
+ ClassDB::bind_method(D_METHOD("set_split_scale", "split_scale"), &CPUParticles3D::set_split_scale);
+
+ ClassDB::bind_method(D_METHOD("get_scale_curve_x"), &CPUParticles3D::get_scale_curve_x);
+ ClassDB::bind_method(D_METHOD("set_scale_curve_x", "scale_curve"), &CPUParticles3D::set_scale_curve_x);
+
+ ClassDB::bind_method(D_METHOD("get_scale_curve_y"), &CPUParticles3D::get_scale_curve_y);
+ ClassDB::bind_method(D_METHOD("set_scale_curve_y", "scale_curve"), &CPUParticles3D::set_scale_curve_y);
+
+ ClassDB::bind_method(D_METHOD("get_scale_curve_z"), &CPUParticles3D::get_scale_curve_z);
+ ClassDB::bind_method(D_METHOD("set_scale_curve_z", "scale_curve"), &CPUParticles3D::set_scale_curve_z);
+
ClassDB::bind_method(D_METHOD("convert_from_particles", "particles"), &CPUParticles3D::convert_from_particles);
ADD_GROUP("Emission Shape", "emission_");
@@ -1439,54 +1529,58 @@ void CPUParticles3D::_bind_methods() {
ADD_GROUP("Gravity", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity"), "set_gravity", "get_gravity");
ADD_GROUP("Initial Velocity", "initial_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_min", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param_min", "get_param_min", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_max", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param_max", "get_param_max", PARAM_INITIAL_LINEAR_VELOCITY);
ADD_GROUP("Angular Velocity", "angular_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_min", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_max", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_ANGULAR_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angular_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGULAR_VELOCITY);
ADD_GROUP("Orbit Velocity", "orbit_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_min", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_max", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_ORBIT_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orbit_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ORBIT_VELOCITY);
ADD_GROUP("Linear Accel", "linear_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_min", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_max", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_LINEAR_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "linear_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_LINEAR_ACCEL);
ADD_GROUP("Radial Accel", "radial_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_min", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_max", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_RADIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "radial_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_RADIAL_ACCEL);
ADD_GROUP("Tangential Accel", "tangential_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_min", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_max", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_TANGENTIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "tangential_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_TANGENTIAL_ACCEL);
ADD_GROUP("Damping", "");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_min", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param_min", "get_param_min", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_max", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param_max", "get_param_max", PARAM_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "damping_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_DAMPING);
ADD_GROUP("Angle", "");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater,degrees"), "set_param", "get_param", PARAM_ANGLE);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_min", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater,degrees"), "set_param_min", "get_param_min", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_max", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater,degrees"), "set_param_max", "get_param_max", PARAM_ANGLE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGLE);
ADD_GROUP("Scale", "");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount_min", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param_min", "get_param_min", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_amount_max", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param_max", "get_param_max", PARAM_SCALE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_amount_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_SCALE);
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "split_scale"), "set_split_scale", "get_split_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "scale_curve_x", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_scale_curve_x", "get_scale_curve_x");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "scale_curve_y", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_scale_curve_y", "get_scale_curve_y");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "scale_curve_z", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_scale_curve_z", "get_scale_curve_z");
ADD_GROUP("Color", "");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_color_ramp", "get_color_ramp");
ADD_GROUP("Hue Variation", "hue_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_min", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param_min", "get_param_min", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_max", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param_max", "get_param_max", PARAM_HUE_VARIATION);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "hue_variation_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_HUE_VARIATION);
ADD_GROUP("Animation", "anim_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_min", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater,or_lesser"), "set_param_min", "get_param_min", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_max", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater,or_lesser"), "set_param_max", "get_param_max", PARAM_ANIM_SPEED);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_speed_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_min", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_min", "get_param_min", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_max", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_max", "get_param_max", PARAM_ANIM_OFFSET);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANIM_OFFSET);
BIND_ENUM_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY);
@@ -1527,18 +1621,30 @@ CPUParticles3D::CPUParticles3D() {
set_emitting(true);
set_amount(8);
- set_param(PARAM_INITIAL_LINEAR_VELOCITY, 0);
- set_param(PARAM_ANGULAR_VELOCITY, 0);
- set_param(PARAM_ORBIT_VELOCITY, 0);
- set_param(PARAM_LINEAR_ACCEL, 0);
- set_param(PARAM_RADIAL_ACCEL, 0);
- set_param(PARAM_TANGENTIAL_ACCEL, 0);
- set_param(PARAM_DAMPING, 0);
- set_param(PARAM_ANGLE, 0);
- set_param(PARAM_SCALE, 1);
- set_param(PARAM_HUE_VARIATION, 0);
- set_param(PARAM_ANIM_SPEED, 0);
- set_param(PARAM_ANIM_OFFSET, 0);
+ set_param_min(PARAM_INITIAL_LINEAR_VELOCITY, 0);
+ set_param_min(PARAM_ANGULAR_VELOCITY, 0);
+ set_param_min(PARAM_ORBIT_VELOCITY, 0);
+ set_param_min(PARAM_LINEAR_ACCEL, 0);
+ set_param_min(PARAM_RADIAL_ACCEL, 0);
+ set_param_min(PARAM_TANGENTIAL_ACCEL, 0);
+ set_param_min(PARAM_DAMPING, 0);
+ set_param_min(PARAM_ANGLE, 0);
+ set_param_min(PARAM_SCALE, 1);
+ set_param_min(PARAM_HUE_VARIATION, 0);
+ set_param_min(PARAM_ANIM_SPEED, 0);
+ set_param_min(PARAM_ANIM_OFFSET, 0);
+ set_param_max(PARAM_INITIAL_LINEAR_VELOCITY, 0);
+ set_param_max(PARAM_ANGULAR_VELOCITY, 0);
+ set_param_max(PARAM_ORBIT_VELOCITY, 0);
+ set_param_max(PARAM_LINEAR_ACCEL, 0);
+ set_param_max(PARAM_RADIAL_ACCEL, 0);
+ set_param_max(PARAM_TANGENTIAL_ACCEL, 0);
+ set_param_max(PARAM_DAMPING, 0);
+ set_param_max(PARAM_ANGLE, 0);
+ set_param_max(PARAM_SCALE, 1);
+ set_param_max(PARAM_HUE_VARIATION, 0);
+ set_param_max(PARAM_ANIM_SPEED, 0);
+ set_param_max(PARAM_ANIM_OFFSET, 0);
set_emission_shape(EMISSION_SHAPE_POINT);
set_emission_sphere_radius(1);
set_emission_box_extents(Vector3(1, 1, 1));
@@ -1549,10 +1655,6 @@ CPUParticles3D::CPUParticles3D() {
set_gravity(Vector3(0, -9.8, 0));
- for (int i = 0; i < PARAM_MAX; i++) {
- set_param_randomness(Parameter(i), 0);
- }
-
for (int i = 0; i < PARTICLE_FLAG_MAX; i++) {
particle_flags[i] = false;
}
diff --git a/scene/3d/cpu_particles_3d.h b/scene/3d/cpu_particles_3d.h
index 5b60322f05..160814ead4 100644
--- a/scene/3d/cpu_particles_3d.h
+++ b/scene/3d/cpu_particles_3d.h
@@ -154,8 +154,8 @@ private:
real_t spread = 45.0;
real_t flatness = 0.0;
- real_t parameters[PARAM_MAX];
- real_t randomness[PARAM_MAX] = {};
+ real_t parameters_min[PARAM_MAX];
+ real_t parameters_max[PARAM_MAX] = {};
Ref<Curve> curve_parameters[PARAM_MAX];
Color color = Color(1, 1, 1, 1);
@@ -175,6 +175,11 @@ private:
real_t emission_ring_radius;
real_t emission_ring_inner_radius;
+ Ref<Curve> scale_curve_x;
+ Ref<Curve> scale_curve_y;
+ Ref<Curve> scale_curve_z;
+ bool split_scale = false;
+
Vector3 gravity = Vector3(0, -9.8, 0);
void _update_internal();
@@ -246,11 +251,11 @@ public:
void set_flatness(real_t p_flatness);
real_t get_flatness() const;
- void set_param(Parameter p_param, real_t p_value);
- real_t get_param(Parameter p_param) const;
+ void set_param_min(Parameter p_param, real_t p_value);
+ real_t get_param_min(Parameter p_param) const;
- void set_param_randomness(Parameter p_param, real_t p_value);
- real_t get_param_randomness(Parameter p_param) const;
+ void set_param_max(Parameter p_param, real_t p_value);
+ real_t get_param_max(Parameter p_param) const;
void set_param_curve(Parameter p_param, const Ref<Curve> &p_curve);
Ref<Curve> get_param_curve(Parameter p_param) const;
@@ -275,6 +280,10 @@ public:
void set_emission_ring_height(real_t p_height);
void set_emission_ring_radius(real_t p_radius);
void set_emission_ring_inner_radius(real_t p_radius);
+ void set_scale_curve_x(Ref<Curve> p_scale_curve);
+ void set_scale_curve_y(Ref<Curve> p_scale_curve);
+ void set_scale_curve_z(Ref<Curve> p_scale_curve);
+ void set_split_scale(bool p_split_scale);
EmissionShape get_emission_shape() const;
real_t get_emission_sphere_radius() const;
@@ -287,6 +296,10 @@ public:
real_t get_emission_ring_height() const;
real_t get_emission_ring_radius() const;
real_t get_emission_ring_inner_radius() const;
+ Ref<Curve> get_scale_curve_x() const;
+ Ref<Curve> get_scale_curve_y() const;
+ Ref<Curve> get_scale_curve_z() const;
+ bool get_split_scale();
void set_gravity(const Vector3 &p_gravity);
Vector3 get_gravity() const;
diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp
index d56228df66..32a62d8c7e 100644
--- a/scene/3d/gpu_particles_3d.cpp
+++ b/scene/3d/gpu_particles_3d.cpp
@@ -312,7 +312,7 @@ TypedArray<String> GPUParticles3D::get_configuration_warnings() const {
} else {
const ParticlesMaterial *process = Object::cast_to<ParticlesMaterial>(process_material.ptr());
if (!anim_material_found && process &&
- (process->get_param(ParticlesMaterial::PARAM_ANIM_SPEED) != 0.0 || process->get_param(ParticlesMaterial::PARAM_ANIM_OFFSET) != 0.0 ||
+ (process->get_param_max(ParticlesMaterial::PARAM_ANIM_SPEED) != 0.0 || process->get_param_max(ParticlesMaterial::PARAM_ANIM_OFFSET) != 0.0 ||
process->get_param_texture(ParticlesMaterial::PARAM_ANIM_SPEED).is_valid() || process->get_param_texture(ParticlesMaterial::PARAM_ANIM_OFFSET).is_valid())) {
warnings.push_back(TTR("Particles animation requires the usage of a BaseMaterial3D whose Billboard Mode is set to \"Particle Billboard\"."));
}
@@ -469,7 +469,7 @@ void GPUParticles3D::_skinning_changed() {
if (draw_pass.is_valid() && draw_pass->get_builtin_bind_pose_count() > 0) {
xforms.resize(draw_pass->get_builtin_bind_pose_count());
for (int j = 0; j < draw_pass->get_builtin_bind_pose_count(); j++) {
- xforms.write[i] = draw_pass->get_builtin_bind_pose(j);
+ xforms.write[j] = draw_pass->get_builtin_bind_pose(j);
}
break;
}
diff --git a/scene/3d/gpu_particles_collision_3d.cpp b/scene/3d/gpu_particles_collision_3d.cpp
index a34a30913e..4fa34615bf 100644
--- a/scene/3d/gpu_particles_collision_3d.cpp
+++ b/scene/3d/gpu_particles_collision_3d.cpp
@@ -420,7 +420,7 @@ Ref<Image> GPUParticlesCollisionSDF::bake() {
}
//test against original bounds
- if (!Geometry3D::triangle_box_overlap(aabb.position + aabb.size * 0.5, aabb.size * 0.5, face.vertex)) {
+ if (!Geometry3D::triangle_box_overlap(aabb.get_center(), aabb.size * 0.5, face.vertex)) {
continue;
}
@@ -438,7 +438,7 @@ Ref<Image> GPUParticlesCollisionSDF::bake() {
}
//test against original bounds
- if (!Geometry3D::triangle_box_overlap(aabb.position + aabb.size * 0.5, aabb.size * 0.5, face.vertex)) {
+ if (!Geometry3D::triangle_box_overlap(aabb.get_center(), aabb.size * 0.5, face.vertex)) {
continue;
}
diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp
index 508f8a70df..c787ba5087 100644
--- a/scene/3d/light_3d.cpp
+++ b/scene/3d/light_3d.cpp
@@ -30,10 +30,6 @@
#include "light_3d.h"
-bool Light3D::_can_gizmo_scale() const {
- return false;
-}
-
void Light3D::set_param(Param p_param, real_t p_value) {
ERR_FAIL_INDEX(p_param, PARAM_MAX);
param[p_param] = p_value;
@@ -212,10 +208,6 @@ void Light3D::_validate_property(PropertyInfo &property) const {
property.usage = PROPERTY_USAGE_NONE;
}
- if (get_light_type() == RS::LIGHT_SPOT && property.name == "shadow_normal_bias") {
- property.usage = PROPERTY_USAGE_NONE;
- }
-
if (get_light_type() == RS::LIGHT_DIRECTIONAL && property.name == "light_projector") {
property.usage = PROPERTY_USAGE_NONE;
}
@@ -425,9 +417,7 @@ DirectionalLight3D::DirectionalLight3D() :
set_param(PARAM_SHADOW_MAX_DISTANCE, 100);
set_param(PARAM_SHADOW_FADE_START, 0.8);
// Increase the default shadow bias to better suit most scenes.
- // Leave normal bias untouched as it doesn't benefit DirectionalLight3D as much as OmniLight3D.
set_param(PARAM_SHADOW_BIAS, 0.1);
- set_param(PARAM_SHADOW_NORMAL_BIAS, 1.0);
set_shadow_mode(SHADOW_PARALLEL_4_SPLITS);
blend_splits = false;
}
@@ -468,8 +458,7 @@ OmniLight3D::OmniLight3D() :
Light3D(RenderingServer::LIGHT_OMNI) {
set_shadow_mode(SHADOW_CUBE);
// Increase the default shadow biases to better suit most scenes.
- set_param(PARAM_SHADOW_BIAS, 0.1);
- set_param(PARAM_SHADOW_NORMAL_BIAS, 2.0);
+ set_param(PARAM_SHADOW_BIAS, 0.2);
}
TypedArray<String> SpotLight3D::get_configuration_warnings() const {
diff --git a/scene/3d/light_3d.h b/scene/3d/light_3d.h
index ecea60339f..f788c323f7 100644
--- a/scene/3d/light_3d.h
+++ b/scene/3d/light_3d.h
@@ -86,8 +86,6 @@ private:
protected:
RID light;
- virtual bool _can_gizmo_scale() const;
-
static void _bind_methods();
void _notification(int p_what);
virtual void _validate_property(PropertyInfo &property) const override;
diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp
index 7dd083e314..b56f0fd145 100644
--- a/scene/3d/lightmap_gi.cpp
+++ b/scene/3d/lightmap_gi.cpp
@@ -467,7 +467,7 @@ int32_t LightmapGI::_compute_bsp_tree(const Vector<Vector3> &p_points, const Loc
}
}
if (i == 0) {
- centers.push_back(bounds.position + bounds.size * 0.5);
+ centers.push_back(bounds.get_center());
} else {
bounds_all.merge_with(bounds);
}
@@ -555,7 +555,7 @@ void LightmapGI::_plot_triangle_into_octree(GenProbesOctree *p_cell, float p_cel
subcell.position = Vector3(pos) * p_cell_size;
subcell.size = Vector3(half_size, half_size, half_size) * p_cell_size;
- if (!Geometry3D::triangle_box_overlap(subcell.position + subcell.size * 0.5, subcell.size * 0.5, p_triangle)) {
+ if (!Geometry3D::triangle_box_overlap(subcell.get_center(), subcell.size * 0.5, p_triangle)) {
continue;
}
diff --git a/scene/3d/mesh_instance_3d.cpp b/scene/3d/mesh_instance_3d.cpp
index de6925244a..7e7db57af3 100644
--- a/scene/3d/mesh_instance_3d.cpp
+++ b/scene/3d/mesh_instance_3d.cpp
@@ -274,7 +274,8 @@ Node *MeshInstance3D::create_multiple_convex_collisions_node() {
return nullptr;
}
- Vector<Ref<Shape3D>> shapes = mesh->convex_decompose();
+ Mesh::ConvexDecompositionSettings settings;
+ Vector<Ref<Shape3D>> shapes = mesh->convex_decompose(settings);
if (!shapes.size()) {
return nullptr;
}
diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp
index 092efc55d7..e6dc1ed3df 100644
--- a/scene/3d/physics_body_3d.cpp
+++ b/scene/3d/physics_body_3d.cpp
@@ -38,8 +38,8 @@
#endif
void PhysicsBody3D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("move_and_collide", "rel_vec", "test_only", "safe_margin"), &PhysicsBody3D::_move, DEFVAL(false), DEFVAL(0.001));
- ClassDB::bind_method(D_METHOD("test_move", "from", "rel_vec", "collision", "safe_margin"), &PhysicsBody3D::test_move, DEFVAL(Variant()), DEFVAL(0.001));
+ ClassDB::bind_method(D_METHOD("move_and_collide", "linear_velocity", "test_only", "safe_margin", "max_collisions"), &PhysicsBody3D::_move, DEFVAL(false), DEFVAL(0.001), DEFVAL(1));
+ ClassDB::bind_method(D_METHOD("test_move", "from", "linear_velocity", "collision", "safe_margin", "max_collisions"), &PhysicsBody3D::test_move, DEFVAL(Variant()), DEFVAL(0.001), DEFVAL(1));
ClassDB::bind_method(D_METHOD("set_axis_lock", "axis", "lock"), &PhysicsBody3D::set_axis_lock);
ClassDB::bind_method(D_METHOD("get_axis_lock", "axis"), &PhysicsBody3D::get_axis_lock);
@@ -95,10 +95,14 @@ void PhysicsBody3D::remove_collision_exception_with(Node *p_node) {
PhysicsServer3D::get_singleton()->body_remove_collision_exception(get_rid(), collision_object->get_rid());
}
-Ref<KinematicCollision3D> PhysicsBody3D::_move(const Vector3 &p_motion, bool p_test_only, real_t p_margin) {
+Ref<KinematicCollision3D> PhysicsBody3D::_move(const Vector3 &p_motion, bool p_test_only, real_t p_margin, int p_max_collisions) {
PhysicsServer3D::MotionResult result;
- if (move_and_collide(p_motion, result, p_margin, p_test_only)) {
- if (motion_cache.is_null()) {
+ // Hack in order to work with calling from _process as well as from _physics_process; calling from thread is risky
+ double delta = Engine::get_singleton()->is_in_physics_frame() ? get_physics_process_delta_time() : get_process_delta_time();
+
+ if (move_and_collide(p_motion * delta, result, p_margin, p_test_only, p_max_collisions)) {
+ // Create a new instance when the cached reference is invalid or still in use in script.
+ if (motion_cache.is_null() || motion_cache->reference_get_count() > 1) {
motion_cache.instantiate();
motion_cache->owner = this;
}
@@ -111,9 +115,9 @@ Ref<KinematicCollision3D> PhysicsBody3D::_move(const Vector3 &p_motion, bool p_t
return Ref<KinematicCollision3D>();
}
-bool PhysicsBody3D::move_and_collide(const Vector3 &p_motion, PhysicsServer3D::MotionResult &r_result, real_t p_margin, bool p_test_only, bool p_cancel_sliding, const Set<RID> &p_exclude) {
+bool PhysicsBody3D::move_and_collide(const Vector3 &p_motion, PhysicsServer3D::MotionResult &r_result, real_t p_margin, bool p_test_only, int p_max_collisions, bool p_cancel_sliding, bool p_collide_separation_ray, const Set<RID> &p_exclude) {
Transform3D gt = get_global_transform();
- bool colliding = PhysicsServer3D::get_singleton()->body_test_motion(get_rid(), gt, p_motion, p_margin, &r_result, p_exclude);
+ bool colliding = PhysicsServer3D::get_singleton()->body_test_motion(get_rid(), gt, p_motion, p_margin, &r_result, p_max_collisions, p_collide_separation_ray, p_exclude);
// Restore direction of motion to be along original motion,
// in order to avoid sliding due to recovery,
@@ -125,9 +129,9 @@ bool PhysicsBody3D::move_and_collide(const Vector3 &p_motion, PhysicsServer3D::M
if (colliding) {
// Can't just use margin as a threshold because collision depth is calculated on unsafe motion,
// so even in normal resting cases the depth can be a bit more than the margin.
- precision += motion_length * (r_result.collision_unsafe_fraction - r_result.collision_safe_fraction);
+ precision += motion_length * (r_result.unsafe_fraction - r_result.safe_fraction);
- if (r_result.collision_depth > (real_t)p_margin + precision) {
+ if (r_result.collisions[0].depth > (real_t)p_margin + precision) {
p_cancel_sliding = false;
}
}
@@ -167,7 +171,7 @@ bool PhysicsBody3D::move_and_collide(const Vector3 &p_motion, PhysicsServer3D::M
return colliding;
}
-bool PhysicsBody3D::test_move(const Transform3D &p_from, const Vector3 &p_motion, const Ref<KinematicCollision3D> &r_collision, real_t p_margin) {
+bool PhysicsBody3D::test_move(const Transform3D &p_from, const Vector3 &p_motion, const Ref<KinematicCollision3D> &r_collision, real_t p_margin, int p_max_collisions) {
ERR_FAIL_COND_V(!is_inside_tree(), false);
PhysicsServer3D::MotionResult *r = nullptr;
@@ -176,7 +180,10 @@ bool PhysicsBody3D::test_move(const Transform3D &p_from, const Vector3 &p_motion
r = const_cast<PhysicsServer3D::MotionResult *>(&r_collision->result);
}
- return PhysicsServer3D::get_singleton()->body_test_motion(get_rid(), p_from, p_motion, p_margin, r);
+ // Hack in order to work with calling from _process as well as from _physics_process; calling from thread is risky
+ double delta = Engine::get_singleton()->is_in_physics_frame() ? get_physics_process_delta_time() : get_process_delta_time();
+
+ return PhysicsServer3D::get_singleton()->body_test_motion(get_rid(), p_from, p_motion * delta, p_margin, r, p_max_collisions);
}
void PhysicsBody3D::set_axis_lock(PhysicsServer3D::BodyAxis p_axis, bool p_lock) {
@@ -223,141 +230,128 @@ Ref<PhysicsMaterial> StaticBody3D::get_physics_material_override() const {
return physics_material_override;
}
-void StaticBody3D::set_kinematic_motion_enabled(bool p_enabled) {
- if (p_enabled == kinematic_motion) {
- return;
- }
+void StaticBody3D::set_constant_linear_velocity(const Vector3 &p_vel) {
+ constant_linear_velocity = p_vel;
- kinematic_motion = p_enabled;
+ PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_LINEAR_VELOCITY, constant_linear_velocity);
+}
- if (kinematic_motion) {
- set_body_mode(PhysicsServer3D::BODY_MODE_KINEMATIC);
- } else {
- set_body_mode(PhysicsServer3D::BODY_MODE_STATIC);
- }
+void StaticBody3D::set_constant_angular_velocity(const Vector3 &p_vel) {
+ constant_angular_velocity = p_vel;
-#ifdef TOOLS_ENABLED
- if (Engine::get_singleton()->is_editor_hint()) {
- update_configuration_warnings();
- return;
- }
-#endif
+ PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_ANGULAR_VELOCITY, constant_angular_velocity);
+}
- _update_kinematic_motion();
+Vector3 StaticBody3D::get_constant_linear_velocity() const {
+ return constant_linear_velocity;
}
-bool StaticBody3D::is_kinematic_motion_enabled() const {
- return kinematic_motion;
+Vector3 StaticBody3D::get_constant_angular_velocity() const {
+ return constant_angular_velocity;
}
-void StaticBody3D::set_constant_linear_velocity(const Vector3 &p_vel) {
- constant_linear_velocity = p_vel;
+void StaticBody3D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_constant_linear_velocity", "vel"), &StaticBody3D::set_constant_linear_velocity);
+ ClassDB::bind_method(D_METHOD("set_constant_angular_velocity", "vel"), &StaticBody3D::set_constant_angular_velocity);
+ ClassDB::bind_method(D_METHOD("get_constant_linear_velocity"), &StaticBody3D::get_constant_linear_velocity);
+ ClassDB::bind_method(D_METHOD("get_constant_angular_velocity"), &StaticBody3D::get_constant_angular_velocity);
+
+ ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &StaticBody3D::set_physics_material_override);
+ ClassDB::bind_method(D_METHOD("get_physics_material_override"), &StaticBody3D::get_physics_material_override);
- if (kinematic_motion) {
- _update_kinematic_motion();
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "constant_linear_velocity"), "set_constant_linear_velocity", "get_constant_linear_velocity");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "constant_angular_velocity"), "set_constant_angular_velocity", "get_constant_angular_velocity");
+}
+
+StaticBody3D::StaticBody3D(PhysicsServer3D::BodyMode p_mode) :
+ PhysicsBody3D(p_mode) {
+}
+
+void StaticBody3D::_reload_physics_characteristics() {
+ if (physics_material_override.is_null()) {
+ PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_BOUNCE, 0);
+ PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_FRICTION, 1);
} else {
- PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_LINEAR_VELOCITY, constant_linear_velocity);
+ PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_BOUNCE, physics_material_override->computed_bounce());
+ PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_FRICTION, physics_material_override->computed_friction());
}
}
-void StaticBody3D::set_sync_to_physics(bool p_enable) {
+Vector3 AnimatableBody3D::get_linear_velocity() const {
+ return linear_velocity;
+}
+
+Vector3 AnimatableBody3D::get_angular_velocity() const {
+ return angular_velocity;
+}
+
+void AnimatableBody3D::set_sync_to_physics(bool p_enable) {
if (sync_to_physics == p_enable) {
return;
}
sync_to_physics = p_enable;
+ _update_kinematic_motion();
+}
+
+bool AnimatableBody3D::is_sync_to_physics_enabled() const {
+ return sync_to_physics;
+}
+
+void AnimatableBody3D::_update_kinematic_motion() {
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
- update_configuration_warnings();
return;
}
#endif
- if (kinematic_motion) {
- _update_kinematic_motion();
+ if (sync_to_physics) {
+ set_only_update_transform_changes(true);
+ set_notify_local_transform(true);
+ } else {
+ set_only_update_transform_changes(false);
+ set_notify_local_transform(false);
}
}
-bool StaticBody3D::is_sync_to_physics_enabled() const {
- return sync_to_physics;
+void AnimatableBody3D::_body_state_changed_callback(void *p_instance, PhysicsDirectBodyState3D *p_state) {
+ AnimatableBody3D *body = (AnimatableBody3D *)p_instance;
+ body->_body_state_changed(p_state);
}
-void StaticBody3D::_direct_state_changed(Object *p_state) {
- PhysicsDirectBodyState3D *state = Object::cast_to<PhysicsDirectBodyState3D>(p_state);
- ERR_FAIL_NULL_MSG(state, "Method '_direct_state_changed' must receive a valid PhysicsDirectBodyState3D object as argument");
-
- linear_velocity = state->get_linear_velocity();
- angular_velocity = state->get_angular_velocity();
+void AnimatableBody3D::_body_state_changed(PhysicsDirectBodyState3D *p_state) {
+ linear_velocity = p_state->get_linear_velocity();
+ angular_velocity = p_state->get_angular_velocity();
if (!sync_to_physics) {
return;
}
- last_valid_transform = state->get_transform();
+ last_valid_transform = p_state->get_transform();
set_notify_local_transform(false);
set_global_transform(last_valid_transform);
set_notify_local_transform(true);
_on_transform_changed();
}
-TypedArray<String> StaticBody3D::get_configuration_warnings() const {
- TypedArray<String> warnings = PhysicsBody3D::get_configuration_warnings();
-
- if (sync_to_physics && !kinematic_motion) {
- warnings.push_back(TTR("Sync to physics works only when kinematic motion is enabled."));
- }
-
- return warnings;
-}
-
-void StaticBody3D::set_constant_angular_velocity(const Vector3 &p_vel) {
- constant_angular_velocity = p_vel;
-
- if (kinematic_motion) {
- _update_kinematic_motion();
- } else {
- PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_ANGULAR_VELOCITY, constant_angular_velocity);
- }
-}
-
-Vector3 StaticBody3D::get_constant_linear_velocity() const {
- return constant_linear_velocity;
-}
-
-Vector3 StaticBody3D::get_constant_angular_velocity() const {
- return constant_angular_velocity;
-}
-
-Vector3 StaticBody3D::get_linear_velocity() const {
- return linear_velocity;
-}
-
-Vector3 StaticBody3D::get_angular_velocity() const {
- return angular_velocity;
-}
-
-void StaticBody3D::_notification(int p_what) {
+void AnimatableBody3D::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
last_valid_transform = get_global_transform();
+ _update_kinematic_motion();
+ } break;
+
+ case NOTIFICATION_EXIT_TREE: {
+ set_only_update_transform_changes(false);
+ set_notify_local_transform(false);
} break;
case NOTIFICATION_LOCAL_TRANSFORM_CHANGED: {
// Used by sync to physics, send the new transform to the physics...
Transform3D new_transform = get_global_transform();
- real_t delta_time = get_physics_process_delta_time();
- new_transform.origin += constant_linear_velocity * delta_time;
-
- real_t ang_vel = constant_angular_velocity.length();
- if (!Math::is_zero_approx(ang_vel)) {
- Vector3 ang_vel_axis = constant_angular_velocity / ang_vel;
- Basis rot(ang_vel_axis, ang_vel * delta_time);
- new_transform.basis = rot * new_transform.basis;
- new_transform.orthonormalize();
- }
-
PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_TRANSFORM, new_transform);
// ... but then revert changes.
@@ -366,111 +360,22 @@ void StaticBody3D::_notification(int p_what) {
set_notify_local_transform(true);
_on_transform_changed();
} break;
-
- case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
-#ifdef TOOLS_ENABLED
- if (Engine::get_singleton()->is_editor_hint()) {
- return;
- }
-#endif
-
- ERR_FAIL_COND(!kinematic_motion);
-
- Transform3D new_transform = get_global_transform();
-
- real_t delta_time = get_physics_process_delta_time();
- new_transform.origin += constant_linear_velocity * delta_time;
-
- real_t ang_vel = constant_angular_velocity.length();
- if (!Math::is_zero_approx(ang_vel)) {
- Vector3 ang_vel_axis = constant_angular_velocity / ang_vel;
- Basis rot(ang_vel_axis, ang_vel * delta_time);
- new_transform.basis = rot * new_transform.basis;
- new_transform.orthonormalize();
- }
-
- if (sync_to_physics) {
- // Propagate transform change to node.
- set_global_transform(new_transform);
- } else {
- PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_TRANSFORM, new_transform);
-
- // Propagate transform change to node.
- set_ignore_transform_notification(true);
- set_global_transform(new_transform);
- set_ignore_transform_notification(false);
- _on_transform_changed();
- }
- } break;
}
}
-void StaticBody3D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_constant_linear_velocity", "vel"), &StaticBody3D::set_constant_linear_velocity);
- ClassDB::bind_method(D_METHOD("set_constant_angular_velocity", "vel"), &StaticBody3D::set_constant_angular_velocity);
- ClassDB::bind_method(D_METHOD("get_constant_linear_velocity"), &StaticBody3D::get_constant_linear_velocity);
- ClassDB::bind_method(D_METHOD("get_constant_angular_velocity"), &StaticBody3D::get_constant_angular_velocity);
-
- ClassDB::bind_method(D_METHOD("set_kinematic_motion_enabled", "enabled"), &StaticBody3D::set_kinematic_motion_enabled);
- ClassDB::bind_method(D_METHOD("is_kinematic_motion_enabled"), &StaticBody3D::is_kinematic_motion_enabled);
-
- ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &StaticBody3D::set_physics_material_override);
- ClassDB::bind_method(D_METHOD("get_physics_material_override"), &StaticBody3D::get_physics_material_override);
+void AnimatableBody3D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_sync_to_physics", "enable"), &AnimatableBody3D::set_sync_to_physics);
+ ClassDB::bind_method(D_METHOD("is_sync_to_physics_enabled"), &AnimatableBody3D::is_sync_to_physics_enabled);
- ClassDB::bind_method(D_METHOD("set_sync_to_physics", "enable"), &StaticBody3D::set_sync_to_physics);
- ClassDB::bind_method(D_METHOD("is_sync_to_physics_enabled"), &StaticBody3D::is_sync_to_physics_enabled);
-
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "constant_linear_velocity"), "set_constant_linear_velocity", "get_constant_linear_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "constant_angular_velocity"), "set_constant_angular_velocity", "get_constant_angular_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "kinematic_motion"), "set_kinematic_motion_enabled", "is_kinematic_motion_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sync_to_physics"), "set_sync_to_physics", "is_sync_to_physics_enabled");
}
-StaticBody3D::StaticBody3D() :
- PhysicsBody3D(PhysicsServer3D::BODY_MODE_STATIC) {
-}
-
-void StaticBody3D::_reload_physics_characteristics() {
- if (physics_material_override.is_null()) {
- PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_BOUNCE, 0);
- PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_FRICTION, 1);
- } else {
- PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_BOUNCE, physics_material_override->computed_bounce());
- PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_FRICTION, physics_material_override->computed_friction());
- }
+AnimatableBody3D::AnimatableBody3D() :
+ StaticBody3D(PhysicsServer3D::BODY_MODE_KINEMATIC) {
+ PhysicsServer3D::get_singleton()->body_set_state_sync_callback(get_rid(), this, _body_state_changed_callback);
}
-void StaticBody3D::_update_kinematic_motion() {
-#ifdef TOOLS_ENABLED
- if (Engine::get_singleton()->is_editor_hint()) {
- return;
- }
-#endif
-
- if (kinematic_motion && sync_to_physics) {
- set_only_update_transform_changes(true);
- set_notify_local_transform(true);
- } else {
- set_only_update_transform_changes(false);
- set_notify_local_transform(false);
- }
-
- bool needs_physics_process = false;
- if (kinematic_motion) {
- PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), callable_mp(this, &StaticBody3D::_direct_state_changed));
-
- if (!constant_angular_velocity.is_equal_approx(Vector3()) || !constant_linear_velocity.is_equal_approx(Vector3())) {
- needs_physics_process = true;
- }
- } else {
- PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), Callable());
- }
-
- set_physics_process_internal(needs_physics_process);
-}
-
-void RigidBody3D::_body_enter_tree(ObjectID p_id) {
+void RigidDynamicBody3D::_body_enter_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
@@ -493,7 +398,7 @@ void RigidBody3D::_body_enter_tree(ObjectID p_id) {
contact_monitor->locked = false;
}
-void RigidBody3D::_body_exit_tree(ObjectID p_id) {
+void RigidDynamicBody3D::_body_exit_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
@@ -514,7 +419,7 @@ void RigidBody3D::_body_exit_tree(ObjectID p_id) {
contact_monitor->locked = false;
}
-void RigidBody3D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, int p_body_shape, int p_local_shape) {
+void RigidDynamicBody3D::_body_inout(int p_status, const RID &p_body, ObjectID p_instance, int p_body_shape, int p_local_shape) {
bool body_in = p_status == 1;
ObjectID objid = p_instance;
@@ -533,8 +438,8 @@ void RigidBody3D::_body_inout(int p_status, const RID &p_body, ObjectID p_instan
//E->get().rc=0;
E->get().in_tree = node && node->is_inside_tree();
if (node) {
- node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidBody3D::_body_enter_tree), make_binds(objid));
- node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidBody3D::_body_exit_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody3D::_body_enter_tree), make_binds(objid));
+ node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody3D::_body_exit_tree), make_binds(objid));
if (E->get().in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_entered, node);
}
@@ -560,8 +465,8 @@ void RigidBody3D::_body_inout(int p_status, const RID &p_body, ObjectID p_instan
if (E->get().shapes.is_empty()) {
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidBody3D::_body_enter_tree));
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidBody3D::_body_exit_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody3D::_body_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody3D::_body_exit_tree));
if (in_tree) {
emit_signal(SceneStringNames::get_singleton()->body_exited, node);
}
@@ -575,33 +480,34 @@ void RigidBody3D::_body_inout(int p_status, const RID &p_body, ObjectID p_instan
}
}
-struct _RigidBodyInOut {
+struct _RigidDynamicBodyInOut {
RID rid;
ObjectID id;
int shape = 0;
int local_shape = 0;
};
-void RigidBody3D::_direct_state_changed(Object *p_state) {
-#ifdef DEBUG_ENABLED
- state = Object::cast_to<PhysicsDirectBodyState3D>(p_state);
- ERR_FAIL_NULL_MSG(state, "Method '_direct_state_changed' must receive a valid PhysicsDirectBodyState3D object as argument");
-#else
- state = (PhysicsDirectBodyState3D *)p_state; //trust it
-#endif
+void RigidDynamicBody3D::_body_state_changed_callback(void *p_instance, PhysicsDirectBodyState3D *p_state) {
+ RigidDynamicBody3D *body = (RigidDynamicBody3D *)p_instance;
+ body->_body_state_changed(p_state);
+}
+void RigidDynamicBody3D::_body_state_changed(PhysicsDirectBodyState3D *p_state) {
set_ignore_transform_notification(true);
- set_global_transform(state->get_transform());
- linear_velocity = state->get_linear_velocity();
- angular_velocity = state->get_angular_velocity();
- inverse_inertia_tensor = state->get_inverse_inertia_tensor();
- if (sleeping != state->is_sleeping()) {
- sleeping = state->is_sleeping();
+ set_global_transform(p_state->get_transform());
+
+ linear_velocity = p_state->get_linear_velocity();
+ angular_velocity = p_state->get_angular_velocity();
+
+ inverse_inertia_tensor = p_state->get_inverse_inertia_tensor();
+
+ if (sleeping != p_state->is_sleeping()) {
+ sleeping = p_state->is_sleeping();
emit_signal(SceneStringNames::get_singleton()->sleeping_state_changed);
}
- if (get_script_instance()) {
- get_script_instance()->call("_integrate_forces", state);
- }
+
+ GDVIRTUAL_CALL(_integrate_forces, p_state);
+
set_ignore_transform_notification(false);
_on_transform_changed();
@@ -617,18 +523,18 @@ void RigidBody3D::_direct_state_changed(Object *p_state) {
}
}
- _RigidBodyInOut *toadd = (_RigidBodyInOut *)alloca(state->get_contact_count() * sizeof(_RigidBodyInOut));
+ _RigidDynamicBodyInOut *toadd = (_RigidDynamicBodyInOut *)alloca(p_state->get_contact_count() * sizeof(_RigidDynamicBodyInOut));
int toadd_count = 0; //state->get_contact_count();
- RigidBody3D_RemoveAction *toremove = (RigidBody3D_RemoveAction *)alloca(rc * sizeof(RigidBody3D_RemoveAction));
+ RigidDynamicBody3D_RemoveAction *toremove = (RigidDynamicBody3D_RemoveAction *)alloca(rc * sizeof(RigidDynamicBody3D_RemoveAction));
int toremove_count = 0;
//put the ones to add
- for (int i = 0; i < state->get_contact_count(); i++) {
- RID rid = state->get_contact_collider(i);
- ObjectID obj = state->get_contact_collider_id(i);
- int local_shape = state->get_contact_local_shape(i);
- int shape = state->get_contact_collider_shape(i);
+ for (int i = 0; i < p_state->get_contact_count(); i++) {
+ RID rid = p_state->get_contact_collider(i);
+ ObjectID obj = p_state->get_contact_collider_id(i);
+ int local_shape = p_state->get_contact_local_shape(i);
+ int shape = p_state->get_contact_collider_shape(i);
//bool found=false;
@@ -683,11 +589,9 @@ void RigidBody3D::_direct_state_changed(Object *p_state) {
contact_monitor->locked = false;
}
-
- state = nullptr;
}
-void RigidBody3D::_notification(int p_what) {
+void RigidDynamicBody3D::_notification(int p_what) {
#ifdef TOOLS_ENABLED
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
@@ -705,131 +609,204 @@ void RigidBody3D::_notification(int p_what) {
#endif
}
-void RigidBody3D::set_mode(Mode p_mode) {
- mode = p_mode;
- switch (p_mode) {
- case MODE_DYNAMIC: {
- set_body_mode(PhysicsServer3D::BODY_MODE_DYNAMIC);
- } break;
- case MODE_STATIC: {
- set_body_mode(PhysicsServer3D::BODY_MODE_STATIC);
- } break;
- case MODE_DYNAMIC_LOCKED: {
- set_body_mode(PhysicsServer3D::BODY_MODE_DYNAMIC_LOCKED);
- } break;
- case MODE_KINEMATIC: {
- set_body_mode(PhysicsServer3D::BODY_MODE_KINEMATIC);
- } break;
+void RigidDynamicBody3D::_apply_body_mode() {
+ if (freeze) {
+ switch (freeze_mode) {
+ case FREEZE_MODE_STATIC: {
+ set_body_mode(PhysicsServer3D::BODY_MODE_STATIC);
+ } break;
+ case FREEZE_MODE_KINEMATIC: {
+ set_body_mode(PhysicsServer3D::BODY_MODE_KINEMATIC);
+ } break;
+ }
+ } else if (lock_rotation) {
+ set_body_mode(PhysicsServer3D::BODY_MODE_DYNAMIC_LINEAR);
+ } else {
+ set_body_mode(PhysicsServer3D::BODY_MODE_DYNAMIC);
+ }
+}
+
+void RigidDynamicBody3D::set_lock_rotation_enabled(bool p_lock_rotation) {
+ if (p_lock_rotation == lock_rotation) {
+ return;
+ }
+
+ lock_rotation = p_lock_rotation;
+ _apply_body_mode();
+}
+
+bool RigidDynamicBody3D::is_lock_rotation_enabled() const {
+ return lock_rotation;
+}
+
+void RigidDynamicBody3D::set_freeze_enabled(bool p_freeze) {
+ if (p_freeze == freeze) {
+ return;
+ }
+
+ freeze = p_freeze;
+ _apply_body_mode();
+}
+
+bool RigidDynamicBody3D::is_freeze_enabled() const {
+ return freeze;
+}
+
+void RigidDynamicBody3D::set_freeze_mode(FreezeMode p_freeze_mode) {
+ if (p_freeze_mode == freeze_mode) {
+ return;
}
- update_configuration_warnings();
+
+ freeze_mode = p_freeze_mode;
+ _apply_body_mode();
}
-RigidBody3D::Mode RigidBody3D::get_mode() const {
- return mode;
+RigidDynamicBody3D::FreezeMode RigidDynamicBody3D::get_freeze_mode() const {
+ return freeze_mode;
}
-void RigidBody3D::set_mass(real_t p_mass) {
+void RigidDynamicBody3D::set_mass(real_t p_mass) {
ERR_FAIL_COND(p_mass <= 0);
mass = p_mass;
PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_MASS, mass);
}
-real_t RigidBody3D::get_mass() const {
+real_t RigidDynamicBody3D::get_mass() const {
return mass;
}
-void RigidBody3D::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) {
+void RigidDynamicBody3D::set_inertia(const Vector3 &p_inertia) {
+ ERR_FAIL_COND(p_inertia.x < 0);
+ ERR_FAIL_COND(p_inertia.y < 0);
+ ERR_FAIL_COND(p_inertia.z < 0);
+
+ inertia = p_inertia;
+ PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_INERTIA, inertia);
+}
+
+const Vector3 &RigidDynamicBody3D::get_inertia() const {
+ return inertia;
+}
+
+void RigidDynamicBody3D::set_center_of_mass_mode(CenterOfMassMode p_mode) {
+ if (center_of_mass_mode == p_mode) {
+ return;
+ }
+
+ center_of_mass_mode = p_mode;
+
+ switch (center_of_mass_mode) {
+ case CENTER_OF_MASS_MODE_AUTO: {
+ center_of_mass = Vector3();
+ PhysicsServer3D::get_singleton()->body_reset_mass_properties(get_rid());
+ if (inertia != Vector3()) {
+ PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_INERTIA, inertia);
+ }
+ } break;
+
+ case CENTER_OF_MASS_MODE_CUSTOM: {
+ PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_CENTER_OF_MASS, center_of_mass);
+ } break;
+ }
+}
+
+RigidDynamicBody3D::CenterOfMassMode RigidDynamicBody3D::get_center_of_mass_mode() const {
+ return center_of_mass_mode;
+}
+
+void RigidDynamicBody3D::set_center_of_mass(const Vector3 &p_center_of_mass) {
+ if (center_of_mass == p_center_of_mass) {
+ return;
+ }
+
+ ERR_FAIL_COND(center_of_mass_mode != CENTER_OF_MASS_MODE_CUSTOM);
+ center_of_mass = p_center_of_mass;
+
+ PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_CENTER_OF_MASS, center_of_mass);
+}
+
+const Vector3 &RigidDynamicBody3D::get_center_of_mass() const {
+ return center_of_mass;
+}
+
+void RigidDynamicBody3D::set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override) {
if (physics_material_override.is_valid()) {
- if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidBody3D::_reload_physics_characteristics))) {
- physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidBody3D::_reload_physics_characteristics));
+ if (physics_material_override->is_connected(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidDynamicBody3D::_reload_physics_characteristics))) {
+ physics_material_override->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidDynamicBody3D::_reload_physics_characteristics));
}
}
physics_material_override = p_physics_material_override;
if (physics_material_override.is_valid()) {
- physics_material_override->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidBody3D::_reload_physics_characteristics));
+ physics_material_override->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &RigidDynamicBody3D::_reload_physics_characteristics));
}
_reload_physics_characteristics();
}
-Ref<PhysicsMaterial> RigidBody3D::get_physics_material_override() const {
+Ref<PhysicsMaterial> RigidDynamicBody3D::get_physics_material_override() const {
return physics_material_override;
}
-void RigidBody3D::set_gravity_scale(real_t p_gravity_scale) {
+void RigidDynamicBody3D::set_gravity_scale(real_t p_gravity_scale) {
gravity_scale = p_gravity_scale;
PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_GRAVITY_SCALE, gravity_scale);
}
-real_t RigidBody3D::get_gravity_scale() const {
+real_t RigidDynamicBody3D::get_gravity_scale() const {
return gravity_scale;
}
-void RigidBody3D::set_linear_damp(real_t p_linear_damp) {
+void RigidDynamicBody3D::set_linear_damp(real_t p_linear_damp) {
ERR_FAIL_COND(p_linear_damp < -1);
linear_damp = p_linear_damp;
PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_LINEAR_DAMP, linear_damp);
}
-real_t RigidBody3D::get_linear_damp() const {
+real_t RigidDynamicBody3D::get_linear_damp() const {
return linear_damp;
}
-void RigidBody3D::set_angular_damp(real_t p_angular_damp) {
+void RigidDynamicBody3D::set_angular_damp(real_t p_angular_damp) {
ERR_FAIL_COND(p_angular_damp < -1);
angular_damp = p_angular_damp;
PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_ANGULAR_DAMP, angular_damp);
}
-real_t RigidBody3D::get_angular_damp() const {
+real_t RigidDynamicBody3D::get_angular_damp() const {
return angular_damp;
}
-void RigidBody3D::set_axis_velocity(const Vector3 &p_axis) {
- Vector3 v = state ? state->get_linear_velocity() : linear_velocity;
+void RigidDynamicBody3D::set_axis_velocity(const Vector3 &p_axis) {
Vector3 axis = p_axis.normalized();
- v -= axis * axis.dot(v);
- v += p_axis;
- if (state) {
- set_linear_velocity(v);
- } else {
- PhysicsServer3D::get_singleton()->body_set_axis_velocity(get_rid(), p_axis);
- linear_velocity = v;
- }
+ linear_velocity -= axis * axis.dot(linear_velocity);
+ linear_velocity += p_axis;
+ PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_LINEAR_VELOCITY, linear_velocity);
}
-void RigidBody3D::set_linear_velocity(const Vector3 &p_velocity) {
+void RigidDynamicBody3D::set_linear_velocity(const Vector3 &p_velocity) {
linear_velocity = p_velocity;
- if (state) {
- state->set_linear_velocity(linear_velocity);
- } else {
- PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_LINEAR_VELOCITY, linear_velocity);
- }
+ PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_LINEAR_VELOCITY, linear_velocity);
}
-Vector3 RigidBody3D::get_linear_velocity() const {
+Vector3 RigidDynamicBody3D::get_linear_velocity() const {
return linear_velocity;
}
-void RigidBody3D::set_angular_velocity(const Vector3 &p_velocity) {
+void RigidDynamicBody3D::set_angular_velocity(const Vector3 &p_velocity) {
angular_velocity = p_velocity;
- if (state) {
- state->set_angular_velocity(angular_velocity);
- } else {
- PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_ANGULAR_VELOCITY, angular_velocity);
- }
+ PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_ANGULAR_VELOCITY, angular_velocity);
}
-Vector3 RigidBody3D::get_angular_velocity() const {
+Vector3 RigidDynamicBody3D::get_angular_velocity() const {
return angular_velocity;
}
-Basis RigidBody3D::get_inverse_inertia_tensor() const {
+Basis RigidDynamicBody3D::get_inverse_inertia_tensor() const {
return inverse_inertia_tensor;
}
-void RigidBody3D::set_use_custom_integrator(bool p_enable) {
+void RigidDynamicBody3D::set_use_custom_integrator(bool p_enable) {
if (custom_integrator == p_enable) {
return;
}
@@ -838,73 +815,73 @@ void RigidBody3D::set_use_custom_integrator(bool p_enable) {
PhysicsServer3D::get_singleton()->body_set_omit_force_integration(get_rid(), p_enable);
}
-bool RigidBody3D::is_using_custom_integrator() {
+bool RigidDynamicBody3D::is_using_custom_integrator() {
return custom_integrator;
}
-void RigidBody3D::set_sleeping(bool p_sleeping) {
+void RigidDynamicBody3D::set_sleeping(bool p_sleeping) {
sleeping = p_sleeping;
PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_SLEEPING, sleeping);
}
-void RigidBody3D::set_can_sleep(bool p_active) {
+void RigidDynamicBody3D::set_can_sleep(bool p_active) {
can_sleep = p_active;
PhysicsServer3D::get_singleton()->body_set_state(get_rid(), PhysicsServer3D::BODY_STATE_CAN_SLEEP, p_active);
}
-bool RigidBody3D::is_able_to_sleep() const {
+bool RigidDynamicBody3D::is_able_to_sleep() const {
return can_sleep;
}
-bool RigidBody3D::is_sleeping() const {
+bool RigidDynamicBody3D::is_sleeping() const {
return sleeping;
}
-void RigidBody3D::set_max_contacts_reported(int p_amount) {
+void RigidDynamicBody3D::set_max_contacts_reported(int p_amount) {
max_contacts_reported = p_amount;
PhysicsServer3D::get_singleton()->body_set_max_contacts_reported(get_rid(), p_amount);
}
-int RigidBody3D::get_max_contacts_reported() const {
+int RigidDynamicBody3D::get_max_contacts_reported() const {
return max_contacts_reported;
}
-void RigidBody3D::add_central_force(const Vector3 &p_force) {
+void RigidDynamicBody3D::add_central_force(const Vector3 &p_force) {
PhysicsServer3D::get_singleton()->body_add_central_force(get_rid(), p_force);
}
-void RigidBody3D::add_force(const Vector3 &p_force, const Vector3 &p_position) {
+void RigidDynamicBody3D::add_force(const Vector3 &p_force, const Vector3 &p_position) {
PhysicsServer3D *singleton = PhysicsServer3D::get_singleton();
singleton->body_add_force(get_rid(), p_force, p_position);
}
-void RigidBody3D::add_torque(const Vector3 &p_torque) {
+void RigidDynamicBody3D::add_torque(const Vector3 &p_torque) {
PhysicsServer3D::get_singleton()->body_add_torque(get_rid(), p_torque);
}
-void RigidBody3D::apply_central_impulse(const Vector3 &p_impulse) {
+void RigidDynamicBody3D::apply_central_impulse(const Vector3 &p_impulse) {
PhysicsServer3D::get_singleton()->body_apply_central_impulse(get_rid(), p_impulse);
}
-void RigidBody3D::apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position) {
+void RigidDynamicBody3D::apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position) {
PhysicsServer3D *singleton = PhysicsServer3D::get_singleton();
singleton->body_apply_impulse(get_rid(), p_impulse, p_position);
}
-void RigidBody3D::apply_torque_impulse(const Vector3 &p_impulse) {
+void RigidDynamicBody3D::apply_torque_impulse(const Vector3 &p_impulse) {
PhysicsServer3D::get_singleton()->body_apply_torque_impulse(get_rid(), p_impulse);
}
-void RigidBody3D::set_use_continuous_collision_detection(bool p_enable) {
+void RigidDynamicBody3D::set_use_continuous_collision_detection(bool p_enable) {
ccd = p_enable;
PhysicsServer3D::get_singleton()->body_set_enable_continuous_collision_detection(get_rid(), p_enable);
}
-bool RigidBody3D::is_using_continuous_collision_detection() const {
+bool RigidDynamicBody3D::is_using_continuous_collision_detection() const {
return ccd;
}
-void RigidBody3D::set_contact_monitor(bool p_enabled) {
+void RigidDynamicBody3D::set_contact_monitor(bool p_enabled) {
if (p_enabled == is_contact_monitor_enabled()) {
return;
}
@@ -918,8 +895,8 @@ void RigidBody3D::set_contact_monitor(bool p_enabled) {
Node *node = Object::cast_to<Node>(obj);
if (node) {
- node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidBody3D::_body_enter_tree));
- node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidBody3D::_body_exit_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidDynamicBody3D::_body_enter_tree));
+ node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidDynamicBody3D::_body_exit_tree));
}
}
@@ -931,11 +908,11 @@ void RigidBody3D::set_contact_monitor(bool p_enabled) {
}
}
-bool RigidBody3D::is_contact_monitor_enabled() const {
+bool RigidDynamicBody3D::is_contact_monitor_enabled() const {
return contact_monitor != nullptr;
}
-Array RigidBody3D::get_colliding_bodies() const {
+Array RigidDynamicBody3D::get_colliding_bodies() const {
ERR_FAIL_COND_V(!contact_monitor, Array());
Array ret;
@@ -953,79 +930,97 @@ Array RigidBody3D::get_colliding_bodies() const {
return ret;
}
-TypedArray<String> RigidBody3D::get_configuration_warnings() const {
+TypedArray<String> RigidDynamicBody3D::get_configuration_warnings() const {
Transform3D t = get_transform();
TypedArray<String> warnings = Node::get_configuration_warnings();
- if ((get_mode() == MODE_DYNAMIC || get_mode() == MODE_DYNAMIC_LOCKED) && (ABS(t.basis.get_axis(0).length() - 1.0) > 0.05 || ABS(t.basis.get_axis(1).length() - 1.0) > 0.05 || ABS(t.basis.get_axis(2).length() - 1.0) > 0.05)) {
- warnings.push_back(TTR("Size changes to RigidBody3D (in dynamic modes) will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."));
+ if (ABS(t.basis.get_axis(0).length() - 1.0) > 0.05 || ABS(t.basis.get_axis(1).length() - 1.0) > 0.05 || ABS(t.basis.get_axis(2).length() - 1.0) > 0.05) {
+ warnings.push_back(TTR("Size changes to RigidDynamicBody will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."));
}
return warnings;
}
-void RigidBody3D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_mode", "mode"), &RigidBody3D::set_mode);
- ClassDB::bind_method(D_METHOD("get_mode"), &RigidBody3D::get_mode);
+void RigidDynamicBody3D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_mass", "mass"), &RigidDynamicBody3D::set_mass);
+ ClassDB::bind_method(D_METHOD("get_mass"), &RigidDynamicBody3D::get_mass);
+
+ ClassDB::bind_method(D_METHOD("set_inertia", "inertia"), &RigidDynamicBody3D::set_inertia);
+ ClassDB::bind_method(D_METHOD("get_inertia"), &RigidDynamicBody3D::get_inertia);
+
+ ClassDB::bind_method(D_METHOD("set_center_of_mass_mode", "mode"), &RigidDynamicBody3D::set_center_of_mass_mode);
+ ClassDB::bind_method(D_METHOD("get_center_of_mass_mode"), &RigidDynamicBody3D::get_center_of_mass_mode);
- ClassDB::bind_method(D_METHOD("set_mass", "mass"), &RigidBody3D::set_mass);
- ClassDB::bind_method(D_METHOD("get_mass"), &RigidBody3D::get_mass);
+ ClassDB::bind_method(D_METHOD("set_center_of_mass", "center_of_mass"), &RigidDynamicBody3D::set_center_of_mass);
+ ClassDB::bind_method(D_METHOD("get_center_of_mass"), &RigidDynamicBody3D::get_center_of_mass);
- ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &RigidBody3D::set_physics_material_override);
- ClassDB::bind_method(D_METHOD("get_physics_material_override"), &RigidBody3D::get_physics_material_override);
+ ClassDB::bind_method(D_METHOD("set_physics_material_override", "physics_material_override"), &RigidDynamicBody3D::set_physics_material_override);
+ ClassDB::bind_method(D_METHOD("get_physics_material_override"), &RigidDynamicBody3D::get_physics_material_override);
- ClassDB::bind_method(D_METHOD("set_linear_velocity", "linear_velocity"), &RigidBody3D::set_linear_velocity);
- ClassDB::bind_method(D_METHOD("get_linear_velocity"), &RigidBody3D::get_linear_velocity);
+ ClassDB::bind_method(D_METHOD("set_linear_velocity", "linear_velocity"), &RigidDynamicBody3D::set_linear_velocity);
+ ClassDB::bind_method(D_METHOD("get_linear_velocity"), &RigidDynamicBody3D::get_linear_velocity);
- ClassDB::bind_method(D_METHOD("set_angular_velocity", "angular_velocity"), &RigidBody3D::set_angular_velocity);
- ClassDB::bind_method(D_METHOD("get_angular_velocity"), &RigidBody3D::get_angular_velocity);
+ ClassDB::bind_method(D_METHOD("set_angular_velocity", "angular_velocity"), &RigidDynamicBody3D::set_angular_velocity);
+ ClassDB::bind_method(D_METHOD("get_angular_velocity"), &RigidDynamicBody3D::get_angular_velocity);
- ClassDB::bind_method(D_METHOD("get_inverse_inertia_tensor"), &RigidBody3D::get_inverse_inertia_tensor);
+ ClassDB::bind_method(D_METHOD("get_inverse_inertia_tensor"), &RigidDynamicBody3D::get_inverse_inertia_tensor);
- ClassDB::bind_method(D_METHOD("set_gravity_scale", "gravity_scale"), &RigidBody3D::set_gravity_scale);
- ClassDB::bind_method(D_METHOD("get_gravity_scale"), &RigidBody3D::get_gravity_scale);
+ ClassDB::bind_method(D_METHOD("set_gravity_scale", "gravity_scale"), &RigidDynamicBody3D::set_gravity_scale);
+ ClassDB::bind_method(D_METHOD("get_gravity_scale"), &RigidDynamicBody3D::get_gravity_scale);
- ClassDB::bind_method(D_METHOD("set_linear_damp", "linear_damp"), &RigidBody3D::set_linear_damp);
- ClassDB::bind_method(D_METHOD("get_linear_damp"), &RigidBody3D::get_linear_damp);
+ ClassDB::bind_method(D_METHOD("set_linear_damp", "linear_damp"), &RigidDynamicBody3D::set_linear_damp);
+ ClassDB::bind_method(D_METHOD("get_linear_damp"), &RigidDynamicBody3D::get_linear_damp);
- ClassDB::bind_method(D_METHOD("set_angular_damp", "angular_damp"), &RigidBody3D::set_angular_damp);
- ClassDB::bind_method(D_METHOD("get_angular_damp"), &RigidBody3D::get_angular_damp);
+ ClassDB::bind_method(D_METHOD("set_angular_damp", "angular_damp"), &RigidDynamicBody3D::set_angular_damp);
+ ClassDB::bind_method(D_METHOD("get_angular_damp"), &RigidDynamicBody3D::get_angular_damp);
- ClassDB::bind_method(D_METHOD("set_max_contacts_reported", "amount"), &RigidBody3D::set_max_contacts_reported);
- ClassDB::bind_method(D_METHOD("get_max_contacts_reported"), &RigidBody3D::get_max_contacts_reported);
+ ClassDB::bind_method(D_METHOD("set_max_contacts_reported", "amount"), &RigidDynamicBody3D::set_max_contacts_reported);
+ ClassDB::bind_method(D_METHOD("get_max_contacts_reported"), &RigidDynamicBody3D::get_max_contacts_reported);
- ClassDB::bind_method(D_METHOD("set_use_custom_integrator", "enable"), &RigidBody3D::set_use_custom_integrator);
- ClassDB::bind_method(D_METHOD("is_using_custom_integrator"), &RigidBody3D::is_using_custom_integrator);
+ ClassDB::bind_method(D_METHOD("set_use_custom_integrator", "enable"), &RigidDynamicBody3D::set_use_custom_integrator);
+ ClassDB::bind_method(D_METHOD("is_using_custom_integrator"), &RigidDynamicBody3D::is_using_custom_integrator);
- ClassDB::bind_method(D_METHOD("set_contact_monitor", "enabled"), &RigidBody3D::set_contact_monitor);
- ClassDB::bind_method(D_METHOD("is_contact_monitor_enabled"), &RigidBody3D::is_contact_monitor_enabled);
+ ClassDB::bind_method(D_METHOD("set_contact_monitor", "enabled"), &RigidDynamicBody3D::set_contact_monitor);
+ ClassDB::bind_method(D_METHOD("is_contact_monitor_enabled"), &RigidDynamicBody3D::is_contact_monitor_enabled);
- ClassDB::bind_method(D_METHOD("set_use_continuous_collision_detection", "enable"), &RigidBody3D::set_use_continuous_collision_detection);
- ClassDB::bind_method(D_METHOD("is_using_continuous_collision_detection"), &RigidBody3D::is_using_continuous_collision_detection);
+ ClassDB::bind_method(D_METHOD("set_use_continuous_collision_detection", "enable"), &RigidDynamicBody3D::set_use_continuous_collision_detection);
+ ClassDB::bind_method(D_METHOD("is_using_continuous_collision_detection"), &RigidDynamicBody3D::is_using_continuous_collision_detection);
- ClassDB::bind_method(D_METHOD("set_axis_velocity", "axis_velocity"), &RigidBody3D::set_axis_velocity);
+ ClassDB::bind_method(D_METHOD("set_axis_velocity", "axis_velocity"), &RigidDynamicBody3D::set_axis_velocity);
- ClassDB::bind_method(D_METHOD("add_central_force", "force"), &RigidBody3D::add_central_force);
- ClassDB::bind_method(D_METHOD("add_force", "force", "position"), &RigidBody3D::add_force, Vector3());
- ClassDB::bind_method(D_METHOD("add_torque", "torque"), &RigidBody3D::add_torque);
+ ClassDB::bind_method(D_METHOD("add_central_force", "force"), &RigidDynamicBody3D::add_central_force);
+ ClassDB::bind_method(D_METHOD("add_force", "force", "position"), &RigidDynamicBody3D::add_force, Vector3());
+ ClassDB::bind_method(D_METHOD("add_torque", "torque"), &RigidDynamicBody3D::add_torque);
- ClassDB::bind_method(D_METHOD("apply_central_impulse", "impulse"), &RigidBody3D::apply_central_impulse);
- ClassDB::bind_method(D_METHOD("apply_impulse", "impulse", "position"), &RigidBody3D::apply_impulse, Vector3());
- ClassDB::bind_method(D_METHOD("apply_torque_impulse", "impulse"), &RigidBody3D::apply_torque_impulse);
+ ClassDB::bind_method(D_METHOD("apply_central_impulse", "impulse"), &RigidDynamicBody3D::apply_central_impulse);
+ ClassDB::bind_method(D_METHOD("apply_impulse", "impulse", "position"), &RigidDynamicBody3D::apply_impulse, Vector3());
+ ClassDB::bind_method(D_METHOD("apply_torque_impulse", "impulse"), &RigidDynamicBody3D::apply_torque_impulse);
- ClassDB::bind_method(D_METHOD("set_sleeping", "sleeping"), &RigidBody3D::set_sleeping);
- ClassDB::bind_method(D_METHOD("is_sleeping"), &RigidBody3D::is_sleeping);
+ ClassDB::bind_method(D_METHOD("set_sleeping", "sleeping"), &RigidDynamicBody3D::set_sleeping);
+ ClassDB::bind_method(D_METHOD("is_sleeping"), &RigidDynamicBody3D::is_sleeping);
- ClassDB::bind_method(D_METHOD("set_can_sleep", "able_to_sleep"), &RigidBody3D::set_can_sleep);
- ClassDB::bind_method(D_METHOD("is_able_to_sleep"), &RigidBody3D::is_able_to_sleep);
+ ClassDB::bind_method(D_METHOD("set_can_sleep", "able_to_sleep"), &RigidDynamicBody3D::set_can_sleep);
+ ClassDB::bind_method(D_METHOD("is_able_to_sleep"), &RigidDynamicBody3D::is_able_to_sleep);
- ClassDB::bind_method(D_METHOD("get_colliding_bodies"), &RigidBody3D::get_colliding_bodies);
+ ClassDB::bind_method(D_METHOD("set_lock_rotation_enabled", "lock_rotation"), &RigidDynamicBody3D::set_lock_rotation_enabled);
+ ClassDB::bind_method(D_METHOD("is_lock_rotation_enabled"), &RigidDynamicBody3D::is_lock_rotation_enabled);
- BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectBodyState3D")));
+ ClassDB::bind_method(D_METHOD("set_freeze_enabled", "freeze_mode"), &RigidDynamicBody3D::set_freeze_enabled);
+ ClassDB::bind_method(D_METHOD("is_freeze_enabled"), &RigidDynamicBody3D::is_freeze_enabled);
- ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Dynamic,Static,DynamicLocked,Kinematic"), "set_mode", "get_mode");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,65535,0.01,exp"), "set_mass", "get_mass");
+ ClassDB::bind_method(D_METHOD("set_freeze_mode", "freeze_mode"), &RigidDynamicBody3D::set_freeze_mode);
+ ClassDB::bind_method(D_METHOD("get_freeze_mode"), &RigidDynamicBody3D::get_freeze_mode);
+
+ ClassDB::bind_method(D_METHOD("get_colliding_bodies"), &RigidDynamicBody3D::get_colliding_bodies);
+
+ GDVIRTUAL_BIND(_integrate_forces, "state");
+
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,1000,0.01,or_greater,exp"), "set_mass", "get_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "inertia", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater,exp"), "set_inertia", "get_inertia");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "center_of_mass_mode", PROPERTY_HINT_ENUM, "Auto,Custom", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_center_of_mass_mode", "get_center_of_mass_mode");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "center_of_mass", PROPERTY_HINT_RANGE, "-10,10,0.01,or_lesser,or_greater"), "set_center_of_mass", "get_center_of_mass");
+ ADD_LINKED_PROPERTY("center_of_mass_mode", "center_of_mass");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), "set_physics_material_override", "get_physics_material_override");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-128,128,0.01"), "set_gravity_scale", "get_gravity_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "custom_integrator"), "set_use_custom_integrator", "is_using_custom_integrator");
@@ -1034,6 +1029,9 @@ void RigidBody3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "contact_monitor"), "set_contact_monitor", "is_contact_monitor_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sleeping"), "set_sleeping", "is_sleeping");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "can_sleep"), "set_can_sleep", "is_able_to_sleep");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "lock_rotation"), "set_lock_rotation_enabled", "is_lock_rotation_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "freeze"), "set_freeze_enabled", "is_freeze_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "freeze_mode", PROPERTY_HINT_ENUM, "Static,Kinematic"), "set_freeze_mode", "get_freeze_mode");
ADD_GROUP("Linear", "linear_");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "linear_velocity"), "set_linear_velocity", "get_linear_velocity");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), "set_linear_damp", "get_linear_damp");
@@ -1047,24 +1045,33 @@ void RigidBody3D::_bind_methods() {
ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
ADD_SIGNAL(MethodInfo("sleeping_state_changed"));
- BIND_ENUM_CONSTANT(MODE_DYNAMIC);
- BIND_ENUM_CONSTANT(MODE_STATIC);
- BIND_ENUM_CONSTANT(MODE_DYNAMIC_LOCKED);
- BIND_ENUM_CONSTANT(MODE_KINEMATIC);
+ BIND_ENUM_CONSTANT(FREEZE_MODE_STATIC);
+ BIND_ENUM_CONSTANT(FREEZE_MODE_KINEMATIC);
+
+ BIND_ENUM_CONSTANT(CENTER_OF_MASS_MODE_AUTO);
+ BIND_ENUM_CONSTANT(CENTER_OF_MASS_MODE_CUSTOM);
}
-RigidBody3D::RigidBody3D() :
+void RigidDynamicBody3D::_validate_property(PropertyInfo &property) const {
+ if (center_of_mass_mode != CENTER_OF_MASS_MODE_CUSTOM) {
+ if (property.name == "center_of_mass") {
+ property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL;
+ }
+ }
+}
+
+RigidDynamicBody3D::RigidDynamicBody3D() :
PhysicsBody3D(PhysicsServer3D::BODY_MODE_DYNAMIC) {
- PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), callable_mp(this, &RigidBody3D::_direct_state_changed));
+ PhysicsServer3D::get_singleton()->body_set_state_sync_callback(get_rid(), this, _body_state_changed_callback);
}
-RigidBody3D::~RigidBody3D() {
+RigidDynamicBody3D::~RigidDynamicBody3D() {
if (contact_monitor) {
memdelete(contact_monitor);
}
}
-void RigidBody3D::_reload_physics_characteristics() {
+void RigidDynamicBody3D::_reload_physics_characteristics() {
if (physics_material_override.is_null()) {
PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_BOUNCE, 0);
PhysicsServer3D::get_singleton()->body_set_param(get_rid(), PhysicsServer3D::BODY_PARAM_FRICTION, 1);
@@ -1080,162 +1087,479 @@ void RigidBody3D::_reload_physics_characteristics() {
#define FLOOR_ANGLE_THRESHOLD 0.01
bool CharacterBody3D::move_and_slide() {
- Vector3 body_velocity_normal = linear_velocity.normalized();
-
- bool was_on_floor = on_floor;
-
// Hack in order to work with calling from _process as well as from _physics_process; calling from thread is risky
- float delta = Engine::get_singleton()->is_in_physics_frame() ? get_physics_process_delta_time() : get_process_delta_time();
-
+ double delta = Engine::get_singleton()->is_in_physics_frame() ? get_physics_process_delta_time() : get_process_delta_time();
+ previous_position = get_global_transform().origin;
for (int i = 0; i < 3; i++) {
if (locked_axis & (1 << i)) {
linear_velocity[i] = 0.0;
}
}
- Vector3 current_floor_velocity = floor_velocity;
- if ((on_floor || on_wall) && on_floor_body.is_valid()) {
- //this approach makes sure there is less delay between the actual body velocity and the one we saved
- PhysicsDirectBodyState3D *bs = PhysicsServer3D::get_singleton()->body_get_direct_state(on_floor_body);
- if (bs) {
- Transform3D gt = get_global_transform();
- Vector3 local_position = gt.origin - bs->get_transform().origin;
- current_floor_velocity = bs->get_velocity_at_local_position(local_position);
+ Vector3 current_platform_velocity = platform_velocity;
+
+ if ((collision_state.floor || collision_state.wall) && platform_rid.is_valid()) {
+ bool excluded = false;
+ if (collision_state.floor) {
+ excluded = (moving_platform_floor_layers & platform_layer) == 0;
+ } else if (collision_state.wall) {
+ excluded = (moving_platform_wall_layers & platform_layer) == 0;
+ }
+ if (!excluded) {
+ //this approach makes sure there is less delay between the actual body velocity and the one we saved
+ PhysicsDirectBodyState3D *bs = PhysicsServer3D::get_singleton()->body_get_direct_state(platform_rid);
+ if (bs) {
+ Transform3D gt = get_global_transform();
+ Vector3 local_position = gt.origin - bs->get_transform().origin;
+ current_platform_velocity = bs->get_velocity_at_local_position(local_position);
+ }
+ } else {
+ current_platform_velocity = Vector3();
}
}
motion_results.clear();
- on_floor = false;
- on_ceiling = false;
- on_wall = false;
- floor_normal = Vector3();
- floor_velocity = Vector3();
- if (current_floor_velocity != Vector3() && on_floor_body.is_valid()) {
+ bool was_on_floor = collision_state.floor;
+ collision_state.state = 0;
+
+ if (!current_platform_velocity.is_equal_approx(Vector3())) {
PhysicsServer3D::MotionResult floor_result;
Set<RID> exclude;
- exclude.insert(on_floor_body);
- if (move_and_collide(current_floor_velocity * delta, floor_result, margin, false, false, exclude)) {
+ exclude.insert(platform_rid);
+ if (move_and_collide(current_platform_velocity * delta, floor_result, margin, false, 1, false, false, exclude)) {
motion_results.push_back(floor_result);
- _set_collision_direction(floor_result);
+
+ CollisionState result_state;
+ _set_collision_direction(floor_result, result_state);
+ }
+ }
+
+ if (motion_mode == MOTION_MODE_GROUNDED) {
+ _move_and_slide_grounded(delta, was_on_floor);
+ } else {
+ _move_and_slide_free(delta);
+ }
+
+ // Compute real velocity.
+ real_velocity = get_position_delta() / delta;
+
+ if (moving_platform_apply_velocity_on_leave != PLATFORM_VEL_ON_LEAVE_NEVER) {
+ // Add last platform velocity when just left a moving platform.
+ if (!collision_state.floor && !collision_state.wall) {
+ if (moving_platform_apply_velocity_on_leave == PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY && current_platform_velocity.dot(up_direction) < 0) {
+ current_platform_velocity = current_platform_velocity.slide(up_direction);
+ }
+ linear_velocity += current_platform_velocity;
}
}
- on_floor_body = RID();
- Vector3 motion = linear_velocity * delta;
+ // Reset the gravity accumulation when touching the ground.
+ if (collision_state.floor && linear_velocity.dot(up_direction) <= 0) {
+ linear_velocity = linear_velocity.slide(up_direction);
+ }
+
+ return motion_results.size() > 0;
+}
+
+void CharacterBody3D::_move_and_slide_grounded(double p_delta, bool p_was_on_floor) {
+ Vector3 motion = linear_velocity * p_delta;
+ Vector3 motion_slide_up = motion.slide(up_direction);
+ Vector3 prev_floor_normal = floor_normal;
+
+ platform_rid = RID();
+ platform_velocity = Vector3();
+ floor_normal = Vector3();
+ wall_normal = Vector3();
// No sliding on first attempt to keep floor motion stable when possible,
- // when stop on slope is enabled.
+ // When stop on slope is enabled or when there is no up direction.
bool sliding_enabled = !floor_stop_on_slope;
+ // Constant speed can be applied only the first time sliding is enabled.
+ bool can_apply_constant_speed = sliding_enabled;
+ bool first_slide = true;
+ bool vel_dir_facing_up = linear_velocity.dot(up_direction) > 0;
+ Vector3 total_travel;
for (int iteration = 0; iteration < max_slides; ++iteration) {
PhysicsServer3D::MotionResult result;
- bool found_collision = false;
-
- bool collided = move_and_collide(motion, result, margin, false, !sliding_enabled);
- if (!collided) {
- motion = Vector3(); //clear because no collision happened and motion completed
- } else {
- found_collision = true;
+ bool collided = move_and_collide(motion, result, margin, false, 4, !sliding_enabled);
+ if (collided) {
motion_results.push_back(result);
- _set_collision_direction(result);
- if (on_floor && floor_stop_on_slope) {
- if ((body_velocity_normal + up_direction).length() < 0.01) {
- Transform3D gt = get_global_transform();
- if (result.travel.length() > margin) {
- gt.origin -= result.travel.slide(up_direction);
- } else {
- gt.origin -= result.travel;
- }
- set_global_transform(gt);
- linear_velocity = Vector3();
- return true;
+ CollisionState previous_state = collision_state;
+
+ CollisionState result_state;
+ _set_collision_direction(result, result_state);
+
+ if (collision_state.floor && floor_stop_on_slope && (linear_velocity.normalized() + up_direction).length() < 0.01) {
+ Transform3D gt = get_global_transform();
+ if (result.travel.length() <= margin + CMP_EPSILON) {
+ gt.origin -= result.travel;
}
+ set_global_transform(gt);
+ linear_velocity = Vector3();
+ motion = Vector3();
+ break;
}
- if (sliding_enabled || !on_floor) {
- motion = result.remainder.slide(result.collision_normal);
- linear_velocity = linear_velocity.slide(result.collision_normal);
+ if (result.remainder.is_equal_approx(Vector3())) {
+ motion = Vector3();
+ last_motion = result.travel;
+ break;
+ }
+
+ // Apply regular sliding by default.
+ bool apply_default_sliding = true;
+
+ // Wall collision checks.
+ if (result_state.wall && (motion_slide_up.dot(wall_normal) <= 0)) {
+ // Move on floor only checks.
+ if (floor_block_on_wall) {
+ // Needs horizontal motion from current motion instead of motion_slide_up
+ // to properly test the angle and avoid standing on slopes
+ Vector3 horizontal_motion = motion.slide(up_direction);
+ Vector3 horizontal_normal = wall_normal.slide(up_direction).normalized();
+ real_t motion_angle = Math::abs(Math::acos(-horizontal_normal.dot(horizontal_motion.normalized())));
+
+ // Avoid to move forward on a wall if floor_block_on_wall is true.
+ // Applies only when the motion angle is under 90 degrees,
+ // in order to avoid blocking lateral motion along a wall.
+ if (motion_angle < .5 * Math_PI) {
+ apply_default_sliding = false;
+
+ if (p_was_on_floor && !vel_dir_facing_up) {
+ // Cancel the motion.
+ Transform3D gt = get_global_transform();
+ real_t travel_total = result.travel.length();
+ real_t cancel_dist_max = MIN(0.1, margin * 20);
+ if (travel_total <= margin + CMP_EPSILON) {
+ gt.origin -= result.travel;
+ } else if (travel_total < cancel_dist_max) { // If the movement is large the body can be prevented from reaching the walls.
+ gt.origin -= result.travel.slide(up_direction);
+ // Keep remaining motion in sync with amount canceled.
+ motion = motion.slide(up_direction);
+ }
+ set_global_transform(gt);
+ result.travel = Vector3(); // Cancel for constant speed computation.
+
+ // Determines if you are on the ground, and limits the possibility of climbing on the walls because of the approximations.
+ _snap_on_floor(true, false);
+ } else {
+ // If the movement is not cancelled we only keep the remaining.
+ motion = result.remainder;
+ }
+
+ // Apply slide on forward in order to allow only lateral motion on next step.
+ Vector3 forward = wall_normal.slide(up_direction).normalized();
+ motion = motion.slide(forward);
+ // Avoid accelerating when you jump on the wall and smooth falling.
+ linear_velocity = linear_velocity.slide(forward);
+
+ // Allow only lateral motion along previous floor when already on floor.
+ // Fixes slowing down when moving in diagonal against an inclined wall.
+ if (p_was_on_floor && !vel_dir_facing_up && (motion.dot(up_direction) > 0.0)) {
+ // Slide along the corner between the wall and previous floor.
+ Vector3 floor_side = prev_floor_normal.cross(wall_normal);
+ if (floor_side != Vector3()) {
+ motion = floor_side * motion.dot(floor_side);
+ }
+ }
+
+ // Stop all motion when a second wall is hit (unless sliding down or jumping),
+ // in order to avoid jittering in corner cases.
+ bool stop_all_motion = previous_state.wall && !vel_dir_facing_up;
+
+ // Allow sliding when the body falls.
+ if (!collision_state.floor && motion.dot(up_direction) < 0) {
+ Vector3 slide_motion = motion.slide(wall_normal);
+ // Test again to allow sliding only if the result goes downwards.
+ // Fixes jittering issues at the bottom of inclined walls.
+ if (slide_motion.dot(up_direction) < 0) {
+ stop_all_motion = false;
+ motion = slide_motion;
+ }
+ }
- for (int j = 0; j < 3; j++) {
- if (locked_axis & (1 << j)) {
- linear_velocity[j] = 0.0;
+ if (stop_all_motion) {
+ motion = Vector3();
+ linear_velocity = Vector3();
+ }
}
}
- } else {
- motion = result.remainder;
+
+ // Stop horizontal motion when under wall slide threshold.
+ if (p_was_on_floor && (wall_min_slide_angle > 0.0) && result_state.wall) {
+ Vector3 horizontal_normal = wall_normal.slide(up_direction).normalized();
+ real_t motion_angle = Math::abs(Math::acos(-horizontal_normal.dot(motion_slide_up.normalized())));
+ if (motion_angle < wall_min_slide_angle) {
+ motion = up_direction * motion.dot(up_direction);
+ linear_velocity = up_direction * linear_velocity.dot(up_direction);
+
+ apply_default_sliding = false;
+ }
+ }
+ }
+
+ if (apply_default_sliding) {
+ // Regular sliding, the last part of the test handle the case when you don't want to slide on the ceiling.
+ if ((sliding_enabled || !collision_state.floor) && (!collision_state.ceiling || slide_on_ceiling || !vel_dir_facing_up)) {
+ const PhysicsServer3D::MotionCollision &collision = result.collisions[0];
+ Vector3 slide_motion = result.remainder.slide(collision.normal);
+ if (slide_motion.dot(linear_velocity) > 0.0) {
+ motion = slide_motion;
+ } else {
+ motion = Vector3();
+ }
+ if (slide_on_ceiling && result_state.ceiling) {
+ // Apply slide only in the direction of the input motion, otherwise just stop to avoid jittering when moving against a wall.
+ if (vel_dir_facing_up) {
+ linear_velocity = linear_velocity.slide(collision.normal);
+ } else {
+ // Avoid acceleration in slope when falling.
+ linear_velocity = up_direction * up_direction.dot(linear_velocity);
+ }
+ }
+ }
+ // No sliding on first attempt to keep floor motion stable when possible.
+ else {
+ motion = result.remainder;
+ if (result_state.ceiling && !slide_on_ceiling && vel_dir_facing_up) {
+ linear_velocity = linear_velocity.slide(up_direction);
+ motion = motion.slide(up_direction);
+ }
+ }
+ }
+
+ // Apply Constant Speed.
+ if (p_was_on_floor && floor_constant_speed && collision_state.floor && !motion.is_equal_approx(Vector3())) {
+ motion = motion.normalized() * MAX(0, (motion_slide_up.length() - result.travel.slide(up_direction).length() - total_travel.slide(up_direction).length()));
}
+
+ total_travel += result.travel;
+ }
+ // When you move forward in a downward slope you don’t collide because you will be in the air.
+ // This test ensures that constant speed is applied, only if the player is still on the ground after the snap is applied.
+ else if (floor_constant_speed && first_slide && _on_floor_if_snapped(p_was_on_floor, vel_dir_facing_up)) {
+ can_apply_constant_speed = false;
+ sliding_enabled = true;
+ Transform3D gt = get_global_transform();
+ gt.origin = gt.origin - result.travel;
+ set_global_transform(gt);
+
+ Vector3 motion_slide_norm = motion.slide(prev_floor_normal).normalized();
+ motion = motion_slide_norm * (motion_slide_up.length());
+ collided = true;
}
+ can_apply_constant_speed = !can_apply_constant_speed && !sliding_enabled;
sliding_enabled = true;
+ first_slide = false;
- if (!found_collision || motion == Vector3()) {
+ if (!motion.is_equal_approx(Vector3())) {
+ last_motion = motion;
+ }
+
+ if (!collided || motion.is_equal_approx(Vector3())) {
break;
}
}
- if (was_on_floor && snap != Vector3()) {
- // Apply snap.
- Transform3D gt = get_global_transform();
+ _snap_on_floor(p_was_on_floor, vel_dir_facing_up);
+
+ // Reset the gravity accumulation when touching the ground.
+ if (collision_state.floor && !vel_dir_facing_up) {
+ linear_velocity = linear_velocity.slide(up_direction);
+ }
+}
+
+void CharacterBody3D::_move_and_slide_free(double p_delta) {
+ Vector3 motion = linear_velocity * p_delta;
+
+ platform_rid = RID();
+ floor_normal = Vector3();
+ platform_velocity = Vector3();
+
+ bool first_slide = true;
+ for (int iteration = 0; iteration < max_slides; ++iteration) {
PhysicsServer3D::MotionResult result;
- if (move_and_collide(snap, result, margin, true, false)) {
- bool apply = true;
- if (up_direction != Vector3()) {
- if (result.get_angle(up_direction) <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) {
- on_floor = true;
- floor_normal = result.collision_normal;
- on_floor_body = result.collider;
- floor_velocity = result.collider_velocity;
- if (floor_stop_on_slope) {
- // move and collide may stray the object a bit because of pre un-stucking,
- // so only ensure that motion happens on floor direction in this case.
- if (result.travel.length() > margin) {
- result.travel = result.travel.project(up_direction);
- } else {
- result.travel = Vector3();
- }
- }
- } else {
- apply = false; //snapped with floor direction, but did not snap to a floor, do not snap.
+
+ bool collided = move_and_collide(motion, result, margin, false, 1, false);
+
+ if (collided) {
+ motion_results.push_back(result);
+
+ CollisionState result_state;
+ _set_collision_direction(result, result_state);
+
+ if (wall_min_slide_angle != 0 && Math::acos(wall_normal.dot(-linear_velocity.normalized())) < wall_min_slide_angle + FLOOR_ANGLE_THRESHOLD) {
+ motion = Vector3();
+ if (result.travel.length() < margin + CMP_EPSILON) {
+ Transform3D gt = get_global_transform();
+ gt.origin -= result.travel;
+ set_global_transform(gt);
}
+ } else if (first_slide) {
+ Vector3 motion_slide_norm = result.remainder.slide(wall_normal).normalized();
+ motion = motion_slide_norm * (motion.length() - result.travel.length());
+ } else {
+ motion = result.remainder.slide(wall_normal);
}
- if (apply) {
- gt.origin += result.travel;
- set_global_transform(gt);
+
+ if (motion.dot(linear_velocity) <= 0.0) {
+ motion = Vector3();
}
}
+
+ first_slide = false;
+
+ if (!collided || motion.is_equal_approx(Vector3())) {
+ break;
+ }
}
+}
- if (!on_floor && !on_wall) {
- // Add last platform velocity when just left a moving platform.
- linear_velocity += current_floor_velocity;
+void CharacterBody3D::_snap_on_floor(bool was_on_floor, bool vel_dir_facing_up) {
+ if (collision_state.floor || !was_on_floor || vel_dir_facing_up) {
+ return;
}
- return motion_results.size() > 0;
+ // Snap by at least collision margin to keep floor state consistent.
+ real_t length = MAX(floor_snap_length, margin);
+
+ Transform3D gt = get_global_transform();
+ PhysicsServer3D::MotionResult result;
+ if (move_and_collide(-up_direction * length, result, margin, true, 4, false, true)) {
+ CollisionState result_state;
+ // Apply direction for floor only.
+ _set_collision_direction(result, result_state, CollisionState(true, false, false));
+
+ if (result_state.floor) {
+ if (floor_stop_on_slope) {
+ // move and collide may stray the object a bit because of pre un-stucking,
+ // so only ensure that motion happens on floor direction in this case.
+ if (result.travel.length() > margin) {
+ result.travel = up_direction * up_direction.dot(result.travel);
+ } else {
+ result.travel = Vector3();
+ }
+ }
+
+ gt.origin += result.travel;
+ set_global_transform(gt);
+ }
+ }
}
-void CharacterBody3D::_set_collision_direction(const PhysicsServer3D::MotionResult &p_result) {
- if (up_direction == Vector3()) {
- //all is a wall
- on_wall = true;
- } else {
- if (p_result.get_angle(up_direction) <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) { //floor
- on_floor = true;
- floor_normal = p_result.collision_normal;
- on_floor_body = p_result.collider;
- floor_velocity = p_result.collider_velocity;
- } else if (p_result.get_angle(-up_direction) <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) { //ceiling
- on_ceiling = true;
- } else {
- on_wall = true;
- on_floor_body = p_result.collider;
- floor_velocity = p_result.collider_velocity;
+bool CharacterBody3D::_on_floor_if_snapped(bool was_on_floor, bool vel_dir_facing_up) {
+ if (up_direction == Vector3() || collision_state.floor || !was_on_floor || vel_dir_facing_up) {
+ return false;
+ }
+
+ // Snap by at least collision margin to keep floor state consistent.
+ real_t length = MAX(floor_snap_length, margin);
+
+ PhysicsServer3D::MotionResult result;
+ if (move_and_collide(-up_direction * length, result, margin, true, 4, false, true)) {
+ CollisionState result_state;
+ // Don't apply direction for any type.
+ _set_collision_direction(result, result_state, CollisionState());
+
+ return result_state.floor;
+ }
+
+ return false;
+}
+
+void CharacterBody3D::_set_collision_direction(const PhysicsServer3D::MotionResult &p_result, CollisionState &r_state, CollisionState p_apply_state) {
+ r_state.state = 0;
+
+ real_t wall_depth = -1.0;
+ real_t floor_depth = -1.0;
+
+ bool was_on_wall = collision_state.wall;
+ Vector3 prev_wall_normal = wall_normal;
+ int wall_collision_count = 0;
+ Vector3 combined_wall_normal;
+
+ for (int i = p_result.collision_count - 1; i >= 0; i--) {
+ const PhysicsServer3D::MotionCollision &collision = p_result.collisions[i];
+
+ if (motion_mode == MOTION_MODE_GROUNDED) {
+ // Check if any collision is floor.
+ real_t floor_angle = collision.get_angle(up_direction);
+ if (floor_angle <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) {
+ r_state.floor = true;
+ if (p_apply_state.floor && collision.depth > floor_depth) {
+ collision_state.floor = true;
+ floor_normal = collision.normal;
+ floor_depth = collision.depth;
+ _set_platform_data(collision);
+ }
+ continue;
+ }
+
+ // Check if any collision is ceiling.
+ real_t ceiling_angle = collision.get_angle(-up_direction);
+ if (ceiling_angle <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) {
+ r_state.ceiling = true;
+ if (p_apply_state.ceiling) {
+ collision_state.ceiling = true;
+ }
+ continue;
+ }
+ }
+
+ // Collision is wall by default.
+ r_state.wall = true;
+
+ if (p_apply_state.wall && collision.depth > wall_depth) {
+ collision_state.wall = true;
+ wall_depth = collision.depth;
+ wall_normal = collision.normal;
+
+ // Don't apply wall velocity when the collider is a CharacterBody3D.
+ if (Object::cast_to<CharacterBody3D>(ObjectDB::get_instance(collision.collider_id)) == nullptr) {
+ _set_platform_data(collision);
+ }
+ }
+
+ // Collect normal for calculating average.
+ combined_wall_normal += collision.normal;
+ wall_collision_count++;
+ }
+
+ if (r_state.wall) {
+ if (wall_collision_count > 1 && !r_state.floor) {
+ // Check if wall normals cancel out to floor support.
+ if (!r_state.floor && motion_mode == MOTION_MODE_GROUNDED) {
+ combined_wall_normal.normalize();
+ real_t floor_angle = Math::acos(combined_wall_normal.dot(up_direction));
+ if (floor_angle <= floor_max_angle + FLOOR_ANGLE_THRESHOLD) {
+ r_state.floor = true;
+ r_state.wall = false;
+ if (p_apply_state.floor) {
+ collision_state.floor = true;
+ floor_normal = combined_wall_normal;
+ }
+ if (p_apply_state.wall) {
+ collision_state.wall = was_on_wall;
+ wall_normal = prev_wall_normal;
+ }
+ return;
+ }
+ }
}
}
}
+void CharacterBody3D::_set_platform_data(const PhysicsServer3D::MotionCollision &p_collision) {
+ platform_rid = p_collision.collider;
+ platform_velocity = p_collision.collider_velocity;
+ platform_layer = PhysicsServer3D::get_singleton()->body_get_collision_layer(platform_rid);
+}
+
void CharacterBody3D::set_safe_margin(real_t p_margin) {
margin = p_margin;
}
@@ -1253,40 +1577,56 @@ void CharacterBody3D::set_linear_velocity(const Vector3 &p_velocity) {
}
bool CharacterBody3D::is_on_floor() const {
- return on_floor;
+ return collision_state.floor;
}
bool CharacterBody3D::is_on_floor_only() const {
- return on_floor && !on_wall && !on_ceiling;
+ return collision_state.floor && !collision_state.wall && !collision_state.ceiling;
}
bool CharacterBody3D::is_on_wall() const {
- return on_wall;
+ return collision_state.wall;
}
bool CharacterBody3D::is_on_wall_only() const {
- return on_wall && !on_floor && !on_ceiling;
+ return collision_state.wall && !collision_state.floor && !collision_state.ceiling;
}
bool CharacterBody3D::is_on_ceiling() const {
- return on_ceiling;
+ return collision_state.ceiling;
}
bool CharacterBody3D::is_on_ceiling_only() const {
- return on_ceiling && !on_floor && !on_wall;
+ return collision_state.ceiling && !collision_state.floor && !collision_state.wall;
}
Vector3 CharacterBody3D::get_floor_normal() const {
return floor_normal;
}
+Vector3 CharacterBody3D::get_wall_normal() const {
+ return wall_normal;
+}
+
+Vector3 CharacterBody3D::get_last_motion() const {
+ return last_motion;
+}
+
+Vector3 CharacterBody3D::get_position_delta() const {
+ return get_transform().origin - previous_position;
+}
+
+Vector3 CharacterBody3D::get_real_velocity() const {
+ return real_velocity;
+};
+
real_t CharacterBody3D::get_floor_angle(const Vector3 &p_up_direction) const {
ERR_FAIL_COND_V(p_up_direction == Vector3(), 0);
return Math::acos(floor_normal.dot(p_up_direction));
}
Vector3 CharacterBody3D::get_platform_velocity() const {
- return floor_velocity;
+ return platform_velocity;
}
int CharacterBody3D::get_slide_collision_count() const {
@@ -1304,7 +1644,8 @@ Ref<KinematicCollision3D> CharacterBody3D::_get_slide_collision(int p_bounce) {
slide_colliders.resize(p_bounce + 1);
}
- if (slide_colliders[p_bounce].is_null()) {
+ // Create a new instance when the cached reference is invalid or still in use in script.
+ if (slide_colliders[p_bounce].is_null() || slide_colliders[p_bounce]->reference_get_count() > 1) {
slide_colliders.write[p_bounce].instantiate();
slide_colliders.write[p_bounce]->owner = this;
}
@@ -1328,6 +1669,62 @@ void CharacterBody3D::set_floor_stop_on_slope_enabled(bool p_enabled) {
floor_stop_on_slope = p_enabled;
}
+bool CharacterBody3D::is_floor_constant_speed_enabled() const {
+ return floor_constant_speed;
+}
+
+void CharacterBody3D::set_floor_constant_speed_enabled(bool p_enabled) {
+ floor_constant_speed = p_enabled;
+}
+
+bool CharacterBody3D::is_floor_block_on_wall_enabled() const {
+ return floor_block_on_wall;
+}
+
+void CharacterBody3D::set_floor_block_on_wall_enabled(bool p_enabled) {
+ floor_block_on_wall = p_enabled;
+}
+
+bool CharacterBody3D::is_slide_on_ceiling_enabled() const {
+ return slide_on_ceiling;
+}
+
+void CharacterBody3D::set_slide_on_ceiling_enabled(bool p_enabled) {
+ slide_on_ceiling = p_enabled;
+}
+
+uint32_t CharacterBody3D::get_moving_platform_floor_layers() const {
+ return moving_platform_floor_layers;
+}
+
+void CharacterBody3D::set_moving_platform_floor_layers(uint32_t p_exclude_layers) {
+ moving_platform_floor_layers = p_exclude_layers;
+}
+
+uint32_t CharacterBody3D::get_moving_platform_wall_layers() const {
+ return moving_platform_wall_layers;
+}
+
+void CharacterBody3D::set_moving_platform_wall_layers(uint32_t p_exclude_layers) {
+ moving_platform_wall_layers = p_exclude_layers;
+}
+
+void CharacterBody3D::set_motion_mode(MotionMode p_mode) {
+ motion_mode = p_mode;
+}
+
+CharacterBody3D::MotionMode CharacterBody3D::get_motion_mode() const {
+ return motion_mode;
+}
+
+void CharacterBody3D::set_moving_platform_apply_velocity_on_leave(MovingPlatformApplyVelocityOnLeave p_on_leave_apply_velocity) {
+ moving_platform_apply_velocity_on_leave = p_on_leave_apply_velocity;
+}
+
+CharacterBody3D::MovingPlatformApplyVelocityOnLeave CharacterBody3D::get_moving_platform_apply_velocity_on_leave() const {
+ return moving_platform_apply_velocity_on_leave;
+}
+
int CharacterBody3D::get_max_slides() const {
return max_slides;
}
@@ -1345,12 +1742,21 @@ void CharacterBody3D::set_floor_max_angle(real_t p_radians) {
floor_max_angle = p_radians;
}
-const Vector3 &CharacterBody3D::get_snap() const {
- return snap;
+real_t CharacterBody3D::get_floor_snap_length() {
+ return floor_snap_length;
+}
+
+void CharacterBody3D::set_floor_snap_length(real_t p_floor_snap_length) {
+ ERR_FAIL_COND(p_floor_snap_length < 0);
+ floor_snap_length = p_floor_snap_length;
}
-void CharacterBody3D::set_snap(const Vector3 &p_snap) {
- snap = p_snap;
+real_t CharacterBody3D::get_wall_min_slide_angle() const {
+ return wall_min_slide_angle;
+}
+
+void CharacterBody3D::set_wall_min_slide_angle(real_t p_radians) {
+ wall_min_slide_angle = p_radians;
}
const Vector3 &CharacterBody3D::get_up_direction() const {
@@ -1358,6 +1764,7 @@ const Vector3 &CharacterBody3D::get_up_direction() const {
}
void CharacterBody3D::set_up_direction(const Vector3 &p_up_direction) {
+ ERR_FAIL_COND_MSG(p_up_direction == Vector3(), "up_direction can't be equal to Vector3.ZERO, consider using Free motion mode instead.");
up_direction = p_up_direction.normalized();
}
@@ -1365,12 +1772,10 @@ void CharacterBody3D::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
// Reset move_and_slide() data.
- on_floor = false;
- on_floor_body = RID();
- on_ceiling = false;
- on_wall = false;
+ collision_state.state = 0;
+ platform_rid = RID();
motion_results.clear();
- floor_velocity = Vector3();
+ platform_velocity = Vector3();
} break;
}
}
@@ -1385,14 +1790,32 @@ void CharacterBody3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_safe_margin"), &CharacterBody3D::get_safe_margin);
ClassDB::bind_method(D_METHOD("is_floor_stop_on_slope_enabled"), &CharacterBody3D::is_floor_stop_on_slope_enabled);
ClassDB::bind_method(D_METHOD("set_floor_stop_on_slope_enabled", "enabled"), &CharacterBody3D::set_floor_stop_on_slope_enabled);
+ ClassDB::bind_method(D_METHOD("set_floor_constant_speed_enabled", "enabled"), &CharacterBody3D::set_floor_constant_speed_enabled);
+ ClassDB::bind_method(D_METHOD("is_floor_constant_speed_enabled"), &CharacterBody3D::is_floor_constant_speed_enabled);
+ ClassDB::bind_method(D_METHOD("set_floor_block_on_wall_enabled", "enabled"), &CharacterBody3D::set_floor_block_on_wall_enabled);
+ ClassDB::bind_method(D_METHOD("is_floor_block_on_wall_enabled"), &CharacterBody3D::is_floor_block_on_wall_enabled);
+ ClassDB::bind_method(D_METHOD("set_slide_on_ceiling_enabled", "enabled"), &CharacterBody3D::set_slide_on_ceiling_enabled);
+ ClassDB::bind_method(D_METHOD("is_slide_on_ceiling_enabled"), &CharacterBody3D::is_slide_on_ceiling_enabled);
+
+ ClassDB::bind_method(D_METHOD("set_moving_platform_floor_layers", "exclude_layer"), &CharacterBody3D::set_moving_platform_floor_layers);
+ ClassDB::bind_method(D_METHOD("get_moving_platform_floor_layers"), &CharacterBody3D::get_moving_platform_floor_layers);
+ ClassDB::bind_method(D_METHOD("set_moving_platform_wall_layers", "exclude_layer"), &CharacterBody3D::set_moving_platform_wall_layers);
+ ClassDB::bind_method(D_METHOD("get_moving_platform_wall_layers"), &CharacterBody3D::get_moving_platform_wall_layers);
+
ClassDB::bind_method(D_METHOD("get_max_slides"), &CharacterBody3D::get_max_slides);
ClassDB::bind_method(D_METHOD("set_max_slides", "max_slides"), &CharacterBody3D::set_max_slides);
ClassDB::bind_method(D_METHOD("get_floor_max_angle"), &CharacterBody3D::get_floor_max_angle);
ClassDB::bind_method(D_METHOD("set_floor_max_angle", "radians"), &CharacterBody3D::set_floor_max_angle);
- ClassDB::bind_method(D_METHOD("get_snap"), &CharacterBody3D::get_snap);
- ClassDB::bind_method(D_METHOD("set_snap", "snap"), &CharacterBody3D::set_snap);
+ ClassDB::bind_method(D_METHOD("get_floor_snap_length"), &CharacterBody3D::get_floor_snap_length);
+ ClassDB::bind_method(D_METHOD("set_floor_snap_length", "floor_snap_length"), &CharacterBody3D::set_floor_snap_length);
+ ClassDB::bind_method(D_METHOD("get_wall_min_slide_angle"), &CharacterBody3D::get_wall_min_slide_angle);
+ ClassDB::bind_method(D_METHOD("set_wall_min_slide_angle", "radians"), &CharacterBody3D::set_wall_min_slide_angle);
ClassDB::bind_method(D_METHOD("get_up_direction"), &CharacterBody3D::get_up_direction);
ClassDB::bind_method(D_METHOD("set_up_direction", "up_direction"), &CharacterBody3D::set_up_direction);
+ ClassDB::bind_method(D_METHOD("set_motion_mode", "mode"), &CharacterBody3D::set_motion_mode);
+ ClassDB::bind_method(D_METHOD("get_motion_mode"), &CharacterBody3D::get_motion_mode);
+ ClassDB::bind_method(D_METHOD("set_moving_platform_apply_velocity_on_leave", "on_leave_apply_velocity"), &CharacterBody3D::set_moving_platform_apply_velocity_on_leave);
+ ClassDB::bind_method(D_METHOD("get_moving_platform_apply_velocity_on_leave"), &CharacterBody3D::get_moving_platform_apply_velocity_on_leave);
ClassDB::bind_method(D_METHOD("is_on_floor"), &CharacterBody3D::is_on_floor);
ClassDB::bind_method(D_METHOD("is_on_floor_only"), &CharacterBody3D::is_on_floor_only);
@@ -1401,21 +1824,49 @@ void CharacterBody3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_on_wall"), &CharacterBody3D::is_on_wall);
ClassDB::bind_method(D_METHOD("is_on_wall_only"), &CharacterBody3D::is_on_wall_only);
ClassDB::bind_method(D_METHOD("get_floor_normal"), &CharacterBody3D::get_floor_normal);
+ ClassDB::bind_method(D_METHOD("get_wall_normal"), &CharacterBody3D::get_wall_normal);
+ ClassDB::bind_method(D_METHOD("get_last_motion"), &CharacterBody3D::get_last_motion);
+ ClassDB::bind_method(D_METHOD("get_position_delta"), &CharacterBody3D::get_position_delta);
+ ClassDB::bind_method(D_METHOD("get_real_velocity"), &CharacterBody3D::get_real_velocity);
ClassDB::bind_method(D_METHOD("get_floor_angle", "up_direction"), &CharacterBody3D::get_floor_angle, DEFVAL(Vector3(0.0, 1.0, 0.0)));
ClassDB::bind_method(D_METHOD("get_platform_velocity"), &CharacterBody3D::get_platform_velocity);
-
ClassDB::bind_method(D_METHOD("get_slide_collision_count"), &CharacterBody3D::get_slide_collision_count);
ClassDB::bind_method(D_METHOD("get_slide_collision", "slide_idx"), &CharacterBody3D::_get_slide_collision);
ClassDB::bind_method(D_METHOD("get_last_slide_collision"), &CharacterBody3D::_get_last_slide_collision);
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "linear_velocity"), "set_linear_velocity", "get_linear_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "max_slides", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_max_slides", "get_max_slides");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap"), "set_snap", "get_snap");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "motion_mode", PROPERTY_HINT_ENUM, "Grounded,Free", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_motion_mode", "get_motion_mode");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "up_direction"), "set_up_direction", "get_up_direction");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slide_on_ceiling"), "set_slide_on_ceiling_enabled", "is_slide_on_ceiling_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "linear_velocity", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_linear_velocity", "get_linear_velocity");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "max_slides", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_max_slides", "get_max_slides");
+ ADD_GROUP("Free Mode", "free_mode_");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "wall_min_slide_angle", PROPERTY_HINT_RANGE, "0,180,0.1,radians", PROPERTY_USAGE_DEFAULT), "set_wall_min_slide_angle", "get_wall_min_slide_angle");
ADD_GROUP("Floor", "floor_");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "floor_max_angle", PROPERTY_HINT_RANGE, "0,180,0.1,radians"), "set_floor_max_angle", "get_floor_max_angle");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "floor_stop_on_slope"), "set_floor_stop_on_slope_enabled", "is_floor_stop_on_slope_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "floor_constant_speed"), "set_floor_constant_speed_enabled", "is_floor_constant_speed_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "floor_block_on_wall"), "set_floor_block_on_wall_enabled", "is_floor_block_on_wall_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "floor_max_angle", PROPERTY_HINT_RANGE, "0,180,0.1,radians"), "set_floor_max_angle", "get_floor_max_angle");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "floor_snap_length", PROPERTY_HINT_RANGE, "0,1,0.01,or_greater"), "set_floor_snap_length", "get_floor_snap_length");
+ ADD_GROUP("Moving platform", "moving_platform");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "moving_platform_apply_velocity_on_leave", PROPERTY_HINT_ENUM, "Always,Upward Only,Never", PROPERTY_USAGE_DEFAULT), "set_moving_platform_apply_velocity_on_leave", "get_moving_platform_apply_velocity_on_leave");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "moving_platform_floor_layers", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_moving_platform_floor_layers", "get_moving_platform_floor_layers");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "moving_platform_wall_layers", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_moving_platform_wall_layers", "get_moving_platform_wall_layers");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin");
+
+ BIND_ENUM_CONSTANT(MOTION_MODE_GROUNDED);
+ BIND_ENUM_CONSTANT(MOTION_MODE_FREE);
+
+ BIND_ENUM_CONSTANT(PLATFORM_VEL_ON_LEAVE_ALWAYS);
+ BIND_ENUM_CONSTANT(PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY);
+ BIND_ENUM_CONSTANT(PLATFORM_VEL_ON_LEAVE_NEVER);
+}
+
+void CharacterBody3D::_validate_property(PropertyInfo &property) const {
+ if (motion_mode == MOTION_MODE_FREE) {
+ if (property.name.begins_with("floor_") || property.name == "up_direction" || property.name == "slide_on_ceiling") {
+ property.usage = PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL;
+ }
+ }
}
CharacterBody3D::CharacterBody3D() :
@@ -1432,14 +1883,6 @@ CharacterBody3D::~CharacterBody3D() {
///////////////////////////////////////
-Vector3 KinematicCollision3D::get_position() const {
- return result.collision_point;
-}
-
-Vector3 KinematicCollision3D::get_normal() const {
- return result.collision_normal;
-}
-
Vector3 KinematicCollision3D::get_travel() const {
return result.travel;
}
@@ -1448,41 +1891,60 @@ Vector3 KinematicCollision3D::get_remainder() const {
return result.remainder;
}
-real_t KinematicCollision3D::get_angle(const Vector3 &p_up_direction) const {
+int KinematicCollision3D::get_collision_count() const {
+ return result.collision_count;
+}
+
+Vector3 KinematicCollision3D::get_position(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, Vector3());
+ return result.collisions[p_collision_index].position;
+}
+
+Vector3 KinematicCollision3D::get_normal(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, Vector3());
+ return result.collisions[p_collision_index].normal;
+}
+
+real_t KinematicCollision3D::get_angle(int p_collision_index, const Vector3 &p_up_direction) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, 0.0);
ERR_FAIL_COND_V(p_up_direction == Vector3(), 0);
- return result.get_angle(p_up_direction);
+ return result.collisions[p_collision_index].get_angle(p_up_direction);
}
-Object *KinematicCollision3D::get_local_shape() const {
+Object *KinematicCollision3D::get_local_shape(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, nullptr);
if (!owner) {
return nullptr;
}
- uint32_t ownerid = owner->shape_find_owner(result.collision_local_shape);
+ uint32_t ownerid = owner->shape_find_owner(result.collisions[p_collision_index].local_shape);
return owner->shape_owner_get_owner(ownerid);
}
-Object *KinematicCollision3D::get_collider() const {
- if (result.collider_id.is_valid()) {
- return ObjectDB::get_instance(result.collider_id);
+Object *KinematicCollision3D::get_collider(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, nullptr);
+ if (result.collisions[p_collision_index].collider_id.is_valid()) {
+ return ObjectDB::get_instance(result.collisions[p_collision_index].collider_id);
}
return nullptr;
}
-ObjectID KinematicCollision3D::get_collider_id() const {
- return result.collider_id;
+ObjectID KinematicCollision3D::get_collider_id(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, ObjectID());
+ return result.collisions[p_collision_index].collider_id;
}
-RID KinematicCollision3D::get_collider_rid() const {
- return result.collider;
+RID KinematicCollision3D::get_collider_rid(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, RID());
+ return result.collisions[p_collision_index].collider;
}
-Object *KinematicCollision3D::get_collider_shape() const {
- Object *collider = get_collider();
+Object *KinematicCollision3D::get_collider_shape(int p_collision_index) const {
+ Object *collider = get_collider(p_collision_index);
if (collider) {
CollisionObject3D *obj2d = Object::cast_to<CollisionObject3D>(collider);
if (obj2d) {
- uint32_t ownerid = obj2d->shape_find_owner(result.collider_shape);
+ uint32_t ownerid = obj2d->shape_find_owner(result.collisions[p_collision_index].collider_shape);
return obj2d->shape_owner_get_owner(ownerid);
}
}
@@ -1490,45 +1952,101 @@ Object *KinematicCollision3D::get_collider_shape() const {
return nullptr;
}
-int KinematicCollision3D::get_collider_shape_index() const {
- return result.collider_shape;
+int KinematicCollision3D::get_collider_shape_index(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, 0);
+ return result.collisions[p_collision_index].collider_shape;
}
-Vector3 KinematicCollision3D::get_collider_velocity() const {
- return result.collider_velocity;
+Vector3 KinematicCollision3D::get_collider_velocity(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, Vector3());
+ return result.collisions[p_collision_index].collider_velocity;
}
-Variant KinematicCollision3D::get_collider_metadata() const {
+Variant KinematicCollision3D::get_collider_metadata(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, Variant());
return Variant();
}
+Vector3 KinematicCollision3D::get_best_position() const {
+ return result.collision_count ? get_position() : Vector3();
+}
+
+Vector3 KinematicCollision3D::get_best_normal() const {
+ return result.collision_count ? get_normal() : Vector3();
+}
+
+Object *KinematicCollision3D::get_best_local_shape() const {
+ return result.collision_count ? get_local_shape() : nullptr;
+}
+
+Object *KinematicCollision3D::get_best_collider() const {
+ return result.collision_count ? get_collider() : nullptr;
+}
+
+ObjectID KinematicCollision3D::get_best_collider_id() const {
+ return result.collision_count ? get_collider_id() : ObjectID();
+}
+
+RID KinematicCollision3D::get_best_collider_rid() const {
+ return result.collision_count ? get_collider_rid() : RID();
+}
+
+Object *KinematicCollision3D::get_best_collider_shape() const {
+ return result.collision_count ? get_collider_shape() : nullptr;
+}
+
+int KinematicCollision3D::get_best_collider_shape_index() const {
+ return result.collision_count ? get_collider_shape_index() : 0;
+}
+
+Vector3 KinematicCollision3D::get_best_collider_velocity() const {
+ return result.collision_count ? get_collider_velocity() : Vector3();
+}
+
+Variant KinematicCollision3D::get_best_collider_metadata() const {
+ return result.collision_count ? get_collider_metadata() : Variant();
+}
+
void KinematicCollision3D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("get_position"), &KinematicCollision3D::get_position);
- ClassDB::bind_method(D_METHOD("get_normal"), &KinematicCollision3D::get_normal);
ClassDB::bind_method(D_METHOD("get_travel"), &KinematicCollision3D::get_travel);
ClassDB::bind_method(D_METHOD("get_remainder"), &KinematicCollision3D::get_remainder);
- ClassDB::bind_method(D_METHOD("get_angle", "up_direction"), &KinematicCollision3D::get_angle, DEFVAL(Vector3(0.0, 1.0, 0.0)));
- ClassDB::bind_method(D_METHOD("get_local_shape"), &KinematicCollision3D::get_local_shape);
- ClassDB::bind_method(D_METHOD("get_collider"), &KinematicCollision3D::get_collider);
- ClassDB::bind_method(D_METHOD("get_collider_id"), &KinematicCollision3D::get_collider_id);
- ClassDB::bind_method(D_METHOD("get_collider_rid"), &KinematicCollision3D::get_collider_rid);
- ClassDB::bind_method(D_METHOD("get_collider_shape"), &KinematicCollision3D::get_collider_shape);
- ClassDB::bind_method(D_METHOD("get_collider_shape_index"), &KinematicCollision3D::get_collider_shape_index);
- ClassDB::bind_method(D_METHOD("get_collider_velocity"), &KinematicCollision3D::get_collider_velocity);
- ClassDB::bind_method(D_METHOD("get_collider_metadata"), &KinematicCollision3D::get_collider_metadata);
-
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "position"), "", "get_position");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "normal"), "", "get_normal");
+ ClassDB::bind_method(D_METHOD("get_collision_count"), &KinematicCollision3D::get_collision_count);
+ ClassDB::bind_method(D_METHOD("get_position", "collision_index"), &KinematicCollision3D::get_position, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_normal", "collision_index"), &KinematicCollision3D::get_normal, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_angle", "collision_index", "up_direction"), &KinematicCollision3D::get_angle, DEFVAL(0), DEFVAL(Vector3(0.0, 1.0, 0.0)));
+ ClassDB::bind_method(D_METHOD("get_local_shape", "collision_index"), &KinematicCollision3D::get_local_shape, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collider", "collision_index"), &KinematicCollision3D::get_collider, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collider_id", "collision_index"), &KinematicCollision3D::get_collider_id, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collider_rid", "collision_index"), &KinematicCollision3D::get_collider_rid, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collider_shape", "collision_index"), &KinematicCollision3D::get_collider_shape, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collider_shape_index", "collision_index"), &KinematicCollision3D::get_collider_shape_index, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collider_velocity", "collision_index"), &KinematicCollision3D::get_collider_velocity, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collider_metadata", "collision_index"), &KinematicCollision3D::get_collider_metadata, DEFVAL(0));
+
+ ClassDB::bind_method(D_METHOD("get_best_position"), &KinematicCollision3D::get_best_position);
+ ClassDB::bind_method(D_METHOD("get_best_normal"), &KinematicCollision3D::get_best_normal);
+ ClassDB::bind_method(D_METHOD("get_best_local_shape"), &KinematicCollision3D::get_best_local_shape);
+ ClassDB::bind_method(D_METHOD("get_best_collider"), &KinematicCollision3D::get_best_collider);
+ ClassDB::bind_method(D_METHOD("get_best_collider_id"), &KinematicCollision3D::get_best_collider_id);
+ ClassDB::bind_method(D_METHOD("get_best_collider_rid"), &KinematicCollision3D::get_best_collider_rid);
+ ClassDB::bind_method(D_METHOD("get_best_collider_shape"), &KinematicCollision3D::get_best_collider_shape);
+ ClassDB::bind_method(D_METHOD("get_best_collider_shape_index"), &KinematicCollision3D::get_best_collider_shape_index);
+ ClassDB::bind_method(D_METHOD("get_best_collider_velocity"), &KinematicCollision3D::get_best_collider_velocity);
+ ClassDB::bind_method(D_METHOD("get_best_collider_metadata"), &KinematicCollision3D::get_best_collider_metadata);
+
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "travel"), "", "get_travel");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "remainder"), "", "get_remainder");
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "local_shape"), "", "get_local_shape");
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "collider"), "", "get_collider");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_id"), "", "get_collider_id");
- ADD_PROPERTY(PropertyInfo(Variant::RID, "collider_rid"), "", "get_collider_rid");
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "collider_shape"), "", "get_collider_shape");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_shape_index"), "", "get_collider_shape_index");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "collider_velocity"), "", "get_collider_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::NIL, "collider_metadata", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT), "", "get_collider_metadata");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_count"), "", "get_collision_count");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "position"), "", "get_best_position");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "normal"), "", "get_best_normal");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "local_shape"), "", "get_best_local_shape");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "collider"), "", "get_best_collider");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_id"), "", "get_best_collider_id");
+ ADD_PROPERTY(PropertyInfo(Variant::RID, "collider_rid"), "", "get_best_collider_rid");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "collider_shape"), "", "get_best_collider_shape");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_shape_index"), "", "get_best_collider_shape_index");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "collider_velocity"), "", "get_best_collider_velocity");
+ ADD_PROPERTY(PropertyInfo(Variant::NIL, "collider_metadata", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT), "", "get_best_collider_metadata");
}
///////////////////////////////////////
@@ -2250,23 +2768,19 @@ void PhysicalBone3D::_notification(int p_what) {
}
}
-void PhysicalBone3D::_direct_state_changed(Object *p_state) {
+void PhysicalBone3D::_body_state_changed_callback(void *p_instance, PhysicsDirectBodyState3D *p_state) {
+ PhysicalBone3D *bone = (PhysicalBone3D *)p_instance;
+ bone->_body_state_changed(p_state);
+}
+
+void PhysicalBone3D::_body_state_changed(PhysicsDirectBodyState3D *p_state) {
if (!simulate_physics || !_internal_simulate_physics) {
return;
}
- /// Update bone transform
-
- PhysicsDirectBodyState3D *state;
-
-#ifdef DEBUG_ENABLED
- state = Object::cast_to<PhysicsDirectBodyState3D>(p_state);
- ERR_FAIL_NULL_MSG(state, "Method '_direct_state_changed' must receive a valid PhysicsDirectBodyState3D object as argument");
-#else
- state = (PhysicsDirectBodyState3D *)p_state; //trust it
-#endif
+ /// Update bone transform.
- Transform3D global_transform(state->get_transform());
+ Transform3D global_transform(p_state->get_transform());
set_ignore_transform_notification(true);
set_global_transform(global_transform);
@@ -2330,7 +2844,7 @@ void PhysicalBone3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "body_offset"), "set_body_offset", "get_body_offset");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,65535,0.01,exp"), "set_mass", "get_mass");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_RANGE, "0.01,1000,0.01,or_greater,exp"), "set_mass", "get_mass");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_friction", "get_friction");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_bounce", "get_bounce");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "gravity_scale", PROPERTY_HINT_RANGE, "-10,10,0.01"), "set_gravity_scale", "get_gravity_scale");
@@ -2728,7 +3242,7 @@ void PhysicalBone3D::_start_physics_simulation() {
set_body_mode(PhysicsServer3D::BODY_MODE_DYNAMIC);
PhysicsServer3D::get_singleton()->body_set_collision_layer(get_rid(), get_collision_layer());
PhysicsServer3D::get_singleton()->body_set_collision_mask(get_rid(), get_collision_mask());
- PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), callable_mp(this, &PhysicalBone3D::_direct_state_changed));
+ PhysicsServer3D::get_singleton()->body_set_state_sync_callback(get_rid(), this, _body_state_changed_callback);
set_as_top_level(true);
_internal_simulate_physics = true;
}
@@ -2747,7 +3261,7 @@ void PhysicalBone3D::_stop_physics_simulation() {
PhysicsServer3D::get_singleton()->body_set_collision_mask(get_rid(), 0);
}
if (_internal_simulate_physics) {
- PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), Callable());
+ PhysicsServer3D::get_singleton()->body_set_state_sync_callback(get_rid(), nullptr, nullptr);
parent_skeleton->set_bone_global_pose_override(bone_id, Transform3D(), 0.0, false);
set_as_top_level(false);
_internal_simulate_physics = false;
diff --git a/scene/3d/physics_body_3d.h b/scene/3d/physics_body_3d.h
index 9c40f92f06..a53147cb8f 100644
--- a/scene/3d/physics_body_3d.h
+++ b/scene/3d/physics_body_3d.h
@@ -50,11 +50,11 @@ protected:
uint16_t locked_axis = 0;
- Ref<KinematicCollision3D> _move(const Vector3 &p_motion, bool p_test_only = false, real_t p_margin = 0.001);
+ Ref<KinematicCollision3D> _move(const Vector3 &p_motion, bool p_test_only = false, real_t p_margin = 0.001, int p_max_collisions = 1);
public:
- bool move_and_collide(const Vector3 &p_motion, PhysicsServer3D::MotionResult &r_result, real_t p_margin, bool p_test_only = false, bool p_cancel_sliding = true, const Set<RID> &p_exclude = Set<RID>());
- bool test_move(const Transform3D &p_from, const Vector3 &p_motion, const Ref<KinematicCollision3D> &r_collision = Ref<KinematicCollision3D>(), real_t p_margin = 0.001);
+ bool move_and_collide(const Vector3 &p_motion, PhysicsServer3D::MotionResult &r_result, real_t p_margin, bool p_test_only = false, int p_max_collisions = 1, bool p_cancel_sliding = true, bool p_collide_separation_ray = false, const Set<RID> &p_exclude = Set<RID>());
+ bool test_move(const Transform3D &p_from, const Vector3 &p_motion, const Ref<KinematicCollision3D> &r_collision = Ref<KinematicCollision3D>(), real_t p_margin = 0.001, int p_max_collisions = 1);
void set_axis_lock(PhysicsServer3D::BodyAxis p_axis, bool p_lock);
bool get_axis_lock(PhysicsServer3D::BodyAxis p_axis) const;
@@ -73,23 +73,13 @@ public:
class StaticBody3D : public PhysicsBody3D {
GDCLASS(StaticBody3D, PhysicsBody3D);
+private:
Vector3 constant_linear_velocity;
Vector3 constant_angular_velocity;
- Vector3 linear_velocity;
- Vector3 angular_velocity;
-
Ref<PhysicsMaterial> physics_material_override;
- bool kinematic_motion = false;
- bool sync_to_physics = false;
-
- Transform3D last_valid_transform;
-
- void _direct_state_changed(Object *p_state);
-
protected:
- void _notification(int p_what);
static void _bind_methods();
public:
@@ -102,42 +92,68 @@ public:
Vector3 get_constant_linear_velocity() const;
Vector3 get_constant_angular_velocity() const;
- virtual Vector3 get_linear_velocity() const override;
- virtual Vector3 get_angular_velocity() const override;
+ StaticBody3D(PhysicsServer3D::BodyMode p_mode = PhysicsServer3D::BODY_MODE_STATIC);
- virtual TypedArray<String> get_configuration_warnings() const override;
+private:
+ void _reload_physics_characteristics();
+};
- StaticBody3D();
+class AnimatableBody3D : public StaticBody3D {
+ GDCLASS(AnimatableBody3D, StaticBody3D);
private:
- void _reload_physics_characteristics();
+ Vector3 linear_velocity;
+ Vector3 angular_velocity;
- void _update_kinematic_motion();
+ bool sync_to_physics = true;
+
+ Transform3D last_valid_transform;
+
+ static void _body_state_changed_callback(void *p_instance, PhysicsDirectBodyState3D *p_state);
+ void _body_state_changed(PhysicsDirectBodyState3D *p_state);
+
+protected:
+ void _notification(int p_what);
+ static void _bind_methods();
+
+public:
+ virtual Vector3 get_linear_velocity() const override;
+ virtual Vector3 get_angular_velocity() const override;
- void set_kinematic_motion_enabled(bool p_enabled);
- bool is_kinematic_motion_enabled() const;
+ AnimatableBody3D();
+
+private:
+ void _update_kinematic_motion();
void set_sync_to_physics(bool p_enable);
bool is_sync_to_physics_enabled() const;
};
-class RigidBody3D : public PhysicsBody3D {
- GDCLASS(RigidBody3D, PhysicsBody3D);
+class RigidDynamicBody3D : public PhysicsBody3D {
+ GDCLASS(RigidDynamicBody3D, PhysicsBody3D);
public:
- enum Mode {
- MODE_DYNAMIC,
- MODE_STATIC,
- MODE_DYNAMIC_LOCKED,
- MODE_KINEMATIC,
+ enum FreezeMode {
+ FREEZE_MODE_STATIC,
+ FREEZE_MODE_KINEMATIC,
};
-protected:
+ enum CenterOfMassMode {
+ CENTER_OF_MASS_MODE_AUTO,
+ CENTER_OF_MASS_MODE_CUSTOM,
+ };
+
+private:
bool can_sleep = true;
- PhysicsDirectBodyState3D *state = nullptr;
- Mode mode = MODE_DYNAMIC;
+ bool lock_rotation = false;
+ bool freeze = false;
+ FreezeMode freeze_mode = FREEZE_MODE_STATIC;
real_t mass = 1.0;
+ Vector3 inertia;
+ CenterOfMassMode center_of_mass_mode = CENTER_OF_MASS_MODE_AUTO;
+ Vector3 center_of_mass;
+
Ref<PhysicsMaterial> physics_material_override;
Vector3 linear_velocity;
@@ -173,7 +189,7 @@ protected:
tagged = false;
}
};
- struct RigidBody3D_RemoveAction {
+ struct RigidDynamicBody3D_RemoveAction {
RID rid;
ObjectID body_id;
ShapePair pair;
@@ -195,20 +211,44 @@ protected:
void _body_exit_tree(ObjectID p_id);
void _body_inout(int p_status, const RID &p_body, ObjectID p_instance, int p_body_shape, int p_local_shape);
- virtual void _direct_state_changed(Object *p_state);
+ static void _body_state_changed_callback(void *p_instance, PhysicsDirectBodyState3D *p_state);
+protected:
void _notification(int p_what);
static void _bind_methods();
+ virtual void _validate_property(PropertyInfo &property) const override;
+
+ GDVIRTUAL1(_integrate_forces, PhysicsDirectBodyState3D *)
+
+ virtual void _body_state_changed(PhysicsDirectBodyState3D *p_state);
+
+ void _apply_body_mode();
+
public:
- void set_mode(Mode p_mode);
- Mode get_mode() const;
+ void set_lock_rotation_enabled(bool p_lock_rotation);
+ bool is_lock_rotation_enabled() const;
+
+ void set_freeze_enabled(bool p_freeze);
+ bool is_freeze_enabled() const;
+
+ void set_freeze_mode(FreezeMode p_freeze_mode);
+ FreezeMode get_freeze_mode() const;
void set_mass(real_t p_mass);
real_t get_mass() const;
virtual real_t get_inverse_mass() const override { return 1.0 / mass; }
+ void set_inertia(const Vector3 &p_inertia);
+ const Vector3 &get_inertia() const;
+
+ void set_center_of_mass_mode(CenterOfMassMode p_mode);
+ CenterOfMassMode get_center_of_mass_mode() const;
+
+ void set_center_of_mass(const Vector3 &p_center_of_mass);
+ const Vector3 &get_center_of_mass() const;
+
void set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override);
Ref<PhysicsMaterial> get_physics_material_override() const;
@@ -261,90 +301,163 @@ public:
virtual TypedArray<String> get_configuration_warnings() const override;
- RigidBody3D();
- ~RigidBody3D();
+ RigidDynamicBody3D();
+ ~RigidDynamicBody3D();
private:
void _reload_physics_characteristics();
};
-VARIANT_ENUM_CAST(RigidBody3D::Mode);
+VARIANT_ENUM_CAST(RigidDynamicBody3D::FreezeMode);
+VARIANT_ENUM_CAST(RigidDynamicBody3D::CenterOfMassMode);
class KinematicCollision3D;
class CharacterBody3D : public PhysicsBody3D {
GDCLASS(CharacterBody3D, PhysicsBody3D);
+public:
+ enum MotionMode {
+ MOTION_MODE_GROUNDED,
+ MOTION_MODE_FREE,
+ };
+ enum MovingPlatformApplyVelocityOnLeave {
+ PLATFORM_VEL_ON_LEAVE_ALWAYS,
+ PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY,
+ PLATFORM_VEL_ON_LEAVE_NEVER,
+ };
+ bool move_and_slide();
+
+ virtual Vector3 get_linear_velocity() const override;
+ void set_linear_velocity(const Vector3 &p_velocity);
+
+ bool is_on_floor() const;
+ bool is_on_floor_only() const;
+ bool is_on_wall() const;
+ bool is_on_wall_only() const;
+ bool is_on_ceiling() const;
+ bool is_on_ceiling_only() const;
+ Vector3 get_last_motion() const;
+ Vector3 get_position_delta() const;
+ Vector3 get_floor_normal() const;
+ Vector3 get_wall_normal() const;
+ Vector3 get_real_velocity() const;
+ real_t get_floor_angle(const Vector3 &p_up_direction = Vector3(0.0, 1.0, 0.0)) const;
+ Vector3 get_platform_velocity() const;
+
+ int get_slide_collision_count() const;
+ PhysicsServer3D::MotionResult get_slide_collision(int p_bounce) const;
+
+ CharacterBody3D();
+ ~CharacterBody3D();
+
private:
real_t margin = 0.001;
+ MotionMode motion_mode = MOTION_MODE_GROUNDED;
+ MovingPlatformApplyVelocityOnLeave moving_platform_apply_velocity_on_leave = PLATFORM_VEL_ON_LEAVE_ALWAYS;
+ union CollisionState {
+ uint32_t state = 0;
+ struct {
+ bool floor;
+ bool wall;
+ bool ceiling;
+ };
+
+ CollisionState() {
+ }
- bool floor_stop_on_slope = false;
- int max_slides = 4;
+ CollisionState(bool p_floor, bool p_wall, bool p_ceiling) {
+ floor = p_floor;
+ wall = p_wall;
+ ceiling = p_ceiling;
+ }
+ };
+
+ CollisionState collision_state;
+ bool floor_constant_speed = false;
+ bool floor_stop_on_slope = true;
+ bool floor_block_on_wall = true;
+ bool slide_on_ceiling = true;
+ int max_slides = 6;
+ int platform_layer;
+ RID platform_rid;
+ uint32_t moving_platform_floor_layers = UINT32_MAX;
+ uint32_t moving_platform_wall_layers = 0;
+ real_t floor_snap_length = 0.1;
real_t floor_max_angle = Math::deg2rad((real_t)45.0);
- Vector3 snap;
+ real_t wall_min_slide_angle = Math::deg2rad((real_t)15.0);
Vector3 up_direction = Vector3(0.0, 1.0, 0.0);
-
Vector3 linear_velocity;
-
Vector3 floor_normal;
- Vector3 floor_velocity;
- RID on_floor_body;
- bool on_floor = false;
- bool on_ceiling = false;
- bool on_wall = false;
+ Vector3 wall_normal;
+ Vector3 last_motion;
+ Vector3 platform_velocity;
+ Vector3 previous_position;
+ Vector3 real_velocity;
+
Vector<PhysicsServer3D::MotionResult> motion_results;
Vector<Ref<KinematicCollision3D>> slide_colliders;
- Ref<KinematicCollision3D> _get_slide_collision(int p_bounce);
- Ref<KinematicCollision3D> _get_last_slide_collision();
-
- void _set_collision_direction(const PhysicsServer3D::MotionResult &p_result);
-
void set_safe_margin(real_t p_margin);
real_t get_safe_margin() const;
bool is_floor_stop_on_slope_enabled() const;
void set_floor_stop_on_slope_enabled(bool p_enabled);
+ bool is_floor_constant_speed_enabled() const;
+ void set_floor_constant_speed_enabled(bool p_enabled);
+
+ bool is_floor_block_on_wall_enabled() const;
+ void set_floor_block_on_wall_enabled(bool p_enabled);
+
+ bool is_slide_on_ceiling_enabled() const;
+ void set_slide_on_ceiling_enabled(bool p_enabled);
+
int get_max_slides() const;
void set_max_slides(int p_max_slides);
real_t get_floor_max_angle() const;
void set_floor_max_angle(real_t p_radians);
- const Vector3 &get_snap() const;
- void set_snap(const Vector3 &p_snap);
+ real_t get_floor_snap_length();
+ void set_floor_snap_length(real_t p_floor_snap_length);
- const Vector3 &get_up_direction() const;
- void set_up_direction(const Vector3 &p_up_direction);
+ real_t get_wall_min_slide_angle() const;
+ void set_wall_min_slide_angle(real_t p_radians);
-protected:
- void _notification(int p_what);
- static void _bind_methods();
+ uint32_t get_moving_platform_floor_layers() const;
+ void set_moving_platform_floor_layers(const uint32_t p_exclude_layer);
-public:
- bool move_and_slide();
+ uint32_t get_moving_platform_wall_layers() const;
+ void set_moving_platform_wall_layers(const uint32_t p_exclude_layer);
- virtual Vector3 get_linear_velocity() const override;
- void set_linear_velocity(const Vector3 &p_velocity);
+ void set_motion_mode(MotionMode p_mode);
+ MotionMode get_motion_mode() const;
- bool is_on_floor() const;
- bool is_on_floor_only() const;
- bool is_on_wall() const;
- bool is_on_wall_only() const;
- bool is_on_ceiling() const;
- bool is_on_ceiling_only() const;
- Vector3 get_floor_normal() const;
- real_t get_floor_angle(const Vector3 &p_up_direction = Vector3(0.0, 1.0, 0.0)) const;
- Vector3 get_platform_velocity() const;
+ void set_moving_platform_apply_velocity_on_leave(MovingPlatformApplyVelocityOnLeave p_on_leave_velocity);
+ MovingPlatformApplyVelocityOnLeave get_moving_platform_apply_velocity_on_leave() const;
- int get_slide_collision_count() const;
- PhysicsServer3D::MotionResult get_slide_collision(int p_bounce) const;
+ void _move_and_slide_free(double p_delta);
+ void _move_and_slide_grounded(double p_delta, bool p_was_on_floor);
- CharacterBody3D();
- ~CharacterBody3D();
+ Ref<KinematicCollision3D> _get_slide_collision(int p_bounce);
+ Ref<KinematicCollision3D> _get_last_slide_collision();
+ const Vector3 &get_up_direction() const;
+ bool _on_floor_if_snapped(bool was_on_floor, bool vel_dir_facing_up);
+ void set_up_direction(const Vector3 &p_up_direction);
+ void _set_collision_direction(const PhysicsServer3D::MotionResult &p_result, CollisionState &r_state, CollisionState p_apply_state = CollisionState(true, true, true));
+ void _set_platform_data(const PhysicsServer3D::MotionCollision &p_collision);
+ void _snap_on_floor(bool was_on_floor, bool vel_dir_facing_up);
+
+protected:
+ void _notification(int p_what);
+ static void _bind_methods();
+ virtual void _validate_property(PropertyInfo &property) const override;
};
+VARIANT_ENUM_CAST(CharacterBody3D::MotionMode);
+VARIANT_ENUM_CAST(CharacterBody3D::MovingPlatformApplyVelocityOnLeave);
+
class KinematicCollision3D : public RefCounted {
GDCLASS(KinematicCollision3D, RefCounted);
@@ -357,19 +470,31 @@ protected:
static void _bind_methods();
public:
- Vector3 get_position() const;
- Vector3 get_normal() const;
Vector3 get_travel() const;
Vector3 get_remainder() const;
- real_t get_angle(const Vector3 &p_up_direction = Vector3(0.0, 1.0, 0.0)) const;
- Object *get_local_shape() const;
- Object *get_collider() const;
- ObjectID get_collider_id() const;
- RID get_collider_rid() const;
- Object *get_collider_shape() const;
- int get_collider_shape_index() const;
- Vector3 get_collider_velocity() const;
- Variant get_collider_metadata() const;
+ int get_collision_count() const;
+ Vector3 get_position(int p_collision_index = 0) const;
+ Vector3 get_normal(int p_collision_index = 0) const;
+ real_t get_angle(int p_collision_index = 0, const Vector3 &p_up_direction = Vector3(0.0, 1.0, 0.0)) const;
+ Object *get_local_shape(int p_collision_index = 0) const;
+ Object *get_collider(int p_collision_index = 0) const;
+ ObjectID get_collider_id(int p_collision_index = 0) const;
+ RID get_collider_rid(int p_collision_index = 0) const;
+ Object *get_collider_shape(int p_collision_index = 0) const;
+ int get_collider_shape_index(int p_collision_index = 0) const;
+ Vector3 get_collider_velocity(int p_collision_index = 0) const;
+ Variant get_collider_metadata(int p_collision_index = 0) const;
+
+ Vector3 get_best_position() const;
+ Vector3 get_best_normal() const;
+ Object *get_best_local_shape() const;
+ Object *get_best_collider() const;
+ ObjectID get_best_collider_id() const;
+ RID get_best_collider_rid() const;
+ Object *get_best_collider_shape() const;
+ int get_best_collider_shape_index() const;
+ Vector3 get_best_collider_velocity() const;
+ Variant get_best_collider_metadata() const;
};
class PhysicalBone3D : public PhysicsBody3D {
@@ -523,7 +648,8 @@ protected:
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
void _notification(int p_what);
- void _direct_state_changed(Object *p_state);
+ static void _body_state_changed_callback(void *p_instance, PhysicsDirectBodyState3D *p_state);
+ void _body_state_changed(PhysicsDirectBodyState3D *p_state);
static void _bind_methods();
diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp
index 857916e23d..b7a79a2645 100644
--- a/scene/3d/skeleton_3d.cpp
+++ b/scene/3d/skeleton_3d.cpp
@@ -173,12 +173,15 @@ void Skeleton3D::_update_process_order() {
parentless_bones.clear();
for (int i = 0; i < len; i++) {
+ bonesptr[i].child_bones.clear();
+ }
+
+ for (int i = 0; i < len; i++) {
if (bonesptr[i].parent >= len) {
//validate this just in case
ERR_PRINT("Bone " + itos(i) + " has invalid parent: " + itos(bonesptr[i].parent));
bonesptr[i].parent = -1;
}
- bonesptr[i].child_bones.clear();
if (bonesptr[i].parent != -1) {
int parent_bone_idx = bonesptr[i].parent;
@@ -517,6 +520,7 @@ void Skeleton3D::set_bone_parent(int p_bone, int p_parent) {
const int bone_size = bones.size();
ERR_FAIL_INDEX(p_bone, bone_size);
ERR_FAIL_COND(p_parent != -1 && (p_parent < 0));
+ ERR_FAIL_COND(p_bone == p_parent);
bones.write[p_bone].parent = p_parent;
process_order_dirty = true;
@@ -893,19 +897,25 @@ Ref<SkinReference> Skeleton3D::register_skin(const Ref<Skin> &p_skin) {
int len = bones.size();
// calculate global rests and invert them
- Vector<int> bones_to_process = get_parentless_bones();
+ LocalVector<int> bones_to_process;
+ bones_to_process = get_parentless_bones();
while (bones_to_process.size() > 0) {
int current_bone_idx = bones_to_process[0];
- bones_to_process.erase(current_bone_idx);
const Bone &b = bonesptr[current_bone_idx];
-
- // Note: the code below may not work by default. May need to track an integer for the bone pose index order
- // in the while loop, instead of using current_bone_idx.
- if (b.parent >= 0) {
- skin->set_bind_pose(current_bone_idx, skin->get_bind_pose(b.parent) * b.rest);
- } else {
+ bones_to_process.erase(current_bone_idx);
+ LocalVector<int> child_bones_vector;
+ child_bones_vector = get_bone_children(current_bone_idx);
+ int child_bones_size = child_bones_vector.size();
+ if (b.parent < 0) {
skin->set_bind_pose(current_bone_idx, b.rest);
}
+ for (int i = 0; i < child_bones_size; i++) {
+ int child_bone_idx = child_bones_vector[i];
+ const Bone &cb = bonesptr[child_bone_idx];
+ skin->set_bind_pose(child_bone_idx, skin->get_bind_pose(current_bone_idx) * cb.rest);
+ // Add the bone's children to the list of bones to be processed.
+ bones_to_process.push_back(child_bones_vector[i]);
+ }
}
for (int i = 0; i < len; i++) {
diff --git a/scene/3d/skeleton_ik_3d.cpp b/scene/3d/skeleton_ik_3d.cpp
index a891566633..8d90aabfac 100644
--- a/scene/3d/skeleton_ik_3d.cpp
+++ b/scene/3d/skeleton_ik_3d.cpp
@@ -99,7 +99,7 @@ bool FabrikInverseKinematic::build_chain(Task *p_task, bool p_force_simple_chain
child_ci->current_pos = child_ci->initial_transform.origin;
if (child_ci->parent_item) {
- child_ci->length = (child_ci->current_pos - child_ci->parent_item->current_pos).length();
+ child_ci->length = child_ci->parent_item->current_pos.distance_to(child_ci->current_pos);
}
}
@@ -140,7 +140,7 @@ void FabrikInverseKinematic::solve_simple(Task *p_task, bool p_solve_magnet, Vec
solve_simple_backwards(p_task->chain, p_solve_magnet);
solve_simple_forwards(p_task->chain, p_solve_magnet, p_origin_pos);
- distance_to_goal = (p_task->chain.tips[0].chain_item->current_pos - p_task->chain.tips[0].end_effector->goal_transform.origin).length();
+ distance_to_goal = p_task->chain.tips[0].end_effector->goal_transform.origin.distance_to(p_task->chain.tips[0].chain_item->current_pos);
}
}
@@ -542,7 +542,7 @@ Transform3D SkeletonIK3D::_get_target_transform() {
target_node_override = Object::cast_to<Node3D>(get_node(target_node_path_override));
}
- if (target_node_override) {
+ if (target_node_override && target_node_override->is_inside_tree()) {
return target_node_override->get_global_transform();
} else {
return target;
diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_dynamic_body_3d.cpp
index 28ff3e9412..a886c61263 100644
--- a/scene/3d/soft_body_3d.cpp
+++ b/scene/3d/soft_dynamic_body_3d.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* soft_body_3d.cpp */
+/* soft_dynamic_body_3d.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,13 +28,13 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "soft_body_3d.h"
+#include "soft_dynamic_body_3d.h"
#include "scene/3d/physics_body_3d.h"
-SoftBodyRenderingServerHandler::SoftBodyRenderingServerHandler() {}
+SoftDynamicBodyRenderingServerHandler::SoftDynamicBodyRenderingServerHandler() {}
-void SoftBodyRenderingServerHandler::prepare(RID p_mesh, int p_surface) {
+void SoftDynamicBodyRenderingServerHandler::prepare(RID p_mesh, int p_surface) {
clear();
ERR_FAIL_COND(!p_mesh.is_valid());
@@ -56,7 +56,7 @@ void SoftBodyRenderingServerHandler::prepare(RID p_mesh, int p_surface) {
offset_normal = surface_offsets[RS::ARRAY_NORMAL];
}
-void SoftBodyRenderingServerHandler::clear() {
+void SoftDynamicBodyRenderingServerHandler::clear() {
buffer.resize(0);
stride = 0;
offset_vertices = 0;
@@ -66,41 +66,41 @@ void SoftBodyRenderingServerHandler::clear() {
mesh = RID();
}
-void SoftBodyRenderingServerHandler::open() {
+void SoftDynamicBodyRenderingServerHandler::open() {
write_buffer = buffer.ptrw();
}
-void SoftBodyRenderingServerHandler::close() {
+void SoftDynamicBodyRenderingServerHandler::close() {
write_buffer = nullptr;
}
-void SoftBodyRenderingServerHandler::commit_changes() {
+void SoftDynamicBodyRenderingServerHandler::commit_changes() {
RS::get_singleton()->mesh_surface_update_vertex_region(mesh, surface, 0, buffer);
}
-void SoftBodyRenderingServerHandler::set_vertex(int p_vertex_id, const void *p_vector3) {
+void SoftDynamicBodyRenderingServerHandler::set_vertex(int p_vertex_id, const void *p_vector3) {
memcpy(&write_buffer[p_vertex_id * stride + offset_vertices], p_vector3, sizeof(float) * 3);
}
-void SoftBodyRenderingServerHandler::set_normal(int p_vertex_id, const void *p_vector3) {
+void SoftDynamicBodyRenderingServerHandler::set_normal(int p_vertex_id, const void *p_vector3) {
memcpy(&write_buffer[p_vertex_id * stride + offset_normal], p_vector3, sizeof(float) * 3);
}
-void SoftBodyRenderingServerHandler::set_aabb(const AABB &p_aabb) {
+void SoftDynamicBodyRenderingServerHandler::set_aabb(const AABB &p_aabb) {
RS::get_singleton()->mesh_set_custom_aabb(mesh, p_aabb);
}
-SoftBody3D::PinnedPoint::PinnedPoint() {
+SoftDynamicBody3D::PinnedPoint::PinnedPoint() {
}
-SoftBody3D::PinnedPoint::PinnedPoint(const PinnedPoint &obj_tocopy) {
+SoftDynamicBody3D::PinnedPoint::PinnedPoint(const PinnedPoint &obj_tocopy) {
point_index = obj_tocopy.point_index;
spatial_attachment_path = obj_tocopy.spatial_attachment_path;
spatial_attachment = obj_tocopy.spatial_attachment;
offset = obj_tocopy.offset;
}
-SoftBody3D::PinnedPoint &SoftBody3D::PinnedPoint::operator=(const PinnedPoint &obj) {
+SoftDynamicBody3D::PinnedPoint &SoftDynamicBody3D::PinnedPoint::operator=(const PinnedPoint &obj) {
point_index = obj.point_index;
spatial_attachment_path = obj.spatial_attachment_path;
spatial_attachment = obj.spatial_attachment;
@@ -108,7 +108,7 @@ SoftBody3D::PinnedPoint &SoftBody3D::PinnedPoint::operator=(const PinnedPoint &o
return *this;
}
-void SoftBody3D::_update_pickable() {
+void SoftDynamicBody3D::_update_pickable() {
if (!is_inside_tree()) {
return;
}
@@ -116,7 +116,7 @@ void SoftBody3D::_update_pickable() {
PhysicsServer3D::get_singleton()->soft_body_set_ray_pickable(physics_rid, pickable);
}
-bool SoftBody3D::_set(const StringName &p_name, const Variant &p_value) {
+bool SoftDynamicBody3D::_set(const StringName &p_name, const Variant &p_value) {
String name = p_name;
String which = name.get_slicec('/', 0);
@@ -133,7 +133,7 @@ bool SoftBody3D::_set(const StringName &p_name, const Variant &p_value) {
return false;
}
-bool SoftBody3D::_get(const StringName &p_name, Variant &r_ret) const {
+bool SoftDynamicBody3D::_get(const StringName &p_name, Variant &r_ret) const {
String name = p_name;
String which = name.get_slicec('/', 0);
@@ -160,7 +160,7 @@ bool SoftBody3D::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
-void SoftBody3D::_get_property_list(List<PropertyInfo> *p_list) const {
+void SoftDynamicBody3D::_get_property_list(List<PropertyInfo> *p_list) const {
const int pinned_points_indices_size = pinned_points.size();
p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, "pinned_points"));
@@ -172,7 +172,7 @@ void SoftBody3D::_get_property_list(List<PropertyInfo> *p_list) const {
}
}
-bool SoftBody3D::_set_property_pinned_points_indices(const Array &p_indices) {
+bool SoftDynamicBody3D::_set_property_pinned_points_indices(const Array &p_indices) {
const int p_indices_size = p_indices.size();
{ // Remove the pined points on physics server that will be removed by resize
@@ -201,7 +201,7 @@ bool SoftBody3D::_set_property_pinned_points_indices(const Array &p_indices) {
return true;
}
-bool SoftBody3D::_set_property_pinned_points_attachment(int p_item, const String &p_what, const Variant &p_value) {
+bool SoftDynamicBody3D::_set_property_pinned_points_attachment(int p_item, const String &p_what, const Variant &p_value) {
if (pinned_points.size() <= p_item) {
return false;
}
@@ -220,7 +220,7 @@ bool SoftBody3D::_set_property_pinned_points_attachment(int p_item, const String
return true;
}
-bool SoftBody3D::_get_property_pinned_points(int p_item, const String &p_what, Variant &r_ret) const {
+bool SoftDynamicBody3D::_get_property_pinned_points(int p_item, const String &p_what, Variant &r_ret) const {
if (pinned_points.size() <= p_item) {
return false;
}
@@ -239,15 +239,7 @@ bool SoftBody3D::_get_property_pinned_points(int p_item, const String &p_what, V
return true;
}
-void SoftBody3D::_softbody_changed() {
- prepare_physics_server();
- _reset_points_offsets();
-#ifdef TOOLS_ENABLED
- update_configuration_warnings();
-#endif
-}
-
-void SoftBody3D::_notification(int p_what) {
+void SoftDynamicBody3D::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_WORLD: {
if (Engine::get_singleton()->is_editor_hint()) {
@@ -312,51 +304,56 @@ void SoftBody3D::_notification(int p_what) {
}
}
-void SoftBody3D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("get_physics_rid"), &SoftBody3D::get_physics_rid);
+void SoftDynamicBody3D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("get_physics_rid"), &SoftDynamicBody3D::get_physics_rid);
+
+ ClassDB::bind_method(D_METHOD("set_collision_mask", "collision_mask"), &SoftDynamicBody3D::set_collision_mask);
+ ClassDB::bind_method(D_METHOD("get_collision_mask"), &SoftDynamicBody3D::get_collision_mask);
- ClassDB::bind_method(D_METHOD("set_collision_mask", "collision_mask"), &SoftBody3D::set_collision_mask);
- ClassDB::bind_method(D_METHOD("get_collision_mask"), &SoftBody3D::get_collision_mask);
+ ClassDB::bind_method(D_METHOD("set_collision_layer", "collision_layer"), &SoftDynamicBody3D::set_collision_layer);
+ ClassDB::bind_method(D_METHOD("get_collision_layer"), &SoftDynamicBody3D::get_collision_layer);
- ClassDB::bind_method(D_METHOD("set_collision_layer", "collision_layer"), &SoftBody3D::set_collision_layer);
- ClassDB::bind_method(D_METHOD("get_collision_layer"), &SoftBody3D::get_collision_layer);
+ ClassDB::bind_method(D_METHOD("set_collision_mask_value", "layer_number", "value"), &SoftDynamicBody3D::set_collision_mask_value);
+ ClassDB::bind_method(D_METHOD("get_collision_mask_value", "layer_number"), &SoftDynamicBody3D::get_collision_mask_value);
- ClassDB::bind_method(D_METHOD("set_collision_mask_value", "layer_number", "value"), &SoftBody3D::set_collision_mask_value);
- ClassDB::bind_method(D_METHOD("get_collision_mask_value", "layer_number"), &SoftBody3D::get_collision_mask_value);
+ ClassDB::bind_method(D_METHOD("set_collision_layer_value", "layer_number", "value"), &SoftDynamicBody3D::set_collision_layer_value);
+ ClassDB::bind_method(D_METHOD("get_collision_layer_value", "layer_number"), &SoftDynamicBody3D::get_collision_layer_value);
- ClassDB::bind_method(D_METHOD("set_collision_layer_value", "layer_number", "value"), &SoftBody3D::set_collision_layer_value);
- ClassDB::bind_method(D_METHOD("get_collision_layer_value", "layer_number"), &SoftBody3D::get_collision_layer_value);
+ ClassDB::bind_method(D_METHOD("set_parent_collision_ignore", "parent_collision_ignore"), &SoftDynamicBody3D::set_parent_collision_ignore);
+ ClassDB::bind_method(D_METHOD("get_parent_collision_ignore"), &SoftDynamicBody3D::get_parent_collision_ignore);
- ClassDB::bind_method(D_METHOD("set_parent_collision_ignore", "parent_collision_ignore"), &SoftBody3D::set_parent_collision_ignore);
- ClassDB::bind_method(D_METHOD("get_parent_collision_ignore"), &SoftBody3D::get_parent_collision_ignore);
+ ClassDB::bind_method(D_METHOD("set_disable_mode", "mode"), &SoftDynamicBody3D::set_disable_mode);
+ ClassDB::bind_method(D_METHOD("get_disable_mode"), &SoftDynamicBody3D::get_disable_mode);
- ClassDB::bind_method(D_METHOD("set_disable_mode", "mode"), &SoftBody3D::set_disable_mode);
- ClassDB::bind_method(D_METHOD("get_disable_mode"), &SoftBody3D::get_disable_mode);
+ ClassDB::bind_method(D_METHOD("get_collision_exceptions"), &SoftDynamicBody3D::get_collision_exceptions);
+ ClassDB::bind_method(D_METHOD("add_collision_exception_with", "body"), &SoftDynamicBody3D::add_collision_exception_with);
+ ClassDB::bind_method(D_METHOD("remove_collision_exception_with", "body"), &SoftDynamicBody3D::remove_collision_exception_with);
- ClassDB::bind_method(D_METHOD("get_collision_exceptions"), &SoftBody3D::get_collision_exceptions);
- ClassDB::bind_method(D_METHOD("add_collision_exception_with", "body"), &SoftBody3D::add_collision_exception_with);
- ClassDB::bind_method(D_METHOD("remove_collision_exception_with", "body"), &SoftBody3D::remove_collision_exception_with);
+ ClassDB::bind_method(D_METHOD("set_simulation_precision", "simulation_precision"), &SoftDynamicBody3D::set_simulation_precision);
+ ClassDB::bind_method(D_METHOD("get_simulation_precision"), &SoftDynamicBody3D::get_simulation_precision);
- ClassDB::bind_method(D_METHOD("set_simulation_precision", "simulation_precision"), &SoftBody3D::set_simulation_precision);
- ClassDB::bind_method(D_METHOD("get_simulation_precision"), &SoftBody3D::get_simulation_precision);
+ ClassDB::bind_method(D_METHOD("set_total_mass", "mass"), &SoftDynamicBody3D::set_total_mass);
+ ClassDB::bind_method(D_METHOD("get_total_mass"), &SoftDynamicBody3D::get_total_mass);
- ClassDB::bind_method(D_METHOD("set_total_mass", "mass"), &SoftBody3D::set_total_mass);
- ClassDB::bind_method(D_METHOD("get_total_mass"), &SoftBody3D::get_total_mass);
+ ClassDB::bind_method(D_METHOD("set_linear_stiffness", "linear_stiffness"), &SoftDynamicBody3D::set_linear_stiffness);
+ ClassDB::bind_method(D_METHOD("get_linear_stiffness"), &SoftDynamicBody3D::get_linear_stiffness);
- ClassDB::bind_method(D_METHOD("set_linear_stiffness", "linear_stiffness"), &SoftBody3D::set_linear_stiffness);
- ClassDB::bind_method(D_METHOD("get_linear_stiffness"), &SoftBody3D::get_linear_stiffness);
+ ClassDB::bind_method(D_METHOD("set_pressure_coefficient", "pressure_coefficient"), &SoftDynamicBody3D::set_pressure_coefficient);
+ ClassDB::bind_method(D_METHOD("get_pressure_coefficient"), &SoftDynamicBody3D::get_pressure_coefficient);
- ClassDB::bind_method(D_METHOD("set_pressure_coefficient", "pressure_coefficient"), &SoftBody3D::set_pressure_coefficient);
- ClassDB::bind_method(D_METHOD("get_pressure_coefficient"), &SoftBody3D::get_pressure_coefficient);
+ ClassDB::bind_method(D_METHOD("set_damping_coefficient", "damping_coefficient"), &SoftDynamicBody3D::set_damping_coefficient);
+ ClassDB::bind_method(D_METHOD("get_damping_coefficient"), &SoftDynamicBody3D::get_damping_coefficient);
- ClassDB::bind_method(D_METHOD("set_damping_coefficient", "damping_coefficient"), &SoftBody3D::set_damping_coefficient);
- ClassDB::bind_method(D_METHOD("get_damping_coefficient"), &SoftBody3D::get_damping_coefficient);
+ ClassDB::bind_method(D_METHOD("set_drag_coefficient", "drag_coefficient"), &SoftDynamicBody3D::set_drag_coefficient);
+ ClassDB::bind_method(D_METHOD("get_drag_coefficient"), &SoftDynamicBody3D::get_drag_coefficient);
- ClassDB::bind_method(D_METHOD("set_drag_coefficient", "drag_coefficient"), &SoftBody3D::set_drag_coefficient);
- ClassDB::bind_method(D_METHOD("get_drag_coefficient"), &SoftBody3D::get_drag_coefficient);
+ ClassDB::bind_method(D_METHOD("get_point_transform", "point_index"), &SoftDynamicBody3D::get_point_transform);
- ClassDB::bind_method(D_METHOD("set_ray_pickable", "ray_pickable"), &SoftBody3D::set_ray_pickable);
- ClassDB::bind_method(D_METHOD("is_ray_pickable"), &SoftBody3D::is_ray_pickable);
+ ClassDB::bind_method(D_METHOD("set_point_pinned", "point_index", "pinned", "attachment_path"), &SoftDynamicBody3D::pin_point, DEFVAL(NodePath()));
+ ClassDB::bind_method(D_METHOD("is_point_pinned", "point_index"), &SoftDynamicBody3D::is_point_pinned);
+
+ ClassDB::bind_method(D_METHOD("set_ray_pickable", "ray_pickable"), &SoftDynamicBody3D::set_ray_pickable);
+ ClassDB::bind_method(D_METHOD("is_ray_pickable"), &SoftDynamicBody3D::is_ray_pickable);
ADD_GROUP("Collision", "collision_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_layer", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_layer", "get_collision_layer");
@@ -378,7 +375,7 @@ void SoftBody3D::_bind_methods() {
BIND_ENUM_CONSTANT(DISABLE_MODE_KEEP_ACTIVE);
}
-TypedArray<String> SoftBody3D::get_configuration_warnings() const {
+TypedArray<String> SoftDynamicBody3D::get_configuration_warnings() const {
TypedArray<String> warnings = Node::get_configuration_warnings();
if (get_mesh().is_null()) {
@@ -387,13 +384,13 @@ TypedArray<String> SoftBody3D::get_configuration_warnings() const {
Transform3D t = get_transform();
if ((ABS(t.basis.get_axis(0).length() - 1.0) > 0.05 || ABS(t.basis.get_axis(1).length() - 1.0) > 0.05 || ABS(t.basis.get_axis(2).length() - 1.0) > 0.05)) {
- warnings.push_back(TTR("Size changes to SoftBody3D will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."));
+ warnings.push_back(TTR("Size changes to SoftDynamicBody3D will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."));
}
return warnings;
}
-void SoftBody3D::_update_physics_server() {
+void SoftDynamicBody3D::_update_physics_server() {
if (!simulation_started) {
return;
}
@@ -409,7 +406,7 @@ void SoftBody3D::_update_physics_server() {
}
}
-void SoftBody3D::_draw_soft_mesh() {
+void SoftDynamicBody3D::_draw_soft_mesh() {
if (get_mesh().is_null()) {
return;
}
@@ -432,7 +429,7 @@ void SoftBody3D::_draw_soft_mesh() {
rendering_server_handler.commit_changes();
}
-void SoftBody3D::prepare_physics_server() {
+void SoftDynamicBody3D::prepare_physics_server() {
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
if (get_mesh().is_valid()) {
@@ -448,16 +445,16 @@ void SoftBody3D::prepare_physics_server() {
if (get_mesh().is_valid() && (is_enabled() || (disable_mode != DISABLE_MODE_REMOVE))) {
become_mesh_owner();
PhysicsServer3D::get_singleton()->soft_body_set_mesh(physics_rid, get_mesh());
- RS::get_singleton()->connect("frame_pre_draw", callable_mp(this, &SoftBody3D::_draw_soft_mesh));
+ RS::get_singleton()->connect("frame_pre_draw", callable_mp(this, &SoftDynamicBody3D::_draw_soft_mesh));
} else {
PhysicsServer3D::get_singleton()->soft_body_set_mesh(physics_rid, nullptr);
- if (RS::get_singleton()->is_connected("frame_pre_draw", callable_mp(this, &SoftBody3D::_draw_soft_mesh))) {
- RS::get_singleton()->disconnect("frame_pre_draw", callable_mp(this, &SoftBody3D::_draw_soft_mesh));
+ if (RS::get_singleton()->is_connected("frame_pre_draw", callable_mp(this, &SoftDynamicBody3D::_draw_soft_mesh))) {
+ RS::get_singleton()->disconnect("frame_pre_draw", callable_mp(this, &SoftDynamicBody3D::_draw_soft_mesh));
}
}
}
-void SoftBody3D::become_mesh_owner() {
+void SoftDynamicBody3D::become_mesh_owner() {
if (mesh.is_null()) {
return;
}
@@ -470,7 +467,7 @@ void SoftBody3D::become_mesh_owner() {
ERR_FAIL_COND(!mesh->get_surface_count());
- // Get current mesh array and create new mesh array with necessary flag for softbody
+ // Get current mesh array and create new mesh array with necessary flag for SoftDynamicBody
Array surface_arrays = mesh->surface_get_arrays(0);
Array surface_blend_arrays = mesh->surface_get_blend_shape_arrays(0);
Dictionary surface_lods = mesh->surface_get_lods(0);
@@ -491,25 +488,25 @@ void SoftBody3D::become_mesh_owner() {
}
}
-void SoftBody3D::set_collision_mask(uint32_t p_mask) {
+void SoftDynamicBody3D::set_collision_mask(uint32_t p_mask) {
collision_mask = p_mask;
PhysicsServer3D::get_singleton()->soft_body_set_collision_mask(physics_rid, p_mask);
}
-uint32_t SoftBody3D::get_collision_mask() const {
+uint32_t SoftDynamicBody3D::get_collision_mask() const {
return collision_mask;
}
-void SoftBody3D::set_collision_layer(uint32_t p_layer) {
+void SoftDynamicBody3D::set_collision_layer(uint32_t p_layer) {
collision_layer = p_layer;
PhysicsServer3D::get_singleton()->soft_body_set_collision_layer(physics_rid, p_layer);
}
-uint32_t SoftBody3D::get_collision_layer() const {
+uint32_t SoftDynamicBody3D::get_collision_layer() const {
return collision_layer;
}
-void SoftBody3D::set_collision_layer_value(int p_layer_number, bool p_value) {
+void SoftDynamicBody3D::set_collision_layer_value(int p_layer_number, bool p_value) {
ERR_FAIL_COND_MSG(p_layer_number < 1, "Collision layer number must be between 1 and 32 inclusive.");
ERR_FAIL_COND_MSG(p_layer_number > 32, "Collision layer number must be between 1 and 32 inclusive.");
uint32_t collision_layer = get_collision_layer();
@@ -521,13 +518,13 @@ void SoftBody3D::set_collision_layer_value(int p_layer_number, bool p_value) {
set_collision_layer(collision_layer);
}
-bool SoftBody3D::get_collision_layer_value(int p_layer_number) const {
+bool SoftDynamicBody3D::get_collision_layer_value(int p_layer_number) const {
ERR_FAIL_COND_V_MSG(p_layer_number < 1, false, "Collision layer number must be between 1 and 32 inclusive.");
ERR_FAIL_COND_V_MSG(p_layer_number > 32, false, "Collision layer number must be between 1 and 32 inclusive.");
return get_collision_layer() & (1 << (p_layer_number - 1));
}
-void SoftBody3D::set_collision_mask_value(int p_layer_number, bool p_value) {
+void SoftDynamicBody3D::set_collision_mask_value(int p_layer_number, bool p_value) {
ERR_FAIL_COND_MSG(p_layer_number < 1, "Collision layer number must be between 1 and 32 inclusive.");
ERR_FAIL_COND_MSG(p_layer_number > 32, "Collision layer number must be between 1 and 32 inclusive.");
uint32_t mask = get_collision_mask();
@@ -539,13 +536,13 @@ void SoftBody3D::set_collision_mask_value(int p_layer_number, bool p_value) {
set_collision_mask(mask);
}
-bool SoftBody3D::get_collision_mask_value(int p_layer_number) const {
+bool SoftDynamicBody3D::get_collision_mask_value(int p_layer_number) const {
ERR_FAIL_COND_V_MSG(p_layer_number < 1, false, "Collision layer number must be between 1 and 32 inclusive.");
ERR_FAIL_COND_V_MSG(p_layer_number > 32, false, "Collision layer number must be between 1 and 32 inclusive.");
return get_collision_mask() & (1 << (p_layer_number - 1));
}
-void SoftBody3D::set_disable_mode(DisableMode p_mode) {
+void SoftDynamicBody3D::set_disable_mode(DisableMode p_mode) {
if (disable_mode == p_mode) {
return;
}
@@ -563,30 +560,30 @@ void SoftBody3D::set_disable_mode(DisableMode p_mode) {
}
}
-SoftBody3D::DisableMode SoftBody3D::get_disable_mode() const {
+SoftDynamicBody3D::DisableMode SoftDynamicBody3D::get_disable_mode() const {
return disable_mode;
}
-void SoftBody3D::set_parent_collision_ignore(const NodePath &p_parent_collision_ignore) {
+void SoftDynamicBody3D::set_parent_collision_ignore(const NodePath &p_parent_collision_ignore) {
parent_collision_ignore = p_parent_collision_ignore;
}
-const NodePath &SoftBody3D::get_parent_collision_ignore() const {
+const NodePath &SoftDynamicBody3D::get_parent_collision_ignore() const {
return parent_collision_ignore;
}
-void SoftBody3D::set_pinned_points_indices(Vector<SoftBody3D::PinnedPoint> p_pinned_points_indices) {
+void SoftDynamicBody3D::set_pinned_points_indices(Vector<SoftDynamicBody3D::PinnedPoint> p_pinned_points_indices) {
pinned_points = p_pinned_points_indices;
for (int i = pinned_points.size() - 1; 0 <= i; --i) {
pin_point(p_pinned_points_indices[i].point_index, true);
}
}
-Vector<SoftBody3D::PinnedPoint> SoftBody3D::get_pinned_points_indices() {
+Vector<SoftDynamicBody3D::PinnedPoint> SoftDynamicBody3D::get_pinned_points_indices() {
return pinned_points;
}
-Array SoftBody3D::get_collision_exceptions() {
+Array SoftDynamicBody3D::get_collision_exceptions() {
List<RID> exceptions;
PhysicsServer3D::get_singleton()->soft_body_get_collision_exceptions(physics_rid, &exceptions);
Array ret;
@@ -599,77 +596,77 @@ Array SoftBody3D::get_collision_exceptions() {
return ret;
}
-void SoftBody3D::add_collision_exception_with(Node *p_node) {
+void SoftDynamicBody3D::add_collision_exception_with(Node *p_node) {
ERR_FAIL_NULL(p_node);
CollisionObject3D *collision_object = Object::cast_to<CollisionObject3D>(p_node);
ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject3Ds.");
PhysicsServer3D::get_singleton()->soft_body_add_collision_exception(physics_rid, collision_object->get_rid());
}
-void SoftBody3D::remove_collision_exception_with(Node *p_node) {
+void SoftDynamicBody3D::remove_collision_exception_with(Node *p_node) {
ERR_FAIL_NULL(p_node);
CollisionObject3D *collision_object = Object::cast_to<CollisionObject3D>(p_node);
ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject3Ds.");
PhysicsServer3D::get_singleton()->soft_body_remove_collision_exception(physics_rid, collision_object->get_rid());
}
-int SoftBody3D::get_simulation_precision() {
+int SoftDynamicBody3D::get_simulation_precision() {
return PhysicsServer3D::get_singleton()->soft_body_get_simulation_precision(physics_rid);
}
-void SoftBody3D::set_simulation_precision(int p_simulation_precision) {
+void SoftDynamicBody3D::set_simulation_precision(int p_simulation_precision) {
PhysicsServer3D::get_singleton()->soft_body_set_simulation_precision(physics_rid, p_simulation_precision);
}
-real_t SoftBody3D::get_total_mass() {
+real_t SoftDynamicBody3D::get_total_mass() {
return PhysicsServer3D::get_singleton()->soft_body_get_total_mass(physics_rid);
}
-void SoftBody3D::set_total_mass(real_t p_total_mass) {
+void SoftDynamicBody3D::set_total_mass(real_t p_total_mass) {
PhysicsServer3D::get_singleton()->soft_body_set_total_mass(physics_rid, p_total_mass);
}
-void SoftBody3D::set_linear_stiffness(real_t p_linear_stiffness) {
+void SoftDynamicBody3D::set_linear_stiffness(real_t p_linear_stiffness) {
PhysicsServer3D::get_singleton()->soft_body_set_linear_stiffness(physics_rid, p_linear_stiffness);
}
-real_t SoftBody3D::get_linear_stiffness() {
+real_t SoftDynamicBody3D::get_linear_stiffness() {
return PhysicsServer3D::get_singleton()->soft_body_get_linear_stiffness(physics_rid);
}
-real_t SoftBody3D::get_pressure_coefficient() {
+real_t SoftDynamicBody3D::get_pressure_coefficient() {
return PhysicsServer3D::get_singleton()->soft_body_get_pressure_coefficient(physics_rid);
}
-void SoftBody3D::set_pressure_coefficient(real_t p_pressure_coefficient) {
+void SoftDynamicBody3D::set_pressure_coefficient(real_t p_pressure_coefficient) {
PhysicsServer3D::get_singleton()->soft_body_set_pressure_coefficient(physics_rid, p_pressure_coefficient);
}
-real_t SoftBody3D::get_damping_coefficient() {
+real_t SoftDynamicBody3D::get_damping_coefficient() {
return PhysicsServer3D::get_singleton()->soft_body_get_damping_coefficient(physics_rid);
}
-void SoftBody3D::set_damping_coefficient(real_t p_damping_coefficient) {
+void SoftDynamicBody3D::set_damping_coefficient(real_t p_damping_coefficient) {
PhysicsServer3D::get_singleton()->soft_body_set_damping_coefficient(physics_rid, p_damping_coefficient);
}
-real_t SoftBody3D::get_drag_coefficient() {
+real_t SoftDynamicBody3D::get_drag_coefficient() {
return PhysicsServer3D::get_singleton()->soft_body_get_drag_coefficient(physics_rid);
}
-void SoftBody3D::set_drag_coefficient(real_t p_drag_coefficient) {
+void SoftDynamicBody3D::set_drag_coefficient(real_t p_drag_coefficient) {
PhysicsServer3D::get_singleton()->soft_body_set_drag_coefficient(physics_rid, p_drag_coefficient);
}
-Vector3 SoftBody3D::get_point_transform(int p_point_index) {
+Vector3 SoftDynamicBody3D::get_point_transform(int p_point_index) {
return PhysicsServer3D::get_singleton()->soft_body_get_point_global_position(physics_rid, p_point_index);
}
-void SoftBody3D::pin_point_toggle(int p_point_index) {
+void SoftDynamicBody3D::pin_point_toggle(int p_point_index) {
pin_point(p_point_index, !(-1 != _has_pinned_point(p_point_index)));
}
-void SoftBody3D::pin_point(int p_point_index, bool pin, const NodePath &p_spatial_attachment_path) {
+void SoftDynamicBody3D::pin_point(int p_point_index, bool pin, const NodePath &p_spatial_attachment_path) {
_pin_point_on_physics_server(p_point_index, pin);
if (pin) {
_add_pinned_point(p_point_index, p_spatial_attachment_path);
@@ -678,41 +675,33 @@ void SoftBody3D::pin_point(int p_point_index, bool pin, const NodePath &p_spatia
}
}
-bool SoftBody3D::is_point_pinned(int p_point_index) const {
+bool SoftDynamicBody3D::is_point_pinned(int p_point_index) const {
return -1 != _has_pinned_point(p_point_index);
}
-void SoftBody3D::set_ray_pickable(bool p_ray_pickable) {
+void SoftDynamicBody3D::set_ray_pickable(bool p_ray_pickable) {
ray_pickable = p_ray_pickable;
_update_pickable();
}
-bool SoftBody3D::is_ray_pickable() const {
+bool SoftDynamicBody3D::is_ray_pickable() const {
return ray_pickable;
}
-SoftBody3D::SoftBody3D() :
+SoftDynamicBody3D::SoftDynamicBody3D() :
physics_rid(PhysicsServer3D::get_singleton()->soft_body_create()) {
PhysicsServer3D::get_singleton()->body_attach_object_instance_id(physics_rid, get_instance_id());
}
-SoftBody3D::~SoftBody3D() {
+SoftDynamicBody3D::~SoftDynamicBody3D() {
PhysicsServer3D::get_singleton()->free(physics_rid);
}
-void SoftBody3D::reset_softbody_pin() {
- PhysicsServer3D::get_singleton()->soft_body_remove_all_pinned_points(physics_rid);
- const PinnedPoint *pps = pinned_points.ptr();
- for (int i = pinned_points.size() - 1; 0 < i; --i) {
- PhysicsServer3D::get_singleton()->soft_body_pin_point(physics_rid, pps[i].point_index, true);
- }
-}
-
-void SoftBody3D::_make_cache_dirty() {
+void SoftDynamicBody3D::_make_cache_dirty() {
pinned_points_cache_dirty = true;
}
-void SoftBody3D::_update_cache_pin_points_datas() {
+void SoftDynamicBody3D::_update_cache_pin_points_datas() {
if (!pinned_points_cache_dirty) {
return;
}
@@ -725,17 +714,17 @@ void SoftBody3D::_update_cache_pin_points_datas() {
w[i].spatial_attachment = Object::cast_to<Node3D>(get_node(w[i].spatial_attachment_path));
}
if (!w[i].spatial_attachment) {
- ERR_PRINT("Node3D node not defined in the pinned point, this is undefined behavior for SoftBody3D!");
+ ERR_PRINT("Node3D node not defined in the pinned point, this is undefined behavior for SoftDynamicBody3D!");
}
}
}
-void SoftBody3D::_pin_point_on_physics_server(int p_point_index, bool pin) {
+void SoftDynamicBody3D::_pin_point_on_physics_server(int p_point_index, bool pin) {
PhysicsServer3D::get_singleton()->soft_body_pin_point(physics_rid, p_point_index, pin);
}
-void SoftBody3D::_add_pinned_point(int p_point_index, const NodePath &p_spatial_attachment_path) {
- SoftBody3D::PinnedPoint *pinned_point;
+void SoftDynamicBody3D::_add_pinned_point(int p_point_index, const NodePath &p_spatial_attachment_path) {
+ SoftDynamicBody3D::PinnedPoint *pinned_point;
if (-1 == _get_pinned_point(p_point_index, pinned_point)) {
// Create new
PinnedPoint pp;
@@ -760,7 +749,7 @@ void SoftBody3D::_add_pinned_point(int p_point_index, const NodePath &p_spatial_
}
}
-void SoftBody3D::_reset_points_offsets() {
+void SoftDynamicBody3D::_reset_points_offsets() {
if (!Engine::get_singleton()->is_editor_hint()) {
return;
}
@@ -782,25 +771,25 @@ void SoftBody3D::_reset_points_offsets() {
}
}
-void SoftBody3D::_remove_pinned_point(int p_point_index) {
+void SoftDynamicBody3D::_remove_pinned_point(int p_point_index) {
const int id(_has_pinned_point(p_point_index));
if (-1 != id) {
pinned_points.remove(id);
}
}
-int SoftBody3D::_get_pinned_point(int p_point_index, SoftBody3D::PinnedPoint *&r_point) const {
+int SoftDynamicBody3D::_get_pinned_point(int p_point_index, SoftDynamicBody3D::PinnedPoint *&r_point) const {
const int id = _has_pinned_point(p_point_index);
if (-1 == id) {
r_point = nullptr;
return -1;
} else {
- r_point = const_cast<SoftBody3D::PinnedPoint *>(&pinned_points.ptr()[id]);
+ r_point = const_cast<SoftDynamicBody3D::PinnedPoint *>(&pinned_points.ptr()[id]);
return id;
}
}
-int SoftBody3D::_has_pinned_point(int p_point_index) const {
+int SoftDynamicBody3D::_has_pinned_point(int p_point_index) const {
const PinnedPoint *r = pinned_points.ptr();
for (int i = pinned_points.size() - 1; 0 <= i; --i) {
if (p_point_index == r[i].point_index) {
diff --git a/scene/3d/soft_body_3d.h b/scene/3d/soft_dynamic_body_3d.h
index 46b185a32c..0b4b3021cd 100644
--- a/scene/3d/soft_body_3d.h
+++ b/scene/3d/soft_dynamic_body_3d.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* soft_body_3d.h */
+/* soft_dynamic_body_3d.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,16 +28,16 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SOFT_PHYSICS_BODY_H
-#define SOFT_PHYSICS_BODY_H
+#ifndef SOFT_DYNAMIC_BODY_H
+#define SOFT_DYNAMIC_BODY_H
#include "scene/3d/mesh_instance_3d.h"
#include "servers/physics_server_3d.h"
-class SoftBody3D;
+class SoftDynamicBody3D;
-class SoftBodyRenderingServerHandler : public RenderingServerHandler {
- friend class SoftBody3D;
+class SoftDynamicBodyRenderingServerHandler : public RenderingServerHandler {
+ friend class SoftDynamicBody3D;
RID mesh;
int surface = 0;
@@ -49,7 +49,7 @@ class SoftBodyRenderingServerHandler : public RenderingServerHandler {
uint8_t *write_buffer = nullptr;
private:
- SoftBodyRenderingServerHandler();
+ SoftDynamicBodyRenderingServerHandler();
bool is_ready() { return mesh.is_valid(); }
void prepare(RID p_mesh_rid, int p_surface);
void clear();
@@ -63,8 +63,8 @@ public:
void set_aabb(const AABB &p_aabb) override;
};
-class SoftBody3D : public MeshInstance3D {
- GDCLASS(SoftBody3D, MeshInstance3D);
+class SoftDynamicBody3D : public MeshInstance3D {
+ GDCLASS(SoftDynamicBody3D, MeshInstance3D);
public:
enum DisableMode {
@@ -84,7 +84,7 @@ public:
};
private:
- SoftBodyRenderingServerHandler rendering_server_handler;
+ SoftDynamicBodyRenderingServerHandler rendering_server_handler;
RID physics_rid;
@@ -106,8 +106,6 @@ private:
void _update_pickable();
- void _softbody_changed();
-
protected:
bool _set(const StringName &p_name, const Variant &p_value);
bool _get(const StringName &p_name, Variant &r_ret) const;
@@ -184,12 +182,10 @@ public:
void set_ray_pickable(bool p_ray_pickable);
bool is_ray_pickable() const;
- SoftBody3D();
- ~SoftBody3D();
+ SoftDynamicBody3D();
+ ~SoftDynamicBody3D();
private:
- void reset_softbody_pin();
-
void _make_cache_dirty();
void _update_cache_pin_points_datas();
@@ -202,6 +198,6 @@ private:
int _has_pinned_point(int p_point_index) const;
};
-VARIANT_ENUM_CAST(SoftBody3D::DisableMode);
+VARIANT_ENUM_CAST(SoftDynamicBody3D::DisableMode);
-#endif // SOFT_PHYSICS_BODY_H
+#endif // SOFT_DYNAMIC_BODY_H
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index a28382f4cb..b9a2736918 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -1177,7 +1177,7 @@ void AnimatedSprite3D::stop() {
}
bool AnimatedSprite3D::is_playing() const {
- return is_processing();
+ return playing;
}
void AnimatedSprite3D::_reset_timeout() {
diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp
index 92c0e09947..9a2aaa8be2 100644
--- a/scene/3d/vehicle_body_3d.cpp
+++ b/scene/3d/vehicle_body_3d.cpp
@@ -470,7 +470,7 @@ real_t VehicleBody3D::_ray_cast(int p_idx, PhysicsDirectBodyState3D *s) {
}
void VehicleBody3D::_update_suspension(PhysicsDirectBodyState3D *s) {
- real_t chassisMass = mass;
+ real_t chassisMass = get_mass();
for (int w_it = 0; w_it < wheels.size(); w_it++) {
VehicleWheel3D &wheel_info = *wheels[w_it];
@@ -558,7 +558,7 @@ void VehicleBody3D::_resolve_single_bilateral(PhysicsDirectBodyState3D *s, const
rel_pos2,
normal,
s->get_inverse_inertia_tensor().get_main_diagonal(),
- 1.0 / mass,
+ 1.0 / get_mass(),
b2invinertia,
b2invmass);
@@ -584,7 +584,7 @@ void VehicleBody3D::_resolve_single_bilateral(PhysicsDirectBodyState3D *s, const
#define ONLY_USE_LINEAR_MASS
#ifdef ONLY_USE_LINEAR_MASS
- real_t massTerm = real_t(1.) / ((1.0 / mass) + b2invmass);
+ real_t massTerm = real_t(1.) / ((1.0 / get_mass()) + b2invmass);
impulse = -contactDamping * rel_vel * massTerm;
#else
real_t velocityImpulse = -contactDamping * rel_vel * jacDiagABInv;
@@ -802,24 +802,21 @@ void VehicleBody3D::_update_friction(PhysicsDirectBodyState3D *s) {
}
}
-void VehicleBody3D::_direct_state_changed(Object *p_state) {
- RigidBody3D::_direct_state_changed(p_state);
+void VehicleBody3D::_body_state_changed(PhysicsDirectBodyState3D *p_state) {
+ RigidDynamicBody3D::_body_state_changed(p_state);
- state = Object::cast_to<PhysicsDirectBodyState3D>(p_state);
- ERR_FAIL_NULL_MSG(state, "Method '_direct_state_changed' must receive a valid PhysicsDirectBodyState3D object as argument");
-
- real_t step = state->get_step();
+ real_t step = p_state->get_step();
for (int i = 0; i < wheels.size(); i++) {
- _update_wheel(i, state);
+ _update_wheel(i, p_state);
}
for (int i = 0; i < wheels.size(); i++) {
- _ray_cast(i, state);
- wheels[i]->set_transform(state->get_transform().inverse() * wheels[i]->m_worldTransform);
+ _ray_cast(i, p_state);
+ wheels[i]->set_transform(p_state->get_transform().inverse() * wheels[i]->m_worldTransform);
}
- _update_suspension(state);
+ _update_suspension(p_state);
for (int i = 0; i < wheels.size(); i++) {
//apply suspension force
@@ -831,20 +828,20 @@ void VehicleBody3D::_direct_state_changed(Object *p_state) {
suspensionForce = wheel.m_maxSuspensionForce;
}
Vector3 impulse = wheel.m_raycastInfo.m_contactNormalWS * suspensionForce * step;
- Vector3 relative_position = wheel.m_raycastInfo.m_contactPointWS - state->get_transform().origin;
+ Vector3 relative_position = wheel.m_raycastInfo.m_contactPointWS - p_state->get_transform().origin;
- state->apply_impulse(impulse, relative_position);
+ p_state->apply_impulse(impulse, relative_position);
}
- _update_friction(state);
+ _update_friction(p_state);
for (int i = 0; i < wheels.size(); i++) {
VehicleWheel3D &wheel = *wheels[i];
- Vector3 relpos = wheel.m_raycastInfo.m_hardPointWS - state->get_transform().origin;
- Vector3 vel = state->get_linear_velocity() + (state->get_angular_velocity()).cross(relpos); // * mPos);
+ Vector3 relpos = wheel.m_raycastInfo.m_hardPointWS - p_state->get_transform().origin;
+ Vector3 vel = p_state->get_linear_velocity() + (p_state->get_angular_velocity()).cross(relpos); // * mPos);
if (wheel.m_raycastInfo.m_isInContact) {
- const Transform3D &chassisWorldTransform = state->get_transform();
+ const Transform3D &chassisWorldTransform = p_state->get_transform();
Vector3 fwd(
chassisWorldTransform.basis[0][Vector3::AXIS_Z],
@@ -864,8 +861,6 @@ void VehicleBody3D::_direct_state_changed(Object *p_state) {
wheel.m_deltaRotation *= real_t(0.99); //damping of rotation when not in contact
}
-
- state = nullptr;
}
void VehicleBody3D::set_engine_force(real_t p_engine_force) {
@@ -926,7 +921,5 @@ void VehicleBody3D::_bind_methods() {
VehicleBody3D::VehicleBody3D() {
exclude.insert(get_rid());
- //PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), callable_mp(this, &VehicleBody3D::_direct_state_changed));
-
set_mass(40);
}
diff --git a/scene/3d/vehicle_body_3d.h b/scene/3d/vehicle_body_3d.h
index 2c10205ea3..a798c76c1f 100644
--- a/scene/3d/vehicle_body_3d.h
+++ b/scene/3d/vehicle_body_3d.h
@@ -150,8 +150,8 @@ public:
VehicleWheel3D();
};
-class VehicleBody3D : public RigidBody3D {
- GDCLASS(VehicleBody3D, RigidBody3D);
+class VehicleBody3D : public RigidDynamicBody3D {
+ GDCLASS(VehicleBody3D, RigidDynamicBody3D);
real_t engine_force = 0.0;
real_t brake = 0.0;
@@ -192,7 +192,8 @@ class VehicleBody3D : public RigidBody3D {
static void _bind_methods();
- void _direct_state_changed(Object *p_state) override;
+ static void _body_state_changed_callback(void *p_instance, PhysicsDirectBodyState3D *p_state);
+ virtual void _body_state_changed(PhysicsDirectBodyState3D *p_state) override;
public:
void set_engine_force(real_t p_engine_force);
diff --git a/scene/3d/voxelizer.cpp b/scene/3d/voxelizer.cpp
index 2d32379d69..04f371f4b2 100644
--- a/scene/3d/voxelizer.cpp
+++ b/scene/3d/voxelizer.cpp
@@ -173,7 +173,7 @@ void Voxelizer::_plot_face(int p_idx, int p_level, int p_x, int p_y, int p_z, co
//could not in any way get texture information.. so use closest point to center
Face3 f(p_vtx[0], p_vtx[1], p_vtx[2]);
- Vector3 inters = f.get_closest_point_to(p_aabb.position + p_aabb.size * 0.5);
+ Vector3 inters = f.get_closest_point_to(p_aabb.get_center());
Vector3 lnormal;
Vector2 uv;
@@ -434,7 +434,7 @@ void Voxelizer::plot_mesh(const Transform3D &p_xform, Ref<Mesh> &p_mesh, const V
}
//test against original bounds
- if (!Geometry3D::triangle_box_overlap(original_bounds.position + original_bounds.size * 0.5, original_bounds.size * 0.5, vtxs)) {
+ if (!Geometry3D::triangle_box_overlap(original_bounds.get_center(), original_bounds.size * 0.5, vtxs)) {
continue;
}
//plot
@@ -466,7 +466,7 @@ void Voxelizer::plot_mesh(const Transform3D &p_xform, Ref<Mesh> &p_mesh, const V
}
//test against original bounds
- if (!Geometry3D::triangle_box_overlap(original_bounds.position + original_bounds.size * 0.5, original_bounds.size * 0.5, vtxs)) {
+ if (!Geometry3D::triangle_box_overlap(original_bounds.get_center(), original_bounds.size * 0.5, vtxs)) {
continue;
}
//plot face
@@ -885,7 +885,7 @@ Vector<uint8_t> Voxelizer::get_sdf_3d_image() const {
void Voxelizer::_debug_mesh(int p_idx, int p_level, const AABB &p_aabb, Ref<MultiMesh> &p_multimesh, int &idx) {
if (p_level == cell_subdiv - 1) {
- Vector3 center = p_aabb.position + p_aabb.size * 0.5;
+ Vector3 center = p_aabb.get_center();
Transform3D xform;
xform.origin = center;
xform.basis.scale(p_aabb.size * 0.5);
diff --git a/scene/animation/SCsub b/scene/animation/SCsub
index cc33a5af84..d0aa0bc8aa 100644
--- a/scene/animation/SCsub
+++ b/scene/animation/SCsub
@@ -6,11 +6,8 @@ Import("env")
thirdparty_obj = []
-thirdparty_sources = "#thirdparty/misc/easing_equations.cpp"
-
env_thirdparty = env.Clone()
env_thirdparty.disable_warnings()
-env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
env.scene_sources += thirdparty_obj
# Godot source files
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp
index 049f3483ff..af186072ac 100644
--- a/scene/animation/animation_blend_tree.cpp
+++ b/scene/animation/animation_blend_tree.cpp
@@ -248,27 +248,26 @@ double AnimationNodeOneShot::process(double p_time, bool p_seek) {
if (fade_in > 0) {
blend = time / fade_in;
} else {
- blend = 0; //wtf
+ blend = 0;
}
-
- } else if (!do_start && remaining < fade_out) {
- if (fade_out) {
+ } else if (!do_start && remaining <= fade_out) {
+ if (fade_out > 0) {
blend = (remaining / fade_out);
} else {
- blend = 1.0;
+ blend = 0;
}
} else {
blend = 1.0;
}
- float main_rem;
+ double main_rem;
if (mix == MIX_MODE_ADD) {
main_rem = blend_input(0, p_time, p_seek, 1.0, FILTER_IGNORE, !sync);
} else {
main_rem = blend_input(0, p_time, p_seek, 1.0 - blend, FILTER_BLEND, !sync);
}
- float os_rem = blend_input(1, os_seek ? time : p_time, os_seek, blend, FILTER_PASS, false);
+ double os_rem = blend_input(1, os_seek ? time : p_time, os_seek, blend, FILTER_PASS, false);
if (do_start) {
remaining = os_rem;
@@ -718,7 +717,7 @@ double AnimationNodeTransition::process(double p_time, bool p_seek) {
} else { // cross-fading from prev to current
- float blend = xfade ? (prev_xfading / xfade) : 1;
+ float blend = xfade == 0 ? 0 : (prev_xfading / xfade);
if (!p_seek && switched) { //just switched, seek to start of current
@@ -1124,6 +1123,7 @@ void AnimationNodeBlendTree::_get_property_list(List<PropertyInfo> *p_list) cons
void AnimationNodeBlendTree::reset_state() {
graph_offset = Vector2();
nodes.clear();
+ _initialize_node_tree();
emit_changed();
emit_signal(SNAME("tree_changed"));
}
@@ -1162,7 +1162,7 @@ void AnimationNodeBlendTree::_bind_methods() {
BIND_CONSTANT(CONNECTION_ERROR_CONNECTION_EXISTS);
}
-AnimationNodeBlendTree::AnimationNodeBlendTree() {
+void AnimationNodeBlendTree::_initialize_node_tree() {
Ref<AnimationNodeOutput> output;
output.instantiate();
Node n;
@@ -1172,5 +1172,9 @@ AnimationNodeBlendTree::AnimationNodeBlendTree() {
nodes["output"] = n;
}
+AnimationNodeBlendTree::AnimationNodeBlendTree() {
+ _initialize_node_tree();
+}
+
AnimationNodeBlendTree::~AnimationNodeBlendTree() {
}
diff --git a/scene/animation/animation_blend_tree.h b/scene/animation/animation_blend_tree.h
index 8508aaf71b..258443a999 100644
--- a/scene/animation/animation_blend_tree.h
+++ b/scene/animation/animation_blend_tree.h
@@ -345,6 +345,8 @@ class AnimationNodeBlendTree : public AnimationRootNode {
void _tree_changed();
void _node_changed(const StringName &p_node);
+ void _initialize_node_tree();
+
protected:
static void _bind_methods();
bool _set(const StringName &p_name, const Variant &p_value);
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index f6091f224c..5825a35030 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -737,7 +737,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
if (anim->has_loop()) {
at_anim_pos = Math::fposmod(p_time - pos, (double)anim->get_length()); //seek to loop
} else {
- at_anim_pos = MAX((double)anim->get_length(), p_time - pos); //seek to end
+ at_anim_pos = MIN((double)anim->get_length(), p_time - pos); //seek to end
}
if (player->is_playing() || p_seeked) {
@@ -765,6 +765,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
}
} else {
player->play(anim_name);
+ player->seek(0.0, true);
nc->animation_playing = true;
playing_caches.insert(nc);
}
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index 543545b90f..9ca8d478b1 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -36,8 +36,9 @@
#include "servers/audio/audio_stream.h"
void AnimationNode::get_parameter_list(List<PropertyInfo> *r_list) const {
- if (get_script_instance()) {
- Array parameters = get_script_instance()->call("_get_parameter_list");
+ Array parameters;
+
+ if (GDVIRTUAL_CALL(_get_parameter_list, parameters)) {
for (int i = 0; i < parameters.size(); i++) {
Dictionary d = parameters[i];
ERR_CONTINUE(d.is_empty());
@@ -47,8 +48,9 @@ void AnimationNode::get_parameter_list(List<PropertyInfo> *r_list) const {
}
Variant AnimationNode::get_parameter_default_value(const StringName &p_parameter) const {
- if (get_script_instance()) {
- return get_script_instance()->call("_get_parameter_default_value", p_parameter);
+ Variant ret;
+ if (GDVIRTUAL_CALL(_get_parameter_default_value, p_parameter, ret)) {
+ return ret;
}
return Variant();
}
@@ -72,8 +74,8 @@ Variant AnimationNode::get_parameter(const StringName &p_name) const {
}
void AnimationNode::get_child_nodes(List<ChildNode> *r_child_nodes) {
- if (get_script_instance()) {
- Dictionary cn = get_script_instance()->call("_get_child_nodes");
+ Dictionary cn;
+ if (GDVIRTUAL_CALL(_get_child_nodes, cn)) {
List<Variant> keys;
cn.get_key_list(&keys);
for (const Variant &E : keys) {
@@ -298,8 +300,9 @@ String AnimationNode::get_input_name(int p_input) {
}
String AnimationNode::get_caption() const {
- if (get_script_instance()) {
- return get_script_instance()->call("_get_caption");
+ String ret;
+ if (GDVIRTUAL_CALL(_get_caption, ret)) {
+ return ret;
}
return "Node";
@@ -329,8 +332,9 @@ void AnimationNode::remove_input(int p_index) {
}
double AnimationNode::process(double p_time, bool p_seek) {
- if (get_script_instance()) {
- return get_script_instance()->call("_process", p_time, p_seek);
+ double ret;
+ if (GDVIRTUAL_CALL(_process, p_time, p_seek, ret)) {
+ return ret;
}
return 0;
@@ -357,8 +361,9 @@ bool AnimationNode::is_path_filtered(const NodePath &p_path) const {
}
bool AnimationNode::has_filter() const {
- if (get_script_instance()) {
- return get_script_instance()->call("_has_filter");
+ bool ret;
+ if (GDVIRTUAL_CALL(_has_filter, ret)) {
+ return ret;
}
return false;
@@ -390,8 +395,9 @@ void AnimationNode::_validate_property(PropertyInfo &property) const {
}
Ref<AnimationNode> AnimationNode::get_child_by_name(const StringName &p_name) {
- if (get_script_instance()) {
- return get_script_instance()->call("_get_child_by_name", p_name);
+ Ref<AnimationNode> ret;
+ if (GDVIRTUAL_CALL(_get_child_by_name, p_name, ret)) {
+ return ret;
}
return Ref<AnimationNode>();
}
@@ -422,17 +428,13 @@ void AnimationNode::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "filter_enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_filter_enabled", "is_filter_enabled");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "filters", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_filters", "_get_filters");
- BIND_VMETHOD(MethodInfo(Variant::DICTIONARY, "_get_child_nodes"));
- BIND_VMETHOD(MethodInfo(Variant::ARRAY, "_get_parameter_list"));
- BIND_VMETHOD(MethodInfo(Variant::OBJECT, "_get_child_by_name", PropertyInfo(Variant::STRING, "name")));
- {
- MethodInfo mi = MethodInfo(Variant::NIL, "_get_parameter_default_value", PropertyInfo(Variant::STRING_NAME, "name"));
- mi.return_val.usage = PROPERTY_USAGE_NIL_IS_VARIANT;
- BIND_VMETHOD(mi);
- }
- BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::FLOAT, "time"), PropertyInfo(Variant::BOOL, "seek")));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_caption"));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_has_filter"));
+ GDVIRTUAL_BIND(_get_child_nodes);
+ GDVIRTUAL_BIND(_get_parameter_list);
+ GDVIRTUAL_BIND(_get_child_by_name, "name");
+ GDVIRTUAL_BIND(_get_parameter_default_value, "parameter");
+ GDVIRTUAL_BIND(_process, "time", "seek");
+ GDVIRTUAL_BIND(_get_caption);
+ GDVIRTUAL_BIND(_has_filter);
ADD_SIGNAL(MethodInfo("removed_from_graph"));
@@ -956,7 +958,7 @@ void AnimationTree::_process_graph(real_t p_delta) {
Variant::interpolate(t->value, value, blend, t->value);
- } else if (delta != 0) {
+ } else {
List<int> indices;
a->value_track_get_key_indices(i, time, delta, &indices);
diff --git a/scene/animation/animation_tree.h b/scene/animation/animation_tree.h
index 59bbc5b4da..1e0267682e 100644
--- a/scene/animation/animation_tree.h
+++ b/scene/animation/animation_tree.h
@@ -112,6 +112,14 @@ protected:
void _set_parent(Object *p_parent);
+ GDVIRTUAL0RC(Dictionary, _get_child_nodes)
+ GDVIRTUAL0RC(Array, _get_parameter_list)
+ GDVIRTUAL1RC(Ref<AnimationNode>, _get_child_by_name, StringName)
+ GDVIRTUAL1RC(Variant, _get_parameter_default_value, StringName)
+ GDVIRTUAL2RC(double, _process, double, bool)
+ GDVIRTUAL0RC(String, _get_caption)
+ GDVIRTUAL0RC(bool, _has_filter)
+
public:
virtual void get_parameter_list(List<PropertyInfo> *r_list) const;
virtual Variant get_parameter_default_value(const StringName &p_parameter) const;
diff --git a/scene/animation/easing_equations.h b/scene/animation/easing_equations.h
new file mode 100644
index 0000000000..c38d083b7f
--- /dev/null
+++ b/scene/animation/easing_equations.h
@@ -0,0 +1,405 @@
+/*************************************************************************/
+/* easing_equations.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+/*
+ * Derived from Robert Penner's easing equations: http://robertpenner.com/easing/
+ *
+ * Copyright (c) 2001 Robert Penner
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef EASING_EQUATIONS_H
+#define EASING_EQUATIONS_H
+
+namespace linear {
+static real_t in(real_t t, real_t b, real_t c, real_t d) {
+ return c * t / d + b;
+}
+}; // namespace linear
+
+namespace sine {
+static real_t in(real_t t, real_t b, real_t c, real_t d) {
+ return -c * cos(t / d * (Math_PI / 2)) + c + b;
+}
+
+static real_t out(real_t t, real_t b, real_t c, real_t d) {
+ return c * sin(t / d * (Math_PI / 2)) + b;
+}
+
+static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
+ return -c / 2 * (cos(Math_PI * t / d) - 1) + b;
+}
+
+static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
+ if (t < d / 2) {
+ return out(t * 2, b, c / 2, d);
+ }
+ return in(t * 2 - d, b + c / 2, c / 2, d);
+}
+}; // namespace sine
+
+namespace quint {
+static real_t in(real_t t, real_t b, real_t c, real_t d) {
+ return c * pow(t / d, 5) + b;
+}
+
+static real_t out(real_t t, real_t b, real_t c, real_t d) {
+ return c * (pow(t / d - 1, 5) + 1) + b;
+}
+
+static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
+ t = t / d * 2;
+
+ if (t < 1) {
+ return c / 2 * pow(t, 5) + b;
+ }
+ return c / 2 * (pow(t - 2, 5) + 2) + b;
+}
+
+static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
+ if (t < d / 2) {
+ return out(t * 2, b, c / 2, d);
+ }
+ return in(t * 2 - d, b + c / 2, c / 2, d);
+}
+}; // namespace quint
+
+namespace quart {
+static real_t in(real_t t, real_t b, real_t c, real_t d) {
+ return c * pow(t / d, 4) + b;
+}
+
+static real_t out(real_t t, real_t b, real_t c, real_t d) {
+ return -c * (pow(t / d - 1, 4) - 1) + b;
+}
+
+static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
+ t = t / d * 2;
+
+ if (t < 1) {
+ return c / 2 * pow(t, 4) + b;
+ }
+ return -c / 2 * (pow(t - 2, 4) - 2) + b;
+}
+
+static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
+ if (t < d / 2) {
+ return out(t * 2, b, c / 2, d);
+ }
+ return in(t * 2 - d, b + c / 2, c / 2, d);
+}
+}; // namespace quart
+
+namespace quad {
+static real_t in(real_t t, real_t b, real_t c, real_t d) {
+ return c * pow(t / d, 2) + b;
+}
+
+static real_t out(real_t t, real_t b, real_t c, real_t d) {
+ t /= d;
+ return -c * t * (t - 2) + b;
+}
+
+static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
+ t = t / d * 2;
+
+ if (t < 1) {
+ return c / 2 * pow(t, 2) + b;
+ }
+ return -c / 2 * ((t - 1) * (t - 3) - 1) + b;
+}
+
+static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
+ if (t < d / 2) {
+ return out(t * 2, b, c / 2, d);
+ }
+ return in(t * 2 - d, b + c / 2, c / 2, d);
+}
+}; // namespace quad
+
+namespace expo {
+static real_t in(real_t t, real_t b, real_t c, real_t d) {
+ if (t == 0) {
+ return b;
+ }
+ return c * pow(2, 10 * (t / d - 1)) + b - c * 0.001;
+}
+
+static real_t out(real_t t, real_t b, real_t c, real_t d) {
+ if (t == d) {
+ return b + c;
+ }
+ return c * 1.001 * (-pow(2, -10 * t / d) + 1) + b;
+}
+
+static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
+ if (t == 0) {
+ return b;
+ }
+
+ if (t == d) {
+ return b + c;
+ }
+
+ t = t / d * 2;
+
+ if (t < 1) {
+ return c / 2 * pow(2, 10 * (t - 1)) + b - c * 0.0005;
+ }
+ return c / 2 * 1.0005 * (-pow(2, -10 * (t - 1)) + 2) + b;
+}
+
+static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
+ if (t < d / 2) {
+ return out(t * 2, b, c / 2, d);
+ }
+ return in(t * 2 - d, b + c / 2, c / 2, d);
+}
+}; // namespace expo
+
+namespace elastic {
+static real_t in(real_t t, real_t b, real_t c, real_t d) {
+ if (t == 0) {
+ return b;
+ }
+
+ t /= d;
+ if (t == 1) {
+ return b + c;
+ }
+
+ t -= 1;
+ float p = d * 0.3f;
+ float a = c * pow(2, 10 * t);
+ float s = p / 4;
+
+ return -(a * sin((t * d - s) * (2 * Math_PI) / p)) + b;
+}
+
+static real_t out(real_t t, real_t b, real_t c, real_t d) {
+ if (t == 0) {
+ return b;
+ }
+
+ t /= d;
+ if (t == 1) {
+ return b + c;
+ }
+
+ float p = d * 0.3f;
+ float s = p / 4;
+
+ return (c * pow(2, -10 * t) * sin((t * d - s) * (2 * Math_PI) / p) + c + b);
+}
+
+static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
+ if (t == 0) {
+ return b;
+ }
+
+ if ((t /= d / 2) == 2) {
+ return b + c;
+ }
+
+ float p = d * (0.3f * 1.5f);
+ float a = c;
+ float s = p / 4;
+
+ if (t < 1) {
+ t -= 1;
+ a *= pow(2, 10 * t);
+ return -0.5f * (a * sin((t * d - s) * (2 * Math_PI) / p)) + b;
+ }
+
+ t -= 1;
+ a *= pow(2, -10 * t);
+ return a * sin((t * d - s) * (2 * Math_PI) / p) * 0.5f + c + b;
+}
+
+static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
+ if (t < d / 2) {
+ return out(t * 2, b, c / 2, d);
+ }
+ return in(t * 2 - d, b + c / 2, c / 2, d);
+}
+}; // namespace elastic
+
+namespace cubic {
+static real_t in(real_t t, real_t b, real_t c, real_t d) {
+ t /= d;
+ return c * t * t * t + b;
+}
+
+static real_t out(real_t t, real_t b, real_t c, real_t d) {
+ t = t / d - 1;
+ return c * (t * t * t + 1) + b;
+}
+
+static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
+ t /= d / 2;
+ if (t < 1) {
+ return c / 2 * t * t * t + b;
+ }
+
+ t -= 2;
+ return c / 2 * (t * t * t + 2) + b;
+}
+
+static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
+ if (t < d / 2) {
+ return out(t * 2, b, c / 2, d);
+ }
+ return in(t * 2 - d, b + c / 2, c / 2, d);
+}
+}; // namespace cubic
+
+namespace circ {
+static real_t in(real_t t, real_t b, real_t c, real_t d) {
+ t /= d;
+ return -c * (sqrt(1 - t * t) - 1) + b;
+}
+
+static real_t out(real_t t, real_t b, real_t c, real_t d) {
+ t = t / d - 1;
+ return c * sqrt(1 - t * t) + b;
+}
+
+static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
+ t /= d / 2;
+ if (t < 1) {
+ return -c / 2 * (sqrt(1 - t * t) - 1) + b;
+ }
+
+ t -= 2;
+ return c / 2 * (sqrt(1 - t * t) + 1) + b;
+}
+
+static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
+ if (t < d / 2) {
+ return out(t * 2, b, c / 2, d);
+ }
+ return in(t * 2 - d, b + c / 2, c / 2, d);
+}
+}; // namespace circ
+
+namespace bounce {
+static real_t out(real_t t, real_t b, real_t c, real_t d) {
+ t /= d;
+
+ if (t < (1 / 2.75f)) {
+ return c * (7.5625f * t * t) + b;
+ }
+
+ if (t < (2 / 2.75f)) {
+ t -= 1.5f / 2.75f;
+ return c * (7.5625f * t * t + 0.75f) + b;
+ }
+
+ if (t < (2.5 / 2.75)) {
+ t -= 2.25f / 2.75f;
+ return c * (7.5625f * t * t + 0.9375f) + b;
+ }
+
+ t -= 2.625f / 2.75f;
+ return c * (7.5625f * t * t + 0.984375f) + b;
+}
+
+static real_t in(real_t t, real_t b, real_t c, real_t d) {
+ return c - out(d - t, 0, c, d) + b;
+}
+
+static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
+ if (t < d / 2) {
+ return in(t * 2, b, c / 2, d);
+ }
+ return out(t * 2 - d, b + c / 2, c / 2, d);
+}
+
+static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
+ if (t < d / 2) {
+ return out(t * 2, b, c / 2, d);
+ }
+ return in(t * 2 - d, b + c / 2, c / 2, d);
+}
+}; // namespace bounce
+
+namespace back {
+static real_t in(real_t t, real_t b, real_t c, real_t d) {
+ float s = 1.70158f;
+ t /= d;
+
+ return c * t * t * ((s + 1) * t - s) + b;
+}
+
+static real_t out(real_t t, real_t b, real_t c, real_t d) {
+ float s = 1.70158f;
+ t = t / d - 1;
+
+ return c * (t * t * ((s + 1) * t + s) + 1) + b;
+}
+
+static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
+ float s = 1.70158f * 1.525f;
+ t /= d / 2;
+
+ if (t < 1) {
+ return c / 2 * (t * t * ((s + 1) * t - s)) + b;
+ }
+
+ t -= 2;
+ return c / 2 * (t * t * ((s + 1) * t + s) + 2) + b;
+}
+
+static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
+ if (t < d / 2) {
+ return out(t * 2, b, c / 2, d);
+ }
+ return in(t * 2 - d, b + c / 2, c / 2, d);
+}
+}; // namespace back
+
+#endif
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index 542011618d..c43b83747b 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -30,12 +30,31 @@
#include "tween.h"
+#include "scene/animation/easing_equations.h"
#include "scene/main/node.h"
+Tween::interpolater Tween::interpolaters[Tween::TRANS_MAX][Tween::EASE_MAX] = {
+ { &linear::in, &linear::in, &linear::in, &linear::in }, // Linear is the same for each easing.
+ { &sine::in, &sine::out, &sine::in_out, &sine::out_in },
+ { &quint::in, &quint::out, &quint::in_out, &quint::out_in },
+ { &quart::in, &quart::out, &quart::in_out, &quart::out_in },
+ { &quad::in, &quad::out, &quad::in_out, &quad::out_in },
+ { &expo::in, &expo::out, &expo::in_out, &expo::out_in },
+ { &elastic::in, &elastic::out, &elastic::in_out, &elastic::out_in },
+ { &cubic::in, &cubic::out, &cubic::in_out, &cubic::out_in },
+ { &circ::in, &circ::out, &circ::in_out, &circ::out_in },
+ { &bounce::in, &bounce::out, &bounce::in_out, &bounce::out_in },
+ { &back::in, &back::out, &back::in_out, &back::out_in },
+};
+
void Tweener::set_tween(Ref<Tween> p_tween) {
tween = p_tween;
}
+void Tweener::clear_tween() {
+ tween.unref();
+}
+
void Tweener::_bind_methods() {
ADD_SIGNAL(MethodInfo("finished"));
}
@@ -53,16 +72,21 @@ void Tween::start_tweeners() {
Ref<PropertyTweener> Tween::tween_property(Object *p_target, NodePath p_property, Variant p_to, float p_duration) {
ERR_FAIL_NULL_V(p_target, nullptr);
- ERR_FAIL_COND_V_MSG(invalid, nullptr, "Tween was created outside the scene tree, can't use Tweeners.");
+ ERR_FAIL_COND_V_MSG(!valid, nullptr, "Tween invalid. Either finished or created outside scene tree.");
ERR_FAIL_COND_V_MSG(started, nullptr, "Can't append to a Tween that has started. Use stop() first.");
+#ifdef DEBUG_ENABLED
+ Variant::Type property_type = p_target->get_indexed(p_property.get_as_property_path().get_subnames()).get_type();
+ ERR_FAIL_COND_V_MSG(property_type != p_to.get_type(), Ref<PropertyTweener>(), "Type mismatch between property and final value: " + Variant::get_type_name(property_type) + " and " + Variant::get_type_name(p_to.get_type()));
+#endif
+
Ref<PropertyTweener> tweener = memnew(PropertyTweener(p_target, p_property, p_to, p_duration));
append(tweener);
return tweener;
}
Ref<IntervalTweener> Tween::tween_interval(float p_time) {
- ERR_FAIL_COND_V_MSG(invalid, nullptr, "Tween was created outside the scene tree, can't use Tweeners.");
+ ERR_FAIL_COND_V_MSG(!valid, nullptr, "Tween invalid. Either finished or created outside scene tree.");
ERR_FAIL_COND_V_MSG(started, nullptr, "Can't append to a Tween that has started. Use stop() first.");
Ref<IntervalTweener> tweener = memnew(IntervalTweener(p_time));
@@ -71,7 +95,7 @@ Ref<IntervalTweener> Tween::tween_interval(float p_time) {
}
Ref<CallbackTweener> Tween::tween_callback(Callable p_callback) {
- ERR_FAIL_COND_V_MSG(invalid, nullptr, "Tween was created outside the scene tree, can't use Tweeners.");
+ ERR_FAIL_COND_V_MSG(!valid, nullptr, "Tween invalid. Either finished or created outside scene tree.");
ERR_FAIL_COND_V_MSG(started, nullptr, "Can't append to a Tween that has started. Use stop() first.");
Ref<CallbackTweener> tweener = memnew(CallbackTweener(p_callback));
@@ -79,8 +103,8 @@ Ref<CallbackTweener> Tween::tween_callback(Callable p_callback) {
return tweener;
}
-Ref<MethodTweener> Tween::tween_method(Callable p_callback, float p_from, float p_to, float p_duration) {
- ERR_FAIL_COND_V_MSG(invalid, nullptr, "Tween was created outside the scene tree, can't use Tweeners.");
+Ref<MethodTweener> Tween::tween_method(Callable p_callback, Variant p_from, Variant p_to, float p_duration) {
+ ERR_FAIL_COND_V_MSG(!valid, nullptr, "Tween invalid. Either finished or created outside scene tree.");
ERR_FAIL_COND_V_MSG(started, nullptr, "Can't append to a Tween that has started. Use stop() first.");
Ref<MethodTweener> tweener = memnew(MethodTweener(p_callback, p_from, p_to, p_duration));
@@ -88,9 +112,7 @@ Ref<MethodTweener> Tween::tween_method(Callable p_callback, float p_from, float
return tweener;
}
-Ref<Tween> Tween::append(Ref<Tweener> p_tweener) {
- ERR_FAIL_COND_V_MSG(invalid, nullptr, "Tween was created outside the scene tree, can't use Tweeners.");
- ERR_FAIL_COND_V_MSG(started, nullptr, "Can't append to a Tween that has started. Use stop() first.");
+void Tween::append(Ref<Tweener> p_tweener) {
p_tweener->set_tween(this);
if (parallel_enabled) {
@@ -102,8 +124,6 @@ Ref<Tween> Tween::append(Ref<Tweener> p_tweener) {
tweeners.resize(current_step + 1);
tweeners.write[current_step].push_back(p_tweener);
-
- return this;
}
void Tween::stop() {
@@ -117,7 +137,7 @@ void Tween::pause() {
}
void Tween::play() {
- ERR_FAIL_COND_MSG(invalid, "Tween invalid, can't play.");
+ ERR_FAIL_COND_MSG(!valid, "Tween invalid. Either finished or created outside scene tree.");
ERR_FAIL_COND_MSG(dead, "Can't play finished Tween, use stop() first to reset its state.");
running = true;
}
@@ -132,11 +152,22 @@ bool Tween::is_running() {
}
void Tween::set_valid(bool p_valid) {
- invalid = !p_valid;
+ valid = p_valid;
}
bool Tween::is_valid() {
- return invalid;
+ return valid;
+}
+
+void Tween::clear() {
+ valid = false;
+
+ for (List<Ref<Tweener>> &step : tweeners) {
+ for (Ref<Tweener> &tweener : step) {
+ tweener->clear_tween();
+ }
+ }
+ tweeners.clear();
}
Ref<Tween> Tween::bind_node(Node *p_node) {
@@ -301,6 +332,16 @@ bool Tween::should_pause() {
return pause_mode != TWEEN_PAUSE_PROCESS;
}
+real_t Tween::run_equation(TransitionType p_trans_type, EaseType p_ease_type, real_t p_time, real_t p_initial, real_t p_delta, real_t p_duration) {
+ if (p_duration == 0) {
+ // Special case to avoid dividing by 0 in equations.
+ return p_initial + p_delta;
+ }
+
+ interpolater func = interpolaters[p_trans_type][p_ease_type];
+ return func(p_time, p_initial, p_delta, p_duration);
+}
+
Variant Tween::interpolate_variant(Variant p_initial_val, Variant p_delta_val, float p_time, float p_duration, TransitionType p_trans, EaseType p_ease) {
ERR_FAIL_INDEX_V(p_trans, TransitionType::TRANS_MAX, Variant());
ERR_FAIL_INDEX_V(p_ease, EaseType::EASE_MAX, Variant());
@@ -485,6 +526,8 @@ Variant Tween::interpolate_variant(Variant p_initial_val, Variant p_delta_val, f
}
Variant Tween::calculate_delta_value(Variant p_intial_val, Variant p_final_val) {
+ ERR_FAIL_COND_V_MSG(p_intial_val.get_type() != p_final_val.get_type(), p_intial_val, "Type mismatch between initial and final value: " + Variant::get_type_name(p_intial_val.get_type()) + " and " + Variant::get_type_name(p_final_val.get_type()));
+
switch (p_intial_val.get_type()) {
case Variant::BOOL: {
return (int)p_final_val - (int)p_intial_val;
@@ -877,7 +920,7 @@ void MethodTweener::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_ease", "ease"), &MethodTweener::set_ease);
}
-MethodTweener::MethodTweener(Callable p_callback, float p_from, float p_to, float p_duration) {
+MethodTweener::MethodTweener(Callable p_callback, Variant p_from, Variant p_to, float p_duration) {
callback = p_callback;
initial_val = p_from;
delta_val = tween->calculate_delta_value(p_from, p_to);
diff --git a/scene/animation/tween.h b/scene/animation/tween.h
index 947cdb7c2d..6a48d332b8 100644
--- a/scene/animation/tween.h
+++ b/scene/animation/tween.h
@@ -43,6 +43,7 @@ public:
virtual void set_tween(Ref<Tween> p_tween);
virtual void start() = 0;
virtual bool step(float &r_delta) = 0;
+ void clear_tween();
protected:
static void _bind_methods();
@@ -111,7 +112,7 @@ private:
bool started = false;
bool running = true;
bool dead = false;
- bool invalid = true;
+ bool valid = false;
bool default_parallel = false;
bool parallel_enabled = false;
@@ -127,8 +128,8 @@ public:
Ref<PropertyTweener> tween_property(Object *p_target, NodePath p_property, Variant p_to, float p_duration);
Ref<IntervalTweener> tween_interval(float p_time);
Ref<CallbackTweener> tween_callback(Callable p_callback);
- Ref<MethodTweener> tween_method(Callable p_callback, float p_from, float p_to, float p_duration);
- Ref<Tween> append(Ref<Tweener> p_tweener);
+ Ref<MethodTweener> tween_method(Callable p_callback, Variant p_from, Variant p_to, float p_duration);
+ void append(Ref<Tweener> p_tweener);
bool custom_step(float p_delta);
void stop();
@@ -139,6 +140,7 @@ public:
bool is_running();
void set_valid(bool p_valid);
bool is_valid();
+ void clear();
Ref<Tween> bind_node(Node *p_node);
Ref<Tween> set_process_mode(TweenProcessMode p_mode);
@@ -256,7 +258,7 @@ public:
void start() override;
bool step(float &r_delta) override;
- MethodTweener(Callable p_callback, float p_from, float p_to, float p_duration);
+ MethodTweener(Callable p_callback, Variant p_from, Variant p_to, float p_duration);
MethodTweener();
protected:
diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp
index 298d75b668..0334ba667b 100644
--- a/scene/audio/audio_stream_player.cpp
+++ b/scene/audio/audio_stream_player.cpp
@@ -31,127 +31,40 @@
#include "audio_stream_player.h"
#include "core/config/engine.h"
-
-void AudioStreamPlayer::_mix_to_bus(const AudioFrame *p_frames, int p_amount) {
- int bus_index = AudioServer::get_singleton()->thread_find_bus_index(bus);
-
- AudioFrame *targets[4] = { nullptr, nullptr, nullptr, nullptr };
-
- if (AudioServer::get_singleton()->get_speaker_mode() == AudioServer::SPEAKER_MODE_STEREO) {
- targets[0] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(bus_index, 0);
- } else {
- switch (mix_target) {
- case MIX_TARGET_STEREO: {
- targets[0] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(bus_index, 0);
- } break;
- case MIX_TARGET_SURROUND: {
- for (int i = 0; i < AudioServer::get_singleton()->get_channel_count(); i++) {
- targets[i] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(bus_index, i);
- }
- } break;
- case MIX_TARGET_CENTER: {
- targets[0] = AudioServer::get_singleton()->thread_get_channel_mix_buffer(bus_index, 1);
- } break;
- }
- }
-
- for (int c = 0; c < 4; c++) {
- if (!targets[c]) {
- break;
- }
- for (int i = 0; i < p_amount; i++) {
- targets[c][i] += p_frames[i];
- }
- }
-}
-
-void AudioStreamPlayer::_mix_internal(bool p_fadeout) {
- //get data
- AudioFrame *buffer = mix_buffer.ptrw();
- int buffer_size = mix_buffer.size();
-
- if (p_fadeout) {
- // Short fadeout ramp
- buffer_size = MIN(buffer_size, 128);
- }
-
- stream_playback->mix(buffer, pitch_scale, buffer_size);
-
- //multiply volume interpolating to avoid clicks if this changes
- float target_volume = p_fadeout ? -80.0 : volume_db;
- float vol = Math::db2linear(mix_volume_db);
- float vol_inc = (Math::db2linear(target_volume) - vol) / float(buffer_size);
-
- for (int i = 0; i < buffer_size; i++) {
- buffer[i] *= vol;
- vol += vol_inc;
- }
-
- //set volume for next mix
- mix_volume_db = target_volume;
-
- _mix_to_bus(buffer, buffer_size);
-}
-
-void AudioStreamPlayer::_mix_audio() {
- if (use_fadeout) {
- _mix_to_bus(fadeout_buffer.ptr(), fadeout_buffer.size());
- use_fadeout = false;
- }
-
- if (!stream_playback.is_valid() || !active.is_set() ||
- (stream_paused && !stream_paused_fade)) {
- return;
- }
-
- if (stream_paused) {
- if (stream_paused_fade && stream_playback->is_playing()) {
- _mix_internal(true);
- stream_paused_fade = false;
- }
- return;
- }
-
- if (setstop.is_set()) {
- _mix_internal(true);
- stream_playback->stop();
- setstop.clear();
- }
-
- if (setseek.get() >= 0.0 && !stop_has_priority.is_set()) {
- if (stream_playback->is_playing()) {
- //fade out to avoid pops
- _mix_internal(true);
- }
-
- stream_playback->start(setseek.get());
- setseek.set(-1.0); //reset seek
- mix_volume_db = volume_db; //reset ramp
- }
-
- stop_has_priority.clear();
-
- _mix_internal(false);
-}
+#include "core/math/audio_frame.h"
+#include "servers/audio_server.h"
void AudioStreamPlayer::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- AudioServer::get_singleton()->add_callback(_mix_audios, this);
if (autoplay && !Engine::get_singleton()->is_editor_hint()) {
play();
}
}
if (p_what == NOTIFICATION_INTERNAL_PROCESS) {
- if (!active.is_set() || (setseek.get() < 0 && !stream_playback->is_playing())) {
+ Vector<Ref<AudioStreamPlayback>> playbacks_to_remove;
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ if (playback.is_valid() && !AudioServer::get_singleton()->is_playback_active(playback) && !AudioServer::get_singleton()->is_playback_paused(playback)) {
+ emit_signal(SNAME("finished"));
+ playbacks_to_remove.push_back(playback);
+ }
+ }
+ // Now go through and remove playbacks that have finished. Removing elements from a Vector in a range based for is asking for trouble.
+ for (Ref<AudioStreamPlayback> &playback : playbacks_to_remove) {
+ stream_playbacks.erase(playback);
+ }
+ if (!playbacks_to_remove.is_empty() && stream_playbacks.is_empty()) {
+ // This node is no longer actively playing audio.
active.clear();
set_process_internal(false);
- emit_signal(SNAME("finished"));
}
}
if (p_what == NOTIFICATION_EXIT_TREE) {
- AudioServer::get_singleton()->remove_callback(_mix_audios, this);
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->stop_playback_stream(playback);
+ }
+ stream_playbacks.clear();
}
if (p_what == NOTIFICATION_PAUSED) {
@@ -167,50 +80,8 @@ void AudioStreamPlayer::_notification(int p_what) {
}
void AudioStreamPlayer::set_stream(Ref<AudioStream> p_stream) {
- AudioServer::get_singleton()->lock();
-
- if (active.is_set() && stream_playback.is_valid() && !stream_paused) {
- //changing streams out of the blue is not a great idea, but at least
- //let's try to somehow avoid a click
-
- AudioFrame *buffer = fadeout_buffer.ptrw();
- int buffer_size = fadeout_buffer.size();
-
- stream_playback->mix(buffer, pitch_scale, buffer_size);
-
- //multiply volume interpolating to avoid clicks if this changes
- float target_volume = -80.0;
- float vol = Math::db2linear(mix_volume_db);
- float vol_inc = (Math::db2linear(target_volume) - vol) / float(buffer_size);
-
- for (int i = 0; i < buffer_size; i++) {
- buffer[i] *= vol;
- vol += vol_inc;
- }
-
- use_fadeout = true;
- }
-
- mix_buffer.resize(AudioServer::get_singleton()->thread_get_mix_buffer_size());
-
- if (stream_playback.is_valid()) {
- stream_playback.unref();
- stream.unref();
- active.clear();
- setseek.set(-1);
- setstop.clear();
- }
-
- if (p_stream.is_valid()) {
- stream = p_stream;
- stream_playback = p_stream->instance_playback();
- }
-
- AudioServer::get_singleton()->unlock();
-
- if (p_stream.is_valid() && stream_playback.is_null()) {
- stream.unref();
- }
+ stop();
+ stream = p_stream;
}
Ref<AudioStream> AudioStreamPlayer::get_stream() const {
@@ -219,6 +90,11 @@ Ref<AudioStream> AudioStreamPlayer::get_stream() const {
void AudioStreamPlayer::set_volume_db(float p_volume) {
volume_db = p_volume;
+
+ Vector<AudioFrame> volume_vector = _get_volume_vector();
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->set_playback_all_bus_volumes_linear(playback, volume_vector);
+ }
}
float AudioStreamPlayer::get_volume_db() const {
@@ -228,69 +104,94 @@ float AudioStreamPlayer::get_volume_db() const {
void AudioStreamPlayer::set_pitch_scale(float p_pitch_scale) {
ERR_FAIL_COND(p_pitch_scale <= 0.0);
pitch_scale = p_pitch_scale;
+
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->set_playback_pitch_scale(playback, pitch_scale);
+ }
}
float AudioStreamPlayer::get_pitch_scale() const {
return pitch_scale;
}
+void AudioStreamPlayer::set_max_polyphony(int p_max_polyphony) {
+ if (p_max_polyphony > 0) {
+ max_polyphony = p_max_polyphony;
+ }
+}
+
+int AudioStreamPlayer::get_max_polyphony() const {
+ return max_polyphony;
+}
+
void AudioStreamPlayer::play(float p_from_pos) {
- if (stream_playback.is_valid()) {
- //mix_volume_db = volume_db; do not reset volume ramp here, can cause clicks
- setseek.set(p_from_pos);
- stop_has_priority.clear();
- active.set();
- set_process_internal(true);
+ if (stream.is_null()) {
+ return;
+ }
+ ERR_FAIL_COND_MSG(!is_inside_tree(), "Playback can only happen when a node is inside the scene tree");
+ if (stream->is_monophonic() && is_playing()) {
+ stop();
+ }
+ Ref<AudioStreamPlayback> stream_playback = stream->instance_playback();
+ ERR_FAIL_COND_MSG(stream_playback.is_null(), "Failed to instantiate playback.");
+
+ AudioServer::get_singleton()->start_playback_stream(stream_playback, bus, _get_volume_vector(), p_from_pos);
+ stream_playbacks.push_back(stream_playback);
+ active.set();
+ set_process_internal(true);
+ while (stream_playbacks.size() > max_polyphony) {
+ AudioServer::get_singleton()->stop_playback_stream(stream_playbacks[0]);
+ stream_playbacks.remove(0);
}
}
void AudioStreamPlayer::seek(float p_seconds) {
- if (stream_playback.is_valid()) {
- setseek.set(p_seconds);
+ if (is_playing()) {
+ stop();
+ play(p_seconds);
}
}
void AudioStreamPlayer::stop() {
- if (stream_playback.is_valid() && active.is_set()) {
- setstop.set();
- stop_has_priority.set();
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->stop_playback_stream(playback);
}
+ stream_playbacks.clear();
+ active.clear();
+ set_process_internal(false);
}
bool AudioStreamPlayer::is_playing() const {
- if (stream_playback.is_valid()) {
- return active.is_set() && !setstop.is_set(); //&& stream_playback->is_playing();
+ for (const Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ if (AudioServer::get_singleton()->is_playback_active(playback)) {
+ return true;
+ }
}
-
return false;
}
float AudioStreamPlayer::get_playback_position() {
- if (stream_playback.is_valid()) {
- float ss = setseek.get();
- if (ss >= 0.0) {
- return ss;
- }
- return stream_playback->get_playback_position();
+ // Return the playback position of the most recently started playback stream.
+ if (!stream_playbacks.is_empty()) {
+ return AudioServer::get_singleton()->get_playback_position(stream_playbacks[stream_playbacks.size() - 1]);
}
-
return 0;
}
void AudioStreamPlayer::set_bus(const StringName &p_bus) {
- //if audio is active, must lock this
- AudioServer::get_singleton()->lock();
bus = p_bus;
- AudioServer::get_singleton()->unlock();
+ for (const Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->set_playback_bus_exclusive(playback, p_bus, _get_volume_vector());
+ }
}
StringName AudioStreamPlayer::get_bus() const {
for (int i = 0; i < AudioServer::get_singleton()->get_bus_count(); i++) {
- if (AudioServer::get_singleton()->get_bus_name(i) == bus) {
+ if (AudioServer::get_singleton()->get_bus_name(i) == String(bus)) {
return bus;
}
}
- return "Master";
+ return SNAME("Master");
}
void AudioStreamPlayer::set_autoplay(bool p_enable) {
@@ -318,18 +219,64 @@ void AudioStreamPlayer::_set_playing(bool p_enable) {
}
bool AudioStreamPlayer::_is_active() const {
- return active.is_set();
+ for (const Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ if (AudioServer::get_singleton()->is_playback_active(playback)) {
+ return true;
+ }
+ }
+ return false;
}
void AudioStreamPlayer::set_stream_paused(bool p_pause) {
- if (p_pause != stream_paused) {
- stream_paused = p_pause;
- stream_paused_fade = p_pause;
+ // TODO this does not have perfect recall, fix that maybe? If there are zero playbacks registered with the AudioServer, this bool isn't persisted.
+ for (Ref<AudioStreamPlayback> &playback : stream_playbacks) {
+ AudioServer::get_singleton()->set_playback_paused(playback, p_pause);
}
}
bool AudioStreamPlayer::get_stream_paused() const {
- return stream_paused;
+ // There's currently no way to pause some playback streams but not others. Check the first and don't bother looking at the rest.
+ if (!stream_playbacks.is_empty()) {
+ return AudioServer::get_singleton()->is_playback_paused(stream_playbacks[0]);
+ }
+ return false;
+}
+
+Vector<AudioFrame> AudioStreamPlayer::_get_volume_vector() {
+ Vector<AudioFrame> volume_vector;
+ // We need at most four stereo pairs (for 7.1 systems).
+ volume_vector.resize(4);
+
+ // Initialize the volume vector to zero.
+ for (AudioFrame &channel_volume_db : volume_vector) {
+ channel_volume_db = AudioFrame(0, 0);
+ }
+
+ float volume_linear = Math::db2linear(volume_db);
+
+ // Set the volume vector up according to the speaker mode and mix target.
+ // TODO do we need to scale the volume down when we output to more channels?
+ if (AudioServer::get_singleton()->get_speaker_mode() == AudioServer::SPEAKER_MODE_STEREO) {
+ volume_vector.write[0] = AudioFrame(volume_linear, volume_linear);
+ } else {
+ switch (mix_target) {
+ case MIX_TARGET_STEREO: {
+ volume_vector.write[0] = AudioFrame(volume_linear, volume_linear);
+ } break;
+ case MIX_TARGET_SURROUND: {
+ // TODO Make sure this is right.
+ volume_vector.write[0] = AudioFrame(volume_linear, volume_linear);
+ volume_vector.write[1] = AudioFrame(volume_linear, /* LFE= */ 1.0f);
+ volume_vector.write[2] = AudioFrame(volume_linear, volume_linear);
+ volume_vector.write[3] = AudioFrame(volume_linear, volume_linear);
+ } break;
+ case MIX_TARGET_CENTER: {
+ // TODO Make sure this is right.
+ volume_vector.write[1] = AudioFrame(volume_linear, /* LFE= */ 1.0f);
+ } break;
+ }
+ }
+ return volume_vector;
}
void AudioStreamPlayer::_validate_property(PropertyInfo &property) const {
@@ -352,7 +299,10 @@ void AudioStreamPlayer::_bus_layout_changed() {
}
Ref<AudioStreamPlayback> AudioStreamPlayer::get_stream_playback() {
- return stream_playback;
+ if (!stream_playbacks.is_empty()) {
+ return stream_playbacks[stream_playbacks.size() - 1];
+ }
+ return nullptr;
}
void AudioStreamPlayer::_bind_methods() {
@@ -387,6 +337,9 @@ void AudioStreamPlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_stream_paused", "pause"), &AudioStreamPlayer::set_stream_paused);
ClassDB::bind_method(D_METHOD("get_stream_paused"), &AudioStreamPlayer::get_stream_paused);
+ ClassDB::bind_method(D_METHOD("set_max_polyphony", "max_polyphony"), &AudioStreamPlayer::set_max_polyphony);
+ ClassDB::bind_method(D_METHOD("get_max_polyphony"), &AudioStreamPlayer::get_max_polyphony);
+
ClassDB::bind_method(D_METHOD("get_stream_playback"), &AudioStreamPlayer::get_stream_playback);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream");
@@ -396,6 +349,7 @@ void AudioStreamPlayer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stream_paused", PROPERTY_HINT_NONE, ""), "set_stream_paused", "get_stream_paused");
ADD_PROPERTY(PropertyInfo(Variant::INT, "mix_target", PROPERTY_HINT_ENUM, "Stereo,Surround,Center"), "set_mix_target", "get_mix_target");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "max_polyphony", PROPERTY_HINT_NONE, ""), "set_max_polyphony", "get_max_polyphony");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
ADD_SIGNAL(MethodInfo("finished"));
@@ -406,8 +360,6 @@ void AudioStreamPlayer::_bind_methods() {
}
AudioStreamPlayer::AudioStreamPlayer() {
- fadeout_buffer.resize(512);
-
AudioServer::get_singleton()->connect("bus_layout_changed", callable_mp(this, &AudioStreamPlayer::_bus_layout_changed));
}
diff --git a/scene/audio/audio_stream_player.h b/scene/audio/audio_stream_player.h
index aa8d088be5..7205fce204 100644
--- a/scene/audio/audio_stream_player.h
+++ b/scene/audio/audio_stream_player.h
@@ -46,24 +46,16 @@ public:
};
private:
- Ref<AudioStreamPlayback> stream_playback;
+ Vector<Ref<AudioStreamPlayback>> stream_playbacks;
Ref<AudioStream> stream;
- Vector<AudioFrame> mix_buffer;
- Vector<AudioFrame> fadeout_buffer;
- bool use_fadeout = false;
- SafeNumeric<float> setseek{ -1.0 };
SafeFlag active;
- SafeFlag setstop;
- SafeFlag stop_has_priority;
- float mix_volume_db = 0.0;
float pitch_scale = 1.0;
float volume_db = 0.0;
bool autoplay = false;
- bool stream_paused = false;
- bool stream_paused_fade = false;
- StringName bus;
+ StringName bus = SNAME("Master");
+ int max_polyphony = 1;
MixTarget mix_target = MIX_TARGET_STEREO;
@@ -77,6 +69,8 @@ private:
void _bus_layout_changed();
void _mix_to_bus(const AudioFrame *p_frames, int p_amount);
+ Vector<AudioFrame> _get_volume_vector();
+
protected:
void _validate_property(PropertyInfo &property) const override;
void _notification(int p_what);
@@ -92,6 +86,9 @@ public:
void set_pitch_scale(float p_pitch_scale);
float get_pitch_scale() const;
+ void set_max_polyphony(int p_max_polyphony);
+ int get_max_polyphony() const;
+
void play(float p_from_pos = 0.0);
void seek(float p_seconds);
void stop();
diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp
index df1aece80a..f4e477b613 100644
--- a/scene/debugger/scene_debugger.cpp
+++ b/scene/debugger/scene_debugger.cpp
@@ -88,7 +88,7 @@ Error SceneDebugger::parse_message(void *p_user, const String &p_msg, const Arra
} else if (p_msg == "override_camera_2D:transform") {
ERR_FAIL_COND_V(p_args.size() < 1, ERR_INVALID_DATA);
- Transform2D transform = p_args[1];
+ Transform2D transform = p_args[0];
scene_tree->get_root()->set_canvas_transform_override(transform);
#ifndef _3D_DISABLED
} else if (p_msg == "override_camera_3D:set") {
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index d252a4507c..bef1011364 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -52,7 +52,7 @@ void BaseButton::_unpress_group() {
}
}
-void BaseButton::_gui_input(Ref<InputEvent> p_event) {
+void BaseButton::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (status.disabled) { // no interaction with disabled button
@@ -121,17 +121,13 @@ void BaseButton::_notification(int p_what) {
}
void BaseButton::_pressed() {
- if (get_script_instance()) {
- get_script_instance()->call(SceneStringNames::get_singleton()->_pressed);
- }
+ GDVIRTUAL_CALL(_pressed);
pressed();
emit_signal(SNAME("pressed"));
}
void BaseButton::_toggled(bool p_pressed) {
- if (get_script_instance()) {
- get_script_instance()->call(SceneStringNames::get_singleton()->_toggled, p_pressed);
- }
+ GDVIRTUAL_CALL(_toggled, p_pressed);
toggled(p_pressed);
emit_signal(SNAME("toggled"), p_pressed);
}
@@ -342,7 +338,7 @@ Ref<Shortcut> BaseButton::get_shortcut() const {
return shortcut;
}
-void BaseButton::_unhandled_key_input(Ref<InputEvent> p_event) {
+void BaseButton::unhandled_key_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (!_is_focus_owner_in_shorcut_context()) {
@@ -411,8 +407,6 @@ bool BaseButton::_is_focus_owner_in_shorcut_context() const {
}
void BaseButton::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &BaseButton::_gui_input);
- ClassDB::bind_method(D_METHOD("_unhandled_key_input"), &BaseButton::_unhandled_key_input);
ClassDB::bind_method(D_METHOD("set_pressed", "pressed"), &BaseButton::set_pressed);
ClassDB::bind_method(D_METHOD("is_pressed"), &BaseButton::is_pressed);
ClassDB::bind_method(D_METHOD("set_pressed_no_signal", "pressed"), &BaseButton::set_pressed_no_signal);
@@ -440,8 +434,8 @@ void BaseButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_shortcut_context", "node"), &BaseButton::set_shortcut_context);
ClassDB::bind_method(D_METHOD("get_shortcut_context"), &BaseButton::get_shortcut_context);
- BIND_VMETHOD(MethodInfo("_pressed"));
- BIND_VMETHOD(MethodInfo("_toggled", PropertyInfo(Variant::BOOL, "button_pressed")));
+ GDVIRTUAL_BIND(_pressed);
+ GDVIRTUAL_BIND(_toggled, "button_pressed");
ADD_SIGNAL(MethodInfo("pressed"));
ADD_SIGNAL(MethodInfo("button_up"));
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index d86b35daf0..cd6e78464f 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -75,12 +75,15 @@ protected:
virtual void pressed();
virtual void toggled(bool p_pressed);
static void _bind_methods();
- virtual void _gui_input(Ref<InputEvent> p_event);
- virtual void _unhandled_key_input(Ref<InputEvent> p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
+ virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override;
void _notification(int p_what);
bool _is_focus_owner_in_shorcut_context() const;
+ GDVIRTUAL0(_pressed)
+ GDVIRTUAL1(_toggled, bool)
+
public:
enum DrawMode {
DRAW_NORMAL,
diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp
index a2f1d2b15a..cf2df4e1a2 100644
--- a/scene/gui/box_container.cpp
+++ b/scene/gui/box_container.cpp
@@ -351,11 +351,11 @@ MarginContainer *VBoxContainer::add_margin_child(const String &p_label, Control
Label *l = memnew(Label);
l->set_theme_type_variation("HeaderSmall");
l->set_text(p_label);
- add_child(l);
+ add_child(l, false, INTERNAL_MODE_FRONT);
MarginContainer *mc = memnew(MarginContainer);
mc->add_theme_constant_override("margin_left", 0);
mc->add_child(p_control);
- add_child(mc);
+ add_child(mc, false, INTERNAL_MODE_FRONT);
if (p_expand) {
mc->set_v_size_flags(SIZE_EXPAND_FILL);
}
diff --git a/scene/gui/check_box.cpp b/scene/gui/check_box.cpp
index d93107df2d..411fb2e1f0 100644
--- a/scene/gui/check_box.cpp
+++ b/scene/gui/check_box.cpp
@@ -34,11 +34,13 @@
Size2 CheckBox::get_icon_size() const {
Ref<Texture2D> checked = Control::get_theme_icon(SNAME("checked"));
- Ref<Texture2D> checked_disabled = Control::get_theme_icon(SNAME("checked_disabled"));
Ref<Texture2D> unchecked = Control::get_theme_icon(SNAME("unchecked"));
- Ref<Texture2D> unchecked_disabled = Control::get_theme_icon(SNAME("unchecked_disabled"));
Ref<Texture2D> radio_checked = Control::get_theme_icon(SNAME("radio_checked"));
Ref<Texture2D> radio_unchecked = Control::get_theme_icon(SNAME("radio_unchecked"));
+ Ref<Texture2D> checked_disabled = Control::get_theme_icon(SNAME("checked_disabled"));
+ Ref<Texture2D> unchecked_disabled = Control::get_theme_icon(SNAME("unchecked_disabled"));
+ Ref<Texture2D> radio_checked_disabled = Control::get_theme_icon(SNAME("radio_checked_disabled"));
+ Ref<Texture2D> radio_unchecked_disabled = Control::get_theme_icon(SNAME("radio_unchecked_disabled"));
Size2 tex_size = Size2(0, 0);
if (!checked.is_null()) {
@@ -53,6 +55,18 @@ Size2 CheckBox::get_icon_size() const {
if (!radio_unchecked.is_null()) {
tex_size = Size2(MAX(tex_size.width, radio_unchecked->get_width()), MAX(tex_size.height, radio_unchecked->get_height()));
}
+ if (!checked_disabled.is_null()) {
+ tex_size = Size2(MAX(tex_size.width, checked_disabled->get_width()), MAX(tex_size.height, checked_disabled->get_height()));
+ }
+ if (!unchecked_disabled.is_null()) {
+ tex_size = Size2(MAX(tex_size.width, unchecked_disabled->get_width()), MAX(tex_size.height, unchecked_disabled->get_height()));
+ }
+ if (!radio_checked_disabled.is_null()) {
+ tex_size = Size2(MAX(tex_size.width, radio_checked_disabled->get_width()), MAX(tex_size.height, radio_checked_disabled->get_height()));
+ }
+ if (!radio_unchecked_disabled.is_null()) {
+ tex_size = Size2(MAX(tex_size.width, radio_unchecked_disabled->get_width()), MAX(tex_size.height, radio_unchecked_disabled->get_height()));
+ }
return tex_size;
}
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index 08dd7f28eb..0476a764a5 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -227,17 +227,17 @@ void CodeEdit::_notification(int p_what) {
end = font->get_string_size(line.substr(0, line.rfind(String::chr(0xFFFF))), font_size).x;
}
- Point2 round_ofs = hint_ofs + sb->get_offset() + Vector2(0, font->get_ascent() + font_height * i + yofs);
+ Point2 round_ofs = hint_ofs + sb->get_offset() + Vector2(0, font->get_ascent(font_size) + font_height * i + yofs);
round_ofs = round_ofs.round();
draw_string(font, round_ofs, line.replace(String::chr(0xFFFF), ""), HALIGN_LEFT, -1, font_size, font_color);
if (end > 0) {
// Draw an underline for the currently edited function parameter.
- const Vector2 b = hint_ofs + sb->get_offset() + Vector2(begin, font_height + font_height * i + line_spacing);
+ const Vector2 b = hint_ofs + sb->get_offset() + Vector2(begin, font_height + font_height * i + yofs);
draw_line(b, b + Vector2(end - begin, 0), font_color, 2);
// Draw a translucent text highlight as well.
const Rect2 highlight_rect = Rect2(
- hint_ofs + sb->get_offset() + Vector2(begin, 0),
+ b - Vector2(0, font_height),
Vector2(end - begin, font_height));
draw_rect(highlight_rect, font_color * Color(1, 1, 1, 0.2));
}
@@ -248,7 +248,7 @@ void CodeEdit::_notification(int p_what) {
}
}
-void CodeEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
+void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
Ref<InputEventMouseButton> mb = p_gui_input;
if (mb.is_valid()) {
@@ -296,7 +296,7 @@ void CodeEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
mpos.x = get_size().x - mpos.x;
}
- Point2i pos = get_line_column_at_pos(Point2i(mpos.x, mpos.y));
+ Point2i pos = get_line_column_at_pos(mpos);
int line = pos.y;
int col = pos.x;
@@ -321,7 +321,7 @@ void CodeEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
mpos.x = get_size().x - mpos.x;
}
- Point2i pos = get_line_column_at_pos(Point2i(mpos.x, mpos.y));
+ Point2i pos = get_line_column_at_pos(mpos);
int line = pos.y;
int col = pos.x;
@@ -354,7 +354,7 @@ void CodeEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
Ref<InputEventKey> k = p_gui_input;
bool update_code_completion = false;
if (!k.is_valid()) {
- TextEdit::_gui_input(p_gui_input);
+ TextEdit::gui_input(p_gui_input);
return;
}
@@ -450,7 +450,7 @@ void CodeEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
}
if (k->is_action("ui_text_backspace", true)) {
backspace();
- _filter_code_completion_candidates();
+ _filter_code_completion_candidates_impl();
accept_event();
return;
}
@@ -467,7 +467,7 @@ void CodeEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
}
/* MISC */
- if (k->is_action("ui_cancel", true)) {
+ if (!code_hint.is_empty() && k->is_action("ui_cancel", true)) {
set_code_hint("");
accept_event();
return;
@@ -519,10 +519,10 @@ void CodeEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
set_code_hint("");
}
- TextEdit::_gui_input(p_gui_input);
+ TextEdit::gui_input(p_gui_input);
if (update_code_completion) {
- _filter_code_completion_candidates();
+ _filter_code_completion_candidates_impl();
}
}
@@ -557,7 +557,7 @@ Control::CursorShape CodeEdit::get_cursor_shape(const Point2 &p_pos) const {
/* Text manipulation */
// Overridable actions
-void CodeEdit::_handle_unicode_input(const uint32_t p_unicode) {
+void CodeEdit::_handle_unicode_input_internal(const uint32_t p_unicode) {
bool had_selection = has_selection();
if (had_selection) {
begin_complex_operation();
@@ -609,7 +609,7 @@ void CodeEdit::_handle_unicode_input(const uint32_t p_unicode) {
}
}
-void CodeEdit::_backspace() {
+void CodeEdit::_backspace_internal() {
if (!is_editable()) {
return;
}
@@ -654,7 +654,7 @@ void CodeEdit::_backspace() {
// For space indentation we need to do a simple unindent if there are no chars to the left, acting in the
// same way as tabs.
if (indent_using_spaces && cc != 0) {
- if (get_first_non_whitespace_column(cl) > cc) {
+ if (get_first_non_whitespace_column(cl) >= cc) {
prev_column = cc - _calculate_spaces_till_next_left_indent(cc);
prev_line = cl;
}
@@ -987,10 +987,10 @@ void CodeEdit::_new_line(bool p_split_current_line, bool p_above) {
/* No need to move the brace below if we are not taking the text with us. */
if (p_split_current_line) {
brace_indent = true;
- ins += "\n" + ins.substr(1, ins.length() - 2);
+ ins += "\n" + ins.substr(indent_text.size(), ins.length() - 2);
} else {
brace_indent = false;
- ins = "\n" + ins.substr(1, ins.length() - 2);
+ ins = "\n" + ins.substr(indent_text.size(), ins.length() - 2);
}
}
}
@@ -1146,13 +1146,20 @@ bool CodeEdit::is_drawing_executing_lines_gutter() const {
}
void CodeEdit::_main_gutter_draw_callback(int p_line, int p_gutter, const Rect2 &p_region) {
- if (draw_breakpoints && is_line_breakpointed(p_line)) {
- int padding = p_region.size.x / 6;
+ if (draw_breakpoints) {
+ bool hovering = p_region.has_point(get_local_mouse_pos());
+ bool breakpointed = is_line_breakpointed(p_line);
- Rect2 breakpoint_region = p_region;
- breakpoint_region.position += Point2(padding, padding);
- breakpoint_region.size -= Point2(padding, padding) * 2;
- breakpoint_icon->draw_rect(get_canvas_item(), breakpoint_region, false, breakpoint_color);
+ if (breakpointed || (hovering && !is_dragging_cursor())) {
+ int padding = p_region.size.x / 6;
+ Rect2 icon_region = p_region;
+ icon_region.position += Point2(padding, padding);
+ icon_region.size -= Point2(padding, padding) * 2;
+
+ // Darken icon when hovering & not yet breakpointed.
+ Color use_color = hovering && !breakpointed ? breakpoint_color.darkened(0.4) : breakpoint_color;
+ breakpoint_icon->draw_rect(get_canvas_item(), icon_region, false, use_color);
+ }
}
if (draw_bookmarks && is_line_bookmarked(p_line)) {
@@ -1400,15 +1407,21 @@ void CodeEdit::fold_line(int p_line) {
}
/* Find the last line to be hidden. */
- int end_line = get_line_count();
+ const int line_count = get_line_count() - 1;
+ int end_line = line_count;
int in_comment = is_in_comment(p_line);
int in_string = (in_comment == -1) ? is_in_string(p_line) : -1;
if (in_string != -1 || in_comment != -1) {
end_line = get_delimiter_end_position(p_line, get_line(p_line).size() - 1).y;
- /* End line is the same therefore we have a block. */
+ /* End line is the same therefore we have a block of single line delimiters. */
if (end_line == p_line) {
- for (int i = p_line + 1; i < get_line_count(); i++) {
+ for (int i = p_line + 1; i <= line_count; i++) {
+ if (i == line_count) {
+ end_line = line_count;
+ break;
+ }
+
if ((in_string != -1 && is_in_string(i) == -1) || (in_comment != -1 && is_in_comment(i) == -1)) {
end_line = i - 1;
break;
@@ -1417,14 +1430,27 @@ void CodeEdit::fold_line(int p_line) {
}
} else {
int start_indent = get_indent_level(p_line);
- for (int i = p_line + 1; i < get_line_count(); i++) {
+ for (int i = p_line + 1; i <= line_count; i++) {
if (get_line(p_line).strip_edges().size() == 0 || is_in_string(i) != -1 || is_in_comment(i) != -1) {
end_line = i;
continue;
}
- if (get_indent_level(i) <= start_indent && get_line(i).strip_edges().size() != 0) {
+ if (i == line_count) {
+ /* Do not fold empty last line of script if any */
+ end_line = i;
+ if (get_line(i).strip_edges().size() == 0) {
+ end_line--;
+ }
+ break;
+ }
+
+ if ((get_indent_level(i) <= start_indent && get_line(i).strip_edges().size() != 0)) {
+ /* Keep an empty line unfolded if any */
end_line = i - 1;
+ if (get_line(i - 1).strip_edges().size() == 0 && i - 2 > p_line) {
+ end_line = i - 2;
+ }
break;
}
}
@@ -1603,7 +1629,8 @@ Point2 CodeEdit::get_delimiter_start_position(int p_line, int p_column) const {
}
/* Region was found on this line and is not a multiline continuation. */
- if (start_position.x != -1 && start_position.x != get_line(p_line).length() + 1) {
+ int line_length = get_line(p_line).length();
+ if (start_position.x != -1 && line_length > 0 && start_position.x != line_length + 1) {
start_position.y = p_line;
return start_position;
}
@@ -1622,7 +1649,8 @@ Point2 CodeEdit::get_delimiter_start_position(int p_line, int p_column) const {
start_position.x = delimiter_cache[i].back()->key();
/* Make sure it's not a multiline continuation. */
- if (start_position.x != get_line(i).length() + 1) {
+ line_length = get_line(i).length();
+ if (line_length > 0 && start_position.x != line_length + 1) {
break;
}
}
@@ -1704,14 +1732,17 @@ bool CodeEdit::is_code_completion_enabled() const {
void CodeEdit::set_code_completion_prefixes(const TypedArray<String> &p_prefixes) {
code_completion_prefixes.clear();
for (int i = 0; i < p_prefixes.size(); i++) {
- code_completion_prefixes.insert(p_prefixes[i]);
+ const String prefix = p_prefixes[i];
+
+ ERR_CONTINUE_MSG(prefix.is_empty(), "Code completion prefix cannot be empty.");
+ code_completion_prefixes.insert(prefix[0]);
}
}
TypedArray<String> CodeEdit::get_code_completion_prefixes() const {
TypedArray<String> prefixes;
- for (Set<String>::Element *E = code_completion_prefixes.front(); E; E = E->next()) {
- prefixes.push_back(E->get());
+ for (const Set<char32_t>::Element *E = code_completion_prefixes.front(); E; E = E->next()) {
+ prefixes.push_back(String::chr(E->get()));
}
return prefixes;
}
@@ -1739,9 +1770,7 @@ String CodeEdit::get_text_for_code_completion() const {
}
void CodeEdit::request_code_completion(bool p_force) {
- ScriptInstance *si = get_script_instance();
- if (si && si->has_method("_request_code_completion")) {
- si->call("_request_code_completion", p_force);
+ if (GDVIRTUAL_CALL(_request_code_completion, p_force)) {
return;
}
@@ -1776,9 +1805,9 @@ void CodeEdit::request_code_completion(bool p_force) {
String line = get_line(get_caret_line());
int ofs = CLAMP(get_caret_column(), 0, line.length());
- if (ofs > 0 && (is_in_string(get_caret_line(), ofs) != -1 || _is_char(line[ofs - 1]) || code_completion_prefixes.has(String::chr(line[ofs - 1])))) {
+ if (ofs > 0 && (is_in_string(get_caret_line(), ofs) != -1 || _is_char(line[ofs - 1]) || code_completion_prefixes.has(line[ofs - 1]))) {
emit_signal(SNAME("request_code_completion"));
- } else if (ofs > 1 && line[ofs - 1] == ' ' && code_completion_prefixes.has(String::chr(line[ofs - 2]))) {
+ } else if (ofs > 1 && line[ofs - 1] == ' ' && code_completion_prefixes.has(line[ofs - 2])) {
emit_signal(SNAME("request_code_completion"));
}
}
@@ -1798,7 +1827,7 @@ void CodeEdit::update_code_completion_options(bool p_forced) {
code_completion_forced = p_forced;
code_completion_option_sources = code_completion_option_submitted;
code_completion_option_submitted.clear();
- _filter_code_completion_candidates();
+ _filter_code_completion_candidates_impl();
}
TypedArray<Dictionary> CodeEdit::get_code_completion_options() const {
@@ -1855,11 +1884,10 @@ void CodeEdit::confirm_code_completion(bool p_replace) {
return;
}
- ScriptInstance *si = get_script_instance();
- if (si && si->has_method("_confirm_code_completion")) {
- si->call("_confirm_code_completion", p_replace);
+ if (GDVIRTUAL_CALL(_confirm_code_completion, p_replace)) {
return;
}
+
begin_complex_operation();
int caret_line = get_caret_line();
@@ -1940,7 +1968,7 @@ void CodeEdit::confirm_code_completion(bool p_replace) {
if (pre_brace_pair == -1 && post_brace_pair == -1 && get_caret_column() > 0 && get_caret_column() < get_line(caret_line).length()) {
pre_brace_pair = _get_auto_brace_pair_open_at_pos(caret_line, get_caret_column() + 1);
- if (pre_brace_pair == _get_auto_brace_pair_close_at_pos(caret_line, get_caret_column() - 1)) {
+ if (pre_brace_pair != -1 && pre_brace_pair == _get_auto_brace_pair_close_at_pos(caret_line, get_caret_column() - 1)) {
remove_text(caret_line, get_caret_column() - 2, caret_line, get_caret_column());
if (_get_auto_brace_pair_close_at_pos(caret_line, get_caret_column() - 1) != pre_brace_pair) {
set_caret_column(get_caret_column() - 1);
@@ -1951,7 +1979,7 @@ void CodeEdit::confirm_code_completion(bool p_replace) {
end_complex_operation();
cancel_code_completion();
- if (code_completion_prefixes.has(String::chr(last_completion_char))) {
+ if (code_completion_prefixes.has(last_completion_char)) {
request_code_completion();
}
}
@@ -2016,7 +2044,9 @@ String CodeEdit::get_text_for_symbol_lookup() {
void CodeEdit::set_symbol_lookup_word_as_valid(bool p_valid) {
symbol_lookup_word = p_valid ? symbol_lookup_new_word : "";
symbol_lookup_new_word = "";
- _set_symbol_lookup_word(symbol_lookup_word);
+ if (lookup_symbol_word != symbol_lookup_word) {
+ _set_symbol_lookup_word(symbol_lookup_word);
+ }
}
void CodeEdit::_bind_methods() {
@@ -2179,9 +2209,10 @@ void CodeEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_code_comletion_prefixes"), &CodeEdit::get_code_completion_prefixes);
// Overridable
- BIND_VMETHOD(MethodInfo("_confirm_code_completion", PropertyInfo(Variant::BOOL, "replace")));
- BIND_VMETHOD(MethodInfo("_request_code_completion", PropertyInfo(Variant::BOOL, "force")));
- BIND_VMETHOD(MethodInfo(Variant::ARRAY, "_filter_code_completion_candidates", PropertyInfo(Variant::ARRAY, "candidates")));
+
+ GDVIRTUAL_BIND(_confirm_code_completion, "replace")
+ GDVIRTUAL_BIND(_request_code_completion, "force")
+ GDVIRTUAL_BIND(_filter_code_completion_candidates, "candidates")
/* Line length guidelines */
ClassDB::bind_method(D_METHOD("set_line_length_guidelines", "guideline_columns"), &CodeEdit::set_line_length_guidelines);
@@ -2550,7 +2581,10 @@ int CodeEdit::_is_in_delimiter(int p_line, int p_column, DelimiterType p_type) c
}
void CodeEdit::_add_delimiter(const String &p_start_key, const String &p_end_key, bool p_line_only, DelimiterType p_type) {
- if (p_start_key.length() > 0) {
+ // If we are the editor allow "null" as a valid start key, otherwise users cannot add delimiters via the inspector.
+ if (!(Engine::get_singleton()->is_editor_hint() && p_start_key == "null")) {
+ ERR_FAIL_COND_MSG(p_start_key.is_empty(), "delimiter start key cannot be empty");
+
for (int i = 0; i < p_start_key.length(); i++) {
ERR_FAIL_COND_MSG(!is_symbol(p_start_key[i]), "delimiter must start with a symbol");
}
@@ -2615,7 +2649,11 @@ void CodeEdit::_set_delimiters(const TypedArray<String> &p_delimiters, Delimiter
_clear_delimiters(p_type);
for (int i = 0; i < p_delimiters.size(); i++) {
- String key = p_delimiters[i].is_null() ? "" : p_delimiters[i];
+ String key = p_delimiters[i];
+
+ if (key.is_empty()) {
+ continue;
+ }
const String start_key = key.get_slice(" ", 0);
const String end_key = key.get_slice_count(" ") > 1 ? key.get_slice(" ", 1) : String();
@@ -2650,11 +2688,10 @@ TypedArray<String> CodeEdit::_get_delimiters(DelimiterType p_type) const {
}
/* Code Completion */
-void CodeEdit::_filter_code_completion_candidates() {
- ScriptInstance *si = get_script_instance();
+void CodeEdit::_filter_code_completion_candidates_impl() {
int line_height = get_line_height();
- if (si && si->has_method("_filter_code_completion_candidates")) {
+ if (GDVIRTUAL_IS_OVERRIDDEN(_filter_code_completion_candidates)) {
code_completion_options.clear();
code_completion_base = "";
@@ -2674,7 +2711,9 @@ void CodeEdit::_filter_code_completion_candidates() {
i++;
}
- TypedArray<Dictionary> completion_options = si->call("_filter_code_completion_candidates", completion_options_sources);
+ Array completion_options;
+
+ GDVIRTUAL_CALL(_filter_code_completion_candidates, completion_options_sources, completion_options);
/* No options to complete, cancel. */
if (completion_options.size() == 0) {
@@ -2735,7 +2774,7 @@ void CodeEdit::_filter_code_completion_candidates() {
bool prev_is_word = false;
/* Cancel if we are at the close of a string. */
- if (in_string == -1 && first_quote_col == cofs - 1) {
+ if (caret_column > 0 && in_string == -1 && first_quote_col == cofs - 1) {
cancel_code_completion();
return;
/* In a string, therefore we are trying to complete the string text. */
@@ -2745,7 +2784,7 @@ void CodeEdit::_filter_code_completion_candidates() {
/* If we have a space, previous word might be a keyword. eg "func |". */
} else if (cofs > 0 && line[cofs - 1] == ' ') {
int ofs = cofs - 1;
- while (ofs >= 0 && line[ofs] == ' ') {
+ while (ofs > 0 && line[ofs] == ' ') {
ofs--;
}
prev_is_word = _is_char(line[ofs]);
@@ -2761,9 +2800,9 @@ void CodeEdit::_filter_code_completion_candidates() {
/* If all else fails, check for a prefix. */
/* Single space between caret and prefix is okay. */
bool prev_is_prefix = false;
- if (cofs > 0 && code_completion_prefixes.has(String::chr(line[cofs - 1]))) {
+ if (cofs > 0 && code_completion_prefixes.has(line[cofs - 1])) {
prev_is_prefix = true;
- } else if (cofs > 1 && line[cofs - 1] == ' ' && code_completion_prefixes.has(String::chr(line[cofs - 2]))) {
+ } else if (cofs > 1 && line[cofs - 1] == ' ' && code_completion_prefixes.has(line[cofs - 2])) {
prev_is_prefix = true;
}
diff --git a/scene/gui/code_edit.h b/scene/gui/code_edit.h
index 76ac15f553..d8eccb7d32 100644
--- a/scene/gui/code_edit.h
+++ b/scene/gui/code_edit.h
@@ -214,12 +214,12 @@ private:
int code_completion_longest_line = 0;
Rect2i code_completion_rect;
- Set<String> code_completion_prefixes;
+ Set<char32_t> code_completion_prefixes;
List<ScriptCodeCompletionOption> code_completion_option_submitted;
List<ScriptCodeCompletionOption> code_completion_option_sources;
String code_completion_base;
- void _filter_code_completion_candidates();
+ void _filter_code_completion_candidates_impl();
/* Line length guidelines */
TypedArray<int> line_length_guideline_columns;
@@ -248,7 +248,6 @@ private:
void _text_changed();
protected:
- void _gui_input(const Ref<InputEvent> &p_gui_input) override;
void _notification(int p_what);
static void _bind_methods();
@@ -256,11 +255,16 @@ protected:
/* Text manipulation */
// Overridable actions
- virtual void _handle_unicode_input(const uint32_t p_unicode) override;
- virtual void _backspace() override;
+ virtual void _handle_unicode_input_internal(const uint32_t p_unicode) override;
+ virtual void _backspace_internal() override;
+
+ GDVIRTUAL1(_confirm_code_completion, bool)
+ GDVIRTUAL1(_request_code_completion, bool)
+ GDVIRTUAL1RC(Array, _filter_code_completion_candidates, TypedArray<Dictionary>)
public:
/* General overrides */
+ virtual void gui_input(const Ref<InputEvent> &p_gui_input) override;
virtual CursorShape get_cursor_shape(const Point2 &p_pos = Point2i()) const override;
/* Indent management */
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 261480bcdd..611035fff9 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -46,13 +46,13 @@ void ColorPicker::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
btn_pick->set_icon(get_theme_icon(SNAME("screen_picker"), SNAME("ColorPicker")));
- bt_add_preset->set_icon(get_theme_icon(SNAME("add_preset")));
-
+ btn_add_preset->set_icon(get_theme_icon(SNAME("add_preset")));
+ _update_presets();
_update_controls();
} break;
case NOTIFICATION_ENTER_TREE: {
btn_pick->set_icon(get_theme_icon(SNAME("screen_picker"), SNAME("ColorPicker")));
- bt_add_preset->set_icon(get_theme_icon(SNAME("add_preset")));
+ btn_add_preset->set_icon(get_theme_icon(SNAME("add_preset")));
_update_controls();
_update_color();
@@ -69,7 +69,6 @@ void ColorPicker::_notification(int p_what) {
for (int i = 0; i < preset_cache.size(); i++) {
presets.push_back(preset_cache[i]);
}
- preset->update();
}
#endif
} break;
@@ -98,6 +97,8 @@ Ref<Shader> ColorPicker::circle_shader;
void ColorPicker::init_shaders() {
wheel_shader.instantiate();
wheel_shader->set_code(R"(
+// ColorPicker wheel shader.
+
shader_type canvas_item;
void fragment() {
@@ -120,6 +121,8 @@ void fragment() {
circle_shader.instantiate();
circle_shader->set_code(R"(
+// ColorPicker circle shader.
+
shader_type canvas_item;
uniform float v = 1.0;
@@ -372,22 +375,23 @@ void ColorPicker::_update_color(bool p_update_sliders) {
}
void ColorPicker::_update_presets() {
- return;
- //presets should be shown using buttons or something else, this method is not a good idea
-
- presets_per_row = 10;
- Size2 size = bt_add_preset->get_size();
- Size2 preset_size = Size2(MIN(size.width * presets.size(), presets_per_row * size.width), size.height * (Math::ceil((float)presets.size() / presets_per_row)));
- preset->set_custom_minimum_size(preset_size);
- preset_container->set_custom_minimum_size(preset_size);
- preset->draw_rect(Rect2(Point2(), preset_size), Color(1, 1, 1, 0));
-
- for (int i = 0; i < presets.size(); i++) {
- int x = (i % presets_per_row) * size.width;
- int y = (Math::floor((float)i / presets_per_row)) * size.height;
- preset->draw_rect(Rect2(Point2(x, y), size), presets[i]);
+ int preset_size = _get_preset_size();
+ // Only update the preset button size if it has changed.
+ if (preset_size != prev_preset_size) {
+ prev_preset_size = preset_size;
+ btn_add_preset->set_custom_minimum_size(Size2(preset_size, preset_size));
+ for (int i = 1; i < preset_container->get_child_count(); i++) {
+ ColorPresetButton *cpb = Object::cast_to<ColorPresetButton>(preset_container->get_child(i));
+ cpb->set_custom_minimum_size(Size2(preset_size, preset_size));
+ }
+ }
+ // Only load preset buttons when the only child is the add-preset button.
+ if (preset_container->get_child_count() == 1) {
+ for (int i = 0; i < preset_cache.size(); i++) {
+ _add_preset_button(preset_size, preset_cache[i]);
+ }
+ _notification(NOTIFICATION_VISIBILITY_CHANGED);
}
- _notification(NOTIFICATION_VISIBILITY_CHANGED);
}
void ColorPicker::_text_type_toggled() {
@@ -422,14 +426,37 @@ ColorPicker::PickerShapeType ColorPicker::get_picker_shape() const {
return picker_type;
}
+inline int ColorPicker::_get_preset_size() {
+ return (int(get_minimum_size().width) - (preset_container->get_theme_constant(SNAME("hseparation")) * (preset_column_count - 1))) / preset_column_count;
+}
+
+void ColorPicker::_add_preset_button(int p_size, const Color &p_color) {
+ ColorPresetButton *btn_preset = memnew(ColorPresetButton(p_color));
+ btn_preset->set_preset_color(p_color);
+ btn_preset->set_custom_minimum_size(Size2(p_size, p_size));
+ btn_preset->connect("gui_input", callable_mp(this, &ColorPicker::_preset_input), varray(p_color));
+ btn_preset->set_tooltip(vformat(RTR("Color: #%s\nLMB: Apply color\nRMB: Remove preset"), p_color.to_html(p_color.a < 1)));
+ preset_container->add_child(btn_preset);
+}
+
void ColorPicker::add_preset(const Color &p_color) {
if (presets.find(p_color)) {
presets.move_to_back(presets.find(p_color));
+
+ // Find button to move to the end.
+ for (int i = 1; i < preset_container->get_child_count(); i++) {
+ ColorPresetButton *current_btn = Object::cast_to<ColorPresetButton>(preset_container->get_child(i));
+ if (current_btn && p_color == current_btn->get_preset_color()) {
+ preset_container->move_child(current_btn, preset_container->get_child_count() - 1);
+ break;
+ }
+ }
} else {
presets.push_back(p_color);
preset_cache.push_back(p_color);
+
+ _add_preset_button(_get_preset_size(), p_color);
}
- preset->update();
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
@@ -443,7 +470,15 @@ void ColorPicker::erase_preset(const Color &p_color) {
if (presets.find(p_color)) {
presets.erase(presets.find(p_color));
preset_cache.erase(preset_cache.find(p_color));
- preset->update();
+
+ // Find preset button to remove.
+ for (int i = 1; i < preset_container->get_child_count(); i++) {
+ ColorPresetButton *current_btn = Object::cast_to<ColorPresetButton>(preset_container->get_child(i));
+ if (current_btn && p_color == current_btn->get_preset_color()) {
+ current_btn->queue_delete();
+ break;
+ }
+ }
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
@@ -560,7 +595,7 @@ void ColorPicker::_sample_draw() {
const Rect2 rect_old = Rect2(Point2(), Size2(sample->get_size().width * 0.5, sample->get_size().height * 0.95));
if (display_old_color && old_color.a < 1.0) {
- sample->draw_texture_rect(get_theme_icon(SNAME("preset_bg"), SNAME("ColorPicker")), rect_old, true);
+ sample->draw_texture_rect(get_theme_icon(SNAME("sample_bg"), SNAME("ColorPicker")), rect_old, true);
}
sample->draw_rect(rect_old, old_color);
@@ -574,7 +609,7 @@ void ColorPicker::_sample_draw() {
}
if (color.a < 1.0) {
- sample->draw_texture_rect(get_theme_icon(SNAME("preset_bg"), SNAME("ColorPicker")), rect_new, true);
+ sample->draw_texture_rect(get_theme_icon(SNAME("sample_bg"), SNAME("ColorPicker")), rect_new, true);
}
sample->draw_rect(rect_new, color);
@@ -734,7 +769,7 @@ void ColorPicker::_slider_draw(int p_which) {
#endif
if (p_which == 3) {
- scroll[p_which]->draw_texture_rect(get_theme_icon(SNAME("preset_bg"), SNAME("ColorPicker")), Rect2(Point2(0, margin), Size2(size.x, margin)), true);
+ scroll[p_which]->draw_texture_rect(get_theme_icon(SNAME("sample_bg"), SNAME("ColorPicker")), Rect2(Point2(0, margin), Size2(size.x, margin)), true);
left_color = color;
left_color.a = 0;
@@ -792,7 +827,7 @@ void ColorPicker::_uv_input(const Ref<InputEvent> &p_event, Control *c) {
real_t dist = center.distance_to(bev->get_position());
if (dist <= center.x) {
- real_t rad = Math::atan2(bev->get_position().y - center.y, bev->get_position().x - center.x);
+ real_t rad = bev->get_position().angle_to_point(center);
h = ((rad >= 0) ? rad : (Math_TAU + rad)) / Math_TAU;
s = CLAMP(dist / center.x, 0, 1);
} else {
@@ -809,7 +844,7 @@ void ColorPicker::_uv_input(const Ref<InputEvent> &p_event, Control *c) {
real_t dist = center.distance_to(bev->get_position());
if (dist >= center.x * 0.84 && dist <= center.x) {
- real_t rad = Math::atan2(bev->get_position().y - center.y, bev->get_position().x - center.x);
+ real_t rad = bev->get_position().angle_to_point(center);
h = ((rad >= 0) ? rad : (Math_TAU + rad)) / Math_TAU;
spinning = true;
} else {
@@ -854,12 +889,12 @@ void ColorPicker::_uv_input(const Ref<InputEvent> &p_event, Control *c) {
Vector2 center = c->get_size() / 2.0;
if (picker_type == SHAPE_VHS_CIRCLE) {
real_t dist = center.distance_to(mev->get_position());
- real_t rad = Math::atan2(mev->get_position().y - center.y, mev->get_position().x - center.x);
+ real_t rad = mev->get_position().angle_to_point(center);
h = ((rad >= 0) ? rad : (Math_TAU + rad)) / Math_TAU;
s = CLAMP(dist / center.x, 0, 1);
} else {
if (spinning) {
- real_t rad = Math::atan2(mev->get_position().y - center.y, mev->get_position().x - center.x);
+ real_t rad = mev->get_position().angle_to_point(center);
h = ((rad >= 0) ? rad : (Math_TAU + rad)) / Math_TAU;
} else {
real_t corner_x = (c == wheel_uv) ? center.x - Math_SQRT12 * c->get_size().width * 0.42 : 0;
@@ -932,42 +967,18 @@ void ColorPicker::_w_input(const Ref<InputEvent> &p_event) {
}
}
-void ColorPicker::_preset_input(const Ref<InputEvent> &p_event) {
+void ColorPicker::_preset_input(const Ref<InputEvent> &p_event, const Color &p_color) {
Ref<InputEventMouseButton> bev = p_event;
if (bev.is_valid()) {
- int index = 0;
if (bev->is_pressed() && bev->get_button_index() == MOUSE_BUTTON_LEFT) {
- for (int i = 0; i < presets.size(); i++) {
- int x = (i % presets_per_row) * bt_add_preset->get_size().x;
- int y = (Math::floor((float)i / presets_per_row)) * bt_add_preset->get_size().y;
- if (bev->get_position().x > x && bev->get_position().x < x + preset->get_size().x && bev->get_position().y > y && bev->get_position().y < y + preset->get_size().y) {
- index = i;
- }
- }
- set_pick_color(presets[index]);
+ set_pick_color(p_color);
_update_color();
- emit_signal(SNAME("color_changed"), color);
+ emit_signal(SNAME("color_changed"), p_color);
} else if (bev->is_pressed() && bev->get_button_index() == MOUSE_BUTTON_RIGHT && presets_enabled) {
- index = bev->get_position().x / (preset->get_size().x / presets.size());
- Color clicked_preset = presets[index];
- erase_preset(clicked_preset);
- emit_signal(SNAME("preset_removed"), clicked_preset);
- bt_add_preset->show();
- }
- }
-
- Ref<InputEventMouseMotion> mev = p_event;
-
- if (mev.is_valid()) {
- int index = mev->get_position().x * presets.size();
- if (preset->get_size().x != 0) {
- index /= preset->get_size().x;
- }
- if (index < 0 || index >= presets.size()) {
- return;
+ erase_preset(p_color);
+ emit_signal(SNAME("preset_removed"), p_color);
}
- preset->set_tooltip(vformat(RTR("Color: #%s\nLMB: Set color\nRMB: Remove preset"), presets[index].to_html(presets[index].a < 1)));
}
}
@@ -985,7 +996,7 @@ void ColorPicker::_screen_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mev = p_event;
if (mev.is_valid()) {
Viewport *r = get_tree()->get_root();
- if (!r->get_visible_rect().has_point(Point2(mev->get_global_position().x, mev->get_global_position().y))) {
+ if (!r->get_visible_rect().has_point(mev->get_global_position())) {
return;
}
@@ -1064,11 +1075,11 @@ void ColorPicker::_html_focus_exit() {
void ColorPicker::set_presets_enabled(bool p_enabled) {
presets_enabled = p_enabled;
if (!p_enabled) {
- bt_add_preset->set_disabled(true);
- bt_add_preset->set_focus_mode(FOCUS_NONE);
+ btn_add_preset->set_disabled(true);
+ btn_add_preset->set_focus_mode(FOCUS_NONE);
} else {
- bt_add_preset->set_disabled(false);
- bt_add_preset->set_focus_mode(FOCUS_ALL);
+ btn_add_preset->set_disabled(false);
+ btn_add_preset->set_focus_mode(FOCUS_ALL);
}
}
@@ -1080,7 +1091,6 @@ void ColorPicker::set_presets_visible(bool p_visible) {
presets_visible = p_visible;
preset_separator->set_visible(p_visible);
preset_container->set_visible(p_visible);
- preset_container2->set_visible(p_visible);
}
bool ColorPicker::are_presets_visible() const {
@@ -1129,7 +1139,7 @@ void ColorPicker::_bind_methods() {
ColorPicker::ColorPicker() :
BoxContainer(true) {
HBoxContainer *hb_edit = memnew(HBoxContainer);
- add_child(hb_edit);
+ add_child(hb_edit, false, INTERNAL_MODE_FRONT);
hb_edit->set_v_size_flags(SIZE_EXPAND_FILL);
hb_edit->add_child(uv_edit);
@@ -1141,7 +1151,7 @@ ColorPicker::ColorPicker() :
uv_edit->connect("draw", callable_mp(this, &ColorPicker::_hsv_draw), make_binds(0, uv_edit));
HBoxContainer *hb_smpl = memnew(HBoxContainer);
- add_child(hb_smpl);
+ add_child(hb_smpl, false, INTERNAL_MODE_FRONT);
hb_smpl->add_child(sample);
sample->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -1155,12 +1165,12 @@ ColorPicker::ColorPicker() :
btn_pick->connect("pressed", callable_mp(this, &ColorPicker::_screen_pick_pressed));
VBoxContainer *vbl = memnew(VBoxContainer);
- add_child(vbl);
+ add_child(vbl, false, INTERNAL_MODE_FRONT);
- add_child(memnew(HSeparator));
+ add_child(memnew(HSeparator), false, INTERNAL_MODE_FRONT);
VBoxContainer *vbr = memnew(VBoxContainer);
- add_child(vbr);
+ add_child(vbr, false, INTERNAL_MODE_FRONT);
vbr->set_h_size_flags(SIZE_EXPAND_FILL);
for (int i = 0; i < 4; i++) {
@@ -1263,20 +1273,16 @@ ColorPicker::ColorPicker() :
set_pick_color(Color(1, 1, 1));
- add_child(preset_separator);
+ add_child(preset_separator, false, INTERNAL_MODE_FRONT);
preset_container->set_h_size_flags(SIZE_EXPAND_FILL);
- add_child(preset_container);
+ preset_container->set_columns(preset_column_count);
+ add_child(preset_container, false, INTERNAL_MODE_FRONT);
- preset_container->add_child(preset);
- preset->connect("gui_input", callable_mp(this, &ColorPicker::_preset_input));
- preset->connect("draw", callable_mp(this, &ColorPicker::_update_presets));
-
- preset_container2->set_h_size_flags(SIZE_EXPAND_FILL);
- add_child(preset_container2);
- preset_container2->add_child(bt_add_preset);
- bt_add_preset->set_tooltip(RTR("Add current color as a preset."));
- bt_add_preset->connect("pressed", callable_mp(this, &ColorPicker::_add_preset_pressed));
+ btn_add_preset->set_icon_align(Button::ALIGN_CENTER);
+ btn_add_preset->set_tooltip(RTR("Add current color as a preset."));
+ btn_add_preset->connect("pressed", callable_mp(this, &ColorPicker::_add_preset_pressed));
+ preset_container->add_child(btn_add_preset);
}
/////////////////
@@ -1302,7 +1308,10 @@ void ColorPickerButton::_modal_closed() {
void ColorPickerButton::pressed() {
_update_picker();
+ Size2 size = get_size() * get_viewport()->get_canvas_transform().get_scale();
+
popup->set_as_minsize();
+ picker->_update_presets();
Rect2i usable_rect = popup->get_usable_parent_rect();
//let's try different positions to see which one we can use
@@ -1312,13 +1321,13 @@ void ColorPickerButton::pressed() {
if (i > 1) {
cp_rect.position.y = get_screen_position().y - cp_rect.size.y;
} else {
- cp_rect.position.y = get_screen_position().y + get_size().height;
+ cp_rect.position.y = get_screen_position().y + size.height;
}
if (i & 1) {
cp_rect.position.x = get_screen_position().x;
} else {
- cp_rect.position.x = get_screen_position().x - MAX(0, (cp_rect.size.x - get_size().x));
+ cp_rect.position.x = get_screen_position().x - MAX(0, (cp_rect.size.x - size.x));
}
if (usable_rect.encloses(cp_rect)) {
@@ -1398,7 +1407,7 @@ void ColorPickerButton::_update_picker() {
picker = memnew(ColorPicker);
picker->set_anchors_and_offsets_preset(PRESET_WIDE);
popup->add_child(picker);
- add_child(popup);
+ add_child(popup, false, INTERNAL_MODE_FRONT);
picker->connect("color_changed", callable_mp(this, &ColorPickerButton::_color_changed));
popup->connect("about_to_popup", callable_mp(this, &ColorPickerButton::_about_to_popup));
popup->connect("popup_hide", callable_mp(this, &ColorPickerButton::_modal_closed));
@@ -1428,3 +1437,64 @@ void ColorPickerButton::_bind_methods() {
ColorPickerButton::ColorPickerButton() {
set_toggle_mode(true);
}
+
+/////////////////
+
+void ColorPresetButton::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_DRAW: {
+ const Rect2 r = Rect2(Point2(0, 0), get_size());
+ Ref<StyleBox> sb_raw = get_theme_stylebox(SNAME("preset_fg"), SNAME("ColorPresetButton"))->duplicate();
+ Ref<StyleBoxFlat> sb_flat = sb_raw;
+ Ref<StyleBoxTexture> sb_texture = sb_raw;
+
+ if (sb_flat.is_valid()) {
+ if (preset_color.a < 1) {
+ // Draw a background pattern when the color is transparent.
+ sb_flat->set_bg_color(Color(1, 1, 1));
+ sb_flat->draw(get_canvas_item(), r);
+
+ Rect2 bg_texture_rect = r.grow_side(SIDE_LEFT, -sb_flat->get_margin(SIDE_LEFT));
+ bg_texture_rect = bg_texture_rect.grow_side(SIDE_RIGHT, -sb_flat->get_margin(SIDE_RIGHT));
+ bg_texture_rect = bg_texture_rect.grow_side(SIDE_TOP, -sb_flat->get_margin(SIDE_TOP));
+ bg_texture_rect = bg_texture_rect.grow_side(SIDE_BOTTOM, -sb_flat->get_margin(SIDE_BOTTOM));
+
+ draw_texture_rect(get_theme_icon(SNAME("preset_bg"), SNAME("ColorPresetButton")), bg_texture_rect, true);
+ sb_flat->set_bg_color(preset_color);
+ }
+ sb_flat->set_bg_color(preset_color);
+ sb_flat->draw(get_canvas_item(), r);
+ } else if (sb_texture.is_valid()) {
+ if (preset_color.a < 1) {
+ // Draw a background pattern when the color is transparent.
+ bool use_tile_texture = (sb_texture->get_h_axis_stretch_mode() == StyleBoxTexture::AxisStretchMode::AXIS_STRETCH_MODE_TILE) || (sb_texture->get_h_axis_stretch_mode() == StyleBoxTexture::AxisStretchMode::AXIS_STRETCH_MODE_TILE_FIT);
+ draw_texture_rect(get_theme_icon(SNAME("preset_bg"), SNAME("ColorPresetButton")), r, use_tile_texture);
+ }
+ sb_texture->set_modulate(preset_color);
+ sb_texture->draw(get_canvas_item(), r);
+ } else {
+ WARN_PRINT("Unsupported StyleBox used for ColorPresetButton. Use StyleBoxFlat or StyleBoxTexture instead.");
+ }
+ if (preset_color.r > 1 || preset_color.g > 1 || preset_color.b > 1) {
+ // Draw an indicator to denote that the color is "overbright" and can't be displayed accurately in the preview
+ draw_texture(Control::get_theme_icon(SNAME("overbright_indicator"), SNAME("ColorPresetButton")), Vector2(0, 0));
+ }
+
+ } break;
+ }
+}
+
+void ColorPresetButton::set_preset_color(const Color &p_color) {
+ preset_color = p_color;
+}
+
+Color ColorPresetButton::get_preset_color() const {
+ return preset_color;
+}
+
+ColorPresetButton::ColorPresetButton(Color p_color) {
+ preset_color = p_color;
+}
+
+ColorPresetButton::~ColorPresetButton() {
+}
diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h
index 60da3957aa..67ca007eb5 100644
--- a/scene/gui/color_picker.h
+++ b/scene/gui/color_picker.h
@@ -35,6 +35,7 @@
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/check_button.h"
+#include "scene/gui/grid_container.h"
#include "scene/gui/label.h"
#include "scene/gui/line_edit.h"
#include "scene/gui/popup.h"
@@ -43,6 +44,22 @@
#include "scene/gui/spin_box.h"
#include "scene/gui/texture_rect.h"
+class ColorPresetButton : public BaseButton {
+ GDCLASS(ColorPresetButton, BaseButton);
+
+ Color preset_color;
+
+protected:
+ void _notification(int);
+
+public:
+ void set_preset_color(const Color &p_color);
+ Color get_preset_color() const;
+
+ ColorPresetButton(Color p_color);
+ ~ColorPresetButton();
+};
+
class ColorPicker : public BoxContainer {
GDCLASS(ColorPicker, BoxContainer);
@@ -69,12 +86,9 @@ private:
Control *wheel = memnew(Control);
Control *wheel_uv = memnew(Control);
TextureRect *sample = memnew(TextureRect);
- TextureRect *preset = memnew(TextureRect);
- HBoxContainer *preset_container = memnew(HBoxContainer);
- HBoxContainer *preset_container2 = memnew(HBoxContainer);
+ GridContainer *preset_container = memnew(GridContainer);
HSeparator *preset_separator = memnew(HSeparator);
- Button *bt_add_preset = memnew(Button);
- List<Color> presets;
+ Button *btn_add_preset = memnew(Button);
Button *btn_pick = memnew(Button);
CheckButton *btn_hsv = memnew(CheckButton);
CheckButton *btn_raw = memnew(CheckButton);
@@ -83,14 +97,19 @@ private:
Label *labels[4];
Button *text_type = memnew(Button);
LineEdit *c_text = memnew(LineEdit);
+
bool edit_alpha = true;
Size2i ms;
bool text_is_constructor = false;
- int presets_per_row = 0;
PickerShapeType picker_type = SHAPE_HSV_WHEEL;
+ const int preset_column_count = 9;
+ int prev_preset_size = 0;
+ List<Color> presets;
+
Color color;
Color old_color;
+
bool display_old_color = false;
bool raw_mode_enabled = false;
bool hsv_mode_enabled = false;
@@ -100,6 +119,7 @@ private:
bool spinning = false;
bool presets_enabled = true;
bool presets_visible = true;
+
float h = 0.0;
float s = 0.0;
float v = 0.0;
@@ -109,7 +129,6 @@ private:
void _value_changed(double);
void _update_controls();
void _update_color(bool p_update_sliders = true);
- void _update_presets();
void _update_text_value();
void _text_type_toggled();
void _sample_input(const Ref<InputEvent> &p_event);
@@ -119,7 +138,7 @@ private:
void _uv_input(const Ref<InputEvent> &p_event, Control *c);
void _w_input(const Ref<InputEvent> &p_event);
- void _preset_input(const Ref<InputEvent> &p_event);
+ void _preset_input(const Ref<InputEvent> &p_event, const Color &p_color);
void _screen_input(const Ref<InputEvent> &p_event);
void _add_preset_pressed();
void _screen_pick_pressed();
@@ -127,6 +146,9 @@ private:
void _focus_exit();
void _html_focus_exit();
+ inline int _get_preset_size();
+ void _add_preset_button(int p_size, const Color &p_color);
+
protected:
void _notification(int);
static void _bind_methods();
@@ -152,6 +174,7 @@ public:
void add_preset(const Color &p_color);
void erase_preset(const Color &p_color);
PackedColorArray get_presets() const;
+ void _update_presets();
void set_hsv_mode(bool p_enabled);
bool is_hsv_mode() const;
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp
index c97434f69b..11941529cd 100644
--- a/scene/gui/container.cpp
+++ b/scene/gui/container.cpp
@@ -96,17 +96,18 @@ void Container::fit_child_in_rect(Control *p_child, const Rect2 &p_rect) {
ERR_FAIL_COND(!p_child);
ERR_FAIL_COND(p_child->get_parent() != this);
+ bool rtl = is_layout_rtl();
Size2 minsize = p_child->get_combined_minimum_size();
Rect2 r = p_rect;
if (!(p_child->get_h_size_flags() & SIZE_FILL)) {
r.size.x = minsize.width;
if (p_child->get_h_size_flags() & SIZE_SHRINK_END) {
- r.position.x += p_rect.size.width - minsize.width;
+ r.position.x += rtl ? 0 : (p_rect.size.width - minsize.width);
} else if (p_child->get_h_size_flags() & SIZE_SHRINK_CENTER) {
r.position.x += Math::floor((p_rect.size.x - minsize.width) / 2);
} else {
- r.position.x += 0;
+ r.position.x += rtl ? (p_rect.size.width - minsize.width) : 0;
}
}
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index f114e06c75..81411d5844 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -30,6 +30,7 @@
#include "control.h"
+#include "container.h"
#include "core/config/project_settings.h"
#include "core/math/geometry_2d.h"
#include "core/object/message_queue.h"
@@ -168,6 +169,20 @@ Size2 Control::_edit_get_minimum_size() const {
}
#endif
+String Control::properties_managed_by_container[] = {
+ "offset_left",
+ "offset_top",
+ "offset_right",
+ "offset_bottom",
+ "anchor_left",
+ "anchor_top",
+ "anchor_right",
+ "anchor_bottom",
+ "rect_position",
+ "rect_scale",
+ "rect_size"
+};
+
void Control::accept_event() {
if (is_inside_tree()) {
get_viewport()->_gui_accept_event();
@@ -442,6 +457,20 @@ void Control::_validate_property(PropertyInfo &property) const {
property.hint_string = hint_string;
}
+ if (!Object::cast_to<Container>(get_parent())) {
+ return;
+ }
+ // Disable the property if it's managed by the parent container.
+ bool property_is_managed_by_container = false;
+ for (unsigned i = 0; i < properties_managed_by_container_count; i++) {
+ property_is_managed_by_container = properties_managed_by_container[i] == property.name;
+ if (property_is_managed_by_container) {
+ break;
+ }
+ }
+ if (property_is_managed_by_container) {
+ property.usage |= PROPERTY_USAGE_READ_ONLY;
+ }
}
Control *Control::get_parent_control() const {
@@ -730,14 +759,9 @@ Variant Control::get_drag_data(const Point2 &p_point) {
}
}
- if (get_script_instance()) {
- Variant v = p_point;
- const Variant *p = &v;
- Callable::CallError ce;
- Variant ret = get_script_instance()->call(SceneStringNames::get_singleton()->_get_drag_data, &p, 1, ce);
- if (ce.error == Callable::CallError::CALL_OK) {
- return ret;
- }
+ Variant dd;
+ if (GDVIRTUAL_CALL(_get_drag_data, p_point, dd)) {
+ return dd;
}
return Variant();
@@ -752,16 +776,10 @@ bool Control::can_drop_data(const Point2 &p_point, const Variant &p_data) const
}
}
- if (get_script_instance()) {
- Variant v = p_point;
- const Variant *p[2] = { &v, &p_data };
- Callable::CallError ce;
- Variant ret = get_script_instance()->call(SceneStringNames::get_singleton()->_can_drop_data, p, 2, ce);
- if (ce.error == Callable::CallError::CALL_OK) {
- return ret;
- }
+ bool ret;
+ if (GDVIRTUAL_CALL(_can_drop_data, p_point, p_data, ret)) {
+ return ret;
}
-
return false;
}
@@ -775,15 +793,7 @@ void Control::drop_data(const Point2 &p_point, const Variant &p_data) {
}
}
- if (get_script_instance()) {
- Variant v = p_point;
- const Variant *p[2] = { &v, &p_data };
- Callable::CallError ce;
- Variant ret = get_script_instance()->call(SceneStringNames::get_singleton()->_drop_data, p, 2, ce);
- if (ce.error == Callable::CallError::CALL_OK) {
- return;
- }
- }
+ GDVIRTUAL_CALL(_drop_data, p_point, p_data);
}
void Control::force_drag(const Variant &p_data, Control *p_control) {
@@ -799,16 +809,26 @@ void Control::set_drag_preview(Control *p_control) {
get_viewport()->_gui_set_drag_preview(this, p_control);
}
+void Control::_call_gui_input(const Ref<InputEvent> &p_event) {
+ emit_signal(SceneStringNames::get_singleton()->gui_input, p_event); //signal should be first, so it's possible to override an event (and then accept it)
+ if (!is_inside_tree() || get_viewport()->is_input_handled()) {
+ return; //input was handled, abort
+ }
+ GDVIRTUAL_CALL(_gui_input, p_event);
+ if (!is_inside_tree() || get_viewport()->is_input_handled()) {
+ return; //input was handled, abort
+ }
+ gui_input(p_event);
+}
+void Control::gui_input(const Ref<InputEvent> &p_event) {
+}
+
Size2 Control::get_minimum_size() const {
- ScriptInstance *si = const_cast<Control *>(this)->get_script_instance();
- if (si) {
- Callable::CallError ce;
- Variant s = si->call(SceneStringNames::get_singleton()->_get_minimum_size, nullptr, 0, ce);
- if (ce.error == Callable::CallError::CALL_OK) {
- return s;
- }
+ Vector2 ms;
+ if (GDVIRTUAL_CALL(_get_minimum_size, ms)) {
+ return ms;
}
- return Size2();
+ return Vector2();
}
template <class T>
@@ -2123,8 +2143,9 @@ String Control::get_tooltip(const Point2 &p_pos) const {
}
Control *Control::make_custom_tooltip(const String &p_text) const {
- if (get_script_instance()) {
- return const_cast<Control *>(this)->call("_make_custom_tooltip", p_text);
+ Object *ret = nullptr;
+ if (GDVIRTUAL_CALL(_make_custom_tooltip, p_text, ret)) {
+ return Object::cast_to<Control>(ret);
}
return nullptr;
}
@@ -2499,14 +2520,11 @@ Vector<Vector2i> Control::structured_text_parser(StructuredTextParser p_theme_ty
}
} break;
case STRUCTURED_TEXT_CUSTOM: {
- if (get_script_instance()) {
- Variant data = get_script_instance()->call(SceneStringNames::get_singleton()->_structured_text_parser, p_args, p_text);
- if (data.get_type() == Variant::ARRAY) {
- Array _data = data;
- for (int i = 0; i < _data.size(); i++) {
- if (_data[i].get_type() == Variant::VECTOR2I) {
- ret.push_back(Vector2i(_data[i]));
- }
+ Array r;
+ if (GDVIRTUAL_CALL(_structured_text_parser, p_args, p_text, r)) {
+ for (int i = 0; i < r.size(); i++) {
+ if (r[i].get_type() == Variant::VECTOR2I) {
+ ret.push_back(Vector2i(r[i]));
}
}
}
@@ -2823,21 +2841,6 @@ void Control::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_auto_translate", "enable"), &Control::set_auto_translate);
ClassDB::bind_method(D_METHOD("is_auto_translating"), &Control::is_auto_translating);
- BIND_VMETHOD(MethodInfo("_structured_text_parser", PropertyInfo(Variant::ARRAY, "args"), PropertyInfo(Variant::STRING, "text")));
-
- BIND_VMETHOD(MethodInfo("_gui_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
- BIND_VMETHOD(MethodInfo(Variant::VECTOR2, "_get_minimum_size"));
-
- MethodInfo get_drag_data = MethodInfo("_get_drag_data", PropertyInfo(Variant::VECTOR2, "position"));
- get_drag_data.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
- BIND_VMETHOD(get_drag_data);
-
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_can_drop_data", PropertyInfo(Variant::VECTOR2, "position"), PropertyInfo(Variant::NIL, "data")));
- BIND_VMETHOD(MethodInfo("_drop_data", PropertyInfo(Variant::VECTOR2, "position"), PropertyInfo(Variant::NIL, "data")));
- BIND_VMETHOD(MethodInfo(
- PropertyInfo(Variant::OBJECT, "control", PROPERTY_HINT_RESOURCE_TYPE, "Control"),
- "_make_custom_tooltip", PropertyInfo(Variant::STRING, "for_text")));
-
ADD_GROUP("Anchor", "anchor_");
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_left", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", SIDE_LEFT);
ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anchor_top", PROPERTY_HINT_RANGE, "0,1,0.001,or_lesser,or_greater"), "_set_anchor", "get_anchor", SIDE_TOP);
@@ -2994,5 +2997,14 @@ void Control::_bind_methods() {
ADD_SIGNAL(MethodInfo("minimum_size_changed"));
ADD_SIGNAL(MethodInfo("theme_changed"));
- GDVIRTUAL_BIND(_has_point);
+ GDVIRTUAL_BIND(_has_point, "position");
+ GDVIRTUAL_BIND(_structured_text_parser, "args", "text");
+ GDVIRTUAL_BIND(_get_minimum_size);
+
+ GDVIRTUAL_BIND(_get_drag_data, "at_position");
+ GDVIRTUAL_BIND(_can_drop_data, "at_position", "data");
+ GDVIRTUAL_BIND(_drop_data, "at_position", "data");
+ GDVIRTUAL_BIND(_make_custom_tooltip, "for_text");
+
+ GDVIRTUAL_BIND(_gui_input, "event");
}
diff --git a/scene/gui/control.h b/scene/gui/control.h
index a871a8e9fb..9cec5d6e8d 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -31,10 +31,10 @@
#ifndef CONTROL_H
#define CONTROL_H
+#include "core/input/shortcut.h"
#include "core/math/transform_2d.h"
#include "core/object/gdvirtual.gen.inc"
#include "core/templates/rid.h"
-#include "scene/gui/shortcut.h"
#include "scene/main/canvas_item.h"
#include "scene/main/node.h"
#include "scene/main/timer.h"
@@ -230,6 +230,9 @@ private:
} data;
+ static constexpr unsigned properties_managed_by_container_count = 11;
+ static String properties_managed_by_container[properties_managed_by_container_count];
+
// used internally
Control *_find_control_at_pos(CanvasItem *p_node, const Point2 &p_pos, const Transform2D &p_xform, Transform2D &r_inv_xform);
@@ -263,6 +266,8 @@ private:
friend class Viewport;
+ void _call_gui_input(const Ref<InputEvent> &p_event);
+
void _update_minimum_size_cache();
friend class Window;
static void _propagate_theme_changed(Node *p_at, Control *p_owner, Window *p_owner_window, bool p_assign = true);
@@ -272,7 +277,6 @@ private:
static bool has_theme_item_in_types(Control *p_theme_owner, Window *p_theme_owner_window, Theme::DataType p_data_type, const StringName &p_name, List<StringName> p_theme_types);
_FORCE_INLINE_ void _get_theme_type_dependencies(const StringName &p_theme_type, List<StringName> *p_list) const;
- GDVIRTUAL1RC(bool, _has_point, Vector2)
protected:
virtual void add_child_notify(Node *p_child) override;
virtual void remove_child_notify(Node *p_child) override;
@@ -291,6 +295,17 @@ protected:
//bind helpers
+ GDVIRTUAL1RC(bool, _has_point, Vector2)
+ GDVIRTUAL2RC(Array, _structured_text_parser, Array, String)
+ GDVIRTUAL0RC(Vector2, _get_minimum_size)
+
+ GDVIRTUAL1RC(Variant, _get_drag_data, Vector2)
+ GDVIRTUAL2RC(bool, _can_drop_data, Vector2, Variant)
+ GDVIRTUAL2(_drop_data, Vector2, Variant)
+ GDVIRTUAL1RC(Object *, _make_custom_tooltip, String)
+
+ GDVIRTUAL1(_gui_input, Ref<InputEvent>)
+
public:
enum {
/* NOTIFICATION_DRAW=30,
@@ -333,6 +348,8 @@ public:
virtual Size2 _edit_get_minimum_size() const override;
#endif
+ virtual void gui_input(const Ref<InputEvent> &p_event);
+
void accept_event();
virtual Size2 get_minimum_size() const;
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index da858e8e83..5d98aaa698 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -319,7 +319,7 @@ AcceptDialog::AcceptDialog() {
set_clamp_to_embedder(true);
bg = memnew(Panel);
- add_child(bg);
+ add_child(bg, false, INTERNAL_MODE_FRONT);
hbc = memnew(HBoxContainer);
@@ -331,9 +331,9 @@ AcceptDialog::AcceptDialog() {
label->set_anchor(SIDE_BOTTOM, Control::ANCHOR_END);
label->set_begin(Point2(margin, margin));
label->set_end(Point2(-margin, -button_margin - 10));
- add_child(label);
+ add_child(label, false, INTERNAL_MODE_FRONT);
- add_child(hbc);
+ add_child(hbc, false, INTERNAL_MODE_FRONT);
hbc->add_spacer();
ok = memnew(Button);
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 2e4204e171..973b72973d 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -95,7 +95,7 @@ void FileDialog::_notification(int p_what) {
}
}
-void FileDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
+void FileDialog::unhandled_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventKey> k = p_event;
@@ -854,8 +854,6 @@ void FileDialog::_update_drives() {
bool FileDialog::default_show_hidden_files = false;
void FileDialog::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_unhandled_input"), &FileDialog::_unhandled_input);
-
ClassDB::bind_method(D_METHOD("_cancel_pressed"), &FileDialog::_cancel_pressed);
ClassDB::bind_method(D_METHOD("clear_filters"), &FileDialog::clear_filters);
@@ -926,7 +924,7 @@ FileDialog::FileDialog() {
show_hidden_files = default_show_hidden_files;
vbox = memnew(VBoxContainer);
- add_child(vbox);
+ add_child(vbox, false, INTERNAL_MODE_FRONT);
vbox->connect("theme_changed", callable_mp(this, &FileDialog::_theme_changed));
mode = FILE_MODE_SAVE_FILE;
@@ -1025,8 +1023,7 @@ FileDialog::FileDialog() {
filter->connect("item_selected", callable_mp(this, &FileDialog::_filter_selected));
confirm_save = memnew(ConfirmationDialog);
- // confirm_save->set_as_top_level(true);
- add_child(confirm_save);
+ add_child(confirm_save, false, INTERNAL_MODE_FRONT);
confirm_save->connect("confirmed", callable_mp(this, &FileDialog::_save_confirm_pressed));
@@ -1038,16 +1035,16 @@ FileDialog::FileDialog() {
makedirname = memnew(LineEdit);
makedirname->set_structured_text_bidi_override(Control::STRUCTURED_TEXT_FILE);
makevb->add_margin_child(TTRC("Name:"), makedirname);
- add_child(makedialog);
+ add_child(makedialog, false, INTERNAL_MODE_FRONT);
makedialog->register_text_enter(makedirname);
makedialog->connect("confirmed", callable_mp(this, &FileDialog::_make_dir_confirm));
mkdirerr = memnew(AcceptDialog);
mkdirerr->set_text(TTRC("Could not create folder."));
- add_child(mkdirerr);
+ add_child(mkdirerr, false, INTERNAL_MODE_FRONT);
exterr = memnew(AcceptDialog);
exterr->set_text(TTRC("Must use a valid extension."));
- add_child(exterr);
+ add_child(exterr, false, INTERNAL_MODE_FRONT);
update_filters();
update_dir();
diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h
index 7fbafc4bb4..b5190bdab1 100644
--- a/scene/gui/file_dialog.h
+++ b/scene/gui/file_dialog.h
@@ -132,7 +132,7 @@ private:
void _update_drives();
- void _unhandled_input(const Ref<InputEvent> &p_event);
+ virtual void unhandled_input(const Ref<InputEvent> &p_event) override;
bool _is_open_should_be_disabled();
diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp
index 635f3c51b9..56b8a936e1 100644
--- a/scene/gui/gradient_edit.cpp
+++ b/scene/gui/gradient_edit.cpp
@@ -48,7 +48,7 @@ GradientEdit::GradientEdit() {
picker = memnew(ColorPicker);
popup->add_child(picker);
- add_child(popup);
+ add_child(popup, false, INTERNAL_MODE_FRONT);
}
int GradientEdit::_get_point_from_pos(int x) {
@@ -88,7 +88,7 @@ void GradientEdit::_show_color_picker() {
GradientEdit::~GradientEdit() {
}
-void GradientEdit::_gui_input(const Ref<InputEvent> &p_event) {
+void GradientEdit::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventKey> k = p_event;
@@ -458,6 +458,5 @@ Vector<Gradient::Point> &GradientEdit::get_points() {
}
void GradientEdit::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &GradientEdit::_gui_input);
ADD_SIGNAL(MethodInfo("ramp_changed"));
}
diff --git a/scene/gui/gradient_edit.h b/scene/gui/gradient_edit.h
index b0ee2c4abb..a173631963 100644
--- a/scene/gui/gradient_edit.h
+++ b/scene/gui/gradient_edit.h
@@ -52,7 +52,7 @@ class GradientEdit : public Control {
void _show_color_picker();
protected:
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _notification(int p_what);
static void _bind_methods();
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index fcecbb5fca..d9c08ec272 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -51,10 +51,6 @@ GraphEditFilter::GraphEditFilter(GraphEdit *p_edit) {
ge = p_edit;
}
-void GraphEditMinimap::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &GraphEditMinimap::_gui_input);
-}
-
GraphEditMinimap::GraphEditMinimap(GraphEdit *p_edit) {
ge = p_edit;
@@ -148,7 +144,7 @@ Vector2 GraphEditMinimap::_convert_to_graph_position(const Vector2 &p_position)
return graph_position;
}
-void GraphEditMinimap::_gui_input(const Ref<InputEvent> &p_ev) {
+void GraphEditMinimap::gui_input(const Ref<InputEvent> &p_ev) {
ERR_FAIL_COND(p_ev.is_null());
if (!ge->is_minimap_enabled()) {
@@ -360,17 +356,6 @@ void GraphEdit::_graph_node_raised(Node *p_gn) {
} else {
gn->raise();
}
- int first_not_comment = 0;
- for (int i = 0; i < get_child_count(); i++) {
- GraphNode *gn2 = Object::cast_to<GraphNode>(get_child(i));
- if (gn2 && !gn2->is_comment()) {
- first_not_comment = i;
- break;
- }
- }
-
- move_child(connections_layer, first_not_comment);
- top_layer->raise();
emit_signal(SNAME("node_selected"), p_gn);
}
@@ -712,7 +697,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {
} else if (!just_disconnected) {
String from = connecting_from;
int from_slot = connecting_index;
- Vector2 ofs = Vector2(mb->get_position().x, mb->get_position().y);
+ Vector2 ofs = mb->get_position();
if (!connecting_out) {
emit_signal(SNAME("connection_from_empty"), from, from_slot, ofs);
@@ -805,68 +790,36 @@ bool GraphEdit::is_in_hot_zone(const Vector2 &pos, const Vector2 &p_mouse_pos, c
return true;
}
-template <class Vector2>
-static _FORCE_INLINE_ Vector2 _bezier_interp(real_t t, Vector2 start, Vector2 control_1, Vector2 control_2, Vector2 end) {
- /* Formula from Wikipedia article on Bezier curves. */
- real_t omt = (1.0 - t);
- real_t omt2 = omt * omt;
- real_t omt3 = omt2 * omt;
- real_t t2 = t * t;
- real_t t3 = t2 * t;
-
- return start * omt3 + control_1 * omt2 * t * 3.0 + control_2 * omt * t2 * 3.0 + end * t3;
-}
-
-void GraphEdit::_bake_segment2d(Vector<Vector2> &points, Vector<Color> &colors, float p_begin, float p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_min_depth, int p_max_depth, float p_tol, const Color &p_color, const Color &p_to_color, int &lines) const {
- float mp = p_begin + (p_end - p_begin) * 0.5;
- Vector2 beg = _bezier_interp(p_begin, p_a, p_a + p_out, p_b + p_in, p_b);
- Vector2 mid = _bezier_interp(mp, p_a, p_a + p_out, p_b + p_in, p_b);
- Vector2 end = _bezier_interp(p_end, p_a, p_a + p_out, p_b + p_in, p_b);
-
- Vector2 na = (mid - beg).normalized();
- Vector2 nb = (end - mid).normalized();
- float dp = Math::rad2deg(Math::acos(na.dot(nb)));
-
- if (p_depth >= p_min_depth && (dp < p_tol || p_depth >= p_max_depth)) {
- points.push_back((beg + end) * 0.5);
- colors.push_back(p_color.lerp(p_to_color, mp));
- lines++;
- } else {
- _bake_segment2d(points, colors, p_begin, mp, p_a, p_out, p_b, p_in, p_depth + 1, p_min_depth, p_max_depth, p_tol, p_color, p_to_color, lines);
- _bake_segment2d(points, colors, mp, p_end, p_a, p_out, p_b, p_in, p_depth + 1, p_min_depth, p_max_depth, p_tol, p_color, p_to_color, lines);
- }
-}
-
-void GraphEdit::_draw_cos_line(CanvasItem *p_where, const Vector2 &p_from, const Vector2 &p_to, const Color &p_color, const Color &p_to_color, float p_width, float p_bezier_ratio) {
- //cubic bezier code
- float diff = p_to.x - p_from.x;
- float cp_offset;
- int cp_len = get_theme_constant(SNAME("bezier_len_pos")) * p_bezier_ratio;
- int cp_neg_len = get_theme_constant(SNAME("bezier_len_neg")) * p_bezier_ratio;
-
- if (diff > 0) {
- cp_offset = MIN(cp_len, diff * 0.5);
- } else {
- cp_offset = MAX(MIN(cp_len - diff, cp_neg_len), -diff * 0.5);
+PackedVector2Array GraphEdit::get_connection_line(const Vector2 &p_from, const Vector2 &p_to) {
+ Vector<Vector2> ret;
+ if (GDVIRTUAL_CALL(_get_connection_line, p_from, p_to, ret)) {
+ return ret;
}
- Vector2 c1 = Vector2(cp_offset * zoom, 0);
- Vector2 c2 = Vector2(-cp_offset * zoom, 0);
-
- int lines = 0;
+ Curve2D curve;
+ Vector<Color> colors;
+ curve.add_point(p_from);
+ curve.set_point_out(0, Vector2(60, 0));
+ curve.add_point(p_to);
+ curve.set_point_in(1, Vector2(-60, 0));
+ return curve.tessellate();
+}
- Vector<Point2> points;
+void GraphEdit::_draw_connection_line(CanvasItem *p_where, const Vector2 &p_from, const Vector2 &p_to, const Color &p_color, const Color &p_to_color, float p_width, float p_zoom) {
+ Vector<Vector2> points = get_connection_line(p_from / p_zoom, p_to / p_zoom);
+ Vector<Vector2> scaled_points;
Vector<Color> colors;
- points.push_back(p_from);
- colors.push_back(p_color);
- _bake_segment2d(points, colors, 0, 1, p_from, c1, p_to, c2, 0, 3, 9, 3, p_color, p_to_color, lines);
- points.push_back(p_to);
- colors.push_back(p_to_color);
+ float length = (p_from / p_zoom).distance_to(p_to / p_zoom);
+ for (int i = 0; i < points.size(); i++) {
+ float d = (p_from / p_zoom).distance_to(points[i]) / length;
+ colors.push_back(p_color.lerp(p_to_color, d));
+ scaled_points.push_back(points[i] * p_zoom);
+ }
#ifdef TOOLS_ENABLED
- p_where->draw_polyline_colors(points, colors, Math::floor(p_width * EDSCALE), lines_antialiased);
+ p_where->draw_polyline_colors(scaled_points, colors, Math::floor(p_width * EDSCALE), lines_antialiased);
#else
- p_where->draw_polyline_colors(points, colors, p_width, lines_antialiased);
+ p_where->draw_polyline_colors(scaled_points, colors, p_width, lines_antialiased);
#endif
}
@@ -913,7 +866,7 @@ void GraphEdit::_connections_layer_draw() {
color = color.lerp(activity_color, E->get().activity);
tocolor = tocolor.lerp(activity_color, E->get().activity);
}
- _draw_cos_line(connections_layer, frompos, topos, color, tocolor, lines_thickness);
+ _draw_connection_line(connections_layer, frompos, topos, color, tocolor, lines_thickness, zoom);
}
while (to_erase.size()) {
@@ -952,7 +905,7 @@ void GraphEdit::_top_layer_draw() {
if (!connecting_out) {
SWAP(pos, topos);
}
- _draw_cos_line(top_layer, pos, topos, col, col, lines_thickness);
+ _draw_connection_line(top_layer, pos, topos, col, col, lines_thickness, zoom);
}
if (box_selecting) {
@@ -1056,7 +1009,7 @@ void GraphEdit::_minimap_draw() {
from_color = from_color.lerp(activity_color, E.activity);
to_color = to_color.lerp(activity_color, E.activity);
}
- _draw_cos_line(minimap, from_position, to_position, from_color, to_color, 1.0, 0.5);
+ _draw_connection_line(minimap, from_position, to_position, from_color, to_color, 0.1, minimap->_convert_from_graph_position(Vector2(zoom, zoom)).length());
}
// Draw the "camera" viewport.
@@ -1080,7 +1033,7 @@ void GraphEdit::set_selected(Node *p_child) {
}
}
-void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
+void GraphEdit::gui_input(const Ref<InputEvent> &p_ev) {
ERR_FAIL_COND(p_ev.is_null());
Ref<InputEventMouseMotion> mm = p_ev;
@@ -1118,10 +1071,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
if (mm.is_valid() && box_selecting) {
box_selecting_to = mm->get_position();
- box_selecting_rect = Rect2(MIN(box_selecting_from.x, box_selecting_to.x),
- MIN(box_selecting_from.y, box_selecting_to.y),
- ABS(box_selecting_from.x - box_selecting_to.x),
- ABS(box_selecting_from.y - box_selecting_to.y));
+ box_selecting_rect = Rect2(box_selecting_from.min(box_selecting_to), (box_selecting_from - box_selecting_to).abs());
for (int i = get_child_count() - 1; i >= 0; i--) {
GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
@@ -2048,7 +1998,6 @@ void GraphEdit::arrange_nodes() {
if (gn->is_selected()) {
selected_nodes.insert(gn->get_name());
- origin = origin < gn->get_position_offset() ? origin : gn->get_position_offset();
Set<StringName> s;
for (List<Connection>::Element *E = connections.front(); E; E = E->next()) {
GraphNode *p_from = Object::cast_to<GraphNode>(node_names[E->get().from]);
@@ -2072,6 +2021,11 @@ void GraphEdit::arrange_nodes() {
}
}
+ if (!selected_nodes.size()) {
+ arranging_graph = false;
+ return;
+ }
+
HashMap<int, Vector<StringName>> layers = _layering(selected_nodes, upper_neighbours);
_crossing_minimisation(layers, upper_neighbours);
@@ -2098,16 +2052,16 @@ void GraphEdit::arrange_nodes() {
for (const Set<StringName>::Element *E = block_heads.front(); E; E = E->next()) {
_place_block(E->get(), gap_v, layers, root, align, node_names, inner_shift, sink, shift, new_positions);
}
+ origin.y = Object::cast_to<GraphNode>(node_names[layers[0][0]])->get_position_offset().y - (new_positions[layers[0][0]].y + (float)inner_shift[layers[0][0]]);
+ origin.x = Object::cast_to<GraphNode>(node_names[layers[0][0]])->get_position_offset().x;
for (const Set<StringName>::Element *E = block_heads.front(); E; E = E->next()) {
StringName u = E->get();
- StringName prev = u;
float start_from = origin.y + new_positions[E->get()].y;
do {
Vector2 cal_pos;
cal_pos.y = start_from + (real_t)inner_shift[u];
new_positions.set(u, cal_pos);
- prev = u;
u = align[u];
} while (u != E->get());
}
@@ -2130,10 +2084,11 @@ void GraphEdit::arrange_nodes() {
if (current_node_size == largest_node_size) {
cal_pos.x = start_from;
} else {
- float current_node_start_pos;
- if (current_node_size >= largest_node_size / 2) {
- current_node_start_pos = start_from;
- } else {
+ float current_node_start_pos = start_from;
+ if (current_node_size < largest_node_size / 2) {
+ if (!(i || j)) {
+ start_from -= (largest_node_size - current_node_size);
+ }
current_node_start_pos = start_from + largest_node_size - current_node_size;
}
cal_pos.x = current_node_start_pos;
@@ -2145,7 +2100,7 @@ void GraphEdit::arrange_nodes() {
largest_node_size = 0.0f;
}
- emit_signal("begin_node_move");
+ emit_signal(SNAME("begin_node_move"));
for (const Set<StringName>::Element *E = selected_nodes.front(); E; E = E->next()) {
GraphNode *gn = Object::cast_to<GraphNode>(node_names[E->get()]);
gn->set_drag(true);
@@ -2158,7 +2113,7 @@ void GraphEdit::arrange_nodes() {
gn->set_position_offset(pos);
gn->set_drag(false);
}
- emit_signal("end_node_move");
+ emit_signal(SNAME("end_node_move"));
arranging_graph = false;
}
@@ -2179,6 +2134,7 @@ void GraphEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_valid_connection_type", "from_type", "to_type"), &GraphEdit::add_valid_connection_type);
ClassDB::bind_method(D_METHOD("remove_valid_connection_type", "from_type", "to_type"), &GraphEdit::remove_valid_connection_type);
ClassDB::bind_method(D_METHOD("is_valid_connection_type", "from_type", "to_type"), &GraphEdit::is_valid_connection_type);
+ ClassDB::bind_method(D_METHOD("get_connection_line", "from", "to"), &GraphEdit::get_connection_line);
ClassDB::bind_method(D_METHOD("set_zoom", "zoom"), &GraphEdit::set_zoom);
ClassDB::bind_method(D_METHOD("get_zoom"), &GraphEdit::get_zoom);
@@ -2218,7 +2174,6 @@ void GraphEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_right_disconnects", "enable"), &GraphEdit::set_right_disconnects);
ClassDB::bind_method(D_METHOD("is_right_disconnects_enabled"), &GraphEdit::is_right_disconnects_enabled);
- ClassDB::bind_method(D_METHOD("_gui_input"), &GraphEdit::_gui_input);
ClassDB::bind_method(D_METHOD("_update_scroll_offset"), &GraphEdit::_update_scroll_offset);
ClassDB::bind_method(D_METHOD("get_zoom_hbox"), &GraphEdit::get_zoom_hbox);
@@ -2227,6 +2182,8 @@ void GraphEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_selected", "node"), &GraphEdit::set_selected);
+ GDVIRTUAL_BIND(_get_connection_line, "from", "to")
+
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "right_disconnects"), "set_right_disconnects", "is_right_disconnects_enabled");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scroll_offset"), "set_scroll_ofs", "get_scroll_ofs");
ADD_PROPERTY(PropertyInfo(Variant::INT, "snap_distance"), "set_snap", "get_snap");
@@ -2275,14 +2232,14 @@ GraphEdit::GraphEdit() {
zoom_max = (1 * Math::pow(zoom_step, 4));
top_layer = memnew(GraphEditFilter(this));
- add_child(top_layer);
+ add_child(top_layer, false, INTERNAL_MODE_BACK);
top_layer->set_mouse_filter(MOUSE_FILTER_PASS);
top_layer->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
top_layer->connect("draw", callable_mp(this, &GraphEdit::_top_layer_draw));
top_layer->connect("gui_input", callable_mp(this, &GraphEdit::_top_layer_input));
connections_layer = memnew(Control);
- add_child(connections_layer);
+ add_child(connections_layer, false, INTERNAL_MODE_FRONT);
connections_layer->connect("draw", callable_mp(this, &GraphEdit::_connections_layer_draw));
connections_layer->set_name("CLAYER");
connections_layer->set_disable_visibility_clip(true); // so it can draw freely and be offset
diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h
index 9fd7cbef22..44e50aa3c2 100644
--- a/scene/gui/graph_edit.h
+++ b/scene/gui/graph_edit.h
@@ -62,8 +62,6 @@ class GraphEditMinimap : public Control {
GraphEdit *ge;
protected:
- static void _bind_methods();
-
public:
GraphEditMinimap(GraphEdit *p_edit);
@@ -88,7 +86,7 @@ private:
Vector2 _convert_from_graph_position(const Vector2 &p_position);
Vector2 _convert_to_graph_position(const Vector2 &p_position);
- void _gui_input(const Ref<InputEvent> &p_ev);
+ virtual void gui_input(const Ref<InputEvent> &p_ev) override;
void _adjust_graph_scroll(const Vector2 &p_offset);
};
@@ -169,9 +167,8 @@ private:
float lines_thickness = 2.0f;
bool lines_antialiased = true;
- void _bake_segment2d(Vector<Vector2> &points, Vector<Color> &colors, float p_begin, float p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_min_depth, int p_max_depth, float p_tol, const Color &p_color, const Color &p_to_color, int &lines) const;
-
- void _draw_cos_line(CanvasItem *p_where, const Vector2 &p_from, const Vector2 &p_to, const Color &p_color, const Color &p_to_color, float p_width, float p_bezier_ratio = 1.0);
+ PackedVector2Array get_connection_line(const Vector2 &p_from, const Vector2 &p_to);
+ void _draw_connection_line(CanvasItem *p_where, const Vector2 &p_from, const Vector2 &p_to, const Color &p_color, const Color &p_to_color, float p_width, float p_zoom);
void _graph_node_raised(Node *p_gn);
void _graph_node_moved(Node *p_gn);
@@ -179,7 +176,7 @@ private:
void _update_scroll();
void _scroll_moved(double);
- void _gui_input(const Ref<InputEvent> &p_ev);
+ virtual void gui_input(const Ref<InputEvent> &p_ev) override;
Control *connections_layer;
GraphEditFilter *top_layer;
@@ -256,6 +253,8 @@ protected:
virtual void remove_child_notify(Node *p_child) override;
void _notification(int p_what);
+ GDVIRTUAL2RC(Vector<Vector2>, _get_connection_line, Vector2, Vector2)
+
public:
Error connect_node(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port);
bool is_node_connected(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port);
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index e85cefcb7b..ecf735d7f5 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -31,6 +31,9 @@
#include "graph_node.h"
#include "core/string/translation.h"
+#ifdef TOOLS_ENABLED
+#include "graph_edit.h"
+#endif
struct _MinSizeCache {
int min_size;
@@ -458,6 +461,27 @@ void GraphNode::_shape() {
title_buf->add_string(title, font, font_size, opentype_features, (language != "") ? language : TranslationServer::get_singleton()->get_tool_locale());
}
+#ifdef TOOLS_ENABLED
+void GraphNode::_edit_set_position(const Point2 &p_position) {
+ GraphEdit *graph = Object::cast_to<GraphEdit>(get_parent());
+ if (graph) {
+ Point2 offset = (p_position + graph->get_scroll_ofs()) * graph->get_zoom();
+ set_position_offset(offset);
+ }
+ set_position(p_position);
+}
+
+void GraphNode::_validate_property(PropertyInfo &property) const {
+ Control::_validate_property(property);
+ GraphEdit *graph = Object::cast_to<GraphEdit>(get_parent());
+ if (graph) {
+ if (property.name == "rect_position") {
+ property.usage |= PROPERTY_USAGE_READ_ONLY;
+ }
+ }
+}
+#endif
+
void GraphNode::set_slot(int p_idx, bool p_enable_left, int p_type_left, const Color &p_color_left, bool p_enable_right, int p_type_right, const Color &p_color_right, const Ref<Texture2D> &p_custom_left, const Ref<Texture2D> &p_custom_right) {
ERR_FAIL_COND_MSG(p_idx < 0, vformat("Cannot set slot with p_idx (%d) lesser than zero.", p_idx));
@@ -863,7 +887,7 @@ Color GraphNode::get_connection_output_color(int p_idx) {
return conn_output_cache[p_idx].color;
}
-void GraphNode::_gui_input(const Ref<InputEvent> &p_ev) {
+void GraphNode::gui_input(const Ref<InputEvent> &p_ev) {
ERR_FAIL_COND(p_ev.is_null());
Ref<InputEventMouseButton> mb = p_ev;
@@ -871,7 +895,7 @@ void GraphNode::_gui_input(const Ref<InputEvent> &p_ev) {
ERR_FAIL_COND_MSG(get_parent_control() == nullptr, "GraphNode must be the child of a GraphEdit node.");
if (mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
- Vector2 mpos = Vector2(mb->get_position().x, mb->get_position().y);
+ Vector2 mpos = mb->get_position();
if (close_rect.size != Size2() && close_rect.has_point(mpos)) {
//send focus to parent
get_parent_control()->grab_focus();
@@ -946,8 +970,6 @@ void GraphNode::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_language", "language"), &GraphNode::set_language);
ClassDB::bind_method(D_METHOD("get_language"), &GraphNode::get_language);
- ClassDB::bind_method(D_METHOD("_gui_input"), &GraphNode::_gui_input);
-
ClassDB::bind_method(D_METHOD("set_slot", "idx", "enable_left", "type_left", "color_left", "enable_right", "type_right", "color_right", "custom_left", "custom_right"), &GraphNode::set_slot, DEFVAL(Ref<Texture2D>()), DEFVAL(Ref<Texture2D>()));
ClassDB::bind_method(D_METHOD("clear_slot", "idx"), &GraphNode::clear_slot);
ClassDB::bind_method(D_METHOD("clear_all_slots"), &GraphNode::clear_all_slots);
diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h
index c70f616b47..2238cfdb56 100644
--- a/scene/gui/graph_node.h
+++ b/scene/gui/graph_node.h
@@ -98,8 +98,13 @@ private:
Overlay overlay = OVERLAY_DISABLED;
+#ifdef TOOLS_ENABLED
+ void _edit_set_position(const Point2 &p_position) override;
+ void _validate_property(PropertyInfo &property) const override;
+#endif
+
protected:
- void _gui_input(const Ref<InputEvent> &p_ev);
+ virtual void gui_input(const Ref<InputEvent> &p_ev) override;
void _notification(int p_what);
static void _bind_methods();
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 258d65112a..d10ad90c1f 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -48,6 +48,8 @@ void ItemList::_shape(int p_idx) {
} else {
item.text_buf->set_flags(TextServer::BREAK_NONE);
}
+ item.text_buf->set_text_overrun_behavior(text_overrun_behavior);
+ item.text_buf->set_max_lines_visible(max_text_lines);
}
int ItemList::add_item(const String &p_item, const Ref<Texture2D> &p_texture, bool p_selectable) {
@@ -453,6 +455,7 @@ void ItemList::set_max_text_lines(int p_lines) {
for (int i = 0; i < items.size(); i++) {
if (icon_mode == ICON_MODE_TOP && max_text_lines > 0) {
items.write[i].text_buf->set_flags(TextServer::BREAK_MANDATORY | TextServer::BREAK_WORD_BOUND | TextServer::BREAK_GRAPHEME_BOUND);
+ items.write[i].text_buf->set_max_lines_visible(p_lines);
} else {
items.write[i].text_buf->set_flags(TextServer::BREAK_NONE);
}
@@ -534,7 +537,7 @@ Size2 ItemList::Item::get_icon_size() const {
return size_result;
}
-void ItemList::_gui_input(const Ref<InputEvent> &p_event) {
+void ItemList::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
double prev_scroll = scroll_bar->get_value();
@@ -930,8 +933,14 @@ void ItemList::_notification(int p_what) {
}
if (items[i].text != "") {
+ int max_width = -1;
+ if (fixed_column_width) {
+ max_width = fixed_column_width;
+ } else if (same_column_width) {
+ max_width = items[i].rect_cache.size.x;
+ }
+ items.write[i].text_buf->set_width(max_width);
Size2 s = items[i].text_buf->get_size();
- //s.width=MIN(s.width,fixed_column_width);
if (icon_mode == ICON_MODE_TOP) {
minsize.x = MAX(minsize.x, s.width);
@@ -1139,11 +1148,8 @@ void ItemList::_notification(int p_what) {
if (icon_mode == ICON_MODE_TOP) {
pos.x += Math::floor((items[i].rect_cache.size.width - icon_size.width) / 2);
- pos.y += MIN(
- Math::floor((items[i].rect_cache.size.height - icon_size.height) / 2),
- items[i].rect_cache.size.height - items[i].min_rect_cache.size.height);
- text_ofs.y = icon_size.height + icon_margin;
- text_ofs.y += items[i].rect_cache.size.height - items[i].min_rect_cache.size.height;
+ pos.y += icon_margin;
+ text_ofs.y = icon_size.height + icon_margin * 2;
} else {
pos.y += Math::floor((items[i].rect_cache.size.height - icon_size.height) / 2);
text_ofs.x = icon_size.width + icon_margin;
@@ -1210,7 +1216,6 @@ void ItemList::_notification(int p_what) {
text_ofs.x = size.width - text_ofs.x - max_len;
}
- items.write[i].text_buf->set_width(max_len);
items.write[i].text_buf->set_align(HALIGN_CENTER);
if (outline_size > 0 && font_outline_color.a > 0) {
@@ -1488,6 +1493,21 @@ bool ItemList::has_auto_height() const {
return auto_height;
}
+void ItemList::set_text_overrun_behavior(TextParagraph::OverrunBehavior p_behavior) {
+ if (text_overrun_behavior != p_behavior) {
+ text_overrun_behavior = p_behavior;
+ for (int i = 0; i < items.size(); i++) {
+ items.write[i].text_buf->set_text_overrun_behavior(p_behavior);
+ }
+ shape_changed = true;
+ update();
+ }
+}
+
+TextParagraph::OverrunBehavior ItemList::get_text_overrun_behavior() const {
+ return text_overrun_behavior;
+}
+
void ItemList::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_item", "text", "icon", "selectable"), &ItemList::add_item, DEFVAL(Variant()), DEFVAL(true));
ClassDB::bind_method(D_METHOD("add_icon_item", "icon", "selectable"), &ItemList::add_icon_item, DEFVAL(true));
@@ -1594,11 +1614,12 @@ void ItemList::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_v_scroll"), &ItemList::get_v_scroll);
- ClassDB::bind_method(D_METHOD("_gui_input"), &ItemList::_gui_input);
-
ClassDB::bind_method(D_METHOD("_set_items"), &ItemList::_set_items);
ClassDB::bind_method(D_METHOD("_get_items"), &ItemList::_get_items);
+ ClassDB::bind_method(D_METHOD("set_text_overrun_behavior", "overrun_behavior"), &ItemList::set_text_overrun_behavior);
+ ClassDB::bind_method(D_METHOD("get_text_overrun_behavior"), &ItemList::get_text_overrun_behavior);
+
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_items", "_get_items");
ADD_PROPERTY(PropertyInfo(Variant::INT, "select_mode", PROPERTY_HINT_ENUM, "Single,Multi"), "set_select_mode", "get_select_mode");
@@ -1606,6 +1627,7 @@ void ItemList::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_rmb_select"), "set_allow_rmb_select", "get_allow_rmb_select");
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_text_lines", PROPERTY_HINT_RANGE, "1,10,1,or_greater"), "set_max_text_lines", "get_max_text_lines");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "auto_height"), "set_auto_height", "has_auto_height");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "text_overrun_behavior", PROPERTY_HINT_ENUM, "Trim Nothing,Trim Characters,Trim Words,Ellipsis,Word Ellipsis"), "set_text_overrun_behavior", "get_text_overrun_behavior");
ADD_GROUP("Columns", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_columns", PROPERTY_HINT_RANGE, "0,10,1,or_greater"), "set_max_columns", "get_max_columns");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "same_column_width"), "set_same_column_width", "is_same_column_width");
@@ -1634,7 +1656,7 @@ void ItemList::_bind_methods() {
ItemList::ItemList() {
scroll_bar = memnew(VScrollBar);
- add_child(scroll_bar);
+ add_child(scroll_bar, false, INTERNAL_MODE_FRONT);
scroll_bar->connect("value_changed", callable_mp(this, &ItemList::_scroll_changed));
diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h
index 86a0174a20..148fa7ba9f 100644
--- a/scene/gui/item_list.h
+++ b/scene/gui/item_list.h
@@ -95,6 +95,7 @@ private:
SelectMode select_mode = SELECT_SINGLE;
IconMode icon_mode = ICON_MODE_LEFT;
VScrollBar *scroll_bar;
+ TextParagraph::OverrunBehavior text_overrun_behavior = TextParagraph::OVERRUN_NO_TRIMMING;
uint64_t search_time_msec = 0;
String search_string;
@@ -122,7 +123,6 @@ private:
void _set_items(const Array &p_items);
void _scroll_changed(double);
- void _gui_input(const Ref<InputEvent> &p_event);
void _shape(int p_idx);
protected:
@@ -130,6 +130,8 @@ protected:
static void _bind_methods();
public:
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
+
int add_item(const String &p_item, const Ref<Texture2D> &p_texture = Ref<Texture2D>(), bool p_selectable = true);
int add_icon_item(const Ref<Texture2D> &p_item, bool p_selectable = true);
@@ -182,6 +184,9 @@ public:
void set_item_custom_fg_color(int p_idx, const Color &p_custom_fg_color);
Color get_item_custom_fg_color(int p_idx) const;
+ void set_text_overrun_behavior(TextParagraph::OverrunBehavior p_behavior);
+ TextParagraph::OverrunBehavior get_text_overrun_behavior() const;
+
void select(int p_idx, bool p_single = true);
void deselect(int p_idx);
void deselect_all();
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 50db1fc3ce..18cde25e55 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -66,11 +66,11 @@ bool Label::is_uppercase() const {
int Label::get_line_height(int p_line) const {
Ref<Font> font = get_theme_font(SNAME("font"));
if (p_line >= 0 && p_line < lines_rid.size()) {
- return TS->shaped_text_get_size(lines_rid[p_line]).y + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM);
+ return TS->shaped_text_get_size(lines_rid[p_line]).y + font->get_spacing(TextServer::SPACING_TOP) + font->get_spacing(TextServer::SPACING_BOTTOM);
} else if (lines_rid.size() > 0) {
int h = 0;
for (int i = 0; i < lines_rid.size(); i++) {
- h = MAX(h, TS->shaped_text_get_size(lines_rid[i]).y) + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM);
+ h = MAX(h, TS->shaped_text_get_size(lines_rid[i]).y) + font->get_spacing(TextServer::SPACING_TOP) + font->get_spacing(TextServer::SPACING_BOTTOM);
}
return h;
} else {
@@ -89,8 +89,15 @@ void Label::_shape() {
} else {
TS->shaped_text_set_direction(text_rid, (TextServer::Direction)text_direction);
}
- TS->shaped_text_add_string(text_rid, (uppercase) ? xl_text.to_upper() : xl_text, get_theme_font(SNAME("font"))->get_rids(), get_theme_font_size(SNAME("font_size")), opentype_features, (language != "") ? language : TranslationServer::get_singleton()->get_tool_locale());
- TS->shaped_text_set_bidi_override(text_rid, structured_text_parser(st_parser, st_args, xl_text));
+ const Ref<Font> &font = get_theme_font(SNAME("font"));
+ int font_size = get_theme_font_size(SNAME("font_size"));
+ ERR_FAIL_COND(font.is_null());
+ String text = (uppercase) ? xl_text.to_upper() : xl_text;
+ if (visible_chars >= 0) {
+ text = text.substr(0, visible_chars);
+ }
+ TS->shaped_text_add_string(text_rid, text, font->get_rids(), font_size, opentype_features, (language != "") ? language : TranslationServer::get_singleton()->get_tool_locale());
+ TS->shaped_text_set_bidi_override(text_rid, structured_text_parser(st_parser, st_args, text));
dirty = false;
lines_dirty = true;
}
@@ -217,14 +224,22 @@ void Label::_update_visible() {
minsize.height = 0;
int last_line = MIN(lines_rid.size(), lines_visible + lines_skipped);
for (int64_t i = lines_skipped; i < last_line; i++) {
- minsize.height += TS->shaped_text_get_size(lines_rid[i]).y + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM) + line_spacing;
+ minsize.height += TS->shaped_text_get_size(lines_rid[i]).y + font->get_spacing(TextServer::SPACING_TOP) + font->get_spacing(TextServer::SPACING_BOTTOM) + line_spacing;
if (minsize.height > (get_size().height - style->get_minimum_size().height + line_spacing)) {
break;
}
}
}
-inline void draw_glyph(const TextServer::Glyph &p_gl, const RID &p_canvas, const Color &p_font_color, const Color &p_font_shadow_color, const Color &p_font_outline_color, const int &p_shadow_outline_size, const int &p_outline_size, const Vector2 &p_ofs, const Vector2 &shadow_ofs) {
+inline void draw_glyph(const TextServer::Glyph &p_gl, const RID &p_canvas, const Color &p_font_color, const Vector2 &p_ofs) {
+ if (p_gl.font_rid != RID()) {
+ TS->font_draw_glyph(p_gl.font_rid, p_canvas, p_gl.font_size, p_ofs + Vector2(p_gl.x_off, p_gl.y_off), p_gl.index, p_font_color);
+ } else {
+ TS->draw_hex_code_box(p_canvas, p_gl.font_size, p_ofs + Vector2(p_gl.x_off, p_gl.y_off), p_gl.index, p_font_color);
+ }
+}
+
+inline void draw_glyph_outline(const TextServer::Glyph &p_gl, const RID &p_canvas, const Color &p_font_color, const Color &p_font_shadow_color, const Color &p_font_outline_color, const int &p_shadow_outline_size, const int &p_outline_size, const Vector2 &p_ofs, const Vector2 &shadow_ofs) {
if (p_gl.font_rid != RID()) {
if (p_font_shadow_color.a > 0) {
TS->font_draw_glyph(p_gl.font_rid, p_canvas, p_gl.font_size, p_ofs + Vector2(p_gl.x_off, p_gl.y_off) + shadow_ofs, p_gl.index, p_font_shadow_color);
@@ -237,9 +252,6 @@ inline void draw_glyph(const TextServer::Glyph &p_gl, const RID &p_canvas, const
if (p_font_outline_color.a != 0.0 && p_outline_size > 0) {
TS->font_draw_glyph_outline(p_gl.font_rid, p_canvas, p_gl.font_size, p_outline_size, p_ofs + Vector2(p_gl.x_off, p_gl.y_off), p_gl.index, p_font_outline_color);
}
- TS->font_draw_glyph(p_gl.font_rid, p_canvas, p_gl.font_size, p_ofs + Vector2(p_gl.x_off, p_gl.y_off), p_gl.index, p_font_color);
- } else {
- TS->draw_hex_code_box(p_canvas, p_gl.font_size, p_ofs + Vector2(p_gl.x_off, p_gl.y_off), p_gl.index, p_font_color);
}
}
@@ -250,11 +262,18 @@ void Label::_notification(int p_what) {
return; // Nothing new.
}
xl_text = new_text;
+ if (percent_visible < 1) {
+ visible_chars = get_total_character_count() * percent_visible;
+ }
dirty = true;
update();
}
+ if (p_what == NOTIFICATION_LAYOUT_DIRECTION_CHANGED) {
+ update();
+ }
+
if (p_what == NOTIFICATION_DRAW) {
if (clip) {
RenderingServer::get_singleton()->canvas_item_set_clip(get_canvas_item(), true);
@@ -278,6 +297,7 @@ void Label::_notification(int p_what) {
int outline_size = get_theme_constant(SNAME("outline_size"));
int shadow_outline_size = get_theme_constant(SNAME("shadow_outline_size"));
bool rtl = TS->shaped_text_get_direction(text_rid);
+ bool rtl_layout = is_layout_rtl();
style->draw(ci, Rect2(Point2(0, 0), get_size()));
@@ -286,7 +306,7 @@ void Label::_notification(int p_what) {
// Get number of lines to fit to the height.
for (int64_t i = lines_skipped; i < lines_rid.size(); i++) {
- total_h += TS->shaped_text_get_size(lines_rid[i]).y + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM) + line_spacing;
+ total_h += TS->shaped_text_get_size(lines_rid[i]).y + font->get_spacing(TextServer::SPACING_TOP) + font->get_spacing(TextServer::SPACING_BOTTOM) + line_spacing;
if (total_h > (get_size().height - style->get_minimum_size().height + line_spacing)) {
break;
}
@@ -302,7 +322,7 @@ void Label::_notification(int p_what) {
// Get real total height.
total_h = 0;
for (int64_t i = lines_skipped; i < last_line; i++) {
- total_h += TS->shaped_text_get_size(lines_rid[i]).y + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM) + line_spacing;
+ total_h += TS->shaped_text_get_size(lines_rid[i]).y + font->get_spacing(TextServer::SPACING_TOP) + font->get_spacing(TextServer::SPACING_BOTTOM) + line_spacing;
}
total_h += style->get_margin(SIDE_TOP) + style->get_margin(SIDE_BOTTOM);
@@ -334,30 +354,12 @@ void Label::_notification(int p_what) {
}
}
- int visible_glyphs = -1;
- int glyhps_drawn = 0;
- if (percent_visible < 1) {
- int total_glyphs = 0;
- for (int i = lines_skipped; i < last_line; i++) {
- const Vector<TextServer::Glyph> visual = TS->shaped_text_get_glyphs(lines_rid[i]);
- const TextServer::Glyph *glyphs = visual.ptr();
- int gl_size = visual.size();
- for (int j = 0; j < gl_size; j++) {
- if ((glyphs[j].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) {
- total_glyphs++;
- }
- }
- }
-
- visible_glyphs = MIN(total_glyphs, visible_chars);
- }
-
Vector2 ofs;
ofs.y = style->get_offset().y + vbegin;
for (int i = lines_skipped; i < last_line; i++) {
Size2 line_size = TS->shaped_text_get_size(lines_rid[i]);
ofs.x = 0;
- ofs.y += TS->shaped_text_get_ascent(lines_rid[i]) + font->get_spacing(Font::SPACING_TOP);
+ ofs.y += TS->shaped_text_get_ascent(lines_rid[i]) + font->get_spacing(TextServer::SPACING_TOP);
switch (align) {
case ALIGN_FILL:
if (rtl && autowrap_mode != AUTOWRAP_OFF) {
@@ -367,13 +369,21 @@ void Label::_notification(int p_what) {
}
break;
case ALIGN_LEFT: {
- ofs.x = style->get_offset().x;
+ if (rtl_layout) {
+ ofs.x = int(size.width - style->get_margin(SIDE_RIGHT) - line_size.width);
+ } else {
+ ofs.x = style->get_offset().x;
+ }
} break;
case ALIGN_CENTER: {
ofs.x = int(size.width - line_size.width) / 2;
} break;
case ALIGN_RIGHT: {
- ofs.x = int(size.width - style->get_margin(SIDE_RIGHT) - line_size.width);
+ if (rtl_layout) {
+ ofs.x = style->get_offset().x;
+ } else {
+ ofs.x = int(size.width - style->get_margin(SIDE_RIGHT) - line_size.width);
+ }
} break;
}
@@ -382,12 +392,61 @@ void Label::_notification(int p_what) {
int gl_size = visual.size();
TextServer::TrimData trim_data = TS->shaped_text_get_trim_data(lines_rid[i]);
+ // Draw outline. Note: Do not merge this into the single loop with the main text, to prevent overlaps.
+ if (font_shadow_color.a > 0 || (font_outline_color.a != 0.0 && outline_size > 0)) {
+ Vector2 offset = ofs;
+ // Draw RTL ellipsis string when necessary.
+ if (rtl && trim_data.ellipsis_pos >= 0) {
+ for (int gl_idx = trim_data.ellipsis_glyph_buf.size() - 1; gl_idx >= 0; gl_idx--) {
+ for (int j = 0; j < trim_data.ellipsis_glyph_buf[gl_idx].repeat; j++) {
+ //Draw glyph outlines and shadow.
+ draw_glyph_outline(trim_data.ellipsis_glyph_buf[gl_idx], ci, font_color, font_shadow_color, font_outline_color, shadow_outline_size, outline_size, offset, shadow_ofs);
+ offset.x += trim_data.ellipsis_glyph_buf[gl_idx].advance;
+ }
+ }
+ }
+
+ // Draw main text.
+ for (int j = 0; j < gl_size; j++) {
+ for (int k = 0; k < glyphs[j].repeat; k++) {
+ // Trim when necessary.
+ if (trim_data.trim_pos >= 0) {
+ if (rtl) {
+ if (j < trim_data.trim_pos && (glyphs[j].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) {
+ continue;
+ }
+ } else {
+ if (j >= trim_data.trim_pos && (glyphs[j].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) {
+ break;
+ }
+ }
+ }
+
+ // Draw glyph outlines and shadow.
+ draw_glyph_outline(glyphs[j], ci, font_color, font_shadow_color, font_outline_color, shadow_outline_size, outline_size, offset, shadow_ofs);
+ offset.x += glyphs[j].advance;
+ }
+ }
+ // Draw LTR ellipsis string when necessary.
+ if (!rtl && trim_data.ellipsis_pos >= 0) {
+ for (int gl_idx = 0; gl_idx < trim_data.ellipsis_glyph_buf.size(); gl_idx++) {
+ for (int j = 0; j < trim_data.ellipsis_glyph_buf[gl_idx].repeat; j++) {
+ //Draw glyph outlines and shadow.
+ draw_glyph_outline(trim_data.ellipsis_glyph_buf[gl_idx], ci, font_color, font_shadow_color, font_outline_color, shadow_outline_size, outline_size, offset, shadow_ofs);
+ offset.x += trim_data.ellipsis_glyph_buf[gl_idx].advance;
+ }
+ }
+ }
+ }
+
+ // Draw main text. Note: Do not merge this into the single loop with the outline, to prevent overlaps.
+
// Draw RTL ellipsis string when necessary.
if (rtl && trim_data.ellipsis_pos >= 0) {
for (int gl_idx = trim_data.ellipsis_glyph_buf.size() - 1; gl_idx >= 0; gl_idx--) {
for (int j = 0; j < trim_data.ellipsis_glyph_buf[gl_idx].repeat; j++) {
//Draw glyph outlines and shadow.
- draw_glyph(trim_data.ellipsis_glyph_buf[gl_idx], ci, font_color, font_shadow_color, font_outline_color, shadow_outline_size, outline_size, ofs, shadow_ofs);
+ draw_glyph(trim_data.ellipsis_glyph_buf[gl_idx], ci, font_color, ofs);
ofs.x += trim_data.ellipsis_glyph_buf[gl_idx].advance;
}
}
@@ -396,14 +455,6 @@ void Label::_notification(int p_what) {
// Draw main text.
for (int j = 0; j < gl_size; j++) {
for (int k = 0; k < glyphs[j].repeat; k++) {
- if (visible_glyphs != -1) {
- if ((glyphs[j].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) {
- if (glyhps_drawn >= visible_glyphs) {
- return;
- }
- }
- }
-
// Trim when necessary.
if (trim_data.trim_pos >= 0) {
if (rtl) {
@@ -418,9 +469,8 @@ void Label::_notification(int p_what) {
}
// Draw glyph outlines and shadow.
- draw_glyph(glyphs[j], ci, font_color, font_shadow_color, font_outline_color, shadow_outline_size, outline_size, ofs, shadow_ofs);
+ draw_glyph(glyphs[j], ci, font_color, ofs);
ofs.x += glyphs[j].advance;
- glyhps_drawn++;
}
}
// Draw LTR ellipsis string when necessary.
@@ -428,12 +478,12 @@ void Label::_notification(int p_what) {
for (int gl_idx = 0; gl_idx < trim_data.ellipsis_glyph_buf.size(); gl_idx++) {
for (int j = 0; j < trim_data.ellipsis_glyph_buf[gl_idx].repeat; j++) {
//Draw glyph outlines and shadow.
- draw_glyph(trim_data.ellipsis_glyph_buf[gl_idx], ci, font_color, font_shadow_color, font_outline_color, shadow_outline_size, outline_size, ofs, shadow_ofs);
+ draw_glyph(trim_data.ellipsis_glyph_buf[gl_idx], ci, font_color, ofs);
ofs.x += trim_data.ellipsis_glyph_buf[gl_idx].advance;
}
}
}
- ofs.y += TS->shaped_text_get_descent(lines_rid[i]) + vsep + line_spacing + font->get_spacing(Font::SPACING_BOTTOM);
+ ofs.y += TS->shaped_text_get_descent(lines_rid[i]) + vsep + line_spacing + font->get_spacing(TextServer::SPACING_BOTTOM);
}
}
@@ -455,7 +505,7 @@ Size2 Label::get_minimum_size() const {
Size2 min_size = minsize;
Ref<Font> font = get_theme_font(SNAME("font"));
- min_size.height = MAX(min_size.height, font->get_height(get_theme_font_size(SNAME("font_size"))) + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM));
+ min_size.height = MAX(min_size.height, font->get_height(get_theme_font_size(SNAME("font_size"))) + font->get_spacing(TextServer::SPACING_TOP) + font->get_spacing(TextServer::SPACING_BOTTOM));
Size2 min_style = get_theme_stylebox(SNAME("normal"))->get_minimum_size();
if (autowrap_mode != AUTOWRAP_OFF) {
@@ -486,7 +536,7 @@ int Label::get_visible_line_count() const {
int lines_visible = 0;
float total_h = 0.0;
for (int64_t i = lines_skipped; i < lines_rid.size(); i++) {
- total_h += TS->shaped_text_get_size(lines_rid[i]).y + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM) + line_spacing;
+ total_h += TS->shaped_text_get_size(lines_rid[i]).y + font->get_spacing(TextServer::SPACING_TOP) + font->get_spacing(TextServer::SPACING_BOTTOM) + line_spacing;
if (total_h > (get_size().height - style->get_minimum_size().height + line_spacing)) {
break;
}
@@ -643,16 +693,16 @@ String Label::get_text() const {
}
void Label::set_visible_characters(int p_amount) {
- visible_chars = p_amount;
- if (get_total_character_count() > 0) {
- percent_visible = (float)p_amount / (float)get_total_character_count();
- } else {
- percent_visible = 1.0;
- }
- if (p_amount == -1) {
- lines_dirty = true;
+ if (visible_chars != p_amount) {
+ visible_chars = p_amount;
+ if (get_total_character_count() > 0) {
+ percent_visible = (float)p_amount / (float)get_total_character_count();
+ } else {
+ percent_visible = 1.0;
+ }
+ dirty = true;
+ update();
}
- update();
}
int Label::get_visible_characters() const {
@@ -660,15 +710,17 @@ int Label::get_visible_characters() const {
}
void Label::set_percent_visible(float p_percent) {
- if (p_percent < 0 || p_percent >= 1) {
- visible_chars = -1;
- percent_visible = 1;
- lines_dirty = true;
- } else {
- visible_chars = get_total_character_count() * p_percent;
- percent_visible = p_percent;
+ if (percent_visible != p_percent) {
+ if (p_percent < 0 || p_percent >= 1) {
+ visible_chars = -1;
+ percent_visible = 1;
+ } else {
+ visible_chars = get_total_character_count() * p_percent;
+ percent_visible = p_percent;
+ }
+ dirty = true;
+ update();
}
- update();
}
float Label::get_percent_visible() const {
@@ -823,7 +875,7 @@ void Label::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "clip_text"), "set_clip_text", "is_clipping_text");
ADD_PROPERTY(PropertyInfo(Variant::INT, "text_overrun_behavior", PROPERTY_HINT_ENUM, "Trim Nothing,Trim Characters,Trim Words,Ellipsis,Word Ellipsis"), "set_text_overrun_behavior", "get_text_overrun_behavior");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "uppercase"), "set_uppercase", "is_uppercase");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_characters", PROPERTY_HINT_RANGE, "-1,128000,1", PROPERTY_USAGE_EDITOR), "set_visible_characters", "get_visible_characters");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_characters", PROPERTY_HINT_RANGE, "-1,128000,1"), "set_visible_characters", "get_visible_characters");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible");
ADD_PROPERTY(PropertyInfo(Variant::INT, "lines_skipped", PROPERTY_HINT_RANGE, "0,999,1"), "set_lines_skipped", "get_lines_skipped");
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_lines_visible", PROPERTY_HINT_RANGE, "-1,999,1"), "set_max_lines_visible", "get_max_lines_visible");
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 11e08b231e..89fd9bfc88 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -216,7 +216,7 @@ void LineEdit::_delete(bool p_word, bool p_all_to_right) {
}
}
-void LineEdit::_gui_input(Ref<InputEvent> p_event) {
+void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseButton> b = p_event;
@@ -260,24 +260,29 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
} else {
if (selecting_enabled) {
- if (!b->is_double_click() && (OS::get_singleton()->get_ticks_msec() - selection.last_dblclk) < 600) {
+ const int triple_click_timeout = 600;
+ const int triple_click_tolerance = 5;
+ const bool is_triple_click = !b->is_double_click() && (OS::get_singleton()->get_ticks_msec() - last_dblclk) < triple_click_timeout && b->get_position().distance_to(last_dblclk_pos) < triple_click_tolerance;
+
+ if (is_triple_click && text.length()) {
// Triple-click select all.
selection.enabled = true;
selection.begin = 0;
selection.end = text.length();
selection.double_click = true;
- selection.last_dblclk = 0;
+ last_dblclk = 0;
caret_column = selection.begin;
} else if (b->is_double_click()) {
// Double-click select word.
+ last_dblclk = OS::get_singleton()->get_ticks_msec();
+ last_dblclk_pos = b->get_position();
Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text_rid);
for (int i = 0; i < words.size(); i++) {
- if (words[i].x < caret_column && words[i].y > caret_column) {
+ if ((words[i].x < caret_column && words[i].y > caret_column) || (i == words.size() - 1 && caret_column == words[i].y)) {
selection.enabled = true;
selection.begin = words[i].x;
selection.end = words[i].y;
selection.double_click = true;
- selection.last_dblclk = OS::get_singleton()->get_ticks_msec();
caret_column = selection.end;
break;
}
@@ -641,7 +646,7 @@ void LineEdit::_notification(int p_what) {
int x_ofs = 0;
bool using_placeholder = text.is_empty() && ime_text.is_empty();
float text_width = TS->shaped_text_get_size(text_rid).x;
- float text_height = TS->shaped_text_get_size(text_rid).y + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM);
+ float text_height = TS->shaped_text_get_size(text_rid).y + font->get_spacing(TextServer::SPACING_TOP) + font->get_spacing(TextServer::SPACING_BOTTOM);
switch (align) {
case ALIGN_FILL:
@@ -674,7 +679,7 @@ void LineEdit::_notification(int p_what) {
int y_ofs = style->get_offset().y + (y_area - text_height) / 2;
Color selection_color = get_theme_color(SNAME("selection_color"));
- Color font_color = is_editable() ? get_theme_color(SNAME("font_color")) : get_theme_color(SNAME("font_uneditable_color"));
+ Color font_color = get_theme_color(is_editable() ? SNAME("font_color") : SNAME("font_uneditable_color"));
Color font_selected_color = get_theme_color(SNAME("font_selected_color"));
Color caret_color = get_theme_color(SNAME("caret_color"));
@@ -1531,7 +1536,7 @@ Size2 LineEdit::get_minimum_size() const {
min_size.width = MAX(min_size.width, full_width + em_space_size);
}
- min_size.height = MAX(TS->shaped_text_get_size(text_rid).y + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM), font->get_height(font_size));
+ min_size.height = MAX(TS->shaped_text_get_size(text_rid).y + font->get_spacing(TextServer::SPACING_TOP) + font->get_spacing(TextServer::SPACING_BOTTOM), font->get_height(font_size));
// Take icons into account.
bool using_placeholder = text.is_empty() && ime_text.is_empty();
@@ -1555,6 +1560,20 @@ void LineEdit::deselect() {
update();
}
+bool LineEdit::has_selection() const {
+ return selection.enabled;
+}
+
+int LineEdit::get_selection_from_column() const {
+ ERR_FAIL_COND_V(!selection.enabled, -1);
+ return selection.begin;
+}
+
+int LineEdit::get_selection_to_column() const {
+ ERR_FAIL_COND_V(!selection.enabled, -1);
+ return selection.end;
+}
+
void LineEdit::selection_delete() {
if (selection.enabled) {
delete_text(selection.begin, selection.end);
@@ -1941,6 +1960,7 @@ void LineEdit::_shape() {
const Ref<Font> &font = get_theme_font(SNAME("font"));
int font_size = get_theme_font_size(SNAME("font_size"));
+ ERR_FAIL_COND(font.is_null());
TS->shaped_text_add_string(text_rid, t, font->get_rids(), font_size, opentype_features, (language != "") ? language : TranslationServer::get_singleton()->get_tool_locale());
TS->shaped_text_set_bidi_override(text_rid, structured_text_parser(st_parser, st_args, t));
@@ -2084,11 +2104,13 @@ void LineEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_align", "align"), &LineEdit::set_align);
ClassDB::bind_method(D_METHOD("get_align"), &LineEdit::get_align);
- ClassDB::bind_method(D_METHOD("_gui_input"), &LineEdit::_gui_input);
ClassDB::bind_method(D_METHOD("clear"), &LineEdit::clear);
ClassDB::bind_method(D_METHOD("select", "from", "to"), &LineEdit::select, DEFVAL(0), DEFVAL(-1));
ClassDB::bind_method(D_METHOD("select_all"), &LineEdit::select_all);
ClassDB::bind_method(D_METHOD("deselect"), &LineEdit::deselect);
+ ClassDB::bind_method(D_METHOD("has_selection"), &LineEdit::has_selection);
+ ClassDB::bind_method(D_METHOD("get_selection_from_column"), &LineEdit::get_selection_from_column);
+ ClassDB::bind_method(D_METHOD("get_selection_to_column"), &LineEdit::get_selection_to_column);
ClassDB::bind_method(D_METHOD("set_text", "text"), &LineEdit::set_text);
ClassDB::bind_method(D_METHOD("get_text"), &LineEdit::get_text);
ClassDB::bind_method(D_METHOD("get_draw_control_chars"), &LineEdit::get_draw_control_chars);
@@ -2220,7 +2242,7 @@ void LineEdit::_bind_methods() {
void LineEdit::_ensure_menu() {
if (!menu) {
menu = memnew(PopupMenu);
- add_child(menu);
+ add_child(menu, false, INTERNAL_MODE_FRONT);
menu_dir = memnew(PopupMenu);
menu_dir->set_name("DirMenu");
@@ -2305,7 +2327,7 @@ LineEdit::LineEdit() {
set_mouse_filter(MOUSE_FILTER_STOP);
caret_blink_timer = memnew(Timer);
- add_child(caret_blink_timer);
+ add_child(caret_blink_timer, false, INTERNAL_MODE_FRONT);
caret_blink_timer->set_wait_time(0.65);
caret_blink_timer->connect("timeout", callable_mp(this, &LineEdit::_toggle_draw_caret));
set_caret_blink_enabled(false);
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index 0e9c032e88..923024dd56 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -136,7 +136,6 @@ private:
bool creating = false;
bool double_click = false;
bool drag_attempt = false;
- uint64_t last_dblclk = 0;
} selection;
struct TextOperation {
@@ -153,6 +152,9 @@ private:
bool pressing_inside = false;
} clear_button_status;
+ uint64_t last_dblclk = 0;
+ Vector2 last_dblclk_pos;
+
bool caret_blink_enabled = false;
bool caret_force_displayed = false;
bool draw_caret = true;
@@ -202,7 +204,7 @@ private:
protected:
void _notification(int p_what);
static void _bind_methods();
- void _gui_input(Ref<InputEvent> p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
bool _set(const StringName &p_name, const Variant &p_value);
bool _get(const StringName &p_name, Variant &r_ret) const;
@@ -229,6 +231,9 @@ public:
void select_all();
void selection_delete();
void deselect();
+ bool has_selection() const;
+ int get_selection_from_column() const;
+ int get_selection_to_column() const;
void delete_char();
void delete_text(int p_from_column, int p_to_column);
diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp
index 419d49bccf..925e6f5b97 100644
--- a/scene/gui/link_button.cpp
+++ b/scene/gui/link_button.cpp
@@ -41,12 +41,16 @@ void LinkButton::_shape() {
} else {
text_buf->set_direction((TextServer::Direction)text_direction);
}
- TS->shaped_text_set_bidi_override(text_buf->get_rid(), structured_text_parser(st_parser, st_args, text));
- text_buf->add_string(text, font, font_size, opentype_features, (language != "") ? language : TranslationServer::get_singleton()->get_tool_locale());
+ TS->shaped_text_set_bidi_override(text_buf->get_rid(), structured_text_parser(st_parser, st_args, xl_text));
+ text_buf->add_string(xl_text, font, font_size, opentype_features, (language != "") ? language : TranslationServer::get_singleton()->get_tool_locale());
}
void LinkButton::set_text(const String &p_text) {
+ if (text == p_text) {
+ return;
+ }
text = p_text;
+ xl_text = atr(text);
_shape();
minimum_size_changed();
update();
@@ -141,7 +145,13 @@ Size2 LinkButton::get_minimum_size() const {
void LinkButton::_notification(int p_what) {
switch (p_what) {
- case NOTIFICATION_TRANSLATION_CHANGED:
+ case NOTIFICATION_TRANSLATION_CHANGED: {
+ xl_text = atr(text);
+ _shape();
+
+ minimum_size_changed();
+ update();
+ } break;
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
update();
} break;
diff --git a/scene/gui/link_button.h b/scene/gui/link_button.h
index 7eaa9f88b6..231543c63c 100644
--- a/scene/gui/link_button.h
+++ b/scene/gui/link_button.h
@@ -47,6 +47,7 @@ public:
private:
String text;
+ String xl_text;
Ref<TextLine> text_buf;
UnderlineMode underline_mode = UNDERLINE_MODE_ALWAYS;
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index dc6c7fec28..ceb2092e3a 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -33,7 +33,7 @@
#include "core/os/keyboard.h"
#include "scene/main/window.h"
-void MenuButton::_unhandled_key_input(Ref<InputEvent> p_event) {
+void MenuButton::unhandled_key_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (!_is_focus_owner_in_shorcut_context()) {
@@ -87,21 +87,23 @@ void MenuButton::_popup_visibility_changed(bool p_visible) {
void MenuButton::pressed() {
emit_signal(SNAME("about_to_popup"));
- Size2 size = get_size();
+ Size2 size = get_size() * get_viewport()->get_canvas_transform().get_scale();
+ popup->set_size(Size2(size.width, 0));
Point2 gp = get_screen_position();
- gp.y += get_size().y;
-
+ gp.y += size.y;
+ if (is_layout_rtl()) {
+ gp.x += size.width - popup->get_size().width;
+ }
popup->set_position(gp);
+ popup->set_parent_rect(Rect2(Point2(gp - popup->get_position()), size));
- popup->set_size(Size2(size.width, 0));
- popup->set_parent_rect(Rect2(Point2(gp - popup->get_position()), get_size()));
popup->take_mouse_focus();
popup->popup();
}
-void MenuButton::_gui_input(Ref<InputEvent> p_event) {
- BaseButton::_gui_input(p_event);
+void MenuButton::gui_input(const Ref<InputEvent> &p_event) {
+ BaseButton::gui_input(p_event);
}
PopupMenu *MenuButton::get_popup() const {
@@ -172,7 +174,7 @@ MenuButton::MenuButton() {
popup = memnew(PopupMenu);
popup->hide();
- add_child(popup);
+ add_child(popup, false, INTERNAL_MODE_FRONT);
popup->connect("about_to_popup", callable_mp(this, &MenuButton::_popup_visibility_changed), varray(true));
popup->connect("popup_hide", callable_mp(this, &MenuButton::_popup_visibility_changed), varray(false));
}
diff --git a/scene/gui/menu_button.h b/scene/gui/menu_button.h
index cc2ca117c4..730495b65d 100644
--- a/scene/gui/menu_button.h
+++ b/scene/gui/menu_button.h
@@ -47,14 +47,14 @@ class MenuButton : public Button {
Array _get_items() const;
void _set_items(const Array &p_items);
- void _gui_input(Ref<InputEvent> p_event) override;
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _popup_visibility_changed(bool p_visible);
protected:
void _notification(int p_what);
static void _bind_methods();
- virtual void _unhandled_key_input(Ref<InputEvent> p_event) override;
+ virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override;
public:
virtual void pressed() override;
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index cd55f258b3..2adeb2d947 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -115,7 +115,7 @@ void OptionButton::_selected(int p_which) {
}
void OptionButton::pressed() {
- Size2 size = get_size();
+ Size2 size = get_size() * get_viewport()->get_canvas_transform().get_scale();
popup->set_position(get_screen_position() + Size2(0, size.height * get_global_transform().get_scale().y));
popup->set_size(Size2(size.width, 0));
popup->popup();
@@ -351,7 +351,7 @@ OptionButton::OptionButton() {
popup = memnew(PopupMenu);
popup->hide();
- add_child(popup);
+ add_child(popup, false, INTERNAL_MODE_FRONT);
popup->connect("index_pressed", callable_mp(this, &OptionButton::_selected));
popup->connect("id_focused", callable_mp(this, &OptionButton::_focused));
popup->connect("popup_hide", callable_mp((BaseButton *)this, &BaseButton::set_pressed), varray(false));
diff --git a/scene/gui/option_button.h b/scene/gui/option_button.h
index d846e395ad..953337ecce 100644
--- a/scene/gui/option_button.h
+++ b/scene/gui/option_button.h
@@ -56,6 +56,10 @@ protected:
static void _bind_methods();
public:
+ // ATTENTION: This is used by the POT generator's scene parser. If the number of properties returned by `_get_items()` ever changes,
+ // this value should be updated to reflect the new size.
+ static const int ITEM_PROPERTY_SIZE = 5;
+
void add_icon_item(const Ref<Texture2D> &p_icon, const String &p_label, int p_id = -1);
void add_item(const String &p_label, int p_id = -1);
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index f7e7e1cd60..be05fd5a60 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -194,7 +194,7 @@ Popup::~Popup() {
}
Size2 PopupPanel::_get_contents_minimum_size() const {
- Ref<StyleBox> p = get_theme_stylebox("panel", get_class_name());
+ Ref<StyleBox> p = get_theme_stylebox(SNAME("panel"), get_class_name());
Size2 ms;
@@ -217,7 +217,7 @@ Size2 PopupPanel::_get_contents_minimum_size() const {
}
void PopupPanel::_update_child_rects() {
- Ref<StyleBox> p = get_theme_stylebox("panel", get_class_name());
+ Ref<StyleBox> p = get_theme_stylebox(SNAME("panel"), get_class_name());
Vector2 cpos(p->get_offset());
Vector2 csize(get_size() - p->get_minimum_size());
@@ -244,9 +244,9 @@ void PopupPanel::_update_child_rects() {
void PopupPanel::_notification(int p_what) {
if (p_what == NOTIFICATION_THEME_CHANGED) {
- panel->add_theme_style_override("panel", get_theme_stylebox("panel", get_class_name()));
+ panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), get_class_name()));
} else if (p_what == NOTIFICATION_READY || p_what == NOTIFICATION_ENTER_TREE) {
- panel->add_theme_style_override("panel", get_theme_stylebox("panel", get_class_name()));
+ panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), get_class_name()));
_update_child_rects();
} else if (p_what == NOTIFICATION_WM_SIZE_CHANGED) {
_update_child_rects();
@@ -255,5 +255,5 @@ void PopupPanel::_notification(int p_what) {
PopupPanel::PopupPanel() {
panel = memnew(Panel);
- add_child(panel);
+ add_child(panel, false, INTERNAL_MODE_FRONT);
}
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 4bd88fde5f..c0a559e624 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -228,6 +228,7 @@ void PopupMenu::_activate_submenu(int p_over) {
// Set autohide areas
PopupMenu *submenu_pum = Object::cast_to<PopupMenu>(submenu_popup);
if (submenu_pum) {
+ submenu_pum->take_mouse_focus();
// Make the position of the parent popup relative to submenu popup
this_rect.position = this_rect.position - submenu_pum->get_position();
@@ -251,7 +252,7 @@ void PopupMenu::_submenu_timeout() {
submenu_over = -1;
}
-void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) {
+void PopupMenu::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (p_event->is_action("ui_down") && p_event->is_pressed()) {
@@ -358,9 +359,10 @@ void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) {
}
int button_idx = b->get_button_index();
- if (b->is_pressed() || (!b->is_pressed() && during_grabbed_click)) {
- // Allow activating item by releasing the LMB or any that was down when the popup appeared.
- // However, if button was not held when opening menu, do not allow release to activate item.
+ if (!b->is_pressed()) {
+ // Activate the item on release of either the left mouse button or
+ // any mouse button held down when the popup was opened.
+ // This allows for opening the popup and triggering an action in a single mouse click.
if (button_idx == MOUSE_BUTTON_LEFT || (initial_button_mask & (1 << (button_idx - 1)))) {
bool was_during_grabbed_click = during_grabbed_click;
during_grabbed_click = false;
@@ -1580,8 +1582,6 @@ void PopupMenu::take_mouse_focus() {
}
void PopupMenu::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &PopupMenu::_gui_input);
-
ClassDB::bind_method(D_METHOD("add_item", "label", "id", "accel"), &PopupMenu::add_item, DEFVAL(-1), DEFVAL(0));
ClassDB::bind_method(D_METHOD("add_icon_item", "texture", "label", "id", "accel"), &PopupMenu::add_icon_item, DEFVAL(-1), DEFVAL(0));
ClassDB::bind_method(D_METHOD("add_check_item", "label", "id", "accel"), &PopupMenu::add_check_item, DEFVAL(-1), DEFVAL(0));
@@ -1690,7 +1690,7 @@ PopupMenu::PopupMenu() {
// Margin Container
margin_container = memnew(MarginContainer);
margin_container->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
- add_child(margin_container);
+ add_child(margin_container, false, INTERNAL_MODE_FRONT);
margin_container->connect("draw", callable_mp(this, &PopupMenu::_draw_background));
// Scroll Container
@@ -1704,22 +1704,22 @@ PopupMenu::PopupMenu() {
control->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
control->set_h_size_flags(Control::SIZE_EXPAND_FILL);
control->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- scroll_container->add_child(control);
+ scroll_container->add_child(control, false, INTERNAL_MODE_FRONT);
control->connect("draw", callable_mp(this, &PopupMenu::_draw_items));
- connect("window_input", callable_mp(this, &PopupMenu::_gui_input));
+ connect("window_input", callable_mp(this, &PopupMenu::gui_input));
submenu_timer = memnew(Timer);
submenu_timer->set_wait_time(0.3);
submenu_timer->set_one_shot(true);
submenu_timer->connect("timeout", callable_mp(this, &PopupMenu::_submenu_timeout));
- add_child(submenu_timer);
+ add_child(submenu_timer, false, INTERNAL_MODE_FRONT);
minimum_lifetime_timer = memnew(Timer);
minimum_lifetime_timer->set_wait_time(0.3);
minimum_lifetime_timer->set_one_shot(true);
minimum_lifetime_timer->connect("timeout", callable_mp(this, &PopupMenu::_minimum_lifetime_timeout));
- add_child(minimum_lifetime_timer);
+ add_child(minimum_lifetime_timer, false, INTERNAL_MODE_FRONT);
}
PopupMenu::~PopupMenu() {
diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h
index aedc5d0155..428076c6da 100644
--- a/scene/gui/popup_menu.h
+++ b/scene/gui/popup_menu.h
@@ -31,10 +31,10 @@
#ifndef POPUP_MENU_H
#define POPUP_MENU_H
+#include "core/input/shortcut.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/popup.h"
#include "scene/gui/scroll_container.h"
-#include "scene/gui/shortcut.h"
#include "scene/resources/text_line.h"
class PopupMenu : public Popup {
@@ -107,7 +107,7 @@ class PopupMenu : public Popup {
void _shape_item(int p_item);
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event);
void _activate_submenu(int p_over);
void _submenu_timeout();
@@ -144,6 +144,10 @@ protected:
static void _bind_methods();
public:
+ // ATTENTION: This is used by the POT generator's scene parser. If the number of properties returned by `_get_items()` ever changes,
+ // this value should be updated to reflect the new size.
+ static const int ITEM_PROPERTY_SIZE = 10;
+
void add_item(const String &p_label, int p_id = -1, uint32_t p_accel = 0);
void add_icon_item(const Ref<Texture2D> &p_icon, const String &p_label, int p_id = -1, uint32_t p_accel = 0);
void add_check_item(const String &p_label, int p_id = -1, uint32_t p_accel = 0);
diff --git a/scene/gui/rich_text_effect.cpp b/scene/gui/rich_text_effect.cpp
index 39718a269a..076fa132c0 100644
--- a/scene/gui/rich_text_effect.cpp
+++ b/scene/gui/rich_text_effect.cpp
@@ -32,8 +32,15 @@
#include "core/object/script_language.h"
-void RichTextEffect::_bind_methods() {
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_process_custom_fx", PropertyInfo(Variant::OBJECT, "char_fx", PROPERTY_HINT_RESOURCE_TYPE, "CharFXTransform")));
+CharFXTransform::CharFXTransform() {
+}
+
+CharFXTransform::~CharFXTransform() {
+ environment.clear();
+}
+
+void RichTextEffect::_bind_methods(){
+ GDVIRTUAL_BIND(_process_custom_fx, "char_fx")
}
Variant RichTextEffect::get_bbcode() const {
@@ -49,15 +56,10 @@ Variant RichTextEffect::get_bbcode() const {
bool RichTextEffect::_process_effect_impl(Ref<CharFXTransform> p_cfx) {
bool return_value = false;
- if (get_script_instance()) {
- Variant v = get_script_instance()->call("_process_custom_fx", p_cfx);
- if (v.get_type() != Variant::BOOL) {
- return_value = false;
- } else {
- return_value = (bool)v;
- }
+ if (GDVIRTUAL_CALL(_process_custom_fx, p_cfx, return_value)) {
+ return return_value;
}
- return return_value;
+ return false;
}
RichTextEffect::RichTextEffect() {
@@ -88,6 +90,12 @@ void CharFXTransform::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_glyph_index"), &CharFXTransform::get_glyph_index);
ClassDB::bind_method(D_METHOD("set_glyph_index", "glyph_index"), &CharFXTransform::set_glyph_index);
+ ClassDB::bind_method(D_METHOD("get_glyph_count"), &CharFXTransform::get_glyph_count);
+ ClassDB::bind_method(D_METHOD("set_glyph_count", "glyph_count"), &CharFXTransform::set_glyph_count);
+
+ ClassDB::bind_method(D_METHOD("get_glyph_flags"), &CharFXTransform::get_glyph_flags);
+ ClassDB::bind_method(D_METHOD("set_glyph_flags", "glyph_flags"), &CharFXTransform::set_glyph_flags);
+
ClassDB::bind_method(D_METHOD("get_font"), &CharFXTransform::get_font);
ClassDB::bind_method(D_METHOD("set_font", "font"), &CharFXTransform::set_font);
@@ -99,12 +107,7 @@ void CharFXTransform::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "env"), "set_environment", "get_environment");
ADD_PROPERTY(PropertyInfo(Variant::INT, "glyph_index"), "set_glyph_index", "get_glyph_index");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "glyph_count"), "set_glyph_count", "get_glyph_count");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "glyph_flags"), "set_glyph_flags", "get_glyph_flags");
ADD_PROPERTY(PropertyInfo(Variant::RID, "font"), "set_font", "get_font");
}
-
-CharFXTransform::CharFXTransform() {
-}
-
-CharFXTransform::~CharFXTransform() {
- environment.clear();
-}
diff --git a/scene/gui/rich_text_effect.h b/scene/gui/rich_text_effect.h
index 67323e7f93..5681f9b193 100644
--- a/scene/gui/rich_text_effect.h
+++ b/scene/gui/rich_text_effect.h
@@ -32,20 +32,8 @@
#define RICH_TEXT_EFFECT_H
#include "core/io/resource.h"
-
-class RichTextEffect : public Resource {
- GDCLASS(RichTextEffect, Resource);
- OBJ_SAVE_TYPE(RichTextEffect);
-
-protected:
- static void _bind_methods();
-
-public:
- Variant get_bbcode() const;
- bool _process_effect_impl(Ref<class CharFXTransform> p_cfx);
-
- RichTextEffect();
-};
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
class CharFXTransform : public RefCounted {
GDCLASS(CharFXTransform, RefCounted);
@@ -61,7 +49,9 @@ public:
Color color;
double elapsed_time = 0.0f;
Dictionary environment;
- uint32_t glpyh_index = 0;
+ uint32_t glyph_index = 0;
+ uint16_t glyph_flags = 0;
+ uint8_t glyph_count = 0;
RID font;
CharFXTransform();
@@ -69,19 +59,31 @@ public:
Vector2i get_range() { return range; }
void set_range(const Vector2i &p_range) { range = p_range; }
+
double get_elapsed_time() { return elapsed_time; }
void set_elapsed_time(double p_elapsed_time) { elapsed_time = p_elapsed_time; }
+
bool is_visible() { return visibility; }
void set_visibility(bool p_visibility) { visibility = p_visibility; }
+
bool is_outline() { return outline; }
void set_outline(bool p_outline) { outline = p_outline; }
+
Point2 get_offset() { return offset; }
void set_offset(Point2 p_offset) { offset = p_offset; }
+
Color get_color() { return color; }
void set_color(Color p_color) { color = p_color; }
- uint32_t get_glyph_index() const { return glpyh_index; };
- void set_glyph_index(uint32_t p_glpyh_index) { glpyh_index = p_glpyh_index; };
+ uint32_t get_glyph_index() const { return glyph_index; };
+ void set_glyph_index(uint32_t p_glyph_index) { glyph_index = p_glyph_index; };
+
+ uint16_t get_glyph_flags() const { return glyph_index; };
+ void set_glyph_flags(uint16_t p_glyph_flags) { glyph_flags = p_glyph_flags; };
+
+ uint8_t get_glyph_count() const { return glyph_count; };
+ void set_glyph_count(uint8_t p_glyph_count) { glyph_count = p_glyph_count; };
+
RID get_font() const { return font; };
void set_font(RID p_font) { font = p_font; };
@@ -89,4 +91,20 @@ public:
void set_environment(Dictionary p_environment) { environment = p_environment; }
};
+class RichTextEffect : public Resource {
+ GDCLASS(RichTextEffect, Resource);
+ OBJ_SAVE_TYPE(RichTextEffect);
+
+protected:
+ static void _bind_methods();
+
+ GDVIRTUAL1RC(bool, _process_custom_fx, Ref<CharFXTransform>)
+
+public:
+ Variant get_bbcode() const;
+ bool _process_effect_impl(Ref<class CharFXTransform> p_cfx);
+
+ RichTextEffect();
+};
+
#endif // RICH_TEXT_EFFECT_H
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index cf2a1481a1..277026cc28 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -333,7 +333,7 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font>
} else {
frame->lines.write[i].offset.y = 0;
}
- frame->lines.write[i].offset += Vector2(offset.x, offset.y);
+ frame->lines.write[i].offset += offset;
float h = frame->lines[i].text_buf->get_size().y;
if (frame->min_size_over.y > 0) {
@@ -366,7 +366,7 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font>
}
if (p_line > 0) {
- l.offset.y = p_frame->lines[p_line - 1].offset.y + p_frame->lines[p_line - 1].text_buf->get_size().y;
+ l.offset.y = p_frame->lines[p_line - 1].offset.y + p_frame->lines[p_line - 1].text_buf->get_size().y + get_theme_constant(SNAME("line_separation"));
} else {
l.offset.y = 0;
}
@@ -399,8 +399,9 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
// Shape current paragraph.
String text;
Item *it_to = (p_line + 1 < p_frame->lines.size()) ? p_frame->lines[p_line + 1].from : nullptr;
+ int remaining_characters = visible_characters - l.char_offset;
for (Item *it = l.from; it && it != it_to; it = _get_next_item(it)) {
- if (visible_characters >= 0 && l.char_offset + l.char_count > visible_characters) {
+ if (visible_characters >= 0 && remaining_characters <= 0) {
break;
}
switch (it->type) {
@@ -427,7 +428,8 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
}
l.text_buf->add_string("\n", font, font_size, Dictionary(), "");
text += "\n";
- l.char_count += 1;
+ l.char_count++;
+ remaining_characters--;
} break;
case ITEM_TEXT: {
ItemText *t = (ItemText *)it;
@@ -442,9 +444,10 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
Dictionary font_ftr = _find_font_features(it);
String lang = _find_language(it);
String tx = t->text;
- if (visible_characters >= 0 && l.char_offset + l.char_count + tx.length() > visible_characters) {
- tx = tx.substr(0, l.char_offset + l.char_count + tx.length() - visible_characters);
+ if (visible_characters >= 0 && remaining_characters >= 0) {
+ tx = tx.substr(0, remaining_characters);
}
+ remaining_characters -= tx.length();
l.text_buf->add_string(tx, font, font_size, font_ftr, lang);
text += tx;
@@ -454,7 +457,8 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
ItemImage *img = (ItemImage *)it;
l.text_buf->add_object((uint64_t)it, img->image->get_size(), img->inline_align, 1);
text += String::chr(0xfffc);
- l.char_count += 1;
+ l.char_count++;
+ remaining_characters--;
} break;
case ITEM_TABLE: {
ItemTable *table = static_cast<ItemTable *>(it);
@@ -483,6 +487,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
int cell_ch = (char_offset - (l.char_offset + l.char_count));
l.char_count += cell_ch;
t_char_count += cell_ch;
+ remaining_characters -= cell_ch;
table->columns.write[column].min_width = MAX(table->columns[column].min_width, ceil(frame->lines[i].text_buf->get_size().x));
table->columns.write[column].max_width = MAX(table->columns[column].max_width, ceil(frame->lines[i].text_buf->get_non_wraped_size().x));
@@ -573,7 +578,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
} else {
frame->lines.write[i].offset.y = 0;
}
- frame->lines.write[i].offset += Vector2(offset.x, offset.y);
+ frame->lines.write[i].offset += offset;
float h = frame->lines[i].text_buf->get_size().y;
if (frame->min_size_over.y > 0) {
@@ -614,7 +619,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
*r_char_offset = l.char_offset + l.char_count;
if (p_line > 0) {
- l.offset.y = p_frame->lines[p_line - 1].offset.y + p_frame->lines[p_line - 1].text_buf->get_size().y;
+ l.offset.y = p_frame->lines[p_line - 1].offset.y + p_frame->lines[p_line - 1].text_buf->get_size().y + get_theme_constant(SNAME("line_separation"));
} else {
l.offset.y = 0;
}
@@ -847,6 +852,21 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
Point2 fx_offset = Vector2(glyphs[i].x_off, glyphs[i].y_off);
RID frid = glyphs[i].font_rid;
uint32_t gl = glyphs[i].index;
+ uint16_t gl_fl = glyphs[i].flags;
+ uint8_t gl_cn = glyphs[i].count;
+ bool cprev = false;
+ if (gl_cn == 0) { // Parts of the same cluster, always connected.
+ cprev = true;
+ }
+ if (gl_fl & TextServer::GRAPHEME_IS_RTL) { // Check if previous grapheme cluster is connected.
+ if (i > 0 && (glyphs[i - 1].flags & TextServer::GRAPHEME_IS_CONNECTED)) {
+ cprev = true;
+ }
+ } else {
+ if (glyphs[i].flags & TextServer::GRAPHEME_IS_CONNECTED) {
+ cprev = true;
+ }
+ }
//Apply fx.
float faded_visibility = 1.0f;
@@ -874,7 +894,9 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
charfx->visibility = visible;
charfx->outline = true;
charfx->font = frid;
- charfx->glpyh_index = gl;
+ charfx->glyph_index = gl;
+ charfx->glyph_flags = gl_fl;
+ charfx->glyph_count = gl_cn;
charfx->offset = fx_offset;
charfx->color = font_color;
@@ -884,31 +906,40 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
fx_offset += charfx->offset;
font_color = charfx->color;
frid = charfx->font;
- gl = charfx->glpyh_index;
+ gl = charfx->glyph_index;
visible &= charfx->visibility;
}
} else if (item_fx->type == ITEM_SHAKE) {
ItemShake *item_shake = static_cast<ItemShake *>(item_fx);
- uint64_t char_current_rand = item_shake->offset_random(glyphs[i].start);
- uint64_t char_previous_rand = item_shake->offset_previous_random(glyphs[i].start);
- uint64_t max_rand = 2147483647;
- double current_offset = Math::range_lerp(char_current_rand % max_rand, 0, max_rand, 0.0f, 2.f * (float)Math_PI);
- double previous_offset = Math::range_lerp(char_previous_rand % max_rand, 0, max_rand, 0.0f, 2.f * (float)Math_PI);
- double n_time = (double)(item_shake->elapsed_time / (0.5f / item_shake->rate));
- n_time = (n_time > 1.0) ? 1.0 : n_time;
- fx_offset += Point2(Math::lerp(Math::sin(previous_offset), Math::sin(current_offset), n_time), Math::lerp(Math::cos(previous_offset), Math::cos(current_offset), n_time)) * (float)item_shake->strength / 10.0f;
+ if (!cprev) {
+ uint64_t char_current_rand = item_shake->offset_random(glyphs[i].start);
+ uint64_t char_previous_rand = item_shake->offset_previous_random(glyphs[i].start);
+ uint64_t max_rand = 2147483647;
+ double current_offset = Math::range_lerp(char_current_rand % max_rand, 0, max_rand, 0.0f, 2.f * (float)Math_PI);
+ double previous_offset = Math::range_lerp(char_previous_rand % max_rand, 0, max_rand, 0.0f, 2.f * (float)Math_PI);
+ double n_time = (double)(item_shake->elapsed_time / (0.5f / item_shake->rate));
+ n_time = (n_time > 1.0) ? 1.0 : n_time;
+ item_shake->prev_off = Point2(Math::lerp(Math::sin(previous_offset), Math::sin(current_offset), n_time), Math::lerp(Math::cos(previous_offset), Math::cos(current_offset), n_time)) * (float)item_shake->strength / 10.0f;
+ }
+ fx_offset += item_shake->prev_off;
} else if (item_fx->type == ITEM_WAVE) {
ItemWave *item_wave = static_cast<ItemWave *>(item_fx);
- double value = Math::sin(item_wave->frequency * item_wave->elapsed_time + ((p_ofs.x + off.x) / 50)) * (item_wave->amplitude / 10.0f);
- fx_offset += Point2(0, 1) * value;
+ if (!cprev) {
+ double value = Math::sin(item_wave->frequency * item_wave->elapsed_time + ((p_ofs.x + gloff.x) / 50)) * (item_wave->amplitude / 10.0f);
+ item_wave->prev_off = Point2(0, 1) * value;
+ }
+ fx_offset += item_wave->prev_off;
} else if (item_fx->type == ITEM_TORNADO) {
ItemTornado *item_tornado = static_cast<ItemTornado *>(item_fx);
- double torn_x = Math::sin(item_tornado->frequency * item_tornado->elapsed_time + ((p_ofs.x + gloff.x) / 50)) * (item_tornado->radius);
- double torn_y = Math::cos(item_tornado->frequency * item_tornado->elapsed_time + ((p_ofs.x + gloff.x) / 50)) * (item_tornado->radius);
- fx_offset += Point2(torn_x, torn_y);
+ if (!cprev) {
+ double torn_x = Math::sin(item_tornado->frequency * item_tornado->elapsed_time + ((p_ofs.x + gloff.x) / 50)) * (item_tornado->radius);
+ double torn_y = Math::cos(item_tornado->frequency * item_tornado->elapsed_time + ((p_ofs.x + gloff.x) / 50)) * (item_tornado->radius);
+ item_tornado->prev_off = Point2(torn_x, torn_y);
+ }
+ fx_offset += item_tornado->prev_off;
} else if (item_fx->type == ITEM_RAINBOW) {
ItemRainbow *item_rainbow = static_cast<ItemRainbow *>(item_fx);
@@ -999,6 +1030,21 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
Point2 fx_offset = Vector2(glyphs[i].x_off, glyphs[i].y_off);
RID frid = glyphs[i].font_rid;
uint32_t gl = glyphs[i].index;
+ uint16_t gl_fl = glyphs[i].flags;
+ uint8_t gl_cn = glyphs[i].count;
+ bool cprev = false;
+ if (gl_cn == 0) { // Parts of the same grapheme cluster, always connected.
+ cprev = true;
+ }
+ if (gl_fl & TextServer::GRAPHEME_IS_RTL) { // Check if previous grapheme cluster is connected.
+ if (i > 0 && (glyphs[i - 1].flags & TextServer::GRAPHEME_IS_CONNECTED)) {
+ cprev = true;
+ }
+ } else {
+ if (glyphs[i].flags & TextServer::GRAPHEME_IS_CONNECTED) {
+ cprev = true;
+ }
+ }
//Apply fx.
float faded_visibility = 1.0f;
@@ -1026,7 +1072,9 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
charfx->visibility = visible;
charfx->outline = false;
charfx->font = frid;
- charfx->glpyh_index = gl;
+ charfx->glyph_index = gl;
+ charfx->glyph_flags = gl_fl;
+ charfx->glyph_count = gl_cn;
charfx->offset = fx_offset;
charfx->color = font_color;
@@ -1036,31 +1084,40 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
fx_offset += charfx->offset;
font_color = charfx->color;
frid = charfx->font;
- gl = charfx->glpyh_index;
+ gl = charfx->glyph_index;
visible &= charfx->visibility;
}
} else if (item_fx->type == ITEM_SHAKE) {
ItemShake *item_shake = static_cast<ItemShake *>(item_fx);
- uint64_t char_current_rand = item_shake->offset_random(glyphs[i].start);
- uint64_t char_previous_rand = item_shake->offset_previous_random(glyphs[i].start);
- uint64_t max_rand = 2147483647;
- double current_offset = Math::range_lerp(char_current_rand % max_rand, 0, max_rand, 0.0f, 2.f * (float)Math_PI);
- double previous_offset = Math::range_lerp(char_previous_rand % max_rand, 0, max_rand, 0.0f, 2.f * (float)Math_PI);
- double n_time = (double)(item_shake->elapsed_time / (0.5f / item_shake->rate));
- n_time = (n_time > 1.0) ? 1.0 : n_time;
- fx_offset += Point2(Math::lerp(Math::sin(previous_offset), Math::sin(current_offset), n_time), Math::lerp(Math::cos(previous_offset), Math::cos(current_offset), n_time)) * (float)item_shake->strength / 10.0f;
+ if (!cprev) {
+ uint64_t char_current_rand = item_shake->offset_random(glyphs[i].start);
+ uint64_t char_previous_rand = item_shake->offset_previous_random(glyphs[i].start);
+ uint64_t max_rand = 2147483647;
+ double current_offset = Math::range_lerp(char_current_rand % max_rand, 0, max_rand, 0.0f, 2.f * (float)Math_PI);
+ double previous_offset = Math::range_lerp(char_previous_rand % max_rand, 0, max_rand, 0.0f, 2.f * (float)Math_PI);
+ double n_time = (double)(item_shake->elapsed_time / (0.5f / item_shake->rate));
+ n_time = (n_time > 1.0) ? 1.0 : n_time;
+ item_shake->prev_off = Point2(Math::lerp(Math::sin(previous_offset), Math::sin(current_offset), n_time), Math::lerp(Math::cos(previous_offset), Math::cos(current_offset), n_time)) * (float)item_shake->strength / 10.0f;
+ }
+ fx_offset += item_shake->prev_off;
} else if (item_fx->type == ITEM_WAVE) {
ItemWave *item_wave = static_cast<ItemWave *>(item_fx);
- double value = Math::sin(item_wave->frequency * item_wave->elapsed_time + ((p_ofs.x + off.x) / 50)) * (item_wave->amplitude / 10.0f);
- fx_offset += Point2(0, 1) * value;
+ if (!cprev) {
+ double value = Math::sin(item_wave->frequency * item_wave->elapsed_time + ((p_ofs.x + off.x) / 50)) * (item_wave->amplitude / 10.0f);
+ item_wave->prev_off = Point2(0, 1) * value;
+ }
+ fx_offset += item_wave->prev_off;
} else if (item_fx->type == ITEM_TORNADO) {
ItemTornado *item_tornado = static_cast<ItemTornado *>(item_fx);
- double torn_x = Math::sin(item_tornado->frequency * item_tornado->elapsed_time + ((p_ofs.x + off.x) / 50)) * (item_tornado->radius);
- double torn_y = Math::cos(item_tornado->frequency * item_tornado->elapsed_time + ((p_ofs.x + off.x) / 50)) * (item_tornado->radius);
- fx_offset += Point2(torn_x, torn_y);
+ if (!cprev) {
+ double torn_x = Math::sin(item_tornado->frequency * item_tornado->elapsed_time + ((p_ofs.x + off.x) / 50)) * (item_tornado->radius);
+ double torn_y = Math::cos(item_tornado->frequency * item_tornado->elapsed_time + ((p_ofs.x + off.x) / 50)) * (item_tornado->radius);
+ item_tornado->prev_off = Point2(torn_x, torn_y);
+ }
+ fx_offset += item_tornado->prev_off;
} else if (item_fx->type == ITEM_RAINBOW) {
ItemRainbow *item_rainbow = static_cast<ItemRainbow *>(item_fx);
@@ -1127,7 +1184,7 @@ void RichTextLabel::_find_click(ItemFrame *p_frame, const Point2i &p_click, Item
Point2 ofs = text_rect.get_position() + Vector2(0, main->lines[from_line].offset.y - vofs);
while (ofs.y < size.height && from_line < main->lines.size()) {
_find_click_in_line(p_frame, from_line, ofs, text_rect.size.x, p_click, r_click_frame, r_click_line, r_click_item, r_click_char);
- ofs.y += main->lines[from_line].text_buf->get_size().y;
+ ofs.y += main->lines[from_line].text_buf->get_size().y + get_theme_constant(SNAME("line_separation"));
if (((r_click_item != nullptr) && ((*r_click_item) != nullptr)) || ((r_click_frame != nullptr) && ((*r_click_frame) != nullptr))) {
if (r_outside != nullptr) {
*r_outside = false;
@@ -1374,8 +1431,8 @@ void RichTextLabel::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_ENTER_TREE: {
- if (bbcode != "") {
- set_bbcode(bbcode);
+ if (text != "") {
+ set_text(text);
}
main->first_invalid_line = 0; //invalidate ALL
@@ -1435,7 +1492,7 @@ void RichTextLabel::_notification(int p_what) {
while (ofs.y < size.height && from_line < main->lines.size()) {
visible_paragraph_count++;
visible_line_count += _draw_line(main, from_line, ofs, text_rect.size.x, base_color, outline_size, outline_color, font_shadow_color, use_outline, shadow_ofs);
- ofs.y += main->lines[from_line].text_buf->get_size().y;
+ ofs.y += main->lines[from_line].text_buf->get_size().y + get_theme_constant(SNAME("line_separation"));
from_line++;
}
} break;
@@ -1451,7 +1508,7 @@ void RichTextLabel::_notification(int p_what) {
Control::CursorShape RichTextLabel::get_cursor_shape(const Point2 &p_pos) const {
if (!underline_meta) {
- return CURSOR_ARROW;
+ return get_default_cursor_shape();
}
if (selection.click_item) {
@@ -1459,11 +1516,11 @@ Control::CursorShape RichTextLabel::get_cursor_shape(const Point2 &p_pos) const
}
if (main->first_invalid_line < main->lines.size()) {
- return CURSOR_ARROW; //invalid
+ return get_default_cursor_shape(); //invalid
}
if (main->first_resized_line < main->lines.size()) {
- return CURSOR_ARROW; //invalid
+ return get_default_cursor_shape(); //invalid
}
Item *item = nullptr;
@@ -1474,10 +1531,10 @@ Control::CursorShape RichTextLabel::get_cursor_shape(const Point2 &p_pos) const
return CURSOR_POINTING_HAND;
}
- return CURSOR_ARROW;
+ return get_default_cursor_shape();
}
-void RichTextLabel::_gui_input(Ref<InputEvent> p_event) {
+void RichTextLabel::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseButton> b = p_event;
@@ -2321,8 +2378,7 @@ void RichTextLabel::add_image(const Ref<Texture2D> &p_image, const int p_width,
item->size.width = p_image->get_width() * p_height / p_image->get_height();
} else {
// keep original width and height
- item->size.height = p_image->get_height();
- item->size.width = p_image->get_width();
+ item->size = p_image->get_size();
}
}
@@ -2767,10 +2823,10 @@ bool RichTextLabel::is_scroll_following() const {
Error RichTextLabel::parse_bbcode(const String &p_bbcode) {
clear();
- return append_bbcode(p_bbcode);
+ return append_text(p_bbcode);
}
-Error RichTextLabel::append_bbcode(const String &p_bbcode) {
+Error RichTextLabel::append_text(const String &p_bbcode) {
int pos = 0;
List<String> tag_stack;
@@ -3824,8 +3880,8 @@ int RichTextLabel::get_selection_to() const {
return selection.to_frame->lines[selection.to_line].char_offset + selection.to_char - 1;
}
-void RichTextLabel::set_bbcode(const String &p_bbcode) {
- bbcode = p_bbcode;
+void RichTextLabel::set_text(const String &p_bbcode) {
+ text = p_bbcode;
if (is_inside_tree() && use_bbcode) {
parse_bbcode(p_bbcode);
} else { // raw text
@@ -3834,8 +3890,8 @@ void RichTextLabel::set_bbcode(const String &p_bbcode) {
}
}
-String RichTextLabel::get_bbcode() const {
- return bbcode;
+String RichTextLabel::get_text() const {
+ return text;
}
void RichTextLabel::set_use_bbcode(bool p_enable) {
@@ -3843,19 +3899,24 @@ void RichTextLabel::set_use_bbcode(bool p_enable) {
return;
}
use_bbcode = p_enable;
- set_bbcode(bbcode);
notify_property_list_changed();
+ set_text(text);
}
bool RichTextLabel::is_using_bbcode() const {
return use_bbcode;
}
-String RichTextLabel::get_text() {
+String RichTextLabel::get_parsed_text() const {
String text = "";
Item *it = main;
while (it) {
- if (it->type == ITEM_TEXT) {
+ if (it->type == ITEM_DROPCAP) {
+ const ItemDropcap *dc = (ItemDropcap *)it;
+ if (dc != nullptr) {
+ text += dc->text;
+ }
+ } else if (it->type == ITEM_TEXT) {
ItemText *t = static_cast<ItemText *>(it);
text += t->text;
} else if (it->type == ITEM_NEWLINE) {
@@ -3870,11 +3931,6 @@ String RichTextLabel::get_text() {
return text;
}
-void RichTextLabel::set_text(const String &p_string) {
- clear();
- add_text(p_string);
-}
-
void RichTextLabel::set_text_direction(Control::TextDirection p_text_direction) {
ERR_FAIL_COND((int)p_text_direction < -1 || (int)p_text_direction > 3);
if (text_direction != p_text_direction) {
@@ -3931,7 +3987,6 @@ void RichTextLabel::set_percent_visible(float p_percent) {
if (p_percent < 0 || p_percent >= 1) {
visible_characters = -1;
percent_visible = 1;
-
} else {
visible_characters = get_total_character_count() * p_percent;
percent_visible = p_percent;
@@ -3946,24 +4001,15 @@ float RichTextLabel::get_percent_visible() const {
return percent_visible;
}
-void RichTextLabel::set_effects(const Vector<Variant> &effects) {
- custom_effects.clear();
- for (int i = 0; i < effects.size(); i++) {
- Ref<RichTextEffect> effect = Ref<RichTextEffect>(effects[i]);
- custom_effects.push_back(effect);
- }
-
- if ((bbcode != "") && use_bbcode) {
- parse_bbcode(bbcode);
+void RichTextLabel::set_effects(Array p_effects) {
+ custom_effects = p_effects;
+ if ((text != "") && use_bbcode) {
+ parse_bbcode(text);
}
}
-Vector<Variant> RichTextLabel::get_effects() {
- Vector<Variant> r;
- for (int i = 0; i < custom_effects.size(); i++) {
- r.push_back(custom_effects[i]);
- }
- return r;
+Array RichTextLabel::get_effects() {
+ return custom_effects;
}
void RichTextLabel::install_effect(const Variant effect) {
@@ -3972,8 +4018,8 @@ void RichTextLabel::install_effect(const Variant effect) {
if (rteffect.is_valid()) {
custom_effects.push_back(effect);
- if ((bbcode != "") && use_bbcode) {
- parse_bbcode(bbcode);
+ if ((text != "") && use_bbcode) {
+ parse_bbcode(text);
}
}
}
@@ -3986,15 +4032,20 @@ int RichTextLabel::get_content_height() const {
return total_height;
}
-void RichTextLabel::_validate_property(PropertyInfo &property) const {
- if (!use_bbcode && property.name == "bbcode_text") {
- property.usage = PROPERTY_USAGE_NOEDITOR;
+#ifndef DISABLE_DEPRECATED
+// People will be very angry, if their texts get erased, because of #39148. (3.x -> 4.0)
+// Altough some people may not used bbcode_text, so we only overwrite, if bbcode_text is not empty
+bool RichTextLabel::_set(const StringName &p_name, const Variant &p_value) {
+ if (p_name == "bbcode_text" && !((String)p_value).is_empty()) {
+ set_text(p_value);
+ return true;
}
+ return false;
}
+#endif
void RichTextLabel::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &RichTextLabel::_gui_input);
- ClassDB::bind_method(D_METHOD("get_text"), &RichTextLabel::get_text);
+ ClassDB::bind_method(D_METHOD("get_parsed_text"), &RichTextLabel::get_parsed_text);
ClassDB::bind_method(D_METHOD("add_text", "text"), &RichTextLabel::add_text);
ClassDB::bind_method(D_METHOD("set_text", "text"), &RichTextLabel::set_text);
ClassDB::bind_method(D_METHOD("add_image", "image", "width", "height", "color", "inline_align"), &RichTextLabel::add_image, DEFVAL(0), DEFVAL(0), DEFVAL(Color(1.0, 1.0, 1.0)), DEFVAL(INLINE_ALIGN_CENTER));
@@ -4072,10 +4123,9 @@ void RichTextLabel::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_selected_text"), &RichTextLabel::get_selected_text);
ClassDB::bind_method(D_METHOD("parse_bbcode", "bbcode"), &RichTextLabel::parse_bbcode);
- ClassDB::bind_method(D_METHOD("append_bbcode", "bbcode"), &RichTextLabel::append_bbcode);
+ ClassDB::bind_method(D_METHOD("append_text", "bbcode"), &RichTextLabel::append_text);
- ClassDB::bind_method(D_METHOD("set_bbcode", "text"), &RichTextLabel::set_bbcode);
- ClassDB::bind_method(D_METHOD("get_bbcode"), &RichTextLabel::get_bbcode);
+ ClassDB::bind_method(D_METHOD("get_text"), &RichTextLabel::get_text);
ClassDB::bind_method(D_METHOD("set_visible_characters", "amount"), &RichTextLabel::set_visible_characters);
ClassDB::bind_method(D_METHOD("get_visible_characters"), &RichTextLabel::get_visible_characters);
@@ -4102,16 +4152,13 @@ void RichTextLabel::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_effects"), &RichTextLabel::get_effects);
ClassDB::bind_method(D_METHOD("install_effect", "effect"), &RichTextLabel::install_effect);
- ADD_GROUP("BBCode", "bbcode_");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "bbcode_enabled"), "set_use_bbcode", "is_using_bbcode");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "bbcode_text", PROPERTY_HINT_MULTILINE_TEXT), "set_bbcode", "get_bbcode");
-
ADD_PROPERTY(PropertyInfo(Variant::INT, "visible_characters", PROPERTY_HINT_RANGE, "-1,128000,1"), "set_visible_characters", "get_visible_characters");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "percent_visible", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_percent_visible", "get_percent_visible");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "meta_underlined"), "set_meta_underline", "is_meta_underlined");
ADD_PROPERTY(PropertyInfo(Variant::INT, "tab_size", PROPERTY_HINT_RANGE, "0,24,1"), "set_tab_size", "get_tab_size");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_MULTILINE_TEXT), "set_text", "get_text");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "bbcode_enabled"), "set_use_bbcode", "is_using_bbcode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fit_content_height"), "set_fit_content_height", "is_fit_content_height_enabled");
@@ -4173,16 +4220,20 @@ void RichTextLabel::_bind_methods() {
}
void RichTextLabel::set_visible_characters(int p_visible) {
- visible_characters = p_visible;
- if (p_visible == -1) {
- percent_visible = 1;
- } else {
- int total_char_count = get_total_character_count();
- if (total_char_count > 0) {
- percent_visible = (float)p_visible / (float)total_char_count;
+ if (visible_characters != p_visible) {
+ visible_characters = p_visible;
+ if (p_visible == -1) {
+ percent_visible = 1;
+ } else {
+ int total_char_count = get_total_character_count();
+ if (total_char_count > 0) {
+ percent_visible = (float)p_visible / (float)total_char_count;
+ }
}
+ main->first_invalid_line = 0; //invalidate ALL
+ _validate_line_caches(main);
+ update();
}
- update();
}
int RichTextLabel::get_visible_characters() const {
@@ -4190,9 +4241,19 @@ int RichTextLabel::get_visible_characters() const {
}
int RichTextLabel::get_total_character_count() const {
+ // Note: Do not use line buffer "char_count", it includes only visible characters.
int tc = 0;
- for (int i = 0; i < current_frame->lines.size(); i++) {
- tc += current_frame->lines[i].char_count;
+ Item *it = main;
+ while (it) {
+ if (it->type == ITEM_TEXT) {
+ ItemText *t = static_cast<ItemText *>(it);
+ tc += t->text.length();
+ } else if (it->type == ITEM_NEWLINE) {
+ tc++;
+ } else if (it->type == ITEM_IMAGE) {
+ tc++;
+ }
+ it = _get_next_item(it, true);
}
return tc;
@@ -4280,12 +4341,13 @@ void RichTextLabel::_draw_fbg_boxes(RID p_ci, RID p_rid, Vector2 line_off, Item
Ref<RichTextEffect> RichTextLabel::_get_custom_effect_by_code(String p_bbcode_identifier) {
for (int i = 0; i < custom_effects.size(); i++) {
- if (!custom_effects[i].is_valid()) {
+ Ref<RichTextEffect> effect = custom_effects[i];
+ if (!effect.is_valid()) {
continue;
}
- if (custom_effects[i]->get_bbcode() == p_bbcode_identifier) {
- return custom_effects[i];
+ if (effect->get_bbcode() == p_bbcode_identifier) {
+ return effect;
}
}
@@ -4362,7 +4424,7 @@ RichTextLabel::RichTextLabel() {
current_frame = main;
vscroll = memnew(VScrollBar);
- add_child(vscroll);
+ add_child(vscroll, false, INTERNAL_MODE_FRONT);
vscroll->set_drag_node(String(".."));
vscroll->set_step(1);
vscroll->set_anchor_and_offset(SIDE_TOP, ANCHOR_BEGIN, 0);
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index 28dfe74b08..94f02a3989 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -85,7 +85,6 @@ public:
protected:
void _notification(int p_what);
static void _bind_methods();
- void _validate_property(PropertyInfo &property) const override;
private:
struct Item;
@@ -268,6 +267,7 @@ private:
float rate = 0.0f;
uint64_t _current_rng = 0;
uint64_t _previous_rng = 0;
+ Vector2 prev_off;
ItemShake() { type = ITEM_SHAKE; }
@@ -290,6 +290,7 @@ private:
struct ItemWave : public ItemFX {
float frequency = 1.0f;
float amplitude = 1.0f;
+ Vector2 prev_off;
ItemWave() { type = ITEM_WAVE; }
};
@@ -297,6 +298,7 @@ private:
struct ItemTornado : public ItemFX {
float radius = 1.0f;
float frequency = 1.0f;
+ Vector2 prev_off;
ItemTornado() { type = ITEM_TORNADO; }
};
@@ -363,7 +365,7 @@ private:
ItemMeta *meta_hovering = nullptr;
Variant current_meta;
- Vector<Ref<RichTextEffect>> custom_effects;
+ Array custom_effects;
void _invalidate_current_line(ItemFrame *p_frame);
void _validate_line_caches(ItemFrame *p_frame);
@@ -443,7 +445,7 @@ private:
void _update_fx(ItemFrame *p_frame, double p_delta_time);
void _scroll_changed(double);
- void _gui_input(Ref<InputEvent> p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
Item *_get_next_item(Item *p_item, bool p_free = false) const;
Item *_get_prev_item(Item *p_item, bool p_free = false) const;
@@ -452,16 +454,19 @@ private:
virtual Dictionary parse_expressions_for_values(Vector<String> p_expressions);
void _draw_fbg_boxes(RID p_ci, RID p_rid, Vector2 line_off, Item *it_from, Item *it_to, int start, int end, int fbg_flag);
-
+#ifndef DISABLE_DEPRECATED
+ // Kept for compatibility from 3.x to 4.0.
+ bool _set(const StringName &p_name, const Variant &p_value);
+#endif
bool use_bbcode = false;
- String bbcode;
+ String text;
int fixed_width = -1;
bool fit_content_height = false;
public:
- String get_text();
+ String get_parsed_text() const;
void add_text(const String &p_text);
void add_image(const Ref<Texture2D> &p_image, const int p_width = 0, const int p_height = 0, const Color &p_color = Color(1.0, 1.0, 1.0), InlineAlign p_align = INLINE_ALIGN_CENTER);
void add_newline();
@@ -548,15 +553,13 @@ public:
void selection_copy();
Error parse_bbcode(const String &p_bbcode);
- Error append_bbcode(const String &p_bbcode);
+ Error append_text(const String &p_bbcode);
void set_use_bbcode(bool p_enable);
bool is_using_bbcode() const;
- void set_bbcode(const String &p_bbcode);
- String get_bbcode() const;
-
- void set_text(const String &p_string);
+ void set_text(const String &p_bbcode);
+ String get_text() const;
void set_text_direction(TextDirection p_text_direction);
TextDirection get_text_direction() const;
@@ -577,8 +580,8 @@ public:
void set_percent_visible(float p_percent);
float get_percent_visible() const;
- void set_effects(const Vector<Variant> &effects);
- Vector<Variant> get_effects();
+ void set_effects(Array p_effects);
+ Array get_effects();
void install_effect(const Variant effect);
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp
index ce04a0204b..4a3a6837d5 100644
--- a/scene/gui/scroll_bar.cpp
+++ b/scene/gui/scroll_bar.cpp
@@ -41,7 +41,7 @@ void ScrollBar::set_can_focus_by_default(bool p_can_focus) {
focus_by_default = p_can_focus;
}
-void ScrollBar::_gui_input(Ref<InputEvent> p_event) {
+void ScrollBar::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseMotion> m = p_event;
@@ -80,12 +80,16 @@ void ScrollBar::_gui_input(Ref<InputEvent> p_event) {
double total = orientation == VERTICAL ? get_size().height : get_size().width;
if (ofs < decr_size) {
+ decr_active = true;
set_value(get_value() - (custom_step >= 0 ? custom_step : get_step()));
+ update();
return;
}
if (ofs > total - incr_size) {
+ incr_active = true;
set_value(get_value() + (custom_step >= 0 ? custom_step : get_step()));
+ update();
return;
}
@@ -130,6 +134,8 @@ void ScrollBar::_gui_input(Ref<InputEvent> p_event) {
}
} else {
+ incr_active = false;
+ decr_active = false;
drag.active = false;
update();
}
@@ -215,8 +221,24 @@ void ScrollBar::_notification(int p_what) {
if (p_what == NOTIFICATION_DRAW) {
RID ci = get_canvas_item();
- Ref<Texture2D> decr = highlight == HIGHLIGHT_DECR ? get_theme_icon(SNAME("decrement_highlight")) : get_theme_icon(SNAME("decrement"));
- Ref<Texture2D> incr = highlight == HIGHLIGHT_INCR ? get_theme_icon(SNAME("increment_highlight")) : get_theme_icon(SNAME("increment"));
+ Ref<Texture2D> decr, incr;
+
+ if (decr_active) {
+ decr = get_theme_icon(SNAME("decrement_pressed"));
+ } else if (highlight == HIGHLIGHT_DECR) {
+ decr = get_theme_icon(SNAME("decrement_highlight"));
+ } else {
+ decr = get_theme_icon(SNAME("decrement"));
+ }
+
+ if (incr_active) {
+ incr = get_theme_icon(SNAME("increment_pressed"));
+ } else if (highlight == HIGHLIGHT_INCR) {
+ incr = get_theme_icon(SNAME("increment_highlight"));
+ } else {
+ incr = get_theme_icon(SNAME("increment"));
+ }
+
Ref<StyleBox> bg = has_focus() ? get_theme_stylebox(SNAME("scroll_focus")) : get_theme_stylebox(SNAME("scroll"));
Ref<StyleBox> grabber;
@@ -538,7 +560,7 @@ void ScrollBar::_drag_node_input(const Ref<InputEvent> &p_input) {
if (mm.is_valid()) {
if (drag_node_touching && !drag_node_touching_deaccel) {
- Vector2 motion = Vector2(mm->get_relative().x, mm->get_relative().y);
+ Vector2 motion = mm->get_relative();
drag_node_accum -= motion;
Vector2 diff = drag_node_from + drag_node_accum;
@@ -597,7 +619,6 @@ bool ScrollBar::is_smooth_scroll_enabled() const {
}
void ScrollBar::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &ScrollBar::_gui_input);
ClassDB::bind_method(D_METHOD("set_custom_step", "step"), &ScrollBar::set_custom_step);
ClassDB::bind_method(D_METHOD("get_custom_step"), &ScrollBar::get_custom_step);
diff --git a/scene/gui/scroll_bar.h b/scene/gui/scroll_bar.h
index 24b3b33e82..574d17ee20 100644
--- a/scene/gui/scroll_bar.h
+++ b/scene/gui/scroll_bar.h
@@ -51,6 +51,9 @@ class ScrollBar : public Range {
HighlightStatus highlight = HIGHLIGHT_NONE;
+ bool incr_active = false;
+ bool decr_active = false;
+
struct Drag {
bool active = false;
float pos_at_click = 0.0;
@@ -86,7 +89,7 @@ class ScrollBar : public Range {
void _drag_node_exit();
void _drag_node_input(const Ref<InputEvent> &p_input);
- void _gui_input(Ref<InputEvent> p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
protected:
void _notification(int p_what);
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index eb5fc924da..0c0ec39c7f 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -83,7 +83,7 @@ void ScrollContainer::_cancel_drag() {
}
}
-void ScrollContainer::_gui_input(const Ref<InputEvent> &p_gui_input) {
+void ScrollContainer::gui_input(const Ref<InputEvent> &p_gui_input) {
ERR_FAIL_COND(p_gui_input.is_null());
double prev_v_scroll = v_scroll->get_value();
@@ -167,7 +167,7 @@ void ScrollContainer::_gui_input(const Ref<InputEvent> &p_gui_input) {
if (mm.is_valid()) {
if (drag_touching && !drag_touching_deaccel) {
- Vector2 motion = Vector2(mm->get_relative().x, mm->get_relative().y);
+ Vector2 motion = mm->get_relative();
drag_accum -= motion;
if (beyond_deadzone || (scroll_h && Math::abs(drag_accum.x) > deadzone) || (scroll_v && Math::abs(drag_accum.y) > deadzone)) {
@@ -228,9 +228,6 @@ void ScrollContainer::_update_scrollbar_position() {
v_scroll->set_anchor_and_offset(SIDE_TOP, ANCHOR_BEGIN, 0);
v_scroll->set_anchor_and_offset(SIDE_BOTTOM, ANCHOR_END, 0);
- h_scroll->raise();
- v_scroll->raise();
-
_updating_scrollbars = false;
}
@@ -568,7 +565,6 @@ VScrollBar *ScrollContainer::get_v_scrollbar() {
}
void ScrollContainer::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &ScrollContainer::_gui_input);
ClassDB::bind_method(D_METHOD("_update_scrollbar_position"), &ScrollContainer::_update_scrollbar_position);
ClassDB::bind_method(D_METHOD("set_h_scroll", "value"), &ScrollContainer::set_h_scroll);
@@ -619,12 +615,12 @@ void ScrollContainer::_bind_methods() {
ScrollContainer::ScrollContainer() {
h_scroll = memnew(HScrollBar);
h_scroll->set_name("_h_scroll");
- add_child(h_scroll);
+ add_child(h_scroll, false, INTERNAL_MODE_BACK);
h_scroll->connect("value_changed", callable_mp(this, &ScrollContainer::_scroll_moved));
v_scroll = memnew(VScrollBar);
v_scroll->set_name("_v_scroll");
- add_child(v_scroll);
+ add_child(v_scroll, false, INTERNAL_MODE_BACK);
v_scroll->connect("value_changed", callable_mp(this, &ScrollContainer::_scroll_moved));
deadzone = GLOBAL_GET("gui/common/default_scroll_deadzone");
diff --git a/scene/gui/scroll_container.h b/scene/gui/scroll_container.h
index 4733fdabca..9f4ec558dc 100644
--- a/scene/gui/scroll_container.h
+++ b/scene/gui/scroll_container.h
@@ -68,7 +68,7 @@ class ScrollContainer : public Container {
protected:
Size2 get_minimum_size() const override;
- void _gui_input(const Ref<InputEvent> &p_gui_input);
+ virtual void gui_input(const Ref<InputEvent> &p_gui_input) override;
void _gui_focus_changed(Control *p_control);
void _update_dimensions();
void _notification(int p_what);
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp
index 61b5325175..352f87954e 100644
--- a/scene/gui/slider.cpp
+++ b/scene/gui/slider.cpp
@@ -45,7 +45,7 @@ Size2 Slider::get_minimum_size() const {
}
}
-void Slider::_gui_input(Ref<InputEvent> p_event) {
+void Slider::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (!editable) {
@@ -253,7 +253,6 @@ bool Slider::is_scrollable() const {
}
void Slider::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &Slider::_gui_input);
ClassDB::bind_method(D_METHOD("set_ticks", "count"), &Slider::set_ticks);
ClassDB::bind_method(D_METHOD("get_ticks"), &Slider::get_ticks);
diff --git a/scene/gui/slider.h b/scene/gui/slider.h
index 65a4036cd1..46fa08bbf0 100644
--- a/scene/gui/slider.h
+++ b/scene/gui/slider.h
@@ -50,7 +50,7 @@ class Slider : public Range {
bool scrollable = true;
protected:
- void _gui_input(Ref<InputEvent> p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _notification(int p_what);
static void _bind_methods();
bool ticks_on_borders = false;
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index 3f0368a4e2..0aec017649 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -68,6 +68,15 @@ void SpinBox::_text_submitted(const String &p_string) {
_value_changed(0);
}
+void SpinBox::_text_changed(const String &p_string) {
+ int cursor_pos = line_edit->get_caret_column();
+
+ _text_submitted(p_string);
+
+ // Line edit 'set_text' method resets the cursor position so we need to undo that.
+ line_edit->set_caret_column(cursor_pos);
+}
+
LineEdit *SpinBox::get_line_edit() {
return line_edit;
}
@@ -99,7 +108,7 @@ void SpinBox::_release_mouse() {
}
}
-void SpinBox::_gui_input(const Ref<InputEvent> &p_event) {
+void SpinBox::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (!is_editable()) {
@@ -244,6 +253,24 @@ String SpinBox::get_prefix() const {
return prefix;
}
+void SpinBox::set_update_on_text_changed(bool p_update) {
+ if (update_on_text_changed == p_update) {
+ return;
+ }
+
+ update_on_text_changed = p_update;
+
+ if (p_update) {
+ line_edit->connect("text_changed", callable_mp(this, &SpinBox::_text_changed), Vector<Variant>(), CONNECT_DEFERRED);
+ } else {
+ line_edit->disconnect("text_changed", callable_mp(this, &SpinBox::_text_changed));
+ }
+}
+
+bool SpinBox::get_update_on_text_changed() const {
+ return update_on_text_changed;
+}
+
void SpinBox::set_editable(bool p_editable) {
line_edit->set_editable(p_editable);
}
@@ -258,7 +285,7 @@ void SpinBox::apply() {
void SpinBox::_bind_methods() {
//ClassDB::bind_method(D_METHOD("_value_changed"),&SpinBox::_value_changed);
- ClassDB::bind_method(D_METHOD("_gui_input"), &SpinBox::_gui_input);
+
ClassDB::bind_method(D_METHOD("set_align", "align"), &SpinBox::set_align);
ClassDB::bind_method(D_METHOD("get_align"), &SpinBox::get_align);
ClassDB::bind_method(D_METHOD("set_suffix", "suffix"), &SpinBox::set_suffix);
@@ -267,29 +294,31 @@ void SpinBox::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_prefix"), &SpinBox::get_prefix);
ClassDB::bind_method(D_METHOD("set_editable", "editable"), &SpinBox::set_editable);
ClassDB::bind_method(D_METHOD("is_editable"), &SpinBox::is_editable);
+ ClassDB::bind_method(D_METHOD("set_update_on_text_changed"), &SpinBox::set_update_on_text_changed);
+ ClassDB::bind_method(D_METHOD("get_update_on_text_changed"), &SpinBox::get_update_on_text_changed);
ClassDB::bind_method(D_METHOD("apply"), &SpinBox::apply);
ClassDB::bind_method(D_METHOD("get_line_edit"), &SpinBox::get_line_edit);
ADD_PROPERTY(PropertyInfo(Variant::INT, "align", PROPERTY_HINT_ENUM, "Left,Center,Right,Fill"), "set_align", "get_align");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editable"), "set_editable", "is_editable");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "update_on_text_changed"), "set_update_on_text_changed", "get_update_on_text_changed");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "prefix"), "set_prefix", "get_prefix");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "suffix"), "set_suffix", "get_suffix");
}
SpinBox::SpinBox() {
line_edit = memnew(LineEdit);
- add_child(line_edit);
+ add_child(line_edit, false, INTERNAL_MODE_FRONT);
line_edit->set_anchors_and_offsets_preset(Control::PRESET_WIDE);
line_edit->set_mouse_filter(MOUSE_FILTER_PASS);
line_edit->set_align(LineEdit::ALIGN_LEFT);
- //connect("value_changed",this,"_value_changed");
line_edit->connect("text_submitted", callable_mp(this, &SpinBox::_text_submitted), Vector<Variant>(), CONNECT_DEFERRED);
line_edit->connect("focus_exited", callable_mp(this, &SpinBox::_line_edit_focus_exit), Vector<Variant>(), CONNECT_DEFERRED);
line_edit->connect("gui_input", callable_mp(this, &SpinBox::_line_edit_input));
range_click_timer = memnew(Timer);
range_click_timer->connect("timeout", callable_mp(this, &SpinBox::_range_click_timeout));
- add_child(range_click_timer);
+ add_child(range_click_timer, false, INTERNAL_MODE_FRONT);
}
diff --git a/scene/gui/spin_box.h b/scene/gui/spin_box.h
index fb10379296..9828b894da 100644
--- a/scene/gui/spin_box.h
+++ b/scene/gui/spin_box.h
@@ -40,6 +40,7 @@ class SpinBox : public Range {
LineEdit *line_edit;
int last_w = 0;
+ bool update_on_text_changed = false;
Timer *range_click_timer;
void _range_click_timeout();
@@ -47,6 +48,8 @@ class SpinBox : public Range {
void _text_submitted(const String &p_string);
virtual void _value_changed(double) override;
+ void _text_changed(const String &p_string);
+
String prefix;
String suffix;
@@ -65,7 +68,7 @@ class SpinBox : public Range {
inline void _adjust_width_for_icon(const Ref<Texture2D> &icon);
protected:
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _notification(int p_what);
@@ -88,6 +91,9 @@ public:
void set_prefix(const String &p_prefix);
String get_prefix() const;
+ void set_update_on_text_changed(bool p_update);
+ bool get_update_on_text_changed() const;
+
void apply();
SpinBox();
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index 3114e5b7c0..4736a1ad37 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -206,7 +206,7 @@ void SplitContainer::_notification(int p_what) {
}
}
-void SplitContainer::_gui_input(const Ref<InputEvent> &p_event) {
+void SplitContainer::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (collapsed || !_getch(0) || !_getch(1) || dragger_visibility != DRAGGER_VISIBLE) {
@@ -337,8 +337,6 @@ bool SplitContainer::is_collapsed() const {
}
void SplitContainer::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &SplitContainer::_gui_input);
-
ClassDB::bind_method(D_METHOD("set_split_offset", "offset"), &SplitContainer::set_split_offset);
ClassDB::bind_method(D_METHOD("get_split_offset"), &SplitContainer::get_split_offset);
ClassDB::bind_method(D_METHOD("clamp_split_offset"), &SplitContainer::clamp_split_offset);
diff --git a/scene/gui/split_container.h b/scene/gui/split_container.h
index 6cb94d6ecf..47fd30a122 100644
--- a/scene/gui/split_container.h
+++ b/scene/gui/split_container.h
@@ -60,7 +60,7 @@ private:
void _resort();
protected:
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _notification(int p_what);
static void _bind_methods();
diff --git a/scene/gui/subviewport_container.cpp b/scene/gui/subviewport_container.cpp
index bfc7e29f9c..53ea32e1b7 100644
--- a/scene/gui/subviewport_container.cpp
+++ b/scene/gui/subviewport_container.cpp
@@ -139,7 +139,7 @@ void SubViewportContainer::_notification(int p_what) {
}
}
-void SubViewportContainer::_input(const Ref<InputEvent> &p_event) {
+void SubViewportContainer::input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (Engine::get_singleton()->is_editor_hint()) {
@@ -162,11 +162,11 @@ void SubViewportContainer::_input(const Ref<InputEvent> &p_event) {
continue;
}
- c->input(ev);
+ c->push_input(ev);
}
}
-void SubViewportContainer::_unhandled_input(const Ref<InputEvent> &p_event) {
+void SubViewportContainer::unhandled_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (Engine::get_singleton()->is_editor_hint()) {
@@ -189,13 +189,11 @@ void SubViewportContainer::_unhandled_input(const Ref<InputEvent> &p_event) {
continue;
}
- c->unhandled_input(ev);
+ c->push_unhandled_input(ev);
}
}
void SubViewportContainer::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_unhandled_input", "event"), &SubViewportContainer::_unhandled_input);
- ClassDB::bind_method(D_METHOD("_input", "event"), &SubViewportContainer::_input);
ClassDB::bind_method(D_METHOD("set_stretch", "enable"), &SubViewportContainer::set_stretch);
ClassDB::bind_method(D_METHOD("is_stretch_enabled"), &SubViewportContainer::is_stretch_enabled);
diff --git a/scene/gui/subviewport_container.h b/scene/gui/subviewport_container.h
index 77cf4c16b3..7853f1590e 100644
--- a/scene/gui/subviewport_container.h
+++ b/scene/gui/subviewport_container.h
@@ -47,8 +47,8 @@ public:
void set_stretch(bool p_enable);
bool is_stretch_enabled() const;
- void _input(const Ref<InputEvent> &p_event);
- void _unhandled_input(const Ref<InputEvent> &p_event);
+ virtual void input(const Ref<InputEvent> &p_event) override;
+ virtual void unhandled_input(const Ref<InputEvent> &p_event) override;
void set_stretch_shrink(int p_shrink);
int get_stretch_shrink() const;
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 53a2fe4d93..c8a0501d8a 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -71,7 +71,7 @@ int TabContainer::_get_top_margin() const {
return tab_height + content_height;
}
-void TabContainer::_gui_input(const Ref<InputEvent> &p_event) {
+void TabContainer::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseButton> mb = p_event;
@@ -79,7 +79,7 @@ void TabContainer::_gui_input(const Ref<InputEvent> &p_event) {
Popup *popup = get_popup();
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
- Point2 pos(mb->get_position().x, mb->get_position().y);
+ Point2 pos = mb->get_position();
Size2 size = get_size();
// Click must be on tabs in the tab header area.
@@ -190,7 +190,7 @@ void TabContainer::_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid()) {
- Point2 pos(mm->get_position().x, mm->get_position().y);
+ Point2 pos = mm->get_position();
Size2 size = get_size();
// Mouse must be on tabs in the tab header area.
@@ -434,14 +434,14 @@ void TabContainer::_notification(int p_what) {
}
int tab_width = tab_widths[i];
- if (get_tab_disabled(index)) {
+ if (index == current) {
+ x_current = x;
+ } else if (get_tab_disabled(index)) {
if (rtl) {
_draw_tab(tab_disabled, font_disabled_color, index, size.width - (tabs_ofs_cache + x) - tab_width);
} else {
_draw_tab(tab_disabled, font_disabled_color, index, tabs_ofs_cache + x);
}
- } else if (index == current) {
- x_current = x;
} else {
if (rtl) {
_draw_tab(tab_unselected, font_unselected_color, index, size.width - (tabs_ofs_cache + x) - tab_width);
@@ -459,12 +459,13 @@ void TabContainer::_notification(int p_what) {
panel->draw(canvas, Rect2(0, header_height, size.width, size.height - header_height));
}
- // Draw selected tab in front. only draw selected tab when it's in visible range.
+ // Draw selected tab in front. Only draw selected tab when it's in visible range.
if (tabs.size() > 0 && current - first_tab_cache < tab_widths.size() && current >= first_tab_cache) {
+ Ref<StyleBox> current_style_box = get_tab_disabled(current) ? tab_disabled : tab_selected;
if (rtl) {
- _draw_tab(tab_selected, font_selected_color, current, size.width - (tabs_ofs_cache + x_current) - tab_widths[current]);
+ _draw_tab(current_style_box, font_selected_color, current, size.width - (tabs_ofs_cache + x_current) - tab_widths[current]);
} else {
- _draw_tab(tab_selected, font_selected_color, current, tabs_ofs_cache + x_current);
+ _draw_tab(current_style_box, font_selected_color, current, tabs_ofs_cache + x_current);
}
}
@@ -537,7 +538,6 @@ void TabContainer::_notification(int p_what) {
void TabContainer::_draw_tab(Ref<StyleBox> &p_tab_style, Color &p_font_color, int p_index, float p_x) {
Control *control = get_tab_control(p_index);
RID canvas = get_canvas_item();
- Ref<Font> font = get_theme_font(SNAME("font"));
Color font_outline_color = get_theme_color(SNAME("font_outline_color"));
int outline_size = get_theme_constant(SNAME("outline_size"));
int icon_text_distance = get_theme_constant(SNAME("icon_separation"));
@@ -640,8 +640,8 @@ void TabContainer::_on_mouse_exited() {
int TabContainer::_get_tab_width(int p_index) const {
ERR_FAIL_INDEX_V(p_index, get_tab_count(), 0);
- Control *control = Object::cast_to<Control>(_get_tabs()[p_index]);
- if (!control || control->is_set_as_top_level() || get_tab_hidden(p_index)) {
+ Control *control = get_tab_control(p_index);
+ if (!control || get_tab_hidden(p_index)) {
return 0;
}
@@ -905,7 +905,7 @@ void TabContainer::drop_data(const Point2 &p_point, const Variant &p_data) {
if (from_tabc && from_tabc->get_tabs_rearrange_group() == get_tabs_rearrange_group()) {
Control *moving_tabc = from_tabc->get_tab_control(tab_from_id);
from_tabc->remove_child(moving_tabc);
- add_child(moving_tabc);
+ add_child(moving_tabc, false, INTERNAL_MODE_FRONT);
if (hover_now < 0) {
hover_now = get_tab_count() - 1;
}
@@ -1133,7 +1133,6 @@ Size2 TabContainer::get_minimum_size() const {
Ref<StyleBox> tab_unselected = get_theme_stylebox(SNAME("tab_unselected"));
Ref<StyleBox> tab_selected = get_theme_stylebox(SNAME("tab_selected"));
Ref<StyleBox> tab_disabled = get_theme_stylebox(SNAME("tab_disabled"));
- Ref<Font> font = get_theme_font(SNAME("font"));
if (tabs_visible) {
ms.y += MAX(MAX(tab_unselected->get_minimum_size().y, tab_selected->get_minimum_size().y), tab_disabled->get_minimum_size().y);
@@ -1193,7 +1192,6 @@ bool TabContainer::get_use_hidden_tabs_for_min_size() const {
}
void TabContainer::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &TabContainer::_gui_input);
ClassDB::bind_method(D_METHOD("get_tab_count"), &TabContainer::get_tab_count);
ClassDB::bind_method(D_METHOD("set_current_tab", "tab_idx"), &TabContainer::set_current_tab);
ClassDB::bind_method(D_METHOD("get_current_tab"), &TabContainer::get_current_tab);
@@ -1212,6 +1210,9 @@ void TabContainer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_tab_icon", "tab_idx"), &TabContainer::get_tab_icon);
ClassDB::bind_method(D_METHOD("set_tab_disabled", "tab_idx", "disabled"), &TabContainer::set_tab_disabled);
ClassDB::bind_method(D_METHOD("get_tab_disabled", "tab_idx"), &TabContainer::get_tab_disabled);
+ ClassDB::bind_method(D_METHOD("set_tab_hidden", "tab_idx", "hidden"), &TabContainer::set_tab_hidden);
+ ClassDB::bind_method(D_METHOD("get_tab_hidden", "tab_idx"), &TabContainer::get_tab_hidden);
+ ClassDB::bind_method(D_METHOD("get_tab_idx_at_point", "point"), &TabContainer::get_tab_idx_at_point);
ClassDB::bind_method(D_METHOD("set_popup", "popup"), &TabContainer::set_popup);
ClassDB::bind_method(D_METHOD("get_popup"), &TabContainer::get_popup);
ClassDB::bind_method(D_METHOD("set_drag_to_rearrange_enabled", "enabled"), &TabContainer::set_drag_to_rearrange_enabled);
diff --git a/scene/gui/tab_container.h b/scene/gui/tab_container.h
index 35f18eff8e..fe96df25e8 100644
--- a/scene/gui/tab_container.h
+++ b/scene/gui/tab_container.h
@@ -76,7 +76,7 @@ private:
protected:
void _child_renamed_callback();
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _notification(int p_what);
virtual void add_child_notify(Node *p_child) override;
virtual void move_child_notify(Node *p_child) override;
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index 103860ad78..ef34bec347 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -90,7 +90,7 @@ Size2 Tabs::get_minimum_size() const {
return ms;
}
-void Tabs::_gui_input(const Ref<InputEvent> &p_event) {
+void Tabs::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventMouseMotion> mm = p_event;
@@ -98,29 +98,45 @@ void Tabs::_gui_input(const Ref<InputEvent> &p_event) {
if (mm.is_valid()) {
Point2 pos = mm->get_position();
- highlight_arrow = -1;
if (buttons_visible) {
Ref<Texture2D> incr = get_theme_icon(SNAME("increment"));
Ref<Texture2D> decr = get_theme_icon(SNAME("decrement"));
if (is_layout_rtl()) {
if (pos.x < decr->get_width()) {
- highlight_arrow = 1;
+ if (highlight_arrow != 1) {
+ highlight_arrow = 1;
+ update();
+ }
} else if (pos.x < incr->get_width() + decr->get_width()) {
- highlight_arrow = 0;
+ if (highlight_arrow != 0) {
+ highlight_arrow = 0;
+ update();
+ }
+ } else if (highlight_arrow != -1) {
+ highlight_arrow = -1;
+ update();
}
} else {
int limit_minus_buttons = get_size().width - incr->get_width() - decr->get_width();
if (pos.x > limit_minus_buttons + decr->get_width()) {
- highlight_arrow = 1;
+ if (highlight_arrow != 1) {
+ highlight_arrow = 1;
+ update();
+ }
} else if (pos.x > limit_minus_buttons) {
- highlight_arrow = 0;
+ if (highlight_arrow != 0) {
+ highlight_arrow = 0;
+ update();
+ }
+ } else if (highlight_arrow != -1) {
+ highlight_arrow = -1;
+ update();
}
}
}
_update_hover();
- update();
return;
}
@@ -167,7 +183,7 @@ void Tabs::_gui_input(const Ref<InputEvent> &p_event) {
if (mb->is_pressed() && (mb->get_button_index() == MOUSE_BUTTON_LEFT || (select_with_rmb && mb->get_button_index() == MOUSE_BUTTON_RIGHT))) {
// clicks
- Point2 pos(mb->get_position().x, mb->get_position().y);
+ Point2 pos = mb->get_position();
if (buttons_visible) {
Ref<Texture2D> incr = get_theme_icon(SNAME("increment"));
@@ -241,6 +257,7 @@ void Tabs::_shape(int p_tab) {
tabs.write[p_tab].xl_text = atr(tabs[p_tab].text);
tabs.write[p_tab].text_buf->clear();
+ tabs.write[p_tab].text_buf->set_width(-1);
if (tabs[p_tab].text_direction == Control::TEXT_DIRECTION_INHERITED) {
tabs.write[p_tab].text_buf->set_direction(is_layout_rtl() ? TextServer::DIRECTION_RTL : TextServer::DIRECTION_LTR);
} else {
@@ -529,7 +546,6 @@ bool Tabs::get_offset_buttons_visible() const {
void Tabs::set_tab_title(int p_tab, const String &p_title) {
ERR_FAIL_INDEX(p_tab, tabs.size());
tabs.write[p_tab].text = p_title;
- tabs.write[p_tab].xl_text = atr(p_title);
_shape(p_tab);
update();
minimum_size_changed();
@@ -1107,7 +1123,6 @@ bool Tabs::get_select_with_rmb() const {
}
void Tabs::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &Tabs::_gui_input);
ClassDB::bind_method(D_METHOD("_update_hover"), &Tabs::_update_hover);
ClassDB::bind_method(D_METHOD("get_tab_count"), &Tabs::get_tab_count);
ClassDB::bind_method(D_METHOD("set_current_tab", "tab_idx"), &Tabs::set_current_tab);
diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h
index 61c9a5d96a..b044453803 100644
--- a/scene/gui/tabs.h
+++ b/scene/gui/tabs.h
@@ -112,7 +112,7 @@ private:
void _shape(int p_tab);
protected:
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _notification(int p_what);
static void _bind_methods();
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 87f06445ac..5e165be15e 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -37,6 +37,7 @@
#include "core/object/script_language.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
+#include "core/string/string_builder.h"
#include "core/string/translation.h"
#include "scene/main/window.h"
@@ -78,7 +79,11 @@ void TextEdit::Text::set_font_size(int p_font_size) {
}
void TextEdit::Text::set_tab_size(int p_tab_size) {
+ if (tab_size == p_tab_size) {
+ return;
+ }
tab_size = p_tab_size;
+ tab_size_dirty = true;
}
int TextEdit::Text::get_tab_size() const {
@@ -118,10 +123,8 @@ int TextEdit::Text::get_line_width(int p_line, int p_wrap_index) const {
return text[p_line].data_buf->get_size().x;
}
-int TextEdit::Text::get_line_height(int p_line, int p_wrap_index) const {
- ERR_FAIL_INDEX_V(p_line, text.size(), 0);
-
- return text[p_line].data_buf->get_line_size(p_wrap_index).y;
+int TextEdit::Text::get_line_height() const {
+ return line_height;
}
void TextEdit::Text::set_width(float p_width) {
@@ -153,6 +156,36 @@ _FORCE_INLINE_ const String &TextEdit::Text::operator[](int p_line) const {
return text[p_line].data;
}
+void TextEdit::Text::_calculate_line_height() {
+ int height = 0;
+ for (int i = 0; i < text.size(); i++) {
+ // Found another line with the same height...nothing to update.
+ if (text[i].height == line_height) {
+ height = line_height;
+ break;
+ }
+ height = MAX(height, text[i].height);
+ }
+ line_height = height;
+}
+
+void TextEdit::Text::_calculate_max_line_width() {
+ int width = 0;
+ for (int i = 0; i < text.size(); i++) {
+ if (is_hidden(i)) {
+ continue;
+ }
+
+ // Found another line with the same width...nothing to update.
+ if (text[i].width == max_width) {
+ width = max_width;
+ break;
+ }
+ width = MAX(width, text[i].width);
+ }
+ max_width = width;
+}
+
void TextEdit::Text::invalidate_cache(int p_line, int p_column, const String &p_ime_text, const Vector<Vector2i> &p_bidi_override) {
ERR_FAIL_INDEX(p_line, text.size());
@@ -182,17 +215,54 @@ void TextEdit::Text::invalidate_cache(int p_line, int p_column, const String &p_
tabs.push_back(font->get_char_size(' ', 0, font_size).width * tab_size);
text.write[p_line].data_buf->tab_align(tabs);
}
+
+ // Update height.
+ const int old_height = text.write[p_line].height;
+ const int wrap_amount = get_line_wrap_amount(p_line);
+ int height = font->get_height(font_size);
+ for (int i = 0; i <= wrap_amount; i++) {
+ height = MAX(height, text[p_line].data_buf->get_line_size(i).y);
+ }
+ text.write[p_line].height = height;
+
+ // If this line has shrunk, this may no longer the the tallest line.
+ if (old_height == line_height && height < line_height) {
+ _calculate_line_height();
+ } else {
+ line_height = MAX(height, line_height);
+ }
+
+ // Update width.
+ const int old_width = text.write[p_line].width;
+ int width = get_line_width(p_line);
+ text.write[p_line].width = width;
+
+ // If this line has shrunk, this may no longer the the longest line.
+ if (old_width == max_width && width < max_width) {
+ _calculate_max_line_width();
+ } else if (!is_hidden(p_line)) {
+ max_width = MAX(width, max_width);
+ }
}
void TextEdit::Text::invalidate_all_lines() {
for (int i = 0; i < text.size(); i++) {
text.write[i].data_buf->set_width(width);
- if (tab_size > 0) {
- Vector<float> tabs;
- tabs.push_back(font->get_char_size(' ', 0, font_size).width * tab_size);
- text.write[i].data_buf->tab_align(tabs);
+ if (tab_size_dirty) {
+ if (tab_size > 0) {
+ Vector<float> tabs;
+ tabs.push_back(font->get_char_size(' ', 0, font_size).width * tab_size);
+ text.write[i].data_buf->tab_align(tabs);
+ }
+ // Tabs have changes, force width update.
+ text.write[i].width = get_line_width(i);
}
}
+
+ if (tab_size_dirty) {
+ _calculate_max_line_width();
+ tab_size_dirty = false;
+ }
}
void TextEdit::Text::invalidate_all() {
@@ -211,16 +281,8 @@ void TextEdit::Text::clear() {
insert(0, "", Vector<Vector2i>());
}
-int TextEdit::Text::get_max_width(bool p_exclude_hidden) const {
- // Quite some work, but should be fast enough.
-
- int max = 0;
- for (int i = 0; i < text.size(); i++) {
- if (!p_exclude_hidden || !is_hidden(i)) {
- max = MAX(max, get_line_width(i));
- }
- }
- return max;
+int TextEdit::Text::get_max_width() const {
+ return max_width;
}
void TextEdit::Text::set(int p_line, const String &p_text, const Vector<Vector2i> &p_bidi_override) {
@@ -243,7 +305,20 @@ void TextEdit::Text::insert(int p_at, const String &p_text, const Vector<Vector2
}
void TextEdit::Text::remove(int p_at) {
+ int height = text[p_at].height;
+ int width = text[p_at].width;
+
text.remove(p_at);
+
+ // If this is the tallest line, we need to get the next tallest.
+ if (height == line_height) {
+ _calculate_line_height();
+ }
+
+ // If this is the longest line, we need to get the next longest.
+ if (width == max_width) {
+ _calculate_max_line_width();
+ }
}
void TextEdit::Text::add_gutter(int p_at) {
@@ -293,7 +368,7 @@ void TextEdit::_notification(int p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
if (is_visible()) {
call_deferred(SNAME("_update_scrollbars"));
- call_deferred(SNAME("_update_wrap_at"));
+ call_deferred(SNAME("_update_wrap_at_column"));
}
} break;
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
@@ -557,13 +632,25 @@ void TextEdit::_notification(int p_what) {
}
int minimap_draw_amount = minimap_visible_lines + get_line_wrap_count(minimap_line + 1);
- // draw the minimap
- Color viewport_color = (background_color.get_v() < 0.5) ? Color(1, 1, 1, 0.1) : Color(0, 0, 0, 0.1);
+ // Draw the minimap.
+
+ // Add visual feedback when dragging or hovering the the visible area rectangle.
+ float viewport_alpha;
+ if (dragging_minimap) {
+ viewport_alpha = 0.25;
+ } else if (hovering_minimap) {
+ viewport_alpha = 0.175;
+ } else {
+ viewport_alpha = 0.1;
+ }
+
+ const Color viewport_color = (background_color.get_v() < 0.5) ? Color(1, 1, 1, viewport_alpha) : Color(0, 0, 0, viewport_alpha);
if (rtl) {
RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(size.width - (xmargin_end + 2) - minimap_width, viewport_offset_y, minimap_width, viewport_height), viewport_color);
} else {
RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2((xmargin_end + 2), viewport_offset_y, minimap_width, viewport_height), viewport_color);
}
+
for (int i = 0; i < minimap_draw_amount; i++) {
minimap_line++;
@@ -632,8 +719,9 @@ void TextEdit::_notification(int p_what) {
int characters = 0;
int tabs = 0;
for (int j = 0; j < str.length(); j++) {
- if (color_map.has(last_wrap_column + j)) {
- current_color = color_map[last_wrap_column + j].get("color");
+ const Variant *color_data = color_map.getptr(last_wrap_column + j);
+ if (color_data != nullptr) {
+ current_color = (color_data->operator Dictionary()).get("color", font_color);
if (!editable) {
current_color.a = font_readonly_color.a;
}
@@ -888,7 +976,7 @@ void TextEdit::_notification(int p_what) {
// Draw line.
RID rid = ldata->get_line_rid(line_wrap_index);
- float text_height = TS->shaped_text_get_size(rid).y + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM);
+ float text_height = TS->shaped_text_get_size(rid).y + font->get_spacing(TextServer::SPACING_TOP) + font->get_spacing(TextServer::SPACING_BOTTOM);
if (rtl) {
char_margin = size.width - char_margin - TS->shaped_text_get_size(rid).x;
@@ -1011,8 +1099,9 @@ void TextEdit::_notification(int p_what) {
char_ofs = 0;
}
for (int j = 0; j < gl_size; j++) {
- if (color_map.has(glyphs[j].start)) {
- current_color = color_map[glyphs[j].start].get("color");
+ const Variant *color_data = color_map.getptr(glyphs[j].start);
+ if (color_data != nullptr) {
+ current_color = (color_data->operator Dictionary()).get("color", font_color);
if (!editable && current_color.a > font_readonly_color.a) {
current_color.a = font_readonly_color.a;
}
@@ -1305,7 +1394,7 @@ void TextEdit::_notification(int p_what) {
}
}
-void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
+void TextEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
ERR_FAIL_COND(p_gui_input.is_null());
double prev_v_scroll = v_scroll->get_value();
@@ -1355,7 +1444,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
if (mb->get_button_index() == MOUSE_BUTTON_LEFT) {
_reset_caret_blink_timer();
- Point2i pos = get_line_column_at_pos(Point2i(mpos.x, mpos.y));
+ Point2i pos = get_line_column_at_pos(mpos);
int row = pos.y;
int col = pos.x;
@@ -1458,7 +1547,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && context_menu_enabled) {
_reset_caret_blink_timer();
- Point2i pos = get_line_column_at_pos(Point2i(mpos.x, mpos.y));
+ Point2i pos = get_line_column_at_pos(mpos);
int row = pos.y;
int col = pos.x;
@@ -1547,6 +1636,36 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
}
}
}
+
+ // Check if user is hovering a different gutter, and update if yes.
+ Vector2i current_hovered_gutter = Vector2i(-1, -1);
+
+ int left_margin = style_normal->get_margin(SIDE_LEFT);
+ if (mpos.x <= left_margin + gutters_width + gutter_padding) {
+ int hovered_row = get_line_column_at_pos(mpos).y;
+ for (int i = 0; i < gutters.size(); i++) {
+ if (!gutters[i].draw || gutters[i].width <= 0) {
+ continue;
+ }
+
+ if (mpos.x > left_margin && mpos.x <= (left_margin + gutters[i].width) - 3) {
+ // We are in this gutter i's horizontal area.
+ current_hovered_gutter = Vector2i(i, hovered_row);
+ break;
+ }
+
+ left_margin += gutters[i].width;
+ }
+ }
+
+ if (current_hovered_gutter != hovered_gutter) {
+ hovered_gutter = current_hovered_gutter;
+ update();
+ }
+ }
+
+ if (draw_minimap && !dragging_selection) {
+ _update_minimap_hover();
}
if (v_scroll->get_value() != prev_v_scroll || h_scroll->get_value() != prev_h_scroll) {
@@ -2150,7 +2269,6 @@ void TextEdit::_delete(bool p_word, bool p_all_to_right) {
next_column = column;
} else {
// Delete one character
- next_column = caret.column < curline_len ? (caret.column + 1) : 0;
if (caret_mid_grapheme_enabled) {
next_column = caret.column < curline_len ? (caret.column + 1) : 0;
} else {
@@ -2518,10 +2636,10 @@ void TextEdit::set_text(const String &p_text) {
set_caret_column(0);
begin_complex_operation();
+ deselect();
_remove_text(0, 0, MAX(0, get_line_count() - 1), MAX(get_line(MAX(get_line_count() - 1, 0)).size() - 1, 0));
insert_text_at_caret(p_text);
end_complex_operation();
- selection.active = false;
}
set_caret_line(0);
@@ -2533,15 +2651,15 @@ void TextEdit::set_text(const String &p_text) {
}
String TextEdit::get_text() const {
- String longthing;
- int len = text.size();
- for (int i = 0; i < len; i++) {
- longthing += text[i];
- if (i != len - 1) {
- longthing += "\n";
+ StringBuilder ret_text;
+ const int text_size = text.size();
+ for (int i = 0; i < text_size; i++) {
+ ret_text += text[i];
+ if (i != text_size - 1) {
+ ret_text += "\n";
}
}
- return longthing;
+ return ret_text.as_string();
}
int TextEdit::get_line_count() const {
@@ -2577,13 +2695,7 @@ int TextEdit::get_line_width(int p_line, int p_wrap_index) const {
}
int TextEdit::get_line_height() const {
- int height = font->get_height(font_size);
- for (int i = 0; i < text.size(); i++) {
- for (int j = 0; j <= text.get_line_wrap_amount(i); j++) {
- height = MAX(height, text.get_line_height(i, j));
- }
- }
- return height + line_spacing;
+ return text.get_line_height() + line_spacing;
}
int TextEdit::get_indent_level(int p_line) const {
@@ -2645,6 +2757,11 @@ void TextEdit::insert_line_at(int p_at, const String &p_text) {
}
void TextEdit::insert_text_at_caret(const String &p_text) {
+ bool had_selection = has_selection();
+ if (had_selection) {
+ begin_complex_operation();
+ }
+
delete_selection();
int new_column, new_line;
@@ -2654,6 +2771,10 @@ void TextEdit::insert_text_at_caret(const String &p_text) {
set_caret_line(new_line, false);
set_caret_column(new_column);
update();
+
+ if (had_selection) {
+ end_complex_operation();
+ }
}
void TextEdit::remove_text(int p_from_line, int p_from_column, int p_to_line, int p_to_column) {
@@ -2768,48 +2889,38 @@ Point2i TextEdit::get_next_visible_line_index_offset_from(int p_line_from, int p
// Overridable actions
void TextEdit::handle_unicode_input(const uint32_t p_unicode) {
- ScriptInstance *si = get_script_instance();
- if (si && si->has_method("_handle_unicode_input")) {
- si->call("_handle_unicode_input", p_unicode);
+ if (GDVIRTUAL_CALL(_handle_unicode_input, p_unicode)) {
return;
}
- _handle_unicode_input(p_unicode);
+ _handle_unicode_input_internal(p_unicode);
}
void TextEdit::backspace() {
- ScriptInstance *si = get_script_instance();
- if (si && si->has_method("_backspace")) {
- si->call("_backspace");
+ if (GDVIRTUAL_CALL(_backspace)) {
return;
}
- _backspace();
+ _backspace_internal();
}
void TextEdit::cut() {
- ScriptInstance *si = get_script_instance();
- if (si && si->has_method("_cut")) {
- si->call("_cut");
+ if (GDVIRTUAL_CALL(_cut)) {
return;
}
- _cut();
+ _cut_internal();
}
void TextEdit::copy() {
- ScriptInstance *si = get_script_instance();
- if (si && si->has_method("_copy")) {
- si->call("_copy");
+ if (GDVIRTUAL_CALL(_copy)) {
return;
}
- _copy();
+ _copy_internal();
}
void TextEdit::paste() {
- ScriptInstance *si = get_script_instance();
- if (si && si->has_method("_paste")) {
- si->call("_paste");
+ if (GDVIRTUAL_CALL(_paste)) {
return;
}
- _paste();
+ _paste_internal();
}
// Context menu.
@@ -2948,13 +3059,20 @@ void TextEdit::menu_option(int p_option) {
/* Versioning */
void TextEdit::begin_complex_operation() {
_push_current_op();
- next_operation_is_complex = true;
+ if (complex_operation_count == 0) {
+ next_operation_is_complex = true;
+ }
+ complex_operation_count++;
}
void TextEdit::end_complex_operation() {
_push_current_op();
ERR_FAIL_COND(undo_stack.size() == 0);
+ complex_operation_count = MAX(complex_operation_count - 1, 0);
+ if (complex_operation_count > 0) {
+ return;
+ }
if (undo_stack.back()->get().chain_forward) {
undo_stack.back()->get().chain_forward = false;
return;
@@ -3602,7 +3720,7 @@ void TextEdit::select_word_under_caret() {
int end = 0;
const Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text.get_line_data(caret.line)->get_rid());
for (int i = 0; i < words.size(); i++) {
- if (words[i].x <= caret.column && words[i].y >= caret.column) {
+ if ((words[i].x < caret.column && words[i].y > caret.column) || (i == words.size() - 1 && caret.column == words[i].y)) {
begin = words[i].x;
end = words[i].y;
break;
@@ -4146,6 +4264,9 @@ TextEdit::GutterType TextEdit::get_gutter_type(int p_gutter) const {
void TextEdit::set_gutter_width(int p_gutter, int p_width) {
ERR_FAIL_INDEX(p_gutter, gutters.size());
+ if (gutters[p_gutter].width == p_width) {
+ return;
+ }
gutters.write[p_gutter].width = p_width;
_update_gutter_width();
}
@@ -4161,6 +4282,9 @@ int TextEdit::get_total_gutter_width() const {
void TextEdit::set_gutter_draw(int p_gutter, bool p_draw) {
ERR_FAIL_INDEX(p_gutter, gutters.size());
+ if (gutters[p_gutter].draw == p_draw) {
+ return;
+ }
gutters.write[p_gutter].draw = p_draw;
_update_gutter_width();
}
@@ -4377,7 +4501,7 @@ bool TextEdit::is_drawing_spaces() const {
void TextEdit::_bind_methods() {
/*Internal. */
- ClassDB::bind_method(D_METHOD("_gui_input"), &TextEdit::_gui_input);
+
ClassDB::bind_method(D_METHOD("_text_changed_emit"), &TextEdit::_text_changed_emit);
/* Text */
@@ -4452,12 +4576,11 @@ void TextEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("copy"), &TextEdit::copy);
ClassDB::bind_method(D_METHOD("paste"), &TextEdit::paste);
- BIND_VMETHOD(MethodInfo("_handle_unicode_input", PropertyInfo(Variant::INT, "unicode")))
- BIND_VMETHOD(MethodInfo("_backspace"));
-
- BIND_VMETHOD(MethodInfo("_cut"));
- BIND_VMETHOD(MethodInfo("_copy"));
- BIND_VMETHOD(MethodInfo("_paste"));
+ GDVIRTUAL_BIND(_handle_unicode_input, "unicode_char")
+ GDVIRTUAL_BIND(_backspace)
+ GDVIRTUAL_BIND(_cut)
+ GDVIRTUAL_BIND(_copy)
+ GDVIRTUAL_BIND(_paste)
// Context Menu
BIND_ENUM_CONSTANT(MENU_CUT);
@@ -4884,7 +5007,7 @@ void TextEdit::_set_symbol_lookup_word(const String &p_symbol) {
/* Text manipulation */
// Overridable actions
-void TextEdit::_handle_unicode_input(const uint32_t p_unicode) {
+void TextEdit::_handle_unicode_input_internal(const uint32_t p_unicode) {
if (!editable) {
return;
}
@@ -4915,7 +5038,7 @@ void TextEdit::_handle_unicode_input(const uint32_t p_unicode) {
}
}
-void TextEdit::_backspace() {
+void TextEdit::_backspace_internal() {
if (!editable) {
return;
}
@@ -4946,7 +5069,7 @@ void TextEdit::_backspace() {
set_caret_column(prev_column);
}
-void TextEdit::_cut() {
+void TextEdit::_cut_internal() {
if (!editable) {
return;
}
@@ -4976,7 +5099,7 @@ void TextEdit::_cut() {
cut_copy_line = clipboard;
}
-void TextEdit::_copy() {
+void TextEdit::_copy_internal() {
if (has_selection()) {
DisplayServer::get_singleton()->clipboard_set(get_selected_text());
cut_copy_line = "";
@@ -4991,7 +5114,7 @@ void TextEdit::_copy() {
}
}
-void TextEdit::_paste() {
+void TextEdit::_paste_internal() {
if (!editable) {
return;
}
@@ -5016,7 +5139,7 @@ void TextEdit::_paste() {
void TextEdit::_generate_context_menu() {
if (!menu) {
menu = memnew(PopupMenu);
- add_child(menu);
+ add_child(menu, false, INTERNAL_MODE_FRONT);
menu_dir = memnew(PopupMenu);
menu_dir->set_name("DirMenu");
@@ -5024,7 +5147,7 @@ void TextEdit::_generate_context_menu() {
menu_dir->add_radio_check_item(RTR("Auto-detect direction"), MENU_DIR_AUTO);
menu_dir->add_radio_check_item(RTR("Left-to-right"), MENU_DIR_LTR);
menu_dir->add_radio_check_item(RTR("Right-to-left"), MENU_DIR_RTL);
- menu->add_child(menu_dir);
+ menu->add_child(menu_dir, false, INTERNAL_MODE_FRONT);
menu_ctl = memnew(PopupMenu);
menu_ctl->set_name("CTLMenu");
@@ -5046,7 +5169,7 @@ void TextEdit::_generate_context_menu() {
menu_ctl->add_item(RTR("Zero width non-joiner (ZWNJ)"), MENU_INSERT_ZWNJ);
menu_ctl->add_item(RTR("Word joiner (WJ)"), MENU_INSERT_WJ);
menu_ctl->add_item(RTR("Soft hyphen (SHY)"), MENU_INSERT_SHY);
- menu->add_child(menu_ctl);
+ menu->add_child(menu_ctl, false, INTERNAL_MODE_FRONT);
menu->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
menu_dir->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
@@ -5293,7 +5416,7 @@ void TextEdit::_update_selection_mode_pointer() {
dragging_selection = true;
Point2 mp = get_local_mouse_pos();
- Point2i pos = get_line_column_at_pos(Point2i(mp.x, mp.y));
+ Point2i pos = get_line_column_at_pos(mp);
int line = pos.y;
int col = pos.x;
@@ -5310,7 +5433,7 @@ void TextEdit::_update_selection_mode_word() {
dragging_selection = true;
Point2 mp = get_local_mouse_pos();
- Point2i pos = get_line_column_at_pos(Point2i(mp.x, mp.y));
+ Point2i pos = get_line_column_at_pos(mp);
int line = pos.y;
int col = pos.x;
@@ -5319,7 +5442,7 @@ void TextEdit::_update_selection_mode_word() {
int end = beg;
Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text.get_line_data(line)->get_rid());
for (int i = 0; i < words.size(); i++) {
- if (words[i].x < caret_pos && words[i].y > caret_pos) {
+ if ((words[i].x < caret_pos && words[i].y > caret_pos) || (i == words.size() - 1 && caret_pos == words[i].y)) {
beg = words[i].x;
end = words[i].y;
break;
@@ -5358,7 +5481,7 @@ void TextEdit::_update_selection_mode_line() {
dragging_selection = true;
Point2 mp = get_local_mouse_pos();
- Point2i pos = get_line_column_at_pos(Point2i(mp.x, mp.y));
+ Point2i pos = get_line_column_at_pos(mp);
int line = pos.y;
int col = pos.x;
@@ -5454,7 +5577,7 @@ void TextEdit::_update_scrollbars() {
}
int visible_width = size.width - style_normal->get_minimum_size().width;
- int total_width = text.get_max_width(true) + vmin.x + gutters_width + gutter_padding;
+ int total_width = text.get_max_width() + vmin.x + gutters_width + gutter_padding;
if (draw_minimap) {
total_width += minimap_width;
@@ -5656,6 +5779,33 @@ void TextEdit::_scroll_lines_down() {
}
// Minimap
+
+void TextEdit::_update_minimap_hover() {
+ const Point2 mp = get_local_mouse_pos();
+ const int xmargin_end = get_size().width - style_normal->get_margin(SIDE_RIGHT);
+
+ const bool hovering_sidebar = mp.x > xmargin_end - minimap_width && mp.x < xmargin_end;
+ if (!hovering_sidebar) {
+ if (hovering_minimap) {
+ // Only redraw if the hovering status changed.
+ hovering_minimap = false;
+ update();
+ }
+
+ // Return early to avoid running the operations below when not needed.
+ return;
+ }
+
+ const int row = get_minimap_line_at_pos(mp);
+
+ const bool new_hovering_minimap = row >= get_first_visible_line() && row <= get_last_full_visible_line();
+ if (new_hovering_minimap != hovering_minimap) {
+ // Only redraw if the hovering status changed.
+ hovering_minimap = new_hovering_minimap;
+ update();
+ }
+}
+
void TextEdit::_update_minimap_click() {
Point2 mp = get_local_mouse_pos();
@@ -5667,7 +5817,7 @@ void TextEdit::_update_minimap_click() {
minimap_clicked = true;
dragging_minimap = true;
- int row = get_minimap_line_at_pos(Point2i(mp.x, mp.y));
+ int row = get_minimap_line_at_pos(mp);
if (row >= get_first_visible_line() && (row < get_last_full_visible_line() || row >= (text.size() - 1))) {
minimap_scroll_ratio = v_scroll->get_as_ratio();
@@ -5879,8 +6029,6 @@ void TextEdit::_base_insert_text(int p_line, int p_char, const String &p_text, i
text.set_hidden(p_line, false);
}
- text.invalidate_cache(p_line);
-
r_end_line = p_line + substrings.size() - 1;
r_end_column = text[r_end_line].length() - postinsert_text.length();
@@ -5937,8 +6085,6 @@ void TextEdit::_base_remove_text(int p_from_line, int p_from_column, int p_to_li
}
text.set(p_from_line, pre_text + post_text, structured_text_parser(st_parser, st_args, pre_text + post_text));
- text.invalidate_cache(p_from_line);
-
if (!text_changed_dirty && !setting_text) {
if (is_inside_tree()) {
MessageQueue::get_singleton()->push_call(this, "_text_changed_emit");
@@ -5955,13 +6101,12 @@ TextEdit::TextEdit() {
set_default_cursor_shape(CURSOR_IBEAM);
text.set_tab_size(text.get_tab_size());
- text.clear();
h_scroll = memnew(HScrollBar);
v_scroll = memnew(VScrollBar);
- add_child(h_scroll);
- add_child(v_scroll);
+ add_child(h_scroll, false, INTERNAL_MODE_FRONT);
+ add_child(v_scroll, false, INTERNAL_MODE_FRONT);
h_scroll->connect("value_changed", callable_mp(this, &TextEdit::_scroll_moved));
v_scroll->connect("value_changed", callable_mp(this, &TextEdit::_scroll_moved));
@@ -5970,19 +6115,19 @@ TextEdit::TextEdit() {
/* Caret. */
caret_blink_timer = memnew(Timer);
- add_child(caret_blink_timer);
+ add_child(caret_blink_timer, false, INTERNAL_MODE_FRONT);
caret_blink_timer->set_wait_time(0.65);
caret_blink_timer->connect("timeout", callable_mp(this, &TextEdit::_toggle_draw_caret));
set_caret_blink_enabled(false);
/* Selection. */
click_select_held = memnew(Timer);
- add_child(click_select_held);
+ add_child(click_select_held, false, INTERNAL_MODE_FRONT);
click_select_held->set_wait_time(0.05);
click_select_held->connect("timeout", callable_mp(this, &TextEdit::_click_selection_held));
idle_detect = memnew(Timer);
- add_child(idle_detect);
+ add_child(idle_detect, false, INTERNAL_MODE_FRONT);
idle_detect->set_one_shot(true);
idle_detect->set_wait_time(GLOBAL_GET("gui/timers/text_edit_idle_detect_sec"));
idle_detect->connect("timeout", callable_mp(this, &TextEdit::_push_current_op));
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 69468978ab..db16d09c58 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -144,6 +144,8 @@ private:
Color background_color = Color(0, 0, 0, 0);
bool hidden = false;
+ int height = 0;
+ int width = 0;
Line() {
data_buf.instantiate();
@@ -152,6 +154,7 @@ private:
private:
bool is_dirty = false;
+ bool tab_size_dirty = false;
mutable Vector<Line> text;
Ref<Font> font;
@@ -162,11 +165,16 @@ private:
TextServer::Direction direction = TextServer::DIRECTION_AUTO;
bool draw_control_chars = false;
+ int line_height = -1;
+ int max_width = -1;
int width = -1;
int tab_size = 4;
int gutter_count = 0;
+ void _calculate_line_height();
+ void _calculate_max_line_width();
+
public:
void set_tab_size(int p_tab_size);
int get_tab_size() const;
@@ -176,9 +184,9 @@ private:
void set_direction_and_language(TextServer::Direction p_direction, const String &p_language);
void set_draw_control_chars(bool p_draw_control_chars);
- int get_line_height(int p_line, int p_wrap_index) const;
+ int get_line_height() const;
int get_line_width(int p_line, int p_wrap_index = -1) const;
- int get_max_width(bool p_exclude_hidden = false) const;
+ int get_max_width() const;
void set_width(float p_width);
int get_line_wrap_amount(int p_line) const;
@@ -187,7 +195,14 @@ private:
const Ref<TextParagraph> get_line_data(int p_line) const;
void set(int p_line, const String &p_text, const Vector<Vector2i> &p_bidi_override);
- void set_hidden(int p_line, bool p_hidden) { text.write[p_line].hidden = p_hidden; }
+ void set_hidden(int p_line, bool p_hidden) {
+ text.write[p_line].hidden = p_hidden;
+ if (!p_hidden && text[p_line].width > max_width) {
+ max_width = text[p_line].width;
+ } else if (p_hidden && text[p_line].width == max_width) {
+ _calculate_max_line_width();
+ }
+ }
bool is_hidden(int p_line) const { return text[p_line].hidden; }
void insert(int p_at, const String &p_text, const Vector<Vector2i> &p_bidi_override);
void remove(int p_at);
@@ -289,6 +304,7 @@ private:
bool undo_enabled = true;
int undo_stack_max_size = 50;
+ int complex_operation_count = 0;
bool next_operation_is_complex = false;
TextOperation current_op;
@@ -446,12 +462,14 @@ private:
// minimap scroll
bool minimap_clicked = false;
+ bool hovering_minimap = false;
bool dragging_minimap = false;
bool can_drag_minimap = false;
double minimap_scroll_ratio = 0.0;
double minimap_scroll_click_pos = 0.0;
+ void _update_minimap_hover();
void _update_minimap_click();
void _update_minimap_drag();
@@ -459,6 +477,7 @@ private:
Vector<GutterInfo> gutters;
int gutters_width = 0;
int gutter_padding = 0;
+ Vector2i hovered_gutter = Vector2i(-1, -1); // X = gutter index, Y = row.
void _update_gutter_width();
@@ -528,7 +547,6 @@ private:
protected:
void _notification(int p_what);
- virtual void _gui_input(const Ref<InputEvent> &p_gui_input);
static void _bind_methods();
@@ -562,15 +580,22 @@ protected:
/* Text manipulation */
// Overridable actions
- virtual void _handle_unicode_input(const uint32_t p_unicode);
- virtual void _backspace();
+ virtual void _handle_unicode_input_internal(const uint32_t p_unicode);
+ virtual void _backspace_internal();
+
+ virtual void _cut_internal();
+ virtual void _copy_internal();
+ virtual void _paste_internal();
- virtual void _cut();
- virtual void _copy();
- virtual void _paste();
+ GDVIRTUAL1(_handle_unicode_input, int)
+ GDVIRTUAL0(_backspace)
+ GDVIRTUAL0(_cut)
+ GDVIRTUAL0(_copy)
+ GDVIRTUAL0(_paste)
public:
/* General overrides. */
+ virtual void gui_input(const Ref<InputEvent> &p_gui_input) override;
virtual Size2 get_minimum_size() const override;
virtual bool is_text_field() const override;
virtual CursorShape get_cursor_shape(const Point2 &p_pos = Point2i()) const override;
diff --git a/scene/gui/texture_progress_bar.cpp b/scene/gui/texture_progress_bar.cpp
index 5e5dec3579..35a098c6fd 100644
--- a/scene/gui/texture_progress_bar.cpp
+++ b/scene/gui/texture_progress_bar.cpp
@@ -100,6 +100,15 @@ Ref<Texture2D> TextureProgressBar::get_progress_texture() const {
return progress;
}
+void TextureProgressBar::set_progress_offset(Point2 p_offset) {
+ progress_offset = p_offset;
+ update();
+}
+
+Point2 TextureProgressBar::get_progress_offset() const {
+ return progress_offset;
+}
+
void TextureProgressBar::set_tint_under(const Color &p_tint) {
tint_under = p_tint;
update();
@@ -360,6 +369,9 @@ void TextureProgressBar::draw_nine_patch_stretched(const Ref<Texture2D> &p_textu
}
}
+ if (p_texture == progress) {
+ dst_rect.position += progress_offset;
+ }
p_texture->get_rect_region(dst_rect, src_rect, dst_rect, src_rect);
RID ci = get_canvas_item();
@@ -403,20 +415,24 @@ void TextureProgressBar::_notification(int p_what) {
Size2 s = progress->get_size();
switch (mode) {
case FILL_LEFT_TO_RIGHT: {
- Rect2 region = Rect2(Point2(), Size2(s.x * get_as_ratio(), s.y));
- draw_texture_rect_region(progress, region, region, tint_progress);
+ Rect2 region = Rect2(progress_offset, Size2(s.x * get_as_ratio(), s.y));
+ Rect2 source = Rect2(Point2(), Size2(s.x * get_as_ratio(), s.y));
+ draw_texture_rect_region(progress, region, source, tint_progress);
} break;
case FILL_RIGHT_TO_LEFT: {
- Rect2 region = Rect2(Point2(s.x - s.x * get_as_ratio(), 0), Size2(s.x * get_as_ratio(), s.y));
- draw_texture_rect_region(progress, region, region, tint_progress);
+ Rect2 region = Rect2(progress_offset + Point2(s.x - s.x * get_as_ratio(), 0), Size2(s.x * get_as_ratio(), s.y));
+ Rect2 source = Rect2(Point2(s.x - s.x * get_as_ratio(), 0), Size2(s.x * get_as_ratio(), s.y));
+ draw_texture_rect_region(progress, region, source, tint_progress);
} break;
case FILL_TOP_TO_BOTTOM: {
- Rect2 region = Rect2(Point2(), Size2(s.x, s.y * get_as_ratio()));
- draw_texture_rect_region(progress, region, region, tint_progress);
+ Rect2 region = Rect2(progress_offset + Point2(), Size2(s.x, s.y * get_as_ratio()));
+ Rect2 source = Rect2(Point2(), Size2(s.x, s.y * get_as_ratio()));
+ draw_texture_rect_region(progress, region, source, tint_progress);
} break;
case FILL_BOTTOM_TO_TOP: {
- Rect2 region = Rect2(Point2(0, s.y - s.y * get_as_ratio()), Size2(s.x, s.y * get_as_ratio()));
- draw_texture_rect_region(progress, region, region, tint_progress);
+ Rect2 region = Rect2(progress_offset + Point2(0, s.y - s.y * get_as_ratio()), Size2(s.x, s.y * get_as_ratio()));
+ Rect2 source = Rect2(Point2(0, s.y - s.y * get_as_ratio()), Size2(s.x, s.y * get_as_ratio()));
+ draw_texture_rect_region(progress, region, source, tint_progress);
} break;
case FILL_CLOCKWISE:
case FILL_COUNTER_CLOCKWISE:
@@ -427,8 +443,9 @@ void TextureProgressBar::_notification(int p_what) {
float val = get_as_ratio() * rad_max_degrees / 360;
if (val == 1) {
- Rect2 region = Rect2(Point2(), s);
- draw_texture_rect(progress, region, false, tint_progress);
+ Rect2 region = Rect2(progress_offset, s);
+ Rect2 source = Rect2(Point2(), s);
+ draw_texture_rect_region(progress, region, source, tint_progress);
} else if (val != 0) {
Array pts;
float direction = mode == FILL_COUNTER_CLOCKWISE ? -1 : 1;
@@ -454,14 +471,14 @@ void TextureProgressBar::_notification(int p_what) {
Vector<Point2> uvs;
Vector<Point2> points;
uvs.push_back(get_relative_center());
- points.push_back(Point2(s.x * get_relative_center().x, s.y * get_relative_center().y));
+ points.push_back(progress_offset + s * get_relative_center());
for (int i = 0; i < pts.size(); i++) {
Point2 uv = unit_val_to_uv(pts[i]);
if (uvs.find(uv) >= 0) {
continue;
}
uvs.push_back(uv);
- points.push_back(Point2(uv.x * s.x, uv.y * s.y));
+ points.push_back(progress_offset + Point2(uv.x * s.x, uv.y * s.y));
}
Vector<Color> colors;
colors.push_back(tint_progress);
@@ -476,25 +493,26 @@ void TextureProgressBar::_notification(int p_what) {
p = progress->get_size();
}
- p.x *= get_relative_center().x;
- p.y *= get_relative_center().y;
+ p *= get_relative_center();
p = p.floor();
draw_line(p - Point2(8, 0), p + Point2(8, 0), Color(0.9, 0.5, 0.5), 2);
draw_line(p - Point2(0, 8), p + Point2(0, 8), Color(0.9, 0.5, 0.5), 2);
}
} break;
case FILL_BILINEAR_LEFT_AND_RIGHT: {
- Rect2 region = Rect2(Point2(s.x / 2 - s.x * get_as_ratio() / 2, 0), Size2(s.x * get_as_ratio(), s.y));
- draw_texture_rect_region(progress, region, region, tint_progress);
+ Rect2 region = Rect2(progress_offset + Point2(s.x / 2 - s.x * get_as_ratio() / 2, 0), Size2(s.x * get_as_ratio(), s.y));
+ Rect2 source = Rect2(Point2(s.x / 2 - s.x * get_as_ratio() / 2, 0), Size2(s.x * get_as_ratio(), s.y));
+ draw_texture_rect_region(progress, region, source, tint_progress);
} break;
case FILL_BILINEAR_TOP_AND_BOTTOM: {
- Rect2 region = Rect2(Point2(0, s.y / 2 - s.y * get_as_ratio() / 2), Size2(s.x, s.y * get_as_ratio()));
- draw_texture_rect_region(progress, region, region, tint_progress);
+ Rect2 region = Rect2(progress_offset + Point2(0, s.y / 2 - s.y * get_as_ratio() / 2), Size2(s.x, s.y * get_as_ratio()));
+ Rect2 source = Rect2(Point2(0, s.y / 2 - s.y * get_as_ratio() / 2), Size2(s.x, s.y * get_as_ratio()));
+ draw_texture_rect_region(progress, region, source, tint_progress);
} break;
case FILL_MODE_MAX:
break;
default:
- draw_texture_rect_region(progress, Rect2(Point2(), Size2(s.x * get_as_ratio(), s.y)), Rect2(Point2(), Size2(s.x * get_as_ratio(), s.y)), tint_progress);
+ draw_texture_rect_region(progress, Rect2(progress_offset, Size2(s.x * get_as_ratio(), s.y)), Rect2(Point2(), Size2(s.x * get_as_ratio(), s.y)), tint_progress);
}
}
if (over.is_valid()) {
@@ -585,6 +603,9 @@ void TextureProgressBar::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_tint_over", "tint"), &TextureProgressBar::set_tint_over);
ClassDB::bind_method(D_METHOD("get_tint_over"), &TextureProgressBar::get_tint_over);
+ ClassDB::bind_method(D_METHOD("set_texture_progress_offset", "offset"), &TextureProgressBar::set_progress_offset);
+ ClassDB::bind_method(D_METHOD("get_texture_progress_offset"), &TextureProgressBar::get_progress_offset);
+
ClassDB::bind_method(D_METHOD("set_radial_initial_angle", "mode"), &TextureProgressBar::set_radial_initial_angle);
ClassDB::bind_method(D_METHOD("get_radial_initial_angle"), &TextureProgressBar::get_radial_initial_angle);
@@ -604,6 +625,7 @@ void TextureProgressBar::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture_under", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_under_texture", "get_under_texture");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture_over", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_over_texture", "get_over_texture");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture_progress", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_progress_texture", "get_progress_texture");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "texture_progress_offset"), "set_texture_progress_offset", "get_texture_progress_offset");
ADD_PROPERTY(PropertyInfo(Variant::INT, "fill_mode", PROPERTY_HINT_ENUM, "Left to Right,Right to Left,Top to Bottom,Bottom to Top,Clockwise,Counter Clockwise,Bilinear (Left and Right),Bilinear (Top and Bottom),Clockwise and Counter Clockwise"), "set_fill_mode", "get_fill_mode");
ADD_GROUP("Tint", "tint_");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "tint_under"), "set_tint_under", "get_tint_under");
diff --git a/scene/gui/texture_progress_bar.h b/scene/gui/texture_progress_bar.h
index d147c43a26..c508f41387 100644
--- a/scene/gui/texture_progress_bar.h
+++ b/scene/gui/texture_progress_bar.h
@@ -61,6 +61,9 @@ public:
void set_fill_mode(int p_fill);
int get_fill_mode();
+ void set_progress_offset(Point2 p_offset);
+ Point2 get_progress_offset() const;
+
void set_radial_initial_angle(float p_angle);
float get_radial_initial_angle();
@@ -100,6 +103,7 @@ public:
private:
FillMode mode = FILL_LEFT_TO_RIGHT;
+ Point2 progress_offset;
float rad_init_angle = 0.0;
float rad_max_degrees = 360.0;
Point2 rad_center_off;
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 09db3205d9..7d7596635c 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -144,6 +144,7 @@ void TreeItem::_change_tree(Tree *p_tree) {
/* cell mode */
void TreeItem::set_cell_mode(int p_column, TreeCellMode p_mode) {
ERR_FAIL_INDEX(p_column, cells.size());
+
Cell &c = cells.write[p_column];
c.mode = p_mode;
c.min = 0;
@@ -155,6 +156,8 @@ void TreeItem::set_cell_mode(int p_column, TreeCellMode p_mode) {
c.text = "";
c.dirty = true;
c.icon_max_w = 0;
+ c.cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -166,7 +169,26 @@ TreeItem::TreeCellMode TreeItem::get_cell_mode(int p_column) const {
/* check mode */
void TreeItem::set_checked(int p_column, bool p_checked) {
ERR_FAIL_INDEX(p_column, cells.size());
+
cells.write[p_column].checked = p_checked;
+ cells.write[p_column].indeterminate = false;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
+ _changed_notify(p_column);
+}
+
+void TreeItem::set_indeterminate(int p_column, bool p_indeterminate) {
+ ERR_FAIL_INDEX(p_column, cells.size());
+
+ // Prevent uncheck if indeterminate set to false twice
+ if (p_indeterminate == cells[p_column].indeterminate) {
+ return;
+ }
+
+ cells.write[p_column].indeterminate = p_indeterminate;
+ cells.write[p_column].checked = false;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -175,6 +197,11 @@ bool TreeItem::is_checked(int p_column) const {
return cells[p_column].checked;
}
+bool TreeItem::is_indeterminate(int p_column) const {
+ ERR_FAIL_INDEX_V(p_column, cells.size(), false);
+ return cells[p_column].indeterminate;
+}
+
void TreeItem::set_text(int p_column, String p_text) {
ERR_FAIL_INDEX(p_column, cells.size());
cells.write[p_column].text = p_text;
@@ -194,6 +221,9 @@ void TreeItem::set_text(int p_column, String p_text) {
}
cells.write[p_column].step = 0;
}
+
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -210,6 +240,7 @@ void TreeItem::set_text_direction(int p_column, Control::TextDirection p_text_di
cells.write[p_column].dirty = true;
_changed_notify(p_column);
}
+ cells.write[p_column].cached_minimum_size_dirty = true;
}
Control::TextDirection TreeItem::get_text_direction(int p_column) const {
@@ -219,8 +250,11 @@ Control::TextDirection TreeItem::get_text_direction(int p_column) const {
void TreeItem::clear_opentype_features(int p_column) {
ERR_FAIL_INDEX(p_column, cells.size());
+
cells.write[p_column].opentype_features.clear();
cells.write[p_column].dirty = true;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -230,6 +264,8 @@ void TreeItem::set_opentype_feature(int p_column, const String &p_name, int p_va
if (!cells[p_column].opentype_features.has(tag) || (int)cells[p_column].opentype_features[tag] != p_value) {
cells.write[p_column].opentype_features[tag] = p_value;
cells.write[p_column].dirty = true;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
}
@@ -245,9 +281,12 @@ int TreeItem::get_opentype_feature(int p_column, const String &p_name) const {
void TreeItem::set_structured_text_bidi_override(int p_column, Control::StructuredTextParser p_parser) {
ERR_FAIL_INDEX(p_column, cells.size());
+
if (cells[p_column].st_parser != p_parser) {
cells.write[p_column].st_parser = p_parser;
cells.write[p_column].dirty = true;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
}
@@ -259,8 +298,11 @@ Control::StructuredTextParser TreeItem::get_structured_text_bidi_override(int p_
void TreeItem::set_structured_text_bidi_override_options(int p_column, Array p_args) {
ERR_FAIL_INDEX(p_column, cells.size());
+
cells.write[p_column].st_args = p_args;
cells.write[p_column].dirty = true;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -271,9 +313,12 @@ Array TreeItem::get_structured_text_bidi_override_options(int p_column) const {
void TreeItem::set_language(int p_column, const String &p_language) {
ERR_FAIL_INDEX(p_column, cells.size());
+
if (cells[p_column].language != p_language) {
cells.write[p_column].language = p_language;
cells.write[p_column].dirty = true;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
}
@@ -285,7 +330,9 @@ String TreeItem::get_language(int p_column) const {
void TreeItem::set_suffix(int p_column, String p_suffix) {
ERR_FAIL_INDEX(p_column, cells.size());
+
cells.write[p_column].suffix = p_suffix;
+ cells.write[p_column].cached_minimum_size_dirty = true;
_changed_notify(p_column);
}
@@ -297,7 +344,10 @@ String TreeItem::get_suffix(int p_column) const {
void TreeItem::set_icon(int p_column, const Ref<Texture2D> &p_icon) {
ERR_FAIL_INDEX(p_column, cells.size());
+
cells.write[p_column].icon = p_icon;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -308,7 +358,10 @@ Ref<Texture2D> TreeItem::get_icon(int p_column) const {
void TreeItem::set_icon_region(int p_column, const Rect2 &p_icon_region) {
ERR_FAIL_INDEX(p_column, cells.size());
+
cells.write[p_column].icon_region = p_icon_region;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -330,7 +383,10 @@ Color TreeItem::get_icon_modulate(int p_column) const {
void TreeItem::set_icon_max_width(int p_column, int p_max) {
ERR_FAIL_INDEX(p_column, cells.size());
+
cells.write[p_column].icon_max_w = p_max;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -443,6 +499,10 @@ void TreeItem::uncollapse_tree() {
void TreeItem::set_custom_minimum_height(int p_height) {
custom_min_height = p_height;
+
+ for (Cell &c : cells)
+ c.cached_minimum_size_dirty = true;
+
_changed_notify();
}
@@ -767,6 +827,8 @@ void TreeItem::add_button(int p_column, const Ref<Texture2D> &p_button, int p_id
button.disabled = p_disabled;
button.tooltip = p_tooltip;
cells.write[p_column].buttons.push_back(button);
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -810,6 +872,8 @@ void TreeItem::set_button(int p_column, int p_idx, const Ref<Texture2D> &p_butto
ERR_FAIL_INDEX(p_column, cells.size());
ERR_FAIL_INDEX(p_idx, cells[p_column].buttons.size());
cells.write[p_column].buttons.write[p_idx].texture = p_button;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -825,6 +889,8 @@ void TreeItem::set_button_disabled(int p_column, int p_idx, bool p_disabled) {
ERR_FAIL_INDEX(p_idx, cells[p_column].buttons.size());
cells.write[p_column].buttons.write[p_idx].disabled = p_disabled;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -837,7 +903,10 @@ bool TreeItem::is_button_disabled(int p_column, int p_idx) const {
void TreeItem::set_editable(int p_column, bool p_editable) {
ERR_FAIL_INDEX(p_column, cells.size());
+
cells.write[p_column].editable = p_editable;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -870,13 +939,28 @@ void TreeItem::clear_custom_color(int p_column) {
void TreeItem::set_custom_font(int p_column, const Ref<Font> &p_font) {
ERR_FAIL_INDEX(p_column, cells.size());
+
cells.write[p_column].custom_font = p_font;
+ cells.write[p_column].cached_minimum_size_dirty = true;
}
+
Ref<Font> TreeItem::get_custom_font(int p_column) const {
ERR_FAIL_INDEX_V(p_column, cells.size(), Ref<Font>());
return cells[p_column].custom_font;
}
+void TreeItem::set_custom_font_size(int p_column, int p_font_size) {
+ ERR_FAIL_INDEX(p_column, cells.size());
+
+ cells.write[p_column].custom_font_size = p_font_size;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+}
+
+int TreeItem::get_custom_font_size(int p_column) const {
+ ERR_FAIL_INDEX_V(p_column, cells.size(), -1);
+ return cells[p_column].custom_font_size;
+}
+
void TreeItem::set_tooltip(int p_column, const String &p_tooltip) {
ERR_FAIL_INDEX(p_column, cells.size());
cells.write[p_column].tooltip = p_tooltip;
@@ -912,7 +996,9 @@ Color TreeItem::get_custom_bg_color(int p_column) const {
void TreeItem::set_custom_as_button(int p_column, bool p_button) {
ERR_FAIL_INDEX(p_column, cells.size());
+
cells.write[p_column].custom_button = p_button;
+ cells.write[p_column].cached_minimum_size_dirty = true;
}
bool TreeItem::is_custom_set_as_button(int p_column) const {
@@ -922,7 +1008,10 @@ bool TreeItem::is_custom_set_as_button(int p_column) const {
void TreeItem::set_text_align(int p_column, TextAlign p_align) {
ERR_FAIL_INDEX(p_column, cells.size());
+
cells.write[p_column].text_align = p_align;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -933,7 +1022,10 @@ TreeItem::TextAlign TreeItem::get_text_align(int p_column) const {
void TreeItem::set_expand_right(int p_column, bool p_enable) {
ERR_FAIL_INDEX(p_column, cells.size());
+
cells.write[p_column].expand_right = p_enable;
+ cells.write[p_column].cached_minimum_size_dirty = true;
+
_changed_notify(p_column);
}
@@ -944,6 +1036,10 @@ bool TreeItem::get_expand_right(int p_column) const {
void TreeItem::set_disable_folding(bool p_disable) {
disable_folding = p_disable;
+
+ for (Cell &c : cells)
+ c.cached_minimum_size_dirty = true;
+
_changed_notify(0);
}
@@ -956,49 +1052,52 @@ Size2 TreeItem::get_minimum_size(int p_column) {
Tree *tree = get_tree();
ERR_FAIL_COND_V(!tree, Size2());
- Size2 size;
+ const TreeItem::Cell &cell = cells[p_column];
- // Default offset?
- //size.width += (disable_folding || tree->hide_folding) ? tree->cache.hseparation : tree->cache.item_margin;
+ if (cell.cached_minimum_size_dirty) {
+ Size2 size;
- // Text.
- const TreeItem::Cell &cell = cells[p_column];
- if (!cell.text.is_empty()) {
- if (cell.dirty) {
- tree->update_item_cell(this, p_column);
+ // Text.
+ if (!cell.text.is_empty()) {
+ if (cell.dirty) {
+ tree->update_item_cell(this, p_column);
+ }
+ Size2 text_size = cell.text_buf->get_size();
+ size.width += text_size.width;
+ size.height = MAX(size.height, text_size.height);
}
- Size2 text_size = cell.text_buf->get_size();
- size.width += text_size.width;
- size.height = MAX(size.height, text_size.height);
- }
- // Icon.
- if (cell.mode == CELL_MODE_CHECK) {
- size.width += tree->cache.checked->get_width() + tree->cache.hseparation;
- }
- if (cell.icon.is_valid()) {
- Size2i icon_size = cell.get_icon_size();
- if (cell.icon_max_w > 0 && icon_size.width > cell.icon_max_w) {
- icon_size.width = cell.icon_max_w;
+ // Icon.
+ if (cell.mode == CELL_MODE_CHECK) {
+ size.width += tree->cache.checked->get_width() + tree->cache.hseparation;
+ }
+ if (cell.icon.is_valid()) {
+ Size2i icon_size = cell.get_icon_size();
+ if (cell.icon_max_w > 0 && icon_size.width > cell.icon_max_w) {
+ icon_size.width = cell.icon_max_w;
+ }
+ size.width += icon_size.width + tree->cache.hseparation;
+ size.height = MAX(size.height, icon_size.height);
}
- size.width += icon_size.width + tree->cache.hseparation;
- size.height = MAX(size.height, icon_size.height);
- }
- // Buttons.
- for (int i = 0; i < cell.buttons.size(); i++) {
- Ref<Texture2D> texture = cell.buttons[i].texture;
- if (texture.is_valid()) {
- Size2 button_size = texture->get_size() + tree->cache.button_pressed->get_minimum_size();
- size.width += button_size.width;
- size.height = MAX(size.height, button_size.height);
+ // Buttons.
+ for (int i = 0; i < cell.buttons.size(); i++) {
+ Ref<Texture2D> texture = cell.buttons[i].texture;
+ if (texture.is_valid()) {
+ Size2 button_size = texture->get_size() + tree->cache.button_pressed->get_minimum_size();
+ size.width += button_size.width;
+ size.height = MAX(size.height, button_size.height);
+ }
}
- }
- if (cell.buttons.size() >= 2) {
- size.width += (cell.buttons.size() - 1) * tree->cache.button_margin;
+ if (cell.buttons.size() >= 2) {
+ size.width += (cell.buttons.size() - 1) * tree->cache.button_margin;
+ }
+
+ cells.write[p_column].cached_minimum_size = size;
+ cells.write[p_column].cached_minimum_size_dirty = false;
}
- return size;
+ return cell.cached_minimum_size;
}
Variant TreeItem::_call_recursive_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
@@ -1042,7 +1141,9 @@ void TreeItem::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_cell_mode", "column"), &TreeItem::get_cell_mode);
ClassDB::bind_method(D_METHOD("set_checked", "column", "checked"), &TreeItem::set_checked);
+ ClassDB::bind_method(D_METHOD("set_indeterminate", "column", "indeterminate"), &TreeItem::set_indeterminate);
ClassDB::bind_method(D_METHOD("is_checked", "column"), &TreeItem::is_checked);
+ ClassDB::bind_method(D_METHOD("is_indeterminate", "column"), &TreeItem::is_indeterminate);
ClassDB::bind_method(D_METHOD("set_text", "column", "text"), &TreeItem::set_text);
ClassDB::bind_method(D_METHOD("get_text", "column"), &TreeItem::get_text);
@@ -1113,6 +1214,9 @@ void TreeItem::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_custom_font", "column", "font"), &TreeItem::set_custom_font);
ClassDB::bind_method(D_METHOD("get_custom_font", "column"), &TreeItem::get_custom_font);
+ ClassDB::bind_method(D_METHOD("set_custom_font_size", "column", "font_size"), &TreeItem::set_custom_font_size);
+ ClassDB::bind_method(D_METHOD("get_custom_font_size", "column"), &TreeItem::get_custom_font_size);
+
ClassDB::bind_method(D_METHOD("set_custom_bg_color", "column", "color", "just_outline"), &TreeItem::set_custom_bg_color, DEFVAL(false));
ClassDB::bind_method(D_METHOD("clear_custom_bg_color", "column"), &TreeItem::clear_custom_bg_color);
ClassDB::bind_method(D_METHOD("get_custom_bg_color", "column"), &TreeItem::get_custom_bg_color);
@@ -1228,6 +1332,7 @@ void Tree::update_cache() {
cache.checked = get_theme_icon(SNAME("checked"));
cache.unchecked = get_theme_icon(SNAME("unchecked"));
+ cache.indeterminate = get_theme_icon(SNAME("indeterminate"));
if (is_layout_rtl()) {
cache.arrow_collapsed = get_theme_icon(SNAME("arrow_collapsed_mirrored"));
} else {
@@ -1487,7 +1592,14 @@ void Tree::update_item_cell(TreeItem *p_item, int p_col) {
} else {
font = cache.font;
}
- p_item->cells.write[p_col].text_buf->add_string(valtext, font, cache.font_size, p_item->cells[p_col].opentype_features, (p_item->cells[p_col].language != "") ? p_item->cells[p_col].language : TranslationServer::get_singleton()->get_tool_locale());
+
+ int font_size;
+ if (p_item->cells[p_col].custom_font_size > 0) {
+ font_size = p_item->cells[p_col].custom_font_size;
+ } else {
+ font_size = cache.font_size;
+ }
+ p_item->cells.write[p_col].text_buf->add_string(valtext, font, font_size, p_item->cells[p_col].opentype_features, (p_item->cells[p_col].language != "") ? p_item->cells[p_col].language : TranslationServer::get_singleton()->get_tool_locale());
TS->shaped_text_set_bidi_override(p_item->cells[p_col].text_buf->get_rid(), structured_text_parser(p_item->cells[p_col].st_parser, p_item->cells[p_col].st_args, valtext));
p_item->cells.write[p_col].dirty = false;
}
@@ -1637,7 +1749,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
}
if ((select_mode == SELECT_ROW && selected_item == p_item) || p_item->cells[i].selected || !p_item->has_meta("__focus_rect")) {
- Rect2i r(cell_rect.position, cell_rect.size);
+ Rect2i r = cell_rect;
p_item->set_meta("__focus_rect", Rect2(r.position, r.size));
@@ -1676,24 +1788,30 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
}
}
- if (drop_mode_flags && drop_mode_over == p_item) {
+ if (drop_mode_flags && drop_mode_over) {
Rect2 r = cell_rect;
- bool has_parent = p_item->get_first_child() != nullptr;
if (rtl) {
r.position.x = get_size().width - r.position.x - r.size.x;
}
-
- if (drop_mode_section == -1 || has_parent || drop_mode_section == 0) {
- RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(r.position.x, r.position.y, r.size.x, 1), cache.drop_position_color);
- }
-
- if (drop_mode_section == 0) {
- RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(r.position.x, r.position.y, 1, r.size.y), cache.drop_position_color);
- RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(r.position.x + r.size.x - 1, r.position.y, 1, r.size.y), cache.drop_position_color);
- }
-
- if ((drop_mode_section == 1 && !has_parent) || drop_mode_section == 0) {
- RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(r.position.x, r.position.y + r.size.y, r.size.x, 1), cache.drop_position_color);
+ if (drop_mode_over == p_item) {
+ if (drop_mode_section == 0 || drop_mode_section == -1) {
+ // Line above.
+ RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(r.position.x, r.position.y, r.size.x, 1), cache.drop_position_color);
+ }
+ if (drop_mode_section == 0) {
+ // Side lines.
+ RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(r.position.x, r.position.y, 1, r.size.y), cache.drop_position_color);
+ RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(r.position.x + r.size.x - 1, r.position.y, 1, r.size.y), cache.drop_position_color);
+ }
+ if (drop_mode_section == 0 || (drop_mode_section == 1 && (!p_item->get_first_child() || p_item->is_collapsed()))) {
+ // Line below.
+ RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(r.position.x, r.position.y + r.size.y, r.size.x, 1), cache.drop_position_color);
+ }
+ } else if (drop_mode_over == p_item->get_parent()) {
+ if (drop_mode_section == 1 && !p_item->get_prev() /* && !drop_mode_over->is_collapsed() */) { // The drop_mode_over shouldn't ever be collapsed in here, otherwise we would be drawing a child of a collapsed item.
+ // Line above.
+ RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(r.position.x, r.position.y, r.size.x, 1), cache.drop_position_color);
+ }
}
}
@@ -1721,10 +1839,13 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
case TreeItem::CELL_MODE_CHECK: {
Ref<Texture2D> checked = cache.checked;
Ref<Texture2D> unchecked = cache.unchecked;
+ Ref<Texture2D> indeterminate = cache.indeterminate;
Point2i check_ofs = item_rect.position;
check_ofs.y += Math::floor((real_t)(item_rect.size.y - checked->get_height()) / 2);
- if (p_item->cells[i].checked) {
+ if (p_item->cells[i].indeterminate) {
+ indeterminate->draw(ci, check_ofs);
+ } else if (p_item->cells[i].checked) {
checked->draw(ci, check_ofs);
} else {
unchecked->draw(ci, check_ofs);
@@ -1884,7 +2005,8 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
arrow = cache.arrow;
}
- Point2 apos = p_pos + p_draw_ofs + Point2i(0, (label_h - arrow->get_height()) / 2) - cache.offset;
+ Point2 apos = p_pos + Point2i(0, (label_h - arrow->get_height()) / 2) - cache.offset + p_draw_ofs;
+ apos.x += cache.item_margin - arrow->get_width();
if (rtl) {
apos.x = get_size().width - apos.x - arrow->get_width();
@@ -2289,13 +2411,22 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, int
cache.click_type = Cache::CLICK_NONE;
return -1;
}
+
+ // Make sure the click is correct.
+ Point2 click_pos = get_global_mouse_position() - get_global_position();
+ if (!get_item_at_position(click_pos)) {
+ pressed_button = -1;
+ cache.click_type = Cache::CLICK_NONE;
+ return -1;
+ }
+
pressed_button = j;
cache.click_type = Cache::CLICK_BUTTON;
cache.click_index = j;
cache.click_id = c.buttons[j].id;
cache.click_item = p_item;
cache.click_column = col;
- cache.click_pos = get_global_mouse_position() - get_global_position();
+ cache.click_pos = click_pos;
update();
//emit_signal(SNAME("button_pressed"));
return -1;
@@ -2745,7 +2876,7 @@ void Tree::_go_down() {
accept_event();
}
-void Tree::_gui_input(Ref<InputEvent> p_event) {
+void Tree::gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
Ref<InputEventKey> k = p_event;
@@ -3907,10 +4038,12 @@ TreeItem *Tree::get_next_selected(TreeItem *p_item) {
int Tree::get_column_minimum_width(int p_column) const {
ERR_FAIL_INDEX_V(p_column, columns.size(), -1);
+ // Use the custom minimum width.
int min_width = columns[p_column].custom_min_width;
+ // Check if the visible title of the column is wider.
if (show_column_titles) {
- min_width = MAX(cache.font->get_string_size(columns[p_column].title).width, min_width);
+ min_width = MAX(cache.font->get_string_size(columns[p_column].title).width + cache.bg->get_margin(SIDE_LEFT) + cache.bg->get_margin(SIDE_RIGHT), min_width);
}
if (!columns[p_column].clip_content) {
@@ -3935,7 +4068,11 @@ int Tree::get_column_minimum_width(int p_column) const {
Size2 item_size = item->get_minimum_size(p_column);
if (p_column == 0) {
item_size.width += cache.item_margin * depth;
+ } else {
+ item_size.width += cache.hseparation;
}
+
+ // Check if the item is wider.
min_width = MAX(min_width, item_size.width);
}
}
@@ -3975,9 +4112,6 @@ int Tree::get_column_width(int p_column) const {
}
}
- if (p_column < columns.size() - 1) {
- column_width += cache.hseparation;
- }
return column_width;
}
@@ -4627,8 +4761,6 @@ bool Tree::get_allow_reselect() const {
}
void Tree::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_gui_input"), &Tree::_gui_input);
-
ClassDB::bind_method(D_METHOD("clear"), &Tree::clear);
ClassDB::bind_method(D_METHOD("create_item", "parent", "idx"), &Tree::_create_item, DEFVAL(Variant()), DEFVAL(-1));
@@ -4747,12 +4879,11 @@ Tree::Tree() {
popup_menu = memnew(PopupMenu);
popup_menu->hide();
- add_child(popup_menu);
- // popup_menu->set_as_top_level(true);
+ add_child(popup_menu, false, INTERNAL_MODE_FRONT);
popup_editor = memnew(Popup);
popup_editor->set_wrap_controls(true);
- add_child(popup_editor);
+ add_child(popup_editor, false, INTERNAL_MODE_FRONT);
popup_editor_vb = memnew(VBoxContainer);
popup_editor->add_child(popup_editor_vb);
popup_editor_vb->add_theme_constant_override("separation", 0);
@@ -4770,12 +4901,12 @@ Tree::Tree() {
h_scroll = memnew(HScrollBar);
v_scroll = memnew(VScrollBar);
- add_child(h_scroll);
- add_child(v_scroll);
+ add_child(h_scroll, false, INTERNAL_MODE_FRONT);
+ add_child(v_scroll, false, INTERNAL_MODE_FRONT);
range_click_timer = memnew(Timer);
range_click_timer->connect("timeout", callable_mp(this, &Tree::_range_click_timeout));
- add_child(range_click_timer);
+ add_child(range_click_timer, false, INTERNAL_MODE_FRONT);
h_scroll->connect("value_changed", callable_mp(this, &Tree::_scroll_moved));
v_scroll->connect("value_changed", callable_mp(this, &Tree::_scroll_moved));
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index be711b4c4f..c4a6b6b058 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -82,6 +82,7 @@ private:
int icon_max_w = 0;
bool expr = false;
bool checked = false;
+ bool indeterminate = false;
bool editable = false;
bool selected = false;
bool selectable = true;
@@ -94,6 +95,9 @@ private:
bool expand_right = false;
Color icon_color = Color(1, 1, 1);
+ Size2i cached_minimum_size;
+ bool cached_minimum_size_dirty = true;
+
TextAlign text_align = ALIGN_LEFT;
Variant meta;
@@ -113,6 +117,7 @@ private:
Vector<Button> buttons;
Ref<Font> custom_font;
+ int custom_font_size = -1;
Cell() {
text_buf.instantiate();
@@ -209,7 +214,9 @@ public:
/* check mode */
void set_checked(int p_column, bool p_checked);
+ void set_indeterminate(int p_column, bool p_indeterminate);
bool is_checked(int p_column) const;
+ bool is_indeterminate(int p_column) const;
void set_text(int p_column, String p_text);
String get_text(int p_column) const;
@@ -296,6 +303,9 @@ public:
void set_custom_font(int p_column, const Ref<Font> &p_font);
Ref<Font> get_custom_font(int p_column) const;
+ void set_custom_font_size(int p_column, int p_font_size);
+ int get_custom_font_size(int p_column) const;
+
void set_custom_bg_color(int p_column, const Color &p_color, bool p_bg_outline = false);
void clear_custom_bg_color(int p_column);
Color get_custom_bg_color(int p_column) const;
@@ -459,7 +469,6 @@ private:
void popup_select(int p_option);
- void _gui_input(Ref<InputEvent> p_event);
void _notification(int p_what);
void item_edited(int p_column, TreeItem *p_item, bool p_lmb = true);
@@ -491,6 +500,7 @@ private:
Ref<Texture2D> checked;
Ref<Texture2D> unchecked;
+ Ref<Texture2D> indeterminate;
Ref<Texture2D> arrow_collapsed;
Ref<Texture2D> arrow;
Ref<Texture2D> select_arrow;
@@ -622,6 +632,8 @@ protected:
}
public:
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
+
virtual String get_tooltip(const Point2 &p_pos) const override;
TreeItem *get_item_at_position(const Point2 &p_pos) const;
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index 229b5384ea..8734037a57 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -129,7 +129,7 @@ void VideoPlayer::_mix_audio() {
void VideoPlayer::_notification(int p_notification) {
switch (p_notification) {
case NOTIFICATION_ENTER_TREE: {
- AudioServer::get_singleton()->add_callback(_mix_audios, this);
+ AudioServer::get_singleton()->add_mix_callback(_mix_audios, this);
if (stream.is_valid() && autoplay && !Engine::get_singleton()->is_editor_hint()) {
play();
@@ -138,8 +138,7 @@ void VideoPlayer::_notification(int p_notification) {
} break;
case NOTIFICATION_EXIT_TREE: {
- AudioServer::get_singleton()->remove_callback(_mix_audios, this);
-
+ AudioServer::get_singleton()->remove_mix_callback(_mix_audios, this);
} break;
case NOTIFICATION_INTERNAL_PROCESS: {
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index f2415eaf71..64b169b1fb 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -151,9 +151,7 @@ void CanvasItem::_update_callback() {
current_item_drawn = this;
notification(NOTIFICATION_DRAW);
emit_signal(SceneStringNames::get_singleton()->draw);
- if (get_script_instance()) {
- get_script_instance()->call(SceneStringNames::get_singleton()->_draw);
- }
+ GDVIRTUAL_CALL(_draw);
current_item_drawn = nullptr;
drawing = false;
}
@@ -573,6 +571,12 @@ void CanvasItem::draw_texture_rect_region(const Ref<Texture2D> &p_texture, const
p_texture->draw_rect_region(canvas_item, p_rect, p_src_rect, p_modulate, p_transpose, p_clip_uv);
}
+void CanvasItem::draw_msdf_texture_rect_region(const Ref<Texture2D> &p_texture, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate, double p_outline, double p_pixel_range) {
+ ERR_FAIL_COND_MSG(!drawing, "Drawing is only allowed inside NOTIFICATION_DRAW, _draw() function or 'draw' signal.");
+ ERR_FAIL_COND(p_texture.is_null());
+ RenderingServer::get_singleton()->canvas_item_add_msdf_texture_rect_region(canvas_item, p_rect, p_texture->get_rid(), p_src_rect, p_modulate, p_outline, p_pixel_range);
+}
+
void CanvasItem::draw_style_box(const Ref<StyleBox> &p_style_box, const Rect2 &p_rect) {
ERR_FAIL_COND_MSG(!drawing, "Drawing is only allowed inside NOTIFICATION_DRAW, _draw() function or 'draw' signal.");
@@ -883,6 +887,7 @@ void CanvasItem::_bind_methods() {
ClassDB::bind_method(D_METHOD("draw_texture", "texture", "position", "modulate"), &CanvasItem::draw_texture, DEFVAL(Color(1, 1, 1, 1)));
ClassDB::bind_method(D_METHOD("draw_texture_rect", "texture", "rect", "tile", "modulate", "transpose"), &CanvasItem::draw_texture_rect, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(false));
ClassDB::bind_method(D_METHOD("draw_texture_rect_region", "texture", "rect", "src_rect", "modulate", "transpose", "clip_uv"), &CanvasItem::draw_texture_rect_region, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(false), DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("draw_msdf_texture_rect_region", "texture", "rect", "src_rect", "modulate", "outline", "pixel_range"), &CanvasItem::draw_msdf_texture_rect_region, DEFVAL(Color(1, 1, 1, 1)), DEFVAL(0.0), DEFVAL(4.0));
ClassDB::bind_method(D_METHOD("draw_style_box", "style_box", "rect"), &CanvasItem::draw_style_box);
ClassDB::bind_method(D_METHOD("draw_primitive", "points", "colors", "uvs", "texture", "width"), &CanvasItem::draw_primitive, DEFVAL(Ref<Texture2D>()), DEFVAL(1.0));
ClassDB::bind_method(D_METHOD("draw_polygon", "points", "colors", "uvs", "texture"), &CanvasItem::draw_polygon, DEFVAL(PackedVector2Array()), DEFVAL(Ref<Texture2D>()));
@@ -934,7 +939,7 @@ void CanvasItem::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_clip_children", "enable"), &CanvasItem::set_clip_children);
ClassDB::bind_method(D_METHOD("is_clipping_children"), &CanvasItem::is_clipping_children);
- BIND_VMETHOD(MethodInfo("_draw"));
+ GDVIRTUAL_BIND(_draw);
ADD_GROUP("Visibility", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "visible"), "set_visible", "is_visible");
diff --git a/scene/main/canvas_item.h b/scene/main/canvas_item.h
index dc7ad2bf5d..01ed47d4dc 100644
--- a/scene/main/canvas_item.h
+++ b/scene/main/canvas_item.h
@@ -142,6 +142,7 @@ protected:
void _notification(int p_what);
static void _bind_methods();
+ GDVIRTUAL0(_draw)
public:
enum {
NOTIFICATION_TRANSFORM_CHANGED = SceneTree::NOTIFICATION_TRANSFORM_CHANGED, //unique
@@ -225,6 +226,7 @@ public:
void draw_texture(const Ref<Texture2D> &p_texture, const Point2 &p_pos, const Color &p_modulate = Color(1, 1, 1, 1));
void draw_texture_rect(const Ref<Texture2D> &p_texture, const Rect2 &p_rect, bool p_tile = false, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false);
void draw_texture_rect_region(const Ref<Texture2D> &p_texture, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, bool p_clip_uv = false);
+ void draw_msdf_texture_rect_region(const Ref<Texture2D> &p_texture, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), double p_outline = 0.0, double p_pixel_range = 4.0);
void draw_style_box(const Ref<StyleBox> &p_style_box, const Rect2 &p_rect);
void draw_primitive(const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, Ref<Texture2D> p_texture = Ref<Texture2D>(), real_t p_width = 1);
void draw_polygon(const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), Ref<Texture2D> p_texture = Ref<Texture2D>());
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index f24d880045..14fd14dd18 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -104,9 +104,11 @@ Error HTTPRequest::request(const String &p_url, const Vector<String> &p_custom_h
CharString charstr = p_request_data.utf8();
size_t len = charstr.length();
- raw_data.resize(len);
- uint8_t *w = raw_data.ptrw();
- memcpy(w, charstr.ptr(), len);
+ if (len > 0) {
+ raw_data.resize(len);
+ uint8_t *w = raw_data.ptrw();
+ memcpy(w, charstr.ptr(), len);
+ }
return request_raw(p_url, p_custom_headers, p_ssl_validate_domain, p_method, raw_data);
}
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 155af30a6d..db5f714b99 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -48,22 +48,18 @@
#include <stdint.h>
VARIANT_ENUM_CAST(Node::ProcessMode);
+VARIANT_ENUM_CAST(Node::InternalMode);
int Node::orphan_node_count = 0;
void Node::_notification(int p_notification) {
switch (p_notification) {
case NOTIFICATION_PROCESS: {
- if (get_script_instance()) {
- Variant time = get_process_delta_time();
- get_script_instance()->call(SceneStringNames::get_singleton()->_process, time);
- }
+ GDVIRTUAL_CALL(_process, get_process_delta_time());
+
} break;
case NOTIFICATION_PHYSICS_PROCESS: {
- if (get_script_instance()) {
- Variant time = get_physics_process_delta_time();
- get_script_instance()->call(SceneStringNames::get_singleton()->_physics_process, time);
- }
+ GDVIRTUAL_CALL(_physics_process, get_physics_process_delta_time());
} break;
case NOTIFICATION_ENTER_TREE: {
@@ -74,7 +70,9 @@ void Node::_notification(int p_notification) {
if (data.parent) {
data.process_owner = data.parent->data.process_owner;
} else {
- data.process_owner = nullptr;
+ ERR_PRINT("The root node can't be set to Inherit process mode, reverting to Pausable instead.");
+ data.process_mode = PROCESS_MODE_PAUSABLE;
+ data.process_owner = this;
}
} else {
data.process_owner = this;
@@ -116,8 +114,8 @@ void Node::_notification(int p_notification) {
memdelete(data.path_cache);
data.path_cache = nullptr;
}
- if (data.filename.length()) {
- get_multiplayer()->scene_enter_exit_notify(data.filename, this, false);
+ if (data.scene_file_path.length()) {
+ get_multiplayer()->scene_enter_exit_notify(data.scene_file_path, this, false);
}
} break;
case NOTIFICATION_PATH_CHANGED: {
@@ -127,32 +125,30 @@ void Node::_notification(int p_notification) {
}
} break;
case NOTIFICATION_READY: {
- if (get_script_instance()) {
- if (get_script_instance()->has_method(SceneStringNames::get_singleton()->_input)) {
- set_process_input(true);
- }
+ if (GDVIRTUAL_IS_OVERRIDDEN(_input)) {
+ set_process_input(true);
+ }
- if (get_script_instance()->has_method(SceneStringNames::get_singleton()->_unhandled_input)) {
- set_process_unhandled_input(true);
- }
+ if (GDVIRTUAL_IS_OVERRIDDEN(_unhandled_input)) {
+ set_process_unhandled_input(true);
+ }
- if (get_script_instance()->has_method(SceneStringNames::get_singleton()->_unhandled_key_input)) {
- set_process_unhandled_key_input(true);
- }
+ if (GDVIRTUAL_IS_OVERRIDDEN(_unhandled_key_input)) {
+ set_process_unhandled_key_input(true);
+ }
- if (get_script_instance()->has_method(SceneStringNames::get_singleton()->_process)) {
- set_process(true);
- }
+ if (GDVIRTUAL_IS_OVERRIDDEN(_process)) {
+ set_process(true);
+ }
+ if (GDVIRTUAL_IS_OVERRIDDEN(_physics_process)) {
+ set_physics_process(true);
+ }
- if (get_script_instance()->has_method(SceneStringNames::get_singleton()->_physics_process)) {
- set_physics_process(true);
- }
+ GDVIRTUAL_CALL(_ready);
- get_script_instance()->call(SceneStringNames::get_singleton()->_ready);
- }
- if (data.filename.length()) {
+ if (data.scene_file_path.length()) {
ERR_FAIL_COND(!is_inside_tree());
- get_multiplayer()->scene_enter_exit_notify(data.filename, this, true);
+ get_multiplayer()->scene_enter_exit_notify(data.scene_file_path, this, true);
}
} break;
@@ -221,9 +217,7 @@ void Node::_propagate_enter_tree() {
notification(NOTIFICATION_ENTER_TREE);
- if (get_script_instance()) {
- get_script_instance()->call(SceneStringNames::get_singleton()->_enter_tree);
- }
+ GDVIRTUAL_CALL(_enter_tree);
emit_signal(SceneStringNames::get_singleton()->tree_entered);
@@ -241,7 +235,7 @@ void Node::_propagate_enter_tree() {
data.blocked--;
#ifdef DEBUG_ENABLED
- SceneDebugger::add_to_cache(data.filename, this);
+ SceneDebugger::add_to_cache(data.scene_file_path, this);
#endif
// enter groups
}
@@ -259,7 +253,7 @@ void Node::_propagate_exit_tree() {
//block while removing children
#ifdef DEBUG_ENABLED
- SceneDebugger::remove_from_cache(data.filename, this);
+ SceneDebugger::remove_from_cache(data.scene_file_path, this);
#endif
data.blocked++;
@@ -269,9 +263,8 @@ void Node::_propagate_exit_tree() {
data.blocked--;
- if (get_script_instance()) {
- get_script_instance()->call(SceneStringNames::get_singleton()->_exit_tree);
- }
+ GDVIRTUAL_CALL(_exit_tree);
+
emit_signal(SceneStringNames::get_singleton()->tree_exiting);
notification(NOTIFICATION_EXIT_TREE, true);
@@ -300,14 +293,40 @@ void Node::_propagate_exit_tree() {
void Node::move_child(Node *p_child, int p_pos) {
ERR_FAIL_NULL(p_child);
- ERR_FAIL_INDEX_MSG(p_pos, data.children.size() + 1, vformat("Invalid new child position: %d.", p_pos));
ERR_FAIL_COND_MSG(p_child->data.parent != this, "Child is not a child of this node.");
+
+ // We need to check whether node is internal and move it only in the relevant node range.
+ if (p_child->_is_internal_front()) {
+ ERR_FAIL_INDEX_MSG(p_pos, data.internal_children_front, vformat("Invalid new child position: %d. Child is internal.", p_pos));
+ _move_child(p_child, p_pos);
+ } else if (p_child->_is_internal_back()) {
+ ERR_FAIL_INDEX_MSG(p_pos, data.internal_children_back, vformat("Invalid new child position: %d. Child is internal.", p_pos));
+ _move_child(p_child, data.children.size() - data.internal_children_back + p_pos);
+ } else {
+ ERR_FAIL_INDEX_MSG(p_pos, data.children.size() + 1 - data.internal_children_front - data.internal_children_back, vformat("Invalid new child position: %d.", p_pos));
+ _move_child(p_child, p_pos + data.internal_children_front);
+ }
+}
+
+void Node::_move_child(Node *p_child, int p_pos, bool p_ignore_end) {
ERR_FAIL_COND_MSG(data.blocked > 0, "Parent node is busy setting up children, move_child() failed. Consider using call_deferred(\"move_child\") instead (or \"popup\" if this is from a popup).");
// Specifying one place beyond the end
// means the same as moving to the last position
- if (p_pos == data.children.size()) {
- p_pos--;
+ if (!p_ignore_end) { // p_ignore_end is a little hack to make back internal children work properly.
+ if (p_child->_is_internal_front()) {
+ if (p_pos == data.internal_children_front) {
+ p_pos--;
+ }
+ } else if (p_child->_is_internal_back()) {
+ if (p_pos == data.children.size()) {
+ p_pos--;
+ }
+ } else {
+ if (p_pos == data.children.size() - data.internal_children_back) {
+ p_pos--;
+ }
+ }
}
if (p_child->data.pos == p_pos) {
@@ -348,7 +367,14 @@ void Node::raise() {
return;
}
- data.parent->move_child(this, data.parent->data.children.size() - 1);
+ // Internal children move within a different index range.
+ if (_is_internal_front()) {
+ data.parent->move_child(this, data.parent->data.internal_children_front - 1);
+ } else if (_is_internal_back()) {
+ data.parent->move_child(this, data.parent->data.internal_children_back - 1);
+ } else {
+ data.parent->move_child(this, data.parent->get_child_count(false) - 1);
+ }
}
void Node::add_child_notify(Node *p_child) {
@@ -412,18 +438,18 @@ void Node::set_process_mode(ProcessMode p_mode) {
bool prev_can_process = can_process();
bool prev_enabled = _is_enabled();
- data.process_mode = p_mode;
-
- if (data.process_mode == PROCESS_MODE_INHERIT) {
+ if (p_mode == PROCESS_MODE_INHERIT) {
if (data.parent) {
- data.process_owner = data.parent->data.owner;
+ data.process_owner = data.parent->data.process_owner;
} else {
- data.process_owner = nullptr;
+ ERR_FAIL_MSG("The root node can't be set to Inherit process mode.");
}
} else {
data.process_owner = this;
}
+ data.process_mode = p_mode;
+
bool next_can_process = can_process();
bool next_enabled = _is_enabled();
@@ -492,32 +518,32 @@ void Node::_propagate_process_owner(Node *p_owner, int p_pause_notification, int
}
}
-void Node::set_network_master(int p_peer_id, bool p_recursive) {
- data.network_master = p_peer_id;
+void Node::set_multiplayer_authority(int p_peer_id, bool p_recursive) {
+ data.multiplayer_authority = p_peer_id;
if (p_recursive) {
for (int i = 0; i < data.children.size(); i++) {
- data.children[i]->set_network_master(p_peer_id, true);
+ data.children[i]->set_multiplayer_authority(p_peer_id, true);
}
}
}
-int Node::get_network_master() const {
- return data.network_master;
+int Node::get_multiplayer_authority() const {
+ return data.multiplayer_authority;
}
-bool Node::is_network_master() const {
+bool Node::is_multiplayer_authority() const {
ERR_FAIL_COND_V(!is_inside_tree(), false);
- return get_multiplayer()->get_network_unique_id() == data.network_master;
+ return get_multiplayer()->get_unique_id() == data.multiplayer_authority;
}
/***** RPC CONFIG ********/
-uint16_t Node::rpc_config(const StringName &p_method, MultiplayerAPI::RPCMode p_rpc_mode, MultiplayerPeer::TransferMode p_transfer_mode, int p_channel) {
+uint16_t Node::rpc_config(const StringName &p_method, Multiplayer::RPCMode p_rpc_mode, Multiplayer::TransferMode p_transfer_mode, int p_channel) {
for (int i = 0; i < data.rpc_methods.size(); i++) {
if (data.rpc_methods[i].name == p_method) {
- MultiplayerAPI::RPCConfig &nd = data.rpc_methods.write[i];
+ Multiplayer::RPCConfig &nd = data.rpc_methods.write[i];
nd.rpc_mode = p_rpc_mode;
nd.transfer_mode = p_transfer_mode;
nd.channel = p_channel;
@@ -525,7 +551,7 @@ uint16_t Node::rpc_config(const StringName &p_method, MultiplayerAPI::RPCMode p_
}
}
// New method
- MultiplayerAPI::RPCConfig nd;
+ Multiplayer::RPCConfig nd;
nd.name = p_method;
nd.rpc_mode = p_rpc_mode;
nd.transfer_mode = p_transfer_mode;
@@ -618,7 +644,7 @@ Variant Node::_rpc_id_bind(const Variant **p_args, int p_argcount, Callable::Cal
void Node::rpcp(int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount) {
ERR_FAIL_COND(!is_inside_tree());
- get_multiplayer()->rpcp(this, p_peer_id, true, p_method, p_arg, p_argcount);
+ get_multiplayer()->rpcp(this, p_peer_id, p_method, p_arg, p_argcount);
}
Ref<MultiplayerAPI> Node::get_multiplayer() const {
@@ -639,7 +665,7 @@ void Node::set_custom_multiplayer(Ref<MultiplayerAPI> p_multiplayer) {
multiplayer = p_multiplayer;
}
-Vector<MultiplayerAPI::RPCConfig> Node::get_node_rpc_methods() const {
+Vector<Multiplayer::RPCConfig> Node::get_node_rpc_methods() const {
return data.rpc_methods;
}
@@ -678,6 +704,9 @@ bool Node::_can_process(bool p_paused) const {
process_mode = data.process_mode;
}
+ // The owner can't be set to inherit, must be a bug.
+ ERR_FAIL_COND_V(process_mode == PROCESS_MODE_INHERIT, false);
+
if (process_mode == PROCESS_MODE_DISABLED) {
return false;
} else if (process_mode == PROCESS_MODE_ALWAYS) {
@@ -1067,6 +1096,10 @@ void Node::_add_child_nocheck(Node *p_child, const StringName &p_name) {
p_child->data.pos = data.children.size();
data.children.push_back(p_child);
p_child->data.parent = this;
+
+ if (data.internal_children_back > 0) {
+ _move_child(p_child, data.children.size() - data.internal_children_back - 1);
+ }
p_child->notification(NOTIFICATION_PARENTED);
if (data.tree) {
@@ -1079,7 +1112,7 @@ void Node::_add_child_nocheck(Node *p_child, const StringName &p_name) {
add_child_notify(p_child);
}
-void Node::add_child(Node *p_child, bool p_legible_unique_name) {
+void Node::add_child(Node *p_child, bool p_legible_unique_name, InternalMode p_internal) {
ERR_FAIL_NULL(p_child);
ERR_FAIL_COND_MSG(p_child == this, vformat("Can't add child '%s' to itself.", p_child->get_name())); // adding to itself!
ERR_FAIL_COND_MSG(p_child->data.parent, vformat("Can't add child '%s' to '%s', already has a parent '%s'.", p_child->get_name(), get_name(), p_child->data.parent->get_name())); //Fail if node has a parent
@@ -1088,19 +1121,35 @@ void Node::add_child(Node *p_child, bool p_legible_unique_name) {
#endif
ERR_FAIL_COND_MSG(data.blocked > 0, "Parent node is busy setting up children, add_node() failed. Consider using call_deferred(\"add_child\", child) instead.");
- /* Validate name */
_validate_child_name(p_child, p_legible_unique_name);
-
_add_child_nocheck(p_child, p_child->data.name);
+
+ if (p_internal == INTERNAL_MODE_FRONT) {
+ _move_child(p_child, data.internal_children_front);
+ data.internal_children_front++;
+ } else if (p_internal == INTERNAL_MODE_BACK) {
+ if (data.internal_children_back > 0) {
+ _move_child(p_child, data.children.size() - 1, true);
+ }
+ data.internal_children_back++;
+ }
}
void Node::add_sibling(Node *p_sibling, bool p_legible_unique_name) {
ERR_FAIL_NULL(p_sibling);
+ ERR_FAIL_NULL(data.parent);
ERR_FAIL_COND_MSG(p_sibling == this, vformat("Can't add sibling '%s' to itself.", p_sibling->get_name())); // adding to itself!
ERR_FAIL_COND_MSG(data.blocked > 0, "Parent node is busy setting up children, add_sibling() failed. Consider using call_deferred(\"add_sibling\", sibling) instead.");
- get_parent()->add_child(p_sibling, p_legible_unique_name);
- get_parent()->move_child(p_sibling, this->get_index() + 1);
+ InternalMode internal = INTERNAL_MODE_DISABLED;
+ if (_is_internal_front()) { // The sibling will have the same internal status.
+ internal = INTERNAL_MODE_FRONT;
+ } else if (_is_internal_back()) {
+ internal = INTERNAL_MODE_BACK;
+ }
+
+ data.parent->add_child(p_sibling, p_legible_unique_name, internal);
+ data.parent->_move_child(p_sibling, get_index() + 1);
}
void Node::_propagate_validate_owner() {
@@ -1154,7 +1203,12 @@ void Node::remove_child(Node *p_child) {
ERR_FAIL_COND_MSG(idx == -1, vformat("Cannot remove child node '%s' as it is not a child of this node.", p_child->get_name()));
//ERR_FAIL_COND( p_child->data.blocked > 0 );
- //if (data.scene) { does not matter
+ // If internal child, update the counter.
+ if (p_child->_is_internal_front()) {
+ data.internal_children_front--;
+ } else if (p_child->_is_internal_back()) {
+ data.internal_children_back--;
+ }
p_child->_set_tree(nullptr);
//}
@@ -1184,17 +1238,29 @@ void Node::remove_child(Node *p_child) {
}
}
-int Node::get_child_count() const {
- return data.children.size();
+int Node::get_child_count(bool p_include_internal) const {
+ if (p_include_internal) {
+ return data.children.size();
+ } else {
+ return data.children.size() - data.internal_children_front - data.internal_children_back;
+ }
}
-Node *Node::get_child(int p_index) const {
- if (p_index < 0) {
- p_index += data.children.size();
+Node *Node::get_child(int p_index, bool p_include_internal) const {
+ if (p_include_internal) {
+ if (p_index < 0) {
+ p_index += data.children.size();
+ }
+ ERR_FAIL_INDEX_V(p_index, data.children.size(), nullptr);
+ return data.children[p_index];
+ } else {
+ if (p_index < 0) {
+ p_index += data.children.size() - data.internal_children_front - data.internal_children_back;
+ }
+ ERR_FAIL_INDEX_V(p_index, data.children.size() - data.internal_children_front - data.internal_children_back, nullptr);
+ p_index += data.internal_children_front;
+ return data.children[p_index];
}
- ERR_FAIL_INDEX_V(p_index, data.children.size(), nullptr);
-
- return data.children[p_index];
}
Node *Node::_get_child_by_name(const StringName &p_name) const {
@@ -1726,7 +1792,13 @@ void Node::_propagate_replace_owner(Node *p_owner, Node *p_by_owner) {
data.blocked--;
}
-int Node::get_index() const {
+int Node::get_index(bool p_include_internal) const {
+ // p_include_internal = false doesn't make sense if the node is internal.
+ ERR_FAIL_COND_V_MSG(!p_include_internal && (_is_internal_front() || _is_internal_back()), -1, "Node is internal. Can't get index with 'include_internal' being false.");
+
+ if (data.parent && !p_include_internal) {
+ return data.pos - data.parent->data.internal_children_front;
+ }
return data.pos;
}
@@ -1774,12 +1846,12 @@ void Node::remove_and_skip() {
data.parent->remove_child(this);
}
-void Node::set_filename(const String &p_filename) {
- data.filename = p_filename;
+void Node::set_scene_file_path(const String &p_scene_file_path) {
+ data.scene_file_path = p_scene_file_path;
}
-String Node::get_filename() const {
- return data.filename;
+String Node::get_scene_file_path() const {
+ return data.scene_file_path;
}
void Node::set_editor_description(const String &p_editor_description) {
@@ -1876,8 +1948,8 @@ Node *Node::_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap) const
nip->set_instance_path(ip->get_instance_path());
node = nip;
- } else if ((p_flags & DUPLICATE_USE_INSTANCING) && get_filename() != String()) {
- Ref<PackedScene> res = ResourceLoader::load(get_filename());
+ } else if ((p_flags & DUPLICATE_USE_INSTANCING) && get_scene_file_path() != String()) {
+ Ref<PackedScene> res = ResourceLoader::load(get_scene_file_path());
ERR_FAIL_COND_V(res.is_null(), nullptr);
PackedScene::GenEditState ges = PackedScene::GEN_EDIT_STATE_DISABLED;
#ifdef TOOLS_ENABLED
@@ -1900,8 +1972,8 @@ Node *Node::_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap) const
ERR_FAIL_COND_V(!node, nullptr);
}
- if (get_filename() != "") { //an instance
- node->set_filename(get_filename());
+ if (get_scene_file_path() != "") { //an instance
+ node->set_scene_file_path(get_scene_file_path());
node->data.editable_instance = data.editable_instance;
}
@@ -1932,7 +2004,7 @@ Node *Node::_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap) const
node_tree.push_back(descendant);
- if (descendant->get_filename() != "" && instance_roots.has(descendant->get_owner())) {
+ if (descendant->get_scene_file_path() != "" && instance_roots.has(descendant->get_owner())) {
instance_roots.push_back(descendant);
}
}
@@ -2241,7 +2313,7 @@ void Node::replace_by(Node *p_node, bool p_keep_groups) {
owned_by_owner[i]->set_owner(owner);
}
- p_node->set_filename(get_filename());
+ p_node->set_scene_file_path(get_scene_file_path());
}
void Node::_replace_connections_target(Node *p_new_target) {
@@ -2438,12 +2510,12 @@ void Node::queue_delete() {
}
}
-TypedArray<Node> Node::_get_children() const {
+TypedArray<Node> Node::_get_children(bool p_include_internal) const {
TypedArray<Node> arr;
- int cc = get_child_count();
+ int cc = get_child_count(p_include_internal);
arr.resize(cc);
for (int i = 0; i < cc; i++) {
- arr[i] = get_child(i);
+ arr[i] = get_child(i, p_include_internal);
}
return arr;
@@ -2496,9 +2568,14 @@ void Node::clear_internal_tree_resource_paths() {
}
TypedArray<String> Node::get_configuration_warnings() const {
- if (get_script_instance() && get_script_instance()->get_script().is_valid() &&
- get_script_instance()->get_script()->is_tool() && get_script_instance()->has_method("_get_configuration_warnings")) {
- return get_script_instance()->call("_get_configuration_warnings");
+ Vector<String> warnings;
+ if (GDVIRTUAL_CALL(_get_configuration_warnings, warnings)) {
+ TypedArray<String> ret;
+ ret.resize(warnings.size());
+ for (int i = 0; i < warnings.size(); i++) {
+ ret[i] = warnings[i];
+ }
+ return ret;
}
return Array();
}
@@ -2544,6 +2621,37 @@ void Node::request_ready() {
data.ready_first = true;
}
+void Node::_call_input(const Ref<InputEvent> &p_event) {
+ GDVIRTUAL_CALL(_input, p_event);
+ if (!is_inside_tree() || !get_viewport() || get_viewport()->is_input_handled()) {
+ return;
+ }
+ input(p_event);
+}
+void Node::_call_unhandled_input(const Ref<InputEvent> &p_event) {
+ GDVIRTUAL_CALL(_unhandled_input, p_event);
+ if (!is_inside_tree() || !get_viewport() || get_viewport()->is_input_handled()) {
+ return;
+ }
+ unhandled_input(p_event);
+}
+void Node::_call_unhandled_key_input(const Ref<InputEvent> &p_event) {
+ GDVIRTUAL_CALL(_unhandled_key_input, p_event);
+ if (!is_inside_tree() || !get_viewport() || get_viewport()->is_input_handled()) {
+ return;
+ }
+ unhandled_key_input(p_event);
+}
+
+void Node::input(const Ref<InputEvent> &p_event) {
+}
+
+void Node::unhandled_input(const Ref<InputEvent> &p_event) {
+}
+
+void Node::unhandled_key_input(const Ref<InputEvent> &p_key_event) {
+}
+
void Node::_bind_methods() {
GLOBAL_DEF("editor/node_naming/name_num_separator", 0);
ProjectSettings::get_singleton()->set_custom_property_info("editor/node_naming/name_num_separator", PropertyInfo(Variant::INT, "editor/node_naming/name_num_separator", PROPERTY_HINT_ENUM, "None,Space,Underscore,Dash"));
@@ -2554,11 +2662,11 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_name", "name"), &Node::set_name);
ClassDB::bind_method(D_METHOD("get_name"), &Node::get_name);
- ClassDB::bind_method(D_METHOD("add_child", "node", "legible_unique_name"), &Node::add_child, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("add_child", "node", "legible_unique_name", "internal"), &Node::add_child, DEFVAL(false), DEFVAL(0));
ClassDB::bind_method(D_METHOD("remove_child", "node"), &Node::remove_child);
- ClassDB::bind_method(D_METHOD("get_child_count"), &Node::get_child_count);
- ClassDB::bind_method(D_METHOD("get_children"), &Node::_get_children);
- ClassDB::bind_method(D_METHOD("get_child", "idx"), &Node::get_child);
+ ClassDB::bind_method(D_METHOD("get_child_count", "include_internal"), &Node::get_child_count, DEFVAL(false)); // Note that the default value bound for include_internal is false, while the method is declared with true. This is because internal nodes are irrelevant for GDSCript.
+ ClassDB::bind_method(D_METHOD("get_children", "include_internal"), &Node::_get_children, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("get_child", "idx", "include_internal"), &Node::get_child, DEFVAL(false));
ClassDB::bind_method(D_METHOD("has_node", "path"), &Node::has_node);
ClassDB::bind_method(D_METHOD("get_node", "path"), &Node::get_node);
ClassDB::bind_method(D_METHOD("get_node_or_null", "path"), &Node::get_node_or_null);
@@ -2582,11 +2690,11 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_owner", "owner"), &Node::set_owner);
ClassDB::bind_method(D_METHOD("get_owner"), &Node::get_owner);
ClassDB::bind_method(D_METHOD("remove_and_skip"), &Node::remove_and_skip);
- ClassDB::bind_method(D_METHOD("get_index"), &Node::get_index);
+ ClassDB::bind_method(D_METHOD("get_index", "include_internal"), &Node::get_index, DEFVAL(false));
ClassDB::bind_method(D_METHOD("print_tree"), &Node::print_tree);
ClassDB::bind_method(D_METHOD("print_tree_pretty"), &Node::print_tree_pretty);
- ClassDB::bind_method(D_METHOD("set_filename", "filename"), &Node::set_filename);
- ClassDB::bind_method(D_METHOD("get_filename"), &Node::get_filename);
+ ClassDB::bind_method(D_METHOD("set_scene_file_path", "scene_file_path"), &Node::set_scene_file_path);
+ ClassDB::bind_method(D_METHOD("get_scene_file_path"), &Node::get_scene_file_path);
ClassDB::bind_method(D_METHOD("propagate_notification", "what"), &Node::propagate_notification);
ClassDB::bind_method(D_METHOD("propagate_call", "method", "args", "parent_first"), &Node::propagate_call, DEFVAL(Array()), DEFVAL(false));
ClassDB::bind_method(D_METHOD("set_physics_process", "enable"), &Node::set_physics_process);
@@ -2625,6 +2733,8 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_scene_instance_load_placeholder", "load_placeholder"), &Node::set_scene_instance_load_placeholder);
ClassDB::bind_method(D_METHOD("get_scene_instance_load_placeholder"), &Node::get_scene_instance_load_placeholder);
+ ClassDB::bind_method(D_METHOD("set_editable_instance", "node", "is_editable"), &Node::set_editable_instance);
+ ClassDB::bind_method(D_METHOD("is_editable_instance", "node"), &Node::is_editable_instance);
ClassDB::bind_method(D_METHOD("get_viewport"), &Node::get_viewport);
@@ -2632,15 +2742,15 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("request_ready"), &Node::request_ready);
- ClassDB::bind_method(D_METHOD("set_network_master", "id", "recursive"), &Node::set_network_master, DEFVAL(true));
- ClassDB::bind_method(D_METHOD("get_network_master"), &Node::get_network_master);
+ ClassDB::bind_method(D_METHOD("set_multiplayer_authority", "id", "recursive"), &Node::set_multiplayer_authority, DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("get_multiplayer_authority"), &Node::get_multiplayer_authority);
- ClassDB::bind_method(D_METHOD("is_network_master"), &Node::is_network_master);
+ ClassDB::bind_method(D_METHOD("is_multiplayer_authority"), &Node::is_multiplayer_authority);
ClassDB::bind_method(D_METHOD("get_multiplayer"), &Node::get_multiplayer);
ClassDB::bind_method(D_METHOD("get_custom_multiplayer"), &Node::get_custom_multiplayer);
ClassDB::bind_method(D_METHOD("set_custom_multiplayer", "api"), &Node::set_custom_multiplayer);
- ClassDB::bind_method(D_METHOD("rpc_config", "method", "rpc_mode", "transfer_mode", "channel"), &Node::rpc_config, DEFVAL(MultiplayerPeer::TRANSFER_MODE_RELIABLE), DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("rpc_config", "method", "rpc_mode", "transfer_mode", "channel"), &Node::rpc_config, DEFVAL(Multiplayer::TRANSFER_MODE_RELIABLE), DEFVAL(0));
ClassDB::bind_method(D_METHOD("set_editor_description", "editor_description"), &Node::set_editor_description);
ClassDB::bind_method(D_METHOD("get_editor_description"), &Node::get_editor_description);
@@ -2718,6 +2828,10 @@ void Node::_bind_methods() {
BIND_ENUM_CONSTANT(DUPLICATE_SCRIPTS);
BIND_ENUM_CONSTANT(DUPLICATE_USE_INSTANCING);
+ BIND_ENUM_CONSTANT(INTERNAL_MODE_DISABLED);
+ BIND_ENUM_CONSTANT(INTERNAL_MODE_FRONT);
+ BIND_ENUM_CONSTANT(INTERNAL_MODE_BACK);
+
ADD_SIGNAL(MethodInfo("ready"));
ADD_SIGNAL(MethodInfo("renamed"));
ADD_SIGNAL(MethodInfo("tree_entered"));
@@ -2725,7 +2839,7 @@ void Node::_bind_methods() {
ADD_SIGNAL(MethodInfo("tree_exited"));
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_name", "get_name");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "filename", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_filename", "get_filename");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "scene_file_path", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_scene_file_path", "get_scene_file_path");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "owner", PROPERTY_HINT_RESOURCE_TYPE, "Node", PROPERTY_USAGE_NONE), "set_owner", "get_owner");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "multiplayer", PROPERTY_HINT_RESOURCE_TYPE, "MultiplayerAPI", PROPERTY_USAGE_NONE), "", "get_multiplayer");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "custom_multiplayer", PROPERTY_HINT_RESOURCE_TYPE, "MultiplayerAPI", PROPERTY_USAGE_NONE), "set_custom_multiplayer", "get_custom_multiplayer");
@@ -2737,15 +2851,15 @@ void Node::_bind_methods() {
ADD_GROUP("Editor Description", "editor_");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "editor_description", PROPERTY_HINT_MULTILINE_TEXT, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_INTERNAL), "set_editor_description", "get_editor_description");
- BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::FLOAT, "delta")));
- BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::FLOAT, "delta")));
- BIND_VMETHOD(MethodInfo("_enter_tree"));
- BIND_VMETHOD(MethodInfo("_exit_tree"));
- BIND_VMETHOD(MethodInfo("_ready"));
- BIND_VMETHOD(MethodInfo("_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
- BIND_VMETHOD(MethodInfo("_unhandled_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
- BIND_VMETHOD(MethodInfo("_unhandled_key_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEventKey")));
- BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::ARRAY, "", PROPERTY_HINT_ARRAY_TYPE, "String"), "_get_configuration_warnings"));
+ GDVIRTUAL_BIND(_process, "delta");
+ GDVIRTUAL_BIND(_physics_process, "delta");
+ GDVIRTUAL_BIND(_enter_tree);
+ GDVIRTUAL_BIND(_exit_tree);
+ GDVIRTUAL_BIND(_ready);
+ GDVIRTUAL_BIND(_get_configuration_warnings);
+ GDVIRTUAL_BIND(_input, "event");
+ GDVIRTUAL_BIND(_unhandled_input, "event");
+ GDVIRTUAL_BIND(_unhandled_key_input, "event");
}
String Node::_get_name_num_separator() {
diff --git a/scene/main/node.h b/scene/main/node.h
index 9997f4e055..7d4c79cfba 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -73,6 +73,12 @@ public:
NAME_CASING_SNAKE_CASE
};
+ enum InternalMode {
+ INTERNAL_MODE_DISABLED,
+ INTERNAL_MODE_FRONT,
+ INTERNAL_MODE_BACK,
+ };
+
struct Comparator {
bool operator()(const Node *p_a, const Node *p_b) const { return p_b->is_greater_than(p_a); }
};
@@ -90,13 +96,15 @@ private:
};
struct Data {
- String filename;
+ String scene_file_path;
Ref<SceneState> instance_state;
Ref<SceneState> inherited_state;
Node *parent = nullptr;
Node *owner = nullptr;
Vector<Node *> children;
+ int internal_children_front = 0;
+ int internal_children_back = 0;
int pos = -1;
int depth = -1;
int blocked = 0; // Safeguard that throws an error when attempting to modify the tree in a harmful way while being traversed.
@@ -119,8 +127,8 @@ private:
ProcessMode process_mode = PROCESS_MODE_INHERIT;
Node *process_owner = nullptr;
- int network_master = 1; // Server by default.
- Vector<MultiplayerAPI::RPCConfig> rpc_methods;
+ int multiplayer_authority = 1; // Server by default.
+ Vector<Multiplayer::RPCConfig> rpc_methods;
// Variables used to properly sort the node when processing, ignored otherwise.
// TODO: Should move all the stuff below to bits.
@@ -172,12 +180,15 @@ private:
void _duplicate_signals(const Node *p_original, Node *p_copy) const;
Node *_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap = nullptr) const;
- TypedArray<Node> _get_children() const;
+ TypedArray<Node> _get_children(bool p_include_internal = true) const;
Array _get_groups() const;
Variant _rpc_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
Variant _rpc_id_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
+ _FORCE_INLINE_ bool _is_internal_front() const { return data.parent && data.pos < data.parent->data.internal_children_front; }
+ _FORCE_INLINE_ bool _is_internal_back() const { return data.parent && data.pos >= data.parent->data.children.size() - data.parent->data.internal_children_back; }
+
friend class SceneTree;
void _set_tree(SceneTree *p_tree);
@@ -202,12 +213,33 @@ protected:
static String _get_name_num_separator();
friend class SceneState;
- friend class MultiplayerAPI;
+ friend class MultiplayerReplicator;
void _add_child_nocheck(Node *p_child, const StringName &p_name);
void _set_owner_nocheck(Node *p_owner);
void _set_name_nocheck(const StringName &p_name);
+ //call from SceneTree
+ void _call_input(const Ref<InputEvent> &p_event);
+ void _call_unhandled_input(const Ref<InputEvent> &p_event);
+ void _call_unhandled_key_input(const Ref<InputEvent> &p_event);
+
+protected:
+ virtual void input(const Ref<InputEvent> &p_event);
+ virtual void unhandled_input(const Ref<InputEvent> &p_event);
+ virtual void unhandled_key_input(const Ref<InputEvent> &p_key_event);
+
+ GDVIRTUAL1(_process, double)
+ GDVIRTUAL1(_physics_process, double)
+ GDVIRTUAL0(_enter_tree)
+ GDVIRTUAL0(_exit_tree)
+ GDVIRTUAL0(_ready)
+ GDVIRTUAL0RC(Vector<String>, _get_configuration_warnings)
+
+ GDVIRTUAL1(_input, Ref<InputEvent>)
+ GDVIRTUAL1(_unhandled_input, Ref<InputEvent>)
+ GDVIRTUAL1(_unhandled_key_input, Ref<InputEvent>)
+
public:
enum {
// you can make your own, but don't use the same numbers as other notifications in other nodes
@@ -263,12 +295,12 @@ public:
StringName get_name() const;
void set_name(const String &p_name);
- void add_child(Node *p_child, bool p_legible_unique_name = false);
+ void add_child(Node *p_child, bool p_legible_unique_name = false, InternalMode p_internal = INTERNAL_MODE_DISABLED);
void add_sibling(Node *p_sibling, bool p_legible_unique_name = false);
void remove_child(Node *p_child);
- int get_child_count() const;
- Node *get_child(int p_index) const;
+ int get_child_count(bool p_include_internal = true) const;
+ Node *get_child(int p_index, bool p_include_internal = true) const;
bool has_node(const NodePath &p_path) const;
Node *get_node(const NodePath &p_path) const;
Node *get_node_or_null(const NodePath &p_path) const;
@@ -306,6 +338,7 @@ public:
int get_persistent_group_count() const;
void move_child(Node *p_child, int p_pos);
+ void _move_child(Node *p_child, int p_pos, bool p_ignore_end = false);
void raise();
void set_owner(Node *p_owner);
@@ -313,15 +346,15 @@ public:
void get_owned_by(Node *p_by, List<Node *> *p_owned);
void remove_and_skip();
- int get_index() const;
+ int get_index(bool p_include_internal = true) const;
Ref<Tween> create_tween();
void print_tree();
void print_tree_pretty();
- void set_filename(const String &p_filename);
- String get_filename() const;
+ void set_scene_file_path(const String &p_scene_file_path);
+ String get_scene_file_path() const;
void set_editor_description(const String &p_editor_description);
String get_editor_description() const;
@@ -429,12 +462,12 @@ public:
bool is_displayed_folded() const;
/* NETWORK */
- void set_network_master(int p_peer_id, bool p_recursive = true);
- int get_network_master() const;
- bool is_network_master() const;
+ void set_multiplayer_authority(int p_peer_id, bool p_recursive = true);
+ int get_multiplayer_authority() const;
+ bool is_multiplayer_authority() const;
- uint16_t rpc_config(const StringName &p_method, MultiplayerAPI::RPCMode p_rpc_mode, MultiplayerPeer::TransferMode p_transfer_mode, int p_channel = 0); // config a local method for RPC
- Vector<MultiplayerAPI::RPCConfig> get_node_rpc_methods() const;
+ uint16_t rpc_config(const StringName &p_method, Multiplayer::RPCMode p_rpc_mode, Multiplayer::TransferMode p_transfer_mode, int p_channel = 0); // config a local method for RPC
+ Vector<Multiplayer::RPCConfig> get_node_rpc_methods() const;
void rpc(const StringName &p_method, VARIANT_ARG_LIST); // RPC, honors RPCMode, TransferMode, channel
void rpc_id(int p_peer_id, const StringName &p_method, VARIANT_ARG_LIST); // RPC to specific peer(s), honors RPCMode, TransferMode, channel
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 5b707498a7..3d07e4473d 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -544,7 +544,7 @@ void SceneTree::process_tweens(float p_delta, bool p_physics) {
}
if (!E->get()->step(p_delta)) {
- E->get()->set_valid(false);
+ E->get()->clear();
tweens.erase(E);
}
if (E == L) {
@@ -858,16 +858,7 @@ void SceneTree::_notify_group_pause(const StringName &p_group, int p_notificatio
}
}
-/*
-void SceneMainLoop::_update_listener_2d() {
- if (listener_2d.is_valid()) {
- SpatialSound2DServer::get_singleton()->listener_set_space( listener_2d, world_2d->get_sound_space() );
- }
-}
-
-*/
-
-void SceneTree::_call_input_pause(const StringName &p_group, const StringName &p_method, const Ref<InputEvent> &p_input, Viewport *p_viewport) {
+void SceneTree::_call_input_pause(const StringName &p_group, CallInputType p_call_type, const Ref<InputEvent> &p_input, Viewport *p_viewport) {
Map<StringName, Group>::Element *E = group_map.find(p_group);
if (!E) {
return;
@@ -886,9 +877,6 @@ void SceneTree::_call_input_pause(const StringName &p_group, const StringName &p
int node_count = nodes_copy.size();
Node **nodes = nodes_copy.ptrw();
- Variant arg = p_input;
- const Variant *v[1] = { &arg };
-
call_lock++;
for (int i = node_count - 1; i >= 0; i--) {
@@ -905,14 +893,16 @@ void SceneTree::_call_input_pause(const StringName &p_group, const StringName &p
continue;
}
- Callable::CallError err;
- // Call both script and native method.
- if (n->get_script_instance()) {
- n->get_script_instance()->call(p_method, (const Variant **)v, 1, err);
- }
- MethodBind *method = ClassDB::get_method(n->get_class_name(), p_method);
- if (method) {
- method->call(n, (const Variant **)v, 1, err);
+ switch (p_call_type) {
+ case CALL_INPUT_TYPE_INPUT:
+ n->_call_input(p_input);
+ break;
+ case CALL_INPUT_TYPE_UNHANDLED_INPUT:
+ n->_call_unhandled_input(p_input);
+ break;
+ case CALL_INPUT_TYPE_UNHANDLED_KEY_INPUT:
+ n->_call_unhandled_key_input(p_input);
+ break;
}
}
@@ -1115,7 +1105,7 @@ Error SceneTree::change_scene_to(const Ref<PackedScene> &p_scene) {
Error SceneTree::reload_current_scene() {
ERR_FAIL_COND_V(!current_scene, ERR_UNCONFIGURED);
- String fname = current_scene->get_filename();
+ String fname = current_scene->get_scene_file_path();
return change_scene(fname);
}
@@ -1332,6 +1322,7 @@ SceneTree::SceneTree() {
// Create with mainloop.
root = memnew(Window);
+ root->set_process_mode(Node::PROCESS_MODE_PAUSABLE);
root->set_name("root");
#ifndef _3D_DISABLED
if (!root->get_world_3d().is_valid()) {
@@ -1347,7 +1338,7 @@ SceneTree::SceneTree() {
current_scene = nullptr;
const int msaa_mode = GLOBAL_DEF("rendering/anti_aliasing/quality/msaa", 0);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/quality/msaa", PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/msaa", PROPERTY_HINT_ENUM, String::utf8("Disabled (Fastest),2× (Fast),4× (Average),8× (Slow),16× (Slower)")));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/quality/msaa", PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/msaa", PROPERTY_HINT_ENUM, String::utf8("Disabled (Fastest),2× (Average),4× (Slow),8× (Slowest)")));
root->set_msaa(Viewport::MSAA(msaa_mode));
const int ssaa_mode = GLOBAL_DEF("rendering/anti_aliasing/quality/screen_space_aa", 0);
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index cfb95bd6b5..19331c1906 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -31,7 +31,7 @@
#ifndef SCENE_TREE_H
#define SCENE_TREE_H
-#include "core/io/multiplayer_api.h"
+#include "core/multiplayer/multiplayer_api.h"
#include "core/os/main_loop.h"
#include "core/os/thread_safe.h"
#include "core/templates/self_list.h"
@@ -204,8 +204,14 @@ private:
void _main_window_close();
void _main_window_go_back();
+ enum CallInputType {
+ CALL_INPUT_TYPE_INPUT,
+ CALL_INPUT_TYPE_UNHANDLED_INPUT,
+ CALL_INPUT_TYPE_UNHANDLED_KEY_INPUT,
+ };
+
//used by viewport
- void _call_input_pause(const StringName &p_group, const StringName &p_method, const Ref<InputEvent> &p_input, Viewport *p_viewport);
+ void _call_input_pause(const StringName &p_group, CallInputType p_call_type, const Ref<InputEvent> &p_input, Viewport *p_viewport);
protected:
void _notification(int p_notification);
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 78fa0985a9..b3b743370b 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -32,25 +32,29 @@
#include "core/core_string_names.h"
#include "core/debugger/engine_debugger.h"
+#include "core/object/message_queue.h"
#include "core/string/translation.h"
#include "core/templates/pair.h"
+#include "scene/2d/audio_listener_2d.h"
#include "scene/2d/camera_2d.h"
#include "scene/2d/collision_object_2d.h"
#ifndef _3D_DISABLED
+#include "scene/3d/audio_listener_3d.h"
#include "scene/3d/camera_3d.h"
#include "scene/3d/collision_object_3d.h"
-#include "scene/3d/listener_3d.h"
#include "scene/3d/world_environment.h"
#endif // _3D_DISABLED
#include "scene/gui/control.h"
#include "scene/gui/label.h"
#include "scene/gui/popup.h"
+#include "scene/gui/popup_menu.h"
#include "scene/main/canvas_layer.h"
#include "scene/main/window.h"
#include "scene/resources/mesh.h"
#include "scene/resources/text_line.h"
#include "scene/resources/world_2d.h"
#include "scene/scene_string_names.h"
+#include "servers/audio_server.h"
void ViewportTexture::setup_local_to_scene() {
if (vp) {
@@ -77,7 +81,7 @@ void ViewportTexture::setup_local_to_scene() {
RS::get_singleton()->texture_proxy_update(proxy, vp->texture_rid);
RS::get_singleton()->free(proxy_ph);
} else {
- ERR_FAIL_COND(proxy.is_valid()); //should be invalid
+ ERR_FAIL_COND(proxy.is_valid()); // Should be invalid.
proxy = RS::get_singleton()->texture_proxy_create(vp->texture_rid);
}
}
@@ -114,7 +118,6 @@ Size2 ViewportTexture::get_size() const {
}
RID ViewportTexture::get_rid() const {
- //ERR_FAIL_COND_V_MSG(!vp, RID(), "Viewport Texture must be set to use it.");
if (proxy.is_null()) {
proxy_ph = RS::get_singleton()->texture_2d_placeholder_create();
proxy = RS::get_singleton()->texture_proxy_create(proxy_ph);
@@ -259,7 +262,7 @@ void Viewport::_sub_window_update(Window *p_window) {
void Viewport::_sub_window_grab_focus(Window *p_window) {
if (p_window == nullptr) {
- //release current focus
+ // Release current focus.
if (gui.subwindow_focused) {
gui.subwindow_focused->_event_callback(DisplayServer::WINDOW_EVENT_FOCUS_OUT);
gui.subwindow_focused = nullptr;
@@ -285,18 +288,18 @@ void Viewport::_sub_window_grab_focus(Window *p_window) {
ERR_FAIL_COND(index == -1);
if (p_window->get_flag(Window::FLAG_NO_FOCUS)) {
- //can only move to foreground, but no focus granted
+ // Can only move to foreground, but no focus granted.
SubWindow sw = gui.sub_windows[index];
gui.sub_windows.remove(index);
gui.sub_windows.push_back(sw);
index = gui.sub_windows.size() - 1;
_sub_window_update_order();
- return; //i guess not...
+ return;
}
if (gui.subwindow_focused) {
if (gui.subwindow_focused == p_window) {
- return; //nothing to do
+ return; // Nothing to do.
}
gui.subwindow_focused->_event_callback(DisplayServer::WINDOW_EVENT_FOCUS_OUT);
gui.subwindow_drag = SUB_WINDOW_DRAG_DISABLED;
@@ -313,7 +316,7 @@ void Viewport::_sub_window_grab_focus(Window *p_window) {
gui.subwindow_focused->_event_callback(DisplayServer::WINDOW_EVENT_FOCUS_IN);
- { //move to foreground
+ { // Move to foreground.
SubWindow sw = gui.sub_windows[index];
gui.sub_windows.remove(index);
gui.sub_windows.push_back(sw);
@@ -378,10 +381,10 @@ void Viewport::_notification(int p_what) {
current_canvas = find_world_2d()->get_canvas();
RenderingServer::get_singleton()->viewport_attach_canvas(viewport, current_canvas);
- _update_listener_2d();
+ _update_audio_listener_2d();
#ifndef _3D_DISABLED
RenderingServer::get_singleton()->viewport_set_scenario(viewport, find_world_3d()->get_scenario());
- _update_listener_3d();
+ _update_audio_listener_3d();
#endif // _3D_DISABLED
add_to_group("_viewports");
@@ -405,9 +408,9 @@ void Viewport::_notification(int p_what) {
} break;
case NOTIFICATION_READY: {
#ifndef _3D_DISABLED
- if (listener_3d_set.size() && !listener_3d) {
- Listener3D *first = nullptr;
- for (Set<Listener3D *>::Element *E = listener_3d_set.front(); E; E = E->next()) {
+ if (audio_listener_3d_set.size() && !audio_listener_3d) {
+ AudioListener3D *first = nullptr;
+ for (Set<AudioListener3D *>::Element *E = audio_listener_3d_set.front(); E; E = E->next()) {
if (first == nullptr || first->is_greater_than(E->get())) {
first = E->get();
}
@@ -419,7 +422,7 @@ void Viewport::_notification(int p_what) {
}
if (camera_3d_set.size() && !camera_3d) {
- //there are cameras but no current camera, pick first in tree and make it current
+ // There are cameras but no current camera, pick first in tree and make it current.
Camera3D *first = nullptr;
for (Set<Camera3D *>::Element *E = camera_3d_set.front(); E; E = E->next()) {
if (first == nullptr || first->is_greater_than(E->get())) {
@@ -518,8 +521,9 @@ void Viewport::_process_picking() {
PhysicsDirectSpaceState2D *ss2d = PhysicsServer2D::get_singleton()->space_get_direct_state(find_world_2d()->get_space());
if (physics_has_last_mousepos) {
- // if no mouse event exists, create a motion one. This is necessary because objects or camera may have moved.
- // while this extra event is sent, it is checked if both camera and last object and last ID did not move. If nothing changed, the event is discarded to avoid flooding with unnecessary motion events every frame
+ // If no mouse event exists, create a motion one. This is necessary because objects or camera may have moved.
+ // While this extra event is sent, it is checked if both camera and last object and last ID did not move.
+ // If nothing changed, the event is discarded to avoid flooding with unnecessary motion events every frame.
bool has_mouse_event = false;
for (const Ref<InputEvent> &m : physics_picking_events) {
if (m.is_valid()) {
@@ -593,7 +597,7 @@ void Viewport::_process_picking() {
Ref<InputEventKey> k = ev;
if (k.is_valid()) {
- //only for mask
+ // Only for mask.
physics_last_mouse_state.alt = k->is_alt_pressed();
physics_last_mouse_state.shift = k->is_shift_pressed();
physics_last_mouse_state.control = k->is_ctrl_pressed();
@@ -614,7 +618,7 @@ void Viewport::_process_picking() {
}
if (ss2d) {
- //send to 2D
+ // Send to 2D.
uint64_t frame = get_tree()->get_frame();
@@ -623,11 +627,11 @@ void Viewport::_process_picking() {
Transform2D canvas_transform;
ObjectID canvas_layer_id;
if (E->get()) {
- // A descendant CanvasLayer
+ // A descendant CanvasLayer.
canvas_transform = E->get()->get_transform();
canvas_layer_id = E->get()->get_instance_id();
} else {
- // This Viewport's builtin canvas
+ // This Viewport's builtin canvas.
canvas_transform = get_canvas_transform();
canvas_layer_id = ObjectID();
}
@@ -647,7 +651,7 @@ void Viewport::_process_picking() {
co->_mouse_enter();
} else {
F->get() = frame;
- // It was already hovered, so don't send the event if it's faked
+ // It was already hovered, so don't send the event if it's faked.
if (mm.is_valid() && mm->get_device() == InputEvent::DEVICE_ID_INTERNAL) {
send_event = false;
}
@@ -662,7 +666,7 @@ void Viewport::_process_picking() {
}
if (send_event) {
- co->_input_event(this, ev, res[i].shape);
+ co->_input_event_call(this, ev, res[i].shape);
}
}
}
@@ -696,11 +700,11 @@ void Viewport::_process_picking() {
}
if (captured) {
- //none
+ // None.
} else if (pos == last_pos) {
if (last_id.is_valid()) {
if (ObjectDB::get_instance(last_id) && last_object) {
- //good, exists
+ // Good, exists.
_collision_object_3d_input_event(last_object, camera_3d, ev, result.position, result.normal, result.shape);
if (last_object->get_capture_input_on_drag() && mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
physics_object_capture = last_id;
@@ -818,26 +822,26 @@ Rect2 Viewport::get_visible_rect() const {
return r;
}
-void Viewport::_update_listener_2d() {
- /*
- if (is_inside_tree() && audio_listener_3d && (!get_parent() || (Object::cast_to<Control>(get_parent()) && Object::cast_to<Control>(get_parent())->is_visible_in_tree())))
- SpatialSound2DServer::get_singleton()->listener_set_space(internal_listener_2d, find_world_2d()->get_sound_space());
- else
- SpatialSound2DServer::get_singleton()->listener_set_space(internal_listener_2d, RID());
-*/
+void Viewport::_update_audio_listener_2d() {
+ if (AudioServer::get_singleton()) {
+ AudioServer::get_singleton()->notify_listener_changed();
+ }
}
void Viewport::set_as_audio_listener_2d(bool p_enable) {
- if (p_enable == audio_listener_2d) {
+ if (p_enable == is_audio_listener_2d_enabled) {
return;
}
- audio_listener_2d = p_enable;
-
- _update_listener_2d();
+ is_audio_listener_2d_enabled = p_enable;
+ _update_audio_listener_2d();
}
bool Viewport::is_audio_listener_2d() const {
+ return is_audio_listener_2d_enabled;
+}
+
+AudioListener2D *Viewport::get_audio_listener_2d() const {
return audio_listener_2d;
}
@@ -905,6 +909,21 @@ void Viewport::_camera_2d_set(Camera2D *p_camera_2d) {
camera_2d = p_camera_2d;
}
+void Viewport::_audio_listener_2d_set(AudioListener2D *p_listener) {
+ if (audio_listener_2d == p_listener) {
+ return;
+ } else if (audio_listener_2d) {
+ audio_listener_2d->clear_current();
+ }
+ audio_listener_2d = p_listener;
+}
+
+void Viewport::_audio_listener_2d_remove(AudioListener2D *p_listener) {
+ if (audio_listener_2d == p_listener) {
+ audio_listener_2d = nullptr;
+ }
+}
+
void Viewport::_canvas_layer_add(CanvasLayer *p_canvas_layer) {
canvas_layers.insert(p_canvas_layer);
}
@@ -943,7 +962,7 @@ void Viewport::set_world_2d(const Ref<World2D> &p_world_2d) {
world_2d = Ref<World2D>(memnew(World2D));
}
- _update_listener_2d();
+ _update_audio_listener_2d();
if (is_inside_tree()) {
current_canvas = find_world_2d()->get_canvas();
@@ -1104,6 +1123,12 @@ String Viewport::_gui_get_tooltip(Control *p_control, const Vector2 &p_pos, Cont
while (p_control) {
tooltip = p_control->get_tooltip(pos);
+ // Temporary solution for PopupMenus.
+ PopupMenu *menu = Object::cast_to<PopupMenu>(this);
+ if (menu) {
+ tooltip = menu->get_tooltip(pos);
+ }
+
if (r_tooltip_owner) {
*r_tooltip_owner = p_control;
}
@@ -1212,11 +1237,9 @@ void Viewport::_gui_show_tooltip() {
}
void Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_input) {
- //_block();
-
Ref<InputEvent> ev = p_input;
- //mouse wheel events can't be stopped
+ // Mouse wheel events can't be stopped.
Ref<InputEventMouseButton> mb = p_input;
bool cant_stop_me_now = (mb.is_valid() &&
@@ -1234,27 +1257,7 @@ void Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_inpu
Control *control = Object::cast_to<Control>(ci);
if (control) {
if (control->data.mouse_filter != Control::MOUSE_FILTER_IGNORE) {
- control->emit_signal(SceneStringNames::get_singleton()->gui_input, ev); //signal should be first, so it's possible to override an event (and then accept it)
- }
- if (gui.key_event_accepted) {
- break;
- }
- if (!control->is_inside_tree()) {
- break;
- }
-
- if (control->data.mouse_filter != Control::MOUSE_FILTER_IGNORE) {
- // Call both script and native methods.
- Callable::CallError error;
- Variant event = ev;
- const Variant *args[1] = { &event };
- if (control->get_script_instance()) {
- control->get_script_instance()->call(SceneStringNames::get_singleton()->_gui_input, args, 1, error);
- }
- MethodBind *method = ClassDB::get_method(control->get_class_name(), SceneStringNames::get_singleton()->_gui_input);
- if (method) {
- method->call(control, args, 1, error);
- }
+ control->_call_gui_input(ev);
}
if (!control->is_inside_tree() || control->is_set_as_top_level()) {
@@ -1272,11 +1275,9 @@ void Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_inpu
break;
}
- ev = ev->xformed_by(ci->get_transform()); //transform event upwards
+ ev = ev->xformed_by(ci->get_transform()); // Transform event upwards.
ci = ci->get_parent_item();
}
-
- //_unblock();
}
void Viewport::_gui_call_notification(Control *p_control, int p_what) {
@@ -1306,12 +1307,10 @@ void Viewport::_gui_call_notification(Control *p_control, int p_what) {
ci = ci->get_parent_item();
}
-
- //_unblock();
}
Control *Viewport::gui_find_control(const Point2 &p_global) {
- //aca va subwindows
+ // Handle subwindows.
_gui_sort_roots();
for (List<Control *>::Element *E = gui.roots.back(); E; E = E->prev()) {
@@ -1343,8 +1342,7 @@ Control *Viewport::_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_
}
if (!p_node->is_visible()) {
- //return _find_next_visible_control_at_pos(p_node,p_global,r_inv_xform);
- return nullptr; //canvas item hidden, discard
+ return nullptr; // Canvas item hidden, discard.
}
Transform2D matrix = p_xform * p_node->get_transform();
@@ -1388,32 +1386,31 @@ Control *Viewport::_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_
}
bool Viewport::_gui_drop(Control *p_at_control, Point2 p_at_pos, bool p_just_check) {
- { //attempt grab, try parent controls too
- CanvasItem *ci = p_at_control;
- while (ci) {
- Control *control = Object::cast_to<Control>(ci);
- if (control) {
- if (control->can_drop_data(p_at_pos, gui.drag_data)) {
- if (!p_just_check) {
- control->drop_data(p_at_pos, gui.drag_data);
- }
-
- return true;
+ // Attempt grab, try parent controls too.
+ CanvasItem *ci = p_at_control;
+ while (ci) {
+ Control *control = Object::cast_to<Control>(ci);
+ if (control) {
+ if (control->can_drop_data(p_at_pos, gui.drag_data)) {
+ if (!p_just_check) {
+ control->drop_data(p_at_pos, gui.drag_data);
}
- if (control->data.mouse_filter == Control::MOUSE_FILTER_STOP) {
- break;
- }
+ return true;
}
- p_at_pos = ci->get_transform().xform(p_at_pos);
-
- if (ci->is_set_as_top_level()) {
+ if (control->data.mouse_filter == Control::MOUSE_FILTER_STOP) {
break;
}
+ }
- ci = ci->get_parent_item();
+ p_at_pos = ci->get_transform().xform(p_at_pos);
+
+ if (ci->is_set_as_top_level()) {
+ break;
}
+
+ ci = ci->get_parent_item();
}
return false;
@@ -1433,23 +1430,9 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
if (mb->is_pressed()) {
Size2 pos = mpos;
if (gui.mouse_focus_mask) {
- //do not steal mouse focus and stuff while a focus mask exists
- gui.mouse_focus_mask |= 1 << (mb->get_button_index() - 1); //add the button to the mask
+ // Do not steal mouse focus and stuff while a focus mask exists.
+ gui.mouse_focus_mask |= 1 << (mb->get_button_index() - 1); // Add the button to the mask.
} else {
- bool is_handled = false;
-
- if (is_handled) {
- set_input_as_handled();
- return;
- }
-
- //Matrix32 parent_xform;
-
- /*
- if (data.parent_canvas_item)
- parent_xform=data.parent_canvas_item->get_global_transform();
- */
-
gui.mouse_focus = gui_find_control(pos);
gui.last_mouse_focus = gui.mouse_focus;
@@ -1466,7 +1449,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
}
}
- mb = mb->xformed_by(Transform2D()); // make a copy of the event
+ mb = mb->xformed_by(Transform2D()); // Make a copy of the event.
mb->set_global_position(pos);
@@ -1483,7 +1466,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
}
#endif
- if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { //assign focus
+ if (mb->get_button_index() == MOUSE_BUTTON_LEFT) { // Assign focus.
CanvasItem *ci = gui.mouse_focus;
while (ci) {
Control *control = Object::cast_to<Control>(ci);
@@ -1515,7 +1498,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
set_input_as_handled();
if (gui.drag_data.get_type() != Variant::NIL && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
- //alternate drop use (when using force_drag(), as proposed by #5342
+ // Alternate drop use (when using force_drag(), as proposed by #5342).
if (gui.mouse_focus) {
_gui_drop(gui.mouse_focus, pos, false);
}
@@ -1529,7 +1512,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
gui.drag_preview_id = ObjectID();
}
_propagate_viewport_notification(this, NOTIFICATION_DRAG_END);
- //change mouse accordingly
+ // Change mouse accordingly.
}
_gui_cancel_tooltip();
@@ -1549,26 +1532,28 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
gui.dragging = false;
gui.drag_mouse_over = nullptr;
_propagate_viewport_notification(this, NOTIFICATION_DRAG_END);
- //change mouse accordingly
+ // Change mouse accordingly.
}
- gui.mouse_focus_mask &= ~(1 << (mb->get_button_index() - 1)); //remove from mask
+ gui.mouse_focus_mask &= ~(1 << (mb->get_button_index() - 1)); // Remove from mask.
if (!gui.mouse_focus) {
- //release event is only sent if a mouse focus (previously pressed button) exists
+ // Release event is only sent if a mouse focus (previously pressed button) exists.
return;
}
Size2 pos = mpos;
- mb = mb->xformed_by(Transform2D()); //make a copy
+ mb = mb->xformed_by(Transform2D()); // Make a copy.
mb->set_global_position(pos);
pos = gui.focus_inv_xform.xform(pos);
mb->set_position(pos);
Control *mouse_focus = gui.mouse_focus;
- //disable mouse focus if needed before calling input, this makes popups on mouse press event work better, as the release will never be received otherwise
+ // Disable mouse focus if needed before calling input,
+ // this makes popups on mouse press event work better,
+ // as the release will never be received otherwise.
if (gui.mouse_focus_mask == 0) {
gui.mouse_focus = nullptr;
gui.forced_mouse_focus = false;
@@ -1578,11 +1563,6 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
_gui_call_input(mouse_focus, mb);
}
- /*if (gui.drag_data.get_type()!=Variant::NIL && mb->get_button_index()==MOUSE_BUTTON_LEFT) {
- _propagate_viewport_notification(this,NOTIFICATION_DRAG_END);
- gui.drag_data=Variant(); //always clear
- }*/
-
// In case the mouse was released after for example dragging a scrollbar,
// check whether the current control is different from the stored one. If
// it is different, rather than wait for it to be updated the next time the
@@ -1621,12 +1601,12 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
Control *over = nullptr;
- // D&D
+ // Drag & drop.
if (!gui.drag_attempted && gui.mouse_focus && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) {
gui.drag_accum += mm->get_relative();
float len = gui.drag_accum.length();
if (len > 10) {
- { //attempt grab, try parent controls too
+ { // Attempt grab, try parent controls too.
CanvasItem *ci = gui.mouse_focus;
while (ci) {
Control *control = Object::cast_to<Control>(ci);
@@ -1699,14 +1679,14 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
Vector2 speed = localizer.basis_xform(mm->get_speed());
Vector2 rel = localizer.basis_xform(mm->get_relative());
- mm = mm->xformed_by(Transform2D()); //make a copy
+ mm = mm->xformed_by(Transform2D()); // Make a copy.
mm->set_global_position(mpos);
mm->set_speed(speed);
mm->set_relative(rel);
if (mm->get_button_mask() == 0) {
- //nothing pressed
+ // Nothing pressed.
bool can_tooltip = true;
@@ -1730,7 +1710,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
is_tooltip_shown = true;
}
} else {
- is_tooltip_shown = true; //well, nothing to compare against, likely using custom control, so if it changes there is nothing we can do
+ is_tooltip_shown = true; // Nothing to compare against, likely using custom control, so if it changes there is nothing we can do.
}
}
} else {
@@ -1787,7 +1767,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
}
if (gui.drag_data.get_type() != Variant::NIL) {
- //handle dragandrop
+ // Handle drag & drop.
Control *drag_preview = _gui_get_drag_preview();
if (drag_preview) {
@@ -1797,9 +1777,8 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
gui.drag_mouse_over = over;
gui.drag_mouse_over_pos = Vector2();
- //find the window this is above of
-
- //see if there is an embedder
+ // Find the window this is above of.
+ // See if there is an embedder.
Viewport *embedder = nullptr;
Vector2 viewport_pos;
@@ -1807,7 +1786,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
embedder = this;
viewport_pos = mpos;
} else {
- //not an embedder, but may be a subwindow of an embedder
+ // Not an embedder, but may be a subwindow of an embedder.
Window *w = Object::cast_to<Window>(this);
if (w) {
if (w->is_embedded()) {
@@ -1815,7 +1794,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
Transform2D ai = (get_final_transform().affine_inverse() * _get_input_pre_xform()).affine_inverse();
- viewport_pos = ai.xform(mpos) + w->get_position(); //to parent coords
+ viewport_pos = ai.xform(mpos) + w->get_position(); // To parent coords.
}
}
}
@@ -1823,7 +1802,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
Viewport *viewport_under = nullptr;
if (embedder) {
- //use embedder logic
+ // Use embedder logic.
for (int i = embedder->gui.sub_windows.size() - 1; i >= 0; i--) {
Window *sw = embedder->gui.sub_windows[i].window;
@@ -1841,11 +1820,11 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
}
if (!viewport_under) {
- //not in a subwindow, likely in embedder
+ // Not in a subwindow, likely in embedder.
viewport_under = embedder;
}
} else {
- //use displayserver logic
+ // Use DisplayServer logic.
Vector2i screen_mouse_pos = DisplayServer::get_singleton()->mouse_get_position();
DisplayServer::WindowID window_id = DisplayServer::get_singleton()->get_window_at_screen_position(screen_mouse_pos);
@@ -1853,7 +1832,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
if (window_id != DisplayServer::INVALID_WINDOW_ID) {
ObjectID object_under = DisplayServer::get_singleton()->window_get_attached_instance_id(window_id);
- if (object_under != ObjectID()) { //fetch window
+ if (object_under != ObjectID()) { // Fetch window.
Window *w = Object::cast_to<Window>(ObjectDB::get_instance(object_under));
if (w) {
viewport_under = w;
@@ -1866,7 +1845,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
if (viewport_under) {
Transform2D ai = (viewport_under->get_final_transform().affine_inverse() * viewport_under->_get_input_pre_xform());
viewport_pos = ai.xform(viewport_pos);
- //find control under at pos
+ // Find control under at position.
gui.drag_mouse_over = viewport_under->gui_find_control(viewport_pos);
if (gui.drag_mouse_over) {
Transform2D localizer = gui.drag_mouse_over->get_global_transform_with_canvas().affine_inverse();
@@ -1898,7 +1877,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
Control *over = gui_find_control(pos);
if (over) {
if (over->can_process()) {
- touch_event = touch_event->xformed_by(Transform2D()); //make a copy
+ touch_event = touch_event->xformed_by(Transform2D()); // Make a copy.
if (over == gui.mouse_focus) {
pos = gui.focus_inv_xform.xform(pos);
} else {
@@ -1912,7 +1891,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
}
} else if (touch_event->get_index() == 0 && gui.last_mouse_focus) {
if (gui.last_mouse_focus->can_process()) {
- touch_event = touch_event->xformed_by(Transform2D()); //make a copy
+ touch_event = touch_event->xformed_by(Transform2D()); // Make a copy.
touch_event->set_position(gui.focus_inv_xform.xform(pos));
_gui_call_input(gui.last_mouse_focus, touch_event);
@@ -1933,7 +1912,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
Control *over = gui_find_control(pos);
if (over) {
if (over->can_process()) {
- gesture_event = gesture_event->xformed_by(Transform2D()); //make a copy
+ gesture_event = gesture_event->xformed_by(Transform2D()); // Make a copy.
if (over == gui.mouse_focus) {
pos = gui.focus_inv_xform.xform(pos);
} else {
@@ -1960,7 +1939,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
Vector2 speed = localizer.basis_xform(drag_event->get_speed());
Vector2 rel = localizer.basis_xform(drag_event->get_relative());
- drag_event = drag_event->xformed_by(Transform2D()); //make a copy
+ drag_event = drag_event->xformed_by(Transform2D()); // Make a copy.
drag_event->set_speed(speed);
drag_event->set_relative(rel);
@@ -1982,10 +1961,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
if (gui.key_focus) {
gui.key_event_accepted = false;
if (gui.key_focus->can_process()) {
- gui.key_focus->call(SceneStringNames::get_singleton()->_gui_input, p_event);
- if (gui.key_focus) { //maybe lost it
- gui.key_focus->emit_signal(SceneStringNames::get_singleton()->gui_input, p_event);
- }
+ gui.key_focus->_call_gui_input(p_event);
}
if (gui.key_event_accepted) {
@@ -1994,38 +1970,32 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
}
}
- Control *from = gui.key_focus ? gui.key_focus : nullptr; //hmm
-
- //keyboard focus
- //if (from && p_event->is_pressed() && !p_event->is_alt_pressed() && !p_event->is_meta_pressed() && !p_event->key->is_command_pressed()) {
- Ref<InputEventKey> k = p_event;
- //need to check for mods, otherwise any combination of alt/ctrl/shift+<up/down/left/right/etc> is handled here when it shouldn't be.
- bool mods = k.is_valid() && (k->is_ctrl_pressed() || k->is_alt_pressed() || k->is_shift_pressed() || k->is_meta_pressed());
+ Control *from = gui.key_focus ? gui.key_focus : nullptr;
if (from && p_event->is_pressed()) {
Control *next = nullptr;
- if (p_event->is_action_pressed("ui_focus_next", true)) {
+ if (p_event->is_action_pressed("ui_focus_next", true, true)) {
next = from->find_next_valid_focus();
}
- if (p_event->is_action_pressed("ui_focus_prev", true)) {
+ if (p_event->is_action_pressed("ui_focus_prev", true, true)) {
next = from->find_prev_valid_focus();
}
- if (!mods && p_event->is_action_pressed("ui_up", true)) {
+ if (p_event->is_action_pressed("ui_up", true, true)) {
next = from->_get_focus_neighbor(SIDE_TOP);
}
- if (!mods && p_event->is_action_pressed("ui_left", true)) {
+ if (p_event->is_action_pressed("ui_left", true, true)) {
next = from->_get_focus_neighbor(SIDE_LEFT);
}
- if (!mods && p_event->is_action_pressed("ui_right", true)) {
+ if (p_event->is_action_pressed("ui_right", true, true)) {
next = from->_get_focus_neighbor(SIDE_RIGHT);
}
- if (!mods && p_event->is_action_pressed("ui_down", true)) {
+ if (p_event->is_action_pressed("ui_down", true, true)) {
next = from->_get_focus_neighbor(SIDE_BOTTOM);
}
@@ -2070,7 +2040,7 @@ void Viewport::_gui_set_drag_preview(Control *p_base, Control *p_control) {
}
p_control->set_as_top_level(true);
p_control->set_position(gui.last_mouse_pos);
- p_base->get_root_parent_control()->add_child(p_control); //add as child of viewport
+ p_base->get_root_parent_control()->add_child(p_control); // Add as child of viewport.
p_control->raise();
gui.drag_preview_id = p_control->get_instance_id();
@@ -2172,8 +2142,8 @@ bool Viewport::_gui_control_has_focus(const Control *p_control) {
}
void Viewport::_gui_control_grab_focus(Control *p_control) {
- //no need for change
if (gui.key_focus && gui.key_focus == p_control) {
+ // No need for change.
return;
}
get_tree()->call_group_flags(SceneTree::GROUP_CALL_REALTIME, "_viewports", "_gui_remove_focus_for_window", (Node *)get_base_window());
@@ -2205,7 +2175,7 @@ void Viewport::_drop_mouse_focus() {
mb->set_global_position(c->get_local_mouse_position());
mb->set_button_index(MouseButton(i + 1));
mb->set_pressed(false);
- c->call(SceneStringNames::get_singleton()->_gui_input, mb);
+ c->_call_gui_input(mb);
}
}
}
@@ -2255,7 +2225,7 @@ void Viewport::_cleanup_mouseover_colliders(bool p_clean_all_frames, bool p_paus
to_erase.pop_front();
}
- // Per-shape
+ // Per-shape.
List<Map<Pair<ObjectID, int>, uint64_t, PairSort<ObjectID, int>>::Element *> shapes_to_erase;
for (Map<Pair<ObjectID, int>, uint64_t, PairSort<ObjectID, int>>::Element *E = physics_2d_shape_mouseover.front(); E; E = E->next()) {
@@ -2294,7 +2264,7 @@ void Viewport::_gui_grab_click_focus(Control *p_control) {
void Viewport::_post_gui_grab_click_focus() {
Control *focus_grabber = gui.mouse_click_grabber;
if (!focus_grabber) {
- // Redundant grab requests were made
+ // Redundant grab requests were made.
return;
}
gui.mouse_click_grabber = nullptr;
@@ -2312,12 +2282,12 @@ void Viewport::_post_gui_grab_click_focus() {
Ref<InputEventMouseButton> mb;
mb.instantiate();
- //send unclick
+ // Send unclick.
mb->set_position(click);
mb->set_button_index(MouseButton(i + 1));
mb->set_pressed(false);
- gui.mouse_focus->call(SceneStringNames::get_singleton()->_gui_input, mb);
+ gui.mouse_focus->_call_gui_input(mb);
}
}
@@ -2330,12 +2300,12 @@ void Viewport::_post_gui_grab_click_focus() {
Ref<InputEventMouseButton> mb;
mb.instantiate();
- //send click
+ // Send click.
mb->set_position(click);
mb->set_button_index(MouseButton(i + 1));
mb->set_pressed(true);
- gui.mouse_focus->call_deferred(SceneStringNames::get_singleton()->_gui_input, mb);
+ MessageQueue::get_singleton()->push_callable(callable_mp(gui.mouse_focus, &Control::_call_gui_input), mb);
}
}
}
@@ -2343,9 +2313,9 @@ void Viewport::_post_gui_grab_click_focus() {
///////////////////////////////
-void Viewport::input_text(const String &p_text) {
+void Viewport::push_text_input(const String &p_text) {
if (gui.subwindow_focused) {
- gui.subwindow_focused->input_text(p_text);
+ gui.subwindow_focused->push_text_input(p_text);
return;
}
@@ -2367,7 +2337,7 @@ Viewport::SubWindowResize Viewport::_sub_window_get_resize_margin(Window *p_subw
r.size.y += title_height;
if (r.has_point(p_point)) {
- return SUB_WINDOW_RESIZE_DISABLED; //it's inside, so no resize
+ return SUB_WINDOW_RESIZE_DISABLED; // It's inside, so no resize.
}
int dist_x = p_point.x < r.position.x ? (p_point.x - r.position.x) : (p_point.x > (r.position.x + r.size.x) ? (p_point.x - (r.position.x + r.size.x)) : 0);
@@ -2426,12 +2396,12 @@ bool Viewport::_sub_windows_forward_input(const Ref<InputEvent> &p_event) {
if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
if (gui.subwindow_drag == SUB_WINDOW_DRAG_CLOSE) {
if (gui.subwindow_drag_close_rect.has_point(mb->get_position())) {
- //close window
+ // Close window.
gui.subwindow_focused->_event_callback(DisplayServer::WINDOW_EVENT_CLOSE_REQUEST);
}
}
gui.subwindow_drag = SUB_WINDOW_DRAG_DISABLED;
- if (gui.subwindow_focused != nullptr) { //may have been erased
+ if (gui.subwindow_focused != nullptr) { // May have been erased.
_sub_window_update(gui.subwindow_focused);
}
}
@@ -2538,27 +2508,27 @@ bool Viewport::_sub_windows_forward_input(const Ref<InputEvent> &p_event) {
gui.subwindow_focused->_rect_changed_callback(r);
}
- if (gui.subwindow_focused) { //may have been erased
+ if (gui.subwindow_focused) { // May have been erased.
_sub_window_update(gui.subwindow_focused);
}
}
- return true; //handled
+ return true; // Handled.
}
Ref<InputEventMouseButton> mb = p_event;
- //if the event is a mouse button, we need to check whether another window was clicked
+ // If the event is a mouse button, we need to check whether another window was clicked.
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
bool click_on_window = false;
for (int i = gui.sub_windows.size() - 1; i >= 0; i--) {
SubWindow &sw = gui.sub_windows.write[i];
- //clicked inside window?
+ // Clicked inside window?
Rect2i r = Rect2i(sw.window->get_position(), sw.window->get_size());
if (!sw.window->get_flag(Window::FLAG_BORDERLESS)) {
- //check top bar
+ // Check top bar.
int title_height = sw.window->get_theme_constant(SNAME("title_height"));
Rect2i title_bar = r;
title_bar.position.y -= title_height;
@@ -2576,13 +2546,13 @@ bool Viewport::_sub_windows_forward_input(const Ref<InputEvent> &p_event) {
close_rect.size = close_icon->get_size();
if (gui.subwindow_focused != sw.window) {
- //refocus
+ // Refocus.
_sub_window_grab_focus(sw.window);
}
if (close_rect.has_point(mb->get_position())) {
gui.subwindow_drag = SUB_WINDOW_DRAG_CLOSE;
- gui.subwindow_drag_close_inside = true; //starts inside
+ gui.subwindow_drag_close_inside = true; // Starts inside.
gui.subwindow_drag_close_rect = close_rect;
} else {
gui.subwindow_drag = SUB_WINDOW_DRAG_MOVE;
@@ -2603,9 +2573,9 @@ bool Viewport::_sub_windows_forward_input(const Ref<InputEvent> &p_event) {
}
}
if (!click_on_window && r.has_point(mb->get_position())) {
- //clicked, see if it needs to fetch focus
+ // Clicked, see if it needs to fetch focus.
if (gui.subwindow_focused != sw.window) {
- //refocus
+ // Refocus.
_sub_window_grab_focus(sw.window);
}
@@ -2618,7 +2588,7 @@ bool Viewport::_sub_windows_forward_input(const Ref<InputEvent> &p_event) {
}
if (!click_on_window && gui.subwindow_focused) {
- //no window found and clicked, remove focus
+ // No window found and clicked, remove focus.
_sub_window_grab_focus(nullptr);
}
}
@@ -2642,13 +2612,13 @@ bool Viewport::_sub_windows_forward_input(const Ref<InputEvent> &p_event) {
DisplayServer::get_singleton()->cursor_set_shape(shapes[resize]);
- return true; //reserved for showing the resize cursor
+ return true; // Reserved for showing the resize cursor.
}
}
}
if (gui.subwindow_drag != SUB_WINDOW_DRAG_DISABLED) {
- return true; // dragging, don't pass the event
+ return true; // Dragging, don't pass the event.
}
if (!gui.subwindow_focused) {
@@ -2665,7 +2635,7 @@ bool Viewport::_sub_windows_forward_input(const Ref<InputEvent> &p_event) {
return true;
}
-void Viewport::input(const Ref<InputEvent> &p_event, bool p_local_coords) {
+void Viewport::push_input(const Ref<InputEvent> &p_event, bool p_local_coords) {
ERR_FAIL_COND(!is_inside_tree());
if (disable_input) {
@@ -2695,7 +2665,7 @@ void Viewport::input(const Ref<InputEvent> &p_event, bool p_local_coords) {
}
if (!is_input_handled()) {
- get_tree()->_call_input_pause(input_group, "_input", ev, this); //not a bug, must happen before GUI, order is _input -> gui input -> _unhandled input
+ get_tree()->_call_input_pause(input_group, SceneTree::CALL_INPUT_TYPE_INPUT, ev, this); //not a bug, must happen before GUI, order is _input -> gui input -> _unhandled input
}
if (!is_input_handled()) {
@@ -2703,10 +2673,9 @@ void Viewport::input(const Ref<InputEvent> &p_event, bool p_local_coords) {
}
event_count++;
- //get_tree()->call_group(SceneTree::GROUP_CALL_REVERSE|SceneTree::GROUP_CALL_REALTIME|SceneTree::GROUP_CALL_MULIILEVEL,gui_input_group,"_gui_input",ev); //special one for GUI, as controls use their own process check
}
-void Viewport::unhandled_input(const Ref<InputEvent> &p_event, bool p_local_coords) {
+void Viewport::push_unhandled_input(const Ref<InputEvent> &p_event, bool p_local_coords) {
ERR_FAIL_COND(p_event.is_null());
ERR_FAIL_COND(!is_inside_tree());
local_input_handled = false;
@@ -2726,12 +2695,12 @@ void Viewport::unhandled_input(const Ref<InputEvent> &p_event, bool p_local_coor
ev = p_event;
}
- // Unhandled Input
- get_tree()->_call_input_pause(unhandled_input_group, "_unhandled_input", ev, this);
+ // Unhandled Input.
+ get_tree()->_call_input_pause(unhandled_input_group, SceneTree::CALL_INPUT_TYPE_UNHANDLED_INPUT, ev, this);
- // Unhandled key Input - used for performance reasons - This is called a lot less than _unhandled_input since it ignores MouseMotion, etc
+ // Unhandled key Input - used for performance reasons - This is called a lot less than _unhandled_input since it ignores MouseMotion, etc.
if (!is_input_handled() && (Object::cast_to<InputEventKey>(*ev) != nullptr || Object::cast_to<InputEventShortcut>(*ev) != nullptr)) {
- get_tree()->_call_input_pause(unhandled_key_input_group, "_unhandled_key_input", ev, this);
+ get_tree()->_call_input_pause(unhandled_key_input_group, SceneTree::CALL_INPUT_TYPE_UNHANDLED_KEY_INPUT, ev, this);
}
if (physics_object_picking && !is_input_handled()) {
@@ -2740,7 +2709,7 @@ void Viewport::unhandled_input(const Ref<InputEvent> &p_event, bool p_local_coor
Object::cast_to<InputEventMouseMotion>(*ev) ||
Object::cast_to<InputEventScreenDrag>(*ev) ||
Object::cast_to<InputEventScreenTouch>(*ev) ||
- Object::cast_to<InputEventKey>(*ev) //to remember state
+ Object::cast_to<InputEventKey>(*ev) // To remember state.
)) {
physics_picking_events.push_back(ev);
@@ -2786,10 +2755,6 @@ Variant Viewport::gui_get_drag_data() const {
}
TypedArray<String> Viewport::get_configuration_warnings() const {
- /*if (get_parent() && !Object::cast_to<Control>(get_parent()) && !render_target) {
- return TTR("This viewport is not set as render target. If you intend for it to display its contents directly to the screen, make it a child of a Control so it can obtain a size. Otherwise, make it a RenderTarget and assign its internal texture to some node for display.");
- }*/
-
TypedArray<String> warnings = Node::get_configuration_warnings();
if (size.x == 0 || size.y == 0) {
@@ -3077,71 +3042,74 @@ Viewport::SDFScale Viewport::get_sdf_scale() const {
}
#ifndef _3D_DISABLED
-Listener3D *Viewport::get_listener_3d() const {
- return listener_3d;
+AudioListener3D *Viewport::get_audio_listener_3d() const {
+ return audio_listener_3d;
}
void Viewport::set_as_audio_listener_3d(bool p_enable) {
- if (p_enable == audio_listener_3d) {
+ if (p_enable == is_audio_listener_3d_enabled) {
return;
}
- audio_listener_3d = p_enable;
- _update_listener_3d();
+ is_audio_listener_3d_enabled = p_enable;
+ _update_audio_listener_3d();
}
bool Viewport::is_audio_listener_3d() const {
- return audio_listener_3d;
+ return is_audio_listener_3d_enabled;
}
-void Viewport::_update_listener_3d() {
+void Viewport::_update_audio_listener_3d() {
+ if (AudioServer::get_singleton()) {
+ AudioServer::get_singleton()->notify_listener_changed();
+ }
}
void Viewport::_listener_transform_3d_changed_notify() {
}
-void Viewport::_listener_3d_set(Listener3D *p_listener) {
- if (listener_3d == p_listener) {
+void Viewport::_audio_listener_3d_set(AudioListener3D *p_listener) {
+ if (audio_listener_3d == p_listener) {
return;
}
- listener_3d = p_listener;
+ audio_listener_3d = p_listener;
- _update_listener_3d();
+ _update_audio_listener_3d();
_listener_transform_3d_changed_notify();
}
-bool Viewport::_listener_3d_add(Listener3D *p_listener) {
- listener_3d_set.insert(p_listener);
- return listener_3d_set.size() == 1;
+bool Viewport::_audio_listener_3d_add(AudioListener3D *p_listener) {
+ audio_listener_3d_set.insert(p_listener);
+ return audio_listener_3d_set.size() == 1;
}
-void Viewport::_listener_3d_remove(Listener3D *p_listener) {
- listener_3d_set.erase(p_listener);
- if (listener_3d == p_listener) {
- listener_3d = nullptr;
+void Viewport::_audio_listener_3d_remove(AudioListener3D *p_listener) {
+ audio_listener_3d_set.erase(p_listener);
+ if (audio_listener_3d == p_listener) {
+ audio_listener_3d = nullptr;
}
}
-void Viewport::_listener_3d_make_next_current(Listener3D *p_exclude) {
- if (listener_3d_set.size() > 0) {
- for (Set<Listener3D *>::Element *E = listener_3d_set.front(); E; E = E->next()) {
+void Viewport::_audio_listener_3d_make_next_current(AudioListener3D *p_exclude) {
+ if (audio_listener_3d_set.size() > 0) {
+ for (Set<AudioListener3D *>::Element *E = audio_listener_3d_set.front(); E; E = E->next()) {
if (p_exclude == E->get()) {
continue;
}
if (!E->get()->is_inside_tree()) {
continue;
}
- if (listener_3d != nullptr) {
+ if (audio_listener_3d != nullptr) {
return;
}
E->get()->make_current();
}
} else {
- // Attempt to reset listener to the camera position
+ // Attempt to reset listener to the camera position.
if (camera_3d != nullptr) {
- _update_listener_3d();
+ _update_audio_listener_3d();
_camera_3d_transform_changed_notify();
}
}
@@ -3152,14 +3120,14 @@ void Viewport::_collision_object_3d_input_event(CollisionObject3D *p_object, Cam
Transform3D camera_transform = p_camera->get_global_transform();
ObjectID id = p_object->get_instance_id();
- //avoid sending the fake event unnecessarily if nothing really changed in the context
+ // Avoid sending the fake event unnecessarily if nothing really changed in the context.
if (object_transform == physics_last_object_transform && camera_transform == physics_last_camera_transform && physics_last_id == id) {
Ref<InputEventMouseMotion> mm = p_input_event;
if (mm.is_valid() && mm->get_device() == InputEvent::DEVICE_ID_INTERNAL) {
- return; //discarded
+ return; // Discarded.
}
}
- p_object->_input_event(camera_3d, p_input_event, p_pos, p_normal, p_shape);
+ p_object->_input_event_call(camera_3d, p_input_event, p_pos, p_normal, p_shape);
physics_last_object_transform = object_transform;
physics_last_camera_transform = camera_transform;
physics_last_id = id;
@@ -3195,7 +3163,7 @@ void Viewport::_camera_3d_set(Camera3D *p_camera) {
camera_3d->notification(Camera3D::NOTIFICATION_BECAME_CURRENT);
}
- _update_listener_3d();
+ _update_audio_listener_3d();
_camera_3d_transform_changed_notify();
}
@@ -3357,7 +3325,7 @@ void Viewport::set_world_3d(const Ref<World3D> &p_world_3d) {
RenderingServer::get_singleton()->viewport_set_scenario(viewport, find_world_3d()->get_scenario());
}
- _update_listener_3d();
+ _update_audio_listener_3d();
}
void Viewport::_own_world_3d_changed() {
@@ -3378,7 +3346,7 @@ void Viewport::_own_world_3d_changed() {
RenderingServer::get_singleton()->viewport_set_scenario(viewport, find_world_3d()->get_scenario());
}
- _update_listener_3d();
+ _update_audio_listener_3d();
}
void Viewport::set_use_own_world_3d(bool p_world_3d) {
@@ -3412,7 +3380,7 @@ void Viewport::set_use_own_world_3d(bool p_world_3d) {
RenderingServer::get_singleton()->viewport_set_scenario(viewport, find_world_3d()->get_scenario());
}
- _update_listener_3d();
+ _update_audio_listener_3d();
}
bool Viewport::is_using_own_world_3d() const {
@@ -3474,6 +3442,17 @@ void Viewport::set_use_xr(bool p_use_xr) {
bool Viewport::is_using_xr() {
return use_xr;
}
+
+void Viewport::set_scale_3d(const Scale3D p_scale_3d) {
+ scale_3d = p_scale_3d;
+
+ RS::get_singleton()->viewport_set_scale_3d(viewport, RS::ViewportScale3D(scale_3d));
+}
+
+Viewport::Scale3D Viewport::get_scale_3d() const {
+ return scale_3d;
+}
+
#endif // _3D_DISABLED
void Viewport::_bind_methods() {
@@ -3515,9 +3494,9 @@ void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_physics_object_picking"), &Viewport::get_physics_object_picking);
ClassDB::bind_method(D_METHOD("get_viewport_rid"), &Viewport::get_viewport_rid);
- ClassDB::bind_method(D_METHOD("input_text", "text"), &Viewport::input_text);
- ClassDB::bind_method(D_METHOD("input", "event", "in_local_coords"), &Viewport::input, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("unhandled_input", "event", "in_local_coords"), &Viewport::unhandled_input, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("push_text_input", "text"), &Viewport::push_text_input);
+ ClassDB::bind_method(D_METHOD("push_input", "event", "in_local_coords"), &Viewport::push_input, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("push_unhandled_input", "event", "in_local_coords"), &Viewport::push_unhandled_input, DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_camera_2d"), &Viewport::get_camera_2d);
ClassDB::bind_method(D_METHOD("set_as_audio_listener_2d", "enable"), &Viewport::set_as_audio_listener_2d);
@@ -3598,8 +3577,12 @@ void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_use_xr", "use"), &Viewport::set_use_xr);
ClassDB::bind_method(D_METHOD("is_using_xr"), &Viewport::is_using_xr);
+ ClassDB::bind_method(D_METHOD("set_scale_3d", "scale"), &Viewport::set_scale_3d);
+ ClassDB::bind_method(D_METHOD("get_scale_3d"), &Viewport::get_scale_3d);
+
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disable_3d"), "set_disable_3d", "is_3d_disabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_xr"), "set_use_xr", "is_using_xr");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "scale_3d", PROPERTY_HINT_ENUM, String::utf8("Disabled,75%,50%,33%,25%")), "set_scale_3d", "get_scale_3d");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_listener_enable_3d"), "set_as_audio_listener_3d", "is_audio_listener_3d");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "own_world_3d"), "set_use_own_world_3d", "is_using_own_world_3d");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "world_3d", PROPERTY_HINT_RESOURCE_TYPE, "World3D"), "set_world_3d", "get_world_3d");
@@ -3610,7 +3593,7 @@ void Viewport::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "snap_2d_transforms_to_pixel"), "set_snap_2d_transforms_to_pixel", "is_snap_2d_transforms_to_pixel_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "snap_2d_vertices_to_pixel"), "set_snap_2d_vertices_to_pixel", "is_snap_2d_vertices_to_pixel_enabled");
ADD_GROUP("Rendering", "");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "msaa", PROPERTY_HINT_ENUM, String::utf8("Disabled (Fastest),2× (Fast),4× (Average),8× (Slow),16× (Slower)")), "set_msaa", "get_msaa");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "msaa", PROPERTY_HINT_ENUM, String::utf8("Disabled (Fastest),2× (Average),4× (Slow),8× (Slowest)")), "set_msaa", "get_msaa");
ADD_PROPERTY(PropertyInfo(Variant::INT, "screen_space_aa", PROPERTY_HINT_ENUM, "Disabled (Fastest),FXAA (Fast)"), "set_screen_space_aa", "get_screen_space_aa");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_debanding"), "set_use_debanding", "is_using_debanding");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_occlusion_culling"), "set_use_occlusion_culling", "is_using_occlusion_culling");
@@ -3643,6 +3626,12 @@ void Viewport::_bind_methods() {
ADD_SIGNAL(MethodInfo("size_changed"));
ADD_SIGNAL(MethodInfo("gui_focus_changed", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
+ BIND_ENUM_CONSTANT(SCALE_3D_DISABLED);
+ BIND_ENUM_CONSTANT(SCALE_3D_75_PERCENT);
+ BIND_ENUM_CONSTANT(SCALE_3D_50_PERCENT);
+ BIND_ENUM_CONSTANT(SCALE_3D_33_PERCENT);
+ BIND_ENUM_CONSTANT(SCALE_3D_25_PERCENT);
+
BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED);
BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_1);
BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_4);
@@ -3656,7 +3645,6 @@ void Viewport::_bind_methods() {
BIND_ENUM_CONSTANT(MSAA_2X);
BIND_ENUM_CONSTANT(MSAA_4X);
BIND_ENUM_CONSTANT(MSAA_8X);
- BIND_ENUM_CONSTANT(MSAA_16X);
BIND_ENUM_CONSTANT(MSAA_MAX);
BIND_ENUM_CONSTANT(SCREEN_SPACE_AA_DISABLED);
@@ -3731,10 +3719,8 @@ Viewport::Viewport() {
viewport_textures.insert(default_texture.ptr());
default_texture->proxy = RS::get_singleton()->texture_proxy_create(texture_rid);
- //internal_listener_2d = SpatialSound2DServer::get_singleton()->listener_create();
- canvas_layers.insert(nullptr); // This eases picking code (interpreted as the canvas of the Viewport)
+ canvas_layers.insert(nullptr); // This eases picking code (interpreted as the canvas of the Viewport).
- //clear=true;
set_shadow_atlas_size(shadow_atlas_size);
for (int i = 0; i < 4; i++) {
@@ -3757,11 +3743,16 @@ Viewport::Viewport() {
gui.tooltip_delay = GLOBAL_DEF("gui/timers/tooltip_delay_sec", 0.5);
ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/tooltip_delay_sec", PropertyInfo(Variant::FLOAT, "gui/timers/tooltip_delay_sec", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); // No negative numbers
- set_sdf_oversize(sdf_oversize); //set to server
+#ifndef _3D_DISABLED
+ int scale = GLOBAL_GET("rendering/3d/viewport/scale");
+ set_scale_3d((Scale3D)scale);
+#endif // _3D_DISABLED
+
+ set_sdf_oversize(sdf_oversize); // Set to server.
}
Viewport::~Viewport() {
- //erase itself from viewport textures
+ // Erase itself from viewport textures.
for (Set<ViewportTexture *>::Element *E = viewport_textures.front(); E; E = E->next()) {
E->get()->vp = nullptr;
}
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 9c51f404d7..3732f9cfd1 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -37,10 +37,11 @@
#ifndef _3D_DISABLED
class Camera3D;
class CollisionObject3D;
-class Listener3D;
+class AudioListener3D;
class World3D;
#endif // _3D_DISABLED
+class AudioListener2D;
class Camera2D;
class CanvasItem;
class CanvasLayer;
@@ -88,6 +89,14 @@ class Viewport : public Node {
GDCLASS(Viewport, Node);
public:
+ enum Scale3D {
+ SCALE_3D_DISABLED,
+ SCALE_3D_75_PERCENT,
+ SCALE_3D_50_PERCENT,
+ SCALE_3D_33_PERCENT,
+ SCALE_3D_25_PERCENT
+ };
+
enum ShadowAtlasQuadrantSubdiv {
SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED,
SHADOW_ATLAS_QUADRANT_SUBDIV_1,
@@ -104,7 +113,7 @@ public:
MSAA_2X,
MSAA_4X,
MSAA_8X,
- MSAA_16X,
+ // 16x MSAA is not supported due to its high cost and driver bugs.
MSAA_MAX
};
@@ -193,6 +202,7 @@ private:
Viewport *parent = nullptr;
+ AudioListener2D *audio_listener_2d = nullptr;
Camera2D *camera_2d = nullptr;
Set<CanvasLayer *> canvas_layers;
@@ -200,8 +210,8 @@ private:
RID current_canvas;
RID subwindow_canvas;
- bool audio_listener_2d = false;
- RID internal_listener_2d;
+ bool is_audio_listener_2d_enabled = false;
+ RID internal_audio_listener_2d;
bool override_canvas_transform = false;
@@ -264,7 +274,7 @@ private:
StringName unhandled_input_group;
StringName unhandled_key_input_group;
- void _update_listener_2d();
+ void _update_audio_listener_2d();
bool disable_3d = false;
@@ -408,6 +418,10 @@ private:
bool _gui_drop(Control *p_at_control, Point2 p_at_pos, bool p_just_check);
+ friend class AudioListener2D;
+ void _audio_listener_2d_set(AudioListener2D *p_listener);
+ void _audio_listener_2d_remove(AudioListener2D *p_listener);
+
friend class Camera2D;
void _camera_2d_set(Camera2D *p_camera_2d);
@@ -449,6 +463,7 @@ protected:
public:
uint64_t get_processed_events_count() const { return event_count; }
+ AudioListener2D *get_audio_listener_2d() const;
Camera2D *get_camera_2d() const;
void set_as_audio_listener_2d(bool p_enable);
bool is_audio_listener_2d() const;
@@ -508,9 +523,9 @@ public:
Vector2 get_camera_coords(const Vector2 &p_viewport_coords) const;
Vector2 get_camera_rect_size() const;
- void input_text(const String &p_text);
- void input(const Ref<InputEvent> &p_event, bool p_local_coords = false);
- void unhandled_input(const Ref<InputEvent> &p_event, bool p_local_coords = false);
+ void push_text_input(const String &p_text);
+ void push_input(const Ref<InputEvent> &p_event, bool p_local_coords = false);
+ void push_unhandled_input(const Ref<InputEvent> &p_event, bool p_local_coords = false);
void set_disable_input(bool p_disable);
bool is_input_disabled() const;
@@ -577,20 +592,21 @@ public:
#ifndef _3D_DISABLED
bool use_xr = false;
- friend class Listener3D;
- Listener3D *listener_3d = nullptr;
- Set<Listener3D *> listener_3d_set;
- bool audio_listener_3d = false;
- RID internal_listener_3d;
- Listener3D *get_listener_3d() const;
+ Scale3D scale_3d = SCALE_3D_DISABLED;
+ friend class AudioListener3D;
+ AudioListener3D *audio_listener_3d = nullptr;
+ Set<AudioListener3D *> audio_listener_3d_set;
+ bool is_audio_listener_3d_enabled = false;
+ RID internal_audio_listener_3d;
+ AudioListener3D *get_audio_listener_3d() const;
void set_as_audio_listener_3d(bool p_enable);
bool is_audio_listener_3d() const;
- void _update_listener_3d();
+ void _update_audio_listener_3d();
void _listener_transform_3d_changed_notify();
- void _listener_3d_set(Listener3D *p_listener);
- bool _listener_3d_add(Listener3D *p_listener); //true if first
- void _listener_3d_remove(Listener3D *p_listener);
- void _listener_3d_make_next_current(Listener3D *p_exclude);
+ void _audio_listener_3d_set(AudioListener3D *p_listener);
+ bool _audio_listener_3d_add(AudioListener3D *p_listener); //true if first
+ void _audio_listener_3d_remove(AudioListener3D *p_listener);
+ void _audio_listener_3d_make_next_current(AudioListener3D *p_exclude);
void _collision_object_3d_input_event(CollisionObject3D *p_object, Camera3D *p_camera, const Ref<InputEvent> &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape);
@@ -647,6 +663,9 @@ public:
void set_use_xr(bool p_use_xr);
bool is_using_xr();
+
+ void set_scale_3d(const Scale3D p_scale_3d);
+ Scale3D get_scale_3d() const;
#endif // _3D_DISABLED
Viewport();
@@ -705,6 +724,7 @@ VARIANT_ENUM_CAST(SubViewport::UpdateMode);
VARIANT_ENUM_CAST(Viewport::ShadowAtlasQuadrantSubdiv);
VARIANT_ENUM_CAST(Viewport::MSAA);
VARIANT_ENUM_CAST(Viewport::ScreenSpaceAA);
+VARIANT_ENUM_CAST(Viewport::Scale3D);
VARIANT_ENUM_CAST(Viewport::DebugDraw);
VARIANT_ENUM_CAST(Viewport::SDFScale);
VARIANT_ENUM_CAST(Viewport::SDFOversize);
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 73eec73d75..ca5a3915d0 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -659,8 +659,8 @@ void Window::_update_viewport_size() {
if (!use_font_oversampling) {
font_oversampling = 1.0;
}
- if (TS->font_get_oversampling() != font_oversampling) {
- TS->font_set_oversampling(font_oversampling);
+ if (TS->font_get_global_oversampling() != font_oversampling) {
+ TS->font_set_global_oversampling(font_oversampling);
}
}
@@ -916,14 +916,14 @@ void Window::_window_input(const Ref<InputEvent> &p_ev) {
emit_signal(SceneStringNames::get_singleton()->window_input, p_ev);
- input(p_ev);
+ push_input(p_ev);
if (!is_input_handled()) {
- unhandled_input(p_ev);
+ push_unhandled_input(p_ev);
}
}
void Window::_window_input_text(const String &p_text) {
- input_text(p_text);
+ push_text_input(p_text);
}
void Window::_window_drop_files(const Vector<String> &p_files) {
@@ -1497,7 +1497,7 @@ void Window::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "position"), "set_position", "get_position");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "size"), "set_size", "get_size");
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Windowed,Minimized,Maximized,Fullscreen"), "set_mode", "get_mode");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "current_screen"), "set_current_screen", "get_current_screen");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "current_screen"), "set_current_screen", "get_current_screen");
ADD_GROUP("Flags", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "visible"), "set_visible", "is_visible");
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 40ab439a51..1e89b17044 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -36,6 +36,7 @@
#include "core/os/os.h"
#include "scene/2d/animated_sprite_2d.h"
#include "scene/2d/area_2d.h"
+#include "scene/2d/audio_listener_2d.h"
#include "scene/2d/audio_stream_player_2d.h"
#include "scene/2d/back_buffer_copy.h"
#include "scene/2d/camera_2d.h"
@@ -160,6 +161,8 @@
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/resource_format_text.h"
#include "scene/resources/segment_shape_2d.h"
+#include "scene/resources/separation_ray_shape_2d.h"
+#include "scene/resources/separation_ray_shape_3d.h"
#include "scene/resources/skeleton_modification_2d.h"
#include "scene/resources/skeleton_modification_2d_ccdik.h"
#include "scene/resources/skeleton_modification_2d_fabrik.h"
@@ -194,14 +197,15 @@
#include "scene/resources/visual_shader_sdf_nodes.h"
#include "scene/resources/world_2d.h"
#include "scene/resources/world_3d.h"
-#include "scene/resources/world_margin_shape_2d.h"
-#include "scene/resources/world_margin_shape_3d.h"
+#include "scene/resources/world_boundary_shape_2d.h"
+#include "scene/resources/world_boundary_shape_3d.h"
#include "scene/scene_string_names.h"
#include "scene/main/shader_globals_override.h"
#ifndef _3D_DISABLED
#include "scene/3d/area_3d.h"
+#include "scene/3d/audio_listener_3d.h"
#include "scene/3d/audio_stream_player_3d.h"
#include "scene/3d/bone_attachment_3d.h"
#include "scene/3d/camera_3d.h"
@@ -214,7 +218,6 @@
#include "scene/3d/light_3d.h"
#include "scene/3d/lightmap_gi.h"
#include "scene/3d/lightmap_probe.h"
-#include "scene/3d/listener_3d.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/3d/multimesh_instance_3d.h"
#include "scene/3d/navigation_agent_3d.h"
@@ -232,7 +235,7 @@
#include "scene/3d/remote_transform_3d.h"
#include "scene/3d/skeleton_3d.h"
#include "scene/3d/skeleton_ik_3d.h"
-#include "scene/3d/soft_body_3d.h"
+#include "scene/3d/soft_dynamic_body_3d.h"
#include "scene/3d/spring_arm_3d.h"
#include "scene/3d/sprite_3d.h"
#include "scene/3d/vehicle_body_3d.h"
@@ -247,12 +250,6 @@
static Ref<ResourceFormatSaverText> resource_saver_text;
static Ref<ResourceFormatLoaderText> resource_loader_text;
-static Ref<ResourceFormatLoaderFont> resource_loader_font;
-
-#ifndef DISABLE_DEPRECATED
-static Ref<ResourceFormatLoaderCompatFont> resource_loader_compat_font;
-#endif /* DISABLE_DEPRECATED */
-
static Ref<ResourceFormatLoaderStreamTexture2D> resource_loader_stream_texture;
static Ref<ResourceFormatLoaderStreamTextureLayered> resource_loader_texture_layered;
static Ref<ResourceFormatLoaderStreamTexture3D> resource_loader_texture_3d;
@@ -267,14 +264,6 @@ void register_scene_types() {
Node::init_node_hrcr();
- resource_loader_font.instantiate();
- ResourceLoader::add_resource_format_loader(resource_loader_font);
-
-#ifndef DISABLE_DEPRECATED
- resource_loader_compat_font.instantiate();
- ResourceLoader::add_resource_format_loader(resource_loader_compat_font);
-#endif /* DISABLE_DEPRECATED */
-
resource_loader_stream_texture.instantiate();
ResourceLoader::add_resource_format_loader(resource_loader_stream_texture);
@@ -320,7 +309,6 @@ void register_scene_types() {
OS::get_singleton()->yield(); //may take time to init
- GDREGISTER_CLASS(Shortcut);
GDREGISTER_CLASS(Control);
GDREGISTER_CLASS(Button);
GDREGISTER_CLASS(Label);
@@ -457,7 +445,7 @@ void register_scene_types() {
GDREGISTER_VIRTUAL_CLASS(GeometryInstance3D);
GDREGISTER_CLASS(Camera3D);
GDREGISTER_CLASS(ClippedCamera3D);
- GDREGISTER_CLASS(Listener3D);
+ GDREGISTER_CLASS(AudioListener3D);
GDREGISTER_CLASS(XRCamera3D);
GDREGISTER_CLASS(XRController3D);
GDREGISTER_CLASS(XRAnchor3D);
@@ -501,13 +489,14 @@ void register_scene_types() {
GDREGISTER_VIRTUAL_CLASS(CollisionObject3D);
GDREGISTER_VIRTUAL_CLASS(PhysicsBody3D);
GDREGISTER_CLASS(StaticBody3D);
- GDREGISTER_CLASS(RigidBody3D);
+ GDREGISTER_CLASS(AnimatableBody3D);
+ GDREGISTER_CLASS(RigidDynamicBody3D);
GDREGISTER_CLASS(KinematicCollision3D);
GDREGISTER_CLASS(CharacterBody3D);
GDREGISTER_CLASS(SpringArm3D);
GDREGISTER_CLASS(PhysicalBone3D);
- GDREGISTER_CLASS(SoftBody3D);
+ GDREGISTER_CLASS(SoftDynamicBody3D);
GDREGISTER_CLASS(SkeletonIK3D);
GDREGISTER_CLASS(BoneAttachment3D);
@@ -660,7 +649,8 @@ void register_scene_types() {
GDREGISTER_VIRTUAL_CLASS(CollisionObject2D);
GDREGISTER_VIRTUAL_CLASS(PhysicsBody2D);
GDREGISTER_CLASS(StaticBody2D);
- GDREGISTER_CLASS(RigidBody2D);
+ GDREGISTER_CLASS(AnimatableBody2D);
+ GDREGISTER_CLASS(RigidDynamicBody2D);
GDREGISTER_CLASS(CharacterBody2D);
GDREGISTER_CLASS(KinematicCollision2D);
GDREGISTER_CLASS(Area2D);
@@ -682,6 +672,7 @@ void register_scene_types() {
OS::get_singleton()->yield(); //may take time to init
GDREGISTER_CLASS(Camera2D);
+ GDREGISTER_CLASS(AudioListener2D);
GDREGISTER_VIRTUAL_CLASS(Joint2D);
GDREGISTER_CLASS(PinJoint2D);
GDREGISTER_CLASS(GrooveJoint2D);
@@ -753,12 +744,13 @@ void register_scene_types() {
OS::get_singleton()->yield(); //may take time to init
GDREGISTER_VIRTUAL_CLASS(Shape3D);
+ GDREGISTER_CLASS(SeparationRayShape3D);
GDREGISTER_CLASS(SphereShape3D);
GDREGISTER_CLASS(BoxShape3D);
GDREGISTER_CLASS(CapsuleShape3D);
GDREGISTER_CLASS(CylinderShape3D);
GDREGISTER_CLASS(HeightMapShape3D);
- GDREGISTER_CLASS(WorldMarginShape3D);
+ GDREGISTER_CLASS(WorldBoundaryShape3D);
GDREGISTER_CLASS(ConvexPolygonShape3D);
GDREGISTER_CLASS(ConcavePolygonShape3D);
@@ -812,7 +804,6 @@ void register_scene_types() {
GDREGISTER_CLASS(Font);
GDREGISTER_CLASS(Curve);
- GDREGISTER_CLASS(TextFile);
GDREGISTER_CLASS(TextLine);
GDREGISTER_CLASS(TextParagraph);
@@ -840,8 +831,9 @@ void register_scene_types() {
OS::get_singleton()->yield(); //may take time to init
GDREGISTER_VIRTUAL_CLASS(Shape2D);
- GDREGISTER_CLASS(WorldMarginShape2D);
+ GDREGISTER_CLASS(WorldBoundaryShape2D);
GDREGISTER_CLASS(SegmentShape2D);
+ GDREGISTER_CLASS(SeparationRayShape2D);
GDREGISTER_CLASS(CircleShape2D);
GDREGISTER_CLASS(RectangleShape2D);
GDREGISTER_CLASS(CapsuleShape2D);
@@ -927,8 +919,8 @@ void register_scene_types() {
ClassDB::add_compatibility_class("KinematicBody2D", "CharacterBody2D");
ClassDB::add_compatibility_class("KinematicCollision", "KinematicCollision3D");
ClassDB::add_compatibility_class("Light", "Light3D");
- ClassDB::add_compatibility_class("LineShape2D", "WorldMarginShape2D");
- ClassDB::add_compatibility_class("Listener", "Listener3D");
+ ClassDB::add_compatibility_class("LineShape2D", "WorldBoundaryShape2D");
+ ClassDB::add_compatibility_class("Listener", "AudioListener3D");
ClassDB::add_compatibility_class("MeshInstance", "MeshInstance3D");
ClassDB::add_compatibility_class("MultiMeshInstance", "MultiMeshInstance3D");
ClassDB::add_compatibility_class("NavigationAgent", "NavigationAgent3D");
@@ -958,18 +950,21 @@ void register_scene_types() {
ClassDB::add_compatibility_class("PhysicsServer", "PhysicsServer3D");
ClassDB::add_compatibility_class("PhysicsShapeQueryParameters", "PhysicsShapeQueryParameters3D");
ClassDB::add_compatibility_class("PinJoint", "PinJoint3D");
- ClassDB::add_compatibility_class("PlaneShape", "WorldMarginShape3D");
+ ClassDB::add_compatibility_class("PlaneShape", "WorldBoundaryShape3D");
ClassDB::add_compatibility_class("ProceduralSky", "Sky");
ClassDB::add_compatibility_class("ProximityGroup", "ProximityGroup3D");
ClassDB::add_compatibility_class("RayCast", "RayCast3D");
+ ClassDB::add_compatibility_class("RayShape", "SeparationRayShape3D");
+ ClassDB::add_compatibility_class("RayShape2D", "SeparationRayShape2D");
ClassDB::add_compatibility_class("RemoteTransform", "RemoteTransform3D");
- ClassDB::add_compatibility_class("RigidBody", "RigidBody3D");
+ ClassDB::add_compatibility_class("RigidBody", "RigidDynamicBody3D");
+ ClassDB::add_compatibility_class("RigidBody2D", "RigidDynamicBody2D");
ClassDB::add_compatibility_class("Shape", "Shape3D");
ClassDB::add_compatibility_class("ShortCut", "Shortcut");
ClassDB::add_compatibility_class("Skeleton", "Skeleton3D");
ClassDB::add_compatibility_class("SkeletonIK", "SkeletonIK3D");
ClassDB::add_compatibility_class("SliderJoint", "SliderJoint3D");
- ClassDB::add_compatibility_class("SoftBody", "SoftBody3D");
+ ClassDB::add_compatibility_class("SoftBody", "SoftDynamicBody3D");
ClassDB::add_compatibility_class("Spatial", "Node3D");
ClassDB::add_compatibility_class("SpatialGizmo", "Node3DGizmo");
ClassDB::add_compatibility_class("SpatialMaterial", "StandardMaterial3D");
@@ -1067,14 +1062,6 @@ void unregister_scene_types() {
SceneDebugger::deinitialize();
clear_default_theme();
- ResourceLoader::remove_resource_format_loader(resource_loader_font);
- resource_loader_font.unref();
-
-#ifndef DISABLE_DEPRECATED
- ResourceLoader::remove_resource_format_loader(resource_loader_compat_font);
- resource_loader_compat_font.unref();
-#endif /* DISABLE_DEPRECATED */
-
ResourceLoader::remove_resource_format_loader(resource_loader_texture_layered);
resource_loader_texture_layered.unref();
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index e6a74e7685..b4eec2530b 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -29,9 +29,9 @@
/*************************************************************************/
#include "animation.h"
-#include "scene/scene_string_names.h"
#include "core/math/geometry_3d.h"
+#include "scene/scene_string_names.h"
bool Animation::_set(const StringName &p_name, const Variant &p_value) {
String name = p_name;
@@ -79,15 +79,16 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
TransformTrack *tt = static_cast<TransformTrack *>(tracks[track]);
Vector<real_t> values = p_value;
int vcount = values.size();
- ERR_FAIL_COND_V(vcount % 12, false); // should be multiple of 12
+ ERR_FAIL_COND_V(vcount % TRANSFORM_TRACK_SIZE, false);
const real_t *r = values.ptr();
- tt->transforms.resize(vcount / 12);
+ int64_t count = vcount / TRANSFORM_TRACK_SIZE;
+ tt->transforms.resize(count);
- for (int i = 0; i < (vcount / 12); i++) {
+ for (int i = 0; i < count; i++) {
TKey<TransformKey> &tk = tt->transforms.write[i];
- const real_t *ofs = &r[i * 12];
+ const real_t *ofs = &r[i * TRANSFORM_TRACK_SIZE];
tk.time = ofs[0];
tk.transition = ofs[1];
@@ -354,7 +355,7 @@ bool Animation::_get(const StringName &p_name, Variant &r_ret) const {
if (track_get_type(track) == TYPE_TRANSFORM3D) {
Vector<real_t> keys;
int kk = track_get_key_count(track);
- keys.resize(kk * sizeof(Transform3D));
+ keys.resize(kk * TRANSFORM_TRACK_SIZE);
real_t *w = keys.ptrw();
diff --git a/scene/resources/animation.h b/scene/resources/animation.h
index 6227f6967f..9a410bd566 100644
--- a/scene/resources/animation.h
+++ b/scene/resources/animation.h
@@ -92,6 +92,9 @@ private:
Vector3 scale;
};
+ // Not necessarily the same size as Transform3D. The amount of numbers in Animation::Key and TransformKey.
+ const int32_t TRANSFORM_TRACK_SIZE = 12;
+
/* TRANSFORM TRACK */
struct TransformTrack : public Track {
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp
index ef070589e4..d018103e64 100644
--- a/scene/resources/audio_stream_sample.cpp
+++ b/scene/resources/audio_stream_sample.cpp
@@ -221,12 +221,12 @@ void AudioStreamPlaybackSample::do_resample(const Depth *p_src, AudioFrame *p_ds
}
}
-void AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
+int AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
if (!base->data || !active) {
for (int i = 0; i < p_frames; i++) {
p_buffer[i] = AudioFrame(0, 0);
}
- return;
+ return 0;
}
int len = base->data_bytes;
@@ -395,12 +395,15 @@ void AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, in
}
if (todo) {
+ int mixed_frames = p_frames - todo;
//bit was missing from mix
int todo_ofs = p_frames - todo;
for (int i = todo_ofs; i < p_frames; i++) {
p_buffer[i] = AudioFrame(0, 0);
}
+ return mixed_frames;
}
+ return p_frames;
}
AudioStreamPlaybackSample::AudioStreamPlaybackSample() {}
@@ -477,6 +480,10 @@ float AudioStreamSample::get_length() const {
return float(len) / mix_rate;
}
+bool AudioStreamSample::is_monophonic() const {
+ return false;
+}
+
void AudioStreamSample::set_data(const Vector<uint8_t> &p_data) {
AudioServer::get_singleton()->lock();
if (data) {
diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h
index 70b8ba79ad..24198e3c98 100644
--- a/scene/resources/audio_stream_sample.h
+++ b/scene/resources/audio_stream_sample.h
@@ -73,7 +73,7 @@ public:
virtual float get_playback_position() const override;
virtual void seek(float p_time) override;
- virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) override;
+ virtual int mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) override;
AudioStreamPlaybackSample();
};
@@ -136,6 +136,8 @@ public:
virtual float get_length() const override; //if supported, otherwise return 0
+ virtual bool is_monophonic() const override;
+
void set_data(const Vector<uint8_t> &p_data);
Vector<uint8_t> get_data() const;
diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp
index de557494c3..49ed9dcb82 100644
--- a/scene/resources/bit_map.cpp
+++ b/scene/resources/bit_map.cpp
@@ -48,7 +48,7 @@ void BitMap::create_from_image_alpha(const Ref<Image> &p_image, float p_threshol
img->convert(Image::FORMAT_LA8);
ERR_FAIL_COND(img->get_format() != Image::FORMAT_LA8);
- create(Size2(img->get_width(), img->get_height()));
+ create(img->get_size());
const uint8_t *r = img->get_data().ptr();
uint8_t *w = bitmask.ptrw();
diff --git a/scene/resources/canvas_item_material.cpp b/scene/resources/canvas_item_material.cpp
index 7501efea9e..fa95ab0e79 100644
--- a/scene/resources/canvas_item_material.cpp
+++ b/scene/resources/canvas_item_material.cpp
@@ -161,7 +161,7 @@ void CanvasItemMaterial::flush_changes() {
void CanvasItemMaterial::_queue_shader_change() {
MutexLock lock(material_mutex);
- if (!element.in_list()) {
+ if (is_initialized && !element.in_list()) {
dirty_materials->add(&element);
}
}
@@ -287,6 +287,7 @@ CanvasItemMaterial::CanvasItemMaterial() :
set_particles_anim_loop(false);
current_key.invalid_key = 1;
+ is_initialized = true;
_queue_shader_change();
}
diff --git a/scene/resources/canvas_item_material.h b/scene/resources/canvas_item_material.h
index 0a813e0ae5..37cd4de136 100644
--- a/scene/resources/canvas_item_material.h
+++ b/scene/resources/canvas_item_material.h
@@ -102,6 +102,7 @@ private:
_FORCE_INLINE_ void _queue_shader_change();
_FORCE_INLINE_ bool _is_shader_dirty() const;
+ bool is_initialized = false;
BlendMode blend_mode = BLEND_MODE_MIX;
LightMode light_mode = LIGHT_MODE_NORMAL;
bool particles_animation = false;
diff --git a/scene/resources/capsule_shape_2d.cpp b/scene/resources/capsule_shape_2d.cpp
index 596fa70f15..0818e4fd99 100644
--- a/scene/resources/capsule_shape_2d.cpp
+++ b/scene/resources/capsule_shape_2d.cpp
@@ -59,7 +59,10 @@ void CapsuleShape2D::_update_shape() {
}
void CapsuleShape2D::set_radius(real_t p_radius) {
- radius = MIN(p_radius, height * 0.5);
+ radius = p_radius;
+ if (radius > height * 0.5) {
+ height = radius * 2.0;
+ }
_update_shape();
}
@@ -68,7 +71,10 @@ real_t CapsuleShape2D::get_radius() const {
}
void CapsuleShape2D::set_height(real_t p_height) {
- height = MAX(p_height, radius * 2);
+ height = p_height;
+ if (radius > height * 0.5) {
+ radius = height * 0.5;
+ }
_update_shape();
}
@@ -105,6 +111,8 @@ void CapsuleShape2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius"), "set_radius", "get_radius");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height"), "set_height", "get_height");
+ ADD_LINKED_PROPERTY("radius", "height");
+ ADD_LINKED_PROPERTY("height", "radius");
}
CapsuleShape2D::CapsuleShape2D() :
diff --git a/scene/resources/capsule_shape_3d.cpp b/scene/resources/capsule_shape_3d.cpp
index e267941d6a..afec7b1877 100644
--- a/scene/resources/capsule_shape_3d.cpp
+++ b/scene/resources/capsule_shape_3d.cpp
@@ -81,7 +81,7 @@ void CapsuleShape3D::_update_shape() {
void CapsuleShape3D::set_radius(float p_radius) {
radius = p_radius;
if (radius > height * 0.5) {
- radius = height * 0.5;
+ height = radius * 2.0;
}
_update_shape();
notify_change_to_owners();
@@ -94,7 +94,7 @@ float CapsuleShape3D::get_radius() const {
void CapsuleShape3D::set_height(float p_height) {
height = p_height;
if (radius > height * 0.5) {
- height = radius * 2;
+ radius = height * 0.5;
}
_update_shape();
notify_change_to_owners();
@@ -112,6 +112,8 @@ void CapsuleShape3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0.001,4096,0.001"), "set_radius", "get_radius");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "height", PROPERTY_HINT_RANGE, "0.001,4096,0.001"), "set_height", "get_height");
+ ADD_LINKED_PROPERTY("radius", "height");
+ ADD_LINKED_PROPERTY("height", "radius");
}
CapsuleShape3D::CapsuleShape3D() :
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index 3b666640f8..a364a27e80 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -662,19 +662,27 @@ void Curve2D::_bake() const {
if (points.size() == 0) {
baked_point_cache.resize(0);
+ baked_dist_cache.resize(0);
return;
}
if (points.size() == 1) {
baked_point_cache.resize(1);
baked_point_cache.set(0, points[0].pos);
+
+ baked_dist_cache.resize(1);
+ baked_dist_cache.set(0, 0.0);
return;
}
Vector2 pos = points[0].pos;
+ float dist = 0.0;
+
List<Vector2> pointlist;
+ List<float> distlist;
pointlist.push_back(pos); //start always from origin
+ distlist.push_back(0.0);
for (int i = 0; i < points.size() - 1; i++) {
float step = 0.1; // at least 10 substeps ought to be enough?
@@ -712,7 +720,10 @@ void Curve2D::_bake() const {
pos = npp;
p = mid;
+ dist += d;
+
pointlist.push_back(pos);
+ distlist.push_back(dist);
} else {
p = np;
}
@@ -722,16 +733,20 @@ void Curve2D::_bake() const {
Vector2 lastpos = points[points.size() - 1].pos;
float rem = pos.distance_to(lastpos);
- baked_max_ofs = (pointlist.size() - 1) * bake_interval + rem;
+ dist += rem;
+ baked_max_ofs = dist;
pointlist.push_back(lastpos);
+ distlist.push_back(dist);
baked_point_cache.resize(pointlist.size());
+ baked_dist_cache.resize(distlist.size());
+
Vector2 *w = baked_point_cache.ptrw();
- int idx = 0;
+ float *wd = baked_dist_cache.ptrw();
- for (const Vector2 &E : pointlist) {
- w[idx] = E;
- idx++;
+ for (int i = 0; i < pointlist.size(); i++) {
+ w[i] = pointlist[i];
+ wd[i] = distlist[i];
}
}
@@ -766,19 +781,26 @@ Vector2 Curve2D::interpolate_baked(float p_offset, bool p_cubic) const {
return r[bpc - 1];
}
- int idx = Math::floor((double)p_offset / (double)bake_interval);
- float frac = Math::fmod(p_offset, (float)bake_interval);
-
- if (idx >= bpc - 1) {
- return r[bpc - 1];
- } else if (idx == bpc - 2) {
- if (frac > 0) {
- frac /= Math::fmod(baked_max_ofs, bake_interval);
+ int start = 0, end = bpc, idx = (end + start) / 2;
+ // binary search to find baked points
+ while (start < idx) {
+ float offset = baked_dist_cache[idx];
+ if (p_offset <= offset) {
+ end = idx;
+ } else {
+ start = idx;
}
- } else {
- frac /= bake_interval;
+ idx = (end + start) / 2;
}
+ float offset_begin = baked_dist_cache[idx];
+ float offset_end = baked_dist_cache[idx + 1];
+
+ float idx_interval = offset_end - offset_begin;
+ ERR_FAIL_COND_V_MSG(p_offset < offset_begin || p_offset > offset_end, Vector2(), "failed to find baked segment");
+
+ float frac = (p_offset - offset_begin) / idx_interval;
+
if (p_cubic) {
Vector2 pre = idx > 0 ? r[idx - 1] : r[idx];
Vector2 post = (idx < (bpc - 2)) ? r[idx + 2] : r[idx + 1];
@@ -1145,6 +1167,7 @@ void Curve3D::_bake() const {
baked_point_cache.resize(0);
baked_tilt_cache.resize(0);
baked_up_vector_cache.resize(0);
+ baked_dist_cache.resize(0);
return;
}
@@ -1153,6 +1176,8 @@ void Curve3D::_bake() const {
baked_point_cache.set(0, points[0].pos);
baked_tilt_cache.resize(1);
baked_tilt_cache.set(0, points[0].tilt);
+ baked_dist_cache.resize(1);
+ baked_dist_cache.set(0, 0.0);
if (up_vector_enabled) {
baked_up_vector_cache.resize(1);
@@ -1165,8 +1190,12 @@ void Curve3D::_bake() const {
}
Vector3 pos = points[0].pos;
+ float dist = 0.0;
List<Plane> pointlist;
+ List<float> distlist;
+
pointlist.push_back(Plane(pos, points[0].tilt));
+ distlist.push_back(0.0);
for (int i = 0; i < points.size() - 1; i++) {
float step = 0.1; // at least 10 substeps ought to be enough?
@@ -1207,7 +1236,10 @@ void Curve3D::_bake() const {
Plane post;
post.normal = pos;
post.d = Math::lerp(points[i].tilt, points[i + 1].tilt, mid);
+ dist += d;
+
pointlist.push_back(post);
+ distlist.push_back(dist);
} else {
p = np;
}
@@ -1218,8 +1250,10 @@ void Curve3D::_bake() const {
float lastilt = points[points.size() - 1].tilt;
float rem = pos.distance_to(lastpos);
- baked_max_ofs = (pointlist.size() - 1) * bake_interval + rem;
+ dist += rem;
+ baked_max_ofs = dist;
pointlist.push_back(Plane(lastpos, lastilt));
+ distlist.push_back(dist);
baked_point_cache.resize(pointlist.size());
Vector3 *w = baked_point_cache.ptrw();
@@ -1231,6 +1265,9 @@ void Curve3D::_bake() const {
baked_up_vector_cache.resize(up_vector_enabled ? pointlist.size() : 0);
Vector3 *up_write = baked_up_vector_cache.ptrw();
+ baked_dist_cache.resize(pointlist.size());
+ float *wd = baked_dist_cache.ptrw();
+
Vector3 sideways;
Vector3 up;
Vector3 forward;
@@ -1242,6 +1279,7 @@ void Curve3D::_bake() const {
for (const Plane &E : pointlist) {
w[idx] = E.normal;
wt[idx] = E.d;
+ wd[idx] = distlist[idx];
if (!up_vector_enabled) {
idx++;
@@ -1308,19 +1346,26 @@ Vector3 Curve3D::interpolate_baked(float p_offset, bool p_cubic) const {
return r[bpc - 1];
}
- int idx = Math::floor((double)p_offset / (double)bake_interval);
- float frac = Math::fmod(p_offset, bake_interval);
-
- if (idx >= bpc - 1) {
- return r[bpc - 1];
- } else if (idx == bpc - 2) {
- if (frac > 0) {
- frac /= Math::fmod(baked_max_ofs, bake_interval);
+ int start = 0, end = bpc, idx = (end + start) / 2;
+ // binary search to find baked points
+ while (start < idx) {
+ float offset = baked_dist_cache[idx];
+ if (p_offset <= offset) {
+ end = idx;
+ } else {
+ start = idx;
}
- } else {
- frac /= bake_interval;
+ idx = (end + start) / 2;
}
+ float offset_begin = baked_dist_cache[idx];
+ float offset_end = baked_dist_cache[idx + 1];
+
+ float idx_interval = offset_end - offset_begin;
+ ERR_FAIL_COND_V_MSG(p_offset < offset_begin || p_offset > offset_end, Vector3(), "failed to find baked segment");
+
+ float frac = (p_offset - offset_begin) / idx_interval;
+
if (p_cubic) {
Vector3 pre = idx > 0 ? r[idx - 1] : r[idx];
Vector3 post = (idx < (bpc - 2)) ? r[idx + 2] : r[idx + 1];
diff --git a/scene/resources/curve.h b/scene/resources/curve.h
index c25d307608..5808fd6508 100644
--- a/scene/resources/curve.h
+++ b/scene/resources/curve.h
@@ -161,6 +161,7 @@ class Curve2D : public Resource {
mutable bool baked_cache_dirty = false;
mutable PackedVector2Array baked_point_cache;
+ mutable PackedFloat32Array baked_dist_cache;
mutable float baked_max_ofs = 0.0;
void _bake() const;
@@ -224,6 +225,7 @@ class Curve3D : public Resource {
mutable PackedVector3Array baked_point_cache;
mutable Vector<real_t> baked_tilt_cache;
mutable PackedVector3Array baked_up_vector_cache;
+ mutable PackedFloat32Array baked_dist_cache;
mutable float baked_max_ofs = 0.0;
void _bake() const;
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 8208c55801..492e0512e4 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -51,7 +51,7 @@ static Ref<StyleBoxTexture> make_stylebox(T p_src, float p_left, float p_top, fl
} else {
texture = Ref<ImageTexture>(memnew(ImageTexture));
Ref<Image> img = memnew(Image(p_src));
- const Size2 orig_size = Size2(img->get_width(), img->get_height());
+ const Size2 orig_size = img->get_size();
img->convert(Image::FORMAT_RGBA8);
img->resize(orig_size.x * scale, orig_size.y * scale);
@@ -97,7 +97,7 @@ template <class T>
static Ref<Texture2D> make_icon(T p_src) {
Ref<ImageTexture> texture(memnew(ImageTexture));
Ref<Image> img = memnew(Image(p_src));
- const Size2 orig_size = Size2(img->get_width(), img->get_height());
+ const Size2 orig_size = img->get_size();
img->convert(Image::FORMAT_RGBA8);
img->resize(orig_size.x * scale, orig_size.y * scale);
texture->create_from_image(img);
@@ -212,26 +212,6 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("outline_size", "LinkButton", 0);
theme->set_constant("underline_spacing", "LinkButton", 2 * scale);
- // ColorPickerButton
-
- theme->set_stylebox("normal", "ColorPickerButton", sb_button_normal);
- theme->set_stylebox("pressed", "ColorPickerButton", sb_button_pressed);
- theme->set_stylebox("hover", "ColorPickerButton", sb_button_hover);
- theme->set_stylebox("disabled", "ColorPickerButton", sb_button_disabled);
- theme->set_stylebox("focus", "ColorPickerButton", sb_button_focus);
-
- theme->set_font("font", "ColorPickerButton", Ref<Font>());
- theme->set_font_size("font_size", "ColorPickerButton", -1);
-
- theme->set_color("font_color", "ColorPickerButton", Color(1, 1, 1, 1));
- theme->set_color("font_pressed_color", "ColorPickerButton", Color(0.8, 0.8, 0.8, 1));
- theme->set_color("font_hover_color", "ColorPickerButton", Color(1, 1, 1, 1));
- theme->set_color("font_disabled_color", "ColorPickerButton", Color(0.9, 0.9, 0.9, 0.3));
- theme->set_color("font_outline_color", "ColorPickerButton", Color(1, 1, 1));
-
- theme->set_constant("hseparation", "ColorPickerButton", 2 * scale);
- theme->set_constant("outline_size", "ColorPickerButton", 0);
-
// OptionButton
Ref<StyleBox> sb_optbutton_focus = sb_expand(make_stylebox(button_focus_png, 4, 4, 4, 4, 6, 2, 6, 2), 2, 2, 2, 2);
@@ -458,6 +438,8 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("caret_color", "TextEdit", control_font_color);
theme->set_color("caret_background_color", "TextEdit", Color(0, 0, 0));
theme->set_color("word_highlighted_color", "TextEdit", Color(0.8, 0.9, 0.9, 0.15));
+ theme->set_color("search_result_color", "TextEdit", Color(0.3, 0.3, 0.3));
+ theme->set_color("search_result_border_color", "TextEdit", Color(0.3, 0.3, 0.3, 0.4));
theme->set_constant("line_spacing", "TextEdit", 4 * scale);
theme->set_constant("outline_size", "TextEdit", 0);
@@ -503,6 +485,8 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("line_number_color", "CodeEdit", Color(0.67, 0.67, 0.67, 0.4));
theme->set_color("word_highlighted_color", "CodeEdit", Color(0.8, 0.9, 0.9, 0.15));
theme->set_color("line_length_guideline_color", "CodeEdit", Color(0.3, 0.5, 0.8, 0.1));
+ theme->set_color("search_result_color", "CodeEdit", Color(0.3, 0.3, 0.3));
+ theme->set_color("search_result_border_color", "CodeEdit", Color(0.3, 0.3, 0.3, 0.4));
theme->set_constant("completion_lines", "CodeEdit", 7);
theme->set_constant("completion_max_width", "CodeEdit", 50);
@@ -522,8 +506,10 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_icon("increment", "HScrollBar", empty_icon);
theme->set_icon("increment_highlight", "HScrollBar", empty_icon);
+ theme->set_icon("increment_pressed", "HScrollBar", empty_icon);
theme->set_icon("decrement", "HScrollBar", empty_icon);
theme->set_icon("decrement_highlight", "HScrollBar", empty_icon);
+ theme->set_icon("decrement_pressed", "HScrollBar", empty_icon);
// VScrollBar
@@ -535,8 +521,10 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_icon("increment", "VScrollBar", empty_icon);
theme->set_icon("increment_highlight", "VScrollBar", empty_icon);
+ theme->set_icon("increment_pressed", "VScrollBar", empty_icon);
theme->set_icon("decrement", "VScrollBar", empty_icon);
theme->set_icon("decrement_highlight", "VScrollBar", empty_icon);
+ theme->set_icon("decrement_pressed", "VScrollBar", empty_icon);
// HSlider
@@ -704,6 +692,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_icon("checked", "Tree", make_icon(checked_png));
theme->set_icon("unchecked", "Tree", make_icon(unchecked_png));
+ theme->set_icon("indeterminate", "Tree", make_icon(indeterminate_png));
theme->set_icon("updown", "Tree", make_icon(updown_png));
theme->set_icon("select_arrow", "Tree", make_icon(dropdown_png));
theme->set_icon("arrow", "Tree", make_icon(arrow_down_png));
@@ -858,7 +847,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_icon("add_preset", "ColorPicker", make_icon(icon_add_png));
theme->set_icon("color_hue", "ColorPicker", make_icon(color_picker_hue_png));
theme->set_icon("color_sample", "ColorPicker", make_icon(color_picker_sample_png));
- theme->set_icon("preset_bg", "ColorPicker", make_icon(mini_checkerboard_png));
+ theme->set_icon("sample_bg", "ColorPicker", make_icon(mini_checkerboard_png));
theme->set_icon("overbright_indicator", "ColorPicker", make_icon(overbright_indicator_png));
theme->set_icon("bar_arrow", "ColorPicker", make_icon(bar_arrow_png));
theme->set_icon("picker_cursor", "ColorPicker", make_icon(picker_cursor_png));
@@ -866,6 +855,34 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// ColorPickerButton
theme->set_icon("bg", "ColorPickerButton", make_icon(mini_checkerboard_png));
+ theme->set_stylebox("normal", "ColorPickerButton", sb_button_normal);
+ theme->set_stylebox("pressed", "ColorPickerButton", sb_button_pressed);
+ theme->set_stylebox("hover", "ColorPickerButton", sb_button_hover);
+ theme->set_stylebox("disabled", "ColorPickerButton", sb_button_disabled);
+ theme->set_stylebox("focus", "ColorPickerButton", sb_button_focus);
+
+ theme->set_font("font", "ColorPickerButton", Ref<Font>());
+ theme->set_font_size("font_size", "ColorPickerButton", -1);
+
+ theme->set_color("font_color", "ColorPickerButton", Color(1, 1, 1, 1));
+ theme->set_color("font_pressed_color", "ColorPickerButton", Color(0.8, 0.8, 0.8, 1));
+ theme->set_color("font_hover_color", "ColorPickerButton", Color(1, 1, 1, 1));
+ theme->set_color("font_disabled_color", "ColorPickerButton", Color(0.9, 0.9, 0.9, 0.3));
+ theme->set_color("font_outline_color", "ColorPickerButton", Color(1, 1, 1));
+
+ theme->set_constant("hseparation", "ColorPickerButton", 2 * scale);
+ theme->set_constant("outline_size", "ColorPickerButton", 0);
+
+ // ColorPresetButton
+
+ Ref<StyleBoxFlat> preset_sb = make_flat_stylebox(Color(1, 1, 1), 2, 2, 2, 2);
+ preset_sb->set_corner_radius_all(2);
+ preset_sb->set_corner_detail(2);
+ preset_sb->set_anti_aliased(false);
+
+ theme->set_stylebox("preset_fg", "ColorPresetButton", preset_sb);
+ theme->set_icon("preset_bg", "ColorPresetButton", make_icon(mini_checkerboard_png));
+ theme->set_icon("overbright_indicator", "ColorPresetButton", make_icon(overbright_indicator_png));
// TooltipPanel
@@ -916,7 +933,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("shadow_offset_y", "RichTextLabel", 1 * scale);
theme->set_constant("shadow_as_outline", "RichTextLabel", 0 * scale);
- theme->set_constant("line_separation", "RichTextLabel", 1 * scale);
+ theme->set_constant("line_separation", "RichTextLabel", 0 * scale);
theme->set_constant("table_hseparation", "RichTextLabel", 3 * scale);
theme->set_constant("table_vseparation", "RichTextLabel", 3 * scale);
@@ -1011,8 +1028,9 @@ void make_default_theme(bool p_hidpi, Ref<Font> p_font) {
Ref<FontData> dynamic_font_data;
dynamic_font_data.instantiate();
- dynamic_font_data->load_memory(_font_OpenSans_SemiBold, _font_OpenSans_SemiBold_size, "ttf", default_font_size);
+ dynamic_font_data->set_data_ptr(_font_OpenSans_SemiBold, _font_OpenSans_SemiBold_size);
dynamic_font->add_data(dynamic_font_data);
+ dynamic_font->set_base_size(default_font_size);
default_font = dynamic_font;
}
diff --git a/scene/resources/default_theme/indeterminate.png b/scene/resources/default_theme/indeterminate.png
new file mode 100644
index 0000000000..28a457b251
--- /dev/null
+++ b/scene/resources/default_theme/indeterminate.png
Binary files differ
diff --git a/scene/resources/default_theme/theme_data.h b/scene/resources/default_theme/theme_data.h
index 4a53926066..6a556c1112 100644
--- a/scene/resources/default_theme/theme_data.h
+++ b/scene/resources/default_theme/theme_data.h
@@ -214,6 +214,14 @@ static const unsigned char icon_zoom_reset_png[] = {
0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x4, 0x0, 0x0, 0x0, 0xb5, 0xfa, 0x37, 0xea, 0x0, 0x0, 0x0, 0x33, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x20, 0xa, 0x3c, 0xc, 0x7b, 0xf0, 0xff, 0xc1, 0x7f, 0x9c, 0x22, 0xcf, 0x44, 0x1e, 0xbc, 0x84, 0x72, 0xb1, 0x8b, 0x3c, 0x58, 0x5, 0xe4, 0x40, 0xb8, 0x38, 0x45, 0x18, 0x60, 0x5c, 0x84, 0x30, 0x59, 0xa, 0xa0, 0x80, 0x6e, 0xa, 0x86, 0x92, 0x2f, 0x8, 0x3, 0x0, 0x69, 0xc8, 0x86, 0x87, 0x72, 0xca, 0x85, 0x23, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
+static const unsigned char indeterminate_png[] = {
+ 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x36, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x4d, 0x4b, 0x59, 0x38, 0x37, 0x40, 0x20, 0x20, 0x24, 0x20, 0x20, 0x24, 0x38, 0x36, 0x40, 0x20, 0x20, 0x25, 0x1e, 0x1e, 0x22, 0x1f, 0x1f, 0x23, 0x20, 0x20, 0x24, 0x22, 0x22, 0x27, 0x23, 0x23, 0x28, 0x25, 0x25, 0x2a, 0xfe, 0xfe, 0xfe, 0x98, 0x4d, 0x2d, 0x9a, 0x0, 0x0, 0x0, 0x12, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x7, 0x27, 0x50, 0x66, 0x68, 0xb4, 0xfa, 0xfb, 0xb4, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x77, 0x5e, 0x7f, 0x0, 0x0, 0x0, 0x59, 0x49, 0x44, 0x41, 0x54, 0x18, 0x95, 0x85, 0xcf, 0xc1, 0x12, 0x80, 0x20, 0x8, 0x45, 0xd1, 0x4, 0x14, 0xd, 0xc5, 0xfa, 0xff, 0x9f, 0x8d, 0x9c, 0x6c, 0x9a, 0xb4, 0xe9, 0x2e, 0xcf, 0x42, 0x9e, 0xcb, 0x32, 0xe4, 0x0, 0xc9, 0xb7, 0x8, 0xc1, 0x19, 0x40, 0x60, 0xc9, 0x2d, 0xe1, 0x0, 0x6, 0xc8, 0x45, 0x6b, 0x4b, 0xb, 0xa3, 0x1, 0x89, 0x6e, 0x57, 0x2a, 0x64, 0xe0, 0x73, 0xed, 0x50, 0xb3, 0x9f, 0xc3, 0x7e, 0xf7, 0x5, 0x7f, 0x6f, 0xc, 0x67, 0x9f, 0xc3, 0xe2, 0x39, 0xc, 0x52, 0xec, 0xd3, 0xd7, 0x4, 0xb3, 0xcf, 0xbd, 0x3a, 0x0, 0xa0, 0xa2, 0x8, 0xbc, 0xf6, 0x84, 0x3a, 0x9d, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
+static const unsigned char indeterminate_disabled_png[] = {
+ 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x3c, 0x50, 0x4c, 0x54, 0x45, 0x0, 0x0, 0x0, 0x7a, 0x78, 0x83, 0x7a, 0x78, 0x83, 0x7a, 0x78, 0x83, 0x7a, 0x78, 0x83, 0x7a, 0x78, 0x83, 0x6a, 0x69, 0x70, 0x6a, 0x68, 0x70, 0x58, 0x58, 0x5c, 0x58, 0x58, 0x5b, 0x58, 0x58, 0x5b, 0x5c, 0x5c, 0x5f, 0x5a, 0x5a, 0x5e, 0x59, 0x59, 0x5d, 0x58, 0x58, 0x5b, 0x57, 0x57, 0x5a, 0x56, 0x56, 0x59, 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0x9e, 0x9e, 0x9e, 0x8c, 0x93, 0x80, 0x95, 0x0, 0x0, 0x0, 0x14, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x7, 0x27, 0x50, 0x66, 0x68, 0xb4, 0xb4, 0xfa, 0xfa, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6c, 0xb9, 0x8d, 0x1e, 0x0, 0x0, 0x0, 0x59, 0x49, 0x44, 0x41, 0x54, 0x18, 0x95, 0x85, 0xcf, 0xd1, 0xe, 0x80, 0x20, 0x8, 0x85, 0xe1, 0x4, 0xd4, 0x30, 0x51, 0xb6, 0xde, 0xff, 0x5d, 0x23, 0x97, 0xad, 0xa5, 0xad, 0xff, 0xf2, 0xbb, 0x90, 0xe3, 0xb2, 0xc, 0x39, 0x40, 0xf2, 0x2d, 0x42, 0x70, 0x6, 0x10, 0x58, 0x6b, 0x4b, 0x39, 0x80, 0x1, 0x72, 0x91, 0xdc, 0x92, 0xc2, 0x68, 0x40, 0x2a, 0xdb, 0x95, 0x28, 0x19, 0xf8, 0x9a, 0x3b, 0xe4, 0xea, 0xe7, 0xb0, 0xdf, 0x7d, 0xc1, 0xdf, 0x1b, 0xc3, 0xd9, 0xe7, 0xb0, 0x74, 0xe, 0x83, 0x98, 0xfa, 0xf4, 0x35, 0xc2, 0xec, 0x73, 0xaf, 0xe, 0x57, 0x20, 0x8, 0x2c, 0x1a, 0x56, 0xe5, 0x32, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
static const unsigned char line_edit_png[] = {
0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0xa, 0x4, 0x3, 0x0, 0x0, 0x0, 0x7f, 0x1c, 0xd2, 0x8e, 0x0, 0x0, 0x0, 0x2a, 0x50, 0x4c, 0x54, 0x45, 0x17, 0x16, 0x1a, 0x1d, 0x1c, 0x21, 0x20, 0x1e, 0x24, 0x21, 0x1f, 0x25, 0x1d, 0x1c, 0x21, 0x20, 0x1e, 0x24, 0x1d, 0x1c, 0x21, 0x1d, 0x1c, 0x21, 0x24, 0x22, 0x29, 0x28, 0x26, 0x2d, 0x28, 0x26, 0x2e, 0x2b, 0x2a, 0x31, 0x2c, 0x2a, 0x32, 0xff, 0xff, 0xff, 0xb9, 0x11, 0x56, 0x3e, 0x0, 0x0, 0x0, 0x8, 0x74, 0x52, 0x4e, 0x53, 0x6f, 0xef, 0xf7, 0xf7, 0xf0, 0xf9, 0xf1, 0xee, 0xcf, 0x21, 0xd2, 0xdf, 0x0, 0x0, 0x0, 0x2d, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0x54, 0x36, 0x36, 0x12, 0x60, 0xf0, 0x98, 0xb5, 0x6a, 0x65, 0xb, 0x43, 0xe4, 0x9e, 0x33, 0xa7, 0xa7, 0x32, 0x58, 0x9d, 0x39, 0x73, 0x66, 0x31, 0x16, 0x12, 0x22, 0xb, 0x52, 0xd9, 0xc6, 0xc0, 0x2, 0xd4, 0x55, 0x0, 0x0, 0xc, 0x14, 0x1a, 0x90, 0x55, 0x1a, 0xec, 0xdb, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index 032171847d..9b403a18f0 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -36,54 +36,129 @@
#include "scene/resources/text_line.h"
#include "scene/resources/text_paragraph.h"
-void FontData::_bind_methods() {
- ClassDB::bind_method(D_METHOD("load_resource", "filename", "base_size"), &FontData::load_resource, DEFVAL(16));
- ClassDB::bind_method(D_METHOD("load_memory", "data", "type", "base_size"), &FontData::_load_memory, DEFVAL(16));
- ClassDB::bind_method(D_METHOD("new_bitmap", "height", "ascent", "base_size"), &FontData::new_bitmap);
-
- ClassDB::bind_method(D_METHOD("bitmap_add_texture", "texture"), &FontData::bitmap_add_texture);
- ClassDB::bind_method(D_METHOD("bitmap_add_char", "char", "texture_idx", "rect", "align", "advance"), &FontData::bitmap_add_char);
- ClassDB::bind_method(D_METHOD("bitmap_add_kerning_pair", "A", "B", "kerning"), &FontData::bitmap_add_kerning_pair);
+_FORCE_INLINE_ void FontData::_clear_cache() {
+ for (int i = 0; i < cache.size(); i++) {
+ if (cache[i].is_valid()) {
+ TS->free(cache[i]);
+ cache.write[i] = RID();
+ }
+ }
+}
- ClassDB::bind_method(D_METHOD("set_data_path", "path"), &FontData::set_data_path);
- ClassDB::bind_method(D_METHOD("get_data_path"), &FontData::get_data_path);
+_FORCE_INLINE_ void FontData::_ensure_rid(int p_cache_index) const {
+ if (unlikely(p_cache_index >= cache.size())) {
+ cache.resize(p_cache_index + 1);
+ }
+ if (unlikely(!cache[p_cache_index].is_valid())) {
+ cache.write[p_cache_index] = TS->create_font();
+ TS->font_set_data_ptr(cache[p_cache_index], data_ptr, data_size);
+ TS->font_set_antialiased(cache[p_cache_index], antialiased);
+ TS->font_set_multichannel_signed_distance_field(cache[p_cache_index], msdf);
+ TS->font_set_msdf_pixel_range(cache[p_cache_index], msdf_pixel_range);
+ TS->font_set_msdf_size(cache[p_cache_index], msdf_size);
+ TS->font_set_fixed_size(cache[p_cache_index], fixed_size);
+ TS->font_set_force_autohinter(cache[p_cache_index], force_autohinter);
+ TS->font_set_hinting(cache[p_cache_index], hinting);
+ TS->font_set_oversampling(cache[p_cache_index], oversampling);
+ }
+}
- ClassDB::bind_method(D_METHOD("get_height", "size"), &FontData::get_height);
- ClassDB::bind_method(D_METHOD("get_ascent", "size"), &FontData::get_ascent);
- ClassDB::bind_method(D_METHOD("get_descent", "size"), &FontData::get_descent);
+void FontData::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_data", "data"), &FontData::set_data);
+ ClassDB::bind_method(D_METHOD("get_data"), &FontData::get_data);
- ClassDB::bind_method(D_METHOD("get_underline_position", "size"), &FontData::get_underline_position);
- ClassDB::bind_method(D_METHOD("get_underline_thickness", "size"), &FontData::get_underline_thickness);
+ ClassDB::bind_method(D_METHOD("set_antialiased", "antialiased"), &FontData::set_antialiased);
+ ClassDB::bind_method(D_METHOD("is_antialiased"), &FontData::is_antialiased);
- ClassDB::bind_method(D_METHOD("get_spacing", "type"), &FontData::get_spacing);
- ClassDB::bind_method(D_METHOD("set_spacing", "type", "value"), &FontData::set_spacing);
+ ClassDB::bind_method(D_METHOD("set_multichannel_signed_distance_field", "msdf"), &FontData::set_multichannel_signed_distance_field);
+ ClassDB::bind_method(D_METHOD("is_multichannel_signed_distance_field"), &FontData::is_multichannel_signed_distance_field);
- ClassDB::bind_method(D_METHOD("set_antialiased", "antialiased"), &FontData::set_antialiased);
- ClassDB::bind_method(D_METHOD("get_antialiased"), &FontData::get_antialiased);
+ ClassDB::bind_method(D_METHOD("set_msdf_pixel_range", "msdf_pixel_range"), &FontData::set_msdf_pixel_range);
+ ClassDB::bind_method(D_METHOD("get_msdf_pixel_range"), &FontData::get_msdf_pixel_range);
- ClassDB::bind_method(D_METHOD("get_variation_list"), &FontData::get_variation_list);
+ ClassDB::bind_method(D_METHOD("set_msdf_size", "msdf_size"), &FontData::set_msdf_size);
+ ClassDB::bind_method(D_METHOD("get_msdf_size"), &FontData::get_msdf_size);
- ClassDB::bind_method(D_METHOD("set_variation", "tag", "value"), &FontData::set_variation);
- ClassDB::bind_method(D_METHOD("get_variation", "tag"), &FontData::get_variation);
+ ClassDB::bind_method(D_METHOD("set_force_autohinter", "force_autohinter"), &FontData::set_force_autohinter);
+ ClassDB::bind_method(D_METHOD("is_force_autohinter"), &FontData::is_force_autohinter);
ClassDB::bind_method(D_METHOD("set_hinting", "hinting"), &FontData::set_hinting);
ClassDB::bind_method(D_METHOD("get_hinting"), &FontData::get_hinting);
- ClassDB::bind_method(D_METHOD("set_force_autohinter", "enabled"), &FontData::set_force_autohinter);
- ClassDB::bind_method(D_METHOD("get_force_autohinter"), &FontData::get_force_autohinter);
+ ClassDB::bind_method(D_METHOD("set_oversampling", "oversampling"), &FontData::set_oversampling);
+ ClassDB::bind_method(D_METHOD("get_oversampling"), &FontData::get_oversampling);
- ClassDB::bind_method(D_METHOD("set_distance_field_hint", "distance_field"), &FontData::set_distance_field_hint);
- ClassDB::bind_method(D_METHOD("get_distance_field_hint"), &FontData::get_distance_field_hint);
+ ClassDB::bind_method(D_METHOD("find_cache", "variation_coordinates"), &FontData::find_cache);
- ClassDB::bind_method(D_METHOD("has_char", "char"), &FontData::has_char);
- ClassDB::bind_method(D_METHOD("get_supported_chars"), &FontData::get_supported_chars);
+ ClassDB::bind_method(D_METHOD("get_cache_count"), &FontData::get_cache_count);
+ ClassDB::bind_method(D_METHOD("clear_cache"), &FontData::clear_cache);
+ ClassDB::bind_method(D_METHOD("remove_cache", "cache_index"), &FontData::remove_cache);
+
+ ClassDB::bind_method(D_METHOD("get_size_cache_list", "cache_index"), &FontData::get_size_cache_list);
+ ClassDB::bind_method(D_METHOD("clear_size_cache", "cache_index"), &FontData::clear_size_cache);
+ ClassDB::bind_method(D_METHOD("remove_size_cache", "cache_index", "size"), &FontData::remove_size_cache);
+
+ ClassDB::bind_method(D_METHOD("set_variation_coordinates", "cache_index", "variation_coordinates"), &FontData::set_variation_coordinates);
+ ClassDB::bind_method(D_METHOD("get_variation_coordinates", "cache_index"), &FontData::get_variation_coordinates);
+
+ ClassDB::bind_method(D_METHOD("set_ascent", "cache_index", "size", "ascent"), &FontData::set_ascent);
+ ClassDB::bind_method(D_METHOD("get_ascent", "cache_index", "size"), &FontData::get_ascent);
+
+ ClassDB::bind_method(D_METHOD("set_descent", "cache_index", "size", "descent"), &FontData::set_descent);
+ ClassDB::bind_method(D_METHOD("get_descent", "cache_index", "size"), &FontData::get_descent);
+
+ ClassDB::bind_method(D_METHOD("set_underline_position", "cache_index", "size", "underline_position"), &FontData::set_underline_position);
+ ClassDB::bind_method(D_METHOD("get_underline_position", "cache_index", "size"), &FontData::get_underline_position);
+
+ ClassDB::bind_method(D_METHOD("set_underline_thickness", "cache_index", "size", "underline_thickness"), &FontData::set_underline_thickness);
+ ClassDB::bind_method(D_METHOD("get_underline_thickness", "cache_index", "size"), &FontData::get_underline_thickness);
+
+ ClassDB::bind_method(D_METHOD("set_scale", "cache_index", "size", "scale"), &FontData::set_scale);
+ ClassDB::bind_method(D_METHOD("get_scale", "cache_index", "size"), &FontData::get_scale);
+
+ ClassDB::bind_method(D_METHOD("set_spacing", "cache_index", "size", "spacing"), &FontData::set_spacing);
+ ClassDB::bind_method(D_METHOD("get_spacing", "cache_index", "size"), &FontData::get_spacing);
+
+ ClassDB::bind_method(D_METHOD("get_texture_count", "cache_index", "size"), &FontData::get_texture_count);
+ ClassDB::bind_method(D_METHOD("clear_textures", "cache_index", "size"), &FontData::clear_textures);
+ ClassDB::bind_method(D_METHOD("remove_texture", "cache_index", "size", "texture_index"), &FontData::remove_texture);
+
+ ClassDB::bind_method(D_METHOD("set_texture_image", "cache_index", "size", "texture_index", "image"), &FontData::set_texture_image);
+ ClassDB::bind_method(D_METHOD("get_texture_image", "cache_index", "size", "texture_index"), &FontData::get_texture_image);
+
+ ClassDB::bind_method(D_METHOD("set_texture_offsets", "cache_index", "size", "texture_index", "offset"), &FontData::set_texture_offsets);
+ ClassDB::bind_method(D_METHOD("get_texture_offsets", "cache_index", "size", "texture_index"), &FontData::get_texture_offsets);
+
+ ClassDB::bind_method(D_METHOD("get_glyph_list", "cache_index", "size"), &FontData::get_glyph_list);
+ ClassDB::bind_method(D_METHOD("clear_glyphs", "cache_index", "size"), &FontData::clear_glyphs);
+ ClassDB::bind_method(D_METHOD("remove_glyph", "cache_index", "size", "glyph"), &FontData::remove_glyph);
+
+ ClassDB::bind_method(D_METHOD("set_glyph_advance", "cache_index", "size", "glyph", "advance"), &FontData::set_glyph_advance);
+ ClassDB::bind_method(D_METHOD("get_glyph_advance", "cache_index", "size", "glyph"), &FontData::get_glyph_advance);
+
+ ClassDB::bind_method(D_METHOD("set_glyph_offset", "cache_index", "size", "glyph", "offset"), &FontData::set_glyph_offset);
+ ClassDB::bind_method(D_METHOD("get_glyph_offset", "cache_index", "size", "glyph"), &FontData::get_glyph_offset);
+
+ ClassDB::bind_method(D_METHOD("set_glyph_size", "cache_index", "size", "glyph", "gl_size"), &FontData::set_glyph_size);
+ ClassDB::bind_method(D_METHOD("get_glyph_size", "cache_index", "size", "glyph"), &FontData::get_glyph_size);
+
+ ClassDB::bind_method(D_METHOD("set_glyph_uv_rect", "cache_index", "size", "glyph", "uv_rect"), &FontData::set_glyph_uv_rect);
+ ClassDB::bind_method(D_METHOD("get_glyph_uv_rect", "cache_index", "size", "glyph"), &FontData::get_glyph_uv_rect);
- ClassDB::bind_method(D_METHOD("get_glyph_advance", "index", "size"), &FontData::get_glyph_advance);
- ClassDB::bind_method(D_METHOD("get_glyph_kerning", "index_a", "index_b", "size"), &FontData::get_glyph_kerning);
+ ClassDB::bind_method(D_METHOD("set_glyph_texture_idx", "cache_index", "size", "glyph", "texture_idx"), &FontData::set_glyph_texture_idx);
+ ClassDB::bind_method(D_METHOD("get_glyph_texture_idx", "cache_index", "size", "glyph"), &FontData::get_glyph_texture_idx);
- ClassDB::bind_method(D_METHOD("get_base_size"), &FontData::get_base_size);
+ ClassDB::bind_method(D_METHOD("get_kerning_list", "cache_index", "size"), &FontData::get_kerning_list);
+ ClassDB::bind_method(D_METHOD("clear_kerning_map", "cache_index", "size"), &FontData::clear_kerning_map);
+ ClassDB::bind_method(D_METHOD("remove_kerning", "cache_index", "size", "glyph_pair"), &FontData::remove_kerning);
- ClassDB::bind_method(D_METHOD("has_outline"), &FontData::has_outline);
+ ClassDB::bind_method(D_METHOD("set_kerning", "cache_index", "size", "glyph_pair", "kerning"), &FontData::set_kerning);
+ ClassDB::bind_method(D_METHOD("get_kerning", "cache_index", "size", "glyph_pair"), &FontData::get_kerning);
+
+ ClassDB::bind_method(D_METHOD("render_range", "cache_index", "size", "start", "end"), &FontData::render_range);
+ ClassDB::bind_method(D_METHOD("render_glyph", "cache_index", "size", "index"), &FontData::render_glyph);
+
+ ClassDB::bind_method(D_METHOD("get_cache_rid", "cache_index"), &FontData::get_cache_rid);
ClassDB::bind_method(D_METHOD("is_language_supported", "language"), &FontData::is_language_supported);
ClassDB::bind_method(D_METHOD("set_language_support_override", "language", "supported"), &FontData::set_language_support_override);
@@ -97,511 +172,958 @@ void FontData::_bind_methods() {
ClassDB::bind_method(D_METHOD("remove_script_support_override", "script"), &FontData::remove_script_support_override);
ClassDB::bind_method(D_METHOD("get_script_support_overrides"), &FontData::get_script_support_overrides);
- ClassDB::bind_method(D_METHOD("get_glyph_index", "char", "variation_selector"), &FontData::get_glyph_index, DEFVAL(0x0000));
- ClassDB::bind_method(D_METHOD("draw_glyph", "canvas", "size", "pos", "index", "color"), &FontData::draw_glyph, DEFVAL(Color(1, 1, 1)));
- ClassDB::bind_method(D_METHOD("draw_glyph_outline", "canvas", "size", "outline_size", "pos", "index", "color"), &FontData::draw_glyph_outline, DEFVAL(Color(1, 1, 1)));
-
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "data_path", PROPERTY_HINT_FILE, "*.ttf,*.otf,*.woff,*.fnt,*.font"), "set_data_path", "get_data_path");
-
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "antialiased"), "set_antialiased", "get_antialiased");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "force_autohinter"), "set_force_autohinter", "get_force_autohinter");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "distance_field_hint"), "set_distance_field_hint", "get_distance_field_hint");
-
- ADD_PROPERTY(PropertyInfo(Variant::INT, "hinting", PROPERTY_HINT_ENUM, "None,Light,Normal"), "set_hinting", "get_hinting");
+ ClassDB::bind_method(D_METHOD("has_char", "char"), &FontData::has_char);
+ ClassDB::bind_method(D_METHOD("get_supported_chars"), &FontData::get_supported_chars);
- ADD_GROUP("Extra Spacing", "extra_spacing");
- ADD_PROPERTYI(PropertyInfo(Variant::INT, "extra_spacing_glyph"), "set_spacing", "get_spacing", SPACING_GLYPH);
- ADD_PROPERTYI(PropertyInfo(Variant::INT, "extra_spacing_space"), "set_spacing", "get_spacing", SPACING_SPACE);
+ ClassDB::bind_method(D_METHOD("get_glyph_index", "char", "variation_selector"), &FontData::get_glyph_index);
- BIND_ENUM_CONSTANT(SPACING_GLYPH);
- BIND_ENUM_CONSTANT(SPACING_SPACE);
+ ClassDB::bind_method(D_METHOD("get_supported_feature_list"), &FontData::get_supported_feature_list);
+ ClassDB::bind_method(D_METHOD("get_supported_variation_list"), &FontData::get_supported_variation_list);
}
bool FontData::_set(const StringName &p_name, const Variant &p_value) {
- String str = p_name;
- if (str.begins_with("language_support_override/")) {
- String lang = str.get_slicec('/', 1);
- if (lang == "_new") {
- return false;
+ Vector<String> tokens = p_name.operator String().split("/");
+ if (tokens.size() == 1) {
+ if (tokens[0] == "data") {
+ set_data(p_value);
+ return true;
+ } else if (tokens[0] == "antialiased") {
+ set_antialiased(p_value);
+ return true;
+ } else if (tokens[0] == "multichannel_signed_distance_field") {
+ set_multichannel_signed_distance_field(p_value);
+ return true;
+ } else if (tokens[0] == "msdf_pixel_range") {
+ set_msdf_pixel_range(p_value);
+ return true;
+ } else if (tokens[0] == "msdf_size") {
+ set_msdf_size(p_value);
+ return true;
+ } else if (tokens[0] == "fixed_size") {
+ set_fixed_size(p_value);
+ return true;
+ } else if (tokens[0] == "hinting") {
+ set_hinting((TextServer::Hinting)p_value.operator int());
+ return true;
+ } else if (tokens[0] == "force_autohinter") {
+ set_force_autohinter(p_value);
+ return true;
+ } else if (tokens[0] == "oversampling") {
+ set_oversampling(p_value);
+ return true;
}
+ } else if (tokens.size() == 2 && tokens[0] == "language_support_override") {
+ String lang = tokens[1];
set_language_support_override(lang, p_value);
return true;
- }
- if (str.begins_with("script_support_override/")) {
- String scr = str.get_slicec('/', 1);
- if (scr == "_new") {
- return false;
- }
- set_script_support_override(scr, p_value);
- return true;
- }
- if (str.begins_with("variation/")) {
- String name = str.get_slicec('/', 1);
- set_variation(name, p_value);
+ } else if (tokens.size() == 2 && tokens[0] == "script_support_override") {
+ String script = tokens[1];
+ set_script_support_override(script, p_value);
return true;
+ } else if (tokens.size() >= 3 && tokens[0] == "cache") {
+ int cache_index = tokens[1].to_int();
+ if (tokens.size() == 3 && tokens[2] == "variation_coordinates") {
+ set_variation_coordinates(cache_index, p_value);
+ return true;
+ }
+ if (tokens.size() >= 5) {
+ Vector2i sz = Vector2i(tokens[2].to_int(), tokens[3].to_int());
+ if (tokens[4] == "ascent") {
+ set_ascent(cache_index, sz.x, p_value);
+ return true;
+ } else if (tokens[4] == "descent") {
+ set_descent(cache_index, sz.x, p_value);
+ return true;
+ } else if (tokens[4] == "underline_position") {
+ set_underline_position(cache_index, sz.x, p_value);
+ return true;
+ } else if (tokens[4] == "underline_thickness") {
+ set_underline_thickness(cache_index, sz.x, p_value);
+ return true;
+ } else if (tokens[4] == "scale") {
+ set_scale(cache_index, sz.x, p_value);
+ return true;
+ } else if (tokens[4] == "spacing_glyph") {
+ set_spacing(cache_index, sz.x, TextServer::SPACING_GLYPH, p_value);
+ return true;
+ } else if (tokens[4] == "spacing_space") {
+ set_spacing(cache_index, sz.x, TextServer::SPACING_SPACE, p_value);
+ return true;
+ } else if (tokens.size() == 7 && tokens[4] == "textures") {
+ int texture_index = tokens[5].to_int();
+ if (tokens[6] == "image") {
+ set_texture_image(cache_index, sz, texture_index, p_value);
+ return true;
+ } else if (tokens[6] == "offsets") {
+ set_texture_offsets(cache_index, sz, texture_index, p_value);
+ return true;
+ }
+ } else if (tokens.size() == 7 && tokens[4] == "glyphs") {
+ int32_t glyph_index = tokens[5].to_int();
+ if (tokens[6] == "advance") {
+ set_glyph_advance(cache_index, sz.x, glyph_index, p_value);
+ return true;
+ } else if (tokens[6] == "offset") {
+ set_glyph_offset(cache_index, sz, glyph_index, p_value);
+ return true;
+ } else if (tokens[6] == "size") {
+ set_glyph_size(cache_index, sz, glyph_index, p_value);
+ return true;
+ } else if (tokens[6] == "uv_rect") {
+ set_glyph_uv_rect(cache_index, sz, glyph_index, p_value);
+ return true;
+ } else if (tokens[6] == "texture_idx") {
+ set_glyph_texture_idx(cache_index, sz, glyph_index, p_value);
+ return true;
+ }
+ } else if (tokens.size() == 7 && tokens[4] == "kerning_overrides") {
+ Vector2i gp = Vector2i(tokens[5].to_int(), tokens[6].to_int());
+ set_kerning(cache_index, sz.x, gp, p_value);
+ return true;
+ }
+ }
}
-
return false;
}
bool FontData::_get(const StringName &p_name, Variant &r_ret) const {
- String str = p_name;
- if (str.begins_with("language_support_override/")) {
- String lang = str.get_slicec('/', 1);
- if (lang == "_new") {
+ Vector<String> tokens = p_name.operator String().split("/");
+ if (tokens.size() == 1) {
+ if (tokens[0] == "data") {
+ r_ret = get_data();
+ return true;
+ } else if (tokens[0] == "antialiased") {
+ r_ret = is_antialiased();
+ return true;
+ } else if (tokens[0] == "multichannel_signed_distance_field") {
+ r_ret = is_multichannel_signed_distance_field();
+ return true;
+ } else if (tokens[0] == "msdf_pixel_range") {
+ r_ret = get_msdf_pixel_range();
+ return true;
+ } else if (tokens[0] == "msdf_size") {
+ r_ret = get_msdf_size();
+ return true;
+ } else if (tokens[0] == "fixed_size") {
+ r_ret = get_fixed_size();
+ return true;
+ } else if (tokens[0] == "hinting") {
+ r_ret = get_hinting();
+ return true;
+ } else if (tokens[0] == "force_autohinter") {
+ r_ret = is_force_autohinter();
+ return true;
+ } else if (tokens[0] == "oversampling") {
+ r_ret = get_oversampling();
return true;
}
+ } else if (tokens.size() == 2 && tokens[0] == "language_support_override") {
+ String lang = tokens[1];
r_ret = get_language_support_override(lang);
return true;
- }
- if (str.begins_with("script_support_override/")) {
- String scr = str.get_slicec('/', 1);
- if (scr == "_new") {
+ } else if (tokens.size() == 2 && tokens[0] == "script_support_override") {
+ String script = tokens[1];
+ r_ret = get_script_support_override(script);
+ return true;
+ } else if (tokens.size() >= 3 && tokens[0] == "cache") {
+ int cache_index = tokens[1].to_int();
+ if (tokens.size() == 3 && tokens[2] == "variation_coordinates") {
+ r_ret = get_variation_coordinates(cache_index);
return true;
}
- r_ret = get_script_support_override(scr);
- return true;
- }
- if (str.begins_with("variation/")) {
- String name = str.get_slicec('/', 1);
-
- r_ret = get_variation(name);
- return true;
+ if (tokens.size() >= 5) {
+ Vector2i sz = Vector2i(tokens[2].to_int(), tokens[3].to_int());
+ if (tokens[4] == "ascent") {
+ r_ret = get_ascent(cache_index, sz.x);
+ return true;
+ } else if (tokens[4] == "descent") {
+ r_ret = get_descent(cache_index, sz.x);
+ return true;
+ } else if (tokens[4] == "underline_position") {
+ r_ret = get_underline_position(cache_index, sz.x);
+ return true;
+ } else if (tokens[4] == "underline_thickness") {
+ r_ret = get_underline_thickness(cache_index, sz.x);
+ return true;
+ } else if (tokens[4] == "scale") {
+ r_ret = get_scale(cache_index, sz.x);
+ return true;
+ } else if (tokens[4] == "spacing_glyph") {
+ r_ret = get_spacing(cache_index, sz.x, TextServer::SPACING_GLYPH);
+ return true;
+ } else if (tokens[4] == "spacing_space") {
+ r_ret = get_spacing(cache_index, sz.x, TextServer::SPACING_SPACE);
+ return true;
+ } else if (tokens.size() == 7 && tokens[4] == "textures") {
+ int texture_index = tokens[5].to_int();
+ if (tokens[6] == "image") {
+ r_ret = get_texture_image(cache_index, sz, texture_index);
+ return true;
+ } else if (tokens[6] == "offsets") {
+ r_ret = get_texture_offsets(cache_index, sz, texture_index);
+ return true;
+ }
+ } else if (tokens.size() == 7 && tokens[4] == "glyphs") {
+ int32_t glyph_index = tokens[5].to_int();
+ if (tokens[6] == "advance") {
+ r_ret = get_glyph_advance(cache_index, sz.x, glyph_index);
+ return true;
+ } else if (tokens[6] == "offset") {
+ r_ret = get_glyph_offset(cache_index, sz, glyph_index);
+ return true;
+ } else if (tokens[6] == "size") {
+ r_ret = get_glyph_size(cache_index, sz, glyph_index);
+ return true;
+ } else if (tokens[6] == "uv_rect") {
+ r_ret = get_glyph_uv_rect(cache_index, sz, glyph_index);
+ return true;
+ } else if (tokens[6] == "texture_idx") {
+ r_ret = get_glyph_texture_idx(cache_index, sz, glyph_index);
+ return true;
+ }
+ } else if (tokens.size() == 7 && tokens[4] == "kerning_overrides") {
+ Vector2i gp = Vector2i(tokens[5].to_int(), tokens[6].to_int());
+ r_ret = get_kerning(cache_index, sz.x, gp);
+ return true;
+ }
+ }
}
-
return false;
}
void FontData::_get_property_list(List<PropertyInfo> *p_list) const {
+ p_list->push_back(PropertyInfo(Variant::PACKED_BYTE_ARRAY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+
+ p_list->push_back(PropertyInfo(Variant::BOOL, "antialiased", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::BOOL, "multichannel_signed_distance_field", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::INT, "msdf_pixel_range", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::INT, "msdf_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::INT, "fixed_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::INT, "hinting", PROPERTY_HINT_ENUM, "None,Light,Normal", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::BOOL, "force_autohinter", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "oversampling", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+
Vector<String> lang_over = get_language_support_overrides();
for (int i = 0; i < lang_over.size(); i++) {
- p_list->push_back(PropertyInfo(Variant::BOOL, "language_support_override/" + lang_over[i], PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::BOOL, "language_support_override/" + lang_over[i], PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
}
- p_list->push_back(PropertyInfo(Variant::NIL, "language_support_override/_new", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR));
-
Vector<String> scr_over = get_script_support_overrides();
for (int i = 0; i < scr_over.size(); i++) {
- p_list->push_back(PropertyInfo(Variant::BOOL, "script_support_override/" + scr_over[i], PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE));
- }
- p_list->push_back(PropertyInfo(Variant::NIL, "script_support_override/_new", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR));
+ p_list->push_back(PropertyInfo(Variant::BOOL, "script_support_override/" + scr_over[i], PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ }
+ for (int i = 0; i < cache.size(); i++) {
+ String prefix = "cache/" + itos(i) + "/";
+ Array sizes = get_size_cache_list(i);
+ p_list->push_back(PropertyInfo(Variant::DICTIONARY, prefix + "variation_coordinates", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ for (int j = 0; j < sizes.size(); j++) {
+ Vector2i sz = sizes[j];
+ String prefix_sz = prefix + itos(sz.x) + "/" + itos(sz.y) + "/";
+ if (sz.y == 0) {
+ p_list->push_back(PropertyInfo(Variant::FLOAT, prefix_sz + "ascent", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, prefix_sz + "descent", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, prefix_sz + "underline_position", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, prefix_sz + "underline_thickness", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, prefix_sz + "scale", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::BOOL, prefix_sz + "spacing_glyph", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::BOOL, prefix_sz + "spacing_space", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ }
- Dictionary variations = get_variation_list();
- for (const Variant *ftr = variations.next(nullptr); ftr != nullptr; ftr = variations.next(ftr)) {
- Vector3i v = variations[*ftr];
- p_list->push_back(PropertyInfo(Variant::FLOAT, "variation/" + TS->tag_to_name(*ftr), PROPERTY_HINT_RANGE, itos(v.x) + "," + itos(v.y), PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE));
+ int tx_cnt = get_texture_count(i, sz);
+ for (int k = 0; k < tx_cnt; k++) {
+ p_list->push_back(PropertyInfo(Variant::PACKED_INT32_ARRAY, prefix_sz + "textures/" + itos(k) + "/offsets", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::OBJECT, prefix_sz + "textures/" + itos(k) + "/image", PROPERTY_HINT_RESOURCE_TYPE, "Image", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT));
+ }
+ Array glyphs = get_glyph_list(i, sz);
+ for (int k = 0; k < glyphs.size(); k++) {
+ const int32_t &gl = glyphs[k];
+ if (sz.y == 0) {
+ p_list->push_back(PropertyInfo(Variant::VECTOR2, prefix_sz + "glyphs/" + itos(gl) + "/advance", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ }
+ p_list->push_back(PropertyInfo(Variant::VECTOR2, prefix_sz + "glyphs/" + itos(gl) + "/offset", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::VECTOR2, prefix_sz + "glyphs/" + itos(gl) + "/size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::RECT2, prefix_sz + "glyphs/" + itos(gl) + "/uv_rect", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ p_list->push_back(PropertyInfo(Variant::INT, prefix_sz + "glyphs/" + itos(gl) + "/texture_idx", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ }
+ if (sz.y == 0) {
+ Array kerning_map = get_kerning_list(i, sz.x);
+ for (int k = 0; k < kerning_map.size(); k++) {
+ const Vector2i &gl_pair = kerning_map[k];
+ p_list->push_back(PropertyInfo(Variant::VECTOR2, prefix_sz + "kerning_overrides/" + itos(gl_pair.x) + "/" + itos(gl_pair.y), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
+ }
+ }
+ }
}
}
void FontData::reset_state() {
- if (rid != RID()) {
- TS->free(rid);
- }
- base_size = 16;
- path = String();
-}
+ _clear_cache();
+ data.clear();
+ data_ptr = nullptr;
+ data_size = 0;
+ cache.clear();
-RID FontData::get_rid() const {
- return rid;
+ antialiased = true;
+ msdf = false;
+ force_autohinter = false;
+ hinting = TextServer::HINTING_LIGHT;
+ msdf_pixel_range = 14;
+ msdf_size = 128;
+ oversampling = 0.f;
}
-void FontData::load_resource(const String &p_filename, int p_base_size) {
- if (rid != RID()) {
- TS->free(rid);
+/*************************************************************************/
+
+void FontData::set_data_ptr(const uint8_t *p_data, size_t p_size) {
+ data.clear();
+ data_ptr = p_data;
+ data_size = p_size;
+
+ if (data_ptr != nullptr) {
+ for (int i = 0; i < cache.size(); i++) {
+ if (cache[i].is_valid()) {
+ TS->font_set_data_ptr(cache[i], data_ptr, data_size);
+ }
+ }
}
- rid = TS->create_font_resource(p_filename, p_base_size);
- path = p_filename;
- base_size = TS->font_get_base_size(rid);
- emit_changed();
}
-void FontData::_load_memory(const PackedByteArray &p_data, const String &p_type, int p_base_size) {
- if (rid != RID()) {
- TS->free(rid);
+void FontData::set_data(const PackedByteArray &p_data) {
+ data = p_data;
+ data_ptr = data.ptr();
+ data_size = data.size();
+
+ if (data_ptr != nullptr) {
+ for (int i = 0; i < cache.size(); i++) {
+ if (cache[i].is_valid()) {
+ TS->font_set_data_ptr(cache[i], data_ptr, data_size);
+ }
+ }
}
- rid = TS->create_font_memory(p_data.ptr(), p_data.size(), p_type, p_base_size);
- path = TTR("(Memory: " + p_type.to_upper() + " @ 0x" + String::num_int64((uint64_t)p_data.ptr(), 16, true) + ")");
- base_size = TS->font_get_base_size(rid);
- emit_changed();
}
-void FontData::load_memory(const uint8_t *p_data, size_t p_size, const String &p_type, int p_base_size) {
- if (rid != RID()) {
- TS->free(rid);
- }
- rid = TS->create_font_memory(p_data, p_size, p_type, p_base_size);
- path = TTR("(Memory: " + p_type.to_upper() + " @ 0x" + String::num_int64((uint64_t)p_data, 16, true) + ")");
- base_size = TS->font_get_base_size(rid);
- emit_changed();
+PackedByteArray FontData::get_data() const {
+ return data;
}
-void FontData::new_bitmap(float p_height, float p_ascent, int p_base_size) {
- if (rid != RID()) {
- TS->free(rid);
+void FontData::set_antialiased(bool p_antialiased) {
+ if (antialiased != p_antialiased) {
+ antialiased = p_antialiased;
+ for (int i = 0; i < cache.size(); i++) {
+ _ensure_rid(i);
+ TS->font_set_antialiased(cache[i], antialiased);
+ }
+ emit_changed();
}
- rid = TS->create_font_bitmap(p_height, p_ascent, p_base_size);
- path = TTR("(Bitmap: " + String::num_int64(rid.get_id(), 16, true) + ")");
- base_size = TS->font_get_base_size(rid);
- emit_changed();
}
-void FontData::bitmap_add_texture(const Ref<Texture> &p_texture) {
- if (rid != RID()) {
- TS->font_bitmap_add_texture(rid, p_texture);
- }
+bool FontData::is_antialiased() const {
+ return antialiased;
}
-void FontData::bitmap_add_char(char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) {
- if (rid != RID()) {
- TS->font_bitmap_add_char(rid, p_char, p_texture_idx, p_rect, p_align, p_advance);
+void FontData::set_multichannel_signed_distance_field(bool p_msdf) {
+ if (msdf != p_msdf) {
+ msdf = p_msdf;
+ for (int i = 0; i < cache.size(); i++) {
+ _ensure_rid(i);
+ TS->font_set_multichannel_signed_distance_field(cache[i], msdf);
+ }
+ emit_changed();
}
}
-void FontData::bitmap_add_kerning_pair(char32_t p_A, char32_t p_B, int p_kerning) {
- if (rid != RID()) {
- TS->font_bitmap_add_kerning_pair(rid, p_A, p_B, p_kerning);
- }
+bool FontData::is_multichannel_signed_distance_field() const {
+ return msdf;
}
-void FontData::set_data_path(const String &p_path) {
- load_resource(p_path, base_size);
+void FontData::set_msdf_pixel_range(int p_msdf_pixel_range) {
+ if (msdf_pixel_range != p_msdf_pixel_range) {
+ msdf_pixel_range = p_msdf_pixel_range;
+ for (int i = 0; i < cache.size(); i++) {
+ _ensure_rid(i);
+ TS->font_set_msdf_pixel_range(cache[i], msdf_pixel_range);
+ }
+ emit_changed();
+ }
}
-String FontData::get_data_path() const {
- return path;
+int FontData::get_msdf_pixel_range() const {
+ return msdf_pixel_range;
}
-float FontData::get_height(int p_size) const {
- if (rid == RID()) {
- return 0.f; // Do not raise errors in getters, to prevent editor from spamming errors on incomplete (without data_path set) fonts.
+void FontData::set_msdf_size(int p_msdf_size) {
+ if (msdf_size != p_msdf_size) {
+ msdf_size = p_msdf_size;
+ for (int i = 0; i < cache.size(); i++) {
+ _ensure_rid(i);
+ TS->font_set_msdf_size(cache[i], msdf_size);
+ }
+ emit_changed();
}
- return TS->font_get_height(rid, (p_size < 0) ? base_size : p_size);
}
-float FontData::get_ascent(int p_size) const {
- if (rid == RID()) {
- return 0.f;
- }
- return TS->font_get_ascent(rid, (p_size < 0) ? base_size : p_size);
+int FontData::get_msdf_size() const {
+ return msdf_size;
}
-float FontData::get_descent(int p_size) const {
- if (rid == RID()) {
- return 0.f;
+void FontData::set_fixed_size(int p_fixed_size) {
+ if (fixed_size != p_fixed_size) {
+ fixed_size = p_fixed_size;
+ for (int i = 0; i < cache.size(); i++) {
+ _ensure_rid(i);
+ TS->font_set_fixed_size(cache[i], fixed_size);
+ }
+ emit_changed();
}
- return TS->font_get_descent(rid, (p_size < 0) ? base_size : p_size);
}
-float FontData::get_underline_position(int p_size) const {
- if (rid == RID()) {
- return 0.f;
- }
- return TS->font_get_underline_position(rid, (p_size < 0) ? base_size : p_size);
+int FontData::get_fixed_size() const {
+ return fixed_size;
}
-Dictionary FontData::get_feature_list() const {
- if (rid == RID()) {
- return Dictionary();
+void FontData::set_force_autohinter(bool p_force_autohinter) {
+ if (force_autohinter != p_force_autohinter) {
+ force_autohinter = p_force_autohinter;
+ for (int i = 0; i < cache.size(); i++) {
+ _ensure_rid(i);
+ TS->font_set_force_autohinter(cache[i], force_autohinter);
+ }
+ emit_changed();
}
- return TS->font_get_feature_list(rid);
}
-float FontData::get_underline_thickness(int p_size) const {
- if (rid == RID()) {
- return 0.f;
- }
- return TS->font_get_underline_thickness(rid, (p_size < 0) ? base_size : p_size);
+bool FontData::is_force_autohinter() const {
+ return force_autohinter;
}
-Dictionary FontData::get_variation_list() const {
- if (rid == RID()) {
- return Dictionary();
+void FontData::set_hinting(TextServer::Hinting p_hinting) {
+ if (hinting != p_hinting) {
+ hinting = p_hinting;
+ for (int i = 0; i < cache.size(); i++) {
+ _ensure_rid(i);
+ TS->font_set_hinting(cache[i], hinting);
+ }
+ emit_changed();
}
- return TS->font_get_variation_list(rid);
}
-void FontData::set_variation(const String &p_name, double p_value) {
- ERR_FAIL_COND(rid == RID());
- TS->font_set_variation(rid, p_name, p_value);
- emit_changed();
+TextServer::Hinting FontData::get_hinting() const {
+ return hinting;
}
-double FontData::get_variation(const String &p_name) const {
- if (rid == RID()) {
- return 0;
+void FontData::set_oversampling(real_t p_oversampling) {
+ if (oversampling != p_oversampling) {
+ oversampling = p_oversampling;
+ for (int i = 0; i < cache.size(); i++) {
+ _ensure_rid(i);
+ TS->font_set_oversampling(cache[i], oversampling);
+ }
+ emit_changed();
+ }
+}
+
+real_t FontData::get_oversampling() const {
+ return oversampling;
+}
+
+RID FontData::find_cache(const Dictionary &p_variation_coordinates) const {
+ // Find existing variation cache.
+ const Dictionary &supported_coords = get_supported_variation_list();
+ for (int i = 0; i < cache.size(); i++) {
+ if (cache[i].is_valid()) {
+ const Dictionary &cache_var = TS->font_get_variation_coordinates(cache[i]);
+ bool match = true;
+ for (const Variant *V = supported_coords.next(nullptr); V && match; V = supported_coords.next(V)) {
+ const Vector3 &def = supported_coords[*V];
+
+ real_t c_v = def.z;
+ if (cache_var.has(*V)) {
+ real_t val = cache_var[*V];
+ c_v = CLAMP(val, def.x, def.y);
+ }
+ if (cache_var.has(TS->tag_to_name(*V))) {
+ real_t val = cache_var[TS->tag_to_name(*V)];
+ c_v = CLAMP(val, def.x, def.y);
+ }
+
+ real_t s_v = def.z;
+ if (p_variation_coordinates.has(*V)) {
+ real_t val = p_variation_coordinates[*V];
+ s_v = CLAMP(val, def.x, def.y);
+ }
+ if (p_variation_coordinates.has(TS->tag_to_name(*V))) {
+ real_t val = p_variation_coordinates[TS->tag_to_name(*V)];
+ s_v = CLAMP(val, def.x, def.y);
+ }
+
+ match = match && (c_v == s_v);
+ }
+ if (match) {
+ return cache[i];
+ }
+ }
}
- return TS->font_get_variation(rid, p_name);
+
+ // Create new variation cache.
+ int idx = cache.size();
+ _ensure_rid(idx);
+ TS->font_set_variation_coordinates(cache[idx], p_variation_coordinates);
+ return cache[idx];
}
-int FontData::get_spacing(int p_type) const {
- if (rid == RID()) {
- return 0;
- }
- if (p_type == SPACING_GLYPH) {
- return TS->font_get_spacing_glyph(rid);
- } else {
- return TS->font_get_spacing_space(rid);
- }
+int FontData::get_cache_count() const {
+ return cache.size();
}
-void FontData::set_spacing(int p_type, int p_value) {
- ERR_FAIL_COND(rid == RID());
- if (p_type == SPACING_GLYPH) {
- TS->font_set_spacing_glyph(rid, p_value);
- } else {
- TS->font_set_spacing_space(rid, p_value);
+void FontData::clear_cache() {
+ _clear_cache();
+ cache.clear();
+}
+
+void FontData::remove_cache(int p_cache_index) {
+ ERR_FAIL_INDEX(p_cache_index, cache.size());
+ if (cache[p_cache_index].is_valid()) {
+ TS->free(cache.write[p_cache_index]);
}
+ cache.remove(p_cache_index);
emit_changed();
}
-void FontData::set_antialiased(bool p_antialiased) {
- ERR_FAIL_COND(rid == RID());
- TS->font_set_antialiased(rid, p_antialiased);
- emit_changed();
+Array FontData::get_size_cache_list(int p_cache_index) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, Array());
+ _ensure_rid(p_cache_index);
+ return TS->font_get_size_cache_list(cache[p_cache_index]);
}
-bool FontData::get_antialiased() const {
- if (rid == RID()) {
- return false;
- }
- return TS->font_get_antialiased(rid);
+void FontData::clear_size_cache(int p_cache_index) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_clear_size_cache(cache[p_cache_index]);
+}
+
+void FontData::remove_size_cache(int p_cache_index, const Vector2i &p_size) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_remove_size_cache(cache[p_cache_index], p_size);
}
-void FontData::set_distance_field_hint(bool p_distance_field) {
- ERR_FAIL_COND(rid == RID());
- TS->font_set_distance_field_hint(rid, p_distance_field);
+void FontData::set_variation_coordinates(int p_cache_index, const Dictionary &p_variation_coordinates) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_variation_coordinates(cache[p_cache_index], p_variation_coordinates);
emit_changed();
}
-bool FontData::get_distance_field_hint() const {
- if (rid == RID()) {
- return false;
- }
- return TS->font_get_distance_field_hint(rid);
+Dictionary FontData::get_variation_coordinates(int p_cache_index) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, Dictionary());
+ _ensure_rid(p_cache_index);
+ return TS->font_get_variation_coordinates(cache[p_cache_index]);
}
-void FontData::set_hinting(TextServer::Hinting p_hinting) {
- ERR_FAIL_COND(rid == RID());
- TS->font_set_hinting(rid, p_hinting);
- emit_changed();
+void FontData::set_ascent(int p_cache_index, int p_size, real_t p_ascent) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_ascent(cache[p_cache_index], p_size, p_ascent);
}
-TextServer::Hinting FontData::get_hinting() const {
- if (rid == RID()) {
- return TextServer::HINTING_NONE;
- }
- return TS->font_get_hinting(rid);
+real_t FontData::get_ascent(int p_cache_index, int p_size) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, 0.f);
+ _ensure_rid(p_cache_index);
+ return TS->font_get_ascent(cache[p_cache_index], p_size);
}
-void FontData::set_force_autohinter(bool p_enabeld) {
- ERR_FAIL_COND(rid == RID());
- TS->font_set_force_autohinter(rid, p_enabeld);
- emit_changed();
+void FontData::set_descent(int p_cache_index, int p_size, real_t p_descent) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_descent(cache[p_cache_index], p_size, p_descent);
}
-bool FontData::get_force_autohinter() const {
- if (rid == RID()) {
- return false;
- }
- return TS->font_get_force_autohinter(rid);
+real_t FontData::get_descent(int p_cache_index, int p_size) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, 0.f);
+ _ensure_rid(p_cache_index);
+ return TS->font_get_descent(cache[p_cache_index], p_size);
}
-bool FontData::has_char(char32_t p_char) const {
- if (rid == RID()) {
- return false;
- }
- return TS->font_has_char(rid, p_char);
+void FontData::set_underline_position(int p_cache_index, int p_size, real_t p_underline_position) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_underline_position(cache[p_cache_index], p_size, p_underline_position);
}
-String FontData::get_supported_chars() const {
- ERR_FAIL_COND_V(rid == RID(), String());
- return TS->font_get_supported_chars(rid);
+real_t FontData::get_underline_position(int p_cache_index, int p_size) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, 0.f);
+ _ensure_rid(p_cache_index);
+ return TS->font_get_underline_position(cache[p_cache_index], p_size);
}
-Vector2 FontData::get_glyph_advance(uint32_t p_index, int p_size) const {
- ERR_FAIL_COND_V(rid == RID(), Vector2());
- return TS->font_get_glyph_advance(rid, p_index, (p_size < 0) ? base_size : p_size);
+void FontData::set_underline_thickness(int p_cache_index, int p_size, real_t p_underline_thickness) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_underline_thickness(cache[p_cache_index], p_size, p_underline_thickness);
}
-Vector2 FontData::get_glyph_kerning(uint32_t p_index_a, uint32_t p_index_b, int p_size) const {
- ERR_FAIL_COND_V(rid == RID(), Vector2());
- return TS->font_get_glyph_kerning(rid, p_index_a, p_index_b, (p_size < 0) ? base_size : p_size);
+real_t FontData::get_underline_thickness(int p_cache_index, int p_size) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, 0.f);
+ _ensure_rid(p_cache_index);
+ return TS->font_get_underline_thickness(cache[p_cache_index], p_size);
}
-bool FontData::has_outline() const {
- if (rid == RID()) {
- return false;
- }
- return TS->font_has_outline(rid);
+void FontData::set_scale(int p_cache_index, int p_size, real_t p_scale) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_scale(cache[p_cache_index], p_size, p_scale);
}
-float FontData::get_base_size() const {
- return base_size;
+real_t FontData::get_scale(int p_cache_index, int p_size) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, 0.f);
+ _ensure_rid(p_cache_index);
+ return TS->font_get_scale(cache[p_cache_index], p_size);
+}
+
+void FontData::set_spacing(int p_cache_index, int p_size, TextServer::SpacingType p_spacing, int p_value) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_spacing(cache[p_cache_index], p_size, p_spacing, p_value);
+}
+
+int FontData::get_spacing(int p_cache_index, int p_size, TextServer::SpacingType p_spacing) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, 0);
+ _ensure_rid(p_cache_index);
+ return TS->font_get_spacing(cache[p_cache_index], p_size, p_spacing);
+}
+
+int FontData::get_texture_count(int p_cache_index, const Vector2i &p_size) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, 0);
+ _ensure_rid(p_cache_index);
+ return TS->font_get_texture_count(cache[p_cache_index], p_size);
+}
+
+void FontData::clear_textures(int p_cache_index, const Vector2i &p_size) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_clear_textures(cache[p_cache_index], p_size);
+}
+
+void FontData::remove_texture(int p_cache_index, const Vector2i &p_size, int p_texture_index) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_remove_texture(cache[p_cache_index], p_size, p_texture_index);
+}
+
+void FontData::set_texture_image(int p_cache_index, const Vector2i &p_size, int p_texture_index, const Ref<Image> &p_image) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_texture_image(cache[p_cache_index], p_size, p_texture_index, p_image);
+}
+
+Ref<Image> FontData::get_texture_image(int p_cache_index, const Vector2i &p_size, int p_texture_index) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, Ref<Image>());
+ _ensure_rid(p_cache_index);
+ return TS->font_get_texture_image(cache[p_cache_index], p_size, p_texture_index);
+}
+
+void FontData::set_texture_offsets(int p_cache_index, const Vector2i &p_size, int p_texture_index, const PackedInt32Array &p_offset) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_texture_offsets(cache[p_cache_index], p_size, p_texture_index, p_offset);
+}
+
+PackedInt32Array FontData::get_texture_offsets(int p_cache_index, const Vector2i &p_size, int p_texture_index) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, PackedInt32Array());
+ _ensure_rid(p_cache_index);
+ return TS->font_get_texture_offsets(cache[p_cache_index], p_size, p_texture_index);
+}
+
+Array FontData::get_glyph_list(int p_cache_index, const Vector2i &p_size) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, Array());
+ _ensure_rid(p_cache_index);
+ return TS->font_get_glyph_list(cache[p_cache_index], p_size);
+}
+
+void FontData::clear_glyphs(int p_cache_index, const Vector2i &p_size) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_clear_glyphs(cache[p_cache_index], p_size);
+}
+
+void FontData::remove_glyph(int p_cache_index, const Vector2i &p_size, int32_t p_glyph) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_remove_glyph(cache[p_cache_index], p_size, p_glyph);
+}
+
+void FontData::set_glyph_advance(int p_cache_index, int p_size, int32_t p_glyph, const Vector2 &p_advance) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_glyph_advance(cache[p_cache_index], p_size, p_glyph, p_advance);
+}
+
+Vector2 FontData::get_glyph_advance(int p_cache_index, int p_size, int32_t p_glyph) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, Vector2());
+ _ensure_rid(p_cache_index);
+ return TS->font_get_glyph_advance(cache[p_cache_index], p_size, p_glyph);
+}
+
+void FontData::set_glyph_offset(int p_cache_index, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_offset) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_glyph_offset(cache[p_cache_index], p_size, p_glyph, p_offset);
+}
+
+Vector2 FontData::get_glyph_offset(int p_cache_index, const Vector2i &p_size, int32_t p_glyph) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, Vector2());
+ _ensure_rid(p_cache_index);
+ return TS->font_get_glyph_offset(cache[p_cache_index], p_size, p_glyph);
+}
+
+void FontData::set_glyph_size(int p_cache_index, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_gl_size) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_glyph_size(cache[p_cache_index], p_size, p_glyph, p_gl_size);
+}
+
+Vector2 FontData::get_glyph_size(int p_cache_index, const Vector2i &p_size, int32_t p_glyph) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, Vector2());
+ _ensure_rid(p_cache_index);
+ return TS->font_get_glyph_size(cache[p_cache_index], p_size, p_glyph);
+}
+
+void FontData::set_glyph_uv_rect(int p_cache_index, const Vector2i &p_size, int32_t p_glyph, const Rect2 &p_uv_rect) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_glyph_uv_rect(cache[p_cache_index], p_size, p_glyph, p_uv_rect);
+}
+
+Rect2 FontData::get_glyph_uv_rect(int p_cache_index, const Vector2i &p_size, int32_t p_glyph) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, Rect2());
+ _ensure_rid(p_cache_index);
+ return TS->font_get_glyph_uv_rect(cache[p_cache_index], p_size, p_glyph);
+}
+
+void FontData::set_glyph_texture_idx(int p_cache_index, const Vector2i &p_size, int32_t p_glyph, int p_texture_idx) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_glyph_texture_idx(cache[p_cache_index], p_size, p_glyph, p_texture_idx);
+}
+
+int FontData::get_glyph_texture_idx(int p_cache_index, const Vector2i &p_size, int32_t p_glyph) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, 0);
+ _ensure_rid(p_cache_index);
+ return TS->font_get_glyph_texture_idx(cache[p_cache_index], p_size, p_glyph);
+}
+
+Array FontData::get_kerning_list(int p_cache_index, int p_size) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, Array());
+ _ensure_rid(p_cache_index);
+ return TS->font_get_kerning_list(cache[p_cache_index], p_size);
+}
+
+void FontData::clear_kerning_map(int p_cache_index, int p_size) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_clear_kerning_map(cache[p_cache_index], p_size);
+}
+
+void FontData::remove_kerning(int p_cache_index, int p_size, const Vector2i &p_glyph_pair) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_remove_kerning(cache[p_cache_index], p_size, p_glyph_pair);
+}
+
+void FontData::set_kerning(int p_cache_index, int p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_set_kerning(cache[p_cache_index], p_size, p_glyph_pair, p_kerning);
+}
+
+Vector2 FontData::get_kerning(int p_cache_index, int p_size, const Vector2i &p_glyph_pair) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, Vector2());
+ _ensure_rid(p_cache_index);
+ return TS->font_get_kerning(cache[p_cache_index], p_size, p_glyph_pair);
+}
+
+void FontData::render_range(int p_cache_index, const Vector2i &p_size, char32_t p_start, char32_t p_end) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_render_range(cache[p_cache_index], p_size, p_start, p_end);
+}
+
+void FontData::render_glyph(int p_cache_index, const Vector2i &p_size, int32_t p_index) {
+ ERR_FAIL_COND(p_cache_index < 0);
+ _ensure_rid(p_cache_index);
+ TS->font_render_glyph(cache[p_cache_index], p_size, p_index);
+}
+
+RID FontData::get_cache_rid(int p_cache_index) const {
+ ERR_FAIL_COND_V(p_cache_index < 0, RID());
+ _ensure_rid(p_cache_index);
+ return cache[p_cache_index];
}
bool FontData::is_language_supported(const String &p_language) const {
- if (rid == RID()) {
- return false;
- }
- return TS->font_is_language_supported(rid, p_language);
+ _ensure_rid(0);
+ return TS->font_is_language_supported(cache[0], p_language);
}
void FontData::set_language_support_override(const String &p_language, bool p_supported) {
- ERR_FAIL_COND(rid == RID());
- TS->font_set_language_support_override(rid, p_language, p_supported);
- emit_changed();
+ _ensure_rid(0);
+ TS->font_set_language_support_override(cache[0], p_language, p_supported);
}
bool FontData::get_language_support_override(const String &p_language) const {
- if (rid == RID()) {
- return false;
- }
- return TS->font_get_language_support_override(rid, p_language);
+ _ensure_rid(0);
+ return TS->font_get_language_support_override(cache[0], p_language);
}
void FontData::remove_language_support_override(const String &p_language) {
- ERR_FAIL_COND(rid == RID());
- TS->font_remove_language_support_override(rid, p_language);
- emit_changed();
+ _ensure_rid(0);
+ TS->font_remove_language_support_override(cache[0], p_language);
}
Vector<String> FontData::get_language_support_overrides() const {
- if (rid == RID()) {
- return Vector<String>();
- }
- return TS->font_get_language_support_overrides(rid);
+ _ensure_rid(0);
+ return TS->font_get_language_support_overrides(cache[0]);
}
bool FontData::is_script_supported(const String &p_script) const {
- if (rid == RID()) {
- return false;
- }
- return TS->font_is_script_supported(rid, p_script);
+ _ensure_rid(0);
+ return TS->font_is_script_supported(cache[0], p_script);
}
void FontData::set_script_support_override(const String &p_script, bool p_supported) {
- ERR_FAIL_COND(rid == RID());
- TS->font_set_script_support_override(rid, p_script, p_supported);
- emit_changed();
+ _ensure_rid(0);
+ TS->font_set_script_support_override(cache[0], p_script, p_supported);
}
bool FontData::get_script_support_override(const String &p_script) const {
- if (rid == RID()) {
- return false;
- }
- return TS->font_get_script_support_override(rid, p_script);
+ _ensure_rid(0);
+ return TS->font_get_script_support_override(cache[0], p_script);
}
void FontData::remove_script_support_override(const String &p_script) {
- ERR_FAIL_COND(rid == RID());
- TS->font_remove_script_support_override(rid, p_script);
- emit_changed();
+ _ensure_rid(0);
+ TS->font_remove_script_support_override(cache[0], p_script);
}
Vector<String> FontData::get_script_support_overrides() const {
- if (rid == RID()) {
- return Vector<String>();
- }
- return TS->font_get_script_support_overrides(rid);
+ _ensure_rid(0);
+ return TS->font_get_script_support_overrides(cache[0]);
}
-uint32_t FontData::get_glyph_index(char32_t p_char, char32_t p_variation_selector) const {
- ERR_FAIL_COND_V(rid == RID(), 0);
- return TS->font_get_glyph_index(rid, p_char, p_variation_selector);
+bool FontData::has_char(char32_t p_char) const {
+ _ensure_rid(0);
+ return TS->font_has_char(cache[0], p_char);
}
-Vector2 FontData::draw_glyph(RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- ERR_FAIL_COND_V(rid == RID(), Vector2());
- return TS->font_draw_glyph(rid, p_canvas, (p_size <= 0) ? base_size : p_size, p_pos, p_index, p_color);
+String FontData::get_supported_chars() const {
+ _ensure_rid(0);
+ return TS->font_get_supported_chars(cache[0]);
}
-Vector2 FontData::draw_glyph_outline(RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color) const {
- ERR_FAIL_COND_V(rid == RID(), Vector2());
- return TS->font_draw_glyph_outline(rid, p_canvas, (p_size <= 0) ? base_size : p_size, p_outline_size, p_pos, p_index, p_color);
+int32_t FontData::get_glyph_index(int p_size, char32_t p_char, char32_t p_variation_selector) const {
+ _ensure_rid(0);
+ return TS->font_get_glyph_index(cache[0], p_size, p_char, p_variation_selector);
}
-FontData::FontData() {}
+Dictionary FontData::get_supported_feature_list() const {
+ _ensure_rid(0);
+ return TS->font_supported_feature_list(cache[0]);
+}
-FontData::FontData(const String &p_filename, int p_base_size) {
- load_resource(p_filename, p_base_size);
+Dictionary FontData::get_supported_variation_list() const {
+ _ensure_rid(0);
+ return TS->font_supported_variation_list(cache[0]);
}
-FontData::FontData(const PackedByteArray &p_data, const String &p_type, int p_base_size) {
- _load_memory(p_data, p_type, p_base_size);
+FontData::FontData() {
+ /* NOP */
}
FontData::~FontData() {
- if (rid != RID()) {
- TS->free(rid);
- }
+ _clear_cache();
}
/*************************************************************************/
+void Font::_data_changed() {
+ for (int i = 0; i < rids.size(); i++) {
+ rids.write[i] = RID();
+ }
+ emit_changed();
+}
+
+void Font::_ensure_rid(int p_index) const {
+ // Find or create cache record.
+ if (!rids[p_index].is_valid() && data[p_index].is_valid()) {
+ rids.write[p_index] = data[p_index]->find_cache(variation_coordinates);
+ }
+}
+
void Font::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_data", "data"), &Font::add_data);
ClassDB::bind_method(D_METHOD("set_data", "idx", "data"), &Font::set_data);
ClassDB::bind_method(D_METHOD("get_data_count"), &Font::get_data_count);
ClassDB::bind_method(D_METHOD("get_data", "idx"), &Font::get_data);
+ ClassDB::bind_method(D_METHOD("get_data_rid", "idx"), &Font::get_data_rid);
+ ClassDB::bind_method(D_METHOD("clear_data"), &Font::clear_data);
ClassDB::bind_method(D_METHOD("remove_data", "idx"), &Font::remove_data);
+ ClassDB::bind_method(D_METHOD("set_base_size", "size"), &Font::set_base_size);
+ ClassDB::bind_method(D_METHOD("get_base_size"), &Font::get_base_size);
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "base_size"), "set_base_size", "get_base_size");
+
+ ClassDB::bind_method(D_METHOD("set_variation_coordinates", "variation_coordinates"), &Font::set_variation_coordinates);
+ ClassDB::bind_method(D_METHOD("get_variation_coordinates"), &Font::get_variation_coordinates);
+ ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "variation_coordinates"), "set_variation_coordinates", "get_variation_coordinates");
+
+ ClassDB::bind_method(D_METHOD("set_spacing", "spacing", "value"), &Font::set_spacing);
+ ClassDB::bind_method(D_METHOD("get_spacing", "spacing"), &Font::get_spacing);
+
+ ADD_GROUP("Extra Spacing", "spacing");
+ ADD_PROPERTYI(PropertyInfo(Variant::INT, "spacing_top"), "set_spacing", "get_spacing", TextServer::SPACING_TOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::INT, "spacing_bottom"), "set_spacing", "get_spacing", TextServer::SPACING_BOTTOM);
+
ClassDB::bind_method(D_METHOD("get_height", "size"), &Font::get_height, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("get_ascent", "size"), &Font::get_ascent, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("get_descent", "size"), &Font::get_descent, DEFVAL(-1));
-
ClassDB::bind_method(D_METHOD("get_underline_position", "size"), &Font::get_underline_position, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("get_underline_thickness", "size"), &Font::get_underline_thickness, DEFVAL(-1));
- ClassDB::bind_method(D_METHOD("get_spacing", "type"), &Font::get_spacing);
- ClassDB::bind_method(D_METHOD("set_spacing", "type", "value"), &Font::set_spacing);
-
- ClassDB::bind_method(D_METHOD("get_string_size", "text", "size"), &Font::get_string_size, DEFVAL(-1));
+ ClassDB::bind_method(D_METHOD("get_string_size", "text", "size", "align", "width", "flags"), &Font::get_string_size, DEFVAL(-1), DEFVAL(HALIGN_LEFT), DEFVAL(-1), DEFVAL(TextServer::JUSTIFICATION_KASHIDA | TextServer::JUSTIFICATION_WORD_BOUND));
ClassDB::bind_method(D_METHOD("get_multiline_string_size", "text", "width", "size", "flags"), &Font::get_multiline_string_size, DEFVAL(-1), DEFVAL(-1), DEFVAL(TextServer::BREAK_MANDATORY | TextServer::BREAK_WORD_BOUND));
ClassDB::bind_method(D_METHOD("draw_string", "canvas_item", "pos", "text", "align", "width", "size", "modulate", "outline_size", "outline_modulate", "flags"), &Font::draw_string, DEFVAL(HALIGN_LEFT), DEFVAL(-1), DEFVAL(-1), DEFVAL(Color(1, 1, 1)), DEFVAL(0), DEFVAL(Color(1, 1, 1, 0)), DEFVAL(TextServer::JUSTIFICATION_KASHIDA | TextServer::JUSTIFICATION_WORD_BOUND));
ClassDB::bind_method(D_METHOD("draw_multiline_string", "canvas_item", "pos", "text", "align", "width", "max_lines", "size", "modulate", "outline_size", "outline_modulate", "flags"), &Font::draw_multiline_string, DEFVAL(HALIGN_LEFT), DEFVAL(-1), DEFVAL(-1), DEFVAL(-1), DEFVAL(Color(1, 1, 1)), DEFVAL(0), DEFVAL(Color(1, 1, 1, 0)), DEFVAL(TextServer::BREAK_MANDATORY | TextServer::BREAK_WORD_BOUND | TextServer::JUSTIFICATION_KASHIDA | TextServer::JUSTIFICATION_WORD_BOUND));
- ClassDB::bind_method(D_METHOD("has_char", "char"), &Font::has_char);
- ClassDB::bind_method(D_METHOD("get_supported_chars"), &Font::get_supported_chars);
-
ClassDB::bind_method(D_METHOD("get_char_size", "char", "next", "size"), &Font::get_char_size, DEFVAL(0), DEFVAL(-1));
ClassDB::bind_method(D_METHOD("draw_char", "canvas_item", "pos", "char", "next", "size", "modulate", "outline_size", "outline_modulate"), &Font::draw_char, DEFVAL(0), DEFVAL(-1), DEFVAL(Color(1, 1, 1)), DEFVAL(0), DEFVAL(Color(1, 1, 1, 0)));
- ClassDB::bind_method(D_METHOD("update_changes"), &Font::update_changes);
-
- ADD_GROUP("Extra Spacing", "extra_spacing");
- ADD_PROPERTYI(PropertyInfo(Variant::INT, "extra_spacing_top"), "set_spacing", "get_spacing", SPACING_TOP);
- ADD_PROPERTYI(PropertyInfo(Variant::INT, "extra_spacing_bottom"), "set_spacing", "get_spacing", SPACING_BOTTOM);
-
- BIND_ENUM_CONSTANT(SPACING_TOP);
- BIND_ENUM_CONSTANT(SPACING_BOTTOM);
-}
-
-void Font::_data_changed() {
- cache.clear();
- cache_wrap.clear();
+ ClassDB::bind_method(D_METHOD("has_char", "char"), &Font::has_char);
+ ClassDB::bind_method(D_METHOD("get_supported_chars"), &Font::get_supported_chars);
- emit_changed();
- notify_property_list_changed();
+ ClassDB::bind_method(D_METHOD("update_changes"), &Font::update_changes);
}
bool Font::_set(const StringName &p_name, const Variant &p_value) {
- String str = p_name;
+ Vector<String> tokens = p_name.operator String().split("/");
#ifndef DISABLE_DEPRECATED
- if (str == "font_data") { // Compatibility, DynamicFont main data
+ if (tokens.size() == 1 && tokens[0] == "font_data") {
+ // Compatibility, DynamicFont main data.
Ref<FontData> fd = p_value;
if (fd.is_valid()) {
add_data(fd);
return true;
}
return false;
- } else if (str.begins_with("fallback/")) { // Compatibility, DynamicFont fallback data
+ } else if (tokens.size() == 2 && tokens[0] == "fallback") {
+ // Compatibility, DynamicFont fallback data.
Ref<FontData> fd = p_value;
if (fd.is_valid()) {
add_data(fd);
return true;
}
return false;
- } else if (str == "fallback") { // Compatibility, BitmapFont fallback
+ } else if (tokens.size() == 1 && tokens[0] == "fallback") {
+ // Compatibility, BitmapFont fallback data.
Ref<Font> f = p_value;
if (f.is_valid()) {
for (int i = 0; i < f->get_data_count(); i++) {
@@ -612,10 +1134,9 @@ bool Font::_set(const StringName &p_name, const Variant &p_value) {
return false;
}
#endif /* DISABLE_DEPRECATED */
- if (str.begins_with("data/")) {
- int idx = str.get_slicec('/', 1).to_int();
+ if (tokens.size() == 2 && tokens[0] == "data") {
+ int idx = tokens[1].to_int();
Ref<FontData> fd = p_value;
-
if (fd.is_valid()) {
if (idx == data.size()) {
add_data(fd);
@@ -631,14 +1152,13 @@ bool Font::_set(const StringName &p_name, const Variant &p_value) {
return true;
}
}
-
return false;
}
bool Font::_get(const StringName &p_name, Variant &r_ret) const {
- String str = p_name;
- if (str.begins_with("data/")) {
- int idx = str.get_slicec('/', 1).to_int();
+ Vector<String> tokens = p_name.operator String().split("/");
+ if (tokens.size() == 2 && tokens[0] == "data") {
+ int idx = tokens[1].to_int();
if (idx == data.size()) {
r_ret = Ref<FontData>();
@@ -656,24 +1176,52 @@ void Font::_get_property_list(List<PropertyInfo> *p_list) const {
for (int i = 0; i < data.size(); i++) {
p_list->push_back(PropertyInfo(Variant::OBJECT, "data/" + itos(i), PROPERTY_HINT_RESOURCE_TYPE, "FontData"));
}
-
p_list->push_back(PropertyInfo(Variant::OBJECT, "data/" + itos(data.size()), PROPERTY_HINT_RESOURCE_TYPE, "FontData"));
}
void Font::reset_state() {
- spacing_top = 0;
- spacing_bottom = 0;
+ for (int i = 0; i < data.size(); i++) {
+ if (data[i].is_valid()) {
+ data.write[i]->connect(SNAME("changed"), callable_mp(this, &Font::_data_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ }
+ }
cache.clear();
cache_wrap.clear();
data.clear();
+ rids.clear();
+
+ base_size = 16;
+ variation_coordinates.clear();
+ spacing_bottom = 0;
+ spacing_top = 0;
+}
+
+Dictionary Font::get_feature_list() const {
+ Dictionary out;
+ for (int i = 0; i < data.size(); i++) {
+ Dictionary data_ftrs = data[i]->get_supported_feature_list();
+ for (const Variant *ftr = data_ftrs.next(nullptr); ftr != nullptr; ftr = data_ftrs.next(ftr)) {
+ out[*ftr] = data_ftrs[*ftr];
+ }
+ }
+ return out;
}
void Font::add_data(const Ref<FontData> &p_data) {
ERR_FAIL_COND(p_data.is_null());
data.push_back(p_data);
+ rids.push_back(RID());
if (data[data.size() - 1].is_valid()) {
- data.write[data.size() - 1]->connect("changed", callable_mp(this, &Font::_data_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ data.write[data.size() - 1]->connect(SNAME("changed"), callable_mp(this, &Font::_data_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ Dictionary data_var_list = p_data->get_supported_variation_list();
+ for (int j = 0; j < data_var_list.size(); j++) {
+ int32_t tag = data_var_list.get_key_at_index(j);
+ Vector3i value = data_var_list.get_value_at_index(j);
+ if (!variation_coordinates.has(tag) && !variation_coordinates.has(TS->tag_to_name(tag))) {
+ variation_coordinates[TS->tag_to_name(tag)] = value.z;
+ }
+ }
}
cache.clear();
@@ -688,13 +1236,22 @@ void Font::set_data(int p_idx, const Ref<FontData> &p_data) {
ERR_FAIL_INDEX(p_idx, data.size());
if (data[p_idx].is_valid()) {
- data.write[p_idx]->disconnect("changed", callable_mp(this, &Font::_data_changed));
+ data.write[p_idx]->disconnect(SNAME("changed"), callable_mp(this, &Font::_data_changed));
}
data.write[p_idx] = p_data;
+ rids.write[p_idx] = RID();
+ Dictionary data_var_list = p_data->get_supported_variation_list();
+ for (int j = 0; j < data_var_list.size(); j++) {
+ int32_t tag = data_var_list.get_key_at_index(j);
+ Vector3i value = data_var_list.get_value_at_index(j);
+ if (!variation_coordinates.has(tag) && !variation_coordinates.has(TS->tag_to_name(tag))) {
+ variation_coordinates[TS->tag_to_name(tag)] = value.z;
+ }
+ }
if (data[p_idx].is_valid()) {
- data.write[p_idx]->connect("changed", callable_mp(this, &Font::_data_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ data.write[p_idx]->connect(SNAME("changed"), callable_mp(this, &Font::_data_changed), varray(), CONNECT_REFERENCE_COUNTED);
}
cache.clear();
@@ -713,14 +1270,31 @@ Ref<FontData> Font::get_data(int p_idx) const {
return data[p_idx];
}
+RID Font::get_data_rid(int p_idx) const {
+ ERR_FAIL_INDEX_V(p_idx, data.size(), RID());
+ _ensure_rid(p_idx);
+ return rids[p_idx];
+}
+
+void Font::clear_data() {
+ for (int i = 0; i < data.size(); i++) {
+ if (data[i].is_valid()) {
+ data.write[i]->connect(SNAME("changed"), callable_mp(this, &Font::_data_changed), varray(), CONNECT_REFERENCE_COUNTED);
+ }
+ }
+ data.clear();
+ rids.clear();
+}
+
void Font::remove_data(int p_idx) {
ERR_FAIL_INDEX(p_idx, data.size());
if (data[p_idx].is_valid()) {
- data.write[p_idx]->disconnect("changed", callable_mp(this, &Font::_data_changed));
+ data.write[p_idx]->disconnect(SNAME("changed"), callable_mp(this, &Font::_data_changed));
}
data.remove(p_idx);
+ rids.remove(p_idx);
cache.clear();
cache_wrap.clear();
@@ -729,117 +1303,148 @@ void Font::remove_data(int p_idx) {
notify_property_list_changed();
}
-Dictionary Font::get_feature_list() const {
- Dictionary out;
- for (int i = 0; i < data.size(); i++) {
- Dictionary data_ftrs = data[i]->get_feature_list();
- for (const Variant *ftr = data_ftrs.next(nullptr); ftr != nullptr; ftr = data_ftrs.next(ftr)) {
- out[*ftr] = data_ftrs[*ftr];
- }
+void Font::set_base_size(int p_size) {
+ base_size = p_size;
+}
+
+int Font::get_base_size() const {
+ return base_size;
+}
+
+void Font::set_variation_coordinates(const Dictionary &p_variation_coordinates) {
+ _data_changed();
+ variation_coordinates = p_variation_coordinates;
+}
+
+Dictionary Font::get_variation_coordinates() const {
+ return variation_coordinates;
+}
+
+void Font::set_spacing(TextServer::SpacingType p_spacing, int p_value) {
+ _data_changed();
+ switch (p_spacing) {
+ case TextServer::SPACING_TOP: {
+ spacing_top = p_value;
+ } break;
+ case TextServer::SPACING_BOTTOM: {
+ spacing_bottom = p_value;
+ } break;
+ default: {
+ ERR_FAIL_MSG("Invalid spacing type: " + itos(p_spacing));
+ } break;
+ }
+}
+
+int Font::get_spacing(TextServer::SpacingType p_spacing) const {
+ switch (p_spacing) {
+ case TextServer::SPACING_TOP: {
+ return spacing_top;
+ } break;
+ case TextServer::SPACING_BOTTOM: {
+ return spacing_bottom;
+ } break;
+ default: {
+ ERR_FAIL_V_MSG(0, "Invalid spacing type: " + itos(p_spacing));
+ } break;
}
- return out;
}
-float Font::get_height(int p_size) const {
- float ret = 0.f;
+real_t Font::get_height(int p_size) const {
+ int size = (p_size <= 0) ? base_size : p_size;
+ real_t ret = 0.f;
for (int i = 0; i < data.size(); i++) {
- ret = MAX(ret, data[i]->get_height(p_size));
+ _ensure_rid(i);
+ ret = MAX(ret, TS->font_get_ascent(rids[i], size) + TS->font_get_descent(rids[i], size));
}
- return ret + spacing_top + spacing_bottom;
+ return ret + spacing_bottom + spacing_top;
}
-float Font::get_ascent(int p_size) const {
- float ret = 0.f;
+real_t Font::get_ascent(int p_size) const {
+ int size = (p_size <= 0) ? base_size : p_size;
+ real_t ret = 0.f;
for (int i = 0; i < data.size(); i++) {
- ret = MAX(ret, data[i]->get_ascent(p_size));
+ _ensure_rid(i);
+ ret = MAX(ret, TS->font_get_ascent(rids[i], size));
}
return ret + spacing_top;
}
-float Font::get_descent(int p_size) const {
- float ret = 0.f;
+real_t Font::get_descent(int p_size) const {
+ int size = (p_size <= 0) ? base_size : p_size;
+ real_t ret = 0.f;
for (int i = 0; i < data.size(); i++) {
- ret = MAX(ret, data[i]->get_descent(p_size));
+ _ensure_rid(i);
+ ret = MAX(ret, TS->font_get_descent(rids[i], size));
}
return ret + spacing_bottom;
}
-float Font::get_underline_position(int p_size) const {
- float ret = 0.f;
+real_t Font::get_underline_position(int p_size) const {
+ int size = (p_size <= 0) ? base_size : p_size;
+ real_t ret = 0.f;
for (int i = 0; i < data.size(); i++) {
- ret = MAX(ret, data[i]->get_underline_position(p_size));
+ _ensure_rid(i);
+ ret = MAX(ret, TS->font_get_underline_position(rids[i], size));
}
- return ret;
+ return ret + spacing_top;
}
-float Font::get_underline_thickness(int p_size) const {
- float ret = 0.f;
+real_t Font::get_underline_thickness(int p_size) const {
+ int size = (p_size <= 0) ? base_size : p_size;
+ real_t ret = 0.f;
for (int i = 0; i < data.size(); i++) {
- ret = MAX(ret, data[i]->get_underline_thickness(p_size));
+ _ensure_rid(i);
+ ret = MAX(ret, TS->font_get_underline_thickness(rids[i], size));
}
return ret;
}
-int Font::get_spacing(int p_type) const {
- if (p_type == SPACING_TOP) {
- return spacing_top;
- } else if (p_type == SPACING_BOTTOM) {
- return spacing_bottom;
- }
+Size2 Font::get_string_size(const String &p_text, int p_size, HAlign p_align, real_t p_width, uint8_t p_flags) const {
+ ERR_FAIL_COND_V(data.is_empty(), Size2());
- return 0;
-}
+ int size = (p_size <= 0) ? base_size : p_size;
-void Font::set_spacing(int p_type, int p_value) {
- if (p_type == SPACING_TOP) {
- spacing_top = p_value;
- } else if (p_type == SPACING_BOTTOM) {
- spacing_bottom = p_value;
+ for (int i = 0; i < data.size(); i++) {
+ _ensure_rid(i);
}
- emit_changed();
- notify_property_list_changed();
-}
-
-// Drawing string and string sizes, cached.
-
-Size2 Font::get_string_size(const String &p_text, int p_size) const {
- ERR_FAIL_COND_V(data.is_empty(), Size2());
-
uint64_t hash = p_text.hash64();
- hash = hash_djb2_one_64(p_size, hash);
+ if (p_align == HALIGN_FILL) {
+ hash = hash_djb2_one_64(hash_djb2_one_float(p_width), hash);
+ hash = hash_djb2_one_64(p_flags, hash);
+ }
+ hash = hash_djb2_one_64(size, hash);
Ref<TextLine> buffer;
if (cache.has(hash)) {
buffer = cache.get(hash);
} else {
buffer.instantiate();
- int size = p_size <= 0 ? data[0]->get_base_size() : p_size;
buffer->add_string(p_text, Ref<Font>(this), size, Dictionary(), TranslationServer::get_singleton()->get_tool_locale());
cache.insert(hash, buffer);
}
- if (buffer->get_orientation() == TextServer::ORIENTATION_HORIZONTAL) {
- return buffer->get_size() + Vector2(0, spacing_top + spacing_bottom);
- } else {
- return buffer->get_size() + Vector2(spacing_top + spacing_bottom, 0);
- }
+ return buffer->get_size();
}
-Size2 Font::get_multiline_string_size(const String &p_text, float p_width, int p_size, uint8_t p_flags) const {
+Size2 Font::get_multiline_string_size(const String &p_text, real_t p_width, int p_size, uint8_t p_flags) const {
ERR_FAIL_COND_V(data.is_empty(), Size2());
- uint64_t hash = p_text.hash64();
- hash = hash_djb2_one_64(p_size, hash);
+ int size = (p_size <= 0) ? base_size : p_size;
+ for (int i = 0; i < data.size(); i++) {
+ _ensure_rid(i);
+ }
+
+ uint64_t hash = p_text.hash64();
uint64_t wrp_hash = hash_djb2_one_64(hash_djb2_one_float(p_width), hash);
wrp_hash = hash_djb2_one_64(p_flags, wrp_hash);
+ wrp_hash = hash_djb2_one_64(size, wrp_hash);
Ref<TextParagraph> lines_buffer;
if (cache_wrap.has(wrp_hash)) {
lines_buffer = cache_wrap.get(wrp_hash);
} else {
lines_buffer.instantiate();
- int size = p_size <= 0 ? data[0]->get_base_size() : p_size;
lines_buffer->add_string(p_text, Ref<Font>(this), size, Dictionary(), TranslationServer::get_singleton()->get_tool_locale());
lines_buffer->set_width(p_width);
lines_buffer->set_flags(p_flags);
@@ -851,40 +1456,50 @@ Size2 Font::get_multiline_string_size(const String &p_text, float p_width, int p
Size2 line_size = lines_buffer->get_line_size(i);
if (lines_buffer->get_orientation() == TextServer::ORIENTATION_HORIZONTAL) {
ret.x = MAX(ret.x, line_size.x);
- ret.y += line_size.y + spacing_top + spacing_bottom;
+ ret.y += line_size.y;
} else {
ret.y = MAX(ret.y, line_size.y);
- ret.x += line_size.x + spacing_top + spacing_bottom;
+ ret.x += line_size.x;
}
}
return ret;
}
-void Font::draw_string(RID p_canvas_item, const Point2 &p_pos, const String &p_text, HAlign p_align, float p_width, int p_size, const Color &p_modulate, int p_outline_size, const Color &p_outline_modulate, uint8_t p_flags) const {
+void Font::draw_string(RID p_canvas_item, const Point2 &p_pos, const String &p_text, HAlign p_align, real_t p_width, int p_size, const Color &p_modulate, int p_outline_size, const Color &p_outline_modulate, uint8_t p_flags) const {
ERR_FAIL_COND(data.is_empty());
+ int size = (p_size <= 0) ? base_size : p_size;
+
+ for (int i = 0; i < data.size(); i++) {
+ _ensure_rid(i);
+ }
+
uint64_t hash = p_text.hash64();
- hash = hash_djb2_one_64(p_size, hash);
+ if (p_align == HALIGN_FILL) {
+ hash = hash_djb2_one_64(hash_djb2_one_float(p_width), hash);
+ hash = hash_djb2_one_64(p_flags, hash);
+ }
+ hash = hash_djb2_one_64(size, hash);
Ref<TextLine> buffer;
if (cache.has(hash)) {
buffer = cache.get(hash);
} else {
buffer.instantiate();
- int size = p_size <= 0 ? data[0]->get_base_size() : p_size;
buffer->add_string(p_text, Ref<Font>(this), size, Dictionary(), TranslationServer::get_singleton()->get_tool_locale());
cache.insert(hash, buffer);
}
Vector2 ofs = p_pos;
if (buffer->get_orientation() == TextServer::ORIENTATION_HORIZONTAL) {
- ofs.y += spacing_top - buffer->get_line_ascent();
+ ofs.y -= buffer->get_line_ascent();
} else {
- ofs.x += spacing_top - buffer->get_line_ascent();
+ ofs.x -= buffer->get_line_ascent();
}
buffer->set_width(p_width);
buffer->set_align(p_align);
+ buffer->set_flags(p_flags);
if (p_outline_size > 0 && p_outline_modulate.a != 0.0f) {
buffer->draw_outline(p_canvas_item, ofs, p_outline_size, p_outline_modulate);
@@ -895,18 +1510,22 @@ void Font::draw_string(RID p_canvas_item, const Point2 &p_pos, const String &p_t
void Font::draw_multiline_string(RID p_canvas_item, const Point2 &p_pos, const String &p_text, HAlign p_align, float p_width, int p_max_lines, int p_size, const Color &p_modulate, int p_outline_size, const Color &p_outline_modulate, uint8_t p_flags) const {
ERR_FAIL_COND(data.is_empty());
- uint64_t hash = p_text.hash64();
- hash = hash_djb2_one_64(p_size, hash);
+ int size = (p_size <= 0) ? base_size : p_size;
+ for (int i = 0; i < data.size(); i++) {
+ _ensure_rid(i);
+ }
+
+ uint64_t hash = p_text.hash64();
uint64_t wrp_hash = hash_djb2_one_64(hash_djb2_one_float(p_width), hash);
wrp_hash = hash_djb2_one_64(p_flags, wrp_hash);
+ wrp_hash = hash_djb2_one_64(size, wrp_hash);
Ref<TextParagraph> lines_buffer;
if (cache_wrap.has(wrp_hash)) {
lines_buffer = cache_wrap.get(wrp_hash);
} else {
lines_buffer.instantiate();
- int size = p_size <= 0 ? data[0]->get_base_size() : p_size;
lines_buffer->add_string(p_text, Ref<Font>(this), size, Dictionary(), TranslationServer::get_singleton()->get_tool_locale());
lines_buffer->set_width(p_width);
lines_buffer->set_flags(p_flags);
@@ -918,12 +1537,10 @@ void Font::draw_multiline_string(RID p_canvas_item, const Point2 &p_pos, const S
Vector2 lofs = p_pos;
for (int i = 0; i < lines_buffer->get_line_count(); i++) {
if (lines_buffer->get_orientation() == TextServer::ORIENTATION_HORIZONTAL) {
- lofs.y += spacing_top;
if (i == 0) {
lofs.y -= lines_buffer->get_line_ascent(0);
}
} else {
- lofs.x += spacing_top;
if (i == 0) {
lofs.x -= lines_buffer->get_line_ascent(0);
}
@@ -939,9 +1556,9 @@ void Font::draw_multiline_string(RID p_canvas_item, const Point2 &p_pos, const S
Size2 line_size = lines_buffer->get_line_size(i);
if (lines_buffer->get_orientation() == TextServer::ORIENTATION_HORIZONTAL) {
- lofs.y += line_size.y + spacing_bottom;
+ lofs.y += line_size.y;
} else {
- lofs.x += line_size.x + spacing_bottom;
+ lofs.x += line_size.x;
}
if ((p_max_lines > 0) && (i >= p_max_lines)) {
@@ -950,37 +1567,17 @@ void Font::draw_multiline_string(RID p_canvas_item, const Point2 &p_pos, const S
}
}
-bool Font::has_char(char32_t p_char) const {
- for (int i = 0; i < data.size(); i++) {
- if (data[i]->has_char(p_char)) {
- return true;
- }
- }
- return false;
-}
-
-String Font::get_supported_chars() const {
- String chars;
- for (int i = 0; i < data.size(); i++) {
- String data_chars = data[i]->get_supported_chars();
- for (int j = 0; j < data_chars.length(); j++) {
- if (chars.find_char(data_chars[j]) == -1) {
- chars += data_chars[j];
- }
- }
- }
- return chars;
-}
-
Size2 Font::get_char_size(char32_t p_char, char32_t p_next, int p_size) const {
+ int size = (p_size <= 0) ? base_size : p_size;
+
for (int i = 0; i < data.size(); i++) {
+ _ensure_rid(i);
if (data[i]->has_char(p_char)) {
- int size = p_size <= 0 ? data[i]->get_base_size() : p_size;
- uint32_t glyph_a = data[i]->get_glyph_index(p_char);
- Size2 ret = Size2(data[i]->get_glyph_advance(glyph_a, size).x, data[i]->get_height(size));
+ int32_t glyph_a = TS->font_get_glyph_index(rids[i], size, p_char, 0);
+ Size2 ret = Size2(TS->font_get_glyph_advance(rids[i], size, glyph_a).x, TS->font_get_ascent(rids[i], size) + TS->font_get_descent(rids[i], size));
if ((p_next != 0) && data[i]->has_char(p_next)) {
- uint32_t glyph_b = data[i]->get_glyph_index(p_next);
- ret.x -= data[i]->get_glyph_kerning(glyph_a, glyph_b, size).x;
+ int32_t glyph_b = TS->font_get_glyph_index(rids[i], size, p_next, 0);
+ ret.x -= TS->font_get_kerning(rids[i], size, Vector2i(glyph_a, glyph_b)).x;
}
return ret;
}
@@ -988,35 +1585,55 @@ Size2 Font::get_char_size(char32_t p_char, char32_t p_next, int p_size) const {
return Size2();
}
-float Font::draw_char(RID p_canvas_item, const Point2 &p_pos, char32_t p_char, char32_t p_next, int p_size, const Color &p_modulate, int p_outline_size, const Color &p_outline_modulate) const {
+real_t Font::draw_char(RID p_canvas_item, const Point2 &p_pos, char32_t p_char, char32_t p_next, int p_size, const Color &p_modulate, int p_outline_size, const Color &p_outline_modulate) const {
+ int size = (p_size <= 0) ? base_size : p_size;
+
for (int i = 0; i < data.size(); i++) {
+ _ensure_rid(i);
if (data[i]->has_char(p_char)) {
- int size = p_size <= 0 ? data[i]->get_base_size() : p_size;
- uint32_t glyph_a = data[i]->get_glyph_index(p_char);
- float ret = data[i]->get_glyph_advance(glyph_a, size).x;
+ int32_t glyph_a = TS->font_get_glyph_index(rids[i], size, p_char, 0);
+ real_t ret = TS->font_get_glyph_advance(rids[i], size, glyph_a).x;
if ((p_next != 0) && data[i]->has_char(p_next)) {
- uint32_t glyph_b = data[i]->get_glyph_index(p_next);
- ret -= data[i]->get_glyph_kerning(glyph_a, glyph_b, size).x;
+ int32_t glyph_b = TS->font_get_glyph_index(rids[i], size, p_next, 0);
+ ret -= TS->font_get_kerning(rids[i], size, Vector2i(glyph_a, glyph_b)).x;
}
+
if (p_outline_size > 0 && p_outline_modulate.a != 0.0f) {
- data[i]->draw_glyph_outline(p_canvas_item, size, p_outline_size, p_pos, glyph_a, p_outline_modulate);
+ TS->font_draw_glyph_outline(rids[i], p_canvas_item, size, p_outline_size, p_pos, glyph_a, p_outline_modulate);
}
- data[i]->draw_glyph(p_canvas_item, size, p_pos, glyph_a, p_modulate);
+ TS->font_draw_glyph(rids[i], p_canvas_item, size, p_pos, glyph_a, p_modulate);
return ret;
}
}
return 0;
}
-Vector<RID> Font::get_rids() const {
- Vector<RID> ret;
+bool Font::has_char(char32_t p_char) const {
+ for (int i = 0; i < data.size(); i++) {
+ if (data[i]->has_char(p_char))
+ return true;
+ }
+ return false;
+}
+
+String Font::get_supported_chars() const {
+ String chars;
for (int i = 0; i < data.size(); i++) {
- RID rid = data[i]->get_rid();
- if (rid != RID()) {
- ret.push_back(rid);
+ String data_chars = data[i]->get_supported_chars();
+ for (int j = 0; j < data_chars.length(); j++) {
+ if (chars.find_char(data_chars[j]) == -1) {
+ chars += data_chars[j];
+ }
}
}
- return ret;
+ return chars;
+}
+
+Vector<RID> Font::get_rids() const {
+ for (int i = 0; i < data.size(); i++) {
+ _ensure_rid(i);
+ }
+ return rids;
}
void Font::update_changes() {
@@ -1029,103 +1646,7 @@ Font::Font() {
}
Font::~Font() {
+ clear_data();
cache.clear();
cache_wrap.clear();
}
-
-/*************************************************************************/
-
-RES ResourceFormatLoaderFont::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
- if (r_error) {
- *r_error = ERR_FILE_CANT_OPEN;
- }
-
- Ref<FontData> dfont;
- dfont.instantiate();
- dfont->load_resource(p_path);
-
- if (r_error) {
- *r_error = OK;
- }
-
- return dfont;
-}
-
-void ResourceFormatLoaderFont::get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const {
-#ifndef DISABLE_DEPRECATED
- if (p_type == "DynamicFontData") {
- p_extensions->push_back("ttf");
- p_extensions->push_back("otf");
- p_extensions->push_back("woff");
- return;
- }
- if (p_type == "BitmapFont") { // BitmapFont (*.font, *fnt) is handled by ResourceFormatLoaderCompatFont
- return;
- }
-#endif /* DISABLE_DEPRECATED */
- if (p_type == "" || handles_type(p_type)) {
- get_recognized_extensions(p_extensions);
- }
-}
-
-void ResourceFormatLoaderFont::get_recognized_extensions(List<String> *p_extensions) const {
- p_extensions->push_back("ttf");
- p_extensions->push_back("otf");
- p_extensions->push_back("woff");
- p_extensions->push_back("font");
- p_extensions->push_back("fnt");
-}
-
-bool ResourceFormatLoaderFont::handles_type(const String &p_type) const {
- return (p_type == "FontData");
-}
-
-String ResourceFormatLoaderFont::get_resource_type(const String &p_path) const {
- String el = p_path.get_extension().to_lower();
- if (el == "ttf" || el == "otf" || el == "woff" || el == "font" || el == "fnt") {
- return "FontData";
- }
- return "";
-}
-
-#ifndef DISABLE_DEPRECATED
-
-RES ResourceFormatLoaderCompatFont::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
- if (r_error) {
- *r_error = ERR_FILE_CANT_OPEN;
- }
-
- Ref<FontData> dfont;
- dfont.instantiate();
- dfont->load_resource(p_path);
-
- Ref<Font> font;
- font.instantiate();
- font->add_data(dfont);
-
- if (r_error) {
- *r_error = OK;
- }
-
- return font;
-}
-
-void ResourceFormatLoaderCompatFont::get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const {
- if (p_type == "BitmapFont") {
- p_extensions->push_back("font");
- p_extensions->push_back("fnt");
- }
-}
-
-void ResourceFormatLoaderCompatFont::get_recognized_extensions(List<String> *p_extensions) const {
-}
-
-bool ResourceFormatLoaderCompatFont::handles_type(const String &p_type) const {
- return (p_type == "Font");
-}
-
-String ResourceFormatLoaderCompatFont::get_resource_type(const String &p_path) const {
- return "";
-}
-
-#endif /* DISABLE_DEPRECATED */
diff --git a/scene/resources/font.h b/scene/resources/font.h
index 200373aa8c..9a34edce64 100644
--- a/scene/resources/font.h
+++ b/scene/resources/font.h
@@ -41,17 +41,27 @@
class FontData : public Resource {
GDCLASS(FontData, Resource);
+ RES_BASE_EXTENSION("fontdata");
-public:
- enum SpacingType {
- SPACING_GLYPH,
- SPACING_SPACE,
- };
+ // Font source data.
+ const uint8_t *data_ptr = nullptr;
+ size_t data_size = 0;
+ PackedByteArray data;
-private:
- RID rid;
- int base_size = 16;
- String path;
+ bool antialiased = true;
+ bool msdf = false;
+ int msdf_pixel_range = 16;
+ int msdf_size = 48;
+ int fixed_size = 0;
+ bool force_autohinter = false;
+ TextServer::Hinting hinting = TextServer::HINTING_LIGHT;
+ real_t oversampling = 0.f;
+
+ // Cache.
+ mutable Vector<RID> cache;
+
+ _FORCE_INLINE_ void _clear_cache();
+ _FORCE_INLINE_ void _ensure_rid(int p_cache_index) const;
protected:
static void _bind_methods();
@@ -63,79 +73,132 @@ protected:
virtual void reset_state() override;
public:
- virtual RID get_rid() const override;
+ // Font source data.
+ virtual void set_data_ptr(const uint8_t *p_data, size_t p_size);
+ virtual void set_data(const PackedByteArray &p_data);
+ virtual PackedByteArray get_data() const;
- void load_resource(const String &p_filename, int p_base_size = 16);
- void load_memory(const uint8_t *p_data, size_t p_size, const String &p_type, int p_base_size = 16);
- void _load_memory(const PackedByteArray &p_data, const String &p_type, int p_base_size = 16);
+ // Common properties.
+ virtual void set_antialiased(bool p_antialiased);
+ virtual bool is_antialiased() const;
- void new_bitmap(float p_height, float p_ascent, int p_base_size = 16);
+ virtual void set_multichannel_signed_distance_field(bool p_msdf);
+ virtual bool is_multichannel_signed_distance_field() const;
- void bitmap_add_texture(const Ref<Texture> &p_texture);
- void bitmap_add_char(char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance);
- void bitmap_add_kerning_pair(char32_t p_A, char32_t p_B, int p_kerning);
+ virtual void set_msdf_pixel_range(int p_msdf_pixel_range);
+ virtual int get_msdf_pixel_range() const;
- void set_data_path(const String &p_path);
- String get_data_path() const;
+ virtual void set_msdf_size(int p_msdf_size);
+ virtual int get_msdf_size() const;
- float get_height(int p_size) const;
- float get_ascent(int p_size) const;
- float get_descent(int p_size) const;
+ virtual void set_fixed_size(int p_fixed_size);
+ virtual int get_fixed_size() const;
- Dictionary get_feature_list() const;
- Dictionary get_variation_list() const;
+ virtual void set_force_autohinter(bool p_force_autohinter);
+ virtual bool is_force_autohinter() const;
- void set_variation(const String &p_name, double p_value);
- double get_variation(const String &p_name) const;
+ virtual void set_hinting(TextServer::Hinting p_hinting);
+ virtual TextServer::Hinting get_hinting() const;
- float get_underline_position(int p_size) const;
- float get_underline_thickness(int p_size) const;
+ virtual void set_oversampling(real_t p_oversampling);
+ virtual real_t get_oversampling() const;
- int get_spacing(int p_type) const;
- void set_spacing(int p_type, int p_value);
+ // Cache.
+ virtual RID find_cache(const Dictionary &p_variation_coordinates) const;
- void set_antialiased(bool p_antialiased);
- bool get_antialiased() const;
+ virtual int get_cache_count() const;
+ virtual void clear_cache();
+ virtual void remove_cache(int p_cache_index);
- void set_distance_field_hint(bool p_distance_field);
- bool get_distance_field_hint() const;
+ virtual Array get_size_cache_list(int p_cache_index) const;
+ virtual void clear_size_cache(int p_cache_index);
+ virtual void remove_size_cache(int p_cache_index, const Vector2i &p_size);
- void set_force_autohinter(bool p_enabeld);
- bool get_force_autohinter() const;
+ virtual void set_variation_coordinates(int p_cache_index, const Dictionary &p_variation_coordinates);
+ virtual Dictionary get_variation_coordinates(int p_cache_index) const;
- void set_hinting(TextServer::Hinting p_hinting);
- TextServer::Hinting get_hinting() const;
+ virtual void set_ascent(int p_cache_index, int p_size, real_t p_ascent);
+ virtual real_t get_ascent(int p_cache_index, int p_size) const;
- bool has_char(char32_t p_char) const;
- String get_supported_chars() const;
+ virtual void set_descent(int p_cache_index, int p_size, real_t p_descent);
+ virtual real_t get_descent(int p_cache_index, int p_size) const;
- Vector2 get_glyph_advance(uint32_t p_index, int p_size) const;
- Vector2 get_glyph_kerning(uint32_t p_index_a, uint32_t p_index_b, int p_size) const;
+ virtual void set_underline_position(int p_cache_index, int p_size, real_t p_underline_position);
+ virtual real_t get_underline_position(int p_cache_index, int p_size) const;
- bool has_outline() const;
- float get_base_size() const;
+ virtual void set_underline_thickness(int p_cache_index, int p_size, real_t p_underline_thickness);
+ virtual real_t get_underline_thickness(int p_cache_index, int p_size) const;
- bool is_language_supported(const String &p_language) const;
- void set_language_support_override(const String &p_language, bool p_supported);
- bool get_language_support_override(const String &p_language) const;
- void remove_language_support_override(const String &p_language);
- Vector<String> get_language_support_overrides() const;
+ virtual void set_scale(int p_cache_index, int p_size, real_t p_scale); // Rendering scale for bitmap fonts (e.g. emoji fonts).
+ virtual real_t get_scale(int p_cache_index, int p_size) const;
- bool is_script_supported(const String &p_script) const;
- void set_script_support_override(const String &p_script, bool p_supported);
- bool get_script_support_override(const String &p_script) const;
- void remove_script_support_override(const String &p_script);
- Vector<String> get_script_support_overrides() const;
+ virtual void set_spacing(int p_cache_index, int p_size, TextServer::SpacingType p_spacing, int p_value);
+ virtual int get_spacing(int p_cache_index, int p_size, TextServer::SpacingType p_spacing) const;
- uint32_t get_glyph_index(char32_t p_char, char32_t p_variation_selector = 0x0000) const;
+ virtual int get_texture_count(int p_cache_index, const Vector2i &p_size) const;
+ virtual void clear_textures(int p_cache_index, const Vector2i &p_size);
+ virtual void remove_texture(int p_cache_index, const Vector2i &p_size, int p_texture_index);
- Vector2 draw_glyph(RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color = Color(1, 1, 1)) const;
- Vector2 draw_glyph_outline(RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color = Color(1, 1, 1)) const;
+ virtual void set_texture_image(int p_cache_index, const Vector2i &p_size, int p_texture_index, const Ref<Image> &p_image);
+ virtual Ref<Image> get_texture_image(int p_cache_index, const Vector2i &p_size, int p_texture_index) const;
- FontData();
- FontData(const String &p_filename, int p_base_size);
- FontData(const PackedByteArray &p_data, const String &p_type, int p_base_size);
+ virtual void set_texture_offsets(int p_cache_index, const Vector2i &p_size, int p_texture_index, const PackedInt32Array &p_offset);
+ virtual PackedInt32Array get_texture_offsets(int p_cache_index, const Vector2i &p_size, int p_texture_index) const;
+
+ virtual Array get_glyph_list(int p_cache_index, const Vector2i &p_size) const;
+ virtual void clear_glyphs(int p_cache_index, const Vector2i &p_size);
+ virtual void remove_glyph(int p_cache_index, const Vector2i &p_size, int32_t p_glyph);
+
+ virtual void set_glyph_advance(int p_cache_index, int p_size, int32_t p_glyph, const Vector2 &p_advance);
+ virtual Vector2 get_glyph_advance(int p_cache_index, int p_size, int32_t p_glyph) const;
+
+ virtual void set_glyph_offset(int p_cache_index, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_offset);
+ virtual Vector2 get_glyph_offset(int p_cache_index, const Vector2i &p_size, int32_t p_glyph) const;
+
+ virtual void set_glyph_size(int p_cache_index, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_gl_size);
+ virtual Vector2 get_glyph_size(int p_cache_index, const Vector2i &p_size, int32_t p_glyph) const;
+
+ virtual void set_glyph_uv_rect(int p_cache_index, const Vector2i &p_size, int32_t p_glyph, const Rect2 &p_uv_rect);
+ virtual Rect2 get_glyph_uv_rect(int p_cache_index, const Vector2i &p_size, int32_t p_glyph) const;
+
+ virtual void set_glyph_texture_idx(int p_cache_index, const Vector2i &p_size, int32_t p_glyph, int p_texture_idx);
+ virtual int get_glyph_texture_idx(int p_cache_index, const Vector2i &p_size, int32_t p_glyph) const;
+ virtual Array get_kerning_list(int p_cache_index, int p_size) const;
+ virtual void clear_kerning_map(int p_cache_index, int p_size);
+ virtual void remove_kerning(int p_cache_index, int p_size, const Vector2i &p_glyph_pair);
+
+ virtual void set_kerning(int p_cache_index, int p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning);
+ virtual Vector2 get_kerning(int p_cache_index, int p_size, const Vector2i &p_glyph_pair) const;
+
+ virtual void render_range(int p_cache_index, const Vector2i &p_size, char32_t p_start, char32_t p_end);
+ virtual void render_glyph(int p_cache_index, const Vector2i &p_size, int32_t p_index);
+
+ virtual RID get_cache_rid(int p_cache_index) const;
+
+ // Language/script support override.
+ virtual bool is_language_supported(const String &p_language) const;
+ virtual void set_language_support_override(const String &p_language, bool p_supported);
+ virtual bool get_language_support_override(const String &p_language) const;
+ virtual void remove_language_support_override(const String &p_language);
+ virtual Vector<String> get_language_support_overrides() const;
+
+ virtual bool is_script_supported(const String &p_script) const;
+ virtual void set_script_support_override(const String &p_script, bool p_supported);
+ virtual bool get_script_support_override(const String &p_script) const;
+ virtual void remove_script_support_override(const String &p_script);
+ virtual Vector<String> get_script_support_overrides() const;
+
+ // Base font properties.
+ virtual bool has_char(char32_t p_char) const;
+ virtual String get_supported_chars() const;
+
+ virtual int32_t get_glyph_index(int p_size, char32_t p_char, char32_t p_variation_selector = 0x0000) const;
+
+ virtual Dictionary get_supported_feature_list() const;
+ virtual Dictionary get_supported_variation_list() const;
+
+ FontData();
~FontData();
};
@@ -147,20 +210,22 @@ class TextParagraph;
class Font : public Resource {
GDCLASS(Font, Resource);
-public:
- enum SpacingType {
- SPACING_TOP,
- SPACING_BOTTOM,
- };
-
-private:
- int spacing_top = 0;
- int spacing_bottom = 0;
-
+ // Shaped string cache.
mutable LRUCache<uint64_t, Ref<TextLine>> cache;
mutable LRUCache<uint64_t, Ref<TextParagraph>> cache_wrap;
+ // Font data cache.
Vector<Ref<FontData>> data;
+ mutable Vector<RID> rids;
+
+ // Font config.
+ int base_size = 16;
+ Dictionary variation_coordinates;
+ int spacing_bottom = 0;
+ int spacing_top = 0;
+
+ _FORCE_INLINE_ void _data_changed();
+ _FORCE_INLINE_ void _ensure_rid(int p_index) const; // Find or create cache record.
protected:
static void _bind_methods();
@@ -171,41 +236,49 @@ protected:
virtual void reset_state() override;
- void _data_changed();
-
public:
Dictionary get_feature_list() const;
- // Font data control.
- void add_data(const Ref<FontData> &p_data);
- void set_data(int p_idx, const Ref<FontData> &p_data);
- int get_data_count() const;
- Ref<FontData> get_data(int p_idx) const;
- void remove_data(int p_idx);
+ // Font data.
+ virtual void add_data(const Ref<FontData> &p_data);
+ virtual void set_data(int p_idx, const Ref<FontData> &p_data);
+ virtual int get_data_count() const;
+ virtual Ref<FontData> get_data(int p_idx) const;
+ virtual RID get_data_rid(int p_idx) const;
+ virtual void clear_data();
+ virtual void remove_data(int p_idx);
+
+ // Font configuration.
+ virtual void set_base_size(int p_size);
+ virtual int get_base_size() const;
- float get_height(int p_size = -1) const;
- float get_ascent(int p_size = -1) const;
- float get_descent(int p_size = -1) const;
+ virtual void set_variation_coordinates(const Dictionary &p_variation_coordinates);
+ virtual Dictionary get_variation_coordinates() const;
- float get_underline_position(int p_size = -1) const;
- float get_underline_thickness(int p_size = -1) const;
+ virtual void set_spacing(TextServer::SpacingType p_spacing, int p_value);
+ virtual int get_spacing(TextServer::SpacingType p_spacing) const;
- int get_spacing(int p_type) const;
- void set_spacing(int p_type, int p_value);
+ // Font metrics.
+ virtual real_t get_height(int p_size = -1) const;
+ virtual real_t get_ascent(int p_size = -1) const;
+ virtual real_t get_descent(int p_size = -1) const;
+ virtual real_t get_underline_position(int p_size = -1) const;
+ virtual real_t get_underline_thickness(int p_size = -1) const;
// Drawing string.
- Size2 get_string_size(const String &p_text, int p_size = -1) const;
- Size2 get_multiline_string_size(const String &p_text, float p_width = -1, int p_size = -1, uint8_t p_flags = TextServer::BREAK_MANDATORY | TextServer::BREAK_WORD_BOUND) const;
+ virtual Size2 get_string_size(const String &p_text, int p_size = -1, HAlign p_align = HALIGN_LEFT, real_t p_width = -1, uint8_t p_flags = TextServer::JUSTIFICATION_KASHIDA | TextServer::JUSTIFICATION_WORD_BOUND) const;
+ virtual Size2 get_multiline_string_size(const String &p_text, real_t p_width = -1, int p_size = -1, uint8_t p_flags = TextServer::BREAK_MANDATORY | TextServer::BREAK_WORD_BOUND) const;
- void draw_string(RID p_canvas_item, const Point2 &p_pos, const String &p_text, HAlign p_align = HALIGN_LEFT, float p_width = -1, int p_size = -1, const Color &p_modulate = Color(1, 1, 1), int p_outline_size = 0, const Color &p_outline_modulate = Color(1, 1, 1, 0), uint8_t p_flags = TextServer::JUSTIFICATION_KASHIDA | TextServer::JUSTIFICATION_WORD_BOUND) const;
- void draw_multiline_string(RID p_canvas_item, const Point2 &p_pos, const String &p_text, HAlign p_align = HALIGN_LEFT, float p_width = -1, int p_max_lines = -1, int p_size = -1, const Color &p_modulate = Color(1, 1, 1), int p_outline_size = 0, const Color &p_outline_modulate = Color(1, 1, 1, 0), uint8_t p_flags = TextServer::BREAK_MANDATORY | TextServer::BREAK_WORD_BOUND | TextServer::JUSTIFICATION_KASHIDA | TextServer::JUSTIFICATION_WORD_BOUND) const;
+ virtual void draw_string(RID p_canvas_item, const Point2 &p_pos, const String &p_text, HAlign p_align = HALIGN_LEFT, real_t p_width = -1, int p_size = -1, const Color &p_modulate = Color(1, 1, 1), int p_outline_size = 0, const Color &p_outline_modulate = Color(1, 1, 1, 0), uint8_t p_flags = TextServer::JUSTIFICATION_KASHIDA | TextServer::JUSTIFICATION_WORD_BOUND) const;
+ virtual void draw_multiline_string(RID p_canvas_item, const Point2 &p_pos, const String &p_text, HAlign p_align = HALIGN_LEFT, real_t p_width = -1, int p_max_lines = -1, int p_size = -1, const Color &p_modulate = Color(1, 1, 1), int p_outline_size = 0, const Color &p_outline_modulate = Color(1, 1, 1, 0), uint8_t p_flags = TextServer::BREAK_MANDATORY | TextServer::BREAK_WORD_BOUND | TextServer::JUSTIFICATION_KASHIDA | TextServer::JUSTIFICATION_WORD_BOUND) const;
// Helper functions.
- bool has_char(char32_t p_char) const;
- String get_supported_chars() const;
+ virtual bool has_char(char32_t p_char) const;
+ virtual String get_supported_chars() const;
- Size2 get_char_size(char32_t p_char, char32_t p_next = 0, int p_size = -1) const;
- float draw_char(RID p_canvas_item, const Point2 &p_pos, char32_t p_char, char32_t p_next = 0, int p_size = -1, const Color &p_modulate = Color(1, 1, 1), int p_outline_size = 0, const Color &p_outline_modulate = Color(1, 1, 1, 0)) const;
+ // Drawing char.
+ virtual Size2 get_char_size(char32_t p_char, char32_t p_next = 0, int p_size = -1) const;
+ virtual real_t draw_char(RID p_canvas_item, const Point2 &p_pos, char32_t p_char, char32_t p_next = 0, int p_size = -1, const Color &p_modulate = Color(1, 1, 1), int p_outline_size = 0, const Color &p_outline_modulate = Color(1, 1, 1, 0)) const;
Vector<RID> get_rids() const;
@@ -215,31 +288,4 @@ public:
~Font();
};
-VARIANT_ENUM_CAST(FontData::SpacingType);
-VARIANT_ENUM_CAST(Font::SpacingType);
-
-/*************************************************************************/
-
-class ResourceFormatLoaderFont : public ResourceFormatLoader {
-public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
- virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
- virtual void get_recognized_extensions(List<String> *p_extensions) const;
- virtual bool handles_type(const String &p_type) const;
- virtual String get_resource_type(const String &p_path) const;
-};
-
-#ifndef DISABLE_DEPRECATED
-
-class ResourceFormatLoaderCompatFont : public ResourceFormatLoader {
-public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
- virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
- virtual void get_recognized_extensions(List<String> *p_extensions) const;
- virtual bool handles_type(const String &p_type) const;
- virtual String get_resource_type(const String &p_path) const;
-};
-
-#endif /* DISABLE_DEPRECATED */
-
#endif /* FONT_H */
diff --git a/scene/resources/immediate_mesh.cpp b/scene/resources/immediate_mesh.cpp
index 05d1a7bf94..fe7124de9e 100644
--- a/scene/resources/immediate_mesh.cpp
+++ b/scene/resources/immediate_mesh.cpp
@@ -335,9 +335,6 @@ int ImmediateMesh::surface_get_array_len(int p_idx) const {
int ImmediateMesh::surface_get_array_index_len(int p_idx) const {
return 0;
}
-bool ImmediateMesh::surface_is_softbody_friendly(int p_idx) const {
- return false;
-}
Array ImmediateMesh::surface_get_arrays(int p_surface) const {
ERR_FAIL_INDEX_V(p_surface, int(surfaces.size()), Array());
return RS::get_singleton()->mesh_surface_get_arrays(mesh, p_surface);
diff --git a/scene/resources/immediate_mesh.h b/scene/resources/immediate_mesh.h
index 7010d40719..6673ee6f3d 100644
--- a/scene/resources/immediate_mesh.h
+++ b/scene/resources/immediate_mesh.h
@@ -94,7 +94,6 @@ public:
virtual int get_surface_count() const override;
virtual int surface_get_array_len(int p_idx) const override;
virtual int surface_get_array_index_len(int p_idx) const override;
- virtual bool surface_is_softbody_friendly(int p_idx) const override;
virtual Array surface_get_arrays(int p_surface) const override;
virtual Array surface_get_blend_shape_arrays(int p_surface) const override;
virtual Dictionary surface_get_lods(int p_surface) const override;
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 1d2a2ef26c..3a6af3afb0 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -790,12 +790,10 @@ void BaseMaterial3D::_update_shader() {
}
} break;
case BILLBOARD_FIXED_Y: {
- code += " MODELVIEW_MATRIX = INV_CAMERA_MATRIX * mat4(CAMERA_MATRIX[0],WORLD_MATRIX[1],vec4(normalize(cross(CAMERA_MATRIX[0].xyz,WORLD_MATRIX[1].xyz)), 0.0),WORLD_MATRIX[3]);\n";
+ code += " MODELVIEW_MATRIX = INV_CAMERA_MATRIX * mat4(vec4(normalize(cross(vec3(0.0, 1.0, 0.0), CAMERA_MATRIX[2].xyz)),0.0),vec4(0.0, 1.0, 0.0, 0.0),vec4(normalize(cross(CAMERA_MATRIX[0].xyz, vec3(0.0, 1.0, 0.0))),0.0),WORLD_MATRIX[3]);\n";
if (flags[FLAG_BILLBOARD_KEEP_SCALE]) {
- code += " MODELVIEW_MATRIX = MODELVIEW_MATRIX * mat4(vec4(length(WORLD_MATRIX[0].xyz), 0.0, 0.0, 0.0),vec4(0.0, 1.0, 0.0, 0.0),vec4(0.0, 0.0, length(WORLD_MATRIX[2].xyz), 0.0), vec4(0.0, 0.0, 0.0, 1.0));\n";
- } else {
- code += " MODELVIEW_MATRIX = MODELVIEW_MATRIX * mat4(vec4(1.0, 0.0, 0.0, 0.0),vec4(0.0, 1.0/length(WORLD_MATRIX[1].xyz), 0.0, 0.0), vec4(0.0, 0.0, 1.0, 0.0),vec4(0.0, 0.0, 0.0 ,1.0));\n";
+ code += " MODELVIEW_MATRIX = MODELVIEW_MATRIX * mat4(vec4(length(WORLD_MATRIX[0].xyz), 0.0, 0.0, 0.0),vec4(0.0, length(WORLD_MATRIX[1].xyz), 0.0, 0.0),vec4(0.0, 0.0, length(WORLD_MATRIX[2].xyz), 0.0),vec4(0.0, 0.0, 0.0, 1.0));\n";
}
} break;
case BILLBOARD_PARTICLES: {
@@ -963,7 +961,9 @@ void BaseMaterial3D::_update_shader() {
} else {
code += " float depth = 1.0 - texture(texture_heightmap, base_uv).r;\n";
}
- code += " vec2 ofs = base_uv - view_dir.xy / view_dir.z * (depth * heightmap_scale);\n";
+ // Use offset limiting to improve the appearance of non-deep parallax.
+ // This reduces the impression of depth, but avoids visible warping in the distance.
+ code += " vec2 ofs = base_uv - view_dir.xy * depth * heightmap_scale;\n";
}
code += " base_uv=ofs;\n";
@@ -1301,7 +1301,7 @@ void BaseMaterial3D::flush_changes() {
void BaseMaterial3D::_queue_shader_change() {
MutexLock lock(material_mutex);
- if (!element.in_list()) {
+ if (is_initialized && !element.in_list()) {
dirty_materials->add(&element);
}
}
@@ -2777,6 +2777,7 @@ BaseMaterial3D::BaseMaterial3D(bool p_orm) :
flags[FLAG_USE_TEXTURE_REPEAT] = true;
+ is_initialized = true;
_queue_shader_change();
}
diff --git a/scene/resources/material.h b/scene/resources/material.h
index e2838e1399..5d7a5324ca 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -440,6 +440,7 @@ private:
_FORCE_INLINE_ void _queue_shader_change();
_FORCE_INLINE_ bool _is_shader_dirty() const;
+ bool is_initialized = false;
bool orm;
Color albedo;
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index ad589a605e..67db8c1a10 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -38,7 +38,7 @@
#include <stdlib.h>
-Mesh::ConvexDecompositionFunc Mesh::convex_composition_function = nullptr;
+Mesh::ConvexDecompositionFunc Mesh::convex_decomposition_function = nullptr;
Ref<TriangleMesh> Mesh::generate_triangle_mesh() const {
if (triangle_mesh.is_valid()) {
@@ -156,75 +156,19 @@ void Mesh::generate_debug_mesh_indices(Vector<Vector3> &r_points) {
}
}
-bool Mesh::surface_is_softbody_friendly(int p_idx) const {
- const uint32_t surface_format = surface_get_format(p_idx);
- return (surface_format & Mesh::ARRAY_FLAG_USE_DYNAMIC_UPDATE);
-}
-
Vector<Face3> Mesh::get_faces() const {
Ref<TriangleMesh> tm = generate_triangle_mesh();
if (tm.is_valid()) {
return tm->get_faces();
}
return Vector<Face3>();
- /*
- for (int i=0;i<surfaces.size();i++) {
- if (RenderingServer::get_singleton()->mesh_surface_get_primitive_type( mesh, i ) != RenderingServer::PRIMITIVE_TRIANGLES )
- continue;
-
- Vector<int> indices;
- Vector<Vector3> vertices;
-
- vertices=RenderingServer::get_singleton()->mesh_surface_get_array(mesh, i,RenderingServer::ARRAY_VERTEX);
-
- int len=RenderingServer::get_singleton()->mesh_surface_get_array_index_len(mesh, i);
- bool has_indices;
-
- if (len>0) {
- indices=RenderingServer::get_singleton()->mesh_surface_get_array(mesh, i,RenderingServer::ARRAY_INDEX);
- has_indices=true;
-
- } else {
- len=vertices.size();
- has_indices=false;
- }
-
- if (len<=0)
- continue;
-
- const int* indicesr = indices.ptr();
- const int *indicesptr = indicesr.ptr();
-
- const Vector3* verticesr = vertices.ptr();
- const Vector3 *verticesptr = verticesr.ptr();
-
- int old_faces=faces.size();
- int new_faces=old_faces+(len/3);
-
- faces.resize(new_faces);
-
- Face3* facesw = faces.ptrw();
- Face3 *facesptr=facesw.ptr();
-
-
- for (int i=0;i<len/3;i++) {
- Face3 face;
-
- for (int j=0;j<3;j++) {
- int idx=i*3+j;
- face.vertex[j] = has_indices ? verticesptr[ indicesptr[ idx ] ] : verticesptr[idx];
- }
-
- facesptr[i+old_faces]=face;
- }
-
- }
-*/
}
Ref<Shape3D> Mesh::create_convex_shape(bool p_clean, bool p_simplify) const {
if (p_simplify) {
- Vector<Ref<Shape3D>> decomposed = convex_decompose(1);
+ ConvexDecompositionSettings settings;
+ settings.max_convex_hulls = 1;
+ Vector<Ref<Shape3D>> decomposed = convex_decompose(settings);
if (decomposed.size() == 1) {
return decomposed[0];
} else {
@@ -543,6 +487,7 @@ void Mesh::_bind_methods() {
BIND_ENUM_CONSTANT(ARRAY_FORMAT_BLEND_SHAPE_MASK);
BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM_BASE);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM_BITS);
BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM0_SHIFT);
BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM1_SHIFT);
BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM2_SHIFT);
@@ -564,36 +509,37 @@ void Mesh::clear_cache() const {
debug_lines.clear();
}
-Vector<Ref<Shape3D>> Mesh::convex_decompose(int p_max_convex_hulls) const {
- ERR_FAIL_COND_V(!convex_composition_function, Vector<Ref<Shape3D>>());
+Vector<Ref<Shape3D>> Mesh::convex_decompose(const ConvexDecompositionSettings &p_settings) const {
+ ERR_FAIL_COND_V(!convex_decomposition_function, Vector<Ref<Shape3D>>());
- const Vector<Face3> faces = get_faces();
-
- Vector<Vector<Face3>> decomposed = convex_composition_function(faces, p_max_convex_hulls);
+ Ref<TriangleMesh> tm = generate_triangle_mesh();
+ ERR_FAIL_COND_V(!tm.is_valid(), Vector<Ref<Shape3D>>());
- Vector<Ref<Shape3D>> ret;
+ const Vector<TriangleMesh::Triangle> &triangles = tm->get_triangles();
+ int triangle_count = triangles.size();
- for (int i = 0; i < decomposed.size(); i++) {
- Set<Vector3> points;
- for (int j = 0; j < decomposed[i].size(); j++) {
- points.insert(decomposed[i][j].vertex[0]);
- points.insert(decomposed[i][j].vertex[1]);
- points.insert(decomposed[i][j].vertex[2]);
- }
-
- Vector<Vector3> convex_points;
- convex_points.resize(points.size());
- {
- Vector3 *w = convex_points.ptrw();
- int idx = 0;
- for (Set<Vector3>::Element *E = points.front(); E; E = E->next()) {
- w[idx++] = E->get();
+ Vector<uint32_t> indices;
+ {
+ indices.resize(triangle_count * 3);
+ uint32_t *w = indices.ptrw();
+ for (int i = 0; i < triangle_count; i++) {
+ for (int j = 0; j < 3; j++) {
+ w[i * 3 + j] = triangles[i].indices[j];
}
}
+ }
+
+ const Vector<Vector3> &vertices = tm->get_vertices();
+ int vertex_count = vertices.size();
+ Vector<Vector<Vector3>> decomposed = convex_decomposition_function((real_t *)vertices.ptr(), vertex_count, indices.ptr(), triangle_count, p_settings, nullptr);
+
+ Vector<Ref<Shape3D>> ret;
+
+ for (int i = 0; i < decomposed.size(); i++) {
Ref<ConvexPolygonShape3D> shape;
shape.instantiate();
- shape->set_points(convex_points);
+ shape->set_points(decomposed[i]);
ret.push_back(shape);
}
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h
index 27b0eb098b..8d5571d67c 100644
--- a/scene/resources/mesh.h
+++ b/scene/resources/mesh.h
@@ -105,6 +105,7 @@ public:
ARRAY_FORMAT_BLEND_SHAPE_MASK = RS::ARRAY_FORMAT_BLEND_SHAPE_MASK,
ARRAY_FORMAT_CUSTOM_BASE = RS::ARRAY_FORMAT_CUSTOM_BASE,
+ ARRAY_FORMAT_CUSTOM_BITS = RS::ARRAY_FORMAT_CUSTOM_BITS,
ARRAY_FORMAT_CUSTOM0_SHIFT = RS::ARRAY_FORMAT_CUSTOM0_SHIFT,
ARRAY_FORMAT_CUSTOM1_SHIFT = RS::ARRAY_FORMAT_CUSTOM1_SHIFT,
ARRAY_FORMAT_CUSTOM2_SHIFT = RS::ARRAY_FORMAT_CUSTOM2_SHIFT,
@@ -131,7 +132,6 @@ public:
virtual int get_surface_count() const = 0;
virtual int surface_get_array_len(int p_idx) const = 0;
virtual int surface_get_array_index_len(int p_idx) const = 0;
- virtual bool surface_is_softbody_friendly(int p_idx) const;
virtual Array surface_get_arrays(int p_surface) const = 0;
virtual Array surface_get_blend_shape_arrays(int p_surface) const = 0;
virtual Dictionary surface_get_lods(int p_surface) const = 0;
@@ -159,11 +159,42 @@ public:
Size2i get_lightmap_size_hint() const;
void clear_cache() const;
- typedef Vector<Vector<Face3>> (*ConvexDecompositionFunc)(const Vector<Face3> &p_faces, int p_max_convex_hulls);
+ struct ConvexDecompositionSettings {
+ enum Mode : int {
+ CONVEX_DECOMPOSITION_MODE_VOXEL = 0,
+ CONVEX_DECOMPOSITION_MODE_TETRAHEDRON
+ };
+
+ /// Maximum concavity. [Range: 0.0 -> 1.0]
+ real_t max_concavity = 1.0;
+ /// Controls the bias toward clipping along symmetry planes. [Range: 0.0 -> 1.0]
+ real_t symmetry_planes_clipping_bias = 0.05;
+ /// Controls the bias toward clipping along revolution axes. [Range: 0.0 -> 1.0]
+ real_t revolution_axes_clipping_bias = 0.05;
+ real_t min_volume_per_convex_hull = 0.0001;
+ /// Maximum number of voxels generated during the voxelization stage.
+ uint32_t resolution = 10'000;
+ uint32_t max_num_vertices_per_convex_hull = 32;
+ /// Controls the granularity of the search for the "best" clipping plane.
+ /// [Range: 1 -> 16]
+ uint32_t plane_downsampling = 4;
+ /// Controls the precision of the convex-hull generation process during the
+ /// clipping plane selection stage.
+ /// [Range: 1 -> 16]
+ uint32_t convexhull_downsampling = 4;
+ /// enable/disable normalizing the mesh before applying the convex decomposition.
+ bool normalize_mesh = false;
+ Mode mode = CONVEX_DECOMPOSITION_MODE_VOXEL;
+ bool convexhull_approximation = true;
+ /// This is the maximum number of convex hulls to produce from the merge operation.
+ uint32_t max_convex_hulls = 1;
+ bool project_hull_vertices = true;
+ };
+ typedef Vector<Vector<Vector3>> (*ConvexDecompositionFunc)(const real_t *p_vertices, int p_vertex_count, const uint32_t *p_triangles, int p_triangle_count, const ConvexDecompositionSettings &p_settings, Vector<Vector<uint32_t>> *r_convex_indices);
- static ConvexDecompositionFunc convex_composition_function;
+ static ConvexDecompositionFunc convex_decomposition_function;
- Vector<Ref<Shape3D>> convex_decompose(int p_max_convex_hulls = -1) const;
+ Vector<Ref<Shape3D>> convex_decompose(const ConvexDecompositionSettings &p_settings) const;
virtual int get_builtin_bind_pose_count() const;
virtual Transform3D get_builtin_bind_pose(int p_index) const;
diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp
index 33c9ca6d1e..cfb7c3e037 100644
--- a/scene/resources/mesh_library.cpp
+++ b/scene/resources/mesh_library.cpp
@@ -43,6 +43,8 @@ bool MeshLibrary::_set(const StringName &p_name, const Variant &p_value) {
set_item_name(idx, p_value);
} else if (what == "mesh") {
set_item_mesh(idx, p_value);
+ } else if (what == "mesh_transform") {
+ set_item_mesh_transform(idx, p_value);
} else if (what == "shape") {
Vector<ShapeData> shapes;
ShapeData sd;
@@ -77,6 +79,8 @@ bool MeshLibrary::_get(const StringName &p_name, Variant &r_ret) const {
r_ret = get_item_name(idx);
} else if (what == "mesh") {
r_ret = get_item_mesh(idx);
+ } else if (what == "mesh_transform") {
+ r_ret = get_item_mesh_transform(idx);
} else if (what == "shapes") {
r_ret = _get_item_shapes(idx);
} else if (what == "navmesh") {
@@ -127,6 +131,14 @@ void MeshLibrary::set_item_mesh(int p_item, const Ref<Mesh> &p_mesh) {
notify_property_list_changed();
}
+void MeshLibrary::set_item_mesh_transform(int p_item, const Transform3D &p_transform) {
+ ERR_FAIL_COND_MSG(!item_map.has(p_item), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'.");
+ item_map[p_item].mesh_transform = p_transform;
+ notify_change_to_owners();
+ emit_changed();
+ notify_property_list_changed();
+}
+
void MeshLibrary::set_item_shapes(int p_item, const Vector<ShapeData> &p_shapes) {
ERR_FAIL_COND_MSG(!item_map.has(p_item), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'.");
item_map[p_item].shapes = p_shapes;
@@ -170,6 +182,11 @@ Ref<Mesh> MeshLibrary::get_item_mesh(int p_item) const {
return item_map[p_item].mesh;
}
+Transform3D MeshLibrary::get_item_mesh_transform(int p_item) const {
+ ERR_FAIL_COND_V_MSG(!item_map.has(p_item), Transform3D(), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'.");
+ return item_map[p_item].mesh_transform;
+}
+
Vector<MeshLibrary::ShapeData> MeshLibrary::get_item_shapes(int p_item) const {
ERR_FAIL_COND_V_MSG(!item_map.has(p_item), Vector<ShapeData>(), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'.");
return item_map[p_item].shapes;
@@ -271,12 +288,14 @@ void MeshLibrary::_bind_methods() {
ClassDB::bind_method(D_METHOD("create_item", "id"), &MeshLibrary::create_item);
ClassDB::bind_method(D_METHOD("set_item_name", "id", "name"), &MeshLibrary::set_item_name);
ClassDB::bind_method(D_METHOD("set_item_mesh", "id", "mesh"), &MeshLibrary::set_item_mesh);
+ ClassDB::bind_method(D_METHOD("set_item_mesh_transform", "id", "mesh_transform"), &MeshLibrary::set_item_mesh_transform);
ClassDB::bind_method(D_METHOD("set_item_navmesh", "id", "navmesh"), &MeshLibrary::set_item_navmesh);
ClassDB::bind_method(D_METHOD("set_item_navmesh_transform", "id", "navmesh"), &MeshLibrary::set_item_navmesh_transform);
ClassDB::bind_method(D_METHOD("set_item_shapes", "id", "shapes"), &MeshLibrary::_set_item_shapes);
ClassDB::bind_method(D_METHOD("set_item_preview", "id", "texture"), &MeshLibrary::set_item_preview);
ClassDB::bind_method(D_METHOD("get_item_name", "id"), &MeshLibrary::get_item_name);
ClassDB::bind_method(D_METHOD("get_item_mesh", "id"), &MeshLibrary::get_item_mesh);
+ ClassDB::bind_method(D_METHOD("get_item_mesh_transform", "id"), &MeshLibrary::get_item_mesh_transform);
ClassDB::bind_method(D_METHOD("get_item_navmesh", "id"), &MeshLibrary::get_item_navmesh);
ClassDB::bind_method(D_METHOD("get_item_navmesh_transform", "id"), &MeshLibrary::get_item_navmesh_transform);
ClassDB::bind_method(D_METHOD("get_item_shapes", "id"), &MeshLibrary::_get_item_shapes);
diff --git a/scene/resources/mesh_library.h b/scene/resources/mesh_library.h
index 1e8a6bf3ff..c25df757e9 100644
--- a/scene/resources/mesh_library.h
+++ b/scene/resources/mesh_library.h
@@ -52,6 +52,7 @@ public:
Vector<ShapeData> shapes;
Ref<Texture2D> preview;
Transform3D navmesh_transform;
+ Transform3D mesh_transform;
Ref<NavigationMesh> navmesh;
};
@@ -72,12 +73,14 @@ public:
void create_item(int p_item);
void set_item_name(int p_item, const String &p_name);
void set_item_mesh(int p_item, const Ref<Mesh> &p_mesh);
+ void set_item_mesh_transform(int p_item, const Transform3D &p_transform);
void set_item_navmesh(int p_item, const Ref<NavigationMesh> &p_navmesh);
void set_item_navmesh_transform(int p_item, const Transform3D &p_transform);
void set_item_shapes(int p_item, const Vector<ShapeData> &p_shapes);
void set_item_preview(int p_item, const Ref<Texture2D> &p_preview);
String get_item_name(int p_item) const;
Ref<Mesh> get_item_mesh(int p_item) const;
+ Transform3D get_item_mesh_transform(int p_item) const;
Ref<NavigationMesh> get_item_navmesh(int p_item) const;
Transform3D get_item_navmesh_transform(int p_item) const;
Vector<ShapeData> get_item_shapes(int p_item) const;
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 54bfc427c4..9722570060 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -99,8 +99,9 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
#endif
parent = nparent;
} else {
- // i == 0 is root node. Confirm that it doesn't have a parent defined.
+ // i == 0 is root node.
ERR_FAIL_COND_V_MSG(n.parent != -1, nullptr, vformat("Invalid scene: root node %s cannot specify a parent node.", snames[n.name]));
+ ERR_FAIL_COND_V_MSG(n.type == TYPE_INSTANCED && base_scene_idx < 0, nullptr, vformat("Invalid scene: root node %s in an instance, but there's no base scene.", snames[n.name]));
}
Node *node = nullptr;
@@ -379,10 +380,17 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map
return OK;
}
+ bool is_editable_instance = false;
+
// save the child instantiated scenes that are chosen as editable, so they can be restored
// upon load back
- if (p_node != p_owner && p_node->get_filename() != String() && p_owner->is_editable_instance(p_node)) {
+ if (p_node != p_owner && p_node->get_scene_file_path() != String() && p_owner->is_editable_instance(p_node)) {
editable_instances.push_back(p_owner->get_path_to(p_node));
+ // Node is the root of an editable instance.
+ is_editable_instance = true;
+ } else if (p_node->get_owner() && p_node->get_owner() != p_owner && p_owner->is_editable_instance(p_node->get_owner())) {
+ // Node is part of an editable instance.
+ is_editable_instance = true;
}
NodeData nd;
@@ -429,14 +437,14 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map
}
}
- if (p_node->get_filename() != String() && p_node->get_owner() == p_owner && instantiated_by_owner) {
+ if (p_node->get_scene_file_path() != String() && p_node->get_owner() == p_owner && instantiated_by_owner) {
if (p_node->get_scene_instance_load_placeholder()) {
//it's a placeholder, use the placeholder path
- nd.instance = _vm_get_variant(p_node->get_filename(), variant_map);
+ nd.instance = _vm_get_variant(p_node->get_scene_file_path(), variant_map);
nd.instance |= FLAG_INSTANCE_IS_PLACEHOLDER;
} else {
//must instance ourselves
- Ref<PackedScene> instance = ResourceLoader::load(p_node->get_filename());
+ Ref<PackedScene> instance = ResourceLoader::load(p_node->get_scene_file_path());
if (!instance.is_valid()) {
return ERR_CANT_OPEN;
}
@@ -446,7 +454,7 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map
}
n = nullptr;
} else {
- if (n->get_filename() != String()) {
+ if (n->get_scene_file_path() != String()) {
//is an instance
Ref<SceneState> state = n->get_scene_instance_state();
if (state.is_valid()) {
@@ -610,7 +618,7 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map
// Save the right type. If this node was created by an instance
// then flag that the node should not be created but reused
- if (pack_state_stack.is_empty()) {
+ if (pack_state_stack.is_empty() && !is_editable_instance) {
//this node is not part of an instancing process, so save the type
nd.type = _nm_get_string(p_node->get_class(), name_map);
} else {
@@ -706,7 +714,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName
ERR_CONTINUE(!common_parent);
- if (common_parent != p_owner && common_parent->get_filename() == String()) {
+ if (common_parent != p_owner && common_parent->get_scene_file_path() == String()) {
common_parent = common_parent->get_owner();
}
@@ -766,7 +774,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName
nl = nullptr;
} else {
- if (nl->get_filename() != String()) {
+ if (nl->get_scene_file_path() != String()) {
//is an instance
Ref<SceneState> state = nl->get_scene_instance_state();
if (state.is_valid()) {
@@ -1644,7 +1652,7 @@ Node *PackedScene::instantiate(GenEditState p_edit_state) const {
}
if (get_path() != "" && get_path().find("::") == -1) {
- s->set_filename(get_path());
+ s->set_scene_file_path(get_path());
}
s->notification(Node::NOTIFICATION_INSTANCED);
diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp
index 34f4142a14..d9ec0bfd69 100644
--- a/scene/resources/particles_material.cpp
+++ b/scene/resources/particles_material.cpp
@@ -45,31 +45,31 @@ void ParticlesMaterial::init_shaders() {
shader_names->direction = "direction";
shader_names->spread = "spread";
shader_names->flatness = "flatness";
- shader_names->initial_linear_velocity = "initial_linear_velocity";
- shader_names->initial_angle = "initial_angle";
- shader_names->angular_velocity = "angular_velocity";
- shader_names->orbit_velocity = "orbit_velocity";
- shader_names->linear_accel = "linear_accel";
- shader_names->radial_accel = "radial_accel";
- shader_names->tangent_accel = "tangent_accel";
- shader_names->damping = "damping";
- shader_names->scale = "scale";
- shader_names->hue_variation = "hue_variation";
- shader_names->anim_speed = "anim_speed";
- shader_names->anim_offset = "anim_offset";
-
- shader_names->initial_linear_velocity_random = "initial_linear_velocity_random";
- shader_names->initial_angle_random = "initial_angle_random";
- shader_names->angular_velocity_random = "angular_velocity_random";
- shader_names->orbit_velocity_random = "orbit_velocity_random";
- shader_names->linear_accel_random = "linear_accel_random";
- shader_names->radial_accel_random = "radial_accel_random";
- shader_names->tangent_accel_random = "tangent_accel_random";
- shader_names->damping_random = "damping_random";
- shader_names->scale_random = "scale_random";
- shader_names->hue_variation_random = "hue_variation_random";
- shader_names->anim_speed_random = "anim_speed_random";
- shader_names->anim_offset_random = "anim_offset_random";
+ shader_names->initial_linear_velocity_min = "initial_linear_velocity_min";
+ shader_names->initial_angle_min = "initial_angle_min";
+ shader_names->angular_velocity_min = "angular_velocity_min";
+ shader_names->orbit_velocity_min = "orbit_velocity_min";
+ shader_names->linear_accel_min = "linear_accel_min";
+ shader_names->radial_accel_min = "radial_accel_min";
+ shader_names->tangent_accel_min = "tangent_accel_min";
+ shader_names->damping_min = "damping_min";
+ shader_names->scale_min = "scale_min";
+ shader_names->hue_variation_min = "hue_variation_min";
+ shader_names->anim_speed_min = "anim_speed_min";
+ shader_names->anim_offset_min = "anim_offset_min";
+
+ shader_names->initial_linear_velocity_max = "initial_linear_velocity_max";
+ shader_names->initial_angle_max = "initial_angle_max";
+ shader_names->angular_velocity_max = "angular_velocity_max";
+ shader_names->orbit_velocity_max = "orbit_velocity_max";
+ shader_names->linear_accel_max = "linear_accel_max";
+ shader_names->radial_accel_max = "radial_accel_max";
+ shader_names->tangent_accel_max = "tangent_accel_max";
+ shader_names->damping_max = "damping_max";
+ shader_names->scale_max = "scale_max";
+ shader_names->hue_variation_max = "hue_variation_max";
+ shader_names->anim_speed_max = "anim_speed_max";
+ shader_names->anim_offset_max = "anim_offset_max";
shader_names->angle_texture = "angle_texture";
shader_names->angular_velocity_texture = "angular_velocity_texture";
@@ -155,31 +155,31 @@ void ParticlesMaterial::_update_shader() {
code += "uniform vec3 direction;\n";
code += "uniform float spread;\n";
code += "uniform float flatness;\n";
- code += "uniform float initial_linear_velocity;\n";
- code += "uniform float initial_angle;\n";
- code += "uniform float angular_velocity;\n";
- code += "uniform float orbit_velocity;\n";
- code += "uniform float linear_accel;\n";
- code += "uniform float radial_accel;\n";
- code += "uniform float tangent_accel;\n";
- code += "uniform float damping;\n";
- code += "uniform float scale;\n";
- code += "uniform float hue_variation;\n";
- code += "uniform float anim_speed;\n";
- code += "uniform float anim_offset;\n";
-
- code += "uniform float initial_linear_velocity_random;\n";
- code += "uniform float initial_angle_random;\n";
- code += "uniform float angular_velocity_random;\n";
- code += "uniform float orbit_velocity_random;\n";
- code += "uniform float linear_accel_random;\n";
- code += "uniform float radial_accel_random;\n";
- code += "uniform float tangent_accel_random;\n";
- code += "uniform float damping_random;\n";
- code += "uniform float scale_random;\n";
- code += "uniform float hue_variation_random;\n";
- code += "uniform float anim_speed_random;\n";
- code += "uniform float anim_offset_random;\n";
+ code += "uniform float initial_linear_velocity_min;\n";
+ code += "uniform float initial_angle_min;\n";
+ code += "uniform float angular_velocity_min;\n";
+ code += "uniform float orbit_velocity_min;\n";
+ code += "uniform float linear_accel_min;\n";
+ code += "uniform float radial_accel_min;\n";
+ code += "uniform float tangent_accel_min;\n";
+ code += "uniform float damping_min;\n";
+ code += "uniform float scale_min;\n";
+ code += "uniform float hue_variation_min;\n";
+ code += "uniform float anim_speed_min;\n";
+ code += "uniform float anim_offset_min;\n";
+
+ code += "uniform float initial_linear_velocity_max;\n";
+ code += "uniform float initial_angle_max;\n";
+ code += "uniform float angular_velocity_max;\n";
+ code += "uniform float orbit_velocity_max;\n";
+ code += "uniform float linear_accel_max;\n";
+ code += "uniform float radial_accel_max;\n";
+ code += "uniform float tangent_accel_max;\n";
+ code += "uniform float damping_max;\n";
+ code += "uniform float scale_max;\n";
+ code += "uniform float hue_variation_max;\n";
+ code += "uniform float anim_speed_max;\n";
+ code += "uniform float anim_offset_max;\n";
code += "uniform float lifetime_randomness;\n";
switch (emission_shape) {
@@ -329,7 +329,7 @@ void ParticlesMaterial::_update_shader() {
if (tex_parameters[PARAM_ANIM_OFFSET].is_valid()) {
code += " float tex_anim_offset = textureLod(anim_offset_texture, vec2(0.0, 0.0), 0.0).r;\n";
} else {
- code += " float tex_anim_offset = 0.0;\n";
+ code += " float tex_anim_offset = 1.0;\n";
}
code += " float spread_rad = spread * degree_to_rad;\n";
@@ -339,7 +339,7 @@ void ParticlesMaterial::_update_shader() {
if (tex_parameters[PARAM_INITIAL_LINEAR_VELOCITY].is_valid()) {
code += " float tex_linear_velocity = textureLod(linear_velocity_texture, vec2(0.0, 0.0), 0.0).r;\n";
} else {
- code += " float tex_linear_velocity = 0.0;\n";
+ code += " float tex_linear_velocity = 1.0;\n";
}
if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
@@ -347,7 +347,7 @@ void ParticlesMaterial::_update_shader() {
code += " float angle1_rad = rand_from_seed_m1_p1(alt_seed) * spread_rad;\n";
code += " angle1_rad += direction.x != 0.0 ? atan(direction.y, direction.x) : sign(direction.y) * (pi / 2.0);\n";
code += " vec3 rot = vec3(cos(angle1_rad), sin(angle1_rad), 0.0);\n";
- code += " VELOCITY = rot * initial_linear_velocity * mix(1.0, rand_from_seed(alt_seed), initial_linear_velocity_random);\n";
+ code += " VELOCITY = rot * mix(initial_linear_velocity_min,initial_linear_velocity_max, rand_from_seed(alt_seed));\n";
code += " }\n";
} else {
@@ -369,16 +369,16 @@ void ParticlesMaterial::_update_shader() {
code += " binormal = normalize(binormal);\n";
code += " vec3 normal = cross(binormal, direction_nrm);\n";
code += " spread_direction = binormal * spread_direction.x + normal * spread_direction.y + direction_nrm * spread_direction.z;\n";
- code += " VELOCITY = spread_direction * initial_linear_velocity * mix(1.0, rand_from_seed(alt_seed), initial_linear_velocity_random);\n";
+ code += " VELOCITY = spread_direction * mix(initial_linear_velocity_min, initial_linear_velocity_max,rand_from_seed(alt_seed));\n";
code += " }\n";
}
code += " }\n";
- code += " float base_angle = (initial_angle + tex_angle) * mix(1.0, angle_rand, initial_angle_random);\n";
+ code += " float base_angle = (tex_angle) * mix(initial_angle_min, initial_angle_max, angle_rand);\n";
code += " CUSTOM.x = base_angle * degree_to_rad;\n"; // angle
code += " CUSTOM.y = 0.0;\n"; // phase
code += " CUSTOM.w = (1.0 - lifetime_randomness * rand_from_seed(alt_seed));\n";
- code += " CUSTOM.z = (anim_offset + tex_anim_offset) * mix(1.0, anim_offset_rand, anim_offset_random);\n"; // animation offset (0-1)
+ code += " CUSTOM.z = (tex_anim_offset) * mix(anim_offset_min, anim_offset_max, anim_offset_rand);\n"; // animation offset (0-1)
code += " if (RESTART_POSITION) {\n";
@@ -471,63 +471,63 @@ void ParticlesMaterial::_update_shader() {
if (tex_parameters[PARAM_INITIAL_LINEAR_VELOCITY].is_valid()) {
code += " float tex_linear_velocity = textureLod(linear_velocity_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
- code += " float tex_linear_velocity = 0.0;\n";
+ code += " float tex_linear_velocity = 1.0;\n";
}
if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
if (tex_parameters[PARAM_ORBIT_VELOCITY].is_valid()) {
code += " float tex_orbit_velocity = textureLod(orbit_velocity_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
- code += " float tex_orbit_velocity = 0.0;\n";
+ code += " float tex_orbit_velocity = 1.0;\n";
}
}
if (tex_parameters[PARAM_ANGULAR_VELOCITY].is_valid()) {
code += " float tex_angular_velocity = textureLod(angular_velocity_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
- code += " float tex_angular_velocity = 0.0;\n";
+ code += " float tex_angular_velocity = 1.0;\n";
}
if (tex_parameters[PARAM_LINEAR_ACCEL].is_valid()) {
code += " float tex_linear_accel = textureLod(linear_accel_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
- code += " float tex_linear_accel = 0.0;\n";
+ code += " float tex_linear_accel = 1.0;\n";
}
if (tex_parameters[PARAM_RADIAL_ACCEL].is_valid()) {
code += " float tex_radial_accel = textureLod(radial_accel_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
- code += " float tex_radial_accel = 0.0;\n";
+ code += " float tex_radial_accel = 1.0;\n";
}
if (tex_parameters[PARAM_TANGENTIAL_ACCEL].is_valid()) {
code += " float tex_tangent_accel = textureLod(tangent_accel_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
- code += " float tex_tangent_accel = 0.0;\n";
+ code += " float tex_tangent_accel = 1.0;\n";
}
if (tex_parameters[PARAM_DAMPING].is_valid()) {
code += " float tex_damping = textureLod(damping_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
- code += " float tex_damping = 0.0;\n";
+ code += " float tex_damping = 1.0;\n";
}
if (tex_parameters[PARAM_ANGLE].is_valid()) {
code += " float tex_angle = textureLod(angle_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
- code += " float tex_angle = 0.0;\n";
+ code += " float tex_angle = 1.0;\n";
}
if (tex_parameters[PARAM_ANIM_SPEED].is_valid()) {
code += " float tex_anim_speed = textureLod(anim_speed_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
- code += " float tex_anim_speed = 0.0;\n";
+ code += " float tex_anim_speed = 1.0;\n";
}
if (tex_parameters[PARAM_ANIM_OFFSET].is_valid()) {
code += " float tex_anim_offset = textureLod(anim_offset_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
- code += " float tex_anim_offset = 0.0;\n";
+ code += " float tex_anim_offset = 1.0;\n";
}
code += " vec3 force = gravity;\n";
@@ -536,18 +536,19 @@ void ParticlesMaterial::_update_shader() {
code += " pos.z = 0.0;\n";
}
code += " // apply linear acceleration\n";
- code += " force += length(VELOCITY) > 0.0 ? normalize(VELOCITY) * (linear_accel + tex_linear_accel) * mix(1.0, rand_from_seed(alt_seed), linear_accel_random) : vec3(0.0);\n";
+ code += " force += length(VELOCITY) > 0.0 ? normalize(VELOCITY) * tex_linear_accel * mix(linear_accel_min, linear_accel_max, rand_from_seed(alt_seed)) : vec3(0.0);\n";
code += " // apply radial acceleration\n";
code += " vec3 org = EMISSION_TRANSFORM[3].xyz;\n";
code += " vec3 diff = pos - org;\n";
- code += " force += length(diff) > 0.0 ? normalize(diff) * (radial_accel + tex_radial_accel) * mix(1.0, rand_from_seed(alt_seed), radial_accel_random) : vec3(0.0);\n";
+ code += " force += length(diff) > 0.0 ? normalize(diff) * tex_radial_accel * mix(radial_accel_min, radial_accel_max, rand_from_seed(alt_seed)) : vec3(0.0);\n";
code += " // apply tangential acceleration;\n";
+ code += " float tangent_accel_val = tex_tangent_accel * mix(tangent_accel_min, tangent_accel_max, rand_from_seed(alt_seed))\n;";
if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
- code += " force += length(diff.yx) > 0.0 ? vec3(normalize(diff.yx * vec2(-1.0, 1.0)), 0.0) * ((tangent_accel + tex_tangent_accel) * mix(1.0, rand_from_seed(alt_seed), tangent_accel_random)) : vec3(0.0);\n";
+ code += " force += length(diff.yx) > 0.0 ? vec3(normalize(diff.yx * vec2(-1.0, 1.0)), 0.0) * tangent_accel_val : vec3(0.0);\n";
} else {
code += " vec3 crossDiff = cross(normalize(diff), normalize(gravity));\n";
- code += " force += length(crossDiff) > 0.0 ? normalize(crossDiff) * ((tangent_accel + tex_tangent_accel) * mix(1.0, rand_from_seed(alt_seed), tangent_accel_random)) : vec3(0.0);\n";
+ code += " force += length(crossDiff) > 0.0 ? normalize(crossDiff) * tangent_accel_val : vec3(0.0);\n";
}
if (attractor_interaction_enabled) {
code += " force += ATTRACTOR_FORCE;\n\n";
@@ -557,7 +558,7 @@ void ParticlesMaterial::_update_shader() {
code += " VELOCITY += force * DELTA;\n";
code += " // orbit velocity\n";
if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
- code += " float orbit_amount = (orbit_velocity + tex_orbit_velocity) * mix(1.0, rand_from_seed(alt_seed), orbit_velocity_random);\n";
+ code += " float orbit_amount = tex_orbit_velocity * mix(orbit_velocity_min, orbit_velocity_max, rand_from_seed(alt_seed));\n";
code += " if (orbit_amount != 0.0) {\n";
code += " float ang = orbit_amount * DELTA * pi * 2.0;\n";
code += " mat2 rot = mat2(vec2(cos(ang), -sin(ang)), vec2(sin(ang), cos(ang)));\n";
@@ -569,9 +570,10 @@ void ParticlesMaterial::_update_shader() {
if (tex_parameters[PARAM_INITIAL_LINEAR_VELOCITY].is_valid()) {
code += " VELOCITY = normalize(VELOCITY) * tex_linear_velocity;\n";
}
- code += " if (damping + tex_damping > 0.0) {\n";
+ code += " float dmp = mix(damping_min, damping_max, rand_from_seed(alt_seed));\n";
+ code += " if (dmp * tex_damping > 0.0) {\n";
code += " float v = length(VELOCITY);\n";
- code += " float damp = (damping + tex_damping) * mix(1.0, rand_from_seed(alt_seed), damping_random);\n";
+ code += " float damp = tex_damping * dmp;\n";
code += " v -= damp * DELTA;\n";
code += " if (v < 0.0) {\n";
code += " VELOCITY = vec3(0.0);\n";
@@ -579,26 +581,26 @@ void ParticlesMaterial::_update_shader() {
code += " VELOCITY = normalize(VELOCITY) * v;\n";
code += " }\n";
code += " }\n";
- code += " float base_angle = (initial_angle + tex_angle) * mix(1.0, angle_rand, initial_angle_random);\n";
- code += " base_angle += CUSTOM.y * LIFETIME * (angular_velocity + tex_angular_velocity) * mix(1.0, rand_from_seed(alt_seed) * 2.0 - 1.0, angular_velocity_random);\n";
+ code += " float base_angle = (tex_angle) * mix(initial_angle_min, initial_angle_max, rand_from_seed(alt_seed));\n";
+ code += " base_angle += CUSTOM.y * LIFETIME * (tex_angular_velocity) * mix(angular_velocity_min,angular_velocity_max, rand_from_seed(alt_seed));\n";
code += " CUSTOM.x = base_angle * degree_to_rad;\n"; // angle
- code += " CUSTOM.z = (anim_offset + tex_anim_offset) * mix(1.0, anim_offset_rand, anim_offset_random) + CUSTOM.y * (anim_speed + tex_anim_speed) * mix(1.0, rand_from_seed(alt_seed), anim_speed_random);\n"; // angle
+ code += " CUSTOM.z = (tex_anim_offset) * mix(anim_offset_min, anim_offset_max, rand_from_seed(alt_seed)) + CUSTOM.y * tex_anim_speed * mix(anim_speed_min, anim_speed_max, rand_from_seed(alt_seed));\n"; // angle
// apply color
// apply hue rotation
if (tex_parameters[PARAM_SCALE].is_valid()) {
- code += " float tex_scale = textureLod(scale_texture, vec2(tv, 0.0), 0.0).r;\n";
+ code += " vec3 tex_scale = textureLod(scale_texture, vec2(tv, 0.0), 0.0).rgb;\n";
} else {
- code += " float tex_scale = 1.0;\n";
+ code += " vec3 tex_scale = vec3(1.0);\n";
}
if (tex_parameters[PARAM_HUE_VARIATION].is_valid()) {
code += " float tex_hue_variation = textureLod(hue_variation_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
- code += " float tex_hue_variation = 0.0;\n";
+ code += " float tex_hue_variation = 1.0;\n";
}
- code += " float hue_rot_angle = (hue_variation + tex_hue_variation) * pi * 2.0 * mix(1.0, hue_rot_rand * 2.0 - 1.0, hue_variation_random);\n";
+ code += " float hue_rot_angle = (tex_hue_variation) * pi * 2.0 * mix(hue_variation_min, hue_variation_max, rand_from_seed(alt_seed));\n";
code += " float hue_rot_c = cos(hue_rot_angle);\n";
code += " float hue_rot_s = sin(hue_rot_angle);\n";
code += " mat4 hue_rot_mat = mat4(vec4(0.299, 0.587, 0.114, 0.0),\n";
@@ -660,18 +662,18 @@ void ParticlesMaterial::_update_shader() {
}
// turn particle by rotation in Y
if (particle_flags[PARTICLE_FLAG_ROTATE_Y]) {
+ code += " vec4 origin = TRANSFORM[3];\n";
code += " TRANSFORM = mat4(vec4(cos(CUSTOM.x), 0.0, -sin(CUSTOM.x), 0.0), vec4(0.0, 1.0, 0.0, 0.0), vec4(sin(CUSTOM.x), 0.0, cos(CUSTOM.x), 0.0), vec4(0.0, 0.0, 0.0, 1.0));\n";
+ code += " TRANSFORM[3] = origin;\n";
}
}
//scale by scale
- code += " float base_scale = tex_scale * mix(scale, 1.0, scale_random * scale_rand);\n";
- code += " if (base_scale < 0.000001) {\n";
- code += " base_scale = 0.000001;\n";
- code += " }\n";
+ code += " float base_scale = mix(scale_min, scale_max, scale_rand);\n";
+ code += " base_scale = sign(base_scale) * max(abs(base_scale), 0.001);\n";
- code += " TRANSFORM[0].xyz *= base_scale;\n";
- code += " TRANSFORM[1].xyz *= base_scale;\n";
- code += " TRANSFORM[2].xyz *= base_scale;\n";
+ code += " TRANSFORM[0].xyz *= base_scale * sign(tex_scale.r) * max(abs(tex_scale.r), 0.001);\n";
+ code += " TRANSFORM[1].xyz *= base_scale * sign(tex_scale.g) * max(abs(tex_scale.g), 0.001);\n";
+ code += " TRANSFORM[2].xyz *= base_scale * sign(tex_scale.b) * max(abs(tex_scale.b), 0.001);\n";
if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
code += " VELOCITY.z = 0.0;\n";
code += " TRANSFORM[3].z = 0.0;\n";
@@ -739,7 +741,7 @@ void ParticlesMaterial::flush_changes() {
void ParticlesMaterial::_queue_shader_change() {
MutexLock lock(material_mutex);
- if (!element.in_list()) {
+ if (is_initialized && !element.in_list()) {
dirty_materials->add(&element);
}
}
@@ -777,110 +779,116 @@ float ParticlesMaterial::get_flatness() const {
return flatness;
}
-void ParticlesMaterial::set_param(Parameter p_param, float p_value) {
+void ParticlesMaterial::set_param_min(Parameter p_param, float p_value) {
ERR_FAIL_INDEX(p_param, PARAM_MAX);
- parameters[p_param] = p_value;
+ params_min[p_param] = p_value;
+ if (params_min[p_param] > params_max[p_param]) {
+ set_param_max(p_param, p_value);
+ }
switch (p_param) {
case PARAM_INITIAL_LINEAR_VELOCITY: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->initial_linear_velocity, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->initial_linear_velocity_min, p_value);
} break;
case PARAM_ANGULAR_VELOCITY: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->angular_velocity, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->angular_velocity_min, p_value);
} break;
case PARAM_ORBIT_VELOCITY: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->orbit_velocity, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->orbit_velocity_min, p_value);
} break;
case PARAM_LINEAR_ACCEL: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->linear_accel, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->linear_accel_min, p_value);
} break;
case PARAM_RADIAL_ACCEL: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->radial_accel, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->radial_accel_min, p_value);
} break;
case PARAM_TANGENTIAL_ACCEL: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->tangent_accel, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->tangent_accel_min, p_value);
} break;
case PARAM_DAMPING: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->damping, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->damping_min, p_value);
} break;
case PARAM_ANGLE: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->initial_angle, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->initial_angle_min, p_value);
} break;
case PARAM_SCALE: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->scale, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->scale_min, p_value);
} break;
case PARAM_HUE_VARIATION: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->hue_variation, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->hue_variation_min, p_value);
} break;
case PARAM_ANIM_SPEED: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->anim_speed, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->anim_speed_min, p_value);
} break;
case PARAM_ANIM_OFFSET: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->anim_offset, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->anim_offset_min, p_value);
} break;
case PARAM_MAX:
break; // Can't happen, but silences warning
}
}
-float ParticlesMaterial::get_param(Parameter p_param) const {
+float ParticlesMaterial::get_param_min(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
- return parameters[p_param];
+ return params_min[p_param];
}
-void ParticlesMaterial::set_param_randomness(Parameter p_param, float p_value) {
+void ParticlesMaterial::set_param_max(Parameter p_param, float p_value) {
ERR_FAIL_INDEX(p_param, PARAM_MAX);
- randomness[p_param] = p_value;
+ params_max[p_param] = p_value;
+ if (params_min[p_param] > params_max[p_param]) {
+ set_param_min(p_param, p_value);
+ }
switch (p_param) {
case PARAM_INITIAL_LINEAR_VELOCITY: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->initial_linear_velocity_random, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->initial_linear_velocity_max, p_value);
} break;
case PARAM_ANGULAR_VELOCITY: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->angular_velocity_random, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->angular_velocity_max, p_value);
} break;
case PARAM_ORBIT_VELOCITY: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->orbit_velocity_random, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->orbit_velocity_max, p_value);
} break;
case PARAM_LINEAR_ACCEL: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->linear_accel_random, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->linear_accel_max, p_value);
} break;
case PARAM_RADIAL_ACCEL: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->radial_accel_random, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->radial_accel_max, p_value);
} break;
case PARAM_TANGENTIAL_ACCEL: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->tangent_accel_random, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->tangent_accel_max, p_value);
} break;
case PARAM_DAMPING: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->damping_random, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->damping_max, p_value);
} break;
case PARAM_ANGLE: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->initial_angle_random, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->initial_angle_max, p_value);
} break;
case PARAM_SCALE: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->scale_random, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->scale_max, p_value);
} break;
case PARAM_HUE_VARIATION: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->hue_variation_random, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->hue_variation_max, p_value);
} break;
case PARAM_ANIM_SPEED: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->anim_speed_random, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->anim_speed_max, p_value);
} break;
case PARAM_ANIM_OFFSET: {
- RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->anim_offset_random, p_value);
+ RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->anim_offset_max, p_value);
} break;
case PARAM_MAX:
break; // Can't happen, but silences warning
}
}
-float ParticlesMaterial::get_param_randomness(Parameter p_param) const {
+float ParticlesMaterial::get_param_max(Parameter p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
- return randomness[p_param];
+ return params_max[p_param];
}
static void _adjust_curve_range(const Ref<Texture2D> &p_texture, float p_min, float p_max) {
@@ -1259,11 +1267,11 @@ void ParticlesMaterial::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_flatness", "amount"), &ParticlesMaterial::set_flatness);
ClassDB::bind_method(D_METHOD("get_flatness"), &ParticlesMaterial::get_flatness);
- ClassDB::bind_method(D_METHOD("set_param", "param", "value"), &ParticlesMaterial::set_param);
- ClassDB::bind_method(D_METHOD("get_param", "param"), &ParticlesMaterial::get_param);
+ ClassDB::bind_method(D_METHOD("set_param_min", "param", "value"), &ParticlesMaterial::set_param_min);
+ ClassDB::bind_method(D_METHOD("get_param_min", "param"), &ParticlesMaterial::get_param_min);
- ClassDB::bind_method(D_METHOD("set_param_randomness", "param", "randomness"), &ParticlesMaterial::set_param_randomness);
- ClassDB::bind_method(D_METHOD("get_param_randomness", "param"), &ParticlesMaterial::get_param_randomness);
+ ClassDB::bind_method(D_METHOD("set_param_max", "param", "value"), &ParticlesMaterial::set_param_max);
+ ClassDB::bind_method(D_METHOD("get_param_max", "param"), &ParticlesMaterial::get_param_max);
ClassDB::bind_method(D_METHOD("set_param_texture", "param", "texture"), &ParticlesMaterial::set_param_texture);
ClassDB::bind_method(D_METHOD("get_param_texture", "param"), &ParticlesMaterial::get_param_texture);
@@ -1369,54 +1377,54 @@ void ParticlesMaterial::_bind_methods() {
ADD_GROUP("Gravity", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity"), "set_gravity", "get_gravity");
ADD_GROUP("Initial Velocity", "initial_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_min", PROPERTY_HINT_RANGE, "0,1000,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "initial_velocity_max", PROPERTY_HINT_RANGE, "0,1000,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_INITIAL_LINEAR_VELOCITY);
ADD_GROUP("Angular Velocity", "angular_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_min", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_ANGULAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_velocity_max", PROPERTY_HINT_RANGE, "-720,720,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_ANGULAR_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angular_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANGULAR_VELOCITY);
ADD_GROUP("Orbit Velocity", "orbit_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_ORBIT_VELOCITY);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_min", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_ORBIT_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "orbit_velocity_max", PROPERTY_HINT_RANGE, "-1000,1000,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_ORBIT_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "orbit_velocity_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ORBIT_VELOCITY);
ADD_GROUP("Linear Accel", "linear_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_LINEAR_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_min", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_LINEAR_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_accel_max", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_LINEAR_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "linear_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_LINEAR_ACCEL);
ADD_GROUP("Radial Accel", "radial_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_RADIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_min", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_RADIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "radial_accel_max", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_RADIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "radial_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_RADIAL_ACCEL);
ADD_GROUP("Tangential Accel", "tangential_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_TANGENTIAL_ACCEL);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_min", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_TANGENTIAL_ACCEL);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "tangential_accel_max", PROPERTY_HINT_RANGE, "-100,100,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_TANGENTIAL_ACCEL);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "tangential_accel_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_TANGENTIAL_ACCEL);
ADD_GROUP("Damping", "");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0,100,0.01,or_greater"), "set_param", "get_param", PARAM_DAMPING);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_min", PROPERTY_HINT_RANGE, "0,100,0.01,or_greater"), "set_param_min", "get_param_min", PARAM_DAMPING);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "damping_max", PROPERTY_HINT_RANGE, "0,100,0.01,or_greater"), "set_param_max", "get_param_max", PARAM_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "damping_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_DAMPING);
ADD_GROUP("Angle", "");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater,degrees"), "set_param", "get_param", PARAM_ANGLE);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_min", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater,degrees"), "set_param_min", "get_param_min", PARAM_ANGLE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angle_max", PROPERTY_HINT_RANGE, "-720,720,0.1,or_lesser,or_greater,degrees"), "set_param_max", "get_param_max", PARAM_ANGLE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANGLE);
ADD_GROUP("Scale", "");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_min", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param_min", "get_param_min", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "scale_max", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param_max", "get_param_max", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture,CurveXYZTexture"), "set_param_texture", "get_param_texture", PARAM_SCALE);
ADD_GROUP("Color", "");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "GradientTexture"), "set_color_ramp", "get_color_ramp");
ADD_GROUP("Hue Variation", "hue_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_min", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param_min", "get_param_min", PARAM_HUE_VARIATION);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "hue_variation_max", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param_max", "get_param_max", PARAM_HUE_VARIATION);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "hue_variation_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_HUE_VARIATION);
ADD_GROUP("Animation", "anim_");
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed", PROPERTY_HINT_RANGE, "0,128,0.01,or_greater"), "set_param", "get_param", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_min", PROPERTY_HINT_RANGE, "0,16,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_ANIM_SPEED);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_speed_max", PROPERTY_HINT_RANGE, "0,16,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_ANIM_SPEED);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_speed_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANIM_SPEED);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_ANIM_OFFSET);
- ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_min", PROPERTY_HINT_RANGE, "0,16,0.01,or_lesser,or_greater"), "set_param_min", "get_param_min", PARAM_ANIM_OFFSET);
+ ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "anim_offset_max", PROPERTY_HINT_RANGE, "0,16,0.01,or_lesser,or_greater"), "set_param_max", "get_param_max", PARAM_ANIM_OFFSET);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANIM_OFFSET);
ADD_GROUP("Sub Emitter", "sub_emitter_");
@@ -1472,18 +1480,30 @@ ParticlesMaterial::ParticlesMaterial() :
set_direction(Vector3(1, 0, 0));
set_spread(45);
set_flatness(0);
- set_param(PARAM_INITIAL_LINEAR_VELOCITY, 0);
- set_param(PARAM_ANGULAR_VELOCITY, 0);
- set_param(PARAM_ORBIT_VELOCITY, 0);
- set_param(PARAM_LINEAR_ACCEL, 0);
- set_param(PARAM_RADIAL_ACCEL, 0);
- set_param(PARAM_TANGENTIAL_ACCEL, 0);
- set_param(PARAM_DAMPING, 0);
- set_param(PARAM_ANGLE, 0);
- set_param(PARAM_SCALE, 1);
- set_param(PARAM_HUE_VARIATION, 0);
- set_param(PARAM_ANIM_SPEED, 0);
- set_param(PARAM_ANIM_OFFSET, 0);
+ set_param_min(PARAM_INITIAL_LINEAR_VELOCITY, 0);
+ set_param_min(PARAM_ANGULAR_VELOCITY, 0);
+ set_param_min(PARAM_ORBIT_VELOCITY, 0);
+ set_param_min(PARAM_LINEAR_ACCEL, 0);
+ set_param_min(PARAM_RADIAL_ACCEL, 0);
+ set_param_min(PARAM_TANGENTIAL_ACCEL, 0);
+ set_param_min(PARAM_DAMPING, 0);
+ set_param_min(PARAM_ANGLE, 0);
+ set_param_min(PARAM_SCALE, 1);
+ set_param_min(PARAM_HUE_VARIATION, 0);
+ set_param_min(PARAM_ANIM_SPEED, 0);
+ set_param_min(PARAM_ANIM_OFFSET, 0);
+ set_param_max(PARAM_INITIAL_LINEAR_VELOCITY, 0);
+ set_param_max(PARAM_ANGULAR_VELOCITY, 0);
+ set_param_max(PARAM_ORBIT_VELOCITY, 0);
+ set_param_max(PARAM_LINEAR_ACCEL, 0);
+ set_param_max(PARAM_RADIAL_ACCEL, 0);
+ set_param_max(PARAM_TANGENTIAL_ACCEL, 0);
+ set_param_max(PARAM_DAMPING, 0);
+ set_param_max(PARAM_ANGLE, 0);
+ set_param_max(PARAM_SCALE, 1);
+ set_param_max(PARAM_HUE_VARIATION, 0);
+ set_param_max(PARAM_ANIM_SPEED, 0);
+ set_param_max(PARAM_ANIM_OFFSET, 0);
set_emission_shape(EMISSION_SHAPE_POINT);
set_emission_sphere_radius(1);
set_emission_box_extents(Vector3(1, 1, 1));
@@ -1505,10 +1525,6 @@ ParticlesMaterial::ParticlesMaterial() :
set_collision_friction(0.0);
set_collision_use_scale(false);
- for (int i = 0; i < PARAM_MAX; i++) {
- set_param_randomness(Parameter(i), 0);
- }
-
for (int i = 0; i < PARTICLE_FLAG_MAX; i++) {
particle_flags[i] = false;
}
@@ -1517,6 +1533,7 @@ ParticlesMaterial::ParticlesMaterial() :
current_key.invalid_key = 1;
+ is_initialized = true;
_queue_shader_change();
}
diff --git a/scene/resources/particles_material.h b/scene/resources/particles_material.h
index ac7a500f73..36bc456978 100644
--- a/scene/resources/particles_material.h
+++ b/scene/resources/particles_material.h
@@ -61,6 +61,7 @@ public:
PARAM_MAX
};
+ // When extending, make sure not to overflow the size of the MaterialKey below.
enum ParticleFlags {
PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY,
PARTICLE_FLAG_ROTATE_Y,
@@ -68,6 +69,7 @@ public:
PARTICLE_FLAG_MAX
};
+ // When extending, make sure not to overflow the size of the MaterialKey below.
enum EmissionShape {
EMISSION_SHAPE_POINT,
EMISSION_SHAPE_SPHERE,
@@ -78,6 +80,7 @@ public:
EMISSION_SHAPE_MAX
};
+ // When extending, make sure not to overflow the size of the MaterialKey below.
enum SubEmitterMode {
SUB_EMITTER_DISABLED,
SUB_EMITTER_CONSTANT,
@@ -88,11 +91,13 @@ public:
private:
union MaterialKey {
+ // The bit size of the struct must be kept below or equal to 32 bits.
+ // Consider this when extending ParticleFlags, EmissionShape, or SubEmitterMode.
struct {
uint32_t texture_mask : 16;
uint32_t texture_color : 1;
uint32_t particle_flags : 4;
- uint32_t emission_shape : 2;
+ uint32_t emission_shape : 3;
uint32_t invalid_key : 1;
uint32_t has_emission_color : 1;
uint32_t sub_emitter : 2;
@@ -149,31 +154,31 @@ private:
StringName direction;
StringName spread;
StringName flatness;
- StringName initial_linear_velocity;
- StringName initial_angle;
- StringName angular_velocity;
- StringName orbit_velocity;
- StringName linear_accel;
- StringName radial_accel;
- StringName tangent_accel;
- StringName damping;
- StringName scale;
- StringName hue_variation;
- StringName anim_speed;
- StringName anim_offset;
-
- StringName initial_linear_velocity_random;
- StringName initial_angle_random;
- StringName angular_velocity_random;
- StringName orbit_velocity_random;
- StringName linear_accel_random;
- StringName radial_accel_random;
- StringName tangent_accel_random;
- StringName damping_random;
- StringName scale_random;
- StringName hue_variation_random;
- StringName anim_speed_random;
- StringName anim_offset_random;
+ StringName initial_linear_velocity_min;
+ StringName initial_angle_min;
+ StringName angular_velocity_min;
+ StringName orbit_velocity_min;
+ StringName linear_accel_min;
+ StringName radial_accel_min;
+ StringName tangent_accel_min;
+ StringName damping_min;
+ StringName scale_min;
+ StringName hue_variation_min;
+ StringName anim_speed_min;
+ StringName anim_offset_min;
+
+ StringName initial_linear_velocity_max;
+ StringName initial_angle_max;
+ StringName angular_velocity_max;
+ StringName orbit_velocity_max;
+ StringName linear_accel_max;
+ StringName radial_accel_max;
+ StringName tangent_accel_max;
+ StringName damping_max;
+ StringName scale_max;
+ StringName hue_variation_max;
+ StringName anim_speed_max;
+ StringName anim_offset_max;
StringName angle_texture;
StringName angular_velocity_texture;
@@ -221,12 +226,13 @@ private:
_FORCE_INLINE_ void _queue_shader_change();
_FORCE_INLINE_ bool _is_shader_dirty() const;
+ bool is_initialized = false;
Vector3 direction;
float spread;
float flatness;
- float parameters[PARAM_MAX];
- float randomness[PARAM_MAX];
+ float params_min[PARAM_MAX];
+ float params_max[PARAM_MAX];
Ref<Texture2D> tex_parameters[PARAM_MAX];
Color color;
@@ -278,11 +284,11 @@ public:
void set_flatness(float p_flatness);
float get_flatness() const;
- void set_param(Parameter p_param, float p_value);
- float get_param(Parameter p_param) const;
+ void set_param_min(Parameter p_param, float p_value);
+ float get_param_min(Parameter p_param) const;
- void set_param_randomness(Parameter p_param, float p_value);
- float get_param_randomness(Parameter p_param) const;
+ void set_param_max(Parameter p_param, float p_value);
+ float get_param_max(Parameter p_param) const;
void set_param_texture(Parameter p_param, const Ref<Texture2D> &p_texture);
Ref<Texture2D> get_param_texture(Parameter p_param) const;
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index ba85ea4a6c..f8be00f5fb 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -1390,6 +1390,12 @@ void QuadMesh::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "center_offset"), "set_center_offset", "get_center_offset");
}
+uint32_t QuadMesh::surface_get_format(int p_idx) const {
+ ERR_FAIL_INDEX_V(p_idx, 1, 0);
+
+ return RS::ARRAY_FORMAT_VERTEX | RS::ARRAY_FORMAT_NORMAL | RS::ARRAY_FORMAT_TANGENT | RS::ARRAY_FORMAT_TEX_UV;
+}
+
QuadMesh::QuadMesh() {
primitive_type = PRIMITIVE_TRIANGLES;
}
@@ -1420,6 +1426,8 @@ void SphereMesh::_create_mesh_array(Array &p_arr) const {
int i, j, prevrow, thisrow, point;
float x, y, z;
+ float scale = height * (is_hemisphere ? 1.0 : 0.5);
+
// set our bounding box
Vector<Vector3> points;
@@ -1443,7 +1451,7 @@ void SphereMesh::_create_mesh_array(Array &p_arr) const {
v /= (rings + 1);
w = sin(Math_PI * v);
- y = height * (is_hemisphere ? 1.0 : 0.5) * cos(Math_PI * v);
+ y = scale * cos(Math_PI * v);
for (i = 0; i <= radial_segments; i++) {
float u = i;
@@ -1458,7 +1466,8 @@ void SphereMesh::_create_mesh_array(Array &p_arr) const {
} else {
Vector3 p = Vector3(x * radius * w, y, z * radius * w);
points.push_back(p);
- normals.push_back(p.normalized());
+ Vector3 normal = Vector3(x * w * scale, radius * (y / scale), z * w * scale);
+ normals.push_back(normal.normalized());
};
ADD_TANGENT(z, 0.0, -x, 1.0)
uvs.push_back(Vector2(u, v));
diff --git a/scene/resources/primitive_meshes.h b/scene/resources/primitive_meshes.h
index 7915cb0028..d447dad97a 100644
--- a/scene/resources/primitive_meshes.h
+++ b/scene/resources/primitive_meshes.h
@@ -285,6 +285,8 @@ protected:
virtual void _create_mesh_array(Array &p_arr) const override;
public:
+ virtual uint32_t surface_get_format(int p_idx) const override;
+
QuadMesh();
void set_size(const Size2 &p_size);
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index dbe118a262..341ce22185 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -424,7 +424,7 @@ Error ResourceLoaderText::load() {
}
}
- if (path.find("://") == -1 && path.is_rel_path()) {
+ if (path.find("://") == -1 && path.is_relative_path()) {
// path is relative to file being loaded, so convert to a resource path
path = ProjectSettings::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path));
}
@@ -768,7 +768,7 @@ void ResourceLoaderText::get_dependencies(FileAccess *p_f, List<String> *p_depen
}
}
- if (!using_uid && path.find("://") == -1 && path.is_rel_path()) {
+ if (!using_uid && path.find("://") == -1 && path.is_relative_path()) {
// path is relative to file being loaded, so convert to a resource path
path = ProjectSettings::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path));
}
@@ -1849,10 +1849,16 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
}
if (groups.size()) {
+ // Write all groups on the same line as they're part of a section header.
+ // This improves readability while not impacting VCS friendliness too much,
+ // since it's rare to have more than 5 groups assigned to a single node.
groups.sort_custom<StringName::AlphCompare>();
- String sgroups = " groups=[\n";
+ String sgroups = " groups=[";
for (int j = 0; j < groups.size(); j++) {
- sgroups += "\"" + String(groups[j]).c_escape() + "\",\n";
+ sgroups += "\"" + String(groups[j]).c_escape() + "\"";
+ if (j < groups.size() - 1) {
+ sgroups += ", ";
+ }
}
sgroups += "]";
header += sgroups;
diff --git a/scene/resources/separation_ray_shape_2d.cpp b/scene/resources/separation_ray_shape_2d.cpp
new file mode 100644
index 0000000000..0acd6d268d
--- /dev/null
+++ b/scene/resources/separation_ray_shape_2d.cpp
@@ -0,0 +1,119 @@
+/*************************************************************************/
+/* separation_ray_shape_2d.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "separation_ray_shape_2d.h"
+
+#include "servers/physics_server_2d.h"
+#include "servers/rendering_server.h"
+
+void SeparationRayShape2D::_update_shape() {
+ Dictionary d;
+ d["length"] = length;
+ d["slide_on_slope"] = slide_on_slope;
+ PhysicsServer2D::get_singleton()->shape_set_data(get_rid(), d);
+ emit_changed();
+}
+
+void SeparationRayShape2D::draw(const RID &p_to_rid, const Color &p_color) {
+ const Vector2 target_position = Vector2(0, get_length());
+
+ const float max_arrow_size = 6;
+ const float line_width = 1.4;
+ bool no_line = target_position.length() < line_width;
+ float arrow_size = CLAMP(target_position.length() * 2 / 3, line_width, max_arrow_size);
+
+ if (no_line) {
+ arrow_size = target_position.length();
+ } else {
+ RS::get_singleton()->canvas_item_add_line(p_to_rid, Vector2(), target_position - target_position.normalized() * arrow_size, p_color, line_width);
+ }
+
+ Transform2D xf;
+ xf.rotate(target_position.angle());
+ xf.translate(Vector2(no_line ? 0 : target_position.length() - arrow_size, 0));
+
+ Vector<Vector2> pts;
+ pts.push_back(xf.xform(Vector2(arrow_size, 0)));
+ pts.push_back(xf.xform(Vector2(0, 0.5 * arrow_size)));
+ pts.push_back(xf.xform(Vector2(0, -0.5 * arrow_size)));
+
+ Vector<Color> cols;
+ for (int i = 0; i < 3; i++) {
+ cols.push_back(p_color);
+ }
+
+ RS::get_singleton()->canvas_item_add_primitive(p_to_rid, pts, cols, Vector<Point2>(), RID());
+}
+
+Rect2 SeparationRayShape2D::get_rect() const {
+ Rect2 rect;
+ rect.position = Vector2();
+ rect.expand_to(Vector2(0, length));
+ rect = rect.grow(Math_SQRT12 * 4);
+ return rect;
+}
+
+real_t SeparationRayShape2D::get_enclosing_radius() const {
+ return length;
+}
+
+void SeparationRayShape2D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_length", "length"), &SeparationRayShape2D::set_length);
+ ClassDB::bind_method(D_METHOD("get_length"), &SeparationRayShape2D::get_length);
+
+ ClassDB::bind_method(D_METHOD("set_slide_on_slope", "active"), &SeparationRayShape2D::set_slide_on_slope);
+ ClassDB::bind_method(D_METHOD("get_slide_on_slope"), &SeparationRayShape2D::get_slide_on_slope);
+
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slide_on_slope"), "set_slide_on_slope", "get_slide_on_slope");
+}
+
+void SeparationRayShape2D::set_length(real_t p_length) {
+ length = p_length;
+ _update_shape();
+}
+
+real_t SeparationRayShape2D::get_length() const {
+ return length;
+}
+
+void SeparationRayShape2D::set_slide_on_slope(bool p_active) {
+ slide_on_slope = p_active;
+ _update_shape();
+}
+
+bool SeparationRayShape2D::get_slide_on_slope() const {
+ return slide_on_slope;
+}
+
+SeparationRayShape2D::SeparationRayShape2D() :
+ Shape2D(PhysicsServer2D::get_singleton()->separation_ray_shape_create()) {
+ _update_shape();
+}
diff --git a/scene/resources/separation_ray_shape_2d.h b/scene/resources/separation_ray_shape_2d.h
new file mode 100644
index 0000000000..5b74e6c727
--- /dev/null
+++ b/scene/resources/separation_ray_shape_2d.h
@@ -0,0 +1,61 @@
+/*************************************************************************/
+/* separation_ray_shape_2d.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef SEPARATION_RAY_SHAPE_2D_H
+#define SEPARATION_RAY_SHAPE_2D_H
+
+#include "scene/resources/shape_2d.h"
+
+class SeparationRayShape2D : public Shape2D {
+ GDCLASS(SeparationRayShape2D, Shape2D);
+
+ real_t length = 20.0;
+ bool slide_on_slope = false;
+
+ void _update_shape();
+
+protected:
+ static void _bind_methods();
+
+public:
+ void set_length(real_t p_length);
+ real_t get_length() const;
+
+ void set_slide_on_slope(bool p_active);
+ bool get_slide_on_slope() const;
+
+ virtual void draw(const RID &p_to_rid, const Color &p_color) override;
+ virtual Rect2 get_rect() const override;
+ virtual real_t get_enclosing_radius() const override;
+
+ SeparationRayShape2D();
+};
+
+#endif // SEPARATION_RAY_SHAPE_2D_H
diff --git a/modules/gdnative/net/stream_peer_gdnative.cpp b/scene/resources/separation_ray_shape_3d.cpp
index 72ab72323d..376e04c844 100644
--- a/modules/gdnative/net/stream_peer_gdnative.cpp
+++ b/scene/resources/separation_ray_shape_3d.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* stream_peer_gdnative.cpp */
+/* separation_ray_shape_3d.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,50 +28,64 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "stream_peer_gdnative.h"
+#include "separation_ray_shape_3d.h"
-StreamPeerGDNative::StreamPeerGDNative() {
- interface = nullptr;
-}
+#include "servers/physics_server_3d.h"
-StreamPeerGDNative::~StreamPeerGDNative() {
-}
+Vector<Vector3> SeparationRayShape3D::get_debug_mesh_lines() const {
+ Vector<Vector3> points;
+ points.push_back(Vector3());
+ points.push_back(Vector3(0, 0, get_length()));
-void StreamPeerGDNative::set_native_stream_peer(const godot_net_stream_peer *p_interface) {
- interface = p_interface;
+ return points;
}
-void StreamPeerGDNative::_bind_methods() {
+real_t SeparationRayShape3D::get_enclosing_radius() const {
+ return length;
}
-Error StreamPeerGDNative::put_data(const uint8_t *p_data, int p_bytes) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)(interface->put_data(interface->data, p_data, p_bytes));
+void SeparationRayShape3D::_update_shape() {
+ Dictionary d;
+ d["length"] = length;
+ d["slide_on_slope"] = slide_on_slope;
+ PhysicsServer3D::get_singleton()->shape_set_data(get_shape(), d);
+ Shape3D::_update_shape();
}
-Error StreamPeerGDNative::put_partial_data(const uint8_t *p_data, int p_bytes, int &r_sent) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)(interface->put_partial_data(interface->data, p_data, p_bytes, &r_sent));
+void SeparationRayShape3D::set_length(float p_length) {
+ length = p_length;
+ _update_shape();
+ notify_change_to_owners();
}
-Error StreamPeerGDNative::get_data(uint8_t *p_buffer, int p_bytes) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)(interface->get_data(interface->data, p_buffer, p_bytes));
+float SeparationRayShape3D::get_length() const {
+ return length;
}
-Error StreamPeerGDNative::get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_received) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)(interface->get_partial_data(interface->data, p_buffer, p_bytes, &r_received));
+void SeparationRayShape3D::set_slide_on_slope(bool p_active) {
+ slide_on_slope = p_active;
+ _update_shape();
+ notify_change_to_owners();
}
-int StreamPeerGDNative::get_available_bytes() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_available_bytes(interface->data);
+bool SeparationRayShape3D::get_slide_on_slope() const {
+ return slide_on_slope;
}
-extern "C" {
+void SeparationRayShape3D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_length", "length"), &SeparationRayShape3D::set_length);
+ ClassDB::bind_method(D_METHOD("get_length"), &SeparationRayShape3D::get_length);
-void GDAPI godot_net_bind_stream_peer(godot_object *p_obj, const godot_net_stream_peer *p_interface) {
- ((StreamPeerGDNative *)p_obj)->set_native_stream_peer(p_interface);
+ ClassDB::bind_method(D_METHOD("set_slide_on_slope", "active"), &SeparationRayShape3D::set_slide_on_slope);
+ ClassDB::bind_method(D_METHOD("get_slide_on_slope"), &SeparationRayShape3D::get_slide_on_slope);
+
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "0,4096,0.001"), "set_length", "get_length");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slide_on_slope"), "set_slide_on_slope", "get_slide_on_slope");
}
+
+SeparationRayShape3D::SeparationRayShape3D() :
+ Shape3D(PhysicsServer3D::get_singleton()->shape_create(PhysicsServer3D::SHAPE_SEPARATION_RAY)) {
+ /* Code copied from setters to prevent the use of uninitialized variables */
+ _update_shape();
+ notify_change_to_owners();
}
diff --git a/modules/gdnative/xr/register_types.cpp b/scene/resources/separation_ray_shape_3d.h
index cb043debc5..54058b6095 100644
--- a/modules/gdnative/xr/register_types.cpp
+++ b/scene/resources/separation_ray_shape_3d.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* register_types.cpp */
+/* separation_ray_shape_3d.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,13 +28,29 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "register_types.h"
-#include "xr_interface_gdnative.h"
+#ifndef SEPARATION_RAY_SHAPE_H
+#define SEPARATION_RAY_SHAPE_H
+#include "scene/resources/shape_3d.h"
-void register_xr_types() {
- GDREGISTER_CLASS(XRInterfaceGDNative);
- ClassDB::add_compatibility_class("ARVRInterfaceGDNative", "XRInterfaceGDNative");
-}
+class SeparationRayShape3D : public Shape3D {
+ GDCLASS(SeparationRayShape3D, Shape3D);
+ float length = 1.0;
+ bool slide_on_slope = false;
-void unregister_xr_types() {
-}
+protected:
+ static void _bind_methods();
+ virtual void _update_shape() override;
+
+public:
+ void set_length(float p_length);
+ float get_length() const;
+
+ void set_slide_on_slope(bool p_active);
+ bool get_slide_on_slope() const;
+
+ virtual Vector<Vector3> get_debug_mesh_lines() const override;
+ virtual real_t get_enclosing_radius() const override;
+
+ SeparationRayShape3D();
+};
+#endif // SEPARATION_RAY_SHAPE_H
diff --git a/scene/resources/skeleton_modification_2d.cpp b/scene/resources/skeleton_modification_2d.cpp
index 2d5b42ddf4..7ac40b497d 100644
--- a/scene/resources/skeleton_modification_2d.cpp
+++ b/scene/resources/skeleton_modification_2d.cpp
@@ -44,7 +44,7 @@
///////////////////////////////////////
void SkeletonModification2D::_execute(float p_delta) {
- call("_execute", p_delta);
+ GDVIRTUAL_CALL(_execute, p_delta);
if (!enabled) {
return;
@@ -59,11 +59,11 @@ void SkeletonModification2D::_setup_modification(SkeletonModificationStack2D *p_
WARN_PRINT("Could not setup modification with name " + get_name());
}
- call("_setup_modification", p_stack);
+ GDVIRTUAL_CALL(_setup_modification, Ref<SkeletonModificationStack2D>(p_stack));
}
void SkeletonModification2D::_draw_editor_gizmo() {
- call("_draw_editor_gizmo");
+ GDVIRTUAL_CALL(_draw_editor_gizmo);
}
void SkeletonModification2D::set_enabled(bool p_enabled) {
@@ -96,37 +96,25 @@ float SkeletonModification2D::clamp_angle(float p_angle, float p_min_bound, floa
p_max_bound = Math_TAU + p_max_bound;
}
if (p_min_bound > p_max_bound) {
- float tmp = p_min_bound;
- p_min_bound = p_max_bound;
- p_max_bound = tmp;
+ SWAP(p_min_bound, p_max_bound);
}
+ bool is_beyond_bounds = (p_angle < p_min_bound || p_angle > p_max_bound);
+ bool is_within_bounds = (p_angle > p_min_bound && p_angle < p_max_bound);
+
// Note: May not be the most optimal way to clamp, but it always constraints to the nearest angle.
- if (p_invert == false) {
- if (p_angle < p_min_bound || p_angle > p_max_bound) {
- Vector2 min_bound_vec = Vector2(Math::cos(p_min_bound), Math::sin(p_min_bound));
- Vector2 max_bound_vec = Vector2(Math::cos(p_max_bound), Math::sin(p_max_bound));
- Vector2 angle_vec = Vector2(Math::cos(p_angle), Math::sin(p_angle));
-
- if (angle_vec.distance_squared_to(min_bound_vec) <= angle_vec.distance_squared_to(max_bound_vec)) {
- p_angle = p_min_bound;
- } else {
- p_angle = p_max_bound;
- }
- }
- } else {
- if (p_angle > p_min_bound && p_angle < p_max_bound) {
- Vector2 min_bound_vec = Vector2(Math::cos(p_min_bound), Math::sin(p_min_bound));
- Vector2 max_bound_vec = Vector2(Math::cos(p_max_bound), Math::sin(p_max_bound));
- Vector2 angle_vec = Vector2(Math::cos(p_angle), Math::sin(p_angle));
+ if ((!p_invert && is_beyond_bounds) || (p_invert && is_within_bounds)) {
+ Vector2 min_bound_vec = Vector2(Math::cos(p_min_bound), Math::sin(p_min_bound));
+ Vector2 max_bound_vec = Vector2(Math::cos(p_max_bound), Math::sin(p_max_bound));
+ Vector2 angle_vec = Vector2(Math::cos(p_angle), Math::sin(p_angle));
- if (angle_vec.distance_squared_to(min_bound_vec) <= angle_vec.distance_squared_to(max_bound_vec)) {
- p_angle = p_min_bound;
- } else {
- p_angle = p_max_bound;
- }
+ if (angle_vec.distance_squared_to(min_bound_vec) <= angle_vec.distance_squared_to(max_bound_vec)) {
+ p_angle = p_min_bound;
+ } else {
+ p_angle = p_max_bound;
}
}
+
return p_angle;
}
@@ -152,9 +140,7 @@ void SkeletonModification2D::editor_draw_angle_constraints(Bone2D *p_operation_b
arc_angle_max = (Math_PI * 2) + arc_angle_max;
}
if (arc_angle_min > arc_angle_max) {
- float tmp = arc_angle_min;
- arc_angle_min = arc_angle_max;
- arc_angle_max = tmp;
+ SWAP(arc_angle_min, arc_angle_max);
}
arc_angle_min += p_operation_bone->get_bone_angle();
arc_angle_max += p_operation_bone->get_bone_angle();
@@ -228,9 +214,9 @@ bool SkeletonModification2D::get_editor_draw_gizmo() const {
}
void SkeletonModification2D::_bind_methods() {
- BIND_VMETHOD(MethodInfo("_execute", PropertyInfo(Variant::FLOAT, "delta")));
- BIND_VMETHOD(MethodInfo("_setup_modification", PropertyInfo(Variant::OBJECT, "modification_stack", PROPERTY_HINT_RESOURCE_TYPE, "SkeletonModificationStack2D")));
- BIND_VMETHOD(MethodInfo("_draw_editor_gizmo"));
+ GDVIRTUAL_BIND(_execute, "delta");
+ GDVIRTUAL_BIND(_setup_modification, "modification_stack")
+ GDVIRTUAL_BIND(_draw_editor_gizmo)
ClassDB::bind_method(D_METHOD("set_enabled", "enabled"), &SkeletonModification2D::set_enabled);
ClassDB::bind_method(D_METHOD("get_enabled"), &SkeletonModification2D::get_enabled);
diff --git a/scene/resources/skeleton_modification_2d.h b/scene/resources/skeleton_modification_2d.h
index 18633e55cb..aaddb9136e 100644
--- a/scene/resources/skeleton_modification_2d.h
+++ b/scene/resources/skeleton_modification_2d.h
@@ -57,6 +57,10 @@ protected:
bool _print_execution_error(bool p_condition, String p_message);
+ GDVIRTUAL1(_execute, double)
+ GDVIRTUAL1(_setup_modification, Ref<SkeletonModificationStack2D>)
+ GDVIRTUAL0(_draw_editor_gizmo)
+
public:
virtual void _execute(float _delta);
virtual void _setup_modification(SkeletonModificationStack2D *p_stack);
diff --git a/scene/resources/skeleton_modification_2d_fabrik.cpp b/scene/resources/skeleton_modification_2d_fabrik.cpp
index c03a92b503..3b5c555f89 100644
--- a/scene/resources/skeleton_modification_2d_fabrik.cpp
+++ b/scene/resources/skeleton_modification_2d_fabrik.cpp
@@ -149,15 +149,6 @@ void SkeletonModification2DFABRIK::_execute(float p_delta) {
return;
}
fabrik_transform_chain.write[i] = joint_bone2d_node->get_global_transform();
-
- // Apply magnet positions
- if (i == 0) {
- continue; // The origin cannot use a magnet position!
- } else {
- Transform2D joint_trans = fabrik_transform_chain[i];
- joint_trans.set_origin(joint_trans.get_origin() + fabrik_data_chain[i].magnet_position);
- fabrik_transform_chain.write[i] = joint_trans;
- }
}
Bone2D *final_bone2d_node = Object::cast_to<Bone2D>(ObjectDB::get_instance(fabrik_data_chain[fabrik_data_chain.size() - 1].bone2d_node_cache));
@@ -223,6 +214,11 @@ void SkeletonModification2DFABRIK::chain_backwards() {
Bone2D *final_bone2d_node = Object::cast_to<Bone2D>(ObjectDB::get_instance(fabrik_data_chain[final_joint_index].bone2d_node_cache));
Transform2D final_bone2d_trans = fabrik_transform_chain[final_joint_index];
+ // Apply magnet position
+ if (final_joint_index != 0) {
+ final_bone2d_trans.set_origin(final_bone2d_trans.get_origin() + fabrik_data_chain[final_joint_index].magnet_position);
+ }
+
// Set the rotation of the tip bone
final_bone2d_trans = final_bone2d_trans.looking_at(target_global_pose.get_origin());
@@ -245,8 +241,13 @@ void SkeletonModification2DFABRIK::chain_backwards() {
Bone2D *current_bone2d_node = Object::cast_to<Bone2D>(ObjectDB::get_instance(fabrik_data_chain[i].bone2d_node_cache));
Transform2D current_pose = fabrik_transform_chain[i];
+ // Apply magnet position
+ if (i != 0) {
+ current_pose.set_origin(current_pose.get_origin() + fabrik_data_chain[i].magnet_position);
+ }
+
float current_bone2d_node_length = current_bone2d_node->get_length() * MIN(current_bone2d_node->get_global_scale().x, current_bone2d_node->get_global_scale().y);
- float length = current_bone2d_node_length / (previous_pose.get_origin() - current_pose.get_origin()).length();
+ float length = current_bone2d_node_length / (current_pose.get_origin().distance_to(previous_pose.get_origin()));
Vector2 finish_position = previous_pose.get_origin().lerp(current_pose.get_origin(), length);
current_pose.set_origin(finish_position);
@@ -267,7 +268,7 @@ void SkeletonModification2DFABRIK::chain_forwards() {
Transform2D next_pose = fabrik_transform_chain[i + 1];
float current_bone2d_node_length = current_bone2d_node->get_length() * MIN(current_bone2d_node->get_global_scale().x, current_bone2d_node->get_global_scale().y);
- float length = current_bone2d_node_length / (current_pose.get_origin() - next_pose.get_origin()).length();
+ float length = current_bone2d_node_length / (next_pose.get_origin().distance_to(current_pose.get_origin()));
Vector2 finish_position = current_pose.get_origin().lerp(next_pose.get_origin(), length);
current_pose.set_origin(finish_position);
diff --git a/scene/resources/skeleton_modification_2d_twoboneik.cpp b/scene/resources/skeleton_modification_2d_twoboneik.cpp
index 88d80a501f..4f752896a9 100644
--- a/scene/resources/skeleton_modification_2d_twoboneik.cpp
+++ b/scene/resources/skeleton_modification_2d_twoboneik.cpp
@@ -144,7 +144,7 @@ void SkeletonModification2DTwoBoneIK::_execute(float p_delta) {
// With modifications by TwistedTwigleg
Vector2 target_difference = target->get_global_position() - joint_one_bone->get_global_position();
float joint_one_to_target = target_difference.length();
- float angle_atan = Math::atan2(target_difference.y, target_difference.x);
+ float angle_atan = target_difference.angle();
float bone_one_length = joint_one_bone->get_length() * MIN(joint_one_bone->get_global_scale().x, joint_one_bone->get_global_scale().y);
float bone_two_length = joint_two_bone->get_length() * MIN(joint_two_bone->get_global_scale().x, joint_two_bone->get_global_scale().y);
diff --git a/scene/resources/skeleton_modification_3d.cpp b/scene/resources/skeleton_modification_3d.cpp
index 9306ee14cd..b476952d86 100644
--- a/scene/resources/skeleton_modification_3d.cpp
+++ b/scene/resources/skeleton_modification_3d.cpp
@@ -32,11 +32,7 @@
#include "scene/3d/skeleton_3d.h"
void SkeletonModification3D::_execute(real_t p_delta) {
- if (get_script_instance()) {
- if (get_script_instance()->has_method("execute")) {
- get_script_instance()->call("execute", p_delta);
- }
- }
+ GDVIRTUAL_CALL(_execute, p_delta);
if (!enabled)
return;
@@ -50,11 +46,7 @@ void SkeletonModification3D::_setup_modification(SkeletonModificationStack3D *p_
WARN_PRINT("Could not setup modification with name " + this->get_name());
}
- if (get_script_instance()) {
- if (get_script_instance()->has_method("setup_modification")) {
- get_script_instance()->call("setup_modification", p_stack);
- }
- }
+ GDVIRTUAL_CALL(_setup_modification, Ref<SkeletonModificationStack3D>(p_stack));
}
void SkeletonModification3D::set_enabled(bool p_enabled) {
@@ -80,37 +72,25 @@ real_t SkeletonModification3D::clamp_angle(real_t p_angle, real_t p_min_bound, r
p_max_bound = Math_TAU + p_max_bound;
}
if (p_min_bound > p_max_bound) {
- real_t tmp = p_min_bound;
- p_min_bound = p_max_bound;
- p_max_bound = tmp;
+ SWAP(p_min_bound, p_max_bound);
}
+ bool is_beyond_bounds = (p_angle < p_min_bound || p_angle > p_max_bound);
+ bool is_within_bounds = (p_angle > p_min_bound && p_angle < p_max_bound);
+
// Note: May not be the most optimal way to clamp, but it always constraints to the nearest angle.
- if (p_invert == false) {
- if (p_angle < p_min_bound || p_angle > p_max_bound) {
- Vector2 min_bound_vec = Vector2(Math::cos(p_min_bound), Math::sin(p_min_bound));
- Vector2 max_bound_vec = Vector2(Math::cos(p_max_bound), Math::sin(p_max_bound));
- Vector2 angle_vec = Vector2(Math::cos(p_angle), Math::sin(p_angle));
-
- if (angle_vec.distance_squared_to(min_bound_vec) <= angle_vec.distance_squared_to(max_bound_vec)) {
- p_angle = p_min_bound;
- } else {
- p_angle = p_max_bound;
- }
- }
- } else {
- if (p_angle > p_min_bound && p_angle < p_max_bound) {
- Vector2 min_bound_vec = Vector2(Math::cos(p_min_bound), Math::sin(p_min_bound));
- Vector2 max_bound_vec = Vector2(Math::cos(p_max_bound), Math::sin(p_max_bound));
- Vector2 angle_vec = Vector2(Math::cos(p_angle), Math::sin(p_angle));
-
- if (angle_vec.distance_squared_to(min_bound_vec) <= angle_vec.distance_squared_to(max_bound_vec)) {
- p_angle = p_min_bound;
- } else {
- p_angle = p_max_bound;
- }
+ if ((!p_invert && is_beyond_bounds) || (p_invert && is_within_bounds)) {
+ Vector2 min_bound_vec = Vector2(Math::cos(p_min_bound), Math::sin(p_min_bound));
+ Vector2 max_bound_vec = Vector2(Math::cos(p_max_bound), Math::sin(p_max_bound));
+ Vector2 angle_vec = Vector2(Math::cos(p_angle), Math::sin(p_angle));
+
+ if (angle_vec.distance_squared_to(min_bound_vec) <= angle_vec.distance_squared_to(max_bound_vec)) {
+ p_angle = p_min_bound;
+ } else {
+ p_angle = p_max_bound;
}
}
+
return p_angle;
}
@@ -148,8 +128,8 @@ int SkeletonModification3D::get_execution_mode() const {
}
void SkeletonModification3D::_bind_methods() {
- BIND_VMETHOD(MethodInfo("_execute", PropertyInfo(Variant::FLOAT, "delta")));
- BIND_VMETHOD(MethodInfo("_setup_modification", PropertyInfo(Variant::OBJECT, "modification_stack", PROPERTY_HINT_RESOURCE_TYPE, "SkeletonModificationStack3D")));
+ GDVIRTUAL_BIND(_execute, "delta");
+ GDVIRTUAL_BIND(_setup_modification, "modification_stack")
ClassDB::bind_method(D_METHOD("set_enabled", "enabled"), &SkeletonModification3D::set_enabled);
ClassDB::bind_method(D_METHOD("get_enabled"), &SkeletonModification3D::get_enabled);
diff --git a/scene/resources/skeleton_modification_3d.h b/scene/resources/skeleton_modification_3d.h
index 94ab0bf32c..fb1f3d33d1 100644
--- a/scene/resources/skeleton_modification_3d.h
+++ b/scene/resources/skeleton_modification_3d.h
@@ -53,6 +53,9 @@ protected:
bool _print_execution_error(bool p_condition, String p_message);
+ GDVIRTUAL1(_execute, double)
+ GDVIRTUAL1(_setup_modification, Ref<SkeletonModificationStack3D>)
+
public:
virtual void _execute(real_t p_delta);
virtual void _setup_modification(SkeletonModificationStack3D *p_stack);
diff --git a/scene/resources/skeleton_modification_3d_fabrik.cpp b/scene/resources/skeleton_modification_3d_fabrik.cpp
index 69f75eb7b5..e615615924 100644
--- a/scene/resources/skeleton_modification_3d_fabrik.cpp
+++ b/scene/resources/skeleton_modification_3d_fabrik.cpp
@@ -232,7 +232,7 @@ void SkeletonModification3DFABRIK::chain_backwards() {
int current_bone_idx = fabrik_data_chain[i].bone_idx;
Transform3D current_trans = stack->skeleton->local_pose_to_global_pose(current_bone_idx, stack->skeleton->get_bone_local_pose_override(current_bone_idx));
- real_t length = fabrik_data_chain[i].length / (next_bone_trans.origin - current_trans.origin).length();
+ real_t length = fabrik_data_chain[i].length / (current_trans.origin.distance_to(next_bone_trans.origin));
current_trans.origin = next_bone_trans.origin.lerp(current_trans.origin, length);
// Apply it back to the skeleton
@@ -253,7 +253,7 @@ void SkeletonModification3DFABRIK::chain_forwards() {
int next_bone_idx = fabrik_data_chain[i + 1].bone_idx;
Transform3D next_bone_trans = stack->skeleton->local_pose_to_global_pose(next_bone_idx, stack->skeleton->get_bone_local_pose_override(next_bone_idx));
- real_t length = fabrik_data_chain[i].length / (current_trans.origin - next_bone_trans.origin).length();
+ real_t length = fabrik_data_chain[i].length / (next_bone_trans.origin.distance_to(current_trans.origin));
next_bone_trans.origin = current_trans.origin.lerp(next_bone_trans.origin, length);
// Apply it back to the skeleton
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index 875aa30824..a8cd872408 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -409,7 +409,7 @@ Array SurfaceTool::commit_to_arrays() {
for (uint32_t idx = 0; idx < vertex_array.size(); idx++) {
const Vertex &v = vertex_array[idx];
- const Color &c = v.custom[idx];
+ const Color &c = v.custom[fmt];
w[idx * 4 + 0] = CLAMP(int32_t(c.r * 255.0), 0, 255);
w[idx * 4 + 1] = CLAMP(int32_t(c.g * 255.0), 0, 255);
w[idx * 4 + 2] = CLAMP(int32_t(c.b * 255.0), 0, 255);
@@ -426,7 +426,7 @@ Array SurfaceTool::commit_to_arrays() {
for (uint32_t idx = 0; idx < vertex_array.size(); idx++) {
const Vertex &v = vertex_array[idx];
- const Color &c = v.custom[idx];
+ const Color &c = v.custom[fmt];
w[idx * 4 + 0] = uint8_t(int8_t(CLAMP(int32_t(c.r * 127.0), -128, 127)));
w[idx * 4 + 1] = uint8_t(int8_t(CLAMP(int32_t(c.g * 127.0), -128, 127)));
w[idx * 4 + 2] = uint8_t(int8_t(CLAMP(int32_t(c.b * 127.0), -128, 127)));
@@ -443,7 +443,7 @@ Array SurfaceTool::commit_to_arrays() {
for (uint32_t idx = 0; idx < vertex_array.size(); idx++) {
const Vertex &v = vertex_array[idx];
- const Color &c = v.custom[idx];
+ const Color &c = v.custom[fmt];
w[idx * 2 + 0] = Math::make_half_float(c.r);
w[idx * 2 + 1] = Math::make_half_float(c.g);
}
@@ -458,7 +458,7 @@ Array SurfaceTool::commit_to_arrays() {
for (uint32_t idx = 0; idx < vertex_array.size(); idx++) {
const Vertex &v = vertex_array[idx];
- const Color &c = v.custom[idx];
+ const Color &c = v.custom[fmt];
w[idx * 4 + 0] = Math::make_half_float(c.r);
w[idx * 4 + 1] = Math::make_half_float(c.g);
w[idx * 4 + 2] = Math::make_half_float(c.b);
@@ -475,7 +475,7 @@ Array SurfaceTool::commit_to_arrays() {
for (uint32_t idx = 0; idx < vertex_array.size(); idx++) {
const Vertex &v = vertex_array[idx];
- const Color &c = v.custom[idx];
+ const Color &c = v.custom[fmt];
w[idx] = c.r;
}
@@ -489,7 +489,7 @@ Array SurfaceTool::commit_to_arrays() {
for (uint32_t idx = 0; idx < vertex_array.size(); idx++) {
const Vertex &v = vertex_array[idx];
- const Color &c = v.custom[idx];
+ const Color &c = v.custom[fmt];
w[idx * 2 + 0] = c.r;
w[idx * 2 + 1] = c.g;
}
@@ -504,7 +504,7 @@ Array SurfaceTool::commit_to_arrays() {
for (uint32_t idx = 0; idx < vertex_array.size(); idx++) {
const Vertex &v = vertex_array[idx];
- const Color &c = v.custom[idx];
+ const Color &c = v.custom[fmt];
w[idx * 3 + 0] = c.r;
w[idx * 3 + 1] = c.g;
w[idx * 3 + 2] = c.b;
@@ -520,7 +520,7 @@ Array SurfaceTool::commit_to_arrays() {
for (uint32_t idx = 0; idx < vertex_array.size(); idx++) {
const Vertex &v = vertex_array[idx];
- const Color &c = v.custom[idx];
+ const Color &c = v.custom[fmt];
w[idx * 4 + 0] = c.r;
w[idx * 4 + 1] = c.g;
w[idx * 4 + 2] = c.b;
@@ -679,6 +679,9 @@ void SurfaceTool::_create_list(const Ref<Mesh> &p_existing, int p_surface, Local
_create_list_from_arrays(arr, r_vertex, r_index, lformat);
}
+static const uint32_t custom_mask[RS::ARRAY_CUSTOM_COUNT] = { Mesh::ARRAY_FORMAT_CUSTOM0, Mesh::ARRAY_FORMAT_CUSTOM1, Mesh::ARRAY_FORMAT_CUSTOM2, Mesh::ARRAY_FORMAT_CUSTOM3 };
+static const uint32_t custom_shift[RS::ARRAY_CUSTOM_COUNT] = { Mesh::ARRAY_FORMAT_CUSTOM0_SHIFT, Mesh::ARRAY_FORMAT_CUSTOM1_SHIFT, Mesh::ARRAY_FORMAT_CUSTOM2_SHIFT, Mesh::ARRAY_FORMAT_CUSTOM3_SHIFT };
+
void SurfaceTool::create_vertex_array_from_triangle_arrays(const Array &p_arrays, LocalVector<SurfaceTool::Vertex> &ret, uint32_t *r_format) {
ret.clear();
@@ -733,8 +736,6 @@ void SurfaceTool::create_vertex_array_from_triangle_arrays(const Array &p_arrays
if (warr.size()) {
lformat |= RS::ARRAY_FORMAT_WEIGHTS;
}
- static const uint32_t custom_mask[RS::ARRAY_CUSTOM_COUNT] = { Mesh::ARRAY_FORMAT_CUSTOM0, Mesh::ARRAY_FORMAT_CUSTOM1, Mesh::ARRAY_FORMAT_CUSTOM2, Mesh::ARRAY_FORMAT_CUSTOM3 };
- static const uint32_t custom_shift[RS::ARRAY_CUSTOM_COUNT] = { Mesh::ARRAY_FORMAT_CUSTOM0_SHIFT, Mesh::ARRAY_FORMAT_CUSTOM1_SHIFT, Mesh::ARRAY_FORMAT_CUSTOM2_SHIFT, Mesh::ARRAY_FORMAT_CUSTOM3_SHIFT };
for (int i = 0; i < RS::ARRAY_CUSTOM_COUNT; i++) {
ERR_CONTINUE_MSG(p_arrays[RS::ARRAY_CUSTOM0 + i].get_type() == Variant::PACKED_BYTE_ARRAY, "Extracting Byte/Half formats is not supported");
@@ -832,6 +833,12 @@ void SurfaceTool::create_from_triangle_arrays(const Array &p_arrays) {
clear();
primitive = Mesh::PRIMITIVE_TRIANGLES;
_create_list_from_arrays(p_arrays, &vertex_array, &index_array, format);
+
+ for (int j = 0; j < RS::ARRAY_CUSTOM_COUNT; j++) {
+ if (format & custom_mask[j]) {
+ last_custom_format[j] = (CustomFormat)((format >> custom_shift[j]) & RS::ARRAY_FORMAT_CUSTOM_MASK);
+ }
+ }
}
void SurfaceTool::create_from(const Ref<Mesh> &p_existing, int p_surface) {
@@ -841,6 +848,12 @@ void SurfaceTool::create_from(const Ref<Mesh> &p_existing, int p_surface) {
primitive = p_existing->surface_get_primitive_type(p_surface);
_create_list(p_existing, p_surface, &vertex_array, &index_array, format);
material = p_existing->surface_get_material(p_surface);
+
+ for (int j = 0; j < RS::ARRAY_CUSTOM_COUNT; j++) {
+ if (format & custom_mask[j]) {
+ last_custom_format[j] = (CustomFormat)((format >> custom_shift[j]) & RS::ARRAY_FORMAT_CUSTOM_MASK);
+ }
+ }
}
void SurfaceTool::create_from_blend_shape(const Ref<Mesh> &p_existing, int p_surface, const String &p_blend_shape_name) {
@@ -863,6 +876,12 @@ void SurfaceTool::create_from_blend_shape(const Ref<Mesh> &p_existing, int p_sur
Array mesh = arr[shape_idx];
ERR_FAIL_COND(mesh.size() != RS::ARRAY_MAX);
_create_list_from_arrays(arr[shape_idx], &vertex_array, &index_array, format);
+
+ for (int j = 0; j < RS::ARRAY_CUSTOM_COUNT; j++) {
+ if (format & custom_mask[j]) {
+ last_custom_format[j] = (CustomFormat)((format >> custom_shift[j]) & RS::ARRAY_FORMAT_CUSTOM_MASK);
+ }
+ }
}
void SurfaceTool::append_from(const Ref<Mesh> &p_existing, int p_surface, const Transform3D &p_xform) {
@@ -878,6 +897,16 @@ void SurfaceTool::append_from(const Ref<Mesh> &p_existing, int p_surface, const
LocalVector<int> nindices;
_create_list(p_existing, p_surface, &nvertices, &nindices, nformat);
format |= nformat;
+
+ for (int j = 0; j < RS::ARRAY_CUSTOM_COUNT; j++) {
+ if (format & custom_mask[j]) {
+ CustomFormat new_format = (CustomFormat)((format >> custom_shift[j]) & RS::ARRAY_FORMAT_CUSTOM_MASK);
+ if (last_custom_format[j] != CUSTOM_MAX && last_custom_format[j] != new_format) {
+ WARN_PRINT(vformat("Custom %d format %d mismatch when appending format %d", j, last_custom_format[j], new_format));
+ }
+ last_custom_format[j] = new_format;
+ }
+ }
int vfrom = vertex_array.size();
for (uint32_t vi = 0; vi < nvertices.size(); vi++) {
@@ -1147,6 +1176,7 @@ Vector<int> SurfaceTool::generate_lod(float p_threshold, int p_target_index_coun
ERR_FAIL_COND_V(simplify_func == nullptr, lod);
ERR_FAIL_COND_V(vertex_array.size() == 0, lod);
ERR_FAIL_COND_V(index_array.size() == 0, lod);
+ ERR_FAIL_COND_V(index_array.size() % 3 != 0, lod);
lod.resize(index_array.size());
LocalVector<float> vertices; //uses floats
diff --git a/scene/resources/syntax_highlighter.cpp b/scene/resources/syntax_highlighter.cpp
index 173ce2adce..52a3abf74d 100644
--- a/scene/resources/syntax_highlighter.cpp
+++ b/scene/resources/syntax_highlighter.cpp
@@ -43,12 +43,10 @@ Dictionary SyntaxHighlighter::get_line_syntax_highlighting(int p_line) {
return color_map;
}
- ScriptInstance *si = get_script_instance();
- if (si && si->has_method("_get_line_syntax_highlighting")) {
- color_map = si->call("_get_line_syntax_highlighting", p_line);
- } else {
- color_map = _get_line_syntax_highlighting(p_line);
+ if (!GDVIRTUAL_CALL(_get_line_syntax_highlighting, p_line, color_map)) {
+ color_map = _get_line_syntax_highlighting_impl(p_line);
}
+
highlighting_cache[p_line] = color_map;
return color_map;
}
@@ -69,9 +67,7 @@ void SyntaxHighlighter::_lines_edited_from(int p_from_line, int p_to_line) {
void SyntaxHighlighter::clear_highlighting_cache() {
highlighting_cache.clear();
- ScriptInstance *si = get_script_instance();
- if (si && si->has_method("_clear_highlighting_cache")) {
- si->call("_clear_highlighting_cache");
+ if (GDVIRTUAL_CALL(_clear_highlighting_cache)) {
return;
}
_clear_highlighting_cache();
@@ -83,9 +79,7 @@ void SyntaxHighlighter::update_cache() {
if (text_edit == nullptr) {
return;
}
- ScriptInstance *si = get_script_instance();
- if (si && si->has_method("_update_cache")) {
- si->call("_update_cache");
+ if (GDVIRTUAL_CALL(_update_cache)) {
return;
}
_update_cache();
@@ -115,9 +109,9 @@ void SyntaxHighlighter::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear_highlighting_cache"), &SyntaxHighlighter::clear_highlighting_cache);
ClassDB::bind_method(D_METHOD("get_text_edit"), &SyntaxHighlighter::get_text_edit);
- BIND_VMETHOD(MethodInfo(Variant::DICTIONARY, "_get_line_syntax_highlighting", PropertyInfo(Variant::INT, "line")));
- BIND_VMETHOD(MethodInfo("_clear_highlighting_cache"));
- BIND_VMETHOD(MethodInfo("_update_cache"));
+ GDVIRTUAL_BIND(_get_line_syntax_highlighting, "line")
+ GDVIRTUAL_BIND(_clear_highlighting_cache)
+ GDVIRTUAL_BIND(_update_cache)
}
////////////////////////////////////////////////////////////////////////////////
@@ -130,7 +124,7 @@ static bool _is_hex_symbol(char32_t c) {
return ((c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'));
}
-Dictionary CodeHighlighter::_get_line_syntax_highlighting(int p_line) {
+Dictionary CodeHighlighter::_get_line_syntax_highlighting_impl(int p_line) {
Dictionary color_map;
bool prev_is_char = false;
diff --git a/scene/resources/syntax_highlighter.h b/scene/resources/syntax_highlighter.h
index f3964b0c8f..0fe39ccff6 100644
--- a/scene/resources/syntax_highlighter.h
+++ b/scene/resources/syntax_highlighter.h
@@ -32,6 +32,8 @@
#define SYNTAX_HIGHLIGHTER_H
#include "core/io/resource.h"
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
class TextEdit;
@@ -48,9 +50,12 @@ protected:
static void _bind_methods();
+ GDVIRTUAL1RC(Dictionary, _get_line_syntax_highlighting, int)
+ GDVIRTUAL0(_clear_highlighting_cache)
+ GDVIRTUAL0(_update_cache)
public:
Dictionary get_line_syntax_highlighting(int p_line);
- virtual Dictionary _get_line_syntax_highlighting(int p_line) { return Dictionary(); }
+ virtual Dictionary _get_line_syntax_highlighting_impl(int p_line) { return Dictionary(); }
void clear_highlighting_cache();
virtual void _clear_highlighting_cache() {}
@@ -93,7 +98,7 @@ protected:
static void _bind_methods();
public:
- virtual Dictionary _get_line_syntax_highlighting(int p_line) override;
+ virtual Dictionary _get_line_syntax_highlighting_impl(int p_line) override;
virtual void _clear_highlighting_cache() override;
virtual void _update_cache() override;
diff --git a/scene/resources/text_line.cpp b/scene/resources/text_line.cpp
index 0807a062f2..d2f38ba836 100644
--- a/scene/resources/text_line.cpp
+++ b/scene/resources/text_line.cpp
@@ -211,8 +211,8 @@ void TextLine::set_bidi_override(const Vector<Vector2i> &p_override) {
bool TextLine::add_string(const String &p_text, const Ref<Font> &p_fonts, int p_size, const Dictionary &p_opentype_features, const String &p_language) {
ERR_FAIL_COND_V(p_fonts.is_null(), false);
bool res = TS->shaped_text_add_string(rid, p_text, p_fonts->get_rids(), p_size, p_opentype_features, p_language);
- spacing_top = p_fonts->get_spacing(Font::SPACING_TOP);
- spacing_bottom = p_fonts->get_spacing(Font::SPACING_BOTTOM);
+ spacing_top = p_fonts->get_spacing(TextServer::SPACING_TOP);
+ spacing_bottom = p_fonts->get_spacing(TextServer::SPACING_BOTTOM);
dirty = true;
return res;
}
@@ -409,8 +409,8 @@ int TextLine::hit_test(float p_coords) const {
TextLine::TextLine(const String &p_text, const Ref<Font> &p_fonts, int p_size, const Dictionary &p_opentype_features, const String &p_language, TextServer::Direction p_direction, TextServer::Orientation p_orientation) {
rid = TS->create_shaped_text(p_direction, p_orientation);
- spacing_top = p_fonts->get_spacing(Font::SPACING_TOP);
- spacing_bottom = p_fonts->get_spacing(Font::SPACING_BOTTOM);
+ spacing_top = p_fonts->get_spacing(TextServer::SPACING_TOP);
+ spacing_bottom = p_fonts->get_spacing(TextServer::SPACING_BOTTOM);
TS->shaped_text_add_string(rid, p_text, p_fonts->get_rids(), p_size, p_opentype_features, p_language);
}
diff --git a/scene/resources/text_paragraph.cpp b/scene/resources/text_paragraph.cpp
index 357411ae04..62949b9b98 100644
--- a/scene/resources/text_paragraph.cpp
+++ b/scene/resources/text_paragraph.cpp
@@ -333,8 +333,8 @@ void TextParagraph::clear_dropcap() {
bool TextParagraph::add_string(const String &p_text, const Ref<Font> &p_fonts, int p_size, const Dictionary &p_opentype_features, const String &p_language) {
ERR_FAIL_COND_V(p_fonts.is_null(), false);
bool res = TS->shaped_text_add_string(rid, p_text, p_fonts->get_rids(), p_size, p_opentype_features, p_language);
- spacing_top = p_fonts->get_spacing(Font::SPACING_TOP);
- spacing_bottom = p_fonts->get_spacing(Font::SPACING_BOTTOM);
+ spacing_top = p_fonts->get_spacing(TextServer::SPACING_TOP);
+ spacing_bottom = p_fonts->get_spacing(TextServer::SPACING_BOTTOM);
lines_dirty = true;
return res;
}
@@ -437,7 +437,8 @@ Size2 TextParagraph::get_non_wraped_size() const {
Size2 TextParagraph::get_size() const {
const_cast<TextParagraph *>(this)->_shape_lines();
Size2 size;
- for (int i = 0; i < lines_rid.size(); i++) {
+ int visible_lines = (max_lines_visible >= 0) ? MIN(max_lines_visible, lines_rid.size()) : lines_rid.size();
+ for (int i = 0; i < visible_lines; i++) {
Size2 lsize = TS->shaped_text_get_size(lines_rid[i]);
if (TS->shaped_text_get_orientation(lines_rid[i]) == TextServer::ORIENTATION_HORIZONTAL) {
size.x = MAX(size.x, lsize.x);
@@ -587,15 +588,15 @@ void TextParagraph::draw(RID p_canvas, const Vector2 &p_pos, const Color &p_colo
l_width -= h_offset;
}
}
- float length = TS->shaped_text_get_width(lines_rid[i]);
+ float line_width = TS->shaped_text_get_width(lines_rid[i]);
if (width > 0) {
switch (align) {
case HALIGN_FILL:
if (TS->shaped_text_get_direction(lines_rid[i]) == TextServer::DIRECTION_RTL) {
if (TS->shaped_text_get_orientation(lines_rid[i]) == TextServer::ORIENTATION_HORIZONTAL) {
- ofs.x += l_width - length;
+ ofs.x += l_width - line_width;
} else {
- ofs.y += l_width - length;
+ ofs.y += l_width - line_width;
}
}
break;
@@ -603,16 +604,16 @@ void TextParagraph::draw(RID p_canvas, const Vector2 &p_pos, const Color &p_colo
break;
case HALIGN_CENTER: {
if (TS->shaped_text_get_orientation(lines_rid[i]) == TextServer::ORIENTATION_HORIZONTAL) {
- ofs.x += Math::floor((l_width - length) / 2.0);
+ ofs.x += Math::floor((l_width - line_width) / 2.0);
} else {
- ofs.y += Math::floor((l_width - length) / 2.0);
+ ofs.y += Math::floor((l_width - line_width) / 2.0);
}
} break;
case HALIGN_RIGHT: {
if (TS->shaped_text_get_orientation(lines_rid[i]) == TextServer::ORIENTATION_HORIZONTAL) {
- ofs.x += l_width - length;
+ ofs.x += l_width - line_width;
} else {
- ofs.y += l_width - length;
+ ofs.y += l_width - line_width;
}
} break;
}
@@ -828,8 +829,8 @@ void TextParagraph::draw_line_outline(RID p_canvas, const Vector2 &p_pos, int p_
TextParagraph::TextParagraph(const String &p_text, const Ref<Font> &p_fonts, int p_size, const Dictionary &p_opentype_features, const String &p_language, float p_width, TextServer::Direction p_direction, TextServer::Orientation p_orientation) {
rid = TS->create_shaped_text(p_direction, p_orientation);
TS->shaped_text_add_string(rid, p_text, p_fonts->get_rids(), p_size, p_opentype_features, p_language);
- spacing_top = p_fonts->get_spacing(Font::SPACING_TOP);
- spacing_bottom = p_fonts->get_spacing(Font::SPACING_BOTTOM);
+ spacing_top = p_fonts->get_spacing(TextServer::SPACING_TOP);
+ spacing_bottom = p_fonts->get_spacing(TextServer::SPACING_BOTTOM);
width = p_width;
}
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 4ad5f2a506..1b3a7a5f2a 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -131,25 +131,6 @@ void ImageTexture::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::VECTOR2, "size", PROPERTY_HINT_NONE, ""));
}
-void ImageTexture::_reload_hook(const RID &p_hook) {
- String path = get_path();
- if (!path.is_resource_file()) {
- return;
- }
-
- Ref<Image> img;
- img.instantiate();
- Error err = ImageLoader::load_image(path, img);
-
- ERR_FAIL_COND_MSG(err != OK, "Cannot load image from path '" + path + "'.");
-
- RID new_texture = RenderingServer::get_singleton()->texture_2d_create(img);
- RenderingServer::get_singleton()->texture_replace(texture, new_texture);
-
- notify_property_list_changed();
- emit_changed();
-}
-
void ImageTexture::create_from_image(const Ref<Image> &p_image) {
ERR_FAIL_COND_MSG(p_image.is_null() || p_image->is_empty(), "Invalid image");
w = p_image->get_width();
@@ -192,10 +173,6 @@ void ImageTexture::update(const Ref<Image> &p_image) {
image_stored = true;
}
-void ImageTexture::_resource_path_changed() {
- String path = get_path();
-}
-
Ref<Image> ImageTexture::get_image() const {
if (image_stored) {
return RenderingServer::get_singleton()->texture_2d_get(texture);
@@ -303,7 +280,6 @@ void ImageTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("update", "image"), &ImageTexture::update);
ClassDB::bind_method(D_METHOD("set_size_override", "size"), &ImageTexture::set_size_override);
- ClassDB::bind_method(D_METHOD("_reload_hook", "rid"), &ImageTexture::_reload_hook);
}
ImageTexture::ImageTexture() {}
@@ -1272,6 +1248,14 @@ bool AtlasTexture::is_pixel_opaque(int p_x, int p_y) const {
return atlas->is_pixel_opaque(x, y);
}
+Ref<Image> AtlasTexture::get_image() const {
+ if (!atlas.is_valid() || !atlas->get_image().is_valid()) {
+ return Ref<Image>();
+ }
+
+ return atlas->get_image()->get_rect(region);
+}
+
AtlasTexture::AtlasTexture() {}
/////////////////////////////////////////
@@ -1758,11 +1742,16 @@ void GradientTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_gradient"), &GradientTexture::get_gradient);
ClassDB::bind_method(D_METHOD("set_width", "width"), &GradientTexture::set_width);
+ // The `get_width()` method is already exposed by the parent class Texture2D.
+
+ ClassDB::bind_method(D_METHOD("set_use_hdr", "enabled"), &GradientTexture::set_use_hdr);
+ ClassDB::bind_method(D_METHOD("is_using_hdr"), &GradientTexture::is_using_hdr);
ClassDB::bind_method(D_METHOD("_update"), &GradientTexture::_update);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "gradient", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_gradient", "get_gradient");
ADD_PROPERTY(PropertyInfo(Variant::INT, "width", PROPERTY_HINT_RANGE, "1,4096"), "set_width", "get_width");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_hdr"), "set_use_hdr", "is_using_hdr");
}
void GradientTexture::set_gradient(Ref<Gradient> p_gradient) {
@@ -1800,30 +1789,49 @@ void GradientTexture::_update() {
return;
}
- Vector<uint8_t> data;
- data.resize(width * 4);
- {
- uint8_t *wd8 = data.ptrw();
+ if (use_hdr) {
+ // High dynamic range.
+ Ref<Image> image = memnew(Image(width, 1, false, Image::FORMAT_RGBAF));
Gradient &g = **gradient;
-
+ // `create()` isn't available for non-uint8_t data, so fill in the data manually.
for (int i = 0; i < width; i++) {
float ofs = float(i) / (width - 1);
- Color color = g.get_color_at_offset(ofs);
+ image->set_pixel(i, 0, g.get_color_at_offset(ofs));
+ }
- wd8[i * 4 + 0] = uint8_t(CLAMP(color.r * 255.0, 0, 255));
- wd8[i * 4 + 1] = uint8_t(CLAMP(color.g * 255.0, 0, 255));
- wd8[i * 4 + 2] = uint8_t(CLAMP(color.b * 255.0, 0, 255));
- wd8[i * 4 + 3] = uint8_t(CLAMP(color.a * 255.0, 0, 255));
+ if (texture.is_valid()) {
+ RID new_texture = RS::get_singleton()->texture_2d_create(image);
+ RS::get_singleton()->texture_replace(texture, new_texture);
+ } else {
+ texture = RS::get_singleton()->texture_2d_create(image);
+ }
+ } else {
+ // Low dynamic range. "Overbright" colors will be clamped.
+ Vector<uint8_t> data;
+ data.resize(width * 4);
+ {
+ uint8_t *wd8 = data.ptrw();
+ Gradient &g = **gradient;
+
+ for (int i = 0; i < width; i++) {
+ float ofs = float(i) / (width - 1);
+ Color color = g.get_color_at_offset(ofs);
+
+ wd8[i * 4 + 0] = uint8_t(CLAMP(color.r * 255.0, 0, 255));
+ wd8[i * 4 + 1] = uint8_t(CLAMP(color.g * 255.0, 0, 255));
+ wd8[i * 4 + 2] = uint8_t(CLAMP(color.b * 255.0, 0, 255));
+ wd8[i * 4 + 3] = uint8_t(CLAMP(color.a * 255.0, 0, 255));
+ }
}
- }
- Ref<Image> image = memnew(Image(width, 1, false, Image::FORMAT_RGBA8, data));
+ Ref<Image> image = memnew(Image(width, 1, false, Image::FORMAT_RGBA8, data));
- if (texture.is_valid()) {
- RID new_texture = RS::get_singleton()->texture_2d_create(image);
- RS::get_singleton()->texture_replace(texture, new_texture);
- } else {
- texture = RS::get_singleton()->texture_2d_create(image);
+ if (texture.is_valid()) {
+ RID new_texture = RS::get_singleton()->texture_2d_create(image);
+ RS::get_singleton()->texture_replace(texture, new_texture);
+ } else {
+ texture = RS::get_singleton()->texture_2d_create(image);
+ }
}
emit_changed();
@@ -1839,6 +1847,19 @@ int GradientTexture::get_width() const {
return width;
}
+void GradientTexture::set_use_hdr(bool p_enabled) {
+ if (p_enabled == use_hdr) {
+ return;
+ }
+
+ use_hdr = p_enabled;
+ _queue_update();
+}
+
+bool GradientTexture::is_using_hdr() const {
+ return use_hdr;
+}
+
Ref<Image> GradientTexture::get_image() const {
if (!texture.is_valid()) {
return Ref<Image>();
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index 2e97c2deb1..862b9a47a6 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -98,8 +98,6 @@ protected:
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
- void _reload_hook(const RID &p_hook);
- virtual void _resource_path_changed() override;
static void _bind_methods();
public:
@@ -252,6 +250,8 @@ public:
bool is_pixel_opaque(int p_x, int p_y) const override;
+ virtual Ref<Image> get_image() const override;
+
AtlasTexture();
};
@@ -686,6 +686,7 @@ private:
bool update_pending = false;
RID texture;
int width = 2048;
+ bool use_hdr = false;
void _queue_update();
void _update();
@@ -700,6 +701,9 @@ public:
void set_width(int p_width);
int get_width() const override;
+ void set_use_hdr(bool p_enabled);
+ bool is_using_hdr() const;
+
virtual RID get_rid() const override { return texture; }
virtual int get_height() const override { return 1; }
virtual bool has_alpha() const override { return true; }
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index fcd31143a8..15e622c9d6 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -205,25 +205,46 @@ bool TileSet::is_uv_clipping() const {
return uv_clipping;
};
-void TileSet::set_occlusion_layers_count(int p_occlusion_layers_count) {
- ERR_FAIL_COND(p_occlusion_layers_count < 0);
- if (occlusion_layers.size() == p_occlusion_layers_count) {
- return;
- }
+int TileSet::get_occlusion_layers_count() const {
+ return occlusion_layers.size();
+};
- occlusion_layers.resize(p_occlusion_layers_count);
+void TileSet::add_occlusion_layer(int p_index) {
+ if (p_index < 0) {
+ p_index = occlusion_layers.size();
+ }
+ ERR_FAIL_INDEX(p_index, occlusion_layers.size() + 1);
+ occlusion_layers.insert(p_index, OcclusionLayer());
- for (Map<int, Ref<TileSetSource>>::Element *E_source = sources.front(); E_source; E_source = E_source->next()) {
- E_source->get()->notify_tile_data_properties_should_change();
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->add_occlusion_layer(p_index);
}
notify_property_list_changed();
emit_changed();
}
-int TileSet::get_occlusion_layers_count() const {
- return occlusion_layers.size();
-};
+void TileSet::move_occlusion_layer(int p_from_index, int p_to_pos) {
+ ERR_FAIL_INDEX(p_from_index, occlusion_layers.size());
+ ERR_FAIL_INDEX(p_to_pos, occlusion_layers.size() + 1);
+ occlusion_layers.insert(p_to_pos, occlusion_layers[p_from_index]);
+ occlusion_layers.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->move_occlusion_layer(p_from_index, p_to_pos);
+ }
+ notify_property_list_changed();
+ emit_changed();
+}
+
+void TileSet::remove_occlusion_layer(int p_index) {
+ ERR_FAIL_INDEX(p_index, occlusion_layers.size());
+ occlusion_layers.remove(p_index);
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->remove_occlusion_layer(p_index);
+ }
+ notify_property_list_changed();
+ emit_changed();
+}
void TileSet::set_occlusion_layer_light_mask(int p_layer_index, int p_light_mask) {
ERR_FAIL_INDEX(p_layer_index, occlusion_layers.size());
@@ -236,7 +257,7 @@ int TileSet::get_occlusion_layer_light_mask(int p_layer_index) const {
return occlusion_layers[p_layer_index].light_mask;
}
-void TileSet::set_occlusion_layer_sdf_collision(int p_layer_index, int p_sdf_collision) {
+void TileSet::set_occlusion_layer_sdf_collision(int p_layer_index, bool p_sdf_collision) {
ERR_FAIL_INDEX(p_layer_index, occlusion_layers.size());
occlusion_layers.write[p_layer_index].sdf_collision = p_sdf_collision;
emit_changed();
@@ -247,25 +268,45 @@ bool TileSet::get_occlusion_layer_sdf_collision(int p_layer_index) const {
return occlusion_layers[p_layer_index].sdf_collision;
}
-// Physics
-void TileSet::set_physics_layers_count(int p_physics_layers_count) {
- ERR_FAIL_COND(p_physics_layers_count < 0);
- if (physics_layers.size() == p_physics_layers_count) {
- return;
- }
+int TileSet::get_physics_layers_count() const {
+ return physics_layers.size();
+}
- physics_layers.resize(p_physics_layers_count);
+void TileSet::add_physics_layer(int p_index) {
+ if (p_index < 0) {
+ p_index = physics_layers.size();
+ }
+ ERR_FAIL_INDEX(p_index, physics_layers.size() + 1);
+ physics_layers.insert(p_index, PhysicsLayer());
- for (Map<int, Ref<TileSetSource>>::Element *E_source = sources.front(); E_source; E_source = E_source->next()) {
- E_source->get()->notify_tile_data_properties_should_change();
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->add_physics_layer(p_index);
}
notify_property_list_changed();
emit_changed();
}
-int TileSet::get_physics_layers_count() const {
- return physics_layers.size();
+void TileSet::move_physics_layer(int p_from_index, int p_to_pos) {
+ ERR_FAIL_INDEX(p_from_index, physics_layers.size());
+ ERR_FAIL_INDEX(p_to_pos, physics_layers.size() + 1);
+ physics_layers.insert(p_to_pos, physics_layers[p_from_index]);
+ physics_layers.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->move_physics_layer(p_from_index, p_to_pos);
+ }
+ notify_property_list_changed();
+ emit_changed();
+}
+
+void TileSet::remove_physics_layer(int p_index) {
+ ERR_FAIL_INDEX(p_index, physics_layers.size());
+ physics_layers.remove(p_index);
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->remove_physics_layer(p_index);
+ }
+ notify_property_list_changed();
+ emit_changed();
}
void TileSet::set_physics_layer_collision_layer(int p_layer_index, uint32_t p_layer) {
@@ -301,17 +342,45 @@ Ref<PhysicsMaterial> TileSet::get_physics_layer_physics_material(int p_layer_ind
}
// Terrains
-void TileSet::set_terrain_sets_count(int p_terrains_sets_count) {
- ERR_FAIL_COND(p_terrains_sets_count < 0);
+int TileSet::get_terrain_sets_count() const {
+ return terrain_sets.size();
+}
- terrain_sets.resize(p_terrains_sets_count);
+void TileSet::add_terrain_set(int p_index) {
+ if (p_index < 0) {
+ p_index = terrain_sets.size();
+ }
+ ERR_FAIL_INDEX(p_index, terrain_sets.size() + 1);
+ terrain_sets.insert(p_index, TerrainSet());
+
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->add_terrain_set(p_index);
+ }
notify_property_list_changed();
emit_changed();
}
-int TileSet::get_terrain_sets_count() const {
- return terrain_sets.size();
+void TileSet::move_terrain_set(int p_from_index, int p_to_pos) {
+ ERR_FAIL_INDEX(p_from_index, terrain_sets.size());
+ ERR_FAIL_INDEX(p_to_pos, terrain_sets.size() + 1);
+ terrain_sets.insert(p_to_pos, terrain_sets[p_from_index]);
+ terrain_sets.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->move_terrain_set(p_from_index, p_to_pos);
+ }
+ notify_property_list_changed();
+ emit_changed();
+}
+
+void TileSet::remove_terrain_set(int p_index) {
+ ERR_FAIL_INDEX(p_index, terrain_sets.size());
+ terrain_sets.remove(p_index);
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->remove_terrain_set(p_index);
+ }
+ notify_property_list_changed();
+ emit_changed();
}
void TileSet::set_terrain_set_mode(int p_terrain_set, TerrainMode p_terrain_mode) {
@@ -330,36 +399,61 @@ TileSet::TerrainMode TileSet::get_terrain_set_mode(int p_terrain_set) const {
return terrain_sets[p_terrain_set].mode;
}
-void TileSet::set_terrains_count(int p_terrain_set, int p_terrains_layers_count) {
+int TileSet::get_terrains_count(int p_terrain_set) const {
+ ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), -1);
+ return terrain_sets[p_terrain_set].terrains.size();
+}
+
+void TileSet::add_terrain(int p_terrain_set, int p_index) {
ERR_FAIL_INDEX(p_terrain_set, terrain_sets.size());
- ERR_FAIL_COND(p_terrains_layers_count < 0);
- if (terrain_sets[p_terrain_set].terrains.size() == p_terrains_layers_count) {
- return;
+ Vector<Terrain> &terrains = terrain_sets.write[p_terrain_set].terrains;
+ if (p_index < 0) {
+ p_index = terrains.size();
}
-
- int old_size = terrain_sets[p_terrain_set].terrains.size();
- terrain_sets.write[p_terrain_set].terrains.resize(p_terrains_layers_count);
+ ERR_FAIL_INDEX(p_index, terrains.size() + 1);
+ terrains.insert(p_index, Terrain());
// Default name and color
- for (int i = old_size; i < terrain_sets.write[p_terrain_set].terrains.size(); i++) {
- float hue_rotate = (i * 2 % 16) / 16.0;
- Color c;
- c.set_hsv(Math::fmod(float(hue_rotate), float(1.0)), 0.5, 0.5);
- terrain_sets.write[p_terrain_set].terrains.write[i].color = c;
- terrain_sets.write[p_terrain_set].terrains.write[i].name = String(vformat("Terrain %d", i));
+ float hue_rotate = (terrains.size() % 16) / 16.0;
+ Color c;
+ c.set_hsv(Math::fmod(float(hue_rotate), float(1.0)), 0.5, 0.5);
+ terrains.write[p_index].color = c;
+ terrains.write[p_index].name = String(vformat("Terrain %d", p_index));
+
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->add_terrain(p_terrain_set, p_index);
}
- for (Map<int, Ref<TileSetSource>>::Element *E_source = sources.front(); E_source; E_source = E_source->next()) {
- E_source->get()->notify_tile_data_properties_should_change();
- }
+ notify_property_list_changed();
+ emit_changed();
+}
+void TileSet::move_terrain(int p_terrain_set, int p_from_index, int p_to_pos) {
+ ERR_FAIL_INDEX(p_terrain_set, terrain_sets.size());
+ Vector<Terrain> &terrains = terrain_sets.write[p_terrain_set].terrains;
+
+ ERR_FAIL_INDEX(p_from_index, terrains.size());
+ ERR_FAIL_INDEX(p_to_pos, terrains.size() + 1);
+ terrains.insert(p_to_pos, terrains[p_from_index]);
+ terrains.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->move_terrain(p_terrain_set, p_from_index, p_to_pos);
+ }
notify_property_list_changed();
emit_changed();
}
-int TileSet::get_terrains_count(int p_terrain_set) const {
- ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), -1);
- return terrain_sets[p_terrain_set].terrains.size();
+void TileSet::remove_terrain(int p_terrain_set, int p_index) {
+ ERR_FAIL_INDEX(p_terrain_set, terrain_sets.size());
+ Vector<Terrain> &terrains = terrain_sets.write[p_terrain_set].terrains;
+
+ ERR_FAIL_INDEX(p_index, terrains.size());
+ terrains.remove(p_index);
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->remove_terrain(p_terrain_set, p_index);
+ }
+ notify_property_list_changed();
+ emit_changed();
}
void TileSet::set_terrain_name(int p_terrain_set, int p_terrain_index, String p_name) {
@@ -485,24 +579,45 @@ bool TileSet::is_valid_peering_bit_terrain(int p_terrain_set, TileSet::CellNeigh
}
// Navigation
-void TileSet::set_navigation_layers_count(int p_navigation_layers_count) {
- ERR_FAIL_COND(p_navigation_layers_count < 0);
- if (navigation_layers.size() == p_navigation_layers_count) {
- return;
- }
+int TileSet::get_navigation_layers_count() const {
+ return navigation_layers.size();
+}
- navigation_layers.resize(p_navigation_layers_count);
+void TileSet::add_navigation_layer(int p_index) {
+ if (p_index < 0) {
+ p_index = navigation_layers.size();
+ }
+ ERR_FAIL_INDEX(p_index, navigation_layers.size() + 1);
+ navigation_layers.insert(p_index, NavigationLayer());
- for (Map<int, Ref<TileSetSource>>::Element *E_source = sources.front(); E_source; E_source = E_source->next()) {
- E_source->get()->notify_tile_data_properties_should_change();
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->add_navigation_layer(p_index);
}
notify_property_list_changed();
emit_changed();
}
-int TileSet::get_navigation_layers_count() const {
- return navigation_layers.size();
+void TileSet::move_navigation_layer(int p_from_index, int p_to_pos) {
+ ERR_FAIL_INDEX(p_from_index, navigation_layers.size());
+ ERR_FAIL_INDEX(p_to_pos, navigation_layers.size() + 1);
+ navigation_layers.insert(p_to_pos, navigation_layers[p_from_index]);
+ navigation_layers.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->move_navigation_layer(p_from_index, p_to_pos);
+ }
+ notify_property_list_changed();
+ emit_changed();
+}
+
+void TileSet::remove_navigation_layer(int p_index) {
+ ERR_FAIL_INDEX(p_index, navigation_layers.size());
+ navigation_layers.remove(p_index);
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->remove_navigation_layer(p_index);
+ }
+ notify_property_list_changed();
+ emit_changed();
}
void TileSet::set_navigation_layer_layers(int p_layer_index, uint32_t p_layers) {
@@ -517,30 +632,52 @@ uint32_t TileSet::get_navigation_layer_layers(int p_layer_index) const {
}
// Custom data.
-void TileSet::set_custom_data_layers_count(int p_custom_data_layers_count) {
- ERR_FAIL_COND(p_custom_data_layers_count < 0);
- if (custom_data_layers.size() == p_custom_data_layers_count) {
- return;
- }
-
- custom_data_layers.resize(p_custom_data_layers_count);
+int TileSet::get_custom_data_layers_count() const {
+ return custom_data_layers.size();
+}
- for (Map<String, int>::Element *E = custom_data_layers_by_name.front(); E; E = E->next()) {
- if (E->get() >= custom_data_layers.size()) {
- custom_data_layers_by_name.erase(E);
- }
+void TileSet::add_custom_data_layer(int p_index) {
+ if (p_index < 0) {
+ p_index = custom_data_layers.size();
}
+ ERR_FAIL_INDEX(p_index, custom_data_layers.size() + 1);
+ custom_data_layers.insert(p_index, CustomDataLayer());
- for (Map<int, Ref<TileSetSource>>::Element *E_source = sources.front(); E_source; E_source = E_source->next()) {
- E_source->get()->notify_tile_data_properties_should_change();
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->add_custom_data_layer(p_index);
}
notify_property_list_changed();
emit_changed();
}
-int TileSet::get_custom_data_layers_count() const {
- return custom_data_layers.size();
+void TileSet::move_custom_data_layer(int p_from_index, int p_to_pos) {
+ ERR_FAIL_INDEX(p_from_index, custom_data_layers.size());
+ ERR_FAIL_INDEX(p_to_pos, custom_data_layers.size() + 1);
+ custom_data_layers.insert(p_to_pos, custom_data_layers[p_from_index]);
+ custom_data_layers.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->move_custom_data_layer(p_from_index, p_to_pos);
+ }
+ notify_property_list_changed();
+ emit_changed();
+}
+
+void TileSet::remove_custom_data_layer(int p_index) {
+ ERR_FAIL_INDEX(p_index, custom_data_layers.size());
+ custom_data_layers.remove(p_index);
+ for (KeyValue<String, int> E : custom_data_layers_by_name) {
+ if (E.value == p_index) {
+ custom_data_layers_by_name.erase(E.key);
+ break;
+ }
+ }
+
+ for (KeyValue<int, Ref<TileSetSource>> source : sources) {
+ source.value->remove_custom_data_layer(p_index);
+ }
+ notify_property_list_changed();
+ emit_changed();
}
int TileSet::get_custom_data_layer_by_name(String p_value) const {
@@ -845,10 +982,10 @@ void TileSet::clear_tile_proxies() {
Vector<Vector2> TileSet::get_tile_shape_polygon() {
Vector<Vector2> points;
if (tile_shape == TileSet::TILE_SHAPE_SQUARE) {
- points.append(Vector2(0.0, 0.0));
- points.append(Vector2(1.0, 0.0));
- points.append(Vector2(1.0, 1.0));
- points.append(Vector2(0.0, 1.0));
+ points.append(Vector2(-0.5, -0.5));
+ points.append(Vector2(0.5, -0.5));
+ points.append(Vector2(0.5, 0.5));
+ points.append(Vector2(-0.5, 0.5));
} else {
float overlap = 0.0;
switch (tile_shape) {
@@ -865,44 +1002,42 @@ Vector<Vector2> TileSet::get_tile_shape_polygon() {
break;
}
- points.append(Vector2(0.5, 0.0));
- points.append(Vector2(0.0, overlap));
- points.append(Vector2(0.0, 1.0 - overlap));
- points.append(Vector2(0.5, 1.0));
- points.append(Vector2(1.0, 1.0 - overlap));
- points.append(Vector2(1.0, overlap));
- points.append(Vector2(0.5, 0.0));
+ points.append(Vector2(0.0, -0.5));
+ points.append(Vector2(-0.5, overlap - 0.5));
+ points.append(Vector2(-0.5, 0.5 - overlap));
+ points.append(Vector2(0.0, 0.5));
+ points.append(Vector2(0.5, 0.5 - overlap));
+ points.append(Vector2(0.5, overlap - 0.5));
if (get_tile_offset_axis() == TileSet::TILE_OFFSET_AXIS_VERTICAL) {
for (int i = 0; i < points.size(); i++) {
points.write[i] = Vector2(points[i].y, points[i].x);
}
}
}
- for (int i = 0; i < points.size(); i++) {
- points.write[i] = points[i] * tile_size - tile_size / 2;
- }
return points;
}
-void TileSet::draw_tile_shape(CanvasItem *p_canvas_item, Rect2 p_region, Color p_color, bool p_filled, Ref<Texture2D> p_texture) {
+void TileSet::draw_tile_shape(CanvasItem *p_canvas_item, Transform2D p_transform, Color p_color, bool p_filled, Ref<Texture2D> p_texture) {
if (tile_meshes_dirty) {
- Vector<Vector2> uvs = get_tile_shape_polygon();
- for (int i = 0; i < uvs.size(); i++) {
- uvs.write[i] = (uvs[i] + tile_size / 2) / tile_size;
+ Vector<Vector2> shape = get_tile_shape_polygon();
+ Vector<Vector2> uvs;
+ uvs.resize(shape.size());
+ for (int i = 0; i < shape.size(); i++) {
+ uvs.write[i] = shape[i] + Vector2(0.5, 0.5);
}
Vector<Color> colors;
- colors.resize(uvs.size());
+ colors.resize(shape.size());
colors.fill(Color(1.0, 1.0, 1.0, 1.0));
// Filled mesh.
tile_filled_mesh->clear_surfaces();
Array a;
a.resize(Mesh::ARRAY_MAX);
- a[Mesh::ARRAY_VERTEX] = uvs;
+ a[Mesh::ARRAY_VERTEX] = shape;
a[Mesh::ARRAY_TEX_UV] = uvs;
a[Mesh::ARRAY_COLOR] = colors;
- a[Mesh::ARRAY_INDEX] = Geometry2D::triangulate_polygon(uvs);
+ a[Mesh::ARRAY_INDEX] = Geometry2D::triangulate_polygon(shape);
tile_filled_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, a, Array(), Dictionary(), Mesh::ARRAY_FLAG_USE_2D_VERTICES);
// Lines mesh.
@@ -910,22 +1045,19 @@ void TileSet::draw_tile_shape(CanvasItem *p_canvas_item, Rect2 p_region, Color p
a.clear();
a.resize(Mesh::ARRAY_MAX);
// Add the first point again when drawing lines.
- uvs.push_back(uvs[0]);
+ shape.push_back(shape[0]);
colors.push_back(colors[0]);
- a[Mesh::ARRAY_VERTEX] = uvs;
+ a[Mesh::ARRAY_VERTEX] = shape;
a[Mesh::ARRAY_COLOR] = colors;
tile_lines_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINE_STRIP, a, Array(), Dictionary(), Mesh::ARRAY_FLAG_USE_2D_VERTICES);
tile_meshes_dirty = false;
}
- Transform2D xform;
- xform.scale(p_region.size);
- xform.set_origin(p_region.get_position());
if (p_filled) {
- p_canvas_item->draw_mesh(tile_filled_mesh, p_texture, xform, p_color);
+ p_canvas_item->draw_mesh(tile_filled_mesh, p_texture, p_transform, p_color);
} else {
- p_canvas_item->draw_mesh(tile_lines_mesh, Ref<Texture2D>(), xform, p_color);
+ p_canvas_item->draw_mesh(tile_lines_mesh, Ref<Texture2D>(), p_transform, p_color);
}
}
@@ -1110,7 +1242,11 @@ Vector<Vector<Ref<Texture2D>>> TileSet::generate_terrains_icons(Size2i p_size) {
if (is_valid_peering_bit_terrain(terrain_set, cell_neighbor)) {
int terrain = tile_data->get_peering_bit_terrain(cell_neighbor);
if (terrain >= 0) {
- bit_counts[terrain] += 1;
+ if (terrain >= (int)bit_counts.size()) {
+ WARN_PRINT(vformat("Invalid peering bit terrain: %d", terrain));
+ } else {
+ bit_counts[terrain] += 1;
+ }
}
}
}
@@ -1825,19 +1961,19 @@ void TileSet::_compatibility_conversion() {
tile_data->set_flip_h(flip_h);
tile_data->set_flip_v(flip_v);
tile_data->set_transpose(transpose);
- tile_data->tile_set_material(ctd->material);
+ tile_data->set_material(ctd->material);
tile_data->set_modulate(ctd->modulate);
tile_data->set_z_index(ctd->z_index);
if (ctd->occluder.is_valid()) {
if (get_occlusion_layers_count() < 1) {
- set_occlusion_layers_count(1);
+ add_occlusion_layer();
}
tile_data->set_occluder(0, ctd->occluder);
}
if (ctd->navigation.is_valid()) {
if (get_navigation_layers_count() < 1) {
- set_navigation_layers_count(1);
+ add_navigation_layer();
}
tile_data->set_navigation_polygon(0, ctd->autotile_navpoly_map[coords]);
}
@@ -1847,7 +1983,7 @@ void TileSet::_compatibility_conversion() {
// Add the shapes.
if (ctd->shapes.size() > 0) {
if (get_physics_layers_count() < 1) {
- set_physics_layers_count(1);
+ add_physics_layer();
}
}
for (int k = 0; k < ctd->shapes.size(); k++) {
@@ -1917,18 +2053,18 @@ void TileSet::_compatibility_conversion() {
tile_data->set_flip_h(flip_h);
tile_data->set_flip_v(flip_v);
tile_data->set_transpose(transpose);
- tile_data->tile_set_material(ctd->material);
+ tile_data->set_material(ctd->material);
tile_data->set_modulate(ctd->modulate);
tile_data->set_z_index(ctd->z_index);
if (ctd->autotile_occluder_map.has(coords)) {
if (get_occlusion_layers_count() < 1) {
- set_occlusion_layers_count(1);
+ add_occlusion_layer();
}
tile_data->set_occluder(0, ctd->autotile_occluder_map[coords]);
}
if (ctd->autotile_navpoly_map.has(coords)) {
if (get_navigation_layers_count() < 1) {
- set_navigation_layers_count(1);
+ add_navigation_layer();
}
tile_data->set_navigation_polygon(0, ctd->autotile_navpoly_map[coords]);
}
@@ -1942,7 +2078,7 @@ void TileSet::_compatibility_conversion() {
// Add the shapes.
if (ctd->shapes.size() > 0) {
if (get_physics_layers_count() < 1) {
- set_physics_layers_count(1);
+ add_physics_layer();
}
}
for (int k = 0; k < ctd->shapes.size(); k++) {
@@ -2206,15 +2342,15 @@ bool TileSet::_set(const StringName &p_name, const Variant &p_value) {
ERR_FAIL_COND_V(index < 0, false);
if (components[1] == "light_mask") {
ERR_FAIL_COND_V(p_value.get_type() != Variant::INT, false);
- if (index >= occlusion_layers.size()) {
- set_occlusion_layers_count(index + 1);
+ while (index >= occlusion_layers.size()) {
+ add_occlusion_layer();
}
set_occlusion_layer_light_mask(index, p_value);
return true;
} else if (components[1] == "sdf_collision") {
ERR_FAIL_COND_V(p_value.get_type() != Variant::BOOL, false);
- if (index >= occlusion_layers.size()) {
- set_occlusion_layers_count(index + 1);
+ while (index >= occlusion_layers.size()) {
+ add_occlusion_layer();
}
set_occlusion_layer_sdf_collision(index, p_value);
return true;
@@ -2225,23 +2361,22 @@ bool TileSet::_set(const StringName &p_name, const Variant &p_value) {
ERR_FAIL_COND_V(index < 0, false);
if (components[1] == "collision_layer") {
ERR_FAIL_COND_V(p_value.get_type() != Variant::INT, false);
- if (index >= physics_layers.size()) {
- set_physics_layers_count(index + 1);
+ while (index >= physics_layers.size()) {
+ add_physics_layer();
}
set_physics_layer_collision_layer(index, p_value);
return true;
} else if (components[1] == "collision_mask") {
ERR_FAIL_COND_V(p_value.get_type() != Variant::INT, false);
- if (index >= physics_layers.size()) {
- set_physics_layers_count(index + 1);
+ while (index >= physics_layers.size()) {
+ add_physics_layer();
}
set_physics_layer_collision_mask(index, p_value);
return true;
} else if (components[1] == "physics_material") {
Ref<PhysicsMaterial> physics_material = p_value;
- ERR_FAIL_COND_V(!physics_material.is_valid(), false);
- if (index >= physics_layers.size()) {
- set_physics_layers_count(index + 1);
+ while (index >= physics_layers.size()) {
+ add_physics_layer();
}
set_physics_layer_physics_material(index, physics_material);
return true;
@@ -2252,37 +2387,30 @@ bool TileSet::_set(const StringName &p_name, const Variant &p_value) {
ERR_FAIL_COND_V(terrain_set_index < 0, false);
if (components[1] == "mode") {
ERR_FAIL_COND_V(p_value.get_type() != Variant::INT, false);
- if (terrain_set_index >= terrain_sets.size()) {
- set_terrain_sets_count(terrain_set_index + 1);
+ while (terrain_set_index >= terrain_sets.size()) {
+ add_terrain_set();
}
set_terrain_set_mode(terrain_set_index, TerrainMode(int(p_value)));
- } else if (components[1] == "terrains_count") {
- ERR_FAIL_COND_V(p_value.get_type() != Variant::INT, false);
- if (terrain_set_index >= terrain_sets.size()) {
- set_terrain_sets_count(terrain_set_index + 1);
- }
- set_terrains_count(terrain_set_index, p_value);
- return true;
} else if (components.size() >= 3 && components[1].begins_with("terrain_") && components[1].trim_prefix("terrain_").is_valid_int()) {
int terrain_index = components[1].trim_prefix("terrain_").to_int();
ERR_FAIL_COND_V(terrain_index < 0, false);
if (components[2] == "name") {
ERR_FAIL_COND_V(p_value.get_type() != Variant::STRING, false);
- if (terrain_set_index >= terrain_sets.size()) {
- set_terrain_sets_count(terrain_set_index + 1);
+ while (terrain_set_index >= terrain_sets.size()) {
+ add_terrain_set();
}
- if (terrain_index >= terrain_sets[terrain_set_index].terrains.size()) {
- set_terrains_count(terrain_set_index, terrain_index + 1);
+ while (terrain_index >= terrain_sets[terrain_set_index].terrains.size()) {
+ add_terrain(terrain_set_index);
}
set_terrain_name(terrain_set_index, terrain_index, p_value);
return true;
} else if (components[2] == "color") {
ERR_FAIL_COND_V(p_value.get_type() != Variant::COLOR, false);
- if (terrain_set_index >= terrain_sets.size()) {
- set_terrain_sets_count(terrain_set_index + 1);
+ while (terrain_set_index >= terrain_sets.size()) {
+ add_terrain_set();
}
- if (terrain_index >= terrain_sets[terrain_set_index].terrains.size()) {
- set_terrains_count(terrain_set_index, terrain_index + 1);
+ while (terrain_index >= terrain_sets[terrain_set_index].terrains.size()) {
+ add_terrain(terrain_set_index);
}
set_terrain_color(terrain_set_index, terrain_index, p_value);
return true;
@@ -2294,8 +2422,8 @@ bool TileSet::_set(const StringName &p_name, const Variant &p_value) {
ERR_FAIL_COND_V(index < 0, false);
if (components[1] == "layers") {
ERR_FAIL_COND_V(p_value.get_type() != Variant::INT, false);
- if (index >= navigation_layers.size()) {
- set_navigation_layers_count(index + 1);
+ while (index >= navigation_layers.size()) {
+ add_navigation_layer();
}
set_navigation_layer_layers(index, p_value);
return true;
@@ -2306,15 +2434,15 @@ bool TileSet::_set(const StringName &p_name, const Variant &p_value) {
ERR_FAIL_COND_V(index < 0, false);
if (components[1] == "name") {
ERR_FAIL_COND_V(p_value.get_type() != Variant::STRING, false);
- if (index >= custom_data_layers.size()) {
- set_custom_data_layers_count(index + 1);
+ while (index >= custom_data_layers.size()) {
+ add_custom_data_layer();
}
set_custom_data_name(index, p_value);
return true;
} else if (components[1] == "type") {
ERR_FAIL_COND_V(p_value.get_type() != Variant::INT, false);
- if (index >= custom_data_layers.size()) {
- set_custom_data_layers_count(index + 1);
+ while (index >= custom_data_layers.size()) {
+ add_custom_data_layer();
}
set_custom_data_type(index, Variant::Type(int(p_value)));
return true;
@@ -2402,9 +2530,6 @@ bool TileSet::_get(const StringName &p_name, Variant &r_ret) const {
if (components[1] == "mode") {
r_ret = get_terrain_set_mode(terrain_set_index);
return true;
- } else if (components[1] == "terrains_count") {
- r_ret = get_terrains_count(terrain_set_index);
- return true;
} else if (components.size() >= 3 && components[1].begins_with("terrain_") && components[1].trim_prefix("terrain_").is_valid_int()) {
int terrain_index = components[1].trim_prefix("terrain_").to_int();
if (terrain_index < 0 || terrain_index >= terrain_sets[terrain_set_index].terrains.size()) {
@@ -2522,7 +2647,7 @@ void TileSet::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::NIL, "Terrains", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP));
for (int terrain_set_index = 0; terrain_set_index < terrain_sets.size(); terrain_set_index++) {
p_list->push_back(PropertyInfo(Variant::INT, vformat("terrain_set_%d/mode", terrain_set_index), PROPERTY_HINT_ENUM, "Match corners and sides,Match corners,Match sides"));
- p_list->push_back(PropertyInfo(Variant::INT, vformat("terrain_set_%d/terrains_count", terrain_set_index), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR));
+ p_list->push_back(PropertyInfo(Variant::NIL, vformat("terrain_set_%d/terrains", terrain_set_index), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ARRAY, vformat("terrain_set_%d/terrain_", terrain_set_index)));
for (int terrain_index = 0; terrain_index < terrain_sets[terrain_set_index].terrains.size(); terrain_index++) {
p_list->push_back(PropertyInfo(Variant::STRING, vformat("terrain_set_%d/terrain_%d/name", terrain_set_index, terrain_index)));
p_list->push_back(PropertyInfo(Variant::COLOR, vformat("terrain_set_%d/terrain_%d/color", terrain_set_index, terrain_index)));
@@ -2563,13 +2688,13 @@ void TileSet::_get_property_list(List<PropertyInfo> *p_list) const {
void TileSet::_bind_methods() {
// Sources management.
ClassDB::bind_method(D_METHOD("get_next_source_id"), &TileSet::get_next_source_id);
- ClassDB::bind_method(D_METHOD("add_source", "atlas_source_id_override"), &TileSet::add_source, DEFVAL(TileSet::INVALID_SOURCE));
+ ClassDB::bind_method(D_METHOD("add_source", "source", "atlas_source_id_override"), &TileSet::add_source, DEFVAL(TileSet::INVALID_SOURCE));
ClassDB::bind_method(D_METHOD("remove_source", "source_id"), &TileSet::remove_source);
- ClassDB::bind_method(D_METHOD("set_source_id", "source_id"), &TileSet::set_source_id);
+ ClassDB::bind_method(D_METHOD("set_source_id", "source_id", "new_source_id"), &TileSet::set_source_id);
ClassDB::bind_method(D_METHOD("get_source_count"), &TileSet::get_source_count);
ClassDB::bind_method(D_METHOD("get_source_id", "index"), &TileSet::get_source_id);
- ClassDB::bind_method(D_METHOD("has_source", "index"), &TileSet::has_source);
- ClassDB::bind_method(D_METHOD("get_source", "index"), &TileSet::get_source);
+ ClassDB::bind_method(D_METHOD("has_source", "source_id"), &TileSet::has_source);
+ ClassDB::bind_method(D_METHOD("get_source", "source_id"), &TileSet::get_source);
// Shape and layout.
ClassDB::bind_method(D_METHOD("set_tile_shape", "shape"), &TileSet::set_tile_shape);
@@ -2590,16 +2715,20 @@ void TileSet::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_uv_clipping", "uv_clipping"), &TileSet::set_uv_clipping);
ClassDB::bind_method(D_METHOD("is_uv_clipping"), &TileSet::is_uv_clipping);
- ClassDB::bind_method(D_METHOD("set_occlusion_layers_count", "occlusion_layers_count"), &TileSet::set_occlusion_layers_count);
ClassDB::bind_method(D_METHOD("get_occlusion_layers_count"), &TileSet::get_occlusion_layers_count);
+ ClassDB::bind_method(D_METHOD("add_occlusion_layer", "to_position"), &TileSet::add_occlusion_layer, DEFVAL(-1));
+ ClassDB::bind_method(D_METHOD("move_occlusion_layer", "layer_index", "to_position"), &TileSet::move_occlusion_layer);
+ ClassDB::bind_method(D_METHOD("remove_occlusion_layer", "layer_index"), &TileSet::remove_occlusion_layer);
ClassDB::bind_method(D_METHOD("set_occlusion_layer_light_mask", "layer_index", "light_mask"), &TileSet::set_occlusion_layer_light_mask);
- ClassDB::bind_method(D_METHOD("get_occlusion_layer_light_mask"), &TileSet::get_occlusion_layer_light_mask);
+ ClassDB::bind_method(D_METHOD("get_occlusion_layer_light_mask", "layer_index"), &TileSet::get_occlusion_layer_light_mask);
ClassDB::bind_method(D_METHOD("set_occlusion_layer_sdf_collision", "layer_index", "sdf_collision"), &TileSet::set_occlusion_layer_sdf_collision);
- ClassDB::bind_method(D_METHOD("get_occlusion_layer_sdf_collision"), &TileSet::get_occlusion_layer_sdf_collision);
+ ClassDB::bind_method(D_METHOD("get_occlusion_layer_sdf_collision", "layer_index"), &TileSet::get_occlusion_layer_sdf_collision);
// Physics
- ClassDB::bind_method(D_METHOD("set_physics_layers_count", "physics_layers_count"), &TileSet::set_physics_layers_count);
ClassDB::bind_method(D_METHOD("get_physics_layers_count"), &TileSet::get_physics_layers_count);
+ ClassDB::bind_method(D_METHOD("add_physics_layer", "to_position"), &TileSet::add_physics_layer, DEFVAL(-1));
+ ClassDB::bind_method(D_METHOD("move_physics_layer", "layer_index", "to_position"), &TileSet::move_physics_layer);
+ ClassDB::bind_method(D_METHOD("remove_physics_layer", "layer_index"), &TileSet::remove_physics_layer);
ClassDB::bind_method(D_METHOD("set_physics_layer_collision_layer", "layer_index", "layer"), &TileSet::set_physics_layer_collision_layer);
ClassDB::bind_method(D_METHOD("get_physics_layer_collision_layer", "layer_index"), &TileSet::get_physics_layer_collision_layer);
ClassDB::bind_method(D_METHOD("set_physics_layer_collision_mask", "layer_index", "mask"), &TileSet::set_physics_layer_collision_mask);
@@ -2608,27 +2737,35 @@ void TileSet::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_physics_layer_physics_material", "layer_index"), &TileSet::get_physics_layer_physics_material);
// Terrains
- ClassDB::bind_method(D_METHOD("set_terrain_sets_count", "terrain_sets_count"), &TileSet::set_terrain_sets_count);
ClassDB::bind_method(D_METHOD("get_terrain_sets_count"), &TileSet::get_terrain_sets_count);
+ ClassDB::bind_method(D_METHOD("add_terrain_set", "to_position"), &TileSet::add_terrain_set, DEFVAL(-1));
+ ClassDB::bind_method(D_METHOD("move_terrain_set", "terrain_set", "to_position"), &TileSet::move_terrain_set);
+ ClassDB::bind_method(D_METHOD("remove_terrain_set", "terrain_set"), &TileSet::remove_terrain_set);
ClassDB::bind_method(D_METHOD("set_terrain_set_mode", "terrain_set", "mode"), &TileSet::set_terrain_set_mode);
ClassDB::bind_method(D_METHOD("get_terrain_set_mode", "terrain_set"), &TileSet::get_terrain_set_mode);
- ClassDB::bind_method(D_METHOD("set_terrains_count", "terrain_set", "terrains_count"), &TileSet::set_terrains_count);
ClassDB::bind_method(D_METHOD("get_terrains_count", "terrain_set"), &TileSet::get_terrains_count);
+ ClassDB::bind_method(D_METHOD("add_terrain", "terrain_set", "to_position"), &TileSet::add_terrain, DEFVAL(-1));
+ ClassDB::bind_method(D_METHOD("move_terrain", "terrain_set", "terrain_index", "to_position"), &TileSet::move_terrain);
+ ClassDB::bind_method(D_METHOD("remove_terrain", "terrain_set", "terrain_index"), &TileSet::remove_terrain);
ClassDB::bind_method(D_METHOD("set_terrain_name", "terrain_set", "terrain_index", "name"), &TileSet::set_terrain_name);
ClassDB::bind_method(D_METHOD("get_terrain_name", "terrain_set", "terrain_index"), &TileSet::get_terrain_name);
ClassDB::bind_method(D_METHOD("set_terrain_color", "terrain_set", "terrain_index", "color"), &TileSet::set_terrain_color);
ClassDB::bind_method(D_METHOD("get_terrain_color", "terrain_set", "terrain_index"), &TileSet::get_terrain_color);
// Navigation
- ClassDB::bind_method(D_METHOD("set_navigation_layers_count", "navigation_layers_count"), &TileSet::set_navigation_layers_count);
ClassDB::bind_method(D_METHOD("get_navigation_layers_count"), &TileSet::get_navigation_layers_count);
+ ClassDB::bind_method(D_METHOD("add_navigation_layer", "to_position"), &TileSet::add_navigation_layer, DEFVAL(-1));
+ ClassDB::bind_method(D_METHOD("move_navigation_layer", "layer_index", "to_position"), &TileSet::move_navigation_layer);
+ ClassDB::bind_method(D_METHOD("remove_navigation_layer", "layer_index"), &TileSet::remove_navigation_layer);
ClassDB::bind_method(D_METHOD("set_navigation_layer_layers", "layer_index", "layers"), &TileSet::set_navigation_layer_layers);
ClassDB::bind_method(D_METHOD("get_navigation_layer_layers", "layer_index"), &TileSet::get_navigation_layer_layers);
// Custom data
- ClassDB::bind_method(D_METHOD("set_custom_data_layers_count", "custom_data_layers_count"), &TileSet::set_custom_data_layers_count);
ClassDB::bind_method(D_METHOD("get_custom_data_layers_count"), &TileSet::get_custom_data_layers_count);
+ ClassDB::bind_method(D_METHOD("add_custom_data_layer", "to_position"), &TileSet::add_custom_data_layer, DEFVAL(-1));
+ ClassDB::bind_method(D_METHOD("move_custom_data_layer", "layer_index", "to_position"), &TileSet::move_custom_data_layer);
+ ClassDB::bind_method(D_METHOD("remove_custom_data_layer", "layer_index"), &TileSet::remove_custom_data_layer);
// Tile proxies
ClassDB::bind_method(D_METHOD("set_source_level_tile_proxy", "source_from", "source_to"), &TileSet::set_source_level_tile_proxy);
@@ -2653,19 +2790,19 @@ void TileSet::_bind_methods() {
ADD_GROUP("Rendering", "");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "uv_clipping"), "set_uv_clipping", "is_uv_clipping");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "occlusion_layers_count", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_occlusion_layers_count", "get_occlusion_layers_count");
+ ADD_ARRAY("occlusion_layers", "occlusion_layer_");
ADD_GROUP("Physics", "");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "physics_layers_count", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_physics_layers_count", "get_physics_layers_count");
+ ADD_ARRAY("physics_layers", "physics_layer_");
ADD_GROUP("Terrains", "");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "terrains_sets_count", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_terrain_sets_count", "get_terrain_sets_count");
+ ADD_ARRAY("terrain_sets", "terrain_set_");
ADD_GROUP("Navigation", "");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "navigation_layers_count", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_navigation_layers_count", "get_navigation_layers_count");
+ ADD_ARRAY("navigation_layers", "navigation_layer_");
ADD_GROUP("Custom data", "");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "custom_data_layers_count", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_custom_data_layers_count", "get_custom_data_layers_count");
+ ADD_ARRAY("custom_data_layers", "custom_data_layer_");
// -- Enum binding --
BIND_ENUM_CONSTANT(TILE_SHAPE_SQUARE);
@@ -2728,6 +2865,18 @@ void TileSetSource::set_tile_set(const TileSet *p_tile_set) {
tile_set = p_tile_set;
}
+void TileSetSource::_bind_methods() {
+ // Base tiles
+ ClassDB::bind_method(D_METHOD("get_tiles_count"), &TileSetSource::get_tiles_count);
+ ClassDB::bind_method(D_METHOD("get_tile_id", "index"), &TileSetSource::get_tile_id);
+ ClassDB::bind_method(D_METHOD("has_tile", "atlas_coords"), &TileSetSource::has_tile);
+
+ // Alternative tiles
+ ClassDB::bind_method(D_METHOD("get_alternative_tiles_count", "atlas_coords"), &TileSetSource::get_alternative_tiles_count);
+ ClassDB::bind_method(D_METHOD("get_alternative_tile_id", "atlas_coords", "index"), &TileSetSource::get_alternative_tile_id);
+ ClassDB::bind_method(D_METHOD("has_alternative_tile", "atlas_coords", "alternative_tile"), &TileSetSource::has_alternative_tile);
+}
+
/////////////////////////////// TileSetAtlasSource //////////////////////////////////////
void TileSetAtlasSource::set_tile_set(const TileSet *p_tile_set) {
@@ -2750,6 +2899,150 @@ void TileSetAtlasSource::notify_tile_data_properties_should_change() {
}
}
+void TileSetAtlasSource::add_occlusion_layer(int p_to_pos) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->add_occlusion_layer(p_to_pos);
+ }
+ }
+}
+
+void TileSetAtlasSource::move_occlusion_layer(int p_from_index, int p_to_pos) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->move_occlusion_layer(p_from_index, p_to_pos);
+ }
+ }
+}
+
+void TileSetAtlasSource::remove_occlusion_layer(int p_index) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->remove_occlusion_layer(p_index);
+ }
+ }
+}
+
+void TileSetAtlasSource::add_physics_layer(int p_to_pos) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->add_physics_layer(p_to_pos);
+ }
+ }
+}
+
+void TileSetAtlasSource::move_physics_layer(int p_from_index, int p_to_pos) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->move_physics_layer(p_from_index, p_to_pos);
+ }
+ }
+}
+
+void TileSetAtlasSource::remove_physics_layer(int p_index) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->remove_physics_layer(p_index);
+ }
+ }
+}
+
+void TileSetAtlasSource::add_terrain_set(int p_to_pos) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->add_terrain_set(p_to_pos);
+ }
+ }
+}
+
+void TileSetAtlasSource::move_terrain_set(int p_from_index, int p_to_pos) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->move_terrain_set(p_from_index, p_to_pos);
+ }
+ }
+}
+
+void TileSetAtlasSource::remove_terrain_set(int p_index) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->remove_terrain_set(p_index);
+ }
+ }
+}
+
+void TileSetAtlasSource::add_terrain(int p_terrain_set, int p_to_pos) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->add_terrain(p_terrain_set, p_to_pos);
+ }
+ }
+}
+
+void TileSetAtlasSource::move_terrain(int p_terrain_set, int p_from_index, int p_to_pos) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->move_terrain(p_terrain_set, p_from_index, p_to_pos);
+ }
+ }
+}
+
+void TileSetAtlasSource::remove_terrain(int p_terrain_set, int p_index) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->remove_terrain(p_terrain_set, p_index);
+ }
+ }
+}
+
+void TileSetAtlasSource::add_navigation_layer(int p_to_pos) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->add_navigation_layer(p_to_pos);
+ }
+ }
+}
+
+void TileSetAtlasSource::move_navigation_layer(int p_from_index, int p_to_pos) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->move_navigation_layer(p_from_index, p_to_pos);
+ }
+ }
+}
+
+void TileSetAtlasSource::remove_navigation_layer(int p_index) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->remove_navigation_layer(p_index);
+ }
+ }
+}
+
+void TileSetAtlasSource::add_custom_data_layer(int p_to_pos) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->add_custom_data_layer(p_to_pos);
+ }
+ }
+}
+
+void TileSetAtlasSource::move_custom_data_layer(int p_from_index, int p_to_pos) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->move_custom_data_layer(p_from_index, p_to_pos);
+ }
+ }
+}
+
+void TileSetAtlasSource::remove_custom_data_layer(int p_index) {
+ for (KeyValue<Vector2i, TileAlternativesData> E_tile : tiles) {
+ for (KeyValue<int, TileData *> E_alternative : E_tile.value.alternatives) {
+ E_alternative.value->remove_custom_data_layer(p_index);
+ }
+ }
+}
+
void TileSetAtlasSource::reset_state() {
// Reset all TileData.
for (Map<Vector2i, TileAlternativesData>::Element *E_tile = tiles.front(); E_tile; E_tile = E_tile->next()) {
@@ -2850,8 +3143,32 @@ bool TileSetAtlasSource::_set(const StringName &p_name, const Variant &p_value)
// Properties.
if (components[1] == "size_in_atlas") {
move_tile_in_atlas(coords, coords, p_value);
+ return true;
} else if (components[1] == "next_alternative_id") {
tiles[coords].next_alternative_id = p_value;
+ return true;
+ } else if (components[1] == "animation_columns") {
+ set_tile_animation_columns(coords, p_value);
+ return true;
+ } else if (components[1] == "animation_separation") {
+ set_tile_animation_separation(coords, p_value);
+ return true;
+ } else if (components[1] == "animation_speed") {
+ set_tile_animation_speed(coords, p_value);
+ return true;
+ } else if (components[1] == "animation_frames_count") {
+ set_tile_animation_frames_count(coords, p_value);
+ return true;
+ } else if (components.size() >= 3 && components[1].begins_with("animation_frame_") && components[1].trim_prefix("animation_frame_").is_valid_int()) {
+ int frame = components[1].trim_prefix("animation_frame_").to_int();
+ if (components[2] == "duration") {
+ if (frame >= get_tile_animation_frames_count(coords)) {
+ set_tile_animation_frames_count(coords, frame + 1);
+ }
+ set_tile_animation_frame_duration(coords, frame, p_value);
+ return true;
+ }
+ return false;
} else if (components[1].is_valid_int()) {
int alternative_id = components[1].to_int();
if (alternative_id != TileSetSource::INVALID_TILE_ALTERNATIVE) {
@@ -2897,6 +3214,28 @@ bool TileSetAtlasSource::_get(const StringName &p_name, Variant &r_ret) const {
} else if (components[1] == "next_alternative_id") {
r_ret = tiles[coords].next_alternative_id;
return true;
+ } else if (components[1] == "animation_columns") {
+ r_ret = get_tile_animation_columns(coords);
+ return true;
+ } else if (components[1] == "animation_separation") {
+ r_ret = get_tile_animation_separation(coords);
+ return true;
+ } else if (components[1] == "animation_speed") {
+ r_ret = get_tile_animation_speed(coords);
+ return true;
+ } else if (components[1] == "animation_frames_count") {
+ r_ret = get_tile_animation_frames_count(coords);
+ return true;
+ } else if (components.size() >= 3 && components[1].begins_with("animation_frame_") && components[1].trim_prefix("animation_frame_").is_valid_int()) {
+ int frame = components[1].trim_prefix("animation_frame_").to_int();
+ if (frame < 0 || frame >= get_tile_animation_frames_count(coords)) {
+ return false;
+ }
+ if (components[2] == "duration") {
+ r_ret = get_tile_animation_frame_duration(coords, frame);
+ return true;
+ }
+ return false;
} else if (components[1].is_valid_int()) {
int alternative_id = components[1].to_int();
if (alternative_id != TileSetSource::INVALID_TILE_ALTERNATIVE && tiles[coords].alternatives.has(alternative_id)) {
@@ -2938,6 +3277,40 @@ void TileSetAtlasSource::_get_property_list(List<PropertyInfo> *p_list) const {
}
tile_property_list.push_back(property_info);
+ // animation_columns.
+ property_info = PropertyInfo(Variant::INT, "animation_columns", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR);
+ if (E_tile->get().animation_columns == 0) {
+ property_info.usage ^= PROPERTY_USAGE_STORAGE;
+ }
+ tile_property_list.push_back(property_info);
+
+ // animation_separation.
+ property_info = PropertyInfo(Variant::INT, "animation_separation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR);
+ if (E_tile->get().animation_separation == Vector2i()) {
+ property_info.usage ^= PROPERTY_USAGE_STORAGE;
+ }
+ tile_property_list.push_back(property_info);
+
+ // animation_speed.
+ property_info = PropertyInfo(Variant::FLOAT, "animation_speed", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR);
+ if (E_tile->get().animation_speed == 1.0) {
+ property_info.usage ^= PROPERTY_USAGE_STORAGE;
+ }
+ tile_property_list.push_back(property_info);
+
+ // animation_frames_count.
+ tile_property_list.push_back(PropertyInfo(Variant::INT, "animation_frames_count", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NETWORK));
+
+ // animation_frame_*.
+ bool store_durations = tiles[E_tile->key()].animation_frames_durations.size() >= 2;
+ for (int i = 0; i < (int)tiles[E_tile->key()].animation_frames_durations.size(); i++) {
+ property_info = PropertyInfo(Variant::FLOAT, vformat("animation_frame_%d/duration", i), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR);
+ if (!store_durations) {
+ property_info.usage ^= PROPERTY_USAGE_STORAGE;
+ }
+ tile_property_list.push_back(property_info);
+ }
+
for (Map<int, TileData *>::Element *E_alternative = E_tile->get().alternatives.front(); E_alternative; E_alternative = E_alternative->next()) {
// Add a dummy property to show the alternative exists.
tile_property_list.push_back(PropertyInfo(Variant::INT, vformat("%d", E_alternative->key()), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
@@ -2946,11 +3319,10 @@ void TileSetAtlasSource::_get_property_list(List<PropertyInfo> *p_list) const {
List<PropertyInfo> alternative_property_list;
E_alternative->get()->get_property_list(&alternative_property_list);
for (PropertyInfo &alternative_property_info : alternative_property_list) {
- bool valid;
- Variant default_value = ClassDB::class_get_default_property_value("TileData", alternative_property_info.name, &valid);
+ Variant default_value = ClassDB::class_get_default_property_value("TileData", alternative_property_info.name);
Variant value = E_alternative->get()->get(alternative_property_info.name);
- if (valid && value == default_value) {
- property_info.usage ^= PROPERTY_USAGE_STORAGE;
+ if (default_value.get_type() != Variant::NIL && bool(Variant::evaluate(Variant::OP_EQUAL, value, default_value))) {
+ alternative_property_info.usage ^= PROPERTY_USAGE_STORAGE;
}
alternative_property_info.name = vformat("%s/%s", vformat("%d", E_alternative->key()), alternative_property_info.name);
tile_property_list.push_back(alternative_property_info);
@@ -2969,33 +3341,27 @@ void TileSetAtlasSource::create_tile(const Vector2i p_atlas_coords, const Vector
// Create a tile if it does not exists.
ERR_FAIL_COND(p_atlas_coords.x < 0 || p_atlas_coords.y < 0);
ERR_FAIL_COND(p_size.x <= 0 || p_size.y <= 0);
- for (int x = 0; x < p_size.x; x++) {
- for (int y = 0; y < p_size.y; y++) {
- Vector2i coords = p_atlas_coords + Vector2i(x, y);
- ERR_FAIL_COND_MSG(tiles.has(coords), vformat("Cannot create tile at position %s with size %s. Already a tile present at %s.", p_atlas_coords, p_size, coords));
- }
- }
+
+ bool room_for_tile = has_room_for_tile(p_atlas_coords, p_size, 1, Vector2i(), 1);
+ ERR_FAIL_COND_MSG(!room_for_tile, "Cannot create tile, tiles are already present in the space the tile would cover.");
+
+ // Initialize the tile data.
+ TileAlternativesData tad;
+ tad.size_in_atlas = p_size;
+ tad.animation_frames_durations.push_back(1.0);
+ tad.alternatives[0] = memnew(TileData);
+ tad.alternatives[0]->set_tile_set(tile_set);
+ tad.alternatives[0]->set_allow_transform(false);
+ tad.alternatives[0]->connect("changed", callable_mp((Resource *)this, &TileSetAtlasSource::emit_changed));
+ tad.alternatives[0]->notify_property_list_changed();
+ tad.alternatives_ids.append(0);
// Create and resize the tile.
- tiles.insert(p_atlas_coords, TileSetAtlasSource::TileAlternativesData());
+ tiles.insert(p_atlas_coords, tad);
tiles_ids.append(p_atlas_coords);
tiles_ids.sort();
- tiles[p_atlas_coords].size_in_atlas = p_size;
- tiles[p_atlas_coords].alternatives[0] = memnew(TileData);
- tiles[p_atlas_coords].alternatives[0]->set_tile_set(tile_set);
- tiles[p_atlas_coords].alternatives[0]->set_allow_transform(false);
- tiles[p_atlas_coords].alternatives[0]->connect("changed", callable_mp((Resource *)this, &TileSetAtlasSource::emit_changed));
- tiles[p_atlas_coords].alternatives[0]->notify_property_list_changed();
- tiles[p_atlas_coords].alternatives_ids.append(0);
-
- // Add all covered positions to the mapping cache
- for (int x = 0; x < p_size.x; x++) {
- for (int y = 0; y < p_size.y; y++) {
- Vector2i coords = p_atlas_coords + Vector2i(x, y);
- _coords_mapping_cache[coords] = p_atlas_coords;
- }
- }
+ _create_coords_mapping_cache(p_atlas_coords);
emit_signal(SNAME("changed"));
}
@@ -3004,14 +3370,7 @@ void TileSetAtlasSource::remove_tile(Vector2i p_atlas_coords) {
ERR_FAIL_COND_MSG(!tiles.has(p_atlas_coords), vformat("TileSetAtlasSource has no tile at %s.", String(p_atlas_coords)));
// Remove all covered positions from the mapping cache
- Size2i size = tiles[p_atlas_coords].size_in_atlas;
-
- for (int x = 0; x < size.x; x++) {
- for (int y = 0; y < size.y; y++) {
- Vector2i coords = p_atlas_coords + Vector2i(x, y);
- _coords_mapping_cache.erase(coords);
- }
- }
+ _clear_coords_mapping_cache(p_atlas_coords);
// Free tile data.
for (Map<int, TileData *>::Element *E_tile_data = tiles[p_atlas_coords].alternatives.front(); E_tile_data; E_tile_data = E_tile_data->next()) {
@@ -3038,6 +3397,118 @@ Vector2i TileSetAtlasSource::get_tile_at_coords(Vector2i p_atlas_coords) const {
return _coords_mapping_cache[p_atlas_coords];
}
+void TileSetAtlasSource::set_tile_animation_columns(const Vector2i p_atlas_coords, int p_frame_columns) {
+ ERR_FAIL_COND_MSG(!tiles.has(p_atlas_coords), vformat("TileSetAtlasSource has no tile at %s.", Vector2i(p_atlas_coords)));
+ ERR_FAIL_COND(p_frame_columns < 0);
+
+ TileAlternativesData &tad = tiles[p_atlas_coords];
+ bool room_for_tile = has_room_for_tile(p_atlas_coords, tad.size_in_atlas, p_frame_columns, tad.animation_separation, tad.animation_frames_durations.size(), p_atlas_coords);
+ ERR_FAIL_COND_MSG(!room_for_tile, "Cannot set animation columns count, tiles are already present in the space the tile would cover.");
+
+ _clear_coords_mapping_cache(p_atlas_coords);
+
+ tiles[p_atlas_coords].animation_columns = p_frame_columns;
+
+ _create_coords_mapping_cache(p_atlas_coords);
+
+ emit_signal(SNAME("changed"));
+}
+
+int TileSetAtlasSource::get_tile_animation_columns(const Vector2i p_atlas_coords) const {
+ ERR_FAIL_COND_V_MSG(!tiles.has(p_atlas_coords), 1, vformat("TileSetAtlasSource has no tile at %s.", Vector2i(p_atlas_coords)));
+ return tiles[p_atlas_coords].animation_columns;
+}
+
+void TileSetAtlasSource::set_tile_animation_separation(const Vector2i p_atlas_coords, const Vector2i p_separation) {
+ ERR_FAIL_COND_MSG(!tiles.has(p_atlas_coords), vformat("TileSetAtlasSource has no tile at %s.", Vector2i(p_atlas_coords)));
+ ERR_FAIL_COND(p_separation.x < 0 || p_separation.y < 0);
+
+ TileAlternativesData &tad = tiles[p_atlas_coords];
+ bool room_for_tile = has_room_for_tile(p_atlas_coords, tad.size_in_atlas, tad.animation_columns, p_separation, tad.animation_frames_durations.size(), p_atlas_coords);
+ ERR_FAIL_COND_MSG(!room_for_tile, "Cannot set animation columns count, tiles are already present in the space the tile would cover.");
+
+ _clear_coords_mapping_cache(p_atlas_coords);
+
+ tiles[p_atlas_coords].animation_separation = p_separation;
+
+ _create_coords_mapping_cache(p_atlas_coords);
+
+ emit_signal(SNAME("changed"));
+}
+
+Vector2i TileSetAtlasSource::get_tile_animation_separation(const Vector2i p_atlas_coords) const {
+ ERR_FAIL_COND_V_MSG(!tiles.has(p_atlas_coords), Vector2i(), vformat("TileSetAtlasSource has no tile at %s.", Vector2i(p_atlas_coords)));
+ return tiles[p_atlas_coords].animation_separation;
+}
+
+void TileSetAtlasSource::set_tile_animation_speed(const Vector2i p_atlas_coords, real_t p_speed) {
+ ERR_FAIL_COND_MSG(!tiles.has(p_atlas_coords), vformat("TileSetAtlasSource has no tile at %s.", Vector2i(p_atlas_coords)));
+ ERR_FAIL_COND(p_speed <= 0);
+
+ tiles[p_atlas_coords].animation_speed = p_speed;
+
+ emit_signal(SNAME("changed"));
+}
+
+real_t TileSetAtlasSource::get_tile_animation_speed(const Vector2i p_atlas_coords) const {
+ ERR_FAIL_COND_V_MSG(!tiles.has(p_atlas_coords), 1.0, vformat("TileSetAtlasSource has no tile at %s.", Vector2i(p_atlas_coords)));
+ return tiles[p_atlas_coords].animation_speed;
+}
+
+void TileSetAtlasSource::set_tile_animation_frames_count(const Vector2i p_atlas_coords, int p_frames_count) {
+ ERR_FAIL_COND_MSG(!tiles.has(p_atlas_coords), vformat("TileSetAtlasSource has no tile at %s.", Vector2i(p_atlas_coords)));
+ ERR_FAIL_COND(p_frames_count < 1);
+
+ TileAlternativesData &tad = tiles[p_atlas_coords];
+ bool room_for_tile = has_room_for_tile(p_atlas_coords, tad.size_in_atlas, tad.animation_columns, tad.animation_separation, p_frames_count, p_atlas_coords);
+ ERR_FAIL_COND_MSG(!room_for_tile, "Cannot set animation columns count, tiles are already present in the space the tile would cover.");
+
+ _clear_coords_mapping_cache(p_atlas_coords);
+
+ int old_size = tiles[p_atlas_coords].animation_frames_durations.size();
+ tiles[p_atlas_coords].animation_frames_durations.resize(p_frames_count);
+ for (int i = old_size; i < p_frames_count; i++) {
+ tiles[p_atlas_coords].animation_frames_durations[i] = 1.0;
+ }
+
+ _create_coords_mapping_cache(p_atlas_coords);
+
+ notify_property_list_changed();
+
+ emit_signal(SNAME("changed"));
+}
+
+int TileSetAtlasSource::get_tile_animation_frames_count(const Vector2i p_atlas_coords) const {
+ ERR_FAIL_COND_V_MSG(!tiles.has(p_atlas_coords), 1, vformat("TileSetAtlasSource has no tile at %s.", Vector2i(p_atlas_coords)));
+ return tiles[p_atlas_coords].animation_frames_durations.size();
+}
+
+void TileSetAtlasSource::set_tile_animation_frame_duration(const Vector2i p_atlas_coords, int p_frame_index, real_t p_duration) {
+ ERR_FAIL_COND_MSG(!tiles.has(p_atlas_coords), vformat("TileSetAtlasSource has no tile at %s.", Vector2i(p_atlas_coords)));
+ ERR_FAIL_INDEX(p_frame_index, (int)tiles[p_atlas_coords].animation_frames_durations.size());
+ ERR_FAIL_COND(p_duration <= 0.0);
+
+ tiles[p_atlas_coords].animation_frames_durations[p_frame_index] = p_duration;
+
+ emit_signal(SNAME("changed"));
+}
+
+real_t TileSetAtlasSource::get_tile_animation_frame_duration(const Vector2i p_atlas_coords, int p_frame_index) const {
+ ERR_FAIL_COND_V_MSG(!tiles.has(p_atlas_coords), 1, vformat("TileSetAtlasSource has no tile at %s.", Vector2i(p_atlas_coords)));
+ ERR_FAIL_INDEX_V(p_frame_index, (int)tiles[p_atlas_coords].animation_frames_durations.size(), 0.0);
+ return tiles[p_atlas_coords].animation_frames_durations[p_frame_index];
+}
+
+real_t TileSetAtlasSource::get_tile_animation_total_duration(const Vector2i p_atlas_coords) const {
+ ERR_FAIL_COND_V_MSG(!tiles.has(p_atlas_coords), 1, vformat("TileSetAtlasSource has no tile at %s.", Vector2i(p_atlas_coords)));
+
+ real_t sum = 0.0;
+ for (int frame = 0; frame < (int)tiles[p_atlas_coords].animation_frames_durations.size(); frame++) {
+ sum += tiles[p_atlas_coords].animation_frames_durations[frame];
+ }
+ return sum;
+}
+
Vector2i TileSetAtlasSource::get_tile_size_in_atlas(Vector2i p_atlas_coords) const {
ERR_FAIL_COND_V_MSG(!tiles.has(p_atlas_coords), Vector2i(-1, -1), vformat("TileSetAtlasSource has no tile at %s.", String(p_atlas_coords)));
@@ -3053,16 +3524,46 @@ Vector2i TileSetAtlasSource::get_tile_id(int p_index) const {
return tiles_ids[p_index];
}
-Rect2i TileSetAtlasSource::get_tile_texture_region(Vector2i p_atlas_coords) const {
+bool TileSetAtlasSource::has_room_for_tile(Vector2i p_atlas_coords, Vector2i p_size, int p_animation_columns, Vector2i p_animation_separation, int p_frames_count, Vector2i p_ignored_tile) const {
+ if (p_atlas_coords.x < 0 || p_atlas_coords.y < 0) {
+ return false;
+ }
+ if (p_size.x <= 0 || p_size.y <= 0) {
+ return false;
+ }
+ Size2i atlas_grid_size = get_atlas_grid_size();
+ for (int frame = 0; frame < p_frames_count; frame++) {
+ Vector2i frame_coords = p_atlas_coords + (p_size + p_animation_separation) * ((p_animation_columns > 0) ? Vector2i(frame % p_animation_columns, frame / p_animation_columns) : Vector2i(frame, 0));
+ for (int x = 0; x < p_size.x; x++) {
+ for (int y = 0; y < p_size.y; y++) {
+ Vector2i coords = frame_coords + Vector2i(x, y);
+ if (_coords_mapping_cache.has(coords) && _coords_mapping_cache[coords] != p_ignored_tile) {
+ return false;
+ }
+ if (coords.x >= atlas_grid_size.x || coords.y >= atlas_grid_size.y) {
+ if (!(_coords_mapping_cache.has(coords) && _coords_mapping_cache[coords] == p_ignored_tile)) {
+ return false; // Only accept tiles outside the atlas if they are part of the ignored tile.
+ }
+ }
+ }
+ }
+ }
+ return true;
+}
+
+Rect2i TileSetAtlasSource::get_tile_texture_region(Vector2i p_atlas_coords, int p_frame) const {
ERR_FAIL_COND_V_MSG(!tiles.has(p_atlas_coords), Rect2i(), vformat("TileSetAtlasSource has no tile at %s.", String(p_atlas_coords)));
+ ERR_FAIL_INDEX_V(p_frame, (int)tiles[p_atlas_coords].animation_frames_durations.size(), Rect2i());
+
+ const TileAlternativesData &tad = tiles[p_atlas_coords];
- Vector2i size_in_atlas = tiles[p_atlas_coords].size_in_atlas;
+ Vector2i size_in_atlas = tad.size_in_atlas;
Vector2 region_size = texture_region_size * size_in_atlas + separation * (size_in_atlas - Vector2i(1, 1));
- Vector2 origin = margins + (p_atlas_coords * (texture_region_size + separation));
+ Vector2i frame_coords = p_atlas_coords + (size_in_atlas + tad.animation_separation) * ((tad.animation_columns > 0) ? Vector2i(p_frame % tad.animation_columns, p_frame / tad.animation_columns) : Vector2i(p_frame, 0));
+ Vector2 origin = margins + (frame_coords * (texture_region_size + separation));
return Rect2(origin, region_size);
- ;
}
Vector2i TileSetAtlasSource::get_tile_effective_texture_offset(Vector2i p_atlas_coords, int p_alternative_tile) const {
@@ -3074,63 +3575,29 @@ Vector2i TileSetAtlasSource::get_tile_effective_texture_offset(Vector2i p_atlas_
margin = Vector2i(MAX(0, margin.x), MAX(0, margin.y));
Vector2i effective_texture_offset = Object::cast_to<TileData>(get_tile_data(p_atlas_coords, p_alternative_tile))->get_texture_offset();
if (ABS(effective_texture_offset.x) > margin.x || ABS(effective_texture_offset.y) > margin.y) {
- effective_texture_offset.x = CLAMP(effective_texture_offset.x, -margin.x, margin.x);
- effective_texture_offset.y = CLAMP(effective_texture_offset.y, -margin.y, margin.y);
+ effective_texture_offset = effective_texture_offset.clamp(-margin, margin);
}
return effective_texture_offset;
}
-bool TileSetAtlasSource::can_move_tile_in_atlas(Vector2i p_atlas_coords, Vector2i p_new_atlas_coords, Vector2i p_new_size) const {
- ERR_FAIL_COND_V_MSG(!tiles.has(p_atlas_coords), false, vformat("TileSetAtlasSource has no tile at %s.", String(p_atlas_coords)));
-
- Vector2i new_atlas_coords = (p_new_atlas_coords != INVALID_ATLAS_COORDS) ? p_new_atlas_coords : p_atlas_coords;
- if (new_atlas_coords.x < 0 || new_atlas_coords.y < 0) {
- return false;
- }
-
- Vector2i size = (p_new_size != Vector2i(-1, -1)) ? p_new_size : tiles[p_atlas_coords].size_in_atlas;
- ERR_FAIL_COND_V(size.x <= 0 || size.y <= 0, false);
-
- Size2i grid_size = get_atlas_grid_size();
- if (new_atlas_coords.x + size.x > grid_size.x || new_atlas_coords.y + size.y > grid_size.y) {
- return false;
- }
-
- Rect2i new_rect = Rect2i(new_atlas_coords, size);
- // Check if the new tile can fit in the new rect.
- for (int x = new_rect.position.x; x < new_rect.get_end().x; x++) {
- for (int y = new_rect.position.y; y < new_rect.get_end().y; y++) {
- Vector2i coords = get_tile_at_coords(Vector2i(x, y));
- if (coords != p_atlas_coords && coords != TileSetSource::INVALID_ATLAS_COORDS) {
- return false;
- }
- }
- }
-
- return true;
-}
-
void TileSetAtlasSource::move_tile_in_atlas(Vector2i p_atlas_coords, Vector2i p_new_atlas_coords, Vector2i p_new_size) {
- bool can_move = can_move_tile_in_atlas(p_atlas_coords, p_new_atlas_coords, p_new_size);
- ERR_FAIL_COND_MSG(!can_move, vformat("Cannot move tile at position %s with size %s. Tile already present.", p_new_atlas_coords, p_new_size));
+ ERR_FAIL_COND_MSG(!tiles.has(p_atlas_coords), vformat("TileSetAtlasSource has no tile at %s.", String(p_atlas_coords)));
+
+ TileAlternativesData &tad = tiles[p_atlas_coords];
// Compute the actual new rect from arguments.
Vector2i new_atlas_coords = (p_new_atlas_coords != INVALID_ATLAS_COORDS) ? p_new_atlas_coords : p_atlas_coords;
- Vector2i size = (p_new_size != Vector2i(-1, -1)) ? p_new_size : tiles[p_atlas_coords].size_in_atlas;
+ Vector2i new_size = (p_new_size != Vector2i(-1, -1)) ? p_new_size : tad.size_in_atlas;
- if (new_atlas_coords == p_atlas_coords && size == tiles[p_atlas_coords].size_in_atlas) {
+ if (new_atlas_coords == p_atlas_coords && new_size == tad.size_in_atlas) {
return;
}
- // Remove all covered positions from the mapping cache.
- Size2i old_size = tiles[p_atlas_coords].size_in_atlas;
- for (int x = 0; x < old_size.x; x++) {
- for (int y = 0; y < old_size.y; y++) {
- Vector2i coords = p_atlas_coords + Vector2i(x, y);
- _coords_mapping_cache.erase(coords);
- }
- }
+ bool room_for_tile = has_room_for_tile(new_atlas_coords, new_size, tad.animation_columns, tad.animation_separation, tad.animation_frames_durations.size(), p_atlas_coords);
+ ERR_FAIL_COND_MSG(!room_for_tile, vformat("Cannot move tile at position %s with size %s. Tile already present.", new_atlas_coords, new_size));
+
+ _clear_coords_mapping_cache(p_atlas_coords);
// Move the tile and update its size.
if (new_atlas_coords != p_atlas_coords) {
@@ -3141,15 +3608,9 @@ void TileSetAtlasSource::move_tile_in_atlas(Vector2i p_atlas_coords, Vector2i p_
tiles_ids.append(new_atlas_coords);
tiles_ids.sort();
}
- tiles[new_atlas_coords].size_in_atlas = size;
+ tiles[new_atlas_coords].size_in_atlas = new_size;
- // Add all covered positions to the mapping cache again.
- for (int x = 0; x < size.x; x++) {
- for (int y = 0; y < size.y; y++) {
- Vector2i coords = new_atlas_coords + Vector2i(x, y);
- _coords_mapping_cache[coords] = new_atlas_coords;
- }
- }
+ _create_coords_mapping_cache(new_atlas_coords);
emit_signal(SNAME("changed"));
}
@@ -3273,38 +3734,43 @@ void TileSetAtlasSource::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_NOEDITOR), "set_texture", "get_texture");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "margins", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_margins", "get_margins");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "separation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_separation", "get_separation");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "tile_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_texture_region_size", "get_texture_region_size");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "texture_region_size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_texture_region_size", "get_texture_region_size");
// Base tiles
ClassDB::bind_method(D_METHOD("create_tile", "atlas_coords", "size"), &TileSetAtlasSource::create_tile, DEFVAL(Vector2i(1, 1)));
ClassDB::bind_method(D_METHOD("remove_tile", "atlas_coords"), &TileSetAtlasSource::remove_tile); // Remove a tile. If p_tile_key.alternative_tile if different from 0, remove the alternative
- ClassDB::bind_method(D_METHOD("has_tile", "atlas_coords"), &TileSetAtlasSource::has_tile);
- ClassDB::bind_method(D_METHOD("can_move_tile_in_atlas", "atlas_coords", "new_atlas_coords", "new_size"), &TileSetAtlasSource::can_move_tile_in_atlas, DEFVAL(INVALID_ATLAS_COORDS), DEFVAL(Vector2i(-1, -1)));
ClassDB::bind_method(D_METHOD("move_tile_in_atlas", "atlas_coords", "new_atlas_coords", "new_size"), &TileSetAtlasSource::move_tile_in_atlas, DEFVAL(INVALID_ATLAS_COORDS), DEFVAL(Vector2i(-1, -1)));
ClassDB::bind_method(D_METHOD("get_tile_size_in_atlas", "atlas_coords"), &TileSetAtlasSource::get_tile_size_in_atlas);
- ClassDB::bind_method(D_METHOD("get_tiles_count"), &TileSetAtlasSource::get_tiles_count);
- ClassDB::bind_method(D_METHOD("get_tile_id", "index"), &TileSetAtlasSource::get_tile_id);
+ ClassDB::bind_method(D_METHOD("has_room_for_tile", "atlas_coords", "size", "animation_columns", "animation_separation", "frames_count", "ignored_tile"), &TileSetAtlasSource::has_room_for_tile, DEFVAL(INVALID_ATLAS_COORDS));
ClassDB::bind_method(D_METHOD("get_tile_at_coords", "atlas_coords"), &TileSetAtlasSource::get_tile_at_coords);
+ ClassDB::bind_method(D_METHOD("set_tile_animation_columns", "atlas_coords", "frame_columns"), &TileSetAtlasSource::set_tile_animation_columns);
+ ClassDB::bind_method(D_METHOD("get_tile_animation_columns", "atlas_coords"), &TileSetAtlasSource::get_tile_animation_columns);
+ ClassDB::bind_method(D_METHOD("set_tile_animation_separation", "atlas_coords", "separation"), &TileSetAtlasSource::set_tile_animation_separation);
+ ClassDB::bind_method(D_METHOD("get_tile_animation_separation", "atlas_coords"), &TileSetAtlasSource::get_tile_animation_separation);
+ ClassDB::bind_method(D_METHOD("set_tile_animation_speed", "atlas_coords", "speed"), &TileSetAtlasSource::set_tile_animation_speed);
+ ClassDB::bind_method(D_METHOD("get_tile_animation_speed", "atlas_coords"), &TileSetAtlasSource::get_tile_animation_speed);
+ ClassDB::bind_method(D_METHOD("set_tile_animation_frames_count", "atlas_coords", "frames_count"), &TileSetAtlasSource::set_tile_animation_frames_count);
+ ClassDB::bind_method(D_METHOD("get_tile_animation_frames_count", "atlas_coords"), &TileSetAtlasSource::get_tile_animation_frames_count);
+ ClassDB::bind_method(D_METHOD("set_tile_animation_frame_duration", "atlas_coords", "frame_index", "duration"), &TileSetAtlasSource::set_tile_animation_frame_duration);
+ ClassDB::bind_method(D_METHOD("get_tile_animation_frame_duration", "atlas_coords", "frame_index"), &TileSetAtlasSource::get_tile_animation_frame_duration);
+ ClassDB::bind_method(D_METHOD("get_tile_animation_total_duration", "atlas_coords"), &TileSetAtlasSource::get_tile_animation_total_duration);
+
// Alternative tiles
ClassDB::bind_method(D_METHOD("create_alternative_tile", "atlas_coords", "alternative_id_override"), &TileSetAtlasSource::create_alternative_tile, DEFVAL(INVALID_TILE_ALTERNATIVE));
ClassDB::bind_method(D_METHOD("remove_alternative_tile", "atlas_coords", "alternative_tile"), &TileSetAtlasSource::remove_alternative_tile);
ClassDB::bind_method(D_METHOD("set_alternative_tile_id", "atlas_coords", "alternative_tile", "new_id"), &TileSetAtlasSource::set_alternative_tile_id);
- ClassDB::bind_method(D_METHOD("has_alternative_tile", "atlas_coords", "alternative_tile"), &TileSetAtlasSource::has_alternative_tile);
ClassDB::bind_method(D_METHOD("get_next_alternative_tile_id", "atlas_coords"), &TileSetAtlasSource::get_next_alternative_tile_id);
- ClassDB::bind_method(D_METHOD("get_alternative_tiles_count", "atlas_coords"), &TileSetAtlasSource::get_alternative_tiles_count);
- ClassDB::bind_method(D_METHOD("get_alternative_tile_id", "atlas_coords", "index"), &TileSetAtlasSource::get_alternative_tile_id);
-
- ClassDB::bind_method(D_METHOD("get_tile_data", "atlas_coords", "index"), &TileSetAtlasSource::get_tile_data);
+ ClassDB::bind_method(D_METHOD("get_tile_data", "atlas_coords", "alternative_tile"), &TileSetAtlasSource::get_tile_data);
// Helpers.
ClassDB::bind_method(D_METHOD("get_atlas_grid_size"), &TileSetAtlasSource::get_atlas_grid_size);
ClassDB::bind_method(D_METHOD("has_tiles_outside_texture"), &TileSetAtlasSource::has_tiles_outside_texture);
ClassDB::bind_method(D_METHOD("clear_tiles_outside_texture"), &TileSetAtlasSource::clear_tiles_outside_texture);
- ClassDB::bind_method(D_METHOD("get_tile_texture_region", "atlas_coords"), &TileSetAtlasSource::get_tile_texture_region);
+ ClassDB::bind_method(D_METHOD("get_tile_texture_region", "atlas_coords", "frame"), &TileSetAtlasSource::get_tile_texture_region, DEFVAL(0));
}
TileSetAtlasSource::~TileSetAtlasSource() {
@@ -3338,6 +3804,45 @@ void TileSetAtlasSource::_compute_next_alternative_id(const Vector2i p_atlas_coo
};
}
+void TileSetAtlasSource::_clear_coords_mapping_cache(Vector2i p_atlas_coords) {
+ ERR_FAIL_COND_MSG(!tiles.has(p_atlas_coords), vformat("TileSetAtlasSource has no tile at %s.", Vector2i(p_atlas_coords)));
+ TileAlternativesData &tad = tiles[p_atlas_coords];
+ for (int frame = 0; frame < (int)tad.animation_frames_durations.size(); frame++) {
+ Vector2i frame_coords = p_atlas_coords + (tad.size_in_atlas + tad.animation_separation) * ((tad.animation_columns > 0) ? Vector2i(frame % tad.animation_columns, frame / tad.animation_columns) : Vector2i(frame, 0));
+ for (int x = 0; x < tad.size_in_atlas.x; x++) {
+ for (int y = 0; y < tad.size_in_atlas.y; y++) {
+ Vector2i coords = frame_coords + Vector2i(x, y);
+ if (!_coords_mapping_cache.has(coords)) {
+ WARN_PRINT(vformat("TileSetAtlasSource has no cached tile at position %s, the position cache might be corrupted.", coords));
+ } else {
+ if (_coords_mapping_cache[coords] != p_atlas_coords) {
+ WARN_PRINT(vformat("The position cache at position %s is pointing to a wrong tile, the position cache might be corrupted.", coords));
+ }
+ _coords_mapping_cache.erase(coords);
+ }
+ }
+ }
+ }
+}
+
+void TileSetAtlasSource::_create_coords_mapping_cache(Vector2i p_atlas_coords) {
+ ERR_FAIL_COND_MSG(!tiles.has(p_atlas_coords), vformat("TileSetAtlasSource has no tile at %s.", Vector2i(p_atlas_coords)));
+
+ TileAlternativesData &tad = tiles[p_atlas_coords];
+ for (int frame = 0; frame < (int)tad.animation_frames_durations.size(); frame++) {
+ Vector2i frame_coords = p_atlas_coords + (tad.size_in_atlas + tad.animation_separation) * ((tad.animation_columns > 0) ? Vector2i(frame % tad.animation_columns, frame / tad.animation_columns) : Vector2i(frame, 0));
+ for (int x = 0; x < tad.size_in_atlas.x; x++) {
+ for (int y = 0; y < tad.size_in_atlas.y; y++) {
+ Vector2i coords = frame_coords + Vector2i(x, y);
+ if (_coords_mapping_cache.has(coords)) {
+ WARN_PRINT(vformat("The cache already has a tile for position %s, the position cache might be corrupted.", coords));
+ }
+ _coords_mapping_cache[coords] = p_atlas_coords;
+ }
+ }
+ }
+}
+
/////////////////////////////// TileSetScenesCollectionSource //////////////////////////////////////
void TileSetScenesCollectionSource::_compute_next_alternative_id() {
@@ -3511,16 +4016,6 @@ void TileSetScenesCollectionSource::_get_property_list(List<PropertyInfo> *p_lis
}
void TileSetScenesCollectionSource::_bind_methods() {
- // Base tiles
- ClassDB::bind_method(D_METHOD("get_tiles_count"), &TileSetScenesCollectionSource::get_tiles_count);
- ClassDB::bind_method(D_METHOD("get_tile_id", "index"), &TileSetScenesCollectionSource::get_tile_id);
- ClassDB::bind_method(D_METHOD("has_tile", "atlas_coords"), &TileSetScenesCollectionSource::has_tile);
-
- // Alternative tiles
- ClassDB::bind_method(D_METHOD("get_alternative_tiles_count", "atlas_coords"), &TileSetScenesCollectionSource::get_alternative_tiles_count);
- ClassDB::bind_method(D_METHOD("get_alternative_tile_id", "atlas_coords", "index"), &TileSetScenesCollectionSource::get_alternative_tile_id);
- ClassDB::bind_method(D_METHOD("has_alternative_tile", "atlas_coords", "alternative_tile"), &TileSetScenesCollectionSource::has_alternative_tile);
-
ClassDB::bind_method(D_METHOD("get_scene_tiles_count"), &TileSetScenesCollectionSource::get_scene_tiles_count);
ClassDB::bind_method(D_METHOD("get_scene_tile_id", "index"), &TileSetScenesCollectionSource::get_scene_tile_id);
ClassDB::bind_method(D_METHOD("has_scene_tile_id", "id"), &TileSetScenesCollectionSource::has_scene_tile_id);
@@ -3575,6 +4070,155 @@ void TileData::notify_tile_data_properties_should_change() {
emit_signal(SNAME("changed"));
}
+void TileData::add_occlusion_layer(int p_to_pos) {
+ if (p_to_pos < 0) {
+ p_to_pos = occluders.size();
+ }
+ ERR_FAIL_INDEX(p_to_pos, occluders.size() + 1);
+ occluders.insert(p_to_pos, Ref<OccluderPolygon2D>());
+}
+
+void TileData::move_occlusion_layer(int p_from_index, int p_to_pos) {
+ ERR_FAIL_INDEX(p_from_index, occluders.size());
+ ERR_FAIL_INDEX(p_to_pos, occluders.size() + 1);
+ occluders.insert(p_to_pos, occluders[p_from_index]);
+ occluders.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+}
+
+void TileData::remove_occlusion_layer(int p_index) {
+ ERR_FAIL_INDEX(p_index, occluders.size());
+ occluders.remove(p_index);
+}
+
+void TileData::add_physics_layer(int p_to_pos) {
+ if (p_to_pos < 0) {
+ p_to_pos = physics.size();
+ }
+ ERR_FAIL_INDEX(p_to_pos, physics.size() + 1);
+ physics.insert(p_to_pos, PhysicsLayerTileData());
+}
+
+void TileData::move_physics_layer(int p_from_index, int p_to_pos) {
+ ERR_FAIL_INDEX(p_from_index, physics.size());
+ ERR_FAIL_INDEX(p_to_pos, physics.size() + 1);
+ physics.insert(p_to_pos, physics[p_from_index]);
+ physics.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+}
+
+void TileData::remove_physics_layer(int p_index) {
+ ERR_FAIL_INDEX(p_index, physics.size());
+ physics.remove(p_index);
+}
+
+void TileData::add_terrain_set(int p_to_pos) {
+ if (p_to_pos >= 0 && p_to_pos <= terrain_set) {
+ terrain_set += 1;
+ }
+}
+
+void TileData::move_terrain_set(int p_from_index, int p_to_pos) {
+ if (p_from_index == terrain_set) {
+ terrain_set = (p_from_index < p_to_pos) ? p_to_pos - 1 : p_to_pos;
+ } else {
+ if (p_from_index < terrain_set) {
+ terrain_set -= 1;
+ }
+ if (p_to_pos <= terrain_set) {
+ terrain_set += 1;
+ }
+ }
+}
+
+void TileData::remove_terrain_set(int p_index) {
+ if (p_index == terrain_set) {
+ terrain_set = -1;
+ for (int i = 0; i < 16; i++) {
+ terrain_peering_bits[i] = -1;
+ }
+ } else if (terrain_set > p_index) {
+ terrain_set -= 1;
+ }
+}
+
+void TileData::add_terrain(int p_terrain_set, int p_to_pos) {
+ if (terrain_set == p_terrain_set) {
+ for (int i = 0; i < 16; i++) {
+ if (p_to_pos >= 0 && p_to_pos <= terrain_peering_bits[i]) {
+ terrain_peering_bits[i] += 1;
+ }
+ }
+ }
+}
+
+void TileData::move_terrain(int p_terrain_set, int p_from_index, int p_to_pos) {
+ if (terrain_set == p_terrain_set) {
+ for (int i = 0; i < 16; i++) {
+ if (p_from_index == terrain_peering_bits[i]) {
+ terrain_peering_bits[i] = (p_from_index < p_to_pos) ? p_to_pos - 1 : p_to_pos;
+ } else {
+ if (p_from_index < terrain_peering_bits[i]) {
+ terrain_peering_bits[i] -= 1;
+ }
+ if (p_to_pos <= terrain_peering_bits[i]) {
+ terrain_peering_bits[i] += 1;
+ }
+ }
+ }
+ }
+}
+
+void TileData::remove_terrain(int p_terrain_set, int p_index) {
+ if (terrain_set == p_terrain_set) {
+ for (int i = 0; i < 16; i++) {
+ if (terrain_peering_bits[i] == p_index) {
+ terrain_peering_bits[i] = -1;
+ } else if (terrain_peering_bits[i] > p_index) {
+ terrain_peering_bits[i] -= 1;
+ }
+ }
+ }
+}
+
+void TileData::add_navigation_layer(int p_to_pos) {
+ if (p_to_pos < 0) {
+ p_to_pos = navigation.size();
+ }
+ ERR_FAIL_INDEX(p_to_pos, navigation.size() + 1);
+ navigation.insert(p_to_pos, Ref<NavigationPolygon>());
+}
+
+void TileData::move_navigation_layer(int p_from_index, int p_to_pos) {
+ ERR_FAIL_INDEX(p_from_index, navigation.size());
+ ERR_FAIL_INDEX(p_to_pos, navigation.size() + 1);
+ navigation.insert(p_to_pos, navigation[p_from_index]);
+ navigation.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+}
+
+void TileData::remove_navigation_layer(int p_index) {
+ ERR_FAIL_INDEX(p_index, navigation.size());
+ navigation.remove(p_index);
+}
+
+void TileData::add_custom_data_layer(int p_to_pos) {
+ if (p_to_pos < 0) {
+ p_to_pos = custom_data.size();
+ }
+ ERR_FAIL_INDEX(p_to_pos, custom_data.size() + 1);
+ custom_data.insert(p_to_pos, Variant());
+}
+
+void TileData::move_custom_data_layer(int p_from_index, int p_to_pos) {
+ ERR_FAIL_INDEX(p_from_index, custom_data.size());
+ ERR_FAIL_INDEX(p_to_pos, custom_data.size() + 1);
+ custom_data.insert(p_to_pos, navigation[p_from_index]);
+ custom_data.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+}
+
+void TileData::remove_custom_data_layer(int p_index) {
+ ERR_FAIL_INDEX(p_index, custom_data.size());
+ custom_data.remove(p_index);
+}
+
void TileData::reset_state() {
occluders.clear();
physics.clear();
@@ -3628,11 +4272,11 @@ Vector2i TileData::get_texture_offset() const {
return tex_offset;
}
-void TileData::tile_set_material(Ref<ShaderMaterial> p_material) {
+void TileData::set_material(Ref<ShaderMaterial> p_material) {
material = p_material;
emit_signal(SNAME("changed"));
}
-Ref<ShaderMaterial> TileData::tile_get_material() const {
+Ref<ShaderMaterial> TileData::get_material() const {
return material;
}
@@ -3672,9 +4316,26 @@ Ref<OccluderPolygon2D> TileData::get_occluder(int p_layer_id) const {
}
// Physics
-int TileData::get_collision_polygons_count(int p_layer_id) const {
- ERR_FAIL_INDEX_V(p_layer_id, physics.size(), 0);
- return physics[p_layer_id].polygons.size();
+void TileData::set_constant_linear_velocity(int p_layer_id, const Vector2 &p_velocity) {
+ ERR_FAIL_INDEX(p_layer_id, physics.size());
+ physics.write[p_layer_id].linear_velocity = p_velocity;
+ emit_signal(SNAME("changed"));
+}
+
+Vector2 TileData::get_constant_linear_velocity(int p_layer_id) const {
+ ERR_FAIL_INDEX_V(p_layer_id, physics.size(), Vector2());
+ return physics[p_layer_id].linear_velocity;
+}
+
+void TileData::set_constant_angular_velocity(int p_layer_id, real_t p_velocity) {
+ ERR_FAIL_INDEX(p_layer_id, physics.size());
+ physics.write[p_layer_id].angular_velocity = p_velocity;
+ emit_signal(SNAME("changed"));
+}
+
+real_t TileData::get_constant_angular_velocity(int p_layer_id) const {
+ ERR_FAIL_INDEX_V(p_layer_id, physics.size(), 0.0);
+ return physics[p_layer_id].angular_velocity;
}
void TileData::set_collision_polygons_count(int p_layer_id, int p_polygons_count) {
@@ -3685,6 +4346,11 @@ void TileData::set_collision_polygons_count(int p_layer_id, int p_polygons_count
emit_signal(SNAME("changed"));
}
+int TileData::get_collision_polygons_count(int p_layer_id) const {
+ ERR_FAIL_INDEX_V(p_layer_id, physics.size(), 0);
+ return physics[p_layer_id].polygons.size();
+}
+
void TileData::add_collision_polygon(int p_layer_id) {
ERR_FAIL_INDEX(p_layer_id, physics.size());
physics.write[p_layer_id].polygons.push_back(PhysicsLayerTileData::PolygonShapeTileData());
@@ -3886,11 +4552,7 @@ bool TileData::_set(const StringName &p_name, const Variant &p_value) {
// Physics layers.
int layer_index = components[0].trim_prefix("physics_layer_").to_int();
ERR_FAIL_COND_V(layer_index < 0, false);
- if (components.size() == 2 && components[1] == "polygons_count") {
- if (p_value.get_type() != Variant::INT) {
- return false;
- }
-
+ if (components.size() == 2) {
if (layer_index >= physics.size()) {
if (tile_set) {
return false;
@@ -3898,8 +4560,19 @@ bool TileData::_set(const StringName &p_name, const Variant &p_value) {
physics.resize(layer_index + 1);
}
}
- set_collision_polygons_count(layer_index, p_value);
- return true;
+ if (components[1] == "linear_velocity") {
+ set_constant_linear_velocity(layer_index, p_value);
+ return true;
+ } else if (components[1] == "angular_velocity") {
+ set_constant_angular_velocity(layer_index, p_value);
+ return true;
+ } else if (components[1] == "polygons_count") {
+ if (p_value.get_type() != Variant::INT) {
+ return false;
+ }
+ set_collision_polygons_count(layer_index, p_value);
+ return true;
+ }
} else if (components.size() == 3 && components[1].begins_with("polygon_") && components[1].trim_prefix("polygon_").is_valid_int()) {
int polygon_index = components[1].trim_prefix("polygon_").to_int();
ERR_FAIL_COND_V(polygon_index < 0, false);
@@ -4001,9 +4674,18 @@ bool TileData::_get(const StringName &p_name, Variant &r_ret) const {
if (layer_index >= physics.size()) {
return false;
}
- if (components.size() == 2 && components[1] == "polygons_count") {
- r_ret = get_collision_polygons_count(layer_index);
- return true;
+
+ if (components.size() == 2) {
+ if (components[1] == "linear_velocity") {
+ r_ret = get_constant_linear_velocity(layer_index);
+ return true;
+ } else if (components[1] == "angular_velocity") {
+ r_ret = get_constant_angular_velocity(layer_index);
+ return true;
+ } else if (components[1] == "polygons_count") {
+ r_ret = get_collision_polygons_count(layer_index);
+ return true;
+ }
} else if (components.size() == 3 && components[1].begins_with("polygon_") && components[1].trim_prefix("polygon_").is_valid_int()) {
int polygon_index = components[1].trim_prefix("polygon_").to_int();
ERR_FAIL_COND_V(polygon_index < 0, false);
@@ -4074,6 +4756,8 @@ void TileData::_get_property_list(List<PropertyInfo> *p_list) const {
// Physics layers.
p_list->push_back(PropertyInfo(Variant::NIL, "Physics", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP));
for (int i = 0; i < physics.size(); i++) {
+ p_list->push_back(PropertyInfo(Variant::VECTOR2, vformat("physics_layer_%d/linear_velocity", i), PROPERTY_HINT_NONE));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, vformat("physics_layer_%d/angular_velocity", i), PROPERTY_HINT_NONE));
p_list->push_back(PropertyInfo(Variant::INT, vformat("physics_layer_%d/polygons_count", i), PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR));
for (int j = 0; j < physics[i].polygons.size(); j++) {
@@ -4148,8 +4832,8 @@ void TileData::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_flip_v"), &TileData::get_flip_v);
ClassDB::bind_method(D_METHOD("set_transpose", "transpose"), &TileData::set_transpose);
ClassDB::bind_method(D_METHOD("get_transpose"), &TileData::get_transpose);
- ClassDB::bind_method(D_METHOD("tile_set_material", "material"), &TileData::tile_set_material);
- ClassDB::bind_method(D_METHOD("tile_get_material"), &TileData::tile_get_material);
+ ClassDB::bind_method(D_METHOD("set_material", "material"), &TileData::set_material);
+ ClassDB::bind_method(D_METHOD("get_material"), &TileData::get_material);
ClassDB::bind_method(D_METHOD("set_texture_offset", "texture_offset"), &TileData::set_texture_offset);
ClassDB::bind_method(D_METHOD("get_texture_offset"), &TileData::get_texture_offset);
ClassDB::bind_method(D_METHOD("set_modulate", "modulate"), &TileData::set_modulate);
@@ -4163,8 +4847,12 @@ void TileData::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_occluder", "layer_id"), &TileData::get_occluder);
// Physics.
- ClassDB::bind_method(D_METHOD("get_collision_polygons_count", "layer_id"), &TileData::get_collision_polygons_count);
+ ClassDB::bind_method(D_METHOD("set_constant_linear_velocity", "layer_id", "velocity"), &TileData::set_constant_linear_velocity);
+ ClassDB::bind_method(D_METHOD("get_constant_linear_velocity", "layer_id"), &TileData::get_constant_linear_velocity);
+ ClassDB::bind_method(D_METHOD("set_constant_angular_velocity", "layer_id", "velocity"), &TileData::set_constant_angular_velocity);
+ ClassDB::bind_method(D_METHOD("get_constant_angular_velocity", "layer_id"), &TileData::get_constant_angular_velocity);
ClassDB::bind_method(D_METHOD("set_collision_polygons_count", "layer_id", "polygons_count"), &TileData::set_collision_polygons_count);
+ ClassDB::bind_method(D_METHOD("get_collision_polygons_count", "layer_id"), &TileData::get_collision_polygons_count);
ClassDB::bind_method(D_METHOD("add_collision_polygon", "layer_id"), &TileData::add_collision_polygon);
ClassDB::bind_method(D_METHOD("remove_collision_polygon", "layer_id", "polygon_index"), &TileData::remove_collision_polygon);
ClassDB::bind_method(D_METHOD("set_collision_polygon_points", "layer_id", "polygon_index", "polygon"), &TileData::set_collision_polygon_points);
@@ -4200,6 +4888,7 @@ void TileData::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "transpose"), "set_transpose", "get_transpose");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "texture_offset"), "set_texture_offset", "get_texture_offset");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "modulate"), "set_modulate", "get_modulate");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial"), "set_material", "get_material");
ADD_PROPERTY(PropertyInfo(Variant::INT, "z_index"), "set_z_index", "get_z_index");
ADD_PROPERTY(PropertyInfo(Variant::INT, "y_sort_origin"), "set_y_sort_origin", "get_y_sort_origin");
diff --git a/scene/resources/tile_set.h b/scene/resources/tile_set.h
index 35e6999d13..42b82957fb 100644
--- a/scene/resources/tile_set.h
+++ b/scene/resources/tile_set.h
@@ -225,10 +225,10 @@ private:
bool terrain_bits_meshes_dirty = true;
// Navigation
- struct Navigationlayer {
+ struct NavigationLayer {
uint32_t layers = 1;
};
- Vector<Navigationlayer> navigation_layers;
+ Vector<NavigationLayer> navigation_layers;
// CustomData
struct CustomDataLayer {
@@ -298,16 +298,20 @@ public:
void set_uv_clipping(bool p_uv_clipping);
bool is_uv_clipping() const;
- void set_occlusion_layers_count(int p_occlusion_layers_count);
int get_occlusion_layers_count() const;
+ void add_occlusion_layer(int p_index = -1);
+ void move_occlusion_layer(int p_from_index, int p_to_pos);
+ void remove_occlusion_layer(int p_index);
void set_occlusion_layer_light_mask(int p_layer_index, int p_light_mask);
int get_occlusion_layer_light_mask(int p_layer_index) const;
- void set_occlusion_layer_sdf_collision(int p_layer_index, int p_sdf_collision);
+ void set_occlusion_layer_sdf_collision(int p_layer_index, bool p_sdf_collision);
bool get_occlusion_layer_sdf_collision(int p_layer_index) const;
// Physics
- void set_physics_layers_count(int p_physics_layers_count);
int get_physics_layers_count() const;
+ void add_physics_layer(int p_index = -1);
+ void move_physics_layer(int p_from_index, int p_to_pos);
+ void remove_physics_layer(int p_index);
void set_physics_layer_collision_layer(int p_layer_index, uint32_t p_layer);
uint32_t get_physics_layer_collision_layer(int p_layer_index) const;
void set_physics_layer_collision_mask(int p_layer_index, uint32_t p_mask);
@@ -315,13 +319,19 @@ public:
void set_physics_layer_physics_material(int p_layer_index, Ref<PhysicsMaterial> p_physics_material);
Ref<PhysicsMaterial> get_physics_layer_physics_material(int p_layer_index) const;
- // Terrains
- void set_terrain_sets_count(int p_terrains_sets_count);
+ // Terrain sets
int get_terrain_sets_count() const;
+ void add_terrain_set(int p_index = -1);
+ void move_terrain_set(int p_from_index, int p_to_pos);
+ void remove_terrain_set(int p_index);
void set_terrain_set_mode(int p_terrain_set, TerrainMode p_terrain_mode);
TerrainMode get_terrain_set_mode(int p_terrain_set) const;
- void set_terrains_count(int p_terrain_set, int p_terrains_count);
+
+ // Terrains
int get_terrains_count(int p_terrain_set) const;
+ void add_terrain(int p_terrain_set, int p_index = -1);
+ void move_terrain(int p_terrain_set, int p_from_index, int p_to_pos);
+ void remove_terrain(int p_terrain_set, int p_index);
void set_terrain_name(int p_terrain_set, int p_terrain_index, String p_name);
String get_terrain_name(int p_terrain_set, int p_terrain_index) const;
void set_terrain_color(int p_terrain_set, int p_terrain_index, Color p_color);
@@ -330,14 +340,18 @@ public:
bool is_valid_peering_bit_terrain(int p_terrain_set, TileSet::CellNeighbor p_peering_bit) const;
// Navigation
- void set_navigation_layers_count(int p_navigation_layers_count);
int get_navigation_layers_count() const;
+ void add_navigation_layer(int p_index = -1);
+ void move_navigation_layer(int p_from_index, int p_to_pos);
+ void remove_navigation_layer(int p_index);
void set_navigation_layer_layers(int p_layer_index, uint32_t p_layers);
uint32_t get_navigation_layer_layers(int p_layer_index) const;
// Custom data
- void set_custom_data_layers_count(int p_custom_data_layers_count);
int get_custom_data_layers_count() const;
+ void add_custom_data_layer(int p_index = -1);
+ void move_custom_data_layer(int p_from_index, int p_to_pos);
+ void remove_custom_data_layer(int p_index);
int get_custom_data_layer_by_name(String p_value) const;
void set_custom_data_name(int p_layer_id, String p_value);
String get_custom_data_name(int p_layer_id) const;
@@ -371,7 +385,7 @@ public:
// Helpers
Vector<Vector2> get_tile_shape_polygon();
- void draw_tile_shape(CanvasItem *p_canvas_item, Rect2 p_region, Color p_color, bool p_filled = false, Ref<Texture2D> p_texture = Ref<Texture2D>());
+ void draw_tile_shape(CanvasItem *p_canvas_item, Transform2D p_transform, Color p_color, bool p_filled = false, Ref<Texture2D> p_texture = Ref<Texture2D>());
Vector<Point2> get_terrain_bit_polygon(int p_terrain_set, TileSet::CellNeighbor p_bit);
void draw_terrains(CanvasItem *p_canvas_item, Transform2D p_transform, const TileData *p_tile_data);
@@ -390,6 +404,8 @@ class TileSetSource : public Resource {
protected:
const TileSet *tile_set = nullptr;
+ static void _bind_methods();
+
public:
static const Vector2i INVALID_ATLAS_COORDS; // Vector2i(-1, -1);
static const int INVALID_TILE_ALTERNATIVE; // -1;
@@ -397,6 +413,24 @@ public:
// Not exposed.
virtual void set_tile_set(const TileSet *p_tile_set);
virtual void notify_tile_data_properties_should_change(){};
+ virtual void add_occlusion_layer(int p_index){};
+ virtual void move_occlusion_layer(int p_from_index, int p_to_pos){};
+ virtual void remove_occlusion_layer(int p_index){};
+ virtual void add_physics_layer(int p_index){};
+ virtual void move_physics_layer(int p_from_index, int p_to_pos){};
+ virtual void remove_physics_layer(int p_index){};
+ virtual void add_terrain_set(int p_index){};
+ virtual void move_terrain_set(int p_from_index, int p_to_pos){};
+ virtual void remove_terrain_set(int p_index){};
+ virtual void add_terrain(int p_terrain_set, int p_index){};
+ virtual void move_terrain(int p_terrain_set, int p_from_index, int p_to_pos){};
+ virtual void remove_terrain(int p_terrain_set, int p_index){};
+ virtual void add_navigation_layer(int p_index){};
+ virtual void move_navigation_layer(int p_from_index, int p_to_pos){};
+ virtual void remove_navigation_layer(int p_index){};
+ virtual void add_custom_data_layer(int p_index){};
+ virtual void move_custom_data_layer(int p_from_index, int p_to_pos){};
+ virtual void remove_custom_data_layer(int p_index){};
virtual void reset_state() override{};
// Tiles.
@@ -413,16 +447,23 @@ public:
class TileSetAtlasSource : public TileSetSource {
GDCLASS(TileSetAtlasSource, TileSetSource);
-public:
+private:
struct TileAlternativesData {
Vector2i size_in_atlas = Vector2i(1, 1);
Vector2i texture_offset;
+
+ // Animation
+ int animation_columns = 0;
+ Vector2i animation_separation;
+ real_t animation_speed = 1.0;
+ LocalVector<real_t> animation_frames_durations;
+
+ // Alternatives
Map<int, TileData *> alternatives;
Vector<int> alternatives_ids;
int next_alternative_id = 1;
};
-private:
Ref<Texture2D> texture;
Vector2i margins;
Vector2i separation;
@@ -437,6 +478,9 @@ private:
void _compute_next_alternative_id(const Vector2i p_atlas_coords);
+ void _create_coords_mapping_cache(Vector2i p_atlas_coords);
+ void _clear_coords_mapping_cache(Vector2i p_atlas_coords);
+
protected:
bool _set(const StringName &p_name, const Variant &p_value);
bool _get(const StringName &p_name, Variant &r_ret) const;
@@ -448,6 +492,24 @@ public:
// Not exposed.
virtual void set_tile_set(const TileSet *p_tile_set) override;
virtual void notify_tile_data_properties_should_change() override;
+ virtual void add_occlusion_layer(int p_index) override;
+ virtual void move_occlusion_layer(int p_from_index, int p_to_pos) override;
+ virtual void remove_occlusion_layer(int p_index) override;
+ virtual void add_physics_layer(int p_index) override;
+ virtual void move_physics_layer(int p_from_index, int p_to_pos) override;
+ virtual void remove_physics_layer(int p_index) override;
+ virtual void add_terrain_set(int p_index) override;
+ virtual void move_terrain_set(int p_from_index, int p_to_pos) override;
+ virtual void remove_terrain_set(int p_index) override;
+ virtual void add_terrain(int p_terrain_set, int p_index) override;
+ virtual void move_terrain(int p_terrain_set, int p_from_index, int p_to_pos) override;
+ virtual void remove_terrain(int p_terrain_set, int p_index) override;
+ virtual void add_navigation_layer(int p_index) override;
+ virtual void move_navigation_layer(int p_from_index, int p_to_pos) override;
+ virtual void remove_navigation_layer(int p_index) override;
+ virtual void add_custom_data_layer(int p_index) override;
+ virtual void move_custom_data_layer(int p_from_index, int p_to_pos) override;
+ virtual void remove_custom_data_layer(int p_index) override;
virtual void reset_state() override;
// Base properties.
@@ -461,18 +523,32 @@ public:
Vector2i get_texture_region_size() const;
// Base tiles.
- void create_tile(const Vector2i p_atlas_coords, const Vector2i p_size = Vector2i(1, 1)); // Create a tile if it does not exists, or add alternative tile if it does.
- void remove_tile(Vector2i p_atlas_coords); // Remove a tile. If p_tile_key.alternative_tile if different from 0, remove the alternative
+ void create_tile(const Vector2i p_atlas_coords, const Vector2i p_size = Vector2i(1, 1));
+ void remove_tile(Vector2i p_atlas_coords);
virtual bool has_tile(Vector2i p_atlas_coords) const override;
- bool can_move_tile_in_atlas(Vector2i p_atlas_coords, Vector2i p_new_atlas_coords = INVALID_ATLAS_COORDS, Vector2i p_new_size = Vector2i(-1, -1)) const;
void move_tile_in_atlas(Vector2i p_atlas_coords, Vector2i p_new_atlas_coords = INVALID_ATLAS_COORDS, Vector2i p_new_size = Vector2i(-1, -1));
Vector2i get_tile_size_in_atlas(Vector2i p_atlas_coords) const;
virtual int get_tiles_count() const override;
virtual Vector2i get_tile_id(int p_index) const override;
+ bool has_room_for_tile(Vector2i p_atlas_coords, Vector2i p_size, int p_animation_columns, Vector2i p_animation_separation, int p_frames_count, Vector2i p_ignored_tile = INVALID_ATLAS_COORDS) const;
+
Vector2i get_tile_at_coords(Vector2i p_atlas_coords) const;
+ // Animation.
+ void set_tile_animation_columns(const Vector2i p_atlas_coords, int p_frame_columns);
+ int get_tile_animation_columns(const Vector2i p_atlas_coords) const;
+ void set_tile_animation_separation(const Vector2i p_atlas_coords, const Vector2i p_separation);
+ Vector2i get_tile_animation_separation(const Vector2i p_atlas_coords) const;
+ void set_tile_animation_speed(const Vector2i p_atlas_coords, real_t p_speed);
+ real_t get_tile_animation_speed(const Vector2i p_atlas_coords) const;
+ void set_tile_animation_frames_count(const Vector2i p_atlas_coords, int p_frames_count);
+ int get_tile_animation_frames_count(const Vector2i p_atlas_coords) const;
+ void set_tile_animation_frame_duration(const Vector2i p_atlas_coords, int p_frame_index, real_t p_duration);
+ real_t get_tile_animation_frame_duration(const Vector2i p_atlas_coords, int p_frame_index) const;
+ real_t get_tile_animation_total_duration(const Vector2i p_atlas_coords) const;
+
// Alternative tiles.
int create_alternative_tile(const Vector2i p_atlas_coords, int p_alternative_id_override = -1);
void remove_alternative_tile(const Vector2i p_atlas_coords, int p_alternative_tile);
@@ -490,7 +566,7 @@ public:
Vector2i get_atlas_grid_size() const;
bool has_tiles_outside_texture();
void clear_tiles_outside_texture();
- Rect2i get_tile_texture_region(Vector2i p_atlas_coords) const;
+ Rect2i get_tile_texture_region(Vector2i p_atlas_coords, int p_frame = 0) const;
Vector2i get_tile_effective_texture_offset(Vector2i p_atlas_coords, int p_alternative_tile) const;
~TileSetAtlasSource();
@@ -528,7 +604,7 @@ public:
int get_alternative_tile_id(const Vector2i p_atlas_coords, int p_index) const override;
bool has_alternative_tile(const Vector2i p_atlas_coords, int p_alternative_tile) const override;
- // Scenes sccessors. Lot are similar to "Alternative tiles".
+ // Scenes accessors. Lot are similar to "Alternative tiles".
int get_scene_tiles_count() { return get_alternative_tiles_count(Vector2i()); }
int get_scene_tile_id(int p_index) { return get_alternative_tile_id(Vector2i(), p_index); };
bool has_scene_tile_id(int p_id) { return has_alternative_tile(Vector2i(), p_id); };
@@ -569,6 +645,8 @@ private:
float one_way_margin = 1.0;
};
+ Vector2 linear_velocity;
+ float angular_velocity;
Vector<PolygonShapeTileData> polygons;
};
Vector<PhysicsLayerTileData> physics;
@@ -597,6 +675,24 @@ public:
// Not exposed.
void set_tile_set(const TileSet *p_tile_set);
void notify_tile_data_properties_should_change();
+ void add_occlusion_layer(int p_index);
+ void move_occlusion_layer(int p_from_index, int p_to_pos);
+ void remove_occlusion_layer(int p_index);
+ void add_physics_layer(int p_index);
+ void move_physics_layer(int p_from_index, int p_to_pos);
+ void remove_physics_layer(int p_index);
+ void add_terrain_set(int p_index);
+ void move_terrain_set(int p_from_index, int p_to_pos);
+ void remove_terrain_set(int p_index);
+ void add_terrain(int p_terrain_set, int p_index);
+ void move_terrain(int p_terrain_set, int p_from_index, int p_to_pos);
+ void remove_terrain(int p_terrain_set, int p_index);
+ void add_navigation_layer(int p_index);
+ void move_navigation_layer(int p_from_index, int p_to_pos);
+ void remove_navigation_layer(int p_index);
+ void add_custom_data_layer(int p_index);
+ void move_custom_data_layer(int p_from_index, int p_to_pos);
+ void remove_custom_data_layer(int p_index);
void reset_state();
void set_allow_transform(bool p_allow_transform);
bool is_allowing_transform() const;
@@ -611,8 +707,8 @@ public:
void set_texture_offset(Vector2i p_texture_offset);
Vector2i get_texture_offset() const;
- void tile_set_material(Ref<ShaderMaterial> p_material);
- Ref<ShaderMaterial> tile_get_material() const;
+ void set_material(Ref<ShaderMaterial> p_material);
+ Ref<ShaderMaterial> get_material() const;
void set_modulate(Color p_modulate);
Color get_modulate() const;
void set_z_index(int p_z_index);
@@ -624,8 +720,12 @@ public:
Ref<OccluderPolygon2D> get_occluder(int p_layer_id) const;
// Physics
- int get_collision_polygons_count(int p_layer_id) const;
+ void set_constant_linear_velocity(int p_layer_id, const Vector2 &p_velocity);
+ Vector2 get_constant_linear_velocity(int p_layer_id) const;
+ void set_constant_angular_velocity(int p_layer_id, real_t p_velocity);
+ real_t get_constant_angular_velocity(int p_layer_id) const;
void set_collision_polygons_count(int p_layer_id, int p_shapes_count);
+ int get_collision_polygons_count(int p_layer_id) const;
void add_collision_polygon(int p_layer_id);
void remove_collision_polygon(int p_layer_id, int p_polygon_index);
void set_collision_polygon_points(int p_layer_id, int p_polygon_index, Vector<Vector2> p_polygon);
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index b00dcca004..e8fe3ff3cd 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -261,54 +261,47 @@ VisualShaderNode::VisualShaderNode() {
/////////////////////////////////////////////////////////
void VisualShaderNodeCustom::update_ports() {
- ERR_FAIL_COND(!get_script_instance());
+ {
+ input_ports.clear();
+ int input_port_count;
+ if (GDVIRTUAL_CALL(_get_input_port_count, input_port_count)) {
+ for (int i = 0; i < input_port_count; i++) {
+ Port port;
+ if (!GDVIRTUAL_CALL(_get_input_port_name, i, port.name)) {
+ port.name = "in" + itos(i);
+ }
+ if (!GDVIRTUAL_CALL(_get_input_port_type, i, port.type)) {
+ port.type = (int)PortType::PORT_TYPE_SCALAR;
+ }
- input_ports.clear();
- if (get_script_instance()->has_method("_get_input_port_count")) {
- int input_port_count = (int)get_script_instance()->call("_get_input_port_count");
- bool has_name = get_script_instance()->has_method("_get_input_port_name");
- bool has_type = get_script_instance()->has_method("_get_input_port_type");
- for (int i = 0; i < input_port_count; i++) {
- Port port;
- if (has_name) {
- port.name = (String)get_script_instance()->call("_get_input_port_name", i);
- } else {
- port.name = "in" + itos(i);
+ input_ports.push_back(port);
}
- if (has_type) {
- port.type = (int)get_script_instance()->call("_get_input_port_type", i);
- } else {
- port.type = (int)PortType::PORT_TYPE_SCALAR;
- }
- input_ports.push_back(port);
}
}
- output_ports.clear();
- if (get_script_instance()->has_method("_get_output_port_count")) {
- int output_port_count = (int)get_script_instance()->call("_get_output_port_count");
- bool has_name = get_script_instance()->has_method("_get_output_port_name");
- bool has_type = get_script_instance()->has_method("_get_output_port_type");
- for (int i = 0; i < output_port_count; i++) {
- Port port;
- if (has_name) {
- port.name = (String)get_script_instance()->call("_get_output_port_name", i);
- } else {
- port.name = "out" + itos(i);
- }
- if (has_type) {
- port.type = (int)get_script_instance()->call("_get_output_port_type", i);
- } else {
- port.type = (int)PortType::PORT_TYPE_SCALAR;
+
+ {
+ output_ports.clear();
+ int output_port_count;
+ if (GDVIRTUAL_CALL(_get_output_port_count, output_port_count)) {
+ for (int i = 0; i < output_port_count; i++) {
+ Port port;
+ if (!GDVIRTUAL_CALL(_get_output_port_name, i, port.name)) {
+ port.name = "out" + itos(i);
+ }
+ if (!GDVIRTUAL_CALL(_get_output_port_type, i, port.type)) {
+ port.type = (int)PortType::PORT_TYPE_SCALAR;
+ }
+
+ output_ports.push_back(port);
}
- output_ports.push_back(port);
}
}
}
String VisualShaderNodeCustom::get_caption() const {
- ERR_FAIL_COND_V(!get_script_instance(), "");
- if (get_script_instance()->has_method("_get_name")) {
- return (String)get_script_instance()->call("_get_name");
+ String ret;
+ if (GDVIRTUAL_CALL(_get_name, ret)) {
+ return ret;
}
return "Unnamed";
}
@@ -342,9 +335,8 @@ String VisualShaderNodeCustom::get_output_port_name(int p_port) const {
}
String VisualShaderNodeCustom::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
- ERR_FAIL_COND_V(!get_script_instance(), "");
- ERR_FAIL_COND_V(!get_script_instance()->has_method("_get_code"), "");
- Array input_vars;
+ ERR_FAIL_COND_V(!GDVIRTUAL_IS_OVERRIDDEN(_get_code), "");
+ Vector<String> input_vars;
for (int i = 0; i < get_input_port_count(); i++) {
input_vars.push_back(p_input_vars[i]);
}
@@ -353,7 +345,8 @@ String VisualShaderNodeCustom::generate_code(Shader::Mode p_mode, VisualShader::
output_vars.push_back(p_output_vars[i]);
}
String code = " {\n";
- String _code = (String)get_script_instance()->call("_get_code", input_vars, output_vars, (int)p_mode, (int)p_type);
+ String _code;
+ GDVIRTUAL_CALL(_get_code, input_vars, output_vars, (int)p_mode, (int)p_type, _code);
bool nend = _code.ends_with("\n");
_code = _code.insert(0, " ");
_code = _code.replace("\n", "\n ");
@@ -369,10 +362,10 @@ String VisualShaderNodeCustom::generate_code(Shader::Mode p_mode, VisualShader::
}
String VisualShaderNodeCustom::generate_global_per_node(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const {
- ERR_FAIL_COND_V(!get_script_instance(), "");
- if (get_script_instance()->has_method("_get_global_code")) {
+ String ret;
+ if (GDVIRTUAL_CALL(_get_global_code, (int)p_mode, ret)) {
String code = "// " + get_caption() + "\n";
- code += (String)get_script_instance()->call("_get_global_code", (int)p_mode);
+ code += ret;
code += "\n";
return code;
}
@@ -416,19 +409,19 @@ void VisualShaderNodeCustom::_set_initialized(bool p_enabled) {
}
void VisualShaderNodeCustom::_bind_methods() {
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_name"));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_description"));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_category"));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_return_icon_type"));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_input_port_count"));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_input_port_type", PropertyInfo(Variant::INT, "port")));
- BIND_VMETHOD(MethodInfo(Variant::STRING_NAME, "_get_input_port_name", PropertyInfo(Variant::INT, "port")));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_output_port_count"));
- BIND_VMETHOD(MethodInfo(Variant::INT, "_get_output_port_type", PropertyInfo(Variant::INT, "port")));
- BIND_VMETHOD(MethodInfo(Variant::STRING_NAME, "_get_output_port_name", PropertyInfo(Variant::INT, "port")));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_code", PropertyInfo(Variant::ARRAY, "input_vars"), PropertyInfo(Variant::ARRAY, "output_vars"), PropertyInfo(Variant::INT, "mode"), PropertyInfo(Variant::INT, "type")));
- BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_global_code", PropertyInfo(Variant::INT, "mode")));
- BIND_VMETHOD(MethodInfo(Variant::BOOL, "_is_highend"));
+ GDVIRTUAL_BIND(_get_name);
+ GDVIRTUAL_BIND(_get_description);
+ GDVIRTUAL_BIND(_get_category);
+ GDVIRTUAL_BIND(_get_return_icon_type);
+ GDVIRTUAL_BIND(_get_input_port_count);
+ GDVIRTUAL_BIND(_get_input_port_type, "port");
+ GDVIRTUAL_BIND(_get_input_port_name, "port");
+ GDVIRTUAL_BIND(_get_output_port_count);
+ GDVIRTUAL_BIND(_get_output_port_type, "port");
+ GDVIRTUAL_BIND(_get_output_port_name, "port");
+ GDVIRTUAL_BIND(_get_code, "input_vars", "output_vars", "mode", "type");
+ GDVIRTUAL_BIND(_get_global_code, "mode");
+ GDVIRTUAL_BIND(_is_highend);
ClassDB::bind_method(D_METHOD("_set_initialized", "enabled"), &VisualShaderNodeCustom::_set_initialized);
ClassDB::bind_method(D_METHOD("_is_initialized"), &VisualShaderNodeCustom::_is_initialized);
diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h
index 31651318ae..b3efac02aa 100644
--- a/scene/resources/visual_shader.h
+++ b/scene/resources/visual_shader.h
@@ -314,6 +314,20 @@ protected:
virtual void remove_input_port_default_value(int p_port) override;
virtual void clear_default_input_values() override;
+ GDVIRTUAL0RC(String, _get_name)
+ GDVIRTUAL0RC(String, _get_description)
+ GDVIRTUAL0RC(String, _get_category)
+ GDVIRTUAL0RC(int, _get_return_icon_type)
+ GDVIRTUAL0RC(int, _get_input_port_count)
+ GDVIRTUAL1RC(int, _get_input_port_type, int)
+ GDVIRTUAL1RC(String, _get_input_port_name, int)
+ GDVIRTUAL0RC(int, _get_output_port_count)
+ GDVIRTUAL1RC(int, _get_output_port_type, int)
+ GDVIRTUAL1RC(String, _get_output_port_name, int)
+ GDVIRTUAL4RC(String, _get_code, Vector<String>, TypedArray<String>, int, int)
+ GDVIRTUAL1RC(String, _get_global_code, int)
+ GDVIRTUAL0RC(bool, _is_highend)
+
protected:
void _set_input_port_default_value(int p_port, const Variant &p_value);
diff --git a/scene/resources/world_margin_shape_2d.cpp b/scene/resources/world_boundary_shape_2d.cpp
index 3b43681528..39af92793f 100644
--- a/scene/resources/world_margin_shape_2d.cpp
+++ b/scene/resources/world_boundary_shape_2d.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* world_margin_shape_2d.cpp */
+/* world_boundary_shape_2d.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,13 +28,13 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "world_margin_shape_2d.h"
+#include "world_boundary_shape_2d.h"
#include "core/math/geometry_2d.h"
#include "servers/physics_server_2d.h"
#include "servers/rendering_server.h"
-bool WorldMarginShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
+bool WorldBoundaryShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
Vector2 point = get_distance() * get_normal();
Vector2 l[2][2] = { { point - get_normal().orthogonal() * 100, point + get_normal().orthogonal() * 100 }, { point, point + get_normal() * 30 } };
@@ -48,7 +48,7 @@ bool WorldMarginShape2D::_edit_is_selected_on_click(const Point2 &p_point, doubl
return false;
}
-void WorldMarginShape2D::_update_shape() {
+void WorldBoundaryShape2D::_update_shape() {
Array arr;
arr.push_back(normal);
arr.push_back(distance);
@@ -56,25 +56,25 @@ void WorldMarginShape2D::_update_shape() {
emit_changed();
}
-void WorldMarginShape2D::set_normal(const Vector2 &p_normal) {
+void WorldBoundaryShape2D::set_normal(const Vector2 &p_normal) {
normal = p_normal;
_update_shape();
}
-void WorldMarginShape2D::set_distance(real_t p_distance) {
+void WorldBoundaryShape2D::set_distance(real_t p_distance) {
distance = p_distance;
_update_shape();
}
-Vector2 WorldMarginShape2D::get_normal() const {
+Vector2 WorldBoundaryShape2D::get_normal() const {
return normal;
}
-real_t WorldMarginShape2D::get_distance() const {
+real_t WorldBoundaryShape2D::get_distance() const {
return distance;
}
-void WorldMarginShape2D::draw(const RID &p_to_rid, const Color &p_color) {
+void WorldBoundaryShape2D::draw(const RID &p_to_rid, const Color &p_color) {
Vector2 point = get_distance() * get_normal();
Vector2 l1[2] = { point - get_normal().orthogonal() * 100, point + get_normal().orthogonal() * 100 };
@@ -83,7 +83,7 @@ void WorldMarginShape2D::draw(const RID &p_to_rid, const Color &p_color) {
RS::get_singleton()->canvas_item_add_line(p_to_rid, l2[0], l2[1], p_color, 3);
}
-Rect2 WorldMarginShape2D::get_rect() const {
+Rect2 WorldBoundaryShape2D::get_rect() const {
Vector2 point = get_distance() * get_normal();
Vector2 l1[2] = { point - get_normal().orthogonal() * 100, point + get_normal().orthogonal() * 100 };
@@ -96,22 +96,22 @@ Rect2 WorldMarginShape2D::get_rect() const {
return rect;
}
-real_t WorldMarginShape2D::get_enclosing_radius() const {
+real_t WorldBoundaryShape2D::get_enclosing_radius() const {
return distance;
}
-void WorldMarginShape2D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_normal", "normal"), &WorldMarginShape2D::set_normal);
- ClassDB::bind_method(D_METHOD("get_normal"), &WorldMarginShape2D::get_normal);
+void WorldBoundaryShape2D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_normal", "normal"), &WorldBoundaryShape2D::set_normal);
+ ClassDB::bind_method(D_METHOD("get_normal"), &WorldBoundaryShape2D::get_normal);
- ClassDB::bind_method(D_METHOD("set_distance", "distance"), &WorldMarginShape2D::set_distance);
- ClassDB::bind_method(D_METHOD("get_distance"), &WorldMarginShape2D::get_distance);
+ ClassDB::bind_method(D_METHOD("set_distance", "distance"), &WorldBoundaryShape2D::set_distance);
+ ClassDB::bind_method(D_METHOD("get_distance"), &WorldBoundaryShape2D::get_distance);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "normal"), "set_normal", "get_normal");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "distance"), "set_distance", "get_distance");
}
-WorldMarginShape2D::WorldMarginShape2D() :
- Shape2D(PhysicsServer2D::get_singleton()->world_margin_shape_create()) {
+WorldBoundaryShape2D::WorldBoundaryShape2D() :
+ Shape2D(PhysicsServer2D::get_singleton()->world_boundary_shape_create()) {
_update_shape();
}
diff --git a/scene/resources/world_margin_shape_2d.h b/scene/resources/world_boundary_shape_2d.h
index 3c1d593ffe..4cc60f5985 100644
--- a/scene/resources/world_margin_shape_2d.h
+++ b/scene/resources/world_boundary_shape_2d.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* world_margin_shape_2d.h */
+/* world_boundary_shape_2d.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,15 +28,15 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef WORLD_MARGIN_SHAPE_2D_H
-#define WORLD_MARGIN_SHAPE_2D_H
+#ifndef WORLD_BOUNDARY_SHAPE_2D_H
+#define WORLD_BOUNDARY_SHAPE_2D_H
#include "scene/resources/shape_2d.h"
-class WorldMarginShape2D : public Shape2D {
- GDCLASS(WorldMarginShape2D, Shape2D);
+class WorldBoundaryShape2D : public Shape2D {
+ GDCLASS(WorldBoundaryShape2D, Shape2D);
- // WorldMarginShape2D is often used for one-way platforms, where the normal pointing up makes sense.
+ // WorldBoundaryShape2D is often used for one-way platforms, where the normal pointing up makes sense.
Vector2 normal = Vector2(0, -1);
real_t distance = 0.0;
@@ -58,7 +58,7 @@ public:
virtual Rect2 get_rect() const override;
virtual real_t get_enclosing_radius() const override;
- WorldMarginShape2D();
+ WorldBoundaryShape2D();
};
-#endif // WORLD_MARGIN_SHAPE_2D_H
+#endif // WORLD_BOUNDARY_SHAPE_2D_H
diff --git a/scene/resources/world_margin_shape_3d.cpp b/scene/resources/world_boundary_shape_3d.cpp
index 28d50e1921..8cde537164 100644
--- a/scene/resources/world_margin_shape_3d.cpp
+++ b/scene/resources/world_boundary_shape_3d.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* world_margin_shape_3d.cpp */
+/* world_boundary_shape_3d.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,11 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "world_margin_shape_3d.h"
+#include "world_boundary_shape_3d.h"
#include "servers/physics_server_3d.h"
-Vector<Vector3> WorldMarginShape3D::get_debug_mesh_lines() const {
+Vector<Vector3> WorldBoundaryShape3D::get_debug_mesh_lines() const {
Plane p = get_plane();
Vector<Vector3> points;
@@ -60,29 +60,29 @@ Vector<Vector3> WorldMarginShape3D::get_debug_mesh_lines() const {
return points;
}
-void WorldMarginShape3D::_update_shape() {
+void WorldBoundaryShape3D::_update_shape() {
PhysicsServer3D::get_singleton()->shape_set_data(get_shape(), plane);
Shape3D::_update_shape();
}
-void WorldMarginShape3D::set_plane(Plane p_plane) {
+void WorldBoundaryShape3D::set_plane(const Plane &p_plane) {
plane = p_plane;
_update_shape();
notify_change_to_owners();
}
-Plane WorldMarginShape3D::get_plane() const {
+const Plane &WorldBoundaryShape3D::get_plane() const {
return plane;
}
-void WorldMarginShape3D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_plane", "plane"), &WorldMarginShape3D::set_plane);
- ClassDB::bind_method(D_METHOD("get_plane"), &WorldMarginShape3D::get_plane);
+void WorldBoundaryShape3D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_plane", "plane"), &WorldBoundaryShape3D::set_plane);
+ ClassDB::bind_method(D_METHOD("get_plane"), &WorldBoundaryShape3D::get_plane);
ADD_PROPERTY(PropertyInfo(Variant::PLANE, "plane"), "set_plane", "get_plane");
}
-WorldMarginShape3D::WorldMarginShape3D() :
- Shape3D(PhysicsServer3D::get_singleton()->shape_create(PhysicsServer3D::SHAPE_PLANE)) {
+WorldBoundaryShape3D::WorldBoundaryShape3D() :
+ Shape3D(PhysicsServer3D::get_singleton()->shape_create(PhysicsServer3D::SHAPE_WORLD_BOUNDARY)) {
set_plane(Plane(0, 1, 0, 0));
}
diff --git a/scene/resources/world_margin_shape_3d.h b/scene/resources/world_boundary_shape_3d.h
index 00417c4408..853f555ebc 100644
--- a/scene/resources/world_margin_shape_3d.h
+++ b/scene/resources/world_boundary_shape_3d.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* world_margin_shape_3d.h */
+/* world_boundary_shape_3d.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,13 +28,13 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef WORLD_MARGIN_SHAPE_3D_H
-#define WORLD_MARGIN_SHAPE_3D_H
+#ifndef WORLD_BOUNDARY_SHAPE_3D_H
+#define WORLD_BOUNDARY_SHAPE_3D_H
#include "scene/resources/shape_3d.h"
-class WorldMarginShape3D : public Shape3D {
- GDCLASS(WorldMarginShape3D, Shape3D);
+class WorldBoundaryShape3D : public Shape3D {
+ GDCLASS(WorldBoundaryShape3D, Shape3D);
Plane plane;
protected:
@@ -42,8 +42,8 @@ protected:
virtual void _update_shape() override;
public:
- void set_plane(Plane p_plane);
- Plane get_plane() const;
+ void set_plane(const Plane &p_plane);
+ const Plane &get_plane() const;
virtual Vector<Vector3> get_debug_mesh_lines() const override;
virtual real_t get_enclosing_radius() const override {
@@ -51,6 +51,6 @@ public:
return 0;
}
- WorldMarginShape3D();
+ WorldBoundaryShape3D();
};
-#endif // WORLD_MARGIN_SHAPE_H
+#endif // WORLD_BOUNDARY_SHAPE_H
diff --git a/scene/scene_string_names.cpp b/scene/scene_string_names.cpp
index 5d89d295c2..b283749ffa 100644
--- a/scene/scene_string_names.cpp
+++ b/scene/scene_string_names.cpp
@@ -91,9 +91,6 @@ SceneStringNames::SceneStringNames() {
update = StaticCString::create("update");
updated = StaticCString::create("updated");
- _get_gizmo_geometry = StaticCString::create("_get_gizmo_geometry");
- _can_gizmo_scale = StaticCString::create("_can_gizmo_scale");
-
_physics_process = StaticCString::create("_physics_process");
_process = StaticCString::create("_process");
diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h
index 01f427ecd1..2923351eab 100644
--- a/scene/scene_string_names.h
+++ b/scene/scene_string_names.h
@@ -111,9 +111,6 @@ public:
StringName _body_inout;
StringName _area_inout;
- StringName _get_gizmo_geometry;
- StringName _can_gizmo_scale;
-
StringName _physics_process;
StringName _process;
StringName _enter_world;
diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp
index f3fa857682..c098a97906 100644
--- a/servers/audio/audio_stream.cpp
+++ b/servers/audio/audio_stream.cpp
@@ -33,6 +33,65 @@
#include "core/config/project_settings.h"
#include "core/os/os.h"
+void AudioStreamPlayback::start(float p_from_pos) {
+ if (GDVIRTUAL_CALL(_start, p_from_pos)) {
+ return;
+ }
+ ERR_FAIL_MSG("AudioStreamPlayback::start unimplemented!");
+}
+void AudioStreamPlayback::stop() {
+ if (GDVIRTUAL_CALL(_stop)) {
+ return;
+ }
+ ERR_FAIL_MSG("AudioStreamPlayback::stop unimplemented!");
+}
+bool AudioStreamPlayback::is_playing() const {
+ bool ret;
+ if (GDVIRTUAL_CALL(_is_playing, ret)) {
+ return ret;
+ }
+ ERR_FAIL_V_MSG(false, "AudioStreamPlayback::is_playing unimplemented!");
+}
+
+int AudioStreamPlayback::get_loop_count() const {
+ int ret;
+ if (GDVIRTUAL_CALL(_get_loop_count, ret)) {
+ return ret;
+ }
+ return 0;
+}
+
+float AudioStreamPlayback::get_playback_position() const {
+ float ret;
+ if (GDVIRTUAL_CALL(_get_playback_position, ret)) {
+ return ret;
+ }
+ ERR_FAIL_V_MSG(0, "AudioStreamPlayback::get_playback_position unimplemented!");
+}
+void AudioStreamPlayback::seek(float p_time) {
+ if (GDVIRTUAL_CALL(_seek, p_time)) {
+ return;
+ }
+}
+
+int AudioStreamPlayback::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
+ int ret;
+ if (GDVIRTUAL_CALL(_mix, p_buffer, p_rate_scale, p_frames, ret)) {
+ return ret;
+ }
+ WARN_PRINT_ONCE("AudioStreamPlayback::mix unimplemented!");
+ return 0;
+}
+
+void AudioStreamPlayback::_bind_methods() {
+ GDVIRTUAL_BIND(_start, "from_pos")
+ GDVIRTUAL_BIND(_stop)
+ GDVIRTUAL_BIND(_is_playing)
+ GDVIRTUAL_BIND(_get_loop_count)
+ GDVIRTUAL_BIND(_get_playback_position)
+ GDVIRTUAL_BIND(_seek, "position")
+ GDVIRTUAL_BIND(_mix, "buffer", "rate_scale", "frames");
+}
//////////////////////////////
void AudioStreamPlaybackResampled::_begin_resample() {
@@ -46,12 +105,14 @@ void AudioStreamPlaybackResampled::_begin_resample() {
mix_offset = 0;
}
-void AudioStreamPlaybackResampled::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
+int AudioStreamPlaybackResampled::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
float target_rate = AudioServer::get_singleton()->get_mix_rate();
float playback_speed_scale = AudioServer::get_singleton()->get_playback_speed_scale();
uint64_t mix_increment = uint64_t(((get_stream_sampling_rate() * p_rate_scale * playback_speed_scale) / double(target_rate)) * double(FP_LEN));
+ int mixed_frames_total = p_frames;
+
for (int i = 0; i < p_frames; i++) {
uint32_t idx = CUBIC_INTERP_HISTORY + uint32_t(mix_offset >> FP_BITS);
//standard cubic interpolation (great quality/performance ratio)
@@ -62,6 +123,11 @@ void AudioStreamPlaybackResampled::mix(AudioFrame *p_buffer, float p_rate_scale,
AudioFrame y2 = internal_buffer[idx - 1];
AudioFrame y3 = internal_buffer[idx - 0];
+ if (idx <= internal_buffer_end && idx >= internal_buffer_end && mixed_frames_total == p_frames) {
+ // The internal buffer ends somewhere in this range, and we haven't yet recorded the number of good frames we have.
+ mixed_frames_total = i;
+ }
+
float mu2 = mu * mu;
AudioFrame a0 = 3 * y1 - 3 * y2 + y3 - y0;
AudioFrame a1 = 2 * y0 - 5 * y1 + 4 * y2 - y3;
@@ -78,7 +144,14 @@ void AudioStreamPlaybackResampled::mix(AudioFrame *p_buffer, float p_rate_scale,
internal_buffer[2] = internal_buffer[INTERNAL_BUFFER_LEN + 2];
internal_buffer[3] = internal_buffer[INTERNAL_BUFFER_LEN + 3];
if (is_playing()) {
- _mix_internal(internal_buffer + 4, INTERNAL_BUFFER_LEN);
+ int mixed_frames = _mix_internal(internal_buffer + 4, INTERNAL_BUFFER_LEN);
+ if (mixed_frames != INTERNAL_BUFFER_LEN) {
+ // internal_buffer[mixed_frames] is the first frame of silence.
+ internal_buffer_end = mixed_frames;
+ } else {
+ // The internal buffer does not contain the first frame of silence.
+ internal_buffer_end = -1;
+ }
} else {
//fill with silence, not playing
for (int j = 0; j < INTERNAL_BUFFER_LEN; ++j) {
@@ -88,12 +161,49 @@ void AudioStreamPlaybackResampled::mix(AudioFrame *p_buffer, float p_rate_scale,
mix_offset -= (INTERNAL_BUFFER_LEN << FP_BITS);
}
}
+ return mixed_frames_total;
}
////////////////////////////////
+Ref<AudioStreamPlayback> AudioStream::instance_playback() {
+ Ref<AudioStreamPlayback> ret;
+ if (GDVIRTUAL_CALL(_instance_playback, ret)) {
+ return ret;
+ }
+ ERR_FAIL_V_MSG(Ref<AudioStreamPlayback>(), "Method must be implemented!");
+}
+String AudioStream::get_stream_name() const {
+ String ret;
+ if (GDVIRTUAL_CALL(_get_stream_name, ret)) {
+ return ret;
+ }
+ return String();
+}
+
+float AudioStream::get_length() const {
+ float ret;
+ if (GDVIRTUAL_CALL(_get_length, ret)) {
+ return ret;
+ }
+ return 0;
+}
+
+bool AudioStream::is_monophonic() const {
+ bool ret;
+ if (GDVIRTUAL_CALL(_is_monophonic, ret)) {
+ return ret;
+ }
+ return true;
+}
+
void AudioStream::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_length"), &AudioStream::get_length);
+ ClassDB::bind_method(D_METHOD("is_monophonic"), &AudioStream::is_monophonic);
+ GDVIRTUAL_BIND(_instance_playback);
+ GDVIRTUAL_BIND(_get_stream_name);
+ GDVIRTUAL_BIND(_get_length);
+ GDVIRTUAL_BIND(_is_monophonic);
}
////////////////////////////////
@@ -121,13 +231,17 @@ float AudioStreamMicrophone::get_length() const {
return 0;
}
+bool AudioStreamMicrophone::is_monophonic() const {
+ return true;
+}
+
void AudioStreamMicrophone::_bind_methods() {
}
AudioStreamMicrophone::AudioStreamMicrophone() {
}
-void AudioStreamPlaybackMicrophone::_mix_internal(AudioFrame *p_buffer, int p_frames) {
+int AudioStreamPlaybackMicrophone::_mix_internal(AudioFrame *p_buffer, int p_frames) {
AudioDriver::get_singleton()->lock();
Vector<int32_t> buf = AudioDriver::get_singleton()->get_input_buffer();
@@ -138,6 +252,8 @@ void AudioStreamPlaybackMicrophone::_mix_internal(AudioFrame *p_buffer, int p_fr
unsigned int input_position = AudioDriver::get_singleton()->get_input_position();
#endif
+ int mixed_frames = p_frames;
+
if (playback_delay > input_size) {
for (int i = 0; i < p_frames; i++) {
p_buffer[i] = AudioFrame(0.0f, 0.0f);
@@ -157,6 +273,9 @@ void AudioStreamPlaybackMicrophone::_mix_internal(AudioFrame *p_buffer, int p_fr
p_buffer[i] = AudioFrame(l, r);
} else {
+ if (mixed_frames == p_frames) {
+ mixed_frames = i;
+ }
p_buffer[i] = AudioFrame(0.0f, 0.0f);
}
}
@@ -169,10 +288,12 @@ void AudioStreamPlaybackMicrophone::_mix_internal(AudioFrame *p_buffer, int p_fr
#endif
AudioDriver::get_singleton()->unlock();
+
+ return mixed_frames;
}
-void AudioStreamPlaybackMicrophone::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
- AudioStreamPlaybackResampled::mix(p_buffer, p_rate_scale, p_frames);
+int AudioStreamPlaybackMicrophone::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
+ return AudioStreamPlaybackResampled::mix(p_buffer, p_rate_scale, p_frames);
}
float AudioStreamPlaybackMicrophone::get_stream_sampling_rate() {
@@ -281,6 +402,14 @@ float AudioStreamRandomPitch::get_length() const {
return 0;
}
+bool AudioStreamRandomPitch::is_monophonic() const {
+ if (audio_stream.is_valid()) {
+ return audio_stream->is_monophonic();
+ }
+
+ return true; // It doesn't really matter what we return here, but no sense instancing a many playbacks of a null stream.
+}
+
void AudioStreamRandomPitch::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_audio_stream", "stream"), &AudioStreamRandomPitch::set_audio_stream);
ClassDB::bind_method(D_METHOD("get_audio_stream"), &AudioStreamRandomPitch::get_audio_stream);
@@ -345,16 +474,18 @@ void AudioStreamPlaybackRandomPitch::seek(float p_time) {
}
}
-void AudioStreamPlaybackRandomPitch::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
+int AudioStreamPlaybackRandomPitch::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
if (playing.is_valid()) {
- playing->mix(p_buffer, p_rate_scale * pitch_scale, p_frames);
+ return playing->mix(p_buffer, p_rate_scale * pitch_scale, p_frames);
} else {
for (int i = 0; i < p_frames; i++) {
p_buffer[i] = AudioFrame(0, 0);
}
+ return p_frames;
}
}
AudioStreamPlaybackRandomPitch::~AudioStreamPlaybackRandomPitch() {
random_pitch->playbacks.erase(this);
}
+/////////////////////////////////////////////
diff --git a/servers/audio/audio_stream.h b/servers/audio/audio_stream.h
index 0d426f99b2..12d4343f5c 100644
--- a/servers/audio/audio_stream.h
+++ b/servers/audio/audio_stream.h
@@ -36,20 +36,33 @@
#include "servers/audio/audio_filter_sw.h"
#include "servers/audio_server.h"
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
+#include "core/variant/native_ptr.h"
+
class AudioStreamPlayback : public RefCounted {
GDCLASS(AudioStreamPlayback, RefCounted);
+protected:
+ static void _bind_methods();
+ GDVIRTUAL1(_start, float)
+ GDVIRTUAL0(_stop)
+ GDVIRTUAL0RC(bool, _is_playing)
+ GDVIRTUAL0RC(int, _get_loop_count)
+ GDVIRTUAL0RC(float, _get_playback_position)
+ GDVIRTUAL1(_seek, float)
+ GDVIRTUAL3R(int, _mix, GDNativePtr<AudioFrame>, float, int)
public:
- virtual void start(float p_from_pos = 0.0) = 0;
- virtual void stop() = 0;
- virtual bool is_playing() const = 0;
+ virtual void start(float p_from_pos = 0.0);
+ virtual void stop();
+ virtual bool is_playing() const;
- virtual int get_loop_count() const = 0; //times it looped
+ virtual int get_loop_count() const; //times it looped
- virtual float get_playback_position() const = 0;
- virtual void seek(float p_time) = 0;
+ virtual float get_playback_position() const;
+ virtual void seek(float p_time);
- virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) = 0;
+ virtual int mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames);
};
class AudioStreamPlaybackResampled : public AudioStreamPlayback {
@@ -64,15 +77,17 @@ class AudioStreamPlaybackResampled : public AudioStreamPlayback {
};
AudioFrame internal_buffer[INTERNAL_BUFFER_LEN + CUBIC_INTERP_HISTORY];
+ unsigned int internal_buffer_end = -1;
uint64_t mix_offset;
protected:
void _begin_resample();
- virtual void _mix_internal(AudioFrame *p_buffer, int p_frames) = 0;
+ // Returns the number of frames that were mixed.
+ virtual int _mix_internal(AudioFrame *p_buffer, int p_frames) = 0;
virtual float get_stream_sampling_rate() = 0;
public:
- virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) override;
+ virtual int mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) override;
AudioStreamPlaybackResampled() { mix_offset = 0; }
};
@@ -84,11 +99,17 @@ class AudioStream : public Resource {
protected:
static void _bind_methods();
+ GDVIRTUAL0RC(Ref<AudioStreamPlayback>, _instance_playback)
+ GDVIRTUAL0RC(String, _get_stream_name)
+ GDVIRTUAL0RC(float, _get_length)
+ GDVIRTUAL0RC(bool, _is_monophonic)
+
public:
- virtual Ref<AudioStreamPlayback> instance_playback() = 0;
- virtual String get_stream_name() const = 0;
+ virtual Ref<AudioStreamPlayback> instance_playback();
+ virtual String get_stream_name() const;
- virtual float get_length() const = 0; //if supported, otherwise return 0
+ virtual float get_length() const;
+ virtual bool is_monophonic() const;
};
// Microphone
@@ -110,6 +131,8 @@ public:
virtual float get_length() const override; //if supported, otherwise return 0
+ virtual bool is_monophonic() const override;
+
AudioStreamMicrophone();
};
@@ -123,11 +146,11 @@ class AudioStreamPlaybackMicrophone : public AudioStreamPlaybackResampled {
Ref<AudioStreamMicrophone> microphone;
protected:
- virtual void _mix_internal(AudioFrame *p_buffer, int p_frames) override;
+ virtual int _mix_internal(AudioFrame *p_buffer, int p_frames) override;
virtual float get_stream_sampling_rate() override;
public:
- virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) override;
+ virtual int mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) override;
virtual void start(float p_from_pos = 0.0) override;
virtual void stop() override;
@@ -168,6 +191,7 @@ public:
virtual String get_stream_name() const override;
virtual float get_length() const override; //if supported, otherwise return 0
+ virtual bool is_monophonic() const override;
AudioStreamRandomPitch();
};
@@ -191,7 +215,7 @@ public:
virtual float get_playback_position() const override;
virtual void seek(float p_time) override;
- virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) override;
+ virtual int mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) override;
~AudioStreamPlaybackRandomPitch();
};
diff --git a/servers/audio/effects/audio_effect_capture.h b/servers/audio/effects/audio_effect_capture.h
index 7f50fc4965..bb1d03be8c 100644
--- a/servers/audio/effects/audio_effect_capture.h
+++ b/servers/audio/effects/audio_effect_capture.h
@@ -34,6 +34,7 @@
#include "core/config/engine.h"
#include "core/math/audio_frame.h"
#include "core/object/ref_counted.h"
+#include "core/templates/ring_buffer.h"
#include "core/templates/vector.h"
#include "servers/audio/audio_effect.h"
#include "servers/audio_server.h"
diff --git a/servers/audio/effects/audio_effect_pitch_shift.cpp b/servers/audio/effects/audio_effect_pitch_shift.cpp
index bfbaeee3f3..d6c396e0a5 100644
--- a/servers/audio/effects/audio_effect_pitch_shift.cpp
+++ b/servers/audio/effects/audio_effect_pitch_shift.cpp
@@ -40,7 +40,7 @@
*
* NAME: smbPitchShift.cpp
* VERSION: 1.2
-* HOME URL: http://blogs.zynaptiq.com/bernsee
+* HOME URL: https://blogs.zynaptiq.com/bernsee
* KNOWN BUGS: none
*
* SYNOPSIS: Routine for doing pitch shifting while maintaining
diff --git a/servers/audio/effects/audio_stream_generator.cpp b/servers/audio/effects/audio_stream_generator.cpp
index bced2997ce..447acf53a4 100644
--- a/servers/audio/effects/audio_stream_generator.cpp
+++ b/servers/audio/effects/audio_stream_generator.cpp
@@ -64,6 +64,10 @@ float AudioStreamGenerator::get_length() const {
return 0;
}
+bool AudioStreamGenerator::is_monophonic() const {
+ return true;
+}
+
void AudioStreamGenerator::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_mix_rate", "hz"), &AudioStreamGenerator::set_mix_rate);
ClassDB::bind_method(D_METHOD("get_mix_rate"), &AudioStreamGenerator::get_mix_rate);
@@ -138,7 +142,7 @@ void AudioStreamGeneratorPlayback::clear_buffer() {
mixed = 0;
}
-void AudioStreamGeneratorPlayback::_mix_internal(AudioFrame *p_buffer, int p_frames) {
+int AudioStreamGeneratorPlayback::_mix_internal(AudioFrame *p_buffer, int p_frames) {
int read_amount = buffer.data_left();
if (p_frames < read_amount) {
read_amount = p_frames;
@@ -156,6 +160,7 @@ void AudioStreamGeneratorPlayback::_mix_internal(AudioFrame *p_buffer, int p_fra
}
mixed += p_frames / generator->get_mix_rate();
+ return read_amount < p_frames ? read_amount : p_frames;
}
float AudioStreamGeneratorPlayback::get_stream_sampling_rate() {
diff --git a/servers/audio/effects/audio_stream_generator.h b/servers/audio/effects/audio_stream_generator.h
index 5d46771f4d..918589f6d0 100644
--- a/servers/audio/effects/audio_stream_generator.h
+++ b/servers/audio/effects/audio_stream_generator.h
@@ -54,6 +54,7 @@ public:
virtual String get_stream_name() const override;
virtual float get_length() const override;
+ virtual bool is_monophonic() const override;
AudioStreamGenerator();
};
@@ -67,7 +68,7 @@ class AudioStreamGeneratorPlayback : public AudioStreamPlaybackResampled {
AudioStreamGenerator *generator;
protected:
- virtual void _mix_internal(AudioFrame *p_buffer, int p_frames) override;
+ virtual int _mix_internal(AudioFrame *p_buffer, int p_frames) override;
virtual float get_stream_sampling_rate() override;
static void _bind_methods();
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index 4c54188cb2..ac1569c15d 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -32,13 +32,19 @@
#include "core/config/project_settings.h"
#include "core/debugger/engine_debugger.h"
+#include "core/error/error_macros.h"
#include "core/io/file_access.h"
#include "core/io/resource_loader.h"
+#include "core/math/audio_frame.h"
#include "core/os/os.h"
+#include "core/string/string_name.h"
+#include "core/templates/pair.h"
#include "scene/resources/audio_stream_sample.h"
#include "servers/audio/audio_driver_dummy.h"
#include "servers/audio/effects/audio_effect_compressor.h"
+#include <cstring>
+
#ifdef TOOLS_ENABLED
#define MARK_EDITED set_edited(true);
#else
@@ -190,6 +196,7 @@ int AudioDriverManager::get_driver_count() {
void AudioDriverManager::initialize(int p_driver) {
GLOBAL_DEF_RST("audio/driver/enable_input", false);
GLOBAL_DEF_RST("audio/driver/mix_rate", DEFAULT_MIX_RATE);
+ GLOBAL_DEF_RST("audio/driver/mix_rate.web", 0); // Safer default output_latency for web (use browser default).
GLOBAL_DEF_RST("audio/driver/output_latency", DEFAULT_OUTPUT_LATENCY);
GLOBAL_DEF_RST("audio/driver/output_latency.web", 50); // Safer default output_latency for web.
@@ -234,6 +241,7 @@ AudioDriver *AudioDriverManager::get_driver(int p_driver) {
//////////////////////////////////////////////
void AudioServer::_driver_process(int p_frames, int32_t *p_buffer) {
+ mix_count++;
int todo = p_frames;
#ifdef DEBUG_ENABLED
@@ -331,10 +339,144 @@ void AudioServer::_mix_step() {
bus->soloed = false;
}
}
+ for (CallbackItem *ci : mix_callback_list) {
+ ci->callback(ci->userdata);
+ }
+
+ for (AudioStreamPlaybackListNode *playback : playback_list) {
+ // Paused streams are no-ops. Don't even mix audio from the stream playback.
+ if (playback->state.load() == AudioStreamPlaybackListNode::PAUSED) {
+ continue;
+ }
+
+ bool fading_out = playback->state.load() == AudioStreamPlaybackListNode::FADE_OUT_TO_DELETION || playback->state.load() == AudioStreamPlaybackListNode::FADE_OUT_TO_PAUSE;
- //make callbacks for mixing the audio
- for (Set<CallbackItem>::Element *E = callbacks.front(); E; E = E->next()) {
- E->get().callback(E->get().userdata);
+ AudioFrame *buf = mix_buffer.ptrw();
+
+ // Copy the lookeahead buffer into the mix buffer.
+ for (int i = 0; i < LOOKAHEAD_BUFFER_SIZE; i++) {
+ buf[i] = playback->lookahead[i];
+ }
+
+ // Mix the audio stream
+ unsigned int mixed_frames = playback->stream_playback->mix(&buf[LOOKAHEAD_BUFFER_SIZE], playback->pitch_scale.get(), buffer_size);
+
+ if (mixed_frames != buffer_size) {
+ // We know we have at least the size of our lookahead buffer for fade-out purposes.
+
+ float fadeout_base = 0.94;
+ float fadeout_coefficient = 1;
+ static_assert(LOOKAHEAD_BUFFER_SIZE == 64, "Update fadeout_base and comment here if you change LOOKAHEAD_BUFFER_SIZE.");
+ // 0.94 ^ 64 = 0.01906. There might still be a pop but it'll be way better than if we didn't do this.
+ for (unsigned int idx = mixed_frames; idx < buffer_size; idx++) {
+ fadeout_coefficient *= fadeout_base;
+ buf[idx] *= fadeout_coefficient;
+ }
+ AudioStreamPlaybackListNode::PlaybackState new_state;
+ new_state = AudioStreamPlaybackListNode::AWAITING_DELETION;
+ playback->state.store(new_state);
+ } else {
+ // Move the last little bit of what we just mixed into our lookahead buffer.
+ for (int i = 0; i < LOOKAHEAD_BUFFER_SIZE; i++) {
+ playback->lookahead[i] = buf[buffer_size + i];
+ }
+ }
+
+ AudioStreamPlaybackBusDetails *ptr = playback->bus_details.load();
+ ERR_FAIL_COND(ptr == nullptr);
+ // By putting null into the bus details pointers, we're taking ownership of their memory for the duration of this mix.
+ AudioStreamPlaybackBusDetails bus_details = *ptr;
+
+ // Mix to any active buses.
+ for (int idx = 0; idx < MAX_BUSES_PER_PLAYBACK; idx++) {
+ if (!bus_details.bus_active[idx]) {
+ continue;
+ }
+ int bus_idx = thread_find_bus_index(bus_details.bus[idx]);
+
+ int prev_bus_idx = -1;
+ for (int search_idx = 0; search_idx < MAX_BUSES_PER_PLAYBACK; search_idx++) {
+ if (!playback->prev_bus_details->bus_active[search_idx]) {
+ continue;
+ }
+ if (playback->prev_bus_details->bus[search_idx].hash() == bus_details.bus[idx].hash()) {
+ prev_bus_idx = search_idx;
+ }
+ }
+
+ for (int channel_idx = 0; channel_idx < channel_count; channel_idx++) {
+ AudioFrame *channel_buf = thread_get_channel_mix_buffer(bus_idx, channel_idx);
+ if (fading_out) {
+ bus_details.volume[idx][channel_idx] = AudioFrame(0, 0);
+ }
+ AudioFrame channel_vol = bus_details.volume[idx][channel_idx];
+
+ AudioFrame prev_channel_vol = AudioFrame(0, 0);
+ if (prev_bus_idx != -1) {
+ prev_channel_vol = playback->prev_bus_details->volume[prev_bus_idx][channel_idx];
+ }
+ _mix_step_for_channel(channel_buf, buf, prev_channel_vol, channel_vol, playback->attenuation_filter_cutoff_hz.get(), playback->highshelf_gain.get(), &playback->filter_process[channel_idx * 2], &playback->filter_process[channel_idx * 2 + 1]);
+ }
+ }
+
+ // Now go through and fade-out any buses that were being played to previously that we missed by going through current data.
+ for (int idx = 0; idx < MAX_BUSES_PER_PLAYBACK; idx++) {
+ if (!playback->prev_bus_details->bus_active[idx]) {
+ continue;
+ }
+ int bus_idx = thread_find_bus_index(playback->prev_bus_details->bus[idx]);
+
+ int current_bus_idx = -1;
+ for (int search_idx = 0; search_idx < MAX_BUSES_PER_PLAYBACK; search_idx++) {
+ if (bus_details.bus[search_idx] == playback->prev_bus_details->bus[idx]) {
+ current_bus_idx = search_idx;
+ }
+ }
+ if (current_bus_idx != -1) {
+ // If we found a corresponding bus in the current bus assignments, we've already mixed to this bus.
+ continue;
+ }
+
+ for (int channel_idx = 0; channel_idx < channel_count; channel_idx++) {
+ AudioFrame *channel_buf = thread_get_channel_mix_buffer(bus_idx, channel_idx);
+ AudioFrame prev_channel_vol = playback->prev_bus_details->volume[idx][channel_idx];
+ // Fade out to silence
+ _mix_step_for_channel(channel_buf, buf, prev_channel_vol, AudioFrame(0, 0), playback->attenuation_filter_cutoff_hz.get(), playback->highshelf_gain.get(), &playback->filter_process[channel_idx * 2], &playback->filter_process[channel_idx * 2 + 1]);
+ }
+ }
+
+ // Copy the bus details we mixed with to the previous bus details to maintain volume ramps.
+ std::copy(std::begin(bus_details.bus_active), std::end(bus_details.bus_active), std::begin(playback->prev_bus_details->bus_active));
+ std::copy(std::begin(bus_details.bus), std::end(bus_details.bus), std::begin(playback->prev_bus_details->bus));
+ for (int bus_idx = 0; bus_idx < MAX_BUSES_PER_PLAYBACK; bus_idx++) {
+ std::copy(std::begin(bus_details.volume[bus_idx]), std::end(bus_details.volume[bus_idx]), std::begin(playback->prev_bus_details->volume[bus_idx]));
+ }
+
+ switch (playback->state.load()) {
+ case AudioStreamPlaybackListNode::AWAITING_DELETION:
+ case AudioStreamPlaybackListNode::FADE_OUT_TO_DELETION:
+ playback_list.erase(playback, [](AudioStreamPlaybackListNode *p) {
+ if (p->prev_bus_details)
+ delete p->prev_bus_details;
+ if (p->bus_details)
+ delete p->bus_details;
+ p->stream_playback.unref();
+ delete p;
+ });
+ break;
+ case AudioStreamPlaybackListNode::FADE_OUT_TO_PAUSE: {
+ // Pause the stream.
+ AudioStreamPlaybackListNode::PlaybackState old_state, new_state;
+ do {
+ old_state = playback->state.load();
+ new_state = AudioStreamPlaybackListNode::PAUSED;
+ } while (!playback->state.compare_exchange_strong(/* expected= */ old_state, new_state));
+ } break;
+ case AudioStreamPlaybackListNode::PLAYING:
+ case AudioStreamPlaybackListNode::PAUSED:
+ // No-op!
+ break;
+ }
}
for (int i = buses.size() - 1; i >= 0; i--) {
@@ -464,6 +606,53 @@ void AudioServer::_mix_step() {
to_mix = buffer_size;
}
+void AudioServer::_mix_step_for_channel(AudioFrame *p_out_buf, AudioFrame *p_source_buf, AudioFrame p_vol_start, AudioFrame p_vol_final, float p_attenuation_filter_cutoff_hz, float p_highshelf_gain, AudioFilterSW::Processor *p_processor_l, AudioFilterSW::Processor *p_processor_r) {
+ if (p_highshelf_gain != 0) {
+ AudioFilterSW filter;
+ filter.set_mode(AudioFilterSW::HIGHSHELF);
+ filter.set_sampling_rate(AudioServer::get_singleton()->get_mix_rate());
+ filter.set_cutoff(p_attenuation_filter_cutoff_hz);
+ filter.set_resonance(1);
+ filter.set_stages(1);
+ filter.set_gain(p_highshelf_gain);
+
+ ERR_FAIL_COND(p_processor_l == nullptr);
+ ERR_FAIL_COND(p_processor_r == nullptr);
+
+ bool is_just_started = p_vol_start.l == 0 && p_vol_start.r == 0;
+ p_processor_l->set_filter(&filter, /* clear_history= */ is_just_started);
+ p_processor_l->update_coeffs(buffer_size);
+ p_processor_r->set_filter(&filter, /* clear_history= */ is_just_started);
+ p_processor_r->update_coeffs(buffer_size);
+
+ for (unsigned int frame_idx = 0; frame_idx < buffer_size; frame_idx++) {
+ // Make this buffer size invariant if buffer_size ever becomes a project setting.
+ float lerp_param = (float)frame_idx / buffer_size;
+ AudioFrame vol = p_vol_final * lerp_param + (1 - lerp_param) * p_vol_start;
+ AudioFrame mixed = vol * p_source_buf[frame_idx];
+ p_processor_l->process_one_interp(mixed.l);
+ p_processor_r->process_one_interp(mixed.r);
+ p_out_buf[frame_idx] += mixed;
+ }
+
+ } else {
+ for (unsigned int frame_idx = 0; frame_idx < buffer_size; frame_idx++) {
+ // Make this buffer size invariant if buffer_size ever becomes a project setting.
+ float lerp_param = (float)frame_idx / buffer_size;
+ p_out_buf[frame_idx] += (p_vol_final * lerp_param + (1 - lerp_param) * p_vol_start) * p_source_buf[frame_idx];
+ }
+ }
+}
+
+AudioServer::AudioStreamPlaybackListNode *AudioServer::_find_playback_list_node(Ref<AudioStreamPlayback> p_playback) {
+ for (AudioStreamPlaybackListNode *playback_list_node : playback_list) {
+ if (playback_list_node->stream_playback == p_playback) {
+ return playback_list_node;
+ }
+ }
+ return nullptr;
+}
+
bool AudioServer::thread_has_channel_mix_buffer(int p_bus, int p_buffer) const {
if (p_bus < 0 || p_bus >= buses.size()) {
return false;
@@ -923,9 +1112,223 @@ float AudioServer::get_playback_speed_scale() const {
return playback_speed_scale;
}
+void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time) {
+ ERR_FAIL_COND(p_playback.is_null());
+
+ Map<StringName, Vector<AudioFrame>> map;
+ map[p_bus] = p_volume_db_vector;
+
+ start_playback_stream(p_playback, map, p_start_time);
+}
+
+void AudioServer::start_playback_stream(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time, float p_highshelf_gain, float p_attenuation_cutoff_hz, float p_pitch_scale) {
+ ERR_FAIL_COND(p_playback.is_null());
+
+ AudioStreamPlaybackListNode *playback_node = new AudioStreamPlaybackListNode();
+ playback_node->stream_playback = p_playback;
+ playback_node->stream_playback->start(p_start_time);
+
+ AudioStreamPlaybackBusDetails *new_bus_details = new AudioStreamPlaybackBusDetails();
+ int idx = 0;
+ for (KeyValue<StringName, Vector<AudioFrame>> pair : p_bus_volumes) {
+ ERR_FAIL_COND(pair.value.size() < channel_count);
+ ERR_FAIL_COND(pair.value.size() != MAX_CHANNELS_PER_BUS);
+
+ new_bus_details->bus_active[idx] = true;
+ new_bus_details->bus[idx] = pair.key;
+ for (int channel_idx = 0; channel_idx < MAX_CHANNELS_PER_BUS; channel_idx++) {
+ new_bus_details->volume[idx][channel_idx] = pair.value[channel_idx];
+ }
+ }
+ playback_node->bus_details = new_bus_details;
+ playback_node->prev_bus_details = new AudioStreamPlaybackBusDetails();
+
+ playback_node->pitch_scale.set(p_pitch_scale);
+ playback_node->highshelf_gain.set(p_highshelf_gain);
+ playback_node->attenuation_filter_cutoff_hz.set(p_attenuation_cutoff_hz);
+
+ memset(playback_node->prev_bus_details->volume, 0, sizeof(playback_node->prev_bus_details->volume));
+
+ for (AudioFrame &frame : playback_node->lookahead) {
+ frame = AudioFrame(0, 0);
+ }
+
+ playback_node->state.store(AudioStreamPlaybackListNode::PLAYING);
+
+ playback_list.insert(playback_node);
+}
+
+void AudioServer::stop_playback_stream(Ref<AudioStreamPlayback> p_playback) {
+ ERR_FAIL_COND(p_playback.is_null());
+
+ AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback);
+ if (!playback_node) {
+ return;
+ }
+
+ AudioStreamPlaybackListNode::PlaybackState new_state, old_state;
+ do {
+ old_state = playback_node->state.load();
+ if (old_state == AudioStreamPlaybackListNode::AWAITING_DELETION) {
+ break; // Don't fade out again.
+ }
+ new_state = AudioStreamPlaybackListNode::FADE_OUT_TO_DELETION;
+
+ } while (!playback_node->state.compare_exchange_strong(old_state, new_state));
+}
+
+void AudioServer::set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volumes) {
+ ERR_FAIL_COND(p_volumes.size() != MAX_CHANNELS_PER_BUS);
+
+ Map<StringName, Vector<AudioFrame>> map;
+ map[p_bus] = p_volumes;
+
+ set_playback_bus_volumes_linear(p_playback, map);
+}
+
+void AudioServer::set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes) {
+ ERR_FAIL_COND(p_bus_volumes.size() > MAX_BUSES_PER_PLAYBACK);
+
+ AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback);
+ if (!playback_node) {
+ return;
+ }
+ AudioStreamPlaybackBusDetails *old_bus_details, *new_bus_details = new AudioStreamPlaybackBusDetails();
+
+ int idx = 0;
+ for (KeyValue<StringName, Vector<AudioFrame>> pair : p_bus_volumes) {
+ if (idx >= MAX_BUSES_PER_PLAYBACK) {
+ break;
+ }
+ ERR_FAIL_COND(pair.value.size() < channel_count);
+ ERR_FAIL_COND(pair.value.size() != MAX_CHANNELS_PER_BUS);
+
+ new_bus_details->bus_active[idx] = true;
+ new_bus_details->bus[idx] = pair.key;
+ for (int channel_idx = 0; channel_idx < MAX_CHANNELS_PER_BUS; channel_idx++) {
+ new_bus_details->volume[idx][channel_idx] = pair.value[channel_idx];
+ }
+ idx++;
+ }
+
+ do {
+ old_bus_details = playback_node->bus_details.load();
+ } while (!playback_node->bus_details.compare_exchange_strong(old_bus_details, new_bus_details));
+
+ bus_details_graveyard.insert(old_bus_details);
+}
+
+void AudioServer::set_playback_all_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, Vector<AudioFrame> p_volumes) {
+ ERR_FAIL_COND(p_playback.is_null());
+ ERR_FAIL_COND(p_volumes.size() != MAX_CHANNELS_PER_BUS);
+
+ Map<StringName, Vector<AudioFrame>> map;
+
+ AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback);
+ if (!playback_node) {
+ return;
+ }
+ for (int bus_idx = 0; bus_idx < MAX_BUSES_PER_PLAYBACK; bus_idx++) {
+ if (playback_node->bus_details.load()->bus_active[bus_idx]) {
+ map[playback_node->bus_details.load()->bus[bus_idx]] = p_volumes;
+ }
+ }
+
+ set_playback_bus_volumes_linear(p_playback, map);
+}
+
+void AudioServer::set_playback_pitch_scale(Ref<AudioStreamPlayback> p_playback, float p_pitch_scale) {
+ ERR_FAIL_COND(p_playback.is_null());
+
+ AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback);
+ if (!playback_node) {
+ return;
+ }
+
+ playback_node->pitch_scale.set(p_pitch_scale);
+}
+
+void AudioServer::set_playback_paused(Ref<AudioStreamPlayback> p_playback, bool p_paused) {
+ ERR_FAIL_COND(p_playback.is_null());
+
+ AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback);
+ if (!playback_node) {
+ return;
+ }
+
+ AudioStreamPlaybackListNode::PlaybackState new_state, old_state;
+ do {
+ old_state = playback_node->state.load();
+ new_state = p_paused ? AudioStreamPlaybackListNode::FADE_OUT_TO_PAUSE : AudioStreamPlaybackListNode::PLAYING;
+ if (!p_paused && old_state == AudioStreamPlaybackListNode::PLAYING) {
+ return; // No-op.
+ }
+ if (p_paused && (old_state == AudioStreamPlaybackListNode::PAUSED || old_state == AudioStreamPlaybackListNode::FADE_OUT_TO_PAUSE)) {
+ return; // No-op.
+ }
+
+ } while (!playback_node->state.compare_exchange_strong(old_state, new_state));
+}
+
+void AudioServer::set_playback_highshelf_params(Ref<AudioStreamPlayback> p_playback, float p_gain, float p_attenuation_cutoff_hz) {
+ ERR_FAIL_COND(p_playback.is_null());
+
+ AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback);
+ if (!playback_node) {
+ return;
+ }
+
+ playback_node->attenuation_filter_cutoff_hz.set(p_attenuation_cutoff_hz);
+ playback_node->highshelf_gain.set(p_gain);
+}
+
+bool AudioServer::is_playback_active(Ref<AudioStreamPlayback> p_playback) {
+ ERR_FAIL_COND_V(p_playback.is_null(), false);
+
+ AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback);
+ if (!playback_node) {
+ return false;
+ }
+
+ return playback_node->state.load() == AudioStreamPlaybackListNode::PLAYING;
+}
+
+float AudioServer::get_playback_position(Ref<AudioStreamPlayback> p_playback) {
+ ERR_FAIL_COND_V(p_playback.is_null(), 0);
+
+ AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback);
+ if (!playback_node) {
+ return 0;
+ }
+
+ return playback_node->stream_playback->get_playback_position();
+}
+
+bool AudioServer::is_playback_paused(Ref<AudioStreamPlayback> p_playback) {
+ ERR_FAIL_COND_V(p_playback.is_null(), false);
+
+ AudioStreamPlaybackListNode *playback_node = _find_playback_list_node(p_playback);
+ if (!playback_node) {
+ return false;
+ }
+
+ return playback_node->state.load() == AudioStreamPlaybackListNode::PAUSED || playback_node->state.load() == AudioStreamPlaybackListNode::FADE_OUT_TO_PAUSE;
+}
+
+uint64_t AudioServer::get_mix_count() const {
+ return mix_count;
+}
+
+void AudioServer::notify_listener_changed() {
+ for (CallbackItem *ci : listener_changed_callback_list) {
+ ci->callback(ci->userdata);
+ }
+}
+
void AudioServer::init_channels_and_buffers() {
channel_count = get_channel_count();
temp_buffer.resize(channel_count);
+ mix_buffer.resize(buffer_size + LOOKAHEAD_BUFFER_SIZE);
for (int i = 0; i < temp_buffer.size(); i++) {
temp_buffer.write[i].resize(buffer_size);
@@ -943,7 +1346,7 @@ void AudioServer::init() {
channel_disable_threshold_db = GLOBAL_DEF_RST("audio/buses/channel_disable_threshold_db", -60.0);
channel_disable_frames = float(GLOBAL_DEF_RST("audio/buses/channel_disable_time", 2.0)) * get_mix_rate();
ProjectSettings::get_singleton()->set_custom_property_info("audio/buses/channel_disable_time", PropertyInfo(Variant::FLOAT, "audio/buses/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
- buffer_size = 1024; //hardcoded for now
+ buffer_size = 512; //hardcoded for now
init_channels_and_buffers();
@@ -1030,9 +1433,22 @@ void AudioServer::update() {
prof_time = 0;
#endif
- for (Set<CallbackItem>::Element *E = update_callbacks.front(); E; E = E->next()) {
- E->get().callback(E->get().userdata);
+ for (CallbackItem *ci : update_callback_list) {
+ ci->callback(ci->userdata);
+ }
+ mix_callback_list.maybe_cleanup();
+ update_callback_list.maybe_cleanup();
+ listener_changed_callback_list.maybe_cleanup();
+ playback_list.maybe_cleanup();
+ for (AudioStreamPlaybackBusDetails *bus_details : bus_details_graveyard_frame_old) {
+ bus_details_graveyard_frame_old.erase(bus_details, [](AudioStreamPlaybackBusDetails *d) { delete d; });
+ }
+ for (AudioStreamPlaybackBusDetails *bus_details : bus_details_graveyard) {
+ bus_details_graveyard_frame_old.insert(bus_details);
+ bus_details_graveyard.erase(bus_details);
}
+ bus_details_graveyard.maybe_cleanup();
+ bus_details_graveyard_frame_old.maybe_cleanup();
}
void AudioServer::load_default_bus_layout() {
@@ -1098,40 +1514,49 @@ double AudioServer::get_time_since_last_mix() const {
AudioServer *AudioServer::singleton = nullptr;
-void AudioServer::add_callback(AudioCallback p_callback, void *p_userdata) {
- lock();
- CallbackItem ci;
- ci.callback = p_callback;
- ci.userdata = p_userdata;
- callbacks.insert(ci);
- unlock();
+void AudioServer::add_update_callback(AudioCallback p_callback, void *p_userdata) {
+ CallbackItem *ci = new CallbackItem();
+ ci->callback = p_callback;
+ ci->userdata = p_userdata;
+ update_callback_list.insert(ci);
}
-void AudioServer::remove_callback(AudioCallback p_callback, void *p_userdata) {
- lock();
- CallbackItem ci;
- ci.callback = p_callback;
- ci.userdata = p_userdata;
- callbacks.erase(ci);
- unlock();
+void AudioServer::remove_update_callback(AudioCallback p_callback, void *p_userdata) {
+ for (CallbackItem *ci : update_callback_list) {
+ if (ci->callback == p_callback && ci->userdata == p_userdata) {
+ update_callback_list.erase(ci, [](CallbackItem *c) { delete c; });
+ }
+ }
}
-void AudioServer::add_update_callback(AudioCallback p_callback, void *p_userdata) {
- lock();
- CallbackItem ci;
- ci.callback = p_callback;
- ci.userdata = p_userdata;
- update_callbacks.insert(ci);
- unlock();
+void AudioServer::add_mix_callback(AudioCallback p_callback, void *p_userdata) {
+ CallbackItem *ci = new CallbackItem();
+ ci->callback = p_callback;
+ ci->userdata = p_userdata;
+ mix_callback_list.insert(ci);
}
-void AudioServer::remove_update_callback(AudioCallback p_callback, void *p_userdata) {
- lock();
- CallbackItem ci;
- ci.callback = p_callback;
- ci.userdata = p_userdata;
- update_callbacks.erase(ci);
- unlock();
+void AudioServer::remove_mix_callback(AudioCallback p_callback, void *p_userdata) {
+ for (CallbackItem *ci : mix_callback_list) {
+ if (ci->callback == p_callback && ci->userdata == p_userdata) {
+ mix_callback_list.erase(ci, [](CallbackItem *c) { delete c; });
+ }
+ }
+}
+
+void AudioServer::add_listener_changed_callback(AudioCallback p_callback, void *p_userdata) {
+ CallbackItem *ci = new CallbackItem();
+ ci->callback = p_callback;
+ ci->userdata = p_userdata;
+ listener_changed_callback_list.insert(ci);
+}
+
+void AudioServer::remove_listener_changed_callback(AudioCallback p_callback, void *p_userdata) {
+ for (CallbackItem *ci : listener_changed_callback_list) {
+ if (ci->callback == p_callback && ci->userdata == p_userdata) {
+ listener_changed_callback_list.erase(ci, [](CallbackItem *c) { delete c; });
+ }
+ }
}
void AudioServer::set_bus_layout(const Ref<AudioBusLayout> &p_bus_layout) {
diff --git a/servers/audio_server.h b/servers/audio_server.h
index 7974c4a2ad..a60d4ae4c4 100644
--- a/servers/audio_server.h
+++ b/servers/audio_server.h
@@ -34,12 +34,17 @@
#include "core/math/audio_frame.h"
#include "core/object/class_db.h"
#include "core/os/os.h"
+#include "core/templates/safe_list.h"
#include "core/variant/variant.h"
#include "servers/audio/audio_effect.h"
+#include "servers/audio/audio_filter_sw.h"
+
+#include <atomic>
class AudioDriverDummy;
class AudioStream;
class AudioStreamSample;
+class AudioStreamPlayback;
class AudioDriver {
static AudioDriver *singleton;
@@ -155,7 +160,10 @@ public:
};
enum {
- AUDIO_DATA_INVALID_ID = -1
+ AUDIO_DATA_INVALID_ID = -1,
+ MAX_CHANNELS_PER_BUS = 4,
+ MAX_BUSES_PER_PLAYBACK = 6,
+ LOOKAHEAD_BUFFER_SIZE = 64,
};
typedef void (*AudioCallback)(void *p_userdata);
@@ -219,7 +227,46 @@ private:
int index_cache;
};
+ struct AudioStreamPlaybackBusDetails {
+ bool bus_active[MAX_BUSES_PER_PLAYBACK] = { false, false, false, false, false, false };
+ StringName bus[MAX_BUSES_PER_PLAYBACK];
+ AudioFrame volume[MAX_BUSES_PER_PLAYBACK][MAX_CHANNELS_PER_BUS];
+ };
+
+ struct AudioStreamPlaybackListNode {
+ enum PlaybackState {
+ PAUSED = 0, // Paused. Keep this stream playback around though so it can be restarted.
+ PLAYING = 1, // Playing. Fading may still be necessary if volume changes!
+ FADE_OUT_TO_PAUSE = 2, // About to pause.
+ FADE_OUT_TO_DELETION = 3, // About to stop.
+ AWAITING_DELETION = 4,
+ };
+ // If zero or positive, a place in the stream to seek to during the next mix.
+ SafeNumeric<float> setseek;
+ SafeNumeric<float> pitch_scale;
+ SafeNumeric<float> highshelf_gain;
+ SafeNumeric<float> attenuation_filter_cutoff_hz; // This isn't used unless highshelf_gain is nonzero.
+ AudioFilterSW::Processor filter_process[8];
+ // Updating this ref after the list node is created breaks consistency guarantees, don't do it!
+ Ref<AudioStreamPlayback> stream_playback;
+ // Playback state determines the fate of a particular AudioStreamListNode during the mix step. Must be atomically replaced.
+ std::atomic<PlaybackState> state = AWAITING_DELETION;
+ // This data should only ever be modified by an atomic replacement of the pointer.
+ std::atomic<AudioStreamPlaybackBusDetails *> bus_details = nullptr;
+ // Previous bus details should only be accessed on the audio thread.
+ AudioStreamPlaybackBusDetails *prev_bus_details = nullptr;
+ // The next few samples are stored here so we have some time to fade audio out if it ends abruptly at the beginning of the next mix.
+ AudioFrame lookahead[LOOKAHEAD_BUFFER_SIZE];
+ };
+
+ SafeList<AudioStreamPlaybackListNode *> playback_list;
+ SafeList<AudioStreamPlaybackBusDetails *> bus_details_graveyard;
+
+ // TODO document if this is necessary.
+ SafeList<AudioStreamPlaybackBusDetails *> bus_details_graveyard_frame_old;
+
Vector<Vector<AudioFrame>> temp_buffer; //temp_buffer for each level
+ Vector<AudioFrame> mix_buffer;
Vector<Bus *> buses;
Map<StringName, Bus *> bus_map;
@@ -230,18 +277,19 @@ private:
void init_channels_and_buffers();
void _mix_step();
+ void _mix_step_for_channel(AudioFrame *p_out_buf, AudioFrame *p_source_buf, AudioFrame p_vol_start, AudioFrame p_vol_final, float p_attenuation_filter_cutoff_hz, float p_highshelf_gain, AudioFilterSW::Processor *p_processor_l, AudioFilterSW::Processor *p_processor_r);
+
+ // Should only be called on the main thread.
+ AudioStreamPlaybackListNode *_find_playback_list_node(Ref<AudioStreamPlayback> p_playback);
struct CallbackItem {
AudioCallback callback;
void *userdata;
-
- bool operator<(const CallbackItem &p_item) const {
- return (callback == p_item.callback ? userdata < p_item.userdata : callback < p_item.callback);
- }
};
- Set<CallbackItem> callbacks;
- Set<CallbackItem> update_callbacks;
+ SafeList<CallbackItem *> update_callback_list;
+ SafeList<CallbackItem *> mix_callback_list;
+ SafeList<CallbackItem *> listener_changed_callback_list;
friend class AudioDriver;
void _driver_process(int p_frames, int32_t *p_buffer);
@@ -319,6 +367,27 @@ public:
void set_playback_speed_scale(float p_scale);
float get_playback_speed_scale() const;
+ // Convenience method.
+ void start_playback_stream(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time = 0);
+ // Expose all parameters.
+ void start_playback_stream(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time = 0, float p_highshelf_gain = 0, float p_attenuation_cutoff_hz = 0, float p_pitch_scale = 1);
+ void stop_playback_stream(Ref<AudioStreamPlayback> p_playback);
+
+ void set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volumes);
+ void set_playback_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes);
+ void set_playback_all_bus_volumes_linear(Ref<AudioStreamPlayback> p_playback, Vector<AudioFrame> p_volumes);
+ void set_playback_pitch_scale(Ref<AudioStreamPlayback> p_playback, float p_pitch_scale);
+ void set_playback_paused(Ref<AudioStreamPlayback> p_playback, bool p_paused);
+ void set_playback_highshelf_params(Ref<AudioStreamPlayback> p_playback, float p_gain, float p_attenuation_cutoff_hz);
+
+ bool is_playback_active(Ref<AudioStreamPlayback> p_playback);
+ float get_playback_position(Ref<AudioStreamPlayback> p_playback);
+ bool is_playback_paused(Ref<AudioStreamPlayback> p_playback);
+
+ uint64_t get_mix_count() const;
+
+ void notify_listener_changed();
+
virtual void init();
virtual void finish();
virtual void update();
@@ -340,12 +409,15 @@ public:
virtual double get_time_to_next_mix() const;
virtual double get_time_since_last_mix() const;
- void add_callback(AudioCallback p_callback, void *p_userdata);
- void remove_callback(AudioCallback p_callback, void *p_userdata);
+ void add_listener_changed_callback(AudioCallback p_callback, void *p_userdata);
+ void remove_listener_changed_callback(AudioCallback p_callback, void *p_userdata);
void add_update_callback(AudioCallback p_callback, void *p_userdata);
void remove_update_callback(AudioCallback p_callback, void *p_userdata);
+ void add_mix_callback(AudioCallback p_callback, void *p_userdata);
+ void remove_mix_callback(AudioCallback p_callback, void *p_userdata);
+
void set_bus_layout(const Ref<AudioBusLayout> &p_bus_layout);
Ref<AudioBusLayout> generate_bus_layout() const;
diff --git a/servers/display_server.cpp b/servers/display_server.cpp
index 3d44484033..cdf892094d 100644
--- a/servers/display_server.cpp
+++ b/servers/display_server.cpp
@@ -605,4 +605,5 @@ DisplayServer::DisplayServer() {
}
DisplayServer::~DisplayServer() {
+ singleton = nullptr;
}
diff --git a/servers/physics_2d/area_2d_sw.cpp b/servers/physics_2d/area_2d_sw.cpp
index 532cb259b3..c85b1575e3 100644
--- a/servers/physics_2d/area_2d_sw.cpp
+++ b/servers/physics_2d/area_2d_sw.cpp
@@ -274,22 +274,31 @@ void Area2DSW::call_queries() {
}
}
+void Area2DSW::compute_gravity(const Vector2 &p_position, Vector2 &r_gravity) const {
+ if (is_gravity_point()) {
+ const real_t gravity_distance_scale = get_gravity_distance_scale();
+ Vector2 v = get_transform().xform(get_gravity_vector()) - p_position;
+ if (gravity_distance_scale > 0) {
+ const real_t v_length = v.length();
+ if (v_length > 0) {
+ const real_t v_scaled = v_length * gravity_distance_scale;
+ r_gravity = (v.normalized() * (get_gravity() / (v_scaled * v_scaled)));
+ } else {
+ r_gravity = Vector2();
+ }
+ } else {
+ r_gravity = v.normalized() * get_gravity();
+ }
+ } else {
+ r_gravity = get_gravity_vector() * get_gravity();
+ }
+}
+
Area2DSW::Area2DSW() :
CollisionObject2DSW(TYPE_AREA),
monitor_query_list(this),
moved_list(this) {
_set_static(true); //areas are not active by default
- space_override_mode = PhysicsServer2D::AREA_SPACE_OVERRIDE_DISABLED;
- gravity = 9.80665;
- gravity_vector = Vector2(0, -1);
- gravity_is_point = false;
- gravity_distance_scale = 0;
- point_attenuation = 1;
-
- angular_damp = 1.0;
- linear_damp = 0.1;
- priority = 0;
- monitorable = false;
}
Area2DSW::~Area2DSW() {
diff --git a/servers/physics_2d/area_2d_sw.h b/servers/physics_2d/area_2d_sw.h
index 3bf603b30d..0b7c791ed5 100644
--- a/servers/physics_2d/area_2d_sw.h
+++ b/servers/physics_2d/area_2d_sw.h
@@ -34,23 +34,22 @@
#include "collision_object_2d_sw.h"
#include "core/templates/self_list.h"
#include "servers/physics_server_2d.h"
-//#include "servers/physics_3d/query_sw.h"
class Space2DSW;
class Body2DSW;
class Constraint2DSW;
class Area2DSW : public CollisionObject2DSW {
- PhysicsServer2D::AreaSpaceOverrideMode space_override_mode;
- real_t gravity;
- Vector2 gravity_vector;
- bool gravity_is_point;
- real_t gravity_distance_scale;
- real_t point_attenuation;
- real_t linear_damp;
- real_t angular_damp;
- int priority;
- bool monitorable;
+ PhysicsServer2D::AreaSpaceOverrideMode space_override_mode = PhysicsServer2D::AREA_SPACE_OVERRIDE_DISABLED;
+ real_t gravity = 9.80665;
+ Vector2 gravity_vector = Vector2(0, -1);
+ bool gravity_is_point = false;
+ real_t gravity_distance_scale = 0.0;
+ real_t point_attenuation = 1.0;
+ real_t linear_damp = 0.1;
+ real_t angular_damp = 1.0;
+ int priority = 0;
+ bool monitorable = false;
ObjectID monitor_callback_id;
StringName monitor_callback_method;
@@ -64,8 +63,8 @@ class Area2DSW : public CollisionObject2DSW {
struct BodyKey {
RID rid;
ObjectID instance_id;
- uint32_t body_shape;
- uint32_t area_shape;
+ uint32_t body_shape = 0;
+ uint32_t area_shape = 0;
_FORCE_INLINE_ bool operator<(const BodyKey &p_key) const {
if (rid == p_key.rid) {
@@ -85,26 +84,20 @@ class Area2DSW : public CollisionObject2DSW {
};
struct BodyState {
- int state;
+ int state = 0;
_FORCE_INLINE_ void inc() { state++; }
_FORCE_INLINE_ void dec() { state--; }
- _FORCE_INLINE_ BodyState() { state = 0; }
};
Map<BodyKey, BodyState> monitored_bodies;
Map<BodyKey, BodyState> monitored_areas;
- //virtual void shape_changed_notify(Shape2DSW *p_shape);
- //virtual void shape_deleted_notify(Shape2DSW *p_shape);
Set<Constraint2DSW *> constraints;
virtual void _shapes_changed();
void _queue_monitor_update();
public:
- //_FORCE_INLINE_ const Matrix32& get_inverse_transform() const { return inverse_transform; }
- //_FORCE_INLINE_ SpaceSW* get_owner() { return owner; }
-
void set_monitor_callback(ObjectID p_id, const StringName &p_method);
_FORCE_INLINE_ bool has_monitor_callback() const { return monitor_callback_id.is_valid(); }
@@ -161,6 +154,8 @@ public:
void call_queries();
+ void compute_gravity(const Vector2 &p_position, Vector2 &r_gravity) const;
+
Area2DSW();
~Area2DSW();
};
diff --git a/servers/physics_2d/area_pair_2d_sw.cpp b/servers/physics_2d/area_pair_2d_sw.cpp
index 5ca16cb6fc..4f1148c26f 100644
--- a/servers/physics_2d/area_pair_2d_sw.cpp
+++ b/servers/physics_2d/area_pair_2d_sw.cpp
@@ -33,7 +33,7 @@
bool AreaPair2DSW::setup(real_t p_step) {
bool result = false;
- if (area->interacts_with(body) && CollisionSolver2DSW::solve(body->get_shape(body_shape), body->get_transform() * body->get_shape_transform(body_shape), Vector2(), area->get_shape(area_shape), area->get_transform() * area->get_shape_transform(area_shape), Vector2(), nullptr, this)) {
+ if (area->collides_with(body) && CollisionSolver2DSW::solve(body->get_shape(body_shape), body->get_transform() * body->get_shape_transform(body_shape), Vector2(), area->get_shape(area_shape), area->get_transform() * area->get_shape_transform(area_shape), Vector2(), nullptr, this)) {
result = true;
}
@@ -109,46 +109,51 @@ AreaPair2DSW::~AreaPair2DSW() {
//////////////////////////////////
bool Area2Pair2DSW::setup(real_t p_step) {
- bool result = false;
- if (area_a->interacts_with(area_b) && CollisionSolver2DSW::solve(area_a->get_shape(shape_a), area_a->get_transform() * area_a->get_shape_transform(shape_a), Vector2(), area_b->get_shape(shape_b), area_b->get_transform() * area_b->get_shape_transform(shape_b), Vector2(), nullptr, this)) {
- result = true;
+ bool result_a = area_a->collides_with(area_b);
+ bool result_b = area_b->collides_with(area_a);
+ if ((result_a || result_b) && !CollisionSolver2DSW::solve(area_a->get_shape(shape_a), area_a->get_transform() * area_a->get_shape_transform(shape_a), Vector2(), area_b->get_shape(shape_b), area_b->get_transform() * area_b->get_shape_transform(shape_b), Vector2(), nullptr, this)) {
+ result_a = false;
+ result_b = false;
}
- process_collision = false;
- if (result != colliding) {
- if (area_b->has_area_monitor_callback() && area_a->is_monitorable()) {
- process_collision = true;
- } else if (area_a->has_area_monitor_callback() && area_b->is_monitorable()) {
+ bool process_collision = false;
+
+ process_collision_a = false;
+ if (result_a != colliding_a) {
+ if (area_a->has_area_monitor_callback() && area_b->is_monitorable()) {
+ process_collision_a = true;
process_collision = true;
}
+ colliding_a = result_a;
+ }
- colliding = result;
+ process_collision_b = false;
+ if (result_b != colliding_b) {
+ if (area_b->has_area_monitor_callback() && area_a->is_monitorable()) {
+ process_collision_b = true;
+ process_collision = true;
+ }
+ colliding_b = result_b;
}
return process_collision;
}
bool Area2Pair2DSW::pre_solve(real_t p_step) {
- if (!process_collision) {
- return false;
+ if (process_collision_a) {
+ if (colliding_a) {
+ area_a->add_area_to_query(area_b, shape_b, shape_a);
+ } else {
+ area_a->remove_area_from_query(area_b, shape_b, shape_a);
+ }
}
- if (colliding) {
- if (area_b->has_area_monitor_callback() && area_a->is_monitorable()) {
+ if (process_collision_b) {
+ if (colliding_b) {
area_b->add_area_to_query(area_a, shape_a, shape_b);
- }
-
- if (area_a->has_area_monitor_callback() && area_b->is_monitorable()) {
- area_a->add_area_to_query(area_b, shape_b, shape_a);
- }
- } else {
- if (area_b->has_area_monitor_callback() && area_a->is_monitorable()) {
+ } else {
area_b->remove_area_from_query(area_a, shape_a, shape_b);
}
-
- if (area_a->has_area_monitor_callback() && area_b->is_monitorable()) {
- area_a->remove_area_from_query(area_b, shape_b, shape_a);
- }
}
return false; // Never do any post solving.
@@ -168,16 +173,18 @@ Area2Pair2DSW::Area2Pair2DSW(Area2DSW *p_area_a, int p_shape_a, Area2DSW *p_area
}
Area2Pair2DSW::~Area2Pair2DSW() {
- if (colliding) {
- if (area_b->has_area_monitor_callback()) {
- area_b->remove_area_from_query(area_a, shape_a, shape_b);
- }
-
+ if (colliding_a) {
if (area_a->has_area_monitor_callback()) {
area_a->remove_area_from_query(area_b, shape_b, shape_a);
}
}
+ if (colliding_b) {
+ if (area_b->has_area_monitor_callback()) {
+ area_b->remove_area_from_query(area_a, shape_a, shape_b);
+ }
+ }
+
area_a->remove_constraint(this);
area_b->remove_constraint(this);
}
diff --git a/servers/physics_2d/area_pair_2d_sw.h b/servers/physics_2d/area_pair_2d_sw.h
index 4632a307d9..66e9f1afee 100644
--- a/servers/physics_2d/area_pair_2d_sw.h
+++ b/servers/physics_2d/area_pair_2d_sw.h
@@ -57,8 +57,10 @@ class Area2Pair2DSW : public Constraint2DSW {
Area2DSW *area_b = nullptr;
int shape_a = 0;
int shape_b = 0;
- bool colliding = false;
- bool process_collision = false;
+ bool colliding_a = false;
+ bool colliding_b = false;
+ bool process_collision_a = false;
+ bool process_collision_b = false;
public:
virtual bool setup(real_t p_step) override;
diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp
index 7aa2f9b7de..38b98b7bca 100644
--- a/servers/physics_2d/body_2d_sw.cpp
+++ b/servers/physics_2d/body_2d_sw.cpp
@@ -29,51 +29,77 @@
/*************************************************************************/
#include "body_2d_sw.h"
+
#include "area_2d_sw.h"
-#include "physics_server_2d_sw.h"
+#include "body_direct_state_2d_sw.h"
#include "space_2d_sw.h"
-void Body2DSW::_update_inertia() {
- if (!user_inertia && get_space() && !inertia_update_list.in_list()) {
- get_space()->body_add_to_inertia_update_list(&inertia_update_list);
+void Body2DSW::_mass_properties_changed() {
+ if (get_space() && !mass_properties_update_list.in_list() && (calculate_inertia || calculate_center_of_mass)) {
+ get_space()->body_add_to_mass_properties_update_list(&mass_properties_update_list);
}
}
-void Body2DSW::update_inertias() {
+void Body2DSW::update_mass_properties() {
//update shapes and motions
switch (mode) {
case PhysicsServer2D::BODY_MODE_DYNAMIC: {
- if (user_inertia) {
- _inv_inertia = inertia > 0 ? (1.0 / inertia) : 0;
- break;
- }
- //update tensor for allshapes, not the best way but should be somehow OK. (inspired from bullet)
real_t total_area = 0;
-
for (int i = 0; i < get_shape_count(); i++) {
+ if (is_shape_disabled(i)) {
+ continue;
+ }
total_area += get_shape_aabb(i).get_area();
}
- inertia = 0;
+ if (calculate_center_of_mass) {
+ // We have to recompute the center of mass.
+ center_of_mass = Vector2();
- for (int i = 0; i < get_shape_count(); i++) {
- if (is_shape_disabled(i)) {
- continue;
+ if (total_area != 0.0) {
+ for (int i = 0; i < get_shape_count(); i++) {
+ if (is_shape_disabled(i)) {
+ continue;
+ }
+
+ real_t area = get_shape_aabb(i).get_area();
+
+ real_t mass = area * this->mass / total_area;
+
+ // NOTE: we assume that the shape origin is also its center of mass.
+ center_of_mass += mass * get_shape_transform(i).get_origin();
+ }
+
+ center_of_mass /= mass;
}
+ }
+
+ if (calculate_inertia) {
+ inertia = 0;
+
+ for (int i = 0; i < get_shape_count(); i++) {
+ if (is_shape_disabled(i)) {
+ continue;
+ }
- const Shape2DSW *shape = get_shape(i);
+ const Shape2DSW *shape = get_shape(i);
- real_t area = get_shape_aabb(i).get_area();
+ real_t area = get_shape_aabb(i).get_area();
+ if (area == 0.0) {
+ continue;
+ }
- real_t mass = area * this->mass / total_area;
+ real_t mass = area * this->mass / total_area;
- Transform2D mtx = get_shape_transform(i);
- Vector2 scale = mtx.get_scale();
- inertia += shape->get_moment_of_inertia(mass, scale) + mass * mtx.get_origin().length_squared();
+ Transform2D mtx = get_shape_transform(i);
+ Vector2 scale = mtx.get_scale();
+ Vector2 shape_origin = mtx.get_origin() - center_of_mass;
+ inertia += shape->get_moment_of_inertia(mass, scale) + mass * shape_origin.length_squared();
+ }
}
- _inv_inertia = inertia > 0 ? (1.0 / inertia) : 0;
+ _inv_inertia = inertia > 0.0 ? (1.0 / inertia) : 0.0;
if (mass) {
_inv_mass = 1.0 / mass;
@@ -87,15 +113,18 @@ void Body2DSW::update_inertias() {
_inv_inertia = 0;
_inv_mass = 0;
} break;
- case PhysicsServer2D::BODY_MODE_DYNAMIC_LOCKED: {
+ case PhysicsServer2D::BODY_MODE_DYNAMIC_LINEAR: {
_inv_inertia = 0;
_inv_mass = 1.0 / mass;
} break;
}
- //_update_inertia_tensor();
+}
- //_update_shapes();
+void Body2DSW::reset_mass_properties() {
+ calculate_inertia = true;
+ calculate_center_of_mass = true;
+ _mass_properties_changed();
}
void Body2DSW::set_active(bool p_active) {
@@ -117,7 +146,7 @@ void Body2DSW::set_active(bool p_active) {
}
}
-void Body2DSW::set_param(PhysicsServer2D::BodyParameter p_param, real_t p_value) {
+void Body2DSW::set_param(PhysicsServer2D::BodyParameter p_param, const Variant &p_value) {
switch (p_param) {
case PhysicsServer2D::BODY_PARAM_BOUNCE: {
bounce = p_value;
@@ -126,21 +155,32 @@ void Body2DSW::set_param(PhysicsServer2D::BodyParameter p_param, real_t p_value)
friction = p_value;
} break;
case PhysicsServer2D::BODY_PARAM_MASS: {
- ERR_FAIL_COND(p_value <= 0);
- mass = p_value;
- _update_inertia();
-
+ real_t mass_value = p_value;
+ ERR_FAIL_COND(mass_value <= 0);
+ mass = mass_value;
+ if (mode >= PhysicsServer2D::BODY_MODE_DYNAMIC) {
+ _mass_properties_changed();
+ }
} break;
case PhysicsServer2D::BODY_PARAM_INERTIA: {
- if (p_value <= 0) {
- user_inertia = false;
- _update_inertia();
+ real_t inertia_value = p_value;
+ if (inertia_value <= 0.0) {
+ calculate_inertia = true;
+ if (mode == PhysicsServer2D::BODY_MODE_DYNAMIC) {
+ _mass_properties_changed();
+ }
} else {
- user_inertia = true;
- inertia = p_value;
- _inv_inertia = 1.0 / p_value;
+ calculate_inertia = false;
+ inertia = inertia_value;
+ if (mode == PhysicsServer2D::BODY_MODE_DYNAMIC) {
+ _inv_inertia = 1.0 / inertia;
+ }
}
} break;
+ case PhysicsServer2D::BODY_PARAM_CENTER_OF_MASS: {
+ calculate_center_of_mass = false;
+ center_of_mass = p_value;
+ } break;
case PhysicsServer2D::BODY_PARAM_GRAVITY_SCALE: {
gravity_scale = p_value;
} break;
@@ -155,7 +195,7 @@ void Body2DSW::set_param(PhysicsServer2D::BodyParameter p_param, real_t p_value)
}
}
-real_t Body2DSW::get_param(PhysicsServer2D::BodyParameter p_param) const {
+Variant Body2DSW::get_param(PhysicsServer2D::BodyParameter p_param) const {
switch (p_param) {
case PhysicsServer2D::BODY_PARAM_BOUNCE: {
return bounce;
@@ -169,6 +209,9 @@ real_t Body2DSW::get_param(PhysicsServer2D::BodyParameter p_param) const {
case PhysicsServer2D::BODY_PARAM_INERTIA: {
return inertia;
}
+ case PhysicsServer2D::BODY_PARAM_CENTER_OF_MASS: {
+ return center_of_mass;
+ }
case PhysicsServer2D::BODY_PARAM_GRAVITY_SCALE: {
return gravity_scale;
}
@@ -206,26 +249,22 @@ void Body2DSW::set_mode(PhysicsServer2D::BodyMode p_mode) {
} break;
case PhysicsServer2D::BODY_MODE_DYNAMIC: {
_inv_mass = mass > 0 ? (1.0 / mass) : 0;
- _inv_inertia = inertia > 0 ? (1.0 / inertia) : 0;
+ if (!calculate_inertia) {
+ _inv_inertia = 1.0 / inertia;
+ }
+ _mass_properties_changed();
_set_static(false);
set_active(true);
} break;
- case PhysicsServer2D::BODY_MODE_DYNAMIC_LOCKED: {
+ case PhysicsServer2D::BODY_MODE_DYNAMIC_LINEAR: {
_inv_mass = mass > 0 ? (1.0 / mass) : 0;
_inv_inertia = 0;
+ angular_velocity = 0;
_set_static(false);
set_active(true);
- angular_velocity = 0;
- } break;
- }
- if (p_mode == PhysicsServer2D::BODY_MODE_DYNAMIC && _inv_inertia == 0) {
- _update_inertia();
+ }
}
- /*
- if (get_space())
- _update_queries();
- */
}
PhysicsServer2D::BodyMode Body2DSW::get_mode() const {
@@ -233,7 +272,7 @@ PhysicsServer2D::BodyMode Body2DSW::get_mode() const {
}
void Body2DSW::_shapes_changed() {
- _update_inertia();
+ _mass_properties_changed();
wakeup_neighbours();
}
@@ -268,11 +307,13 @@ void Body2DSW::set_state(PhysicsServer2D::BodyState p_state, const Variant &p_va
} break;
case PhysicsServer2D::BODY_STATE_LINEAR_VELOCITY: {
linear_velocity = p_variant;
+ constant_linear_velocity = linear_velocity;
wakeup();
} break;
case PhysicsServer2D::BODY_STATE_ANGULAR_VELOCITY: {
angular_velocity = p_variant;
+ constant_angular_velocity = angular_velocity;
wakeup();
} break;
@@ -295,7 +336,7 @@ void Body2DSW::set_state(PhysicsServer2D::BodyState p_state, const Variant &p_va
} break;
case PhysicsServer2D::BODY_STATE_CAN_SLEEP: {
can_sleep = p_variant;
- if (mode == PhysicsServer2D::BODY_MODE_DYNAMIC && !active && !can_sleep) {
+ if (mode >= PhysicsServer2D::BODY_MODE_DYNAMIC && !active && !can_sleep) {
set_active(true);
}
@@ -329,8 +370,8 @@ void Body2DSW::set_space(Space2DSW *p_space) {
if (get_space()) {
wakeup_neighbours();
- if (inertia_update_list.in_list()) {
- get_space()->body_remove_from_inertia_update_list(&inertia_update_list);
+ if (mass_properties_update_list.in_list()) {
+ get_space()->body_remove_from_mass_properties_update_list(&mass_properties_update_list);
}
if (active_list.in_list()) {
get_space()->body_remove_from_active_list(&active_list);
@@ -343,26 +384,17 @@ void Body2DSW::set_space(Space2DSW *p_space) {
_set_space(p_space);
if (get_space()) {
- _update_inertia();
+ _mass_properties_changed();
if (active) {
get_space()->body_add_to_active_list(&active_list);
}
}
-
- first_integration = false;
}
-void Body2DSW::_compute_area_gravity_and_dampenings(const Area2DSW *p_area) {
- if (p_area->is_gravity_point()) {
- if (p_area->get_gravity_distance_scale() > 0) {
- Vector2 v = p_area->get_transform().xform(p_area->get_gravity_vector()) - get_transform().get_origin();
- gravity += v.normalized() * (p_area->get_gravity() / Math::pow(v.length() * p_area->get_gravity_distance_scale() + 1, 2));
- } else {
- gravity += (p_area->get_transform().xform(p_area->get_gravity_vector()) - get_transform().get_origin()).normalized() * p_area->get_gravity();
- }
- } else {
- gravity += p_area->get_gravity_vector() * p_area->get_gravity();
- }
+void Body2DSW::_compute_area_gravity_and_damping(const Area2DSW *p_area) {
+ Vector2 area_gravity;
+ p_area->compute_gravity(get_transform().get_origin(), area_gravity);
+ gravity += area_gravity;
area_linear_damp += p_area->get_linear_damp();
area_angular_damp += p_area->get_angular_damp();
@@ -391,7 +423,7 @@ void Body2DSW::integrate_forces(real_t p_step) {
switch (mode) {
case PhysicsServer2D::AREA_SPACE_OVERRIDE_COMBINE:
case PhysicsServer2D::AREA_SPACE_OVERRIDE_COMBINE_REPLACE: {
- _compute_area_gravity_and_dampenings(aa[i].area);
+ _compute_area_gravity_and_damping(aa[i].area);
stopped = mode == PhysicsServer2D::AREA_SPACE_OVERRIDE_COMBINE_REPLACE;
} break;
case PhysicsServer2D::AREA_SPACE_OVERRIDE_REPLACE:
@@ -399,7 +431,7 @@ void Body2DSW::integrate_forces(real_t p_step) {
gravity = Vector2(0, 0);
area_angular_damp = 0;
area_linear_damp = 0;
- _compute_area_gravity_and_dampenings(aa[i].area);
+ _compute_area_gravity_and_damping(aa[i].area);
stopped = mode == PhysicsServer2D::AREA_SPACE_OVERRIDE_REPLACE;
} break;
default: {
@@ -408,7 +440,7 @@ void Body2DSW::integrate_forces(real_t p_step) {
}
}
if (!stopped) {
- _compute_area_gravity_and_dampenings(def_area);
+ _compute_area_gravity_and_damping(def_area);
}
gravity *= gravity_scale;
@@ -435,10 +467,10 @@ void Body2DSW::integrate_forces(real_t p_step) {
if (mode == PhysicsServer2D::BODY_MODE_KINEMATIC) {
//compute motion, angular and etc. velocities from prev transform
motion = new_transform.get_origin() - get_transform().get_origin();
- linear_velocity = motion / p_step;
+ linear_velocity = constant_linear_velocity + motion / p_step;
real_t rot = new_transform.get_rotation() - get_transform().get_rotation();
- angular_velocity = remainder(rot, 2.0 * Math_PI) / p_step;
+ angular_velocity = constant_angular_velocity + remainder(rot, 2.0 * Math_PI) / p_step;
do_motion = true;
@@ -450,7 +482,7 @@ void Body2DSW::integrate_forces(real_t p_step) {
*/
} else {
- if (!omit_force_integration && !first_integration) {
+ if (!omit_force_integration) {
//overridden by direct state query
Vector2 force = gravity * mass;
@@ -484,7 +516,6 @@ void Body2DSW::integrate_forces(real_t p_step) {
//motion=linear_velocity*p_step;
- first_integration = false;
biased_angular_velocity = 0;
biased_linear_velocity = Vector2();
@@ -502,7 +533,7 @@ void Body2DSW::integrate_velocities(real_t p_step) {
return;
}
- if (fi_callback) {
+ if (fi_callback_data || body_state_callback) {
get_space()->body_add_to_state_query_list(&direct_state_query_list);
}
@@ -521,14 +552,22 @@ void Body2DSW::integrate_velocities(real_t p_step) {
real_t angle = get_transform().get_rotation() + total_angular_velocity * p_step;
Vector2 pos = get_transform().get_origin() + total_linear_velocity * p_step;
+ real_t center_of_mass_distance = center_of_mass.length();
+ if (center_of_mass_distance > CMP_EPSILON) {
+ // Calculate displacement due to center of mass offset.
+ real_t prev_angle = get_transform().get_rotation();
+ real_t angle_base = Math::atan2(center_of_mass.y, center_of_mass.x);
+ Vector2 point1(Math::cos(angle_base + prev_angle), Math::sin(angle_base + prev_angle));
+ Vector2 point2(Math::cos(angle_base + angle), Math::sin(angle_base + angle));
+ pos += center_of_mass_distance * (point1 - point2);
+ }
+
_set_transform(Transform2D(angle, pos), continuous_cd_mode == PhysicsServer2D::CCD_MODE_DISABLED);
_set_inv_transform(get_transform().inverse());
if (continuous_cd_mode != PhysicsServer2D::CCD_MODE_DISABLED) {
new_transform = get_transform();
}
-
- //_update_inertia_tensor();
}
void Body2DSW::wakeup_neighbours() {
@@ -542,7 +581,7 @@ void Body2DSW::wakeup_neighbours() {
continue;
}
Body2DSW *b = n[i];
- if (b->mode != PhysicsServer2D::BODY_MODE_DYNAMIC) {
+ if (b->mode < PhysicsServer2D::BODY_MODE_DYNAMIC) {
continue;
}
@@ -554,27 +593,27 @@ void Body2DSW::wakeup_neighbours() {
}
void Body2DSW::call_queries() {
- if (fi_callback) {
- PhysicsDirectBodyState2DSW *dbs = PhysicsDirectBodyState2DSW::singleton;
- dbs->body = this;
-
- Variant v = dbs;
- const Variant *vp[2] = { &v, &fi_callback->callback_udata };
-
- Object *obj = fi_callback->callable.get_object();
- if (!obj) {
+ if (fi_callback_data) {
+ if (!fi_callback_data->callable.get_object()) {
set_force_integration_callback(Callable());
} else {
+ Variant direct_state_variant = get_direct_state();
+ const Variant *vp[2] = { &direct_state_variant, &fi_callback_data->udata };
+
Callable::CallError ce;
Variant rv;
- if (fi_callback->callback_udata.get_type() != Variant::NIL) {
- fi_callback->callable.call(vp, 2, rv, ce);
+ if (fi_callback_data->udata.get_type() != Variant::NIL) {
+ fi_callback_data->callable.call(vp, 2, rv, ce);
} else {
- fi_callback->callable.call(vp, 1, rv, ce);
+ fi_callback_data->callable.call(vp, 1, rv, ce);
}
}
}
+
+ if (body_state_callback) {
+ (body_state_callback)(body_state_callback_instance, get_direct_state());
+ }
}
bool Body2DSW::sleep_test(real_t p_step) {
@@ -594,78 +633,45 @@ bool Body2DSW::sleep_test(real_t p_step) {
}
}
+void Body2DSW::set_state_sync_callback(void *p_instance, PhysicsServer2D::BodyStateCallback p_callback) {
+ body_state_callback_instance = p_instance;
+ body_state_callback = p_callback;
+}
+
void Body2DSW::set_force_integration_callback(const Callable &p_callable, const Variant &p_udata) {
- if (fi_callback) {
- memdelete(fi_callback);
- fi_callback = nullptr;
+ if (p_callable.get_object()) {
+ if (!fi_callback_data) {
+ fi_callback_data = memnew(ForceIntegrationCallbackData);
+ }
+ fi_callback_data->callable = p_callable;
+ fi_callback_data->udata = p_udata;
+ } else if (fi_callback_data) {
+ memdelete(fi_callback_data);
+ fi_callback_data = nullptr;
}
+}
- if (p_callable.get_object()) {
- fi_callback = memnew(ForceIntegrationCallback);
- fi_callback->callable = p_callable;
- fi_callback->callback_udata = p_udata;
+PhysicsDirectBodyState2DSW *Body2DSW::get_direct_state() {
+ if (!direct_state) {
+ direct_state = memnew(PhysicsDirectBodyState2DSW);
+ direct_state->body = this;
}
+ return direct_state;
}
Body2DSW::Body2DSW() :
CollisionObject2DSW(TYPE_BODY),
active_list(this),
- inertia_update_list(this),
+ mass_properties_update_list(this),
direct_state_query_list(this) {
- mode = PhysicsServer2D::BODY_MODE_DYNAMIC;
- active = true;
- angular_velocity = 0;
- biased_angular_velocity = 0;
- mass = 1;
- inertia = 0;
- user_inertia = false;
- _inv_inertia = 0;
- _inv_mass = 1;
- bounce = 0;
- friction = 1;
- omit_force_integration = false;
- applied_torque = 0;
- island_step = 0;
_set_static(false);
- first_time_kinematic = false;
- linear_damp = -1;
- angular_damp = -1;
- area_angular_damp = 0;
- area_linear_damp = 0;
- contact_count = 0;
- gravity_scale = 1.0;
- first_integration = false;
-
- still_time = 0;
- continuous_cd_mode = PhysicsServer2D::CCD_MODE_DISABLED;
- can_sleep = true;
- fi_callback = nullptr;
}
Body2DSW::~Body2DSW() {
- if (fi_callback) {
- memdelete(fi_callback);
- }
-}
-
-PhysicsDirectBodyState2DSW *PhysicsDirectBodyState2DSW::singleton = nullptr;
-
-PhysicsDirectSpaceState2D *PhysicsDirectBodyState2DSW::get_space_state() {
- return body->get_space()->get_direct_state();
-}
-
-Variant PhysicsDirectBodyState2DSW::get_contact_collider_shape_metadata(int p_contact_idx) const {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Variant());
-
- if (!PhysicsServer2DSW::singletonsw->body_owner.owns(body->contacts[p_contact_idx].collider)) {
- return Variant();
+ if (fi_callback_data) {
+ memdelete(fi_callback_data);
}
- Body2DSW *other = PhysicsServer2DSW::singletonsw->body_owner.getornull(body->contacts[p_contact_idx].collider);
-
- int sidx = body->contacts[p_contact_idx].collider_shape;
- if (sidx < 0 || sidx >= other->get_shape_count()) {
- return Variant();
+ if (direct_state) {
+ memdelete(direct_state);
}
-
- return other->get_shape_metadata(sidx);
}
diff --git a/servers/physics_2d/body_2d_sw.h b/servers/physics_2d/body_2d_sw.h
index 74bef433dc..822ff76fae 100644
--- a/servers/physics_2d/body_2d_sw.h
+++ b/servers/physics_2d/body_2d_sw.h
@@ -38,58 +38,66 @@
#include "core/templates/vset.h"
class Constraint2DSW;
+class PhysicsDirectBodyState2DSW;
class Body2DSW : public CollisionObject2DSW {
- PhysicsServer2D::BodyMode mode;
+ PhysicsServer2D::BodyMode mode = PhysicsServer2D::BODY_MODE_DYNAMIC;
Vector2 biased_linear_velocity;
- real_t biased_angular_velocity;
+ real_t biased_angular_velocity = 0.0;
Vector2 linear_velocity;
- real_t angular_velocity;
+ real_t angular_velocity = 0.0;
- real_t linear_damp;
- real_t angular_damp;
- real_t gravity_scale;
+ Vector2 constant_linear_velocity;
+ real_t constant_angular_velocity = 0.0;
- real_t mass;
- real_t inertia;
- real_t bounce;
- real_t friction;
+ real_t linear_damp = -1.0;
+ real_t angular_damp = -1.0;
+ real_t gravity_scale = 1.0;
- real_t _inv_mass;
- real_t _inv_inertia;
- bool user_inertia;
+ real_t bounce = 0.0;
+ real_t friction = 1.0;
+
+ real_t mass = 1.0;
+ real_t _inv_mass = 1.0;
+
+ real_t inertia = 0.0;
+ real_t _inv_inertia = 0.0;
+
+ Vector2 center_of_mass;
+
+ bool calculate_inertia = true;
+ bool calculate_center_of_mass = true;
Vector2 gravity;
- real_t area_linear_damp;
- real_t area_angular_damp;
+ real_t area_linear_damp = 0.0;
+ real_t area_angular_damp = 0.0;
- real_t still_time;
+ real_t still_time = 0.0;
Vector2 applied_force;
- real_t applied_torque;
+ real_t applied_torque = 0.0;
SelfList<Body2DSW> active_list;
- SelfList<Body2DSW> inertia_update_list;
+ SelfList<Body2DSW> mass_properties_update_list;
SelfList<Body2DSW> direct_state_query_list;
VSet<RID> exceptions;
- PhysicsServer2D::CCDMode continuous_cd_mode;
- bool omit_force_integration;
- bool active;
- bool can_sleep;
- bool first_time_kinematic;
- bool first_integration;
- void _update_inertia();
+ PhysicsServer2D::CCDMode continuous_cd_mode = PhysicsServer2D::CCD_MODE_DISABLED;
+ bool omit_force_integration = false;
+ bool active = true;
+ bool can_sleep = true;
+ bool first_time_kinematic = false;
+ void _mass_properties_changed();
virtual void _shapes_changed();
Transform2D new_transform;
List<Pair<Constraint2DSW *, int>> constraint_list;
struct AreaCMP {
- Area2DSW *area;
- int refCount;
+ Area2DSW *area = nullptr;
+ int refCount = 0;
_FORCE_INLINE_ bool operator==(const AreaCMP &p_cmp) const { return area->get_self() == p_cmp.area->get_self(); }
_FORCE_INLINE_ bool operator<(const AreaCMP &p_cmp) const { return area->get_priority() < p_cmp.area->get_priority(); }
_FORCE_INLINE_ AreaCMP() {}
@@ -104,34 +112,42 @@ class Body2DSW : public CollisionObject2DSW {
struct Contact {
Vector2 local_pos;
Vector2 local_normal;
- real_t depth;
- int local_shape;
+ real_t depth = 0.0;
+ int local_shape = 0;
Vector2 collider_pos;
- int collider_shape;
+ int collider_shape = 0;
ObjectID collider_instance_id;
RID collider;
Vector2 collider_velocity_at_pos;
};
Vector<Contact> contacts; //no contacts by default
- int contact_count;
+ int contact_count = 0;
+
+ void *body_state_callback_instance = nullptr;
+ PhysicsServer2D::BodyStateCallback body_state_callback = nullptr;
- struct ForceIntegrationCallback {
+ struct ForceIntegrationCallbackData {
Callable callable;
- Variant callback_udata;
+ Variant udata;
};
- ForceIntegrationCallback *fi_callback;
+ ForceIntegrationCallbackData *fi_callback_data = nullptr;
- uint64_t island_step;
+ PhysicsDirectBodyState2DSW *direct_state = nullptr;
- _FORCE_INLINE_ void _compute_area_gravity_and_dampenings(const Area2DSW *p_area);
+ uint64_t island_step = 0;
+
+ _FORCE_INLINE_ void _compute_area_gravity_and_damping(const Area2DSW *p_area);
friend class PhysicsDirectBodyState2DSW; // i give up, too many functions to expose
public:
+ void set_state_sync_callback(void *p_instance, PhysicsServer2D::BodyStateCallback p_callback);
void set_force_integration_callback(const Callable &p_callable, const Variant &p_udata = Variant());
+ PhysicsDirectBodyState2DSW *get_direct_state();
+
_FORCE_INLINE_ void add_area(Area2DSW *p_area) {
int index = areas.find(AreaCMP(p_area));
if (index > -1) {
@@ -198,7 +214,7 @@ public:
_FORCE_INLINE_ void apply_impulse(const Vector2 &p_impulse, const Vector2 &p_position = Vector2()) {
linear_velocity += p_impulse * _inv_mass;
- angular_velocity += _inv_inertia * p_position.cross(p_impulse);
+ angular_velocity += _inv_inertia * (p_position - center_of_mass).cross(p_impulse);
}
_FORCE_INLINE_ void apply_torque_impulse(real_t p_torque) {
@@ -207,7 +223,7 @@ public:
_FORCE_INLINE_ void apply_bias_impulse(const Vector2 &p_impulse, const Vector2 &p_position = Vector2()) {
biased_linear_velocity += p_impulse * _inv_mass;
- biased_angular_velocity += _inv_inertia * p_position.cross(p_impulse);
+ biased_angular_velocity += _inv_inertia * (p_position - center_of_mass).cross(p_impulse);
}
void set_active(bool p_active);
@@ -220,8 +236,8 @@ public:
set_active(true);
}
- void set_param(PhysicsServer2D::BodyParameter p_param, real_t);
- real_t get_param(PhysicsServer2D::BodyParameter p_param) const;
+ void set_param(PhysicsServer2D::BodyParameter p_param, const Variant &p_value);
+ Variant get_param(PhysicsServer2D::BodyParameter p_param) const;
void set_mode(PhysicsServer2D::BodyMode p_mode);
PhysicsServer2D::BodyMode get_mode() const;
@@ -241,7 +257,7 @@ public:
_FORCE_INLINE_ void add_force(const Vector2 &p_force, const Vector2 &p_position = Vector2()) {
applied_force += p_force;
- applied_torque += p_position.cross(p_force);
+ applied_torque += (p_position - center_of_mass).cross(p_force);
}
_FORCE_INLINE_ void add_torque(real_t p_torque) {
@@ -253,8 +269,10 @@ public:
void set_space(Space2DSW *p_space);
- void update_inertias();
+ void update_mass_properties();
+ void reset_mass_properties();
+ _FORCE_INLINE_ Vector2 get_center_of_mass() const { return center_of_mass; }
_FORCE_INLINE_ real_t get_inv_mass() const { return _inv_mass; }
_FORCE_INLINE_ real_t get_inv_inertia() const { return _inv_inertia; }
_FORCE_INLINE_ real_t get_friction() const { return friction; }
@@ -332,87 +350,4 @@ void Body2DSW::add_contact(const Vector2 &p_local_pos, const Vector2 &p_local_no
c[idx].collider_velocity_at_pos = p_collider_velocity_at_pos;
}
-class PhysicsDirectBodyState2DSW : public PhysicsDirectBodyState2D {
- GDCLASS(PhysicsDirectBodyState2DSW, PhysicsDirectBodyState2D);
-
-public:
- static PhysicsDirectBodyState2DSW *singleton;
- Body2DSW *body;
- real_t step;
-
- virtual Vector2 get_total_gravity() const override { return body->gravity; } // get gravity vector working on this body space/area
- virtual real_t get_total_angular_damp() const override { return body->area_angular_damp; } // get density of this body space/area
- virtual real_t get_total_linear_damp() const override { return body->area_linear_damp; } // get density of this body space/area
-
- virtual real_t get_inverse_mass() const override { return body->get_inv_mass(); } // get the mass
- virtual real_t get_inverse_inertia() const override { return body->get_inv_inertia(); } // get density of this body space
-
- virtual void set_linear_velocity(const Vector2 &p_velocity) override { body->set_linear_velocity(p_velocity); }
- virtual Vector2 get_linear_velocity() const override { return body->get_linear_velocity(); }
-
- virtual void set_angular_velocity(real_t p_velocity) override { body->set_angular_velocity(p_velocity); }
- virtual real_t get_angular_velocity() const override { return body->get_angular_velocity(); }
-
- virtual void set_transform(const Transform2D &p_transform) override { body->set_state(PhysicsServer2D::BODY_STATE_TRANSFORM, p_transform); }
- virtual Transform2D get_transform() const override { return body->get_transform(); }
-
- virtual Vector2 get_velocity_at_local_position(const Vector2 &p_position) const override { return body->get_velocity_in_local_point(p_position); }
-
- virtual void add_central_force(const Vector2 &p_force) override { body->add_central_force(p_force); }
- virtual void add_force(const Vector2 &p_force, const Vector2 &p_position = Vector2()) override { body->add_force(p_force, p_position); }
- virtual void add_torque(real_t p_torque) override { body->add_torque(p_torque); }
- virtual void apply_central_impulse(const Vector2 &p_impulse) override { body->apply_central_impulse(p_impulse); }
- virtual void apply_impulse(const Vector2 &p_impulse, const Vector2 &p_position = Vector2()) override { body->apply_impulse(p_impulse, p_position); }
- virtual void apply_torque_impulse(real_t p_torque) override { body->apply_torque_impulse(p_torque); }
-
- virtual void set_sleep_state(bool p_enable) override { body->set_active(!p_enable); }
- virtual bool is_sleeping() const override { return !body->is_active(); }
-
- virtual int get_contact_count() const override { return body->contact_count; }
-
- virtual Vector2 get_contact_local_position(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector2());
- return body->contacts[p_contact_idx].local_pos;
- }
- virtual Vector2 get_contact_local_normal(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector2());
- return body->contacts[p_contact_idx].local_normal;
- }
- virtual int get_contact_local_shape(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, -1);
- return body->contacts[p_contact_idx].local_shape;
- }
-
- virtual RID get_contact_collider(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, RID());
- return body->contacts[p_contact_idx].collider;
- }
- virtual Vector2 get_contact_collider_position(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector2());
- return body->contacts[p_contact_idx].collider_pos;
- }
- virtual ObjectID get_contact_collider_id(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, ObjectID());
- return body->contacts[p_contact_idx].collider_instance_id;
- }
- virtual int get_contact_collider_shape(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, 0);
- return body->contacts[p_contact_idx].collider_shape;
- }
- virtual Variant get_contact_collider_shape_metadata(int p_contact_idx) const override;
-
- virtual Vector2 get_contact_collider_velocity_at_position(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector2());
- return body->contacts[p_contact_idx].collider_velocity_at_pos;
- }
-
- virtual PhysicsDirectSpaceState2D *get_space_state() override;
-
- virtual real_t get_step() const override { return step; }
- PhysicsDirectBodyState2DSW() {
- singleton = this;
- body = nullptr;
- }
-};
-
#endif // BODY_2D_SW_H
diff --git a/servers/physics_2d/body_direct_state_2d_sw.cpp b/servers/physics_2d/body_direct_state_2d_sw.cpp
new file mode 100644
index 0000000000..22a5fc2b36
--- /dev/null
+++ b/servers/physics_2d/body_direct_state_2d_sw.cpp
@@ -0,0 +1,194 @@
+/*************************************************************************/
+/* body_direct_state_2d_sw.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "body_direct_state_2d_sw.h"
+
+#include "body_2d_sw.h"
+#include "physics_server_2d_sw.h"
+#include "space_2d_sw.h"
+
+Vector2 PhysicsDirectBodyState2DSW::get_total_gravity() const {
+ return body->gravity;
+}
+
+real_t PhysicsDirectBodyState2DSW::get_total_angular_damp() const {
+ return body->area_angular_damp;
+}
+
+real_t PhysicsDirectBodyState2DSW::get_total_linear_damp() const {
+ return body->area_linear_damp;
+}
+
+Vector2 PhysicsDirectBodyState2DSW::get_center_of_mass() const {
+ return body->get_center_of_mass();
+}
+
+real_t PhysicsDirectBodyState2DSW::get_inverse_mass() const {
+ return body->get_inv_mass();
+}
+
+real_t PhysicsDirectBodyState2DSW::get_inverse_inertia() const {
+ return body->get_inv_inertia();
+}
+
+void PhysicsDirectBodyState2DSW::set_linear_velocity(const Vector2 &p_velocity) {
+ body->set_active(true);
+ body->set_linear_velocity(p_velocity);
+}
+
+Vector2 PhysicsDirectBodyState2DSW::get_linear_velocity() const {
+ return body->get_linear_velocity();
+}
+
+void PhysicsDirectBodyState2DSW::set_angular_velocity(real_t p_velocity) {
+ body->set_active(true);
+ body->set_angular_velocity(p_velocity);
+}
+
+real_t PhysicsDirectBodyState2DSW::get_angular_velocity() const {
+ return body->get_angular_velocity();
+}
+
+void PhysicsDirectBodyState2DSW::set_transform(const Transform2D &p_transform) {
+ body->set_state(PhysicsServer2D::BODY_STATE_TRANSFORM, p_transform);
+}
+
+Transform2D PhysicsDirectBodyState2DSW::get_transform() const {
+ return body->get_transform();
+}
+
+Vector2 PhysicsDirectBodyState2DSW::get_velocity_at_local_position(const Vector2 &p_position) const {
+ return body->get_velocity_in_local_point(p_position);
+}
+
+void PhysicsDirectBodyState2DSW::add_central_force(const Vector2 &p_force) {
+ body->set_active(true);
+ body->add_central_force(p_force);
+}
+
+void PhysicsDirectBodyState2DSW::add_force(const Vector2 &p_force, const Vector2 &p_position) {
+ body->set_active(true);
+ body->add_force(p_force, p_position);
+}
+
+void PhysicsDirectBodyState2DSW::add_torque(real_t p_torque) {
+ body->set_active(true);
+ body->add_torque(p_torque);
+}
+
+void PhysicsDirectBodyState2DSW::apply_central_impulse(const Vector2 &p_impulse) {
+ body->set_active(true);
+ body->apply_central_impulse(p_impulse);
+}
+
+void PhysicsDirectBodyState2DSW::apply_impulse(const Vector2 &p_impulse, const Vector2 &p_position) {
+ body->set_active(true);
+ body->apply_impulse(p_impulse, p_position);
+}
+
+void PhysicsDirectBodyState2DSW::apply_torque_impulse(real_t p_torque) {
+ body->set_active(true);
+ body->apply_torque_impulse(p_torque);
+}
+
+void PhysicsDirectBodyState2DSW::set_sleep_state(bool p_enable) {
+ body->set_active(!p_enable);
+}
+
+bool PhysicsDirectBodyState2DSW::is_sleeping() const {
+ return !body->is_active();
+}
+
+int PhysicsDirectBodyState2DSW::get_contact_count() const {
+ return body->contact_count;
+}
+
+Vector2 PhysicsDirectBodyState2DSW::get_contact_local_position(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector2());
+ return body->contacts[p_contact_idx].local_pos;
+}
+
+Vector2 PhysicsDirectBodyState2DSW::get_contact_local_normal(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector2());
+ return body->contacts[p_contact_idx].local_normal;
+}
+
+int PhysicsDirectBodyState2DSW::get_contact_local_shape(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, -1);
+ return body->contacts[p_contact_idx].local_shape;
+}
+
+RID PhysicsDirectBodyState2DSW::get_contact_collider(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, RID());
+ return body->contacts[p_contact_idx].collider;
+}
+Vector2 PhysicsDirectBodyState2DSW::get_contact_collider_position(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector2());
+ return body->contacts[p_contact_idx].collider_pos;
+}
+
+ObjectID PhysicsDirectBodyState2DSW::get_contact_collider_id(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, ObjectID());
+ return body->contacts[p_contact_idx].collider_instance_id;
+}
+
+int PhysicsDirectBodyState2DSW::get_contact_collider_shape(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, 0);
+ return body->contacts[p_contact_idx].collider_shape;
+}
+
+Vector2 PhysicsDirectBodyState2DSW::get_contact_collider_velocity_at_position(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector2());
+ return body->contacts[p_contact_idx].collider_velocity_at_pos;
+}
+
+Variant PhysicsDirectBodyState2DSW::get_contact_collider_shape_metadata(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Variant());
+
+ if (!PhysicsServer2DSW::singletonsw->body_owner.owns(body->contacts[p_contact_idx].collider)) {
+ return Variant();
+ }
+ Body2DSW *other = PhysicsServer2DSW::singletonsw->body_owner.get_or_null(body->contacts[p_contact_idx].collider);
+
+ int sidx = body->contacts[p_contact_idx].collider_shape;
+ if (sidx < 0 || sidx >= other->get_shape_count()) {
+ return Variant();
+ }
+
+ return other->get_shape_metadata(sidx);
+}
+
+PhysicsDirectSpaceState2D *PhysicsDirectBodyState2DSW::get_space_state() {
+ return body->get_space()->get_direct_state();
+}
+
+real_t PhysicsDirectBodyState2DSW::get_step() const {
+ return body->get_space()->get_last_step();
+}
diff --git a/servers/physics_2d/body_direct_state_2d_sw.h b/servers/physics_2d/body_direct_state_2d_sw.h
new file mode 100644
index 0000000000..34faa174d8
--- /dev/null
+++ b/servers/physics_2d/body_direct_state_2d_sw.h
@@ -0,0 +1,92 @@
+/*************************************************************************/
+/* body_direct_state_2d_sw.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef BODY_DIRECT_STATE_2D_SW_H
+#define BODY_DIRECT_STATE_2D_SW_H
+
+#include "servers/physics_server_2d.h"
+
+class Body2DSW;
+
+class PhysicsDirectBodyState2DSW : public PhysicsDirectBodyState2D {
+ GDCLASS(PhysicsDirectBodyState2DSW, PhysicsDirectBodyState2D);
+
+public:
+ Body2DSW *body = nullptr;
+
+ virtual Vector2 get_total_gravity() const override;
+ virtual real_t get_total_angular_damp() const override;
+ virtual real_t get_total_linear_damp() const override;
+
+ virtual Vector2 get_center_of_mass() const override;
+ virtual real_t get_inverse_mass() const override;
+ virtual real_t get_inverse_inertia() const override;
+
+ virtual void set_linear_velocity(const Vector2 &p_velocity) override;
+ virtual Vector2 get_linear_velocity() const override;
+
+ virtual void set_angular_velocity(real_t p_velocity) override;
+ virtual real_t get_angular_velocity() const override;
+
+ virtual void set_transform(const Transform2D &p_transform) override;
+ virtual Transform2D get_transform() const override;
+
+ virtual Vector2 get_velocity_at_local_position(const Vector2 &p_position) const override;
+
+ virtual void add_central_force(const Vector2 &p_force) override;
+ virtual void add_force(const Vector2 &p_force, const Vector2 &p_position = Vector2()) override;
+ virtual void add_torque(real_t p_torque) override;
+ virtual void apply_central_impulse(const Vector2 &p_impulse) override;
+ virtual void apply_impulse(const Vector2 &p_impulse, const Vector2 &p_position = Vector2()) override;
+ virtual void apply_torque_impulse(real_t p_torque) override;
+
+ virtual void set_sleep_state(bool p_enable) override;
+ virtual bool is_sleeping() const override;
+
+ virtual int get_contact_count() const override;
+
+ virtual Vector2 get_contact_local_position(int p_contact_idx) const override;
+ virtual Vector2 get_contact_local_normal(int p_contact_idx) const override;
+ virtual int get_contact_local_shape(int p_contact_idx) const override;
+
+ virtual RID get_contact_collider(int p_contact_idx) const override;
+ virtual Vector2 get_contact_collider_position(int p_contact_idx) const override;
+ virtual ObjectID get_contact_collider_id(int p_contact_idx) const override;
+ virtual int get_contact_collider_shape(int p_contact_idx) const override;
+ virtual Variant get_contact_collider_shape_metadata(int p_contact_idx) const override;
+
+ virtual Vector2 get_contact_collider_velocity_at_position(int p_contact_idx) const override;
+
+ virtual PhysicsDirectSpaceState2D *get_space_state() override;
+
+ virtual real_t get_step() const override;
+};
+
+#endif // BODY_2D_SW_H
diff --git a/servers/physics_2d/body_pair_2d_sw.cpp b/servers/physics_2d/body_pair_2d_sw.cpp
index 91d747b492..8bcc4609f4 100644
--- a/servers/physics_2d/body_pair_2d_sw.cpp
+++ b/servers/physics_2d/body_pair_2d_sw.cpp
@@ -298,7 +298,7 @@ bool BodyPair2DSW::setup(real_t p_step) {
}
if (!prev_collided) {
- if (A->is_shape_set_as_one_way_collision(shape_A)) {
+ if (shape_B_ptr->allows_one_way_collision() && A->is_shape_set_as_one_way_collision(shape_A)) {
Vector2 direction = xform_A.get_axis(1).normalized();
bool valid = false;
for (int i = 0; i < contact_count; i++) {
@@ -319,7 +319,7 @@ bool BodyPair2DSW::setup(real_t p_step) {
}
}
- if (B->is_shape_set_as_one_way_collision(shape_B)) {
+ if (shape_A_ptr->allows_one_way_collision() && B->is_shape_set_as_one_way_collision(shape_B)) {
Vector2 direction = xform_B.get_axis(1).normalized();
bool valid = false;
for (int i = 0; i < contact_count; i++) {
diff --git a/servers/physics_2d/body_pair_2d_sw.h b/servers/physics_2d/body_pair_2d_sw.h
index 849a7e2430..db4f3eba69 100644
--- a/servers/physics_2d/body_pair_2d_sw.h
+++ b/servers/physics_2d/body_pair_2d_sw.h
@@ -59,17 +59,17 @@ class BodyPair2DSW : public Constraint2DSW {
Vector2 position;
Vector2 normal;
Vector2 local_A, local_B;
- real_t acc_normal_impulse; // accumulated normal impulse (Pn)
- real_t acc_tangent_impulse; // accumulated tangent impulse (Pt)
- real_t acc_bias_impulse; // accumulated normal impulse for position bias (Pnb)
- real_t mass_normal, mass_tangent;
- real_t bias;
+ real_t acc_normal_impulse = 0.0; // accumulated normal impulse (Pn)
+ real_t acc_tangent_impulse = 0.0; // accumulated tangent impulse (Pt)
+ real_t acc_bias_impulse = 0.0; // accumulated normal impulse for position bias (Pnb)
+ real_t mass_normal, mass_tangent = 0.0;
+ real_t bias = 0.0;
- real_t depth;
- bool active;
+ real_t depth = 0.0;
+ bool active = false;
Vector2 rA, rB;
- bool reused;
- real_t bounce;
+ bool reused = false;
+ real_t bounce = 0.0;
};
Vector2 offset_B; //use local A coordinates to avoid numerical issues on collision detection
diff --git a/servers/physics_2d/broad_phase_2d_bvh.cpp b/servers/physics_2d/broad_phase_2d_bvh.cpp
index 5f53f4a012..0df7086c5a 100644
--- a/servers/physics_2d/broad_phase_2d_bvh.cpp
+++ b/servers/physics_2d/broad_phase_2d_bvh.cpp
@@ -110,7 +110,4 @@ BroadPhase2DSW *BroadPhase2DBVH::_create() {
BroadPhase2DBVH::BroadPhase2DBVH() {
bvh.set_pair_callback(_pair_callback, this);
bvh.set_unpair_callback(_unpair_callback, this);
- pair_callback = nullptr;
- pair_userdata = nullptr;
- unpair_userdata = nullptr;
}
diff --git a/servers/physics_2d/broad_phase_2d_bvh.h b/servers/physics_2d/broad_phase_2d_bvh.h
index 6c11d2561b..ea02a98417 100644
--- a/servers/physics_2d/broad_phase_2d_bvh.h
+++ b/servers/physics_2d/broad_phase_2d_bvh.h
@@ -42,10 +42,10 @@ class BroadPhase2DBVH : public BroadPhase2DSW {
static void *_pair_callback(void *, uint32_t, CollisionObject2DSW *, int, uint32_t, CollisionObject2DSW *, int);
static void _unpair_callback(void *, uint32_t, CollisionObject2DSW *, int, uint32_t, CollisionObject2DSW *, int, void *);
- PairCallback pair_callback;
- void *pair_userdata;
- UnpairCallback unpair_callback;
- void *unpair_userdata;
+ PairCallback pair_callback = nullptr;
+ void *pair_userdata = nullptr;
+ UnpairCallback unpair_callback = nullptr;
+ void *unpair_userdata = nullptr;
public:
// 0 is an invalid ID
diff --git a/servers/physics_2d/collision_object_2d_sw.cpp b/servers/physics_2d/collision_object_2d_sw.cpp
index 5d1ef83165..c92f01d120 100644
--- a/servers/physics_2d/collision_object_2d_sw.cpp
+++ b/servers/physics_2d/collision_object_2d_sw.cpp
@@ -244,10 +244,5 @@ void CollisionObject2DSW::_shape_changed() {
CollisionObject2DSW::CollisionObject2DSW(Type p_type) :
pending_shape_update_list(this) {
- _static = true;
type = p_type;
- space = nullptr;
- collision_mask = 1;
- collision_layer = 1;
- pickable = true;
}
diff --git a/servers/physics_2d/collision_object_2d_sw.h b/servers/physics_2d/collision_object_2d_sw.h
index 55ffa9b1b8..69487631a6 100644
--- a/servers/physics_2d/collision_object_2d_sw.h
+++ b/servers/physics_2d/collision_object_2d_sw.h
@@ -50,32 +50,27 @@ private:
RID self;
ObjectID instance_id;
ObjectID canvas_instance_id;
- bool pickable;
+ bool pickable = true;
struct Shape {
Transform2D xform;
Transform2D xform_inv;
- BroadPhase2DSW::ID bpid;
+ BroadPhase2DSW::ID bpid = 0;
Rect2 aabb_cache; //for rayqueries
- Shape2DSW *shape;
+ Shape2DSW *shape = nullptr;
Variant metadata;
- bool disabled;
- bool one_way_collision;
- real_t one_way_collision_margin;
- Shape() {
- disabled = false;
- one_way_collision = false;
- one_way_collision_margin = 0;
- }
+ bool disabled = false;
+ bool one_way_collision = false;
+ real_t one_way_collision_margin = 0.0;
};
Vector<Shape> shapes;
- Space2DSW *space;
+ Space2DSW *space = nullptr;
Transform2D transform;
Transform2D inv_transform;
- uint32_t collision_mask;
- uint32_t collision_layer;
- bool _static;
+ uint32_t collision_mask = 1;
+ uint32_t collision_layer = 1;
+ bool _static = true;
SelfList<CollisionObject2DSW> pending_shape_update_list;
diff --git a/servers/physics_2d/collision_solver_2d_sat.cpp b/servers/physics_2d/collision_solver_2d_sat.cpp
index 30a99d3d74..2e67cc6520 100644
--- a/servers/physics_2d/collision_solver_2d_sat.cpp
+++ b/servers/physics_2d/collision_solver_2d_sat.cpp
@@ -34,11 +34,11 @@
struct _CollectorCallback2D {
CollisionSolver2DSW::CallbackResult callback;
- void *userdata;
- bool swap;
- bool collided;
+ void *userdata = nullptr;
+ bool swap = false;
+ bool collided = false;
Vector2 normal;
- Vector2 *sep_axis;
+ Vector2 *sep_axis = nullptr;
_FORCE_INLINE_ void call(const Vector2 &p_point_A, const Vector2 &p_point_B) {
/*
@@ -75,9 +75,9 @@ _FORCE_INLINE_ static void _generate_contacts_point_edge(const Vector2 *p_points
}
struct _generate_contacts_Pair {
- bool a;
- int idx;
- real_t d;
+ bool a = false;
+ int idx = 0;
+ real_t d = 0.0;
_FORCE_INLINE_ bool operator<(const _generate_contacts_Pair &l) const { return d < l.d; }
};
@@ -146,10 +146,10 @@ static void _generate_contacts_from_supports(const Vector2 *p_points_A, int p_po
}
};
- int pointcount_B;
- int pointcount_A;
- const Vector2 *points_A;
- const Vector2 *points_B;
+ int pointcount_B = 0;
+ int pointcount_A = 0;
+ const Vector2 *points_A = nullptr;
+ const Vector2 *points_B = nullptr;
if (p_point_count_A > p_point_count_B) {
//swap
@@ -177,18 +177,20 @@ static void _generate_contacts_from_supports(const Vector2 *p_points_A, int p_po
template <class ShapeA, class ShapeB, bool castA = false, bool castB = false, bool withMargin = false>
class SeparatorAxisTest2D {
- const ShapeA *shape_A;
- const ShapeB *shape_B;
- const Transform2D *transform_A;
- const Transform2D *transform_B;
- real_t best_depth;
+ const ShapeA *shape_A = nullptr;
+ const ShapeB *shape_B = nullptr;
+ const Transform2D *transform_A = nullptr;
+ const Transform2D *transform_B = nullptr;
+ real_t best_depth = 1e15;
Vector2 best_axis;
- int best_axis_count;
- int best_axis_index;
+#ifdef DEBUG_ENABLED
+ int best_axis_count = 0;
+ int best_axis_index = -1;
+#endif
Vector2 motion_A;
Vector2 motion_B;
- real_t margin_A;
- real_t margin_B;
+ real_t margin_A = 0.0;
+ real_t margin_B = 0.0;
_CollectorCallback2D *callback;
public:
@@ -364,19 +366,13 @@ public:
_FORCE_INLINE_ SeparatorAxisTest2D(const ShapeA *p_shape_A, const Transform2D &p_transform_a, const ShapeB *p_shape_B, const Transform2D &p_transform_b, _CollectorCallback2D *p_collector, const Vector2 &p_motion_A = Vector2(), const Vector2 &p_motion_B = Vector2(), real_t p_margin_A = 0, real_t p_margin_B = 0) {
margin_A = p_margin_A;
margin_B = p_margin_B;
- best_depth = 1e15;
shape_A = p_shape_A;
shape_B = p_shape_B;
transform_A = &p_transform_a;
transform_B = &p_transform_b;
motion_A = p_motion_A;
motion_B = p_motion_B;
-
callback = p_collector;
-#ifdef DEBUG_ENABLED
- best_axis_count = 0;
- best_axis_index = -1;
-#endif
}
};
@@ -1114,12 +1110,14 @@ static void _collision_convex_polygon_convex_polygon(const Shape2DSW *p_a, const
bool sat_2d_calculate_penetration(const Shape2DSW *p_shape_A, const Transform2D &p_transform_A, const Vector2 &p_motion_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, const Vector2 &p_motion_B, CollisionSolver2DSW::CallbackResult p_result_callback, void *p_userdata, bool p_swap, Vector2 *sep_axis, real_t p_margin_A, real_t p_margin_B) {
PhysicsServer2D::ShapeType type_A = p_shape_A->get_type();
- ERR_FAIL_COND_V(type_A == PhysicsServer2D::SHAPE_WORLD_MARGIN, false);
+ ERR_FAIL_COND_V(type_A == PhysicsServer2D::SHAPE_WORLD_BOUNDARY, false);
+ ERR_FAIL_COND_V(type_A == PhysicsServer2D::SHAPE_SEPARATION_RAY, false);
ERR_FAIL_COND_V(p_shape_A->is_concave(), false);
PhysicsServer2D::ShapeType type_B = p_shape_B->get_type();
- ERR_FAIL_COND_V(type_B == PhysicsServer2D::SHAPE_WORLD_MARGIN, false);
+ ERR_FAIL_COND_V(type_B == PhysicsServer2D::SHAPE_WORLD_BOUNDARY, false);
+ ERR_FAIL_COND_V(type_B == PhysicsServer2D::SHAPE_SEPARATION_RAY, false);
ERR_FAIL_COND_V(p_shape_B->is_concave(), false);
static const CollisionFunc collision_table[5][5] = {
@@ -1382,23 +1380,23 @@ bool sat_2d_calculate_penetration(const Shape2DSW *p_shape_A, const Transform2D
if (p_margin_A || p_margin_B) {
if (*motion_A == Vector2() && *motion_B == Vector2()) {
- collision_func = collision_table_margin[type_A - 1][type_B - 1];
+ collision_func = collision_table_margin[type_A - 2][type_B - 2];
} else if (*motion_A != Vector2() && *motion_B == Vector2()) {
- collision_func = collision_table_castA_margin[type_A - 1][type_B - 1];
+ collision_func = collision_table_castA_margin[type_A - 2][type_B - 2];
} else if (*motion_A == Vector2() && *motion_B != Vector2()) {
- collision_func = collision_table_castB_margin[type_A - 1][type_B - 1];
+ collision_func = collision_table_castB_margin[type_A - 2][type_B - 2];
} else {
- collision_func = collision_table_castA_castB_margin[type_A - 1][type_B - 1];
+ collision_func = collision_table_castA_castB_margin[type_A - 2][type_B - 2];
}
} else {
if (*motion_A == Vector2() && *motion_B == Vector2()) {
- collision_func = collision_table[type_A - 1][type_B - 1];
+ collision_func = collision_table[type_A - 2][type_B - 2];
} else if (*motion_A != Vector2() && *motion_B == Vector2()) {
- collision_func = collision_table_castA[type_A - 1][type_B - 1];
+ collision_func = collision_table_castA[type_A - 2][type_B - 2];
} else if (*motion_A == Vector2() && *motion_B != Vector2()) {
- collision_func = collision_table_castB[type_A - 1][type_B - 1];
+ collision_func = collision_table_castB[type_A - 2][type_B - 2];
} else {
- collision_func = collision_table_castA_castB[type_A - 1][type_B - 1];
+ collision_func = collision_table_castA_castB[type_A - 2][type_B - 2];
}
}
diff --git a/servers/physics_2d/collision_solver_2d_sw.cpp b/servers/physics_2d/collision_solver_2d_sw.cpp
index 8f8a4a862c..527bb1b0b2 100644
--- a/servers/physics_2d/collision_solver_2d_sw.cpp
+++ b/servers/physics_2d/collision_solver_2d_sw.cpp
@@ -34,14 +34,14 @@
#define collision_solver sat_2d_calculate_penetration
//#define collision_solver gjk_epa_calculate_penetration
-bool CollisionSolver2DSW::solve_static_world_margin(const Shape2DSW *p_shape_A, const Transform2D &p_transform_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result) {
- const WorldMarginShape2DSW *world_margin = static_cast<const WorldMarginShape2DSW *>(p_shape_A);
- if (p_shape_B->get_type() == PhysicsServer2D::SHAPE_WORLD_MARGIN) {
+bool CollisionSolver2DSW::solve_static_world_boundary(const Shape2DSW *p_shape_A, const Transform2D &p_transform_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result) {
+ const WorldBoundaryShape2DSW *world_boundary = static_cast<const WorldBoundaryShape2DSW *>(p_shape_A);
+ if (p_shape_B->get_type() == PhysicsServer2D::SHAPE_WORLD_BOUNDARY) {
return false;
}
- Vector2 n = p_transform_A.basis_xform(world_margin->get_normal()).normalized();
- Vector2 p = p_transform_A.xform(world_margin->get_normal() * world_margin->get_d());
+ Vector2 n = p_transform_A.basis_xform(world_boundary->get_normal()).normalized();
+ Vector2 p = p_transform_A.xform(world_boundary->get_normal() * world_boundary->get_d());
real_t d = n.dot(p);
Vector2 supports[2];
@@ -73,40 +73,99 @@ bool CollisionSolver2DSW::solve_static_world_margin(const Shape2DSW *p_shape_A,
return found;
}
+bool CollisionSolver2DSW::solve_separation_ray(const Shape2DSW *p_shape_A, const Vector2 &p_motion_A, const Transform2D &p_transform_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result, Vector2 *r_sep_axis, real_t p_margin) {
+ const SeparationRayShape2DSW *ray = static_cast<const SeparationRayShape2DSW *>(p_shape_A);
+ if (p_shape_B->get_type() == PhysicsServer2D::SHAPE_SEPARATION_RAY) {
+ return false;
+ }
+
+ Vector2 from = p_transform_A.get_origin();
+ Vector2 to = from + p_transform_A[1] * (ray->get_length() + p_margin);
+ if (p_motion_A != Vector2()) {
+ //not the best but should be enough
+ Vector2 normal = (to - from).normalized();
+ to += normal * MAX(0.0, normal.dot(p_motion_A));
+ }
+ Vector2 support_A = to;
+
+ Transform2D invb = p_transform_B.affine_inverse();
+ from = invb.xform(from);
+ to = invb.xform(to);
+
+ Vector2 p, n;
+ if (!p_shape_B->intersect_segment(from, to, p, n)) {
+ if (r_sep_axis) {
+ *r_sep_axis = p_transform_A[1].normalized();
+ }
+ return false;
+ }
+
+ // Discard contacts when the ray is fully contained inside the shape.
+ if (n == Vector2()) {
+ if (r_sep_axis) {
+ *r_sep_axis = p_transform_A[1].normalized();
+ }
+ return false;
+ }
+
+ // Discard contacts in the wrong direction.
+ if (n.dot(from - to) < CMP_EPSILON) {
+ if (r_sep_axis) {
+ *r_sep_axis = p_transform_A[1].normalized();
+ }
+ return false;
+ }
+
+ Vector2 support_B = p_transform_B.xform(p);
+ if (ray->get_slide_on_slope()) {
+ Vector2 global_n = invb.basis_xform_inv(n).normalized();
+ support_B = support_A + (support_B - support_A).length() * global_n;
+ }
+
+ if (p_result_callback) {
+ if (p_swap_result) {
+ p_result_callback(support_B, support_A, p_userdata);
+ } else {
+ p_result_callback(support_A, support_B, p_userdata);
+ }
+ }
+ return true;
+}
+
struct _ConcaveCollisionInfo2D {
- const Transform2D *transform_A;
- const Shape2DSW *shape_A;
- const Transform2D *transform_B;
+ const Transform2D *transform_A = nullptr;
+ const Shape2DSW *shape_A = nullptr;
+ const Transform2D *transform_B = nullptr;
Vector2 motion_A;
Vector2 motion_B;
- real_t margin_A;
- real_t margin_B;
+ real_t margin_A = 0.0;
+ real_t margin_B = 0.0;
CollisionSolver2DSW::CallbackResult result_callback;
- void *userdata;
- bool swap_result;
- bool collided;
- int aabb_tests;
- int collisions;
- Vector2 *sep_axis;
+ void *userdata = nullptr;
+ bool swap_result = false;
+ bool collided = false;
+ int aabb_tests = 0;
+ int collisions = 0;
+ Vector2 *sep_axis = nullptr;
};
-void CollisionSolver2DSW::concave_callback(void *p_userdata, Shape2DSW *p_convex) {
+bool CollisionSolver2DSW::concave_callback(void *p_userdata, Shape2DSW *p_convex) {
_ConcaveCollisionInfo2D &cinfo = *(_ConcaveCollisionInfo2D *)(p_userdata);
cinfo.aabb_tests++;
- if (!cinfo.result_callback && cinfo.collided) {
- return; //already collided and no contacts requested, don't test anymore
- }
bool collided = collision_solver(cinfo.shape_A, *cinfo.transform_A, cinfo.motion_A, p_convex, *cinfo.transform_B, cinfo.motion_B, cinfo.result_callback, cinfo.userdata, cinfo.swap_result, cinfo.sep_axis, cinfo.margin_A, cinfo.margin_B);
if (!collided) {
- return;
+ return false;
}
cinfo.collided = true;
cinfo.collisions++;
+
+ // Stop at first collision if contacts are not needed.
+ return !cinfo.result_callback;
}
-bool CollisionSolver2DSW::solve_concave(const Shape2DSW *p_shape_A, const Transform2D &p_transform_A, const Vector2 &p_motion_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, const Vector2 &p_motion_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result, Vector2 *sep_axis, real_t p_margin_A, real_t p_margin_B) {
+bool CollisionSolver2DSW::solve_concave(const Shape2DSW *p_shape_A, const Transform2D &p_transform_A, const Vector2 &p_motion_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, const Vector2 &p_motion_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result, Vector2 *r_sep_axis, real_t p_margin_A, real_t p_margin_B) {
const ConcaveShape2DSW *concave_B = static_cast<const ConcaveShape2DSW *>(p_shape_B);
_ConcaveCollisionInfo2D cinfo;
@@ -119,7 +178,7 @@ bool CollisionSolver2DSW::solve_concave(const Shape2DSW *p_shape_A, const Transf
cinfo.swap_result = p_swap_result;
cinfo.collided = false;
cinfo.collisions = 0;
- cinfo.sep_axis = sep_axis;
+ cinfo.sep_axis = r_sep_axis;
cinfo.margin_A = p_margin_A;
cinfo.margin_B = p_margin_B;
@@ -150,7 +209,7 @@ bool CollisionSolver2DSW::solve_concave(const Shape2DSW *p_shape_A, const Transf
return cinfo.collided;
}
-bool CollisionSolver2DSW::solve(const Shape2DSW *p_shape_A, const Transform2D &p_transform_A, const Vector2 &p_motion_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, const Vector2 &p_motion_B, CallbackResult p_result_callback, void *p_userdata, Vector2 *sep_axis, real_t p_margin_A, real_t p_margin_B) {
+bool CollisionSolver2DSW::solve(const Shape2DSW *p_shape_A, const Transform2D &p_transform_A, const Vector2 &p_motion_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, const Vector2 &p_motion_B, CallbackResult p_result_callback, void *p_userdata, Vector2 *r_sep_axis, real_t p_margin_A, real_t p_margin_B) {
PhysicsServer2D::ShapeType type_A = p_shape_A->get_type();
PhysicsServer2D::ShapeType type_B = p_shape_B->get_type();
bool concave_A = p_shape_A->is_concave();
@@ -166,15 +225,26 @@ bool CollisionSolver2DSW::solve(const Shape2DSW *p_shape_A, const Transform2D &p
swap = true;
}
- if (type_A == PhysicsServer2D::SHAPE_WORLD_MARGIN) {
- if (type_B == PhysicsServer2D::SHAPE_WORLD_MARGIN) {
+ if (type_A == PhysicsServer2D::SHAPE_WORLD_BOUNDARY) {
+ if (type_B == PhysicsServer2D::SHAPE_WORLD_BOUNDARY) {
return false;
}
if (swap) {
- return solve_static_world_margin(p_shape_B, p_transform_B, p_shape_A, p_transform_A, p_result_callback, p_userdata, true);
+ return solve_static_world_boundary(p_shape_B, p_transform_B, p_shape_A, p_transform_A, p_result_callback, p_userdata, true);
+ } else {
+ return solve_static_world_boundary(p_shape_A, p_transform_A, p_shape_B, p_transform_B, p_result_callback, p_userdata, false);
+ }
+
+ } else if (type_A == PhysicsServer2D::SHAPE_SEPARATION_RAY) {
+ if (type_B == PhysicsServer2D::SHAPE_SEPARATION_RAY) {
+ return false; //no ray-ray
+ }
+
+ if (swap) {
+ return solve_separation_ray(p_shape_B, p_motion_B, p_transform_B, p_shape_A, p_transform_A, p_result_callback, p_userdata, true, r_sep_axis, p_margin_B);
} else {
- return solve_static_world_margin(p_shape_A, p_transform_A, p_shape_B, p_transform_B, p_result_callback, p_userdata, false);
+ return solve_separation_ray(p_shape_A, p_motion_A, p_transform_A, p_shape_B, p_transform_B, p_result_callback, p_userdata, false, r_sep_axis, p_margin_A);
}
} else if (concave_B) {
@@ -183,12 +253,12 @@ bool CollisionSolver2DSW::solve(const Shape2DSW *p_shape_A, const Transform2D &p
}
if (!swap) {
- return solve_concave(p_shape_A, p_transform_A, p_motion_A, p_shape_B, p_transform_B, p_motion_B, p_result_callback, p_userdata, false, sep_axis, margin_A, margin_B);
+ return solve_concave(p_shape_A, p_transform_A, p_motion_A, p_shape_B, p_transform_B, p_motion_B, p_result_callback, p_userdata, false, r_sep_axis, margin_A, margin_B);
} else {
- return solve_concave(p_shape_B, p_transform_B, p_motion_B, p_shape_A, p_transform_A, p_motion_A, p_result_callback, p_userdata, true, sep_axis, margin_A, margin_B);
+ return solve_concave(p_shape_B, p_transform_B, p_motion_B, p_shape_A, p_transform_A, p_motion_A, p_result_callback, p_userdata, true, r_sep_axis, margin_A, margin_B);
}
} else {
- return collision_solver(p_shape_A, p_transform_A, p_motion_A, p_shape_B, p_transform_B, p_motion_B, p_result_callback, p_userdata, false, sep_axis, margin_A, margin_B);
+ return collision_solver(p_shape_A, p_transform_A, p_motion_A, p_shape_B, p_transform_B, p_motion_B, p_result_callback, p_userdata, false, r_sep_axis, margin_A, margin_B);
}
}
diff --git a/servers/physics_2d/collision_solver_2d_sw.h b/servers/physics_2d/collision_solver_2d_sw.h
index 17c0c2fe70..b87247b89a 100644
--- a/servers/physics_2d/collision_solver_2d_sw.h
+++ b/servers/physics_2d/collision_solver_2d_sw.h
@@ -38,13 +38,13 @@ public:
typedef void (*CallbackResult)(const Vector2 &p_point_A, const Vector2 &p_point_B, void *p_userdata);
private:
- static bool solve_static_world_margin(const Shape2DSW *p_shape_A, const Transform2D &p_transform_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result);
- static void concave_callback(void *p_userdata, Shape2DSW *p_convex);
- static bool solve_concave(const Shape2DSW *p_shape_A, const Transform2D &p_transform_A, const Vector2 &p_motion_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, const Vector2 &p_motion_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result, Vector2 *sep_axis = nullptr, real_t p_margin_A = 0, real_t p_margin_B = 0);
- static bool solve_raycast(const Shape2DSW *p_shape_A, const Vector2 &p_motion_A, const Transform2D &p_transform_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result, Vector2 *sep_axis = nullptr);
+ static bool solve_static_world_boundary(const Shape2DSW *p_shape_A, const Transform2D &p_transform_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result);
+ static bool concave_callback(void *p_userdata, Shape2DSW *p_convex);
+ static bool solve_concave(const Shape2DSW *p_shape_A, const Transform2D &p_transform_A, const Vector2 &p_motion_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, const Vector2 &p_motion_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result, Vector2 *r_sep_axis = nullptr, real_t p_margin_A = 0, real_t p_margin_B = 0);
+ static bool solve_separation_ray(const Shape2DSW *p_shape_A, const Vector2 &p_motion_A, const Transform2D &p_transform_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result, Vector2 *r_sep_axis = nullptr, real_t p_margin = 0);
public:
- static bool solve(const Shape2DSW *p_shape_A, const Transform2D &p_transform_A, const Vector2 &p_motion_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, const Vector2 &p_motion_B, CallbackResult p_result_callback, void *p_userdata, Vector2 *sep_axis = nullptr, real_t p_margin_A = 0, real_t p_margin_B = 0);
+ static bool solve(const Shape2DSW *p_shape_A, const Transform2D &p_transform_A, const Vector2 &p_motion_A, const Shape2DSW *p_shape_B, const Transform2D &p_transform_B, const Vector2 &p_motion_B, CallbackResult p_result_callback, void *p_userdata, Vector2 *r_sep_axis = nullptr, real_t p_margin_A = 0, real_t p_margin_B = 0);
};
#endif // COLLISION_SOLVER_2D_SW_H
diff --git a/servers/physics_2d/constraint_2d_sw.h b/servers/physics_2d/constraint_2d_sw.h
index 5e8dfbe570..df300d666d 100644
--- a/servers/physics_2d/constraint_2d_sw.h
+++ b/servers/physics_2d/constraint_2d_sw.h
@@ -36,8 +36,8 @@
class Constraint2DSW {
Body2DSW **_body_ptr;
int _body_count;
- uint64_t island_step;
- bool disabled_collisions_between_bodies;
+ uint64_t island_step = 0;
+ bool disabled_collisions_between_bodies = true;
RID self;
@@ -45,8 +45,6 @@ protected:
Constraint2DSW(Body2DSW **p_body_ptr = nullptr, int p_body_count = 0) {
_body_ptr = p_body_ptr;
_body_count = p_body_count;
- island_step = 0;
- disabled_collisions_between_bodies = true;
}
public:
diff --git a/servers/physics_2d/joints_2d_sw.cpp b/servers/physics_2d/joints_2d_sw.cpp
index 5a0a628fbc..b46397b8e6 100644
--- a/servers/physics_2d/joints_2d_sw.cpp
+++ b/servers/physics_2d/joints_2d_sw.cpp
@@ -64,17 +64,17 @@ void Joint2DSW::copy_settings_from(Joint2DSW *p_joint) {
}
static inline real_t k_scalar(Body2DSW *a, Body2DSW *b, const Vector2 &rA, const Vector2 &rB, const Vector2 &n) {
- real_t value = 0;
+ real_t value = 0.0;
{
value += a->get_inv_mass();
- real_t rcn = rA.cross(n);
+ real_t rcn = (rA - a->get_center_of_mass()).cross(n);
value += a->get_inv_inertia() * rcn * rcn;
}
if (b) {
value += b->get_inv_mass();
- real_t rcn = rB.cross(n);
+ real_t rcn = (rB - b->get_center_of_mass()).cross(n);
value += b->get_inv_inertia() * rcn * rcn;
}
@@ -83,9 +83,9 @@ static inline real_t k_scalar(Body2DSW *a, Body2DSW *b, const Vector2 &rA, const
static inline Vector2
relative_velocity(Body2DSW *a, Body2DSW *b, Vector2 rA, Vector2 rB) {
- Vector2 sum = a->get_linear_velocity() - rA.orthogonal() * a->get_angular_velocity();
+ Vector2 sum = a->get_linear_velocity() - (rA - a->get_center_of_mass()).orthogonal() * a->get_angular_velocity();
if (b) {
- return (b->get_linear_velocity() - rB.orthogonal() * b->get_angular_velocity()) - sum;
+ return (b->get_linear_velocity() - (rB - b->get_center_of_mass()).orthogonal() * b->get_angular_velocity()) - sum;
} else {
return -sum;
}
@@ -172,11 +172,11 @@ bool PinJoint2DSW::pre_solve(real_t p_step) {
void PinJoint2DSW::solve(real_t p_step) {
// compute relative velocity
- Vector2 vA = A->get_linear_velocity() - custom_cross(rA, A->get_angular_velocity());
+ Vector2 vA = A->get_linear_velocity() - custom_cross(rA - A->get_center_of_mass(), A->get_angular_velocity());
Vector2 rel_vel;
if (B) {
- rel_vel = B->get_linear_velocity() - custom_cross(rB, B->get_angular_velocity()) - vA;
+ rel_vel = B->get_linear_velocity() - custom_cross(rB - B->get_center_of_mass(), B->get_angular_velocity()) - vA;
} else {
rel_vel = -vA;
}
@@ -213,8 +213,6 @@ PinJoint2DSW::PinJoint2DSW(const Vector2 &p_pos, Body2DSW *p_body_a, Body2DSW *p
anchor_A = p_body_a->get_inv_transform().xform(p_pos);
anchor_B = p_body_b ? p_body_b->get_inv_transform().xform(p_pos) : p_pos;
- softness = 0;
-
p_body_a->add_constraint(this, 0);
if (p_body_b) {
p_body_b->add_constraint(this, 1);
@@ -238,6 +236,9 @@ k_tensor(Body2DSW *a, Body2DSW *b, Vector2 r1, Vector2 r2, Vector2 *k1, Vector2
k21 = 0.0f;
k22 = m_sum;
+ r1 -= a->get_center_of_mass();
+ r2 -= b->get_center_of_mass();
+
// add the influence from r1
real_t a_i_inv = a->get_inv_inertia();
real_t r1xsq = r1.x * r1.x * a_i_inv;
@@ -479,8 +480,6 @@ DampedSpringJoint2DSW::DampedSpringJoint2DSW(const Vector2 &p_anchor_a, const Ve
anchor_B = B->get_inv_transform().xform(p_anchor_b);
rest_length = p_anchor_a.distance_to(p_anchor_b);
- stiffness = 20;
- damping = 1.5;
A->add_constraint(this, 0);
B->add_constraint(this, 1);
diff --git a/servers/physics_2d/joints_2d_sw.h b/servers/physics_2d/joints_2d_sw.h
index ccc5c585a0..e2a7c0c91e 100644
--- a/servers/physics_2d/joints_2d_sw.h
+++ b/servers/physics_2d/joints_2d_sw.h
@@ -35,9 +35,9 @@
#include "constraint_2d_sw.h"
class Joint2DSW : public Constraint2DSW {
- real_t max_force;
- real_t bias;
- real_t max_bias;
+ real_t bias = 0;
+ real_t max_bias = 3.40282e+38;
+ real_t max_force = 3.40282e+38;
protected:
bool dynamic_A = false;
@@ -61,10 +61,7 @@ public:
virtual PhysicsServer2D::JointType get_type() const { return PhysicsServer2D::JOINT_TYPE_MAX; }
Joint2DSW(Body2DSW **p_body_ptr = nullptr, int p_body_count = 0) :
- Constraint2DSW(p_body_ptr, p_body_count) {
- bias = 0;
- max_force = max_bias = 3.40282e+38;
- };
+ Constraint2DSW(p_body_ptr, p_body_count) {}
virtual ~Joint2DSW() {
for (int i = 0; i < get_body_count(); i++) {
@@ -83,7 +80,7 @@ class PinJoint2DSW : public Joint2DSW {
Body2DSW *B;
};
- Body2DSW *_arr[2];
+ Body2DSW *_arr[2] = { nullptr, nullptr };
};
Transform2D M;
@@ -92,7 +89,7 @@ class PinJoint2DSW : public Joint2DSW {
Vector2 anchor_B;
Vector2 bias;
Vector2 P;
- real_t softness;
+ real_t softness = 0.0;
public:
virtual PhysicsServer2D::JointType get_type() const override { return PhysicsServer2D::JOINT_TYPE_PIN; }
@@ -114,7 +111,7 @@ class GrooveJoint2DSW : public Joint2DSW {
Body2DSW *B;
};
- Body2DSW *_arr[2];
+ Body2DSW *_arr[2] = { nullptr, nullptr };
};
Vector2 A_groove_1;
@@ -123,13 +120,13 @@ class GrooveJoint2DSW : public Joint2DSW {
Vector2 B_anchor;
Vector2 jn_acc;
Vector2 gbias;
- real_t jn_max;
- real_t clamp;
+ real_t jn_max = 0.0;
+ real_t clamp = 0.0;
Vector2 xf_normal;
Vector2 rA, rB;
Vector2 k1, k2;
- bool correct;
+ bool correct = false;
public:
virtual PhysicsServer2D::JointType get_type() const override { return PhysicsServer2D::JOINT_TYPE_GROOVE; }
@@ -148,22 +145,22 @@ class DampedSpringJoint2DSW : public Joint2DSW {
Body2DSW *B;
};
- Body2DSW *_arr[2];
+ Body2DSW *_arr[2] = { nullptr, nullptr };
};
Vector2 anchor_A;
Vector2 anchor_B;
- real_t rest_length;
- real_t damping;
- real_t stiffness;
+ real_t rest_length = 0.0;
+ real_t damping = 1.5;
+ real_t stiffness = 20.0;
Vector2 rA, rB;
Vector2 n;
Vector2 j;
- real_t n_mass;
- real_t target_vrn;
- real_t v_coef;
+ real_t n_mass = 0.0;
+ real_t target_vrn = 0.0;
+ real_t v_coef = 0.0;
public:
virtual PhysicsServer2D::JointType get_type() const override { return PhysicsServer2D::JOINT_TYPE_DAMPED_SPRING; }
diff --git a/servers/physics_2d/physics_server_2d_sw.cpp b/servers/physics_2d/physics_server_2d_sw.cpp
index 88c097453e..b4338217df 100644
--- a/servers/physics_2d/physics_server_2d_sw.cpp
+++ b/servers/physics_2d/physics_server_2d_sw.cpp
@@ -30,6 +30,7 @@
#include "physics_server_2d_sw.h"
+#include "body_direct_state_2d_sw.h"
#include "broad_phase_2d_bvh.h"
#include "collision_solver_2d_sw.h"
#include "core/config/project_settings.h"
@@ -42,8 +43,11 @@
RID PhysicsServer2DSW::_shape_create(ShapeType p_shape) {
Shape2DSW *shape = nullptr;
switch (p_shape) {
- case SHAPE_WORLD_MARGIN: {
- shape = memnew(WorldMarginShape2DSW);
+ case SHAPE_WORLD_BOUNDARY: {
+ shape = memnew(WorldBoundaryShape2DSW);
+ } break;
+ case SHAPE_SEPARATION_RAY: {
+ shape = memnew(SeparationRayShape2DSW);
} break;
case SHAPE_SEGMENT: {
shape = memnew(SegmentShape2DSW);
@@ -75,8 +79,12 @@ RID PhysicsServer2DSW::_shape_create(ShapeType p_shape) {
return id;
}
-RID PhysicsServer2DSW::world_margin_shape_create() {
- return _shape_create(SHAPE_WORLD_MARGIN);
+RID PhysicsServer2DSW::world_boundary_shape_create() {
+ return _shape_create(SHAPE_WORLD_BOUNDARY);
+}
+
+RID PhysicsServer2DSW::separation_ray_shape_create() {
+ return _shape_create(SHAPE_SEPARATION_RAY);
}
RID PhysicsServer2DSW::segment_shape_create() {
@@ -104,32 +112,32 @@ RID PhysicsServer2DSW::concave_polygon_shape_create() {
}
void PhysicsServer2DSW::shape_set_data(RID p_shape, const Variant &p_data) {
- Shape2DSW *shape = shape_owner.getornull(p_shape);
+ Shape2DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
shape->set_data(p_data);
};
void PhysicsServer2DSW::shape_set_custom_solver_bias(RID p_shape, real_t p_bias) {
- Shape2DSW *shape = shape_owner.getornull(p_shape);
+ Shape2DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
shape->set_custom_bias(p_bias);
}
PhysicsServer2D::ShapeType PhysicsServer2DSW::shape_get_type(RID p_shape) const {
- const Shape2DSW *shape = shape_owner.getornull(p_shape);
+ const Shape2DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, SHAPE_CUSTOM);
return shape->get_type();
};
Variant PhysicsServer2DSW::shape_get_data(RID p_shape) const {
- const Shape2DSW *shape = shape_owner.getornull(p_shape);
+ const Shape2DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, Variant());
ERR_FAIL_COND_V(!shape->is_configured(), Variant());
return shape->get_data();
};
real_t PhysicsServer2DSW::shape_get_custom_solver_bias(RID p_shape) const {
- const Shape2DSW *shape = shape_owner.getornull(p_shape);
+ const Shape2DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, 0);
return shape->get_custom_bias();
}
@@ -185,9 +193,9 @@ void PhysicsServer2DSW::_shape_col_cbk(const Vector2 &p_point_A, const Vector2 &
}
bool PhysicsServer2DSW::shape_collide(RID p_shape_A, const Transform2D &p_xform_A, const Vector2 &p_motion_A, RID p_shape_B, const Transform2D &p_xform_B, const Vector2 &p_motion_B, Vector2 *r_results, int p_result_max, int &r_result_count) {
- Shape2DSW *shape_A = shape_owner.getornull(p_shape_A);
+ Shape2DSW *shape_A = shape_owner.get_or_null(p_shape_A);
ERR_FAIL_COND_V(!shape_A, false);
- Shape2DSW *shape_B = shape_owner.getornull(p_shape_B);
+ Shape2DSW *shape_B = shape_owner.get_or_null(p_shape_B);
ERR_FAIL_COND_V(!shape_B, false);
if (p_result_max == 0) {
@@ -210,7 +218,7 @@ RID PhysicsServer2DSW::space_create() {
RID id = space_owner.make_rid(space);
space->set_self(id);
RID area_id = area_create();
- Area2DSW *area = area_owner.getornull(area_id);
+ Area2DSW *area = area_owner.get_or_null(area_id);
ERR_FAIL_COND_V(!area, RID());
space->set_default_area(area);
area->set_space(space);
@@ -220,7 +228,7 @@ RID PhysicsServer2DSW::space_create() {
};
void PhysicsServer2DSW::space_set_active(RID p_space, bool p_active) {
- Space2DSW *space = space_owner.getornull(p_space);
+ Space2DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
if (p_active) {
active_spaces.insert(space);
@@ -230,45 +238,45 @@ void PhysicsServer2DSW::space_set_active(RID p_space, bool p_active) {
}
bool PhysicsServer2DSW::space_is_active(RID p_space) const {
- const Space2DSW *space = space_owner.getornull(p_space);
+ const Space2DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, false);
return active_spaces.has(space);
}
void PhysicsServer2DSW::space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) {
- Space2DSW *space = space_owner.getornull(p_space);
+ Space2DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
space->set_param(p_param, p_value);
}
real_t PhysicsServer2DSW::space_get_param(RID p_space, SpaceParameter p_param) const {
- const Space2DSW *space = space_owner.getornull(p_space);
+ const Space2DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, 0);
return space->get_param(p_param);
}
void PhysicsServer2DSW::space_set_debug_contacts(RID p_space, int p_max_contacts) {
- Space2DSW *space = space_owner.getornull(p_space);
+ Space2DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
space->set_debug_contacts(p_max_contacts);
}
Vector<Vector2> PhysicsServer2DSW::space_get_contacts(RID p_space) const {
- Space2DSW *space = space_owner.getornull(p_space);
+ Space2DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, Vector<Vector2>());
return space->get_debug_contacts();
}
int PhysicsServer2DSW::space_get_contact_count(RID p_space) const {
- Space2DSW *space = space_owner.getornull(p_space);
+ Space2DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, 0);
return space->get_debug_contact_count();
}
PhysicsDirectSpaceState2D *PhysicsServer2DSW::space_get_direct_state(RID p_space) {
- Space2DSW *space = space_owner.getornull(p_space);
+ Space2DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, nullptr);
ERR_FAIL_COND_V_MSG((using_threads && !doing_sync) || space->is_locked(), nullptr, "Space state is inaccessible right now, wait for iteration or physics process notification.");
@@ -283,12 +291,12 @@ RID PhysicsServer2DSW::area_create() {
};
void PhysicsServer2DSW::area_set_space(RID p_area, RID p_space) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
Space2DSW *space = nullptr;
if (p_space.is_valid()) {
- space = space_owner.getornull(p_space);
+ space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
}
@@ -301,7 +309,7 @@ void PhysicsServer2DSW::area_set_space(RID p_area, RID p_space) {
};
RID PhysicsServer2DSW::area_get_space(RID p_area) const {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, RID());
Space2DSW *space = area->get_space();
@@ -312,34 +320,34 @@ RID PhysicsServer2DSW::area_get_space(RID p_area) const {
};
void PhysicsServer2DSW::area_set_space_override_mode(RID p_area, AreaSpaceOverrideMode p_mode) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_space_override_mode(p_mode);
}
PhysicsServer2D::AreaSpaceOverrideMode PhysicsServer2DSW::area_get_space_override_mode(RID p_area) const {
- const Area2DSW *area = area_owner.getornull(p_area);
+ const Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, AREA_SPACE_OVERRIDE_DISABLED);
return area->get_space_override_mode();
}
void PhysicsServer2DSW::area_add_shape(RID p_area, RID p_shape, const Transform2D &p_transform, bool p_disabled) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
- Shape2DSW *shape = shape_owner.getornull(p_shape);
+ Shape2DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
area->add_shape(shape, p_transform, p_disabled);
}
void PhysicsServer2DSW::area_set_shape(RID p_area, int p_shape_idx, RID p_shape) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
- Shape2DSW *shape = shape_owner.getornull(p_shape);
+ Shape2DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
ERR_FAIL_COND(!shape->is_configured());
@@ -347,14 +355,14 @@ void PhysicsServer2DSW::area_set_shape(RID p_area, int p_shape_idx, RID p_shape)
}
void PhysicsServer2DSW::area_set_shape_transform(RID p_area, int p_shape_idx, const Transform2D &p_transform) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_shape_transform(p_shape_idx, p_transform);
}
void PhysicsServer2DSW::area_set_shape_disabled(RID p_area, int p_shape, bool p_disabled) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
ERR_FAIL_INDEX(p_shape, area->get_shape_count());
FLUSH_QUERY_CHECK(area);
@@ -363,14 +371,14 @@ void PhysicsServer2DSW::area_set_shape_disabled(RID p_area, int p_shape, bool p_
}
int PhysicsServer2DSW::area_get_shape_count(RID p_area) const {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, -1);
return area->get_shape_count();
}
RID PhysicsServer2DSW::area_get_shape(RID p_area, int p_shape_idx) const {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, RID());
Shape2DSW *shape = area->get_shape(p_shape_idx);
@@ -380,21 +388,21 @@ RID PhysicsServer2DSW::area_get_shape(RID p_area, int p_shape_idx) const {
}
Transform2D PhysicsServer2DSW::area_get_shape_transform(RID p_area, int p_shape_idx) const {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, Transform2D());
return area->get_shape_transform(p_shape_idx);
}
void PhysicsServer2DSW::area_remove_shape(RID p_area, int p_shape_idx) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->remove_shape(p_shape_idx);
}
void PhysicsServer2DSW::area_clear_shapes(RID p_area) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
while (area->get_shape_count()) {
@@ -404,86 +412,86 @@ void PhysicsServer2DSW::area_clear_shapes(RID p_area) {
void PhysicsServer2DSW::area_attach_object_instance_id(RID p_area, ObjectID p_id) {
if (space_owner.owns(p_area)) {
- Space2DSW *space = space_owner.getornull(p_area);
+ Space2DSW *space = space_owner.get_or_null(p_area);
p_area = space->get_default_area()->get_self();
}
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_instance_id(p_id);
}
ObjectID PhysicsServer2DSW::area_get_object_instance_id(RID p_area) const {
if (space_owner.owns(p_area)) {
- Space2DSW *space = space_owner.getornull(p_area);
+ Space2DSW *space = space_owner.get_or_null(p_area);
p_area = space->get_default_area()->get_self();
}
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, ObjectID());
return area->get_instance_id();
}
void PhysicsServer2DSW::area_attach_canvas_instance_id(RID p_area, ObjectID p_id) {
if (space_owner.owns(p_area)) {
- Space2DSW *space = space_owner.getornull(p_area);
+ Space2DSW *space = space_owner.get_or_null(p_area);
p_area = space->get_default_area()->get_self();
}
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_canvas_instance_id(p_id);
}
ObjectID PhysicsServer2DSW::area_get_canvas_instance_id(RID p_area) const {
if (space_owner.owns(p_area)) {
- Space2DSW *space = space_owner.getornull(p_area);
+ Space2DSW *space = space_owner.get_or_null(p_area);
p_area = space->get_default_area()->get_self();
}
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, ObjectID());
return area->get_canvas_instance_id();
}
void PhysicsServer2DSW::area_set_param(RID p_area, AreaParameter p_param, const Variant &p_value) {
if (space_owner.owns(p_area)) {
- Space2DSW *space = space_owner.getornull(p_area);
+ Space2DSW *space = space_owner.get_or_null(p_area);
p_area = space->get_default_area()->get_self();
}
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_param(p_param, p_value);
};
void PhysicsServer2DSW::area_set_transform(RID p_area, const Transform2D &p_transform) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_transform(p_transform);
};
Variant PhysicsServer2DSW::area_get_param(RID p_area, AreaParameter p_param) const {
if (space_owner.owns(p_area)) {
- Space2DSW *space = space_owner.getornull(p_area);
+ Space2DSW *space = space_owner.get_or_null(p_area);
p_area = space->get_default_area()->get_self();
}
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, Variant());
return area->get_param(p_param);
};
Transform2D PhysicsServer2DSW::area_get_transform(RID p_area) const {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, Transform2D());
return area->get_transform();
};
void PhysicsServer2DSW::area_set_pickable(RID p_area, bool p_pickable) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_pickable(p_pickable);
}
void PhysicsServer2DSW::area_set_monitorable(RID p_area, bool p_monitorable) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
FLUSH_QUERY_CHECK(area);
@@ -491,28 +499,28 @@ void PhysicsServer2DSW::area_set_monitorable(RID p_area, bool p_monitorable) {
}
void PhysicsServer2DSW::area_set_collision_mask(RID p_area, uint32_t p_mask) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_collision_mask(p_mask);
}
void PhysicsServer2DSW::area_set_collision_layer(RID p_area, uint32_t p_layer) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_collision_layer(p_layer);
}
void PhysicsServer2DSW::area_set_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_monitor_callback(p_receiver ? p_receiver->get_instance_id() : ObjectID(), p_method);
}
void PhysicsServer2DSW::area_set_area_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) {
- Area2DSW *area = area_owner.getornull(p_area);
+ Area2DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_area_monitor_callback(p_receiver ? p_receiver->get_instance_id() : ObjectID(), p_method);
@@ -528,11 +536,11 @@ RID PhysicsServer2DSW::body_create() {
}
void PhysicsServer2DSW::body_set_space(RID p_body, RID p_space) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
Space2DSW *space = nullptr;
if (p_space.is_valid()) {
- space = space_owner.getornull(p_space);
+ space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
}
@@ -545,7 +553,7 @@ void PhysicsServer2DSW::body_set_space(RID p_body, RID p_space) {
};
RID PhysicsServer2DSW::body_get_space(RID p_body) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, RID());
Space2DSW *space = body->get_space();
@@ -556,7 +564,7 @@ RID PhysicsServer2DSW::body_get_space(RID p_body) const {
};
void PhysicsServer2DSW::body_set_mode(RID p_body, BodyMode p_mode) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
FLUSH_QUERY_CHECK(body);
@@ -564,27 +572,27 @@ void PhysicsServer2DSW::body_set_mode(RID p_body, BodyMode p_mode) {
};
PhysicsServer2D::BodyMode PhysicsServer2DSW::body_get_mode(RID p_body) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, BODY_MODE_STATIC);
return body->get_mode();
};
void PhysicsServer2DSW::body_add_shape(RID p_body, RID p_shape, const Transform2D &p_transform, bool p_disabled) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
- Shape2DSW *shape = shape_owner.getornull(p_shape);
+ Shape2DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
body->add_shape(shape, p_transform, p_disabled);
}
void PhysicsServer2DSW::body_set_shape(RID p_body, int p_shape_idx, RID p_shape) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
- Shape2DSW *shape = shape_owner.getornull(p_shape);
+ Shape2DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
ERR_FAIL_COND(!shape->is_configured());
@@ -592,33 +600,33 @@ void PhysicsServer2DSW::body_set_shape(RID p_body, int p_shape_idx, RID p_shape)
}
void PhysicsServer2DSW::body_set_shape_transform(RID p_body, int p_shape_idx, const Transform2D &p_transform) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_shape_transform(p_shape_idx, p_transform);
}
void PhysicsServer2DSW::body_set_shape_metadata(RID p_body, int p_shape_idx, const Variant &p_metadata) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_shape_metadata(p_shape_idx, p_metadata);
}
Variant PhysicsServer2DSW::body_get_shape_metadata(RID p_body, int p_shape_idx) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, Variant());
return body->get_shape_metadata(p_shape_idx);
}
int PhysicsServer2DSW::body_get_shape_count(RID p_body) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, -1);
return body->get_shape_count();
}
RID PhysicsServer2DSW::body_get_shape(RID p_body, int p_shape_idx) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, RID());
Shape2DSW *shape = body->get_shape(p_shape_idx);
@@ -628,21 +636,21 @@ RID PhysicsServer2DSW::body_get_shape(RID p_body, int p_shape_idx) const {
}
Transform2D PhysicsServer2DSW::body_get_shape_transform(RID p_body, int p_shape_idx) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, Transform2D());
return body->get_shape_transform(p_shape_idx);
}
void PhysicsServer2DSW::body_remove_shape(RID p_body, int p_shape_idx) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->remove_shape(p_shape_idx);
}
void PhysicsServer2DSW::body_clear_shapes(RID p_body) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
while (body->get_shape_count()) {
@@ -651,7 +659,7 @@ void PhysicsServer2DSW::body_clear_shapes(RID p_body) {
}
void PhysicsServer2DSW::body_set_shape_disabled(RID p_body, int p_shape_idx, bool p_disabled) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
ERR_FAIL_INDEX(p_shape_idx, body->get_shape_count());
FLUSH_QUERY_CHECK(body);
@@ -660,7 +668,7 @@ void PhysicsServer2DSW::body_set_shape_disabled(RID p_body, int p_shape_idx, boo
}
void PhysicsServer2DSW::body_set_shape_as_one_way_collision(RID p_body, int p_shape_idx, bool p_enable, real_t p_margin) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
ERR_FAIL_INDEX(p_shape_idx, body->get_shape_count());
FLUSH_QUERY_CHECK(body);
@@ -669,102 +677,109 @@ void PhysicsServer2DSW::body_set_shape_as_one_way_collision(RID p_body, int p_sh
}
void PhysicsServer2DSW::body_set_continuous_collision_detection_mode(RID p_body, CCDMode p_mode) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_continuous_collision_detection_mode(p_mode);
}
PhysicsServer2DSW::CCDMode PhysicsServer2DSW::body_get_continuous_collision_detection_mode(RID p_body) const {
- const Body2DSW *body = body_owner.getornull(p_body);
+ const Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, CCD_MODE_DISABLED);
return body->get_continuous_collision_detection_mode();
}
void PhysicsServer2DSW::body_attach_object_instance_id(RID p_body, ObjectID p_id) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_instance_id(p_id);
};
ObjectID PhysicsServer2DSW::body_get_object_instance_id(RID p_body) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, ObjectID());
return body->get_instance_id();
};
void PhysicsServer2DSW::body_attach_canvas_instance_id(RID p_body, ObjectID p_id) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_canvas_instance_id(p_id);
};
ObjectID PhysicsServer2DSW::body_get_canvas_instance_id(RID p_body) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, ObjectID());
return body->get_canvas_instance_id();
};
void PhysicsServer2DSW::body_set_collision_layer(RID p_body, uint32_t p_layer) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_collision_layer(p_layer);
};
uint32_t PhysicsServer2DSW::body_get_collision_layer(RID p_body) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_collision_layer();
};
void PhysicsServer2DSW::body_set_collision_mask(RID p_body, uint32_t p_mask) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_collision_mask(p_mask);
};
uint32_t PhysicsServer2DSW::body_get_collision_mask(RID p_body) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_collision_mask();
};
-void PhysicsServer2DSW::body_set_param(RID p_body, BodyParameter p_param, real_t p_value) {
- Body2DSW *body = body_owner.getornull(p_body);
+void PhysicsServer2DSW::body_set_param(RID p_body, BodyParameter p_param, const Variant &p_value) {
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_param(p_param, p_value);
};
-real_t PhysicsServer2DSW::body_get_param(RID p_body, BodyParameter p_param) const {
- Body2DSW *body = body_owner.getornull(p_body);
+Variant PhysicsServer2DSW::body_get_param(RID p_body, BodyParameter p_param) const {
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_param(p_param);
};
+void PhysicsServer2DSW::body_reset_mass_properties(RID p_body) {
+ Body2DSW *body = body_owner.get_or_null(p_body);
+ ERR_FAIL_COND(!body);
+
+ return body->reset_mass_properties();
+}
+
void PhysicsServer2DSW::body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_state(p_state, p_variant);
};
Variant PhysicsServer2DSW::body_get_state(RID p_body, BodyState p_state) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, Variant());
return body->get_state(p_state);
};
void PhysicsServer2DSW::body_set_applied_force(RID p_body, const Vector2 &p_force) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_applied_force(p_force);
@@ -772,13 +787,13 @@ void PhysicsServer2DSW::body_set_applied_force(RID p_body, const Vector2 &p_forc
};
Vector2 PhysicsServer2DSW::body_get_applied_force(RID p_body) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, Vector2());
return body->get_applied_force();
};
void PhysicsServer2DSW::body_set_applied_torque(RID p_body, real_t p_torque) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_applied_torque(p_torque);
@@ -786,14 +801,14 @@ void PhysicsServer2DSW::body_set_applied_torque(RID p_body, real_t p_torque) {
};
real_t PhysicsServer2DSW::body_get_applied_torque(RID p_body) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_applied_torque();
};
void PhysicsServer2DSW::body_apply_central_impulse(RID p_body, const Vector2 &p_impulse) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->apply_central_impulse(p_impulse);
@@ -801,7 +816,7 @@ void PhysicsServer2DSW::body_apply_central_impulse(RID p_body, const Vector2 &p_
}
void PhysicsServer2DSW::body_apply_torque_impulse(RID p_body, real_t p_torque) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
_update_shapes();
@@ -811,7 +826,7 @@ void PhysicsServer2DSW::body_apply_torque_impulse(RID p_body, real_t p_torque) {
}
void PhysicsServer2DSW::body_apply_impulse(RID p_body, const Vector2 &p_impulse, const Vector2 &p_position) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
_update_shapes();
@@ -821,7 +836,7 @@ void PhysicsServer2DSW::body_apply_impulse(RID p_body, const Vector2 &p_impulse,
};
void PhysicsServer2DSW::body_add_central_force(RID p_body, const Vector2 &p_force) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->add_central_force(p_force);
@@ -829,7 +844,7 @@ void PhysicsServer2DSW::body_add_central_force(RID p_body, const Vector2 &p_forc
};
void PhysicsServer2DSW::body_add_force(RID p_body, const Vector2 &p_force, const Vector2 &p_position) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->add_force(p_force, p_position);
@@ -837,7 +852,7 @@ void PhysicsServer2DSW::body_add_force(RID p_body, const Vector2 &p_force, const
};
void PhysicsServer2DSW::body_add_torque(RID p_body, real_t p_torque) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->add_torque(p_torque);
@@ -845,7 +860,7 @@ void PhysicsServer2DSW::body_add_torque(RID p_body, real_t p_torque) {
};
void PhysicsServer2DSW::body_set_axis_velocity(RID p_body, const Vector2 &p_axis_velocity) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
_update_shapes();
@@ -859,7 +874,7 @@ void PhysicsServer2DSW::body_set_axis_velocity(RID p_body, const Vector2 &p_axis
};
void PhysicsServer2DSW::body_add_collision_exception(RID p_body, RID p_body_b) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->add_exception(p_body_b);
@@ -867,7 +882,7 @@ void PhysicsServer2DSW::body_add_collision_exception(RID p_body, RID p_body_b) {
};
void PhysicsServer2DSW::body_remove_collision_exception(RID p_body, RID p_body_b) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->remove_exception(p_body_b);
@@ -875,7 +890,7 @@ void PhysicsServer2DSW::body_remove_collision_exception(RID p_body, RID p_body_b
};
void PhysicsServer2DSW::body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
for (int i = 0; i < body->get_exceptions().size(); i++) {
@@ -884,49 +899,55 @@ void PhysicsServer2DSW::body_get_collision_exceptions(RID p_body, List<RID> *p_e
};
void PhysicsServer2DSW::body_set_contacts_reported_depth_threshold(RID p_body, real_t p_threshold) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
};
real_t PhysicsServer2DSW::body_get_contacts_reported_depth_threshold(RID p_body) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return 0;
};
void PhysicsServer2DSW::body_set_omit_force_integration(RID p_body, bool p_omit) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_omit_force_integration(p_omit);
};
bool PhysicsServer2DSW::body_is_omitting_force_integration(RID p_body) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, false);
return body->get_omit_force_integration();
};
void PhysicsServer2DSW::body_set_max_contacts_reported(RID p_body, int p_contacts) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_max_contacts_reported(p_contacts);
}
int PhysicsServer2DSW::body_get_max_contacts_reported(RID p_body) const {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, -1);
return body->get_max_contacts_reported();
}
+void PhysicsServer2DSW::body_set_state_sync_callback(RID p_body, void *p_instance, BodyStateCallback p_callback) {
+ Body2DSW *body = body_owner.get_or_null(p_body);
+ ERR_FAIL_COND(!body);
+ body->set_state_sync_callback(p_instance, p_callback);
+}
+
void PhysicsServer2DSW::body_set_force_integration_callback(RID p_body, const Callable &p_callable, const Variant &p_udata) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_force_integration_callback(p_callable, p_udata);
}
bool PhysicsServer2DSW::body_collide_shape(RID p_body, int p_body_shape, RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, Vector2 *r_results, int p_result_max, int &r_result_count) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, false);
ERR_FAIL_INDEX_V(p_body_shape, body->get_shape_count(), false);
@@ -934,36 +955,32 @@ bool PhysicsServer2DSW::body_collide_shape(RID p_body, int p_body_shape, RID p_s
}
void PhysicsServer2DSW::body_set_pickable(RID p_body, bool p_pickable) {
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_pickable(p_pickable);
}
-bool PhysicsServer2DSW::body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin, MotionResult *r_result, const Set<RID> &p_exclude) {
- Body2DSW *body = body_owner.getornull(p_body);
+bool PhysicsServer2DSW::body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin, MotionResult *r_result, bool p_collide_separation_ray, const Set<RID> &p_exclude) {
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, false);
ERR_FAIL_COND_V(!body->get_space(), false);
ERR_FAIL_COND_V(body->get_space()->is_locked(), false);
_update_shapes();
- return body->get_space()->test_body_motion(body, p_from, p_motion, p_margin, r_result, p_exclude);
+ return body->get_space()->test_body_motion(body, p_from, p_motion, p_margin, r_result, p_collide_separation_ray, p_exclude);
}
PhysicsDirectBodyState2D *PhysicsServer2DSW::body_get_direct_state(RID p_body) {
ERR_FAIL_COND_V_MSG((using_threads && !doing_sync), nullptr, "Body state is inaccessible right now, wait for iteration or physics process notification.");
- if (!body_owner.owns(p_body)) {
- return nullptr;
- }
-
- Body2DSW *body = body_owner.getornull(p_body);
+ Body2DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, nullptr);
+
ERR_FAIL_COND_V(!body->get_space(), nullptr);
ERR_FAIL_COND_V_MSG(body->get_space()->is_locked(), nullptr, "Body state is inaccessible right now, wait for iteration or physics process notification.");
- direct_state->body = body;
- return direct_state;
+ return body->get_direct_state();
}
/* JOINT API */
@@ -976,7 +993,7 @@ RID PhysicsServer2DSW::joint_create() {
}
void PhysicsServer2DSW::joint_clear(RID p_joint) {
- Joint2DSW *joint = joint_owner.getornull(p_joint);
+ Joint2DSW *joint = joint_owner.get_or_null(p_joint);
if (joint->get_type() != JOINT_TYPE_MAX) {
Joint2DSW *empty_joint = memnew(Joint2DSW);
empty_joint->copy_settings_from(joint);
@@ -987,7 +1004,7 @@ void PhysicsServer2DSW::joint_clear(RID p_joint) {
}
void PhysicsServer2DSW::joint_set_param(RID p_joint, JointParam p_param, real_t p_value) {
- Joint2DSW *joint = joint_owner.getornull(p_joint);
+ Joint2DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
switch (p_param) {
@@ -1004,7 +1021,7 @@ void PhysicsServer2DSW::joint_set_param(RID p_joint, JointParam p_param, real_t
}
real_t PhysicsServer2DSW::joint_get_param(RID p_joint, JointParam p_param) const {
- const Joint2DSW *joint = joint_owner.getornull(p_joint);
+ const Joint2DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, -1);
switch (p_param) {
@@ -1023,7 +1040,7 @@ real_t PhysicsServer2DSW::joint_get_param(RID p_joint, JointParam p_param) const
}
void PhysicsServer2DSW::joint_disable_collisions_between_bodies(RID p_joint, const bool p_disable) {
- Joint2DSW *joint = joint_owner.getornull(p_joint);
+ Joint2DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
joint->disable_collisions_between_bodies(p_disable);
@@ -1043,22 +1060,22 @@ void PhysicsServer2DSW::joint_disable_collisions_between_bodies(RID p_joint, con
}
bool PhysicsServer2DSW::joint_is_disabled_collisions_between_bodies(RID p_joint) const {
- const Joint2DSW *joint = joint_owner.getornull(p_joint);
+ const Joint2DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, true);
return joint->is_disabled_collisions_between_bodies();
}
void PhysicsServer2DSW::joint_make_pin(RID p_joint, const Vector2 &p_pos, RID p_body_a, RID p_body_b) {
- Body2DSW *A = body_owner.getornull(p_body_a);
+ Body2DSW *A = body_owner.get_or_null(p_body_a);
ERR_FAIL_COND(!A);
Body2DSW *B = nullptr;
if (body_owner.owns(p_body_b)) {
- B = body_owner.getornull(p_body_b);
+ B = body_owner.get_or_null(p_body_b);
ERR_FAIL_COND(!B);
}
- Joint2DSW *prev_joint = joint_owner.getornull(p_joint);
+ Joint2DSW *prev_joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(prev_joint == nullptr);
Joint2DSW *joint = memnew(PinJoint2DSW(p_pos, A, B));
@@ -1069,13 +1086,13 @@ void PhysicsServer2DSW::joint_make_pin(RID p_joint, const Vector2 &p_pos, RID p_
}
void PhysicsServer2DSW::joint_make_groove(RID p_joint, const Vector2 &p_a_groove1, const Vector2 &p_a_groove2, const Vector2 &p_b_anchor, RID p_body_a, RID p_body_b) {
- Body2DSW *A = body_owner.getornull(p_body_a);
+ Body2DSW *A = body_owner.get_or_null(p_body_a);
ERR_FAIL_COND(!A);
- Body2DSW *B = body_owner.getornull(p_body_b);
+ Body2DSW *B = body_owner.get_or_null(p_body_b);
ERR_FAIL_COND(!B);
- Joint2DSW *prev_joint = joint_owner.getornull(p_joint);
+ Joint2DSW *prev_joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(prev_joint == nullptr);
Joint2DSW *joint = memnew(GrooveJoint2DSW(p_a_groove1, p_a_groove2, p_b_anchor, A, B));
@@ -1086,13 +1103,13 @@ void PhysicsServer2DSW::joint_make_groove(RID p_joint, const Vector2 &p_a_groove
}
void PhysicsServer2DSW::joint_make_damped_spring(RID p_joint, const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, RID p_body_a, RID p_body_b) {
- Body2DSW *A = body_owner.getornull(p_body_a);
+ Body2DSW *A = body_owner.get_or_null(p_body_a);
ERR_FAIL_COND(!A);
- Body2DSW *B = body_owner.getornull(p_body_b);
+ Body2DSW *B = body_owner.get_or_null(p_body_b);
ERR_FAIL_COND(!B);
- Joint2DSW *prev_joint = joint_owner.getornull(p_joint);
+ Joint2DSW *prev_joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(prev_joint == nullptr);
Joint2DSW *joint = memnew(DampedSpringJoint2DSW(p_anchor_a, p_anchor_b, A, B));
@@ -1103,7 +1120,7 @@ void PhysicsServer2DSW::joint_make_damped_spring(RID p_joint, const Vector2 &p_a
}
void PhysicsServer2DSW::pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value) {
- Joint2DSW *j = joint_owner.getornull(p_joint);
+ Joint2DSW *j = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!j);
ERR_FAIL_COND(j->get_type() != JOINT_TYPE_PIN);
@@ -1112,7 +1129,7 @@ void PhysicsServer2DSW::pin_joint_set_param(RID p_joint, PinJointParam p_param,
}
real_t PhysicsServer2DSW::pin_joint_get_param(RID p_joint, PinJointParam p_param) const {
- Joint2DSW *j = joint_owner.getornull(p_joint);
+ Joint2DSW *j = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!j, 0);
ERR_FAIL_COND_V(j->get_type() != JOINT_TYPE_PIN, 0);
@@ -1121,7 +1138,7 @@ real_t PhysicsServer2DSW::pin_joint_get_param(RID p_joint, PinJointParam p_param
}
void PhysicsServer2DSW::damped_spring_joint_set_param(RID p_joint, DampedSpringParam p_param, real_t p_value) {
- Joint2DSW *j = joint_owner.getornull(p_joint);
+ Joint2DSW *j = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!j);
ERR_FAIL_COND(j->get_type() != JOINT_TYPE_DAMPED_SPRING);
@@ -1130,7 +1147,7 @@ void PhysicsServer2DSW::damped_spring_joint_set_param(RID p_joint, DampedSpringP
}
real_t PhysicsServer2DSW::damped_spring_joint_get_param(RID p_joint, DampedSpringParam p_param) const {
- Joint2DSW *j = joint_owner.getornull(p_joint);
+ Joint2DSW *j = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!j, 0);
ERR_FAIL_COND_V(j->get_type() != JOINT_TYPE_DAMPED_SPRING, 0);
@@ -1139,7 +1156,7 @@ real_t PhysicsServer2DSW::damped_spring_joint_get_param(RID p_joint, DampedSprin
}
PhysicsServer2D::JointType PhysicsServer2DSW::joint_get_type(RID p_joint) const {
- Joint2DSW *joint = joint_owner.getornull(p_joint);
+ Joint2DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, JOINT_TYPE_PIN);
return joint->get_type();
@@ -1149,7 +1166,7 @@ void PhysicsServer2DSW::free(RID p_rid) {
_update_shapes(); // just in case
if (shape_owner.owns(p_rid)) {
- Shape2DSW *shape = shape_owner.getornull(p_rid);
+ Shape2DSW *shape = shape_owner.get_or_null(p_rid);
while (shape->get_owners().size()) {
ShapeOwner2DSW *so = shape->get_owners().front()->key();
@@ -1159,7 +1176,7 @@ void PhysicsServer2DSW::free(RID p_rid) {
shape_owner.free(p_rid);
memdelete(shape);
} else if (body_owner.owns(p_rid)) {
- Body2DSW *body = body_owner.getornull(p_rid);
+ Body2DSW *body = body_owner.get_or_null(p_rid);
/*
if (body->get_state_query())
@@ -1179,7 +1196,7 @@ void PhysicsServer2DSW::free(RID p_rid) {
memdelete(body);
} else if (area_owner.owns(p_rid)) {
- Area2DSW *area = area_owner.getornull(p_rid);
+ Area2DSW *area = area_owner.get_or_null(p_rid);
/*
if (area->get_monitor_query())
@@ -1195,7 +1212,7 @@ void PhysicsServer2DSW::free(RID p_rid) {
area_owner.free(p_rid);
memdelete(area);
} else if (space_owner.owns(p_rid)) {
- Space2DSW *space = space_owner.getornull(p_rid);
+ Space2DSW *space = space_owner.get_or_null(p_rid);
while (space->get_objects().size()) {
CollisionObject2DSW *co = (CollisionObject2DSW *)space->get_objects().front()->get();
@@ -1207,7 +1224,7 @@ void PhysicsServer2DSW::free(RID p_rid) {
space_owner.free(p_rid);
memdelete(space);
} else if (joint_owner.owns(p_rid)) {
- Joint2DSW *joint = joint_owner.getornull(p_rid);
+ Joint2DSW *joint = joint_owner.get_or_null(p_rid);
joint_owner.free(p_rid);
memdelete(joint);
@@ -1227,10 +1244,8 @@ void PhysicsServer2DSW::set_collision_iterations(int p_iterations) {
void PhysicsServer2DSW::init() {
doing_sync = false;
- last_step = 0.001;
iterations = 8; // 8?
stepper = memnew(Step2DSW);
- direct_state = memnew(PhysicsDirectBodyState2DSW);
};
void PhysicsServer2DSW::step(real_t p_step) {
@@ -1240,8 +1255,6 @@ void PhysicsServer2DSW::step(real_t p_step) {
_update_shapes();
- last_step = p_step;
- PhysicsDirectBodyState2DSW::singleton->step = p_step;
island_count = 0;
active_objects = 0;
collision_pairs = 0;
@@ -1313,7 +1326,6 @@ void PhysicsServer2DSW::end_sync() {
void PhysicsServer2DSW::finish() {
memdelete(stepper);
- memdelete(direct_state);
};
void PhysicsServer2DSW::_update_shapes() {
@@ -1345,10 +1357,5 @@ PhysicsServer2DSW::PhysicsServer2DSW(bool p_using_threads) {
singletonsw = this;
BroadPhase2DSW::create_func = BroadPhase2DBVH::_create;
- active = true;
- island_count = 0;
- active_objects = 0;
- collision_pairs = 0;
using_threads = p_using_threads;
- flushing_queries = false;
};
diff --git a/servers/physics_2d/physics_server_2d_sw.h b/servers/physics_2d/physics_server_2d_sw.h
index 3610f43f93..1db4dd8343 100644
--- a/servers/physics_2d/physics_server_2d_sw.h
+++ b/servers/physics_2d/physics_server_2d_sw.h
@@ -43,24 +43,21 @@ class PhysicsServer2DSW : public PhysicsServer2D {
friend class PhysicsDirectSpaceState2DSW;
friend class PhysicsDirectBodyState2DSW;
- bool active;
- int iterations;
- bool doing_sync;
- real_t last_step;
+ bool active = true;
+ int iterations = 0;
+ bool doing_sync = false;
- int island_count;
- int active_objects;
- int collision_pairs;
+ int island_count = 0;
+ int active_objects = 0;
+ int collision_pairs = 0;
- bool using_threads;
+ bool using_threads = false;
- bool flushing_queries;
+ bool flushing_queries = false;
- Step2DSW *stepper;
+ Step2DSW *stepper = nullptr;
Set<const Space2DSW *> active_spaces;
- PhysicsDirectBodyState2DSW *direct_state;
-
mutable RID_PtrOwner<Shape2DSW, true> shape_owner;
mutable RID_PtrOwner<Space2DSW, true> space_owner;
mutable RID_PtrOwner<Area2DSW, true> area_owner;
@@ -79,15 +76,16 @@ class PhysicsServer2DSW : public PhysicsServer2D {
public:
struct CollCbkData {
Vector2 valid_dir;
- real_t valid_depth;
- int max;
- int amount;
- int passed;
- int invalid_by_dir;
- Vector2 *ptr;
+ real_t valid_depth = 0.0;
+ int max = 0;
+ int amount = 0;
+ int passed = 0;
+ int invalid_by_dir = 0;
+ Vector2 *ptr = nullptr;
};
- virtual RID world_margin_shape_create() override;
+ virtual RID world_boundary_shape_create() override;
+ virtual RID separation_ray_shape_create() override;
virtual RID segment_shape_create() override;
virtual RID circle_shape_create() override;
virtual RID rectangle_shape_create() override;
@@ -207,8 +205,10 @@ public:
virtual void body_set_collision_mask(RID p_body, uint32_t p_mask) override;
virtual uint32_t body_get_collision_mask(RID p_body) const override;
- virtual void body_set_param(RID p_body, BodyParameter p_param, real_t p_value) override;
- virtual real_t body_get_param(RID p_body, BodyParameter p_param) const override;
+ virtual void body_set_param(RID p_body, BodyParameter p_param, const Variant &p_value) override;
+ virtual Variant body_get_param(RID p_body, BodyParameter p_param) const override;
+
+ virtual void body_reset_mass_properties(RID p_body) override;
virtual void body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) override;
virtual Variant body_get_state(RID p_body, BodyState p_state) const override;
@@ -241,12 +241,14 @@ public:
virtual void body_set_max_contacts_reported(RID p_body, int p_contacts) override;
virtual int body_get_max_contacts_reported(RID p_body) const override;
+ virtual void body_set_state_sync_callback(RID p_body, void *p_instance, BodyStateCallback p_callback) override;
virtual void body_set_force_integration_callback(RID p_body, const Callable &p_callable, const Variant &p_udata = Variant()) override;
+
virtual bool body_collide_shape(RID p_body, int p_body_shape, RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, Vector2 *r_results, int p_result_max, int &r_result_count) override;
virtual void body_set_pickable(RID p_body, bool p_pickable) override;
- virtual bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin = 0.08, MotionResult *r_result = nullptr, const Set<RID> &p_exclude = Set<RID>()) override;
+ virtual bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin = 0.08, MotionResult *r_result = nullptr, bool p_collide_separation_ray = false, const Set<RID> &p_exclude = Set<RID>()) override;
// this function only works on physics process, errors and returns null otherwise
virtual PhysicsDirectBodyState2D *body_get_direct_state(RID p_body) override;
diff --git a/servers/physics_2d/physics_server_2d_wrap_mt.cpp b/servers/physics_2d/physics_server_2d_wrap_mt.cpp
index 930b19c2cb..33070bf42d 100644
--- a/servers/physics_2d/physics_server_2d_wrap_mt.cpp
+++ b/servers/physics_2d/physics_server_2d_wrap_mt.cpp
@@ -119,7 +119,6 @@ PhysicsServer2DWrapMT::PhysicsServer2DWrapMT(PhysicsServer2D *p_contained, bool
command_queue(p_create_thread) {
physics_2d_server = p_contained;
create_thread = p_create_thread;
- step_pending = 0;
pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
@@ -130,7 +129,6 @@ PhysicsServer2DWrapMT::PhysicsServer2DWrapMT(PhysicsServer2D *p_contained, bool
}
main_thread = Thread::get_caller_id();
- first_frame = true;
}
PhysicsServer2DWrapMT::~PhysicsServer2DWrapMT() {
diff --git a/servers/physics_2d/physics_server_2d_wrap_mt.h b/servers/physics_2d/physics_server_2d_wrap_mt.h
index b93178919d..f8733863aa 100644
--- a/servers/physics_2d/physics_server_2d_wrap_mt.h
+++ b/servers/physics_2d/physics_server_2d_wrap_mt.h
@@ -56,19 +56,19 @@ class PhysicsServer2DWrapMT : public PhysicsServer2D {
SafeFlag exit;
Thread thread;
SafeFlag step_thread_up;
- bool create_thread;
+ bool create_thread = false;
Semaphore step_sem;
- int step_pending;
+ int step_pending = 0;
void thread_step(real_t p_delta);
void thread_flush();
void thread_exit();
- bool first_frame;
+ bool first_frame = true;
Mutex alloc_mutex;
- int pool_max_size;
+ int pool_max_size = 0;
public:
#define ServerName PhysicsServer2D
@@ -79,7 +79,8 @@ public:
#include "servers/server_wrap_mt_common.h"
//FUNC1RID(shape,ShapeType); todo fix
- FUNCRID(world_margin_shape)
+ FUNCRID(world_boundary_shape)
+ FUNCRID(separation_ray_shape)
FUNCRID(segment_shape)
FUNCRID(circle_shape)
FUNCRID(rectangle_shape)
@@ -211,8 +212,10 @@ public:
FUNC2(body_set_collision_mask, RID, uint32_t);
FUNC1RC(uint32_t, body_get_collision_mask, RID);
- FUNC3(body_set_param, RID, BodyParameter, real_t);
- FUNC2RC(real_t, body_get_param, RID, BodyParameter);
+ FUNC3(body_set_param, RID, BodyParameter, const Variant &);
+ FUNC2RC(Variant, body_get_param, RID, BodyParameter);
+
+ FUNC1(body_reset_mass_properties, RID);
FUNC3(body_set_state, RID, BodyState, const Variant &);
FUNC2RC(Variant, body_get_state, RID, BodyState);
@@ -244,6 +247,7 @@ public:
FUNC2(body_set_omit_force_integration, RID, bool);
FUNC1RC(bool, body_is_omitting_force_integration, RID);
+ FUNC3(body_set_state_sync_callback, RID, void *, BodyStateCallback);
FUNC3(body_set_force_integration_callback, RID, const Callable &, const Variant &);
bool body_collide_shape(RID p_body, int p_body_shape, RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, Vector2 *r_results, int p_result_max, int &r_result_count) override {
@@ -252,9 +256,9 @@ public:
FUNC2(body_set_pickable, RID, bool);
- bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin = 0.08, MotionResult *r_result = nullptr, const Set<RID> &p_exclude = Set<RID>()) override {
+ bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin = 0.08, MotionResult *r_result = nullptr, bool p_collide_separation_ray = false, const Set<RID> &p_exclude = Set<RID>()) override {
ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), false);
- return physics_2d_server->body_test_motion(p_body, p_from, p_motion, p_margin, r_result, p_exclude);
+ return physics_2d_server->body_test_motion(p_body, p_from, p_motion, p_margin, r_result, p_collide_separation_ray, p_exclude);
}
// this function only works on physics process, errors and returns null otherwise
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp
index b3e4ca84c3..b5953bfdaf 100644
--- a/servers/physics_2d/shape_2d_sw.cpp
+++ b/servers/physics_2d/shape_2d_sw.cpp
@@ -75,11 +75,6 @@ const Map<ShapeOwner2DSW *, int> &Shape2DSW::get_owners() const {
return owners;
}
-Shape2DSW::Shape2DSW() {
- custom_bias = 0;
- configured = false;
-}
-
Shape2DSW::~Shape2DSW() {
ERR_FAIL_COND(owners.size());
}
@@ -88,15 +83,15 @@ Shape2DSW::~Shape2DSW() {
/*********************************************************/
/*********************************************************/
-void WorldMarginShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const {
+void WorldBoundaryShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const {
r_amount = 0;
}
-bool WorldMarginShape2DSW::contains_point(const Vector2 &p_point) const {
+bool WorldBoundaryShape2DSW::contains_point(const Vector2 &p_point) const {
return normal.dot(p_point) < d;
}
-bool WorldMarginShape2DSW::intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const {
+bool WorldBoundaryShape2DSW::intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const {
Vector2 segment = p_begin - p_end;
real_t den = normal.dot(segment);
@@ -118,11 +113,11 @@ bool WorldMarginShape2DSW::intersect_segment(const Vector2 &p_begin, const Vecto
return true;
}
-real_t WorldMarginShape2DSW::get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const {
+real_t WorldBoundaryShape2DSW::get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const {
return 0;
}
-void WorldMarginShape2DSW::set_data(const Variant &p_data) {
+void WorldBoundaryShape2DSW::set_data(const Variant &p_data) {
ERR_FAIL_COND(p_data.get_type() != Variant::ARRAY);
Array arr = p_data;
ERR_FAIL_COND(arr.size() != 2);
@@ -131,7 +126,7 @@ void WorldMarginShape2DSW::set_data(const Variant &p_data) {
configure(Rect2(Vector2(-1e4, -1e4), Vector2(1e4 * 2, 1e4 * 2)));
}
-Variant WorldMarginShape2DSW::get_data() const {
+Variant WorldBoundaryShape2DSW::get_data() const {
Array arr;
arr.resize(2);
arr[0] = normal;
@@ -143,6 +138,46 @@ Variant WorldMarginShape2DSW::get_data() const {
/*********************************************************/
/*********************************************************/
+void SeparationRayShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const {
+ r_amount = 1;
+
+ if (p_normal.y > 0) {
+ *r_supports = Vector2(0, length);
+ } else {
+ *r_supports = Vector2();
+ }
+}
+
+bool SeparationRayShape2DSW::contains_point(const Vector2 &p_point) const {
+ return false;
+}
+
+bool SeparationRayShape2DSW::intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const {
+ return false; //rays can't be intersected
+}
+
+real_t SeparationRayShape2DSW::get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const {
+ return 0; //rays are mass-less
+}
+
+void SeparationRayShape2DSW::set_data(const Variant &p_data) {
+ Dictionary d = p_data;
+ length = d["length"];
+ slide_on_slope = d["slide_on_slope"];
+ configure(Rect2(0, 0, 0.001, length));
+}
+
+Variant SeparationRayShape2DSW::get_data() const {
+ Dictionary d;
+ d["length"] = length;
+ d["slide_on_slope"] = slide_on_slope;
+ return d;
+}
+
+/*********************************************************/
+/*********************************************************/
+/*********************************************************/
+
void SegmentShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const {
if (Math::abs(p_normal.dot(n)) > _SEGMENT_IS_VALID_SUPPORT_THRESHOLD) {
r_supports[0] = a;
@@ -530,14 +565,7 @@ bool ConvexPolygonShape2DSW::intersect_segment(const Vector2 &p_begin, const Vec
}
}
- if (inters) {
- if (n.dot(r_normal) > 0) {
- r_normal = -r_normal;
- }
- }
-
- //return get_aabb().intersects_segment(p_begin,p_end,&r_point,&r_normal);
- return inters; //todo
+ return inters;
}
real_t ConvexPolygonShape2DSW::get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const {
@@ -619,11 +647,6 @@ Variant ConvexPolygonShape2DSW::get_data() const {
return dvr;
}
-ConvexPolygonShape2DSW::ConvexPolygonShape2DSW() {
- points = nullptr;
- point_count = 0;
-}
-
ConvexPolygonShape2DSW::~ConvexPolygonShape2DSW() {
if (points) {
memdelete_arr(points);
@@ -888,7 +911,7 @@ Variant ConcavePolygonShape2DSW::get_data() const {
return rsegments;
}
-void ConcavePolygonShape2DSW::cull(const Rect2 &p_local_aabb, Callback p_callback, void *p_userdata) const {
+void ConcavePolygonShape2DSW::cull(const Rect2 &p_local_aabb, QueryCallback p_callback, void *p_userdata) const {
uint32_t *stack = (uint32_t *)alloca(sizeof(int) * bvh_depth);
enum {
@@ -936,7 +959,9 @@ void ConcavePolygonShape2DSW::cull(const Rect2 &p_local_aabb, Callback p_callbac
SegmentShape2DSW ss(a, b, (b - a).orthogonal().normalized());
- p_callback(p_userdata, &ss);
+ if (p_callback(p_userdata, &ss)) {
+ return;
+ }
stack[level] = (VISIT_DONE_BIT << VISITED_BIT_SHIFT) | node;
} else {
diff --git a/servers/physics_2d/shape_2d_sw.h b/servers/physics_2d/shape_2d_sw.h
index 2de0f3cb9f..c118826284 100644
--- a/servers/physics_2d/shape_2d_sw.h
+++ b/servers/physics_2d/shape_2d_sw.h
@@ -34,18 +34,6 @@
#include "servers/physics_server_2d.h"
#define _SEGMENT_IS_VALID_SUPPORT_THRESHOLD 0.99998
-/*
-
-SHAPE_WORLD_MARGIN, ///< plane:"plane"
-SHAPE_SEGMENT, ///< real_t:"length"
-SHAPE_CIRCLE, ///< real_t:"radius"
-SHAPE_RECTANGLE, ///< vec3:"extents"
-SHAPE_CONVEX_POLYGON, ///< array of planes:"planes"
-SHAPE_CONCAVE_POLYGON, ///< Vector2 array:"triangles" , or Dictionary with "indices" (int array) and "triangles" (Vector2 array)
-SHAPE_CUSTOM, ///< Server-Implementation based custom shape, calling shape_create() with this value will result in an error
-
-*/
-
class Shape2DSW;
class ShapeOwner2DSW {
@@ -59,8 +47,8 @@ public:
class Shape2DSW {
RID self;
Rect2 aabb;
- bool configured;
- real_t custom_bias;
+ bool configured = false;
+ real_t custom_bias = 0.0;
Map<ShapeOwner2DSW *, int> owners;
@@ -76,6 +64,8 @@ public:
_FORCE_INLINE_ Rect2 get_aabb() const { return aabb; }
_FORCE_INLINE_ bool is_configured() const { return configured; }
+ virtual bool allows_one_way_collision() const { return true; }
+
virtual bool is_concave() const { return false; }
virtual bool contains_point(const Vector2 &p_point) const = 0;
@@ -131,46 +121,45 @@ public:
}
}
}
-
- Shape2DSW();
+ Shape2DSW() {}
virtual ~Shape2DSW();
};
//let the optimizer do the magic
-#define DEFAULT_PROJECT_RANGE_CAST \
- virtual void project_range_castv(const Vector2 &p_cast, const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const { \
- project_range_cast(p_cast, p_normal, p_transform, r_min, r_max); \
- } \
- _FORCE_INLINE_ void project_range_cast(const Vector2 &p_cast, const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const { \
- real_t mina, maxa; \
- real_t minb, maxb; \
- Transform2D ofsb = p_transform; \
- ofsb.elements[2] += p_cast; \
- project_range(p_normal, p_transform, mina, maxa); \
- project_range(p_normal, ofsb, minb, maxb); \
- r_min = MIN(mina, minb); \
- r_max = MAX(maxa, maxb); \
+#define DEFAULT_PROJECT_RANGE_CAST \
+ virtual void project_range_castv(const Vector2 &p_cast, const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const override { \
+ project_range_cast(p_cast, p_normal, p_transform, r_min, r_max); \
+ } \
+ _FORCE_INLINE_ void project_range_cast(const Vector2 &p_cast, const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const { \
+ real_t mina, maxa; \
+ real_t minb, maxb; \
+ Transform2D ofsb = p_transform; \
+ ofsb.elements[2] += p_cast; \
+ project_range(p_normal, p_transform, mina, maxa); \
+ project_range(p_normal, ofsb, minb, maxb); \
+ r_min = MIN(mina, minb); \
+ r_max = MAX(maxa, maxb); \
}
-class WorldMarginShape2DSW : public Shape2DSW {
+class WorldBoundaryShape2DSW : public Shape2DSW {
Vector2 normal;
- real_t d;
+ real_t d = 0.0;
public:
_FORCE_INLINE_ Vector2 get_normal() const { return normal; }
_FORCE_INLINE_ real_t get_d() const { return d; }
- virtual PhysicsServer2D::ShapeType get_type() const { return PhysicsServer2D::SHAPE_WORLD_MARGIN; }
+ virtual PhysicsServer2D::ShapeType get_type() const override { return PhysicsServer2D::SHAPE_WORLD_BOUNDARY; }
- virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const { project_range(p_normal, p_transform, r_min, r_max); }
- virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const;
+ virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const override { project_range(p_normal, p_transform, r_min, r_max); }
+ virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const override;
- virtual bool contains_point(const Vector2 &p_point) const;
- virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const;
- virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const;
+ virtual bool contains_point(const Vector2 &p_point) const override;
+ virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const override;
+ virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
_FORCE_INLINE_ void project_range(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const {
//real large
@@ -178,7 +167,7 @@ public:
r_max = 1e10;
}
- virtual void project_range_castv(const Vector2 &p_cast, const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const {
+ virtual void project_range_castv(const Vector2 &p_cast, const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const override {
project_range_cast(p_cast, p_normal, p_transform, r_min, r_max);
}
@@ -189,6 +178,43 @@ public:
}
};
+class SeparationRayShape2DSW : public Shape2DSW {
+ real_t length = 0.0;
+ bool slide_on_slope = false;
+
+public:
+ _FORCE_INLINE_ real_t get_length() const { return length; }
+ _FORCE_INLINE_ bool get_slide_on_slope() const { return slide_on_slope; }
+
+ virtual PhysicsServer2D::ShapeType get_type() const override { return PhysicsServer2D::SHAPE_SEPARATION_RAY; }
+
+ virtual bool allows_one_way_collision() const override { return false; }
+
+ virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const override { project_range(p_normal, p_transform, r_min, r_max); }
+ virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const override;
+
+ virtual bool contains_point(const Vector2 &p_point) const override;
+ virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const override;
+ virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const override;
+
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
+
+ _FORCE_INLINE_ void project_range(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const {
+ //real large
+ r_max = p_normal.dot(p_transform.get_origin());
+ r_min = p_normal.dot(p_transform.xform(Vector2(0, length)));
+ if (r_max < r_min) {
+ SWAP(r_max, r_min);
+ }
+ }
+
+ DEFAULT_PROJECT_RANGE_CAST
+
+ _FORCE_INLINE_ SeparationRayShape2DSW() {}
+ _FORCE_INLINE_ SeparationRayShape2DSW(real_t p_length) { length = p_length; }
+};
+
class SegmentShape2DSW : public Shape2DSW {
Vector2 a;
Vector2 b;
@@ -199,20 +225,20 @@ public:
_FORCE_INLINE_ const Vector2 &get_b() const { return b; }
_FORCE_INLINE_ const Vector2 &get_normal() const { return n; }
- virtual PhysicsServer2D::ShapeType get_type() const { return PhysicsServer2D::SHAPE_SEGMENT; }
+ virtual PhysicsServer2D::ShapeType get_type() const override { return PhysicsServer2D::SHAPE_SEGMENT; }
_FORCE_INLINE_ Vector2 get_xformed_normal(const Transform2D &p_xform) const {
return (p_xform.xform(b) - p_xform.xform(a)).normalized().orthogonal();
}
- virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const { project_range(p_normal, p_transform, r_min, r_max); }
- virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const;
+ virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const override { project_range(p_normal, p_transform, r_min, r_max); }
+ virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const override;
- virtual bool contains_point(const Vector2 &p_point) const;
- virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const;
- virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const;
+ virtual bool contains_point(const Vector2 &p_point) const override;
+ virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const override;
+ virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
_FORCE_INLINE_ void project_range(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const {
//real large
@@ -239,17 +265,17 @@ class CircleShape2DSW : public Shape2DSW {
public:
_FORCE_INLINE_ const real_t &get_radius() const { return radius; }
- virtual PhysicsServer2D::ShapeType get_type() const { return PhysicsServer2D::SHAPE_CIRCLE; }
+ virtual PhysicsServer2D::ShapeType get_type() const override { return PhysicsServer2D::SHAPE_CIRCLE; }
- virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const { project_range(p_normal, p_transform, r_min, r_max); }
- virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const;
+ virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const override { project_range(p_normal, p_transform, r_min, r_max); }
+ virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const override;
- virtual bool contains_point(const Vector2 &p_point) const;
- virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const;
- virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const;
+ virtual bool contains_point(const Vector2 &p_point) const override;
+ virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const override;
+ virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
_FORCE_INLINE_ void project_range(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const {
//real large
@@ -272,17 +298,17 @@ class RectangleShape2DSW : public Shape2DSW {
public:
_FORCE_INLINE_ const Vector2 &get_half_extents() const { return half_extents; }
- virtual PhysicsServer2D::ShapeType get_type() const { return PhysicsServer2D::SHAPE_RECTANGLE; }
+ virtual PhysicsServer2D::ShapeType get_type() const override { return PhysicsServer2D::SHAPE_RECTANGLE; }
- virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const { project_range(p_normal, p_transform, r_min, r_max); }
- virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const;
+ virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const override { project_range(p_normal, p_transform, r_min, r_max); }
+ virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const override;
- virtual bool contains_point(const Vector2 &p_point) const;
- virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const;
- virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const;
+ virtual bool contains_point(const Vector2 &p_point) const override;
+ virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const override;
+ virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
_FORCE_INLINE_ void project_range(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const {
// no matter the angle, the box is mirrored anyway
@@ -339,24 +365,24 @@ public:
};
class CapsuleShape2DSW : public Shape2DSW {
- real_t radius;
- real_t height;
+ real_t radius = 0.0;
+ real_t height = 0.0;
public:
_FORCE_INLINE_ const real_t &get_radius() const { return radius; }
_FORCE_INLINE_ const real_t &get_height() const { return height; }
- virtual PhysicsServer2D::ShapeType get_type() const { return PhysicsServer2D::SHAPE_CAPSULE; }
+ virtual PhysicsServer2D::ShapeType get_type() const override { return PhysicsServer2D::SHAPE_CAPSULE; }
- virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const { project_range(p_normal, p_transform, r_min, r_max); }
- virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const;
+ virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const override { project_range(p_normal, p_transform, r_min, r_max); }
+ virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const override;
- virtual bool contains_point(const Vector2 &p_point) const;
- virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const;
- virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const;
+ virtual bool contains_point(const Vector2 &p_point) const override;
+ virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const override;
+ virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
_FORCE_INLINE_ void project_range(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const {
// no matter the angle, the box is mirrored anyway
@@ -385,8 +411,8 @@ class ConvexPolygonShape2DSW : public Shape2DSW {
Vector2 normal; //normal to next segment
};
- Point *points;
- int point_count;
+ Point *points = nullptr;
+ int point_count = 0;
public:
_FORCE_INLINE_ int get_point_count() const { return point_count; }
@@ -399,17 +425,17 @@ public:
return (p_xform.xform(b) - p_xform.xform(a)).normalized().orthogonal();
}
- virtual PhysicsServer2D::ShapeType get_type() const { return PhysicsServer2D::SHAPE_CONVEX_POLYGON; }
+ virtual PhysicsServer2D::ShapeType get_type() const override { return PhysicsServer2D::SHAPE_CONVEX_POLYGON; }
- virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const { project_range(p_normal, p_transform, r_min, r_max); }
- virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const;
+ virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const override { project_range(p_normal, p_transform, r_min, r_max); }
+ virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const override;
- virtual bool contains_point(const Vector2 &p_point) const;
- virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const;
- virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const;
+ virtual bool contains_point(const Vector2 &p_point) const override;
+ virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const override;
+ virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
_FORCE_INLINE_ void project_range(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const {
if (!points || point_count <= 0) {
@@ -431,21 +457,23 @@ public:
DEFAULT_PROJECT_RANGE_CAST
- ConvexPolygonShape2DSW();
+ ConvexPolygonShape2DSW() {}
~ConvexPolygonShape2DSW();
};
class ConcaveShape2DSW : public Shape2DSW {
public:
- virtual bool is_concave() const { return true; }
- typedef void (*Callback)(void *p_userdata, Shape2DSW *p_convex);
+ virtual bool is_concave() const override { return true; }
- virtual void cull(const Rect2 &p_local_aabb, Callback p_callback, void *p_userdata) const = 0;
+ // Returns true to stop the query.
+ typedef bool (*QueryCallback)(void *p_userdata, Shape2DSW *p_convex);
+
+ virtual void cull(const Rect2 &p_local_aabb, QueryCallback p_callback, void *p_userdata) const = 0;
};
class ConcavePolygonShape2DSW : public ConcaveShape2DSW {
struct Segment {
- int points[2];
+ int points[2] = {};
};
Vector<Segment> segments;
@@ -453,11 +481,11 @@ class ConcavePolygonShape2DSW : public ConcaveShape2DSW {
struct BVH {
Rect2 aabb;
- int left, right;
+ int left = 0, right = 0;
};
Vector<BVH> bvh;
- int bvh_depth;
+ int bvh_depth = 0;
struct BVH_CompareX {
_FORCE_INLINE_ bool operator()(const BVH &a, const BVH &b) const {
@@ -474,23 +502,31 @@ class ConcavePolygonShape2DSW : public ConcaveShape2DSW {
int _generate_bvh(BVH *p_bvh, int p_len, int p_depth);
public:
- virtual PhysicsServer2D::ShapeType get_type() const { return PhysicsServer2D::SHAPE_CONCAVE_POLYGON; }
+ virtual PhysicsServer2D::ShapeType get_type() const override { return PhysicsServer2D::SHAPE_CONCAVE_POLYGON; }
- virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const { /*project_range(p_normal,p_transform,r_min,r_max);*/
+ virtual void project_rangev(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const override {
+ r_min = 0;
+ r_max = 0;
+ ERR_FAIL_MSG("Unsupported call to project_rangev in ConcavePolygonShape2DSW");
}
- virtual void project_range(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const { /*project_range(p_normal,p_transform,r_min,r_max);*/
+
+ void project_range(const Vector2 &p_normal, const Transform2D &p_transform, real_t &r_min, real_t &r_max) const {
+ r_min = 0;
+ r_max = 0;
+ ERR_FAIL_MSG("Unsupported call to project_range in ConcavePolygonShape2DSW");
}
- virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const;
- virtual bool contains_point(const Vector2 &p_point) const;
- virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const;
+ virtual void get_supports(const Vector2 &p_normal, Vector2 *r_supports, int &r_amount) const override;
+
+ virtual bool contains_point(const Vector2 &p_point) const override;
+ virtual bool intersect_segment(const Vector2 &p_begin, const Vector2 &p_end, Vector2 &r_point, Vector2 &r_normal) const override;
- virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const { return 0; }
+ virtual real_t get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) const override { return 0; }
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
- virtual void cull(const Rect2 &p_local_aabb, Callback p_callback, void *p_userdata) const;
+ virtual void cull(const Rect2 &p_local_aabb, QueryCallback p_callback, void *p_userdata) const override;
DEFAULT_PROJECT_RANGE_CAST
};
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index f04f3ab583..df37b11c1b 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -34,6 +34,9 @@
#include "core/os/os.h"
#include "core/templates/pair.h"
#include "physics_server_2d_sw.h"
+
+#define TEST_MOTION_MIN_CONTACT_DEPTH_FACTOR 0.05
+
_FORCE_INLINE_ static bool _can_collide_with(CollisionObject2DSW *p_object, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
if (!(p_object->get_collision_layer() & p_collision_mask)) {
return false;
@@ -203,7 +206,7 @@ int PhysicsDirectSpaceState2DSW::intersect_shape(const RID &p_shape, const Trans
return 0;
}
- Shape2DSW *shape = PhysicsServer2DSW::singletonsw->shape_owner.getornull(p_shape);
+ Shape2DSW *shape = PhysicsServer2DSW::singletonsw->shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, 0);
Rect2 aabb = p_xform.xform(shape->get_aabb());
@@ -248,7 +251,7 @@ int PhysicsDirectSpaceState2DSW::intersect_shape(const RID &p_shape, const Trans
}
bool PhysicsDirectSpaceState2DSW::cast_motion(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
- Shape2DSW *shape = PhysicsServer2DSW::singletonsw->shape_owner.getornull(p_shape);
+ Shape2DSW *shape = PhysicsServer2DSW::singletonsw->shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, false);
Rect2 aabb = p_xform.xform(shape->get_aabb());
@@ -335,7 +338,7 @@ bool PhysicsDirectSpaceState2DSW::collide_shape(RID p_shape, const Transform2D &
return false;
}
- Shape2DSW *shape = PhysicsServer2DSW::singletonsw->shape_owner.getornull(p_shape);
+ Shape2DSW *shape = PhysicsServer2DSW::singletonsw->shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, 0);
Rect2 aabb = p_shape_xform.xform(shape->get_aabb());
@@ -383,18 +386,18 @@ bool PhysicsDirectSpaceState2DSW::collide_shape(RID p_shape, const Transform2D &
}
struct _RestCallbackData2D {
- const CollisionObject2DSW *object;
- const CollisionObject2DSW *best_object;
- int local_shape;
- int best_local_shape;
- int shape;
- int best_shape;
+ const CollisionObject2DSW *object = nullptr;
+ const CollisionObject2DSW *best_object = nullptr;
+ int local_shape = 0;
+ int best_local_shape = 0;
+ int shape = 0;
+ int best_shape = 0;
Vector2 best_contact;
Vector2 best_normal;
- real_t best_len;
+ real_t best_len = 0.0;
Vector2 valid_dir;
- real_t valid_depth;
- real_t min_allowed_depth;
+ real_t valid_depth = 0.0;
+ real_t min_allowed_depth = 0.0;
};
static void _rest_cbk_result(const Vector2 &p_point_A, const Vector2 &p_point_B, void *p_userdata) {
@@ -432,9 +435,11 @@ static void _rest_cbk_result(const Vector2 &p_point_A, const Vector2 &p_point_B,
}
bool PhysicsDirectSpaceState2DSW::rest_info(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
- Shape2DSW *shape = PhysicsServer2DSW::singletonsw->shape_owner.getornull(p_shape);
+ Shape2DSW *shape = PhysicsServer2DSW::singletonsw->shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, 0);
+ real_t min_contact_depth = p_margin * TEST_MOTION_MIN_CONTACT_DEPTH_FACTOR;
+
Rect2 aabb = p_shape_xform.xform(shape->get_aabb());
aabb = aabb.merge(Rect2(aabb.position + p_motion, aabb.size)); //motion
aabb = aabb.grow(p_margin);
@@ -445,7 +450,7 @@ bool PhysicsDirectSpaceState2DSW::rest_info(RID p_shape, const Transform2D &p_sh
rcd.best_len = 0;
rcd.best_object = nullptr;
rcd.best_shape = 0;
- rcd.min_allowed_depth = space->test_motion_min_contact_depth;
+ rcd.min_allowed_depth = min_contact_depth;
for (int i = 0; i < amount; i++) {
if (!_can_collide_with(space->intersection_query_results[i], p_collision_mask, p_collide_with_bodies, p_collide_with_areas)) {
@@ -482,7 +487,7 @@ bool PhysicsDirectSpaceState2DSW::rest_info(RID p_shape, const Transform2D &p_sh
r_info->metadata = rcd.best_object->get_shape_metadata(rcd.best_shape);
if (rcd.best_object->get_type() == CollisionObject2DSW::TYPE_BODY) {
const Body2DSW *body = static_cast<const Body2DSW *>(rcd.best_object);
- Vector2 rel_vec = r_info->point - body->get_transform().get_origin();
+ Vector2 rel_vec = r_info->point - (body->get_transform().get_origin() + body->get_center_of_mass());
r_info->linear_velocity = Vector2(-body->get_angular_velocity() * rel_vec.y, body->get_angular_velocity() * rel_vec.x) + body->get_linear_velocity();
} else {
@@ -492,10 +497,6 @@ bool PhysicsDirectSpaceState2DSW::rest_info(RID p_shape, const Transform2D &p_sh
return true;
}
-PhysicsDirectSpaceState2DSW::PhysicsDirectSpaceState2DSW() {
- space = nullptr;
-}
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////
int Space2DSW::_cull_aabb_for_body(Body2DSW *p_body, const Rect2 &p_aabb) {
@@ -528,7 +529,7 @@ int Space2DSW::_cull_aabb_for_body(Body2DSW *p_body, const Rect2 &p_aabb) {
return amount;
}
-bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin, PhysicsServer2D::MotionResult *r_result, const Set<RID> &p_exclude) {
+bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin, PhysicsServer2D::MotionResult *r_result, bool p_collide_separation_ray, const Set<RID> &p_exclude) {
//give me back regular physics engine logic
//this is madness
//and most people using this function will think
@@ -573,6 +574,8 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
ExcludedShapeSW excluded_shape_pairs[max_excluded_shape_pairs];
int excluded_shape_pair_count = 0;
+ real_t min_contact_depth = p_margin * TEST_MOTION_MIN_CONTACT_DEPTH_FACTOR;
+
real_t motion_length = p_motion.length();
Vector2 motion_normal = p_motion / motion_length;
@@ -621,7 +624,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
Transform2D col_obj_shape_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx);
- if (col_obj->is_shape_set_as_one_way_collision(shape_idx)) {
+ if (body_shape->allows_one_way_collision() && col_obj->is_shape_set_as_one_way_collision(shape_idx)) {
cbk.valid_dir = col_obj_shape_xform.get_axis(1).normalized();
real_t owc_margin = col_obj->get_shape_one_way_collision_margin(shape_idx);
@@ -634,7 +637,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
//fix for moving platforms (kinematic and dynamic), margin is increased by how much it moved in the given direction
Vector2 lv = b->get_linear_velocity();
//compute displacement from linear velocity
- Vector2 motion = lv * PhysicsDirectBodyState2DSW::singleton->step;
+ Vector2 motion = lv * last_step;
real_t motion_len = motion.length();
motion.normalize();
cbk.valid_depth += motion_len * MAX(motion.dot(-cbk.valid_dir), 0.0);
@@ -675,6 +678,8 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
break;
}
+ recovered = true;
+
Vector2 recover_motion;
for (int i = 0; i < cbk.amount; i++) {
Vector2 a = sr[i * 2 + 0];
@@ -686,9 +691,9 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
// Compute depth on recovered motion.
real_t depth = n.dot(a + recover_motion) - d;
- if (depth > 0.0) {
+ if (depth > min_contact_depth + CMP_EPSILON) {
// Only recover if there is penetration.
- recover_motion -= n * depth * 0.4;
+ recover_motion -= n * (depth - min_contact_depth) * 0.4;
}
}
@@ -697,8 +702,6 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
break;
}
- recovered = true;
-
body_transform.elements[2] += recover_motion;
body_aabb.position += recover_motion;
@@ -726,6 +729,16 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
}
Shape2DSW *body_shape = p_body->get_shape(body_shape_idx);
+
+ // Colliding separation rays allows to properly snap to the ground,
+ // otherwise it's not needed in regular motion.
+ if (!p_collide_separation_ray && (body_shape->get_type() == PhysicsServer2D::SHAPE_SEPARATION_RAY)) {
+ // When slide on slope is on, separation ray shape acts like a regular shape.
+ if (!static_cast<SeparationRayShape2DSW *>(body_shape)->get_slide_on_slope()) {
+ continue;
+ }
+ }
+
Transform2D body_shape_xform = body_transform * p_body->get_shape_transform(body_shape_idx);
bool stuck = false;
@@ -762,7 +775,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
//test initial overlap
if (CollisionSolver2DSW::solve(body_shape, body_shape_xform, Vector2(), against_shape, col_obj_shape_xform, Vector2(), nullptr, nullptr, nullptr, 0)) {
- if (col_obj->is_shape_set_as_one_way_collision(col_shape_idx)) {
+ if (body_shape->allows_one_way_collision() && col_obj->is_shape_set_as_one_way_collision(col_shape_idx)) {
Vector2 direction = col_obj_shape_xform.get_axis(1).normalized();
if (motion_normal.dot(direction) < 0) {
continue;
@@ -806,7 +819,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
}
}
- if (col_obj->is_shape_set_as_one_way_collision(col_shape_idx)) {
+ if (body_shape->allows_one_way_collision() && col_obj->is_shape_set_as_one_way_collision(col_shape_idx)) {
Vector2 cd[2];
PhysicsServer2DSW::CollCbkData cbk;
cbk.max = 1;
@@ -864,7 +877,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
rcd.best_shape = 0;
// Allowed depth can't be lower than motion length, in order to handle contacts at low speed.
- rcd.min_allowed_depth = MIN(motion_length, test_motion_min_contact_depth);
+ rcd.min_allowed_depth = MIN(motion_length, min_contact_depth);
int from_shape = best_shape != -1 ? best_shape : 0;
int to_shape = best_shape != -1 ? best_shape + 1 : p_body->get_shape_count();
@@ -904,7 +917,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
Transform2D col_obj_shape_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx);
- if (col_obj->is_shape_set_as_one_way_collision(shape_idx)) {
+ if (body_shape->allows_one_way_collision() && col_obj->is_shape_set_as_one_way_collision(shape_idx)) {
rcd.valid_dir = col_obj_shape_xform.get_axis(1).normalized();
real_t owc_margin = col_obj->get_shape_one_way_collision_margin(shape_idx);
@@ -916,7 +929,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
//fix for moving platforms (kinematic and dynamic), margin is increased by how much it moved in the given direction
Vector2 lv = b->get_linear_velocity();
//compute displacement from linear velocity
- Vector2 motion = lv * PhysicsDirectBodyState2DSW::singleton->step;
+ Vector2 motion = lv * last_step;
real_t motion_len = motion.length();
motion.normalize();
rcd.valid_depth += motion_len * MAX(motion.dot(-rcd.valid_dir), 0.0);
@@ -951,7 +964,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
r_result->collider_metadata = rcd.best_object->get_shape_metadata(rcd.best_shape);
const Body2DSW *body = static_cast<const Body2DSW *>(rcd.best_object);
- Vector2 rel_vec = r_result->collision_point - body->get_transform().get_origin();
+ Vector2 rel_vec = r_result->collision_point - (body->get_transform().get_origin() + body->get_center_of_mass());
r_result->collider_velocity = Vector2(-body->get_angular_velocity() * rel_vec.y, body->get_angular_velocity() * rel_vec.x) + body->get_linear_velocity();
r_result->travel = safe * p_motion;
@@ -1031,12 +1044,12 @@ void Space2DSW::body_remove_from_active_list(SelfList<Body2DSW> *p_body) {
active_list.remove(p_body);
}
-void Space2DSW::body_add_to_inertia_update_list(SelfList<Body2DSW> *p_body) {
- inertia_update_list.add(p_body);
+void Space2DSW::body_add_to_mass_properties_update_list(SelfList<Body2DSW> *p_body) {
+ mass_properties_update_list.add(p_body);
}
-void Space2DSW::body_remove_from_inertia_update_list(SelfList<Body2DSW> *p_body) {
- inertia_update_list.remove(p_body);
+void Space2DSW::body_remove_from_mass_properties_update_list(SelfList<Body2DSW> *p_body) {
+ mass_properties_update_list.remove(p_body);
}
BroadPhase2DSW *Space2DSW::get_broadphase() {
@@ -1102,9 +1115,9 @@ void Space2DSW::call_queries() {
void Space2DSW::setup() {
contact_debug_count = 0;
- while (inertia_update_list.first()) {
- inertia_update_list.first()->self()->update_inertias();
- inertia_update_list.remove(inertia_update_list.first());
+ while (mass_properties_update_list.first()) {
+ mass_properties_update_list.first()->self()->update_mass_properties();
+ mass_properties_update_list.remove(mass_properties_update_list.first());
}
}
@@ -1135,9 +1148,6 @@ void Space2DSW::set_param(PhysicsServer2D::SpaceParameter p_param, real_t p_valu
case PhysicsServer2D::SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS:
constraint_bias = p_value;
break;
- case PhysicsServer2D::SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH:
- test_motion_min_contact_depth = p_value;
- break;
}
}
@@ -1157,8 +1167,6 @@ real_t Space2DSW::get_param(PhysicsServer2D::SpaceParameter p_param) const {
return body_time_to_sleep;
case PhysicsServer2D::SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS:
return constraint_bias;
- case PhysicsServer2D::SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH:
- return test_motion_min_contact_depth;
}
return 0;
}
@@ -1180,19 +1188,6 @@ PhysicsDirectSpaceState2DSW *Space2DSW::get_direct_state() {
}
Space2DSW::Space2DSW() {
- collision_pairs = 0;
- active_objects = 0;
- island_count = 0;
-
- contact_debug_count = 0;
-
- locked = false;
- contact_recycle_radius = 1.0;
- contact_max_separation = 1.5;
- contact_max_allowed_penetration = 0.3;
- test_motion_min_contact_depth = 0.005;
-
- constraint_bias = 0.2;
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_linear", 2.0);
body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_angular", Math::deg2rad(8.0));
body_time_to_sleep = GLOBAL_DEF("physics/2d/time_before_sleep", 0.5);
@@ -1201,14 +1196,9 @@ Space2DSW::Space2DSW() {
broadphase = BroadPhase2DSW::create_func();
broadphase->set_pair_callback(_broadphase_pair, this);
broadphase->set_unpair_callback(_broadphase_unpair, this);
- area = nullptr;
direct_access = memnew(PhysicsDirectSpaceState2DSW);
direct_access->space = this;
-
- for (int i = 0; i < ELAPSED_TIME_MAX; i++) {
- elapsed_time[i] = 0;
- }
}
Space2DSW::~Space2DSW() {
diff --git a/servers/physics_2d/space_2d_sw.h b/servers/physics_2d/space_2d_sw.h
index 3be36852b0..a1a8a77ee4 100644
--- a/servers/physics_2d/space_2d_sw.h
+++ b/servers/physics_2d/space_2d_sw.h
@@ -47,17 +47,17 @@ class PhysicsDirectSpaceState2DSW : public PhysicsDirectSpaceState2D {
int _intersect_point_impl(const Vector2 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, bool p_pick_point, bool p_filter_by_canvas = false, ObjectID p_canvas_instance_id = ObjectID());
public:
- Space2DSW *space;
+ Space2DSW *space = nullptr;
- virtual int intersect_point(const Vector2 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_point = false) override;
- virtual int intersect_point_on_canvas(const Vector2 &p_point, ObjectID p_canvas_instance_id, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_point = false) override;
- virtual bool intersect_ray(const Vector2 &p_from, const Vector2 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
- virtual int intersect_shape(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
- virtual bool cast_motion(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
- virtual bool collide_shape(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, Vector2 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
- virtual bool rest_info(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual int intersect_point(const Vector2 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_point = false) override;
+ virtual int intersect_point_on_canvas(const Vector2 &p_point, ObjectID p_canvas_instance_id, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_point = false) override;
+ virtual bool intersect_ray(const Vector2 &p_from, const Vector2 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual int intersect_shape(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual bool cast_motion(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual bool collide_shape(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, Vector2 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual bool rest_info(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
- PhysicsDirectSpaceState2DSW();
+ PhysicsDirectSpaceState2DSW() {}
};
class Space2DSW {
@@ -74,19 +74,19 @@ public:
private:
struct ExcludedShapeSW {
- Shape2DSW *local_shape;
- const CollisionObject2DSW *against_object;
- int against_shape_index;
+ Shape2DSW *local_shape = nullptr;
+ const CollisionObject2DSW *against_object = nullptr;
+ int against_shape_index = 0;
};
- uint64_t elapsed_time[ELAPSED_TIME_MAX];
+ uint64_t elapsed_time[ELAPSED_TIME_MAX] = {};
- PhysicsDirectSpaceState2DSW *direct_access;
+ PhysicsDirectSpaceState2DSW *direct_access = nullptr;
RID self;
BroadPhase2DSW *broadphase;
SelfList<Body2DSW>::List active_list;
- SelfList<Body2DSW>::List inertia_update_list;
+ SelfList<Body2DSW>::List mass_properties_update_list;
SelfList<Body2DSW>::List state_query_list;
SelfList<Area2DSW>::List monitor_query_list;
SelfList<Area2DSW>::List area_moved_list;
@@ -96,13 +96,12 @@ private:
Set<CollisionObject2DSW *> objects;
- Area2DSW *area;
+ Area2DSW *area = nullptr;
- real_t contact_recycle_radius;
- real_t contact_max_separation;
- real_t contact_max_allowed_penetration;
- real_t constraint_bias;
- real_t test_motion_min_contact_depth;
+ real_t contact_recycle_radius = 1.0;
+ real_t contact_max_separation = 1.5;
+ real_t contact_max_allowed_penetration = 0.3;
+ real_t constraint_bias = 0.2;
enum {
INTERSECTION_QUERY_MAX = 2048
@@ -111,20 +110,22 @@ private:
CollisionObject2DSW *intersection_query_results[INTERSECTION_QUERY_MAX];
int intersection_query_subindex_results[INTERSECTION_QUERY_MAX];
- real_t body_linear_velocity_sleep_threshold;
- real_t body_angular_velocity_sleep_threshold;
- real_t body_time_to_sleep;
+ real_t body_linear_velocity_sleep_threshold = 0.0;
+ real_t body_angular_velocity_sleep_threshold = 0.0;
+ real_t body_time_to_sleep = 0.0;
- bool locked;
+ bool locked = false;
- int island_count;
- int active_objects;
- int collision_pairs;
+ real_t last_step = 0.001;
+
+ int island_count = 0;
+ int active_objects = 0;
+ int collision_pairs = 0;
int _cull_aabb_for_body(Body2DSW *p_body, const Rect2 &p_aabb);
Vector<Vector2> contact_debug;
- int contact_debug_count;
+ int contact_debug_count = 0;
friend class PhysicsDirectSpaceState2DSW;
@@ -138,8 +139,8 @@ public:
const SelfList<Body2DSW>::List &get_active_body_list() const;
void body_add_to_active_list(SelfList<Body2DSW> *p_body);
void body_remove_from_active_list(SelfList<Body2DSW> *p_body);
- void body_add_to_inertia_update_list(SelfList<Body2DSW> *p_body);
- void body_remove_from_inertia_update_list(SelfList<Body2DSW> *p_body);
+ void body_add_to_mass_properties_update_list(SelfList<Body2DSW> *p_body);
+ void body_remove_from_mass_properties_update_list(SelfList<Body2DSW> *p_body);
void area_add_to_moved_list(SelfList<Area2DSW> *p_area);
void area_remove_from_moved_list(SelfList<Area2DSW> *p_area);
const SelfList<Area2DSW>::List &get_moved_area_list() const;
@@ -172,6 +173,9 @@ public:
void lock();
void unlock();
+ real_t get_last_step() const { return last_step; }
+ void set_last_step(real_t p_step) { last_step = p_step; }
+
void set_param(PhysicsServer2D::SpaceParameter p_param, real_t p_value);
real_t get_param(PhysicsServer2D::SpaceParameter p_param) const;
@@ -183,7 +187,7 @@ public:
int get_collision_pairs() const { return collision_pairs; }
- bool test_body_motion(Body2DSW *p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin, PhysicsServer2D::MotionResult *r_result, const Set<RID> &p_exclude = Set<RID>());
+ bool test_body_motion(Body2DSW *p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin, PhysicsServer2D::MotionResult *r_result, bool p_collide_separation_ray = false, const Set<RID> &p_exclude = Set<RID>());
void set_debug_contacts(int p_amount) { contact_debug.resize(p_amount); }
_FORCE_INLINE_ bool is_debugging_contacts() const { return !contact_debug.is_empty(); }
diff --git a/servers/physics_2d/step_2d_sw.cpp b/servers/physics_2d/step_2d_sw.cpp
index 8b30160cc1..a03e30f850 100644
--- a/servers/physics_2d/step_2d_sw.cpp
+++ b/servers/physics_2d/step_2d_sw.cpp
@@ -129,6 +129,8 @@ void Step2DSW::step(Space2DSW *p_space, real_t p_delta, int p_iterations) {
p_space->setup(); //update inertias, etc
+ p_space->set_last_step(p_delta);
+
iterations = p_iterations;
delta = p_delta;
@@ -294,8 +296,6 @@ void Step2DSW::step(Space2DSW *p_space, real_t p_delta, int p_iterations) {
}
Step2DSW::Step2DSW() {
- _step = 1;
-
body_islands.reserve(BODY_ISLAND_COUNT_RESERVE);
constraint_islands.reserve(ISLAND_COUNT_RESERVE);
all_constraints.reserve(CONSTRAINT_COUNT_RESERVE);
diff --git a/servers/physics_2d/step_2d_sw.h b/servers/physics_2d/step_2d_sw.h
index c51fd73a79..de8e76cc99 100644
--- a/servers/physics_2d/step_2d_sw.h
+++ b/servers/physics_2d/step_2d_sw.h
@@ -37,7 +37,7 @@
#include "core/templates/thread_work_pool.h"
class Step2DSW {
- uint64_t _step;
+ uint64_t _step = 1;
int iterations = 0;
real_t delta = 0.0;
diff --git a/servers/physics_3d/area_3d_sw.cpp b/servers/physics_3d/area_3d_sw.cpp
index 364f63e4ad..630ab7e229 100644
--- a/servers/physics_3d/area_3d_sw.cpp
+++ b/servers/physics_3d/area_3d_sw.cpp
@@ -163,6 +163,20 @@ void Area3DSW::set_param(PhysicsServer3D::AreaParameter p_param, const Variant &
case PhysicsServer3D::AREA_PARAM_PRIORITY:
priority = p_value;
break;
+ case PhysicsServer3D::AREA_PARAM_WIND_FORCE_MAGNITUDE:
+ ERR_FAIL_COND_MSG(wind_force_magnitude < 0, "Wind force magnitude must be a non-negative real number, but a negative number was specified.");
+ wind_force_magnitude = p_value;
+ break;
+ case PhysicsServer3D::AREA_PARAM_WIND_SOURCE:
+ wind_source = p_value;
+ break;
+ case PhysicsServer3D::AREA_PARAM_WIND_DIRECTION:
+ wind_direction = p_value;
+ break;
+ case PhysicsServer3D::AREA_PARAM_WIND_ATTENUATION_FACTOR:
+ ERR_FAIL_COND_MSG(wind_attenuation_factor < 0, "Wind attenuation factor must be a non-negative real number, but a negative number was specified.");
+ wind_attenuation_factor = p_value;
+ break;
}
}
@@ -184,6 +198,14 @@ Variant Area3DSW::get_param(PhysicsServer3D::AreaParameter p_param) const {
return angular_damp;
case PhysicsServer3D::AREA_PARAM_PRIORITY:
return priority;
+ case PhysicsServer3D::AREA_PARAM_WIND_FORCE_MAGNITUDE:
+ return wind_force_magnitude;
+ case PhysicsServer3D::AREA_PARAM_WIND_SOURCE:
+ return wind_source;
+ case PhysicsServer3D::AREA_PARAM_WIND_DIRECTION:
+ return wind_direction;
+ case PhysicsServer3D::AREA_PARAM_WIND_ATTENUATION_FACTOR:
+ return wind_attenuation_factor;
}
return Variant();
@@ -282,22 +304,32 @@ void Area3DSW::call_queries() {
}
}
+void Area3DSW::compute_gravity(const Vector3 &p_position, Vector3 &r_gravity) const {
+ if (is_gravity_point()) {
+ const real_t gravity_distance_scale = get_gravity_distance_scale();
+ Vector3 v = get_transform().xform(get_gravity_vector()) - p_position;
+ if (gravity_distance_scale > 0) {
+ const real_t v_length = v.length();
+ if (v_length > 0) {
+ const real_t v_scaled = v_length * gravity_distance_scale;
+ r_gravity = (v.normalized() * (get_gravity() / (v_scaled * v_scaled)));
+ } else {
+ r_gravity = Vector3();
+ }
+ } else {
+ r_gravity = v.normalized() * get_gravity();
+ }
+ } else {
+ r_gravity = get_gravity_vector() * get_gravity();
+ }
+}
+
Area3DSW::Area3DSW() :
CollisionObject3DSW(TYPE_AREA),
monitor_query_list(this),
moved_list(this) {
_set_static(true); //areas are never active
- space_override_mode = PhysicsServer3D::AREA_SPACE_OVERRIDE_DISABLED;
- gravity = 9.80665;
- gravity_vector = Vector3(0, -1, 0);
- gravity_is_point = false;
- gravity_distance_scale = 0;
- point_attenuation = 1;
- angular_damp = 0.1;
- linear_damp = 0.1;
- priority = 0;
set_ray_pickable(false);
- monitorable = false;
}
Area3DSW::~Area3DSW() {
diff --git a/servers/physics_3d/area_3d_sw.h b/servers/physics_3d/area_3d_sw.h
index 5959ee1e95..af5c23949c 100644
--- a/servers/physics_3d/area_3d_sw.h
+++ b/servers/physics_3d/area_3d_sw.h
@@ -34,7 +34,6 @@
#include "collision_object_3d_sw.h"
#include "core/templates/self_list.h"
#include "servers/physics_server_3d.h"
-//#include "servers/physics_3d/query_sw.h"
class Space3DSW;
class Body3DSW;
@@ -42,16 +41,20 @@ class SoftBody3DSW;
class Constraint3DSW;
class Area3DSW : public CollisionObject3DSW {
- PhysicsServer3D::AreaSpaceOverrideMode space_override_mode;
- real_t gravity;
- Vector3 gravity_vector;
- bool gravity_is_point;
- real_t gravity_distance_scale;
- real_t point_attenuation;
- real_t linear_damp;
- real_t angular_damp;
- int priority;
- bool monitorable;
+ PhysicsServer3D::AreaSpaceOverrideMode space_override_mode = PhysicsServer3D::AREA_SPACE_OVERRIDE_DISABLED;
+ real_t gravity = 9.80665;
+ Vector3 gravity_vector = Vector3(0, -1, 0);
+ bool gravity_is_point = false;
+ real_t gravity_distance_scale = 0.0;
+ real_t point_attenuation = 1.0;
+ real_t linear_damp = 0.1;
+ real_t angular_damp = 0.1;
+ real_t wind_force_magnitude = 0.0;
+ real_t wind_attenuation_factor = 0.0;
+ Vector3 wind_source;
+ Vector3 wind_direction;
+ int priority = 0;
+ bool monitorable = false;
ObjectID monitor_callback_id;
StringName monitor_callback_method;
@@ -65,8 +68,8 @@ class Area3DSW : public CollisionObject3DSW {
struct BodyKey {
RID rid;
ObjectID instance_id;
- uint32_t body_shape;
- uint32_t area_shape;
+ uint32_t body_shape = 0;
+ uint32_t area_shape = 0;
_FORCE_INLINE_ bool operator<(const BodyKey &p_key) const {
if (rid == p_key.rid) {
@@ -87,28 +90,21 @@ class Area3DSW : public CollisionObject3DSW {
};
struct BodyState {
- int state;
+ int state = 0;
_FORCE_INLINE_ void inc() { state++; }
_FORCE_INLINE_ void dec() { state--; }
- _FORCE_INLINE_ BodyState() { state = 0; }
};
Map<BodyKey, BodyState> monitored_soft_bodies;
Map<BodyKey, BodyState> monitored_bodies;
Map<BodyKey, BodyState> monitored_areas;
- //virtual void shape_changed_notify(ShapeSW *p_shape);
- //virtual void shape_deleted_notify(ShapeSW *p_shape);
-
Set<Constraint3DSW *> constraints;
virtual void _shapes_changed();
void _queue_monitor_update();
public:
- //_FORCE_INLINE_ const Transform& get_inverse_transform() const { return inverse_transform; }
- //_FORCE_INLINE_ SpaceSW* get_owner() { return owner; }
-
void set_monitor_callback(ObjectID p_id, const StringName &p_method);
_FORCE_INLINE_ bool has_monitor_callback() const { return monitor_callback_id.is_valid(); }
@@ -154,6 +150,18 @@ public:
_FORCE_INLINE_ void set_priority(int p_priority) { priority = p_priority; }
_FORCE_INLINE_ int get_priority() const { return priority; }
+ _FORCE_INLINE_ void set_wind_force_magnitude(real_t p_wind_force_magnitude) { wind_force_magnitude = p_wind_force_magnitude; }
+ _FORCE_INLINE_ real_t get_wind_force_magnitude() const { return wind_force_magnitude; }
+
+ _FORCE_INLINE_ void set_wind_attenuation_factor(real_t p_wind_attenuation_factor) { wind_attenuation_factor = p_wind_attenuation_factor; }
+ _FORCE_INLINE_ real_t get_wind_attenuation_factor() const { return wind_attenuation_factor; }
+
+ _FORCE_INLINE_ void set_wind_source(const Vector3 &p_wind_source) { wind_source = p_wind_source; }
+ _FORCE_INLINE_ const Vector3 &get_wind_source() const { return wind_source; }
+
+ _FORCE_INLINE_ void set_wind_direction(const Vector3 &p_wind_direction) { wind_direction = p_wind_direction; }
+ _FORCE_INLINE_ const Vector3 &get_wind_direction() const { return wind_direction; }
+
_FORCE_INLINE_ void add_constraint(Constraint3DSW *p_constraint) { constraints.insert(p_constraint); }
_FORCE_INLINE_ void remove_constraint(Constraint3DSW *p_constraint) { constraints.erase(p_constraint); }
_FORCE_INLINE_ const Set<Constraint3DSW *> &get_constraints() const { return constraints; }
@@ -168,6 +176,8 @@ public:
void call_queries();
+ void compute_gravity(const Vector3 &p_position, Vector3 &r_gravity) const;
+
Area3DSW();
~Area3DSW();
};
@@ -221,8 +231,8 @@ void Area3DSW::remove_area_from_query(Area3DSW *p_area, uint32_t p_area_shape, u
}
struct AreaCMP {
- Area3DSW *area;
- int refCount;
+ Area3DSW *area = nullptr;
+ int refCount = 0;
_FORCE_INLINE_ bool operator==(const AreaCMP &p_cmp) const { return area->get_self() == p_cmp.area->get_self(); }
_FORCE_INLINE_ bool operator<(const AreaCMP &p_cmp) const { return area->get_priority() < p_cmp.area->get_priority(); }
_FORCE_INLINE_ AreaCMP() {}
diff --git a/servers/physics_3d/area_pair_3d_sw.cpp b/servers/physics_3d/area_pair_3d_sw.cpp
index e740565da6..bf4f0035b4 100644
--- a/servers/physics_3d/area_pair_3d_sw.cpp
+++ b/servers/physics_3d/area_pair_3d_sw.cpp
@@ -33,7 +33,7 @@
bool AreaPair3DSW::setup(real_t p_step) {
bool result = false;
- if (area->interacts_with(body) && CollisionSolver3DSW::solve_static(body->get_shape(body_shape), body->get_transform() * body->get_shape_transform(body_shape), area->get_shape(area_shape), area->get_transform() * area->get_shape_transform(area_shape), nullptr, this)) {
+ if (area->collides_with(body) && CollisionSolver3DSW::solve_static(body->get_shape(body_shape), body->get_transform() * body->get_shape_transform(body_shape), area->get_shape(area_shape), area->get_transform() * area->get_shape_transform(area_shape), nullptr, this)) {
result = true;
}
@@ -109,46 +109,51 @@ AreaPair3DSW::~AreaPair3DSW() {
////////////////////////////////////////////////////
bool Area2Pair3DSW::setup(real_t p_step) {
- bool result = false;
- if (area_a->interacts_with(area_b) && CollisionSolver3DSW::solve_static(area_a->get_shape(shape_a), area_a->get_transform() * area_a->get_shape_transform(shape_a), area_b->get_shape(shape_b), area_b->get_transform() * area_b->get_shape_transform(shape_b), nullptr, this)) {
- result = true;
+ bool result_a = area_a->collides_with(area_b);
+ bool result_b = area_b->collides_with(area_a);
+ if ((result_a || result_b) && !CollisionSolver3DSW::solve_static(area_a->get_shape(shape_a), area_a->get_transform() * area_a->get_shape_transform(shape_a), area_b->get_shape(shape_b), area_b->get_transform() * area_b->get_shape_transform(shape_b), nullptr, this)) {
+ result_a = false;
+ result_b = false;
}
- process_collision = false;
- if (result != colliding) {
- if (area_b->has_area_monitor_callback() && area_a->is_monitorable()) {
- process_collision = true;
- } else if (area_a->has_area_monitor_callback() && area_b->is_monitorable()) {
+ bool process_collision = false;
+
+ process_collision_a = false;
+ if (result_a != colliding_a) {
+ if (area_a->has_area_monitor_callback() && area_b->is_monitorable()) {
+ process_collision_a = true;
process_collision = true;
}
+ colliding_a = result_a;
+ }
- colliding = result;
+ process_collision_b = false;
+ if (result_b != colliding_b) {
+ if (area_b->has_area_monitor_callback() && area_a->is_monitorable()) {
+ process_collision_b = true;
+ process_collision = true;
+ }
+ colliding_b = result_b;
}
return process_collision;
}
bool Area2Pair3DSW::pre_solve(real_t p_step) {
- if (!process_collision) {
- return false;
+ if (process_collision_a) {
+ if (colliding_a) {
+ area_a->add_area_to_query(area_b, shape_b, shape_a);
+ } else {
+ area_a->remove_area_from_query(area_b, shape_b, shape_a);
+ }
}
- if (colliding) {
- if (area_b->has_area_monitor_callback() && area_a->is_monitorable()) {
+ if (process_collision_b) {
+ if (colliding_b) {
area_b->add_area_to_query(area_a, shape_a, shape_b);
- }
-
- if (area_a->has_area_monitor_callback() && area_b->is_monitorable()) {
- area_a->add_area_to_query(area_b, shape_b, shape_a);
- }
- } else {
- if (area_b->has_area_monitor_callback() && area_a->is_monitorable()) {
+ } else {
area_b->remove_area_from_query(area_a, shape_a, shape_b);
}
-
- if (area_a->has_area_monitor_callback() && area_b->is_monitorable()) {
- area_a->remove_area_from_query(area_b, shape_b, shape_a);
- }
}
return false; // Never do any post solving.
@@ -168,16 +173,18 @@ Area2Pair3DSW::Area2Pair3DSW(Area3DSW *p_area_a, int p_shape_a, Area3DSW *p_area
}
Area2Pair3DSW::~Area2Pair3DSW() {
- if (colliding) {
- if (area_b->has_area_monitor_callback()) {
- area_b->remove_area_from_query(area_a, shape_a, shape_b);
- }
-
+ if (colliding_a) {
if (area_a->has_area_monitor_callback()) {
area_a->remove_area_from_query(area_b, shape_b, shape_a);
}
}
+ if (colliding_b) {
+ if (area_b->has_area_monitor_callback()) {
+ area_b->remove_area_from_query(area_a, shape_a, shape_b);
+ }
+ }
+
area_a->remove_constraint(this);
area_b->remove_constraint(this);
}
@@ -187,7 +194,7 @@ Area2Pair3DSW::~Area2Pair3DSW() {
bool AreaSoftBodyPair3DSW::setup(real_t p_step) {
bool result = false;
if (
- area->interacts_with(soft_body) &&
+ area->collides_with(soft_body) &&
CollisionSolver3DSW::solve_static(
soft_body->get_shape(soft_body_shape),
soft_body->get_transform() * soft_body->get_shape_transform(soft_body_shape),
diff --git a/servers/physics_3d/area_pair_3d_sw.h b/servers/physics_3d/area_pair_3d_sw.h
index 8cc9e9ad63..4572dcbb23 100644
--- a/servers/physics_3d/area_pair_3d_sw.h
+++ b/servers/physics_3d/area_pair_3d_sw.h
@@ -58,8 +58,10 @@ class Area2Pair3DSW : public Constraint3DSW {
Area3DSW *area_b;
int shape_a;
int shape_b;
- bool colliding = false;
- bool process_collision = false;
+ bool colliding_a = false;
+ bool colliding_b = false;
+ bool process_collision_a = false;
+ bool process_collision_b = false;
public:
virtual bool setup(real_t p_step) override;
diff --git a/servers/physics_3d/body_3d_sw.cpp b/servers/physics_3d/body_3d_sw.cpp
index 0c4079332d..91fe80a3dc 100644
--- a/servers/physics_3d/body_3d_sw.cpp
+++ b/servers/physics_3d/body_3d_sw.cpp
@@ -29,12 +29,14 @@
/*************************************************************************/
#include "body_3d_sw.h"
+
#include "area_3d_sw.h"
+#include "body_direct_state_3d_sw.h"
#include "space_3d_sw.h"
-void Body3DSW::_update_inertia() {
- if (get_space() && !inertia_update_list.in_list()) {
- get_space()->body_add_to_inertia_update_list(&inertia_update_list);
+void Body3DSW::_mass_properties_changed() {
+ if (get_space() && !mass_properties_update_list.in_list() && (calculate_inertia || calculate_center_of_mass)) {
+ get_space()->body_add_to_mass_properties_update_list(&mass_properties_update_list);
}
}
@@ -42,7 +44,7 @@ void Body3DSW::_update_transform_dependant() {
center_of_mass = get_transform().basis.xform(center_of_mass_local);
principal_inertia_axes = get_transform().basis * principal_inertia_axes_local;
- // update inertia tensor
+ // Update inertia tensor.
Basis tb = principal_inertia_axes;
Basis tbt = tb.transposed();
Basis diag;
@@ -50,74 +52,95 @@ void Body3DSW::_update_transform_dependant() {
_inv_inertia_tensor = tb * diag * tbt;
}
-void Body3DSW::update_inertias() {
+void Body3DSW::update_mass_properties() {
// Update shapes and motions.
switch (mode) {
case PhysicsServer3D::BODY_MODE_DYNAMIC: {
- // Update tensor for all shapes, not the best way but should be somehow OK. (inspired from bullet)
real_t total_area = 0;
-
for (int i = 0; i < get_shape_count(); i++) {
+ if (is_shape_disabled(i)) {
+ continue;
+ }
+
total_area += get_shape_area(i);
}
- // We have to recompute the center of mass.
- center_of_mass_local.zero();
+ if (calculate_center_of_mass) {
+ // We have to recompute the center of mass.
+ center_of_mass_local.zero();
- if (total_area != 0.0) {
- for (int i = 0; i < get_shape_count(); i++) {
- real_t area = get_shape_area(i);
+ if (total_area != 0.0) {
+ for (int i = 0; i < get_shape_count(); i++) {
+ if (is_shape_disabled(i)) {
+ continue;
+ }
- real_t mass = area * this->mass / total_area;
+ real_t area = get_shape_area(i);
- // NOTE: we assume that the shape origin is also its center of mass.
- center_of_mass_local += mass * get_shape_transform(i).origin;
- }
+ real_t mass = area * this->mass / total_area;
+
+ // NOTE: we assume that the shape origin is also its center of mass.
+ center_of_mass_local += mass * get_shape_transform(i).origin;
+ }
- center_of_mass_local /= mass;
+ center_of_mass_local /= mass;
+ }
}
- // Recompute the inertia tensor.
- Basis inertia_tensor;
- inertia_tensor.set_zero();
- bool inertia_set = false;
+ if (calculate_inertia) {
+ // Recompute the inertia tensor.
+ Basis inertia_tensor;
+ inertia_tensor.set_zero();
+ bool inertia_set = false;
- for (int i = 0; i < get_shape_count(); i++) {
- if (is_shape_disabled(i)) {
- continue;
- }
+ for (int i = 0; i < get_shape_count(); i++) {
+ if (is_shape_disabled(i)) {
+ continue;
+ }
- real_t area = get_shape_area(i);
- if (area == 0.0) {
- continue;
- }
+ real_t area = get_shape_area(i);
+ if (area == 0.0) {
+ continue;
+ }
+
+ inertia_set = true;
- inertia_set = true;
+ const Shape3DSW *shape = get_shape(i);
- const Shape3DSW *shape = get_shape(i);
+ real_t mass = area * this->mass / total_area;
- real_t mass = area * this->mass / total_area;
+ Basis shape_inertia_tensor = Basis::from_scale(shape->get_moment_of_inertia(mass));
+ Transform3D shape_transform = get_shape_transform(i);
+ Basis shape_basis = shape_transform.basis.orthonormalized();
- Basis shape_inertia_tensor = shape->get_moment_of_inertia(mass).to_diagonal_matrix();
- Transform3D shape_transform = get_shape_transform(i);
- Basis shape_basis = shape_transform.basis.orthonormalized();
+ // NOTE: we don't take the scale of collision shapes into account when computing the inertia tensor!
+ shape_inertia_tensor = shape_basis * shape_inertia_tensor * shape_basis.transposed();
- // NOTE: we don't take the scale of collision shapes into account when computing the inertia tensor!
- shape_inertia_tensor = shape_basis * shape_inertia_tensor * shape_basis.transposed();
+ Vector3 shape_origin = shape_transform.origin - center_of_mass_local;
+ inertia_tensor += shape_inertia_tensor + (Basis() * shape_origin.dot(shape_origin) - shape_origin.outer(shape_origin)) * mass;
+ }
- Vector3 shape_origin = shape_transform.origin - center_of_mass_local;
- inertia_tensor += shape_inertia_tensor + (Basis() * shape_origin.dot(shape_origin) - shape_origin.outer(shape_origin)) * mass;
- }
+ // Set the inertia to a valid value when there are no valid shapes.
+ if (!inertia_set) {
+ inertia_tensor = Basis();
+ }
- // Set the inertia to a valid value when there are no valid shapes.
- if (!inertia_set) {
- inertia_tensor.set_diagonal(Vector3(1.0, 1.0, 1.0));
- }
+ // Handle partial custom inertia.
+ if (inertia.x > 0.0) {
+ inertia_tensor[0][0] = inertia.x;
+ }
+ if (inertia.y > 0.0) {
+ inertia_tensor[1][1] = inertia.y;
+ }
+ if (inertia.z > 0.0) {
+ inertia_tensor[2][2] = inertia.z;
+ }
- // Compute the principal axes of inertia.
- principal_inertia_axes_local = inertia_tensor.diagonalize().transposed();
- _inv_inertia = inertia_tensor.get_main_diagonal().inverse();
+ // Compute the principal axes of inertia.
+ principal_inertia_axes_local = inertia_tensor.diagonalize().transposed();
+ _inv_inertia = inertia_tensor.get_main_diagonal().inverse();
+ }
if (mass) {
_inv_mass = 1.0 / mass;
@@ -126,24 +149,27 @@ void Body3DSW::update_inertias() {
}
} break;
-
case PhysicsServer3D::BODY_MODE_KINEMATIC:
case PhysicsServer3D::BODY_MODE_STATIC: {
- _inv_inertia_tensor.set_zero();
+ _inv_inertia = Vector3();
_inv_mass = 0;
} break;
- case PhysicsServer3D::BODY_MODE_DYNAMIC_LOCKED: {
+ case PhysicsServer3D::BODY_MODE_DYNAMIC_LINEAR: {
_inv_inertia_tensor.set_zero();
_inv_mass = 1.0 / mass;
} break;
}
- //_update_shapes();
-
_update_transform_dependant();
}
+void Body3DSW::reset_mass_properties() {
+ calculate_inertia = true;
+ calculate_center_of_mass = true;
+ _mass_properties_changed();
+}
+
void Body3DSW::set_active(bool p_active) {
if (active == p_active) {
return;
@@ -163,7 +189,7 @@ void Body3DSW::set_active(bool p_active) {
}
}
-void Body3DSW::set_param(PhysicsServer3D::BodyParameter p_param, real_t p_value) {
+void Body3DSW::set_param(PhysicsServer3D::BodyParameter p_param, const Variant &p_value) {
switch (p_param) {
case PhysicsServer3D::BODY_PARAM_BOUNCE: {
bounce = p_value;
@@ -172,10 +198,33 @@ void Body3DSW::set_param(PhysicsServer3D::BodyParameter p_param, real_t p_value)
friction = p_value;
} break;
case PhysicsServer3D::BODY_PARAM_MASS: {
- ERR_FAIL_COND(p_value <= 0);
- mass = p_value;
- _update_inertia();
-
+ real_t mass_value = p_value;
+ ERR_FAIL_COND(mass_value <= 0);
+ mass = mass_value;
+ if (mode >= PhysicsServer3D::BODY_MODE_DYNAMIC) {
+ _mass_properties_changed();
+ }
+ } break;
+ case PhysicsServer3D::BODY_PARAM_INERTIA: {
+ inertia = p_value;
+ if ((inertia.x <= 0.0) || (inertia.y <= 0.0) || (inertia.z <= 0.0)) {
+ calculate_inertia = true;
+ if (mode == PhysicsServer3D::BODY_MODE_DYNAMIC) {
+ _mass_properties_changed();
+ }
+ } else {
+ calculate_inertia = false;
+ if (mode == PhysicsServer3D::BODY_MODE_DYNAMIC) {
+ principal_inertia_axes_local = Basis();
+ _inv_inertia = inertia.inverse();
+ _update_transform_dependant();
+ }
+ }
+ } break;
+ case PhysicsServer3D::BODY_PARAM_CENTER_OF_MASS: {
+ calculate_center_of_mass = false;
+ center_of_mass_local = p_value;
+ _update_transform_dependant();
} break;
case PhysicsServer3D::BODY_PARAM_GRAVITY_SCALE: {
gravity_scale = p_value;
@@ -191,7 +240,7 @@ void Body3DSW::set_param(PhysicsServer3D::BodyParameter p_param, real_t p_value)
}
}
-real_t Body3DSW::get_param(PhysicsServer3D::BodyParameter p_param) const {
+Variant Body3DSW::get_param(PhysicsServer3D::BodyParameter p_param) const {
switch (p_param) {
case PhysicsServer3D::BODY_PARAM_BOUNCE: {
return bounce;
@@ -202,6 +251,16 @@ real_t Body3DSW::get_param(PhysicsServer3D::BodyParameter p_param) const {
case PhysicsServer3D::BODY_PARAM_MASS: {
return mass;
} break;
+ case PhysicsServer3D::BODY_PARAM_INERTIA: {
+ if (mode == PhysicsServer3D::BODY_MODE_DYNAMIC) {
+ return _inv_inertia.inverse();
+ } else {
+ return Vector3();
+ }
+ } break;
+ case PhysicsServer3D::BODY_PARAM_CENTER_OF_MASS: {
+ return center_of_mass;
+ } break;
case PhysicsServer3D::BODY_PARAM_GRAVITY_SCALE: {
return gravity_scale;
} break;
@@ -224,40 +283,42 @@ void Body3DSW::set_mode(PhysicsServer3D::BodyMode p_mode) {
mode = p_mode;
switch (p_mode) {
- //CLEAR UP EVERYTHING IN CASE IT NOT WORKS!
case PhysicsServer3D::BODY_MODE_STATIC:
case PhysicsServer3D::BODY_MODE_KINEMATIC: {
_set_inv_transform(get_transform().affine_inverse());
_inv_mass = 0;
+ _inv_inertia = Vector3();
_set_static(p_mode == PhysicsServer3D::BODY_MODE_STATIC);
- //set_active(p_mode==PhysicsServer3D::BODY_MODE_KINEMATIC);
set_active(p_mode == PhysicsServer3D::BODY_MODE_KINEMATIC && contacts.size());
linear_velocity = Vector3();
angular_velocity = Vector3();
if (mode == PhysicsServer3D::BODY_MODE_KINEMATIC && prev != mode) {
first_time_kinematic = true;
}
+ _update_transform_dependant();
} break;
case PhysicsServer3D::BODY_MODE_DYNAMIC: {
_inv_mass = mass > 0 ? (1.0 / mass) : 0;
+ if (!calculate_inertia) {
+ principal_inertia_axes_local = Basis();
+ _inv_inertia = inertia.inverse();
+ _update_transform_dependant();
+ }
+ _mass_properties_changed();
_set_static(false);
set_active(true);
} break;
- case PhysicsServer3D::BODY_MODE_DYNAMIC_LOCKED: {
+ case PhysicsServer3D::BODY_MODE_DYNAMIC_LINEAR: {
_inv_mass = mass > 0 ? (1.0 / mass) : 0;
+ _inv_inertia = Vector3();
+ angular_velocity = Vector3();
+ _update_transform_dependant();
_set_static(false);
set_active(true);
- angular_velocity = Vector3();
- } break;
+ }
}
-
- _update_inertia();
- /*
- if (get_space())
- _update_queries();
- */
}
PhysicsServer3D::BodyMode Body3DSW::get_mode() const {
@@ -265,7 +326,7 @@ PhysicsServer3D::BodyMode Body3DSW::get_mode() const {
}
void Body3DSW::_shapes_changed() {
- _update_inertia();
+ _mass_properties_changed();
}
void Body3DSW::set_state(PhysicsServer3D::BodyState p_state, const Variant &p_variant) {
@@ -300,10 +361,12 @@ void Body3DSW::set_state(PhysicsServer3D::BodyState p_state, const Variant &p_va
} break;
case PhysicsServer3D::BODY_STATE_LINEAR_VELOCITY: {
linear_velocity = p_variant;
+ constant_linear_velocity = linear_velocity;
wakeup();
} break;
case PhysicsServer3D::BODY_STATE_ANGULAR_VELOCITY: {
angular_velocity = p_variant;
+ constant_angular_velocity = angular_velocity;
wakeup();
} break;
@@ -324,7 +387,7 @@ void Body3DSW::set_state(PhysicsServer3D::BodyState p_state, const Variant &p_va
} break;
case PhysicsServer3D::BODY_STATE_CAN_SLEEP: {
can_sleep = p_variant;
- if (mode == PhysicsServer3D::BODY_MODE_DYNAMIC && !active && !can_sleep) {
+ if (mode >= PhysicsServer3D::BODY_MODE_DYNAMIC && !active && !can_sleep) {
set_active(true);
}
@@ -356,8 +419,8 @@ Variant Body3DSW::get_state(PhysicsServer3D::BodyState p_state) const {
void Body3DSW::set_space(Space3DSW *p_space) {
if (get_space()) {
- if (inertia_update_list.in_list()) {
- get_space()->body_remove_from_inertia_update_list(&inertia_update_list);
+ if (mass_properties_update_list.in_list()) {
+ get_space()->body_remove_from_mass_properties_update_list(&mass_properties_update_list);
}
if (active_list.in_list()) {
get_space()->body_remove_from_active_list(&active_list);
@@ -370,26 +433,17 @@ void Body3DSW::set_space(Space3DSW *p_space) {
_set_space(p_space);
if (get_space()) {
- _update_inertia();
+ _mass_properties_changed();
if (active) {
get_space()->body_add_to_active_list(&active_list);
}
}
-
- first_integration = true;
}
-void Body3DSW::_compute_area_gravity_and_dampenings(const Area3DSW *p_area) {
- if (p_area->is_gravity_point()) {
- if (p_area->get_gravity_distance_scale() > 0) {
- Vector3 v = p_area->get_transform().xform(p_area->get_gravity_vector()) - get_transform().get_origin();
- gravity += v.normalized() * (p_area->get_gravity() / Math::pow(v.length() * p_area->get_gravity_distance_scale() + 1, 2));
- } else {
- gravity += (p_area->get_transform().xform(p_area->get_gravity_vector()) - get_transform().get_origin()).normalized() * p_area->get_gravity();
- }
- } else {
- gravity += p_area->get_gravity_vector() * p_area->get_gravity();
- }
+void Body3DSW::_compute_area_gravity_and_damping(const Area3DSW *p_area) {
+ Vector3 area_gravity;
+ p_area->compute_gravity(get_transform().get_origin(), area_gravity);
+ gravity += area_gravity;
area_linear_damp += p_area->get_linear_damp();
area_angular_damp += p_area->get_angular_damp();
@@ -431,7 +485,7 @@ void Body3DSW::integrate_forces(real_t p_step) {
switch (mode) {
case PhysicsServer3D::AREA_SPACE_OVERRIDE_COMBINE:
case PhysicsServer3D::AREA_SPACE_OVERRIDE_COMBINE_REPLACE: {
- _compute_area_gravity_and_dampenings(aa[i].area);
+ _compute_area_gravity_and_damping(aa[i].area);
stopped = mode == PhysicsServer3D::AREA_SPACE_OVERRIDE_COMBINE_REPLACE;
} break;
case PhysicsServer3D::AREA_SPACE_OVERRIDE_REPLACE:
@@ -439,7 +493,7 @@ void Body3DSW::integrate_forces(real_t p_step) {
gravity = Vector3(0, 0, 0);
area_angular_damp = 0;
area_linear_damp = 0;
- _compute_area_gravity_and_dampenings(aa[i].area);
+ _compute_area_gravity_and_damping(aa[i].area);
stopped = mode == PhysicsServer3D::AREA_SPACE_OVERRIDE_REPLACE;
} break;
default: {
@@ -449,7 +503,7 @@ void Body3DSW::integrate_forces(real_t p_step) {
}
if (!stopped) {
- _compute_area_gravity_and_dampenings(def_area);
+ _compute_area_gravity_and_damping(def_area);
}
gravity *= gravity_scale;
@@ -478,7 +532,7 @@ void Body3DSW::integrate_forces(real_t p_step) {
//compute motion, angular and etc. velocities from prev transform
motion = new_transform.origin - get_transform().origin;
do_motion = true;
- linear_velocity = motion / p_step;
+ linear_velocity = constant_linear_velocity + motion / p_step;
//compute a FAKE angular velocity, not so easy
Basis rot = new_transform.basis.orthonormalized() * get_transform().basis.orthonormalized().transposed();
@@ -487,9 +541,9 @@ void Body3DSW::integrate_forces(real_t p_step) {
rot.get_axis_angle(axis, angle);
axis.normalize();
- angular_velocity = axis * (angle / p_step);
+ angular_velocity = constant_angular_velocity + axis * (angle / p_step);
} else {
- if (!omit_force_integration && !first_integration) {
+ if (!omit_force_integration) {
//overridden by direct state query
Vector3 force = gravity * mass;
@@ -523,7 +577,6 @@ void Body3DSW::integrate_forces(real_t p_step) {
applied_force = Vector3();
applied_torque = Vector3();
- first_integration = false;
//motion=linear_velocity*p_step;
@@ -543,7 +596,7 @@ void Body3DSW::integrate_velocities(real_t p_step) {
return;
}
- if (fi_callback) {
+ if (fi_callback_data || body_state_callback) {
get_space()->body_add_to_state_query_list(&direct_state_query_list);
}
@@ -600,11 +653,6 @@ void Body3DSW::integrate_velocities(real_t p_step) {
_set_inv_transform(get_transform().inverse());
_update_transform_dependant();
-
- /*
- if (fi_callback) {
- get_space()->body_add_to_state_query_list(&direct_state_query_list);
- */
}
/*
@@ -650,7 +698,7 @@ void Body3DSW::wakeup_neighbours() {
continue;
}
Body3DSW *b = n[i];
- if (b->mode != PhysicsServer3D::BODY_MODE_DYNAMIC) {
+ if (b->mode < PhysicsServer3D::BODY_MODE_DYNAMIC) {
continue;
}
@@ -662,24 +710,23 @@ void Body3DSW::wakeup_neighbours() {
}
void Body3DSW::call_queries() {
- if (fi_callback) {
- PhysicsDirectBodyState3DSW *dbs = PhysicsDirectBodyState3DSW::singleton;
- dbs->body = this;
-
- Variant v = dbs;
-
- Object *obj = fi_callback->callable.get_object();
- if (!obj) {
+ if (fi_callback_data) {
+ if (!fi_callback_data->callable.get_object()) {
set_force_integration_callback(Callable());
} else {
- const Variant *vp[2] = { &v, &fi_callback->udata };
+ Variant direct_state_variant = get_direct_state();
+ const Variant *vp[2] = { &direct_state_variant, &fi_callback_data->udata };
Callable::CallError ce;
- int argc = (fi_callback->udata.get_type() == Variant::NIL) ? 1 : 2;
+ int argc = (fi_callback_data->udata.get_type() == Variant::NIL) ? 1 : 2;
Variant rv;
- fi_callback->callable.call(vp, argc, rv, ce);
+ fi_callback_data->callable.call(vp, argc, rv, ce);
}
}
+
+ if (body_state_callback_instance) {
+ (body_state_callback)(body_state_callback_instance, get_direct_state());
+ }
}
bool Body3DSW::sleep_test(real_t p_step) {
@@ -699,60 +746,45 @@ bool Body3DSW::sleep_test(real_t p_step) {
}
}
+void Body3DSW::set_state_sync_callback(void *p_instance, PhysicsServer3D::BodyStateCallback p_callback) {
+ body_state_callback_instance = p_instance;
+ body_state_callback = p_callback;
+}
+
void Body3DSW::set_force_integration_callback(const Callable &p_callable, const Variant &p_udata) {
- if (fi_callback) {
- memdelete(fi_callback);
- fi_callback = nullptr;
+ if (p_callable.get_object()) {
+ if (!fi_callback_data) {
+ fi_callback_data = memnew(ForceIntegrationCallbackData);
+ }
+ fi_callback_data->callable = p_callable;
+ fi_callback_data->udata = p_udata;
+ } else if (fi_callback_data) {
+ memdelete(fi_callback_data);
+ fi_callback_data = nullptr;
}
+}
- if (p_callable.get_object()) {
- fi_callback = memnew(ForceIntegrationCallback);
- fi_callback->callable = p_callable;
- fi_callback->udata = p_udata;
+PhysicsDirectBodyState3DSW *Body3DSW::get_direct_state() {
+ if (!direct_state) {
+ direct_state = memnew(PhysicsDirectBodyState3DSW);
+ direct_state->body = this;
}
+ return direct_state;
}
Body3DSW::Body3DSW() :
CollisionObject3DSW(TYPE_BODY),
-
active_list(this),
- inertia_update_list(this),
+ mass_properties_update_list(this),
direct_state_query_list(this) {
- mode = PhysicsServer3D::BODY_MODE_DYNAMIC;
- active = true;
-
- mass = 1;
- _inv_mass = 1;
- bounce = 0;
- friction = 1;
- omit_force_integration = false;
- //applied_torque=0;
- island_step = 0;
- first_time_kinematic = false;
- first_integration = false;
_set_static(false);
-
- contact_count = 0;
- gravity_scale = 1.0;
- linear_damp = -1;
- angular_damp = -1;
- area_angular_damp = 0;
- area_linear_damp = 0;
-
- still_time = 0;
- continuous_cd = false;
- can_sleep = true;
- fi_callback = nullptr;
}
Body3DSW::~Body3DSW() {
- if (fi_callback) {
- memdelete(fi_callback);
+ if (fi_callback_data) {
+ memdelete(fi_callback_data);
+ }
+ if (direct_state) {
+ memdelete(direct_state);
}
-}
-
-PhysicsDirectBodyState3DSW *PhysicsDirectBodyState3DSW::singleton = nullptr;
-
-PhysicsDirectSpaceState3D *PhysicsDirectBodyState3DSW::get_space_state() {
- return body->get_space()->get_direct_state();
}
diff --git a/servers/physics_3d/body_3d_sw.h b/servers/physics_3d/body_3d_sw.h
index efb114a325..fc47040389 100644
--- a/servers/physics_3d/body_3d_sw.h
+++ b/servers/physics_3d/body_3d_sw.h
@@ -28,34 +28,39 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef BODY_SW_H
-#define BODY_SW_H
+#ifndef BODY_3D_SW_H
+#define BODY_3D_SW_H
#include "area_3d_sw.h"
#include "collision_object_3d_sw.h"
#include "core/templates/vset.h"
class Constraint3DSW;
+class PhysicsDirectBodyState3DSW;
class Body3DSW : public CollisionObject3DSW {
- PhysicsServer3D::BodyMode mode;
+ PhysicsServer3D::BodyMode mode = PhysicsServer3D::BODY_MODE_DYNAMIC;
Vector3 linear_velocity;
Vector3 angular_velocity;
+ Vector3 constant_linear_velocity;
+ Vector3 constant_angular_velocity;
+
Vector3 biased_linear_velocity;
Vector3 biased_angular_velocity;
- real_t mass;
- real_t bounce;
- real_t friction;
+ real_t mass = 1.0;
+ real_t bounce = 0.0;
+ real_t friction = 1.0;
+ Vector3 inertia;
- real_t linear_damp;
- real_t angular_damp;
- real_t gravity_scale;
+ real_t linear_damp = -1.0;
+ real_t angular_damp = -1.0;
+ real_t gravity_scale = 1.0;
uint16_t locked_axis = 0;
- real_t _inv_mass;
+ real_t _inv_mass = 1.0;
Vector3 _inv_inertia; // Relative to the principal axes of inertia
// Relative to the local frame of reference
@@ -67,30 +72,32 @@ class Body3DSW : public CollisionObject3DSW {
Basis principal_inertia_axes;
Vector3 center_of_mass;
+ bool calculate_inertia = true;
+ bool calculate_center_of_mass = true;
+
Vector3 gravity;
- real_t still_time;
+ real_t still_time = 0.0;
Vector3 applied_force;
Vector3 applied_torque;
- real_t area_angular_damp;
- real_t area_linear_damp;
+ real_t area_angular_damp = 0.0;
+ real_t area_linear_damp = 0.0;
SelfList<Body3DSW> active_list;
- SelfList<Body3DSW> inertia_update_list;
+ SelfList<Body3DSW> mass_properties_update_list;
SelfList<Body3DSW> direct_state_query_list;
VSet<RID> exceptions;
- bool omit_force_integration;
- bool active;
+ bool omit_force_integration = false;
+ bool active = true;
- bool first_integration;
+ bool continuous_cd = false;
+ bool can_sleep = true;
+ bool first_time_kinematic = false;
- bool continuous_cd;
- bool can_sleep;
- bool first_time_kinematic;
- void _update_inertia();
+ void _mass_properties_changed();
virtual void _shapes_changed();
Transform3D new_transform;
@@ -101,36 +108,44 @@ class Body3DSW : public CollisionObject3DSW {
struct Contact {
Vector3 local_pos;
Vector3 local_normal;
- real_t depth;
- int local_shape;
+ real_t depth = 0.0;
+ int local_shape = 0;
Vector3 collider_pos;
- int collider_shape;
+ int collider_shape = 0;
ObjectID collider_instance_id;
RID collider;
Vector3 collider_velocity_at_pos;
};
Vector<Contact> contacts; //no contacts by default
- int contact_count;
+ int contact_count = 0;
+
+ void *body_state_callback_instance = nullptr;
+ PhysicsServer3D::BodyStateCallback body_state_callback = nullptr;
- struct ForceIntegrationCallback {
+ struct ForceIntegrationCallbackData {
Callable callable;
Variant udata;
};
- ForceIntegrationCallback *fi_callback;
+ ForceIntegrationCallbackData *fi_callback_data = nullptr;
- uint64_t island_step;
+ PhysicsDirectBodyState3DSW *direct_state = nullptr;
- _FORCE_INLINE_ void _compute_area_gravity_and_dampenings(const Area3DSW *p_area);
+ uint64_t island_step = 0;
+
+ _FORCE_INLINE_ void _compute_area_gravity_and_damping(const Area3DSW *p_area);
_FORCE_INLINE_ void _update_transform_dependant();
friend class PhysicsDirectBodyState3DSW; // i give up, too many functions to expose
public:
+ void set_state_sync_callback(void *p_instance, PhysicsServer3D::BodyStateCallback p_callback);
void set_force_integration_callback(const Callable &p_callable, const Variant &p_udata = Variant());
+ PhysicsDirectBodyState3DSW *get_direct_state();
+
_FORCE_INLINE_ void add_area(Area3DSW *p_area) {
int index = areas.find(AreaCMP(p_area));
if (index > -1) {
@@ -242,8 +257,8 @@ public:
set_active(true);
}
- void set_param(PhysicsServer3D::BodyParameter p_param, real_t);
- real_t get_param(PhysicsServer3D::BodyParameter p_param) const;
+ void set_param(PhysicsServer3D::BodyParameter p_param, const Variant &p_value);
+ Variant get_param(PhysicsServer3D::BodyParameter p_param) const;
void set_mode(PhysicsServer3D::BodyMode p_mode);
PhysicsServer3D::BodyMode get_mode() const;
@@ -262,7 +277,8 @@ public:
void set_space(Space3DSW *p_space);
- void update_inertias();
+ void update_mass_properties();
+ void reset_mass_properties();
_FORCE_INLINE_ real_t get_inv_mass() const { return _inv_mass; }
_FORCE_INLINE_ const Vector3 &get_inv_inertia() const { return _inv_inertia; }
@@ -349,96 +365,4 @@ void Body3DSW::add_contact(const Vector3 &p_local_pos, const Vector3 &p_local_no
c[idx].collider_velocity_at_pos = p_collider_velocity_at_pos;
}
-class PhysicsDirectBodyState3DSW : public PhysicsDirectBodyState3D {
- GDCLASS(PhysicsDirectBodyState3DSW, PhysicsDirectBodyState3D);
-
-public:
- static PhysicsDirectBodyState3DSW *singleton;
- Body3DSW *body;
- real_t step;
-
- virtual Vector3 get_total_gravity() const override { return body->gravity; } // get gravity vector working on this body space/area
- virtual real_t get_total_angular_damp() const override { return body->area_angular_damp; } // get density of this body space/area
- virtual real_t get_total_linear_damp() const override { return body->area_linear_damp; } // get density of this body space/area
-
- virtual Vector3 get_center_of_mass() const override { return body->get_center_of_mass(); }
- virtual Basis get_principal_inertia_axes() const override { return body->get_principal_inertia_axes(); }
-
- virtual real_t get_inverse_mass() const override { return body->get_inv_mass(); } // get the mass
- virtual Vector3 get_inverse_inertia() const override { return body->get_inv_inertia(); } // get density of this body space
- virtual Basis get_inverse_inertia_tensor() const override { return body->get_inv_inertia_tensor(); } // get density of this body space
-
- virtual void set_linear_velocity(const Vector3 &p_velocity) override { body->set_linear_velocity(p_velocity); }
- virtual Vector3 get_linear_velocity() const override { return body->get_linear_velocity(); }
-
- virtual void set_angular_velocity(const Vector3 &p_velocity) override { body->set_angular_velocity(p_velocity); }
- virtual Vector3 get_angular_velocity() const override { return body->get_angular_velocity(); }
-
- virtual void set_transform(const Transform3D &p_transform) override { body->set_state(PhysicsServer3D::BODY_STATE_TRANSFORM, p_transform); }
- virtual Transform3D get_transform() const override { return body->get_transform(); }
-
- virtual Vector3 get_velocity_at_local_position(const Vector3 &p_position) const override { return body->get_velocity_in_local_point(p_position); }
-
- virtual void add_central_force(const Vector3 &p_force) override { body->add_central_force(p_force); }
- virtual void add_force(const Vector3 &p_force, const Vector3 &p_position = Vector3()) override {
- body->add_force(p_force, p_position);
- }
- virtual void add_torque(const Vector3 &p_torque) override { body->add_torque(p_torque); }
- virtual void apply_central_impulse(const Vector3 &p_impulse) override { body->apply_central_impulse(p_impulse); }
- virtual void apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position = Vector3()) override {
- body->apply_impulse(p_impulse, p_position);
- }
- virtual void apply_torque_impulse(const Vector3 &p_impulse) override { body->apply_torque_impulse(p_impulse); }
-
- virtual void set_sleep_state(bool p_sleep) override { body->set_active(!p_sleep); }
- virtual bool is_sleeping() const override { return !body->is_active(); }
-
- virtual int get_contact_count() const override { return body->contact_count; }
-
- virtual Vector3 get_contact_local_position(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3());
- return body->contacts[p_contact_idx].local_pos;
- }
- virtual Vector3 get_contact_local_normal(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3());
- return body->contacts[p_contact_idx].local_normal;
- }
- virtual real_t get_contact_impulse(int p_contact_idx) const override {
- return 0.0f; // Only implemented for bullet
- }
- virtual int get_contact_local_shape(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, -1);
- return body->contacts[p_contact_idx].local_shape;
- }
-
- virtual RID get_contact_collider(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, RID());
- return body->contacts[p_contact_idx].collider;
- }
- virtual Vector3 get_contact_collider_position(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3());
- return body->contacts[p_contact_idx].collider_pos;
- }
- virtual ObjectID get_contact_collider_id(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, ObjectID());
- return body->contacts[p_contact_idx].collider_instance_id;
- }
- virtual int get_contact_collider_shape(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, 0);
- return body->contacts[p_contact_idx].collider_shape;
- }
- virtual Vector3 get_contact_collider_velocity_at_position(int p_contact_idx) const override {
- ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3());
- return body->contacts[p_contact_idx].collider_velocity_at_pos;
- }
-
- virtual PhysicsDirectSpaceState3D *get_space_state() override;
-
- virtual real_t get_step() const override { return step; }
- PhysicsDirectBodyState3DSW() {
- singleton = this;
- body = nullptr;
- }
-};
-
-#endif // BODY__SW_H
+#endif // BODY_3D_SW_H
diff --git a/servers/physics_3d/body_direct_state_3d_sw.cpp b/servers/physics_3d/body_direct_state_3d_sw.cpp
new file mode 100644
index 0000000000..e74baefc3a
--- /dev/null
+++ b/servers/physics_3d/body_direct_state_3d_sw.cpp
@@ -0,0 +1,190 @@
+/*************************************************************************/
+/* body_direct_state_3d_sw.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "body_direct_state_3d_sw.h"
+
+#include "body_3d_sw.h"
+#include "space_3d_sw.h"
+
+Vector3 PhysicsDirectBodyState3DSW::get_total_gravity() const {
+ return body->gravity;
+}
+
+real_t PhysicsDirectBodyState3DSW::get_total_angular_damp() const {
+ return body->area_angular_damp;
+}
+
+real_t PhysicsDirectBodyState3DSW::get_total_linear_damp() const {
+ return body->area_linear_damp;
+}
+
+Vector3 PhysicsDirectBodyState3DSW::get_center_of_mass() const {
+ return body->get_center_of_mass();
+}
+
+Basis PhysicsDirectBodyState3DSW::get_principal_inertia_axes() const {
+ return body->get_principal_inertia_axes();
+}
+
+real_t PhysicsDirectBodyState3DSW::get_inverse_mass() const {
+ return body->get_inv_mass();
+}
+
+Vector3 PhysicsDirectBodyState3DSW::get_inverse_inertia() const {
+ return body->get_inv_inertia();
+}
+
+Basis PhysicsDirectBodyState3DSW::get_inverse_inertia_tensor() const {
+ return body->get_inv_inertia_tensor();
+}
+
+void PhysicsDirectBodyState3DSW::set_linear_velocity(const Vector3 &p_velocity) {
+ body->set_active(true);
+ body->set_linear_velocity(p_velocity);
+}
+
+Vector3 PhysicsDirectBodyState3DSW::get_linear_velocity() const {
+ return body->get_linear_velocity();
+}
+
+void PhysicsDirectBodyState3DSW::set_angular_velocity(const Vector3 &p_velocity) {
+ body->set_active(true);
+ body->set_angular_velocity(p_velocity);
+}
+
+Vector3 PhysicsDirectBodyState3DSW::get_angular_velocity() const {
+ return body->get_angular_velocity();
+}
+
+void PhysicsDirectBodyState3DSW::set_transform(const Transform3D &p_transform) {
+ body->set_state(PhysicsServer3D::BODY_STATE_TRANSFORM, p_transform);
+}
+
+Transform3D PhysicsDirectBodyState3DSW::get_transform() const {
+ return body->get_transform();
+}
+
+Vector3 PhysicsDirectBodyState3DSW::get_velocity_at_local_position(const Vector3 &p_position) const {
+ return body->get_velocity_in_local_point(p_position);
+}
+
+void PhysicsDirectBodyState3DSW::add_central_force(const Vector3 &p_force) {
+ body->set_active(true);
+ body->add_central_force(p_force);
+}
+
+void PhysicsDirectBodyState3DSW::add_force(const Vector3 &p_force, const Vector3 &p_position) {
+ body->set_active(true);
+ body->add_force(p_force, p_position);
+}
+
+void PhysicsDirectBodyState3DSW::add_torque(const Vector3 &p_torque) {
+ body->set_active(true);
+ body->add_torque(p_torque);
+}
+
+void PhysicsDirectBodyState3DSW::apply_central_impulse(const Vector3 &p_impulse) {
+ body->set_active(true);
+ body->apply_central_impulse(p_impulse);
+}
+
+void PhysicsDirectBodyState3DSW::apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position) {
+ body->set_active(true);
+ body->apply_impulse(p_impulse, p_position);
+}
+
+void PhysicsDirectBodyState3DSW::apply_torque_impulse(const Vector3 &p_impulse) {
+ body->set_active(true);
+ body->apply_torque_impulse(p_impulse);
+}
+
+void PhysicsDirectBodyState3DSW::set_sleep_state(bool p_sleep) {
+ body->set_active(!p_sleep);
+}
+
+bool PhysicsDirectBodyState3DSW::is_sleeping() const {
+ return !body->is_active();
+}
+
+int PhysicsDirectBodyState3DSW::get_contact_count() const {
+ return body->contact_count;
+}
+
+Vector3 PhysicsDirectBodyState3DSW::get_contact_local_position(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3());
+ return body->contacts[p_contact_idx].local_pos;
+}
+
+Vector3 PhysicsDirectBodyState3DSW::get_contact_local_normal(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3());
+ return body->contacts[p_contact_idx].local_normal;
+}
+
+real_t PhysicsDirectBodyState3DSW::get_contact_impulse(int p_contact_idx) const {
+ return 0.0f; // Only implemented for bullet
+}
+
+int PhysicsDirectBodyState3DSW::get_contact_local_shape(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, -1);
+ return body->contacts[p_contact_idx].local_shape;
+}
+
+RID PhysicsDirectBodyState3DSW::get_contact_collider(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, RID());
+ return body->contacts[p_contact_idx].collider;
+}
+
+Vector3 PhysicsDirectBodyState3DSW::get_contact_collider_position(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3());
+ return body->contacts[p_contact_idx].collider_pos;
+}
+
+ObjectID PhysicsDirectBodyState3DSW::get_contact_collider_id(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, ObjectID());
+ return body->contacts[p_contact_idx].collider_instance_id;
+}
+
+int PhysicsDirectBodyState3DSW::get_contact_collider_shape(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, 0);
+ return body->contacts[p_contact_idx].collider_shape;
+}
+
+Vector3 PhysicsDirectBodyState3DSW::get_contact_collider_velocity_at_position(int p_contact_idx) const {
+ ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3());
+ return body->contacts[p_contact_idx].collider_velocity_at_pos;
+}
+
+PhysicsDirectSpaceState3D *PhysicsDirectBodyState3DSW::get_space_state() {
+ return body->get_space()->get_direct_state();
+}
+
+real_t PhysicsDirectBodyState3DSW::get_step() const {
+ return body->get_space()->get_last_step();
+}
diff --git a/servers/physics_3d/body_direct_state_3d_sw.h b/servers/physics_3d/body_direct_state_3d_sw.h
new file mode 100644
index 0000000000..5132376715
--- /dev/null
+++ b/servers/physics_3d/body_direct_state_3d_sw.h
@@ -0,0 +1,94 @@
+/*************************************************************************/
+/* body_direct_state_3d_sw.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef BODY_DIRECT_STATE_3D_SW_H
+#define BODY_DIRECT_STATE_3D_SW_H
+
+#include "servers/physics_server_3d.h"
+
+class Body3DSW;
+
+class PhysicsDirectBodyState3DSW : public PhysicsDirectBodyState3D {
+ GDCLASS(PhysicsDirectBodyState3DSW, PhysicsDirectBodyState3D);
+
+public:
+ Body3DSW *body = nullptr;
+
+ virtual Vector3 get_total_gravity() const override;
+ virtual real_t get_total_angular_damp() const override;
+ virtual real_t get_total_linear_damp() const override;
+
+ virtual Vector3 get_center_of_mass() const override;
+ virtual Basis get_principal_inertia_axes() const override;
+
+ virtual real_t get_inverse_mass() const override;
+ virtual Vector3 get_inverse_inertia() const override;
+ virtual Basis get_inverse_inertia_tensor() const override;
+
+ virtual void set_linear_velocity(const Vector3 &p_velocity) override;
+ virtual Vector3 get_linear_velocity() const override;
+
+ virtual void set_angular_velocity(const Vector3 &p_velocity) override;
+ virtual Vector3 get_angular_velocity() const override;
+
+ virtual void set_transform(const Transform3D &p_transform) override;
+ virtual Transform3D get_transform() const override;
+
+ virtual Vector3 get_velocity_at_local_position(const Vector3 &p_position) const override;
+
+ virtual void add_central_force(const Vector3 &p_force) override;
+ virtual void add_force(const Vector3 &p_force, const Vector3 &p_position = Vector3()) override;
+ virtual void add_torque(const Vector3 &p_torque) override;
+ virtual void apply_central_impulse(const Vector3 &p_impulse) override;
+ virtual void apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position = Vector3()) override;
+ virtual void apply_torque_impulse(const Vector3 &p_impulse) override;
+
+ virtual void set_sleep_state(bool p_sleep) override;
+ virtual bool is_sleeping() const override;
+
+ virtual int get_contact_count() const override;
+
+ virtual Vector3 get_contact_local_position(int p_contact_idx) const override;
+ virtual Vector3 get_contact_local_normal(int p_contact_idx) const override;
+ virtual real_t get_contact_impulse(int p_contact_idx) const override;
+ virtual int get_contact_local_shape(int p_contact_idx) const override;
+
+ virtual RID get_contact_collider(int p_contact_idx) const override;
+ virtual Vector3 get_contact_collider_position(int p_contact_idx) const override;
+ virtual ObjectID get_contact_collider_id(int p_contact_idx) const override;
+ virtual int get_contact_collider_shape(int p_contact_idx) const override;
+ virtual Vector3 get_contact_collider_velocity_at_position(int p_contact_idx) const override;
+
+ virtual PhysicsDirectSpaceState3D *get_space_state() override;
+
+ virtual real_t get_step() const override;
+};
+
+#endif // BODY_DIRECT_STATE_3D_SW_H
diff --git a/servers/physics_3d/body_pair_3d_sw.h b/servers/physics_3d/body_pair_3d_sw.h
index 19d6a46880..01afb07e13 100644
--- a/servers/physics_3d/body_pair_3d_sw.h
+++ b/servers/physics_3d/body_pair_3d_sw.h
@@ -41,18 +41,18 @@ protected:
struct Contact {
Vector3 position;
Vector3 normal;
- int index_A, index_B;
+ int index_A = 0, index_B = 0;
Vector3 local_A, local_B;
- real_t acc_normal_impulse; // accumulated normal impulse (Pn)
+ real_t acc_normal_impulse = 0.0; // accumulated normal impulse (Pn)
Vector3 acc_tangent_impulse; // accumulated tangent impulse (Pt)
- real_t acc_bias_impulse; // accumulated normal impulse for position bias (Pnb)
- real_t acc_bias_impulse_center_of_mass; // accumulated normal impulse for position bias applied to com
- real_t mass_normal;
- real_t bias;
- real_t bounce;
-
- real_t depth;
- bool active;
+ real_t acc_bias_impulse = 0.0; // accumulated normal impulse for position bias (Pnb)
+ real_t acc_bias_impulse_center_of_mass = 0.0; // accumulated normal impulse for position bias applied to com
+ real_t mass_normal = 0.0;
+ real_t bias = 0.0;
+ real_t bounce = 0.0;
+
+ real_t depth = 0.0;
+ bool active = false;
Vector3 rA, rB; // Offset in world orientation with respect to center of mass
};
diff --git a/servers/physics_3d/broad_phase_3d_bvh.cpp b/servers/physics_3d/broad_phase_3d_bvh.cpp
index f9f64f786d..d89e0e1f6d 100644
--- a/servers/physics_3d/broad_phase_3d_bvh.cpp
+++ b/servers/physics_3d/broad_phase_3d_bvh.cpp
@@ -114,7 +114,4 @@ BroadPhase3DSW *BroadPhase3DBVH::_create() {
BroadPhase3DBVH::BroadPhase3DBVH() {
bvh.set_pair_callback(_pair_callback, this);
bvh.set_unpair_callback(_unpair_callback, this);
- pair_callback = nullptr;
- pair_userdata = nullptr;
- unpair_userdata = nullptr;
}
diff --git a/servers/physics_3d/broad_phase_3d_bvh.h b/servers/physics_3d/broad_phase_3d_bvh.h
index 30b8b7f2aa..03131c9db2 100644
--- a/servers/physics_3d/broad_phase_3d_bvh.h
+++ b/servers/physics_3d/broad_phase_3d_bvh.h
@@ -40,10 +40,10 @@ class BroadPhase3DBVH : public BroadPhase3DSW {
static void *_pair_callback(void *, uint32_t, CollisionObject3DSW *, int, uint32_t, CollisionObject3DSW *, int);
static void _unpair_callback(void *, uint32_t, CollisionObject3DSW *, int, uint32_t, CollisionObject3DSW *, int, void *);
- PairCallback pair_callback;
- void *pair_userdata;
- UnpairCallback unpair_callback;
- void *unpair_userdata;
+ PairCallback pair_callback = nullptr;
+ void *pair_userdata = nullptr;
+ UnpairCallback unpair_callback = nullptr;
+ void *unpair_userdata = nullptr;
public:
// 0 is an invalid ID
diff --git a/servers/physics_3d/collision_object_3d_sw.cpp b/servers/physics_3d/collision_object_3d_sw.cpp
index 24c7d7b85c..098f627d11 100644
--- a/servers/physics_3d/collision_object_3d_sw.cpp
+++ b/servers/physics_3d/collision_object_3d_sw.cpp
@@ -236,11 +236,5 @@ void CollisionObject3DSW::_shape_changed() {
CollisionObject3DSW::CollisionObject3DSW(Type p_type) :
pending_shape_update_list(this) {
- _static = true;
type = p_type;
- space = nullptr;
-
- collision_layer = 1;
- collision_mask = 1;
- ray_pickable = true;
}
diff --git a/servers/physics_3d/collision_object_3d_sw.h b/servers/physics_3d/collision_object_3d_sw.h
index 6ffab54645..3aa48946b7 100644
--- a/servers/physics_3d/collision_object_3d_sw.h
+++ b/servers/physics_3d/collision_object_3d_sw.h
@@ -56,26 +56,24 @@ private:
Type type;
RID self;
ObjectID instance_id;
- uint32_t collision_layer;
- uint32_t collision_mask;
+ uint32_t collision_layer = 1;
+ uint32_t collision_mask = 1;
struct Shape {
Transform3D xform;
Transform3D xform_inv;
BroadPhase3DSW::ID bpid;
AABB aabb_cache; //for rayqueries
- real_t area_cache;
- Shape3DSW *shape;
- bool disabled;
-
- Shape() { disabled = false; }
+ real_t area_cache = 0.0;
+ Shape3DSW *shape = nullptr;
+ bool disabled = false;
};
Vector<Shape> shapes;
- Space3DSW *space;
+ Space3DSW *space = nullptr;
Transform3D transform;
Transform3D inv_transform;
- bool _static;
+ bool _static = true;
SelfList<CollisionObject3DSW> pending_shape_update_list;
@@ -102,7 +100,7 @@ protected:
virtual void _shapes_changed() = 0;
void _set_space(Space3DSW *p_space);
- bool ray_pickable;
+ bool ray_pickable = true;
CollisionObject3DSW(Type p_type);
diff --git a/servers/physics_3d/collision_solver_3d_sat.cpp b/servers/physics_3d/collision_solver_3d_sat.cpp
index 6e6a2cb9e7..76738bb746 100644
--- a/servers/physics_3d/collision_solver_3d_sat.cpp
+++ b/servers/physics_3d/collision_solver_3d_sat.cpp
@@ -66,11 +66,11 @@
struct _CollectorCallback {
CollisionSolver3DSW::CallbackResult callback;
- void *userdata;
- bool swap;
- bool collided;
+ void *userdata = nullptr;
+ bool swap = false;
+ bool collided = false;
Vector3 normal;
- Vector3 *prev_axis;
+ Vector3 *prev_axis = nullptr;
_FORCE_INLINE_ void call(const Vector3 &p_point_A, const Vector3 &p_point_B) {
if (swap) {
@@ -606,15 +606,15 @@ static void _generate_contacts_from_supports(const Vector3 *p_points_A, int p_po
template <class ShapeA, class ShapeB, bool withMargin = false>
class SeparatorAxisTest {
- const ShapeA *shape_A;
- const ShapeB *shape_B;
- const Transform3D *transform_A;
- const Transform3D *transform_B;
- real_t best_depth;
+ const ShapeA *shape_A = nullptr;
+ const ShapeB *shape_B = nullptr;
+ const Transform3D *transform_A = nullptr;
+ const Transform3D *transform_B = nullptr;
+ real_t best_depth = 1e15;
Vector3 best_axis;
- _CollectorCallback *callback;
- real_t margin_A;
- real_t margin_B;
+ _CollectorCallback *callback = nullptr;
+ real_t margin_A = 0.0;
+ real_t margin_B = 0.0;
Vector3 separator_axis;
public:
@@ -749,7 +749,6 @@ public:
}
_FORCE_INLINE_ SeparatorAxisTest(const ShapeA *p_shape_A, const Transform3D &p_transform_A, const ShapeB *p_shape_B, const Transform3D &p_transform_B, _CollectorCallback *p_callback, real_t p_margin_A = 0, real_t p_margin_B = 0) {
- best_depth = 1e15;
shape_A = p_shape_A;
shape_B = p_shape_B;
transform_A = &p_transform_A;
@@ -2272,12 +2271,14 @@ static void _collision_convex_polygon_face(const Shape3DSW *p_a, const Transform
bool sat_calculate_penetration(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, CollisionSolver3DSW::CallbackResult p_result_callback, void *p_userdata, bool p_swap, Vector3 *r_prev_axis, real_t p_margin_a, real_t p_margin_b) {
PhysicsServer3D::ShapeType type_A = p_shape_A->get_type();
- ERR_FAIL_COND_V(type_A == PhysicsServer3D::SHAPE_PLANE, false);
+ ERR_FAIL_COND_V(type_A == PhysicsServer3D::SHAPE_WORLD_BOUNDARY, false);
+ ERR_FAIL_COND_V(type_A == PhysicsServer3D::SHAPE_SEPARATION_RAY, false);
ERR_FAIL_COND_V(p_shape_A->is_concave(), false);
PhysicsServer3D::ShapeType type_B = p_shape_B->get_type();
- ERR_FAIL_COND_V(type_B == PhysicsServer3D::SHAPE_PLANE, false);
+ ERR_FAIL_COND_V(type_B == PhysicsServer3D::SHAPE_WORLD_BOUNDARY, false);
+ ERR_FAIL_COND_V(type_B == PhysicsServer3D::SHAPE_SEPARATION_RAY, false);
ERR_FAIL_COND_V(p_shape_B->is_concave(), false);
static const CollisionFunc collision_table[6][6] = {
@@ -2382,10 +2383,10 @@ bool sat_calculate_penetration(const Shape3DSW *p_shape_A, const Transform3D &p_
CollisionFunc collision_func;
if (margin_A != 0.0 || margin_B != 0.0) {
- collision_func = collision_table_margin[type_A - 1][type_B - 1];
+ collision_func = collision_table_margin[type_A - 2][type_B - 2];
} else {
- collision_func = collision_table[type_A - 1][type_B - 1];
+ collision_func = collision_table[type_A - 2][type_B - 2];
}
ERR_FAIL_COND_V(!collision_func, false);
diff --git a/servers/physics_3d/collision_solver_3d_sw.cpp b/servers/physics_3d/collision_solver_3d_sw.cpp
index dcecac1c73..dcc363638e 100644
--- a/servers/physics_3d/collision_solver_3d_sw.cpp
+++ b/servers/physics_3d/collision_solver_3d_sw.cpp
@@ -37,12 +37,12 @@
#define collision_solver sat_calculate_penetration
//#define collision_solver gjk_epa_calculate_penetration
-bool CollisionSolver3DSW::solve_static_plane(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result) {
- const PlaneShape3DSW *plane = static_cast<const PlaneShape3DSW *>(p_shape_A);
- if (p_shape_B->get_type() == PhysicsServer3D::SHAPE_PLANE) {
+bool CollisionSolver3DSW::solve_static_world_boundary(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result) {
+ const WorldBoundaryShape3DSW *world_boundary = static_cast<const WorldBoundaryShape3DSW *>(p_shape_A);
+ if (p_shape_B->get_type() == PhysicsServer3D::SHAPE_WORLD_BOUNDARY) {
return false;
}
- Plane p = p_transform_A.xform(plane->get_plane());
+ Plane p = p_transform_A.xform(world_boundary->get_plane());
static const int max_supports = 16;
Vector3 supports[max_supports];
@@ -89,6 +89,49 @@ bool CollisionSolver3DSW::solve_static_plane(const Shape3DSW *p_shape_A, const T
return found;
}
+bool CollisionSolver3DSW::solve_separation_ray(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result, real_t p_margin) {
+ const SeparationRayShape3DSW *ray = static_cast<const SeparationRayShape3DSW *>(p_shape_A);
+
+ Vector3 from = p_transform_A.origin;
+ Vector3 to = from + p_transform_A.basis.get_axis(2) * (ray->get_length() + p_margin);
+ Vector3 support_A = to;
+
+ Transform3D ai = p_transform_B.affine_inverse();
+
+ from = ai.xform(from);
+ to = ai.xform(to);
+
+ Vector3 p, n;
+ if (!p_shape_B->intersect_segment(from, to, p, n)) {
+ return false;
+ }
+
+ // Discard contacts when the ray is fully contained inside the shape.
+ if (n == Vector3()) {
+ return false;
+ }
+
+ // Discard contacts in the wrong direction.
+ if (n.dot(from - to) < CMP_EPSILON) {
+ return false;
+ }
+
+ Vector3 support_B = p_transform_B.xform(p);
+ if (ray->get_slide_on_slope()) {
+ Vector3 global_n = ai.basis.xform_inv(n).normalized();
+ support_B = support_A + (support_B - support_A).length() * global_n;
+ }
+
+ if (p_result_callback) {
+ if (p_swap_result) {
+ p_result_callback(support_B, 0, support_A, 0, p_userdata);
+ } else {
+ p_result_callback(support_A, 0, support_B, 0, p_userdata);
+ }
+ }
+ return true;
+}
+
struct _SoftBodyContactCollisionInfo {
int node_index = 0;
CollisionSolver3DSW::CallbackResult result_callback = nullptr;
@@ -135,17 +178,17 @@ bool CollisionSolver3DSW::soft_body_query_callback(uint32_t p_node_index, void *
transform_B.origin = query_cinfo.node_transform.xform(node_position);
query_cinfo.contact_info.node_index = p_node_index;
- solve_static(query_cinfo.shape_A, query_cinfo.transform_A, query_cinfo.shape_B, transform_B, soft_body_contact_callback, &query_cinfo.contact_info);
+ bool collided = solve_static(query_cinfo.shape_A, query_cinfo.transform_A, query_cinfo.shape_B, transform_B, soft_body_contact_callback, &query_cinfo.contact_info);
#ifdef DEBUG_ENABLED
++query_cinfo.node_query_count;
#endif
- // Continue with the query.
- return false;
+ // Stop at first collision if contacts are not needed.
+ return (collided && !query_cinfo.contact_info.result_callback);
}
-void CollisionSolver3DSW::soft_body_concave_callback(void *p_userdata, Shape3DSW *p_convex) {
+bool CollisionSolver3DSW::soft_body_concave_callback(void *p_userdata, Shape3DSW *p_convex) {
_SoftBodyQueryInfo &query_cinfo = *(_SoftBodyQueryInfo *)(p_userdata);
query_cinfo.shape_A = p_convex;
@@ -167,9 +210,14 @@ void CollisionSolver3DSW::soft_body_concave_callback(void *p_userdata, Shape3DSW
query_cinfo.soft_body->query_aabb(shape_aabb, soft_body_query_callback, &query_cinfo);
+ bool collided = (query_cinfo.contact_info.contact_count > 0);
+
#ifdef DEBUG_ENABLED
++query_cinfo.convex_query_count;
#endif
+
+ // Stop at first collision if contacts are not needed.
+ return (collided && !query_cinfo.contact_info.result_callback);
}
bool CollisionSolver3DSW::solve_soft_body(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result) {
@@ -243,17 +291,20 @@ struct _ConcaveCollisionInfo {
Vector3 close_A, close_B;
};
-void CollisionSolver3DSW::concave_callback(void *p_userdata, Shape3DSW *p_convex) {
+bool CollisionSolver3DSW::concave_callback(void *p_userdata, Shape3DSW *p_convex) {
_ConcaveCollisionInfo &cinfo = *(_ConcaveCollisionInfo *)(p_userdata);
cinfo.aabb_tests++;
bool collided = collision_solver(cinfo.shape_A, *cinfo.transform_A, p_convex, *cinfo.transform_B, cinfo.result_callback, cinfo.userdata, cinfo.swap_result, nullptr, cinfo.margin_A, cinfo.margin_B);
if (!collided) {
- return;
+ return false;
}
cinfo.collided = true;
cinfo.collisions++;
+
+ // Stop at first collision if contacts are not needed.
+ return !cinfo.result_callback;
}
bool CollisionSolver3DSW::solve_concave(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result, real_t p_margin_A, real_t p_margin_B) {
@@ -314,8 +365,11 @@ bool CollisionSolver3DSW::solve_static(const Shape3DSW *p_shape_A, const Transfo
swap = true;
}
- if (type_A == PhysicsServer3D::SHAPE_PLANE) {
- if (type_B == PhysicsServer3D::SHAPE_PLANE) {
+ if (type_A == PhysicsServer3D::SHAPE_WORLD_BOUNDARY) {
+ if (type_B == PhysicsServer3D::SHAPE_WORLD_BOUNDARY) {
+ return false;
+ }
+ if (type_B == PhysicsServer3D::SHAPE_SEPARATION_RAY) {
return false;
}
if (type_B == PhysicsServer3D::SHAPE_SOFT_BODY) {
@@ -323,9 +377,20 @@ bool CollisionSolver3DSW::solve_static(const Shape3DSW *p_shape_A, const Transfo
}
if (swap) {
- return solve_static_plane(p_shape_B, p_transform_B, p_shape_A, p_transform_A, p_result_callback, p_userdata, true);
+ return solve_static_world_boundary(p_shape_B, p_transform_B, p_shape_A, p_transform_A, p_result_callback, p_userdata, true);
+ } else {
+ return solve_static_world_boundary(p_shape_A, p_transform_A, p_shape_B, p_transform_B, p_result_callback, p_userdata, false);
+ }
+
+ } else if (type_A == PhysicsServer3D::SHAPE_SEPARATION_RAY) {
+ if (type_B == PhysicsServer3D::SHAPE_SEPARATION_RAY) {
+ return false;
+ }
+
+ if (swap) {
+ return solve_separation_ray(p_shape_B, p_transform_B, p_shape_A, p_transform_A, p_result_callback, p_userdata, true, p_margin_B);
} else {
- return solve_static_plane(p_shape_A, p_transform_A, p_shape_B, p_transform_B, p_result_callback, p_userdata, false);
+ return solve_separation_ray(p_shape_A, p_transform_A, p_shape_B, p_transform_B, p_result_callback, p_userdata, false, p_margin_A);
}
} else if (type_B == PhysicsServer3D::SHAPE_SOFT_BODY) {
@@ -356,19 +421,18 @@ bool CollisionSolver3DSW::solve_static(const Shape3DSW *p_shape_A, const Transfo
}
}
-void CollisionSolver3DSW::concave_distance_callback(void *p_userdata, Shape3DSW *p_convex) {
+bool CollisionSolver3DSW::concave_distance_callback(void *p_userdata, Shape3DSW *p_convex) {
_ConcaveCollisionInfo &cinfo = *(_ConcaveCollisionInfo *)(p_userdata);
cinfo.aabb_tests++;
- if (cinfo.collided) {
- return;
- }
Vector3 close_A, close_B;
cinfo.collided = !gjk_epa_calculate_distance(cinfo.shape_A, *cinfo.transform_A, p_convex, *cinfo.transform_B, close_A, close_B);
if (cinfo.collided) {
- return;
+ // No need to process any more result.
+ return true;
}
+
if (!cinfo.tested || close_A.distance_squared_to(close_B) < cinfo.close_A.distance_squared_to(cinfo.close_B)) {
cinfo.close_A = close_A;
cinfo.close_B = close_B;
@@ -376,14 +440,15 @@ void CollisionSolver3DSW::concave_distance_callback(void *p_userdata, Shape3DSW
}
cinfo.collisions++;
+ return false;
}
-bool CollisionSolver3DSW::solve_distance_plane(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, Vector3 &r_point_A, Vector3 &r_point_B) {
- const PlaneShape3DSW *plane = static_cast<const PlaneShape3DSW *>(p_shape_A);
- if (p_shape_B->get_type() == PhysicsServer3D::SHAPE_PLANE) {
+bool CollisionSolver3DSW::solve_distance_world_boundary(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, Vector3 &r_point_A, Vector3 &r_point_B) {
+ const WorldBoundaryShape3DSW *world_boundary = static_cast<const WorldBoundaryShape3DSW *>(p_shape_A);
+ if (p_shape_B->get_type() == PhysicsServer3D::SHAPE_WORLD_BOUNDARY) {
return false;
}
- Plane p = p_transform_A.xform(plane->get_plane());
+ Plane p = p_transform_A.xform(world_boundary->get_plane());
static const int max_supports = 16;
Vector3 supports[max_supports];
@@ -435,9 +500,9 @@ bool CollisionSolver3DSW::solve_distance(const Shape3DSW *p_shape_A, const Trans
return false;
}
- if (p_shape_B->get_type() == PhysicsServer3D::SHAPE_PLANE) {
+ if (p_shape_B->get_type() == PhysicsServer3D::SHAPE_WORLD_BOUNDARY) {
Vector3 a, b;
- bool col = solve_distance_plane(p_shape_B, p_transform_B, p_shape_A, p_transform_A, a, b);
+ bool col = solve_distance_world_boundary(p_shape_B, p_transform_B, p_shape_A, p_transform_A, a, b);
r_point_A = b;
r_point_B = a;
return !col;
diff --git a/servers/physics_3d/collision_solver_3d_sw.h b/servers/physics_3d/collision_solver_3d_sw.h
index a5dd7d48eb..0a9ea7c0eb 100644
--- a/servers/physics_3d/collision_solver_3d_sw.h
+++ b/servers/physics_3d/collision_solver_3d_sw.h
@@ -40,14 +40,14 @@ public:
private:
static bool soft_body_query_callback(uint32_t p_node_index, void *p_userdata);
static void soft_body_contact_callback(const Vector3 &p_point_A, int p_index_A, const Vector3 &p_point_B, int p_index_B, void *p_userdata);
- static void soft_body_concave_callback(void *p_userdata, Shape3DSW *p_convex);
- static void concave_callback(void *p_userdata, Shape3DSW *p_convex);
- static bool solve_static_plane(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result);
- static bool solve_ray(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result);
+ static bool soft_body_concave_callback(void *p_userdata, Shape3DSW *p_convex);
+ static bool concave_callback(void *p_userdata, Shape3DSW *p_convex);
+ static bool solve_static_world_boundary(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result);
+ static bool solve_separation_ray(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result, real_t p_margin = 0);
static bool solve_soft_body(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result);
static bool solve_concave(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, bool p_swap_result, real_t p_margin_A = 0, real_t p_margin_B = 0);
- static void concave_distance_callback(void *p_userdata, Shape3DSW *p_convex);
- static bool solve_distance_plane(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, Vector3 &r_point_A, Vector3 &r_point_B);
+ static bool concave_distance_callback(void *p_userdata, Shape3DSW *p_convex);
+ static bool solve_distance_world_boundary(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, Vector3 &r_point_A, Vector3 &r_point_B);
public:
static bool solve_static(const Shape3DSW *p_shape_A, const Transform3D &p_transform_A, const Shape3DSW *p_shape_B, const Transform3D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, Vector3 *r_sep_axis = nullptr, real_t p_margin_A = 0, real_t p_margin_B = 0);
diff --git a/servers/physics_3d/gjk_epa.cpp b/servers/physics_3d/gjk_epa.cpp
index 2df991563d..a1dbdd0a70 100644
--- a/servers/physics_3d/gjk_epa.cpp
+++ b/servers/physics_3d/gjk_epa.cpp
@@ -96,7 +96,7 @@ struct sResults {
Vector3 witnesses[2];
Vector3 normal;
- real_t distance;
+ real_t distance = 0.0;
};
// Shorthands
diff --git a/servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp b/servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp
index 7315e9c709..bb9cc1bf67 100644
--- a/servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp
+++ b/servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp
@@ -92,20 +92,8 @@ ConeTwistJoint3DSW::ConeTwistJoint3DSW(Body3DSW *rbA, Body3DSW *rbB, const Trans
m_rbAFrame = rbAFrame;
m_rbBFrame = rbBFrame;
- m_swingSpan1 = Math_TAU / 8.0;
- m_swingSpan2 = Math_TAU / 8.0;
- m_twistSpan = Math_TAU;
- m_biasFactor = 0.3f;
- m_relaxationFactor = 1.0f;
-
- m_angularOnly = false;
- m_solveTwistLimit = false;
- m_solveSwingLimit = false;
-
A->add_constraint(this, 0);
B->add_constraint(this, 1);
-
- m_appliedImpulse = 0;
}
bool ConeTwistJoint3DSW::setup(real_t p_timestep) {
diff --git a/servers/physics_3d/joints/cone_twist_joint_3d_sw.h b/servers/physics_3d/joints/cone_twist_joint_3d_sw.h
index 608847352c..bf7e593820 100644
--- a/servers/physics_3d/joints/cone_twist_joint_3d_sw.h
+++ b/servers/physics_3d/joints/cone_twist_joint_3d_sw.h
@@ -67,39 +67,39 @@ public:
Body3DSW *B;
};
- Body3DSW *_arr[2];
+ Body3DSW *_arr[2] = { nullptr, nullptr };
};
- JacobianEntry3DSW m_jac[3]; //3 orthogonal linear constraints
+ JacobianEntry3DSW m_jac[3] = {}; //3 orthogonal linear constraints
- real_t m_appliedImpulse;
+ real_t m_appliedImpulse = 0.0;
Transform3D m_rbAFrame;
Transform3D m_rbBFrame;
- real_t m_limitSoftness;
- real_t m_biasFactor;
- real_t m_relaxationFactor;
+ real_t m_limitSoftness = 0.0;
+ real_t m_biasFactor = 0.3;
+ real_t m_relaxationFactor = 1.0;
- real_t m_swingSpan1;
- real_t m_swingSpan2;
- real_t m_twistSpan;
+ real_t m_swingSpan1 = Math_TAU / 8.0;
+ real_t m_swingSpan2 = 0.0;
+ real_t m_twistSpan = 0.0;
Vector3 m_swingAxis;
Vector3 m_twistAxis;
- real_t m_kSwing;
- real_t m_kTwist;
+ real_t m_kSwing = 0.0;
+ real_t m_kTwist = 0.0;
- real_t m_twistLimitSign;
- real_t m_swingCorrection;
- real_t m_twistCorrection;
+ real_t m_twistLimitSign = 0.0;
+ real_t m_swingCorrection = 0.0;
+ real_t m_twistCorrection = 0.0;
- real_t m_accSwingLimitImpulse;
- real_t m_accTwistLimitImpulse;
+ real_t m_accSwingLimitImpulse = 0.0;
+ real_t m_accTwistLimitImpulse = 0.0;
- bool m_angularOnly;
- bool m_solveTwistLimit;
- bool m_solveSwingLimit;
+ bool m_angularOnly = false;
+ bool m_solveTwistLimit = false;
+ bool m_solveSwingLimit = false;
public:
virtual PhysicsServer3D::JointType get_type() const override { return PhysicsServer3D::JOINT_TYPE_CONE_TWIST; }
diff --git a/servers/physics_3d/joints/generic_6dof_joint_3d_sw.h b/servers/physics_3d/joints/generic_6dof_joint_3d_sw.h
index d0f3dbbd35..6492e40393 100644
--- a/servers/physics_3d/joints/generic_6dof_joint_3d_sw.h
+++ b/servers/physics_3d/joints/generic_6dof_joint_3d_sw.h
@@ -65,43 +65,28 @@ class G6DOFRotationalLimitMotor3DSW {
public:
//! limit_parameters
//!@{
- real_t m_loLimit; //!< joint limit
- real_t m_hiLimit; //!< joint limit
- real_t m_targetVelocity; //!< target motor velocity
- real_t m_maxMotorForce; //!< max force on motor
- real_t m_maxLimitForce; //!< max force on limit
- real_t m_damping; //!< Damping.
- real_t m_limitSoftness; //! Relaxation factor
- real_t m_ERP; //!< Error tolerance factor when joint is at limit
- real_t m_bounce; //!< restitution factor
- bool m_enableMotor;
- bool m_enableLimit;
+ real_t m_loLimit = -1e30; //!< joint limit
+ real_t m_hiLimit = 1e30; //!< joint limit
+ real_t m_targetVelocity = 0.0; //!< target motor velocity
+ real_t m_maxMotorForce = 0.1; //!< max force on motor
+ real_t m_maxLimitForce = 300.0; //!< max force on limit
+ real_t m_damping = 1.0; //!< Damping.
+ real_t m_limitSoftness = 0.5; //! Relaxation factor
+ real_t m_ERP = 0.5; //!< Error tolerance factor when joint is at limit
+ real_t m_bounce = 0.0; //!< restitution factor
+ bool m_enableMotor = false;
+ bool m_enableLimit = false;
//!@}
//! temp_variables
//!@{
- real_t m_currentLimitError; //!< How much is violated this limit
- int m_currentLimit; //!< 0=free, 1=at lo limit, 2=at hi limit
- real_t m_accumulatedImpulse;
+ real_t m_currentLimitError = 0.0; //!< How much is violated this limit
+ int m_currentLimit = 0; //!< 0=free, 1=at lo limit, 2=at hi limit
+ real_t m_accumulatedImpulse = 0.0;
//!@}
- G6DOFRotationalLimitMotor3DSW() {
- m_accumulatedImpulse = 0.f;
- m_targetVelocity = 0;
- m_maxMotorForce = 0.1f;
- m_maxLimitForce = 300.0f;
- m_loLimit = -1e30;
- m_hiLimit = 1e30;
- m_ERP = 0.5f;
- m_bounce = 0.0f;
- m_damping = 1.0f;
- m_limitSoftness = 0.5f;
- m_currentLimit = 0;
- m_currentLimitError = 0;
- m_enableMotor = false;
- m_enableLimit = false;
- }
+ G6DOFRotationalLimitMotor3DSW() {}
//! Is limited
bool isLimited() {
@@ -125,30 +110,16 @@ public:
class G6DOFTranslationalLimitMotor3DSW {
public:
- Vector3 m_lowerLimit; //!< the constraint lower limits
- Vector3 m_upperLimit; //!< the constraint upper limits
- Vector3 m_accumulatedImpulse;
+ Vector3 m_lowerLimit = Vector3(0.0, 0.0, 0.0); //!< the constraint lower limits
+ Vector3 m_upperLimit = Vector3(0.0, 0.0, 0.0); //!< the constraint upper limits
+ Vector3 m_accumulatedImpulse = Vector3(0.0, 0.0, 0.0);
//! Linear_Limit_parameters
//!@{
- Vector3 m_limitSoftness; //!< Softness for linear limit
- Vector3 m_damping; //!< Damping for linear limit
- Vector3 m_restitution; //! Bounce parameter for linear limit
+ Vector3 m_limitSoftness = Vector3(0.7, 0.7, 0.7); //!< Softness for linear limit
+ Vector3 m_damping = Vector3(1.0, 1.0, 1.0); //!< Damping for linear limit
+ Vector3 m_restitution = Vector3(0.5, 0.5, 0.5); //! Bounce parameter for linear limit
//!@}
- bool enable_limit[3];
-
- G6DOFTranslationalLimitMotor3DSW() {
- m_lowerLimit = Vector3(0.f, 0.f, 0.f);
- m_upperLimit = Vector3(0.f, 0.f, 0.f);
- m_accumulatedImpulse = Vector3(0.f, 0.f, 0.f);
-
- m_limitSoftness = Vector3(1, 1, 1) * 0.7f;
- m_damping = Vector3(1, 1, 1) * real_t(1.0f);
- m_restitution = Vector3(1, 1, 1) * real_t(0.5f);
-
- enable_limit[0] = true;
- enable_limit[1] = true;
- enable_limit[2] = true;
- }
+ bool enable_limit[3] = { true, true, true };
//! Test limit
/*!
@@ -180,7 +151,7 @@ protected:
Body3DSW *B;
};
- Body3DSW *_arr[2];
+ Body3DSW *_arr[2] = { nullptr, nullptr };
};
//! relative_frames
@@ -208,7 +179,7 @@ protected:
protected:
//! temporal variables
//!@{
- real_t m_timeStep;
+ real_t m_timeStep = 0.0;
Transform3D m_calculatedTransformA;
Transform3D m_calculatedTransformB;
Vector3 m_calculatedAxisAngleDiff;
@@ -216,7 +187,7 @@ protected:
Vector3 m_AnchorPos; // point between pivots of bodies A and B to solve linear axes
- bool m_useLinearReferenceFrameA;
+ bool m_useLinearReferenceFrameA = false;
//!@}
diff --git a/servers/physics_3d/joints/hinge_joint_3d_sw.cpp b/servers/physics_3d/joints/hinge_joint_3d_sw.cpp
index b928f18231..a45fcf7eb5 100644
--- a/servers/physics_3d/joints/hinge_joint_3d_sw.cpp
+++ b/servers/physics_3d/joints/hinge_joint_3d_sw.cpp
@@ -79,21 +79,6 @@ HingeJoint3DSW::HingeJoint3DSW(Body3DSW *rbA, Body3DSW *rbB, const Transform3D &
m_rbBFrame.basis[1][2] *= real_t(-1.);
m_rbBFrame.basis[2][2] *= real_t(-1.);
- //start with free
- m_lowerLimit = Math_PI;
- m_upperLimit = -Math_PI;
-
- m_useLimit = false;
- m_biasFactor = 0.3f;
- m_relaxationFactor = 1.0f;
- m_limitSoftness = 0.9f;
- m_solveLimit = false;
-
- tau = 0.3;
-
- m_angularOnly = false;
- m_enableAngularMotor = false;
-
A->add_constraint(this, 0);
B->add_constraint(this, 1);
}
@@ -135,21 +120,6 @@ HingeJoint3DSW::HingeJoint3DSW(Body3DSW *rbA, Body3DSW *rbB, const Vector3 &pivo
rbAxisB1.y, rbAxisB2.y, -axisInB.y,
rbAxisB1.z, rbAxisB2.z, -axisInB.z);
- //start with free
- m_lowerLimit = Math_PI;
- m_upperLimit = -Math_PI;
-
- m_useLimit = false;
- m_biasFactor = 0.3f;
- m_relaxationFactor = 1.0f;
- m_limitSoftness = 0.9f;
- m_solveLimit = false;
-
- tau = 0.3;
-
- m_angularOnly = false;
- m_enableAngularMotor = false;
-
A->add_constraint(this, 0);
B->add_constraint(this, 1);
}
diff --git a/servers/physics_3d/joints/hinge_joint_3d_sw.h b/servers/physics_3d/joints/hinge_joint_3d_sw.h
index 22eb2f4660..a4ceff9ffe 100644
--- a/servers/physics_3d/joints/hinge_joint_3d_sw.h
+++ b/servers/physics_3d/joints/hinge_joint_3d_sw.h
@@ -60,7 +60,7 @@ class HingeJoint3DSW : public Joint3DSW {
Body3DSW *B;
};
- Body3DSW *_arr[2];
+ Body3DSW *_arr[2] = {};
};
JacobianEntry3DSW m_jac[3]; //3 orthogonal linear constraints
@@ -69,31 +69,31 @@ class HingeJoint3DSW : public Joint3DSW {
Transform3D m_rbAFrame; // constraint axii. Assumes z is hinge axis.
Transform3D m_rbBFrame;
- real_t m_motorTargetVelocity;
- real_t m_maxMotorImpulse;
+ real_t m_motorTargetVelocity = 0.0;
+ real_t m_maxMotorImpulse = 0.0;
- real_t m_limitSoftness;
- real_t m_biasFactor;
- real_t m_relaxationFactor;
+ real_t m_limitSoftness = 0.9;
+ real_t m_biasFactor = 0.3;
+ real_t m_relaxationFactor = 1.0;
- real_t m_lowerLimit;
- real_t m_upperLimit;
+ real_t m_lowerLimit = Math_PI;
+ real_t m_upperLimit = -Math_PI;
- real_t m_kHinge;
+ real_t m_kHinge = 0.0;
- real_t m_limitSign;
- real_t m_correction;
+ real_t m_limitSign = 0.0;
+ real_t m_correction = 0.0;
- real_t m_accLimitImpulse;
+ real_t m_accLimitImpulse = 0.0;
- real_t tau;
+ real_t tau = 0.3;
- bool m_useLimit;
- bool m_angularOnly;
- bool m_enableAngularMotor;
- bool m_solveLimit;
+ bool m_useLimit = false;
+ bool m_angularOnly = false;
+ bool m_enableAngularMotor = false;
+ bool m_solveLimit = false;
- real_t m_appliedImpulse;
+ real_t m_appliedImpulse = 0.0;
public:
virtual PhysicsServer3D::JointType get_type() const override { return PhysicsServer3D::JOINT_TYPE_HINGE; }
diff --git a/servers/physics_3d/joints/jacobian_entry_3d_sw.h b/servers/physics_3d/joints/jacobian_entry_3d_sw.h
index 6afa70c816..7294ff78e3 100644
--- a/servers/physics_3d/joints/jacobian_entry_3d_sw.h
+++ b/servers/physics_3d/joints/jacobian_entry_3d_sw.h
@@ -163,7 +163,7 @@ public:
Vector3 m_0MinvJt;
Vector3 m_1MinvJt;
//Optimization: can be stored in the w/last component of one of the vectors
- real_t m_Adiag;
+ real_t m_Adiag = 1.0;
};
#endif // JACOBIAN_ENTRY_SW_H
diff --git a/servers/physics_3d/joints/pin_joint_3d_sw.cpp b/servers/physics_3d/joints/pin_joint_3d_sw.cpp
index 8eb84d1c2f..f41151ec0e 100644
--- a/servers/physics_3d/joints/pin_joint_3d_sw.cpp
+++ b/servers/physics_3d/joints/pin_joint_3d_sw.cpp
@@ -171,11 +171,6 @@ PinJoint3DSW::PinJoint3DSW(Body3DSW *p_body_a, const Vector3 &p_pos_a, Body3DSW
m_pivotInA = p_pos_a;
m_pivotInB = p_pos_b;
- m_tau = 0.3;
- m_damping = 1;
- m_impulseClamp = 0;
- m_appliedImpulse = 0;
-
A->add_constraint(this, 0);
B->add_constraint(this, 1);
}
diff --git a/servers/physics_3d/joints/pin_joint_3d_sw.h b/servers/physics_3d/joints/pin_joint_3d_sw.h
index 3d91452850..79af48f2a5 100644
--- a/servers/physics_3d/joints/pin_joint_3d_sw.h
+++ b/servers/physics_3d/joints/pin_joint_3d_sw.h
@@ -60,15 +60,15 @@ class PinJoint3DSW : public Joint3DSW {
Body3DSW *B;
};
- Body3DSW *_arr[2];
+ Body3DSW *_arr[2] = {};
};
- real_t m_tau; //bias
- real_t m_damping;
- real_t m_impulseClamp;
- real_t m_appliedImpulse;
+ real_t m_tau = 0.3; //bias
+ real_t m_damping = 1.0;
+ real_t m_impulseClamp = 0.0;
+ real_t m_appliedImpulse = 0.0;
- JacobianEntry3DSW m_jac[3]; //3 orthogonal linear constraints
+ JacobianEntry3DSW m_jac[3] = {}; //3 orthogonal linear constraints
Vector3 m_pivotInA;
Vector3 m_pivotInB;
diff --git a/servers/physics_3d/joints/slider_joint_3d_sw.cpp b/servers/physics_3d/joints/slider_joint_3d_sw.cpp
index 1895fe1e2e..e10ed436d5 100644
--- a/servers/physics_3d/joints/slider_joint_3d_sw.cpp
+++ b/servers/physics_3d/joints/slider_joint_3d_sw.cpp
@@ -72,41 +72,6 @@ static _FORCE_INLINE_ real_t atan2fast(real_t y, real_t x) {
return (y < 0.0f) ? -angle : angle;
}
-void SliderJoint3DSW::initParams() {
- m_lowerLinLimit = real_t(1.0);
- m_upperLinLimit = real_t(-1.0);
- m_lowerAngLimit = real_t(0.);
- m_upperAngLimit = real_t(0.);
- m_softnessDirLin = SLIDER_CONSTRAINT_DEF_SOFTNESS;
- m_restitutionDirLin = SLIDER_CONSTRAINT_DEF_RESTITUTION;
- m_dampingDirLin = real_t(0.);
- m_softnessDirAng = SLIDER_CONSTRAINT_DEF_SOFTNESS;
- m_restitutionDirAng = SLIDER_CONSTRAINT_DEF_RESTITUTION;
- m_dampingDirAng = real_t(0.);
- m_softnessOrthoLin = SLIDER_CONSTRAINT_DEF_SOFTNESS;
- m_restitutionOrthoLin = SLIDER_CONSTRAINT_DEF_RESTITUTION;
- m_dampingOrthoLin = SLIDER_CONSTRAINT_DEF_DAMPING;
- m_softnessOrthoAng = SLIDER_CONSTRAINT_DEF_SOFTNESS;
- m_restitutionOrthoAng = SLIDER_CONSTRAINT_DEF_RESTITUTION;
- m_dampingOrthoAng = SLIDER_CONSTRAINT_DEF_DAMPING;
- m_softnessLimLin = SLIDER_CONSTRAINT_DEF_SOFTNESS;
- m_restitutionLimLin = SLIDER_CONSTRAINT_DEF_RESTITUTION;
- m_dampingLimLin = SLIDER_CONSTRAINT_DEF_DAMPING;
- m_softnessLimAng = SLIDER_CONSTRAINT_DEF_SOFTNESS;
- m_restitutionLimAng = SLIDER_CONSTRAINT_DEF_RESTITUTION;
- m_dampingLimAng = SLIDER_CONSTRAINT_DEF_DAMPING;
-
- m_poweredLinMotor = false;
- m_targetLinMotorVelocity = real_t(0.);
- m_maxLinMotorForce = real_t(0.);
- m_accumulatedLinMotorImpulse = real_t(0.0);
-
- m_poweredAngMotor = false;
- m_targetAngMotorVelocity = real_t(0.);
- m_maxAngMotorForce = real_t(0.);
- m_accumulatedAngMotorImpulse = real_t(0.0);
-} // SliderJointSW::initParams()
-
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
@@ -120,8 +85,6 @@ SliderJoint3DSW::SliderJoint3DSW(Body3DSW *rbA, Body3DSW *rbB, const Transform3D
A->add_constraint(this, 0);
B->add_constraint(this, 1);
-
- initParams();
} // SliderJointSW::SliderJointSW()
//-----------------------------------------------------------------------------
diff --git a/servers/physics_3d/joints/slider_joint_3d_sw.h b/servers/physics_3d/joints/slider_joint_3d_sw.h
index f357bbd67a..d32ad9469e 100644
--- a/servers/physics_3d/joints/slider_joint_3d_sw.h
+++ b/servers/physics_3d/joints/slider_joint_3d_sw.h
@@ -73,53 +73,53 @@ protected:
Body3DSW *B;
};
- Body3DSW *_arr[2];
+ Body3DSW *_arr[2] = { nullptr, nullptr };
};
Transform3D m_frameInA;
Transform3D m_frameInB;
// linear limits
- real_t m_lowerLinLimit;
- real_t m_upperLinLimit;
+ real_t m_lowerLinLimit = 1.0;
+ real_t m_upperLinLimit = -1.0;
// angular limits
- real_t m_lowerAngLimit;
- real_t m_upperAngLimit;
+ real_t m_lowerAngLimit = 0.0;
+ real_t m_upperAngLimit = 0.0;
// softness, restitution and damping for different cases
// DirLin - moving inside linear limits
// LimLin - hitting linear limit
// DirAng - moving inside angular limits
// LimAng - hitting angular limit
// OrthoLin, OrthoAng - against constraint axis
- real_t m_softnessDirLin;
- real_t m_restitutionDirLin;
- real_t m_dampingDirLin;
- real_t m_softnessDirAng;
- real_t m_restitutionDirAng;
- real_t m_dampingDirAng;
- real_t m_softnessLimLin;
- real_t m_restitutionLimLin;
- real_t m_dampingLimLin;
- real_t m_softnessLimAng;
- real_t m_restitutionLimAng;
- real_t m_dampingLimAng;
- real_t m_softnessOrthoLin;
- real_t m_restitutionOrthoLin;
- real_t m_dampingOrthoLin;
- real_t m_softnessOrthoAng;
- real_t m_restitutionOrthoAng;
- real_t m_dampingOrthoAng;
+ real_t m_softnessDirLin = SLIDER_CONSTRAINT_DEF_SOFTNESS;
+ real_t m_restitutionDirLin = SLIDER_CONSTRAINT_DEF_RESTITUTION;
+ real_t m_dampingDirLin = 0.0;
+ real_t m_softnessDirAng = SLIDER_CONSTRAINT_DEF_SOFTNESS;
+ real_t m_restitutionDirAng = SLIDER_CONSTRAINT_DEF_RESTITUTION;
+ real_t m_dampingDirAng = 0.0;
+ real_t m_softnessLimLin = SLIDER_CONSTRAINT_DEF_SOFTNESS;
+ real_t m_restitutionLimLin = SLIDER_CONSTRAINT_DEF_RESTITUTION;
+ real_t m_dampingLimLin = SLIDER_CONSTRAINT_DEF_DAMPING;
+ real_t m_softnessLimAng = SLIDER_CONSTRAINT_DEF_SOFTNESS;
+ real_t m_restitutionLimAng = SLIDER_CONSTRAINT_DEF_RESTITUTION;
+ real_t m_dampingLimAng = SLIDER_CONSTRAINT_DEF_DAMPING;
+ real_t m_softnessOrthoLin = SLIDER_CONSTRAINT_DEF_SOFTNESS;
+ real_t m_restitutionOrthoLin = SLIDER_CONSTRAINT_DEF_RESTITUTION;
+ real_t m_dampingOrthoLin = SLIDER_CONSTRAINT_DEF_DAMPING;
+ real_t m_softnessOrthoAng = SLIDER_CONSTRAINT_DEF_SOFTNESS;
+ real_t m_restitutionOrthoAng = SLIDER_CONSTRAINT_DEF_RESTITUTION;
+ real_t m_dampingOrthoAng = SLIDER_CONSTRAINT_DEF_DAMPING;
// for interlal use
- bool m_solveLinLim;
- bool m_solveAngLim;
+ bool m_solveLinLim = false;
+ bool m_solveAngLim = false;
- JacobianEntry3DSW m_jacLin[3];
- real_t m_jacLinDiagABInv[3];
+ JacobianEntry3DSW m_jacLin[3] = {};
+ real_t m_jacLinDiagABInv[3] = {};
- JacobianEntry3DSW m_jacAng[3];
+ JacobianEntry3DSW m_jacAng[3] = {};
- real_t m_timeStep;
+ real_t m_timeStep = 0.0;
Transform3D m_calculatedTransformA;
Transform3D m_calculatedTransformB;
@@ -132,23 +132,20 @@ protected:
Vector3 m_relPosA;
Vector3 m_relPosB;
- real_t m_linPos;
+ real_t m_linPos = 0.0;
- real_t m_angDepth;
- real_t m_kAngle;
+ real_t m_angDepth = 0.0;
+ real_t m_kAngle = 0.0;
- bool m_poweredLinMotor;
- real_t m_targetLinMotorVelocity;
- real_t m_maxLinMotorForce;
- real_t m_accumulatedLinMotorImpulse;
+ bool m_poweredLinMotor = false;
+ real_t m_targetLinMotorVelocity = 0.0;
+ real_t m_maxLinMotorForce = 0.0;
+ real_t m_accumulatedLinMotorImpulse = 0.0;
- bool m_poweredAngMotor;
- real_t m_targetAngMotorVelocity;
- real_t m_maxAngMotorForce;
- real_t m_accumulatedAngMotorImpulse;
-
- //------------------------
- void initParams();
+ bool m_poweredAngMotor = false;
+ real_t m_targetAngMotorVelocity = 0.0;
+ real_t m_maxAngMotorForce = 0.0;
+ real_t m_accumulatedAngMotorImpulse = 0.0;
public:
// constructors
diff --git a/servers/physics_3d/physics_server_3d_sw.cpp b/servers/physics_3d/physics_server_3d_sw.cpp
index fbb374bd74..ece1fe46e7 100644
--- a/servers/physics_3d/physics_server_3d_sw.cpp
+++ b/servers/physics_3d/physics_server_3d_sw.cpp
@@ -30,6 +30,7 @@
#include "physics_server_3d_sw.h"
+#include "body_direct_state_3d_sw.h"
#include "broad_phase_3d_bvh.h"
#include "core/debugger/engine_debugger.h"
#include "core/os/os.h"
@@ -42,8 +43,14 @@
#define FLUSH_QUERY_CHECK(m_object) \
ERR_FAIL_COND_MSG(m_object->get_space() && flushing_queries, "Can't change this state while flushing queries. Use call_deferred() or set_deferred() to change monitoring state instead.");
-RID PhysicsServer3DSW::plane_shape_create() {
- Shape3DSW *shape = memnew(PlaneShape3DSW);
+RID PhysicsServer3DSW::world_boundary_shape_create() {
+ Shape3DSW *shape = memnew(WorldBoundaryShape3DSW);
+ RID rid = shape_owner.make_rid(shape);
+ shape->set_self(rid);
+ return rid;
+}
+RID PhysicsServer3DSW::separation_ray_shape_create() {
+ Shape3DSW *shape = memnew(SeparationRayShape3DSW);
RID rid = shape_owner.make_rid(shape);
shape->set_self(rid);
return rid;
@@ -95,25 +102,25 @@ RID PhysicsServer3DSW::custom_shape_create() {
}
void PhysicsServer3DSW::shape_set_data(RID p_shape, const Variant &p_data) {
- Shape3DSW *shape = shape_owner.getornull(p_shape);
+ Shape3DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
shape->set_data(p_data);
};
void PhysicsServer3DSW::shape_set_custom_solver_bias(RID p_shape, real_t p_bias) {
- Shape3DSW *shape = shape_owner.getornull(p_shape);
+ Shape3DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
shape->set_custom_bias(p_bias);
}
PhysicsServer3D::ShapeType PhysicsServer3DSW::shape_get_type(RID p_shape) const {
- const Shape3DSW *shape = shape_owner.getornull(p_shape);
+ const Shape3DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, SHAPE_CUSTOM);
return shape->get_type();
};
Variant PhysicsServer3DSW::shape_get_data(RID p_shape) const {
- const Shape3DSW *shape = shape_owner.getornull(p_shape);
+ const Shape3DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, Variant());
ERR_FAIL_COND_V(!shape->is_configured(), Variant());
return shape->get_data();
@@ -127,7 +134,7 @@ real_t PhysicsServer3DSW::shape_get_margin(RID p_shape) const {
}
real_t PhysicsServer3DSW::shape_get_custom_solver_bias(RID p_shape) const {
- const Shape3DSW *shape = shape_owner.getornull(p_shape);
+ const Shape3DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, 0);
return shape->get_custom_bias();
}
@@ -137,7 +144,7 @@ RID PhysicsServer3DSW::space_create() {
RID id = space_owner.make_rid(space);
space->set_self(id);
RID area_id = area_create();
- Area3DSW *area = area_owner.getornull(area_id);
+ Area3DSW *area = area_owner.get_or_null(area_id);
ERR_FAIL_COND_V(!area, RID());
space->set_default_area(area);
area->set_space(space);
@@ -151,7 +158,7 @@ RID PhysicsServer3DSW::space_create() {
};
void PhysicsServer3DSW::space_set_active(RID p_space, bool p_active) {
- Space3DSW *space = space_owner.getornull(p_space);
+ Space3DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
if (p_active) {
active_spaces.insert(space);
@@ -161,27 +168,27 @@ void PhysicsServer3DSW::space_set_active(RID p_space, bool p_active) {
}
bool PhysicsServer3DSW::space_is_active(RID p_space) const {
- const Space3DSW *space = space_owner.getornull(p_space);
+ const Space3DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, false);
return active_spaces.has(space);
}
void PhysicsServer3DSW::space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) {
- Space3DSW *space = space_owner.getornull(p_space);
+ Space3DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
space->set_param(p_param, p_value);
}
real_t PhysicsServer3DSW::space_get_param(RID p_space, SpaceParameter p_param) const {
- const Space3DSW *space = space_owner.getornull(p_space);
+ const Space3DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, 0);
return space->get_param(p_param);
}
PhysicsDirectSpaceState3D *PhysicsServer3DSW::space_get_direct_state(RID p_space) {
- Space3DSW *space = space_owner.getornull(p_space);
+ Space3DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, nullptr);
ERR_FAIL_COND_V_MSG((using_threads && !doing_sync) || space->is_locked(), nullptr, "Space state is inaccessible right now, wait for iteration or physics process notification.");
@@ -189,19 +196,19 @@ PhysicsDirectSpaceState3D *PhysicsServer3DSW::space_get_direct_state(RID p_space
}
void PhysicsServer3DSW::space_set_debug_contacts(RID p_space, int p_max_contacts) {
- Space3DSW *space = space_owner.getornull(p_space);
+ Space3DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
space->set_debug_contacts(p_max_contacts);
}
Vector<Vector3> PhysicsServer3DSW::space_get_contacts(RID p_space) const {
- Space3DSW *space = space_owner.getornull(p_space);
+ Space3DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, Vector<Vector3>());
return space->get_debug_contacts();
}
int PhysicsServer3DSW::space_get_contact_count(RID p_space) const {
- Space3DSW *space = space_owner.getornull(p_space);
+ Space3DSW *space = space_owner.get_or_null(p_space);
ERR_FAIL_COND_V(!space, 0);
return space->get_debug_contact_count();
}
@@ -214,12 +221,12 @@ RID PhysicsServer3DSW::area_create() {
};
void PhysicsServer3DSW::area_set_space(RID p_area, RID p_space) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
Space3DSW *space = nullptr;
if (p_space.is_valid()) {
- space = space_owner.getornull(p_space);
+ space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
}
@@ -232,7 +239,7 @@ void PhysicsServer3DSW::area_set_space(RID p_area, RID p_space) {
};
RID PhysicsServer3DSW::area_get_space(RID p_area) const {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, RID());
Space3DSW *space = area->get_space();
@@ -243,34 +250,34 @@ RID PhysicsServer3DSW::area_get_space(RID p_area) const {
};
void PhysicsServer3DSW::area_set_space_override_mode(RID p_area, AreaSpaceOverrideMode p_mode) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_space_override_mode(p_mode);
}
PhysicsServer3D::AreaSpaceOverrideMode PhysicsServer3DSW::area_get_space_override_mode(RID p_area) const {
- const Area3DSW *area = area_owner.getornull(p_area);
+ const Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, AREA_SPACE_OVERRIDE_DISABLED);
return area->get_space_override_mode();
}
void PhysicsServer3DSW::area_add_shape(RID p_area, RID p_shape, const Transform3D &p_transform, bool p_disabled) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
- Shape3DSW *shape = shape_owner.getornull(p_shape);
+ Shape3DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
area->add_shape(shape, p_transform, p_disabled);
}
void PhysicsServer3DSW::area_set_shape(RID p_area, int p_shape_idx, RID p_shape) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
- Shape3DSW *shape = shape_owner.getornull(p_shape);
+ Shape3DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
ERR_FAIL_COND(!shape->is_configured());
@@ -278,21 +285,21 @@ void PhysicsServer3DSW::area_set_shape(RID p_area, int p_shape_idx, RID p_shape)
}
void PhysicsServer3DSW::area_set_shape_transform(RID p_area, int p_shape_idx, const Transform3D &p_transform) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_shape_transform(p_shape_idx, p_transform);
}
int PhysicsServer3DSW::area_get_shape_count(RID p_area) const {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, -1);
return area->get_shape_count();
}
RID PhysicsServer3DSW::area_get_shape(RID p_area, int p_shape_idx) const {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, RID());
Shape3DSW *shape = area->get_shape(p_shape_idx);
@@ -302,21 +309,21 @@ RID PhysicsServer3DSW::area_get_shape(RID p_area, int p_shape_idx) const {
}
Transform3D PhysicsServer3DSW::area_get_shape_transform(RID p_area, int p_shape_idx) const {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, Transform3D());
return area->get_shape_transform(p_shape_idx);
}
void PhysicsServer3DSW::area_remove_shape(RID p_area, int p_shape_idx) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->remove_shape(p_shape_idx);
}
void PhysicsServer3DSW::area_clear_shapes(RID p_area) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
while (area->get_shape_count()) {
@@ -325,7 +332,7 @@ void PhysicsServer3DSW::area_clear_shapes(RID p_area) {
}
void PhysicsServer3DSW::area_set_shape_disabled(RID p_area, int p_shape_idx, bool p_disabled) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
ERR_FAIL_INDEX(p_shape_idx, area->get_shape_count());
FLUSH_QUERY_CHECK(area);
@@ -334,74 +341,74 @@ void PhysicsServer3DSW::area_set_shape_disabled(RID p_area, int p_shape_idx, boo
void PhysicsServer3DSW::area_attach_object_instance_id(RID p_area, ObjectID p_id) {
if (space_owner.owns(p_area)) {
- Space3DSW *space = space_owner.getornull(p_area);
+ Space3DSW *space = space_owner.get_or_null(p_area);
p_area = space->get_default_area()->get_self();
}
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_instance_id(p_id);
}
ObjectID PhysicsServer3DSW::area_get_object_instance_id(RID p_area) const {
if (space_owner.owns(p_area)) {
- Space3DSW *space = space_owner.getornull(p_area);
+ Space3DSW *space = space_owner.get_or_null(p_area);
p_area = space->get_default_area()->get_self();
}
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, ObjectID());
return area->get_instance_id();
}
void PhysicsServer3DSW::area_set_param(RID p_area, AreaParameter p_param, const Variant &p_value) {
if (space_owner.owns(p_area)) {
- Space3DSW *space = space_owner.getornull(p_area);
+ Space3DSW *space = space_owner.get_or_null(p_area);
p_area = space->get_default_area()->get_self();
}
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_param(p_param, p_value);
};
void PhysicsServer3DSW::area_set_transform(RID p_area, const Transform3D &p_transform) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_transform(p_transform);
};
Variant PhysicsServer3DSW::area_get_param(RID p_area, AreaParameter p_param) const {
if (space_owner.owns(p_area)) {
- Space3DSW *space = space_owner.getornull(p_area);
+ Space3DSW *space = space_owner.get_or_null(p_area);
p_area = space->get_default_area()->get_self();
}
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, Variant());
return area->get_param(p_param);
};
Transform3D PhysicsServer3DSW::area_get_transform(RID p_area) const {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND_V(!area, Transform3D());
return area->get_transform();
};
void PhysicsServer3DSW::area_set_collision_layer(RID p_area, uint32_t p_layer) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_collision_layer(p_layer);
}
void PhysicsServer3DSW::area_set_collision_mask(RID p_area, uint32_t p_mask) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_collision_mask(p_mask);
}
void PhysicsServer3DSW::area_set_monitorable(RID p_area, bool p_monitorable) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
FLUSH_QUERY_CHECK(area);
@@ -409,21 +416,21 @@ void PhysicsServer3DSW::area_set_monitorable(RID p_area, bool p_monitorable) {
}
void PhysicsServer3DSW::area_set_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_monitor_callback(p_receiver ? p_receiver->get_instance_id() : ObjectID(), p_method);
}
void PhysicsServer3DSW::area_set_ray_pickable(RID p_area, bool p_enable) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_ray_pickable(p_enable);
}
void PhysicsServer3DSW::area_set_area_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) {
- Area3DSW *area = area_owner.getornull(p_area);
+ Area3DSW *area = area_owner.get_or_null(p_area);
ERR_FAIL_COND(!area);
area->set_area_monitor_callback(p_receiver ? p_receiver->get_instance_id() : ObjectID(), p_method);
@@ -439,12 +446,12 @@ RID PhysicsServer3DSW::body_create() {
};
void PhysicsServer3DSW::body_set_space(RID p_body, RID p_space) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
Space3DSW *space = nullptr;
if (p_space.is_valid()) {
- space = space_owner.getornull(p_space);
+ space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
}
@@ -457,7 +464,7 @@ void PhysicsServer3DSW::body_set_space(RID p_body, RID p_space) {
};
RID PhysicsServer3DSW::body_get_space(RID p_body) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, RID());
Space3DSW *space = body->get_space();
@@ -468,55 +475,55 @@ RID PhysicsServer3DSW::body_get_space(RID p_body) const {
};
void PhysicsServer3DSW::body_set_mode(RID p_body, BodyMode p_mode) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_mode(p_mode);
};
PhysicsServer3D::BodyMode PhysicsServer3DSW::body_get_mode(RID p_body) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, BODY_MODE_STATIC);
return body->get_mode();
};
void PhysicsServer3DSW::body_add_shape(RID p_body, RID p_shape, const Transform3D &p_transform, bool p_disabled) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
- Shape3DSW *shape = shape_owner.getornull(p_shape);
+ Shape3DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
body->add_shape(shape, p_transform, p_disabled);
}
void PhysicsServer3DSW::body_set_shape(RID p_body, int p_shape_idx, RID p_shape) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
- Shape3DSW *shape = shape_owner.getornull(p_shape);
+ Shape3DSW *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_COND(!shape);
ERR_FAIL_COND(!shape->is_configured());
body->set_shape(p_shape_idx, shape);
}
void PhysicsServer3DSW::body_set_shape_transform(RID p_body, int p_shape_idx, const Transform3D &p_transform) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_shape_transform(p_shape_idx, p_transform);
}
int PhysicsServer3DSW::body_get_shape_count(RID p_body) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, -1);
return body->get_shape_count();
}
RID PhysicsServer3DSW::body_get_shape(RID p_body, int p_shape_idx) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, RID());
Shape3DSW *shape = body->get_shape(p_shape_idx);
@@ -526,7 +533,7 @@ RID PhysicsServer3DSW::body_get_shape(RID p_body, int p_shape_idx) const {
}
void PhysicsServer3DSW::body_set_shape_disabled(RID p_body, int p_shape_idx, bool p_disabled) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
ERR_FAIL_INDEX(p_shape_idx, body->get_shape_count());
FLUSH_QUERY_CHECK(body);
@@ -535,21 +542,21 @@ void PhysicsServer3DSW::body_set_shape_disabled(RID p_body, int p_shape_idx, boo
}
Transform3D PhysicsServer3DSW::body_get_shape_transform(RID p_body, int p_shape_idx) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, Transform3D());
return body->get_shape_transform(p_shape_idx);
}
void PhysicsServer3DSW::body_remove_shape(RID p_body, int p_shape_idx) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->remove_shape(p_shape_idx);
}
void PhysicsServer3DSW::body_clear_shapes(RID p_body) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
while (body->get_shape_count()) {
@@ -558,21 +565,21 @@ void PhysicsServer3DSW::body_clear_shapes(RID p_body) {
}
void PhysicsServer3DSW::body_set_enable_continuous_collision_detection(RID p_body, bool p_enable) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_continuous_collision_detection(p_enable);
}
bool PhysicsServer3DSW::body_is_continuous_collision_detection_enabled(RID p_body) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, false);
return body->is_continuous_collision_detection_enabled();
}
void PhysicsServer3DSW::body_set_collision_layer(RID p_body, uint32_t p_layer) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_collision_layer(p_layer);
@@ -580,14 +587,14 @@ void PhysicsServer3DSW::body_set_collision_layer(RID p_body, uint32_t p_layer) {
}
uint32_t PhysicsServer3DSW::body_get_collision_layer(RID p_body) const {
- const Body3DSW *body = body_owner.getornull(p_body);
+ const Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_collision_layer();
}
void PhysicsServer3DSW::body_set_collision_mask(RID p_body, uint32_t p_mask) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_collision_mask(p_mask);
@@ -595,20 +602,20 @@ void PhysicsServer3DSW::body_set_collision_mask(RID p_body, uint32_t p_mask) {
}
uint32_t PhysicsServer3DSW::body_get_collision_mask(RID p_body) const {
- const Body3DSW *body = body_owner.getornull(p_body);
+ const Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_collision_mask();
}
void PhysicsServer3DSW::body_attach_object_instance_id(RID p_body, ObjectID p_id) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
if (body) {
body->set_instance_id(p_id);
return;
}
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
if (soft_body) {
soft_body->set_instance_id(p_id);
return;
@@ -618,54 +625,61 @@ void PhysicsServer3DSW::body_attach_object_instance_id(RID p_body, ObjectID p_id
};
ObjectID PhysicsServer3DSW::body_get_object_instance_id(RID p_body) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, ObjectID());
return body->get_instance_id();
};
void PhysicsServer3DSW::body_set_user_flags(RID p_body, uint32_t p_flags) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
};
uint32_t PhysicsServer3DSW::body_get_user_flags(RID p_body) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return 0;
};
-void PhysicsServer3DSW::body_set_param(RID p_body, BodyParameter p_param, real_t p_value) {
- Body3DSW *body = body_owner.getornull(p_body);
+void PhysicsServer3DSW::body_set_param(RID p_body, BodyParameter p_param, const Variant &p_value) {
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_param(p_param, p_value);
};
-real_t PhysicsServer3DSW::body_get_param(RID p_body, BodyParameter p_param) const {
- Body3DSW *body = body_owner.getornull(p_body);
+Variant PhysicsServer3DSW::body_get_param(RID p_body, BodyParameter p_param) const {
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->get_param(p_param);
};
+void PhysicsServer3DSW::body_reset_mass_properties(RID p_body) {
+ Body3DSW *body = body_owner.get_or_null(p_body);
+ ERR_FAIL_COND(!body);
+
+ return body->reset_mass_properties();
+}
+
void PhysicsServer3DSW::body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_state(p_state, p_variant);
};
Variant PhysicsServer3DSW::body_get_state(RID p_body, BodyState p_state) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, Variant());
return body->get_state(p_state);
};
void PhysicsServer3DSW::body_set_applied_force(RID p_body, const Vector3 &p_force) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_applied_force(p_force);
@@ -673,13 +687,13 @@ void PhysicsServer3DSW::body_set_applied_force(RID p_body, const Vector3 &p_forc
};
Vector3 PhysicsServer3DSW::body_get_applied_force(RID p_body) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, Vector3());
return body->get_applied_force();
};
void PhysicsServer3DSW::body_set_applied_torque(RID p_body, const Vector3 &p_torque) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_applied_torque(p_torque);
@@ -687,14 +701,14 @@ void PhysicsServer3DSW::body_set_applied_torque(RID p_body, const Vector3 &p_tor
};
Vector3 PhysicsServer3DSW::body_get_applied_torque(RID p_body) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, Vector3());
return body->get_applied_torque();
};
void PhysicsServer3DSW::body_add_central_force(RID p_body, const Vector3 &p_force) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->add_central_force(p_force);
@@ -702,7 +716,7 @@ void PhysicsServer3DSW::body_add_central_force(RID p_body, const Vector3 &p_forc
}
void PhysicsServer3DSW::body_add_force(RID p_body, const Vector3 &p_force, const Vector3 &p_position) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->add_force(p_force, p_position);
@@ -710,7 +724,7 @@ void PhysicsServer3DSW::body_add_force(RID p_body, const Vector3 &p_force, const
};
void PhysicsServer3DSW::body_add_torque(RID p_body, const Vector3 &p_torque) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->add_torque(p_torque);
@@ -718,7 +732,7 @@ void PhysicsServer3DSW::body_add_torque(RID p_body, const Vector3 &p_torque) {
};
void PhysicsServer3DSW::body_apply_central_impulse(RID p_body, const Vector3 &p_impulse) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
_update_shapes();
@@ -728,7 +742,7 @@ void PhysicsServer3DSW::body_apply_central_impulse(RID p_body, const Vector3 &p_
}
void PhysicsServer3DSW::body_apply_impulse(RID p_body, const Vector3 &p_impulse, const Vector3 &p_position) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
_update_shapes();
@@ -738,7 +752,7 @@ void PhysicsServer3DSW::body_apply_impulse(RID p_body, const Vector3 &p_impulse,
};
void PhysicsServer3DSW::body_apply_torque_impulse(RID p_body, const Vector3 &p_impulse) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
_update_shapes();
@@ -748,7 +762,7 @@ void PhysicsServer3DSW::body_apply_torque_impulse(RID p_body, const Vector3 &p_i
};
void PhysicsServer3DSW::body_set_axis_velocity(RID p_body, const Vector3 &p_axis_velocity) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
_update_shapes();
@@ -762,7 +776,7 @@ void PhysicsServer3DSW::body_set_axis_velocity(RID p_body, const Vector3 &p_axis
};
void PhysicsServer3DSW::body_set_axis_lock(RID p_body, BodyAxis p_axis, bool p_lock) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_axis_lock(p_axis, p_lock);
@@ -770,13 +784,13 @@ void PhysicsServer3DSW::body_set_axis_lock(RID p_body, BodyAxis p_axis, bool p_l
}
bool PhysicsServer3DSW::body_is_axis_locked(RID p_body, BodyAxis p_axis) const {
- const Body3DSW *body = body_owner.getornull(p_body);
+ const Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return body->is_axis_locked(p_axis);
}
void PhysicsServer3DSW::body_add_collision_exception(RID p_body, RID p_body_b) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->add_exception(p_body_b);
@@ -784,7 +798,7 @@ void PhysicsServer3DSW::body_add_collision_exception(RID p_body, RID p_body_b) {
};
void PhysicsServer3DSW::body_remove_collision_exception(RID p_body, RID p_body_b) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->remove_exception(p_body_b);
@@ -792,7 +806,7 @@ void PhysicsServer3DSW::body_remove_collision_exception(RID p_body, RID p_body_b
};
void PhysicsServer3DSW::body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
for (int i = 0; i < body->get_exceptions().size(); i++) {
@@ -801,73 +815,80 @@ void PhysicsServer3DSW::body_get_collision_exceptions(RID p_body, List<RID> *p_e
};
void PhysicsServer3DSW::body_set_contacts_reported_depth_threshold(RID p_body, real_t p_threshold) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
};
real_t PhysicsServer3DSW::body_get_contacts_reported_depth_threshold(RID p_body) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, 0);
return 0;
};
void PhysicsServer3DSW::body_set_omit_force_integration(RID p_body, bool p_omit) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_omit_force_integration(p_omit);
};
bool PhysicsServer3DSW::body_is_omitting_force_integration(RID p_body) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, false);
return body->get_omit_force_integration();
};
void PhysicsServer3DSW::body_set_max_contacts_reported(RID p_body, int p_contacts) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_max_contacts_reported(p_contacts);
}
int PhysicsServer3DSW::body_get_max_contacts_reported(RID p_body) const {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, -1);
return body->get_max_contacts_reported();
}
+void PhysicsServer3DSW::body_set_state_sync_callback(RID p_body, void *p_instance, BodyStateCallback p_callback) {
+ Body3DSW *body = body_owner.get_or_null(p_body);
+ ERR_FAIL_COND(!body);
+ body->set_state_sync_callback(p_instance, p_callback);
+}
+
void PhysicsServer3DSW::body_set_force_integration_callback(RID p_body, const Callable &p_callable, const Variant &p_udata) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_force_integration_callback(p_callable, p_udata);
}
void PhysicsServer3DSW::body_set_ray_pickable(RID p_body, bool p_enable) {
- Body3DSW *body = body_owner.getornull(p_body);
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND(!body);
body->set_ray_pickable(p_enable);
}
-bool PhysicsServer3DSW::body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin, MotionResult *r_result, const Set<RID> &p_exclude) {
- Body3DSW *body = body_owner.getornull(p_body);
+bool PhysicsServer3DSW::body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin, MotionResult *r_result, int p_max_collisions, bool p_collide_separation_ray, const Set<RID> &p_exclude) {
+ Body3DSW *body = body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!body, false);
ERR_FAIL_COND_V(!body->get_space(), false);
ERR_FAIL_COND_V(body->get_space()->is_locked(), false);
_update_shapes();
- return body->get_space()->test_body_motion(body, p_from, p_motion, p_margin, r_result, p_exclude);
+ return body->get_space()->test_body_motion(body, p_from, p_motion, p_margin, r_result, p_max_collisions, p_collide_separation_ray, p_exclude);
}
PhysicsDirectBodyState3D *PhysicsServer3DSW::body_get_direct_state(RID p_body) {
ERR_FAIL_COND_V_MSG((using_threads && !doing_sync), nullptr, "Body state is inaccessible right now, wait for iteration or physics process notification.");
- Body3DSW *body = body_owner.getornull(p_body);
- ERR_FAIL_COND_V(!body, nullptr);
+ Body3DSW *body = body_owner.get_or_null(p_body);
+ ERR_FAIL_NULL_V(body, nullptr);
+
+ ERR_FAIL_NULL_V(body->get_space(), nullptr);
ERR_FAIL_COND_V_MSG(body->get_space()->is_locked(), nullptr, "Body state is inaccessible right now, wait for iteration or physics process notification.");
- direct_state->body = body;
- return direct_state;
+ return body->get_direct_state();
}
/* SOFT BODY */
@@ -880,19 +901,19 @@ RID PhysicsServer3DSW::soft_body_create() {
}
void PhysicsServer3DSW::soft_body_update_rendering_server(RID p_body, RenderingServerHandler *p_rendering_server_handler) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->update_rendering_server(p_rendering_server_handler);
}
void PhysicsServer3DSW::soft_body_set_space(RID p_body, RID p_space) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
Space3DSW *space = nullptr;
if (p_space.is_valid()) {
- space = space_owner.getornull(p_space);
+ space = space_owner.get_or_null(p_space);
ERR_FAIL_COND(!space);
}
@@ -904,7 +925,7 @@ void PhysicsServer3DSW::soft_body_set_space(RID p_body, RID p_space) {
}
RID PhysicsServer3DSW::soft_body_get_space(RID p_body) const {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!soft_body, RID());
Space3DSW *space = soft_body->get_space();
@@ -915,49 +936,49 @@ RID PhysicsServer3DSW::soft_body_get_space(RID p_body) const {
}
void PhysicsServer3DSW::soft_body_set_collision_layer(RID p_body, uint32_t p_layer) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->set_collision_layer(p_layer);
}
uint32_t PhysicsServer3DSW::soft_body_get_collision_layer(RID p_body) const {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!soft_body, 0);
return soft_body->get_collision_layer();
}
void PhysicsServer3DSW::soft_body_set_collision_mask(RID p_body, uint32_t p_mask) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->set_collision_mask(p_mask);
}
uint32_t PhysicsServer3DSW::soft_body_get_collision_mask(RID p_body) const {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!soft_body, 0);
return soft_body->get_collision_mask();
}
void PhysicsServer3DSW::soft_body_add_collision_exception(RID p_body, RID p_body_b) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->add_exception(p_body_b);
}
void PhysicsServer3DSW::soft_body_remove_collision_exception(RID p_body, RID p_body_b) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->remove_exception(p_body_b);
}
void PhysicsServer3DSW::soft_body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
for (int i = 0; i < soft_body->get_exceptions().size(); i++) {
@@ -966,154 +987,154 @@ void PhysicsServer3DSW::soft_body_get_collision_exceptions(RID p_body, List<RID>
}
void PhysicsServer3DSW::soft_body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->set_state(p_state, p_variant);
}
Variant PhysicsServer3DSW::soft_body_get_state(RID p_body, BodyState p_state) const {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!soft_body, Variant());
return soft_body->get_state(p_state);
}
void PhysicsServer3DSW::soft_body_set_transform(RID p_body, const Transform3D &p_transform) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->set_state(BODY_STATE_TRANSFORM, p_transform);
}
void PhysicsServer3DSW::soft_body_set_ray_pickable(RID p_body, bool p_enable) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->set_ray_pickable(p_enable);
}
void PhysicsServer3DSW::soft_body_set_simulation_precision(RID p_body, int p_simulation_precision) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->set_iteration_count(p_simulation_precision);
}
int PhysicsServer3DSW::soft_body_get_simulation_precision(RID p_body) const {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!soft_body, 0.f);
return soft_body->get_iteration_count();
}
void PhysicsServer3DSW::soft_body_set_total_mass(RID p_body, real_t p_total_mass) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->set_total_mass(p_total_mass);
}
real_t PhysicsServer3DSW::soft_body_get_total_mass(RID p_body) const {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!soft_body, 0.f);
return soft_body->get_total_mass();
}
void PhysicsServer3DSW::soft_body_set_linear_stiffness(RID p_body, real_t p_stiffness) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->set_linear_stiffness(p_stiffness);
}
real_t PhysicsServer3DSW::soft_body_get_linear_stiffness(RID p_body) const {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!soft_body, 0.f);
return soft_body->get_linear_stiffness();
}
void PhysicsServer3DSW::soft_body_set_pressure_coefficient(RID p_body, real_t p_pressure_coefficient) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->set_pressure_coefficient(p_pressure_coefficient);
}
real_t PhysicsServer3DSW::soft_body_get_pressure_coefficient(RID p_body) const {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!soft_body, 0.f);
return soft_body->get_pressure_coefficient();
}
void PhysicsServer3DSW::soft_body_set_damping_coefficient(RID p_body, real_t p_damping_coefficient) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->set_damping_coefficient(p_damping_coefficient);
}
real_t PhysicsServer3DSW::soft_body_get_damping_coefficient(RID p_body) const {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!soft_body, 0.f);
return soft_body->get_damping_coefficient();
}
void PhysicsServer3DSW::soft_body_set_drag_coefficient(RID p_body, real_t p_drag_coefficient) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->set_drag_coefficient(p_drag_coefficient);
}
real_t PhysicsServer3DSW::soft_body_get_drag_coefficient(RID p_body) const {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!soft_body, 0.f);
return soft_body->get_drag_coefficient();
}
void PhysicsServer3DSW::soft_body_set_mesh(RID p_body, const REF &p_mesh) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->set_mesh(p_mesh);
}
AABB PhysicsServer3DSW::soft_body_get_bounds(RID p_body) const {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!soft_body, AABB());
return soft_body->get_bounds();
}
void PhysicsServer3DSW::soft_body_move_point(RID p_body, int p_point_index, const Vector3 &p_global_position) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->set_vertex_position(p_point_index, p_global_position);
}
Vector3 PhysicsServer3DSW::soft_body_get_point_global_position(RID p_body, int p_point_index) const {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!soft_body, Vector3());
return soft_body->get_vertex_position(p_point_index);
}
void PhysicsServer3DSW::soft_body_remove_all_pinned_points(RID p_body) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
soft_body->unpin_all_vertices();
}
void PhysicsServer3DSW::soft_body_pin_point(RID p_body, int p_point_index, bool p_pin) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND(!soft_body);
if (p_pin) {
@@ -1124,7 +1145,7 @@ void PhysicsServer3DSW::soft_body_pin_point(RID p_body, int p_point_index, bool
}
bool PhysicsServer3DSW::soft_body_is_point_pinned(RID p_body, int p_point_index) const {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_body);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_body);
ERR_FAIL_COND_V(!soft_body, false);
return soft_body->is_vertex_pinned(p_point_index);
@@ -1140,7 +1161,7 @@ RID PhysicsServer3DSW::joint_create() {
}
void PhysicsServer3DSW::joint_clear(RID p_joint) {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
if (joint->get_type() != JOINT_TYPE_MAX) {
Joint3DSW *empty_joint = memnew(Joint3DSW);
empty_joint->copy_settings_from(joint);
@@ -1151,7 +1172,7 @@ void PhysicsServer3DSW::joint_clear(RID p_joint) {
}
void PhysicsServer3DSW::joint_make_pin(RID p_joint, RID p_body_A, const Vector3 &p_local_A, RID p_body_B, const Vector3 &p_local_B) {
- Body3DSW *body_A = body_owner.getornull(p_body_A);
+ Body3DSW *body_A = body_owner.get_or_null(p_body_A);
ERR_FAIL_COND(!body_A);
if (!p_body_B.is_valid()) {
@@ -1159,12 +1180,12 @@ void PhysicsServer3DSW::joint_make_pin(RID p_joint, RID p_body_A, const Vector3
p_body_B = body_A->get_space()->get_static_global_body();
}
- Body3DSW *body_B = body_owner.getornull(p_body_B);
+ Body3DSW *body_B = body_owner.get_or_null(p_body_B);
ERR_FAIL_COND(!body_B);
ERR_FAIL_COND(body_A == body_B);
- Joint3DSW *prev_joint = joint_owner.getornull(p_joint);
+ Joint3DSW *prev_joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(prev_joint == nullptr);
Joint3DSW *joint = memnew(PinJoint3DSW(body_A, p_local_A, body_B, p_local_B));
@@ -1175,7 +1196,7 @@ void PhysicsServer3DSW::joint_make_pin(RID p_joint, RID p_body_A, const Vector3
}
void PhysicsServer3DSW::pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value) {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_PIN);
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
@@ -1183,7 +1204,7 @@ void PhysicsServer3DSW::pin_joint_set_param(RID p_joint, PinJointParam p_param,
}
real_t PhysicsServer3DSW::pin_joint_get_param(RID p_joint, PinJointParam p_param) const {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, 0);
ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_PIN, 0);
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
@@ -1191,7 +1212,7 @@ real_t PhysicsServer3DSW::pin_joint_get_param(RID p_joint, PinJointParam p_param
}
void PhysicsServer3DSW::pin_joint_set_local_a(RID p_joint, const Vector3 &p_A) {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_PIN);
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
@@ -1199,7 +1220,7 @@ void PhysicsServer3DSW::pin_joint_set_local_a(RID p_joint, const Vector3 &p_A) {
}
Vector3 PhysicsServer3DSW::pin_joint_get_local_a(RID p_joint) const {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, Vector3());
ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_PIN, Vector3());
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
@@ -1207,7 +1228,7 @@ Vector3 PhysicsServer3DSW::pin_joint_get_local_a(RID p_joint) const {
}
void PhysicsServer3DSW::pin_joint_set_local_b(RID p_joint, const Vector3 &p_B) {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_PIN);
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
@@ -1215,7 +1236,7 @@ void PhysicsServer3DSW::pin_joint_set_local_b(RID p_joint, const Vector3 &p_B) {
}
Vector3 PhysicsServer3DSW::pin_joint_get_local_b(RID p_joint) const {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, Vector3());
ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_PIN, Vector3());
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
@@ -1223,7 +1244,7 @@ Vector3 PhysicsServer3DSW::pin_joint_get_local_b(RID p_joint) const {
}
void PhysicsServer3DSW::joint_make_hinge(RID p_joint, RID p_body_A, const Transform3D &p_frame_A, RID p_body_B, const Transform3D &p_frame_B) {
- Body3DSW *body_A = body_owner.getornull(p_body_A);
+ Body3DSW *body_A = body_owner.get_or_null(p_body_A);
ERR_FAIL_COND(!body_A);
if (!p_body_B.is_valid()) {
@@ -1231,12 +1252,12 @@ void PhysicsServer3DSW::joint_make_hinge(RID p_joint, RID p_body_A, const Transf
p_body_B = body_A->get_space()->get_static_global_body();
}
- Body3DSW *body_B = body_owner.getornull(p_body_B);
+ Body3DSW *body_B = body_owner.get_or_null(p_body_B);
ERR_FAIL_COND(!body_B);
ERR_FAIL_COND(body_A == body_B);
- Joint3DSW *prev_joint = joint_owner.getornull(p_joint);
+ Joint3DSW *prev_joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(prev_joint == nullptr);
Joint3DSW *joint = memnew(HingeJoint3DSW(body_A, body_B, p_frame_A, p_frame_B));
@@ -1247,7 +1268,7 @@ void PhysicsServer3DSW::joint_make_hinge(RID p_joint, RID p_body_A, const Transf
}
void PhysicsServer3DSW::joint_make_hinge_simple(RID p_joint, RID p_body_A, const Vector3 &p_pivot_A, const Vector3 &p_axis_A, RID p_body_B, const Vector3 &p_pivot_B, const Vector3 &p_axis_B) {
- Body3DSW *body_A = body_owner.getornull(p_body_A);
+ Body3DSW *body_A = body_owner.get_or_null(p_body_A);
ERR_FAIL_COND(!body_A);
if (!p_body_B.is_valid()) {
@@ -1255,12 +1276,12 @@ void PhysicsServer3DSW::joint_make_hinge_simple(RID p_joint, RID p_body_A, const
p_body_B = body_A->get_space()->get_static_global_body();
}
- Body3DSW *body_B = body_owner.getornull(p_body_B);
+ Body3DSW *body_B = body_owner.get_or_null(p_body_B);
ERR_FAIL_COND(!body_B);
ERR_FAIL_COND(body_A == body_B);
- Joint3DSW *prev_joint = joint_owner.getornull(p_joint);
+ Joint3DSW *prev_joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(prev_joint == nullptr);
Joint3DSW *joint = memnew(HingeJoint3DSW(body_A, body_B, p_pivot_A, p_pivot_B, p_axis_A, p_axis_B));
@@ -1271,7 +1292,7 @@ void PhysicsServer3DSW::joint_make_hinge_simple(RID p_joint, RID p_body_A, const
}
void PhysicsServer3DSW::hinge_joint_set_param(RID p_joint, HingeJointParam p_param, real_t p_value) {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_HINGE);
HingeJoint3DSW *hinge_joint = static_cast<HingeJoint3DSW *>(joint);
@@ -1279,7 +1300,7 @@ void PhysicsServer3DSW::hinge_joint_set_param(RID p_joint, HingeJointParam p_par
}
real_t PhysicsServer3DSW::hinge_joint_get_param(RID p_joint, HingeJointParam p_param) const {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, 0);
ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_HINGE, 0);
HingeJoint3DSW *hinge_joint = static_cast<HingeJoint3DSW *>(joint);
@@ -1287,7 +1308,7 @@ real_t PhysicsServer3DSW::hinge_joint_get_param(RID p_joint, HingeJointParam p_p
}
void PhysicsServer3DSW::hinge_joint_set_flag(RID p_joint, HingeJointFlag p_flag, bool p_value) {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_HINGE);
HingeJoint3DSW *hinge_joint = static_cast<HingeJoint3DSW *>(joint);
@@ -1295,7 +1316,7 @@ void PhysicsServer3DSW::hinge_joint_set_flag(RID p_joint, HingeJointFlag p_flag,
}
bool PhysicsServer3DSW::hinge_joint_get_flag(RID p_joint, HingeJointFlag p_flag) const {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, false);
ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_HINGE, false);
HingeJoint3DSW *hinge_joint = static_cast<HingeJoint3DSW *>(joint);
@@ -1303,19 +1324,19 @@ bool PhysicsServer3DSW::hinge_joint_get_flag(RID p_joint, HingeJointFlag p_flag)
}
void PhysicsServer3DSW::joint_set_solver_priority(RID p_joint, int p_priority) {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
joint->set_priority(p_priority);
}
int PhysicsServer3DSW::joint_get_solver_priority(RID p_joint) const {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, 0);
return joint->get_priority();
}
void PhysicsServer3DSW::joint_disable_collisions_between_bodies(RID p_joint, const bool p_disable) {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
joint->disable_collisions_between_bodies(p_disable);
@@ -1335,20 +1356,20 @@ void PhysicsServer3DSW::joint_disable_collisions_between_bodies(RID p_joint, con
}
bool PhysicsServer3DSW::joint_is_disabled_collisions_between_bodies(RID p_joint) const {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, true);
return joint->is_disabled_collisions_between_bodies();
}
PhysicsServer3DSW::JointType PhysicsServer3DSW::joint_get_type(RID p_joint) const {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, JOINT_TYPE_PIN);
return joint->get_type();
}
void PhysicsServer3DSW::joint_make_slider(RID p_joint, RID p_body_A, const Transform3D &p_local_frame_A, RID p_body_B, const Transform3D &p_local_frame_B) {
- Body3DSW *body_A = body_owner.getornull(p_body_A);
+ Body3DSW *body_A = body_owner.get_or_null(p_body_A);
ERR_FAIL_COND(!body_A);
if (!p_body_B.is_valid()) {
@@ -1356,12 +1377,12 @@ void PhysicsServer3DSW::joint_make_slider(RID p_joint, RID p_body_A, const Trans
p_body_B = body_A->get_space()->get_static_global_body();
}
- Body3DSW *body_B = body_owner.getornull(p_body_B);
+ Body3DSW *body_B = body_owner.get_or_null(p_body_B);
ERR_FAIL_COND(!body_B);
ERR_FAIL_COND(body_A == body_B);
- Joint3DSW *prev_joint = joint_owner.getornull(p_joint);
+ Joint3DSW *prev_joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(prev_joint == nullptr);
Joint3DSW *joint = memnew(SliderJoint3DSW(body_A, body_B, p_local_frame_A, p_local_frame_B));
@@ -1372,7 +1393,7 @@ void PhysicsServer3DSW::joint_make_slider(RID p_joint, RID p_body_A, const Trans
}
void PhysicsServer3DSW::slider_joint_set_param(RID p_joint, SliderJointParam p_param, real_t p_value) {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_SLIDER);
SliderJoint3DSW *slider_joint = static_cast<SliderJoint3DSW *>(joint);
@@ -1380,7 +1401,7 @@ void PhysicsServer3DSW::slider_joint_set_param(RID p_joint, SliderJointParam p_p
}
real_t PhysicsServer3DSW::slider_joint_get_param(RID p_joint, SliderJointParam p_param) const {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, 0);
ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_CONE_TWIST, 0);
SliderJoint3DSW *slider_joint = static_cast<SliderJoint3DSW *>(joint);
@@ -1388,7 +1409,7 @@ real_t PhysicsServer3DSW::slider_joint_get_param(RID p_joint, SliderJointParam p
}
void PhysicsServer3DSW::joint_make_cone_twist(RID p_joint, RID p_body_A, const Transform3D &p_local_frame_A, RID p_body_B, const Transform3D &p_local_frame_B) {
- Body3DSW *body_A = body_owner.getornull(p_body_A);
+ Body3DSW *body_A = body_owner.get_or_null(p_body_A);
ERR_FAIL_COND(!body_A);
if (!p_body_B.is_valid()) {
@@ -1396,12 +1417,12 @@ void PhysicsServer3DSW::joint_make_cone_twist(RID p_joint, RID p_body_A, const T
p_body_B = body_A->get_space()->get_static_global_body();
}
- Body3DSW *body_B = body_owner.getornull(p_body_B);
+ Body3DSW *body_B = body_owner.get_or_null(p_body_B);
ERR_FAIL_COND(!body_B);
ERR_FAIL_COND(body_A == body_B);
- Joint3DSW *prev_joint = joint_owner.getornull(p_joint);
+ Joint3DSW *prev_joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(prev_joint == nullptr);
Joint3DSW *joint = memnew(ConeTwistJoint3DSW(body_A, body_B, p_local_frame_A, p_local_frame_B));
@@ -1412,7 +1433,7 @@ void PhysicsServer3DSW::joint_make_cone_twist(RID p_joint, RID p_body_A, const T
}
void PhysicsServer3DSW::cone_twist_joint_set_param(RID p_joint, ConeTwistJointParam p_param, real_t p_value) {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_CONE_TWIST);
ConeTwistJoint3DSW *cone_twist_joint = static_cast<ConeTwistJoint3DSW *>(joint);
@@ -1420,7 +1441,7 @@ void PhysicsServer3DSW::cone_twist_joint_set_param(RID p_joint, ConeTwistJointPa
}
real_t PhysicsServer3DSW::cone_twist_joint_get_param(RID p_joint, ConeTwistJointParam p_param) const {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, 0);
ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_CONE_TWIST, 0);
ConeTwistJoint3DSW *cone_twist_joint = static_cast<ConeTwistJoint3DSW *>(joint);
@@ -1428,7 +1449,7 @@ real_t PhysicsServer3DSW::cone_twist_joint_get_param(RID p_joint, ConeTwistJoint
}
void PhysicsServer3DSW::joint_make_generic_6dof(RID p_joint, RID p_body_A, const Transform3D &p_local_frame_A, RID p_body_B, const Transform3D &p_local_frame_B) {
- Body3DSW *body_A = body_owner.getornull(p_body_A);
+ Body3DSW *body_A = body_owner.get_or_null(p_body_A);
ERR_FAIL_COND(!body_A);
if (!p_body_B.is_valid()) {
@@ -1436,12 +1457,12 @@ void PhysicsServer3DSW::joint_make_generic_6dof(RID p_joint, RID p_body_A, const
p_body_B = body_A->get_space()->get_static_global_body();
}
- Body3DSW *body_B = body_owner.getornull(p_body_B);
+ Body3DSW *body_B = body_owner.get_or_null(p_body_B);
ERR_FAIL_COND(!body_B);
ERR_FAIL_COND(body_A == body_B);
- Joint3DSW *prev_joint = joint_owner.getornull(p_joint);
+ Joint3DSW *prev_joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(prev_joint == nullptr);
Joint3DSW *joint = memnew(Generic6DOFJoint3DSW(body_A, body_B, p_local_frame_A, p_local_frame_B, true));
@@ -1452,7 +1473,7 @@ void PhysicsServer3DSW::joint_make_generic_6dof(RID p_joint, RID p_body_A, const
}
void PhysicsServer3DSW::generic_6dof_joint_set_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param, real_t p_value) {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_6DOF);
Generic6DOFJoint3DSW *generic_6dof_joint = static_cast<Generic6DOFJoint3DSW *>(joint);
@@ -1460,7 +1481,7 @@ void PhysicsServer3DSW::generic_6dof_joint_set_param(RID p_joint, Vector3::Axis
}
real_t PhysicsServer3DSW::generic_6dof_joint_get_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param) const {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, 0);
ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_6DOF, 0);
Generic6DOFJoint3DSW *generic_6dof_joint = static_cast<Generic6DOFJoint3DSW *>(joint);
@@ -1468,7 +1489,7 @@ real_t PhysicsServer3DSW::generic_6dof_joint_get_param(RID p_joint, Vector3::Axi
}
void PhysicsServer3DSW::generic_6dof_joint_set_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag, bool p_enable) {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_6DOF);
Generic6DOFJoint3DSW *generic_6dof_joint = static_cast<Generic6DOFJoint3DSW *>(joint);
@@ -1476,7 +1497,7 @@ void PhysicsServer3DSW::generic_6dof_joint_set_flag(RID p_joint, Vector3::Axis p
}
bool PhysicsServer3DSW::generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag) const {
- Joint3DSW *joint = joint_owner.getornull(p_joint);
+ Joint3DSW *joint = joint_owner.get_or_null(p_joint);
ERR_FAIL_COND_V(!joint, false);
ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_6DOF, false);
Generic6DOFJoint3DSW *generic_6dof_joint = static_cast<Generic6DOFJoint3DSW *>(joint);
@@ -1487,7 +1508,7 @@ void PhysicsServer3DSW::free(RID p_rid) {
_update_shapes(); //just in case
if (shape_owner.owns(p_rid)) {
- Shape3DSW *shape = shape_owner.getornull(p_rid);
+ Shape3DSW *shape = shape_owner.get_or_null(p_rid);
while (shape->get_owners().size()) {
ShapeOwner3DSW *so = shape->get_owners().front()->key();
@@ -1497,7 +1518,7 @@ void PhysicsServer3DSW::free(RID p_rid) {
shape_owner.free(p_rid);
memdelete(shape);
} else if (body_owner.owns(p_rid)) {
- Body3DSW *body = body_owner.getornull(p_rid);
+ Body3DSW *body = body_owner.get_or_null(p_rid);
/*
if (body->get_state_query())
@@ -1516,14 +1537,14 @@ void PhysicsServer3DSW::free(RID p_rid) {
body_owner.free(p_rid);
memdelete(body);
} else if (soft_body_owner.owns(p_rid)) {
- SoftBody3DSW *soft_body = soft_body_owner.getornull(p_rid);
+ SoftBody3DSW *soft_body = soft_body_owner.get_or_null(p_rid);
soft_body->set_space(nullptr);
soft_body_owner.free(p_rid);
memdelete(soft_body);
} else if (area_owner.owns(p_rid)) {
- Area3DSW *area = area_owner.getornull(p_rid);
+ Area3DSW *area = area_owner.get_or_null(p_rid);
/*
if (area->get_monitor_query())
@@ -1539,7 +1560,7 @@ void PhysicsServer3DSW::free(RID p_rid) {
area_owner.free(p_rid);
memdelete(area);
} else if (space_owner.owns(p_rid)) {
- Space3DSW *space = space_owner.getornull(p_rid);
+ Space3DSW *space = space_owner.get_or_null(p_rid);
while (space->get_objects().size()) {
CollisionObject3DSW *co = (CollisionObject3DSW *)space->get_objects().front()->get();
@@ -1553,7 +1574,7 @@ void PhysicsServer3DSW::free(RID p_rid) {
space_owner.free(p_rid);
memdelete(space);
} else if (joint_owner.owns(p_rid)) {
- Joint3DSW *joint = joint_owner.getornull(p_rid);
+ Joint3DSW *joint = joint_owner.get_or_null(p_rid);
joint_owner.free(p_rid);
memdelete(joint);
@@ -1572,10 +1593,8 @@ void PhysicsServer3DSW::set_collision_iterations(int p_iterations) {
};
void PhysicsServer3DSW::init() {
- last_step = 0.001;
iterations = 8; // 8?
stepper = memnew(Step3DSW);
- direct_state = memnew(PhysicsDirectBodyState3DSW);
};
void PhysicsServer3DSW::step(real_t p_step) {
@@ -1587,9 +1606,6 @@ void PhysicsServer3DSW::step(real_t p_step) {
_update_shapes();
- last_step = p_step;
- PhysicsDirectBodyState3DSW::singleton->step = p_step;
-
island_count = 0;
active_objects = 0;
collision_pairs = 0;
@@ -1665,7 +1681,6 @@ void PhysicsServer3DSW::end_sync() {
void PhysicsServer3DSW::finish() {
memdelete(stepper);
- memdelete(direct_state);
};
int PhysicsServer3DSW::get_process_info(ProcessInfo p_info) {
@@ -1729,11 +1744,5 @@ PhysicsServer3DSW::PhysicsServer3DSW(bool p_using_threads) {
singletonsw = this;
BroadPhase3DSW::create_func = BroadPhase3DBVH::_create;
- island_count = 0;
- active_objects = 0;
- collision_pairs = 0;
using_threads = p_using_threads;
- active = true;
- flushing_queries = false;
- doing_sync = false;
};
diff --git a/servers/physics_3d/physics_server_3d_sw.h b/servers/physics_3d/physics_server_3d_sw.h
index 6e59a77e89..357bfba1d7 100644
--- a/servers/physics_3d/physics_server_3d_sw.h
+++ b/servers/physics_3d/physics_server_3d_sw.h
@@ -42,23 +42,20 @@ class PhysicsServer3DSW : public PhysicsServer3D {
GDCLASS(PhysicsServer3DSW, PhysicsServer3D);
friend class PhysicsDirectSpaceState3DSW;
- bool active;
- int iterations;
- real_t last_step;
+ bool active = true;
+ int iterations = 0;
- int island_count;
- int active_objects;
- int collision_pairs;
+ int island_count = 0;
+ int active_objects = 0;
+ int collision_pairs = 0;
- bool using_threads;
- bool doing_sync;
- bool flushing_queries;
+ bool using_threads = false;
+ bool doing_sync = false;
+ bool flushing_queries = false;
- Step3DSW *stepper;
+ Step3DSW *stepper = nullptr;
Set<const Space3DSW *> active_spaces;
- PhysicsDirectBodyState3DSW *direct_state;
-
mutable RID_PtrOwner<Shape3DSW, true> shape_owner;
mutable RID_PtrOwner<Space3DSW, true> space_owner;
mutable RID_PtrOwner<Area3DSW, true> area_owner;
@@ -82,7 +79,8 @@ public:
static void _shape_col_cbk(const Vector3 &p_point_A, int p_index_A, const Vector3 &p_point_B, int p_index_B, void *p_userdata);
- virtual RID plane_shape_create() override;
+ virtual RID world_boundary_shape_create() override;
+ virtual RID separation_ray_shape_create() override;
virtual RID sphere_shape_create() override;
virtual RID box_shape_create() override;
virtual RID capsule_shape_create() override;
@@ -200,8 +198,10 @@ public:
virtual void body_set_user_flags(RID p_body, uint32_t p_flags) override;
virtual uint32_t body_get_user_flags(RID p_body) const override;
- virtual void body_set_param(RID p_body, BodyParameter p_param, real_t p_value) override;
- virtual real_t body_get_param(RID p_body, BodyParameter p_param) const override;
+ virtual void body_set_param(RID p_body, BodyParameter p_param, const Variant &p_value) override;
+ virtual Variant body_get_param(RID p_body, BodyParameter p_param) const override;
+
+ virtual void body_reset_mass_properties(RID p_body) override;
virtual void body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) override;
virtual Variant body_get_state(RID p_body, BodyState p_state) const override;
@@ -237,11 +237,12 @@ public:
virtual void body_set_max_contacts_reported(RID p_body, int p_contacts) override;
virtual int body_get_max_contacts_reported(RID p_body) const override;
+ virtual void body_set_state_sync_callback(RID p_body, void *p_instance, BodyStateCallback p_callback) override;
virtual void body_set_force_integration_callback(RID p_body, const Callable &p_callable, const Variant &p_udata = Variant()) override;
virtual void body_set_ray_pickable(RID p_body, bool p_enable) override;
- virtual bool body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin = 0.001, MotionResult *r_result = nullptr, const Set<RID> &p_exclude = Set<RID>()) override;
+ virtual bool body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin = 0.001, MotionResult *r_result = nullptr, int p_max_collisions = 1, bool p_collide_separation_ray = false, const Set<RID> &p_exclude = Set<RID>()) override;
// this function only works on physics process, errors and returns null otherwise
virtual PhysicsDirectBodyState3D *body_get_direct_state(RID p_body) override;
diff --git a/servers/physics_3d/physics_server_3d_wrap_mt.cpp b/servers/physics_3d/physics_server_3d_wrap_mt.cpp
index 0a89c1a9c9..c424100bba 100644
--- a/servers/physics_3d/physics_server_3d_wrap_mt.cpp
+++ b/servers/physics_3d/physics_server_3d_wrap_mt.cpp
@@ -119,8 +119,6 @@ PhysicsServer3DWrapMT::PhysicsServer3DWrapMT(PhysicsServer3D *p_contained, bool
command_queue(p_create_thread) {
physics_3d_server = p_contained;
create_thread = p_create_thread;
- step_pending = 0;
- step_thread_up = false;
pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
@@ -131,7 +129,6 @@ PhysicsServer3DWrapMT::PhysicsServer3DWrapMT(PhysicsServer3D *p_contained, bool
}
main_thread = Thread::get_caller_id();
- first_frame = true;
}
PhysicsServer3DWrapMT::~PhysicsServer3DWrapMT() {
diff --git a/servers/physics_3d/physics_server_3d_wrap_mt.h b/servers/physics_3d/physics_server_3d_wrap_mt.h
index 75174628bf..6869484f8c 100644
--- a/servers/physics_3d/physics_server_3d_wrap_mt.h
+++ b/servers/physics_3d/physics_server_3d_wrap_mt.h
@@ -58,7 +58,7 @@ class PhysicsServer3DWrapMT : public PhysicsServer3D {
bool create_thread = false;
Semaphore step_sem;
- int step_pending;
+ int step_pending = 0;
void thread_step(real_t p_delta);
void thread_flush();
@@ -78,7 +78,8 @@ public:
#include "servers/server_wrap_mt_common.h"
//FUNC1RID(shape,ShapeType); todo fix
- FUNCRID(plane_shape)
+ FUNCRID(world_boundary_shape)
+ FUNCRID(separation_ray_shape)
FUNCRID(sphere_shape)
FUNCRID(box_shape)
FUNCRID(capsule_shape)
@@ -209,8 +210,10 @@ public:
FUNC2(body_set_user_flags, RID, uint32_t);
FUNC1RC(uint32_t, body_get_user_flags, RID);
- FUNC3(body_set_param, RID, BodyParameter, real_t);
- FUNC2RC(real_t, body_get_param, RID, BodyParameter);
+ FUNC3(body_set_param, RID, BodyParameter, const Variant &);
+ FUNC2RC(Variant, body_get_param, RID, BodyParameter);
+
+ FUNC1(body_reset_mass_properties, RID);
FUNC3(body_set_state, RID, BodyState, const Variant &);
FUNC2RC(Variant, body_get_state, RID, BodyState);
@@ -245,13 +248,14 @@ public:
FUNC2(body_set_omit_force_integration, RID, bool);
FUNC1RC(bool, body_is_omitting_force_integration, RID);
+ FUNC3(body_set_state_sync_callback, RID, void *, BodyStateCallback);
FUNC3(body_set_force_integration_callback, RID, const Callable &, const Variant &);
FUNC2(body_set_ray_pickable, RID, bool);
- bool body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin = 0.001, MotionResult *r_result = nullptr, const Set<RID> &p_exclude = Set<RID>()) override {
+ bool body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin = 0.001, MotionResult *r_result = nullptr, int p_max_collisions = 1, bool p_collide_separation_ray = false, const Set<RID> &p_exclude = Set<RID>()) override {
ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), false);
- return physics_3d_server->body_test_motion(p_body, p_from, p_motion, p_margin, r_result, p_exclude);
+ return physics_3d_server->body_test_motion(p_body, p_from, p_motion, p_margin, r_result, p_max_collisions, p_collide_separation_ray, p_exclude);
}
// this function only works on physics process, errors and returns null otherwise
diff --git a/servers/physics_3d/shape_3d_sw.cpp b/servers/physics_3d/shape_3d_sw.cpp
index a84405de81..7deddb000e 100644
--- a/servers/physics_3d/shape_3d_sw.cpp
+++ b/servers/physics_3d/shape_3d_sw.cpp
@@ -101,30 +101,25 @@ const Map<ShapeOwner3DSW *, int> &Shape3DSW::get_owners() const {
return owners;
}
-Shape3DSW::Shape3DSW() {
- custom_bias = 0;
- configured = false;
-}
-
Shape3DSW::~Shape3DSW() {
ERR_FAIL_COND(owners.size());
}
-Plane PlaneShape3DSW::get_plane() const {
+Plane WorldBoundaryShape3DSW::get_plane() const {
return plane;
}
-void PlaneShape3DSW::project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const {
+void WorldBoundaryShape3DSW::project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const {
// gibberish, a plane is infinity
r_min = -1e7;
r_max = 1e7;
}
-Vector3 PlaneShape3DSW::get_support(const Vector3 &p_normal) const {
+Vector3 WorldBoundaryShape3DSW::get_support(const Vector3 &p_normal) const {
return p_normal * 1e15;
}
-bool PlaneShape3DSW::intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const {
+bool WorldBoundaryShape3DSW::intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const {
bool inters = plane.intersects_segment(p_begin, p_end, &r_result);
if (inters) {
r_normal = plane.normal;
@@ -132,11 +127,11 @@ bool PlaneShape3DSW::intersect_segment(const Vector3 &p_begin, const Vector3 &p_
return inters;
}
-bool PlaneShape3DSW::intersect_point(const Vector3 &p_point) const {
+bool WorldBoundaryShape3DSW::intersect_point(const Vector3 &p_point) const {
return plane.distance_to(p_point) < 0;
}
-Vector3 PlaneShape3DSW::get_closest_point_to(const Vector3 &p_point) const {
+Vector3 WorldBoundaryShape3DSW::get_closest_point_to(const Vector3 &p_point) const {
if (plane.is_point_over(p_point)) {
return plane.project(p_point);
} else {
@@ -144,26 +139,108 @@ Vector3 PlaneShape3DSW::get_closest_point_to(const Vector3 &p_point) const {
}
}
-Vector3 PlaneShape3DSW::get_moment_of_inertia(real_t p_mass) const {
- return Vector3(); //wtf
+Vector3 WorldBoundaryShape3DSW::get_moment_of_inertia(real_t p_mass) const {
+ return Vector3(); // not applicable.
}
-void PlaneShape3DSW::_setup(const Plane &p_plane) {
+void WorldBoundaryShape3DSW::_setup(const Plane &p_plane) {
plane = p_plane;
configure(AABB(Vector3(-1e4, -1e4, -1e4), Vector3(1e4 * 2, 1e4 * 2, 1e4 * 2)));
}
-void PlaneShape3DSW::set_data(const Variant &p_data) {
+void WorldBoundaryShape3DSW::set_data(const Variant &p_data) {
_setup(p_data);
}
-Variant PlaneShape3DSW::get_data() const {
+Variant WorldBoundaryShape3DSW::get_data() const {
return plane;
}
-PlaneShape3DSW::PlaneShape3DSW() {
+WorldBoundaryShape3DSW::WorldBoundaryShape3DSW() {
+}
+
+//
+
+real_t SeparationRayShape3DSW::get_length() const {
+ return length;
+}
+
+bool SeparationRayShape3DSW::get_slide_on_slope() const {
+ return slide_on_slope;
+}
+
+void SeparationRayShape3DSW::project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const {
+ // don't think this will be even used
+ r_min = 0;
+ r_max = 1;
+}
+
+Vector3 SeparationRayShape3DSW::get_support(const Vector3 &p_normal) const {
+ if (p_normal.z > 0) {
+ return Vector3(0, 0, length);
+ } else {
+ return Vector3(0, 0, 0);
+ }
+}
+
+void SeparationRayShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const {
+ if (Math::abs(p_normal.z) < _EDGE_IS_VALID_SUPPORT_THRESHOLD) {
+ r_amount = 2;
+ r_type = FEATURE_EDGE;
+ r_supports[0] = Vector3(0, 0, 0);
+ r_supports[1] = Vector3(0, 0, length);
+ } else if (p_normal.z > 0) {
+ r_amount = 1;
+ r_type = FEATURE_POINT;
+ *r_supports = Vector3(0, 0, length);
+ } else {
+ r_amount = 1;
+ r_type = FEATURE_POINT;
+ *r_supports = Vector3(0, 0, 0);
+ }
}
+bool SeparationRayShape3DSW::intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const {
+ return false; //simply not possible
+}
+
+bool SeparationRayShape3DSW::intersect_point(const Vector3 &p_point) const {
+ return false; //simply not possible
+}
+
+Vector3 SeparationRayShape3DSW::get_closest_point_to(const Vector3 &p_point) const {
+ Vector3 s[2] = {
+ Vector3(0, 0, 0),
+ Vector3(0, 0, length)
+ };
+
+ return Geometry3D::get_closest_point_to_segment(p_point, s);
+}
+
+Vector3 SeparationRayShape3DSW::get_moment_of_inertia(real_t p_mass) const {
+ return Vector3();
+}
+
+void SeparationRayShape3DSW::_setup(real_t p_length, bool p_slide_on_slope) {
+ length = p_length;
+ slide_on_slope = p_slide_on_slope;
+ configure(AABB(Vector3(0, 0, 0), Vector3(0.1, 0.1, length)));
+}
+
+void SeparationRayShape3DSW::set_data(const Variant &p_data) {
+ Dictionary d = p_data;
+ _setup(d["length"], d["slide_on_slope"]);
+}
+
+Variant SeparationRayShape3DSW::get_data() const {
+ Dictionary d;
+ d["length"] = length;
+ d["slide_on_slope"] = slide_on_slope;
+ return d;
+}
+
+SeparationRayShape3DSW::SeparationRayShape3DSW() {}
+
/********** SPHERE *************/
real_t SphereShape3DSW::get_radius() const {
@@ -226,9 +303,7 @@ Variant SphereShape3DSW::get_data() const {
return radius;
}
-SphereShape3DSW::SphereShape3DSW() {
- radius = 0;
-}
+SphereShape3DSW::SphereShape3DSW() {}
/********** BOX *************/
@@ -417,8 +492,7 @@ Variant BoxShape3DSW::get_data() const {
return half_extents;
}
-BoxShape3DSW::BoxShape3DSW() {
-}
+BoxShape3DSW::BoxShape3DSW() {}
/********** CAPSULE *************/
@@ -583,9 +657,7 @@ Variant CapsuleShape3DSW::get_data() const {
return d;
}
-CapsuleShape3DSW::CapsuleShape3DSW() {
- height = radius = 0;
-}
+CapsuleShape3DSW::CapsuleShape3DSW() {}
/********** CYLINDER *************/
@@ -763,9 +835,7 @@ Variant CylinderShape3DSW::get_data() const {
return d;
}
-CylinderShape3DSW::CylinderShape3DSW() {
- height = radius = 0;
-}
+CylinderShape3DSW::CylinderShape3DSW() {}
/********** CONVEX POLYGON *************/
@@ -1297,11 +1367,11 @@ Vector3 ConcavePolygonShape3DSW::get_closest_point_to(const Vector3 &p_point) co
return Vector3();
}
-void ConcavePolygonShape3DSW::_cull(int p_idx, _CullParams *p_params) const {
+bool ConcavePolygonShape3DSW::_cull(int p_idx, _CullParams *p_params) const {
const BVH *bvh = &p_params->bvh[p_idx];
if (!p_params->aabb.intersects(bvh->aabb)) {
- return;
+ return false;
}
if (bvh->face_index >= 0) {
@@ -1311,20 +1381,27 @@ void ConcavePolygonShape3DSW::_cull(int p_idx, _CullParams *p_params) const {
face->vertex[0] = p_params->vertices[f->indices[0]];
face->vertex[1] = p_params->vertices[f->indices[1]];
face->vertex[2] = p_params->vertices[f->indices[2]];
- p_params->callback(p_params->userdata, face);
-
+ if (p_params->callback(p_params->userdata, face)) {
+ return true;
+ }
} else {
if (bvh->left >= 0) {
- _cull(bvh->left, p_params);
+ if (_cull(bvh->left, p_params)) {
+ return true;
+ }
}
if (bvh->right >= 0) {
- _cull(bvh->right, p_params);
+ if (_cull(bvh->right, p_params)) {
+ return true;
+ }
}
}
+
+ return false;
}
-void ConcavePolygonShape3DSW::cull(const AABB &p_local_aabb, Callback p_callback, void *p_userdata) const {
+void ConcavePolygonShape3DSW::cull(const AABB &p_local_aabb, QueryCallback p_callback, void *p_userdata) const {
// make matrix local to concave
if (faces.size() == 0) {
return;
@@ -1499,7 +1576,7 @@ void ConcavePolygonShape3DSW::_setup(const Vector<Vector3> &p_faces, bool p_back
Face3 face(facesr[i * 3 + 0], facesr[i * 3 + 1], facesr[i * 3 + 2]);
bvh_arrayw[i].aabb = face.get_aabb();
- bvh_arrayw[i].center = bvh_arrayw[i].aabb.position + bvh_arrayw[i].aabb.size * 0.5;
+ bvh_arrayw[i].center = bvh_arrayw[i].aabb.get_center();
bvh_arrayw[i].face_index = i;
facesw[i].indices[0] = i * 3 + 0;
facesw[i].indices[1] = i * 3 + 1;
@@ -1584,6 +1661,17 @@ struct _HeightmapSegmentCullParams {
FaceShape3DSW *face = nullptr;
};
+struct _HeightmapGridCullState {
+ real_t length = 0.0;
+ real_t length_flat = 0.0;
+
+ real_t dist = 0.0;
+ real_t prev_dist = 0.0;
+
+ int x = 0;
+ int z = 0;
+};
+
_FORCE_INLINE_ bool _heightmap_face_cull_segment(_HeightmapSegmentCullParams &p_params) {
Vector3 res;
Vector3 normal;
@@ -1596,11 +1684,11 @@ _FORCE_INLINE_ bool _heightmap_face_cull_segment(_HeightmapSegmentCullParams &p_
return false;
}
-_FORCE_INLINE_ bool _heightmap_cell_cull_segment(_HeightmapSegmentCullParams &p_params, int p_x, int p_z) {
+_FORCE_INLINE_ bool _heightmap_cell_cull_segment(_HeightmapSegmentCullParams &p_params, const _HeightmapGridCullState &p_state) {
// First triangle.
- p_params.heightmap->_get_point(p_x, p_z, p_params.face->vertex[0]);
- p_params.heightmap->_get_point(p_x + 1, p_z, p_params.face->vertex[1]);
- p_params.heightmap->_get_point(p_x, p_z + 1, p_params.face->vertex[2]);
+ p_params.heightmap->_get_point(p_state.x, p_state.z, p_params.face->vertex[0]);
+ p_params.heightmap->_get_point(p_state.x + 1, p_state.z, p_params.face->vertex[1]);
+ p_params.heightmap->_get_point(p_state.x, p_state.z + 1, p_params.face->vertex[2]);
p_params.face->normal = Plane(p_params.face->vertex[0], p_params.face->vertex[1], p_params.face->vertex[2]).normal;
if (_heightmap_face_cull_segment(p_params)) {
return true;
@@ -1608,7 +1696,7 @@ _FORCE_INLINE_ bool _heightmap_cell_cull_segment(_HeightmapSegmentCullParams &p_
// Second triangle.
p_params.face->vertex[0] = p_params.face->vertex[1];
- p_params.heightmap->_get_point(p_x + 1, p_z + 1, p_params.face->vertex[1]);
+ p_params.heightmap->_get_point(p_state.x + 1, p_state.z + 1, p_params.face->vertex[1]);
p_params.face->normal = Plane(p_params.face->vertex[0], p_params.face->vertex[1], p_params.face->vertex[2]).normal;
if (_heightmap_face_cull_segment(p_params)) {
return true;
@@ -1617,13 +1705,51 @@ _FORCE_INLINE_ bool _heightmap_cell_cull_segment(_HeightmapSegmentCullParams &p_
return false;
}
-bool HeightMapShape3DSW::intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_point, Vector3 &r_normal) const {
- if (heights.is_empty()) {
+_FORCE_INLINE_ bool _heightmap_chunk_cull_segment(_HeightmapSegmentCullParams &p_params, const _HeightmapGridCullState &p_state) {
+ const HeightMapShape3DSW::Range &chunk = p_params.heightmap->_get_bounds_chunk(p_state.x, p_state.z);
+
+ Vector3 enter_pos;
+ Vector3 exit_pos;
+
+ if (p_state.length_flat > CMP_EPSILON) {
+ real_t flat_to_3d = p_state.length / p_state.length_flat;
+ real_t enter_param = p_state.prev_dist * flat_to_3d;
+ real_t exit_param = p_state.dist * flat_to_3d;
+ enter_pos = p_params.from + p_params.dir * enter_param;
+ exit_pos = p_params.from + p_params.dir * exit_param;
+ } else {
+ // Consider the ray vertical.
+ // (though we shouldn't reach this often because there is an early check up-front)
+ enter_pos = p_params.from;
+ exit_pos = p_params.to;
+ }
+
+ // Transform positions to heightmap space.
+ enter_pos *= HeightMapShape3DSW::BOUNDS_CHUNK_SIZE;
+ exit_pos *= HeightMapShape3DSW::BOUNDS_CHUNK_SIZE;
+
+ // We did enter the flat projection of the AABB,
+ // but we have to check if we intersect it on the vertical axis.
+ if ((enter_pos.y > chunk.max) && (exit_pos.y > chunk.max)) {
+ return false;
+ }
+ if ((enter_pos.y < chunk.min) && (exit_pos.y < chunk.min)) {
return false;
}
- Vector3 local_begin = p_begin + local_origin;
- Vector3 local_end = p_end + local_origin;
+ return p_params.heightmap->_intersect_grid_segment(_heightmap_cell_cull_segment, enter_pos, exit_pos, p_params.heightmap->width, p_params.heightmap->depth, p_params.heightmap->local_origin, p_params.result, p_params.normal);
+}
+
+template <typename ProcessFunction>
+bool HeightMapShape3DSW::_intersect_grid_segment(ProcessFunction &p_process, const Vector3 &p_begin, const Vector3 &p_end, int p_width, int p_depth, const Vector3 &offset, Vector3 &r_point, Vector3 &r_normal) const {
+ Vector3 delta = (p_end - p_begin);
+ real_t length = delta.length();
+
+ if (length < CMP_EPSILON) {
+ return false;
+ }
+
+ Vector3 local_begin = p_begin + offset;
FaceShape3DSW face;
face.backface_collision = false;
@@ -1631,136 +1757,181 @@ bool HeightMapShape3DSW::intersect_segment(const Vector3 &p_begin, const Vector3
_HeightmapSegmentCullParams params;
params.from = p_begin;
params.to = p_end;
- params.dir = (p_end - p_begin).normalized();
+ params.dir = delta / length;
params.heightmap = this;
params.face = &face;
- // Quantize the ray begin/end.
- int begin_x = floor(local_begin.x);
- int begin_z = floor(local_begin.z);
- int end_x = floor(local_end.x);
- int end_z = floor(local_end.z);
+ _HeightmapGridCullState state;
- if ((begin_x == end_x) && (begin_z == end_z)) {
- // Simple case for rays that don't traverse the grid horizontally.
- // Just perform a test on the given cell.
- int x = CLAMP(begin_x, 0, width - 2);
- int z = CLAMP(begin_z, 0, depth - 2);
- if (_heightmap_cell_cull_segment(params, x, z)) {
- r_point = params.result;
- r_normal = params.normal;
- return true;
- }
- } else {
- // Perform grid query from projected ray.
- Vector2 ray_dir_proj(local_end.x - local_begin.x, local_end.z - local_begin.z);
- real_t ray_dist_proj = ray_dir_proj.length();
+ // Perform grid query from projected ray.
+ Vector2 ray_dir_flat(delta.x, delta.z);
+ state.length = length;
+ state.length_flat = ray_dir_flat.length();
- if (ray_dist_proj < CMP_EPSILON) {
- ray_dir_proj = Vector2();
- } else {
- ray_dir_proj /= ray_dist_proj;
- }
+ if (state.length_flat < CMP_EPSILON) {
+ ray_dir_flat = Vector2();
+ } else {
+ ray_dir_flat /= state.length_flat;
+ }
- const int x_step = (ray_dir_proj.x > CMP_EPSILON) ? 1 : ((ray_dir_proj.x < -CMP_EPSILON) ? -1 : 0);
- const int z_step = (ray_dir_proj.y > CMP_EPSILON) ? 1 : ((ray_dir_proj.y < -CMP_EPSILON) ? -1 : 0);
+ const int x_step = (ray_dir_flat.x > CMP_EPSILON) ? 1 : ((ray_dir_flat.x < -CMP_EPSILON) ? -1 : 0);
+ const int z_step = (ray_dir_flat.y > CMP_EPSILON) ? 1 : ((ray_dir_flat.y < -CMP_EPSILON) ? -1 : 0);
- const real_t infinite = 1e20;
- const real_t delta_x = (x_step != 0) ? 1.f / Math::abs(ray_dir_proj.x) : infinite;
- const real_t delta_z = (z_step != 0) ? 1.f / Math::abs(ray_dir_proj.y) : infinite;
+ const real_t infinite = 1e20;
+ const real_t delta_x = (x_step != 0) ? 1.f / Math::abs(ray_dir_flat.x) : infinite;
+ const real_t delta_z = (z_step != 0) ? 1.f / Math::abs(ray_dir_flat.y) : infinite;
- real_t cross_x; // At which value of `param` we will cross a x-axis lane?
- real_t cross_z; // At which value of `param` we will cross a z-axis lane?
+ real_t cross_x; // At which value of `param` we will cross a x-axis lane?
+ real_t cross_z; // At which value of `param` we will cross a z-axis lane?
- // X initialization.
- if (x_step != 0) {
- if (x_step == 1) {
- cross_x = (ceil(local_begin.x) - local_begin.x) * delta_x;
- } else {
- cross_x = (local_begin.x - floor(local_begin.x)) * delta_x;
- }
+ // X initialization.
+ if (x_step != 0) {
+ if (x_step == 1) {
+ cross_x = (Math::ceil(local_begin.x) - local_begin.x) * delta_x;
} else {
- cross_x = infinite; // Will never cross on X.
+ cross_x = (local_begin.x - Math::floor(local_begin.x)) * delta_x;
}
+ } else {
+ cross_x = infinite; // Will never cross on X.
+ }
- // Z initialization.
- if (z_step != 0) {
- if (z_step == 1) {
- cross_z = (ceil(local_begin.z) - local_begin.z) * delta_z;
- } else {
- cross_z = (local_begin.z - floor(local_begin.z)) * delta_z;
- }
+ // Z initialization.
+ if (z_step != 0) {
+ if (z_step == 1) {
+ cross_z = (Math::ceil(local_begin.z) - local_begin.z) * delta_z;
} else {
- cross_z = infinite; // Will never cross on Z.
+ cross_z = (local_begin.z - Math::floor(local_begin.z)) * delta_z;
}
+ } else {
+ cross_z = infinite; // Will never cross on Z.
+ }
- int x = floor(local_begin.x);
- int z = floor(local_begin.z);
+ int x = Math::floor(local_begin.x);
+ int z = Math::floor(local_begin.z);
- // Workaround cases where the ray starts at an integer position.
- if (Math::is_zero_approx(cross_x)) {
- cross_x += delta_x;
- // If going backwards, we should ignore the position we would get by the above flooring,
- // because the ray is not heading in that direction.
- if (x_step == -1) {
- x -= 1;
- }
+ // Workaround cases where the ray starts at an integer position.
+ if (Math::is_zero_approx(cross_x)) {
+ cross_x += delta_x;
+ // If going backwards, we should ignore the position we would get by the above flooring,
+ // because the ray is not heading in that direction.
+ if (x_step == -1) {
+ x -= 1;
}
+ }
- if (Math::is_zero_approx(cross_z)) {
- cross_z += delta_z;
- if (z_step == -1) {
- z -= 1;
- }
+ if (Math::is_zero_approx(cross_z)) {
+ cross_z += delta_z;
+ if (z_step == -1) {
+ z -= 1;
}
+ }
+
+ // Start inside the grid.
+ int x_start = MAX(MIN(x, p_width - 2), 0);
+ int z_start = MAX(MIN(z, p_depth - 2), 0);
- // Start inside the grid.
- int x_start = CLAMP(x, 0, width - 2);
- int z_start = CLAMP(z, 0, depth - 2);
+ // Adjust initial cross values.
+ cross_x += delta_x * x_step * (x_start - x);
+ cross_z += delta_z * z_step * (z_start - z);
- // Adjust initial cross values.
- cross_x += delta_x * x_step * (x_start - x);
- cross_z += delta_z * z_step * (z_start - z);
+ x = x_start;
+ z = z_start;
- x = x_start;
- z = z_start;
+ while (true) {
+ state.prev_dist = state.dist;
+ state.x = x;
+ state.z = z;
- if (_heightmap_cell_cull_segment(params, x, z)) {
+ if (cross_x < cross_z) {
+ // X lane.
+ x += x_step;
+ // Assign before advancing the param,
+ // to be in sync with the initialization step.
+ state.dist = cross_x;
+ cross_x += delta_x;
+ } else {
+ // Z lane.
+ z += z_step;
+ state.dist = cross_z;
+ cross_z += delta_z;
+ }
+
+ if (state.dist > state.length_flat) {
+ state.dist = state.length_flat;
+ if (p_process(params, state)) {
+ r_point = params.result;
+ r_normal = params.normal;
+ return true;
+ }
+ break;
+ }
+
+ if (p_process(params, state)) {
r_point = params.result;
r_normal = params.normal;
return true;
}
- real_t dist = 0.0;
- while (true) {
- if (cross_x < cross_z) {
- // X lane.
- x += x_step;
- // Assign before advancing the param,
- // to be in sync with the initialization step.
- dist = cross_x;
- cross_x += delta_x;
- } else {
- // Z lane.
- z += z_step;
- dist = cross_z;
- cross_z += delta_z;
- }
+ // Stop when outside the grid.
+ if ((x < 0) || (z < 0) || (x >= p_width - 1) || (z >= p_depth - 1)) {
+ break;
+ }
+ }
- // Stop when outside the grid.
- if ((x < 0) || (z < 0) || (x >= width - 1) || (z >= depth - 1)) {
- break;
- }
+ return false;
+}
- if (_heightmap_cell_cull_segment(params, x, z)) {
- r_point = params.result;
- r_normal = params.normal;
- return true;
- }
+bool HeightMapShape3DSW::intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_point, Vector3 &r_normal) const {
+ if (heights.is_empty()) {
+ return false;
+ }
- if (dist > ray_dist_proj) {
- break;
- }
+ Vector3 local_begin = p_begin + local_origin;
+ Vector3 local_end = p_end + local_origin;
+
+ // Quantize the ray begin/end.
+ int begin_x = Math::floor(local_begin.x);
+ int begin_z = Math::floor(local_begin.z);
+ int end_x = Math::floor(local_end.x);
+ int end_z = Math::floor(local_end.z);
+
+ if ((begin_x == end_x) && (begin_z == end_z)) {
+ // Simple case for rays that don't traverse the grid horizontally.
+ // Just perform a test on the given cell.
+ FaceShape3DSW face;
+ face.backface_collision = false;
+
+ _HeightmapSegmentCullParams params;
+ params.from = p_begin;
+ params.to = p_end;
+ params.dir = (p_end - p_begin).normalized();
+
+ params.heightmap = this;
+ params.face = &face;
+
+ _HeightmapGridCullState state;
+ state.x = MAX(MIN(begin_x, width - 2), 0);
+ state.z = MAX(MIN(begin_z, depth - 2), 0);
+ if (_heightmap_cell_cull_segment(params, state)) {
+ r_point = params.result;
+ r_normal = params.normal;
+ return true;
+ }
+ } else if (bounds_grid.is_empty()) {
+ // Process all cells intersecting the flat projection of the ray.
+ return _intersect_grid_segment(_heightmap_cell_cull_segment, p_begin, p_end, width, depth, local_origin, r_point, r_normal);
+ } else {
+ Vector3 ray_diff = (p_end - p_begin);
+ real_t length_flat_sqr = ray_diff.x * ray_diff.x + ray_diff.z * ray_diff.z;
+ if (length_flat_sqr < BOUNDS_CHUNK_SIZE * BOUNDS_CHUNK_SIZE) {
+ // Don't use chunks, the ray is too short in the plane.
+ return _intersect_grid_segment(_heightmap_cell_cull_segment, p_begin, p_end, width, depth, local_origin, r_point, r_normal);
+ } else {
+ // The ray is long, run raycast on a higher-level grid.
+ Vector3 bounds_from = p_begin / BOUNDS_CHUNK_SIZE;
+ Vector3 bounds_to = p_end / BOUNDS_CHUNK_SIZE;
+ Vector3 bounds_offset = local_origin / BOUNDS_CHUNK_SIZE;
+ return _intersect_grid_segment(_heightmap_chunk_cull_segment, bounds_from, bounds_to, bounds_grid_width, bounds_grid_depth, bounds_offset, r_point, r_normal);
}
}
@@ -1790,7 +1961,7 @@ void HeightMapShape3DSW::_get_cell(const Vector3 &p_point, int &r_x, int &r_y, i
r_z = (clamped_point.z < 0.0) ? (clamped_point.z - 0.5) : (clamped_point.z + 0.5);
}
-void HeightMapShape3DSW::cull(const AABB &p_local_aabb, Callback p_callback, void *p_userdata) const {
+void HeightMapShape3DSW::cull(const AABB &p_local_aabb, QueryCallback p_callback, void *p_userdata) const {
if (heights.is_empty()) {
return;
}
@@ -1825,14 +1996,18 @@ void HeightMapShape3DSW::cull(const AABB &p_local_aabb, Callback p_callback, voi
_get_point(x, z, face.vertex[0]);
_get_point(x + 1, z, face.vertex[1]);
_get_point(x, z + 1, face.vertex[2]);
- face.normal = Plane(face.vertex[0], face.vertex[2], face.vertex[1]).normal;
- p_callback(p_userdata, &face);
+ face.normal = Plane(face.vertex[0], face.vertex[1], face.vertex[2]).normal;
+ if (p_callback(p_userdata, &face)) {
+ return;
+ }
// Second triangle.
face.vertex[0] = face.vertex[1];
_get_point(x + 1, z + 1, face.vertex[1]);
- face.normal = Plane(face.vertex[0], face.vertex[2], face.vertex[1]).normal;
- p_callback(p_userdata, &face);
+ face.normal = Plane(face.vertex[0], face.vertex[1], face.vertex[2]).normal;
+ if (p_callback(p_userdata, &face)) {
+ return;
+ }
}
}
}
@@ -1847,6 +2022,75 @@ Vector3 HeightMapShape3DSW::get_moment_of_inertia(real_t p_mass) const {
(p_mass / 3.0) * (extents.x * extents.x + extents.y * extents.y));
}
+void HeightMapShape3DSW::_build_accelerator() {
+ bounds_grid.clear();
+
+ bounds_grid_width = width / BOUNDS_CHUNK_SIZE;
+ bounds_grid_depth = depth / BOUNDS_CHUNK_SIZE;
+
+ if (width % BOUNDS_CHUNK_SIZE > 0) {
+ ++bounds_grid_width; // In case terrain size isn't dividable by chunk size.
+ }
+
+ if (depth % BOUNDS_CHUNK_SIZE > 0) {
+ ++bounds_grid_depth;
+ }
+
+ uint32_t bound_grid_size = (uint32_t)(bounds_grid_width * bounds_grid_depth);
+
+ if (bound_grid_size < 2) {
+ // Grid is empty or just one chunk.
+ return;
+ }
+
+ bounds_grid.resize(bound_grid_size);
+
+ // Compute min and max height for all chunks.
+ for (int cz = 0; cz < bounds_grid_depth; ++cz) {
+ int z0 = cz * BOUNDS_CHUNK_SIZE;
+
+ for (int cx = 0; cx < bounds_grid_width; ++cx) {
+ int x0 = cx * BOUNDS_CHUNK_SIZE;
+
+ Range r;
+
+ r.min = _get_height(x0, z0);
+ r.max = r.min;
+
+ // Compute min and max height for this chunk.
+ // We have to include one extra cell to account for neighbors.
+ // Here is why:
+ // Say we have a flat terrain, and a plateau that fits a chunk perfectly.
+ //
+ // Left Right
+ // 0---0---0---1---1---1
+ // | | | | | |
+ // 0---0---0---1---1---1
+ // | | | | | |
+ // 0---0---0---1---1---1
+ // x
+ //
+ // If the AABB for the Left chunk did not share vertices with the Right,
+ // then we would fail collision tests at x due to a gap.
+ //
+ int z_max = MIN(z0 + BOUNDS_CHUNK_SIZE + 1, depth);
+ int x_max = MIN(x0 + BOUNDS_CHUNK_SIZE + 1, width);
+ for (int z = z0; z < z_max; ++z) {
+ for (int x = x0; x < x_max; ++x) {
+ real_t height = _get_height(x, z);
+ if (height < r.min) {
+ r.min = height;
+ } else if (height > r.max) {
+ r.max = height;
+ }
+ }
+ }
+
+ bounds_grid[cx + cz * bounds_grid_width] = r;
+ }
+ }
+}
+
void HeightMapShape3DSW::_setup(const Vector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height) {
heights = p_heights;
width = p_width;
@@ -1863,6 +2107,8 @@ void HeightMapShape3DSW::_setup(const Vector<real_t> &p_heights, int p_width, in
aabb.position -= local_origin;
+ _build_accelerator();
+
configure(aabb);
}
@@ -1921,7 +2167,7 @@ void HeightMapShape3DSW::set_data(const Variant &p_data) {
} else {
int heights_size = heights.size();
for (int i = 0; i < heights_size; ++i) {
- float h = heights[i];
+ real_t h = heights[i];
if (h < min_height) {
min_height = h;
} else if (h > max_height) {
diff --git a/servers/physics_3d/shape_3d_sw.h b/servers/physics_3d/shape_3d_sw.h
index c11c3a08f6..061d66a085 100644
--- a/servers/physics_3d/shape_3d_sw.h
+++ b/servers/physics_3d/shape_3d_sw.h
@@ -32,18 +32,8 @@
#define SHAPE_SW_H
#include "core/math/geometry_3d.h"
+#include "core/templates/local_vector.h"
#include "servers/physics_server_3d.h"
-/*
-
-SHAPE_LINE, ///< plane:"plane"
-SHAPE_SEGMENT, ///< real_t:"length"
-SHAPE_CIRCLE, ///< real_t:"radius"
-SHAPE_RECTANGLE, ///< vec3:"extents"
-SHAPE_CONVEX_POLYGON, ///< array of planes:"planes"
-SHAPE_CONCAVE_POLYGON, ///< Vector3 array:"triangles" , or Dictionary with "indices" (int array) and "triangles" (Vector3 array)
-SHAPE_CUSTOM, ///< Server-Implementation based custom shape, calling shape_create() with this value will result in an error
-
-*/
class Shape3DSW;
@@ -58,8 +48,8 @@ public:
class Shape3DSW {
RID self;
AABB aabb;
- bool configured;
- real_t custom_bias;
+ bool configured = false;
+ real_t custom_bias = 0.0;
Map<ShapeOwner3DSW *, int> owners;
@@ -105,22 +95,24 @@ public:
bool is_owner(ShapeOwner3DSW *p_owner) const;
const Map<ShapeOwner3DSW *, int> &get_owners() const;
- Shape3DSW();
+ Shape3DSW() {}
virtual ~Shape3DSW();
};
class ConcaveShape3DSW : public Shape3DSW {
public:
- virtual bool is_concave() const { return true; }
- typedef void (*Callback)(void *p_userdata, Shape3DSW *p_convex);
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const { r_amount = 0; }
+ virtual bool is_concave() const override { return true; }
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const override { r_amount = 0; }
- virtual void cull(const AABB &p_local_aabb, Callback p_callback, void *p_userdata) const = 0;
+ // Returns true to stop the query.
+ typedef bool (*QueryCallback)(void *p_userdata, Shape3DSW *p_convex);
+
+ virtual void cull(const AABB &p_local_aabb, QueryCallback p_callback, void *p_userdata) const = 0;
ConcaveShape3DSW() {}
};
-class PlaneShape3DSW : public Shape3DSW {
+class WorldBoundaryShape3DSW : public Shape3DSW {
Plane plane;
void _setup(const Plane &p_plane);
@@ -128,46 +120,74 @@ class PlaneShape3DSW : public Shape3DSW {
public:
Plane get_plane() const;
- virtual real_t get_area() const { return INFINITY; }
- virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_PLANE; }
- virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const;
- virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const { r_amount = 0; }
+ virtual real_t get_area() const override { return INFINITY; }
+ virtual PhysicsServer3D::ShapeType get_type() const override { return PhysicsServer3D::SHAPE_WORLD_BOUNDARY; }
+ virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const override;
+ virtual Vector3 get_support(const Vector3 &p_normal) const override;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const override { r_amount = 0; }
- virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
- virtual bool intersect_point(const Vector3 &p_point) const;
- virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
- virtual Vector3 get_moment_of_inertia(real_t p_mass) const;
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const override;
+ virtual bool intersect_point(const Vector3 &p_point) const override;
+ virtual Vector3 get_closest_point_to(const Vector3 &p_point) const override;
+ virtual Vector3 get_moment_of_inertia(real_t p_mass) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
- PlaneShape3DSW();
+ WorldBoundaryShape3DSW();
+};
+
+class SeparationRayShape3DSW : public Shape3DSW {
+ real_t length = 1.0;
+ bool slide_on_slope = false;
+
+ void _setup(real_t p_length, bool p_slide_on_slope);
+
+public:
+ real_t get_length() const;
+ bool get_slide_on_slope() const;
+
+ virtual real_t get_area() const override { return 0.0; }
+ virtual PhysicsServer3D::ShapeType get_type() const override { return PhysicsServer3D::SHAPE_SEPARATION_RAY; }
+ virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const override;
+ virtual Vector3 get_support(const Vector3 &p_normal) const override;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const override;
+
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const override;
+ virtual bool intersect_point(const Vector3 &p_point) const override;
+ virtual Vector3 get_closest_point_to(const Vector3 &p_point) const override;
+
+ virtual Vector3 get_moment_of_inertia(real_t p_mass) const override;
+
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
+
+ SeparationRayShape3DSW();
};
class SphereShape3DSW : public Shape3DSW {
- real_t radius;
+ real_t radius = 0.0;
void _setup(real_t p_radius);
public:
real_t get_radius() const;
- virtual real_t get_area() const { return 4.0 / 3.0 * Math_PI * radius * radius * radius; }
+ virtual real_t get_area() const override { return 4.0 / 3.0 * Math_PI * radius * radius * radius; }
- virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_SPHERE; }
+ virtual PhysicsServer3D::ShapeType get_type() const override { return PhysicsServer3D::SHAPE_SPHERE; }
- virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const;
- virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const;
- virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
- virtual bool intersect_point(const Vector3 &p_point) const;
- virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
+ virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const override;
+ virtual Vector3 get_support(const Vector3 &p_normal) const override;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const override;
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const override;
+ virtual bool intersect_point(const Vector3 &p_point) const override;
+ virtual Vector3 get_closest_point_to(const Vector3 &p_point) const override;
- virtual Vector3 get_moment_of_inertia(real_t p_mass) const;
+ virtual Vector3 get_moment_of_inertia(real_t p_mass) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
SphereShape3DSW();
};
@@ -178,28 +198,28 @@ class BoxShape3DSW : public Shape3DSW {
public:
_FORCE_INLINE_ Vector3 get_half_extents() const { return half_extents; }
- virtual real_t get_area() const { return 8 * half_extents.x * half_extents.y * half_extents.z; }
+ virtual real_t get_area() const override { return 8 * half_extents.x * half_extents.y * half_extents.z; }
- virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_BOX; }
+ virtual PhysicsServer3D::ShapeType get_type() const override { return PhysicsServer3D::SHAPE_BOX; }
- virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const;
- virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const;
- virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
- virtual bool intersect_point(const Vector3 &p_point) const;
- virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
+ virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const override;
+ virtual Vector3 get_support(const Vector3 &p_normal) const override;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const override;
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const override;
+ virtual bool intersect_point(const Vector3 &p_point) const override;
+ virtual Vector3 get_closest_point_to(const Vector3 &p_point) const override;
- virtual Vector3 get_moment_of_inertia(real_t p_mass) const;
+ virtual Vector3 get_moment_of_inertia(real_t p_mass) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
BoxShape3DSW();
};
class CapsuleShape3DSW : public Shape3DSW {
- real_t height;
- real_t radius;
+ real_t height = 0.0;
+ real_t radius = 0.0;
void _setup(real_t p_height, real_t p_radius);
@@ -207,28 +227,28 @@ public:
_FORCE_INLINE_ real_t get_height() const { return height; }
_FORCE_INLINE_ real_t get_radius() const { return radius; }
- virtual real_t get_area() const { return 4.0 / 3.0 * Math_PI * radius * radius * radius + (height - radius * 2.0) * Math_PI * radius * radius; }
+ virtual real_t get_area() const override { return 4.0 / 3.0 * Math_PI * radius * radius * radius + (height - radius * 2.0) * Math_PI * radius * radius; }
- virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_CAPSULE; }
+ virtual PhysicsServer3D::ShapeType get_type() const override { return PhysicsServer3D::SHAPE_CAPSULE; }
- virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const;
- virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const;
- virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
- virtual bool intersect_point(const Vector3 &p_point) const;
- virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
+ virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const override;
+ virtual Vector3 get_support(const Vector3 &p_normal) const override;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const override;
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const override;
+ virtual bool intersect_point(const Vector3 &p_point) const override;
+ virtual Vector3 get_closest_point_to(const Vector3 &p_point) const override;
- virtual Vector3 get_moment_of_inertia(real_t p_mass) const;
+ virtual Vector3 get_moment_of_inertia(real_t p_mass) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
CapsuleShape3DSW();
};
class CylinderShape3DSW : public Shape3DSW {
- real_t height;
- real_t radius;
+ real_t height = 0.0;
+ real_t radius = 0.0;
void _setup(real_t p_height, real_t p_radius);
@@ -236,21 +256,21 @@ public:
_FORCE_INLINE_ real_t get_height() const { return height; }
_FORCE_INLINE_ real_t get_radius() const { return radius; }
- virtual real_t get_area() const { return 4.0 / 3.0 * Math_PI * radius * radius * radius + height * Math_PI * radius * radius; }
+ virtual real_t get_area() const override { return 4.0 / 3.0 * Math_PI * radius * radius * radius + height * Math_PI * radius * radius; }
- virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_CYLINDER; }
+ virtual PhysicsServer3D::ShapeType get_type() const override { return PhysicsServer3D::SHAPE_CYLINDER; }
- virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const;
- virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const;
- virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
- virtual bool intersect_point(const Vector3 &p_point) const;
- virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
+ virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const override;
+ virtual Vector3 get_support(const Vector3 &p_normal) const override;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const override;
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const override;
+ virtual bool intersect_point(const Vector3 &p_point) const override;
+ virtual Vector3 get_closest_point_to(const Vector3 &p_point) const override;
- virtual Vector3 get_moment_of_inertia(real_t p_mass) const;
+ virtual Vector3 get_moment_of_inertia(real_t p_mass) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
CylinderShape3DSW();
};
@@ -263,19 +283,19 @@ struct ConvexPolygonShape3DSW : public Shape3DSW {
public:
const Geometry3D::MeshData &get_mesh() const { return mesh; }
- virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_CONVEX_POLYGON; }
+ virtual PhysicsServer3D::ShapeType get_type() const override { return PhysicsServer3D::SHAPE_CONVEX_POLYGON; }
- virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const;
- virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const;
- virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
- virtual bool intersect_point(const Vector3 &p_point) const;
- virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
+ virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const override;
+ virtual Vector3 get_support(const Vector3 &p_normal) const override;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const override;
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const override;
+ virtual bool intersect_point(const Vector3 &p_point) const override;
+ virtual Vector3 get_closest_point_to(const Vector3 &p_point) const override;
- virtual Vector3 get_moment_of_inertia(real_t p_mass) const;
+ virtual Vector3 get_moment_of_inertia(real_t p_mass) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
ConvexPolygonShape3DSW();
};
@@ -288,7 +308,7 @@ struct ConcavePolygonShape3DSW : public ConcaveShape3DSW {
struct Face {
Vector3 normal;
- int indices[3];
+ int indices[3] = {};
};
Vector<Face> faces;
@@ -296,17 +316,17 @@ struct ConcavePolygonShape3DSW : public ConcaveShape3DSW {
struct BVH {
AABB aabb;
- int left;
- int right;
+ int left = 0;
+ int right = 0;
- int face_index;
+ int face_index = 0;
};
Vector<BVH> bvh;
struct _CullParams {
AABB aabb;
- Callback callback = nullptr;
+ QueryCallback callback = nullptr;
void *userdata = nullptr;
const Face *faces = nullptr;
const Vector3 *vertices = nullptr;
@@ -332,7 +352,7 @@ struct ConcavePolygonShape3DSW : public ConcaveShape3DSW {
bool backface_collision = false;
void _cull_segment(int p_idx, _SegmentCullParams *p_params) const;
- void _cull(int p_idx, _CullParams *p_params) const;
+ bool _cull(int p_idx, _CullParams *p_params) const;
void _fill_bvh(_VolumeSW_BVH *p_bvh_tree, BVH *p_bvh_array, int &p_idx);
@@ -341,21 +361,21 @@ struct ConcavePolygonShape3DSW : public ConcaveShape3DSW {
public:
Vector<Vector3> get_faces() const;
- virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_CONCAVE_POLYGON; }
+ virtual PhysicsServer3D::ShapeType get_type() const override { return PhysicsServer3D::SHAPE_CONCAVE_POLYGON; }
- virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const;
- virtual Vector3 get_support(const Vector3 &p_normal) const;
+ virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const override;
+ virtual Vector3 get_support(const Vector3 &p_normal) const override;
- virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
- virtual bool intersect_point(const Vector3 &p_point) const;
- virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const override;
+ virtual bool intersect_point(const Vector3 &p_point) const override;
+ virtual Vector3 get_closest_point_to(const Vector3 &p_point) const override;
- virtual void cull(const AABB &p_local_aabb, Callback p_callback, void *p_userdata) const;
+ virtual void cull(const AABB &p_local_aabb, QueryCallback p_callback, void *p_userdata) const override;
- virtual Vector3 get_moment_of_inertia(real_t p_mass) const;
+ virtual Vector3 get_moment_of_inertia(real_t p_mass) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
ConcavePolygonShape3DSW();
};
@@ -366,6 +386,21 @@ struct HeightMapShape3DSW : public ConcaveShape3DSW {
int depth = 0;
Vector3 local_origin;
+ // Accelerator.
+ struct Range {
+ real_t min = 0.0;
+ real_t max = 0.0;
+ };
+ LocalVector<Range> bounds_grid;
+ int bounds_grid_width = 0;
+ int bounds_grid_depth = 0;
+
+ static const int BOUNDS_CHUNK_SIZE = 16;
+
+ _FORCE_INLINE_ const Range &_get_bounds_chunk(int p_x, int p_z) const {
+ return bounds_grid[(p_z * bounds_grid_width) + p_x];
+ }
+
_FORCE_INLINE_ real_t _get_height(int p_x, int p_z) const {
return heights[(p_z * width) + p_x];
}
@@ -378,6 +413,11 @@ struct HeightMapShape3DSW : public ConcaveShape3DSW {
void _get_cell(const Vector3 &p_point, int &r_x, int &r_y, int &r_z) const;
+ void _build_accelerator();
+
+ template <typename ProcessFunction>
+ bool _intersect_grid_segment(ProcessFunction &p_process, const Vector3 &p_begin, const Vector3 &p_end, int p_width, int p_depth, const Vector3 &offset, Vector3 &r_point, Vector3 &r_normal) const;
+
void _setup(const Vector<real_t> &p_heights, int p_width, int p_depth, real_t p_min_height, real_t p_max_height);
public:
@@ -385,20 +425,20 @@ public:
int get_width() const;
int get_depth() const;
- virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_HEIGHTMAP; }
+ virtual PhysicsServer3D::ShapeType get_type() const override { return PhysicsServer3D::SHAPE_HEIGHTMAP; }
- virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const;
- virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_point, Vector3 &r_normal) const;
- virtual bool intersect_point(const Vector3 &p_point) const;
+ virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const override;
+ virtual Vector3 get_support(const Vector3 &p_normal) const override;
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_point, Vector3 &r_normal) const override;
+ virtual bool intersect_point(const Vector3 &p_point) const override;
- virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
- virtual void cull(const AABB &p_local_aabb, Callback p_callback, void *p_userdata) const;
+ virtual Vector3 get_closest_point_to(const Vector3 &p_point) const override;
+ virtual void cull(const AABB &p_local_aabb, QueryCallback p_callback, void *p_userdata) const override;
- virtual Vector3 get_moment_of_inertia(real_t p_mass) const;
+ virtual Vector3 get_moment_of_inertia(real_t p_mass) const override;
- virtual void set_data(const Variant &p_data);
- virtual Variant get_data() const;
+ virtual void set_data(const Variant &p_data) override;
+ virtual Variant get_data() const override;
HeightMapShape3DSW();
};
@@ -409,32 +449,32 @@ struct FaceShape3DSW : public Shape3DSW {
Vector3 vertex[3];
bool backface_collision = false;
- virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_CONCAVE_POLYGON; }
+ virtual PhysicsServer3D::ShapeType get_type() const override { return PhysicsServer3D::SHAPE_CONCAVE_POLYGON; }
const Vector3 &get_vertex(int p_idx) const { return vertex[p_idx]; }
- void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const;
- Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const;
- bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
- virtual bool intersect_point(const Vector3 &p_point) const;
- virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
+ virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const override;
+ virtual Vector3 get_support(const Vector3 &p_normal) const override;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const override;
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const override;
+ virtual bool intersect_point(const Vector3 &p_point) const override;
+ virtual Vector3 get_closest_point_to(const Vector3 &p_point) const override;
- Vector3 get_moment_of_inertia(real_t p_mass) const;
+ virtual Vector3 get_moment_of_inertia(real_t p_mass) const override;
- virtual void set_data(const Variant &p_data) {}
- virtual Variant get_data() const { return Variant(); }
+ virtual void set_data(const Variant &p_data) override {}
+ virtual Variant get_data() const override { return Variant(); }
FaceShape3DSW();
};
struct MotionShape3DSW : public Shape3DSW {
- Shape3DSW *shape;
+ Shape3DSW *shape = nullptr;
Vector3 motion;
- virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_CONVEX_POLYGON; }
+ virtual PhysicsServer3D::ShapeType get_type() const override { return PhysicsServer3D::SHAPE_CONVEX_POLYGON; }
- void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const {
+ virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const override {
Vector3 cast = p_transform.basis.xform(motion);
real_t mina, maxa;
real_t minb, maxb;
@@ -446,22 +486,23 @@ struct MotionShape3DSW : public Shape3DSW {
r_max = MAX(maxa, maxb);
}
- Vector3 get_support(const Vector3 &p_normal) const {
+ virtual Vector3 get_support(const Vector3 &p_normal) const override {
Vector3 support = shape->get_support(p_normal);
if (p_normal.dot(motion) > 0) {
support += motion;
}
return support;
}
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const { r_amount = 0; }
- bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const { return false; }
- virtual bool intersect_point(const Vector3 &p_point) const { return false; }
- virtual Vector3 get_closest_point_to(const Vector3 &p_point) const { return p_point; }
- Vector3 get_moment_of_inertia(real_t p_mass) const { return Vector3(); }
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const override { r_amount = 0; }
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const override { return false; }
+ virtual bool intersect_point(const Vector3 &p_point) const override { return false; }
+ virtual Vector3 get_closest_point_to(const Vector3 &p_point) const override { return p_point; }
+
+ virtual Vector3 get_moment_of_inertia(real_t p_mass) const override { return Vector3(); }
- virtual void set_data(const Variant &p_data) {}
- virtual Variant get_data() const { return Variant(); }
+ virtual void set_data(const Variant &p_data) override {}
+ virtual Variant get_data() const override { return Variant(); }
MotionShape3DSW() { configure(AABB()); }
};
diff --git a/servers/physics_3d/soft_body_3d_sw.cpp b/servers/physics_3d/soft_body_3d_sw.cpp
index 73b81444e1..752d5f3a91 100644
--- a/servers/physics_3d/soft_body_3d_sw.cpp
+++ b/servers/physics_3d/soft_body_3d_sw.cpp
@@ -165,7 +165,7 @@ void SoftBody3DSW::update_rendering_server(RenderingServerHandler *p_rendering_s
p_rendering_server_handler->set_aabb(bounds);
}
-void SoftBody3DSW::update_normals() {
+void SoftBody3DSW::update_normals_and_centroids() {
uint32_t i, ni;
for (i = 0, ni = nodes.size(); i < ni; ++i) {
@@ -180,6 +180,7 @@ void SoftBody3DSW::update_normals() {
face.n[2]->n += n;
face.normal = n;
face.normal.normalize();
+ face.centroid = 0.33333333333 * (face.n[0]->x + face.n[1]->x + face.n[2]->x);
}
for (i = 0, ni = nodes.size(); i < ni; ++i) {
@@ -248,8 +249,10 @@ void SoftBody3DSW::update_area() {
// Node area.
LocalVector<int> counts;
- counts.resize(nodes.size());
- memset(counts.ptr(), 0, counts.size() * sizeof(int));
+ if (nodes.size() > 0) {
+ counts.resize(nodes.size());
+ memset(counts.ptr(), 0, counts.size() * sizeof(int));
+ }
for (i = 0, ni = nodes.size(); i < ni; ++i) {
nodes[i].area = 0.0;
@@ -310,7 +313,7 @@ void SoftBody3DSW::apply_nodes_transform(const Transform3D &p_transform) {
face_tree.clear();
- update_normals();
+ update_normals_and_centroids();
update_bounds();
update_constants();
}
@@ -574,7 +577,7 @@ bool SoftBody3DSW::create_from_trimesh(const Vector<int> &p_indices, const Vecto
reoptimize_link_order();
update_constants();
- update_normals();
+ update_normals_and_centroids();
update_bounds();
return true;
@@ -898,47 +901,86 @@ void SoftBody3DSW::add_velocity(const Vector3 &p_velocity) {
}
}
-void SoftBody3DSW::apply_forces() {
- if (pressure_coefficient < CMP_EPSILON) {
- return;
- }
+void SoftBody3DSW::apply_forces(bool p_has_wind_forces) {
+ int ac = areas.size();
if (nodes.is_empty()) {
return;
}
uint32_t i, ni;
+ int32_t j;
- // Calculate volume.
real_t volume = 0.0;
const Vector3 &org = nodes[0].x;
+
+ // Iterate over faces (try not to iterate elsewhere if possible).
for (i = 0, ni = faces.size(); i < ni; ++i) {
+ bool stopped = false;
const Face &face = faces[i];
+
+ Vector3 wind_force(0, 0, 0);
+
+ // Compute volume.
volume += vec3_dot(face.n[0]->x - org, vec3_cross(face.n[1]->x - org, face.n[2]->x - org));
+
+ // Compute nodal forces from area winds.
+ if (ac && p_has_wind_forces) {
+ const AreaCMP *aa = &areas[0];
+ for (j = ac - 1; j >= 0 && !stopped; j--) {
+ PhysicsServer3D::AreaSpaceOverrideMode mode = aa[j].area->get_space_override_mode();
+ switch (mode) {
+ case PhysicsServer3D::AREA_SPACE_OVERRIDE_COMBINE:
+ case PhysicsServer3D::AREA_SPACE_OVERRIDE_COMBINE_REPLACE: {
+ wind_force += _compute_area_windforce(aa[j].area, &face);
+ stopped = mode == PhysicsServer3D::AREA_SPACE_OVERRIDE_COMBINE_REPLACE;
+ } break;
+ case PhysicsServer3D::AREA_SPACE_OVERRIDE_REPLACE:
+ case PhysicsServer3D::AREA_SPACE_OVERRIDE_REPLACE_COMBINE: {
+ wind_force = _compute_area_windforce(aa[j].area, &face);
+ stopped = mode == PhysicsServer3D::AREA_SPACE_OVERRIDE_REPLACE;
+ } break;
+ default: {
+ }
+ }
+ }
+
+ for (j = 0; j < 3; j++) {
+ Node *current_node = face.n[j];
+ current_node->f += wind_force;
+ }
+ }
}
volume /= 6.0;
- // Apply per node forces.
- real_t ivolumetp = 1.0 / Math::abs(volume) * pressure_coefficient;
- for (i = 0, ni = nodes.size(); i < ni; ++i) {
- Node &node = nodes[i];
- if (node.im > 0) {
- node.f += node.n * (node.area * ivolumetp);
+ // Apply nodal pressure forces.
+ if (pressure_coefficient > CMP_EPSILON) {
+ real_t ivolumetp = 1.0 / Math::abs(volume) * pressure_coefficient;
+ for (i = 0, ni = nodes.size(); i < ni; ++i) {
+ Node &node = nodes[i];
+ if (node.im > 0) {
+ node.f += node.n * (node.area * ivolumetp);
+ }
}
}
}
void SoftBody3DSW::_compute_area_gravity(const Area3DSW *p_area) {
- if (p_area->is_gravity_point()) {
- if (p_area->get_gravity_distance_scale() > 0) {
- Vector3 v = p_area->get_transform().xform(p_area->get_gravity_vector()) - get_transform().get_origin();
- gravity += v.normalized() * (p_area->get_gravity() / Math::pow(v.length() * p_area->get_gravity_distance_scale() + 1, 2));
- } else {
- gravity += (p_area->get_transform().xform(p_area->get_gravity_vector()) - get_transform().get_origin()).normalized() * p_area->get_gravity();
- }
- } else {
- gravity += p_area->get_gravity_vector() * p_area->get_gravity();
- }
+ Vector3 area_gravity;
+ p_area->compute_gravity(get_transform().get_origin(), area_gravity);
+ gravity += area_gravity;
+}
+
+Vector3 SoftBody3DSW::_compute_area_windforce(const Area3DSW *p_area, const Face *p_face) {
+ real_t wfm = p_area->get_wind_force_magnitude();
+ real_t waf = p_area->get_wind_attenuation_factor();
+ const Vector3 &wd = p_area->get_wind_direction();
+ const Vector3 &ws = p_area->get_wind_source();
+ real_t projection_on_tri_normal = vec3_dot(p_face->normal, wd);
+ real_t projection_toward_centroid = vec3_dot(p_face->centroid - ws, wd);
+ real_t attenuation_over_distance = pow(projection_toward_centroid, -waf);
+ real_t nodal_force_magnitude = wfm * 0.33333333333 * p_face->ra * projection_on_tri_normal * attenuation_over_distance;
+ return nodal_force_magnitude * p_face->normal;
}
void SoftBody3DSW::predict_motion(real_t p_delta) {
@@ -952,11 +994,15 @@ void SoftBody3DSW::predict_motion(real_t p_delta) {
int ac = areas.size();
bool stopped = false;
+ bool has_wind_forces = false;
if (ac) {
areas.sort();
const AreaCMP *aa = &areas[0];
for (int i = ac - 1; i >= 0 && !stopped; i--) {
+ // Avoids unnecessary loop in apply_forces().
+ has_wind_forces = has_wind_forces || aa[i].area->get_wind_force_magnitude() > CMP_EPSILON;
+
PhysicsServer3D::AreaSpaceOverrideMode mode = aa[i].area->get_space_override_mode();
switch (mode) {
case PhysicsServer3D::AREA_SPACE_OVERRIDE_COMBINE:
@@ -978,7 +1024,9 @@ void SoftBody3DSW::predict_motion(real_t p_delta) {
// Apply forces.
add_velocity(gravity * p_delta);
- apply_forces();
+ if (pressure_coefficient > CMP_EPSILON || has_wind_forces) {
+ apply_forces(has_wind_forces);
+ }
// Avoid soft body from 'exploding' so use some upper threshold of maximum motion
// that a node can travel per frame.
@@ -1057,7 +1105,7 @@ void SoftBody3DSW::solve_constraints(real_t p_delta) {
node.q = node.x;
}
- update_normals();
+ update_normals_and_centroids();
}
void SoftBody3DSW::solve_links(real_t kst, real_t ti) {
diff --git a/servers/physics_3d/soft_body_3d_sw.h b/servers/physics_3d/soft_body_3d_sw.h
index be0620c506..58fd234fde 100644
--- a/servers/physics_3d/soft_body_3d_sw.h
+++ b/servers/physics_3d/soft_body_3d_sw.h
@@ -71,6 +71,7 @@ class SoftBody3DSW : public CollisionObject3DSW {
};
struct Face {
+ Vector3 centroid;
Node *n[3] = { nullptr, nullptr, nullptr }; // Node pointers
Vector3 normal; // Normal
real_t ra = 0.0; // Rest area
@@ -114,6 +115,7 @@ class SoftBody3DSW : public CollisionObject3DSW {
uint64_t island_step = 0;
_FORCE_INLINE_ void _compute_area_gravity(const Area3DSW *p_area);
+ _FORCE_INLINE_ Vector3 _compute_area_windforce(const Area3DSW *p_area, const Face *p_face);
public:
SoftBody3DSW();
@@ -220,7 +222,7 @@ protected:
virtual void _shapes_changed();
private:
- void update_normals();
+ void update_normals_and_centroids();
void update_bounds();
void update_constants();
void update_area();
@@ -231,7 +233,7 @@ private:
void add_velocity(const Vector3 &p_velocity);
- void apply_forces();
+ void apply_forces(bool p_has_wind_forces);
bool create_from_trimesh(const Vector<int> &p_indices, const Vector<Vector3> &p_vertices);
void generate_bending_constraints(int p_distance);
diff --git a/servers/physics_3d/space_3d_sw.cpp b/servers/physics_3d/space_3d_sw.cpp
index f9e55ad525..3718babbd6 100644
--- a/servers/physics_3d/space_3d_sw.cpp
+++ b/servers/physics_3d/space_3d_sw.cpp
@@ -34,6 +34,8 @@
#include "core/config/project_settings.h"
#include "physics_server_3d_sw.h"
+#define TEST_MOTION_MIN_CONTACT_DEPTH_FACTOR 0.05
+
_FORCE_INLINE_ static bool _can_collide_with(CollisionObject3DSW *p_object, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
if (!(p_object->get_collision_layer() & p_collision_mask)) {
return false;
@@ -185,7 +187,7 @@ int PhysicsDirectSpaceState3DSW::intersect_shape(const RID &p_shape, const Trans
return 0;
}
- Shape3DSW *shape = PhysicsServer3DSW::singletonsw->shape_owner.getornull(p_shape);
+ Shape3DSW *shape = PhysicsServer3DSW::singletonsw->shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, 0);
AABB aabb = p_xform.xform(shape->get_aabb());
@@ -236,7 +238,7 @@ int PhysicsDirectSpaceState3DSW::intersect_shape(const RID &p_shape, const Trans
}
bool PhysicsDirectSpaceState3DSW::cast_motion(const RID &p_shape, const Transform3D &p_xform, const Vector3 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, ShapeRestInfo *r_info) {
- Shape3DSW *shape = PhysicsServer3DSW::singletonsw->shape_owner.getornull(p_shape);
+ Shape3DSW *shape = PhysicsServer3DSW::singletonsw->shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, false);
AABB aabb = p_xform.xform(shape->get_aabb());
@@ -359,7 +361,7 @@ bool PhysicsDirectSpaceState3DSW::collide_shape(RID p_shape, const Transform3D &
return false;
}
- Shape3DSW *shape = PhysicsServer3DSW::singletonsw->shape_owner.getornull(p_shape);
+ Shape3DSW *shape = PhysicsServer3DSW::singletonsw->shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, 0);
AABB aabb = p_shape_xform.xform(shape->get_aabb());
@@ -401,17 +403,27 @@ bool PhysicsDirectSpaceState3DSW::collide_shape(RID p_shape, const Transform3D &
return collided;
}
+struct _RestResultData {
+ const CollisionObject3DSW *object = nullptr;
+ int local_shape = 0;
+ int shape = 0;
+ Vector3 contact;
+ Vector3 normal;
+ real_t len = 0.0;
+};
+
struct _RestCallbackData {
- const CollisionObject3DSW *object;
- const CollisionObject3DSW *best_object;
- int local_shape;
- int best_local_shape;
- int shape;
- int best_shape;
- Vector3 best_contact;
- Vector3 best_normal;
- real_t best_len;
- real_t min_allowed_depth;
+ const CollisionObject3DSW *object = nullptr;
+ int local_shape = 0;
+ int shape = 0;
+
+ real_t min_allowed_depth = 0.0;
+
+ _RestResultData best_result;
+
+ int max_results = 0;
+ int result_count = 0;
+ _RestResultData *other_results = nullptr;
};
static void _rest_cbk_result(const Vector3 &p_point_A, int p_index_A, const Vector3 &p_point_B, int p_index_B, void *p_userdata) {
@@ -422,32 +434,71 @@ static void _rest_cbk_result(const Vector3 &p_point_A, int p_index_A, const Vect
if (len < rd->min_allowed_depth) {
return;
}
- if (len <= rd->best_len) {
+
+ bool is_best_result = (len > rd->best_result.len);
+
+ if (rd->other_results && rd->result_count > 0) {
+ // Consider as new result by default.
+ int prev_result_count = rd->result_count++;
+
+ int result_index = 0;
+ real_t tested_len = is_best_result ? rd->best_result.len : len;
+ for (; result_index < prev_result_count - 1; ++result_index) {
+ if (tested_len > rd->other_results[result_index].len) {
+ // Re-using a previous result.
+ rd->result_count--;
+ break;
+ }
+ }
+
+ if (result_index < rd->max_results - 1) {
+ _RestResultData &result = rd->other_results[result_index];
+
+ if (is_best_result) {
+ // Keep the previous best result as separate result.
+ result = rd->best_result;
+ } else {
+ // Keep this result as separate result.
+ result.len = len;
+ result.contact = p_point_B;
+ result.normal = contact_rel / len;
+ result.object = rd->object;
+ result.shape = rd->shape;
+ result.local_shape = rd->local_shape;
+ }
+ } else {
+ // Discarding this result.
+ rd->result_count--;
+ }
+ } else if (is_best_result) {
+ rd->result_count = 1;
+ }
+
+ if (!is_best_result) {
return;
}
- rd->best_len = len;
- rd->best_contact = p_point_B;
- rd->best_normal = contact_rel / len;
- rd->best_object = rd->object;
- rd->best_shape = rd->shape;
- rd->best_local_shape = rd->local_shape;
+ rd->best_result.len = len;
+ rd->best_result.contact = p_point_B;
+ rd->best_result.normal = contact_rel / len;
+ rd->best_result.object = rd->object;
+ rd->best_result.shape = rd->shape;
+ rd->best_result.local_shape = rd->local_shape;
}
bool PhysicsDirectSpaceState3DSW::rest_info(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
- Shape3DSW *shape = PhysicsServer3DSW::singletonsw->shape_owner.getornull(p_shape);
+ Shape3DSW *shape = PhysicsServer3DSW::singletonsw->shape_owner.get_or_null(p_shape);
ERR_FAIL_COND_V(!shape, 0);
+ real_t min_contact_depth = p_margin * TEST_MOTION_MIN_CONTACT_DEPTH_FACTOR;
+
AABB aabb = p_shape_xform.xform(shape->get_aabb());
aabb = aabb.grow(p_margin);
int amount = space->broadphase->cull_aabb(aabb, space->intersection_query_results, Space3DSW::INTERSECTION_QUERY_MAX, space->intersection_query_subindex_results);
_RestCallbackData rcd;
- rcd.best_len = 0;
- rcd.best_object = nullptr;
- rcd.best_shape = 0;
- rcd.min_allowed_depth = space->test_motion_min_contact_depth;
+ rcd.min_allowed_depth = min_contact_depth;
for (int i = 0; i < amount; i++) {
if (!_can_collide_with(space->intersection_query_results[i], p_collision_mask, p_collide_with_bodies, p_collide_with_areas)) {
@@ -470,18 +521,18 @@ bool PhysicsDirectSpaceState3DSW::rest_info(RID p_shape, const Transform3D &p_sh
}
}
- if (rcd.best_len == 0 || !rcd.best_object) {
+ if (rcd.best_result.len == 0 || !rcd.best_result.object) {
return false;
}
- r_info->collider_id = rcd.best_object->get_instance_id();
- r_info->shape = rcd.best_shape;
- r_info->normal = rcd.best_normal;
- r_info->point = rcd.best_contact;
- r_info->rid = rcd.best_object->get_self();
- if (rcd.best_object->get_type() == CollisionObject3DSW::TYPE_BODY) {
- const Body3DSW *body = static_cast<const Body3DSW *>(rcd.best_object);
- Vector3 rel_vec = rcd.best_contact - (body->get_transform().origin + body->get_center_of_mass());
+ r_info->collider_id = rcd.best_result.object->get_instance_id();
+ r_info->shape = rcd.best_result.shape;
+ r_info->normal = rcd.best_result.normal;
+ r_info->point = rcd.best_result.contact;
+ r_info->rid = rcd.best_result.object->get_self();
+ if (rcd.best_result.object->get_type() == CollisionObject3DSW::TYPE_BODY) {
+ const Body3DSW *body = static_cast<const Body3DSW *>(rcd.best_result.object);
+ Vector3 rel_vec = rcd.best_result.contact - (body->get_transform().origin + body->get_center_of_mass());
r_info->linear_velocity = body->get_linear_velocity() + (body->get_angular_velocity()).cross(rel_vec);
} else {
@@ -492,9 +543,9 @@ bool PhysicsDirectSpaceState3DSW::rest_info(RID p_shape, const Transform3D &p_sh
}
Vector3 PhysicsDirectSpaceState3DSW::get_closest_point_to_object_volume(RID p_object, const Vector3 p_point) const {
- CollisionObject3DSW *obj = PhysicsServer3DSW::singletonsw->area_owner.getornull(p_object);
+ CollisionObject3DSW *obj = PhysicsServer3DSW::singletonsw->area_owner.get_or_null(p_object);
if (!obj) {
- obj = PhysicsServer3DSW::singletonsw->body_owner.getornull(p_object);
+ obj = PhysicsServer3DSW::singletonsw->body_owner.get_or_null(p_object);
}
ERR_FAIL_COND_V(!obj, Vector3());
@@ -569,7 +620,7 @@ int Space3DSW::_cull_aabb_for_body(Body3DSW *p_body, const AABB &p_aabb) {
return amount;
}
-bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin, PhysicsServer3D::MotionResult *r_result, const Set<RID> &p_exclude) {
+bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin, PhysicsServer3D::MotionResult *r_result, int p_max_collisions, bool p_collide_separation_ray, const Set<RID> &p_exclude) {
//give me back regular physics engine logic
//this is madness
//and most people using this function will think
@@ -577,10 +628,12 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform3D &p_from, co
//this took about a week to get right..
//but is it right? who knows at this point..
+ ERR_FAIL_INDEX_V(p_max_collisions, PhysicsServer3D::MotionResult::MAX_COLLISIONS, false);
+
if (r_result) {
- r_result->collider_id = ObjectID();
- r_result->collider_shape = 0;
+ *r_result = PhysicsServer3D::MotionResult();
}
+
AABB body_aabb;
bool shapes_found = false;
@@ -599,7 +652,6 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform3D &p_from, co
if (!shapes_found) {
if (r_result) {
- *r_result = PhysicsServer3D::MotionResult();
r_result->travel = p_motion;
}
@@ -610,6 +662,8 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform3D &p_from, co
body_aabb = p_from.xform(p_body->get_inv_transform().xform(body_aabb));
body_aabb = body_aabb.grow(p_margin);
+ real_t min_contact_depth = p_margin * TEST_MOTION_MIN_CONTACT_DEPTH_FACTOR;
+
real_t motion_length = p_motion.length();
Vector3 motion_normal = p_motion / motion_length;
@@ -663,8 +717,9 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform3D &p_from, co
break;
}
- Vector3 recover_motion;
+ recovered = true;
+ Vector3 recover_motion;
for (int i = 0; i < cbk.amount; i++) {
Vector3 a = sr[i * 2 + 0];
Vector3 b = sr[i * 2 + 1];
@@ -675,9 +730,9 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform3D &p_from, co
// Compute depth on recovered motion.
real_t depth = n.dot(a + recover_motion) - d;
- if (depth > 0.0) {
+ if (depth > min_contact_depth + CMP_EPSILON) {
// Only recover if there is penetration.
- recover_motion -= n * depth * 0.4;
+ recover_motion -= n * (depth - min_contact_depth) * 0.4;
}
}
@@ -686,8 +741,6 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform3D &p_from, co
break;
}
- recovered = true;
-
body_transform.origin += recover_motion;
body_aabb.position += recover_motion;
@@ -714,9 +767,19 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform3D &p_from, co
continue;
}
- Transform3D body_shape_xform = body_transform * p_body->get_shape_transform(j);
Shape3DSW *body_shape = p_body->get_shape(j);
+ // Colliding separation rays allows to properly snap to the ground,
+ // otherwise it's not needed in regular motion.
+ if (!p_collide_separation_ray && (body_shape->get_type() == PhysicsServer3D::SHAPE_SEPARATION_RAY)) {
+ // When slide on slope is on, separation ray shape acts like a regular shape.
+ if (!static_cast<SeparationRayShape3DSW *>(body_shape)->get_slide_on_slope()) {
+ continue;
+ }
+ }
+
+ Transform3D body_shape_xform = body_transform * p_body->get_shape_transform(j);
+
Transform3D body_shape_xform_inv = body_shape_xform.affine_inverse();
MotionShape3DSW mshape;
mshape.shape = body_shape;
@@ -822,13 +885,16 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform3D &p_from, co
Transform3D ugt = body_transform;
ugt.origin += p_motion * unsafe;
+ _RestResultData results[PhysicsServer3D::MotionResult::MAX_COLLISIONS];
+
_RestCallbackData rcd;
- rcd.best_len = 0;
- rcd.best_object = nullptr;
- rcd.best_shape = 0;
+ if (p_max_collisions > 1) {
+ rcd.max_results = p_max_collisions;
+ rcd.other_results = results;
+ }
// Allowed depth can't be lower than motion length, in order to handle contacts at low speed.
- rcd.min_allowed_depth = MIN(motion_length, test_motion_min_contact_depth);
+ rcd.min_allowed_depth = MIN(motion_length, min_contact_depth);
int from_shape = best_shape != -1 ? best_shape : 0;
int to_shape = best_shape != -1 ? best_shape + 1 : p_body->get_shape_count();
@@ -861,27 +927,36 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform3D &p_from, co
}
}
- if (rcd.best_len != 0) {
+ if (rcd.result_count > 0) {
if (r_result) {
- r_result->collider = rcd.best_object->get_self();
- r_result->collider_id = rcd.best_object->get_instance_id();
- r_result->collider_shape = rcd.best_shape;
- r_result->collision_local_shape = rcd.best_local_shape;
- r_result->collision_normal = rcd.best_normal;
- r_result->collision_point = rcd.best_contact;
- r_result->collision_depth = rcd.best_len;
- r_result->collision_safe_fraction = safe;
- r_result->collision_unsafe_fraction = unsafe;
- //r_result->collider_metadata = rcd.best_object->get_shape_metadata(rcd.best_shape);
-
- const Body3DSW *body = static_cast<const Body3DSW *>(rcd.best_object);
-
- Vector3 rel_vec = rcd.best_contact - (body->get_transform().origin + body->get_center_of_mass());
- r_result->collider_velocity = body->get_linear_velocity() + (body->get_angular_velocity()).cross(rel_vec);
+ for (int collision_index = 0; collision_index < rcd.result_count; ++collision_index) {
+ const _RestResultData &result = (collision_index > 0) ? rcd.other_results[collision_index - 1] : rcd.best_result;
+
+ PhysicsServer3D::MotionCollision &collision = r_result->collisions[collision_index];
+
+ collision.collider = result.object->get_self();
+ collision.collider_id = result.object->get_instance_id();
+ collision.collider_shape = result.shape;
+ collision.local_shape = result.local_shape;
+ collision.normal = result.normal;
+ collision.position = result.contact;
+ collision.depth = result.len;
+ //r_result->collider_metadata = result.object->get_shape_metadata(result.shape);
+
+ const Body3DSW *body = static_cast<const Body3DSW *>(result.object);
+
+ Vector3 rel_vec = result.contact - (body->get_transform().origin + body->get_center_of_mass());
+ collision.collider_velocity = body->get_linear_velocity() + (body->get_angular_velocity()).cross(rel_vec);
+ }
r_result->travel = safe * p_motion;
r_result->remainder = p_motion - safe * p_motion;
r_result->travel += (body_transform.get_origin() - p_from.get_origin());
+
+ r_result->safe_fraction = safe;
+ r_result->unsafe_fraction = unsafe;
+
+ r_result->collision_count = rcd.result_count;
}
collided = true;
@@ -892,6 +967,9 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform3D &p_from, co
r_result->travel = p_motion;
r_result->remainder = Vector3();
r_result->travel += (body_transform.get_origin() - p_from.get_origin());
+
+ r_result->safe_fraction = 1.0;
+ r_result->unsafe_fraction = 1.0;
}
return collided;
@@ -967,12 +1045,12 @@ void Space3DSW::body_remove_from_active_list(SelfList<Body3DSW> *p_body) {
active_list.remove(p_body);
}
-void Space3DSW::body_add_to_inertia_update_list(SelfList<Body3DSW> *p_body) {
- inertia_update_list.add(p_body);
+void Space3DSW::body_add_to_mass_properties_update_list(SelfList<Body3DSW> *p_body) {
+ mass_properties_update_list.add(p_body);
}
-void Space3DSW::body_remove_from_inertia_update_list(SelfList<Body3DSW> *p_body) {
- inertia_update_list.remove(p_body);
+void Space3DSW::body_remove_from_mass_properties_update_list(SelfList<Body3DSW> *p_body) {
+ mass_properties_update_list.remove(p_body);
}
BroadPhase3DSW *Space3DSW::get_broadphase() {
@@ -1049,9 +1127,9 @@ void Space3DSW::call_queries() {
void Space3DSW::setup() {
contact_debug_count = 0;
- while (inertia_update_list.first()) {
- inertia_update_list.first()->self()->update_inertias();
- inertia_update_list.remove(inertia_update_list.first());
+ while (mass_properties_update_list.first()) {
+ mass_properties_update_list.first()->self()->update_mass_properties();
+ mass_properties_update_list.remove(mass_properties_update_list.first());
}
}
@@ -1085,9 +1163,6 @@ void Space3DSW::set_param(PhysicsServer3D::SpaceParameter p_param, real_t p_valu
case PhysicsServer3D::SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS:
constraint_bias = p_value;
break;
- case PhysicsServer3D::SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH:
- test_motion_min_contact_depth = p_value;
- break;
}
}
@@ -1109,8 +1184,6 @@ real_t Space3DSW::get_param(PhysicsServer3D::SpaceParameter p_param) const {
return body_angular_velocity_damp_ratio;
case PhysicsServer3D::SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS:
return constraint_bias;
- case PhysicsServer3D::SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH:
- return test_motion_min_contact_depth;
}
return 0;
}
@@ -1132,18 +1205,6 @@ PhysicsDirectSpaceState3DSW *Space3DSW::get_direct_state() {
}
Space3DSW::Space3DSW() {
- collision_pairs = 0;
- active_objects = 0;
- island_count = 0;
- contact_debug_count = 0;
-
- locked = false;
- contact_recycle_radius = 0.01;
- contact_max_separation = 0.05;
- contact_max_allowed_penetration = 0.01;
- test_motion_min_contact_depth = 0.00001;
-
- constraint_bias = 0.01;
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_linear", 0.1);
body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_angular", Math::deg2rad(8.0));
body_time_to_sleep = GLOBAL_DEF("physics/3d/time_before_sleep", 0.5);
@@ -1153,14 +1214,9 @@ Space3DSW::Space3DSW() {
broadphase = BroadPhase3DSW::create_func();
broadphase->set_pair_callback(_broadphase_pair, this);
broadphase->set_unpair_callback(_broadphase_unpair, this);
- area = nullptr;
direct_access = memnew(PhysicsDirectSpaceState3DSW);
direct_access->space = this;
-
- for (int i = 0; i < ELAPSED_TIME_MAX; i++) {
- elapsed_time[i] = 0;
- }
}
Space3DSW::~Space3DSW() {
diff --git a/servers/physics_3d/space_3d_sw.h b/servers/physics_3d/space_3d_sw.h
index 9b5b4de069..daa1244bf8 100644
--- a/servers/physics_3d/space_3d_sw.h
+++ b/servers/physics_3d/space_3d_sw.h
@@ -48,12 +48,12 @@ class PhysicsDirectSpaceState3DSW : public PhysicsDirectSpaceState3D {
public:
Space3DSW *space;
- virtual int intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
- virtual bool intersect_ray(const Vector3 &p_from, const Vector3 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_ray = false) override;
- virtual int intersect_shape(const RID &p_shape, const Transform3D &p_xform, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
- virtual bool cast_motion(const RID &p_shape, const Transform3D &p_xform, const Vector3 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, ShapeRestInfo *r_info = nullptr) override;
- virtual bool collide_shape(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
- virtual bool rest_info(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual int intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual bool intersect_ray(const Vector3 &p_from, const Vector3 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_ray = false) override;
+ virtual int intersect_shape(const RID &p_shape, const Transform3D &p_xform, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual bool cast_motion(const RID &p_shape, const Transform3D &p_xform, const Vector3 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, ShapeRestInfo *r_info = nullptr) override;
+ virtual bool collide_shape(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual bool rest_info(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
virtual Vector3 get_closest_point_to_object_volume(RID p_object, const Vector3 p_point) const override;
PhysicsDirectSpaceState3DSW();
@@ -72,14 +72,14 @@ public:
};
private:
- uint64_t elapsed_time[ELAPSED_TIME_MAX];
+ uint64_t elapsed_time[ELAPSED_TIME_MAX] = {};
PhysicsDirectSpaceState3DSW *direct_access;
RID self;
BroadPhase3DSW *broadphase;
SelfList<Body3DSW>::List active_list;
- SelfList<Body3DSW>::List inertia_update_list;
+ SelfList<Body3DSW>::List mass_properties_update_list;
SelfList<Body3DSW>::List state_query_list;
SelfList<Area3DSW>::List monitor_query_list;
SelfList<Area3DSW>::List area_moved_list;
@@ -90,13 +90,12 @@ private:
Set<CollisionObject3DSW *> objects;
- Area3DSW *area;
+ Area3DSW *area = nullptr;
- real_t contact_recycle_radius;
- real_t contact_max_separation;
- real_t contact_max_allowed_penetration;
- real_t constraint_bias;
- real_t test_motion_min_contact_depth;
+ real_t contact_recycle_radius = 0.01;
+ real_t contact_max_separation = 0.05;
+ real_t contact_max_allowed_penetration = 0.01;
+ real_t constraint_bias = 0.01;
enum {
INTERSECTION_QUERY_MAX = 2048
@@ -110,16 +109,18 @@ private:
real_t body_time_to_sleep;
real_t body_angular_velocity_damp_ratio;
- bool locked;
+ bool locked = false;
- int island_count;
- int active_objects;
- int collision_pairs;
+ real_t last_step = 0.001;
+
+ int island_count = 0;
+ int active_objects = 0;
+ int collision_pairs = 0;
RID static_global_body;
Vector<Vector3> contact_debug;
- int contact_debug_count;
+ int contact_debug_count = 0;
friend class PhysicsDirectSpaceState3DSW;
@@ -135,8 +136,8 @@ public:
const SelfList<Body3DSW>::List &get_active_body_list() const;
void body_add_to_active_list(SelfList<Body3DSW> *p_body);
void body_remove_from_active_list(SelfList<Body3DSW> *p_body);
- void body_add_to_inertia_update_list(SelfList<Body3DSW> *p_body);
- void body_remove_from_inertia_update_list(SelfList<Body3DSW> *p_body);
+ void body_add_to_mass_properties_update_list(SelfList<Body3DSW> *p_body);
+ void body_remove_from_mass_properties_update_list(SelfList<Body3DSW> *p_body);
void body_add_to_state_query_list(SelfList<Body3DSW> *p_body);
void body_remove_from_state_query_list(SelfList<Body3DSW> *p_body);
@@ -174,6 +175,9 @@ public:
void lock();
void unlock();
+ real_t get_last_step() const { return last_step; }
+ void set_last_step(real_t p_step) { last_step = p_step; }
+
void set_param(PhysicsServer3D::SpaceParameter p_param, real_t p_value);
real_t get_param(PhysicsServer3D::SpaceParameter p_param) const;
@@ -203,7 +207,7 @@ public:
void set_elapsed_time(ElapsedTime p_time, uint64_t p_msec) { elapsed_time[p_time] = p_msec; }
uint64_t get_elapsed_time(ElapsedTime p_time) const { return elapsed_time[p_time]; }
- bool test_body_motion(Body3DSW *p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin, PhysicsServer3D::MotionResult *r_result, const Set<RID> &p_exclude = Set<RID>());
+ bool test_body_motion(Body3DSW *p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin, PhysicsServer3D::MotionResult *r_result, int p_max_collisions = 1, bool p_collide_separation_ray = false, const Set<RID> &p_exclude = Set<RID>());
Space3DSW();
~Space3DSW();
diff --git a/servers/physics_3d/step_3d_sw.cpp b/servers/physics_3d/step_3d_sw.cpp
index ba18bac611..7c18944b4d 100644
--- a/servers/physics_3d/step_3d_sw.cpp
+++ b/servers/physics_3d/step_3d_sw.cpp
@@ -185,6 +185,8 @@ void Step3DSW::step(Space3DSW *p_space, real_t p_delta, int p_iterations) {
p_space->setup(); //update inertias, etc
+ p_space->set_last_step(p_delta);
+
iterations = p_iterations;
delta = p_delta;
@@ -405,8 +407,6 @@ void Step3DSW::step(Space3DSW *p_space, real_t p_delta, int p_iterations) {
}
Step3DSW::Step3DSW() {
- _step = 1;
-
body_islands.reserve(BODY_ISLAND_COUNT_RESERVE);
constraint_islands.reserve(ISLAND_COUNT_RESERVE);
all_constraints.reserve(CONSTRAINT_COUNT_RESERVE);
diff --git a/servers/physics_3d/step_3d_sw.h b/servers/physics_3d/step_3d_sw.h
index 9c60004b24..f2f879104a 100644
--- a/servers/physics_3d/step_3d_sw.h
+++ b/servers/physics_3d/step_3d_sw.h
@@ -37,7 +37,7 @@
#include "core/templates/thread_work_pool.h"
class Step3DSW {
- uint64_t _step;
+ uint64_t _step = 1;
int iterations = 0;
real_t delta = 0.0;
diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp
index c96f85446c..3fc94cd727 100644
--- a/servers/physics_server_2d.cpp
+++ b/servers/physics_server_2d.cpp
@@ -77,6 +77,7 @@ void PhysicsDirectBodyState2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_total_linear_damp"), &PhysicsDirectBodyState2D::get_total_linear_damp);
ClassDB::bind_method(D_METHOD("get_total_angular_damp"), &PhysicsDirectBodyState2D::get_total_angular_damp);
+ ClassDB::bind_method(D_METHOD("get_center_of_mass"), &PhysicsDirectBodyState2D::get_center_of_mass);
ClassDB::bind_method(D_METHOD("get_inverse_mass"), &PhysicsDirectBodyState2D::get_inverse_mass);
ClassDB::bind_method(D_METHOD("get_inverse_inertia"), &PhysicsDirectBodyState2D::get_inverse_inertia);
@@ -123,6 +124,7 @@ void PhysicsDirectBodyState2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_angular_damp"), "", "get_total_angular_damp");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_linear_damp"), "", "get_total_linear_damp");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "total_gravity"), "", "get_total_gravity");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "center_of_mass"), "", "get_center_of_mass");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "linear_velocity"), "set_linear_velocity", "get_linear_velocity");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sleeping"), "set_sleep_state", "is_sleeping");
@@ -257,13 +259,6 @@ void PhysicsShapeQueryParameters2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collide_with_areas"), "set_collide_with_areas", "is_collide_with_areas_enabled");
}
-PhysicsShapeQueryParameters2D::PhysicsShapeQueryParameters2D() {
- margin = 0;
- collision_mask = 0x7FFFFFFF;
- collide_with_bodies = true;
- collide_with_areas = false;
-}
-
Dictionary PhysicsDirectSpaceState2D::_intersect_ray(const Vector2 &p_from, const Vector2 &p_to, const Vector<RID> &p_exclude, uint32_t p_layers, bool p_collide_with_bodies, bool p_collide_with_areas) {
RayResult inters;
Set<RID> exclude;
@@ -411,9 +406,9 @@ PhysicsDirectSpaceState2D::PhysicsDirectSpaceState2D() {
}
void PhysicsDirectSpaceState2D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("intersect_point", "point", "max_results", "exclude", "collision_mask", "collide_with_bodies", "collide_with_areas"), &PhysicsDirectSpaceState2D::_intersect_point, DEFVAL(32), DEFVAL(Array()), DEFVAL(0x7FFFFFFF), DEFVAL(true), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("intersect_point_on_canvas", "point", "canvas_instance_id", "max_results", "exclude", "collision_mask", "collide_with_bodies", "collide_with_areas"), &PhysicsDirectSpaceState2D::_intersect_point_on_canvas, DEFVAL(32), DEFVAL(Array()), DEFVAL(0x7FFFFFFF), DEFVAL(true), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("intersect_ray", "from", "to", "exclude", "collision_mask", "collide_with_bodies", "collide_with_areas"), &PhysicsDirectSpaceState2D::_intersect_ray, DEFVAL(Array()), DEFVAL(0x7FFFFFFF), DEFVAL(true), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("intersect_point", "point", "max_results", "exclude", "collision_mask", "collide_with_bodies", "collide_with_areas"), &PhysicsDirectSpaceState2D::_intersect_point, DEFVAL(32), DEFVAL(Array()), DEFVAL(UINT32_MAX), DEFVAL(true), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("intersect_point_on_canvas", "point", "canvas_instance_id", "max_results", "exclude", "collision_mask", "collide_with_bodies", "collide_with_areas"), &PhysicsDirectSpaceState2D::_intersect_point_on_canvas, DEFVAL(32), DEFVAL(Array()), DEFVAL(UINT32_MAX), DEFVAL(true), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("intersect_ray", "from", "to", "exclude", "collision_mask", "collide_with_bodies", "collide_with_areas"), &PhysicsDirectSpaceState2D::_intersect_ray, DEFVAL(Array()), DEFVAL(UINT32_MAX), DEFVAL(true), DEFVAL(false));
ClassDB::bind_method(D_METHOD("intersect_shape", "shape", "max_results"), &PhysicsDirectSpaceState2D::_intersect_shape, DEFVAL(32));
ClassDB::bind_method(D_METHOD("cast_motion", "shape"), &PhysicsDirectSpaceState2D::_cast_motion);
ClassDB::bind_method(D_METHOD("collide_shape", "shape", "max_results"), &PhysicsDirectSpaceState2D::_collide_shape, DEFVAL(32));
@@ -500,7 +495,7 @@ void PhysicsTestMotionResult2D::_bind_methods() {
///////////////////////////////////////
-bool PhysicsServer2D::_body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin, const Ref<PhysicsTestMotionResult2D> &p_result, const Vector<RID> &p_exclude) {
+bool PhysicsServer2D::_body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin, const Ref<PhysicsTestMotionResult2D> &p_result, bool p_collide_separation_ray, const Vector<RID> &p_exclude) {
MotionResult *r = nullptr;
if (p_result.is_valid()) {
r = p_result->get_result_ptr();
@@ -509,11 +504,12 @@ bool PhysicsServer2D::_body_test_motion(RID p_body, const Transform2D &p_from, c
for (int i = 0; i < p_exclude.size(); i++) {
exclude.insert(p_exclude[i]);
}
- return body_test_motion(p_body, p_from, p_motion, p_margin, r, exclude);
+ return body_test_motion(p_body, p_from, p_motion, p_margin, r, p_collide_separation_ray, exclude);
}
void PhysicsServer2D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("world_margin_shape_create"), &PhysicsServer2D::world_margin_shape_create);
+ ClassDB::bind_method(D_METHOD("world_boundary_shape_create"), &PhysicsServer2D::world_boundary_shape_create);
+ ClassDB::bind_method(D_METHOD("separation_ray_shape_create"), &PhysicsServer2D::separation_ray_shape_create);
ClassDB::bind_method(D_METHOD("segment_shape_create"), &PhysicsServer2D::segment_shape_create);
ClassDB::bind_method(D_METHOD("circle_shape_create"), &PhysicsServer2D::circle_shape_create);
ClassDB::bind_method(D_METHOD("rectangle_shape_create"), &PhysicsServer2D::rectangle_shape_create);
@@ -613,6 +609,8 @@ void PhysicsServer2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("body_set_param", "body", "param", "value"), &PhysicsServer2D::body_set_param);
ClassDB::bind_method(D_METHOD("body_get_param", "body", "param"), &PhysicsServer2D::body_get_param);
+ ClassDB::bind_method(D_METHOD("body_reset_mass_properties", "body"), &PhysicsServer2D::body_reset_mass_properties);
+
ClassDB::bind_method(D_METHOD("body_set_state", "body", "state", "value"), &PhysicsServer2D::body_set_state);
ClassDB::bind_method(D_METHOD("body_get_state", "body", "state"), &PhysicsServer2D::body_get_state);
@@ -635,7 +633,7 @@ void PhysicsServer2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("body_set_force_integration_callback", "body", "callable", "userdata"), &PhysicsServer2D::body_set_force_integration_callback, DEFVAL(Variant()));
- ClassDB::bind_method(D_METHOD("body_test_motion", "body", "from", "motion", "margin", "result", "exclude"), &PhysicsServer2D::_body_test_motion, DEFVAL(0.08), DEFVAL(Variant()), DEFVAL(Array()));
+ ClassDB::bind_method(D_METHOD("body_test_motion", "body", "from", "motion", "margin", "result", "collide_separation_ray", "exclude"), &PhysicsServer2D::_body_test_motion, DEFVAL(0.08), DEFVAL(Variant()), DEFVAL(false), DEFVAL(Array()));
ClassDB::bind_method(D_METHOD("body_get_direct_state", "body"), &PhysicsServer2D::body_get_direct_state);
@@ -672,9 +670,9 @@ void PhysicsServer2D::_bind_methods() {
BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD);
BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_TIME_TO_SLEEP);
BIND_ENUM_CONSTANT(SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS);
- BIND_ENUM_CONSTANT(SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH);
- BIND_ENUM_CONSTANT(SHAPE_WORLD_MARGIN);
+ BIND_ENUM_CONSTANT(SHAPE_WORLD_BOUNDARY);
+ BIND_ENUM_CONSTANT(SHAPE_SEPARATION_RAY);
BIND_ENUM_CONSTANT(SHAPE_SEGMENT);
BIND_ENUM_CONSTANT(SHAPE_CIRCLE);
BIND_ENUM_CONSTANT(SHAPE_RECTANGLE);
@@ -701,12 +699,13 @@ void PhysicsServer2D::_bind_methods() {
BIND_ENUM_CONSTANT(BODY_MODE_STATIC);
BIND_ENUM_CONSTANT(BODY_MODE_KINEMATIC);
BIND_ENUM_CONSTANT(BODY_MODE_DYNAMIC);
- BIND_ENUM_CONSTANT(BODY_MODE_DYNAMIC_LOCKED);
+ BIND_ENUM_CONSTANT(BODY_MODE_DYNAMIC_LINEAR);
BIND_ENUM_CONSTANT(BODY_PARAM_BOUNCE);
BIND_ENUM_CONSTANT(BODY_PARAM_FRICTION);
BIND_ENUM_CONSTANT(BODY_PARAM_MASS);
BIND_ENUM_CONSTANT(BODY_PARAM_INERTIA);
+ BIND_ENUM_CONSTANT(BODY_PARAM_CENTER_OF_MASS);
BIND_ENUM_CONSTANT(BODY_PARAM_GRAVITY_SCALE);
BIND_ENUM_CONSTANT(BODY_PARAM_LINEAR_DAMP);
BIND_ENUM_CONSTANT(BODY_PARAM_ANGULAR_DAMP);
diff --git a/servers/physics_server_2d.h b/servers/physics_server_2d.h
index 4c559dd7bd..4b85382fe5 100644
--- a/servers/physics_server_2d.h
+++ b/servers/physics_server_2d.h
@@ -48,6 +48,7 @@ public:
virtual real_t get_total_linear_damp() const = 0; // get density of this body space/area
virtual real_t get_total_angular_damp() const = 0; // get density of this body space/area
+ virtual Vector2 get_center_of_mass() const = 0;
virtual real_t get_inverse_mass() const = 0; // get the mass
virtual real_t get_inverse_inertia() const = 0; // get density of this body space
@@ -103,12 +104,12 @@ class PhysicsShapeQueryParameters2D : public RefCounted {
RID shape;
Transform2D transform;
Vector2 motion;
- real_t margin;
+ real_t margin = 0.0;
Set<RID> exclude;
- uint32_t collision_mask;
+ uint32_t collision_mask = UINT32_MAX;
- bool collide_with_bodies;
- bool collide_with_areas;
+ bool collide_with_bodies = true;
+ bool collide_with_areas = false;
protected:
static void _bind_methods();
@@ -139,8 +140,6 @@ public:
void set_exclude(const Vector<RID> &p_exclude);
Vector<RID> get_exclude() const;
-
- PhysicsShapeQueryParameters2D();
};
class PhysicsDirectSpaceState2D : public Object {
@@ -169,7 +168,7 @@ public:
Variant metadata;
};
- virtual bool intersect_ray(const Vector2 &p_from, const Vector2 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual bool intersect_ray(const Vector2 &p_from, const Vector2 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
struct ShapeResult {
RID rid;
@@ -179,14 +178,14 @@ public:
Variant metadata;
};
- virtual int intersect_point(const Vector2 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_point = false) = 0;
- virtual int intersect_point_on_canvas(const Vector2 &p_point, ObjectID p_canvas_instance_id, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_point = false) = 0;
+ virtual int intersect_point(const Vector2 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_point = false) = 0;
+ virtual int intersect_point_on_canvas(const Vector2 &p_point, ObjectID p_canvas_instance_id, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_point = false) = 0;
- virtual int intersect_shape(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual int intersect_shape(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
- virtual bool cast_motion(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual bool cast_motion(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
- virtual bool collide_shape(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, Vector2 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual bool collide_shape(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, Vector2 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
struct ShapeRestInfo {
Vector2 point;
@@ -198,7 +197,7 @@ public:
Variant metadata;
};
- virtual bool rest_info(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual bool rest_info(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
PhysicsDirectSpaceState2D();
};
@@ -210,7 +209,7 @@ class PhysicsServer2D : public Object {
static PhysicsServer2D *singleton;
- virtual bool _body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin = 0.08, const Ref<PhysicsTestMotionResult2D> &p_result = Ref<PhysicsTestMotionResult2D>(), const Vector<RID> &p_exclude = Vector<RID>());
+ virtual bool _body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin = 0.08, const Ref<PhysicsTestMotionResult2D> &p_result = Ref<PhysicsTestMotionResult2D>(), bool p_collide_separation_ray = false, const Vector<RID> &p_exclude = Vector<RID>());
protected:
static void _bind_methods();
@@ -219,7 +218,8 @@ public:
static PhysicsServer2D *get_singleton();
enum ShapeType {
- SHAPE_WORLD_MARGIN, ///< plane:"plane"
+ SHAPE_WORLD_BOUNDARY, ///< plane:"plane"
+ SHAPE_SEPARATION_RAY, ///< float:"length"
SHAPE_SEGMENT, ///< float:"length"
SHAPE_CIRCLE, ///< float:"radius"
SHAPE_RECTANGLE, ///< vec3:"extents"
@@ -229,7 +229,8 @@ public:
SHAPE_CUSTOM, ///< Server-Implementation based custom shape, calling shape_create() with this value will result in an error
};
- virtual RID world_margin_shape_create() = 0;
+ virtual RID world_boundary_shape_create() = 0;
+ virtual RID separation_ray_shape_create() = 0;
virtual RID segment_shape_create() = 0;
virtual RID circle_shape_create() = 0;
virtual RID rectangle_shape_create() = 0;
@@ -261,7 +262,6 @@ public:
SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD,
SPACE_PARAM_BODY_TIME_TO_SLEEP,
SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS,
- SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH,
};
virtual void space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) = 0;
@@ -349,7 +349,7 @@ public:
BODY_MODE_STATIC,
BODY_MODE_KINEMATIC,
BODY_MODE_DYNAMIC,
- BODY_MODE_DYNAMIC_LOCKED,
+ BODY_MODE_DYNAMIC_LINEAR,
};
virtual RID body_create() = 0;
@@ -402,15 +402,18 @@ public:
BODY_PARAM_BOUNCE,
BODY_PARAM_FRICTION,
BODY_PARAM_MASS, ///< unused for static, always infinite
- BODY_PARAM_INERTIA, // read-only: computed from mass & shapes
+ BODY_PARAM_INERTIA,
+ BODY_PARAM_CENTER_OF_MASS,
BODY_PARAM_GRAVITY_SCALE,
BODY_PARAM_LINEAR_DAMP,
BODY_PARAM_ANGULAR_DAMP,
BODY_PARAM_MAX,
};
- virtual void body_set_param(RID p_body, BodyParameter p_param, real_t p_value) = 0;
- virtual real_t body_get_param(RID p_body, BodyParameter p_param) const = 0;
+ virtual void body_set_param(RID p_body, BodyParameter p_param, const Variant &p_value) = 0;
+ virtual Variant body_get_param(RID p_body, BodyParameter p_param) const = 0;
+
+ virtual void body_reset_mass_properties(RID p_body) = 0;
//state
enum BodyState {
@@ -455,6 +458,10 @@ public:
virtual void body_set_omit_force_integration(RID p_body, bool p_omit) = 0;
virtual bool body_is_omitting_force_integration(RID p_body) const = 0;
+ // Callback for C++ use only.
+ typedef void (*BodyStateCallback)(void *p_instance, PhysicsDirectBodyState2D *p_state);
+ virtual void body_set_state_sync_callback(RID p_body, void *p_instance, BodyStateCallback p_callback) = 0;
+
virtual void body_set_force_integration_callback(RID p_body, const Callable &p_callable, const Variant &p_udata = Variant()) = 0;
virtual bool body_collide_shape(RID p_body, int p_body_shape, RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, Vector2 *r_results, int p_result_max, int &r_result_count) = 0;
@@ -485,7 +492,7 @@ public:
}
};
- virtual bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin = 0.08, MotionResult *r_result = nullptr, const Set<RID> &p_exclude = Set<RID>()) = 0;
+ virtual bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, real_t p_margin = 0.08, MotionResult *r_result = nullptr, bool p_collide_separation_ray = false, const Set<RID> &p_exclude = Set<RID>()) = 0;
struct SeparationResult {
real_t collision_depth;
diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp
index 53863cea72..9384cdc7b8 100644
--- a/servers/physics_server_3d.cpp
+++ b/servers/physics_server_3d.cpp
@@ -249,13 +249,6 @@ void PhysicsShapeQueryParameters3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collide_with_areas"), "set_collide_with_areas", "is_collide_with_areas_enabled");
}
-PhysicsShapeQueryParameters3D::PhysicsShapeQueryParameters3D() {
- margin = 0;
- collision_mask = 0x7FFFFFFF;
- collide_with_bodies = true;
- collide_with_areas = false;
-}
-
/////////////////////////////////////
Dictionary PhysicsDirectSpaceState3D::_intersect_ray(const Vector3 &p_from, const Vector3 &p_to, const Vector<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
@@ -360,7 +353,7 @@ PhysicsDirectSpaceState3D::PhysicsDirectSpaceState3D() {
}
void PhysicsDirectSpaceState3D::_bind_methods() {
- ClassDB::bind_method(D_METHOD("intersect_ray", "from", "to", "exclude", "collision_mask", "collide_with_bodies", "collide_with_areas"), &PhysicsDirectSpaceState3D::_intersect_ray, DEFVAL(Array()), DEFVAL(0x7FFFFFFF), DEFVAL(true), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("intersect_ray", "from", "to", "exclude", "collision_mask", "collide_with_bodies", "collide_with_areas"), &PhysicsDirectSpaceState3D::_intersect_ray, DEFVAL(Array()), DEFVAL(UINT32_MAX), DEFVAL(true), DEFVAL(false));
ClassDB::bind_method(D_METHOD("intersect_shape", "shape", "max_results"), &PhysicsDirectSpaceState3D::_intersect_shape, DEFVAL(32));
ClassDB::bind_method(D_METHOD("cast_motion", "shape", "motion"), &PhysicsDirectSpaceState3D::_cast_motion);
ClassDB::bind_method(D_METHOD("collide_shape", "shape", "max_results"), &PhysicsDirectSpaceState3D::_collide_shape, DEFVAL(32));
@@ -377,77 +370,132 @@ Vector3 PhysicsTestMotionResult3D::get_remainder() const {
return result.remainder;
}
-Vector3 PhysicsTestMotionResult3D::get_collision_point() const {
- return result.collision_point;
+real_t PhysicsTestMotionResult3D::get_safe_fraction() const {
+ return result.safe_fraction;
+}
+
+real_t PhysicsTestMotionResult3D::get_unsafe_fraction() const {
+ return result.unsafe_fraction;
+}
+
+int PhysicsTestMotionResult3D::get_collision_count() const {
+ return result.collision_count;
}
-Vector3 PhysicsTestMotionResult3D::get_collision_normal() const {
- return result.collision_normal;
+Vector3 PhysicsTestMotionResult3D::get_collision_point(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, Vector3());
+ return result.collisions[p_collision_index].position;
}
-Vector3 PhysicsTestMotionResult3D::get_collider_velocity() const {
- return result.collider_velocity;
+Vector3 PhysicsTestMotionResult3D::get_collision_normal(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, Vector3());
+ return result.collisions[p_collision_index].normal;
}
-ObjectID PhysicsTestMotionResult3D::get_collider_id() const {
- return result.collider_id;
+Vector3 PhysicsTestMotionResult3D::get_collider_velocity(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, Vector3());
+ return result.collisions[p_collision_index].collider_velocity;
}
-RID PhysicsTestMotionResult3D::get_collider_rid() const {
- return result.collider;
+ObjectID PhysicsTestMotionResult3D::get_collider_id(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, ObjectID());
+ return result.collisions[p_collision_index].collider_id;
}
-Object *PhysicsTestMotionResult3D::get_collider() const {
- return ObjectDB::get_instance(result.collider_id);
+RID PhysicsTestMotionResult3D::get_collider_rid(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, RID());
+ return result.collisions[p_collision_index].collider;
}
-int PhysicsTestMotionResult3D::get_collider_shape() const {
- return result.collider_shape;
+Object *PhysicsTestMotionResult3D::get_collider(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, nullptr);
+ return ObjectDB::get_instance(result.collisions[p_collision_index].collider_id);
}
-real_t PhysicsTestMotionResult3D::get_collision_depth() const {
- return result.collision_depth;
+int PhysicsTestMotionResult3D::get_collider_shape(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, 0);
+ return result.collisions[p_collision_index].collider_shape;
}
-real_t PhysicsTestMotionResult3D::get_collision_safe_fraction() const {
- return result.collision_safe_fraction;
+real_t PhysicsTestMotionResult3D::get_collision_depth(int p_collision_index) const {
+ ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, 0.0);
+ return result.collisions[p_collision_index].depth;
}
-real_t PhysicsTestMotionResult3D::get_collision_unsafe_fraction() const {
- return result.collision_unsafe_fraction;
+Vector3 PhysicsTestMotionResult3D::get_best_collision_point() const {
+ return result.collision_count ? get_collision_point() : Vector3();
+}
+
+Vector3 PhysicsTestMotionResult3D::get_best_collision_normal() const {
+ return result.collision_count ? get_collision_normal() : Vector3();
+}
+
+Vector3 PhysicsTestMotionResult3D::get_best_collider_velocity() const {
+ return result.collision_count ? get_collider_velocity() : Vector3();
+}
+
+ObjectID PhysicsTestMotionResult3D::get_best_collider_id() const {
+ return result.collision_count ? get_collider_id() : ObjectID();
+}
+
+RID PhysicsTestMotionResult3D::get_best_collider_rid() const {
+ return result.collision_count ? get_collider_rid() : RID();
+}
+
+Object *PhysicsTestMotionResult3D::get_best_collider() const {
+ return result.collision_count ? get_collider() : nullptr;
+}
+
+int PhysicsTestMotionResult3D::get_best_collider_shape() const {
+ return result.collision_count ? get_collider_shape() : 0;
+}
+
+real_t PhysicsTestMotionResult3D::get_best_collision_depth() const {
+ return result.collision_count ? get_collision_depth() : 0.0;
}
void PhysicsTestMotionResult3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_travel"), &PhysicsTestMotionResult3D::get_travel);
ClassDB::bind_method(D_METHOD("get_remainder"), &PhysicsTestMotionResult3D::get_remainder);
- ClassDB::bind_method(D_METHOD("get_collision_point"), &PhysicsTestMotionResult3D::get_collision_point);
- ClassDB::bind_method(D_METHOD("get_collision_normal"), &PhysicsTestMotionResult3D::get_collision_normal);
- ClassDB::bind_method(D_METHOD("get_collider_velocity"), &PhysicsTestMotionResult3D::get_collider_velocity);
- ClassDB::bind_method(D_METHOD("get_collider_id"), &PhysicsTestMotionResult3D::get_collider_id);
- ClassDB::bind_method(D_METHOD("get_collider_rid"), &PhysicsTestMotionResult3D::get_collider_rid);
- ClassDB::bind_method(D_METHOD("get_collider"), &PhysicsTestMotionResult3D::get_collider);
- ClassDB::bind_method(D_METHOD("get_collider_shape"), &PhysicsTestMotionResult3D::get_collider_shape);
- ClassDB::bind_method(D_METHOD("get_collision_depth"), &PhysicsTestMotionResult3D::get_collision_depth);
- ClassDB::bind_method(D_METHOD("get_collision_safe_fraction"), &PhysicsTestMotionResult3D::get_collision_safe_fraction);
- ClassDB::bind_method(D_METHOD("get_collision_unsafe_fraction"), &PhysicsTestMotionResult3D::get_collision_unsafe_fraction);
+ ClassDB::bind_method(D_METHOD("get_safe_fraction"), &PhysicsTestMotionResult3D::get_safe_fraction);
+ ClassDB::bind_method(D_METHOD("get_unsafe_fraction"), &PhysicsTestMotionResult3D::get_unsafe_fraction);
+ ClassDB::bind_method(D_METHOD("get_collision_count"), &PhysicsTestMotionResult3D::get_collision_count);
+ ClassDB::bind_method(D_METHOD("get_collision_point", "collision_index"), &PhysicsTestMotionResult3D::get_collision_point, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collision_normal", "collision_index"), &PhysicsTestMotionResult3D::get_collision_normal, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collider_velocity", "collision_index"), &PhysicsTestMotionResult3D::get_collider_velocity, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collider_id", "collision_index"), &PhysicsTestMotionResult3D::get_collider_id, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collider_rid", "collision_index"), &PhysicsTestMotionResult3D::get_collider_rid, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collider", "collision_index"), &PhysicsTestMotionResult3D::get_collider, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collider_shape", "collision_index"), &PhysicsTestMotionResult3D::get_collider_shape, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_collision_depth", "collision_index"), &PhysicsTestMotionResult3D::get_collision_depth, DEFVAL(0));
+
+ ClassDB::bind_method(D_METHOD("get_best_collision_point"), &PhysicsTestMotionResult3D::get_best_collision_point);
+ ClassDB::bind_method(D_METHOD("get_best_collision_normal"), &PhysicsTestMotionResult3D::get_best_collision_normal);
+ ClassDB::bind_method(D_METHOD("get_best_collider_velocity"), &PhysicsTestMotionResult3D::get_best_collider_velocity);
+ ClassDB::bind_method(D_METHOD("get_best_collider_id"), &PhysicsTestMotionResult3D::get_best_collider_id);
+ ClassDB::bind_method(D_METHOD("get_best_collider_rid"), &PhysicsTestMotionResult3D::get_best_collider_rid);
+ ClassDB::bind_method(D_METHOD("get_best_collider"), &PhysicsTestMotionResult3D::get_best_collider);
+ ClassDB::bind_method(D_METHOD("get_best_collider_shape"), &PhysicsTestMotionResult3D::get_best_collider_shape);
+ ClassDB::bind_method(D_METHOD("get_best_collision_depth"), &PhysicsTestMotionResult3D::get_best_collision_depth);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "travel"), "", "get_travel");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "remainder"), "", "get_remainder");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "collision_point"), "", "get_collision_point");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "collision_normal"), "", "get_collision_normal");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "collider_velocity"), "", "get_collider_velocity");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_id", PROPERTY_HINT_OBJECT_ID), "", "get_collider_id");
- ADD_PROPERTY(PropertyInfo(Variant::RID, "collider_rid"), "", "get_collider_rid");
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "collider"), "", "get_collider");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_shape"), "", "get_collider_shape");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_depth"), "", "get_collision_depth");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_safe_fraction"), "", "get_collision_safe_fraction");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_unsafe_fraction"), "", "get_collision_unsafe_fraction");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "safe_fraction"), "", "get_safe_fraction");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "unsafe_fraction"), "", "get_unsafe_fraction");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_count"), "", "get_collision_count");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "collision_point"), "", "get_best_collision_point");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "collision_normal"), "", "get_best_collision_normal");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "collider_velocity"), "", "get_best_collider_velocity");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_id", PROPERTY_HINT_OBJECT_ID), "", "get_best_collider_id");
+ ADD_PROPERTY(PropertyInfo(Variant::RID, "collider_rid"), "", "get_best_collider_rid");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "collider"), "", "get_best_collider");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_shape"), "", "get_best_collider_shape");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "collision_depth"), "", "get_best_collision_depth");
}
///////////////////////////////////////
-bool PhysicsServer3D::_body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin, const Ref<PhysicsTestMotionResult3D> &p_result, const Vector<RID> &p_exclude) {
+bool PhysicsServer3D::_body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin, const Ref<PhysicsTestMotionResult3D> &p_result, bool p_collide_separation_ray, const Vector<RID> &p_exclude, int p_max_collisions) {
MotionResult *r = nullptr;
if (p_result.is_valid()) {
r = p_result->get_result_ptr();
@@ -456,13 +504,15 @@ bool PhysicsServer3D::_body_test_motion(RID p_body, const Transform3D &p_from, c
for (int i = 0; i < p_exclude.size(); i++) {
exclude.insert(p_exclude[i]);
}
- return body_test_motion(p_body, p_from, p_motion, p_margin, r, exclude);
+ return body_test_motion(p_body, p_from, p_motion, p_margin, r, p_max_collisions, p_collide_separation_ray, exclude);
}
RID PhysicsServer3D::shape_create(ShapeType p_shape) {
switch (p_shape) {
- case SHAPE_PLANE:
- return plane_shape_create();
+ case SHAPE_WORLD_BOUNDARY:
+ return world_boundary_shape_create();
+ case SHAPE_SEPARATION_RAY:
+ return separation_ray_shape_create();
case SHAPE_SPHERE:
return sphere_shape_create();
case SHAPE_BOX:
@@ -487,7 +537,8 @@ RID PhysicsServer3D::shape_create(ShapeType p_shape) {
void PhysicsServer3D::_bind_methods() {
#ifndef _3D_DISABLED
- ClassDB::bind_method(D_METHOD("plane_shape_create"), &PhysicsServer3D::plane_shape_create);
+ ClassDB::bind_method(D_METHOD("world_boundary_shape_create"), &PhysicsServer3D::world_boundary_shape_create);
+ ClassDB::bind_method(D_METHOD("separation_ray_shape_create"), &PhysicsServer3D::separation_ray_shape_create);
ClassDB::bind_method(D_METHOD("sphere_shape_create"), &PhysicsServer3D::sphere_shape_create);
ClassDB::bind_method(D_METHOD("box_shape_create"), &PhysicsServer3D::box_shape_create);
ClassDB::bind_method(D_METHOD("capsule_shape_create"), &PhysicsServer3D::capsule_shape_create);
@@ -581,6 +632,8 @@ void PhysicsServer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("body_set_param", "body", "param", "value"), &PhysicsServer3D::body_set_param);
ClassDB::bind_method(D_METHOD("body_get_param", "body", "param"), &PhysicsServer3D::body_get_param);
+ ClassDB::bind_method(D_METHOD("body_reset_mass_properties", "body"), &PhysicsServer3D::body_reset_mass_properties);
+
ClassDB::bind_method(D_METHOD("body_set_state", "body", "state", "value"), &PhysicsServer3D::body_set_state);
ClassDB::bind_method(D_METHOD("body_get_state", "body", "state"), &PhysicsServer3D::body_get_state);
@@ -609,7 +662,7 @@ void PhysicsServer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("body_set_ray_pickable", "body", "enable"), &PhysicsServer3D::body_set_ray_pickable);
- ClassDB::bind_method(D_METHOD("body_test_motion", "body", "from", "motion", "margin", "result", "exclude"), &PhysicsServer3D::_body_test_motion, DEFVAL(0.001), DEFVAL(Variant()), DEFVAL(Array()));
+ ClassDB::bind_method(D_METHOD("body_test_motion", "body", "from", "motion", "margin", "result", "collide_separation_ray", "exclude", "max_collisions"), &PhysicsServer3D::_body_test_motion, DEFVAL(0.001), DEFVAL(Variant()), DEFVAL(false), DEFVAL(Array()), DEFVAL(1));
ClassDB::bind_method(D_METHOD("body_get_direct_state", "body"), &PhysicsServer3D::body_get_direct_state);
@@ -747,7 +800,8 @@ void PhysicsServer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_process_info", "process_info"), &PhysicsServer3D::get_process_info);
- BIND_ENUM_CONSTANT(SHAPE_PLANE);
+ BIND_ENUM_CONSTANT(SHAPE_WORLD_BOUNDARY);
+ BIND_ENUM_CONSTANT(SHAPE_SEPARATION_RAY);
BIND_ENUM_CONSTANT(SHAPE_SPHERE);
BIND_ENUM_CONSTANT(SHAPE_BOX);
BIND_ENUM_CONSTANT(SHAPE_CAPSULE);
@@ -766,6 +820,10 @@ void PhysicsServer3D::_bind_methods() {
BIND_ENUM_CONSTANT(AREA_PARAM_LINEAR_DAMP);
BIND_ENUM_CONSTANT(AREA_PARAM_ANGULAR_DAMP);
BIND_ENUM_CONSTANT(AREA_PARAM_PRIORITY);
+ BIND_ENUM_CONSTANT(AREA_PARAM_WIND_FORCE_MAGNITUDE);
+ BIND_ENUM_CONSTANT(AREA_PARAM_WIND_SOURCE);
+ BIND_ENUM_CONSTANT(AREA_PARAM_WIND_DIRECTION);
+ BIND_ENUM_CONSTANT(AREA_PARAM_WIND_ATTENUATION_FACTOR);
BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_DISABLED);
BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_COMBINE);
@@ -776,11 +834,13 @@ void PhysicsServer3D::_bind_methods() {
BIND_ENUM_CONSTANT(BODY_MODE_STATIC);
BIND_ENUM_CONSTANT(BODY_MODE_KINEMATIC);
BIND_ENUM_CONSTANT(BODY_MODE_DYNAMIC);
- BIND_ENUM_CONSTANT(BODY_MODE_DYNAMIC_LOCKED);
+ BIND_ENUM_CONSTANT(BODY_MODE_DYNAMIC_LINEAR);
BIND_ENUM_CONSTANT(BODY_PARAM_BOUNCE);
BIND_ENUM_CONSTANT(BODY_PARAM_FRICTION);
BIND_ENUM_CONSTANT(BODY_PARAM_MASS);
+ BIND_ENUM_CONSTANT(BODY_PARAM_INERTIA);
+ BIND_ENUM_CONSTANT(BODY_PARAM_CENTER_OF_MASS);
BIND_ENUM_CONSTANT(BODY_PARAM_GRAVITY_SCALE);
BIND_ENUM_CONSTANT(BODY_PARAM_LINEAR_DAMP);
BIND_ENUM_CONSTANT(BODY_PARAM_ANGULAR_DAMP);
@@ -807,7 +867,6 @@ void PhysicsServer3D::_bind_methods() {
BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_TIME_TO_SLEEP);
BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO);
BIND_ENUM_CONSTANT(SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS);
- BIND_ENUM_CONSTANT(SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH);
BIND_ENUM_CONSTANT(BODY_AXIS_LINEAR_X);
BIND_ENUM_CONSTANT(BODY_AXIS_LINEAR_Y);
diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h
index f806fd55be..14d395e714 100644
--- a/servers/physics_server_3d.h
+++ b/servers/physics_server_3d.h
@@ -103,12 +103,12 @@ class PhysicsShapeQueryParameters3D : public RefCounted {
RES shape_ref;
RID shape;
Transform3D transform;
- real_t margin;
+ real_t margin = 0.0;
Set<RID> exclude;
- uint32_t collision_mask;
+ uint32_t collision_mask = UINT32_MAX;
- bool collide_with_bodies;
- bool collide_with_areas;
+ bool collide_with_bodies = true;
+ bool collide_with_areas = false;
protected:
static void _bind_methods();
@@ -136,15 +136,13 @@ public:
void set_collide_with_areas(bool p_enable);
bool is_collide_with_areas_enabled() const;
-
- PhysicsShapeQueryParameters3D();
};
class PhysicsDirectSpaceState3D : public Object {
GDCLASS(PhysicsDirectSpaceState3D, Object);
private:
- Dictionary _intersect_ray(const Vector3 &p_from, const Vector3 &p_to, const Vector<RID> &p_exclude = Vector<RID>(), uint32_t p_collision_mask = 0, bool p_collide_with_bodies = true, bool p_collide_with_areas = false);
+ Dictionary _intersect_ray(const Vector3 &p_from, const Vector3 &p_to, const Vector<RID> &p_exclude = Vector<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false);
Array _intersect_shape(const Ref<PhysicsShapeQueryParameters3D> &p_shape_query, int p_max_results = 32);
Array _cast_motion(const Ref<PhysicsShapeQueryParameters3D> &p_shape_query, const Vector3 &p_motion);
Array _collide_shape(const Ref<PhysicsShapeQueryParameters3D> &p_shape_query, int p_max_results = 32);
@@ -161,7 +159,7 @@ public:
int shape = 0;
};
- virtual int intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual int intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
struct RayResult {
Vector3 position;
@@ -172,9 +170,9 @@ public:
int shape = 0;
};
- virtual bool intersect_ray(const Vector3 &p_from, const Vector3 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_ray = false) = 0;
+ virtual bool intersect_ray(const Vector3 &p_from, const Vector3 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_ray = false) = 0;
- virtual int intersect_shape(const RID &p_shape, const Transform3D &p_xform, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual int intersect_shape(const RID &p_shape, const Transform3D &p_xform, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
struct ShapeRestInfo {
Vector3 point;
@@ -185,11 +183,11 @@ public:
Vector3 linear_velocity; //velocity at contact point
};
- virtual bool cast_motion(const RID &p_shape, const Transform3D &p_xform, const Vector3 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, ShapeRestInfo *r_info = nullptr) = 0;
+ virtual bool cast_motion(const RID &p_shape, const Transform3D &p_xform, const Vector3 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, ShapeRestInfo *r_info = nullptr) = 0;
- virtual bool collide_shape(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual bool collide_shape(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
- virtual bool rest_info(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual bool rest_info(RID p_shape, const Transform3D &p_shape_xform, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = UINT32_MAX, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
virtual Vector3 get_closest_point_to_object_volume(RID p_object, const Vector3 p_point) const = 0;
@@ -212,7 +210,7 @@ class PhysicsServer3D : public Object {
static PhysicsServer3D *singleton;
- virtual bool _body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin = 0.001, const Ref<PhysicsTestMotionResult3D> &p_result = Ref<PhysicsTestMotionResult3D>(), const Vector<RID> &p_exclude = Vector<RID>());
+ virtual bool _body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin = 0.001, const Ref<PhysicsTestMotionResult3D> &p_result = Ref<PhysicsTestMotionResult3D>(), bool p_collide_separation_ray = false, const Vector<RID> &p_exclude = Vector<RID>(), int p_max_collisions = 1);
protected:
static void _bind_methods();
@@ -221,7 +219,8 @@ public:
static PhysicsServer3D *get_singleton();
enum ShapeType {
- SHAPE_PLANE, ///< plane:"plane"
+ SHAPE_WORLD_BOUNDARY, ///< plane:"plane"
+ SHAPE_SEPARATION_RAY, ///< float:"length"
SHAPE_SPHERE, ///< float:"radius"
SHAPE_BOX, ///< vec3:"extents"
SHAPE_CAPSULE, ///< dict( float:"radius", float:"height"):capsule
@@ -235,7 +234,8 @@ public:
RID shape_create(ShapeType p_shape);
- virtual RID plane_shape_create() = 0;
+ virtual RID world_boundary_shape_create() = 0;
+ virtual RID separation_ray_shape_create() = 0;
virtual RID sphere_shape_create() = 0;
virtual RID box_shape_create() = 0;
virtual RID capsule_shape_create() = 0;
@@ -271,7 +271,6 @@ public:
SPACE_PARAM_BODY_TIME_TO_SLEEP,
SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO,
SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS,
- SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH
};
virtual void space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) = 0;
@@ -298,7 +297,11 @@ public:
AREA_PARAM_GRAVITY_POINT_ATTENUATION,
AREA_PARAM_LINEAR_DAMP,
AREA_PARAM_ANGULAR_DAMP,
- AREA_PARAM_PRIORITY
+ AREA_PARAM_PRIORITY,
+ AREA_PARAM_WIND_FORCE_MAGNITUDE,
+ AREA_PARAM_WIND_SOURCE,
+ AREA_PARAM_WIND_DIRECTION,
+ AREA_PARAM_WIND_ATTENUATION_FACTOR,
};
virtual RID area_create() = 0;
@@ -357,7 +360,7 @@ public:
BODY_MODE_STATIC,
BODY_MODE_KINEMATIC,
BODY_MODE_DYNAMIC,
- BODY_MODE_DYNAMIC_LOCKED,
+ BODY_MODE_DYNAMIC_LINEAR,
};
virtual RID body_create() = 0;
@@ -401,14 +404,18 @@ public:
BODY_PARAM_BOUNCE,
BODY_PARAM_FRICTION,
BODY_PARAM_MASS, ///< unused for static, always infinite
+ BODY_PARAM_INERTIA,
+ BODY_PARAM_CENTER_OF_MASS,
BODY_PARAM_GRAVITY_SCALE,
BODY_PARAM_LINEAR_DAMP,
BODY_PARAM_ANGULAR_DAMP,
BODY_PARAM_MAX,
};
- virtual void body_set_param(RID p_body, BodyParameter p_param, real_t p_value) = 0;
- virtual real_t body_get_param(RID p_body, BodyParameter p_param) const = 0;
+ virtual void body_set_param(RID p_body, BodyParameter p_param, const Variant &p_value) = 0;
+ virtual Variant body_get_param(RID p_body, BodyParameter p_param) const = 0;
+
+ virtual void body_reset_mass_properties(RID p_body) = 0;
//state
enum BodyState {
@@ -465,6 +472,10 @@ public:
virtual void body_set_omit_force_integration(RID p_body, bool p_omit) = 0;
virtual bool body_is_omitting_force_integration(RID p_body) const = 0;
+ // Callback for C++ use only.
+ typedef void (*BodyStateCallback)(void *p_instance, PhysicsDirectBodyState3D *p_state);
+ virtual void body_set_state_sync_callback(RID p_body, void *p_instance, BodyStateCallback p_callback) = 0;
+
virtual void body_set_force_integration_callback(RID p_body, const Callable &p_callable, const Variant &p_udata = Variant()) = 0;
virtual void body_set_ray_pickable(RID p_body, bool p_enable) = 0;
@@ -472,28 +483,34 @@ public:
// this function only works on physics process, errors and returns null otherwise
virtual PhysicsDirectBodyState3D *body_get_direct_state(RID p_body) = 0;
- struct MotionResult {
- Vector3 travel;
- Vector3 remainder;
-
- Vector3 collision_point;
- Vector3 collision_normal;
+ struct MotionCollision {
+ Vector3 position;
+ Vector3 normal;
Vector3 collider_velocity;
- real_t collision_depth = 0.0;
- real_t collision_safe_fraction = 0.0;
- real_t collision_unsafe_fraction = 0.0;
- int collision_local_shape = 0;
+ real_t depth = 0.0;
+ int local_shape = 0;
ObjectID collider_id;
RID collider;
int collider_shape = 0;
Variant collider_metadata;
real_t get_angle(Vector3 p_up_direction) const {
- return Math::acos(collision_normal.dot(p_up_direction));
+ return Math::acos(normal.dot(p_up_direction));
}
};
- virtual bool body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin = 0.001, MotionResult *r_result = nullptr, const Set<RID> &p_exclude = Set<RID>()) = 0;
+ struct MotionResult {
+ Vector3 travel;
+ Vector3 remainder;
+ real_t safe_fraction = 0.0;
+ real_t unsafe_fraction = 0.0;
+
+ static const int MAX_COLLISIONS = 32;
+ MotionCollision collisions[MAX_COLLISIONS];
+ int collision_count = 0;
+ };
+
+ virtual bool body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, real_t p_margin = 0.001, MotionResult *r_result = nullptr, int p_max_collisions = 1, bool p_collide_separation_ray = false, const Set<RID> &p_exclude = Set<RID>()) = 0;
/* SOFT BODY */
@@ -758,17 +775,28 @@ public:
Vector3 get_travel() const;
Vector3 get_remainder() const;
-
- Vector3 get_collision_point() const;
- Vector3 get_collision_normal() const;
- Vector3 get_collider_velocity() const;
- ObjectID get_collider_id() const;
- RID get_collider_rid() const;
- Object *get_collider() const;
- int get_collider_shape() const;
- real_t get_collision_depth() const;
- real_t get_collision_safe_fraction() const;
- real_t get_collision_unsafe_fraction() const;
+ real_t get_safe_fraction() const;
+ real_t get_unsafe_fraction() const;
+
+ int get_collision_count() const;
+
+ Vector3 get_collision_point(int p_collision_index = 0) const;
+ Vector3 get_collision_normal(int p_collision_index = 0) const;
+ Vector3 get_collider_velocity(int p_collision_index = 0) const;
+ ObjectID get_collider_id(int p_collision_index = 0) const;
+ RID get_collider_rid(int p_collision_index = 0) const;
+ Object *get_collider(int p_collision_index = 0) const;
+ int get_collider_shape(int p_collision_index = 0) const;
+ real_t get_collision_depth(int p_collision_index = 0) const;
+
+ Vector3 get_best_collision_point() const;
+ Vector3 get_best_collision_normal() const;
+ Vector3 get_best_collider_velocity() const;
+ ObjectID get_best_collider_id() const;
+ RID get_best_collider_rid() const;
+ Object *get_best_collider() const;
+ int get_best_collider_shape() const;
+ real_t get_best_collision_depth() const;
};
typedef PhysicsServer3D *(*CreatePhysicsServer3DCallback)();
diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp
index 857f112102..41c8b45113 100644
--- a/servers/register_server_types.cpp
+++ b/servers/register_server_types.cpp
@@ -72,6 +72,7 @@
#include "servers/rendering/shader_types.h"
#include "text_server.h"
#include "xr/xr_interface.h"
+#include "xr/xr_interface_extension.h"
#include "xr/xr_positional_tracker.h"
#include "xr_server.h"
@@ -138,10 +139,11 @@ void register_server_types() {
GDREGISTER_VIRTUAL_CLASS(RenderingDevice);
GDREGISTER_VIRTUAL_CLASS(XRInterface);
+ GDREGISTER_CLASS(XRInterfaceExtension); // can't register this as virtual because we need a creation function for our extensions.
GDREGISTER_CLASS(XRPositionalTracker);
- GDREGISTER_VIRTUAL_CLASS(AudioStream);
- GDREGISTER_VIRTUAL_CLASS(AudioStreamPlayback);
+ GDREGISTER_CLASS(AudioStream);
+ GDREGISTER_CLASS(AudioStreamPlayback);
GDREGISTER_VIRTUAL_CLASS(AudioStreamPlaybackResampled);
GDREGISTER_CLASS(AudioStreamMicrophone);
GDREGISTER_CLASS(AudioStreamRandomPitch);
diff --git a/servers/rendering/rasterizer_dummy.h b/servers/rendering/rasterizer_dummy.h
index f58d124140..f95221c05b 100644
--- a/servers/rendering/rasterizer_dummy.h
+++ b/servers/rendering/rasterizer_dummy.h
@@ -197,7 +197,7 @@ public:
TypedArray<Image> bake_render_uv2(RID p_base, const Vector<RID> &p_material_overrides, const Size2i &p_image_size) override { return TypedArray<Image>(); }
- bool free(RID p_rid) override { return true; }
+ bool free(RID p_rid) override { return false; }
void update() override {}
void sdfgi_set_debug_probe_select(const Vector3 &p_position, const Vector3 &p_dir) override {}
@@ -224,7 +224,7 @@ public:
return texture_owner.make_rid(texture);
}
void texture_2d_initialize(RID p_texture, const Ref<Image> &p_image) override {
- DummyTexture *t = texture_owner.getornull(p_texture);
+ DummyTexture *t = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND(!t);
t->image = p_image->duplicate();
}
@@ -241,7 +241,7 @@ public:
void texture_3d_placeholder_initialize(RID p_texture) override {}
Ref<Image> texture_2d_get(RID p_texture) const override {
- DummyTexture *t = texture_owner.getornull(p_texture);
+ DummyTexture *t = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND_V(!t, Ref<Image>());
return t->image;
}
@@ -661,11 +661,12 @@ public:
bool free(RID p_rid) override {
if (texture_owner.owns(p_rid)) {
// delete the texture
- DummyTexture *texture = texture_owner.getornull(p_rid);
+ DummyTexture *texture = texture_owner.get_or_null(p_rid);
texture_owner.free(p_rid);
memdelete(texture);
+ return true;
}
- return true;
+ return false;
}
virtual void update_memory_info() override {}
diff --git a/servers/rendering/renderer_canvas_cull.cpp b/servers/rendering/renderer_canvas_cull.cpp
index fd7d5b91fa..46683e8e68 100644
--- a/servers/rendering/renderer_canvas_cull.cpp
+++ b/servers/rendering/renderer_canvas_cull.cpp
@@ -100,7 +100,7 @@ void _collect_ysort_children(RendererCanvasCull::Item *p_canvas_item, Transform2
void _mark_ysort_dirty(RendererCanvasCull::Item *ysort_owner, RID_Owner<RendererCanvasCull::Item, true> &canvas_item_owner) {
do {
ysort_owner->ysort_children_count = -1;
- ysort_owner = canvas_item_owner.owns(ysort_owner->parent) ? canvas_item_owner.getornull(ysort_owner->parent) : nullptr;
+ ysort_owner = canvas_item_owner.owns(ysort_owner->parent) ? canvas_item_owner.get_or_null(ysort_owner->parent) : nullptr;
} while (ysort_owner && ysort_owner->sort_y);
}
@@ -182,7 +182,7 @@ void RendererCanvasCull::_attach_canvas_item_for_draw(RendererCanvasCull::Item *
if (ci->commands != nullptr) {
ci->final_transform = xform;
- ci->final_modulate = Color(modulate.r * ci->self_modulate.r, modulate.g * ci->self_modulate.g, modulate.b * ci->self_modulate.b, modulate.a * ci->self_modulate.a);
+ ci->final_modulate = modulate * ci->self_modulate;
ci->global_rect_cache = global_rect;
ci->global_rect_cache.position -= p_clip_rect.position;
ci->light_masked = false;
@@ -396,9 +396,9 @@ void RendererCanvasCull::canvas_initialize(RID p_rid) {
}
void RendererCanvasCull::canvas_set_item_mirroring(RID p_canvas, RID p_item, const Point2 &p_mirroring) {
- Canvas *canvas = canvas_owner.getornull(p_canvas);
+ Canvas *canvas = canvas_owner.get_or_null(p_canvas);
ERR_FAIL_COND(!canvas);
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
int idx = canvas->find_item(canvas_item);
@@ -407,7 +407,7 @@ void RendererCanvasCull::canvas_set_item_mirroring(RID p_canvas, RID p_item, con
}
void RendererCanvasCull::canvas_set_modulate(RID p_canvas, const Color &p_color) {
- Canvas *canvas = canvas_owner.getornull(p_canvas);
+ Canvas *canvas = canvas_owner.get_or_null(p_canvas);
ERR_FAIL_COND(!canvas);
canvas->modulate = p_color;
}
@@ -417,7 +417,7 @@ void RendererCanvasCull::canvas_set_disable_scale(bool p_disable) {
}
void RendererCanvasCull::canvas_set_parent(RID p_canvas, RID p_parent, float p_scale) {
- Canvas *canvas = canvas_owner.getornull(p_canvas);
+ Canvas *canvas = canvas_owner.get_or_null(p_canvas);
ERR_FAIL_COND(!canvas);
canvas->parent = p_parent;
@@ -432,15 +432,15 @@ void RendererCanvasCull::canvas_item_initialize(RID p_rid) {
}
void RendererCanvasCull::canvas_item_set_parent(RID p_item, RID p_parent) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
if (canvas_item->parent.is_valid()) {
if (canvas_owner.owns(canvas_item->parent)) {
- Canvas *canvas = canvas_owner.getornull(canvas_item->parent);
+ Canvas *canvas = canvas_owner.get_or_null(canvas_item->parent);
canvas->erase_item(canvas_item);
} else if (canvas_item_owner.owns(canvas_item->parent)) {
- Item *item_owner = canvas_item_owner.getornull(canvas_item->parent);
+ Item *item_owner = canvas_item_owner.get_or_null(canvas_item->parent);
item_owner->child_items.erase(canvas_item);
if (item_owner->sort_y) {
@@ -453,13 +453,13 @@ void RendererCanvasCull::canvas_item_set_parent(RID p_item, RID p_parent) {
if (p_parent.is_valid()) {
if (canvas_owner.owns(p_parent)) {
- Canvas *canvas = canvas_owner.getornull(p_parent);
+ Canvas *canvas = canvas_owner.get_or_null(p_parent);
Canvas::ChildItem ci;
ci.item = canvas_item;
canvas->child_items.push_back(ci);
canvas->children_order_dirty = true;
} else if (canvas_item_owner.owns(p_parent)) {
- Item *item_owner = canvas_item_owner.getornull(p_parent);
+ Item *item_owner = canvas_item_owner.get_or_null(p_parent);
item_owner->child_items.push_back(canvas_item);
item_owner->children_order_dirty = true;
@@ -476,7 +476,7 @@ void RendererCanvasCull::canvas_item_set_parent(RID p_item, RID p_parent) {
}
void RendererCanvasCull::canvas_item_set_visible(RID p_item, bool p_visible) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->visible = p_visible;
@@ -485,35 +485,35 @@ void RendererCanvasCull::canvas_item_set_visible(RID p_item, bool p_visible) {
}
void RendererCanvasCull::canvas_item_set_light_mask(RID p_item, int p_mask) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->light_mask = p_mask;
}
void RendererCanvasCull::canvas_item_set_transform(RID p_item, const Transform2D &p_transform) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->xform = p_transform;
}
void RendererCanvasCull::canvas_item_set_clip(RID p_item, bool p_clip) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->clip = p_clip;
}
void RendererCanvasCull::canvas_item_set_distance_field_mode(RID p_item, bool p_enable) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->distance_field = p_enable;
}
void RendererCanvasCull::canvas_item_set_custom_rect(RID p_item, bool p_custom_rect, const Rect2 &p_rect) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->custom_rect = p_custom_rect;
@@ -521,35 +521,35 @@ void RendererCanvasCull::canvas_item_set_custom_rect(RID p_item, bool p_custom_r
}
void RendererCanvasCull::canvas_item_set_modulate(RID p_item, const Color &p_color) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->modulate = p_color;
}
void RendererCanvasCull::canvas_item_set_self_modulate(RID p_item, const Color &p_color) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->self_modulate = p_color;
}
void RendererCanvasCull::canvas_item_set_draw_behind_parent(RID p_item, bool p_enable) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->behind = p_enable;
}
void RendererCanvasCull::canvas_item_set_update_when_visible(RID p_item, bool p_update) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->update_when_visible = p_update;
}
void RendererCanvasCull::canvas_item_add_line(RID p_item, const Point2 &p_from, const Point2 &p_to, const Color &p_color, float p_width) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandPrimitive *line = canvas_item->alloc_command<Item::CommandPrimitive>();
@@ -573,7 +573,7 @@ void RendererCanvasCull::canvas_item_add_line(RID p_item, const Point2 &p_from,
void RendererCanvasCull::canvas_item_add_polyline(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, float p_width, bool p_antialiased) {
ERR_FAIL_COND(p_points.size() < 2);
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Color color = Color(1, 1, 1, 1);
@@ -714,7 +714,7 @@ void RendererCanvasCull::canvas_item_add_polyline(RID p_item, const Vector<Point
void RendererCanvasCull::canvas_item_add_multiline(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, float p_width) {
ERR_FAIL_COND(p_points.size() < 2);
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandPolygon *pline = canvas_item->alloc_command<Item::CommandPolygon>();
@@ -730,7 +730,7 @@ void RendererCanvasCull::canvas_item_add_multiline(RID p_item, const Vector<Poin
}
void RendererCanvasCull::canvas_item_add_rect(RID p_item, const Rect2 &p_rect, const Color &p_color) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandRect *rect = canvas_item->alloc_command<Item::CommandRect>();
@@ -740,7 +740,7 @@ void RendererCanvasCull::canvas_item_add_rect(RID p_item, const Rect2 &p_rect, c
}
void RendererCanvasCull::canvas_item_add_circle(RID p_item, const Point2 &p_pos, float p_radius, const Color &p_color) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandPolygon *circle = canvas_item->alloc_command<Item::CommandPolygon>();
@@ -776,7 +776,7 @@ void RendererCanvasCull::canvas_item_add_circle(RID p_item, const Point2 &p_pos,
}
void RendererCanvasCull::canvas_item_add_texture_rect(RID p_item, const Rect2 &p_rect, RID p_texture, bool p_tile, const Color &p_modulate, bool p_transpose) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandRect *rect = canvas_item->alloc_command<Item::CommandRect>();
@@ -806,8 +806,42 @@ void RendererCanvasCull::canvas_item_add_texture_rect(RID p_item, const Rect2 &p
rect->texture = p_texture;
}
+void RendererCanvasCull::canvas_item_add_msdf_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate, int p_outline_size, float p_px_range) {
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
+ ERR_FAIL_COND(!canvas_item);
+
+ Item::CommandRect *rect = canvas_item->alloc_command<Item::CommandRect>();
+ ERR_FAIL_COND(!rect);
+ rect->modulate = p_modulate;
+ rect->rect = p_rect;
+
+ rect->texture = p_texture;
+
+ rect->source = p_src_rect;
+ rect->flags = RendererCanvasRender::CANVAS_RECT_REGION | RendererCanvasRender::CANVAS_RECT_MSDF;
+
+ if (p_rect.size.x < 0) {
+ rect->flags |= RendererCanvasRender::CANVAS_RECT_FLIP_H;
+ rect->rect.size.x = -rect->rect.size.x;
+ }
+ if (p_src_rect.size.x < 0) {
+ rect->flags ^= RendererCanvasRender::CANVAS_RECT_FLIP_H;
+ rect->source.size.x = -rect->source.size.x;
+ }
+ if (p_rect.size.y < 0) {
+ rect->flags |= RendererCanvasRender::CANVAS_RECT_FLIP_V;
+ rect->rect.size.y = -rect->rect.size.y;
+ }
+ if (p_src_rect.size.y < 0) {
+ rect->flags ^= RendererCanvasRender::CANVAS_RECT_FLIP_V;
+ rect->source.size.y = -rect->source.size.y;
+ }
+ rect->outline = p_outline_size;
+ rect->px_range = p_px_range;
+}
+
void RendererCanvasCull::canvas_item_add_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate, bool p_transpose, bool p_clip_uv) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandRect *rect = canvas_item->alloc_command<Item::CommandRect>();
@@ -848,7 +882,7 @@ void RendererCanvasCull::canvas_item_add_texture_rect_region(RID p_item, const R
}
void RendererCanvasCull::canvas_item_add_nine_patch(RID p_item, const Rect2 &p_rect, const Rect2 &p_source, RID p_texture, const Vector2 &p_topleft, const Vector2 &p_bottomright, RS::NinePatchAxisMode p_x_axis_mode, RS::NinePatchAxisMode p_y_axis_mode, bool p_draw_center, const Color &p_modulate) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandNinePatch *style = canvas_item->alloc_command<Item::CommandNinePatch>();
@@ -872,7 +906,7 @@ void RendererCanvasCull::canvas_item_add_primitive(RID p_item, const Vector<Poin
uint32_t pc = p_points.size();
ERR_FAIL_COND(pc == 0 || pc > 4);
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandPrimitive *prim = canvas_item->alloc_command<Item::CommandPrimitive>();
@@ -898,7 +932,7 @@ void RendererCanvasCull::canvas_item_add_primitive(RID p_item, const Vector<Poin
}
void RendererCanvasCull::canvas_item_add_polygon(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
#ifdef DEBUG_ENABLED
int pointcount = p_points.size();
@@ -919,7 +953,7 @@ void RendererCanvasCull::canvas_item_add_polygon(RID p_item, const Vector<Point2
}
void RendererCanvasCull::canvas_item_add_triangle_array(RID p_item, const Vector<int> &p_indices, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, const Vector<int> &p_bones, const Vector<float> &p_weights, RID p_texture, int p_count) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
int vertex_count = p_points.size();
@@ -942,7 +976,7 @@ void RendererCanvasCull::canvas_item_add_triangle_array(RID p_item, const Vector
}
void RendererCanvasCull::canvas_item_add_set_transform(RID p_item, const Transform2D &p_transform) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandTransform *tr = canvas_item->alloc_command<Item::CommandTransform>();
@@ -951,7 +985,7 @@ void RendererCanvasCull::canvas_item_add_set_transform(RID p_item, const Transfo
}
void RendererCanvasCull::canvas_item_add_mesh(RID p_item, const RID &p_mesh, const Transform2D &p_transform, const Color &p_modulate, RID p_texture) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
ERR_FAIL_COND(!p_mesh.is_valid());
@@ -970,7 +1004,7 @@ void RendererCanvasCull::canvas_item_add_mesh(RID p_item, const RID &p_mesh, con
}
void RendererCanvasCull::canvas_item_add_particles(RID p_item, RID p_particles, RID p_texture) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandParticles *part = canvas_item->alloc_command<Item::CommandParticles>();
@@ -984,7 +1018,7 @@ void RendererCanvasCull::canvas_item_add_particles(RID p_item, RID p_particles,
}
void RendererCanvasCull::canvas_item_add_multimesh(RID p_item, RID p_mesh, RID p_texture) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandMultiMesh *mm = canvas_item->alloc_command<Item::CommandMultiMesh>();
@@ -995,7 +1029,7 @@ void RendererCanvasCull::canvas_item_add_multimesh(RID p_item, RID p_mesh, RID p
}
void RendererCanvasCull::canvas_item_add_clip_ignore(RID p_item, bool p_ignore) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandClipIgnore *ci = canvas_item->alloc_command<Item::CommandClipIgnore>();
@@ -1004,7 +1038,7 @@ void RendererCanvasCull::canvas_item_add_clip_ignore(RID p_item, bool p_ignore)
}
void RendererCanvasCull::canvas_item_add_animation_slice(RID p_item, double p_animation_length, double p_slice_begin, double p_slice_end, double p_offset) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandAnimationSlice *as = canvas_item->alloc_command<Item::CommandAnimationSlice>();
@@ -1016,7 +1050,7 @@ void RendererCanvasCull::canvas_item_add_animation_slice(RID p_item, double p_an
}
void RendererCanvasCull::canvas_item_set_sort_children_by_y(RID p_item, bool p_enable) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->sort_y = p_enable;
@@ -1027,21 +1061,21 @@ void RendererCanvasCull::canvas_item_set_sort_children_by_y(RID p_item, bool p_e
void RendererCanvasCull::canvas_item_set_z_index(RID p_item, int p_z) {
ERR_FAIL_COND(p_z < RS::CANVAS_ITEM_Z_MIN || p_z > RS::CANVAS_ITEM_Z_MAX);
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->z_index = p_z;
}
void RendererCanvasCull::canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->z_relative = p_enable;
}
void RendererCanvasCull::canvas_item_attach_skeleton(RID p_item, RID p_skeleton) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
if (canvas_item->skeleton == p_skeleton) {
return;
@@ -1070,7 +1104,7 @@ void RendererCanvasCull::canvas_item_attach_skeleton(RID p_item, RID p_skeleton)
}
void RendererCanvasCull::canvas_item_set_copy_to_backbuffer(RID p_item, bool p_enable, const Rect2 &p_rect) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
if (p_enable && (canvas_item->copy_back_buffer == nullptr)) {
canvas_item->copy_back_buffer = memnew(RendererCanvasRender::Item::CopyBackBuffer);
@@ -1087,25 +1121,25 @@ void RendererCanvasCull::canvas_item_set_copy_to_backbuffer(RID p_item, bool p_e
}
void RendererCanvasCull::canvas_item_clear(RID p_item) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->clear();
}
void RendererCanvasCull::canvas_item_set_draw_index(RID p_item, int p_index) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->index = p_index;
if (canvas_item_owner.owns(canvas_item->parent)) {
- Item *canvas_item_parent = canvas_item_owner.getornull(canvas_item->parent);
+ Item *canvas_item_parent = canvas_item_owner.get_or_null(canvas_item->parent);
canvas_item_parent->children_order_dirty = true;
return;
}
- Canvas *canvas = canvas_owner.getornull(canvas_item->parent);
+ Canvas *canvas = canvas_owner.get_or_null(canvas_item->parent);
if (canvas) {
canvas->children_order_dirty = true;
return;
@@ -1113,21 +1147,21 @@ void RendererCanvasCull::canvas_item_set_draw_index(RID p_item, int p_index) {
}
void RendererCanvasCull::canvas_item_set_material(RID p_item, RID p_material) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->material = p_material;
}
void RendererCanvasCull::canvas_item_set_use_parent_material(RID p_item, bool p_enable) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
canvas_item->use_parent_material = p_enable;
}
void RendererCanvasCull::canvas_item_set_visibility_notifier(RID p_item, bool p_enable, const Rect2 &p_area, const Callable &p_enter_callable, const Callable &p_exit_callable) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
if (p_enable) {
@@ -1147,7 +1181,7 @@ void RendererCanvasCull::canvas_item_set_visibility_notifier(RID p_item, bool p_
}
void RendererCanvasCull::canvas_item_set_canvas_group_mode(RID p_item, RS::CanvasGroupMode p_mode, float p_clear_margin, bool p_fit_empty, float p_fit_margin, bool p_blur_mipmaps) {
- Item *canvas_item = canvas_item_owner.getornull(p_item);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!canvas_item);
if (p_mode == RS::CANVAS_GROUP_MODE_DISABLED) {
@@ -1172,12 +1206,12 @@ RID RendererCanvasCull::canvas_light_allocate() {
}
void RendererCanvasCull::canvas_light_initialize(RID p_rid) {
canvas_light_owner.initialize_rid(p_rid);
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_rid);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_rid);
clight->light_internal = RSG::canvas_render->light_create();
}
void RendererCanvasCull::canvas_light_set_mode(RID p_light, RS::CanvasLightMode p_mode) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
if (clight->mode == p_mode) {
@@ -1198,11 +1232,11 @@ void RendererCanvasCull::canvas_light_set_mode(RID p_light, RS::CanvasLightMode
}
void RendererCanvasCull::canvas_light_attach_to_canvas(RID p_light, RID p_canvas) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
if (clight->canvas.is_valid()) {
- Canvas *canvas = canvas_owner.getornull(clight->canvas);
+ Canvas *canvas = canvas_owner.get_or_null(clight->canvas);
if (clight->mode == RS::CANVAS_LIGHT_MODE_POINT) {
canvas->lights.erase(clight);
} else {
@@ -1217,7 +1251,7 @@ void RendererCanvasCull::canvas_light_attach_to_canvas(RID p_light, RID p_canvas
clight->canvas = p_canvas;
if (clight->canvas.is_valid()) {
- Canvas *canvas = canvas_owner.getornull(clight->canvas);
+ Canvas *canvas = canvas_owner.get_or_null(clight->canvas);
if (clight->mode == RS::CANVAS_LIGHT_MODE_POINT) {
canvas->lights.insert(clight);
} else {
@@ -1227,28 +1261,28 @@ void RendererCanvasCull::canvas_light_attach_to_canvas(RID p_light, RID p_canvas
}
void RendererCanvasCull::canvas_light_set_enabled(RID p_light, bool p_enabled) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->enabled = p_enabled;
}
void RendererCanvasCull::canvas_light_set_texture_scale(RID p_light, float p_scale) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->scale = p_scale;
}
void RendererCanvasCull::canvas_light_set_transform(RID p_light, const Transform2D &p_transform) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->xform = p_transform;
}
void RendererCanvasCull::canvas_light_set_texture(RID p_light, RID p_texture) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
if (clight->texture == p_texture) {
@@ -1260,35 +1294,35 @@ void RendererCanvasCull::canvas_light_set_texture(RID p_light, RID p_texture) {
}
void RendererCanvasCull::canvas_light_set_texture_offset(RID p_light, const Vector2 &p_offset) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->texture_offset = p_offset;
}
void RendererCanvasCull::canvas_light_set_color(RID p_light, const Color &p_color) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->color = p_color;
}
void RendererCanvasCull::canvas_light_set_height(RID p_light, float p_height) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->height = p_height;
}
void RendererCanvasCull::canvas_light_set_energy(RID p_light, float p_energy) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->energy = p_energy;
}
void RendererCanvasCull::canvas_light_set_z_range(RID p_light, int p_min_z, int p_max_z) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->z_min = p_min_z;
@@ -1296,7 +1330,7 @@ void RendererCanvasCull::canvas_light_set_z_range(RID p_light, int p_min_z, int
}
void RendererCanvasCull::canvas_light_set_layer_range(RID p_light, int p_min_layer, int p_max_layer) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->layer_max = p_max_layer;
@@ -1304,35 +1338,35 @@ void RendererCanvasCull::canvas_light_set_layer_range(RID p_light, int p_min_lay
}
void RendererCanvasCull::canvas_light_set_item_cull_mask(RID p_light, int p_mask) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->item_mask = p_mask;
}
void RendererCanvasCull::canvas_light_set_item_shadow_cull_mask(RID p_light, int p_mask) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->item_shadow_mask = p_mask;
}
void RendererCanvasCull::canvas_light_set_directional_distance(RID p_light, float p_distance) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->directional_distance = p_distance;
}
void RendererCanvasCull::canvas_light_set_blend_mode(RID p_light, RS::CanvasLightBlendMode p_mode) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->blend_mode = p_mode;
}
void RendererCanvasCull::canvas_light_set_shadow_enabled(RID p_light, bool p_enabled) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
if (clight->use_shadow == p_enabled) {
@@ -1344,21 +1378,21 @@ void RendererCanvasCull::canvas_light_set_shadow_enabled(RID p_light, bool p_ena
}
void RendererCanvasCull::canvas_light_set_shadow_filter(RID p_light, RS::CanvasLightShadowFilter p_filter) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->shadow_filter = p_filter;
}
void RendererCanvasCull::canvas_light_set_shadow_color(RID p_light, const Color &p_color) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->shadow_color = p_color;
}
void RendererCanvasCull::canvas_light_set_shadow_smooth(RID p_light, float p_smooth) {
- RendererCanvasRender::Light *clight = canvas_light_owner.getornull(p_light);
+ RendererCanvasRender::Light *clight = canvas_light_owner.get_or_null(p_light);
ERR_FAIL_COND(!clight);
clight->shadow_smooth = p_smooth;
}
@@ -1371,11 +1405,11 @@ void RendererCanvasCull::canvas_light_occluder_initialize(RID p_rid) {
}
void RendererCanvasCull::canvas_light_occluder_attach_to_canvas(RID p_occluder, RID p_canvas) {
- RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.getornull(p_occluder);
+ RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.get_or_null(p_occluder);
ERR_FAIL_COND(!occluder);
if (occluder->canvas.is_valid()) {
- Canvas *canvas = canvas_owner.getornull(occluder->canvas);
+ Canvas *canvas = canvas_owner.get_or_null(occluder->canvas);
canvas->occluders.erase(occluder);
}
@@ -1386,24 +1420,24 @@ void RendererCanvasCull::canvas_light_occluder_attach_to_canvas(RID p_occluder,
occluder->canvas = p_canvas;
if (occluder->canvas.is_valid()) {
- Canvas *canvas = canvas_owner.getornull(occluder->canvas);
+ Canvas *canvas = canvas_owner.get_or_null(occluder->canvas);
canvas->occluders.insert(occluder);
}
}
void RendererCanvasCull::canvas_light_occluder_set_enabled(RID p_occluder, bool p_enabled) {
- RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.getornull(p_occluder);
+ RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.get_or_null(p_occluder);
ERR_FAIL_COND(!occluder);
occluder->enabled = p_enabled;
}
void RendererCanvasCull::canvas_light_occluder_set_polygon(RID p_occluder, RID p_polygon) {
- RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.getornull(p_occluder);
+ RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.get_or_null(p_occluder);
ERR_FAIL_COND(!occluder);
if (occluder->polygon.is_valid()) {
- LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.getornull(p_polygon);
+ LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get_or_null(p_polygon);
if (occluder_poly) {
occluder_poly->owners.erase(occluder);
}
@@ -1413,7 +1447,7 @@ void RendererCanvasCull::canvas_light_occluder_set_polygon(RID p_occluder, RID p
occluder->occluder = RID();
if (occluder->polygon.is_valid()) {
- LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.getornull(p_polygon);
+ LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get_or_null(p_polygon);
if (!occluder_poly) {
occluder->polygon = RID();
ERR_FAIL_COND(!occluder_poly);
@@ -1427,19 +1461,19 @@ void RendererCanvasCull::canvas_light_occluder_set_polygon(RID p_occluder, RID p
}
void RendererCanvasCull::canvas_light_occluder_set_as_sdf_collision(RID p_occluder, bool p_enable) {
- RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.getornull(p_occluder);
+ RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.get_or_null(p_occluder);
ERR_FAIL_COND(!occluder);
}
void RendererCanvasCull::canvas_light_occluder_set_transform(RID p_occluder, const Transform2D &p_xform) {
- RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.getornull(p_occluder);
+ RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.get_or_null(p_occluder);
ERR_FAIL_COND(!occluder);
occluder->xform = p_xform;
}
void RendererCanvasCull::canvas_light_occluder_set_light_mask(RID p_occluder, int p_mask) {
- RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.getornull(p_occluder);
+ RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.get_or_null(p_occluder);
ERR_FAIL_COND(!occluder);
occluder->light_mask = p_mask;
@@ -1450,12 +1484,12 @@ RID RendererCanvasCull::canvas_occluder_polygon_allocate() {
}
void RendererCanvasCull::canvas_occluder_polygon_initialize(RID p_rid) {
canvas_light_occluder_polygon_owner.initialize_rid(p_rid);
- LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.getornull(p_rid);
+ LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get_or_null(p_rid);
occluder_poly->occluder = RSG::canvas_render->occluder_polygon_create();
}
void RendererCanvasCull::canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed) {
- LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.getornull(p_occluder_polygon);
+ LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get_or_null(p_occluder_polygon);
ERR_FAIL_COND(!occluder_poly);
uint32_t pc = p_shape.size();
@@ -1479,7 +1513,7 @@ void RendererCanvasCull::canvas_occluder_polygon_set_shape(RID p_occluder_polygo
}
void RendererCanvasCull::canvas_occluder_polygon_set_cull_mode(RID p_occluder_polygon, RS::CanvasOccluderPolygonCullMode p_mode) {
- LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.getornull(p_occluder_polygon);
+ LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get_or_null(p_occluder_polygon);
ERR_FAIL_COND(!occluder_poly);
occluder_poly->cull_mode = p_mode;
RSG::canvas_render->occluder_polygon_set_cull_mode(occluder_poly->occluder, p_mode);
@@ -1516,12 +1550,12 @@ void RendererCanvasCull::canvas_texture_set_texture_repeat(RID p_canvas_texture,
}
void RendererCanvasCull::canvas_item_set_default_texture_filter(RID p_item, RS::CanvasItemTextureFilter p_filter) {
- Item *ci = canvas_item_owner.getornull(p_item);
+ Item *ci = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!ci);
ci->texture_filter = p_filter;
}
void RendererCanvasCull::canvas_item_set_default_texture_repeat(RID p_item, RS::CanvasItemTextureRepeat p_repeat) {
- Item *ci = canvas_item_owner.getornull(p_item);
+ Item *ci = canvas_item_owner.get_or_null(p_item);
ERR_FAIL_COND(!ci);
ci->texture_repeat = p_repeat;
}
@@ -1566,11 +1600,11 @@ void RendererCanvasCull::update_visibility_notifiers() {
bool RendererCanvasCull::free(RID p_rid) {
if (canvas_owner.owns(p_rid)) {
- Canvas *canvas = canvas_owner.getornull(p_rid);
+ Canvas *canvas = canvas_owner.get_or_null(p_rid);
ERR_FAIL_COND_V(!canvas, false);
while (canvas->viewports.size()) {
- RendererViewport::Viewport *vp = RSG::viewport->viewport_owner.getornull(canvas->viewports.front()->get());
+ RendererViewport::Viewport *vp = RSG::viewport->viewport_owner.get_or_null(canvas->viewports.front()->get());
ERR_FAIL_COND_V(!vp, true);
Map<RID, RendererViewport::Viewport::CanvasData>::Element *E = vp->canvas_map.find(p_rid);
@@ -1595,15 +1629,15 @@ bool RendererCanvasCull::free(RID p_rid) {
canvas_owner.free(p_rid);
} else if (canvas_item_owner.owns(p_rid)) {
- Item *canvas_item = canvas_item_owner.getornull(p_rid);
+ Item *canvas_item = canvas_item_owner.get_or_null(p_rid);
ERR_FAIL_COND_V(!canvas_item, true);
if (canvas_item->parent.is_valid()) {
if (canvas_owner.owns(canvas_item->parent)) {
- Canvas *canvas = canvas_owner.getornull(canvas_item->parent);
+ Canvas *canvas = canvas_owner.get_or_null(canvas_item->parent);
canvas->erase_item(canvas_item);
} else if (canvas_item_owner.owns(canvas_item->parent)) {
- Item *item_owner = canvas_item_owner.getornull(canvas_item->parent);
+ Item *item_owner = canvas_item_owner.get_or_null(canvas_item->parent);
item_owner->child_items.erase(canvas_item);
if (item_owner->sort_y) {
@@ -1629,11 +1663,11 @@ bool RendererCanvasCull::free(RID p_rid) {
canvas_item_owner.free(p_rid);
} else if (canvas_light_owner.owns(p_rid)) {
- RendererCanvasRender::Light *canvas_light = canvas_light_owner.getornull(p_rid);
+ RendererCanvasRender::Light *canvas_light = canvas_light_owner.get_or_null(p_rid);
ERR_FAIL_COND_V(!canvas_light, true);
if (canvas_light->canvas.is_valid()) {
- Canvas *canvas = canvas_owner.getornull(canvas_light->canvas);
+ Canvas *canvas = canvas_owner.get_or_null(canvas_light->canvas);
if (canvas) {
canvas->lights.erase(canvas_light);
}
@@ -1644,25 +1678,25 @@ bool RendererCanvasCull::free(RID p_rid) {
canvas_light_owner.free(p_rid);
} else if (canvas_light_occluder_owner.owns(p_rid)) {
- RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.getornull(p_rid);
+ RendererCanvasRender::LightOccluderInstance *occluder = canvas_light_occluder_owner.get_or_null(p_rid);
ERR_FAIL_COND_V(!occluder, true);
if (occluder->polygon.is_valid()) {
- LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.getornull(occluder->polygon);
+ LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get_or_null(occluder->polygon);
if (occluder_poly) {
occluder_poly->owners.erase(occluder);
}
}
if (occluder->canvas.is_valid() && canvas_owner.owns(occluder->canvas)) {
- Canvas *canvas = canvas_owner.getornull(occluder->canvas);
+ Canvas *canvas = canvas_owner.get_or_null(occluder->canvas);
canvas->occluders.erase(occluder);
}
canvas_light_occluder_owner.free(p_rid);
} else if (canvas_light_occluder_polygon_owner.owns(p_rid)) {
- LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.getornull(p_rid);
+ LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get_or_null(p_rid);
ERR_FAIL_COND_V(!occluder_poly, true);
RSG::canvas_render->free(occluder_poly->occluder);
diff --git a/servers/rendering/renderer_canvas_cull.h b/servers/rendering/renderer_canvas_cull.h
index 79b5450d14..5e343dcf02 100644
--- a/servers/rendering/renderer_canvas_cull.h
+++ b/servers/rendering/renderer_canvas_cull.h
@@ -222,6 +222,7 @@ public:
void canvas_item_add_circle(RID p_item, const Point2 &p_pos, float p_radius, const Color &p_color);
void canvas_item_add_texture_rect(RID p_item, const Rect2 &p_rect, RID p_texture, bool p_tile = false, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false);
void canvas_item_add_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, bool p_clip_uv = false);
+ void canvas_item_add_msdf_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), int p_outline_size = 0, float p_px_range = 1.0);
void canvas_item_add_nine_patch(RID p_item, const Rect2 &p_rect, const Rect2 &p_source, RID p_texture, const Vector2 &p_topleft, const Vector2 &p_bottomright, RS::NinePatchAxisMode p_x_axis_mode = RS::NINE_PATCH_STRETCH, RS::NinePatchAxisMode p_y_axis_mode = RS::NINE_PATCH_STRETCH, bool p_draw_center = true, const Color &p_modulate = Color(1, 1, 1));
void canvas_item_add_primitive(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture, float p_width = 1.0);
void canvas_item_add_polygon(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), RID p_texture = RID());
diff --git a/servers/rendering/renderer_canvas_render.h b/servers/rendering/renderer_canvas_render.h
index 8afe9ef410..04ddae4089 100644
--- a/servers/rendering/renderer_canvas_render.h
+++ b/servers/rendering/renderer_canvas_render.h
@@ -45,6 +45,7 @@ public:
CANVAS_RECT_TRANSPOSE = 16,
CANVAS_RECT_CLIP_UV = 32,
CANVAS_RECT_IS_GROUP = 64,
+ CANVAS_RECT_MSDF = 128,
};
struct Light {
@@ -193,11 +194,15 @@ public:
Color modulate;
Rect2 source;
uint8_t flags;
+ float outline;
+ float px_range;
RID texture;
CommandRect() {
flags = 0;
+ outline = 0;
+ px_range = 1;
type = TYPE_RECT;
}
};
diff --git a/servers/rendering/renderer_compositor.h b/servers/rendering/renderer_compositor.h
index 6206849b66..1971c3e781 100644
--- a/servers/rendering/renderer_compositor.h
+++ b/servers/rendering/renderer_compositor.h
@@ -41,7 +41,8 @@
class RendererSceneRender;
struct BlitToScreen {
RID render_target;
- Rect2i rect;
+ Rect2 src_rect = Rect2(0.0, 0.0, 1.0, 1.0);
+ Rect2i dst_rect;
struct {
bool use_layer = false;
diff --git a/servers/rendering/renderer_rd/effects_rd.cpp b/servers/rendering/renderer_rd/effects_rd.cpp
index 0c191fe2f7..236eb5e596 100644
--- a/servers/rendering/renderer_rd/effects_rd.cpp
+++ b/servers/rendering/renderer_rd/effects_rd.cpp
@@ -759,7 +759,7 @@ void EffectsRD::make_mipmap_raster(RID p_source_rd_texture, RID p_dest_framebuff
RD::get_singleton()->draw_list_end();
}
-void EffectsRD::copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dst_framebuffer, const Rect2 &p_rect, float p_z_near, float p_z_far, bool p_dp_flip) {
+void EffectsRD::copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dst_framebuffer, const Rect2 &p_rect, const Vector2 &p_dst_size, float p_z_near, float p_z_far, bool p_dp_flip) {
CopyToDPPushConstant push_constant;
push_constant.screen_rect[0] = p_rect.position.x;
push_constant.screen_rect[1] = p_rect.position.y;
@@ -767,7 +767,9 @@ void EffectsRD::copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dst_framebuffe
push_constant.screen_rect[3] = p_rect.size.height;
push_constant.z_far = p_z_far;
push_constant.z_near = p_z_near;
- push_constant.z_flip = p_dp_flip;
+ push_constant.texel_size[0] = 1.0f / p_dst_size.x;
+ push_constant.texel_size[1] = 1.0f / p_dst_size.y;
+ push_constant.texel_size[0] *= p_dp_flip ? -1.0f : 1.0f; // Encode dp flip as x size sign
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(p_dst_framebuffer, RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ);
RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, cube_to_dp.pipeline.get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_dst_framebuffer)));
@@ -810,6 +812,7 @@ void EffectsRD::tonemapper(RID p_source_color, RID p_dst_framebuffer, const Tone
tonemap.push_constant.exposure = p_settings.exposure;
tonemap.push_constant.white = p_settings.white;
tonemap.push_constant.auto_exposure_grey = p_settings.auto_exposure_grey;
+ tonemap.push_constant.luminance_multiplier = p_settings.luminance_multiplier;
tonemap.push_constant.use_color_correction = p_settings.use_color_correction;
@@ -862,6 +865,7 @@ void EffectsRD::tonemapper(RD::DrawListID p_subpass_draw_list, RID p_source_colo
tonemap.push_constant.use_color_correction = p_settings.use_color_correction;
tonemap.push_constant.use_debanding = p_settings.use_debanding;
+ tonemap.push_constant.luminance_multiplier = p_settings.luminance_multiplier;
RD::get_singleton()->draw_list_bind_render_pipeline(p_subpass_draw_list, tonemap.pipelines[mode].get_render_pipeline(RD::INVALID_ID, p_dst_format_id, false, RD::get_singleton()->draw_list_get_current_pass()));
RD::get_singleton()->draw_list_bind_uniform_set(p_subpass_draw_list, _get_uniform_set_for_input(p_source_color), 0);
@@ -2169,10 +2173,8 @@ EffectsRD::EffectsRD(bool p_prefer_raster_effects) {
for (int pass = 0; pass < 4; pass++) {
for (int subPass = 0; subPass < sub_pass_count; subPass++) {
int a = pass;
- int b = subPass;
-
int spmap[5]{ 0, 1, 4, 3, 2 };
- b = spmap[subPass];
+ int b = spmap[subPass];
float ca, sa;
float angle0 = (float(a) + float(b) / float(sub_pass_count)) * Math_PI * 0.5f;
diff --git a/servers/rendering/renderer_rd/effects_rd.h b/servers/rendering/renderer_rd/effects_rd.h
index 0c9b2efb7f..0db0919dbc 100644
--- a/servers/rendering/renderer_rd/effects_rd.h
+++ b/servers/rendering/renderer_rd/effects_rd.h
@@ -255,7 +255,7 @@ private:
float exposure; // 4 - 84
float white; // 4 - 88
float auto_exposure_grey; // 4 - 92
- uint32_t pad2; // 4 - 96
+ float luminance_multiplier; // 4 - 96
float pixel_size[2]; // 8 - 104
uint32_t use_fxaa; // 4 - 108
@@ -308,7 +308,7 @@ private:
float exposure_adjust;
float min_luminance;
float max_luminance;
- float pad[1];
+ uint32_t pad1;
};
struct LuminanceReduceFragment {
@@ -321,8 +321,7 @@ private:
struct CopyToDPPushConstant {
float z_far;
float z_near;
- uint32_t z_flip;
- uint32_t pad;
+ float texel_size[2];
float screen_rect[4];
};
@@ -770,7 +769,7 @@ public:
void cubemap_roughness_raster(RID p_source_rd_texture, RID p_dest_framebuffer, uint32_t p_face_id, uint32_t p_sample_count, float p_roughness, float p_size);
void make_mipmap(RID p_source_rd_texture, RID p_dest_texture, const Size2i &p_size);
void make_mipmap_raster(RID p_source_rd_texture, RID p_dest_framebuffer, const Size2i &p_size);
- void copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dest_texture, const Rect2 &p_rect, float p_z_near, float p_z_far, bool p_dp_flip);
+ void copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dst_framebuffer, const Rect2 &p_rect, const Vector2 &p_dst_size, float p_z_near, float p_z_far, bool p_dp_flip);
void luminance_reduction(RID p_source_texture, const Size2i p_source_size, const Vector<RID> p_reduce, RID p_prev_luminance, float p_min_luminance, float p_max_luminance, float p_adjust, bool p_set = false);
void luminance_reduction_raster(RID p_source_texture, const Size2i p_source_size, const Vector<RID> p_reduce, Vector<RID> p_fb, RID p_prev_luminance, float p_min_luminance, float p_max_luminance, float p_adjust, bool p_set = false);
@@ -819,6 +818,7 @@ public:
bool use_auto_exposure = false;
float auto_exposure_grey = 0.5;
RID exposure_texture;
+ float luminance_multiplier = 1.0;
bool use_bcs = false;
float brightness = 1.0;
diff --git a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp
index 611f7c6494..2377702738 100644
--- a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp
+++ b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp
@@ -223,7 +223,6 @@ void RenderForwardClustered::RenderBufferDataForwardClustered::configure(RID p_c
RD::TEXTURE_SAMPLES_2,
RD::TEXTURE_SAMPLES_4,
RD::TEXTURE_SAMPLES_8,
- RD::TEXTURE_SAMPLES_16
};
texture_samples = ts[p_msaa];
@@ -484,7 +483,7 @@ void RenderForwardClustered::_render_list_template(RenderingDevice::DrawListID p
if (material_uniform_set != prev_material_uniform_set) {
// Update uniform set.
- if (RD::get_singleton()->uniform_set_is_valid(material_uniform_set)) { // Material may not have a uniform set.
+ if (material_uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(material_uniform_set)) { // Material may not have a uniform set.
RD::get_singleton()->draw_list_bind_uniform_set(draw_list, material_uniform_set, MATERIAL_UNIFORM_SET);
}
@@ -1163,7 +1162,7 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
render_buffer = (RenderBufferDataForwardClustered *)render_buffers_get_data(p_render_data->render_buffers);
}
RendererSceneEnvironmentRD *env = get_environment(p_render_data->environment);
- static const int texture_multisamples[RS::VIEWPORT_MSAA_MAX] = { 1, 2, 4, 8, 16 };
+ static const int texture_multisamples[RS::VIEWPORT_MSAA_MAX] = { 1, 2, 4, 8 };
//first of all, make a new render pass
//fill up ubo
@@ -2552,7 +2551,7 @@ void RenderForwardClustered::_geometry_instance_add_surface_with_material(Geomet
SceneShaderForwardClustered::MaterialData *material_shadow = nullptr;
void *surface_shadow = nullptr;
- if (!p_material->shader_data->uses_particle_trails && !p_material->shader_data->writes_modelview_or_projection && !p_material->shader_data->uses_vertex && !p_material->shader_data->uses_discard && !p_material->shader_data->uses_depth_pre_pass) {
+ if (!p_material->shader_data->uses_particle_trails && !p_material->shader_data->writes_modelview_or_projection && !p_material->shader_data->uses_vertex && !p_material->shader_data->uses_position && !p_material->shader_data->uses_discard && !p_material->shader_data->uses_depth_pre_pass) {
flags |= GeometryInstanceSurfaceDataCache::FLAG_USES_SHARED_SHADOW_MATERIAL;
material_shadow = (SceneShaderForwardClustered::MaterialData *)storage->material_get_data(scene_shader.default_material, RendererStorageRD::SHADER_TYPE_3D);
@@ -2696,7 +2695,7 @@ void RenderForwardClustered::_geometry_instance_update(GeometryInstance *p_geome
} break;
#if 0
case RS::INSTANCE_IMMEDIATE: {
- RasterizerStorageGLES3::Immediate *immediate = storage->immediate_owner.getornull(inst->base);
+ RasterizerStorageGLES3::Immediate *immediate = storage->immediate_owner.get_or_null(inst->base);
ERR_CONTINUE(!immediate);
_add_geometry(immediate, inst, nullptr, -1, p_depth_pass, p_shadow_pass);
diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
index be18a73989..1947680a7a 100644
--- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
+++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp
@@ -66,6 +66,7 @@ void SceneShaderForwardClustered::ShaderData::set_code(const String &p_code) {
unshaded = false;
uses_vertex = false;
+ uses_position = false;
uses_sss = false;
uses_transmittance = false;
uses_screen_texture = false;
@@ -126,6 +127,7 @@ void SceneShaderForwardClustered::ShaderData::set_code(const String &p_code) {
actions.write_flag_pointers["MODELVIEW_MATRIX"] = &writes_modelview_or_projection;
actions.write_flag_pointers["PROJECTION_MATRIX"] = &writes_modelview_or_projection;
actions.write_flag_pointers["VERTEX"] = &uses_vertex;
+ actions.write_flag_pointers["POSITION"] = &uses_position;
actions.uniforms = &uniforms;
@@ -601,10 +603,10 @@ void SceneShaderForwardClustered::init(RendererStorageRD *p_storage, const Strin
actions.usage_defines["UV2"] = "#define UV2_USED\n";
actions.usage_defines["BONE_INDICES"] = "#define BONES_USED\n";
actions.usage_defines["BONE_WEIGHTS"] = "#define WEIGHTS_USED\n";
- actions.usage_defines["CUSTOM0"] = "#define CUSTOM0\n";
- actions.usage_defines["CUSTOM1"] = "#define CUSTOM1\n";
- actions.usage_defines["CUSTOM2"] = "#define CUSTOM2\n";
- actions.usage_defines["CUSTOM3"] = "#define CUSTOM3\n";
+ actions.usage_defines["CUSTOM0"] = "#define CUSTOM0_USED\n";
+ actions.usage_defines["CUSTOM1"] = "#define CUSTOM1_USED\n";
+ actions.usage_defines["CUSTOM2"] = "#define CUSTOM2_USED\n";
+ actions.usage_defines["CUSTOM3"] = "#define CUSTOM3_USED\n";
actions.usage_defines["NORMAL_MAP"] = "#define NORMAL_MAP_USED\n";
actions.usage_defines["NORMAL_MAP_DEPTH"] = "@NORMAL_MAP";
actions.usage_defines["COLOR"] = "#define COLOR_USED\n";
@@ -683,6 +685,8 @@ void SceneShaderForwardClustered::init(RendererStorageRD *p_storage, const Strin
default_shader = storage->shader_allocate();
storage->shader_initialize(default_shader);
storage->shader_set_code(default_shader, R"(
+// Default 3D material shader (clustered).
+
shader_type spatial;
void vertex() {
@@ -712,6 +716,8 @@ void fragment() {
storage->shader_initialize(overdraw_material_shader);
// Use relatively low opacity so that more "layers" of overlapping objects can be distinguished.
storage->shader_set_code(overdraw_material_shader, R"(
+// 3D editor Overdraw debug draw mode shader (clustered).
+
shader_type spatial;
render_mode blend_add, unshaded;
diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h
index 8d75f30a20..09ef425e2e 100644
--- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h
+++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.h
@@ -137,6 +137,7 @@ public:
bool unshaded;
bool uses_vertex;
+ bool uses_position;
bool uses_sss;
bool uses_transmittance;
bool uses_screen_texture;
diff --git a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp
index 2064d9c5c5..75de2f6fbd 100644
--- a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp
+++ b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp
@@ -86,12 +86,13 @@ void RenderForwardMobile::RenderBufferDataForwardMobile::clear() {
void RenderForwardMobile::RenderBufferDataForwardMobile::configure(RID p_color_buffer, RID p_depth_buffer, RID p_target_buffer, int p_width, int p_height, RS::ViewportMSAA p_msaa, uint32_t p_view_count) {
clear();
- bool is_half_resolution = false; // Set this once we support this feature.
-
msaa = p_msaa;
+ Size2i target_size = RD::get_singleton()->texture_size(p_target_buffer);
+
width = p_width;
height = p_height;
+ bool is_scaled = (target_size.width != p_width) || (target_size.height != p_height);
view_count = p_view_count;
color = p_color_buffer;
@@ -124,7 +125,7 @@ void RenderForwardMobile::RenderBufferDataForwardMobile::configure(RID p_color_b
passes.push_back(pass);
color_fbs[FB_CONFIG_THREE_SUBPASSES] = RD::get_singleton()->framebuffer_create_multipass(fb, passes, RenderingDevice::INVALID_ID, view_count);
- if (!is_half_resolution) {
+ if (!is_scaled) {
// - add blit to 2D pass
fb.push_back(p_target_buffer); // 2 - target buffer
@@ -158,7 +159,6 @@ void RenderForwardMobile::RenderBufferDataForwardMobile::configure(RID p_color_b
RD::TEXTURE_SAMPLES_2,
RD::TEXTURE_SAMPLES_4,
RD::TEXTURE_SAMPLES_8,
- RD::TEXTURE_SAMPLES_16
};
texture_samples = ts[p_msaa];
@@ -211,7 +211,7 @@ void RenderForwardMobile::RenderBufferDataForwardMobile::configure(RID p_color_b
color_fbs[FB_CONFIG_ONE_PASS] = RD::get_singleton()->framebuffer_create_multipass(fb, one_pass_with_resolve, RenderingDevice::INVALID_ID, view_count);
}
- if (!is_half_resolution) {
+ if (!is_scaled) {
// - add blit to 2D pass
fb.push_back(p_target_buffer); // 3 - target buffer
RD::FramebufferPass blit_pass;
@@ -271,6 +271,12 @@ bool RenderForwardMobile::free(RID p_rid) {
/* Render functions */
+float RenderForwardMobile::_render_buffers_get_luminance_multiplier() {
+ // On mobile renderer we need to multiply source colors by 2 due to using a UNORM buffer
+ // and multiplying by the output color during 3D rendering by 0.5
+ return 2.0;
+}
+
RD::DataFormat RenderForwardMobile::_render_buffers_get_color_format() {
// Using 32bit buffers enables AFBC on mobile devices which should have a definite performance improvement (MALI G710 and newer support this on 64bit RTs)
return RD::DATA_FORMAT_A2B10G10R10_UNORM_PACK32;
@@ -491,7 +497,6 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
bool using_subpass_transparent = true;
bool using_subpass_post_process = true;
- bool is_half_resolution = false; // Set this once we support this feature.
bool using_ssr = false; // I don't think we support this in our mobile renderer so probably should phase it out
bool using_sss = false; // I don't think we support this in our mobile renderer so probably should phase it out
@@ -512,7 +517,7 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
screen_size.x = render_buffer->width;
screen_size.y = render_buffer->height;
- if (is_half_resolution) {
+ if (render_buffer->color_fbs[FB_CONFIG_FOUR_SUBPASSES].is_null()) {
// can't do blit subpass
using_subpass_post_process = false;
} else if (env && (env->glow_enabled || env->auto_exposure || camera_effects_uses_dof(p_render_data->camera_effects))) {
@@ -631,7 +636,7 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
RID sky_rid = env->sky;
if (sky_rid.is_valid()) {
- sky.update(env, projection, p_render_data->cam_transform, time);
+ sky.update(env, projection, p_render_data->cam_transform, time, _render_buffers_get_luminance_multiplier());
radiance_texture = sky.sky_get_radiance_texture_rd(sky_rid);
} else {
// do not try to draw sky if invalid
@@ -750,9 +755,9 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
CameraMatrix correction;
correction.set_depth_correction(true);
CameraMatrix projection = correction * p_render_data->cam_projection;
- sky.draw(draw_list, env, framebuffer, 1, &projection, p_render_data->cam_transform, time);
+ sky.draw(draw_list, env, framebuffer, 1, &projection, p_render_data->cam_transform, time, _render_buffers_get_luminance_multiplier());
} else {
- sky.draw(draw_list, env, framebuffer, p_render_data->view_count, p_render_data->view_projection, p_render_data->cam_transform, time);
+ sky.draw(draw_list, env, framebuffer, p_render_data->view_count, p_render_data->view_projection, p_render_data->cam_transform, time, _render_buffers_get_luminance_multiplier());
}
RD::get_singleton()->draw_command_end_label(); // Draw Sky Subpass
@@ -1976,7 +1981,7 @@ void RenderForwardMobile::_render_list_template(RenderingDevice::DrawListID p_dr
if (material_uniform_set != prev_material_uniform_set) {
// Update uniform set.
- if (RD::get_singleton()->uniform_set_is_valid(material_uniform_set)) { // Material may not have a uniform set.
+ if (material_uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(material_uniform_set)) { // Material may not have a uniform set.
RD::get_singleton()->draw_list_bind_uniform_set(draw_list, material_uniform_set, MATERIAL_UNIFORM_SET);
}
@@ -2435,7 +2440,7 @@ void RenderForwardMobile::_geometry_instance_update(GeometryInstance *p_geometry
} break;
#if 0
case RS::INSTANCE_IMMEDIATE: {
- RasterizerStorageGLES3::Immediate *immediate = storage->immediate_owner.getornull(inst->base);
+ RasterizerStorageGLES3::Immediate *immediate = storage->immediate_owner.get_or_null(inst->base);
ERR_CONTINUE(!immediate);
_add_geometry(immediate, inst, nullptr, -1, p_depth_pass, p_shadow_pass);
diff --git a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h
index 764d8e80df..38f80c5347 100644
--- a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h
+++ b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h
@@ -202,6 +202,7 @@ protected:
}
};
+ virtual float _render_buffers_get_luminance_multiplier() override;
virtual RD::DataFormat _render_buffers_get_color_format() override;
virtual bool _render_buffers_can_be_storage() override;
diff --git a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
index 735014a2ec..cd314d8c56 100644
--- a/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
+++ b/servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp
@@ -593,10 +593,10 @@ void SceneShaderForwardMobile::init(RendererStorageRD *p_storage, const String p
actions.usage_defines["UV2"] = "#define UV2_USED\n";
actions.usage_defines["BONE_INDICES"] = "#define BONES_USED\n";
actions.usage_defines["BONE_WEIGHTS"] = "#define WEIGHTS_USED\n";
- actions.usage_defines["CUSTOM0"] = "#define CUSTOM0\n";
- actions.usage_defines["CUSTOM1"] = "#define CUSTOM1\n";
- actions.usage_defines["CUSTOM2"] = "#define CUSTOM2\n";
- actions.usage_defines["CUSTOM3"] = "#define CUSTOM3\n";
+ actions.usage_defines["CUSTOM0"] = "#define CUSTOM0_USED\n";
+ actions.usage_defines["CUSTOM1"] = "#define CUSTOM1_USED\n";
+ actions.usage_defines["CUSTOM2"] = "#define CUSTOM2_USED\n";
+ actions.usage_defines["CUSTOM3"] = "#define CUSTOM3_USED\n";
actions.usage_defines["NORMAL_MAP"] = "#define NORMAL_MAP_USED\n";
actions.usage_defines["NORMAL_MAP_DEPTH"] = "@NORMAL_MAP";
actions.usage_defines["COLOR"] = "#define COLOR_USED\n";
@@ -665,6 +665,8 @@ void SceneShaderForwardMobile::init(RendererStorageRD *p_storage, const String p
actions.global_buffer_array_variable = "global_variables.data";
actions.instance_uniform_index_variable = "draw_call.instance_uniforms_ofs";
+ actions.apply_luminance_multiplier = true; // apply luminance multiplier to screen texture
+
compiler.initialize(actions);
}
@@ -673,6 +675,8 @@ void SceneShaderForwardMobile::init(RendererStorageRD *p_storage, const String p
default_shader = storage->shader_allocate();
storage->shader_initialize(default_shader);
storage->shader_set_code(default_shader, R"(
+// Default 3D material shader (mobile).
+
shader_type spatial;
void vertex() {
@@ -701,6 +705,8 @@ void fragment() {
storage->shader_initialize(overdraw_material_shader);
// Use relatively low opacity so that more "layers" of overlapping objects can be distinguished.
storage->shader_set_code(overdraw_material_shader, R"(
+// 3D editor Overdraw debug draw mode shader (mobile).
+
shader_type spatial;
render_mode blend_add, unshaded;
diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
index f8aefdb29c..673df00c18 100644
--- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
@@ -541,6 +541,14 @@ void RendererCanvasRenderRD::_render_item(RD::DrawListID p_draw_list, RID p_rend
src_rect = Rect2(0, 0, 1, 1);
}
+ if (rect->flags & CANVAS_RECT_MSDF) {
+ push_constant.flags |= FLAGS_USE_MSDF;
+ push_constant.msdf[0] = rect->px_range; // Pixel range.
+ push_constant.msdf[1] = rect->outline; // Outline size.
+ push_constant.msdf[2] = 0.f; // Reserved.
+ push_constant.msdf[3] = 0.f; // Reserved.
+ }
+
push_constant.modulation[0] = rect->modulate.r * base_color.r;
push_constant.modulation[1] = rect->modulate.g * base_color.g;
push_constant.modulation[2] = rect->modulate.b * base_color.b;
@@ -1078,7 +1086,7 @@ void RendererCanvasRenderRD::_render_items(RID p_to_render_target, int p_item_co
}
}
- RID material = ci->material;
+ RID material = ci->material_owner == nullptr ? ci->material : ci->material_owner->material;
if (material.is_null() && ci->canvas_group != nullptr) {
material = default_canvas_group_material;
@@ -1094,7 +1102,7 @@ void RendererCanvasRenderRD::_render_items(RID p_to_render_target, int p_item_co
if (material_data->shader_data->version.is_valid() && material_data->shader_data->valid) {
pipeline_variants = &material_data->shader_data->pipeline_variants;
// Update uniform set.
- if (RD::get_singleton()->uniform_set_is_valid(material_data->uniform_set)) { // Material may not have a uniform set.
+ if (material_data->uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(material_data->uniform_set)) { // Material may not have a uniform set.
RD::get_singleton()->draw_list_bind_uniform_set(draw_list, material_data->uniform_set, MATERIAL_UNIFORM_SET);
}
} else {
@@ -1136,7 +1144,7 @@ void RendererCanvasRenderRD::canvas_render_items(RID p_to_render_target, Item *p
continue;
}
- CanvasLight *clight = canvas_light_owner.getornull(l->light_internal);
+ CanvasLight *clight = canvas_light_owner.get_or_null(l->light_internal);
if (!clight) { //unused or invalid texture
l->render_index_cache = -1;
l = l->next_ptr;
@@ -1199,7 +1207,7 @@ void RendererCanvasRenderRD::canvas_render_items(RID p_to_render_target, Item *p
continue;
}
- CanvasLight *clight = canvas_light_owner.getornull(l->light_internal);
+ CanvasLight *clight = canvas_light_owner.get_or_null(l->light_internal);
if (!clight) { //unused or invalid texture
l->render_index_cache = -1;
l = l->next_ptr;
@@ -1346,8 +1354,10 @@ void RendererCanvasRenderRD::canvas_render_items(RID p_to_render_target, Item *p
}
}
- if (ci->material.is_valid()) {
- MaterialData *md = (MaterialData *)storage->material_get_data(ci->material, RendererStorageRD::SHADER_TYPE_2D);
+ RID material = ci->material_owner == nullptr ? ci->material : ci->material_owner->material;
+
+ if (material.is_valid()) {
+ MaterialData *md = (MaterialData *)storage->material_get_data(material, RendererStorageRD::SHADER_TYPE_2D);
if (md && md->shader_data->valid) {
if (md->shader_data->uses_screen_texture && canvas_group_owner == nullptr) {
if (!material_screen_texture_found) {
@@ -1367,7 +1377,7 @@ void RendererCanvasRenderRD::canvas_render_items(RID p_to_render_target, Item *p
if (!RD::get_singleton()->uniform_set_is_valid(md->uniform_set)) {
// uniform set may be gone because a dependency was erased. In this case, it will happen
// if a texture is deleted, so just re-create it.
- storage->material_force_update_textures(ci->material, RendererStorageRD::SHADER_TYPE_2D);
+ storage->material_force_update_textures(material, RendererStorageRD::SHADER_TYPE_2D);
}
}
}
@@ -1384,6 +1394,7 @@ void RendererCanvasRenderRD::canvas_render_items(RID p_to_render_target, Item *p
update_skeletons = true;
}
}
+ c = c->next;
}
}
@@ -1470,7 +1481,7 @@ RID RendererCanvasRenderRD::light_create() {
}
void RendererCanvasRenderRD::light_set_texture(RID p_rid, RID p_texture) {
- CanvasLight *cl = canvas_light_owner.getornull(p_rid);
+ CanvasLight *cl = canvas_light_owner.get_or_null(p_rid);
ERR_FAIL_COND(!cl);
if (cl->texture == p_texture) {
return;
@@ -1486,7 +1497,7 @@ void RendererCanvasRenderRD::light_set_texture(RID p_rid, RID p_texture) {
}
void RendererCanvasRenderRD::light_set_use_shadow(RID p_rid, bool p_enable) {
- CanvasLight *cl = canvas_light_owner.getornull(p_rid);
+ CanvasLight *cl = canvas_light_owner.get_or_null(p_rid);
ERR_FAIL_COND(!cl);
cl->shadow.enabled = p_enable;
@@ -1526,7 +1537,7 @@ void RendererCanvasRenderRD::_update_shadow_atlas() {
}
}
void RendererCanvasRenderRD::light_update_shadow(RID p_rid, int p_shadow_index, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders) {
- CanvasLight *cl = canvas_light_owner.getornull(p_rid);
+ CanvasLight *cl = canvas_light_owner.get_or_null(p_rid);
ERR_FAIL_COND(!cl->shadow.enabled);
_update_shadow_atlas();
@@ -1580,7 +1591,7 @@ void RendererCanvasRenderRD::light_update_shadow(RID p_rid, int p_shadow_index,
LightOccluderInstance *instance = p_occluders;
while (instance) {
- OccluderPolygon *co = occluder_polygon_owner.getornull(instance->occluder);
+ OccluderPolygon *co = occluder_polygon_owner.get_or_null(instance->occluder);
if (!co || co->index_array.is_null() || !(p_light_mask & instance->light_mask)) {
instance = instance->next;
@@ -1604,14 +1615,14 @@ void RendererCanvasRenderRD::light_update_shadow(RID p_rid, int p_shadow_index,
}
void RendererCanvasRenderRD::light_update_directional_shadow(RID p_rid, int p_shadow_index, const Transform2D &p_light_xform, int p_light_mask, float p_cull_distance, const Rect2 &p_clip_rect, LightOccluderInstance *p_occluders) {
- CanvasLight *cl = canvas_light_owner.getornull(p_rid);
+ CanvasLight *cl = canvas_light_owner.get_or_null(p_rid);
ERR_FAIL_COND(!cl->shadow.enabled);
_update_shadow_atlas();
Vector2 light_dir = p_light_xform.elements[1].normalized();
- Vector2 center = p_clip_rect.position + p_clip_rect.size * 0.5;
+ Vector2 center = p_clip_rect.get_center();
float to_edge_distance = ABS(light_dir.dot(p_clip_rect.get_support(light_dir)) - light_dir.dot(center));
@@ -1655,7 +1666,7 @@ void RendererCanvasRenderRD::light_update_directional_shadow(RID p_rid, int p_sh
LightOccluderInstance *instance = p_occluders;
while (instance) {
- OccluderPolygon *co = occluder_polygon_owner.getornull(instance->occluder);
+ OccluderPolygon *co = occluder_polygon_owner.get_or_null(instance->occluder);
if (!co || co->index_array.is_null() || !(p_light_mask & instance->light_mask)) {
instance = instance->next;
@@ -1721,7 +1732,7 @@ void RendererCanvasRenderRD::render_sdf(RID p_render_target, LightOccluderInstan
LightOccluderInstance *instance = p_occluders;
while (instance) {
- OccluderPolygon *co = occluder_polygon_owner.getornull(instance->occluder);
+ OccluderPolygon *co = occluder_polygon_owner.get_or_null(instance->occluder);
if (!co || co->sdf_index_array.is_null()) {
instance = instance->next;
@@ -1755,7 +1766,7 @@ RID RendererCanvasRenderRD::occluder_polygon_create() {
}
void RendererCanvasRenderRD::occluder_polygon_set_shape(RID p_occluder, const Vector<Vector2> &p_points, bool p_closed) {
- OccluderPolygon *oc = occluder_polygon_owner.getornull(p_occluder);
+ OccluderPolygon *oc = occluder_polygon_owner.get_or_null(p_occluder);
ERR_FAIL_COND(!oc);
Vector<Vector2> lines;
@@ -1924,7 +1935,7 @@ void RendererCanvasRenderRD::occluder_polygon_set_shape(RID p_occluder, const Ve
}
void RendererCanvasRenderRD::occluder_polygon_set_cull_mode(RID p_occluder, RS::CanvasOccluderPolygonCullMode p_mode) {
- OccluderPolygon *oc = occluder_polygon_owner.getornull(p_occluder);
+ OccluderPolygon *oc = occluder_polygon_owner.get_or_null(p_occluder);
ERR_FAIL_COND(!oc);
oc->cull_mode = p_mode;
}
@@ -2575,6 +2586,8 @@ RendererCanvasRenderRD::RendererCanvasRenderRD(RendererStorageRD *p_storage) {
storage->shader_initialize(default_canvas_group_shader);
storage->shader_set_code(default_canvas_group_shader, R"(
+// Default CanvasGroup shader.
+
shader_type canvas_item;
void fragment() {
@@ -2598,7 +2611,7 @@ void fragment() {
bool RendererCanvasRenderRD::free(RID p_rid) {
if (canvas_light_owner.owns(p_rid)) {
- CanvasLight *cl = canvas_light_owner.getornull(p_rid);
+ CanvasLight *cl = canvas_light_owner.get_or_null(p_rid);
ERR_FAIL_COND_V(!cl, false);
light_set_use_shadow(p_rid, false);
canvas_light_owner.free(p_rid);
diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.h b/servers/rendering/renderer_rd/renderer_canvas_render_rd.h
index 7c4f62832c..ec7d7e2854 100644
--- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.h
+++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.h
@@ -84,8 +84,9 @@ class RendererCanvasRenderRD : public RendererCanvasRender {
FLAGS_LIGHT_COUNT_SHIFT = 20,
FLAGS_DEFAULT_NORMAL_MAP_USED = (1 << 26),
- FLAGS_DEFAULT_SPECULAR_MAP_USED = (1 << 27)
+ FLAGS_DEFAULT_SPECULAR_MAP_USED = (1 << 27),
+ FLAGS_USE_MSDF = (1 << 28),
};
enum {
@@ -388,7 +389,10 @@ class RendererCanvasRenderRD : public RendererCanvasRender {
//rect
struct {
float modulation[4];
- float ninepatch_margins[4];
+ union {
+ float msdf[4];
+ float ninepatch_margins[4];
+ };
float dst_rect[4];
float src_rect[4];
float pad[2];
diff --git a/servers/rendering/renderer_rd/renderer_compositor_rd.cpp b/servers/rendering/renderer_rd/renderer_compositor_rd.cpp
index 62e9386f95..559e6d5ad7 100644
--- a/servers/rendering/renderer_rd/renderer_compositor_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_compositor_rd.cpp
@@ -46,6 +46,8 @@ void RendererCompositorRD::blit_render_targets_to_screen(DisplayServer::WindowID
RID rd_texture = storage->texture_get_rd_texture(texture);
ERR_CONTINUE(rd_texture.is_null());
+ // TODO if keep_3d_linear was set when rendering to this render target we need to add a linear->sRGB conversion in.
+
if (!render_target_descriptors.has(rd_texture) || !RD::get_singleton()->uniform_set_is_valid(render_target_descriptors[rd_texture])) {
Vector<RD::Uniform> uniforms;
RD::Uniform u;
@@ -65,10 +67,14 @@ void RendererCompositorRD::blit_render_targets_to_screen(DisplayServer::WindowID
RD::get_singleton()->draw_list_bind_index_array(draw_list, blit.array);
RD::get_singleton()->draw_list_bind_uniform_set(draw_list, render_target_descriptors[rd_texture], 0);
- blit.push_constant.rect[0] = p_render_targets[i].rect.position.x / screen_size.width;
- blit.push_constant.rect[1] = p_render_targets[i].rect.position.y / screen_size.height;
- blit.push_constant.rect[2] = p_render_targets[i].rect.size.width / screen_size.width;
- blit.push_constant.rect[3] = p_render_targets[i].rect.size.height / screen_size.height;
+ blit.push_constant.src_rect[0] = p_render_targets[i].src_rect.position.x;
+ blit.push_constant.src_rect[1] = p_render_targets[i].src_rect.position.y;
+ blit.push_constant.src_rect[2] = p_render_targets[i].src_rect.size.width;
+ blit.push_constant.src_rect[3] = p_render_targets[i].src_rect.size.height;
+ blit.push_constant.dst_rect[0] = p_render_targets[i].dst_rect.position.x / screen_size.width;
+ blit.push_constant.dst_rect[1] = p_render_targets[i].dst_rect.position.y / screen_size.height;
+ blit.push_constant.dst_rect[2] = p_render_targets[i].dst_rect.size.width / screen_size.width;
+ blit.push_constant.dst_rect[3] = p_render_targets[i].dst_rect.size.height / screen_size.height;
blit.push_constant.layer = p_render_targets[i].multi_view.layer;
blit.push_constant.eye_center[0] = p_render_targets[i].lens_distortion.eye_center.x;
blit.push_constant.eye_center[1] = p_render_targets[i].lens_distortion.eye_center.y;
@@ -191,7 +197,7 @@ void RendererCompositorRD::set_boot_image(const Ref<Image> &p_image, const Color
}
} else {
screenrect = imgrect;
- screenrect.position += ((Size2(window_size.width, window_size.height) - screenrect.size) / 2.0).floor();
+ screenrect.position += ((window_size - screenrect.size) / 2.0).floor();
}
screenrect.position /= window_size;
@@ -203,10 +209,14 @@ void RendererCompositorRD::set_boot_image(const Ref<Image> &p_image, const Color
RD::get_singleton()->draw_list_bind_index_array(draw_list, blit.array);
RD::get_singleton()->draw_list_bind_uniform_set(draw_list, uset, 0);
- blit.push_constant.rect[0] = screenrect.position.x;
- blit.push_constant.rect[1] = screenrect.position.y;
- blit.push_constant.rect[2] = screenrect.size.width;
- blit.push_constant.rect[3] = screenrect.size.height;
+ blit.push_constant.src_rect[0] = 0.0;
+ blit.push_constant.src_rect[1] = 0.0;
+ blit.push_constant.src_rect[2] = 1.0;
+ blit.push_constant.src_rect[3] = 1.0;
+ blit.push_constant.dst_rect[0] = screenrect.position.x;
+ blit.push_constant.dst_rect[1] = screenrect.position.y;
+ blit.push_constant.dst_rect[2] = screenrect.size.width;
+ blit.push_constant.dst_rect[3] = screenrect.size.height;
blit.push_constant.layer = 0;
blit.push_constant.eye_center[0] = 0;
blit.push_constant.eye_center[1] = 0;
diff --git a/servers/rendering/renderer_rd/renderer_compositor_rd.h b/servers/rendering/renderer_rd/renderer_compositor_rd.h
index 8639362da9..0230c46800 100644
--- a/servers/rendering/renderer_rd/renderer_compositor_rd.h
+++ b/servers/rendering/renderer_rd/renderer_compositor_rd.h
@@ -55,7 +55,8 @@ protected:
};
struct BlitPushConstant {
- float rect[4];
+ float src_rect[4];
+ float dst_rect[4];
float eye_center[2];
float k1;
diff --git a/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp
index 098e2a5c87..ecc560fc5d 100644
--- a/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_gi_rd.cpp
@@ -1450,7 +1450,7 @@ void RendererSceneGIRD::SDFGI::pre_process_gi(const Transform3D &p_transform, Re
break;
}
- RendererSceneRenderRD::LightInstance *li = p_scene_render->light_instance_owner.getornull(p_scene_render->render_state.sdfgi_update_data->directional_lights->get(j));
+ RendererSceneRenderRD::LightInstance *li = p_scene_render->light_instance_owner.get_or_null(p_scene_render->render_state.sdfgi_update_data->directional_lights->get(j));
ERR_CONTINUE(!li);
if (storage->light_directional_is_sky_only(li->light)) {
@@ -1469,7 +1469,7 @@ void RendererSceneGIRD::SDFGI::pre_process_gi(const Transform3D &p_transform, Re
lights[idx].color[1] = color.g;
lights[idx].color[2] = color.b;
lights[idx].type = RS::LIGHT_DIRECTIONAL;
- lights[idx].energy = storage->light_get_param(li->light, RS::LIGHT_PARAM_ENERGY);
+ lights[idx].energy = storage->light_get_param(li->light, RS::LIGHT_PARAM_ENERGY) * storage->light_get_param(li->light, RS::LIGHT_PARAM_INDIRECT_ENERGY);
lights[idx].has_shadow = storage->light_has_shadow(li->light);
idx++;
@@ -1484,7 +1484,7 @@ void RendererSceneGIRD::SDFGI::pre_process_gi(const Transform3D &p_transform, Re
break;
}
- RendererSceneRenderRD::LightInstance *li = p_scene_render->light_instance_owner.getornull(p_scene_render->render_state.sdfgi_update_data->positional_light_instances[j]);
+ RendererSceneRenderRD::LightInstance *li = p_scene_render->light_instance_owner.get_or_null(p_scene_render->render_state.sdfgi_update_data->positional_light_instances[j]);
ERR_CONTINUE(!li);
uint32_t max_sdfgi_cascade = storage->light_get_max_sdfgi_cascade(li->light);
@@ -1514,7 +1514,7 @@ void RendererSceneGIRD::SDFGI::pre_process_gi(const Transform3D &p_transform, Re
lights[idx].color[1] = color.g;
lights[idx].color[2] = color.b;
lights[idx].type = storage->light_get_type(li->light);
- lights[idx].energy = storage->light_get_param(li->light, RS::LIGHT_PARAM_ENERGY);
+ lights[idx].energy = storage->light_get_param(li->light, RS::LIGHT_PARAM_ENERGY) * storage->light_get_param(li->light, RS::LIGHT_PARAM_INDIRECT_ENERGY);
lights[idx].has_shadow = storage->light_has_shadow(li->light);
lights[idx].attenuation = storage->light_get_param(li->light, RS::LIGHT_PARAM_ATTENUATION);
lights[idx].radius = storage->light_get_param(li->light, RS::LIGHT_PARAM_RANGE);
@@ -1534,7 +1534,7 @@ void RendererSceneGIRD::SDFGI::pre_process_gi(const Transform3D &p_transform, Re
void RendererSceneGIRD::SDFGI::render_region(RID p_render_buffers, int p_region, const PagedArray<RendererSceneRender::GeometryInstance *> &p_instances, RendererSceneRenderRD *p_scene_render) {
//print_line("rendering region " + itos(p_region));
- RendererSceneRenderRD::RenderBuffers *rb = p_scene_render->render_buffers_owner.getornull(p_render_buffers);
+ RendererSceneRenderRD::RenderBuffers *rb = p_scene_render->render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(!rb); // we wouldn't be here if this failed but...
AABB bounds;
Vector3i from;
@@ -1892,7 +1892,7 @@ void RendererSceneGIRD::SDFGI::render_region(RID p_render_buffers, int p_region,
}
void RendererSceneGIRD::SDFGI::render_static_lights(RID p_render_buffers, uint32_t p_cascade_count, const uint32_t *p_cascade_indices, const PagedArray<RID> *p_positional_light_cull_result, RendererSceneRenderRD *p_scene_render) {
- RendererSceneRenderRD::RenderBuffers *rb = p_scene_render->render_buffers_owner.getornull(p_render_buffers);
+ RendererSceneRenderRD::RenderBuffers *rb = p_scene_render->render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(!rb); // we wouldn't be here if this failed but...
RD::get_singleton()->draw_command_begin_label("SDFGI Render Static Lighs");
@@ -1921,7 +1921,7 @@ void RendererSceneGIRD::SDFGI::render_static_lights(RID p_render_buffers, uint32
break;
}
- RendererSceneRenderRD::LightInstance *li = p_scene_render->light_instance_owner.getornull(p_positional_light_cull_result[i][j]);
+ RendererSceneRenderRD::LightInstance *li = p_scene_render->light_instance_owner.get_or_null(p_positional_light_cull_result[i][j]);
ERR_CONTINUE(!li);
uint32_t max_sdfgi_cascade = storage->light_get_max_sdfgi_cascade(li->light);
@@ -1953,7 +1953,7 @@ void RendererSceneGIRD::SDFGI::render_static_lights(RID p_render_buffers, uint32
lights[idx].color[0] = color.r;
lights[idx].color[1] = color.g;
lights[idx].color[2] = color.b;
- lights[idx].energy = storage->light_get_param(li->light, RS::LIGHT_PARAM_ENERGY);
+ lights[idx].energy = storage->light_get_param(li->light, RS::LIGHT_PARAM_ENERGY) * storage->light_get_param(li->light, RS::LIGHT_PARAM_INDIRECT_ENERGY);
lights[idx].has_shadow = storage->light_has_shadow(li->light);
lights[idx].attenuation = storage->light_get_param(li->light, RS::LIGHT_PARAM_ATTENUATION);
lights[idx].radius = storage->light_get_param(li->light, RS::LIGHT_PARAM_RANGE);
@@ -2575,7 +2575,7 @@ void RendererSceneGIRD::VoxelGIInstance::update(bool p_update_light_instances, c
Vector3 render_dir = render_z[j];
Vector3 up_dir = render_up[j];
- Vector3 center = aabb.position + aabb.size * 0.5;
+ Vector3 center = aabb.get_center();
Transform3D xform;
xform.set_look_at(center - aabb.size * 0.5 * render_dir, center, up_dir);
@@ -3024,7 +3024,7 @@ void RendererSceneGIRD::setup_voxel_gi_instances(RID p_render_buffers, const Tra
r_voxel_gi_instances_used = 0;
// feels a little dirty to use our container this way but....
- RendererSceneRenderRD::RenderBuffers *rb = p_scene_render->render_buffers_owner.getornull(p_render_buffers);
+ RendererSceneRenderRD::RenderBuffers *rb = p_scene_render->render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(rb == nullptr);
RID voxel_gi_buffer = p_scene_render->render_buffers_get_voxel_gi_buffer(p_render_buffers);
@@ -3119,9 +3119,9 @@ void RendererSceneGIRD::setup_voxel_gi_instances(RID p_render_buffers, const Tra
void RendererSceneGIRD::process_gi(RID p_render_buffers, RID p_normal_roughness_buffer, RID p_voxel_gi_buffer, RID p_environment, const CameraMatrix &p_projection, const Transform3D &p_transform, const PagedArray<RID> &p_voxel_gi_instances, RendererSceneRenderRD *p_scene_render) {
RD::get_singleton()->draw_command_begin_label("GI Render");
- RendererSceneRenderRD::RenderBuffers *rb = p_scene_render->render_buffers_owner.getornull(p_render_buffers);
+ RendererSceneRenderRD::RenderBuffers *rb = p_scene_render->render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(rb == nullptr);
- RendererSceneEnvironmentRD *env = p_scene_render->environment_owner.getornull(p_environment);
+ RendererSceneEnvironmentRD *env = p_scene_render->environment_owner.get_or_null(p_environment);
if (rb->ambient_buffer.is_null() || rb->gi.using_half_size_gi != half_resolution) {
if (rb->ambient_buffer.is_valid()) {
@@ -3393,7 +3393,7 @@ void RendererSceneGIRD::voxel_gi_update(RID p_probe, bool p_update_light_instanc
}
void RendererSceneGIRD::debug_voxel_gi(RID p_voxel_gi, RD::DrawListID p_draw_list, RID p_framebuffer, const CameraMatrix &p_camera_with_transform, bool p_lighting, bool p_emission, float p_alpha) {
- VoxelGIInstance *voxel_gi = voxel_gi_instance_owner.getornull(p_voxel_gi);
+ VoxelGIInstance *voxel_gi = voxel_gi_instance_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND(!voxel_gi);
voxel_gi->debug(p_draw_list, p_framebuffer, p_camera_with_transform, p_lighting, p_emission, p_alpha);
diff --git a/servers/rendering/renderer_rd/renderer_scene_gi_rd.h b/servers/rendering/renderer_rd/renderer_scene_gi_rd.h
index 0b4622646f..5bd41a104e 100644
--- a/servers/rendering/renderer_rd/renderer_scene_gi_rd.h
+++ b/servers/rendering/renderer_rd/renderer_scene_gi_rd.h
@@ -383,7 +383,7 @@ public:
mutable RID_Owner<VoxelGIInstance> voxel_gi_instance_owner;
_FORCE_INLINE_ VoxelGIInstance *get_probe_instance(RID p_probe) const {
- return voxel_gi_instance_owner.getornull(p_probe);
+ return voxel_gi_instance_owner.get_or_null(p_probe);
};
_FORCE_INLINE_ RID voxel_gi_instance_get_texture(RID p_probe) {
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
index d81c216f37..e7156accfa 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
@@ -48,8 +48,8 @@ void get_vogel_disk(float *r_kernel, int p_sample_count) {
}
void RendererSceneRenderRD::sdfgi_update(RID p_render_buffers, RID p_environment, const Vector3 &p_world_position) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_environment);
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_environment);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
bool needs_sdfgi = env && env->sdfgi_enabled;
if (!needs_sdfgi) {
@@ -83,7 +83,7 @@ void RendererSceneRenderRD::sdfgi_update(RID p_render_buffers, RID p_environment
}
int RendererSceneRenderRD::sdfgi_get_pending_region_count(RID p_render_buffers) const {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(rb == nullptr, 0);
@@ -113,7 +113,7 @@ AABB RendererSceneRenderRD::sdfgi_get_pending_region_bounds(RID p_render_buffers
AABB bounds;
Vector3i from;
Vector3i size;
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(rb == nullptr, AABB());
ERR_FAIL_COND_V(rb->sdfgi == nullptr, AABB());
@@ -126,7 +126,7 @@ uint32_t RendererSceneRenderRD::sdfgi_get_pending_region_cascade(RID p_render_bu
AABB bounds;
Vector3i from;
Vector3i size;
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(rb == nullptr, -1);
ERR_FAIL_COND_V(rb->sdfgi == nullptr, -1);
@@ -164,139 +164,139 @@ void RendererSceneRenderRD::environment_initialize(RID p_rid) {
}
void RendererSceneRenderRD::environment_set_background(RID p_env, RS::EnvironmentBG p_bg) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->background = p_bg;
}
void RendererSceneRenderRD::environment_set_sky(RID p_env, RID p_sky) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->sky = p_sky;
}
void RendererSceneRenderRD::environment_set_sky_custom_fov(RID p_env, float p_scale) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->sky_custom_fov = p_scale;
}
void RendererSceneRenderRD::environment_set_sky_orientation(RID p_env, const Basis &p_orientation) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->sky_orientation = p_orientation;
}
void RendererSceneRenderRD::environment_set_bg_color(RID p_env, const Color &p_color) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->bg_color = p_color;
}
void RendererSceneRenderRD::environment_set_bg_energy(RID p_env, float p_energy) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->bg_energy = p_energy;
}
void RendererSceneRenderRD::environment_set_canvas_max_layer(RID p_env, int p_max_layer) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->canvas_max_layer = p_max_layer;
}
void RendererSceneRenderRD::environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient, float p_energy, float p_sky_contribution, RS::EnvironmentReflectionSource p_reflection_source, const Color &p_ao_color) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->set_ambient_light(p_color, p_ambient, p_energy, p_sky_contribution, p_reflection_source, p_ao_color);
}
RS::EnvironmentBG RendererSceneRenderRD::environment_get_background(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, RS::ENV_BG_MAX);
return env->background;
}
RID RendererSceneRenderRD::environment_get_sky(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, RID());
return env->sky;
}
float RendererSceneRenderRD::environment_get_sky_custom_fov(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->sky_custom_fov;
}
Basis RendererSceneRenderRD::environment_get_sky_orientation(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, Basis());
return env->sky_orientation;
}
Color RendererSceneRenderRD::environment_get_bg_color(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, Color());
return env->bg_color;
}
float RendererSceneRenderRD::environment_get_bg_energy(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->bg_energy;
}
int RendererSceneRenderRD::environment_get_canvas_max_layer(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->canvas_max_layer;
}
Color RendererSceneRenderRD::environment_get_ambient_light_color(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, Color());
return env->ambient_light;
}
RS::EnvironmentAmbientSource RendererSceneRenderRD::environment_get_ambient_source(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, RS::ENV_AMBIENT_SOURCE_BG);
return env->ambient_source;
}
float RendererSceneRenderRD::environment_get_ambient_light_energy(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->ambient_light_energy;
}
float RendererSceneRenderRD::environment_get_ambient_sky_contribution(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->ambient_sky_contribution;
}
RS::EnvironmentReflectionSource RendererSceneRenderRD::environment_get_reflection_source(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, RS::ENV_REFLECTION_SOURCE_DISABLED);
return env->reflection_source;
}
Color RendererSceneRenderRD::environment_get_ao_color(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, Color());
return env->ao_color;
}
void RendererSceneRenderRD::environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->set_tonemap(p_tone_mapper, p_exposure, p_white, p_auto_exposure, p_min_luminance, p_max_luminance, p_auto_exp_speed, p_auto_exp_scale);
}
void RendererSceneRenderRD::environment_set_glow(RID p_env, bool p_enable, Vector<float> p_levels, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->set_glow(p_enable, p_levels, p_intensity, p_strength, p_mix, p_bloom_threshold, p_blend_mode, p_hdr_bleed_threshold, p_hdr_bleed_scale, p_hdr_luminance_cap);
}
@@ -310,7 +310,7 @@ void RendererSceneRenderRD::environment_glow_set_use_high_quality(bool p_enable)
}
void RendererSceneRenderRD::environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
if (!is_dynamic_gi_supported()) {
@@ -321,58 +321,58 @@ void RendererSceneRenderRD::environment_set_sdfgi(RID p_env, bool p_enable, RS::
}
void RendererSceneRenderRD::environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_fog_aerial_perspective) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->set_fog(p_enable, p_light_color, p_light_energy, p_sun_scatter, p_density, p_height, p_height_density, p_fog_aerial_perspective);
}
bool RendererSceneRenderRD::environment_is_fog_enabled(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, false);
return env->fog_enabled;
}
Color RendererSceneRenderRD::environment_get_fog_light_color(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, Color());
return env->fog_light_color;
}
float RendererSceneRenderRD::environment_get_fog_light_energy(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->fog_light_energy;
}
float RendererSceneRenderRD::environment_get_fog_sun_scatter(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->fog_sun_scatter;
}
float RendererSceneRenderRD::environment_get_fog_density(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->fog_density;
}
float RendererSceneRenderRD::environment_get_fog_height(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->fog_height;
}
float RendererSceneRenderRD::environment_get_fog_height_density(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->fog_height_density;
}
float RendererSceneRenderRD::environment_get_fog_aerial_perspective(RID p_env) const {
- const RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ const RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, 0);
return env->fog_aerial_perspective;
}
void RendererSceneRenderRD::environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
if (!is_volumetric_supported()) {
@@ -403,7 +403,7 @@ void RendererSceneRenderRD::environment_set_sdfgi_frames_to_update_light(RS::Env
}
void RendererSceneRenderRD::environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->set_ssr(p_enable, p_max_steps, p_fade_int, p_fade_out, p_depth_tolerance);
@@ -418,7 +418,7 @@ RS::EnvironmentSSRRoughnessQuality RendererSceneRenderRD::environment_get_ssr_ro
}
void RendererSceneRenderRD::environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->set_ssao(p_enable, p_radius, p_intensity, p_power, p_detail, p_horizon, p_sharpness, p_light_affect, p_ao_channel_affect);
@@ -434,30 +434,30 @@ void RendererSceneRenderRD::environment_set_ssao_quality(RS::EnvironmentSSAOQual
}
bool RendererSceneRenderRD::environment_is_ssao_enabled(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, false);
return env->ssao_enabled;
}
float RendererSceneRenderRD::environment_get_ssao_ao_affect(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, 0.0);
return env->ssao_ao_channel_affect;
}
float RendererSceneRenderRD::environment_get_ssao_light_affect(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, 0.0);
return env->ssao_direct_light_affect;
}
bool RendererSceneRenderRD::environment_is_ssr_enabled(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, false);
return env->ssr_enabled;
}
bool RendererSceneRenderRD::environment_is_sdfgi_enabled(RID p_env) const {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, false);
return env->sdfgi_enabled;
}
@@ -467,7 +467,7 @@ bool RendererSceneRenderRD::is_environment(RID p_env) const {
}
Ref<Image> RendererSceneRenderRD::environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND_V(!env, Ref<Image>());
if (env->background == RS::ENV_BG_CAMERA_FEED || env->background == RS::ENV_BG_CANVAS || env->background == RS::ENV_BG_KEEP) {
@@ -522,7 +522,7 @@ RID RendererSceneRenderRD::reflection_atlas_create() {
}
void RendererSceneRenderRD::reflection_atlas_set_size(RID p_ref_atlas, int p_reflection_size, int p_reflection_count) {
- ReflectionAtlas *ra = reflection_atlas_owner.getornull(p_ref_atlas);
+ ReflectionAtlas *ra = reflection_atlas_owner.get_or_null(p_ref_atlas);
ERR_FAIL_COND(!ra);
if (ra->size == p_reflection_size && ra->count == p_reflection_count) {
@@ -557,7 +557,7 @@ void RendererSceneRenderRD::reflection_atlas_set_size(RID p_ref_atlas, int p_ref
}
int RendererSceneRenderRD::reflection_atlas_get_size(RID p_ref_atlas) const {
- ReflectionAtlas *ra = reflection_atlas_owner.getornull(p_ref_atlas);
+ ReflectionAtlas *ra = reflection_atlas_owner.get_or_null(p_ref_atlas);
ERR_FAIL_COND_V(!ra, 0);
return ra->size;
@@ -573,7 +573,7 @@ RID RendererSceneRenderRD::reflection_probe_instance_create(RID p_probe) {
}
void RendererSceneRenderRD::reflection_probe_instance_set_transform(RID p_instance, const Transform3D &p_transform) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!rpi);
rpi->transform = p_transform;
@@ -581,13 +581,13 @@ void RendererSceneRenderRD::reflection_probe_instance_set_transform(RID p_instan
}
void RendererSceneRenderRD::reflection_probe_release_atlas_index(RID p_instance) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!rpi);
if (rpi->atlas.is_null()) {
return; //nothing to release
}
- ReflectionAtlas *atlas = reflection_atlas_owner.getornull(rpi->atlas);
+ ReflectionAtlas *atlas = reflection_atlas_owner.get_or_null(rpi->atlas);
ERR_FAIL_COND(!atlas);
ERR_FAIL_INDEX(rpi->atlas_index, atlas->reflections.size());
atlas->reflections.write[rpi->atlas_index].owner = RID();
@@ -596,7 +596,7 @@ void RendererSceneRenderRD::reflection_probe_release_atlas_index(RID p_instance)
}
bool RendererSceneRenderRD::reflection_probe_instance_needs_redraw(RID p_instance) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!rpi, false);
if (rpi->rendering) {
@@ -615,18 +615,18 @@ bool RendererSceneRenderRD::reflection_probe_instance_needs_redraw(RID p_instanc
}
bool RendererSceneRenderRD::reflection_probe_instance_has_reflection(RID p_instance) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!rpi, false);
return rpi->atlas.is_valid();
}
bool RendererSceneRenderRD::reflection_probe_instance_begin_render(RID p_instance, RID p_reflection_atlas) {
- ReflectionAtlas *atlas = reflection_atlas_owner.getornull(p_reflection_atlas);
+ ReflectionAtlas *atlas = reflection_atlas_owner.get_or_null(p_reflection_atlas);
ERR_FAIL_COND_V(!atlas, false);
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!rpi, false);
RD::get_singleton()->draw_command_begin_label("Reflection probe render");
@@ -701,7 +701,7 @@ bool RendererSceneRenderRD::reflection_probe_instance_begin_render(RID p_instanc
uint64_t pass_min = 0;
for (int i = 0; i < atlas->reflections.size(); i++) {
- ReflectionProbeInstance *rpi2 = reflection_probe_instance_owner.getornull(atlas->reflections[i].owner);
+ ReflectionProbeInstance *rpi2 = reflection_probe_instance_owner.get_or_null(atlas->reflections[i].owner);
if (rpi2->last_pass < pass_min) {
pass_min = rpi2->last_pass;
rpi->atlas_index = i;
@@ -733,12 +733,12 @@ RID RendererSceneRenderRD::reflection_probe_create_framebuffer(RID p_color, RID
}
bool RendererSceneRenderRD::reflection_probe_instance_postprocess_step(RID p_instance) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!rpi, false);
ERR_FAIL_COND_V(!rpi->rendering, false);
ERR_FAIL_COND_V(rpi->atlas.is_null(), false);
- ReflectionAtlas *atlas = reflection_atlas_owner.getornull(rpi->atlas);
+ ReflectionAtlas *atlas = reflection_atlas_owner.get_or_null(rpi->atlas);
if (!atlas || rpi->atlas_index == -1) {
//does not belong to an atlas anymore, cancel (was removed from atlas or atlas changed while rendering)
rpi->rendering = false;
@@ -779,30 +779,30 @@ bool RendererSceneRenderRD::reflection_probe_instance_postprocess_step(RID p_ins
}
uint32_t RendererSceneRenderRD::reflection_probe_instance_get_resolution(RID p_instance) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!rpi, 0);
- ReflectionAtlas *atlas = reflection_atlas_owner.getornull(rpi->atlas);
+ ReflectionAtlas *atlas = reflection_atlas_owner.get_or_null(rpi->atlas);
ERR_FAIL_COND_V(!atlas, 0);
return atlas->size;
}
RID RendererSceneRenderRD::reflection_probe_instance_get_framebuffer(RID p_instance, int p_index) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!rpi, RID());
ERR_FAIL_INDEX_V(p_index, 6, RID());
- ReflectionAtlas *atlas = reflection_atlas_owner.getornull(rpi->atlas);
+ ReflectionAtlas *atlas = reflection_atlas_owner.get_or_null(rpi->atlas);
ERR_FAIL_COND_V(!atlas, RID());
return atlas->reflections[rpi->atlas_index].fbs[p_index];
}
RID RendererSceneRenderRD::reflection_probe_instance_get_depth_framebuffer(RID p_instance, int p_index) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!rpi, RID());
ERR_FAIL_INDEX_V(p_index, 6, RID());
- ReflectionAtlas *atlas = reflection_atlas_owner.getornull(rpi->atlas);
+ ReflectionAtlas *atlas = reflection_atlas_owner.get_or_null(rpi->atlas);
ERR_FAIL_COND_V(!atlas, RID());
return atlas->depth_fb;
}
@@ -829,7 +829,7 @@ void RendererSceneRenderRD::_update_shadow_atlas(ShadowAtlas *shadow_atlas) {
}
void RendererSceneRenderRD::shadow_atlas_set_size(RID p_atlas, int p_size, bool p_16_bits) {
- ShadowAtlas *shadow_atlas = shadow_atlas_owner.getornull(p_atlas);
+ ShadowAtlas *shadow_atlas = shadow_atlas_owner.get_or_null(p_atlas);
ERR_FAIL_COND(!shadow_atlas);
ERR_FAIL_COND(p_size < 0);
p_size = next_power_of_2(p_size);
@@ -851,7 +851,7 @@ void RendererSceneRenderRD::shadow_atlas_set_size(RID p_atlas, int p_size, bool
//erase shadow atlas reference from lights
for (Map<RID, uint32_t>::Element *E = shadow_atlas->shadow_owners.front(); E; E = E->next()) {
- LightInstance *li = light_instance_owner.getornull(E->key());
+ LightInstance *li = light_instance_owner.get_or_null(E->key());
ERR_CONTINUE(!li);
li->shadow_atlases.erase(p_atlas);
}
@@ -860,11 +860,11 @@ void RendererSceneRenderRD::shadow_atlas_set_size(RID p_atlas, int p_size, bool
shadow_atlas->shadow_owners.clear();
shadow_atlas->size = p_size;
- shadow_atlas->use_16_bits = p_size;
+ shadow_atlas->use_16_bits = p_16_bits;
}
void RendererSceneRenderRD::shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) {
- ShadowAtlas *shadow_atlas = shadow_atlas_owner.getornull(p_atlas);
+ ShadowAtlas *shadow_atlas = shadow_atlas_owner.get_or_null(p_atlas);
ERR_FAIL_COND(!shadow_atlas);
ERR_FAIL_INDEX(p_quadrant, 4);
ERR_FAIL_INDEX(p_subdivision, 16384);
@@ -886,7 +886,7 @@ void RendererSceneRenderRD::shadow_atlas_set_quadrant_subdivision(RID p_atlas, i
for (int i = 0; i < shadow_atlas->quadrants[p_quadrant].shadows.size(); i++) {
if (shadow_atlas->quadrants[p_quadrant].shadows[i].owner.is_valid()) {
shadow_atlas->shadow_owners.erase(shadow_atlas->quadrants[p_quadrant].shadows[i].owner);
- LightInstance *li = light_instance_owner.getornull(shadow_atlas->quadrants[p_quadrant].shadows[i].owner);
+ LightInstance *li = light_instance_owner.get_or_null(shadow_atlas->quadrants[p_quadrant].shadows[i].owner);
ERR_CONTINUE(!li);
li->shadow_atlases.erase(p_atlas);
}
@@ -935,7 +935,7 @@ bool RendererSceneRenderRD::_shadow_atlas_find_shadow(ShadowAtlas *shadow_atlas,
//look for an empty space
int sc = shadow_atlas->quadrants[qidx].shadows.size();
- ShadowAtlas::Quadrant::Shadow *sarr = shadow_atlas->quadrants[qidx].shadows.ptrw();
+ const ShadowAtlas::Quadrant::Shadow *sarr = shadow_atlas->quadrants[qidx].shadows.ptr();
int found_free_idx = -1; //found a free one
int found_used_idx = -1; //found existing one, must steal it
@@ -947,7 +947,7 @@ bool RendererSceneRenderRD::_shadow_atlas_find_shadow(ShadowAtlas *shadow_atlas,
break;
}
- LightInstance *sli = light_instance_owner.getornull(sarr[j].owner);
+ LightInstance *sli = light_instance_owner.get_or_null(sarr[j].owner);
ERR_CONTINUE(!sli);
if (sli->last_scene_pass != scene_pass) {
@@ -980,11 +980,83 @@ bool RendererSceneRenderRD::_shadow_atlas_find_shadow(ShadowAtlas *shadow_atlas,
return false;
}
+bool RendererSceneRenderRD::_shadow_atlas_find_omni_shadows(ShadowAtlas *shadow_atlas, int *p_in_quadrants, int p_quadrant_count, int p_current_subdiv, uint64_t p_tick, int &r_quadrant, int &r_shadow) {
+ for (int i = p_quadrant_count - 1; i >= 0; i--) {
+ int qidx = p_in_quadrants[i];
+
+ if (shadow_atlas->quadrants[qidx].subdivision == (uint32_t)p_current_subdiv) {
+ return false;
+ }
+
+ //look for an empty space
+ int sc = shadow_atlas->quadrants[qidx].shadows.size();
+ const ShadowAtlas::Quadrant::Shadow *sarr = shadow_atlas->quadrants[qidx].shadows.ptr();
+
+ int found_idx = -1;
+ uint64_t min_pass = 0; // sum of currently selected spots, try to get the least recently used pair
+
+ for (int j = 0; j < sc - 1; j++) {
+ uint64_t pass = 0;
+
+ if (sarr[j].owner.is_valid()) {
+ LightInstance *sli = light_instance_owner.get_or_null(sarr[j].owner);
+ ERR_CONTINUE(!sli);
+
+ if (sli->last_scene_pass == scene_pass) {
+ continue;
+ }
+
+ //was just allocated, don't kill it so soon, wait a bit..
+ if (p_tick - sarr[j].alloc_tick < shadow_atlas_realloc_tolerance_msec) {
+ continue;
+ }
+ pass += sli->last_scene_pass;
+ }
+
+ if (sarr[j + 1].owner.is_valid()) {
+ LightInstance *sli = light_instance_owner.get_or_null(sarr[j + 1].owner);
+ ERR_CONTINUE(!sli);
+
+ if (sli->last_scene_pass == scene_pass) {
+ continue;
+ }
+
+ //was just allocated, don't kill it so soon, wait a bit..
+ if (p_tick - sarr[j + 1].alloc_tick < shadow_atlas_realloc_tolerance_msec) {
+ continue;
+ }
+ pass += sli->last_scene_pass;
+ }
+
+ if (found_idx == -1 || pass < min_pass) {
+ found_idx = j;
+ min_pass = pass;
+
+ // we found two empty spots, no need to check the rest
+ if (pass == 0) {
+ break;
+ }
+ }
+ }
+
+ if (found_idx == -1) {
+ continue; //nothing found
+ }
+
+ r_quadrant = qidx;
+ r_shadow = found_idx;
+
+ return true;
+ }
+
+ return false;
+}
+
bool RendererSceneRenderRD::shadow_atlas_update_light(RID p_atlas, RID p_light_intance, float p_coverage, uint64_t p_light_version) {
- ShadowAtlas *shadow_atlas = shadow_atlas_owner.getornull(p_atlas);
+ ShadowAtlas *shadow_atlas = shadow_atlas_owner.get_or_null(p_atlas);
ERR_FAIL_COND_V(!shadow_atlas, false);
- LightInstance *li = light_instance_owner.getornull(p_light_intance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_intance);
ERR_FAIL_COND_V(!li, false);
if (shadow_atlas->size == 0 || shadow_atlas->smallest_subdiv == 0) {
@@ -1025,94 +1097,104 @@ bool RendererSceneRenderRD::shadow_atlas_update_light(RID p_atlas, RID p_light_i
uint64_t tick = OS::get_singleton()->get_ticks_msec();
- //see if it already exists
+ uint32_t old_key = ShadowAtlas::SHADOW_INVALID;
+ uint32_t old_quadrant = ShadowAtlas::SHADOW_INVALID;
+ uint32_t old_shadow = ShadowAtlas::SHADOW_INVALID;
+ int old_subdivision = -1;
+
+ bool should_realloc = false;
+ bool should_redraw = false;
if (shadow_atlas->shadow_owners.has(p_light_intance)) {
- //it does!
- uint32_t key = shadow_atlas->shadow_owners[p_light_intance];
- uint32_t q = (key >> ShadowAtlas::QUADRANT_SHIFT) & 0x3;
- uint32_t s = key & ShadowAtlas::SHADOW_INDEX_MASK;
+ old_key = shadow_atlas->shadow_owners[p_light_intance];
+ old_quadrant = (old_key >> ShadowAtlas::QUADRANT_SHIFT) & 0x3;
+ old_shadow = old_key & ShadowAtlas::SHADOW_INDEX_MASK;
- bool should_realloc = shadow_atlas->quadrants[q].subdivision != (uint32_t)best_subdiv && (shadow_atlas->quadrants[q].shadows[s].alloc_tick - tick > shadow_atlas_realloc_tolerance_msec);
- bool should_redraw = shadow_atlas->quadrants[q].shadows[s].version != p_light_version;
+ should_realloc = shadow_atlas->quadrants[old_quadrant].subdivision != (uint32_t)best_subdiv && (shadow_atlas->quadrants[old_quadrant].shadows[old_shadow].alloc_tick - tick > shadow_atlas_realloc_tolerance_msec);
+ should_redraw = shadow_atlas->quadrants[old_quadrant].shadows[old_shadow].version != p_light_version;
if (!should_realloc) {
- shadow_atlas->quadrants[q].shadows.write[s].version = p_light_version;
+ shadow_atlas->quadrants[old_quadrant].shadows.write[old_shadow].version = p_light_version;
//already existing, see if it should redraw or it's just OK
return should_redraw;
}
- int new_quadrant, new_shadow;
+ old_subdivision = shadow_atlas->quadrants[old_quadrant].subdivision;
+ }
- //find a better place
- if (_shadow_atlas_find_shadow(shadow_atlas, valid_quadrants, valid_quadrant_count, shadow_atlas->quadrants[q].subdivision, tick, new_quadrant, new_shadow)) {
- //found a better place!
- ShadowAtlas::Quadrant::Shadow *sh = &shadow_atlas->quadrants[new_quadrant].shadows.write[new_shadow];
- if (sh->owner.is_valid()) {
- //is taken, but is invalid, erasing it
- shadow_atlas->shadow_owners.erase(sh->owner);
- LightInstance *sli = light_instance_owner.getornull(sh->owner);
- sli->shadow_atlases.erase(p_atlas);
- }
+ bool is_omni = li->light_type == RS::LIGHT_OMNI;
+ bool found_shadow = false;
+ int new_quadrant = -1;
+ int new_shadow = -1;
- //erase previous
- shadow_atlas->quadrants[q].shadows.write[s].version = 0;
- shadow_atlas->quadrants[q].shadows.write[s].owner = RID();
+ if (is_omni) {
+ found_shadow = _shadow_atlas_find_omni_shadows(shadow_atlas, valid_quadrants, valid_quadrant_count, old_subdivision, tick, new_quadrant, new_shadow);
+ } else {
+ found_shadow = _shadow_atlas_find_shadow(shadow_atlas, valid_quadrants, valid_quadrant_count, old_subdivision, tick, new_quadrant, new_shadow);
+ }
- sh->owner = p_light_intance;
- sh->alloc_tick = tick;
- sh->version = p_light_version;
- li->shadow_atlases.insert(p_atlas);
-
- //make new key
- key = new_quadrant << ShadowAtlas::QUADRANT_SHIFT;
- key |= new_shadow;
- //update it in map
- shadow_atlas->shadow_owners[p_light_intance] = key;
- //make it dirty, as it should redraw anyway
- return true;
+ if (found_shadow) {
+ if (old_quadrant != ShadowAtlas::SHADOW_INVALID) {
+ shadow_atlas->quadrants[old_quadrant].shadows.write[old_shadow].version = 0;
+ shadow_atlas->quadrants[old_quadrant].shadows.write[old_shadow].owner = RID();
+
+ if (old_key & ShadowAtlas::OMNI_LIGHT_FLAG) {
+ shadow_atlas->quadrants[old_quadrant].shadows.write[old_shadow + 1].version = 0;
+ shadow_atlas->quadrants[old_quadrant].shadows.write[old_shadow + 1].owner = RID();
+ }
}
- //no better place for this shadow found, keep current
+ uint32_t new_key = new_quadrant << ShadowAtlas::QUADRANT_SHIFT;
+ new_key |= new_shadow;
- //already existing, see if it should redraw or it's just OK
+ ShadowAtlas::Quadrant::Shadow *sh = &shadow_atlas->quadrants[new_quadrant].shadows.write[new_shadow];
+ _shadow_atlas_invalidate_shadow(sh, p_atlas, shadow_atlas, new_quadrant, new_shadow);
- shadow_atlas->quadrants[q].shadows.write[s].version = p_light_version;
+ sh->owner = p_light_intance;
+ sh->alloc_tick = tick;
+ sh->version = p_light_version;
- return should_redraw;
- }
+ if (is_omni) {
+ new_key |= ShadowAtlas::OMNI_LIGHT_FLAG;
- int new_quadrant, new_shadow;
+ int new_omni_shadow = new_shadow + 1;
+ ShadowAtlas::Quadrant::Shadow *extra_sh = &shadow_atlas->quadrants[new_quadrant].shadows.write[new_omni_shadow];
+ _shadow_atlas_invalidate_shadow(extra_sh, p_atlas, shadow_atlas, new_quadrant, new_omni_shadow);
- //find a better place
- if (_shadow_atlas_find_shadow(shadow_atlas, valid_quadrants, valid_quadrant_count, -1, tick, new_quadrant, new_shadow)) {
- //found a better place!
- ShadowAtlas::Quadrant::Shadow *sh = &shadow_atlas->quadrants[new_quadrant].shadows.write[new_shadow];
- if (sh->owner.is_valid()) {
- //is taken, but is invalid, erasing it
- shadow_atlas->shadow_owners.erase(sh->owner);
- LightInstance *sli = light_instance_owner.getornull(sh->owner);
- sli->shadow_atlases.erase(p_atlas);
+ extra_sh->owner = p_light_intance;
+ extra_sh->alloc_tick = tick;
+ extra_sh->version = p_light_version;
}
- sh->owner = p_light_intance;
- sh->alloc_tick = tick;
- sh->version = p_light_version;
li->shadow_atlases.insert(p_atlas);
- //make new key
- uint32_t key = new_quadrant << ShadowAtlas::QUADRANT_SHIFT;
- key |= new_shadow;
//update it in map
- shadow_atlas->shadow_owners[p_light_intance] = key;
+ shadow_atlas->shadow_owners[p_light_intance] = new_key;
//make it dirty, as it should redraw anyway
-
return true;
}
- //no place to allocate this light, apologies
+ return should_redraw;
+}
- return false;
+void RendererSceneRenderRD::_shadow_atlas_invalidate_shadow(RendererSceneRenderRD::ShadowAtlas::Quadrant::Shadow *p_shadow, RID p_atlas, RendererSceneRenderRD::ShadowAtlas *p_shadow_atlas, uint32_t p_quadrant, uint32_t p_shadow_idx) {
+ if (p_shadow->owner.is_valid()) {
+ LightInstance *sli = light_instance_owner.get_or_null(p_shadow->owner);
+ uint32_t old_key = p_shadow_atlas->shadow_owners[p_shadow->owner];
+
+ if (old_key & ShadowAtlas::OMNI_LIGHT_FLAG) {
+ uint32_t s = old_key & ShadowAtlas::SHADOW_INDEX_MASK;
+ uint32_t omni_shadow_idx = p_shadow_idx + (s == (uint32_t)p_shadow_idx ? 1 : -1);
+ RendererSceneRenderRD::ShadowAtlas::Quadrant::Shadow *omni_shadow = &p_shadow_atlas->quadrants[p_quadrant].shadows.write[omni_shadow_idx];
+ omni_shadow->version = 0;
+ omni_shadow->owner = RID();
+ }
+
+ p_shadow->version = 0;
+ p_shadow->owner = RID();
+ sli->shadow_atlases.erase(p_atlas);
+ p_shadow_atlas->shadow_owners.erase(p_shadow->owner);
+ }
}
void RendererSceneRenderRD::_update_directional_shadow_atlas() {
@@ -1137,6 +1219,7 @@ void RendererSceneRenderRD::directional_shadow_atlas_set_size(int p_size, bool p
}
directional_shadow.size = p_size;
+ directional_shadow.use_16_bits = p_16_bits;
if (directional_shadow.depth.is_valid()) {
RD::get_singleton()->free(directional_shadow.depth);
@@ -1177,7 +1260,7 @@ int RendererSceneRenderRD::get_directional_light_shadow_size(RID p_light_intance
Rect2i r = _get_directional_shadow_rect(directional_shadow.size, directional_shadow.light_count, 0);
- LightInstance *light_instance = light_instance_owner.getornull(p_light_intance);
+ LightInstance *light_instance = light_instance_owner.get_or_null(p_light_intance);
ERR_FAIL_COND_V(!light_instance, 0);
switch (storage->light_directional_get_shadow_mode(light_instance->light)) {
@@ -1213,7 +1296,7 @@ void RendererSceneRenderRD::camera_effects_set_dof_blur_bokeh_shape(RS::DOFBokeh
}
void RendererSceneRenderRD::camera_effects_set_dof_blur(RID p_camera_effects, bool p_far_enable, float p_far_distance, float p_far_transition, bool p_near_enable, float p_near_distance, float p_near_transition, float p_amount) {
- CameraEffects *camfx = camera_effects_owner.getornull(p_camera_effects);
+ CameraEffects *camfx = camera_effects_owner.get_or_null(p_camera_effects);
ERR_FAIL_COND(!camfx);
camfx->dof_blur_far_enabled = p_far_enable;
@@ -1228,7 +1311,7 @@ void RendererSceneRenderRD::camera_effects_set_dof_blur(RID p_camera_effects, bo
}
void RendererSceneRenderRD::camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) {
- CameraEffects *camfx = camera_effects_owner.getornull(p_camera_effects);
+ CameraEffects *camfx = camera_effects_owner.get_or_null(p_camera_effects);
ERR_FAIL_COND(!camfx);
camfx->override_exposure_enabled = p_enable;
@@ -1238,7 +1321,7 @@ void RendererSceneRenderRD::camera_effects_set_custom_exposure(RID p_camera_effe
RID RendererSceneRenderRD::light_instance_create(RID p_light) {
RID li = light_instance_owner.make_rid(LightInstance());
- LightInstance *light_instance = light_instance_owner.getornull(li);
+ LightInstance *light_instance = light_instance_owner.get_or_null(li);
light_instance->self = li;
light_instance->light = p_light;
@@ -1251,21 +1334,21 @@ RID RendererSceneRenderRD::light_instance_create(RID p_light) {
}
void RendererSceneRenderRD::light_instance_set_transform(RID p_light_instance, const Transform3D &p_transform) {
- LightInstance *light_instance = light_instance_owner.getornull(p_light_instance);
+ LightInstance *light_instance = light_instance_owner.get_or_null(p_light_instance);
ERR_FAIL_COND(!light_instance);
light_instance->transform = p_transform;
}
void RendererSceneRenderRD::light_instance_set_aabb(RID p_light_instance, const AABB &p_aabb) {
- LightInstance *light_instance = light_instance_owner.getornull(p_light_instance);
+ LightInstance *light_instance = light_instance_owner.get_or_null(p_light_instance);
ERR_FAIL_COND(!light_instance);
light_instance->aabb = p_aabb;
}
void RendererSceneRenderRD::light_instance_set_shadow_transform(RID p_light_instance, const CameraMatrix &p_projection, const Transform3D &p_transform, float p_far, float p_split, int p_pass, float p_shadow_texel_size, float p_bias_scale, float p_range_begin, const Vector2 &p_uv_scale) {
- LightInstance *light_instance = light_instance_owner.getornull(p_light_instance);
+ LightInstance *light_instance = light_instance_owner.get_or_null(p_light_instance);
ERR_FAIL_COND(!light_instance);
ERR_FAIL_INDEX(p_pass, 6);
@@ -1281,7 +1364,7 @@ void RendererSceneRenderRD::light_instance_set_shadow_transform(RID p_light_inst
}
void RendererSceneRenderRD::light_instance_mark_visible(RID p_light_instance) {
- LightInstance *light_instance = light_instance_owner.getornull(p_light_instance);
+ LightInstance *light_instance = light_instance_owner.get_or_null(p_light_instance);
ERR_FAIL_COND(!light_instance);
light_instance->last_scene_pass = scene_pass;
@@ -1324,7 +1407,7 @@ RID RendererSceneRenderRD::decal_instance_create(RID p_decal) {
}
void RendererSceneRenderRD::decal_instance_set_transform(RID p_decal, const Transform3D &p_transform) {
- DecalInstance *di = decal_instance_owner.getornull(p_decal);
+ DecalInstance *di = decal_instance_owner.get_or_null(p_decal);
ERR_FAIL_COND(!di);
di->transform = p_transform;
}
@@ -1337,7 +1420,7 @@ RID RendererSceneRenderRD::lightmap_instance_create(RID p_lightmap) {
return lightmap_instance_owner.make_rid(li);
}
void RendererSceneRenderRD::lightmap_instance_set_transform(RID p_lightmap, const Transform3D &p_transform) {
- LightmapInstance *li = lightmap_instance_owner.getornull(p_lightmap);
+ LightmapInstance *li = lightmap_instance_owner.get_or_null(p_lightmap);
ERR_FAIL_COND(!li);
li->transform = p_transform;
}
@@ -1369,7 +1452,7 @@ void RendererSceneRenderRD::voxel_gi_update(RID p_probe, bool p_update_light_ins
}
void RendererSceneRenderRD::_debug_sdfgi_probes(RID p_render_buffers, RD::DrawListID p_draw_list, RID p_framebuffer, const CameraMatrix &p_camera_with_transform) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(!rb);
if (!rb->sdfgi) {
@@ -1707,7 +1790,7 @@ void RendererSceneRenderRD::_free_render_buffer_data(RenderBuffers *rb) {
}
void RendererSceneRenderRD::_process_sss(RID p_render_buffers, const CameraMatrix &p_camera) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(!rb);
bool can_use_effects = rb->width >= 8 && rb->height >= 8;
@@ -1725,7 +1808,7 @@ void RendererSceneRenderRD::_process_sss(RID p_render_buffers, const CameraMatri
}
void RendererSceneRenderRD::_process_ssr(RID p_render_buffers, RID p_dest_framebuffer, RID p_normal_buffer, RID p_specular_buffer, RID p_metallic, const Color &p_metallic_mask, RID p_environment, const CameraMatrix &p_projection, bool p_use_additive) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(!rb);
bool can_use_effects = rb->width >= 8 && rb->height >= 8;
@@ -1736,7 +1819,7 @@ void RendererSceneRenderRD::_process_ssr(RID p_render_buffers, RID p_dest_frameb
return;
}
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_environment);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_environment);
ERR_FAIL_COND(!env);
ERR_FAIL_COND(!env->ssr_enabled);
@@ -1777,10 +1860,10 @@ void RendererSceneRenderRD::_process_ssr(RID p_render_buffers, RID p_dest_frameb
}
void RendererSceneRenderRD::_process_ssao(RID p_render_buffers, RID p_environment, RID p_normal_buffer, const CameraMatrix &p_projection) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(!rb);
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_environment);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_environment);
ERR_FAIL_COND(!env);
RENDER_TIMESTAMP("Process SSAO");
@@ -1922,7 +2005,7 @@ void RendererSceneRenderRD::_process_ssao(RID p_render_buffers, RID p_environmen
}
void RendererSceneRenderRD::_render_buffers_copy_screen_texture(const RenderDataRD *p_render_data) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_data->render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_data->render_buffers);
ERR_FAIL_COND(!rb);
RD::get_singleton()->draw_command_begin_label("Copy screen texture");
@@ -1951,7 +2034,7 @@ void RendererSceneRenderRD::_render_buffers_copy_screen_texture(const RenderData
}
void RendererSceneRenderRD::_render_buffers_copy_depth_texture(const RenderDataRD *p_render_data) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_data->render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_data->render_buffers);
ERR_FAIL_COND(!rb);
RD::get_singleton()->draw_command_begin_label("Copy depth texture");
@@ -1974,12 +2057,12 @@ void RendererSceneRenderRD::_render_buffers_copy_depth_texture(const RenderDataR
}
void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const RenderDataRD *p_render_data) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_data->render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_data->render_buffers);
ERR_FAIL_COND(!rb);
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_render_data->environment);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_render_data->environment);
//glow (if enabled)
- CameraEffects *camfx = camera_effects_owner.getornull(p_render_data->camera_effects);
+ CameraEffects *camfx = camera_effects_owner.get_or_null(p_render_data->camera_effects);
bool can_use_effects = rb->width >= 8 && rb->height >= 8;
bool can_use_storage = _render_buffers_can_be_storage();
@@ -2154,6 +2237,7 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende
}
}
+ tonemap.luminance_multiplier = _render_buffers_get_luminance_multiplier();
tonemap.view_count = p_render_data->view_count;
storage->get_effects()->tonemapper(rb->texture, storage->render_target_get_rd_framebuffer(rb->render_target), tonemap);
@@ -2167,10 +2251,10 @@ void RendererSceneRenderRD::_render_buffers_post_process_and_tonemap(const Rende
void RendererSceneRenderRD::_post_process_subpass(RID p_source_texture, RID p_framebuffer, const RenderDataRD *p_render_data) {
RD::get_singleton()->draw_command_begin_label("Post Process Subpass");
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_data->render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_data->render_buffers);
ERR_FAIL_COND(!rb);
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_render_data->environment);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_render_data->environment);
bool can_use_effects = rb->width >= 8 && rb->height >= 8;
@@ -2218,6 +2302,7 @@ void RendererSceneRenderRD::_post_process_subpass(RID p_source_texture, RID p_fr
tonemap.use_debanding = rb->use_debanding;
tonemap.texture_size = Vector2i(rb->width, rb->height);
+ tonemap.luminance_multiplier = _render_buffers_get_luminance_multiplier();
tonemap.view_count = p_render_data->view_count;
storage->get_effects()->tonemapper(draw_list, p_source_texture, RD::get_singleton()->framebuffer_get_format(p_framebuffer), tonemap);
@@ -2226,7 +2311,7 @@ void RendererSceneRenderRD::_post_process_subpass(RID p_source_texture, RID p_fr
}
void RendererSceneRenderRD::_disable_clear_request(const RenderDataRD *p_render_data) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_data->render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_data->render_buffers);
ERR_FAIL_COND(!rb);
storage->render_target_disable_clear_request(rb->render_target);
@@ -2235,7 +2320,7 @@ void RendererSceneRenderRD::_disable_clear_request(const RenderDataRD *p_render_
void RendererSceneRenderRD::_render_buffers_debug_draw(RID p_render_buffers, RID p_shadow_atlas, RID p_occlusion_buffer) {
EffectsRD *effects = storage->get_effects();
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(!rb);
if (debug_draw == RS::VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS) {
@@ -2301,7 +2386,7 @@ void RendererSceneRenderRD::_render_buffers_debug_draw(RID p_render_buffers, RID
}
void RendererSceneRenderRD::environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction) {
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_env);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_env);
ERR_FAIL_COND(!env);
env->adjustments_enabled = p_enable;
@@ -2313,7 +2398,7 @@ void RendererSceneRenderRD::environment_set_adjustment(RID p_env, bool p_enable,
}
RID RendererSceneRenderRD::render_buffers_get_back_buffer_texture(RID p_render_buffers) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, RID());
if (!rb->blur[0].texture.is_valid()) {
return RID(); //not valid at the moment
@@ -2322,7 +2407,7 @@ RID RendererSceneRenderRD::render_buffers_get_back_buffer_texture(RID p_render_b
}
RID RendererSceneRenderRD::render_buffers_get_back_depth_texture(RID p_render_buffers) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, RID());
if (!rb->depth_back_texture.is_valid()) {
return RID(); //not valid at the moment
@@ -2330,15 +2415,22 @@ RID RendererSceneRenderRD::render_buffers_get_back_depth_texture(RID p_render_bu
return rb->depth_back_texture;
}
+RID RendererSceneRenderRD::render_buffers_get_depth_texture(RID p_render_buffers) {
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
+ ERR_FAIL_COND_V(!rb, RID());
+
+ return rb->depth_texture;
+}
+
RID RendererSceneRenderRD::render_buffers_get_ao_texture(RID p_render_buffers) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, RID());
return rb->ssao.ao_final;
}
RID RendererSceneRenderRD::render_buffers_get_voxel_gi_buffer(RID p_render_buffers) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, RID());
if (rb->gi.voxel_gi_buffer.is_null()) {
rb->gi.voxel_gi_buffer = RD::get_singleton()->uniform_buffer_create(sizeof(RendererSceneGIRD::VoxelGIData) * RendererSceneGIRD::MAX_VOXEL_GI_INSTANCES);
@@ -2351,31 +2443,31 @@ RID RendererSceneRenderRD::render_buffers_get_default_voxel_gi_buffer() {
}
RID RendererSceneRenderRD::render_buffers_get_gi_ambient_texture(RID p_render_buffers) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, RID());
return rb->ambient_buffer;
}
RID RendererSceneRenderRD::render_buffers_get_gi_reflection_texture(RID p_render_buffers) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, RID());
return rb->reflection_buffer;
}
uint32_t RendererSceneRenderRD::render_buffers_get_sdfgi_cascade_count(RID p_render_buffers) const {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, 0);
ERR_FAIL_COND_V(!rb->sdfgi, 0);
return rb->sdfgi->cascades.size();
}
bool RendererSceneRenderRD::render_buffers_is_sdfgi_enabled(RID p_render_buffers) const {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, false);
return rb->sdfgi != nullptr;
}
RID RendererSceneRenderRD::render_buffers_get_sdfgi_irradiance_probes(RID p_render_buffers) const {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, RID());
ERR_FAIL_COND_V(!rb->sdfgi, RID());
@@ -2383,7 +2475,7 @@ RID RendererSceneRenderRD::render_buffers_get_sdfgi_irradiance_probes(RID p_rend
}
Vector3 RendererSceneRenderRD::render_buffers_get_sdfgi_cascade_offset(RID p_render_buffers, uint32_t p_cascade) const {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, Vector3());
ERR_FAIL_COND_V(!rb->sdfgi, Vector3());
ERR_FAIL_UNSIGNED_INDEX_V(p_cascade, rb->sdfgi->cascades.size(), Vector3());
@@ -2392,7 +2484,7 @@ Vector3 RendererSceneRenderRD::render_buffers_get_sdfgi_cascade_offset(RID p_ren
}
Vector3i RendererSceneRenderRD::render_buffers_get_sdfgi_cascade_probe_offset(RID p_render_buffers, uint32_t p_cascade) const {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, Vector3i());
ERR_FAIL_COND_V(!rb->sdfgi, Vector3i());
ERR_FAIL_UNSIGNED_INDEX_V(p_cascade, rb->sdfgi->cascades.size(), Vector3i());
@@ -2402,14 +2494,14 @@ Vector3i RendererSceneRenderRD::render_buffers_get_sdfgi_cascade_probe_offset(RI
}
float RendererSceneRenderRD::render_buffers_get_sdfgi_normal_bias(RID p_render_buffers) const {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, 0);
ERR_FAIL_COND_V(!rb->sdfgi, 0);
return rb->sdfgi->normal_bias;
}
float RendererSceneRenderRD::render_buffers_get_sdfgi_cascade_probe_size(RID p_render_buffers, uint32_t p_cascade) const {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, 0);
ERR_FAIL_COND_V(!rb->sdfgi, 0);
ERR_FAIL_UNSIGNED_INDEX_V(p_cascade, rb->sdfgi->cascades.size(), 0);
@@ -2417,7 +2509,7 @@ float RendererSceneRenderRD::render_buffers_get_sdfgi_cascade_probe_size(RID p_r
return float(rb->sdfgi->cascade_size) * rb->sdfgi->cascades[p_cascade].cell_size / float(rb->sdfgi->probe_axis_count - 1);
}
uint32_t RendererSceneRenderRD::render_buffers_get_sdfgi_cascade_probe_count(RID p_render_buffers) const {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, 0);
ERR_FAIL_COND_V(!rb->sdfgi, 0);
@@ -2425,7 +2517,7 @@ uint32_t RendererSceneRenderRD::render_buffers_get_sdfgi_cascade_probe_count(RID
}
uint32_t RendererSceneRenderRD::render_buffers_get_sdfgi_cascade_size(RID p_render_buffers) const {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, 0);
ERR_FAIL_COND_V(!rb->sdfgi, 0);
@@ -2433,7 +2525,7 @@ uint32_t RendererSceneRenderRD::render_buffers_get_sdfgi_cascade_size(RID p_rend
}
bool RendererSceneRenderRD::render_buffers_is_sdfgi_using_occlusion(RID p_render_buffers) const {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, false);
ERR_FAIL_COND_V(!rb->sdfgi, false);
@@ -2441,14 +2533,14 @@ bool RendererSceneRenderRD::render_buffers_is_sdfgi_using_occlusion(RID p_render
}
float RendererSceneRenderRD::render_buffers_get_sdfgi_energy(RID p_render_buffers) const {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, 0.0);
ERR_FAIL_COND_V(!rb->sdfgi, 0.0);
return rb->sdfgi->energy;
}
RID RendererSceneRenderRD::render_buffers_get_sdfgi_occlusion_texture(RID p_render_buffers) const {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, RID());
ERR_FAIL_COND_V(!rb->sdfgi, RID());
@@ -2456,20 +2548,20 @@ RID RendererSceneRenderRD::render_buffers_get_sdfgi_occlusion_texture(RID p_rend
}
bool RendererSceneRenderRD::render_buffers_has_volumetric_fog(RID p_render_buffers) const {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, false);
return rb->volumetric_fog != nullptr;
}
RID RendererSceneRenderRD::render_buffers_get_volumetric_fog_texture(RID p_render_buffers) {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb || !rb->volumetric_fog, RID());
return rb->volumetric_fog->fog_map;
}
RID RendererSceneRenderRD::render_buffers_get_volumetric_fog_sky_uniform_set(RID p_render_buffers) {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, RID());
if (!rb->volumetric_fog) {
@@ -2480,16 +2572,20 @@ RID RendererSceneRenderRD::render_buffers_get_volumetric_fog_sky_uniform_set(RID
}
float RendererSceneRenderRD::render_buffers_get_volumetric_fog_end(RID p_render_buffers) {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb || !rb->volumetric_fog, 0);
return rb->volumetric_fog->length;
}
float RendererSceneRenderRD::render_buffers_get_volumetric_fog_detail_spread(RID p_render_buffers) {
- const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ const RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb || !rb->volumetric_fog, 0);
return rb->volumetric_fog->spread;
}
+float RendererSceneRenderRD::_render_buffers_get_luminance_multiplier() {
+ return 1.0;
+}
+
RD::DataFormat RendererSceneRenderRD::_render_buffers_get_color_format() {
return RD::DATA_FORMAT_R16G16B16A16_SFLOAT;
}
@@ -2501,7 +2597,9 @@ bool RendererSceneRenderRD::_render_buffers_can_be_storage() {
void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_width, int p_height, RS::ViewportMSAA p_msaa, RenderingServer::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_debanding, uint32_t p_view_count) {
ERR_FAIL_COND_MSG(p_view_count == 0, "Must have at least 1 view");
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
+
+ // Should we add an overrule per viewport?
rb->width = p_width;
rb->height = p_height;
rb->render_target = p_render_target;
@@ -2548,8 +2646,8 @@ void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p
tf.format = RD::DATA_FORMAT_R32_SFLOAT;
}
- tf.width = p_width;
- tf.height = p_height;
+ tf.width = rb->width;
+ tf.height = rb->height;
tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT;
tf.array_layers = rb->view_count; // create a layer for every view
@@ -2571,10 +2669,10 @@ void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p
}
RID target_texture = storage->render_target_get_rd_texture(rb->render_target);
- rb->data->configure(rb->texture, rb->depth_texture, target_texture, p_width, p_height, p_msaa, p_view_count);
+ rb->data->configure(rb->texture, rb->depth_texture, target_texture, rb->width, rb->height, p_msaa, p_view_count);
if (is_clustered_enabled()) {
- rb->cluster_builder->setup(Size2i(p_width, p_height), max_cluster_elements, rb->depth_texture, storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED), rb->texture);
+ rb->cluster_builder->setup(Size2i(rb->width, rb->height), max_cluster_elements, rb->depth_texture, storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED), rb->texture);
}
}
@@ -2703,7 +2801,7 @@ bool RendererSceneRenderRD::is_using_radiance_cubemap_array() const {
}
RendererSceneRenderRD::RenderBufferData *RendererSceneRenderRD::render_buffers_get_data(RID p_render_buffers) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND_V(!rb, nullptr);
return rb->data;
}
@@ -2716,7 +2814,7 @@ void RendererSceneRenderRD::_setup_reflections(const PagedArray<RID> &p_reflecti
break;
}
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_reflections[i]);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_reflections[i]);
if (!rpi) {
continue;
}
@@ -2802,7 +2900,7 @@ void RendererSceneRenderRD::_setup_lights(const PagedArray<RID> &p_lights, const
r_directional_light_soft_shadows = false;
for (int i = 0; i < (int)p_lights.size(); i++) {
- LightInstance *li = light_instance_owner.getornull(p_lights[i]);
+ LightInstance *li = light_instance_owner.get_or_null(p_lights[i]);
if (!li) {
continue;
}
@@ -3031,7 +3129,7 @@ void RendererSceneRenderRD::_setup_lights(const PagedArray<RID> &p_lights, const
ShadowAtlas *shadow_atlas = nullptr;
if (p_shadow_atlas.is_valid() && p_using_shadows) {
- shadow_atlas = shadow_atlas_owner.getornull(p_shadow_atlas);
+ shadow_atlas = shadow_atlas_owner.get_or_null(p_shadow_atlas);
}
bool using_forward_ids = _uses_forward_ids();
@@ -3120,18 +3218,19 @@ void RendererSceneRenderRD::_setup_lights(const PagedArray<RID> &p_lights, const
light_data.shadow_enabled = true;
- if (type == RS::LIGHT_SPOT) {
- light_data.shadow_bias = (storage->light_get_param(base, RS::LIGHT_PARAM_SHADOW_BIAS) / 100.0);
+ float shadow_texel_size = light_instance_get_shadow_texel_size(li->self, p_shadow_atlas);
+ light_data.shadow_normal_bias = storage->light_get_param(base, RS::LIGHT_PARAM_SHADOW_NORMAL_BIAS) * shadow_texel_size * 10.0;
- } else { //omni
+ if (type == RS::LIGHT_SPOT) {
light_data.shadow_bias = storage->light_get_param(base, RS::LIGHT_PARAM_SHADOW_BIAS) / 100.0;
- float shadow_texel_size = light_instance_get_shadow_texel_size(li->self, p_shadow_atlas);
- light_data.shadow_normal_bias = storage->light_get_param(base, RS::LIGHT_PARAM_SHADOW_NORMAL_BIAS) * shadow_texel_size * 2.0; // applied in -1 .. 1 space
+ } else { //omni
+ light_data.shadow_bias = storage->light_get_param(base, RS::LIGHT_PARAM_SHADOW_BIAS);
}
light_data.transmittance_bias = storage->light_get_transmittance_bias(base);
- Rect2 rect = light_instance_get_shadow_atlas_rect(li->self, p_shadow_atlas);
+ Vector2i omni_offset;
+ Rect2 rect = light_instance_get_shadow_atlas_rect(li->self, p_shadow_atlas, omni_offset);
light_data.atlas_rect[0] = rect.position.x;
light_data.atlas_rect[1] = rect.position.y;
@@ -3142,7 +3241,6 @@ void RendererSceneRenderRD::_setup_lights(const PagedArray<RID> &p_lights, const
light_data.shadow_volumetric_fog_fade = 1.0 / storage->light_get_shadow_volumetric_fog_fade(base);
if (type == RS::LIGHT_OMNI) {
- light_data.atlas_rect[3] *= 0.5; //one paraboloid on top of another
Transform3D proj = (inverse_transform * light_transform).inverse();
RendererStorageRD::store_transform(proj, light_data.shadow_matrix);
@@ -3154,6 +3252,8 @@ void RendererSceneRenderRD::_setup_lights(const PagedArray<RID> &p_lights, const
light_data.soft_shadow_scale *= shadows_quality_radius_get(); // Only use quality radius for PCF
}
+ light_data.direction[0] = omni_offset.x * float(rect.size.width);
+ light_data.direction[1] = omni_offset.y * float(rect.size.height);
} else if (type == RS::LIGHT_SPOT) {
Transform3D modelview = (inverse_transform * light_transform).inverse();
CameraMatrix bias;
@@ -3212,7 +3312,7 @@ void RendererSceneRenderRD::_setup_decals(const PagedArray<RID> &p_decals, const
break;
}
- DecalInstance *di = decal_instance_owner.getornull(p_decals[i]);
+ DecalInstance *di = decal_instance_owner.get_or_null(p_decals[i]);
if (!di) {
continue;
}
@@ -3272,7 +3372,7 @@ void RendererSceneRenderRD::_setup_decals(const PagedArray<RID> &p_decals, const
Vector3 decal_extents = storage->decal_get_extents(decal);
Transform3D scale_xform;
- scale_xform.basis.scale(Vector3(decal_extents.x, decal_extents.y, decal_extents.z));
+ scale_xform.basis.scale(decal_extents);
Transform3D to_decal_xform = (p_camera_inverse_xform * di->transform * scale_xform * uv_xform).affine_inverse();
RendererStorageRD::store_transform(to_decal_xform, dd.xform);
@@ -3395,9 +3495,9 @@ void RendererSceneRenderRD::_volumetric_fog_erase(RenderBuffers *rb) {
void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_environment, const CameraMatrix &p_cam_projection, const Transform3D &p_cam_transform, RID p_shadow_atlas, int p_directional_light_count, bool p_use_directional_shadows, int p_positional_light_count, int p_voxel_gi_count) {
ERR_FAIL_COND(!is_clustered_enabled()); // can't use volumetric fog without clustered
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(!rb);
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_environment);
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_environment);
float ratio = float(rb->width) / float((rb->width + rb->height) / 2);
uint32_t target_width = uint32_t(float(volumetric_fog_size) * ratio);
@@ -3466,7 +3566,7 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 1;
- ShadowAtlas *shadow_atlas = shadow_atlas_owner.getornull(p_shadow_atlas);
+ ShadowAtlas *shadow_atlas = shadow_atlas_owner.get_or_null(p_shadow_atlas);
if (shadow_atlas == nullptr || shadow_atlas->depth.is_null()) {
u.ids.push_back(storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_BLACK));
} else {
@@ -3788,7 +3888,7 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
bool RendererSceneRenderRD::_needs_post_prepass_render(RenderDataRD *p_render_data, bool p_use_gi) {
if (p_render_data->render_buffers.is_valid()) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_data->render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_data->render_buffers);
if (rb->sdfgi != nullptr) {
return true;
}
@@ -3799,14 +3899,14 @@ bool RendererSceneRenderRD::_needs_post_prepass_render(RenderDataRD *p_render_da
void RendererSceneRenderRD::_post_prepass_render(RenderDataRD *p_render_data, bool p_use_gi) {
if (p_render_data->render_buffers.is_valid()) {
if (p_use_gi) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_data->render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_data->render_buffers);
ERR_FAIL_COND(rb == nullptr);
if (rb->sdfgi == nullptr) {
return;
}
- RendererSceneEnvironmentRD *env = environment_owner.getornull(p_render_data->environment);
- rb->sdfgi->update_probes(env, sky.sky_owner.getornull(env->sky));
+ RendererSceneEnvironmentRD *env = environment_owner.get_or_null(p_render_data->environment);
+ rb->sdfgi->update_probes(env, sky.sky_owner.get_or_null(env->sky));
}
}
}
@@ -3823,7 +3923,7 @@ void RendererSceneRenderRD::_pre_opaque_render(RenderDataRD *p_render_data, bool
// Render shadows while GI is rendering, due to how barriers are handled, this should happen at the same time
if (p_render_data->render_buffers.is_valid() && p_use_gi) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_data->render_buffers);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_data->render_buffers);
ERR_FAIL_COND(rb == nullptr);
if (rb->sdfgi != nullptr) {
rb->sdfgi->store_probes();
@@ -3838,7 +3938,7 @@ void RendererSceneRenderRD::_pre_opaque_render(RenderDataRD *p_render_data, bool
float lod_distance_multiplier = p_render_data->cam_projection.get_lod_multiplier();
{
for (int i = 0; i < render_state.render_shadow_count; i++) {
- LightInstance *li = light_instance_owner.getornull(render_state.render_shadows[i].light);
+ LightInstance *li = light_instance_owner.get_or_null(render_state.render_shadows[i].light);
if (storage->light_get_type(li->light) == RS::LIGHT_DIRECTIONAL) {
render_state.directional_shadows.push_back(i);
@@ -3958,7 +4058,7 @@ void RendererSceneRenderRD::render_scene(RID p_render_buffers, const CameraData
// getting this here now so we can direct call a bunch of things more easily
RenderBuffers *rb = nullptr;
if (p_render_buffers.is_valid()) {
- rb = render_buffers_owner.getornull(p_render_buffers);
+ rb = render_buffers_owner.get_or_null(p_render_buffers);
ERR_FAIL_COND(!rb);
}
@@ -4040,7 +4140,7 @@ void RendererSceneRenderRD::render_scene(RID p_render_buffers, const CameraData
//assign render indices to voxel_gi_instances
if (is_dynamic_gi_supported()) {
for (uint32_t i = 0; i < (uint32_t)p_voxel_gi_instances.size(); i++) {
- RendererSceneGIRD::VoxelGIInstance *voxel_gi_inst = gi.voxel_gi_instance_owner.getornull(p_voxel_gi_instances[i]);
+ RendererSceneGIRD::VoxelGIInstance *voxel_gi_inst = gi.voxel_gi_instance_owner.get_or_null(p_voxel_gi_instances[i]);
if (voxel_gi_inst) {
voxel_gi_inst->render_index = i;
}
@@ -4051,8 +4151,8 @@ void RendererSceneRenderRD::render_scene(RID p_render_buffers, const CameraData
// render_data.render_buffers == p_render_buffers so we can use our already retrieved rb
current_cluster_builder = rb->cluster_builder;
} else if (reflection_probe_instance_owner.owns(render_data.reflection_probe)) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(render_data.reflection_probe);
- ReflectionAtlas *ra = reflection_atlas_owner.getornull(rpi->atlas);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(render_data.reflection_probe);
+ ReflectionAtlas *ra = reflection_atlas_owner.get_or_null(rpi->atlas);
if (!ra) {
ERR_PRINT("reflection probe has no reflection atlas! Bug?");
current_cluster_builder = nullptr;
@@ -4130,7 +4230,7 @@ void RendererSceneRenderRD::_debug_draw_cluster(RID p_render_buffers) {
}
void RendererSceneRenderRD::_render_shadow_pass(RID p_light, RID p_shadow_atlas, int p_pass, const PagedArray<GeometryInstance *> &p_instances, const Plane &p_camera_plane, float p_lod_distance_multiplier, float p_screen_lod_threshold, bool p_open_pass, bool p_close_pass, bool p_clear_region, RendererScene::RenderInfo *p_render_info) {
- LightInstance *light_instance = light_instance_owner.getornull(p_light);
+ LightInstance *light_instance = light_instance_owner.get_or_null(p_light);
ERR_FAIL_COND(!light_instance);
Rect2i atlas_rect;
@@ -4139,6 +4239,7 @@ void RendererSceneRenderRD::_render_shadow_pass(RID p_light, RID p_shadow_atlas,
bool using_dual_paraboloid = false;
bool using_dual_paraboloid_flip = false;
+ Vector2i dual_paraboloid_offset;
RID render_fb;
RID render_texture;
float zfar;
@@ -4164,10 +4265,7 @@ void RendererSceneRenderRD::_render_shadow_pass(RID p_light, RID p_shadow_atlas,
light_projection = light_instance->shadow_transform[p_pass].camera;
light_transform = light_instance->shadow_transform[p_pass].transform;
- atlas_rect.position.x = light_instance->directional_rect.position.x;
- atlas_rect.position.y = light_instance->directional_rect.position.y;
- atlas_rect.size.width = light_instance->directional_rect.size.x;
- atlas_rect.size.height = light_instance->directional_rect.size.y;
+ atlas_rect = light_instance->directional_rect;
if (storage->light_directional_get_shadow_mode(light_instance->light) == RS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS) {
atlas_rect.size.width /= 2;
@@ -4178,8 +4276,7 @@ void RendererSceneRenderRD::_render_shadow_pass(RID p_light, RID p_shadow_atlas,
} else if (p_pass == 2) {
atlas_rect.position.y += atlas_rect.size.height;
} else if (p_pass == 3) {
- atlas_rect.position.x += atlas_rect.size.width;
- atlas_rect.position.y += atlas_rect.size.height;
+ atlas_rect.position += atlas_rect.size;
}
} else if (storage->light_directional_get_shadow_mode(light_instance->light) == RS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS) {
atlas_rect.size.height /= 2;
@@ -4204,7 +4301,7 @@ void RendererSceneRenderRD::_render_shadow_pass(RID p_light, RID p_shadow_atlas,
} else {
//set from shadow atlas
- ShadowAtlas *shadow_atlas = shadow_atlas_owner.getornull(p_shadow_atlas);
+ ShadowAtlas *shadow_atlas = shadow_atlas_owner.get_or_null(p_shadow_atlas);
ERR_FAIL_COND(!shadow_atlas);
ERR_FAIL_COND(!shadow_atlas->shadow_owners.has(p_light));
@@ -4232,6 +4329,9 @@ void RendererSceneRenderRD::_render_shadow_pass(RID p_light, RID p_shadow_atlas,
zfar = storage->light_get_param(light_instance->light, RS::LIGHT_PARAM_RANGE);
if (storage->light_get_type(light_instance->light) == RS::LIGHT_OMNI) {
+ bool wrap = (shadow + 1) % shadow_atlas->quadrants[quadrant].subdivision == 0;
+ dual_paraboloid_offset = wrap ? Vector2i(1 - shadow_atlas->quadrants[quadrant].subdivision, 1) : Vector2i(1, 0);
+
if (storage->light_omni_get_shadow_mode(light_instance->light) == RS::LIGHT_OMNI_SHADOW_CUBE) {
ShadowCubemap *cubemap = _get_shadow_cubemap(shadow_size / 2);
@@ -4251,12 +4351,16 @@ void RendererSceneRenderRD::_render_shadow_pass(RID p_light, RID p_shadow_atlas,
}
} else {
+ atlas_rect.position.x += 1;
+ atlas_rect.position.y += 1;
+ atlas_rect.size.x -= 2;
+ atlas_rect.size.y -= 2;
+
+ atlas_rect.position += p_pass * atlas_rect.size * dual_paraboloid_offset;
+
light_projection = light_instance->shadow_transform[0].camera;
light_transform = light_instance->shadow_transform[0].transform;
- atlas_rect.size.height /= 2;
- atlas_rect.position.y += p_pass * atlas_rect.size.height;
-
using_dual_paraboloid = true;
using_dual_paraboloid_flip = p_pass == 1;
render_fb = shadow_atlas->fb;
@@ -4281,14 +4385,11 @@ void RendererSceneRenderRD::_render_shadow_pass(RID p_light, RID p_shadow_atlas,
_render_shadow_end();
//reblit
Rect2 atlas_rect_norm = atlas_rect;
- atlas_rect_norm.position.x /= float(atlas_size);
- atlas_rect_norm.position.y /= float(atlas_size);
- atlas_rect_norm.size.x /= float(atlas_size);
- atlas_rect_norm.size.y /= float(atlas_size);
- atlas_rect_norm.size.height /= 2;
- storage->get_effects()->copy_cubemap_to_dp(render_texture, atlas_fb, atlas_rect_norm, light_projection.get_z_near(), light_projection.get_z_far(), false);
- atlas_rect_norm.position.y += atlas_rect_norm.size.height;
- storage->get_effects()->copy_cubemap_to_dp(render_texture, atlas_fb, atlas_rect_norm, light_projection.get_z_near(), light_projection.get_z_far(), true);
+ atlas_rect_norm.position /= float(atlas_size);
+ atlas_rect_norm.size /= float(atlas_size);
+ storage->get_effects()->copy_cubemap_to_dp(render_texture, atlas_fb, atlas_rect_norm, atlas_rect.size, light_projection.get_z_near(), light_projection.get_z_far(), false);
+ atlas_rect_norm.position += Vector2(dual_paraboloid_offset) * atlas_rect_norm.size;
+ storage->get_effects()->copy_cubemap_to_dp(render_texture, atlas_fb, atlas_rect_norm, atlas_rect.size, light_projection.get_z_near(), light_projection.get_z_far(), true);
//restore transform so it can be properly used
light_instance_set_shadow_transform(p_light, CameraMatrix(), light_instance->transform, zfar, 0, 0, 0);
@@ -4323,7 +4424,7 @@ void RendererSceneRenderRD::render_particle_collider_heightfield(RID p_collider,
bool RendererSceneRenderRD::free(RID p_rid) {
if (render_buffers_owner.owns(p_rid)) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_rid);
+ RenderBuffers *rb = render_buffers_owner.get_or_null(p_rid);
_free_render_buffer_data(rb);
memdelete(rb->data);
if (rb->sdfgi) {
@@ -4346,24 +4447,24 @@ bool RendererSceneRenderRD::free(RID p_rid) {
camera_effects_owner.free(p_rid);
} else if (reflection_atlas_owner.owns(p_rid)) {
reflection_atlas_set_size(p_rid, 0, 0);
- ReflectionAtlas *ra = reflection_atlas_owner.getornull(p_rid);
+ ReflectionAtlas *ra = reflection_atlas_owner.get_or_null(p_rid);
if (ra->cluster_builder) {
memdelete(ra->cluster_builder);
}
reflection_atlas_owner.free(p_rid);
} else if (reflection_probe_instance_owner.owns(p_rid)) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_rid);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_rid);
_free_forward_id(FORWARD_ID_TYPE_REFLECTION_PROBE, rpi->forward_id);
reflection_probe_release_atlas_index(p_rid);
reflection_probe_instance_owner.free(p_rid);
} else if (decal_instance_owner.owns(p_rid)) {
- DecalInstance *di = decal_instance_owner.getornull(p_rid);
+ DecalInstance *di = decal_instance_owner.get_or_null(p_rid);
_free_forward_id(FORWARD_ID_TYPE_DECAL, di->forward_id);
decal_instance_owner.free(p_rid);
} else if (lightmap_instance_owner.owns(p_rid)) {
lightmap_instance_owner.free(p_rid);
} else if (gi.voxel_gi_instance_owner.owns(p_rid)) {
- RendererSceneGIRD::VoxelGIInstance *voxel_gi = gi.voxel_gi_instance_owner.getornull(p_rid);
+ RendererSceneGIRD::VoxelGIInstance *voxel_gi = gi.voxel_gi_instance_owner.get_or_null(p_rid);
if (voxel_gi->texture.is_valid()) {
RD::get_singleton()->free(voxel_gi->texture);
RD::get_singleton()->free(voxel_gi->write_buffer);
@@ -4379,17 +4480,23 @@ bool RendererSceneRenderRD::free(RID p_rid) {
sky.update_dirty_skys();
sky.free_sky(p_rid);
} else if (light_instance_owner.owns(p_rid)) {
- LightInstance *light_instance = light_instance_owner.getornull(p_rid);
+ LightInstance *light_instance = light_instance_owner.get_or_null(p_rid);
//remove from shadow atlases..
for (Set<RID>::Element *E = light_instance->shadow_atlases.front(); E; E = E->next()) {
- ShadowAtlas *shadow_atlas = shadow_atlas_owner.getornull(E->get());
+ ShadowAtlas *shadow_atlas = shadow_atlas_owner.get_or_null(E->get());
ERR_CONTINUE(!shadow_atlas->shadow_owners.has(p_rid));
uint32_t key = shadow_atlas->shadow_owners[p_rid];
uint32_t q = (key >> ShadowAtlas::QUADRANT_SHIFT) & 0x3;
uint32_t s = key & ShadowAtlas::SHADOW_INDEX_MASK;
shadow_atlas->quadrants[q].shadows.write[s].owner = RID();
+
+ if (key & ShadowAtlas::OMNI_LIGHT_FLAG) {
+ // Omni lights use two atlas spots, make sure to clear the other as well
+ shadow_atlas->quadrants[q].shadows.write[s + 1].owner = RID();
+ }
+
shadow_atlas->shadow_owners.erase(p_rid);
}
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.h b/servers/rendering/renderer_rd/renderer_scene_render_rd.h
index a7cc27be4a..fa80b84cfe 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.h
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.h
@@ -149,7 +149,7 @@ protected:
RendererSceneEnvironmentRD *get_environment(RID p_environment) {
if (p_environment.is_valid()) {
- return environment_owner.getornull(p_environment);
+ return environment_owner.get_or_null(p_environment);
} else {
return nullptr;
}
@@ -255,7 +255,8 @@ private:
struct ShadowAtlas {
enum {
QUADRANT_SHIFT = 27,
- SHADOW_INDEX_MASK = (1 << QUADRANT_SHIFT) - 1,
+ OMNI_LIGHT_FLAG = 1 << 26,
+ SHADOW_INDEX_MASK = OMNI_LIGHT_FLAG - 1,
SHADOW_INVALID = 0xFFFFFFFF
};
@@ -299,7 +300,9 @@ private:
void _update_shadow_atlas(ShadowAtlas *shadow_atlas);
+ void _shadow_atlas_invalidate_shadow(RendererSceneRenderRD::ShadowAtlas::Quadrant::Shadow *p_shadow, RID p_atlas, RendererSceneRenderRD::ShadowAtlas *p_shadow_atlas, uint32_t p_quadrant, uint32_t p_shadow_idx);
bool _shadow_atlas_find_shadow(ShadowAtlas *shadow_atlas, int *p_in_quadrants, int p_quadrant_count, int p_current_subdiv, uint64_t p_tick, int &r_quadrant, int &r_shadow);
+ bool _shadow_atlas_find_omni_shadows(ShadowAtlas *shadow_atlas, int *p_in_quadrants, int p_quadrant_count, int p_current_subdiv, uint64_t p_tick, int &r_quadrant, int &r_shadow);
RS::ShadowQuality shadows_quality = RS::SHADOW_QUALITY_MAX; //So it always updates when first set
RS::ShadowQuality directional_shadow_quality = RS::SHADOW_QUALITY_MAX;
@@ -379,10 +382,6 @@ private:
uint32_t cull_mask = 0;
uint32_t light_directional_index = 0;
- uint32_t current_shadow_atlas_key = 0;
-
- Vector2 dp;
-
Rect2 directional_rect;
Set<RID> shadow_atlases; //shadow atlases where this light is registered
@@ -575,7 +574,7 @@ private:
struct LightData {
float position[3];
float inv_radius;
- float direction[3];
+ float direction[3]; // in omni, x and y are used for dual paraboloid offset
float size;
float color[3];
@@ -815,19 +814,19 @@ public:
virtual void shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) override;
virtual bool shadow_atlas_update_light(RID p_atlas, RID p_light_intance, float p_coverage, uint64_t p_light_version) override;
_FORCE_INLINE_ bool shadow_atlas_owns_light_instance(RID p_atlas, RID p_light_intance) {
- ShadowAtlas *atlas = shadow_atlas_owner.getornull(p_atlas);
+ ShadowAtlas *atlas = shadow_atlas_owner.get_or_null(p_atlas);
ERR_FAIL_COND_V(!atlas, false);
return atlas->shadow_owners.has(p_light_intance);
}
_FORCE_INLINE_ RID shadow_atlas_get_texture(RID p_atlas) {
- ShadowAtlas *atlas = shadow_atlas_owner.getornull(p_atlas);
+ ShadowAtlas *atlas = shadow_atlas_owner.get_or_null(p_atlas);
ERR_FAIL_COND_V(!atlas, RID());
return atlas->depth;
}
_FORCE_INLINE_ Size2i shadow_atlas_get_size(RID p_atlas) {
- ShadowAtlas *atlas = shadow_atlas_owner.getornull(p_atlas);
+ ShadowAtlas *atlas = shadow_atlas_owner.get_or_null(p_atlas);
ERR_FAIL_COND_V(!atlas, Size2i());
return Size2(atlas->size, atlas->size);
}
@@ -943,7 +942,7 @@ public:
virtual void camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) override;
bool camera_effects_uses_dof(RID p_camera_effects) {
- CameraEffects *camfx = camera_effects_owner.getornull(p_camera_effects);
+ CameraEffects *camfx = camera_effects_owner.get_or_null(p_camera_effects);
return camfx && (camfx->dof_blur_near_enabled || camfx->dof_blur_far_enabled) && camfx->dof_blur_amount > 0.0;
}
@@ -955,18 +954,18 @@ public:
virtual void light_instance_mark_visible(RID p_light_instance) override;
_FORCE_INLINE_ RID light_instance_get_base_light(RID p_light_instance) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->light;
}
_FORCE_INLINE_ Transform3D light_instance_get_base_transform(RID p_light_instance) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->transform;
}
- _FORCE_INLINE_ Rect2 light_instance_get_shadow_atlas_rect(RID p_light_instance, RID p_shadow_atlas) {
- ShadowAtlas *shadow_atlas = shadow_atlas_owner.getornull(p_shadow_atlas);
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ _FORCE_INLINE_ Rect2 light_instance_get_shadow_atlas_rect(RID p_light_instance, RID p_shadow_atlas, Vector2i &r_omni_offset) {
+ ShadowAtlas *shadow_atlas = shadow_atlas_owner.get_or_null(p_shadow_atlas);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
uint32_t key = shadow_atlas->shadow_owners[li->self];
uint32_t quadrant = (key >> ShadowAtlas::QUADRANT_SHIFT) & 0x3;
@@ -984,6 +983,16 @@ public:
x += (shadow % shadow_atlas->quadrants[quadrant].subdivision) * shadow_size;
y += (shadow / shadow_atlas->quadrants[quadrant].subdivision) * shadow_size;
+ if (key & ShadowAtlas::OMNI_LIGHT_FLAG) {
+ if (((shadow + 1) % shadow_atlas->quadrants[quadrant].subdivision) == 0) {
+ r_omni_offset.x = 1 - int(shadow_atlas->quadrants[quadrant].subdivision);
+ r_omni_offset.y = 1;
+ } else {
+ r_omni_offset.x = 1;
+ r_omni_offset.y = 0;
+ }
+ }
+
uint32_t width = shadow_size;
uint32_t height = shadow_size;
@@ -991,16 +1000,16 @@ public:
}
_FORCE_INLINE_ CameraMatrix light_instance_get_shadow_camera(RID p_light_instance, int p_index) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->shadow_transform[p_index].camera;
}
_FORCE_INLINE_ float light_instance_get_shadow_texel_size(RID p_light_instance, RID p_shadow_atlas) {
#ifdef DEBUG_ENABLED
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
ERR_FAIL_COND_V(!li->shadow_atlases.has(p_shadow_atlas), 0);
#endif
- ShadowAtlas *shadow_atlas = shadow_atlas_owner.getornull(p_shadow_atlas);
+ ShadowAtlas *shadow_atlas = shadow_atlas_owner.get_or_null(p_shadow_atlas);
ERR_FAIL_COND_V(!shadow_atlas, 0);
#ifdef DEBUG_ENABLED
ERR_FAIL_COND_V(!shadow_atlas->shadow_owners.has(p_light_instance), 0);
@@ -1018,59 +1027,59 @@ public:
_FORCE_INLINE_ Transform3D
light_instance_get_shadow_transform(RID p_light_instance, int p_index) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->shadow_transform[p_index].transform;
}
_FORCE_INLINE_ float light_instance_get_shadow_bias_scale(RID p_light_instance, int p_index) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->shadow_transform[p_index].bias_scale;
}
_FORCE_INLINE_ float light_instance_get_shadow_range(RID p_light_instance, int p_index) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->shadow_transform[p_index].farplane;
}
_FORCE_INLINE_ float light_instance_get_shadow_range_begin(RID p_light_instance, int p_index) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->shadow_transform[p_index].range_begin;
}
_FORCE_INLINE_ Vector2 light_instance_get_shadow_uv_scale(RID p_light_instance, int p_index) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->shadow_transform[p_index].uv_scale;
}
_FORCE_INLINE_ Rect2 light_instance_get_directional_shadow_atlas_rect(RID p_light_instance, int p_index) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->shadow_transform[p_index].atlas_rect;
}
_FORCE_INLINE_ float light_instance_get_directional_shadow_split(RID p_light_instance, int p_index) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->shadow_transform[p_index].split;
}
_FORCE_INLINE_ float light_instance_get_directional_shadow_texel_size(RID p_light_instance, int p_index) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->shadow_transform[p_index].shadow_texel_size;
}
_FORCE_INLINE_ void light_instance_set_render_pass(RID p_light_instance, uint64_t p_pass) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
li->last_pass = p_pass;
}
_FORCE_INLINE_ uint64_t light_instance_get_render_pass(RID p_light_instance) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->last_pass;
}
_FORCE_INLINE_ ForwardID light_instance_get_forward_id(RID p_light_instance) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->forward_id;
}
_FORCE_INLINE_ RS::LightType light_instance_get_type(RID p_light_instance) {
- LightInstance *li = light_instance_owner.getornull(p_light_instance);
+ LightInstance *li = light_instance_owner.get_or_null(p_light_instance);
return li->light_type;
}
@@ -1079,7 +1088,7 @@ public:
virtual int reflection_atlas_get_size(RID p_ref_atlas) const override;
_FORCE_INLINE_ RID reflection_atlas_get_texture(RID p_ref_atlas) {
- ReflectionAtlas *atlas = reflection_atlas_owner.getornull(p_ref_atlas);
+ ReflectionAtlas *atlas = reflection_atlas_owner.get_or_null(p_ref_atlas);
ERR_FAIL_COND_V(!atlas, RID());
return atlas->reflection;
}
@@ -1098,41 +1107,41 @@ public:
RID reflection_probe_instance_get_depth_framebuffer(RID p_instance, int p_index);
_FORCE_INLINE_ RID reflection_probe_instance_get_probe(RID p_instance) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!rpi, RID());
return rpi->probe;
}
_FORCE_INLINE_ ForwardID reflection_probe_instance_get_forward_id(RID p_instance) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!rpi, 0);
return rpi->forward_id;
}
_FORCE_INLINE_ void reflection_probe_instance_set_render_pass(RID p_instance, uint32_t p_render_pass) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!rpi);
rpi->last_pass = p_render_pass;
}
_FORCE_INLINE_ uint32_t reflection_probe_instance_get_render_pass(RID p_instance) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!rpi, 0);
return rpi->last_pass;
}
_FORCE_INLINE_ Transform3D reflection_probe_instance_get_transform(RID p_instance) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!rpi, Transform3D());
return rpi->transform;
}
_FORCE_INLINE_ int reflection_probe_instance_get_atlas_index(RID p_instance) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_instance);
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!rpi, -1);
return rpi->atlas_index;
@@ -1142,32 +1151,32 @@ public:
virtual void decal_instance_set_transform(RID p_decal, const Transform3D &p_transform) override;
_FORCE_INLINE_ RID decal_instance_get_base(RID p_decal) const {
- DecalInstance *decal = decal_instance_owner.getornull(p_decal);
+ DecalInstance *decal = decal_instance_owner.get_or_null(p_decal);
return decal->decal;
}
_FORCE_INLINE_ ForwardID decal_instance_get_forward_id(RID p_decal) const {
- DecalInstance *decal = decal_instance_owner.getornull(p_decal);
+ DecalInstance *decal = decal_instance_owner.get_or_null(p_decal);
return decal->forward_id;
}
_FORCE_INLINE_ Transform3D decal_instance_get_transform(RID p_decal) const {
- DecalInstance *decal = decal_instance_owner.getornull(p_decal);
+ DecalInstance *decal = decal_instance_owner.get_or_null(p_decal);
return decal->transform;
}
virtual RID lightmap_instance_create(RID p_lightmap) override;
virtual void lightmap_instance_set_transform(RID p_lightmap, const Transform3D &p_transform) override;
_FORCE_INLINE_ bool lightmap_instance_is_valid(RID p_lightmap_instance) {
- return lightmap_instance_owner.getornull(p_lightmap_instance) != nullptr;
+ return lightmap_instance_owner.get_or_null(p_lightmap_instance) != nullptr;
}
_FORCE_INLINE_ RID lightmap_instance_get_lightmap(RID p_lightmap_instance) {
- LightmapInstance *li = lightmap_instance_owner.getornull(p_lightmap_instance);
+ LightmapInstance *li = lightmap_instance_owner.get_or_null(p_lightmap_instance);
return li->lightmap;
}
_FORCE_INLINE_ Transform3D lightmap_instance_get_transform(RID p_lightmap_instance) {
- LightmapInstance *li = lightmap_instance_owner.getornull(p_lightmap_instance);
+ LightmapInstance *li = lightmap_instance_owner.get_or_null(p_lightmap_instance);
return li->transform;
}
@@ -1181,12 +1190,14 @@ public:
/* render buffers */
+ virtual float _render_buffers_get_luminance_multiplier();
virtual RD::DataFormat _render_buffers_get_color_format();
virtual bool _render_buffers_can_be_storage();
virtual RID render_buffers_create() override;
virtual void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_width, int p_height, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_debanding, uint32_t p_view_count) override;
virtual void gi_set_use_half_resolution(bool p_enable) override;
+ RID render_buffers_get_depth_texture(RID p_render_buffers);
RID render_buffers_get_ao_texture(RID p_render_buffers);
RID render_buffers_get_back_buffer_texture(RID p_render_buffers);
RID render_buffers_get_back_depth_texture(RID p_render_buffers);
diff --git a/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp
index 9e85608f1e..14a4111038 100644
--- a/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_sky_rd.cpp
@@ -259,7 +259,7 @@ static _FORCE_INLINE_ void store_transform_3x3(const Basis &p_basis, float *p_ar
p_array[11] = 0;
}
-void RendererSceneSkyRD::_render_sky(RD::DrawListID p_list, float p_time, RID p_fb, PipelineCacheRD *p_pipeline, RID p_uniform_set, RID p_texture_set, uint32_t p_view_count, const CameraMatrix *p_projections, const Basis &p_orientation, float p_multiplier, const Vector3 &p_position) {
+void RendererSceneSkyRD::_render_sky(RD::DrawListID p_list, float p_time, RID p_fb, PipelineCacheRD *p_pipeline, RID p_uniform_set, RID p_texture_set, uint32_t p_view_count, const CameraMatrix *p_projections, const Basis &p_orientation, float p_multiplier, const Vector3 &p_position, float p_luminance_multiplier) {
SkyPushConstant sky_push_constant;
memset(&sky_push_constant, 0, sizeof(SkyPushConstant));
@@ -276,6 +276,7 @@ void RendererSceneSkyRD::_render_sky(RD::DrawListID p_list, float p_time, RID p_
sky_push_constant.position[2] = p_position.z;
sky_push_constant.multiplier = p_multiplier;
sky_push_constant.time = p_time;
+ sky_push_constant.luminance_multiplier = p_luminance_multiplier;
store_transform_3x3(p_orientation, sky_push_constant.orientation);
RenderingDevice::FramebufferFormatID fb_format = RD::get_singleton()->framebuffer_get_format(p_fb);
@@ -287,7 +288,7 @@ void RendererSceneSkyRD::_render_sky(RD::DrawListID p_list, float p_time, RID p_
// Update uniform sets.
{
RD::get_singleton()->draw_list_bind_uniform_set(draw_list, sky_scene_state.uniform_set, 0);
- if (RD::get_singleton()->uniform_set_is_valid(p_uniform_set)) { // Material may not have a uniform set.
+ if (p_uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(p_uniform_set)) { // Material may not have a uniform set.
RD::get_singleton()->draw_list_bind_uniform_set(draw_list, p_uniform_set, 1);
}
RD::get_singleton()->draw_list_bind_uniform_set(draw_list, p_texture_set, 2);
@@ -855,6 +856,8 @@ void RendererSceneSkyRD::init(RendererStorageRD *p_storage) {
storage->shader_initialize(sky_shader.default_shader);
storage->shader_set_code(sky_shader.default_shader, R"(
+// Default sky shader.
+
shader_type sky;
void sky() {
@@ -942,6 +945,8 @@ void sky() {
storage->shader_initialize(sky_scene_state.fog_shader);
storage->shader_set_code(sky_scene_state.fog_shader, R"(
+// Default clear color sky shader.
+
shader_type sky;
uniform vec4 clear_color;
@@ -1191,7 +1196,7 @@ void RendererSceneSkyRD::setup(RendererSceneEnvironmentRD *p_env, RID p_render_b
RD::get_singleton()->buffer_update(sky_scene_state.uniform_buffer, 0, sizeof(SkySceneState::UBO), &sky_scene_state.ubo);
}
-void RendererSceneSkyRD::update(RendererSceneEnvironmentRD *p_env, const CameraMatrix &p_projection, const Transform3D &p_transform, double p_time) {
+void RendererSceneSkyRD::update(RendererSceneEnvironmentRD *p_env, const CameraMatrix &p_projection, const Transform3D &p_transform, double p_time, float p_luminance_multiplier) {
ERR_FAIL_COND(!p_env);
Sky *sky = get_sky(p_env->sky);
@@ -1283,7 +1288,7 @@ void RendererSceneSkyRD::update(RendererSceneEnvironmentRD *p_env, const CameraM
RID texture_uniform_set = sky->get_textures(storage, SKY_TEXTURE_SET_CUBEMAP_QUARTER_RES, sky_shader.default_shader_rd);
cubemap_draw_list = RD::get_singleton()->draw_list_begin(sky->reflection.layers[0].mipmaps[2].framebuffers[i], RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD);
- _render_sky(cubemap_draw_list, p_time, sky->reflection.layers[0].mipmaps[2].framebuffers[i], pipeline, material->uniform_set, texture_uniform_set, 1, &cm, local_view, multiplier, p_transform.origin);
+ _render_sky(cubemap_draw_list, p_time, sky->reflection.layers[0].mipmaps[2].framebuffers[i], pipeline, material->uniform_set, texture_uniform_set, 1, &cm, local_view, multiplier, p_transform.origin, p_luminance_multiplier);
RD::get_singleton()->draw_list_end();
}
RD::get_singleton()->draw_command_end_label();
@@ -1302,7 +1307,7 @@ void RendererSceneSkyRD::update(RendererSceneEnvironmentRD *p_env, const CameraM
RID texture_uniform_set = sky->get_textures(storage, SKY_TEXTURE_SET_CUBEMAP_HALF_RES, sky_shader.default_shader_rd);
cubemap_draw_list = RD::get_singleton()->draw_list_begin(sky->reflection.layers[0].mipmaps[1].framebuffers[i], RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD);
- _render_sky(cubemap_draw_list, p_time, sky->reflection.layers[0].mipmaps[1].framebuffers[i], pipeline, material->uniform_set, texture_uniform_set, 1, &cm, local_view, multiplier, p_transform.origin);
+ _render_sky(cubemap_draw_list, p_time, sky->reflection.layers[0].mipmaps[1].framebuffers[i], pipeline, material->uniform_set, texture_uniform_set, 1, &cm, local_view, multiplier, p_transform.origin, p_luminance_multiplier);
RD::get_singleton()->draw_list_end();
}
RD::get_singleton()->draw_command_end_label();
@@ -1317,7 +1322,7 @@ void RendererSceneSkyRD::update(RendererSceneEnvironmentRD *p_env, const CameraM
RID texture_uniform_set = sky->get_textures(storage, SKY_TEXTURE_SET_CUBEMAP, sky_shader.default_shader_rd);
cubemap_draw_list = RD::get_singleton()->draw_list_begin(sky->reflection.layers[0].mipmaps[0].framebuffers[i], RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_DISCARD);
- _render_sky(cubemap_draw_list, p_time, sky->reflection.layers[0].mipmaps[0].framebuffers[i], pipeline, material->uniform_set, texture_uniform_set, 1, &cm, local_view, multiplier, p_transform.origin);
+ _render_sky(cubemap_draw_list, p_time, sky->reflection.layers[0].mipmaps[0].framebuffers[i], pipeline, material->uniform_set, texture_uniform_set, 1, &cm, local_view, multiplier, p_transform.origin, p_luminance_multiplier);
RD::get_singleton()->draw_list_end();
}
RD::get_singleton()->draw_command_end_label();
@@ -1435,7 +1440,7 @@ void RendererSceneSkyRD::draw(RendererSceneEnvironmentRD *p_env, bool p_can_cont
clear_colors.push_back(Color(0.0, 0.0, 0.0));
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(sky->quarter_res_framebuffer, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_DISCARD, clear_colors);
- _render_sky(draw_list, p_time, sky->quarter_res_framebuffer, pipeline, material->uniform_set, texture_uniform_set, view_count, projections, sky_transform, multiplier, p_transform.origin);
+ _render_sky(draw_list, p_time, sky->quarter_res_framebuffer, pipeline, material->uniform_set, texture_uniform_set, view_count, projections, sky_transform, multiplier, p_transform.origin, 1.0);
RD::get_singleton()->draw_list_end();
}
@@ -1448,7 +1453,7 @@ void RendererSceneSkyRD::draw(RendererSceneEnvironmentRD *p_env, bool p_can_cont
clear_colors.push_back(Color(0.0, 0.0, 0.0));
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(sky->half_res_framebuffer, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_DISCARD, clear_colors);
- _render_sky(draw_list, p_time, sky->half_res_framebuffer, pipeline, material->uniform_set, texture_uniform_set, view_count, projections, sky_transform, multiplier, p_transform.origin);
+ _render_sky(draw_list, p_time, sky->half_res_framebuffer, pipeline, material->uniform_set, texture_uniform_set, view_count, projections, sky_transform, multiplier, p_transform.origin, 1.0);
RD::get_singleton()->draw_list_end();
}
@@ -1462,11 +1467,11 @@ void RendererSceneSkyRD::draw(RendererSceneEnvironmentRD *p_env, bool p_can_cont
}
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(p_fb, RD::INITIAL_ACTION_CONTINUE, p_can_continue_color ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CONTINUE, p_can_continue_depth ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ);
- _render_sky(draw_list, p_time, p_fb, pipeline, material->uniform_set, texture_uniform_set, view_count, projections, sky_transform, multiplier, p_transform.origin);
+ _render_sky(draw_list, p_time, p_fb, pipeline, material->uniform_set, texture_uniform_set, view_count, projections, sky_transform, multiplier, p_transform.origin, 1.0);
RD::get_singleton()->draw_list_end();
}
-void RendererSceneSkyRD::update_res_buffers(RendererSceneEnvironmentRD *p_env, uint32_t p_view_count, const CameraMatrix *p_projections, const Transform3D &p_transform, double p_time) {
+void RendererSceneSkyRD::update_res_buffers(RendererSceneEnvironmentRD *p_env, uint32_t p_view_count, const CameraMatrix *p_projections, const Transform3D &p_transform, double p_time, float p_luminance_multiplier) {
ERR_FAIL_COND(!p_env);
ERR_FAIL_COND(p_view_count == 0);
@@ -1542,7 +1547,7 @@ void RendererSceneSkyRD::update_res_buffers(RendererSceneEnvironmentRD *p_env, u
clear_colors.push_back(Color(0.0, 0.0, 0.0));
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(sky->quarter_res_framebuffer, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_DISCARD, clear_colors);
- _render_sky(draw_list, p_time, sky->quarter_res_framebuffer, pipeline, material->uniform_set, texture_uniform_set, view_count, projections, sky_transform, multiplier, p_transform.origin);
+ _render_sky(draw_list, p_time, sky->quarter_res_framebuffer, pipeline, material->uniform_set, texture_uniform_set, view_count, projections, sky_transform, multiplier, p_transform.origin, p_luminance_multiplier);
RD::get_singleton()->draw_list_end();
}
@@ -1555,12 +1560,12 @@ void RendererSceneSkyRD::update_res_buffers(RendererSceneEnvironmentRD *p_env, u
clear_colors.push_back(Color(0.0, 0.0, 0.0));
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(sky->half_res_framebuffer, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_DISCARD, clear_colors);
- _render_sky(draw_list, p_time, sky->half_res_framebuffer, pipeline, material->uniform_set, texture_uniform_set, view_count, projections, sky_transform, multiplier, p_transform.origin);
+ _render_sky(draw_list, p_time, sky->half_res_framebuffer, pipeline, material->uniform_set, texture_uniform_set, view_count, projections, sky_transform, multiplier, p_transform.origin, p_luminance_multiplier);
RD::get_singleton()->draw_list_end();
}
}
-void RendererSceneSkyRD::draw(RD::DrawListID p_draw_list, RendererSceneEnvironmentRD *p_env, RID p_fb, uint32_t p_view_count, const CameraMatrix *p_projections, const Transform3D &p_transform, double p_time) {
+void RendererSceneSkyRD::draw(RD::DrawListID p_draw_list, RendererSceneEnvironmentRD *p_env, RID p_fb, uint32_t p_view_count, const CameraMatrix *p_projections, const Transform3D &p_transform, double p_time, float p_luminance_multiplier) {
ERR_FAIL_COND(!p_env);
ERR_FAIL_COND(p_view_count == 0);
@@ -1636,7 +1641,7 @@ void RendererSceneSkyRD::draw(RD::DrawListID p_draw_list, RendererSceneEnvironme
texture_uniform_set = sky_scene_state.fog_only_texture_uniform_set;
}
- _render_sky(p_draw_list, p_time, p_fb, pipeline, material->uniform_set, texture_uniform_set, view_count, projections, sky_transform, multiplier, p_transform.origin);
+ _render_sky(p_draw_list, p_time, p_fb, pipeline, material->uniform_set, texture_uniform_set, view_count, projections, sky_transform, multiplier, p_transform.origin, p_luminance_multiplier);
}
void RendererSceneSkyRD::invalidate_sky(Sky *p_sky) {
@@ -1767,7 +1772,7 @@ void RendererSceneSkyRD::initialize_sky_rid(RID p_rid) {
}
RendererSceneSkyRD::Sky *RendererSceneSkyRD::get_sky(RID p_sky) const {
- return sky_owner.getornull(p_sky);
+ return sky_owner.get_or_null(p_sky);
}
void RendererSceneSkyRD::free_sky(RID p_sky) {
diff --git a/servers/rendering/renderer_rd/renderer_scene_sky_rd.h b/servers/rendering/renderer_rd/renderer_scene_sky_rd.h
index 7b670bddd5..7f563c9bc4 100644
--- a/servers/rendering/renderer_rd/renderer_scene_sky_rd.h
+++ b/servers/rendering/renderer_rd/renderer_scene_sky_rd.h
@@ -100,7 +100,8 @@ private:
float position[3]; // 12 - 92
float multiplier; // 4 - 96
float time; // 4 - 100
- float pad[3]; // 12 - 112 // Using pad to align on 16 bytes
+ float luminance_multiplier; // 4 - 104
+ float pad[2]; // 8 - 112 // Using pad to align on 16 bytes
// 128 is the max size of a push constant. We can replace "pad" but we can't add any more.
};
@@ -138,7 +139,7 @@ private:
virtual ~SkyShaderData();
};
- void _render_sky(RD::DrawListID p_list, float p_time, RID p_fb, PipelineCacheRD *p_pipeline, RID p_uniform_set, RID p_texture_set, uint32_t p_view_count, const CameraMatrix *p_projections, const Basis &p_orientation, float p_multiplier, const Vector3 &p_position);
+ void _render_sky(RD::DrawListID p_list, float p_time, RID p_fb, PipelineCacheRD *p_pipeline, RID p_uniform_set, RID p_texture_set, uint32_t p_view_count, const CameraMatrix *p_projections, const Basis &p_orientation, float p_multiplier, const Vector3 &p_position, float p_luminance_multiplier);
public:
struct SkySceneState {
@@ -293,10 +294,10 @@ public:
~RendererSceneSkyRD();
void setup(RendererSceneEnvironmentRD *p_env, RID p_render_buffers, const CameraMatrix &p_projection, const Transform3D &p_transform, const Size2i p_screen_size, RendererSceneRenderRD *p_scene_render);
- void update(RendererSceneEnvironmentRD *p_env, const CameraMatrix &p_projection, const Transform3D &p_transform, double p_time);
- void draw(RendererSceneEnvironmentRD *p_env, bool p_can_continue_color, bool p_can_continue_depth, RID p_fb, uint32_t p_view_count, const CameraMatrix *p_projections, const Transform3D &p_transform, double p_time);
- void update_res_buffers(RendererSceneEnvironmentRD *p_env, uint32_t p_view_count, const CameraMatrix *p_projections, const Transform3D &p_transform, double p_time);
- void draw(RD::DrawListID p_draw_list, RendererSceneEnvironmentRD *p_env, RID p_fb, uint32_t p_view_count, const CameraMatrix *p_projections, const Transform3D &p_transform, double p_time);
+ void update(RendererSceneEnvironmentRD *p_env, const CameraMatrix &p_projection, const Transform3D &p_transform, double p_time, float p_luminance_multiplier = 1.0);
+ void draw(RendererSceneEnvironmentRD *p_env, bool p_can_continue_color, bool p_can_continue_depth, RID p_fb, uint32_t p_view_count, const CameraMatrix *p_projections, const Transform3D &p_transform, double p_time); // only called by clustered renderer
+ void update_res_buffers(RendererSceneEnvironmentRD *p_env, uint32_t p_view_count, const CameraMatrix *p_projections, const Transform3D &p_transform, double p_time, float p_luminance_multiplier = 1.0);
+ void draw(RD::DrawListID p_draw_list, RendererSceneEnvironmentRD *p_env, RID p_fb, uint32_t p_view_count, const CameraMatrix *p_projections, const Transform3D &p_transform, double p_time, float p_luminance_multiplier = 1.0);
void invalidate_sky(Sky *p_sky);
void update_dirty_skys();
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
index 8cc20618fc..a0751d3689 100644
--- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
@@ -842,7 +842,7 @@ void RendererStorageRD::texture_3d_initialize(RID p_texture, Image::Format p_for
}
void RendererStorageRD::texture_proxy_initialize(RID p_texture, RID p_base) {
- Texture *tex = texture_owner.getornull(p_base);
+ Texture *tex = texture_owner.get_or_null(p_base);
ERR_FAIL_COND(!tex);
Texture proxy_tex = *tex;
@@ -865,7 +865,7 @@ void RendererStorageRD::texture_proxy_initialize(RID p_texture, RID p_base) {
void RendererStorageRD::_texture_2d_update(RID p_texture, const Ref<Image> &p_image, int p_layer, bool p_immediate) {
ERR_FAIL_COND(p_image.is_null() || p_image->is_empty());
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND(!tex);
ERR_FAIL_COND(tex->is_render_target);
ERR_FAIL_COND(p_image->get_width() != tex->width || p_image->get_height() != tex->height);
@@ -889,7 +889,7 @@ void RendererStorageRD::texture_2d_update(RID p_texture, const Ref<Image> &p_ima
}
void RendererStorageRD::texture_3d_update(RID p_texture, const Vector<Ref<Image>> &p_data) {
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND(!tex);
ERR_FAIL_COND(tex->type != Texture::TYPE_3D);
Image::Image3DValidateError verr = Image::validate_3d_image(tex->format, tex->width, tex->height, tex->depth, tex->mipmaps > 1, p_data);
@@ -926,10 +926,10 @@ void RendererStorageRD::texture_3d_update(RID p_texture, const Vector<Ref<Image>
}
void RendererStorageRD::texture_proxy_update(RID p_texture, RID p_proxy_to) {
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND(!tex);
ERR_FAIL_COND(!tex->is_proxy);
- Texture *proxy_to = texture_owner.getornull(p_proxy_to);
+ Texture *proxy_to = texture_owner.get_or_null(p_proxy_to);
ERR_FAIL_COND(!proxy_to);
ERR_FAIL_COND(proxy_to->is_proxy);
@@ -943,7 +943,7 @@ void RendererStorageRD::texture_proxy_update(RID p_texture, RID p_proxy_to) {
RD::get_singleton()->free(tex->rd_texture_srgb);
tex->rd_texture_srgb = RID();
}
- Texture *prev_tex = texture_owner.getornull(tex->proxy_to);
+ Texture *prev_tex = texture_owner.get_or_null(tex->proxy_to);
ERR_FAIL_COND(!prev_tex);
prev_tex->proxies.erase(p_texture);
}
@@ -1030,7 +1030,7 @@ void RendererStorageRD::texture_3d_placeholder_initialize(RID p_texture) {
}
Ref<Image> RendererStorageRD::texture_2d_get(RID p_texture) const {
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND_V(!tex, Ref<Image>());
#ifdef TOOLS_ENABLED
@@ -1058,7 +1058,7 @@ Ref<Image> RendererStorageRD::texture_2d_get(RID p_texture) const {
}
Ref<Image> RendererStorageRD::texture_2d_layer_get(RID p_texture, int p_layer) const {
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND_V(!tex, Ref<Image>());
Vector<uint8_t> data = RD::get_singleton()->texture_get_data(tex->rd_texture, p_layer);
@@ -1075,7 +1075,7 @@ Ref<Image> RendererStorageRD::texture_2d_layer_get(RID p_texture, int p_layer) c
}
Vector<Ref<Image>> RendererStorageRD::texture_3d_get(RID p_texture) const {
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND_V(!tex, Vector<Ref<Image>>());
ERR_FAIL_COND_V(tex->type != Texture::TYPE_3D, Vector<Ref<Image>>());
@@ -1106,10 +1106,10 @@ Vector<Ref<Image>> RendererStorageRD::texture_3d_get(RID p_texture) const {
}
void RendererStorageRD::texture_replace(RID p_texture, RID p_by_texture) {
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND(!tex);
ERR_FAIL_COND(tex->proxy_to.is_valid()); //can't replace proxy
- Texture *by_tex = texture_owner.getornull(p_by_texture);
+ Texture *by_tex = texture_owner.get_or_null(p_by_texture);
ERR_FAIL_COND(!by_tex);
ERR_FAIL_COND(by_tex->proxy_to.is_valid()); //can't replace proxy
@@ -1155,7 +1155,7 @@ void RendererStorageRD::texture_replace(RID p_texture, RID p_by_texture) {
}
void RendererStorageRD::texture_set_size_override(RID p_texture, int p_width, int p_height) {
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND(!tex);
ERR_FAIL_COND(tex->type != Texture::TYPE_2D);
tex->width_2d = p_width;
@@ -1163,7 +1163,7 @@ void RendererStorageRD::texture_set_size_override(RID p_texture, int p_width, in
}
void RendererStorageRD::texture_set_path(RID p_texture, const String &p_path) {
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND(!tex);
tex->path = p_path;
}
@@ -1173,21 +1173,21 @@ String RendererStorageRD::texture_get_path(RID p_texture) const {
}
void RendererStorageRD::texture_set_detect_3d_callback(RID p_texture, RS::TextureDetectCallback p_callback, void *p_userdata) {
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND(!tex);
tex->detect_3d_callback_ud = p_userdata;
tex->detect_3d_callback = p_callback;
}
void RendererStorageRD::texture_set_detect_normal_callback(RID p_texture, RS::TextureDetectCallback p_callback, void *p_userdata) {
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND(!tex);
tex->detect_normal_callback_ud = p_userdata;
tex->detect_normal_callback = p_callback;
}
void RendererStorageRD::texture_set_detect_roughness_callback(RID p_texture, RS::TextureDetectRoughnessCallback p_callback, void *p_userdata) {
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
ERR_FAIL_COND(!tex);
tex->detect_roughness_callback_ud = p_userdata;
tex->detect_roughness_callback = p_callback;
@@ -1235,7 +1235,7 @@ void RendererStorageRD::canvas_texture_initialize(RID p_rid) {
}
void RendererStorageRD::canvas_texture_set_channel(RID p_canvas_texture, RS::CanvasTextureChannel p_channel, RID p_texture) {
- CanvasTexture *ct = canvas_texture_owner.getornull(p_canvas_texture);
+ CanvasTexture *ct = canvas_texture_owner.get_or_null(p_canvas_texture);
switch (p_channel) {
case RS::CANVAS_TEXTURE_CHANNEL_DIFFUSE: {
ct->diffuse = p_texture;
@@ -1252,7 +1252,7 @@ void RendererStorageRD::canvas_texture_set_channel(RID p_canvas_texture, RS::Can
}
void RendererStorageRD::canvas_texture_set_shading_parameters(RID p_canvas_texture, const Color &p_specular_color, float p_shininess) {
- CanvasTexture *ct = canvas_texture_owner.getornull(p_canvas_texture);
+ CanvasTexture *ct = canvas_texture_owner.get_or_null(p_canvas_texture);
ct->specular_color.r = p_specular_color.r;
ct->specular_color.g = p_specular_color.g;
ct->specular_color.b = p_specular_color.b;
@@ -1261,13 +1261,13 @@ void RendererStorageRD::canvas_texture_set_shading_parameters(RID p_canvas_textu
}
void RendererStorageRD::canvas_texture_set_texture_filter(RID p_canvas_texture, RS::CanvasItemTextureFilter p_filter) {
- CanvasTexture *ct = canvas_texture_owner.getornull(p_canvas_texture);
+ CanvasTexture *ct = canvas_texture_owner.get_or_null(p_canvas_texture);
ct->texture_filter = p_filter;
ct->clear_sets();
}
void RendererStorageRD::canvas_texture_set_texture_repeat(RID p_canvas_texture, RS::CanvasItemTextureRepeat p_repeat) {
- CanvasTexture *ct = canvas_texture_owner.getornull(p_canvas_texture);
+ CanvasTexture *ct = canvas_texture_owner.get_or_null(p_canvas_texture);
ct->texture_repeat = p_repeat;
ct->clear_sets();
}
@@ -1275,7 +1275,7 @@ void RendererStorageRD::canvas_texture_set_texture_repeat(RID p_canvas_texture,
bool RendererStorageRD::canvas_texture_get_uniform_set(RID p_texture, RS::CanvasItemTextureFilter p_base_filter, RS::CanvasItemTextureRepeat p_base_repeat, RID p_base_shader, int p_base_set, RID &r_uniform_set, Size2i &r_size, Color &r_specular_shininess, bool &r_use_normal, bool &r_use_specular) {
CanvasTexture *ct = nullptr;
- Texture *t = texture_owner.getornull(p_texture);
+ Texture *t = texture_owner.get_or_null(p_texture);
if (t) {
//regular texture
@@ -1286,7 +1286,7 @@ bool RendererStorageRD::canvas_texture_get_uniform_set(RID p_texture, RS::Canvas
ct = t->canvas_texture;
} else {
- ct = canvas_texture_owner.getornull(p_texture);
+ ct = canvas_texture_owner.get_or_null(p_texture);
}
if (!ct) {
@@ -1308,7 +1308,7 @@ bool RendererStorageRD::canvas_texture_get_uniform_set(RID p_texture, RS::Canvas
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 0;
- t = texture_owner.getornull(ct->diffuse);
+ t = texture_owner.get_or_null(ct->diffuse);
if (!t) {
u.ids.push_back(texture_rd_get_default(DEFAULT_RD_TEXTURE_WHITE));
ct->size_cache = Size2i(1, 1);
@@ -1323,7 +1323,7 @@ bool RendererStorageRD::canvas_texture_get_uniform_set(RID p_texture, RS::Canvas
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 1;
- t = texture_owner.getornull(ct->normal_map);
+ t = texture_owner.get_or_null(ct->normal_map);
if (!t) {
u.ids.push_back(texture_rd_get_default(DEFAULT_RD_TEXTURE_NORMAL));
ct->use_normal_cache = false;
@@ -1338,7 +1338,7 @@ bool RendererStorageRD::canvas_texture_get_uniform_set(RID p_texture, RS::Canvas
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 2;
- t = texture_owner.getornull(ct->specular);
+ t = texture_owner.get_or_null(ct->specular);
if (!t) {
u.ids.push_back(texture_rd_get_default(DEFAULT_RD_TEXTURE_WHITE));
ct->use_specular_cache = false;
@@ -1384,7 +1384,7 @@ void RendererStorageRD::shader_initialize(RID p_rid) {
}
void RendererStorageRD::shader_set_code(RID p_shader, const String &p_code) {
- Shader *shader = shader_owner.getornull(p_shader);
+ Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND(!shader);
shader->code = p_code;
@@ -1456,13 +1456,13 @@ void RendererStorageRD::shader_set_code(RID p_shader, const String &p_code) {
}
String RendererStorageRD::shader_get_code(RID p_shader) const {
- Shader *shader = shader_owner.getornull(p_shader);
+ Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND_V(!shader, String());
return shader->code;
}
void RendererStorageRD::shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const {
- Shader *shader = shader_owner.getornull(p_shader);
+ Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND(!shader);
if (shader->data) {
return shader->data->get_param_list(p_param_list);
@@ -1470,7 +1470,7 @@ void RendererStorageRD::shader_get_param_list(RID p_shader, List<PropertyInfo> *
}
void RendererStorageRD::shader_set_default_texture_param(RID p_shader, const StringName &p_name, RID p_texture) {
- Shader *shader = shader_owner.getornull(p_shader);
+ Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND(!shader);
if (p_texture.is_valid() && texture_owner.owns(p_texture)) {
@@ -1488,7 +1488,7 @@ void RendererStorageRD::shader_set_default_texture_param(RID p_shader, const Str
}
RID RendererStorageRD::shader_get_default_texture_param(RID p_shader, const StringName &p_name) const {
- Shader *shader = shader_owner.getornull(p_shader);
+ Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND_V(!shader, RID());
if (shader->default_texture_parameter.has(p_name)) {
return shader->default_texture_parameter[p_name];
@@ -1498,7 +1498,7 @@ RID RendererStorageRD::shader_get_default_texture_param(RID p_shader, const Stri
}
Variant RendererStorageRD::shader_get_param_default(RID p_shader, const StringName &p_param) const {
- Shader *shader = shader_owner.getornull(p_shader);
+ Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND_V(!shader, Variant());
if (shader->data) {
return shader->data->get_default_parameter(p_param);
@@ -1512,7 +1512,7 @@ void RendererStorageRD::shader_set_data_request_function(ShaderType p_shader_typ
}
RS::ShaderNativeSourceCode RendererStorageRD::shader_get_native_source_code(RID p_shader) const {
- Shader *shader = shader_owner.getornull(p_shader);
+ Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND_V(!shader, RS::ShaderNativeSourceCode());
if (shader->data) {
return shader->data->get_native_source_code();
@@ -1527,7 +1527,7 @@ RID RendererStorageRD::material_allocate() {
}
void RendererStorageRD::material_initialize(RID p_rid) {
material_owner.initialize_rid(p_rid);
- Material *material = material_owner.getornull(p_rid);
+ Material *material = material_owner.get_or_null(p_rid);
material->self = p_rid;
}
@@ -1543,7 +1543,7 @@ void RendererStorageRD::_material_queue_update(Material *material, bool p_unifor
}
void RendererStorageRD::material_set_shader(RID p_material, RID p_shader) {
- Material *material = material_owner.getornull(p_material);
+ Material *material = material_owner.get_or_null(p_material);
ERR_FAIL_COND(!material);
if (material->data) {
@@ -1563,7 +1563,7 @@ void RendererStorageRD::material_set_shader(RID p_material, RID p_shader) {
return;
}
- Shader *shader = shader_owner.getornull(p_shader);
+ Shader *shader = shader_owner.get_or_null(p_shader);
ERR_FAIL_COND(!shader);
material->shader = shader;
material->shader_type = shader->type;
@@ -1586,7 +1586,7 @@ void RendererStorageRD::material_set_shader(RID p_material, RID p_shader) {
}
void RendererStorageRD::material_set_param(RID p_material, const StringName &p_param, const Variant &p_value) {
- Material *material = material_owner.getornull(p_material);
+ Material *material = material_owner.get_or_null(p_material);
ERR_FAIL_COND(!material);
if (p_value.get_type() == Variant::NIL) {
@@ -1605,7 +1605,7 @@ void RendererStorageRD::material_set_param(RID p_material, const StringName &p_p
}
Variant RendererStorageRD::material_get_param(RID p_material, const StringName &p_param) const {
- Material *material = material_owner.getornull(p_material);
+ Material *material = material_owner.get_or_null(p_material);
ERR_FAIL_COND_V(!material, Variant());
if (material->params.has(p_param)) {
return material->params[p_param];
@@ -1615,7 +1615,7 @@ Variant RendererStorageRD::material_get_param(RID p_material, const StringName &
}
void RendererStorageRD::material_set_next_pass(RID p_material, RID p_next_material) {
- Material *material = material_owner.getornull(p_material);
+ Material *material = material_owner.get_or_null(p_material);
ERR_FAIL_COND(!material);
if (material->next_pass == p_next_material) {
@@ -1631,7 +1631,7 @@ void RendererStorageRD::material_set_next_pass(RID p_material, RID p_next_materi
}
void RendererStorageRD::material_set_render_priority(RID p_material, int priority) {
- Material *material = material_owner.getornull(p_material);
+ Material *material = material_owner.get_or_null(p_material);
ERR_FAIL_COND(!material);
material->priority = priority;
if (material->data) {
@@ -1640,7 +1640,7 @@ void RendererStorageRD::material_set_render_priority(RID p_material, int priorit
}
bool RendererStorageRD::material_is_animated(RID p_material) {
- Material *material = material_owner.getornull(p_material);
+ Material *material = material_owner.get_or_null(p_material);
ERR_FAIL_COND_V(!material, false);
if (material->shader && material->shader->data) {
if (material->shader->data->is_animated()) {
@@ -1653,7 +1653,7 @@ bool RendererStorageRD::material_is_animated(RID p_material) {
}
bool RendererStorageRD::material_casts_shadows(RID p_material) {
- Material *material = material_owner.getornull(p_material);
+ Material *material = material_owner.get_or_null(p_material);
ERR_FAIL_COND_V(!material, true);
if (material->shader && material->shader->data) {
if (material->shader->data->casts_shadows()) {
@@ -1666,7 +1666,7 @@ bool RendererStorageRD::material_casts_shadows(RID p_material) {
}
void RendererStorageRD::material_get_instance_shader_parameters(RID p_material, List<InstanceShaderParam> *r_parameters) {
- Material *material = material_owner.getornull(p_material);
+ Material *material = material_owner.get_or_null(p_material);
ERR_FAIL_COND(!material);
if (material->shader && material->shader->data) {
material->shader->data->get_instance_param_list(r_parameters);
@@ -1678,7 +1678,7 @@ void RendererStorageRD::material_get_instance_shader_parameters(RID p_material,
}
void RendererStorageRD::material_update_dependency(RID p_material, DependencyTracker *p_instance) {
- Material *material = material_owner.getornull(p_material);
+ Material *material = material_owner.get_or_null(p_material);
ERR_FAIL_COND(!material);
p_instance->update_dependency(&material->dependency);
if (material->next_pass.is_valid()) {
@@ -2309,7 +2309,7 @@ void RendererStorageRD::MaterialData::update_textures(const Map<StringName, Vari
} else {
bool srgb = p_use_linear_color && (p_texture_uniforms[i].hint == ShaderLanguage::ShaderNode::Uniform::HINT_ALBEDO || p_texture_uniforms[i].hint == ShaderLanguage::ShaderNode::Uniform::HINT_BLACK_ALBEDO);
- Texture *tex = singleton->texture_owner.getornull(texture);
+ Texture *tex = singleton->texture_owner.get_or_null(texture);
if (tex) {
rd_texture = (srgb && tex->rd_texture_srgb.is_valid()) ? tex->rd_texture_srgb : tex->rd_texture;
@@ -2470,14 +2470,14 @@ bool RendererStorageRD::MaterialData::update_parameters_uniform_set(const Map<St
void RendererStorageRD::_material_uniform_set_erased(const RID &p_set, void *p_material) {
RID rid = *(RID *)p_material;
- Material *material = base_singleton->material_owner.getornull(rid);
+ Material *material = base_singleton->material_owner.get_or_null(rid);
if (material) {
material->dependency.changed_notify(DEPENDENCY_CHANGED_MATERIAL);
}
}
void RendererStorageRD::material_force_update_textures(RID p_material, ShaderType p_shader_type) {
- Material *material = material_owner.getornull(p_material);
+ Material *material = material_owner.get_or_null(p_material);
if (material->shader_type != p_shader_type) {
return;
}
@@ -2518,7 +2518,7 @@ void RendererStorageRD::mesh_initialize(RID p_rid) {
void RendererStorageRD::mesh_set_blend_shape_count(RID p_mesh, int p_blend_shape_count) {
ERR_FAIL_COND(p_blend_shape_count < 0);
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND(!mesh);
ERR_FAIL_COND(mesh->surface_count > 0); //surfaces already exist
@@ -2528,7 +2528,7 @@ void RendererStorageRD::mesh_set_blend_shape_count(RID p_mesh, int p_blend_shape
/// Returns stride
void RendererStorageRD::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND(!mesh);
ERR_FAIL_COND(mesh->surface_count == RS::MAX_MESH_SURFACES);
@@ -2732,13 +2732,13 @@ void RendererStorageRD::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_su
}
int RendererStorageRD::mesh_get_blend_shape_count(RID p_mesh) const {
- const Mesh *mesh = mesh_owner.getornull(p_mesh);
+ const Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND_V(!mesh, -1);
return mesh->blend_shape_count;
}
void RendererStorageRD::mesh_set_blend_shape_mode(RID p_mesh, RS::BlendShapeMode p_mode) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND(!mesh);
ERR_FAIL_INDEX((int)p_mode, 2);
@@ -2746,13 +2746,13 @@ void RendererStorageRD::mesh_set_blend_shape_mode(RID p_mesh, RS::BlendShapeMode
}
RS::BlendShapeMode RendererStorageRD::mesh_get_blend_shape_mode(RID p_mesh) const {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND_V(!mesh, RS::BLEND_SHAPE_MODE_NORMALIZED);
return mesh->blend_shape_mode;
}
void RendererStorageRD::mesh_surface_update_vertex_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND(!mesh);
ERR_FAIL_UNSIGNED_INDEX((uint32_t)p_surface, mesh->surface_count);
ERR_FAIL_COND(p_data.size() == 0);
@@ -2763,7 +2763,7 @@ void RendererStorageRD::mesh_surface_update_vertex_region(RID p_mesh, int p_surf
}
void RendererStorageRD::mesh_surface_update_attribute_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND(!mesh);
ERR_FAIL_UNSIGNED_INDEX((uint32_t)p_surface, mesh->surface_count);
ERR_FAIL_COND(p_data.size() == 0);
@@ -2775,7 +2775,7 @@ void RendererStorageRD::mesh_surface_update_attribute_region(RID p_mesh, int p_s
}
void RendererStorageRD::mesh_surface_update_skin_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND(!mesh);
ERR_FAIL_UNSIGNED_INDEX((uint32_t)p_surface, mesh->surface_count);
ERR_FAIL_COND(p_data.size() == 0);
@@ -2787,7 +2787,7 @@ void RendererStorageRD::mesh_surface_update_skin_region(RID p_mesh, int p_surfac
}
void RendererStorageRD::mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND(!mesh);
ERR_FAIL_UNSIGNED_INDEX((uint32_t)p_surface, mesh->surface_count);
mesh->surfaces[p_surface]->material = p_material;
@@ -2797,7 +2797,7 @@ void RendererStorageRD::mesh_surface_set_material(RID p_mesh, int p_surface, RID
}
RID RendererStorageRD::mesh_surface_get_material(RID p_mesh, int p_surface) const {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND_V(!mesh, RID());
ERR_FAIL_UNSIGNED_INDEX_V((uint32_t)p_surface, mesh->surface_count, RID());
@@ -2805,7 +2805,7 @@ RID RendererStorageRD::mesh_surface_get_material(RID p_mesh, int p_surface) cons
}
RS::SurfaceData RendererStorageRD::mesh_get_surface(RID p_mesh, int p_surface) const {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND_V(!mesh, RS::SurfaceData());
ERR_FAIL_UNSIGNED_INDEX_V((uint32_t)p_surface, mesh->surface_count, RS::SurfaceData());
@@ -2845,32 +2845,32 @@ RS::SurfaceData RendererStorageRD::mesh_get_surface(RID p_mesh, int p_surface) c
}
int RendererStorageRD::mesh_get_surface_count(RID p_mesh) const {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND_V(!mesh, 0);
return mesh->surface_count;
}
void RendererStorageRD::mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND(!mesh);
mesh->custom_aabb = p_aabb;
}
AABB RendererStorageRD::mesh_get_custom_aabb(RID p_mesh) const {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND_V(!mesh, AABB());
return mesh->custom_aabb;
}
AABB RendererStorageRD::mesh_get_aabb(RID p_mesh, RID p_skeleton) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND_V(!mesh, AABB());
if (mesh->custom_aabb != AABB()) {
return mesh->custom_aabb;
}
- Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
+ Skeleton *skeleton = skeleton_owner.get_or_null(p_skeleton);
if (!skeleton || skeleton->size == 0) {
return mesh->aabb;
@@ -2968,16 +2968,16 @@ AABB RendererStorageRD::mesh_get_aabb(RID p_mesh, RID p_skeleton) {
}
void RendererStorageRD::mesh_set_shadow_mesh(RID p_mesh, RID p_shadow_mesh) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND(!mesh);
- Mesh *shadow_mesh = mesh_owner.getornull(mesh->shadow_mesh);
+ Mesh *shadow_mesh = mesh_owner.get_or_null(mesh->shadow_mesh);
if (shadow_mesh) {
shadow_mesh->shadow_owners.erase(mesh);
}
mesh->shadow_mesh = p_shadow_mesh;
- shadow_mesh = mesh_owner.getornull(mesh->shadow_mesh);
+ shadow_mesh = mesh_owner.get_or_null(mesh->shadow_mesh);
if (shadow_mesh) {
shadow_mesh->shadow_owners.insert(mesh);
@@ -2987,7 +2987,7 @@ void RendererStorageRD::mesh_set_shadow_mesh(RID p_mesh, RID p_shadow_mesh) {
}
void RendererStorageRD::mesh_clear(RID p_mesh) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND(!mesh);
for (uint32_t i = 0; i < mesh->surface_count; i++) {
Mesh::Surface &s = *mesh->surfaces[i];
@@ -3041,7 +3041,7 @@ void RendererStorageRD::mesh_clear(RID p_mesh) {
}
bool RendererStorageRD::mesh_needs_instance(RID p_mesh, bool p_has_skeleton) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND_V(!mesh, false);
return mesh->blend_shape_count > 0 || (mesh->has_bone_weights && p_has_skeleton);
@@ -3050,11 +3050,11 @@ bool RendererStorageRD::mesh_needs_instance(RID p_mesh, bool p_has_skeleton) {
/* MESH INSTANCE */
RID RendererStorageRD::mesh_instance_create(RID p_base) {
- Mesh *mesh = mesh_owner.getornull(p_base);
+ Mesh *mesh = mesh_owner.get_or_null(p_base);
ERR_FAIL_COND_V(!mesh, RID());
RID rid = mesh_instance_owner.make_rid();
- MeshInstance *mi = mesh_instance_owner.getornull(rid);
+ MeshInstance *mi = mesh_instance_owner.get_or_null(rid);
mi->mesh = mesh;
@@ -3069,7 +3069,7 @@ RID RendererStorageRD::mesh_instance_create(RID p_base) {
return rid;
}
void RendererStorageRD::mesh_instance_set_skeleton(RID p_mesh_instance, RID p_skeleton) {
- MeshInstance *mi = mesh_instance_owner.getornull(p_mesh_instance);
+ MeshInstance *mi = mesh_instance_owner.get_or_null(p_mesh_instance);
if (mi->skeleton == p_skeleton) {
return;
}
@@ -3079,7 +3079,7 @@ void RendererStorageRD::mesh_instance_set_skeleton(RID p_mesh_instance, RID p_sk
}
void RendererStorageRD::mesh_instance_set_blend_shape_weight(RID p_mesh_instance, int p_shape, float p_weight) {
- MeshInstance *mi = mesh_instance_owner.getornull(p_mesh_instance);
+ MeshInstance *mi = mesh_instance_owner.get_or_null(p_mesh_instance);
ERR_FAIL_COND(!mi);
ERR_FAIL_INDEX(p_shape, (int)mi->blend_weights.size());
mi->blend_weights[p_shape] = p_weight;
@@ -3151,7 +3151,7 @@ void RendererStorageRD::_mesh_instance_add_surface(MeshInstance *mi, Mesh *mesh,
}
void RendererStorageRD::mesh_instance_check_for_update(RID p_mesh_instance) {
- MeshInstance *mi = mesh_instance_owner.getornull(p_mesh_instance);
+ MeshInstance *mi = mesh_instance_owner.get_or_null(p_mesh_instance);
bool needs_update = mi->dirty;
@@ -3165,7 +3165,7 @@ void RendererStorageRD::mesh_instance_check_for_update(RID p_mesh_instance) {
}
if (!needs_update && mi->skeleton.is_valid()) {
- Skeleton *sk = skeleton_owner.getornull(mi->skeleton);
+ Skeleton *sk = skeleton_owner.get_or_null(mi->skeleton);
if (sk && sk->version != mi->skeleton_version) {
needs_update = true;
}
@@ -3196,7 +3196,7 @@ void RendererStorageRD::update_mesh_instances() {
while (dirty_mesh_instance_arrays.first()) {
MeshInstance *mi = dirty_mesh_instance_arrays.first()->self();
- Skeleton *sk = skeleton_owner.getornull(mi->skeleton);
+ Skeleton *sk = skeleton_owner.get_or_null(mi->skeleton);
for (uint32_t i = 0; i < mi->surfaces.size(); i++) {
if (mi->surfaces[i].uniform_set == RID() || mi->mesh->surfaces[i]->uniform_set == RID()) {
@@ -3443,7 +3443,7 @@ void RendererStorageRD::multimesh_initialize(RID p_rid) {
}
void RendererStorageRD::multimesh_allocate_data(RID p_multimesh, int p_instances, RS::MultimeshTransformFormat p_transform_format, bool p_use_colors, bool p_use_custom_data) {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND(!multimesh);
if (multimesh->instances == p_instances && multimesh->xform_format == p_transform_format && multimesh->uses_colors == p_use_colors && multimesh->uses_custom_data == p_use_custom_data) {
@@ -3486,13 +3486,13 @@ void RendererStorageRD::multimesh_allocate_data(RID p_multimesh, int p_instances
}
int RendererStorageRD::multimesh_get_instance_count(RID p_multimesh) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND_V(!multimesh, 0);
return multimesh->instances;
}
void RendererStorageRD::multimesh_set_mesh(RID p_multimesh, RID p_mesh) {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND(!multimesh);
if (multimesh->mesh == p_mesh) {
return;
@@ -3638,7 +3638,7 @@ void RendererStorageRD::_multimesh_re_create_aabb(MultiMesh *multimesh, const fl
}
void RendererStorageRD::multimesh_instance_set_transform(RID p_multimesh, int p_index, const Transform3D &p_transform) {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND(!multimesh);
ERR_FAIL_INDEX(p_index, multimesh->instances);
ERR_FAIL_COND(multimesh->xform_format != RS::MULTIMESH_TRANSFORM_3D);
@@ -3668,7 +3668,7 @@ void RendererStorageRD::multimesh_instance_set_transform(RID p_multimesh, int p_
}
void RendererStorageRD::multimesh_instance_set_transform_2d(RID p_multimesh, int p_index, const Transform2D &p_transform) {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND(!multimesh);
ERR_FAIL_INDEX(p_index, multimesh->instances);
ERR_FAIL_COND(multimesh->xform_format != RS::MULTIMESH_TRANSFORM_2D);
@@ -3694,7 +3694,7 @@ void RendererStorageRD::multimesh_instance_set_transform_2d(RID p_multimesh, int
}
void RendererStorageRD::multimesh_instance_set_color(RID p_multimesh, int p_index, const Color &p_color) {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND(!multimesh);
ERR_FAIL_INDEX(p_index, multimesh->instances);
ERR_FAIL_COND(!multimesh->uses_colors);
@@ -3716,7 +3716,7 @@ void RendererStorageRD::multimesh_instance_set_color(RID p_multimesh, int p_inde
}
void RendererStorageRD::multimesh_instance_set_custom_data(RID p_multimesh, int p_index, const Color &p_color) {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND(!multimesh);
ERR_FAIL_INDEX(p_index, multimesh->instances);
ERR_FAIL_COND(!multimesh->uses_custom_data);
@@ -3738,14 +3738,14 @@ void RendererStorageRD::multimesh_instance_set_custom_data(RID p_multimesh, int
}
RID RendererStorageRD::multimesh_get_mesh(RID p_multimesh) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND_V(!multimesh, RID());
return multimesh->mesh;
}
Transform3D RendererStorageRD::multimesh_instance_get_transform(RID p_multimesh, int p_index) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND_V(!multimesh, Transform3D());
ERR_FAIL_INDEX_V(p_index, multimesh->instances, Transform3D());
ERR_FAIL_COND_V(multimesh->xform_format != RS::MULTIMESH_TRANSFORM_3D, Transform3D());
@@ -3776,7 +3776,7 @@ Transform3D RendererStorageRD::multimesh_instance_get_transform(RID p_multimesh,
}
Transform2D RendererStorageRD::multimesh_instance_get_transform_2d(RID p_multimesh, int p_index) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND_V(!multimesh, Transform2D());
ERR_FAIL_INDEX_V(p_index, multimesh->instances, Transform2D());
ERR_FAIL_COND_V(multimesh->xform_format != RS::MULTIMESH_TRANSFORM_2D, Transform2D());
@@ -3801,7 +3801,7 @@ Transform2D RendererStorageRD::multimesh_instance_get_transform_2d(RID p_multime
}
Color RendererStorageRD::multimesh_instance_get_color(RID p_multimesh, int p_index) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND_V(!multimesh, Color());
ERR_FAIL_INDEX_V(p_index, multimesh->instances, Color());
ERR_FAIL_COND_V(!multimesh->uses_colors, Color());
@@ -3824,7 +3824,7 @@ Color RendererStorageRD::multimesh_instance_get_color(RID p_multimesh, int p_ind
}
Color RendererStorageRD::multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND_V(!multimesh, Color());
ERR_FAIL_INDEX_V(p_index, multimesh->instances, Color());
ERR_FAIL_COND_V(!multimesh->uses_custom_data, Color());
@@ -3847,7 +3847,7 @@ Color RendererStorageRD::multimesh_instance_get_custom_data(RID p_multimesh, int
}
void RendererStorageRD::multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer) {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND(!multimesh);
ERR_FAIL_COND(p_buffer.size() != (multimesh->instances * (int)multimesh->stride_cache));
@@ -3880,7 +3880,7 @@ void RendererStorageRD::multimesh_set_buffer(RID p_multimesh, const Vector<float
}
Vector<float> RendererStorageRD::multimesh_get_buffer(RID p_multimesh) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND_V(!multimesh, Vector<float>());
if (multimesh->buffer.is_null()) {
return Vector<float>();
@@ -3903,7 +3903,7 @@ Vector<float> RendererStorageRD::multimesh_get_buffer(RID p_multimesh) const {
}
void RendererStorageRD::multimesh_set_visible_instances(RID p_multimesh, int p_visible) {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND(!multimesh);
ERR_FAIL_COND(p_visible < -1 || p_visible > multimesh->instances);
if (multimesh->visible_instances == p_visible) {
@@ -3921,13 +3921,13 @@ void RendererStorageRD::multimesh_set_visible_instances(RID p_multimesh, int p_v
}
int RendererStorageRD::multimesh_get_visible_instances(RID p_multimesh) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND_V(!multimesh, 0);
return multimesh->visible_instances;
}
AABB RendererStorageRD::multimesh_get_aabb(RID p_multimesh) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_COND_V(!multimesh, AABB());
if (multimesh->aabb_dirty) {
const_cast<RendererStorageRD *>(this)->_update_dirty_multimeshes();
@@ -3998,7 +3998,7 @@ void RendererStorageRD::particles_initialize(RID p_rid) {
}
void RendererStorageRD::particles_set_mode(RID p_particles, RS::ParticlesMode p_mode) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
if (particles->mode == p_mode) {
return;
@@ -4010,7 +4010,7 @@ void RendererStorageRD::particles_set_mode(RID p_particles, RS::ParticlesMode p_
}
void RendererStorageRD::particles_set_emitting(RID p_particles, bool p_emitting) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->emitting = p_emitting;
@@ -4018,7 +4018,7 @@ void RendererStorageRD::particles_set_emitting(RID p_particles, bool p_emitting)
bool RendererStorageRD::particles_get_emitting(RID p_particles) {
ERR_FAIL_COND_V_MSG(RSG::threaded, false, "This function should never be used with threaded rendering, as it stalls the renderer.");
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND_V(!particles, false);
return particles->emitting;
@@ -4073,7 +4073,7 @@ void RendererStorageRD::_particles_free_data(Particles *particles) {
}
void RendererStorageRD::particles_set_amount(RID p_particles, int p_amount) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
if (particles->amount == p_amount) {
@@ -4093,55 +4093,56 @@ void RendererStorageRD::particles_set_amount(RID p_particles, int p_amount) {
}
void RendererStorageRD::particles_set_lifetime(RID p_particles, double p_lifetime) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->lifetime = p_lifetime;
}
void RendererStorageRD::particles_set_one_shot(RID p_particles, bool p_one_shot) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->one_shot = p_one_shot;
}
void RendererStorageRD::particles_set_pre_process_time(RID p_particles, double p_time) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->pre_process_time = p_time;
}
void RendererStorageRD::particles_set_explosiveness_ratio(RID p_particles, real_t p_ratio) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->explosiveness = p_ratio;
}
void RendererStorageRD::particles_set_randomness_ratio(RID p_particles, real_t p_ratio) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->randomness = p_ratio;
}
void RendererStorageRD::particles_set_custom_aabb(RID p_particles, const AABB &p_aabb) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->custom_aabb = p_aabb;
particles->dependency.changed_notify(DEPENDENCY_CHANGED_AABB);
}
void RendererStorageRD::particles_set_speed_scale(RID p_particles, double p_scale) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->speed_scale = p_scale;
}
void RendererStorageRD::particles_set_use_local_coordinates(RID p_particles, bool p_enable) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->use_local_coords = p_enable;
+ particles->dependency.changed_notify(DEPENDENCY_CHANGED_PARTICLES);
}
void RendererStorageRD::particles_set_fixed_fps(RID p_particles, int p_fps) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->fixed_fps = p_fps;
@@ -4157,21 +4158,21 @@ void RendererStorageRD::particles_set_fixed_fps(RID p_particles, int p_fps) {
}
void RendererStorageRD::particles_set_interpolate(RID p_particles, bool p_enable) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->interpolate = p_enable;
}
void RendererStorageRD::particles_set_fractional_delta(RID p_particles, bool p_enable) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->fractional_delta = p_enable;
}
void RendererStorageRD::particles_set_trails(RID p_particles, bool p_enable, double p_length) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
ERR_FAIL_COND(p_length < 0.1);
p_length = MIN(10.0, p_length);
@@ -4190,7 +4191,7 @@ void RendererStorageRD::particles_set_trails(RID p_particles, bool p_enable, dou
}
void RendererStorageRD::particles_set_trail_bind_poses(RID p_particles, const Vector<Transform3D> &p_bind_poses) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
if (particles->trail_bind_pose_buffer.is_valid() && particles->trail_bind_poses.size() != p_bind_poses.size()) {
_particles_free_data(particles);
@@ -4207,49 +4208,49 @@ void RendererStorageRD::particles_set_trail_bind_poses(RID p_particles, const Ve
}
void RendererStorageRD::particles_set_collision_base_size(RID p_particles, real_t p_size) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->collision_base_size = p_size;
}
void RendererStorageRD::particles_set_transform_align(RID p_particles, RS::ParticlesTransformAlign p_transform_align) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->transform_align = p_transform_align;
}
void RendererStorageRD::particles_set_process_material(RID p_particles, RID p_material) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->process_material = p_material;
}
void RendererStorageRD::particles_set_draw_order(RID p_particles, RS::ParticlesDrawOrder p_order) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->draw_order = p_order;
}
void RendererStorageRD::particles_set_draw_passes(RID p_particles, int p_passes) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->draw_passes.resize(p_passes);
}
void RendererStorageRD::particles_set_draw_pass_mesh(RID p_particles, int p_pass, RID p_mesh) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
ERR_FAIL_INDEX(p_pass, particles->draw_passes.size());
particles->draw_passes.write[p_pass] = p_mesh;
}
void RendererStorageRD::particles_restart(RID p_particles) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->restart_request = true;
@@ -4273,7 +4274,7 @@ void RendererStorageRD::_particles_allocate_emission_buffer(Particles *particles
}
void RendererStorageRD::particles_set_subemitter(RID p_particles, RID p_subemitter_particles) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
ERR_FAIL_COND(p_particles == p_subemitter_particles);
@@ -4286,7 +4287,7 @@ void RendererStorageRD::particles_set_subemitter(RID p_particles, RID p_subemitt
}
void RendererStorageRD::particles_emit(RID p_particles, const Transform3D &p_transform, const Vector3 &p_velocity, const Color &p_color, const Color &p_custom, uint32_t p_emit_flags) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
ERR_FAIL_COND(particles->amount == 0);
@@ -4329,7 +4330,7 @@ void RendererStorageRD::particles_emit(RID p_particles, const Transform3D &p_tra
}
void RendererStorageRD::particles_request_process(RID p_particles) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
if (!particles->dirty) {
@@ -4344,7 +4345,7 @@ AABB RendererStorageRD::particles_get_current_aabb(RID p_particles) {
WARN_PRINT_ONCE("Calling this function with threaded rendering enabled stalls the renderer, use with care.");
}
- const Particles *particles = particles_owner.getornull(p_particles);
+ const Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND_V(!particles, AABB());
int total_amount = particles->amount;
@@ -4352,10 +4353,8 @@ AABB RendererStorageRD::particles_get_current_aabb(RID p_particles) {
total_amount *= particles->trail_bind_poses.size();
}
- Vector<ParticleData> data;
- data.resize(total_amount);
-
Vector<uint8_t> buffer = RD::get_singleton()->buffer_get_data(particles->particle_buffer);
+ ERR_FAIL_COND_V(buffer.size() != (int)(total_amount * sizeof(ParticleData)), AABB());
Transform3D inv = particles->emission_transform.affine_inverse();
@@ -4363,7 +4362,7 @@ AABB RendererStorageRD::particles_get_current_aabb(RID p_particles) {
if (buffer.size()) {
bool first = true;
- const ParticleData *particle_data = (const ParticleData *)data.ptr();
+ const ParticleData *particle_data = reinterpret_cast<const ParticleData *>(buffer.ptr());
for (int i = 0; i < total_amount; i++) {
if (particle_data[i].active) {
Vector3 pos = Vector3(particle_data[i].xform[12], particle_data[i].xform[13], particle_data[i].xform[14]);
@@ -4394,28 +4393,28 @@ AABB RendererStorageRD::particles_get_current_aabb(RID p_particles) {
}
AABB RendererStorageRD::particles_get_aabb(RID p_particles) const {
- const Particles *particles = particles_owner.getornull(p_particles);
+ const Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND_V(!particles, AABB());
return particles->custom_aabb;
}
void RendererStorageRD::particles_set_emission_transform(RID p_particles, const Transform3D &p_transform) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->emission_transform = p_transform;
}
int RendererStorageRD::particles_get_draw_passes(RID p_particles) const {
- const Particles *particles = particles_owner.getornull(p_particles);
+ const Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND_V(!particles, 0);
return particles->draw_passes.size();
}
RID RendererStorageRD::particles_get_draw_pass_mesh(RID p_particles, int p_pass) const {
- const Particles *particles = particles_owner.getornull(p_particles);
+ const Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND_V(!particles, RID());
ERR_FAIL_INDEX_V(p_pass, particles->draw_passes.size(), RID());
@@ -4423,19 +4422,19 @@ RID RendererStorageRD::particles_get_draw_pass_mesh(RID p_particles, int p_pass)
}
void RendererStorageRD::particles_add_collision(RID p_particles, RID p_particles_collision_instance) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->collisions.insert(p_particles_collision_instance);
}
void RendererStorageRD::particles_remove_collision(RID p_particles, RID p_particles_collision_instance) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->collisions.erase(p_particles_collision_instance);
}
void RendererStorageRD::particles_set_canvas_sdf_collision(RID p_particles, bool p_enable, const Transform2D &p_xform, const Rect2 &p_to_screen, RID p_texture) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
particles->has_sdf_collision = p_enable;
particles->sdf_collision_transform = p_xform;
@@ -4477,7 +4476,7 @@ void RendererStorageRD::_particles_process(Particles *p_particles, double p_delt
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.binding = 3;
- Particles *sub_emitter = particles_owner.getornull(p_particles->sub_emitter);
+ Particles *sub_emitter = particles_owner.get_or_null(p_particles->sub_emitter);
if (sub_emitter) {
if (sub_emitter->emission_buffer == nullptr) { //no emission buffer, allocate emission buffer
_particles_allocate_emission_buffer(sub_emitter);
@@ -4594,11 +4593,11 @@ void RendererStorageRD::_particles_process(Particles *p_particles, double p_delt
uint32_t collision_3d_textures_used = 0;
for (const Set<RID>::Element *E = p_particles->collisions.front(); E; E = E->next()) {
- ParticlesCollisionInstance *pci = particles_collision_instance_owner.getornull(E->get());
+ ParticlesCollisionInstance *pci = particles_collision_instance_owner.get_or_null(E->get());
if (!pci || !pci->active) {
continue;
}
- ParticlesCollision *pc = particles_collision_owner.getornull(pci->collision);
+ ParticlesCollision *pc = particles_collision_owner.get_or_null(pci->collision);
ERR_CONTINUE(!pc);
Transform3D to_collider = pci->transform;
@@ -4746,7 +4745,7 @@ void RendererStorageRD::_particles_process(Particles *p_particles, double p_delt
for (uint32_t i = 0; i < ParticlesFrameParams::MAX_3D_TEXTURES; i++) {
RID rd_tex;
if (i < collision_3d_textures_used) {
- Texture *t = texture_owner.getornull(collision_3d_textures[i]);
+ Texture *t = texture_owner.get_or_null(collision_3d_textures[i]);
if (t && t->type == Texture::TYPE_3D) {
rd_tex = t->rd_texture;
}
@@ -4791,7 +4790,7 @@ void RendererStorageRD::_particles_process(Particles *p_particles, double p_delt
p_particles->force_sub_emit = false; //reset
- Particles *sub_emitter = particles_owner.getornull(p_particles->sub_emitter);
+ Particles *sub_emitter = particles_owner.get_or_null(p_particles->sub_emitter);
if (sub_emitter && sub_emitter->emission_storage_buffer.is_valid()) {
// print_line("updating subemitter buffer");
@@ -4848,7 +4847,7 @@ void RendererStorageRD::_particles_process(Particles *p_particles, double p_delt
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, p_particles->particles_material_uniform_set, 1);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, p_particles->collision_textures_uniform_set, 2);
- if (m->uniform_set.is_valid()) {
+ if (m->uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(m->uniform_set)) {
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, m->uniform_set, 3);
}
@@ -4871,7 +4870,7 @@ void RendererStorageRD::_particles_process(Particles *p_particles, double p_delt
}
void RendererStorageRD::particles_set_view_axis(RID p_particles, const Vector3 &p_axis, const Vector3 &p_up_axis) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND(!particles);
if (particles->draw_order != RS::PARTICLES_DRAW_ORDER_VIEW_DEPTH && particles->transform_align != RS::PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD && particles->transform_align != RS::PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY) {
@@ -5229,7 +5228,7 @@ void RendererStorageRD::update_particles() {
bool RendererStorageRD::particles_is_inactive(RID p_particles) const {
ERR_FAIL_COND_V_MSG(RSG::threaded, false, "This function should never be used with threaded rendering, as it stalls the renderer.");
- const Particles *particles = particles_owner.getornull(p_particles);
+ const Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND_V(!particles, false);
return !particles->emitting && particles->inactive;
}
@@ -5407,7 +5406,7 @@ void RendererStorageRD::particles_collision_initialize(RID p_rid) {
}
RID RendererStorageRD::particles_collision_get_heightfield_framebuffer(RID p_particles_collision) const {
- ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND_V(!particles_collision, RID());
ERR_FAIL_COND_V(particles_collision->type != RS::PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE, RID());
@@ -5442,7 +5441,7 @@ RID RendererStorageRD::particles_collision_get_heightfield_framebuffer(RID p_par
}
void RendererStorageRD::particles_collision_set_collision_type(RID p_particles_collision, RS::ParticlesCollisionType p_type) {
- ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND(!particles_collision);
if (p_type == particles_collision->type) {
@@ -5458,13 +5457,13 @@ void RendererStorageRD::particles_collision_set_collision_type(RID p_particles_c
}
void RendererStorageRD::particles_collision_set_cull_mask(RID p_particles_collision, uint32_t p_cull_mask) {
- ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND(!particles_collision);
particles_collision->cull_mask = p_cull_mask;
}
void RendererStorageRD::particles_collision_set_sphere_radius(RID p_particles_collision, real_t p_radius) {
- ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND(!particles_collision);
particles_collision->radius = p_radius;
@@ -5472,7 +5471,7 @@ void RendererStorageRD::particles_collision_set_sphere_radius(RID p_particles_co
}
void RendererStorageRD::particles_collision_set_box_extents(RID p_particles_collision, const Vector3 &p_extents) {
- ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND(!particles_collision);
particles_collision->extents = p_extents;
@@ -5480,41 +5479,41 @@ void RendererStorageRD::particles_collision_set_box_extents(RID p_particles_coll
}
void RendererStorageRD::particles_collision_set_attractor_strength(RID p_particles_collision, real_t p_strength) {
- ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND(!particles_collision);
particles_collision->attractor_strength = p_strength;
}
void RendererStorageRD::particles_collision_set_attractor_directionality(RID p_particles_collision, real_t p_directionality) {
- ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND(!particles_collision);
particles_collision->attractor_directionality = p_directionality;
}
void RendererStorageRD::particles_collision_set_attractor_attenuation(RID p_particles_collision, real_t p_curve) {
- ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND(!particles_collision);
particles_collision->attractor_attenuation = p_curve;
}
void RendererStorageRD::particles_collision_set_field_texture(RID p_particles_collision, RID p_texture) {
- ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND(!particles_collision);
particles_collision->field_texture = p_texture;
}
void RendererStorageRD::particles_collision_height_field_update(RID p_particles_collision) {
- ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND(!particles_collision);
particles_collision->dependency.changed_notify(DEPENDENCY_CHANGED_AABB);
}
void RendererStorageRD::particles_collision_set_height_field_resolution(RID p_particles_collision, RS::ParticlesCollisionHeightfieldResolution p_resolution) {
- ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND(!particles_collision);
ERR_FAIL_INDEX(p_resolution, RS::PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX);
@@ -5531,7 +5530,7 @@ void RendererStorageRD::particles_collision_set_height_field_resolution(RID p_pa
}
AABB RendererStorageRD::particles_collision_get_aabb(RID p_particles_collision) const {
- ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND_V(!particles_collision, AABB());
switch (particles_collision->type) {
@@ -5554,13 +5553,13 @@ AABB RendererStorageRD::particles_collision_get_aabb(RID p_particles_collision)
}
Vector3 RendererStorageRD::particles_collision_get_extents(RID p_particles_collision) const {
- const ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ const ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND_V(!particles_collision, Vector3());
return particles_collision->extents;
}
bool RendererStorageRD::particles_collision_is_heightfield(RID p_particles_collision) const {
- const ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_particles_collision);
+ const ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_particles_collision);
ERR_FAIL_COND_V(!particles_collision, false);
return particles_collision->type == RS::PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE;
}
@@ -5571,12 +5570,12 @@ RID RendererStorageRD::particles_collision_instance_create(RID p_collision) {
return particles_collision_instance_owner.make_rid(pci);
}
void RendererStorageRD::particles_collision_instance_set_transform(RID p_collision_instance, const Transform3D &p_transform) {
- ParticlesCollisionInstance *pci = particles_collision_instance_owner.getornull(p_collision_instance);
+ ParticlesCollisionInstance *pci = particles_collision_instance_owner.get_or_null(p_collision_instance);
ERR_FAIL_COND(!pci);
pci->transform = p_transform;
}
void RendererStorageRD::particles_collision_instance_set_active(RID p_collision_instance, bool p_active) {
- ParticlesCollisionInstance *pci = particles_collision_instance_owner.getornull(p_collision_instance);
+ ParticlesCollisionInstance *pci = particles_collision_instance_owner.get_or_null(p_collision_instance);
ERR_FAIL_COND(!pci);
pci->active = p_active;
}
@@ -5590,25 +5589,25 @@ void RendererStorageRD::visibility_notifier_initialize(RID p_notifier) {
visibility_notifier_owner.initialize_rid(p_notifier, VisibilityNotifier());
}
void RendererStorageRD::visibility_notifier_set_aabb(RID p_notifier, const AABB &p_aabb) {
- VisibilityNotifier *vn = visibility_notifier_owner.getornull(p_notifier);
+ VisibilityNotifier *vn = visibility_notifier_owner.get_or_null(p_notifier);
ERR_FAIL_COND(!vn);
vn->aabb = p_aabb;
vn->dependency.changed_notify(DEPENDENCY_CHANGED_AABB);
}
void RendererStorageRD::visibility_notifier_set_callbacks(RID p_notifier, const Callable &p_enter_callbable, const Callable &p_exit_callable) {
- VisibilityNotifier *vn = visibility_notifier_owner.getornull(p_notifier);
+ VisibilityNotifier *vn = visibility_notifier_owner.get_or_null(p_notifier);
ERR_FAIL_COND(!vn);
vn->enter_callback = p_enter_callbable;
vn->exit_callback = p_exit_callable;
}
AABB RendererStorageRD::visibility_notifier_get_aabb(RID p_notifier) const {
- const VisibilityNotifier *vn = visibility_notifier_owner.getornull(p_notifier);
+ const VisibilityNotifier *vn = visibility_notifier_owner.get_or_null(p_notifier);
ERR_FAIL_COND_V(!vn, AABB());
return vn->aabb;
}
void RendererStorageRD::visibility_notifier_call(RID p_notifier, bool p_enter, bool p_deferred) {
- VisibilityNotifier *vn = visibility_notifier_owner.getornull(p_notifier);
+ VisibilityNotifier *vn = visibility_notifier_owner.get_or_null(p_notifier);
ERR_FAIL_COND(!vn);
if (p_enter) {
@@ -5652,7 +5651,7 @@ void RendererStorageRD::_skeleton_make_dirty(Skeleton *skeleton) {
}
void RendererStorageRD::skeleton_allocate_data(RID p_skeleton, int p_bones, bool p_2d_skeleton) {
- Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
+ Skeleton *skeleton = skeleton_owner.get_or_null(p_skeleton);
ERR_FAIL_COND(!skeleton);
ERR_FAIL_COND(p_bones < 0);
@@ -5695,14 +5694,14 @@ void RendererStorageRD::skeleton_allocate_data(RID p_skeleton, int p_bones, bool
}
int RendererStorageRD::skeleton_get_bone_count(RID p_skeleton) const {
- Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
+ Skeleton *skeleton = skeleton_owner.get_or_null(p_skeleton);
ERR_FAIL_COND_V(!skeleton, 0);
return skeleton->size;
}
void RendererStorageRD::skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform3D &p_transform) {
- Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
+ Skeleton *skeleton = skeleton_owner.get_or_null(p_skeleton);
ERR_FAIL_COND(!skeleton);
ERR_FAIL_INDEX(p_bone, skeleton->size);
@@ -5727,7 +5726,7 @@ void RendererStorageRD::skeleton_bone_set_transform(RID p_skeleton, int p_bone,
}
Transform3D RendererStorageRD::skeleton_bone_get_transform(RID p_skeleton, int p_bone) const {
- Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
+ Skeleton *skeleton = skeleton_owner.get_or_null(p_skeleton);
ERR_FAIL_COND_V(!skeleton, Transform3D());
ERR_FAIL_INDEX_V(p_bone, skeleton->size, Transform3D());
@@ -5754,7 +5753,7 @@ Transform3D RendererStorageRD::skeleton_bone_get_transform(RID p_skeleton, int p
}
void RendererStorageRD::skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, const Transform2D &p_transform) {
- Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
+ Skeleton *skeleton = skeleton_owner.get_or_null(p_skeleton);
ERR_FAIL_COND(!skeleton);
ERR_FAIL_INDEX(p_bone, skeleton->size);
@@ -5775,7 +5774,7 @@ void RendererStorageRD::skeleton_bone_set_transform_2d(RID p_skeleton, int p_bon
}
Transform2D RendererStorageRD::skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const {
- Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
+ Skeleton *skeleton = skeleton_owner.get_or_null(p_skeleton);
ERR_FAIL_COND_V(!skeleton, Transform2D());
ERR_FAIL_INDEX_V(p_bone, skeleton->size, Transform2D());
@@ -5795,7 +5794,7 @@ Transform2D RendererStorageRD::skeleton_bone_get_transform_2d(RID p_skeleton, in
}
void RendererStorageRD::skeleton_set_base_transform_2d(RID p_skeleton, const Transform2D &p_base_transform) {
- Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
+ Skeleton *skeleton = skeleton_owner.get_or_null(p_skeleton);
ERR_FAIL_COND(!skeleton->use_2d);
@@ -5874,14 +5873,14 @@ void RendererStorageRD::spot_light_initialize(RID p_light) {
}
void RendererStorageRD::light_set_color(RID p_light, const Color &p_color) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
light->color = p_color;
}
void RendererStorageRD::light_set_param(RID p_light, RS::LightParam p_param, float p_value) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
ERR_FAIL_INDEX(p_param, RS::LIGHT_PARAM_MAX);
@@ -5916,7 +5915,7 @@ void RendererStorageRD::light_set_param(RID p_light, RS::LightParam p_param, flo
}
void RendererStorageRD::light_set_shadow(RID p_light, bool p_enabled) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
light->shadow = p_enabled;
@@ -5925,13 +5924,13 @@ void RendererStorageRD::light_set_shadow(RID p_light, bool p_enabled) {
}
void RendererStorageRD::light_set_shadow_color(RID p_light, const Color &p_color) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
light->shadow_color = p_color;
}
void RendererStorageRD::light_set_projector(RID p_light, RID p_texture) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
if (light->projector == p_texture) {
@@ -5953,14 +5952,14 @@ void RendererStorageRD::light_set_projector(RID p_light, RID p_texture) {
}
void RendererStorageRD::light_set_negative(RID p_light, bool p_enable) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
light->negative = p_enable;
}
void RendererStorageRD::light_set_cull_mask(RID p_light, uint32_t p_mask) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
light->cull_mask = p_mask;
@@ -5970,7 +5969,7 @@ void RendererStorageRD::light_set_cull_mask(RID p_light, uint32_t p_mask) {
}
void RendererStorageRD::light_set_reverse_cull_face_mode(RID p_light, bool p_enabled) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
light->reverse_cull = p_enabled;
@@ -5980,7 +5979,7 @@ void RendererStorageRD::light_set_reverse_cull_face_mode(RID p_light, bool p_ena
}
void RendererStorageRD::light_set_bake_mode(RID p_light, RS::LightBakeMode p_bake_mode) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
light->bake_mode = p_bake_mode;
@@ -5990,7 +5989,7 @@ void RendererStorageRD::light_set_bake_mode(RID p_light, RS::LightBakeMode p_bak
}
void RendererStorageRD::light_set_max_sdfgi_cascade(RID p_light, uint32_t p_cascade) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
light->max_sdfgi_cascade = p_cascade;
@@ -6000,7 +5999,7 @@ void RendererStorageRD::light_set_max_sdfgi_cascade(RID p_light, uint32_t p_casc
}
void RendererStorageRD::light_omni_set_shadow_mode(RID p_light, RS::LightOmniShadowMode p_mode) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
light->omni_shadow_mode = p_mode;
@@ -6010,14 +6009,14 @@ void RendererStorageRD::light_omni_set_shadow_mode(RID p_light, RS::LightOmniSha
}
RS::LightOmniShadowMode RendererStorageRD::light_omni_get_shadow_mode(RID p_light) {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, RS::LIGHT_OMNI_SHADOW_CUBE);
return light->omni_shadow_mode;
}
void RendererStorageRD::light_directional_set_shadow_mode(RID p_light, RS::LightDirectionalShadowMode p_mode) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
light->directional_shadow_mode = p_mode;
@@ -6026,7 +6025,7 @@ void RendererStorageRD::light_directional_set_shadow_mode(RID p_light, RS::Light
}
void RendererStorageRD::light_directional_set_blend_splits(RID p_light, bool p_enable) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
light->directional_blend_splits = p_enable;
@@ -6035,56 +6034,56 @@ void RendererStorageRD::light_directional_set_blend_splits(RID p_light, bool p_e
}
bool RendererStorageRD::light_directional_get_blend_splits(RID p_light) const {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, false);
return light->directional_blend_splits;
}
void RendererStorageRD::light_directional_set_sky_only(RID p_light, bool p_sky_only) {
- Light *light = light_owner.getornull(p_light);
+ Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND(!light);
light->directional_sky_only = p_sky_only;
}
bool RendererStorageRD::light_directional_is_sky_only(RID p_light) const {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, false);
return light->directional_sky_only;
}
RS::LightDirectionalShadowMode RendererStorageRD::light_directional_get_shadow_mode(RID p_light) {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, RS::LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL);
return light->directional_shadow_mode;
}
uint32_t RendererStorageRD::light_get_max_sdfgi_cascade(RID p_light) {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, 0);
return light->max_sdfgi_cascade;
}
RS::LightBakeMode RendererStorageRD::light_get_bake_mode(RID p_light) {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, RS::LIGHT_BAKE_DISABLED);
return light->bake_mode;
}
uint64_t RendererStorageRD::light_get_version(RID p_light) const {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, 0);
return light->version;
}
AABB RendererStorageRD::light_get_aabb(RID p_light) const {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, AABB());
switch (light->type) {
@@ -6115,7 +6114,7 @@ void RendererStorageRD::reflection_probe_initialize(RID p_reflection_probe) {
}
void RendererStorageRD::reflection_probe_set_update_mode(RID p_probe, RS::ReflectionProbeUpdateMode p_mode) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
reflection_probe->update_mode = p_mode;
@@ -6123,35 +6122,35 @@ void RendererStorageRD::reflection_probe_set_update_mode(RID p_probe, RS::Reflec
}
void RendererStorageRD::reflection_probe_set_intensity(RID p_probe, float p_intensity) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
reflection_probe->intensity = p_intensity;
}
void RendererStorageRD::reflection_probe_set_ambient_mode(RID p_probe, RS::ReflectionProbeAmbientMode p_mode) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
reflection_probe->ambient_mode = p_mode;
}
void RendererStorageRD::reflection_probe_set_ambient_color(RID p_probe, const Color &p_color) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
reflection_probe->ambient_color = p_color;
}
void RendererStorageRD::reflection_probe_set_ambient_energy(RID p_probe, float p_energy) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
reflection_probe->ambient_color_energy = p_energy;
}
void RendererStorageRD::reflection_probe_set_max_distance(RID p_probe, float p_distance) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
reflection_probe->max_distance = p_distance;
@@ -6160,7 +6159,7 @@ void RendererStorageRD::reflection_probe_set_max_distance(RID p_probe, float p_d
}
void RendererStorageRD::reflection_probe_set_extents(RID p_probe, const Vector3 &p_extents) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
if (reflection_probe->extents == p_extents) {
@@ -6171,7 +6170,7 @@ void RendererStorageRD::reflection_probe_set_extents(RID p_probe, const Vector3
}
void RendererStorageRD::reflection_probe_set_origin_offset(RID p_probe, const Vector3 &p_offset) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
reflection_probe->origin_offset = p_offset;
@@ -6179,7 +6178,7 @@ void RendererStorageRD::reflection_probe_set_origin_offset(RID p_probe, const Ve
}
void RendererStorageRD::reflection_probe_set_as_interior(RID p_probe, bool p_enable) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
reflection_probe->interior = p_enable;
@@ -6187,14 +6186,14 @@ void RendererStorageRD::reflection_probe_set_as_interior(RID p_probe, bool p_ena
}
void RendererStorageRD::reflection_probe_set_enable_box_projection(RID p_probe, bool p_enable) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
reflection_probe->box_projection = p_enable;
}
void RendererStorageRD::reflection_probe_set_enable_shadows(RID p_probe, bool p_enable) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
reflection_probe->enable_shadows = p_enable;
@@ -6202,7 +6201,7 @@ void RendererStorageRD::reflection_probe_set_enable_shadows(RID p_probe, bool p_
}
void RendererStorageRD::reflection_probe_set_cull_mask(RID p_probe, uint32_t p_layers) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
reflection_probe->cull_mask = p_layers;
@@ -6210,7 +6209,7 @@ void RendererStorageRD::reflection_probe_set_cull_mask(RID p_probe, uint32_t p_l
}
void RendererStorageRD::reflection_probe_set_resolution(RID p_probe, int p_resolution) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
ERR_FAIL_COND(p_resolution < 32);
@@ -6218,7 +6217,7 @@ void RendererStorageRD::reflection_probe_set_resolution(RID p_probe, int p_resol
}
void RendererStorageRD::reflection_probe_set_lod_threshold(RID p_probe, float p_ratio) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND(!reflection_probe);
reflection_probe->lod_threshold = p_ratio;
@@ -6227,7 +6226,7 @@ void RendererStorageRD::reflection_probe_set_lod_threshold(RID p_probe, float p_
}
AABB RendererStorageRD::reflection_probe_get_aabb(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, AABB());
AABB aabb;
@@ -6238,96 +6237,96 @@ AABB RendererStorageRD::reflection_probe_get_aabb(RID p_probe) const {
}
RS::ReflectionProbeUpdateMode RendererStorageRD::reflection_probe_get_update_mode(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, RS::REFLECTION_PROBE_UPDATE_ALWAYS);
return reflection_probe->update_mode;
}
uint32_t RendererStorageRD::reflection_probe_get_cull_mask(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, 0);
return reflection_probe->cull_mask;
}
Vector3 RendererStorageRD::reflection_probe_get_extents(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, Vector3());
return reflection_probe->extents;
}
Vector3 RendererStorageRD::reflection_probe_get_origin_offset(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, Vector3());
return reflection_probe->origin_offset;
}
bool RendererStorageRD::reflection_probe_renders_shadows(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, false);
return reflection_probe->enable_shadows;
}
float RendererStorageRD::reflection_probe_get_origin_max_distance(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, 0);
return reflection_probe->max_distance;
}
float RendererStorageRD::reflection_probe_get_lod_threshold(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, 0);
return reflection_probe->lod_threshold;
}
int RendererStorageRD::reflection_probe_get_resolution(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, 0);
return reflection_probe->resolution;
}
float RendererStorageRD::reflection_probe_get_intensity(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, 0);
return reflection_probe->intensity;
}
bool RendererStorageRD::reflection_probe_is_interior(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, false);
return reflection_probe->interior;
}
bool RendererStorageRD::reflection_probe_is_box_projection(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, false);
return reflection_probe->box_projection;
}
RS::ReflectionProbeAmbientMode RendererStorageRD::reflection_probe_get_ambient_mode(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, RS::REFLECTION_PROBE_AMBIENT_DISABLED);
return reflection_probe->ambient_mode;
}
Color RendererStorageRD::reflection_probe_get_ambient_color(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, Color());
return reflection_probe->ambient_color;
}
float RendererStorageRD::reflection_probe_get_ambient_color_energy(RID p_probe) const {
- const ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_probe);
+ const ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
ERR_FAIL_COND_V(!reflection_probe, 0);
return reflection_probe->ambient_color_energy;
@@ -6341,14 +6340,14 @@ void RendererStorageRD::decal_initialize(RID p_decal) {
}
void RendererStorageRD::decal_set_extents(RID p_decal, const Vector3 &p_extents) {
- Decal *decal = decal_owner.getornull(p_decal);
+ Decal *decal = decal_owner.get_or_null(p_decal);
ERR_FAIL_COND(!decal);
decal->extents = p_extents;
decal->dependency.changed_notify(DEPENDENCY_CHANGED_AABB);
}
void RendererStorageRD::decal_set_texture(RID p_decal, RS::DecalTexture p_type, RID p_texture) {
- Decal *decal = decal_owner.getornull(p_decal);
+ Decal *decal = decal_owner.get_or_null(p_decal);
ERR_FAIL_COND(!decal);
ERR_FAIL_INDEX(p_type, RS::DECAL_TEXTURE_MAX);
@@ -6372,32 +6371,32 @@ void RendererStorageRD::decal_set_texture(RID p_decal, RS::DecalTexture p_type,
}
void RendererStorageRD::decal_set_emission_energy(RID p_decal, float p_energy) {
- Decal *decal = decal_owner.getornull(p_decal);
+ Decal *decal = decal_owner.get_or_null(p_decal);
ERR_FAIL_COND(!decal);
decal->emission_energy = p_energy;
}
void RendererStorageRD::decal_set_albedo_mix(RID p_decal, float p_mix) {
- Decal *decal = decal_owner.getornull(p_decal);
+ Decal *decal = decal_owner.get_or_null(p_decal);
ERR_FAIL_COND(!decal);
decal->albedo_mix = p_mix;
}
void RendererStorageRD::decal_set_modulate(RID p_decal, const Color &p_modulate) {
- Decal *decal = decal_owner.getornull(p_decal);
+ Decal *decal = decal_owner.get_or_null(p_decal);
ERR_FAIL_COND(!decal);
decal->modulate = p_modulate;
}
void RendererStorageRD::decal_set_cull_mask(RID p_decal, uint32_t p_layers) {
- Decal *decal = decal_owner.getornull(p_decal);
+ Decal *decal = decal_owner.get_or_null(p_decal);
ERR_FAIL_COND(!decal);
decal->cull_mask = p_layers;
decal->dependency.changed_notify(DEPENDENCY_CHANGED_AABB);
}
void RendererStorageRD::decal_set_distance_fade(RID p_decal, bool p_enabled, float p_begin, float p_length) {
- Decal *decal = decal_owner.getornull(p_decal);
+ Decal *decal = decal_owner.get_or_null(p_decal);
ERR_FAIL_COND(!decal);
decal->distance_fade = p_enabled;
decal->distance_fade_begin = p_begin;
@@ -6405,20 +6404,20 @@ void RendererStorageRD::decal_set_distance_fade(RID p_decal, bool p_enabled, flo
}
void RendererStorageRD::decal_set_fade(RID p_decal, float p_above, float p_below) {
- Decal *decal = decal_owner.getornull(p_decal);
+ Decal *decal = decal_owner.get_or_null(p_decal);
ERR_FAIL_COND(!decal);
decal->upper_fade = p_above;
decal->lower_fade = p_below;
}
void RendererStorageRD::decal_set_normal_fade(RID p_decal, float p_fade) {
- Decal *decal = decal_owner.getornull(p_decal);
+ Decal *decal = decal_owner.get_or_null(p_decal);
ERR_FAIL_COND(!decal);
decal->normal_fade = p_fade;
}
AABB RendererStorageRD::decal_get_aabb(RID p_decal) const {
- Decal *decal = decal_owner.getornull(p_decal);
+ Decal *decal = decal_owner.get_or_null(p_decal);
ERR_FAIL_COND_V(!decal, AABB());
return AABB(-decal->extents, decal->extents * 2.0);
@@ -6432,7 +6431,7 @@ void RendererStorageRD::voxel_gi_initialize(RID p_voxel_gi) {
}
void RendererStorageRD::voxel_gi_allocate_data(RID p_voxel_gi, const Transform3D &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND(!voxel_gi);
if (voxel_gi->octree_buffer.is_valid()) {
@@ -6557,20 +6556,20 @@ void RendererStorageRD::voxel_gi_allocate_data(RID p_voxel_gi, const Transform3D
}
AABB RendererStorageRD::voxel_gi_get_bounds(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, AABB());
return voxel_gi->bounds;
}
Vector3i RendererStorageRD::voxel_gi_get_octree_size(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, Vector3i());
return voxel_gi->octree_size;
}
Vector<uint8_t> RendererStorageRD::voxel_gi_get_octree_cells(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, Vector<uint8_t>());
if (voxel_gi->octree_buffer.is_valid()) {
@@ -6580,7 +6579,7 @@ Vector<uint8_t> RendererStorageRD::voxel_gi_get_octree_cells(RID p_voxel_gi) con
}
Vector<uint8_t> RendererStorageRD::voxel_gi_get_data_cells(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, Vector<uint8_t>());
if (voxel_gi->data_buffer.is_valid()) {
@@ -6590,7 +6589,7 @@ Vector<uint8_t> RendererStorageRD::voxel_gi_get_data_cells(RID p_voxel_gi) const
}
Vector<uint8_t> RendererStorageRD::voxel_gi_get_distance_field(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, Vector<uint8_t>());
if (voxel_gi->data_buffer.is_valid()) {
@@ -6600,21 +6599,21 @@ Vector<uint8_t> RendererStorageRD::voxel_gi_get_distance_field(RID p_voxel_gi) c
}
Vector<int> RendererStorageRD::voxel_gi_get_level_counts(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, Vector<int>());
return voxel_gi->level_counts;
}
Transform3D RendererStorageRD::voxel_gi_get_to_cell_xform(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, Transform3D());
return voxel_gi->to_cell_xform;
}
void RendererStorageRD::voxel_gi_set_dynamic_range(RID p_voxel_gi, float p_range) {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND(!voxel_gi);
voxel_gi->dynamic_range = p_range;
@@ -6622,14 +6621,14 @@ void RendererStorageRD::voxel_gi_set_dynamic_range(RID p_voxel_gi, float p_range
}
float RendererStorageRD::voxel_gi_get_dynamic_range(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, 0);
return voxel_gi->dynamic_range;
}
void RendererStorageRD::voxel_gi_set_propagation(RID p_voxel_gi, float p_range) {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND(!voxel_gi);
voxel_gi->propagation = p_range;
@@ -6637,72 +6636,72 @@ void RendererStorageRD::voxel_gi_set_propagation(RID p_voxel_gi, float p_range)
}
float RendererStorageRD::voxel_gi_get_propagation(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, 0);
return voxel_gi->propagation;
}
void RendererStorageRD::voxel_gi_set_energy(RID p_voxel_gi, float p_energy) {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND(!voxel_gi);
voxel_gi->energy = p_energy;
}
float RendererStorageRD::voxel_gi_get_energy(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, 0);
return voxel_gi->energy;
}
void RendererStorageRD::voxel_gi_set_bias(RID p_voxel_gi, float p_bias) {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND(!voxel_gi);
voxel_gi->bias = p_bias;
}
float RendererStorageRD::voxel_gi_get_bias(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, 0);
return voxel_gi->bias;
}
void RendererStorageRD::voxel_gi_set_normal_bias(RID p_voxel_gi, float p_normal_bias) {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND(!voxel_gi);
voxel_gi->normal_bias = p_normal_bias;
}
float RendererStorageRD::voxel_gi_get_normal_bias(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, 0);
return voxel_gi->normal_bias;
}
void RendererStorageRD::voxel_gi_set_anisotropy_strength(RID p_voxel_gi, float p_strength) {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND(!voxel_gi);
voxel_gi->anisotropy_strength = p_strength;
}
float RendererStorageRD::voxel_gi_get_anisotropy_strength(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, 0);
return voxel_gi->anisotropy_strength;
}
void RendererStorageRD::voxel_gi_set_interior(RID p_voxel_gi, bool p_enable) {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND(!voxel_gi);
voxel_gi->interior = p_enable;
}
void RendererStorageRD::voxel_gi_set_use_two_bounces(RID p_voxel_gi, bool p_enable) {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND(!voxel_gi);
voxel_gi->use_two_bounces = p_enable;
@@ -6710,43 +6709,43 @@ void RendererStorageRD::voxel_gi_set_use_two_bounces(RID p_voxel_gi, bool p_enab
}
bool RendererStorageRD::voxel_gi_is_using_two_bounces(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, false);
return voxel_gi->use_two_bounces;
}
bool RendererStorageRD::voxel_gi_is_interior(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, 0);
return voxel_gi->interior;
}
uint32_t RendererStorageRD::voxel_gi_get_version(RID p_voxel_gi) {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, 0);
return voxel_gi->version;
}
uint32_t RendererStorageRD::voxel_gi_get_data_version(RID p_voxel_gi) {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, 0);
return voxel_gi->data_version;
}
RID RendererStorageRD::voxel_gi_get_octree_buffer(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, RID());
return voxel_gi->octree_buffer;
}
RID RendererStorageRD::voxel_gi_get_data_buffer(RID p_voxel_gi) const {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, RID());
return voxel_gi->data_buffer;
}
RID RendererStorageRD::voxel_gi_get_sdf_texture(RID p_voxel_gi) {
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_voxel_gi);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_voxel_gi);
ERR_FAIL_COND_V(!voxel_gi, RID());
return voxel_gi->sdf_texture;
@@ -6763,20 +6762,20 @@ void RendererStorageRD::lightmap_initialize(RID p_lightmap) {
}
void RendererStorageRD::lightmap_set_textures(RID p_lightmap, RID p_light, bool p_uses_spherical_haromics) {
- Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
ERR_FAIL_COND(!lm);
lightmap_array_version++;
//erase lightmap users
if (lm->light_texture.is_valid()) {
- Texture *t = texture_owner.getornull(lm->light_texture);
+ Texture *t = texture_owner.get_or_null(lm->light_texture);
if (t) {
t->lightmap_users.erase(p_lightmap);
}
}
- Texture *t = texture_owner.getornull(p_light);
+ Texture *t = texture_owner.get_or_null(p_light);
lm->light_texture = p_light;
lm->uses_spherical_harmonics = p_uses_spherical_haromics;
@@ -6811,19 +6810,19 @@ void RendererStorageRD::lightmap_set_textures(RID p_lightmap, RID p_light, bool
}
void RendererStorageRD::lightmap_set_probe_bounds(RID p_lightmap, const AABB &p_bounds) {
- Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
ERR_FAIL_COND(!lm);
lm->bounds = p_bounds;
}
void RendererStorageRD::lightmap_set_probe_interior(RID p_lightmap, bool p_interior) {
- Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
ERR_FAIL_COND(!lm);
lm->interior = p_interior;
}
void RendererStorageRD::lightmap_set_probe_capture_data(RID p_lightmap, const PackedVector3Array &p_points, const PackedColorArray &p_point_sh, const PackedInt32Array &p_tetrahedra, const PackedInt32Array &p_bsp_tree) {
- Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
ERR_FAIL_COND(!lm);
if (p_points.size()) {
@@ -6839,26 +6838,26 @@ void RendererStorageRD::lightmap_set_probe_capture_data(RID p_lightmap, const Pa
}
PackedVector3Array RendererStorageRD::lightmap_get_probe_capture_points(RID p_lightmap) const {
- Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
ERR_FAIL_COND_V(!lm, PackedVector3Array());
return lm->points;
}
PackedColorArray RendererStorageRD::lightmap_get_probe_capture_sh(RID p_lightmap) const {
- Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
ERR_FAIL_COND_V(!lm, PackedColorArray());
return lm->point_sh;
}
PackedInt32Array RendererStorageRD::lightmap_get_probe_capture_tetrahedra(RID p_lightmap) const {
- Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
ERR_FAIL_COND_V(!lm, PackedInt32Array());
return lm->tetrahedra;
}
PackedInt32Array RendererStorageRD::lightmap_get_probe_capture_bsp_tree(RID p_lightmap) const {
- Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
ERR_FAIL_COND_V(!lm, PackedInt32Array());
return lm->bsp_tree;
}
@@ -6868,7 +6867,7 @@ void RendererStorageRD::lightmap_set_probe_capture_update_speed(float p_speed) {
}
void RendererStorageRD::lightmap_tap_sh_light(RID p_lightmap, const Vector3 &p_point, Color *r_sh) {
- Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
ERR_FAIL_COND(!lm);
for (int i = 0; i < 9; i++) {
@@ -6918,13 +6917,13 @@ void RendererStorageRD::lightmap_tap_sh_light(RID p_lightmap, const Vector3 &p_p
}
bool RendererStorageRD::lightmap_is_interior(RID p_lightmap) const {
- const Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ const Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
ERR_FAIL_COND_V(!lm, false);
return lm->interior;
}
AABB RendererStorageRD::lightmap_get_aabb(RID p_lightmap) const {
- const Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ const Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
ERR_FAIL_COND_V(!lm, AABB());
return lm->bounds;
}
@@ -6964,7 +6963,7 @@ void RendererStorageRD::_update_render_target(RenderTarget *rt) {
//create a placeholder until updated
rt->texture = texture_allocate();
texture_2d_placeholder_initialize(rt->texture);
- Texture *tex = texture_owner.getornull(rt->texture);
+ Texture *tex = texture_owner.get_or_null(rt->texture);
tex->is_render_target = true;
}
@@ -7011,7 +7010,7 @@ void RendererStorageRD::_update_render_target(RenderTarget *rt) {
{ //update texture
- Texture *tex = texture_owner.getornull(rt->texture);
+ Texture *tex = texture_owner.get_or_null(rt->texture);
//free existing textures
if (RD::get_singleton()->texture_is_valid(tex->rd_texture)) {
@@ -7118,7 +7117,7 @@ void RendererStorageRD::render_target_set_position(RID p_render_target, int p_x,
}
void RendererStorageRD::render_target_set_size(RID p_render_target, int p_width, int p_height, uint32_t p_view_count) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
if (rt->size.x != p_width || rt->size.y != p_height || rt->view_count != p_view_count) {
rt->size.x = p_width;
@@ -7129,7 +7128,7 @@ void RendererStorageRD::render_target_set_size(RID p_render_target, int p_width,
}
RID RendererStorageRD::render_target_get_texture(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, RID());
return rt->texture;
@@ -7139,53 +7138,53 @@ void RendererStorageRD::render_target_set_external_texture(RID p_render_target,
}
void RendererStorageRD::render_target_set_flag(RID p_render_target, RenderTargetFlags p_flag, bool p_value) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
rt->flags[p_flag] = p_value;
_update_render_target(rt);
}
bool RendererStorageRD::render_target_was_used(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, false);
return rt->was_used;
}
void RendererStorageRD::render_target_set_as_unused(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
rt->was_used = false;
}
Size2 RendererStorageRD::render_target_get_size(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, Size2());
return rt->size;
}
RID RendererStorageRD::render_target_get_rd_framebuffer(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, RID());
return rt->framebuffer;
}
RID RendererStorageRD::render_target_get_rd_texture(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, RID());
return rt->color;
}
RID RendererStorageRD::render_target_get_rd_backbuffer(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, RID());
return rt->backbuffer;
}
RID RendererStorageRD::render_target_get_rd_backbuffer_framebuffer(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, RID());
if (!rt->backbuffer.is_valid()) {
@@ -7196,32 +7195,32 @@ RID RendererStorageRD::render_target_get_rd_backbuffer_framebuffer(RID p_render_
}
void RendererStorageRD::render_target_request_clear(RID p_render_target, const Color &p_clear_color) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
rt->clear_requested = true;
rt->clear_color = p_clear_color;
}
bool RendererStorageRD::render_target_is_clear_requested(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, false);
return rt->clear_requested;
}
Color RendererStorageRD::render_target_get_clear_request_color(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, Color());
return rt->clear_color;
}
void RendererStorageRD::render_target_disable_clear_request(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
rt->clear_requested = false;
}
void RendererStorageRD::render_target_do_clear_request(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
if (!rt->clear_requested) {
return;
@@ -7234,7 +7233,7 @@ void RendererStorageRD::render_target_do_clear_request(RID p_render_target) {
}
void RendererStorageRD::render_target_set_sdf_size_and_scale(RID p_render_target, RS::ViewportSDFOversize p_size, RS::ViewportSDFScale p_scale) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
if (rt->sdf_oversize == p_size && rt->sdf_scale == p_scale) {
return;
@@ -7276,28 +7275,28 @@ Rect2i RendererStorageRD::_render_target_get_sdf_rect(const RenderTarget *rt) co
}
Rect2i RendererStorageRD::render_target_get_sdf_rect(RID p_render_target) const {
- const RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ const RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, Rect2i());
return _render_target_get_sdf_rect(rt);
}
void RendererStorageRD::render_target_mark_sdf_enabled(RID p_render_target, bool p_enabled) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
rt->sdf_enabled = p_enabled;
}
bool RendererStorageRD::render_target_is_sdf_enabled(RID p_render_target) const {
- const RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ const RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, false);
return rt->sdf_enabled;
}
RID RendererStorageRD::render_target_get_sdf_texture(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, RID());
if (rt->sdf_buffer_read.is_null()) {
// no texture, create a dummy one for the 2D uniform set
@@ -7432,7 +7431,7 @@ void RendererStorageRD::_render_target_clear_sdf(RenderTarget *rt) {
}
RID RendererStorageRD::render_target_get_sdf_framebuffer(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, RID());
if (rt->sdf_buffer_write_fb.is_null()) {
@@ -7442,7 +7441,7 @@ RID RendererStorageRD::render_target_get_sdf_framebuffer(RID p_render_target) {
return rt->sdf_buffer_write_fb;
}
void RendererStorageRD::render_target_sdf_process(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
ERR_FAIL_COND(rt->sdf_buffer_write_fb.is_null());
@@ -7517,7 +7516,7 @@ void RendererStorageRD::render_target_sdf_process(RID p_render_target) {
}
void RendererStorageRD::render_target_copy_to_back_buffer(RID p_render_target, const Rect2i &p_region, bool p_gen_mipmaps) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
if (!rt->backbuffer.is_valid()) {
_create_render_target_backbuffer(rt);
@@ -7557,7 +7556,7 @@ void RendererStorageRD::render_target_copy_to_back_buffer(RID p_render_target, c
}
void RendererStorageRD::render_target_clear_back_buffer(RID p_render_target, const Rect2i &p_region, const Color &p_color) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
if (!rt->backbuffer.is_valid()) {
_create_render_target_backbuffer(rt);
@@ -7578,7 +7577,7 @@ void RendererStorageRD::render_target_clear_back_buffer(RID p_render_target, con
}
void RendererStorageRD::render_target_gen_back_buffer_mipmaps(RID p_render_target, const Rect2i &p_region) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
if (!rt->backbuffer.is_valid()) {
_create_render_target_backbuffer(rt);
@@ -7610,66 +7609,66 @@ void RendererStorageRD::render_target_gen_back_buffer_mipmaps(RID p_render_targe
}
RID RendererStorageRD::render_target_get_framebuffer_uniform_set(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, RID());
return rt->framebuffer_uniform_set;
}
RID RendererStorageRD::render_target_get_backbuffer_uniform_set(RID p_render_target) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, RID());
return rt->backbuffer_uniform_set;
}
void RendererStorageRD::render_target_set_framebuffer_uniform_set(RID p_render_target, RID p_uniform_set) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
rt->framebuffer_uniform_set = p_uniform_set;
}
void RendererStorageRD::render_target_set_backbuffer_uniform_set(RID p_render_target, RID p_uniform_set) {
- RenderTarget *rt = render_target_owner.getornull(p_render_target);
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND(!rt);
rt->backbuffer_uniform_set = p_uniform_set;
}
void RendererStorageRD::base_update_dependency(RID p_base, DependencyTracker *p_instance) {
if (mesh_owner.owns(p_base)) {
- Mesh *mesh = mesh_owner.getornull(p_base);
+ Mesh *mesh = mesh_owner.get_or_null(p_base);
p_instance->update_dependency(&mesh->dependency);
} else if (multimesh_owner.owns(p_base)) {
- MultiMesh *multimesh = multimesh_owner.getornull(p_base);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_base);
p_instance->update_dependency(&multimesh->dependency);
if (multimesh->mesh.is_valid()) {
base_update_dependency(multimesh->mesh, p_instance);
}
} else if (reflection_probe_owner.owns(p_base)) {
- ReflectionProbe *rp = reflection_probe_owner.getornull(p_base);
+ ReflectionProbe *rp = reflection_probe_owner.get_or_null(p_base);
p_instance->update_dependency(&rp->dependency);
} else if (decal_owner.owns(p_base)) {
- Decal *decal = decal_owner.getornull(p_base);
+ Decal *decal = decal_owner.get_or_null(p_base);
p_instance->update_dependency(&decal->dependency);
} else if (voxel_gi_owner.owns(p_base)) {
- VoxelGI *gip = voxel_gi_owner.getornull(p_base);
+ VoxelGI *gip = voxel_gi_owner.get_or_null(p_base);
p_instance->update_dependency(&gip->dependency);
} else if (lightmap_owner.owns(p_base)) {
- Lightmap *lm = lightmap_owner.getornull(p_base);
+ Lightmap *lm = lightmap_owner.get_or_null(p_base);
p_instance->update_dependency(&lm->dependency);
} else if (light_owner.owns(p_base)) {
- Light *l = light_owner.getornull(p_base);
+ Light *l = light_owner.get_or_null(p_base);
p_instance->update_dependency(&l->dependency);
} else if (particles_owner.owns(p_base)) {
- Particles *p = particles_owner.getornull(p_base);
+ Particles *p = particles_owner.get_or_null(p_base);
p_instance->update_dependency(&p->dependency);
} else if (particles_collision_owner.owns(p_base)) {
- ParticlesCollision *pc = particles_collision_owner.getornull(p_base);
+ ParticlesCollision *pc = particles_collision_owner.get_or_null(p_base);
p_instance->update_dependency(&pc->dependency);
} else if (visibility_notifier_owner.owns(p_base)) {
- VisibilityNotifier *vn = visibility_notifier_owner.getornull(p_base);
+ VisibilityNotifier *vn = visibility_notifier_owner.get_or_null(p_base);
p_instance->update_dependency(&vn->dependency);
}
}
void RendererStorageRD::skeleton_update_dependency(RID p_skeleton, DependencyTracker *p_instance) {
- Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
+ Skeleton *skeleton = skeleton_owner.get_or_null(p_skeleton);
ERR_FAIL_COND(!skeleton);
p_instance->update_dependency(&skeleton->dependency);
@@ -7775,7 +7774,7 @@ void RendererStorageRD::_update_decal_atlas() {
while ((K = decal_atlas.textures.next(K))) {
DecalAtlas::SortItem &si = itemsv.write[idx];
- Texture *src_tex = texture_owner.getornull(*K);
+ Texture *src_tex = texture_owner.get_or_null(*K);
si.size.width = (src_tex->width / border) + 1;
si.size.height = (src_tex->height / border) + 1;
@@ -7924,7 +7923,7 @@ void RendererStorageRD::_update_decal_atlas() {
const RID *K = nullptr;
while ((K = decal_atlas.textures.next(K))) {
DecalAtlas::Texture *t = decal_atlas.textures.getptr(*K);
- Texture *src_tex = texture_owner.getornull(*K);
+ Texture *src_tex = texture_owner.get_or_null(*K);
effects->copy_to_atlas_fb(src_tex->rd_texture, mm.fb, t->uv_rect, draw_list, false, t->panorama_to_dp_users > 0);
}
@@ -8340,7 +8339,7 @@ void RendererStorageRD::global_variable_set(const StringName &p_name, const Vari
} else {
//texture
for (Set<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) {
- Material *material = material_owner.getornull(E->get());
+ Material *material = material_owner.get_or_null(E->get());
ERR_CONTINUE(!material);
_material_queue_update(material, false, true);
}
@@ -8371,7 +8370,7 @@ void RendererStorageRD::global_variable_set_override(const StringName &p_name, c
} else {
//texture
for (Set<RID>::Element *E = gv.texture_materials.front(); E; E = E->next()) {
- Material *material = material_owner.getornull(E->get());
+ Material *material = material_owner.get_or_null(E->get());
ERR_CONTINUE(!material);
_material_queue_update(material, false, true);
}
@@ -8582,7 +8581,7 @@ void RendererStorageRD::_update_global_variables() {
// only happens in the case of a buffer variable added or removed,
// so not often.
for (const RID &E : global_variables.materials_using_buffer) {
- Material *material = material_owner.getornull(E);
+ Material *material = material_owner.get_or_null(E);
ERR_CONTINUE(!material); //wtf
_material_queue_update(material, true, false);
@@ -8595,7 +8594,7 @@ void RendererStorageRD::_update_global_variables() {
// only happens in the case of a buffer variable added or removed,
// so not often.
for (const RID &E : global_variables.materials_using_texture) {
- Material *material = material_owner.getornull(E);
+ Material *material = material_owner.get_or_null(E);
ERR_CONTINUE(!material); //wtf
_material_queue_update(material, false, true);
@@ -8640,7 +8639,7 @@ bool RendererStorageRD::has_os_feature(const String &p_feature) const {
bool RendererStorageRD::free(RID p_rid) {
if (texture_owner.owns(p_rid)) {
- Texture *t = texture_owner.getornull(p_rid);
+ Texture *t = texture_owner.get_or_null(p_rid);
ERR_FAIL_COND_V(!t, false);
ERR_FAIL_COND_V(t->is_render_target, false);
@@ -8654,7 +8653,7 @@ bool RendererStorageRD::free(RID p_rid) {
}
if (t->is_proxy && t->proxy_to.is_valid()) {
- Texture *proxy_to = texture_owner.getornull(t->proxy_to);
+ Texture *proxy_to = texture_owner.get_or_null(t->proxy_to);
if (proxy_to) {
proxy_to->proxies.erase(p_rid);
}
@@ -8666,7 +8665,7 @@ bool RendererStorageRD::free(RID p_rid) {
}
for (int i = 0; i < t->proxies.size(); i++) {
- Texture *p = texture_owner.getornull(t->proxies[i]);
+ Texture *p = texture_owner.get_or_null(t->proxies[i]);
ERR_CONTINUE(!p);
p->proxy_to = RID();
p->rd_texture = RID();
@@ -8681,7 +8680,7 @@ bool RendererStorageRD::free(RID p_rid) {
} else if (canvas_texture_owner.owns(p_rid)) {
canvas_texture_owner.free(p_rid);
} else if (shader_owner.owns(p_rid)) {
- Shader *shader = shader_owner.getornull(p_rid);
+ Shader *shader = shader_owner.get_or_null(p_rid);
//make material unreference this
while (shader->owners.size()) {
material_set_shader(shader->owners.front()->get()->self, RID());
@@ -8693,7 +8692,7 @@ bool RendererStorageRD::free(RID p_rid) {
shader_owner.free(p_rid);
} else if (material_owner.owns(p_rid)) {
- Material *material = material_owner.getornull(p_rid);
+ Material *material = material_owner.get_or_null(p_rid);
material_set_shader(p_rid, RID()); //clean up shader
material->dependency.deleted_notify(p_rid);
@@ -8701,7 +8700,7 @@ bool RendererStorageRD::free(RID p_rid) {
} else if (mesh_owner.owns(p_rid)) {
mesh_clear(p_rid);
mesh_set_shadow_mesh(p_rid, RID());
- Mesh *mesh = mesh_owner.getornull(p_rid);
+ Mesh *mesh = mesh_owner.get_or_null(p_rid);
mesh->dependency.deleted_notify(p_rid);
if (mesh->instances.size()) {
ERR_PRINT("deleting mesh with active instances");
@@ -8715,7 +8714,7 @@ bool RendererStorageRD::free(RID p_rid) {
}
mesh_owner.free(p_rid);
} else if (mesh_instance_owner.owns(p_rid)) {
- MeshInstance *mi = mesh_instance_owner.getornull(p_rid);
+ MeshInstance *mi = mesh_instance_owner.get_or_null(p_rid);
_mesh_instance_clear(mi);
mi->mesh->instances.erase(mi->I);
mi->I = nullptr;
@@ -8725,21 +8724,21 @@ bool RendererStorageRD::free(RID p_rid) {
} else if (multimesh_owner.owns(p_rid)) {
_update_dirty_multimeshes();
multimesh_allocate_data(p_rid, 0, RS::MULTIMESH_TRANSFORM_2D);
- MultiMesh *multimesh = multimesh_owner.getornull(p_rid);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_rid);
multimesh->dependency.deleted_notify(p_rid);
multimesh_owner.free(p_rid);
} else if (skeleton_owner.owns(p_rid)) {
_update_dirty_skeletons();
skeleton_allocate_data(p_rid, 0);
- Skeleton *skeleton = skeleton_owner.getornull(p_rid);
+ Skeleton *skeleton = skeleton_owner.get_or_null(p_rid);
skeleton->dependency.deleted_notify(p_rid);
skeleton_owner.free(p_rid);
} else if (reflection_probe_owner.owns(p_rid)) {
- ReflectionProbe *reflection_probe = reflection_probe_owner.getornull(p_rid);
+ ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_rid);
reflection_probe->dependency.deleted_notify(p_rid);
reflection_probe_owner.free(p_rid);
} else if (decal_owner.owns(p_rid)) {
- Decal *decal = decal_owner.getornull(p_rid);
+ Decal *decal = decal_owner.get_or_null(p_rid);
for (int i = 0; i < RS::DECAL_TEXTURE_MAX; i++) {
if (decal->textures[i].is_valid() && texture_owner.owns(decal->textures[i])) {
texture_remove_from_decal_atlas(decal->textures[i]);
@@ -8749,30 +8748,30 @@ bool RendererStorageRD::free(RID p_rid) {
decal_owner.free(p_rid);
} else if (voxel_gi_owner.owns(p_rid)) {
voxel_gi_allocate_data(p_rid, Transform3D(), AABB(), Vector3i(), Vector<uint8_t>(), Vector<uint8_t>(), Vector<uint8_t>(), Vector<int>()); //deallocate
- VoxelGI *voxel_gi = voxel_gi_owner.getornull(p_rid);
+ VoxelGI *voxel_gi = voxel_gi_owner.get_or_null(p_rid);
voxel_gi->dependency.deleted_notify(p_rid);
voxel_gi_owner.free(p_rid);
} else if (lightmap_owner.owns(p_rid)) {
lightmap_set_textures(p_rid, RID(), false);
- Lightmap *lightmap = lightmap_owner.getornull(p_rid);
+ Lightmap *lightmap = lightmap_owner.get_or_null(p_rid);
lightmap->dependency.deleted_notify(p_rid);
lightmap_owner.free(p_rid);
} else if (light_owner.owns(p_rid)) {
light_set_projector(p_rid, RID()); //clear projector
// delete the texture
- Light *light = light_owner.getornull(p_rid);
+ Light *light = light_owner.get_or_null(p_rid);
light->dependency.deleted_notify(p_rid);
light_owner.free(p_rid);
} else if (particles_owner.owns(p_rid)) {
update_particles();
- Particles *particles = particles_owner.getornull(p_rid);
+ Particles *particles = particles_owner.get_or_null(p_rid);
particles->dependency.deleted_notify(p_rid);
_particles_free_data(particles);
particles_owner.free(p_rid);
} else if (particles_collision_owner.owns(p_rid)) {
- ParticlesCollision *particles_collision = particles_collision_owner.getornull(p_rid);
+ ParticlesCollision *particles_collision = particles_collision_owner.get_or_null(p_rid);
if (particles_collision->heightfield_texture.is_valid()) {
RD::get_singleton()->free(particles_collision->heightfield_texture);
@@ -8780,18 +8779,18 @@ bool RendererStorageRD::free(RID p_rid) {
particles_collision->dependency.deleted_notify(p_rid);
particles_collision_owner.free(p_rid);
} else if (visibility_notifier_owner.owns(p_rid)) {
- VisibilityNotifier *vn = visibility_notifier_owner.getornull(p_rid);
+ VisibilityNotifier *vn = visibility_notifier_owner.get_or_null(p_rid);
vn->dependency.deleted_notify(p_rid);
visibility_notifier_owner.free(p_rid);
} else if (particles_collision_instance_owner.owns(p_rid)) {
particles_collision_instance_owner.free(p_rid);
} else if (render_target_owner.owns(p_rid)) {
- RenderTarget *rt = render_target_owner.getornull(p_rid);
+ RenderTarget *rt = render_target_owner.get_or_null(p_rid);
_clear_render_target(rt);
if (rt->texture.is_valid()) {
- Texture *tex = texture_owner.getornull(rt->texture);
+ Texture *tex = texture_owner.get_or_null(rt->texture);
tex->is_render_target = false;
free(rt->texture);
}
@@ -9398,6 +9397,8 @@ RendererStorageRD::RendererStorageRD() {
particles_shader.default_shader = shader_allocate();
shader_initialize(particles_shader.default_shader);
shader_set_code(particles_shader.default_shader, R"(
+// Default particles shader.
+
shader_type particles;
void process() {
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.h b/servers/rendering/renderer_rd/renderer_storage_rd.h
index 02395a884f..d56afcc448 100644
--- a/servers/rendering/renderer_rd/renderer_storage_rd.h
+++ b/servers/rendering/renderer_rd/renderer_storage_rd.h
@@ -621,7 +621,6 @@ private:
float color[4];
float custom[3];
float lifetime;
- uint32_t pad[3];
};
struct ParticlesFrameParams {
@@ -1351,7 +1350,7 @@ public:
if (p_texture.is_null()) {
return RID();
}
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
if (!tex) {
return RID();
@@ -1363,7 +1362,7 @@ public:
if (p_texture.is_null()) {
return Size2i();
}
- Texture *tex = texture_owner.getornull(p_texture);
+ Texture *tex = texture_owner.get_or_null(p_texture);
if (!tex) {
return Size2i();
@@ -1431,12 +1430,12 @@ public:
void material_set_data_request_function(ShaderType p_shader_type, MaterialDataRequestFunction p_function);
_FORCE_INLINE_ uint32_t material_get_shader_id(RID p_material) {
- Material *material = material_owner.getornull(p_material);
+ Material *material = material_owner.get_or_null(p_material);
return material->shader_id;
}
_FORCE_INLINE_ MaterialData *material_get_data(RID p_material, ShaderType p_shader_type) {
- Material *material = material_owner.getornull(p_material);
+ Material *material = material_owner.get_or_null(p_material);
if (!material || material->shader_type != p_shader_type) {
return nullptr;
} else {
@@ -1489,7 +1488,7 @@ public:
virtual void update_mesh_instances();
_FORCE_INLINE_ const RID *mesh_get_surface_count_and_materials(RID p_mesh, uint32_t &r_surface_count) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND_V(!mesh, nullptr);
r_surface_count = mesh->surface_count;
if (r_surface_count == 0) {
@@ -1506,7 +1505,7 @@ public:
}
_FORCE_INLINE_ void *mesh_get_surface(RID p_mesh, uint32_t p_surface_index) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND_V(!mesh, nullptr);
ERR_FAIL_UNSIGNED_INDEX_V(p_surface_index, mesh->surface_count, nullptr);
@@ -1514,7 +1513,7 @@ public:
}
_FORCE_INLINE_ RID mesh_get_shadow_mesh(RID p_mesh) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
ERR_FAIL_COND_V(!mesh, RID());
return mesh->shadow_mesh;
@@ -1600,7 +1599,7 @@ public:
}
_FORCE_INLINE_ void mesh_instance_surface_get_vertex_arrays_and_format(RID p_mesh_instance, uint32_t p_surface_index, uint32_t p_input_mask, RID &r_vertex_array_rd, RD::VertexFormatID &r_vertex_format) {
- MeshInstance *mi = mesh_instance_owner.getornull(p_mesh_instance);
+ MeshInstance *mi = mesh_instance_owner.get_or_null(p_mesh_instance);
ERR_FAIL_COND(!mi);
Mesh *mesh = mi->mesh;
ERR_FAIL_UNSIGNED_INDEX(p_surface_index, mesh->surface_count);
@@ -1641,7 +1640,7 @@ public:
}
_FORCE_INLINE_ uint32_t mesh_surface_get_render_pass_index(RID p_mesh, uint32_t p_surface_index, uint64_t p_render_pass, uint32_t *r_index) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
Mesh::Surface *s = mesh->surfaces[p_surface_index];
if (s->render_pass != p_render_pass) {
@@ -1654,7 +1653,7 @@ public:
}
_FORCE_INLINE_ uint32_t mesh_surface_get_multimesh_render_pass_index(RID p_mesh, uint32_t p_surface_index, uint64_t p_render_pass, uint32_t *r_index) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
Mesh::Surface *s = mesh->surfaces[p_surface_index];
if (s->multimesh_render_pass != p_render_pass) {
@@ -1667,7 +1666,7 @@ public:
}
_FORCE_INLINE_ uint32_t mesh_surface_get_particles_render_pass_index(RID p_mesh, uint32_t p_surface_index, uint64_t p_render_pass, uint32_t *r_index) {
- Mesh *mesh = mesh_owner.getornull(p_mesh);
+ Mesh *mesh = mesh_owner.get_or_null(p_mesh);
Mesh::Surface *s = mesh->surfaces[p_surface_index];
if (s->particles_render_pass != p_render_pass) {
@@ -1709,22 +1708,22 @@ public:
AABB multimesh_get_aabb(RID p_multimesh) const;
_FORCE_INLINE_ RS::MultimeshTransformFormat multimesh_get_transform_format(RID p_multimesh) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
return multimesh->xform_format;
}
_FORCE_INLINE_ bool multimesh_uses_colors(RID p_multimesh) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
return multimesh->uses_colors;
}
_FORCE_INLINE_ bool multimesh_uses_custom_data(RID p_multimesh) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
return multimesh->uses_custom_data;
}
_FORCE_INLINE_ uint32_t multimesh_get_instances_to_draw(RID p_multimesh) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
if (multimesh->visible_instances >= 0) {
return multimesh->visible_instances;
}
@@ -1732,7 +1731,7 @@ public:
}
_FORCE_INLINE_ RID multimesh_get_3d_uniform_set(RID p_multimesh, RID p_shader, uint32_t p_set) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
if (!multimesh->uniform_set_3d.is_valid()) {
Vector<RD::Uniform> uniforms;
RD::Uniform u;
@@ -1747,7 +1746,7 @@ public:
}
_FORCE_INLINE_ RID multimesh_get_2d_uniform_set(RID p_multimesh, RID p_shader, uint32_t p_set) const {
- MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
+ MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
if (!multimesh->uniform_set_2d.is_valid()) {
Vector<RD::Uniform> uniforms;
RD::Uniform u;
@@ -1776,11 +1775,11 @@ public:
Transform2D skeleton_bone_get_transform_2d(RID p_skeleton, int p_bone) const;
_FORCE_INLINE_ bool skeleton_is_valid(RID p_skeleton) {
- return skeleton_owner.getornull(p_skeleton) != nullptr;
+ return skeleton_owner.get_or_null(p_skeleton) != nullptr;
}
_FORCE_INLINE_ RID skeleton_get_3d_uniform_set(RID p_skeleton, RID p_shader, uint32_t p_set) const {
- Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
+ Skeleton *skeleton = skeleton_owner.get_or_null(p_skeleton);
ERR_FAIL_COND_V(!skeleton, RID());
ERR_FAIL_COND_V(skeleton->size == 0, RID());
if (skeleton->use_2d) {
@@ -1834,7 +1833,7 @@ public:
RS::LightOmniShadowMode light_omni_get_shadow_mode(RID p_light);
_FORCE_INLINE_ RS::LightType light_get_type(RID p_light) const {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, RS::LIGHT_DIRECTIONAL);
return light->type;
@@ -1842,70 +1841,70 @@ public:
AABB light_get_aabb(RID p_light) const;
_FORCE_INLINE_ float light_get_param(RID p_light, RS::LightParam p_param) {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, 0);
return light->param[p_param];
}
_FORCE_INLINE_ RID light_get_projector(RID p_light) {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, RID());
return light->projector;
}
_FORCE_INLINE_ Color light_get_color(RID p_light) {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, Color());
return light->color;
}
_FORCE_INLINE_ Color light_get_shadow_color(RID p_light) {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, Color());
return light->shadow_color;
}
_FORCE_INLINE_ uint32_t light_get_cull_mask(RID p_light) {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, 0);
return light->cull_mask;
}
_FORCE_INLINE_ bool light_has_shadow(RID p_light) const {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, RS::LIGHT_DIRECTIONAL);
return light->shadow;
}
_FORCE_INLINE_ bool light_has_projector(RID p_light) const {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, RS::LIGHT_DIRECTIONAL);
return texture_owner.owns(light->projector);
}
_FORCE_INLINE_ bool light_is_negative(RID p_light) const {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, RS::LIGHT_DIRECTIONAL);
return light->negative;
}
_FORCE_INLINE_ float light_get_transmittance_bias(RID p_light) const {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, 0.0);
return light->param[RS::LIGHT_PARAM_TRANSMITTANCE_BIAS];
}
_FORCE_INLINE_ float light_get_shadow_volumetric_fog_fade(RID p_light) const {
- const Light *light = light_owner.getornull(p_light);
+ const Light *light = light_owner.get_or_null(p_light);
ERR_FAIL_COND_V(!light, 0.0);
return light->param[RS::LIGHT_PARAM_SHADOW_VOLUMETRIC_FOG_FADE];
@@ -1972,62 +1971,62 @@ public:
virtual void decal_set_normal_fade(RID p_decal, float p_fade);
_FORCE_INLINE_ Vector3 decal_get_extents(RID p_decal) {
- const Decal *decal = decal_owner.getornull(p_decal);
+ const Decal *decal = decal_owner.get_or_null(p_decal);
return decal->extents;
}
_FORCE_INLINE_ RID decal_get_texture(RID p_decal, RS::DecalTexture p_texture) {
- const Decal *decal = decal_owner.getornull(p_decal);
+ const Decal *decal = decal_owner.get_or_null(p_decal);
return decal->textures[p_texture];
}
_FORCE_INLINE_ Color decal_get_modulate(RID p_decal) {
- const Decal *decal = decal_owner.getornull(p_decal);
+ const Decal *decal = decal_owner.get_or_null(p_decal);
return decal->modulate;
}
_FORCE_INLINE_ float decal_get_emission_energy(RID p_decal) {
- const Decal *decal = decal_owner.getornull(p_decal);
+ const Decal *decal = decal_owner.get_or_null(p_decal);
return decal->emission_energy;
}
_FORCE_INLINE_ float decal_get_albedo_mix(RID p_decal) {
- const Decal *decal = decal_owner.getornull(p_decal);
+ const Decal *decal = decal_owner.get_or_null(p_decal);
return decal->albedo_mix;
}
_FORCE_INLINE_ uint32_t decal_get_cull_mask(RID p_decal) {
- const Decal *decal = decal_owner.getornull(p_decal);
+ const Decal *decal = decal_owner.get_or_null(p_decal);
return decal->cull_mask;
}
_FORCE_INLINE_ float decal_get_upper_fade(RID p_decal) {
- const Decal *decal = decal_owner.getornull(p_decal);
+ const Decal *decal = decal_owner.get_or_null(p_decal);
return decal->upper_fade;
}
_FORCE_INLINE_ float decal_get_lower_fade(RID p_decal) {
- const Decal *decal = decal_owner.getornull(p_decal);
+ const Decal *decal = decal_owner.get_or_null(p_decal);
return decal->lower_fade;
}
_FORCE_INLINE_ float decal_get_normal_fade(RID p_decal) {
- const Decal *decal = decal_owner.getornull(p_decal);
+ const Decal *decal = decal_owner.get_or_null(p_decal);
return decal->normal_fade;
}
_FORCE_INLINE_ bool decal_is_distance_fade_enabled(RID p_decal) {
- const Decal *decal = decal_owner.getornull(p_decal);
+ const Decal *decal = decal_owner.get_or_null(p_decal);
return decal->distance_fade;
}
_FORCE_INLINE_ float decal_get_distance_fade_begin(RID p_decal) {
- const Decal *decal = decal_owner.getornull(p_decal);
+ const Decal *decal = decal_owner.get_or_null(p_decal);
return decal->distance_fade_begin;
}
_FORCE_INLINE_ float decal_get_distance_fade_length(RID p_decal) {
- const Decal *decal = decal_owner.getornull(p_decal);
+ const Decal *decal = decal_owner.get_or_null(p_decal);
return decal->distance_fade_length;
}
@@ -2102,18 +2101,18 @@ public:
return lightmap_probe_capture_update_speed;
}
_FORCE_INLINE_ RID lightmap_get_texture(RID p_lightmap) const {
- const Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ const Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
ERR_FAIL_COND_V(!lm, RID());
return lm->light_texture;
}
_FORCE_INLINE_ int32_t lightmap_get_array_index(RID p_lightmap) const {
ERR_FAIL_COND_V(!using_lightmap_array, -1); //only for arrays
- const Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ const Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
return lm->array_index;
}
_FORCE_INLINE_ bool lightmap_uses_spherical_harmonics(RID p_lightmap) const {
ERR_FAIL_COND_V(!using_lightmap_array, false); //only for arrays
- const Lightmap *lm = lightmap_owner.getornull(p_lightmap);
+ const Lightmap *lm = lightmap_owner.get_or_null(p_lightmap);
return lm->uses_spherical_harmonics;
}
_FORCE_INLINE_ uint64_t lightmap_array_get_version() const {
@@ -2182,13 +2181,13 @@ public:
virtual bool particles_is_inactive(RID p_particles) const;
_FORCE_INLINE_ RS::ParticlesMode particles_get_mode(RID p_particles) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND_V(!particles, RS::PARTICLES_MODE_2D);
return particles->mode;
}
_FORCE_INLINE_ uint32_t particles_get_amount(RID p_particles, uint32_t &r_trail_divisor) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND_V(!particles, 0);
if (particles->trails_enabled && particles->trail_bind_poses.size() > 1) {
@@ -2201,21 +2200,21 @@ public:
}
_FORCE_INLINE_ bool particles_has_collision(RID p_particles) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND_V(!particles, 0);
return particles->has_collision_cache;
}
_FORCE_INLINE_ uint32_t particles_is_using_local_coords(RID p_particles) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND_V(!particles, false);
return particles->use_local_coords;
}
_FORCE_INLINE_ RID particles_get_instance_buffer_uniform_set(RID p_particles, RID p_shader, uint32_t p_set) {
- Particles *particles = particles_owner.getornull(p_particles);
+ Particles *particles = particles_owner.get_or_null(p_particles);
ERR_FAIL_COND_V(!particles, RID());
if (particles->particles_transforms_buffer_uniform_set.is_null()) {
_particles_update_buffers(particles);
diff --git a/servers/rendering/renderer_rd/shader_compiler_rd.cpp b/servers/rendering/renderer_rd/shader_compiler_rd.cpp
index 8aa03b6426..b95d4b642c 100644
--- a/servers/rendering/renderer_rd/shader_compiler_rd.cpp
+++ b/servers/rendering/renderer_rd/shader_compiler_rd.cpp
@@ -213,7 +213,7 @@ static String _interpstr(SL::DataInterpolation p_interp) {
return "";
}
-static String _prestr(SL::DataPrecision p_pres) {
+static String _prestr(SL::DataPrecision p_pres, bool p_force_highp = false) {
switch (p_pres) {
case SL::PRECISION_LOWP:
return "lowp ";
@@ -222,7 +222,7 @@ static String _prestr(SL::DataPrecision p_pres) {
case SL::PRECISION_HIGHP:
return "highp ";
case SL::PRECISION_DEFAULT:
- return "";
+ return p_force_highp ? "highp " : "";
}
return "";
}
@@ -617,7 +617,7 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
//this is an integer to index the global table
ucode += _typestr(ShaderLanguage::TYPE_UINT);
} else {
- ucode += _prestr(uniform.precision);
+ ucode += _prestr(uniform.precision, ShaderLanguage::is_float_type(uniform.type));
ucode += _typestr(uniform.type);
}
@@ -742,7 +742,7 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
String vcode;
String interp_mode = _interpstr(varying.interpolation);
- vcode += _prestr(varying.precision);
+ vcode += _prestr(varying.precision, ShaderLanguage::is_float_type(varying.type));
vcode += _typestr(varying.type);
vcode += " " + _mkid(varying_name);
if (varying.array_size > 0) {
@@ -777,7 +777,7 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
const SL::ShaderNode::Constant &cnode = pnode->vconstants[i];
String gcode;
gcode += "const ";
- gcode += _prestr(cnode.precision);
+ gcode += _prestr(cnode.precision, ShaderLanguage::is_float_type(cnode.type));
if (cnode.type == SL::TYPE_STRUCT) {
gcode += _mkid(cnode.type_str);
} else {
@@ -1165,6 +1165,7 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
SL::VariableNode *vnode = (SL::VariableNode *)onode->arguments[0];
bool is_texture_func = false;
+ bool is_screen_texture = false;
if (onode->op == SL::OP_STRUCT) {
code += _mkid(vnode->name);
} else if (onode->op == SL::OP_CONSTRUCT) {
@@ -1197,6 +1198,7 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
const SL::VariableNode *varnode = static_cast<const SL::VariableNode *>(onode->arguments[i]);
StringName texture_uniform = varnode->name;
+ is_screen_texture = (texture_uniform == "SCREEN_TEXTURE");
String sampler_name;
@@ -1236,6 +1238,9 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
}
}
code += ")";
+ if (is_screen_texture && actions.apply_luminance_multiplier) {
+ code = "(" + code + " * vec4(vec3(sc_luminance_multiplier), 1.0))";
+ }
} break;
case SL::OP_INDEX: {
code += _dump_node_code(onode->arguments[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning);
diff --git a/servers/rendering/renderer_rd/shader_compiler_rd.h b/servers/rendering/renderer_rd/shader_compiler_rd.h
index 2da127ffa3..0fe9047967 100644
--- a/servers/rendering/renderer_rd/shader_compiler_rd.h
+++ b/servers/rendering/renderer_rd/shader_compiler_rd.h
@@ -95,6 +95,7 @@ public:
String global_buffer_array_variable;
String instance_uniform_index_variable;
uint32_t base_varying_index = 0;
+ bool apply_luminance_multiplier = false;
};
private:
diff --git a/servers/rendering/renderer_rd/shader_rd.cpp b/servers/rendering/renderer_rd/shader_rd.cpp
index 82efa1318c..ffaf65ec35 100644
--- a/servers/rendering/renderer_rd/shader_rd.cpp
+++ b/servers/rendering/renderer_rd/shader_rd.cpp
@@ -292,7 +292,7 @@ void ShaderRD::_compile_variant(uint32_t p_variant, Version *p_version) {
}
RS::ShaderNativeSourceCode ShaderRD::version_get_native_source_code(RID p_version) {
- Version *version = version_owner.getornull(p_version);
+ Version *version = version_owner.get_or_null(p_version);
RS::ShaderNativeSourceCode source_code;
ERR_FAIL_COND_V(!version, source_code);
@@ -524,7 +524,7 @@ void ShaderRD::_compile_version(Version *p_version) {
void ShaderRD::version_set_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_vertex_globals, const String &p_fragment_globals, const Vector<String> &p_custom_defines) {
ERR_FAIL_COND(is_compute);
- Version *version = version_owner.getornull(p_version);
+ Version *version = version_owner.get_or_null(p_version);
ERR_FAIL_COND(!version);
version->vertex_globals = p_vertex_globals.utf8();
version->fragment_globals = p_fragment_globals.utf8();
@@ -549,7 +549,7 @@ void ShaderRD::version_set_code(RID p_version, const Map<String, String> &p_code
void ShaderRD::version_set_compute_code(RID p_version, const Map<String, String> &p_code, const String &p_uniforms, const String &p_compute_globals, const Vector<String> &p_custom_defines) {
ERR_FAIL_COND(!is_compute);
- Version *version = version_owner.getornull(p_version);
+ Version *version = version_owner.get_or_null(p_version);
ERR_FAIL_COND(!version);
version->compute_globals = p_compute_globals.utf8();
@@ -573,7 +573,7 @@ void ShaderRD::version_set_compute_code(RID p_version, const Map<String, String>
}
bool ShaderRD::version_is_valid(RID p_version) {
- Version *version = version_owner.getornull(p_version);
+ Version *version = version_owner.get_or_null(p_version);
ERR_FAIL_COND_V(!version, false);
if (version->dirty) {
@@ -585,7 +585,7 @@ bool ShaderRD::version_is_valid(RID p_version) {
bool ShaderRD::version_free(RID p_version) {
if (version_owner.owns(p_version)) {
- Version *version = version_owner.getornull(p_version);
+ Version *version = version_owner.get_or_null(p_version);
_clear_version(version);
version_owner.free(p_version);
} else {
diff --git a/servers/rendering/renderer_rd/shader_rd.h b/servers/rendering/renderer_rd/shader_rd.h
index 529328f0ed..984b168659 100644
--- a/servers/rendering/renderer_rd/shader_rd.h
+++ b/servers/rendering/renderer_rd/shader_rd.h
@@ -141,7 +141,7 @@ public:
ERR_FAIL_INDEX_V(p_variant, variant_defines.size(), RID());
ERR_FAIL_COND_V(!variants_enabled[p_variant], RID());
- Version *version = version_owner.getornull(p_version);
+ Version *version = version_owner.get_or_null(p_version);
ERR_FAIL_COND_V(!version, RID());
if (version->dirty) {
diff --git a/servers/rendering/renderer_rd/shaders/blit.glsl b/servers/rendering/renderer_rd/shaders/blit.glsl
index 967da1e6e4..8051f96738 100644
--- a/servers/rendering/renderer_rd/shaders/blit.glsl
+++ b/servers/rendering/renderer_rd/shaders/blit.glsl
@@ -5,6 +5,7 @@
#VERSION_DEFINES
layout(push_constant, binding = 0, std140) uniform Pos {
+ vec4 src_rect;
vec4 dst_rect;
vec2 eye_center;
@@ -22,8 +23,8 @@ layout(location = 0) out vec2 uv;
void main() {
vec2 base_arr[4] = vec2[](vec2(0.0, 0.0), vec2(0.0, 1.0), vec2(1.0, 1.0), vec2(1.0, 0.0));
- uv = base_arr[gl_VertexIndex];
- vec2 vtx = data.dst_rect.xy + uv * data.dst_rect.zw;
+ uv = data.src_rect.xy + base_arr[gl_VertexIndex] * data.src_rect.zw;
+ vec2 vtx = data.dst_rect.xy + base_arr[gl_VertexIndex] * data.dst_rect.zw;
gl_Position = vec4(vtx * 2.0 - 1.0, 0.0, 1.0);
}
@@ -34,6 +35,7 @@ void main() {
#VERSION_DEFINES
layout(push_constant, binding = 0, std140) uniform Pos {
+ vec4 src_rect;
vec4 dst_rect;
vec2 eye_center;
diff --git a/servers/rendering/renderer_rd/shaders/blur_raster.glsl b/servers/rendering/renderer_rd/shaders/blur_raster.glsl
index 0789a4b396..f8b4e3f610 100644
--- a/servers/rendering/renderer_rd/shaders/blur_raster.glsl
+++ b/servers/rendering/renderer_rd/shaders/blur_raster.glsl
@@ -38,6 +38,8 @@ layout(set = 1, binding = 0) uniform sampler2D source_auto_exposure;
layout(location = 0) out vec4 frag_color;
void main() {
+ // We do not apply our color scale for our mobile renderer here, we'll leave our colors at half brightness and apply scale in the tonemap raster.
+
#ifdef MODE_MIPMAP
vec2 pix_size = blur.pixel_size;
diff --git a/servers/rendering/renderer_rd/shaders/bokeh_dof_raster.glsl b/servers/rendering/renderer_rd/shaders/bokeh_dof_raster.glsl
index 43a2a29616..a3b3938ee9 100644
--- a/servers/rendering/renderer_rd/shaders/bokeh_dof_raster.glsl
+++ b/servers/rendering/renderer_rd/shaders/bokeh_dof_raster.glsl
@@ -47,7 +47,7 @@ layout(set = 2, binding = 0) uniform sampler2D original_weight;
#endif
//DOF
-// Bokeh single pass implementation based on http://tuxedolabs.blogspot.com/2018/05/bokeh-depth-of-field-in-single-pass.html
+// Bokeh single pass implementation based on https://tuxedolabs.blogspot.com/2018/05/bokeh-depth-of-field-in-single-pass.html
#ifdef MODE_GEN_BLUR_SIZE
diff --git a/servers/rendering/renderer_rd/shaders/canvas.glsl b/servers/rendering/renderer_rd/shaders/canvas.glsl
index a443bcdcb8..2911e8b731 100644
--- a/servers/rendering/renderer_rd/shaders/canvas.glsl
+++ b/servers/rendering/renderer_rd/shaders/canvas.glsl
@@ -458,6 +458,14 @@ void light_blend_compute(uint light_base, vec4 light_color, inout vec3 color) {
#endif
+float msdf_median(float r, float g, float b, float a) {
+ return min(max(min(r, g), min(max(r, g), b)), a);
+}
+
+vec2 msdf_map(vec2 value, vec2 in_min, vec2 in_max, vec2 out_min, vec2 out_max) {
+ return out_min + (out_max - out_min) * (value - in_min) / (in_max - in_min);
+}
+
void main() {
vec4 color = color_interp;
vec2 uv = uv_interp;
@@ -485,7 +493,34 @@ void main() {
#endif
- color *= texture(sampler2D(color_texture, texture_sampler), uv);
+#ifndef USE_PRIMITIVE
+ if (bool(draw_data.flags & FLAGS_USE_MSDF)) {
+ float px_range = draw_data.ninepatch_margins.x;
+ float outline_thickness = draw_data.ninepatch_margins.y;
+ //float reserved1 = draw_data.ninepatch_margins.z;
+ //float reserved2 = draw_data.ninepatch_margins.w;
+
+ vec4 msdf_sample = texture(sampler2D(color_texture, texture_sampler), uv);
+ vec2 msdf_size = vec2(textureSize(sampler2D(color_texture, texture_sampler), 0));
+ vec2 dest_size = vec2(1.0) / fwidth(uv);
+ float px_size = max(0.5 * dot((vec2(px_range) / msdf_size), dest_size), 1.0);
+ float d = msdf_median(msdf_sample.r, msdf_sample.g, msdf_sample.b, msdf_sample.a) - 0.5;
+
+ if (outline_thickness > 0) {
+ float cr = clamp(outline_thickness, 0.0, px_range / 2) / px_range;
+ float a = clamp((d + cr) * px_size, 0.0, 1.0);
+ color.a = a * color.a;
+ } else {
+ float a = clamp(d * px_size + 0.5, 0.0, 1.0);
+ color.a = a * color.a;
+ }
+
+ } else {
+#else
+ {
+#endif
+ color *= texture(sampler2D(color_texture, texture_sampler), uv);
+ }
uint light_count = (draw_data.flags >> FLAGS_LIGHT_COUNT_SHIFT) & 0xF; //max 16 lights
bool using_light = light_count > 0 || canvas_data.directional_light_count > 0;
diff --git a/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl b/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl
index 451f9b0089..0cff505cae 100644
--- a/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/canvas_uniforms_inc.glsl
@@ -24,6 +24,8 @@
#define FLAGS_DEFAULT_NORMAL_MAP_USED (1 << 26)
#define FLAGS_DEFAULT_SPECULAR_MAP_USED (1 << 27)
+#define FLAGS_USE_MSDF (1 << 28)
+
#define SAMPLER_NEAREST_CLAMP 0
#define SAMPLER_LINEAR_CLAMP 1
#define SAMPLER_NEAREST_WITH_MIPMAPS_CLAMP 2
diff --git a/servers/rendering/renderer_rd/shaders/cluster_render.glsl b/servers/rendering/renderer_rd/shaders/cluster_render.glsl
index da7d189281..6d95722a57 100644
--- a/servers/rendering/renderer_rd/shaders/cluster_render.glsl
+++ b/servers/rendering/renderer_rd/shaders/cluster_render.glsl
@@ -117,7 +117,7 @@ void main() {
uint cluster_thread_group_index;
if (!gl_HelperInvocation) {
- //http://advances.realtimerendering.com/s2017/2017_Sig_Improved_Culling_final.pdf
+ //https://advances.realtimerendering.com/s2017/2017_Sig_Improved_Culling_final.pdf
uvec4 mask;
diff --git a/servers/rendering/renderer_rd/shaders/cube_to_dp.glsl b/servers/rendering/renderer_rd/shaders/cube_to_dp.glsl
index dfbce29119..69b895ed29 100644
--- a/servers/rendering/renderer_rd/shaders/cube_to_dp.glsl
+++ b/servers/rendering/renderer_rd/shaders/cube_to_dp.glsl
@@ -7,8 +7,7 @@
layout(push_constant, binding = 1, std430) uniform Params {
float z_far;
float z_near;
- bool z_flip;
- uint pad;
+ vec2 texel_size;
vec4 screen_rect;
}
params;
@@ -35,22 +34,23 @@ layout(set = 0, binding = 0) uniform samplerCube source_cube;
layout(push_constant, binding = 1, std430) uniform Params {
float z_far;
float z_near;
- bool z_flip;
- uint pad;
+ vec2 texel_size;
vec4 screen_rect;
}
params;
void main() {
vec2 uv = uv_interp;
+ vec2 texel_size = abs(params.texel_size);
- vec3 normal = vec3(uv * 2.0 - 1.0, 0.0);
+ uv = clamp(uv * (1.0 + 2.0 * texel_size) - texel_size, vec2(0.0), vec2(1.0));
- normal.z = 0.5 - 0.5 * ((normal.x * normal.x) + (normal.y * normal.y));
+ vec3 normal = vec3(uv * 2.0 - 1.0, 0.0);
+ normal.z = 0.5 * (1.0 - dot(normal.xy, normal.xy)); // z = 1/2 - 1/2 * (x^2 + y^2)
normal = normalize(normal);
normal.y = -normal.y; //needs to be flipped to match projection matrix
- if (!params.z_flip) {
+ if (params.texel_size.x >= 0.0) { // Sign is used to encode Z flip
normal.z = -normal.z;
}
diff --git a/servers/rendering/renderer_rd/shaders/cubemap_roughness_inc.glsl b/servers/rendering/renderer_rd/shaders/cubemap_roughness_inc.glsl
index 80c0ac4fb4..be12be5dec 100644
--- a/servers/rendering/renderer_rd/shaders/cubemap_roughness_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/cubemap_roughness_inc.glsl
@@ -69,13 +69,13 @@ vec3 ImportanceSampleGGX(vec2 Xi, float Roughness, vec3 N) {
return TangentX * H.x + TangentY * H.y + N * H.z;
}
-// http://graphicrants.blogspot.com.au/2013/08/specular-brdf-reference.html
+// https://graphicrants.blogspot.com.au/2013/08/specular-brdf-reference.html
float GGX(float NdotV, float a) {
float k = a / 2.0;
return NdotV / (NdotV * (1.0 - k) + k);
}
-// http://graphicrants.blogspot.com.au/2013/08/specular-brdf-reference.html
+// https://graphicrants.blogspot.com.au/2013/08/specular-brdf-reference.html
float G_Smith(float a, float nDotV, float nDotL) {
return GGX(nDotL, a * a) * GGX(nDotV, a * a);
}
diff --git a/servers/rendering/renderer_rd/shaders/decal_data_inc.glsl b/servers/rendering/renderer_rd/shaders/decal_data_inc.glsl
index ccaad13311..158096d3c7 100644
--- a/servers/rendering/renderer_rd/shaders/decal_data_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/decal_data_inc.glsl
@@ -1,18 +1,18 @@
struct DecalData {
- mat4 xform; //to decal transform
- vec3 inv_extents;
- float albedo_mix;
- vec4 albedo_rect;
- vec4 normal_rect;
- vec4 orm_rect;
- vec4 emission_rect;
- vec4 modulate;
- float emission_energy;
+ highp mat4 xform; //to decal transform
+ highp vec3 inv_extents;
+ mediump float albedo_mix;
+ highp vec4 albedo_rect;
+ highp vec4 normal_rect;
+ highp vec4 orm_rect;
+ highp vec4 emission_rect;
+ highp vec4 modulate;
+ mediump float emission_energy;
uint mask;
- float upper_fade;
- float lower_fade;
- mat3x4 normal_xform;
- vec3 normal;
- float normal_fade;
+ mediump float upper_fade;
+ mediump float lower_fade;
+ mediump mat3x4 normal_xform;
+ mediump vec3 normal;
+ mediump float normal_fade;
};
diff --git a/servers/rendering/renderer_rd/shaders/giprobe_write.glsl b/servers/rendering/renderer_rd/shaders/giprobe_write.glsl
index 5dc2d08a3b..25d87ca45d 100644
--- a/servers/rendering/renderer_rd/shaders/giprobe_write.glsl
+++ b/servers/rendering/renderer_rd/shaders/giprobe_write.glsl
@@ -202,12 +202,7 @@ void main() {
vec3 emission = vec3(ivec3(cell_data.data[cell_index].emission & 0x3FF, (cell_data.data[cell_index].emission >> 10) & 0x7FF, cell_data.data[cell_index].emission >> 21)) * params.emission_scale;
vec4 normal = unpackSnorm4x8(cell_data.data[cell_index].normal);
-#ifdef MODE_ANISOTROPIC
- vec3 accum[6] = vec3[](vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0));
- const vec3 accum_dirs[6] = vec3[](vec3(1.0, 0.0, 0.0), vec3(-1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), vec3(0.0, -1.0, 0.0), vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, -1.0));
-#else
vec3 accum = vec3(0.0);
-#endif
for (uint i = 0; i < params.light_count; i++) {
float attenuation;
@@ -242,77 +237,35 @@ void main() {
vec3 light = lights.data[i].color * albedo.rgb * attenuation * lights.data[i].energy;
-#ifdef MODE_ANISOTROPIC
- for (uint j = 0; j < 6; j++) {
- accum[j] += max(0.0, dot(accum_dir, -light_dir)) * light + emission;
- }
-#else
if (length(normal.xyz) > 0.2) {
accum += max(0.0, dot(normal.xyz, -light_dir)) * light + emission;
} else {
//all directions
accum += light + emission;
}
-#endif
}
-#ifdef MODE_ANISOTROPIC
-
- output.data[cell_index * 6 + 0] = vec4(accum[0], 0.0);
- output.data[cell_index * 6 + 1] = vec4(accum[1], 0.0);
- output.data[cell_index * 6 + 2] = vec4(accum[2], 0.0);
- output.data[cell_index * 6 + 3] = vec4(accum[3], 0.0);
- output.data[cell_index * 6 + 4] = vec4(accum[4], 0.0);
- output.data[cell_index * 6 + 5] = vec4(accum[5], 0.0);
-#else
output.data[cell_index] = vec4(accum, 0.0);
-#endif
-
#endif //MODE_COMPUTE_LIGHT
#ifdef MODE_UPDATE_MIPMAPS
{
-#ifdef MODE_ANISOTROPIC
- vec3 light_accum[6] = vec3[](vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0));
-#else
vec3 light_accum = vec3(0.0);
-#endif
float count = 0.0;
for (uint i = 0; i < 8; i++) {
uint child_index = cell_children.data[cell_index].children[i];
if (child_index == NO_CHILDREN) {
continue;
}
-#ifdef MODE_ANISOTROPIC
- light_accum[1] += output.data[child_index * 6 + 0].rgb;
- light_accum[2] += output.data[child_index * 6 + 1].rgb;
- light_accum[3] += output.data[child_index * 6 + 2].rgb;
- light_accum[4] += output.data[child_index * 6 + 3].rgb;
- light_accum[5] += output.data[child_index * 6 + 4].rgb;
- light_accum[6] += output.data[child_index * 6 + 5].rgb;
-
-#else
light_accum += output.data[child_index].rgb;
-#endif
-
count += 1.0;
}
float divisor = mix(8.0, count, params.propagation);
-#ifdef MODE_ANISOTROPIC
- output.data[cell_index * 6 + 0] = vec4(light_accum[0] / divisor, 0.0);
- output.data[cell_index * 6 + 1] = vec4(light_accum[1] / divisor, 0.0);
- output.data[cell_index * 6 + 2] = vec4(light_accum[2] / divisor, 0.0);
- output.data[cell_index * 6 + 3] = vec4(light_accum[3] / divisor, 0.0);
- output.data[cell_index * 6 + 4] = vec4(light_accum[4] / divisor, 0.0);
- output.data[cell_index * 6 + 5] = vec4(light_accum[5] / divisor, 0.0);
-
-#else
output.data[cell_index] = vec4(light_accum / divisor, 0.0);
-#endif
}
#endif
diff --git a/servers/rendering/renderer_rd/shaders/light_data_inc.glsl b/servers/rendering/renderer_rd/shaders/light_data_inc.glsl
index 9155216d7e..fdc7729338 100644
--- a/servers/rendering/renderer_rd/shaders/light_data_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/light_data_inc.glsl
@@ -4,28 +4,28 @@
struct LightData { //this structure needs to be as packed as possible
highp vec3 position;
- float inv_radius;
+ highp float inv_radius;
- vec3 direction;
- float size;
+ mediump vec3 direction;
+ highp float size;
- vec3 color;
- float attenuation;
+ mediump vec3 color;
+ mediump float attenuation;
- float cone_attenuation;
- float cone_angle;
- float specular_amount;
+ mediump float cone_attenuation;
+ mediump float cone_angle;
+ mediump float specular_amount;
bool shadow_enabled;
highp vec4 atlas_rect; // rect in the shadow atlas
highp mat4 shadow_matrix;
- float shadow_bias;
- float shadow_normal_bias;
- float transmittance_bias;
- float soft_shadow_size; // for spot, it's the size in uv coordinates of the light, for omni it's the span angle
- float soft_shadow_scale; // scales the shadow kernel for blurrier shadows
+ highp float shadow_bias;
+ highp float shadow_normal_bias;
+ highp float transmittance_bias;
+ highp float soft_shadow_size; // for spot, it's the size in uv coordinates of the light, for omni it's the span angle
+ highp float soft_shadow_scale; // scales the shadow kernel for blurrier shadows
uint mask;
- float shadow_volumetric_fog_fade;
+ mediump float shadow_volumetric_fog_fade;
uint bake_mode;
highp vec4 projector_rect; //projector rect in srgb decal atlas
};
@@ -35,53 +35,53 @@ struct LightData { //this structure needs to be as packed as possible
#define REFLECTION_AMBIENT_COLOR 2
struct ReflectionData {
- vec3 box_extents;
- float index;
- vec3 box_offset;
+ highp vec3 box_extents;
+ mediump float index;
+ highp vec3 box_offset;
uint mask;
- vec3 ambient; // ambient color
- float intensity;
+ mediump vec3 ambient; // ambient color
+ mediump float intensity;
bool exterior;
bool box_project;
uint ambient_mode;
uint pad;
//0-8 is intensity,8-9 is ambient, mode
- mat4 local_matrix; // up to here for spot and omni, rest is for directional
+ highp mat4 local_matrix; // up to here for spot and omni, rest is for directional
// notes: for ambientblend, use distance to edge to blend between already existing global environment
};
struct DirectionalLightData {
- vec3 direction;
- float energy;
- vec3 color;
- float size;
- float specular;
+ mediump vec3 direction;
+ mediump float energy;
+ mediump vec3 color;
+ mediump float size;
+ mediump float specular;
uint mask;
- float softshadow_angle;
- float soft_shadow_scale;
+ highp float softshadow_angle;
+ highp float soft_shadow_scale;
bool blend_splits;
bool shadow_enabled;
- float fade_from;
- float fade_to;
+ highp float fade_from;
+ highp float fade_to;
uvec2 pad;
uint bake_mode;
- float shadow_volumetric_fog_fade;
- vec4 shadow_bias;
- vec4 shadow_normal_bias;
- vec4 shadow_transmittance_bias;
+ mediump float shadow_volumetric_fog_fade;
+ highp vec4 shadow_bias;
+ highp vec4 shadow_normal_bias;
+ highp vec4 shadow_transmittance_bias;
highp vec4 shadow_z_range;
highp vec4 shadow_range_begin;
- vec4 shadow_split_offsets;
+ highp vec4 shadow_split_offsets;
highp mat4 shadow_matrix1;
highp mat4 shadow_matrix2;
highp mat4 shadow_matrix3;
highp mat4 shadow_matrix4;
- vec4 shadow_color1;
- vec4 shadow_color2;
- vec4 shadow_color3;
- vec4 shadow_color4;
- vec2 uv_scale1;
- vec2 uv_scale2;
- vec2 uv_scale3;
- vec2 uv_scale4;
+ mediump vec4 shadow_color1;
+ mediump vec4 shadow_color2;
+ mediump vec4 shadow_color3;
+ mediump vec4 shadow_color4;
+ highp vec2 uv_scale1;
+ highp vec2 uv_scale2;
+ highp vec2 uv_scale3;
+ highp vec2 uv_scale4;
};
diff --git a/servers/rendering/renderer_rd/shaders/luminance_reduce_raster_inc.glsl b/servers/rendering/renderer_rd/shaders/luminance_reduce_raster_inc.glsl
index ed389ffe56..3cde9923fa 100644
--- a/servers/rendering/renderer_rd/shaders/luminance_reduce_raster_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/luminance_reduce_raster_inc.glsl
@@ -6,6 +6,6 @@ layout(push_constant, binding = 1, std430) uniform PushConstant {
float exposure_adjust;
float min_luminance;
float max_luminance;
- float pad;
+ uint pad1;
}
settings;
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl
index 4f140dd10d..f0fb31a457 100644
--- a/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl
+++ b/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl
@@ -118,7 +118,7 @@ void main() {
mat3 world_normal_matrix;
if (bool(instances.data[instance_index].flags & INSTANCE_FLAGS_NON_UNIFORM_SCALE)) {
- world_normal_matrix = inverse(mat3(world_matrix));
+ world_normal_matrix = transpose(inverse(mat3(world_matrix)));
} else {
world_normal_matrix = mat3(world_matrix);
}
@@ -374,6 +374,9 @@ layout(constant_id = 9) const uint sc_directional_penumbra_shadow_samples = 4;
layout(constant_id = 10) const bool sc_decal_use_mipmaps = true;
layout(constant_id = 11) const bool sc_projector_use_mipmaps = true;
+// not used in clustered renderer but we share some code with the mobile renderer that requires this.
+const float sc_luminance_multiplier = 1.0;
+
#include "scene_forward_clustered_inc.glsl"
/* Varyings */
@@ -521,7 +524,7 @@ vec4 fog_process(vec3 vertex) {
}
}
- float fog_amount = 1.0 - exp(min(0.0, vertex.z * scene_data.fog_density));
+ float fog_amount = 1.0 - exp(min(0.0, -length(vertex) * scene_data.fog_density));
if (abs(scene_data.fog_height_density) > 0.001) {
float y = (scene_data.camera_matrix * vec4(vertex, 1.0)).y;
@@ -881,7 +884,7 @@ void main() {
#ifdef NORMAL_USED
if (scene_data.roughness_limiter_enabled) {
- //http://www.jp.square-enix.com/tech/library/pdf/ImprovedGeometricSpecularAA.pdf
+ //https://www.jp.square-enix.com/tech/library/pdf/ImprovedGeometricSpecularAA.pdf
float roughness2 = roughness * roughness;
vec3 dndu = dFdx(normal), dndv = dFdy(normal);
float variance = scene_data.roughness_limiter_amount * (dot(dndu, dndu) + dot(dndv, dndv));
@@ -900,6 +903,7 @@ void main() {
if (scene_data.use_reflection_cubemap) {
vec3 ref_vec = reflect(-view, normal);
+ float horizon = min(1.0 + dot(ref_vec, normal), 1.0);
ref_vec = scene_data.radiance_inverse_xform * ref_vec;
#ifdef USE_RADIANCE_CUBEMAP_ARRAY
@@ -912,7 +916,6 @@ void main() {
specular_light = textureLod(samplerCube(radiance_cubemap, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), ref_vec, roughness * MAX_ROUGHNESS_LOD).rgb;
#endif //USE_RADIANCE_CUBEMAP_ARRAY
- float horizon = min(1.0 + dot(ref_vec, normal), 1.0);
specular_light *= horizon * horizon;
specular_light *= scene_data.ambient_light_color_energy.a;
}
@@ -1601,7 +1604,7 @@ void main() {
continue; // Statically baked light and object uses lightmap, skip
}
- float shadow = light_process_omni_shadow(light_index, vertex, view);
+ float shadow = light_process_omni_shadow(light_index, vertex, normal);
shadow = blur_shadow(shadow);
@@ -1677,7 +1680,7 @@ void main() {
continue; // Statically baked light and object uses lightmap, skip
}
- float shadow = light_process_spot_shadow(light_index, vertex, view);
+ float shadow = light_process_spot_shadow(light_index, vertex, normal);
shadow = blur_shadow(shadow);
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl
index 4a41c66ef3..f3db4abe3b 100644
--- a/servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl
@@ -279,7 +279,7 @@ void light_compute(vec3 N, vec3 L, vec3 V, float A, vec3 light_color, float atte
}
#ifdef USE_SHADOW_TO_OPACITY
- alpha = min(alpha, clamp(1.0 - attenuation), 0.0, 1.0));
+ alpha = min(alpha, clamp(1.0 - attenuation, 0.0, 1.0));
#endif
#endif //defined(LIGHT_CODE_USED)
@@ -288,7 +288,7 @@ void light_compute(vec3 N, vec3 L, vec3 V, float A, vec3 light_color, float atte
#ifndef USE_NO_SHADOWS
// Interleaved Gradient Noise
-// http://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare
+// https://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare
float quick_hash(vec2 pos) {
const vec3 magic = vec3(0.06711056f, 0.00583715f, 52.9829189f);
return fract(magic.z * fract(dot(pos, magic.xy)));
@@ -320,7 +320,7 @@ float sample_directional_pcf_shadow(texture2D shadow, vec2 shadow_pixel_size, ve
return avg * (1.0 / float(sc_directional_soft_shadow_samples));
}
-float sample_pcf_shadow(texture2D shadow, vec2 shadow_pixel_size, vec4 coord) {
+float sample_pcf_shadow(texture2D shadow, vec2 shadow_pixel_size, vec3 coord) {
vec2 pos = coord.xy;
float depth = coord.z;
@@ -346,6 +346,49 @@ float sample_pcf_shadow(texture2D shadow, vec2 shadow_pixel_size, vec4 coord) {
return avg * (1.0 / float(sc_soft_shadow_samples));
}
+float sample_omni_pcf_shadow(texture2D shadow, float blur_scale, vec2 coord, vec4 uv_rect, vec2 flip_offset, float depth) {
+ //if only one sample is taken, take it from the center
+ if (sc_soft_shadow_samples == 1) {
+ vec2 pos = coord * 0.5 + 0.5;
+ pos = uv_rect.xy + pos * uv_rect.zw;
+ return textureProj(sampler2DShadow(shadow, shadow_sampler), vec4(pos, depth, 1.0));
+ }
+
+ mat2 disk_rotation;
+ {
+ float r = quick_hash(gl_FragCoord.xy) * 2.0 * M_PI;
+ float sr = sin(r);
+ float cr = cos(r);
+ disk_rotation = mat2(vec2(cr, -sr), vec2(sr, cr));
+ }
+
+ float avg = 0.0;
+ vec2 offset_scale = blur_scale * 2.0 * scene_data.shadow_atlas_pixel_size / uv_rect.zw;
+
+ for (uint i = 0; i < sc_soft_shadow_samples; i++) {
+ vec2 offset = offset_scale * (disk_rotation * scene_data.soft_shadow_kernel[i].xy);
+ vec2 sample_coord = coord + offset;
+
+ float sample_coord_length_sqaured = dot(sample_coord, sample_coord);
+ bool do_flip = sample_coord_length_sqaured > 1.0;
+
+ if (do_flip) {
+ float len = sqrt(sample_coord_length_sqaured);
+ sample_coord = sample_coord * (2.0 / len - 1.0);
+ }
+
+ sample_coord = sample_coord * 0.5 + 0.5;
+ sample_coord = uv_rect.xy + sample_coord * uv_rect.zw;
+
+ if (do_flip) {
+ sample_coord += flip_offset;
+ }
+ avg += textureProj(sampler2DShadow(shadow, shadow_sampler), vec4(sample_coord, depth, 1.0));
+ }
+
+ return avg * (1.0 / float(sc_soft_shadow_samples));
+}
+
float sample_directional_soft_shadow(texture2D shadow, vec3 pssm_coord, vec2 tex_scale) {
//find blocker
float blocker_count = 0.0;
@@ -403,15 +446,21 @@ float light_process_omni_shadow(uint idx, vec3 vertex, vec3 normal) {
#ifndef USE_NO_SHADOWS
if (omni_lights.data[idx].shadow_enabled) {
// there is a shadowmap
+ vec2 texel_size = scene_data.shadow_atlas_pixel_size;
+ vec4 base_uv_rect = omni_lights.data[idx].atlas_rect;
+ base_uv_rect.xy += texel_size;
+ base_uv_rect.zw -= texel_size * 2.0;
- vec3 light_rel_vec = omni_lights.data[idx].position - vertex;
- float light_length = length(light_rel_vec);
+ // Omni lights use direction.xy to store to store the offset between the two paraboloid regions
+ vec2 flip_offset = omni_lights.data[idx].direction.xy;
- vec4 v = vec4(vertex, 1.0);
+ vec3 local_vert = (omni_lights.data[idx].shadow_matrix * vec4(vertex, 1.0)).xyz;
- vec4 splane = (omni_lights.data[idx].shadow_matrix * v);
+ float shadow_len = length(local_vert); //need to remember shadow len from here
+ vec3 shadow_dir = normalize(local_vert);
- float shadow_len = length(splane.xyz); //need to remember shadow len from here
+ vec3 local_normal = normalize(mat3(omni_lights.data[idx].shadow_matrix) * normal);
+ vec3 normal_bias = local_normal * omni_lights.data[idx].shadow_normal_bias * (1.0 - abs(dot(local_normal, shadow_dir)));
float shadow;
@@ -431,10 +480,10 @@ float light_process_omni_shadow(uint idx, vec3 vertex, vec3 normal) {
disk_rotation = mat2(vec2(cr, -sr), vec2(sr, cr));
}
- vec3 normal = normalize(splane.xyz);
- vec3 v0 = abs(normal.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(0.0, 1.0, 0.0);
- vec3 tangent = normalize(cross(v0, normal));
- vec3 bitangent = normalize(cross(tangent, normal));
+ vec3 basis_normal = shadow_dir;
+ vec3 v0 = abs(basis_normal.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(0.0, 1.0, 0.0);
+ vec3 tangent = normalize(cross(v0, basis_normal));
+ vec3 bitangent = normalize(cross(tangent, basis_normal));
float z_norm = shadow_len * omni_lights.data[idx].inv_radius;
tangent *= omni_lights.data[idx].soft_shadow_size * omni_lights.data[idx].soft_shadow_scale;
@@ -443,18 +492,17 @@ float light_process_omni_shadow(uint idx, vec3 vertex, vec3 normal) {
for (uint i = 0; i < sc_penumbra_shadow_samples; i++) {
vec2 disk = disk_rotation * scene_data.penumbra_shadow_kernel[i].xy;
- vec3 pos = splane.xyz + tangent * disk.x + bitangent * disk.y;
+ vec3 pos = local_vert + tangent * disk.x + bitangent * disk.y;
pos = normalize(pos);
- vec4 uv_rect = omni_lights.data[idx].atlas_rect;
+
+ vec4 uv_rect = base_uv_rect;
if (pos.z >= 0.0) {
- pos.z += 1.0;
- uv_rect.y += uv_rect.w;
- } else {
- pos.z = 1.0 - pos.z;
+ uv_rect.xy += flip_offset;
}
+ pos.z = 1.0 + abs(pos.z);
pos.xy /= pos.z;
pos.xy = pos.xy * 0.5 + 0.5;
@@ -479,18 +527,18 @@ float light_process_omni_shadow(uint idx, vec3 vertex, vec3 normal) {
shadow = 0.0;
for (uint i = 0; i < sc_penumbra_shadow_samples; i++) {
vec2 disk = disk_rotation * scene_data.penumbra_shadow_kernel[i].xy;
- vec3 pos = splane.xyz + tangent * disk.x + bitangent * disk.y;
+ vec3 pos = local_vert + tangent * disk.x + bitangent * disk.y;
pos = normalize(pos);
- vec4 uv_rect = omni_lights.data[idx].atlas_rect;
+ pos = normalize(pos + normal_bias);
+
+ vec4 uv_rect = base_uv_rect;
if (pos.z >= 0.0) {
- pos.z += 1.0;
- uv_rect.y += uv_rect.w;
- } else {
- pos.z = 1.0 - pos.z;
+ uv_rect.xy += flip_offset;
}
+ pos.z = 1.0 + abs(pos.z);
pos.xy /= pos.z;
pos.xy = pos.xy * 0.5 + 0.5;
@@ -505,26 +553,19 @@ float light_process_omni_shadow(uint idx, vec3 vertex, vec3 normal) {
shadow = 1.0;
}
} else {
- splane.xyz = normalize(splane.xyz);
- vec4 clamp_rect = omni_lights.data[idx].atlas_rect;
-
- if (splane.z >= 0.0) {
- splane.z += 1.0;
+ vec4 uv_rect = base_uv_rect;
- clamp_rect.y += clamp_rect.w;
-
- } else {
- splane.z = 1.0 - splane.z;
+ vec3 shadow_sample = normalize(shadow_dir + normal_bias);
+ if (shadow_sample.z >= 0.0) {
+ uv_rect.xy += flip_offset;
+ flip_offset *= -1.0;
}
- splane.xy /= splane.z;
-
- splane.xy = splane.xy * 0.5 + 0.5;
- splane.z = shadow_len * omni_lights.data[idx].inv_radius;
- splane.z -= omni_lights.data[idx].shadow_bias;
- splane.xy = clamp_rect.xy + splane.xy * clamp_rect.zw;
- splane.w = 1.0; //needed? i think it should be 1 already
- shadow = sample_pcf_shadow(shadow_atlas, omni_lights.data[idx].soft_shadow_scale * scene_data.shadow_atlas_pixel_size, splane);
+ shadow_sample.z = 1.0 + abs(shadow_sample.z);
+ vec2 pos = shadow_sample.xy / shadow_sample.z;
+ float depth = shadow_len - omni_lights.data[idx].shadow_bias;
+ depth *= omni_lights.data[idx].inv_radius;
+ shadow = sample_omni_pcf_shadow(shadow_atlas, omni_lights.data[idx].soft_shadow_scale / shadow_sample.z, pos, uv_rect, flip_offset, depth);
}
return shadow;
@@ -608,13 +649,11 @@ void light_process_omni(uint idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 v
vec4 atlas_rect = omni_lights.data[idx].projector_rect;
if (local_v.z >= 0.0) {
- local_v.z += 1.0;
atlas_rect.y += atlas_rect.w;
-
- } else {
- local_v.z = 1.0 - local_v.z;
}
+ local_v.z = 1.0 + abs(local_v.z);
+
local_v.xy /= local_v.z;
local_v.xy = local_v.xy * 0.5 + 0.5;
vec2 proj_uv = local_v.xy * atlas_rect.zw;
@@ -694,15 +733,18 @@ float light_process_spot_shadow(uint idx, vec3 vertex, vec3 normal) {
vec3 light_rel_vec = spot_lights.data[idx].position - vertex;
float light_length = length(light_rel_vec);
vec3 spot_dir = spot_lights.data[idx].direction;
- //there is a shadowmap
- vec4 v = vec4(vertex, 1.0);
- float shadow;
+ vec3 shadow_dir = light_rel_vec / light_length;
+ vec3 normal_bias = normal * light_length * spot_lights.data[idx].shadow_normal_bias * (1.0 - abs(dot(normal, shadow_dir)));
+
+ //there is a shadowmap
+ vec4 v = vec4(vertex + normal_bias, 1.0);
vec4 splane = (spot_lights.data[idx].shadow_matrix * v);
+ splane.z -= spot_lights.data[idx].shadow_bias / (light_length * spot_lights.data[idx].inv_radius);
splane /= splane.w;
- splane.z -= spot_lights.data[idx].shadow_bias;
+ float shadow;
if (sc_use_light_soft_shadows && spot_lights.data[idx].soft_shadow_size > 0.0) {
//soft shadow
@@ -753,11 +795,9 @@ float light_process_spot_shadow(uint idx, vec3 vertex, vec3 normal) {
//no blockers found, so no shadow
shadow = 1.0;
}
-
} else {
//hard shadow
- vec4 shadow_uv = vec4(splane.xy * spot_lights.data[idx].atlas_rect.zw + spot_lights.data[idx].atlas_rect.xy, splane.z, 1.0);
-
+ vec3 shadow_uv = vec3(splane.xy * spot_lights.data[idx].atlas_rect.zw + spot_lights.data[idx].atlas_rect.xy, splane.z);
shadow = sample_pcf_shadow(shadow_atlas, spot_lights.data[idx].soft_shadow_scale * scene_data.shadow_atlas_pixel_size, shadow_uv);
}
@@ -929,7 +969,7 @@ void reflection_process(uint ref_index, vec3 vertex, vec3 normal, float roughnes
vec4 reflection;
- reflection.rgb = textureLod(samplerCubeArray(reflection_atlas, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), vec4(local_ref_vec, reflections.data[ref_index].index), roughness * MAX_ROUGHNESS_LOD).rgb;
+ reflection.rgb = textureLod(samplerCubeArray(reflection_atlas, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), vec4(local_ref_vec, reflections.data[ref_index].index), roughness * MAX_ROUGHNESS_LOD).rgb * sc_luminance_multiplier;
if (reflections.data[ref_index].exterior) {
reflection.rgb = mix(specular_light, reflection.rgb, blend);
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl
index 663100a0b3..750ec5f00a 100644
--- a/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl
+++ b/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl
@@ -92,7 +92,7 @@ layout(set = MATERIAL_UNIFORM_SET, binding = 0, std140) uniform MaterialUniforms
#ifdef MODE_DUAL_PARABOLOID
-layout(location = 8) out float dp_clip;
+layout(location = 8) out highp float dp_clip;
#endif
@@ -124,7 +124,7 @@ void main() {
mat3 world_normal_matrix;
if (bool(draw_call.flags & INSTANCE_FLAGS_NON_UNIFORM_SCALE)) {
- world_normal_matrix = inverse(mat3(world_matrix));
+ world_normal_matrix = transpose(inverse(mat3(world_matrix)));
} else {
world_normal_matrix = mat3(world_matrix);
}
@@ -370,11 +370,6 @@ void main() {
#VERSION_DEFINES
-//use medium precision for floats on mobile.
-
-precision mediump float;
-precision highp int;
-
/* Specialization Constants */
#if !defined(MODE_RENDER_DEPTH)
@@ -406,6 +401,8 @@ layout(constant_id = 14) const bool sc_disable_fog = false;
#endif //!MODE_RENDER_DEPTH
+layout(constant_id = 15) const float sc_luminance_multiplier = 2.0;
+
/* Include our forward mobile UBOs definitions etc. */
#include "scene_forward_mobile_inc.glsl"
@@ -498,7 +495,7 @@ layout(location = 0) out vec4 diffuse_buffer; //diffuse (rgb) and roughness
layout(location = 1) out vec4 specular_buffer; //specular and SSS (subsurface scatter)
#else
-layout(location = 0) out vec4 frag_color;
+layout(location = 0) out mediump vec4 frag_color;
#endif // MODE_MULTIPLE_RENDER_TARGETS
#endif // RENDER DEPTH
@@ -553,7 +550,7 @@ vec4 fog_process(vec3 vertex) {
}
}
- float fog_amount = 1.0 - exp(min(0.0, vertex.z * scene_data.fog_density));
+ float fog_amount = 1.0 - exp(min(0.0, -length(vertex) * scene_data.fog_density));
if (abs(scene_data.fog_height_density) > 0.001) {
float y = (scene_data.camera_matrix * vec4(vertex, 1.0)).y;
@@ -852,7 +849,7 @@ void main() {
#ifdef NORMAL_USED
if (scene_data.roughness_limiter_enabled) {
- //http://www.jp.square-enix.com/tech/library/pdf/ImprovedGeometricSpecularAA.pdf
+ //https://www.jp.square-enix.com/tech/library/pdf/ImprovedGeometricSpecularAA.pdf
float roughness2 = roughness * roughness;
vec3 dndu = dFdx(normal), dndv = dFdy(normal);
float variance = scene_data.roughness_limiter_amount * (dot(dndu, dndu) + dot(dndv, dndv));
@@ -871,6 +868,7 @@ void main() {
if (scene_data.use_reflection_cubemap) {
vec3 ref_vec = reflect(-view, normal);
+ float horizon = min(1.0 + dot(ref_vec, normal), 1.0);
ref_vec = scene_data.radiance_inverse_xform * ref_vec;
#ifdef USE_RADIANCE_CUBEMAP_ARRAY
@@ -883,7 +881,6 @@ void main() {
specular_light = textureLod(samplerCube(radiance_cubemap, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), ref_vec, roughness * MAX_ROUGHNESS_LOD).rgb;
#endif //USE_RADIANCE_CUBEMAP_ARRAY
- float horizon = min(1.0 + dot(ref_vec, normal), 1.0);
specular_light *= horizon * horizon;
specular_light *= scene_data.ambient_light_color_energy.a;
}
@@ -1392,7 +1389,7 @@ void main() {
break;
}
- float shadow = light_process_omni_shadow(light_index, vertex, view);
+ float shadow = light_process_omni_shadow(light_index, vertex, normal);
shadow = blur_shadow(shadow);
@@ -1440,7 +1437,7 @@ void main() {
break;
}
- float shadow = light_process_spot_shadow(light_index, vertex, view);
+ float shadow = light_process_spot_shadow(light_index, vertex, normal);
shadow = blur_shadow(shadow);
@@ -1556,12 +1553,15 @@ void main() {
frag_color = vec4(albedo, alpha);
#else // MODE_UNSHADED
frag_color = vec4(emission + ambient_light + diffuse_light + specular_light, alpha);
- //frag_color = vec4(1.0);
#endif // MODE_UNSHADED
// Draw "fixed" fog before volumetric fog to ensure volumetric fog can appear in front of the sky.
frag_color.rgb = mix(frag_color.rgb, fog.rgb, fog.a);
+ // On mobile we use a UNORM buffer with 10bpp which results in a range from 0.0 - 1.0 resulting in HDR breaking
+ // We divide by sc_luminance_multiplier to support a range from 0.0 - 2.0 both increasing precision on bright and darker images
+ frag_color.rgb = frag_color.rgb / sc_luminance_multiplier;
+
#endif //MODE_MULTIPLE_RENDER_TARGETS
#endif //MODE_RENDER_DEPTH
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_mobile_inc.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_mobile_inc.glsl
index f1e554d01c..dd8879acb4 100644
--- a/servers/rendering/renderer_rd/shaders/scene_forward_mobile_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/scene_forward_mobile_inc.glsl
@@ -93,7 +93,7 @@ directional_lights;
#define LIGHTMAP_FLAG_USE_SPECULAR_DIRECTION 2
struct Lightmap {
- mat3 normal_xform;
+ mediump mat3 normal_xform;
};
layout(set = 0, binding = 9, std140) restrict readonly buffer Lightmaps {
@@ -102,7 +102,7 @@ layout(set = 0, binding = 9, std140) restrict readonly buffer Lightmaps {
lightmaps;
struct LightmapCapture {
- vec4 sh[9];
+ mediump vec4 sh[9];
};
layout(set = 0, binding = 10, std140) restrict readonly buffer LightmapCaptures {
@@ -110,8 +110,8 @@ layout(set = 0, binding = 10, std140) restrict readonly buffer LightmapCaptures
}
lightmap_captures;
-layout(set = 0, binding = 11) uniform texture2D decal_atlas;
-layout(set = 0, binding = 12) uniform texture2D decal_atlas_srgb;
+layout(set = 0, binding = 11) uniform mediump texture2D decal_atlas;
+layout(set = 0, binding = 12) uniform mediump texture2D decal_atlas_srgb;
layout(set = 0, binding = 13, std430) restrict readonly buffer Decals {
DecalData data[];
@@ -119,7 +119,7 @@ layout(set = 0, binding = 13, std430) restrict readonly buffer Decals {
decals;
layout(set = 0, binding = 14, std430) restrict readonly buffer GlobalVariableData {
- vec4 data[];
+ highp vec4 data[];
}
global_variables;
@@ -135,56 +135,56 @@ layout(set = 1, binding = 0, std140) uniform SceneData {
highp mat4 projection_matrix_view[MAX_VIEWS];
highp mat4 inv_projection_matrix_view[MAX_VIEWS];
- vec2 viewport_size;
- vec2 screen_pixel_size;
+ highp vec2 viewport_size;
+ highp vec2 screen_pixel_size;
// Use vec4s because std140 doesn't play nice with vec2s, z and w are wasted.
- vec4 directional_penumbra_shadow_kernel[32];
- vec4 directional_soft_shadow_kernel[32];
- vec4 penumbra_shadow_kernel[32];
- vec4 soft_shadow_kernel[32];
+ highp vec4 directional_penumbra_shadow_kernel[32];
+ highp vec4 directional_soft_shadow_kernel[32];
+ highp vec4 penumbra_shadow_kernel[32];
+ highp vec4 soft_shadow_kernel[32];
- vec4 ambient_light_color_energy;
+ mediump vec4 ambient_light_color_energy;
- float ambient_color_sky_mix;
+ mediump float ambient_color_sky_mix;
bool use_ambient_light;
bool use_ambient_cubemap;
bool use_reflection_cubemap;
- mat3 radiance_inverse_xform;
+ mediump mat3 radiance_inverse_xform;
- vec2 shadow_atlas_pixel_size;
- vec2 directional_shadow_pixel_size;
+ highp vec2 shadow_atlas_pixel_size;
+ highp vec2 directional_shadow_pixel_size;
uint directional_light_count;
- float dual_paraboloid_side;
- float z_far;
- float z_near;
+ mediump float dual_paraboloid_side;
+ highp float z_far;
+ highp float z_near;
bool ssao_enabled;
- float ssao_light_affect;
- float ssao_ao_affect;
+ mediump float ssao_light_affect;
+ mediump float ssao_ao_affect;
bool roughness_limiter_enabled;
- float roughness_limiter_amount;
- float roughness_limiter_limit;
+ mediump float roughness_limiter_amount;
+ mediump float roughness_limiter_limit;
uvec2 roughness_limiter_pad;
- vec4 ao_color;
+ mediump vec4 ao_color;
bool fog_enabled;
- float fog_density;
- float fog_height;
- float fog_height_density;
+ highp float fog_density;
+ highp float fog_height;
+ highp float fog_height_density;
- vec3 fog_light_color;
- float fog_sun_scatter;
+ mediump vec3 fog_light_color;
+ mediump float fog_sun_scatter;
- float fog_aerial_perspective;
+ mediump float fog_aerial_perspective;
bool material_uv2_mode;
- float time;
- float reflection_multiplier; // one normally, zero when rendering reflections
+ highp float time;
+ mediump float reflection_multiplier; // one normally, zero when rendering reflections
bool pancake_shadows;
uint pad1;
@@ -195,30 +195,30 @@ scene_data;
#ifdef USE_RADIANCE_CUBEMAP_ARRAY
-layout(set = 1, binding = 2) uniform textureCubeArray radiance_cubemap;
+layout(set = 1, binding = 2) uniform mediump textureCubeArray radiance_cubemap;
#else
-layout(set = 1, binding = 2) uniform textureCube radiance_cubemap;
+layout(set = 1, binding = 2) uniform mediump textureCube radiance_cubemap;
#endif
-layout(set = 1, binding = 3) uniform textureCubeArray reflection_atlas;
+layout(set = 1, binding = 3) uniform mediump textureCubeArray reflection_atlas;
-layout(set = 1, binding = 4) uniform texture2D shadow_atlas;
+layout(set = 1, binding = 4) uniform highp texture2D shadow_atlas;
-layout(set = 1, binding = 5) uniform texture2D directional_shadow_atlas;
+layout(set = 1, binding = 5) uniform highp texture2D directional_shadow_atlas;
// this needs to change to providing just the lightmap we're using..
layout(set = 1, binding = 6) uniform texture2DArray lightmap_textures[MAX_LIGHTMAP_TEXTURES];
-layout(set = 1, binding = 9) uniform texture2D depth_buffer;
-layout(set = 1, binding = 10) uniform texture2D color_buffer;
+layout(set = 1, binding = 9) uniform highp texture2D depth_buffer;
+layout(set = 1, binding = 10) uniform mediump texture2D color_buffer;
/* Set 2 Skeleton & Instancing (can change per item) */
layout(set = 2, binding = 0, std430) restrict readonly buffer Transforms {
- vec4 data[];
+ highp vec4 data[];
}
transforms;
diff --git a/servers/rendering/renderer_rd/shaders/sdfgi_debug_probes.glsl b/servers/rendering/renderer_rd/shaders/sdfgi_debug_probes.glsl
index 0eacbc5363..4290d5b869 100644
--- a/servers/rendering/renderer_rd/shaders/sdfgi_debug_probes.glsl
+++ b/servers/rendering/renderer_rd/shaders/sdfgi_debug_probes.glsl
@@ -24,7 +24,7 @@ layout(push_constant, binding = 0, std430) uniform Params {
}
params;
-// http://in4k.untergrund.net/html_articles/hugi_27_-_coding_corner_polaris_sphere_tessellation_101.htm
+// https://in4k.untergrund.net/html_articles/hugi_27_-_coding_corner_polaris_sphere_tessellation_101.htm
vec3 get_sphere_vertex(uint p_vertex_id) {
float x_angle = float(p_vertex_id & 1u) + (p_vertex_id >> params.band_power);
diff --git a/servers/rendering/renderer_rd/shaders/sky.glsl b/servers/rendering/renderer_rd/shaders/sky.glsl
index 41c6325bc5..d07a454ade 100644
--- a/servers/rendering/renderer_rd/shaders/sky.glsl
+++ b/servers/rendering/renderer_rd/shaders/sky.glsl
@@ -17,6 +17,8 @@ layout(push_constant, binding = 1, std430) uniform Params {
vec4 projections[MAX_VIEWS];
vec4 position_multiplier;
float time;
+ float luminance_multiplier;
+ float pad[2];
}
params;
@@ -55,6 +57,8 @@ layout(push_constant, binding = 1, std430) uniform Params {
vec4 projections[MAX_VIEWS];
vec4 position_multiplier;
float time;
+ float luminance_multiplier;
+ float pad[2];
}
params;
@@ -199,17 +203,17 @@ void main() {
vec3 inverted_cube_normal = cube_normal;
inverted_cube_normal.z *= -1.0;
#ifdef USES_HALF_RES_COLOR
- half_res_color = texture(samplerCube(half_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), inverted_cube_normal);
+ half_res_color = texture(samplerCube(half_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), inverted_cube_normal) * params.luminance_multiplier;
#endif
#ifdef USES_QUARTER_RES_COLOR
- quarter_res_color = texture(samplerCube(quarter_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), inverted_cube_normal);
+ quarter_res_color = texture(samplerCube(quarter_res, material_samplers[SAMPLER_LINEAR_WITH_MIPMAPS_CLAMP]), inverted_cube_normal) * params.luminance_multiplier;
#endif
#else
#ifdef USES_HALF_RES_COLOR
- half_res_color = textureLod(sampler2D(half_res, material_samplers[SAMPLER_LINEAR_CLAMP]), uv, 0.0);
+ half_res_color = textureLod(sampler2D(half_res, material_samplers[SAMPLER_LINEAR_CLAMP]), uv, 0.0) * params.luminance_multiplier;
#endif
#ifdef USES_QUARTER_RES_COLOR
- quarter_res_color = textureLod(sampler2D(quarter_res, material_samplers[SAMPLER_LINEAR_CLAMP]), uv, 0.0);
+ quarter_res_color = textureLod(sampler2D(quarter_res, material_samplers[SAMPLER_LINEAR_CLAMP]), uv, 0.0) * params.luminance_multiplier;
#endif
#endif
@@ -246,4 +250,7 @@ void main() {
if (!AT_CUBEMAP_PASS && !AT_HALF_RES_PASS && !AT_QUARTER_RES_PASS) {
frag_color.a = 0.0;
}
+
+ // For mobile renderer we're dividing by 2.0 as we're using a UNORM buffer
+ frag_color.rgb = frag_color.rgb / params.luminance_multiplier;
}
diff --git a/servers/rendering/renderer_rd/shaders/tonemap.glsl b/servers/rendering/renderer_rd/shaders/tonemap.glsl
index 3c685c25b9..1ce3e04421 100644
--- a/servers/rendering/renderer_rd/shaders/tonemap.glsl
+++ b/servers/rendering/renderer_rd/shaders/tonemap.glsl
@@ -37,15 +37,15 @@ layout(location = 0) in vec2 uv_interp;
#ifdef SUBPASS
layout(input_attachment_index = 0, set = 0, binding = 0) uniform subpassInput input_color;
-#else
-#if MULTIVIEW
+#elif defined(MULTIVIEW)
layout(set = 0, binding = 0) uniform sampler2DArray source_color;
#else
layout(set = 0, binding = 0) uniform sampler2D source_color;
#endif
-#endif
+
layout(set = 1, binding = 0) uniform sampler2D source_auto_exposure;
layout(set = 2, binding = 0) uniform sampler2D source_glow;
+
#ifdef USE_1D_LUT
layout(set = 3, binding = 0) uniform sampler2D source_color_correction;
#else
@@ -71,7 +71,7 @@ layout(push_constant, binding = 1, std430) uniform Params {
float exposure;
float white;
float auto_exposure_grey;
- uint pad2;
+ float luminance_multiplier;
vec2 pixel_size;
bool use_fxaa;
@@ -169,16 +169,33 @@ vec3 tonemap_filmic(vec3 color, float white) {
return color_tonemapped / white_tonemapped;
}
+// Adapted from https://github.com/TheRealMJP/BakingLab/blob/master/BakingLab/ACES.hlsl
+// (MIT License).
vec3 tonemap_aces(vec3 color, float white) {
- const float exposure_bias = 0.85f;
- const float A = 2.51f * exposure_bias * exposure_bias;
- const float B = 0.03f * exposure_bias;
- const float C = 2.43f * exposure_bias * exposure_bias;
- const float D = 0.59f * exposure_bias;
- const float E = 0.14f;
-
- vec3 color_tonemapped = (color * (A * color + B)) / (color * (C * color + D) + E);
- float white_tonemapped = (white * (A * white + B)) / (white * (C * white + D) + E);
+ const float exposure_bias = 1.8f;
+ const float A = 0.0245786f;
+ const float B = 0.000090537f;
+ const float C = 0.983729f;
+ const float D = 0.432951f;
+ const float E = 0.238081f;
+
+ // Exposure bias baked into transform to save shader instructions. Equivalent to `color *= exposure_bias`
+ const mat3 rgb_to_rrt = mat3(
+ vec3(0.59719f * exposure_bias, 0.35458f * exposure_bias, 0.04823f * exposure_bias),
+ vec3(0.07600f * exposure_bias, 0.90834f * exposure_bias, 0.01566f * exposure_bias),
+ vec3(0.02840f * exposure_bias, 0.13383f * exposure_bias, 0.83777f * exposure_bias));
+
+ const mat3 odt_to_rgb = mat3(
+ vec3(1.60475f, -0.53108f, -0.07367f),
+ vec3(-0.10208f, 1.10813f, -0.00605f),
+ vec3(-0.00327f, -0.07276f, 1.07602f));
+
+ color *= rgb_to_rrt;
+ vec3 color_tonemapped = (color * (color + A) - B) / (color * (C * color + D) + E);
+ color_tonemapped *= odt_to_rgb;
+
+ white *= exposure_bias;
+ float white_tonemapped = (white * (white + A) - B) / (white * (C * white + D) + E);
return color_tonemapped / white_tonemapped;
}
@@ -200,15 +217,16 @@ vec3 linear_to_srgb(vec3 color) {
#define TONEMAPPER_ACES 3
vec3 apply_tonemapping(vec3 color, float white) { // inputs are LINEAR, always outputs clamped [0;1] color
-
+ // Ensure color values passed to tonemappers are positive.
+ // They can be negative in the case of negative lights, which leads to undesired behavior.
if (params.tonemapper == TONEMAPPER_LINEAR) {
return color;
} else if (params.tonemapper == TONEMAPPER_REINHARD) {
- return tonemap_reinhard(color, white);
+ return tonemap_reinhard(max(vec3(0.0f), color), white);
} else if (params.tonemapper == TONEMAPPER_FILMIC) {
- return tonemap_filmic(color, white);
+ return tonemap_filmic(max(vec3(0.0f), color), white);
} else { // TONEMAPPER_ACES
- return tonemap_aces(color, white);
+ return tonemap_aces(max(vec3(0.0f), color), white);
}
}
@@ -298,15 +316,15 @@ vec3 do_fxaa(vec3 color, float exposure, vec2 uv_interp) {
const float FXAA_SPAN_MAX = 8.0;
#ifdef MULTIVIEW
- vec3 rgbNW = textureLod(source_color, vec3(uv_interp + vec2(-1.0, -1.0) * params.pixel_size, ViewIndex), 0.0).xyz * exposure;
- vec3 rgbNE = textureLod(source_color, vec3(uv_interp + vec2(1.0, -1.0) * params.pixel_size, ViewIndex), 0.0).xyz * exposure;
- vec3 rgbSW = textureLod(source_color, vec3(uv_interp + vec2(-1.0, 1.0) * params.pixel_size, ViewIndex), 0.0).xyz * exposure;
- vec3 rgbSE = textureLod(source_color, vec3(uv_interp + vec2(1.0, 1.0) * params.pixel_size, ViewIndex), 0.0).xyz * exposure;
+ vec3 rgbNW = textureLod(source_color, vec3(uv_interp + vec2(-1.0, -1.0) * params.pixel_size, ViewIndex), 0.0).xyz * exposure * params.luminance_multiplier;
+ vec3 rgbNE = textureLod(source_color, vec3(uv_interp + vec2(1.0, -1.0) * params.pixel_size, ViewIndex), 0.0).xyz * exposure * params.luminance_multiplier;
+ vec3 rgbSW = textureLod(source_color, vec3(uv_interp + vec2(-1.0, 1.0) * params.pixel_size, ViewIndex), 0.0).xyz * exposure * params.luminance_multiplier;
+ vec3 rgbSE = textureLod(source_color, vec3(uv_interp + vec2(1.0, 1.0) * params.pixel_size, ViewIndex), 0.0).xyz * exposure * params.luminance_multiplier;
#else
- vec3 rgbNW = textureLod(source_color, uv_interp + vec2(-1.0, -1.0) * params.pixel_size, 0.0).xyz * exposure;
- vec3 rgbNE = textureLod(source_color, uv_interp + vec2(1.0, -1.0) * params.pixel_size, 0.0).xyz * exposure;
- vec3 rgbSW = textureLod(source_color, uv_interp + vec2(-1.0, 1.0) * params.pixel_size, 0.0).xyz * exposure;
- vec3 rgbSE = textureLod(source_color, uv_interp + vec2(1.0, 1.0) * params.pixel_size, 0.0).xyz * exposure;
+ vec3 rgbNW = textureLod(source_color, uv_interp + vec2(-1.0, -1.0) * params.pixel_size, 0.0).xyz * exposure * params.luminance_multiplier;
+ vec3 rgbNE = textureLod(source_color, uv_interp + vec2(1.0, -1.0) * params.pixel_size, 0.0).xyz * exposure * params.luminance_multiplier;
+ vec3 rgbSW = textureLod(source_color, uv_interp + vec2(-1.0, 1.0) * params.pixel_size, 0.0).xyz * exposure * params.luminance_multiplier;
+ vec3 rgbSE = textureLod(source_color, uv_interp + vec2(1.0, 1.0) * params.pixel_size, 0.0).xyz * exposure * params.luminance_multiplier;
#endif
vec3 rgbM = color;
vec3 luma = vec3(0.299, 0.587, 0.114);
@@ -333,11 +351,11 @@ vec3 do_fxaa(vec3 color, float exposure, vec2 uv_interp) {
params.pixel_size;
#ifdef MULTIVIEW
- vec3 rgbA = 0.5 * exposure * (textureLod(source_color, vec3(uv_interp + dir * (1.0 / 3.0 - 0.5), ViewIndex), 0.0).xyz + textureLod(source_color, vec3(uv_interp + dir * (2.0 / 3.0 - 0.5), ViewIndex), 0.0).xyz);
- vec3 rgbB = rgbA * 0.5 + 0.25 * exposure * (textureLod(source_color, vec3(uv_interp + dir * -0.5, ViewIndex), 0.0).xyz + textureLod(source_color, vec3(uv_interp + dir * 0.5, ViewIndex), 0.0).xyz);
+ vec3 rgbA = 0.5 * exposure * (textureLod(source_color, vec3(uv_interp + dir * (1.0 / 3.0 - 0.5), ViewIndex), 0.0).xyz + textureLod(source_color, vec3(uv_interp + dir * (2.0 / 3.0 - 0.5), ViewIndex), 0.0).xyz) * params.luminance_multiplier;
+ vec3 rgbB = rgbA * 0.5 + 0.25 * exposure * (textureLod(source_color, vec3(uv_interp + dir * -0.5, ViewIndex), 0.0).xyz + textureLod(source_color, vec3(uv_interp + dir * 0.5, ViewIndex), 0.0).xyz) * params.luminance_multiplier;
#else
- vec3 rgbA = 0.5 * exposure * (textureLod(source_color, uv_interp + dir * (1.0 / 3.0 - 0.5), 0.0).xyz + textureLod(source_color, uv_interp + dir * (2.0 / 3.0 - 0.5), 0.0).xyz);
- vec3 rgbB = rgbA * 0.5 + 0.25 * exposure * (textureLod(source_color, uv_interp + dir * -0.5, 0.0).xyz + textureLod(source_color, uv_interp + dir * 0.5, 0.0).xyz);
+ vec3 rgbA = 0.5 * exposure * (textureLod(source_color, uv_interp + dir * (1.0 / 3.0 - 0.5), 0.0).xyz + textureLod(source_color, uv_interp + dir * (2.0 / 3.0 - 0.5), 0.0).xyz) * params.luminance_multiplier;
+ vec3 rgbB = rgbA * 0.5 + 0.25 * exposure * (textureLod(source_color, uv_interp + dir * -0.5, 0.0).xyz + textureLod(source_color, uv_interp + dir * 0.5, 0.0).xyz) * params.luminance_multiplier;
#endif
float lumaB = dot(rgbB, luma);
@@ -349,7 +367,7 @@ vec3 do_fxaa(vec3 color, float exposure, vec2 uv_interp) {
}
#endif // !SUBPASS
-// From http://alex.vlachos.com/graphics/Alex_Vlachos_Advanced_VR_Rendering_GDC2015.pdf
+// From https://alex.vlachos.com/graphics/Alex_Vlachos_Advanced_VR_Rendering_GDC2015.pdf
// and https://www.shadertoy.com/view/MslGR8 (5th one starting from the bottom)
// NOTE: `frag_coord` is in pixels (i.e. not normalized UV).
vec3 screen_space_dither(vec2 frag_coord) {
@@ -364,11 +382,11 @@ vec3 screen_space_dither(vec2 frag_coord) {
void main() {
#ifdef SUBPASS
// SUBPASS and MULTIVIEW can be combined but in that case we're already reading from the correct layer
- vec3 color = subpassLoad(input_color).rgb;
-#elif MULTIVIEW
- vec3 color = textureLod(source_color, vec3(uv_interp, ViewIndex), 0.0f).rgb;
+ vec3 color = subpassLoad(input_color).rgb * params.luminance_multiplier;
+#elif defined(MULTIVIEW)
+ vec3 color = textureLod(source_color, vec3(uv_interp, ViewIndex), 0.0f).rgb * params.luminance_multiplier;
#else
- vec3 color = textureLod(source_color, uv_interp, 0.0f).rgb;
+ vec3 color = textureLod(source_color, uv_interp, 0.0f).rgb * params.luminance_multiplier;
#endif
// Exposure
@@ -377,7 +395,7 @@ void main() {
#ifndef SUBPASS
if (params.use_auto_exposure) {
- exposure *= 1.0 / (texelFetch(source_auto_exposure, ivec2(0, 0), 0).r / params.auto_exposure_grey);
+ exposure *= 1.0 / (texelFetch(source_auto_exposure, ivec2(0, 0), 0).r * params.luminance_multiplier / params.auto_exposure_grey);
}
#endif
@@ -386,7 +404,7 @@ void main() {
// Early Tonemap & SRGB Conversion
#ifndef SUBPASS
if (params.use_glow && params.glow_mode == GLOW_MODE_MIX) {
- vec3 glow = gather_glow(source_glow, uv_interp);
+ vec3 glow = gather_glow(source_glow, uv_interp) * params.luminance_multiplier;
color.rgb = mix(color.rgb, glow, params.glow_intensity);
}
@@ -401,9 +419,7 @@ void main() {
color += screen_space_dither(gl_FragCoord.xy);
}
- // Ensure color values passed to tonemappers are positive.
- // They can be negative in the case of negative lights, which leads to undesired behavior.
- color = apply_tonemapping(max(vec3(0.0), color), params.white);
+ color = apply_tonemapping(color, params.white);
color = linear_to_srgb(color); // regular linear -> SRGB conversion
@@ -411,7 +427,7 @@ void main() {
// Glow
if (params.use_glow && params.glow_mode != GLOW_MODE_MIX) {
- vec3 glow = gather_glow(source_glow, uv_interp) * params.glow_intensity;
+ vec3 glow = gather_glow(source_glow, uv_interp) * params.glow_intensity * params.luminance_multiplier;
// high dynamic range -> SRGB
glow = apply_tonemapping(glow, params.white);
diff --git a/servers/rendering/renderer_rd/shaders/voxel_gi.glsl b/servers/rendering/renderer_rd/shaders/voxel_gi.glsl
index 49a493cdc7..779f04ed35 100644
--- a/servers/rendering/renderer_rd/shaders/voxel_gi.glsl
+++ b/servers/rendering/renderer_rd/shaders/voxel_gi.glsl
@@ -71,11 +71,6 @@ lights;
layout(set = 0, binding = 5) uniform texture3D color_texture;
-#ifdef MODE_ANISOTROPIC
-layout(set = 0, binding = 7) uniform texture3D aniso_pos_texture;
-layout(set = 0, binding = 8) uniform texture3D aniso_neg_texture;
-#endif // MODE ANISOTROPIC
-
#endif // MODE_SECOND_BOUNCE
#ifndef MODE_DYNAMIC
@@ -110,13 +105,6 @@ layout(set = 0, binding = 10) uniform sampler texture_sampler;
layout(rgba8, set = 0, binding = 5) uniform restrict writeonly image3D color_tex;
-#ifdef MODE_ANISOTROPIC
-
-layout(r16ui, set = 0, binding = 6) uniform restrict writeonly uimage3D aniso_pos_tex;
-layout(r16ui, set = 0, binding = 7) uniform restrict writeonly uimage3D aniso_neg_tex;
-
-#endif
-
#endif
#ifdef MODE_DYNAMIC
@@ -170,13 +158,6 @@ layout(r32f, set = 0, binding = 8) uniform restrict writeonly image2D depth;
layout(rgba8, set = 0, binding = 11) uniform restrict image3D color_texture;
-#ifdef MODE_ANISOTROPIC
-
-layout(r16ui, set = 0, binding = 12) uniform restrict writeonly uimage3D aniso_pos_texture;
-layout(r16ui, set = 0, binding = 13) uniform restrict writeonly uimage3D aniso_neg_texture;
-
-#endif // MODE ANISOTROPIC
-
#endif //MODE_DYNAMIC_SHRINK_PLOT
#endif // MODE_DYNAMIC_SHRINK
@@ -374,12 +355,7 @@ void main() {
vec3 emission = vec3(uvec3(cell_data.data[cell_index].emission & 0x1ff, (cell_data.data[cell_index].emission >> 9) & 0x1ff, (cell_data.data[cell_index].emission >> 18) & 0x1ff)) * pow(2.0, float(cell_data.data[cell_index].emission >> 27) - 15.0 - 9.0);
vec3 normal = unpackSnorm4x8(cell_data.data[cell_index].normal).xyz;
-#ifdef MODE_ANISOTROPIC
- vec3 accum[6] = vec3[](vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0));
- const vec3 accum_dirs[6] = vec3[](vec3(1.0, 0.0, 0.0), vec3(-1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), vec3(0.0, -1.0, 0.0), vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, -1.0));
-#else
vec3 accum = vec3(0.0);
-#endif
for (uint i = 0; i < params.light_count; i++) {
vec3 light;
@@ -390,38 +366,16 @@ void main() {
light *= albedo.rgb;
-#ifdef MODE_ANISOTROPIC
- for (uint j = 0; j < 6; j++) {
- accum[j] += max(0.0, dot(accum_dirs[j], -light_dir)) * light;
- }
-#else
if (length(normal) > 0.2) {
accum += max(0.0, dot(normal, -light_dir)) * light;
} else {
//all directions
accum += light;
}
-#endif
}
-#ifdef MODE_ANISOTROPIC
-
- for (uint i = 0; i < 6; i++) {
- vec3 light = accum[i];
- if (length(normal) > 0.2) {
- light += max(0.0, dot(accum_dirs[i], -normal)) * emission;
- } else {
- light += emission;
- }
-
- outputs.data[cell_index * 6 + i] = vec4(light, 0.0);
- }
-
-#else
outputs.data[cell_index] = vec4(accum + emission, 0.0);
-#endif
-
#endif //MODE_COMPUTE_LIGHT
/////////////////SECOND BOUNCE///////////////////////////////
@@ -431,32 +385,8 @@ void main() {
ivec3 ipos = ivec3(posu);
vec4 normal = unpackSnorm4x8(cell_data.data[cell_index].normal);
-#ifdef MODE_ANISOTROPIC
- vec3 accum[6];
- const vec3 accum_dirs[6] = vec3[](vec3(1.0, 0.0, 0.0), vec3(-1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), vec3(0.0, -1.0, 0.0), vec3(0.0, 0.0, 1.0), vec3(0.0, 0.0, -1.0));
-
- /*vec3 src_color = texelFetch(sampler3D(color_texture,texture_sampler),ipos,0).rgb * params.dynamic_range;
- vec3 src_aniso_pos = texelFetch(sampler3D(aniso_pos_texture,texture_sampler),ipos,0).rgb;
- vec3 src_anisp_neg = texelFetch(sampler3D(anisp_neg_texture,texture_sampler),ipos,0).rgb;
- accum[0]=src_col * src_aniso_pos.x;
- accum[1]=src_col * src_aniso_neg.x;
- accum[2]=src_col * src_aniso_pos.y;
- accum[3]=src_col * src_aniso_neg.y;
- accum[4]=src_col * src_aniso_pos.z;
- accum[5]=src_col * src_aniso_neg.z;*/
-
- accum[0] = outputs.data[cell_index * 6 + 0].rgb;
- accum[1] = outputs.data[cell_index * 6 + 1].rgb;
- accum[2] = outputs.data[cell_index * 6 + 2].rgb;
- accum[3] = outputs.data[cell_index * 6 + 3].rgb;
- accum[4] = outputs.data[cell_index * 6 + 4].rgb;
- accum[5] = outputs.data[cell_index * 6 + 5].rgb;
-
-#else
vec3 accum = outputs.data[cell_index].rgb;
-#endif
-
if (length(normal.xyz) > 0.2) {
vec3 v0 = abs(normal.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(0.0, 1.0, 0.0);
vec3 tangent = normalize(cross(v0, normal.xyz));
@@ -484,9 +414,6 @@ void main() {
float max_distance = length(vec3(params.limits));
vec3 cell_size = 1.0 / vec3(params.limits);
-#ifdef MODE_ANISOTROPIC
- vec3 aniso_normal = mix(direction, normal.xyz, params.aniso_strength);
-#endif
while (dist < max_distance && color.a < 0.95) {
float diameter = max(1.0, 2.0 * tan_half_angle * dist);
vec3 uvw_pos = (pos + dist * direction) * cell_size;
@@ -498,42 +425,18 @@ void main() {
float log2_diameter = log2(diameter);
vec4 scolor = textureLod(sampler3D(color_texture, texture_sampler), uvw_pos, log2_diameter);
-#ifdef MODE_ANISOTROPIC
-
- vec3 aniso_neg = textureLod(sampler3D(aniso_neg_texture, texture_sampler), uvw_pos, log2_diameter).rgb;
- vec3 aniso_pos = textureLod(sampler3D(aniso_pos_texture, texture_sampler), uvw_pos, log2_diameter).rgb;
-
- scolor.rgb *= dot(max(vec3(0.0), (aniso_normal * aniso_pos)), vec3(1.0)) + dot(max(vec3(0.0), (-aniso_normal * aniso_neg)), vec3(1.0));
-#endif
float a = (1.0 - color.a);
color += a * scolor;
dist += half_diameter;
}
}
color *= cone_weights[i] * vec4(albedo.rgb, 1.0) * params.dynamic_range; //restore range
-#ifdef MODE_ANISOTROPIC
- for (uint j = 0; j < 6; j++) {
- accum[j] += max(0.0, dot(accum_dirs[j], direction)) * color.rgb;
- }
-#else
accum += color.rgb;
-#endif
}
}
-#ifdef MODE_ANISOTROPIC
-
- outputs.data[cell_index * 6 + 0] = vec4(accum[0], 0.0);
- outputs.data[cell_index * 6 + 1] = vec4(accum[1], 0.0);
- outputs.data[cell_index * 6 + 2] = vec4(accum[2], 0.0);
- outputs.data[cell_index * 6 + 3] = vec4(accum[3], 0.0);
- outputs.data[cell_index * 6 + 4] = vec4(accum[4], 0.0);
- outputs.data[cell_index * 6 + 5] = vec4(accum[5], 0.0);
-#else
outputs.data[cell_index] = vec4(accum, 0.0);
-#endif
-
#endif // MODE_SECOND_BOUNCE
/////////////////UPDATE MIPMAPS///////////////////////////////
@@ -541,45 +444,20 @@ void main() {
#ifdef MODE_UPDATE_MIPMAPS
{
-#ifdef MODE_ANISOTROPIC
- vec3 light_accum[6] = vec3[](vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0));
-#else
vec3 light_accum = vec3(0.0);
-#endif
float count = 0.0;
for (uint i = 0; i < 8; i++) {
uint child_index = cell_children.data[cell_index].children[i];
if (child_index == NO_CHILDREN) {
continue;
}
-#ifdef MODE_ANISOTROPIC
- light_accum[0] += outputs.data[child_index * 6 + 0].rgb;
- light_accum[1] += outputs.data[child_index * 6 + 1].rgb;
- light_accum[2] += outputs.data[child_index * 6 + 2].rgb;
- light_accum[3] += outputs.data[child_index * 6 + 3].rgb;
- light_accum[4] += outputs.data[child_index * 6 + 4].rgb;
- light_accum[5] += outputs.data[child_index * 6 + 5].rgb;
-
-#else
light_accum += outputs.data[child_index].rgb;
-#endif
-
count += 1.0;
}
float divisor = mix(8.0, count, params.propagation);
-#ifdef MODE_ANISOTROPIC
- outputs.data[cell_index * 6 + 0] = vec4(light_accum[0] / divisor, 0.0);
- outputs.data[cell_index * 6 + 1] = vec4(light_accum[1] / divisor, 0.0);
- outputs.data[cell_index * 6 + 2] = vec4(light_accum[2] / divisor, 0.0);
- outputs.data[cell_index * 6 + 3] = vec4(light_accum[3] / divisor, 0.0);
- outputs.data[cell_index * 6 + 4] = vec4(light_accum[4] / divisor, 0.0);
- outputs.data[cell_index * 6 + 5] = vec4(light_accum[5] / divisor, 0.0);
-
-#else
outputs.data[cell_index] = vec4(light_accum / divisor, 0.0);
-#endif
}
#endif
@@ -587,40 +465,7 @@ void main() {
#ifdef MODE_WRITE_TEXTURE
{
-#ifdef MODE_ANISOTROPIC
- vec3 accum_total = vec3(0.0);
- accum_total += outputs.data[cell_index * 6 + 0].rgb;
- accum_total += outputs.data[cell_index * 6 + 1].rgb;
- accum_total += outputs.data[cell_index * 6 + 2].rgb;
- accum_total += outputs.data[cell_index * 6 + 3].rgb;
- accum_total += outputs.data[cell_index * 6 + 4].rgb;
- accum_total += outputs.data[cell_index * 6 + 5].rgb;
-
- float accum_total_energy = max(dot(accum_total, GREY_VEC), 0.00001);
- vec3 iso_positive = vec3(dot(outputs.data[cell_index * 6 + 0].rgb, GREY_VEC), dot(outputs.data[cell_index * 6 + 2].rgb, GREY_VEC), dot(outputs.data[cell_index * 6 + 4].rgb, GREY_VEC)) / vec3(accum_total_energy);
- vec3 iso_negative = vec3(dot(outputs.data[cell_index * 6 + 1].rgb, GREY_VEC), dot(outputs.data[cell_index * 6 + 3].rgb, GREY_VEC), dot(outputs.data[cell_index * 6 + 5].rgb, GREY_VEC)) / vec3(accum_total_energy);
-
- {
- uint aniso_pos = uint(clamp(iso_positive.b * 31.0, 0.0, 31.0));
- aniso_pos |= uint(clamp(iso_positive.g * 63.0, 0.0, 63.0)) << 5;
- aniso_pos |= uint(clamp(iso_positive.r * 31.0, 0.0, 31.0)) << 11;
- imageStore(aniso_pos_tex, ivec3(posu), uvec4(aniso_pos));
- }
-
- {
- uint aniso_neg = uint(clamp(iso_negative.b * 31.0, 0.0, 31.0));
- aniso_neg |= uint(clamp(iso_negative.g * 63.0, 0.0, 63.0)) << 5;
- aniso_neg |= uint(clamp(iso_negative.r * 31.0, 0.0, 31.0)) << 11;
- imageStore(aniso_neg_tex, ivec3(posu), uvec4(aniso_neg));
- }
-
- imageStore(color_tex, ivec3(posu), vec4(accum_total / params.dynamic_range, albedo.a));
-
-#else
-
imageStore(color_tex, ivec3(posu), vec4(outputs.data[cell_index].rgb / params.dynamic_range, albedo.a));
-
-#endif
}
#endif
@@ -763,13 +608,6 @@ void main() {
color.rgb /= params.dynamic_range;
imageStore(color_texture, pos3d, color);
//imageStore(color_texture,pos3d,vec4(1,1,1,1));
-
-#ifdef MODE_ANISOTROPIC
- //do not care about anisotropy for dynamic objects, just store full lit in all directions
- imageStore(aniso_pos_texture, pos3d, uvec4(0xFFFF));
- imageStore(aniso_neg_texture, pos3d, uvec4(0xFFFF));
-
-#endif // ANISOTROPIC
}
#endif // MODE_DYNAMIC_SHRINK_PLOT
}
diff --git a/servers/rendering/renderer_rd/shaders/voxel_gi_debug.glsl b/servers/rendering/renderer_rd/shaders/voxel_gi_debug.glsl
index 7d4d72967a..281c496df3 100644
--- a/servers/rendering/renderer_rd/shaders/voxel_gi_debug.glsl
+++ b/servers/rendering/renderer_rd/shaders/voxel_gi_debug.glsl
@@ -20,11 +20,6 @@ layout(set = 0, binding = 2) uniform texture3D color_tex;
layout(set = 0, binding = 3) uniform sampler tex_sampler;
-#ifdef USE_ANISOTROPY
-layout(set = 0, binding = 4) uniform texture3D aniso_pos_tex;
-layout(set = 0, binding = 5) uniform texture3D aniso_neg_tex;
-#endif
-
layout(push_constant, binding = 0, std430) uniform Params {
mat4 projection;
uint cell_offset;
diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp
index 4a4976718c..705e72c13d 100644
--- a/servers/rendering/renderer_scene_cull.cpp
+++ b/servers/rendering/renderer_scene_cull.cpp
@@ -47,7 +47,7 @@ void RendererSceneCull::camera_initialize(RID p_rid) {
}
void RendererSceneCull::camera_set_perspective(RID p_camera, float p_fovy_degrees, float p_z_near, float p_z_far) {
- Camera *camera = camera_owner.getornull(p_camera);
+ Camera *camera = camera_owner.get_or_null(p_camera);
ERR_FAIL_COND(!camera);
camera->type = Camera::PERSPECTIVE;
camera->fov = p_fovy_degrees;
@@ -56,7 +56,7 @@ void RendererSceneCull::camera_set_perspective(RID p_camera, float p_fovy_degree
}
void RendererSceneCull::camera_set_orthogonal(RID p_camera, float p_size, float p_z_near, float p_z_far) {
- Camera *camera = camera_owner.getornull(p_camera);
+ Camera *camera = camera_owner.get_or_null(p_camera);
ERR_FAIL_COND(!camera);
camera->type = Camera::ORTHOGONAL;
camera->size = p_size;
@@ -65,7 +65,7 @@ void RendererSceneCull::camera_set_orthogonal(RID p_camera, float p_size, float
}
void RendererSceneCull::camera_set_frustum(RID p_camera, float p_size, Vector2 p_offset, float p_z_near, float p_z_far) {
- Camera *camera = camera_owner.getornull(p_camera);
+ Camera *camera = camera_owner.get_or_null(p_camera);
ERR_FAIL_COND(!camera);
camera->type = Camera::FRUSTUM;
camera->size = p_size;
@@ -75,32 +75,32 @@ void RendererSceneCull::camera_set_frustum(RID p_camera, float p_size, Vector2 p
}
void RendererSceneCull::camera_set_transform(RID p_camera, const Transform3D &p_transform) {
- Camera *camera = camera_owner.getornull(p_camera);
+ Camera *camera = camera_owner.get_or_null(p_camera);
ERR_FAIL_COND(!camera);
camera->transform = p_transform.orthonormalized();
}
void RendererSceneCull::camera_set_cull_mask(RID p_camera, uint32_t p_layers) {
- Camera *camera = camera_owner.getornull(p_camera);
+ Camera *camera = camera_owner.get_or_null(p_camera);
ERR_FAIL_COND(!camera);
camera->visible_layers = p_layers;
}
void RendererSceneCull::camera_set_environment(RID p_camera, RID p_env) {
- Camera *camera = camera_owner.getornull(p_camera);
+ Camera *camera = camera_owner.get_or_null(p_camera);
ERR_FAIL_COND(!camera);
camera->env = p_env;
}
void RendererSceneCull::camera_set_camera_effects(RID p_camera, RID p_fx) {
- Camera *camera = camera_owner.getornull(p_camera);
+ Camera *camera = camera_owner.get_or_null(p_camera);
ERR_FAIL_COND(!camera);
camera->effects = p_fx;
}
void RendererSceneCull::camera_set_use_vertical_aspect(RID p_camera, bool p_enable) {
- Camera *camera = camera_owner.getornull(p_camera);
+ Camera *camera = camera_owner.get_or_null(p_camera);
ERR_FAIL_COND(!camera);
camera->vaspect = p_enable;
}
@@ -354,7 +354,7 @@ RID RendererSceneCull::scenario_allocate() {
void RendererSceneCull::scenario_initialize(RID p_rid) {
scenario_owner.initialize_rid(p_rid);
- Scenario *scenario = scenario_owner.getornull(p_rid);
+ Scenario *scenario = scenario_owner.get_or_null(p_rid);
scenario->self = p_rid;
scenario->reflection_probe_shadow_atlas = scene_render->shadow_atlas_create();
@@ -373,25 +373,25 @@ void RendererSceneCull::scenario_initialize(RID p_rid) {
}
void RendererSceneCull::scenario_set_environment(RID p_scenario, RID p_environment) {
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
ERR_FAIL_COND(!scenario);
scenario->environment = p_environment;
}
void RendererSceneCull::scenario_set_camera_effects(RID p_scenario, RID p_camera_effects) {
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
ERR_FAIL_COND(!scenario);
scenario->camera_effects = p_camera_effects;
}
void RendererSceneCull::scenario_set_fallback_environment(RID p_scenario, RID p_environment) {
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
ERR_FAIL_COND(!scenario);
scenario->fallback_environment = p_environment;
}
void RendererSceneCull::scenario_set_reflection_atlas_size(RID p_scenario, int p_reflection_size, int p_reflection_count) {
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
ERR_FAIL_COND(!scenario);
scene_render->reflection_atlas_set_size(scenario->reflection_atlas, p_reflection_size, p_reflection_count);
}
@@ -401,13 +401,13 @@ bool RendererSceneCull::is_scenario(RID p_scenario) const {
}
RID RendererSceneCull::scenario_get_environment(RID p_scenario) {
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
ERR_FAIL_COND_V(!scenario, RID());
return scenario->environment;
}
void RendererSceneCull::scenario_remove_viewport_visibility_mask(RID p_scenario, RID p_viewport) {
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
ERR_FAIL_COND(!scenario);
if (!scenario->viewport_visibility_masks.has(p_viewport)) {
return;
@@ -419,7 +419,7 @@ void RendererSceneCull::scenario_remove_viewport_visibility_mask(RID p_scenario,
}
void RendererSceneCull::scenario_add_viewport_visibility_mask(RID p_scenario, RID p_viewport) {
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
ERR_FAIL_COND(!scenario);
ERR_FAIL_COND(scenario->viewport_visibility_masks.has(p_viewport));
@@ -459,7 +459,7 @@ RID RendererSceneCull::instance_allocate() {
}
void RendererSceneCull::instance_initialize(RID p_rid) {
instance_owner.initialize_rid(p_rid);
- Instance *instance = instance_owner.getornull(p_rid);
+ Instance *instance = instance_owner.get_or_null(p_rid);
instance->self = p_rid;
}
@@ -493,7 +493,7 @@ void RendererSceneCull::_instance_update_mesh_instance(Instance *p_instance) {
}
void RendererSceneCull::instance_set_base(RID p_instance, RID p_base) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
Scenario *scenario = instance->scenario;
@@ -710,7 +710,7 @@ void RendererSceneCull::instance_set_base(RID p_instance, RID p_base) {
}
void RendererSceneCull::instance_set_scenario(RID p_instance, RID p_scenario) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
if (instance->scenario) {
@@ -772,7 +772,7 @@ void RendererSceneCull::instance_set_scenario(RID p_instance, RID p_scenario) {
}
if (p_scenario.is_valid()) {
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
ERR_FAIL_COND(!scenario);
instance->scenario = scenario;
@@ -805,7 +805,7 @@ void RendererSceneCull::instance_set_scenario(RID p_instance, RID p_scenario) {
}
void RendererSceneCull::instance_set_layer_mask(RID p_instance, uint32_t p_mask) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
instance->layer_mask = p_mask;
@@ -820,7 +820,7 @@ void RendererSceneCull::instance_set_layer_mask(RID p_instance, uint32_t p_mask)
}
void RendererSceneCull::instance_set_transform(RID p_instance, const Transform3D &p_transform) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
if (instance->transform == p_transform) {
@@ -845,14 +845,14 @@ void RendererSceneCull::instance_set_transform(RID p_instance, const Transform3D
}
void RendererSceneCull::instance_attach_object_instance_id(RID p_instance, ObjectID p_id) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
instance->object_id = p_id;
}
void RendererSceneCull::instance_set_blend_shape_weight(RID p_instance, int p_shape, float p_weight) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
if (instance->update_item.in_list()) {
@@ -865,7 +865,7 @@ void RendererSceneCull::instance_set_blend_shape_weight(RID p_instance, int p_sh
}
void RendererSceneCull::instance_set_surface_override_material(RID p_instance, int p_surface, RID p_material) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
if (instance->base_type == RS::INSTANCE_MESH) {
@@ -881,7 +881,7 @@ void RendererSceneCull::instance_set_surface_override_material(RID p_instance, i
}
void RendererSceneCull::instance_set_visible(RID p_instance, bool p_visible) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
if (instance->visible == p_visible) {
@@ -926,7 +926,7 @@ inline bool is_geometry_instance(RenderingServer::InstanceType p_type) {
}
void RendererSceneCull::instance_set_custom_aabb(RID p_instance, AABB p_aabb) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
ERR_FAIL_COND(!is_geometry_instance(instance->base_type));
@@ -951,7 +951,7 @@ void RendererSceneCull::instance_set_custom_aabb(RID p_instance, AABB p_aabb) {
}
void RendererSceneCull::instance_attach_skeleton(RID p_instance, RID p_skeleton) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
if (instance->skeleton == p_skeleton) {
@@ -976,7 +976,7 @@ void RendererSceneCull::instance_attach_skeleton(RID p_instance, RID p_skeleton)
}
void RendererSceneCull::instance_set_extra_visibility_margin(RID p_instance, real_t p_margin) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
instance->extra_margin = p_margin;
@@ -985,7 +985,7 @@ void RendererSceneCull::instance_set_extra_visibility_margin(RID p_instance, rea
Vector<ObjectID> RendererSceneCull::instances_cull_aabb(const AABB &p_aabb, RID p_scenario) const {
Vector<ObjectID> instances;
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
ERR_FAIL_COND_V(!scenario, instances);
const_cast<RendererSceneCull *>(this)->update_dirty_instances(); // check dirty instances before culling
@@ -1009,7 +1009,7 @@ Vector<ObjectID> RendererSceneCull::instances_cull_aabb(const AABB &p_aabb, RID
Vector<ObjectID> RendererSceneCull::instances_cull_ray(const Vector3 &p_from, const Vector3 &p_to, RID p_scenario) const {
Vector<ObjectID> instances;
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
ERR_FAIL_COND_V(!scenario, instances);
const_cast<RendererSceneCull *>(this)->update_dirty_instances(); // check dirty instances before culling
@@ -1032,7 +1032,7 @@ Vector<ObjectID> RendererSceneCull::instances_cull_ray(const Vector3 &p_from, co
Vector<ObjectID> RendererSceneCull::instances_cull_convex(const Vector<Plane> &p_convex, RID p_scenario) const {
Vector<ObjectID> instances;
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
ERR_FAIL_COND_V(!scenario, instances);
const_cast<RendererSceneCull *>(this)->update_dirty_instances(); // check dirty instances before culling
@@ -1056,7 +1056,7 @@ Vector<ObjectID> RendererSceneCull::instances_cull_convex(const Vector<Plane> &p
}
void RendererSceneCull::instance_geometry_set_flag(RID p_instance, RS::InstanceFlags p_flags, bool p_enabled) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
//ERR_FAIL_COND(((1 << instance->base_type) & RS::INSTANCE_GEOMETRY_MASK));
@@ -1131,7 +1131,7 @@ void RendererSceneCull::instance_geometry_set_flag(RID p_instance, RS::InstanceF
}
void RendererSceneCull::instance_geometry_set_cast_shadows_setting(RID p_instance, RS::ShadowCastingSetting p_shadow_casting_setting) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
instance->cast_shadows = p_shadow_casting_setting;
@@ -1161,7 +1161,7 @@ void RendererSceneCull::instance_geometry_set_cast_shadows_setting(RID p_instanc
}
void RendererSceneCull::instance_geometry_set_material_override(RID p_instance, RID p_material) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
instance->material_override = p_material;
@@ -1174,7 +1174,7 @@ void RendererSceneCull::instance_geometry_set_material_override(RID p_instance,
}
void RendererSceneCull::instance_geometry_set_visibility_range(RID p_instance, float p_min, float p_max, float p_min_margin, float p_max_margin) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
instance->visibility_range_begin = p_min;
@@ -1194,7 +1194,7 @@ void RendererSceneCull::instance_geometry_set_visibility_range(RID p_instance, f
}
void RendererSceneCull::instance_set_visibility_parent(RID p_instance, RID p_parent_instance) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
Instance *old_parent = instance->visibility_parent;
@@ -1207,7 +1207,7 @@ void RendererSceneCull::instance_set_visibility_parent(RID p_instance, RID p_par
instance->visibility_parent = nullptr;
}
- Instance *parent = instance_owner.getornull(p_parent_instance);
+ Instance *parent = instance_owner.get_or_null(p_parent_instance);
ERR_FAIL_COND(p_parent_instance.is_valid() && !parent);
if (parent) {
@@ -1286,7 +1286,7 @@ void RendererSceneCull::_update_instance_visibility_dependencies(Instance *p_ins
vd.range_end = p_instance->visibility_range_end;
vd.range_begin_margin = p_instance->visibility_range_begin_margin;
vd.range_end_margin = p_instance->visibility_range_end_margin;
- vd.position = p_instance->transformed_aabb.get_position() + p_instance->transformed_aabb.get_size() / 2.0f;
+ vd.position = p_instance->transformed_aabb.get_center();
vd.array_index = p_instance->array_index;
InstanceGeometryData *geom_data = static_cast<InstanceGeometryData *>(p_instance->base_data);
@@ -1312,7 +1312,7 @@ void RendererSceneCull::_update_instance_visibility_dependencies(Instance *p_ins
}
void RendererSceneCull::instance_geometry_set_lightmap(RID p_instance, RID p_lightmap, const Rect2 &p_lightmap_uv_scale, int p_slice_index) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
if (instance->lightmap) {
@@ -1321,7 +1321,7 @@ void RendererSceneCull::instance_geometry_set_lightmap(RID p_instance, RID p_lig
instance->lightmap = nullptr;
}
- Instance *lightmap_instance = instance_owner.getornull(p_lightmap);
+ Instance *lightmap_instance = instance_owner.get_or_null(p_lightmap);
instance->lightmap = lightmap_instance;
instance->lightmap_uv_scale = p_lightmap_uv_scale;
@@ -1342,7 +1342,7 @@ void RendererSceneCull::instance_geometry_set_lightmap(RID p_instance, RID p_lig
}
void RendererSceneCull::instance_geometry_set_lod_bias(RID p_instance, float p_lod_bias) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
instance->lod_bias = p_lod_bias;
@@ -1354,7 +1354,7 @@ void RendererSceneCull::instance_geometry_set_lod_bias(RID p_instance, float p_l
}
void RendererSceneCull::instance_geometry_set_shader_parameter(RID p_instance, const StringName &p_parameter, const Variant &p_value) {
- Instance *instance = instance_owner.getornull(p_instance);
+ Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
ERR_FAIL_COND(p_value.get_type() == Variant::OBJECT);
@@ -1377,7 +1377,7 @@ void RendererSceneCull::instance_geometry_set_shader_parameter(RID p_instance, c
}
Variant RendererSceneCull::instance_geometry_get_shader_parameter(RID p_instance, const StringName &p_parameter) const {
- const Instance *instance = const_cast<RendererSceneCull *>(this)->instance_owner.getornull(p_instance);
+ const Instance *instance = const_cast<RendererSceneCull *>(this)->instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!instance, Variant());
if (instance->instance_shader_parameters.has(p_parameter)) {
@@ -1387,7 +1387,7 @@ Variant RendererSceneCull::instance_geometry_get_shader_parameter(RID p_instance
}
Variant RendererSceneCull::instance_geometry_get_shader_parameter_default_value(RID p_instance, const StringName &p_parameter) const {
- const Instance *instance = const_cast<RendererSceneCull *>(this)->instance_owner.getornull(p_instance);
+ const Instance *instance = const_cast<RendererSceneCull *>(this)->instance_owner.get_or_null(p_instance);
ERR_FAIL_COND_V(!instance, Variant());
if (instance->instance_shader_parameters.has(p_parameter)) {
@@ -1397,7 +1397,7 @@ Variant RendererSceneCull::instance_geometry_get_shader_parameter_default_value(
}
void RendererSceneCull::instance_geometry_get_shader_parameter_list(RID p_instance, List<PropertyInfo> *p_parameters) const {
- const Instance *instance = const_cast<RendererSceneCull *>(this)->instance_owner.getornull(p_instance);
+ const Instance *instance = const_cast<RendererSceneCull *>(this)->instance_owner.get_or_null(p_instance);
ERR_FAIL_COND(!instance);
const_cast<RendererSceneCull *>(this)->update_dirty_instances();
@@ -1636,7 +1636,7 @@ void RendererSceneCull::_update_instance(Instance *p_instance) {
}
if (p_instance->visibility_index != -1) {
- p_instance->scenario->instance_visibility[p_instance->visibility_index].position = p_instance->transformed_aabb.get_position() + p_instance->transformed_aabb.get_size() / 2.0f;
+ p_instance->scenario->instance_visibility[p_instance->visibility_index].position = p_instance->transformed_aabb.get_center();
}
//move instance and repair
@@ -1851,7 +1851,7 @@ void RendererSceneCull::_update_instance_lightmap_captures(Instance *p_instance)
}
Transform3D to_bounds = lightmap->transform.affine_inverse();
- Vector3 center = p_instance->transform.xform(p_instance->aabb.position + p_instance->aabb.size * 0.5); //use aabb center
+ Vector3 center = p_instance->transform.xform(p_instance->aabb.get_center()); //use aabb center
Vector3 lm_pos = to_bounds.xform(center);
@@ -2180,8 +2180,6 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
p_scenario->indexers[Scenario::INDEXER_GEOMETRY].convex_query(planes.ptr(), planes.size(), points.ptr(), points.size(), cull_convex);
- Plane near_plane(light_transform.origin, light_transform.basis.get_axis(2) * z);
-
RendererSceneRender::RenderShadowData &shadow_data = render_shadow_data[max_shadows_used++];
for (int j = 0; j < (int)instance_shadow_cull_result.size(); j++) {
@@ -2215,7 +2213,7 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
real_t radius = RSG::storage->light_get_param(p_instance->base, RS::LIGHT_PARAM_RANGE);
CameraMatrix cm;
- cm.set_perspective(90, 1, 0.01, radius);
+ cm.set_perspective(90, 1, radius * 0.005f, radius);
for (int i = 0; i < 6; i++) {
RENDER_TIMESTAMP("Culling Shadow Cube side" + itos(i));
@@ -2301,7 +2299,7 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
real_t angle = RSG::storage->light_get_param(p_instance->base, RS::LIGHT_PARAM_SPOT_ANGLE);
CameraMatrix cm;
- cm.set_perspective(angle * 2.0, 1.0, 0.01, radius);
+ cm.set_perspective(angle * 2.0, 1.0, 0.005f * radius, radius);
Vector<Plane> planes = cm.get_projection_planes(light_transform);
@@ -2356,7 +2354,7 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
void RendererSceneCull::render_camera(RID p_render_buffers, RID p_camera, RID p_scenario, RID p_viewport, Size2 p_viewport_size, float p_screen_lod_threshold, RID p_shadow_atlas, Ref<XRInterface> &p_xr_interface, RenderInfo *r_render_info) {
#ifndef _3D_DISABLED
- Camera *camera = camera_owner.getornull(p_camera);
+ Camera *camera = camera_owner.get_or_null(p_camera);
ERR_FAIL_COND(!camera);
RendererSceneRender::CameraData camera_data;
@@ -2749,9 +2747,9 @@ void RendererSceneCull::_scene_cull(CullData &cull_data, InstanceCullResult &cul
}
void RendererSceneCull::_render_scene(const RendererSceneRender::CameraData *p_camera_data, RID p_render_buffers, RID p_environment, RID p_force_camera_effects, uint32_t p_visible_layers, RID p_scenario, RID p_viewport, RID p_shadow_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold, bool p_using_shadows, RendererScene::RenderInfo *r_render_info) {
- Instance *render_reflection_probe = instance_owner.getornull(p_reflection_probe); //if null, not rendering to it
+ Instance *render_reflection_probe = instance_owner.get_or_null(p_reflection_probe); //if null, not rendering to it
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
render_pass++;
@@ -2794,12 +2792,9 @@ void RendererSceneCull::_render_scene(const RendererSceneRender::CameraData *p_c
//rasterizer->set_camera(p_camera_data->main_transform, p_camera_data.main_projection, p_camera_data.is_ortogonal);
- Vector<Plane> planes = p_camera_data->main_projection.get_projection_planes(p_camera_data->main_transform);
-
- Plane near_plane(p_camera_data->main_transform.origin, -p_camera_data->main_transform.basis.get_axis(2).normalized());
-
/* STEP 2 - CULL */
+ Vector<Plane> planes = p_camera_data->main_projection.get_projection_planes(p_camera_data->main_transform);
cull.frustum = Frustum(planes);
Vector<RID> directional_lights;
@@ -3108,12 +3103,12 @@ void RendererSceneCull::_render_scene(const RendererSceneRender::CameraData *p_c
}
RID RendererSceneCull::_render_get_environment(RID p_camera, RID p_scenario) {
- Camera *camera = camera_owner.getornull(p_camera);
+ Camera *camera = camera_owner.get_or_null(p_camera);
if (camera && scene_render->is_environment(camera->env)) {
return camera->env;
}
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
if (!scenario) {
return RID();
}
@@ -3130,7 +3125,7 @@ RID RendererSceneCull::_render_get_environment(RID p_camera, RID p_scenario) {
void RendererSceneCull::render_empty_scene(RID p_render_buffers, RID p_scenario, RID p_shadow_atlas) {
#ifndef _3D_DISABLED
- Scenario *scenario = scenario_owner.getornull(p_scenario);
+ Scenario *scenario = scenario_owner.get_or_null(p_scenario);
RID environment;
if (scenario->environment.is_valid()) {
@@ -3755,7 +3750,7 @@ bool RendererSceneCull::free(RID p_rid) {
camera_owner.free(p_rid);
} else if (scenario_owner.owns(p_rid)) {
- Scenario *scenario = scenario_owner.getornull(p_rid);
+ Scenario *scenario = scenario_owner.get_or_null(p_rid);
while (scenario->instances.first()) {
instance_set_scenario(scenario->instances.first()->self()->self, RID());
@@ -3776,7 +3771,7 @@ bool RendererSceneCull::free(RID p_rid) {
update_dirty_instances();
- Instance *instance = instance_owner.getornull(p_rid);
+ Instance *instance = instance_owner.get_or_null(p_rid);
instance_geometry_set_lightmap(p_rid, RID(), Rect2(), 0);
instance_set_scenario(p_rid, RID());
diff --git a/servers/rendering/renderer_scene_occlusion_cull.h b/servers/rendering/renderer_scene_occlusion_cull.h
index e06b3ba153..4e4b1b94db 100644
--- a/servers/rendering/renderer_scene_occlusion_cull.h
+++ b/servers/rendering/renderer_scene_occlusion_cull.h
@@ -76,26 +76,28 @@ public:
return false;
}
- float min_depth;
- if (p_cam_projection.is_orthogonal()) {
- min_depth = (-closest_point_view.z) - p_near;
- } else {
- float r = -p_near / closest_point_view.z;
- Vector3 closest_point_proj = Vector3(closest_point_view.x * r, closest_point_view.y * r, -p_near);
- min_depth = closest_point_proj.distance_to(closest_point_view);
- }
+ float min_depth = -closest_point_view.z * 0.95f;
Vector2 rect_min = Vector2(FLT_MAX, FLT_MAX);
Vector2 rect_max = Vector2(FLT_MIN, FLT_MIN);
for (int j = 0; j < 8; j++) {
- Vector3 c = RendererSceneOcclusionCull::HZBuffer::corners[j];
+ const Vector3 &c = RendererSceneOcclusionCull::HZBuffer::corners[j];
Vector3 nc = Vector3(1, 1, 1) - c;
Vector3 corner = Vector3(p_bounds[0] * c.x + p_bounds[3] * nc.x, p_bounds[1] * c.y + p_bounds[4] * nc.y, p_bounds[2] * c.z + p_bounds[5] * nc.z);
Vector3 view = p_cam_inv_transform.xform(corner);
- Vector3 projected = p_cam_projection.xform(view);
- Vector2 normalized = Vector2(projected.x * 0.5f + 0.5f, projected.y * 0.5f + 0.5f);
+ Plane vp = Plane(view, 1.0);
+ Plane projected = p_cam_projection.xform4(vp);
+
+ float w = projected.d;
+ if (w < 1.0) {
+ rect_min = Vector2(0.0f, 0.0f);
+ rect_max = Vector2(1.0f, 1.0f);
+ break;
+ }
+
+ Vector2 normalized = Vector2(projected.normal.x / w * 0.5f + 0.5f, projected.normal.y / w * 0.5f + 0.5f);
rect_min = rect_min.min(normalized);
rect_max = rect_max.max(normalized);
}
diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp
index 15ce1dbe63..2c07929357 100644
--- a/servers/rendering/renderer_viewport.cpp
+++ b/servers/rendering/renderer_viewport.cpp
@@ -71,6 +71,44 @@ static Transform2D _canvas_get_transform(RendererViewport::Viewport *p_viewport,
return xf;
}
+void RendererViewport::_configure_3d_render_buffers(Viewport *p_viewport) {
+ if (p_viewport->render_buffers.is_valid()) {
+ if (p_viewport->size.width == 0 || p_viewport->size.height == 0) {
+ RSG::scene->free(p_viewport->render_buffers);
+ p_viewport->render_buffers = RID();
+ } else {
+ RS::ViewportScale3D scale_3d = p_viewport->scale_3d;
+ if (Engine::get_singleton()->is_editor_hint()) { // ignore this inside of the editor
+ scale_3d = RS::VIEWPORT_SCALE_3D_DISABLED;
+ }
+
+ int width = p_viewport->size.width;
+ int height = p_viewport->size.height;
+ switch (scale_3d) {
+ case RS::VIEWPORT_SCALE_3D_75_PERCENT: {
+ width = (width * 3) / 4;
+ height = (height * 3) / 4;
+ }; break;
+ case RS::VIEWPORT_SCALE_3D_50_PERCENT: {
+ width = width >> 1;
+ height = height >> 1;
+ }; break;
+ case RS::VIEWPORT_SCALE_3D_33_PERCENT: {
+ width = width / 3;
+ height = height / 3;
+ }; break;
+ case RS::VIEWPORT_SCALE_3D_25_PERCENT: {
+ width = width >> 2;
+ height = height >> 2;
+ }; break;
+ default:
+ break;
+ }
+ RSG::scene->render_buffers_configure(p_viewport->render_buffers, p_viewport->render_target, width, height, p_viewport->msaa, p_viewport->screen_space_aa, p_viewport->use_debanding, p_viewport->get_view_count());
+ }
+ }
+}
+
void RendererViewport::_draw_3d(Viewport *p_viewport) {
RENDER_TIMESTAMP(">Begin Rendering 3D Scene");
@@ -100,7 +138,7 @@ void RendererViewport::_draw_3d(Viewport *p_viewport) {
RENDER_TIMESTAMP("<End Rendering 3D Scene");
}
-void RendererViewport::_draw_viewport(Viewport *p_viewport, uint32_t p_view_count) {
+void RendererViewport::_draw_viewport(Viewport *p_viewport) {
if (p_viewport->measure_render_time) {
String rt_id = "vp_begin_" + itos(p_viewport->self.get_id());
RSG::storage->capture_timestamp(rt_id);
@@ -142,7 +180,8 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport, uint32_t p_view_coun
if ((scenario_draw_canvas_bg || can_draw_3d) && !p_viewport->render_buffers.is_valid()) {
//wants to draw 3D but there is no render buffer, create
p_viewport->render_buffers = RSG::scene->render_buffers_create();
- RSG::scene->render_buffers_configure(p_viewport->render_buffers, p_viewport->render_target, p_viewport->size.width, p_viewport->size.height, p_viewport->msaa, p_viewport->screen_space_aa, p_viewport->use_debanding, p_view_count);
+
+ _configure_3d_render_buffers(p_viewport);
}
RSG::storage->render_target_request_clear(p_viewport->render_target, bgcolor);
@@ -515,7 +554,7 @@ void RendererViewport::draw_viewports() {
}
if (vp->update_mode == RS::VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE) {
- Viewport *parent = viewport_owner.getornull(vp->parent);
+ Viewport *parent = viewport_owner.get_or_null(vp->parent);
if (parent && parent->last_pass == draw_viewports_pass) {
visible = true;
}
@@ -544,7 +583,7 @@ void RendererViewport::draw_viewports() {
RSG::storage->render_target_set_as_unused(vp->render_target);
if (vp->use_xr && xr_interface.is_valid()) {
// override our size, make sure it matches our required size and is created as a stereo target
- vp->size = xr_interface->get_render_targetsize();
+ vp->size = xr_interface->get_render_target_size();
uint32_t view_count = xr_interface->get_view_count();
RSG::storage->render_target_set_size(vp->render_target, vp->size.x, vp->size.y, view_count);
@@ -556,7 +595,7 @@ void RendererViewport::draw_viewports() {
RSG::scene->set_debug_draw_mode(vp->debug_draw);
// and draw viewport
- _draw_viewport(vp, view_count);
+ _draw_viewport(vp);
// measure
@@ -580,17 +619,17 @@ void RendererViewport::draw_viewports() {
RSG::scene->set_debug_draw_mode(vp->debug_draw);
// render standard mono camera
- _draw_viewport(vp, 1);
+ _draw_viewport(vp);
if (vp->viewport_to_screen != DisplayServer::INVALID_WINDOW_ID && (!vp->viewport_render_direct_to_screen || !RSG::rasterizer->is_low_end())) {
//copy to screen if set as such
BlitToScreen blit;
blit.render_target = vp->render_target;
if (vp->viewport_to_screen_rect != Rect2()) {
- blit.rect = vp->viewport_to_screen_rect;
+ blit.dst_rect = vp->viewport_to_screen_rect;
} else {
- blit.rect.position = Vector2();
- blit.rect.size = vp->size;
+ blit.dst_rect.position = Vector2();
+ blit.dst_rect.size = vp->size;
}
if (!blit_to_screen_list.has(vp->viewport_to_screen)) {
@@ -632,7 +671,7 @@ RID RendererViewport::viewport_allocate() {
void RendererViewport::viewport_initialize(RID p_rid) {
viewport_owner.initialize_rid(p_rid);
- Viewport *viewport = viewport_owner.getornull(p_rid);
+ Viewport *viewport = viewport_owner.get_or_null(p_rid);
viewport->self = p_rid;
viewport->render_target = RSG::storage->render_target_create();
viewport->shadow_atlas = RSG::scene->shadow_atlas_create();
@@ -640,7 +679,7 @@ void RendererViewport::viewport_initialize(RID p_rid) {
}
void RendererViewport::viewport_set_use_xr(RID p_viewport, bool p_use_xr) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
if (viewport->use_xr == p_use_xr) {
@@ -648,9 +687,19 @@ void RendererViewport::viewport_set_use_xr(RID p_viewport, bool p_use_xr) {
}
viewport->use_xr = p_use_xr;
- if (viewport->render_buffers.is_valid()) {
- RSG::scene->render_buffers_configure(viewport->render_buffers, viewport->render_target, viewport->size.width, viewport->size.height, viewport->msaa, viewport->screen_space_aa, viewport->use_debanding, viewport->get_view_count());
+ _configure_3d_render_buffers(viewport);
+}
+
+void RendererViewport::viewport_set_scale_3d(RID p_viewport, RenderingServer::ViewportScale3D p_scale_3d) {
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
+ ERR_FAIL_COND(!viewport);
+
+ if (viewport->scale_3d == p_scale_3d) {
+ return;
}
+
+ viewport->scale_3d = p_scale_3d;
+ _configure_3d_render_buffers(viewport);
}
uint32_t RendererViewport::Viewport::get_view_count() {
@@ -671,26 +720,19 @@ uint32_t RendererViewport::Viewport::get_view_count() {
void RendererViewport::viewport_set_size(RID p_viewport, int p_width, int p_height) {
ERR_FAIL_COND(p_width < 0 && p_height < 0);
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->size = Size2(p_width, p_height);
uint32_t view_count = viewport->get_view_count();
RSG::storage->render_target_set_size(viewport->render_target, p_width, p_height, view_count);
- if (viewport->render_buffers.is_valid()) {
- if (p_width == 0 || p_height == 0) {
- RSG::scene->free(viewport->render_buffers);
- viewport->render_buffers = RID();
- } else {
- RSG::scene->render_buffers_configure(viewport->render_buffers, viewport->render_target, viewport->size.width, viewport->size.height, viewport->msaa, viewport->screen_space_aa, viewport->use_debanding, view_count);
- }
- }
+ _configure_3d_render_buffers(viewport);
viewport->occlusion_buffer_dirty = true;
}
void RendererViewport::viewport_set_active(RID p_viewport, bool p_active) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
if (p_active) {
@@ -703,21 +745,21 @@ void RendererViewport::viewport_set_active(RID p_viewport, bool p_active) {
}
void RendererViewport::viewport_set_parent_viewport(RID p_viewport, RID p_parent_viewport) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->parent = p_parent_viewport;
}
void RendererViewport::viewport_set_clear_mode(RID p_viewport, RS::ViewportClearMode p_clear_mode) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->clear_mode = p_clear_mode;
}
void RendererViewport::viewport_attach_to_screen(RID p_viewport, const Rect2 &p_rect, DisplayServer::WindowID p_screen) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
if (p_screen != DisplayServer::INVALID_WINDOW_ID) {
@@ -743,7 +785,7 @@ void RendererViewport::viewport_attach_to_screen(RID p_viewport, const Rect2 &p_
}
void RendererViewport::viewport_set_render_direct_to_screen(RID p_viewport, bool p_enable) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
if (p_enable == viewport->viewport_render_direct_to_screen) {
@@ -767,21 +809,21 @@ void RendererViewport::viewport_set_render_direct_to_screen(RID p_viewport, bool
}
void RendererViewport::viewport_set_update_mode(RID p_viewport, RS::ViewportUpdateMode p_mode) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->update_mode = p_mode;
}
RID RendererViewport::viewport_get_texture(RID p_viewport) const {
- const Viewport *viewport = viewport_owner.getornull(p_viewport);
+ const Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND_V(!viewport, RID());
return RSG::storage->render_target_get_texture(viewport->render_target);
}
RID RendererViewport::viewport_get_occluder_debug_texture(RID p_viewport) const {
- const Viewport *viewport = viewport_owner.getornull(p_viewport);
+ const Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND_V(!viewport, RID());
if (viewport->use_occlusion_culling && viewport->debug_draw == RenderingServer::VIEWPORT_DEBUG_DRAW_OCCLUDERS) {
@@ -791,35 +833,35 @@ RID RendererViewport::viewport_get_occluder_debug_texture(RID p_viewport) const
}
void RendererViewport::viewport_set_disable_2d(RID p_viewport, bool p_disable) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->disable_2d = p_disable;
}
void RendererViewport::viewport_set_disable_environment(RID p_viewport, bool p_disable) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->disable_environment = p_disable;
}
void RendererViewport::viewport_set_disable_3d(RID p_viewport, bool p_disable) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->disable_3d = p_disable;
}
void RendererViewport::viewport_attach_camera(RID p_viewport, RID p_camera) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->camera = p_camera;
}
void RendererViewport::viewport_set_scenario(RID p_viewport, RID p_scenario) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
if (viewport->scenario.is_valid()) {
@@ -833,11 +875,11 @@ void RendererViewport::viewport_set_scenario(RID p_viewport, RID p_scenario) {
}
void RendererViewport::viewport_attach_canvas(RID p_viewport, RID p_canvas) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
ERR_FAIL_COND(viewport->canvas_map.has(p_canvas));
- RendererCanvasCull::Canvas *canvas = RSG::canvas->canvas_owner.getornull(p_canvas);
+ RendererCanvasCull::Canvas *canvas = RSG::canvas->canvas_owner.get_or_null(p_canvas);
ERR_FAIL_COND(!canvas);
canvas->viewports.insert(p_viewport);
@@ -848,10 +890,10 @@ void RendererViewport::viewport_attach_canvas(RID p_viewport, RID p_canvas) {
}
void RendererViewport::viewport_remove_canvas(RID p_viewport, RID p_canvas) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
- RendererCanvasCull::Canvas *canvas = RSG::canvas->canvas_owner.getornull(p_canvas);
+ RendererCanvasCull::Canvas *canvas = RSG::canvas->canvas_owner.get_or_null(p_canvas);
ERR_FAIL_COND(!canvas);
viewport->canvas_map.erase(p_canvas);
@@ -859,7 +901,7 @@ void RendererViewport::viewport_remove_canvas(RID p_viewport, RID p_canvas) {
}
void RendererViewport::viewport_set_canvas_transform(RID p_viewport, RID p_canvas, const Transform2D &p_offset) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
ERR_FAIL_COND(!viewport->canvas_map.has(p_canvas));
@@ -867,7 +909,7 @@ void RendererViewport::viewport_set_canvas_transform(RID p_viewport, RID p_canva
}
void RendererViewport::viewport_set_transparent_background(RID p_viewport, bool p_enabled) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
RSG::storage->render_target_set_flag(viewport->render_target, RendererStorage::RENDER_TARGET_TRANSPARENT, p_enabled);
@@ -875,14 +917,14 @@ void RendererViewport::viewport_set_transparent_background(RID p_viewport, bool
}
void RendererViewport::viewport_set_global_canvas_transform(RID p_viewport, const Transform2D &p_transform) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->global_transform = p_transform;
}
void RendererViewport::viewport_set_canvas_stacking(RID p_viewport, RID p_canvas, int p_layer, int p_sublayer) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
ERR_FAIL_COND(!viewport->canvas_map.has(p_canvas));
@@ -891,7 +933,7 @@ void RendererViewport::viewport_set_canvas_stacking(RID p_viewport, RID p_canvas
}
void RendererViewport::viewport_set_shadow_atlas_size(RID p_viewport, int p_size, bool p_16_bits) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->shadow_atlas_size = p_size;
@@ -901,53 +943,47 @@ void RendererViewport::viewport_set_shadow_atlas_size(RID p_viewport, int p_size
}
void RendererViewport::viewport_set_shadow_atlas_quadrant_subdivision(RID p_viewport, int p_quadrant, int p_subdiv) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
RSG::scene->shadow_atlas_set_quadrant_subdivision(viewport->shadow_atlas, p_quadrant, p_subdiv);
}
void RendererViewport::viewport_set_msaa(RID p_viewport, RS::ViewportMSAA p_msaa) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
if (viewport->msaa == p_msaa) {
return;
}
viewport->msaa = p_msaa;
- if (viewport->render_buffers.is_valid()) {
- RSG::scene->render_buffers_configure(viewport->render_buffers, viewport->render_target, viewport->size.width, viewport->size.height, p_msaa, viewport->screen_space_aa, viewport->use_debanding, viewport->get_view_count());
- }
+ _configure_3d_render_buffers(viewport);
}
void RendererViewport::viewport_set_screen_space_aa(RID p_viewport, RS::ViewportScreenSpaceAA p_mode) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
if (viewport->screen_space_aa == p_mode) {
return;
}
viewport->screen_space_aa = p_mode;
- if (viewport->render_buffers.is_valid()) {
- RSG::scene->render_buffers_configure(viewport->render_buffers, viewport->render_target, viewport->size.width, viewport->size.height, viewport->msaa, p_mode, viewport->use_debanding, viewport->get_view_count());
- }
+ _configure_3d_render_buffers(viewport);
}
void RendererViewport::viewport_set_use_debanding(RID p_viewport, bool p_use_debanding) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
if (viewport->use_debanding == p_use_debanding) {
return;
}
viewport->use_debanding = p_use_debanding;
- if (viewport->render_buffers.is_valid()) {
- RSG::scene->render_buffers_configure(viewport->render_buffers, viewport->render_target, viewport->size.width, viewport->size.height, viewport->msaa, viewport->screen_space_aa, p_use_debanding, viewport->get_view_count());
- }
+ _configure_3d_render_buffers(viewport);
}
void RendererViewport::viewport_set_use_occlusion_culling(RID p_viewport, bool p_use_occlusion_culling) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
if (viewport->use_occlusion_culling == p_use_occlusion_culling) {
@@ -982,7 +1018,7 @@ void RendererViewport::viewport_set_occlusion_culling_build_quality(RS::Viewport
}
void RendererViewport::viewport_set_lod_threshold(RID p_viewport, float p_pixels) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->lod_threshold = p_pixels;
@@ -991,7 +1027,7 @@ void RendererViewport::viewport_set_lod_threshold(RID p_viewport, float p_pixels
int RendererViewport::viewport_get_render_info(RID p_viewport, RS::ViewportRenderInfoType p_type, RS::ViewportRenderInfo p_info) {
ERR_FAIL_INDEX_V(p_info, RS::VIEWPORT_RENDER_INFO_MAX, -1);
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
if (!viewport) {
return 0; //there should be a lock here..
}
@@ -1000,62 +1036,62 @@ int RendererViewport::viewport_get_render_info(RID p_viewport, RS::ViewportRende
}
void RendererViewport::viewport_set_debug_draw(RID p_viewport, RS::ViewportDebugDraw p_draw) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->debug_draw = p_draw;
}
void RendererViewport::viewport_set_measure_render_time(RID p_viewport, bool p_enable) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->measure_render_time = p_enable;
}
float RendererViewport::viewport_get_measured_render_time_cpu(RID p_viewport) const {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND_V(!viewport, 0);
return double(viewport->time_cpu_end - viewport->time_cpu_begin) / 1000.0;
}
float RendererViewport::viewport_get_measured_render_time_gpu(RID p_viewport) const {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND_V(!viewport, 0);
return double((viewport->time_gpu_end - viewport->time_gpu_begin) / 1000) / 1000.0;
}
void RendererViewport::viewport_set_snap_2d_transforms_to_pixel(RID p_viewport, bool p_enabled) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->snap_2d_transforms_to_pixel = p_enabled;
}
void RendererViewport::viewport_set_snap_2d_vertices_to_pixel(RID p_viewport, bool p_enabled) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->snap_2d_vertices_to_pixel = p_enabled;
}
void RendererViewport::viewport_set_default_canvas_item_texture_filter(RID p_viewport, RS::CanvasItemTextureFilter p_filter) {
ERR_FAIL_COND_MSG(p_filter == RS::CANVAS_ITEM_TEXTURE_FILTER_DEFAULT, "Viewport does not accept DEFAULT as texture filter (it's the topmost choice already).)");
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->texture_filter = p_filter;
}
void RendererViewport::viewport_set_default_canvas_item_texture_repeat(RID p_viewport, RS::CanvasItemTextureRepeat p_repeat) {
ERR_FAIL_COND_MSG(p_repeat == RS::CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT, "Viewport does not accept DEFAULT as texture repeat (it's the topmost choice already).)");
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->texture_repeat = p_repeat;
}
void RendererViewport::viewport_set_sdf_oversize_and_scale(RID p_viewport, RS::ViewportSDFOversize p_size, RS::ViewportSDFScale p_scale) {
- Viewport *viewport = viewport_owner.getornull(p_viewport);
+ Viewport *viewport = viewport_owner.get_or_null(p_viewport);
ERR_FAIL_COND(!viewport);
RSG::storage->render_target_set_sdf_size_and_scale(viewport->render_target, p_size, p_scale);
@@ -1063,7 +1099,7 @@ void RendererViewport::viewport_set_sdf_oversize_and_scale(RID p_viewport, RS::V
bool RendererViewport::free(RID p_rid) {
if (viewport_owner.owns(p_rid)) {
- Viewport *viewport = viewport_owner.getornull(p_rid);
+ Viewport *viewport = viewport_owner.get_or_null(p_rid);
RSG::storage->free(viewport->render_target);
RSG::scene->free(viewport->shadow_atlas);
@@ -1096,7 +1132,7 @@ void RendererViewport::handle_timestamp(String p_timestamp, uint64_t p_cpu_time,
return;
}
- Viewport *viewport = viewport_owner.getornull(*vp);
+ Viewport *viewport = viewport_owner.get_or_null(*vp);
if (!viewport) {
return;
}
diff --git a/servers/rendering/renderer_viewport.h b/servers/rendering/renderer_viewport.h
index ac7a35f97d..f6095e18d7 100644
--- a/servers/rendering/renderer_viewport.h
+++ b/servers/rendering/renderer_viewport.h
@@ -49,6 +49,8 @@ public:
bool use_xr; /* use xr interface to override camera positioning and projection matrices and control output */
+ RS::ViewportScale3D scale_3d = RenderingServer::VIEWPORT_SCALE_3D_DISABLED;
+
Size2i size;
RID camera;
RID scenario;
@@ -192,8 +194,9 @@ public:
int total_draw_calls_used = 0;
private:
+ void _configure_3d_render_buffers(Viewport *p_viewport);
void _draw_3d(Viewport *p_viewport);
- void _draw_viewport(Viewport *p_viewport, uint32_t p_view_count = 1);
+ void _draw_viewport(Viewport *p_viewport);
int occlusion_rays_per_thread = 512;
@@ -204,6 +207,7 @@ public:
void viewport_initialize(RID p_rid);
void viewport_set_use_xr(RID p_viewport, bool p_use_xr);
+ void viewport_set_scale_3d(RID p_viewport, RenderingServer::ViewportScale3D p_scale_3d);
void viewport_set_size(RID p_viewport, int p_width, int p_height);
diff --git a/servers/rendering/rendering_device.cpp b/servers/rendering/rendering_device.cpp
index b302c6b793..70f676e5ac 100644
--- a/servers/rendering/rendering_device.cpp
+++ b/servers/rendering/rendering_device.cpp
@@ -478,12 +478,28 @@ void RenderingDevice::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_memory_usage"), &RenderingDevice::get_memory_usage);
+ ClassDB::bind_method(D_METHOD("get_driver_resource", "resource", "rid", "index"), &RenderingDevice::get_driver_resource);
+
BIND_CONSTANT(BARRIER_MASK_RASTER);
BIND_CONSTANT(BARRIER_MASK_COMPUTE);
BIND_CONSTANT(BARRIER_MASK_TRANSFER);
BIND_CONSTANT(BARRIER_MASK_ALL);
BIND_CONSTANT(BARRIER_MASK_NO_BARRIER);
+ BIND_ENUM_CONSTANT(DRIVER_RESOURCE_VULKAN_DEVICE);
+ BIND_ENUM_CONSTANT(DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE);
+ BIND_ENUM_CONSTANT(DRIVER_RESOURCE_VULKAN_INSTANCE);
+ BIND_ENUM_CONSTANT(DRIVER_RESOURCE_VULKAN_QUEUE);
+ BIND_ENUM_CONSTANT(DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX);
+ BIND_ENUM_CONSTANT(DRIVER_RESOURCE_VULKAN_IMAGE);
+ BIND_ENUM_CONSTANT(DRIVER_RESOURCE_VULKAN_IMAGE_VIEW);
+ BIND_ENUM_CONSTANT(DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT);
+ BIND_ENUM_CONSTANT(DRIVER_RESOURCE_VULKAN_SAMPLER);
+ BIND_ENUM_CONSTANT(DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET);
+ BIND_ENUM_CONSTANT(DRIVER_RESOURCE_VULKAN_BUFFER);
+ BIND_ENUM_CONSTANT(DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE);
+ BIND_ENUM_CONSTANT(DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE);
+
BIND_ENUM_CONSTANT(DATA_FORMAT_R4G4_UNORM_PACK8);
BIND_ENUM_CONSTANT(DATA_FORMAT_R4G4B4A4_UNORM_PACK16);
BIND_ENUM_CONSTANT(DATA_FORMAT_B4G4R4A4_UNORM_PACK16);
diff --git a/servers/rendering/rendering_device.h b/servers/rendering/rendering_device.h
index e2d207dab2..5eb8f1cead 100644
--- a/servers/rendering/rendering_device.h
+++ b/servers/rendering/rendering_device.h
@@ -60,6 +60,23 @@ public:
DEVICE_DIRECTX
};
+ enum DriverResource {
+ DRIVER_RESOURCE_VULKAN_DEVICE = 0,
+ DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE,
+ DRIVER_RESOURCE_VULKAN_INSTANCE,
+ DRIVER_RESOURCE_VULKAN_QUEUE,
+ DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX,
+ DRIVER_RESOURCE_VULKAN_IMAGE,
+ DRIVER_RESOURCE_VULKAN_IMAGE_VIEW,
+ DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT,
+ DRIVER_RESOURCE_VULKAN_SAMPLER,
+ DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET,
+ DRIVER_RESOURCE_VULKAN_BUFFER,
+ DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE,
+ DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE,
+ //next driver continue enum from 1000 to keep order
+ };
+
enum ShaderStage {
SHADER_STAGE_VERTEX,
SHADER_STAGE_FRAGMENT,
@@ -495,6 +512,7 @@ public:
virtual bool texture_is_format_supported_for_usage(DataFormat p_format, uint32_t p_usage) const = 0;
virtual bool texture_is_shared(RID p_texture) = 0;
virtual bool texture_is_valid(RID p_texture) = 0;
+ virtual Size2i texture_size(RID p_texture) = 0;
virtual Error texture_copy(RID p_from_texture, RID p_to_texture, const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_size, uint32_t p_src_mipmap, uint32_t p_dst_mipmap, uint32_t p_src_layer, uint32_t p_dst_layer, uint32_t p_post_barrier = BARRIER_MASK_ALL) = 0;
virtual Error texture_clear(RID p_texture, const Color &p_color, uint32_t p_base_mipmap, uint32_t p_mipmaps, uint32_t p_base_layer, uint32_t p_layers, uint32_t p_post_barrier = BARRIER_MASK_ALL) = 0;
@@ -1182,6 +1200,8 @@ public:
virtual String get_device_name() const = 0;
virtual String get_device_pipeline_cache_uuid() const = 0;
+ virtual uint64_t get_driver_resource(DriverResource p_resource, RID p_rid = RID(), uint64_t p_index = 0) = 0;
+
static RenderingDevice *get_singleton();
RenderingDevice();
@@ -1216,6 +1236,7 @@ protected:
Vector<int64_t> _draw_list_switch_to_next_pass_split(uint32_t p_splits);
};
+VARIANT_ENUM_CAST(RenderingDevice::DriverResource)
VARIANT_ENUM_CAST(RenderingDevice::ShaderStage)
VARIANT_ENUM_CAST(RenderingDevice::ShaderLanguage)
VARIANT_ENUM_CAST(RenderingDevice::CompareOperator)
diff --git a/servers/rendering/rendering_server_default.h b/servers/rendering/rendering_server_default.h
index c1336ee42d..56e79b62f2 100644
--- a/servers/rendering/rendering_server_default.h
+++ b/servers/rendering/rendering_server_default.h
@@ -526,6 +526,7 @@ public:
FUNCRIDSPLIT(viewport)
FUNC2(viewport_set_use_xr, RID, bool)
+ FUNC2(viewport_set_scale_3d, RID, ViewportScale3D)
FUNC3(viewport_set_size, RID, int, int)
FUNC2(viewport_set_active, RID, bool)
@@ -762,6 +763,7 @@ public:
FUNC4(canvas_item_add_circle, RID, const Point2 &, float, const Color &)
FUNC6(canvas_item_add_texture_rect, RID, const Rect2 &, RID, bool, const Color &, bool)
FUNC7(canvas_item_add_texture_rect_region, RID, const Rect2 &, RID, const Rect2 &, const Color &, bool, bool)
+ FUNC7(canvas_item_add_msdf_texture_rect_region, RID, const Rect2 &, RID, const Rect2 &, const Color &, int, float)
FUNC10(canvas_item_add_nine_patch, RID, const Rect2 &, const Rect2 &, RID, const Vector2 &, const Vector2 &, NinePatchAxisMode, NinePatchAxisMode, bool, const Color &)
FUNC6(canvas_item_add_primitive, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID, float)
FUNC5(canvas_item_add_polygon, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID)
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp
index 20fcb1396d..d6f8fe85c9 100644
--- a/servers/rendering/shader_language.cpp
+++ b/servers/rendering/shader_language.cpp
@@ -2384,6 +2384,10 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
failed_builtin = true;
bool fail = false;
for (int i = 0; i < argcount; i++) {
+ if (p_func->arguments[i + 1]->type == Node::TYPE_ARRAY && !static_cast<const ArrayNode *>(p_func->arguments[i + 1])->is_indexed()) {
+ fail = true;
+ break;
+ }
if (get_scalar_type(args[i]) == args[i] && p_func->arguments[i + 1]->type == Node::TYPE_CONSTANT && convert_constant(static_cast<ConstantNode *>(p_func->arguments[i + 1]), builtin_func_defs[idx].args[i])) {
//all good, but needs implicit conversion later
} else if (args[i] != builtin_func_defs[idx].args[i]) {
@@ -2560,6 +2564,11 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
} else {
arg_name = get_datatype_name(args[i]);
}
+ if (args3[i] > 0) {
+ arg_name += "[";
+ arg_name += itos(args3[i]);
+ arg_name += "]";
+ }
err += arg_name;
}
err += ")";
@@ -2877,6 +2886,27 @@ bool ShaderLanguage::is_scalar_type(DataType p_type) {
return p_type == TYPE_BOOL || p_type == TYPE_INT || p_type == TYPE_UINT || p_type == TYPE_FLOAT;
}
+bool ShaderLanguage::is_float_type(DataType p_type) {
+ switch (p_type) {
+ case TYPE_FLOAT:
+ case TYPE_VEC2:
+ case TYPE_VEC3:
+ case TYPE_VEC4:
+ case TYPE_MAT2:
+ case TYPE_MAT3:
+ case TYPE_MAT4:
+ case TYPE_SAMPLER2D:
+ case TYPE_SAMPLER2DARRAY:
+ case TYPE_SAMPLER3D:
+ case TYPE_SAMPLERCUBE:
+ case TYPE_SAMPLERCUBEARRAY: {
+ return true;
+ }
+ default: {
+ return false;
+ }
+ }
+}
bool ShaderLanguage::is_sampler_type(DataType p_type) {
return p_type == TYPE_SAMPLER2D ||
p_type == TYPE_ISAMPLER2D ||
@@ -5222,7 +5252,9 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
#if DEBUG_ENABLED
- if (check_warnings && HAS_WARNING(ShaderWarning::FLOAT_COMPARISON_FLAG) && (op == OP_EQUAL || op == OP_NOT_EQUAL) && expression[i - 1].node->get_datatype() == TYPE_FLOAT && expression[i + 1].node->get_datatype() == TYPE_FLOAT) {
+ if (check_warnings && HAS_WARNING(ShaderWarning::FLOAT_COMPARISON_FLAG) && (op == OP_EQUAL || op == OP_NOT_EQUAL) &&
+ (!expression[i - 1].is_op && !expression[i + 1].is_op) &&
+ (expression[i - 1].node->get_datatype() == TYPE_FLOAT && expression[i + 1].node->get_datatype() == TYPE_FLOAT)) {
_add_line_warning(ShaderWarning::FLOAT_COMPARISON);
}
#endif // DEBUG_ENABLED
diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h
index 9e0a63f0f7..18525e054e 100644
--- a/servers/rendering/shader_language.h
+++ b/servers/rendering/shader_language.h
@@ -774,6 +774,7 @@ public:
static DataType get_scalar_type(DataType p_type);
static int get_cardinality(DataType p_type);
static bool is_scalar_type(DataType p_type);
+ static bool is_float_type(DataType p_type);
static bool is_sampler_type(DataType p_type);
static Variant constant_value_to_variant(const Vector<ShaderLanguage::ConstantNode::Value> &p_value, DataType p_type, ShaderLanguage::ShaderNode::Uniform::Hint p_hint = ShaderLanguage::ShaderNode::Uniform::HINT_NONE);
static PropertyInfo uniform_to_property_info(const ShaderNode::Uniform &p_uniform);
diff --git a/servers/rendering/shader_types.cpp b/servers/rendering/shader_types.cpp
index 4488069698..0bfcccef28 100644
--- a/servers/rendering/shader_types.cpp
+++ b/servers/rendering/shader_types.cpp
@@ -342,7 +342,6 @@ ShaderTypes::ShaderTypes() {
shader_modes[RS::SHADER_PARTICLES].functions["start"].built_ins["VELOCITY"] = ShaderLanguage::TYPE_VEC3;
shader_modes[RS::SHADER_PARTICLES].functions["start"].built_ins["MASS"] = ShaderLanguage::TYPE_FLOAT;
shader_modes[RS::SHADER_PARTICLES].functions["start"].built_ins["ACTIVE"] = ShaderLanguage::TYPE_BOOL;
- shader_modes[RS::SHADER_PARTICLES].functions["start"].built_ins["RESTART"] = constt(ShaderLanguage::TYPE_BOOL);
shader_modes[RS::SHADER_PARTICLES].functions["start"].built_ins["CUSTOM"] = ShaderLanguage::TYPE_VEC4;
shader_modes[RS::SHADER_PARTICLES].functions["start"].built_ins["TRANSFORM"] = ShaderLanguage::TYPE_MAT4;
shader_modes[RS::SHADER_PARTICLES].functions["start"].built_ins["LIFETIME"] = constt(ShaderLanguage::TYPE_FLOAT);
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp
index 222ea9e622..1b10e4dcbe 100644
--- a/servers/rendering_server.cpp
+++ b/servers/rendering_server.cpp
@@ -500,7 +500,7 @@ Error RenderingServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint
case RS::ARRAY_CUSTOM1:
case RS::ARRAY_CUSTOM2:
case RS::ARRAY_CUSTOM3: {
- uint32_t type = (p_format >> (ARRAY_FORMAT_CUSTOM_BASE + ARRAY_FORMAT_CUSTOM_BITS * (RS::ARRAY_CUSTOM0 - ai))) & ARRAY_FORMAT_CUSTOM_MASK;
+ uint32_t type = (p_format >> (ARRAY_FORMAT_CUSTOM_BASE + ARRAY_FORMAT_CUSTOM_BITS * (ai - RS::ARRAY_CUSTOM0))) & ARRAY_FORMAT_CUSTOM_MASK;
switch (type) {
case ARRAY_CUSTOM_RGBA8_UNORM:
case ARRAY_CUSTOM_RGBA8_SNORM:
@@ -541,14 +541,14 @@ Error RenderingServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint
ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::PACKED_FLOAT32_ARRAY, ERR_INVALID_PARAMETER);
Vector<float> array = p_arrays[ai];
- int32_t s = ARRAY_CUSTOM_R_FLOAT - ai + 1;
+ int32_t s = type - ARRAY_CUSTOM_R_FLOAT + 1;
ERR_FAIL_COND_V(array.size() != p_vertex_array_len * s, ERR_INVALID_PARAMETER);
const float *src = array.ptr();
for (int i = 0; i < p_vertex_array_len; i++) {
- memcpy(&aw[p_offsets[ai] + i * p_attrib_stride], &src[i * s], 4 * s);
+ memcpy(&aw[p_offsets[ai] + i * p_attrib_stride], &src[i * s], sizeof(float) * s);
}
} break;
default: {
@@ -938,6 +938,13 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa
}
}
+ for (uint32_t i = 0; i < RS::ARRAY_CUSTOM_COUNT; ++i) {
+ // include custom array format type.
+ if (format & (1 << (ARRAY_CUSTOM0 + i))) {
+ format |= (RS::ARRAY_FORMAT_CUSTOM_MASK << (RS::ARRAY_FORMAT_CUSTOM_BASE + i * RS::ARRAY_FORMAT_CUSTOM_BITS)) & p_compress_format;
+ }
+ }
+
uint32_t offsets[RS::ARRAY_MAX];
uint32_t vertex_element_size;
@@ -1191,7 +1198,7 @@ Array RenderingServer::_get_array_from_surface(uint32_t p_format, Vector<uint8_t
case RS::ARRAY_CUSTOM1:
case RS::ARRAY_CUSTOM2:
case RS::ARRAY_CUSTOM3: {
- uint32_t type = (p_format >> (ARRAY_FORMAT_CUSTOM_BASE + ARRAY_FORMAT_CUSTOM_BITS * (RS::ARRAY_CUSTOM0 - i))) & ARRAY_FORMAT_CUSTOM_MASK;
+ uint32_t type = (p_format >> (ARRAY_FORMAT_CUSTOM_BASE + ARRAY_FORMAT_CUSTOM_BITS * (i - RS::ARRAY_CUSTOM0))) & ARRAY_FORMAT_CUSTOM_MASK;
switch (type) {
case ARRAY_CUSTOM_RGBA8_UNORM:
case ARRAY_CUSTOM_RGBA8_SNORM:
@@ -1219,6 +1226,8 @@ Array RenderingServer::_get_array_from_surface(uint32_t p_format, Vector<uint8_t
uint32_t s = type - ARRAY_CUSTOM_R_FLOAT + 1;
Vector<float> arr;
+ arr.resize(s * p_vertex_len);
+
float *w = arr.ptrw();
for (int j = 0; j < p_vertex_len; j++) {
@@ -1467,6 +1476,11 @@ ShaderLanguage::DataType RenderingServer::global_variable_type_get_shader_dataty
}
}
+RenderingDevice *RenderingServer::get_rendering_device() const {
+ // return the rendering device we're using globally
+ return RenderingDevice::get_singleton();
+}
+
RenderingDevice *RenderingServer::create_local_rendering_device() const {
return RenderingDevice::get_singleton()->create_local_device();
}
@@ -2138,6 +2152,7 @@ void RenderingServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("viewport_create"), &RenderingServer::viewport_create);
ClassDB::bind_method(D_METHOD("viewport_set_use_xr", "viewport", "use_xr"), &RenderingServer::viewport_set_use_xr);
+ ClassDB::bind_method(D_METHOD("viewport_set_scale_3d", "viewport", "scale"), &RenderingServer::viewport_set_scale_3d);
ClassDB::bind_method(D_METHOD("viewport_set_size", "viewport", "width", "height"), &RenderingServer::viewport_set_size);
ClassDB::bind_method(D_METHOD("viewport_set_active", "viewport", "active"), &RenderingServer::viewport_set_active);
ClassDB::bind_method(D_METHOD("viewport_set_parent_viewport", "viewport", "parent_viewport"), &RenderingServer::viewport_set_parent_viewport);
@@ -2210,7 +2225,6 @@ void RenderingServer::_bind_methods() {
BIND_ENUM_CONSTANT(VIEWPORT_MSAA_2X);
BIND_ENUM_CONSTANT(VIEWPORT_MSAA_4X);
BIND_ENUM_CONSTANT(VIEWPORT_MSAA_8X);
- BIND_ENUM_CONSTANT(VIEWPORT_MSAA_16X);
BIND_ENUM_CONSTANT(VIEWPORT_MSAA_MAX);
BIND_ENUM_CONSTANT(VIEWPORT_SCREEN_SPACE_AA_DISABLED);
@@ -2255,6 +2269,12 @@ void RenderingServer::_bind_methods() {
BIND_ENUM_CONSTANT(VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES);
BIND_ENUM_CONSTANT(VIEWPORT_DEBUG_DRAW_OCCLUDERS);
+ BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_DISABLED);
+ BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_75_PERCENT);
+ BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_50_PERCENT);
+ BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_33_PERCENT);
+ BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_25_PERCENT);
+
/* SKY API */
ClassDB::bind_method(D_METHOD("sky_create"), &RenderingServer::sky_create);
@@ -2707,6 +2727,7 @@ void RenderingServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("force_sync"), &RenderingServer::sync);
ClassDB::bind_method(D_METHOD("force_draw", "swap_buffers", "frame_step"), &RenderingServer::draw, DEFVAL(true), DEFVAL(0.0));
+ ClassDB::bind_method(D_METHOD("get_rendering_device"), &RenderingServer::get_rendering_device);
ClassDB::bind_method(D_METHOD("create_local_rendering_device"), &RenderingServer::create_local_rendering_device);
}
@@ -2795,6 +2816,12 @@ RenderingServer::RenderingServer() {
"rendering/vulkan/rendering/back_end",
PROPERTY_HINT_ENUM, "Forward Clustered (Supports Desktop Only),Forward Mobile (Supports Desktop and Mobile)"));
+ GLOBAL_DEF("rendering/3d/viewport/scale", 0);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/3d/viewport/scale",
+ PropertyInfo(Variant::INT,
+ "rendering/3d/viewport/scale",
+ PROPERTY_HINT_ENUM, "Disabled,75%,50%,33%,25%"));
+
GLOBAL_DEF("rendering/shader_compiler/shader_cache/enabled", true);
GLOBAL_DEF("rendering/shader_compiler/shader_cache/compress", true);
GLOBAL_DEF("rendering/shader_compiler/shader_cache/use_zstd_compression", true);
diff --git a/servers/rendering_server.h b/servers/rendering_server.h
index 545270dcd9..1b04a6e5e2 100644
--- a/servers/rendering_server.h
+++ b/servers/rendering_server.h
@@ -752,9 +752,19 @@ public:
CANVAS_ITEM_TEXTURE_REPEAT_MAX,
};
+ enum ViewportScale3D {
+ VIEWPORT_SCALE_3D_DISABLED,
+ VIEWPORT_SCALE_3D_75_PERCENT,
+ VIEWPORT_SCALE_3D_50_PERCENT,
+ VIEWPORT_SCALE_3D_33_PERCENT,
+ VIEWPORT_SCALE_3D_25_PERCENT,
+ VIEWPORT_SCALE_3D_MAX,
+ };
+
virtual RID viewport_create() = 0;
virtual void viewport_set_use_xr(RID p_viewport, bool p_use_xr) = 0;
+ virtual void viewport_set_scale_3d(RID p_viewport, ViewportScale3D p_scale_3d) = 0;
virtual void viewport_set_size(RID p_viewport, int p_width, int p_height) = 0;
virtual void viewport_set_active(RID p_viewport, bool p_active) = 0;
virtual void viewport_set_parent_viewport(RID p_viewport, RID p_parent_viewport) = 0;
@@ -826,7 +836,6 @@ public:
VIEWPORT_MSAA_2X,
VIEWPORT_MSAA_4X,
VIEWPORT_MSAA_8X,
- VIEWPORT_MSAA_16X,
VIEWPORT_MSAA_MAX,
};
@@ -1248,6 +1257,7 @@ public:
virtual void canvas_item_add_circle(RID p_item, const Point2 &p_pos, float p_radius, const Color &p_color) = 0;
virtual void canvas_item_add_texture_rect(RID p_item, const Rect2 &p_rect, RID p_texture, bool p_tile = false, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false) = 0;
virtual void canvas_item_add_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, bool p_clip_uv = false) = 0;
+ virtual void canvas_item_add_msdf_texture_rect_region(RID p_item, const Rect2 &p_rect, RID p_texture, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), int p_outline_size = 0, float p_px_range = 1.0) = 0;
virtual void canvas_item_add_nine_patch(RID p_item, const Rect2 &p_rect, const Rect2 &p_source, RID p_texture, const Vector2 &p_topleft, const Vector2 &p_bottomright, NinePatchAxisMode p_x_axis_mode = NINE_PATCH_STRETCH, NinePatchAxisMode p_y_axis_mode = NINE_PATCH_STRETCH, bool p_draw_center = true, const Color &p_modulate = Color(1, 1, 1)) = 0;
virtual void canvas_item_add_primitive(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture, float p_width = 1.0) = 0;
virtual void canvas_item_add_polygon(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), RID p_texture = RID()) = 0;
@@ -1482,6 +1492,7 @@ public:
virtual void set_print_gpu_profile(bool p_enable) = 0;
+ RenderingDevice *get_rendering_device() const;
RenderingDevice *create_local_rendering_device() const;
bool is_render_loop_enabled() const;
@@ -1542,6 +1553,7 @@ VARIANT_ENUM_CAST(RenderingServer::ViewportDebugDraw);
VARIANT_ENUM_CAST(RenderingServer::ViewportOcclusionCullingBuildQuality);
VARIANT_ENUM_CAST(RenderingServer::ViewportSDFOversize);
VARIANT_ENUM_CAST(RenderingServer::ViewportSDFScale);
+VARIANT_ENUM_CAST(RenderingServer::ViewportScale3D);
VARIANT_ENUM_CAST(RenderingServer::SkyMode);
VARIANT_ENUM_CAST(RenderingServer::EnvironmentBG);
VARIANT_ENUM_CAST(RenderingServer::EnvironmentAmbientSource);
diff --git a/servers/text_server.cpp b/servers/text_server.cpp
index 6bace8cf9e..4886a6f582 100644
--- a/servers/text_server.cpp
+++ b/servers/text_server.cpp
@@ -216,83 +216,130 @@ void TextServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("free_rid", "rid"), &TextServer::free); // shouldn't conflict with Object::free()
/* Font Interface */
- ClassDB::bind_method(D_METHOD("create_font_system", "name", "base_size"), &TextServer::create_font_system, DEFVAL(16));
- ClassDB::bind_method(D_METHOD("create_font_resource", "filename", "base_size"), &TextServer::create_font_resource, DEFVAL(16));
- ClassDB::bind_method(D_METHOD("create_font_memory", "data", "type", "base_size"), &TextServer::_create_font_memory, DEFVAL(16));
- ClassDB::bind_method(D_METHOD("create_font_bitmap", "height", "ascent", "base_size"), &TextServer::create_font_bitmap);
- ClassDB::bind_method(D_METHOD("font_bitmap_add_texture", "font", "texture"), &TextServer::font_bitmap_add_texture);
- ClassDB::bind_method(D_METHOD("font_bitmap_add_char", "font", "char", "texture_idx", "rect", "align", "advance"), &TextServer::font_bitmap_add_char);
- ClassDB::bind_method(D_METHOD("font_bitmap_add_kerning_pair", "font", "A", "B", "kerning"), &TextServer::font_bitmap_add_kerning_pair);
+ ClassDB::bind_method(D_METHOD("create_font"), &TextServer::create_font);
- ClassDB::bind_method(D_METHOD("font_get_height", "font", "size"), &TextServer::font_get_height);
- ClassDB::bind_method(D_METHOD("font_get_ascent", "font", "size"), &TextServer::font_get_ascent);
- ClassDB::bind_method(D_METHOD("font_get_descent", "font", "size"), &TextServer::font_get_descent);
+ ClassDB::bind_method(D_METHOD("font_set_data", "data"), &TextServer::font_set_data);
- ClassDB::bind_method(D_METHOD("font_get_underline_position", "font", "size"), &TextServer::font_get_underline_position);
- ClassDB::bind_method(D_METHOD("font_get_underline_thickness", "font", "size"), &TextServer::font_get_underline_thickness);
+ ClassDB::bind_method(D_METHOD("font_set_antialiased", "font_rid", "antialiased"), &TextServer::font_set_antialiased);
+ ClassDB::bind_method(D_METHOD("font_is_antialiased", "font_rid"), &TextServer::font_is_antialiased);
- ClassDB::bind_method(D_METHOD("font_get_spacing_space", "font"), &TextServer::font_get_spacing_space);
- ClassDB::bind_method(D_METHOD("font_set_spacing_space", "font", "value"), &TextServer::font_set_spacing_space);
+ ClassDB::bind_method(D_METHOD("font_set_multichannel_signed_distance_field", "font_rid", "msdf"), &TextServer::font_set_multichannel_signed_distance_field);
+ ClassDB::bind_method(D_METHOD("font_is_multichannel_signed_distance_field", "font_rid"), &TextServer::font_is_multichannel_signed_distance_field);
- ClassDB::bind_method(D_METHOD("font_get_spacing_glyph", "font"), &TextServer::font_get_spacing_glyph);
- ClassDB::bind_method(D_METHOD("font_set_spacing_glyph", "font", "value"), &TextServer::font_set_spacing_glyph);
+ ClassDB::bind_method(D_METHOD("font_set_msdf_pixel_range", "font_rid", "msdf_pixel_range"), &TextServer::font_set_msdf_pixel_range);
+ ClassDB::bind_method(D_METHOD("font_get_msdf_pixel_range", "font_rid"), &TextServer::font_get_msdf_pixel_range);
- ClassDB::bind_method(D_METHOD("font_set_antialiased", "font", "antialiased"), &TextServer::font_set_antialiased);
- ClassDB::bind_method(D_METHOD("font_get_antialiased", "font"), &TextServer::font_get_antialiased);
+ ClassDB::bind_method(D_METHOD("font_set_msdf_size", "font_rid", "msdf_size"), &TextServer::font_set_msdf_size);
+ ClassDB::bind_method(D_METHOD("font_get_msdf_size", "font_rid"), &TextServer::font_get_msdf_size);
- ClassDB::bind_method(D_METHOD("font_get_feature_list", "font"), &TextServer::font_get_feature_list);
- ClassDB::bind_method(D_METHOD("font_get_variation_list", "font"), &TextServer::font_get_variation_list);
+ ClassDB::bind_method(D_METHOD("font_set_fixed_size", "font_rid", "fixed_size"), &TextServer::font_set_fixed_size);
+ ClassDB::bind_method(D_METHOD("font_get_fixed_size", "font_rid"), &TextServer::font_get_fixed_size);
- ClassDB::bind_method(D_METHOD("font_set_variation", "font", "tag", "value"), &TextServer::font_set_variation);
- ClassDB::bind_method(D_METHOD("font_get_variation", "font", "tag"), &TextServer::font_get_variation);
+ ClassDB::bind_method(D_METHOD("font_set_force_autohinter", "font_rid", "force_autohinter"), &TextServer::font_set_force_autohinter);
+ ClassDB::bind_method(D_METHOD("font_is_force_autohinter", "font_rid"), &TextServer::font_is_force_autohinter);
- ClassDB::bind_method(D_METHOD("font_set_hinting", "font", "hinting"), &TextServer::font_set_hinting);
- ClassDB::bind_method(D_METHOD("font_get_hinting", "font"), &TextServer::font_get_hinting);
+ ClassDB::bind_method(D_METHOD("font_set_hinting", "font_rid", "_hinting"), &TextServer::font_set_hinting);
+ ClassDB::bind_method(D_METHOD("font_get_hinting", "font_rid"), &TextServer::font_get_hinting);
- ClassDB::bind_method(D_METHOD("font_set_distance_field_hint", "font", "distance_field"), &TextServer::font_set_distance_field_hint);
- ClassDB::bind_method(D_METHOD("font_get_distance_field_hint", "font"), &TextServer::font_get_distance_field_hint);
+ ClassDB::bind_method(D_METHOD("font_set_variation_coordinates", "font_rid", "variation_coordinates"), &TextServer::font_set_variation_coordinates);
+ ClassDB::bind_method(D_METHOD("font_get_variation_coordinates", "font_rid"), &TextServer::font_get_variation_coordinates);
- ClassDB::bind_method(D_METHOD("font_set_force_autohinter", "font", "enabeld"), &TextServer::font_set_force_autohinter);
- ClassDB::bind_method(D_METHOD("font_get_force_autohinter", "font"), &TextServer::font_get_force_autohinter);
+ ClassDB::bind_method(D_METHOD("font_set_oversampling", "font_rid", "oversampling"), &TextServer::font_set_oversampling);
+ ClassDB::bind_method(D_METHOD("font_get_oversampling", "font_rid"), &TextServer::font_get_oversampling);
- ClassDB::bind_method(D_METHOD("font_has_char", "font", "char"), &TextServer::font_has_char);
- ClassDB::bind_method(D_METHOD("font_get_supported_chars", "font"), &TextServer::font_get_supported_chars);
+ ClassDB::bind_method(D_METHOD("font_get_size_cache_list", "font_rid"), &TextServer::font_get_size_cache_list);
+ ClassDB::bind_method(D_METHOD("font_clear_size_cache", "font_rid"), &TextServer::font_clear_size_cache);
+ ClassDB::bind_method(D_METHOD("font_remove_size_cache", "font_rid", "size"), &TextServer::font_remove_size_cache);
- ClassDB::bind_method(D_METHOD("font_has_outline", "font"), &TextServer::font_has_outline);
- ClassDB::bind_method(D_METHOD("font_get_base_size", "font"), &TextServer::font_get_base_size);
+ ClassDB::bind_method(D_METHOD("font_set_ascent", "font_rid", "size", "ascent"), &TextServer::font_set_ascent);
+ ClassDB::bind_method(D_METHOD("font_get_ascent", "font_rid", "size"), &TextServer::font_get_ascent);
- ClassDB::bind_method(D_METHOD("font_is_language_supported", "font", "language"), &TextServer::font_is_language_supported);
- ClassDB::bind_method(D_METHOD("font_set_language_support_override", "font", "language", "supported"), &TextServer::font_set_language_support_override);
+ ClassDB::bind_method(D_METHOD("font_set_descent", "font_rid", "size", "descent"), &TextServer::font_set_descent);
+ ClassDB::bind_method(D_METHOD("font_get_descent", "font_rid", "size"), &TextServer::font_get_descent);
- ClassDB::bind_method(D_METHOD("font_get_language_support_override", "font", "language"), &TextServer::font_get_language_support_override);
- ClassDB::bind_method(D_METHOD("font_remove_language_support_override", "font", "language"), &TextServer::font_remove_language_support_override);
- ClassDB::bind_method(D_METHOD("font_get_language_support_overrides", "font"), &TextServer::font_get_language_support_overrides);
+ ClassDB::bind_method(D_METHOD("font_set_underline_position", "font_rid", "size", "underline_position"), &TextServer::font_set_underline_position);
+ ClassDB::bind_method(D_METHOD("font_get_underline_position", "font_rid", "size"), &TextServer::font_get_underline_position);
- ClassDB::bind_method(D_METHOD("font_is_script_supported", "font", "script"), &TextServer::font_is_script_supported);
- ClassDB::bind_method(D_METHOD("font_set_script_support_override", "font", "script", "supported"), &TextServer::font_set_script_support_override);
+ ClassDB::bind_method(D_METHOD("font_set_underline_thickness", "font_rid", "size", "underline_thickness"), &TextServer::font_set_underline_thickness);
+ ClassDB::bind_method(D_METHOD("font_get_underline_thickness", "font_rid", "size"), &TextServer::font_get_underline_thickness);
- ClassDB::bind_method(D_METHOD("font_get_script_support_override", "font", "script"), &TextServer::font_get_script_support_override);
- ClassDB::bind_method(D_METHOD("font_remove_script_support_override", "font", "script"), &TextServer::font_remove_script_support_override);
- ClassDB::bind_method(D_METHOD("font_get_script_support_overrides", "font"), &TextServer::font_get_script_support_overrides);
+ ClassDB::bind_method(D_METHOD("font_set_scale", "font_rid", "size", "scale"), &TextServer::font_set_scale);
+ ClassDB::bind_method(D_METHOD("font_get_scale", "font_rid", "size"), &TextServer::font_get_scale);
- ClassDB::bind_method(D_METHOD("font_get_glyph_index", "font", "char", "variation_selector"), &TextServer::font_get_glyph_index, DEFVAL(0x0000));
- ClassDB::bind_method(D_METHOD("font_get_glyph_advance", "font", "index", "size"), &TextServer::font_get_glyph_advance);
- ClassDB::bind_method(D_METHOD("font_get_glyph_kerning", "font", "index_a", "index_b", "size"), &TextServer::font_get_glyph_kerning);
+ ClassDB::bind_method(D_METHOD("font_set_spacing", "font_rid", "size", "spacing", "value"), &TextServer::font_set_spacing);
+ ClassDB::bind_method(D_METHOD("font_get_spacing", "font_rid", "size", "spacing"), &TextServer::font_get_spacing);
- ClassDB::bind_method(D_METHOD("font_draw_glyph", "font", "canvas", "size", "pos", "index", "color"), &TextServer::font_draw_glyph, DEFVAL(Color(1, 1, 1)));
- ClassDB::bind_method(D_METHOD("font_draw_glyph_outline", "font", "canvas", "size", "outline_size", "pos", "index", "color"), &TextServer::font_draw_glyph_outline, DEFVAL(Color(1, 1, 1)));
+ ClassDB::bind_method(D_METHOD("font_get_texture_count", "font_rid", "size"), &TextServer::font_get_texture_count);
+ ClassDB::bind_method(D_METHOD("font_clear_textures", "font_rid", "size"), &TextServer::font_clear_textures);
+ ClassDB::bind_method(D_METHOD("font_remove_texture", "font_rid", "size", "texture_index"), &TextServer::font_remove_texture);
- ClassDB::bind_method(D_METHOD("font_get_oversampling"), &TextServer::font_get_oversampling);
- ClassDB::bind_method(D_METHOD("font_set_oversampling", "oversampling"), &TextServer::font_set_oversampling);
+ ClassDB::bind_method(D_METHOD("font_set_texture_image", "font_rid", "size", "texture_index", "image"), &TextServer::font_set_texture_image);
+ ClassDB::bind_method(D_METHOD("font_get_texture_image", "font_rid", "size", "texture_index"), &TextServer::font_get_texture_image);
- ClassDB::bind_method(D_METHOD("get_system_fonts"), &TextServer::get_system_fonts);
+ ClassDB::bind_method(D_METHOD("font_set_texture_offsets", "font_rid", "size", "texture_index", "offset"), &TextServer::font_set_texture_offsets);
+ ClassDB::bind_method(D_METHOD("font_get_texture_offsets", "font_rid", "size", "texture_index"), &TextServer::font_get_texture_offsets);
- ClassDB::bind_method(D_METHOD("get_hex_code_box_size", "size", "index"), &TextServer::get_hex_code_box_size);
- ClassDB::bind_method(D_METHOD("draw_hex_code_box", "canvas", "size", "pos", "index", "color"), &TextServer::draw_hex_code_box);
+ ClassDB::bind_method(D_METHOD("font_get_glyph_list", "font_rid", "size"), &TextServer::font_get_glyph_list);
+ ClassDB::bind_method(D_METHOD("font_clear_glyphs", "font_rid", "size"), &TextServer::font_clear_glyphs);
+ ClassDB::bind_method(D_METHOD("font_remove_glyph", "font_rid", "size", "glyph"), &TextServer::font_remove_glyph);
+
+ ClassDB::bind_method(D_METHOD("font_get_glyph_advance", "font_rid", "size", "glyph"), &TextServer::font_get_glyph_advance);
+ ClassDB::bind_method(D_METHOD("font_set_glyph_advance", "font_rid", "size", "glyph", "advance"), &TextServer::font_set_glyph_advance);
+
+ ClassDB::bind_method(D_METHOD("font_get_glyph_offset", "font_rid", "size", "glyph"), &TextServer::font_get_glyph_offset);
+ ClassDB::bind_method(D_METHOD("font_set_glyph_offset", "font_rid", "size", "glyph", "offset"), &TextServer::font_set_glyph_offset);
+
+ ClassDB::bind_method(D_METHOD("font_get_glyph_size", "font_rid", "size", "glyph"), &TextServer::font_get_glyph_size);
+ ClassDB::bind_method(D_METHOD("font_set_glyph_size", "font_rid", "size", "glyph", "gl_size"), &TextServer::font_set_glyph_size);
+
+ ClassDB::bind_method(D_METHOD("font_get_glyph_uv_rect", "font_rid", "size", "glyph"), &TextServer::font_get_glyph_uv_rect);
+ ClassDB::bind_method(D_METHOD("font_set_glyph_uv_rect", "font_rid", "size", "glyph", "uv_rect"), &TextServer::font_set_glyph_uv_rect);
+
+ ClassDB::bind_method(D_METHOD("font_get_glyph_texture_idx", "font_rid", "size", "glyph"), &TextServer::font_get_glyph_texture_idx);
+ ClassDB::bind_method(D_METHOD("font_set_glyph_texture_idx", "font_rid", "size", "glyph", "texture_idx"), &TextServer::font_set_glyph_texture_idx);
ClassDB::bind_method(D_METHOD("font_get_glyph_contours", "font", "size", "index"), &TextServer::_font_get_glyph_contours);
+ ClassDB::bind_method(D_METHOD("font_get_kerning_list", "font_rid", "size"), &TextServer::font_get_kerning_list);
+ ClassDB::bind_method(D_METHOD("font_clear_kerning_map", "font_rid", "size"), &TextServer::font_clear_kerning_map);
+ ClassDB::bind_method(D_METHOD("font_remove_kerning", "font_rid", "size", "glyph_pair"), &TextServer::font_remove_kerning);
+
+ ClassDB::bind_method(D_METHOD("font_set_kerning", "font_rid", "size", "glyph_pair", "kerning"), &TextServer::font_set_kerning);
+ ClassDB::bind_method(D_METHOD("font_get_kerning", "font_rid", "size", "glyph_pair"), &TextServer::font_get_kerning);
+
+ ClassDB::bind_method(D_METHOD("font_get_glyph_index", "font_rid", "size", "char", "variation_selector"), &TextServer::font_get_glyph_index);
+
+ ClassDB::bind_method(D_METHOD("font_has_char", "font_rid", "char"), &TextServer::font_has_char);
+ ClassDB::bind_method(D_METHOD("font_get_supported_chars", "font_rid"), &TextServer::font_get_supported_chars);
+
+ ClassDB::bind_method(D_METHOD("font_render_range", "font_rid", "size", "start", "end"), &TextServer::font_render_range);
+ ClassDB::bind_method(D_METHOD("font_render_glyph", "font_rid", "size", "index"), &TextServer::font_render_glyph);
+
+ ClassDB::bind_method(D_METHOD("font_draw_glyph", "font_rid", "canvas", "size", "pos", "index", "color"), &TextServer::font_draw_glyph, DEFVAL(Color(1, 1, 1)));
+ ClassDB::bind_method(D_METHOD("font_draw_glyph_outline", "font_rid", "canvas", "size", "outline_size", "pos", "index", "color"), &TextServer::font_draw_glyph_outline, DEFVAL(Color(1, 1, 1)));
+
+ ClassDB::bind_method(D_METHOD("font_is_language_supported", "font_rid", "language"), &TextServer::font_is_language_supported);
+ ClassDB::bind_method(D_METHOD("font_set_language_support_override", "font_rid", "language", "supported"), &TextServer::font_set_language_support_override);
+ ClassDB::bind_method(D_METHOD("font_get_language_support_override", "font_rid", "language"), &TextServer::font_get_language_support_override);
+ ClassDB::bind_method(D_METHOD("font_remove_language_support_override", "font_rid", "language"), &TextServer::font_remove_language_support_override);
+ ClassDB::bind_method(D_METHOD("font_get_language_support_overrides", "font_rid"), &TextServer::font_get_language_support_overrides);
+
+ ClassDB::bind_method(D_METHOD("font_is_script_supported", "font_rid", "script"), &TextServer::font_is_script_supported);
+ ClassDB::bind_method(D_METHOD("font_set_script_support_override", "font_rid", "script", "supported"), &TextServer::font_set_script_support_override);
+ ClassDB::bind_method(D_METHOD("font_get_script_support_override", "font_rid", "script"), &TextServer::font_get_script_support_override);
+ ClassDB::bind_method(D_METHOD("font_remove_script_support_override", "font_rid", "script"), &TextServer::font_remove_script_support_override);
+ ClassDB::bind_method(D_METHOD("font_get_script_support_overrides", "font_rid"), &TextServer::font_get_script_support_overrides);
+
+ ClassDB::bind_method(D_METHOD("font_supported_feature_list", "font_rid"), &TextServer::font_supported_feature_list);
+ ClassDB::bind_method(D_METHOD("font_supported_variation_list", "font_rid"), &TextServer::font_supported_variation_list);
+
+ ClassDB::bind_method(D_METHOD("font_get_global_oversampling"), &TextServer::font_get_global_oversampling);
+ ClassDB::bind_method(D_METHOD("font_set_global_oversampling", "oversampling"), &TextServer::font_set_global_oversampling);
+
+ ClassDB::bind_method(D_METHOD("get_hex_code_box_size", "size", "index"), &TextServer::get_hex_code_box_size);
+ ClassDB::bind_method(D_METHOD("draw_hex_code_box", "canvas", "size", "pos", "index", "color"), &TextServer::draw_hex_code_box);
+
/* Shaped text buffer interface */
ClassDB::bind_method(D_METHOD("create_shaped_text", "direction", "orientation"), &TextServer::create_shaped_text, DEFVAL(DIRECTION_AUTO), DEFVAL(ORIENTATION_HORIZONTAL));
@@ -400,6 +447,8 @@ void TextServer::_bind_methods() {
BIND_ENUM_CONSTANT(GRAPHEME_IS_TAB);
BIND_ENUM_CONSTANT(GRAPHEME_IS_ELONGATION);
BIND_ENUM_CONSTANT(GRAPHEME_IS_PUNCTUATION);
+ BIND_ENUM_CONSTANT(GRAPHEME_IS_UNDERSCORE);
+ BIND_ENUM_CONSTANT(GRAPHEME_IS_CONNECTED);
/* Hinting */
BIND_ENUM_CONSTANT(HINTING_NONE);
@@ -420,6 +469,12 @@ void TextServer::_bind_methods() {
BIND_ENUM_CONSTANT(CONTOUR_CURVE_TAG_ON);
BIND_ENUM_CONSTANT(CONTOUR_CURVE_TAG_OFF_CONIC);
BIND_ENUM_CONSTANT(CONTOUR_CURVE_TAG_OFF_CUBIC);
+
+ /* Font Spacing*/
+ BIND_ENUM_CONSTANT(SPACING_GLYPH);
+ BIND_ENUM_CONSTANT(SPACING_SPACE);
+ BIND_ENUM_CONSTANT(SPACING_TOP);
+ BIND_ENUM_CONSTANT(SPACING_BOTTOM);
}
Vector3 TextServer::hex_code_box_font_size[2] = { Vector3(5, 5, 1), Vector3(10, 10, 2) };
@@ -514,8 +569,8 @@ void TextServer::finish_hex_code_box_fonts() {
Vector2 TextServer::get_hex_code_box_size(int p_size, char32_t p_index) const {
int fnt = (p_size < 20) ? 0 : 1;
- float w = ((p_index <= 0xFF) ? 1 : ((p_index <= 0xFFFF) ? 2 : 3)) * hex_code_box_font_size[fnt].x;
- float h = 2 * hex_code_box_font_size[fnt].y;
+ real_t w = ((p_index <= 0xFF) ? 1 : ((p_index <= 0xFFFF) ? 2 : 3)) * hex_code_box_font_size[fnt].x;
+ real_t h = 2 * hex_code_box_font_size[fnt].y;
return Vector2(w + 4, h + 3 + 2 * hex_code_box_font_size[fnt].z);
}
@@ -534,8 +589,8 @@ void TextServer::draw_hex_code_box(RID p_canvas, int p_size, const Vector2 &p_po
Vector2 pos = p_pos;
Rect2 dest = Rect2(Vector2(), Vector2(hex_code_box_font_size[fnt].x, hex_code_box_font_size[fnt].y));
- float w = ((p_index <= 0xFF) ? 1 : ((p_index <= 0xFFFF) ? 2 : 3)) * hex_code_box_font_size[fnt].x;
- float h = 2 * hex_code_box_font_size[fnt].y;
+ real_t w = ((p_index <= 0xFF) ? 1 : ((p_index <= 0xFFFF) ? 2 : 3)) * hex_code_box_font_size[fnt].x;
+ real_t h = 2 * hex_code_box_font_size[fnt].y;
pos.y -= Math::floor((h + 3 + hex_code_box_font_size[fnt].z) * 0.75);
@@ -575,7 +630,7 @@ void TextServer::draw_hex_code_box(RID p_canvas, int p_size, const Vector2 &p_po
}
}
-Vector<Vector2i> TextServer::shaped_text_get_line_breaks_adv(RID p_shaped, const Vector<float> &p_width, int p_start, bool p_once, uint8_t /*TextBreakFlag*/ p_break_flags) const {
+Vector<Vector2i> TextServer::shaped_text_get_line_breaks_adv(RID p_shaped, const Vector<real_t> &p_width, int p_start, bool p_once, uint8_t /*TextBreakFlag*/ p_break_flags) const {
Vector<Vector2i> lines;
ERR_FAIL_COND_V(p_width.is_empty(), lines);
@@ -584,7 +639,7 @@ Vector<Vector2i> TextServer::shaped_text_get_line_breaks_adv(RID p_shaped, const
const Vector<Glyph> &logical = const_cast<TextServer *>(this)->shaped_text_sort_logical(p_shaped);
const Vector2i &range = shaped_text_get_range(p_shaped);
- float width = 0.f;
+ real_t width = 0.f;
int line_start = MAX(p_start, range.x);
int last_safe_break = -1;
int chunk = 0;
@@ -646,14 +701,14 @@ Vector<Vector2i> TextServer::shaped_text_get_line_breaks_adv(RID p_shaped, const
return lines;
}
-Vector<Vector2i> TextServer::shaped_text_get_line_breaks(RID p_shaped, float p_width, int p_start, uint8_t /*TextBreakFlag*/ p_break_flags) const {
+Vector<Vector2i> TextServer::shaped_text_get_line_breaks(RID p_shaped, real_t p_width, int p_start, uint8_t /*TextBreakFlag*/ p_break_flags) const {
Vector<Vector2i> lines;
const_cast<TextServer *>(this)->shaped_text_update_breaks(p_shaped);
const Vector<Glyph> &logical = const_cast<TextServer *>(this)->shaped_text_sort_logical(p_shaped);
const Vector2i &range = shaped_text_get_range(p_shaped);
- float width = 0.f;
+ real_t width = 0.f;
int line_start = MAX(p_start, range.x);
int last_safe_break = -1;
int word_count = 0;
@@ -665,9 +720,7 @@ Vector<Vector2i> TextServer::shaped_text_get_line_breaks(RID p_shaped, float p_w
continue;
}
if (l_gl[i].count > 0) {
- //Ignore trailing spaces.
- bool is_space = (l_gl[i].flags & GRAPHEME_IS_SPACE) == GRAPHEME_IS_SPACE;
- if ((p_width > 0) && (width + (is_space ? 0 : l_gl[i].advance) > p_width) && (last_safe_break >= 0)) {
+ if ((p_width > 0) && (width + l_gl[i].advance * l_gl[i].repeat > p_width) && (last_safe_break >= 0)) {
lines.push_back(Vector2i(line_start, l_gl[last_safe_break].end));
line_start = l_gl[last_safe_break].end;
i = last_safe_break;
@@ -698,7 +751,7 @@ Vector<Vector2i> TextServer::shaped_text_get_line_breaks(RID p_shaped, float p_w
last_safe_break = i;
}
}
- width += l_gl[i].advance;
+ width += l_gl[i].advance * l_gl[i].repeat;
}
if (l_size > 0) {
@@ -749,11 +802,11 @@ void TextServer::shaped_text_get_carets(RID p_shaped, int p_position, Rect2 &p_l
const Vector<TextServer::Glyph> visual = shaped_text_get_glyphs(p_shaped);
TextServer::Orientation orientation = shaped_text_get_orientation(p_shaped);
const Vector2 &range = shaped_text_get_range(p_shaped);
- float ascent = shaped_text_get_ascent(p_shaped);
- float descent = shaped_text_get_descent(p_shaped);
- float height = (ascent + descent) / 2;
+ real_t ascent = shaped_text_get_ascent(p_shaped);
+ real_t descent = shaped_text_get_descent(p_shaped);
+ real_t height = (ascent + descent) / 2;
- float off = 0.0f;
+ real_t off = 0.0f;
p_leading_dir = DIRECTION_AUTO;
p_trailing_dir = DIRECTION_AUTO;
@@ -859,11 +912,11 @@ void TextServer::shaped_text_get_carets(RID p_shaped, int p_position, Rect2 &p_l
}
// Caret inside grapheme (middle).
if (p_position > glyphs[i].start && p_position < glyphs[i].end && (glyphs[i].flags & GRAPHEME_IS_VIRTUAL) != GRAPHEME_IS_VIRTUAL) {
- float advance = 0.f;
+ real_t advance = 0.f;
for (int j = 0; j < glyphs[i].count; j++) {
advance += glyphs[i + j].advance * glyphs[i + j].repeat;
}
- float char_adv = advance / (float)(glyphs[i].end - glyphs[i].start);
+ real_t char_adv = advance / (real_t)(glyphs[i].end - glyphs[i].start);
Rect2 cr;
if (orientation == ORIENTATION_HORIZONTAL) {
cr.size.x = 1.0f;
@@ -942,14 +995,14 @@ Vector<Vector2> TextServer::shaped_text_get_selection(RID p_shaped, int p_start,
int v_size = visual.size();
const Glyph *glyphs = visual.ptr();
- float off = 0.0f;
+ real_t off = 0.0f;
for (int i = 0; i < v_size; i++) {
for (int k = 0; k < glyphs[i].repeat; k++) {
if ((glyphs[i].count > 0) && ((glyphs[i].index != 0) || ((glyphs[i].flags & GRAPHEME_IS_SPACE) == GRAPHEME_IS_SPACE))) {
if (glyphs[i].start < end && glyphs[i].end > start) {
// Grapheme fully in selection range.
if (glyphs[i].start >= start && glyphs[i].end <= end) {
- float advance = 0.f;
+ real_t advance = 0.f;
for (int j = 0; j < glyphs[i].count; j++) {
advance += glyphs[i + j].advance;
}
@@ -957,11 +1010,11 @@ Vector<Vector2> TextServer::shaped_text_get_selection(RID p_shaped, int p_start,
}
// Only start of grapheme is in selection range.
if (glyphs[i].start >= start && glyphs[i].end > end) {
- float advance = 0.f;
+ real_t advance = 0.f;
for (int j = 0; j < glyphs[i].count; j++) {
advance += glyphs[i + j].advance;
}
- float char_adv = advance / (float)(glyphs[i].end - glyphs[i].start);
+ real_t char_adv = advance / (real_t)(glyphs[i].end - glyphs[i].start);
if ((glyphs[i].flags & GRAPHEME_IS_RTL) == GRAPHEME_IS_RTL) {
ranges.push_back(Vector2(off + char_adv * (glyphs[i].end - end), off + advance));
} else {
@@ -970,11 +1023,11 @@ Vector<Vector2> TextServer::shaped_text_get_selection(RID p_shaped, int p_start,
}
// Only end of grapheme is in selection range.
if (glyphs[i].start < start && glyphs[i].end <= end) {
- float advance = 0.f;
+ real_t advance = 0.f;
for (int j = 0; j < glyphs[i].count; j++) {
advance += glyphs[i + j].advance;
}
- float char_adv = advance / (float)(glyphs[i].end - glyphs[i].start);
+ real_t char_adv = advance / (real_t)(glyphs[i].end - glyphs[i].start);
if ((glyphs[i].flags & GRAPHEME_IS_RTL) == GRAPHEME_IS_RTL) {
ranges.push_back(Vector2(off, off + char_adv * (start - glyphs[i].start)));
} else {
@@ -983,11 +1036,11 @@ Vector<Vector2> TextServer::shaped_text_get_selection(RID p_shaped, int p_start,
}
// Selection range is within grapheme.
if (glyphs[i].start < start && glyphs[i].end > end) {
- float advance = 0.f;
+ real_t advance = 0.f;
for (int j = 0; j < glyphs[i].count; j++) {
advance += glyphs[i + j].advance;
}
- float char_adv = advance / (float)(glyphs[i].end - glyphs[i].start);
+ real_t char_adv = advance / (real_t)(glyphs[i].end - glyphs[i].start);
if ((glyphs[i].flags & GRAPHEME_IS_RTL) == GRAPHEME_IS_RTL) {
ranges.push_back(Vector2(off + char_adv * (glyphs[i].end - end), off + char_adv * (glyphs[i].end - start)));
} else {
@@ -1022,11 +1075,11 @@ Vector<Vector2> TextServer::shaped_text_get_selection(RID p_shaped, int p_start,
return ranges;
}
-int TextServer::shaped_text_hit_test_grapheme(RID p_shaped, float p_coords) const {
+int TextServer::shaped_text_hit_test_grapheme(RID p_shaped, real_t p_coords) const {
const Vector<TextServer::Glyph> visual = shaped_text_get_glyphs(p_shaped);
// Exact grapheme hit test, return -1 if missed.
- float off = 0.0f;
+ real_t off = 0.0f;
int v_size = visual.size();
const Glyph *glyphs = visual.ptr();
@@ -1042,7 +1095,7 @@ int TextServer::shaped_text_hit_test_grapheme(RID p_shaped, float p_coords) cons
return -1;
}
-int TextServer::shaped_text_hit_test_position(RID p_shaped, float p_coords) const {
+int TextServer::shaped_text_hit_test_position(RID p_shaped, real_t p_coords) const {
const Vector<TextServer::Glyph> visual = shaped_text_get_glyphs(p_shaped);
int v_size = visual.size();
@@ -1076,10 +1129,10 @@ int TextServer::shaped_text_hit_test_position(RID p_shaped, float p_coords) cons
}
}
- float off = 0.0f;
+ real_t off = 0.0f;
for (int i = 0; i < v_size; i++) {
if (glyphs[i].count > 0) {
- float advance = 0.f;
+ real_t advance = 0.f;
for (int j = 0; j < glyphs[i].count; j++) {
advance += glyphs[i + j].advance * glyphs[i + j].repeat;
}
@@ -1137,7 +1190,7 @@ int TextServer::shaped_text_prev_grapheme_pos(RID p_shaped, int p_pos) {
return p_pos;
}
-void TextServer::shaped_text_draw(RID p_shaped, RID p_canvas, const Vector2 &p_pos, float p_clip_l, float p_clip_r, const Color &p_color) const {
+void TextServer::shaped_text_draw(RID p_shaped, RID p_canvas, const Vector2 &p_pos, real_t p_clip_l, real_t p_clip_r, const Color &p_color) const {
const Vector<TextServer::Glyph> visual = shaped_text_get_glyphs(p_shaped);
TextServer::Orientation orientation = shaped_text_get_orientation(p_shaped);
bool hex_codes = shaped_text_get_preserve_control(p_shaped) || shaped_text_get_preserve_invalid(p_shaped);
@@ -1230,7 +1283,7 @@ void TextServer::shaped_text_draw(RID p_shaped, RID p_canvas, const Vector2 &p_p
}
}
-void TextServer::shaped_text_draw_outline(RID p_shaped, RID p_canvas, const Vector2 &p_pos, float p_clip_l, float p_clip_r, int p_outline_size, const Color &p_color) const {
+void TextServer::shaped_text_draw_outline(RID p_shaped, RID p_canvas, const Vector2 &p_pos, real_t p_clip_l, real_t p_clip_r, int p_outline_size, const Color &p_color) const {
const Vector<TextServer::Glyph> visual = shaped_text_get_glyphs(p_shaped);
TextServer::Orientation orientation = shaped_text_get_orientation(p_shaped);
@@ -1318,11 +1371,7 @@ void TextServer::shaped_text_draw_outline(RID p_shaped, RID p_canvas, const Vect
}
}
-RID TextServer::_create_font_memory(const PackedByteArray &p_data, const String &p_type, int p_base_size) {
- return create_font_memory(p_data.ptr(), p_data.size(), p_type, p_base_size);
-}
-
-Dictionary TextServer::_font_get_glyph_contours(RID p_font, int p_size, uint32_t p_index) const {
+Dictionary TextServer::_font_get_glyph_contours(RID p_font, int p_size, int32_t p_index) const {
Vector<Vector3> points;
Vector<int32_t> contours;
bool orientation;
@@ -1380,7 +1429,7 @@ Array TextServer::_shaped_text_get_line_breaks_adv(RID p_shaped, const PackedFlo
return ret;
}
-Array TextServer::_shaped_text_get_line_breaks(RID p_shaped, float p_width, int p_start, uint8_t p_break_flags) const {
+Array TextServer::_shaped_text_get_line_breaks(RID p_shaped, real_t p_width, int p_start, uint8_t p_break_flags) const {
Array ret;
Vector<Vector2i> lines = shaped_text_get_line_breaks(p_shaped, p_width, p_start, p_break_flags);
diff --git a/servers/text_server.h b/servers/text_server.h
index 26993838a3..90ad9b493b 100644
--- a/servers/text_server.h
+++ b/servers/text_server.h
@@ -91,6 +91,7 @@ public:
GRAPHEME_IS_ELONGATION = 1 << 7, // Elongation (e.g. kashida), glyph can be duplicated or truncated to fit line to width.
GRAPHEME_IS_PUNCTUATION = 1 << 8, // Punctuation, except underscore (can be used as word break, but not line break or justifiction).
GRAPHEME_IS_UNDERSCORE = 1 << 9, // Underscore (can be used as word break).
+ GRAPHEME_IS_CONNECTED = 1 << 10, // Connected to previous grapheme.
};
enum Hinting {
@@ -116,6 +117,13 @@ public:
CONTOUR_CURVE_TAG_OFF_CUBIC = 0x02
};
+ enum SpacingType {
+ SPACING_GLYPH,
+ SPACING_SPACE,
+ SPACING_TOP,
+ SPACING_BOTTOM,
+ };
+
struct Glyph {
int start = -1; // Start offset in the source string.
int end = -1; // End offset in the source string.
@@ -124,13 +132,13 @@ public:
uint8_t repeat = 1; // Draw multiple times in the row.
uint16_t flags = 0; // Grapheme flags (valid, rtl, virtual), set in the first glyph only.
- float x_off = 0.f; // Offset from the origin of the glyph on baseline.
- float y_off = 0.f;
- float advance = 0.f; // Advance to the next glyph along baseline(x for horizontal layout, y for vertical).
+ real_t x_off = 0.f; // Offset from the origin of the glyph on baseline.
+ real_t y_off = 0.f;
+ real_t advance = 0.f; // Advance to the next glyph along baseline(x for horizontal layout, y for vertical).
RID font_rid; // Font resource.
int font_size = 0; // Font size;
- uint32_t index = 0; // Glyph index (font specific) or UTF-32 codepoint (for the invalid glyphs).
+ int32_t index = 0; // Glyph index (font specific) or UTF-32 codepoint (for the invalid glyphs).
bool operator==(const Glyph &p_a) const;
bool operator!=(const Glyph &p_a) const;
@@ -163,6 +171,8 @@ public:
};
struct ShapedTextData {
+ Mutex mutex;
+
/* Source data */
RID parent; // Substring parent ShapedTextData.
@@ -205,13 +215,13 @@ public:
bool preserve_invalid = true; // Draw hex code box instead of missing characters.
bool preserve_control = false; // Draw control characters.
- float ascent = 0.f; // Ascent for horizontal layout, 1/2 of width for vertical.
- float descent = 0.f; // Descent for horizontal layout, 1/2 of width for vertical.
- float width = 0.f; // Width for horizontal layout, height for vertical.
- float width_trimmed = 0.f;
+ real_t ascent = 0.f; // Ascent for horizontal layout, 1/2 of width for vertical.
+ real_t descent = 0.f; // Descent for horizontal layout, 1/2 of width for vertical.
+ real_t width = 0.f; // Width for horizontal layout, height for vertical.
+ real_t width_trimmed = 0.f;
- float upos = 0.f;
- float uthk = 0.f;
+ real_t upos = 0.f;
+ real_t uthk = 0.f;
TrimData overrun_trim_data;
bool fit_width_minimum_reached = false;
@@ -245,85 +255,134 @@ public:
virtual bool is_locale_right_to_left(const String &p_locale) = 0;
- virtual int32_t name_to_tag(const String &p_name) { return 0; };
- virtual String tag_to_name(int32_t p_tag) { return ""; };
+ virtual int32_t name_to_tag(const String &p_name) const { return 0; };
+ virtual String tag_to_name(int32_t p_tag) const { return ""; };
/* Font interface */
- virtual RID create_font_system(const String &p_name, int p_base_size = 16) = 0;
- virtual RID create_font_resource(const String &p_filename, int p_base_size = 16) = 0;
- virtual RID create_font_memory(const uint8_t *p_data, size_t p_size, const String &p_type, int p_base_size = 16) = 0;
- virtual RID create_font_bitmap(float p_height, float p_ascent, int p_base_size = 16) = 0;
+ virtual RID create_font() = 0;
+
+ virtual void font_set_data(RID p_font_rid, const PackedByteArray &p_data) = 0;
+ virtual void font_set_data_ptr(RID p_font_rid, const uint8_t *p_data_ptr, size_t p_data_size) = 0;
+
+ virtual void font_set_antialiased(RID p_font_rid, bool p_antialiased) = 0;
+ virtual bool font_is_antialiased(RID p_font_rid) const = 0;
+
+ virtual void font_set_multichannel_signed_distance_field(RID p_font_rid, bool p_msdf) = 0;
+ virtual bool font_is_multichannel_signed_distance_field(RID p_font_rid) const = 0;
+
+ virtual void font_set_msdf_pixel_range(RID p_font_rid, int p_msdf_pixel_range) = 0;
+ virtual int font_get_msdf_pixel_range(RID p_font_rid) const = 0;
+
+ virtual void font_set_msdf_size(RID p_font_rid, int p_msdf_size) = 0;
+ virtual int font_get_msdf_size(RID p_font_rid) const = 0;
+
+ virtual void font_set_fixed_size(RID p_font_rid, int p_fixed_size) = 0;
+ virtual int font_get_fixed_size(RID p_font_rid) const = 0;
+
+ virtual void font_set_force_autohinter(RID p_font_rid, bool p_force_autohinter) = 0;
+ virtual bool font_is_force_autohinter(RID p_font_rid) const = 0;
+
+ virtual void font_set_hinting(RID p_font_rid, TextServer::Hinting p_hinting) = 0;
+ virtual TextServer::Hinting font_get_hinting(RID p_font_rid) const = 0;
- virtual void font_bitmap_add_texture(RID p_font, const Ref<Texture> &p_texture) = 0;
- virtual void font_bitmap_add_char(RID p_font, char32_t p_char, int p_texture_idx, const Rect2 &p_rect, const Size2 &p_align, float p_advance) = 0;
- virtual void font_bitmap_add_kerning_pair(RID p_font, char32_t p_A, char32_t p_B, int p_kerning) = 0;
+ virtual void font_set_variation_coordinates(RID p_font_rid, const Dictionary &p_variation_coordinates) = 0;
+ virtual Dictionary font_get_variation_coordinates(RID p_font_rid) const = 0;
- virtual float font_get_height(RID p_font, int p_size) const = 0;
- virtual float font_get_ascent(RID p_font, int p_size) const = 0;
- virtual float font_get_descent(RID p_font, int p_size) const = 0;
+ virtual void font_set_oversampling(RID p_font_rid, real_t p_oversampling) = 0;
+ virtual real_t font_get_oversampling(RID p_font_rid) const = 0;
- virtual int font_get_spacing_space(RID p_font) const = 0;
- virtual void font_set_spacing_space(RID p_font, int p_value) = 0;
+ virtual Array font_get_size_cache_list(RID p_font_rid) const = 0;
+ virtual void font_clear_size_cache(RID p_font_rid) = 0;
+ virtual void font_remove_size_cache(RID p_font_rid, const Vector2i &p_size) = 0;
- virtual int font_get_spacing_glyph(RID p_font) const = 0;
- virtual void font_set_spacing_glyph(RID p_font, int p_value) = 0;
+ virtual void font_set_ascent(RID p_font_rid, int p_size, real_t p_ascent) = 0;
+ virtual real_t font_get_ascent(RID p_font_rid, int p_size) const = 0;
- virtual float font_get_underline_position(RID p_font, int p_size) const = 0;
- virtual float font_get_underline_thickness(RID p_font, int p_size) const = 0;
+ virtual void font_set_descent(RID p_font_rid, int p_size, real_t p_descent) = 0;
+ virtual real_t font_get_descent(RID p_font_rid, int p_size) const = 0;
- virtual void font_set_antialiased(RID p_font, bool p_antialiased) = 0;
- virtual bool font_get_antialiased(RID p_font) const = 0;
+ virtual void font_set_underline_position(RID p_font_rid, int p_size, real_t p_underline_position) = 0;
+ virtual real_t font_get_underline_position(RID p_font_rid, int p_size) const = 0;
- virtual Dictionary font_get_feature_list(RID p_font) const { return Dictionary(); };
- virtual Dictionary font_get_variation_list(RID p_font) const { return Dictionary(); };
+ virtual void font_set_underline_thickness(RID p_font_rid, int p_size, real_t p_underline_thickness) = 0;
+ virtual real_t font_get_underline_thickness(RID p_font_rid, int p_size) const = 0;
- virtual void font_set_variation(RID p_font, const String &p_name, double p_value){};
- virtual double font_get_variation(RID p_font, const String &p_name) const { return 0; };
+ virtual void font_set_scale(RID p_font_rid, int p_size, real_t p_scale) = 0;
+ virtual real_t font_get_scale(RID p_font_rid, int p_size) const = 0;
- virtual void font_set_distance_field_hint(RID p_font, bool p_distance_field) = 0;
- virtual bool font_get_distance_field_hint(RID p_font) const = 0;
+ virtual void font_set_spacing(RID p_font_rid, int p_size, SpacingType p_spacing, int p_value) = 0;
+ virtual int font_get_spacing(RID p_font_rid, int p_size, SpacingType p_spacing) const = 0;
- virtual void font_set_hinting(RID p_font, Hinting p_hinting) = 0;
- virtual Hinting font_get_hinting(RID p_font) const = 0;
+ virtual int font_get_texture_count(RID p_font_rid, const Vector2i &p_size) const = 0;
+ virtual void font_clear_textures(RID p_font_rid, const Vector2i &p_size) = 0;
+ virtual void font_remove_texture(RID p_font_rid, const Vector2i &p_size, int p_texture_index) = 0;
- virtual void font_set_force_autohinter(RID p_font, bool p_enabeld) = 0;
- virtual bool font_get_force_autohinter(RID p_font) const = 0;
+ virtual void font_set_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const Ref<Image> &p_image) = 0;
+ virtual Ref<Image> font_get_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const = 0;
- virtual bool font_has_char(RID p_font, char32_t p_char) const = 0;
- virtual String font_get_supported_chars(RID p_font) const = 0;
+ virtual void font_set_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const PackedInt32Array &p_offset) = 0;
+ virtual PackedInt32Array font_get_texture_offsets(RID p_font_rid, const Vector2i &p_size, int p_texture_index) const = 0;
- virtual bool font_has_outline(RID p_font) const = 0;
- virtual float font_get_base_size(RID p_font) const = 0;
+ virtual Array font_get_glyph_list(RID p_font_rid, const Vector2i &p_size) const = 0;
+ virtual void font_clear_glyphs(RID p_font_rid, const Vector2i &p_size) = 0;
+ virtual void font_remove_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) = 0;
- virtual bool font_is_language_supported(RID p_font, const String &p_language) const = 0;
- virtual void font_set_language_support_override(RID p_font, const String &p_language, bool p_supported) = 0;
- virtual bool font_get_language_support_override(RID p_font, const String &p_language) = 0;
- virtual void font_remove_language_support_override(RID p_font, const String &p_language) = 0;
- virtual Vector<String> font_get_language_support_overrides(RID p_font) = 0;
+ virtual Vector2 font_get_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph) const = 0;
+ virtual void font_set_glyph_advance(RID p_font_rid, int p_size, int32_t p_glyph, const Vector2 &p_advance) = 0;
- virtual bool font_is_script_supported(RID p_font, const String &p_script) const = 0;
- virtual void font_set_script_support_override(RID p_font, const String &p_script, bool p_supported) = 0;
- virtual bool font_get_script_support_override(RID p_font, const String &p_script) = 0;
- virtual void font_remove_script_support_override(RID p_font, const String &p_script) = 0;
- virtual Vector<String> font_get_script_support_overrides(RID p_font) = 0;
+ virtual Vector2 font_get_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const = 0;
+ virtual void font_set_glyph_offset(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_offset) = 0;
- virtual uint32_t font_get_glyph_index(RID p_font, char32_t p_char, char32_t p_variation_selector = 0x0000) const = 0;
- virtual Vector2 font_get_glyph_advance(RID p_font, uint32_t p_index, int p_size) const = 0;
- virtual Vector2 font_get_glyph_kerning(RID p_font, uint32_t p_index_a, uint32_t p_index_b, int p_size) const = 0;
+ virtual Vector2 font_get_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const = 0;
+ virtual void font_set_glyph_size(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Vector2 &p_gl_size) = 0;
- virtual Vector2 font_draw_glyph(RID p_font, RID p_canvas, int p_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color = Color(1, 1, 1)) const = 0;
- virtual Vector2 font_draw_glyph_outline(RID p_font, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, uint32_t p_index, const Color &p_color = Color(1, 1, 1)) const = 0;
+ virtual Rect2 font_get_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const = 0;
+ virtual void font_set_glyph_uv_rect(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, const Rect2 &p_uv_rect) = 0;
- virtual bool font_get_glyph_contours(RID p_font, int p_size, uint32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const = 0;
+ virtual int font_get_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph) const = 0;
+ virtual void font_set_glyph_texture_idx(RID p_font_rid, const Vector2i &p_size, int32_t p_glyph, int p_texture_idx) = 0;
- virtual float font_get_oversampling() const = 0;
- virtual void font_set_oversampling(float p_oversampling) = 0;
+ virtual bool font_get_glyph_contours(RID p_font, int p_size, int32_t p_index, Vector<Vector3> &r_points, Vector<int32_t> &r_contours, bool &r_orientation) const = 0;
+
+ virtual Array font_get_kerning_list(RID p_font_rid, int p_size) const = 0;
+ virtual void font_clear_kerning_map(RID p_font_rid, int p_size) = 0;
+ virtual void font_remove_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) = 0;
+
+ virtual void font_set_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair, const Vector2 &p_kerning) = 0;
+ virtual Vector2 font_get_kerning(RID p_font_rid, int p_size, const Vector2i &p_glyph_pair) const = 0;
+
+ virtual int32_t font_get_glyph_index(RID p_font_rid, int p_size, char32_t p_char, char32_t p_variation_selector) const = 0;
+
+ virtual bool font_has_char(RID p_font_rid, char32_t p_char) const = 0;
+ virtual String font_get_supported_chars(RID p_font_rid) const = 0;
+
+ virtual void font_render_range(RID p_font, const Vector2i &p_size, char32_t p_start, char32_t p_end) = 0;
+ virtual void font_render_glyph(RID p_font_rid, const Vector2i &p_size, int32_t p_index) = 0;
+
+ virtual void font_draw_glyph(RID p_font, RID p_canvas, int p_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color = Color(1, 1, 1)) const = 0;
+ virtual void font_draw_glyph_outline(RID p_font, RID p_canvas, int p_size, int p_outline_size, const Vector2 &p_pos, int32_t p_index, const Color &p_color = Color(1, 1, 1)) const = 0;
+
+ virtual bool font_is_language_supported(RID p_font_rid, const String &p_language) const = 0;
+ virtual void font_set_language_support_override(RID p_font_rid, const String &p_language, bool p_supported) = 0;
+ virtual bool font_get_language_support_override(RID p_font_rid, const String &p_language) = 0;
+ virtual void font_remove_language_support_override(RID p_font_rid, const String &p_language) = 0;
+ virtual Vector<String> font_get_language_support_overrides(RID p_font_rid) = 0;
+
+ virtual bool font_is_script_supported(RID p_font_rid, const String &p_script) const = 0;
+ virtual void font_set_script_support_override(RID p_font_rid, const String &p_script, bool p_supported) = 0;
+ virtual bool font_get_script_support_override(RID p_font_rid, const String &p_script) = 0;
+ virtual void font_remove_script_support_override(RID p_font_rid, const String &p_script) = 0;
+ virtual Vector<String> font_get_script_support_overrides(RID p_font_rid) = 0;
+
+ virtual Dictionary font_supported_feature_list(RID p_font_rid) const = 0;
+ virtual Dictionary font_supported_variation_list(RID p_font_rid) const = 0;
+
+ virtual real_t font_get_global_oversampling() const = 0;
+ virtual void font_set_global_oversampling(real_t p_oversampling) = 0;
Vector2 get_hex_code_box_size(int p_size, char32_t p_index) const;
void draw_hex_code_box(RID p_canvas, int p_size, const Vector2 &p_pos, char32_t p_index, const Color &p_color) const;
- virtual Vector<String> get_system_fonts() const = 0;
-
/* Shaped text buffer interface */
virtual RID create_shaped_text(Direction p_direction = DIRECTION_AUTO, Orientation p_orientation = ORIENTATION_HORIZONTAL) = 0;
@@ -351,8 +410,8 @@ public:
virtual RID shaped_text_substr(RID p_shaped, int p_start, int p_length) const = 0; // Copy shaped substring (e.g. line break) without reshaping, but correctly reordered, preservers range.
virtual RID shaped_text_get_parent(RID p_shaped) const = 0;
- virtual float shaped_text_fit_to_width(RID p_shaped, float p_width, uint8_t /*JustificationFlag*/ p_jst_flags = JUSTIFICATION_WORD_BOUND | JUSTIFICATION_KASHIDA) = 0;
- virtual float shaped_text_tab_align(RID p_shaped, const Vector<float> &p_tab_stops) = 0;
+ virtual real_t shaped_text_fit_to_width(RID p_shaped, real_t p_width, uint8_t /*JustificationFlag*/ p_jst_flags = JUSTIFICATION_WORD_BOUND | JUSTIFICATION_KASHIDA) = 0;
+ virtual real_t shaped_text_tab_align(RID p_shaped, const Vector<real_t> &p_tab_stops) = 0;
virtual bool shaped_text_shape(RID p_shaped) = 0;
virtual bool shaped_text_update_breaks(RID p_shaped) = 0;
@@ -366,36 +425,36 @@ public:
virtual Vector<Glyph> shaped_text_sort_logical(RID p_shaped) = 0;
- virtual Vector<Vector2i> shaped_text_get_line_breaks_adv(RID p_shaped, const Vector<float> &p_width, int p_start = 0, bool p_once = true, uint8_t /*TextBreakFlag*/ p_break_flags = BREAK_MANDATORY | BREAK_WORD_BOUND) const;
- virtual Vector<Vector2i> shaped_text_get_line_breaks(RID p_shaped, float p_width, int p_start = 0, uint8_t /*TextBreakFlag*/ p_break_flags = BREAK_MANDATORY | BREAK_WORD_BOUND) const;
+ virtual Vector<Vector2i> shaped_text_get_line_breaks_adv(RID p_shaped, const Vector<real_t> &p_width, int p_start = 0, bool p_once = true, uint8_t /*TextBreakFlag*/ p_break_flags = BREAK_MANDATORY | BREAK_WORD_BOUND) const;
+ virtual Vector<Vector2i> shaped_text_get_line_breaks(RID p_shaped, real_t p_width, int p_start = 0, uint8_t /*TextBreakFlag*/ p_break_flags = BREAK_MANDATORY | BREAK_WORD_BOUND) const;
virtual Vector<Vector2i> shaped_text_get_word_breaks(RID p_shaped, int p_grapheme_flags = GRAPHEME_IS_SPACE | GRAPHEME_IS_PUNCTUATION) const;
virtual TrimData shaped_text_get_trim_data(RID p_shaped) const;
- virtual void shaped_text_overrun_trim_to_width(RID p_shaped, float p_width, uint8_t p_trim_flags) = 0;
+ virtual void shaped_text_overrun_trim_to_width(RID p_shaped, real_t p_width, uint8_t p_trim_flags) = 0;
virtual Array shaped_text_get_objects(RID p_shaped) const = 0;
virtual Rect2 shaped_text_get_object_rect(RID p_shaped, Variant p_key) const = 0;
virtual Size2 shaped_text_get_size(RID p_shaped) const = 0;
- virtual float shaped_text_get_ascent(RID p_shaped) const = 0;
- virtual float shaped_text_get_descent(RID p_shaped) const = 0;
- virtual float shaped_text_get_width(RID p_shaped) const = 0;
- virtual float shaped_text_get_underline_position(RID p_shaped) const = 0;
- virtual float shaped_text_get_underline_thickness(RID p_shaped) const = 0;
+ virtual real_t shaped_text_get_ascent(RID p_shaped) const = 0;
+ virtual real_t shaped_text_get_descent(RID p_shaped) const = 0;
+ virtual real_t shaped_text_get_width(RID p_shaped) const = 0;
+ virtual real_t shaped_text_get_underline_position(RID p_shaped) const = 0;
+ virtual real_t shaped_text_get_underline_thickness(RID p_shaped) const = 0;
virtual Direction shaped_text_get_dominant_direciton_in_range(RID p_shaped, int p_start, int p_end) const;
virtual void shaped_text_get_carets(RID p_shaped, int p_position, Rect2 &p_leading_caret, Direction &p_leading_dir, Rect2 &p_trailing_caret, Direction &p_trailing_dir) const;
virtual Vector<Vector2> shaped_text_get_selection(RID p_shaped, int p_start, int p_end) const;
- virtual int shaped_text_hit_test_grapheme(RID p_shaped, float p_coords) const; // Return grapheme index.
- virtual int shaped_text_hit_test_position(RID p_shaped, float p_coords) const; // Return caret/selection position.
+ virtual int shaped_text_hit_test_grapheme(RID p_shaped, real_t p_coords) const; // Return grapheme index.
+ virtual int shaped_text_hit_test_position(RID p_shaped, real_t p_coords) const; // Return caret/selection position.
virtual int shaped_text_next_grapheme_pos(RID p_shaped, int p_pos);
virtual int shaped_text_prev_grapheme_pos(RID p_shaped, int p_pos);
// The pen position is always placed on the baseline and moveing left to right.
- virtual void shaped_text_draw(RID p_shaped, RID p_canvas, const Vector2 &p_pos, float p_clip_l = -1.f, float p_clip_r = -1.f, const Color &p_color = Color(1, 1, 1)) const;
- virtual void shaped_text_draw_outline(RID p_shaped, RID p_canvas, const Vector2 &p_pos, float p_clip_l = -1.f, float p_clip_r = -1.f, int p_outline_size = 1, const Color &p_color = Color(1, 1, 1)) const;
+ virtual void shaped_text_draw(RID p_shaped, RID p_canvas, const Vector2 &p_pos, real_t p_clip_l = -1.f, real_t p_clip_r = -1.f, const Color &p_color = Color(1, 1, 1)) const;
+ virtual void shaped_text_draw_outline(RID p_shaped, RID p_canvas, const Vector2 &p_pos, real_t p_clip_l = -1.f, real_t p_clip_r = -1.f, int p_outline_size = 1, const Color &p_color = Color(1, 1, 1)) const;
// Number conversion.
virtual String format_number(const String &p_string, const String &p_language = "") const { return p_string; };
@@ -403,9 +462,9 @@ public:
virtual String percent_sign(const String &p_language = "") const { return "%"; };
/* GDScript wrappers */
- RID _create_font_memory(const PackedByteArray &p_data, const String &p_type, int p_base_size = 16);
+ RID _create_font_memory(const PackedByteArray &p_data, int p_base_size = 16);
- Dictionary _font_get_glyph_contours(RID p_font, int p_size, uint32_t p_index) const;
+ Dictionary _font_get_glyph_contours(RID p_font, int p_size, int32_t p_index) const;
Array _shaped_text_get_glyphs(RID p_shaped) const;
Dictionary _shaped_text_get_carets(RID p_shaped, int p_position) const;
@@ -413,7 +472,7 @@ public:
void _shaped_text_set_bidi_override(RID p_shaped, const Array &p_override);
Array _shaped_text_get_line_breaks_adv(RID p_shaped, const PackedFloat32Array &p_width, int p_start, bool p_once, uint8_t p_break_flags) const;
- Array _shaped_text_get_line_breaks(RID p_shaped, float p_width, int p_start, uint8_t p_break_flags) const;
+ Array _shaped_text_get_line_breaks(RID p_shaped, real_t p_width, int p_start, uint8_t p_break_flags) const;
Array _shaped_text_get_word_breaks(RID p_shaped) const;
Array _shaped_text_get_selection(RID p_shaped, int p_start, int p_end) const;
@@ -491,5 +550,6 @@ VARIANT_ENUM_CAST(TextServer::GraphemeFlag);
VARIANT_ENUM_CAST(TextServer::Hinting);
VARIANT_ENUM_CAST(TextServer::Feature);
VARIANT_ENUM_CAST(TextServer::ContourPointTag);
+VARIANT_ENUM_CAST(TextServer::SpacingType);
#endif // TEXT_SERVER_H
diff --git a/servers/xr/xr_interface.cpp b/servers/xr/xr_interface.cpp
index 09e8e12f8b..bf54158905 100644
--- a/servers/xr/xr_interface.cpp
+++ b/servers/xr/xr_interface.cpp
@@ -29,28 +29,26 @@
/*************************************************************************/
#include "xr_interface.h"
-#include "servers/rendering/renderer_compositor.h"
+// #include "servers/rendering/renderer_compositor.h"
void XRInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_name"), &XRInterface::get_name);
ClassDB::bind_method(D_METHOD("get_capabilities"), &XRInterface::get_capabilities);
ClassDB::bind_method(D_METHOD("is_primary"), &XRInterface::is_primary);
- ClassDB::bind_method(D_METHOD("set_is_primary", "enable"), &XRInterface::set_is_primary);
+ ClassDB::bind_method(D_METHOD("set_primary", "primary"), &XRInterface::set_primary);
ClassDB::bind_method(D_METHOD("is_initialized"), &XRInterface::is_initialized);
- ClassDB::bind_method(D_METHOD("set_is_initialized", "initialized"), &XRInterface::set_is_initialized);
ClassDB::bind_method(D_METHOD("initialize"), &XRInterface::initialize);
ClassDB::bind_method(D_METHOD("uninitialize"), &XRInterface::uninitialize);
ClassDB::bind_method(D_METHOD("get_tracking_status"), &XRInterface::get_tracking_status);
- ClassDB::bind_method(D_METHOD("get_render_targetsize"), &XRInterface::get_render_targetsize);
+ ClassDB::bind_method(D_METHOD("get_render_target_size"), &XRInterface::get_render_target_size);
ClassDB::bind_method(D_METHOD("get_view_count"), &XRInterface::get_view_count);
ADD_GROUP("Interface", "interface_");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interface_is_primary"), "set_is_primary", "is_primary");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interface_is_initialized"), "set_is_initialized", "is_initialized");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "interface_is_primary"), "set_primary", "is_primary");
// we don't have any properties specific to VR yet....
@@ -77,70 +75,48 @@ void XRInterface::_bind_methods() {
BIND_ENUM_CONSTANT(XR_INSUFFICIENT_FEATURES);
BIND_ENUM_CONSTANT(XR_UNKNOWN_TRACKING);
BIND_ENUM_CONSTANT(XR_NOT_TRACKING);
-};
-
-StringName XRInterface::get_name() const {
- return "Unknown";
-};
+}
bool XRInterface::is_primary() {
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL_V(xr_server, false);
return xr_server->get_primary_interface() == this;
-};
+}
-void XRInterface::set_is_primary(bool p_is_primary) {
+void XRInterface::set_primary(bool p_primary) {
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL(xr_server);
- if (p_is_primary) {
+ if (p_primary) {
ERR_FAIL_COND(!is_initialized());
xr_server->set_primary_interface(this);
- } else {
- xr_server->clear_primary_interface_if(this);
- };
-};
-
-void XRInterface::set_is_initialized(bool p_initialized) {
- if (p_initialized) {
- if (!is_initialized()) {
- initialize();
- };
- } else {
- if (is_initialized()) {
- uninitialize();
- };
- };
-};
-
-XRInterface::Tracking_status XRInterface::get_tracking_status() const {
- return tracking_state;
-};
-
-XRInterface::XRInterface() {
- tracking_state = XR_UNKNOWN_TRACKING;
-};
+ } else if (xr_server->get_primary_interface() == this) {
+ xr_server->set_primary_interface(nullptr);
+ }
+}
-XRInterface::~XRInterface() {}
+XRInterface::XRInterface() {}
-// optional render to external texture which enhances performance on those platforms that require us to submit our end result into special textures.
-unsigned int XRInterface::get_external_texture_for_eye(XRInterface::Eyes p_eye) {
- return 0;
-};
+XRInterface::~XRInterface() {}
/** these will only be implemented on AR interfaces, so we want dummies for VR **/
bool XRInterface::get_anchor_detection_is_enabled() const {
return false;
-};
+}
void XRInterface::set_anchor_detection_is_enabled(bool p_enable) {
- // don't do anything here, this needs to be implemented on AR interface to enable/disable things like plane detection etc.
}
int XRInterface::get_camera_feed_id() {
- // don't do anything here, this needs to be implemented on AR interface to enable/disable things like plane detection etc.
-
return 0;
-};
+}
+
+/** these are optional, so we want dummies **/
+XRInterface::TrackingStatus XRInterface::get_tracking_status() const {
+ return XR_UNKNOWN_TRACKING;
+}
+
+void XRInterface::notification(int p_what) {
+}
diff --git a/servers/xr/xr_interface.h b/servers/xr/xr_interface.h
index 6b248c9554..534fa18d8a 100644
--- a/servers/xr/xr_interface.h
+++ b/servers/xr/xr_interface.h
@@ -68,7 +68,7 @@ public:
EYE_RIGHT
};
- enum Tracking_status { /* tracking status currently based on AR but we can start doing more with this for VR as well */
+ enum TrackingStatus { /* tracking status currently based on AR but we can start doing more with this for VR as well */
XR_NORMAL_TRACKING,
XR_EXCESSIVE_MOTION,
XR_INSUFFICIENT_FEATURES,
@@ -76,26 +76,25 @@ public:
XR_NOT_TRACKING
};
+private:
protected:
_THREAD_SAFE_CLASS_
- Tracking_status tracking_state;
static void _bind_methods();
public:
/** general interface information **/
- virtual StringName get_name() const;
- virtual int get_capabilities() const = 0;
+ virtual StringName get_name() const = 0;
+ virtual uint32_t get_capabilities() const = 0;
bool is_primary();
- void set_is_primary(bool p_is_primary);
+ void set_primary(bool p_is_primary);
virtual bool is_initialized() const = 0; /* returns true if we've initialized this interface */
- void set_is_initialized(bool p_initialized); /* helper function, will call initialize or uninitialize */
virtual bool initialize() = 0; /* initialize this interface, if this has an HMD it becomes the primary interface */
virtual void uninitialize() = 0; /* deinitialize this interface */
- Tracking_status get_tracking_status() const; /* get the status of our current tracking */
+ virtual TrackingStatus get_tracking_status() const; /* get the status of our current tracking */
/** specific to VR **/
// nothing yet
@@ -107,27 +106,25 @@ public:
/** rendering and internal **/
- virtual Size2 get_render_targetsize() = 0; /* returns the recommended render target size per eye for this device */
+ virtual Size2 get_render_target_size() = 0; /* returns the recommended render target size per eye for this device */
virtual uint32_t get_view_count() = 0; /* returns the view count we need (1 is monoscopic, 2 is stereoscopic but can be more) */
virtual Transform3D get_camera_transform() = 0; /* returns the position of our camera for updating our camera node. For monoscopic this is equal to the views transform, for stereoscopic this should be an average */
virtual Transform3D get_transform_for_view(uint32_t p_view, const Transform3D &p_cam_transform) = 0; /* get each views transform */
- virtual CameraMatrix get_projection_for_view(uint32_t p_view, real_t p_aspect, real_t p_z_near, real_t p_z_far) = 0; /* get each view projection matrix */
+ virtual CameraMatrix get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) = 0; /* get each view projection matrix */
+
+ // note, external color/depth/vrs texture support will be added here soon.
virtual Vector<BlitToScreen> commit_views(RID p_render_target, const Rect2 &p_screen_rect) = 0; /* commit rendered views to the XR interface */
virtual void process() = 0;
- virtual void notification(int p_what) = 0;
+ virtual void notification(int p_what);
XRInterface();
~XRInterface();
-
- // deprecated
- virtual unsigned int get_external_texture_for_eye(XRInterface::Eyes p_eye); /* if applicable return external texture to render to */
- virtual void commit_for_eye(XRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) = 0; /* output the left or right eye */
};
VARIANT_ENUM_CAST(XRInterface::Capabilities);
VARIANT_ENUM_CAST(XRInterface::Eyes);
-VARIANT_ENUM_CAST(XRInterface::Tracking_status);
+VARIANT_ENUM_CAST(XRInterface::TrackingStatus);
-#endif
+#endif // !XR_INTERFACE_H
diff --git a/servers/xr/xr_interface_extension.cpp b/servers/xr/xr_interface_extension.cpp
new file mode 100644
index 0000000000..7fdf90770d
--- /dev/null
+++ b/servers/xr/xr_interface_extension.cpp
@@ -0,0 +1,267 @@
+/*************************************************************************/
+/* xr_interface_extension.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "xr_interface_extension.h"
+#include "servers/rendering/renderer_rd/renderer_storage_rd.h"
+#include "servers/rendering/renderer_storage.h"
+#include "servers/rendering/rendering_server_globals.h"
+
+void XRInterfaceExtension::_bind_methods() {
+ GDVIRTUAL_BIND(_get_name);
+ GDVIRTUAL_BIND(_get_capabilities);
+
+ GDVIRTUAL_BIND(_is_initialized);
+ GDVIRTUAL_BIND(_initialize);
+ GDVIRTUAL_BIND(_uninitialize);
+
+ GDVIRTUAL_BIND(_get_tracking_status);
+
+ GDVIRTUAL_BIND(_get_render_target_size);
+ GDVIRTUAL_BIND(_get_view_count);
+ GDVIRTUAL_BIND(_get_camera_transform);
+ GDVIRTUAL_BIND(_get_transform_for_view, "view", "cam_transform");
+ GDVIRTUAL_BIND(_get_projection_for_view, "view", "aspect", "z_near", "z_far");
+
+ GDVIRTUAL_BIND(_commit_views, "render_target", "screen_rect");
+
+ GDVIRTUAL_BIND(_process);
+ GDVIRTUAL_BIND(_notification, "what");
+
+ // we don't have any properties specific to VR yet....
+
+ // but we do have properties specific to AR....
+ GDVIRTUAL_BIND(_get_anchor_detection_is_enabled);
+ GDVIRTUAL_BIND(_set_anchor_detection_is_enabled, "enabled");
+ GDVIRTUAL_BIND(_get_camera_feed_id);
+
+ // helper methods
+ ClassDB::bind_method(D_METHOD("add_blit", "render_target", "src_rect", "dst_rect", "use_layer", "layer", "apply_lens_distortion", "eye_center", "k1", "k2", "upscale", "aspect_ratio"), &XRInterfaceExtension::add_blit);
+ ClassDB::bind_method(D_METHOD("get_render_target_texture", "render_target"), &XRInterfaceExtension::get_render_target_texture);
+ // ClassDB::bind_method(D_METHOD("get_render_target_depth", "render_target"), &XRInterfaceExtension::get_render_target_depth);
+}
+
+StringName XRInterfaceExtension::get_name() const {
+ StringName name;
+
+ if (GDVIRTUAL_CALL(_get_name, name)) {
+ return name;
+ }
+
+ return "Unknown";
+}
+
+uint32_t XRInterfaceExtension::get_capabilities() const {
+ uint32_t capabilities;
+
+ if (GDVIRTUAL_CALL(_get_capabilities, capabilities)) {
+ return capabilities;
+ }
+
+ return 0;
+}
+
+bool XRInterfaceExtension::is_initialized() const {
+ bool initialised = false;
+
+ if (GDVIRTUAL_CALL(_is_initialized, initialised)) {
+ return initialised;
+ }
+
+ return false;
+}
+
+bool XRInterfaceExtension::initialize() {
+ bool initialised = false;
+
+ if (GDVIRTUAL_CALL(_initialize, initialised)) {
+ return initialised;
+ }
+
+ return false;
+}
+
+void XRInterfaceExtension::uninitialize() {
+ GDVIRTUAL_CALL(_uninitialize);
+}
+
+XRInterface::TrackingStatus XRInterfaceExtension::get_tracking_status() const {
+ uint32_t status;
+
+ if (GDVIRTUAL_CALL(_get_tracking_status, status)) {
+ return TrackingStatus(status);
+ }
+
+ return XR_UNKNOWN_TRACKING;
+}
+
+/** these will only be implemented on AR interfaces, so we want dummies for VR **/
+bool XRInterfaceExtension::get_anchor_detection_is_enabled() const {
+ bool enabled;
+
+ if (GDVIRTUAL_CALL(_get_anchor_detection_is_enabled, enabled)) {
+ return enabled;
+ }
+
+ return false;
+}
+
+void XRInterfaceExtension::set_anchor_detection_is_enabled(bool p_enable) {
+ // don't do anything here, this needs to be implemented on AR interface to enable/disable things like plane detection etc.
+ GDVIRTUAL_CALL(_set_anchor_detection_is_enabled, p_enable);
+}
+
+int XRInterfaceExtension::get_camera_feed_id() {
+ int feed_id;
+
+ if (GDVIRTUAL_CALL(_get_camera_feed_id, feed_id)) {
+ return feed_id;
+ }
+
+ return 0;
+}
+
+Size2 XRInterfaceExtension::get_render_target_size() {
+ Size2 size;
+
+ if (GDVIRTUAL_CALL(_get_render_target_size, size)) {
+ return size;
+ }
+
+ return Size2(0, 0);
+}
+
+uint32_t XRInterfaceExtension::get_view_count() {
+ uint32_t view_count;
+
+ if (GDVIRTUAL_CALL(_get_view_count, view_count)) {
+ return view_count;
+ }
+
+ return 1;
+}
+
+Transform3D XRInterfaceExtension::get_camera_transform() {
+ Transform3D transform;
+
+ if (GDVIRTUAL_CALL(_get_camera_transform, transform)) {
+ return transform;
+ }
+
+ return Transform3D();
+}
+
+Transform3D XRInterfaceExtension::get_transform_for_view(uint32_t p_view, const Transform3D &p_cam_transform) {
+ Transform3D transform;
+
+ if (GDVIRTUAL_CALL(_get_transform_for_view, p_view, p_cam_transform, transform)) {
+ return transform;
+ }
+
+ return Transform3D();
+}
+
+CameraMatrix XRInterfaceExtension::get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) {
+ CameraMatrix cm;
+ PackedFloat64Array arr;
+
+ if (GDVIRTUAL_CALL(_get_projection_for_view, p_view, p_aspect, p_z_near, p_z_far, arr)) {
+ ERR_FAIL_COND_V_MSG(arr.size() != 16, CameraMatrix(), "Projection matrix must contain 16 floats");
+ real_t *m = (real_t *)cm.matrix;
+ for (int i = 0; i < 16; i++) {
+ m[i] = arr[i];
+ }
+ return cm;
+ }
+
+ return CameraMatrix();
+}
+
+void XRInterfaceExtension::add_blit(RID p_render_target, Rect2 p_src_rect, Rect2i p_dst_rect, bool p_use_layer, uint32_t p_layer, bool p_apply_lens_distortion, Vector2 p_eye_center, double p_k1, double p_k2, double p_upscale, double p_aspect_ratio) {
+ BlitToScreen blit;
+
+ ERR_FAIL_COND_MSG(!can_add_blits, "add_blit can only be called from an XR plugin from within _commit_views!");
+
+ blit.render_target = p_render_target;
+ blit.src_rect = p_src_rect;
+ blit.dst_rect = p_dst_rect;
+
+ blit.multi_view.use_layer = p_use_layer;
+ blit.multi_view.layer = p_layer;
+
+ blit.lens_distortion.apply = p_apply_lens_distortion;
+ blit.lens_distortion.eye_center = p_eye_center;
+ blit.lens_distortion.k1 = p_k1;
+ blit.lens_distortion.k2 = p_k2;
+ blit.lens_distortion.upscale = p_upscale;
+ blit.lens_distortion.aspect_ratio = p_aspect_ratio;
+
+ blits.push_back(blit);
+}
+
+Vector<BlitToScreen> XRInterfaceExtension::commit_views(RID p_render_target, const Rect2 &p_screen_rect) {
+ // This is just so our XR plugin can add blits...
+ blits.clear();
+ can_add_blits = true;
+
+ if (GDVIRTUAL_CALL(_commit_views, p_render_target, p_screen_rect)) {
+ return blits;
+ }
+
+ can_add_blits = false;
+ return blits;
+}
+
+void XRInterfaceExtension::process() {
+ GDVIRTUAL_CALL(_process);
+}
+
+void XRInterfaceExtension::notification(int p_what) {
+ GDVIRTUAL_CALL(_notification, p_what);
+}
+
+RID XRInterfaceExtension::get_render_target_texture(RID p_render_target) {
+ // In due time this will need to be enhance to return the correct INTERNAL RID for the chosen rendering engine.
+ // So once a GLES driver is implemented we'll return that and the implemented plugin needs to handle this correctly too.
+ RendererStorageRD *rd_storage = RendererStorageRD::base_singleton;
+ ERR_FAIL_NULL_V_MSG(rd_storage, RID(), "Renderer storage not setup");
+
+ return rd_storage->render_target_get_rd_texture(p_render_target);
+}
+
+/*
+RID XRInterfaceExtension::get_render_target_depth(RID p_render_target) {
+ // TODO implement this, the problem is that our depth texture isn't part of our render target as it is used for 3D rendering only
+ // but we don't have access to our render buffers from here....
+ RendererSceneRenderRD * rd_scene = ?????;
+ ERR_FAIL_NULL_V_MSG(rd_scene, RID(), "Renderer scene render not setup");
+
+ return rd_scene->render_buffers_get_depth_texture(????????????);
+}
+*/
diff --git a/modules/gdnative/xr/xr_interface_gdnative.h b/servers/xr/xr_interface_extension.h
index 42e9206c1f..3b7af4c0a2 100644
--- a/modules/gdnative/xr/xr_interface_gdnative.h
+++ b/servers/xr/xr_interface_extension.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* xr_interface_gdnative.h */
+/* xr_interface_extension.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,68 +28,82 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef XR_INTERFACE_GDNATIVE_H
-#define XR_INTERFACE_GDNATIVE_H
+#ifndef XR_INTERFACE_EXTENSION_H
+#define XR_INTERFACE_EXTENSION_H
-#include "modules/gdnative/gdnative.h"
#include "servers/xr/xr_interface.h"
-/**
- @authors Hinsbart & Karroffel & Mux213
+class XRInterfaceExtension : public XRInterface {
+ GDCLASS(XRInterfaceExtension, XRInterface);
- This subclass of our AR/VR interface forms a bridge to GDNative.
-*/
-
-class XRInterfaceGDNative : public XRInterface {
- GDCLASS(XRInterfaceGDNative, XRInterface);
-
- void cleanup();
+public:
+private:
+ bool can_add_blits = false;
+ Vector<BlitToScreen> blits;
protected:
- const godot_xr_interface_gdnative *interface;
- void *data;
+ _THREAD_SAFE_CLASS_
static void _bind_methods();
public:
/** general interface information **/
- XRInterfaceGDNative();
- ~XRInterfaceGDNative();
-
- void set_interface(const godot_xr_interface_gdnative *p_interface);
-
virtual StringName get_name() const override;
- virtual int get_capabilities() const override;
+ virtual uint32_t get_capabilities() const override;
+
+ GDVIRTUAL0RC(StringName, _get_name);
+ GDVIRTUAL0RC(uint32_t, _get_capabilities);
virtual bool is_initialized() const override;
virtual bool initialize() override;
virtual void uninitialize() override;
+ GDVIRTUAL0RC(bool, _is_initialized);
+ GDVIRTUAL0R(bool, _initialize);
+ GDVIRTUAL0(_uninitialize);
+
+ virtual TrackingStatus get_tracking_status() const override;
+ GDVIRTUAL0RC(uint32_t, _get_tracking_status);
+
+ /** specific to VR **/
+ // nothing yet
+
/** specific to AR **/
virtual bool get_anchor_detection_is_enabled() const override;
virtual void set_anchor_detection_is_enabled(bool p_enable) override;
virtual int get_camera_feed_id() override;
+ GDVIRTUAL0RC(bool, _get_anchor_detection_is_enabled);
+ GDVIRTUAL1(_set_anchor_detection_is_enabled, bool);
+ GDVIRTUAL0RC(int, _get_camera_feed_id);
+
/** rendering and internal **/
- virtual Size2 get_render_targetsize() override;
+
+ virtual Size2 get_render_target_size() override;
virtual uint32_t get_view_count() override;
virtual Transform3D get_camera_transform() override;
virtual Transform3D get_transform_for_view(uint32_t p_view, const Transform3D &p_cam_transform) override;
+ virtual CameraMatrix get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) override;
- // we expose a Vector<float> version of this function to GDNative
- Vector<float> _get_projection_for_eye(XRInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far);
-
- // and a CameraMatrix version to XRServer
- virtual CameraMatrix get_projection_for_view(uint32_t p_view, real_t p_aspect, real_t p_z_near, real_t p_z_far) override;
+ GDVIRTUAL0R(Size2, _get_render_target_size);
+ GDVIRTUAL0R(uint32_t, _get_view_count);
+ GDVIRTUAL0R(Transform3D, _get_camera_transform);
+ GDVIRTUAL2R(Transform3D, _get_transform_for_view, uint32_t, const Transform3D &);
+ GDVIRTUAL4R(PackedFloat64Array, _get_projection_for_view, uint32_t, double, double, double);
+ void add_blit(RID p_render_target, Rect2 p_src_rect, Rect2i p_dst_rect, bool p_use_layer = false, uint32_t p_layer = 0, bool p_apply_lens_distortion = false, Vector2 p_eye_center = Vector2(), double p_k1 = 0.0, double p_k2 = 0.0, double p_upscale = 1.0, double p_aspect_ratio = 1.0);
virtual Vector<BlitToScreen> commit_views(RID p_render_target, const Rect2 &p_screen_rect) override;
+ GDVIRTUAL2(_commit_views, RID, const Rect2 &);
virtual void process() override;
virtual void notification(int p_what) override;
- // deprecated
- virtual void commit_for_eye(XRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) override;
- virtual unsigned int get_external_texture_for_eye(XRInterface::Eyes p_eye) override;
+ GDVIRTUAL0(_process);
+ GDVIRTUAL1(_notification, int);
+
+ /* access to some internals we need */
+ RID get_render_target_texture(RID p_render_target);
+ // RID get_render_target_depth(RID p_render_target);
};
-#endif // XR_INTERFACE_GDNATIVE_H
+#endif // !XR_INTERFACE_EXTENSION_H
diff --git a/servers/xr_server.cpp b/servers/xr_server.cpp
index c27656047f..f6e6e5953f 100644
--- a/servers/xr_server.cpp
+++ b/servers/xr_server.cpp
@@ -49,7 +49,6 @@ void XRServer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "world_scale"), "set_world_scale", "get_world_scale");
ClassDB::bind_method(D_METHOD("add_interface", "interface"), &XRServer::add_interface);
- ClassDB::bind_method(D_METHOD("clear_primary_interface_if", "interface"), &XRServer::clear_primary_interface_if);
ClassDB::bind_method(D_METHOD("get_interface_count"), &XRServer::get_interface_count);
ClassDB::bind_method(D_METHOD("remove_interface", "interface"), &XRServer::remove_interface);
ClassDB::bind_method(D_METHOD("get_interface", "idx"), &XRServer::get_interface);
@@ -87,11 +86,11 @@ void XRServer::_bind_methods() {
ADD_SIGNAL(MethodInfo("tracker_removed", PropertyInfo(Variant::STRING_NAME, "tracker_name"), PropertyInfo(Variant::INT, "type"), PropertyInfo(Variant::INT, "id")));
};
-real_t XRServer::get_world_scale() const {
+double XRServer::get_world_scale() const {
return world_scale;
};
-void XRServer::set_world_scale(real_t p_world_scale) {
+void XRServer::set_world_scale(double p_world_scale) {
if (p_world_scale < 0.01) {
p_world_scale = 0.01;
} else if (p_world_scale > 1000.0) {
@@ -316,17 +315,14 @@ Ref<XRInterface> XRServer::get_primary_interface() const {
};
void XRServer::set_primary_interface(const Ref<XRInterface> &p_primary_interface) {
- ERR_FAIL_COND(p_primary_interface.is_null());
- primary_interface = p_primary_interface;
-
- print_verbose("XR: Primary interface set to: " + primary_interface->get_name());
-};
-
-void XRServer::clear_primary_interface_if(const Ref<XRInterface> &p_primary_interface) {
- if (primary_interface == p_primary_interface) {
+ if (p_primary_interface.is_null()) {
print_verbose("XR: Clearing primary interface");
primary_interface.unref();
- };
+ } else {
+ primary_interface = p_primary_interface;
+
+ print_verbose("XR: Primary interface set to: " + primary_interface->get_name());
+ }
};
uint64_t XRServer::get_last_process_usec() {
diff --git a/servers/xr_server.h b/servers/xr_server.h
index 25431844c2..6d07263755 100644
--- a/servers/xr_server.h
+++ b/servers/xr_server.h
@@ -81,7 +81,7 @@ private:
Ref<XRInterface> primary_interface; /* we'll identify one interface as primary, this will be used by our viewports */
- real_t world_scale; /* scale by which we multiply our tracker positions */
+ double world_scale; /* scale by which we multiply our tracker positions */
Transform3D world_origin; /* our world origin point, maps a location in our virtual world to the origin point in our real world tracking volume */
Transform3D reference_frame; /* our reference frame */
@@ -107,8 +107,8 @@ public:
I may remove access to this property in GDScript in favour of exposing it on the XROrigin3D node
*/
- real_t get_world_scale() const;
- void set_world_scale(real_t p_world_scale);
+ double get_world_scale() const;
+ void set_world_scale(double p_world_scale);
/*
The world maps the 0,0,0 coordinate of our real world coordinate system for our tracking volume to a location in our
@@ -159,7 +159,6 @@ public:
*/
Ref<XRInterface> get_primary_interface() const;
void set_primary_interface(const Ref<XRInterface> &p_primary_interface);
- void clear_primary_interface_if(const Ref<XRInterface> &p_primary_interface); /* this is automatically called if an interface destructs */
/*
Our trackers are objects that expose the orientation and position of physical devices such as controller, anchor points, etc.
diff --git a/tests/test_aabb.h b/tests/test_aabb.h
index c4daa56e5a..2724d9481a 100644
--- a/tests/test_aabb.h
+++ b/tests/test_aabb.h
@@ -65,6 +65,9 @@ TEST_CASE("[AABB] Basic getters") {
CHECK_MESSAGE(
aabb.get_end().is_equal_approx(Vector3(2.5, 7, 3.5)),
"get_end() should return the expected value.");
+ CHECK_MESSAGE(
+ aabb.get_center().is_equal_approx(Vector3(0.5, 4.5, 0.5)),
+ "get_center() should return the expected value.");
}
TEST_CASE("[AABB] Basic setters") {
diff --git a/tests/test_array.h b/tests/test_array.h
index 52da256860..3bd476fd27 100644
--- a/tests/test_array.h
+++ b/tests/test_array.h
@@ -39,6 +39,7 @@
#include "core/variant/container_type_validate.h"
#include "core/variant/variant.h"
#include "tests/test_macros.h"
+#include "tests/test_tools.h"
namespace TestArray {
@@ -170,6 +171,56 @@ TEST_CASE("[Array] push_front(), pop_front(), pop_back()") {
CHECK(arr.size() == 2);
}
+TEST_CASE("[Array] pop_at()") {
+ ErrorDetector ed;
+
+ Array arr;
+ arr.push_back(2);
+ arr.push_back(4);
+ arr.push_back(6);
+ arr.push_back(8);
+ arr.push_back(10);
+
+ REQUIRE(int(arr.pop_at(2)) == 6);
+ REQUIRE(arr.size() == 4);
+ CHECK(int(arr[0]) == 2);
+ CHECK(int(arr[1]) == 4);
+ CHECK(int(arr[2]) == 8);
+ CHECK(int(arr[3]) == 10);
+
+ REQUIRE(int(arr.pop_at(2)) == 8);
+ REQUIRE(arr.size() == 3);
+ CHECK(int(arr[0]) == 2);
+ CHECK(int(arr[1]) == 4);
+ CHECK(int(arr[2]) == 10);
+
+ // Negative index.
+ REQUIRE(int(arr.pop_at(-1)) == 10);
+ REQUIRE(arr.size() == 2);
+ CHECK(int(arr[0]) == 2);
+ CHECK(int(arr[1]) == 4);
+
+ // Invalid pop.
+ ed.clear();
+ ERR_PRINT_OFF;
+ const Variant ret = arr.pop_at(-15);
+ ERR_PRINT_ON;
+ REQUIRE(ret.is_null());
+ CHECK(ed.has_error);
+
+ REQUIRE(int(arr.pop_at(0)) == 2);
+ REQUIRE(arr.size() == 1);
+ CHECK(int(arr[0]) == 4);
+
+ REQUIRE(int(arr.pop_at(0)) == 4);
+ REQUIRE(arr.is_empty());
+
+ // Pop from empty array.
+ ed.clear();
+ REQUIRE(arr.pop_at(24).is_null());
+ CHECK_FALSE(ed.has_error);
+}
+
TEST_CASE("[Array] max() and min()") {
Array arr;
arr.push_back(3);
diff --git a/tests/test_class_db.h b/tests/test_class_db.h
index ea680da5d6..20397bb144 100644
--- a/tests/test_class_db.h
+++ b/tests/test_class_db.h
@@ -527,7 +527,7 @@ void add_exposed_classes(Context &r_context) {
Map<StringName, StringName> accessor_methods;
for (const PropertyInfo &property : property_list) {
- if (property.usage & PROPERTY_USAGE_GROUP || property.usage & PROPERTY_USAGE_SUBGROUP || property.usage & PROPERTY_USAGE_CATEGORY) {
+ if (property.usage & PROPERTY_USAGE_GROUP || property.usage & PROPERTY_USAGE_SUBGROUP || property.usage & PROPERTY_USAGE_CATEGORY || (property.type == Variant::NIL && property.usage & PROPERTY_USAGE_ARRAY)) {
continue;
}
diff --git a/tests/test_code_edit.h b/tests/test_code_edit.h
new file mode 100644
index 0000000000..fc8cec60af
--- /dev/null
+++ b/tests/test_code_edit.h
@@ -0,0 +1,3068 @@
+/*************************************************************************/
+/* test_code_edit.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef TEST_CODE_EDIT_H
+#define TEST_CODE_EDIT_H
+
+#include "core/input/input_map.h"
+#include "core/object/message_queue.h"
+#include "core/os/keyboard.h"
+#include "core/string/string_builder.h"
+#include "scene/gui/code_edit.h"
+#include "scene/resources/default_theme/default_theme.h"
+
+#include "tests/test_macros.h"
+
+namespace TestCodeEdit {
+
+TEST_CASE("[SceneTree][CodeEdit] line gutters") {
+ CodeEdit *code_edit = memnew(CodeEdit);
+ SceneTree::get_singleton()->get_root()->add_child(code_edit);
+
+ SUBCASE("[CodeEdit] breakpoints") {
+ SIGNAL_WATCH(code_edit, "breakpoint_toggled");
+
+ SUBCASE("[CodeEdit] draw breakpoints gutter") {
+ code_edit->set_draw_breakpoints_gutter(false);
+ CHECK_FALSE(code_edit->is_drawing_breakpoints_gutter());
+
+ code_edit->set_draw_breakpoints_gutter(true);
+ CHECK(code_edit->is_drawing_breakpoints_gutter());
+ }
+
+ SUBCASE("[CodeEdit] set line as breakpoint") {
+ /* Out of bounds. */
+ ERR_PRINT_OFF;
+
+ code_edit->set_line_as_breakpoint(-1, true);
+ CHECK_FALSE(code_edit->is_line_breakpointed(-1));
+ SIGNAL_CHECK_FALSE("breakpoint_toggled");
+
+ code_edit->set_line_as_breakpoint(1, true);
+ CHECK_FALSE(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK_FALSE("breakpoint_toggled");
+
+ ERR_PRINT_ON;
+
+ Array arg1;
+ arg1.push_back(0);
+ Array args;
+ args.push_back(arg1);
+
+ code_edit->set_line_as_breakpoint(0, true);
+ CHECK(code_edit->is_line_breakpointed(0));
+ CHECK(code_edit->get_breakpointed_lines()[0] == Variant(0));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ code_edit->set_line_as_breakpoint(0, false);
+ CHECK_FALSE(code_edit->is_line_breakpointed(0));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+ }
+
+ SUBCASE("[CodeEdit] clear breakpointed lines") {
+ code_edit->clear_breakpointed_lines();
+ SIGNAL_CHECK_FALSE("breakpoint_toggled");
+
+ Array arg1;
+ arg1.push_back(0);
+ Array args;
+ args.push_back(arg1);
+
+ code_edit->set_line_as_breakpoint(0, true);
+ CHECK(code_edit->is_line_breakpointed(0));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ code_edit->clear_breakpointed_lines();
+ CHECK_FALSE(code_edit->is_line_breakpointed(0));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+ }
+
+ SUBCASE("[CodeEdit] breakpoints and set text") {
+ Array arg1;
+ arg1.push_back(0);
+ Array args;
+ args.push_back(arg1);
+
+ code_edit->set_text("test\nline");
+ code_edit->set_line_as_breakpoint(0, true);
+ CHECK(code_edit->is_line_breakpointed(0));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ /* breakpoint on lines that still exist are kept. */
+ code_edit->set_text("");
+ MessageQueue::get_singleton()->flush();
+ CHECK(code_edit->is_line_breakpointed(0));
+ SIGNAL_CHECK_FALSE("breakpoint_toggled");
+
+ /* breakpoint on lines that are removed should also be removed. */
+ code_edit->clear_breakpointed_lines();
+ SIGNAL_DISCARD("breakpoint_toggled")
+
+ ((Array)args[0])[0] = 1;
+ code_edit->set_text("test\nline");
+ code_edit->set_line_as_breakpoint(1, true);
+ CHECK(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ code_edit->set_text("");
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_breakpointed(0));
+ ERR_PRINT_OFF;
+ CHECK_FALSE(code_edit->is_line_breakpointed(1));
+ ERR_PRINT_ON;
+ SIGNAL_CHECK("breakpoint_toggled", args);
+ }
+
+ SUBCASE("[CodeEdit] breakpoints and clear") {
+ Array arg1;
+ arg1.push_back(0);
+ Array args;
+ args.push_back(arg1);
+
+ code_edit->set_text("test\nline");
+ code_edit->set_line_as_breakpoint(0, true);
+ CHECK(code_edit->is_line_breakpointed(0));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ /* breakpoint on lines that still exist are removed. */
+ code_edit->clear();
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_breakpointed(0));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ /* breakpoint on lines that are removed should also be removed. */
+ code_edit->clear_breakpointed_lines();
+ SIGNAL_DISCARD("breakpoint_toggled")
+
+ ((Array)args[0])[0] = 1;
+ code_edit->set_text("test\nline");
+ code_edit->set_line_as_breakpoint(1, true);
+ CHECK(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ code_edit->clear();
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_breakpointed(0));
+ ERR_PRINT_OFF;
+ CHECK_FALSE(code_edit->is_line_breakpointed(1));
+ ERR_PRINT_ON;
+ SIGNAL_CHECK("breakpoint_toggled", args);
+ }
+
+ SUBCASE("[CodeEdit] breakpoints and new lines no text") {
+ Array arg1;
+ arg1.push_back(0);
+ Array args;
+ args.push_back(arg1);
+
+ /* No text moves breakpoint. */
+ code_edit->set_line_as_breakpoint(0, true);
+ CHECK(code_edit->is_line_breakpointed(0));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ /* Normal. */
+ ((Array)args[0])[0] = 0;
+ Array arg2;
+ arg2.push_back(1);
+ args.push_back(arg2);
+
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line_count() == 2);
+ CHECK_FALSE(code_edit->is_line_breakpointed(0));
+ CHECK(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ /* Non-Breaking. */
+ ((Array)args[0])[0] = 1;
+ ((Array)args[1])[0] = 2;
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_blank");
+ CHECK(code_edit->get_line_count() == 3);
+ CHECK_FALSE(code_edit->is_line_breakpointed(1));
+ CHECK(code_edit->is_line_breakpointed(2));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ /* Above. */
+ ((Array)args[0])[0] = 2;
+ ((Array)args[1])[0] = 3;
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_above");
+ CHECK(code_edit->get_line_count() == 4);
+ CHECK_FALSE(code_edit->is_line_breakpointed(2));
+ CHECK(code_edit->is_line_breakpointed(3));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+ }
+
+ SUBCASE("[CodeEdit] breakpoints and new lines with text") {
+ Array arg1;
+ arg1.push_back(0);
+ Array args;
+ args.push_back(arg1);
+
+ /* Having text does not move breakpoint. */
+ code_edit->insert_text_at_caret("text");
+ code_edit->set_line_as_breakpoint(0, true);
+ CHECK(code_edit->is_line_breakpointed(0));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ /* Normal. */
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line_count() == 2);
+ CHECK(code_edit->is_line_breakpointed(0));
+ CHECK_FALSE(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK_FALSE("breakpoint_toggled");
+
+ /* Non-Breaking. */
+ code_edit->set_caret_line(0);
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_blank");
+ CHECK(code_edit->get_line_count() == 3);
+ CHECK(code_edit->is_line_breakpointed(0));
+ CHECK_FALSE(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK_FALSE("breakpoint_toggled");
+
+ /* Above does move. */
+ ((Array)args[0])[0] = 0;
+ Array arg2;
+ arg2.push_back(1);
+ args.push_back(arg2);
+
+ code_edit->set_caret_line(0);
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_above");
+ CHECK(code_edit->get_line_count() == 4);
+ CHECK_FALSE(code_edit->is_line_breakpointed(0));
+ CHECK(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+ }
+
+ SUBCASE("[CodeEdit] breakpoints and backspace") {
+ Array arg1;
+ arg1.push_back(1);
+ Array args;
+ args.push_back(arg1);
+
+ code_edit->set_text("\n\n");
+ code_edit->set_line_as_breakpoint(1, true);
+ CHECK(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ code_edit->set_caret_line(2);
+
+ /* backspace onto line does not remove breakpoint */
+ SEND_GUI_ACTION(code_edit, "ui_text_backspace");
+ CHECK(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK_FALSE("breakpoint_toggled");
+
+ /* backspace on breakpointed line removes it */
+ SEND_GUI_ACTION(code_edit, "ui_text_backspace");
+ CHECK_FALSE(code_edit->is_line_breakpointed(0));
+ ERR_PRINT_OFF;
+ CHECK_FALSE(code_edit->is_line_breakpointed(1));
+ ERR_PRINT_ON;
+ SIGNAL_CHECK("breakpoint_toggled", args);
+ }
+
+ SUBCASE("[CodeEdit] breakpoints and delete") {
+ Array arg1;
+ arg1.push_back(1);
+ Array args;
+ args.push_back(arg1);
+
+ code_edit->set_text("\n\n");
+ code_edit->set_line_as_breakpoint(1, true);
+ CHECK(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+ code_edit->set_caret_line(1);
+
+ /* Delete onto breakpointed lines does not remove it. */
+ SEND_GUI_ACTION(code_edit, "ui_text_delete");
+ CHECK(code_edit->get_line_count() == 2);
+ CHECK(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK_FALSE("breakpoint_toggled");
+
+ /* Delete moving breakpointed line up removes it. */
+ code_edit->set_caret_line(0);
+ SEND_GUI_ACTION(code_edit, "ui_text_delete");
+ CHECK(code_edit->get_line_count() == 1);
+ ERR_PRINT_OFF;
+ CHECK_FALSE(code_edit->is_line_breakpointed(1));
+ ERR_PRINT_ON;
+ SIGNAL_CHECK("breakpoint_toggled", args);
+ }
+
+ SUBCASE("[CodeEdit] breakpoints and delete selection") {
+ Array arg1;
+ arg1.push_back(1);
+ Array args;
+ args.push_back(arg1);
+
+ code_edit->set_text("\n\n");
+ code_edit->set_line_as_breakpoint(1, true);
+ CHECK(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ code_edit->select(0, 0, 2, 0);
+ code_edit->delete_selection();
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_breakpointed(0));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+ }
+
+ SUBCASE("[CodeEdit] breakpoints and undo") {
+ Array arg1;
+ arg1.push_back(1);
+ Array args;
+ args.push_back(arg1);
+
+ code_edit->set_text("\n\n");
+ code_edit->set_line_as_breakpoint(1, true);
+ CHECK(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ code_edit->select(0, 0, 2, 0);
+ code_edit->delete_selection();
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_breakpointed(0));
+ SIGNAL_CHECK("breakpoint_toggled", args);
+
+ /* Undo does not restore breakpoint. */
+ code_edit->undo();
+ CHECK_FALSE(code_edit->is_line_breakpointed(1));
+ SIGNAL_CHECK_FALSE("breakpoint_toggled");
+ }
+
+ SIGNAL_UNWATCH(code_edit, "breakpoint_toggled");
+ }
+
+ SUBCASE("[CodeEdit] bookmarks") {
+ SUBCASE("[CodeEdit] draw bookmarks gutter") {
+ code_edit->set_draw_bookmarks_gutter(false);
+ CHECK_FALSE(code_edit->is_drawing_bookmarks_gutter());
+
+ code_edit->set_draw_bookmarks_gutter(true);
+ CHECK(code_edit->is_drawing_bookmarks_gutter());
+ }
+
+ SUBCASE("[CodeEdit] set line as bookmarks") {
+ /* Out of bounds. */
+ ERR_PRINT_OFF;
+
+ code_edit->set_line_as_bookmarked(-1, true);
+ CHECK_FALSE(code_edit->is_line_bookmarked(-1));
+
+ code_edit->set_line_as_bookmarked(1, true);
+ CHECK_FALSE(code_edit->is_line_bookmarked(1));
+
+ ERR_PRINT_ON;
+
+ code_edit->set_line_as_bookmarked(0, true);
+ CHECK(code_edit->get_bookmarked_lines()[0] == Variant(0));
+ CHECK(code_edit->is_line_bookmarked(0));
+
+ code_edit->set_line_as_bookmarked(0, false);
+ CHECK_FALSE(code_edit->is_line_bookmarked(0));
+ }
+
+ SUBCASE("[CodeEdit] clear bookmarked lines") {
+ code_edit->clear_bookmarked_lines();
+
+ code_edit->set_line_as_bookmarked(0, true);
+ CHECK(code_edit->is_line_bookmarked(0));
+
+ code_edit->clear_bookmarked_lines();
+ CHECK_FALSE(code_edit->is_line_bookmarked(0));
+ }
+
+ SUBCASE("[CodeEdit] bookmarks and set text") {
+ code_edit->set_text("test\nline");
+ code_edit->set_line_as_bookmarked(0, true);
+ CHECK(code_edit->is_line_bookmarked(0));
+
+ /* bookmarks on lines that still exist are kept. */
+ code_edit->set_text("");
+ MessageQueue::get_singleton()->flush();
+ CHECK(code_edit->is_line_bookmarked(0));
+
+ /* bookmarks on lines that are removed should also be removed. */
+ code_edit->clear_bookmarked_lines();
+
+ code_edit->set_text("test\nline");
+ code_edit->set_line_as_bookmarked(1, true);
+ CHECK(code_edit->is_line_bookmarked(1));
+
+ code_edit->set_text("");
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_bookmarked(0));
+ ERR_PRINT_OFF;
+ CHECK_FALSE(code_edit->is_line_bookmarked(1));
+ ERR_PRINT_ON;
+ }
+
+ SUBCASE("[CodeEdit] bookmarks and clear") {
+ code_edit->set_text("test\nline");
+ code_edit->set_line_as_bookmarked(0, true);
+ CHECK(code_edit->is_line_bookmarked(0));
+
+ /* bookmarks on lines that still exist are removed. */
+ code_edit->clear();
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_bookmarked(0));
+
+ /* bookmarks on lines that are removed should also be removed. */
+ code_edit->clear_bookmarked_lines();
+
+ code_edit->set_text("test\nline");
+ code_edit->set_line_as_bookmarked(1, true);
+ CHECK(code_edit->is_line_bookmarked(1));
+
+ code_edit->clear();
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_bookmarked(0));
+ ERR_PRINT_OFF;
+ CHECK_FALSE(code_edit->is_line_bookmarked(1));
+ ERR_PRINT_ON;
+ }
+
+ SUBCASE("[CodeEdit] bookmarks and new lines no text") {
+ /* No text moves bookmarks. */
+ code_edit->set_line_as_bookmarked(0, true);
+ CHECK(code_edit->is_line_bookmarked(0));
+
+ /* Normal. */
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line_count() == 2);
+ CHECK_FALSE(code_edit->is_line_bookmarked(0));
+ CHECK(code_edit->is_line_bookmarked(1));
+
+ /* Non-Breaking. */
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_blank");
+ CHECK(code_edit->get_line_count() == 3);
+ CHECK_FALSE(code_edit->is_line_bookmarked(1));
+ CHECK(code_edit->is_line_bookmarked(2));
+
+ /* Above. */
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_above");
+ CHECK(code_edit->get_line_count() == 4);
+ CHECK_FALSE(code_edit->is_line_bookmarked(2));
+ CHECK(code_edit->is_line_bookmarked(3));
+ }
+
+ SUBCASE("[CodeEdit] bookmarks and new lines with text") {
+ /* Having text does not move bookmark. */
+ code_edit->insert_text_at_caret("text");
+ code_edit->set_line_as_bookmarked(0, true);
+ CHECK(code_edit->is_line_bookmarked(0));
+
+ /* Normal. */
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line_count() == 2);
+ CHECK(code_edit->is_line_bookmarked(0));
+ CHECK_FALSE(code_edit->is_line_bookmarked(1));
+
+ /* Non-Breaking. */
+ code_edit->set_caret_line(0);
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_blank");
+ CHECK(code_edit->get_line_count() == 3);
+ CHECK(code_edit->is_line_bookmarked(0));
+ CHECK_FALSE(code_edit->is_line_bookmarked(1));
+
+ /* Above does move. */
+ code_edit->set_caret_line(0);
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_above");
+ CHECK(code_edit->get_line_count() == 4);
+ CHECK_FALSE(code_edit->is_line_bookmarked(0));
+ CHECK(code_edit->is_line_bookmarked(1));
+ }
+
+ SUBCASE("[CodeEdit] bookmarks and backspace") {
+ code_edit->set_text("\n\n");
+ code_edit->set_line_as_bookmarked(1, true);
+ CHECK(code_edit->is_line_bookmarked(1));
+
+ code_edit->set_caret_line(2);
+
+ /* backspace onto line does not remove bookmark */
+ SEND_GUI_ACTION(code_edit, "ui_text_backspace");
+ CHECK(code_edit->is_line_bookmarked(1));
+
+ /* backspace on bookmarked line removes it */
+ SEND_GUI_ACTION(code_edit, "ui_text_backspace");
+ CHECK_FALSE(code_edit->is_line_bookmarked(0));
+ ERR_PRINT_OFF;
+ CHECK_FALSE(code_edit->is_line_bookmarked(1));
+ ERR_PRINT_ON;
+ }
+
+ SUBCASE("[CodeEdit] bookmarks and delete") {
+ code_edit->set_text("\n\n");
+ code_edit->set_line_as_bookmarked(1, true);
+ CHECK(code_edit->is_line_bookmarked(1));
+ code_edit->set_caret_line(1);
+
+ /* Delete onto bookmarked lines does not remove it. */
+ SEND_GUI_ACTION(code_edit, "ui_text_delete");
+ CHECK(code_edit->get_line_count() == 2);
+ CHECK(code_edit->is_line_bookmarked(1));
+
+ /* Delete moving bookmarked line up removes it. */
+ code_edit->set_caret_line(0);
+ SEND_GUI_ACTION(code_edit, "ui_text_delete");
+ CHECK(code_edit->get_line_count() == 1);
+ ERR_PRINT_OFF;
+ CHECK_FALSE(code_edit->is_line_bookmarked(1));
+ ERR_PRINT_ON;
+ }
+
+ SUBCASE("[CodeEdit] bookmarks and delete selection") {
+ code_edit->set_text("\n\n");
+ code_edit->set_line_as_bookmarked(1, true);
+ CHECK(code_edit->is_line_bookmarked(1));
+
+ code_edit->select(0, 0, 2, 0);
+ code_edit->delete_selection();
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_bookmarked(0));
+ }
+
+ SUBCASE("[CodeEdit] bookmarks and undo") {
+ code_edit->set_text("\n\n");
+ code_edit->set_line_as_bookmarked(1, true);
+ CHECK(code_edit->is_line_bookmarked(1));
+
+ code_edit->select(0, 0, 2, 0);
+ code_edit->delete_selection();
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_bookmarked(0));
+
+ /* Undo does not restore bookmark. */
+ code_edit->undo();
+ CHECK_FALSE(code_edit->is_line_bookmarked(1));
+ }
+ }
+
+ SUBCASE("[CodeEdit] executing lines") {
+ SUBCASE("[CodeEdit] draw executing lines gutter") {
+ code_edit->set_draw_executing_lines_gutter(false);
+ CHECK_FALSE(code_edit->is_drawing_executing_lines_gutter());
+
+ code_edit->set_draw_executing_lines_gutter(true);
+ CHECK(code_edit->is_drawing_executing_lines_gutter());
+ }
+
+ SUBCASE("[CodeEdit] set line as executing lines") {
+ /* Out of bounds. */
+ ERR_PRINT_OFF;
+
+ code_edit->set_line_as_executing(-1, true);
+ CHECK_FALSE(code_edit->is_line_executing(-1));
+
+ code_edit->set_line_as_executing(1, true);
+ CHECK_FALSE(code_edit->is_line_executing(1));
+
+ ERR_PRINT_ON;
+
+ code_edit->set_line_as_executing(0, true);
+ CHECK(code_edit->get_executing_lines()[0] == Variant(0));
+ CHECK(code_edit->is_line_executing(0));
+
+ code_edit->set_line_as_executing(0, false);
+ CHECK_FALSE(code_edit->is_line_executing(0));
+ }
+
+ SUBCASE("[CodeEdit] clear executing lines lines") {
+ code_edit->clear_executing_lines();
+
+ code_edit->set_line_as_executing(0, true);
+ CHECK(code_edit->is_line_executing(0));
+
+ code_edit->clear_executing_lines();
+ CHECK_FALSE(code_edit->is_line_executing(0));
+ }
+
+ SUBCASE("[CodeEdit] executing lines and set text") {
+ code_edit->set_text("test\nline");
+ code_edit->set_line_as_executing(0, true);
+ CHECK(code_edit->is_line_executing(0));
+
+ /* executing on lines that still exist are kept. */
+ code_edit->set_text("");
+ MessageQueue::get_singleton()->flush();
+ CHECK(code_edit->is_line_executing(0));
+
+ /* executing on lines that are removed should also be removed. */
+ code_edit->clear_executing_lines();
+
+ code_edit->set_text("test\nline");
+ code_edit->set_line_as_executing(1, true);
+ CHECK(code_edit->is_line_executing(1));
+
+ code_edit->set_text("");
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_executing(0));
+ ERR_PRINT_OFF;
+ CHECK_FALSE(code_edit->is_line_executing(1));
+ ERR_PRINT_ON;
+ }
+
+ SUBCASE("[CodeEdit] executing lines and clear") {
+ code_edit->set_text("test\nline");
+ code_edit->set_line_as_executing(0, true);
+ CHECK(code_edit->is_line_executing(0));
+
+ /* executing on lines that still exist are removed. */
+ code_edit->clear();
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_executing(0));
+
+ /* executing on lines that are removed should also be removed. */
+ code_edit->clear_executing_lines();
+
+ code_edit->set_text("test\nline");
+ code_edit->set_line_as_executing(1, true);
+ CHECK(code_edit->is_line_executing(1));
+
+ code_edit->clear();
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_executing(0));
+ ERR_PRINT_OFF;
+ CHECK_FALSE(code_edit->is_line_executing(1));
+ ERR_PRINT_ON;
+ }
+
+ SUBCASE("[CodeEdit] executing lines and new lines no text") {
+ /* No text moves executing lines. */
+ code_edit->set_line_as_executing(0, true);
+ CHECK(code_edit->is_line_executing(0));
+
+ /* Normal. */
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line_count() == 2);
+ CHECK_FALSE(code_edit->is_line_executing(0));
+ CHECK(code_edit->is_line_executing(1));
+
+ /* Non-Breaking. */
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_blank");
+ CHECK(code_edit->get_line_count() == 3);
+ CHECK_FALSE(code_edit->is_line_executing(1));
+ CHECK(code_edit->is_line_executing(2));
+
+ /* Above. */
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_above");
+ CHECK(code_edit->get_line_count() == 4);
+ CHECK_FALSE(code_edit->is_line_executing(2));
+ CHECK(code_edit->is_line_executing(3));
+ }
+
+ SUBCASE("[CodeEdit] executing lines and new lines with text") {
+ /* Having text does not move executing lines. */
+ code_edit->insert_text_at_caret("text");
+ code_edit->set_line_as_executing(0, true);
+ CHECK(code_edit->is_line_executing(0));
+
+ /* Normal. */
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line_count() == 2);
+ CHECK(code_edit->is_line_executing(0));
+ CHECK_FALSE(code_edit->is_line_executing(1));
+
+ /* Non-Breaking. */
+ code_edit->set_caret_line(0);
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_blank");
+ CHECK(code_edit->get_line_count() == 3);
+ CHECK(code_edit->is_line_executing(0));
+ CHECK_FALSE(code_edit->is_line_executing(1));
+
+ /* Above does move. */
+ code_edit->set_caret_line(0);
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_above");
+ CHECK(code_edit->get_line_count() == 4);
+ CHECK_FALSE(code_edit->is_line_executing(0));
+ CHECK(code_edit->is_line_executing(1));
+ }
+
+ SUBCASE("[CodeEdit] executing lines and backspace") {
+ code_edit->set_text("\n\n");
+ code_edit->set_line_as_executing(1, true);
+ CHECK(code_edit->is_line_executing(1));
+
+ code_edit->set_caret_line(2);
+
+ /* backspace onto line does not remove executing lines. */
+ SEND_GUI_ACTION(code_edit, "ui_text_backspace");
+ CHECK(code_edit->is_line_executing(1));
+
+ /* backspace on executing line removes it */
+ SEND_GUI_ACTION(code_edit, "ui_text_backspace");
+ CHECK_FALSE(code_edit->is_line_executing(0));
+ ERR_PRINT_OFF;
+ CHECK_FALSE(code_edit->is_line_executing(1));
+ ERR_PRINT_ON;
+ }
+
+ SUBCASE("[CodeEdit] executing lines and delete") {
+ code_edit->set_text("\n\n");
+ code_edit->set_line_as_executing(1, true);
+ CHECK(code_edit->is_line_executing(1));
+ code_edit->set_caret_line(1);
+
+ /* Delete onto executing lines does not remove it. */
+ SEND_GUI_ACTION(code_edit, "ui_text_delete");
+ CHECK(code_edit->get_line_count() == 2);
+ CHECK(code_edit->is_line_executing(1));
+
+ /* Delete moving executing line up removes it. */
+ code_edit->set_caret_line(0);
+ SEND_GUI_ACTION(code_edit, "ui_text_delete");
+ CHECK(code_edit->get_line_count() == 1);
+ ERR_PRINT_OFF;
+ CHECK_FALSE(code_edit->is_line_executing(1));
+ ERR_PRINT_ON;
+ }
+
+ SUBCASE("[CodeEdit] executing lines and delete selection") {
+ code_edit->set_text("\n\n");
+ code_edit->set_line_as_executing(1, true);
+ CHECK(code_edit->is_line_executing(1));
+
+ code_edit->select(0, 0, 2, 0);
+ code_edit->delete_selection();
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_executing(0));
+ }
+
+ SUBCASE("[CodeEdit] executing lines and undo") {
+ code_edit->set_text("\n\n");
+ code_edit->set_line_as_executing(1, true);
+ CHECK(code_edit->is_line_executing(1));
+
+ code_edit->select(0, 0, 2, 0);
+ code_edit->delete_selection();
+ MessageQueue::get_singleton()->flush();
+ CHECK_FALSE(code_edit->is_line_executing(0));
+
+ /* Undo does not restore executing lines. */
+ code_edit->undo();
+ CHECK_FALSE(code_edit->is_line_executing(1));
+ }
+ }
+
+ SUBCASE("[CodeEdit] line numbers") {
+ SUBCASE("[CodeEdit] draw line numbers gutter and padding") {
+ code_edit->set_draw_line_numbers(false);
+ CHECK_FALSE(code_edit->is_draw_line_numbers_enabled());
+
+ code_edit->set_draw_line_numbers(true);
+ CHECK(code_edit->is_draw_line_numbers_enabled());
+
+ code_edit->set_line_numbers_zero_padded(false);
+ CHECK_FALSE(code_edit->is_line_numbers_zero_padded());
+
+ code_edit->set_line_numbers_zero_padded(true);
+ CHECK(code_edit->is_line_numbers_zero_padded());
+
+ code_edit->set_line_numbers_zero_padded(false);
+ CHECK_FALSE(code_edit->is_line_numbers_zero_padded());
+
+ code_edit->set_draw_line_numbers(false);
+ CHECK_FALSE(code_edit->is_draw_line_numbers_enabled());
+
+ code_edit->set_line_numbers_zero_padded(true);
+ CHECK(code_edit->is_line_numbers_zero_padded());
+ }
+ }
+
+ SUBCASE("[CodeEdit] line folding") {
+ SUBCASE("[CodeEdit] draw line folding gutter") {
+ code_edit->set_draw_fold_gutter(false);
+ CHECK_FALSE(code_edit->is_drawing_fold_gutter());
+
+ code_edit->set_draw_fold_gutter(true);
+ CHECK(code_edit->is_drawing_fold_gutter());
+ }
+ }
+
+ memdelete(code_edit);
+}
+
+TEST_CASE("[SceneTree][CodeEdit] delimiters") {
+ CodeEdit *code_edit = memnew(CodeEdit);
+ SceneTree::get_singleton()->get_root()->add_child(code_edit);
+
+ const Point2 OUTSIDE_DELIMETER = Point2(-1, -1);
+
+ code_edit->clear_string_delimiters();
+ code_edit->clear_comment_delimiters();
+
+ SUBCASE("[CodeEdit] add and remove delimiters") {
+ SUBCASE("[CodeEdit] add and remove string delimiters") {
+ /* Add a delimiter.*/
+ code_edit->add_string_delimiter("\"", "\"", false);
+ CHECK(code_edit->has_string_delimiter("\""));
+ CHECK(code_edit->get_string_delimiters().size() == 1);
+
+ ERR_PRINT_OFF;
+
+ /* Adding a duplicate start key is not allowed. */
+ code_edit->add_string_delimiter("\"", "\'", false);
+ CHECK(code_edit->get_string_delimiters().size() == 1);
+
+ /* Adding a duplicate end key is allowed. */
+ code_edit->add_string_delimiter("'", "\"", false);
+ CHECK(code_edit->has_string_delimiter("'"));
+ CHECK(code_edit->get_string_delimiters().size() == 2);
+
+ /* Both start and end keys have to be symbols. */
+ code_edit->add_string_delimiter("f", "\"", false);
+ CHECK_FALSE(code_edit->has_string_delimiter("f"));
+ CHECK(code_edit->get_string_delimiters().size() == 2);
+
+ code_edit->add_string_delimiter("f", "\"", false);
+ CHECK_FALSE(code_edit->has_string_delimiter("f"));
+ CHECK(code_edit->get_string_delimiters().size() == 2);
+
+ code_edit->add_string_delimiter("@", "f", false);
+ CHECK_FALSE(code_edit->has_string_delimiter("@"));
+ CHECK(code_edit->get_string_delimiters().size() == 2);
+
+ code_edit->add_string_delimiter("f", "f", false);
+ CHECK_FALSE(code_edit->has_string_delimiter("f"));
+ CHECK(code_edit->get_string_delimiters().size() == 2);
+
+ /* Blank start keys are not allowed */
+ code_edit->add_string_delimiter("", "#", false);
+ CHECK_FALSE(code_edit->has_string_delimiter("#"));
+ CHECK(code_edit->get_string_delimiters().size() == 2);
+
+ ERR_PRINT_ON;
+
+ /* Blank end keys are allowed. */
+ code_edit->add_string_delimiter("#", "", false);
+ CHECK(code_edit->has_string_delimiter("#"));
+ CHECK(code_edit->get_string_delimiters().size() == 3);
+
+ /* Remove a delimiter. */
+ code_edit->remove_string_delimiter("#");
+ CHECK_FALSE(code_edit->has_string_delimiter("#"));
+ CHECK(code_edit->get_string_delimiters().size() == 2);
+
+ /* Set should override existing, and test multiline */
+ TypedArray<String> delimiters;
+ delimiters.push_back("^^ ^^");
+
+ code_edit->set_string_delimiters(delimiters);
+ CHECK_FALSE(code_edit->has_string_delimiter("\""));
+ CHECK(code_edit->has_string_delimiter("^^"));
+ CHECK(code_edit->get_string_delimiters().size() == 1);
+
+ /* clear should remove all. */
+ code_edit->clear_string_delimiters();
+ CHECK_FALSE(code_edit->has_string_delimiter("^^"));
+ CHECK(code_edit->get_string_delimiters().size() == 0);
+ }
+
+ SUBCASE("[CodeEdit] add and remove comment delimiters") {
+ /* Add a delimiter.*/
+ code_edit->add_comment_delimiter("\"", "\"", false);
+ CHECK(code_edit->has_comment_delimiter("\""));
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+
+ ERR_PRINT_OFF;
+
+ /* Adding a duplicate start key is not allowed. */
+ code_edit->add_comment_delimiter("\"", "\'", false);
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+
+ /* Adding a duplicate end key is allowed. */
+ code_edit->add_comment_delimiter("'", "\"", false);
+ CHECK(code_edit->has_comment_delimiter("'"));
+ CHECK(code_edit->get_comment_delimiters().size() == 2);
+
+ /* Both start and end keys have to be symbols. */
+ code_edit->add_comment_delimiter("f", "\"", false);
+ CHECK_FALSE(code_edit->has_comment_delimiter("f"));
+ CHECK(code_edit->get_comment_delimiters().size() == 2);
+
+ code_edit->add_comment_delimiter("f", "\"", false);
+ CHECK_FALSE(code_edit->has_comment_delimiter("f"));
+ CHECK(code_edit->get_comment_delimiters().size() == 2);
+
+ code_edit->add_comment_delimiter("@", "f", false);
+ CHECK_FALSE(code_edit->has_comment_delimiter("@"));
+ CHECK(code_edit->get_comment_delimiters().size() == 2);
+
+ code_edit->add_comment_delimiter("f", "f", false);
+ CHECK_FALSE(code_edit->has_comment_delimiter("f"));
+ CHECK(code_edit->get_comment_delimiters().size() == 2);
+
+ /* Blank start keys are not allowed. */
+ code_edit->add_comment_delimiter("", "#", false);
+ CHECK_FALSE(code_edit->has_comment_delimiter("#"));
+ CHECK(code_edit->get_comment_delimiters().size() == 2);
+
+ ERR_PRINT_ON;
+
+ /* Blank end keys are allowed. */
+ code_edit->add_comment_delimiter("#", "", false);
+ CHECK(code_edit->has_comment_delimiter("#"));
+ CHECK(code_edit->get_comment_delimiters().size() == 3);
+
+ /* Remove a delimiter. */
+ code_edit->remove_comment_delimiter("#");
+ CHECK_FALSE(code_edit->has_comment_delimiter("#"));
+ CHECK(code_edit->get_comment_delimiters().size() == 2);
+
+ /* Set should override existing, and test multiline. */
+ TypedArray<String> delimiters;
+ delimiters.push_back("^^ ^^");
+
+ code_edit->set_comment_delimiters(delimiters);
+ CHECK_FALSE(code_edit->has_comment_delimiter("\""));
+ CHECK(code_edit->has_comment_delimiter("^^"));
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+
+ /* clear should remove all. */
+ code_edit->clear_comment_delimiters();
+ CHECK_FALSE(code_edit->has_comment_delimiter("^^"));
+ CHECK(code_edit->get_comment_delimiters().size() == 0);
+ }
+
+ SUBCASE("[CodeEdit] add and remove mixed delimiters") {
+ code_edit->add_comment_delimiter("#", "", false);
+ CHECK(code_edit->has_comment_delimiter("#"));
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+
+ ERR_PRINT_OFF;
+
+ /* Disallow adding a string with the same start key as comment. */
+ code_edit->add_string_delimiter("#", "", false);
+ CHECK_FALSE(code_edit->has_string_delimiter("#"));
+ CHECK(code_edit->get_string_delimiters().size() == 0);
+
+ code_edit->add_string_delimiter("\"", "\"", false);
+ CHECK(code_edit->has_string_delimiter("\""));
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+
+ /* Disallow adding a comment with the same start key as string. */
+ code_edit->add_comment_delimiter("\"", "", false);
+ CHECK_FALSE(code_edit->has_comment_delimiter("\""));
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+
+ ERR_PRINT_ON;
+
+ /* Cannot remove string with remove comment. */
+ code_edit->remove_comment_delimiter("\"");
+ CHECK(code_edit->has_string_delimiter("\""));
+ CHECK(code_edit->get_string_delimiters().size() == 1);
+
+ /* Cannot remove comment with remove string. */
+ code_edit->remove_string_delimiter("#");
+ CHECK(code_edit->has_comment_delimiter("#"));
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+
+ /* Clear comments leave strings. */
+ code_edit->clear_comment_delimiters();
+ CHECK(code_edit->has_string_delimiter("\""));
+ CHECK(code_edit->get_string_delimiters().size() == 1);
+
+ /* Clear string leave comments. */
+ code_edit->add_comment_delimiter("#", "", false);
+ CHECK(code_edit->has_comment_delimiter("#"));
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+
+ code_edit->clear_string_delimiters();
+ CHECK(code_edit->has_comment_delimiter("#"));
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+ }
+ }
+
+ SUBCASE("[CodeEdit] single line delimiters") {
+ SUBCASE("[CodeEdit] single line string delimiters") {
+ /* Blank end key should set lineonly to true. */
+ code_edit->add_string_delimiter("#", "", false);
+ CHECK(code_edit->has_string_delimiter("#"));
+ CHECK(code_edit->get_string_delimiters().size() == 1);
+
+ /* Insert line above, line with string then line below. */
+ code_edit->insert_text_at_caret(" \n#\n ");
+
+ /* Check line above is not in string. */
+ CHECK(code_edit->is_in_string(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before start key is not in string. */
+ CHECK(code_edit->is_in_string(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column after start key is in string and start / end positions are correct. */
+ CHECK(code_edit->is_in_string(1, 1) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 1) == Point2(1, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 1) == Point2(2, 1));
+
+ /* Check line after is not in string. */
+ CHECK(code_edit->is_in_string(2, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
+
+ /* Check region metadata. */
+ int idx = code_edit->is_in_string(1, 1);
+ CHECK(code_edit->get_delimiter_start_key(idx) == "#");
+ CHECK(code_edit->get_delimiter_end_key(idx) == "");
+
+ /* Check nested strings are handeled correctly. */
+ code_edit->set_text(" \n# # \n ");
+
+ /* Check line above is not in string. */
+ CHECK(code_edit->is_in_string(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before first start key is not in string. */
+ CHECK(code_edit->is_in_string(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column after the first start key is in string and start / end positions are correct. */
+ CHECK(code_edit->is_in_string(1, 1) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 1) == Point2(1, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 1) == Point2(6, 1));
+
+ /* Check column after the second start key returns data for the first. */
+ CHECK(code_edit->is_in_string(1, 5) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 5) == Point2(1, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 5) == Point2(6, 1));
+
+ /* Check line after is not in string. */
+ CHECK(code_edit->is_in_string(2, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
+
+ /* Check is in string with no column retruns true if entire line is comment excluding whitespace. */
+ code_edit->set_text(" \n # # \n ");
+ CHECK(code_edit->is_in_string(1) != -1);
+
+ code_edit->set_text(" \n text # # \n ");
+ CHECK(code_edit->is_in_string(1) == -1);
+
+ /* Removing delimiter should update. */
+ code_edit->set_text(" \n # # \n ");
+
+ code_edit->remove_string_delimiter("#");
+ CHECK_FALSE(code_edit->has_string_delimiter("$"));
+ CHECK(code_edit->get_string_delimiters().size() == 0);
+
+ CHECK(code_edit->is_in_string(1) == -1);
+
+ /* Adding and clear should update. */
+ code_edit->add_string_delimiter("#", "", false);
+ CHECK(code_edit->has_string_delimiter("#"));
+ CHECK(code_edit->get_string_delimiters().size() == 1);
+ CHECK(code_edit->is_in_string(1) != -1);
+
+ code_edit->clear_string_delimiters();
+ CHECK_FALSE(code_edit->has_string_delimiter("$"));
+ CHECK(code_edit->get_string_delimiters().size() == 0);
+
+ CHECK(code_edit->is_in_string(1) == -1);
+ }
+
+ SUBCASE("[CodeEdit] single line comment delimiters") {
+ /* Blank end key should set lineonly to true. */
+ code_edit->add_comment_delimiter("#", "", false);
+ CHECK(code_edit->has_comment_delimiter("#"));
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+
+ /* Insert line above, line with comment then line below. */
+ code_edit->insert_text_at_caret(" \n#\n ");
+
+ /* Check line above is not in comment. */
+ CHECK(code_edit->is_in_comment(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before start key is not in comment. */
+ CHECK(code_edit->is_in_comment(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column after start key is in comment and start / end positions are correct. */
+ CHECK(code_edit->is_in_comment(1, 1) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 1) == Point2(1, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 1) == Point2(2, 1));
+
+ /* Check line after is not in comment. */
+ CHECK(code_edit->is_in_comment(2, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
+
+ /* Check region metadata. */
+ int idx = code_edit->is_in_comment(1, 1);
+ CHECK(code_edit->get_delimiter_start_key(idx) == "#");
+ CHECK(code_edit->get_delimiter_end_key(idx) == "");
+
+ /* Check nested comments are handeled correctly. */
+ code_edit->set_text(" \n# # \n ");
+
+ /* Check line above is not in comment. */
+ CHECK(code_edit->is_in_comment(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before first start key is not in comment. */
+ CHECK(code_edit->is_in_comment(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column after the first start key is in comment and start / end positions are correct. */
+ CHECK(code_edit->is_in_comment(1, 1) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 1) == Point2(1, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 1) == Point2(6, 1));
+
+ /* Check column after the second start key returns data for the first. */
+ CHECK(code_edit->is_in_comment(1, 5) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 5) == Point2(1, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 5) == Point2(6, 1));
+
+ /* Check line after is not in comment. */
+ CHECK(code_edit->is_in_comment(2, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
+
+ /* Check is in comment with no column retruns true if entire line is comment excluding whitespace. */
+ code_edit->set_text(" \n # # \n ");
+ CHECK(code_edit->is_in_comment(1) != -1);
+
+ code_edit->set_text(" \n text # # \n ");
+ CHECK(code_edit->is_in_comment(1) == -1);
+
+ /* Removing delimiter should update. */
+ code_edit->set_text(" \n # # \n ");
+
+ code_edit->remove_comment_delimiter("#");
+ CHECK_FALSE(code_edit->has_comment_delimiter("$"));
+ CHECK(code_edit->get_comment_delimiters().size() == 0);
+
+ CHECK(code_edit->is_in_comment(1) == -1);
+
+ /* Adding and clear should update. */
+ code_edit->add_comment_delimiter("#", "", false);
+ CHECK(code_edit->has_comment_delimiter("#"));
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+ CHECK(code_edit->is_in_comment(1) != -1);
+
+ code_edit->clear_comment_delimiters();
+ CHECK_FALSE(code_edit->has_comment_delimiter("$"));
+ CHECK(code_edit->get_comment_delimiters().size() == 0);
+
+ CHECK(code_edit->is_in_comment(1) == -1);
+ }
+
+ SUBCASE("[CodeEdit] single line mixed delimiters") {
+ /* Blank end key should set lineonly to true. */
+ /* Add string delimiter. */
+ code_edit->add_string_delimiter("&", "", false);
+ CHECK(code_edit->has_string_delimiter("&"));
+ CHECK(code_edit->get_string_delimiters().size() == 1);
+
+ /* Add comment delimiter. */
+ code_edit->add_comment_delimiter("#", "", false);
+ CHECK(code_edit->has_comment_delimiter("#"));
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+
+ /* Nest a string delimiter inside a comment. */
+ code_edit->set_text(" \n# & \n ");
+
+ /* Check line above is not in comment. */
+ CHECK(code_edit->is_in_comment(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before first start key is not in comment. */
+ CHECK(code_edit->is_in_comment(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column after the first start key is in comment and start / end positions are correct. */
+ CHECK(code_edit->is_in_comment(1, 1) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 1) == Point2(1, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 1) == Point2(6, 1));
+
+ /* Check column after the second start key returns data for the first, and does not state string. */
+ CHECK(code_edit->is_in_comment(1, 5) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 5) == Point2(1, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 5) == Point2(6, 1));
+ CHECK(code_edit->is_in_string(1, 5) == -1);
+
+ /* Check line after is not in comment. */
+ CHECK(code_edit->is_in_comment(2, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
+
+ /* Remove the comment delimiter. */
+ code_edit->remove_comment_delimiter("#");
+ CHECK_FALSE(code_edit->has_comment_delimiter("$"));
+ CHECK(code_edit->get_comment_delimiters().size() == 0);
+
+ /* The "first" comment region is no longer valid. */
+ CHECK(code_edit->is_in_comment(1, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 1) == OUTSIDE_DELIMETER);
+
+ /* The "second" region as string is now valid. */
+ CHECK(code_edit->is_in_string(1, 5) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 5) == Point2(4, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 5) == Point2(6, 1));
+ }
+ }
+
+ SUBCASE("[CodeEdit] multiline delimiters") {
+ SUBCASE("[CodeEdit] multiline string delimiters") {
+ code_edit->clear_string_delimiters();
+ code_edit->clear_comment_delimiters();
+
+ /* Add string delimiter. */
+ code_edit->add_string_delimiter("#", "#", false);
+ CHECK(code_edit->has_string_delimiter("#"));
+ CHECK(code_edit->get_string_delimiters().size() == 1);
+
+ /* First test over a single line. */
+ code_edit->set_text(" \n # # \n ");
+
+ /* Check line above is not in string. */
+ CHECK(code_edit->is_in_string(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before start key is not in string. */
+ CHECK(code_edit->is_in_string(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column before closing delimiter is in string. */
+ CHECK(code_edit->is_in_string(1, 2) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 2) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 2) == Point2(5, 1));
+
+ /* Check column after end key is not in string. */
+ CHECK(code_edit->is_in_string(1, 6) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 6) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 6) == OUTSIDE_DELIMETER);
+
+ /* Check line after is not in string. */
+ CHECK(code_edit->is_in_string(2, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
+
+ /* Check the region metadata. */
+ int idx = code_edit->is_in_string(1, 2);
+ CHECK(code_edit->get_delimiter_start_key(idx) == "#");
+ CHECK(code_edit->get_delimiter_end_key(idx) == "#");
+
+ /* Next test over a multiple blank lines. */
+ code_edit->set_text(" \n # \n\n # \n ");
+
+ /* Check line above is not in string. */
+ CHECK(code_edit->is_in_string(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before start key is not in string. */
+ CHECK(code_edit->is_in_string(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column just after start key is in string. */
+ CHECK(code_edit->is_in_string(1, 2) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 2) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 2) == Point2(2, 3));
+
+ /* Check blank middle line. */
+ CHECK(code_edit->is_in_string(2, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(2, 0) == Point2(2, 3));
+
+ /* Check column just before end key is in string. */
+ CHECK(code_edit->is_in_string(3, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(3, 0) == Point2(2, 3));
+
+ /* Check column after end key is not in string. */
+ CHECK(code_edit->is_in_string(3, 3) == -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
+
+ /* Check line after is not in string. */
+ CHECK(code_edit->is_in_string(4, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
+
+ /* Next test over a multiple non-blank lines. */
+ code_edit->set_text(" \n # \n \n # \n ");
+
+ /* Check line above is not in string. */
+ CHECK(code_edit->is_in_string(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before start key is not in string. */
+ CHECK(code_edit->is_in_string(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column just after start key is in string. */
+ CHECK(code_edit->is_in_string(1, 2) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 2) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 2) == Point2(2, 3));
+
+ /* Check middle line. */
+ CHECK(code_edit->is_in_string(2, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(2, 0) == Point2(2, 3));
+
+ /* Check column just before end key is in string. */
+ CHECK(code_edit->is_in_string(3, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(3, 0) == Point2(2, 3));
+
+ /* Check column after end key is not in string. */
+ CHECK(code_edit->is_in_string(3, 3) == -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
+
+ /* Check line after is not in string. */
+ CHECK(code_edit->is_in_string(4, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
+
+ /* check the region metadata. */
+ idx = code_edit->is_in_string(1, 2);
+ CHECK(code_edit->get_delimiter_start_key(idx) == "#");
+ CHECK(code_edit->get_delimiter_end_key(idx) == "#");
+
+ /* Next test nested strings. */
+ code_edit->add_string_delimiter("^", "^", false);
+ CHECK(code_edit->has_string_delimiter("^"));
+ CHECK(code_edit->get_string_delimiters().size() == 2);
+
+ code_edit->set_text(" \n # ^\n \n^ # \n ");
+
+ /* Check line above is not in string. */
+ CHECK(code_edit->is_in_string(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before start key is not in string. */
+ CHECK(code_edit->is_in_string(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column just after start key is in string. */
+ CHECK(code_edit->is_in_string(1, 2) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 2) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 2) == Point2(3, 3));
+
+ /* Check middle line. */
+ CHECK(code_edit->is_in_string(2, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(2, 0) == Point2(3, 3));
+
+ /* Check column just before end key is in string. */
+ CHECK(code_edit->is_in_string(3, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(3, 0) == Point2(3, 3));
+
+ /* Check column after end key is not in string. */
+ CHECK(code_edit->is_in_string(3, 3) == -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
+
+ /* Check line after is not in string. */
+ CHECK(code_edit->is_in_string(4, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
+
+ /* check the region metadata. */
+ idx = code_edit->is_in_string(1, 2);
+ CHECK(code_edit->get_delimiter_start_key(idx) == "#");
+ CHECK(code_edit->get_delimiter_end_key(idx) == "#");
+
+ /* Next test no end key. */
+ code_edit->set_text(" \n # \n ");
+
+ /* check the region metadata. */
+ idx = code_edit->is_in_string(1, 2);
+ CHECK(code_edit->get_delimiter_start_position(1, 2) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 2) == Point2(-1, -1));
+ CHECK(code_edit->get_delimiter_start_key(idx) == "#");
+ CHECK(code_edit->get_delimiter_end_key(idx) == "#");
+
+ /* Check is in string with no column retruns true if entire line is string excluding whitespace. */
+ code_edit->set_text(" \n # \n\n #\n ");
+ CHECK(code_edit->is_in_string(1) != -1);
+ CHECK(code_edit->is_in_string(2) != -1);
+ CHECK(code_edit->is_in_string(3) != -1);
+
+ code_edit->set_text(" \n test # \n\n # test \n ");
+ CHECK(code_edit->is_in_string(1) == -1);
+ CHECK(code_edit->is_in_string(2) != -1);
+ CHECK(code_edit->is_in_string(3) == -1);
+ }
+
+ SUBCASE("[CodeEdit] multiline comment delimiters") {
+ /* Add comment delimiter. */
+ code_edit->add_comment_delimiter("#", "#", false);
+ CHECK(code_edit->has_comment_delimiter("#"));
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+
+ /* First test over a single line. */
+ code_edit->set_text(" \n # # \n ");
+
+ /* Check line above is not in comment. */
+ CHECK(code_edit->is_in_comment(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before start key is not in comment. */
+ CHECK(code_edit->is_in_comment(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column before closing delimiter is in comment. */
+ CHECK(code_edit->is_in_comment(1, 2) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 2) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 2) == Point2(5, 1));
+
+ /* Check column after end key is not in comment. */
+ CHECK(code_edit->is_in_comment(1, 6) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 6) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 6) == OUTSIDE_DELIMETER);
+
+ /* Check line after is not in comment. */
+ CHECK(code_edit->is_in_comment(2, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER);
+
+ /* Check the region metadata. */
+ int idx = code_edit->is_in_comment(1, 2);
+ CHECK(code_edit->get_delimiter_start_key(idx) == "#");
+ CHECK(code_edit->get_delimiter_end_key(idx) == "#");
+
+ /* Next test over a multiple blank lines. */
+ code_edit->set_text(" \n # \n\n # \n ");
+
+ /* Check line above is not in comment. */
+ CHECK(code_edit->is_in_comment(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before start key is not in comment. */
+ CHECK(code_edit->is_in_comment(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column just after start key is in comment. */
+ CHECK(code_edit->is_in_comment(1, 2) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 2) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 2) == Point2(2, 3));
+
+ /* Check blank middle line. */
+ CHECK(code_edit->is_in_comment(2, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(2, 0) == Point2(2, 3));
+
+ /* Check column just before end key is in comment. */
+ CHECK(code_edit->is_in_comment(3, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(3, 0) == Point2(2, 3));
+
+ /* Check column after end key is not in comment. */
+ CHECK(code_edit->is_in_comment(3, 3) == -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
+
+ /* Check line after is not in comment. */
+ CHECK(code_edit->is_in_comment(4, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
+
+ /* Next test over a multiple non-blank lines. */
+ code_edit->set_text(" \n # \n \n # \n ");
+
+ /* Check line above is not in comment. */
+ CHECK(code_edit->is_in_comment(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before start key is not in comment. */
+ CHECK(code_edit->is_in_comment(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column just after start key is in comment. */
+ CHECK(code_edit->is_in_comment(1, 2) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 2) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 2) == Point2(2, 3));
+
+ /* Check middle line. */
+ CHECK(code_edit->is_in_comment(2, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(2, 0) == Point2(2, 3));
+
+ /* Check column just before end key is in comment. */
+ CHECK(code_edit->is_in_comment(3, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(3, 0) == Point2(2, 3));
+
+ /* Check column after end key is not in comment. */
+ CHECK(code_edit->is_in_comment(3, 3) == -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
+
+ /* Check line after is not in comment. */
+ CHECK(code_edit->is_in_comment(4, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
+
+ /* check the region metadata. */
+ idx = code_edit->is_in_comment(1, 2);
+ CHECK(code_edit->get_delimiter_start_key(idx) == "#");
+ CHECK(code_edit->get_delimiter_end_key(idx) == "#");
+
+ /* Next test nested comments. */
+ code_edit->add_comment_delimiter("^", "^", false);
+ CHECK(code_edit->has_comment_delimiter("^"));
+ CHECK(code_edit->get_comment_delimiters().size() == 2);
+
+ code_edit->set_text(" \n # ^\n \n^ # \n ");
+
+ /* Check line above is not in comment. */
+ CHECK(code_edit->is_in_comment(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before start key is not in comment. */
+ CHECK(code_edit->is_in_comment(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column just after start key is in comment. */
+ CHECK(code_edit->is_in_comment(1, 2) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 2) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 2) == Point2(3, 3));
+
+ /* Check middle line. */
+ CHECK(code_edit->is_in_comment(2, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(2, 0) == Point2(3, 3));
+
+ /* Check column just before end key is in comment. */
+ CHECK(code_edit->is_in_comment(3, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(3, 0) == Point2(3, 3));
+
+ /* Check column after end key is not in comment. */
+ CHECK(code_edit->is_in_comment(3, 3) == -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
+
+ /* Check line after is not in comment. */
+ CHECK(code_edit->is_in_comment(4, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
+
+ /* check the region metadata. */
+ idx = code_edit->is_in_comment(1, 2);
+ CHECK(code_edit->get_delimiter_start_key(idx) == "#");
+ CHECK(code_edit->get_delimiter_end_key(idx) == "#");
+
+ /* Next test no end key. */
+ code_edit->set_text(" \n # \n ");
+
+ /* check the region metadata. */
+ idx = code_edit->is_in_comment(1, 2);
+ CHECK(code_edit->get_delimiter_start_position(1, 2) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 2) == Point2(-1, -1));
+ CHECK(code_edit->get_delimiter_start_key(idx) == "#");
+ CHECK(code_edit->get_delimiter_end_key(idx) == "#");
+
+ /* Check is in comment with no column retruns true if entire line is comment excluding whitespace. */
+ code_edit->set_text(" \n # \n\n #\n ");
+ CHECK(code_edit->is_in_comment(1) != -1);
+ CHECK(code_edit->is_in_comment(2) != -1);
+ CHECK(code_edit->is_in_comment(3) != -1);
+
+ code_edit->set_text(" \n test # \n\n # test \n ");
+ CHECK(code_edit->is_in_comment(1) == -1);
+ CHECK(code_edit->is_in_comment(2) != -1);
+ CHECK(code_edit->is_in_comment(3) == -1);
+ }
+
+ SUBCASE("[CodeEdit] multiline mixed delimiters") {
+ /* Add comment delimiter. */
+ code_edit->add_comment_delimiter("#", "#", false);
+ CHECK(code_edit->has_comment_delimiter("#"));
+ CHECK(code_edit->get_comment_delimiters().size() == 1);
+
+ /* Add string delimiter. */
+ code_edit->add_string_delimiter("^", "^", false);
+ CHECK(code_edit->has_string_delimiter("^"));
+ CHECK(code_edit->get_string_delimiters().size() == 1);
+
+ /* Nest a string inside a comment. */
+ code_edit->set_text(" \n # ^\n \n^ # \n ");
+
+ /* Check line above is not in comment. */
+ CHECK(code_edit->is_in_comment(0, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(0, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(0, 1) == OUTSIDE_DELIMETER);
+
+ /* Check column before start key is not in comment. */
+ CHECK(code_edit->is_in_comment(1, 0) == -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 0) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(1, 0) == OUTSIDE_DELIMETER);
+
+ /* Check column just after start key is in comment. */
+ CHECK(code_edit->is_in_comment(1, 2) != -1);
+ CHECK(code_edit->get_delimiter_start_position(1, 2) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(1, 2) == Point2(3, 3));
+
+ /* Check middle line. */
+ CHECK(code_edit->is_in_comment(2, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(2, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(2, 0) == Point2(3, 3));
+
+ /* Check column just before end key is in comment. */
+ CHECK(code_edit->is_in_comment(3, 0) != -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 0) == Point2(2, 1));
+ CHECK(code_edit->get_delimiter_end_position(3, 0) == Point2(3, 3));
+
+ /* Check column after end key is not in comment. */
+ CHECK(code_edit->is_in_comment(3, 3) == -1);
+ CHECK(code_edit->get_delimiter_start_position(3, 3) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(3, 3) == OUTSIDE_DELIMETER);
+
+ /* Check line after is not in comment. */
+ CHECK(code_edit->is_in_comment(4, 1) == -1);
+ CHECK(code_edit->get_delimiter_start_position(4, 1) == OUTSIDE_DELIMETER);
+ CHECK(code_edit->get_delimiter_end_position(4, 1) == OUTSIDE_DELIMETER);
+
+ /* check the region metadata. */
+ int idx = code_edit->is_in_comment(1, 2);
+ CHECK(code_edit->get_delimiter_start_key(idx) == "#");
+ CHECK(code_edit->get_delimiter_end_key(idx) == "#");
+
+ /* Check is in comment with no column retruns true as inner delimiter should not be counted. */
+ CHECK(code_edit->is_in_comment(1) != -1);
+ CHECK(code_edit->is_in_comment(2) != -1);
+ CHECK(code_edit->is_in_comment(3) != -1);
+ }
+ }
+
+ memdelete(code_edit);
+}
+
+TEST_CASE("[SceneTree][CodeEdit] indent") {
+ CodeEdit *code_edit = memnew(CodeEdit);
+ SceneTree::get_singleton()->get_root()->add_child(code_edit);
+
+ SUBCASE("[CodeEdit] indent settings") {
+ code_edit->set_indent_size(10);
+ CHECK(code_edit->get_indent_size() == 10);
+ CHECK(code_edit->get_tab_size() == 10);
+
+ code_edit->set_auto_indent_enabled(false);
+ CHECK_FALSE(code_edit->is_auto_indent_enabled());
+
+ code_edit->set_auto_indent_enabled(true);
+ CHECK(code_edit->is_auto_indent_enabled());
+
+ code_edit->set_indent_using_spaces(false);
+ CHECK_FALSE(code_edit->is_indent_using_spaces());
+
+ code_edit->set_indent_using_spaces(true);
+ CHECK(code_edit->is_indent_using_spaces());
+
+ /* Only the first char is registered. */
+ TypedArray<String> auto_indent_prefixes;
+ auto_indent_prefixes.push_back("::");
+ auto_indent_prefixes.push_back("s");
+ auto_indent_prefixes.push_back("1");
+ code_edit->set_auto_indent_prefixes(auto_indent_prefixes);
+
+ auto_indent_prefixes = code_edit->get_auto_indent_prefixes();
+ CHECK(auto_indent_prefixes.has(":"));
+ CHECK(auto_indent_prefixes.has("s"));
+ CHECK(auto_indent_prefixes.has("1"));
+ }
+
+ SUBCASE("[CodeEdit] indent tabs") {
+ code_edit->set_indent_size(4);
+ code_edit->set_auto_indent_enabled(true);
+ code_edit->set_indent_using_spaces(false);
+
+ /* Do nothing if not editable. */
+ code_edit->set_editable(false);
+
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0).is_empty());
+
+ code_edit->indent_lines();
+ CHECK(code_edit->get_line(0).is_empty());
+
+ code_edit->set_editable(true);
+
+ /* Simple indent. */
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0) == "\t");
+
+ /* Check input action. */
+ SEND_GUI_ACTION(code_edit, "ui_text_indent");
+ CHECK(code_edit->get_line(0) == "\t\t");
+
+ /* Insert in place. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test");
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0) == "test\t");
+
+ /* Indent lines does entire line and works without selection. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test");
+ code_edit->indent_lines();
+ CHECK(code_edit->get_line(0) == "\ttest");
+
+ /* Selection does entire line. */
+ code_edit->set_text("test");
+ code_edit->select_all();
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0) == "\ttest");
+
+ /* Handles multiple lines. */
+ code_edit->set_text("test\ntext");
+ code_edit->select_all();
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0) == "\ttest");
+ CHECK(code_edit->get_line(1) == "\ttext");
+
+ /* Do not indent line if last col is zero. */
+ code_edit->set_text("test\ntext");
+ code_edit->select(0, 0, 1, 0);
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0) == "\ttest");
+ CHECK(code_edit->get_line(1) == "text");
+
+ /* Indent even if last column of first line. */
+ code_edit->set_text("test\ntext");
+ code_edit->select(0, 4, 1, 0);
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0) == "\ttest");
+ CHECK(code_edit->get_line(1) == "text");
+
+ /* Check selection is adjusted. */
+ code_edit->set_text("test");
+ code_edit->select(0, 1, 0, 2);
+ code_edit->do_indent();
+ CHECK(code_edit->get_selection_from_column() == 2);
+ CHECK(code_edit->get_selection_to_column() == 3);
+ CHECK(code_edit->get_line(0) == "\ttest");
+ code_edit->undo();
+ }
+
+ SUBCASE("[CodeEdit] indent spaces") {
+ code_edit->set_indent_size(4);
+ code_edit->set_auto_indent_enabled(true);
+ code_edit->set_indent_using_spaces(true);
+
+ /* Do nothing if not editable. */
+ code_edit->set_editable(false);
+
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0).is_empty());
+
+ code_edit->indent_lines();
+ CHECK(code_edit->get_line(0).is_empty());
+
+ code_edit->set_editable(true);
+
+ /* Simple indent. */
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0) == " ");
+
+ /* Check input action. */
+ SEND_GUI_ACTION(code_edit, "ui_text_indent");
+ CHECK(code_edit->get_line(0) == " ");
+
+ /* Insert in place. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test");
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0) == "test ");
+
+ /* Indent lines does entire line and works without selection. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test");
+ code_edit->indent_lines();
+ CHECK(code_edit->get_line(0) == " test");
+
+ /* Selection does entire line. */
+ code_edit->set_text("test");
+ code_edit->select_all();
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0) == " test");
+
+ /* single indent only add required spaces. */
+ code_edit->set_text(" test");
+ code_edit->select_all();
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0) == " test");
+
+ /* Handles multiple lines. */
+ code_edit->set_text("test\ntext");
+ code_edit->select_all();
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0) == " test");
+ CHECK(code_edit->get_line(1) == " text");
+
+ /* Do not indent line if last col is zero. */
+ code_edit->set_text("test\ntext");
+ code_edit->select(0, 0, 1, 0);
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0) == " test");
+ CHECK(code_edit->get_line(1) == "text");
+
+ /* Indent even if last column of first line. */
+ code_edit->set_text("test\ntext");
+ code_edit->select(0, 4, 1, 0);
+ code_edit->do_indent();
+ CHECK(code_edit->get_line(0) == " test");
+ CHECK(code_edit->get_line(1) == "text");
+
+ /* Check selection is adjusted. */
+ code_edit->set_text("test");
+ code_edit->select(0, 1, 0, 2);
+ code_edit->do_indent();
+ CHECK(code_edit->get_selection_from_column() == 5);
+ CHECK(code_edit->get_selection_to_column() == 6);
+ CHECK(code_edit->get_line(0) == " test");
+ }
+
+ SUBCASE("[CodeEdit] unindent tabs") {
+ code_edit->set_indent_size(4);
+ code_edit->set_auto_indent_enabled(true);
+ code_edit->set_indent_using_spaces(false);
+
+ /* Do nothing if not editable. */
+ code_edit->set_text("\t");
+
+ code_edit->set_editable(false);
+
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == "\t");
+
+ code_edit->unindent_lines();
+ CHECK(code_edit->get_line(0) == "\t");
+
+ code_edit->set_editable(true);
+
+ /* Simple unindent. */
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == "");
+
+ /* Should inindent inplace. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test\t");
+
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == "test");
+
+ /* Backspace does a simple unindent. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("\t");
+ code_edit->backspace();
+ CHECK(code_edit->get_line(0) == "");
+
+ /* Unindent lines does entire line and works without selection. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("\ttest");
+ code_edit->unindent_lines();
+ CHECK(code_edit->get_line(0) == "test");
+
+ /* Caret on col zero unindent line. */
+ code_edit->set_text("\t\ttest");
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == "\ttest");
+
+ /* Check input action. */
+ code_edit->set_text("\t\ttest");
+ SEND_GUI_ACTION(code_edit, "ui_text_dedent");
+ CHECK(code_edit->get_line(0) == "\ttest");
+
+ /* Selection does entire line. */
+ code_edit->set_text("\t\ttest");
+ code_edit->select_all();
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == "\ttest");
+
+ /* Handles multiple lines. */
+ code_edit->set_text("\ttest\n\ttext");
+ code_edit->select_all();
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == "test");
+ CHECK(code_edit->get_line(1) == "text");
+
+ /* Do not unindent line if last col is zero. */
+ code_edit->set_text("\ttest\n\ttext");
+ code_edit->select(0, 0, 1, 0);
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == "test");
+ CHECK(code_edit->get_line(1) == "\ttext");
+
+ /* Unindent even if last column of first line. */
+ code_edit->set_text("\ttest\n\ttext");
+ code_edit->select(0, 5, 1, 1);
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == "test");
+ CHECK(code_edit->get_line(1) == "text");
+
+ /* Check selection is adjusted. */
+ code_edit->set_text("\ttest");
+ code_edit->select(0, 1, 0, 2);
+ code_edit->do_unindent();
+ CHECK(code_edit->get_selection_from_column() == 0);
+ CHECK(code_edit->get_selection_to_column() == 1);
+ CHECK(code_edit->get_line(0) == "test");
+ }
+
+ SUBCASE("[CodeEdit] unindent spaces") {
+ code_edit->set_indent_size(4);
+ code_edit->set_auto_indent_enabled(true);
+ code_edit->set_indent_using_spaces(true);
+
+ /* Do nothing if not editable. */
+ code_edit->set_text(" ");
+
+ code_edit->set_editable(false);
+
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == " ");
+
+ code_edit->unindent_lines();
+ CHECK(code_edit->get_line(0) == " ");
+
+ code_edit->set_editable(true);
+
+ /* Simple unindent. */
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == "");
+
+ /* Should inindent inplace. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test ");
+
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == "test");
+
+ /* Backspace does a simple unindent. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret(" ");
+ code_edit->backspace();
+ CHECK(code_edit->get_line(0) == "");
+
+ /* Backspace with letter. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret(" a");
+ code_edit->backspace();
+ CHECK(code_edit->get_line(0) == " ");
+
+ /* Unindent lines does entire line and works without selection. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret(" test");
+ code_edit->unindent_lines();
+ CHECK(code_edit->get_line(0) == "test");
+
+ /* Caret on col zero unindent line. */
+ code_edit->set_text(" test");
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == " test");
+
+ /* Only as far as needed */
+ code_edit->set_text(" test");
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == " test");
+
+ /* Check input action. */
+ code_edit->set_text(" test");
+ SEND_GUI_ACTION(code_edit, "ui_text_dedent");
+ CHECK(code_edit->get_line(0) == " test");
+
+ /* Selection does entire line. */
+ code_edit->set_text(" test");
+ code_edit->select_all();
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == " test");
+
+ /* Handles multiple lines. */
+ code_edit->set_text(" test\n text");
+ code_edit->select_all();
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == "test");
+ CHECK(code_edit->get_line(1) == "text");
+
+ /* Do not unindent line if last col is zero. */
+ code_edit->set_text(" test\n text");
+ code_edit->select(0, 0, 1, 0);
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == "test");
+ CHECK(code_edit->get_line(1) == " text");
+
+ /* Unindent even if last column of first line. */
+ code_edit->set_text(" test\n text");
+ code_edit->select(0, 5, 1, 1);
+ code_edit->do_unindent();
+ CHECK(code_edit->get_line(0) == "test");
+ CHECK(code_edit->get_line(1) == "text");
+
+ /* Check selection is adjusted. */
+ code_edit->set_text(" test");
+ code_edit->select(0, 4, 0, 5);
+ code_edit->do_unindent();
+ CHECK(code_edit->get_selection_from_column() == 0);
+ CHECK(code_edit->get_selection_to_column() == 1);
+ CHECK(code_edit->get_line(0) == "test");
+ }
+
+ SUBCASE("[CodeEdit] auto indent") {
+ SUBCASE("[CodeEdit] auto indent tabs") {
+ code_edit->set_indent_size(4);
+ code_edit->set_auto_indent_enabled(true);
+ code_edit->set_indent_using_spaces(false);
+
+ /* Simple indent on new line. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test:");
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line(0) == "test:");
+ CHECK(code_edit->get_line(1) == "\t");
+
+ /* new blank line should still indent. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test:");
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_blank");
+ CHECK(code_edit->get_line(0) == "test:");
+ CHECK(code_edit->get_line(1) == "\t");
+
+ /* new line above should not indent. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test:");
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_above");
+ CHECK(code_edit->get_line(0) == "");
+ CHECK(code_edit->get_line(1) == "test:");
+
+ /* Whitespace between symbol and caret is okay. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test: ");
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line(0) == "test: ");
+ CHECK(code_edit->get_line(1) == "\t");
+
+ /* Comment between symbol and caret is okay. */
+ code_edit->add_comment_delimiter("#", "");
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test: # comment");
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line(0) == "test: # comment");
+ CHECK(code_edit->get_line(1) == "\t");
+ code_edit->remove_comment_delimiter("#");
+
+ /* Strings between symbol and caret are not okay. */
+ code_edit->add_string_delimiter("#", "");
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test: # string");
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line(0) == "test: # string");
+ CHECK(code_edit->get_line(1) == "");
+ code_edit->remove_comment_delimiter("#");
+
+ /* If between brace pairs an extra line is added. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test{}");
+ code_edit->set_caret_column(5);
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line(0) == "test{");
+ CHECK(code_edit->get_line(1) == "\t");
+ CHECK(code_edit->get_line(2) == "}");
+
+ /* Except when we are going above. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test{}");
+ code_edit->set_caret_column(5);
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_above");
+ CHECK(code_edit->get_line(0) == "");
+ CHECK(code_edit->get_line(1) == "test{}");
+
+ /* or below. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test{}");
+ code_edit->set_caret_column(5);
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_blank");
+ CHECK(code_edit->get_line(0) == "test{}");
+ CHECK(code_edit->get_line(1) == "");
+ }
+
+ SUBCASE("[CodeEdit] auto indent spaces") {
+ code_edit->set_indent_size(4);
+ code_edit->set_auto_indent_enabled(true);
+ code_edit->set_indent_using_spaces(true);
+
+ /* Simple indent on new line. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test:");
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line(0) == "test:");
+ CHECK(code_edit->get_line(1) == " ");
+
+ /* new blank line should still indent. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test:");
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_blank");
+ CHECK(code_edit->get_line(0) == "test:");
+ CHECK(code_edit->get_line(1) == " ");
+
+ /* new line above should not indent. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test:");
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_above");
+ CHECK(code_edit->get_line(0) == "");
+ CHECK(code_edit->get_line(1) == "test:");
+
+ /* Whitespace between symbol and caret is okay. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test: ");
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line(0) == "test: ");
+ CHECK(code_edit->get_line(1) == " ");
+
+ /* Comment between symbol and caret is okay. */
+ code_edit->add_comment_delimiter("#", "");
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test: # comment");
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line(0) == "test: # comment");
+ CHECK(code_edit->get_line(1) == " ");
+ code_edit->remove_comment_delimiter("#");
+
+ /* Strings between symbol and caret are not okay. */
+ code_edit->add_string_delimiter("#", "");
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test: # string");
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line(0) == "test: # string");
+ CHECK(code_edit->get_line(1) == "");
+ code_edit->remove_comment_delimiter("#");
+
+ /* If between brace pairs an extra line is added. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test{}");
+ code_edit->set_caret_column(5);
+ SEND_GUI_ACTION(code_edit, "ui_text_newline");
+ CHECK(code_edit->get_line(0) == "test{");
+ CHECK(code_edit->get_line(1) == " ");
+ CHECK(code_edit->get_line(2) == "}");
+
+ /* Except when we are going above. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test{}");
+ code_edit->set_caret_column(5);
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_above");
+ CHECK(code_edit->get_line(0) == "");
+ CHECK(code_edit->get_line(1) == "test{}");
+
+ /* or below. */
+ code_edit->set_text("");
+ code_edit->insert_text_at_caret("test{}");
+ code_edit->set_caret_column(5);
+ SEND_GUI_ACTION(code_edit, "ui_text_newline_blank");
+ CHECK(code_edit->get_line(0) == "test{}");
+ CHECK(code_edit->get_line(1) == "");
+ }
+ }
+
+ memdelete(code_edit);
+}
+
+TEST_CASE("[SceneTree][CodeEdit] folding") {
+ CodeEdit *code_edit = memnew(CodeEdit);
+ SceneTree::get_singleton()->get_root()->add_child(code_edit);
+
+ SUBCASE("[CodeEdit] folding settings") {
+ code_edit->set_line_folding_enabled(true);
+ CHECK(code_edit->is_line_folding_enabled());
+
+ code_edit->set_line_folding_enabled(false);
+ CHECK_FALSE(code_edit->is_line_folding_enabled());
+ }
+
+ SUBCASE("[CodeEdit] folding") {
+ code_edit->set_line_folding_enabled(true);
+
+ // No indent.
+ code_edit->set_text("line1\nline2\nline3");
+ for (int i = 0; i < 2; i++) {
+ CHECK_FALSE(code_edit->can_fold_line(i));
+ code_edit->fold_line(i);
+ CHECK_FALSE(code_edit->is_line_folded(i));
+ }
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // Indented lines.
+ code_edit->set_text("\tline1\n\tline2\n\tline3");
+ for (int i = 0; i < 2; i++) {
+ CHECK_FALSE(code_edit->can_fold_line(i));
+ code_edit->fold_line(i);
+ CHECK_FALSE(code_edit->is_line_folded(i));
+ }
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // Indent.
+ code_edit->set_text("line1\n\tline2\nline3");
+ CHECK(code_edit->can_fold_line(0));
+ for (int i = 1; i < 2; i++) {
+ CHECK_FALSE(code_edit->can_fold_line(i));
+ code_edit->fold_line(i);
+ CHECK_FALSE(code_edit->is_line_folded(i));
+ }
+ code_edit->fold_line(0);
+ CHECK(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK_FALSE(code_edit->is_line_folded(2));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 2);
+
+ // Nested indents.
+ code_edit->set_text("line1\n\tline2\n\t\tline3\nline4");
+ CHECK(code_edit->can_fold_line(0));
+ CHECK(code_edit->can_fold_line(1));
+ for (int i = 2; i < 3; i++) {
+ CHECK_FALSE(code_edit->can_fold_line(i));
+ code_edit->fold_line(i);
+ CHECK_FALSE(code_edit->is_line_folded(i));
+ }
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(0));
+ CHECK(code_edit->is_line_folded(1));
+ CHECK_FALSE(code_edit->is_line_folded(2));
+ CHECK_FALSE(code_edit->is_line_folded(3));
+ CHECK(code_edit->get_next_visible_line_offset_from(2, 1) == 2);
+
+ code_edit->fold_line(0);
+ CHECK(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK_FALSE(code_edit->is_line_folded(2));
+ CHECK_FALSE(code_edit->is_line_folded(3));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 3);
+
+ // Check metadata.
+ CHECK(code_edit->get_folded_lines().size() == 1);
+ CHECK((int)code_edit->get_folded_lines()[0] == 0);
+
+ // Cannot unfold nested.
+ code_edit->unfold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // (un)Fold all / toggle.
+ code_edit->unfold_line(0);
+ CHECK_FALSE(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // Check metadata.
+ CHECK(code_edit->get_folded_lines().size() == 0);
+
+ code_edit->fold_all_lines();
+ CHECK(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 3);
+
+ code_edit->unfold_all_lines();
+ CHECK_FALSE(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ code_edit->toggle_foldable_line(0);
+ CHECK(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 3);
+
+ // Can also unfold from hidden line.
+ code_edit->unfold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // Blank lines.
+ code_edit->set_text("line1\n\tline2\n\n\n\ttest\n\nline3");
+ CHECK(code_edit->can_fold_line(0));
+ for (int i = 1; i < code_edit->get_line_count(); i++) {
+ CHECK_FALSE(code_edit->can_fold_line(i));
+ code_edit->fold_line(i);
+ CHECK_FALSE(code_edit->is_line_folded(i));
+ }
+ code_edit->fold_line(0);
+ CHECK(code_edit->is_line_folded(0));
+ for (int i = 1; i < code_edit->get_line_count(); i++) {
+ CHECK_FALSE(code_edit->is_line_folded(i));
+ }
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 6);
+
+ // End of file.
+ code_edit->set_text("line1\n\tline2");
+ CHECK(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // Comment & string blocks.
+ // Single line block
+ code_edit->add_comment_delimiter("#", "", true);
+ code_edit->set_text("#line1\n#\tline2");
+ CHECK(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // Has to be full line.
+ code_edit->set_text("test #line1\n#\tline2");
+ CHECK_FALSE(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK_FALSE(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ code_edit->set_text("#line1\ntest #\tline2");
+ CHECK_FALSE(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK_FALSE(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // String.
+ code_edit->add_string_delimiter("^", "", true);
+ code_edit->set_text("^line1\n^\tline2");
+ CHECK(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // Has to be full line.
+ code_edit->set_text("test ^line1\n^\tline2");
+ CHECK_FALSE(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK_FALSE(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ code_edit->set_text("^line1\ntest ^\tline2");
+ CHECK_FALSE(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK_FALSE(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // Multiline blocks.
+ code_edit->add_comment_delimiter("&", "&", false);
+ code_edit->set_text("&line1\n\tline2&");
+ CHECK(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // Has to be full line.
+ code_edit->set_text("test &line1\n\tline2&");
+ CHECK_FALSE(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK_FALSE(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ code_edit->set_text("&line1\n\tline2& test");
+ CHECK_FALSE(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK_FALSE(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // Strings.
+ code_edit->add_string_delimiter("$", "$", false);
+ code_edit->set_text("$line1\n\tline2$");
+ CHECK(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // Has to be full line.
+ code_edit->set_text("test $line1\n\tline2$");
+ CHECK_FALSE(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK_FALSE(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ code_edit->set_text("$line1\n\tline2$ test");
+ CHECK_FALSE(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK_FALSE(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 1);
+
+ // Non-indented comments/ strings.
+ // Single line
+ code_edit->set_text("test\n\tline1\n#line1\n#line2\n\ttest");
+ CHECK(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 4);
+
+ code_edit->set_text("test\n\tline1\n^line1\n^line2\n\ttest");
+ CHECK(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 4);
+
+ // Multiline
+ code_edit->set_text("test\n\tline1\n&line1\nline2&\n\ttest");
+ CHECK(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 4);
+
+ code_edit->set_text("test\n\tline1\n$line1\nline2$\n\ttest");
+ CHECK(code_edit->can_fold_line(0));
+ CHECK_FALSE(code_edit->can_fold_line(1));
+ code_edit->fold_line(1);
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ code_edit->fold_line(0);
+ CHECK(code_edit->is_line_folded(0));
+ CHECK_FALSE(code_edit->is_line_folded(1));
+ CHECK(code_edit->get_next_visible_line_offset_from(1, 1) == 4);
+ }
+
+ memdelete(code_edit);
+}
+
+TEST_CASE("[SceneTree][CodeEdit] completion") {
+ CodeEdit *code_edit = memnew(CodeEdit);
+ SceneTree::get_singleton()->get_root()->add_child(code_edit);
+
+ SUBCASE("[CodeEdit] auto brace completion") {
+ code_edit->set_auto_brace_completion_enabled(true);
+ CHECK(code_edit->is_auto_brace_completion_enabled());
+
+ code_edit->set_highlight_matching_braces_enabled(true);
+ CHECK(code_edit->is_highlight_matching_braces_enabled());
+
+ /* Try setters, any length. */
+ Dictionary auto_brace_completion_pairs;
+ auto_brace_completion_pairs["["] = "]";
+ auto_brace_completion_pairs["'"] = "'";
+ auto_brace_completion_pairs[";"] = "'";
+ auto_brace_completion_pairs["'''"] = "'''";
+ code_edit->set_auto_brace_completion_pairs(auto_brace_completion_pairs);
+ CHECK(code_edit->get_auto_brace_completion_pairs().size() == 4);
+ CHECK(code_edit->get_auto_brace_completion_pairs()["["] == "]");
+ CHECK(code_edit->get_auto_brace_completion_pairs()["'"] == "'");
+ CHECK(code_edit->get_auto_brace_completion_pairs()[";"] == "'");
+ CHECK(code_edit->get_auto_brace_completion_pairs()["'''"] == "'''");
+
+ ERR_PRINT_OFF;
+
+ /* No duplicate start keys. */
+ code_edit->add_auto_brace_completion_pair("[", "]");
+ CHECK(code_edit->get_auto_brace_completion_pairs().size() == 4);
+
+ /* No empty keys. */
+ code_edit->add_auto_brace_completion_pair("[", "");
+ CHECK(code_edit->get_auto_brace_completion_pairs().size() == 4);
+
+ code_edit->add_auto_brace_completion_pair("", "]");
+ CHECK(code_edit->get_auto_brace_completion_pairs().size() == 4);
+
+ code_edit->add_auto_brace_completion_pair("", "");
+ CHECK(code_edit->get_auto_brace_completion_pairs().size() == 4);
+
+ /* Must be a symbol. */
+ code_edit->add_auto_brace_completion_pair("a", "]");
+ CHECK(code_edit->get_auto_brace_completion_pairs().size() == 4);
+
+ code_edit->add_auto_brace_completion_pair("[", "a");
+ CHECK(code_edit->get_auto_brace_completion_pairs().size() == 4);
+
+ code_edit->add_auto_brace_completion_pair("a", "a");
+ CHECK(code_edit->get_auto_brace_completion_pairs().size() == 4);
+
+ ERR_PRINT_ON;
+
+ /* Check metadata. */
+ CHECK(code_edit->has_auto_brace_completion_open_key("["));
+ CHECK(code_edit->has_auto_brace_completion_open_key("'"));
+ CHECK(code_edit->has_auto_brace_completion_open_key(";"));
+ CHECK(code_edit->has_auto_brace_completion_open_key("'''"));
+ CHECK_FALSE(code_edit->has_auto_brace_completion_open_key("("));
+
+ CHECK(code_edit->has_auto_brace_completion_close_key("]"));
+ CHECK(code_edit->has_auto_brace_completion_close_key("'"));
+ CHECK(code_edit->has_auto_brace_completion_close_key("'''"));
+ CHECK_FALSE(code_edit->has_auto_brace_completion_close_key(")"));
+
+ CHECK(code_edit->get_auto_brace_completion_close_key("[") == "]");
+ CHECK(code_edit->get_auto_brace_completion_close_key("'") == "'");
+ CHECK(code_edit->get_auto_brace_completion_close_key(";") == "'");
+ CHECK(code_edit->get_auto_brace_completion_close_key("'''") == "'''");
+ CHECK(code_edit->get_auto_brace_completion_close_key("(").is_empty());
+
+ /* Check typing inserts closing pair. */
+ code_edit->clear();
+ SEND_GUI_KEY_EVENT(code_edit, KEY_BRACKETLEFT);
+ CHECK(code_edit->get_line(0) == "[]");
+
+ /* Should first match and insert smaller key. */
+ code_edit->clear();
+ SEND_GUI_KEY_EVENT(code_edit, KEY_APOSTROPHE);
+ CHECK(code_edit->get_line(0) == "''");
+ CHECK(code_edit->get_caret_column() == 1);
+
+ /* Move out from centre, Should match and insert larger key. */
+ SEND_GUI_ACTION(code_edit, "ui_text_caret_right");
+ SEND_GUI_KEY_EVENT(code_edit, KEY_APOSTROPHE);
+ CHECK(code_edit->get_line(0) == "''''''");
+ CHECK(code_edit->get_caret_column() == 3);
+
+ /* Backspace should remove all. */
+ SEND_GUI_ACTION(code_edit, "ui_text_backspace");
+ CHECK(code_edit->get_line(0).is_empty());
+
+ /* If in between and typing close key should "skip". */
+ SEND_GUI_KEY_EVENT(code_edit, KEY_BRACKETLEFT);
+ CHECK(code_edit->get_line(0) == "[]");
+ CHECK(code_edit->get_caret_column() == 1);
+ SEND_GUI_KEY_EVENT(code_edit, KEY_BRACKETRIGHT);
+ CHECK(code_edit->get_line(0) == "[]");
+ CHECK(code_edit->get_caret_column() == 2);
+
+ /* If current is char and inserting a string, do not autocomplete. */
+ code_edit->clear();
+ SEND_GUI_KEY_EVENT(code_edit, KEY_A);
+ SEND_GUI_KEY_EVENT(code_edit, KEY_APOSTROPHE);
+ CHECK(code_edit->get_line(0) == "A'");
+
+ /* If in comment, do not complete. */
+ code_edit->add_comment_delimiter("#", "");
+ code_edit->clear();
+ SEND_GUI_KEY_EVENT(code_edit, KEY_NUMBERSIGN);
+ SEND_GUI_KEY_EVENT(code_edit, KEY_APOSTROPHE);
+ CHECK(code_edit->get_line(0) == "#'");
+
+ /* If in string, and inserting string do not complete. */
+ code_edit->clear();
+ SEND_GUI_KEY_EVENT(code_edit, KEY_APOSTROPHE);
+ SEND_GUI_KEY_EVENT(code_edit, KEY_QUOTEDBL);
+ CHECK(code_edit->get_line(0) == "'\"'");
+ }
+
+ SUBCASE("[CodeEdit] autocomplete") {
+ code_edit->set_code_completion_enabled(true);
+ CHECK(code_edit->is_code_completion_enabled());
+
+ /* Set prefixes, single char only, disallow empty. */
+ TypedArray<String> completion_prefixes;
+ completion_prefixes.push_back("");
+ completion_prefixes.push_back(".");
+ completion_prefixes.push_back(".");
+ completion_prefixes.push_back(",,");
+
+ ERR_PRINT_OFF;
+ code_edit->set_code_completion_prefixes(completion_prefixes);
+ ERR_PRINT_ON;
+ completion_prefixes = code_edit->get_code_completion_prefixes();
+ CHECK(completion_prefixes.size() == 2);
+ CHECK(completion_prefixes.has("."));
+ CHECK(completion_prefixes.has(","));
+
+ code_edit->set_text("test\ntest");
+ CHECK(code_edit->get_text_for_code_completion() == String::chr(0xFFFF) + "test\ntest");
+ }
+
+ SUBCASE("[CodeEdit] autocomplete request") {
+ SIGNAL_WATCH(code_edit, "request_code_completion");
+ code_edit->set_code_completion_enabled(true);
+
+ Array signal_args;
+ signal_args.push_back(Array());
+
+ /* Force request. */
+ code_edit->request_code_completion();
+ SIGNAL_CHECK_FALSE("request_code_completion");
+ code_edit->request_code_completion(true);
+ SIGNAL_CHECK("request_code_completion", signal_args);
+
+ /* Manual request should force. */
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_query");
+ SIGNAL_CHECK("request_code_completion", signal_args);
+
+ /* Insert prefix. */
+ TypedArray<String> completion_prefixes;
+ completion_prefixes.push_back(".");
+ code_edit->set_code_completion_prefixes(completion_prefixes);
+
+ code_edit->insert_text_at_caret(".");
+ code_edit->request_code_completion();
+ SIGNAL_CHECK("request_code_completion", signal_args);
+
+ /* Should work with space too. */
+ code_edit->insert_text_at_caret(" ");
+ code_edit->request_code_completion();
+ SIGNAL_CHECK("request_code_completion", signal_args);
+
+ /* Should work when complete ends with prefix. */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("t");
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "test.", "test.");
+ code_edit->update_code_completion_options();
+ code_edit->confirm_code_completion();
+ CHECK(code_edit->get_line(0) == "test.");
+ SIGNAL_CHECK("request_code_completion", signal_args);
+
+ SIGNAL_UNWATCH(code_edit, "request_code_completion");
+ }
+
+ SUBCASE("[CodeEdit] autocomplete completion") {
+ CHECK(code_edit->get_code_completion_selected_index() == -1);
+ code_edit->set_code_completion_enabled(true);
+ CHECK(code_edit->get_code_completion_selected_index() == -1);
+
+ code_edit->update_code_completion_options();
+ code_edit->set_code_completion_selected_index(1);
+ CHECK(code_edit->get_code_completion_selected_index() == -1);
+ CHECK(code_edit->get_code_completion_option(0).size() == 0);
+ CHECK(code_edit->get_code_completion_options().size() == 0);
+
+ /* Adding does not update the list. */
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_VARIABLE, "item_0.", "item_0");
+
+ code_edit->set_code_completion_selected_index(1);
+ CHECK(code_edit->get_code_completion_selected_index() == -1);
+ CHECK(code_edit->get_code_completion_option(0).size() == 0);
+ CHECK(code_edit->get_code_completion_options().size() == 0);
+
+ /* After update, pending add should not be counted, */
+ /* also does not work on col 0 */
+ code_edit->insert_text_at_caret("i");
+ code_edit->update_code_completion_options();
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0.", "item_0", Color(1, 0, 0), RES(), Color(1, 0, 0));
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_VARIABLE, "item_1.", "item_1");
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_VARIABLE, "item_2.", "item_2");
+
+ ERR_PRINT_OFF;
+ code_edit->set_code_completion_selected_index(1);
+ ERR_PRINT_ON;
+ CHECK(code_edit->get_code_completion_selected_index() == 0);
+ CHECK(code_edit->get_code_completion_option(0).size() == 6);
+ CHECK(code_edit->get_code_completion_options().size() == 1);
+
+ /* Check cancel closes completion. */
+ SEND_GUI_ACTION(code_edit, "ui_cancel");
+ CHECK(code_edit->get_code_completion_selected_index() == -1);
+
+ code_edit->update_code_completion_options();
+ CHECK(code_edit->get_code_completion_selected_index() == 0);
+ code_edit->set_code_completion_selected_index(1);
+ CHECK(code_edit->get_code_completion_selected_index() == 1);
+ CHECK(code_edit->get_code_completion_option(0).size() == 6);
+ CHECK(code_edit->get_code_completion_options().size() == 3);
+
+ /* Check data. */
+ Dictionary option = code_edit->get_code_completion_option(0);
+ CHECK((int)option["kind"] == (int)CodeEdit::CodeCompletionKind::KIND_CLASS);
+ CHECK(option["display_text"] == "item_0.");
+ CHECK(option["insert_text"] == "item_0");
+ CHECK(option["font_color"] == Color(1, 0, 0));
+ CHECK(option["icon"] == RES());
+ CHECK(option["default_value"] == Color(1, 0, 0));
+
+ /* Set size for mouse input. */
+ code_edit->set_size(Size2(100, 100));
+
+ /* Check input. */
+ SEND_GUI_ACTION(code_edit, "ui_end");
+ CHECK(code_edit->get_code_completion_selected_index() == 2);
+
+ SEND_GUI_ACTION(code_edit, "ui_home");
+ CHECK(code_edit->get_code_completion_selected_index() == 0);
+
+ SEND_GUI_ACTION(code_edit, "ui_page_down");
+ CHECK(code_edit->get_code_completion_selected_index() == 2);
+
+ SEND_GUI_ACTION(code_edit, "ui_page_up");
+ CHECK(code_edit->get_code_completion_selected_index() == 0);
+
+ SEND_GUI_ACTION(code_edit, "ui_up");
+ CHECK(code_edit->get_code_completion_selected_index() == 2);
+
+ SEND_GUI_ACTION(code_edit, "ui_down");
+ CHECK(code_edit->get_code_completion_selected_index() == 0);
+
+ SEND_GUI_KEY_EVENT(code_edit, KEY_T);
+ CHECK(code_edit->get_code_completion_selected_index() == 0);
+
+ SEND_GUI_ACTION(code_edit, "ui_left");
+ CHECK(code_edit->get_code_completion_selected_index() == 0);
+
+ SEND_GUI_ACTION(code_edit, "ui_right");
+ CHECK(code_edit->get_code_completion_selected_index() == 0);
+
+ SEND_GUI_ACTION(code_edit, "ui_text_backspace");
+ CHECK(code_edit->get_code_completion_selected_index() == 0);
+
+ Point2 caret_pos = code_edit->get_caret_draw_pos();
+ caret_pos.y -= code_edit->get_line_height();
+ SEND_GUI_MOUSE_EVENT(code_edit, caret_pos, MOUSE_BUTTON_WHEEL_DOWN, MOUSE_BUTTON_NONE);
+ CHECK(code_edit->get_code_completion_selected_index() == 1);
+
+ SEND_GUI_MOUSE_EVENT(code_edit, caret_pos, MOUSE_BUTTON_WHEEL_UP, MOUSE_BUTTON_NONE);
+ CHECK(code_edit->get_code_completion_selected_index() == 0);
+
+ /* Single click selects. */
+ SEND_GUI_MOUSE_EVENT(code_edit, caret_pos, MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MASK_LEFT);
+ CHECK(code_edit->get_code_completion_selected_index() == 2);
+
+ /* Double click inserts. */
+ SEND_GUI_DOUBLE_CLICK(code_edit, caret_pos);
+ CHECK(code_edit->get_code_completion_selected_index() == -1);
+ CHECK(code_edit->get_line(0) == "item_2");
+
+ code_edit->set_auto_brace_completion_enabled(false);
+
+ /* Does nothing in readonly. */
+ code_edit->undo();
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0.", "item_0");
+ code_edit->update_code_completion_options();
+ code_edit->set_editable(false);
+ code_edit->confirm_code_completion();
+ code_edit->set_editable(true);
+ CHECK(code_edit->get_line(0) == "i");
+
+ /* Replace */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1 test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0.", "item_0");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "item_0 test");
+
+ /* Replace string. */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("\"item_1 test\"");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0.", "item_0");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "\"item_0\"");
+
+ /* Normal replace if no end is given. */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("\"item_1 test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0.", "item_0");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "\"item_0\" test");
+
+ /* Insert at completion. */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1 test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0.", "item_0");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_accept");
+ CHECK(code_edit->get_line(0) == "item_01 test");
+
+ /* Insert at completion with string should have same output. */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("\"item_1 test\"");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0.", "item_0");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_accept");
+ CHECK(code_edit->get_line(0) == "\"item_0\"1 test\"");
+
+ /* Merge symbol at end on insert text. */
+ /* End on completion entry. */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1 test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0(", "item_0(");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "item_0( test");
+ CHECK(code_edit->get_caret_column() == 7);
+
+ /* End of text*/
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1( test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0", "item_0");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "item_0( test");
+ CHECK(code_edit->get_caret_column() == 6);
+
+ /* End of both. */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1( test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0(", "item_0(");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "item_0( test");
+ CHECK(code_edit->get_caret_column() == 7);
+
+ /* Full set. */
+ /* End on completion entry. */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1 test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0()", "item_0()");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "item_0() test");
+ CHECK(code_edit->get_caret_column() == 8);
+
+ /* End of text*/
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1() test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0", "item_0");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "item_0() test");
+ CHECK(code_edit->get_caret_column() == 6);
+
+ /* End of both. */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1() test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0()", "item_0()");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "item_0() test");
+ CHECK(code_edit->get_caret_column() == 8);
+
+ /* Autobrace completion. */
+ code_edit->set_auto_brace_completion_enabled(true);
+
+ /* End on completion entry. */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1 test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0(", "item_0(");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "item_0() test");
+ CHECK(code_edit->get_caret_column() == 7);
+
+ /* End of text*/
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1( test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0", "item_0");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "item_0( test");
+ CHECK(code_edit->get_caret_column() == 6);
+
+ /* End of both. */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1( test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0(", "item_0(");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "item_0( test");
+ CHECK(code_edit->get_caret_column() == 7);
+
+ /* Full set. */
+ /* End on completion entry. */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1 test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0()", "item_0()");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "item_0() test");
+ CHECK(code_edit->get_caret_column() == 8);
+
+ /* End of text*/
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1() test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0", "item_0");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "item_0() test");
+ CHECK(code_edit->get_caret_column() == 6);
+
+ /* End of both. */
+ code_edit->clear();
+ code_edit->insert_text_at_caret("item_1() test");
+ code_edit->set_caret_column(2);
+ code_edit->add_code_completion_option(CodeEdit::CodeCompletionKind::KIND_CLASS, "item_0()", "item_0()");
+ code_edit->update_code_completion_options();
+ SEND_GUI_ACTION(code_edit, "ui_text_completion_replace");
+ CHECK(code_edit->get_line(0) == "item_0() test");
+ CHECK(code_edit->get_caret_column() == 8);
+ }
+
+ memdelete(code_edit);
+}
+
+TEST_CASE("[SceneTree][CodeEdit] symbol lookup") {
+ CodeEdit *code_edit = memnew(CodeEdit);
+ SceneTree::get_singleton()->get_root()->add_child(code_edit);
+
+ code_edit->set_symbol_lookup_on_click_enabled(true);
+ CHECK(code_edit->is_symbol_lookup_on_click_enabled());
+
+ /* Set size for mouse input. */
+ code_edit->set_size(Size2(100, 100));
+
+ code_edit->set_text("this is some text");
+
+ Point2 caret_pos = code_edit->get_caret_draw_pos();
+ caret_pos.x += 55;
+ SEND_GUI_MOUSE_EVENT(code_edit, caret_pos, MOUSE_BUTTON_NONE, MOUSE_BUTTON_NONE);
+ CHECK(code_edit->get_text_for_symbol_lookup() == "this is s" + String::chr(0xFFFF) + "ome text");
+
+ SIGNAL_WATCH(code_edit, "symbol_validate");
+
+#ifdef OSX_ENABLED
+ SEND_GUI_KEY_EVENT(code_edit, KEY_META);
+#else
+ SEND_GUI_KEY_EVENT(code_edit, KEY_CTRL);
+#endif
+
+ Array signal_args;
+ Array arg;
+ arg.push_back("some");
+ signal_args.push_back(arg);
+ SIGNAL_CHECK("symbol_validate", signal_args);
+
+ SIGNAL_UNWATCH(code_edit, "symbol_validate");
+
+ memdelete(code_edit);
+}
+
+TEST_CASE("[SceneTree][CodeEdit] line length guidelines") {
+ CodeEdit *code_edit = memnew(CodeEdit);
+ SceneTree::get_singleton()->get_root()->add_child(code_edit);
+
+ TypedArray<int> guide_lines;
+
+ code_edit->set_line_length_guidelines(guide_lines);
+ CHECK(code_edit->get_line_length_guidelines().size() == 0);
+
+ guide_lines.push_back(80);
+ guide_lines.push_back(120);
+
+ /* Order should be preserved. */
+ code_edit->set_line_length_guidelines(guide_lines);
+ CHECK((int)code_edit->get_line_length_guidelines()[0] == 80);
+ CHECK((int)code_edit->get_line_length_guidelines()[1] == 120);
+
+ memdelete(code_edit);
+}
+
+} // namespace TestCodeEdit
+
+#endif // TEST_CODE_EDIT_H
diff --git a/tests/test_config_file.h b/tests/test_config_file.h
index 33fd30ffa1..e3f40e16fd 100644
--- a/tests/test_config_file.h
+++ b/tests/test_config_file.h
@@ -122,6 +122,8 @@ TEST_CASE("[ConfigFile] Saving file") {
config_file.set_value("player", "position", Vector2(3, 4));
config_file.set_value("graphics", "antialiasing", true);
config_file.set_value("graphics", "antiAliasing", false);
+ config_file.set_value("quoted", String::utf8("é™éŸ³"), 42);
+ config_file.set_value("quoted", "a=b", 7);
#ifdef WINDOWS_ENABLED
const String config_path = OS::get_singleton()->get_environment("TEMP").plus_file("config.ini");
@@ -132,7 +134,7 @@ TEST_CASE("[ConfigFile] Saving file") {
config_file.save(config_path);
// Expected contents of the saved ConfigFile.
- const String contents = R"([player]
+ const String contents = String::utf8(R"([player]
name="Unnamed Player"
tagline="Waiting
@@ -145,7 +147,12 @@ position=Vector2(3, 4)
antialiasing=true
antiAliasing=false
-)";
+
+[quoted]
+
+"é™éŸ³"=42
+"a=b"=7
+)");
FileAccessRef file = FileAccess::open(config_path, FileAccess::READ);
CHECK_MESSAGE(file->get_as_utf8_string() == contents,
diff --git a/tests/test_curve.h b/tests/test_curve.h
index 7eeee86f32..e079905e35 100644
--- a/tests/test_curve.h
+++ b/tests/test_curve.h
@@ -216,6 +216,41 @@ TEST_CASE("[Curve] Custom curve with linear tangents") {
Math::is_equal_approx(curve->interpolate_baked(0.7), (real_t)0.8),
"Custom free curve should return the expected baked value at offset 0.7 after removing point at invalid index 10.");
}
+
+TEST_CASE("[Curve2D] Linear sampling should return exact value") {
+ Ref<Curve2D> curve = memnew(Curve2D);
+ int len = 2048;
+
+ curve->add_point(Vector2(0, 0));
+ curve->add_point(Vector2((float)len, 0));
+
+ float baked_length = curve->get_baked_length();
+ CHECK((float)len == baked_length);
+
+ for (int i = 0; i < len; i++) {
+ float expected = (float)i;
+ Vector2 pos = curve->interpolate_baked(expected);
+ CHECK_MESSAGE(pos.x == expected, "interpolate_baked should return exact value");
+ }
+}
+
+TEST_CASE("[Curve3D] Linear sampling should return exact value") {
+ Ref<Curve3D> curve = memnew(Curve3D);
+ int len = 2048;
+
+ curve->add_point(Vector3(0, 0, 0));
+ curve->add_point(Vector3((float)len, 0, 0));
+
+ float baked_length = curve->get_baked_length();
+ CHECK((float)len == baked_length);
+
+ for (int i = 0; i < len; i++) {
+ float expected = (float)i;
+ Vector3 pos = curve->interpolate_baked(expected);
+ CHECK_MESSAGE(pos.x == expected, "interpolate_baked should return exact value");
+ }
+}
+
} // namespace TestCurve
#endif // TEST_CURVE_H
diff --git a/tests/test_geometry_2d.h b/tests/test_geometry_2d.h
index 32d4114a1c..25af8c355e 100644
--- a/tests/test_geometry_2d.h
+++ b/tests/test_geometry_2d.h
@@ -51,8 +51,6 @@ TEST_CASE("[Geometry2D] Point in circle") {
CHECK_FALSE(Geometry2D::is_point_in_circle(Vector2(7, -42), Vector2(4, -40), 3.5));
// This tests points on the edge of the circle. They are treated as being inside the circle.
- // In `is_point_in_triangle` and `is_point_in_polygon` they are treated as being outside, so in order the make
- // the behaviour consistent this may change in the future (see issue #44717 and PR #44274).
CHECK(Geometry2D::is_point_in_circle(Vector2(1.0, 0.0), Vector2(0, 0), 1.0));
CHECK(Geometry2D::is_point_in_circle(Vector2(0.0, -1.0), Vector2(0, 0), 1.0));
}
@@ -66,7 +64,7 @@ TEST_CASE("[Geometry2D] Point in triangle") {
CHECK_FALSE(Geometry2D::is_point_in_triangle(Vector2(0, 0), Vector2(1, 4), Vector2(3, 2), Vector2(5, 4)));
// This tests points on the edge of the triangle. They are treated as being outside the triangle.
- // In `is_point_in_circle` they are treated as being inside, so in order the make
+ // In `is_point_in_circle` and `is_point_in_polygon` they are treated as being inside, so in order the make
// the behaviour consistent this may change in the future (see issue #44717 and PR #44274).
CHECK_FALSE(Geometry2D::is_point_in_triangle(Vector2(1, 1), Vector2(-1, 1), Vector2(0, -1), Vector2(1, 1)));
CHECK_FALSE(Geometry2D::is_point_in_triangle(Vector2(0, 1), Vector2(-1, 1), Vector2(0, -1), Vector2(1, 1)));
@@ -95,11 +93,16 @@ TEST_CASE("[Geometry2D] Point in polygon") {
CHECK(Geometry2D::is_point_in_polygon(Vector2(370, 55), p));
CHECK(Geometry2D::is_point_in_polygon(Vector2(-160, 190), p));
- // This tests points on the edge of the polygon. They are treated as being outside the polygon.
- // In `is_point_in_circle` they are treated as being inside, so in order the make
- // the behaviour consistent this may change in the future (see issue #44717 and PR #44274).
- CHECK_FALSE(Geometry2D::is_point_in_polygon(Vector2(68, 112), p));
- CHECK_FALSE(Geometry2D::is_point_in_polygon(Vector2(-88, 120), p));
+ // This tests points on the edge of the polygon. They are treated as being inside the polygon.
+ int c = p.size();
+ for (int i = 0; i < c; i++) {
+ const Vector2 &p1 = p[i];
+ CHECK(Geometry2D::is_point_in_polygon(p1, p));
+
+ const Vector2 &p2 = p[(i + 1) % c];
+ Vector2 midpoint((p1 + p2) * 0.5);
+ CHECK(Geometry2D::is_point_in_polygon(midpoint, p));
+ }
}
TEST_CASE("[Geometry2D] Polygon clockwise") {
@@ -140,9 +143,21 @@ TEST_CASE("[Geometry2D] Segment intersection.") {
CHECK(r.is_equal_approx(Vector2(0, 0)));
CHECK_FALSE(Geometry2D::segment_intersects_segment(Vector2(-1, 1), Vector2(1, -1), Vector2(1, 1), Vector2(0.1, 0.1), &r));
+ CHECK_FALSE(Geometry2D::segment_intersects_segment(Vector2(-1, 1), Vector2(1, -1), Vector2(0.1, 0.1), Vector2(1, 1), &r));
+
CHECK_FALSE_MESSAGE(
- Geometry2D::segment_intersects_segment(Vector2(-1, 1), Vector2(1, -1), Vector2(0, 1), Vector2(1, -1), &r),
+ Geometry2D::segment_intersects_segment(Vector2(-1, 1), Vector2(1, -1), Vector2(0, 1), Vector2(2, -1), &r),
"Parallel segments should not intersect.");
+
+ CHECK_MESSAGE(
+ Geometry2D::segment_intersects_segment(Vector2(0, 0), Vector2(0, 1), Vector2(0, 0), Vector2(1, 0), &r),
+ "Touching segments should intersect.");
+ CHECK(r.is_equal_approx(Vector2(0, 0)));
+
+ CHECK_MESSAGE(
+ Geometry2D::segment_intersects_segment(Vector2(0, 1), Vector2(0, 0), Vector2(0, 0), Vector2(1, 0), &r),
+ "Touching segments should intersect.");
+ CHECK(r.is_equal_approx(Vector2(0, 0)));
}
TEST_CASE("[Geometry2D] Closest point to segment") {
diff --git a/tests/test_geometry_3d.h b/tests/test_geometry_3d.h
index 2b2a424b2b..40cb8bc07a 100644
--- a/tests/test_geometry_3d.h
+++ b/tests/test_geometry_3d.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef TEST_3D_GEOMETRY_H
-#define TEST_3D_GEOMETRY_H
+#ifndef TEST_GEOMETRY_3D_H
+#define TEST_GEOMETRY_3D_H
#include "core/math/geometry_3d.h"
#include "core/math/plane.h"
@@ -38,7 +38,7 @@
#include "tests/test_macros.h"
#include "vector"
-namespace Test3DGeometry {
+namespace TestGeometry3D {
TEST_CASE("[Geometry3D] Closest Points Between Segments") {
struct Case {
Vector3 p_1, p_2, p_3, p_4;
@@ -57,6 +57,7 @@ TEST_CASE("[Geometry3D] Closest Points Between Segments") {
CHECK(current_case.got_2.is_equal_approx(current_case.want_2));
}
}
+
TEST_CASE("[Geometry3D] Closest Distance Between Segments") {
struct Case {
Vector3 p_1, p_2, p_3, p_4;
@@ -73,6 +74,7 @@ TEST_CASE("[Geometry3D] Closest Distance Between Segments") {
CHECK(out == current_case.want);
}
}
+
TEST_CASE("[Geometry3D] Build Box Planes") {
const Vector3 extents = Vector3(5, 5, 20);
Vector<Plane> box = Geometry3D::build_box_planes(extents);
@@ -90,6 +92,7 @@ TEST_CASE("[Geometry3D] Build Box Planes") {
CHECK(extents.z == box[5].d);
CHECK(box[5].normal == Vector3(0, 0, -1));
}
+
TEST_CASE("[Geometry3D] Build Capsule Planes") {
struct Case {
real_t radius, height;
@@ -109,6 +112,7 @@ TEST_CASE("[Geometry3D] Build Capsule Planes") {
CHECK(capsule.size() == current_case.want_size);
}
}
+
TEST_CASE("[Geometry3D] Build Cylinder Planes") {
struct Case {
real_t radius, height;
@@ -127,6 +131,7 @@ TEST_CASE("[Geometry3D] Build Cylinder Planes") {
CHECK(planes.size() == current_case.want_size);
}
}
+
TEST_CASE("[Geometry3D] Build Sphere Planes") {
struct Case {
real_t radius;
@@ -145,6 +150,7 @@ TEST_CASE("[Geometry3D] Build Sphere Planes") {
CHECK(planes.size() == 63);
}
}
+
TEST_CASE("[Geometry3D] Build Convex Mesh") {
struct Case {
Vector<Plane> object;
@@ -166,6 +172,7 @@ TEST_CASE("[Geometry3D] Build Convex Mesh") {
CHECK(mesh.vertices.size() == current_case.want_vertices);
}
}
+
TEST_CASE("[Geometry3D] Clip Polygon") {
struct Case {
Plane clipping_plane;
@@ -190,6 +197,7 @@ TEST_CASE("[Geometry3D] Clip Polygon") {
}
}
}
+
TEST_CASE("[Geometry3D] Compute Convex Mesh Points") {
struct Case {
Vector<Plane> mesh;
@@ -215,6 +223,7 @@ TEST_CASE("[Geometry3D] Compute Convex Mesh Points") {
CHECK(vectors == current_case.want);
}
}
+
TEST_CASE("[Geometry3D] Get Closest Point To Segment") {
struct Case {
Vector3 point;
@@ -235,6 +244,7 @@ TEST_CASE("[Geometry3D] Get Closest Point To Segment") {
CHECK(output.is_equal_approx(current_case.want));
}
}
+
TEST_CASE("[Geometry3D] Plane and Box Overlap") {
struct Case {
Vector3 normal, max_box;
@@ -254,6 +264,7 @@ TEST_CASE("[Geometry3D] Plane and Box Overlap") {
CHECK(overlap == current_case.want);
}
}
+
TEST_CASE("[Geometry3D] Is Point in Projected Triangle") {
struct Case {
Vector3 point, v_1, v_2, v_3;
@@ -272,6 +283,7 @@ TEST_CASE("[Geometry3D] Is Point in Projected Triangle") {
CHECK(output == current_case.want);
}
}
+
TEST_CASE("[Geometry3D] Does Ray Intersect Triangle") {
struct Case {
Vector3 from, direction, v_1, v_2, v_3;
@@ -291,6 +303,7 @@ TEST_CASE("[Geometry3D] Does Ray Intersect Triangle") {
CHECK(output == current_case.want);
}
}
+
TEST_CASE("[Geometry3D] Does Segment Intersect Convex") {
struct Case {
Vector3 from, to;
@@ -311,6 +324,7 @@ TEST_CASE("[Geometry3D] Does Segment Intersect Convex") {
CHECK(output == current_case.want);
}
}
+
TEST_CASE("[Geometry3D] Segment Intersects Cylinder") {
struct Case {
Vector3 from, to;
@@ -330,6 +344,7 @@ TEST_CASE("[Geometry3D] Segment Intersects Cylinder") {
CHECK(output == current_case.want);
}
}
+
TEST_CASE("[Geometry3D] Segment Intersects Cylinder") {
struct Case {
Vector3 from, to, sphere_pos;
@@ -350,6 +365,7 @@ TEST_CASE("[Geometry3D] Segment Intersects Cylinder") {
CHECK(output == current_case.want);
}
}
+
TEST_CASE("[Geometry3D] Segment Intersects Triangle") {
struct Case {
Vector3 from, to, v_1, v_2, v_3, *result;
@@ -368,6 +384,7 @@ TEST_CASE("[Geometry3D] Segment Intersects Triangle") {
CHECK(output == current_case.want);
}
}
+
TEST_CASE("[Geometry3D] Triangle and Box Overlap") {
struct Case {
Vector3 box_centre;
@@ -389,6 +406,7 @@ TEST_CASE("[Geometry3D] Triangle and Box Overlap") {
CHECK(output == current_case.want);
}
}
+
TEST_CASE("[Geometry3D] Triangle and Sphere Intersect") {
struct Case {
Vector<Vector3> triangle;
@@ -413,5 +431,6 @@ TEST_CASE("[Geometry3D] Triangle and Sphere Intersect") {
CHECK(output == current_case.want);
}
}
-} // namespace Test3DGeometry
-#endif
+} // namespace TestGeometry3D
+
+#endif // TEST_GEOMETRY_3D_H
diff --git a/tests/test_macros.h b/tests/test_macros.h
index a1f1932db4..2f0bc6dcfa 100644
--- a/tests/test_macros.h
+++ b/tests/test_macros.h
@@ -31,6 +31,8 @@
#ifndef TEST_MACROS_H
#define TEST_MACROS_H
+#include "core/object/callable_method_pointer.h"
+#include "core/object/class_db.h"
#include "core/templates/map.h"
#include "core/variant/variant.h"
@@ -129,4 +131,221 @@ int register_test_command(String p_command, TestFunc p_function);
register_test_command(m_command, m_function); \
DOCTEST_GLOBAL_NO_WARNINGS_END()
+// Utility macros to send an event actions to a given object
+// Requires Message Queue and InputMap to be setup.
+// SEND_GUI_ACTION - takes an object and a input map key. e.g SEND_GUI_ACTION(code_edit, "ui_text_newline").
+// SEND_GUI_KEY_EVENT - takes an object and a keycode set. e.g SEND_GUI_KEY_EVENT(code_edit, KEY_A | KEY_MASK_CMD).
+// SEND_GUI_MOUSE_EVENT - takes an object, position, mouse button and mouse mask e.g SEND_GUI_MOUSE_EVENT(code_edit, Vector2(50, 50), MOUSE_BUTTON_NONE, MOUSE_BUTTON_NONE);
+// SEND_GUI_DOUBLE_CLICK - takes an object and a postion. e.g SEND_GUI_DOUBLE_CLICK(code_edit, Vector2(50, 50));
+
+#define SEND_GUI_ACTION(m_object, m_action) \
+ { \
+ const List<Ref<InputEvent>> *events = InputMap::get_singleton()->action_get_events(m_action); \
+ const List<Ref<InputEvent>>::Element *first_event = events->front(); \
+ Ref<InputEventKey> event = first_event->get(); \
+ event->set_pressed(true); \
+ m_object->gui_input(event); \
+ MessageQueue::get_singleton()->flush(); \
+ }
+
+#define SEND_GUI_KEY_EVENT(m_object, m_input) \
+ { \
+ Ref<InputEventKey> event = InputEventKey::create_reference(m_input); \
+ event->set_pressed(true); \
+ m_object->gui_input(event); \
+ MessageQueue::get_singleton()->flush(); \
+ }
+
+#define _CREATE_GUI_MOUSE_EVENT(m_object, m_local_pos, m_input, m_mask) \
+ Ref<InputEventMouseButton> event; \
+ event.instantiate(); \
+ event->set_position(m_local_pos); \
+ event->set_button_index(m_input); \
+ event->set_button_mask(m_mask); \
+ event->set_pressed(true);
+
+#define SEND_GUI_MOUSE_EVENT(m_object, m_local_pos, m_input, m_mask) \
+ { \
+ _CREATE_GUI_MOUSE_EVENT(m_object, m_local_pos, m_input, m_mask); \
+ m_object->get_viewport()->push_input(event); \
+ MessageQueue::get_singleton()->flush(); \
+ }
+
+#define SEND_GUI_DOUBLE_CLICK(m_object, m_local_pos) \
+ { \
+ _CREATE_GUI_MOUSE_EVENT(m_object, m_local_pos, MOUSE_BUTTON_LEFT, MOUSE_BUTTON_LEFT); \
+ event->set_double_click(true); \
+ m_object->get_viewport()->push_input(event); \
+ MessageQueue::get_singleton()->flush(); \
+ }
+
+// Utility class / macros for testing signals
+//
+// Use SIGNAL_WATCH(*object, "signal_name") to start watching
+// Makes sure to call SIGNAL_UNWATCH(*object, "signal_name") to stop watching in cleanup, this is not done automatically.
+//
+// The SignalWatcher will capture all signals and their args sent between checks.
+//
+// Use SIGNAL_CHECK("signal_name"), Vector<Vector<Variant>>), to check the arguments of all fired signals.
+// The outer vector is each fired signal, the inner vector the list of arguments for that signal. Order does matter.
+//
+// Use SIGNAL_CHECK_FALSE("signal_name") to check if a signal was not fired.
+//
+// Use SIGNAL_DISCARD("signal_name") to discard records all of the given signal, use only in placed you don't need to check.
+//
+// All signals are automaticaly discared between test/sub test cases.
+
+class SignalWatcher : public Object {
+private:
+ inline static SignalWatcher *singleton;
+
+ /* Equal to: Map<String, Vector<Vector<Variant>>> */
+ Map<String, Array> _signals;
+ void _add_signal_entry(const Array &p_args, const String &p_name) {
+ if (!_signals.has(p_name)) {
+ _signals[p_name] = Array();
+ }
+ _signals[p_name].push_back(p_args);
+ }
+
+ void _signal_callback_zero(const String &p_name) {
+ Array args;
+ _add_signal_entry(args, p_name);
+ }
+
+ void _signal_callback_one(Variant p_arg1, const String &p_name) {
+ Array args;
+ args.push_back(p_arg1);
+ _add_signal_entry(args, p_name);
+ }
+
+ void _signal_callback_two(Variant p_arg1, Variant p_arg2, const String &p_name) {
+ Array args;
+ args.push_back(p_arg1);
+ args.push_back(p_arg2);
+ _add_signal_entry(args, p_name);
+ }
+
+ void _signal_callback_three(Variant p_arg1, Variant p_arg2, Variant p_arg3, const String &p_name) {
+ Array args;
+ args.push_back(p_arg1);
+ args.push_back(p_arg2);
+ args.push_back(p_arg3);
+ _add_signal_entry(args, p_name);
+ }
+
+public:
+ static SignalWatcher *get_singleton() { return singleton; }
+
+ void watch_signal(Object *p_object, const String &p_signal) {
+ Vector<Variant> args;
+ args.push_back(p_signal);
+ MethodInfo method_info;
+ ClassDB::get_signal(p_object->get_class(), p_signal, &method_info);
+ switch (method_info.arguments.size()) {
+ case 0: {
+ p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_zero), args);
+ } break;
+ case 1: {
+ p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_one), args);
+ } break;
+ case 2: {
+ p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_two), args);
+ } break;
+ case 3: {
+ p_object->connect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_three), args);
+ } break;
+ default: {
+ MESSAGE("Signal ", p_signal, " arg count not supported.");
+ } break;
+ }
+ }
+
+ void unwatch_signal(Object *p_object, const String &p_signal) {
+ MethodInfo method_info;
+ ClassDB::get_signal(p_object->get_class(), p_signal, &method_info);
+ switch (method_info.arguments.size()) {
+ case 0: {
+ p_object->disconnect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_zero));
+ } break;
+ case 1: {
+ p_object->disconnect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_one));
+ } break;
+ case 2: {
+ p_object->disconnect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_two));
+ } break;
+ case 3: {
+ p_object->disconnect(p_signal, callable_mp(this, &SignalWatcher::_signal_callback_three));
+ } break;
+ default: {
+ MESSAGE("Signal ", p_signal, " arg count not supported.");
+ } break;
+ }
+ }
+
+ bool check(const String &p_name, const Array &p_args) {
+ if (!_signals.has(p_name)) {
+ MESSAGE("Signal ", p_name, " not emitted");
+ return false;
+ }
+
+ if (p_args.size() != _signals[p_name].size()) {
+ MESSAGE("Signal has " << _signals[p_name] << " expected " << p_args);
+ discard_signal(p_name);
+ return false;
+ }
+
+ bool match = true;
+ for (int i = 0; i < p_args.size(); i++) {
+ if (((Array)p_args[i]).size() != ((Array)_signals[p_name][i]).size()) {
+ MESSAGE("Signal has " << _signals[p_name][i] << " expected " << p_args[i]);
+ match = false;
+ continue;
+ }
+
+ for (int j = 0; j < ((Array)p_args[i]).size(); j++) {
+ if (((Array)p_args[i])[j] != ((Array)_signals[p_name][i])[j]) {
+ MESSAGE("Signal has " << _signals[p_name][i] << " expected " << p_args[i]);
+ match = false;
+ break;
+ }
+ }
+ }
+
+ discard_signal(p_name);
+ return match;
+ }
+
+ bool check_false(const String &p_name) {
+ bool has = _signals.has(p_name);
+ discard_signal(p_name);
+ return !has;
+ }
+
+ void discard_signal(const String &p_name) {
+ if (_signals.has(p_name)) {
+ _signals.erase(p_name);
+ }
+ }
+
+ void _clear_signals() {
+ _signals.clear();
+ }
+
+ SignalWatcher() {
+ singleton = this;
+ }
+
+ ~SignalWatcher() {
+ singleton = nullptr;
+ }
+};
+
+#define SIGNAL_WATCH(m_object, m_signal) SignalWatcher::get_singleton()->watch_signal(m_object, m_signal);
+#define SIGNAL_UNWATCH(m_object, m_signal) SignalWatcher::get_singleton()->unwatch_signal(m_object, m_signal);
+
+#define SIGNAL_CHECK(m_signal, m_args) CHECK(SignalWatcher::get_singleton()->check(m_signal, m_args));
+#define SIGNAL_CHECK_FALSE(m_signal) CHECK(SignalWatcher::get_singleton()->check_false(m_signal));
+#define SIGNAL_DISCARD(m_signal) SignalWatcher::get_singleton()->discard_signal(m_signal);
+
#endif // TEST_MACROS_H
diff --git a/tests/test_main.cpp b/tests/test_main.cpp
index d0466d1e2d..e4aa4c38ff 100644
--- a/tests/test_main.cpp
+++ b/tests/test_main.cpp
@@ -37,6 +37,7 @@
#include "test_astar.h"
#include "test_basis.h"
#include "test_class_db.h"
+#include "test_code_edit.h"
#include "test_color.h"
#include "test_command_queue.h"
#include "test_config_file.h"
@@ -146,3 +147,153 @@ int test_main(int argc, char *argv[]) {
return test_context.run();
}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include "servers/navigation_server_2d.h"
+#include "servers/navigation_server_3d.h"
+#include "servers/rendering/rendering_server_default.h"
+
+struct GodotTestCaseListener : public doctest::IReporter {
+ GodotTestCaseListener(const doctest::ContextOptions &p_in) {}
+
+ SignalWatcher *signal_watcher = nullptr;
+
+ PhysicsServer3D *physics_3d_server = nullptr;
+ PhysicsServer2D *physics_2d_server = nullptr;
+ NavigationServer3D *navigation_3d_server = nullptr;
+ NavigationServer2D *navigation_2d_server = nullptr;
+
+ void test_case_start(const doctest::TestCaseData &p_in) override {
+ SignalWatcher::get_singleton()->_clear_signals();
+
+ String name = String(p_in.m_name);
+
+ if (name.find("[SceneTree]") != -1) {
+ GLOBAL_DEF("memory/limits/multithreaded_server/rid_pool_prealloc", 60);
+ memnew(MessageQueue);
+
+ GLOBAL_DEF("internationalization/rendering/force_right_to_left_layout_direction", false);
+ memnew(TextServerManager);
+ Error err = OK;
+ TextServerManager::initialize(0, err);
+
+ OS::get_singleton()->set_has_server_feature_callback(nullptr);
+ for (int i = 0; i < DisplayServer::get_create_function_count(); i++) {
+ if (String("headless") == DisplayServer::get_create_function_name(i)) {
+ DisplayServer::create(i, "", DisplayServer::WindowMode::WINDOW_MODE_MINIMIZED, DisplayServer::VSyncMode::VSYNC_ENABLED, 0, Vector2i(0, 0), err);
+ break;
+ }
+ }
+ memnew(RenderingServerDefault());
+ RenderingServerDefault::get_singleton()->init();
+ RenderingServerDefault::get_singleton()->set_render_loop_enabled(false);
+
+ physics_3d_server = PhysicsServer3DManager::new_default_server();
+ physics_3d_server->init();
+
+ physics_2d_server = PhysicsServer2DManager::new_default_server();
+ physics_2d_server->init();
+
+ navigation_3d_server = NavigationServer3DManager::new_default_server();
+ navigation_2d_server = memnew(NavigationServer2D);
+
+ memnew(InputMap);
+ InputMap::get_singleton()->load_default();
+
+ make_default_theme(false, Ref<Font>());
+
+ memnew(SceneTree);
+ SceneTree::get_singleton()->initialize();
+ return;
+ }
+ }
+
+ void test_case_end(const doctest::CurrentTestCaseStats &) override {
+ if (SceneTree::get_singleton()) {
+ SceneTree::get_singleton()->finalize();
+ }
+
+ if (MessageQueue::get_singleton()) {
+ MessageQueue::get_singleton()->flush();
+ }
+
+ if (SceneTree::get_singleton()) {
+ memdelete(SceneTree::get_singleton());
+ }
+
+ clear_default_theme();
+
+ if (TextServerManager::get_singleton()) {
+ memdelete(TextServerManager::get_singleton());
+ }
+
+ if (navigation_3d_server) {
+ memdelete(navigation_3d_server);
+ navigation_3d_server = nullptr;
+ }
+
+ if (navigation_2d_server) {
+ memdelete(navigation_2d_server);
+ navigation_2d_server = nullptr;
+ }
+
+ if (physics_3d_server) {
+ physics_3d_server->finish();
+ memdelete(physics_3d_server);
+ physics_3d_server = nullptr;
+ }
+
+ if (physics_2d_server) {
+ physics_2d_server->finish();
+ memdelete(physics_2d_server);
+ physics_2d_server = nullptr;
+ }
+
+ if (RenderingServer::get_singleton()) {
+ RenderingServer::get_singleton()->sync();
+ RenderingServer::get_singleton()->global_variables_clear();
+ RenderingServer::get_singleton()->finish();
+ memdelete(RenderingServer::get_singleton());
+ }
+
+ if (DisplayServer::get_singleton()) {
+ memdelete(DisplayServer::get_singleton());
+ }
+
+ if (InputMap::get_singleton()) {
+ memdelete(InputMap::get_singleton());
+ }
+
+ if (MessageQueue::get_singleton()) {
+ MessageQueue::get_singleton()->flush();
+ memdelete(MessageQueue::get_singleton());
+ }
+ }
+
+ void test_run_start() override {
+ signal_watcher = memnew(SignalWatcher);
+ }
+
+ void test_run_end(const doctest::TestRunStats &) override {
+ memdelete(signal_watcher);
+ }
+
+ void test_case_reenter(const doctest::TestCaseData &) override {
+ SignalWatcher::get_singleton()->_clear_signals();
+ }
+
+ void subcase_start(const doctest::SubcaseSignature &) override {
+ SignalWatcher::get_singleton()->_clear_signals();
+ }
+
+ void report_query(const doctest::QueryData &) override {}
+ void test_case_exception(const doctest::TestCaseException &) override {}
+ void subcase_end() override {}
+
+ void log_assert(const doctest::AssertData &in) override {}
+ void log_message(const doctest::MessageData &) override {}
+ void test_case_skipped(const doctest::TestCaseData &) override {}
+};
+
+REGISTER_LISTENER("GodotTestCaseListener", 1, GodotTestCaseListener);
diff --git a/tests/test_object.h b/tests/test_object.h
index a18adf31b6..8cb7116a20 100644
--- a/tests/test_object.h
+++ b/tests/test_object.h
@@ -93,8 +93,8 @@ public:
Ref<Script> get_script() const override {
return Ref<Script>();
}
- const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const override {
- return Vector<MultiplayerAPI::RPCConfig>();
+ const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override {
+ return Vector<Multiplayer::RPCConfig>();
}
ScriptLanguage *get_language() override {
return nullptr;
diff --git a/tests/test_physics_2d.cpp b/tests/test_physics_2d.cpp
index 61b8951afa..f6619db8fd 100644
--- a/tests/test_physics_2d.cpp
+++ b/tests/test_physics_2d.cpp
@@ -199,7 +199,7 @@ protected:
if (mb.is_valid()) {
if (mb->is_pressed()) {
- Point2 p(mb->get_position().x, mb->get_position().y);
+ Point2 p = mb->get_position();
if (mb->get_button_index() == 1) {
ray_to = p;
@@ -248,20 +248,20 @@ protected:
return body;
}
- void _add_plane(const Vector2 &p_normal, real_t p_d) {
+ void _add_world_boundary(const Vector2 &p_normal, real_t p_d) {
PhysicsServer2D *ps = PhysicsServer2D::get_singleton();
Array arr;
arr.push_back(p_normal);
arr.push_back(p_d);
- RID plane = ps->world_margin_shape_create();
- ps->shape_set_data(plane, arr);
+ RID world_boundary = ps->world_boundary_shape_create();
+ ps->shape_set_data(world_boundary, arr);
RID plane_body = ps->body_create();
ps->body_set_mode(plane_body, PhysicsServer2D::BODY_MODE_STATIC);
ps->body_set_space(plane_body, space);
- ps->body_add_shape(plane_body, plane);
+ ps->body_add_shape(plane_body, world_boundary);
}
void _add_concave(const Vector<Vector2> &p_points, const Transform2D &p_xform = Transform2D()) {
@@ -381,9 +381,9 @@ public:
}
_add_concave(parr);
- //_add_plane(Vector2(0.0,-1).normalized(),-300);
- //_add_plane(Vector2(1,0).normalized(),50);
- //_add_plane(Vector2(-1,0).normalized(),-600);
+ //_add_world_boundary(Vector2(0.0,-1).normalized(),-300);
+ //_add_world_boundary(Vector2(1,0).normalized(),50);
+ //_add_world_boundary(Vector2(-1,0).normalized(),-600);
}
virtual bool process(double p_time) override {
diff --git a/tests/test_physics_3d.cpp b/tests/test_physics_3d.cpp
index ed49b60c71..d839ae26b7 100644
--- a/tests/test_physics_3d.cpp
+++ b/tests/test_physics_3d.cpp
@@ -100,18 +100,17 @@ protected:
return body;
}
- RID create_static_plane(const Plane &p_plane) {
+ RID create_world_boundary(const Plane &p_plane) {
PhysicsServer3D *ps = PhysicsServer3D::get_singleton();
- RID world_margin_shape = ps->shape_create(PhysicsServer3D::SHAPE_PLANE);
- ps->shape_set_data(world_margin_shape, p_plane);
+ RID world_boundary_shape = ps->shape_create(PhysicsServer3D::SHAPE_WORLD_BOUNDARY);
+ ps->shape_set_data(world_boundary_shape, p_plane);
RID b = ps->body_create();
ps->body_set_mode(b, PhysicsServer3D::BODY_MODE_STATIC);
ps->body_set_space(b, space);
- //todo set space
- ps->body_add_shape(b, world_margin_shape);
+ ps->body_add_shape(b, world_boundary_shape);
return b;
}
@@ -362,7 +361,7 @@ public:
RID mesh_instance = vs->instance_create2(capsule_mesh, scenario);
character = ps->body_create();
- ps->body_set_mode(character, PhysicsServer3D::BODY_MODE_DYNAMIC_LOCKED);
+ ps->body_set_mode(character, PhysicsServer3D::BODY_MODE_DYNAMIC_LINEAR);
ps->body_set_space(character, space);
//todo add space
ps->body_add_shape(character, capsule_shape);
@@ -391,12 +390,12 @@ public:
create_body(type, PhysicsServer3D::BODY_MODE_DYNAMIC, t);
}
- create_static_plane(Plane(Vector3(0, 1, 0), -1));
+ create_world_boundary(Plane(Vector3(0, 1, 0), -1));
}
void test_activate() {
create_body(PhysicsServer3D::SHAPE_BOX, PhysicsServer3D::BODY_MODE_DYNAMIC, Transform3D(Basis(), Vector3(0, 2, 0)), true);
- create_static_plane(Plane(Vector3(0, 1, 0), -1));
+ create_world_boundary(Plane(Vector3(0, 1, 0), -1));
}
virtual bool process(double p_time) override {
diff --git a/tests/test_rect2.h b/tests/test_rect2.h
index c5740167db..3d9fe5a32e 100644
--- a/tests/test_rect2.h
+++ b/tests/test_rect2.h
@@ -76,6 +76,12 @@ TEST_CASE("[Rect2] Basic getters") {
CHECK_MESSAGE(
rect.get_end().is_equal_approx(Vector2(1280, 820)),
"get_end() should return the expected value.");
+ CHECK_MESSAGE(
+ rect.get_center().is_equal_approx(Vector2(640, 460)),
+ "get_center() should return the expected value.");
+ CHECK_MESSAGE(
+ Rect2(0, 100, 1281, 721).get_center().is_equal_approx(Vector2(640.5, 460.5)),
+ "get_center() should return the expected value.");
}
TEST_CASE("[Rect2] Basic setters") {
@@ -288,6 +294,12 @@ TEST_CASE("[Rect2i] Basic getters") {
CHECK_MESSAGE(
rect.get_end() == Vector2i(1280, 820),
"get_end() should return the expected value.");
+ CHECK_MESSAGE(
+ rect.get_center() == Vector2i(640, 460),
+ "get_center() should return the expected value.");
+ CHECK_MESSAGE(
+ Rect2i(0, 100, 1281, 721).get_center() == Vector2i(640, 460),
+ "get_center() should return the expected value.");
}
TEST_CASE("[Rect2i] Basic setters") {
diff --git a/tests/test_string.h b/tests/test_string.h
index 1982d8de60..28d1089d2f 100644
--- a/tests/test_string.h
+++ b/tests/test_string.h
@@ -39,6 +39,7 @@
#include "core/os/main_loop.h"
#include "core/os/os.h"
#include "core/string/ustring.h"
+#include "core/variant/variant.h"
#include "tests/test_macros.h"
@@ -350,13 +351,47 @@ TEST_CASE("[String] Insertion") {
}
TEST_CASE("[String] Number to string") {
+ CHECK(String::num(0) == "0");
+ CHECK(String::num(0.0) == "0"); // No trailing zeros.
+ CHECK(String::num(-0.0) == "-0"); // Includes sign even for zero.
CHECK(String::num(3.141593) == "3.141593");
CHECK(String::num(3.141593, 3) == "3.142");
- CHECK(String::num_real(3.141593) == "3.141593");
CHECK(String::num_scientific(30000000) == "3e+07");
CHECK(String::num_int64(3141593) == "3141593");
CHECK(String::num_int64(0xA141593, 16) == "a141593");
CHECK(String::num_int64(0xA141593, 16, true) == "A141593");
+ CHECK(String::num(42.100023, 4) == "42.1"); // No trailing zeros.
+
+ // String::num_real tests.
+ CHECK(String::num_real(3.141593) == "3.141593");
+ CHECK(String::num_real(3.141) == "3.141"); // No trailing zeros.
+#ifdef REAL_T_IS_DOUBLE
+ CHECK_MESSAGE(String::num_real(Math_PI) == "3.14159265358979", "Prints the appropriate amount of digits for real_t = double.");
+ CHECK_MESSAGE(String::num_real(3.1415f) == "3.14149999618530", "Prints more digits of 32-bit float when real_t = double (ones that would be reliable for double).");
+#else
+ CHECK_MESSAGE(String::num_real(Math_PI) == "3.141593", "Prints the appropriate amount of digits for real_t = float.");
+ CHECK_MESSAGE(String::num_real(3.1415f) == "3.1415", "Prints only reliable digits of 32-bit float when real_t = float.");
+#endif // REAL_T_IS_DOUBLE
+
+ // Checks doubles with many decimal places.
+ CHECK(String::num(0.0000012345432123454321, -1) == "0.00000123454321"); // -1 uses 14 as sane default.
+ CHECK(String::num(0.0000012345432123454321) == "0.00000123454321"); // -1 is the default value.
+ CHECK(String::num(-0.0000012345432123454321) == "-0.00000123454321");
+ CHECK(String::num(-10000.0000012345432123454321) == "-10000.0000012345");
+ CHECK(String::num(0.0000000000012345432123454321) == "0.00000000000123");
+ CHECK(String::num(0.0000000000012345432123454321, 3) == "0");
+
+ // Note: When relevant (remainder > 0.5), the last digit gets rounded up,
+ // which can also lead to not include a trailing zero, e.g. "...89" -> "...9".
+ CHECK(String::num(0.0000056789876567898765) == "0.00000567898766"); // Should round last digit.
+ CHECK(String::num(10000.000005678999999999) == "10000.000005679"); // We cut at ...789|99 which is rounded to ...79, so only 13 decimals.
+ CHECK(String::num(42.12999999, 6) == "42.13"); // Also happens with lower decimals count.
+
+ // 32 is MAX_DECIMALS. We can't reliably store that many so we can't compare against a string,
+ // but we can check that the string length is 34 (32 + 2 for "0.").
+ CHECK(String::num(0.00000123456789987654321123456789987654321, 32).length() == 34);
+ CHECK(String::num(0.00000123456789987654321123456789987654321, 42).length() == 34); // Should enforce MAX_DECIMALS.
+ CHECK(String::num(10000.00000123456789987654321123456789987654321, 42).length() == 38); // 32 decimals + "10000.".
}
TEST_CASE("[String] String to integer") {
@@ -1118,20 +1153,20 @@ TEST_CASE("[String] dedent") {
}
TEST_CASE("[String] Path functions") {
- static const char *path[4] = { "C:\\Godot\\project\\test.tscn", "/Godot/project/test.xscn", "../Godot/project/test.scn", "Godot\\test.doc" };
- static const char *base_dir[4] = { "C:\\Godot\\project", "/Godot/project", "../Godot/project", "Godot" };
- static const char *base_name[4] = { "C:\\Godot\\project\\test", "/Godot/project/test", "../Godot/project/test", "Godot\\test" };
- static const char *ext[4] = { "tscn", "xscn", "scn", "doc" };
- static const char *file[4] = { "test.tscn", "test.xscn", "test.scn", "test.doc" };
- static const bool abs[4] = { true, true, false, false };
-
- for (int i = 0; i < 4; i++) {
+ static const char *path[7] = { "C:\\Godot\\project\\test.tscn", "/Godot/project/test.xscn", "../Godot/project/test.scn", "Godot\\test.doc", "C:\\test.", "res://test", "/.test" };
+ static const char *base_dir[7] = { "C:\\Godot\\project", "/Godot/project", "../Godot/project", "Godot", "C:\\", "res://", "/" };
+ static const char *base_name[7] = { "C:\\Godot\\project\\test", "/Godot/project/test", "../Godot/project/test", "Godot\\test", "C:\\test", "res://test", "/" };
+ static const char *ext[7] = { "tscn", "xscn", "scn", "doc", "", "", "test" };
+ static const char *file[7] = { "test.tscn", "test.xscn", "test.scn", "test.doc", "test.", "test", ".test" };
+ static const bool abs[7] = { true, true, false, false, true, true, true };
+
+ for (int i = 0; i < 7; i++) {
CHECK(String(path[i]).get_base_dir() == base_dir[i]);
CHECK(String(path[i]).get_basename() == base_name[i]);
CHECK(String(path[i]).get_extension() == ext[i]);
CHECK(String(path[i]).get_file() == file[i]);
CHECK(String(path[i]).is_absolute_path() == abs[i]);
- CHECK(String(path[i]).is_rel_path() != abs[i]);
+ CHECK(String(path[i]).is_relative_path() != abs[i]);
CHECK(String(path[i]).simplify_path().get_base_dir().plus_file(file[i]) == String(path[i]).simplify_path());
}
@@ -1346,6 +1381,78 @@ TEST_CASE("[String] validate_node_name") {
String name_with_invalid_chars = "Name with invalid characters :.@removed!";
CHECK(name_with_invalid_chars.validate_node_name() == "Name with invalid characters removed!");
}
+
+TEST_CASE("[String] Variant indexed get") {
+ Variant s = String("abcd");
+ bool valid = false;
+ bool oob = true;
+
+ String r = s.get_indexed(1, valid, oob);
+
+ CHECK(valid);
+ CHECK_FALSE(oob);
+ CHECK_EQ(r, String("b"));
+}
+
+TEST_CASE("[String] Variant validated indexed get") {
+ Variant s = String("abcd");
+
+ Variant::ValidatedIndexedGetter getter = Variant::get_member_validated_indexed_getter(Variant::STRING);
+
+ Variant r;
+ bool oob = true;
+ getter(&s, 1, &r, &oob);
+
+ CHECK_FALSE(oob);
+ CHECK_EQ(r, String("b"));
+}
+
+TEST_CASE("[String] Variant ptr indexed get") {
+ String s("abcd");
+
+ Variant::PTRIndexedGetter getter = Variant::get_member_ptr_indexed_getter(Variant::STRING);
+
+ String r;
+ getter(&s, 1, &r);
+
+ CHECK_EQ(r, String("b"));
+}
+
+TEST_CASE("[String] Variant indexed set") {
+ Variant s = String("abcd");
+ bool valid = false;
+ bool oob = true;
+
+ s.set_indexed(1, String("z"), valid, oob);
+
+ CHECK(valid);
+ CHECK_FALSE(oob);
+ CHECK_EQ(s, String("azcd"));
+}
+
+TEST_CASE("[String] Variant validated indexed set") {
+ Variant s = String("abcd");
+
+ Variant::ValidatedIndexedSetter setter = Variant::get_member_validated_indexed_setter(Variant::STRING);
+
+ Variant v = String("z");
+ bool oob = true;
+ setter(&s, 1, &v, &oob);
+
+ CHECK_FALSE(oob);
+ CHECK_EQ(s, String("azcd"));
+}
+
+TEST_CASE("[String] Variant ptr indexed set") {
+ String s("abcd");
+
+ Variant::PTRIndexedSetter setter = Variant::get_member_ptr_indexed_setter(Variant::STRING);
+
+ String v("z");
+ setter(&s, 1, &v);
+
+ CHECK_EQ(s, String("azcd"));
+}
} // namespace TestString
#endif // TEST_STRING_H
diff --git a/tests/test_text_server.h b/tests/test_text_server.h
index cac022e33f..b8ed4f89d0 100644
--- a/tests/test_text_server.h
+++ b/tests/test_text_server.h
@@ -55,7 +55,8 @@ TEST_SUITE("[[TextServer]") {
for (int i = 0; i < TextServerManager::get_interface_count(); i++) {
TextServer *ts = TextServerManager::initialize(i, err);
- RID font = ts->create_font_memory(_font_NotoSans_Regular, _font_NotoSans_Regular_size, "ttf");
+ RID font = ts->create_font();
+ ts->font_set_data_ptr(font, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
TEST_FAIL_COND(font == RID(), "Loading font failed.");
ts->free(font);
}
@@ -65,9 +66,14 @@ TEST_SUITE("[[TextServer]") {
for (int i = 0; i < TextServerManager::get_interface_count(); i++) {
TextServer *ts = TextServerManager::initialize(i, err);
+ RID font1 = ts->create_font();
+ ts->font_set_data_ptr(font1, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
+ RID font2 = ts->create_font();
+ ts->font_set_data_ptr(font2, _font_NotoSansThaiUI_Regular, _font_NotoSansThaiUI_Regular_size);
+
Vector<RID> font;
- font.push_back(ts->create_font_memory(_font_NotoSans_Regular, _font_NotoSans_Regular_size, "ttf"));
- font.push_back(ts->create_font_memory(_font_NotoSansThaiUI_Regular, _font_NotoSansThaiUI_Regular_size, "ttf"));
+ font.push_back(font1);
+ font.push_back(font2);
String test = U"คนอ้วน khon uan ר××”";
// 6^ 17^
@@ -111,9 +117,14 @@ TEST_SUITE("[[TextServer]") {
continue;
}
+ RID font1 = ts->create_font();
+ ts->font_set_data_ptr(font1, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
+ RID font2 = ts->create_font();
+ ts->font_set_data_ptr(font2, _font_NotoNaskhArabicUI_Regular, _font_NotoNaskhArabicUI_Regular_size);
+
Vector<RID> font;
- font.push_back(ts->create_font_memory(_font_NotoSans_Regular, _font_NotoSans_Regular_size, "ttf"));
- font.push_back(ts->create_font_memory(_font_NotoNaskhArabicUI_Regular, _font_NotoNaskhArabicUI_Regular_size, "ttf"));
+ font.push_back(font1);
+ font.push_back(font2);
String test = U"Arabic (اَلْعَرَبÙيَّةÙ, al-Ê¿arabiyyah)";
// 7^ 26^
@@ -155,9 +166,14 @@ TEST_SUITE("[[TextServer]") {
String test_1 = U"test test test";
// 5^ 10^
+ RID font1 = ts->create_font();
+ ts->font_set_data_ptr(font1, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
+ RID font2 = ts->create_font();
+ ts->font_set_data_ptr(font2, _font_NotoSansThaiUI_Regular, _font_NotoSansThaiUI_Regular_size);
+
Vector<RID> font;
- font.push_back(ts->create_font_memory(_font_NotoSans_Regular, _font_NotoSans_Regular_size, "ttf"));
- font.push_back(ts->create_font_memory(_font_NotoSansThaiUI_Regular, _font_NotoSansThaiUI_Regular_size, "ttf"));
+ font.push_back(font1);
+ font.push_back(font2);
RID ctx = ts->create_shaped_text();
TEST_FAIL_COND(ctx == RID(), "Creating text buffer failed.");
@@ -185,9 +201,14 @@ TEST_SUITE("[[TextServer]") {
for (int i = 0; i < TextServerManager::get_interface_count(); i++) {
TextServer *ts = TextServerManager::initialize(i, err);
+ RID font1 = ts->create_font();
+ ts->font_set_data_ptr(font1, _font_NotoSans_Regular, _font_NotoSans_Regular_size);
+ RID font2 = ts->create_font();
+ ts->font_set_data_ptr(font2, _font_NotoNaskhArabicUI_Regular, _font_NotoNaskhArabicUI_Regular_size);
+
Vector<RID> font;
- font.push_back(ts->create_font_memory(_font_NotoSans_Regular, _font_NotoSans_Regular_size, "ttf"));
- font.push_back(ts->create_font_memory(_font_NotoNaskhArabicUI_Regular, _font_NotoNaskhArabicUI_Regular_size, "ttf"));
+ font.push_back(font1);
+ font.push_back(font2);
String test_1 = U"الحمد";
String test_2 = U"الحمد test";
@@ -242,7 +263,6 @@ TEST_SUITE("[[TextServer]") {
font.clear();
}
}
-
memdelete(tsman);
}
}
diff --git a/tests/test_tools.h b/tests/test_tools.h
new file mode 100644
index 0000000000..3ea953cb07
--- /dev/null
+++ b/tests/test_tools.h
@@ -0,0 +1,61 @@
+/*************************************************************************/
+/* test_tools.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#ifndef TEST_TOOLS_H
+#define TEST_TOOLS_H
+
+#include "core/error/error_macros.h"
+
+struct ErrorDetector {
+ ErrorDetector() {
+ eh.errfunc = _detect_error;
+ eh.userdata = this;
+
+ add_error_handler(&eh);
+ }
+
+ ~ErrorDetector() {
+ remove_error_handler(&eh);
+ }
+
+ void clear() {
+ has_error = false;
+ }
+
+ static void _detect_error(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type) {
+ ErrorDetector *self = (ErrorDetector *)p_self;
+ self->has_error = true;
+ }
+
+ ErrorHandlerList eh;
+ bool has_error = false;
+};
+
+#endif // TEST_TOOLS_H
diff --git a/tests/test_translation.h b/tests/test_translation.h
index 52ff49bf9b..93c53bbbc9 100644
--- a/tests/test_translation.h
+++ b/tests/test_translation.h
@@ -35,6 +35,10 @@
#include "core/string/translation.h"
#include "core/string/translation_po.h"
+#ifdef TOOLS_ENABLED
+#include "editor/import/resource_importer_csv_translation.h"
+#endif
+
#include "thirdparty/doctest/doctest.h"
namespace TestTranslation {
@@ -145,6 +149,33 @@ TEST_CASE("[OptimizedTranslation] Generate from Translation and read messages")
CHECK(messages.size() == 0);
}
+#ifdef TOOLS_ENABLED
+TEST_CASE("[Translation] CSV import") {
+ Ref<ResourceImporterCSVTranslation> import_csv_translation = memnew(ResourceImporterCSVTranslation);
+
+ Map<StringName, Variant> options;
+ options["compress"] = false;
+ options["delimiter"] = 0;
+
+ List<String> gen_files;
+
+ Error result = import_csv_translation->import(TestUtils::get_data_path("translations.csv"),
+ "", options, nullptr, &gen_files);
+ CHECK(result == OK);
+ CHECK(gen_files.size() == 2);
+
+ for (const String &file : gen_files) {
+ Ref<Translation> translation = ResourceLoader::load(file);
+ CHECK(translation.is_valid());
+ TranslationServer::get_singleton()->add_translation(translation);
+ }
+
+ TranslationServer::get_singleton()->set_locale("de");
+
+ CHECK(Object().tr("GOOD_MORNING", "") == "Guten Morgen");
+}
+#endif // TOOLS_ENABLED
+
} // namespace TestTranslation
#endif // TEST_TRANSLATION_H
diff --git a/tests/test_validate_testing.h b/tests/test_validate_testing.h
index f301047509..40b255e18a 100644
--- a/tests/test_validate_testing.h
+++ b/tests/test_validate_testing.h
@@ -34,6 +34,7 @@
#include "core/os/os.h"
#include "tests/test_macros.h"
+#include "tests/test_tools.h"
TEST_SUITE("Validate tests") {
TEST_CASE("Always pass") {
@@ -182,6 +183,17 @@ TEST_SUITE("Validate tests") {
// doctest string concatenation.
CHECK_MESSAGE(true, var, " ", vec2, " ", rect2, " ", color);
}
+ TEST_CASE("Detect error messages") {
+ ErrorDetector ed;
+
+ REQUIRE_FALSE(ed.has_error);
+
+ ERR_PRINT_OFF;
+ ERR_PRINT("Still waiting for Godot!");
+ ERR_PRINT_ON;
+
+ REQUIRE(ed.has_error);
+ }
}
#endif // TEST_VALIDATE_TESTING_H
diff --git a/tests/test_variant.h b/tests/test_variant.h
index dfc72b512c..598fe488d7 100644
--- a/tests/test_variant.h
+++ b/tests/test_variant.h
@@ -39,7 +39,7 @@
namespace TestVariant {
TEST_CASE("[Variant] Writer and parser integer") {
- int64_t a32 = 2147483648; // 2^31, so out of bounds for 32-bit signed int [-2^31,-2^31-1].
+ int64_t a32 = 2147483648; // 2^31, so out of bounds for 32-bit signed int [-2^31, +2^31-1].
String a32_str;
VariantWriter::write_to_string(a32, a32_str);
@@ -76,34 +76,35 @@ TEST_CASE("[Variant] Writer and parser integer") {
CHECK_MESSAGE(b64_int_parsed == 9223372036854775807, "The result should be clamped to max value.");
}
-TEST_CASE("[Variant] Writer and parser float") {
- // Assuming real_t is double.
- real_t a64 = 340282346638528859811704183484516925440.0; // std::numeric_limits<real_t>::max()
+TEST_CASE("[Variant] Writer and parser Variant::FLOAT") {
+ // Variant::FLOAT is always 64-bit (C++ double).
+ // This is the maximum non-infinity double-precision float.
+ double a64 = 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0;
String a64_str;
VariantWriter::write_to_string(a64, a64_str);
- CHECK_MESSAGE(a64_str == "3.40282e+38", "Writes in scientific notation.");
+ CHECK_MESSAGE(a64_str == "1.79769e+308", "Writes in scientific notation.");
CHECK_MESSAGE(a64_str != "inf", "Should not overflow.");
CHECK_MESSAGE(a64_str != "nan", "The result should be defined.");
- VariantParser::StreamString ss;
String errs;
int line;
- Variant b64_parsed;
- real_t b64_float_parsed;
-
- ss.s = a64_str;
- VariantParser::parse(&ss, b64_parsed, errs, line);
- b64_float_parsed = b64_parsed;
+ Variant variant_parsed;
+ double float_parsed;
- CHECK_MESSAGE(b64_float_parsed == 340282001837565597733306976381245063168.0, "Should parse back.");
+ VariantParser::StreamString bss;
+ bss.s = a64_str;
+ VariantParser::parse(&bss, variant_parsed, errs, line);
+ float_parsed = variant_parsed;
// Loses precision, but that's alright.
-
- ss.s = "1.0e+100"; // Float version of Googol!
- VariantParser::parse(&ss, b64_parsed, errs, line);
- b64_float_parsed = b64_parsed;
-
- CHECK_MESSAGE(b64_float_parsed == 340282001837565597733306976381245063168.0, "Should not overflow.");
+ CHECK_MESSAGE(float_parsed == 1.79769e+308, "Should parse back.");
+
+ // Approximation of Googol with a double-precision float.
+ VariantParser::StreamString css;
+ css.s = "1.0e+100";
+ VariantParser::parse(&css, variant_parsed, errs, line);
+ float_parsed = variant_parsed;
+ CHECK_MESSAGE(float_parsed == 1.0e+100, "Should match the double literal.");
}
TEST_CASE("[Variant] Assignment To Bool from Int,Float,String,Vec2,Vec2i,Vec3,Vec3i and Color") {
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 1c310eae05..3403a0be31 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -20,13 +20,15 @@ Files extracted from upstream source:
## bullet
- Upstream: https://github.com/bulletphysics/bullet3
-- Version: 3.08 (df09fd9ed37e365ceae884ca7f620b61607dae2e, 2020)
+- Version: 3.17 (ebe1916b90acae8b13cd8c6b637d8327cdc64e94, 2021)
- License: zlib
Files extracted from upstream source:
-- src/* apart from CMakeLists.txt and premake4.lua files
-- LICENSE.txt
+- `src/*` apart from CMakeLists.txt and premake4.lua files
+- `LICENSE.txt`, and `VERSION` as `VERSION.txt`
+
+Includes a warning fix which should be upstreamed soon (see patch in `patches`).
## certs
@@ -59,7 +61,7 @@ Extracted from .zip provided. Extracted license and header only.
## embree
- Upstream: https://github.com/embree/embree
-- Version: 3.13.0 (7c53133eb21424f7f0ae1e25bf357e358feaf6ab, 2021)
+- Version: 3.13.1 (12b99393438a4cc9e478e33459eed78bec6233fd, 2021)
- License: Apache 2.0
Files extracted from upstream:
@@ -103,7 +105,7 @@ will limit its functionality to IPv4 only.
## etcpak
- Upstream: https://github.com/wolfpld/etcpak
-- Version: git (f27daea656ff77671580f838a889e33049430ebd, 2021)
+- Version: git (7c3cb6fe708d4ae330b0ab2af1ad472bae2a37a2, 2021)
- License: BSD-3-Clause
Files extracted from upstream source:
@@ -159,7 +161,7 @@ Files extracted from upstream source:
## glslang
- Upstream: https://github.com/KhronosGroup/glslang
-- Version: git (dd69df7f3dac26362e10b0f38efb9e47990f7537, 2020)
+- Version: 11.6.0 (2fb89a0072ae7316af1c856f22663fde4928128a, 2021)
- License: glslang
Version should be kept in sync with the one of the used Vulkan SDK (see `vulkan`
@@ -173,7 +175,7 @@ Files extracted from upstream source:
- Run `cmake . && make` and copy generated `include/glslang/build_info.h`
to `glslang/build_info.h`
- `LICENSE.txt`
-- Unnecessary files like `CMakeLists.txt` and `updateGrammar` removed.
+- Unnecessary files like `CMakeLists.txt`, `*.m4` and `updateGrammar` removed.
## graphite
@@ -192,13 +194,13 @@ Files extracted from upstream source:
## harfbuzz
- Upstream: https://github.com/harfbuzz/harfbuzz
-- Version: 2.8.0 (03538e872a0610a65fad692b33d3646f387cf578, 2021)
+- Version: 3.0.0 (9c387e20d65a7a366ac270d789f6ad266014c9e0, 2021)
- License: MIT
Files extracted from upstream source:
- the `src` folder
-- `AUTHORS`, `COPYING`, `NEWS`, `THANKS`
+- `AUTHORS`, `COPYING`, `THANKS`
## icu4c
@@ -422,10 +424,6 @@ Collection of single-file libraries used in Godot components.
* Upstream: https://research.activision.com/publications/archives/fast-filtering-of-reflection-probes
File coeffs_const_8.txt (retrieved April 2020)
* License: MIT
-- `easing_equations.cpp`
- * Upstream: http://robertpenner.com/easing/ via https://github.com/jesusgollonet/ofpennereasing (modified to fit Godot types)
- * Version: git (af72c147c3a74e7e872aa28c7e2abfcced04fdce, 2008) + Godot types and style changes
- * License: BSD-3-Clause
- `fastlz.{c,h}`
* Upstream: https://github.com/ariya/FastLZ
* Version: 0.5.0 (4f20f54d46f5a6dd4fae4def134933369b7602d2, 2020)
@@ -472,20 +470,29 @@ Collection of single-file libraries used in Godot components.
* Upstream: https://github.com/nothings/stb
* Version: 1.00 (2bb4a0accd4003c1db4c24533981e01b1adfd656, 2019)
* License: Public Domain or Unlicense or MIT
-- `stb_vorbis.c`
- * Upstream: https://github.com/nothings/stb
- * Version: 1.20 (314d0a6f9af5af27e585336eecea333e95c5a2d8, 2020)
- * License: Public Domain or Unlicense or MIT
- `yuv2rgb.h`
* Upstream: http://wss.co.uk/pinknoise/yuv2rgb/ (to check)
* Version: ?
* License: BSD
+## msdfgen
+
+- Upstream: https://github.com/Chlumsky/msdfgen
+- Version: 1.9.1 (1b3b6b985094e6f12751177490add3ad11dd91a9, 2010)
+- License: MIT
+
+Files extracted from the upstream source:
+
+- `msdfgen.h`
+- Files in `core/` folder.
+- `LICENSE.txt` and `CHANGELOG.md`
+
+
## nanosvg
- Upstream: https://github.com/memononen/nanosvg
-- Version: git (3e403ec72a9145cbbcc6c63d94a4caf079aafec2, 2020)
+- Version: git (ccdb1995134d340a93fb20e3a3d323ccb3838dd0, 2021)
- License: zlib
Files extracted from the upstream source:
@@ -602,9 +609,12 @@ Godot. Please check the file to know what's new.
## spirv-reflect
- Upstream: https://github.com/KhronosGroup/SPIRV-Reflect
-- Version: git (272e050728de8d4a4ce9e7101c1244e6ff56e5b0, 2021)
+- Version: git (cc937caab141d889c9c9dff572c5a6854d5cf9b4, 2021)
- License: Apache 2.0
+Does not track Vulkan SDK releases closely, but try to package a commit newer
+than the matching glslang and Vulkan headers, just in case.
+
Files extracted from upstream source:
- `spirv_reflect.{c,h}`
@@ -663,10 +673,16 @@ folder.
## volk
- Upstream: https://github.com/zeux/volk
-- Version: git (d75c007f375f35612dba3de512ac73f10bf9aa0e, 2021)
+- Version: 1.2.190 (760a782f295a66de7391d6ed573d65e3fb1c8450, 2021)
- License: MIT
-The volk commit should match the version of the Vulkan headers defined below.
+Unless there is a specific reason to package a more recent version, please stick
+to tagged releases. All Vulkan libraries and headers should be kept in sync so:
+
+- Update Vulkan SDK components to the matching tag (see "vulkan").
+- Update glslang (see "glslang").
+- Update spirv-reflect (see "spirv-reflect").
+
Files extracted from upstream source:
@@ -677,11 +693,10 @@ Files extracted from upstream source:
## vulkan
- Upstream: https://github.com/KhronosGroup/Vulkan-Headers
-- Version: sdk-1.2.182.0 (37164a5726f7e6113810f9557903a117498421cf, 2021)
+- Version: 1.2.190 (9e62d027636cd7210f60d934f56107ed6e1579b8, 2021)
- License: Apache 2.0
-Unless there is a specific reason to package a more recent version, please stick
-to Vulkan SDK releases (prefixed by `sdk-`) for all components.
+The vendored version should be kept in sync with volk, see above.
Files extracted from upstream source:
@@ -692,7 +707,7 @@ Files extracted from upstream source:
SDK release: https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/master/layers/generated/vk_enum_string_helper.h
`vk_mem_alloc.h` is taken from https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
-Version: 3.0.0-development (2021-06-21), branch `feature-small-buffers`, commit `cfea2f72851f9ee4a399769f18865047b83711f1`
+Version: 3.0.0-development (2021-07-07), branch `feature-small-buffers`, commit `cfea2f72851f9ee4a399769f18865047b83711f1`
`vk_mem_alloc.cpp` is a Godot file and should be preserved on updates.
Patches in the `patches` directory should be re-applied after updates.
diff --git a/thirdparty/bullet/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp b/thirdparty/bullet/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
index c79623bd57..6873a95d90 100644
--- a/thirdparty/bullet/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
+++ b/thirdparty/bullet/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
@@ -80,6 +80,7 @@ struct ClipVertex
btVector3 v;
int id;
//b2ContactID id;
+ //b2ContactID id;
};
#define b2Dot(a, b) (a).dot(b)
diff --git a/thirdparty/bullet/BulletCollision/CollisionDispatch/btCollisionObject.h b/thirdparty/bullet/BulletCollision/CollisionDispatch/btCollisionObject.h
index e085c40892..dbe82fd61f 100644
--- a/thirdparty/bullet/BulletCollision/CollisionDispatch/btCollisionObject.h
+++ b/thirdparty/bullet/BulletCollision/CollisionDispatch/btCollisionObject.h
@@ -24,6 +24,7 @@ subject to the following restrictions:
#define WANTS_DEACTIVATION 3
#define DISABLE_DEACTIVATION 4
#define DISABLE_SIMULATION 5
+#define FIXED_BASE_MULTI_BODY 6
struct btBroadphaseProxy;
class btCollisionShape;
@@ -304,7 +305,7 @@ public:
SIMD_FORCE_INLINE bool isActive() const
{
- return ((getActivationState() != ISLAND_SLEEPING) && (getActivationState() != DISABLE_SIMULATION));
+ return ((getActivationState() != FIXED_BASE_MULTI_BODY) && (getActivationState() != ISLAND_SLEEPING) && (getActivationState() != DISABLE_SIMULATION));
}
void setRestitution(btScalar rest)
diff --git a/thirdparty/bullet/BulletCollision/CollisionDispatch/btCollisionWorld.cpp b/thirdparty/bullet/BulletCollision/CollisionDispatch/btCollisionWorld.cpp
index 71184f36ac..f74dcabc54 100644
--- a/thirdparty/bullet/BulletCollision/CollisionDispatch/btCollisionWorld.cpp
+++ b/thirdparty/bullet/BulletCollision/CollisionDispatch/btCollisionWorld.cpp
@@ -1037,7 +1037,7 @@ struct btSingleSweepCallback : public btBroadphaseRayCallback
m_castShape(castShape)
{
btVector3 unnormalizedRayDir = (m_convexToTrans.getOrigin() - m_convexFromTrans.getOrigin());
- btVector3 rayDir = unnormalizedRayDir.normalized();
+ btVector3 rayDir = unnormalizedRayDir.fuzzyZero() ? btVector3(btScalar(0.0), btScalar(0.0), btScalar(0.0)) : unnormalizedRayDir.normalized();
///what about division by zero? --> just set rayDirection[i] to INF/BT_LARGE_FLOAT
m_rayDirectionInverse[0] = rayDir[0] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[0];
m_rayDirectionInverse[1] = rayDir[1] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[1];
@@ -1294,9 +1294,7 @@ public:
btVector3 normalColor(1, 1, 0);
m_debugDrawer->drawLine(center, center + normal, normalColor);
}
- m_debugDrawer->drawLine(wv0, wv1, m_color);
- m_debugDrawer->drawLine(wv1, wv2, m_color);
- m_debugDrawer->drawLine(wv2, wv0, m_color);
+ m_debugDrawer->drawTriangle(wv0, wv1, wv2, m_color, 1.0);
}
};
diff --git a/thirdparty/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp b/thirdparty/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
index cab6980b65..01bf7f67f5 100644
--- a/thirdparty/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
+++ b/thirdparty/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
@@ -18,12 +18,57 @@ subject to the following restrictions:
#include "LinearMath/btTransformUtil.h"
btHeightfieldTerrainShape::btHeightfieldTerrainShape(
+ int heightStickWidth, int heightStickLength,
+ const float* heightfieldData, btScalar minHeight, btScalar maxHeight,
+ int upAxis, bool flipQuadEdges)
+ : m_userValue3(0), m_triangleInfoMap(0)
+{
+ initialize(heightStickWidth, heightStickLength, heightfieldData,
+ /*heightScale=*/1, minHeight, maxHeight, upAxis, PHY_FLOAT,
+ flipQuadEdges);
+}
+
+btHeightfieldTerrainShape::btHeightfieldTerrainShape(
+ int heightStickWidth, int heightStickLength, const double* heightfieldData,
+ btScalar minHeight, btScalar maxHeight, int upAxis, bool flipQuadEdges)
+ : m_userValue3(0), m_triangleInfoMap(0)
+{
+ initialize(heightStickWidth, heightStickLength, heightfieldData,
+ /*heightScale=*/1, minHeight, maxHeight, upAxis, PHY_DOUBLE,
+ flipQuadEdges);
+}
+
+btHeightfieldTerrainShape::btHeightfieldTerrainShape(
+ int heightStickWidth, int heightStickLength, const short* heightfieldData, btScalar heightScale,
+ btScalar minHeight, btScalar maxHeight, int upAxis, bool flipQuadEdges)
+ : m_userValue3(0), m_triangleInfoMap(0)
+{
+ initialize(heightStickWidth, heightStickLength, heightfieldData,
+ heightScale, minHeight, maxHeight, upAxis, PHY_SHORT,
+ flipQuadEdges);
+}
+
+btHeightfieldTerrainShape::btHeightfieldTerrainShape(
+ int heightStickWidth, int heightStickLength, const unsigned char* heightfieldData, btScalar heightScale,
+ btScalar minHeight, btScalar maxHeight, int upAxis, bool flipQuadEdges)
+ : m_userValue3(0), m_triangleInfoMap(0)
+{
+ initialize(heightStickWidth, heightStickLength, heightfieldData,
+ heightScale, minHeight, maxHeight, upAxis, PHY_UCHAR,
+ flipQuadEdges);
+}
+
+btHeightfieldTerrainShape::btHeightfieldTerrainShape(
int heightStickWidth, int heightStickLength, const void* heightfieldData,
btScalar heightScale, btScalar minHeight, btScalar maxHeight, int upAxis,
PHY_ScalarType hdt, bool flipQuadEdges)
:m_userValue3(0),
m_triangleInfoMap(0)
{
+ // legacy constructor: Assumes PHY_FLOAT means btScalar.
+#ifdef BT_USE_DOUBLE_PRECISION
+ if (hdt == PHY_FLOAT) hdt = PHY_DOUBLE;
+#endif
initialize(heightStickWidth, heightStickLength, heightfieldData,
heightScale, minHeight, maxHeight, upAxis, hdt,
flipQuadEdges);
@@ -33,9 +78,12 @@ btHeightfieldTerrainShape::btHeightfieldTerrainShape(int heightStickWidth, int h
: m_userValue3(0),
m_triangleInfoMap(0)
{
- // legacy constructor: support only float or unsigned char,
- // and min height is zero
+ // legacy constructor: support only btScalar or unsigned char data,
+ // and min height is zero.
PHY_ScalarType hdt = (useFloatData) ? PHY_FLOAT : PHY_UCHAR;
+#ifdef BT_USE_DOUBLE_PRECISION
+ if (hdt == PHY_FLOAT) hdt = PHY_DOUBLE;
+#endif
btScalar minHeight = 0.0f;
// previously, height = uchar * maxHeight / 65535.
@@ -59,7 +107,7 @@ void btHeightfieldTerrainShape::initialize(
// btAssert(heightScale) -- do we care? Trust caller here
btAssert(minHeight <= maxHeight); // && "bad min/max height");
btAssert(upAxis >= 0 && upAxis < 3); // && "bad upAxis--should be in range [0,2]");
- btAssert(hdt != PHY_UCHAR || hdt != PHY_FLOAT || hdt != PHY_SHORT); // && "Bad height data type enum");
+ btAssert(hdt != PHY_UCHAR || hdt != PHY_FLOAT || hdt != PHY_DOUBLE || hdt != PHY_SHORT); // && "Bad height data type enum");
// initialize member variables
m_shapeType = TERRAIN_SHAPE_PROXYTYPE;
@@ -152,6 +200,12 @@ btHeightfieldTerrainShape::getRawHeightFieldValue(int x, int y) const
break;
}
+ case PHY_DOUBLE:
+ {
+ val = m_heightfieldDataDouble[(y * m_heightStickWidth) + x];
+ break;
+ }
+
case PHY_UCHAR:
{
unsigned char heightFieldValue = m_heightfieldDataUnsignedChar[(y * m_heightStickWidth) + x];
@@ -232,6 +286,30 @@ getQuantized(
return (int)(x + 0.5);
}
+// Equivalent to std::minmax({a, b, c}).
+// Performs at most 3 comparisons.
+static btHeightfieldTerrainShape::Range minmaxRange(btScalar a, btScalar b, btScalar c)
+{
+ if (a > b)
+ {
+ if (b > c)
+ return btHeightfieldTerrainShape::Range(c, a);
+ else if (a > c)
+ return btHeightfieldTerrainShape::Range(b, a);
+ else
+ return btHeightfieldTerrainShape::Range(b, c);
+ }
+ else
+ {
+ if (a > c)
+ return btHeightfieldTerrainShape::Range(c, b);
+ else if (b > c)
+ return btHeightfieldTerrainShape::Range(a, b);
+ else
+ return btHeightfieldTerrainShape::Range(a, c);
+ }
+}
+
/// given input vector, return quantized version
/**
This routine is basically determining the gridpoint indices for a given
@@ -334,7 +412,8 @@ void btHeightfieldTerrainShape::processAllTriangles(btTriangleCallback* callback
}
// TODO If m_vboundsGrid is available, use it to determine if we really need to process this area
-
+
+ const Range aabbUpRange(aabbMin[m_upAxis], aabbMax[m_upAxis]);
for (int j = startJ; j < endJ; j++)
{
for (int x = startX; x < endX; x++)
@@ -349,29 +428,51 @@ void btHeightfieldTerrainShape::processAllTriangles(btTriangleCallback* callback
if (m_flipQuadEdges || (m_useDiamondSubdivision && !((j + x) & 1)) || (m_useZigzagSubdivision && !(j & 1)))
{
- //first triangle
getVertex(x, j, vertices[indices[0]]);
getVertex(x, j + 1, vertices[indices[1]]);
getVertex(x + 1, j + 1, vertices[indices[2]]);
- callback->processTriangle(vertices, 2 * x, j);
- //second triangle
- // getVertex(x,j,vertices[0]);//already got this vertex before, thanks to Danny Chapman
- getVertex(x + 1, j + 1, vertices[indices[1]]);
+
+ // Skip triangle processing if the triangle is out-of-AABB.
+ Range upRange = minmaxRange(vertices[0][m_upAxis], vertices[1][m_upAxis], vertices[2][m_upAxis]);
+
+ if (upRange.overlaps(aabbUpRange))
+ callback->processTriangle(vertices, 2 * x, j);
+
+ // already set: getVertex(x, j, vertices[indices[0]])
+
+ // equivalent to: getVertex(x + 1, j + 1, vertices[indices[1]]);
+ vertices[indices[1]] = vertices[indices[2]];
+
getVertex(x + 1, j, vertices[indices[2]]);
- callback->processTriangle(vertices, 2 * x+1, j);
+ upRange.min = btMin(upRange.min, vertices[indices[2]][m_upAxis]);
+ upRange.max = btMax(upRange.max, vertices[indices[2]][m_upAxis]);
+
+ if (upRange.overlaps(aabbUpRange))
+ callback->processTriangle(vertices, 2 * x + 1, j);
}
else
{
- //first triangle
getVertex(x, j, vertices[indices[0]]);
getVertex(x, j + 1, vertices[indices[1]]);
getVertex(x + 1, j, vertices[indices[2]]);
- callback->processTriangle(vertices, 2 * x, j);
- //second triangle
- getVertex(x + 1, j, vertices[indices[0]]);
- //getVertex(x,j+1,vertices[1]);
+
+ // Skip triangle processing if the triangle is out-of-AABB.
+ Range upRange = minmaxRange(vertices[0][m_upAxis], vertices[1][m_upAxis], vertices[2][m_upAxis]);
+
+ if (upRange.overlaps(aabbUpRange))
+ callback->processTriangle(vertices, 2 * x, j);
+
+ // already set: getVertex(x, j + 1, vertices[indices[1]]);
+
+ // equivalent to: getVertex(x + 1, j, vertices[indices[0]]);
+ vertices[indices[0]] = vertices[indices[2]];
+
getVertex(x + 1, j + 1, vertices[indices[2]]);
- callback->processTriangle(vertices, 2 * x+1, j);
+ upRange.min = btMin(upRange.min, vertices[indices[2]][m_upAxis]);
+ upRange.max = btMax(upRange.max, vertices[indices[2]][m_upAxis]);
+
+ if (upRange.overlaps(aabbUpRange))
+ callback->processTriangle(vertices, 2 * x + 1, j);
}
}
}
@@ -846,4 +947,4 @@ void btHeightfieldTerrainShape::buildAccelerator(int chunkSize)
void btHeightfieldTerrainShape::clearAccelerator()
{
m_vboundsGrid.clear();
-} \ No newline at end of file
+}
diff --git a/thirdparty/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h b/thirdparty/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h
index 2cf3c00721..7e251fa71e 100644
--- a/thirdparty/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h
+++ b/thirdparty/bullet/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h
@@ -50,17 +50,15 @@ subject to the following restrictions:
The heightfield heights are determined from the data type used for the
heightfieldData array.
- - PHY_UCHAR: height at a point is the uchar value at the
+ - unsigned char: height at a point is the uchar value at the
grid point, multipled by heightScale. uchar isn't recommended
because of its inability to deal with negative values, and
low resolution (8-bit).
- - PHY_SHORT: height at a point is the short int value at that grid
+ - short: height at a point is the short int value at that grid
point, multipled by heightScale.
- - PHY_FLOAT: height at a point is the float value at that grid
- point. heightScale is ignored when using the float heightfield
- data type.
+ - float or dobule: height at a point is the value at that grid point.
Whatever the caller specifies as minHeight and maxHeight will be honored.
The class will not inspect the heightfield to discover the actual minimum
@@ -75,6 +73,14 @@ btHeightfieldTerrainShape : public btConcaveShape
public:
struct Range
{
+ Range() {}
+ Range(btScalar min, btScalar max) : min(min), max(max) {}
+
+ bool overlaps(const Range& other) const
+ {
+ return !(min > other.max || max < other.min);
+ }
+
btScalar min;
btScalar max;
};
@@ -95,7 +101,8 @@ protected:
union {
const unsigned char* m_heightfieldDataUnsignedChar;
const short* m_heightfieldDataShort;
- const btScalar* m_heightfieldDataFloat;
+ const float* m_heightfieldDataFloat;
+ const double* m_heightfieldDataDouble;
const void* m_heightfieldDataUnknown;
};
@@ -135,11 +142,33 @@ protected:
public:
BT_DECLARE_ALIGNED_ALLOCATOR();
- /// preferred constructor
+ /// preferred constructors
+ btHeightfieldTerrainShape(
+ int heightStickWidth, int heightStickLength,
+ const float* heightfieldData, btScalar minHeight, btScalar maxHeight,
+ int upAxis, bool flipQuadEdges);
+ btHeightfieldTerrainShape(
+ int heightStickWidth, int heightStickLength,
+ const double* heightfieldData, btScalar minHeight, btScalar maxHeight,
+ int upAxis, bool flipQuadEdges);
+ btHeightfieldTerrainShape(
+ int heightStickWidth, int heightStickLength,
+ const short* heightfieldData, btScalar heightScale, btScalar minHeight, btScalar maxHeight,
+ int upAxis, bool flipQuadEdges);
+ btHeightfieldTerrainShape(
+ int heightStickWidth, int heightStickLength,
+ const unsigned char* heightfieldData, btScalar heightScale, btScalar minHeight, btScalar maxHeight,
+ int upAxis, bool flipQuadEdges);
+
+ /// legacy constructor
/**
This constructor supports a range of heightfield
data types, and allows for a non-zero minimum height value.
heightScale is needed for any integer-based heightfield data types.
+
+ This legacy constructor considers `PHY_FLOAT` to mean `btScalar`.
+ With `BT_USE_DOUBLE_PRECISION`, it will expect `heightfieldData`
+ to be double-precision.
*/
btHeightfieldTerrainShape(int heightStickWidth, int heightStickLength,
const void* heightfieldData, btScalar heightScale,
@@ -150,7 +179,7 @@ public:
/// legacy constructor
/**
The legacy constructor assumes the heightfield has a minimum height
- of zero. Only unsigned char or floats are supported. For legacy
+ of zero. Only unsigned char or btScalar data are supported. For legacy
compatibility reasons, heightScale is calculated as maxHeight / 65535
(and is only used when useFloatData = false).
*/
@@ -218,4 +247,4 @@ public:
}
};
-#endif //BT_HEIGHTFIELD_TERRAIN_SHAPE_H \ No newline at end of file
+#endif //BT_HEIGHTFIELD_TERRAIN_SHAPE_H
diff --git a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBody.cpp b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBody.cpp
index 7cb92fa3b4..d7588aedc8 100644
--- a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBody.cpp
+++ b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBody.cpp
@@ -33,8 +33,8 @@
namespace
{
-const btScalar SLEEP_EPSILON = btScalar(0.05); // this is a squared velocity (m^2 s^-2)
-const btScalar SLEEP_TIMEOUT = btScalar(2); // in seconds
+const btScalar INITIAL_SLEEP_EPSILON = btScalar(0.05); // this is a squared velocity (m^2 s^-2)
+const btScalar INITIAL_SLEEP_TIMEOUT = btScalar(2); // in seconds
} // namespace
void btMultiBody::spatialTransform(const btMatrix3x3 &rotation_matrix, // rotates vectors in 'from' frame to vectors in 'to' frame
@@ -110,6 +110,9 @@ btMultiBody::btMultiBody(int n_links,
m_canSleep(canSleep),
m_canWakeup(true),
m_sleepTimer(0),
+ m_sleepEpsilon(INITIAL_SLEEP_EPSILON),
+ m_sleepTimeout(INITIAL_SLEEP_TIMEOUT),
+
m_userObjectPointer(0),
m_userIndex2(-1),
m_userIndex(-1),
@@ -1411,7 +1414,7 @@ void btMultiBody::solveImatrix(const btSpatialForceVector &rhs, btSpatialMotionV
}
}
-void btMultiBody::mulMatrix(btScalar *pA, btScalar *pB, int rowsA, int colsA, int rowsB, int colsB, btScalar *pC) const
+void btMultiBody::mulMatrix(const btScalar *pA, const btScalar *pB, int rowsA, int colsA, int rowsB, int colsB, btScalar *pC) const
{
for (int row = 0; row < rowsA; row++)
{
@@ -2104,10 +2107,10 @@ void btMultiBody::checkMotionAndSleepIfRequired(btScalar timestep)
motion += m_realBuf[i] * m_realBuf[i];
}
- if (motion < SLEEP_EPSILON)
+ if (motion < m_sleepEpsilon)
{
m_sleepTimer += timestep;
- if (m_sleepTimer > SLEEP_TIMEOUT)
+ if (m_sleepTimer > m_sleepTimeout)
{
goToSleep();
}
diff --git a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBody.h b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBody.h
index 5a3efc9414..345970d261 100644
--- a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBody.h
+++ b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBody.h
@@ -545,7 +545,10 @@ public:
{
m_canWakeup = canWakeup;
}
- bool isAwake() const { return m_awake; }
+ bool isAwake() const
+ {
+ return m_awake;
+ }
void wakeUp();
void goToSleep();
void checkMotionAndSleepIfRequired(btScalar timestep);
@@ -726,6 +729,17 @@ public:
bool isLinkAndAllAncestorsKinematic(const int i) const;
+ void setSleepThreshold(btScalar sleepThreshold)
+ {
+ m_sleepEpsilon = sleepThreshold;
+ }
+
+ void setSleepTimeout(btScalar sleepTimeout)
+ {
+ this->m_sleepTimeout = sleepTimeout;
+ }
+
+
private:
btMultiBody(const btMultiBody &); // not implemented
void operator=(const btMultiBody &); // not implemented
@@ -745,7 +759,7 @@ private:
}
}
- void mulMatrix(btScalar * pA, btScalar * pB, int rowsA, int colsA, int rowsB, int colsB, btScalar *pC) const;
+ void mulMatrix(const btScalar *pA, const btScalar *pB, int rowsA, int colsA, int rowsB, int colsB, btScalar *pC) const;
private:
btMultiBodyLinkCollider *m_baseCollider; //can be NULL
@@ -801,6 +815,8 @@ private:
bool m_canSleep;
bool m_canWakeup;
btScalar m_sleepTimer;
+ btScalar m_sleepEpsilon;
+ btScalar m_sleepTimeout;
void *m_userObjectPointer;
int m_userIndex2;
diff --git a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyConstraint.cpp b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyConstraint.cpp
index 1ba5861145..00d5fd5609 100644
--- a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyConstraint.cpp
+++ b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyConstraint.cpp
@@ -61,7 +61,8 @@ btScalar btMultiBodyConstraint::fillMultiBodyConstraint(btMultiBodySolverConstra
btScalar lowerLimit, btScalar upperLimit,
bool angConstraint,
btScalar relaxation,
- bool isFriction, btScalar desiredVelocity, btScalar cfmSlip)
+ bool isFriction, btScalar desiredVelocity, btScalar cfmSlip,
+ btScalar damping)
{
solverConstraint.m_multiBodyA = m_bodyA;
solverConstraint.m_multiBodyB = m_bodyB;
@@ -348,7 +349,7 @@ btScalar btMultiBodyConstraint::fillMultiBodyConstraint(btMultiBodySolverConstra
{
btScalar positionalError = 0.f;
- btScalar velocityError = desiredVelocity - rel_vel; // * damping;
+ btScalar velocityError = (desiredVelocity - rel_vel) * damping;
btScalar erp = infoGlobal.m_erp2;
diff --git a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyConstraint.h b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyConstraint.h
index 4a6007ee3e..1aaa07b69e 100644
--- a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyConstraint.h
+++ b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyConstraint.h
@@ -94,7 +94,7 @@ protected:
bool angConstraint = false,
btScalar relaxation = 1.f,
- bool isFriction = false, btScalar desiredVelocity = 0, btScalar cfmSlip = 0);
+ bool isFriction = false, btScalar desiredVelocity = 0, btScalar cfmSlip = 0, btScalar damping = 1.0);
public:
BT_DECLARE_ALIGNED_ALLOCATOR();
diff --git a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.cpp b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.cpp
index fef95f0c4e..e7af332eb3 100644
--- a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.cpp
+++ b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.cpp
@@ -137,7 +137,14 @@ void btMultiBodyDynamicsWorld::updateActivationState(btScalar timeStep)
btMultiBodyLinkCollider* col = body->getBaseCollider();
if (col && col->getActivationState() == ACTIVE_TAG)
{
- col->setActivationState(WANTS_DEACTIVATION);
+ if (body->hasFixedBase())
+ {
+ col->setActivationState(FIXED_BASE_MULTI_BODY);
+ } else
+ {
+ col->setActivationState(WANTS_DEACTIVATION);
+ }
+
col->setDeactivationTime(0.f);
}
for (int b = 0; b < body->getNumLinks(); b++)
diff --git a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyJointMotor.cpp b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyJointMotor.cpp
index 4372489fa1..fec9b03213 100644
--- a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyJointMotor.cpp
+++ b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodyJointMotor.cpp
@@ -43,6 +43,7 @@ void btMultiBodyJointMotor::finalizeMultiDof()
unsigned int offset = 6 + (m_bodyA->getLink(m_linkA).m_dofOffset + linkDoF);
// row 0: the lower bound
+ // row 0: the lower bound
jacobianA(0)[offset] = 1;
m_numDofsFinalized = m_jacSizeBoth;
diff --git a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodySphericalJointMotor.cpp b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodySphericalJointMotor.cpp
index 5c20d2a0d4..00a7ef3579 100644
--- a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodySphericalJointMotor.cpp
+++ b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodySphericalJointMotor.cpp
@@ -26,10 +26,13 @@ btMultiBodySphericalJointMotor::btMultiBodySphericalJointMotor(btMultiBody* body
: btMultiBodyConstraint(body, body, link, body->getLink(link).m_parent, 3, true, MULTIBODY_CONSTRAINT_SPHERICAL_MOTOR),
m_desiredVelocity(0, 0, 0),
m_desiredPosition(0,0,0,1),
- m_kd(1.),
- m_kp(0.2),
+ m_use_multi_dof_params(false),
+ m_kd(1., 1., 1.),
+ m_kp(0.2, 0.2, 0.2),
m_erp(1),
- m_rhsClamp(SIMD_INFINITY)
+ m_rhsClamp(SIMD_INFINITY),
+ m_maxAppliedImpulseMultiDof(maxMotorImpulse, maxMotorImpulse, maxMotorImpulse),
+ m_damping(1.0, 1.0, 1.0)
{
m_maxAppliedImpulse = maxMotorImpulse;
@@ -45,6 +48,7 @@ void btMultiBodySphericalJointMotor::finalizeMultiDof()
unsigned int offset = 6 + (m_bodyA->getLink(m_linkA).m_dofOffset + linkDoF);
// row 0: the lower bound
+ // row 0: the lower bound
jacobianA(0)[offset] = 1;
m_numDofsFinalized = m_jacSizeBoth;
@@ -138,7 +142,8 @@ btQuaternion relRot = currentQuat.inverse() * desiredQuat;
btScalar currentVelocity = m_bodyA->getJointVelMultiDof(m_linkA)[dof];
btScalar desiredVelocity = this->m_desiredVelocity[row];
- btScalar velocityError = desiredVelocity - currentVelocity;
+ double kd = m_use_multi_dof_params ? m_kd[row % 3] : m_kd[0];
+ btScalar velocityError = (desiredVelocity - currentVelocity) * kd;
btMatrix3x3 frameAworld;
frameAworld.setIdentity();
@@ -151,12 +156,16 @@ btQuaternion relRot = currentQuat.inverse() * desiredQuat;
case btMultibodyLink::eSpherical:
{
btVector3 constraintNormalAng = frameAworld.getColumn(row % 3);
- posError = m_kp*angleDiff[row % 3];
+ double kp = m_use_multi_dof_params ? m_kp[row % 3] : m_kp[0];
+ posError = kp*angleDiff[row % 3];
+ double max_applied_impulse = m_use_multi_dof_params ? m_maxAppliedImpulseMultiDof[row % 3] : m_maxAppliedImpulse;
fillMultiBodyConstraint(constraintRow, data, 0, 0, constraintNormalAng,
btVector3(0,0,0), dummy, dummy,
posError,
infoGlobal,
- -m_maxAppliedImpulse, m_maxAppliedImpulse, true);
+ -max_applied_impulse, max_applied_impulse, true,
+ 1.0, false, 0, 0,
+ m_damping[row % 3]);
constraintRow.m_orgConstraint = this;
constraintRow.m_orgDofIndex = row;
break;
diff --git a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodySphericalJointMotor.h b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodySphericalJointMotor.h
index 621beab5a4..bdeccc2e24 100644
--- a/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodySphericalJointMotor.h
+++ b/thirdparty/bullet/BulletDynamics/Featherstone/btMultiBodySphericalJointMotor.h
@@ -26,10 +26,13 @@ class btMultiBodySphericalJointMotor : public btMultiBodyConstraint
protected:
btVector3 m_desiredVelocity;
btQuaternion m_desiredPosition;
- btScalar m_kd;
- btScalar m_kp;
+ bool m_use_multi_dof_params;
+ btVector3 m_kd;
+ btVector3 m_kp;
btScalar m_erp;
btScalar m_rhsClamp; //maximum error
+ btVector3 m_maxAppliedImpulseMultiDof;
+ btVector3 m_damping;
public:
btMultiBodySphericalJointMotor(btMultiBody* body, int link, btScalar maxMotorImpulse);
@@ -44,16 +47,32 @@ public:
btMultiBodyJacobianData& data,
const btContactSolverInfo& infoGlobal);
- virtual void setVelocityTarget(const btVector3& velTarget, btScalar kd = 1.f)
+ virtual void setVelocityTarget(const btVector3& velTarget, btScalar kd = 1.0)
+ {
+ m_desiredVelocity = velTarget;
+ m_kd = btVector3(kd, kd, kd);
+ m_use_multi_dof_params = false;
+ }
+
+ virtual void setVelocityTargetMultiDof(const btVector3& velTarget, const btVector3& kd = btVector3(1.0, 1.0, 1.0))
{
m_desiredVelocity = velTarget;
m_kd = kd;
+ m_use_multi_dof_params = true;
}
- virtual void setPositionTarget(const btQuaternion& posTarget, btScalar kp = 1.f)
+ virtual void setPositionTarget(const btQuaternion& posTarget, btScalar kp =1.f)
+ {
+ m_desiredPosition = posTarget;
+ m_kp = btVector3(kp, kp, kp);
+ m_use_multi_dof_params = false;
+ }
+
+ virtual void setPositionTargetMultiDof(const btQuaternion& posTarget, const btVector3& kp = btVector3(1.f, 1.f, 1.f))
{
m_desiredPosition = posTarget;
m_kp = kp;
+ m_use_multi_dof_params = true;
}
virtual void setErp(btScalar erp)
@@ -68,6 +87,28 @@ public:
{
m_rhsClamp = rhsClamp;
}
+
+ btScalar getMaxAppliedImpulseMultiDof(int i) const
+ {
+ return m_maxAppliedImpulseMultiDof[i];
+ }
+
+ void setMaxAppliedImpulseMultiDof(const btVector3& maxImp)
+ {
+ m_maxAppliedImpulseMultiDof = maxImp;
+ m_use_multi_dof_params = true;
+ }
+
+ btScalar getDamping(int i) const
+ {
+ return m_damping[i];
+ }
+
+ void setDamping(const btVector3& damping)
+ {
+ m_damping = damping;
+ }
+
virtual void debugDraw(class btIDebugDraw* drawer)
{
//todo(erwincoumans)
diff --git a/thirdparty/bullet/BulletDynamics/MLCPSolvers/btMLCPSolver.cpp b/thirdparty/bullet/BulletDynamics/MLCPSolvers/btMLCPSolver.cpp
index 5d864f2757..ed4e0b686d 100644
--- a/thirdparty/bullet/BulletDynamics/MLCPSolvers/btMLCPSolver.cpp
+++ b/thirdparty/bullet/BulletDynamics/MLCPSolvers/btMLCPSolver.cpp
@@ -532,7 +532,7 @@ void btMLCPSolver::createMLCP(const btContactSolverInfo& infoGlobal)
J_transpose = J.transpose();
btMatrixXu& tmp = m_scratchTmp;
-
+ //Minv.printMatrix("Minv=");
{
{
BT_PROFILE("J*Minv");
@@ -543,7 +543,7 @@ void btMLCPSolver::createMLCP(const btContactSolverInfo& infoGlobal)
m_A = tmp * J_transpose;
}
}
-
+ //J.printMatrix("J");
if (1)
{
// add cfm to the diagonal of m_A
diff --git a/thirdparty/bullet/BulletSoftBody/btDeformableBodySolver.cpp b/thirdparty/bullet/BulletSoftBody/btDeformableBodySolver.cpp
index 4b11fccecb..e81680f019 100644
--- a/thirdparty/bullet/BulletSoftBody/btDeformableBodySolver.cpp
+++ b/thirdparty/bullet/BulletSoftBody/btDeformableBodySolver.cpp
@@ -405,6 +405,10 @@ void btDeformableBodySolver::predictMotion(btScalar solverdt)
for (int i = 0; i < m_softBodies.size(); ++i)
{
btSoftBody* psb = m_softBodies[i];
+ /* Clear contacts */
+ psb->m_nodeRigidContacts.resize(0);
+ psb->m_faceRigidContacts.resize(0);
+ psb->m_faceNodeContacts.resize(0);
if (psb->isActive())
{
@@ -472,10 +476,6 @@ void btDeformableBodySolver::predictDeformableMotion(btSoftBody* psb, btScalar d
{
psb->updateFaceTree(true, true);
}
- /* Clear contacts */
- psb->m_nodeRigidContacts.resize(0);
- psb->m_faceRigidContacts.resize(0);
- psb->m_faceNodeContacts.resize(0);
/* Optimize dbvt's */
// psb->m_ndbvt.optimizeIncremental(1);
// psb->m_fdbvt.optimizeIncremental(1);
diff --git a/thirdparty/bullet/BulletSoftBody/btDeformableMousePickingForce.h b/thirdparty/bullet/BulletSoftBody/btDeformableMousePickingForce.h
index d218d96214..697408355c 100644
--- a/thirdparty/bullet/BulletSoftBody/btDeformableMousePickingForce.h
+++ b/thirdparty/bullet/BulletSoftBody/btDeformableMousePickingForce.h
@@ -29,7 +29,7 @@ class btDeformableMousePickingForce : public btDeformableLagrangianForce
public:
typedef btAlignedObjectArray<btVector3> TVStack;
- btDeformableMousePickingForce(btScalar k, btScalar d, const btSoftBody::Face& face, btVector3 mouse_pos, btScalar maxForce = 0.3) : m_elasticStiffness(k), m_dampingStiffness(d), m_face(face), m_mouse_pos(mouse_pos), m_maxForce(maxForce)
+ btDeformableMousePickingForce(btScalar k, btScalar d, const btSoftBody::Face& face, const btVector3& mouse_pos, btScalar maxForce = 0.3) : m_elasticStiffness(k), m_dampingStiffness(d), m_face(face), m_mouse_pos(mouse_pos), m_maxForce(maxForce)
{
}
diff --git a/thirdparty/bullet/BulletSoftBody/btSoftBody.h b/thirdparty/bullet/BulletSoftBody/btSoftBody.h
index f578487b8c..dfde8fd1e4 100644
--- a/thirdparty/bullet/BulletSoftBody/btSoftBody.h
+++ b/thirdparty/bullet/BulletSoftBody/btSoftBody.h
@@ -1317,8 +1317,8 @@ public:
}
for (int k = 0; k < m_faceNodeContacts.size(); ++k)
{
- int i = indices[k];
- btSoftBody::DeformableFaceNodeContact& c = m_faceNodeContacts[i];
+ int idx = indices[k];
+ btSoftBody::DeformableFaceNodeContact& c = m_faceNodeContacts[idx];
btSoftBody::Node* node = c.m_node;
btSoftBody::Face* face = c.m_face;
const btVector3& w = c.m_bary;
diff --git a/thirdparty/bullet/LinearMath/btIDebugDraw.h b/thirdparty/bullet/LinearMath/btIDebugDraw.h
index 82ec19a69b..df4db2ff5a 100644
--- a/thirdparty/bullet/LinearMath/btIDebugDraw.h
+++ b/thirdparty/bullet/LinearMath/btIDebugDraw.h
@@ -4,8 +4,8 @@ Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it freely,
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
@@ -21,7 +21,7 @@ subject to the following restrictions:
///The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
///Typical use case: create a debug drawer object, and assign it to a btCollisionWorld or btDynamicsWorld using setDebugDrawer and call debugDrawWorld.
-///A class that implements the btIDebugDraw interface has to implement the drawLine method at a minimum.
+///A class that implements the btIDebugDraw interface will need to provide non-empty implementations of the the drawLine and getDebugMode methods at a minimum.
///For color arguments the X,Y,Z components refer to Red, Green and Blue each in the range [0..1]
class btIDebugDraw
{
diff --git a/thirdparty/bullet/LinearMath/btScalar.h b/thirdparty/bullet/LinearMath/btScalar.h
index 0402146af1..b239217bb6 100644
--- a/thirdparty/bullet/LinearMath/btScalar.h
+++ b/thirdparty/bullet/LinearMath/btScalar.h
@@ -25,7 +25,7 @@ subject to the following restrictions:
#include <float.h>
/* SVN $Revision$ on $Date$ from http://bullet.googlecode.com*/
-#define BT_BULLET_VERSION 308
+#define BT_BULLET_VERSION 317
inline int btGetVersion()
{
diff --git a/thirdparty/bullet/LinearMath/btSerializer.h b/thirdparty/bullet/LinearMath/btSerializer.h
index 4d1c760e24..f18442f23d 100644
--- a/thirdparty/bullet/LinearMath/btSerializer.h
+++ b/thirdparty/bullet/LinearMath/btSerializer.h
@@ -480,8 +480,8 @@ public:
}
buffer[9] = '3';
- buffer[10] = '0';
- buffer[11] = '8';
+ buffer[10] = '1';
+ buffer[11] = '7';
}
virtual void startSerialization()
@@ -499,7 +499,6 @@ public:
writeDNA();
//if we didn't pre-allocate a buffer, we need to create a contiguous buffer now
- int mysize = 0;
if (!m_totalSize)
{
if (m_buffer)
@@ -511,14 +510,12 @@ public:
unsigned char* currentPtr = m_buffer;
writeHeader(m_buffer);
currentPtr += BT_HEADER_LENGTH;
- mysize += BT_HEADER_LENGTH;
for (int i = 0; i < m_chunkPtrs.size(); i++)
{
int curLength = sizeof(btChunk) + m_chunkPtrs[i]->m_length;
memcpy(currentPtr, m_chunkPtrs[i], curLength);
btAlignedFree(m_chunkPtrs[i]);
currentPtr += curLength;
- mysize += curLength;
}
}
diff --git a/thirdparty/bullet/VERSION.txt b/thirdparty/bullet/VERSION.txt
new file mode 100644
index 0000000000..78c8a7428a
--- /dev/null
+++ b/thirdparty/bullet/VERSION.txt
@@ -0,0 +1 @@
+3.17
diff --git a/thirdparty/bullet/patches/bullet-fix-warnings.patch b/thirdparty/bullet/patches/bullet-fix-warnings.patch
new file mode 100644
index 0000000000..69cde1b16e
--- /dev/null
+++ b/thirdparty/bullet/patches/bullet-fix-warnings.patch
@@ -0,0 +1,42 @@
+diff --git a/thirdparty/bullet/BulletSoftBody/btSoftBody.h b/thirdparty/bullet/BulletSoftBody/btSoftBody.h
+index f578487b8c..dfde8fd1e4 100644
+--- a/thirdparty/bullet/BulletSoftBody/btSoftBody.h
++++ b/thirdparty/bullet/BulletSoftBody/btSoftBody.h
+@@ -1317,8 +1317,8 @@ public:
+ }
+ for (int k = 0; k < m_faceNodeContacts.size(); ++k)
+ {
+- int i = indices[k];
+- btSoftBody::DeformableFaceNodeContact& c = m_faceNodeContacts[i];
++ int idx = indices[k];
++ btSoftBody::DeformableFaceNodeContact& c = m_faceNodeContacts[idx];
+ btSoftBody::Node* node = c.m_node;
+ btSoftBody::Face* face = c.m_face;
+ const btVector3& w = c.m_bary;
+diff --git a/thirdparty/bullet/LinearMath/btSerializer.h b/thirdparty/bullet/LinearMath/btSerializer.h
+index ce4fc34e20..11592d2ccd 100644
+--- a/thirdparty/bullet/LinearMath/btSerializer.h
++++ b/thirdparty/bullet/LinearMath/btSerializer.h
+@@ -499,7 +499,6 @@ public:
+ writeDNA();
+
+ //if we didn't pre-allocate a buffer, we need to create a contiguous buffer now
+- int mysize = 0;
+ if (!m_totalSize)
+ {
+ if (m_buffer)
+@@ -511,14 +510,12 @@ public:
+ unsigned char* currentPtr = m_buffer;
+ writeHeader(m_buffer);
+ currentPtr += BT_HEADER_LENGTH;
+- mysize += BT_HEADER_LENGTH;
+ for (int i = 0; i < m_chunkPtrs.size(); i++)
+ {
+ int curLength = sizeof(btChunk) + m_chunkPtrs[i]->m_length;
+ memcpy(currentPtr, m_chunkPtrs[i], curLength);
+ btAlignedFree(m_chunkPtrs[i]);
+ currentPtr += curLength;
+- mysize += curLength;
+ }
+ }
+
diff --git a/thirdparty/embree/include/embree3/rtcore_config.h b/thirdparty/embree/include/embree3/rtcore_config.h
index 3a9819c9f1..62b7b6f4dc 100644
--- a/thirdparty/embree/include/embree3/rtcore_config.h
+++ b/thirdparty/embree/include/embree3/rtcore_config.h
@@ -6,9 +6,9 @@
#define RTC_VERSION_MAJOR 3
#define RTC_VERSION_MINOR 13
-#define RTC_VERSION_PATCH 0
-#define RTC_VERSION 31300
-#define RTC_VERSION_STRING "3.13.0"
+#define RTC_VERSION_PATCH 1
+#define RTC_VERSION 31301
+#define RTC_VERSION_STRING "3.13.1"
#define RTC_MAX_INSTANCE_LEVEL_COUNT 1
diff --git a/thirdparty/embree/kernels/bvh/bvh_intersector_hybrid.cpp b/thirdparty/embree/kernels/bvh/bvh_intersector_hybrid.cpp
new file mode 100644
index 0000000000..6e9a5a538e
--- /dev/null
+++ b/thirdparty/embree/kernels/bvh/bvh_intersector_hybrid.cpp
@@ -0,0 +1,917 @@
+// Copyright 2009-2021 Intel Corporation
+// SPDX-License-Identifier: Apache-2.0
+
+#include "bvh_intersector_hybrid.h"
+#include "bvh_traverser1.h"
+#include "node_intersector1.h"
+#include "node_intersector_packet.h"
+
+#include "../geometry/intersector_iterators.h"
+#include "../geometry/triangle_intersector.h"
+#include "../geometry/trianglev_intersector.h"
+#include "../geometry/trianglev_mb_intersector.h"
+#include "../geometry/trianglei_intersector.h"
+#include "../geometry/quadv_intersector.h"
+#include "../geometry/quadi_intersector.h"
+#include "../geometry/curveNv_intersector.h"
+#include "../geometry/curveNi_intersector.h"
+#include "../geometry/curveNi_mb_intersector.h"
+#include "../geometry/linei_intersector.h"
+#include "../geometry/subdivpatch1_intersector.h"
+#include "../geometry/object_intersector.h"
+#include "../geometry/instance_intersector.h"
+#include "../geometry/subgrid_intersector.h"
+#include "../geometry/subgrid_mb_intersector.h"
+#include "../geometry/curve_intersector_virtual.h"
+
+#define SWITCH_DURING_DOWN_TRAVERSAL 1
+#define FORCE_SINGLE_MODE 0
+
+#define ENABLE_FAST_COHERENT_CODEPATHS 1
+
+namespace embree
+{
+ namespace isa
+ {
+ template<int N, int K, int types, bool robust, typename PrimitiveIntersectorK, bool single>
+ void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect1(Accel::Intersectors* This,
+ const BVH* bvh,
+ NodeRef root,
+ size_t k,
+ Precalculations& pre,
+ RayHitK<K>& ray,
+ const TravRayK<K, robust>& tray,
+ IntersectContext* context)
+ {
+ /* stack state */
+ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes
+ StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer
+ StackItemT<NodeRef>* stackEnd = stack + stackSizeSingle;
+ stack[0].ptr = root;
+ stack[0].dist = neg_inf;
+
+ /* load the ray into SIMD registers */
+ TravRay<N,robust> tray1;
+ tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]);
+
+ /* pop loop */
+ while (true) pop:
+ {
+ /* pop next node */
+ if (unlikely(stackPtr == stack)) break;
+ stackPtr--;
+ NodeRef cur = NodeRef(stackPtr->ptr);
+
+ /* if popped node is too far, pop next one */
+ if (unlikely(*(float*)&stackPtr->dist > ray.tfar[k]))
+ continue;
+
+ /* downtraversal loop */
+ while (true)
+ {
+ /* intersect node */
+ size_t mask; vfloat<N> tNear;
+ STAT3(normal.trav_nodes, 1, 1, 1);
+ bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask);
+ if (unlikely(!nodeIntersected)) { STAT3(normal.trav_nodes,-1,-1,-1); break; }
+
+ /* if no child is hit, pop next node */
+ if (unlikely(mask == 0))
+ goto pop;
+
+ /* select next child and push other children */
+ BVHNNodeTraverser1Hit<N, types>::traverseClosestHit(cur, mask, tNear, stackPtr, stackEnd);
+ }
+
+ /* this is a leaf node */
+ assert(cur != BVH::emptyNode);
+ STAT3(normal.trav_leaves, 1, 1, 1);
+ size_t num; Primitive* prim = (Primitive*)cur.leaf(num);
+
+ size_t lazy_node = 0;
+ PrimitiveIntersectorK::intersect(This, pre, ray, k, context, prim, num, tray1, lazy_node);
+
+ tray1.tfar = ray.tfar[k];
+
+ if (unlikely(lazy_node)) {
+ stackPtr->ptr = lazy_node;
+ stackPtr->dist = neg_inf;
+ stackPtr++;
+ }
+ }
+ }
+
+ template<int N, int K, int types, bool robust, typename PrimitiveIntersectorK, bool single>
+ void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersect(vint<K>* __restrict__ valid_i,
+ Accel::Intersectors* __restrict__ This,
+ RayHitK<K>& __restrict__ ray,
+ IntersectContext* __restrict__ context)
+ {
+ BVH* __restrict__ bvh = (BVH*)This->ptr;
+
+ /* we may traverse an empty BVH in case all geometry was invalid */
+ if (bvh->root == BVH::emptyNode)
+ return;
+
+#if ENABLE_FAST_COHERENT_CODEPATHS == 1
+ assert(context);
+ if (unlikely(types == BVH_AN1 && context->user && context->isCoherent()))
+ {
+ intersectCoherent(valid_i, This, ray, context);
+ return;
+ }
+#endif
+
+ /* filter out invalid rays */
+ vbool<K> valid = *valid_i == -1;
+#if defined(EMBREE_IGNORE_INVALID_RAYS)
+ valid &= ray.valid();
+#endif
+
+ /* return if there are no valid rays */
+ size_t valid_bits = movemask(valid);
+
+#if defined(__AVX__)
+ STAT3(normal.trav_hit_boxes[popcnt(movemask(valid))], 1, 1, 1);
+#endif
+
+ if (unlikely(valid_bits == 0)) return;
+
+ /* verify correct input */
+ assert(all(valid, ray.valid()));
+ assert(all(valid, ray.tnear() >= 0.0f));
+ assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f)));
+ Precalculations pre(valid, ray);
+
+ /* load ray */
+ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0);
+ const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f);
+ const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f);
+
+ if (single)
+ {
+ tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf));
+ tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf));
+
+ for (; valid_bits!=0; ) {
+ const size_t i = bscf(valid_bits);
+ intersect1(This, bvh, bvh->root, i, pre, ray, tray, context);
+ }
+ return;
+ }
+
+ /* determine switch threshold based on flags */
+ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent;
+
+ vint<K> octant = ray.octant();
+ octant = select(valid, octant, vint<K>(0xffffffff));
+
+ /* test whether we have ray with opposing direction signs in the packet */
+ bool split = false;
+ {
+ size_t bits = valid_bits;
+ vbool<K> vsplit( false );
+ do
+ {
+ const size_t valid_index = bsf(bits);
+ vbool<K> octant_valid = octant[valid_index] == octant;
+ bits &= ~(size_t)movemask(octant_valid);
+ vsplit |= vint<K>(octant[valid_index]) == (octant^vint<K>(0x7));
+ } while (bits);
+ if (any(vsplit)) split = true;
+ }
+
+ do
+ {
+ const size_t valid_index = bsf(valid_bits);
+ const vint<K> diff_octant = vint<K>(octant[valid_index])^octant;
+ const vint<K> count_diff_octant = \
+ ((diff_octant >> 2) & 1) +
+ ((diff_octant >> 1) & 1) +
+ ((diff_octant >> 0) & 1);
+
+ vbool<K> octant_valid = (count_diff_octant <= 1) & (octant != vint<K>(0xffffffff));
+ if (!single || !split) octant_valid = valid; // deactivate octant sorting in pure chunk mode, otherwise instance traversal performance goes down
+
+
+ octant = select(octant_valid,vint<K>(0xffffffff),octant);
+ valid_bits &= ~(size_t)movemask(octant_valid);
+
+ tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf));
+ tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf));
+
+ /* allocate stack and push root node */
+ vfloat<K> stack_near[stackSizeChunk];
+ NodeRef stack_node[stackSizeChunk];
+ stack_node[0] = BVH::invalidNode;
+ stack_near[0] = inf;
+ stack_node[1] = bvh->root;
+ stack_near[1] = tray.tnear;
+ NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk;
+ NodeRef* __restrict__ sptr_node = stack_node + 2;
+ vfloat<K>* __restrict__ sptr_near = stack_near + 2;
+
+ while (1) pop:
+ {
+ /* pop next node from stack */
+ assert(sptr_node > stack_node);
+ sptr_node--;
+ sptr_near--;
+ NodeRef cur = *sptr_node;
+ if (unlikely(cur == BVH::invalidNode)) {
+ assert(sptr_node == stack_node);
+ break;
+ }
+
+ /* cull node if behind closest hit point */
+ vfloat<K> curDist = *sptr_near;
+ const vbool<K> active = curDist < tray.tfar;
+ if (unlikely(none(active)))
+ continue;
+
+ /* switch to single ray traversal */
+#if (!defined(__WIN32__) || defined(__X86_64__)) && defined(__SSE4_2__)
+#if FORCE_SINGLE_MODE == 0
+ if (single)
+#endif
+ {
+ size_t bits = movemask(active);
+#if FORCE_SINGLE_MODE == 0
+ if (unlikely(popcnt(bits) <= switchThreshold))
+#endif
+ {
+ for (; bits!=0; ) {
+ const size_t i = bscf(bits);
+ intersect1(This, bvh, cur, i, pre, ray, tray, context);
+ }
+ tray.tfar = min(tray.tfar, ray.tfar);
+ continue;
+ }
+ }
+#endif
+ while (likely(!cur.isLeaf()))
+ {
+ /* process nodes */
+ const vbool<K> valid_node = tray.tfar > curDist;
+ STAT3(normal.trav_nodes, 1, popcnt(valid_node), K);
+ const NodeRef nodeRef = cur;
+ const BaseNode* __restrict__ const node = nodeRef.baseNode();
+
+ /* set cur to invalid */
+ cur = BVH::emptyNode;
+ curDist = pos_inf;
+
+ size_t num_child_hits = 0;
+
+ for (unsigned i = 0; i < N; i++)
+ {
+ const NodeRef child = node->children[i];
+ if (unlikely(child == BVH::emptyNode)) break;
+ vfloat<K> lnearP;
+ vbool<K> lhit = valid_node;
+ BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit);
+
+ /* if we hit the child we choose to continue with that child if it
+ is closer than the current next child, or we push it onto the stack */
+ if (likely(any(lhit)))
+ {
+ assert(sptr_node < stackEnd);
+ assert(child != BVH::emptyNode);
+ const vfloat<K> childDist = select(lhit, lnearP, inf);
+ /* push cur node onto stack and continue with hit child */
+ if (any(childDist < curDist))
+ {
+ if (likely(cur != BVH::emptyNode)) {
+ num_child_hits++;
+ *sptr_node = cur; sptr_node++;
+ *sptr_near = curDist; sptr_near++;
+ }
+ curDist = childDist;
+ cur = child;
+ }
+
+ /* push hit child onto stack */
+ else {
+ num_child_hits++;
+ *sptr_node = child; sptr_node++;
+ *sptr_near = childDist; sptr_near++;
+ }
+ }
+ }
+
+#if defined(__AVX__)
+ //STAT3(normal.trav_hit_boxes[num_child_hits], 1, 1, 1);
+#endif
+
+ if (unlikely(cur == BVH::emptyNode))
+ goto pop;
+
+ /* improved distance sorting for 3 or more hits */
+ if (unlikely(num_child_hits >= 2))
+ {
+ if (any(sptr_near[-2] < sptr_near[-1]))
+ {
+ std::swap(sptr_near[-2],sptr_near[-1]);
+ std::swap(sptr_node[-2],sptr_node[-1]);
+ }
+ if (unlikely(num_child_hits >= 3))
+ {
+ if (any(sptr_near[-3] < sptr_near[-1]))
+ {
+ std::swap(sptr_near[-3],sptr_near[-1]);
+ std::swap(sptr_node[-3],sptr_node[-1]);
+ }
+ if (any(sptr_near[-3] < sptr_near[-2]))
+ {
+ std::swap(sptr_near[-3],sptr_near[-2]);
+ std::swap(sptr_node[-3],sptr_node[-2]);
+ }
+ }
+ }
+
+#if SWITCH_DURING_DOWN_TRAVERSAL == 1
+ if (single)
+ {
+ // seems to be the best place for testing utilization
+ if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold))
+ {
+ *sptr_node++ = cur;
+ *sptr_near++ = curDist;
+ goto pop;
+ }
+ }
+#endif
+ }
+
+ /* return if stack is empty */
+ if (unlikely(cur == BVH::invalidNode)) {
+ assert(sptr_node == stack_node);
+ break;
+ }
+
+ /* intersect leaf */
+ assert(cur != BVH::emptyNode);
+ const vbool<K> valid_leaf = tray.tfar > curDist;
+ STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K);
+ if (unlikely(none(valid_leaf))) continue;
+ size_t items; const Primitive* prim = (Primitive*)cur.leaf(items);
+
+ size_t lazy_node = 0;
+ PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node);
+ tray.tfar = select(valid_leaf, ray.tfar, tray.tfar);
+
+ if (unlikely(lazy_node)) {
+ *sptr_node = lazy_node; sptr_node++;
+ *sptr_near = neg_inf; sptr_near++;
+ }
+ }
+ } while(valid_bits);
+ }
+
+
+ template<int N, int K, int types, bool robust, typename PrimitiveIntersectorK, bool single>
+ void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::intersectCoherent(vint<K>* __restrict__ valid_i,
+ Accel::Intersectors* __restrict__ This,
+ RayHitK<K>& __restrict__ ray,
+ IntersectContext* context)
+ {
+ BVH* __restrict__ bvh = (BVH*)This->ptr;
+
+ /* filter out invalid rays */
+ vbool<K> valid = *valid_i == -1;
+#if defined(EMBREE_IGNORE_INVALID_RAYS)
+ valid &= ray.valid();
+#endif
+
+ /* return if there are no valid rays */
+ size_t valid_bits = movemask(valid);
+ if (unlikely(valid_bits == 0)) return;
+
+ /* verify correct input */
+ assert(all(valid, ray.valid()));
+ assert(all(valid, ray.tnear() >= 0.0f));
+ assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f)));
+ Precalculations pre(valid, ray);
+
+ /* load ray */
+ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0);
+ const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f);
+ const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f);
+
+ vint<K> octant = ray.octant();
+ octant = select(valid, octant, vint<K>(0xffffffff));
+
+ do
+ {
+ const size_t valid_index = bsf(valid_bits);
+ const vbool<K> octant_valid = octant[valid_index] == octant;
+ valid_bits &= ~(size_t)movemask(octant_valid);
+
+ tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf));
+ tray.tfar = select(octant_valid, org_ray_tfar , vfloat<K>(neg_inf));
+
+ Frustum<robust> frustum;
+ frustum.template init<K>(octant_valid, tray.org, tray.rdir, tray.tnear, tray.tfar, N);
+
+ StackItemT<NodeRef> stack[stackSizeSingle]; // stack of nodes
+ StackItemT<NodeRef>* stackPtr = stack + 1; // current stack pointer
+ stack[0].ptr = bvh->root;
+ stack[0].dist = neg_inf;
+
+ while (1) pop:
+ {
+ /* pop next node from stack */
+ if (unlikely(stackPtr == stack)) break;
+
+ stackPtr--;
+ NodeRef cur = NodeRef(stackPtr->ptr);
+
+ /* cull node if behind closest hit point */
+ vfloat<K> curDist = *(float*)&stackPtr->dist;
+ const vbool<K> active = curDist < tray.tfar;
+ if (unlikely(none(active))) continue;
+
+ while (likely(!cur.isLeaf()))
+ {
+ /* process nodes */
+ //STAT3(normal.trav_nodes, 1, popcnt(valid_node), K);
+ const NodeRef nodeRef = cur;
+ const AABBNode* __restrict__ const node = nodeRef.getAABBNode();
+
+ vfloat<N> fmin;
+ size_t m_frustum_node = intersectNodeFrustum<N>(node, frustum, fmin);
+
+ if (unlikely(!m_frustum_node)) goto pop;
+ cur = BVH::emptyNode;
+ curDist = pos_inf;
+
+#if defined(__AVX__)
+ //STAT3(normal.trav_hit_boxes[popcnt(m_frustum_node)], 1, 1, 1);
+#endif
+ size_t num_child_hits = 0;
+ do {
+ const size_t i = bscf(m_frustum_node);
+ vfloat<K> lnearP;
+ vbool<K> lhit = false; // motion blur is not supported, so the initial value will be ignored
+ STAT3(normal.trav_nodes, 1, 1, 1);
+ BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit);
+
+ if (likely(any(lhit)))
+ {
+ const vfloat<K> childDist = fmin[i];
+ const NodeRef child = node->child(i);
+ BVHN<N>::prefetch(child);
+ if (any(childDist < curDist))
+ {
+ if (likely(cur != BVH::emptyNode)) {
+ num_child_hits++;
+ stackPtr->ptr = cur;
+ *(float*)&stackPtr->dist = toScalar(curDist);
+ stackPtr++;
+ }
+ curDist = childDist;
+ cur = child;
+ }
+ /* push hit child onto stack */
+ else {
+ num_child_hits++;
+ stackPtr->ptr = child;
+ *(float*)&stackPtr->dist = toScalar(childDist);
+ stackPtr++;
+ }
+ }
+ } while(m_frustum_node);
+
+ if (unlikely(cur == BVH::emptyNode)) goto pop;
+
+ /* improved distance sorting for 3 or more hits */
+ if (unlikely(num_child_hits >= 2))
+ {
+ if (stackPtr[-2].dist < stackPtr[-1].dist)
+ std::swap(stackPtr[-2],stackPtr[-1]);
+ if (unlikely(num_child_hits >= 3))
+ {
+ if (stackPtr[-3].dist < stackPtr[-1].dist)
+ std::swap(stackPtr[-3],stackPtr[-1]);
+ if (stackPtr[-3].dist < stackPtr[-2].dist)
+ std::swap(stackPtr[-3],stackPtr[-2]);
+ }
+ }
+ }
+
+ /* intersect leaf */
+ assert(cur != BVH::invalidNode);
+ assert(cur != BVH::emptyNode);
+ const vbool<K> valid_leaf = tray.tfar > curDist;
+ STAT3(normal.trav_leaves, 1, popcnt(valid_leaf), K);
+ if (unlikely(none(valid_leaf))) continue;
+ size_t items; const Primitive* prim = (Primitive*)cur.leaf(items);
+
+ size_t lazy_node = 0;
+ PrimitiveIntersectorK::intersect(valid_leaf, This, pre, ray, context, prim, items, tray, lazy_node);
+
+ /* reduce max distance interval on successful intersection */
+ if (likely(any((ray.tfar < tray.tfar) & valid_leaf)))
+ {
+ tray.tfar = select(valid_leaf, ray.tfar, tray.tfar);
+ frustum.template updateMaxDist<K>(tray.tfar);
+ }
+
+ if (unlikely(lazy_node)) {
+ stackPtr->ptr = lazy_node;
+ stackPtr->dist = neg_inf;
+ stackPtr++;
+ }
+ }
+
+ } while(valid_bits);
+ }
+
+ // ===================================================================================================================================================================
+ // ===================================================================================================================================================================
+ // ===================================================================================================================================================================
+
+ template<int N, int K, int types, bool robust, typename PrimitiveIntersectorK, bool single>
+ bool BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded1(Accel::Intersectors* This,
+ const BVH* bvh,
+ NodeRef root,
+ size_t k,
+ Precalculations& pre,
+ RayK<K>& ray,
+ const TravRayK<K, robust>& tray,
+ IntersectContext* context)
+ {
+ /* stack state */
+ NodeRef stack[stackSizeSingle]; // stack of nodes that still need to get traversed
+ NodeRef* stackPtr = stack+1; // current stack pointer
+ NodeRef* stackEnd = stack+stackSizeSingle;
+ stack[0] = root;
+
+ /* load the ray into SIMD registers */
+ TravRay<N,robust> tray1;
+ tray1.template init<K>(k, tray.org, tray.dir, tray.rdir, tray.nearXYZ, tray.tnear[k], tray.tfar[k]);
+
+ /* pop loop */
+ while (true) pop:
+ {
+ /* pop next node */
+ if (unlikely(stackPtr == stack)) break;
+ stackPtr--;
+ NodeRef cur = (NodeRef)*stackPtr;
+
+ /* downtraversal loop */
+ while (true)
+ {
+ /* intersect node */
+ size_t mask; vfloat<N> tNear;
+ STAT3(shadow.trav_nodes, 1, 1, 1);
+ bool nodeIntersected = BVHNNodeIntersector1<N, types, robust>::intersect(cur, tray1, ray.time()[k], tNear, mask);
+ if (unlikely(!nodeIntersected)) { STAT3(shadow.trav_nodes,-1,-1,-1); break; }
+
+ /* if no child is hit, pop next node */
+ if (unlikely(mask == 0))
+ goto pop;
+
+ /* select next child and push other children */
+ BVHNNodeTraverser1Hit<N, types>::traverseAnyHit(cur, mask, tNear, stackPtr, stackEnd);
+ }
+
+ /* this is a leaf node */
+ assert(cur != BVH::emptyNode);
+ STAT3(shadow.trav_leaves, 1, 1, 1);
+ size_t num; Primitive* prim = (Primitive*)cur.leaf(num);
+
+ size_t lazy_node = 0;
+ if (PrimitiveIntersectorK::occluded(This, pre, ray, k, context, prim, num, tray1, lazy_node)) {
+ ray.tfar[k] = neg_inf;
+ return true;
+ }
+
+ if (unlikely(lazy_node)) {
+ *stackPtr = lazy_node;
+ stackPtr++;
+ }
+ }
+ return false;
+ }
+
+ template<int N, int K, int types, bool robust, typename PrimitiveIntersectorK, bool single>
+ void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occluded(vint<K>* __restrict__ valid_i,
+ Accel::Intersectors* __restrict__ This,
+ RayK<K>& __restrict__ ray,
+ IntersectContext* context)
+ {
+ BVH* __restrict__ bvh = (BVH*)This->ptr;
+
+ /* we may traverse an empty BVH in case all geometry was invalid */
+ if (bvh->root == BVH::emptyNode)
+ return;
+
+#if ENABLE_FAST_COHERENT_CODEPATHS == 1
+ assert(context);
+ if (unlikely(types == BVH_AN1 && context->user && context->isCoherent()))
+ {
+ occludedCoherent(valid_i, This, ray, context);
+ return;
+ }
+#endif
+
+ /* filter out already occluded and invalid rays */
+ vbool<K> valid = (*valid_i == -1) & (ray.tfar >= 0.0f);
+#if defined(EMBREE_IGNORE_INVALID_RAYS)
+ valid &= ray.valid();
+#endif
+
+ /* return if there are no valid rays */
+ const size_t valid_bits = movemask(valid);
+ if (unlikely(valid_bits == 0)) return;
+
+ /* verify correct input */
+ assert(all(valid, ray.valid()));
+ assert(all(valid, ray.tnear() >= 0.0f));
+ assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f)));
+ Precalculations pre(valid, ray);
+
+ /* load ray */
+ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0);
+ const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f);
+ const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f);
+
+ tray.tnear = select(valid, org_ray_tnear, vfloat<K>(pos_inf));
+ tray.tfar = select(valid, org_ray_tfar , vfloat<K>(neg_inf));
+
+ vbool<K> terminated = !valid;
+ const vfloat<K> inf = vfloat<K>(pos_inf);
+
+ /* determine switch threshold based on flags */
+ const size_t switchThreshold = (context->user && context->isCoherent()) ? 2 : switchThresholdIncoherent;
+
+ /* allocate stack and push root node */
+ vfloat<K> stack_near[stackSizeChunk];
+ NodeRef stack_node[stackSizeChunk];
+ stack_node[0] = BVH::invalidNode;
+ stack_near[0] = inf;
+ stack_node[1] = bvh->root;
+ stack_near[1] = tray.tnear;
+ NodeRef* stackEnd MAYBE_UNUSED = stack_node+stackSizeChunk;
+ NodeRef* __restrict__ sptr_node = stack_node + 2;
+ vfloat<K>* __restrict__ sptr_near = stack_near + 2;
+
+ while (1) pop:
+ {
+ /* pop next node from stack */
+ assert(sptr_node > stack_node);
+ sptr_node--;
+ sptr_near--;
+ NodeRef cur = *sptr_node;
+ if (unlikely(cur == BVH::invalidNode)) {
+ assert(sptr_node == stack_node);
+ break;
+ }
+
+ /* cull node if behind closest hit point */
+ vfloat<K> curDist = *sptr_near;
+ const vbool<K> active = curDist < tray.tfar;
+ if (unlikely(none(active)))
+ continue;
+
+ /* switch to single ray traversal */
+#if (!defined(__WIN32__) || defined(__X86_64__)) && defined(__SSE4_2__)
+#if FORCE_SINGLE_MODE == 0
+ if (single)
+#endif
+ {
+ size_t bits = movemask(active);
+#if FORCE_SINGLE_MODE == 0
+ if (unlikely(popcnt(bits) <= switchThreshold))
+#endif
+ {
+ for (; bits!=0; ) {
+ const size_t i = bscf(bits);
+ if (occluded1(This, bvh, cur, i, pre, ray, tray, context))
+ set(terminated, i);
+ }
+ if (all(terminated)) break;
+ tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar);
+ continue;
+ }
+ }
+#endif
+
+ while (likely(!cur.isLeaf()))
+ {
+ /* process nodes */
+ const vbool<K> valid_node = tray.tfar > curDist;
+ STAT3(shadow.trav_nodes, 1, popcnt(valid_node), K);
+ const NodeRef nodeRef = cur;
+ const BaseNode* __restrict__ const node = nodeRef.baseNode();
+
+ /* set cur to invalid */
+ cur = BVH::emptyNode;
+ curDist = pos_inf;
+
+ for (unsigned i = 0; i < N; i++)
+ {
+ const NodeRef child = node->children[i];
+ if (unlikely(child == BVH::emptyNode)) break;
+ vfloat<K> lnearP;
+ vbool<K> lhit = valid_node;
+ BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit);
+
+ /* if we hit the child we push the previously hit node onto the stack, and continue with the currently hit child */
+ if (likely(any(lhit)))
+ {
+ assert(sptr_node < stackEnd);
+ assert(child != BVH::emptyNode);
+ const vfloat<K> childDist = select(lhit, lnearP, inf);
+
+ /* push 'cur' node onto stack and continue with hit child */
+ if (likely(cur != BVH::emptyNode)) {
+ *sptr_node = cur; sptr_node++;
+ *sptr_near = curDist; sptr_near++;
+ }
+ curDist = childDist;
+ cur = child;
+ }
+ }
+ if (unlikely(cur == BVH::emptyNode))
+ goto pop;
+
+#if SWITCH_DURING_DOWN_TRAVERSAL == 1
+ if (single)
+ {
+ // seems to be the best place for testing utilization
+ if (unlikely(popcnt(tray.tfar > curDist) <= switchThreshold))
+ {
+ *sptr_node++ = cur;
+ *sptr_near++ = curDist;
+ goto pop;
+ }
+ }
+#endif
+ }
+
+ /* return if stack is empty */
+ if (unlikely(cur == BVH::invalidNode)) {
+ assert(sptr_node == stack_node);
+ break;
+ }
+
+
+ /* intersect leaf */
+ assert(cur != BVH::emptyNode);
+ const vbool<K> valid_leaf = tray.tfar > curDist;
+ STAT3(shadow.trav_leaves, 1, popcnt(valid_leaf), K);
+ if (unlikely(none(valid_leaf))) continue;
+ size_t items; const Primitive* prim = (Primitive*) cur.leaf(items);
+
+ size_t lazy_node = 0;
+ terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node);
+ if (all(terminated)) break;
+ tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays
+
+ if (unlikely(lazy_node)) {
+ *sptr_node = lazy_node; sptr_node++;
+ *sptr_near = neg_inf; sptr_near++;
+ }
+ }
+
+ vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf);
+ }
+
+
+ template<int N, int K, int types, bool robust, typename PrimitiveIntersectorK, bool single>
+ void BVHNIntersectorKHybrid<N, K, types, robust, PrimitiveIntersectorK, single>::occludedCoherent(vint<K>* __restrict__ valid_i,
+ Accel::Intersectors* __restrict__ This,
+ RayK<K>& __restrict__ ray,
+ IntersectContext* context)
+ {
+ BVH* __restrict__ bvh = (BVH*)This->ptr;
+
+ /* filter out invalid rays */
+ vbool<K> valid = *valid_i == -1;
+#if defined(EMBREE_IGNORE_INVALID_RAYS)
+ valid &= ray.valid();
+#endif
+
+ /* return if there are no valid rays */
+ size_t valid_bits = movemask(valid);
+ if (unlikely(valid_bits == 0)) return;
+
+ /* verify correct input */
+ assert(all(valid, ray.valid()));
+ assert(all(valid, ray.tnear() >= 0.0f));
+ assert(!(types & BVH_MB) || all(valid, (ray.time() >= 0.0f) & (ray.time() <= 1.0f)));
+ Precalculations pre(valid,ray);
+
+ /* load ray */
+ TravRayK<K, robust> tray(ray.org, ray.dir, single ? N : 0);
+ const vfloat<K> org_ray_tnear = max(ray.tnear(), 0.0f);
+ const vfloat<K> org_ray_tfar = max(ray.tfar , 0.0f);
+
+ vbool<K> terminated = !valid;
+
+ vint<K> octant = ray.octant();
+ octant = select(valid, octant, vint<K>(0xffffffff));
+
+ do
+ {
+ const size_t valid_index = bsf(valid_bits);
+ vbool<K> octant_valid = octant[valid_index] == octant;
+ valid_bits &= ~(size_t)movemask(octant_valid);
+
+ tray.tnear = select(octant_valid, org_ray_tnear, vfloat<K>(pos_inf));
+ tray.tfar = select(octant_valid, org_ray_tfar, vfloat<K>(neg_inf));
+
+ Frustum<robust> frustum;
+ frustum.template init<K>(octant_valid, tray.org, tray.rdir, tray.tnear, tray.tfar, N);
+
+ StackItemMaskT<NodeRef> stack[stackSizeSingle]; // stack of nodes
+ StackItemMaskT<NodeRef>* stackPtr = stack + 1; // current stack pointer
+ stack[0].ptr = bvh->root;
+ stack[0].mask = movemask(octant_valid);
+
+ while (1) pop:
+ {
+ /* pop next node from stack */
+ if (unlikely(stackPtr == stack)) break;
+
+ stackPtr--;
+ NodeRef cur = NodeRef(stackPtr->ptr);
+
+ /* cull node of active rays have already been terminated */
+ size_t m_active = (size_t)stackPtr->mask & (~(size_t)movemask(terminated));
+
+ if (unlikely(m_active == 0)) continue;
+
+ while (likely(!cur.isLeaf()))
+ {
+ /* process nodes */
+ //STAT3(normal.trav_nodes, 1, popcnt(valid_node), K);
+ const NodeRef nodeRef = cur;
+ const AABBNode* __restrict__ const node = nodeRef.getAABBNode();
+
+ vfloat<N> fmin;
+ size_t m_frustum_node = intersectNodeFrustum<N>(node, frustum, fmin);
+
+ if (unlikely(!m_frustum_node)) goto pop;
+ cur = BVH::emptyNode;
+ m_active = 0;
+
+#if defined(__AVX__)
+ //STAT3(normal.trav_hit_boxes[popcnt(m_frustum_node)], 1, 1, 1);
+#endif
+ size_t num_child_hits = 0;
+ do {
+ const size_t i = bscf(m_frustum_node);
+ vfloat<K> lnearP;
+ vbool<K> lhit = false; // motion blur is not supported, so the initial value will be ignored
+ STAT3(normal.trav_nodes, 1, 1, 1);
+ BVHNNodeIntersectorK<N, K, types, robust>::intersect(nodeRef, i, tray, ray.time(), lnearP, lhit);
+
+ if (likely(any(lhit)))
+ {
+ const NodeRef child = node->child(i);
+ assert(child != BVH::emptyNode);
+ BVHN<N>::prefetch(child);
+ if (likely(cur != BVH::emptyNode)) {
+ num_child_hits++;
+ stackPtr->ptr = cur;
+ stackPtr->mask = m_active;
+ stackPtr++;
+ }
+ cur = child;
+ m_active = movemask(lhit);
+ }
+ } while(m_frustum_node);
+
+ if (unlikely(cur == BVH::emptyNode)) goto pop;
+ }
+
+ /* intersect leaf */
+ assert(cur != BVH::invalidNode);
+ assert(cur != BVH::emptyNode);
+#if defined(__AVX__)
+ STAT3(normal.trav_leaves, 1, popcnt(m_active), K);
+#endif
+ if (unlikely(!m_active)) continue;
+ size_t items; const Primitive* prim = (Primitive*)cur.leaf(items);
+
+ size_t lazy_node = 0;
+ terminated |= PrimitiveIntersectorK::occluded(!terminated, This, pre, ray, context, prim, items, tray, lazy_node);
+ octant_valid &= !terminated;
+ if (unlikely(none(octant_valid))) break;
+ tray.tfar = select(terminated, vfloat<K>(neg_inf), tray.tfar); // ignore node intersections for terminated rays
+
+ if (unlikely(lazy_node)) {
+ stackPtr->ptr = lazy_node;
+ stackPtr->mask = movemask(octant_valid);
+ stackPtr++;
+ }
+ }
+ } while(valid_bits);
+
+ vfloat<K>::store(valid & terminated, &ray.tfar, neg_inf);
+ }
+ }
+}
diff --git a/thirdparty/embree/kernels/bvh/bvh_intersector_hybrid4_bvh4.cpp b/thirdparty/embree/kernels/bvh/bvh_intersector_hybrid4_bvh4.cpp
new file mode 100644
index 0000000000..2137da6a25
--- /dev/null
+++ b/thirdparty/embree/kernels/bvh/bvh_intersector_hybrid4_bvh4.cpp
@@ -0,0 +1,59 @@
+// Copyright 2009-2021 Intel Corporation
+// SPDX-License-Identifier: Apache-2.0
+
+#include "bvh_intersector_hybrid.cpp"
+
+namespace embree
+{
+ namespace isa
+ {
+ ////////////////////////////////////////////////////////////////////////////////
+ /// BVH4Intersector4 Definitions
+ ////////////////////////////////////////////////////////////////////////////////
+
+ IF_ENABLED_TRIS(DEFINE_INTERSECTOR4(BVH4Triangle4Intersector4HybridMoeller, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA false COMMA ArrayIntersectorK_1<4 COMMA TriangleMIntersectorKMoeller <4 COMMA 4 COMMA true> > >));
+ IF_ENABLED_TRIS(DEFINE_INTERSECTOR4(BVH4Triangle4Intersector4HybridMoellerNoFilter, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA false COMMA ArrayIntersectorK_1<4 COMMA TriangleMIntersectorKMoeller <4 COMMA 4 COMMA false> > >));
+ IF_ENABLED_TRIS(DEFINE_INTERSECTOR4(BVH4Triangle4iIntersector4HybridMoeller, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA false COMMA ArrayIntersectorK_1<4 COMMA TriangleMiIntersectorKMoeller <4 COMMA 4 COMMA true> > >));
+ IF_ENABLED_TRIS(DEFINE_INTERSECTOR4(BVH4Triangle4vIntersector4HybridPluecker, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA true COMMA ArrayIntersectorK_1<4 COMMA TriangleMvIntersectorKPluecker<4 COMMA 4 COMMA true> > >));
+ IF_ENABLED_TRIS(DEFINE_INTERSECTOR4(BVH4Triangle4iIntersector4HybridPluecker, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA true COMMA ArrayIntersectorK_1<4 COMMA TriangleMiIntersectorKPluecker<4 COMMA 4 COMMA true> > >));
+
+ IF_ENABLED_TRIS(DEFINE_INTERSECTOR4(BVH4Triangle4vMBIntersector4HybridMoeller, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN2_AN4D COMMA false COMMA ArrayIntersectorK_1<4 COMMA TriangleMvMBIntersectorKMoeller <4 COMMA 4 COMMA true> > >));
+ IF_ENABLED_TRIS(DEFINE_INTERSECTOR4(BVH4Triangle4iMBIntersector4HybridMoeller, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN2_AN4D COMMA false COMMA ArrayIntersectorK_1<4 COMMA TriangleMiMBIntersectorKMoeller <4 COMMA 4 COMMA true> > >));
+ IF_ENABLED_TRIS(DEFINE_INTERSECTOR4(BVH4Triangle4vMBIntersector4HybridPluecker, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN2_AN4D COMMA true COMMA ArrayIntersectorK_1<4 COMMA TriangleMvMBIntersectorKPluecker<4 COMMA 4 COMMA true> > >));
+ IF_ENABLED_TRIS(DEFINE_INTERSECTOR4(BVH4Triangle4iMBIntersector4HybridPluecker, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN2_AN4D COMMA true COMMA ArrayIntersectorK_1<4 COMMA TriangleMiMBIntersectorKPluecker<4 COMMA 4 COMMA true> > >));
+
+ IF_ENABLED_QUADS(DEFINE_INTERSECTOR4(BVH4Quad4vIntersector4HybridMoeller, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA false COMMA ArrayIntersectorK_1<4 COMMA QuadMvIntersectorKMoeller <4 COMMA 4 COMMA true > > >));
+ IF_ENABLED_QUADS(DEFINE_INTERSECTOR4(BVH4Quad4vIntersector4HybridMoellerNoFilter,BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA false COMMA ArrayIntersectorK_1<4 COMMA QuadMvIntersectorKMoeller <4 COMMA 4 COMMA false> > >));
+ IF_ENABLED_QUADS(DEFINE_INTERSECTOR4(BVH4Quad4iIntersector4HybridMoeller, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA false COMMA ArrayIntersectorK_1<4 COMMA QuadMiIntersectorKMoeller <4 COMMA 4 COMMA true > > >));
+ IF_ENABLED_QUADS(DEFINE_INTERSECTOR4(BVH4Quad4vIntersector4HybridPluecker, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA true COMMA ArrayIntersectorK_1<4 COMMA QuadMvIntersectorKPluecker<4 COMMA 4 COMMA true > > >));
+ IF_ENABLED_QUADS(DEFINE_INTERSECTOR4(BVH4Quad4iIntersector4HybridPluecker, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA true COMMA ArrayIntersectorK_1<4 COMMA QuadMiIntersectorKPluecker<4 COMMA 4 COMMA true > > >));
+
+ IF_ENABLED_QUADS(DEFINE_INTERSECTOR4(BVH4Quad4iMBIntersector4HybridMoeller, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN2_AN4D COMMA false COMMA ArrayIntersectorK_1<4 COMMA QuadMiMBIntersectorKMoeller <4 COMMA 4 COMMA true > > >));
+ IF_ENABLED_QUADS(DEFINE_INTERSECTOR4(BVH4Quad4iMBIntersector4HybridPluecker,BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN2_AN4D COMMA true COMMA ArrayIntersectorK_1<4 COMMA QuadMiMBIntersectorKPluecker<4 COMMA 4 COMMA true > > >));
+
+ IF_ENABLED_CURVES_OR_POINTS(DEFINE_INTERSECTOR4(BVH4OBBVirtualCurveIntersector4Hybrid, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1_UN1 COMMA false COMMA VirtualCurveIntersectorK<4> >));
+ IF_ENABLED_CURVES_OR_POINTS(DEFINE_INTERSECTOR4(BVH4OBBVirtualCurveIntersector4HybridMB,BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN2_AN4D_UN2 COMMA false COMMA VirtualCurveIntersectorK<4> >));
+
+ IF_ENABLED_CURVES_OR_POINTS(DEFINE_INTERSECTOR4(BVH4OBBVirtualCurveIntersectorRobust4Hybrid, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1_UN1 COMMA true COMMA VirtualCurveIntersectorK<4> >));
+ IF_ENABLED_CURVES_OR_POINTS(DEFINE_INTERSECTOR4(BVH4OBBVirtualCurveIntersectorRobust4HybridMB,BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN2_AN4D_UN2 COMMA true COMMA VirtualCurveIntersectorK<4> >));
+
+ //IF_ENABLED_SUBDIV(DEFINE_INTERSECTOR4(BVH4SubdivPatch1Intersector4, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA true COMMA SubdivPatch1Intersector4>));
+ IF_ENABLED_SUBDIV(DEFINE_INTERSECTOR4(BVH4SubdivPatch1Intersector4, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA true COMMA SubdivPatch1Intersector4>));
+ IF_ENABLED_SUBDIV(DEFINE_INTERSECTOR4(BVH4SubdivPatch1MBIntersector4, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN2_AN4D COMMA false COMMA SubdivPatch1MBIntersector4>));
+ //IF_ENABLED_SUBDIV(DEFINE_INTERSECTOR4(BVH4SubdivPatch1MBIntersector4, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN2_AN4D COMMA false COMMA SubdivPatch1MBIntersector4>));
+
+ IF_ENABLED_USER(DEFINE_INTERSECTOR4(BVH4VirtualIntersector4Chunk, BVHNIntersectorKChunk<4 COMMA 4 COMMA BVH_AN1 COMMA false COMMA ArrayIntersectorK_1<4 COMMA ObjectIntersector4> >));
+ IF_ENABLED_USER(DEFINE_INTERSECTOR4(BVH4VirtualMBIntersector4Chunk, BVHNIntersectorKChunk<4 COMMA 4 COMMA BVH_AN2_AN4D COMMA false COMMA ArrayIntersectorK_1<4 COMMA ObjectIntersector4MB> >));
+
+ IF_ENABLED_INSTANCE(DEFINE_INTERSECTOR4(BVH4InstanceIntersector4Chunk, BVHNIntersectorKChunk<4 COMMA 4 COMMA BVH_AN1 COMMA false COMMA ArrayIntersectorK_1<4 COMMA InstanceIntersectorK<4>> >));
+ IF_ENABLED_INSTANCE(DEFINE_INTERSECTOR4(BVH4InstanceMBIntersector4Chunk, BVHNIntersectorKChunk<4 COMMA 4 COMMA BVH_AN2_AN4D COMMA false COMMA ArrayIntersectorK_1<4 COMMA InstanceIntersectorKMB<4>> >));
+
+ IF_ENABLED_GRIDS(DEFINE_INTERSECTOR4(BVH4GridIntersector4HybridMoeller, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA false COMMA SubGridIntersectorKMoeller <4 COMMA 4 COMMA true> >));
+ //IF_ENABLED_GRIDS(DEFINE_INTERSECTOR4(BVH4GridIntersector4HybridMoeller, BVHNIntersectorKChunk<4 COMMA 4 COMMA BVH_AN1 COMMA false COMMA SubGridIntersectorKMoeller <4 COMMA 4 COMMA true> >));
+
+ IF_ENABLED_GRIDS(DEFINE_INTERSECTOR4(BVH4GridMBIntersector4HybridMoeller, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN2_AN4D COMMA true COMMA SubGridMBIntersectorKPluecker <4 COMMA 4 COMMA true> >));
+ IF_ENABLED_GRIDS(DEFINE_INTERSECTOR4(BVH4GridIntersector4HybridPluecker, BVHNIntersectorKHybrid<4 COMMA 4 COMMA BVH_AN1 COMMA true COMMA SubGridIntersectorKPluecker <4 COMMA 4 COMMA true> >));
+
+ }
+}
+
diff --git a/thirdparty/embree/kernels/bvh/bvh_intersector_stream.cpp b/thirdparty/embree/kernels/bvh/bvh_intersector_stream.cpp
new file mode 100644
index 0000000000..4a74d8468d
--- /dev/null
+++ b/thirdparty/embree/kernels/bvh/bvh_intersector_stream.cpp
@@ -0,0 +1,528 @@
+// Copyright 2009-2021 Intel Corporation
+// SPDX-License-Identifier: Apache-2.0
+
+#include "bvh_intersector_stream.h"
+
+#include "../geometry/intersector_iterators.h"
+#include "../geometry/triangle_intersector.h"
+#include "../geometry/trianglev_intersector.h"
+#include "../geometry/trianglev_mb_intersector.h"
+#include "../geometry/trianglei_intersector.h"
+#include "../geometry/quadv_intersector.h"
+#include "../geometry/quadi_intersector.h"
+#include "../geometry/linei_intersector.h"
+#include "../geometry/subdivpatch1_intersector.h"
+#include "../geometry/object_intersector.h"
+#include "../geometry/instance_intersector.h"
+
+#include "../common/scene.h"
+#include <bitset>
+
+namespace embree
+{
+ namespace isa
+ {
+ __aligned(64) static const int shiftTable[32] = {
+ (int)1 << 0, (int)1 << 1, (int)1 << 2, (int)1 << 3, (int)1 << 4, (int)1 << 5, (int)1 << 6, (int)1 << 7,
+ (int)1 << 8, (int)1 << 9, (int)1 << 10, (int)1 << 11, (int)1 << 12, (int)1 << 13, (int)1 << 14, (int)1 << 15,
+ (int)1 << 16, (int)1 << 17, (int)1 << 18, (int)1 << 19, (int)1 << 20, (int)1 << 21, (int)1 << 22, (int)1 << 23,
+ (int)1 << 24, (int)1 << 25, (int)1 << 26, (int)1 << 27, (int)1 << 28, (int)1 << 29, (int)1 << 30, (int)1 << 31
+ };
+
+ template<int N, int types, bool robust, typename PrimitiveIntersector>
+ __forceinline void BVHNIntersectorStream<N, types, robust, PrimitiveIntersector>::intersect(Accel::Intersectors* __restrict__ This,
+ RayHitN** inputPackets,
+ size_t numOctantRays,
+ IntersectContext* context)
+ {
+ /* we may traverse an empty BVH in case all geometry was invalid */
+ BVH* __restrict__ bvh = (BVH*) This->ptr;
+ if (bvh->root == BVH::emptyNode)
+ return;
+
+ // Only the coherent code path is implemented
+ assert(context->isCoherent());
+ intersectCoherent(This, (RayHitK<VSIZEL>**)inputPackets, numOctantRays, context);
+ }
+
+ template<int N, int types, bool robust, typename PrimitiveIntersector>
+ template<int K>
+ __forceinline void BVHNIntersectorStream<N, types, robust, PrimitiveIntersector>::intersectCoherent(Accel::Intersectors* __restrict__ This,
+ RayHitK<K>** inputPackets,
+ size_t numOctantRays,
+ IntersectContext* context)
+ {
+ assert(context->isCoherent());
+
+ BVH* __restrict__ bvh = (BVH*) This->ptr;
+ __aligned(64) StackItemMaskCoherent stack[stackSizeSingle]; // stack of nodes
+ assert(numOctantRays <= MAX_INTERNAL_STREAM_SIZE);
+
+ __aligned(64) TravRayKStream<K, robust> packets[MAX_INTERNAL_STREAM_SIZE/K];
+ __aligned(64) Frustum<robust> frustum;
+
+ bool commonOctant = true;
+ const size_t m_active = initPacketsAndFrustum((RayK<K>**)inputPackets, numOctantRays, packets, frustum, commonOctant);
+ if (unlikely(m_active == 0)) return;
+
+ /* case of non-common origin */
+ if (unlikely(!commonOctant))
+ {
+ const size_t numPackets = (numOctantRays+K-1)/K;
+ for (size_t i = 0; i < numPackets; i++)
+ This->intersect(inputPackets[i]->tnear() <= inputPackets[i]->tfar, *inputPackets[i], context);
+ return;
+ }
+
+ stack[0].mask = m_active;
+ stack[0].parent = 0;
+ stack[0].child = bvh->root;
+
+ ///////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////
+
+ StackItemMaskCoherent* stackPtr = stack + 1;
+
+ while (1) pop:
+ {
+ if (unlikely(stackPtr == stack)) break;
+
+ STAT3(normal.trav_stack_pop,1,1,1);
+ stackPtr--;
+ /*! pop next node */
+ NodeRef cur = NodeRef(stackPtr->child);
+ size_t m_trav_active = stackPtr->mask;
+ assert(m_trav_active);
+ NodeRef parent = stackPtr->parent;
+
+ while (1)
+ {
+ if (unlikely(cur.isLeaf())) break;
+ const AABBNode* __restrict__ const node = cur.getAABBNode();
+ parent = cur;
+
+ __aligned(64) size_t maskK[N];
+ for (size_t i = 0; i < N; i++)
+ maskK[i] = m_trav_active;
+ vfloat<N> dist;
+ const size_t m_node_hit = traverseCoherentStream(m_trav_active, packets, node, frustum, maskK, dist);
+ if (unlikely(m_node_hit == 0)) goto pop;
+
+ BVHNNodeTraverserStreamHitCoherent<N, types>::traverseClosestHit(cur, m_trav_active, vbool<N>((int)m_node_hit), dist, (size_t*)maskK, stackPtr);
+ assert(m_trav_active);
+ }
+
+ /* non-root and leaf => full culling test for all rays */
+ if (unlikely(parent != 0 && cur.isLeaf()))
+ {
+ const AABBNode* __restrict__ const node = parent.getAABBNode();
+ size_t boxID = 0xff;
+ for (size_t i = 0; i < N; i++)
+ if (node->child(i) == cur) { boxID = i; break; }
+ assert(boxID < N);
+ assert(cur == node->child(boxID));
+ m_trav_active = intersectAABBNodePacket(m_trav_active, packets, node, boxID, frustum.nf);
+ }
+
+ /*! this is a leaf node */
+ assert(cur != BVH::emptyNode);
+ STAT3(normal.trav_leaves, 1, 1, 1);
+ size_t num; PrimitiveK<K>* prim = (PrimitiveK<K>*)cur.leaf(num);
+
+ size_t bits = m_trav_active;
+
+ /*! intersect stream of rays with all primitives */
+ size_t lazy_node = 0;
+#if defined(__SSE4_2__)
+ STAT_USER(1,(popcnt(bits)+K-1)/K*4);
+#endif
+ while(bits)
+ {
+ size_t i = bsf(bits) / K;
+ const size_t m_isec = ((((size_t)1 << K)-1) << (i*K));
+ assert(m_isec & bits);
+ bits &= ~m_isec;
+
+ TravRayKStream<K, robust>& p = packets[i];
+ vbool<K> m_valid = p.tnear <= p.tfar;
+ PrimitiveIntersectorK<K>::intersectK(m_valid, This, *inputPackets[i], context, prim, num, lazy_node);
+ p.tfar = min(p.tfar, inputPackets[i]->tfar);
+ };
+
+ } // traversal + intersection
+ }
+
+ template<int N, int types, bool robust, typename PrimitiveIntersector>
+ __forceinline void BVHNIntersectorStream<N, types, robust, PrimitiveIntersector>::occluded(Accel::Intersectors* __restrict__ This,
+ RayN** inputPackets,
+ size_t numOctantRays,
+ IntersectContext* context)
+ {
+ /* we may traverse an empty BVH in case all geometry was invalid */
+ BVH* __restrict__ bvh = (BVH*) This->ptr;
+ if (bvh->root == BVH::emptyNode)
+ return;
+
+ if (unlikely(context->isCoherent()))
+ occludedCoherent(This, (RayK<VSIZEL>**)inputPackets, numOctantRays, context);
+ else
+ occludedIncoherent(This, (RayK<VSIZEX>**)inputPackets, numOctantRays, context);
+ }
+
+ template<int N, int types, bool robust, typename PrimitiveIntersector>
+ template<int K>
+ __noinline void BVHNIntersectorStream<N, types, robust, PrimitiveIntersector>::occludedCoherent(Accel::Intersectors* __restrict__ This,
+ RayK<K>** inputPackets,
+ size_t numOctantRays,
+ IntersectContext* context)
+ {
+ assert(context->isCoherent());
+
+ BVH* __restrict__ bvh = (BVH*)This->ptr;
+ __aligned(64) StackItemMaskCoherent stack[stackSizeSingle]; // stack of nodes
+ assert(numOctantRays <= MAX_INTERNAL_STREAM_SIZE);
+
+ /* inactive rays should have been filtered out before */
+ __aligned(64) TravRayKStream<K, robust> packets[MAX_INTERNAL_STREAM_SIZE/K];
+ __aligned(64) Frustum<robust> frustum;
+
+ bool commonOctant = true;
+ size_t m_active = initPacketsAndFrustum(inputPackets, numOctantRays, packets, frustum, commonOctant);
+
+ /* valid rays */
+ if (unlikely(m_active == 0)) return;
+
+ /* case of non-common origin */
+ if (unlikely(!commonOctant))
+ {
+ const size_t numPackets = (numOctantRays+K-1)/K;
+ for (size_t i = 0; i < numPackets; i++)
+ This->occluded(inputPackets[i]->tnear() <= inputPackets[i]->tfar, *inputPackets[i], context);
+ return;
+ }
+
+ stack[0].mask = m_active;
+ stack[0].parent = 0;
+ stack[0].child = bvh->root;
+
+ ///////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////
+
+ StackItemMaskCoherent* stackPtr = stack + 1;
+
+ while (1) pop:
+ {
+ if (unlikely(stackPtr == stack)) break;
+
+ STAT3(normal.trav_stack_pop,1,1,1);
+ stackPtr--;
+ /*! pop next node */
+ NodeRef cur = NodeRef(stackPtr->child);
+ size_t m_trav_active = stackPtr->mask & m_active;
+ if (unlikely(!m_trav_active)) continue;
+ assert(m_trav_active);
+ NodeRef parent = stackPtr->parent;
+
+ while (1)
+ {
+ if (unlikely(cur.isLeaf())) break;
+ const AABBNode* __restrict__ const node = cur.getAABBNode();
+ parent = cur;
+
+ __aligned(64) size_t maskK[N];
+ for (size_t i = 0; i < N; i++)
+ maskK[i] = m_trav_active;
+
+ vfloat<N> dist;
+ const size_t m_node_hit = traverseCoherentStream(m_trav_active, packets, node, frustum, maskK, dist);
+ if (unlikely(m_node_hit == 0)) goto pop;
+
+ BVHNNodeTraverserStreamHitCoherent<N, types>::traverseAnyHit(cur, m_trav_active, vbool<N>((int)m_node_hit), (size_t*)maskK, stackPtr);
+ assert(m_trav_active);
+ }
+
+ /* non-root and leaf => full culling test for all rays */
+ if (unlikely(parent != 0 && cur.isLeaf()))
+ {
+ const AABBNode* __restrict__ const node = parent.getAABBNode();
+ size_t boxID = 0xff;
+ for (size_t i = 0; i < N; i++)
+ if (node->child(i) == cur) { boxID = i; break; }
+ assert(boxID < N);
+ assert(cur == node->child(boxID));
+ m_trav_active = intersectAABBNodePacket(m_trav_active, packets, node, boxID, frustum.nf);
+ }
+
+ /*! this is a leaf node */
+ assert(cur != BVH::emptyNode);
+ STAT3(normal.trav_leaves, 1, 1, 1);
+ size_t num; PrimitiveK<K>* prim = (PrimitiveK<K>*)cur.leaf(num);
+
+ size_t bits = m_trav_active & m_active;
+ /*! intersect stream of rays with all primitives */
+ size_t lazy_node = 0;
+#if defined(__SSE4_2__)
+ STAT_USER(1,(popcnt(bits)+K-1)/K*4);
+#endif
+ while (bits)
+ {
+ size_t i = bsf(bits) / K;
+ const size_t m_isec = ((((size_t)1 << K)-1) << (i*K));
+ assert(m_isec & bits);
+ bits &= ~m_isec;
+ TravRayKStream<K, robust>& p = packets[i];
+ vbool<K> m_valid = p.tnear <= p.tfar;
+ vbool<K> m_hit = PrimitiveIntersectorK<K>::occludedK(m_valid, This, *inputPackets[i], context, prim, num, lazy_node);
+ inputPackets[i]->tfar = select(m_hit & m_valid, vfloat<K>(neg_inf), inputPackets[i]->tfar);
+ m_active &= ~((size_t)movemask(m_hit) << (i*K));
+ }
+
+ } // traversal + intersection
+ }
+
+
+ template<int N, int types, bool robust, typename PrimitiveIntersector>
+ template<int K>
+ __forceinline void BVHNIntersectorStream<N, types, robust, PrimitiveIntersector>::occludedIncoherent(Accel::Intersectors* __restrict__ This,
+ RayK<K>** inputPackets,
+ size_t numOctantRays,
+ IntersectContext* context)
+ {
+ assert(!context->isCoherent());
+ assert(types & BVH_FLAG_ALIGNED_NODE);
+
+ __aligned(64) TravRayKStream<K,robust> packet[MAX_INTERNAL_STREAM_SIZE/K];
+
+ assert(numOctantRays <= 32);
+ const size_t numPackets = (numOctantRays+K-1)/K;
+ size_t m_active = 0;
+ for (size_t i = 0; i < numPackets; i++)
+ {
+ const vfloat<K> tnear = inputPackets[i]->tnear();
+ const vfloat<K> tfar = inputPackets[i]->tfar;
+ vbool<K> m_valid = (tnear <= tfar) & (tnear >= 0.0f);
+ m_active |= (size_t)movemask(m_valid) << (K*i);
+ const Vec3vf<K>& org = inputPackets[i]->org;
+ const Vec3vf<K>& dir = inputPackets[i]->dir;
+ vfloat<K> packet_min_dist = max(tnear, 0.0f);
+ vfloat<K> packet_max_dist = select(m_valid, tfar, neg_inf);
+ new (&packet[i]) TravRayKStream<K,robust>(org, dir, packet_min_dist, packet_max_dist);
+ }
+
+ BVH* __restrict__ bvh = (BVH*)This->ptr;
+
+ StackItemMaskT<NodeRef> stack[stackSizeSingle]; // stack of nodes
+ StackItemMaskT<NodeRef>* stackPtr = stack + 1; // current stack pointer
+ stack[0].ptr = bvh->root;
+ stack[0].mask = m_active;
+
+ size_t terminated = ~m_active;
+
+ /* near/far offsets based on first ray */
+ const NearFarPrecalculations nf(Vec3fa(packet[0].rdir.x[0], packet[0].rdir.y[0], packet[0].rdir.z[0]), N);
+
+ while (1) pop:
+ {
+ if (unlikely(stackPtr == stack)) break;
+ STAT3(shadow.trav_stack_pop,1,1,1);
+ stackPtr--;
+ NodeRef cur = NodeRef(stackPtr->ptr);
+ size_t cur_mask = stackPtr->mask & (~terminated);
+ if (unlikely(cur_mask == 0)) continue;
+
+ while (true)
+ {
+ /*! stop if we found a leaf node */
+ if (unlikely(cur.isLeaf())) break;
+ const AABBNode* __restrict__ const node = cur.getAABBNode();
+
+ const vint<N> vmask = traverseIncoherentStream(cur_mask, packet, node, nf, shiftTable);
+
+ size_t mask = movemask(vmask != vint<N>(zero));
+ if (unlikely(mask == 0)) goto pop;
+
+ __aligned(64) unsigned int child_mask[N];
+ vint<N>::storeu(child_mask, vmask); // this explicit store here causes much better code generation
+
+ /*! one child is hit, continue with that child */
+ size_t r = bscf(mask);
+ assert(r < N);
+ cur = node->child(r);
+ BVHN<N>::prefetch(cur,types);
+ cur_mask = child_mask[r];
+
+ /* simple in order sequence */
+ assert(cur != BVH::emptyNode);
+ if (likely(mask == 0)) continue;
+ stackPtr->ptr = cur;
+ stackPtr->mask = cur_mask;
+ stackPtr++;
+
+ for (; ;)
+ {
+ r = bscf(mask);
+ assert(r < N);
+
+ cur = node->child(r);
+ BVHN<N>::prefetch(cur,types);
+ cur_mask = child_mask[r];
+ assert(cur != BVH::emptyNode);
+ if (likely(mask == 0)) break;
+ stackPtr->ptr = cur;
+ stackPtr->mask = cur_mask;
+ stackPtr++;
+ }
+ }
+
+ /*! this is a leaf node */
+ assert(cur != BVH::emptyNode);
+ STAT3(shadow.trav_leaves,1,1,1);
+ size_t num; PrimitiveK<K>* prim = (PrimitiveK<K>*)cur.leaf(num);
+
+ size_t bits = cur_mask;
+ size_t lazy_node = 0;
+
+ for (; bits != 0;)
+ {
+ const size_t rayID = bscf(bits);
+
+ RayK<K> &ray = *inputPackets[rayID / K];
+ const size_t k = rayID % K;
+ if (PrimitiveIntersectorK<K>::occluded(This, ray, k, context, prim, num, lazy_node))
+ {
+ ray.tfar[k] = neg_inf;
+ terminated |= (size_t)1 << rayID;
+ }
+
+ /* lazy node */
+ if (unlikely(lazy_node))
+ {
+ stackPtr->ptr = lazy_node;
+ stackPtr->mask = cur_mask;
+ stackPtr++;
+ }
+ }
+
+ if (unlikely(terminated == (size_t)-1)) break;
+ }
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// ArrayIntersectorKStream Definitions
+ ////////////////////////////////////////////////////////////////////////////////
+
+ template<bool filter>
+ struct Triangle4IntersectorStreamMoeller {
+ template<int K> using Type = ArrayIntersectorKStream<K,TriangleMIntersectorKMoeller<4 COMMA K COMMA true>>;
+ };
+
+ template<bool filter>
+ struct Triangle4vIntersectorStreamPluecker {
+ template<int K> using Type = ArrayIntersectorKStream<K,TriangleMvIntersectorKPluecker<4 COMMA K COMMA true>>;
+ };
+
+ template<bool filter>
+ struct Triangle4iIntersectorStreamMoeller {
+ template<int K> using Type = ArrayIntersectorKStream<K,TriangleMiIntersectorKMoeller<4 COMMA K COMMA true>>;
+ };
+
+ template<bool filter>
+ struct Triangle4iIntersectorStreamPluecker {
+ template<int K> using Type = ArrayIntersectorKStream<K,TriangleMiIntersectorKPluecker<4 COMMA K COMMA true>>;
+ };
+
+ template<bool filter>
+ struct Quad4vIntersectorStreamMoeller {
+ template<int K> using Type = ArrayIntersectorKStream<K,QuadMvIntersectorKMoeller<4 COMMA K COMMA true>>;
+ };
+
+ template<bool filter>
+ struct Quad4iIntersectorStreamMoeller {
+ template<int K> using Type = ArrayIntersectorKStream<K,QuadMiIntersectorKMoeller<4 COMMA K COMMA true>>;
+ };
+
+ template<bool filter>
+ struct Quad4vIntersectorStreamPluecker {
+ template<int K> using Type = ArrayIntersectorKStream<K,QuadMvIntersectorKPluecker<4 COMMA K COMMA true>>;
+ };
+
+ template<bool filter>
+ struct Quad4iIntersectorStreamPluecker {
+ template<int K> using Type = ArrayIntersectorKStream<K,QuadMiIntersectorKPluecker<4 COMMA K COMMA true>>;
+ };
+
+ struct ObjectIntersectorStream {
+ template<int K> using Type = ArrayIntersectorKStream<K,ObjectIntersectorK<K COMMA false>>;
+ };
+
+ struct InstanceIntersectorStream {
+ template<int K> using Type = ArrayIntersectorKStream<K,InstanceIntersectorK<K>>;
+ };
+
+ // =====================================================================================================
+ // =====================================================================================================
+ // =====================================================================================================
+
+ template<int N>
+ void BVHNIntersectorStreamPacketFallback<N>::intersect(Accel::Intersectors* __restrict__ This,
+ RayHitN** inputRays,
+ size_t numTotalRays,
+ IntersectContext* context)
+ {
+ if (unlikely(context->isCoherent()))
+ intersectK(This, (RayHitK<VSIZEL>**)inputRays, numTotalRays, context);
+ else
+ intersectK(This, (RayHitK<VSIZEX>**)inputRays, numTotalRays, context);
+ }
+
+ template<int N>
+ void BVHNIntersectorStreamPacketFallback<N>::occluded(Accel::Intersectors* __restrict__ This,
+ RayN** inputRays,
+ size_t numTotalRays,
+ IntersectContext* context)
+ {
+ if (unlikely(context->isCoherent()))
+ occludedK(This, (RayK<VSIZEL>**)inputRays, numTotalRays, context);
+ else
+ occludedK(This, (RayK<VSIZEX>**)inputRays, numTotalRays, context);
+ }
+
+ template<int N>
+ template<int K>
+ __noinline void BVHNIntersectorStreamPacketFallback<N>::intersectK(Accel::Intersectors* __restrict__ This,
+ RayHitK<K>** inputRays,
+ size_t numTotalRays,
+ IntersectContext* context)
+ {
+ /* fallback to packets */
+ for (size_t i = 0; i < numTotalRays; i += K)
+ {
+ const vint<K> vi = vint<K>(int(i)) + vint<K>(step);
+ vbool<K> valid = vi < vint<K>(int(numTotalRays));
+ RayHitK<K>& ray = *(inputRays[i / K]);
+ valid &= ray.tnear() <= ray.tfar;
+ This->intersect(valid, ray, context);
+ }
+ }
+
+ template<int N>
+ template<int K>
+ __noinline void BVHNIntersectorStreamPacketFallback<N>::occludedK(Accel::Intersectors* __restrict__ This,
+ RayK<K>** inputRays,
+ size_t numTotalRays,
+ IntersectContext* context)
+ {
+ /* fallback to packets */
+ for (size_t i = 0; i < numTotalRays; i += K)
+ {
+ const vint<K> vi = vint<K>(int(i)) + vint<K>(step);
+ vbool<K> valid = vi < vint<K>(int(numTotalRays));
+ RayK<K>& ray = *(inputRays[i / K]);
+ valid &= ray.tnear() <= ray.tfar;
+ This->occluded(valid, ray, context);
+ }
+ }
+ }
+}
diff --git a/thirdparty/embree/kernels/bvh/bvh_intersector_stream_bvh4.cpp b/thirdparty/embree/kernels/bvh/bvh_intersector_stream_bvh4.cpp
new file mode 100644
index 0000000000..c3e5f137b8
--- /dev/null
+++ b/thirdparty/embree/kernels/bvh/bvh_intersector_stream_bvh4.cpp
@@ -0,0 +1,36 @@
+// Copyright 2009-2021 Intel Corporation
+// SPDX-License-Identifier: Apache-2.0
+
+#include "bvh_intersector_stream.cpp"
+
+namespace embree
+{
+ namespace isa
+ {
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// General BVHIntersectorStreamPacketFallback Intersector
+ ////////////////////////////////////////////////////////////////////////////////
+
+ DEFINE_INTERSECTORN(BVH4IntersectorStreamPacketFallback,BVHNIntersectorStreamPacketFallback<4>);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ /// BVH4IntersectorStream Definitions
+ ////////////////////////////////////////////////////////////////////////////////
+
+ IF_ENABLED_TRIS(DEFINE_INTERSECTORN(BVH4Triangle4iIntersectorStreamMoeller, BVHNIntersectorStream<4 COMMA BVH_AN1 COMMA false COMMA Triangle4iIntersectorStreamMoeller<true>>));
+ IF_ENABLED_TRIS(DEFINE_INTERSECTORN(BVH4Triangle4vIntersectorStreamPluecker, BVHNIntersectorStream<4 COMMA BVH_AN1 COMMA true COMMA Triangle4vIntersectorStreamPluecker<true>>));
+ IF_ENABLED_TRIS(DEFINE_INTERSECTORN(BVH4Triangle4iIntersectorStreamPluecker, BVHNIntersectorStream<4 COMMA BVH_AN1 COMMA true COMMA Triangle4iIntersectorStreamPluecker<true>>));
+ IF_ENABLED_TRIS(DEFINE_INTERSECTORN(BVH4Triangle4IntersectorStreamMoeller, BVHNIntersectorStream<4 COMMA BVH_AN1 COMMA false COMMA Triangle4IntersectorStreamMoeller<true>>));
+ IF_ENABLED_TRIS(DEFINE_INTERSECTORN(BVH4Triangle4IntersectorStreamMoellerNoFilter, BVHNIntersectorStream<4 COMMA BVH_AN1 COMMA false COMMA Triangle4IntersectorStreamMoeller<false>>));
+
+ IF_ENABLED_QUADS(DEFINE_INTERSECTORN(BVH4Quad4vIntersectorStreamMoeller, BVHNIntersectorStream<4 COMMA BVH_AN1 COMMA false COMMA Quad4vIntersectorStreamMoeller<true>>));
+ IF_ENABLED_QUADS(DEFINE_INTERSECTORN(BVH4Quad4vIntersectorStreamMoellerNoFilter,BVHNIntersectorStream<4 COMMA BVH_AN1 COMMA false COMMA Quad4vIntersectorStreamMoeller<false>>));
+ IF_ENABLED_QUADS(DEFINE_INTERSECTORN(BVH4Quad4iIntersectorStreamMoeller, BVHNIntersectorStream<4 COMMA BVH_AN1 COMMA false COMMA Quad4iIntersectorStreamMoeller<true>>));
+ IF_ENABLED_QUADS(DEFINE_INTERSECTORN(BVH4Quad4vIntersectorStreamPluecker, BVHNIntersectorStream<4 COMMA BVH_AN1 COMMA true COMMA Quad4vIntersectorStreamPluecker<true>>));
+ IF_ENABLED_QUADS(DEFINE_INTERSECTORN(BVH4Quad4iIntersectorStreamPluecker, BVHNIntersectorStream<4 COMMA BVH_AN1 COMMA true COMMA Quad4iIntersectorStreamPluecker<true>>));
+
+ IF_ENABLED_USER(DEFINE_INTERSECTORN(BVH4VirtualIntersectorStream,BVHNIntersectorStream<4 COMMA BVH_AN1 COMMA false COMMA ObjectIntersectorStream>));
+ IF_ENABLED_INSTANCE(DEFINE_INTERSECTORN(BVH4InstanceIntersectorStream,BVHNIntersectorStream<4 COMMA BVH_AN1 COMMA false COMMA InstanceIntersectorStream>));
+ }
+}
diff --git a/thirdparty/embree/kernels/bvh/bvh_intersector_stream_filters.cpp b/thirdparty/embree/kernels/bvh/bvh_intersector_stream_filters.cpp
new file mode 100644
index 0000000000..b858eb163f
--- /dev/null
+++ b/thirdparty/embree/kernels/bvh/bvh_intersector_stream_filters.cpp
@@ -0,0 +1,657 @@
+// Copyright 2009-2021 Intel Corporation
+// SPDX-License-Identifier: Apache-2.0
+
+#include "bvh_intersector_stream_filters.h"
+#include "bvh_intersector_stream.h"
+
+namespace embree
+{
+ namespace isa
+ {
+ template<int K, bool intersect>
+ __noinline void RayStreamFilter::filterAOS(Scene* scene, void* _rayN, size_t N, size_t stride, IntersectContext* context)
+ {
+ RayStreamAOS rayN(_rayN);
+
+ /* use fast path for coherent ray mode */
+ if (unlikely(context->isCoherent()))
+ {
+ __aligned(64) RayTypeK<K, intersect> rays[MAX_INTERNAL_STREAM_SIZE / K];
+ __aligned(64) RayTypeK<K, intersect>* rayPtrs[MAX_INTERNAL_STREAM_SIZE / K];
+
+ for (size_t i = 0; i < N; i += MAX_INTERNAL_STREAM_SIZE)
+ {
+ const size_t size = min(N - i, MAX_INTERNAL_STREAM_SIZE);
+
+ /* convert from AOS to SOA */
+ for (size_t j = 0; j < size; j += K)
+ {
+ const vint<K> vij = vint<K>(int(i+j)) + vint<K>(step);
+ const vbool<K> valid = vij < vint<K>(int(N));
+ const vint<K> offset = vij * int(stride);
+ const size_t packetIndex = j / K;
+
+ RayTypeK<K, intersect> ray = rayN.getRayByOffset<K>(valid, offset);
+ ray.tnear() = select(valid, ray.tnear(), zero);
+ ray.tfar = select(valid, ray.tfar, neg_inf);
+
+ rays[packetIndex] = ray;
+ rayPtrs[packetIndex] = &rays[packetIndex]; // rayPtrs might get reordered for occludedN
+ }
+
+ /* trace stream */
+ scene->intersectors.intersectN(rayPtrs, size, context);
+
+ /* convert from SOA to AOS */
+ for (size_t j = 0; j < size; j += K)
+ {
+ const vint<K> vij = vint<K>(int(i+j)) + vint<K>(step);
+ const vbool<K> valid = vij < vint<K>(int(N));
+ const vint<K> offset = vij * int(stride);
+ const size_t packetIndex = j / K;
+ rayN.setHitByOffset(valid, offset, rays[packetIndex]);
+ }
+ }
+ }
+ else if (unlikely(!intersect))
+ {
+ /* octant sorting for occlusion rays */
+ __aligned(64) unsigned int octants[8][MAX_INTERNAL_STREAM_SIZE];
+ __aligned(64) RayK<K> rays[MAX_INTERNAL_STREAM_SIZE / K];
+ __aligned(64) RayK<K>* rayPtrs[MAX_INTERNAL_STREAM_SIZE / K];
+
+ unsigned int raysInOctant[8];
+ for (unsigned int i = 0; i < 8; i++)
+ raysInOctant[i] = 0;
+ size_t inputRayID = 0;
+
+ for (;;)
+ {
+ int curOctant = -1;
+
+ /* sort rays into octants */
+ for (; inputRayID < N;)
+ {
+ const Ray& ray = rayN.getRayByOffset(inputRayID * stride);
+
+ /* skip invalid rays */
+ if (unlikely(ray.tnear() > ray.tfar || ray.tfar < 0.0f)) { inputRayID++; continue; } // ignore invalid or already occluded rays
+#if defined(EMBREE_IGNORE_INVALID_RAYS)
+ if (unlikely(!ray.valid())) { inputRayID++; continue; }
+#endif
+
+ const unsigned int octantID = movemask(vfloat4(Vec3fa(ray.dir)) < 0.0f) & 0x7;
+
+ assert(octantID < 8);
+ octants[octantID][raysInOctant[octantID]++] = (unsigned int)inputRayID;
+ inputRayID++;
+ if (unlikely(raysInOctant[octantID] == MAX_INTERNAL_STREAM_SIZE))
+ {
+ curOctant = octantID;
+ break;
+ }
+ }
+
+ /* need to flush rays in octant? */
+ if (unlikely(curOctant == -1))
+ {
+ for (unsigned int i = 0; i < 8; i++)
+ if (raysInOctant[i]) { curOctant = i; break; }
+ }
+
+ /* all rays traced? */
+ if (unlikely(curOctant == -1))
+ break;
+
+ unsigned int* const rayIDs = &octants[curOctant][0];
+ const unsigned int numOctantRays = raysInOctant[curOctant];
+ assert(numOctantRays);
+
+ for (unsigned int j = 0; j < numOctantRays; j += K)
+ {
+ const vint<K> vi = vint<K>(int(j)) + vint<K>(step);
+ const vbool<K> valid = vi < vint<K>(int(numOctantRays));
+ const vint<K> offset = *(vint<K>*)&rayIDs[j] * int(stride);
+ RayK<K>& ray = rays[j/K];
+ rayPtrs[j/K] = &ray;
+ ray = rayN.getRayByOffset<K>(valid, offset);
+ ray.tnear() = select(valid, ray.tnear(), zero);
+ ray.tfar = select(valid, ray.tfar, neg_inf);
+ }
+
+ scene->intersectors.occludedN(rayPtrs, numOctantRays, context);
+
+ for (unsigned int j = 0; j < numOctantRays; j += K)
+ {
+ const vint<K> vi = vint<K>(int(j)) + vint<K>(step);
+ const vbool<K> valid = vi < vint<K>(int(numOctantRays));
+ const vint<K> offset = *(vint<K>*)&rayIDs[j] * int(stride);
+ rayN.setHitByOffset<K>(valid, offset, rays[j/K]);
+ }
+
+ raysInOctant[curOctant] = 0;
+ }
+ }
+ else
+ {
+ /* fallback to packets */
+ for (size_t i = 0; i < N; i += K)
+ {
+ const vint<K> vi = vint<K>(int(i)) + vint<K>(step);
+ vbool<K> valid = vi < vint<K>(int(N));
+ const vint<K> offset = vi * int(stride);
+
+ RayTypeK<K, intersect> ray = rayN.getRayByOffset<K>(valid, offset);
+ valid &= ray.tnear() <= ray.tfar;
+
+ scene->intersectors.intersect(valid, ray, context);
+
+ rayN.setHitByOffset<K>(valid, offset, ray);
+ }
+ }
+ }
+
+ template<int K, bool intersect>
+ __noinline void RayStreamFilter::filterAOP(Scene* scene, void** _rayN, size_t N, IntersectContext* context)
+ {
+ RayStreamAOP rayN(_rayN);
+
+ /* use fast path for coherent ray mode */
+ if (unlikely(context->isCoherent()))
+ {
+ __aligned(64) RayTypeK<K, intersect> rays[MAX_INTERNAL_STREAM_SIZE / K];
+ __aligned(64) RayTypeK<K, intersect>* rayPtrs[MAX_INTERNAL_STREAM_SIZE / K];
+
+ for (size_t i = 0; i < N; i += MAX_INTERNAL_STREAM_SIZE)
+ {
+ const size_t size = min(N - i, MAX_INTERNAL_STREAM_SIZE);
+
+ /* convert from AOP to SOA */
+ for (size_t j = 0; j < size; j += K)
+ {
+ const vint<K> vij = vint<K>(int(i+j)) + vint<K>(step);
+ const vbool<K> valid = vij < vint<K>(int(N));
+ const size_t packetIndex = j / K;
+
+ RayTypeK<K, intersect> ray = rayN.getRayByIndex<K>(valid, vij);
+ ray.tnear() = select(valid, ray.tnear(), zero);
+ ray.tfar = select(valid, ray.tfar, neg_inf);
+
+ rays[packetIndex] = ray;
+ rayPtrs[packetIndex] = &rays[packetIndex]; // rayPtrs might get reordered for occludedN
+ }
+
+ /* trace stream */
+ scene->intersectors.intersectN(rayPtrs, size, context);
+
+ /* convert from SOA to AOP */
+ for (size_t j = 0; j < size; j += K)
+ {
+ const vint<K> vij = vint<K>(int(i+j)) + vint<K>(step);
+ const vbool<K> valid = vij < vint<K>(int(N));
+ const size_t packetIndex = j / K;
+
+ rayN.setHitByIndex<K>(valid, vij, rays[packetIndex]);
+ }
+ }
+ }
+ else if (unlikely(!intersect))
+ {
+ /* octant sorting for occlusion rays */
+ __aligned(64) unsigned int octants[8][MAX_INTERNAL_STREAM_SIZE];
+ __aligned(64) RayK<K> rays[MAX_INTERNAL_STREAM_SIZE / K];
+ __aligned(64) RayK<K>* rayPtrs[MAX_INTERNAL_STREAM_SIZE / K];
+
+ unsigned int raysInOctant[8];
+ for (unsigned int i = 0; i < 8; i++)
+ raysInOctant[i] = 0;
+ size_t inputRayID = 0;
+
+ for (;;)
+ {
+ int curOctant = -1;
+
+ /* sort rays into octants */
+ for (; inputRayID < N;)
+ {
+ const Ray& ray = rayN.getRayByIndex(inputRayID);
+
+ /* skip invalid rays */
+ if (unlikely(ray.tnear() > ray.tfar || ray.tfar < 0.0f)) { inputRayID++; continue; } // ignore invalid or already occluded rays
+#if defined(EMBREE_IGNORE_INVALID_RAYS)
+ if (unlikely(!ray.valid())) { inputRayID++; continue; }
+#endif
+
+ const unsigned int octantID = movemask(lt_mask(ray.dir,Vec3fa(0.0f)));
+
+ assert(octantID < 8);
+ octants[octantID][raysInOctant[octantID]++] = (unsigned int)inputRayID;
+ inputRayID++;
+ if (unlikely(raysInOctant[octantID] == MAX_INTERNAL_STREAM_SIZE))
+ {
+ curOctant = octantID;
+ break;
+ }
+ }
+
+ /* need to flush rays in octant? */
+ if (unlikely(curOctant == -1))
+ {
+ for (unsigned int i = 0; i < 8; i++)
+ if (raysInOctant[i]) { curOctant = i; break; }
+ }
+
+ /* all rays traced? */
+ if (unlikely(curOctant == -1))
+ break;
+
+ unsigned int* const rayIDs = &octants[curOctant][0];
+ const unsigned int numOctantRays = raysInOctant[curOctant];
+ assert(numOctantRays);
+
+ for (unsigned int j = 0; j < numOctantRays; j += K)
+ {
+ const vint<K> vi = vint<K>(int(j)) + vint<K>(step);
+ const vbool<K> valid = vi < vint<K>(int(numOctantRays));
+ const vint<K> index = *(vint<K>*)&rayIDs[j];
+ RayK<K>& ray = rays[j/K];
+ rayPtrs[j/K] = &ray;
+ ray = rayN.getRayByIndex<K>(valid, index);
+ ray.tnear() = select(valid, ray.tnear(), zero);
+ ray.tfar = select(valid, ray.tfar, neg_inf);
+ }
+
+ scene->intersectors.occludedN(rayPtrs, numOctantRays, context);
+
+ for (unsigned int j = 0; j < numOctantRays; j += K)
+ {
+ const vint<K> vi = vint<K>(int(j)) + vint<K>(step);
+ const vbool<K> valid = vi < vint<K>(int(numOctantRays));
+ const vint<K> index = *(vint<K>*)&rayIDs[j];
+ rayN.setHitByIndex<K>(valid, index, rays[j/K]);
+ }
+
+ raysInOctant[curOctant] = 0;
+ }
+ }
+ else
+ {
+ /* fallback to packets */
+ for (size_t i = 0; i < N; i += K)
+ {
+ const vint<K> vi = vint<K>(int(i)) + vint<K>(step);
+ vbool<K> valid = vi < vint<K>(int(N));
+
+ RayTypeK<K, intersect> ray = rayN.getRayByIndex<K>(valid, vi);
+ valid &= ray.tnear() <= ray.tfar;
+
+ scene->intersectors.intersect(valid, ray, context);
+
+ rayN.setHitByIndex<K>(valid, vi, ray);
+ }
+ }
+ }
+
+ template<int K, bool intersect>
+ __noinline void RayStreamFilter::filterSOA(Scene* scene, char* rayData, size_t N, size_t numPackets, size_t stride, IntersectContext* context)
+ {
+ const size_t rayDataAlignment = (size_t)rayData % (K*sizeof(float));
+ const size_t offsetAlignment = (size_t)stride % (K*sizeof(float));
+
+ /* fast path for packets with the correct width and data alignment */
+ if (likely(N == K &&
+ !rayDataAlignment &&
+ !offsetAlignment))
+ {
+ if (unlikely(context->isCoherent()))
+ {
+ __aligned(64) RayTypeK<K, intersect>* rayPtrs[MAX_INTERNAL_STREAM_SIZE / K];
+
+ size_t packetIndex = 0;
+ for (size_t i = 0; i < numPackets; i++)
+ {
+ const size_t offset = i * stride;
+ RayTypeK<K, intersect>& ray = *(RayTypeK<K, intersect>*)(rayData + offset);
+ rayPtrs[packetIndex++] = &ray;
+
+ /* trace as stream */
+ if (unlikely(packetIndex == MAX_INTERNAL_STREAM_SIZE / K))
+ {
+ const size_t size = packetIndex*K;
+ scene->intersectors.intersectN(rayPtrs, size, context);
+ packetIndex = 0;
+ }
+ }
+
+ /* flush remaining packets */
+ if (unlikely(packetIndex > 0))
+ {
+ const size_t size = packetIndex*K;
+ scene->intersectors.intersectN(rayPtrs, size, context);
+ }
+ }
+ else if (unlikely(!intersect))
+ {
+ /* octant sorting for occlusion rays */
+ RayStreamSOA rayN(rayData, K);
+
+ __aligned(64) unsigned int octants[8][MAX_INTERNAL_STREAM_SIZE];
+ __aligned(64) RayK<K> rays[MAX_INTERNAL_STREAM_SIZE / K];
+ __aligned(64) RayK<K>* rayPtrs[MAX_INTERNAL_STREAM_SIZE / K];
+
+ unsigned int raysInOctant[8];
+ for (unsigned int i = 0; i < 8; i++)
+ raysInOctant[i] = 0;
+ size_t inputRayID = 0;
+
+ for (;;)
+ {
+ int curOctant = -1;
+
+ /* sort rays into octants */
+ for (; inputRayID < N*numPackets;)
+ {
+ const size_t offset = (inputRayID / K) * stride + (inputRayID % K) * sizeof(float);
+
+ /* skip invalid rays */
+ if (unlikely(!rayN.isValidByOffset(offset))) { inputRayID++; continue; } // ignore invalid or already occluded rays
+ #if defined(EMBREE_IGNORE_INVALID_RAYS)
+ __aligned(64) Ray ray = rayN.getRayByOffset(offset);
+ if (unlikely(!ray.valid())) { inputRayID++; continue; }
+ #endif
+
+ const unsigned int octantID = (unsigned int)rayN.getOctantByOffset(offset);
+
+ assert(octantID < 8);
+ octants[octantID][raysInOctant[octantID]++] = (unsigned int)offset;
+ inputRayID++;
+ if (unlikely(raysInOctant[octantID] == MAX_INTERNAL_STREAM_SIZE))
+ {
+ curOctant = octantID;
+ break;
+ }
+ }
+
+ /* need to flush rays in octant? */
+ if (unlikely(curOctant == -1))
+ {
+ for (unsigned int i = 0; i < 8; i++)
+ if (raysInOctant[i]) { curOctant = i; break; }
+ }
+
+ /* all rays traced? */
+ if (unlikely(curOctant == -1))
+ break;
+
+ unsigned int* const rayOffsets = &octants[curOctant][0];
+ const unsigned int numOctantRays = raysInOctant[curOctant];
+ assert(numOctantRays);
+
+ for (unsigned int j = 0; j < numOctantRays; j += K)
+ {
+ const vint<K> vi = vint<K>(int(j)) + vint<K>(step);
+ const vbool<K> valid = vi < vint<K>(int(numOctantRays));
+ const vint<K> offset = *(vint<K>*)&rayOffsets[j];
+ RayK<K>& ray = rays[j/K];
+ rayPtrs[j/K] = &ray;
+ ray = rayN.getRayByOffset<K>(valid, offset);
+ ray.tnear() = select(valid, ray.tnear(), zero);
+ ray.tfar = select(valid, ray.tfar, neg_inf);
+ }
+
+ scene->intersectors.occludedN(rayPtrs, numOctantRays, context);
+
+ for (unsigned int j = 0; j < numOctantRays; j += K)
+ {
+ const vint<K> vi = vint<K>(int(j)) + vint<K>(step);
+ const vbool<K> valid = vi < vint<K>(int(numOctantRays));
+ const vint<K> offset = *(vint<K>*)&rayOffsets[j];
+ rayN.setHitByOffset(valid, offset, rays[j/K]);
+ }
+ raysInOctant[curOctant] = 0;
+ }
+ }
+ else
+ {
+ /* fallback to packets */
+ for (size_t i = 0; i < numPackets; i++)
+ {
+ const size_t offset = i * stride;
+ RayTypeK<K, intersect>& ray = *(RayTypeK<K, intersect>*)(rayData + offset);
+ const vbool<K> valid = ray.tnear() <= ray.tfar;
+
+ scene->intersectors.intersect(valid, ray, context);
+ }
+ }
+ }
+ else
+ {
+ /* fallback to packets for arbitrary packet size and alignment */
+ for (size_t i = 0; i < numPackets; i++)
+ {
+ const size_t offsetN = i * stride;
+ RayStreamSOA rayN(rayData + offsetN, N);
+
+ for (size_t j = 0; j < N; j += K)
+ {
+ const size_t offset = j * sizeof(float);
+ vbool<K> valid = (vint<K>(int(j)) + vint<K>(step)) < vint<K>(int(N));
+ RayTypeK<K, intersect> ray = rayN.getRayByOffset<K>(valid, offset);
+ valid &= ray.tnear() <= ray.tfar;
+
+ scene->intersectors.intersect(valid, ray, context);
+
+ rayN.setHitByOffset(valid, offset, ray);
+ }
+ }
+ }
+ }
+
+ template<int K, bool intersect>
+ __noinline void RayStreamFilter::filterSOP(Scene* scene, const void* _rayN, size_t N, IntersectContext* context)
+ {
+ RayStreamSOP& rayN = *(RayStreamSOP*)_rayN;
+
+ /* use fast path for coherent ray mode */
+ if (unlikely(context->isCoherent()))
+ {
+ __aligned(64) RayTypeK<K, intersect> rays[MAX_INTERNAL_STREAM_SIZE / K];
+ __aligned(64) RayTypeK<K, intersect>* rayPtrs[MAX_INTERNAL_STREAM_SIZE / K];
+
+ for (size_t i = 0; i < N; i += MAX_INTERNAL_STREAM_SIZE)
+ {
+ const size_t size = min(N - i, MAX_INTERNAL_STREAM_SIZE);
+
+ /* convert from SOP to SOA */
+ for (size_t j = 0; j < size; j += K)
+ {
+ const vint<K> vij = vint<K>(int(i+j)) + vint<K>(step);
+ const vbool<K> valid = vij < vint<K>(int(N));
+ const size_t offset = (i+j) * sizeof(float);
+ const size_t packetIndex = j / K;
+
+ RayTypeK<K, intersect> ray = rayN.getRayByOffset<K>(valid, offset);
+ ray.tnear() = select(valid, ray.tnear(), zero);
+ ray.tfar = select(valid, ray.tfar, neg_inf);
+
+ rays[packetIndex] = ray;
+ rayPtrs[packetIndex] = &rays[packetIndex]; // rayPtrs might get reordered for occludedN
+ }
+
+ /* trace stream */
+ scene->intersectors.intersectN(rayPtrs, size, context);
+
+ /* convert from SOA to SOP */
+ for (size_t j = 0; j < size; j += K)
+ {
+ const vint<K> vij = vint<K>(int(i+j)) + vint<K>(step);
+ const vbool<K> valid = vij < vint<K>(int(N));
+ const size_t offset = (i+j) * sizeof(float);
+ const size_t packetIndex = j / K;
+
+ rayN.setHitByOffset(valid, offset, rays[packetIndex]);
+ }
+ }
+ }
+ else if (unlikely(!intersect))
+ {
+ /* octant sorting for occlusion rays */
+ __aligned(64) unsigned int octants[8][MAX_INTERNAL_STREAM_SIZE];
+ __aligned(64) RayK<K> rays[MAX_INTERNAL_STREAM_SIZE / K];
+ __aligned(64) RayK<K>* rayPtrs[MAX_INTERNAL_STREAM_SIZE / K];
+
+ unsigned int raysInOctant[8];
+ for (unsigned int i = 0; i < 8; i++)
+ raysInOctant[i] = 0;
+ size_t inputRayID = 0;
+
+ for (;;)
+ {
+ int curOctant = -1;
+
+ /* sort rays into octants */
+ for (; inputRayID < N;)
+ {
+ const size_t offset = inputRayID * sizeof(float);
+ /* skip invalid rays */
+ if (unlikely(!rayN.isValidByOffset(offset))) { inputRayID++; continue; } // ignore invalid or already occluded rays
+#if defined(EMBREE_IGNORE_INVALID_RAYS)
+ __aligned(64) Ray ray = rayN.getRayByOffset(offset);
+ if (unlikely(!ray.valid())) { inputRayID++; continue; }
+#endif
+
+ const unsigned int octantID = (unsigned int)rayN.getOctantByOffset(offset);
+
+ assert(octantID < 8);
+ octants[octantID][raysInOctant[octantID]++] = (unsigned int)offset;
+ inputRayID++;
+ if (unlikely(raysInOctant[octantID] == MAX_INTERNAL_STREAM_SIZE))
+ {
+ curOctant = octantID;
+ break;
+ }
+ }
+
+ /* need to flush rays in octant? */
+ if (unlikely(curOctant == -1))
+ {
+ for (unsigned int i = 0; i < 8; i++)
+ if (raysInOctant[i]) { curOctant = i; break; }
+ }
+
+ /* all rays traced? */
+ if (unlikely(curOctant == -1))
+ break;
+
+ unsigned int* const rayOffsets = &octants[curOctant][0];
+ const unsigned int numOctantRays = raysInOctant[curOctant];
+ assert(numOctantRays);
+
+ for (unsigned int j = 0; j < numOctantRays; j += K)
+ {
+ const vint<K> vi = vint<K>(int(j)) + vint<K>(step);
+ const vbool<K> valid = vi < vint<K>(int(numOctantRays));
+ const vint<K> offset = *(vint<K>*)&rayOffsets[j];
+ RayK<K>& ray = rays[j/K];
+ rayPtrs[j/K] = &ray;
+ ray = rayN.getRayByOffset<K>(valid, offset);
+ ray.tnear() = select(valid, ray.tnear(), zero);
+ ray.tfar = select(valid, ray.tfar, neg_inf);
+ }
+
+ scene->intersectors.occludedN(rayPtrs, numOctantRays, context);
+
+ for (unsigned int j = 0; j < numOctantRays; j += K)
+ {
+ const vint<K> vi = vint<K>(int(j)) + vint<K>(step);
+ const vbool<K> valid = vi < vint<K>(int(numOctantRays));
+ const vint<K> offset = *(vint<K>*)&rayOffsets[j];
+ rayN.setHitByOffset(valid, offset, rays[j/K]);
+ }
+
+ raysInOctant[curOctant] = 0;
+ }
+ }
+ else
+ {
+ /* fallback to packets */
+ for (size_t i = 0; i < N; i += K)
+ {
+ const vint<K> vi = vint<K>(int(i)) + vint<K>(step);
+ vbool<K> valid = vi < vint<K>(int(N));
+ const size_t offset = i * sizeof(float);
+
+ RayTypeK<K, intersect> ray = rayN.getRayByOffset<K>(valid, offset);
+ valid &= ray.tnear() <= ray.tfar;
+
+ scene->intersectors.intersect(valid, ray, context);
+
+ rayN.setHitByOffset(valid, offset, ray);
+ }
+ }
+ }
+
+
+ void RayStreamFilter::intersectAOS(Scene* scene, RTCRayHit* _rayN, size_t N, size_t stride, IntersectContext* context) {
+ if (unlikely(context->isCoherent()))
+ filterAOS<VSIZEL, true>(scene, _rayN, N, stride, context);
+ else
+ filterAOS<VSIZEX, true>(scene, _rayN, N, stride, context);
+ }
+
+ void RayStreamFilter::occludedAOS(Scene* scene, RTCRay* _rayN, size_t N, size_t stride, IntersectContext* context) {
+ if (unlikely(context->isCoherent()))
+ filterAOS<VSIZEL, false>(scene, _rayN, N, stride, context);
+ else
+ filterAOS<VSIZEX, false>(scene, _rayN, N, stride, context);
+ }
+
+ void RayStreamFilter::intersectAOP(Scene* scene, RTCRayHit** _rayN, size_t N, IntersectContext* context) {
+ if (unlikely(context->isCoherent()))
+ filterAOP<VSIZEL, true>(scene, (void**)_rayN, N, context);
+ else
+ filterAOP<VSIZEX, true>(scene, (void**)_rayN, N, context);
+ }
+
+ void RayStreamFilter::occludedAOP(Scene* scene, RTCRay** _rayN, size_t N, IntersectContext* context) {
+ if (unlikely(context->isCoherent()))
+ filterAOP<VSIZEL, false>(scene, (void**)_rayN, N, context);
+ else
+ filterAOP<VSIZEX, false>(scene, (void**)_rayN, N, context);
+ }
+
+ void RayStreamFilter::intersectSOA(Scene* scene, char* rayData, size_t N, size_t numPackets, size_t stride, IntersectContext* context) {
+ if (unlikely(context->isCoherent()))
+ filterSOA<VSIZEL, true>(scene, rayData, N, numPackets, stride, context);
+ else
+ filterSOA<VSIZEX, true>(scene, rayData, N, numPackets, stride, context);
+ }
+
+ void RayStreamFilter::occludedSOA(Scene* scene, char* rayData, size_t N, size_t numPackets, size_t stride, IntersectContext* context) {
+ if (unlikely(context->isCoherent()))
+ filterSOA<VSIZEL, false>(scene, rayData, N, numPackets, stride, context);
+ else
+ filterSOA<VSIZEX, false>(scene, rayData, N, numPackets, stride, context);
+ }
+
+ void RayStreamFilter::intersectSOP(Scene* scene, const RTCRayHitNp* _rayN, size_t N, IntersectContext* context) {
+ if (unlikely(context->isCoherent()))
+ filterSOP<VSIZEL, true>(scene, _rayN, N, context);
+ else
+ filterSOP<VSIZEX, true>(scene, _rayN, N, context);
+ }
+
+ void RayStreamFilter::occludedSOP(Scene* scene, const RTCRayNp* _rayN, size_t N, IntersectContext* context) {
+ if (unlikely(context->isCoherent()))
+ filterSOP<VSIZEL, false>(scene, _rayN, N, context);
+ else
+ filterSOP<VSIZEX, false>(scene, _rayN, N, context);
+ }
+
+
+ RayStreamFilterFuncs rayStreamFilterFuncs() {
+ return RayStreamFilterFuncs(RayStreamFilter::intersectAOS, RayStreamFilter::intersectAOP, RayStreamFilter::intersectSOA, RayStreamFilter::intersectSOP,
+ RayStreamFilter::occludedAOS, RayStreamFilter::occludedAOP, RayStreamFilter::occludedSOA, RayStreamFilter::occludedSOP);
+ }
+ };
+};
diff --git a/thirdparty/embree/kernels/config.h b/thirdparty/embree/kernels/config.h
index 80a8ab2a56..2bf7e93587 100644
--- a/thirdparty/embree/kernels/config.h
+++ b/thirdparty/embree/kernels/config.h
@@ -16,7 +16,7 @@
/* #undef EMBREE_GEOMETRY_INSTANCE */
/* #undef EMBREE_GEOMETRY_GRID */
/* #undef EMBREE_GEOMETRY_POINT */
-/* #undef EMBREE_RAY_PACKETS */
+#define EMBREE_RAY_PACKETS
/* #undef EMBREE_COMPACT_POLYS */
#define EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR 2.0
diff --git a/thirdparty/embree/kernels/hash.h b/thirdparty/embree/kernels/hash.h
index 10f315cee7..470e15f03e 100644
--- a/thirdparty/embree/kernels/hash.h
+++ b/thirdparty/embree/kernels/hash.h
@@ -2,4 +2,4 @@
// Copyright 2009-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
-#define RTC_HASH "7c53133eb21424f7f0ae1e25bf357e358feaf6ab"
+#define RTC_HASH "12b99393438a4cc9e478e33459eed78bec6233fd"
diff --git a/thirdparty/etcpak/ProcessRGB.cpp b/thirdparty/etcpak/ProcessRGB.cpp
index 7f4524d105..d60164bcc8 100644
--- a/thirdparty/etcpak/ProcessRGB.cpp
+++ b/thirdparty/etcpak/ProcessRGB.cpp
@@ -1,7 +1,6 @@
#include <array>
#include <string.h>
#include <limits>
-
#ifdef __ARM_NEON
# include <arm_neon.h>
#endif
@@ -29,6 +28,30 @@
# define _bswap64(x) __builtin_bswap64(x)
#endif
+// thresholds for the early compression-mode decision scheme
+// default: 0.03, 0.09, and 0.38
+float ecmd_threshold[3] = { 0.03f, 0.09f, 0.38f };
+
+static const uint8_t ModeUndecided = 0;
+static const uint8_t ModePlanar = 0x1;
+static const uint8_t ModeTH = 0x2;
+
+struct Luma
+{
+#ifdef __AVX2__
+ float max, min;
+ uint8_t minIdx = 255, maxIdx = 255;
+ __m128i luma8;
+#elif defined __ARM_NEON
+ float max, min;
+ uint8_t minIdx = 255, maxIdx = 255;
+ uint8x16_t luma8;
+#else
+ uint8_t max = 0, min = 255, maxIdx = 0, minIdx = 0;
+ uint8_t val[16];
+#endif
+};
+
namespace
{
@@ -570,7 +593,7 @@ struct Plane
__m256i sum4;
};
-static etcpak_force_inline Plane Planar_AVX2(const uint8_t* src)
+static etcpak_force_inline Plane Planar_AVX2( const uint8_t* src, const uint8_t mode )
{
__m128i d0 = _mm_loadu_si128(((__m128i*)src) + 0);
__m128i d1 = _mm_loadu_si128(((__m128i*)src) + 1);
@@ -682,99 +705,103 @@ static etcpak_force_inline Plane Planar_AVX2(const uint8_t* src)
uint32_t rgbv0 = _mm_extract_epi32(cohv, 2);
// Error calculation
- auto ro0 = (rgbho >> 48) & 0x3F;
- auto go0 = (rgbho >> 40) & 0x7F;
- auto bo0 = (rgbho >> 32) & 0x3F;
- auto ro1 = (ro0 >> 4) | (ro0 << 2);
- auto go1 = (go0 >> 6) | (go0 << 1);
- auto bo1 = (bo0 >> 4) | (bo0 << 2);
- auto ro2 = (ro1 << 2) + 2;
- auto go2 = (go1 << 2) + 2;
- auto bo2 = (bo1 << 2) + 2;
-
- __m256i ro3 = _mm256_set1_epi16(ro2);
- __m256i go3 = _mm256_set1_epi16(go2);
- __m256i bo3 = _mm256_set1_epi16(bo2);
-
- auto rh0 = (rgbho >> 16) & 0x3F;
- auto gh0 = (rgbho >> 8) & 0x7F;
- auto bh0 = (rgbho >> 0) & 0x3F;
- auto rh1 = (rh0 >> 4) | (rh0 << 2);
- auto gh1 = (gh0 >> 6) | (gh0 << 1);
- auto bh1 = (bh0 >> 4) | (bh0 << 2);
-
- auto rh2 = rh1 - ro1;
- auto gh2 = gh1 - go1;
- auto bh2 = bh1 - bo1;
-
- __m256i rh3 = _mm256_set1_epi16(rh2);
- __m256i gh3 = _mm256_set1_epi16(gh2);
- __m256i bh3 = _mm256_set1_epi16(bh2);
-
- auto rv0 = (rgbv0 >> 16) & 0x3F;
- auto gv0 = (rgbv0 >> 8) & 0x7F;
- auto bv0 = (rgbv0 >> 0) & 0x3F;
- auto rv1 = (rv0 >> 4) | (rv0 << 2);
- auto gv1 = (gv0 >> 6) | (gv0 << 1);
- auto bv1 = (bv0 >> 4) | (bv0 << 2);
-
- auto rv2 = rv1 - ro1;
- auto gv2 = gv1 - go1;
- auto bv2 = bv1 - bo1;
-
- __m256i rv3 = _mm256_set1_epi16(rv2);
- __m256i gv3 = _mm256_set1_epi16(gv2);
- __m256i bv3 = _mm256_set1_epi16(bv2);
-
- __m256i x = _mm256_set_epi16(3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0);
-
- __m256i rh4 = _mm256_mullo_epi16(rh3, x);
- __m256i gh4 = _mm256_mullo_epi16(gh3, x);
- __m256i bh4 = _mm256_mullo_epi16(bh3, x);
-
- __m256i y = _mm256_set_epi16(3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0);
-
- __m256i rv4 = _mm256_mullo_epi16(rv3, y);
- __m256i gv4 = _mm256_mullo_epi16(gv3, y);
- __m256i bv4 = _mm256_mullo_epi16(bv3, y);
-
- __m256i rxy = _mm256_add_epi16(rh4, rv4);
- __m256i gxy = _mm256_add_epi16(gh4, gv4);
- __m256i bxy = _mm256_add_epi16(bh4, bv4);
-
- __m256i rp0 = _mm256_add_epi16(rxy, ro3);
- __m256i gp0 = _mm256_add_epi16(gxy, go3);
- __m256i bp0 = _mm256_add_epi16(bxy, bo3);
-
- __m256i rp1 = _mm256_srai_epi16(rp0, 2);
- __m256i gp1 = _mm256_srai_epi16(gp0, 2);
- __m256i bp1 = _mm256_srai_epi16(bp0, 2);
-
- __m256i rp2 = _mm256_max_epi16(_mm256_min_epi16(rp1, _mm256_set1_epi16(255)), _mm256_setzero_si256());
- __m256i gp2 = _mm256_max_epi16(_mm256_min_epi16(gp1, _mm256_set1_epi16(255)), _mm256_setzero_si256());
- __m256i bp2 = _mm256_max_epi16(_mm256_min_epi16(bp1, _mm256_set1_epi16(255)), _mm256_setzero_si256());
-
- __m256i rdif = _mm256_sub_epi16(r08, rp2);
- __m256i gdif = _mm256_sub_epi16(g08, gp2);
- __m256i bdif = _mm256_sub_epi16(b08, bp2);
-
- __m256i rerr = _mm256_mullo_epi16(rdif, _mm256_set1_epi16(38));
- __m256i gerr = _mm256_mullo_epi16(gdif, _mm256_set1_epi16(76));
- __m256i berr = _mm256_mullo_epi16(bdif, _mm256_set1_epi16(14));
-
- __m256i sum0 = _mm256_add_epi16(rerr, gerr);
- __m256i sum1 = _mm256_add_epi16(sum0, berr);
-
- __m256i sum2 = _mm256_madd_epi16(sum1, sum1);
-
- __m128i sum3 = _mm_add_epi32(_mm256_castsi256_si128(sum2), _mm256_extracti128_si256(sum2, 1));
-
- uint32_t err0 = _mm_extract_epi32(sum3, 0);
- uint32_t err1 = _mm_extract_epi32(sum3, 1);
- uint32_t err2 = _mm_extract_epi32(sum3, 2);
- uint32_t err3 = _mm_extract_epi32(sum3, 3);
-
- uint64_t error = err0 + err1 + err2 + err3;
+ uint64_t error = 0;
+ if( mode != ModePlanar )
+ {
+ auto ro0 = ( rgbho >> 48 ) & 0x3F;
+ auto go0 = ( rgbho >> 40 ) & 0x7F;
+ auto bo0 = ( rgbho >> 32 ) & 0x3F;
+ auto ro1 = ( ro0 >> 4 ) | ( ro0 << 2 );
+ auto go1 = ( go0 >> 6 ) | ( go0 << 1 );
+ auto bo1 = ( bo0 >> 4 ) | ( bo0 << 2 );
+ auto ro2 = ( ro1 << 2 ) + 2;
+ auto go2 = ( go1 << 2 ) + 2;
+ auto bo2 = ( bo1 << 2 ) + 2;
+
+ __m256i ro3 = _mm256_set1_epi16( ro2 );
+ __m256i go3 = _mm256_set1_epi16( go2 );
+ __m256i bo3 = _mm256_set1_epi16( bo2 );
+
+ auto rh0 = ( rgbho >> 16 ) & 0x3F;
+ auto gh0 = ( rgbho >> 8 ) & 0x7F;
+ auto bh0 = ( rgbho >> 0 ) & 0x3F;
+ auto rh1 = ( rh0 >> 4 ) | ( rh0 << 2 );
+ auto gh1 = ( gh0 >> 6 ) | ( gh0 << 1 );
+ auto bh1 = ( bh0 >> 4 ) | ( bh0 << 2 );
+
+ auto rh2 = rh1 - ro1;
+ auto gh2 = gh1 - go1;
+ auto bh2 = bh1 - bo1;
+
+ __m256i rh3 = _mm256_set1_epi16( rh2 );
+ __m256i gh3 = _mm256_set1_epi16( gh2 );
+ __m256i bh3 = _mm256_set1_epi16( bh2 );
+
+ auto rv0 = ( rgbv0 >> 16 ) & 0x3F;
+ auto gv0 = ( rgbv0 >> 8 ) & 0x7F;
+ auto bv0 = ( rgbv0 >> 0 ) & 0x3F;
+ auto rv1 = ( rv0 >> 4 ) | ( rv0 << 2 );
+ auto gv1 = ( gv0 >> 6 ) | ( gv0 << 1 );
+ auto bv1 = ( bv0 >> 4 ) | ( bv0 << 2 );
+
+ auto rv2 = rv1 - ro1;
+ auto gv2 = gv1 - go1;
+ auto bv2 = bv1 - bo1;
+
+ __m256i rv3 = _mm256_set1_epi16( rv2 );
+ __m256i gv3 = _mm256_set1_epi16( gv2 );
+ __m256i bv3 = _mm256_set1_epi16( bv2 );
+
+ __m256i x = _mm256_set_epi16( 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 );
+
+ __m256i rh4 = _mm256_mullo_epi16( rh3, x );
+ __m256i gh4 = _mm256_mullo_epi16( gh3, x );
+ __m256i bh4 = _mm256_mullo_epi16( bh3, x );
+
+ __m256i y = _mm256_set_epi16( 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0 );
+
+ __m256i rv4 = _mm256_mullo_epi16( rv3, y );
+ __m256i gv4 = _mm256_mullo_epi16( gv3, y );
+ __m256i bv4 = _mm256_mullo_epi16( bv3, y );
+
+ __m256i rxy = _mm256_add_epi16( rh4, rv4 );
+ __m256i gxy = _mm256_add_epi16( gh4, gv4 );
+ __m256i bxy = _mm256_add_epi16( bh4, bv4 );
+
+ __m256i rp0 = _mm256_add_epi16( rxy, ro3 );
+ __m256i gp0 = _mm256_add_epi16( gxy, go3 );
+ __m256i bp0 = _mm256_add_epi16( bxy, bo3 );
+
+ __m256i rp1 = _mm256_srai_epi16( rp0, 2 );
+ __m256i gp1 = _mm256_srai_epi16( gp0, 2 );
+ __m256i bp1 = _mm256_srai_epi16( bp0, 2 );
+
+ __m256i rp2 = _mm256_max_epi16( _mm256_min_epi16( rp1, _mm256_set1_epi16( 255 ) ), _mm256_setzero_si256() );
+ __m256i gp2 = _mm256_max_epi16( _mm256_min_epi16( gp1, _mm256_set1_epi16( 255 ) ), _mm256_setzero_si256() );
+ __m256i bp2 = _mm256_max_epi16( _mm256_min_epi16( bp1, _mm256_set1_epi16( 255 ) ), _mm256_setzero_si256() );
+
+ __m256i rdif = _mm256_sub_epi16( r08, rp2 );
+ __m256i gdif = _mm256_sub_epi16( g08, gp2 );
+ __m256i bdif = _mm256_sub_epi16( b08, bp2 );
+
+ __m256i rerr = _mm256_mullo_epi16( rdif, _mm256_set1_epi16( 38 ) );
+ __m256i gerr = _mm256_mullo_epi16( gdif, _mm256_set1_epi16( 76 ) );
+ __m256i berr = _mm256_mullo_epi16( bdif, _mm256_set1_epi16( 14 ) );
+
+ __m256i sum0 = _mm256_add_epi16( rerr, gerr );
+ __m256i sum1 = _mm256_add_epi16( sum0, berr );
+
+ __m256i sum2 = _mm256_madd_epi16( sum1, sum1 );
+
+ __m128i sum3 = _mm_add_epi32( _mm256_castsi256_si128( sum2 ), _mm256_extracti128_si256( sum2, 1 ) );
+
+ uint32_t err0 = _mm_extract_epi32( sum3, 0 );
+ uint32_t err1 = _mm_extract_epi32( sum3, 1 );
+ uint32_t err2 = _mm_extract_epi32( sum3, 2 );
+ uint32_t err3 = _mm_extract_epi32( sum3, 3 );
+
+ error = err0 + err1 + err2 + err3;
+ }
/**/
uint32_t rgbv = ( rgbv0 & 0x3F ) | ( ( rgbv0 >> 2 ) & 0x1FC0 ) | ( ( rgbv0 >> 3 ) & 0x7E000 );
@@ -1543,13 +1570,13 @@ static etcpak_force_inline uint8_t convert7(float f)
return (i + 9 - ((i + 9) >> 8) - ((i + 6) >> 8)) >> 2;
}
-static etcpak_force_inline std::pair<uint64_t, uint64_t> Planar(const uint8_t* src)
+static etcpak_force_inline std::pair<uint64_t, uint64_t> Planar( const uint8_t* src, const uint8_t mode )
{
int32_t r = 0;
int32_t g = 0;
int32_t b = 0;
- for (int i = 0; i < 16; ++i)
+ for( int i = 0; i < 16; ++i )
{
b += src[i * 4 + 0];
g += src[i * 4 + 1];
@@ -1617,72 +1644,73 @@ static etcpak_force_inline std::pair<uint64_t, uint64_t> Planar(const uint8_t* s
int32_t cvB = convert6(cvfB);
// Error calculation
- auto ro0 = coR;
- auto go0 = coG;
- auto bo0 = coB;
- auto ro1 = (ro0 >> 4) | (ro0 << 2);
- auto go1 = (go0 >> 6) | (go0 << 1);
- auto bo1 = (bo0 >> 4) | (bo0 << 2);
- auto ro2 = (ro1 << 2) + 2;
- auto go2 = (go1 << 2) + 2;
- auto bo2 = (bo1 << 2) + 2;
-
- auto rh0 = chR;
- auto gh0 = chG;
- auto bh0 = chB;
- auto rh1 = (rh0 >> 4) | (rh0 << 2);
- auto gh1 = (gh0 >> 6) | (gh0 << 1);
- auto bh1 = (bh0 >> 4) | (bh0 << 2);
-
- auto rh2 = rh1 - ro1;
- auto gh2 = gh1 - go1;
- auto bh2 = bh1 - bo1;
-
- auto rv0 = cvR;
- auto gv0 = cvG;
- auto bv0 = cvB;
- auto rv1 = (rv0 >> 4) | (rv0 << 2);
- auto gv1 = (gv0 >> 6) | (gv0 << 1);
- auto bv1 = (bv0 >> 4) | (bv0 << 2);
-
- auto rv2 = rv1 - ro1;
- auto gv2 = gv1 - go1;
- auto bv2 = bv1 - bo1;
-
uint64_t error = 0;
-
- for (int i = 0; i < 16; ++i)
+ if( ModePlanar != mode )
{
- int32_t cR = clampu8((rh2 * (i / 4) + rv2 * (i % 4) + ro2) >> 2);
- int32_t cG = clampu8((gh2 * (i / 4) + gv2 * (i % 4) + go2) >> 2);
- int32_t cB = clampu8((bh2 * (i / 4) + bv2 * (i % 4) + bo2) >> 2);
+ auto ro0 = coR;
+ auto go0 = coG;
+ auto bo0 = coB;
+ auto ro1 = ( ro0 >> 4 ) | ( ro0 << 2 );
+ auto go1 = ( go0 >> 6 ) | ( go0 << 1 );
+ auto bo1 = ( bo0 >> 4 ) | ( bo0 << 2 );
+ auto ro2 = ( ro1 << 2 ) + 2;
+ auto go2 = ( go1 << 2 ) + 2;
+ auto bo2 = ( bo1 << 2 ) + 2;
+
+ auto rh0 = chR;
+ auto gh0 = chG;
+ auto bh0 = chB;
+ auto rh1 = ( rh0 >> 4 ) | ( rh0 << 2 );
+ auto gh1 = ( gh0 >> 6 ) | ( gh0 << 1 );
+ auto bh1 = ( bh0 >> 4 ) | ( bh0 << 2 );
+
+ auto rh2 = rh1 - ro1;
+ auto gh2 = gh1 - go1;
+ auto bh2 = bh1 - bo1;
+
+ auto rv0 = cvR;
+ auto gv0 = cvG;
+ auto bv0 = cvB;
+ auto rv1 = ( rv0 >> 4 ) | ( rv0 << 2 );
+ auto gv1 = ( gv0 >> 6 ) | ( gv0 << 1 );
+ auto bv1 = ( bv0 >> 4 ) | ( bv0 << 2 );
+
+ auto rv2 = rv1 - ro1;
+ auto gv2 = gv1 - go1;
+ auto bv2 = bv1 - bo1;
+ for( int i = 0; i < 16; ++i )
+ {
+ int32_t cR = clampu8( ( rh2 * ( i / 4 ) + rv2 * ( i % 4 ) + ro2 ) >> 2 );
+ int32_t cG = clampu8( ( gh2 * ( i / 4 ) + gv2 * ( i % 4 ) + go2 ) >> 2 );
+ int32_t cB = clampu8( ( bh2 * ( i / 4 ) + bv2 * ( i % 4 ) + bo2 ) >> 2 );
- int32_t difB = static_cast<int>(src[i * 4 + 0]) - cB;
- int32_t difG = static_cast<int>(src[i * 4 + 1]) - cG;
- int32_t difR = static_cast<int>(src[i * 4 + 2]) - cR;
+ int32_t difB = static_cast<int>( src[i * 4 + 0] ) - cB;
+ int32_t difG = static_cast<int>( src[i * 4 + 1] ) - cG;
+ int32_t difR = static_cast<int>( src[i * 4 + 2] ) - cR;
- int32_t dif = difR * 38 + difG * 76 + difB * 14;
+ int32_t dif = difR * 38 + difG * 76 + difB * 14;
- error += dif * dif;
+ error += dif * dif;
+ }
}
/**/
- uint32_t rgbv = cvB | (cvG << 6) | (cvR << 13);
- uint32_t rgbh = chB | (chG << 6) | (chR << 13);
- uint32_t hi = rgbv | ((rgbh & 0x1FFF) << 19);
- uint32_t lo = (chR & 0x1) | 0x2 | ((chR << 1) & 0x7C);
- lo |= ((coB & 0x07) << 7) | ((coB & 0x18) << 8) | ((coB & 0x20) << 11);
- lo |= ((coG & 0x3F) << 17) | ((coG & 0x40) << 18);
+ uint32_t rgbv = cvB | ( cvG << 6 ) | ( cvR << 13 );
+ uint32_t rgbh = chB | ( chG << 6 ) | ( chR << 13 );
+ uint32_t hi = rgbv | ( ( rgbh & 0x1FFF ) << 19 );
+ uint32_t lo = ( chR & 0x1 ) | 0x2 | ( ( chR << 1 ) & 0x7C );
+ lo |= ( ( coB & 0x07 ) << 7 ) | ( ( coB & 0x18 ) << 8 ) | ( ( coB & 0x20 ) << 11 );
+ lo |= ( ( coG & 0x3F ) << 17 ) | ( ( coG & 0x40 ) << 18 );
lo |= coR << 25;
- const auto idx = (coR & 0x20) | ((coG & 0x20) >> 1) | ((coB & 0x1E) >> 1);
+ const auto idx = ( coR & 0x20 ) | ( ( coG & 0x20 ) >> 1 ) | ( ( coB & 0x1E ) >> 1 );
lo |= g_flags[idx];
- uint64_t result = static_cast<uint32_t>(_bswap(lo));
- result |= static_cast<uint64_t>(static_cast<uint32_t>(_bswap(hi))) << 32;
+ uint64_t result = static_cast<uint32_t>( _bswap( lo ) );
+ result |= static_cast<uint64_t>( static_cast<uint32_t>( _bswap( hi ) ) ) << 32;
- return std::make_pair(result, error);
+ return std::make_pair( result, error );
}
#ifdef __ARM_NEON
@@ -1755,7 +1783,7 @@ static etcpak_force_inline int16x4_t convert7_NEON( int32x4_t x )
return vshr_n_s16( vsub_s16( vsub_s16( p9, vshr_n_s16( p9, 8 ) ), vshr_n_s16( p6, 8 ) ), 2 );
}
-static etcpak_force_inline std::pair<uint64_t, uint64_t> Planar_NEON( const uint8_t* src )
+static etcpak_force_inline std::pair<uint64_t, uint64_t> Planar_NEON( const uint8_t* src, const uint8_t mode )
{
uint8x16x4_t srcBlock = vld4q_u8( src );
@@ -1799,66 +1827,70 @@ static etcpak_force_inline std::pair<uint64_t, uint64_t> Planar_NEON( const uint
int16x8_t c_hvoo_br_8 = vorrq_s16( vshrq_n_s16( c_hvoo_br_6, 4 ), vshlq_n_s16( c_hvoo_br_6, 2 ) );
int16x4_t c_hvox_g_8 = vorr_s16( vshr_n_s16( c_hvox_g_7, 6 ), vshl_n_s16( c_hvox_g_7, 1 ) );
- int16x4_t rec_gxbr_o = vext_s16( c_hvox_g_8, vget_high_s16( c_hvoo_br_8 ), 3 );
+ uint64_t error = 0;
+ if( mode != ModePlanar )
+ {
+ int16x4_t rec_gxbr_o = vext_s16( c_hvox_g_8, vget_high_s16( c_hvoo_br_8 ), 3 );
- rec_gxbr_o = vadd_s16( vshl_n_s16( rec_gxbr_o, 2 ), vdup_n_s16( 2 ) );
- int16x8_t rec_ro_wide = vdupq_lane_s16( rec_gxbr_o, 3 );
- int16x8_t rec_go_wide = vdupq_lane_s16( rec_gxbr_o, 0 );
- int16x8_t rec_bo_wide = vdupq_lane_s16( rec_gxbr_o, 1 );
+ rec_gxbr_o = vadd_s16( vshl_n_s16( rec_gxbr_o, 2 ), vdup_n_s16( 2 ) );
+ int16x8_t rec_ro_wide = vdupq_lane_s16( rec_gxbr_o, 3 );
+ int16x8_t rec_go_wide = vdupq_lane_s16( rec_gxbr_o, 0 );
+ int16x8_t rec_bo_wide = vdupq_lane_s16( rec_gxbr_o, 1 );
- int16x4_t br_hv2 = vsub_s16( vget_low_s16( c_hvoo_br_8 ), vget_high_s16( c_hvoo_br_8 ) );
- int16x4_t gg_hv2 = vsub_s16( c_hvox_g_8, vdup_lane_s16( c_hvox_g_8, 2 ) );
+ int16x4_t br_hv2 = vsub_s16( vget_low_s16( c_hvoo_br_8 ), vget_high_s16( c_hvoo_br_8 ) );
+ int16x4_t gg_hv2 = vsub_s16( c_hvox_g_8, vdup_lane_s16( c_hvox_g_8, 2 ) );
- int16x8_t scaleh_lo = { 0, 0, 0, 0, 1, 1, 1, 1 };
- int16x8_t scaleh_hi = { 2, 2, 2, 2, 3, 3, 3, 3 };
- int16x8_t scalev = { 0, 1, 2, 3, 0, 1, 2, 3 };
+ int16x8_t scaleh_lo = { 0, 0, 0, 0, 1, 1, 1, 1 };
+ int16x8_t scaleh_hi = { 2, 2, 2, 2, 3, 3, 3, 3 };
+ int16x8_t scalev = { 0, 1, 2, 3, 0, 1, 2, 3 };
- int16x8_t rec_r_1 = vmlaq_lane_s16( rec_ro_wide, scalev, br_hv2, 3 );
- int16x8_t rec_r_lo = vreinterpretq_s16_u16( vmovl_u8( vqshrun_n_s16( vmlaq_lane_s16( rec_r_1, scaleh_lo, br_hv2, 2 ), 2 ) ) );
- int16x8_t rec_r_hi = vreinterpretq_s16_u16( vmovl_u8( vqshrun_n_s16( vmlaq_lane_s16( rec_r_1, scaleh_hi, br_hv2, 2 ), 2 ) ) );
+ int16x8_t rec_r_1 = vmlaq_lane_s16( rec_ro_wide, scalev, br_hv2, 3 );
+ int16x8_t rec_r_lo = vreinterpretq_s16_u16( vmovl_u8( vqshrun_n_s16( vmlaq_lane_s16( rec_r_1, scaleh_lo, br_hv2, 2 ), 2 ) ) );
+ int16x8_t rec_r_hi = vreinterpretq_s16_u16( vmovl_u8( vqshrun_n_s16( vmlaq_lane_s16( rec_r_1, scaleh_hi, br_hv2, 2 ), 2 ) ) );
- int16x8_t rec_b_1 = vmlaq_lane_s16( rec_bo_wide, scalev, br_hv2, 1 );
- int16x8_t rec_b_lo = vreinterpretq_s16_u16( vmovl_u8( vqshrun_n_s16( vmlaq_lane_s16( rec_b_1, scaleh_lo, br_hv2, 0 ), 2 ) ) );
- int16x8_t rec_b_hi = vreinterpretq_s16_u16( vmovl_u8( vqshrun_n_s16( vmlaq_lane_s16( rec_b_1, scaleh_hi, br_hv2, 0 ), 2 ) ) );
+ int16x8_t rec_b_1 = vmlaq_lane_s16( rec_bo_wide, scalev, br_hv2, 1 );
+ int16x8_t rec_b_lo = vreinterpretq_s16_u16( vmovl_u8( vqshrun_n_s16( vmlaq_lane_s16( rec_b_1, scaleh_lo, br_hv2, 0 ), 2 ) ) );
+ int16x8_t rec_b_hi = vreinterpretq_s16_u16( vmovl_u8( vqshrun_n_s16( vmlaq_lane_s16( rec_b_1, scaleh_hi, br_hv2, 0 ), 2 ) ) );
- int16x8_t rec_g_1 = vmlaq_lane_s16( rec_go_wide, scalev, gg_hv2, 1 );
- int16x8_t rec_g_lo = vreinterpretq_s16_u16( vmovl_u8( vqshrun_n_s16( vmlaq_lane_s16( rec_g_1, scaleh_lo, gg_hv2, 0 ), 2 ) ) );
- int16x8_t rec_g_hi = vreinterpretq_s16_u16( vmovl_u8( vqshrun_n_s16( vmlaq_lane_s16( rec_g_1, scaleh_hi, gg_hv2, 0 ), 2 ) ) );
+ int16x8_t rec_g_1 = vmlaq_lane_s16( rec_go_wide, scalev, gg_hv2, 1 );
+ int16x8_t rec_g_lo = vreinterpretq_s16_u16( vmovl_u8( vqshrun_n_s16( vmlaq_lane_s16( rec_g_1, scaleh_lo, gg_hv2, 0 ), 2 ) ) );
+ int16x8_t rec_g_hi = vreinterpretq_s16_u16( vmovl_u8( vqshrun_n_s16( vmlaq_lane_s16( rec_g_1, scaleh_hi, gg_hv2, 0 ), 2 ) ) );
- int16x8_t dif_r_lo = vsubq_s16( vreinterpretq_s16_u16( vmovl_u8( vget_low_u8( srcBlock.val[2] ) ) ), rec_r_lo );
- int16x8_t dif_r_hi = vsubq_s16( vreinterpretq_s16_u16( vmovl_u8( vget_high_u8( srcBlock.val[2] ) ) ), rec_r_hi );
+ int16x8_t dif_r_lo = vsubq_s16( vreinterpretq_s16_u16( vmovl_u8( vget_low_u8( srcBlock.val[2] ) ) ), rec_r_lo );
+ int16x8_t dif_r_hi = vsubq_s16( vreinterpretq_s16_u16( vmovl_u8( vget_high_u8( srcBlock.val[2] ) ) ), rec_r_hi );
- int16x8_t dif_g_lo = vsubq_s16( vreinterpretq_s16_u16( vmovl_u8( vget_low_u8( srcBlock.val[1] ) ) ), rec_g_lo );
- int16x8_t dif_g_hi = vsubq_s16( vreinterpretq_s16_u16( vmovl_u8( vget_high_u8( srcBlock.val[1] ) ) ), rec_g_hi );
+ int16x8_t dif_g_lo = vsubq_s16( vreinterpretq_s16_u16( vmovl_u8( vget_low_u8( srcBlock.val[1] ) ) ), rec_g_lo );
+ int16x8_t dif_g_hi = vsubq_s16( vreinterpretq_s16_u16( vmovl_u8( vget_high_u8( srcBlock.val[1] ) ) ), rec_g_hi );
- int16x8_t dif_b_lo = vsubq_s16( vreinterpretq_s16_u16( vmovl_u8( vget_low_u8( srcBlock.val[0] ) ) ), rec_b_lo );
- int16x8_t dif_b_hi = vsubq_s16( vreinterpretq_s16_u16( vmovl_u8( vget_high_u8( srcBlock.val[0] ) ) ), rec_b_hi );
+ int16x8_t dif_b_lo = vsubq_s16( vreinterpretq_s16_u16( vmovl_u8( vget_low_u8( srcBlock.val[0] ) ) ), rec_b_lo );
+ int16x8_t dif_b_hi = vsubq_s16( vreinterpretq_s16_u16( vmovl_u8( vget_high_u8( srcBlock.val[0] ) ) ), rec_b_hi );
- int16x8_t dif_lo = vmlaq_n_s16( vmlaq_n_s16( vmulq_n_s16( dif_r_lo, 38 ), dif_g_lo, 76 ), dif_b_lo, 14 );
- int16x8_t dif_hi = vmlaq_n_s16( vmlaq_n_s16( vmulq_n_s16( dif_r_hi, 38 ), dif_g_hi, 76 ), dif_b_hi, 14 );
+ int16x8_t dif_lo = vmlaq_n_s16( vmlaq_n_s16( vmulq_n_s16( dif_r_lo, 38 ), dif_g_lo, 76 ), dif_b_lo, 14 );
+ int16x8_t dif_hi = vmlaq_n_s16( vmlaq_n_s16( vmulq_n_s16( dif_r_hi, 38 ), dif_g_hi, 76 ), dif_b_hi, 14 );
- int16x4_t tmpDif = vget_low_s16( dif_lo );
- int32x4_t difsq_0 = vmull_s16( tmpDif, tmpDif );
- tmpDif = vget_high_s16( dif_lo );
- int32x4_t difsq_1 = vmull_s16( tmpDif, tmpDif );
- tmpDif = vget_low_s16( dif_hi );
- int32x4_t difsq_2 = vmull_s16( tmpDif, tmpDif );
- tmpDif = vget_high_s16( dif_hi );
- int32x4_t difsq_3 = vmull_s16( tmpDif, tmpDif );
+ int16x4_t tmpDif = vget_low_s16( dif_lo );
+ int32x4_t difsq_0 = vmull_s16( tmpDif, tmpDif );
+ tmpDif = vget_high_s16( dif_lo );
+ int32x4_t difsq_1 = vmull_s16( tmpDif, tmpDif );
+ tmpDif = vget_low_s16( dif_hi );
+ int32x4_t difsq_2 = vmull_s16( tmpDif, tmpDif );
+ tmpDif = vget_high_s16( dif_hi );
+ int32x4_t difsq_3 = vmull_s16( tmpDif, tmpDif );
- uint32x4_t difsq_5 = vaddq_u32( vreinterpretq_u32_s32( difsq_0 ), vreinterpretq_u32_s32( difsq_1 ) );
- uint32x4_t difsq_6 = vaddq_u32( vreinterpretq_u32_s32( difsq_2 ), vreinterpretq_u32_s32( difsq_3) );
+ uint32x4_t difsq_5 = vaddq_u32( vreinterpretq_u32_s32( difsq_0 ), vreinterpretq_u32_s32( difsq_1 ) );
+ uint32x4_t difsq_6 = vaddq_u32( vreinterpretq_u32_s32( difsq_2 ), vreinterpretq_u32_s32( difsq_3 ) );
- uint64x2_t difsq_7 = vaddl_u32( vget_low_u32( difsq_5 ), vget_high_u32( difsq_5 ) );
- uint64x2_t difsq_8 = vaddl_u32( vget_low_u32( difsq_6 ), vget_high_u32( difsq_6 ) );
+ uint64x2_t difsq_7 = vaddl_u32( vget_low_u32( difsq_5 ), vget_high_u32( difsq_5 ) );
+ uint64x2_t difsq_8 = vaddl_u32( vget_low_u32( difsq_6 ), vget_high_u32( difsq_6 ) );
- uint64x2_t difsq_9 = vaddq_u64( difsq_7, difsq_8 );
+ uint64x2_t difsq_9 = vaddq_u64( difsq_7, difsq_8 );
#ifdef __aarch64__
- uint64_t error = vaddvq_u64( difsq_9 );
+ error = vaddvq_u64( difsq_9 );
#else
- uint64_t error = vgetq_lane_u64( difsq_9, 0 ) + vgetq_lane_u64( difsq_9, 1 );
+ error = vgetq_lane_u64( difsq_9, 0 ) + vgetq_lane_u64( difsq_9, 1 );
#endif
+ }
int32_t coR = c_hvoo_br_6[6];
int32_t coG = c_hvox_g_7[2];
@@ -1979,13 +2011,272 @@ static etcpak_force_inline uint64_t ProcessRGB( const uint8_t* src )
#endif
}
-static etcpak_force_inline uint64_t ProcessRGB_ETC2( const uint8_t* src )
+#ifdef __AVX2__
+// horizontal min/max functions. https://stackoverflow.com/questions/22256525/horizontal-minimum-and-maximum-using-sse
+// if an error occurs in GCC, please change the value of -march in CFLAGS to a specific value for your CPU (e.g., skylake).
+static inline int16_t hMax( __m128i buffer, uint8_t& idx )
+{
+ __m128i tmp1 = _mm_sub_epi8( _mm_set1_epi8( (char)( 255 ) ), buffer );
+ __m128i tmp2 = _mm_min_epu8( tmp1, _mm_srli_epi16( tmp1, 8 ) );
+ __m128i tmp3 = _mm_minpos_epu16( tmp2 );
+ uint8_t result = 255 - (uint8_t)_mm_cvtsi128_si32( tmp3 );
+ __m128i mask = _mm_cmpeq_epi8( buffer, _mm_set1_epi8( result ) );
+ idx = _tzcnt_u32( _mm_movemask_epi8( mask ) );
+
+ return result;
+}
+#elif defined __ARM_NEON
+static inline int16_t hMax( uint8x16_t buffer, uint8_t& idx )
+{
+ const uint8_t max = vmaxvq_u8( buffer );
+ const uint16x8_t vmax = vdupq_n_u16( max );
+ uint8x16x2_t buff_wide = vzipq_u8( buffer, uint8x16_t() );
+ uint16x8_t lowbuf16 = vreinterpretq_u16_u8( buff_wide.val[0] );
+ uint16x8_t hibuf16 = vreinterpretq_u16_u8( buff_wide.val[1] );
+ uint16x8_t low_eqmask = vceqq_u16( lowbuf16, vmax );
+ uint16x8_t hi_eqmask = vceqq_u16( hibuf16, vmax );
+
+ static const uint16_t mask_lsb[] = {
+ 0x1, 0x2, 0x4, 0x8,
+ 0x10, 0x20, 0x40, 0x80 };
+
+ static const uint16_t mask_msb[] = {
+ 0x100, 0x200, 0x400, 0x800,
+ 0x1000, 0x2000, 0x4000, 0x8000 };
+
+ uint16x8_t vmask_lsb = vld1q_u16( mask_lsb );
+ uint16x8_t vmask_msb = vld1q_u16( mask_msb );
+ uint16x8_t pos_lsb = vandq_u16( vmask_lsb, low_eqmask );
+ uint16x8_t pos_msb = vandq_u16( vmask_msb, hi_eqmask );
+ pos_lsb = vpaddq_u16( pos_lsb, pos_lsb );
+ pos_lsb = vpaddq_u16( pos_lsb, pos_lsb );
+ pos_lsb = vpaddq_u16( pos_lsb, pos_lsb );
+ uint64_t idx_lane1 = vgetq_lane_u64( vreinterpretq_u64_u16( pos_lsb ), 0 );
+ pos_msb = vpaddq_u16( pos_msb, pos_msb );
+ pos_msb = vpaddq_u16( pos_msb, pos_msb );
+ pos_msb = vpaddq_u16( pos_msb, pos_msb );
+ uint32_t idx_lane2 = vgetq_lane_u32( vreinterpretq_u32_u16( pos_msb ), 0 );
+ idx = idx_lane1 != 0 ? __builtin_ctz( idx_lane1 ) : __builtin_ctz( idx_lane2 );
+
+ return max;
+}
+#endif
+
+#ifdef __AVX2__
+static inline int16_t hMin( __m128i buffer, uint8_t& idx )
+{
+ __m128i tmp2 = _mm_min_epu8( buffer, _mm_srli_epi16( buffer, 8 ) );
+ __m128i tmp3 = _mm_minpos_epu16( tmp2 );
+ uint8_t result = (uint8_t)_mm_cvtsi128_si32( tmp3 );
+ __m128i mask = _mm_cmpeq_epi8( buffer, _mm_set1_epi8( result ) );
+ idx = _tzcnt_u32( _mm_movemask_epi8( mask ) );
+ return result;
+}
+#elif defined __ARM_NEON
+static inline int16_t hMin( uint8x16_t buffer, uint8_t& idx )
+{
+ const uint8_t min = vminvq_u8( buffer );
+ const uint16x8_t vmin = vdupq_n_u16( min );
+ uint8x16x2_t buff_wide = vzipq_u8( buffer, uint8x16_t() );
+ uint16x8_t lowbuf16 = vreinterpretq_u16_u8( buff_wide.val[0] );
+ uint16x8_t hibuf16 = vreinterpretq_u16_u8( buff_wide.val[1] );
+ uint16x8_t low_eqmask = vceqq_u16( lowbuf16, vmin );
+ uint16x8_t hi_eqmask = vceqq_u16( hibuf16, vmin );
+
+ static const uint16_t mask_lsb[] = {
+ 0x1, 0x2, 0x4, 0x8,
+ 0x10, 0x20, 0x40, 0x80 };
+
+ static const uint16_t mask_msb[] = {
+ 0x100, 0x200, 0x400, 0x800,
+ 0x1000, 0x2000, 0x4000, 0x8000 };
+
+ uint16x8_t vmask_lsb = vld1q_u16( mask_lsb );
+ uint16x8_t vmask_msb = vld1q_u16( mask_msb );
+ uint16x8_t pos_lsb = vandq_u16( vmask_lsb, low_eqmask );
+ uint16x8_t pos_msb = vandq_u16( vmask_msb, hi_eqmask );
+ pos_lsb = vpaddq_u16( pos_lsb, pos_lsb );
+ pos_lsb = vpaddq_u16( pos_lsb, pos_lsb );
+ pos_lsb = vpaddq_u16( pos_lsb, pos_lsb );
+ uint64_t idx_lane1 = vgetq_lane_u64( vreinterpretq_u64_u16( pos_lsb ), 0 );
+ pos_msb = vpaddq_u16( pos_msb, pos_msb );
+ pos_msb = vpaddq_u16( pos_msb, pos_msb );
+ pos_msb = vpaddq_u16( pos_msb, pos_msb );
+ uint32_t idx_lane2 = vgetq_lane_u32( vreinterpretq_u32_u16( pos_msb ), 0 );
+ idx = idx_lane1 != 0 ? __builtin_ctz( idx_lane1 ) : __builtin_ctz( idx_lane2 );
+
+ return min;
+}
+#endif
+
+static etcpak_force_inline void CalculateLuma( const uint8_t* src, Luma& luma )
+{
+#ifdef __AVX2__
+ __m128i d0 = _mm_loadu_si128( ( (__m128i*)src ) + 0 );
+ __m128i d1 = _mm_loadu_si128( ( (__m128i*)src ) + 1 );
+ __m128i d2 = _mm_loadu_si128( ( (__m128i*)src ) + 2 );
+ __m128i d3 = _mm_loadu_si128( ( (__m128i*)src ) + 3 );
+
+ __m128i rgb0 = _mm_shuffle_epi8( d0, _mm_setr_epi8( 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, -1, -1, -1, -1 ) );
+ __m128i rgb1 = _mm_shuffle_epi8( d1, _mm_setr_epi8( 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, -1, -1, -1, -1 ) );
+ __m128i rgb2 = _mm_shuffle_epi8( d2, _mm_setr_epi8( 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, -1, -1, -1, -1 ) );
+ __m128i rgb3 = _mm_shuffle_epi8( d3, _mm_setr_epi8( 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, -1, -1, -1, -1 ) );
+
+ __m128i rg0 = _mm_unpacklo_epi32( rgb0, rgb1 );
+ __m128i rg1 = _mm_unpacklo_epi32( rgb2, rgb3 );
+ __m128i b0 = _mm_unpackhi_epi32( rgb0, rgb1 );
+ __m128i b1 = _mm_unpackhi_epi32( rgb2, rgb3 );
+
+ // swap channels
+ __m128i b8 = _mm_unpacklo_epi64( rg0, rg1 );
+ __m128i g8 = _mm_unpackhi_epi64( rg0, rg1 );
+ __m128i r8 = _mm_unpacklo_epi64( b0, b1 );
+
+ __m256i b16_luma = _mm256_mullo_epi16( _mm256_cvtepu8_epi16( b8 ), _mm256_set1_epi16( 14 ) );
+ __m256i g16_luma = _mm256_mullo_epi16( _mm256_cvtepu8_epi16( g8 ), _mm256_set1_epi16( 76 ) );
+ __m256i r16_luma = _mm256_mullo_epi16( _mm256_cvtepu8_epi16( r8 ), _mm256_set1_epi16( 38 ) );
+
+ __m256i luma_16bit = _mm256_add_epi16( _mm256_add_epi16( g16_luma, r16_luma ), b16_luma );
+ __m256i luma_8bit_m256i = _mm256_srli_epi16( luma_16bit, 7 );
+ __m128i luma_8bit_lo = _mm256_extractf128_si256( luma_8bit_m256i, 0 );
+ __m128i luma_8bit_hi = _mm256_extractf128_si256( luma_8bit_m256i, 1 );
+
+ static const __m128i interleaving_mask_lo = _mm_set_epi8( 15, 13, 11, 9, 7, 5, 3, 1, 14, 12, 10, 8, 6, 4, 2, 0 );
+ static const __m128i interleaving_mask_hi = _mm_set_epi8( 14, 12, 10, 8, 6, 4, 2, 0, 15, 13, 11, 9, 7, 5, 3, 1 );
+ __m128i luma_8bit_lo_moved = _mm_shuffle_epi8( luma_8bit_lo, interleaving_mask_lo );
+ __m128i luma_8bit_hi_moved = _mm_shuffle_epi8( luma_8bit_hi, interleaving_mask_hi );
+ __m128i luma_8bit = _mm_or_si128( luma_8bit_hi_moved, luma_8bit_lo_moved );
+ luma.luma8 = luma_8bit;
+
+ // min/max calculation
+ luma.min = hMin( luma_8bit, luma.minIdx ) * 0.00392156f;
+ luma.max = hMax( luma_8bit, luma.maxIdx ) * 0.00392156f;
+#elif defined __ARM_NEON
+ //load pixel data into 4 rows
+ uint8x16_t px0 = vld1q_u8( src + 0 );
+ uint8x16_t px1 = vld1q_u8( src + 16 );
+ uint8x16_t px2 = vld1q_u8( src + 32 );
+ uint8x16_t px3 = vld1q_u8( src + 48 );
+
+ uint8x16x2_t px0z1 = vzipq_u8( px0, px1 );
+ uint8x16x2_t px2z3 = vzipq_u8( px2, px3 );
+ uint8x16x2_t px01 = vzipq_u8( px0z1.val[0], px0z1.val[1] );
+ uint8x16x2_t rgb01 = vzipq_u8( px01.val[0], px01.val[1] );
+ uint8x16x2_t px23 = vzipq_u8( px2z3.val[0], px2z3.val[1] );
+ uint8x16x2_t rgb23 = vzipq_u8( px23.val[0], px23.val[1] );
+
+ uint8x16_t rr = vreinterpretq_u8_u64( vzip1q_u64( vreinterpretq_u64_u8( rgb01.val[0] ), vreinterpretq_u64_u8( rgb23.val[0] ) ) );
+ uint8x16_t gg = vreinterpretq_u8_u64( vzip2q_u64( vreinterpretq_u64_u8( rgb01.val[0] ), vreinterpretq_u64_u8( rgb23.val[0] ) ) );
+ uint8x16_t bb = vreinterpretq_u8_u64( vzip1q_u64( vreinterpretq_u64_u8( rgb01.val[1] ), vreinterpretq_u64_u8( rgb23.val[1] ) ) );
+
+ uint8x16x2_t red = vzipq_u8( rr, uint8x16_t() );
+ uint8x16x2_t grn = vzipq_u8( gg, uint8x16_t() );
+ uint8x16x2_t blu = vzipq_u8( bb, uint8x16_t() );
+ uint16x8_t red0 = vmulq_n_u16( vreinterpretq_u16_u8( red.val[0] ), 14 );
+ uint16x8_t red1 = vmulq_n_u16( vreinterpretq_u16_u8( red.val[1] ), 14 );
+ uint16x8_t grn0 = vmulq_n_u16( vreinterpretq_u16_u8( grn.val[0] ), 76 );
+ uint16x8_t grn1 = vmulq_n_u16( vreinterpretq_u16_u8( grn.val[1] ), 76 );
+ uint16x8_t blu0 = vmulq_n_u16( vreinterpretq_u16_u8( blu.val[0] ), 38 );
+ uint16x8_t blu1 = vmulq_n_u16( vreinterpretq_u16_u8( blu.val[1] ), 38 );
+
+ //calculate luma for rows 0,1 and 2,3
+ uint16x8_t lum_r01 = vaddq_u16( vaddq_u16( red0, grn0 ), blu0 );
+ uint16x8_t lum_r23 = vaddq_u16( vaddq_u16( red1, grn1 ), blu1 );
+
+ //divide luma values with right shift and narrow results to 8bit
+ uint8x8_t lum_r01_d = vshrn_n_u16( lum_r01, 7 );
+ uint8x8_t lum_r02_d = vshrn_n_u16( lum_r23, 7 );
+
+ luma.luma8 = vcombine_u8( lum_r01_d, lum_r02_d );
+ //find min and max luma value
+ luma.min = hMin( luma.luma8, luma.minIdx ) * 0.00392156f;
+ luma.max = hMax( luma.luma8, luma.maxIdx ) * 0.00392156f;
+#else
+ for( int i = 0; i < 16; ++i )
+ {
+ luma.val[i] = ( src[i * 4 + 2] * 76 + src[i * 4 + 1] * 150 + src[i * 4] * 28 ) / 254; // luma calculation
+ if( luma.min > luma.val[i] )
+ {
+ luma.min = luma.val[i];
+ luma.minIdx = i;
+ }
+ if( luma.max < luma.val[i] )
+ {
+ luma.max = luma.val[i];
+ luma.maxIdx = i;
+ }
+ }
+#endif
+}
+
+static etcpak_force_inline uint8_t SelectModeETC2( const Luma& luma )
+{
+#if defined __AVX2__ || defined __ARM_NEON
+ const float lumaRange = ( luma.max - luma.min );
+#else
+ const float lumaRange = ( luma.max - luma.min ) * ( 1.f / 255.f );
+#endif
+ // filters a very-low-contrast block
+ if( lumaRange <= ecmd_threshold[0] )
+ {
+ return ModePlanar;
+ }
+ // checks whether a pair of the corner pixels in a block has the min/max luma values;
+ // if so, the ETC2 planar mode is enabled, and otherwise, the ETC1 mode is enabled
+ else if( lumaRange <= ecmd_threshold[1] )
+ {
+#ifdef __AVX2__
+ static const __m128i corner_pair = _mm_set_epi8( 1, 1, 1, 1, 1, 1, 1, 1, 0, 15, 3, 12, 12, 3, 15, 0 );
+ __m128i current_max_min = _mm_set_epi8( 0, 0, 0, 0, 0, 0, 0, 0, luma.minIdx, luma.maxIdx, luma.minIdx, luma.maxIdx, luma.minIdx, luma.maxIdx, luma.minIdx, luma.maxIdx );
+
+ __m128i max_min_result = _mm_cmpeq_epi16( corner_pair, current_max_min );
+
+ int mask = _mm_movemask_epi8( max_min_result );
+ if( mask )
+ {
+ return ModePlanar;
+ }
+#else
+ // check whether a pair of the corner pixels in a block has the min/max luma values;
+ // if so, the ETC2 planar mode is enabled.
+ if( ( luma.minIdx == 0 && luma.maxIdx == 15 ) ||
+ ( luma.minIdx == 15 && luma.maxIdx == 0 ) ||
+ ( luma.minIdx == 3 && luma.maxIdx == 12 ) ||
+ ( luma.minIdx == 12 && luma.maxIdx == 3 ) )
+ {
+ return ModePlanar;
+ }
+#endif
+ }
+ // filters a high-contrast block for checking both ETC1 mode and the ETC2 T/H mode
+ else if( lumaRange >= ecmd_threshold[2] )
+ {
+ return ModeTH;
+ }
+ return 0;
+}
+
+static etcpak_force_inline uint64_t ProcessRGB_ETC2( const uint8_t* src, bool useHeuristics )
{
#ifdef __AVX2__
uint64_t d = CheckSolid_AVX2( src );
if( d != 0 ) return d;
+#else
+ uint64_t d = CheckSolid( src );
+ if (d != 0) return d;
+#endif
+
+ uint8_t mode = ModeUndecided;
+ if( useHeuristics )
+ {
+ Luma luma;
+ CalculateLuma( src, luma );
+ mode = SelectModeETC2( luma );
+ }
+#ifdef __AVX2__
+ auto plane = Planar_AVX2( src, mode );
- auto plane = Planar_AVX2( src );
+ if( useHeuristics && mode == ModePlanar ) return plane.plane;
alignas(32) v4i a[8];
@@ -2020,14 +2311,12 @@ static etcpak_force_inline uint64_t ProcessRGB_ETC2( const uint8_t* src )
return EncodeSelectors_AVX2( d, terr, tsel, (idx % 2) == 1, plane.plane, plane.error );
#else
- uint64_t d = CheckSolid( src );
- if (d != 0) return d;
-
#ifdef __ARM_NEON
- auto result = Planar_NEON( src );
+ auto result = Planar_NEON( src, mode );
#else
- auto result = Planar( src );
+ auto result = Planar( src, mode );
#endif
+ if( result.second == 0 ) return result.first;
v4i a[8];
unsigned int err[4] = {};
@@ -2826,7 +3115,7 @@ void CompressEtc1Alpha( const uint32_t* src, uint64_t* dst, uint32_t blocks, siz
while( --blocks );
}
-void CompressEtc2Alpha( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width )
+void CompressEtc2Alpha( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width, bool useHeuristics )
{
int w = 0;
uint32_t buf[4*4];
@@ -2880,7 +3169,7 @@ void CompressEtc2Alpha( const uint32_t* src, uint64_t* dst, uint32_t blocks, siz
src += width * 3;
w = 0;
}
- *dst++ = ProcessRGB_ETC2( (uint8_t*)buf );
+ *dst++ = ProcessRGB_ETC2( (uint8_t*)buf, useHeuristics );
}
while( --blocks );
}
@@ -2982,7 +3271,7 @@ void CompressEtc1RgbDither( const uint32_t* src, uint64_t* dst, uint32_t blocks,
while( --blocks );
}
-void CompressEtc2Rgb( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width )
+void CompressEtc2Rgb( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width, bool useHeuristics )
{
int w = 0;
uint32_t buf[4*4];
@@ -3021,12 +3310,12 @@ void CompressEtc2Rgb( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_
src += width * 3;
w = 0;
}
- *dst++ = ProcessRGB_ETC2( (uint8_t*)buf );
+ *dst++ = ProcessRGB_ETC2( (uint8_t*)buf, useHeuristics );
}
while( --blocks );
}
-void CompressEtc2Rgba( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width )
+void CompressEtc2Rgba( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width, bool useHeuristics )
{
int w = 0;
uint32_t rgba[4*4];
@@ -3094,7 +3383,7 @@ void CompressEtc2Rgba( const uint32_t* src, uint64_t* dst, uint32_t blocks, size
w = 0;
}
*dst++ = ProcessAlpha_ETC2( alpha );
- *dst++ = ProcessRGB_ETC2( (uint8_t*)rgba );
+ *dst++ = ProcessRGB_ETC2( (uint8_t*)rgba, useHeuristics );
}
while( --blocks );
}
diff --git a/thirdparty/etcpak/ProcessRGB.hpp b/thirdparty/etcpak/ProcessRGB.hpp
index c5555a5bb1..043b46e636 100644
--- a/thirdparty/etcpak/ProcessRGB.hpp
+++ b/thirdparty/etcpak/ProcessRGB.hpp
@@ -4,10 +4,10 @@
#include <stdint.h>
void CompressEtc1Alpha( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width );
-void CompressEtc2Alpha( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width );
+void CompressEtc2Alpha( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width, bool useHeuristics );
void CompressEtc1Rgb( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width );
void CompressEtc1RgbDither( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width );
-void CompressEtc2Rgb( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width );
-void CompressEtc2Rgba( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width );
+void CompressEtc2Rgb( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width, bool useHeuristics );
+void CompressEtc2Rgba( const uint32_t* src, uint64_t* dst, uint32_t blocks, size_t width, bool useHeuristics );
#endif
diff --git a/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h b/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h
index 20b9e54014..f48f1304d6 100644
--- a/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h
+++ b/thirdparty/glslang/SPIRV/GLSL.ext.EXT.h
@@ -36,6 +36,8 @@ static const char* const E_SPV_EXT_fragment_fully_covered = "SPV_EXT_fragment_fu
static const char* const E_SPV_EXT_fragment_invocation_density = "SPV_EXT_fragment_invocation_density";
static const char* const E_SPV_EXT_demote_to_helper_invocation = "SPV_EXT_demote_to_helper_invocation";
static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_atomic_float_add";
+static const char* const E_SPV_EXT_shader_atomic_float16_add = "SPV_EXT_shader_atomic_float16_add";
+static const char* const E_SPV_EXT_shader_atomic_float_min_max = "SPV_EXT_shader_atomic_float_min_max";
static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64";
#endif // #ifndef GLSLextEXT_H
diff --git a/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h b/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h
index 9610c6eeee..5eb3e94482 100644
--- a/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h
+++ b/thirdparty/glslang/SPIRV/GLSL.ext.KHR.h
@@ -50,5 +50,7 @@ static const char* const E_SPV_KHR_ray_tracing = "SPV_KHR_ray_t
static const char* const E_SPV_KHR_ray_query = "SPV_KHR_ray_query";
static const char* const E_SPV_KHR_fragment_shading_rate = "SPV_KHR_fragment_shading_rate";
static const char* const E_SPV_KHR_terminate_invocation = "SPV_KHR_terminate_invocation";
+static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_workgroup_memory_explicit_layout";
+static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subgroup_uniform_control_flow";
#endif // #ifndef GLSLextKHR_H
diff --git a/thirdparty/glslang/SPIRV/GLSL.ext.NV.h b/thirdparty/glslang/SPIRV/GLSL.ext.NV.h
index 50146da104..93c98bf626 100644
--- a/thirdparty/glslang/SPIRV/GLSL.ext.NV.h
+++ b/thirdparty/glslang/SPIRV/GLSL.ext.NV.h
@@ -69,6 +69,9 @@ const char* const E_SPV_NV_mesh_shader = "SPV_NV_mesh_shader";
//SPV_NV_raytracing
const char* const E_SPV_NV_ray_tracing = "SPV_NV_ray_tracing";
+//SPV_NV_ray_tracing_motion_blur
+const char* const E_SPV_NV_ray_tracing_motion_blur = "SPV_NV_ray_tracing_motion_blur";
+
//SPV_NV_shading_rate
const char* const E_SPV_NV_shading_rate = "SPV_NV_shading_rate";
diff --git a/thirdparty/glslang/SPIRV/GlslangToSpv.cpp b/thirdparty/glslang/SPIRV/GlslangToSpv.cpp
index 1adebef878..c323bcdb09 100644
--- a/thirdparty/glslang/SPIRV/GlslangToSpv.cpp
+++ b/thirdparty/glslang/SPIRV/GlslangToSpv.cpp
@@ -160,6 +160,7 @@ protected:
spv::SelectionControlMask TranslateSwitchControl(const glslang::TIntermSwitch&) const;
spv::LoopControlMask TranslateLoopControl(const glslang::TIntermLoop&, std::vector<unsigned int>& operands) const;
spv::StorageClass TranslateStorageClass(const glslang::TType&);
+ void TranslateLiterals(const glslang::TVector<const glslang::TIntermConstantUnion*>&, std::vector<unsigned>&) const;
void addIndirectionIndexCapabilities(const glslang::TType& baseType, const glslang::TType& indexType);
spv::Id createSpvVariable(const glslang::TIntermSymbol*, spv::Id forcedType);
spv::Id getSampledType(const glslang::TSampler&);
@@ -178,6 +179,7 @@ protected:
spv::Id accessChainLoad(const glslang::TType& type);
void accessChainStore(const glslang::TType& type, spv::Id rvalue);
void multiTypeStore(const glslang::TType&, spv::Id rValue);
+ spv::Id convertLoadedBoolInUniformToUint(const glslang::TType& type, spv::Id nominalTypeId, spv::Id loadedId);
glslang::TLayoutPacking getExplicitLayout(const glslang::TType& type) const;
int getArrayStride(const glslang::TType& arrayType, glslang::TLayoutPacking, glslang::TLayoutMatrix);
int getMatrixStride(const glslang::TType& matrixType, glslang::TLayoutPacking, glslang::TLayoutMatrix);
@@ -255,17 +257,17 @@ protected:
bool nanMinMaxClamp; // true if use NMin/NMax/NClamp instead of FMin/FMax/FClamp
spv::Id stdBuiltins;
spv::Id nonSemanticDebugPrintf;
- std::unordered_map<const char*, spv::Id> extBuiltinMap;
+ std::unordered_map<std::string, spv::Id> extBuiltinMap;
- std::unordered_map<int, spv::Id> symbolValues;
- std::unordered_set<int> rValueParameters; // set of formal function parameters passed as rValues,
+ std::unordered_map<long long, spv::Id> symbolValues;
+ std::unordered_set<long long> rValueParameters; // set of formal function parameters passed as rValues,
// rather than a pointer
std::unordered_map<std::string, spv::Function*> functionMap;
std::unordered_map<const glslang::TTypeList*, spv::Id> structMap[glslang::ElpCount][glslang::ElmCount];
// for mapping glslang block indices to spv indices (e.g., due to hidden members):
- std::unordered_map<int, std::vector<int>> memberRemapper;
+ std::unordered_map<long long, std::vector<int>> memberRemapper;
// for mapping glslang symbol struct to symbol Id
- std::unordered_map<const glslang::TTypeList*, int> glslangTypeToIdMap;
+ std::unordered_map<const glslang::TTypeList*, long long> glslangTypeToIdMap;
std::stack<bool> breakForLoop; // false means break for switch
std::unordered_map<std::string, const glslang::TIntermSymbol*> counterOriginator;
// Map pointee types for EbtReference to their forward pointers
@@ -380,6 +382,7 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useSto
case glslang::EvqBuffer: return useStorageBuffer ? spv::DecorationBlock : spv::DecorationBufferBlock;
case glslang::EvqVaryingIn: return spv::DecorationBlock;
case glslang::EvqVaryingOut: return spv::DecorationBlock;
+ case glslang::EvqShared: return spv::DecorationBlock;
#ifndef GLSLANG_WEB
case glslang::EvqPayload: return spv::DecorationBlock;
case glslang::EvqPayloadIn: return spv::DecorationBlock;
@@ -436,6 +439,7 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::T
break;
case glslang::EbtBlock:
switch (type.getQualifier().storage) {
+ case glslang::EvqShared:
case glslang::EvqUniform:
case glslang::EvqBuffer:
switch (type.getQualifier().layoutPacking) {
@@ -1029,6 +1033,10 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
return spv::BuiltInIncomingRayFlagsKHR;
case glslang::EbvGeometryIndex:
return spv::BuiltInRayGeometryIndexKHR;
+ case glslang::EbvCurrentRayTimeNV:
+ builder.addExtension(spv::E_SPV_NV_ray_tracing_motion_blur);
+ builder.addCapability(spv::CapabilityRayTracingMotionBlurNV);
+ return spv::BuiltInCurrentRayTimeNV;
// barycentrics
case glslang::EbvBaryCoordNV:
@@ -1247,6 +1255,10 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
{
if (type.getBasicType() == glslang::EbtRayQuery)
return spv::StorageClassPrivate;
+#ifndef GLSLANG_WEB
+ if (type.getQualifier().isSpirvByReference())
+ return spv::StorageClassFunction;
+#endif
if (type.getQualifier().isPipeInput())
return spv::StorageClassInput;
if (type.getQualifier().isPipeOutput())
@@ -1278,6 +1290,12 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
return spv::StorageClassUniformConstant;
}
+ if (type.getQualifier().storage == glslang::EvqShared && type.getBasicType() == glslang::EbtBlock) {
+ builder.addExtension(spv::E_SPV_KHR_workgroup_memory_explicit_layout);
+ builder.addCapability(spv::CapabilityWorkgroupMemoryExplicitLayoutKHR);
+ return spv::StorageClassWorkgroup;
+ }
+
switch (type.getQualifier().storage) {
case glslang::EvqGlobal: return spv::StorageClassPrivate;
case glslang::EvqConstReadOnly: return spv::StorageClassFunction;
@@ -1289,6 +1307,7 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
case glslang::EvqHitAttr: return spv::StorageClassHitAttributeKHR;
case glslang::EvqCallableData: return spv::StorageClassCallableDataKHR;
case glslang::EvqCallableDataIn: return spv::StorageClassIncomingCallableDataKHR;
+ case glslang::EvqSpirvStorageClass: return static_cast<spv::StorageClass>(type.getQualifier().spirvStorageClass);
#endif
default:
assert(0);
@@ -1298,6 +1317,52 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
return spv::StorageClassFunction;
}
+// Translate glslang constants to SPIR-V literals
+void TGlslangToSpvTraverser::TranslateLiterals(const glslang::TVector<const glslang::TIntermConstantUnion*>& constants,
+ std::vector<unsigned>& literals) const
+{
+ for (auto constant : constants) {
+ if (constant->getBasicType() == glslang::EbtFloat) {
+ float floatValue = static_cast<float>(constant->getConstArray()[0].getDConst());
+ unsigned literal = *reinterpret_cast<unsigned*>(&floatValue);
+ literals.push_back(literal);
+ } else if (constant->getBasicType() == glslang::EbtInt) {
+ unsigned literal = constant->getConstArray()[0].getIConst();
+ literals.push_back(literal);
+ } else if (constant->getBasicType() == glslang::EbtUint) {
+ unsigned literal = constant->getConstArray()[0].getUConst();
+ literals.push_back(literal);
+ } else if (constant->getBasicType() == glslang::EbtBool) {
+ unsigned literal = constant->getConstArray()[0].getBConst();
+ literals.push_back(literal);
+ } else if (constant->getBasicType() == glslang::EbtString) {
+ auto str = constant->getConstArray()[0].getSConst()->c_str();
+ unsigned literal = 0;
+ char* literalPtr = reinterpret_cast<char*>(&literal);
+ unsigned charCount = 0;
+ char ch = 0;
+ do {
+ ch = *(str++);
+ *(literalPtr++) = ch;
+ ++charCount;
+ if (charCount == 4) {
+ literals.push_back(literal);
+ literalPtr = reinterpret_cast<char*>(&literal);
+ charCount = 0;
+ }
+ } while (ch != 0);
+
+ // Partial literal is padded with 0
+ if (charCount > 0) {
+ for (; charCount < 4; ++charCount)
+ *(literalPtr++) = 0;
+ literals.push_back(literal);
+ }
+ } else
+ assert(0); // Unexpected type
+ }
+}
+
// Add capabilities pertaining to how an array is indexed.
void TGlslangToSpvTraverser::addIndirectionIndexCapabilities(const glslang::TType& baseType,
const glslang::TType& indexType)
@@ -1485,7 +1550,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
if (glslangIntermediate->usingPhysicalStorageBuffer()) {
addressingModel = spv::AddressingModelPhysicalStorageBuffer64EXT;
- builder.addIncorporatedExtension(spv::E_SPV_EXT_physical_storage_buffer, spv::Spv_1_5);
+ builder.addIncorporatedExtension(spv::E_SPV_KHR_physical_storage_buffer, spv::Spv_1_5);
builder.addCapability(spv::CapabilityPhysicalStorageBufferAddressesEXT);
}
if (glslangIntermediate->usingVulkanMemoryModel()) {
@@ -1518,6 +1583,13 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
builder.addCapability(spv::CapabilityRayTraversalPrimitiveCullingKHR);
}
+#ifndef GLSLANG_WEB
+ if (glslangIntermediate->getSubgroupUniformControlFlow()) {
+ builder.addExtension(spv::E_SPV_KHR_subgroup_uniform_control_flow);
+ builder.addExecutionMode(shaderEntry, spv::ExecutionModeSubgroupUniformControlFlowKHR);
+ }
+#endif
+
unsigned int mode;
switch (glslangIntermediate->getStage()) {
case EShLangVertex:
@@ -1543,15 +1615,16 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
builder.addExtension(spv::E_SPV_KHR_post_depth_coverage);
}
- if (glslangIntermediate->getDepth() != glslang::EldUnchanged && glslangIntermediate->isDepthReplacing())
+ if (glslangIntermediate->isDepthReplacing())
builder.addExecutionMode(shaderEntry, spv::ExecutionModeDepthReplacing);
#ifndef GLSLANG_WEB
switch(glslangIntermediate->getDepth()) {
- case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break;
- case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break;
- default: mode = spv::ExecutionModeMax; break;
+ case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break;
+ case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break;
+ case glslang::EldUnchanged: mode = spv::ExecutionModeDepthUnchanged; break;
+ default: mode = spv::ExecutionModeMax; break;
}
if (mode != spv::ExecutionModeMax)
builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode);
@@ -1719,6 +1792,53 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
default:
break;
}
+
+#ifndef GLSLANG_WEB
+ //
+ // Add SPIR-V requirements (GL_EXT_spirv_intrinsics)
+ //
+ if (glslangIntermediate->hasSpirvRequirement()) {
+ const glslang::TSpirvRequirement& spirvRequirement = glslangIntermediate->getSpirvRequirement();
+
+ // Add SPIR-V extension requirement
+ for (auto& extension : spirvRequirement.extensions)
+ builder.addExtension(extension.c_str());
+
+ // Add SPIR-V capability requirement
+ for (auto capability : spirvRequirement.capabilities)
+ builder.addCapability(static_cast<spv::Capability>(capability));
+ }
+
+ //
+ // Add SPIR-V execution mode qualifiers (GL_EXT_spirv_intrinsics)
+ //
+ if (glslangIntermediate->hasSpirvExecutionMode()) {
+ const glslang::TSpirvExecutionMode spirvExecutionMode = glslangIntermediate->getSpirvExecutionMode();
+
+ // Add spirv_execution_mode
+ for (auto& mode : spirvExecutionMode.modes) {
+ if (!mode.second.empty()) {
+ std::vector<unsigned> literals;
+ TranslateLiterals(mode.second, literals);
+ builder.addExecutionMode(shaderEntry, static_cast<spv::ExecutionMode>(mode.first), literals);
+ } else
+ builder.addExecutionMode(shaderEntry, static_cast<spv::ExecutionMode>(mode.first));
+ }
+
+ // Add spirv_execution_mode_id
+ for (auto& modeId : spirvExecutionMode.modeIds) {
+ std::vector<spv::Id> operandIds;
+ assert(!modeId.second.empty());
+ for (auto extraOperand : modeId.second) {
+ int nextConst = 0;
+ spv::Id operandId = createSpvConstantFromConstUnionArray(
+ extraOperand->getType(), extraOperand->getConstArray(), nextConst, false);
+ operandIds.push_back(operandId);
+ }
+ builder.addExecutionModeId(shaderEntry, static_cast<spv::ExecutionMode>(modeId.first), operandIds);
+ }
+ }
+#endif
}
// Finish creating SPV, after the traversal is complete.
@@ -1986,7 +2106,7 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
{
// This may be, e.g., an anonymous block-member selection, which generally need
// index remapping due to hidden members in anonymous blocks.
- int glslangId = glslangTypeToIdMap[node->getLeft()->getType().getStruct()];
+ long long glslangId = glslangTypeToIdMap[node->getLeft()->getType().getStruct()];
if (memberRemapper.find(glslangId) != memberRemapper.end()) {
std::vector<int>& remapper = memberRemapper[glslangId];
assert(remapper.size() > 0);
@@ -2116,6 +2236,49 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
}
}
+spv::Id TGlslangToSpvTraverser::convertLoadedBoolInUniformToUint(const glslang::TType& type,
+ spv::Id nominalTypeId,
+ spv::Id loadedId)
+{
+ if (builder.isScalarType(nominalTypeId)) {
+ // Conversion for bool
+ spv::Id boolType = builder.makeBoolType();
+ if (nominalTypeId != boolType)
+ return builder.createBinOp(spv::OpINotEqual, boolType, loadedId, builder.makeUintConstant(0));
+ } else if (builder.isVectorType(nominalTypeId)) {
+ // Conversion for bvec
+ int vecSize = builder.getNumTypeComponents(nominalTypeId);
+ spv::Id bvecType = builder.makeVectorType(builder.makeBoolType(), vecSize);
+ if (nominalTypeId != bvecType)
+ loadedId = builder.createBinOp(spv::OpINotEqual, bvecType, loadedId,
+ makeSmearedConstant(builder.makeUintConstant(0), vecSize));
+ } else if (builder.isArrayType(nominalTypeId)) {
+ // Conversion for bool array
+ spv::Id boolArrayTypeId = convertGlslangToSpvType(type);
+ if (nominalTypeId != boolArrayTypeId)
+ {
+ // Use OpCopyLogical from SPIR-V 1.4 if available.
+ if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4)
+ return builder.createUnaryOp(spv::OpCopyLogical, boolArrayTypeId, loadedId);
+
+ glslang::TType glslangElementType(type, 0);
+ spv::Id elementNominalTypeId = builder.getContainedTypeId(nominalTypeId);
+ std::vector<spv::Id> constituents;
+ for (int index = 0; index < type.getOuterArraySize(); ++index) {
+ // get the element
+ spv::Id elementValue = builder.createCompositeExtract(loadedId, elementNominalTypeId, index);
+
+ // recursively convert it
+ spv::Id elementConvertedValue = convertLoadedBoolInUniformToUint(glslangElementType, elementNominalTypeId, elementValue);
+ constituents.push_back(elementConvertedValue);
+ }
+ return builder.createCompositeConstruct(boolArrayTypeId, constituents);
+ }
+ }
+
+ return loadedId;
+}
+
// Figure out what, if any, type changes are needed when accessing a specific built-in.
// Returns <the type SPIR-V requires for declarion, the type to translate to on use>.
// Also see comment for 'forceType', regarding tracking SPIR-V-required types.
@@ -2292,7 +2455,8 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
if (node->getOp() == glslang::EOpAtomicCounterIncrement ||
node->getOp() == glslang::EOpAtomicCounterDecrement ||
node->getOp() == glslang::EOpAtomicCounter ||
- node->getOp() == glslang::EOpInterpolateAtCentroid ||
+ (node->getOp() == glslang::EOpInterpolateAtCentroid &&
+ glslangIntermediate->getSource() != glslang::EShSourceHlsl) ||
node->getOp() == glslang::EOpRayQueryProceed ||
node->getOp() == glslang::EOpRayQueryGetRayTMin ||
node->getOp() == glslang::EOpRayQueryGetRayFlags ||
@@ -2300,10 +2464,14 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
node->getOp() == glslang::EOpRayQueryGetWorldRayDirection ||
node->getOp() == glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque ||
node->getOp() == glslang::EOpRayQueryTerminate ||
- node->getOp() == glslang::EOpRayQueryConfirmIntersection) {
+ node->getOp() == glslang::EOpRayQueryConfirmIntersection ||
+ (node->getOp() == glslang::EOpSpirvInst && operandNode->getAsTyped()->getQualifier().isSpirvByReference())) {
operand = builder.accessChainGetLValue(); // Special case l-value operands
lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType());
+ } else if (operandNode->getAsTyped()->getQualifier().isSpirvLiteral()) {
+ // Will be translated to a literal value, make a placeholder here
+ operand = spv::NoResult;
} else
#endif
{
@@ -2324,6 +2492,38 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
result = createUnaryOperation(node->getOp(), decorations, resultType(), operand,
node->getOperand()->getBasicType(), lvalueCoherentFlags);
+#ifndef GLSLANG_WEB
+ // it could be attached to a SPIR-V intruction
+ if (!result) {
+ if (node->getOp() == glslang::EOpSpirvInst) {
+ const auto& spirvInst = node->getSpirvInstruction();
+ if (spirvInst.set == "") {
+ spv::IdImmediate idImmOp = {true, operand};
+ if (operandNode->getAsTyped()->getQualifier().isSpirvLiteral()) {
+ // Translate the constant to a literal value
+ std::vector<unsigned> literals;
+ glslang::TVector<const glslang::TIntermConstantUnion*> constants;
+ constants.push_back(operandNode->getAsConstantUnion());
+ TranslateLiterals(constants, literals);
+ idImmOp = {false, literals[0]};
+ }
+
+ if (node->getBasicType() == glslang::EbtVoid)
+ builder.createNoResultOp(static_cast<spv::Op>(spirvInst.id), {idImmOp});
+ else
+ result = builder.createOp(static_cast<spv::Op>(spirvInst.id), resultType(), {idImmOp});
+ } else {
+ result = builder.createBuiltinCall(
+ resultType(), spirvInst.set == "GLSL.std.450" ? stdBuiltins : getExtBuiltins(spirvInst.set.c_str()),
+ spirvInst.id, {operand});
+ }
+
+ if (node->getBasicType() == glslang::EbtVoid)
+ return false; // done with this node
+ }
+ }
+#endif
+
if (result) {
if (invertedType) {
result = createInvertedSwizzle(decorations.precision, *node->getOperand(), result);
@@ -2775,6 +2975,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
break;
case glslang::EOpAtomicAdd:
+ case glslang::EOpAtomicSubtract:
case glslang::EOpAtomicMin:
case glslang::EOpAtomicMax:
case glslang::EOpAtomicAnd:
@@ -2821,6 +3022,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case glslang::EOpIgnoreIntersectionNV:
case glslang::EOpTerminateRayNV:
case glslang::EOpTraceNV:
+ case glslang::EOpTraceRayMotionNV:
case glslang::EOpTraceKHR:
case glslang::EOpExecuteCallableNV:
case glslang::EOpExecuteCallableKHR:
@@ -2946,6 +3148,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
break;
case glslang::EOpAtomicAdd:
+ case glslang::EOpAtomicSubtract:
case glslang::EOpAtomicMin:
case glslang::EOpAtomicMax:
case glslang::EOpAtomicAnd:
@@ -2966,7 +3169,13 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case glslang::EOpInterpolateAtOffset:
case glslang::EOpInterpolateAtVertex:
if (arg == 0) {
- lvalue = true;
+ // If GLSL, use the address of the interpolant argument.
+ // If HLSL, use an internal version of OpInterolates that takes
+ // the rvalue of the interpolant. A fixup pass in spirv-opt
+ // legalization will remove the OpLoad and convert to an lvalue.
+ // Had to do this because legalization will only propagate a
+ // builtin into an rvalue.
+ lvalue = glslangIntermediate->getSource() != glslang::EShSourceHlsl;
// Does it need a swizzle inversion? If so, evaluation is inverted;
// operate first on the swizzle base, then apply the swizzle.
@@ -3012,6 +3221,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
if (arg == 1)
lvalue = true;
break;
+ case glslang::EOpSpirvInst:
+ if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvByReference())
+ lvalue = true;
+ break;
#endif
default:
break;
@@ -3109,15 +3322,22 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
bool cond = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getBConst();
operands.push_back(builder.makeIntConstant(cond ? 1 : 0));
} else if ((arg == 10 && glslangOp == glslang::EOpTraceKHR) ||
+ (arg == 11 && glslangOp == glslang::EOpTraceRayMotionNV) ||
(arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR)) {
- const int opdNum = glslangOp == glslang::EOpTraceKHR ? 10 : 1;
- const int set = glslangOp == glslang::EOpTraceKHR ? 0 : 1;
+ const int opdNum = glslangOp == glslang::EOpTraceKHR ? 10 : (glslangOp == glslang::EOpTraceRayMotionNV ? 11 : 1);
+ const int set = glslangOp == glslang::EOpExecuteCallableKHR ? 1 : 0;
+
const int location = glslangOperands[opdNum]->getAsConstantUnion()->getConstArray()[0].getUConst();
auto itNode = locationToSymbol[set].find(location);
visitSymbol(itNode->second);
spv::Id symId = getSymbolId(itNode->second);
operands.push_back(symId);
- } else {
+#ifndef GLSLANG_WEB
+ } else if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvLiteral()) {
+ // Will be translated to a literal value, make a placeholder here
+ operands.push_back(spv::NoResult);
+#endif
+ } else {
operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType()));
}
}
@@ -3155,8 +3375,38 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
#endif
if (atomic) {
// Handle all atomics
- result = createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType(),
+ glslang::TBasicType typeProxy = (node->getOp() == glslang::EOpAtomicStore)
+ ? node->getSequence()[0]->getAsTyped()->getBasicType() : node->getBasicType();
+ result = createAtomicOperation(node->getOp(), precision, resultType(), operands, typeProxy,
lvalueCoherentFlags);
+#ifndef GLSLANG_WEB
+ } else if (node->getOp() == glslang::EOpSpirvInst) {
+ const auto& spirvInst = node->getSpirvInstruction();
+ if (spirvInst.set == "") {
+ std::vector<spv::IdImmediate> idImmOps;
+ for (int i = 0; i < glslangOperands.size(); ++i) {
+ if (glslangOperands[i]->getAsTyped()->getQualifier().isSpirvLiteral()) {
+ // Translate the constant to a literal value
+ std::vector<unsigned> literals;
+ glslang::TVector<const glslang::TIntermConstantUnion*> constants;
+ constants.push_back(glslangOperands[i]->getAsConstantUnion());
+ TranslateLiterals(constants, literals);
+ idImmOps.push_back({false, literals[0]});
+ } else
+ idImmOps.push_back({true, operands[i]});
+ }
+
+ if (node->getBasicType() == glslang::EbtVoid)
+ builder.createNoResultOp(static_cast<spv::Op>(spirvInst.id), idImmOps);
+ else
+ result = builder.createOp(static_cast<spv::Op>(spirvInst.id), resultType(), idImmOps);
+ } else {
+ result = builder.createBuiltinCall(
+ resultType(), spirvInst.set == "GLSL.std.450" ? stdBuiltins : getExtBuiltins(spirvInst.set.c_str()),
+ spirvInst.id, operands);
+ }
+ noReturnValue = node->getBasicType() == glslang::EbtVoid;
+#endif
} else if (node->getOp() == glslang::EOpDebugPrintf) {
if (!nonSemanticDebugPrintf) {
nonSemanticDebugPrintf = builder.import("NonSemantic.DebugPrintf");
@@ -3437,6 +3687,11 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* node)
{
+#ifndef GLSLANG_WEB
+ if (node->getQualifier().isSpirvLiteral())
+ return; // Translated to a literal value, skip further processing
+#endif
+
int nextConst = 0;
spv::Id constant = createSpvConstantFromConstUnionArray(node->getType(), node->getConstArray(), nextConst, false);
@@ -3623,6 +3878,11 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
break;
#endif
default:
+ if (storageClass == spv::StorageClassWorkgroup &&
+ node->getType().getBasicType() == glslang::EbtBlock) {
+ builder.addCapability(spv::CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR);
+ break;
+ }
if (node->getType().contains16BitFloat())
builder.addCapability(spv::CapabilityFloat16);
if (node->getType().contains16BitInt())
@@ -3641,6 +3901,9 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
} else if (storageClass == spv::StorageClassStorageBuffer) {
builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
builder.addCapability(spv::CapabilityStorageBuffer8BitAccess);
+ } else if (storageClass == spv::StorageClassWorkgroup &&
+ node->getType().getBasicType() == glslang::EbtBlock) {
+ builder.addCapability(spv::CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR);
} else {
builder.addCapability(spv::CapabilityInt8);
}
@@ -3652,13 +3915,14 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
spv::Id initializer = spv::NoResult;
- if (node->getType().getQualifier().storage == glslang::EvqUniform &&
- !node->getConstArray().empty()) {
- int nextConst = 0;
- initializer = createSpvConstantFromConstUnionArray(node->getType(),
- node->getConstArray(),
- nextConst,
- false /* specConst */);
+ if (node->getType().getQualifier().storage == glslang::EvqUniform && !node->getConstArray().empty()) {
+ int nextConst = 0;
+ initializer = createSpvConstantFromConstUnionArray(node->getType(),
+ node->getConstArray(),
+ nextConst,
+ false /* specConst */);
+ } else if (node->getType().getQualifier().isNullInit()) {
+ initializer = builder.makeNullConstant(spvType);
}
return builder.createVariable(spv::NoPrecision, storageClass, spvType, name, initializer);
@@ -3876,6 +4140,77 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
case glslang::EbtString:
// no type used for OpString
return 0;
+#ifndef GLSLANG_WEB
+ case glslang::EbtSpirvType: {
+ // GL_EXT_spirv_intrinsics
+ const auto& spirvType = type.getSpirvType();
+ const auto& spirvInst = spirvType.spirvInst;
+
+ std::vector<spv::Id> operands;
+ for (const auto& typeParam : spirvType.typeParams) {
+ if (typeParam.isConstant) {
+ // Constant expression
+ if (typeParam.constant->isLiteral()) {
+ if (typeParam.constant->getBasicType() == glslang::EbtFloat) {
+ float floatValue = static_cast<float>(typeParam.constant->getConstArray()[0].getDConst());
+ unsigned literal = *reinterpret_cast<unsigned*>(&floatValue);
+ operands.push_back(literal);
+ } else if (typeParam.constant->getBasicType() == glslang::EbtInt) {
+ unsigned literal = typeParam.constant->getConstArray()[0].getIConst();
+ operands.push_back(literal);
+ } else if (typeParam.constant->getBasicType() == glslang::EbtUint) {
+ unsigned literal = typeParam.constant->getConstArray()[0].getUConst();
+ operands.push_back(literal);
+ } else if (typeParam.constant->getBasicType() == glslang::EbtBool) {
+ unsigned literal = typeParam.constant->getConstArray()[0].getBConst();
+ operands.push_back(literal);
+ } else if (typeParam.constant->getBasicType() == glslang::EbtString) {
+ auto str = typeParam.constant->getConstArray()[0].getSConst()->c_str();
+ unsigned literal = 0;
+ char* literalPtr = reinterpret_cast<char*>(&literal);
+ unsigned charCount = 0;
+ char ch = 0;
+ do {
+ ch = *(str++);
+ *(literalPtr++) = ch;
+ ++charCount;
+ if (charCount == 4) {
+ operands.push_back(literal);
+ literalPtr = reinterpret_cast<char*>(&literal);
+ charCount = 0;
+ }
+ } while (ch != 0);
+
+ // Partial literal is padded with 0
+ if (charCount > 0) {
+ for (; charCount < 4; ++charCount)
+ *(literalPtr++) = 0;
+ operands.push_back(literal);
+ }
+ } else
+ assert(0); // Unexpected type
+ } else {
+ int nextConst = 0;
+ spv::Id constant = createSpvConstantFromConstUnionArray(
+ typeParam.constant->getType(), typeParam.constant->getConstArray(), nextConst, false);
+ operands.push_back(constant);
+ }
+ } else {
+ // Type specifier
+ spv::Id typeId = convertGlslangToSpvType(*typeParam.type);
+ operands.push_back(typeId);
+ }
+ }
+
+ if (spirvInst.set == "")
+ spvType = builder.createOp(static_cast<spv::Op>(spirvInst.id), spv::NoType, operands);
+ else {
+ spvType = builder.createBuiltinCall(
+ spv::NoType, getExtBuiltins(spirvInst.set.c_str()), spirvInst.id, operands);
+ }
+ break;
+ }
+#endif
default:
assert(0);
break;
@@ -4072,7 +4407,6 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
{
// Name and decorate the non-hidden members
int offset = -1;
- int locationOffset = 0; // for use within the members of this struct
bool memberLocationInvalid = type.isArrayOfArrays() ||
(type.isArray() && (type.getQualifier().isArrayedIo(glslangIntermediate->getStage()) == false));
for (int i = 0; i < (int)glslangMembers->size(); i++) {
@@ -4130,10 +4464,6 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
if (!memberLocationInvalid && memberQualifier.hasLocation())
builder.addMemberDecoration(spvType, member, spv::DecorationLocation, memberQualifier.layoutLocation);
- if (qualifier.hasLocation()) // track for upcoming inheritance
- locationOffset += glslangIntermediate->computeTypeLocationSize(
- glslangMember, glslangIntermediate->getStage());
-
// component, XFB, others
if (glslangMember.getQualifier().hasComponent())
builder.addMemberDecoration(spvType, member, spv::DecorationComponent,
@@ -4189,6 +4519,38 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
builder.addCapability(spv::CapabilityGeometryShaderPassthroughNV);
builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough);
}
+
+ //
+ // Add SPIR-V decorations for members (GL_EXT_spirv_intrinsics)
+ //
+ if (glslangMember.getQualifier().hasSprivDecorate()) {
+ const glslang::TSpirvDecorate& spirvDecorate = glslangMember.getQualifier().getSpirvDecorate();
+
+ // Add spirv_decorate
+ for (auto& decorate : spirvDecorate.decorates) {
+ if (!decorate.second.empty()) {
+ std::vector<unsigned> literals;
+ TranslateLiterals(decorate.second, literals);
+ builder.addMemberDecoration(spvType, member, static_cast<spv::Decoration>(decorate.first), literals);
+ }
+ else
+ builder.addMemberDecoration(spvType, member, static_cast<spv::Decoration>(decorate.first));
+ }
+
+ // spirv_decorate_id not applied to members
+ assert(spirvDecorate.decorateIds.empty());
+
+ // Add spirv_decorate_string
+ for (auto& decorateString : spirvDecorate.decorateStrings) {
+ std::vector<const char*> strings;
+ assert(!decorateString.second.empty());
+ for (auto extraOperand : decorateString.second) {
+ const char* string = extraOperand->getConstArray()[0].getSConst()->c_str();
+ strings.push_back(string);
+ }
+ builder.addDecoration(spvType, static_cast<spv::Decoration>(decorateString.first), strings);
+ }
+ }
#endif
}
@@ -4207,6 +4569,8 @@ spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arra
glslang::TIntermTyped* specNode = arraySizes.getDimNode(dim);
if (specNode != nullptr) {
builder.clearAccessChain();
+ SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder);
+ spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
specNode->traverse(this);
return accessChainLoad(specNode->getAsTyped()->getType());
}
@@ -4242,19 +4606,7 @@ spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type)
// Need to convert to abstract types when necessary
if (type.getBasicType() == glslang::EbtBool) {
- if (builder.isScalarType(nominalTypeId)) {
- // Conversion for bool
- spv::Id boolType = builder.makeBoolType();
- if (nominalTypeId != boolType)
- loadedId = builder.createBinOp(spv::OpINotEqual, boolType, loadedId, builder.makeUintConstant(0));
- } else if (builder.isVectorType(nominalTypeId)) {
- // Conversion for bvec
- int vecSize = builder.getNumTypeComponents(nominalTypeId);
- spv::Id bvecType = builder.makeVectorType(builder.makeBoolType(), vecSize);
- if (nominalTypeId != bvecType)
- loadedId = builder.createBinOp(spv::OpINotEqual, bvecType, loadedId,
- makeSmearedConstant(builder.makeUintConstant(0), vecSize));
- }
+ loadedId = convertLoadedBoolInUniformToUint(type, nominalTypeId, loadedId);
}
return loadedId;
@@ -4406,6 +4758,7 @@ glslang::TLayoutPacking TGlslangToSpvTraverser::getExplicitLayout(const glslang:
// has to be a uniform or buffer block or task in/out blocks
if (type.getQualifier().storage != glslang::EvqUniform &&
type.getQualifier().storage != glslang::EvqBuffer &&
+ type.getQualifier().storage != glslang::EvqShared &&
!type.getQualifier().isTaskMemory())
return glslang::ElpNone;
@@ -4575,6 +4928,9 @@ bool TGlslangToSpvTraverser::originalParam(glslang::TStorageQualifier qualifier,
if (glslangIntermediate->getSource() == glslang::EShSourceHlsl)
return paramType.getBasicType() == glslang::EbtBlock;
return paramType.containsOpaque() || // sampler, etc.
+#ifndef GLSLANG_WEB
+ paramType.getQualifier().isSpirvByReference() || // spirv_by_reference
+#endif
(paramType.getBasicType() == glslang::EbtBlock && qualifier == glslang::EvqBuffer); // SSBO
}
@@ -4968,7 +5324,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
int components = node->getType().getVectorSize();
- if (node->getOp() == glslang::EOpTextureFetch) {
+ if (node->getOp() == glslang::EOpImageLoad ||
+ node->getOp() == glslang::EOpImageLoadLod ||
+ node->getOp() == glslang::EOpTextureFetch ||
+ node->getOp() == glslang::EOpTextureFetchOffset) {
// These must produce 4 components, per SPIR-V spec. We'll add a conversion constructor if needed.
// This will only happen through the HLSL path for operator[], so we do not have to handle e.g.
// the EOpTexture/Proj/Lod/etc family. It would be harmless to do so, but would need more logic
@@ -5530,7 +5889,7 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg
++lValueCount;
} else {
// process r-value, which involves a copy for a type mismatch
- if (function->getParamType(a) != convertGlslangToSpvType(*argTypes[a]) ||
+ if (function->getParamType(a) != builder.getTypeId(rValues[rValueCount]) ||
TranslatePrecisionDecoration(*argTypes[a]) != function->getParamPrecision(a))
{
spv::Id argCopy = builder.createVariable(function->getParamPrecision(a), spv::StorageClassFunction, function->getParamType(a), "arg");
@@ -6813,9 +7172,6 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
break;
case glslang::EOpConvPtrToUvec2:
case glslang::EOpConvUvec2ToPtr:
- if (builder.isVector(operand))
- builder.promoteIncorporatedExtension(spv::E_SPV_EXT_physical_storage_buffer,
- spv::E_SPV_KHR_physical_storage_buffer, spv::Spv_1_5);
convOp = spv::OpBitcast;
break;
#endif
@@ -6864,29 +7220,58 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
case glslang::EOpImageAtomicAdd:
case glslang::EOpAtomicCounterAdd:
opCode = spv::OpAtomicIAdd;
- if (typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) {
+ if (typeProxy == glslang::EbtFloat16 || typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) {
opCode = spv::OpAtomicFAddEXT;
builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_add);
- if (typeProxy == glslang::EbtFloat)
+ if (typeProxy == glslang::EbtFloat16) {
+ builder.addExtension(spv::E_SPV_EXT_shader_atomic_float16_add);
+ builder.addCapability(spv::CapabilityAtomicFloat16AddEXT);
+ } else if (typeProxy == glslang::EbtFloat) {
builder.addCapability(spv::CapabilityAtomicFloat32AddEXT);
- else
+ } else {
builder.addCapability(spv::CapabilityAtomicFloat64AddEXT);
+ }
}
break;
+ case glslang::EOpAtomicSubtract:
case glslang::EOpAtomicCounterSubtract:
opCode = spv::OpAtomicISub;
break;
case glslang::EOpAtomicMin:
case glslang::EOpImageAtomicMin:
case glslang::EOpAtomicCounterMin:
- opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ?
- spv::OpAtomicUMin : spv::OpAtomicSMin;
+ if (typeProxy == glslang::EbtFloat16 || typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) {
+ opCode = spv::OpAtomicFMinEXT;
+ builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_min_max);
+ if (typeProxy == glslang::EbtFloat16)
+ builder.addCapability(spv::CapabilityAtomicFloat16MinMaxEXT);
+ else if (typeProxy == glslang::EbtFloat)
+ builder.addCapability(spv::CapabilityAtomicFloat32MinMaxEXT);
+ else
+ builder.addCapability(spv::CapabilityAtomicFloat64MinMaxEXT);
+ } else if (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) {
+ opCode = spv::OpAtomicUMin;
+ } else {
+ opCode = spv::OpAtomicSMin;
+ }
break;
case glslang::EOpAtomicMax:
case glslang::EOpImageAtomicMax:
case glslang::EOpAtomicCounterMax:
- opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ?
- spv::OpAtomicUMax : spv::OpAtomicSMax;
+ if (typeProxy == glslang::EbtFloat16 || typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) {
+ opCode = spv::OpAtomicFMaxEXT;
+ builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_min_max);
+ if (typeProxy == glslang::EbtFloat16)
+ builder.addCapability(spv::CapabilityAtomicFloat16MinMaxEXT);
+ else if (typeProxy == glslang::EbtFloat)
+ builder.addCapability(spv::CapabilityAtomicFloat32MinMaxEXT);
+ else
+ builder.addCapability(spv::CapabilityAtomicFloat64MinMaxEXT);
+ } else if (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) {
+ opCode = spv::OpAtomicUMax;
+ } else {
+ opCode = spv::OpAtomicSMax;
+ }
break;
case glslang::EOpAtomicAnd:
case glslang::EOpImageAtomicAnd:
@@ -6995,6 +7380,10 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
}
+ if (builder.getConstantScalar(scopeId) == spv::ScopeQueueFamily) {
+ builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
+ }
+
if (glslangIntermediate->usingVulkanMemoryModel() && builder.getConstantScalar(scopeId) == spv::ScopeDevice) {
builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR);
}
@@ -7940,6 +8329,11 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
case glslang::EOpTraceNV:
builder.createNoResultOp(spv::OpTraceNV, operands);
return 0;
+ case glslang::EOpTraceRayMotionNV:
+ builder.addExtension(spv::E_SPV_NV_ray_tracing_motion_blur);
+ builder.addCapability(spv::CapabilityRayTracingMotionBlurNV);
+ builder.createNoResultOp(spv::OpTraceRayMotionNV, operands);
+ return 0;
case glslang::EOpTraceKHR:
builder.createNoResultOp(spv::OpTraceRayKHR, operands);
return 0;
@@ -7991,7 +8385,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
opCode = spv::OpRayQueryGetIntersectionInstanceIdKHR;
break;
case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset:
- typeId = builder.makeIntType(32);
+ typeId = builder.makeUintType(32);
opCode = spv::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR;
break;
case glslang::EOpRayQueryGetIntersectionGeometryIndex:
@@ -8424,6 +8818,48 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
builder.addDecoration(id, symbol->getType().getQualifier().restrict ?
spv::DecorationRestrictPointerEXT : spv::DecorationAliasedPointerEXT);
}
+
+ //
+ // Add SPIR-V decorations for structure (GL_EXT_spirv_intrinsics)
+ //
+ if (symbol->getType().getQualifier().hasSprivDecorate()) {
+ const glslang::TSpirvDecorate& spirvDecorate = symbol->getType().getQualifier().getSpirvDecorate();
+
+ // Add spirv_decorate
+ for (auto& decorate : spirvDecorate.decorates) {
+ if (!decorate.second.empty()) {
+ std::vector<unsigned> literals;
+ TranslateLiterals(decorate.second, literals);
+ builder.addDecoration(id, static_cast<spv::Decoration>(decorate.first), literals);
+ }
+ else
+ builder.addDecoration(id, static_cast<spv::Decoration>(decorate.first));
+ }
+
+ // Add spirv_decorate_id
+ for (auto& decorateId : spirvDecorate.decorateIds) {
+ std::vector<spv::Id> operandIds;
+ assert(!decorateId.second.empty());
+ for (auto extraOperand : decorateId.second) {
+ int nextConst = 0;
+ spv::Id operandId = createSpvConstantFromConstUnionArray(
+ extraOperand->getType(), extraOperand->getConstArray(), nextConst, false);
+ operandIds.push_back(operandId);
+ }
+ builder.addDecoration(id, static_cast<spv::Decoration>(decorateId.first), operandIds);
+ }
+
+ // Add spirv_decorate_string
+ for (auto& decorateString : spirvDecorate.decorateStrings) {
+ std::vector<const char*> strings;
+ assert(!decorateString.second.empty());
+ for (auto extraOperand : decorateString.second) {
+ const char* string = extraOperand->getConstArray()[0].getSConst()->c_str();
+ strings.push_back(string);
+ }
+ builder.addDecoration(id, static_cast<spv::Decoration>(decorateString.first), strings);
+ }
+ }
#endif
return id;
diff --git a/thirdparty/glslang/SPIRV/SPVRemapper.cpp b/thirdparty/glslang/SPIRV/SPVRemapper.cpp
index 56d7f431a7..56d6d5d4a5 100644
--- a/thirdparty/glslang/SPIRV/SPVRemapper.cpp
+++ b/thirdparty/glslang/SPIRV/SPVRemapper.cpp
@@ -544,6 +544,9 @@ namespace spv {
// Extended instructions: currently, assume everything is an ID.
// TODO: add whatever data we need for exceptions to that
if (opCode == spv::OpExtInst) {
+
+ idFn(asId(word)); // Instruction set is an ID that also needs to be mapped
+
word += 2; // instruction set, and instruction from set
numOperands -= 2;
diff --git a/thirdparty/glslang/SPIRV/SpvBuilder.cpp b/thirdparty/glslang/SPIRV/SpvBuilder.cpp
index c8fbcc450e..e83306ebcb 100644
--- a/thirdparty/glslang/SPIRV/SpvBuilder.cpp
+++ b/thirdparty/glslang/SPIRV/SpvBuilder.cpp
@@ -743,6 +743,26 @@ Id Builder::getContainedTypeId(Id typeId, int member) const
}
}
+// Figure out the final resulting type of the access chain.
+Id Builder::getResultingAccessChainType() const
+{
+ assert(accessChain.base != NoResult);
+ Id typeId = getTypeId(accessChain.base);
+
+ assert(isPointerType(typeId));
+ typeId = getContainedTypeId(typeId);
+
+ for (int i = 0; i < (int)accessChain.indexChain.size(); ++i) {
+ if (isStructType(typeId)) {
+ assert(isConstantScalar(accessChain.indexChain[i]));
+ typeId = getContainedTypeId(typeId, getConstantScalar(accessChain.indexChain[i]));
+ } else
+ typeId = getContainedTypeId(typeId, accessChain.indexChain[i]);
+ }
+
+ return typeId;
+}
+
// Return the immediately contained type of a given composite type.
Id Builder::getContainedTypeId(Id typeId) const
{
@@ -869,6 +889,30 @@ bool Builder::isSpecConstantOpCode(Op opcode) const
}
}
+Id Builder::makeNullConstant(Id typeId)
+{
+ Instruction* constant;
+
+ // See if we already made it.
+ Id existing = NoResult;
+ for (int i = 0; i < (int)nullConstants.size(); ++i) {
+ constant = nullConstants[i];
+ if (constant->getTypeId() == typeId)
+ existing = constant->getResultId();
+ }
+
+ if (existing != NoResult)
+ return existing;
+
+ // Make it
+ Instruction* c = new Instruction(getUniqueId(), typeId, OpConstantNull);
+ constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(c));
+ nullConstants.push_back(c);
+ module.mapInstruction(c);
+
+ return c->getResultId();
+}
+
Id Builder::makeBoolConstant(bool b, bool specConstant)
{
Id typeId = makeBoolType();
@@ -1561,16 +1605,7 @@ Id Builder::createLoad(Id lValue, spv::Decoration precision, spv::MemoryAccessMa
Id Builder::createAccessChain(StorageClass storageClass, Id base, const std::vector<Id>& offsets)
{
// Figure out the final resulting type.
- spv::Id typeId = getTypeId(base);
- assert(isPointerType(typeId) && offsets.size() > 0);
- typeId = getContainedTypeId(typeId);
- for (int i = 0; i < (int)offsets.size(); ++i) {
- if (isStructType(typeId)) {
- assert(isConstantScalar(offsets[i]));
- typeId = getContainedTypeId(typeId, getConstantScalar(offsets[i]));
- } else
- typeId = getContainedTypeId(typeId, offsets[i]);
- }
+ Id typeId = getResultingAccessChainType();
typeId = makePointer(storageClass, typeId);
// Make the instruction
@@ -2519,7 +2554,7 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
int row = 0;
int col = 0;
- for (int arg = 0; arg < (int)sources.size(); ++arg) {
+ for (int arg = 0; arg < (int)sources.size() && col < numCols; ++arg) {
Id argComp = sources[arg];
for (int comp = 0; comp < getNumComponents(sources[arg]); ++comp) {
if (getNumComponents(sources[arg]) > 1) {
@@ -2531,6 +2566,10 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
row = 0;
col++;
}
+ if (col == numCols) {
+ // If more components are provided than fit the matrix, discard the rest.
+ break;
+ }
}
}
}
@@ -2766,28 +2805,59 @@ void Builder::accessChainStore(Id rvalue, Decoration nonUniform, spv::MemoryAcce
assert(accessChain.isRValue == false);
transferAccessChainSwizzle(true);
- Id base = collapseAccessChain();
- addDecoration(base, nonUniform);
- Id source = rvalue;
+ // If a swizzle exists and is not full and is not dynamic, then the swizzle will be broken into individual stores.
+ if (accessChain.swizzle.size() > 0 &&
+ getNumTypeComponents(getResultingAccessChainType()) != (int)accessChain.swizzle.size() &&
+ accessChain.component == NoResult) {
+ for (unsigned int i = 0; i < accessChain.swizzle.size(); ++i) {
+ accessChain.indexChain.push_back(makeUintConstant(accessChain.swizzle[i]));
+ accessChain.instr = NoResult;
- // dynamic component should be gone
- assert(accessChain.component == NoResult);
+ Id base = collapseAccessChain();
+ addDecoration(base, nonUniform);
- // If swizzle still exists, it is out-of-order or not full, we must load the target vector,
- // extract and insert elements to perform writeMask and/or swizzle.
- if (accessChain.swizzle.size() > 0) {
- Id tempBaseId = createLoad(base, spv::NoPrecision);
- source = createLvalueSwizzle(getTypeId(tempBaseId), tempBaseId, source, accessChain.swizzle);
- }
+ accessChain.indexChain.pop_back();
+ accessChain.instr = NoResult;
+
+ // dynamic component should be gone
+ assert(accessChain.component == NoResult);
+
+ Id source = createCompositeExtract(rvalue, getContainedTypeId(getTypeId(rvalue)), i);
+
+ // take LSB of alignment
+ alignment = alignment & ~(alignment & (alignment-1));
+ if (getStorageClass(base) == StorageClassPhysicalStorageBufferEXT) {
+ memoryAccess = (spv::MemoryAccessMask)(memoryAccess | spv::MemoryAccessAlignedMask);
+ }
- // take LSB of alignment
- alignment = alignment & ~(alignment & (alignment-1));
- if (getStorageClass(base) == StorageClassPhysicalStorageBufferEXT) {
- memoryAccess = (spv::MemoryAccessMask)(memoryAccess | spv::MemoryAccessAlignedMask);
+ createStore(source, base, memoryAccess, scope, alignment);
+ }
}
+ else {
+ Id base = collapseAccessChain();
+ addDecoration(base, nonUniform);
+
+ Id source = rvalue;
+
+ // dynamic component should be gone
+ assert(accessChain.component == NoResult);
+
+ // If swizzle still exists, it may be out-of-order, we must load the target vector,
+ // extract and insert elements to perform writeMask and/or swizzle.
+ if (accessChain.swizzle.size() > 0) {
+ Id tempBaseId = createLoad(base, spv::NoPrecision);
+ source = createLvalueSwizzle(getTypeId(tempBaseId), tempBaseId, source, accessChain.swizzle);
+ }
- createStore(source, base, memoryAccess, scope, alignment);
+ // take LSB of alignment
+ alignment = alignment & ~(alignment & (alignment-1));
+ if (getStorageClass(base) == StorageClassPhysicalStorageBufferEXT) {
+ memoryAccess = (spv::MemoryAccessMask)(memoryAccess | spv::MemoryAccessAlignedMask);
+ }
+
+ createStore(source, base, memoryAccess, scope, alignment);
+ }
}
// Comments in header
diff --git a/thirdparty/glslang/SPIRV/SpvBuilder.h b/thirdparty/glslang/SPIRV/SpvBuilder.h
index 911ea58b12..251b9ee823 100644
--- a/thirdparty/glslang/SPIRV/SpvBuilder.h
+++ b/thirdparty/glslang/SPIRV/SpvBuilder.h
@@ -202,6 +202,7 @@ public:
StorageClass getTypeStorageClass(Id typeId) const { return module.getStorageClass(typeId); }
ImageFormat getImageTypeFormat(Id typeId) const
{ return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); }
+ Id getResultingAccessChainType() const;
bool isPointer(Id resultId) const { return isPointerType(getTypeId(resultId)); }
bool isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); }
@@ -293,6 +294,7 @@ public:
}
// For making new constants (will return old constant if the requested one was already made).
+ Id makeNullConstant(Id typeId);
Id makeBoolConstant(bool b, bool specConstant = false);
Id makeInt8Constant(int i, bool specConstant = false)
{ return makeIntConstant(makeIntType(8), (unsigned)i, specConstant); }
@@ -838,6 +840,8 @@ public:
std::unordered_map<unsigned int, std::vector<Instruction*>> groupedStructConstants;
// map type opcodes to type instructions
std::unordered_map<unsigned int, std::vector<Instruction*>> groupedTypes;
+ // list of OpConstantNull instructions
+ std::vector<Instruction*> nullConstants;
// stack of switches
std::stack<Block*> switchMerges;
diff --git a/thirdparty/glslang/SPIRV/SpvPostProcess.cpp b/thirdparty/glslang/SPIRV/SpvPostProcess.cpp
index d40174d172..23d7b5a461 100644
--- a/thirdparty/glslang/SPIRV/SpvPostProcess.cpp
+++ b/thirdparty/glslang/SPIRV/SpvPostProcess.cpp
@@ -436,6 +436,38 @@ void Builder::postProcessFeatures() {
}
}
}
+
+ // If any Vulkan memory model-specific functionality is used, update the
+ // OpMemoryModel to match.
+ if (capabilities.find(spv::CapabilityVulkanMemoryModelKHR) != capabilities.end()) {
+ memoryModel = spv::MemoryModelVulkanKHR;
+ addIncorporatedExtension(spv::E_SPV_KHR_vulkan_memory_model, spv::Spv_1_5);
+ }
+
+ // Add Aliased decoration if there's more than one Workgroup Block variable.
+ if (capabilities.find(spv::CapabilityWorkgroupMemoryExplicitLayoutKHR) != capabilities.end()) {
+ assert(entryPoints.size() == 1);
+ auto &ep = entryPoints[0];
+
+ std::vector<Id> workgroup_variables;
+ for (int i = 0; i < (int)ep->getNumOperands(); i++) {
+ if (!ep->isIdOperand(i))
+ continue;
+
+ const Id id = ep->getIdOperand(i);
+ const Instruction *instr = module.getInstruction(id);
+ if (instr->getOpCode() != spv::OpVariable)
+ continue;
+
+ if (instr->getImmediateOperand(0) == spv::StorageClassWorkgroup)
+ workgroup_variables.push_back(id);
+ }
+
+ if (workgroup_variables.size() > 1) {
+ for (size_t i = 0; i < workgroup_variables.size(); i++)
+ addDecoration(workgroup_variables[i], spv::DecorationAliased);
+ }
+ }
}
#endif
diff --git a/thirdparty/glslang/SPIRV/SpvTools.cpp b/thirdparty/glslang/SPIRV/SpvTools.cpp
index 16d051a9b2..8acf9b139a 100644
--- a/thirdparty/glslang/SPIRV/SpvTools.cpp
+++ b/thirdparty/glslang/SPIRV/SpvTools.cpp
@@ -153,6 +153,8 @@ void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<
spv_validator_options options = spvValidatorOptionsCreate();
spvValidatorOptionsSetRelaxBlockLayout(options, intermediate.usingHlslOffsets());
spvValidatorOptionsSetBeforeHlslLegalization(options, prelegalization);
+ spvValidatorOptionsSetScalarBlockLayout(options, intermediate.usingScalarBlockLayout());
+ spvValidatorOptionsSetWorkgroupScalarBlockLayout(options, intermediate.usingScalarBlockLayout());
spvValidateWithOptions(context, options, &binary, &diagnostic);
// report
@@ -205,6 +207,7 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
optimizer.RegisterPass(spvtools::CreateVectorDCEPass());
optimizer.RegisterPass(spvtools::CreateDeadInsertElimPass());
+ optimizer.RegisterPass(spvtools::CreateInterpolateFixupPass());
if (options->optimizeSize) {
optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass());
}
diff --git a/thirdparty/glslang/SPIRV/doc.cpp b/thirdparty/glslang/SPIRV/doc.cpp
index 5327f2212d..dbdf7077a6 100644
--- a/thirdparty/glslang/SPIRV/doc.cpp
+++ b/thirdparty/glslang/SPIRV/doc.cpp
@@ -188,6 +188,7 @@ const char* ExecutionModeString(int mode)
case ExecutionModeRoundingModeRTE: return "RoundingModeRTE";
case ExecutionModeRoundingModeRTZ: return "RoundingModeRTZ";
case ExecutionModeStencilRefReplacingEXT: return "StencilRefReplacingEXT";
+ case ExecutionModeSubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlow";
case ExecutionModeOutputLinesNV: return "OutputLinesNV";
case ExecutionModeOutputPrimitivesNV: return "OutputPrimitivesNV";
@@ -425,6 +426,7 @@ const char* BuiltInString(int builtIn)
case BuiltInSMCountNV: return "SMCountNV";
case BuiltInWarpIDNV: return "WarpIDNV";
case BuiltInSMIDNV: return "SMIDNV";
+ case BuiltInCurrentRayTimeNV: return "CurrentRayTimeNV";
default: return "Bad";
}
@@ -915,8 +917,10 @@ const char* CapabilityString(int info)
case CapabilityPerViewAttributesNV: return "PerViewAttributesNV";
case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV";
case CapabilityRayTracingNV: return "RayTracingNV";
+ case CapabilityRayTracingMotionBlurNV: return "RayTracingMotionBlurNV";
case CapabilityRayTracingKHR: return "RayTracingKHR";
case CapabilityRayQueryKHR: return "RayQueryKHR";
+ case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR";
case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR";
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
@@ -964,8 +968,16 @@ const char* CapabilityString(int info)
case CapabilityIntegerFunctions2INTEL: return "CapabilityIntegerFunctions2INTEL";
+ case CapabilityAtomicFloat16AddEXT: return "AtomicFloat16AddEXT";
case CapabilityAtomicFloat32AddEXT: return "AtomicFloat32AddEXT";
case CapabilityAtomicFloat64AddEXT: return "AtomicFloat64AddEXT";
+ case CapabilityAtomicFloat16MinMaxEXT: return "AtomicFloat16MinMaxEXT";
+ case CapabilityAtomicFloat32MinMaxEXT: return "AtomicFloat32MinMaxEXT";
+ case CapabilityAtomicFloat64MinMaxEXT: return "AtomicFloat64MinMaxEXT";
+
+ case CapabilityWorkgroupMemoryExplicitLayoutKHR: return "CapabilityWorkgroupMemoryExplicitLayoutKHR";
+ case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR";
+ case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR";
default: return "Bad";
}
@@ -1346,6 +1358,8 @@ const char* OpcodeString(int op)
case 4432: return "OpSubgroupReadInvocationKHR";
case OpAtomicFAddEXT: return "OpAtomicFAddEXT";
+ case OpAtomicFMinEXT: return "OpAtomicFMinEXT";
+ case OpAtomicFMaxEXT: return "OpAtomicFMaxEXT";
case 5000: return "OpGroupIAddNonUniformAMD";
case 5001: return "OpGroupFAddNonUniformAMD";
@@ -1370,6 +1384,7 @@ const char* OpcodeString(int op)
case OpTerminateRayNV: return "OpTerminateRayNV";
case OpTerminateRayKHR: return "OpTerminateRayKHR";
case OpTraceNV: return "OpTraceNV";
+ case OpTraceRayMotionNV: return "OpTraceRayMotionNV";
case OpTraceRayKHR: return "OpTraceRayKHR";
case OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR";
case OpExecuteCallableNV: return "OpExecuteCallableNV";
@@ -2336,6 +2351,16 @@ void Parameterize()
InstructionDesc[OpAtomicSMax].operands.push(OperandMemorySemantics, "'Semantics'");
InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Value'");
+ InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicFMinEXT].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicFMinEXT].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Value'");
+
+ InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Pointer'");
+ InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandScope, "'Scope'");
+ InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandMemorySemantics, "'Semantics'");
+ InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Value'");
+
InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Pointer'");
InstructionDesc[OpAtomicAnd].operands.push(OperandScope, "'Scope'");
InstructionDesc[OpAtomicAnd].operands.push(OperandMemorySemantics, "'Semantics'");
@@ -2714,7 +2739,7 @@ void Parameterize()
InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandScope, "'Execution'");
InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "X");
- InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandLiteralNumber, "'Direction'");
+ InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "'Direction'");
InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'");
@@ -2790,6 +2815,20 @@ void Parameterize()
InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'");
InstructionDesc[OpTraceNV].setResultAndType(false, false);
+ InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'");
+ InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Flags'");
+ InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Cull Mask'");
+ InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'");
+ InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'");
+ InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Miss Index'");
+ InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Origin'");
+ InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMin'");
+ InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Direction'");
+ InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMax'");
+ InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Time'");
+ InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Payload'");
+ InstructionDesc[OpTraceRayMotionNV].setResultAndType(false, false);
+
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Acceleration Structure'");
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'");
InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'");
diff --git a/thirdparty/glslang/SPIRV/spirv.hpp b/thirdparty/glslang/SPIRV/spirv.hpp
index 43dd2aaeec..e0fe24980d 100644
--- a/thirdparty/glslang/SPIRV/spirv.hpp
+++ b/thirdparty/glslang/SPIRV/spirv.hpp
@@ -150,6 +150,7 @@ enum ExecutionMode {
ExecutionModeSubgroupsPerWorkgroupId = 37,
ExecutionModeLocalSizeId = 38,
ExecutionModeLocalSizeHintId = 39,
+ ExecutionModeSubgroupUniformControlFlowKHR = 4421,
ExecutionModePostDepthCoverage = 4446,
ExecutionModeDenormPreserve = 4459,
ExecutionModeDenormFlushToZero = 4460,
@@ -168,10 +169,16 @@ enum ExecutionMode {
ExecutionModeSampleInterlockUnorderedEXT = 5369,
ExecutionModeShadingRateInterlockOrderedEXT = 5370,
ExecutionModeShadingRateInterlockUnorderedEXT = 5371,
+ ExecutionModeSharedLocalMemorySizeINTEL = 5618,
+ ExecutionModeRoundingModeRTPINTEL = 5620,
+ ExecutionModeRoundingModeRTNINTEL = 5621,
+ ExecutionModeFloatingPointModeALTINTEL = 5622,
+ ExecutionModeFloatingPointModeIEEEINTEL = 5623,
ExecutionModeMaxWorkgroupSizeINTEL = 5893,
ExecutionModeMaxWorkDimINTEL = 5894,
ExecutionModeNoGlobalOffsetINTEL = 5895,
ExecutionModeNumSIMDWorkitemsINTEL = 5896,
+ ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903,
ExecutionModeMax = 0x7fffffff,
};
@@ -204,6 +211,8 @@ enum StorageClass {
StorageClassPhysicalStorageBuffer = 5349,
StorageClassPhysicalStorageBufferEXT = 5349,
StorageClassCodeSectionINTEL = 5605,
+ StorageClassDeviceOnlyINTEL = 5936,
+ StorageClassHostOnlyINTEL = 5937,
StorageClassMax = 0x7fffffff,
};
@@ -374,6 +383,8 @@ enum FPFastMathModeShift {
FPFastMathModeNSZShift = 2,
FPFastMathModeAllowRecipShift = 3,
FPFastMathModeFastShift = 4,
+ FPFastMathModeAllowContractFastINTELShift = 16,
+ FPFastMathModeAllowReassocINTELShift = 17,
FPFastMathModeMax = 0x7fffffff,
};
@@ -384,6 +395,8 @@ enum FPFastMathModeMask {
FPFastMathModeNSZMask = 0x00000004,
FPFastMathModeAllowRecipMask = 0x00000008,
FPFastMathModeFastMask = 0x00000010,
+ FPFastMathModeAllowContractFastINTELMask = 0x00010000,
+ FPFastMathModeAllowReassocINTELMask = 0x00020000,
};
enum FPRoundingMode {
@@ -397,6 +410,7 @@ enum FPRoundingMode {
enum LinkageType {
LinkageTypeExport = 0,
LinkageTypeImport = 1,
+ LinkageTypeLinkOnceODR = 2,
LinkageTypeMax = 0x7fffffff,
};
@@ -484,12 +498,22 @@ enum Decoration {
DecorationRestrictPointerEXT = 5355,
DecorationAliasedPointer = 5356,
DecorationAliasedPointerEXT = 5356,
+ DecorationSIMTCallINTEL = 5599,
DecorationReferencedIndirectlyINTEL = 5602,
+ DecorationClobberINTEL = 5607,
+ DecorationSideEffectsINTEL = 5608,
+ DecorationVectorComputeVariableINTEL = 5624,
+ DecorationFuncParamIOKindINTEL = 5625,
+ DecorationVectorComputeFunctionINTEL = 5626,
+ DecorationStackCallINTEL = 5627,
+ DecorationGlobalVariableOffsetINTEL = 5628,
DecorationCounterBuffer = 5634,
DecorationHlslCounterBufferGOOGLE = 5634,
DecorationHlslSemanticGOOGLE = 5635,
DecorationUserSemantic = 5635,
DecorationUserTypeGOOGLE = 5636,
+ DecorationFunctionRoundingModeINTEL = 5822,
+ DecorationFunctionDenormModeINTEL = 5823,
DecorationRegisterINTEL = 5825,
DecorationMemoryINTEL = 5826,
DecorationNumbanksINTEL = 5827,
@@ -502,6 +526,17 @@ enum Decoration {
DecorationMergeINTEL = 5834,
DecorationBankBitsINTEL = 5835,
DecorationForcePow2DepthINTEL = 5836,
+ DecorationBurstCoalesceINTEL = 5899,
+ DecorationCacheSizeINTEL = 5900,
+ DecorationDontStaticallyCoalesceINTEL = 5901,
+ DecorationPrefetchINTEL = 5902,
+ DecorationStallEnableINTEL = 5905,
+ DecorationFuseLoopsInFunctionINTEL = 5907,
+ DecorationBufferLocationINTEL = 5921,
+ DecorationIOPipeStorageINTEL = 5944,
+ DecorationFunctionFloatingPointModeINTEL = 6080,
+ DecorationSingleElementVectorINTEL = 6085,
+ DecorationVectorComputeCallableFunctionINTEL = 6087,
DecorationMax = 0x7fffffff,
};
@@ -617,6 +652,7 @@ enum BuiltIn {
BuiltInHitTNV = 5332,
BuiltInHitKindKHR = 5333,
BuiltInHitKindNV = 5333,
+ BuiltInCurrentRayTimeNV = 5334,
BuiltInIncomingRayFlagsKHR = 5351,
BuiltInIncomingRayFlagsNV = 5351,
BuiltInRayGeometryIndexKHR = 5352,
@@ -656,6 +692,7 @@ enum LoopControlShift {
LoopControlLoopCoalesceINTELShift = 20,
LoopControlMaxInterleavingINTELShift = 21,
LoopControlSpeculatedIterationsINTELShift = 22,
+ LoopControlNoFusionINTELShift = 23,
LoopControlMax = 0x7fffffff,
};
@@ -677,6 +714,7 @@ enum LoopControlMask {
LoopControlLoopCoalesceINTELMask = 0x00100000,
LoopControlMaxInterleavingINTELMask = 0x00200000,
LoopControlSpeculatedIterationsINTELMask = 0x00400000,
+ LoopControlNoFusionINTELMask = 0x00800000,
};
enum FunctionControlShift {
@@ -876,6 +914,9 @@ enum Capability {
CapabilityFragmentShadingRateKHR = 4422,
CapabilitySubgroupBallotKHR = 4423,
CapabilityDrawParameters = 4427,
+ CapabilityWorkgroupMemoryExplicitLayoutKHR = 4428,
+ CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR = 4429,
+ CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR = 4430,
CapabilitySubgroupVoteKHR = 4431,
CapabilityStorageBuffer16BitAccess = 4433,
CapabilityStorageUniformBufferBlock16 = 4433,
@@ -948,6 +989,7 @@ enum Capability {
CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
CapabilityRayTracingNV = 5340,
+ CapabilityRayTracingMotionBlurNV = 5341,
CapabilityVulkanMemoryModel = 5345,
CapabilityVulkanMemoryModelKHR = 5345,
CapabilityVulkanMemoryModelDeviceScope = 5346,
@@ -966,21 +1008,42 @@ enum Capability {
CapabilitySubgroupBufferBlockIOINTEL = 5569,
CapabilitySubgroupImageBlockIOINTEL = 5570,
CapabilitySubgroupImageMediaBlockIOINTEL = 5579,
+ CapabilityRoundToInfinityINTEL = 5582,
+ CapabilityFloatingPointModeINTEL = 5583,
CapabilityIntegerFunctions2INTEL = 5584,
CapabilityFunctionPointersINTEL = 5603,
CapabilityIndirectReferencesINTEL = 5604,
+ CapabilityAsmINTEL = 5606,
+ CapabilityAtomicFloat32MinMaxEXT = 5612,
+ CapabilityAtomicFloat64MinMaxEXT = 5613,
+ CapabilityAtomicFloat16MinMaxEXT = 5616,
+ CapabilityVectorComputeINTEL = 5617,
+ CapabilityVectorAnyINTEL = 5619,
+ CapabilityExpectAssumeKHR = 5629,
CapabilitySubgroupAvcMotionEstimationINTEL = 5696,
CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697,
CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698,
+ CapabilityVariableLengthArrayINTEL = 5817,
+ CapabilityFunctionFloatControlINTEL = 5821,
CapabilityFPGAMemoryAttributesINTEL = 5824,
+ CapabilityFPFastMathModeINTEL = 5837,
+ CapabilityArbitraryPrecisionIntegersINTEL = 5844,
CapabilityUnstructuredLoopControlsINTEL = 5886,
CapabilityFPGALoopControlsINTEL = 5888,
CapabilityKernelAttributesINTEL = 5892,
CapabilityFPGAKernelAttributesINTEL = 5897,
+ CapabilityFPGAMemoryAccessesINTEL = 5898,
+ CapabilityFPGAClusterAttributesINTEL = 5904,
+ CapabilityLoopFuseINTEL = 5906,
+ CapabilityFPGABufferLocationINTEL = 5920,
+ CapabilityUSMStorageClassesINTEL = 5935,
+ CapabilityIOPipesINTEL = 5943,
CapabilityBlockingPipesINTEL = 5945,
CapabilityFPGARegINTEL = 5948,
CapabilityAtomicFloat32AddEXT = 6033,
CapabilityAtomicFloat64AddEXT = 6034,
+ CapabilityLongConstantCompositeINTEL = 6089,
+ CapabilityAtomicFloat16AddEXT = 6095,
CapabilityMax = 0x7fffffff,
};
@@ -1047,6 +1110,18 @@ enum FragmentShadingRateMask {
FragmentShadingRateHorizontal4PixelsMask = 0x00000008,
};
+enum FPDenormMode {
+ FPDenormModePreserve = 0,
+ FPDenormModeFlushToZero = 1,
+ FPDenormModeMax = 0x7fffffff,
+};
+
+enum FPOperationMode {
+ FPOperationModeIEEE = 0,
+ FPOperationModeALT = 1,
+ FPOperationModeMax = 0x7fffffff,
+};
+
enum Op {
OpNop = 0,
OpUndef = 1,
@@ -1430,6 +1505,8 @@ enum Op {
OpIgnoreIntersectionNV = 5335,
OpTerminateRayNV = 5336,
OpTraceNV = 5337,
+ OpTraceMotionNV = 5338,
+ OpTraceRayMotionNV = 5339,
OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
OpExecuteCallableNV = 5344,
@@ -1466,8 +1543,15 @@ enum Op {
OpUSubSatINTEL = 5596,
OpIMul32x16INTEL = 5597,
OpUMul32x16INTEL = 5598,
- OpFunctionPointerINTEL = 5600,
+ OpConstFunctionPointerINTEL = 5600,
OpFunctionPointerCallINTEL = 5601,
+ OpAsmTargetINTEL = 5609,
+ OpAsmINTEL = 5610,
+ OpAsmCallINTEL = 5611,
+ OpAtomicFMinEXT = 5614,
+ OpAtomicFMaxEXT = 5615,
+ OpAssumeTrueKHR = 5630,
+ OpExpectKHR = 5631,
OpDecorateString = 5632,
OpDecorateStringGOOGLE = 5632,
OpMemberDecorateString = 5633,
@@ -1590,7 +1674,12 @@ enum Op {
OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
OpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
+ OpVariableLengthArrayINTEL = 5818,
+ OpSaveMemoryINTEL = 5819,
+ OpRestoreMemoryINTEL = 5820,
OpLoopControlINTEL = 5887,
+ OpPtrCastToCrossWorkgroupINTEL = 5934,
+ OpCrossWorkgroupCastToPtrINTEL = 5938,
OpReadPipeBlockingINTEL = 5946,
OpWritePipeBlockingINTEL = 5947,
OpFPGARegINTEL = 5949,
@@ -1612,6 +1701,10 @@ enum Op {
OpRayQueryGetIntersectionObjectToWorldKHR = 6031,
OpRayQueryGetIntersectionWorldToObjectKHR = 6032,
OpAtomicFAddEXT = 6035,
+ OpTypeBufferSurfaceINTEL = 6086,
+ OpTypeStructContinuedINTEL = 6090,
+ OpConstantCompositeContinuedINTEL = 6091,
+ OpSpecConstantCompositeContinuedINTEL = 6092,
OpMax = 0x7fffffff,
};
@@ -2001,6 +2094,8 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
case OpTerminateRayNV: *hasResult = false; *hasResultType = false; break;
case OpTraceNV: *hasResult = false; *hasResultType = false; break;
+ case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break;
+ case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
@@ -2036,8 +2131,15 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
- case OpFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpConstFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break;
case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpAsmINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpAsmCallINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break;
+ case OpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break;
+ case OpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break;
+ case OpExpectKHR: *hasResult = true; *hasResultType = true; break;
case OpDecorateString: *hasResult = false; *hasResultType = false; break;
case OpMemberDecorateString: *hasResult = false; *hasResultType = false; break;
case OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break;
@@ -2158,7 +2260,12 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break;
case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break;
case OpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break;
case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break;
+ case OpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break;
+ case OpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break;
case OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
case OpWritePipeBlockingINTEL: *hasResult = true; *hasResultType = true; break;
case OpFPGARegINTEL: *hasResult = true; *hasResultType = true; break;
@@ -2180,6 +2287,10 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break;
case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break;
case OpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break;
+ case OpTypeBufferSurfaceINTEL: *hasResult = true; *hasResultType = false; break;
+ case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break;
+ case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
+ case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
}
}
#endif /* SPV_ENABLE_UTILITY_CODE */
diff --git a/thirdparty/glslang/StandAlone/DirStackFileIncluder.h b/thirdparty/glslang/StandAlone/DirStackFileIncluder.h
index 18734130e7..5a33c78fa2 100644
--- a/thirdparty/glslang/StandAlone/DirStackFileIncluder.h
+++ b/thirdparty/glslang/StandAlone/DirStackFileIncluder.h
@@ -40,6 +40,7 @@
#include <string>
#include <fstream>
#include <algorithm>
+#include <set>
#include "./../glslang/Public/ShaderLang.h"
@@ -84,12 +85,18 @@ public:
}
}
+ virtual std::set<std::string> getIncludedFiles()
+ {
+ return includedFiles;
+ }
+
virtual ~DirStackFileIncluder() override { }
protected:
typedef char tUserDataElement;
std::vector<std::string> directoryStack;
int externalLocalDirectoryCount;
+ std::set<std::string> includedFiles;
// Search for a valid "local" path based on combining the stack of include
// directories and the nominal name of the header.
@@ -108,6 +115,7 @@ protected:
std::ifstream file(path, std::ios_base::binary | std::ios_base::ate);
if (file) {
directoryStack.push_back(getDirectory(path));
+ includedFiles.insert(path);
return newIncludeResult(path, file, (int)file.tellg());
}
}
diff --git a/thirdparty/glslang/glslang/Include/BaseTypes.h b/thirdparty/glslang/glslang/Include/BaseTypes.h
index 55bdd25da5..c8203c2232 100644
--- a/thirdparty/glslang/glslang/Include/BaseTypes.h
+++ b/thirdparty/glslang/glslang/Include/BaseTypes.h
@@ -65,6 +65,10 @@ enum TBasicType {
EbtAccStruct,
EbtReference,
EbtRayQuery,
+#ifndef GLSLANG_WEB
+ // SPIR-V type defined by spirv_type
+ EbtSpirvType,
+#endif
// HLSL types that live only temporarily.
EbtString,
@@ -91,6 +95,9 @@ enum TStorageQualifier {
EvqUniform, // read only, shared with app
EvqBuffer, // read/write, shared with app
EvqShared, // compute shader's read/write 'shared' qualifier
+#ifndef GLSLANG_WEB
+ EvqSpirvStorageClass, // spirv_storage_class
+#endif
EvqPayload,
EvqPayloadIn,
@@ -263,6 +270,7 @@ enum TBuiltInVariable {
EbvWorldToObject,
EbvWorldToObject3x4,
EbvIncomingRayFlags,
+ EbvCurrentRayTimeNV,
// barycentrics
EbvBaryCoordNV,
EbvBaryCoordNoPerspNV,
@@ -321,6 +329,9 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
case EvqGlobal: return "global"; break;
case EvqConst: return "const"; break;
case EvqConstReadOnly: return "const (read only)"; break;
+#ifndef GLSLANG_WEB
+ case EvqSpirvStorageClass: return "spirv_storage_class"; break;
+#endif
case EvqVaryingIn: return "in"; break;
case EvqVaryingOut: return "out"; break;
case EvqUniform: return "uniform"; break;
@@ -465,6 +476,7 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
case EbvIncomingRayFlags: return "IncomingRayFlagsNV";
case EbvObjectToWorld: return "ObjectToWorldNV";
case EbvWorldToObject: return "WorldToObjectNV";
+ case EbvCurrentRayTimeNV: return "CurrentRayTimeNV";
case EbvBaryCoordNV: return "BaryCoordNV";
case EbvBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
diff --git a/thirdparty/glslang/glslang/Include/Common.h b/thirdparty/glslang/glslang/Include/Common.h
index b628cdc2f0..1e47239a7a 100644
--- a/thirdparty/glslang/glslang/Include/Common.h
+++ b/thirdparty/glslang/glslang/Include/Common.h
@@ -194,6 +194,10 @@ template <class K, class D, class HASH = std::hash<K>, class PRED = std::equal_t
class TUnorderedMap : public std::unordered_map<K, D, HASH, PRED, pool_allocator<std::pair<K const, D> > > {
};
+template <class K, class CMP = std::less<K> >
+class TSet : public std::set<K, CMP, pool_allocator<K> > {
+};
+
//
// Persistent string memory. Should only be used for strings that survive
// across compiles/links.
@@ -286,6 +290,18 @@ template <class T> bool IsMultipleOfPow2(T number, int powerOf2)
return ! (number & (powerOf2 - 1));
}
+// Returns log2 of an integer power of 2.
+// T should be integral.
+template <class T> int IntLog2(T n)
+{
+ assert(IsPow2(n));
+ int result = 0;
+ while ((T(1) << result) != n) {
+ result++;
+ }
+ return result;
+}
+
} // end namespace glslang
#endif // _COMMON_INCLUDED_
diff --git a/thirdparty/glslang/glslang/Include/SpirvIntrinsics.h b/thirdparty/glslang/glslang/Include/SpirvIntrinsics.h
new file mode 100644
index 0000000000..e7a999d408
--- /dev/null
+++ b/thirdparty/glslang/glslang/Include/SpirvIntrinsics.h
@@ -0,0 +1,136 @@
+//
+// Copyright(C) 2021 Advanced Micro Devices, Inc.
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+
+#pragma once
+
+#ifndef GLSLANG_WEB
+
+//
+// GL_EXT_spirv_intrinsics
+//
+#include "Common.h"
+
+namespace glslang {
+
+class TIntermTyped;
+class TIntermConstantUnion;
+class TType;
+
+// SPIR-V requirements
+struct TSpirvRequirement {
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+
+ // capability = [..]
+ TSet<TString> extensions;
+ // extension = [..]
+ TSet<int> capabilities;
+};
+
+// SPIR-V execution modes
+struct TSpirvExecutionMode {
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+
+ // spirv_execution_mode
+ TMap<int, TVector<const TIntermConstantUnion*>> modes;
+ // spirv_execution_mode_id
+ TMap<int, TVector<const TIntermConstantUnion*> > modeIds;
+};
+
+// SPIR-V decorations
+struct TSpirvDecorate {
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+
+ // spirv_decorate
+ TMap<int, TVector<const TIntermConstantUnion*> > decorates;
+ // spirv_decorate_id
+ TMap<int, TVector<const TIntermConstantUnion*> > decorateIds;
+ // spirv_decorate_string
+ TMap<int, TVector<const TIntermConstantUnion*> > decorateStrings;
+};
+
+// SPIR-V instruction
+struct TSpirvInstruction {
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+
+ TSpirvInstruction() { set = ""; id = -1; }
+
+ bool operator==(const TSpirvInstruction& rhs) const { return set == rhs.set && id == rhs.id; }
+ bool operator!=(const TSpirvInstruction& rhs) const { return !operator==(rhs); }
+
+ // spirv_instruction
+ TString set;
+ int id;
+};
+
+// SPIR-V type parameter
+struct TSpirvTypeParameter {
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+
+ TSpirvTypeParameter(const TIntermConstantUnion* arg) { isConstant = true; constant = arg; }
+ TSpirvTypeParameter(const TType* arg) { isConstant = false; type = arg; }
+
+ bool operator==(const TSpirvTypeParameter& rhs) const
+ {
+ return isConstant == rhs.isConstant && ((isConstant && constant == rhs.constant) || (!isConstant && type == rhs.type));
+ }
+ bool operator!=(const TSpirvTypeParameter& rhs) const { return !operator==(rhs); }
+
+ bool isConstant;
+ union {
+ const TIntermConstantUnion* constant;
+ const TType* type;
+ };
+};
+
+typedef TVector<TSpirvTypeParameter> TSpirvTypeParameters;
+
+// SPIR-V type
+struct TSpirvType {
+ POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
+
+ bool operator==(const TSpirvType& rhs) const
+ {
+ return spirvInst == rhs.spirvInst && typeParams == rhs.typeParams;
+ }
+ bool operator!=(const TSpirvType& rhs) const { return !operator==(rhs); }
+
+ // spirv_type
+ TSpirvInstruction spirvInst;
+ TSpirvTypeParameters typeParams;
+};
+
+} // end namespace glslang
+
+#endif // GLSLANG_WEB
diff --git a/thirdparty/glslang/glslang/Include/Types.h b/thirdparty/glslang/glslang/Include/Types.h
index 696daf6dfa..a6bf191d75 100644
--- a/thirdparty/glslang/glslang/Include/Types.h
+++ b/thirdparty/glslang/glslang/Include/Types.h
@@ -44,11 +44,14 @@
#include "../Include/BaseTypes.h"
#include "../Public/ShaderLang.h"
#include "arrays.h"
+#include "SpirvIntrinsics.h"
#include <algorithm>
namespace glslang {
+class TIntermAggregate;
+
const int GlslangMaxTypeLength = 200; // TODO: need to print block/struct one member per line, so this can stay bounded
const char* const AnonymousPrefix = "anon@"; // for something like a block whose members can be directly accessed
@@ -115,6 +118,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
#endif
bool is1D() const { return dim == Esd1D; }
+ bool is2D() const { return dim == Esd2D; }
bool isBuffer() const { return dim == EsdBuffer; }
bool isRect() const { return dim == EsdRect; }
bool isSubpass() const { return dim == EsdSubpass; }
@@ -486,7 +490,6 @@ enum TShaderInterface
EsiCount
};
-
class TQualifier {
public:
static const int layoutNotSet = -1;
@@ -499,7 +502,11 @@ public:
declaredBuiltIn = EbvNone;
#ifndef GLSLANG_WEB
noContraction = false;
+ nullInit = false;
+ spirvByReference = false;
+ spirvLiteral = false;
#endif
+ defaultBlock = false;
}
// drop qualifiers that don't belong in a temporary variable
@@ -512,7 +519,15 @@ public:
clearMemory();
specConstant = false;
nonUniform = false;
+ nullInit = false;
+ defaultBlock = false;
clearLayout();
+#ifndef GLSLANG_WEB
+ spirvStorageClass = -1;
+ spirvDecorate = nullptr;
+ spirvByReference = false;
+ spirvLiteral = false;
+#endif
}
void clearInterstage()
@@ -570,6 +585,7 @@ public:
bool specConstant : 1;
bool nonUniform : 1;
bool explicitOffset : 1;
+ bool defaultBlock : 1; // default blocks with matching names have structures merged when linking
#ifdef GLSLANG_WEB
bool isWriteOnly() const { return false; }
@@ -588,6 +604,12 @@ public:
bool isNoContraction() const { return false; }
void setNoContraction() { }
bool isPervertexNV() const { return false; }
+ void setNullInit() { }
+ bool isNullInit() const { return false; }
+ void setSpirvByReference() { }
+ bool isSpirvByReference() { return false; }
+ void setSpirvLiteral() { }
+ bool isSpirvLiteral() { return false; }
#else
bool noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects
bool nopersp : 1;
@@ -609,6 +631,9 @@ public:
bool subgroupcoherent : 1;
bool shadercallcoherent : 1;
bool nonprivate : 1;
+ bool nullInit : 1;
+ bool spirvByReference : 1;
+ bool spirvLiteral : 1;
bool isWriteOnly() const { return writeonly; }
bool isReadOnly() const { return readonly; }
bool isRestrict() const { return restrict; }
@@ -644,6 +669,12 @@ public:
bool isNoContraction() const { return noContraction; }
void setNoContraction() { noContraction = true; }
bool isPervertexNV() const { return pervertexNV; }
+ void setNullInit() { nullInit = true; }
+ bool isNullInit() const { return nullInit; }
+ void setSpirvByReference() { spirvByReference = true; }
+ bool isSpirvByReference() const { return spirvByReference; }
+ void setSpirvLiteral() { spirvLiteral = true; }
+ bool isSpirvLiteral() const { return spirvLiteral; }
#endif
bool isPipeInput() const
@@ -749,6 +780,46 @@ public:
}
}
+ TBlockStorageClass getBlockStorage() const {
+ if (storage == EvqUniform && !isPushConstant()) {
+ return EbsUniform;
+ }
+ else if (storage == EvqUniform) {
+ return EbsPushConstant;
+ }
+ else if (storage == EvqBuffer) {
+ return EbsStorageBuffer;
+ }
+ return EbsNone;
+ }
+
+ void setBlockStorage(TBlockStorageClass newBacking) {
+#ifndef GLSLANG_WEB
+ layoutPushConstant = (newBacking == EbsPushConstant);
+#endif
+ switch (newBacking) {
+ case EbsUniform :
+ if (layoutPacking == ElpStd430) {
+ // std430 would not be valid
+ layoutPacking = ElpStd140;
+ }
+ storage = EvqUniform;
+ break;
+ case EbsStorageBuffer :
+ storage = EvqBuffer;
+ break;
+#ifndef GLSLANG_WEB
+ case EbsPushConstant :
+ storage = EvqUniform;
+ layoutSet = TQualifier::layoutSetEnd;
+ layoutBinding = TQualifier::layoutBindingEnd;
+ break;
+#endif
+ default:
+ break;
+ }
+ }
+
#ifdef GLSLANG_WEB
bool isPerView() const { return false; }
bool isTaskMemory() const { return false; }
@@ -845,6 +916,7 @@ public:
return hasNonXfbLayout() ||
hasXfb();
}
+
TLayoutMatrix layoutMatrix : 3;
TLayoutPacking layoutPacking : 4;
int layoutOffset;
@@ -896,6 +968,10 @@ public:
bool layoutViewportRelative;
int layoutSecondaryViewportRelativeOffset;
bool layoutShaderRecord;
+
+ // GL_EXT_spirv_intrinsics
+ int spirvStorageClass;
+ TSpirvDecorate* spirvDecorate;
#endif
bool hasUniformLayout() const
@@ -1027,6 +1103,15 @@ public:
{
return nonUniform;
}
+
+ // GL_EXT_spirv_intrinsics
+ bool hasSprivDecorate() const { return spirvDecorate != nullptr; }
+ void setSpirvDecorate(int decoration, const TIntermAggregate* args = nullptr);
+ void setSpirvDecorateId(int decoration, const TIntermAggregate* args);
+ void setSpirvDecorateString(int decoration, const TIntermAggregate* args);
+ const TSpirvDecorate& getSpirvDecorate() const { assert(spirvDecorate); return *spirvDecorate; }
+ TSpirvDecorate& getSpirvDecorate() { assert(spirvDecorate); return *spirvDecorate; }
+ TString getSpirvDecorateQualifierString() const;
#endif
bool hasSpecConstantId() const
{
@@ -1371,6 +1456,10 @@ public:
const TType* userDef;
TSourceLoc loc;
TArraySizes* typeParameters;
+#ifndef GLSLANG_WEB
+ // SPIR-V type defined by spirv_type directive
+ TSpirvType* spirvType;
+#endif
#ifdef GLSLANG_WEB
bool isCoopmat() const { return false; }
@@ -1389,6 +1478,9 @@ public:
loc = l;
typeParameters = nullptr;
coopmat = false;
+#ifndef GLSLANG_WEB
+ spirvType = nullptr;
+#endif
}
void initQualifiers(bool global = false)
@@ -1425,6 +1517,11 @@ public:
return matrixCols == 0 && vectorSize == 1 && arraySizes == nullptr && userDef == nullptr;
}
+#ifndef GLSLANG_WEB
+ // GL_EXT_spirv_intrinsics
+ void setSpirvType(const TSpirvInstruction& spirvInst, const TSpirvTypeParameters* typeParams = nullptr);
+#endif
+
// "Image" is a superset of "Subpass"
bool isImage() const { return basicType == EbtSampler && sampler.isImage(); }
bool isSubpass() const { return basicType == EbtSampler && sampler.isSubpass(); }
@@ -1442,6 +1539,9 @@ public:
bool isVector = false) :
basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false),
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr)
+#ifndef GLSLANG_WEB
+ , spirvType(nullptr)
+#endif
{
sampler.clear();
qualifier.clear();
@@ -1453,6 +1553,9 @@ public:
bool isVector = false) :
basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false),
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr)
+#ifndef GLSLANG_WEB
+ , spirvType(nullptr)
+#endif
{
sampler.clear();
qualifier.clear();
@@ -1466,6 +1569,9 @@ public:
basicType(p.basicType),
vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false), coopmat(p.coopmat),
arraySizes(p.arraySizes), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(p.typeParameters)
+#ifndef GLSLANG_WEB
+ , spirvType(p.spirvType)
+#endif
{
if (basicType == EbtSampler)
sampler = p.sampler;
@@ -1500,6 +1606,9 @@ public:
basicType(EbtSampler), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
arraySizes(as), structure(nullptr), fieldName(nullptr), typeName(nullptr),
sampler(sampler), typeParameters(nullptr)
+#ifndef GLSLANG_WEB
+ , spirvType(nullptr)
+#endif
{
qualifier.clear();
qualifier.storage = q;
@@ -1550,6 +1659,9 @@ public:
TType(TTypeList* userDef, const TString& n) :
basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr)
+#ifndef GLSLANG_WEB
+ , spirvType(nullptr)
+#endif
{
sampler.clear();
qualifier.clear();
@@ -1559,6 +1671,9 @@ public:
TType(TTypeList* userDef, const TString& n, const TQualifier& q) :
basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr)
+#ifndef GLSLANG_WEB
+ , spirvType(nullptr)
+#endif
{
sampler.clear();
typeName = NewPoolTString(n.c_str());
@@ -1567,6 +1682,9 @@ public:
explicit TType(TBasicType t, const TType &p, const TString& n) :
basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false),
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr)
+#ifndef GLSLANG_WEB
+ , spirvType(nullptr)
+#endif
{
assert(t == EbtReference);
typeName = NewPoolTString(n.c_str());
@@ -1597,6 +1715,9 @@ public:
referentType = copyOf.referentType;
}
typeParameters = copyOf.typeParameters;
+#ifndef GLSLANG_WEB
+ spirvType = copyOf.spirvType;
+#endif
coopmat = copyOf.isCoopMat();
}
@@ -1687,6 +1808,7 @@ public:
virtual bool isScalar() const { return ! isVector() && ! isMatrix() && ! isStruct() && ! isArray(); }
virtual bool isScalarOrVec1() const { return isScalar() || vector1; }
+ virtual bool isScalarOrVector() const { return !isMatrix() && !isStruct() && !isArray(); }
virtual bool isVector() const { return vectorSize > 1 || vector1; }
virtual bool isMatrix() const { return matrixCols ? true : false; }
virtual bool isArray() const { return arraySizes != nullptr; }
@@ -1717,7 +1839,7 @@ public:
}
virtual bool isOpaque() const { return basicType == EbtSampler
#ifndef GLSLANG_WEB
- || basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtRayQuery
+ || basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtRayQuery
#endif
; }
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
@@ -1965,8 +2087,6 @@ public:
}
}
-
-
const char* getBasicString() const
{
return TType::getBasicString(basicType);
@@ -1997,6 +2117,7 @@ public:
case EbtRayQuery: return "rayQueryEXT";
case EbtReference: return "reference";
case EbtString: return "string";
+ case EbtSpirvType: return "spirv_type";
#endif
default: return "unknown type";
}
@@ -2017,6 +2138,9 @@ public:
const auto appendUint = [&](unsigned int u) { typeString.append(std::to_string(u).c_str()); };
const auto appendInt = [&](int i) { typeString.append(std::to_string(i).c_str()); };
+ if (qualifier.hasSprivDecorate())
+ appendStr(qualifier.getSpirvDecorateQualifierString().c_str());
+
if (qualifier.hasLayout()) {
// To reduce noise, skip this if the only layout is an xfb_buffer
// with no triggering xfb_offset.
@@ -2164,6 +2288,12 @@ public:
appendStr(" specialization-constant");
if (qualifier.nonUniform)
appendStr(" nonuniform");
+ if (qualifier.isNullInit())
+ appendStr(" null-init");
+ if (qualifier.isSpirvByReference())
+ appendStr(" spirv_by_reference");
+ if (qualifier.isSpirvLiteral())
+ appendStr(" spirv_literal");
appendStr(" ");
appendStr(getStorageQualifierString());
if (isArray()) {
@@ -2283,6 +2413,17 @@ public:
name += ';' ;
}
+ // These variables are inconsistently declared inside and outside of gl_PerVertex in glslang right now.
+ // They are declared inside of 'in gl_PerVertex', but sitting as standalone when they are 'out'puts.
+ bool isInconsistentGLPerVertexMember(const TString& name) const
+ {
+ if (name == "gl_SecondaryPositionNV" ||
+ name == "gl_PositionPerViewNV")
+ return true;
+ return false;
+ }
+
+
// Do two structure types match? They could be declared independently,
// in different places, but still might satisfy the definition of matching.
// From the spec:
@@ -2298,22 +2439,48 @@ public:
(isStruct() && right.isStruct() && structure == right.structure))
return true;
- // Both being nullptr was caught above, now they both have to be structures of the same number of elements
- if (!isStruct() || !right.isStruct() ||
- structure->size() != right.structure->size())
- return false;
-
// Structure names have to match
if (*typeName != *right.typeName)
return false;
- // Compare the names and types of all the members, which have to match
- for (unsigned int i = 0; i < structure->size(); ++i) {
- if ((*structure)[i].type->getFieldName() != (*right.structure)[i].type->getFieldName())
- return false;
+ // There are inconsistencies with how gl_PerVertex is setup. For now ignore those as errors if they
+ // are known inconsistencies.
+ bool isGLPerVertex = *typeName == "gl_PerVertex";
- if (*(*structure)[i].type != *(*right.structure)[i].type)
- return false;
+ // Both being nullptr was caught above, now they both have to be structures of the same number of elements
+ if (!isStruct() || !right.isStruct() ||
+ (structure->size() != right.structure->size() && !isGLPerVertex))
+ return false;
+
+ // Compare the names and types of all the members, which have to match
+ for (size_t li = 0, ri = 0; li < structure->size() || ri < right.structure->size(); ++li, ++ri) {
+ if (li < structure->size() && ri < right.structure->size()) {
+ if ((*structure)[li].type->getFieldName() == (*right.structure)[ri].type->getFieldName()) {
+ if (*(*structure)[li].type != *(*right.structure)[ri].type)
+ return false;
+ } else {
+ // If one of the members is something that's inconsistently declared, skip over it
+ // for now.
+ if (isGLPerVertex) {
+ if (isInconsistentGLPerVertexMember((*structure)[li].type->getFieldName())) {
+ ri--;
+ continue;
+ } else if (isInconsistentGLPerVertexMember((*right.structure)[ri].type->getFieldName())) {
+ li--;
+ continue;
+ }
+ } else {
+ return false;
+ }
+ }
+ // If we get here, then there should only be inconsistently declared members left
+ } else if (li < structure->size()) {
+ if (!isInconsistentGLPerVertexMember((*structure)[li].type->getFieldName()))
+ return false;
+ } else {
+ if (!isInconsistentGLPerVertexMember((*right.structure)[ri].type->getFieldName()))
+ return false;
+ }
}
return true;
@@ -2363,6 +2530,15 @@ public:
(typeParameters != nullptr && right.typeParameters != nullptr && *typeParameters == *right.typeParameters));
}
+#ifndef GLSLANG_WEB
+ // See if two type's SPIR-V type contents match
+ bool sameSpirvType(const TType& right) const
+ {
+ return ((spirvType == nullptr && right.spirvType == nullptr) ||
+ (spirvType != nullptr && right.spirvType != nullptr && *spirvType == *right.spirvType));
+ }
+#endif
+
// See if two type's elements match in all ways except basic type
bool sameElementShape(const TType& right) const
{
@@ -2401,7 +2577,11 @@ public:
// See if two types match in all ways (just the actual type, not qualification)
bool operator==(const TType& right) const
{
+#ifndef GLSLANG_WEB
+ return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right) && sameSpirvType(right);
+#else
return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right);
+#endif
}
bool operator!=(const TType& right) const
@@ -2420,6 +2600,10 @@ public:
return 0;
}
+#ifndef GLSLANG_WEB
+ const TSpirvType& getSpirvType() const { assert(spirvType); return *spirvType; }
+#endif
+
protected:
// Require consumer to pick between deep copy and shallow copy.
TType(const TType& type);
@@ -2432,6 +2616,19 @@ protected:
{
shallowCopy(copyOf);
+#ifndef GLSLANG_WEB
+ // GL_EXT_spirv_intrinsics
+ if (copyOf.qualifier.spirvDecorate) {
+ qualifier.spirvDecorate = new TSpirvDecorate;
+ *qualifier.spirvDecorate = *copyOf.qualifier.spirvDecorate;
+ }
+
+ if (copyOf.spirvType) {
+ spirvType = new TSpirvType;
+ *spirvType = *copyOf.spirvType;
+ }
+#endif
+
if (copyOf.arraySizes) {
arraySizes = new TArraySizes;
*arraySizes = *copyOf.arraySizes;
@@ -2491,6 +2688,9 @@ protected:
TString *typeName; // for structure type name
TSampler sampler;
TArraySizes* typeParameters;// nullptr unless a parameterized type; can be shared across types
+#ifndef GLSLANG_WEB
+ TSpirvType* spirvType; // SPIR-V type defined by spirv_type directive
+#endif
};
} // end namespace glslang
diff --git a/thirdparty/glslang/glslang/Include/glslang_c_shader_types.h b/thirdparty/glslang/glslang/Include/glslang_c_shader_types.h
index d01a115f69..f100a9aa82 100644
--- a/thirdparty/glslang/glslang/Include/glslang_c_shader_types.h
+++ b/thirdparty/glslang/glslang/Include/glslang_c_shader_types.h
@@ -100,8 +100,9 @@ typedef enum {
typedef enum {
GLSLANG_TARGET_VULKAN_1_0 = (1 << 22),
GLSLANG_TARGET_VULKAN_1_1 = (1 << 22) | (1 << 12),
+ GLSLANG_TARGET_VULKAN_1_2 = (1 << 22) | (2 << 12),
GLSLANG_TARGET_OPENGL_450 = 450,
- LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT),
+ LAST_ELEMENT_MARKER(GLSLANG_TARGET_CLIENT_VERSION_COUNT = 4),
} glslang_target_client_version_t;
/* SH_TARGET_LanguageVersion counterpart */
@@ -112,7 +113,7 @@ typedef enum {
GLSLANG_TARGET_SPV_1_3 = (1 << 16) | (3 << 8),
GLSLANG_TARGET_SPV_1_4 = (1 << 16) | (4 << 8),
GLSLANG_TARGET_SPV_1_5 = (1 << 16) | (5 << 8),
- LAST_ELEMENT_MARKER(GLSLANG_TARGET_LANGUAGE_VERSION_COUNT),
+ LAST_ELEMENT_MARKER(GLSLANG_TARGET_LANGUAGE_VERSION_COUNT = 6),
} glslang_target_language_version_t;
/* EShExecutable counterpart */
diff --git a/thirdparty/glslang/glslang/Include/intermediate.h b/thirdparty/glslang/glslang/Include/intermediate.h
index 19cd32e9a8..1e6ab4aa7a 100644
--- a/thirdparty/glslang/glslang/Include/intermediate.h
+++ b/thirdparty/glslang/glslang/Include/intermediate.h
@@ -71,6 +71,9 @@ enum TOperator {
EOpFunctionCall,
EOpFunction, // For function definition
EOpParameters, // an aggregate listing the parameters to a function
+#ifndef GLSLANG_WEB
+ EOpSpirvInst,
+#endif
//
// Unary operators
@@ -593,6 +596,7 @@ enum TOperator {
EOpTime,
EOpAtomicAdd,
+ EOpAtomicSubtract,
EOpAtomicMin,
EOpAtomicMax,
EOpAtomicAnd,
@@ -922,6 +926,7 @@ enum TOperator {
EOpMul32x16,
EOpTraceNV,
+ EOpTraceRayMotionNV,
EOpTraceKHR,
EOpReportIntersection,
EOpIgnoreIntersectionNV,
@@ -1135,6 +1140,8 @@ public:
virtual TBasicType getBasicType() const { return type.getBasicType(); }
virtual TQualifier& getQualifier() { return type.getQualifier(); }
virtual const TQualifier& getQualifier() const { return type.getQualifier(); }
+ virtual TArraySizes* getArraySizes() { return type.getArraySizes(); }
+ virtual const TArraySizes* getArraySizes() const { return type.getArraySizes(); }
virtual void propagatePrecision(TPrecisionQualifier);
virtual int getVectorSize() const { return type.getVectorSize(); }
virtual int getMatrixCols() const { return type.getMatrixCols(); }
@@ -1275,15 +1282,15 @@ public:
// if symbol is initialized as symbol(sym), the memory comes from the pool allocator of sym. If sym comes from
// per process threadPoolAllocator, then it causes increased memory usage per compile
// it is essential to use "symbol = sym" to assign to symbol
- TIntermSymbol(int i, const TString& n, const TType& t)
+ TIntermSymbol(long long i, const TString& n, const TType& t)
: TIntermTyped(t), id(i),
#ifndef GLSLANG_WEB
flattenSubset(-1),
#endif
constSubtree(nullptr)
{ name = n; }
- virtual int getId() const { return id; }
- virtual void changeId(int i) { id = i; }
+ virtual long long getId() const { return id; }
+ virtual void changeId(long long i) { id = i; }
virtual const TString& getName() const { return name; }
virtual void traverse(TIntermTraverser*);
virtual TIntermSymbol* getAsSymbolNode() { return this; }
@@ -1301,10 +1308,10 @@ public:
// This is meant for cases where a node has already been constructed, and
// later on, it becomes necessary to switch to a different symbol.
- virtual void switchId(int newId) { id = newId; }
+ virtual void switchId(long long newId) { id = newId; }
protected:
- int id; // the unique id of the symbol this node represents
+ long long id; // the unique id of the symbol this node represents
#ifndef GLSLANG_WEB
int flattenSubset; // how deeply the flattened object rooted at id has been dereferenced
#endif
@@ -1613,8 +1620,15 @@ public:
virtual TIntermUnary* getAsUnaryNode() { return this; }
virtual const TIntermUnary* getAsUnaryNode() const { return this; }
virtual void updatePrecision();
+#ifndef GLSLANG_WEB
+ void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; }
+ const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
+#endif
protected:
TIntermTyped* operand;
+#ifndef GLSLANG_WEB
+ TSpirvInstruction spirvInst;
+#endif
};
typedef TVector<TIntermNode*> TIntermSequence;
@@ -1645,6 +1659,10 @@ public:
bool getDebug() const { return debug; }
void setPragmaTable(const TPragmaTable& pTable);
const TPragmaTable& getPragmaTable() const { return *pragmaTable; }
+#ifndef GLSLANG_WEB
+ void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; }
+ const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
+#endif
protected:
TIntermAggregate(const TIntermAggregate&); // disallow copy constructor
TIntermAggregate& operator=(const TIntermAggregate&); // disallow assignment operator
@@ -1655,6 +1673,9 @@ protected:
bool optimize;
bool debug;
TPragmaTable* pragmaTable;
+#ifndef GLSLANG_WEB
+ TSpirvInstruction spirvInst;
+#endif
};
//
@@ -1672,8 +1693,11 @@ public:
flatten(false), dontFlatten(false) {}
virtual void traverse(TIntermTraverser*);
virtual TIntermTyped* getCondition() const { return condition; }
+ virtual void setCondition(TIntermTyped* c) { condition = c; }
virtual TIntermNode* getTrueBlock() const { return trueBlock; }
+ virtual void setTrueBlock(TIntermTyped* tb) { trueBlock = tb; }
virtual TIntermNode* getFalseBlock() const { return falseBlock; }
+ virtual void setFalseBlock(TIntermTyped* fb) { falseBlock = fb; }
virtual TIntermSelection* getAsSelectionNode() { return this; }
virtual const TIntermSelection* getAsSelectionNode() const { return this; }
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp b/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp
index e21cf427f0..4629cc2da5 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Constant.cpp
@@ -529,7 +529,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
case EbtDouble:
case EbtFloat16:
case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break;
- case EbtInt: newConstArray[i].setIConst(-unionArray[i].getIConst()); break;
+ // Note: avoid UBSAN error regarding negating 0x80000000
+ case EbtInt: newConstArray[i].setIConst(
+ unionArray[i].getIConst() == 0x80000000
+ ? -0x7FFFFFFF - 1
+ : -unionArray[i].getIConst());
+ break;
case EbtUint: newConstArray[i].setUConst(static_cast<unsigned int>(-static_cast<int>(unionArray[i].getUConst()))); break;
#ifndef GLSLANG_WEB
case EbtInt8: newConstArray[i].setI8Const(-unionArray[i].getI8Const()); break;
@@ -599,17 +604,11 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
newConstArray[i].setDConst(log(unionArray[i].getDConst()));
break;
case EOpExp2:
- {
- const double inv_log2_e = 0.69314718055994530941723212145818;
- newConstArray[i].setDConst(exp(unionArray[i].getDConst() * inv_log2_e));
- break;
- }
+ newConstArray[i].setDConst(exp2(unionArray[i].getDConst()));
+ break;
case EOpLog2:
- {
- const double log2_e = 1.4426950408889634073599246810019;
- newConstArray[i].setDConst(log2_e * log(unionArray[i].getDConst()));
- break;
- }
+ newConstArray[i].setDConst(log2(unionArray[i].getDConst()));
+ break;
case EOpSqrt:
newConstArray[i].setDConst(sqrt(unionArray[i].getDConst()));
break;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp b/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp
index a5ef6ccaf6..823406c18d 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Initialize.cpp
@@ -483,7 +483,8 @@ void TBuiltIns::relateTabledBuiltins(int /* version */, EProfile /* profile */,
inline bool IncludeLegacy(int version, EProfile profile, const SpvVersion& spvVersion)
{
- return profile != EEsProfile && (version <= 130 || (spvVersion.spv == 0 && ARBCompatibility) || profile == ECompatibilityProfile);
+ return profile != EEsProfile && (version <= 130 || (spvVersion.spv == 0 && version == 140 && ARBCompatibility) ||
+ profile == ECompatibilityProfile);
}
// Construct TBuiltInParseables base class. This can be used for language-common constructs.
@@ -931,7 +932,203 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
- if (profile != EEsProfile && version >= 450) {
+ if (profile == EEsProfile && version >= 310) { // Explicit Types
+ commonBuiltins.append(
+
+ "float64_t sqrt(float64_t);"
+ "f64vec2 sqrt(f64vec2);"
+ "f64vec3 sqrt(f64vec3);"
+ "f64vec4 sqrt(f64vec4);"
+
+ "float64_t inversesqrt(float64_t);"
+ "f64vec2 inversesqrt(f64vec2);"
+ "f64vec3 inversesqrt(f64vec3);"
+ "f64vec4 inversesqrt(f64vec4);"
+
+ "float64_t abs(float64_t);"
+ "f64vec2 abs(f64vec2);"
+ "f64vec3 abs(f64vec3);"
+ "f64vec4 abs(f64vec4);"
+
+ "float64_t sign(float64_t);"
+ "f64vec2 sign(f64vec2);"
+ "f64vec3 sign(f64vec3);"
+ "f64vec4 sign(f64vec4);"
+
+ "float64_t floor(float64_t);"
+ "f64vec2 floor(f64vec2);"
+ "f64vec3 floor(f64vec3);"
+ "f64vec4 floor(f64vec4);"
+
+ "float64_t trunc(float64_t);"
+ "f64vec2 trunc(f64vec2);"
+ "f64vec3 trunc(f64vec3);"
+ "f64vec4 trunc(f64vec4);"
+
+ "float64_t round(float64_t);"
+ "f64vec2 round(f64vec2);"
+ "f64vec3 round(f64vec3);"
+ "f64vec4 round(f64vec4);"
+
+ "float64_t roundEven(float64_t);"
+ "f64vec2 roundEven(f64vec2);"
+ "f64vec3 roundEven(f64vec3);"
+ "f64vec4 roundEven(f64vec4);"
+
+ "float64_t ceil(float64_t);"
+ "f64vec2 ceil(f64vec2);"
+ "f64vec3 ceil(f64vec3);"
+ "f64vec4 ceil(f64vec4);"
+
+ "float64_t fract(float64_t);"
+ "f64vec2 fract(f64vec2);"
+ "f64vec3 fract(f64vec3);"
+ "f64vec4 fract(f64vec4);"
+
+ "float64_t mod(float64_t, float64_t);"
+ "f64vec2 mod(f64vec2 , float64_t);"
+ "f64vec3 mod(f64vec3 , float64_t);"
+ "f64vec4 mod(f64vec4 , float64_t);"
+ "f64vec2 mod(f64vec2 , f64vec2);"
+ "f64vec3 mod(f64vec3 , f64vec3);"
+ "f64vec4 mod(f64vec4 , f64vec4);"
+
+ "float64_t modf(float64_t, out float64_t);"
+ "f64vec2 modf(f64vec2, out f64vec2);"
+ "f64vec3 modf(f64vec3, out f64vec3);"
+ "f64vec4 modf(f64vec4, out f64vec4);"
+
+ "float64_t min(float64_t, float64_t);"
+ "f64vec2 min(f64vec2, float64_t);"
+ "f64vec3 min(f64vec3, float64_t);"
+ "f64vec4 min(f64vec4, float64_t);"
+ "f64vec2 min(f64vec2, f64vec2);"
+ "f64vec3 min(f64vec3, f64vec3);"
+ "f64vec4 min(f64vec4, f64vec4);"
+
+ "float64_t max(float64_t, float64_t);"
+ "f64vec2 max(f64vec2 , float64_t);"
+ "f64vec3 max(f64vec3 , float64_t);"
+ "f64vec4 max(f64vec4 , float64_t);"
+ "f64vec2 max(f64vec2 , f64vec2);"
+ "f64vec3 max(f64vec3 , f64vec3);"
+ "f64vec4 max(f64vec4 , f64vec4);"
+
+ "float64_t clamp(float64_t, float64_t, float64_t);"
+ "f64vec2 clamp(f64vec2 , float64_t, float64_t);"
+ "f64vec3 clamp(f64vec3 , float64_t, float64_t);"
+ "f64vec4 clamp(f64vec4 , float64_t, float64_t);"
+ "f64vec2 clamp(f64vec2 , f64vec2 , f64vec2);"
+ "f64vec3 clamp(f64vec3 , f64vec3 , f64vec3);"
+ "f64vec4 clamp(f64vec4 , f64vec4 , f64vec4);"
+
+ "float64_t mix(float64_t, float64_t, float64_t);"
+ "f64vec2 mix(f64vec2, f64vec2, float64_t);"
+ "f64vec3 mix(f64vec3, f64vec3, float64_t);"
+ "f64vec4 mix(f64vec4, f64vec4, float64_t);"
+ "f64vec2 mix(f64vec2, f64vec2, f64vec2);"
+ "f64vec3 mix(f64vec3, f64vec3, f64vec3);"
+ "f64vec4 mix(f64vec4, f64vec4, f64vec4);"
+ "float64_t mix(float64_t, float64_t, bool);"
+ "f64vec2 mix(f64vec2, f64vec2, bvec2);"
+ "f64vec3 mix(f64vec3, f64vec3, bvec3);"
+ "f64vec4 mix(f64vec4, f64vec4, bvec4);"
+
+ "float64_t step(float64_t, float64_t);"
+ "f64vec2 step(f64vec2 , f64vec2);"
+ "f64vec3 step(f64vec3 , f64vec3);"
+ "f64vec4 step(f64vec4 , f64vec4);"
+ "f64vec2 step(float64_t, f64vec2);"
+ "f64vec3 step(float64_t, f64vec3);"
+ "f64vec4 step(float64_t, f64vec4);"
+
+ "float64_t smoothstep(float64_t, float64_t, float64_t);"
+ "f64vec2 smoothstep(f64vec2 , f64vec2 , f64vec2);"
+ "f64vec3 smoothstep(f64vec3 , f64vec3 , f64vec3);"
+ "f64vec4 smoothstep(f64vec4 , f64vec4 , f64vec4);"
+ "f64vec2 smoothstep(float64_t, float64_t, f64vec2);"
+ "f64vec3 smoothstep(float64_t, float64_t, f64vec3);"
+ "f64vec4 smoothstep(float64_t, float64_t, f64vec4);"
+
+ "float64_t length(float64_t);"
+ "float64_t length(f64vec2);"
+ "float64_t length(f64vec3);"
+ "float64_t length(f64vec4);"
+
+ "float64_t distance(float64_t, float64_t);"
+ "float64_t distance(f64vec2 , f64vec2);"
+ "float64_t distance(f64vec3 , f64vec3);"
+ "float64_t distance(f64vec4 , f64vec4);"
+
+ "float64_t dot(float64_t, float64_t);"
+ "float64_t dot(f64vec2 , f64vec2);"
+ "float64_t dot(f64vec3 , f64vec3);"
+ "float64_t dot(f64vec4 , f64vec4);"
+
+ "f64vec3 cross(f64vec3, f64vec3);"
+
+ "float64_t normalize(float64_t);"
+ "f64vec2 normalize(f64vec2);"
+ "f64vec3 normalize(f64vec3);"
+ "f64vec4 normalize(f64vec4);"
+
+ "float64_t faceforward(float64_t, float64_t, float64_t);"
+ "f64vec2 faceforward(f64vec2, f64vec2, f64vec2);"
+ "f64vec3 faceforward(f64vec3, f64vec3, f64vec3);"
+ "f64vec4 faceforward(f64vec4, f64vec4, f64vec4);"
+
+ "float64_t reflect(float64_t, float64_t);"
+ "f64vec2 reflect(f64vec2 , f64vec2 );"
+ "f64vec3 reflect(f64vec3 , f64vec3 );"
+ "f64vec4 reflect(f64vec4 , f64vec4 );"
+
+ "float64_t refract(float64_t, float64_t, float64_t);"
+ "f64vec2 refract(f64vec2 , f64vec2 , float64_t);"
+ "f64vec3 refract(f64vec3 , f64vec3 , float64_t);"
+ "f64vec4 refract(f64vec4 , f64vec4 , float64_t);"
+
+ "f64mat2 matrixCompMult(f64mat2, f64mat2);"
+ "f64mat3 matrixCompMult(f64mat3, f64mat3);"
+ "f64mat4 matrixCompMult(f64mat4, f64mat4);"
+ "f64mat2x3 matrixCompMult(f64mat2x3, f64mat2x3);"
+ "f64mat2x4 matrixCompMult(f64mat2x4, f64mat2x4);"
+ "f64mat3x2 matrixCompMult(f64mat3x2, f64mat3x2);"
+ "f64mat3x4 matrixCompMult(f64mat3x4, f64mat3x4);"
+ "f64mat4x2 matrixCompMult(f64mat4x2, f64mat4x2);"
+ "f64mat4x3 matrixCompMult(f64mat4x3, f64mat4x3);"
+
+ "f64mat2 outerProduct(f64vec2, f64vec2);"
+ "f64mat3 outerProduct(f64vec3, f64vec3);"
+ "f64mat4 outerProduct(f64vec4, f64vec4);"
+ "f64mat2x3 outerProduct(f64vec3, f64vec2);"
+ "f64mat3x2 outerProduct(f64vec2, f64vec3);"
+ "f64mat2x4 outerProduct(f64vec4, f64vec2);"
+ "f64mat4x2 outerProduct(f64vec2, f64vec4);"
+ "f64mat3x4 outerProduct(f64vec4, f64vec3);"
+ "f64mat4x3 outerProduct(f64vec3, f64vec4);"
+
+ "f64mat2 transpose(f64mat2);"
+ "f64mat3 transpose(f64mat3);"
+ "f64mat4 transpose(f64mat4);"
+ "f64mat2x3 transpose(f64mat3x2);"
+ "f64mat3x2 transpose(f64mat2x3);"
+ "f64mat2x4 transpose(f64mat4x2);"
+ "f64mat4x2 transpose(f64mat2x4);"
+ "f64mat3x4 transpose(f64mat4x3);"
+ "f64mat4x3 transpose(f64mat3x4);"
+
+ "float64_t determinant(f64mat2);"
+ "float64_t determinant(f64mat3);"
+ "float64_t determinant(f64mat4);"
+
+ "f64mat2 inverse(f64mat2);"
+ "f64mat3 inverse(f64mat3);"
+ "f64mat4 inverse(f64mat4);"
+
+ "\n");
+ }
+
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
commonBuiltins.append(
"int64_t abs(int64_t);"
@@ -998,25 +1195,25 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"u64vec3 mix(u64vec3, u64vec3, bvec3);"
"u64vec4 mix(u64vec4, u64vec4, bvec4);"
- "int64_t doubleBitsToInt64(double);"
- "i64vec2 doubleBitsToInt64(dvec2);"
- "i64vec3 doubleBitsToInt64(dvec3);"
- "i64vec4 doubleBitsToInt64(dvec4);"
+ "int64_t doubleBitsToInt64(float64_t);"
+ "i64vec2 doubleBitsToInt64(f64vec2);"
+ "i64vec3 doubleBitsToInt64(f64vec3);"
+ "i64vec4 doubleBitsToInt64(f64vec4);"
- "uint64_t doubleBitsToUint64(double);"
- "u64vec2 doubleBitsToUint64(dvec2);"
- "u64vec3 doubleBitsToUint64(dvec3);"
- "u64vec4 doubleBitsToUint64(dvec4);"
+ "uint64_t doubleBitsToUint64(float64_t);"
+ "u64vec2 doubleBitsToUint64(f64vec2);"
+ "u64vec3 doubleBitsToUint64(f64vec3);"
+ "u64vec4 doubleBitsToUint64(f64vec4);"
- "double int64BitsToDouble(int64_t);"
- "dvec2 int64BitsToDouble(i64vec2);"
- "dvec3 int64BitsToDouble(i64vec3);"
- "dvec4 int64BitsToDouble(i64vec4);"
+ "float64_t int64BitsToDouble(int64_t);"
+ "f64vec2 int64BitsToDouble(i64vec2);"
+ "f64vec3 int64BitsToDouble(i64vec3);"
+ "f64vec4 int64BitsToDouble(i64vec4);"
- "double uint64BitsToDouble(uint64_t);"
- "dvec2 uint64BitsToDouble(u64vec2);"
- "dvec3 uint64BitsToDouble(u64vec3);"
- "dvec4 uint64BitsToDouble(u64vec4);"
+ "float64_t uint64BitsToDouble(uint64_t);"
+ "f64vec2 uint64BitsToDouble(u64vec2);"
+ "f64vec3 uint64BitsToDouble(u64vec3);"
+ "f64vec4 uint64BitsToDouble(u64vec4);"
"int64_t packInt2x32(ivec2);"
"uint64_t packUint2x32(uvec2);"
@@ -1065,6 +1262,16 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"bvec3 notEqual(u64vec3, u64vec3);"
"bvec4 notEqual(u64vec4, u64vec4);"
+ "int64_t bitCount(int64_t);"
+ "i64vec2 bitCount(i64vec2);"
+ "i64vec3 bitCount(i64vec3);"
+ "i64vec4 bitCount(i64vec4);"
+
+ "int64_t bitCount(uint64_t);"
+ "i64vec2 bitCount(u64vec2);"
+ "i64vec3 bitCount(u64vec3);"
+ "i64vec4 bitCount(u64vec4);"
+
"int64_t findLSB(int64_t);"
"i64vec2 findLSB(i64vec2);"
"i64vec3 findLSB(i64vec3);"
@@ -1230,11 +1437,23 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
" int64_t atomicMin(coherent volatile inout int64_t, int64_t);"
"uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t, int, int, int);"
" int64_t atomicMin(coherent volatile inout int64_t, int64_t, int, int, int);"
+ "float16_t atomicMin(coherent volatile inout float16_t, float16_t);"
+ "float16_t atomicMin(coherent volatile inout float16_t, float16_t, int, int, int);"
+ " float atomicMin(coherent volatile inout float, float);"
+ " float atomicMin(coherent volatile inout float, float, int, int, int);"
+ " double atomicMin(coherent volatile inout double, double);"
+ " double atomicMin(coherent volatile inout double, double, int, int, int);"
"uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t);"
" int64_t atomicMax(coherent volatile inout int64_t, int64_t);"
"uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t, int, int, int);"
" int64_t atomicMax(coherent volatile inout int64_t, int64_t, int, int, int);"
+ "float16_t atomicMax(coherent volatile inout float16_t, float16_t);"
+ "float16_t atomicMax(coherent volatile inout float16_t, float16_t, int, int, int);"
+ " float atomicMax(coherent volatile inout float, float);"
+ " float atomicMax(coherent volatile inout float, float, int, int, int);"
+ " double atomicMax(coherent volatile inout double, double);"
+ " double atomicMax(coherent volatile inout double, double, int, int, int);"
"uint64_t atomicAnd(coherent volatile inout uint64_t, uint64_t);"
" int64_t atomicAnd(coherent volatile inout int64_t, int64_t);"
@@ -1255,6 +1474,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
" int64_t atomicAdd(coherent volatile inout int64_t, int64_t);"
"uint64_t atomicAdd(coherent volatile inout uint64_t, uint64_t, int, int, int);"
" int64_t atomicAdd(coherent volatile inout int64_t, int64_t, int, int, int);"
+ "float16_t atomicAdd(coherent volatile inout float16_t, float16_t);"
+ "float16_t atomicAdd(coherent volatile inout float16_t, float16_t, int, int, int);"
" float atomicAdd(coherent volatile inout float, float);"
" float atomicAdd(coherent volatile inout float, float, int, int, int);"
" double atomicAdd(coherent volatile inout double, double);"
@@ -1264,6 +1485,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
" int64_t atomicExchange(coherent volatile inout int64_t, int64_t);"
"uint64_t atomicExchange(coherent volatile inout uint64_t, uint64_t, int, int, int);"
" int64_t atomicExchange(coherent volatile inout int64_t, int64_t, int, int, int);"
+ "float16_t atomicExchange(coherent volatile inout float16_t, float16_t);"
+ "float16_t atomicExchange(coherent volatile inout float16_t, float16_t, int, int, int);"
" float atomicExchange(coherent volatile inout float, float);"
" float atomicExchange(coherent volatile inout float, float, int, int, int);"
" double atomicExchange(coherent volatile inout double, double);"
@@ -1276,11 +1499,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"uint64_t atomicLoad(coherent volatile in uint64_t, int, int, int);"
" int64_t atomicLoad(coherent volatile in int64_t, int, int, int);"
+ "float16_t atomicLoad(coherent volatile in float16_t, int, int, int);"
" float atomicLoad(coherent volatile in float, int, int, int);"
" double atomicLoad(coherent volatile in double, int, int, int);"
"void atomicStore(coherent volatile out uint64_t, uint64_t, int, int, int);"
"void atomicStore(coherent volatile out int64_t, int64_t, int, int, int);"
+ "void atomicStore(coherent volatile out float16_t, float16_t, int, int, int);"
"void atomicStore(coherent volatile out float, float, int, int, int);"
"void atomicStore(coherent volatile out double, double, int, int, int);"
"\n");
@@ -1335,6 +1560,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"dvec4 fma(dvec4, dvec4, dvec4 );"
"\n");
}
+
+ if (profile == EEsProfile && version >= 310) { // ARB_gpu_shader_fp64
+ commonBuiltins.append(
+ "float64_t fma(float64_t, float64_t, float64_t);"
+ "f64vec2 fma(f64vec2, f64vec2, f64vec2 );"
+ "f64vec3 fma(f64vec3, f64vec3, f64vec3 );"
+ "f64vec4 fma(f64vec4, f64vec4, f64vec4 );"
+ "\n");
+ }
#endif
if ((profile == EEsProfile && version >= 310) ||
@@ -1371,6 +1605,21 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
+
+ if (profile == EEsProfile && version >= 310) { // ARB_gpu_shader_fp64
+ commonBuiltins.append(
+ "float64_t frexp(float64_t, out int);"
+ "f64vec2 frexp( f64vec2, out ivec2);"
+ "f64vec3 frexp( f64vec3, out ivec3);"
+ "f64vec4 frexp( f64vec4, out ivec4);"
+
+ "float64_t ldexp(float64_t, int);"
+ "f64vec2 ldexp( f64vec2, ivec2);"
+ "f64vec3 ldexp( f64vec3, ivec3);"
+ "f64vec4 ldexp( f64vec4, ivec4);"
+
+ "\n");
+ }
#endif
#endif
@@ -1615,6 +1864,22 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
+ if (profile != EEsProfile && version == 450) {
+ commonBuiltins.append(
+ "uint atomicCounterAddARB(atomic_uint, uint);"
+ "uint atomicCounterSubtractARB(atomic_uint, uint);"
+ "uint atomicCounterMinARB(atomic_uint, uint);"
+ "uint atomicCounterMaxARB(atomic_uint, uint);"
+ "uint atomicCounterAndARB(atomic_uint, uint);"
+ "uint atomicCounterOrARB(atomic_uint, uint);"
+ "uint atomicCounterXorARB(atomic_uint, uint);"
+ "uint atomicCounterExchangeARB(atomic_uint, uint);"
+ "uint atomicCounterCompSwapARB(atomic_uint, uint, uint);"
+
+ "\n");
+ }
+
+
if (profile != EEsProfile && version >= 460) {
commonBuiltins.append(
"uint atomicCounterAdd(atomic_uint, uint);"
@@ -1630,6 +1895,36 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
}
+ else if (spvVersion.vulkanRelaxed) {
+ //
+ // Atomic counter functions act as aliases to normal atomic functions.
+ // replace definitions to take 'volatile coherent uint' instead of 'atomic_uint'
+ // and map to equivalent non-counter atomic op
+ //
+ if ((profile != EEsProfile && version >= 300) ||
+ (profile == EEsProfile && version >= 310)) {
+ commonBuiltins.append(
+ "uint atomicCounterIncrement(volatile coherent uint);"
+ "uint atomicCounterDecrement(volatile coherent uint);"
+ "uint atomicCounter(volatile coherent uint);"
+
+ "\n");
+ }
+ if (profile != EEsProfile && version >= 460) {
+ commonBuiltins.append(
+ "uint atomicCounterAdd(volatile coherent uint, uint);"
+ "uint atomicCounterSubtract(volatile coherent uint, uint);"
+ "uint atomicCounterMin(volatile coherent uint, uint);"
+ "uint atomicCounterMax(volatile coherent uint, uint);"
+ "uint atomicCounterAnd(volatile coherent uint, uint);"
+ "uint atomicCounterOr(volatile coherent uint, uint);"
+ "uint atomicCounterXor(volatile coherent uint, uint);"
+ "uint atomicCounterExchange(volatile coherent uint, uint);"
+ "uint atomicCounterCompSwap(volatile coherent uint, uint, uint);"
+
+ "\n");
+ }
+ }
#endif // !GLSLANG_ANGLE
// Bitfield
@@ -3116,7 +3411,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
#ifndef GLSLANG_ANGLE
// GL_AMD_gpu_shader_half_float/Explicit types
- if (profile != EEsProfile && version >= 450) {
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
commonBuiltins.append(
"float16_t radians(float16_t);"
"f16vec2 radians(f16vec2);"
@@ -3464,7 +3759,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
}
// Explicit types
- if (profile != EEsProfile && version >= 450) {
+ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
commonBuiltins.append(
"int8_t abs(int8_t);"
"i8vec2 abs(i8vec2);"
@@ -4124,7 +4419,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
}
#ifndef GLSLANG_WEB
if ((profile != EEsProfile && version >= 420) || esBarrier) {
- if (spvVersion.vulkan == 0) {
+ if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed) {
commonBuiltins.append("void memoryBarrierAtomicCounter();");
}
commonBuiltins.append("void memoryBarrierImage();");
@@ -4382,7 +4677,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
}
- // Builtins for GL_NV_ray_tracing/GL_EXT_ray_tracing/GL_EXT_ray_query
+ // Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query
if (profile != EEsProfile && version >= 460) {
commonBuiltins.append("void rayQueryInitializeEXT(rayQueryEXT, accelerationStructureEXT, uint, uint, vec3, float, vec3, float);"
"void rayQueryTerminateEXT(rayQueryEXT);"
@@ -4411,6 +4706,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
stageBuiltins[EShLangRayGen].append(
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
+ "void traceRayMotionNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);"
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
"void executeCallableNV(uint, int);"
"void executeCallableEXT(uint, int);"
@@ -4425,12 +4721,14 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"\n");
stageBuiltins[EShLangClosestHit].append(
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
+ "void traceRayMotionNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);"
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
"void executeCallableNV(uint, int);"
"void executeCallableEXT(uint, int);"
"\n");
stageBuiltins[EShLangMiss].append(
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
+ "void traceRayMotionNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);"
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
"void executeCallableNV(uint, int);"
"void executeCallableEXT(uint, int);"
@@ -4848,6 +5146,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in int gl_VertexIndex;"
"in int gl_InstanceIndex;"
);
+
+ if (spvVersion.vulkan > 0 && version >= 140 && spvVersion.vulkanRelaxed)
+ stageBuiltins[EShLangVertex].append(
+ "in int gl_VertexID;" // declare with 'in' qualifier
+ "in int gl_InstanceID;"
+ );
+
if (version >= 440) {
stageBuiltins[EShLangVertex].append(
"in int gl_BaseVertexARB;"
@@ -4885,7 +5190,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"mediump float gl_PointSize;" // needs qualifier fixed later
);
} else {
- if (spvVersion.vulkan == 0)
+ if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed)
stageBuiltins[EShLangVertex].append(
"in highp int gl_VertexID;" // needs qualifier fixed later
"in highp int gl_InstanceID;" // needs qualifier fixed later
@@ -5632,6 +5937,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in mat3x4 gl_WorldToObject3x4EXT;"
"in uint gl_IncomingRayFlagsNV;"
"in uint gl_IncomingRayFlagsEXT;"
+ "in float gl_CurrentRayTimeNV;"
"\n";
const char *hitDecls =
"in uvec3 gl_LaunchIDNV;"
@@ -5667,6 +5973,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in mat3x4 gl_WorldToObject3x4EXT;"
"in uint gl_IncomingRayFlagsNV;"
"in uint gl_IncomingRayFlagsEXT;"
+ "in float gl_CurrentRayTimeNV;"
"\n";
const char *missDecls =
"in uvec3 gl_LaunchIDNV;"
@@ -5685,6 +5992,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"in float gl_RayTmaxEXT;"
"in uint gl_IncomingRayFlagsNV;"
"in uint gl_IncomingRayFlagsEXT;"
+ "in float gl_CurrentRayTimeNV;"
"\n";
const char *callableDecls =
@@ -6211,6 +6519,24 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int
commonBuiltins.append(imageParams);
commonBuiltins.append(", float");
commonBuiltins.append(", int, int, int);\n");
+
+ commonBuiltins.append("float imageAtomicMin(volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", float);\n");
+
+ commonBuiltins.append("float imageAtomicMin(volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", float");
+ commonBuiltins.append(", int, int, int);\n");
+
+ commonBuiltins.append("float imageAtomicMax(volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", float);\n");
+
+ commonBuiltins.append("float imageAtomicMax(volatile coherent ");
+ commonBuiltins.append(imageParams);
+ commonBuiltins.append(", float");
+ commonBuiltins.append(", int, int, int);\n");
}
}
}
@@ -6538,7 +6864,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
s.append(");\n");
// Add to the per-language set of built-ins
- if (bias || lodClamp != 0) {
+ if (!grad && (bias || lodClamp != 0)) {
stageBuiltins[EShLangFragment].append(s);
stageBuiltins[EShLangCompute].append(s);
} else
@@ -6979,6 +7305,9 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentUniformVectors = %d;", resources.maxFragmentUniformVectors);
s.append(builtInConstant);
+
+ snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingVectors = %d;", resources.maxVaryingVectors);
+ s.append(builtInConstant);
}
snprintf(builtInConstant, maxSize, "const int gl_MaxVertexAttribs = %d;", resources.maxVertexAttribs);
@@ -7011,7 +7340,8 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
snprintf(builtInConstant, maxSize, "const int gl_MaxVertexUniformComponents = %d;", resources.maxVertexUniformComponents);
s.append(builtInConstant);
- if (version < 150 || ARBCompatibility) {
+ // Moved from just being deprecated into compatibility profile only as of 4.20
+ if (version < 420 || profile == ECompatibilityProfile) {
snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingFloats = %d;", resources.maxVaryingFloats);
s.append(builtInConstant);
}
@@ -7436,6 +7766,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable);
}
+ if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
+ // treat these built-ins as aliases of VertexIndex and InstanceIndex
+ BuiltInVariable("gl_VertexID", EbvVertexIndex, symbolTable);
+ BuiltInVariable("gl_InstanceID", EbvInstanceIndex, symbolTable);
+ }
+
if (profile != EEsProfile) {
if (version >= 440) {
symbolTable.setVariableExtensions("gl_BaseVertexARB", 1, &E_GL_ARB_shader_draw_parameters);
@@ -7947,6 +8283,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("atomicCounter" , 1, &E_GL_ARB_shader_atomic_counters);
}
+ // E_GL_ARB_shader_atomic_counter_ops
+ if (profile != EEsProfile && version == 450) {
+ symbolTable.setFunctionExtensions("atomicCounterAddARB" , 1, &E_GL_ARB_shader_atomic_counter_ops);
+ symbolTable.setFunctionExtensions("atomicCounterSubtractARB", 1, &E_GL_ARB_shader_atomic_counter_ops);
+ symbolTable.setFunctionExtensions("atomicCounterMinARB" , 1, &E_GL_ARB_shader_atomic_counter_ops);
+ symbolTable.setFunctionExtensions("atomicCounterMaxARB" , 1, &E_GL_ARB_shader_atomic_counter_ops);
+ symbolTable.setFunctionExtensions("atomicCounterAndARB" , 1, &E_GL_ARB_shader_atomic_counter_ops);
+ symbolTable.setFunctionExtensions("atomicCounterOrARB" , 1, &E_GL_ARB_shader_atomic_counter_ops);
+ symbolTable.setFunctionExtensions("atomicCounterXorARB" , 1, &E_GL_ARB_shader_atomic_counter_ops);
+ symbolTable.setFunctionExtensions("atomicCounterExchangeARB", 1, &E_GL_ARB_shader_atomic_counter_ops);
+ symbolTable.setFunctionExtensions("atomicCounterCompSwapARB", 1, &E_GL_ARB_shader_atomic_counter_ops);
+ }
+
// E_GL_ARB_derivative_control
if (profile != EEsProfile && version < 450) {
symbolTable.setFunctionExtensions("dFdxFine", 1, &E_GL_ARB_derivative_control);
@@ -8475,11 +8824,13 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setVariableExtensions("gl_WorldToObject3x4EXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setVariableExtensions("gl_IncomingRayFlagsNV", 1, &E_GL_NV_ray_tracing);
symbolTable.setVariableExtensions("gl_IncomingRayFlagsEXT", 1, &E_GL_EXT_ray_tracing);
+ symbolTable.setVariableExtensions("gl_CurrentRayTimeNV", 1, &E_GL_NV_ray_tracing_motion_blur);
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
symbolTable.setFunctionExtensions("traceNV", 1, &E_GL_NV_ray_tracing);
+ symbolTable.setFunctionExtensions("traceRayMotionNV", 1, &E_GL_NV_ray_tracing_motion_blur);
symbolTable.setFunctionExtensions("traceRayEXT", 1, &E_GL_EXT_ray_tracing);
symbolTable.setFunctionExtensions("reportIntersectionNV", 1, &E_GL_NV_ray_tracing);
symbolTable.setFunctionExtensions("reportIntersectionEXT", 1, &E_GL_EXT_ray_tracing);
@@ -8523,6 +8874,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable("gl_IncomingRayFlagsNV", EbvIncomingRayFlags, symbolTable);
BuiltInVariable("gl_IncomingRayFlagsEXT", EbvIncomingRayFlags, symbolTable);
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
+ BuiltInVariable("gl_CurrentRayTimeNV", EbvCurrentRayTimeNV, symbolTable);
// GL_ARB_shader_ballot
symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot);
@@ -8912,6 +9264,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierAtomicCounter);
symbolTable.relateToOperator("memoryBarrierImage", EOpMemoryBarrierImage);
+ if (spvVersion.vulkanRelaxed) {
+ //
+ // functions signature have been replaced to take uint operations on buffer variables
+ // remap atomic counter functions to atomic operations
+ //
+ symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierBuffer);
+ }
+
symbolTable.relateToOperator("atomicLoad", EOpAtomicLoad);
symbolTable.relateToOperator("atomicStore", EOpAtomicStore);
@@ -8919,12 +9279,38 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("atomicCounterDecrement", EOpAtomicCounterDecrement);
symbolTable.relateToOperator("atomicCounter", EOpAtomicCounter);
+ if (spvVersion.vulkanRelaxed) {
+ //
+ // functions signature have been replaced to take uint operations
+ // remap atomic counter functions to atomic operations
+ //
+ // these atomic counter functions do not match signatures of glsl
+ // atomic functions, so they will be remapped to semantically
+ // equivalent functions in the parser
+ //
+ symbolTable.relateToOperator("atomicCounterIncrement", EOpNull);
+ symbolTable.relateToOperator("atomicCounterDecrement", EOpNull);
+ symbolTable.relateToOperator("atomicCounter", EOpNull);
+ }
+
symbolTable.relateToOperator("clockARB", EOpReadClockSubgroupKHR);
symbolTable.relateToOperator("clock2x32ARB", EOpReadClockSubgroupKHR);
symbolTable.relateToOperator("clockRealtimeEXT", EOpReadClockDeviceKHR);
symbolTable.relateToOperator("clockRealtime2x32EXT", EOpReadClockDeviceKHR);
+ if (profile != EEsProfile && version == 450) {
+ symbolTable.relateToOperator("atomicCounterAddARB", EOpAtomicCounterAdd);
+ symbolTable.relateToOperator("atomicCounterSubtractARB", EOpAtomicCounterSubtract);
+ symbolTable.relateToOperator("atomicCounterMinARB", EOpAtomicCounterMin);
+ symbolTable.relateToOperator("atomicCounterMaxARB", EOpAtomicCounterMax);
+ symbolTable.relateToOperator("atomicCounterAndARB", EOpAtomicCounterAnd);
+ symbolTable.relateToOperator("atomicCounterOrARB", EOpAtomicCounterOr);
+ symbolTable.relateToOperator("atomicCounterXorARB", EOpAtomicCounterXor);
+ symbolTable.relateToOperator("atomicCounterExchangeARB", EOpAtomicCounterExchange);
+ symbolTable.relateToOperator("atomicCounterCompSwapARB", EOpAtomicCounterCompSwap);
+ }
+
if (profile != EEsProfile && version >= 460) {
symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicCounterAdd);
symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicCounterSubtract);
@@ -8937,6 +9323,23 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCounterCompSwap);
}
+ if (spvVersion.vulkanRelaxed) {
+ //
+ // functions signature have been replaced to take 'uint' instead of 'atomic_uint'
+ // remap atomic counter functions to non-counter atomic ops so
+ // functions act as aliases to non-counter atomic ops
+ //
+ symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicAdd);
+ symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicSubtract);
+ symbolTable.relateToOperator("atomicCounterMin", EOpAtomicMin);
+ symbolTable.relateToOperator("atomicCounterMax", EOpAtomicMax);
+ symbolTable.relateToOperator("atomicCounterAnd", EOpAtomicAnd);
+ symbolTable.relateToOperator("atomicCounterOr", EOpAtomicOr);
+ symbolTable.relateToOperator("atomicCounterXor", EOpAtomicXor);
+ symbolTable.relateToOperator("atomicCounterExchange", EOpAtomicExchange);
+ symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCompSwap);
+ }
+
symbolTable.relateToOperator("fma", EOpFma);
symbolTable.relateToOperator("frexp", EOpFrexp);
symbolTable.relateToOperator("ldexp", EOpLdexp);
@@ -9315,6 +9718,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
case EShLangMiss:
if (profile != EEsProfile && version >= 460) {
symbolTable.relateToOperator("traceNV", EOpTraceNV);
+ symbolTable.relateToOperator("traceRayMotionNV", EOpTraceRayMotionNV);
symbolTable.relateToOperator("traceRayEXT", EOpTraceKHR);
symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV);
symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallableKHR);
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp b/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
index f6172a2bf7..0278445969 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Intermediate.cpp
@@ -65,7 +65,7 @@ namespace glslang {
// Returns the added node.
//
-TIntermSymbol* TIntermediate::addSymbol(int id, const TString& name, const TType& type, const TConstUnionArray& constArray,
+TIntermSymbol* TIntermediate::addSymbol(long long id, const TString& name, const TType& type, const TConstUnionArray& constArray,
TIntermTyped* constSubtree, const TSourceLoc& loc)
{
TIntermSymbol* node = new TIntermSymbol(id, name, type);
@@ -1739,7 +1739,7 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EbtUint:
switch (from) {
case EbtInt:
- return version >= 400 || getSource() == EShSourceHlsl;
+ return version >= 400 || getSource() == EShSourceHlsl || IsRequestedExtension(E_GL_ARB_gpu_shader5);
case EbtBool:
return getSource() == EShSourceHlsl;
case EbtInt16:
@@ -2676,7 +2676,11 @@ TIntermTyped* TIntermediate::addSwizzle(TSwizzleSelectors<selectorType>& selecto
// 'swizzleOkay' says whether or not it is okay to consider a swizzle
// a valid part of the dereference chain.
//
-const TIntermTyped* TIntermediate::findLValueBase(const TIntermTyped* node, bool swizzleOkay)
+// 'BufferReferenceOk' says if type is buffer_reference, the routine stop to find the most left node.
+//
+//
+
+const TIntermTyped* TIntermediate::findLValueBase(const TIntermTyped* node, bool swizzleOkay , bool bufferReferenceOk)
{
do {
const TIntermBinary* binary = node->getAsBinaryNode();
@@ -2694,6 +2698,8 @@ const TIntermTyped* TIntermediate::findLValueBase(const TIntermTyped* node, bool
return nullptr;
}
node = node->getAsBinaryNode()->getLeft();
+ if (bufferReferenceOk && node->isReference())
+ return node;
} while (true);
}
@@ -2870,7 +2876,7 @@ void TIntermediate::addToCallGraph(TInfoSink& /*infoSink*/, const TString& calle
return;
}
- callGraph.push_front(TCall(caller, callee));
+ callGraph.emplace_front(caller, callee);
}
//
@@ -3776,11 +3782,16 @@ void TIntermBinary::updatePrecision()
{
if (getBasicType() == EbtInt || getBasicType() == EbtUint ||
getBasicType() == EbtFloat || getBasicType() == EbtFloat16) {
- getQualifier().precision = std::max(right->getQualifier().precision, left->getQualifier().precision);
- if (getQualifier().precision != EpqNone) {
- left->propagatePrecision(getQualifier().precision);
- right->propagatePrecision(getQualifier().precision);
- }
+ if (op == EOpRightShift || op == EOpLeftShift) {
+ // For shifts get precision from left side only and thus no need to propagate
+ getQualifier().precision = left->getQualifier().precision;
+ } else {
+ getQualifier().precision = std::max(right->getQualifier().precision, left->getQualifier().precision);
+ if (getQualifier().precision != EpqNone) {
+ left->propagatePrecision(getQualifier().precision);
+ right->propagatePrecision(getQualifier().precision);
+ }
+ }
}
}
diff --git a/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp b/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp
index 3efa27aca3..02cca409e1 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp
@@ -601,7 +601,6 @@ void TParseContextBase::parseSwizzleSelector(const TSourceLoc& loc, const TStrin
selector.push_back(0);
}
-#ifdef ENABLE_HLSL
//
// Make the passed-in variable information become a member of the
// global uniform block. If this doesn't exist yet, make it.
@@ -646,7 +645,67 @@ void TParseContextBase::growGlobalUniformBlock(const TSourceLoc& loc, TType& mem
++firstNewMember;
}
-#endif
+
+void TParseContextBase::growAtomicCounterBlock(int binding, const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList) {
+ // Make the atomic counter block, if not yet made.
+ const auto &at = atomicCounterBuffers.find(binding);
+ if (at == atomicCounterBuffers.end()) {
+ atomicCounterBuffers.insert({binding, (TVariable*)nullptr });
+ atomicCounterBlockFirstNewMember.insert({binding, 0});
+ }
+
+ TVariable*& atomicCounterBuffer = atomicCounterBuffers[binding];
+ int& bufferNewMember = atomicCounterBlockFirstNewMember[binding];
+
+ if (atomicCounterBuffer == nullptr) {
+ TQualifier blockQualifier;
+ blockQualifier.clear();
+ blockQualifier.storage = EvqBuffer;
+
+ char charBuffer[512];
+ if (binding != TQualifier::layoutBindingEnd) {
+ snprintf(charBuffer, 512, "%s_%d", getAtomicCounterBlockName(), binding);
+ } else {
+ snprintf(charBuffer, 512, "%s_0", getAtomicCounterBlockName());
+ }
+
+ TType blockType(new TTypeList, *NewPoolTString(charBuffer), blockQualifier);
+ setUniformBlockDefaults(blockType);
+ blockType.getQualifier().layoutPacking = ElpStd430;
+ atomicCounterBuffer = new TVariable(NewPoolTString(""), blockType, true);
+ // If we arn't auto mapping bindings then set the block to use the same
+ // binding as what the atomic was set to use
+ if (!intermediate.getAutoMapBindings()) {
+ atomicCounterBuffer->getWritableType().getQualifier().layoutBinding = binding;
+ }
+ bufferNewMember = 0;
+
+ atomicCounterBuffer->getWritableType().getQualifier().layoutSet = atomicCounterBlockSet;
+ }
+
+ // Add the requested member as a member to the global block.
+ TType* type = new TType;
+ type->shallowCopy(memberType);
+ type->setFieldName(memberName);
+ if (typeList)
+ type->setStruct(typeList);
+ TTypeLoc typeLoc = {type, loc};
+ atomicCounterBuffer->getType().getWritableStruct()->push_back(typeLoc);
+
+ // Insert into the symbol table.
+ if (bufferNewMember == 0) {
+ // This is the first request; we need a normal symbol table insert
+ if (symbolTable.insert(*atomicCounterBuffer))
+ trackLinkage(*atomicCounterBuffer);
+ else
+ error(loc, "failed to insert the global constant buffer", "buffer", "");
+ } else {
+ // This is a follow-on request; we need to amend the first insert
+ symbolTable.amend(*atomicCounterBuffer, bufferNewMember);
+ }
+
+ ++bufferNewMember;
+}
void TParseContextBase::finish()
{
diff --git a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp
index 9c42a204f7..b957bb87ca 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp
@@ -87,6 +87,10 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b
globalInputDefaults.clear();
globalOutputDefaults.clear();
+ globalSharedDefaults.clear();
+ globalSharedDefaults.layoutMatrix = ElmColumnMajor;
+ globalSharedDefaults.layoutPacking = ElpStd430;
+
#ifndef GLSLANG_WEB
// "Shaders in the transform
// feedback capturing mode have an initial global default of
@@ -221,6 +225,118 @@ void TParseContext::parserError(const char* s)
error(getCurrentLoc(), "compilation terminated", "", "");
}
+void TParseContext::growGlobalUniformBlock(const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList)
+{
+ bool createBlock = globalUniformBlock == nullptr;
+
+ if (createBlock) {
+ globalUniformBinding = intermediate.getGlobalUniformBinding();
+ globalUniformSet = intermediate.getGlobalUniformSet();
+ }
+
+ // use base class function to create/expand block
+ TParseContextBase::growGlobalUniformBlock(loc, memberType, memberName, typeList);
+
+ if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
+ // check for a block storage override
+ TBlockStorageClass storageOverride = intermediate.getBlockStorageOverride(getGlobalUniformBlockName());
+ TQualifier& qualifier = globalUniformBlock->getWritableType().getQualifier();
+ qualifier.defaultBlock = true;
+
+ if (storageOverride != EbsNone) {
+ if (createBlock) {
+ // Remap block storage
+ qualifier.setBlockStorage(storageOverride);
+
+ // check that the change didn't create errors
+ blockQualifierCheck(loc, qualifier, false);
+ }
+
+ // remap meber storage as well
+ memberType.getQualifier().setBlockStorage(storageOverride);
+ }
+ }
+}
+
+void TParseContext::growAtomicCounterBlock(int binding, const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList)
+{
+ bool createBlock = atomicCounterBuffers.find(binding) == atomicCounterBuffers.end();
+
+ if (createBlock) {
+ atomicCounterBlockSet = intermediate.getAtomicCounterBlockSet();
+ }
+
+ // use base class function to create/expand block
+ TParseContextBase::growAtomicCounterBlock(binding, loc, memberType, memberName, typeList);
+ TQualifier& qualifier = atomicCounterBuffers[binding]->getWritableType().getQualifier();
+ qualifier.defaultBlock = true;
+
+ if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
+ // check for a Block storage override
+ TBlockStorageClass storageOverride = intermediate.getBlockStorageOverride(getAtomicCounterBlockName());
+
+ if (storageOverride != EbsNone) {
+ if (createBlock) {
+ // Remap block storage
+
+ qualifier.setBlockStorage(storageOverride);
+
+ // check that the change didn't create errors
+ blockQualifierCheck(loc, qualifier, false);
+ }
+
+ // remap meber storage as well
+ memberType.getQualifier().setBlockStorage(storageOverride);
+ }
+ }
+}
+
+const char* TParseContext::getGlobalUniformBlockName() const
+{
+ const char* name = intermediate.getGlobalUniformBlockName();
+ if (std::string(name) == "")
+ return "gl_DefaultUniformBlock";
+ else
+ return name;
+}
+void TParseContext::finalizeGlobalUniformBlockLayout(TVariable&)
+{
+}
+void TParseContext::setUniformBlockDefaults(TType& block) const
+{
+ block.getQualifier().layoutPacking = ElpStd140;
+ block.getQualifier().layoutMatrix = ElmColumnMajor;
+}
+
+
+const char* TParseContext::getAtomicCounterBlockName() const
+{
+ const char* name = intermediate.getAtomicCounterBlockName();
+ if (std::string(name) == "")
+ return "gl_AtomicCounterBlock";
+ else
+ return name;
+}
+void TParseContext::finalizeAtomicCounterBlockLayout(TVariable&)
+{
+}
+
+void TParseContext::setAtomicCounterBlockDefaults(TType& block) const
+{
+ block.getQualifier().layoutPacking = ElpStd430;
+ block.getQualifier().layoutMatrix = ElmRowMajor;
+}
+
+void TParseContext::setInvariant(const TSourceLoc& loc, const char* builtin) {
+ TSymbol* symbol = symbolTable.find(builtin);
+ if (symbol && symbol->getType().getQualifier().isPipeOutput()) {
+ if (intermediate.inIoAccessed(builtin))
+ warn(loc, "changing qualification after use", "invariant", builtin);
+ TSymbol* csymbol = symbolTable.copyUp(symbol);
+ csymbol->getWritableType().getQualifier().invariant = true;
+ }
+}
+
void TParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>& tokens)
{
#ifndef GLSLANG_WEB
@@ -298,8 +414,33 @@ void TParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>&
intermediate.setUseVariablePointers();
} else if (tokens[0].compare("once") == 0) {
warn(loc, "not implemented", "#pragma once", "");
- } else if (tokens[0].compare("glslang_binary_double_output") == 0)
+ } else if (tokens[0].compare("glslang_binary_double_output") == 0) {
intermediate.setBinaryDoubleOutput();
+ } else if (spvVersion.spv > 0 && tokens[0].compare("STDGL") == 0 &&
+ tokens[1].compare("invariant") == 0 && tokens[3].compare("all") == 0) {
+ intermediate.setInvariantAll();
+ // Set all builtin out variables invariant if declared
+ setInvariant(loc, "gl_Position");
+ setInvariant(loc, "gl_PointSize");
+ setInvariant(loc, "gl_ClipDistance");
+ setInvariant(loc, "gl_CullDistance");
+ setInvariant(loc, "gl_TessLevelOuter");
+ setInvariant(loc, "gl_TessLevelInner");
+ setInvariant(loc, "gl_PrimitiveID");
+ setInvariant(loc, "gl_Layer");
+ setInvariant(loc, "gl_ViewportIndex");
+ setInvariant(loc, "gl_FragDepth");
+ setInvariant(loc, "gl_SampleMask");
+ setInvariant(loc, "gl_ClipVertex");
+ setInvariant(loc, "gl_FrontColor");
+ setInvariant(loc, "gl_BackColor");
+ setInvariant(loc, "gl_FrontSecondaryColor");
+ setInvariant(loc, "gl_BackSecondaryColor");
+ setInvariant(loc, "gl_TexCoord");
+ setInvariant(loc, "gl_FogFragCoord");
+ setInvariant(loc, "gl_FragColor");
+ setInvariant(loc, "gl_FragData");
+ }
#endif
}
@@ -986,12 +1127,31 @@ TFunction* TParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunct
TSymbol* symbol = symbolTable.find(function.getMangledName(), &builtIn);
if (symbol && symbol->getAsFunction() && builtIn)
requireProfile(loc, ~EEsProfile, "redefinition of built-in function");
+#ifndef GLSLANG_WEB
+ // Check the validity of using spirv_literal qualifier
+ for (int i = 0; i < function.getParamCount(); ++i) {
+ if (function[i].type->getQualifier().isSpirvLiteral() && function.getBuiltInOp() != EOpSpirvInst)
+ error(loc, "'spirv_literal' can only be used on functions defined with 'spirv_instruction' for argument",
+ function.getName().c_str(), "%d", i + 1);
+ }
+
+ // For function declaration with SPIR-V instruction qualifier, always ignore the built-in function and
+ // respect this redeclared one.
+ if (symbol && builtIn && function.getBuiltInOp() == EOpSpirvInst)
+ symbol = nullptr;
+#endif
const TFunction* prevDec = symbol ? symbol->getAsFunction() : 0;
if (prevDec) {
if (prevDec->isPrototyped() && prototype)
profileRequires(loc, EEsProfile, 300, nullptr, "multiple prototypes for same function");
if (prevDec->getType() != function.getType())
error(loc, "overloaded functions must have the same return type", function.getName().c_str(), "");
+#ifndef GLSLANG_WEB
+ if (prevDec->getSpirvInstruction() != function.getSpirvInstruction()) {
+ error(loc, "overloaded functions must have the same qualifiers", function.getName().c_str(),
+ "spirv_instruction");
+ }
+#endif
for (int i = 0; i < prevDec->getParamCount(); ++i) {
if ((*prevDec)[i].type->getQualifier().storage != function[i].type->getQualifier().storage)
error(loc, "overloaded functions must have the same parameter storage qualifiers for argument", function[i].type->getStorageQualifierString(), "%d", i+1);
@@ -1131,6 +1291,14 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
{
TIntermTyped* result = nullptr;
+ if (spvVersion.vulkan != 0 && spvVersion.vulkanRelaxed) {
+ // allow calls that are invalid in Vulkan Semantics to be invisibily
+ // remapped to equivalent valid functions
+ result = vkRelaxedRemapFunctionCall(loc, function, arguments);
+ if (result)
+ return result;
+ }
+
if (function->getBuiltInOp() == EOpArrayLength)
result = handleLengthMethod(loc, function, arguments);
else if (function->getBuiltInOp() != EOpNull) {
@@ -1185,6 +1353,15 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
if (lValueErrorCheck(arguments->getLoc(), "assign", arg->getAsTyped()))
error(arguments->getLoc(), "Non-L-value cannot be passed for 'out' or 'inout' parameters.", "out", "");
}
+#ifndef GLSLANG_WEB
+ if (formalQualifier.isSpirvLiteral()) {
+ if (!arg->getAsTyped()->getQualifier().isFrontEndConstant()) {
+ error(arguments->getLoc(),
+ "Non front-end constant expressions cannot be passed for 'spirv_literal' parameters.",
+ "spirv_literal", "");
+ }
+ }
+#endif
const TType& argType = arg->getAsTyped()->getType();
const TQualifier& argQualifier = argType.getQualifier();
if (argQualifier.isMemory() && (argType.containsOpaque() || argType.isReference())) {
@@ -1239,6 +1416,11 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
if (builtIn && fnCandidate->getBuiltInOp() != EOpNull) {
// A function call mapped to a built-in operation.
result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate);
+#ifndef GLSLANG_WEB
+ } else if (fnCandidate->getBuiltInOp() == EOpSpirvInst) {
+ // When SPIR-V instruction qualifier is specified, the function call is still mapped to a built-in operation.
+ result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate);
+#endif
} else {
// This is a function call not mapped to built-in operator.
// It could still be a built-in function, but only if PureOperatorBuiltins == false.
@@ -1316,6 +1498,35 @@ TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNo
} else if (result->getAsOperator())
builtInOpCheck(loc, function, *result->getAsOperator());
+#ifndef GLSLANG_WEB
+ // Special handling for function call with SPIR-V instruction qualifier specified
+ if (function.getBuiltInOp() == EOpSpirvInst) {
+ if (auto agg = result->getAsAggregate()) {
+ // Propogate spirv_by_reference/spirv_literal from parameters to arguments
+ auto& sequence = agg->getSequence();
+ for (unsigned i = 0; i < sequence.size(); ++i) {
+ if (function[i].type->getQualifier().isSpirvByReference())
+ sequence[i]->getAsTyped()->getQualifier().setSpirvByReference();
+ if (function[i].type->getQualifier().isSpirvLiteral())
+ sequence[i]->getAsTyped()->getQualifier().setSpirvLiteral();
+ }
+
+ // Attach the function call to SPIR-V intruction
+ agg->setSpirvInstruction(function.getSpirvInstruction());
+ } else if (auto unaryNode = result->getAsUnaryNode()) {
+ // Propogate spirv_by_reference/spirv_literal from parameters to arguments
+ if (function[0].type->getQualifier().isSpirvByReference())
+ unaryNode->getOperand()->getQualifier().setSpirvByReference();
+ if (function[0].type->getQualifier().isSpirvLiteral())
+ unaryNode->getOperand()->getQualifier().setSpirvLiteral();
+
+ // Attach the function call to SPIR-V intruction
+ unaryNode->setSpirvInstruction(function.getSpirvInstruction());
+ } else
+ assert(0);
+ }
+#endif
+
return result;
}
@@ -1723,6 +1934,7 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction&
// Grab the semantics and storage class semantics from the operands, based on opcode
switch (callNode.getOp()) {
case EOpAtomicAdd:
+ case EOpAtomicSubtract:
case EOpAtomicMin:
case EOpAtomicMax:
case EOpAtomicAnd:
@@ -1981,7 +2193,13 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
profileRequires(loc, ~EEsProfile, 450, nullptr, feature);
requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature);
}
-
+ // As per GL_ARB_sparse_texture2 extension "Offsets" parameter must be constant integral expression
+ // for sparseTextureGatherOffsetsARB just as textureGatherOffsets
+ if (callNode.getOp() == EOpSparseTextureGatherOffsets) {
+ int offsetsArg = arg0->getType().getSampler().shadow ? 3 : 2;
+ if (!(*argp)[offsetsArg]->getAsConstantUnion())
+ error(loc, "argument must be compile-time constant", "offsets", "");
+ }
break;
}
@@ -2070,6 +2288,16 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
"[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]");
}
}
+
+ if (callNode.getOp() == EOpTextureOffset) {
+ TSampler s = arg0->getType().getSampler();
+ if (s.is2D() && s.isArrayed() && s.isShadow()) {
+ if (isEsProfile())
+ error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "ES Profile");
+ else if (version <= 420)
+ error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "version <= 420");
+ }
+ }
}
break;
@@ -2080,6 +2308,10 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
if (!(*argp)[10]->getAsConstantUnion())
error(loc, "argument must be compile-time constant", "payload number", "a");
break;
+ case EOpTraceRayMotionNV:
+ if (!(*argp)[11]->getAsConstantUnion())
+ error(loc, "argument must be compile-time constant", "payload number", "a");
+ break;
case EOpTraceKHR:
if (!(*argp)[10]->getAsConstantUnion())
error(loc, "argument must be compile-time constant", "payload number", "a");
@@ -2148,18 +2380,23 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
error(loc, "only supported on image with format r64i", fnCandidate.getName().c_str(), "");
else if (callNode.getType().getBasicType() == EbtUint64 && imageType.getQualifier().getFormat() != ElfR64ui)
error(loc, "only supported on image with format r64ui", fnCandidate.getName().c_str(), "");
- } else {
- bool isImageAtomicOnFloatAllowed = ((fnCandidate.getName().compare(0, 14, "imageAtomicAdd") == 0) ||
- (fnCandidate.getName().compare(0, 15, "imageAtomicLoad") == 0) ||
- (fnCandidate.getName().compare(0, 16, "imageAtomicStore") == 0) ||
- (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") == 0));
- if (imageType.getSampler().type == EbtFloat && isImageAtomicOnFloatAllowed &&
- (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") != 0)) // imageAtomicExchange doesn't require GL_EXT_shader_atomic_float
+ } else if (imageType.getSampler().type == EbtFloat) {
+ if (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") == 0) {
+ // imageAtomicExchange doesn't require an extension
+ } else if ((fnCandidate.getName().compare(0, 14, "imageAtomicAdd") == 0) ||
+ (fnCandidate.getName().compare(0, 15, "imageAtomicLoad") == 0) ||
+ (fnCandidate.getName().compare(0, 16, "imageAtomicStore") == 0)) {
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
- if (!isImageAtomicOnFloatAllowed)
+ } else if ((fnCandidate.getName().compare(0, 14, "imageAtomicMin") == 0) ||
+ (fnCandidate.getName().compare(0, 14, "imageAtomicMax") == 0)) {
+ requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float2, fnCandidate.getName().c_str());
+ } else {
error(loc, "only supported on integer images", fnCandidate.getName().c_str(), "");
- else if (imageType.getQualifier().getFormat() != ElfR32f && isEsProfile())
+ }
+ if (imageType.getQualifier().getFormat() != ElfR32f && isEsProfile())
error(loc, "only supported on image with format r32f", fnCandidate.getName().c_str(), "");
+ } else {
+ error(loc, "not supported on this image type", fnCandidate.getName().c_str(), "");
}
const size_t maxArgs = imageType.getSampler().isMultiSample() ? 5 : 4;
@@ -2172,6 +2409,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
}
case EOpAtomicAdd:
+ case EOpAtomicSubtract:
case EOpAtomicMin:
case EOpAtomicMax:
case EOpAtomicAnd:
@@ -2187,17 +2425,37 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
memorySemanticsCheck(loc, fnCandidate, callNode);
if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange ||
callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore) &&
- (arg0->getType().isFloatingDomain())) {
+ (arg0->getType().getBasicType() == EbtFloat ||
+ arg0->getType().getBasicType() == EbtDouble)) {
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
+ } else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange ||
+ callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore ||
+ callNode.getOp() == EOpAtomicMin || callNode.getOp() == EOpAtomicMax) &&
+ arg0->getType().isFloatingDomain()) {
+ requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float2, fnCandidate.getName().c_str());
}
} else if (arg0->getType().getBasicType() == EbtInt64 || arg0->getType().getBasicType() == EbtUint64) {
const char* const extensions[2] = { E_GL_NV_shader_atomic_int64,
E_GL_EXT_shader_atomic_int64 };
requireExtensions(loc, 2, extensions, fnCandidate.getName().c_str());
} else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange) &&
- (arg0->getType().isFloatingDomain())) {
+ (arg0->getType().getBasicType() == EbtFloat ||
+ arg0->getType().getBasicType() == EbtDouble)) {
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
+ } else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange ||
+ callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore ||
+ callNode.getOp() == EOpAtomicMin || callNode.getOp() == EOpAtomicMax) &&
+ arg0->getType().isFloatingDomain()) {
+ requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float2, fnCandidate.getName().c_str());
}
+
+ const TIntermTyped* base = TIntermediate::findLValueBase(arg0, true , true);
+ const TType* refType = (base->getType().isReference()) ? base->getType().getReferentType() : nullptr;
+ const TQualifier& qualifier = (refType != nullptr) ? refType->getQualifier() : base->getType().getQualifier();
+ if (qualifier.storage != EvqShared && qualifier.storage != EvqBuffer)
+ error(loc,"Atomic memory function can only be used for shader storage block member or shared variable.",
+ fnCandidate.getName().c_str(), "");
+
break;
}
@@ -2752,6 +3010,11 @@ void TParseContext::rValueErrorCheck(const TSourceLoc& loc, const char* op, TInt
if (!(symNode && symNode->getQualifier().isWriteOnly())) // base class checks
if (symNode && symNode->getQualifier().isExplicitInterpolation())
error(loc, "can't read from explicitly-interpolated object: ", op, symNode->getName().c_str());
+
+ // local_size_{xyz} must be assigned or specialized before gl_WorkGroupSize can be assigned.
+ if(node->getQualifier().builtIn == EbvWorkGroupSize &&
+ !(intermediate.isLocalSizeSet() || intermediate.isLocalSizeSpecialized()))
+ error(loc, "can't read from gl_WorkGroupSize before a fixed workgroup size has been declared", op, "");
}
//
@@ -2794,7 +3057,8 @@ void TParseContext::reservedErrorCheck(const TSourceLoc& loc, const TString& ide
// "Identifiers starting with "gl_" are reserved for use by OpenGL, and may not be
// declared in a shader; this results in a compile-time error."
if (! symbolTable.atBuiltInLevel()) {
- if (builtInName(identifier))
+ if (builtInName(identifier) && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
+ // The extension GL_EXT_spirv_intrinsics allows us to declare identifiers starting with "gl_".
error(loc, "identifiers starting with \"gl_\" are reserved", identifier.c_str(), "");
// "__" are not supposed to be an error. ES 300 (and desktop) added the clarification:
@@ -2802,7 +3066,8 @@ void TParseContext::reservedErrorCheck(const TSourceLoc& loc, const TString& ide
// reserved; using such a name does not itself result in an error, but may result
// in undefined behavior."
// however, before that, ES tests required an error.
- if (identifier.find("__") != TString::npos) {
+ if (identifier.find("__") != TString::npos && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) {
+ // The extension GL_EXT_spirv_intrinsics allows us to declare identifiers starting with "__".
if (isEsProfile() && version < 300)
error(loc, "identifiers containing consecutive underscores (\"__\") are reserved, and an error if version < 300", identifier.c_str(), "");
else
@@ -2823,14 +3088,16 @@ void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* iden
// single underscore) are also reserved, and defining such a name results in a
// compile-time error."
// however, before that, ES tests required an error.
- if (strncmp(identifier, "GL_", 3) == 0)
+ if (strncmp(identifier, "GL_", 3) == 0 && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
+ // The extension GL_EXT_spirv_intrinsics allows us to declare macros prefixed with "GL_".
ppError(loc, "names beginning with \"GL_\" can't be (un)defined:", op, identifier);
else if (strncmp(identifier, "defined", 8) == 0)
if (relaxedErrors())
ppWarn(loc, "\"defined\" is (un)defined:", op, identifier);
else
ppError(loc, "\"defined\" can't be (un)defined:", op, identifier);
- else if (strstr(identifier, "__") != 0) {
+ else if (strstr(identifier, "__") != 0 && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) {
+ // The extension GL_EXT_spirv_intrinsics allows us to declare macros prefixed with "__".
if (isEsProfile() && version >= 300 &&
(strcmp(identifier, "__LINE__") == 0 ||
strcmp(identifier, "__FILE__") == 0 ||
@@ -2978,6 +3245,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
bool matrixInMatrix = false;
bool arrayArg = false;
bool floatArgument = false;
+ bool intArgument = false;
for (int arg = 0; arg < function.getParamCount(); ++arg) {
if (function[arg].type->isArray()) {
if (function[arg].type->isUnsizedArray()) {
@@ -3008,6 +3276,8 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
specConstType = true;
if (function[arg].type->isFloatingDomain())
floatArgument = true;
+ if (function[arg].type->isIntegerDomain())
+ intArgument = true;
if (type.isStruct()) {
if (function[arg].type->contains16BitFloat()) {
requireFloat16Arithmetic(loc, "constructor", "can't construct structure containing 16-bit type");
@@ -3113,6 +3383,15 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
// and aren't making an array.
makeSpecConst = ! floatArgument && ! type.isArray();
break;
+
+ case EOpConstructVec2:
+ case EOpConstructVec3:
+ case EOpConstructVec4:
+ // This was the list of valid ones, if they aren't converting from int
+ // and aren't making an array.
+ makeSpecConst = ! intArgument && !type.isArray();
+ break;
+
default:
// anything else wasn't white-listed in the spec as a conversion
makeSpecConst = false;
@@ -3379,7 +3658,7 @@ void TParseContext::transparentOpaqueCheck(const TSourceLoc& loc, const TType& t
if (type.containsNonOpaque()) {
// Vulkan doesn't allow transparent uniforms outside of blocks
- if (spvVersion.vulkan > 0)
+ if (spvVersion.vulkan > 0 && !spvVersion.vulkanRelaxed)
vulkanRemoved(loc, "non-opaque uniforms outside a block");
// OpenGL wants locations on these (unless they are getting automapped)
if (spvVersion.openGl > 0 && !type.getQualifier().hasLocation() && !intermediate.getAutoMapLocations())
@@ -3419,6 +3698,8 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q
profileRequires(loc, ENoProfile, 130, nullptr, "out for stage outputs");
profileRequires(loc, EEsProfile, 300, nullptr, "out for stage outputs");
qualifier.storage = EvqVaryingOut;
+ if (intermediate.isInvariantAll())
+ qualifier.invariant = true;
break;
case EvqInOut:
qualifier.storage = EvqVaryingIn;
@@ -3435,7 +3716,7 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q
if (blockName == nullptr &&
qualifier.layoutPacking == ElpStd430)
{
- error(loc, "it is invalid to declare std430 qualifier on uniform", "", "");
+ requireExtensions(loc, 1, &E_GL_EXT_scalar_block_layout, "default std430 layout for uniform");
}
break;
default:
@@ -3445,6 +3726,14 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q
if (!nonuniformOkay && qualifier.isNonUniform())
error(loc, "for non-parameter, can only apply to 'in' or no storage qualifier", "nonuniformEXT", "");
+#ifndef GLSLANG_WEB
+ if (qualifier.isSpirvByReference())
+ error(loc, "can only apply to parameter", "spirv_by_reference", "");
+
+ if (qualifier.isSpirvLiteral())
+ error(loc, "can only apply to parameter", "spirv_literal", "");
+#endif
+
// Storage qualifier isn't ready for memberQualifierCheck, we should skip invariantCheck for it.
if (!isMemberCheck || structNestingLevel > 0)
invariantCheck(loc, qualifier);
@@ -3706,6 +3995,41 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
MERGE_SINGLETON(nonUniform);
#endif
+#ifndef GLSLANG_WEB
+ // SPIR-V storage class qualifier (GL_EXT_spirv_intrinsics)
+ dst.spirvStorageClass = src.spirvStorageClass;
+
+ // SPIR-V decorate qualifiers (GL_EXT_spirv_intrinsics)
+ if (src.hasSprivDecorate()) {
+ if (dst.hasSprivDecorate()) {
+ const TSpirvDecorate& srcSpirvDecorate = src.getSpirvDecorate();
+ TSpirvDecorate& dstSpirvDecorate = dst.getSpirvDecorate();
+ for (auto& decorate : srcSpirvDecorate.decorates) {
+ if (dstSpirvDecorate.decorates.find(decorate.first) != dstSpirvDecorate.decorates.end())
+ error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate", "(decoration=%u)", decorate.first);
+ else
+ dstSpirvDecorate.decorates.insert(decorate);
+ }
+
+ for (auto& decorateId : srcSpirvDecorate.decorateIds) {
+ if (dstSpirvDecorate.decorateIds.find(decorateId.first) != dstSpirvDecorate.decorateIds.end())
+ error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate_id", "(decoration=%u)", decorateId.first);
+ else
+ dstSpirvDecorate.decorateIds.insert(decorateId);
+ }
+
+ for (auto& decorateString : srcSpirvDecorate.decorateStrings) {
+ if (dstSpirvDecorate.decorates.find(decorateString.first) != dstSpirvDecorate.decorates.end())
+ error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate_string", "(decoration=%u)", decorateString.first);
+ else
+ dstSpirvDecorate.decorates.insert(decorateString);
+ }
+ } else {
+ dst.spirvDecorate = src.spirvDecorate;
+ }
+ }
+#endif
+
if (repeated)
error(loc, "replicated qualifiers", "", "");
}
@@ -4292,8 +4616,10 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
// If it wasn't at a built-in level, then it's already been redeclared;
// that is, this is a redeclaration of a redeclaration; reuse that initial
// redeclaration. Otherwise, make the new one.
- if (builtIn)
+ if (builtIn) {
makeEditable(symbol);
+ symbolTable.amendSymbolIdLevel(*symbol);
+ }
// Now, modify the type of the copy, as per the type of the current redeclaration.
@@ -4667,6 +4993,17 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali
}
if (qualifier.isNonUniform())
type.getQualifier().nonUniform = qualifier.nonUniform;
+#ifndef GLSLANG_WEB
+ if (qualifier.isSpirvByReference())
+ type.getQualifier().setSpirvByReference();
+ if (qualifier.isSpirvLiteral()) {
+ if (type.getBasicType() == EbtFloat || type.getBasicType() == EbtInt || type.getBasicType() == EbtUint ||
+ type.getBasicType() == EbtBool)
+ type.getQualifier().setSpirvLiteral();
+ else
+ error(loc, "cannot use spirv_literal qualifier", type.getBasicTypeString().c_str(), "");
+#endif
+ }
paramCheckFixStorage(loc, qualifier.storage, type);
}
@@ -4822,7 +5159,7 @@ void TParseContext::inductiveLoopCheck(const TSourceLoc& loc, TIntermNode* init,
}
// get the unique id of the loop index
- int loopIndex = binaryInit->getLeft()->getAsSymbolNode()->getId();
+ long long loopIndex = binaryInit->getLeft()->getAsSymbolNode()->getId();
inductiveLoopIds.insert(loopIndex);
// condition's form must be "loop-index relational-operator constant-expression"
@@ -5008,14 +5345,22 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
return;
}
if (id == TQualifier::getLayoutPackingString(ElpPacked)) {
- if (spvVersion.spv != 0)
- spvRemoved(loc, "packed");
+ if (spvVersion.spv != 0) {
+ if (spvVersion.vulkanRelaxed)
+ return; // silently ignore qualifier
+ else
+ spvRemoved(loc, "packed");
+ }
publicType.qualifier.layoutPacking = ElpPacked;
return;
}
if (id == TQualifier::getLayoutPackingString(ElpShared)) {
- if (spvVersion.spv != 0)
- spvRemoved(loc, "shared");
+ if (spvVersion.spv != 0) {
+ if (spvVersion.vulkanRelaxed)
+ return; // silently ignore qualifier
+ else
+ spvRemoved(loc, "shared");
+ }
publicType.qualifier.layoutPacking = ElpShared;
return;
}
@@ -5465,7 +5810,7 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
if (! IsPow2(value))
error(loc, "must be a power of 2", "buffer_reference_align", "");
else
- publicType.qualifier.layoutBufferReferenceAlign = (unsigned int)std::log2(value);
+ publicType.qualifier.layoutBufferReferenceAlign = IntLog2(value);
if (nonLiteral)
error(loc, "needs a literal integer", "buffer_reference_align", "");
return;
@@ -5726,6 +6071,9 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb
case EvqVaryingIn:
case EvqVaryingOut:
if (!type.getQualifier().isTaskMemory() &&
+#ifndef GLSLANG_WEB
+ !type.getQualifier().hasSprivDecorate() &&
+#endif
(type.getBasicType() != EbtBlock ||
(!(*type.getStruct())[0].type->getQualifier().hasLocation() &&
(*type.getStruct())[0].type->getQualifier().builtIn == EbvNone)))
@@ -5756,6 +6104,8 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb
error(loc, "can only specify on a uniform block", "push_constant", "");
if (qualifier.isShaderRecord())
error(loc, "can only specify on a buffer block", "shaderRecordNV", "");
+ if (qualifier.hasLocation() && type.isAtomic())
+ error(loc, "cannot specify on atomic counter", "location", "");
}
break;
default:
@@ -5785,6 +6135,11 @@ void TParseContext::layoutMemberLocationArrayCheck(const TSourceLoc& loc, bool m
// Do layout error checking with respect to a type.
void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
{
+#ifndef GLSLANG_WEB
+ if (extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
+ return; // Skip any check if GL_EXT_spirv_intrinsics is turned on
+#endif
+
const TQualifier& qualifier = type.getQualifier();
// first, intra-layout qualifier-only error checking
@@ -5893,16 +6248,12 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
if (type.getBasicType() == EbtSampler) {
int lastBinding = qualifier.layoutBinding;
if (type.isArray()) {
- if (spvVersion.vulkan > 0)
- lastBinding += 1;
- else {
+ if (spvVersion.vulkan == 0) {
if (type.isSizedArray())
- lastBinding += type.getCumulativeArraySize();
+ lastBinding += (type.getCumulativeArraySize() - 1);
else {
- lastBinding += 1;
#ifndef GLSLANG_WEB
- if (spvVersion.vulkan == 0)
- warn(loc, "assuming binding count of one for compile-time checking of binding numbers for unsized array", "[]", "");
+ warn(loc, "assuming binding count of one for compile-time checking of binding numbers for unsized array", "[]", "");
#endif
}
}
@@ -5912,7 +6263,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
error(loc, "sampler binding not less than gl_MaxCombinedTextureImageUnits", "binding", type.isArray() ? "(using array)" : "");
#endif
}
- if (type.isAtomic()) {
+ if (type.isAtomic() && !spvVersion.vulkanRelaxed) {
if (qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) {
error(loc, "atomic_uint binding is too large; see gl_MaxAtomicCounterBindings", "binding", "");
return;
@@ -6026,12 +6377,28 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
}
}
+static bool storageCanHaveLayoutInBlock(const enum TStorageQualifier storage)
+{
+ switch (storage) {
+ case EvqUniform:
+ case EvqBuffer:
+ case EvqShared:
+ return true;
+ default:
+ return false;
+ }
+}
+
// Do layout error checking that can be done within a layout qualifier proper, not needing to know
// if there are blocks, atomic counters, variables, etc.
void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier& qualifier)
{
- if (qualifier.storage == EvqShared && qualifier.hasLayout())
- error(loc, "cannot apply layout qualifiers to a shared variable", "shared", "");
+ if (qualifier.storage == EvqShared && qualifier.hasLayout()) {
+ if (spvVersion.spv > 0 && spvVersion.spv < EShTargetSpv_1_4) {
+ error(loc, "shared block requires at least SPIR-V 1.4", "shared block", "");
+ }
+ profileRequires(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shared_memory_block, "shared block");
+ }
// "It is a compile-time error to use *component* without also specifying the location qualifier (order does not matter)."
if (qualifier.hasComponent() && ! qualifier.hasLocation())
@@ -6114,7 +6481,7 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
error(loc, "can only be used on an output", "xfb layout qualifier", "");
}
if (qualifier.hasUniformLayout()) {
- if (! qualifier.isUniformOrBuffer() && !qualifier.isTaskMemory()) {
+ if (!storageCanHaveLayoutInBlock(qualifier.storage) && !qualifier.isTaskMemory()) {
if (qualifier.hasMatrix() || qualifier.hasPacking())
error(loc, "matrix or packing qualifiers can only be used on a uniform or buffer", "layout", "");
if (qualifier.hasOffset() || qualifier.hasAlign())
@@ -6273,8 +6640,11 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunct
extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float64);
if (isEsProfile())
- function = (extensionTurnedOn(E_GL_EXT_shader_implicit_conversions) && version >= 310) ?
- findFunction120(loc, call, builtIn) : findFunctionExact(loc, call, builtIn);
+ function = (explicitTypesEnabled && version >= 310)
+ ? findFunctionExplicitTypes(loc, call, builtIn)
+ : ((extensionTurnedOn(E_GL_EXT_shader_implicit_conversions) && version >= 310)
+ ? findFunction120(loc, call, builtIn)
+ : findFunctionExact(loc, call, builtIn));
else if (version < 120)
function = findFunctionExact(loc, call, builtIn);
else if (version < 400)
@@ -6566,6 +6936,68 @@ const TFunction* TParseContext::findFunctionExplicitTypes(const TSourceLoc& loc,
return bestMatch;
}
+//
+// Adjust function calls that aren't declared in Vulkan to a
+// calls with equivalent effects
+//
+TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, TFunction* function, TIntermNode* arguments)
+{
+ TIntermTyped* result = nullptr;
+
+#ifndef GLSLANG_WEB
+ if (function->getBuiltInOp() != EOpNull) {
+ return nullptr;
+ }
+
+ if (function->getName() == "atomicCounterIncrement") {
+ // change atomicCounterIncrement into an atomicAdd of 1
+ TString name("atomicAdd");
+ TType uintType(EbtUint);
+
+ TFunction realFunc(&name, function->getType());
+
+ for (int i = 0; i < function->getParamCount(); ++i) {
+ realFunc.addParameter((*function)[i]);
+ }
+
+ TParameter tmpP = { 0, &uintType };
+ realFunc.addParameter(tmpP);
+ arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(1, loc, true));
+
+ result = handleFunctionCall(loc, &realFunc, arguments);
+ } else if (function->getName() == "atomicCounterDecrement") {
+ // change atomicCounterDecrement into an atomicAdd with -1
+ // and subtract 1 from result, to return post-decrement value
+ TString name("atomicAdd");
+ TType uintType(EbtUint);
+
+ TFunction realFunc(&name, function->getType());
+
+ for (int i = 0; i < function->getParamCount(); ++i) {
+ realFunc.addParameter((*function)[i]);
+ }
+
+ TParameter tmpP = { 0, &uintType };
+ realFunc.addParameter(tmpP);
+ arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(-1, loc, true));
+
+ result = handleFunctionCall(loc, &realFunc, arguments);
+
+ // post decrement, so that it matches AtomicCounterDecrement semantics
+ if (result) {
+ result = handleBinaryMath(loc, "-", EOpSub, result, intermediate.addConstantUnion(1, loc, true));
+ }
+ } else if (function->getName() == "atomicCounter") {
+ // change atomicCounter into a direct read of the variable
+ if (arguments->getAsTyped()) {
+ result = arguments->getAsTyped();
+ }
+ }
+#endif
+
+ return result;
+}
+
// When a declaration includes a type, but not a variable name, it can be used
// to establish defaults.
void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType& publicType)
@@ -6590,6 +7022,91 @@ void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType
#endif
}
+bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString& identifier, const TPublicType&,
+ TArraySizes*, TIntermTyped* initializer, TType& type)
+{
+ if (parsingBuiltins || symbolTable.atBuiltInLevel() || !symbolTable.atGlobalLevel() ||
+ type.getQualifier().storage != EvqUniform ||
+ !(type.containsNonOpaque()
+#ifndef GLSLANG_WEB
+ || type.getBasicType() == EbtAtomicUint
+#endif
+ )) {
+ return false;
+ }
+
+ if (type.getQualifier().hasLocation()) {
+ warn(loc, "ignoring layout qualifier for uniform", identifier.c_str(), "location");
+ type.getQualifier().layoutLocation = TQualifier::layoutLocationEnd;
+ }
+
+ if (initializer) {
+ warn(loc, "Ignoring initializer for uniform", identifier.c_str(), "");
+ initializer = nullptr;
+ }
+
+ if (type.isArray()) {
+ // do array size checks here
+ arraySizesCheck(loc, type.getQualifier(), type.getArraySizes(), initializer, false);
+
+ if (arrayQualifierError(loc, type.getQualifier()) || arrayError(loc, type)) {
+ error(loc, "array param error", identifier.c_str(), "");
+ }
+ }
+
+ // do some checking on the type as it was declared
+ layoutTypeCheck(loc, type);
+
+ int bufferBinding = TQualifier::layoutBindingEnd;
+ TVariable* updatedBlock = nullptr;
+
+#ifndef GLSLANG_WEB
+ // Convert atomic_uint into members of a buffer block
+ if (type.isAtomic()) {
+ type.setBasicType(EbtUint);
+ type.getQualifier().storage = EvqBuffer;
+
+ type.getQualifier().volatil = true;
+ type.getQualifier().coherent = true;
+
+ // xxTODO: use logic from fixOffset() to apply explicit member offset
+ bufferBinding = type.getQualifier().layoutBinding;
+ type.getQualifier().layoutBinding = TQualifier::layoutBindingEnd;
+ type.getQualifier().explicitOffset = false;
+ growAtomicCounterBlock(bufferBinding, loc, type, identifier, nullptr);
+ updatedBlock = atomicCounterBuffers[bufferBinding];
+ }
+#endif
+
+ if (!updatedBlock) {
+ growGlobalUniformBlock(loc, type, identifier, nullptr);
+ updatedBlock = globalUniformBlock;
+ }
+
+ //
+ // don't assign explicit member offsets here
+ // if any are assigned, need to be updated here and in the merge/link step
+ // fixBlockUniformOffsets(updatedBlock->getWritableType().getQualifier(), *updatedBlock->getWritableType().getWritableStruct());
+
+ // checks on update buffer object
+ layoutObjectCheck(loc, *updatedBlock);
+
+ TSymbol* symbol = symbolTable.find(identifier);
+
+ if (!symbol) {
+ if (updatedBlock == globalUniformBlock)
+ error(loc, "error adding uniform to default uniform block", identifier.c_str(), "");
+ else
+ error(loc, "error adding atomic counter to atomic counter block", identifier.c_str(), "");
+ return false;
+ }
+
+ // merge qualifiers
+ mergeObjectLayoutQualifiers(updatedBlock->getWritableType().getQualifier(), type.getQualifier(), true);
+
+ return true;
+}
+
//
// Do everything necessary to handle a variable (non-block) declaration.
// Either redeclaring a variable, or making a new one, updating the symbol
@@ -6701,6 +7218,14 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
if (symbol == nullptr)
reservedErrorCheck(loc, identifier);
+ if (symbol == nullptr && spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) {
+ bool remapped = vkRelaxedRemapUniformVariable(loc, identifier, publicType, arraySizes, initializer, type);
+
+ if (remapped) {
+ return nullptr;
+ }
+ }
+
inheritGlobalDefaults(type.getQualifier());
// Declare the variable
@@ -6808,6 +7333,11 @@ TVariable* TParseContext::declareNonArray(const TSourceLoc& loc, const TString&
//
TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyped* initializer, TVariable* variable)
{
+ // A null initializer is an aggregate that hasn't had an op assigned yet
+ // (still EOpNull, no relation to nullInit), and has no children.
+ bool nullInit = initializer->getAsAggregate() && initializer->getAsAggregate()->getOp() == EOpNull &&
+ initializer->getAsAggregate()->getSequence().size() == 0;
+
//
// Identifier must be of type constant, a global, or a temporary, and
// starting at version 120, desktop allows uniforms to have initializers.
@@ -6815,9 +7345,36 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp
TStorageQualifier qualifier = variable->getType().getQualifier().storage;
if (! (qualifier == EvqTemporary || qualifier == EvqGlobal || qualifier == EvqConst ||
(qualifier == EvqUniform && !isEsProfile() && version >= 120))) {
- error(loc, " cannot initialize this type of qualifier ", variable->getType().getStorageQualifierString(), "");
+ if (qualifier == EvqShared) {
+ // GL_EXT_null_initializer allows this for shared, if it's a null initializer
+ if (nullInit) {
+ const char* feature = "initialization with shared qualifier";
+ profileRequires(loc, EEsProfile, 0, E_GL_EXT_null_initializer, feature);
+ profileRequires(loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, feature);
+ } else {
+ error(loc, "initializer can only be a null initializer ('{}')", "shared", "");
+ }
+ } else {
+ error(loc, " cannot initialize this type of qualifier ",
+ variable->getType().getStorageQualifierString(), "");
+ return nullptr;
+ }
+ }
+
+ if (nullInit) {
+ // only some types can be null initialized
+ if (variable->getType().containsUnsizedArray()) {
+ error(loc, "null initializers can't size unsized arrays", "{}", "");
+ return nullptr;
+ }
+ if (variable->getType().containsOpaque()) {
+ error(loc, "null initializers can't be used on opaque values", "{}", "");
+ return nullptr;
+ }
+ variable->getWritableType().getQualifier().setNullInit();
return nullptr;
}
+
arrayObjectCheck(loc, variable->getType(), "array initializer");
//
@@ -6861,13 +7418,15 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp
// Uniforms require a compile-time constant initializer
if (qualifier == EvqUniform && ! initializer->getType().getQualifier().isFrontEndConstant()) {
- error(loc, "uniform initializers must be constant", "=", "'%s'", variable->getType().getCompleteString().c_str());
+ error(loc, "uniform initializers must be constant", "=", "'%s'",
+ variable->getType().getCompleteString().c_str());
variable->getWritableType().getQualifier().makeTemporary();
return nullptr;
}
// Global consts require a constant initializer (specialization constant is okay)
if (qualifier == EvqConst && symbolTable.atGlobalLevel() && ! initializer->getType().getQualifier().isConstant()) {
- error(loc, "global const initializers must be constant", "=", "'%s'", variable->getType().getCompleteString().c_str());
+ error(loc, "global const initializers must be constant", "=", "'%s'",
+ variable->getType().getCompleteString().c_str());
variable->getWritableType().getQualifier().makeTemporary();
return nullptr;
}
@@ -6887,7 +7446,8 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp
// "In declarations of global variables with no storage qualifier or with a const
// qualifier any initializer must be a constant expression."
if (symbolTable.atGlobalLevel() && ! initializer->getType().getQualifier().isConstant()) {
- const char* initFeature = "non-constant global initializer (needs GL_EXT_shader_non_constant_global_initializers)";
+ const char* initFeature =
+ "non-constant global initializer (needs GL_EXT_shader_non_constant_global_initializers)";
if (isEsProfile()) {
if (relaxedErrors() && ! extensionTurnedOn(E_GL_EXT_shader_non_constant_global_initializers))
warn(loc, "not allowed in this version", initFeature, "");
@@ -6901,7 +7461,8 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp
// Compile-time tagging of the variable with its constant value...
initializer = intermediate.addConversion(EOpAssign, variable->getType(), initializer);
- if (! initializer || ! initializer->getType().getQualifier().isConstant() || variable->getType() != initializer->getType()) {
+ if (! initializer || ! initializer->getType().getQualifier().isConstant() ||
+ variable->getType() != initializer->getType()) {
error(loc, "non-matching or non-convertible constant type for const initializer",
variable->getType().getStorageQualifierString(), "");
variable->getWritableType().getQualifier().makeTemporary();
@@ -7557,6 +8118,8 @@ void TParseContext::inheritMemoryQualifiers(const TQualifier& from, TQualifier&
void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, const TString* instanceName,
TArraySizes* arraySizes)
{
+ if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed)
+ blockStorageRemap(loc, blockName, currentBlockQualifier);
blockStageIoCheck(loc, currentBlockQualifier);
blockQualifierCheck(loc, currentBlockQualifier, instanceName != nullptr);
if (arraySizes != nullptr) {
@@ -7583,6 +8146,10 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
memberQualifier.perViewNV = currentBlockQualifier.perViewNV;
if (currentBlockQualifier.perTaskNV)
memberQualifier.perTaskNV = currentBlockQualifier.perTaskNV;
+ if (memberQualifier.storage == EvqSpirvStorageClass)
+ error(memberLoc, "member cannot have a spirv_storage_class qualifier", memberType.getFieldName().c_str(), "");
+ if (memberQualifier.hasSprivDecorate() && !memberQualifier.getSpirvDecorate().decorateIds.empty())
+ error(memberLoc, "member cannot have a spirv_decorate_id qualifier", memberType.getFieldName().c_str(), "");
#endif
if ((currentBlockQualifier.storage == EvqUniform || currentBlockQualifier.storage == EvqBuffer) && (memberQualifier.isInterpolation() || memberQualifier.isAuxiliary()))
error(memberLoc, "member of uniform or buffer block cannot have an auxiliary or interpolation qualifier", memberType.getFieldName().c_str(), "");
@@ -7624,6 +8191,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
case EvqBuffer: defaultQualification = globalBufferDefaults; break;
case EvqVaryingIn: defaultQualification = globalInputDefaults; break;
case EvqVaryingOut: defaultQualification = globalOutputDefaults; break;
+ case EvqShared: defaultQualification = globalSharedDefaults; break;
default: defaultQualification.clear(); break;
}
@@ -7845,6 +8413,17 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
trackLinkage(variable);
}
+//
+// allow storage type of block to be remapped at compile time
+//
+void TParseContext::blockStorageRemap(const TSourceLoc&, const TString* instanceName, TQualifier& qualifier)
+{
+ TBlockStorageClass type = intermediate.getBlockStorageOverride(instanceName->c_str());
+ if (type != EbsNone) {
+ qualifier.setBlockStorage(type);
+ }
+}
+
// Do all block-declaration checking regarding the combination of in/out/uniform/buffer
// with a particular stage.
void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& qualifier)
@@ -7887,6 +8466,12 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q
error(loc, "output blocks cannot be used in a task shader", "out", "");
}
break;
+ case EvqShared:
+ if (spvVersion.spv > 0 && spvVersion.spv < EShTargetSpv_1_4) {
+ error(loc, "shared block requires at least SPIR-V 1.4", "shared block", "");
+ }
+ profileRequires(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shared_memory_block, "shared block");
+ break;
#ifndef GLSLANG_WEB
case EvqPayload:
profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "rayPayloadNV block");
@@ -8045,7 +8630,7 @@ void TParseContext::fixXfbOffsets(TQualifier& qualifier, TTypeList& typeList)
//
void TParseContext::fixBlockUniformOffsets(TQualifier& qualifier, TTypeList& typeList)
{
- if (!qualifier.isUniformOrBuffer() && !qualifier.isTaskMemory())
+ if (!storageCanHaveLayoutInBlock(qualifier.storage) && !qualifier.isTaskMemory())
return;
if (qualifier.layoutPacking != ElpStd140 && qualifier.layoutPacking != ElpStd430 && qualifier.layoutPacking != ElpScalar)
return;
@@ -8155,8 +8740,8 @@ void TParseContext::fixBlockUniformLayoutMatrix(TQualifier& qualifier, TTypeList
}
//
-// Spread LayoutPacking to block member, if a block member is a struct, we need spread LayoutPacking to
-// this struct member too. and keep this rule for recursive.
+// Spread LayoutPacking to matrix or aggregate block members. If a block member is a struct or
+// array of struct, spread LayoutPacking recursively to its matrix or aggregate members.
//
void TParseContext::fixBlockUniformLayoutPacking(TQualifier& qualifier, TTypeList* originTypeList,
TTypeList* tmpTypeList)
@@ -8165,11 +8750,13 @@ void TParseContext::fixBlockUniformLayoutPacking(TQualifier& qualifier, TTypeLis
for (unsigned int member = 0; member < originTypeList->size(); ++member) {
if (qualifier.layoutPacking != ElpNone) {
if (tmpTypeList == nullptr) {
- if ((*originTypeList)[member].type->getQualifier().layoutPacking == ElpNone) {
+ if ((*originTypeList)[member].type->getQualifier().layoutPacking == ElpNone &&
+ !(*originTypeList)[member].type->isScalarOrVector()) {
(*originTypeList)[member].type->getQualifier().layoutPacking = qualifier.layoutPacking;
}
} else {
- if ((*tmpTypeList)[member].type->getQualifier().layoutPacking == ElpNone) {
+ if ((*tmpTypeList)[member].type->getQualifier().layoutPacking == ElpNone &&
+ !(*tmpTypeList)[member].type->isScalarOrVector()) {
(*tmpTypeList)[member].type->getQualifier().layoutPacking = qualifier.layoutPacking;
}
}
@@ -8559,8 +9146,14 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
}
#endif
break;
+ case EvqShared:
+ if (qualifier.hasMatrix())
+ globalSharedDefaults.layoutMatrix = qualifier.layoutMatrix;
+ if (qualifier.hasPacking())
+ globalSharedDefaults.layoutPacking = qualifier.layoutPacking;
+ break;
default:
- error(loc, "default qualifier requires 'uniform', 'buffer', 'in', or 'out' storage qualification", "", "");
+ error(loc, "default qualifier requires 'uniform', 'buffer', 'in', 'out' or 'shared' storage qualification", "", "");
return;
}
diff --git a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h
index fe2b6fbbe1..de44884653 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/ParseHelper.h
@@ -67,7 +67,7 @@ struct TPragma {
class TScanContext;
class TPpContext;
-typedef std::set<int> TIdSetType;
+typedef std::set<long long> TIdSetType;
typedef std::map<const TTypeList*, std::map<size_t, const TTypeList*>> TStructRecord;
//
@@ -92,7 +92,8 @@ public:
limits(resources.limits),
globalUniformBlock(nullptr),
globalUniformBinding(TQualifier::layoutBindingEnd),
- globalUniformSet(TQualifier::layoutSetEnd)
+ globalUniformSet(TQualifier::layoutSetEnd),
+ atomicCounterBlockSet(TQualifier::layoutSetEnd)
{
if (entryPoint != nullptr)
sourceEntryPointName = *entryPoint;
@@ -154,10 +155,11 @@ public:
extensionCallback(line, extension, behavior);
}
-#ifdef ENABLE_HLSL
// Manage the global uniform block (default uniforms in GLSL, $Global in HLSL)
virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr);
-#endif
+
+ // Manage global buffer (used for backing atomic counters in GLSL when using relaxed Vulkan semantics)
+ virtual void growAtomicCounterBlock(int binding, const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr);
// Potentially rename shader entry point function
void renameShaderFunction(TString*& name) const
@@ -230,7 +232,25 @@ protected:
// override this to set the language-specific name
virtual const char* getGlobalUniformBlockName() const { return ""; }
virtual void setUniformBlockDefaults(TType&) const { }
- virtual void finalizeGlobalUniformBlockLayout(TVariable&) { }
+ virtual void finalizeGlobalUniformBlockLayout(TVariable&) {}
+
+ // Manage the atomic counter block (used for atomic_uints with Vulkan-Relaxed)
+ TMap<int, TVariable*> atomicCounterBuffers;
+ unsigned int atomicCounterBlockSet;
+ TMap<int, int> atomicCounterBlockFirstNewMember;
+ // override this to set the language-specific name
+ virtual const char* getAtomicCounterBlockName() const { return ""; }
+ virtual void setAtomicCounterBlockDefaults(TType&) const {}
+ virtual void setInvariant(const TSourceLoc& loc, const char* builtin) {}
+ virtual void finalizeAtomicCounterBlockLayout(TVariable&) {}
+ bool isAtomicCounterBlock(const TSymbol& symbol) {
+ const TVariable* var = symbol.getAsVariable();
+ if (!var)
+ return false;
+ const auto& at = atomicCounterBuffers.find(var->getType().getQualifier().layoutBinding);
+ return (at != atomicCounterBuffers.end() && (*at).second->getType() == var->getType());
+ }
+
virtual void outputMessage(const TSourceLoc&, const char* szReason, const char* szToken,
const char* szExtraInfoFormat, TPrefixType prefix,
va_list args);
@@ -293,6 +313,9 @@ public:
bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false) override;
void parserError(const char* s); // for bison's yyerror
+ virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr) override;
+ virtual void growAtomicCounterBlock(int binding, const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr) override;
+
void reservedErrorCheck(const TSourceLoc&, const TString&);
void reservedPpErrorCheck(const TSourceLoc&, const char* name, const char* op) override;
bool lineContinuationCheck(const TSourceLoc&, bool endOfComment) override;
@@ -340,6 +363,10 @@ public:
void checkPrecisionQualifier(const TSourceLoc&, TPrecisionQualifier);
void memorySemanticsCheck(const TSourceLoc&, const TFunction&, const TIntermOperator& callNode);
+ TIntermTyped* vkRelaxedRemapFunctionCall(const TSourceLoc&, TFunction*, TIntermNode*);
+ // returns true if the variable was remapped to something else
+ bool vkRelaxedRemapUniformVariable(const TSourceLoc&, TString&, const TPublicType&, TArraySizes*, TIntermTyped*, TType&);
+
void assignError(const TSourceLoc&, const char* op, TString left, TString right);
void unaryOpError(const TSourceLoc&, const char* op, TString operand);
void binaryOpError(const TSourceLoc&, const char* op, TString left, TString right);
@@ -392,7 +419,7 @@ public:
void arrayLimitCheck(const TSourceLoc&, const TString&, int size);
void limitCheck(const TSourceLoc&, int value, const char* limit, const char* feature);
- void inductiveLoopBodyCheck(TIntermNode*, int loopIndexId, TSymbolTable&);
+ void inductiveLoopBodyCheck(TIntermNode*, long long loopIndexId, TSymbolTable&);
void constantIndexExpressionCheck(TIntermNode*);
void setLayoutQualifier(const TSourceLoc&, TPublicType&, TString&);
@@ -417,6 +444,7 @@ public:
TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset);
void inheritMemoryQualifiers(const TQualifier& from, TQualifier& to);
void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = 0, TArraySizes* arraySizes = 0);
+ void blockStorageRemap(const TSourceLoc&, const TString*, TQualifier&);
void blockStageIoCheck(const TSourceLoc&, const TQualifier&);
void blockQualifierCheck(const TSourceLoc&, const TQualifier&, bool instanceName);
void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation);
@@ -443,6 +471,22 @@ public:
void handleSwitchAttributes(const TAttributes& attributes, TIntermNode*);
// Determine loop control from attributes
void handleLoopAttributes(const TAttributes& attributes, TIntermNode*);
+ // Function attributes
+ void handleFunctionAttributes(const TSourceLoc&, const TAttributes&, TFunction*);
+
+ // GL_EXT_spirv_intrinsics
+ TSpirvRequirement* makeSpirvRequirement(const TSourceLoc& loc, const TString& name,
+ const TIntermAggregate* extensions, const TIntermAggregate* capabilities);
+ TSpirvRequirement* mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1,
+ TSpirvRequirement* spirvReq2);
+ TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant);
+ TSpirvTypeParameters* makeSpirvTypeParameters(const TPublicType& type);
+ TSpirvTypeParameters* mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1,
+ TSpirvTypeParameters* spirvTypeParams2);
+ TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value);
+ TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, int value);
+ TSpirvInstruction* mergeSpirvInstruction(const TSourceLoc& loc, TSpirvInstruction* spirvInst1,
+ TSpirvInstruction* spirvInst2);
#endif
void checkAndResizeMeshViewDim(const TSourceLoc&, TType&, bool isBlockMember);
@@ -461,6 +505,15 @@ protected:
void finish() override;
#endif
+ virtual const char* getGlobalUniformBlockName() const override;
+ virtual void finalizeGlobalUniformBlockLayout(TVariable&) override;
+ virtual void setUniformBlockDefaults(TType& block) const override;
+
+ virtual const char* getAtomicCounterBlockName() const override;
+ virtual void finalizeAtomicCounterBlockLayout(TVariable&) override;
+ virtual void setAtomicCounterBlockDefaults(TType& block) const override;
+ virtual void setInvariant(const TSourceLoc& loc, const char* builtin) override;
+
public:
//
// Generally, bison productions, the scanner, and the PP need read/write access to these; just give them direct access
@@ -485,6 +538,7 @@ protected:
TQualifier globalUniformDefaults;
TQualifier globalInputDefaults;
TQualifier globalOutputDefaults;
+ TQualifier globalSharedDefaults;
TString currentCaller; // name of last function body entered (not valid when at global scope)
#ifndef GLSLANG_WEB
int* atomicUintOffsets; // to become an array of the right size to hold an offset per binding point
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp b/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp
index 78c8a365d7..c387aede0e 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Scan.cpp
@@ -586,6 +586,18 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["f64mat4x2"] = F64MAT4X2;
(*KeywordMap)["f64mat4x3"] = F64MAT4X3;
(*KeywordMap)["f64mat4x4"] = F64MAT4X4;
+
+ // GL_EXT_spirv_intrinsics
+ (*KeywordMap)["spirv_instruction"] = SPIRV_INSTRUCTION;
+ (*KeywordMap)["spirv_execution_mode"] = SPIRV_EXECUTION_MODE;
+ (*KeywordMap)["spirv_execution_mode_id"] = SPIRV_EXECUTION_MODE_ID;
+ (*KeywordMap)["spirv_decorate"] = SPIRV_DECORATE;
+ (*KeywordMap)["spirv_decorate_id"] = SPIRV_DECORATE_ID;
+ (*KeywordMap)["spirv_decorate_string"] = SPIRV_DECORATE_STRING;
+ (*KeywordMap)["spirv_type"] = SPIRV_TYPE;
+ (*KeywordMap)["spirv_storage_class"] = SPIRV_STORAGE_CLASS;
+ (*KeywordMap)["spirv_by_reference"] = SPIRV_BY_REFERENCE;
+ (*KeywordMap)["spirv_literal"] = SPIRV_LITERAL;
#endif
(*KeywordMap)["sampler2D"] = SAMPLER2D;
@@ -1747,6 +1759,21 @@ int TScanContext::tokenizeIdentifier()
return keyword;
else
return identifierOrType();
+
+ case SPIRV_INSTRUCTION:
+ case SPIRV_EXECUTION_MODE:
+ case SPIRV_EXECUTION_MODE_ID:
+ case SPIRV_DECORATE:
+ case SPIRV_DECORATE_ID:
+ case SPIRV_DECORATE_STRING:
+ case SPIRV_TYPE:
+ case SPIRV_STORAGE_CLASS:
+ case SPIRV_BY_REFERENCE:
+ case SPIRV_LITERAL:
+ if (parseContext.symbolTable.atBuiltInLevel() ||
+ parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
+ return keyword;
+ return identifierOrType();
#endif
default:
diff --git a/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp b/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp
index c6030bd7c2..d02eae6fcc 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp
@@ -159,7 +159,7 @@ int MapVersionToIndex(int version)
return index;
}
-const int SpvVersionCount = 3; // index range in MapSpvVersionToIndex
+const int SpvVersionCount = 4; // index range in MapSpvVersionToIndex
int MapSpvVersionToIndex(const SpvVersion& spvVersion)
{
@@ -167,8 +167,12 @@ int MapSpvVersionToIndex(const SpvVersion& spvVersion)
if (spvVersion.openGl > 0)
index = 1;
- else if (spvVersion.vulkan > 0)
- index = 2;
+ else if (spvVersion.vulkan > 0) {
+ if (!spvVersion.vulkanRelaxed)
+ index = 2;
+ else
+ index = 3;
+ }
assert(index < SpvVersionCount);
@@ -723,6 +727,7 @@ void TranslateEnvironment(const TEnvironment* environment, EShMessages& messages
break;
case EShClientVulkan:
spvVersion.vulkanGlsl = environment->input.dialectVersion;
+ spvVersion.vulkanRelaxed = environment->input.vulkanRulesRelaxed;
break;
case EShClientOpenGL:
spvVersion.openGl = environment->input.dialectVersion;
@@ -949,6 +954,9 @@ bool ProcessDeferred(
if (cachedTable)
symbolTable->adoptLevels(*cachedTable);
+ if (intermediate.getUniqueId() != 0)
+ symbolTable->overwriteUniqueId(intermediate.getUniqueId());
+
// Add built-in symbols that are potentially context dependent;
// they get popped again further down.
if (! AddContextSpecificSymbols(resources, compiler->infoSink, *symbolTable, version, profile, spvVersion,
@@ -1011,6 +1019,7 @@ bool ProcessDeferred(
bool success = processingContext(*parseContext, ppContext, fullInput,
versionWillBeError, *symbolTable,
intermediate, optLevel, messages);
+ intermediate.setUniqueId(symbolTable->getMaxSymbolId());
return success;
}
@@ -1270,14 +1279,15 @@ bool PreprocessDeferred(
EShMessages messages, // warnings/errors/AST; things to print out
TShader::Includer& includer,
TIntermediate& intermediate, // returned tree, etc.
- std::string* outputString)
+ std::string* outputString,
+ TEnvironment* environment = nullptr)
{
DoPreprocessing parser(outputString);
return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames,
preamble, optLevel, resources, defaultVersion,
defaultProfile, forceDefaultVersionAndProfile,
forwardCompatible, messages, intermediate, parser,
- false, includer);
+ false, includer, "", environment);
}
#endif
@@ -1757,6 +1767,7 @@ TShader::TShader(EShLanguage s)
// clear environment (avoid constructors in them for use in a C interface)
environment.input.languageFamily = EShSourceNone;
environment.input.dialect = EShClientNone;
+ environment.input.vulkanRulesRelaxed = false;
environment.client.client = EShClientNone;
environment.target.language = EShTargetNone;
environment.target.hlslFunctionality1 = false;
@@ -1810,6 +1821,11 @@ void TShader::addProcesses(const std::vector<std::string>& p)
intermediate->addProcesses(p);
}
+void TShader::setUniqueId(unsigned long long id)
+{
+ intermediate->setUniqueId(id);
+}
+
void TShader::setInvertY(bool invert) { intermediate->setInvertY(invert); }
void TShader::setNanMinMaxClamp(bool useNonNan) { intermediate->setNanMinMaxClamp(useNonNan); }
@@ -1858,6 +1874,15 @@ void TShader::setResourceSetBinding(const std::vector<std::string>& base) { in
void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); }
#endif
+void TShader::addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing) { intermediate->addBlockStorageOverride(nameStr, backing); }
+
+void TShader::setGlobalUniformBlockName(const char* name) { intermediate->setGlobalUniformBlockName(name); }
+void TShader::setGlobalUniformSet(unsigned int set) { intermediate->setGlobalUniformSet(set); }
+void TShader::setGlobalUniformBinding(unsigned int binding) { intermediate->setGlobalUniformBinding(binding); }
+
+void TShader::setAtomicCounterBlockName(const char* name) { intermediate->setAtomicCounterBlockName(name); }
+void TShader::setAtomicCounterBlockSet(unsigned int set) { intermediate->setAtomicCounterBlockSet(set); }
+
#ifdef ENABLE_HLSL
// See comment above TDefaultHlslIoMapper in iomapper.cpp:
void TShader::setHlslIoMapping(bool hlslIoMap) { intermediate->setHlslIoMapping(hlslIoMap); }
@@ -1909,7 +1934,8 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources,
return PreprocessDeferred(compiler, strings, numStrings, lengths, stringNames, preamble,
EShOptNone, builtInResources, defaultVersion,
defaultProfile, forceDefaultVersionAndProfile,
- forwardCompatible, message, includer, *intermediate, output_string);
+ forwardCompatible, message, includer, *intermediate, output_string,
+ &environment);
}
#endif
@@ -1972,7 +1998,10 @@ bool TProgram::link(EShMessages messages)
error = true;
}
- // TODO: Link: cross-stage error checking
+ if (!error) {
+ if (! crossStageCheck(messages))
+ error = true;
+ }
return ! error;
}
@@ -2049,6 +2078,69 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
return intermediate[stage]->getNumErrors() == 0;
}
+//
+// Check that there are no errors in linker objects accross stages
+//
+// Return true if no errors.
+//
+bool TProgram::crossStageCheck(EShMessages) {
+
+ // make temporary intermediates to hold the linkage symbols for each linking interface
+ // while we do the checks
+ // Independent interfaces are:
+ // all uniform variables and blocks
+ // all buffer blocks
+ // all in/out on a stage boundary
+
+ TVector<TIntermediate*> activeStages;
+ for (int s = 0; s < EShLangCount; ++s) {
+ if (intermediate[s])
+ activeStages.push_back(intermediate[s]);
+ }
+
+ // no extra linking if there is only one stage
+ if (! (activeStages.size() > 1))
+ return true;
+
+ // setup temporary tree to hold unfirom objects from different stages
+ TIntermediate* firstIntermediate = activeStages.front();
+ TIntermediate uniforms(EShLangCount,
+ firstIntermediate->getVersion(),
+ firstIntermediate->getProfile());
+ uniforms.setSpv(firstIntermediate->getSpv());
+
+ TIntermAggregate uniformObjects(EOpLinkerObjects);
+ TIntermAggregate root(EOpSequence);
+ root.getSequence().push_back(&uniformObjects);
+ uniforms.setTreeRoot(&root);
+
+ bool error = false;
+
+ // merge uniforms from all stages into a single intermediate
+ for (unsigned int i = 0; i < activeStages.size(); ++i) {
+ uniforms.mergeUniformObjects(*infoSink, *activeStages[i]);
+ }
+ error |= uniforms.getNumErrors() != 0;
+
+ // copy final definition of global block back into each stage
+ for (unsigned int i = 0; i < activeStages.size(); ++i) {
+ // We only want to merge into already existing global uniform blocks.
+ // A stage that doesn't already know about the global doesn't care about it's content.
+ // Otherwise we end up pointing to the same object between different stages
+ // and that will break binding/set remappings
+ bool mergeExistingOnly = true;
+ activeStages[i]->mergeGlobalUniformBlocks(*infoSink, uniforms, mergeExistingOnly);
+ }
+
+ // compare cross stage symbols for each stage boundary
+ for (unsigned int i = 1; i < activeStages.size(); ++i) {
+ activeStages[i - 1]->checkStageIO(*infoSink, *activeStages[i]);
+ error |= (activeStages[i - 1]->getNumErrors() != 0);
+ }
+
+ return !error;
+}
+
const char* TProgram::getInfoLog()
{
return infoSink->info.c_str();
diff --git a/thirdparty/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp b/thirdparty/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp
new file mode 100644
index 0000000000..38094eaaf7
--- /dev/null
+++ b/thirdparty/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp
@@ -0,0 +1,355 @@
+//
+// Copyright(C) 2021 Advanced Micro Devices, Inc.
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+
+#ifndef GLSLANG_WEB
+
+//
+// GL_EXT_spirv_intrinsics
+//
+#include "../Include/intermediate.h"
+#include "../Include/SpirvIntrinsics.h"
+#include "../Include/Types.h"
+#include "ParseHelper.h"
+
+namespace glslang {
+
+//
+// Handle SPIR-V requirements
+//
+TSpirvRequirement* TParseContext::makeSpirvRequirement(const TSourceLoc& loc, const TString& name,
+ const TIntermAggregate* extensions,
+ const TIntermAggregate* capabilities)
+{
+ TSpirvRequirement* spirvReq = new TSpirvRequirement;
+
+ if (name == "extensions") {
+ assert(extensions);
+ for (auto extension : extensions->getSequence()) {
+ assert(extension->getAsConstantUnion());
+ spirvReq->extensions.insert(*extension->getAsConstantUnion()->getConstArray()[0].getSConst());
+ }
+ } else if (name == "capabilities") {
+ assert(capabilities);
+ for (auto capability : capabilities->getSequence()) {
+ assert(capability->getAsConstantUnion());
+ spirvReq->capabilities.insert(capability->getAsConstantUnion()->getConstArray()[0].getIConst());
+ }
+ } else
+ error(loc, "unknow SPIR-V requirement", name.c_str(), "");
+
+ return spirvReq;
+}
+
+TSpirvRequirement* TParseContext::mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1,
+ TSpirvRequirement* spirvReq2)
+{
+ // Merge the second SPIR-V requirement to the first one
+ if (!spirvReq2->extensions.empty()) {
+ if (spirvReq1->extensions.empty())
+ spirvReq1->extensions = spirvReq2->extensions;
+ else
+ error(loc, "too many SPIR-V requirements", "extensions", "");
+ }
+
+ if (!spirvReq2->capabilities.empty()) {
+ if (spirvReq1->capabilities.empty())
+ spirvReq1->capabilities = spirvReq2->capabilities;
+ else
+ error(loc, "too many SPIR-V requirements", "capabilities", "");
+ }
+
+ return spirvReq1;
+}
+
+void TIntermediate::insertSpirvRequirement(const TSpirvRequirement* spirvReq)
+{
+ if (!spirvRequirement)
+ spirvRequirement = new TSpirvRequirement;
+
+ for (auto extension : spirvReq->extensions)
+ spirvRequirement->extensions.insert(extension);
+
+ for (auto capability : spirvReq->capabilities)
+ spirvRequirement->capabilities.insert(capability);
+}
+
+//
+// Handle SPIR-V execution modes
+//
+void TIntermediate::insertSpirvExecutionMode(int executionMode, const TIntermAggregate* args)
+{
+ if (!spirvExecutionMode)
+ spirvExecutionMode = new TSpirvExecutionMode;
+
+ TVector<const TIntermConstantUnion*> extraOperands;
+ if (args) {
+ for (auto arg : args->getSequence()) {
+ auto extraOperand = arg->getAsConstantUnion();
+ assert(extraOperand != nullptr);
+ extraOperands.push_back(extraOperand);
+ }
+ }
+ spirvExecutionMode->modes[executionMode] = extraOperands;
+}
+
+void TIntermediate::insertSpirvExecutionModeId(int executionMode, const TIntermAggregate* args)
+{
+ if (!spirvExecutionMode)
+ spirvExecutionMode = new TSpirvExecutionMode;
+
+ assert(args);
+ TVector<const TIntermConstantUnion*> extraOperands;
+
+ for (auto arg : args->getSequence()) {
+ auto extraOperand = arg->getAsConstantUnion();
+ assert(extraOperand != nullptr);
+ extraOperands.push_back(extraOperand);
+ }
+ spirvExecutionMode->modeIds[executionMode] = extraOperands;
+}
+
+//
+// Handle SPIR-V decorate qualifiers
+//
+void TQualifier::setSpirvDecorate(int decoration, const TIntermAggregate* args)
+{
+ if (!spirvDecorate)
+ spirvDecorate = new TSpirvDecorate;
+
+ TVector<const TIntermConstantUnion*> extraOperands;
+ if (args) {
+ for (auto arg : args->getSequence()) {
+ auto extraOperand = arg->getAsConstantUnion();
+ assert(extraOperand != nullptr);
+ extraOperands.push_back(extraOperand);
+ }
+ }
+ spirvDecorate->decorates[decoration] = extraOperands;
+}
+
+void TQualifier::setSpirvDecorateId(int decoration, const TIntermAggregate* args)
+{
+ if (!spirvDecorate)
+ spirvDecorate = new TSpirvDecorate;
+
+ assert(args);
+ TVector<const TIntermConstantUnion*> extraOperands;
+ for (auto arg : args->getSequence()) {
+ auto extraOperand = arg->getAsConstantUnion();
+ assert(extraOperand != nullptr);
+ extraOperands.push_back(extraOperand);
+ }
+ spirvDecorate->decorateIds[decoration] = extraOperands;
+}
+
+void TQualifier::setSpirvDecorateString(int decoration, const TIntermAggregate* args)
+{
+ if (!spirvDecorate)
+ spirvDecorate = new TSpirvDecorate;
+
+ assert(args);
+ TVector<const TIntermConstantUnion*> extraOperands;
+ for (auto arg : args->getSequence()) {
+ auto extraOperand = arg->getAsConstantUnion();
+ assert(extraOperand != nullptr);
+ extraOperands.push_back(extraOperand);
+ }
+ spirvDecorate->decorateStrings[decoration] = extraOperands;
+}
+
+TString TQualifier::getSpirvDecorateQualifierString() const
+{
+ assert(spirvDecorate);
+
+ TString qualifierString;
+
+ const auto appendFloat = [&](float f) { qualifierString.append(std::to_string(f).c_str()); };
+ const auto appendInt = [&](int i) { qualifierString.append(std::to_string(i).c_str()); };
+ const auto appendUint = [&](unsigned int u) { qualifierString.append(std::to_string(u).c_str()); };
+ const auto appendBool = [&](bool b) { qualifierString.append(std::to_string(b).c_str()); };
+ const auto appendStr = [&](const char* s) { qualifierString.append(s); };
+
+ const auto appendDecorate = [&](const TIntermConstantUnion* constant) {
+ if (constant->getBasicType() == EbtFloat) {
+ float value = static_cast<float>(constant->getConstArray()[0].getDConst());
+ appendFloat(value);
+ }
+ else if (constant->getBasicType() == EbtInt) {
+ int value = constant->getConstArray()[0].getIConst();
+ appendInt(value);
+ }
+ else if (constant->getBasicType() == EbtUint) {
+ unsigned value = constant->getConstArray()[0].getUConst();
+ appendUint(value);
+ }
+ else if (constant->getBasicType() == EbtBool) {
+ bool value = constant->getConstArray()[0].getBConst();
+ appendBool(value);
+ }
+ else if (constant->getBasicType() == EbtString) {
+ const TString* value = constant->getConstArray()[0].getSConst();
+ appendStr(value->c_str());
+ }
+ else
+ assert(0);
+ };
+
+ for (auto& decorate : spirvDecorate->decorates) {
+ appendStr("spirv_decorate(");
+ appendInt(decorate.first);
+ for (auto extraOperand : decorate.second) {
+ appendStr(", ");
+ appendDecorate(extraOperand);
+ }
+ appendStr(") ");
+ }
+
+ for (auto& decorateId : spirvDecorate->decorateIds) {
+ appendStr("spirv_decorate_id(");
+ appendInt(decorateId.first);
+ for (auto extraOperand : decorateId.second) {
+ appendStr(", ");
+ appendDecorate(extraOperand);
+ }
+ appendStr(") ");
+ }
+
+ for (auto& decorateString : spirvDecorate->decorateStrings) {
+ appendStr("spirv_decorate_string(");
+ appendInt(decorateString.first);
+ for (auto extraOperand : decorateString.second) {
+ appendStr(", ");
+ appendDecorate(extraOperand);
+ }
+ appendStr(") ");
+ }
+
+ return qualifierString;
+}
+
+//
+// Handle SPIR-V type specifiers
+//
+void TPublicType::setSpirvType(const TSpirvInstruction& spirvInst, const TSpirvTypeParameters* typeParams)
+{
+ if (!spirvType)
+ spirvType = new TSpirvType;
+
+ basicType = EbtSpirvType;
+ spirvType->spirvInst = spirvInst;
+ if (typeParams)
+ spirvType->typeParams = *typeParams;
+}
+
+TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant)
+{
+ TSpirvTypeParameters* spirvTypeParams = new TSpirvTypeParameters;
+ if (constant->getBasicType() != EbtFloat &&
+ constant->getBasicType() != EbtInt &&
+ constant->getBasicType() != EbtUint &&
+ constant->getBasicType() != EbtBool &&
+ constant->getBasicType() != EbtString)
+ error(loc, "this type not allowed", constant->getType().getBasicString(), "");
+ else {
+ assert(constant);
+ spirvTypeParams->push_back(TSpirvTypeParameter(constant));
+ }
+
+ return spirvTypeParams;
+}
+
+TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TPublicType& type)
+{
+ TSpirvTypeParameters* spirvTypeParams = new TSpirvTypeParameters;
+ spirvTypeParams->push_back(TSpirvTypeParameter(new TType(type)));
+ return spirvTypeParams;
+}
+
+TSpirvTypeParameters* TParseContext::mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2)
+{
+ // Merge SPIR-V type parameters of the second one to the first one
+ for (const auto& spirvTypeParam : *spirvTypeParams2)
+ spirvTypeParams1->push_back(spirvTypeParam);
+ return spirvTypeParams1;
+}
+
+//
+// Handle SPIR-V instruction qualifiers
+//
+TSpirvInstruction* TParseContext::makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value)
+{
+ TSpirvInstruction* spirvInst = new TSpirvInstruction;
+ if (name == "set")
+ spirvInst->set = value;
+ else
+ error(loc, "unknown SPIR-V instruction qualifier", name.c_str(), "");
+
+ return spirvInst;
+}
+
+TSpirvInstruction* TParseContext::makeSpirvInstruction(const TSourceLoc& loc, const TString& name, int value)
+{
+ TSpirvInstruction* spirvInstuction = new TSpirvInstruction;
+ if (name == "id")
+ spirvInstuction->id = value;
+ else
+ error(loc, "unknown SPIR-V instruction qualifier", name.c_str(), "");
+
+ return spirvInstuction;
+}
+
+TSpirvInstruction* TParseContext::mergeSpirvInstruction(const TSourceLoc& loc, TSpirvInstruction* spirvInst1, TSpirvInstruction* spirvInst2)
+{
+ // Merge qualifiers of the second SPIR-V instruction to those of the first one
+ if (!spirvInst2->set.empty()) {
+ if (spirvInst1->set.empty())
+ spirvInst1->set = spirvInst2->set;
+ else
+ error(loc, "too many SPIR-V instruction qualifiers", "spirv_instruction", "(set)");
+ }
+
+ if (spirvInst2->id != -1) {
+ if (spirvInst1->id == -1)
+ spirvInst1->id = spirvInst2->id;
+ else
+ error(loc, "too many SPIR-V instruction qualifiers", "spirv_instruction", "(id)");
+ }
+
+ return spirvInst1;
+}
+
+} // end namespace glslang
+
+#endif // GLSLANG_WEB
diff --git a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp
index f6291c397d..747b43666d 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp
@@ -77,6 +77,7 @@ void TType::buildMangledName(TString& mangledName) const
case EbtAtomicUint: mangledName += "au"; break;
case EbtAccStruct: mangledName += "as"; break;
case EbtRayQuery: mangledName += "rq"; break;
+ case EbtSpirvType: mangledName += "spv-t"; break;
#endif
case EbtSampler:
switch (sampler.type) {
@@ -170,7 +171,7 @@ void TType::buildMangledName(TString& mangledName) const
for (int i = 0; i < arraySizes->getNumDims(); ++i) {
if (arraySizes->getDimNode(i)) {
if (arraySizes->getDimNode(i)->getAsSymbolNode())
- snprintf(buf, maxSize, "s%d", arraySizes->getDimNode(i)->getAsSymbolNode()->getId());
+ snprintf(buf, maxSize, "s%lld", arraySizes->getDimNode(i)->getAsSymbolNode()->getId());
else
snprintf(buf, maxSize, "s%p", arraySizes->getDimNode(i));
} else
@@ -390,6 +391,9 @@ TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf)
implicitThis = copyOf.implicitThis;
illegalImplicitThis = copyOf.illegalImplicitThis;
defaultParamCount = copyOf.defaultParamCount;
+#ifndef GLSLANG_WEB
+ spirvInst = copyOf.spirvInst;
+#endif
}
TFunction* TFunction::clone() const
diff --git a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h
index db16c19bca..2196093073 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/SymbolTable.h
@@ -104,8 +104,8 @@ public:
virtual const TAnonMember* getAsAnonMember() const { return 0; }
virtual const TType& getType() const = 0;
virtual TType& getWritableType() = 0;
- virtual void setUniqueId(int id) { uniqueId = id; }
- virtual int getUniqueId() const { return uniqueId; }
+ virtual void setUniqueId(long long id) { uniqueId = id; }
+ virtual long long getUniqueId() const { return uniqueId; }
virtual void setExtensions(int numExts, const char* const exts[])
{
assert(extensions == 0);
@@ -130,7 +130,7 @@ protected:
TSymbol& operator=(const TSymbol&);
const TString *name;
- unsigned int uniqueId; // For cross-scope comparing during code generation
+ unsigned long long uniqueId; // For cross-scope comparing during code generation
// For tracking what extensions must be present
// (don't use if correct version/profile is present).
@@ -319,6 +319,15 @@ public:
virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; }
virtual const TParameter& operator[](int i) const { return parameters[i]; }
+#ifndef GLSLANG_WEB
+ virtual void setSpirvInstruction(const TSpirvInstruction& inst)
+ {
+ relateToOperator(EOpSpirvInst);
+ spirvInst = inst;
+ }
+ virtual const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
+#endif
+
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
#endif
@@ -342,6 +351,10 @@ protected:
// This is important for a static member function that has member variables in scope,
// but is not allowed to use them, or see hidden symbols instead.
int defaultParamCount;
+
+#ifndef GLSLANG_WEB
+ TSpirvInstruction spirvInst; // SPIR-V instruction qualifiers
+#endif
};
//
@@ -612,6 +625,7 @@ public:
// 3: user-shader globals
//
protected:
+ static const uint32_t LevelFlagBitOffset = 56;
static const int globalLevel = 3;
static bool isSharedLevel(int level) { return level <= 1; } // exclude all per-compile levels
static bool isBuiltInLevel(int level) { return level <= 2; } // exclude user globals
@@ -620,10 +634,12 @@ public:
bool isEmpty() { return table.size() == 0; }
bool atBuiltInLevel() { return isBuiltInLevel(currentLevel()); }
bool atGlobalLevel() { return isGlobalLevel(currentLevel()); }
- static bool isBuiltInSymbol(int uniqueId) {
- int level = uniqueId >> LevelFlagBitOffset;
+ static bool isBuiltInSymbol(long long uniqueId) {
+ int level = static_cast<int>(uniqueId >> LevelFlagBitOffset);
return isBuiltInLevel(level);
}
+ static constexpr uint64_t uniqueIdMask = (1LL << LevelFlagBitOffset) - 1;
+ static const uint32_t MaxLevelInUniqueID = 127;
void setNoBuiltInRedeclarations() { noBuiltInRedeclarations = true; }
void setSeparateNameSpaces() { separateNameSpaces = true; }
@@ -691,6 +707,16 @@ public:
return table[currentLevel()]->amend(symbol, firstNewMember);
}
+ // Update the level info in symbol's unique ID to current level
+ void amendSymbolIdLevel(TSymbol& symbol)
+ {
+ // clamp level to avoid overflow
+ uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel();
+ uint64_t symbolId = symbol.getUniqueId();
+ symbolId &= uniqueIdMask;
+ symbolId |= (level << LevelFlagBitOffset);
+ symbol.setUniqueId(symbolId);
+ }
//
// To allocate an internal temporary, which will need to be uniquely
// identified by the consumer of the AST, but never need to
@@ -859,7 +885,7 @@ public:
}
}
- int getMaxSymbolId() { return uniqueId; }
+ long long getMaxSymbolId() { return uniqueId; }
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
void dump(TInfoSink& infoSink, bool complete = false) const;
#endif
@@ -876,19 +902,24 @@ public:
// Add current level in the high-bits of unique id
void updateUniqueIdLevelFlag() {
// clamp level to avoid overflow
- uint32_t level = currentLevel() > 7 ? 7 : currentLevel();
- uniqueId &= ((1 << LevelFlagBitOffset) - 1);
+ uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel();
+ uniqueId &= uniqueIdMask;
uniqueId |= (level << LevelFlagBitOffset);
}
+ void overwriteUniqueId(long long id)
+ {
+ uniqueId = id;
+ updateUniqueIdLevelFlag();
+ }
+
protected:
TSymbolTable(TSymbolTable&);
TSymbolTable& operator=(TSymbolTableLevel&);
int currentLevel() const { return static_cast<int>(table.size()) - 1; }
- static const uint32_t LevelFlagBitOffset = 28;
std::vector<TSymbolTableLevel*> table;
- int uniqueId; // for unique identification in code generation
+ long long uniqueId; // for unique identification in code generation
bool noBuiltInRedeclarations;
bool separateNameSpaces;
unsigned int adoptedLevels;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp b/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp
index 69b8863ce6..097ee84552 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/Versions.cpp
@@ -165,12 +165,14 @@ void TParseVersions::initializeExtensionBehavior()
EShTargetLanguageVersion minSpvVersion;
} extensionData;
- const extensionData exts[] = { {E_GL_EXT_ray_tracing, EShTargetSpv_1_4} };
+ const extensionData exts[] = { {E_GL_EXT_ray_tracing, EShTargetSpv_1_4},
+ {E_GL_NV_ray_tracing_motion_blur, EShTargetSpv_1_4}
+ };
for (size_t ii = 0; ii < sizeof(exts) / sizeof(exts[0]); ii++) {
// Add only extensions which require > spv1.0 to save space in map
if (exts[ii].minSpvVersion > EShTargetSpv_1_0) {
- extensionMinSpv[E_GL_EXT_ray_tracing] = exts[ii].minSpvVersion;
+ extensionMinSpv[exts[ii].extensionName] = exts[ii].minSpvVersion;
}
}
@@ -198,6 +200,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_ARB_explicit_uniform_location] = EBhDisable;
extensionBehavior[E_GL_ARB_shader_image_load_store] = EBhDisable;
extensionBehavior[E_GL_ARB_shader_atomic_counters] = EBhDisable;
+ extensionBehavior[E_GL_ARB_shader_atomic_counter_ops] = EBhDisable;
extensionBehavior[E_GL_ARB_shader_draw_parameters] = EBhDisable;
extensionBehavior[E_GL_ARB_shader_group_vote] = EBhDisable;
extensionBehavior[E_GL_ARB_derivative_control] = EBhDisable;
@@ -251,6 +254,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_EXT_shader_16bit_storage] = EBhDisable;
extensionBehavior[E_GL_EXT_shader_8bit_storage] = EBhDisable;
+ extensionBehavior[E_GL_EXT_subgroup_uniform_control_flow] = EBhDisable;
// #line and #include
extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable;
@@ -280,6 +284,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_NV_shader_subgroup_partitioned] = EBhDisable;
extensionBehavior[E_GL_NV_shading_rate_image] = EBhDisable;
extensionBehavior[E_GL_NV_ray_tracing] = EBhDisable;
+ extensionBehavior[E_GL_NV_ray_tracing_motion_blur] = EBhDisable;
extensionBehavior[E_GL_NV_fragment_shader_barycentric] = EBhDisable;
extensionBehavior[E_GL_NV_compute_shader_derivatives] = EBhDisable;
extensionBehavior[E_GL_NV_shader_texture_footprint] = EBhDisable;
@@ -305,6 +310,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_EXT_tessellation_point_size] = EBhDisable;
extensionBehavior[E_GL_EXT_texture_buffer] = EBhDisable;
extensionBehavior[E_GL_EXT_texture_cube_map_array] = EBhDisable;
+ extensionBehavior[E_GL_EXT_null_initializer] = EBhDisable;
// OES matching AEP
extensionBehavior[E_GL_OES_geometry_shader] = EBhDisable;
@@ -330,6 +336,8 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_EXT_fragment_shading_rate] = EBhDisable;
extensionBehavior[E_GL_EXT_shader_image_int64] = EBhDisable;
extensionBehavior[E_GL_EXT_terminate_invocation] = EBhDisable;
+ extensionBehavior[E_GL_EXT_shared_memory_block] = EBhDisable;
+ extensionBehavior[E_GL_EXT_spirv_intrinsics] = EBhDisable;
// OVR extensions
extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
@@ -351,6 +359,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int64] = EBhDisable;
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_float16] = EBhDisable;
extensionBehavior[E_GL_EXT_shader_atomic_float] = EBhDisable;
+ extensionBehavior[E_GL_EXT_shader_atomic_float2] = EBhDisable;
}
#endif // GLSLANG_WEB
@@ -408,9 +417,13 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_EXT_shader_non_constant_global_initializers 1\n"
;
- if (isEsProfile() && version >= 300) {
+ if (version >= 300) {
preamble += "#define GL_NV_shader_noperspective_interpolation 1\n";
}
+ if (version >= 310) {
+ preamble += "#define GL_EXT_null_initializer 1\n";
+ preamble += "#define GL_EXT_subgroup_uniform_control_flow 1\n";
+ }
} else { // !isEsProfile()
preamble =
@@ -468,6 +481,7 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_EXT_demote_to_helper_invocation 1\n"
"#define GL_EXT_debug_printf 1\n"
"#define GL_EXT_fragment_shading_rate 1\n"
+ "#define GL_EXT_shared_memory_block 1\n"
// GL_KHR_shader_subgroup
"#define GL_KHR_shader_subgroup_basic 1\n"
@@ -485,6 +499,7 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_EXT_ray_tracing 1\n"
"#define GL_EXT_ray_query 1\n"
"#define GL_EXT_ray_flags_primitive_culling 1\n"
+ "#define GL_EXT_spirv_intrinsics 1\n"
"#define GL_AMD_shader_ballot 1\n"
"#define GL_AMD_shader_trinary_minmax 1\n"
@@ -507,6 +522,7 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_NV_shader_subgroup_partitioned 1\n"
"#define GL_NV_shading_rate_image 1\n"
"#define GL_NV_ray_tracing 1\n"
+ "#define GL_NV_ray_tracing_motion_blur 1\n"
"#define GL_NV_fragment_shader_barycentric 1\n"
"#define GL_NV_compute_shader_derivatives 1\n"
"#define GL_NV_shader_texture_footprint 1\n"
@@ -529,6 +545,7 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_EXT_shader_subgroup_extended_types_float16 1\n"
"#define GL_EXT_shader_atomic_float 1\n"
+ "#define GL_EXT_shader_atomic_float2 1\n"
;
if (version >= 150) {
@@ -538,6 +555,10 @@ void TParseVersions::getPreamble(std::string& preamble)
if (profile == ECompatibilityProfile)
preamble += "#define GL_compatibility_profile 1\n";
}
+ if (version >= 140) {
+ preamble += "#define GL_EXT_null_initializer 1\n";
+ preamble += "#define GL_EXT_subgroup_uniform_control_flow 1\n";
+ }
#endif // GLSLANG_WEB
}
@@ -590,6 +611,29 @@ void TParseVersions::getPreamble(std::string& preamble)
preamble += "\n";
}
#endif
+
+#ifndef GLSLANG_WEB
+ // GL_EXT_spirv_intrinsics
+ if (!isEsProfile()) {
+ switch (language) {
+ case EShLangVertex: preamble += "#define GL_VERTEX_SHADER 1 \n"; break;
+ case EShLangTessControl: preamble += "#define GL_TESSELLATION_CONTROL_SHADER 1 \n"; break;
+ case EShLangTessEvaluation: preamble += "#define GL_TESSELLATION_EVALUATION_SHADER 1 \n"; break;
+ case EShLangGeometry: preamble += "#define GL_GEOMETRY_SHADER 1 \n"; break;
+ case EShLangFragment: preamble += "#define GL_FRAGMENT_SHADER 1 \n"; break;
+ case EShLangCompute: preamble += "#define GL_COMPUTE_SHADER 1 \n"; break;
+ case EShLangRayGen: preamble += "#define GL_RAY_GENERATION_SHADER_EXT 1 \n"; break;
+ case EShLangIntersect: preamble += "#define GL_INTERSECTION_SHADER_EXT 1 \n"; break;
+ case EShLangAnyHit: preamble += "#define GL_ANY_HIT_SHADER_EXT 1 \n"; break;
+ case EShLangClosestHit: preamble += "#define GL_CLOSEST_HIT_SHADER_EXT 1 \n"; break;
+ case EShLangMiss: preamble += "#define GL_MISS_SHADER_EXT 1 \n"; break;
+ case EShLangCallable: preamble += "#define GL_CALLABLE_SHADER_EXT 1 \n"; break;
+ case EShLangTaskNV: preamble += "#define GL_TASK_SHADER_NV 1 \n"; break;
+ case EShLangMeshNV: preamble += "#define GL_MESH_SHADER_NV 1 \n"; break;
+ default: break;
+ }
+ }
+#endif
}
//
@@ -866,7 +910,7 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co
checkExtensionStage(getCurrentLoc(), extension);
// check if extension has additional requirements
- extensionRequires(getCurrentLoc(), extension ,behaviorString);
+ extensionRequires(getCurrentLoc(), extension, behaviorString);
// update the requested extension
updateExtensionBehavior(extension, behavior);
@@ -1264,7 +1308,7 @@ void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op)
// Call for any operation removed because Vulkan SPIR-V is being generated.
void TParseVersions::vulkanRemoved(const TSourceLoc& loc, const char* op)
{
- if (spvVersion.vulkan > 0)
+ if (spvVersion.vulkan > 0 && !spvVersion.vulkanRelaxed)
error(loc, "not allowed when using GLSL for Vulkan", op, "");
}
diff --git a/thirdparty/glslang/glslang/MachineIndependent/Versions.h b/thirdparty/glslang/glslang/MachineIndependent/Versions.h
index eb17c52e05..949a7a1739 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/Versions.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/Versions.h
@@ -87,11 +87,12 @@ inline const char* ProfileName(EProfile profile)
// The union of all requested rule sets will be applied.
//
struct SpvVersion {
- SpvVersion() : spv(0), vulkanGlsl(0), vulkan(0), openGl(0) {}
+ SpvVersion() : spv(0), vulkanGlsl(0), vulkan(0), openGl(0), vulkanRelaxed(false) {}
unsigned int spv; // the version of SPIR-V to target, as defined by "word 1" of the SPIR-V binary header
int vulkanGlsl; // the version of GLSL semantics for Vulkan, from GL_KHR_vulkan_glsl, for "#define VULKAN XXX"
int vulkan; // the version of Vulkan, for which SPIR-V execution environment rules to use
int openGl; // the version of GLSL semantics for OpenGL, from GL_ARB_gl_spirv, for "#define GL_SPIRV XXX"
+ bool vulkanRelaxed; // relax changes to GLSL for Vulkan, allowing some GL-specific to be compiled to Vulkan SPIR-V target
};
//
@@ -135,6 +136,7 @@ const char* const E_GL_ARB_explicit_attrib_location = "GL_ARB_explicit_attri
const char* const E_GL_ARB_explicit_uniform_location = "GL_ARB_explicit_uniform_location";
const char* const E_GL_ARB_shader_image_load_store = "GL_ARB_shader_image_load_store";
const char* const E_GL_ARB_shader_atomic_counters = "GL_ARB_shader_atomic_counters";
+const char* const E_GL_ARB_shader_atomic_counter_ops = "GL_ARB_shader_atomic_counter_ops";
const char* const E_GL_ARB_shader_draw_parameters = "GL_ARB_shader_draw_parameters";
const char* const E_GL_ARB_shader_group_vote = "GL_ARB_shader_group_vote";
const char* const E_GL_ARB_derivative_control = "GL_ARB_derivative_control";
@@ -201,6 +203,10 @@ const char* const E_GL_EXT_blend_func_extended = "GL_EXT_blend_func
const char* const E_GL_EXT_shader_implicit_conversions = "GL_EXT_shader_implicit_conversions";
const char* const E_GL_EXT_fragment_shading_rate = "GL_EXT_fragment_shading_rate";
const char* const E_GL_EXT_shader_image_int64 = "GL_EXT_shader_image_int64";
+const char* const E_GL_EXT_null_initializer = "GL_EXT_null_initializer";
+const char* const E_GL_EXT_shared_memory_block = "GL_EXT_shared_memory_block";
+const char* const E_GL_EXT_subgroup_uniform_control_flow = "GL_EXT_subgroup_uniform_control_flow";
+const char* const E_GL_EXT_spirv_intrinsics = "GL_EXT_spirv_intrinsics";
// Arrays of extensions for the above viewportEXTs duplications
@@ -242,6 +248,7 @@ const char* const E_GL_NV_shader_noperspective_interpolation = "GL_NV_shader_
const char* const E_GL_NV_shader_subgroup_partitioned = "GL_NV_shader_subgroup_partitioned";
const char* const E_GL_NV_shading_rate_image = "GL_NV_shading_rate_image";
const char* const E_GL_NV_ray_tracing = "GL_NV_ray_tracing";
+const char* const E_GL_NV_ray_tracing_motion_blur = "GL_NV_ray_tracing_motion_blur";
const char* const E_GL_NV_fragment_shader_barycentric = "GL_NV_fragment_shader_barycentric";
const char* const E_GL_NV_compute_shader_derivatives = "GL_NV_compute_shader_derivatives";
const char* const E_GL_NV_shader_texture_footprint = "GL_NV_shader_texture_footprint";
@@ -302,6 +309,7 @@ const char* const E_GL_EXT_shader_subgroup_extended_types_float16 = "GL_EXT_shad
const char* const E_GL_EXT_terminate_invocation = "GL_EXT_terminate_invocation";
const char* const E_GL_EXT_shader_atomic_float = "GL_EXT_shader_atomic_float";
+const char* const E_GL_EXT_shader_atomic_float2 = "GL_EXT_shader_atomic_float2";
// Arrays of extensions for the above AEP duplications
diff --git a/thirdparty/glslang/glslang/MachineIndependent/attribute.cpp b/thirdparty/glslang/glslang/MachineIndependent/attribute.cpp
index 9585518349..8a92f6ae09 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/attribute.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/attribute.cpp
@@ -123,6 +123,8 @@ TAttributeType TParseContext::attributeFromName(const TString& name) const
return EatPeelCount;
else if (name == "partial_count")
return EatPartialCount;
+ else if (name == "subgroup_uniform_control_flow")
+ return EatSubgroupUniformControlFlow;
else
return EatNone;
}
@@ -341,6 +343,29 @@ void TParseContext::handleLoopAttributes(const TAttributes& attributes, TIntermN
}
}
+
+//
+// Function attributes
+//
+void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttributes& attributes, TFunction* function)
+{
+ for (auto it = attributes.begin(); it != attributes.end(); ++it) {
+ if (it->size() > 0) {
+ warn(loc, "attribute with arguments not recognized, skipping", "", "");
+ continue;
+ }
+
+ switch (it->name) {
+ case EatSubgroupUniformControlFlow:
+ intermediate.setSubgroupUniformControlFlow();
+ break;
+ default:
+ warn(loc, "attribute does not apply to a function", "", "");
+ break;
+ }
+ }
+}
+
} // end namespace glslang
#endif // GLSLANG_WEB
diff --git a/thirdparty/glslang/glslang/MachineIndependent/attribute.h b/thirdparty/glslang/glslang/MachineIndependent/attribute.h
index 38a943d283..c5b29176c4 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/attribute.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/attribute.h
@@ -118,7 +118,8 @@ namespace glslang {
EatFormatR8ui,
EatFormatUnknown,
EatNonWritable,
- EatNonReadable
+ EatNonReadable,
+ EatSubgroupUniformControlFlow,
};
class TIntermAggregate;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/gl_types.h b/thirdparty/glslang/glslang/MachineIndependent/gl_types.h
index b9372d4bbb..d6c939374a 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/gl_types.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/gl_types.h
@@ -49,9 +49,9 @@
#define GL_INT64_VEC4_ARB 0x8FEB
#define GL_UNSIGNED_INT64_ARB 0x140F
-#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FE5
-#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FE6
-#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FE7
+#define GL_UNSIGNED_INT64_VEC2_ARB 0x8FF5
+#define GL_UNSIGNED_INT64_VEC3_ARB 0x8FF6
+#define GL_UNSIGNED_INT64_VEC4_ARB 0x8FF7
#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1
#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2
#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3
diff --git a/thirdparty/glslang/glslang/MachineIndependent/glslang.y b/thirdparty/glslang/glslang/MachineIndependent/glslang.y
index 2681d48f79..b77f4617be 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/glslang.y
+++ b/thirdparty/glslang/glslang/MachineIndependent/glslang.y
@@ -116,6 +116,9 @@ using namespace glslang;
glslang::TIntermNodePair nodePair;
glslang::TIntermTyped* intermTypedNode;
glslang::TAttributes* attributes;
+ glslang::TSpirvRequirement* spirvReq;
+ glslang::TSpirvInstruction* spirvInst;
+ glslang::TSpirvTypeParameters* spirvTypeParams;
};
union {
glslang::TPublicType type;
@@ -271,6 +274,11 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS
%token <lex> F16SUBPASSINPUT F16SUBPASSINPUTMS
+// spirv intrinsics
+%token <lex> SPIRV_INSTRUCTION SPIRV_EXECUTION_MODE SPIRV_EXECUTION_MODE_ID
+%token <lex> SPIRV_DECORATE SPIRV_DECORATE_ID SPIRV_DECORATE_STRING
+%token <lex> SPIRV_TYPE SPIRV_STORAGE_CLASS SPIRV_BY_REFERENCE SPIRV_LITERAL
+
%token <lex> LEFT_OP RIGHT_OP
@@ -362,6 +370,19 @@ extern int yylex(YYSTYPE*, TParseContext&);
%type <interm.attributes> attribute attribute_list single_attribute
%type <interm.intermNode> demote_statement
%type <interm.intermTypedNode> initializer_list
+%type <interm.spirvReq> spirv_requirements_list spirv_requirements_parameter
+%type <interm.intermNode> spirv_extension_list spirv_capability_list
+%type <interm.intermNode> spirv_execution_mode_qualifier
+%type <interm.intermNode> spirv_execution_mode_parameter_list spirv_execution_mode_parameter spirv_execution_mode_id_parameter_list
+%type <interm.type> spirv_storage_class_qualifier
+%type <interm.type> spirv_decorate_qualifier
+%type <interm.intermNode> spirv_decorate_parameter_list spirv_decorate_parameter
+%type <interm.intermNode> spirv_decorate_id_parameter_list
+%type <interm.intermNode> spirv_decorate_string_parameter_list
+%type <interm.type> spirv_type_specifier
+%type <interm.spirvTypeParams> spirv_type_parameter_list spirv_type_parameter
+%type <interm.spirvInst> spirv_instruction_qualifier
+%type <interm.spirvInst> spirv_instruction_qualifier_list spirv_instruction_qualifier_id
%start translation_unit
@@ -875,6 +896,20 @@ declaration
$$ = 0;
// TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
}
+
+ | spirv_instruction_qualifier function_prototype SEMICOLON {
+ parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier");
+ $2.function->setSpirvInstruction(*$1); // Attach SPIR-V intruction qualifier
+ parseContext.handleFunctionDeclarator($2.loc, *$2.function, true /* prototype */);
+ $$ = 0;
+ // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
+ }
+ | spirv_execution_mode_qualifier SEMICOLON {
+ parseContext.globalCheck($2.loc, "SPIR-V execution mode qualifier");
+ parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier");
+ $$ = 0;
+ }
+
| init_declarator_list SEMICOLON {
if ($1.intermNode && $1.intermNode->getAsAggregate())
$1.intermNode->getAsAggregate()->setOperator(EOpSequence);
@@ -944,6 +979,25 @@ function_prototype
$$.function = $1;
$$.loc = $2.loc;
}
+ | function_declarator RIGHT_PAREN attribute {
+ $$.function = $1;
+ $$.loc = $2.loc;
+ parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
+ parseContext.handleFunctionAttributes($2.loc, *$3, $$.function);
+ }
+ | attribute function_declarator RIGHT_PAREN {
+ $$.function = $2;
+ $$.loc = $3.loc;
+ parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
+ parseContext.handleFunctionAttributes($3.loc, *$1, $$.function);
+ }
+ | attribute function_declarator RIGHT_PAREN attribute {
+ $$.function = $2;
+ $$.loc = $3.loc;
+ parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
+ parseContext.handleFunctionAttributes($3.loc, *$1, $$.function);
+ parseContext.handleFunctionAttributes($3.loc, *$4, $$.function);
+ }
;
function_declarator
@@ -1347,6 +1401,25 @@ single_type_qualifier
| non_uniform_qualifier {
$$ = $1;
}
+ | spirv_storage_class_qualifier {
+ parseContext.globalCheck($1.loc, "spirv_storage_class");
+ parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V storage class qualifier");
+ $$ = $1;
+ }
+ | spirv_decorate_qualifier {
+ parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V decorate qualifier");
+ $$ = $1;
+ }
+ | SPIRV_BY_REFERENCE {
+ parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_reference");
+ $$.init($1.loc);
+ $$.qualifier.setSpirvByReference();
+ }
+ | SPIRV_LITERAL {
+ parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_literal");
+ $$.init($1.loc);
+ $$.qualifier.setSpirvLiteral();
+ }
;
@@ -3407,6 +3480,10 @@ type_specifier_nonarray
$$.basicType = EbtUint;
$$.coopmat = true;
}
+ | spirv_type_specifier {
+ parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier");
+ $$ = $1;
+ }
| struct_specifier {
$$ = $1;
@@ -3575,6 +3652,12 @@ initializer
parseContext.profileRequires($1.loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
$$ = $2;
}
+ | LEFT_BRACE RIGHT_BRACE {
+ const char* initFeature = "empty { } initializer";
+ parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_EXT_null_initializer, initFeature);
+ parseContext.profileRequires($1.loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature);
+ $$ = parseContext.intermediate.makeAggregate($1.loc);
+ }
;
@@ -3707,6 +3790,7 @@ selection_statement
}
| attribute selection_statement_nonattributed {
+ parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
parseContext.handleSelectionAttributes(*$1, $2);
$$ = $2;
}
@@ -3754,6 +3838,7 @@ switch_statement
}
| attribute switch_statement_nonattributed {
+ parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
parseContext.handleSwitchAttributes(*$1, $2);
$$ = $2;
}
@@ -3818,6 +3903,7 @@ iteration_statement
}
| attribute iteration_statement_nonattributed {
+ parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
parseContext.handleLoopAttributes(*$1, $2);
$$ = $2;
}
@@ -4021,7 +4107,6 @@ function_definition
attribute
: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET {
$$ = $3;
- parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_control_flow_attributes, "attribute");
}
attribute_list
@@ -4041,4 +4126,273 @@ single_attribute
}
+
+spirv_requirements_list
+ : spirv_requirements_parameter {
+ $$ = $1;
+ }
+ | spirv_requirements_list COMMA spirv_requirements_parameter {
+ $$ = parseContext.mergeSpirvRequirements($2.loc, $1, $3);
+ }
+
+spirv_requirements_parameter
+ : IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET {
+ $$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, $4->getAsAggregate(), nullptr);
+ }
+ | IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET {
+ $$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, nullptr, $4->getAsAggregate());
+ }
+
+spirv_extension_list
+ : STRING_LITERAL {
+ $$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.string, $1.loc, true));
+ }
+ | spirv_extension_list COMMA STRING_LITERAL {
+ $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true));
+ }
+
+spirv_capability_list
+ : INTCONSTANT {
+ $$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.i, $1.loc, true));
+ }
+ | spirv_capability_list COMMA INTCONSTANT {
+ $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.i, $3.loc, true));
+ }
+
+spirv_execution_mode_qualifier
+ : SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN {
+ parseContext.intermediate.insertSpirvExecutionMode($3.i);
+ $$ = 0;
+ }
+ | SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN {
+ parseContext.intermediate.insertSpirvRequirement($3);
+ parseContext.intermediate.insertSpirvExecutionMode($5.i);
+ $$ = 0;
+ }
+ | SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN {
+ parseContext.intermediate.insertSpirvExecutionMode($3.i, $5->getAsAggregate());
+ $$ = 0;
+ }
+ | SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN {
+ parseContext.intermediate.insertSpirvRequirement($3);
+ parseContext.intermediate.insertSpirvExecutionMode($5.i, $7->getAsAggregate());
+ $$ = 0;
+ }
+ | SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN {
+ parseContext.intermediate.insertSpirvExecutionModeId($3.i, $5->getAsAggregate());
+ $$ = 0;
+ }
+ | SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN {
+ parseContext.intermediate.insertSpirvRequirement($3);
+ parseContext.intermediate.insertSpirvExecutionModeId($5.i, $7->getAsAggregate());
+ $$ = 0;
+ }
+
+spirv_execution_mode_parameter_list
+ : spirv_execution_mode_parameter {
+ $$ = parseContext.intermediate.makeAggregate($1);
+ }
+ | spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter {
+ $$ = parseContext.intermediate.growAggregate($1, $3);
+ }
+
+spirv_execution_mode_parameter
+ : FLOATCONSTANT {
+ $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true);
+ }
+ | INTCONSTANT {
+ $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true);
+ }
+ | UINTCONSTANT {
+ $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true);
+ }
+ | BOOLCONSTANT {
+ $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true);
+ }
+ | STRING_LITERAL {
+ $$ = parseContext.intermediate.addConstantUnion($1.string, $1.loc, true);
+ }
+
+spirv_execution_mode_id_parameter_list
+ : constant_expression {
+ if ($1->getBasicType() != EbtFloat &&
+ $1->getBasicType() != EbtInt &&
+ $1->getBasicType() != EbtUint &&
+ $1->getBasicType() != EbtBool &&
+ $1->getBasicType() != EbtString)
+ parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), "");
+ $$ = parseContext.intermediate.makeAggregate($1);
+ }
+ | spirv_execution_mode_id_parameter_list COMMA constant_expression {
+ if ($3->getBasicType() != EbtFloat &&
+ $3->getBasicType() != EbtInt &&
+ $3->getBasicType() != EbtUint &&
+ $3->getBasicType() != EbtBool &&
+ $3->getBasicType() != EbtString)
+ parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), "");
+ $$ = parseContext.intermediate.growAggregate($1, $3);
+ }
+
+spirv_storage_class_qualifier
+ : SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN {
+ $$.init($1.loc);
+ $$.qualifier.storage = EvqSpirvStorageClass;
+ $$.qualifier.spirvStorageClass = $3.i;
+ }
+ | SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN {
+ $$.init($1.loc);
+ parseContext.intermediate.insertSpirvRequirement($3);
+ $$.qualifier.storage = EvqSpirvStorageClass;
+ $$.qualifier.spirvStorageClass = $5.i;
+ }
+
+spirv_decorate_qualifier
+ : SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN{
+ $$.init($1.loc);
+ $$.qualifier.setSpirvDecorate($3.i);
+ }
+ | SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN{
+ $$.init($1.loc);
+ parseContext.intermediate.insertSpirvRequirement($3);
+ $$.qualifier.setSpirvDecorate($5.i);
+ }
+ | SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN {
+ $$.init($1.loc);
+ $$.qualifier.setSpirvDecorate($3.i, $5->getAsAggregate());
+ }
+ | SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN {
+ $$.init($1.loc);
+ parseContext.intermediate.insertSpirvRequirement($3);
+ $$.qualifier.setSpirvDecorate($5.i, $7->getAsAggregate());
+ }
+ | SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN {
+ $$.init($1.loc);
+ $$.qualifier.setSpirvDecorateId($3.i, $5->getAsAggregate());
+ }
+ | SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN {
+ $$.init($1.loc);
+ parseContext.intermediate.insertSpirvRequirement($3);
+ $$.qualifier.setSpirvDecorateId($5.i, $7->getAsAggregate());
+ }
+ | SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN {
+ $$.init($1.loc);
+ $$.qualifier.setSpirvDecorateString($3.i, $5->getAsAggregate());
+ }
+ | SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN {
+ $$.init($1.loc);
+ parseContext.intermediate.insertSpirvRequirement($3);
+ $$.qualifier.setSpirvDecorateString($5.i, $7->getAsAggregate());
+ }
+
+spirv_decorate_parameter_list
+ : spirv_decorate_parameter {
+ $$ = parseContext.intermediate.makeAggregate($1);
+ }
+ | spirv_decorate_parameter_list COMMA spirv_decorate_parameter {
+ $$ = parseContext.intermediate.growAggregate($1, $3);
+ }
+
+spirv_decorate_parameter
+ : FLOATCONSTANT {
+ $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true);
+ }
+ | INTCONSTANT {
+ $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true);
+ }
+ | UINTCONSTANT {
+ $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true);
+ }
+ | BOOLCONSTANT {
+ $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true);
+ }
+
+spirv_decorate_id_parameter_list
+ : constant_expression {
+ if ($1->getBasicType() != EbtFloat &&
+ $1->getBasicType() != EbtInt &&
+ $1->getBasicType() != EbtUint &&
+ $1->getBasicType() != EbtBool)
+ parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), "");
+ $$ = parseContext.intermediate.makeAggregate($1);
+ }
+ | spirv_decorate_id_parameter_list COMMA constant_expression {
+ if ($3->getBasicType() != EbtFloat &&
+ $3->getBasicType() != EbtInt &&
+ $3->getBasicType() != EbtUint &&
+ $3->getBasicType() != EbtBool)
+ parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), "");
+ $$ = parseContext.intermediate.growAggregate($1, $3);
+ }
+
+spirv_decorate_string_parameter_list
+ : STRING_LITERAL {
+ $$ = parseContext.intermediate.makeAggregate(
+ parseContext.intermediate.addConstantUnion($1.string, $1.loc, true));
+ }
+ | spirv_decorate_string_parameter_list COMMA STRING_LITERAL {
+ $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true));
+ }
+
+spirv_type_specifier
+ : SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.setSpirvType(*$3, $5);
+ }
+ | SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ parseContext.intermediate.insertSpirvRequirement($3);
+ $$.setSpirvType(*$5, $7);
+ }
+ | SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ $$.setSpirvType(*$3);
+ }
+ | SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN {
+ $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
+ parseContext.intermediate.insertSpirvRequirement($3);
+ $$.setSpirvType(*$5);
+ }
+
+spirv_type_parameter_list
+ : spirv_type_parameter {
+ $$ = $1;
+ }
+ | spirv_type_parameter_list COMMA spirv_type_parameter {
+ $$ = parseContext.mergeSpirvTypeParameters($1, $3);
+ }
+
+spirv_type_parameter
+ : constant_expression {
+ $$ = parseContext.makeSpirvTypeParameters($1->getLoc(), $1->getAsConstantUnion());
+ }
+ | type_specifier {
+ $$ = parseContext.makeSpirvTypeParameters($1);
+ }
+
+spirv_instruction_qualifier
+ : SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN {
+ $$ = $3;
+ }
+ | SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN {
+ parseContext.intermediate.insertSpirvRequirement($3);
+ $$ = $5;
+ }
+
+spirv_instruction_qualifier_list
+ : spirv_instruction_qualifier_id {
+ $$ = $1;
+ }
+ | spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id {
+ $$ = parseContext.mergeSpirvInstruction($2.loc, $1, $3);
+ }
+
+spirv_instruction_qualifier_id
+ : IDENTIFIER EQUAL STRING_LITERAL {
+ $$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, *$3.string);
+ }
+ | IDENTIFIER EQUAL INTCONSTANT {
+ $$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, $3.i);
+ }
+
+
%%
diff --git a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp
index feecc98200..dba06aefef 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp
@@ -438,251 +438,281 @@ enum yysymbol_kind_t
YYSYMBOL_USUBPASSINPUTMS = 314, /* USUBPASSINPUTMS */
YYSYMBOL_F16SUBPASSINPUT = 315, /* F16SUBPASSINPUT */
YYSYMBOL_F16SUBPASSINPUTMS = 316, /* F16SUBPASSINPUTMS */
- YYSYMBOL_LEFT_OP = 317, /* LEFT_OP */
- YYSYMBOL_RIGHT_OP = 318, /* RIGHT_OP */
- YYSYMBOL_INC_OP = 319, /* INC_OP */
- YYSYMBOL_DEC_OP = 320, /* DEC_OP */
- YYSYMBOL_LE_OP = 321, /* LE_OP */
- YYSYMBOL_GE_OP = 322, /* GE_OP */
- YYSYMBOL_EQ_OP = 323, /* EQ_OP */
- YYSYMBOL_NE_OP = 324, /* NE_OP */
- YYSYMBOL_AND_OP = 325, /* AND_OP */
- YYSYMBOL_OR_OP = 326, /* OR_OP */
- YYSYMBOL_XOR_OP = 327, /* XOR_OP */
- YYSYMBOL_MUL_ASSIGN = 328, /* MUL_ASSIGN */
- YYSYMBOL_DIV_ASSIGN = 329, /* DIV_ASSIGN */
- YYSYMBOL_ADD_ASSIGN = 330, /* ADD_ASSIGN */
- YYSYMBOL_MOD_ASSIGN = 331, /* MOD_ASSIGN */
- YYSYMBOL_LEFT_ASSIGN = 332, /* LEFT_ASSIGN */
- YYSYMBOL_RIGHT_ASSIGN = 333, /* RIGHT_ASSIGN */
- YYSYMBOL_AND_ASSIGN = 334, /* AND_ASSIGN */
- YYSYMBOL_XOR_ASSIGN = 335, /* XOR_ASSIGN */
- YYSYMBOL_OR_ASSIGN = 336, /* OR_ASSIGN */
- YYSYMBOL_SUB_ASSIGN = 337, /* SUB_ASSIGN */
- YYSYMBOL_STRING_LITERAL = 338, /* STRING_LITERAL */
- YYSYMBOL_LEFT_PAREN = 339, /* LEFT_PAREN */
- YYSYMBOL_RIGHT_PAREN = 340, /* RIGHT_PAREN */
- YYSYMBOL_LEFT_BRACKET = 341, /* LEFT_BRACKET */
- YYSYMBOL_RIGHT_BRACKET = 342, /* RIGHT_BRACKET */
- YYSYMBOL_LEFT_BRACE = 343, /* LEFT_BRACE */
- YYSYMBOL_RIGHT_BRACE = 344, /* RIGHT_BRACE */
- YYSYMBOL_DOT = 345, /* DOT */
- YYSYMBOL_COMMA = 346, /* COMMA */
- YYSYMBOL_COLON = 347, /* COLON */
- YYSYMBOL_EQUAL = 348, /* EQUAL */
- YYSYMBOL_SEMICOLON = 349, /* SEMICOLON */
- YYSYMBOL_BANG = 350, /* BANG */
- YYSYMBOL_DASH = 351, /* DASH */
- YYSYMBOL_TILDE = 352, /* TILDE */
- YYSYMBOL_PLUS = 353, /* PLUS */
- YYSYMBOL_STAR = 354, /* STAR */
- YYSYMBOL_SLASH = 355, /* SLASH */
- YYSYMBOL_PERCENT = 356, /* PERCENT */
- YYSYMBOL_LEFT_ANGLE = 357, /* LEFT_ANGLE */
- YYSYMBOL_RIGHT_ANGLE = 358, /* RIGHT_ANGLE */
- YYSYMBOL_VERTICAL_BAR = 359, /* VERTICAL_BAR */
- YYSYMBOL_CARET = 360, /* CARET */
- YYSYMBOL_AMPERSAND = 361, /* AMPERSAND */
- YYSYMBOL_QUESTION = 362, /* QUESTION */
- YYSYMBOL_INVARIANT = 363, /* INVARIANT */
- YYSYMBOL_HIGH_PRECISION = 364, /* HIGH_PRECISION */
- YYSYMBOL_MEDIUM_PRECISION = 365, /* MEDIUM_PRECISION */
- YYSYMBOL_LOW_PRECISION = 366, /* LOW_PRECISION */
- YYSYMBOL_PRECISION = 367, /* PRECISION */
- YYSYMBOL_PACKED = 368, /* PACKED */
- YYSYMBOL_RESOURCE = 369, /* RESOURCE */
- YYSYMBOL_SUPERP = 370, /* SUPERP */
- YYSYMBOL_FLOATCONSTANT = 371, /* FLOATCONSTANT */
- YYSYMBOL_INTCONSTANT = 372, /* INTCONSTANT */
- YYSYMBOL_UINTCONSTANT = 373, /* UINTCONSTANT */
- YYSYMBOL_BOOLCONSTANT = 374, /* BOOLCONSTANT */
- YYSYMBOL_IDENTIFIER = 375, /* IDENTIFIER */
- YYSYMBOL_TYPE_NAME = 376, /* TYPE_NAME */
- YYSYMBOL_CENTROID = 377, /* CENTROID */
- YYSYMBOL_IN = 378, /* IN */
- YYSYMBOL_OUT = 379, /* OUT */
- YYSYMBOL_INOUT = 380, /* INOUT */
- YYSYMBOL_STRUCT = 381, /* STRUCT */
- YYSYMBOL_VOID = 382, /* VOID */
- YYSYMBOL_WHILE = 383, /* WHILE */
- YYSYMBOL_BREAK = 384, /* BREAK */
- YYSYMBOL_CONTINUE = 385, /* CONTINUE */
- YYSYMBOL_DO = 386, /* DO */
- YYSYMBOL_ELSE = 387, /* ELSE */
- YYSYMBOL_FOR = 388, /* FOR */
- YYSYMBOL_IF = 389, /* IF */
- YYSYMBOL_DISCARD = 390, /* DISCARD */
- YYSYMBOL_RETURN = 391, /* RETURN */
- YYSYMBOL_SWITCH = 392, /* SWITCH */
- YYSYMBOL_CASE = 393, /* CASE */
- YYSYMBOL_DEFAULT = 394, /* DEFAULT */
- YYSYMBOL_TERMINATE_INVOCATION = 395, /* TERMINATE_INVOCATION */
- YYSYMBOL_TERMINATE_RAY = 396, /* TERMINATE_RAY */
- YYSYMBOL_IGNORE_INTERSECTION = 397, /* IGNORE_INTERSECTION */
- YYSYMBOL_UNIFORM = 398, /* UNIFORM */
- YYSYMBOL_SHARED = 399, /* SHARED */
- YYSYMBOL_BUFFER = 400, /* BUFFER */
- YYSYMBOL_FLAT = 401, /* FLAT */
- YYSYMBOL_SMOOTH = 402, /* SMOOTH */
- YYSYMBOL_LAYOUT = 403, /* LAYOUT */
- YYSYMBOL_DOUBLECONSTANT = 404, /* DOUBLECONSTANT */
- YYSYMBOL_INT16CONSTANT = 405, /* INT16CONSTANT */
- YYSYMBOL_UINT16CONSTANT = 406, /* UINT16CONSTANT */
- YYSYMBOL_FLOAT16CONSTANT = 407, /* FLOAT16CONSTANT */
- YYSYMBOL_INT32CONSTANT = 408, /* INT32CONSTANT */
- YYSYMBOL_UINT32CONSTANT = 409, /* UINT32CONSTANT */
- YYSYMBOL_INT64CONSTANT = 410, /* INT64CONSTANT */
- YYSYMBOL_UINT64CONSTANT = 411, /* UINT64CONSTANT */
- YYSYMBOL_SUBROUTINE = 412, /* SUBROUTINE */
- YYSYMBOL_DEMOTE = 413, /* DEMOTE */
- YYSYMBOL_PAYLOADNV = 414, /* PAYLOADNV */
- YYSYMBOL_PAYLOADINNV = 415, /* PAYLOADINNV */
- YYSYMBOL_HITATTRNV = 416, /* HITATTRNV */
- YYSYMBOL_CALLDATANV = 417, /* CALLDATANV */
- YYSYMBOL_CALLDATAINNV = 418, /* CALLDATAINNV */
- YYSYMBOL_PAYLOADEXT = 419, /* PAYLOADEXT */
- YYSYMBOL_PAYLOADINEXT = 420, /* PAYLOADINEXT */
- YYSYMBOL_HITATTREXT = 421, /* HITATTREXT */
- YYSYMBOL_CALLDATAEXT = 422, /* CALLDATAEXT */
- YYSYMBOL_CALLDATAINEXT = 423, /* CALLDATAINEXT */
- YYSYMBOL_PATCH = 424, /* PATCH */
- YYSYMBOL_SAMPLE = 425, /* SAMPLE */
- YYSYMBOL_NONUNIFORM = 426, /* NONUNIFORM */
- YYSYMBOL_COHERENT = 427, /* COHERENT */
- YYSYMBOL_VOLATILE = 428, /* VOLATILE */
- YYSYMBOL_RESTRICT = 429, /* RESTRICT */
- YYSYMBOL_READONLY = 430, /* READONLY */
- YYSYMBOL_WRITEONLY = 431, /* WRITEONLY */
- YYSYMBOL_DEVICECOHERENT = 432, /* DEVICECOHERENT */
- YYSYMBOL_QUEUEFAMILYCOHERENT = 433, /* QUEUEFAMILYCOHERENT */
- YYSYMBOL_WORKGROUPCOHERENT = 434, /* WORKGROUPCOHERENT */
- YYSYMBOL_SUBGROUPCOHERENT = 435, /* SUBGROUPCOHERENT */
- YYSYMBOL_NONPRIVATE = 436, /* NONPRIVATE */
- YYSYMBOL_SHADERCALLCOHERENT = 437, /* SHADERCALLCOHERENT */
- YYSYMBOL_NOPERSPECTIVE = 438, /* NOPERSPECTIVE */
- YYSYMBOL_EXPLICITINTERPAMD = 439, /* EXPLICITINTERPAMD */
- YYSYMBOL_PERVERTEXNV = 440, /* PERVERTEXNV */
- YYSYMBOL_PERPRIMITIVENV = 441, /* PERPRIMITIVENV */
- YYSYMBOL_PERVIEWNV = 442, /* PERVIEWNV */
- YYSYMBOL_PERTASKNV = 443, /* PERTASKNV */
- YYSYMBOL_PRECISE = 444, /* PRECISE */
- YYSYMBOL_YYACCEPT = 445, /* $accept */
- YYSYMBOL_variable_identifier = 446, /* variable_identifier */
- YYSYMBOL_primary_expression = 447, /* primary_expression */
- YYSYMBOL_postfix_expression = 448, /* postfix_expression */
- YYSYMBOL_integer_expression = 449, /* integer_expression */
- YYSYMBOL_function_call = 450, /* function_call */
- YYSYMBOL_function_call_or_method = 451, /* function_call_or_method */
- YYSYMBOL_function_call_generic = 452, /* function_call_generic */
- YYSYMBOL_function_call_header_no_parameters = 453, /* function_call_header_no_parameters */
- YYSYMBOL_function_call_header_with_parameters = 454, /* function_call_header_with_parameters */
- YYSYMBOL_function_call_header = 455, /* function_call_header */
- YYSYMBOL_function_identifier = 456, /* function_identifier */
- YYSYMBOL_unary_expression = 457, /* unary_expression */
- YYSYMBOL_unary_operator = 458, /* unary_operator */
- YYSYMBOL_multiplicative_expression = 459, /* multiplicative_expression */
- YYSYMBOL_additive_expression = 460, /* additive_expression */
- YYSYMBOL_shift_expression = 461, /* shift_expression */
- YYSYMBOL_relational_expression = 462, /* relational_expression */
- YYSYMBOL_equality_expression = 463, /* equality_expression */
- YYSYMBOL_and_expression = 464, /* and_expression */
- YYSYMBOL_exclusive_or_expression = 465, /* exclusive_or_expression */
- YYSYMBOL_inclusive_or_expression = 466, /* inclusive_or_expression */
- YYSYMBOL_logical_and_expression = 467, /* logical_and_expression */
- YYSYMBOL_logical_xor_expression = 468, /* logical_xor_expression */
- YYSYMBOL_logical_or_expression = 469, /* logical_or_expression */
- YYSYMBOL_conditional_expression = 470, /* conditional_expression */
- YYSYMBOL_471_1 = 471, /* $@1 */
- YYSYMBOL_assignment_expression = 472, /* assignment_expression */
- YYSYMBOL_assignment_operator = 473, /* assignment_operator */
- YYSYMBOL_expression = 474, /* expression */
- YYSYMBOL_constant_expression = 475, /* constant_expression */
- YYSYMBOL_declaration = 476, /* declaration */
- YYSYMBOL_block_structure = 477, /* block_structure */
- YYSYMBOL_478_2 = 478, /* $@2 */
- YYSYMBOL_identifier_list = 479, /* identifier_list */
- YYSYMBOL_function_prototype = 480, /* function_prototype */
- YYSYMBOL_function_declarator = 481, /* function_declarator */
- YYSYMBOL_function_header_with_parameters = 482, /* function_header_with_parameters */
- YYSYMBOL_function_header = 483, /* function_header */
- YYSYMBOL_parameter_declarator = 484, /* parameter_declarator */
- YYSYMBOL_parameter_declaration = 485, /* parameter_declaration */
- YYSYMBOL_parameter_type_specifier = 486, /* parameter_type_specifier */
- YYSYMBOL_init_declarator_list = 487, /* init_declarator_list */
- YYSYMBOL_single_declaration = 488, /* single_declaration */
- YYSYMBOL_fully_specified_type = 489, /* fully_specified_type */
- YYSYMBOL_invariant_qualifier = 490, /* invariant_qualifier */
- YYSYMBOL_interpolation_qualifier = 491, /* interpolation_qualifier */
- YYSYMBOL_layout_qualifier = 492, /* layout_qualifier */
- YYSYMBOL_layout_qualifier_id_list = 493, /* layout_qualifier_id_list */
- YYSYMBOL_layout_qualifier_id = 494, /* layout_qualifier_id */
- YYSYMBOL_precise_qualifier = 495, /* precise_qualifier */
- YYSYMBOL_type_qualifier = 496, /* type_qualifier */
- YYSYMBOL_single_type_qualifier = 497, /* single_type_qualifier */
- YYSYMBOL_storage_qualifier = 498, /* storage_qualifier */
- YYSYMBOL_non_uniform_qualifier = 499, /* non_uniform_qualifier */
- YYSYMBOL_type_name_list = 500, /* type_name_list */
- YYSYMBOL_type_specifier = 501, /* type_specifier */
- YYSYMBOL_array_specifier = 502, /* array_specifier */
- YYSYMBOL_type_parameter_specifier_opt = 503, /* type_parameter_specifier_opt */
- YYSYMBOL_type_parameter_specifier = 504, /* type_parameter_specifier */
- YYSYMBOL_type_parameter_specifier_list = 505, /* type_parameter_specifier_list */
- YYSYMBOL_type_specifier_nonarray = 506, /* type_specifier_nonarray */
- YYSYMBOL_precision_qualifier = 507, /* precision_qualifier */
- YYSYMBOL_struct_specifier = 508, /* struct_specifier */
- YYSYMBOL_509_3 = 509, /* $@3 */
- YYSYMBOL_510_4 = 510, /* $@4 */
- YYSYMBOL_struct_declaration_list = 511, /* struct_declaration_list */
- YYSYMBOL_struct_declaration = 512, /* struct_declaration */
- YYSYMBOL_struct_declarator_list = 513, /* struct_declarator_list */
- YYSYMBOL_struct_declarator = 514, /* struct_declarator */
- YYSYMBOL_initializer = 515, /* initializer */
- YYSYMBOL_initializer_list = 516, /* initializer_list */
- YYSYMBOL_declaration_statement = 517, /* declaration_statement */
- YYSYMBOL_statement = 518, /* statement */
- YYSYMBOL_simple_statement = 519, /* simple_statement */
- YYSYMBOL_demote_statement = 520, /* demote_statement */
- YYSYMBOL_compound_statement = 521, /* compound_statement */
- YYSYMBOL_522_5 = 522, /* $@5 */
- YYSYMBOL_523_6 = 523, /* $@6 */
- YYSYMBOL_statement_no_new_scope = 524, /* statement_no_new_scope */
- YYSYMBOL_statement_scoped = 525, /* statement_scoped */
- YYSYMBOL_526_7 = 526, /* $@7 */
- YYSYMBOL_527_8 = 527, /* $@8 */
- YYSYMBOL_compound_statement_no_new_scope = 528, /* compound_statement_no_new_scope */
- YYSYMBOL_statement_list = 529, /* statement_list */
- YYSYMBOL_expression_statement = 530, /* expression_statement */
- YYSYMBOL_selection_statement = 531, /* selection_statement */
- YYSYMBOL_selection_statement_nonattributed = 532, /* selection_statement_nonattributed */
- YYSYMBOL_selection_rest_statement = 533, /* selection_rest_statement */
- YYSYMBOL_condition = 534, /* condition */
- YYSYMBOL_switch_statement = 535, /* switch_statement */
- YYSYMBOL_switch_statement_nonattributed = 536, /* switch_statement_nonattributed */
- YYSYMBOL_537_9 = 537, /* $@9 */
- YYSYMBOL_switch_statement_list = 538, /* switch_statement_list */
- YYSYMBOL_case_label = 539, /* case_label */
- YYSYMBOL_iteration_statement = 540, /* iteration_statement */
- YYSYMBOL_iteration_statement_nonattributed = 541, /* iteration_statement_nonattributed */
- YYSYMBOL_542_10 = 542, /* $@10 */
- YYSYMBOL_543_11 = 543, /* $@11 */
- YYSYMBOL_544_12 = 544, /* $@12 */
- YYSYMBOL_for_init_statement = 545, /* for_init_statement */
- YYSYMBOL_conditionopt = 546, /* conditionopt */
- YYSYMBOL_for_rest_statement = 547, /* for_rest_statement */
- YYSYMBOL_jump_statement = 548, /* jump_statement */
- YYSYMBOL_translation_unit = 549, /* translation_unit */
- YYSYMBOL_external_declaration = 550, /* external_declaration */
- YYSYMBOL_function_definition = 551, /* function_definition */
- YYSYMBOL_552_13 = 552, /* $@13 */
- YYSYMBOL_attribute = 553, /* attribute */
- YYSYMBOL_attribute_list = 554, /* attribute_list */
- YYSYMBOL_single_attribute = 555 /* single_attribute */
+ YYSYMBOL_SPIRV_INSTRUCTION = 317, /* SPIRV_INSTRUCTION */
+ YYSYMBOL_SPIRV_EXECUTION_MODE = 318, /* SPIRV_EXECUTION_MODE */
+ YYSYMBOL_SPIRV_EXECUTION_MODE_ID = 319, /* SPIRV_EXECUTION_MODE_ID */
+ YYSYMBOL_SPIRV_DECORATE = 320, /* SPIRV_DECORATE */
+ YYSYMBOL_SPIRV_DECORATE_ID = 321, /* SPIRV_DECORATE_ID */
+ YYSYMBOL_SPIRV_DECORATE_STRING = 322, /* SPIRV_DECORATE_STRING */
+ YYSYMBOL_SPIRV_TYPE = 323, /* SPIRV_TYPE */
+ YYSYMBOL_SPIRV_STORAGE_CLASS = 324, /* SPIRV_STORAGE_CLASS */
+ YYSYMBOL_SPIRV_BY_REFERENCE = 325, /* SPIRV_BY_REFERENCE */
+ YYSYMBOL_SPIRV_LITERAL = 326, /* SPIRV_LITERAL */
+ YYSYMBOL_LEFT_OP = 327, /* LEFT_OP */
+ YYSYMBOL_RIGHT_OP = 328, /* RIGHT_OP */
+ YYSYMBOL_INC_OP = 329, /* INC_OP */
+ YYSYMBOL_DEC_OP = 330, /* DEC_OP */
+ YYSYMBOL_LE_OP = 331, /* LE_OP */
+ YYSYMBOL_GE_OP = 332, /* GE_OP */
+ YYSYMBOL_EQ_OP = 333, /* EQ_OP */
+ YYSYMBOL_NE_OP = 334, /* NE_OP */
+ YYSYMBOL_AND_OP = 335, /* AND_OP */
+ YYSYMBOL_OR_OP = 336, /* OR_OP */
+ YYSYMBOL_XOR_OP = 337, /* XOR_OP */
+ YYSYMBOL_MUL_ASSIGN = 338, /* MUL_ASSIGN */
+ YYSYMBOL_DIV_ASSIGN = 339, /* DIV_ASSIGN */
+ YYSYMBOL_ADD_ASSIGN = 340, /* ADD_ASSIGN */
+ YYSYMBOL_MOD_ASSIGN = 341, /* MOD_ASSIGN */
+ YYSYMBOL_LEFT_ASSIGN = 342, /* LEFT_ASSIGN */
+ YYSYMBOL_RIGHT_ASSIGN = 343, /* RIGHT_ASSIGN */
+ YYSYMBOL_AND_ASSIGN = 344, /* AND_ASSIGN */
+ YYSYMBOL_XOR_ASSIGN = 345, /* XOR_ASSIGN */
+ YYSYMBOL_OR_ASSIGN = 346, /* OR_ASSIGN */
+ YYSYMBOL_SUB_ASSIGN = 347, /* SUB_ASSIGN */
+ YYSYMBOL_STRING_LITERAL = 348, /* STRING_LITERAL */
+ YYSYMBOL_LEFT_PAREN = 349, /* LEFT_PAREN */
+ YYSYMBOL_RIGHT_PAREN = 350, /* RIGHT_PAREN */
+ YYSYMBOL_LEFT_BRACKET = 351, /* LEFT_BRACKET */
+ YYSYMBOL_RIGHT_BRACKET = 352, /* RIGHT_BRACKET */
+ YYSYMBOL_LEFT_BRACE = 353, /* LEFT_BRACE */
+ YYSYMBOL_RIGHT_BRACE = 354, /* RIGHT_BRACE */
+ YYSYMBOL_DOT = 355, /* DOT */
+ YYSYMBOL_COMMA = 356, /* COMMA */
+ YYSYMBOL_COLON = 357, /* COLON */
+ YYSYMBOL_EQUAL = 358, /* EQUAL */
+ YYSYMBOL_SEMICOLON = 359, /* SEMICOLON */
+ YYSYMBOL_BANG = 360, /* BANG */
+ YYSYMBOL_DASH = 361, /* DASH */
+ YYSYMBOL_TILDE = 362, /* TILDE */
+ YYSYMBOL_PLUS = 363, /* PLUS */
+ YYSYMBOL_STAR = 364, /* STAR */
+ YYSYMBOL_SLASH = 365, /* SLASH */
+ YYSYMBOL_PERCENT = 366, /* PERCENT */
+ YYSYMBOL_LEFT_ANGLE = 367, /* LEFT_ANGLE */
+ YYSYMBOL_RIGHT_ANGLE = 368, /* RIGHT_ANGLE */
+ YYSYMBOL_VERTICAL_BAR = 369, /* VERTICAL_BAR */
+ YYSYMBOL_CARET = 370, /* CARET */
+ YYSYMBOL_AMPERSAND = 371, /* AMPERSAND */
+ YYSYMBOL_QUESTION = 372, /* QUESTION */
+ YYSYMBOL_INVARIANT = 373, /* INVARIANT */
+ YYSYMBOL_HIGH_PRECISION = 374, /* HIGH_PRECISION */
+ YYSYMBOL_MEDIUM_PRECISION = 375, /* MEDIUM_PRECISION */
+ YYSYMBOL_LOW_PRECISION = 376, /* LOW_PRECISION */
+ YYSYMBOL_PRECISION = 377, /* PRECISION */
+ YYSYMBOL_PACKED = 378, /* PACKED */
+ YYSYMBOL_RESOURCE = 379, /* RESOURCE */
+ YYSYMBOL_SUPERP = 380, /* SUPERP */
+ YYSYMBOL_FLOATCONSTANT = 381, /* FLOATCONSTANT */
+ YYSYMBOL_INTCONSTANT = 382, /* INTCONSTANT */
+ YYSYMBOL_UINTCONSTANT = 383, /* UINTCONSTANT */
+ YYSYMBOL_BOOLCONSTANT = 384, /* BOOLCONSTANT */
+ YYSYMBOL_IDENTIFIER = 385, /* IDENTIFIER */
+ YYSYMBOL_TYPE_NAME = 386, /* TYPE_NAME */
+ YYSYMBOL_CENTROID = 387, /* CENTROID */
+ YYSYMBOL_IN = 388, /* IN */
+ YYSYMBOL_OUT = 389, /* OUT */
+ YYSYMBOL_INOUT = 390, /* INOUT */
+ YYSYMBOL_STRUCT = 391, /* STRUCT */
+ YYSYMBOL_VOID = 392, /* VOID */
+ YYSYMBOL_WHILE = 393, /* WHILE */
+ YYSYMBOL_BREAK = 394, /* BREAK */
+ YYSYMBOL_CONTINUE = 395, /* CONTINUE */
+ YYSYMBOL_DO = 396, /* DO */
+ YYSYMBOL_ELSE = 397, /* ELSE */
+ YYSYMBOL_FOR = 398, /* FOR */
+ YYSYMBOL_IF = 399, /* IF */
+ YYSYMBOL_DISCARD = 400, /* DISCARD */
+ YYSYMBOL_RETURN = 401, /* RETURN */
+ YYSYMBOL_SWITCH = 402, /* SWITCH */
+ YYSYMBOL_CASE = 403, /* CASE */
+ YYSYMBOL_DEFAULT = 404, /* DEFAULT */
+ YYSYMBOL_TERMINATE_INVOCATION = 405, /* TERMINATE_INVOCATION */
+ YYSYMBOL_TERMINATE_RAY = 406, /* TERMINATE_RAY */
+ YYSYMBOL_IGNORE_INTERSECTION = 407, /* IGNORE_INTERSECTION */
+ YYSYMBOL_UNIFORM = 408, /* UNIFORM */
+ YYSYMBOL_SHARED = 409, /* SHARED */
+ YYSYMBOL_BUFFER = 410, /* BUFFER */
+ YYSYMBOL_FLAT = 411, /* FLAT */
+ YYSYMBOL_SMOOTH = 412, /* SMOOTH */
+ YYSYMBOL_LAYOUT = 413, /* LAYOUT */
+ YYSYMBOL_DOUBLECONSTANT = 414, /* DOUBLECONSTANT */
+ YYSYMBOL_INT16CONSTANT = 415, /* INT16CONSTANT */
+ YYSYMBOL_UINT16CONSTANT = 416, /* UINT16CONSTANT */
+ YYSYMBOL_FLOAT16CONSTANT = 417, /* FLOAT16CONSTANT */
+ YYSYMBOL_INT32CONSTANT = 418, /* INT32CONSTANT */
+ YYSYMBOL_UINT32CONSTANT = 419, /* UINT32CONSTANT */
+ YYSYMBOL_INT64CONSTANT = 420, /* INT64CONSTANT */
+ YYSYMBOL_UINT64CONSTANT = 421, /* UINT64CONSTANT */
+ YYSYMBOL_SUBROUTINE = 422, /* SUBROUTINE */
+ YYSYMBOL_DEMOTE = 423, /* DEMOTE */
+ YYSYMBOL_PAYLOADNV = 424, /* PAYLOADNV */
+ YYSYMBOL_PAYLOADINNV = 425, /* PAYLOADINNV */
+ YYSYMBOL_HITATTRNV = 426, /* HITATTRNV */
+ YYSYMBOL_CALLDATANV = 427, /* CALLDATANV */
+ YYSYMBOL_CALLDATAINNV = 428, /* CALLDATAINNV */
+ YYSYMBOL_PAYLOADEXT = 429, /* PAYLOADEXT */
+ YYSYMBOL_PAYLOADINEXT = 430, /* PAYLOADINEXT */
+ YYSYMBOL_HITATTREXT = 431, /* HITATTREXT */
+ YYSYMBOL_CALLDATAEXT = 432, /* CALLDATAEXT */
+ YYSYMBOL_CALLDATAINEXT = 433, /* CALLDATAINEXT */
+ YYSYMBOL_PATCH = 434, /* PATCH */
+ YYSYMBOL_SAMPLE = 435, /* SAMPLE */
+ YYSYMBOL_NONUNIFORM = 436, /* NONUNIFORM */
+ YYSYMBOL_COHERENT = 437, /* COHERENT */
+ YYSYMBOL_VOLATILE = 438, /* VOLATILE */
+ YYSYMBOL_RESTRICT = 439, /* RESTRICT */
+ YYSYMBOL_READONLY = 440, /* READONLY */
+ YYSYMBOL_WRITEONLY = 441, /* WRITEONLY */
+ YYSYMBOL_DEVICECOHERENT = 442, /* DEVICECOHERENT */
+ YYSYMBOL_QUEUEFAMILYCOHERENT = 443, /* QUEUEFAMILYCOHERENT */
+ YYSYMBOL_WORKGROUPCOHERENT = 444, /* WORKGROUPCOHERENT */
+ YYSYMBOL_SUBGROUPCOHERENT = 445, /* SUBGROUPCOHERENT */
+ YYSYMBOL_NONPRIVATE = 446, /* NONPRIVATE */
+ YYSYMBOL_SHADERCALLCOHERENT = 447, /* SHADERCALLCOHERENT */
+ YYSYMBOL_NOPERSPECTIVE = 448, /* NOPERSPECTIVE */
+ YYSYMBOL_EXPLICITINTERPAMD = 449, /* EXPLICITINTERPAMD */
+ YYSYMBOL_PERVERTEXNV = 450, /* PERVERTEXNV */
+ YYSYMBOL_PERPRIMITIVENV = 451, /* PERPRIMITIVENV */
+ YYSYMBOL_PERVIEWNV = 452, /* PERVIEWNV */
+ YYSYMBOL_PERTASKNV = 453, /* PERTASKNV */
+ YYSYMBOL_PRECISE = 454, /* PRECISE */
+ YYSYMBOL_YYACCEPT = 455, /* $accept */
+ YYSYMBOL_variable_identifier = 456, /* variable_identifier */
+ YYSYMBOL_primary_expression = 457, /* primary_expression */
+ YYSYMBOL_postfix_expression = 458, /* postfix_expression */
+ YYSYMBOL_integer_expression = 459, /* integer_expression */
+ YYSYMBOL_function_call = 460, /* function_call */
+ YYSYMBOL_function_call_or_method = 461, /* function_call_or_method */
+ YYSYMBOL_function_call_generic = 462, /* function_call_generic */
+ YYSYMBOL_function_call_header_no_parameters = 463, /* function_call_header_no_parameters */
+ YYSYMBOL_function_call_header_with_parameters = 464, /* function_call_header_with_parameters */
+ YYSYMBOL_function_call_header = 465, /* function_call_header */
+ YYSYMBOL_function_identifier = 466, /* function_identifier */
+ YYSYMBOL_unary_expression = 467, /* unary_expression */
+ YYSYMBOL_unary_operator = 468, /* unary_operator */
+ YYSYMBOL_multiplicative_expression = 469, /* multiplicative_expression */
+ YYSYMBOL_additive_expression = 470, /* additive_expression */
+ YYSYMBOL_shift_expression = 471, /* shift_expression */
+ YYSYMBOL_relational_expression = 472, /* relational_expression */
+ YYSYMBOL_equality_expression = 473, /* equality_expression */
+ YYSYMBOL_and_expression = 474, /* and_expression */
+ YYSYMBOL_exclusive_or_expression = 475, /* exclusive_or_expression */
+ YYSYMBOL_inclusive_or_expression = 476, /* inclusive_or_expression */
+ YYSYMBOL_logical_and_expression = 477, /* logical_and_expression */
+ YYSYMBOL_logical_xor_expression = 478, /* logical_xor_expression */
+ YYSYMBOL_logical_or_expression = 479, /* logical_or_expression */
+ YYSYMBOL_conditional_expression = 480, /* conditional_expression */
+ YYSYMBOL_481_1 = 481, /* $@1 */
+ YYSYMBOL_assignment_expression = 482, /* assignment_expression */
+ YYSYMBOL_assignment_operator = 483, /* assignment_operator */
+ YYSYMBOL_expression = 484, /* expression */
+ YYSYMBOL_constant_expression = 485, /* constant_expression */
+ YYSYMBOL_declaration = 486, /* declaration */
+ YYSYMBOL_block_structure = 487, /* block_structure */
+ YYSYMBOL_488_2 = 488, /* $@2 */
+ YYSYMBOL_identifier_list = 489, /* identifier_list */
+ YYSYMBOL_function_prototype = 490, /* function_prototype */
+ YYSYMBOL_function_declarator = 491, /* function_declarator */
+ YYSYMBOL_function_header_with_parameters = 492, /* function_header_with_parameters */
+ YYSYMBOL_function_header = 493, /* function_header */
+ YYSYMBOL_parameter_declarator = 494, /* parameter_declarator */
+ YYSYMBOL_parameter_declaration = 495, /* parameter_declaration */
+ YYSYMBOL_parameter_type_specifier = 496, /* parameter_type_specifier */
+ YYSYMBOL_init_declarator_list = 497, /* init_declarator_list */
+ YYSYMBOL_single_declaration = 498, /* single_declaration */
+ YYSYMBOL_fully_specified_type = 499, /* fully_specified_type */
+ YYSYMBOL_invariant_qualifier = 500, /* invariant_qualifier */
+ YYSYMBOL_interpolation_qualifier = 501, /* interpolation_qualifier */
+ YYSYMBOL_layout_qualifier = 502, /* layout_qualifier */
+ YYSYMBOL_layout_qualifier_id_list = 503, /* layout_qualifier_id_list */
+ YYSYMBOL_layout_qualifier_id = 504, /* layout_qualifier_id */
+ YYSYMBOL_precise_qualifier = 505, /* precise_qualifier */
+ YYSYMBOL_type_qualifier = 506, /* type_qualifier */
+ YYSYMBOL_single_type_qualifier = 507, /* single_type_qualifier */
+ YYSYMBOL_storage_qualifier = 508, /* storage_qualifier */
+ YYSYMBOL_non_uniform_qualifier = 509, /* non_uniform_qualifier */
+ YYSYMBOL_type_name_list = 510, /* type_name_list */
+ YYSYMBOL_type_specifier = 511, /* type_specifier */
+ YYSYMBOL_array_specifier = 512, /* array_specifier */
+ YYSYMBOL_type_parameter_specifier_opt = 513, /* type_parameter_specifier_opt */
+ YYSYMBOL_type_parameter_specifier = 514, /* type_parameter_specifier */
+ YYSYMBOL_type_parameter_specifier_list = 515, /* type_parameter_specifier_list */
+ YYSYMBOL_type_specifier_nonarray = 516, /* type_specifier_nonarray */
+ YYSYMBOL_precision_qualifier = 517, /* precision_qualifier */
+ YYSYMBOL_struct_specifier = 518, /* struct_specifier */
+ YYSYMBOL_519_3 = 519, /* $@3 */
+ YYSYMBOL_520_4 = 520, /* $@4 */
+ YYSYMBOL_struct_declaration_list = 521, /* struct_declaration_list */
+ YYSYMBOL_struct_declaration = 522, /* struct_declaration */
+ YYSYMBOL_struct_declarator_list = 523, /* struct_declarator_list */
+ YYSYMBOL_struct_declarator = 524, /* struct_declarator */
+ YYSYMBOL_initializer = 525, /* initializer */
+ YYSYMBOL_initializer_list = 526, /* initializer_list */
+ YYSYMBOL_declaration_statement = 527, /* declaration_statement */
+ YYSYMBOL_statement = 528, /* statement */
+ YYSYMBOL_simple_statement = 529, /* simple_statement */
+ YYSYMBOL_demote_statement = 530, /* demote_statement */
+ YYSYMBOL_compound_statement = 531, /* compound_statement */
+ YYSYMBOL_532_5 = 532, /* $@5 */
+ YYSYMBOL_533_6 = 533, /* $@6 */
+ YYSYMBOL_statement_no_new_scope = 534, /* statement_no_new_scope */
+ YYSYMBOL_statement_scoped = 535, /* statement_scoped */
+ YYSYMBOL_536_7 = 536, /* $@7 */
+ YYSYMBOL_537_8 = 537, /* $@8 */
+ YYSYMBOL_compound_statement_no_new_scope = 538, /* compound_statement_no_new_scope */
+ YYSYMBOL_statement_list = 539, /* statement_list */
+ YYSYMBOL_expression_statement = 540, /* expression_statement */
+ YYSYMBOL_selection_statement = 541, /* selection_statement */
+ YYSYMBOL_selection_statement_nonattributed = 542, /* selection_statement_nonattributed */
+ YYSYMBOL_selection_rest_statement = 543, /* selection_rest_statement */
+ YYSYMBOL_condition = 544, /* condition */
+ YYSYMBOL_switch_statement = 545, /* switch_statement */
+ YYSYMBOL_switch_statement_nonattributed = 546, /* switch_statement_nonattributed */
+ YYSYMBOL_547_9 = 547, /* $@9 */
+ YYSYMBOL_switch_statement_list = 548, /* switch_statement_list */
+ YYSYMBOL_case_label = 549, /* case_label */
+ YYSYMBOL_iteration_statement = 550, /* iteration_statement */
+ YYSYMBOL_iteration_statement_nonattributed = 551, /* iteration_statement_nonattributed */
+ YYSYMBOL_552_10 = 552, /* $@10 */
+ YYSYMBOL_553_11 = 553, /* $@11 */
+ YYSYMBOL_554_12 = 554, /* $@12 */
+ YYSYMBOL_for_init_statement = 555, /* for_init_statement */
+ YYSYMBOL_conditionopt = 556, /* conditionopt */
+ YYSYMBOL_for_rest_statement = 557, /* for_rest_statement */
+ YYSYMBOL_jump_statement = 558, /* jump_statement */
+ YYSYMBOL_translation_unit = 559, /* translation_unit */
+ YYSYMBOL_external_declaration = 560, /* external_declaration */
+ YYSYMBOL_function_definition = 561, /* function_definition */
+ YYSYMBOL_562_13 = 562, /* $@13 */
+ YYSYMBOL_attribute = 563, /* attribute */
+ YYSYMBOL_attribute_list = 564, /* attribute_list */
+ YYSYMBOL_single_attribute = 565, /* single_attribute */
+ YYSYMBOL_spirv_requirements_list = 566, /* spirv_requirements_list */
+ YYSYMBOL_spirv_requirements_parameter = 567, /* spirv_requirements_parameter */
+ YYSYMBOL_spirv_extension_list = 568, /* spirv_extension_list */
+ YYSYMBOL_spirv_capability_list = 569, /* spirv_capability_list */
+ YYSYMBOL_spirv_execution_mode_qualifier = 570, /* spirv_execution_mode_qualifier */
+ YYSYMBOL_spirv_execution_mode_parameter_list = 571, /* spirv_execution_mode_parameter_list */
+ YYSYMBOL_spirv_execution_mode_parameter = 572, /* spirv_execution_mode_parameter */
+ YYSYMBOL_spirv_execution_mode_id_parameter_list = 573, /* spirv_execution_mode_id_parameter_list */
+ YYSYMBOL_spirv_storage_class_qualifier = 574, /* spirv_storage_class_qualifier */
+ YYSYMBOL_spirv_decorate_qualifier = 575, /* spirv_decorate_qualifier */
+ YYSYMBOL_spirv_decorate_parameter_list = 576, /* spirv_decorate_parameter_list */
+ YYSYMBOL_spirv_decorate_parameter = 577, /* spirv_decorate_parameter */
+ YYSYMBOL_spirv_decorate_id_parameter_list = 578, /* spirv_decorate_id_parameter_list */
+ YYSYMBOL_spirv_decorate_string_parameter_list = 579, /* spirv_decorate_string_parameter_list */
+ YYSYMBOL_spirv_type_specifier = 580, /* spirv_type_specifier */
+ YYSYMBOL_spirv_type_parameter_list = 581, /* spirv_type_parameter_list */
+ YYSYMBOL_spirv_type_parameter = 582, /* spirv_type_parameter */
+ YYSYMBOL_spirv_instruction_qualifier = 583, /* spirv_instruction_qualifier */
+ YYSYMBOL_spirv_instruction_qualifier_list = 584, /* spirv_instruction_qualifier_list */
+ YYSYMBOL_spirv_instruction_qualifier_id = 585 /* spirv_instruction_qualifier_id */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;
/* Second part of user prologue. */
-#line 133 "MachineIndependent/glslang.y"
+#line 136 "MachineIndependent/glslang.y"
/* windows only pragma */
@@ -698,7 +728,7 @@ typedef enum yysymbol_kind_t yysymbol_kind_t;
extern int yylex(YYSTYPE*, TParseContext&);
-#line 702 "MachineIndependent/glslang_tab.cpp"
+#line 732 "MachineIndependent/glslang_tab.cpp"
#ifdef short
@@ -1002,21 +1032,21 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 416
+#define YYFINAL 442
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 10112
+#define YYLAST 12453
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 445
+#define YYNTOKENS 455
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 111
+#define YYNNTS 131
/* YYNRULES -- Number of rules. */
-#define YYNRULES 616
+#define YYNRULES 684
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 764
+#define YYNSTATES 930
/* YYMAXUTOK -- Last valid token kind. */
-#define YYMAXUTOK 699
+#define YYMAXUTOK 709
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
@@ -1099,75 +1129,83 @@ static const yytype_int16 yytranslate[] =
405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
- 435, 436, 437, 438, 439, 440, 441, 442, 443, 444
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_int16 yyrline[] =
{
- 0, 371, 371, 377, 380, 385, 388, 391, 395, 399,
- 402, 406, 410, 414, 418, 422, 426, 432, 440, 443,
- 446, 449, 452, 457, 465, 472, 479, 485, 489, 496,
- 499, 505, 512, 522, 530, 535, 563, 572, 578, 582,
- 586, 606, 607, 608, 609, 615, 616, 621, 626, 635,
- 636, 641, 649, 650, 656, 665, 666, 671, 676, 681,
- 689, 690, 699, 711, 712, 721, 722, 731, 732, 741,
- 742, 750, 751, 759, 760, 768, 769, 769, 787, 788,
- 804, 808, 812, 816, 821, 825, 829, 833, 837, 841,
- 845, 852, 855, 866, 873, 878, 883, 890, 894, 898,
- 902, 907, 912, 921, 921, 932, 936, 943, 950, 953,
- 960, 968, 988, 1011, 1026, 1051, 1062, 1072, 1082, 1092,
- 1101, 1104, 1108, 1112, 1117, 1125, 1132, 1137, 1142, 1147,
- 1156, 1166, 1193, 1202, 1209, 1217, 1224, 1231, 1239, 1249,
- 1256, 1267, 1273, 1276, 1283, 1287, 1291, 1300, 1310, 1313,
- 1324, 1327, 1330, 1334, 1338, 1343, 1347, 1354, 1358, 1363,
- 1369, 1375, 1382, 1387, 1395, 1401, 1413, 1427, 1433, 1438,
- 1446, 1454, 1462, 1470, 1478, 1486, 1494, 1502, 1509, 1516,
- 1520, 1525, 1530, 1535, 1540, 1545, 1550, 1554, 1558, 1562,
- 1566, 1572, 1583, 1590, 1593, 1602, 1607, 1617, 1622, 1630,
- 1634, 1644, 1647, 1653, 1659, 1666, 1676, 1680, 1684, 1688,
- 1693, 1697, 1702, 1707, 1712, 1717, 1722, 1727, 1732, 1737,
- 1742, 1748, 1754, 1760, 1765, 1770, 1775, 1780, 1785, 1790,
- 1795, 1800, 1805, 1810, 1815, 1821, 1828, 1833, 1838, 1843,
- 1848, 1853, 1858, 1863, 1868, 1873, 1878, 1883, 1891, 1899,
- 1907, 1913, 1919, 1925, 1931, 1937, 1943, 1949, 1955, 1961,
- 1967, 1973, 1979, 1985, 1991, 1997, 2003, 2009, 2015, 2021,
- 2027, 2033, 2039, 2045, 2051, 2057, 2063, 2069, 2075, 2081,
- 2087, 2093, 2099, 2105, 2113, 2121, 2129, 2137, 2145, 2153,
- 2161, 2169, 2177, 2185, 2193, 2201, 2207, 2213, 2219, 2225,
- 2231, 2237, 2243, 2249, 2255, 2261, 2267, 2273, 2279, 2285,
- 2291, 2297, 2303, 2309, 2315, 2321, 2327, 2333, 2339, 2345,
- 2351, 2357, 2363, 2369, 2375, 2381, 2387, 2393, 2399, 2405,
- 2411, 2417, 2421, 2425, 2429, 2434, 2440, 2445, 2450, 2455,
- 2460, 2465, 2470, 2476, 2481, 2486, 2491, 2496, 2501, 2507,
- 2513, 2519, 2525, 2531, 2537, 2543, 2549, 2555, 2561, 2567,
- 2573, 2579, 2585, 2590, 2595, 2600, 2605, 2610, 2615, 2621,
- 2626, 2631, 2636, 2641, 2646, 2651, 2656, 2662, 2667, 2672,
- 2677, 2682, 2687, 2692, 2697, 2702, 2707, 2712, 2717, 2722,
- 2727, 2732, 2738, 2743, 2748, 2754, 2760, 2765, 2770, 2775,
- 2781, 2786, 2791, 2796, 2802, 2807, 2812, 2817, 2823, 2828,
- 2833, 2838, 2844, 2850, 2856, 2862, 2867, 2873, 2879, 2885,
- 2890, 2895, 2900, 2905, 2910, 2916, 2921, 2926, 2931, 2937,
- 2942, 2947, 2952, 2958, 2963, 2968, 2973, 2979, 2984, 2989,
- 2994, 3000, 3005, 3010, 3015, 3021, 3026, 3031, 3036, 3042,
- 3047, 3052, 3057, 3063, 3068, 3073, 3078, 3084, 3089, 3094,
- 3099, 3105, 3110, 3115, 3120, 3126, 3131, 3136, 3141, 3147,
- 3152, 3157, 3162, 3168, 3173, 3178, 3183, 3189, 3194, 3199,
- 3204, 3210, 3215, 3220, 3225, 3230, 3235, 3240, 3245, 3250,
- 3255, 3260, 3265, 3270, 3275, 3280, 3285, 3290, 3295, 3300,
- 3305, 3310, 3315, 3320, 3325, 3330, 3336, 3342, 3348, 3354,
- 3361, 3368, 3374, 3380, 3386, 3392, 3398, 3404, 3411, 3416,
- 3432, 3437, 3442, 3450, 3450, 3461, 3461, 3471, 3474, 3487,
- 3509, 3536, 3540, 3546, 3551, 3562, 3566, 3572, 3583, 3586,
- 3593, 3597, 3598, 3604, 3605, 3606, 3607, 3608, 3609, 3610,
- 3612, 3618, 3627, 3628, 3632, 3628, 3644, 3645, 3649, 3649,
- 3656, 3656, 3670, 3673, 3681, 3689, 3700, 3701, 3705, 3709,
- 3716, 3723, 3727, 3735, 3739, 3752, 3756, 3763, 3763, 3783,
- 3786, 3792, 3804, 3816, 3820, 3827, 3827, 3842, 3842, 3858,
- 3858, 3879, 3882, 3888, 3891, 3897, 3901, 3908, 3913, 3918,
- 3925, 3928, 3932, 3937, 3941, 3951, 3955, 3964, 3967, 3971,
- 3980, 3980, 4022, 4028, 4031, 4036, 4039
+ 0, 392, 392, 398, 401, 406, 409, 412, 416, 420,
+ 423, 427, 431, 435, 439, 443, 447, 453, 461, 464,
+ 467, 470, 473, 478, 486, 493, 500, 506, 510, 517,
+ 520, 526, 533, 543, 551, 556, 584, 593, 599, 603,
+ 607, 627, 628, 629, 630, 636, 637, 642, 647, 656,
+ 657, 662, 670, 671, 677, 686, 687, 692, 697, 702,
+ 710, 711, 720, 732, 733, 742, 743, 752, 753, 762,
+ 763, 771, 772, 780, 781, 789, 790, 790, 808, 809,
+ 825, 829, 833, 837, 842, 846, 850, 854, 858, 862,
+ 866, 873, 876, 887, 894, 900, 907, 913, 918, 925,
+ 929, 933, 937, 942, 947, 956, 956, 967, 971, 978,
+ 982, 988, 994, 1004, 1007, 1014, 1022, 1042, 1065, 1080,
+ 1105, 1116, 1126, 1136, 1146, 1155, 1158, 1162, 1166, 1171,
+ 1179, 1186, 1191, 1196, 1201, 1210, 1220, 1247, 1256, 1263,
+ 1271, 1278, 1285, 1293, 1303, 1310, 1321, 1327, 1330, 1337,
+ 1341, 1345, 1354, 1364, 1367, 1378, 1381, 1384, 1388, 1392,
+ 1397, 1401, 1404, 1409, 1413, 1418, 1427, 1431, 1436, 1442,
+ 1448, 1455, 1460, 1468, 1474, 1486, 1500, 1506, 1511, 1519,
+ 1527, 1535, 1543, 1551, 1559, 1567, 1575, 1582, 1589, 1593,
+ 1598, 1603, 1608, 1613, 1618, 1623, 1627, 1631, 1635, 1639,
+ 1645, 1656, 1663, 1666, 1675, 1680, 1690, 1695, 1703, 1707,
+ 1717, 1720, 1726, 1732, 1739, 1749, 1753, 1757, 1761, 1766,
+ 1770, 1775, 1780, 1785, 1790, 1795, 1800, 1805, 1810, 1815,
+ 1821, 1827, 1833, 1838, 1843, 1848, 1853, 1858, 1863, 1868,
+ 1873, 1878, 1883, 1888, 1894, 1901, 1906, 1911, 1916, 1921,
+ 1926, 1931, 1936, 1941, 1946, 1951, 1956, 1964, 1972, 1980,
+ 1986, 1992, 1998, 2004, 2010, 2016, 2022, 2028, 2034, 2040,
+ 2046, 2052, 2058, 2064, 2070, 2076, 2082, 2088, 2094, 2100,
+ 2106, 2112, 2118, 2124, 2130, 2136, 2142, 2148, 2154, 2160,
+ 2166, 2172, 2178, 2186, 2194, 2202, 2210, 2218, 2226, 2234,
+ 2242, 2250, 2258, 2266, 2274, 2280, 2286, 2292, 2298, 2304,
+ 2310, 2316, 2322, 2328, 2334, 2340, 2346, 2352, 2358, 2364,
+ 2370, 2376, 2382, 2388, 2394, 2400, 2406, 2412, 2418, 2424,
+ 2430, 2436, 2442, 2448, 2454, 2460, 2466, 2472, 2478, 2484,
+ 2490, 2494, 2498, 2502, 2507, 2513, 2518, 2523, 2528, 2533,
+ 2538, 2543, 2549, 2554, 2559, 2564, 2569, 2574, 2580, 2586,
+ 2592, 2598, 2604, 2610, 2616, 2622, 2628, 2634, 2640, 2646,
+ 2652, 2658, 2663, 2668, 2673, 2678, 2683, 2688, 2694, 2699,
+ 2704, 2709, 2714, 2719, 2724, 2729, 2735, 2740, 2745, 2750,
+ 2755, 2760, 2765, 2770, 2775, 2780, 2785, 2790, 2795, 2800,
+ 2805, 2811, 2816, 2821, 2827, 2833, 2838, 2843, 2848, 2854,
+ 2859, 2864, 2869, 2875, 2880, 2885, 2890, 2896, 2901, 2906,
+ 2911, 2917, 2923, 2929, 2935, 2940, 2946, 2952, 2958, 2963,
+ 2968, 2973, 2978, 2983, 2989, 2994, 2999, 3004, 3010, 3015,
+ 3020, 3025, 3031, 3036, 3041, 3046, 3052, 3057, 3062, 3067,
+ 3073, 3078, 3083, 3088, 3094, 3099, 3104, 3109, 3115, 3120,
+ 3125, 3130, 3136, 3141, 3146, 3151, 3157, 3162, 3167, 3172,
+ 3178, 3183, 3188, 3193, 3199, 3204, 3209, 3214, 3220, 3225,
+ 3230, 3235, 3241, 3246, 3251, 3256, 3262, 3267, 3272, 3277,
+ 3283, 3288, 3293, 3298, 3303, 3308, 3313, 3318, 3323, 3328,
+ 3333, 3338, 3343, 3348, 3353, 3358, 3363, 3368, 3373, 3378,
+ 3383, 3388, 3393, 3398, 3403, 3409, 3415, 3421, 3427, 3434,
+ 3441, 3447, 3453, 3459, 3465, 3471, 3477, 3483, 3488, 3493,
+ 3509, 3514, 3519, 3527, 3527, 3538, 3538, 3548, 3551, 3564,
+ 3586, 3613, 3617, 3623, 3628, 3639, 3643, 3649, 3655, 3666,
+ 3669, 3676, 3680, 3681, 3687, 3688, 3689, 3690, 3691, 3692,
+ 3693, 3695, 3701, 3710, 3711, 3715, 3711, 3727, 3728, 3732,
+ 3732, 3739, 3739, 3753, 3756, 3764, 3772, 3783, 3784, 3788,
+ 3792, 3800, 3807, 3811, 3819, 3823, 3836, 3840, 3848, 3848,
+ 3868, 3871, 3877, 3889, 3901, 3905, 3913, 3913, 3928, 3928,
+ 3944, 3944, 3965, 3968, 3974, 3977, 3983, 3987, 3994, 3999,
+ 4004, 4011, 4014, 4018, 4023, 4027, 4037, 4041, 4050, 4053,
+ 4057, 4066, 4066, 4108, 4113, 4116, 4121, 4124, 4131, 4134,
+ 4139, 4142, 4147, 4150, 4155, 4158, 4163, 4167, 4172, 4176,
+ 4181, 4185, 4192, 4195, 4200, 4203, 4206, 4209, 4212, 4217,
+ 4226, 4237, 4242, 4250, 4254, 4259, 4263, 4268, 4272, 4277,
+ 4281, 4288, 4291, 4296, 4299, 4302, 4305, 4310, 4318, 4328,
+ 4332, 4337, 4341, 4346, 4350, 4357, 4360, 4365, 4368, 4373,
+ 4376, 4382, 4385, 4390, 4393
};
#endif
@@ -1254,17 +1292,20 @@ static const char *const yytname[] =
"F16TEXTURECUBEARRAY", "F16TEXTUREBUFFER", "F16TEXTURE2DMS",
"F16TEXTURE2DMSARRAY", "SUBPASSINPUT", "SUBPASSINPUTMS", "ISUBPASSINPUT",
"ISUBPASSINPUTMS", "USUBPASSINPUT", "USUBPASSINPUTMS", "F16SUBPASSINPUT",
- "F16SUBPASSINPUTMS", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP",
- "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN",
- "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN",
- "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "STRING_LITERAL",
- "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET", "RIGHT_BRACKET",
- "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON", "EQUAL",
- "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH", "PERCENT",
- "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", "AMPERSAND",
- "QUESTION", "INVARIANT", "HIGH_PRECISION", "MEDIUM_PRECISION",
- "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", "SUPERP",
- "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT",
+ "F16SUBPASSINPUTMS", "SPIRV_INSTRUCTION", "SPIRV_EXECUTION_MODE",
+ "SPIRV_EXECUTION_MODE_ID", "SPIRV_DECORATE", "SPIRV_DECORATE_ID",
+ "SPIRV_DECORATE_STRING", "SPIRV_TYPE", "SPIRV_STORAGE_CLASS",
+ "SPIRV_BY_REFERENCE", "SPIRV_LITERAL", "LEFT_OP", "RIGHT_OP", "INC_OP",
+ "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP",
+ "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN",
+ "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN",
+ "SUB_ASSIGN", "STRING_LITERAL", "LEFT_PAREN", "RIGHT_PAREN",
+ "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT",
+ "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS",
+ "STAR", "SLASH", "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR",
+ "CARET", "AMPERSAND", "QUESTION", "INVARIANT", "HIGH_PRECISION",
+ "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE",
+ "SUPERP", "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT",
"IDENTIFIER", "TYPE_NAME", "CENTROID", "IN", "OUT", "INOUT", "STRUCT",
"VOID", "WHILE", "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF",
"DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT", "TERMINATE_INVOCATION",
@@ -1317,7 +1358,18 @@ static const char *const yytname[] =
"for_init_statement", "conditionopt", "for_rest_statement",
"jump_statement", "translation_unit", "external_declaration",
"function_definition", "$@13", "attribute", "attribute_list",
- "single_attribute", YY_NULLPTR
+ "single_attribute", "spirv_requirements_list",
+ "spirv_requirements_parameter", "spirv_extension_list",
+ "spirv_capability_list", "spirv_execution_mode_qualifier",
+ "spirv_execution_mode_parameter_list", "spirv_execution_mode_parameter",
+ "spirv_execution_mode_id_parameter_list",
+ "spirv_storage_class_qualifier", "spirv_decorate_qualifier",
+ "spirv_decorate_parameter_list", "spirv_decorate_parameter",
+ "spirv_decorate_id_parameter_list",
+ "spirv_decorate_string_parameter_list", "spirv_type_specifier",
+ "spirv_type_parameter_list", "spirv_type_parameter",
+ "spirv_instruction_qualifier", "spirv_instruction_qualifier_list",
+ "spirv_instruction_qualifier_id", YY_NULLPTR
};
static const char *
@@ -1376,16 +1428,17 @@ static const yytype_int16 yytoknum[] =
665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
- 695, 696, 697, 698, 699
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709
};
#endif
-#define YYPACT_NINF (-732)
+#define YYPACT_NINF (-863)
#define yypact_value_is_default(Yyn) \
((Yyn) == YYPACT_NINF)
-#define YYTABLE_NINF (-559)
+#define YYTABLE_NINF (-570)
#define yytable_value_is_error(Yyn) \
0
@@ -1394,83 +1447,99 @@ static const yytype_int16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 4303, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- 109, -732, -732, -732, -732, -732, 1, -732, -732, -732,
- -732, -732, -732, -324, -261, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, 11, 44, 22,
- 7, 6513, -332, -732, -10, -732, -732, -732, -732, 4745,
- -732, -732, -732, -732, 46, -732, -732, 767, -732, -732,
- 16, -732, 69, -5, 47, -732, -338, -732, 91, -732,
- 6513, -732, -732, -732, 6513, 72, 80, -732, 13, -732,
- 74, -732, -732, 9069, 126, -732, -732, -732, 127, 6513,
- -732, 144, -732, 17, -732, -732, 61, 7377, -732, 10,
- 1209, -732, -732, -732, -732, 126, 25, -732, 7800, 26,
- -732, 119, -732, 78, 9069, 9069, -732, 9069, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, 36, -732, -732,
- -732, 164, 65, 9492, 171, -732, 9069, -732, -732, -340,
- 173, -732, 6513, 140, 5187, -732, 6513, 9069, -732, -5,
- -732, 141, -732, -732, 124, 130, 179, 27, 117, 156,
- 158, 160, 195, 194, 20, 181, 8223, -732, 183, 182,
- -732, -732, 186, 178, 180, -732, 189, 192, 184, 8646,
- 193, 9069, 187, 188, 190, 196, 197, 129, -732, -732,
- 89, -732, 44, 199, 204, -732, -732, -732, -732, -732,
- 1651, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -376, 173, 7800, 54, 7800, -732, -732, 7800, 6513, -732,
- 161, -732, -732, -732, 70, -732, -732, 9069, 169, -732,
- -732, 9069, 207, -732, -732, -732, 9069, -732, 140, 126,
- 103, -732, -732, -732, 5629, -732, -732, -732, -732, 9069,
- 9069, 9069, 9069, 9069, 9069, 9069, 9069, 9069, 9069, 9069,
- 9069, 9069, 9069, 9069, 9069, 9069, 9069, 9069, -732, -732,
- -732, 209, 177, -732, 2093, -732, -732, -732, 2093, -732,
- 9069, -732, -732, 122, 9069, 152, -732, -732, -732, -732,
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, 9069, 9069, -732, -732, -732, -732, -732, -732,
- -732, 7800, -732, 143, -732, 6071, -732, -732, 211, 208,
- -732, -732, -732, 123, 173, 140, -732, -732, -732, -732,
- -732, 124, 124, 130, 130, 179, 179, 179, 179, 27,
- 27, 117, 156, 158, 160, 195, 194, 9069, -732, 216,
- 87, -732, 2093, 3861, 174, 3419, 75, -732, 85, -732,
- -732, -732, -732, -732, 6954, -732, -732, -732, -732, 154,
- 9069, 217, 177, 191, 208, 185, 6513, 221, 223, -732,
- -732, 3861, 220, -732, -732, -732, 9069, 224, -732, -732,
- -732, 218, 2535, 9069, -732, 219, 225, 198, 226, 2977,
- -732, 227, -732, -732, 7800, -732, -732, -732, 86, 9069,
- 2535, 220, -732, -732, 2093, -732, 222, 208, -732, -732,
- 2093, 228, -732, -732
+ 4549, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -260, -182, -177, -163, -130,
+ -115, -100, -89, -863, -863, -196, -863, -863, -863, -863,
+ -863, -324, -863, -863, -863, -863, -863, -306, -863, -863,
+ -863, -863, -863, -863, -77, -66, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -332, -175,
+ -153, -161, 7713, -266, -863, -71, -863, -863, -863, -863,
+ 5453, -863, -863, -863, -863, -116, -863, -863, 933, -863,
+ -863, 7713, -35, -863, -863, -863, 5905, -54, -139, -138,
+ -137, -128, -124, -54, -123, -51, 12061, -863, -15, -347,
+ -44, -863, -295, -863, -9, -6, 7713, -863, -863, -863,
+ 7713, -39, -38, -863, -303, -863, -226, -863, -863, 10762,
+ -3, -863, -863, -863, 1, -32, 7713, -863, -5, -8,
+ -1, -863, -230, -863, -219, -2, 3, 4, 5, -215,
+ 6, 8, 10, 11, 12, 15, -214, 13, 16, 21,
+ -134, -863, 17, 7713, -863, 19, -863, -212, -863, -863,
+ -211, 9030, -863, -273, 1385, -863, -863, -863, -863, -863,
+ -3, -263, -863, 9463, -236, -863, -28, -863, -106, 10762,
+ 10762, -863, 10762, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -264, -863, -863, -863, 23, -203, 11195, 25,
+ -863, 10762, -863, -863, -311, 24, -6, 29, -863, -309,
+ -54, -863, -20, -863, -323, 28, -118, 10762, -112, -863,
+ -155, -111, 10762, -103, 35, -98, -54, -863, 11628, -863,
+ -94, 10762, 32, -51, -863, 7713, 18, 6357, -863, 7713,
+ 10762, -863, -347, -863, 33, -863, -863, -72, -254, -86,
+ -297, -68, -13, 26, 20, 50, 49, -300, 42, 9896,
+ -863, 43, -863, -863, 55, 58, 60, -863, 65, 71,
+ 62, 10329, 73, 10762, 66, 69, 70, 72, 74, -241,
+ -863, -863, -41, -863, -175, 83, 85, -863, -863, -863,
+ -863, -863, 1837, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, 5001, 24, 9463, -233, 8164, -863, -863, 9463,
+ 7713, -863, 51, -863, -863, -863, -194, -863, -863, 10762,
+ 52, -863, -863, 10762, 88, -863, -863, -863, 10762, -863,
+ -863, -863, -315, -863, -863, -191, 82, -863, -863, -863,
+ -863, -863, -863, -190, -863, -187, -863, -863, -186, 86,
+ -863, -863, -863, -863, -169, -863, -168, -863, -167, 89,
+ -863, -165, 91, -157, 82, -863, 85, -156, -863, 94,
+ 98, -863, -863, 18, -3, -40, -863, -863, -863, 6809,
+ -863, -863, -863, 10762, 10762, 10762, 10762, 10762, 10762, 10762,
+ 10762, 10762, 10762, 10762, 10762, 10762, 10762, 10762, 10762, 10762,
+ 10762, 10762, -863, -863, -863, 97, -863, 2289, -863, -863,
+ -863, 2289, -863, 10762, -863, -863, -34, 10762, -79, -863,
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, 10762, 10762, -863, -863, -863,
+ -863, -863, -863, -863, 9463, -863, -863, -208, -863, 7261,
+ -863, -863, 99, 96, -863, -863, -863, -863, -863, -132,
+ -131, -863, -307, -863, -323, -863, -323, -863, 10762, 10762,
+ -863, -155, -863, -155, -863, 10762, 10762, -863, 93, 35,
+ -863, 11628, -863, 10762, -863, -863, -33, 24, 18, -863,
+ -863, -863, -863, -863, -72, -72, -254, -254, -86, -86,
+ -86, -86, -297, -297, -68, -13, 26, 20, 50, 49,
+ 10762, -863, 2289, 4097, 57, 3645, -154, -863, -152, -863,
+ -863, -863, -863, -863, 8597, -863, -863, -863, 105, -863,
+ 75, -863, -145, -863, -144, -863, -143, -863, -142, -863,
+ -141, -140, -863, -863, -863, -27, 100, 96, 76, 106,
+ 109, -863, -863, 4097, 107, -863, -863, -863, -863, -863,
+ -863, -863, -863, -863, -863, -863, 10762, -863, 101, 2741,
+ 10762, -863, 103, 113, 67, 112, 3193, -863, 114, -863,
+ 9463, -863, -863, -863, -133, 10762, 2741, 107, -863, -863,
+ 2289, -863, 110, 96, -863, -863, 2289, 116, -863, -863
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -1478,117 +1547,137 @@ static const yytype_int16 yypact[] =
means the default is an error. */
static const yytype_int16 yydefact[] =
{
- 0, 157, 210, 208, 209, 207, 214, 215, 216, 217,
- 218, 219, 220, 221, 222, 211, 212, 213, 223, 224,
- 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
- 336, 337, 338, 339, 340, 341, 342, 362, 363, 364,
- 365, 366, 367, 368, 377, 390, 391, 378, 379, 381,
- 380, 382, 383, 384, 385, 386, 387, 388, 389, 165,
- 166, 236, 237, 235, 238, 245, 246, 243, 244, 241,
- 242, 239, 240, 268, 269, 270, 280, 281, 282, 265,
- 266, 267, 277, 278, 279, 262, 263, 264, 274, 275,
- 276, 259, 260, 261, 271, 272, 273, 247, 248, 249,
- 283, 284, 285, 250, 251, 252, 295, 296, 297, 253,
- 254, 255, 307, 308, 309, 256, 257, 258, 319, 320,
- 321, 286, 287, 288, 289, 290, 291, 292, 293, 294,
- 298, 299, 300, 301, 302, 303, 304, 305, 306, 310,
- 311, 312, 313, 314, 315, 316, 317, 318, 322, 323,
- 324, 325, 326, 327, 328, 329, 330, 334, 331, 332,
- 333, 515, 516, 517, 346, 347, 370, 373, 335, 344,
- 345, 361, 343, 392, 393, 396, 397, 398, 400, 401,
- 402, 404, 405, 406, 408, 409, 505, 506, 369, 371,
- 372, 348, 349, 350, 394, 351, 355, 356, 359, 399,
- 403, 407, 352, 353, 357, 358, 395, 354, 360, 439,
- 441, 442, 443, 445, 446, 447, 449, 450, 451, 453,
- 454, 455, 457, 458, 459, 461, 462, 463, 465, 466,
- 467, 469, 470, 471, 473, 474, 475, 477, 478, 479,
- 481, 482, 440, 444, 448, 452, 456, 464, 468, 472,
- 460, 476, 480, 483, 484, 485, 486, 487, 488, 489,
- 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
- 500, 501, 502, 503, 504, 374, 375, 376, 410, 419,
- 421, 415, 420, 422, 423, 425, 426, 427, 429, 430,
- 431, 433, 434, 435, 437, 438, 411, 412, 413, 424,
- 414, 416, 417, 418, 428, 432, 436, 507, 508, 511,
- 512, 513, 514, 509, 510, 609, 132, 520, 521, 522,
- 0, 519, 161, 159, 160, 158, 0, 206, 162, 163,
- 164, 134, 133, 0, 190, 171, 173, 169, 175, 177,
- 172, 174, 170, 176, 178, 167, 168, 192, 179, 186,
- 187, 188, 189, 180, 181, 182, 183, 184, 185, 135,
- 136, 137, 138, 139, 140, 147, 608, 0, 610, 0,
- 109, 108, 0, 120, 125, 154, 153, 151, 155, 0,
- 148, 150, 156, 130, 202, 152, 518, 0, 605, 607,
- 0, 525, 0, 0, 0, 97, 0, 94, 0, 107,
- 0, 116, 110, 118, 0, 119, 0, 95, 126, 100,
- 0, 149, 131, 0, 195, 201, 1, 606, 0, 0,
- 523, 144, 146, 0, 142, 193, 0, 0, 98, 0,
- 0, 611, 111, 115, 117, 113, 121, 112, 0, 127,
- 103, 0, 101, 0, 0, 0, 9, 0, 43, 42,
- 44, 41, 5, 6, 7, 8, 2, 16, 14, 15,
- 17, 10, 11, 12, 13, 3, 18, 37, 20, 25,
- 26, 0, 0, 30, 0, 204, 0, 36, 34, 0,
- 196, 96, 0, 0, 0, 527, 0, 0, 141, 0,
- 191, 0, 197, 45, 49, 52, 55, 60, 63, 65,
- 67, 69, 71, 73, 75, 0, 0, 99, 0, 553,
- 562, 566, 0, 0, 0, 587, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 45, 78, 91,
- 0, 540, 0, 156, 130, 543, 564, 542, 550, 541,
- 0, 544, 545, 568, 546, 575, 547, 548, 583, 549,
- 0, 114, 0, 122, 0, 535, 129, 0, 0, 105,
- 0, 102, 38, 39, 0, 22, 23, 0, 0, 28,
- 27, 0, 206, 31, 33, 40, 0, 203, 0, 533,
- 0, 531, 526, 528, 0, 93, 145, 143, 194, 0,
+ 0, 166, 219, 217, 218, 216, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 220, 221, 222, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 345, 346, 347, 348, 349, 350, 351, 371, 372, 373,
+ 374, 375, 376, 377, 386, 399, 400, 387, 388, 390,
+ 389, 391, 392, 393, 394, 395, 396, 397, 398, 174,
+ 175, 245, 246, 244, 247, 254, 255, 252, 253, 250,
+ 251, 248, 249, 277, 278, 279, 289, 290, 291, 274,
+ 275, 276, 286, 287, 288, 271, 272, 273, 283, 284,
+ 285, 268, 269, 270, 280, 281, 282, 256, 257, 258,
+ 292, 293, 294, 259, 260, 261, 304, 305, 306, 262,
+ 263, 264, 316, 317, 318, 265, 266, 267, 328, 329,
+ 330, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 343, 340, 341,
+ 342, 524, 525, 526, 355, 356, 379, 382, 344, 353,
+ 354, 370, 352, 401, 402, 405, 406, 407, 409, 410,
+ 411, 413, 414, 415, 417, 418, 514, 515, 378, 380,
+ 381, 357, 358, 359, 403, 360, 364, 365, 368, 408,
+ 412, 416, 361, 362, 366, 367, 404, 363, 369, 448,
+ 450, 451, 452, 454, 455, 456, 458, 459, 460, 462,
+ 463, 464, 466, 467, 468, 470, 471, 472, 474, 475,
+ 476, 478, 479, 480, 482, 483, 484, 486, 487, 488,
+ 490, 491, 449, 453, 457, 461, 465, 473, 477, 481,
+ 469, 485, 489, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 383, 384, 385, 419, 428,
+ 430, 424, 429, 431, 432, 434, 435, 436, 438, 439,
+ 440, 442, 443, 444, 446, 447, 420, 421, 422, 433,
+ 423, 425, 426, 427, 437, 441, 445, 516, 517, 520,
+ 521, 522, 523, 518, 519, 0, 0, 0, 0, 0,
+ 0, 0, 0, 164, 165, 0, 620, 137, 530, 531,
+ 532, 0, 529, 170, 168, 169, 167, 0, 215, 171,
+ 172, 173, 139, 138, 0, 199, 180, 182, 178, 184,
+ 186, 181, 183, 179, 185, 187, 176, 177, 201, 188,
+ 195, 196, 197, 198, 189, 190, 191, 192, 193, 194,
+ 140, 141, 142, 143, 144, 145, 152, 619, 0, 621,
+ 0, 114, 113, 0, 125, 130, 159, 158, 156, 160,
+ 0, 153, 155, 161, 135, 211, 157, 528, 0, 616,
+ 618, 0, 0, 162, 163, 527, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 535, 0, 0,
+ 0, 99, 0, 94, 0, 109, 0, 121, 115, 123,
+ 0, 124, 0, 97, 131, 102, 0, 154, 136, 0,
+ 204, 210, 1, 617, 0, 0, 0, 96, 0, 0,
+ 0, 628, 0, 681, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 626,
+ 0, 624, 0, 0, 533, 149, 151, 0, 147, 202,
+ 0, 0, 100, 0, 0, 622, 110, 116, 120, 122,
+ 118, 126, 117, 0, 132, 105, 0, 103, 0, 0,
+ 0, 9, 0, 43, 42, 44, 41, 5, 6, 7,
+ 8, 2, 16, 14, 15, 17, 10, 11, 12, 13,
+ 3, 18, 37, 20, 25, 26, 0, 0, 30, 0,
+ 213, 0, 36, 34, 0, 205, 111, 0, 95, 0,
+ 0, 679, 0, 636, 0, 0, 0, 0, 0, 653,
+ 0, 0, 0, 0, 0, 0, 0, 673, 0, 651,
+ 0, 0, 0, 0, 98, 0, 0, 0, 537, 0,
+ 0, 146, 0, 200, 0, 206, 45, 49, 52, 55,
+ 60, 63, 65, 67, 69, 71, 73, 75, 0, 0,
+ 101, 564, 573, 577, 0, 0, 0, 598, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 45,
+ 78, 91, 0, 551, 0, 161, 135, 554, 575, 553,
+ 561, 552, 0, 555, 556, 579, 557, 586, 558, 559,
+ 594, 560, 0, 119, 0, 127, 0, 545, 134, 0,
+ 0, 107, 0, 104, 38, 39, 0, 22, 23, 0,
+ 0, 28, 27, 0, 215, 31, 33, 40, 0, 212,
+ 112, 683, 0, 684, 629, 0, 0, 682, 648, 644,
+ 645, 646, 647, 0, 642, 0, 93, 649, 0, 0,
+ 663, 664, 665, 666, 0, 661, 0, 667, 0, 0,
+ 669, 0, 0, 0, 2, 677, 678, 0, 675, 0,
+ 0, 623, 625, 0, 543, 0, 541, 536, 538, 0,
+ 150, 148, 203, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 76, 198,
- 199, 0, 0, 552, 0, 585, 598, 597, 0, 589,
- 0, 601, 599, 0, 0, 0, 582, 602, 603, 604,
- 551, 81, 82, 84, 83, 86, 87, 88, 89, 90,
- 85, 80, 0, 0, 567, 563, 565, 569, 576, 584,
- 124, 0, 538, 0, 128, 0, 106, 4, 0, 24,
- 21, 32, 205, 0, 534, 0, 529, 524, 46, 47,
- 48, 51, 50, 53, 54, 58, 59, 56, 57, 61,
- 62, 64, 66, 68, 70, 72, 74, 0, 200, 615,
- 0, 613, 554, 0, 0, 0, 0, 600, 0, 581,
- 79, 92, 123, 536, 0, 104, 19, 530, 532, 0,
- 0, 0, 0, 0, 573, 0, 0, 0, 0, 592,
- 591, 594, 560, 577, 537, 539, 0, 0, 612, 614,
- 555, 0, 0, 0, 593, 0, 0, 572, 0, 0,
- 570, 0, 77, 616, 0, 557, 586, 556, 0, 595,
- 0, 560, 559, 561, 579, 574, 0, 596, 590, 571,
- 580, 0, 588, 578
+ 0, 0, 76, 207, 208, 0, 563, 0, 596, 609,
+ 608, 0, 600, 0, 612, 610, 0, 0, 0, 593,
+ 613, 614, 615, 562, 81, 82, 84, 83, 86, 87,
+ 88, 89, 90, 85, 80, 0, 0, 578, 574, 576,
+ 580, 587, 595, 129, 0, 548, 549, 0, 133, 0,
+ 108, 4, 0, 24, 21, 32, 214, 632, 634, 0,
+ 0, 680, 0, 638, 0, 637, 0, 640, 0, 0,
+ 655, 0, 654, 0, 657, 0, 0, 659, 0, 0,
+ 674, 0, 671, 0, 652, 627, 0, 544, 0, 539,
+ 534, 46, 47, 48, 51, 50, 53, 54, 58, 59,
+ 56, 57, 61, 62, 64, 66, 68, 70, 72, 74,
+ 0, 209, 565, 0, 0, 0, 0, 611, 0, 592,
+ 79, 92, 128, 546, 0, 106, 19, 630, 0, 631,
+ 0, 643, 0, 650, 0, 662, 0, 668, 0, 670,
+ 0, 0, 676, 540, 542, 0, 0, 584, 0, 0,
+ 0, 603, 602, 605, 571, 588, 547, 550, 633, 635,
+ 639, 641, 656, 658, 660, 672, 0, 566, 0, 0,
+ 0, 604, 0, 0, 583, 0, 0, 581, 0, 77,
+ 0, 568, 597, 567, 0, 606, 0, 571, 570, 572,
+ 590, 585, 0, 607, 601, 582, 591, 0, 599, 589
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -732, -732, -732, -732, -732, -732, -732, -732, -732, -732,
- -732, -732, 9402, -732, -90, -89, -153, -92, -29, -28,
- -27, -26, -30, -25, -732, -88, -732, -101, -732, -113,
- -132, 2, -732, -732, -732, 4, -732, -732, -732, 200,
- 201, 202, -732, -732, -343, -732, -732, -732, -732, 92,
- -732, -36, -46, -732, 9, -732, 0, -67, -732, -732,
- -732, -732, 263, -732, -732, -732, -481, -142, 8, -78,
- -214, -732, -107, -204, -731, -732, -149, -732, -732, -160,
- -159, -732, -732, 212, -269, -104, -732, 45, -732, -127,
- -732, 48, -732, -732, -732, -732, 49, -732, -732, -732,
- -732, -732, -732, -732, -732, 210, -732, -732, -732, -732,
- -116
+ -863, -863, -863, -863, -863, -863, -863, -863, -863, -863,
+ -863, -863, -418, -863, -380, -379, -484, -382, -258, -256,
+ -253, -257, -252, -255, -863, -478, -863, -485, -863, -491,
+ -530, 14, -863, -863, -863, 7, -397, -863, -863, 44,
+ 53, 47, -863, -863, -400, -863, -863, -863, -863, -92,
+ -863, -377, -362, -863, 9, -863, 0, -414, -863, -863,
+ -863, -863, 150, -863, -863, -863, -546, -548, -218, -331,
+ -624, -863, -359, -609, -862, -863, -417, -863, -863, -427,
+ -426, -863, -863, 68, -719, -355, -863, -136, -863, -389,
+ -863, -135, -863, -863, -863, -863, -129, -863, -863, -863,
+ -863, -863, -863, -863, -863, 102, -863, -863, 2, -863,
+ -65, -234, -432, -863, -863, -863, -301, -293, -294, -863,
+ -863, -304, -299, -302, -298, -863, -296, -305, -863, -383,
+ -526
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 465, 466, 467, 658, 468, 469, 470, 471, 472,
- 473, 474, 527, 476, 494, 495, 496, 497, 498, 499,
- 500, 501, 502, 503, 504, 528, 687, 529, 642, 530,
- 586, 531, 367, 558, 443, 532, 369, 370, 371, 401,
- 402, 403, 372, 373, 374, 375, 376, 377, 423, 424,
- 378, 379, 380, 381, 477, 426, 478, 429, 414, 415,
- 479, 384, 385, 386, 486, 419, 484, 485, 580, 581,
- 556, 653, 535, 536, 537, 538, 539, 614, 713, 746,
- 737, 738, 739, 747, 540, 541, 542, 543, 740, 717,
- 544, 545, 741, 761, 546, 547, 548, 693, 618, 695,
- 721, 735, 736, 549, 387, 388, 389, 398, 550, 690,
- 691
+ -1, 520, 521, 522, 782, 523, 524, 525, 526, 527,
+ 528, 529, 609, 531, 577, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 610, 840, 611, 765, 612,
+ 695, 613, 378, 640, 498, 614, 380, 381, 382, 427,
+ 428, 429, 383, 384, 385, 386, 387, 388, 477, 478,
+ 389, 390, 391, 392, 532, 480, 533, 483, 440, 441,
+ 534, 395, 396, 397, 569, 473, 567, 568, 705, 706,
+ 638, 777, 617, 618, 619, 620, 621, 737, 876, 912,
+ 904, 905, 906, 913, 622, 623, 624, 625, 907, 879,
+ 626, 627, 908, 927, 628, 629, 630, 843, 741, 845,
+ 883, 902, 903, 631, 398, 399, 400, 424, 632, 470,
+ 471, 450, 451, 789, 790, 402, 673, 674, 678, 403,
+ 404, 684, 685, 688, 691, 405, 697, 698, 406, 452,
+ 453
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -1596,83 +1685,190 @@ static const yytype_int16 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 383, 745, 366, 427, 368, 584, 576, 512, 753, 382,
- 515, 428, 516, 517, 406, 393, 520, 407, 577, 745,
- 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 655, 394, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
- 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
- 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
- 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
- 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
- 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
- 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
- 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
- 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
- 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
- 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
- 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
- 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
- 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
- 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
- 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
- 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
- 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
- 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
- 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
- 312, 313, 314, 411, 564, 404, 646, 555, 650, 505,
- 652, 439, 583, 654, 391, 692, 607, 480, 596, 597,
- 715, 506, 437, 400, 427, 565, 566, 488, 411, 507,
- 395, 438, 399, 489, 404, 408, 427, 506, 551, 553,
- 421, 405, 573, 552, 557, -35, 392, 567, 715, 412,
- 382, 568, 608, 482, 598, 599, 396, 383, 382, 366,
- 418, 368, 321, 397, 422, 506, 382, 326, 327, 585,
- 405, 490, 651, 413, 405, 570, 623, 491, 625, 382,
- 657, 571, 420, 382, 694, 722, 643, 440, 611, 483,
- 441, 643, 425, 442, 560, 723, 756, 561, 382, 711,
- 534, 643, 643, 712, 430, 643, 411, 702, 644, 533,
- 600, 601, 583, 675, 676, 677, 678, 435, 482, 665,
- 482, 555, 666, 555, 659, 436, 555, 631, 632, 633,
- 634, 635, 636, 637, 638, 639, 640, 427, 643, 665,
- 661, 697, 707, 317, 318, 319, 481, 641, 589, 590,
- 591, 592, 578, 593, 483, 760, 483, 703, 646, 704,
- 725, 382, 487, 382, 559, 382, 594, 595, 643, 699,
- 643, 726, 671, 672, 569, 673, 674, 696, 679, 680,
- 574, 698, 664, 583, 506, 579, 588, 602, 603, 604,
- 605, 606, 482, 609, 612, 615, 613, 616, 619, 617,
- 755, 620, 624, 621, 626, 730, 656, 627, -36, 628,
- 534, 700, 701, -34, 660, 629, 630, -29, 482, 533,
- 555, 688, 689, 706, 643, 710, 646, 718, 483, 728,
- 731, 732, 733, -558, 743, 750, 744, 382, 749, 509,
- 754, 762, 763, 681, 709, 682, 685, 683, 727, 684,
- 714, 587, 686, 390, 483, 751, 663, 708, 719, 752,
- 758, 720, 759, 382, 734, 647, 729, 417, 648, 649,
- 0, 432, 0, 555, 433, 0, 434, 0, 714, 0,
- 431, 0, 0, 0, 534, 0, 0, 0, 534, 482,
- 748, 0, 585, 533, 0, 742, 0, 533, 0, 0,
- 0, 0, 0, 0, 0, 0, 757, 0, 0, 0,
- 0, 0, 0, 555, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 483, 0, 716, 0, 0,
- 0, 0, 0, 0, 382, 0, 0, 0, 0, 0,
- 411, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 716, 0, 0, 0, 0,
- 0, 0, 534, 534, 0, 534, 0, 0, 0, 0,
- 0, 533, 533, 0, 533, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 412, 0, 0, 0,
- 0, 534, 0, 0, 0, 382, 0, 0, 0, 0,
- 533, 0, 534, 0, 0, 0, 0, 0, 0, 534,
- 0, 533, 0, 0, 0, 0, 0, 0, 533, 0,
- 534, 0, 0, 0, 534, 0, 0, 0, 0, 533,
- 534, 0, 0, 533, 0, 0, 0, 416, 0, 533,
+ 394, 445, 401, 588, 444, 430, 445, 379, 637, 393,
+ 773, 646, 776, 769, 377, 778, 667, 677, 842, 708,
+ 494, 530, 687, 709, 446, 668, 535, 421, 437, 446,
+ 466, 700, 667, 787, 720, 721, 731, 911, 475, 661,
+ 710, 661, 662, 655, 919, 658, 492, 417, 481, 430,
+ 328, 329, 330, 422, 911, 493, 481, 659, 669, 670,
+ 671, 672, 476, 576, 482, 647, 648, 788, 437, 676,
+ 722, 723, 732, 663, 676, 663, 633, 635, 589, 418,
+ 676, 644, 645, 676, 437, -35, 590, 649, 481, 407,
+ 432, 650, 676, 433, 779, 634, 565, 754, 755, 756,
+ 757, 758, 759, 760, 761, 762, 763, 716, 664, 717,
+ 746, 735, 748, 657, 664, 589, 664, 764, 589, 664,
+ 541, 664, 639, 664, 664, 774, 542, 495, 664, 576,
+ 496, 543, 844, 497, 576, 549, 557, 544, 571, 573,
+ 576, 550, 558, 576, 572, 574, 853, 652, 854, 637,
+ 852, 637, 576, 653, 637, 415, 781, 665, 783, 791,
+ 793, 708, 766, 795, 797, 542, 794, 408, 785, 796,
+ 798, 576, 409, 693, 456, 458, 460, 462, 464, 465,
+ 468, 800, 802, 804, 423, 807, 410, 801, 803, 805,
+ 565, 808, 565, 810, 812, 426, 884, 425, 885, 811,
+ 813, 926, 766, 437, 766, 890, 891, 892, 893, 894,
+ 895, 794, 798, 801, 805, 808, 813, 922, 562, 411,
+ 857, 859, 563, 766, 858, 860, 680, 681, 682, 683,
+ 887, 708, 445, 769, 412, 444, 828, 829, 830, 831,
+ 786, 718, 719, 454, 457, 459, 455, 455, 455, 413,
+ 642, 439, 846, 643, 461, 446, 848, 455, 463, 467,
+ 414, 455, 455, 565, 675, 724, 725, 455, 863, 677,
+ 679, 686, 419, 455, 455, 867, 687, 766, 849, 689,
+ 850, 851, 455, 420, 692, 667, 921, 455, 699, 637,
+ 817, 455, 713, 714, 715, 821, 822, 823, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 434, 766, 818, 769, 767, 819,
+ 676, 676, 766, 818, 447, 847, 873, 676, 676, 766,
+ 896, 449, 565, 676, 469, 676, 824, 825, 474, 826,
+ 827, 479, 832, 833, 484, 325, 490, 491, 481, 875,
+ 539, 536, 877, 537, 538, 540, 545, 641, 726, 546,
+ 547, 548, 551, 559, 552, 666, 553, 554, 555, 637,
+ 561, 556, 560, 651, 656, 589, 564, 570, 492, 662,
+ 576, 576, 431, 690, 701, 729, 730, 576, 576, 728,
+ 438, 393, 877, 576, 733, 576, 727, 736, 394, 393,
+ 401, 394, 565, 704, 738, 379, 394, 393, 401, 914,
+ 393, 909, 377, 448, 742, 393, 472, 739, 712, 740,
+ 743, 744, 747, 749, 923, 637, 431, 486, 750, 751,
+ 431, 752, -36, 753, -34, 393, 780, 784, -29, 393,
+ 792, 869, 799, 878, 814, 806, 438, 809, 815, 841,
+ 880, 856, 766, 888, 897, 393, 899, 889, 900, 910,
+ -569, 898, 915, 916, 917, 591, 446, 920, 834, 928,
+ 929, 835, 837, 566, 488, 836, 839, 489, 838, 487,
+ 711, 416, 393, 878, 616, 816, 881, 874, 918, 924,
+ 882, 925, 485, 615, 901, 862, 770, 771, 702, 866,
+ 443, 861, 865, 772, 868, 864, 446, 0, 872, 0,
+ 0, 870, 0, 0, 0, 871, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 660, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 696, 0,
+ 0, 0, 0, 0, 0, 703, 0, 566, 0, 566,
+ 0, 0, 0, 0, 393, 0, 393, 0, 393, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 616, 0, 0, 0, 0, 0, 0, 0,
+ 0, 615, 394, 0, 0, 0, 0, 0, 0, 0,
+ 566, 393, 0, 0, 0, 0, 0, 0, 0, 393,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 566,
+ 0, 0, 0, 0, 0, 0, 0, 0, 393, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 616, 0, 0,
+ 0, 616, 0, 0, 0, 0, 615, 0, 0, 0,
+ 615, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 566,
+ 0, 0, 0, 0, 0, 0, 0, 0, 393, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 696, 0, 696, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 616, 616, 0, 616, 0, 401, 0, 0,
+ 0, 615, 615, 0, 615, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 616, 0, 0, 0, 0, 0, 0,
+ 0, 0, 615, 0, 0, 0, 0, 0, 0, 616,
+ 0, 0, 0, 0, 0, 0, 616, 0, 615, 0,
+ 0, 0, 0, 0, 0, 615, 616, 0, 0, 0,
+ 616, 0, 0, 0, 0, 615, 616, 0, 0, 615,
+ 0, 0, 0, 442, 0, 615, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 325, 0, 0, 0, 0, 0,
+ 0, 0, 326, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 327, 328, 329, 330,
+ 331, 0, 0, 0, 0, 0, 0, 0, 0, 332,
+ 333, 334, 335, 336, 337, 338, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 339, 340, 341, 342, 343, 344, 0, 0, 0,
+ 0, 0, 0, 0, 0, 345, 0, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 1, 2,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 0, 0, 499, 500, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 501, 502, 0, 325, 0, 591, 592,
+ 0, 0, 0, 0, 593, 503, 504, 505, 506, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 327, 328,
+ 329, 330, 331, 0, 0, 0, 507, 508, 509, 510,
+ 511, 332, 333, 334, 335, 336, 337, 338, 594, 595,
+ 596, 597, 0, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 339, 340, 341, 342, 343, 344, 512,
+ 513, 514, 515, 516, 517, 518, 519, 345, 608, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
@@ -1704,20 +1900,21 @@ static const yytype_int16 yytable[] =
281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
- 311, 312, 313, 314, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 315, 0, 0, 0,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 0, 0, 499, 500, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 316, 317, 318, 319, 320, 0, 0, 0, 0, 0,
- 0, 0, 0, 321, 322, 323, 324, 325, 326, 327,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 328, 329, 330, 331, 332,
- 333, 0, 0, 0, 0, 0, 0, 0, 0, 334,
- 0, 335, 336, 337, 338, 339, 340, 341, 342, 343,
- 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
- 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
- 364, 365, 1, 2, 3, 4, 5, 6, 7, 8,
+ 0, 0, 0, 0, 0, 501, 502, 0, 325, 0,
+ 591, 768, 0, 0, 0, 0, 593, 503, 504, 505,
+ 506, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 327, 328, 329, 330, 331, 0, 0, 0, 507, 508,
+ 509, 510, 511, 332, 333, 334, 335, 336, 337, 338,
+ 594, 595, 596, 597, 0, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 339, 340, 341, 342, 343,
+ 344, 512, 513, 514, 515, 516, 517, 518, 519, 345,
+ 608, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
@@ -1748,20 +1945,21 @@ static const yytype_int16 yytable[] =
279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
- 309, 310, 311, 312, 313, 314, 0, 0, 444, 445,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 0, 0, 499, 500,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 446, 447, 0,
- 508, 0, 509, 510, 0, 0, 0, 0, 511, 448,
- 449, 450, 451, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 316, 317, 318, 319, 320, 0, 0, 0,
- 452, 453, 454, 455, 456, 321, 322, 323, 324, 325,
- 326, 327, 512, 513, 514, 515, 0, 516, 517, 518,
- 519, 520, 521, 522, 523, 524, 525, 328, 329, 330,
- 331, 332, 333, 457, 458, 459, 460, 461, 462, 463,
- 464, 334, 526, 335, 336, 337, 338, 339, 340, 341,
- 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
- 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
- 362, 363, 364, 365, 1, 2, 3, 4, 5, 6,
+ 0, 0, 0, 0, 0, 0, 0, 501, 502, 0,
+ 325, 0, 591, 0, 0, 0, 0, 0, 593, 503,
+ 504, 505, 506, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 327, 328, 329, 330, 331, 0, 0, 0,
+ 507, 508, 509, 510, 511, 332, 333, 334, 335, 336,
+ 337, 338, 594, 595, 596, 597, 0, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 339, 340, 341,
+ 342, 343, 344, 512, 513, 514, 515, 516, 517, 518,
+ 519, 345, 608, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
@@ -1792,20 +1990,21 @@ static const yytype_int16 yytable[] =
277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
- 307, 308, 309, 310, 311, 312, 313, 314, 0, 0,
- 444, 445, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 446,
- 447, 0, 508, 0, 509, 645, 0, 0, 0, 0,
- 511, 448, 449, 450, 451, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 316, 317, 318, 319, 320, 0,
- 0, 0, 452, 453, 454, 455, 456, 321, 322, 323,
- 324, 325, 326, 327, 512, 513, 514, 515, 0, 516,
- 517, 518, 519, 520, 521, 522, 523, 524, 525, 328,
- 329, 330, 331, 332, 333, 457, 458, 459, 460, 461,
- 462, 463, 464, 334, 526, 335, 336, 337, 338, 339,
- 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
- 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
- 360, 361, 362, 363, 364, 365, 1, 2, 3, 4,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 0, 0,
+ 499, 500, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 501,
+ 502, 0, 325, 0, 484, 0, 0, 0, 0, 0,
+ 593, 503, 504, 505, 506, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 327, 328, 329, 330, 331, 0,
+ 0, 0, 507, 508, 509, 510, 511, 332, 333, 334,
+ 335, 336, 337, 338, 594, 595, 596, 597, 0, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 339,
+ 340, 341, 342, 343, 344, 512, 513, 514, 515, 516,
+ 517, 518, 519, 345, 608, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
@@ -1837,19 +2036,20 @@ static const yytype_int16 yytable[] =
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
- 0, 0, 444, 445, 0, 0, 0, 0, 0, 0,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 0, 0, 499, 500, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 446, 447, 0, 508, 0, 509, 0, 0, 0,
- 0, 0, 511, 448, 449, 450, 451, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 316, 317, 318, 319,
- 320, 0, 0, 0, 452, 453, 454, 455, 456, 321,
- 322, 323, 324, 325, 326, 327, 512, 513, 514, 515,
- 0, 516, 517, 518, 519, 520, 521, 522, 523, 524,
- 525, 328, 329, 330, 331, 332, 333, 457, 458, 459,
- 460, 461, 462, 463, 464, 334, 526, 335, 336, 337,
- 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
- 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
- 358, 359, 360, 361, 362, 363, 364, 365, 1, 2,
+ 0, 501, 502, 0, 325, 0, 0, 0, 0, 0,
+ 0, 0, 593, 503, 504, 505, 506, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 327, 328, 329, 330,
+ 331, 0, 0, 0, 507, 508, 509, 510, 511, 332,
+ 333, 334, 335, 336, 337, 338, 594, 595, 596, 597,
+ 0, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 339, 340, 341, 342, 343, 344, 512, 513, 514,
+ 515, 516, 517, 518, 519, 345, 608, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 1, 2,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
@@ -1881,19 +2081,20 @@ static const yytype_int16 yytable[] =
283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
- 313, 314, 0, 0, 444, 445, 0, 0, 0, 0,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 0, 0, 499, 500, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 501, 502, 0, 325, 0, 0, 0,
+ 0, 0, 0, 0, 593, 503, 504, 505, 506, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 327, 328,
+ 329, 330, 331, 0, 0, 0, 507, 508, 509, 510,
+ 511, 332, 333, 334, 335, 336, 337, 338, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 446, 447, 0, 508, 0, 430, 0,
- 0, 0, 0, 0, 511, 448, 449, 450, 451, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 316, 317,
- 318, 319, 320, 0, 0, 0, 452, 453, 454, 455,
- 456, 321, 322, 323, 324, 325, 326, 327, 512, 513,
- 514, 515, 0, 516, 517, 518, 519, 520, 521, 522,
- 523, 524, 525, 328, 329, 330, 331, 332, 333, 457,
- 458, 459, 460, 461, 462, 463, 464, 334, 526, 335,
- 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
- 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
- 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 0, 0, 0, 339, 340, 341, 342, 343, 344, 512,
+ 513, 514, 515, 516, 517, 518, 519, 345, 0, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
@@ -1925,20 +2126,21 @@ static const yytype_int16 yytable[] =
281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
- 311, 312, 313, 314, 0, 0, 444, 445, 0, 0,
+ 311, 312, 313, 314, 0, 0, 0, 318, 319, 320,
+ 321, 322, 323, 324, 0, 0, 499, 500, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 446, 447, 0, 508, 0,
- 0, 0, 0, 0, 0, 0, 511, 448, 449, 450,
- 451, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 316, 317, 318, 319, 320, 0, 0, 0, 452, 453,
- 454, 455, 456, 321, 322, 323, 324, 325, 326, 327,
- 512, 513, 514, 515, 0, 516, 517, 518, 519, 520,
- 521, 522, 523, 524, 525, 328, 329, 330, 331, 332,
- 333, 457, 458, 459, 460, 461, 462, 463, 464, 334,
- 526, 335, 336, 337, 338, 339, 340, 341, 342, 343,
- 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
- 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
- 364, 365, 1, 2, 3, 4, 5, 6, 7, 8,
+ 0, 0, 0, 0, 0, 501, 502, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 503, 504, 505,
+ 506, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 327, 328, 329, 330, 0, 0, 0, 0, 507, 508,
+ 509, 510, 511, 332, 333, 334, 335, 336, 337, 338,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 339, 340, 341, 342, 343,
+ 344, 512, 513, 514, 515, 516, 517, 518, 519, 345,
+ 0, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
@@ -1969,20 +2171,21 @@ static const yytype_int16 yytable[] =
279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
- 309, 310, 311, 312, 313, 314, 0, 0, 444, 445,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 446, 447, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 511, 448,
- 449, 450, 451, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 316, 317, 318, 319, 320, 0, 0, 0,
- 452, 453, 454, 455, 456, 321, 322, 323, 324, 325,
- 326, 327, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 328, 329, 330,
- 331, 332, 333, 457, 458, 459, 460, 461, 462, 463,
- 464, 334, 0, 335, 336, 337, 338, 339, 340, 341,
- 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
- 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
- 362, 363, 364, 365, 1, 2, 3, 4, 5, 6,
+ 325, 0, 0, 0, 0, 0, 0, 0, 326, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 327, 328, 329, 330, 331, 0, 0, 0,
+ 0, 0, 0, 0, 0, 332, 333, 334, 335, 336,
+ 337, 338, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 339, 340, 341,
+ 342, 343, 344, 0, 0, 0, 0, 0, 0, 0,
+ 0, 345, 0, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
@@ -2014,19 +2217,20 @@ static const yytype_int16 yytable[] =
287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
307, 308, 309, 310, 311, 312, 313, 314, 0, 0,
- 444, 445, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 446,
- 447, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 448, 449, 450, 451, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 316, 317, 318, 319, 0, 0,
- 0, 0, 452, 453, 454, 455, 456, 321, 322, 323,
- 324, 325, 326, 327, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 328,
- 329, 330, 331, 332, 333, 457, 458, 459, 460, 461,
- 462, 463, 464, 334, 0, 335, 336, 337, 338, 339,
- 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
- 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
- 360, 361, 362, 363, 364, 365, 1, 2, 3, 4,
+ 0, 318, 319, 320, 321, 322, 323, 324, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 327, 328, 329, 330, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 332, 333, 334,
+ 335, 336, 337, 338, 594, 0, 0, 597, 0, 598,
+ 599, 0, 0, 602, 0, 0, 0, 0, 0, 339,
+ 340, 341, 342, 343, 344, 0, 0, 0, 0, 0,
+ 0, 0, 0, 345, 0, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
@@ -2058,19 +2262,20 @@ static const yytype_int16 yytable[] =
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 0, 0, 0, 318, 319, 320, 321, 322, 323, 324,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 315, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 316, 317, 318, 319,
- 320, 0, 0, 0, 0, 0, 0, 0, 0, 321,
- 322, 323, 324, 325, 326, 327, 0, 0, 0, 0,
+ 0, 0, 435, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 327, 328, 329, 330,
+ 0, 0, 0, 0, 0, 0, 0, 0, 436, 332,
+ 333, 334, 335, 336, 337, 338, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 328, 329, 330, 331, 332, 333, 0, 0, 0,
- 0, 0, 0, 0, 0, 334, 0, 335, 336, 337,
- 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
- 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
- 358, 359, 360, 361, 362, 363, 364, 365, 1, 2,
+ 0, 339, 340, 341, 342, 343, 344, 0, 0, 0,
+ 0, 0, 0, 0, 0, 345, 0, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 1, 2,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
@@ -2102,19 +2307,20 @@ static const yytype_int16 yytable[] =
283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
- 313, 314, 0, 0, 0, 0, 0, 0, 0, 0,
+ 313, 314, 0, 0, 0, 318, 319, 320, 321, 322,
+ 323, 324, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 325, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 409, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 316, 317,
- 318, 319, 0, 0, 0, 0, 0, 0, 0, 0,
- 410, 321, 322, 323, 324, 325, 326, 327, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 327, 328,
+ 329, 330, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 332, 333, 334, 335, 336, 337, 338, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 328, 329, 330, 331, 332, 333, 0,
- 0, 0, 0, 0, 0, 0, 0, 334, 0, 335,
- 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
- 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
- 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 0, 0, 0, 339, 340, 341, 342, 343, 344, 0,
+ 0, 0, 0, 0, 0, 0, 0, 345, 0, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
@@ -2146,20 +2352,21 @@ static const yytype_int16 yytable[] =
281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
- 311, 312, 313, 314, 0, 0, 0, 0, 0, 0,
+ 311, 312, 313, 314, 0, 0, 0, 318, 319, 320,
+ 321, 322, 323, 324, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 582, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 707, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 316, 317, 318, 319, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 321, 322, 323, 324, 325, 326, 327,
+ 327, 328, 329, 330, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 332, 333, 334, 335, 336, 337, 338,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 328, 329, 330, 331, 332,
- 333, 0, 0, 0, 0, 0, 0, 0, 0, 334,
- 0, 335, 336, 337, 338, 339, 340, 341, 342, 343,
- 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
- 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
- 364, 365, 1, 2, 3, 4, 5, 6, 7, 8,
+ 0, 0, 0, 0, 0, 339, 340, 341, 342, 343,
+ 344, 0, 0, 0, 0, 0, 0, 0, 0, 345,
+ 0, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
@@ -2190,20 +2397,21 @@ static const yytype_int16 yytable[] =
279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
- 309, 310, 311, 312, 313, 314, 0, 0, 0, 0,
+ 309, 310, 311, 312, 313, 314, 0, 0, 0, 318,
+ 319, 320, 321, 322, 323, 324, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 667, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 820, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 316, 317, 318, 319, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 321, 322, 323, 324, 325,
- 326, 327, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 328, 329, 330,
- 331, 332, 333, 0, 0, 0, 0, 0, 0, 0,
- 0, 334, 0, 335, 336, 337, 338, 339, 340, 341,
- 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
- 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
- 362, 363, 364, 365, 1, 2, 3, 4, 5, 6,
+ 0, 0, 327, 328, 329, 330, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 332, 333, 334, 335, 336,
+ 337, 338, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 339, 340, 341,
+ 342, 343, 344, 0, 0, 0, 0, 0, 0, 0,
+ 0, 345, 0, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
@@ -2235,19 +2443,20 @@ static const yytype_int16 yytable[] =
287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
307, 308, 309, 310, 311, 312, 313, 314, 0, 0,
+ 0, 318, 319, 320, 321, 322, 323, 324, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 705, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 855, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 316, 317, 318, 319, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 321, 322, 323,
- 324, 325, 326, 327, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 328,
- 329, 330, 331, 332, 333, 0, 0, 0, 0, 0,
- 0, 0, 0, 334, 0, 335, 336, 337, 338, 339,
- 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
- 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
- 360, 361, 362, 363, 364, 365, 1, 2, 3, 4,
+ 0, 0, 0, 0, 327, 328, 329, 330, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 332, 333, 334,
+ 335, 336, 337, 338, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 339,
+ 340, 341, 342, 343, 344, 0, 0, 0, 0, 0,
+ 0, 0, 0, 345, 0, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
@@ -2279,19 +2488,20 @@ static const yytype_int16 yytable[] =
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 0, 0, 0, 318, 319, 320, 321, 322, 323, 324,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 316, 317, 318, 319,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 321,
- 322, 323, 324, 325, 326, 327, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 327, 328, 329, 330,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 332,
+ 333, 334, 335, 336, 337, 338, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 328, 329, 330, 331, 332, 333, 0, 0, 0,
- 0, 0, 0, 0, 0, 334, 0, 335, 336, 337,
- 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
- 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
- 358, 359, 360, 361, 362, 363, 364, 365, 2, 3,
+ 0, 339, 340, 341, 342, 343, 344, 0, 0, 0,
+ 0, 0, 0, 0, 0, 345, 0, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 2, 3,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
@@ -2323,18 +2533,19 @@ static const yytype_int16 yytable[] =
284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
- 314, 0, 0, 444, 445, 0, 0, 0, 0, 0,
+ 314, 0, 0, 0, 0, 0, 0, 321, 0, 0,
+ 0, 0, 0, 499, 500, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 446, 447, 0, 0, 0, 554, 724, 0,
- 0, 0, 0, 0, 448, 449, 450, 451, 0, 0,
+ 0, 0, 501, 502, 0, 0, 0, 636, 775, 0,
+ 0, 0, 0, 0, 503, 504, 505, 506, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 452, 453, 454, 455, 456,
- 321, 0, 0, 0, 0, 326, 327, 0, 0, 0,
+ 0, 0, 0, 0, 0, 507, 508, 509, 510, 511,
+ 332, 0, 0, 0, 0, 337, 338, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 457, 458,
- 459, 460, 461, 462, 463, 464, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 512, 513,
+ 514, 515, 516, 517, 518, 519, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 347, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+ 358, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
@@ -2365,18 +2576,19 @@ static const yytype_int16 yytable[] =
281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
- 311, 312, 313, 314, 0, 0, 444, 445, 0, 0,
+ 311, 312, 313, 314, 0, 0, 0, 0, 0, 0,
+ 321, 0, 0, 0, 0, 0, 499, 500, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 446, 447, 0, 0, 492,
- 0, 0, 0, 0, 0, 0, 0, 448, 449, 450,
- 451, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 452, 453,
- 454, 455, 456, 321, 0, 0, 0, 0, 326, 327,
+ 0, 0, 0, 0, 0, 501, 502, 0, 0, 0,
+ 636, 886, 0, 0, 0, 0, 0, 503, 504, 505,
+ 506, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 507, 508,
+ 509, 510, 511, 332, 0, 0, 0, 0, 337, 338,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 457, 458, 459, 460, 461, 462, 463, 464, 0,
+ 0, 512, 513, 514, 515, 516, 517, 518, 519, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 347, 2, 3, 4, 5, 6, 7,
+ 0, 0, 0, 358, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
@@ -2407,18 +2619,19 @@ static const yytype_int16 yytable[] =
278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
- 308, 309, 310, 311, 312, 313, 314, 0, 0, 444,
- 445, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 446, 447,
- 0, 0, 0, 554, 0, 0, 0, 0, 0, 0,
- 448, 449, 450, 451, 0, 0, 0, 0, 0, 0,
+ 308, 309, 310, 311, 312, 313, 314, 0, 0, 0,
+ 0, 0, 0, 321, 0, 0, 0, 0, 0, 499,
+ 500, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 501, 502,
+ 0, 0, 575, 0, 0, 0, 0, 0, 0, 0,
+ 503, 504, 505, 506, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 452, 453, 454, 455, 456, 321, 0, 0, 0,
- 0, 326, 327, 0, 0, 0, 0, 0, 0, 0,
+ 0, 507, 508, 509, 510, 511, 332, 0, 0, 0,
+ 0, 337, 338, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 457, 458, 459, 460, 461, 462,
- 463, 464, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 347, 2, 3, 4,
+ 0, 0, 0, 0, 512, 513, 514, 515, 516, 517,
+ 518, 519, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 358, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
@@ -2450,17 +2663,18 @@ static const yytype_int16 yytable[] =
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
- 0, 0, 444, 445, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 321, 0, 0, 0,
+ 0, 0, 499, 500, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 446, 447, 0, 0, 610, 0, 0, 0, 0,
- 0, 0, 0, 448, 449, 450, 451, 0, 0, 0,
+ 0, 501, 502, 0, 0, 0, 636, 0, 0, 0,
+ 0, 0, 0, 503, 504, 505, 506, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 452, 453, 454, 455, 456, 321,
- 0, 0, 0, 0, 326, 327, 0, 0, 0, 0,
+ 0, 0, 0, 0, 507, 508, 509, 510, 511, 332,
+ 0, 0, 0, 0, 337, 338, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 457, 458, 459,
- 460, 461, 462, 463, 464, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 347,
+ 0, 0, 0, 0, 0, 0, 0, 512, 513, 514,
+ 515, 516, 517, 518, 519, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 358,
2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
@@ -2492,18 +2706,19 @@ static const yytype_int16 yytable[] =
282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
- 312, 313, 314, 0, 0, 444, 445, 0, 0, 0,
+ 312, 313, 314, 0, 0, 0, 0, 0, 0, 321,
+ 0, 0, 0, 0, 0, 499, 500, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 446, 447, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 622, 448, 449, 450, 451,
+ 0, 0, 0, 0, 501, 502, 0, 0, 734, 0,
+ 0, 0, 0, 0, 0, 0, 503, 504, 505, 506,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 452, 453, 454,
- 455, 456, 321, 0, 0, 0, 0, 326, 327, 0,
+ 0, 0, 0, 0, 0, 0, 0, 507, 508, 509,
+ 510, 511, 332, 0, 0, 0, 0, 337, 338, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 457, 458, 459, 460, 461, 462, 463, 464, 0, 0,
+ 512, 513, 514, 515, 516, 517, 518, 519, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 347, 2, 3, 4, 5, 6, 7, 8,
+ 0, 0, 358, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
@@ -2534,18 +2749,19 @@ static const yytype_int16 yytable[] =
279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
- 309, 310, 311, 312, 313, 314, 0, 0, 444, 445,
+ 309, 310, 311, 312, 313, 314, 0, 0, 0, 0,
+ 0, 0, 321, 0, 0, 0, 0, 0, 499, 500,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 446, 447, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 448,
- 449, 450, 451, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 501, 502, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 745, 503,
+ 504, 505, 506, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 452, 453, 454, 455, 456, 321, 0, 0, 0, 0,
- 326, 327, 0, 0, 0, 0, 0, 0, 0, 0,
+ 507, 508, 509, 510, 511, 332, 0, 0, 0, 0,
+ 337, 338, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 457, 458, 459, 460, 461, 462, 463,
- 464, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 347, 2, 3, 4, 5,
+ 0, 0, 0, 512, 513, 514, 515, 516, 517, 518,
+ 519, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 358, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
@@ -2577,118 +2793,332 @@ static const yytype_int16 yytable[] =
286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
296, 297, 298, 299, 300, 301, 302, 303, 304, 305,
306, 307, 308, 309, 310, 311, 312, 313, 314, 0,
- 0, 444, 445, 0, 0, 475, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 493,
- 446, 447, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 448, 449, 450, 451, 562, 563, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 452, 453, 454, 455, 456, 321, 0,
- 0, 0, 0, 326, 572, 0, 0, 0, 575, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 493,
- 0, 0, 0, 0, 0, 0, 457, 458, 459, 460,
- 461, 462, 463, 464, 0, 0, 0, 0, 493, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 347, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 321, 0, 0, 0, 0,
+ 0, 499, 500, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 501, 502, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 503, 504, 505, 506, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 507, 508, 509, 510, 511, 332, 0,
+ 0, 0, 0, 337, 338, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 512, 513, 514, 515,
+ 516, 517, 518, 519, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 358, 2,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 0, 0, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 0, 0, 0, 0, 0, 0, 321, 0,
+ 0, 0, 0, 0, 499, 500, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 662, 0,
+ 0, 0, 0, 501, 502, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 503, 504, 505, 506, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 668, 669, 670, 493, 493, 493, 493, 493, 493,
- 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
+ 0, 0, 0, 0, 0, 0, 507, 508, 509, 510,
+ 511, 332, 0, 0, 0, 0, 337, 654, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 512,
+ 513, 514, 515, 516, 517, 518, 519, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 358, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 55, 56, 57, 58, 0,
+ 0, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 0, 0, 0, 0, 0,
+ 0, 321, 0, 0, 0, 0, 0, 499, 500, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 501, 502, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 503, 504,
+ 505, 506, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 507,
+ 508, 509, 510, 694, 332, 0, 0, 0, 0, 337,
+ 338, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 512, 513, 514, 515, 516, 517, 518, 519,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 358, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 0, 0, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 0, 0,
+ 0, 0, 0, 0, 321, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 493
+ 0, 0, 0, 0, 0, 0, 0, 332, 0, 0,
+ 0, 0, 337, 338
};
static const yytype_int16 yycheck[] =
{
- 0, 732, 0, 341, 0, 486, 346, 383, 739, 0,
- 386, 349, 388, 389, 346, 339, 392, 349, 358, 750,
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, 558, 339, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
- 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
- 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
- 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
- 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
- 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
- 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
- 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
- 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
- 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
- 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
- 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
- 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
- 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
- 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
- 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
- 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
- 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
- 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
- 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
- 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
- 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
- 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
- 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
- 314, 315, 316, 379, 447, 371, 540, 438, 552, 427,
- 554, 408, 484, 557, 343, 614, 326, 414, 321, 322,
- 693, 341, 339, 346, 341, 319, 320, 340, 404, 349,
- 349, 348, 340, 346, 400, 375, 341, 341, 435, 436,
- 375, 371, 473, 348, 348, 339, 375, 341, 721, 379,
- 371, 345, 362, 419, 357, 358, 375, 387, 379, 387,
- 390, 387, 376, 349, 399, 341, 387, 381, 382, 487,
- 400, 340, 348, 357, 404, 340, 519, 346, 521, 400,
- 340, 346, 343, 404, 618, 340, 346, 343, 506, 419,
- 346, 346, 375, 349, 346, 340, 340, 349, 419, 342,
- 430, 346, 346, 346, 343, 346, 482, 651, 349, 430,
- 323, 324, 584, 596, 597, 598, 599, 375, 484, 346,
- 486, 552, 349, 554, 567, 375, 557, 328, 329, 330,
- 331, 332, 333, 334, 335, 336, 337, 341, 346, 346,
- 571, 349, 349, 364, 365, 366, 349, 348, 354, 355,
- 356, 351, 482, 353, 484, 754, 486, 344, 692, 346,
- 704, 482, 348, 484, 375, 486, 317, 318, 346, 347,
- 346, 347, 592, 593, 340, 594, 595, 620, 600, 601,
- 339, 624, 579, 655, 341, 375, 375, 361, 360, 359,
- 325, 327, 558, 342, 341, 339, 344, 349, 339, 349,
- 744, 339, 339, 349, 347, 344, 375, 349, 339, 349,
- 540, 642, 643, 339, 375, 349, 349, 340, 584, 540,
- 651, 342, 375, 342, 346, 339, 760, 383, 558, 342,
- 375, 340, 339, 343, 340, 340, 348, 558, 349, 343,
- 343, 349, 344, 602, 687, 603, 606, 604, 710, 605,
- 693, 489, 607, 320, 584, 387, 578, 665, 695, 738,
- 750, 695, 751, 584, 721, 550, 712, 387, 550, 550,
- -1, 400, -1, 704, 404, -1, 404, -1, 721, -1,
- 398, -1, -1, -1, 614, -1, -1, -1, 618, 655,
- 733, -1, 710, 614, -1, 726, -1, 618, -1, -1,
- -1, -1, -1, -1, -1, -1, 749, -1, -1, -1,
- -1, -1, -1, 744, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 655, -1, 693, -1, -1,
- -1, -1, -1, -1, 655, -1, -1, -1, -1, -1,
- 716, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 721, -1, -1, -1, -1,
- -1, -1, 692, 693, -1, 695, -1, -1, -1, -1,
- -1, 692, 693, -1, 695, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 716, -1, -1, -1,
- -1, 721, -1, -1, -1, 716, -1, -1, -1, -1,
- 721, -1, 732, -1, -1, -1, -1, -1, -1, 739,
- -1, 732, -1, -1, -1, -1, -1, -1, 739, -1,
- 750, -1, -1, -1, 754, -1, -1, -1, -1, 750,
- 760, -1, -1, 754, -1, -1, -1, 0, -1, 760,
+ 0, 401, 0, 481, 401, 382, 406, 0, 493, 0,
+ 634, 502, 636, 622, 0, 639, 542, 547, 737, 567,
+ 434, 439, 552, 569, 401, 348, 440, 359, 390, 406,
+ 413, 561, 558, 348, 331, 332, 336, 899, 385, 348,
+ 570, 348, 351, 528, 906, 356, 349, 353, 351, 426,
+ 374, 375, 376, 385, 916, 358, 351, 368, 381, 382,
+ 383, 384, 409, 481, 359, 329, 330, 382, 430, 547,
+ 367, 368, 372, 382, 552, 382, 490, 491, 351, 385,
+ 558, 499, 500, 561, 446, 349, 359, 351, 351, 349,
+ 356, 355, 570, 359, 640, 358, 473, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 361, 540, 363,
+ 601, 589, 603, 531, 546, 351, 548, 358, 351, 551,
+ 350, 553, 358, 555, 556, 358, 356, 353, 560, 547,
+ 356, 350, 741, 359, 552, 350, 350, 356, 350, 350,
+ 558, 356, 356, 561, 356, 356, 354, 350, 356, 634,
+ 774, 636, 570, 356, 639, 351, 350, 540, 649, 350,
+ 350, 709, 356, 350, 350, 356, 356, 349, 653, 356,
+ 356, 589, 349, 556, 408, 409, 410, 411, 412, 413,
+ 414, 350, 350, 350, 359, 350, 349, 356, 356, 356,
+ 567, 356, 569, 350, 350, 356, 350, 350, 350, 356,
+ 356, 920, 356, 565, 356, 350, 350, 350, 350, 350,
+ 350, 356, 356, 356, 356, 356, 356, 350, 352, 349,
+ 352, 352, 356, 356, 356, 356, 381, 382, 383, 384,
+ 854, 779, 632, 842, 349, 632, 720, 721, 722, 723,
+ 658, 327, 328, 382, 382, 382, 385, 385, 385, 349,
+ 356, 367, 743, 359, 382, 632, 747, 385, 382, 382,
+ 349, 385, 385, 640, 382, 333, 334, 385, 798, 799,
+ 382, 382, 349, 385, 385, 805, 806, 356, 357, 382,
+ 765, 766, 385, 349, 382, 811, 910, 385, 382, 774,
+ 704, 385, 364, 365, 366, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 385, 356, 356, 926, 359, 359,
+ 798, 799, 356, 356, 359, 359, 359, 805, 806, 356,
+ 357, 385, 709, 811, 385, 813, 716, 717, 353, 718,
+ 719, 385, 724, 725, 353, 351, 385, 385, 351, 840,
+ 358, 350, 843, 385, 359, 356, 358, 385, 371, 356,
+ 356, 356, 356, 350, 356, 385, 356, 356, 356, 854,
+ 349, 356, 356, 350, 349, 351, 359, 358, 349, 351,
+ 798, 799, 382, 348, 352, 335, 337, 805, 806, 369,
+ 390, 382, 883, 811, 352, 813, 370, 354, 398, 390,
+ 398, 401, 779, 385, 349, 398, 406, 398, 406, 900,
+ 401, 896, 398, 406, 349, 406, 416, 359, 385, 359,
+ 349, 359, 349, 357, 915, 910, 426, 425, 359, 359,
+ 430, 359, 349, 359, 349, 426, 385, 385, 350, 430,
+ 358, 348, 356, 843, 350, 356, 446, 356, 350, 352,
+ 393, 352, 356, 348, 354, 446, 350, 382, 349, 358,
+ 353, 385, 359, 350, 397, 353, 843, 353, 726, 359,
+ 354, 727, 729, 473, 430, 728, 731, 430, 730, 426,
+ 572, 331, 473, 883, 484, 703, 845, 818, 905, 916,
+ 845, 917, 424, 484, 883, 796, 632, 632, 563, 803,
+ 398, 794, 801, 632, 806, 799, 883, -1, 813, -1,
+ -1, 809, -1, -1, -1, 811, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 536, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 558, -1,
+ -1, -1, -1, -1, -1, 565, -1, 567, -1, 569,
+ -1, -1, -1, -1, 565, -1, 567, -1, 569, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 622, -1, -1, -1, -1, -1, -1, -1,
+ -1, 622, 632, -1, -1, -1, -1, -1, -1, -1,
+ 640, 632, -1, -1, -1, -1, -1, -1, -1, 640,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 709,
+ -1, -1, -1, -1, -1, -1, -1, -1, 709, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 737, -1, -1,
+ -1, 741, -1, -1, -1, -1, 737, -1, -1, -1,
+ 741, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 779,
+ -1, -1, -1, -1, -1, -1, -1, -1, 779, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 811, -1, 813, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 842, 843, -1, 845, -1, 845, -1, -1,
+ -1, 842, 843, -1, 845, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 883, -1, -1, -1, -1, -1, -1,
+ -1, -1, 883, -1, -1, -1, -1, -1, -1, 899,
+ -1, -1, -1, -1, -1, -1, 906, -1, 899, -1,
+ -1, -1, -1, -1, -1, 906, 916, -1, -1, -1,
+ 920, -1, -1, -1, -1, 916, 926, -1, -1, 920,
+ -1, -1, -1, 0, -1, 926, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 351, -1, -1, -1, -1, -1,
+ -1, -1, 359, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 373, 374, 375, 376,
+ 377, -1, -1, -1, -1, -1, -1, -1, -1, 386,
+ 387, 388, 389, 390, 391, 392, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 408, 409, 410, 411, 412, 413, -1, -1, -1,
+ -1, -1, -1, -1, -1, 422, -1, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, -1, 329, 330, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 348, 349, -1, 351, -1, 353, 354,
+ -1, -1, -1, -1, 359, 360, 361, 362, 363, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 373, 374,
+ 375, 376, 377, -1, -1, -1, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, -1, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
@@ -2720,20 +3150,21 @@ static const yytype_int16 yycheck[] =
283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
- 313, 314, 315, 316, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 349, -1, -1, -1,
+ 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, -1, 329, 330, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 363, 364, 365, 366, 367, -1, -1, -1, -1, -1,
- -1, -1, -1, 376, 377, 378, 379, 380, 381, 382,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 398, 399, 400, 401, 402,
- 403, -1, -1, -1, -1, -1, -1, -1, -1, 412,
- -1, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ -1, -1, -1, -1, -1, 348, 349, -1, 351, -1,
+ 353, 354, -1, -1, -1, -1, 359, 360, 361, 362,
+ 363, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 373, 374, 375, 376, 377, -1, -1, -1, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, -1, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
- 443, 444, 3, 4, 5, 6, 7, 8, 9, 10,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
@@ -2764,20 +3195,21 @@ static const yytype_int16 yycheck[] =
281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
- 311, 312, 313, 314, 315, 316, -1, -1, 319, 320,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, -1, 329, 330,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 338, 339, -1,
- 341, -1, 343, 344, -1, -1, -1, -1, 349, 350,
- 351, 352, 353, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 363, 364, 365, 366, 367, -1, -1, -1,
- 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
- 381, 382, 383, 384, 385, 386, -1, 388, 389, 390,
- 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ -1, -1, -1, -1, -1, -1, -1, 348, 349, -1,
+ 351, -1, 353, -1, -1, -1, -1, -1, 359, 360,
+ 361, 362, 363, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 373, 374, 375, 376, 377, -1, -1, -1,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, -1, 398, 399, 400,
401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
- 441, 442, 443, 444, 3, 4, 5, 6, 7, 8,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
@@ -2808,20 +3240,21 @@ static const yytype_int16 yycheck[] =
279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
- 309, 310, 311, 312, 313, 314, 315, 316, -1, -1,
- 319, 320, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 338,
- 339, -1, 341, -1, 343, 344, -1, -1, -1, -1,
- 349, 350, 351, 352, 353, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 363, 364, 365, 366, 367, -1,
- -1, -1, 371, 372, 373, 374, 375, 376, 377, 378,
- 379, 380, 381, 382, 383, 384, 385, 386, -1, 388,
- 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, -1,
+ 329, 330, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 348,
+ 349, -1, 351, -1, 353, -1, -1, -1, -1, -1,
+ 359, 360, 361, 362, 363, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 373, 374, 375, 376, 377, -1,
+ -1, -1, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, -1, 398,
399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
- 439, 440, 441, 442, 443, 444, 3, 4, 5, 6,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
@@ -2853,19 +3286,20 @@ static const yytype_int16 yycheck[] =
287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
- -1, -1, 319, 320, -1, -1, -1, -1, -1, -1,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, -1, 329, 330, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 338, 339, -1, 341, -1, 343, -1, -1, -1,
- -1, -1, 349, 350, 351, 352, 353, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 363, 364, 365, 366,
- 367, -1, -1, -1, 371, 372, 373, 374, 375, 376,
- 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
- -1, 388, 389, 390, 391, 392, 393, 394, 395, 396,
- 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ -1, 348, 349, -1, 351, -1, -1, -1, -1, -1,
+ -1, -1, 359, 360, 361, 362, 363, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 373, 374, 375, 376,
+ 377, -1, -1, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ -1, 398, 399, 400, 401, 402, 403, 404, 405, 406,
407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
- 437, 438, 439, 440, 441, 442, 443, 444, 3, 4,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
@@ -2897,19 +3331,20 @@ static const yytype_int16 yycheck[] =
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
- 315, 316, -1, -1, 319, 320, -1, -1, -1, -1,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, -1, 329, 330, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 338, 339, -1, 341, -1, 343, -1,
- -1, -1, -1, -1, 349, 350, 351, 352, 353, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 363, 364,
- 365, 366, 367, -1, -1, -1, 371, 372, 373, 374,
- 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
- 385, 386, -1, 388, 389, 390, 391, 392, 393, 394,
- 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
- 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
- 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ -1, -1, -1, 348, 349, -1, 351, -1, -1, -1,
+ -1, -1, -1, -1, 359, 360, 361, 362, 363, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 373, 374,
+ 375, 376, 377, -1, -1, -1, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, -1, 424,
425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
@@ -2941,20 +3376,21 @@ static const yytype_int16 yycheck[] =
283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
- 313, 314, 315, 316, -1, -1, 319, 320, -1, -1,
+ 313, 314, 315, 316, -1, -1, -1, 320, 321, 322,
+ 323, 324, 325, 326, -1, -1, 329, 330, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 338, 339, -1, 341, -1,
- -1, -1, -1, -1, -1, -1, 349, 350, 351, 352,
- 353, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 363, 364, 365, 366, 367, -1, -1, -1, 371, 372,
- 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
- 383, 384, 385, 386, -1, 388, 389, 390, 391, 392,
- 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
- 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ -1, -1, -1, -1, -1, 348, 349, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 360, 361, 362,
+ 363, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 373, 374, 375, 376, -1, -1, -1, -1, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 408, 409, 410, 411, 412,
413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
- 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ -1, 424, 425, 426, 427, 428, 429, 430, 431, 432,
433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
- 443, 444, 3, 4, 5, 6, 7, 8, 9, 10,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
@@ -2985,20 +3421,21 @@ static const yytype_int16 yycheck[] =
281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
- 311, 312, 313, 314, 315, 316, -1, -1, 319, 320,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 338, 339, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 349, 350,
- 351, 352, 353, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 363, 364, 365, 366, 367, -1, -1, -1,
- 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
- 381, 382, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 398, 399, 400,
- 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
- 411, 412, -1, 414, 415, 416, 417, 418, 419, 420,
- 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 351, -1, -1, -1, -1, -1, -1, -1, 359, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 373, 374, 375, 376, 377, -1, -1, -1,
+ -1, -1, -1, -1, -1, 386, 387, 388, 389, 390,
+ 391, 392, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 408, 409, 410,
+ 411, 412, 413, -1, -1, -1, -1, -1, -1, -1,
+ -1, 422, -1, 424, 425, 426, 427, 428, 429, 430,
431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
- 441, 442, 443, 444, 3, 4, 5, 6, 7, 8,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
@@ -3030,19 +3467,20 @@ static const yytype_int16 yycheck[] =
289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
309, 310, 311, 312, 313, 314, 315, 316, -1, -1,
- 319, 320, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 338,
- 339, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 350, 351, 352, 353, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 363, 364, 365, 366, -1, -1,
- -1, -1, 371, 372, 373, 374, 375, 376, 377, 378,
- 379, 380, 381, 382, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 398,
- 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
- 409, 410, 411, 412, -1, 414, 415, 416, 417, 418,
- 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ -1, 320, 321, 322, 323, 324, 325, 326, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 373, 374, 375, 376, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 386, 387, 388,
+ 389, 390, 391, 392, 393, -1, -1, 396, -1, 398,
+ 399, -1, -1, 402, -1, -1, -1, -1, -1, 408,
+ 409, 410, 411, 412, 413, -1, -1, -1, -1, -1,
+ -1, -1, -1, 422, -1, 424, 425, 426, 427, 428,
429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
- 439, 440, 441, 442, 443, 444, 3, 4, 5, 6,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
@@ -3074,19 +3512,20 @@ static const yytype_int16 yycheck[] =
287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ -1, -1, -1, 320, 321, 322, 323, 324, 325, 326,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 349, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 363, 364, 365, 366,
- 367, -1, -1, -1, -1, -1, -1, -1, -1, 376,
- 377, 378, 379, 380, 381, 382, -1, -1, -1, -1,
+ -1, -1, 359, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 373, 374, 375, 376,
+ -1, -1, -1, -1, -1, -1, -1, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 398, 399, 400, 401, 402, 403, -1, -1, -1,
- -1, -1, -1, -1, -1, 412, -1, 414, 415, 416,
- 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ -1, 408, 409, 410, 411, 412, 413, -1, -1, -1,
+ -1, -1, -1, -1, -1, 422, -1, 424, 425, 426,
427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
- 437, 438, 439, 440, 441, 442, 443, 444, 3, 4,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
@@ -3118,19 +3557,20 @@ static const yytype_int16 yycheck[] =
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
- 315, 316, -1, -1, -1, -1, -1, -1, -1, -1,
+ 315, 316, -1, -1, -1, 320, 321, 322, 323, 324,
+ 325, 326, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 351, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 349, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 363, 364,
- 365, 366, -1, -1, -1, -1, -1, -1, -1, -1,
- 375, 376, 377, 378, 379, 380, 381, 382, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 373, 374,
+ 375, 376, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 386, 387, 388, 389, 390, 391, 392, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 398, 399, 400, 401, 402, 403, -1,
- -1, -1, -1, -1, -1, -1, -1, 412, -1, 414,
- 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ -1, -1, -1, 408, 409, 410, 411, 412, 413, -1,
+ -1, -1, -1, -1, -1, -1, -1, 422, -1, 424,
425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
@@ -3162,20 +3602,21 @@ static const yytype_int16 yycheck[] =
283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
- 313, 314, 315, 316, -1, -1, -1, -1, -1, -1,
+ 313, 314, 315, 316, -1, -1, -1, 320, 321, 322,
+ 323, 324, 325, 326, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 344, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 354, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 363, 364, 365, 366, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 376, 377, 378, 379, 380, 381, 382,
+ 373, 374, 375, 376, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 386, 387, 388, 389, 390, 391, 392,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 398, 399, 400, 401, 402,
- 403, -1, -1, -1, -1, -1, -1, -1, -1, 412,
- -1, 414, 415, 416, 417, 418, 419, 420, 421, 422,
- 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ -1, -1, -1, -1, -1, 408, 409, 410, 411, 412,
+ 413, -1, -1, -1, -1, -1, -1, -1, -1, 422,
+ -1, 424, 425, 426, 427, 428, 429, 430, 431, 432,
433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
- 443, 444, 3, 4, 5, 6, 7, 8, 9, 10,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
@@ -3206,20 +3647,21 @@ static const yytype_int16 yycheck[] =
281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
- 311, 312, 313, 314, 315, 316, -1, -1, -1, -1,
+ 311, 312, 313, 314, 315, 316, -1, -1, -1, 320,
+ 321, 322, 323, 324, 325, 326, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 344, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 354, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 363, 364, 365, 366, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 376, 377, 378, 379, 380,
- 381, 382, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 398, 399, 400,
- 401, 402, 403, -1, -1, -1, -1, -1, -1, -1,
- -1, 412, -1, 414, 415, 416, 417, 418, 419, 420,
- 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ -1, -1, 373, 374, 375, 376, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 386, 387, 388, 389, 390,
+ 391, 392, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 408, 409, 410,
+ 411, 412, 413, -1, -1, -1, -1, -1, -1, -1,
+ -1, 422, -1, 424, 425, 426, 427, 428, 429, 430,
431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
- 441, 442, 443, 444, 3, 4, 5, 6, 7, 8,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
@@ -3251,19 +3693,20 @@ static const yytype_int16 yycheck[] =
289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
309, 310, 311, 312, 313, 314, 315, 316, -1, -1,
+ -1, 320, 321, 322, 323, 324, 325, 326, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 344, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 354, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 363, 364, 365, 366, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 376, 377, 378,
- 379, 380, 381, 382, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 398,
- 399, 400, 401, 402, 403, -1, -1, -1, -1, -1,
- -1, -1, -1, 412, -1, 414, 415, 416, 417, 418,
- 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ -1, -1, -1, -1, 373, 374, 375, 376, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 386, 387, 388,
+ 389, 390, 391, 392, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 408,
+ 409, 410, 411, 412, 413, -1, -1, -1, -1, -1,
+ -1, -1, -1, 422, -1, 424, 425, 426, 427, 428,
429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
- 439, 440, 441, 442, 443, 444, 3, 4, 5, 6,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
@@ -3295,19 +3738,20 @@ static const yytype_int16 yycheck[] =
287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ -1, -1, -1, 320, 321, 322, 323, 324, 325, 326,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 363, 364, 365, 366,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 376,
- 377, 378, 379, 380, 381, 382, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 373, 374, 375, 376,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 386,
+ 387, 388, 389, 390, 391, 392, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 398, 399, 400, 401, 402, 403, -1, -1, -1,
- -1, -1, -1, -1, -1, 412, -1, 414, 415, 416,
- 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ -1, 408, 409, 410, 411, 412, 413, -1, -1, -1,
+ -1, -1, -1, -1, -1, 422, -1, 424, 425, 426,
427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
- 437, 438, 439, 440, 441, 442, 443, 444, 4, 5,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
@@ -3339,18 +3783,19 @@ static const yytype_int16 yycheck[] =
286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
296, 297, 298, 299, 300, 301, 302, 303, 304, 305,
306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
- 316, -1, -1, 319, 320, -1, -1, -1, -1, -1,
+ 316, -1, -1, -1, -1, -1, -1, 323, -1, -1,
+ -1, -1, -1, 329, 330, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 338, 339, -1, -1, -1, 343, 344, -1,
- -1, -1, -1, -1, 350, 351, 352, 353, -1, -1,
+ -1, -1, 348, 349, -1, -1, -1, 353, 354, -1,
+ -1, -1, -1, -1, 360, 361, 362, 363, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 371, 372, 373, 374, 375,
- 376, -1, -1, -1, -1, 381, 382, -1, -1, -1,
+ -1, -1, -1, -1, -1, 381, 382, 383, 384, 385,
+ 386, -1, -1, -1, -1, 391, 392, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 404, 405,
- 406, 407, 408, 409, 410, 411, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 414, 415,
+ 416, 417, 418, 419, 420, 421, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 426, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 436, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
@@ -3381,18 +3826,19 @@ static const yytype_int16 yycheck[] =
283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
- 313, 314, 315, 316, -1, -1, 319, 320, -1, -1,
+ 313, 314, 315, 316, -1, -1, -1, -1, -1, -1,
+ 323, -1, -1, -1, -1, -1, 329, 330, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 338, 339, -1, -1, 342,
- -1, -1, -1, -1, -1, -1, -1, 350, 351, 352,
- 353, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 371, 372,
- 373, 374, 375, 376, -1, -1, -1, -1, 381, 382,
+ -1, -1, -1, -1, -1, 348, 349, -1, -1, -1,
+ 353, 354, -1, -1, -1, -1, -1, 360, 361, 362,
+ 363, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 381, 382,
+ 383, 384, 385, 386, -1, -1, -1, -1, 391, 392,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 404, 405, 406, 407, 408, 409, 410, 411, -1,
+ -1, 414, 415, 416, 417, 418, 419, 420, 421, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 426, 4, 5, 6, 7, 8, 9,
+ -1, -1, -1, 436, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
@@ -3423,18 +3869,19 @@ static const yytype_int16 yycheck[] =
280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
- 310, 311, 312, 313, 314, 315, 316, -1, -1, 319,
- 320, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 338, 339,
- -1, -1, -1, 343, -1, -1, -1, -1, -1, -1,
- 350, 351, 352, 353, -1, -1, -1, -1, -1, -1,
+ 310, 311, 312, 313, 314, 315, 316, -1, -1, -1,
+ -1, -1, -1, 323, -1, -1, -1, -1, -1, 329,
+ 330, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 348, 349,
+ -1, -1, 352, -1, -1, -1, -1, -1, -1, -1,
+ 360, 361, 362, 363, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 371, 372, 373, 374, 375, 376, -1, -1, -1,
- -1, 381, 382, -1, -1, -1, -1, -1, -1, -1,
+ -1, 381, 382, 383, 384, 385, 386, -1, -1, -1,
+ -1, 391, 392, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 404, 405, 406, 407, 408, 409,
- 410, 411, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 426, 4, 5, 6,
+ -1, -1, -1, -1, 414, 415, 416, 417, 418, 419,
+ 420, 421, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 436, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
@@ -3466,17 +3913,18 @@ static const yytype_int16 yycheck[] =
287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
- -1, -1, 319, 320, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 323, -1, -1, -1,
+ -1, -1, 329, 330, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 338, 339, -1, -1, 342, -1, -1, -1, -1,
- -1, -1, -1, 350, 351, 352, 353, -1, -1, -1,
+ -1, 348, 349, -1, -1, -1, 353, -1, -1, -1,
+ -1, -1, -1, 360, 361, 362, 363, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 371, 372, 373, 374, 375, 376,
- -1, -1, -1, -1, 381, 382, -1, -1, -1, -1,
+ -1, -1, -1, -1, 381, 382, 383, 384, 385, 386,
+ -1, -1, -1, -1, 391, 392, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 404, 405, 406,
- 407, 408, 409, 410, 411, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 426,
+ -1, -1, -1, -1, -1, -1, -1, 414, 415, 416,
+ 417, 418, 419, 420, 421, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 436,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
@@ -3508,18 +3956,19 @@ static const yytype_int16 yycheck[] =
284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
- 314, 315, 316, -1, -1, 319, 320, -1, -1, -1,
+ 314, 315, 316, -1, -1, -1, -1, -1, -1, 323,
+ -1, -1, -1, -1, -1, 329, 330, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 338, 339, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 349, 350, 351, 352, 353,
+ -1, -1, -1, -1, 348, 349, -1, -1, 352, -1,
+ -1, -1, -1, -1, -1, -1, 360, 361, 362, 363,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 371, 372, 373,
- 374, 375, 376, -1, -1, -1, -1, 381, 382, -1,
+ -1, -1, -1, -1, -1, -1, -1, 381, 382, 383,
+ 384, 385, 386, -1, -1, -1, -1, 391, 392, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 404, 405, 406, 407, 408, 409, 410, 411, -1, -1,
+ 414, 415, 416, 417, 418, 419, 420, 421, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 426, 4, 5, 6, 7, 8, 9, 10,
+ -1, -1, 436, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
@@ -3550,18 +3999,19 @@ static const yytype_int16 yycheck[] =
281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
- 311, 312, 313, 314, 315, 316, -1, -1, 319, 320,
+ 311, 312, 313, 314, 315, 316, -1, -1, -1, -1,
+ -1, -1, 323, -1, -1, -1, -1, -1, 329, 330,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 338, 339, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 350,
- 351, 352, 353, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 348, 349, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 359, 360,
+ 361, 362, 363, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 371, 372, 373, 374, 375, 376, -1, -1, -1, -1,
- 381, 382, -1, -1, -1, -1, -1, -1, -1, -1,
+ 381, 382, 383, 384, 385, 386, -1, -1, -1, -1,
+ 391, 392, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 404, 405, 406, 407, 408, 409, 410,
- 411, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 426, 4, 5, 6, 7,
+ -1, -1, -1, 414, 415, 416, 417, 418, 419, 420,
+ 421, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 436, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
@@ -3593,37 +4043,144 @@ static const yytype_int16 yycheck[] =
288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
308, 309, 310, 311, 312, 313, 314, 315, 316, -1,
- -1, 319, 320, -1, -1, 413, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 427,
- 338, 339, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 350, 351, 352, 353, 444, 445, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 371, 372, 373, 374, 375, 376, -1,
- -1, -1, -1, 381, 382, -1, -1, -1, 476, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 487,
- -1, -1, -1, -1, -1, -1, 404, 405, 406, 407,
- 408, 409, 410, 411, -1, -1, -1, -1, 506, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 426, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 323, -1, -1, -1, -1,
+ -1, 329, 330, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 348, 349, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 360, 361, 362, 363, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 381, 382, 383, 384, 385, 386, -1,
+ -1, -1, -1, 391, 392, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 414, 415, 416, 417,
+ 418, 419, 420, 421, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 436, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, -1, -1, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, -1, -1, -1, -1, -1, -1, 323, -1,
+ -1, -1, -1, -1, 329, 330, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 576, -1,
+ -1, -1, -1, 348, 349, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 360, 361, 362, 363, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 589, 590, 591, 592, 593, 594, 595, 596, 597,
- 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ -1, -1, -1, -1, -1, -1, 381, 382, 383, 384,
+ 385, 386, -1, -1, -1, -1, 391, 392, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 414,
+ 415, 416, 417, 418, 419, 420, 421, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 436, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
+ -1, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
+ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, -1, -1, -1, -1, -1,
+ -1, 323, -1, -1, -1, -1, -1, 329, 330, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 348, 349, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 360, 361,
+ 362, 363, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 381,
+ 382, 383, 384, 385, 386, -1, -1, -1, -1, 391,
+ 392, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 414, 415, 416, 417, 418, 419, 420, 421,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 436, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, -1, -1, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
+ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
+ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
+ 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, -1, -1,
+ -1, -1, -1, -1, 323, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 710
+ -1, -1, -1, -1, -1, -1, -1, 386, -1, -1,
+ -1, -1, 391, 392
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -3661,119 +4218,142 @@ static const yytype_int16 yystos[] =
282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
- 312, 313, 314, 315, 316, 349, 363, 364, 365, 366,
- 367, 376, 377, 378, 379, 380, 381, 382, 398, 399,
- 400, 401, 402, 403, 412, 414, 415, 416, 417, 418,
- 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
- 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
- 439, 440, 441, 442, 443, 444, 476, 477, 480, 481,
- 482, 483, 487, 488, 489, 490, 491, 492, 495, 496,
- 497, 498, 499, 501, 506, 507, 508, 549, 550, 551,
- 507, 343, 375, 339, 339, 349, 375, 349, 552, 340,
- 346, 484, 485, 486, 496, 501, 346, 349, 375, 349,
- 375, 497, 501, 357, 503, 504, 0, 550, 501, 510,
- 343, 375, 399, 493, 494, 375, 500, 341, 349, 502,
- 343, 528, 485, 484, 486, 375, 375, 339, 348, 502,
- 343, 346, 349, 479, 319, 320, 338, 339, 350, 351,
- 352, 353, 371, 372, 373, 374, 375, 404, 405, 406,
- 407, 408, 409, 410, 411, 446, 447, 448, 450, 451,
- 452, 453, 454, 455, 456, 457, 458, 499, 501, 505,
- 502, 349, 496, 501, 511, 512, 509, 348, 340, 346,
- 340, 346, 342, 457, 459, 460, 461, 462, 463, 464,
- 465, 466, 467, 468, 469, 470, 341, 349, 341, 343,
- 344, 349, 383, 384, 385, 386, 388, 389, 390, 391,
- 392, 393, 394, 395, 396, 397, 413, 457, 470, 472,
- 474, 476, 480, 499, 501, 517, 518, 519, 520, 521,
- 529, 530, 531, 532, 535, 536, 539, 540, 541, 548,
- 553, 502, 348, 502, 343, 472, 515, 348, 478, 375,
- 346, 349, 457, 457, 474, 319, 320, 341, 345, 340,
- 340, 346, 382, 472, 339, 457, 346, 358, 501, 375,
- 513, 514, 344, 512, 511, 470, 475, 494, 375, 354,
- 355, 356, 351, 353, 317, 318, 321, 322, 357, 358,
- 323, 324, 361, 360, 359, 325, 327, 326, 362, 342,
- 342, 470, 341, 344, 522, 339, 349, 349, 543, 339,
- 339, 349, 349, 474, 339, 474, 347, 349, 349, 349,
- 349, 328, 329, 330, 331, 332, 333, 334, 335, 336,
- 337, 348, 473, 346, 349, 344, 518, 532, 536, 541,
- 515, 348, 515, 516, 515, 511, 375, 340, 449, 474,
- 375, 472, 457, 513, 502, 346, 349, 344, 457, 457,
- 457, 459, 459, 460, 460, 461, 461, 461, 461, 462,
- 462, 463, 464, 465, 466, 467, 468, 471, 342, 375,
- 554, 555, 529, 542, 518, 544, 474, 349, 474, 347,
- 472, 472, 515, 344, 346, 344, 342, 349, 514, 474,
- 339, 342, 346, 523, 474, 489, 496, 534, 383, 517,
- 530, 545, 340, 340, 344, 515, 347, 475, 342, 555,
- 344, 375, 340, 339, 534, 546, 547, 525, 526, 527,
- 533, 537, 472, 340, 348, 519, 524, 528, 474, 349,
- 340, 387, 521, 519, 343, 515, 340, 474, 524, 525,
- 529, 538, 349, 344
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 351, 359, 373, 374, 375,
+ 376, 377, 386, 387, 388, 389, 390, 391, 392, 408,
+ 409, 410, 411, 412, 413, 422, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 486, 487, 490,
+ 491, 492, 493, 497, 498, 499, 500, 501, 502, 505,
+ 506, 507, 508, 509, 511, 516, 517, 518, 559, 560,
+ 561, 563, 570, 574, 575, 580, 583, 349, 349, 349,
+ 349, 349, 349, 349, 349, 351, 517, 353, 385, 349,
+ 349, 359, 385, 359, 562, 350, 356, 494, 495, 496,
+ 506, 511, 356, 359, 385, 359, 385, 507, 511, 367,
+ 513, 514, 0, 560, 491, 499, 506, 359, 490, 385,
+ 566, 567, 584, 585, 382, 385, 566, 382, 566, 382,
+ 566, 382, 566, 382, 566, 566, 584, 382, 566, 385,
+ 564, 565, 511, 520, 353, 385, 409, 503, 504, 385,
+ 510, 351, 359, 512, 353, 538, 563, 495, 494, 496,
+ 385, 385, 349, 358, 512, 353, 356, 359, 489, 329,
+ 330, 348, 349, 360, 361, 362, 363, 381, 382, 383,
+ 384, 385, 414, 415, 416, 417, 418, 419, 420, 421,
+ 456, 457, 458, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 509, 511, 515, 512, 350, 385, 359, 358,
+ 356, 350, 356, 350, 356, 358, 356, 356, 356, 350,
+ 356, 356, 356, 356, 356, 356, 356, 350, 356, 350,
+ 356, 349, 352, 356, 359, 506, 511, 521, 522, 519,
+ 358, 350, 356, 350, 356, 352, 467, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 351,
+ 359, 353, 354, 359, 393, 394, 395, 396, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 423, 467,
+ 480, 482, 484, 486, 490, 509, 511, 527, 528, 529,
+ 530, 531, 539, 540, 541, 542, 545, 546, 549, 550,
+ 551, 558, 563, 512, 358, 512, 353, 482, 525, 358,
+ 488, 385, 356, 359, 467, 467, 484, 329, 330, 351,
+ 355, 350, 350, 356, 392, 482, 349, 467, 356, 368,
+ 563, 348, 351, 382, 567, 584, 385, 585, 348, 381,
+ 382, 383, 384, 571, 572, 382, 480, 485, 573, 382,
+ 381, 382, 383, 384, 576, 577, 382, 485, 578, 382,
+ 348, 579, 382, 584, 385, 485, 511, 581, 582, 382,
+ 485, 352, 565, 511, 385, 523, 524, 354, 522, 521,
+ 485, 504, 385, 364, 365, 366, 361, 363, 327, 328,
+ 331, 332, 367, 368, 333, 334, 371, 370, 369, 335,
+ 337, 336, 372, 352, 352, 480, 354, 532, 349, 359,
+ 359, 553, 349, 349, 359, 359, 484, 349, 484, 357,
+ 359, 359, 359, 359, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 358, 483, 356, 359, 354, 528,
+ 542, 546, 551, 525, 358, 354, 525, 526, 525, 521,
+ 385, 350, 459, 484, 385, 482, 467, 348, 382, 568,
+ 569, 350, 358, 350, 356, 350, 356, 350, 356, 356,
+ 350, 356, 350, 356, 350, 356, 356, 350, 356, 356,
+ 350, 356, 350, 356, 350, 350, 523, 512, 356, 359,
+ 354, 467, 467, 467, 469, 469, 470, 470, 471, 471,
+ 471, 471, 472, 472, 473, 474, 475, 476, 477, 478,
+ 481, 352, 539, 552, 528, 554, 484, 359, 484, 357,
+ 482, 482, 525, 354, 356, 354, 352, 352, 356, 352,
+ 356, 572, 571, 485, 573, 577, 576, 485, 578, 348,
+ 579, 581, 582, 359, 524, 484, 533, 484, 499, 544,
+ 393, 527, 540, 555, 350, 350, 354, 525, 348, 382,
+ 350, 350, 350, 350, 350, 350, 357, 354, 385, 350,
+ 349, 544, 556, 557, 535, 536, 537, 543, 547, 482,
+ 358, 529, 534, 538, 484, 359, 350, 397, 531, 529,
+ 353, 525, 350, 484, 534, 535, 539, 548, 359, 354
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_int16 yyr1[] =
{
- 0, 445, 446, 447, 447, 447, 447, 447, 447, 447,
- 447, 447, 447, 447, 447, 447, 447, 447, 448, 448,
- 448, 448, 448, 448, 449, 450, 451, 452, 452, 453,
- 453, 454, 454, 455, 456, 456, 456, 457, 457, 457,
- 457, 458, 458, 458, 458, 459, 459, 459, 459, 460,
- 460, 460, 461, 461, 461, 462, 462, 462, 462, 462,
- 463, 463, 463, 464, 464, 465, 465, 466, 466, 467,
- 467, 468, 468, 469, 469, 470, 471, 470, 472, 472,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 474, 474, 475, 476, 476, 476, 476, 476, 476,
- 476, 476, 476, 478, 477, 479, 479, 480, 481, 481,
- 482, 482, 483, 484, 484, 485, 485, 485, 485, 486,
- 487, 487, 487, 487, 487, 488, 488, 488, 488, 488,
- 489, 489, 490, 491, 491, 491, 491, 491, 491, 491,
- 491, 492, 493, 493, 494, 494, 494, 495, 496, 496,
- 497, 497, 497, 497, 497, 497, 497, 498, 498, 498,
- 498, 498, 498, 498, 498, 498, 498, 498, 498, 498,
- 498, 498, 498, 498, 498, 498, 498, 498, 498, 498,
- 498, 498, 498, 498, 498, 498, 498, 498, 498, 498,
- 498, 498, 499, 500, 500, 501, 501, 502, 502, 502,
- 502, 503, 503, 504, 505, 505, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 506, 506, 506, 506, 506, 506, 506, 506, 506, 506,
- 507, 507, 507, 509, 508, 510, 508, 511, 511, 512,
- 512, 513, 513, 514, 514, 515, 515, 515, 516, 516,
- 517, 518, 518, 519, 519, 519, 519, 519, 519, 519,
- 519, 520, 521, 522, 523, 521, 524, 524, 526, 525,
- 527, 525, 528, 528, 529, 529, 530, 530, 531, 531,
- 532, 533, 533, 534, 534, 535, 535, 537, 536, 538,
- 538, 539, 539, 540, 540, 542, 541, 543, 541, 544,
- 541, 545, 545, 546, 546, 547, 547, 548, 548, 548,
- 548, 548, 548, 548, 548, 549, 549, 550, 550, 550,
- 552, 551, 553, 554, 554, 555, 555
+ 0, 455, 456, 457, 457, 457, 457, 457, 457, 457,
+ 457, 457, 457, 457, 457, 457, 457, 457, 458, 458,
+ 458, 458, 458, 458, 459, 460, 461, 462, 462, 463,
+ 463, 464, 464, 465, 466, 466, 466, 467, 467, 467,
+ 467, 468, 468, 468, 468, 469, 469, 469, 469, 470,
+ 470, 470, 471, 471, 471, 472, 472, 472, 472, 472,
+ 473, 473, 473, 474, 474, 475, 475, 476, 476, 477,
+ 477, 478, 478, 479, 479, 480, 481, 480, 482, 482,
+ 483, 483, 483, 483, 483, 483, 483, 483, 483, 483,
+ 483, 484, 484, 485, 486, 486, 486, 486, 486, 486,
+ 486, 486, 486, 486, 486, 488, 487, 489, 489, 490,
+ 490, 490, 490, 491, 491, 492, 492, 493, 494, 494,
+ 495, 495, 495, 495, 496, 497, 497, 497, 497, 497,
+ 498, 498, 498, 498, 498, 499, 499, 500, 501, 501,
+ 501, 501, 501, 501, 501, 501, 502, 503, 503, 504,
+ 504, 504, 505, 506, 506, 507, 507, 507, 507, 507,
+ 507, 507, 507, 507, 507, 507, 508, 508, 508, 508,
+ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508,
+ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508,
+ 508, 508, 508, 508, 508, 508, 508, 508, 508, 508,
+ 508, 509, 510, 510, 511, 511, 512, 512, 512, 512,
+ 513, 513, 514, 515, 515, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
+ 517, 517, 517, 519, 518, 520, 518, 521, 521, 522,
+ 522, 523, 523, 524, 524, 525, 525, 525, 525, 526,
+ 526, 527, 528, 528, 529, 529, 529, 529, 529, 529,
+ 529, 529, 530, 531, 532, 533, 531, 534, 534, 536,
+ 535, 537, 535, 538, 538, 539, 539, 540, 540, 541,
+ 541, 542, 543, 543, 544, 544, 545, 545, 547, 546,
+ 548, 548, 549, 549, 550, 550, 552, 551, 553, 551,
+ 554, 551, 555, 555, 556, 556, 557, 557, 558, 558,
+ 558, 558, 558, 558, 558, 558, 559, 559, 560, 560,
+ 560, 562, 561, 563, 564, 564, 565, 565, 566, 566,
+ 567, 567, 568, 568, 569, 569, 570, 570, 570, 570,
+ 570, 570, 571, 571, 572, 572, 572, 572, 572, 573,
+ 573, 574, 574, 575, 575, 575, 575, 575, 575, 575,
+ 575, 576, 576, 577, 577, 577, 577, 578, 578, 579,
+ 579, 580, 580, 580, 580, 581, 581, 582, 582, 583,
+ 583, 584, 584, 585, 585
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
@@ -3788,18 +4368,19 @@ static const yytype_int8 yyr2[] =
1, 3, 3, 1, 3, 1, 3, 1, 3, 1,
3, 1, 3, 1, 3, 1, 0, 6, 1, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 3, 1, 2, 2, 4, 2, 3, 4,
- 2, 3, 4, 0, 6, 2, 3, 2, 1, 1,
- 2, 3, 3, 2, 3, 2, 1, 2, 1, 1,
- 1, 3, 4, 6, 5, 1, 2, 3, 5, 4,
- 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 1, 3, 1, 3, 1, 1, 1, 2,
+ 1, 1, 3, 1, 2, 3, 2, 2, 4, 2,
+ 3, 4, 2, 3, 4, 0, 6, 2, 3, 2,
+ 3, 3, 4, 1, 1, 2, 3, 3, 2, 3,
+ 2, 1, 2, 1, 1, 1, 3, 4, 6, 5,
+ 1, 2, 3, 5, 4, 1, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 4, 1, 3, 1,
+ 3, 1, 1, 1, 2, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 1, 1, 3, 2, 3, 2, 3, 3,
- 4, 1, 0, 3, 1, 3, 1, 1, 1, 1,
+ 4, 1, 1, 3, 2, 3, 2, 3, 3, 4,
+ 1, 0, 3, 1, 3, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -3832,15 +4413,21 @@ static const yytype_int8 yyr2[] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 0, 6, 0, 5, 1, 2, 3,
- 4, 1, 3, 1, 2, 1, 3, 4, 1, 3,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 2, 0, 0, 5, 1, 1, 0, 2,
- 0, 2, 2, 3, 1, 2, 1, 2, 1, 2,
- 5, 3, 1, 1, 4, 1, 2, 0, 8, 0,
- 1, 3, 2, 1, 2, 0, 6, 0, 8, 0,
- 7, 1, 1, 1, 0, 2, 3, 2, 2, 2,
- 3, 2, 2, 2, 2, 1, 2, 1, 1, 1,
- 0, 3, 5, 1, 3, 1, 4
+ 4, 1, 3, 1, 2, 1, 3, 4, 2, 1,
+ 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 2, 0, 0, 5, 1, 1, 0,
+ 2, 0, 2, 2, 3, 1, 2, 1, 2, 1,
+ 2, 5, 3, 1, 1, 4, 1, 2, 0, 8,
+ 0, 1, 3, 2, 1, 2, 0, 6, 0, 8,
+ 0, 7, 1, 1, 1, 0, 2, 3, 2, 2,
+ 2, 3, 2, 2, 2, 2, 1, 2, 1, 1,
+ 1, 0, 3, 5, 1, 3, 1, 4, 1, 3,
+ 5, 5, 1, 3, 1, 3, 4, 6, 6, 8,
+ 6, 8, 1, 3, 1, 1, 1, 1, 1, 1,
+ 3, 4, 6, 4, 6, 6, 8, 6, 8, 6,
+ 8, 1, 3, 1, 1, 1, 1, 1, 3, 1,
+ 3, 6, 8, 4, 6, 1, 3, 1, 1, 4,
+ 6, 1, 3, 3, 3
};
@@ -4586,260 +5173,260 @@ yyreduce:
switch (yyn)
{
case 2: /* variable_identifier: IDENTIFIER */
-#line 371 "MachineIndependent/glslang.y"
+#line 392 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string);
}
-#line 4594 "MachineIndependent/glslang_tab.cpp"
+#line 5181 "MachineIndependent/glslang_tab.cpp"
break;
case 3: /* primary_expression: variable_identifier */
-#line 377 "MachineIndependent/glslang.y"
+#line 398 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4602 "MachineIndependent/glslang_tab.cpp"
+#line 5189 "MachineIndependent/glslang_tab.cpp"
break;
case 4: /* primary_expression: LEFT_PAREN expression RIGHT_PAREN */
-#line 380 "MachineIndependent/glslang.y"
+#line 401 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
if ((yyval.interm.intermTypedNode)->getAsConstantUnion())
(yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression();
}
-#line 4612 "MachineIndependent/glslang_tab.cpp"
+#line 5199 "MachineIndependent/glslang_tab.cpp"
break;
case 5: /* primary_expression: FLOATCONSTANT */
-#line 385 "MachineIndependent/glslang.y"
+#line 406 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true);
}
-#line 4620 "MachineIndependent/glslang_tab.cpp"
+#line 5207 "MachineIndependent/glslang_tab.cpp"
break;
case 6: /* primary_expression: INTCONSTANT */
-#line 388 "MachineIndependent/glslang.y"
+#line 409 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true);
}
-#line 4628 "MachineIndependent/glslang_tab.cpp"
+#line 5215 "MachineIndependent/glslang_tab.cpp"
break;
case 7: /* primary_expression: UINTCONSTANT */
-#line 391 "MachineIndependent/glslang.y"
+#line 412 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true);
}
-#line 4637 "MachineIndependent/glslang_tab.cpp"
+#line 5224 "MachineIndependent/glslang_tab.cpp"
break;
case 8: /* primary_expression: BOOLCONSTANT */
-#line 395 "MachineIndependent/glslang.y"
+#line 416 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true);
}
-#line 4645 "MachineIndependent/glslang_tab.cpp"
+#line 5232 "MachineIndependent/glslang_tab.cpp"
break;
case 9: /* primary_expression: STRING_LITERAL */
-#line 399 "MachineIndependent/glslang.y"
+#line 420 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true);
}
-#line 4653 "MachineIndependent/glslang_tab.cpp"
+#line 5240 "MachineIndependent/glslang_tab.cpp"
break;
case 10: /* primary_expression: INT32CONSTANT */
-#line 402 "MachineIndependent/glslang.y"
+#line 423 "MachineIndependent/glslang.y"
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true);
}
-#line 4662 "MachineIndependent/glslang_tab.cpp"
+#line 5249 "MachineIndependent/glslang_tab.cpp"
break;
case 11: /* primary_expression: UINT32CONSTANT */
-#line 406 "MachineIndependent/glslang.y"
+#line 427 "MachineIndependent/glslang.y"
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true);
}
-#line 4671 "MachineIndependent/glslang_tab.cpp"
+#line 5258 "MachineIndependent/glslang_tab.cpp"
break;
case 12: /* primary_expression: INT64CONSTANT */
-#line 410 "MachineIndependent/glslang.y"
+#line 431 "MachineIndependent/glslang.y"
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i64, (yyvsp[0].lex).loc, true);
}
-#line 4680 "MachineIndependent/glslang_tab.cpp"
+#line 5267 "MachineIndependent/glslang_tab.cpp"
break;
case 13: /* primary_expression: UINT64CONSTANT */
-#line 414 "MachineIndependent/glslang.y"
+#line 435 "MachineIndependent/glslang.y"
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u64, (yyvsp[0].lex).loc, true);
}
-#line 4689 "MachineIndependent/glslang_tab.cpp"
+#line 5276 "MachineIndependent/glslang_tab.cpp"
break;
case 14: /* primary_expression: INT16CONSTANT */
-#line 418 "MachineIndependent/glslang.y"
+#line 439 "MachineIndependent/glslang.y"
{
parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit integer literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((short)(yyvsp[0].lex).i, (yyvsp[0].lex).loc, true);
}
-#line 4698 "MachineIndependent/glslang_tab.cpp"
+#line 5285 "MachineIndependent/glslang_tab.cpp"
break;
case 15: /* primary_expression: UINT16CONSTANT */
-#line 422 "MachineIndependent/glslang.y"
+#line 443 "MachineIndependent/glslang.y"
{
parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit unsigned integer literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((unsigned short)(yyvsp[0].lex).u, (yyvsp[0].lex).loc, true);
}
-#line 4707 "MachineIndependent/glslang_tab.cpp"
+#line 5294 "MachineIndependent/glslang_tab.cpp"
break;
case 16: /* primary_expression: DOUBLECONSTANT */
-#line 426 "MachineIndependent/glslang.y"
+#line 447 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double literal");
if (! parseContext.symbolTable.atBuiltInLevel())
parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true);
}
-#line 4718 "MachineIndependent/glslang_tab.cpp"
+#line 5305 "MachineIndependent/glslang_tab.cpp"
break;
case 17: /* primary_expression: FLOAT16CONSTANT */
-#line 432 "MachineIndependent/glslang.y"
+#line 453 "MachineIndependent/glslang.y"
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float literal");
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat16, (yyvsp[0].lex).loc, true);
}
-#line 4727 "MachineIndependent/glslang_tab.cpp"
+#line 5314 "MachineIndependent/glslang_tab.cpp"
break;
case 18: /* postfix_expression: primary_expression */
-#line 440 "MachineIndependent/glslang.y"
+#line 461 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4735 "MachineIndependent/glslang_tab.cpp"
+#line 5322 "MachineIndependent/glslang_tab.cpp"
break;
case 19: /* postfix_expression: postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET */
-#line 443 "MachineIndependent/glslang.y"
+#line 464 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode));
}
-#line 4743 "MachineIndependent/glslang_tab.cpp"
+#line 5330 "MachineIndependent/glslang_tab.cpp"
break;
case 20: /* postfix_expression: function_call */
-#line 446 "MachineIndependent/glslang.y"
+#line 467 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4751 "MachineIndependent/glslang_tab.cpp"
+#line 5338 "MachineIndependent/glslang_tab.cpp"
break;
case 21: /* postfix_expression: postfix_expression DOT IDENTIFIER */
-#line 449 "MachineIndependent/glslang.y"
+#line 470 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string);
}
-#line 4759 "MachineIndependent/glslang_tab.cpp"
+#line 5346 "MachineIndependent/glslang_tab.cpp"
break;
case 22: /* postfix_expression: postfix_expression INC_OP */
-#line 452 "MachineIndependent/glslang.y"
+#line 473 "MachineIndependent/glslang.y"
{
parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode));
parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "++", (yyvsp[-1].interm.intermTypedNode));
(yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "++", EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode));
}
-#line 4769 "MachineIndependent/glslang_tab.cpp"
+#line 5356 "MachineIndependent/glslang_tab.cpp"
break;
case 23: /* postfix_expression: postfix_expression DEC_OP */
-#line 457 "MachineIndependent/glslang.y"
+#line 478 "MachineIndependent/glslang.y"
{
parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode));
parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "--", (yyvsp[-1].interm.intermTypedNode));
(yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "--", EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode));
}
-#line 4779 "MachineIndependent/glslang_tab.cpp"
+#line 5366 "MachineIndependent/glslang_tab.cpp"
break;
case 24: /* integer_expression: expression */
-#line 465 "MachineIndependent/glslang.y"
+#line 486 "MachineIndependent/glslang.y"
{
parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]");
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 4788 "MachineIndependent/glslang_tab.cpp"
+#line 5375 "MachineIndependent/glslang_tab.cpp"
break;
case 25: /* function_call: function_call_or_method */
-#line 472 "MachineIndependent/glslang.y"
+#line 493 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode);
delete (yyvsp[0].interm).function;
}
-#line 4797 "MachineIndependent/glslang_tab.cpp"
+#line 5384 "MachineIndependent/glslang_tab.cpp"
break;
case 26: /* function_call_or_method: function_call_generic */
-#line 479 "MachineIndependent/glslang.y"
+#line 500 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[0].interm);
}
-#line 4805 "MachineIndependent/glslang_tab.cpp"
+#line 5392 "MachineIndependent/glslang_tab.cpp"
break;
case 27: /* function_call_generic: function_call_header_with_parameters RIGHT_PAREN */
-#line 485 "MachineIndependent/glslang.y"
+#line 506 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[-1].interm);
(yyval.interm).loc = (yyvsp[0].lex).loc;
}
-#line 4814 "MachineIndependent/glslang_tab.cpp"
+#line 5401 "MachineIndependent/glslang_tab.cpp"
break;
case 28: /* function_call_generic: function_call_header_no_parameters RIGHT_PAREN */
-#line 489 "MachineIndependent/glslang.y"
+#line 510 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[-1].interm);
(yyval.interm).loc = (yyvsp[0].lex).loc;
}
-#line 4823 "MachineIndependent/glslang_tab.cpp"
+#line 5410 "MachineIndependent/glslang_tab.cpp"
break;
case 29: /* function_call_header_no_parameters: function_call_header VOID */
-#line 496 "MachineIndependent/glslang.y"
+#line 517 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[-1].interm);
}
-#line 4831 "MachineIndependent/glslang_tab.cpp"
+#line 5418 "MachineIndependent/glslang_tab.cpp"
break;
case 30: /* function_call_header_no_parameters: function_call_header */
-#line 499 "MachineIndependent/glslang.y"
+#line 520 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[0].interm);
}
-#line 4839 "MachineIndependent/glslang_tab.cpp"
+#line 5426 "MachineIndependent/glslang_tab.cpp"
break;
case 31: /* function_call_header_with_parameters: function_call_header assignment_expression */
-#line 505 "MachineIndependent/glslang.y"
+#line 526 "MachineIndependent/glslang.y"
{
TParameter param = { 0, new TType };
param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType());
@@ -4847,11 +5434,11 @@ yyreduce:
(yyval.interm).function = (yyvsp[-1].interm).function;
(yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode);
}
-#line 4851 "MachineIndependent/glslang_tab.cpp"
+#line 5438 "MachineIndependent/glslang_tab.cpp"
break;
case 32: /* function_call_header_with_parameters: function_call_header_with_parameters COMMA assignment_expression */
-#line 512 "MachineIndependent/glslang.y"
+#line 533 "MachineIndependent/glslang.y"
{
TParameter param = { 0, new TType };
param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType());
@@ -4859,29 +5446,29 @@ yyreduce:
(yyval.interm).function = (yyvsp[-2].interm).function;
(yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc);
}
-#line 4863 "MachineIndependent/glslang_tab.cpp"
+#line 5450 "MachineIndependent/glslang_tab.cpp"
break;
case 33: /* function_call_header: function_identifier LEFT_PAREN */
-#line 522 "MachineIndependent/glslang.y"
+#line 543 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[-1].interm);
}
-#line 4871 "MachineIndependent/glslang_tab.cpp"
+#line 5458 "MachineIndependent/glslang_tab.cpp"
break;
case 34: /* function_identifier: type_specifier */
-#line 530 "MachineIndependent/glslang.y"
+#line 551 "MachineIndependent/glslang.y"
{
// Constructor
(yyval.interm).intermNode = 0;
(yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type));
}
-#line 4881 "MachineIndependent/glslang_tab.cpp"
+#line 5468 "MachineIndependent/glslang_tab.cpp"
break;
case 35: /* function_identifier: postfix_expression */
-#line 535 "MachineIndependent/glslang.y"
+#line 556 "MachineIndependent/glslang.y"
{
//
// Should be a method or subroutine call, but we haven't recognized the arguments yet.
@@ -4909,50 +5496,50 @@ yyreduce:
(yyval.interm).function = new TFunction(empty, TType(EbtVoid), EOpNull);
}
}
-#line 4913 "MachineIndependent/glslang_tab.cpp"
+#line 5500 "MachineIndependent/glslang_tab.cpp"
break;
case 36: /* function_identifier: non_uniform_qualifier */
-#line 563 "MachineIndependent/glslang.y"
+#line 584 "MachineIndependent/glslang.y"
{
// Constructor
(yyval.interm).intermNode = 0;
(yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type));
}
-#line 4923 "MachineIndependent/glslang_tab.cpp"
+#line 5510 "MachineIndependent/glslang_tab.cpp"
break;
case 37: /* unary_expression: postfix_expression */
-#line 572 "MachineIndependent/glslang.y"
+#line 593 "MachineIndependent/glslang.y"
{
parseContext.variableCheck((yyvsp[0].interm.intermTypedNode));
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
if (TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode())
parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), "");
}
-#line 4934 "MachineIndependent/glslang_tab.cpp"
+#line 5521 "MachineIndependent/glslang_tab.cpp"
break;
case 38: /* unary_expression: INC_OP unary_expression */
-#line 578 "MachineIndependent/glslang.y"
+#line 599 "MachineIndependent/glslang.y"
{
parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "++", (yyvsp[0].interm.intermTypedNode));
(yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "++", EOpPreIncrement, (yyvsp[0].interm.intermTypedNode));
}
-#line 4943 "MachineIndependent/glslang_tab.cpp"
+#line 5530 "MachineIndependent/glslang_tab.cpp"
break;
case 39: /* unary_expression: DEC_OP unary_expression */
-#line 582 "MachineIndependent/glslang.y"
+#line 603 "MachineIndependent/glslang.y"
{
parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "--", (yyvsp[0].interm.intermTypedNode));
(yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "--", EOpPreDecrement, (yyvsp[0].interm.intermTypedNode));
}
-#line 4952 "MachineIndependent/glslang_tab.cpp"
+#line 5539 "MachineIndependent/glslang_tab.cpp"
break;
case 40: /* unary_expression: unary_operator unary_expression */
-#line 586 "MachineIndependent/glslang.y"
+#line 607 "MachineIndependent/glslang.y"
{
if ((yyvsp[-1].interm).op != EOpNull) {
char errorOp[2] = {0, 0};
@@ -4969,179 +5556,179 @@ yyreduce:
(yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression();
}
}
-#line 4973 "MachineIndependent/glslang_tab.cpp"
+#line 5560 "MachineIndependent/glslang_tab.cpp"
break;
case 41: /* unary_operator: PLUS */
-#line 606 "MachineIndependent/glslang.y"
+#line 627 "MachineIndependent/glslang.y"
{ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; }
-#line 4979 "MachineIndependent/glslang_tab.cpp"
+#line 5566 "MachineIndependent/glslang_tab.cpp"
break;
case 42: /* unary_operator: DASH */
-#line 607 "MachineIndependent/glslang.y"
+#line 628 "MachineIndependent/glslang.y"
{ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; }
-#line 4985 "MachineIndependent/glslang_tab.cpp"
+#line 5572 "MachineIndependent/glslang_tab.cpp"
break;
case 43: /* unary_operator: BANG */
-#line 608 "MachineIndependent/glslang.y"
+#line 629 "MachineIndependent/glslang.y"
{ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; }
-#line 4991 "MachineIndependent/glslang_tab.cpp"
+#line 5578 "MachineIndependent/glslang_tab.cpp"
break;
case 44: /* unary_operator: TILDE */
-#line 609 "MachineIndependent/glslang.y"
+#line 630 "MachineIndependent/glslang.y"
{ (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot;
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); }
-#line 4998 "MachineIndependent/glslang_tab.cpp"
+#line 5585 "MachineIndependent/glslang_tab.cpp"
break;
case 45: /* multiplicative_expression: unary_expression */
-#line 615 "MachineIndependent/glslang.y"
+#line 636 "MachineIndependent/glslang.y"
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 5004 "MachineIndependent/glslang_tab.cpp"
+#line 5591 "MachineIndependent/glslang_tab.cpp"
break;
case 46: /* multiplicative_expression: multiplicative_expression STAR unary_expression */
-#line 616 "MachineIndependent/glslang.y"
+#line 637 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "*", EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 5014 "MachineIndependent/glslang_tab.cpp"
+#line 5601 "MachineIndependent/glslang_tab.cpp"
break;
case 47: /* multiplicative_expression: multiplicative_expression SLASH unary_expression */
-#line 621 "MachineIndependent/glslang.y"
+#line 642 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "/", EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 5024 "MachineIndependent/glslang_tab.cpp"
+#line 5611 "MachineIndependent/glslang_tab.cpp"
break;
case 48: /* multiplicative_expression: multiplicative_expression PERCENT unary_expression */
-#line 626 "MachineIndependent/glslang.y"
+#line 647 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "%");
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "%", EOpMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 5035 "MachineIndependent/glslang_tab.cpp"
+#line 5622 "MachineIndependent/glslang_tab.cpp"
break;
case 49: /* additive_expression: multiplicative_expression */
-#line 635 "MachineIndependent/glslang.y"
+#line 656 "MachineIndependent/glslang.y"
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 5041 "MachineIndependent/glslang_tab.cpp"
+#line 5628 "MachineIndependent/glslang_tab.cpp"
break;
case 50: /* additive_expression: additive_expression PLUS multiplicative_expression */
-#line 636 "MachineIndependent/glslang.y"
+#line 657 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "+", EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 5051 "MachineIndependent/glslang_tab.cpp"
+#line 5638 "MachineIndependent/glslang_tab.cpp"
break;
case 51: /* additive_expression: additive_expression DASH multiplicative_expression */
-#line 641 "MachineIndependent/glslang.y"
+#line 662 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "-", EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 5061 "MachineIndependent/glslang_tab.cpp"
+#line 5648 "MachineIndependent/glslang_tab.cpp"
break;
case 52: /* shift_expression: additive_expression */
-#line 649 "MachineIndependent/glslang.y"
+#line 670 "MachineIndependent/glslang.y"
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 5067 "MachineIndependent/glslang_tab.cpp"
+#line 5654 "MachineIndependent/glslang_tab.cpp"
break;
case 53: /* shift_expression: shift_expression LEFT_OP additive_expression */
-#line 650 "MachineIndependent/glslang.y"
+#line 671 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift left");
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<<", EOpLeftShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 5078 "MachineIndependent/glslang_tab.cpp"
+#line 5665 "MachineIndependent/glslang_tab.cpp"
break;
case 54: /* shift_expression: shift_expression RIGHT_OP additive_expression */
-#line 656 "MachineIndependent/glslang.y"
+#line 677 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift right");
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">>", EOpRightShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 5089 "MachineIndependent/glslang_tab.cpp"
+#line 5676 "MachineIndependent/glslang_tab.cpp"
break;
case 55: /* relational_expression: shift_expression */
-#line 665 "MachineIndependent/glslang.y"
+#line 686 "MachineIndependent/glslang.y"
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 5095 "MachineIndependent/glslang_tab.cpp"
+#line 5682 "MachineIndependent/glslang_tab.cpp"
break;
case 56: /* relational_expression: relational_expression LEFT_ANGLE shift_expression */
-#line 666 "MachineIndependent/glslang.y"
+#line 687 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<", EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 5105 "MachineIndependent/glslang_tab.cpp"
+#line 5692 "MachineIndependent/glslang_tab.cpp"
break;
case 57: /* relational_expression: relational_expression RIGHT_ANGLE shift_expression */
-#line 671 "MachineIndependent/glslang.y"
+#line 692 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">", EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 5115 "MachineIndependent/glslang_tab.cpp"
+#line 5702 "MachineIndependent/glslang_tab.cpp"
break;
case 58: /* relational_expression: relational_expression LE_OP shift_expression */
-#line 676 "MachineIndependent/glslang.y"
+#line 697 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<=", EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 5125 "MachineIndependent/glslang_tab.cpp"
+#line 5712 "MachineIndependent/glslang_tab.cpp"
break;
case 59: /* relational_expression: relational_expression GE_OP shift_expression */
-#line 681 "MachineIndependent/glslang.y"
+#line 702 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 5135 "MachineIndependent/glslang_tab.cpp"
+#line 5722 "MachineIndependent/glslang_tab.cpp"
break;
case 60: /* equality_expression: relational_expression */
-#line 689 "MachineIndependent/glslang.y"
+#line 710 "MachineIndependent/glslang.y"
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 5141 "MachineIndependent/glslang_tab.cpp"
+#line 5728 "MachineIndependent/glslang_tab.cpp"
break;
case 61: /* equality_expression: equality_expression EQ_OP relational_expression */
-#line 690 "MachineIndependent/glslang.y"
+#line 711 "MachineIndependent/glslang.y"
{
parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison");
parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "==");
@@ -5151,11 +5738,11 @@ yyreduce:
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 5155 "MachineIndependent/glslang_tab.cpp"
+#line 5742 "MachineIndependent/glslang_tab.cpp"
break;
case 62: /* equality_expression: equality_expression NE_OP relational_expression */
-#line 699 "MachineIndependent/glslang.y"
+#line 720 "MachineIndependent/glslang.y"
{
parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison");
parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!=");
@@ -5165,124 +5752,124 @@ yyreduce:
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 5169 "MachineIndependent/glslang_tab.cpp"
+#line 5756 "MachineIndependent/glslang_tab.cpp"
break;
case 63: /* and_expression: equality_expression */
-#line 711 "MachineIndependent/glslang.y"
+#line 732 "MachineIndependent/glslang.y"
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 5175 "MachineIndependent/glslang_tab.cpp"
+#line 5762 "MachineIndependent/glslang_tab.cpp"
break;
case 64: /* and_expression: and_expression AMPERSAND equality_expression */
-#line 712 "MachineIndependent/glslang.y"
+#line 733 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise and");
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&", EOpAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 5186 "MachineIndependent/glslang_tab.cpp"
+#line 5773 "MachineIndependent/glslang_tab.cpp"
break;
case 65: /* exclusive_or_expression: and_expression */
-#line 721 "MachineIndependent/glslang.y"
+#line 742 "MachineIndependent/glslang.y"
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 5192 "MachineIndependent/glslang_tab.cpp"
+#line 5779 "MachineIndependent/glslang_tab.cpp"
break;
case 66: /* exclusive_or_expression: exclusive_or_expression CARET and_expression */
-#line 722 "MachineIndependent/glslang.y"
+#line 743 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise exclusive or");
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^", EOpExclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 5203 "MachineIndependent/glslang_tab.cpp"
+#line 5790 "MachineIndependent/glslang_tab.cpp"
break;
case 67: /* inclusive_or_expression: exclusive_or_expression */
-#line 731 "MachineIndependent/glslang.y"
+#line 752 "MachineIndependent/glslang.y"
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 5209 "MachineIndependent/glslang_tab.cpp"
+#line 5796 "MachineIndependent/glslang_tab.cpp"
break;
case 68: /* inclusive_or_expression: inclusive_or_expression VERTICAL_BAR exclusive_or_expression */
-#line 732 "MachineIndependent/glslang.y"
+#line 753 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise inclusive or");
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "|", EOpInclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 5220 "MachineIndependent/glslang_tab.cpp"
+#line 5807 "MachineIndependent/glslang_tab.cpp"
break;
case 69: /* logical_and_expression: inclusive_or_expression */
-#line 741 "MachineIndependent/glslang.y"
+#line 762 "MachineIndependent/glslang.y"
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 5226 "MachineIndependent/glslang_tab.cpp"
+#line 5813 "MachineIndependent/glslang_tab.cpp"
break;
case 70: /* logical_and_expression: logical_and_expression AND_OP inclusive_or_expression */
-#line 742 "MachineIndependent/glslang.y"
+#line 763 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&&", EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 5236 "MachineIndependent/glslang_tab.cpp"
+#line 5823 "MachineIndependent/glslang_tab.cpp"
break;
case 71: /* logical_xor_expression: logical_and_expression */
-#line 750 "MachineIndependent/glslang.y"
+#line 771 "MachineIndependent/glslang.y"
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 5242 "MachineIndependent/glslang_tab.cpp"
+#line 5829 "MachineIndependent/glslang_tab.cpp"
break;
case 72: /* logical_xor_expression: logical_xor_expression XOR_OP logical_and_expression */
-#line 751 "MachineIndependent/glslang.y"
+#line 772 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^^", EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 5252 "MachineIndependent/glslang_tab.cpp"
+#line 5839 "MachineIndependent/glslang_tab.cpp"
break;
case 73: /* logical_or_expression: logical_xor_expression */
-#line 759 "MachineIndependent/glslang.y"
+#line 780 "MachineIndependent/glslang.y"
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 5258 "MachineIndependent/glslang_tab.cpp"
+#line 5845 "MachineIndependent/glslang_tab.cpp"
break;
case 74: /* logical_or_expression: logical_or_expression OR_OP logical_xor_expression */
-#line 760 "MachineIndependent/glslang.y"
+#line 781 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "||", EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
if ((yyval.interm.intermTypedNode) == 0)
(yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc);
}
-#line 5268 "MachineIndependent/glslang_tab.cpp"
+#line 5855 "MachineIndependent/glslang_tab.cpp"
break;
case 75: /* conditional_expression: logical_or_expression */
-#line 768 "MachineIndependent/glslang.y"
+#line 789 "MachineIndependent/glslang.y"
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 5274 "MachineIndependent/glslang_tab.cpp"
+#line 5861 "MachineIndependent/glslang_tab.cpp"
break;
case 76: /* $@1: %empty */
-#line 769 "MachineIndependent/glslang.y"
+#line 790 "MachineIndependent/glslang.y"
{
++parseContext.controlFlowNestingLevel;
}
-#line 5282 "MachineIndependent/glslang_tab.cpp"
+#line 5869 "MachineIndependent/glslang_tab.cpp"
break;
case 77: /* conditional_expression: logical_or_expression QUESTION $@1 expression COLON assignment_expression */
-#line 772 "MachineIndependent/glslang.y"
+#line 793 "MachineIndependent/glslang.y"
{
--parseContext.controlFlowNestingLevel;
parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-5].interm.intermTypedNode));
@@ -5295,17 +5882,17 @@ yyreduce:
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
}
-#line 5299 "MachineIndependent/glslang_tab.cpp"
+#line 5886 "MachineIndependent/glslang_tab.cpp"
break;
case 78: /* assignment_expression: conditional_expression */
-#line 787 "MachineIndependent/glslang.y"
+#line 808 "MachineIndependent/glslang.y"
{ (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); }
-#line 5305 "MachineIndependent/glslang_tab.cpp"
+#line 5892 "MachineIndependent/glslang_tab.cpp"
break;
case 79: /* assignment_expression: unary_expression assignment_operator assignment_expression */
-#line 788 "MachineIndependent/glslang.y"
+#line 809 "MachineIndependent/glslang.y"
{
parseContext.arrayObjectCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array assignment");
parseContext.opaqueCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=");
@@ -5319,119 +5906,119 @@ yyreduce:
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
}
-#line 5323 "MachineIndependent/glslang_tab.cpp"
+#line 5910 "MachineIndependent/glslang_tab.cpp"
break;
case 80: /* assignment_operator: EQUAL */
-#line 804 "MachineIndependent/glslang.y"
+#line 825 "MachineIndependent/glslang.y"
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpAssign;
}
-#line 5332 "MachineIndependent/glslang_tab.cpp"
+#line 5919 "MachineIndependent/glslang_tab.cpp"
break;
case 81: /* assignment_operator: MUL_ASSIGN */
-#line 808 "MachineIndependent/glslang.y"
+#line 829 "MachineIndependent/glslang.y"
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpMulAssign;
}
-#line 5341 "MachineIndependent/glslang_tab.cpp"
+#line 5928 "MachineIndependent/glslang_tab.cpp"
break;
case 82: /* assignment_operator: DIV_ASSIGN */
-#line 812 "MachineIndependent/glslang.y"
+#line 833 "MachineIndependent/glslang.y"
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpDivAssign;
}
-#line 5350 "MachineIndependent/glslang_tab.cpp"
+#line 5937 "MachineIndependent/glslang_tab.cpp"
break;
case 83: /* assignment_operator: MOD_ASSIGN */
-#line 816 "MachineIndependent/glslang.y"
+#line 837 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "%=");
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpModAssign;
}
-#line 5360 "MachineIndependent/glslang_tab.cpp"
+#line 5947 "MachineIndependent/glslang_tab.cpp"
break;
case 84: /* assignment_operator: ADD_ASSIGN */
-#line 821 "MachineIndependent/glslang.y"
+#line 842 "MachineIndependent/glslang.y"
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpAddAssign;
}
-#line 5369 "MachineIndependent/glslang_tab.cpp"
+#line 5956 "MachineIndependent/glslang_tab.cpp"
break;
case 85: /* assignment_operator: SUB_ASSIGN */
-#line 825 "MachineIndependent/glslang.y"
+#line 846 "MachineIndependent/glslang.y"
{
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).op = EOpSubAssign;
}
-#line 5378 "MachineIndependent/glslang_tab.cpp"
+#line 5965 "MachineIndependent/glslang_tab.cpp"
break;
case 86: /* assignment_operator: LEFT_ASSIGN */
-#line 829 "MachineIndependent/glslang.y"
+#line 850 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign;
}
-#line 5387 "MachineIndependent/glslang_tab.cpp"
+#line 5974 "MachineIndependent/glslang_tab.cpp"
break;
case 87: /* assignment_operator: RIGHT_ASSIGN */
-#line 833 "MachineIndependent/glslang.y"
+#line 854 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign;
}
-#line 5396 "MachineIndependent/glslang_tab.cpp"
+#line 5983 "MachineIndependent/glslang_tab.cpp"
break;
case 88: /* assignment_operator: AND_ASSIGN */
-#line 837 "MachineIndependent/glslang.y"
+#line 858 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign;
}
-#line 5405 "MachineIndependent/glslang_tab.cpp"
+#line 5992 "MachineIndependent/glslang_tab.cpp"
break;
case 89: /* assignment_operator: XOR_ASSIGN */
-#line 841 "MachineIndependent/glslang.y"
+#line 862 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign;
}
-#line 5414 "MachineIndependent/glslang_tab.cpp"
+#line 6001 "MachineIndependent/glslang_tab.cpp"
break;
case 90: /* assignment_operator: OR_ASSIGN */
-#line 845 "MachineIndependent/glslang.y"
+#line 866 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign");
(yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign;
}
-#line 5423 "MachineIndependent/glslang_tab.cpp"
+#line 6010 "MachineIndependent/glslang_tab.cpp"
break;
case 91: /* expression: assignment_expression */
-#line 852 "MachineIndependent/glslang.y"
+#line 873 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 5431 "MachineIndependent/glslang_tab.cpp"
+#line 6018 "MachineIndependent/glslang_tab.cpp"
break;
case 92: /* expression: expression COMMA assignment_expression */
-#line 855 "MachineIndependent/glslang.y"
+#line 876 "MachineIndependent/glslang.y"
{
parseContext.samplerConstructorLocationCheck((yyvsp[-1].lex).loc, ",", (yyvsp[0].interm.intermTypedNode));
(yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc);
@@ -5440,40 +6027,62 @@ yyreduce:
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
}
-#line 5444 "MachineIndependent/glslang_tab.cpp"
+#line 6031 "MachineIndependent/glslang_tab.cpp"
break;
case 93: /* constant_expression: conditional_expression */
-#line 866 "MachineIndependent/glslang.y"
+#line 887 "MachineIndependent/glslang.y"
{
parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), "");
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 5453 "MachineIndependent/glslang_tab.cpp"
+#line 6040 "MachineIndependent/glslang_tab.cpp"
break;
case 94: /* declaration: function_prototype SEMICOLON */
-#line 873 "MachineIndependent/glslang.y"
+#line 894 "MachineIndependent/glslang.y"
{
parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */);
(yyval.interm.intermNode) = 0;
// TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
}
-#line 5463 "MachineIndependent/glslang_tab.cpp"
+#line 6050 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 95: /* declaration: spirv_instruction_qualifier function_prototype SEMICOLON */
+#line 900 "MachineIndependent/glslang.y"
+ {
+ parseContext.requireExtensions((yyvsp[-1].interm).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier");
+ (yyvsp[-1].interm).function->setSpirvInstruction(*(yyvsp[-2].interm.spirvInst)); // Attach SPIR-V intruction qualifier
+ parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */);
+ (yyval.interm.intermNode) = 0;
+ // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
+ }
+#line 6062 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 96: /* declaration: spirv_execution_mode_qualifier SEMICOLON */
+#line 907 "MachineIndependent/glslang.y"
+ {
+ parseContext.globalCheck((yyvsp[0].lex).loc, "SPIR-V execution mode qualifier");
+ parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier");
+ (yyval.interm.intermNode) = 0;
+ }
+#line 6072 "MachineIndependent/glslang_tab.cpp"
break;
- case 95: /* declaration: init_declarator_list SEMICOLON */
-#line 878 "MachineIndependent/glslang.y"
+ case 97: /* declaration: init_declarator_list SEMICOLON */
+#line 913 "MachineIndependent/glslang.y"
{
if ((yyvsp[-1].interm).intermNode && (yyvsp[-1].interm).intermNode->getAsAggregate())
(yyvsp[-1].interm).intermNode->getAsAggregate()->setOperator(EOpSequence);
(yyval.interm.intermNode) = (yyvsp[-1].interm).intermNode;
}
-#line 5473 "MachineIndependent/glslang_tab.cpp"
+#line 6082 "MachineIndependent/glslang_tab.cpp"
break;
- case 96: /* declaration: PRECISION precision_qualifier type_specifier SEMICOLON */
-#line 883 "MachineIndependent/glslang.y"
+ case 98: /* declaration: PRECISION precision_qualifier type_specifier SEMICOLON */
+#line 918 "MachineIndependent/glslang.y"
{
parseContext.profileRequires((yyvsp[-3].lex).loc, ENoProfile, 130, 0, "precision statement");
// lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope
@@ -5481,75 +6090,75 @@ yyreduce:
parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision);
(yyval.interm.intermNode) = 0;
}
-#line 5485 "MachineIndependent/glslang_tab.cpp"
+#line 6094 "MachineIndependent/glslang_tab.cpp"
break;
- case 97: /* declaration: block_structure SEMICOLON */
-#line 890 "MachineIndependent/glslang.y"
+ case 99: /* declaration: block_structure SEMICOLON */
+#line 925 "MachineIndependent/glslang.y"
{
parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList);
(yyval.interm.intermNode) = 0;
}
-#line 5494 "MachineIndependent/glslang_tab.cpp"
+#line 6103 "MachineIndependent/glslang_tab.cpp"
break;
- case 98: /* declaration: block_structure IDENTIFIER SEMICOLON */
-#line 894 "MachineIndependent/glslang.y"
+ case 100: /* declaration: block_structure IDENTIFIER SEMICOLON */
+#line 929 "MachineIndependent/glslang.y"
{
parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string);
(yyval.interm.intermNode) = 0;
}
-#line 5503 "MachineIndependent/glslang_tab.cpp"
+#line 6112 "MachineIndependent/glslang_tab.cpp"
break;
- case 99: /* declaration: block_structure IDENTIFIER array_specifier SEMICOLON */
-#line 898 "MachineIndependent/glslang.y"
+ case 101: /* declaration: block_structure IDENTIFIER array_specifier SEMICOLON */
+#line 933 "MachineIndependent/glslang.y"
{
parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes);
(yyval.interm.intermNode) = 0;
}
-#line 5512 "MachineIndependent/glslang_tab.cpp"
+#line 6121 "MachineIndependent/glslang_tab.cpp"
break;
- case 100: /* declaration: type_qualifier SEMICOLON */
-#line 902 "MachineIndependent/glslang.y"
+ case 102: /* declaration: type_qualifier SEMICOLON */
+#line 937 "MachineIndependent/glslang.y"
{
parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier);
parseContext.updateStandaloneQualifierDefaults((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type));
(yyval.interm.intermNode) = 0;
}
-#line 5522 "MachineIndependent/glslang_tab.cpp"
+#line 6131 "MachineIndependent/glslang_tab.cpp"
break;
- case 101: /* declaration: type_qualifier IDENTIFIER SEMICOLON */
-#line 907 "MachineIndependent/glslang.y"
+ case 103: /* declaration: type_qualifier IDENTIFIER SEMICOLON */
+#line 942 "MachineIndependent/glslang.y"
{
parseContext.checkNoShaderLayouts((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).shaderQualifiers);
parseContext.addQualifierToExisting((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, *(yyvsp[-1].lex).string);
(yyval.interm.intermNode) = 0;
}
-#line 5532 "MachineIndependent/glslang_tab.cpp"
+#line 6141 "MachineIndependent/glslang_tab.cpp"
break;
- case 102: /* declaration: type_qualifier IDENTIFIER identifier_list SEMICOLON */
-#line 912 "MachineIndependent/glslang.y"
+ case 104: /* declaration: type_qualifier IDENTIFIER identifier_list SEMICOLON */
+#line 947 "MachineIndependent/glslang.y"
{
parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers);
(yyvsp[-1].interm.identifierList)->push_back((yyvsp[-2].lex).string);
parseContext.addQualifierToExisting((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier, *(yyvsp[-1].interm.identifierList));
(yyval.interm.intermNode) = 0;
}
-#line 5543 "MachineIndependent/glslang_tab.cpp"
+#line 6152 "MachineIndependent/glslang_tab.cpp"
break;
- case 103: /* $@2: %empty */
-#line 921 "MachineIndependent/glslang.y"
+ case 105: /* $@2: %empty */
+#line 956 "MachineIndependent/glslang.y"
{ parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); }
-#line 5549 "MachineIndependent/glslang_tab.cpp"
+#line 6158 "MachineIndependent/glslang_tab.cpp"
break;
- case 104: /* block_structure: type_qualifier IDENTIFIER LEFT_BRACE $@2 struct_declaration_list RIGHT_BRACE */
-#line 921 "MachineIndependent/glslang.y"
+ case 106: /* block_structure: type_qualifier IDENTIFIER LEFT_BRACE $@2 struct_declaration_list RIGHT_BRACE */
+#line 956 "MachineIndependent/glslang.y"
{
--parseContext.blockNestingLevel;
parseContext.blockName = (yyvsp[-4].lex).string;
@@ -5559,54 +6168,88 @@ yyreduce:
(yyval.interm).loc = (yyvsp[-5].interm.type).loc;
(yyval.interm).typeList = (yyvsp[-1].interm.typeList);
}
-#line 5563 "MachineIndependent/glslang_tab.cpp"
+#line 6172 "MachineIndependent/glslang_tab.cpp"
break;
- case 105: /* identifier_list: COMMA IDENTIFIER */
-#line 932 "MachineIndependent/glslang.y"
+ case 107: /* identifier_list: COMMA IDENTIFIER */
+#line 967 "MachineIndependent/glslang.y"
{
(yyval.interm.identifierList) = new TIdentifierList;
(yyval.interm.identifierList)->push_back((yyvsp[0].lex).string);
}
-#line 5572 "MachineIndependent/glslang_tab.cpp"
+#line 6181 "MachineIndependent/glslang_tab.cpp"
break;
- case 106: /* identifier_list: identifier_list COMMA IDENTIFIER */
-#line 936 "MachineIndependent/glslang.y"
+ case 108: /* identifier_list: identifier_list COMMA IDENTIFIER */
+#line 971 "MachineIndependent/glslang.y"
{
(yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList);
(yyval.interm.identifierList)->push_back((yyvsp[0].lex).string);
}
-#line 5581 "MachineIndependent/glslang_tab.cpp"
+#line 6190 "MachineIndependent/glslang_tab.cpp"
break;
- case 107: /* function_prototype: function_declarator RIGHT_PAREN */
-#line 943 "MachineIndependent/glslang.y"
+ case 109: /* function_prototype: function_declarator RIGHT_PAREN */
+#line 978 "MachineIndependent/glslang.y"
{
(yyval.interm).function = (yyvsp[-1].interm.function);
(yyval.interm).loc = (yyvsp[0].lex).loc;
}
-#line 5590 "MachineIndependent/glslang_tab.cpp"
+#line 6199 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 110: /* function_prototype: function_declarator RIGHT_PAREN attribute */
+#line 982 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm).function = (yyvsp[-2].interm.function);
+ (yyval.interm).loc = (yyvsp[-1].lex).loc;
+ parseContext.requireExtensions((yyvsp[-1].lex).loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
+ parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes), (yyval.interm).function);
+ }
+#line 6210 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 111: /* function_prototype: attribute function_declarator RIGHT_PAREN */
+#line 988 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm).function = (yyvsp[-1].interm.function);
+ (yyval.interm).loc = (yyvsp[0].lex).loc;
+ parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
+ parseContext.handleFunctionAttributes((yyvsp[0].lex).loc, *(yyvsp[-2].interm.attributes), (yyval.interm).function);
+ }
+#line 6221 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 112: /* function_prototype: attribute function_declarator RIGHT_PAREN attribute */
+#line 994 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm).function = (yyvsp[-2].interm.function);
+ (yyval.interm).loc = (yyvsp[-1].lex).loc;
+ parseContext.requireExtensions((yyvsp[-1].lex).loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
+ parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[-3].interm.attributes), (yyval.interm).function);
+ parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes), (yyval.interm).function);
+ }
+#line 6233 "MachineIndependent/glslang_tab.cpp"
break;
- case 108: /* function_declarator: function_header */
-#line 950 "MachineIndependent/glslang.y"
+ case 113: /* function_declarator: function_header */
+#line 1004 "MachineIndependent/glslang.y"
{
(yyval.interm.function) = (yyvsp[0].interm.function);
}
-#line 5598 "MachineIndependent/glslang_tab.cpp"
+#line 6241 "MachineIndependent/glslang_tab.cpp"
break;
- case 109: /* function_declarator: function_header_with_parameters */
-#line 953 "MachineIndependent/glslang.y"
+ case 114: /* function_declarator: function_header_with_parameters */
+#line 1007 "MachineIndependent/glslang.y"
{
(yyval.interm.function) = (yyvsp[0].interm.function);
}
-#line 5606 "MachineIndependent/glslang_tab.cpp"
+#line 6249 "MachineIndependent/glslang_tab.cpp"
break;
- case 110: /* function_header_with_parameters: function_header parameter_declaration */
-#line 960 "MachineIndependent/glslang.y"
+ case 115: /* function_header_with_parameters: function_header parameter_declaration */
+#line 1014 "MachineIndependent/glslang.y"
{
// Add the parameter
(yyval.interm.function) = (yyvsp[-1].interm.function);
@@ -5615,11 +6258,11 @@ yyreduce:
else
delete (yyvsp[0].interm).param.type;
}
-#line 5619 "MachineIndependent/glslang_tab.cpp"
+#line 6262 "MachineIndependent/glslang_tab.cpp"
break;
- case 111: /* function_header_with_parameters: function_header_with_parameters COMMA parameter_declaration */
-#line 968 "MachineIndependent/glslang.y"
+ case 116: /* function_header_with_parameters: function_header_with_parameters COMMA parameter_declaration */
+#line 1022 "MachineIndependent/glslang.y"
{
//
// Only first parameter of one-parameter functions can be void
@@ -5637,11 +6280,11 @@ yyreduce:
(yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param);
}
}
-#line 5641 "MachineIndependent/glslang_tab.cpp"
+#line 6284 "MachineIndependent/glslang_tab.cpp"
break;
- case 112: /* function_header: fully_specified_type IDENTIFIER LEFT_PAREN */
-#line 988 "MachineIndependent/glslang.y"
+ case 117: /* function_header: fully_specified_type IDENTIFIER LEFT_PAREN */
+#line 1042 "MachineIndependent/glslang.y"
{
if ((yyvsp[-2].interm.type).qualifier.storage != EvqGlobal && (yyvsp[-2].interm.type).qualifier.storage != EvqTemporary) {
parseContext.error((yyvsp[-1].lex).loc, "no qualifiers allowed for function return",
@@ -5661,11 +6304,11 @@ yyreduce:
function = new TFunction((yyvsp[-1].lex).string, type);
(yyval.interm.function) = function;
}
-#line 5665 "MachineIndependent/glslang_tab.cpp"
+#line 6308 "MachineIndependent/glslang_tab.cpp"
break;
- case 113: /* parameter_declarator: type_specifier IDENTIFIER */
-#line 1011 "MachineIndependent/glslang.y"
+ case 118: /* parameter_declarator: type_specifier IDENTIFIER */
+#line 1065 "MachineIndependent/glslang.y"
{
if ((yyvsp[-1].interm.type).arraySizes) {
parseContext.profileRequires((yyvsp[-1].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
@@ -5681,11 +6324,11 @@ yyreduce:
(yyval.interm).loc = (yyvsp[0].lex).loc;
(yyval.interm).param = param;
}
-#line 5685 "MachineIndependent/glslang_tab.cpp"
+#line 6328 "MachineIndependent/glslang_tab.cpp"
break;
- case 114: /* parameter_declarator: type_specifier IDENTIFIER array_specifier */
-#line 1026 "MachineIndependent/glslang.y"
+ case 119: /* parameter_declarator: type_specifier IDENTIFIER array_specifier */
+#line 1080 "MachineIndependent/glslang.y"
{
if ((yyvsp[-2].interm.type).arraySizes) {
parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
@@ -5705,11 +6348,11 @@ yyreduce:
(yyval.interm).loc = (yyvsp[-1].lex).loc;
(yyval.interm).param = param;
}
-#line 5709 "MachineIndependent/glslang_tab.cpp"
+#line 6352 "MachineIndependent/glslang_tab.cpp"
break;
- case 115: /* parameter_declaration: type_qualifier parameter_declarator */
-#line 1051 "MachineIndependent/glslang.y"
+ case 120: /* parameter_declaration: type_qualifier parameter_declarator */
+#line 1105 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[0].interm);
if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone)
@@ -5721,11 +6364,11 @@ yyreduce:
parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type);
}
-#line 5725 "MachineIndependent/glslang_tab.cpp"
+#line 6368 "MachineIndependent/glslang_tab.cpp"
break;
- case 116: /* parameter_declaration: parameter_declarator */
-#line 1062 "MachineIndependent/glslang.y"
+ case 121: /* parameter_declaration: parameter_declarator */
+#line 1116 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[0].interm);
@@ -5733,11 +6376,11 @@ yyreduce:
parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type);
parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier());
}
-#line 5737 "MachineIndependent/glslang_tab.cpp"
+#line 6380 "MachineIndependent/glslang_tab.cpp"
break;
- case 117: /* parameter_declaration: type_qualifier parameter_type_specifier */
-#line 1072 "MachineIndependent/glslang.y"
+ case 122: /* parameter_declaration: type_qualifier parameter_type_specifier */
+#line 1126 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[0].interm);
if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone)
@@ -5748,11 +6391,11 @@ yyreduce:
parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type);
parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type);
}
-#line 5752 "MachineIndependent/glslang_tab.cpp"
+#line 6395 "MachineIndependent/glslang_tab.cpp"
break;
- case 118: /* parameter_declaration: parameter_type_specifier */
-#line 1082 "MachineIndependent/glslang.y"
+ case 123: /* parameter_declaration: parameter_type_specifier */
+#line 1136 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[0].interm);
@@ -5760,68 +6403,68 @@ yyreduce:
parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type);
parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier());
}
-#line 5764 "MachineIndependent/glslang_tab.cpp"
+#line 6407 "MachineIndependent/glslang_tab.cpp"
break;
- case 119: /* parameter_type_specifier: type_specifier */
-#line 1092 "MachineIndependent/glslang.y"
+ case 124: /* parameter_type_specifier: type_specifier */
+#line 1146 "MachineIndependent/glslang.y"
{
TParameter param = { 0, new TType((yyvsp[0].interm.type)) };
(yyval.interm).param = param;
if ((yyvsp[0].interm.type).arraySizes)
parseContext.arraySizeRequiredCheck((yyvsp[0].interm.type).loc, *(yyvsp[0].interm.type).arraySizes);
}
-#line 5775 "MachineIndependent/glslang_tab.cpp"
+#line 6418 "MachineIndependent/glslang_tab.cpp"
break;
- case 120: /* init_declarator_list: single_declaration */
-#line 1101 "MachineIndependent/glslang.y"
+ case 125: /* init_declarator_list: single_declaration */
+#line 1155 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[0].interm);
}
-#line 5783 "MachineIndependent/glslang_tab.cpp"
+#line 6426 "MachineIndependent/glslang_tab.cpp"
break;
- case 121: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER */
-#line 1104 "MachineIndependent/glslang.y"
+ case 126: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER */
+#line 1158 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[-2].interm);
parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type);
}
-#line 5792 "MachineIndependent/glslang_tab.cpp"
+#line 6435 "MachineIndependent/glslang_tab.cpp"
break;
- case 122: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier */
-#line 1108 "MachineIndependent/glslang.y"
+ case 127: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier */
+#line 1162 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[-3].interm);
parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes);
}
-#line 5801 "MachineIndependent/glslang_tab.cpp"
+#line 6444 "MachineIndependent/glslang_tab.cpp"
break;
- case 123: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier EQUAL initializer */
-#line 1112 "MachineIndependent/glslang.y"
+ case 128: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier EQUAL initializer */
+#line 1166 "MachineIndependent/glslang.y"
{
(yyval.interm).type = (yyvsp[-5].interm).type;
TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-5].interm).type, (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode));
(yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-5].interm).intermNode, initNode, (yyvsp[-1].lex).loc);
}
-#line 5811 "MachineIndependent/glslang_tab.cpp"
+#line 6454 "MachineIndependent/glslang_tab.cpp"
break;
- case 124: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER EQUAL initializer */
-#line 1117 "MachineIndependent/glslang.y"
+ case 129: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER EQUAL initializer */
+#line 1171 "MachineIndependent/glslang.y"
{
(yyval.interm).type = (yyvsp[-4].interm).type;
TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-4].interm).type, 0, (yyvsp[0].interm.intermTypedNode));
(yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-4].interm).intermNode, initNode, (yyvsp[-1].lex).loc);
}
-#line 5821 "MachineIndependent/glslang_tab.cpp"
+#line 6464 "MachineIndependent/glslang_tab.cpp"
break;
- case 125: /* single_declaration: fully_specified_type */
-#line 1125 "MachineIndependent/glslang.y"
+ case 130: /* single_declaration: fully_specified_type */
+#line 1179 "MachineIndependent/glslang.y"
{
(yyval.interm).type = (yyvsp[0].interm.type);
(yyval.interm).intermNode = 0;
@@ -5829,51 +6472,51 @@ yyreduce:
parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type);
}
-#line 5833 "MachineIndependent/glslang_tab.cpp"
+#line 6476 "MachineIndependent/glslang_tab.cpp"
break;
- case 126: /* single_declaration: fully_specified_type IDENTIFIER */
-#line 1132 "MachineIndependent/glslang.y"
+ case 131: /* single_declaration: fully_specified_type IDENTIFIER */
+#line 1186 "MachineIndependent/glslang.y"
{
(yyval.interm).type = (yyvsp[-1].interm.type);
(yyval.interm).intermNode = 0;
parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-1].interm.type));
}
-#line 5843 "MachineIndependent/glslang_tab.cpp"
+#line 6486 "MachineIndependent/glslang_tab.cpp"
break;
- case 127: /* single_declaration: fully_specified_type IDENTIFIER array_specifier */
-#line 1137 "MachineIndependent/glslang.y"
+ case 132: /* single_declaration: fully_specified_type IDENTIFIER array_specifier */
+#line 1191 "MachineIndependent/glslang.y"
{
(yyval.interm).type = (yyvsp[-2].interm.type);
(yyval.interm).intermNode = 0;
parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-2].interm.type), (yyvsp[0].interm).arraySizes);
}
-#line 5853 "MachineIndependent/glslang_tab.cpp"
+#line 6496 "MachineIndependent/glslang_tab.cpp"
break;
- case 128: /* single_declaration: fully_specified_type IDENTIFIER array_specifier EQUAL initializer */
-#line 1142 "MachineIndependent/glslang.y"
+ case 133: /* single_declaration: fully_specified_type IDENTIFIER array_specifier EQUAL initializer */
+#line 1196 "MachineIndependent/glslang.y"
{
(yyval.interm).type = (yyvsp[-4].interm.type);
TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-4].interm.type), (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode));
(yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc);
}
-#line 5863 "MachineIndependent/glslang_tab.cpp"
+#line 6506 "MachineIndependent/glslang_tab.cpp"
break;
- case 129: /* single_declaration: fully_specified_type IDENTIFIER EQUAL initializer */
-#line 1147 "MachineIndependent/glslang.y"
+ case 134: /* single_declaration: fully_specified_type IDENTIFIER EQUAL initializer */
+#line 1201 "MachineIndependent/glslang.y"
{
(yyval.interm).type = (yyvsp[-3].interm.type);
TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode));
(yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc);
}
-#line 5873 "MachineIndependent/glslang_tab.cpp"
+#line 6516 "MachineIndependent/glslang_tab.cpp"
break;
- case 130: /* fully_specified_type: type_specifier */
-#line 1156 "MachineIndependent/glslang.y"
+ case 135: /* fully_specified_type: type_specifier */
+#line 1210 "MachineIndependent/glslang.y"
{
(yyval.interm.type) = (yyvsp[0].interm.type);
@@ -5884,11 +6527,11 @@ yyreduce:
}
parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier);
}
-#line 5888 "MachineIndependent/glslang_tab.cpp"
+#line 6531 "MachineIndependent/glslang_tab.cpp"
break;
- case 131: /* fully_specified_type: type_qualifier type_specifier */
-#line 1166 "MachineIndependent/glslang.y"
+ case 136: /* fully_specified_type: type_qualifier type_specifier */
+#line 1220 "MachineIndependent/glslang.y"
{
parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier);
parseContext.globalQualifierTypeCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, (yyvsp[0].interm.type));
@@ -5913,22 +6556,22 @@ yyreduce:
(parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn)))
(yyval.interm.type).qualifier.smooth = true;
}
-#line 5917 "MachineIndependent/glslang_tab.cpp"
+#line 6560 "MachineIndependent/glslang_tab.cpp"
break;
- case 132: /* invariant_qualifier: INVARIANT */
-#line 1193 "MachineIndependent/glslang.y"
+ case 137: /* invariant_qualifier: INVARIANT */
+#line 1247 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "invariant");
parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.invariant = true;
}
-#line 5928 "MachineIndependent/glslang_tab.cpp"
+#line 6571 "MachineIndependent/glslang_tab.cpp"
break;
- case 133: /* interpolation_qualifier: SMOOTH */
-#line 1202 "MachineIndependent/glslang.y"
+ case 138: /* interpolation_qualifier: SMOOTH */
+#line 1256 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "smooth");
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "smooth");
@@ -5936,11 +6579,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.smooth = true;
}
-#line 5940 "MachineIndependent/glslang_tab.cpp"
+#line 6583 "MachineIndependent/glslang_tab.cpp"
break;
- case 134: /* interpolation_qualifier: FLAT */
-#line 1209 "MachineIndependent/glslang.y"
+ case 139: /* interpolation_qualifier: FLAT */
+#line 1263 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "flat");
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "flat");
@@ -5948,11 +6591,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.flat = true;
}
-#line 5952 "MachineIndependent/glslang_tab.cpp"
+#line 6595 "MachineIndependent/glslang_tab.cpp"
break;
- case 135: /* interpolation_qualifier: NOPERSPECTIVE */
-#line 1217 "MachineIndependent/glslang.y"
+ case 140: /* interpolation_qualifier: NOPERSPECTIVE */
+#line 1271 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "noperspective");
parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective");
@@ -5960,11 +6603,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.nopersp = true;
}
-#line 5964 "MachineIndependent/glslang_tab.cpp"
+#line 6607 "MachineIndependent/glslang_tab.cpp"
break;
- case 136: /* interpolation_qualifier: EXPLICITINTERPAMD */
-#line 1224 "MachineIndependent/glslang.y"
+ case 141: /* interpolation_qualifier: EXPLICITINTERPAMD */
+#line 1278 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "__explicitInterpAMD");
parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation");
@@ -5972,11 +6615,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.explicitInterp = true;
}
-#line 5976 "MachineIndependent/glslang_tab.cpp"
+#line 6619 "MachineIndependent/glslang_tab.cpp"
break;
- case 137: /* interpolation_qualifier: PERVERTEXNV */
-#line 1231 "MachineIndependent/glslang.y"
+ case 142: /* interpolation_qualifier: PERVERTEXNV */
+#line 1285 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "pervertexNV");
parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric");
@@ -5985,11 +6628,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.pervertexNV = true;
}
-#line 5989 "MachineIndependent/glslang_tab.cpp"
+#line 6632 "MachineIndependent/glslang_tab.cpp"
break;
- case 138: /* interpolation_qualifier: PERPRIMITIVENV */
-#line 1239 "MachineIndependent/glslang.y"
+ case 143: /* interpolation_qualifier: PERPRIMITIVENV */
+#line 1293 "MachineIndependent/glslang.y"
{
// No need for profile version or extension check. Shader stage already checks both.
parseContext.globalCheck((yyvsp[0].lex).loc, "perprimitiveNV");
@@ -6000,11 +6643,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.perPrimitiveNV = true;
}
-#line 6004 "MachineIndependent/glslang_tab.cpp"
+#line 6647 "MachineIndependent/glslang_tab.cpp"
break;
- case 139: /* interpolation_qualifier: PERVIEWNV */
-#line 1249 "MachineIndependent/glslang.y"
+ case 144: /* interpolation_qualifier: PERVIEWNV */
+#line 1303 "MachineIndependent/glslang.y"
{
// No need for profile version or extension check. Shader stage already checks both.
parseContext.globalCheck((yyvsp[0].lex).loc, "perviewNV");
@@ -6012,11 +6655,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.perViewNV = true;
}
-#line 6016 "MachineIndependent/glslang_tab.cpp"
+#line 6659 "MachineIndependent/glslang_tab.cpp"
break;
- case 140: /* interpolation_qualifier: PERTASKNV */
-#line 1256 "MachineIndependent/glslang.y"
+ case 145: /* interpolation_qualifier: PERTASKNV */
+#line 1310 "MachineIndependent/glslang.y"
{
// No need for profile version or extension check. Shader stage already checks both.
parseContext.globalCheck((yyvsp[0].lex).loc, "taskNV");
@@ -6024,84 +6667,84 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.perTaskNV = true;
}
-#line 6028 "MachineIndependent/glslang_tab.cpp"
+#line 6671 "MachineIndependent/glslang_tab.cpp"
break;
- case 141: /* layout_qualifier: LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN */
-#line 1267 "MachineIndependent/glslang.y"
+ case 146: /* layout_qualifier: LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN */
+#line 1321 "MachineIndependent/glslang.y"
{
(yyval.interm.type) = (yyvsp[-1].interm.type);
}
-#line 6036 "MachineIndependent/glslang_tab.cpp"
+#line 6679 "MachineIndependent/glslang_tab.cpp"
break;
- case 142: /* layout_qualifier_id_list: layout_qualifier_id */
-#line 1273 "MachineIndependent/glslang.y"
+ case 147: /* layout_qualifier_id_list: layout_qualifier_id */
+#line 1327 "MachineIndependent/glslang.y"
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 6044 "MachineIndependent/glslang_tab.cpp"
+#line 6687 "MachineIndependent/glslang_tab.cpp"
break;
- case 143: /* layout_qualifier_id_list: layout_qualifier_id_list COMMA layout_qualifier_id */
-#line 1276 "MachineIndependent/glslang.y"
+ case 148: /* layout_qualifier_id_list: layout_qualifier_id_list COMMA layout_qualifier_id */
+#line 1330 "MachineIndependent/glslang.y"
{
(yyval.interm.type) = (yyvsp[-2].interm.type);
(yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers);
parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false);
}
-#line 6054 "MachineIndependent/glslang_tab.cpp"
+#line 6697 "MachineIndependent/glslang_tab.cpp"
break;
- case 144: /* layout_qualifier_id: IDENTIFIER */
-#line 1283 "MachineIndependent/glslang.y"
+ case 149: /* layout_qualifier_id: IDENTIFIER */
+#line 1337 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), *(yyvsp[0].lex).string);
}
-#line 6063 "MachineIndependent/glslang_tab.cpp"
+#line 6706 "MachineIndependent/glslang_tab.cpp"
break;
- case 145: /* layout_qualifier_id: IDENTIFIER EQUAL constant_expression */
-#line 1287 "MachineIndependent/glslang.y"
+ case 150: /* layout_qualifier_id: IDENTIFIER EQUAL constant_expression */
+#line 1341 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[-2].lex).loc);
parseContext.setLayoutQualifier((yyvsp[-2].lex).loc, (yyval.interm.type), *(yyvsp[-2].lex).string, (yyvsp[0].interm.intermTypedNode));
}
-#line 6072 "MachineIndependent/glslang_tab.cpp"
+#line 6715 "MachineIndependent/glslang_tab.cpp"
break;
- case 146: /* layout_qualifier_id: SHARED */
-#line 1291 "MachineIndependent/glslang.y"
+ case 151: /* layout_qualifier_id: SHARED */
+#line 1345 "MachineIndependent/glslang.y"
{ // because "shared" is both an identifier and a keyword
(yyval.interm.type).init((yyvsp[0].lex).loc);
TString strShared("shared");
parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), strShared);
}
-#line 6082 "MachineIndependent/glslang_tab.cpp"
+#line 6725 "MachineIndependent/glslang_tab.cpp"
break;
- case 147: /* precise_qualifier: PRECISE */
-#line 1300 "MachineIndependent/glslang.y"
+ case 152: /* precise_qualifier: PRECISE */
+#line 1354 "MachineIndependent/glslang.y"
{
parseContext.profileRequires((yyval.interm.type).loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise");
parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.noContraction = true;
}
-#line 6093 "MachineIndependent/glslang_tab.cpp"
+#line 6736 "MachineIndependent/glslang_tab.cpp"
break;
- case 148: /* type_qualifier: single_type_qualifier */
-#line 1310 "MachineIndependent/glslang.y"
+ case 153: /* type_qualifier: single_type_qualifier */
+#line 1364 "MachineIndependent/glslang.y"
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 6101 "MachineIndependent/glslang_tab.cpp"
+#line 6744 "MachineIndependent/glslang_tab.cpp"
break;
- case 149: /* type_qualifier: type_qualifier single_type_qualifier */
-#line 1313 "MachineIndependent/glslang.y"
+ case 154: /* type_qualifier: type_qualifier single_type_qualifier */
+#line 1367 "MachineIndependent/glslang.y"
{
(yyval.interm.type) = (yyvsp[-1].interm.type);
if ((yyval.interm.type).basicType == EbtVoid)
@@ -6110,112 +6753,151 @@ yyreduce:
(yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers);
parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false);
}
-#line 6114 "MachineIndependent/glslang_tab.cpp"
+#line 6757 "MachineIndependent/glslang_tab.cpp"
break;
- case 150: /* single_type_qualifier: storage_qualifier */
-#line 1324 "MachineIndependent/glslang.y"
+ case 155: /* single_type_qualifier: storage_qualifier */
+#line 1378 "MachineIndependent/glslang.y"
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 6122 "MachineIndependent/glslang_tab.cpp"
+#line 6765 "MachineIndependent/glslang_tab.cpp"
break;
- case 151: /* single_type_qualifier: layout_qualifier */
-#line 1327 "MachineIndependent/glslang.y"
+ case 156: /* single_type_qualifier: layout_qualifier */
+#line 1381 "MachineIndependent/glslang.y"
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 6130 "MachineIndependent/glslang_tab.cpp"
+#line 6773 "MachineIndependent/glslang_tab.cpp"
break;
- case 152: /* single_type_qualifier: precision_qualifier */
-#line 1330 "MachineIndependent/glslang.y"
+ case 157: /* single_type_qualifier: precision_qualifier */
+#line 1384 "MachineIndependent/glslang.y"
{
parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision);
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 6139 "MachineIndependent/glslang_tab.cpp"
+#line 6782 "MachineIndependent/glslang_tab.cpp"
break;
- case 153: /* single_type_qualifier: interpolation_qualifier */
-#line 1334 "MachineIndependent/glslang.y"
+ case 158: /* single_type_qualifier: interpolation_qualifier */
+#line 1388 "MachineIndependent/glslang.y"
{
// allow inheritance of storage qualifier from block declaration
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 6148 "MachineIndependent/glslang_tab.cpp"
+#line 6791 "MachineIndependent/glslang_tab.cpp"
break;
- case 154: /* single_type_qualifier: invariant_qualifier */
-#line 1338 "MachineIndependent/glslang.y"
+ case 159: /* single_type_qualifier: invariant_qualifier */
+#line 1392 "MachineIndependent/glslang.y"
{
// allow inheritance of storage qualifier from block declaration
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 6157 "MachineIndependent/glslang_tab.cpp"
+#line 6800 "MachineIndependent/glslang_tab.cpp"
break;
- case 155: /* single_type_qualifier: precise_qualifier */
-#line 1343 "MachineIndependent/glslang.y"
+ case 160: /* single_type_qualifier: precise_qualifier */
+#line 1397 "MachineIndependent/glslang.y"
{
// allow inheritance of storage qualifier from block declaration
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 6166 "MachineIndependent/glslang_tab.cpp"
+#line 6809 "MachineIndependent/glslang_tab.cpp"
break;
- case 156: /* single_type_qualifier: non_uniform_qualifier */
-#line 1347 "MachineIndependent/glslang.y"
+ case 161: /* single_type_qualifier: non_uniform_qualifier */
+#line 1401 "MachineIndependent/glslang.y"
{
(yyval.interm.type) = (yyvsp[0].interm.type);
}
-#line 6174 "MachineIndependent/glslang_tab.cpp"
+#line 6817 "MachineIndependent/glslang_tab.cpp"
break;
- case 157: /* storage_qualifier: CONST */
-#line 1354 "MachineIndependent/glslang.y"
+ case 162: /* single_type_qualifier: spirv_storage_class_qualifier */
+#line 1404 "MachineIndependent/glslang.y"
+ {
+ parseContext.globalCheck((yyvsp[0].interm.type).loc, "spirv_storage_class");
+ parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V storage class qualifier");
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ }
+#line 6827 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 163: /* single_type_qualifier: spirv_decorate_qualifier */
+#line 1409 "MachineIndependent/glslang.y"
+ {
+ parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V decorate qualifier");
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ }
+#line 6836 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 164: /* single_type_qualifier: SPIRV_BY_REFERENCE */
+#line 1413 "MachineIndependent/glslang.y"
+ {
+ parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_reference");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.setSpirvByReference();
+ }
+#line 6846 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 165: /* single_type_qualifier: SPIRV_LITERAL */
+#line 1418 "MachineIndependent/glslang.y"
+ {
+ parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_literal");
+ (yyval.interm.type).init((yyvsp[0].lex).loc);
+ (yyval.interm.type).qualifier.setSpirvLiteral();
+ }
+#line 6856 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 166: /* storage_qualifier: CONST */
+#line 1427 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant
}
-#line 6183 "MachineIndependent/glslang_tab.cpp"
+#line 6865 "MachineIndependent/glslang_tab.cpp"
break;
- case 158: /* storage_qualifier: INOUT */
-#line 1358 "MachineIndependent/glslang.y"
+ case 167: /* storage_qualifier: INOUT */
+#line 1431 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "inout");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqInOut;
}
-#line 6193 "MachineIndependent/glslang_tab.cpp"
+#line 6875 "MachineIndependent/glslang_tab.cpp"
break;
- case 159: /* storage_qualifier: IN */
-#line 1363 "MachineIndependent/glslang.y"
+ case 168: /* storage_qualifier: IN */
+#line 1436 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "in");
(yyval.interm.type).init((yyvsp[0].lex).loc);
// whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later
(yyval.interm.type).qualifier.storage = EvqIn;
}
-#line 6204 "MachineIndependent/glslang_tab.cpp"
+#line 6886 "MachineIndependent/glslang_tab.cpp"
break;
- case 160: /* storage_qualifier: OUT */
-#line 1369 "MachineIndependent/glslang.y"
+ case 169: /* storage_qualifier: OUT */
+#line 1442 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "out");
(yyval.interm.type).init((yyvsp[0].lex).loc);
// whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later
(yyval.interm.type).qualifier.storage = EvqOut;
}
-#line 6215 "MachineIndependent/glslang_tab.cpp"
+#line 6897 "MachineIndependent/glslang_tab.cpp"
break;
- case 161: /* storage_qualifier: CENTROID */
-#line 1375 "MachineIndependent/glslang.y"
+ case 170: /* storage_qualifier: CENTROID */
+#line 1448 "MachineIndependent/glslang.y"
{
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, 0, "centroid");
parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "centroid");
@@ -6223,21 +6905,21 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.centroid = true;
}
-#line 6227 "MachineIndependent/glslang_tab.cpp"
+#line 6909 "MachineIndependent/glslang_tab.cpp"
break;
- case 162: /* storage_qualifier: UNIFORM */
-#line 1382 "MachineIndependent/glslang.y"
+ case 171: /* storage_qualifier: UNIFORM */
+#line 1455 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "uniform");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqUniform;
}
-#line 6237 "MachineIndependent/glslang_tab.cpp"
+#line 6919 "MachineIndependent/glslang_tab.cpp"
break;
- case 163: /* storage_qualifier: SHARED */
-#line 1387 "MachineIndependent/glslang.y"
+ case 172: /* storage_qualifier: SHARED */
+#line 1460 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "shared");
parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
@@ -6246,21 +6928,21 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqShared;
}
-#line 6250 "MachineIndependent/glslang_tab.cpp"
+#line 6932 "MachineIndependent/glslang_tab.cpp"
break;
- case 164: /* storage_qualifier: BUFFER */
-#line 1395 "MachineIndependent/glslang.y"
+ case 173: /* storage_qualifier: BUFFER */
+#line 1468 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "buffer");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqBuffer;
}
-#line 6260 "MachineIndependent/glslang_tab.cpp"
+#line 6942 "MachineIndependent/glslang_tab.cpp"
break;
- case 165: /* storage_qualifier: ATTRIBUTE */
-#line 1401 "MachineIndependent/glslang.y"
+ case 174: /* storage_qualifier: ATTRIBUTE */
+#line 1474 "MachineIndependent/glslang.y"
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangVertex, "attribute");
parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "attribute");
@@ -6273,11 +6955,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqVaryingIn;
}
-#line 6277 "MachineIndependent/glslang_tab.cpp"
+#line 6959 "MachineIndependent/glslang_tab.cpp"
break;
- case 166: /* storage_qualifier: VARYING */
-#line 1413 "MachineIndependent/glslang.y"
+ case 175: /* storage_qualifier: VARYING */
+#line 1486 "MachineIndependent/glslang.y"
{
parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "varying");
parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "varying");
@@ -6292,32 +6974,32 @@ yyreduce:
else
(yyval.interm.type).qualifier.storage = EvqVaryingIn;
}
-#line 6296 "MachineIndependent/glslang_tab.cpp"
+#line 6978 "MachineIndependent/glslang_tab.cpp"
break;
- case 167: /* storage_qualifier: PATCH */
-#line 1427 "MachineIndependent/glslang.y"
+ case 176: /* storage_qualifier: PATCH */
+#line 1500 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "patch");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.patch = true;
}
-#line 6307 "MachineIndependent/glslang_tab.cpp"
+#line 6989 "MachineIndependent/glslang_tab.cpp"
break;
- case 168: /* storage_qualifier: SAMPLE */
-#line 1433 "MachineIndependent/glslang.y"
+ case 177: /* storage_qualifier: SAMPLE */
+#line 1506 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "sample");
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.sample = true;
}
-#line 6317 "MachineIndependent/glslang_tab.cpp"
+#line 6999 "MachineIndependent/glslang_tab.cpp"
break;
- case 169: /* storage_qualifier: HITATTRNV */
-#line 1438 "MachineIndependent/glslang.y"
+ case 178: /* storage_qualifier: HITATTRNV */
+#line 1511 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeNV");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask
@@ -6326,11 +7008,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqHitAttr;
}
-#line 6330 "MachineIndependent/glslang_tab.cpp"
+#line 7012 "MachineIndependent/glslang_tab.cpp"
break;
- case 170: /* storage_qualifier: HITATTREXT */
-#line 1446 "MachineIndependent/glslang.y"
+ case 179: /* storage_qualifier: HITATTREXT */
+#line 1519 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeEXT");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask
@@ -6339,11 +7021,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqHitAttr;
}
-#line 6343 "MachineIndependent/glslang_tab.cpp"
+#line 7025 "MachineIndependent/glslang_tab.cpp"
break;
- case 171: /* storage_qualifier: PAYLOADNV */
-#line 1454 "MachineIndependent/glslang.y"
+ case 180: /* storage_qualifier: PAYLOADNV */
+#line 1527 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadNV");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask |
@@ -6352,11 +7034,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqPayload;
}
-#line 6356 "MachineIndependent/glslang_tab.cpp"
+#line 7038 "MachineIndependent/glslang_tab.cpp"
break;
- case 172: /* storage_qualifier: PAYLOADEXT */
-#line 1462 "MachineIndependent/glslang.y"
+ case 181: /* storage_qualifier: PAYLOADEXT */
+#line 1535 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadEXT");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask |
@@ -6365,11 +7047,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqPayload;
}
-#line 6369 "MachineIndependent/glslang_tab.cpp"
+#line 7051 "MachineIndependent/glslang_tab.cpp"
break;
- case 173: /* storage_qualifier: PAYLOADINNV */
-#line 1470 "MachineIndependent/glslang.y"
+ case 182: /* storage_qualifier: PAYLOADINNV */
+#line 1543 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInNV");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask |
@@ -6378,11 +7060,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqPayloadIn;
}
-#line 6382 "MachineIndependent/glslang_tab.cpp"
+#line 7064 "MachineIndependent/glslang_tab.cpp"
break;
- case 174: /* storage_qualifier: PAYLOADINEXT */
-#line 1478 "MachineIndependent/glslang.y"
+ case 183: /* storage_qualifier: PAYLOADINEXT */
+#line 1551 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInEXT");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask |
@@ -6391,11 +7073,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqPayloadIn;
}
-#line 6395 "MachineIndependent/glslang_tab.cpp"
+#line 7077 "MachineIndependent/glslang_tab.cpp"
break;
- case 175: /* storage_qualifier: CALLDATANV */
-#line 1486 "MachineIndependent/glslang.y"
+ case 184: /* storage_qualifier: CALLDATANV */
+#line 1559 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataNV");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask |
@@ -6404,11 +7086,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqCallableData;
}
-#line 6408 "MachineIndependent/glslang_tab.cpp"
+#line 7090 "MachineIndependent/glslang_tab.cpp"
break;
- case 176: /* storage_qualifier: CALLDATAEXT */
-#line 1494 "MachineIndependent/glslang.y"
+ case 185: /* storage_qualifier: CALLDATAEXT */
+#line 1567 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataEXT");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask |
@@ -6417,11 +7099,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqCallableData;
}
-#line 6421 "MachineIndependent/glslang_tab.cpp"
+#line 7103 "MachineIndependent/glslang_tab.cpp"
break;
- case 177: /* storage_qualifier: CALLDATAINNV */
-#line 1502 "MachineIndependent/glslang.y"
+ case 186: /* storage_qualifier: CALLDATAINNV */
+#line 1575 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInNV");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV");
@@ -6429,11 +7111,11 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqCallableDataIn;
}
-#line 6433 "MachineIndependent/glslang_tab.cpp"
+#line 7115 "MachineIndependent/glslang_tab.cpp"
break;
- case 178: /* storage_qualifier: CALLDATAINEXT */
-#line 1509 "MachineIndependent/glslang.y"
+ case 187: /* storage_qualifier: CALLDATAINEXT */
+#line 1582 "MachineIndependent/glslang.y"
{
parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInEXT");
parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInEXT");
@@ -6441,175 +7123,175 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.storage = EvqCallableDataIn;
}
-#line 6445 "MachineIndependent/glslang_tab.cpp"
+#line 7127 "MachineIndependent/glslang_tab.cpp"
break;
- case 179: /* storage_qualifier: COHERENT */
-#line 1516 "MachineIndependent/glslang.y"
+ case 188: /* storage_qualifier: COHERENT */
+#line 1589 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.coherent = true;
}
-#line 6454 "MachineIndependent/glslang_tab.cpp"
+#line 7136 "MachineIndependent/glslang_tab.cpp"
break;
- case 180: /* storage_qualifier: DEVICECOHERENT */
-#line 1520 "MachineIndependent/glslang.y"
+ case 189: /* storage_qualifier: DEVICECOHERENT */
+#line 1593 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "devicecoherent");
(yyval.interm.type).qualifier.devicecoherent = true;
}
-#line 6464 "MachineIndependent/glslang_tab.cpp"
+#line 7146 "MachineIndependent/glslang_tab.cpp"
break;
- case 181: /* storage_qualifier: QUEUEFAMILYCOHERENT */
-#line 1525 "MachineIndependent/glslang.y"
+ case 190: /* storage_qualifier: QUEUEFAMILYCOHERENT */
+#line 1598 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "queuefamilycoherent");
(yyval.interm.type).qualifier.queuefamilycoherent = true;
}
-#line 6474 "MachineIndependent/glslang_tab.cpp"
+#line 7156 "MachineIndependent/glslang_tab.cpp"
break;
- case 182: /* storage_qualifier: WORKGROUPCOHERENT */
-#line 1530 "MachineIndependent/glslang.y"
+ case 191: /* storage_qualifier: WORKGROUPCOHERENT */
+#line 1603 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "workgroupcoherent");
(yyval.interm.type).qualifier.workgroupcoherent = true;
}
-#line 6484 "MachineIndependent/glslang_tab.cpp"
+#line 7166 "MachineIndependent/glslang_tab.cpp"
break;
- case 183: /* storage_qualifier: SUBGROUPCOHERENT */
-#line 1535 "MachineIndependent/glslang.y"
+ case 192: /* storage_qualifier: SUBGROUPCOHERENT */
+#line 1608 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "subgroupcoherent");
(yyval.interm.type).qualifier.subgroupcoherent = true;
}
-#line 6494 "MachineIndependent/glslang_tab.cpp"
+#line 7176 "MachineIndependent/glslang_tab.cpp"
break;
- case 184: /* storage_qualifier: NONPRIVATE */
-#line 1540 "MachineIndependent/glslang.y"
+ case 193: /* storage_qualifier: NONPRIVATE */
+#line 1613 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "nonprivate");
(yyval.interm.type).qualifier.nonprivate = true;
}
-#line 6504 "MachineIndependent/glslang_tab.cpp"
+#line 7186 "MachineIndependent/glslang_tab.cpp"
break;
- case 185: /* storage_qualifier: SHADERCALLCOHERENT */
-#line 1545 "MachineIndependent/glslang.y"
+ case 194: /* storage_qualifier: SHADERCALLCOHERENT */
+#line 1618 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_ray_tracing, "shadercallcoherent");
(yyval.interm.type).qualifier.shadercallcoherent = true;
}
-#line 6514 "MachineIndependent/glslang_tab.cpp"
+#line 7196 "MachineIndependent/glslang_tab.cpp"
break;
- case 186: /* storage_qualifier: VOLATILE */
-#line 1550 "MachineIndependent/glslang.y"
+ case 195: /* storage_qualifier: VOLATILE */
+#line 1623 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.volatil = true;
}
-#line 6523 "MachineIndependent/glslang_tab.cpp"
+#line 7205 "MachineIndependent/glslang_tab.cpp"
break;
- case 187: /* storage_qualifier: RESTRICT */
-#line 1554 "MachineIndependent/glslang.y"
+ case 196: /* storage_qualifier: RESTRICT */
+#line 1627 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.restrict = true;
}
-#line 6532 "MachineIndependent/glslang_tab.cpp"
+#line 7214 "MachineIndependent/glslang_tab.cpp"
break;
- case 188: /* storage_qualifier: READONLY */
-#line 1558 "MachineIndependent/glslang.y"
+ case 197: /* storage_qualifier: READONLY */
+#line 1631 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.readonly = true;
}
-#line 6541 "MachineIndependent/glslang_tab.cpp"
+#line 7223 "MachineIndependent/glslang_tab.cpp"
break;
- case 189: /* storage_qualifier: WRITEONLY */
-#line 1562 "MachineIndependent/glslang.y"
+ case 198: /* storage_qualifier: WRITEONLY */
+#line 1635 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.writeonly = true;
}
-#line 6550 "MachineIndependent/glslang_tab.cpp"
+#line 7232 "MachineIndependent/glslang_tab.cpp"
break;
- case 190: /* storage_qualifier: SUBROUTINE */
-#line 1566 "MachineIndependent/glslang.y"
+ case 199: /* storage_qualifier: SUBROUTINE */
+#line 1639 "MachineIndependent/glslang.y"
{
parseContext.spvRemoved((yyvsp[0].lex).loc, "subroutine");
parseContext.globalCheck((yyvsp[0].lex).loc, "subroutine");
parseContext.unimplemented((yyvsp[0].lex).loc, "subroutine");
(yyval.interm.type).init((yyvsp[0].lex).loc);
}
-#line 6561 "MachineIndependent/glslang_tab.cpp"
+#line 7243 "MachineIndependent/glslang_tab.cpp"
break;
- case 191: /* storage_qualifier: SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN */
-#line 1572 "MachineIndependent/glslang.y"
+ case 200: /* storage_qualifier: SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN */
+#line 1645 "MachineIndependent/glslang.y"
{
parseContext.spvRemoved((yyvsp[-3].lex).loc, "subroutine");
parseContext.globalCheck((yyvsp[-3].lex).loc, "subroutine");
parseContext.unimplemented((yyvsp[-3].lex).loc, "subroutine");
(yyval.interm.type).init((yyvsp[-3].lex).loc);
}
-#line 6572 "MachineIndependent/glslang_tab.cpp"
+#line 7254 "MachineIndependent/glslang_tab.cpp"
break;
- case 192: /* non_uniform_qualifier: NONUNIFORM */
-#line 1583 "MachineIndependent/glslang.y"
+ case 201: /* non_uniform_qualifier: NONUNIFORM */
+#line 1656 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc);
(yyval.interm.type).qualifier.nonUniform = true;
}
-#line 6581 "MachineIndependent/glslang_tab.cpp"
+#line 7263 "MachineIndependent/glslang_tab.cpp"
break;
- case 193: /* type_name_list: IDENTIFIER */
-#line 1590 "MachineIndependent/glslang.y"
+ case 202: /* type_name_list: IDENTIFIER */
+#line 1663 "MachineIndependent/glslang.y"
{
// TODO
}
-#line 6589 "MachineIndependent/glslang_tab.cpp"
+#line 7271 "MachineIndependent/glslang_tab.cpp"
break;
- case 194: /* type_name_list: type_name_list COMMA IDENTIFIER */
-#line 1593 "MachineIndependent/glslang.y"
+ case 203: /* type_name_list: type_name_list COMMA IDENTIFIER */
+#line 1666 "MachineIndependent/glslang.y"
{
// TODO: 4.0 semantics: subroutines
// 1) make sure each identifier is a type declared earlier with SUBROUTINE
// 2) save all of the identifiers for future comparison with the declared function
}
-#line 6599 "MachineIndependent/glslang_tab.cpp"
+#line 7281 "MachineIndependent/glslang_tab.cpp"
break;
- case 195: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt */
-#line 1602 "MachineIndependent/glslang.y"
+ case 204: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt */
+#line 1675 "MachineIndependent/glslang.y"
{
(yyval.interm.type) = (yyvsp[-1].interm.type);
(yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type));
(yyval.interm.type).typeParameters = (yyvsp[0].interm.typeParameters);
}
-#line 6609 "MachineIndependent/glslang_tab.cpp"
+#line 7291 "MachineIndependent/glslang_tab.cpp"
break;
- case 196: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt array_specifier */
-#line 1607 "MachineIndependent/glslang.y"
+ case 205: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt array_specifier */
+#line 1680 "MachineIndependent/glslang.y"
{
parseContext.arrayOfArrayVersionCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes);
(yyval.interm.type) = (yyvsp[-2].interm.type);
@@ -6617,21 +7299,21 @@ yyreduce:
(yyval.interm.type).typeParameters = (yyvsp[-1].interm.typeParameters);
(yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes;
}
-#line 6621 "MachineIndependent/glslang_tab.cpp"
+#line 7303 "MachineIndependent/glslang_tab.cpp"
break;
- case 197: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */
-#line 1617 "MachineIndependent/glslang.y"
+ case 206: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */
+#line 1690 "MachineIndependent/glslang.y"
{
(yyval.interm).loc = (yyvsp[-1].lex).loc;
(yyval.interm).arraySizes = new TArraySizes;
(yyval.interm).arraySizes->addInnerSize();
}
-#line 6631 "MachineIndependent/glslang_tab.cpp"
+#line 7313 "MachineIndependent/glslang_tab.cpp"
break;
- case 198: /* array_specifier: LEFT_BRACKET conditional_expression RIGHT_BRACKET */
-#line 1622 "MachineIndependent/glslang.y"
+ case 207: /* array_specifier: LEFT_BRACKET conditional_expression RIGHT_BRACKET */
+#line 1695 "MachineIndependent/glslang.y"
{
(yyval.interm).loc = (yyvsp[-2].lex).loc;
(yyval.interm).arraySizes = new TArraySizes;
@@ -6640,20 +7322,20 @@ yyreduce:
parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size");
(yyval.interm).arraySizes->addInnerSize(size);
}
-#line 6644 "MachineIndependent/glslang_tab.cpp"
+#line 7326 "MachineIndependent/glslang_tab.cpp"
break;
- case 199: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */
-#line 1630 "MachineIndependent/glslang.y"
+ case 208: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */
+#line 1703 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[-2].interm);
(yyval.interm).arraySizes->addInnerSize();
}
-#line 6653 "MachineIndependent/glslang_tab.cpp"
+#line 7335 "MachineIndependent/glslang_tab.cpp"
break;
- case 200: /* array_specifier: array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET */
-#line 1634 "MachineIndependent/glslang.y"
+ case 209: /* array_specifier: array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET */
+#line 1707 "MachineIndependent/glslang.y"
{
(yyval.interm) = (yyvsp[-3].interm);
@@ -6661,35 +7343,35 @@ yyreduce:
parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size");
(yyval.interm).arraySizes->addInnerSize(size);
}
-#line 6665 "MachineIndependent/glslang_tab.cpp"
+#line 7347 "MachineIndependent/glslang_tab.cpp"
break;
- case 201: /* type_parameter_specifier_opt: type_parameter_specifier */
-#line 1644 "MachineIndependent/glslang.y"
+ case 210: /* type_parameter_specifier_opt: type_parameter_specifier */
+#line 1717 "MachineIndependent/glslang.y"
{
(yyval.interm.typeParameters) = (yyvsp[0].interm.typeParameters);
}
-#line 6673 "MachineIndependent/glslang_tab.cpp"
+#line 7355 "MachineIndependent/glslang_tab.cpp"
break;
- case 202: /* type_parameter_specifier_opt: %empty */
-#line 1647 "MachineIndependent/glslang.y"
+ case 211: /* type_parameter_specifier_opt: %empty */
+#line 1720 "MachineIndependent/glslang.y"
{
(yyval.interm.typeParameters) = 0;
}
-#line 6681 "MachineIndependent/glslang_tab.cpp"
+#line 7363 "MachineIndependent/glslang_tab.cpp"
break;
- case 203: /* type_parameter_specifier: LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE */
-#line 1653 "MachineIndependent/glslang.y"
+ case 212: /* type_parameter_specifier: LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE */
+#line 1726 "MachineIndependent/glslang.y"
{
(yyval.interm.typeParameters) = (yyvsp[-1].interm.typeParameters);
}
-#line 6689 "MachineIndependent/glslang_tab.cpp"
+#line 7371 "MachineIndependent/glslang_tab.cpp"
break;
- case 204: /* type_parameter_specifier_list: unary_expression */
-#line 1659 "MachineIndependent/glslang.y"
+ case 213: /* type_parameter_specifier_list: unary_expression */
+#line 1732 "MachineIndependent/glslang.y"
{
(yyval.interm.typeParameters) = new TArraySizes;
@@ -6697,11 +7379,11 @@ yyreduce:
parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter");
(yyval.interm.typeParameters)->addInnerSize(size);
}
-#line 6701 "MachineIndependent/glslang_tab.cpp"
+#line 7383 "MachineIndependent/glslang_tab.cpp"
break;
- case 205: /* type_parameter_specifier_list: type_parameter_specifier_list COMMA unary_expression */
-#line 1666 "MachineIndependent/glslang.y"
+ case 214: /* type_parameter_specifier_list: type_parameter_specifier_list COMMA unary_expression */
+#line 1739 "MachineIndependent/glslang.y"
{
(yyval.interm.typeParameters) = (yyvsp[-2].interm.typeParameters);
@@ -6709,300 +7391,300 @@ yyreduce:
parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter");
(yyval.interm.typeParameters)->addInnerSize(size);
}
-#line 6713 "MachineIndependent/glslang_tab.cpp"
+#line 7395 "MachineIndependent/glslang_tab.cpp"
break;
- case 206: /* type_specifier_nonarray: VOID */
-#line 1676 "MachineIndependent/glslang.y"
+ case 215: /* type_specifier_nonarray: VOID */
+#line 1749 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtVoid;
}
-#line 6722 "MachineIndependent/glslang_tab.cpp"
+#line 7404 "MachineIndependent/glslang_tab.cpp"
break;
- case 207: /* type_specifier_nonarray: FLOAT */
-#line 1680 "MachineIndependent/glslang.y"
+ case 216: /* type_specifier_nonarray: FLOAT */
+#line 1753 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
}
-#line 6731 "MachineIndependent/glslang_tab.cpp"
+#line 7413 "MachineIndependent/glslang_tab.cpp"
break;
- case 208: /* type_specifier_nonarray: INT */
-#line 1684 "MachineIndependent/glslang.y"
+ case 217: /* type_specifier_nonarray: INT */
+#line 1757 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
}
-#line 6740 "MachineIndependent/glslang_tab.cpp"
+#line 7422 "MachineIndependent/glslang_tab.cpp"
break;
- case 209: /* type_specifier_nonarray: UINT */
-#line 1688 "MachineIndependent/glslang.y"
+ case 218: /* type_specifier_nonarray: UINT */
+#line 1761 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
}
-#line 6750 "MachineIndependent/glslang_tab.cpp"
+#line 7432 "MachineIndependent/glslang_tab.cpp"
break;
- case 210: /* type_specifier_nonarray: BOOL */
-#line 1693 "MachineIndependent/glslang.y"
+ case 219: /* type_specifier_nonarray: BOOL */
+#line 1766 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtBool;
}
-#line 6759 "MachineIndependent/glslang_tab.cpp"
+#line 7441 "MachineIndependent/glslang_tab.cpp"
break;
- case 211: /* type_specifier_nonarray: VEC2 */
-#line 1697 "MachineIndependent/glslang.y"
+ case 220: /* type_specifier_nonarray: VEC2 */
+#line 1770 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(2);
}
-#line 6769 "MachineIndependent/glslang_tab.cpp"
+#line 7451 "MachineIndependent/glslang_tab.cpp"
break;
- case 212: /* type_specifier_nonarray: VEC3 */
-#line 1702 "MachineIndependent/glslang.y"
+ case 221: /* type_specifier_nonarray: VEC3 */
+#line 1775 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(3);
}
-#line 6779 "MachineIndependent/glslang_tab.cpp"
+#line 7461 "MachineIndependent/glslang_tab.cpp"
break;
- case 213: /* type_specifier_nonarray: VEC4 */
-#line 1707 "MachineIndependent/glslang.y"
+ case 222: /* type_specifier_nonarray: VEC4 */
+#line 1780 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(4);
}
-#line 6789 "MachineIndependent/glslang_tab.cpp"
+#line 7471 "MachineIndependent/glslang_tab.cpp"
break;
- case 214: /* type_specifier_nonarray: BVEC2 */
-#line 1712 "MachineIndependent/glslang.y"
+ case 223: /* type_specifier_nonarray: BVEC2 */
+#line 1785 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtBool;
(yyval.interm.type).setVector(2);
}
-#line 6799 "MachineIndependent/glslang_tab.cpp"
+#line 7481 "MachineIndependent/glslang_tab.cpp"
break;
- case 215: /* type_specifier_nonarray: BVEC3 */
-#line 1717 "MachineIndependent/glslang.y"
+ case 224: /* type_specifier_nonarray: BVEC3 */
+#line 1790 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtBool;
(yyval.interm.type).setVector(3);
}
-#line 6809 "MachineIndependent/glslang_tab.cpp"
+#line 7491 "MachineIndependent/glslang_tab.cpp"
break;
- case 216: /* type_specifier_nonarray: BVEC4 */
-#line 1722 "MachineIndependent/glslang.y"
+ case 225: /* type_specifier_nonarray: BVEC4 */
+#line 1795 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtBool;
(yyval.interm.type).setVector(4);
}
-#line 6819 "MachineIndependent/glslang_tab.cpp"
+#line 7501 "MachineIndependent/glslang_tab.cpp"
break;
- case 217: /* type_specifier_nonarray: IVEC2 */
-#line 1727 "MachineIndependent/glslang.y"
+ case 226: /* type_specifier_nonarray: IVEC2 */
+#line 1800 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(2);
}
-#line 6829 "MachineIndependent/glslang_tab.cpp"
+#line 7511 "MachineIndependent/glslang_tab.cpp"
break;
- case 218: /* type_specifier_nonarray: IVEC3 */
-#line 1732 "MachineIndependent/glslang.y"
+ case 227: /* type_specifier_nonarray: IVEC3 */
+#line 1805 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(3);
}
-#line 6839 "MachineIndependent/glslang_tab.cpp"
+#line 7521 "MachineIndependent/glslang_tab.cpp"
break;
- case 219: /* type_specifier_nonarray: IVEC4 */
-#line 1737 "MachineIndependent/glslang.y"
+ case 228: /* type_specifier_nonarray: IVEC4 */
+#line 1810 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(4);
}
-#line 6849 "MachineIndependent/glslang_tab.cpp"
+#line 7531 "MachineIndependent/glslang_tab.cpp"
break;
- case 220: /* type_specifier_nonarray: UVEC2 */
-#line 1742 "MachineIndependent/glslang.y"
+ case 229: /* type_specifier_nonarray: UVEC2 */
+#line 1815 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).setVector(2);
}
-#line 6860 "MachineIndependent/glslang_tab.cpp"
+#line 7542 "MachineIndependent/glslang_tab.cpp"
break;
- case 221: /* type_specifier_nonarray: UVEC3 */
-#line 1748 "MachineIndependent/glslang.y"
+ case 230: /* type_specifier_nonarray: UVEC3 */
+#line 1821 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).setVector(3);
}
-#line 6871 "MachineIndependent/glslang_tab.cpp"
+#line 7553 "MachineIndependent/glslang_tab.cpp"
break;
- case 222: /* type_specifier_nonarray: UVEC4 */
-#line 1754 "MachineIndependent/glslang.y"
+ case 231: /* type_specifier_nonarray: UVEC4 */
+#line 1827 "MachineIndependent/glslang.y"
{
parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).setVector(4);
}
-#line 6882 "MachineIndependent/glslang_tab.cpp"
+#line 7564 "MachineIndependent/glslang_tab.cpp"
break;
- case 223: /* type_specifier_nonarray: MAT2 */
-#line 1760 "MachineIndependent/glslang.y"
+ case 232: /* type_specifier_nonarray: MAT2 */
+#line 1833 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 6892 "MachineIndependent/glslang_tab.cpp"
+#line 7574 "MachineIndependent/glslang_tab.cpp"
break;
- case 224: /* type_specifier_nonarray: MAT3 */
-#line 1765 "MachineIndependent/glslang.y"
+ case 233: /* type_specifier_nonarray: MAT3 */
+#line 1838 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 6902 "MachineIndependent/glslang_tab.cpp"
+#line 7584 "MachineIndependent/glslang_tab.cpp"
break;
- case 225: /* type_specifier_nonarray: MAT4 */
-#line 1770 "MachineIndependent/glslang.y"
+ case 234: /* type_specifier_nonarray: MAT4 */
+#line 1843 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 6912 "MachineIndependent/glslang_tab.cpp"
+#line 7594 "MachineIndependent/glslang_tab.cpp"
break;
- case 226: /* type_specifier_nonarray: MAT2X2 */
-#line 1775 "MachineIndependent/glslang.y"
+ case 235: /* type_specifier_nonarray: MAT2X2 */
+#line 1848 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 6922 "MachineIndependent/glslang_tab.cpp"
+#line 7604 "MachineIndependent/glslang_tab.cpp"
break;
- case 227: /* type_specifier_nonarray: MAT2X3 */
-#line 1780 "MachineIndependent/glslang.y"
+ case 236: /* type_specifier_nonarray: MAT2X3 */
+#line 1853 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 3);
}
-#line 6932 "MachineIndependent/glslang_tab.cpp"
+#line 7614 "MachineIndependent/glslang_tab.cpp"
break;
- case 228: /* type_specifier_nonarray: MAT2X4 */
-#line 1785 "MachineIndependent/glslang.y"
+ case 237: /* type_specifier_nonarray: MAT2X4 */
+#line 1858 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 4);
}
-#line 6942 "MachineIndependent/glslang_tab.cpp"
+#line 7624 "MachineIndependent/glslang_tab.cpp"
break;
- case 229: /* type_specifier_nonarray: MAT3X2 */
-#line 1790 "MachineIndependent/glslang.y"
+ case 238: /* type_specifier_nonarray: MAT3X2 */
+#line 1863 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 2);
}
-#line 6952 "MachineIndependent/glslang_tab.cpp"
+#line 7634 "MachineIndependent/glslang_tab.cpp"
break;
- case 230: /* type_specifier_nonarray: MAT3X3 */
-#line 1795 "MachineIndependent/glslang.y"
+ case 239: /* type_specifier_nonarray: MAT3X3 */
+#line 1868 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 6962 "MachineIndependent/glslang_tab.cpp"
+#line 7644 "MachineIndependent/glslang_tab.cpp"
break;
- case 231: /* type_specifier_nonarray: MAT3X4 */
-#line 1800 "MachineIndependent/glslang.y"
+ case 240: /* type_specifier_nonarray: MAT3X4 */
+#line 1873 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 4);
}
-#line 6972 "MachineIndependent/glslang_tab.cpp"
+#line 7654 "MachineIndependent/glslang_tab.cpp"
break;
- case 232: /* type_specifier_nonarray: MAT4X2 */
-#line 1805 "MachineIndependent/glslang.y"
+ case 241: /* type_specifier_nonarray: MAT4X2 */
+#line 1878 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 2);
}
-#line 6982 "MachineIndependent/glslang_tab.cpp"
+#line 7664 "MachineIndependent/glslang_tab.cpp"
break;
- case 233: /* type_specifier_nonarray: MAT4X3 */
-#line 1810 "MachineIndependent/glslang.y"
+ case 242: /* type_specifier_nonarray: MAT4X3 */
+#line 1883 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 3);
}
-#line 6992 "MachineIndependent/glslang_tab.cpp"
+#line 7674 "MachineIndependent/glslang_tab.cpp"
break;
- case 234: /* type_specifier_nonarray: MAT4X4 */
-#line 1815 "MachineIndependent/glslang.y"
+ case 243: /* type_specifier_nonarray: MAT4X4 */
+#line 1888 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7002 "MachineIndependent/glslang_tab.cpp"
+#line 7684 "MachineIndependent/glslang_tab.cpp"
break;
- case 235: /* type_specifier_nonarray: DOUBLE */
-#line 1821 "MachineIndependent/glslang.y"
+ case 244: /* type_specifier_nonarray: DOUBLE */
+#line 1894 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7010,121 +7692,121 @@ yyreduce:
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
}
-#line 7014 "MachineIndependent/glslang_tab.cpp"
+#line 7696 "MachineIndependent/glslang_tab.cpp"
break;
- case 236: /* type_specifier_nonarray: FLOAT16_T */
-#line 1828 "MachineIndependent/glslang.y"
+ case 245: /* type_specifier_nonarray: FLOAT16_T */
+#line 1901 "MachineIndependent/glslang.y"
{
parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "float16_t", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
}
-#line 7024 "MachineIndependent/glslang_tab.cpp"
+#line 7706 "MachineIndependent/glslang_tab.cpp"
break;
- case 237: /* type_specifier_nonarray: FLOAT32_T */
-#line 1833 "MachineIndependent/glslang.y"
+ case 246: /* type_specifier_nonarray: FLOAT32_T */
+#line 1906 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
}
-#line 7034 "MachineIndependent/glslang_tab.cpp"
+#line 7716 "MachineIndependent/glslang_tab.cpp"
break;
- case 238: /* type_specifier_nonarray: FLOAT64_T */
-#line 1838 "MachineIndependent/glslang.y"
+ case 247: /* type_specifier_nonarray: FLOAT64_T */
+#line 1911 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
}
-#line 7044 "MachineIndependent/glslang_tab.cpp"
+#line 7726 "MachineIndependent/glslang_tab.cpp"
break;
- case 239: /* type_specifier_nonarray: INT8_T */
-#line 1843 "MachineIndependent/glslang.y"
+ case 248: /* type_specifier_nonarray: INT8_T */
+#line 1916 "MachineIndependent/glslang.y"
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt8;
}
-#line 7054 "MachineIndependent/glslang_tab.cpp"
+#line 7736 "MachineIndependent/glslang_tab.cpp"
break;
- case 240: /* type_specifier_nonarray: UINT8_T */
-#line 1848 "MachineIndependent/glslang.y"
+ case 249: /* type_specifier_nonarray: UINT8_T */
+#line 1921 "MachineIndependent/glslang.y"
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint8;
}
-#line 7064 "MachineIndependent/glslang_tab.cpp"
+#line 7746 "MachineIndependent/glslang_tab.cpp"
break;
- case 241: /* type_specifier_nonarray: INT16_T */
-#line 1853 "MachineIndependent/glslang.y"
+ case 250: /* type_specifier_nonarray: INT16_T */
+#line 1926 "MachineIndependent/glslang.y"
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt16;
}
-#line 7074 "MachineIndependent/glslang_tab.cpp"
+#line 7756 "MachineIndependent/glslang_tab.cpp"
break;
- case 242: /* type_specifier_nonarray: UINT16_T */
-#line 1858 "MachineIndependent/glslang.y"
+ case 251: /* type_specifier_nonarray: UINT16_T */
+#line 1931 "MachineIndependent/glslang.y"
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint16;
}
-#line 7084 "MachineIndependent/glslang_tab.cpp"
+#line 7766 "MachineIndependent/glslang_tab.cpp"
break;
- case 243: /* type_specifier_nonarray: INT32_T */
-#line 1863 "MachineIndependent/glslang.y"
+ case 252: /* type_specifier_nonarray: INT32_T */
+#line 1936 "MachineIndependent/glslang.y"
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
}
-#line 7094 "MachineIndependent/glslang_tab.cpp"
+#line 7776 "MachineIndependent/glslang_tab.cpp"
break;
- case 244: /* type_specifier_nonarray: UINT32_T */
-#line 1868 "MachineIndependent/glslang.y"
+ case 253: /* type_specifier_nonarray: UINT32_T */
+#line 1941 "MachineIndependent/glslang.y"
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
}
-#line 7104 "MachineIndependent/glslang_tab.cpp"
+#line 7786 "MachineIndependent/glslang_tab.cpp"
break;
- case 245: /* type_specifier_nonarray: INT64_T */
-#line 1873 "MachineIndependent/glslang.y"
+ case 254: /* type_specifier_nonarray: INT64_T */
+#line 1946 "MachineIndependent/glslang.y"
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt64;
}
-#line 7114 "MachineIndependent/glslang_tab.cpp"
+#line 7796 "MachineIndependent/glslang_tab.cpp"
break;
- case 246: /* type_specifier_nonarray: UINT64_T */
-#line 1878 "MachineIndependent/glslang.y"
+ case 255: /* type_specifier_nonarray: UINT64_T */
+#line 1951 "MachineIndependent/glslang.y"
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint64;
}
-#line 7124 "MachineIndependent/glslang_tab.cpp"
+#line 7806 "MachineIndependent/glslang_tab.cpp"
break;
- case 247: /* type_specifier_nonarray: DVEC2 */
-#line 1883 "MachineIndependent/glslang.y"
+ case 256: /* type_specifier_nonarray: DVEC2 */
+#line 1956 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7133,11 +7815,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(2);
}
-#line 7137 "MachineIndependent/glslang_tab.cpp"
+#line 7819 "MachineIndependent/glslang_tab.cpp"
break;
- case 248: /* type_specifier_nonarray: DVEC3 */
-#line 1891 "MachineIndependent/glslang.y"
+ case 257: /* type_specifier_nonarray: DVEC3 */
+#line 1964 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7146,11 +7828,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(3);
}
-#line 7150 "MachineIndependent/glslang_tab.cpp"
+#line 7832 "MachineIndependent/glslang_tab.cpp"
break;
- case 249: /* type_specifier_nonarray: DVEC4 */
-#line 1899 "MachineIndependent/glslang.y"
+ case 258: /* type_specifier_nonarray: DVEC4 */
+#line 1972 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7159,374 +7841,374 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(4);
}
-#line 7163 "MachineIndependent/glslang_tab.cpp"
+#line 7845 "MachineIndependent/glslang_tab.cpp"
break;
- case 250: /* type_specifier_nonarray: F16VEC2 */
-#line 1907 "MachineIndependent/glslang.y"
+ case 259: /* type_specifier_nonarray: F16VEC2 */
+#line 1980 "MachineIndependent/glslang.y"
{
parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setVector(2);
}
-#line 7174 "MachineIndependent/glslang_tab.cpp"
+#line 7856 "MachineIndependent/glslang_tab.cpp"
break;
- case 251: /* type_specifier_nonarray: F16VEC3 */
-#line 1913 "MachineIndependent/glslang.y"
+ case 260: /* type_specifier_nonarray: F16VEC3 */
+#line 1986 "MachineIndependent/glslang.y"
{
parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setVector(3);
}
-#line 7185 "MachineIndependent/glslang_tab.cpp"
+#line 7867 "MachineIndependent/glslang_tab.cpp"
break;
- case 252: /* type_specifier_nonarray: F16VEC4 */
-#line 1919 "MachineIndependent/glslang.y"
+ case 261: /* type_specifier_nonarray: F16VEC4 */
+#line 1992 "MachineIndependent/glslang.y"
{
parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setVector(4);
}
-#line 7196 "MachineIndependent/glslang_tab.cpp"
+#line 7878 "MachineIndependent/glslang_tab.cpp"
break;
- case 253: /* type_specifier_nonarray: F32VEC2 */
-#line 1925 "MachineIndependent/glslang.y"
+ case 262: /* type_specifier_nonarray: F32VEC2 */
+#line 1998 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(2);
}
-#line 7207 "MachineIndependent/glslang_tab.cpp"
+#line 7889 "MachineIndependent/glslang_tab.cpp"
break;
- case 254: /* type_specifier_nonarray: F32VEC3 */
-#line 1931 "MachineIndependent/glslang.y"
+ case 263: /* type_specifier_nonarray: F32VEC3 */
+#line 2004 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(3);
}
-#line 7218 "MachineIndependent/glslang_tab.cpp"
+#line 7900 "MachineIndependent/glslang_tab.cpp"
break;
- case 255: /* type_specifier_nonarray: F32VEC4 */
-#line 1937 "MachineIndependent/glslang.y"
+ case 264: /* type_specifier_nonarray: F32VEC4 */
+#line 2010 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setVector(4);
}
-#line 7229 "MachineIndependent/glslang_tab.cpp"
+#line 7911 "MachineIndependent/glslang_tab.cpp"
break;
- case 256: /* type_specifier_nonarray: F64VEC2 */
-#line 1943 "MachineIndependent/glslang.y"
+ case 265: /* type_specifier_nonarray: F64VEC2 */
+#line 2016 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(2);
}
-#line 7240 "MachineIndependent/glslang_tab.cpp"
+#line 7922 "MachineIndependent/glslang_tab.cpp"
break;
- case 257: /* type_specifier_nonarray: F64VEC3 */
-#line 1949 "MachineIndependent/glslang.y"
+ case 266: /* type_specifier_nonarray: F64VEC3 */
+#line 2022 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(3);
}
-#line 7251 "MachineIndependent/glslang_tab.cpp"
+#line 7933 "MachineIndependent/glslang_tab.cpp"
break;
- case 258: /* type_specifier_nonarray: F64VEC4 */
-#line 1955 "MachineIndependent/glslang.y"
+ case 267: /* type_specifier_nonarray: F64VEC4 */
+#line 2028 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setVector(4);
}
-#line 7262 "MachineIndependent/glslang_tab.cpp"
+#line 7944 "MachineIndependent/glslang_tab.cpp"
break;
- case 259: /* type_specifier_nonarray: I8VEC2 */
-#line 1961 "MachineIndependent/glslang.y"
+ case 268: /* type_specifier_nonarray: I8VEC2 */
+#line 2034 "MachineIndependent/glslang.y"
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt8;
(yyval.interm.type).setVector(2);
}
-#line 7273 "MachineIndependent/glslang_tab.cpp"
+#line 7955 "MachineIndependent/glslang_tab.cpp"
break;
- case 260: /* type_specifier_nonarray: I8VEC3 */
-#line 1967 "MachineIndependent/glslang.y"
+ case 269: /* type_specifier_nonarray: I8VEC3 */
+#line 2040 "MachineIndependent/glslang.y"
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt8;
(yyval.interm.type).setVector(3);
}
-#line 7284 "MachineIndependent/glslang_tab.cpp"
+#line 7966 "MachineIndependent/glslang_tab.cpp"
break;
- case 261: /* type_specifier_nonarray: I8VEC4 */
-#line 1973 "MachineIndependent/glslang.y"
+ case 270: /* type_specifier_nonarray: I8VEC4 */
+#line 2046 "MachineIndependent/glslang.y"
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt8;
(yyval.interm.type).setVector(4);
}
-#line 7295 "MachineIndependent/glslang_tab.cpp"
+#line 7977 "MachineIndependent/glslang_tab.cpp"
break;
- case 262: /* type_specifier_nonarray: I16VEC2 */
-#line 1979 "MachineIndependent/glslang.y"
+ case 271: /* type_specifier_nonarray: I16VEC2 */
+#line 2052 "MachineIndependent/glslang.y"
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt16;
(yyval.interm.type).setVector(2);
}
-#line 7306 "MachineIndependent/glslang_tab.cpp"
+#line 7988 "MachineIndependent/glslang_tab.cpp"
break;
- case 263: /* type_specifier_nonarray: I16VEC3 */
-#line 1985 "MachineIndependent/glslang.y"
+ case 272: /* type_specifier_nonarray: I16VEC3 */
+#line 2058 "MachineIndependent/glslang.y"
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt16;
(yyval.interm.type).setVector(3);
}
-#line 7317 "MachineIndependent/glslang_tab.cpp"
+#line 7999 "MachineIndependent/glslang_tab.cpp"
break;
- case 264: /* type_specifier_nonarray: I16VEC4 */
-#line 1991 "MachineIndependent/glslang.y"
+ case 273: /* type_specifier_nonarray: I16VEC4 */
+#line 2064 "MachineIndependent/glslang.y"
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt16;
(yyval.interm.type).setVector(4);
}
-#line 7328 "MachineIndependent/glslang_tab.cpp"
+#line 8010 "MachineIndependent/glslang_tab.cpp"
break;
- case 265: /* type_specifier_nonarray: I32VEC2 */
-#line 1997 "MachineIndependent/glslang.y"
+ case 274: /* type_specifier_nonarray: I32VEC2 */
+#line 2070 "MachineIndependent/glslang.y"
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(2);
}
-#line 7339 "MachineIndependent/glslang_tab.cpp"
+#line 8021 "MachineIndependent/glslang_tab.cpp"
break;
- case 266: /* type_specifier_nonarray: I32VEC3 */
-#line 2003 "MachineIndependent/glslang.y"
+ case 275: /* type_specifier_nonarray: I32VEC3 */
+#line 2076 "MachineIndependent/glslang.y"
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(3);
}
-#line 7350 "MachineIndependent/glslang_tab.cpp"
+#line 8032 "MachineIndependent/glslang_tab.cpp"
break;
- case 267: /* type_specifier_nonarray: I32VEC4 */
-#line 2009 "MachineIndependent/glslang.y"
+ case 276: /* type_specifier_nonarray: I32VEC4 */
+#line 2082 "MachineIndependent/glslang.y"
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).setVector(4);
}
-#line 7361 "MachineIndependent/glslang_tab.cpp"
+#line 8043 "MachineIndependent/glslang_tab.cpp"
break;
- case 268: /* type_specifier_nonarray: I64VEC2 */
-#line 2015 "MachineIndependent/glslang.y"
+ case 277: /* type_specifier_nonarray: I64VEC2 */
+#line 2088 "MachineIndependent/glslang.y"
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt64;
(yyval.interm.type).setVector(2);
}
-#line 7372 "MachineIndependent/glslang_tab.cpp"
+#line 8054 "MachineIndependent/glslang_tab.cpp"
break;
- case 269: /* type_specifier_nonarray: I64VEC3 */
-#line 2021 "MachineIndependent/glslang.y"
+ case 278: /* type_specifier_nonarray: I64VEC3 */
+#line 2094 "MachineIndependent/glslang.y"
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt64;
(yyval.interm.type).setVector(3);
}
-#line 7383 "MachineIndependent/glslang_tab.cpp"
+#line 8065 "MachineIndependent/glslang_tab.cpp"
break;
- case 270: /* type_specifier_nonarray: I64VEC4 */
-#line 2027 "MachineIndependent/glslang.y"
+ case 279: /* type_specifier_nonarray: I64VEC4 */
+#line 2100 "MachineIndependent/glslang.y"
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt64;
(yyval.interm.type).setVector(4);
}
-#line 7394 "MachineIndependent/glslang_tab.cpp"
+#line 8076 "MachineIndependent/glslang_tab.cpp"
break;
- case 271: /* type_specifier_nonarray: U8VEC2 */
-#line 2033 "MachineIndependent/glslang.y"
+ case 280: /* type_specifier_nonarray: U8VEC2 */
+#line 2106 "MachineIndependent/glslang.y"
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint8;
(yyval.interm.type).setVector(2);
}
-#line 7405 "MachineIndependent/glslang_tab.cpp"
+#line 8087 "MachineIndependent/glslang_tab.cpp"
break;
- case 272: /* type_specifier_nonarray: U8VEC3 */
-#line 2039 "MachineIndependent/glslang.y"
+ case 281: /* type_specifier_nonarray: U8VEC3 */
+#line 2112 "MachineIndependent/glslang.y"
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint8;
(yyval.interm.type).setVector(3);
}
-#line 7416 "MachineIndependent/glslang_tab.cpp"
+#line 8098 "MachineIndependent/glslang_tab.cpp"
break;
- case 273: /* type_specifier_nonarray: U8VEC4 */
-#line 2045 "MachineIndependent/glslang.y"
+ case 282: /* type_specifier_nonarray: U8VEC4 */
+#line 2118 "MachineIndependent/glslang.y"
{
parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint8;
(yyval.interm.type).setVector(4);
}
-#line 7427 "MachineIndependent/glslang_tab.cpp"
+#line 8109 "MachineIndependent/glslang_tab.cpp"
break;
- case 274: /* type_specifier_nonarray: U16VEC2 */
-#line 2051 "MachineIndependent/glslang.y"
+ case 283: /* type_specifier_nonarray: U16VEC2 */
+#line 2124 "MachineIndependent/glslang.y"
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint16;
(yyval.interm.type).setVector(2);
}
-#line 7438 "MachineIndependent/glslang_tab.cpp"
+#line 8120 "MachineIndependent/glslang_tab.cpp"
break;
- case 275: /* type_specifier_nonarray: U16VEC3 */
-#line 2057 "MachineIndependent/glslang.y"
+ case 284: /* type_specifier_nonarray: U16VEC3 */
+#line 2130 "MachineIndependent/glslang.y"
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint16;
(yyval.interm.type).setVector(3);
}
-#line 7449 "MachineIndependent/glslang_tab.cpp"
+#line 8131 "MachineIndependent/glslang_tab.cpp"
break;
- case 276: /* type_specifier_nonarray: U16VEC4 */
-#line 2063 "MachineIndependent/glslang.y"
+ case 285: /* type_specifier_nonarray: U16VEC4 */
+#line 2136 "MachineIndependent/glslang.y"
{
parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint16;
(yyval.interm.type).setVector(4);
}
-#line 7460 "MachineIndependent/glslang_tab.cpp"
+#line 8142 "MachineIndependent/glslang_tab.cpp"
break;
- case 277: /* type_specifier_nonarray: U32VEC2 */
-#line 2069 "MachineIndependent/glslang.y"
+ case 286: /* type_specifier_nonarray: U32VEC2 */
+#line 2142 "MachineIndependent/glslang.y"
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).setVector(2);
}
-#line 7471 "MachineIndependent/glslang_tab.cpp"
+#line 8153 "MachineIndependent/glslang_tab.cpp"
break;
- case 278: /* type_specifier_nonarray: U32VEC3 */
-#line 2075 "MachineIndependent/glslang.y"
+ case 287: /* type_specifier_nonarray: U32VEC3 */
+#line 2148 "MachineIndependent/glslang.y"
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).setVector(3);
}
-#line 7482 "MachineIndependent/glslang_tab.cpp"
+#line 8164 "MachineIndependent/glslang_tab.cpp"
break;
- case 279: /* type_specifier_nonarray: U32VEC4 */
-#line 2081 "MachineIndependent/glslang.y"
+ case 288: /* type_specifier_nonarray: U32VEC4 */
+#line 2154 "MachineIndependent/glslang.y"
{
parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).setVector(4);
}
-#line 7493 "MachineIndependent/glslang_tab.cpp"
+#line 8175 "MachineIndependent/glslang_tab.cpp"
break;
- case 280: /* type_specifier_nonarray: U64VEC2 */
-#line 2087 "MachineIndependent/glslang.y"
+ case 289: /* type_specifier_nonarray: U64VEC2 */
+#line 2160 "MachineIndependent/glslang.y"
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint64;
(yyval.interm.type).setVector(2);
}
-#line 7504 "MachineIndependent/glslang_tab.cpp"
+#line 8186 "MachineIndependent/glslang_tab.cpp"
break;
- case 281: /* type_specifier_nonarray: U64VEC3 */
-#line 2093 "MachineIndependent/glslang.y"
+ case 290: /* type_specifier_nonarray: U64VEC3 */
+#line 2166 "MachineIndependent/glslang.y"
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint64;
(yyval.interm.type).setVector(3);
}
-#line 7515 "MachineIndependent/glslang_tab.cpp"
+#line 8197 "MachineIndependent/glslang_tab.cpp"
break;
- case 282: /* type_specifier_nonarray: U64VEC4 */
-#line 2099 "MachineIndependent/glslang.y"
+ case 291: /* type_specifier_nonarray: U64VEC4 */
+#line 2172 "MachineIndependent/glslang.y"
{
parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint64;
(yyval.interm.type).setVector(4);
}
-#line 7526 "MachineIndependent/glslang_tab.cpp"
+#line 8208 "MachineIndependent/glslang_tab.cpp"
break;
- case 283: /* type_specifier_nonarray: DMAT2 */
-#line 2105 "MachineIndependent/glslang.y"
+ case 292: /* type_specifier_nonarray: DMAT2 */
+#line 2178 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7535,11 +8217,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7539 "MachineIndependent/glslang_tab.cpp"
+#line 8221 "MachineIndependent/glslang_tab.cpp"
break;
- case 284: /* type_specifier_nonarray: DMAT3 */
-#line 2113 "MachineIndependent/glslang.y"
+ case 293: /* type_specifier_nonarray: DMAT3 */
+#line 2186 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7548,11 +8230,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7552 "MachineIndependent/glslang_tab.cpp"
+#line 8234 "MachineIndependent/glslang_tab.cpp"
break;
- case 285: /* type_specifier_nonarray: DMAT4 */
-#line 2121 "MachineIndependent/glslang.y"
+ case 294: /* type_specifier_nonarray: DMAT4 */
+#line 2194 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7561,11 +8243,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7565 "MachineIndependent/glslang_tab.cpp"
+#line 8247 "MachineIndependent/glslang_tab.cpp"
break;
- case 286: /* type_specifier_nonarray: DMAT2X2 */
-#line 2129 "MachineIndependent/glslang.y"
+ case 295: /* type_specifier_nonarray: DMAT2X2 */
+#line 2202 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7574,11 +8256,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7578 "MachineIndependent/glslang_tab.cpp"
+#line 8260 "MachineIndependent/glslang_tab.cpp"
break;
- case 287: /* type_specifier_nonarray: DMAT2X3 */
-#line 2137 "MachineIndependent/glslang.y"
+ case 296: /* type_specifier_nonarray: DMAT2X3 */
+#line 2210 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7587,11 +8269,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 3);
}
-#line 7591 "MachineIndependent/glslang_tab.cpp"
+#line 8273 "MachineIndependent/glslang_tab.cpp"
break;
- case 288: /* type_specifier_nonarray: DMAT2X4 */
-#line 2145 "MachineIndependent/glslang.y"
+ case 297: /* type_specifier_nonarray: DMAT2X4 */
+#line 2218 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7600,11 +8282,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 4);
}
-#line 7604 "MachineIndependent/glslang_tab.cpp"
+#line 8286 "MachineIndependent/glslang_tab.cpp"
break;
- case 289: /* type_specifier_nonarray: DMAT3X2 */
-#line 2153 "MachineIndependent/glslang.y"
+ case 298: /* type_specifier_nonarray: DMAT3X2 */
+#line 2226 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7613,11 +8295,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 2);
}
-#line 7617 "MachineIndependent/glslang_tab.cpp"
+#line 8299 "MachineIndependent/glslang_tab.cpp"
break;
- case 290: /* type_specifier_nonarray: DMAT3X3 */
-#line 2161 "MachineIndependent/glslang.y"
+ case 299: /* type_specifier_nonarray: DMAT3X3 */
+#line 2234 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7626,11 +8308,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7630 "MachineIndependent/glslang_tab.cpp"
+#line 8312 "MachineIndependent/glslang_tab.cpp"
break;
- case 291: /* type_specifier_nonarray: DMAT3X4 */
-#line 2169 "MachineIndependent/glslang.y"
+ case 300: /* type_specifier_nonarray: DMAT3X4 */
+#line 2242 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7639,11 +8321,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 4);
}
-#line 7643 "MachineIndependent/glslang_tab.cpp"
+#line 8325 "MachineIndependent/glslang_tab.cpp"
break;
- case 292: /* type_specifier_nonarray: DMAT4X2 */
-#line 2177 "MachineIndependent/glslang.y"
+ case 301: /* type_specifier_nonarray: DMAT4X2 */
+#line 2250 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7652,11 +8334,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 2);
}
-#line 7656 "MachineIndependent/glslang_tab.cpp"
+#line 8338 "MachineIndependent/glslang_tab.cpp"
break;
- case 293: /* type_specifier_nonarray: DMAT4X3 */
-#line 2185 "MachineIndependent/glslang.y"
+ case 302: /* type_specifier_nonarray: DMAT4X3 */
+#line 2258 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7665,11 +8347,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 3);
}
-#line 7669 "MachineIndependent/glslang_tab.cpp"
+#line 8351 "MachineIndependent/glslang_tab.cpp"
break;
- case 294: /* type_specifier_nonarray: DMAT4X4 */
-#line 2193 "MachineIndependent/glslang.y"
+ case 303: /* type_specifier_nonarray: DMAT4X4 */
+#line 2266 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix");
if (! parseContext.symbolTable.atBuiltInLevel())
@@ -7678,2228 +8360,2228 @@ yyreduce:
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7682 "MachineIndependent/glslang_tab.cpp"
+#line 8364 "MachineIndependent/glslang_tab.cpp"
break;
- case 295: /* type_specifier_nonarray: F16MAT2 */
-#line 2201 "MachineIndependent/glslang.y"
+ case 304: /* type_specifier_nonarray: F16MAT2 */
+#line 2274 "MachineIndependent/glslang.y"
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7693 "MachineIndependent/glslang_tab.cpp"
+#line 8375 "MachineIndependent/glslang_tab.cpp"
break;
- case 296: /* type_specifier_nonarray: F16MAT3 */
-#line 2207 "MachineIndependent/glslang.y"
+ case 305: /* type_specifier_nonarray: F16MAT3 */
+#line 2280 "MachineIndependent/glslang.y"
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7704 "MachineIndependent/glslang_tab.cpp"
+#line 8386 "MachineIndependent/glslang_tab.cpp"
break;
- case 297: /* type_specifier_nonarray: F16MAT4 */
-#line 2213 "MachineIndependent/glslang.y"
+ case 306: /* type_specifier_nonarray: F16MAT4 */
+#line 2286 "MachineIndependent/glslang.y"
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7715 "MachineIndependent/glslang_tab.cpp"
+#line 8397 "MachineIndependent/glslang_tab.cpp"
break;
- case 298: /* type_specifier_nonarray: F16MAT2X2 */
-#line 2219 "MachineIndependent/glslang.y"
+ case 307: /* type_specifier_nonarray: F16MAT2X2 */
+#line 2292 "MachineIndependent/glslang.y"
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7726 "MachineIndependent/glslang_tab.cpp"
+#line 8408 "MachineIndependent/glslang_tab.cpp"
break;
- case 299: /* type_specifier_nonarray: F16MAT2X3 */
-#line 2225 "MachineIndependent/glslang.y"
+ case 308: /* type_specifier_nonarray: F16MAT2X3 */
+#line 2298 "MachineIndependent/glslang.y"
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(2, 3);
}
-#line 7737 "MachineIndependent/glslang_tab.cpp"
+#line 8419 "MachineIndependent/glslang_tab.cpp"
break;
- case 300: /* type_specifier_nonarray: F16MAT2X4 */
-#line 2231 "MachineIndependent/glslang.y"
+ case 309: /* type_specifier_nonarray: F16MAT2X4 */
+#line 2304 "MachineIndependent/glslang.y"
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(2, 4);
}
-#line 7748 "MachineIndependent/glslang_tab.cpp"
+#line 8430 "MachineIndependent/glslang_tab.cpp"
break;
- case 301: /* type_specifier_nonarray: F16MAT3X2 */
-#line 2237 "MachineIndependent/glslang.y"
+ case 310: /* type_specifier_nonarray: F16MAT3X2 */
+#line 2310 "MachineIndependent/glslang.y"
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(3, 2);
}
-#line 7759 "MachineIndependent/glslang_tab.cpp"
+#line 8441 "MachineIndependent/glslang_tab.cpp"
break;
- case 302: /* type_specifier_nonarray: F16MAT3X3 */
-#line 2243 "MachineIndependent/glslang.y"
+ case 311: /* type_specifier_nonarray: F16MAT3X3 */
+#line 2316 "MachineIndependent/glslang.y"
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7770 "MachineIndependent/glslang_tab.cpp"
+#line 8452 "MachineIndependent/glslang_tab.cpp"
break;
- case 303: /* type_specifier_nonarray: F16MAT3X4 */
-#line 2249 "MachineIndependent/glslang.y"
+ case 312: /* type_specifier_nonarray: F16MAT3X4 */
+#line 2322 "MachineIndependent/glslang.y"
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(3, 4);
}
-#line 7781 "MachineIndependent/glslang_tab.cpp"
+#line 8463 "MachineIndependent/glslang_tab.cpp"
break;
- case 304: /* type_specifier_nonarray: F16MAT4X2 */
-#line 2255 "MachineIndependent/glslang.y"
+ case 313: /* type_specifier_nonarray: F16MAT4X2 */
+#line 2328 "MachineIndependent/glslang.y"
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(4, 2);
}
-#line 7792 "MachineIndependent/glslang_tab.cpp"
+#line 8474 "MachineIndependent/glslang_tab.cpp"
break;
- case 305: /* type_specifier_nonarray: F16MAT4X3 */
-#line 2261 "MachineIndependent/glslang.y"
+ case 314: /* type_specifier_nonarray: F16MAT4X3 */
+#line 2334 "MachineIndependent/glslang.y"
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(4, 3);
}
-#line 7803 "MachineIndependent/glslang_tab.cpp"
+#line 8485 "MachineIndependent/glslang_tab.cpp"
break;
- case 306: /* type_specifier_nonarray: F16MAT4X4 */
-#line 2267 "MachineIndependent/glslang.y"
+ case 315: /* type_specifier_nonarray: F16MAT4X4 */
+#line 2340 "MachineIndependent/glslang.y"
{
parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat16;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7814 "MachineIndependent/glslang_tab.cpp"
+#line 8496 "MachineIndependent/glslang_tab.cpp"
break;
- case 307: /* type_specifier_nonarray: F32MAT2 */
-#line 2273 "MachineIndependent/glslang.y"
+ case 316: /* type_specifier_nonarray: F32MAT2 */
+#line 2346 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7825 "MachineIndependent/glslang_tab.cpp"
+#line 8507 "MachineIndependent/glslang_tab.cpp"
break;
- case 308: /* type_specifier_nonarray: F32MAT3 */
-#line 2279 "MachineIndependent/glslang.y"
+ case 317: /* type_specifier_nonarray: F32MAT3 */
+#line 2352 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7836 "MachineIndependent/glslang_tab.cpp"
+#line 8518 "MachineIndependent/glslang_tab.cpp"
break;
- case 309: /* type_specifier_nonarray: F32MAT4 */
-#line 2285 "MachineIndependent/glslang.y"
+ case 318: /* type_specifier_nonarray: F32MAT4 */
+#line 2358 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7847 "MachineIndependent/glslang_tab.cpp"
+#line 8529 "MachineIndependent/glslang_tab.cpp"
break;
- case 310: /* type_specifier_nonarray: F32MAT2X2 */
-#line 2291 "MachineIndependent/glslang.y"
+ case 319: /* type_specifier_nonarray: F32MAT2X2 */
+#line 2364 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7858 "MachineIndependent/glslang_tab.cpp"
+#line 8540 "MachineIndependent/glslang_tab.cpp"
break;
- case 311: /* type_specifier_nonarray: F32MAT2X3 */
-#line 2297 "MachineIndependent/glslang.y"
+ case 320: /* type_specifier_nonarray: F32MAT2X3 */
+#line 2370 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 3);
}
-#line 7869 "MachineIndependent/glslang_tab.cpp"
+#line 8551 "MachineIndependent/glslang_tab.cpp"
break;
- case 312: /* type_specifier_nonarray: F32MAT2X4 */
-#line 2303 "MachineIndependent/glslang.y"
+ case 321: /* type_specifier_nonarray: F32MAT2X4 */
+#line 2376 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(2, 4);
}
-#line 7880 "MachineIndependent/glslang_tab.cpp"
+#line 8562 "MachineIndependent/glslang_tab.cpp"
break;
- case 313: /* type_specifier_nonarray: F32MAT3X2 */
-#line 2309 "MachineIndependent/glslang.y"
+ case 322: /* type_specifier_nonarray: F32MAT3X2 */
+#line 2382 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 2);
}
-#line 7891 "MachineIndependent/glslang_tab.cpp"
+#line 8573 "MachineIndependent/glslang_tab.cpp"
break;
- case 314: /* type_specifier_nonarray: F32MAT3X3 */
-#line 2315 "MachineIndependent/glslang.y"
+ case 323: /* type_specifier_nonarray: F32MAT3X3 */
+#line 2388 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7902 "MachineIndependent/glslang_tab.cpp"
+#line 8584 "MachineIndependent/glslang_tab.cpp"
break;
- case 315: /* type_specifier_nonarray: F32MAT3X4 */
-#line 2321 "MachineIndependent/glslang.y"
+ case 324: /* type_specifier_nonarray: F32MAT3X4 */
+#line 2394 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(3, 4);
}
-#line 7913 "MachineIndependent/glslang_tab.cpp"
+#line 8595 "MachineIndependent/glslang_tab.cpp"
break;
- case 316: /* type_specifier_nonarray: F32MAT4X2 */
-#line 2327 "MachineIndependent/glslang.y"
+ case 325: /* type_specifier_nonarray: F32MAT4X2 */
+#line 2400 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 2);
}
-#line 7924 "MachineIndependent/glslang_tab.cpp"
+#line 8606 "MachineIndependent/glslang_tab.cpp"
break;
- case 317: /* type_specifier_nonarray: F32MAT4X3 */
-#line 2333 "MachineIndependent/glslang.y"
+ case 326: /* type_specifier_nonarray: F32MAT4X3 */
+#line 2406 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 3);
}
-#line 7935 "MachineIndependent/glslang_tab.cpp"
+#line 8617 "MachineIndependent/glslang_tab.cpp"
break;
- case 318: /* type_specifier_nonarray: F32MAT4X4 */
-#line 2339 "MachineIndependent/glslang.y"
+ case 327: /* type_specifier_nonarray: F32MAT4X4 */
+#line 2412 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7946 "MachineIndependent/glslang_tab.cpp"
+#line 8628 "MachineIndependent/glslang_tab.cpp"
break;
- case 319: /* type_specifier_nonarray: F64MAT2 */
-#line 2345 "MachineIndependent/glslang.y"
+ case 328: /* type_specifier_nonarray: F64MAT2 */
+#line 2418 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7957 "MachineIndependent/glslang_tab.cpp"
+#line 8639 "MachineIndependent/glslang_tab.cpp"
break;
- case 320: /* type_specifier_nonarray: F64MAT3 */
-#line 2351 "MachineIndependent/glslang.y"
+ case 329: /* type_specifier_nonarray: F64MAT3 */
+#line 2424 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 7968 "MachineIndependent/glslang_tab.cpp"
+#line 8650 "MachineIndependent/glslang_tab.cpp"
break;
- case 321: /* type_specifier_nonarray: F64MAT4 */
-#line 2357 "MachineIndependent/glslang.y"
+ case 330: /* type_specifier_nonarray: F64MAT4 */
+#line 2430 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 7979 "MachineIndependent/glslang_tab.cpp"
+#line 8661 "MachineIndependent/glslang_tab.cpp"
break;
- case 322: /* type_specifier_nonarray: F64MAT2X2 */
-#line 2363 "MachineIndependent/glslang.y"
+ case 331: /* type_specifier_nonarray: F64MAT2X2 */
+#line 2436 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 2);
}
-#line 7990 "MachineIndependent/glslang_tab.cpp"
+#line 8672 "MachineIndependent/glslang_tab.cpp"
break;
- case 323: /* type_specifier_nonarray: F64MAT2X3 */
-#line 2369 "MachineIndependent/glslang.y"
+ case 332: /* type_specifier_nonarray: F64MAT2X3 */
+#line 2442 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 3);
}
-#line 8001 "MachineIndependent/glslang_tab.cpp"
+#line 8683 "MachineIndependent/glslang_tab.cpp"
break;
- case 324: /* type_specifier_nonarray: F64MAT2X4 */
-#line 2375 "MachineIndependent/glslang.y"
+ case 333: /* type_specifier_nonarray: F64MAT2X4 */
+#line 2448 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(2, 4);
}
-#line 8012 "MachineIndependent/glslang_tab.cpp"
+#line 8694 "MachineIndependent/glslang_tab.cpp"
break;
- case 325: /* type_specifier_nonarray: F64MAT3X2 */
-#line 2381 "MachineIndependent/glslang.y"
+ case 334: /* type_specifier_nonarray: F64MAT3X2 */
+#line 2454 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 2);
}
-#line 8023 "MachineIndependent/glslang_tab.cpp"
+#line 8705 "MachineIndependent/glslang_tab.cpp"
break;
- case 326: /* type_specifier_nonarray: F64MAT3X3 */
-#line 2387 "MachineIndependent/glslang.y"
+ case 335: /* type_specifier_nonarray: F64MAT3X3 */
+#line 2460 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 3);
}
-#line 8034 "MachineIndependent/glslang_tab.cpp"
+#line 8716 "MachineIndependent/glslang_tab.cpp"
break;
- case 327: /* type_specifier_nonarray: F64MAT3X4 */
-#line 2393 "MachineIndependent/glslang.y"
+ case 336: /* type_specifier_nonarray: F64MAT3X4 */
+#line 2466 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(3, 4);
}
-#line 8045 "MachineIndependent/glslang_tab.cpp"
+#line 8727 "MachineIndependent/glslang_tab.cpp"
break;
- case 328: /* type_specifier_nonarray: F64MAT4X2 */
-#line 2399 "MachineIndependent/glslang.y"
+ case 337: /* type_specifier_nonarray: F64MAT4X2 */
+#line 2472 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 2);
}
-#line 8056 "MachineIndependent/glslang_tab.cpp"
+#line 8738 "MachineIndependent/glslang_tab.cpp"
break;
- case 329: /* type_specifier_nonarray: F64MAT4X3 */
-#line 2405 "MachineIndependent/glslang.y"
+ case 338: /* type_specifier_nonarray: F64MAT4X3 */
+#line 2478 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 3);
}
-#line 8067 "MachineIndependent/glslang_tab.cpp"
+#line 8749 "MachineIndependent/glslang_tab.cpp"
break;
- case 330: /* type_specifier_nonarray: F64MAT4X4 */
-#line 2411 "MachineIndependent/glslang.y"
+ case 339: /* type_specifier_nonarray: F64MAT4X4 */
+#line 2484 "MachineIndependent/glslang.y"
{
parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtDouble;
(yyval.interm.type).setMatrix(4, 4);
}
-#line 8078 "MachineIndependent/glslang_tab.cpp"
+#line 8760 "MachineIndependent/glslang_tab.cpp"
break;
- case 331: /* type_specifier_nonarray: ACCSTRUCTNV */
-#line 2417 "MachineIndependent/glslang.y"
+ case 340: /* type_specifier_nonarray: ACCSTRUCTNV */
+#line 2490 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtAccStruct;
}
-#line 8087 "MachineIndependent/glslang_tab.cpp"
+#line 8769 "MachineIndependent/glslang_tab.cpp"
break;
- case 332: /* type_specifier_nonarray: ACCSTRUCTEXT */
-#line 2421 "MachineIndependent/glslang.y"
+ case 341: /* type_specifier_nonarray: ACCSTRUCTEXT */
+#line 2494 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtAccStruct;
}
-#line 8096 "MachineIndependent/glslang_tab.cpp"
+#line 8778 "MachineIndependent/glslang_tab.cpp"
break;
- case 333: /* type_specifier_nonarray: RAYQUERYEXT */
-#line 2425 "MachineIndependent/glslang.y"
+ case 342: /* type_specifier_nonarray: RAYQUERYEXT */
+#line 2498 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtRayQuery;
}
-#line 8105 "MachineIndependent/glslang_tab.cpp"
+#line 8787 "MachineIndependent/glslang_tab.cpp"
break;
- case 334: /* type_specifier_nonarray: ATOMIC_UINT */
-#line 2429 "MachineIndependent/glslang.y"
+ case 343: /* type_specifier_nonarray: ATOMIC_UINT */
+#line 2502 "MachineIndependent/glslang.y"
{
parseContext.vulkanRemoved((yyvsp[0].lex).loc, "atomic counter types");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtAtomicUint;
}
-#line 8115 "MachineIndependent/glslang_tab.cpp"
+#line 8797 "MachineIndependent/glslang_tab.cpp"
break;
- case 335: /* type_specifier_nonarray: SAMPLER1D */
-#line 2434 "MachineIndependent/glslang.y"
+ case 344: /* type_specifier_nonarray: SAMPLER1D */
+#line 2507 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd1D);
}
-#line 8125 "MachineIndependent/glslang_tab.cpp"
+#line 8807 "MachineIndependent/glslang_tab.cpp"
break;
- case 336: /* type_specifier_nonarray: SAMPLER2D */
-#line 2440 "MachineIndependent/glslang.y"
+ case 345: /* type_specifier_nonarray: SAMPLER2D */
+#line 2513 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D);
}
-#line 8135 "MachineIndependent/glslang_tab.cpp"
+#line 8817 "MachineIndependent/glslang_tab.cpp"
break;
- case 337: /* type_specifier_nonarray: SAMPLER3D */
-#line 2445 "MachineIndependent/glslang.y"
+ case 346: /* type_specifier_nonarray: SAMPLER3D */
+#line 2518 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd3D);
}
-#line 8145 "MachineIndependent/glslang_tab.cpp"
+#line 8827 "MachineIndependent/glslang_tab.cpp"
break;
- case 338: /* type_specifier_nonarray: SAMPLERCUBE */
-#line 2450 "MachineIndependent/glslang.y"
+ case 347: /* type_specifier_nonarray: SAMPLERCUBE */
+#line 2523 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdCube);
}
-#line 8155 "MachineIndependent/glslang_tab.cpp"
+#line 8837 "MachineIndependent/glslang_tab.cpp"
break;
- case 339: /* type_specifier_nonarray: SAMPLER2DSHADOW */
-#line 2455 "MachineIndependent/glslang.y"
+ case 348: /* type_specifier_nonarray: SAMPLER2DSHADOW */
+#line 2528 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true);
}
-#line 8165 "MachineIndependent/glslang_tab.cpp"
+#line 8847 "MachineIndependent/glslang_tab.cpp"
break;
- case 340: /* type_specifier_nonarray: SAMPLERCUBESHADOW */
-#line 2460 "MachineIndependent/glslang.y"
+ case 349: /* type_specifier_nonarray: SAMPLERCUBESHADOW */
+#line 2533 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true);
}
-#line 8175 "MachineIndependent/glslang_tab.cpp"
+#line 8857 "MachineIndependent/glslang_tab.cpp"
break;
- case 341: /* type_specifier_nonarray: SAMPLER2DARRAY */
-#line 2465 "MachineIndependent/glslang.y"
+ case 350: /* type_specifier_nonarray: SAMPLER2DARRAY */
+#line 2538 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D, true);
}
-#line 8185 "MachineIndependent/glslang_tab.cpp"
+#line 8867 "MachineIndependent/glslang_tab.cpp"
break;
- case 342: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */
-#line 2470 "MachineIndependent/glslang.y"
+ case 351: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */
+#line 2543 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true);
}
-#line 8195 "MachineIndependent/glslang_tab.cpp"
+#line 8877 "MachineIndependent/glslang_tab.cpp"
break;
- case 343: /* type_specifier_nonarray: SAMPLER1DSHADOW */
-#line 2476 "MachineIndependent/glslang.y"
+ case 352: /* type_specifier_nonarray: SAMPLER1DSHADOW */
+#line 2549 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true);
}
-#line 8205 "MachineIndependent/glslang_tab.cpp"
+#line 8887 "MachineIndependent/glslang_tab.cpp"
break;
- case 344: /* type_specifier_nonarray: SAMPLER1DARRAY */
-#line 2481 "MachineIndependent/glslang.y"
+ case 353: /* type_specifier_nonarray: SAMPLER1DARRAY */
+#line 2554 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd1D, true);
}
-#line 8215 "MachineIndependent/glslang_tab.cpp"
+#line 8897 "MachineIndependent/glslang_tab.cpp"
break;
- case 345: /* type_specifier_nonarray: SAMPLER1DARRAYSHADOW */
-#line 2486 "MachineIndependent/glslang.y"
+ case 354: /* type_specifier_nonarray: SAMPLER1DARRAYSHADOW */
+#line 2559 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true);
}
-#line 8225 "MachineIndependent/glslang_tab.cpp"
+#line 8907 "MachineIndependent/glslang_tab.cpp"
break;
- case 346: /* type_specifier_nonarray: SAMPLERCUBEARRAY */
-#line 2491 "MachineIndependent/glslang.y"
+ case 355: /* type_specifier_nonarray: SAMPLERCUBEARRAY */
+#line 2564 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdCube, true);
}
-#line 8235 "MachineIndependent/glslang_tab.cpp"
+#line 8917 "MachineIndependent/glslang_tab.cpp"
break;
- case 347: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOW */
-#line 2496 "MachineIndependent/glslang.y"
+ case 356: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOW */
+#line 2569 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdCube, true, true);
}
-#line 8245 "MachineIndependent/glslang_tab.cpp"
+#line 8927 "MachineIndependent/glslang_tab.cpp"
break;
- case 348: /* type_specifier_nonarray: F16SAMPLER1D */
-#line 2501 "MachineIndependent/glslang.y"
+ case 357: /* type_specifier_nonarray: F16SAMPLER1D */
+#line 2574 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd1D);
}
-#line 8256 "MachineIndependent/glslang_tab.cpp"
+#line 8938 "MachineIndependent/glslang_tab.cpp"
break;
- case 349: /* type_specifier_nonarray: F16SAMPLER2D */
-#line 2507 "MachineIndependent/glslang.y"
+ case 358: /* type_specifier_nonarray: F16SAMPLER2D */
+#line 2580 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd2D);
}
-#line 8267 "MachineIndependent/glslang_tab.cpp"
+#line 8949 "MachineIndependent/glslang_tab.cpp"
break;
- case 350: /* type_specifier_nonarray: F16SAMPLER3D */
-#line 2513 "MachineIndependent/glslang.y"
+ case 359: /* type_specifier_nonarray: F16SAMPLER3D */
+#line 2586 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd3D);
}
-#line 8278 "MachineIndependent/glslang_tab.cpp"
+#line 8960 "MachineIndependent/glslang_tab.cpp"
break;
- case 351: /* type_specifier_nonarray: F16SAMPLERCUBE */
-#line 2519 "MachineIndependent/glslang.y"
+ case 360: /* type_specifier_nonarray: F16SAMPLERCUBE */
+#line 2592 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdCube);
}
-#line 8289 "MachineIndependent/glslang_tab.cpp"
+#line 8971 "MachineIndependent/glslang_tab.cpp"
break;
- case 352: /* type_specifier_nonarray: F16SAMPLER1DSHADOW */
-#line 2525 "MachineIndependent/glslang.y"
+ case 361: /* type_specifier_nonarray: F16SAMPLER1DSHADOW */
+#line 2598 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd1D, false, true);
}
-#line 8300 "MachineIndependent/glslang_tab.cpp"
+#line 8982 "MachineIndependent/glslang_tab.cpp"
break;
- case 353: /* type_specifier_nonarray: F16SAMPLER2DSHADOW */
-#line 2531 "MachineIndependent/glslang.y"
+ case 362: /* type_specifier_nonarray: F16SAMPLER2DSHADOW */
+#line 2604 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd2D, false, true);
}
-#line 8311 "MachineIndependent/glslang_tab.cpp"
+#line 8993 "MachineIndependent/glslang_tab.cpp"
break;
- case 354: /* type_specifier_nonarray: F16SAMPLERCUBESHADOW */
-#line 2537 "MachineIndependent/glslang.y"
+ case 363: /* type_specifier_nonarray: F16SAMPLERCUBESHADOW */
+#line 2610 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdCube, false, true);
}
-#line 8322 "MachineIndependent/glslang_tab.cpp"
+#line 9004 "MachineIndependent/glslang_tab.cpp"
break;
- case 355: /* type_specifier_nonarray: F16SAMPLER1DARRAY */
-#line 2543 "MachineIndependent/glslang.y"
+ case 364: /* type_specifier_nonarray: F16SAMPLER1DARRAY */
+#line 2616 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd1D, true);
}
-#line 8333 "MachineIndependent/glslang_tab.cpp"
+#line 9015 "MachineIndependent/glslang_tab.cpp"
break;
- case 356: /* type_specifier_nonarray: F16SAMPLER2DARRAY */
-#line 2549 "MachineIndependent/glslang.y"
+ case 365: /* type_specifier_nonarray: F16SAMPLER2DARRAY */
+#line 2622 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true);
}
-#line 8344 "MachineIndependent/glslang_tab.cpp"
+#line 9026 "MachineIndependent/glslang_tab.cpp"
break;
- case 357: /* type_specifier_nonarray: F16SAMPLER1DARRAYSHADOW */
-#line 2555 "MachineIndependent/glslang.y"
+ case 366: /* type_specifier_nonarray: F16SAMPLER1DARRAYSHADOW */
+#line 2628 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd1D, true, true);
}
-#line 8355 "MachineIndependent/glslang_tab.cpp"
+#line 9037 "MachineIndependent/glslang_tab.cpp"
break;
- case 358: /* type_specifier_nonarray: F16SAMPLER2DARRAYSHADOW */
-#line 2561 "MachineIndependent/glslang.y"
+ case 367: /* type_specifier_nonarray: F16SAMPLER2DARRAYSHADOW */
+#line 2634 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true, true);
}
-#line 8366 "MachineIndependent/glslang_tab.cpp"
+#line 9048 "MachineIndependent/glslang_tab.cpp"
break;
- case 359: /* type_specifier_nonarray: F16SAMPLERCUBEARRAY */
-#line 2567 "MachineIndependent/glslang.y"
+ case 368: /* type_specifier_nonarray: F16SAMPLERCUBEARRAY */
+#line 2640 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdCube, true);
}
-#line 8377 "MachineIndependent/glslang_tab.cpp"
+#line 9059 "MachineIndependent/glslang_tab.cpp"
break;
- case 360: /* type_specifier_nonarray: F16SAMPLERCUBEARRAYSHADOW */
-#line 2573 "MachineIndependent/glslang.y"
+ case 369: /* type_specifier_nonarray: F16SAMPLERCUBEARRAYSHADOW */
+#line 2646 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdCube, true, true);
}
-#line 8388 "MachineIndependent/glslang_tab.cpp"
+#line 9070 "MachineIndependent/glslang_tab.cpp"
break;
- case 361: /* type_specifier_nonarray: ISAMPLER1D */
-#line 2579 "MachineIndependent/glslang.y"
+ case 370: /* type_specifier_nonarray: ISAMPLER1D */
+#line 2652 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd1D);
}
-#line 8398 "MachineIndependent/glslang_tab.cpp"
+#line 9080 "MachineIndependent/glslang_tab.cpp"
break;
- case 362: /* type_specifier_nonarray: ISAMPLER2D */
-#line 2585 "MachineIndependent/glslang.y"
+ case 371: /* type_specifier_nonarray: ISAMPLER2D */
+#line 2658 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd2D);
}
-#line 8408 "MachineIndependent/glslang_tab.cpp"
+#line 9090 "MachineIndependent/glslang_tab.cpp"
break;
- case 363: /* type_specifier_nonarray: ISAMPLER3D */
-#line 2590 "MachineIndependent/glslang.y"
+ case 372: /* type_specifier_nonarray: ISAMPLER3D */
+#line 2663 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd3D);
}
-#line 8418 "MachineIndependent/glslang_tab.cpp"
+#line 9100 "MachineIndependent/glslang_tab.cpp"
break;
- case 364: /* type_specifier_nonarray: ISAMPLERCUBE */
-#line 2595 "MachineIndependent/glslang.y"
+ case 373: /* type_specifier_nonarray: ISAMPLERCUBE */
+#line 2668 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, EsdCube);
}
-#line 8428 "MachineIndependent/glslang_tab.cpp"
+#line 9110 "MachineIndependent/glslang_tab.cpp"
break;
- case 365: /* type_specifier_nonarray: ISAMPLER2DARRAY */
-#line 2600 "MachineIndependent/glslang.y"
+ case 374: /* type_specifier_nonarray: ISAMPLER2DARRAY */
+#line 2673 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd2D, true);
}
-#line 8438 "MachineIndependent/glslang_tab.cpp"
+#line 9120 "MachineIndependent/glslang_tab.cpp"
break;
- case 366: /* type_specifier_nonarray: USAMPLER2D */
-#line 2605 "MachineIndependent/glslang.y"
+ case 375: /* type_specifier_nonarray: USAMPLER2D */
+#line 2678 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd2D);
}
-#line 8448 "MachineIndependent/glslang_tab.cpp"
+#line 9130 "MachineIndependent/glslang_tab.cpp"
break;
- case 367: /* type_specifier_nonarray: USAMPLER3D */
-#line 2610 "MachineIndependent/glslang.y"
+ case 376: /* type_specifier_nonarray: USAMPLER3D */
+#line 2683 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd3D);
}
-#line 8458 "MachineIndependent/glslang_tab.cpp"
+#line 9140 "MachineIndependent/glslang_tab.cpp"
break;
- case 368: /* type_specifier_nonarray: USAMPLERCUBE */
-#line 2615 "MachineIndependent/glslang.y"
+ case 377: /* type_specifier_nonarray: USAMPLERCUBE */
+#line 2688 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, EsdCube);
}
-#line 8468 "MachineIndependent/glslang_tab.cpp"
+#line 9150 "MachineIndependent/glslang_tab.cpp"
break;
- case 369: /* type_specifier_nonarray: ISAMPLER1DARRAY */
-#line 2621 "MachineIndependent/glslang.y"
+ case 378: /* type_specifier_nonarray: ISAMPLER1DARRAY */
+#line 2694 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd1D, true);
}
-#line 8478 "MachineIndependent/glslang_tab.cpp"
+#line 9160 "MachineIndependent/glslang_tab.cpp"
break;
- case 370: /* type_specifier_nonarray: ISAMPLERCUBEARRAY */
-#line 2626 "MachineIndependent/glslang.y"
+ case 379: /* type_specifier_nonarray: ISAMPLERCUBEARRAY */
+#line 2699 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, EsdCube, true);
}
-#line 8488 "MachineIndependent/glslang_tab.cpp"
+#line 9170 "MachineIndependent/glslang_tab.cpp"
break;
- case 371: /* type_specifier_nonarray: USAMPLER1D */
-#line 2631 "MachineIndependent/glslang.y"
+ case 380: /* type_specifier_nonarray: USAMPLER1D */
+#line 2704 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd1D);
}
-#line 8498 "MachineIndependent/glslang_tab.cpp"
+#line 9180 "MachineIndependent/glslang_tab.cpp"
break;
- case 372: /* type_specifier_nonarray: USAMPLER1DARRAY */
-#line 2636 "MachineIndependent/glslang.y"
+ case 381: /* type_specifier_nonarray: USAMPLER1DARRAY */
+#line 2709 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd1D, true);
}
-#line 8508 "MachineIndependent/glslang_tab.cpp"
+#line 9190 "MachineIndependent/glslang_tab.cpp"
break;
- case 373: /* type_specifier_nonarray: USAMPLERCUBEARRAY */
-#line 2641 "MachineIndependent/glslang.y"
+ case 382: /* type_specifier_nonarray: USAMPLERCUBEARRAY */
+#line 2714 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, EsdCube, true);
}
-#line 8518 "MachineIndependent/glslang_tab.cpp"
+#line 9200 "MachineIndependent/glslang_tab.cpp"
break;
- case 374: /* type_specifier_nonarray: TEXTURECUBEARRAY */
-#line 2646 "MachineIndependent/glslang.y"
+ case 383: /* type_specifier_nonarray: TEXTURECUBEARRAY */
+#line 2719 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true);
}
-#line 8528 "MachineIndependent/glslang_tab.cpp"
+#line 9210 "MachineIndependent/glslang_tab.cpp"
break;
- case 375: /* type_specifier_nonarray: ITEXTURECUBEARRAY */
-#line 2651 "MachineIndependent/glslang.y"
+ case 384: /* type_specifier_nonarray: ITEXTURECUBEARRAY */
+#line 2724 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true);
}
-#line 8538 "MachineIndependent/glslang_tab.cpp"
+#line 9220 "MachineIndependent/glslang_tab.cpp"
break;
- case 376: /* type_specifier_nonarray: UTEXTURECUBEARRAY */
-#line 2656 "MachineIndependent/glslang.y"
+ case 385: /* type_specifier_nonarray: UTEXTURECUBEARRAY */
+#line 2729 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true);
}
-#line 8548 "MachineIndependent/glslang_tab.cpp"
+#line 9230 "MachineIndependent/glslang_tab.cpp"
break;
- case 377: /* type_specifier_nonarray: USAMPLER2DARRAY */
-#line 2662 "MachineIndependent/glslang.y"
+ case 386: /* type_specifier_nonarray: USAMPLER2DARRAY */
+#line 2735 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd2D, true);
}
-#line 8558 "MachineIndependent/glslang_tab.cpp"
+#line 9240 "MachineIndependent/glslang_tab.cpp"
break;
- case 378: /* type_specifier_nonarray: TEXTURE2D */
-#line 2667 "MachineIndependent/glslang.y"
+ case 387: /* type_specifier_nonarray: TEXTURE2D */
+#line 2740 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D);
}
-#line 8568 "MachineIndependent/glslang_tab.cpp"
+#line 9250 "MachineIndependent/glslang_tab.cpp"
break;
- case 379: /* type_specifier_nonarray: TEXTURE3D */
-#line 2672 "MachineIndependent/glslang.y"
+ case 388: /* type_specifier_nonarray: TEXTURE3D */
+#line 2745 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D);
}
-#line 8578 "MachineIndependent/glslang_tab.cpp"
+#line 9260 "MachineIndependent/glslang_tab.cpp"
break;
- case 380: /* type_specifier_nonarray: TEXTURE2DARRAY */
-#line 2677 "MachineIndependent/glslang.y"
+ case 389: /* type_specifier_nonarray: TEXTURE2DARRAY */
+#line 2750 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true);
}
-#line 8588 "MachineIndependent/glslang_tab.cpp"
+#line 9270 "MachineIndependent/glslang_tab.cpp"
break;
- case 381: /* type_specifier_nonarray: TEXTURECUBE */
-#line 2682 "MachineIndependent/glslang.y"
+ case 390: /* type_specifier_nonarray: TEXTURECUBE */
+#line 2755 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube);
}
-#line 8598 "MachineIndependent/glslang_tab.cpp"
+#line 9280 "MachineIndependent/glslang_tab.cpp"
break;
- case 382: /* type_specifier_nonarray: ITEXTURE2D */
-#line 2687 "MachineIndependent/glslang.y"
+ case 391: /* type_specifier_nonarray: ITEXTURE2D */
+#line 2760 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd2D);
}
-#line 8608 "MachineIndependent/glslang_tab.cpp"
+#line 9290 "MachineIndependent/glslang_tab.cpp"
break;
- case 383: /* type_specifier_nonarray: ITEXTURE3D */
-#line 2692 "MachineIndependent/glslang.y"
+ case 392: /* type_specifier_nonarray: ITEXTURE3D */
+#line 2765 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd3D);
}
-#line 8618 "MachineIndependent/glslang_tab.cpp"
+#line 9300 "MachineIndependent/glslang_tab.cpp"
break;
- case 384: /* type_specifier_nonarray: ITEXTURECUBE */
-#line 2697 "MachineIndependent/glslang.y"
+ case 393: /* type_specifier_nonarray: ITEXTURECUBE */
+#line 2770 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, EsdCube);
}
-#line 8628 "MachineIndependent/glslang_tab.cpp"
+#line 9310 "MachineIndependent/glslang_tab.cpp"
break;
- case 385: /* type_specifier_nonarray: ITEXTURE2DARRAY */
-#line 2702 "MachineIndependent/glslang.y"
+ case 394: /* type_specifier_nonarray: ITEXTURE2DARRAY */
+#line 2775 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true);
}
-#line 8638 "MachineIndependent/glslang_tab.cpp"
+#line 9320 "MachineIndependent/glslang_tab.cpp"
break;
- case 386: /* type_specifier_nonarray: UTEXTURE2D */
-#line 2707 "MachineIndependent/glslang.y"
+ case 395: /* type_specifier_nonarray: UTEXTURE2D */
+#line 2780 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd2D);
}
-#line 8648 "MachineIndependent/glslang_tab.cpp"
+#line 9330 "MachineIndependent/glslang_tab.cpp"
break;
- case 387: /* type_specifier_nonarray: UTEXTURE3D */
-#line 2712 "MachineIndependent/glslang.y"
+ case 396: /* type_specifier_nonarray: UTEXTURE3D */
+#line 2785 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd3D);
}
-#line 8658 "MachineIndependent/glslang_tab.cpp"
+#line 9340 "MachineIndependent/glslang_tab.cpp"
break;
- case 388: /* type_specifier_nonarray: UTEXTURECUBE */
-#line 2717 "MachineIndependent/glslang.y"
+ case 397: /* type_specifier_nonarray: UTEXTURECUBE */
+#line 2790 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, EsdCube);
}
-#line 8668 "MachineIndependent/glslang_tab.cpp"
+#line 9350 "MachineIndependent/glslang_tab.cpp"
break;
- case 389: /* type_specifier_nonarray: UTEXTURE2DARRAY */
-#line 2722 "MachineIndependent/glslang.y"
+ case 398: /* type_specifier_nonarray: UTEXTURE2DARRAY */
+#line 2795 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true);
}
-#line 8678 "MachineIndependent/glslang_tab.cpp"
+#line 9360 "MachineIndependent/glslang_tab.cpp"
break;
- case 390: /* type_specifier_nonarray: SAMPLER */
-#line 2727 "MachineIndependent/glslang.y"
+ case 399: /* type_specifier_nonarray: SAMPLER */
+#line 2800 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setPureSampler(false);
}
-#line 8688 "MachineIndependent/glslang_tab.cpp"
+#line 9370 "MachineIndependent/glslang_tab.cpp"
break;
- case 391: /* type_specifier_nonarray: SAMPLERSHADOW */
-#line 2732 "MachineIndependent/glslang.y"
+ case 400: /* type_specifier_nonarray: SAMPLERSHADOW */
+#line 2805 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setPureSampler(true);
}
-#line 8698 "MachineIndependent/glslang_tab.cpp"
+#line 9380 "MachineIndependent/glslang_tab.cpp"
break;
- case 392: /* type_specifier_nonarray: SAMPLER2DRECT */
-#line 2738 "MachineIndependent/glslang.y"
+ case 401: /* type_specifier_nonarray: SAMPLER2DRECT */
+#line 2811 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdRect);
}
-#line 8708 "MachineIndependent/glslang_tab.cpp"
+#line 9390 "MachineIndependent/glslang_tab.cpp"
break;
- case 393: /* type_specifier_nonarray: SAMPLER2DRECTSHADOW */
-#line 2743 "MachineIndependent/glslang.y"
+ case 402: /* type_specifier_nonarray: SAMPLER2DRECTSHADOW */
+#line 2816 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true);
}
-#line 8718 "MachineIndependent/glslang_tab.cpp"
+#line 9400 "MachineIndependent/glslang_tab.cpp"
break;
- case 394: /* type_specifier_nonarray: F16SAMPLER2DRECT */
-#line 2748 "MachineIndependent/glslang.y"
+ case 403: /* type_specifier_nonarray: F16SAMPLER2DRECT */
+#line 2821 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdRect);
}
-#line 8729 "MachineIndependent/glslang_tab.cpp"
+#line 9411 "MachineIndependent/glslang_tab.cpp"
break;
- case 395: /* type_specifier_nonarray: F16SAMPLER2DRECTSHADOW */
-#line 2754 "MachineIndependent/glslang.y"
+ case 404: /* type_specifier_nonarray: F16SAMPLER2DRECTSHADOW */
+#line 2827 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdRect, false, true);
}
-#line 8740 "MachineIndependent/glslang_tab.cpp"
+#line 9422 "MachineIndependent/glslang_tab.cpp"
break;
- case 396: /* type_specifier_nonarray: ISAMPLER2DRECT */
-#line 2760 "MachineIndependent/glslang.y"
+ case 405: /* type_specifier_nonarray: ISAMPLER2DRECT */
+#line 2833 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, EsdRect);
}
-#line 8750 "MachineIndependent/glslang_tab.cpp"
+#line 9432 "MachineIndependent/glslang_tab.cpp"
break;
- case 397: /* type_specifier_nonarray: USAMPLER2DRECT */
-#line 2765 "MachineIndependent/glslang.y"
+ case 406: /* type_specifier_nonarray: USAMPLER2DRECT */
+#line 2838 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, EsdRect);
}
-#line 8760 "MachineIndependent/glslang_tab.cpp"
+#line 9442 "MachineIndependent/glslang_tab.cpp"
break;
- case 398: /* type_specifier_nonarray: SAMPLERBUFFER */
-#line 2770 "MachineIndependent/glslang.y"
+ case 407: /* type_specifier_nonarray: SAMPLERBUFFER */
+#line 2843 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, EsdBuffer);
}
-#line 8770 "MachineIndependent/glslang_tab.cpp"
+#line 9452 "MachineIndependent/glslang_tab.cpp"
break;
- case 399: /* type_specifier_nonarray: F16SAMPLERBUFFER */
-#line 2775 "MachineIndependent/glslang.y"
+ case 408: /* type_specifier_nonarray: F16SAMPLERBUFFER */
+#line 2848 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, EsdBuffer);
}
-#line 8781 "MachineIndependent/glslang_tab.cpp"
+#line 9463 "MachineIndependent/glslang_tab.cpp"
break;
- case 400: /* type_specifier_nonarray: ISAMPLERBUFFER */
-#line 2781 "MachineIndependent/glslang.y"
+ case 409: /* type_specifier_nonarray: ISAMPLERBUFFER */
+#line 2854 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, EsdBuffer);
}
-#line 8791 "MachineIndependent/glslang_tab.cpp"
+#line 9473 "MachineIndependent/glslang_tab.cpp"
break;
- case 401: /* type_specifier_nonarray: USAMPLERBUFFER */
-#line 2786 "MachineIndependent/glslang.y"
+ case 410: /* type_specifier_nonarray: USAMPLERBUFFER */
+#line 2859 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, EsdBuffer);
}
-#line 8801 "MachineIndependent/glslang_tab.cpp"
+#line 9483 "MachineIndependent/glslang_tab.cpp"
break;
- case 402: /* type_specifier_nonarray: SAMPLER2DMS */
-#line 2791 "MachineIndependent/glslang.y"
+ case 411: /* type_specifier_nonarray: SAMPLER2DMS */
+#line 2864 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true);
}
-#line 8811 "MachineIndependent/glslang_tab.cpp"
+#line 9493 "MachineIndependent/glslang_tab.cpp"
break;
- case 403: /* type_specifier_nonarray: F16SAMPLER2DMS */
-#line 2796 "MachineIndependent/glslang.y"
+ case 412: /* type_specifier_nonarray: F16SAMPLER2DMS */
+#line 2869 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd2D, false, false, true);
}
-#line 8822 "MachineIndependent/glslang_tab.cpp"
+#line 9504 "MachineIndependent/glslang_tab.cpp"
break;
- case 404: /* type_specifier_nonarray: ISAMPLER2DMS */
-#line 2802 "MachineIndependent/glslang.y"
+ case 413: /* type_specifier_nonarray: ISAMPLER2DMS */
+#line 2875 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true);
}
-#line 8832 "MachineIndependent/glslang_tab.cpp"
+#line 9514 "MachineIndependent/glslang_tab.cpp"
break;
- case 405: /* type_specifier_nonarray: USAMPLER2DMS */
-#line 2807 "MachineIndependent/glslang.y"
+ case 414: /* type_specifier_nonarray: USAMPLER2DMS */
+#line 2880 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true);
}
-#line 8842 "MachineIndependent/glslang_tab.cpp"
+#line 9524 "MachineIndependent/glslang_tab.cpp"
break;
- case 406: /* type_specifier_nonarray: SAMPLER2DMSARRAY */
-#line 2812 "MachineIndependent/glslang.y"
+ case 415: /* type_specifier_nonarray: SAMPLER2DMSARRAY */
+#line 2885 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true);
}
-#line 8852 "MachineIndependent/glslang_tab.cpp"
+#line 9534 "MachineIndependent/glslang_tab.cpp"
break;
- case 407: /* type_specifier_nonarray: F16SAMPLER2DMSARRAY */
-#line 2817 "MachineIndependent/glslang.y"
+ case 416: /* type_specifier_nonarray: F16SAMPLER2DMSARRAY */
+#line 2890 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true, false, true);
}
-#line 8863 "MachineIndependent/glslang_tab.cpp"
+#line 9545 "MachineIndependent/glslang_tab.cpp"
break;
- case 408: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */
-#line 2823 "MachineIndependent/glslang.y"
+ case 417: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */
+#line 2896 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true);
}
-#line 8873 "MachineIndependent/glslang_tab.cpp"
+#line 9555 "MachineIndependent/glslang_tab.cpp"
break;
- case 409: /* type_specifier_nonarray: USAMPLER2DMSARRAY */
-#line 2828 "MachineIndependent/glslang.y"
+ case 418: /* type_specifier_nonarray: USAMPLER2DMSARRAY */
+#line 2901 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true);
}
-#line 8883 "MachineIndependent/glslang_tab.cpp"
+#line 9565 "MachineIndependent/glslang_tab.cpp"
break;
- case 410: /* type_specifier_nonarray: TEXTURE1D */
-#line 2833 "MachineIndependent/glslang.y"
+ case 419: /* type_specifier_nonarray: TEXTURE1D */
+#line 2906 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D);
}
-#line 8893 "MachineIndependent/glslang_tab.cpp"
+#line 9575 "MachineIndependent/glslang_tab.cpp"
break;
- case 411: /* type_specifier_nonarray: F16TEXTURE1D */
-#line 2838 "MachineIndependent/glslang.y"
+ case 420: /* type_specifier_nonarray: F16TEXTURE1D */
+#line 2911 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D);
}
-#line 8904 "MachineIndependent/glslang_tab.cpp"
+#line 9586 "MachineIndependent/glslang_tab.cpp"
break;
- case 412: /* type_specifier_nonarray: F16TEXTURE2D */
-#line 2844 "MachineIndependent/glslang.y"
+ case 421: /* type_specifier_nonarray: F16TEXTURE2D */
+#line 2917 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D);
}
-#line 8915 "MachineIndependent/glslang_tab.cpp"
+#line 9597 "MachineIndependent/glslang_tab.cpp"
break;
- case 413: /* type_specifier_nonarray: F16TEXTURE3D */
-#line 2850 "MachineIndependent/glslang.y"
+ case 422: /* type_specifier_nonarray: F16TEXTURE3D */
+#line 2923 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd3D);
}
-#line 8926 "MachineIndependent/glslang_tab.cpp"
+#line 9608 "MachineIndependent/glslang_tab.cpp"
break;
- case 414: /* type_specifier_nonarray: F16TEXTURECUBE */
-#line 2856 "MachineIndependent/glslang.y"
+ case 423: /* type_specifier_nonarray: F16TEXTURECUBE */
+#line 2929 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube);
}
-#line 8937 "MachineIndependent/glslang_tab.cpp"
+#line 9619 "MachineIndependent/glslang_tab.cpp"
break;
- case 415: /* type_specifier_nonarray: TEXTURE1DARRAY */
-#line 2862 "MachineIndependent/glslang.y"
+ case 424: /* type_specifier_nonarray: TEXTURE1DARRAY */
+#line 2935 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true);
}
-#line 8947 "MachineIndependent/glslang_tab.cpp"
+#line 9629 "MachineIndependent/glslang_tab.cpp"
break;
- case 416: /* type_specifier_nonarray: F16TEXTURE1DARRAY */
-#line 2867 "MachineIndependent/glslang.y"
+ case 425: /* type_specifier_nonarray: F16TEXTURE1DARRAY */
+#line 2940 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D, true);
}
-#line 8958 "MachineIndependent/glslang_tab.cpp"
+#line 9640 "MachineIndependent/glslang_tab.cpp"
break;
- case 417: /* type_specifier_nonarray: F16TEXTURE2DARRAY */
-#line 2873 "MachineIndependent/glslang.y"
+ case 426: /* type_specifier_nonarray: F16TEXTURE2DARRAY */
+#line 2946 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, true);
}
-#line 8969 "MachineIndependent/glslang_tab.cpp"
+#line 9651 "MachineIndependent/glslang_tab.cpp"
break;
- case 418: /* type_specifier_nonarray: F16TEXTURECUBEARRAY */
-#line 2879 "MachineIndependent/glslang.y"
+ case 427: /* type_specifier_nonarray: F16TEXTURECUBEARRAY */
+#line 2952 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube, true);
}
-#line 8980 "MachineIndependent/glslang_tab.cpp"
+#line 9662 "MachineIndependent/glslang_tab.cpp"
break;
- case 419: /* type_specifier_nonarray: ITEXTURE1D */
-#line 2885 "MachineIndependent/glslang.y"
+ case 428: /* type_specifier_nonarray: ITEXTURE1D */
+#line 2958 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd1D);
}
-#line 8990 "MachineIndependent/glslang_tab.cpp"
+#line 9672 "MachineIndependent/glslang_tab.cpp"
break;
- case 420: /* type_specifier_nonarray: ITEXTURE1DARRAY */
-#line 2890 "MachineIndependent/glslang.y"
+ case 429: /* type_specifier_nonarray: ITEXTURE1DARRAY */
+#line 2963 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true);
}
-#line 9000 "MachineIndependent/glslang_tab.cpp"
+#line 9682 "MachineIndependent/glslang_tab.cpp"
break;
- case 421: /* type_specifier_nonarray: UTEXTURE1D */
-#line 2895 "MachineIndependent/glslang.y"
+ case 430: /* type_specifier_nonarray: UTEXTURE1D */
+#line 2968 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd1D);
}
-#line 9010 "MachineIndependent/glslang_tab.cpp"
+#line 9692 "MachineIndependent/glslang_tab.cpp"
break;
- case 422: /* type_specifier_nonarray: UTEXTURE1DARRAY */
-#line 2900 "MachineIndependent/glslang.y"
+ case 431: /* type_specifier_nonarray: UTEXTURE1DARRAY */
+#line 2973 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true);
}
-#line 9020 "MachineIndependent/glslang_tab.cpp"
+#line 9702 "MachineIndependent/glslang_tab.cpp"
break;
- case 423: /* type_specifier_nonarray: TEXTURE2DRECT */
-#line 2905 "MachineIndependent/glslang.y"
+ case 432: /* type_specifier_nonarray: TEXTURE2DRECT */
+#line 2978 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect);
}
-#line 9030 "MachineIndependent/glslang_tab.cpp"
+#line 9712 "MachineIndependent/glslang_tab.cpp"
break;
- case 424: /* type_specifier_nonarray: F16TEXTURE2DRECT */
-#line 2910 "MachineIndependent/glslang.y"
+ case 433: /* type_specifier_nonarray: F16TEXTURE2DRECT */
+#line 2983 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, EsdRect);
}
-#line 9041 "MachineIndependent/glslang_tab.cpp"
+#line 9723 "MachineIndependent/glslang_tab.cpp"
break;
- case 425: /* type_specifier_nonarray: ITEXTURE2DRECT */
-#line 2916 "MachineIndependent/glslang.y"
+ case 434: /* type_specifier_nonarray: ITEXTURE2DRECT */
+#line 2989 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, EsdRect);
}
-#line 9051 "MachineIndependent/glslang_tab.cpp"
+#line 9733 "MachineIndependent/glslang_tab.cpp"
break;
- case 426: /* type_specifier_nonarray: UTEXTURE2DRECT */
-#line 2921 "MachineIndependent/glslang.y"
+ case 435: /* type_specifier_nonarray: UTEXTURE2DRECT */
+#line 2994 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, EsdRect);
}
-#line 9061 "MachineIndependent/glslang_tab.cpp"
+#line 9743 "MachineIndependent/glslang_tab.cpp"
break;
- case 427: /* type_specifier_nonarray: TEXTUREBUFFER */
-#line 2926 "MachineIndependent/glslang.y"
+ case 436: /* type_specifier_nonarray: TEXTUREBUFFER */
+#line 2999 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer);
}
-#line 9071 "MachineIndependent/glslang_tab.cpp"
+#line 9753 "MachineIndependent/glslang_tab.cpp"
break;
- case 428: /* type_specifier_nonarray: F16TEXTUREBUFFER */
-#line 2931 "MachineIndependent/glslang.y"
+ case 437: /* type_specifier_nonarray: F16TEXTUREBUFFER */
+#line 3004 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, EsdBuffer);
}
-#line 9082 "MachineIndependent/glslang_tab.cpp"
+#line 9764 "MachineIndependent/glslang_tab.cpp"
break;
- case 429: /* type_specifier_nonarray: ITEXTUREBUFFER */
-#line 2937 "MachineIndependent/glslang.y"
+ case 438: /* type_specifier_nonarray: ITEXTUREBUFFER */
+#line 3010 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer);
}
-#line 9092 "MachineIndependent/glslang_tab.cpp"
+#line 9774 "MachineIndependent/glslang_tab.cpp"
break;
- case 430: /* type_specifier_nonarray: UTEXTUREBUFFER */
-#line 2942 "MachineIndependent/glslang.y"
+ case 439: /* type_specifier_nonarray: UTEXTUREBUFFER */
+#line 3015 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer);
}
-#line 9102 "MachineIndependent/glslang_tab.cpp"
+#line 9784 "MachineIndependent/glslang_tab.cpp"
break;
- case 431: /* type_specifier_nonarray: TEXTURE2DMS */
-#line 2947 "MachineIndependent/glslang.y"
+ case 440: /* type_specifier_nonarray: TEXTURE2DMS */
+#line 3020 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, false, false, true);
}
-#line 9112 "MachineIndependent/glslang_tab.cpp"
+#line 9794 "MachineIndependent/glslang_tab.cpp"
break;
- case 432: /* type_specifier_nonarray: F16TEXTURE2DMS */
-#line 2952 "MachineIndependent/glslang.y"
+ case 441: /* type_specifier_nonarray: F16TEXTURE2DMS */
+#line 3025 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, false, false, true);
}
-#line 9123 "MachineIndependent/glslang_tab.cpp"
+#line 9805 "MachineIndependent/glslang_tab.cpp"
break;
- case 433: /* type_specifier_nonarray: ITEXTURE2DMS */
-#line 2958 "MachineIndependent/glslang.y"
+ case 442: /* type_specifier_nonarray: ITEXTURE2DMS */
+#line 3031 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true);
}
-#line 9133 "MachineIndependent/glslang_tab.cpp"
+#line 9815 "MachineIndependent/glslang_tab.cpp"
break;
- case 434: /* type_specifier_nonarray: UTEXTURE2DMS */
-#line 2963 "MachineIndependent/glslang.y"
+ case 443: /* type_specifier_nonarray: UTEXTURE2DMS */
+#line 3036 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true);
}
-#line 9143 "MachineIndependent/glslang_tab.cpp"
+#line 9825 "MachineIndependent/glslang_tab.cpp"
break;
- case 435: /* type_specifier_nonarray: TEXTURE2DMSARRAY */
-#line 2968 "MachineIndependent/glslang.y"
+ case 444: /* type_specifier_nonarray: TEXTURE2DMSARRAY */
+#line 3041 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true, false, true);
}
-#line 9153 "MachineIndependent/glslang_tab.cpp"
+#line 9835 "MachineIndependent/glslang_tab.cpp"
break;
- case 436: /* type_specifier_nonarray: F16TEXTURE2DMSARRAY */
-#line 2973 "MachineIndependent/glslang.y"
+ case 445: /* type_specifier_nonarray: F16TEXTURE2DMSARRAY */
+#line 3046 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, true, false, true);
}
-#line 9164 "MachineIndependent/glslang_tab.cpp"
+#line 9846 "MachineIndependent/glslang_tab.cpp"
break;
- case 437: /* type_specifier_nonarray: ITEXTURE2DMSARRAY */
-#line 2979 "MachineIndependent/glslang.y"
+ case 446: /* type_specifier_nonarray: ITEXTURE2DMSARRAY */
+#line 3052 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true);
}
-#line 9174 "MachineIndependent/glslang_tab.cpp"
+#line 9856 "MachineIndependent/glslang_tab.cpp"
break;
- case 438: /* type_specifier_nonarray: UTEXTURE2DMSARRAY */
-#line 2984 "MachineIndependent/glslang.y"
+ case 447: /* type_specifier_nonarray: UTEXTURE2DMSARRAY */
+#line 3057 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true);
}
-#line 9184 "MachineIndependent/glslang_tab.cpp"
+#line 9866 "MachineIndependent/glslang_tab.cpp"
break;
- case 439: /* type_specifier_nonarray: IMAGE1D */
-#line 2989 "MachineIndependent/glslang.y"
+ case 448: /* type_specifier_nonarray: IMAGE1D */
+#line 3062 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd1D);
}
-#line 9194 "MachineIndependent/glslang_tab.cpp"
+#line 9876 "MachineIndependent/glslang_tab.cpp"
break;
- case 440: /* type_specifier_nonarray: F16IMAGE1D */
-#line 2994 "MachineIndependent/glslang.y"
+ case 449: /* type_specifier_nonarray: F16IMAGE1D */
+#line 3067 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd1D);
}
-#line 9205 "MachineIndependent/glslang_tab.cpp"
+#line 9887 "MachineIndependent/glslang_tab.cpp"
break;
- case 441: /* type_specifier_nonarray: IIMAGE1D */
-#line 3000 "MachineIndependent/glslang.y"
+ case 450: /* type_specifier_nonarray: IIMAGE1D */
+#line 3073 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd1D);
}
-#line 9215 "MachineIndependent/glslang_tab.cpp"
+#line 9897 "MachineIndependent/glslang_tab.cpp"
break;
- case 442: /* type_specifier_nonarray: UIMAGE1D */
-#line 3005 "MachineIndependent/glslang.y"
+ case 451: /* type_specifier_nonarray: UIMAGE1D */
+#line 3078 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd1D);
}
-#line 9225 "MachineIndependent/glslang_tab.cpp"
+#line 9907 "MachineIndependent/glslang_tab.cpp"
break;
- case 443: /* type_specifier_nonarray: IMAGE2D */
-#line 3010 "MachineIndependent/glslang.y"
+ case 452: /* type_specifier_nonarray: IMAGE2D */
+#line 3083 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd2D);
}
-#line 9235 "MachineIndependent/glslang_tab.cpp"
+#line 9917 "MachineIndependent/glslang_tab.cpp"
break;
- case 444: /* type_specifier_nonarray: F16IMAGE2D */
-#line 3015 "MachineIndependent/glslang.y"
+ case 453: /* type_specifier_nonarray: F16IMAGE2D */
+#line 3088 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D);
}
-#line 9246 "MachineIndependent/glslang_tab.cpp"
+#line 9928 "MachineIndependent/glslang_tab.cpp"
break;
- case 445: /* type_specifier_nonarray: IIMAGE2D */
-#line 3021 "MachineIndependent/glslang.y"
+ case 454: /* type_specifier_nonarray: IIMAGE2D */
+#line 3094 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd2D);
}
-#line 9256 "MachineIndependent/glslang_tab.cpp"
+#line 9938 "MachineIndependent/glslang_tab.cpp"
break;
- case 446: /* type_specifier_nonarray: UIMAGE2D */
-#line 3026 "MachineIndependent/glslang.y"
+ case 455: /* type_specifier_nonarray: UIMAGE2D */
+#line 3099 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd2D);
}
-#line 9266 "MachineIndependent/glslang_tab.cpp"
+#line 9948 "MachineIndependent/glslang_tab.cpp"
break;
- case 447: /* type_specifier_nonarray: IMAGE3D */
-#line 3031 "MachineIndependent/glslang.y"
+ case 456: /* type_specifier_nonarray: IMAGE3D */
+#line 3104 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd3D);
}
-#line 9276 "MachineIndependent/glslang_tab.cpp"
+#line 9958 "MachineIndependent/glslang_tab.cpp"
break;
- case 448: /* type_specifier_nonarray: F16IMAGE3D */
-#line 3036 "MachineIndependent/glslang.y"
+ case 457: /* type_specifier_nonarray: F16IMAGE3D */
+#line 3109 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd3D);
}
-#line 9287 "MachineIndependent/glslang_tab.cpp"
+#line 9969 "MachineIndependent/glslang_tab.cpp"
break;
- case 449: /* type_specifier_nonarray: IIMAGE3D */
-#line 3042 "MachineIndependent/glslang.y"
+ case 458: /* type_specifier_nonarray: IIMAGE3D */
+#line 3115 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd3D);
}
-#line 9297 "MachineIndependent/glslang_tab.cpp"
+#line 9979 "MachineIndependent/glslang_tab.cpp"
break;
- case 450: /* type_specifier_nonarray: UIMAGE3D */
-#line 3047 "MachineIndependent/glslang.y"
+ case 459: /* type_specifier_nonarray: UIMAGE3D */
+#line 3120 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd3D);
}
-#line 9307 "MachineIndependent/glslang_tab.cpp"
+#line 9989 "MachineIndependent/glslang_tab.cpp"
break;
- case 451: /* type_specifier_nonarray: IMAGE2DRECT */
-#line 3052 "MachineIndependent/glslang.y"
+ case 460: /* type_specifier_nonarray: IMAGE2DRECT */
+#line 3125 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, EsdRect);
}
-#line 9317 "MachineIndependent/glslang_tab.cpp"
+#line 9999 "MachineIndependent/glslang_tab.cpp"
break;
- case 452: /* type_specifier_nonarray: F16IMAGE2DRECT */
-#line 3057 "MachineIndependent/glslang.y"
+ case 461: /* type_specifier_nonarray: F16IMAGE2DRECT */
+#line 3130 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, EsdRect);
}
-#line 9328 "MachineIndependent/glslang_tab.cpp"
+#line 10010 "MachineIndependent/glslang_tab.cpp"
break;
- case 453: /* type_specifier_nonarray: IIMAGE2DRECT */
-#line 3063 "MachineIndependent/glslang.y"
+ case 462: /* type_specifier_nonarray: IIMAGE2DRECT */
+#line 3136 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, EsdRect);
}
-#line 9338 "MachineIndependent/glslang_tab.cpp"
+#line 10020 "MachineIndependent/glslang_tab.cpp"
break;
- case 454: /* type_specifier_nonarray: UIMAGE2DRECT */
-#line 3068 "MachineIndependent/glslang.y"
+ case 463: /* type_specifier_nonarray: UIMAGE2DRECT */
+#line 3141 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, EsdRect);
}
-#line 9348 "MachineIndependent/glslang_tab.cpp"
+#line 10030 "MachineIndependent/glslang_tab.cpp"
break;
- case 455: /* type_specifier_nonarray: IMAGECUBE */
-#line 3073 "MachineIndependent/glslang.y"
+ case 464: /* type_specifier_nonarray: IMAGECUBE */
+#line 3146 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, EsdCube);
}
-#line 9358 "MachineIndependent/glslang_tab.cpp"
+#line 10040 "MachineIndependent/glslang_tab.cpp"
break;
- case 456: /* type_specifier_nonarray: F16IMAGECUBE */
-#line 3078 "MachineIndependent/glslang.y"
+ case 465: /* type_specifier_nonarray: F16IMAGECUBE */
+#line 3151 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, EsdCube);
}
-#line 9369 "MachineIndependent/glslang_tab.cpp"
+#line 10051 "MachineIndependent/glslang_tab.cpp"
break;
- case 457: /* type_specifier_nonarray: IIMAGECUBE */
-#line 3084 "MachineIndependent/glslang.y"
+ case 466: /* type_specifier_nonarray: IIMAGECUBE */
+#line 3157 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, EsdCube);
}
-#line 9379 "MachineIndependent/glslang_tab.cpp"
+#line 10061 "MachineIndependent/glslang_tab.cpp"
break;
- case 458: /* type_specifier_nonarray: UIMAGECUBE */
-#line 3089 "MachineIndependent/glslang.y"
+ case 467: /* type_specifier_nonarray: UIMAGECUBE */
+#line 3162 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, EsdCube);
}
-#line 9389 "MachineIndependent/glslang_tab.cpp"
+#line 10071 "MachineIndependent/glslang_tab.cpp"
break;
- case 459: /* type_specifier_nonarray: IMAGEBUFFER */
-#line 3094 "MachineIndependent/glslang.y"
+ case 468: /* type_specifier_nonarray: IMAGEBUFFER */
+#line 3167 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer);
}
-#line 9399 "MachineIndependent/glslang_tab.cpp"
+#line 10081 "MachineIndependent/glslang_tab.cpp"
break;
- case 460: /* type_specifier_nonarray: F16IMAGEBUFFER */
-#line 3099 "MachineIndependent/glslang.y"
+ case 469: /* type_specifier_nonarray: F16IMAGEBUFFER */
+#line 3172 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, EsdBuffer);
}
-#line 9410 "MachineIndependent/glslang_tab.cpp"
+#line 10092 "MachineIndependent/glslang_tab.cpp"
break;
- case 461: /* type_specifier_nonarray: IIMAGEBUFFER */
-#line 3105 "MachineIndependent/glslang.y"
+ case 470: /* type_specifier_nonarray: IIMAGEBUFFER */
+#line 3178 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer);
}
-#line 9420 "MachineIndependent/glslang_tab.cpp"
+#line 10102 "MachineIndependent/glslang_tab.cpp"
break;
- case 462: /* type_specifier_nonarray: UIMAGEBUFFER */
-#line 3110 "MachineIndependent/glslang.y"
+ case 471: /* type_specifier_nonarray: UIMAGEBUFFER */
+#line 3183 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer);
}
-#line 9430 "MachineIndependent/glslang_tab.cpp"
+#line 10112 "MachineIndependent/glslang_tab.cpp"
break;
- case 463: /* type_specifier_nonarray: IMAGE1DARRAY */
-#line 3115 "MachineIndependent/glslang.y"
+ case 472: /* type_specifier_nonarray: IMAGE1DARRAY */
+#line 3188 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd1D, true);
}
-#line 9440 "MachineIndependent/glslang_tab.cpp"
+#line 10122 "MachineIndependent/glslang_tab.cpp"
break;
- case 464: /* type_specifier_nonarray: F16IMAGE1DARRAY */
-#line 3120 "MachineIndependent/glslang.y"
+ case 473: /* type_specifier_nonarray: F16IMAGE1DARRAY */
+#line 3193 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd1D, true);
}
-#line 9451 "MachineIndependent/glslang_tab.cpp"
+#line 10133 "MachineIndependent/glslang_tab.cpp"
break;
- case 465: /* type_specifier_nonarray: IIMAGE1DARRAY */
-#line 3126 "MachineIndependent/glslang.y"
+ case 474: /* type_specifier_nonarray: IIMAGE1DARRAY */
+#line 3199 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true);
}
-#line 9461 "MachineIndependent/glslang_tab.cpp"
+#line 10143 "MachineIndependent/glslang_tab.cpp"
break;
- case 466: /* type_specifier_nonarray: UIMAGE1DARRAY */
-#line 3131 "MachineIndependent/glslang.y"
+ case 475: /* type_specifier_nonarray: UIMAGE1DARRAY */
+#line 3204 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true);
}
-#line 9471 "MachineIndependent/glslang_tab.cpp"
+#line 10153 "MachineIndependent/glslang_tab.cpp"
break;
- case 467: /* type_specifier_nonarray: IMAGE2DARRAY */
-#line 3136 "MachineIndependent/glslang.y"
+ case 476: /* type_specifier_nonarray: IMAGE2DARRAY */
+#line 3209 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true);
}
-#line 9481 "MachineIndependent/glslang_tab.cpp"
+#line 10163 "MachineIndependent/glslang_tab.cpp"
break;
- case 468: /* type_specifier_nonarray: F16IMAGE2DARRAY */
-#line 3141 "MachineIndependent/glslang.y"
+ case 477: /* type_specifier_nonarray: F16IMAGE2DARRAY */
+#line 3214 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, true);
}
-#line 9492 "MachineIndependent/glslang_tab.cpp"
+#line 10174 "MachineIndependent/glslang_tab.cpp"
break;
- case 469: /* type_specifier_nonarray: IIMAGE2DARRAY */
-#line 3147 "MachineIndependent/glslang.y"
+ case 478: /* type_specifier_nonarray: IIMAGE2DARRAY */
+#line 3220 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true);
}
-#line 9502 "MachineIndependent/glslang_tab.cpp"
+#line 10184 "MachineIndependent/glslang_tab.cpp"
break;
- case 470: /* type_specifier_nonarray: UIMAGE2DARRAY */
-#line 3152 "MachineIndependent/glslang.y"
+ case 479: /* type_specifier_nonarray: UIMAGE2DARRAY */
+#line 3225 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true);
}
-#line 9512 "MachineIndependent/glslang_tab.cpp"
+#line 10194 "MachineIndependent/glslang_tab.cpp"
break;
- case 471: /* type_specifier_nonarray: IMAGECUBEARRAY */
-#line 3157 "MachineIndependent/glslang.y"
+ case 480: /* type_specifier_nonarray: IMAGECUBEARRAY */
+#line 3230 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, EsdCube, true);
}
-#line 9522 "MachineIndependent/glslang_tab.cpp"
+#line 10204 "MachineIndependent/glslang_tab.cpp"
break;
- case 472: /* type_specifier_nonarray: F16IMAGECUBEARRAY */
-#line 3162 "MachineIndependent/glslang.y"
+ case 481: /* type_specifier_nonarray: F16IMAGECUBEARRAY */
+#line 3235 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, EsdCube, true);
}
-#line 9533 "MachineIndependent/glslang_tab.cpp"
+#line 10215 "MachineIndependent/glslang_tab.cpp"
break;
- case 473: /* type_specifier_nonarray: IIMAGECUBEARRAY */
-#line 3168 "MachineIndependent/glslang.y"
+ case 482: /* type_specifier_nonarray: IIMAGECUBEARRAY */
+#line 3241 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true);
}
-#line 9543 "MachineIndependent/glslang_tab.cpp"
+#line 10225 "MachineIndependent/glslang_tab.cpp"
break;
- case 474: /* type_specifier_nonarray: UIMAGECUBEARRAY */
-#line 3173 "MachineIndependent/glslang.y"
+ case 483: /* type_specifier_nonarray: UIMAGECUBEARRAY */
+#line 3246 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true);
}
-#line 9553 "MachineIndependent/glslang_tab.cpp"
+#line 10235 "MachineIndependent/glslang_tab.cpp"
break;
- case 475: /* type_specifier_nonarray: IMAGE2DMS */
-#line 3178 "MachineIndependent/glslang.y"
+ case 484: /* type_specifier_nonarray: IMAGE2DMS */
+#line 3251 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, false, false, true);
}
-#line 9563 "MachineIndependent/glslang_tab.cpp"
+#line 10245 "MachineIndependent/glslang_tab.cpp"
break;
- case 476: /* type_specifier_nonarray: F16IMAGE2DMS */
-#line 3183 "MachineIndependent/glslang.y"
+ case 485: /* type_specifier_nonarray: F16IMAGE2DMS */
+#line 3256 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, false, false, true);
}
-#line 9574 "MachineIndependent/glslang_tab.cpp"
+#line 10256 "MachineIndependent/glslang_tab.cpp"
break;
- case 477: /* type_specifier_nonarray: IIMAGE2DMS */
-#line 3189 "MachineIndependent/glslang.y"
+ case 486: /* type_specifier_nonarray: IIMAGE2DMS */
+#line 3262 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true);
}
-#line 9584 "MachineIndependent/glslang_tab.cpp"
+#line 10266 "MachineIndependent/glslang_tab.cpp"
break;
- case 478: /* type_specifier_nonarray: UIMAGE2DMS */
-#line 3194 "MachineIndependent/glslang.y"
+ case 487: /* type_specifier_nonarray: UIMAGE2DMS */
+#line 3267 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true);
}
-#line 9594 "MachineIndependent/glslang_tab.cpp"
+#line 10276 "MachineIndependent/glslang_tab.cpp"
break;
- case 479: /* type_specifier_nonarray: IMAGE2DMSARRAY */
-#line 3199 "MachineIndependent/glslang.y"
+ case 488: /* type_specifier_nonarray: IMAGE2DMSARRAY */
+#line 3272 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true, false, true);
}
-#line 9604 "MachineIndependent/glslang_tab.cpp"
+#line 10286 "MachineIndependent/glslang_tab.cpp"
break;
- case 480: /* type_specifier_nonarray: F16IMAGE2DMSARRAY */
-#line 3204 "MachineIndependent/glslang.y"
+ case 489: /* type_specifier_nonarray: F16IMAGE2DMSARRAY */
+#line 3277 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, true, false, true);
}
-#line 9615 "MachineIndependent/glslang_tab.cpp"
+#line 10297 "MachineIndependent/glslang_tab.cpp"
break;
- case 481: /* type_specifier_nonarray: IIMAGE2DMSARRAY */
-#line 3210 "MachineIndependent/glslang.y"
+ case 490: /* type_specifier_nonarray: IIMAGE2DMSARRAY */
+#line 3283 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true, false, true);
}
-#line 9625 "MachineIndependent/glslang_tab.cpp"
+#line 10307 "MachineIndependent/glslang_tab.cpp"
break;
- case 482: /* type_specifier_nonarray: UIMAGE2DMSARRAY */
-#line 3215 "MachineIndependent/glslang.y"
+ case 491: /* type_specifier_nonarray: UIMAGE2DMSARRAY */
+#line 3288 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true, false, true);
}
-#line 9635 "MachineIndependent/glslang_tab.cpp"
+#line 10317 "MachineIndependent/glslang_tab.cpp"
break;
- case 483: /* type_specifier_nonarray: I64IMAGE1D */
-#line 3220 "MachineIndependent/glslang.y"
+ case 492: /* type_specifier_nonarray: I64IMAGE1D */
+#line 3293 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt64, Esd1D);
}
-#line 9645 "MachineIndependent/glslang_tab.cpp"
+#line 10327 "MachineIndependent/glslang_tab.cpp"
break;
- case 484: /* type_specifier_nonarray: U64IMAGE1D */
-#line 3225 "MachineIndependent/glslang.y"
+ case 493: /* type_specifier_nonarray: U64IMAGE1D */
+#line 3298 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint64, Esd1D);
}
-#line 9655 "MachineIndependent/glslang_tab.cpp"
+#line 10337 "MachineIndependent/glslang_tab.cpp"
break;
- case 485: /* type_specifier_nonarray: I64IMAGE2D */
-#line 3230 "MachineIndependent/glslang.y"
+ case 494: /* type_specifier_nonarray: I64IMAGE2D */
+#line 3303 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt64, Esd2D);
}
-#line 9665 "MachineIndependent/glslang_tab.cpp"
+#line 10347 "MachineIndependent/glslang_tab.cpp"
break;
- case 486: /* type_specifier_nonarray: U64IMAGE2D */
-#line 3235 "MachineIndependent/glslang.y"
+ case 495: /* type_specifier_nonarray: U64IMAGE2D */
+#line 3308 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint64, Esd2D);
}
-#line 9675 "MachineIndependent/glslang_tab.cpp"
+#line 10357 "MachineIndependent/glslang_tab.cpp"
break;
- case 487: /* type_specifier_nonarray: I64IMAGE3D */
-#line 3240 "MachineIndependent/glslang.y"
+ case 496: /* type_specifier_nonarray: I64IMAGE3D */
+#line 3313 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt64, Esd3D);
}
-#line 9685 "MachineIndependent/glslang_tab.cpp"
+#line 10367 "MachineIndependent/glslang_tab.cpp"
break;
- case 488: /* type_specifier_nonarray: U64IMAGE3D */
-#line 3245 "MachineIndependent/glslang.y"
+ case 497: /* type_specifier_nonarray: U64IMAGE3D */
+#line 3318 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint64, Esd3D);
}
-#line 9695 "MachineIndependent/glslang_tab.cpp"
+#line 10377 "MachineIndependent/glslang_tab.cpp"
break;
- case 489: /* type_specifier_nonarray: I64IMAGE2DRECT */
-#line 3250 "MachineIndependent/glslang.y"
+ case 498: /* type_specifier_nonarray: I64IMAGE2DRECT */
+#line 3323 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt64, EsdRect);
}
-#line 9705 "MachineIndependent/glslang_tab.cpp"
+#line 10387 "MachineIndependent/glslang_tab.cpp"
break;
- case 490: /* type_specifier_nonarray: U64IMAGE2DRECT */
-#line 3255 "MachineIndependent/glslang.y"
+ case 499: /* type_specifier_nonarray: U64IMAGE2DRECT */
+#line 3328 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint64, EsdRect);
}
-#line 9715 "MachineIndependent/glslang_tab.cpp"
+#line 10397 "MachineIndependent/glslang_tab.cpp"
break;
- case 491: /* type_specifier_nonarray: I64IMAGECUBE */
-#line 3260 "MachineIndependent/glslang.y"
+ case 500: /* type_specifier_nonarray: I64IMAGECUBE */
+#line 3333 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt64, EsdCube);
}
-#line 9725 "MachineIndependent/glslang_tab.cpp"
+#line 10407 "MachineIndependent/glslang_tab.cpp"
break;
- case 492: /* type_specifier_nonarray: U64IMAGECUBE */
-#line 3265 "MachineIndependent/glslang.y"
+ case 501: /* type_specifier_nonarray: U64IMAGECUBE */
+#line 3338 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint64, EsdCube);
}
-#line 9735 "MachineIndependent/glslang_tab.cpp"
+#line 10417 "MachineIndependent/glslang_tab.cpp"
break;
- case 493: /* type_specifier_nonarray: I64IMAGEBUFFER */
-#line 3270 "MachineIndependent/glslang.y"
+ case 502: /* type_specifier_nonarray: I64IMAGEBUFFER */
+#line 3343 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt64, EsdBuffer);
}
-#line 9745 "MachineIndependent/glslang_tab.cpp"
+#line 10427 "MachineIndependent/glslang_tab.cpp"
break;
- case 494: /* type_specifier_nonarray: U64IMAGEBUFFER */
-#line 3275 "MachineIndependent/glslang.y"
+ case 503: /* type_specifier_nonarray: U64IMAGEBUFFER */
+#line 3348 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint64, EsdBuffer);
}
-#line 9755 "MachineIndependent/glslang_tab.cpp"
+#line 10437 "MachineIndependent/glslang_tab.cpp"
break;
- case 495: /* type_specifier_nonarray: I64IMAGE1DARRAY */
-#line 3280 "MachineIndependent/glslang.y"
+ case 504: /* type_specifier_nonarray: I64IMAGE1DARRAY */
+#line 3353 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt64, Esd1D, true);
}
-#line 9765 "MachineIndependent/glslang_tab.cpp"
+#line 10447 "MachineIndependent/glslang_tab.cpp"
break;
- case 496: /* type_specifier_nonarray: U64IMAGE1DARRAY */
-#line 3285 "MachineIndependent/glslang.y"
+ case 505: /* type_specifier_nonarray: U64IMAGE1DARRAY */
+#line 3358 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint64, Esd1D, true);
}
-#line 9775 "MachineIndependent/glslang_tab.cpp"
+#line 10457 "MachineIndependent/glslang_tab.cpp"
break;
- case 497: /* type_specifier_nonarray: I64IMAGE2DARRAY */
-#line 3290 "MachineIndependent/glslang.y"
+ case 506: /* type_specifier_nonarray: I64IMAGE2DARRAY */
+#line 3363 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, true);
}
-#line 9785 "MachineIndependent/glslang_tab.cpp"
+#line 10467 "MachineIndependent/glslang_tab.cpp"
break;
- case 498: /* type_specifier_nonarray: U64IMAGE2DARRAY */
-#line 3295 "MachineIndependent/glslang.y"
+ case 507: /* type_specifier_nonarray: U64IMAGE2DARRAY */
+#line 3368 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, true);
}
-#line 9795 "MachineIndependent/glslang_tab.cpp"
+#line 10477 "MachineIndependent/glslang_tab.cpp"
break;
- case 499: /* type_specifier_nonarray: I64IMAGECUBEARRAY */
-#line 3300 "MachineIndependent/glslang.y"
+ case 508: /* type_specifier_nonarray: I64IMAGECUBEARRAY */
+#line 3373 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt64, EsdCube, true);
}
-#line 9805 "MachineIndependent/glslang_tab.cpp"
+#line 10487 "MachineIndependent/glslang_tab.cpp"
break;
- case 500: /* type_specifier_nonarray: U64IMAGECUBEARRAY */
-#line 3305 "MachineIndependent/glslang.y"
+ case 509: /* type_specifier_nonarray: U64IMAGECUBEARRAY */
+#line 3378 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint64, EsdCube, true);
}
-#line 9815 "MachineIndependent/glslang_tab.cpp"
+#line 10497 "MachineIndependent/glslang_tab.cpp"
break;
- case 501: /* type_specifier_nonarray: I64IMAGE2DMS */
-#line 3310 "MachineIndependent/glslang.y"
+ case 510: /* type_specifier_nonarray: I64IMAGE2DMS */
+#line 3383 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, false, false, true);
}
-#line 9825 "MachineIndependent/glslang_tab.cpp"
+#line 10507 "MachineIndependent/glslang_tab.cpp"
break;
- case 502: /* type_specifier_nonarray: U64IMAGE2DMS */
-#line 3315 "MachineIndependent/glslang.y"
+ case 511: /* type_specifier_nonarray: U64IMAGE2DMS */
+#line 3388 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, false, false, true);
}
-#line 9835 "MachineIndependent/glslang_tab.cpp"
+#line 10517 "MachineIndependent/glslang_tab.cpp"
break;
- case 503: /* type_specifier_nonarray: I64IMAGE2DMSARRAY */
-#line 3320 "MachineIndependent/glslang.y"
+ case 512: /* type_specifier_nonarray: I64IMAGE2DMSARRAY */
+#line 3393 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, true, false, true);
}
-#line 9845 "MachineIndependent/glslang_tab.cpp"
+#line 10527 "MachineIndependent/glslang_tab.cpp"
break;
- case 504: /* type_specifier_nonarray: U64IMAGE2DMSARRAY */
-#line 3325 "MachineIndependent/glslang.y"
+ case 513: /* type_specifier_nonarray: U64IMAGE2DMSARRAY */
+#line 3398 "MachineIndependent/glslang.y"
{
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, true, false, true);
}
-#line 9855 "MachineIndependent/glslang_tab.cpp"
+#line 10537 "MachineIndependent/glslang_tab.cpp"
break;
- case 505: /* type_specifier_nonarray: SAMPLEREXTERNALOES */
-#line 3330 "MachineIndependent/glslang.y"
+ case 514: /* type_specifier_nonarray: SAMPLEREXTERNALOES */
+#line 3403 "MachineIndependent/glslang.y"
{ // GL_OES_EGL_image_external
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D);
(yyval.interm.type).sampler.external = true;
}
-#line 9866 "MachineIndependent/glslang_tab.cpp"
+#line 10548 "MachineIndependent/glslang_tab.cpp"
break;
- case 506: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */
-#line 3336 "MachineIndependent/glslang.y"
+ case 515: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */
+#line 3409 "MachineIndependent/glslang.y"
{ // GL_EXT_YUV_target
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.set(EbtFloat, Esd2D);
(yyval.interm.type).sampler.yuv = true;
}
-#line 9877 "MachineIndependent/glslang_tab.cpp"
+#line 10559 "MachineIndependent/glslang_tab.cpp"
break;
- case 507: /* type_specifier_nonarray: SUBPASSINPUT */
-#line 3342 "MachineIndependent/glslang.y"
+ case 516: /* type_specifier_nonarray: SUBPASSINPUT */
+#line 3415 "MachineIndependent/glslang.y"
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtFloat);
}
-#line 9888 "MachineIndependent/glslang_tab.cpp"
+#line 10570 "MachineIndependent/glslang_tab.cpp"
break;
- case 508: /* type_specifier_nonarray: SUBPASSINPUTMS */
-#line 3348 "MachineIndependent/glslang.y"
+ case 517: /* type_specifier_nonarray: SUBPASSINPUTMS */
+#line 3421 "MachineIndependent/glslang.y"
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtFloat, true);
}
-#line 9899 "MachineIndependent/glslang_tab.cpp"
+#line 10581 "MachineIndependent/glslang_tab.cpp"
break;
- case 509: /* type_specifier_nonarray: F16SUBPASSINPUT */
-#line 3354 "MachineIndependent/glslang.y"
+ case 518: /* type_specifier_nonarray: F16SUBPASSINPUT */
+#line 3427 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel());
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
@@ -9907,11 +10589,11 @@ yyreduce:
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtFloat16);
}
-#line 9911 "MachineIndependent/glslang_tab.cpp"
+#line 10593 "MachineIndependent/glslang_tab.cpp"
break;
- case 510: /* type_specifier_nonarray: F16SUBPASSINPUTMS */
-#line 3361 "MachineIndependent/glslang.y"
+ case 519: /* type_specifier_nonarray: F16SUBPASSINPUTMS */
+#line 3434 "MachineIndependent/glslang.y"
{
parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel());
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
@@ -9919,98 +10601,107 @@ yyreduce:
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtFloat16, true);
}
-#line 9923 "MachineIndependent/glslang_tab.cpp"
+#line 10605 "MachineIndependent/glslang_tab.cpp"
break;
- case 511: /* type_specifier_nonarray: ISUBPASSINPUT */
-#line 3368 "MachineIndependent/glslang.y"
+ case 520: /* type_specifier_nonarray: ISUBPASSINPUT */
+#line 3441 "MachineIndependent/glslang.y"
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtInt);
}
-#line 9934 "MachineIndependent/glslang_tab.cpp"
+#line 10616 "MachineIndependent/glslang_tab.cpp"
break;
- case 512: /* type_specifier_nonarray: ISUBPASSINPUTMS */
-#line 3374 "MachineIndependent/glslang.y"
+ case 521: /* type_specifier_nonarray: ISUBPASSINPUTMS */
+#line 3447 "MachineIndependent/glslang.y"
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtInt, true);
}
-#line 9945 "MachineIndependent/glslang_tab.cpp"
+#line 10627 "MachineIndependent/glslang_tab.cpp"
break;
- case 513: /* type_specifier_nonarray: USUBPASSINPUT */
-#line 3380 "MachineIndependent/glslang.y"
+ case 522: /* type_specifier_nonarray: USUBPASSINPUT */
+#line 3453 "MachineIndependent/glslang.y"
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtUint);
}
-#line 9956 "MachineIndependent/glslang_tab.cpp"
+#line 10638 "MachineIndependent/glslang_tab.cpp"
break;
- case 514: /* type_specifier_nonarray: USUBPASSINPUTMS */
-#line 3386 "MachineIndependent/glslang.y"
+ case 523: /* type_specifier_nonarray: USUBPASSINPUTMS */
+#line 3459 "MachineIndependent/glslang.y"
{
parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtSampler;
(yyval.interm.type).sampler.setSubpass(EbtUint, true);
}
-#line 9967 "MachineIndependent/glslang_tab.cpp"
+#line 10649 "MachineIndependent/glslang_tab.cpp"
break;
- case 515: /* type_specifier_nonarray: FCOOPMATNV */
-#line 3392 "MachineIndependent/glslang.y"
+ case 524: /* type_specifier_nonarray: FCOOPMATNV */
+#line 3465 "MachineIndependent/glslang.y"
{
parseContext.fcoopmatCheck((yyvsp[0].lex).loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtFloat;
(yyval.interm.type).coopmat = true;
}
-#line 9978 "MachineIndependent/glslang_tab.cpp"
+#line 10660 "MachineIndependent/glslang_tab.cpp"
break;
- case 516: /* type_specifier_nonarray: ICOOPMATNV */
-#line 3398 "MachineIndependent/glslang.y"
+ case 525: /* type_specifier_nonarray: ICOOPMATNV */
+#line 3471 "MachineIndependent/glslang.y"
{
parseContext.intcoopmatCheck((yyvsp[0].lex).loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtInt;
(yyval.interm.type).coopmat = true;
}
-#line 9989 "MachineIndependent/glslang_tab.cpp"
+#line 10671 "MachineIndependent/glslang_tab.cpp"
break;
- case 517: /* type_specifier_nonarray: UCOOPMATNV */
-#line 3404 "MachineIndependent/glslang.y"
+ case 526: /* type_specifier_nonarray: UCOOPMATNV */
+#line 3477 "MachineIndependent/glslang.y"
{
parseContext.intcoopmatCheck((yyvsp[0].lex).loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel());
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
(yyval.interm.type).basicType = EbtUint;
(yyval.interm.type).coopmat = true;
}
-#line 10000 "MachineIndependent/glslang_tab.cpp"
+#line 10682 "MachineIndependent/glslang_tab.cpp"
break;
- case 518: /* type_specifier_nonarray: struct_specifier */
-#line 3411 "MachineIndependent/glslang.y"
+ case 527: /* type_specifier_nonarray: spirv_type_specifier */
+#line 3483 "MachineIndependent/glslang.y"
+ {
+ parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier");
+ (yyval.interm.type) = (yyvsp[0].interm.type);
+ }
+#line 10691 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 528: /* type_specifier_nonarray: struct_specifier */
+#line 3488 "MachineIndependent/glslang.y"
{
(yyval.interm.type) = (yyvsp[0].interm.type);
(yyval.interm.type).qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
parseContext.structTypeCheck((yyval.interm.type).loc, (yyval.interm.type));
}
-#line 10010 "MachineIndependent/glslang_tab.cpp"
+#line 10701 "MachineIndependent/glslang_tab.cpp"
break;
- case 519: /* type_specifier_nonarray: TYPE_NAME */
-#line 3416 "MachineIndependent/glslang.y"
+ case 529: /* type_specifier_nonarray: TYPE_NAME */
+#line 3493 "MachineIndependent/glslang.y"
{
//
// This is for user defined type names. The lexical phase looked up the
@@ -10024,47 +10715,47 @@ yyreduce:
} else
parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), "");
}
-#line 10028 "MachineIndependent/glslang_tab.cpp"
+#line 10719 "MachineIndependent/glslang_tab.cpp"
break;
- case 520: /* precision_qualifier: HIGH_PRECISION */
-#line 3432 "MachineIndependent/glslang.y"
+ case 530: /* precision_qualifier: HIGH_PRECISION */
+#line 3509 "MachineIndependent/glslang.y"
{
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "highp precision qualifier");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqHigh);
}
-#line 10038 "MachineIndependent/glslang_tab.cpp"
+#line 10729 "MachineIndependent/glslang_tab.cpp"
break;
- case 521: /* precision_qualifier: MEDIUM_PRECISION */
-#line 3437 "MachineIndependent/glslang.y"
+ case 531: /* precision_qualifier: MEDIUM_PRECISION */
+#line 3514 "MachineIndependent/glslang.y"
{
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "mediump precision qualifier");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqMedium);
}
-#line 10048 "MachineIndependent/glslang_tab.cpp"
+#line 10739 "MachineIndependent/glslang_tab.cpp"
break;
- case 522: /* precision_qualifier: LOW_PRECISION */
-#line 3442 "MachineIndependent/glslang.y"
+ case 532: /* precision_qualifier: LOW_PRECISION */
+#line 3519 "MachineIndependent/glslang.y"
{
parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "lowp precision qualifier");
(yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel());
parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqLow);
}
-#line 10058 "MachineIndependent/glslang_tab.cpp"
+#line 10749 "MachineIndependent/glslang_tab.cpp"
break;
- case 523: /* $@3: %empty */
-#line 3450 "MachineIndependent/glslang.y"
+ case 533: /* $@3: %empty */
+#line 3527 "MachineIndependent/glslang.y"
{ parseContext.nestedStructCheck((yyvsp[-2].lex).loc); }
-#line 10064 "MachineIndependent/glslang_tab.cpp"
+#line 10755 "MachineIndependent/glslang_tab.cpp"
break;
- case 524: /* struct_specifier: STRUCT IDENTIFIER LEFT_BRACE $@3 struct_declaration_list RIGHT_BRACE */
-#line 3450 "MachineIndependent/glslang.y"
+ case 534: /* struct_specifier: STRUCT IDENTIFIER LEFT_BRACE $@3 struct_declaration_list RIGHT_BRACE */
+#line 3527 "MachineIndependent/glslang.y"
{
TType* structure = new TType((yyvsp[-1].interm.typeList), *(yyvsp[-4].lex).string);
parseContext.structArrayCheck((yyvsp[-4].lex).loc, *structure);
@@ -10076,17 +10767,17 @@ yyreduce:
(yyval.interm.type).userDef = structure;
--parseContext.structNestingLevel;
}
-#line 10080 "MachineIndependent/glslang_tab.cpp"
+#line 10771 "MachineIndependent/glslang_tab.cpp"
break;
- case 525: /* $@4: %empty */
-#line 3461 "MachineIndependent/glslang.y"
+ case 535: /* $@4: %empty */
+#line 3538 "MachineIndependent/glslang.y"
{ parseContext.nestedStructCheck((yyvsp[-1].lex).loc); }
-#line 10086 "MachineIndependent/glslang_tab.cpp"
+#line 10777 "MachineIndependent/glslang_tab.cpp"
break;
- case 526: /* struct_specifier: STRUCT LEFT_BRACE $@4 struct_declaration_list RIGHT_BRACE */
-#line 3461 "MachineIndependent/glslang.y"
+ case 536: /* struct_specifier: STRUCT LEFT_BRACE $@4 struct_declaration_list RIGHT_BRACE */
+#line 3538 "MachineIndependent/glslang.y"
{
TType* structure = new TType((yyvsp[-1].interm.typeList), TString(""));
(yyval.interm.type).init((yyvsp[-4].lex).loc);
@@ -10094,19 +10785,19 @@ yyreduce:
(yyval.interm.type).userDef = structure;
--parseContext.structNestingLevel;
}
-#line 10098 "MachineIndependent/glslang_tab.cpp"
+#line 10789 "MachineIndependent/glslang_tab.cpp"
break;
- case 527: /* struct_declaration_list: struct_declaration */
-#line 3471 "MachineIndependent/glslang.y"
+ case 537: /* struct_declaration_list: struct_declaration */
+#line 3548 "MachineIndependent/glslang.y"
{
(yyval.interm.typeList) = (yyvsp[0].interm.typeList);
}
-#line 10106 "MachineIndependent/glslang_tab.cpp"
+#line 10797 "MachineIndependent/glslang_tab.cpp"
break;
- case 528: /* struct_declaration_list: struct_declaration_list struct_declaration */
-#line 3474 "MachineIndependent/glslang.y"
+ case 538: /* struct_declaration_list: struct_declaration_list struct_declaration */
+#line 3551 "MachineIndependent/glslang.y"
{
(yyval.interm.typeList) = (yyvsp[-1].interm.typeList);
for (unsigned int i = 0; i < (yyvsp[0].interm.typeList)->size(); ++i) {
@@ -10117,11 +10808,11 @@ yyreduce:
(yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]);
}
}
-#line 10121 "MachineIndependent/glslang_tab.cpp"
+#line 10812 "MachineIndependent/glslang_tab.cpp"
break;
- case 529: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */
-#line 3487 "MachineIndependent/glslang.y"
+ case 539: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */
+#line 3564 "MachineIndependent/glslang.y"
{
if ((yyvsp[-2].interm.type).arraySizes) {
parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
@@ -10144,11 +10835,11 @@ yyreduce:
(*(yyval.interm.typeList))[i].type->shallowCopy(type);
}
}
-#line 10148 "MachineIndependent/glslang_tab.cpp"
+#line 10839 "MachineIndependent/glslang_tab.cpp"
break;
- case 530: /* struct_declaration: type_qualifier type_specifier struct_declarator_list SEMICOLON */
-#line 3509 "MachineIndependent/glslang.y"
+ case 540: /* struct_declaration: type_qualifier type_specifier struct_declarator_list SEMICOLON */
+#line 3586 "MachineIndependent/glslang.y"
{
if ((yyvsp[-2].interm.type).arraySizes) {
parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
@@ -10173,38 +10864,38 @@ yyreduce:
(*(yyval.interm.typeList))[i].type->shallowCopy(type);
}
}
-#line 10177 "MachineIndependent/glslang_tab.cpp"
+#line 10868 "MachineIndependent/glslang_tab.cpp"
break;
- case 531: /* struct_declarator_list: struct_declarator */
-#line 3536 "MachineIndependent/glslang.y"
+ case 541: /* struct_declarator_list: struct_declarator */
+#line 3613 "MachineIndependent/glslang.y"
{
(yyval.interm.typeList) = new TTypeList;
(yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine));
}
-#line 10186 "MachineIndependent/glslang_tab.cpp"
+#line 10877 "MachineIndependent/glslang_tab.cpp"
break;
- case 532: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */
-#line 3540 "MachineIndependent/glslang.y"
+ case 542: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */
+#line 3617 "MachineIndependent/glslang.y"
{
(yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine));
}
-#line 10194 "MachineIndependent/glslang_tab.cpp"
+#line 10885 "MachineIndependent/glslang_tab.cpp"
break;
- case 533: /* struct_declarator: IDENTIFIER */
-#line 3546 "MachineIndependent/glslang.y"
+ case 543: /* struct_declarator: IDENTIFIER */
+#line 3623 "MachineIndependent/glslang.y"
{
(yyval.interm.typeLine).type = new TType(EbtVoid);
(yyval.interm.typeLine).loc = (yyvsp[0].lex).loc;
(yyval.interm.typeLine).type->setFieldName(*(yyvsp[0].lex).string);
}
-#line 10204 "MachineIndependent/glslang_tab.cpp"
+#line 10895 "MachineIndependent/glslang_tab.cpp"
break;
- case 534: /* struct_declarator: IDENTIFIER array_specifier */
-#line 3551 "MachineIndependent/glslang.y"
+ case 544: /* struct_declarator: IDENTIFIER array_specifier */
+#line 3628 "MachineIndependent/glslang.y"
{
parseContext.arrayOfArrayVersionCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes);
@@ -10213,235 +10904,246 @@ yyreduce:
(yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string);
(yyval.interm.typeLine).type->transferArraySizes((yyvsp[0].interm).arraySizes);
}
-#line 10217 "MachineIndependent/glslang_tab.cpp"
+#line 10908 "MachineIndependent/glslang_tab.cpp"
break;
- case 535: /* initializer: assignment_expression */
-#line 3562 "MachineIndependent/glslang.y"
+ case 545: /* initializer: assignment_expression */
+#line 3639 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 10225 "MachineIndependent/glslang_tab.cpp"
+#line 10916 "MachineIndependent/glslang_tab.cpp"
break;
- case 536: /* initializer: LEFT_BRACE initializer_list RIGHT_BRACE */
-#line 3566 "MachineIndependent/glslang.y"
+ case 546: /* initializer: LEFT_BRACE initializer_list RIGHT_BRACE */
+#line 3643 "MachineIndependent/glslang.y"
{
const char* initFeature = "{ } style initializers";
parseContext.requireProfile((yyvsp[-2].lex).loc, ~EEsProfile, initFeature);
parseContext.profileRequires((yyvsp[-2].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
(yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode);
}
-#line 10236 "MachineIndependent/glslang_tab.cpp"
+#line 10927 "MachineIndependent/glslang_tab.cpp"
break;
- case 537: /* initializer: LEFT_BRACE initializer_list COMMA RIGHT_BRACE */
-#line 3572 "MachineIndependent/glslang.y"
+ case 547: /* initializer: LEFT_BRACE initializer_list COMMA RIGHT_BRACE */
+#line 3649 "MachineIndependent/glslang.y"
{
const char* initFeature = "{ } style initializers";
parseContext.requireProfile((yyvsp[-3].lex).loc, ~EEsProfile, initFeature);
parseContext.profileRequires((yyvsp[-3].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature);
(yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode);
}
-#line 10247 "MachineIndependent/glslang_tab.cpp"
+#line 10938 "MachineIndependent/glslang_tab.cpp"
break;
- case 538: /* initializer_list: initializer */
-#line 3583 "MachineIndependent/glslang.y"
+ case 548: /* initializer: LEFT_BRACE RIGHT_BRACE */
+#line 3655 "MachineIndependent/glslang.y"
+ {
+ const char* initFeature = "empty { } initializer";
+ parseContext.profileRequires((yyvsp[-1].lex).loc, EEsProfile, 0, E_GL_EXT_null_initializer, initFeature);
+ parseContext.profileRequires((yyvsp[-1].lex).loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature);
+ (yyval.interm.intermTypedNode) = parseContext.intermediate.makeAggregate((yyvsp[-1].lex).loc);
+ }
+#line 10949 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 549: /* initializer_list: initializer */
+#line 3666 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc());
}
-#line 10255 "MachineIndependent/glslang_tab.cpp"
+#line 10957 "MachineIndependent/glslang_tab.cpp"
break;
- case 539: /* initializer_list: initializer_list COMMA initializer */
-#line 3586 "MachineIndependent/glslang.y"
+ case 550: /* initializer_list: initializer_list COMMA initializer */
+#line 3669 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode));
}
-#line 10263 "MachineIndependent/glslang_tab.cpp"
+#line 10965 "MachineIndependent/glslang_tab.cpp"
break;
- case 540: /* declaration_statement: declaration */
-#line 3593 "MachineIndependent/glslang.y"
+ case 551: /* declaration_statement: declaration */
+#line 3676 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 10269 "MachineIndependent/glslang_tab.cpp"
+#line 10971 "MachineIndependent/glslang_tab.cpp"
break;
- case 541: /* statement: compound_statement */
-#line 3597 "MachineIndependent/glslang.y"
+ case 552: /* statement: compound_statement */
+#line 3680 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 10275 "MachineIndependent/glslang_tab.cpp"
+#line 10977 "MachineIndependent/glslang_tab.cpp"
break;
- case 542: /* statement: simple_statement */
-#line 3598 "MachineIndependent/glslang.y"
+ case 553: /* statement: simple_statement */
+#line 3681 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 10281 "MachineIndependent/glslang_tab.cpp"
+#line 10983 "MachineIndependent/glslang_tab.cpp"
break;
- case 543: /* simple_statement: declaration_statement */
-#line 3604 "MachineIndependent/glslang.y"
+ case 554: /* simple_statement: declaration_statement */
+#line 3687 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 10287 "MachineIndependent/glslang_tab.cpp"
+#line 10989 "MachineIndependent/glslang_tab.cpp"
break;
- case 544: /* simple_statement: expression_statement */
-#line 3605 "MachineIndependent/glslang.y"
+ case 555: /* simple_statement: expression_statement */
+#line 3688 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 10293 "MachineIndependent/glslang_tab.cpp"
+#line 10995 "MachineIndependent/glslang_tab.cpp"
break;
- case 545: /* simple_statement: selection_statement */
-#line 3606 "MachineIndependent/glslang.y"
+ case 556: /* simple_statement: selection_statement */
+#line 3689 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 10299 "MachineIndependent/glslang_tab.cpp"
+#line 11001 "MachineIndependent/glslang_tab.cpp"
break;
- case 546: /* simple_statement: switch_statement */
-#line 3607 "MachineIndependent/glslang.y"
+ case 557: /* simple_statement: switch_statement */
+#line 3690 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 10305 "MachineIndependent/glslang_tab.cpp"
+#line 11007 "MachineIndependent/glslang_tab.cpp"
break;
- case 547: /* simple_statement: case_label */
-#line 3608 "MachineIndependent/glslang.y"
+ case 558: /* simple_statement: case_label */
+#line 3691 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 10311 "MachineIndependent/glslang_tab.cpp"
+#line 11013 "MachineIndependent/glslang_tab.cpp"
break;
- case 548: /* simple_statement: iteration_statement */
-#line 3609 "MachineIndependent/glslang.y"
+ case 559: /* simple_statement: iteration_statement */
+#line 3692 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 10317 "MachineIndependent/glslang_tab.cpp"
+#line 11019 "MachineIndependent/glslang_tab.cpp"
break;
- case 549: /* simple_statement: jump_statement */
-#line 3610 "MachineIndependent/glslang.y"
+ case 560: /* simple_statement: jump_statement */
+#line 3693 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 10323 "MachineIndependent/glslang_tab.cpp"
+#line 11025 "MachineIndependent/glslang_tab.cpp"
break;
- case 550: /* simple_statement: demote_statement */
-#line 3612 "MachineIndependent/glslang.y"
+ case 561: /* simple_statement: demote_statement */
+#line 3695 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 10329 "MachineIndependent/glslang_tab.cpp"
+#line 11031 "MachineIndependent/glslang_tab.cpp"
break;
- case 551: /* demote_statement: DEMOTE SEMICOLON */
-#line 3618 "MachineIndependent/glslang.y"
+ case 562: /* demote_statement: DEMOTE SEMICOLON */
+#line 3701 "MachineIndependent/glslang.y"
{
parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "demote");
parseContext.requireExtensions((yyvsp[-1].lex).loc, 1, &E_GL_EXT_demote_to_helper_invocation, "demote");
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDemote, (yyvsp[-1].lex).loc);
}
-#line 10339 "MachineIndependent/glslang_tab.cpp"
+#line 11041 "MachineIndependent/glslang_tab.cpp"
break;
- case 552: /* compound_statement: LEFT_BRACE RIGHT_BRACE */
-#line 3627 "MachineIndependent/glslang.y"
+ case 563: /* compound_statement: LEFT_BRACE RIGHT_BRACE */
+#line 3710 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = 0; }
-#line 10345 "MachineIndependent/glslang_tab.cpp"
+#line 11047 "MachineIndependent/glslang_tab.cpp"
break;
- case 553: /* $@5: %empty */
-#line 3628 "MachineIndependent/glslang.y"
+ case 564: /* $@5: %empty */
+#line 3711 "MachineIndependent/glslang.y"
{
parseContext.symbolTable.push();
++parseContext.statementNestingLevel;
}
-#line 10354 "MachineIndependent/glslang_tab.cpp"
+#line 11056 "MachineIndependent/glslang_tab.cpp"
break;
- case 554: /* $@6: %empty */
-#line 3632 "MachineIndependent/glslang.y"
+ case 565: /* $@6: %empty */
+#line 3715 "MachineIndependent/glslang.y"
{
parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
--parseContext.statementNestingLevel;
}
-#line 10363 "MachineIndependent/glslang_tab.cpp"
+#line 11065 "MachineIndependent/glslang_tab.cpp"
break;
- case 555: /* compound_statement: LEFT_BRACE $@5 statement_list $@6 RIGHT_BRACE */
-#line 3636 "MachineIndependent/glslang.y"
+ case 566: /* compound_statement: LEFT_BRACE $@5 statement_list $@6 RIGHT_BRACE */
+#line 3719 "MachineIndependent/glslang.y"
{
if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate())
(yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence);
(yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode);
}
-#line 10373 "MachineIndependent/glslang_tab.cpp"
+#line 11075 "MachineIndependent/glslang_tab.cpp"
break;
- case 556: /* statement_no_new_scope: compound_statement_no_new_scope */
-#line 3644 "MachineIndependent/glslang.y"
+ case 567: /* statement_no_new_scope: compound_statement_no_new_scope */
+#line 3727 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 10379 "MachineIndependent/glslang_tab.cpp"
+#line 11081 "MachineIndependent/glslang_tab.cpp"
break;
- case 557: /* statement_no_new_scope: simple_statement */
-#line 3645 "MachineIndependent/glslang.y"
+ case 568: /* statement_no_new_scope: simple_statement */
+#line 3728 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); }
-#line 10385 "MachineIndependent/glslang_tab.cpp"
+#line 11087 "MachineIndependent/glslang_tab.cpp"
break;
- case 558: /* $@7: %empty */
-#line 3649 "MachineIndependent/glslang.y"
+ case 569: /* $@7: %empty */
+#line 3732 "MachineIndependent/glslang.y"
{
++parseContext.controlFlowNestingLevel;
}
-#line 10393 "MachineIndependent/glslang_tab.cpp"
+#line 11095 "MachineIndependent/glslang_tab.cpp"
break;
- case 559: /* statement_scoped: $@7 compound_statement */
-#line 3652 "MachineIndependent/glslang.y"
+ case 570: /* statement_scoped: $@7 compound_statement */
+#line 3735 "MachineIndependent/glslang.y"
{
--parseContext.controlFlowNestingLevel;
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10402 "MachineIndependent/glslang_tab.cpp"
+#line 11104 "MachineIndependent/glslang_tab.cpp"
break;
- case 560: /* $@8: %empty */
-#line 3656 "MachineIndependent/glslang.y"
+ case 571: /* $@8: %empty */
+#line 3739 "MachineIndependent/glslang.y"
{
parseContext.symbolTable.push();
++parseContext.statementNestingLevel;
++parseContext.controlFlowNestingLevel;
}
-#line 10412 "MachineIndependent/glslang_tab.cpp"
+#line 11114 "MachineIndependent/glslang_tab.cpp"
break;
- case 561: /* statement_scoped: $@8 simple_statement */
-#line 3661 "MachineIndependent/glslang.y"
+ case 572: /* statement_scoped: $@8 simple_statement */
+#line 3744 "MachineIndependent/glslang.y"
{
parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10423 "MachineIndependent/glslang_tab.cpp"
+#line 11125 "MachineIndependent/glslang_tab.cpp"
break;
- case 562: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */
-#line 3670 "MachineIndependent/glslang.y"
+ case 573: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */
+#line 3753 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = 0;
}
-#line 10431 "MachineIndependent/glslang_tab.cpp"
+#line 11133 "MachineIndependent/glslang_tab.cpp"
break;
- case 563: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */
-#line 3673 "MachineIndependent/glslang.y"
+ case 574: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */
+#line 3756 "MachineIndependent/glslang.y"
{
if ((yyvsp[-1].interm.intermNode) && (yyvsp[-1].interm.intermNode)->getAsAggregate())
(yyvsp[-1].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence);
(yyval.interm.intermNode) = (yyvsp[-1].interm.intermNode);
}
-#line 10441 "MachineIndependent/glslang_tab.cpp"
+#line 11143 "MachineIndependent/glslang_tab.cpp"
break;
- case 564: /* statement_list: statement */
-#line 3681 "MachineIndependent/glslang.y"
+ case 575: /* statement_list: statement */
+#line 3764 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode));
if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase ||
@@ -10450,11 +11152,11 @@ yyreduce:
(yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case
}
}
-#line 10454 "MachineIndependent/glslang_tab.cpp"
+#line 11156 "MachineIndependent/glslang_tab.cpp"
break;
- case 565: /* statement_list: statement_list statement */
-#line 3689 "MachineIndependent/glslang.y"
+ case 576: /* statement_list: statement_list statement */
+#line 3772 "MachineIndependent/glslang.y"
{
if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase ||
(yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) {
@@ -10463,76 +11165,77 @@ yyreduce:
} else
(yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode));
}
-#line 10467 "MachineIndependent/glslang_tab.cpp"
+#line 11169 "MachineIndependent/glslang_tab.cpp"
break;
- case 566: /* expression_statement: SEMICOLON */
-#line 3700 "MachineIndependent/glslang.y"
+ case 577: /* expression_statement: SEMICOLON */
+#line 3783 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = 0; }
-#line 10473 "MachineIndependent/glslang_tab.cpp"
+#line 11175 "MachineIndependent/glslang_tab.cpp"
break;
- case 567: /* expression_statement: expression SEMICOLON */
-#line 3701 "MachineIndependent/glslang.y"
+ case 578: /* expression_statement: expression SEMICOLON */
+#line 3784 "MachineIndependent/glslang.y"
{ (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[-1].interm.intermTypedNode)); }
-#line 10479 "MachineIndependent/glslang_tab.cpp"
+#line 11181 "MachineIndependent/glslang_tab.cpp"
break;
- case 568: /* selection_statement: selection_statement_nonattributed */
-#line 3705 "MachineIndependent/glslang.y"
+ case 579: /* selection_statement: selection_statement_nonattributed */
+#line 3788 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10487 "MachineIndependent/glslang_tab.cpp"
+#line 11189 "MachineIndependent/glslang_tab.cpp"
break;
- case 569: /* selection_statement: attribute selection_statement_nonattributed */
-#line 3709 "MachineIndependent/glslang.y"
+ case 580: /* selection_statement: attribute selection_statement_nonattributed */
+#line 3792 "MachineIndependent/glslang.y"
{
+ parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
parseContext.handleSelectionAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode));
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10496 "MachineIndependent/glslang_tab.cpp"
+#line 11199 "MachineIndependent/glslang_tab.cpp"
break;
- case 570: /* selection_statement_nonattributed: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement */
-#line 3716 "MachineIndependent/glslang.y"
+ case 581: /* selection_statement_nonattributed: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement */
+#line 3800 "MachineIndependent/glslang.y"
{
parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-2].interm.intermTypedNode));
(yyval.interm.intermNode) = parseContext.intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yyvsp[-4].lex).loc);
}
-#line 10505 "MachineIndependent/glslang_tab.cpp"
+#line 11208 "MachineIndependent/glslang_tab.cpp"
break;
- case 571: /* selection_rest_statement: statement_scoped ELSE statement_scoped */
-#line 3723 "MachineIndependent/glslang.y"
+ case 582: /* selection_rest_statement: statement_scoped ELSE statement_scoped */
+#line 3807 "MachineIndependent/glslang.y"
{
(yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode);
(yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode);
}
-#line 10514 "MachineIndependent/glslang_tab.cpp"
+#line 11217 "MachineIndependent/glslang_tab.cpp"
break;
- case 572: /* selection_rest_statement: statement_scoped */
-#line 3727 "MachineIndependent/glslang.y"
+ case 583: /* selection_rest_statement: statement_scoped */
+#line 3811 "MachineIndependent/glslang.y"
{
(yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode);
(yyval.interm.nodePair).node2 = 0;
}
-#line 10523 "MachineIndependent/glslang_tab.cpp"
+#line 11226 "MachineIndependent/glslang_tab.cpp"
break;
- case 573: /* condition: expression */
-#line 3735 "MachineIndependent/glslang.y"
+ case 584: /* condition: expression */
+#line 3819 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode));
}
-#line 10532 "MachineIndependent/glslang_tab.cpp"
+#line 11235 "MachineIndependent/glslang_tab.cpp"
break;
- case 574: /* condition: fully_specified_type IDENTIFIER EQUAL initializer */
-#line 3739 "MachineIndependent/glslang.y"
+ case 585: /* condition: fully_specified_type IDENTIFIER EQUAL initializer */
+#line 3823 "MachineIndependent/glslang.y"
{
parseContext.boolCheck((yyvsp[-2].lex).loc, (yyvsp[-3].interm.type));
@@ -10543,28 +11246,29 @@ yyreduce:
else
(yyval.interm.intermTypedNode) = 0;
}
-#line 10547 "MachineIndependent/glslang_tab.cpp"
+#line 11250 "MachineIndependent/glslang_tab.cpp"
break;
- case 575: /* switch_statement: switch_statement_nonattributed */
-#line 3752 "MachineIndependent/glslang.y"
+ case 586: /* switch_statement: switch_statement_nonattributed */
+#line 3836 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10555 "MachineIndependent/glslang_tab.cpp"
+#line 11258 "MachineIndependent/glslang_tab.cpp"
break;
- case 576: /* switch_statement: attribute switch_statement_nonattributed */
-#line 3756 "MachineIndependent/glslang.y"
+ case 587: /* switch_statement: attribute switch_statement_nonattributed */
+#line 3840 "MachineIndependent/glslang.y"
{
+ parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
parseContext.handleSwitchAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode));
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10564 "MachineIndependent/glslang_tab.cpp"
+#line 11268 "MachineIndependent/glslang_tab.cpp"
break;
- case 577: /* $@9: %empty */
-#line 3763 "MachineIndependent/glslang.y"
+ case 588: /* $@9: %empty */
+#line 3848 "MachineIndependent/glslang.y"
{
// start new switch sequence on the switch stack
++parseContext.controlFlowNestingLevel;
@@ -10573,11 +11277,11 @@ yyreduce:
parseContext.switchLevel.push_back(parseContext.statementNestingLevel);
parseContext.symbolTable.push();
}
-#line 10577 "MachineIndependent/glslang_tab.cpp"
+#line 11281 "MachineIndependent/glslang_tab.cpp"
break;
- case 578: /* switch_statement_nonattributed: SWITCH LEFT_PAREN expression RIGHT_PAREN $@9 LEFT_BRACE switch_statement_list RIGHT_BRACE */
-#line 3771 "MachineIndependent/glslang.y"
+ case 589: /* switch_statement_nonattributed: SWITCH LEFT_PAREN expression RIGHT_PAREN $@9 LEFT_BRACE switch_statement_list RIGHT_BRACE */
+#line 3856 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = parseContext.addSwitch((yyvsp[-7].lex).loc, (yyvsp[-5].interm.intermTypedNode), (yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0);
delete parseContext.switchSequenceStack.back();
@@ -10587,27 +11291,27 @@ yyreduce:
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
}
-#line 10591 "MachineIndependent/glslang_tab.cpp"
+#line 11295 "MachineIndependent/glslang_tab.cpp"
break;
- case 579: /* switch_statement_list: %empty */
-#line 3783 "MachineIndependent/glslang.y"
+ case 590: /* switch_statement_list: %empty */
+#line 3868 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = 0;
}
-#line 10599 "MachineIndependent/glslang_tab.cpp"
+#line 11303 "MachineIndependent/glslang_tab.cpp"
break;
- case 580: /* switch_statement_list: statement_list */
-#line 3786 "MachineIndependent/glslang.y"
+ case 591: /* switch_statement_list: statement_list */
+#line 3871 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10607 "MachineIndependent/glslang_tab.cpp"
+#line 11311 "MachineIndependent/glslang_tab.cpp"
break;
- case 581: /* case_label: CASE expression COLON */
-#line 3792 "MachineIndependent/glslang.y"
+ case 592: /* case_label: CASE expression COLON */
+#line 3877 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = 0;
if (parseContext.switchLevel.size() == 0)
@@ -10620,11 +11324,11 @@ yyreduce:
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc);
}
}
-#line 10624 "MachineIndependent/glslang_tab.cpp"
+#line 11328 "MachineIndependent/glslang_tab.cpp"
break;
- case 582: /* case_label: DEFAULT COLON */
-#line 3804 "MachineIndependent/glslang.y"
+ case 593: /* case_label: DEFAULT COLON */
+#line 3889 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = 0;
if (parseContext.switchLevel.size() == 0)
@@ -10634,28 +11338,29 @@ yyreduce:
else
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc);
}
-#line 10638 "MachineIndependent/glslang_tab.cpp"
+#line 11342 "MachineIndependent/glslang_tab.cpp"
break;
- case 583: /* iteration_statement: iteration_statement_nonattributed */
-#line 3816 "MachineIndependent/glslang.y"
+ case 594: /* iteration_statement: iteration_statement_nonattributed */
+#line 3901 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10646 "MachineIndependent/glslang_tab.cpp"
+#line 11350 "MachineIndependent/glslang_tab.cpp"
break;
- case 584: /* iteration_statement: attribute iteration_statement_nonattributed */
-#line 3820 "MachineIndependent/glslang.y"
+ case 595: /* iteration_statement: attribute iteration_statement_nonattributed */
+#line 3905 "MachineIndependent/glslang.y"
{
+ parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
parseContext.handleLoopAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode));
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10655 "MachineIndependent/glslang_tab.cpp"
+#line 11360 "MachineIndependent/glslang_tab.cpp"
break;
- case 585: /* $@10: %empty */
-#line 3827 "MachineIndependent/glslang.y"
+ case 596: /* $@10: %empty */
+#line 3913 "MachineIndependent/glslang.y"
{
if (! parseContext.limits.whileLoops)
parseContext.error((yyvsp[-1].lex).loc, "while loops not available", "limitation", "");
@@ -10664,11 +11369,11 @@ yyreduce:
++parseContext.statementNestingLevel;
++parseContext.controlFlowNestingLevel;
}
-#line 10668 "MachineIndependent/glslang_tab.cpp"
+#line 11373 "MachineIndependent/glslang_tab.cpp"
break;
- case 586: /* iteration_statement_nonattributed: WHILE LEFT_PAREN $@10 condition RIGHT_PAREN statement_no_new_scope */
-#line 3835 "MachineIndependent/glslang.y"
+ case 597: /* iteration_statement_nonattributed: WHILE LEFT_PAREN $@10 condition RIGHT_PAREN statement_no_new_scope */
+#line 3921 "MachineIndependent/glslang.y"
{
parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
(yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, true, (yyvsp[-5].lex).loc);
@@ -10676,21 +11381,21 @@ yyreduce:
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
}
-#line 10680 "MachineIndependent/glslang_tab.cpp"
+#line 11385 "MachineIndependent/glslang_tab.cpp"
break;
- case 587: /* $@11: %empty */
-#line 3842 "MachineIndependent/glslang.y"
+ case 598: /* $@11: %empty */
+#line 3928 "MachineIndependent/glslang.y"
{
++parseContext.loopNestingLevel;
++parseContext.statementNestingLevel;
++parseContext.controlFlowNestingLevel;
}
-#line 10690 "MachineIndependent/glslang_tab.cpp"
+#line 11395 "MachineIndependent/glslang_tab.cpp"
break;
- case 588: /* iteration_statement_nonattributed: DO $@11 statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON */
-#line 3847 "MachineIndependent/glslang.y"
+ case 599: /* iteration_statement_nonattributed: DO $@11 statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON */
+#line 3933 "MachineIndependent/glslang.y"
{
if (! parseContext.limits.whileLoops)
parseContext.error((yyvsp[-7].lex).loc, "do-while loops not available", "limitation", "");
@@ -10702,22 +11407,22 @@ yyreduce:
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
}
-#line 10706 "MachineIndependent/glslang_tab.cpp"
+#line 11411 "MachineIndependent/glslang_tab.cpp"
break;
- case 589: /* $@12: %empty */
-#line 3858 "MachineIndependent/glslang.y"
+ case 600: /* $@12: %empty */
+#line 3944 "MachineIndependent/glslang.y"
{
parseContext.symbolTable.push();
++parseContext.loopNestingLevel;
++parseContext.statementNestingLevel;
++parseContext.controlFlowNestingLevel;
}
-#line 10717 "MachineIndependent/glslang_tab.cpp"
+#line 11422 "MachineIndependent/glslang_tab.cpp"
break;
- case 590: /* iteration_statement_nonattributed: FOR LEFT_PAREN $@12 for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope */
-#line 3864 "MachineIndependent/glslang.y"
+ case 601: /* iteration_statement_nonattributed: FOR LEFT_PAREN $@12 for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope */
+#line 3950 "MachineIndependent/glslang.y"
{
parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]);
(yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[-3].interm.intermNode), (yyvsp[-5].lex).loc);
@@ -10730,81 +11435,81 @@ yyreduce:
--parseContext.statementNestingLevel;
--parseContext.controlFlowNestingLevel;
}
-#line 10734 "MachineIndependent/glslang_tab.cpp"
+#line 11439 "MachineIndependent/glslang_tab.cpp"
break;
- case 591: /* for_init_statement: expression_statement */
-#line 3879 "MachineIndependent/glslang.y"
+ case 602: /* for_init_statement: expression_statement */
+#line 3965 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10742 "MachineIndependent/glslang_tab.cpp"
+#line 11447 "MachineIndependent/glslang_tab.cpp"
break;
- case 592: /* for_init_statement: declaration_statement */
-#line 3882 "MachineIndependent/glslang.y"
+ case 603: /* for_init_statement: declaration_statement */
+#line 3968 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10750 "MachineIndependent/glslang_tab.cpp"
+#line 11455 "MachineIndependent/glslang_tab.cpp"
break;
- case 593: /* conditionopt: condition */
-#line 3888 "MachineIndependent/glslang.y"
+ case 604: /* conditionopt: condition */
+#line 3974 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode);
}
-#line 10758 "MachineIndependent/glslang_tab.cpp"
+#line 11463 "MachineIndependent/glslang_tab.cpp"
break;
- case 594: /* conditionopt: %empty */
-#line 3891 "MachineIndependent/glslang.y"
+ case 605: /* conditionopt: %empty */
+#line 3977 "MachineIndependent/glslang.y"
{
(yyval.interm.intermTypedNode) = 0;
}
-#line 10766 "MachineIndependent/glslang_tab.cpp"
+#line 11471 "MachineIndependent/glslang_tab.cpp"
break;
- case 595: /* for_rest_statement: conditionopt SEMICOLON */
-#line 3897 "MachineIndependent/glslang.y"
+ case 606: /* for_rest_statement: conditionopt SEMICOLON */
+#line 3983 "MachineIndependent/glslang.y"
{
(yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode);
(yyval.interm.nodePair).node2 = 0;
}
-#line 10775 "MachineIndependent/glslang_tab.cpp"
+#line 11480 "MachineIndependent/glslang_tab.cpp"
break;
- case 596: /* for_rest_statement: conditionopt SEMICOLON expression */
-#line 3901 "MachineIndependent/glslang.y"
+ case 607: /* for_rest_statement: conditionopt SEMICOLON expression */
+#line 3987 "MachineIndependent/glslang.y"
{
(yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode);
(yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode);
}
-#line 10784 "MachineIndependent/glslang_tab.cpp"
+#line 11489 "MachineIndependent/glslang_tab.cpp"
break;
- case 597: /* jump_statement: CONTINUE SEMICOLON */
-#line 3908 "MachineIndependent/glslang.y"
+ case 608: /* jump_statement: CONTINUE SEMICOLON */
+#line 3994 "MachineIndependent/glslang.y"
{
if (parseContext.loopNestingLevel <= 0)
parseContext.error((yyvsp[-1].lex).loc, "continue statement only allowed in loops", "", "");
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpContinue, (yyvsp[-1].lex).loc);
}
-#line 10794 "MachineIndependent/glslang_tab.cpp"
+#line 11499 "MachineIndependent/glslang_tab.cpp"
break;
- case 598: /* jump_statement: BREAK SEMICOLON */
-#line 3913 "MachineIndependent/glslang.y"
+ case 609: /* jump_statement: BREAK SEMICOLON */
+#line 3999 "MachineIndependent/glslang.y"
{
if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0)
parseContext.error((yyvsp[-1].lex).loc, "break statement only allowed in switch and loops", "", "");
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpBreak, (yyvsp[-1].lex).loc);
}
-#line 10804 "MachineIndependent/glslang_tab.cpp"
+#line 11509 "MachineIndependent/glslang_tab.cpp"
break;
- case 599: /* jump_statement: RETURN SEMICOLON */
-#line 3918 "MachineIndependent/glslang.y"
+ case 610: /* jump_statement: RETURN SEMICOLON */
+#line 4004 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].lex).loc);
if (parseContext.currentFunctionType->getBasicType() != EbtVoid)
@@ -10812,101 +11517,101 @@ yyreduce:
if (parseContext.inMain)
parseContext.postEntryPointReturn = true;
}
-#line 10816 "MachineIndependent/glslang_tab.cpp"
+#line 11521 "MachineIndependent/glslang_tab.cpp"
break;
- case 600: /* jump_statement: RETURN expression SEMICOLON */
-#line 3925 "MachineIndependent/glslang.y"
+ case 611: /* jump_statement: RETURN expression SEMICOLON */
+#line 4011 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[-2].lex).loc, (yyvsp[-1].interm.intermTypedNode));
}
-#line 10824 "MachineIndependent/glslang_tab.cpp"
+#line 11529 "MachineIndependent/glslang_tab.cpp"
break;
- case 601: /* jump_statement: DISCARD SEMICOLON */
-#line 3928 "MachineIndependent/glslang.y"
+ case 612: /* jump_statement: DISCARD SEMICOLON */
+#line 4014 "MachineIndependent/glslang.y"
{
parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard");
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc);
}
-#line 10833 "MachineIndependent/glslang_tab.cpp"
+#line 11538 "MachineIndependent/glslang_tab.cpp"
break;
- case 602: /* jump_statement: TERMINATE_INVOCATION SEMICOLON */
-#line 3932 "MachineIndependent/glslang.y"
+ case 613: /* jump_statement: TERMINATE_INVOCATION SEMICOLON */
+#line 4018 "MachineIndependent/glslang.y"
{
parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "terminateInvocation");
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateInvocation, (yyvsp[-1].lex).loc);
}
-#line 10842 "MachineIndependent/glslang_tab.cpp"
+#line 11547 "MachineIndependent/glslang_tab.cpp"
break;
- case 603: /* jump_statement: TERMINATE_RAY SEMICOLON */
-#line 3937 "MachineIndependent/glslang.y"
+ case 614: /* jump_statement: TERMINATE_RAY SEMICOLON */
+#line 4023 "MachineIndependent/glslang.y"
{
parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "terminateRayEXT");
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateRayKHR, (yyvsp[-1].lex).loc);
}
-#line 10851 "MachineIndependent/glslang_tab.cpp"
+#line 11556 "MachineIndependent/glslang_tab.cpp"
break;
- case 604: /* jump_statement: IGNORE_INTERSECTION SEMICOLON */
-#line 3941 "MachineIndependent/glslang.y"
+ case 615: /* jump_statement: IGNORE_INTERSECTION SEMICOLON */
+#line 4027 "MachineIndependent/glslang.y"
{
parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "ignoreIntersectionEXT");
(yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, (yyvsp[-1].lex).loc);
}
-#line 10860 "MachineIndependent/glslang_tab.cpp"
+#line 11565 "MachineIndependent/glslang_tab.cpp"
break;
- case 605: /* translation_unit: external_declaration */
-#line 3951 "MachineIndependent/glslang.y"
+ case 616: /* translation_unit: external_declaration */
+#line 4037 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
parseContext.intermediate.setTreeRoot((yyval.interm.intermNode));
}
-#line 10869 "MachineIndependent/glslang_tab.cpp"
+#line 11574 "MachineIndependent/glslang_tab.cpp"
break;
- case 606: /* translation_unit: translation_unit external_declaration */
-#line 3955 "MachineIndependent/glslang.y"
+ case 617: /* translation_unit: translation_unit external_declaration */
+#line 4041 "MachineIndependent/glslang.y"
{
if ((yyvsp[0].interm.intermNode) != nullptr) {
(yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode));
parseContext.intermediate.setTreeRoot((yyval.interm.intermNode));
}
}
-#line 10880 "MachineIndependent/glslang_tab.cpp"
+#line 11585 "MachineIndependent/glslang_tab.cpp"
break;
- case 607: /* external_declaration: function_definition */
-#line 3964 "MachineIndependent/glslang.y"
+ case 618: /* external_declaration: function_definition */
+#line 4050 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10888 "MachineIndependent/glslang_tab.cpp"
+#line 11593 "MachineIndependent/glslang_tab.cpp"
break;
- case 608: /* external_declaration: declaration */
-#line 3967 "MachineIndependent/glslang.y"
+ case 619: /* external_declaration: declaration */
+#line 4053 "MachineIndependent/glslang.y"
{
(yyval.interm.intermNode) = (yyvsp[0].interm.intermNode);
}
-#line 10896 "MachineIndependent/glslang_tab.cpp"
+#line 11601 "MachineIndependent/glslang_tab.cpp"
break;
- case 609: /* external_declaration: SEMICOLON */
-#line 3971 "MachineIndependent/glslang.y"
+ case 620: /* external_declaration: SEMICOLON */
+#line 4057 "MachineIndependent/glslang.y"
{
parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "extraneous semicolon");
parseContext.profileRequires((yyvsp[0].lex).loc, ~EEsProfile, 460, nullptr, "extraneous semicolon");
(yyval.interm.intermNode) = nullptr;
}
-#line 10906 "MachineIndependent/glslang_tab.cpp"
+#line 11611 "MachineIndependent/glslang_tab.cpp"
break;
- case 610: /* $@13: %empty */
-#line 3980 "MachineIndependent/glslang.y"
+ case 621: /* $@13: %empty */
+#line 4066 "MachineIndependent/glslang.y"
{
(yyvsp[0].interm).function = parseContext.handleFunctionDeclarator((yyvsp[0].interm).loc, *(yyvsp[0].interm).function, false /* not prototype */);
(yyvsp[0].interm).intermNode = parseContext.handleFunctionDefinition((yyvsp[0].interm).loc, *(yyvsp[0].interm).function);
@@ -10919,11 +11624,11 @@ yyreduce:
++parseContext.statementNestingLevel;
}
}
-#line 10923 "MachineIndependent/glslang_tab.cpp"
+#line 11628 "MachineIndependent/glslang_tab.cpp"
break;
- case 611: /* function_definition: function_prototype $@13 compound_statement_no_new_scope */
-#line 3992 "MachineIndependent/glslang.y"
+ case 622: /* function_definition: function_prototype $@13 compound_statement_no_new_scope */
+#line 4078 "MachineIndependent/glslang.y"
{
// May be best done as post process phase on intermediate code
if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue)
@@ -10950,52 +11655,563 @@ yyreduce:
--parseContext.statementNestingLevel;
}
}
-#line 10954 "MachineIndependent/glslang_tab.cpp"
+#line 11659 "MachineIndependent/glslang_tab.cpp"
break;
- case 612: /* attribute: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET */
-#line 4022 "MachineIndependent/glslang.y"
+ case 623: /* attribute: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET */
+#line 4108 "MachineIndependent/glslang.y"
{
(yyval.interm.attributes) = (yyvsp[-2].interm.attributes);
- parseContext.requireExtensions((yyvsp[-4].lex).loc, 1, &E_GL_EXT_control_flow_attributes, "attribute");
}
-#line 10963 "MachineIndependent/glslang_tab.cpp"
+#line 11667 "MachineIndependent/glslang_tab.cpp"
break;
- case 613: /* attribute_list: single_attribute */
-#line 4028 "MachineIndependent/glslang.y"
+ case 624: /* attribute_list: single_attribute */
+#line 4113 "MachineIndependent/glslang.y"
{
(yyval.interm.attributes) = (yyvsp[0].interm.attributes);
}
-#line 10971 "MachineIndependent/glslang_tab.cpp"
+#line 11675 "MachineIndependent/glslang_tab.cpp"
break;
- case 614: /* attribute_list: attribute_list COMMA single_attribute */
-#line 4031 "MachineIndependent/glslang.y"
+ case 625: /* attribute_list: attribute_list COMMA single_attribute */
+#line 4116 "MachineIndependent/glslang.y"
{
(yyval.interm.attributes) = parseContext.mergeAttributes((yyvsp[-2].interm.attributes), (yyvsp[0].interm.attributes));
}
-#line 10979 "MachineIndependent/glslang_tab.cpp"
+#line 11683 "MachineIndependent/glslang_tab.cpp"
break;
- case 615: /* single_attribute: IDENTIFIER */
-#line 4036 "MachineIndependent/glslang.y"
+ case 626: /* single_attribute: IDENTIFIER */
+#line 4121 "MachineIndependent/glslang.y"
{
(yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[0].lex).string);
}
-#line 10987 "MachineIndependent/glslang_tab.cpp"
+#line 11691 "MachineIndependent/glslang_tab.cpp"
break;
- case 616: /* single_attribute: IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN */
-#line 4039 "MachineIndependent/glslang.y"
+ case 627: /* single_attribute: IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN */
+#line 4124 "MachineIndependent/glslang.y"
{
(yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[-3].lex).string, (yyvsp[-1].interm.intermTypedNode));
}
-#line 10995 "MachineIndependent/glslang_tab.cpp"
+#line 11699 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 628: /* spirv_requirements_list: spirv_requirements_parameter */
+#line 4131 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.spirvReq) = (yyvsp[0].interm.spirvReq);
+ }
+#line 11707 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 629: /* spirv_requirements_list: spirv_requirements_list COMMA spirv_requirements_parameter */
+#line 4134 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.spirvReq) = parseContext.mergeSpirvRequirements((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvReq), (yyvsp[0].interm.spirvReq));
+ }
+#line 11715 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 630: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET */
+#line 4139 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, (yyvsp[-1].interm.intermNode)->getAsAggregate(), nullptr);
+ }
+#line 11723 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 631: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET */
+#line 4142 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, nullptr, (yyvsp[-1].interm.intermNode)->getAsAggregate());
+ }
+#line 11731 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 632: /* spirv_extension_list: STRING_LITERAL */
+#line 4147 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true));
+ }
+#line 11739 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 633: /* spirv_extension_list: spirv_extension_list COMMA STRING_LITERAL */
+#line 4150 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true));
+ }
+#line 11747 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 634: /* spirv_capability_list: INTCONSTANT */
+#line 4155 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true));
+ }
+#line 11755 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 635: /* spirv_capability_list: spirv_capability_list COMMA INTCONSTANT */
+#line 4158 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true));
+ }
+#line 11763 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 636: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN */
+#line 4163 "MachineIndependent/glslang.y"
+ {
+ parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i);
+ (yyval.interm.intermNode) = 0;
+ }
+#line 11772 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 637: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */
+#line 4167 "MachineIndependent/glslang.y"
+ {
+ parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq));
+ parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i);
+ (yyval.interm.intermNode) = 0;
+ }
+#line 11782 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 638: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */
+#line 4172 "MachineIndependent/glslang.y"
+ {
+ parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate());
+ (yyval.interm.intermNode) = 0;
+ }
+#line 11791 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 639: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */
+#line 4176 "MachineIndependent/glslang.y"
+ {
+ parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq));
+ parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate());
+ (yyval.interm.intermNode) = 0;
+ }
+#line 11801 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 640: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */
+#line 4181 "MachineIndependent/glslang.y"
+ {
+ parseContext.intermediate.insertSpirvExecutionModeId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate());
+ (yyval.interm.intermNode) = 0;
+ }
+#line 11810 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 641: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */
+#line 4185 "MachineIndependent/glslang.y"
+ {
+ parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq));
+ parseContext.intermediate.insertSpirvExecutionModeId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate());
+ (yyval.interm.intermNode) = 0;
+ }
+#line 11820 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 642: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter */
+#line 4192 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode));
+ }
+#line 11828 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 643: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter */
+#line 4195 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode));
+ }
+#line 11836 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 644: /* spirv_execution_mode_parameter: FLOATCONSTANT */
+#line 4200 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true);
+ }
+#line 11844 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 645: /* spirv_execution_mode_parameter: INTCONSTANT */
+#line 4203 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true);
+ }
+#line 11852 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 646: /* spirv_execution_mode_parameter: UINTCONSTANT */
+#line 4206 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true);
+ }
+#line 11860 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 647: /* spirv_execution_mode_parameter: BOOLCONSTANT */
+#line 4209 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true);
+ }
+#line 11868 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 648: /* spirv_execution_mode_parameter: STRING_LITERAL */
+#line 4212 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true);
+ }
+#line 11876 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 649: /* spirv_execution_mode_id_parameter_list: constant_expression */
+#line 4217 "MachineIndependent/glslang.y"
+ {
+ if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtString)
+ parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), "");
+ (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermTypedNode));
+ }
+#line 11890 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 650: /* spirv_execution_mode_id_parameter_list: spirv_execution_mode_id_parameter_list COMMA constant_expression */
+#line 4226 "MachineIndependent/glslang.y"
+ {
+ if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtString)
+ parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), "");
+ (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermTypedNode));
+ }
+#line 11904 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 651: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN */
+#line 4237 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-3].lex).loc);
+ (yyval.interm.type).qualifier.storage = EvqSpirvStorageClass;
+ (yyval.interm.type).qualifier.spirvStorageClass = (yyvsp[-1].lex).i;
+ }
+#line 11914 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 652: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */
+#line 4242 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-5].lex).loc);
+ parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq));
+ (yyval.interm.type).qualifier.storage = EvqSpirvStorageClass;
+ (yyval.interm.type).qualifier.spirvStorageClass = (yyvsp[-1].lex).i;
+ }
+#line 11925 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 653: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN */
+#line 4250 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-3].lex).loc);
+ (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-1].lex).i);
+ }
+#line 11934 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 654: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */
+#line 4254 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-5].lex).loc);
+ parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq));
+ (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-1].lex).i);
+ }
+#line 11944 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 655: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */
+#line 4259 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-5].lex).loc);
+ (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate());
+ }
+#line 11953 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 656: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */
+#line 4263 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-7].lex).loc);
+ parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq));
+ (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate());
+ }
+#line 11963 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 657: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */
+#line 4268 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-5].lex).loc);
+ (yyval.interm.type).qualifier.setSpirvDecorateId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate());
+ }
+#line 11972 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 658: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */
+#line 4272 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-7].lex).loc);
+ parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq));
+ (yyval.interm.type).qualifier.setSpirvDecorateId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate());
+ }
+#line 11982 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 659: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */
+#line 4277 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-5].lex).loc);
+ (yyval.interm.type).qualifier.setSpirvDecorateString((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate());
+ }
+#line 11991 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 660: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */
+#line 4281 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-7].lex).loc);
+ parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq));
+ (yyval.interm.type).qualifier.setSpirvDecorateString((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate());
+ }
+#line 12001 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 661: /* spirv_decorate_parameter_list: spirv_decorate_parameter */
+#line 4288 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode));
+ }
+#line 12009 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 662: /* spirv_decorate_parameter_list: spirv_decorate_parameter_list COMMA spirv_decorate_parameter */
+#line 4291 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode));
+ }
+#line 12017 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 663: /* spirv_decorate_parameter: FLOATCONSTANT */
+#line 4296 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true);
+ }
+#line 12025 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 664: /* spirv_decorate_parameter: INTCONSTANT */
+#line 4299 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true);
+ }
+#line 12033 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 665: /* spirv_decorate_parameter: UINTCONSTANT */
+#line 4302 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true);
+ }
+#line 12041 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 666: /* spirv_decorate_parameter: BOOLCONSTANT */
+#line 4305 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true);
+ }
+#line 12049 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 667: /* spirv_decorate_id_parameter_list: constant_expression */
+#line 4310 "MachineIndependent/glslang.y"
+ {
+ if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool)
+ parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), "");
+ (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermTypedNode));
+ }
+#line 12062 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 668: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter_list COMMA constant_expression */
+#line 4318 "MachineIndependent/glslang.y"
+ {
+ if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint &&
+ (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool)
+ parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), "");
+ (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermTypedNode));
+ }
+#line 12075 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 669: /* spirv_decorate_string_parameter_list: STRING_LITERAL */
+#line 4328 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(
+ parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true));
+ }
+#line 12084 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 670: /* spirv_decorate_string_parameter_list: spirv_decorate_string_parameter_list COMMA STRING_LITERAL */
+#line 4332 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true));
+ }
+#line 12092 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 671: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */
+#line 4337 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-5].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).setSpirvType(*(yyvsp[-3].interm.spirvInst), (yyvsp[-1].interm.spirvTypeParams));
+ }
+#line 12101 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 672: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */
+#line 4341 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-7].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq));
+ (yyval.interm.type).setSpirvType(*(yyvsp[-3].interm.spirvInst), (yyvsp[-1].interm.spirvTypeParams));
+ }
+#line 12111 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 673: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */
+#line 4346 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-3].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ (yyval.interm.type).setSpirvType(*(yyvsp[-1].interm.spirvInst));
+ }
+#line 12120 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 674: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */
+#line 4350 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.type).init((yyvsp[-5].lex).loc, parseContext.symbolTable.atGlobalLevel());
+ parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq));
+ (yyval.interm.type).setSpirvType(*(yyvsp[-1].interm.spirvInst));
+ }
+#line 12130 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 675: /* spirv_type_parameter_list: spirv_type_parameter */
+#line 4357 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.spirvTypeParams) = (yyvsp[0].interm.spirvTypeParams);
+ }
+#line 12138 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 676: /* spirv_type_parameter_list: spirv_type_parameter_list COMMA spirv_type_parameter */
+#line 4360 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.spirvTypeParams) = parseContext.mergeSpirvTypeParameters((yyvsp[-2].interm.spirvTypeParams), (yyvsp[0].interm.spirvTypeParams));
+ }
+#line 12146 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 677: /* spirv_type_parameter: constant_expression */
+#line 4365 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)->getAsConstantUnion());
+ }
+#line 12154 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 678: /* spirv_type_parameter: type_specifier */
+#line 4368 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.type));
+ }
+#line 12162 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 679: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */
+#line 4373 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst);
+ }
+#line 12170 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 680: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */
+#line 4376 "MachineIndependent/glslang.y"
+ {
+ parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq));
+ (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst);
+ }
+#line 12179 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 681: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_id */
+#line 4382 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.spirvInst) = (yyvsp[0].interm.spirvInst);
+ }
+#line 12187 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 682: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id */
+#line 4385 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.spirvInst) = parseContext.mergeSpirvInstruction((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvInst), (yyvsp[0].interm.spirvInst));
+ }
+#line 12195 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 683: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL STRING_LITERAL */
+#line 4390 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, *(yyvsp[0].lex).string);
+ }
+#line 12203 "MachineIndependent/glslang_tab.cpp"
+ break;
+
+ case 684: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL INTCONSTANT */
+#line 4393 "MachineIndependent/glslang.y"
+ {
+ (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[0].lex).i);
+ }
+#line 12211 "MachineIndependent/glslang_tab.cpp"
break;
-#line 10999 "MachineIndependent/glslang_tab.cpp"
+#line 12215 "MachineIndependent/glslang_tab.cpp"
default: break;
}
@@ -11220,5 +12436,5 @@ yyreturn:
return yyresult;
}
-#line 4044 "MachineIndependent/glslang.y"
+#line 4398 "MachineIndependent/glslang.y"
diff --git a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
index d6bc00d9e8..596a10e6d9 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
@@ -368,134 +368,144 @@ extern int yydebug;
USUBPASSINPUTMS = 569, /* USUBPASSINPUTMS */
F16SUBPASSINPUT = 570, /* F16SUBPASSINPUT */
F16SUBPASSINPUTMS = 571, /* F16SUBPASSINPUTMS */
- LEFT_OP = 572, /* LEFT_OP */
- RIGHT_OP = 573, /* RIGHT_OP */
- INC_OP = 574, /* INC_OP */
- DEC_OP = 575, /* DEC_OP */
- LE_OP = 576, /* LE_OP */
- GE_OP = 577, /* GE_OP */
- EQ_OP = 578, /* EQ_OP */
- NE_OP = 579, /* NE_OP */
- AND_OP = 580, /* AND_OP */
- OR_OP = 581, /* OR_OP */
- XOR_OP = 582, /* XOR_OP */
- MUL_ASSIGN = 583, /* MUL_ASSIGN */
- DIV_ASSIGN = 584, /* DIV_ASSIGN */
- ADD_ASSIGN = 585, /* ADD_ASSIGN */
- MOD_ASSIGN = 586, /* MOD_ASSIGN */
- LEFT_ASSIGN = 587, /* LEFT_ASSIGN */
- RIGHT_ASSIGN = 588, /* RIGHT_ASSIGN */
- AND_ASSIGN = 589, /* AND_ASSIGN */
- XOR_ASSIGN = 590, /* XOR_ASSIGN */
- OR_ASSIGN = 591, /* OR_ASSIGN */
- SUB_ASSIGN = 592, /* SUB_ASSIGN */
- STRING_LITERAL = 593, /* STRING_LITERAL */
- LEFT_PAREN = 594, /* LEFT_PAREN */
- RIGHT_PAREN = 595, /* RIGHT_PAREN */
- LEFT_BRACKET = 596, /* LEFT_BRACKET */
- RIGHT_BRACKET = 597, /* RIGHT_BRACKET */
- LEFT_BRACE = 598, /* LEFT_BRACE */
- RIGHT_BRACE = 599, /* RIGHT_BRACE */
- DOT = 600, /* DOT */
- COMMA = 601, /* COMMA */
- COLON = 602, /* COLON */
- EQUAL = 603, /* EQUAL */
- SEMICOLON = 604, /* SEMICOLON */
- BANG = 605, /* BANG */
- DASH = 606, /* DASH */
- TILDE = 607, /* TILDE */
- PLUS = 608, /* PLUS */
- STAR = 609, /* STAR */
- SLASH = 610, /* SLASH */
- PERCENT = 611, /* PERCENT */
- LEFT_ANGLE = 612, /* LEFT_ANGLE */
- RIGHT_ANGLE = 613, /* RIGHT_ANGLE */
- VERTICAL_BAR = 614, /* VERTICAL_BAR */
- CARET = 615, /* CARET */
- AMPERSAND = 616, /* AMPERSAND */
- QUESTION = 617, /* QUESTION */
- INVARIANT = 618, /* INVARIANT */
- HIGH_PRECISION = 619, /* HIGH_PRECISION */
- MEDIUM_PRECISION = 620, /* MEDIUM_PRECISION */
- LOW_PRECISION = 621, /* LOW_PRECISION */
- PRECISION = 622, /* PRECISION */
- PACKED = 623, /* PACKED */
- RESOURCE = 624, /* RESOURCE */
- SUPERP = 625, /* SUPERP */
- FLOATCONSTANT = 626, /* FLOATCONSTANT */
- INTCONSTANT = 627, /* INTCONSTANT */
- UINTCONSTANT = 628, /* UINTCONSTANT */
- BOOLCONSTANT = 629, /* BOOLCONSTANT */
- IDENTIFIER = 630, /* IDENTIFIER */
- TYPE_NAME = 631, /* TYPE_NAME */
- CENTROID = 632, /* CENTROID */
- IN = 633, /* IN */
- OUT = 634, /* OUT */
- INOUT = 635, /* INOUT */
- STRUCT = 636, /* STRUCT */
- VOID = 637, /* VOID */
- WHILE = 638, /* WHILE */
- BREAK = 639, /* BREAK */
- CONTINUE = 640, /* CONTINUE */
- DO = 641, /* DO */
- ELSE = 642, /* ELSE */
- FOR = 643, /* FOR */
- IF = 644, /* IF */
- DISCARD = 645, /* DISCARD */
- RETURN = 646, /* RETURN */
- SWITCH = 647, /* SWITCH */
- CASE = 648, /* CASE */
- DEFAULT = 649, /* DEFAULT */
- TERMINATE_INVOCATION = 650, /* TERMINATE_INVOCATION */
- TERMINATE_RAY = 651, /* TERMINATE_RAY */
- IGNORE_INTERSECTION = 652, /* IGNORE_INTERSECTION */
- UNIFORM = 653, /* UNIFORM */
- SHARED = 654, /* SHARED */
- BUFFER = 655, /* BUFFER */
- FLAT = 656, /* FLAT */
- SMOOTH = 657, /* SMOOTH */
- LAYOUT = 658, /* LAYOUT */
- DOUBLECONSTANT = 659, /* DOUBLECONSTANT */
- INT16CONSTANT = 660, /* INT16CONSTANT */
- UINT16CONSTANT = 661, /* UINT16CONSTANT */
- FLOAT16CONSTANT = 662, /* FLOAT16CONSTANT */
- INT32CONSTANT = 663, /* INT32CONSTANT */
- UINT32CONSTANT = 664, /* UINT32CONSTANT */
- INT64CONSTANT = 665, /* INT64CONSTANT */
- UINT64CONSTANT = 666, /* UINT64CONSTANT */
- SUBROUTINE = 667, /* SUBROUTINE */
- DEMOTE = 668, /* DEMOTE */
- PAYLOADNV = 669, /* PAYLOADNV */
- PAYLOADINNV = 670, /* PAYLOADINNV */
- HITATTRNV = 671, /* HITATTRNV */
- CALLDATANV = 672, /* CALLDATANV */
- CALLDATAINNV = 673, /* CALLDATAINNV */
- PAYLOADEXT = 674, /* PAYLOADEXT */
- PAYLOADINEXT = 675, /* PAYLOADINEXT */
- HITATTREXT = 676, /* HITATTREXT */
- CALLDATAEXT = 677, /* CALLDATAEXT */
- CALLDATAINEXT = 678, /* CALLDATAINEXT */
- PATCH = 679, /* PATCH */
- SAMPLE = 680, /* SAMPLE */
- NONUNIFORM = 681, /* NONUNIFORM */
- COHERENT = 682, /* COHERENT */
- VOLATILE = 683, /* VOLATILE */
- RESTRICT = 684, /* RESTRICT */
- READONLY = 685, /* READONLY */
- WRITEONLY = 686, /* WRITEONLY */
- DEVICECOHERENT = 687, /* DEVICECOHERENT */
- QUEUEFAMILYCOHERENT = 688, /* QUEUEFAMILYCOHERENT */
- WORKGROUPCOHERENT = 689, /* WORKGROUPCOHERENT */
- SUBGROUPCOHERENT = 690, /* SUBGROUPCOHERENT */
- NONPRIVATE = 691, /* NONPRIVATE */
- SHADERCALLCOHERENT = 692, /* SHADERCALLCOHERENT */
- NOPERSPECTIVE = 693, /* NOPERSPECTIVE */
- EXPLICITINTERPAMD = 694, /* EXPLICITINTERPAMD */
- PERVERTEXNV = 695, /* PERVERTEXNV */
- PERPRIMITIVENV = 696, /* PERPRIMITIVENV */
- PERVIEWNV = 697, /* PERVIEWNV */
- PERTASKNV = 698, /* PERTASKNV */
- PRECISE = 699 /* PRECISE */
+ SPIRV_INSTRUCTION = 572, /* SPIRV_INSTRUCTION */
+ SPIRV_EXECUTION_MODE = 573, /* SPIRV_EXECUTION_MODE */
+ SPIRV_EXECUTION_MODE_ID = 574, /* SPIRV_EXECUTION_MODE_ID */
+ SPIRV_DECORATE = 575, /* SPIRV_DECORATE */
+ SPIRV_DECORATE_ID = 576, /* SPIRV_DECORATE_ID */
+ SPIRV_DECORATE_STRING = 577, /* SPIRV_DECORATE_STRING */
+ SPIRV_TYPE = 578, /* SPIRV_TYPE */
+ SPIRV_STORAGE_CLASS = 579, /* SPIRV_STORAGE_CLASS */
+ SPIRV_BY_REFERENCE = 580, /* SPIRV_BY_REFERENCE */
+ SPIRV_LITERAL = 581, /* SPIRV_LITERAL */
+ LEFT_OP = 582, /* LEFT_OP */
+ RIGHT_OP = 583, /* RIGHT_OP */
+ INC_OP = 584, /* INC_OP */
+ DEC_OP = 585, /* DEC_OP */
+ LE_OP = 586, /* LE_OP */
+ GE_OP = 587, /* GE_OP */
+ EQ_OP = 588, /* EQ_OP */
+ NE_OP = 589, /* NE_OP */
+ AND_OP = 590, /* AND_OP */
+ OR_OP = 591, /* OR_OP */
+ XOR_OP = 592, /* XOR_OP */
+ MUL_ASSIGN = 593, /* MUL_ASSIGN */
+ DIV_ASSIGN = 594, /* DIV_ASSIGN */
+ ADD_ASSIGN = 595, /* ADD_ASSIGN */
+ MOD_ASSIGN = 596, /* MOD_ASSIGN */
+ LEFT_ASSIGN = 597, /* LEFT_ASSIGN */
+ RIGHT_ASSIGN = 598, /* RIGHT_ASSIGN */
+ AND_ASSIGN = 599, /* AND_ASSIGN */
+ XOR_ASSIGN = 600, /* XOR_ASSIGN */
+ OR_ASSIGN = 601, /* OR_ASSIGN */
+ SUB_ASSIGN = 602, /* SUB_ASSIGN */
+ STRING_LITERAL = 603, /* STRING_LITERAL */
+ LEFT_PAREN = 604, /* LEFT_PAREN */
+ RIGHT_PAREN = 605, /* RIGHT_PAREN */
+ LEFT_BRACKET = 606, /* LEFT_BRACKET */
+ RIGHT_BRACKET = 607, /* RIGHT_BRACKET */
+ LEFT_BRACE = 608, /* LEFT_BRACE */
+ RIGHT_BRACE = 609, /* RIGHT_BRACE */
+ DOT = 610, /* DOT */
+ COMMA = 611, /* COMMA */
+ COLON = 612, /* COLON */
+ EQUAL = 613, /* EQUAL */
+ SEMICOLON = 614, /* SEMICOLON */
+ BANG = 615, /* BANG */
+ DASH = 616, /* DASH */
+ TILDE = 617, /* TILDE */
+ PLUS = 618, /* PLUS */
+ STAR = 619, /* STAR */
+ SLASH = 620, /* SLASH */
+ PERCENT = 621, /* PERCENT */
+ LEFT_ANGLE = 622, /* LEFT_ANGLE */
+ RIGHT_ANGLE = 623, /* RIGHT_ANGLE */
+ VERTICAL_BAR = 624, /* VERTICAL_BAR */
+ CARET = 625, /* CARET */
+ AMPERSAND = 626, /* AMPERSAND */
+ QUESTION = 627, /* QUESTION */
+ INVARIANT = 628, /* INVARIANT */
+ HIGH_PRECISION = 629, /* HIGH_PRECISION */
+ MEDIUM_PRECISION = 630, /* MEDIUM_PRECISION */
+ LOW_PRECISION = 631, /* LOW_PRECISION */
+ PRECISION = 632, /* PRECISION */
+ PACKED = 633, /* PACKED */
+ RESOURCE = 634, /* RESOURCE */
+ SUPERP = 635, /* SUPERP */
+ FLOATCONSTANT = 636, /* FLOATCONSTANT */
+ INTCONSTANT = 637, /* INTCONSTANT */
+ UINTCONSTANT = 638, /* UINTCONSTANT */
+ BOOLCONSTANT = 639, /* BOOLCONSTANT */
+ IDENTIFIER = 640, /* IDENTIFIER */
+ TYPE_NAME = 641, /* TYPE_NAME */
+ CENTROID = 642, /* CENTROID */
+ IN = 643, /* IN */
+ OUT = 644, /* OUT */
+ INOUT = 645, /* INOUT */
+ STRUCT = 646, /* STRUCT */
+ VOID = 647, /* VOID */
+ WHILE = 648, /* WHILE */
+ BREAK = 649, /* BREAK */
+ CONTINUE = 650, /* CONTINUE */
+ DO = 651, /* DO */
+ ELSE = 652, /* ELSE */
+ FOR = 653, /* FOR */
+ IF = 654, /* IF */
+ DISCARD = 655, /* DISCARD */
+ RETURN = 656, /* RETURN */
+ SWITCH = 657, /* SWITCH */
+ CASE = 658, /* CASE */
+ DEFAULT = 659, /* DEFAULT */
+ TERMINATE_INVOCATION = 660, /* TERMINATE_INVOCATION */
+ TERMINATE_RAY = 661, /* TERMINATE_RAY */
+ IGNORE_INTERSECTION = 662, /* IGNORE_INTERSECTION */
+ UNIFORM = 663, /* UNIFORM */
+ SHARED = 664, /* SHARED */
+ BUFFER = 665, /* BUFFER */
+ FLAT = 666, /* FLAT */
+ SMOOTH = 667, /* SMOOTH */
+ LAYOUT = 668, /* LAYOUT */
+ DOUBLECONSTANT = 669, /* DOUBLECONSTANT */
+ INT16CONSTANT = 670, /* INT16CONSTANT */
+ UINT16CONSTANT = 671, /* UINT16CONSTANT */
+ FLOAT16CONSTANT = 672, /* FLOAT16CONSTANT */
+ INT32CONSTANT = 673, /* INT32CONSTANT */
+ UINT32CONSTANT = 674, /* UINT32CONSTANT */
+ INT64CONSTANT = 675, /* INT64CONSTANT */
+ UINT64CONSTANT = 676, /* UINT64CONSTANT */
+ SUBROUTINE = 677, /* SUBROUTINE */
+ DEMOTE = 678, /* DEMOTE */
+ PAYLOADNV = 679, /* PAYLOADNV */
+ PAYLOADINNV = 680, /* PAYLOADINNV */
+ HITATTRNV = 681, /* HITATTRNV */
+ CALLDATANV = 682, /* CALLDATANV */
+ CALLDATAINNV = 683, /* CALLDATAINNV */
+ PAYLOADEXT = 684, /* PAYLOADEXT */
+ PAYLOADINEXT = 685, /* PAYLOADINEXT */
+ HITATTREXT = 686, /* HITATTREXT */
+ CALLDATAEXT = 687, /* CALLDATAEXT */
+ CALLDATAINEXT = 688, /* CALLDATAINEXT */
+ PATCH = 689, /* PATCH */
+ SAMPLE = 690, /* SAMPLE */
+ NONUNIFORM = 691, /* NONUNIFORM */
+ COHERENT = 692, /* COHERENT */
+ VOLATILE = 693, /* VOLATILE */
+ RESTRICT = 694, /* RESTRICT */
+ READONLY = 695, /* READONLY */
+ WRITEONLY = 696, /* WRITEONLY */
+ DEVICECOHERENT = 697, /* DEVICECOHERENT */
+ QUEUEFAMILYCOHERENT = 698, /* QUEUEFAMILYCOHERENT */
+ WORKGROUPCOHERENT = 699, /* WORKGROUPCOHERENT */
+ SUBGROUPCOHERENT = 700, /* SUBGROUPCOHERENT */
+ NONPRIVATE = 701, /* NONPRIVATE */
+ SHADERCALLCOHERENT = 702, /* SHADERCALLCOHERENT */
+ NOPERSPECTIVE = 703, /* NOPERSPECTIVE */
+ EXPLICITINTERPAMD = 704, /* EXPLICITINTERPAMD */
+ PERVERTEXNV = 705, /* PERVERTEXNV */
+ PERPRIMITIVENV = 706, /* PERPRIMITIVENV */
+ PERVIEWNV = 707, /* PERVIEWNV */
+ PERTASKNV = 708, /* PERTASKNV */
+ PRECISE = 709 /* PRECISE */
};
typedef enum yytokentype yytoken_kind_t;
#endif
@@ -527,6 +537,9 @@ union YYSTYPE
glslang::TIntermNodePair nodePair;
glslang::TIntermTyped* intermTypedNode;
glslang::TAttributes* attributes;
+ glslang::TSpirvRequirement* spirvReq;
+ glslang::TSpirvInstruction* spirvInst;
+ glslang::TSpirvTypeParameters* spirvTypeParams;
};
union {
glslang::TPublicType type;
@@ -540,7 +553,7 @@ union YYSTYPE
glslang::TArraySizes* typeParameters;
} interm;
-#line 544 "MachineIndependent/glslang_tab.cpp.h"
+#line 557 "MachineIndependent/glslang_tab.cpp.h"
};
typedef union YYSTYPE YYSTYPE;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp b/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp
index 5ce3e47280..a0fade16c0 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/intermOut.cpp
@@ -696,6 +696,10 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
case EOpConstructReference: out.debug << "Construct reference type"; break;
+#ifndef GLSLANG_WEB
+ case EOpSpirvInst: out.debug << "spirv_instruction"; break;
+#endif
+
default: out.debug.message(EPrefixError, "Bad unary op");
}
@@ -886,6 +890,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpTime: out.debug << "time"; break;
case EOpAtomicAdd: out.debug << "AtomicAdd"; break;
+ case EOpAtomicSubtract: out.debug << "AtomicSubtract"; break;
case EOpAtomicMin: out.debug << "AtomicMin"; break;
case EOpAtomicMax: out.debug << "AtomicMax"; break;
case EOpAtomicAnd: out.debug << "AtomicAnd"; break;
@@ -1084,6 +1089,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
case EOpTraceNV: out.debug << "traceNV"; break;
+ case EOpTraceRayMotionNV: out.debug << "traceRayMotionNV"; break;
case EOpTraceKHR: out.debug << "traceRayKHR"; break;
case EOpReportIntersection: out.debug << "reportIntersectionNV"; break;
case EOpIgnoreIntersectionNV: out.debug << "ignoreIntersectionNV"; break;
@@ -1125,6 +1131,10 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break;
case EOpDebugPrintf: out.debug << "Debug printf"; break;
+#ifndef GLSLANG_WEB
+ case EOpSpirvInst: out.debug << "spirv_instruction"; break;
+#endif
+
default: out.debug.message(EPrefixError, "Bad aggregation op");
}
@@ -1486,6 +1496,9 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
if (xfbMode)
infoSink.debug << "in xfb mode\n";
+ if (getSubgroupUniformControlFlow())
+ infoSink.debug << "subgroup_uniform_control_flow\n";
+
switch (language) {
case EShLangVertex:
break;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp b/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp
index c42e74fa5f..7e12864f36 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/iomapper.cpp
@@ -210,8 +210,8 @@ struct TResolverUniformAdaptor {
ent.newIndex = -1;
const bool isValid = resolver.validateBinding(stage, ent);
if (isValid) {
- resolver.resolveBinding(ent.stage, ent);
resolver.resolveSet(ent.stage, ent);
+ resolver.resolveBinding(ent.stage, ent);
resolver.resolveUniformLocation(ent.stage, ent);
if (ent.newBinding != -1) {
@@ -317,15 +317,13 @@ private:
};
// The class is used for reserving explicit uniform locations and ubo/ssbo/opaque bindings
+// xxTODO: maybe this logic should be moved into the resolver's "validateInOut" and "validateUniform"
struct TSymbolValidater
{
TSymbolValidater(TIoMapResolver& r, TInfoSink& i, TVarLiveMap* in[EShLangCount], TVarLiveMap* out[EShLangCount],
TVarLiveMap* uniform[EShLangCount], bool& hadError, EProfile profile, int version)
- : preStage(EShLangCount)
- , currentStage(EShLangCount)
- , nextStage(EShLangCount)
- , resolver(r)
+ : resolver(r)
, infoSink(i)
, hadError(hadError)
, profile(profile)
@@ -438,17 +436,23 @@ struct TSymbolValidater
TIntermSymbol* base = ent1.symbol;
const TType& type = ent1.symbol->getType();
const TString& name = entKey.first;
- EShLanguage stage = ent1.stage;
TString mangleName1, mangleName2;
- if (currentStage != stage) {
- preStage = currentStage;
- currentStage = stage;
- nextStage = EShLangCount;
- for (int i = currentStage + 1; i < EShLangCount; i++) {
- if (inVarMaps[i] != nullptr) {
- nextStage = static_cast<EShLanguage>(i);
- break;
- }
+ EShLanguage stage = ent1.stage;
+ EShLanguage preStage, currentStage, nextStage;
+
+ preStage = EShLangCount;
+ for (int i = stage - 1; i >= 0; i--) {
+ if (inVarMaps[i] != nullptr) {
+ preStage = static_cast<EShLanguage>(i);
+ break;
+ }
+ }
+ currentStage = stage;
+ nextStage = EShLangCount;
+ for (int i = stage + 1; i < EShLangCount; i++) {
+ if (inVarMaps[i] != nullptr) {
+ nextStage = static_cast<EShLanguage>(i);
+ break;
}
}
@@ -459,6 +463,9 @@ struct TSymbolValidater
type.appendMangledName(mangleName1);
}
+
+ // basic checking that symbols match
+ // more extensive checking in the link stage
if (base->getQualifier().storage == EvqVaryingIn) {
// validate stage in;
if (preStage == EShLangCount)
@@ -484,8 +491,7 @@ struct TSymbolValidater
if (ent2->second.symbol->getType().getQualifier().isArrayedIo(preStage)) {
TType subType(ent2->second.symbol->getType(), 0);
subType.appendMangledName(mangleName2);
- }
- else {
+ } else {
ent2->second.symbol->getType().appendMangledName(mangleName2);
}
@@ -536,8 +542,7 @@ struct TSymbolValidater
if (ent2->second.symbol->getType().getQualifier().isArrayedIo(nextStage)) {
TType subType(ent2->second.symbol->getType(), 0);
subType.appendMangledName(mangleName2);
- }
- else {
+ } else {
ent2->second.symbol->getType().appendMangledName(mangleName2);
}
if (mangleName1 == mangleName2)
@@ -550,7 +555,7 @@ struct TSymbolValidater
}
return;
}
- } else if (base->getQualifier().isUniformOrBuffer() && ! base->getQualifier().isPushConstant()) {
+ } else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().isPushConstant()) {
// validate uniform type;
for (int i = 0; i < EShLangCount; i++) {
if (i != currentStage && outVarMaps[i] != nullptr) {
@@ -558,6 +563,7 @@ struct TSymbolValidater
if (ent2 != uniformVarMap[i]->end()) {
ent2->second.symbol->getType().appendMangledName(mangleName2);
if (mangleName1 != mangleName2) {
+ ent2->second.symbol->getType().sameElementType(type);
TString err = "Invalid Uniform variable type : " + entKey.first;
infoSink.info.message(EPrefixInternalError, err.c_str());
hadError = true;
@@ -608,8 +614,7 @@ struct TSymbolValidater
}
TVarLiveMap *inVarMaps[EShLangCount], *outVarMaps[EShLangCount], *uniformVarMap[EShLangCount];
- // Use for mark pre stage, to get more interface symbol information.
- EShLanguage preStage, currentStage, nextStage;
+
// Use for mark current shader stage for resolver
TIoMapResolver& resolver;
TInfoSink& infoSink;
@@ -749,14 +754,18 @@ TDefaultIoResolverBase::TDefaultIoResolverBase(const TIntermediate& intermediate
, nextOutputLocation(0)
{
memset(stageMask, false, sizeof(bool) * (EShLangCount + 1));
+ memset(stageIntermediates, 0, sizeof(TIntermediate*) * (EShLangCount));
+ stageIntermediates[intermediate.getStage()] = &intermediate;
}
-int TDefaultIoResolverBase::getBaseBinding(TResourceType res, unsigned int set) const {
- return selectBaseBinding(intermediate.getShiftBinding(res), intermediate.getShiftBindingForSet(res, set));
+int TDefaultIoResolverBase::getBaseBinding(EShLanguage stage, TResourceType res, unsigned int set) const {
+ return stageIntermediates[stage] ? selectBaseBinding(stageIntermediates[stage]->getShiftBinding(res), stageIntermediates[stage]->getShiftBindingForSet(res, set))
+ : selectBaseBinding(intermediate.getShiftBinding(res), intermediate.getShiftBindingForSet(res, set));
}
-const std::vector<std::string>& TDefaultIoResolverBase::getResourceSetBinding() const {
- return intermediate.getResourceSetBinding();
+const std::vector<std::string>& TDefaultIoResolverBase::getResourceSetBinding(EShLanguage stage) const {
+ return stageIntermediates[stage] ? stageIntermediates[stage]->getResourceSetBinding()
+ : intermediate.getResourceSetBinding();
}
bool TDefaultIoResolverBase::doAutoBindingMapping() const { return intermediate.getAutoMapBindings(); }
@@ -797,14 +806,14 @@ int TDefaultIoResolverBase::getFreeSlot(int set, int base, int size) {
return reserveSlot(set, base, size);
}
-int TDefaultIoResolverBase::resolveSet(EShLanguage /*stage*/, TVarEntryInfo& ent) {
+int TDefaultIoResolverBase::resolveSet(EShLanguage stage, TVarEntryInfo& ent) {
const TType& type = ent.symbol->getType();
if (type.getQualifier().hasSet()) {
return ent.newSet = type.getQualifier().layoutSet;
}
// If a command line or API option requested a single descriptor set, use that (if not overrided by spaceN)
- if (getResourceSetBinding().size() == 1) {
- return ent.newSet = atoi(getResourceSetBinding()[0].c_str());
+ if (getResourceSetBinding(stage).size() == 1) {
+ return ent.newSet = atoi(getResourceSetBinding(stage)[0].c_str());
}
return ent.newSet = 0;
}
@@ -925,7 +934,7 @@ int TDefaultGlslIoResolver::resolveInOutLocation(EShLanguage stage, TVarEntryInf
preStage = currentStage;
currentStage = stage;
}
- // kick out of not doing this
+ // kick out if not doing this
if (! doAutoLocationMapping()) {
return ent.newLocation = -1;
}
@@ -1073,7 +1082,7 @@ int TDefaultGlslIoResolver::resolveUniformLocation(EShLanguage /*stage*/, TVarEn
return ent.newLocation = location;
}
-int TDefaultGlslIoResolver::resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) {
+int TDefaultGlslIoResolver::resolveBinding(EShLanguage stage, TVarEntryInfo& ent) {
const TType& type = ent.symbol->getType();
const TString& name = ent.symbol->getAccessName();
// On OpenGL arrays of opaque types take a separate binding for each element
@@ -1086,30 +1095,32 @@ int TDefaultGlslIoResolver::resolveBinding(EShLanguage /*stage*/, TVarEntryInfo&
// There is no 'set' qualifier in OpenGL shading language, each resource has its own
// binding name space, so remap the 'set' to resource type which make each resource
// binding is valid from 0 to MAX_XXRESOURCE_BINDINGS
- int set = resource;
+ int set = intermediate.getSpv().openGl != 0 ? resource : ent.newSet;
+ int resourceKey = set;
if (resource < EResCount) {
if (type.getQualifier().hasBinding()) {
- ent.newBinding = reserveSlot(set, getBaseBinding(resource, set) + type.getQualifier().layoutBinding, numBindings);
- return ent.newBinding;
- } else if (ent.live && doAutoBindingMapping()) {
+ int newBinding = reserveSlot(resourceKey, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding, numBindings);
+ return ent.newBinding = newBinding;
+
+ } else {
// The resource in current stage is not declared with binding, but it is possible declared
// with explicit binding in other stages, find the resourceSlotMap firstly to check whether
// the resource has binding, don't need to allocate if it already has a binding
bool hasBinding = false;
- if (! resourceSlotMap[resource].empty()) {
- TVarSlotMap::iterator iter = resourceSlotMap[resource].find(name);
- if (iter != resourceSlotMap[resource].end()) {
+ ent.newBinding = -1; // leave as -1 if it isn't set below
+
+ if (! resourceSlotMap[resourceKey].empty()) {
+ TVarSlotMap::iterator iter = resourceSlotMap[resourceKey].find(name);
+ if (iter != resourceSlotMap[resourceKey].end()) {
hasBinding = true;
ent.newBinding = iter->second;
}
}
- if (! hasBinding) {
- TVarSlotMap varSlotMap;
+ if (!hasBinding && (ent.live && doAutoBindingMapping())) {
// find free slot, the caller did make sure it passes all vars with binding
// first and now all are passed that do not have a binding and needs one
- int binding = getFreeSlot(resource, getBaseBinding(resource, set), numBindings);
- varSlotMap[name] = binding;
- resourceSlotMap[resource] = varSlotMap;
+ int binding = getFreeSlot(resourceKey, getBaseBinding(stage, resource, set), numBindings);
+ resourceSlotMap[resourceKey][name] = binding;
ent.newBinding = binding;
}
return ent.newBinding;
@@ -1211,16 +1222,20 @@ void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink&
void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) {
const TType& type = ent.symbol->getType();
const TString& name = ent.symbol->getAccessName();
- int resource = getResourceType(type);
+ TResourceType resource = getResourceType(type);
+ int set = intermediate.getSpv().openGl != 0 ? resource : resolveSet(ent.stage, ent);
+ int resourceKey = set;
+
if (type.getQualifier().hasBinding()) {
- TVarSlotMap& varSlotMap = resourceSlotMap[resource];
+ TVarSlotMap& varSlotMap = resourceSlotMap[resourceKey];
TVarSlotMap::iterator iter = varSlotMap.find(name);
- int binding = type.getQualifier().layoutBinding;
+ int binding = type.getQualifier().layoutBinding + getBaseBinding(ent.stage, resource, set);
+
if (iter == varSlotMap.end()) {
// Reserve the slots for the ubo, ssbo and opaques who has explicit binding
- int numBindings = type.isSizedArray() ? type.getCumulativeArraySize() : 1;
+ int numBindings = intermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1;
varSlotMap[name] = binding;
- reserveSlot(resource, binding, numBindings);
+ reserveSlot(resourceKey, binding, numBindings);
} else {
// Allocate binding by name for OpenGL driver, so the resource in different
// stages should be declared with the same binding
@@ -1269,7 +1284,7 @@ struct TDefaultIoResolver : public TDefaultIoResolverBase {
return EResCount;
}
- int resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) override {
+ int resolveBinding(EShLanguage stage, TVarEntryInfo& ent) override {
const TType& type = ent.symbol->getType();
const int set = getLayoutSet(type);
// On OpenGL arrays of opaque types take a seperate binding for each element
@@ -1278,11 +1293,11 @@ struct TDefaultIoResolver : public TDefaultIoResolverBase {
if (resource < EResCount) {
if (type.getQualifier().hasBinding()) {
return ent.newBinding = reserveSlot(
- set, getBaseBinding(resource, set) + type.getQualifier().layoutBinding, numBindings);
+ set, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding, numBindings);
} else if (ent.live && doAutoBindingMapping()) {
// find free slot, the caller did make sure it passes all vars with binding
// first and now all are passed that do not have a binding and needs one
- return ent.newBinding = getFreeSlot(set, getBaseBinding(resource, set), numBindings);
+ return ent.newBinding = getFreeSlot(set, getBaseBinding(stage, resource, set), numBindings);
}
}
return ent.newBinding = -1;
@@ -1354,17 +1369,17 @@ struct TDefaultHlslIoResolver : public TDefaultIoResolverBase {
return EResCount;
}
- int resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) override {
+ int resolveBinding(EShLanguage stage, TVarEntryInfo& ent) override {
const TType& type = ent.symbol->getType();
const int set = getLayoutSet(type);
TResourceType resource = getResourceType(type);
if (resource < EResCount) {
if (type.getQualifier().hasBinding()) {
- return ent.newBinding = reserveSlot(set, getBaseBinding(resource, set) + type.getQualifier().layoutBinding);
+ return ent.newBinding = reserveSlot(set, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding);
} else if (ent.live && doAutoBindingMapping()) {
// find free slot, the caller did make sure it passes all vars with binding
// first and now all are passed that do not have a binding and needs one
- return ent.newBinding = getFreeSlot(set, getBaseBinding(resource, set));
+ return ent.newBinding = getFreeSlot(set, getBaseBinding(stage, resource, set));
}
}
return ent.newBinding = -1;
@@ -1403,10 +1418,10 @@ bool TIoMapper::addStage(EShLanguage stage, TIntermediate& intermediate, TInfoSi
else
resolver = &defaultResolver;
}
- resolver->addStage(stage);
#else
resolver = &defaultResolver;
#endif
+ resolver->addStage(stage, intermediate);
TVarLiveMap inVarMap, outVarMap, uniformVarMap;
TVarLiveVector inVector, outVector, uniformVector;
@@ -1502,10 +1517,21 @@ bool TGlslIoMapper::addStage(EShLanguage stage, TIntermediate& intermediate, TIn
}
// if no resolver is provided, use the default resolver with the given shifts and auto map settings
TDefaultGlslIoResolver defaultResolver(intermediate);
+#ifdef ENABLE_HLSL
+ TDefaultHlslIoResolver defaultHlslResolver(intermediate);
+ if (resolver == nullptr) {
+ // TODO: use a passed in IO mapper for this
+ if (intermediate.usingHlslIoMapping())
+ resolver = &defaultHlslResolver;
+ else
+ resolver = &defaultResolver;
+ }
+#else
if (resolver == nullptr) {
resolver = &defaultResolver;
}
- resolver->addStage(stage);
+#endif
+ resolver->addStage(stage, intermediate);
inVarMaps[stage] = new TVarLiveMap(); outVarMaps[stage] = new TVarLiveMap(); uniformVarMap[stage] = new TVarLiveMap();
TVarGatherTraverser iter_binding_all(intermediate, true, *inVarMaps[stage], *outVarMaps[stage],
*uniformVarMap[stage]);
@@ -1547,15 +1573,51 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) {
TResolverInOutAdaptor inOutResolve(EShLangCount, *resolver, infoSink, hadError);
TSymbolValidater symbolValidater(*resolver, infoSink, inVarMaps,
outVarMaps, uniformVarMap, hadError, profile, version);
+
+ TVarLiveVector inVectors[EShLangCount];
+ TVarLiveVector outVectors[EShLangCount];
TVarLiveVector uniformVector;
+
resolver->beginResolve(EShLangCount);
for (int stage = EShLangVertex; stage < EShLangCount; stage++) {
if (inVarMaps[stage] != nullptr) {
inOutResolve.setStage(EShLanguage(stage));
- for (auto& var : *(inVarMaps[stage])) { symbolValidater(var); }
- for (auto& var : *(inVarMaps[stage])) { inOutResolve(var); }
- for (auto& var : *(outVarMaps[stage])) { symbolValidater(var); }
- for (auto& var : *(outVarMaps[stage])) { inOutResolve(var); }
+
+ // copy vars into a sorted list
+ std::for_each(inVarMaps[stage]->begin(), inVarMaps[stage]->end(),
+ [&inVectors, stage](TVarLivePair p) { inVectors[stage].push_back(p); });
+ std::sort(inVectors[stage].begin(), inVectors[stage].end(),
+ [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
+ return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
+ });
+
+ std::for_each(outVarMaps[stage]->begin(), outVarMaps[stage]->end(),
+ [&outVectors, stage](TVarLivePair p) { outVectors[stage].push_back(p); });
+ std::sort(outVectors[stage].begin(), outVectors[stage].end(),
+ [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
+ return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
+ });
+
+ for (auto& var : inVectors[stage]) { symbolValidater(var); }
+ for (auto& var : inVectors[stage]) { inOutResolve(var); }
+ for (auto& var : outVectors[stage]) { symbolValidater(var); }
+ for (auto& var : outVectors[stage]) { inOutResolve(var); }
+
+ // copy results back into maps
+ std::for_each(inVectors[stage].begin(), inVectors[stage].end(),
+ [this, stage](TVarLivePair p) {
+ auto at = inVarMaps[stage]->find(p.first);
+ if (at != inVarMaps[stage]->end())
+ at->second = p.second;
+ });
+
+ std::for_each(outVectors[stage].begin(), outVectors[stage].end(),
+ [this, stage](TVarLivePair p) {
+ auto at = outVarMaps[stage]->find(p.first);
+ if (at != outVarMaps[stage]->end())
+ at->second = p.second;
+ });
+
}
if (uniformVarMap[stage] != nullptr) {
uniformResolve.setStage(EShLanguage(stage));
@@ -1563,7 +1625,7 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) {
}
}
std::sort(uniformVector.begin(), uniformVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool {
- return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second);
+ return TVarEntryInfo::TOrderByPriorityAndLive()(p1.second, p2.second);
});
for (auto& var : uniformVector) { symbolValidater(var); }
for (auto& var : uniformVector) { uniformResolve(var); }
diff --git a/thirdparty/glslang/glslang/MachineIndependent/iomapper.h b/thirdparty/glslang/glslang/MachineIndependent/iomapper.h
index 7934c4a9d1..07357c2ef4 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/iomapper.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/iomapper.h
@@ -52,7 +52,7 @@ namespace glslang {
class TIntermediate;
struct TVarEntryInfo {
- int id;
+ long long id;
TIntermSymbol* symbol;
bool live;
int newBinding;
@@ -87,6 +87,35 @@ struct TVarEntryInfo {
return lPoints > rPoints;
}
};
+
+ struct TOrderByPriorityAndLive {
+ // ordering:
+ // 1) do live variables first
+ // 2) has both binding and set
+ // 3) has binding but no set
+ // 4) has no binding but set
+ // 5) has no binding and no set
+ inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) {
+
+ const TQualifier& lq = l.symbol->getQualifier();
+ const TQualifier& rq = r.symbol->getQualifier();
+
+ // simple rules:
+ // has binding gives 2 points
+ // has set gives 1 point
+ // who has the most points is more important.
+ int lPoints = (lq.hasBinding() ? 2 : 0) + (lq.hasSet() ? 1 : 0);
+ int rPoints = (rq.hasBinding() ? 2 : 0) + (rq.hasSet() ? 1 : 0);
+
+ if (l.live != r.live)
+ return l.live > r.live;
+
+ if (lPoints != rPoints)
+ return lPoints > rPoints;
+
+ return l.id < r.id;
+ }
+ };
};
// Base class for shared TIoMapResolver services, used by several derivations.
@@ -107,8 +136,8 @@ public:
void endCollect(EShLanguage) override {}
void reserverResourceSlot(TVarEntryInfo& /*ent*/, TInfoSink& /*infoSink*/) override {}
void reserverStorageSlot(TVarEntryInfo& /*ent*/, TInfoSink& /*infoSink*/) override {}
- int getBaseBinding(TResourceType res, unsigned int set) const;
- const std::vector<std::string>& getResourceSetBinding() const;
+ int getBaseBinding(EShLanguage stage, TResourceType res, unsigned int set) const;
+ const std::vector<std::string>& getResourceSetBinding(EShLanguage stage) const;
virtual TResourceType getResourceType(const glslang::TType& type) = 0;
bool doAutoBindingMapping() const;
bool doAutoLocationMapping() const;
@@ -122,9 +151,11 @@ public:
int resolveInOutLocation(EShLanguage stage, TVarEntryInfo& ent) override;
int resolveInOutComponent(EShLanguage /*stage*/, TVarEntryInfo& ent) override;
int resolveInOutIndex(EShLanguage /*stage*/, TVarEntryInfo& ent) override;
- void addStage(EShLanguage stage) override {
- if (stage < EShLangCount)
+ void addStage(EShLanguage stage, TIntermediate& stageIntermediate) override {
+ if (stage < EShLangCount) {
stageMask[stage] = true;
+ stageIntermediates[stage] = &stageIntermediate;
+ }
}
uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage);
@@ -139,6 +170,8 @@ protected:
int nextInputLocation;
int nextOutputLocation;
bool stageMask[EShLangCount + 1];
+ const TIntermediate* stageIntermediates[EShLangCount];
+
// Return descriptor set specific base if there is one, and the generic base otherwise.
int selectBaseBinding(int base, int descriptorSetBase) const {
return descriptorSetBase != -1 ? descriptorSetBase : base;
diff --git a/thirdparty/glslang/glslang/MachineIndependent/limits.cpp b/thirdparty/glslang/glslang/MachineIndependent/limits.cpp
index 51d9300341..391570579d 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/limits.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/limits.cpp
@@ -63,14 +63,14 @@ namespace glslang {
class TInductiveTraverser : public TIntermTraverser {
public:
- TInductiveTraverser(int id, TSymbolTable& st)
+ TInductiveTraverser(long long id, TSymbolTable& st)
: loopId(id), symbolTable(st), bad(false) { }
virtual bool visitBinary(TVisit, TIntermBinary* node);
virtual bool visitUnary(TVisit, TIntermUnary* node);
virtual bool visitAggregate(TVisit, TIntermAggregate* node);
- int loopId; // unique ID of the symbol that's the loop inductive variable
+ long long loopId; // unique ID of the symbol that's the loop inductive variable
TSymbolTable& symbolTable;
bool bad;
TSourceLoc badLoc;
@@ -129,7 +129,7 @@ bool TInductiveTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* n
//
// External function to call for loop check.
//
-void TParseContext::inductiveLoopBodyCheck(TIntermNode* body, int loopId, TSymbolTable& symbolTable)
+void TParseContext::inductiveLoopBodyCheck(TIntermNode* body, long long loopId, TSymbolTable& symbolTable)
{
TInductiveTraverser it(loopId, symbolTable);
diff --git a/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp b/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp
index 4e84adbf0a..9656e2e7e0 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/linkValidate.cpp
@@ -48,6 +48,7 @@
#include "localintermediate.h"
#include "../Include/InfoSink.h"
+#include "SymbolTable.h"
namespace glslang {
@@ -89,6 +90,56 @@ void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
#endif
}
+//
+// check that link objects between stages
+//
+void TIntermediate::mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit) {
+ if (unit.treeRoot == nullptr || treeRoot == nullptr)
+ return;
+
+ // Get the linker-object lists
+ TIntermSequence& linkerObjects = findLinkerObjects()->getSequence();
+ TIntermSequence unitLinkerObjects = unit.findLinkerObjects()->getSequence();
+
+ // filter unitLinkerObjects to only contain uniforms
+ auto end = std::remove_if(unitLinkerObjects.begin(), unitLinkerObjects.end(),
+ [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqUniform &&
+ node->getAsSymbolNode()->getQualifier().storage != EvqBuffer; });
+ unitLinkerObjects.resize(end - unitLinkerObjects.begin());
+
+ // merge uniforms and do error checking
+ bool mergeExistingOnly = false;
+ mergeGlobalUniformBlocks(infoSink, unit, mergeExistingOnly);
+ mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage());
+}
+
+//
+// do error checking on the shader boundary in / out vars
+//
+void TIntermediate::checkStageIO(TInfoSink& infoSink, TIntermediate& unit) {
+ if (unit.treeRoot == nullptr || treeRoot == nullptr)
+ return;
+
+ // Get copies of the linker-object lists
+ TIntermSequence linkerObjects = findLinkerObjects()->getSequence();
+ TIntermSequence unitLinkerObjects = unit.findLinkerObjects()->getSequence();
+
+ // filter linkerObjects to only contain out variables
+ auto end = std::remove_if(linkerObjects.begin(), linkerObjects.end(),
+ [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqVaryingOut; });
+ linkerObjects.resize(end - linkerObjects.begin());
+
+ // filter unitLinkerObjects to only contain in variables
+ auto unitEnd = std::remove_if(unitLinkerObjects.begin(), unitLinkerObjects.end(),
+ [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqVaryingIn; });
+ unitLinkerObjects.resize(unitEnd - unitLinkerObjects.begin());
+
+ // do matching and error checking
+ mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage());
+
+ // TODO: final check; make sure that any statically used `in` have matching `out` written to
+}
+
void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit)
{
if (unit.getNumEntryPoints() > 0) {
@@ -136,6 +187,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
MERGE_MAX(spvVersion.vulkanGlsl);
MERGE_MAX(spvVersion.vulkan);
MERGE_MAX(spvVersion.openGl);
+ MERGE_TRUE(spvVersion.vulkanRelaxed);
numErrors += unit.getNumErrors();
// Only one push_constant is allowed, mergeLinkerObjects() will ensure the push_constant
@@ -264,6 +316,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
MERGE_TRUE(useUnknownFormat);
MERGE_TRUE(hlslOffsets);
MERGE_TRUE(useStorageBuffer);
+ MERGE_TRUE(invariantAll);
MERGE_TRUE(hlslIoMapping);
// TODO: sourceFile
@@ -306,12 +359,14 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit)
// Map by global name to unique ID to rationalize the same object having
// differing IDs in different trees.
TIdMaps idMaps;
- int maxId;
- seedIdMap(idMaps, maxId);
- remapIds(idMaps, maxId + 1, unit);
+ long long idShift;
+ seedIdMap(idMaps, idShift);
+ remapIds(idMaps, idShift + 1, unit);
mergeBodies(infoSink, globals, unitGlobals);
- mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects);
+ bool mergeExistingOnly = false;
+ mergeGlobalUniformBlocks(infoSink, unit, mergeExistingOnly);
+ mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage());
ioAccessed.insert(unit.ioAccessed.begin(), unit.ioAccessed.end());
}
@@ -329,14 +384,14 @@ static const TString& getNameForIdMap(TIntermSymbol* symbol)
// Traverser that seeds an ID map with all built-ins, and tracks the
-// maximum ID used.
+// maximum ID used, currently using (maximum ID + 1) as new symbol id shift seed.
+// Level id will keep same after shifting.
// (It would be nice to put this in a function, but that causes warnings
// on having no bodies for the copy-constructor/operator=.)
class TBuiltInIdTraverser : public TIntermTraverser {
public:
- TBuiltInIdTraverser(TIdMaps& idMaps) : idMaps(idMaps), maxId(0) { }
+ TBuiltInIdTraverser(TIdMaps& idMaps) : idMaps(idMaps), idShift(0) { }
// If it's a built in, add it to the map.
- // Track the max ID.
virtual void visitSymbol(TIntermSymbol* symbol)
{
const TQualifier& qualifier = symbol->getType().getQualifier();
@@ -344,14 +399,16 @@ public:
TShaderInterface si = symbol->getType().getShaderInterface();
idMaps[si][getNameForIdMap(symbol)] = symbol->getId();
}
- maxId = std::max(maxId, symbol->getId());
+ idShift = (symbol->getId() & ~TSymbolTable::uniqueIdMask) |
+ std::max(idShift & TSymbolTable::uniqueIdMask,
+ symbol->getId() & TSymbolTable::uniqueIdMask);
}
- int getMaxId() const { return maxId; }
+ long long getIdShift() const { return idShift; }
protected:
TBuiltInIdTraverser(TBuiltInIdTraverser&);
TBuiltInIdTraverser& operator=(TBuiltInIdTraverser&);
TIdMaps& idMaps;
- int maxId;
+ long long idShift;
};
// Traverser that seeds an ID map with non-builtins.
@@ -377,12 +434,12 @@ protected:
};
// Initialize the the ID map with what we know of 'this' AST.
-void TIntermediate::seedIdMap(TIdMaps& idMaps, int& maxId)
+void TIntermediate::seedIdMap(TIdMaps& idMaps, long long& idShift)
{
// all built-ins everywhere need to align on IDs and contribute to the max ID
TBuiltInIdTraverser builtInIdTraverser(idMaps);
treeRoot->traverse(&builtInIdTraverser);
- maxId = builtInIdTraverser.getMaxId();
+ idShift = builtInIdTraverser.getIdShift() & TSymbolTable::uniqueIdMask;
// user variables in the linker object list need to align on ids
TUserIdTraverser userIdTraverser(idMaps);
@@ -394,7 +451,7 @@ void TIntermediate::seedIdMap(TIdMaps& idMaps, int& maxId)
// on having no bodies for the copy-constructor/operator=.)
class TRemapIdTraverser : public TIntermTraverser {
public:
- TRemapIdTraverser(const TIdMaps& idMaps, int idShift) : idMaps(idMaps), idShift(idShift) { }
+ TRemapIdTraverser(const TIdMaps& idMaps, long long idShift) : idMaps(idMaps), idShift(idShift) { }
// Do the mapping:
// - if the same symbol, adopt the 'this' ID
// - otherwise, ensure a unique ID by shifting to a new space
@@ -406,7 +463,9 @@ public:
TShaderInterface si = symbol->getType().getShaderInterface();
auto it = idMaps[si].find(getNameForIdMap(symbol));
if (it != idMaps[si].end()) {
- symbol->changeId(it->second);
+ uint64_t id = (symbol->getId() & ~TSymbolTable::uniqueIdMask) |
+ (it->second & TSymbolTable::uniqueIdMask);
+ symbol->changeId(id);
remapped = true;
}
}
@@ -417,10 +476,10 @@ protected:
TRemapIdTraverser(TRemapIdTraverser&);
TRemapIdTraverser& operator=(TRemapIdTraverser&);
const TIdMaps& idMaps;
- int idShift;
+ long long idShift;
};
-void TIntermediate::remapIds(const TIdMaps& idMaps, int idShift, TIntermediate& unit)
+void TIntermediate::remapIds(const TIdMaps& idMaps, long long idShift, TIntermediate& unit)
{
// Remap all IDs to either share or be unique, as dictated by the idMap and idShift.
TRemapIdTraverser idTraverser(idMaps, idShift);
@@ -451,11 +510,193 @@ void TIntermediate::mergeBodies(TInfoSink& infoSink, TIntermSequence& globals, c
globals.insert(globals.end() - 1, unitGlobals.begin(), unitGlobals.end() - 1);
}
+static inline bool isSameInterface(TIntermSymbol* symbol, EShLanguage stage, TIntermSymbol* unitSymbol, EShLanguage unitStage) {
+ return // 1) same stage and same shader interface
+ (stage == unitStage && symbol->getType().getShaderInterface() == unitSymbol->getType().getShaderInterface()) ||
+ // 2) accross stages and both are uniform or buffer
+ (symbol->getQualifier().storage == EvqUniform && unitSymbol->getQualifier().storage == EvqUniform) ||
+ (symbol->getQualifier().storage == EvqBuffer && unitSymbol->getQualifier().storage == EvqBuffer) ||
+ // 3) in/out matched across stage boundary
+ (stage < unitStage && symbol->getQualifier().storage == EvqVaryingOut && unitSymbol->getQualifier().storage == EvqVaryingIn) ||
+ (unitStage < stage && symbol->getQualifier().storage == EvqVaryingIn && unitSymbol->getQualifier().storage == EvqVaryingOut);
+}
+
+//
+// Global Unfiform block stores any default uniforms (i.e. uniforms without a block)
+// If two linked stages declare the same member, they are meant to be the same uniform
+// and need to be in the same block
+// merge the members of different stages to allow them to be linked properly
+// as a single block
+//
+void TIntermediate::mergeGlobalUniformBlocks(TInfoSink& infoSink, TIntermediate& unit, bool mergeExistingOnly)
+{
+ TIntermSequence& linkerObjects = findLinkerObjects()->getSequence();
+ TIntermSequence& unitLinkerObjects = unit.findLinkerObjects()->getSequence();
+
+ // build lists of default blocks from the intermediates
+ TIntermSequence defaultBlocks;
+ TIntermSequence unitDefaultBlocks;
+
+ auto filter = [](TIntermSequence& list, TIntermNode* node) {
+ if (node->getAsSymbolNode()->getQualifier().defaultBlock) {
+ list.push_back(node);
+ }
+ };
+
+ std::for_each(linkerObjects.begin(), linkerObjects.end(),
+ [&defaultBlocks, &filter](TIntermNode* node) {
+ filter(defaultBlocks, node);
+ });
+ std::for_each(unitLinkerObjects.begin(), unitLinkerObjects.end(),
+ [&unitDefaultBlocks, &filter](TIntermNode* node) {
+ filter(unitDefaultBlocks, node);
+ });
+
+ auto itUnitBlock = unitDefaultBlocks.begin();
+ for (; itUnitBlock != unitDefaultBlocks.end(); itUnitBlock++) {
+
+ bool add = !mergeExistingOnly;
+ auto itBlock = defaultBlocks.begin();
+
+ for (; itBlock != defaultBlocks.end(); itBlock++) {
+ TIntermSymbol* block = (*itBlock)->getAsSymbolNode();
+ TIntermSymbol* unitBlock = (*itUnitBlock)->getAsSymbolNode();
+
+ assert(block && unitBlock);
+
+ // if the two default blocks match, then merge their definitions
+ if (block->getType().getTypeName() == unitBlock->getType().getTypeName() &&
+ block->getQualifier().storage == unitBlock->getQualifier().storage) {
+ add = false;
+ mergeBlockDefinitions(infoSink, block, unitBlock, &unit);
+ }
+ }
+ if (add) {
+ // push back on original list; won't change the size of the list we're iterating over
+ linkerObjects.push_back(*itUnitBlock);
+ }
+ }
+}
+
+void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unit) {
+ if (block->getType() == unitBlock->getType()) {
+ return;
+ }
+
+ if (block->getType().getTypeName() != unitBlock->getType().getTypeName() ||
+ block->getType().getBasicType() != unitBlock->getType().getBasicType() ||
+ block->getQualifier().storage != unitBlock->getQualifier().storage ||
+ block->getQualifier().layoutSet != unitBlock->getQualifier().layoutSet) {
+ // different block names likely means different blocks
+ return;
+ }
+
+ // merge the struct
+ // order of declarations doesn't matter and they matched based on member name
+ TTypeList* memberList = block->getType().getWritableStruct();
+ TTypeList* unitMemberList = unitBlock->getType().getWritableStruct();
+
+ // keep track of which members have changed position
+ // so we don't have to search the array again
+ std::map<unsigned int, unsigned int> memberIndexUpdates;
+
+ size_t memberListStartSize = memberList->size();
+ for (unsigned int i = 0; i < unitMemberList->size(); ++i) {
+ bool merge = true;
+ for (unsigned int j = 0; j < memberListStartSize; ++j) {
+ if ((*memberList)[j].type->getFieldName() == (*unitMemberList)[i].type->getFieldName()) {
+ merge = false;
+ const TType* memberType = (*memberList)[j].type;
+ const TType* unitMemberType = (*unitMemberList)[i].type;
+
+ // compare types
+ // don't need as many checks as when merging symbols, since
+ // initializers and most qualifiers are stripped when the member is moved into the block
+ if ((*memberType) != (*unitMemberType)) {
+ error(infoSink, "Types must match:");
+ infoSink.info << " " << memberType->getFieldName() << ": ";
+ infoSink.info << "\"" << memberType->getCompleteString() << "\" versus ";
+ infoSink.info << "\"" << unitMemberType->getCompleteString() << "\"\n";
+ }
+
+ memberIndexUpdates[i] = j;
+ }
+ }
+ if (merge) {
+ memberList->push_back((*unitMemberList)[i]);
+ memberIndexUpdates[i] = (unsigned int)memberList->size() - 1;
+ }
+ }
+
+ TType unitType;
+ unitType.shallowCopy(unitBlock->getType());
+
+ // update symbol node in unit tree,
+ // and other nodes that may reference it
+ class TMergeBlockTraverser : public TIntermTraverser {
+ public:
+ TMergeBlockTraverser(const glslang::TType &type, const glslang::TType& unitType,
+ glslang::TIntermediate& unit,
+ const std::map<unsigned int, unsigned int>& memberIdxUpdates) :
+ newType(type), unitType(unitType), unit(unit), memberIndexUpdates(memberIdxUpdates)
+ { }
+ virtual ~TMergeBlockTraverser() { }
+
+ const glslang::TType& newType; // type with modifications
+ const glslang::TType& unitType; // copy of original type
+ glslang::TIntermediate& unit; // intermediate that is being updated
+ const std::map<unsigned int, unsigned int>& memberIndexUpdates;
+
+ virtual void visitSymbol(TIntermSymbol* symbol)
+ {
+ glslang::TType& symType = symbol->getWritableType();
+
+ if (symType == unitType) {
+ // each symbol node has a local copy of the unitType
+ // if merging involves changing properties that aren't shared objects
+ // they should be updated in all instances
+
+ // e.g. the struct list is a ptr to an object, so it can be updated
+ // once, outside the traverser
+ //*symType.getWritableStruct() = *newType.getStruct();
+ }
+
+ }
+
+ virtual bool visitBinary(TVisit, glslang::TIntermBinary* node)
+ {
+ if (node->getOp() == EOpIndexDirectStruct && node->getLeft()->getType() == unitType) {
+ // this is a dereference to a member of the block since the
+ // member list changed, need to update this to point to the
+ // right index
+ assert(node->getRight()->getAsConstantUnion());
+
+ glslang::TIntermConstantUnion* constNode = node->getRight()->getAsConstantUnion();
+ unsigned int memberIdx = constNode->getConstArray()[0].getUConst();
+ unsigned int newIdx = memberIndexUpdates.at(memberIdx);
+ TIntermTyped* newConstNode = unit.addConstantUnion(newIdx, node->getRight()->getLoc());
+
+ node->setRight(newConstNode);
+ delete constNode;
+
+ return true;
+ }
+ return true;
+ }
+ } finalLinkTraverser(block->getType(), unitType, *unit, memberIndexUpdates);
+
+ // update the tree to use the new type
+ unit->getTreeRoot()->traverse(&finalLinkTraverser);
+
+ // update the member list
+ (*unitMemberList) = (*memberList);
+}
+
//
// Merge the linker objects from unitLinkerObjects into linkerObjects.
// Duplication is expected and filtered out, but contradictions are an error.
//
-void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects)
+void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects, EShLanguage unitStage)
{
// Error check and merge the linker objects (duplicates should not be created)
std::size_t initialNumLinkerObjects = linkerObjects.size();
@@ -470,7 +711,7 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin
// If they are both blocks in the same shader interface,
// match by the block-name, not the identifier name.
if (symbol->getType().getBasicType() == EbtBlock && unitSymbol->getType().getBasicType() == EbtBlock) {
- if (symbol->getType().getShaderInterface() == unitSymbol->getType().getShaderInterface()) {
+ if (isSameInterface(symbol, getStage(), unitSymbol, unitStage)) {
isSameSymbol = symbol->getType().getTypeName() == unitSymbol->getType().getTypeName();
}
}
@@ -490,18 +731,54 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin
if (! symbol->getQualifier().hasBinding() && unitSymbol->getQualifier().hasBinding())
symbol->getQualifier().layoutBinding = unitSymbol->getQualifier().layoutBinding;
+ // Similarly for location
+ if (!symbol->getQualifier().hasLocation() && unitSymbol->getQualifier().hasLocation()) {
+ symbol->getQualifier().layoutLocation = unitSymbol->getQualifier().layoutLocation;
+ }
+
// Update implicit array sizes
mergeImplicitArraySizes(symbol->getWritableType(), unitSymbol->getType());
// Check for consistent types/qualification/initializers etc.
- mergeErrorCheck(infoSink, *symbol, *unitSymbol, false);
+ mergeErrorCheck(infoSink, *symbol, *unitSymbol, unitStage);
}
// If different symbols, verify they arn't push_constant since there can only be one per stage
- else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant())
+ else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant() && getStage() == unitStage)
error(infoSink, "Only one push_constant block is allowed per stage");
}
- if (merge)
+ if (merge) {
linkerObjects.push_back(unitLinkerObjects[unitLinkObj]);
+
+ // for anonymous blocks, check that their members don't conflict with other names
+ if (unitLinkerObjects[unitLinkObj]->getAsSymbolNode()->getBasicType() == EbtBlock &&
+ IsAnonymous(unitLinkerObjects[unitLinkObj]->getAsSymbolNode()->getName())) {
+ for (std::size_t linkObj = 0; linkObj < initialNumLinkerObjects; ++linkObj) {
+ TIntermSymbol* symbol = linkerObjects[linkObj]->getAsSymbolNode();
+ TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode();
+ assert(symbol && unitSymbol);
+
+ auto checkName = [this, unitSymbol, &infoSink](const TString& name) {
+ for (unsigned int i = 0; i < unitSymbol->getType().getStruct()->size(); ++i) {
+ if (name == (*unitSymbol->getType().getStruct())[i].type->getFieldName()) {
+ error(infoSink, "Anonymous member name used for global variable or other anonymous member: ");
+ infoSink.info << (*unitSymbol->getType().getStruct())[i].type->getCompleteString() << "\n";
+ }
+ }
+ };
+
+ if (isSameInterface(symbol, getStage(), unitSymbol, unitStage)) {
+ checkName(symbol->getName());
+
+ // check members of other anonymous blocks
+ if (symbol->getBasicType() == EbtBlock && IsAnonymous(symbol->getName())) {
+ for (unsigned int i = 0; i < symbol->getType().getStruct()->size(); ++i) {
+ checkName((*symbol->getType().getStruct())[i].type->getFieldName());
+ }
+ }
+ }
+ }
+ }
+ }
}
}
@@ -533,26 +810,75 @@ void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType)
//
// This function only does one of intra- or cross-stage matching per call.
//
-void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, bool crossStage)
+void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, EShLanguage unitStage)
{
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
+ bool crossStage = getStage() != unitStage;
bool writeTypeComparison = false;
// Types have to match
- if (symbol.getType() != unitSymbol.getType()) {
+ {
// but, we make an exception if one is an implicit array and the other is sized
- if (! (symbol.getType().isArray() && unitSymbol.getType().isArray() &&
- symbol.getType().sameElementType(unitSymbol.getType()) &&
- (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray()))) {
- error(infoSink, "Types must match:");
+ // or if the array sizes differ because of the extra array dimension on some in/out boundaries
+ bool arraysMatch = false;
+ if (isIoResizeArray(symbol.getType(), getStage()) || isIoResizeArray(unitSymbol.getType(), unitStage)) {
+ // if the arrays have an extra dimension because of the stage.
+ // compare dimensions while ignoring the outer dimension
+ unsigned int firstDim = isIoResizeArray(symbol.getType(), getStage()) ? 1 : 0;
+ unsigned int numDim = symbol.getArraySizes()
+ ? symbol.getArraySizes()->getNumDims() : 0;
+ unsigned int unitFirstDim = isIoResizeArray(unitSymbol.getType(), unitStage) ? 1 : 0;
+ unsigned int unitNumDim = unitSymbol.getArraySizes()
+ ? unitSymbol.getArraySizes()->getNumDims() : 0;
+ arraysMatch = (numDim - firstDim) == (unitNumDim - unitFirstDim);
+ // check that array sizes match as well
+ for (unsigned int i = 0; i < (numDim - firstDim) && arraysMatch; i++) {
+ if (symbol.getArraySizes()->getDimSize(firstDim + i) !=
+ unitSymbol.getArraySizes()->getDimSize(unitFirstDim + i)) {
+ arraysMatch = false;
+ break;
+ }
+ }
+ }
+ else {
+ arraysMatch = symbol.getType().sameArrayness(unitSymbol.getType()) ||
+ (symbol.getType().isArray() && unitSymbol.getType().isArray() &&
+ (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray()));
+ }
+
+ if (!symbol.getType().sameElementType(unitSymbol.getType()) ||
+ !symbol.getType().sameTypeParameters(unitSymbol.getType()) ||
+ !arraysMatch ) {
writeTypeComparison = true;
+ error(infoSink, "Types must match:");
}
}
- // Qualifiers have to (almost) match
+ // Interface block member-wise layout qualifiers have to match
+ if (symbol.getType().getBasicType() == EbtBlock && unitSymbol.getType().getBasicType() == EbtBlock &&
+ symbol.getType().getStruct() && unitSymbol.getType().getStruct() &&
+ symbol.getType().sameStructType(unitSymbol.getType())) {
+ for (unsigned int i = 0; i < symbol.getType().getStruct()->size(); ++i) {
+ const TQualifier& qualifier = (*symbol.getType().getStruct())[i].type->getQualifier();
+ const TQualifier& unitQualifier = (*unitSymbol.getType().getStruct())[i].type->getQualifier();
+ if (qualifier.layoutMatrix != unitQualifier.layoutMatrix ||
+ qualifier.layoutOffset != unitQualifier.layoutOffset ||
+ qualifier.layoutAlign != unitQualifier.layoutAlign ||
+ qualifier.layoutLocation != unitQualifier.layoutLocation ||
+ qualifier.layoutComponent != unitQualifier.layoutComponent) {
+ error(infoSink, "Interface block member layout qualifiers must match:");
+ writeTypeComparison = true;
+ }
+ }
+ }
+
+ bool isInOut = crossStage &&
+ ((symbol.getQualifier().storage == EvqVaryingIn && unitSymbol.getQualifier().storage == EvqVaryingOut) ||
+ (symbol.getQualifier().storage == EvqVaryingOut && unitSymbol.getQualifier().storage == EvqVaryingIn));
+ // Qualifiers have to (almost) match
// Storage...
- if (symbol.getQualifier().storage != unitSymbol.getQualifier().storage) {
+ if (!isInOut && symbol.getQualifier().storage != unitSymbol.getQualifier().storage) {
error(infoSink, "Storage qualifiers must match:");
writeTypeComparison = true;
}
@@ -574,7 +900,7 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
}
// Precision...
- if (symbol.getQualifier().precision != unitSymbol.getQualifier().precision) {
+ if (!isInOut && symbol.getQualifier().precision != unitSymbol.getQualifier().precision) {
error(infoSink, "Precision qualifiers must match:");
writeTypeComparison = true;
}
@@ -592,12 +918,16 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
}
// Auxiliary and interpolation...
- if (symbol.getQualifier().centroid != unitSymbol.getQualifier().centroid ||
+ // "interpolation qualification (e.g., flat) and auxiliary qualification (e.g. centroid) may differ.
+ // These mismatches are allowed between any pair of stages ...
+ // those provided in the fragment shader supersede those provided in previous stages."
+ if (!crossStage &&
+ (symbol.getQualifier().centroid != unitSymbol.getQualifier().centroid ||
symbol.getQualifier().smooth != unitSymbol.getQualifier().smooth ||
symbol.getQualifier().flat != unitSymbol.getQualifier().flat ||
symbol.getQualifier().isSample()!= unitSymbol.getQualifier().isSample() ||
symbol.getQualifier().isPatch() != unitSymbol.getQualifier().isPatch() ||
- symbol.getQualifier().isNonPerspective() != unitSymbol.getQualifier().isNonPerspective()) {
+ symbol.getQualifier().isNonPerspective() != unitSymbol.getQualifier().isNonPerspective())) {
error(infoSink, "Interpolation and auxiliary storage qualifiers must match:");
writeTypeComparison = true;
}
@@ -653,6 +983,25 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
#endif
}
+void TIntermediate::sharedBlockCheck(TInfoSink& infoSink)
+{
+ bool has_shared_block = false;
+ bool has_shared_non_block = false;
+ TIntermSequence& linkObjects = findLinkerObjects()->getSequence();
+ for (size_t i = 0; i < linkObjects.size(); ++i) {
+ const TType& type = linkObjects[i]->getAsTyped()->getType();
+ const TQualifier& qualifier = type.getQualifier();
+ if (qualifier.storage == glslang::EvqShared) {
+ if (type.getBasicType() == glslang::EbtBlock)
+ has_shared_block = true;
+ else
+ has_shared_non_block = true;
+ }
+ }
+ if (has_shared_block && has_shared_non_block)
+ error(infoSink, "cannot mix use of shared variables inside and outside blocks");
+}
+
//
// Do final link-time error checking of a complete (merged) intermediate representation.
// (Much error checking was done during merging).
@@ -778,6 +1127,7 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
error(infoSink, "post_depth_coverage requires early_fragment_tests");
break;
case EShLangCompute:
+ sharedBlockCheck(infoSink);
break;
case EShLangRayGen:
case EShLangIntersect:
@@ -810,6 +1160,7 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled)
case EShLangTaskNV:
if (numTaskNVBlocks > 1)
error(infoSink, "Only one taskNV interface block is allowed per shader");
+ sharedBlockCheck(infoSink);
break;
default:
error(infoSink, "Unknown Stage.");
@@ -1804,4 +2155,17 @@ int TIntermediate::computeBufferReferenceTypeSize(const TType& type)
return size;
}
+#ifndef GLSLANG_WEB
+bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) {
+ return type.isArray() &&
+ ((language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn) ||
+ (language == EShLangTessControl && type.getQualifier().storage == EvqVaryingOut &&
+ ! type.getQualifier().patch) ||
+ (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn &&
+ type.getQualifier().pervertexNV) ||
+ (language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut &&
+ !type.getQualifier().perTaskNV));
+}
+#endif // not GLSLANG_WEB
+
} // end namespace glslang
diff --git a/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h b/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h
index f8d8e80199..6aa9399dcc 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h
+++ b/thirdparty/glslang/glslang/MachineIndependent/localintermediate.h
@@ -227,10 +227,10 @@ enum ComputeDerivativeMode {
class TIdMaps {
public:
- TMap<TString, int>& operator[](int i) { return maps[i]; }
- const TMap<TString, int>& operator[](int i) const { return maps[i]; }
+ TMap<TString, long long>& operator[](long long i) { return maps[i]; }
+ const TMap<TString, long long>& operator[](long long i) const { return maps[i]; }
private:
- TMap<TString, int> maps[EsiCount];
+ TMap<TString, long long> maps[EsiCount];
};
class TNumericFeatures {
@@ -291,8 +291,15 @@ public:
numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false),
invertY(false),
useStorageBuffer(false),
+ invariantAll(false),
nanMinMaxClamp(false),
- depthReplacing(false)
+ depthReplacing(false),
+ uniqueId(0),
+ globalUniformBlockName(""),
+ atomicCounterBlockName(""),
+ globalUniformBlockSet(TQualifier::layoutSetEnd),
+ globalUniformBlockBinding(TQualifier::layoutBindingEnd),
+ atomicCounterBlockSet(TQualifier::layoutSetEnd)
#ifndef GLSLANG_WEB
,
implicitThisName("@this"), implicitCounterName("@count"),
@@ -322,7 +329,10 @@ public:
textureSamplerTransformMode(EShTexSampTransKeep),
needToLegalize(false),
binaryDoubleOutput(false),
+ subgroupUniformControlFlow(false),
usePhysicalStorageBuffer(false),
+ spirvRequirement(nullptr),
+ spirvExecutionMode(nullptr),
uniformLocationBase(0)
#endif
{
@@ -529,15 +539,30 @@ public:
TIntermTyped* foldSwizzle(TIntermTyped* node, TSwizzleSelectors<TVectorSelector>& fields, const TSourceLoc&);
// Tree ops
- static const TIntermTyped* findLValueBase(const TIntermTyped*, bool swizzleOkay);
+ static const TIntermTyped* findLValueBase(const TIntermTyped*, bool swizzleOkay , bool BufferReferenceOk = false);
// Linkage related
void addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguage, TSymbolTable&);
void addSymbolLinkageNode(TIntermAggregate*& linkage, const TSymbol&);
TIntermAggregate* findLinkerObjects() const;
+ void setGlobalUniformBlockName(const char* name) { globalUniformBlockName = std::string(name); }
+ const char* getGlobalUniformBlockName() const { return globalUniformBlockName.c_str(); }
+ void setGlobalUniformSet(unsigned int set) { globalUniformBlockSet = set; }
+ unsigned int getGlobalUniformSet() const { return globalUniformBlockSet; }
+ void setGlobalUniformBinding(unsigned int binding) { globalUniformBlockBinding = binding; }
+ unsigned int getGlobalUniformBinding() const { return globalUniformBlockBinding; }
+
+ void setAtomicCounterBlockName(const char* name) { atomicCounterBlockName = std::string(name); }
+ const char* getAtomicCounterBlockName() const { return atomicCounterBlockName.c_str(); }
+ void setAtomicCounterBlockSet(unsigned int set) { atomicCounterBlockSet = set; }
+ unsigned int getAtomicCounterBlockSet() const { return atomicCounterBlockSet; }
+
+
void setUseStorageBuffer() { useStorageBuffer = true; }
bool usingStorageBuffer() const { return useStorageBuffer; }
+ void setInvariantAll() { invariantAll = true; }
+ bool isInvariantAll() const { return invariantAll; }
void setDepthReplacing() { depthReplacing = true; }
bool isDepthReplacing() const { return depthReplacing; }
bool setLocalSize(int dim, int size)
@@ -549,6 +574,11 @@ public:
return true;
}
unsigned int getLocalSize(int dim) const { return localSize[dim]; }
+ bool isLocalSizeSet() const
+ {
+ // Return true if any component has been set (i.e. any component is not default).
+ return localSizeNotDefault[0] || localSizeNotDefault[1] || localSizeNotDefault[2];
+ }
bool setLocalSizeSpecId(int dim, int id)
{
if (localSizeSpecId[dim] != TQualifier::layoutNotSet)
@@ -557,6 +587,13 @@ public:
return true;
}
int getLocalSizeSpecId(int dim) const { return localSizeSpecId[dim]; }
+ bool isLocalSizeSpecialized() const
+ {
+ // Return true if any component has been specialized.
+ return localSizeSpecId[0] != TQualifier::layoutNotSet ||
+ localSizeSpecId[1] != TQualifier::layoutNotSet ||
+ localSizeSpecId[2] != TQualifier::layoutNotSet;
+ }
#ifdef GLSLANG_WEB
void output(TInfoSink&, bool tree) { }
@@ -833,8 +870,34 @@ public:
void setBinaryDoubleOutput() { binaryDoubleOutput = true; }
bool getBinaryDoubleOutput() { return binaryDoubleOutput; }
+
+ void setSubgroupUniformControlFlow() { subgroupUniformControlFlow = true; }
+ bool getSubgroupUniformControlFlow() const { return subgroupUniformControlFlow; }
+
+ // GL_EXT_spirv_intrinsics
+ void insertSpirvRequirement(const TSpirvRequirement* spirvReq);
+ bool hasSpirvRequirement() const { return spirvRequirement != nullptr; }
+ const TSpirvRequirement& getSpirvRequirement() const { return *spirvRequirement; }
+ void insertSpirvExecutionMode(int executionMode, const TIntermAggregate* args = nullptr);
+ void insertSpirvExecutionModeId(int executionMode, const TIntermAggregate* args);
+ bool hasSpirvExecutionMode() const { return spirvExecutionMode != nullptr; }
+ const TSpirvExecutionMode& getSpirvExecutionMode() const { return *spirvExecutionMode; }
#endif // GLSLANG_WEB
+ void addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing)
+ {
+ std::string name(nameStr);
+ blockBackingOverrides[name] = backing;
+ }
+ TBlockStorageClass getBlockStorageOverride(const char* nameStr) const
+ {
+ std::string name = nameStr;
+ auto pos = blockBackingOverrides.find(name);
+ if (pos == blockBackingOverrides.end())
+ return EbsNone;
+ else
+ return pos->second;
+ }
#ifdef ENABLE_HLSL
void setHlslFunctionality1() { hlslFunctionality1 = true; }
bool getHlslFunctionality1() const { return hlslFunctionality1; }
@@ -858,10 +921,27 @@ public:
bool usingHlslIoMapping() { return false; }
#endif
+ bool usingScalarBlockLayout() const {
+ for (auto extIt = requestedExtensions.begin(); extIt != requestedExtensions.end(); ++extIt) {
+ if (*extIt == E_GL_EXT_scalar_block_layout)
+ return true;
+ }
+ return false;
+ }
+
+ bool IsRequestedExtension(const char* extension) const
+ {
+ return (requestedExtensions.find(extension) != requestedExtensions.end());
+ }
+
void addToCallGraph(TInfoSink&, const TString& caller, const TString& callee);
void merge(TInfoSink&, TIntermediate&);
void finalCheck(TInfoSink&, bool keepUncalled);
+ void mergeGlobalUniformBlocks(TInfoSink& infoSink, TIntermediate& unit, bool mergeExistingOnly);
+ void mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit);
+ void checkStageIO(TInfoSink&, TIntermediate&);
+
bool buildConvertOp(TBasicType dst, TBasicType src, TOperator& convertOp) const;
TIntermTyped* createConversion(TBasicType convertTo, TIntermTyped* node) const;
@@ -885,6 +965,8 @@ public:
static int getOffset(const TType& type, int index);
static int getBlockSize(const TType& blockType);
static int computeBufferReferenceTypeSize(const TType&);
+ static bool isIoResizeArray(const TType& type, EShLanguage language);
+
bool promote(TIntermOperator*);
void setNanMinMaxClamp(bool setting) { nanMinMaxClamp = setting; }
bool getNanMinMaxClamp() const { return nanMinMaxClamp; }
@@ -903,6 +985,8 @@ public:
void addProcess(const std::string& process) { processes.addProcess(process); }
void addProcessArgument(const std::string& arg) { processes.addArgument(arg); }
const std::vector<std::string>& getProcesses() const { return processes.getProcesses(); }
+ unsigned long long getUniqueId() const { return uniqueId; }
+ void setUniqueId(unsigned long long id) { uniqueId = id; }
// Certain explicit conversions are allowed conditionally
#ifdef GLSLANG_WEB
@@ -931,21 +1015,23 @@ public:
#endif
protected:
- TIntermSymbol* addSymbol(int Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&);
+ TIntermSymbol* addSymbol(long long Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&);
void error(TInfoSink& infoSink, const char*);
void warn(TInfoSink& infoSink, const char*);
void mergeCallGraphs(TInfoSink&, TIntermediate&);
void mergeModes(TInfoSink&, TIntermediate&);
void mergeTrees(TInfoSink&, TIntermediate&);
- void seedIdMap(TIdMaps& idMaps, int& maxId);
- void remapIds(const TIdMaps& idMaps, int idShift, TIntermediate&);
+ void seedIdMap(TIdMaps& idMaps, long long& IdShift);
+ void remapIds(const TIdMaps& idMaps, long long idShift, TIntermediate&);
void mergeBodies(TInfoSink&, TIntermSequence& globals, const TIntermSequence& unitGlobals);
- void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects);
+ void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects, EShLanguage);
+ void mergeBlockDefinitions(TInfoSink&, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unitRoot);
void mergeImplicitArraySizes(TType&, const TType&);
- void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&, bool crossStage);
+ void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&, EShLanguage);
void checkCallGraphCycles(TInfoSink&);
void checkCallGraphBodies(TInfoSink&, bool keepUncalled);
void inOutLocationCheck(TInfoSink&);
+ void sharedBlockCheck(TInfoSink&);
bool userOutputUsed() const;
bool isSpecializationOperation(const TIntermOperator&) const;
bool isNonuniformPropagating(TOperator) const;
@@ -985,11 +1071,20 @@ protected:
bool recursive;
bool invertY;
bool useStorageBuffer;
+ bool invariantAll;
bool nanMinMaxClamp; // true if desiring min/max/clamp to favor non-NaN over NaN
bool depthReplacing;
int localSize[3];
bool localSizeNotDefault[3];
int localSizeSpecId[3];
+ unsigned long long uniqueId;
+
+ std::string globalUniformBlockName;
+ std::string atomicCounterBlockName;
+ unsigned int globalUniformBlockSet;
+ unsigned int globalUniformBlockBinding;
+ unsigned int atomicCounterBlockSet;
+
#ifndef GLSLANG_WEB
public:
const char* const implicitThisName;
@@ -1044,12 +1139,17 @@ protected:
bool needToLegalize;
bool binaryDoubleOutput;
+ bool subgroupUniformControlFlow;
bool usePhysicalStorageBuffer;
+ TSpirvRequirement* spirvRequirement;
+ TSpirvExecutionMode* spirvExecutionMode;
+
std::unordered_map<std::string, int> uniformLocationOverrides;
int uniformLocationBase;
TNumericFeatures numericFeatures;
#endif
+ std::unordered_map<std::string, TBlockStorageClass> blockBackingOverrides;
std::unordered_set<int> usedConstantId; // specialization constant ids used
std::vector<TOffsetRange> usedAtomics; // sets of bindings used by atomic counters
diff --git a/thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp b/thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp
index 7c04743ba6..6c182991f5 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/parseConst.cpp
@@ -166,31 +166,30 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
}
} else {
// matrix from vector or scalar
- int count = 0;
- const int startIndex = index;
int nodeComps = node->getType().computeNumComponents();
- for (int i = startIndex; i < endIndex; i++) {
- if (i >= instanceSize)
- return;
- if (nodeComps == 1) {
- // If there is a single scalar parameter to a matrix
- // constructor, it is used to initialize all the
- // components on the matrix's diagonal, with the
- // remaining components initialized to 0.0.
- if (i == startIndex || (i - startIndex) % (matrixRows + 1) == 0 )
- leftUnionArray[i] = rightUnionArray[count];
- else
- leftUnionArray[i].setDConst(0.0);
- } else {
+ if (nodeComps == 1) {
+ for (int c = 0; c < matrixCols; ++c) {
+ for (int r = 0; r < matrixRows; ++r) {
+ if (r == c)
+ leftUnionArray[index] = rightUnionArray[0];
+ else
+ leftUnionArray[index].setDConst(0.0);
+ index++;
+ }
+ }
+ } else {
+ int count = 0;
+ for (int i = index; i < endIndex; i++) {
+ if (i >= instanceSize)
+ return;
+
// construct the matrix in column-major order, from
// the components provided, in order
leftUnionArray[i] = rightUnionArray[count];
- }
-
- index++;
- if (nodeComps > 1)
+ index++;
count++;
+ }
}
}
}
diff --git a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
index e0f44f8b4f..ad11792002 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
@@ -1191,9 +1191,11 @@ int TPpContext::tokenize(TPpToken& ppToken)
// HLSL allows string literals.
// GLSL allows string literals with GL_EXT_debug_printf.
if (ifdepth == 0 && parseContext.intermediate.getSource() != EShSourceHlsl) {
- parseContext.requireExtensions(ppToken.loc, 1, &E_GL_EXT_debug_printf, "string literal");
- if (!parseContext.extensionTurnedOn(E_GL_EXT_debug_printf))
- continue;
+ const char* const string_literal_EXTs[] = { E_GL_EXT_debug_printf, E_GL_EXT_spirv_intrinsics };
+ parseContext.requireExtensions(ppToken.loc, 2, string_literal_EXTs, "string literal");
+ if (!parseContext.extensionTurnedOn(E_GL_EXT_debug_printf) &&
+ !parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
+ continue;
}
break;
case '\'':
diff --git a/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp b/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp
index 729500295e..9ea48c452d 100644
--- a/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp
+++ b/thirdparty/glslang/glslang/MachineIndependent/reflection.cpp
@@ -907,8 +907,8 @@ public:
case EbtFloat16: return GL_FLOAT16_VEC2_NV + offset;
case EbtInt: return GL_INT_VEC2 + offset;
case EbtUint: return GL_UNSIGNED_INT_VEC2 + offset;
- case EbtInt64: return GL_INT64_ARB + offset;
- case EbtUint64: return GL_UNSIGNED_INT64_ARB + offset;
+ case EbtInt64: return GL_INT64_VEC2_ARB + offset;
+ case EbtUint64: return GL_UNSIGNED_INT64_VEC2_ARB + offset;
case EbtBool: return GL_BOOL_VEC2 + offset;
case EbtAtomicUint: return GL_UNSIGNED_INT_ATOMIC_COUNTER + offset;
default: return 0;
@@ -1138,6 +1138,8 @@ void TReflection::buildCounterIndices(const TIntermediate& intermediate)
if (index >= 0)
indexToUniformBlock[i].counterIndex = index;
}
+#else
+ (void)intermediate;
#endif
}
diff --git a/thirdparty/glslang/glslang/Public/ShaderLang.h b/thirdparty/glslang/glslang/Public/ShaderLang.h
index 273f1569a0..d2a4bf40a0 100644
--- a/thirdparty/glslang/glslang/Public/ShaderLang.h
+++ b/thirdparty/glslang/glslang/Public/ShaderLang.h
@@ -167,7 +167,7 @@ typedef enum {
EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), // Vulkan 1.1
EShTargetVulkan_1_2 = (1 << 22) | (2 << 12), // Vulkan 1.2
EShTargetOpenGL_450 = 450, // OpenGL
- LAST_ELEMENT_MARKER(EShTargetClientVersionCount),
+ LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 4),
} EShTargetClientVersion;
typedef EShTargetClientVersion EshTargetClientVersion;
@@ -179,7 +179,7 @@ typedef enum {
EShTargetSpv_1_3 = (1 << 16) | (3 << 8), // SPIR-V 1.3
EShTargetSpv_1_4 = (1 << 16) | (4 << 8), // SPIR-V 1.4
EShTargetSpv_1_5 = (1 << 16) | (5 << 8), // SPIR-V 1.5
- LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount),
+ LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount = 6),
} EShTargetLanguageVersion;
struct TInputLanguage {
@@ -187,6 +187,7 @@ struct TInputLanguage {
EShLanguage stage; // redundant information with other input, this one overrides when not EShSourceNone
EShClient dialect;
int dialectVersion; // version of client's language definition, not the client (when not EShClientNone)
+ bool vulkanRulesRelaxed;
};
struct TClient {
@@ -427,6 +428,14 @@ enum TResourceType {
EResCount
};
+enum TBlockStorageClass
+{
+ EbsUniform = 0,
+ EbsStorageBuffer,
+ EbsPushConstant,
+ EbsNone, // not a uniform or buffer variable
+ EbsCount,
+};
// Make one TShader per shader that you will link into a program. Then
// - provide the shader through setStrings() or setStringsWithLengths()
@@ -458,6 +467,7 @@ public:
GLSLANG_EXPORT void setEntryPoint(const char* entryPoint);
GLSLANG_EXPORT void setSourceEntryPoint(const char* sourceEntryPointName);
GLSLANG_EXPORT void addProcesses(const std::vector<std::string>&);
+ GLSLANG_EXPORT void setUniqueId(unsigned long long id);
// IO resolver binding data: see comments in ShaderLang.cpp
GLSLANG_EXPORT void setShiftBinding(TResourceType res, unsigned int base);
@@ -482,6 +492,14 @@ public:
GLSLANG_EXPORT void setNoStorageFormat(bool useUnknownFormat);
GLSLANG_EXPORT void setNanMinMaxClamp(bool nanMinMaxClamp);
GLSLANG_EXPORT void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode);
+ GLSLANG_EXPORT void addBlockStorageOverride(const char* nameStr, glslang::TBlockStorageClass backing);
+
+ GLSLANG_EXPORT void setGlobalUniformBlockName(const char* name);
+ GLSLANG_EXPORT void setAtomicCounterBlockName(const char* name);
+ GLSLANG_EXPORT void setGlobalUniformSet(unsigned int set);
+ GLSLANG_EXPORT void setGlobalUniformBinding(unsigned int binding);
+ GLSLANG_EXPORT void setAtomicCounterBlockSet(unsigned int set);
+ GLSLANG_EXPORT void setAtomicCounterBlockBinding(unsigned int binding);
// For setting up the environment (cleared to nothingness in the constructor).
// These must be called so that parsing is done for the right source language and
@@ -490,7 +508,7 @@ public:
//
// setEnvInput: The input source language and stage. If generating code for a
// specific client, the input client semantics to use and the
- // version of the that client's input semantics to use, otherwise
+ // version of that client's input semantics to use, otherwise
// use EShClientNone and version of 0, e.g. for validation mode.
// Note 'version' does not describe the target environment,
// just the version of the source dialect to compile under.
@@ -538,6 +556,9 @@ public:
bool getEnvTargetHlslFunctionality1() const { return false; }
#endif
+ void setEnvInputVulkanRulesRelaxed() { environment.input.vulkanRulesRelaxed = true; }
+ bool getEnvInputVulkanRulesRelaxed() const { return environment.input.vulkanRulesRelaxed; }
+
// Interface to #include handlers.
//
// To support #include, a client of Glslang does the following:
@@ -701,7 +722,7 @@ class TObjectReflection {
public:
GLSLANG_EXPORT TObjectReflection(const std::string& pName, const TType& pType, int pOffset, int pGLDefineType, int pSize, int pIndex);
- GLSLANG_EXPORT const TType* getType() const { return type; }
+ const TType* getType() const { return type; }
GLSLANG_EXPORT int getBinding() const;
GLSLANG_EXPORT void dump() const;
static TObjectReflection badReflection() { return TObjectReflection(); }
@@ -805,7 +826,7 @@ public:
// Called by TSlotCollector to resolve resource locations or bindings
virtual void reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) = 0;
// Called by mapIO.addStage to set shader stage mask to mark a stage be added to this pipeline
- virtual void addStage(EShLanguage stage) = 0;
+ virtual void addStage(EShLanguage stage, TIntermediate& stageIntermediate) = 0;
};
#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
@@ -927,6 +948,7 @@ public:
protected:
GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages);
+ GLSLANG_EXPORT bool crossStageCheck(EShMessages);
TPoolAllocator* pool;
std::list<TShader*> stages[EShLangCount];
diff --git a/thirdparty/glslang/glslang/build_info.h b/thirdparty/glslang/glslang/build_info.h
index 319bfa5f73..661c4a3c1c 100644
--- a/thirdparty/glslang/glslang/build_info.h
+++ b/thirdparty/glslang/glslang/build_info.h
@@ -35,7 +35,7 @@
#define GLSLANG_BUILD_INFO
#define GLSLANG_VERSION_MAJOR 11
-#define GLSLANG_VERSION_MINOR 0
+#define GLSLANG_VERSION_MINOR 6
#define GLSLANG_VERSION_PATCH 0
#define GLSLANG_VERSION_FLAVOR ""
diff --git a/thirdparty/harfbuzz/COPYING b/thirdparty/harfbuzz/COPYING
index 57343164f2..48d1b30f90 100644
--- a/thirdparty/harfbuzz/COPYING
+++ b/thirdparty/harfbuzz/COPYING
@@ -4,14 +4,14 @@ files names COPYING in subdirectories where applicable.
Copyright © 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 Google, Inc.
Copyright © 2018,2019,2020 Ebrahim Byagowi
-Copyright © 2019,2020 Facebook, Inc.
+Copyright © 2019,2020 Facebook, Inc.
Copyright © 2012 Mozilla Foundation
Copyright © 2011 Codethink Limited
Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies)
Copyright © 2009 Keith Stribley
Copyright © 2009 Martin Hosken and SIL International
Copyright © 2007 Chris Wilson
-Copyright © 2006 Behdad Esfahbod
+Copyright © 2005,2006,2020,2021 Behdad Esfahbod
Copyright © 2005 David Turner
Copyright © 2004,2007,2008,2009,2010 Red Hat, Inc.
Copyright © 1998-2004 David Turner and Werner Lemberg
diff --git a/thirdparty/harfbuzz/NEWS b/thirdparty/harfbuzz/NEWS
deleted file mode 100644
index 321c550188..0000000000
--- a/thirdparty/harfbuzz/NEWS
+++ /dev/null
@@ -1,2457 +0,0 @@
-Overview of changes leading to 2.8.0
-Tuesday, March 16, 2021
-====================================
-- Shape joining scripts other than Arabic/Syriac using the Universal Shaping Engine.
- Previously these were shaped using the generalized Arabic shaper. (David Corbett)
-- Fix regression in shaping of U+0B55 ORIYA SIGN OVERLINE. (David Corbett)
-- Update language tags. (David Corbett)
-- Variations: reduce error: do not round each interpolated delta. (Just van Rossum)
-- Documentation improvements. (Khaled Hosny, Nathan Willis)
-- Subsetter improvements: subsets most, if not all, lookup types now. (Garret Rieger, Qunxin Liu)
-- Fuzzer-found fixes and other improvements when memory failures happen. (Behdad)
-- Removed most atomic implementations now that we have C++11 atomic impl. (Behdad)
-- General codebase upkeep; using more C++11 features: constexpr constructors, etc. (Behdad)
-
-
-Overview of changes leading to 2.7.4
-Sunday, December 27, 2020
-====================================
-- Fix missing --enable-introspection configure option from previous release
- tarball.
-- Documentation updates.
-
-Overview of changes leading to 2.7.3
-Wednesday, December 23, 2020
-====================================
-- Update USE shaper to 2020-08-13 specification, and other improvements.
-- Don’t disable liga feature in myanmar shaper, to match Uniscribe.
-- Improvements to language and script tags handling.
-- Update language system tag registry to OpenType 1.8.4
-- Support for serializing and deserializing Unicode buffers. Serialized buffers
- are now delimited with `<>` or `[]` based on whether it is a Unicode or
- glyphs buffer.
-- Increase buffer work limits to handle fonts with many complex lookups.
-- Handle more shaping operations in trace output.
-- Memory access fixes.
-- More OOM fixes.
-- Improved documentation.
-- Build system improvements.
-- New API:
-+hb_buffer_has_positions()
-+hb_buffer_serialize()
-+hb_buffer_serialize_unicode()
-+hb_buffer_deserialize_unicode()
-
-
-Overview of changes leading to 2.7.2
-Saturday, August 29, 2020
-====================================
-- Fix a regression in the previous release that caused a crash with Kaithi.
-- More OOM fixes.
-
-
-Overview of changes leading to 2.7.1
-Thursday, August 13, 2020
-====================================
-- ot-funcs now handles variable empty glyphs better when hvar/vvar isn't present.
-- Reverted a GDEF processing regression.
-- A couple of fixes to handle OOM better.
-
-
-Overview of changes leading to 2.7.0
-Saturday, July 25, 2020
-====================================
-- Use an implementation for round that always rounds up, some minor fluctuations
- are expected on var font specially when hb-ot callback is used.
-- Fix an AAT's `kerx` issue on broken rendering of Devanagari Sangam MN.
-- Remove AAT's `lcar` table support from _get_ligature_carets API, not even much
- use on macOS installed fonts (only two files). GDEF support is the recommended
- one and expected to work properly after issues fixed two releases ago.
-- Minor memory fixes to handle OOM better specially in hb-ft.
-- Minor .so files versioning scheme change and remove stable/unstable scheme
- differences, was never used in practice (always default to stable scheme).
-- We are now suggesting careful packaging of the library using meson,
- https://github.com/harfbuzz/harfbuzz/wiki/Notes-on-migration-to-meson
- for more information.
-- Distribution package URL is changed, either use GitHub generated tarballs,
- `https://github.com/harfbuzz/harfbuzz/archive/$pkgver.tar.gz`
- or, even more preferably use commit hash of the release and git checkouts like,
- `git+https://github.com/harfbuzz/harfbuzz#commit=$commit`
-
-
-Overview of changes leading to 2.6.8
-Monday, June 22, 2020
-====================================
-- New API to fetch glyph alternates from GSUB table.
-- hb-coretext build fix for macOS < 10.10.
-- Meson build fixes, cmake port removal is postponed but please prepare for
- it and give us feedback.
- Autotools is still our main build system however please consider
- experimenting with meson also for packaging the library.
-- New API:
-+hb_ot_layout_lookup_get_glyph_alternates()
-
-
-Overview of changes leading to 2.6.7
-Wednesday, June 3, 2020
-====================================
-- Update to Unicode 13.0.0.
-- Fix hb_ot_layout_get_ligature_carets for fonts without lcar table, it was
- completely broken for all the other fonts since 2.1.2.
-- As a part of our migration to meson, this release will be the last one
- to provide cmake port files but autotools still is our main build system.
- There is a possibility that the next version or the after be released
- using meson.
-
-
-Overview of changes leading to 2.6.6
-Tuesday, May 12, 2020
-====================================
-- A fix in AAT kerning for Geeza Pro.
-- Better support for resource fork fonts on macOS.
-
-
-Overview of changes leading to 2.6.5
-Friday, April 17, 2020
-====================================
-- Add experimental meson build system. Autotools is still the primary
- and supported build system.
-- AAT is now always preferred for horizontal scripts when both AAT and OT
- layout tables exist at the same time.
-- Subsetter improvements.
-- New API:
-+hb_ft_font_lock_face()
-+hb_ft_font_unlock_face()
-
-
-Overview of changes leading to 2.6.4
-Monday, October 29, 2019
-====================================
-- Small bug fix.
-- Build fixes.
-
-
-Overview of changes leading to 2.6.3
-Monday, October 28, 2019
-====================================
-- Misc small fixes, mostly to build-related issues.
-- New API:
-+hb_font_get_nominal_glyphs()
-
-
-Overview of changes leading to 2.6.2
-Monday, September 30, 2019
-====================================
-- Misc small fixes, mostly to build-related issues.
-
-
-Overview of changes leading to 2.6.1
-Thursday, August 22, 2019
-====================================
-- Fix regression with hb_font_create_sub_font scaling introduced in 2.6.0.
-- Change interpretation of font PTEM size / CoreText font size handling.
- See https://github.com/harfbuzz/harfbuzz/pull/1484
-- hb-ot-font: Prefer symbol cmap subtable if present.
-- Apply 'dist'/'abvm'/'blwm' features to all scripts.
-- Drop experimental DirectWrite API.
-
-
-Overview of changes leading to 2.6.0
-Tuesday, August 13, 2019
-====================================
-- New OpenType metrics, baseline, and metadata table access APIs.
-- New API to set font variations to a named-instance.
-- New hb-gdi.h header and API for creating hb_face_t from HFONT.
-- Amalgam: Provide a single-file harfbuzz.cc file for easier alternate building.
-- More size-reduction configurable options, enabled by HB_TINY.
-- New API:
-+hb_font_set_var_named_instance()
-+hb_gdi_face_create()
-+hb_ot_layout_baseline_tag_t
-+hb_ot_layout_get_baseline()
-+hb_ot_meta_tag_t
-+hb_ot_meta_get_entry_tags()
-+hb_ot_meta_reference_entry()
-+hb_ot_metrics_tag_t
-+hb_ot_metrics_get_position()
-+hb_ot_metrics_get_variation()
-+hb_ot_metrics_get_x_variation()
-+hb_ot_metrics_get_y_variation()
-
-
-Overview of changes leading to 2.5.3
-Wednesday, June 26, 2019
-====================================
-- Fix UCD script data for Unicode 10+ scripts. This was broken since 2.5.0.
-- More optimizations for HB_TINY.
-
-
-Overview of changes leading to 2.5.2
-Thursday, June 20, 2019
-====================================
-- More hb-config.hh facilities to shrink library size, namely when built as
- HB_TINY.
-- New documentation of custom configurations in CONFIG.md.
-- Fix build on gcc 4.8. That's supported again.
-- Universal Shaping Engine improvements thanks to David Corbett.
-- API Changes: Undeprecate some horizontal-kerning API and re-enable in hb-ft,
- such that Type1 fonts will continue kerning.
-
-
-Overview of changes leading to 2.5.1
-Friday, May 31, 2019
-====================================
-- Fix build with various versions of Visual Studio.
-- Improved documentation, thanks to Nathan Willis.
-- Bugfix in subsetting glyf table.
-- Improved scripts for cross-compiling for Windows using mingw.
-- Rename HB_MATH_GLYPH_PART_FLAG_EXTENDER to HB_OT_MATH_GLYPH_PART_FLAG_EXTENDER.
- A deprecated macro is added for backwards-compatibility.
-
-
-Overview of changes leading to 2.5.0
-Friday, May 24, 2019
-====================================
-- This release does not include much functional changes, but includes major internal
- code-base changes. We now require C++11. Support for gcc 4.8 and earlier has been
- dropped.
-- New hb-config.hh facility for compiling smaller library for embedded and web usecases.
-- New Unicode Character Databse implementation that is half the size of previously-used
- UCDN.
-- Subsetter improvements.
-- Improved documentation, thanks to Nathan Willis.
-- Misc shaping fixes.
-
-
-Overview of changes leading to 2.4.0
-Monday, March 25, 2019
-====================================
-- Unicode 12.
-- Misc fixes.
-- Subsetter improvements.
-- New API:
-HB_BUFFER_FLAG_DO_NOT_INSERT_DOTTED_CIRCLE
-hb_directwrite_face_create()
-
-
-Overview of changes leading to 2.3.1
-Wednesday, January 30, 2019
-====================================
-- AAT bug fixes.
-- Misc internal housekeeping cleanup.
-
-
-Overview of changes leading to 2.3.0
-Thursday, December 20, 2018
-====================================
-- Fix regression on big-endian architectures. Ouch!
-- Misc bug and build fixes.
-- Fix subsetting of simple GSUB/GDEF.
-- Merge CFF / CFF2 support contributed by Adobe. This mostly involves
- the subsetter, but also get_glyph_extents on CFF fonts.
-
-New API in hb-aat.h:
-+hb_aat_layout_has_substitution()
-+hb_aat_layout_has_positioning()
-+hb_aat_layout_has_tracking()
-
-
-Overview of changes leading to 2.2.0
-Thursday, November 29, 2018
-====================================
-- Misc shaping bug fixes.
-- Add font variations named-instance API.
-- Deprecate font variations axis enumeration API and add replacement.
-- AAT shaping improvements:
- o Fixed 'kern' table Format 2 implementation.
- o Implement 'feat' table API for feature detection.
- o Blacklist 'GSUB' table of fonts from 'MUTF' foundry that also have 'morx'.
-
-New API:
-+hb_aat_layout_feature_type_t
-+hb_aat_layout_feature_selector_t
-+hb_aat_layout_get_feature_types()
-+hb_aat_layout_feature_type_get_name_id
-+hb_aat_layout_feature_selector_info_t
-+HB_AAT_LAYOUT_NO_SELECTOR_INDEX
-+hb_aat_layout_feature_type_get_selector_infos()
-+hb_ot_var_axis_flags_t
-+hb_ot_var_axis_info_t
-+hb_ot_var_get_axis_infos()
-+hb_ot_var_find_axis_info()
-+hb_ot_var_get_named_instance_count()
-+hb_ot_var_named_instance_get_subfamily_name_id()
-+hb_ot_var_named_instance_get_postscript_name_id()
-+hb_ot_var_named_instance_get_design_coords()
-
-Deprecated API:
-+HB_OT_VAR_NO_AXIS_INDEX
-+hb_ot_var_axis_t
-+hb_ot_var_get_axes()
-+hb_ot_var_find_axis()
-
-
-Overview of changes leading to 2.1.3
-Friday, November 16, 2018
-====================================
-- Fix AAT 'mort' shaping, which was broken in 2.1.2
-
-
-Overview of changes leading to 2.1.2
-Friday, November 16, 2018
-====================================
-- Various internal changes.
-- AAT shaping improvements:
- o Implement kern table Format 1 state-machine-based kerning.
- o Implement cross-stream kerning (cursive positioning, etc).
- o Ignore emptyish GSUB tables (zero scripts) if morx present.
- o Don't apply GPOS if morx is being applied. Matches Apple.
-
-
--Overview of changes leading to 2.1.1
-Monday, November 5, 2018
-====================================
-- AAT improvements:
- o Implement 'mort' table.
- o Implement 'kern' subtables Format 1 and Format 3.
-
-
-Overview of changes leading to 2.1.0
-Tuesday, October 30, 2018
-====================================
-- AAT shaping improvements:
- o Allow user controlling AAT features, for whole buffer only currently.
- o Several 'morx' fixes.
- o Implement tuple-kerns in 'kerx'; Fixes kerning with Apple default
- San Francisco fonts.
-- Support for color fonts:
- o COLR/CPAL API to fetch color layers.
- o SVG table to fetch SVG documents.
- o CBDT/sbix API to fetch PNG images.
-- New 'name' table API.
-- hb-ot-font now uses 'VORG' table to correctly position CFF glyphs
- in vertical layout.
-- Various fuzzer-found bug fixes.
-
-Changed API:
-
-A type and a macro added in 2.0.0 were renamed:
-
-hb_name_id_t -> hb_ot_name_id_t
-HB_NAME_ID_INVALID -> HB_OT_NAME_ID_INVALID
-
-New API:
-
-+hb_color_t
-+HB_COLOR
-+hb_color_get_alpha()
-+hb_color_get_red()
-+hb_color_get_green()
-+hb_color_get_blue()
-+hb_ot_color_has_palettes()
-+hb_ot_color_palette_get_count()
-+hb_ot_color_palette_get_name_id()
-+hb_ot_color_palette_color_get_name_id()
-+hb_ot_color_palette_flags_t
-+hb_ot_color_palette_get_flags()
-+hb_ot_color_palette_get_colors()
-+hb_ot_color_has_layers()
-+hb_ot_color_layer_t
-+hb_ot_color_glyph_get_layers()
-+hb_ot_color_has_svg()
-+hb_ot_color_glyph_reference_svg()
-+hb_ot_color_has_png()
-+hb_ot_color_glyph_reference_png()
-
-+hb_ot_name_id_t
-+HB_OT_NAME_ID_INVALID
-+HB_OT_NAME_ID_COPYRIGHT
-+HB_OT_NAME_ID_FONT_FAMILY
-+HB_OT_NAME_ID_FONT_SUBFAMILY
-+HB_OT_NAME_ID_UNIQUE_ID
-+HB_OT_NAME_ID_FULL_NAME
-+HB_OT_NAME_ID_VERSION_STRING
-+HB_OT_NAME_ID_POSTSCRIPT_NAME
-+HB_OT_NAME_ID_TRADEMARK
-+HB_OT_NAME_ID_MANUFACTURER
-+HB_OT_NAME_ID_DESIGNER
-+HB_OT_NAME_ID_DESCRIPTION
-+HB_OT_NAME_ID_VENDOR_URL
-+HB_OT_NAME_ID_DESIGNER_URL
-+HB_OT_NAME_ID_LICENSE
-+HB_OT_NAME_ID_LICENSE_URL
-+HB_OT_NAME_ID_TYPOGRAPHIC_FAMILY
-+HB_OT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
-+HB_OT_NAME_ID_MAC_FULL_NAME
-+HB_OT_NAME_ID_SAMPLE_TEXT
-+HB_OT_NAME_ID_CID_FINDFONT_NAME
-+HB_OT_NAME_ID_WWS_FAMILY
-+HB_OT_NAME_ID_WWS_SUBFAMILY
-+HB_OT_NAME_ID_LIGHT_BACKGROUND
-+HB_OT_NAME_ID_DARK_BACKGROUND
-+HB_OT_NAME_ID_VARIATIONS_PS_PREFIX
-+hb_ot_name_entry_t
-+hb_ot_name_list_names()
-+hb_ot_name_get_utf8()
-+hb_ot_name_get_utf16()
-+hb_ot_name_get_utf32()
-
-
-Overview of changes leading to 2.0.2
-Saturday, October 20, 2018
-====================================
-- Fix two minor memory access issues in AAT tables.
-
-
-Overview of changes leading to 2.0.1
-Friday, October 19, 2018
-====================================
-- Fix hb-version.h reported release version that went wrong (1.8.0)
- with previous release.
-- Fix extrapolation in 'trak' table.
-- Fix hb-font infinite-recursion issue with some font funcs and
- subclassed fonts.
-- Implement variation-kerning format in kerx table, although without
- variation.
-- Fix return value of hb_map_is_empty().
-
-
-Overview of changes leading to 2.0.0
-Thursday, October 18, 2018
-====================================
-- Added AAT shaping support (morx/kerx/trak).
- Automatically used if GSUB/GPOS are not available respectively.
- Set HB_OPTIONS=aat env var to have morx/kerx preferred over
- GSUB/GPOS.
-- Apply TrueType kern table internally, instead of relying on
- hb_font_t callbacks.
-- Khmer shaper significantly rewritten to better match Uniscribe.
-- Indic3 tags ('dev3', etc) are passed to USE shaper.
-- .dfont Mac font containers implemented.
-- Script- and language-mapping revamped to better use BCP 47.
-- Misc USE and Indic fixes.
-- Misc everything fixes.
-- Too many things to list. Biggest release since 0.9.1, with
- over 500 commits in just over 5 weeks! Didn't intend it to
- be a big release. Just happened to become.
-- hb-ft now locks underlying FT_Face during use.
-
-API changes:
-
-- Newly-created hb_font_t's now have our internal "hb-ot-font"
- callbacks set on them, so they should work out of the box
- without any callbacks set. If callbacks are set, everything
- is back to what it was before, the fallback callbacks are
- null. If you to get the internal implementation modified,
- sub_font it.
-
-- New hb_font_funcs_set_nominal_glyphs_func() allows speeding
- up character to glyph mapping.
-
-New API:
-+HB_FEATURE_GLOBAL_START
-+HB_FEATURE_GLOBAL_END
-+hb_buffer_set_invisible_glyph()
-+hb_buffer_get_invisible_glyph()
-+hb_font_funcs_set_nominal_glyphs_func()
-+hb_ot_layout_table_select_script()
-+hb_ot_layout_script_select_language()
-+hb_ot_layout_feature_get_name_ids()
-+hb_ot_layout_feature_get_characters()
-+hb_name_id_t
-+HB_NAME_ID_INVALID
-+HB_OT_MAX_TAGS_PER_SCRIPT
-+hb_ot_tags_from_script_and_language()
-+hb_ot_tags_to_script_and_language()
-
-Deprecated API:
--hb_font_funcs_set_glyph_func()
--hb_unicode_eastasian_width_func_t
--hb_unicode_funcs_set_eastasian_width_func()
--hb_unicode_eastasian_width()
--hb_unicode_decompose_compatibility_func_t
--HB_UNICODE_MAX_DECOMPOSITION_LEN
--hb_unicode_funcs_set_decompose_compatibility_func()
--hb_unicode_decompose_compatibility()
--hb_font_funcs_set_glyph_h_kerning_func()
--hb_font_funcs_set_glyph_v_kerning_func()
--hb_font_get_glyph_h_kerning()
--hb_font_get_glyph_v_kerning()
--hb_font_get_glyph_kerning_for_direction()
--hb_ot_layout_table_choose_script()
--hb_ot_layout_script_find_language()
--hb_ot_tags_from_script()
--hb_ot_tag_from_language()
-
-
-Overview of changes leading to 1.9.0
-Monday, September 10, 2018
-====================================
-- Added 'cmap' API to hb_face_t.
-- Face-builder API.
-- hb-ot-font re-creation should be much leaner now, as the
- font tables it uses are cached on hb_face_t now.
-- Internal source header file name changes:
- hb-*-private.hh is renamed to hb-*.hh.
-
-New API:
-+HB_UNICODE_MAX
-+hb_face_collect_unicodes()
-+hb_face_collect_variation_selectors()
-+hb_face_collect_variation_unicodes()
-+hb_face_builder_create()
-+hb_face_builder_add_table()
-
-
-Overview of changes leading to 1.8.8
-Tuesday, August 14, 2018
-====================================
-- Fix hb-icu crash on architectures where compare_exchange_weak() can
- fail falsely. This bug was introduced in 1.8.4.
- https://bugs.chromium.org/p/chromium/issues/detail?id=873568
-- More internal refactoring of atomic operations and singletons.
-- API changes:
- The following functions do NOT reference their return value before
- returning:
- * hb_unicode_funcs_get_default()
- * hb_glib_get_unicode_funcs()
- * hb_icu_get_unicode_funcs()
- This is consistent with their naming ("get", instead of "reference")
- as well as how they are used in the wild (ie. no one calls destroy()
- on their return value.)
-
-
-Overview of changes leading to 1.8.7
-Wednesday, August 8, 2018
-====================================
-- Fix assertion failure with GDEF-blacklisted fonts.
-
-
-Overview of changes leading to 1.8.6
-Tuesday, August 7, 2018
-====================================
-- Internal code shuffling.
-- New API to speed up getting advance widths for implementations
- that have heavy overhead in get_h_advance callback:
-+hb_font_funcs_set_glyph_h_advances_func
-+hb_font_funcs_set_glyph_v_advances_func
-+hb_font_get_glyph_advances_for_direction
-+hb_font_get_glyph_h_advances
-+hb_font_get_glyph_h_advances_func_t
-+hb_font_get_glyph_v_advances
-+hb_font_get_glyph_v_advances_func_t
-
-
-Overview of changes leading to 1.8.5
-Wednesday, August 1, 2018
-====================================
-- Major Khmer shaper improvements to better match Microsoft.
-- Indic bug fixes.
-- Internal improvements to atomic operations.
-
-
-Overview of changes leading to 1.8.4
-Tuesday, July 17, 2018
-====================================
-- Fix build on non-C++11.
-- Use C++-style GCC atomics and C++11 atomics.
-
-
-Overview of changes leading to 1.8.3
-Wednesday, July 11, 2018
-====================================
-- A couple of Indic / USE bug fixes.
-- Disable vectorization, as it was causing unaligned access bus error on
- certain 32bit architectures.
-
-
-Overview of changes leading to 1.8.2
-Tuesday, July 3, 2018
-====================================
-- Fix infinite loop in Khmer shaper.
-- Improve hb_blob_create_from_file() for streams.
-
-
-Overview of changes leading to 1.8.1
-Tuesday, June 12, 2018
-====================================
-- Fix hb-version.h file generation; last two releases went out with wrong ones.
-- Add correctness bug in hb_set_t operations, introduced in 1.7.7.
-- Remove HB_SUBSET_BUILTIN build option. Not necessary.
-
-
-Overview of changes leading to 1.8.0
-Tuesday, June 5, 2018
-====================================
-- Update to Unicode 11.0.0.
-
-
-Overview of changes leading to 1.7.7
-Tuesday, June 5, 2018
-====================================
-- Lots of internal changes, but not yet exposed externally.
-- All HarfBuzz objects are significantly smaller in size now.
-- Sinhala: Position repha on top of post-consonant, not base.
- This better matches Windows 10 behavior, which was changed
- from previous Windows versions.
-- New build options:
- o New cpp macro HB_NO_ATEXIT
- o New cpp macro HB_SUBSET_BUILTIN
-- Significant libharfbuzz-subset changes. API subject to change.
-- New API in libharfbuzz:
-
-+hb_blob_create_from_file()
-+hb_face_count()
-
-A hashmap implementation:
-+hb-map.h
-+HB_MAP_VALUE_INVALID
-+hb_map_t
-+hb_map_create()
-+hb_map_get_empty()
-+hb_map_reference()
-+hb_map_destroy()
-+hb_map_set_user_data()
-+hb_map_get_user_data()
-+hb_map_allocation_successful()
-+hb_map_clear()
-+hb_map_is_empty()
-+hb_map_get_population()
-+hb_map_set()
-+hb_map_get()
-+hb_map_del()
-+hb_map_has()
-
-
-Overview of changes leading to 1.7.6
-Wednesday, March 7, 2018
-====================================
-
-- Fix to hb_set_t binary operations. Ouch.
-- New experimental harfbuzz-subset library. All of hb-subset.h
- is experimental right now and API WILL change.
-
-- New API:
-hb_blob_copy_writable_or_fail()
-HB_OT_TAG_BASE
-hb_set_previous()
-hb_set_previous_range()
-
-
-Overview of changes leading to 1.7.5
-Tuesday, January 30, 2018
-====================================
-
-- Separate Khmer shaper from Indic.
-- First stab at AAT morx. Not hooked up.
-- Misc bug fixes.
-
-
-Overview of changes leading to 1.7.4
-Wednesday, December 20, 2017
-====================================
-
-- Fix collect_glyphs() regression caused by hb_set_t changes.
-
-
-Overview of changes leading to 1.7.3
-Monday, December 18, 2017
-====================================
-
-- hb_set_t performance tuning and optimizations.
-- Speed up collect_glyphs() and reject garbage data.
-- In hb_coretext_font_create() set font point-size (ptem).
-- Misc fixes.
-
-
-Overview of changes leading to 1.7.2
-Monday, December 4, 2017
-====================================
-
-- Optimize hb_set_add_range().
-- Misc fixes.
-- New API:
-hb_coretext_font_create()
-
-
-Overview of changes leading to 1.7.1
-Tuesday, November 14, 2017
-====================================
-
-- Fix atexit object destruction regression.
-- Fix minor integer-overflow.
-
-
-Overview of changes leading to 1.7.0
-Monday, November 13, 2017
-====================================
-
-- Minor Indic fixes.
-- Implement kerning and glyph names in hb-ot-font.
-- Various DSO optimization re .data and .bss sizes.
-- Make C++11 optional; build fixes.
-- Mark all other backends "unsafe-to-break".
-- Graphite fix.
-
-
-Overview of changes leading to 1.6.3
-Thursday, October 26th, 2017
-====================================
-
-- Fix hb_set_t some more. Should be solid now.
-- Implement get_glyph_name() for hb-ot-font.
-- Misc fixes.
-
-
-Overview of changes leading to 1.6.2
-Monday, October 23nd, 2017
-====================================
-
-- Yesterday's release had a bad crasher; don't use it. That's what
- happens when one works on Sunday...
- https://github.com/harfbuzz/harfbuzz/issues/578
-- Build fixes for FreeBSD and Chrome Android.
-
-
-Overview of changes leading to 1.6.1
-Sunday, October 22nd, 2017
-====================================
-
-- Don't skip over COMBINING GRAPHEME JOINER when ligating, etc.
- To be refined: https://github.com/harfbuzz/harfbuzz/issues/554
-- Faster hb_set_t implementation.
-- Don't use deprecated ICU API.
-- Fix undefined-behavior in Myanmar shaper, introduced in 1.6.0
-- Deprecated API:
- hb_set_invert()
-
-
-Overview of changes leading to 1.6.0
-Friday, October the 13th, 2017
-====================================
-
-- Update to Unicode 10.
-
-- Various Indic and Universal Shaping Engine fixes as a result of
- HarfBuzz Hackfest with Jonathan Kew at Web Engines Hackfest at
- the Igalia offices in A Coruña, Spain. Thanks Igalia for having
- us!
-
-- Implement Unicode Arabic Mark Ordering Algorithm UTR#53.
-
-- Implement optical sizing / tracking in CoreText backend, using
- new API hb_font_set_ptem().
-
-- Allow notifying hb_font_t that underlying FT_Face changed sizing,
- using new API hb_ft_font_changed().
-
-- More Graphite backend RTL fixes.
-
-- Fix caching of variable font shaping plans.
-
-- hb-view / hb-shape now accept following new arguments:
-
- o --unicodes: takes a list of hex numbers that represent Unicode
- codepoints.
-
-New API:
-+hb_face_get_table_tags()
-+hb_font_set_ptem()
-+hb_font_get_ptem()
-+hb_ft_font_changed()
-
-
-Overview of changes leading to 1.5.1
-Tuesday, September 5, 2017
-====================================
-
-- Fix "unsafe-to-break" in fallback shaping and other corner cases.
- All our tests pass with --verify now, meaning unsafe-to-break API
- works as expected.
-- Add --unicodes to hb-view / hb-shape.
-- [indic] Treat Consonant_With_Stacker as consonant. This will need
- further tweaking.
-- hb_buffer_diff() tweaks.
-
-
-Overview of changes leading to 1.5.0
-Wednesday, August 23, 2017
-====================================
-
-- Misc new API, for appending a buffer to another, and for comparing
- contents of two buffers for types of differences.
-
-- New "unsafe-to-break" API. Can be used to speed up reshaping
- in line-breaking situations. Essentially, after shaping, it returns
- positions in the input string (some of the cluster boundaries) that
- are "safe to break" in that if the text is segmented at that position
- and two sides reshaped and concatenated, the shaping result is
- exactly the same as shaping the text in one piece.
-
- hb-view and hb-shape and hb-shape now take --verify, which verifies
- the above property.
-
- Some corner cases of the implementation are still not quite working.
- Those will be fixed in subsequent releases.
-
-- New API:
-
-hb_buffer_append()
-
-hb_glyph_flags_t
-HB_GLYPH_FLAG_UNSAFE_TO_BREAK
-HB_GLYPH_FLAG_DEFINED
-hb_glyph_info_get_glyph_flags()
-
-HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS
-
-hb_buffer_diff_flags_t
-HB_BUFFER_DIFF_FLAG_EQUAL
-HB_BUFFER_DIFF_FLAG_CONTENT_TYPE_MISMATCH
-HB_BUFFER_DIFF_FLAG_LENGTH_MISMATCH
-HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT
-HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT
-HB_BUFFER_DIFF_FLAG_CODEPOINT_MISMATCH
-HB_BUFFER_DIFF_FLAG_CLUSTER_MISMATCH
-HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH
-HB_BUFFER_DIFF_FLAG_POSITION_MISMATCH
-hb_buffer_diff
-
-
-Overview of changes leading to 1.4.8
-Tuesday, August 8, 2017
-====================================
-
-- Major fix to avar table handling.
-- Rename hb-shape --show-message to --trace.
-- Build fixes.
-
-
-Overview of changes leading to 1.4.7
-Tuesday, July 18, 2017
-====================================
-
-- Multiple Indic, Tibetan, and Cham fixes.
-- CoreText: Allow disabling kerning.
-- Adjust Arabic feature order again.
-- Misc build fixes.
-
-
-Overview of changes leading to 1.4.6
-Sunday, April 23, 2017
-====================================
-
-- Graphite2: Fix RTL positioning issue.
-- Backlist GDEF of more versions of Padauk and Tahoma.
-- New, experimental, cmake alternative build system.
-
-
-Overview of changes leading to 1.4.5
-Friday, March 10, 2017
-====================================
-
-- Revert "Fix Context lookup application when moving back after a glyph..."
- This introduced memory access problems. To be fixed properly soon.
-
-
-Overview of changes leading to 1.4.4
-Sunday, March 5, 2017
-====================================
-
-- Fix Context lookup application when moving back after a glyph deletion.
-- Fix buffer-overrun in Bengali.
-
-
-Overview of changes leading to 1.4.3
-Saturday, February 25, 2017
-====================================
-
-- Route Adlam script to Arabic shaper.
-- Misc fixes.
-- New API:
- hb_font_set_face()
-- Deprecate API:
- hb_graphite2_font_get_gr_font()
-
-
-Overview of changes leading to 1.4.2
-Monday, January 23, 2017
-====================================
-
-- Implement OpenType Font Variation tables avar/fvar/HVAR/VVAR.
-- hb-shape and hb-view now accept --variations.
-- New API:
-
-hb_variation_t
-hb_variation_from_string()
-hb_variation_to_string()
-
-hb_font_set_variations()
-hb_font_set_var_coords_design()
-hb_font_get_var_coords_normalized()
-
-hb-ot-var.h:
-hb_ot_var_axis_t
-hb_ot_var_has_data()
-hb_ot_var_get_axis_count()
-hb_ot_var_get_axes()
-hb_ot_var_find_axis()
-hb_ot_var_normalize_variations()
-hb_ot_var_normalize_coords()
-
-- MVAR to be implemented later. Access to named instances to be
- implemented later as well.
-
-- Misc fixes.
-
-
-Overview of changes leading to 1.4.1
-Thursday, January 5, 2017
-====================================
-
-- Always build and use UCDN for Unicode data by default.
- Reduces dependence on version of Unicode data in glib,
- specially in the Windows bundles we are shipping, which
- have very old glib.
-
-
-Overview of changes leading to 1.4.0
-Thursday, January 5, 2017
-====================================
-
-- Merged "OpenType GX" branch which adds core of support for
- OpenType 1.8 Font Variations. To that extent, the relevant
- new API is:
-
-New API:
-hb_font_set_var_coords_normalized()
-
- with supporting API:
-
-New API:
-HB_OT_LAYOUT_NO_VARIATIONS_INDEX
-hb_ot_layout_table_find_feature_variations()
-hb_ot_layout_feature_with_variations_get_lookups()
-hb_shape_plan_create2()
-hb_shape_plan_create_cached2()
-
- Currently variations in GSUB/GPOS/GDEF are fully supported,
- and no other tables are supported. In particular, fvar/avar
- are NOT supported, hence the hb_font_set_var_coords_normalized()
- taking normalized coordinates. API to take design coordinates
- will be added in the future.
-
- HVAR/VVAR/MVAR support will also be added to hb-ot-font in the
- future.
-
-- Fix regression in GDEF glyph class processing.
-- Add decompositions for Chakma, Limbu, and Balinese in USE shaper.
-- Misc fixes.
-
-
-Overview of changes leading to 1.3.4
-Monday, December 5, 2016
-====================================
-
-- Fix vertical glyph origin in hb-ot-font.
-- Implement CBDT/CBLC color font glyph extents in hb-ot-font.
-
-
-Overview of changes leading to 1.3.3
-Wednesday, September 28, 2016
-====================================
-
-- Implement parsing of OpenType MATH table.
-New API:
-HB_OT_TAG_MATH
-HB_OT_MATH_SCRIPT
-hb_ot_math_constant_t
-hb_ot_math_kern_t
-hb_ot_math_glyph_variant_t
-hb_ot_math_glyph_part_flags_t
-hb_ot_math_glyph_part_t
-hb_ot_math_has_data
-hb_ot_math_get_constant
-hb_ot_math_get_glyph_italics_correction
-hb_ot_math_get_glyph_top_accent_attachment
-hb_ot_math_get_glyph_kerning
-hb_ot_math_is_glyph_extended_shape
-hb_ot_math_get_glyph_variants
-hb_ot_math_get_min_connector_overlap
-hb_ot_math_get_glyph_assembly
-
-
-Overview of changes leading to 1.3.2
-Wednesday, September 27, 2016
-====================================
-
-- Fix build of hb-coretext on older OS X versions.
-
-
-Overview of changes leading to 1.3.1
-Wednesday, September 7, 2016
-====================================
-
-- Blacklist bad GDEF of more fonts (Padauk).
-- More CoreText backend crash fixes with OS X 10.9.5.
-- Misc fixes.
-
-
-Overview of changes leading to 1.3.0
-Thursday, July 21, 2016
-====================================
-
-- Update to Unicode 9.0.0
-- Move Javanese from Indic shaper to Universal Shaping Engine.
-- Allow MultipleSubst to delete a glyph (matching Windows engine).
-- Update Universal Shaping Engine to latest draft from Microsoft.
-- DirectWrite backend improvements. Note: this backend is for testing ONLY.
-- CoreText backend improvements with unreachable fonts.
-- Implement symbol fonts (cmap 3.0.0) in hb-ft and hb-ot-font.
-- Blacklist bad GDEF of more fonts (Tahoma & others).
-- Misc fixes.
-
-
-Overview of changes leading to 1.2.7
-Monday, May 2, 2016
-====================================
-
-- Blacklist another version of Times New Roman (Bold) Italic from Windows 7.
-- Fix Mongolian Free Variation Selectors shaping with certain fonts.
-- Fix Tibetan shorthand contractions shaping.
-- Improved list of language tag mappings.
-- Unbreak build on Windows CE.
-- Make 'glyf' table loading lazy in hb-ot-font.
-
-
-Overview of changes leading to 1.2.6
-Friday, April 8, 2016
-====================================
-
-- Blacklist GDEF table of another set of Times New Roman (Bold) Italic.
-- DirectWrite backend improvements. Note: DirectWrite backend is
- exclusively for our internal testing and should NOT be used in any
- production system whatsoever.
-
-
-Overview of changes leading to 1.2.5
-Monday, April 4, 2016
-====================================
-
-- Fix GDEF mark-filtering-set, which was broken in 1.2.3.
-
-
-Overview of changes leading to 1.2.4
-Thursday, March 17, 2016
-====================================
-
-- Synthesize GDEF glyph class for any glyph that does not have one in GDEF.
- I really hope we don't discover broken fonts that shape badly with this
- change.
-- Misc build and other minor fixes.
-- API changes:
- - Added HB_NDEBUG. It's fine for production systems to define this to
- disable high-overhead debugging checks. However, I also reduced the
- overhead of those checks, so it's a non-issue right now. You can
- forget it. Just not defining anything at all is fine.
-
-
-Overview of changes leading to 1.2.3
-Thursday, February 25, 2016
-====================================
-
-- Blacklist GDEF table of certain versions of Times New Roman (Bold) Italic,
- due to bug in glyph class of ASCII double-quote character. This should
- address "regression" introduced in 1.2.0 when we switched mark zeroing
- in most shapers from BY_UNICODE_LATE to BY_GDEF_LATE.
- This fourth release in a week should finally stablize things...
-
-- hb-ot-font's get_glyph() implementation saw some optimizations. Though,
- might be really hard to measure in real-world situations.
-
-- Also, two rather small API changes:
-
-We now disable some time-consuming internal bookkeeping if built with NDEBUG
-defined. This is a first time that we use NDEBUG to disable debug code. If
-there exist production systems that do NOT want to enable NDEBUG, please let
-me know and I'll add HB_NDEBUG.
-
-Added get_nominal_glyph() and get_variation_glyph() instead of get_glyph()
-
-New API:
-- hb_font_get_nominal_glyph_func_t
-- hb_font_get_variation_glyph_func_t
-- hb_font_funcs_set_nominal_glyph_func()
-- hb_font_funcs_set_variation_glyph_func()
-- hb_font_get_nominal_glyph()
-- hb_font_get_variation_glyph()
-
-Deprecated API:
-- hb_font_get_glyph_func_t
-- hb_font_funcs_set_glyph_func()
-
-Clients that implement their own font-funcs are encouraged to replace
-their get_glyph() implementation with a get_nominal_glyph() and
-get_variation_glyph() pair. The variation version can assume that
-variation_selector argument is not zero. Old (deprecated) functions
-will continue working indefinitely using internal gymnastics; it is
-just more efficient to use the new functions.
-
-
-Overview of changes leading to 1.2.2
-Wednesday, February 24, 2016
-====================================
-
-- Fix regression with mark positioning with fonts that have
- non-zero mark advances. This was introduced in 1.2.0 while
- trying to make mark and cursive attachments to work together.
- I have partially reverted that, so this version is much more
- like what we had before. All clients who updated to 1.2.0
- should update to this version.
-
-
-Overview of changes leading to 1.2.1
-Tuesday, February 23, 2016
-====================================
-
-- CoreText: Fix bug with wrong scale if font scale was changed later.
- https://github.com/libass/libass/issues/212
-- CoreText: Drastically speed up font initialization.
-- CoreText: Fix tiny leak.
-- Group ZWJ/ZWNJ with previous syllable under cluster-level=0.
- https://github.com/harfbuzz/harfbuzz/issues/217
-- Add test/shaping/README.md about how to add tests to the suite.
-
-
-Overview of changes leading to 1.2.0
-Friday, February 19, 2016
-====================================
-
-- Fix various issues (hangs mostly) in case of memory allocation failure.
-- Change mark zeroing types of most shapers from BY_UNICODE_LATE to
- BY_GDEF_LATE. This seems to be what Uniscribe does.
-- Change mark zeroing of USE shaper from NONE to BY_GDEF_EARLY. That's
- what Windows does.
-- Allow GPOS cursive connection on marks, and fix the interaction with
- mark attachment. This work resulted in some changes to how mark
- attachments work. See:
- https://github.com/harfbuzz/harfbuzz/issues/211
- https://github.com/harfbuzz/harfbuzz/commit/86c68c7a2c971efe8e35b1f1bd99401dc8b688d2
-- Graphite2 shaper: improved negative advance handling (eg. Nastaliq).
-- Add nmake-based build system for Windows.
-- Minor speedup.
-- Misc. improvements.
-
-
-Overview of changes leading to 1.1.3
-Monday, January 11, 2016
-====================================
-
-- Ported Indic shaper to Unicode 8.0 data.
-- Universal Shaping Engine fixes.
-- Speed up CoreText shaper when font fallback happens in CoreText.
-- Documentation improvements, thanks to Khaled Hosny.
-- Very rough directwrite shaper for testing, thanks to Ebrahim Byagowi.
-- Misc bug fixes.
-- New API:
-
- * Font extents:
- hb_font_extents_t
- hb_font_get_font_extents_func_t
- hb_font_get_font_h_extents_func_t
- hb_font_get_font_v_extents_func_t
- hb_font_funcs_set_font_h_extents_func
- hb_font_funcs_set_font_v_extents_func
- hb_font_get_h_extents
- hb_font_get_v_extents
- hb_font_get_extents_for_direction
-
- * Buffer message (aka debug):
- hb_buffer_message_func_t
- hb_buffer_set_message_func()
- Actual message protocol to be fleshed out later.
-
-
-Overview of changes leading to 1.1.2
-Wednesday, November 26, 2015
-====================================
-
-- Fix badly-broken fallback shaper that affected terminology.
- https://github.com/harfbuzz/harfbuzz/issues/187
-- Fix y_scaling in Graphite shaper.
-- API changes:
- * An unset glyph_h_origin() function in font-funcs now (sensibly)
- implies horizontal origin at 0,0. Ie, the nil callback returns
- true instead of false. As such, implementations that have a
- glyph_h_origin() that simply returns true, can remove that function
- with HarfBuzz >= 1.1.2. This results in a tiny speedup.
-
-
-Overview of changes leading to 1.1.1
-Wednesday, November 24, 2015
-====================================
-
-- Build fixes, specially for hb-coretext.
-
-
-Overview of changes leading to 1.1.0
-Wednesday, November 18, 2015
-====================================
-
-- Implement 'stch' stretch feature for Syriac Abbreviation Mark.
- https://github.com/harfbuzz/harfbuzz/issues/141
-- Disable use of decompose_compatibility() callback.
-- Implement "shaping" of various Unicode space characters, even
- if the font does not support them.
- https://github.com/harfbuzz/harfbuzz/issues/153
-- If font does not support U+2011 NO-BREAK HYPHEN, fallback to
- U+2010 HYPHEN.
-- Changes resulting from libFuzzer continuous fuzzing:
- * Reject font tables that need more than 8 edits,
- * Bound buffer growth during shaping to 32x,
- * Fix assertions and other issues at OOM / buffer max-growth.
-- Misc fixes and optimizations.
-- API changes:
- * All fonts created with hb_font_create() now inherit from
- (ie. have parent) hb_font_get_empty().
-
-
-Overview of changes leading to 1.0.6
-Thursday, October 15, 2015
-====================================
-
-- Reduce max nesting level in OT lookups from 8 to 6.
- Should not affect any real font as far as I know.
-- Fix memory access issue in ot-font.
-- Revert default load-flags of fonts created using hb_ft_font_create()
- back to FT_LOAD_DEFAULT|FT_LOAD_NO_HINTING. This was changed in
- last release (1.0.5), but caused major issues, so revert.
- https://github.com/harfbuzz/harfbuzz/issues/143
-
-
-Overview of changes leading to 1.0.5
-Tuesday, October 13, 2015
-====================================
-
-- Fix multiple memory access bugs discovered using libFuzzer.
- https://github.com/harfbuzz/harfbuzz/issues/139
- Everyone should upgrade to this version as soon as possible.
- We now have continuous fuzzing set up, to avoid issues like
- these creeping in again.
-- Misc fixes.
-
-- New API:
- * hb_font_set_parent().
- * hb_ft_font_[sg]et_load_flags()
- The default flags for fonts created using hb_ft_font_create()
- has changed to default to FT_LOAD_DEFAULT now. Previously it
- was defaulting to FT_LOAD_DFEAULT|FT_LOAD_NO_HINTING.
-
-- API changes:
- * Fonts now default to units-per-EM as their scale, instead of 0.
- * hb_font_create_sub_font() does NOT make parent font immutable
- anymore. hb_font_make_immutable() does.
-
-
-Overview of changes leading to 1.0.4
-Wednesday, September 30, 2015
-====================================
-
-- Fix minor out-of-bounds read error.
-
-
-Overview of changes leading to 1.0.3
-Tuesday, September 1, 2015
-====================================
-
-- Start of user documentation, from Simon Cozens!
-- Implement glyph_extents() for TrueType fonts in hb-ot-font.
-- Improve GPOS cursive attachments with conflicting lookups.
-- More fixes for cluster-level = 1.
-- Uniscribe positioning fix.
-
-
-Overview of changes leading to 1.0.2
-Wednesday, August 19, 2015
-====================================
-
-- Fix shaping with cluster-level > 0.
-- Fix Uniscribe backend font-size scaling.
-- Declare dependencies in harfbuzz.pc.
- FreeType is not declared though, to avoid bugs in pkg-config
- 0.26 with recursive dependencies.
-- Slightly improved debug infrastructure. More to come later.
-- Misc build fixes.
-
-
-Overview of changes leading to 1.0.1
-Monday, July 27, 2015
-====================================
-
-- Fix out-of-bounds access in USE shaper.
-
-
-Overview of changes leading to 1.0.0
-Sunday, July 26, 2015
-====================================
-
-- Implement Universal Shaping Engine:
- https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm
- http://blogs.windows.com/bloggingwindows/2015/02/23/windows-shapes-the-worlds-languages/
-- Bump version to 1.0.0. The soname was NOT bumped.
-
-
-Overview of changes leading to 0.9.42
-Thursday, July 26, 2015
-=====================================
-
-- New API to allow for retrieving finer-grained cluster
- mappings if the client desires to handle them. Default
- behavior is unchanged.
-- Fix cluster merging when removing default-ignorables.
-- Update to Unicode 8.0
-- hb-graphite2 fixes.
-- Misc fixes.
-- Removed HB_NO_MERGE_CLUSTERS hack.
-- New API:
- hb_buffer_cluster_level_t enum
- hb_buffer_get_cluster_level()
- hb_buffer_set_cluster_level()
- hb-shape / hb-view --cluster-level
-
-
-Overview of changes leading to 0.9.41
-Thursday, June 18, 2015
-=====================================
-
-- Fix hb-coretext with trailing whitespace in right-to-left.
-- New API: hb_buffer_reverse_range().
-- Allow implementing atomic ops in config.h.
-- Fix hb_language_t in language bindings.
-- Misc fixes.
-
-
-Overview of changes leading to 0.9.40
-Friday, March 20, 2015
-=====================================
-
-- Another hb-coretext crasher fix. Ouch!
-- Happy Norouz!
-
-
-Overview of changes leading to 0.9.39
-Wednesday, March 4, 2015
-=====================================
-
-- Critical hb-coretext fixes.
-- Optimizations and refactoring; no functional change
- expected.
-- Misc build fixes.
-
-
-Overview of changes leading to 0.9.38
-Friday, January 23, 2015
-=====================================
-
-- Fix minor out-of-bounds access in Indic shaper.
-- Change New Tai Lue shaping engine from South-East Asian to default,
- reflecting change in Unicode encoding model.
-- Add hb-shape --font-size. Can take up to two numbers for separate
- x / y size.
-- Fix CoreText and FreeType scale issues with negative scales.
-- Reject blobs larger than 2GB. This might break some icu-le-hb clients
- that need security fixes. See:
- http://www.icu-project.org/trac/ticket/11450
-- Avoid accessing font tables during face destruction, in casce rogue
- clients released face data already.
-- Fix up gobject-introspection a bit. Python bindings kinda working.
- See README.python.
-- Misc fixes.
-- API additions:
- hb_ft_face_create_referenced()
- hb_ft_font_create_referenced()
-
-
-Overview of changes leading to 0.9.37
-Wednesday, December 17, 2014
-=====================================
-
-- Fix out-of-bounds access in Context lookup format 3.
-- Indic: Allow ZWJ/ZWNJ before syllable modifiers.
-
-
-Overview of changes leading to 0.9.36
-Thursday, November 20, 2014
-=====================================
-
-- First time that three months went by without a release since
- 0.9.2 was released on August 10, 2012!
-- Fix performance bug in hb_ot_collect_glyphs():
- https://bugzilla.mozilla.org/show_bug.cgi?id=1090869
-- Add basic vertical-text support to hb-ot-font.
-- Misc build fixes.
-
-
-Overview of changes leading to 0.9.35
-Saturday, August 13, 2014
-=====================================
-
-- Fix major shape-plan caching bug when more than one shaper were
- provided to hb_shape_full() (as exercised by XeTeX).
- http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1246370.html
-- Fix Arabic fallback shaping regression. This was broken in 0.9.32.
-- Major hb-coretext fixes. That backend is complete now, including
- respecing buffer direction and language, down to vertical writing.
-- Build fixes for Windows CE. Should build fine now.
-- Misc fixes:
- Use atexit() only if it's safe to call from shared library
- https://bugs.freedesktop.org/show_bug.cgi?id=82246
- Mandaic had errors in its Unicode Joining_Type
- https://bugs.freedesktop.org/show_bug.cgi?id=82306
-- API changes:
-
- * hb_buffer_clear_contents() does not reset buffer flags now.
-
- After 763e5466c0a03a7c27020e1e2598e488612529a7, one doesn't
- need to set flags for different pieces of text. The flags now
- are something the client sets up once, depending on how it
- actually uses the buffer. As such, don't clear it in
- clear_contents().
-
- I don't expect any changes to be needed to any existing client.
-
-
-Overview of changes leading to 0.9.34
-Saturday, August 2, 2014
-=====================================
-
-- hb_feature_from_string() now accepts CSS font-feature-settings format.
-- As a result, hb-shape / hb-view --features also accept CSS-style strings.
- Eg, "'liga' off" is accepted now.
-- Add old-spec Myanmar shaper:
- https://bugs.freedesktop.org/show_bug.cgi?id=81775
-- Don't apply 'calt' in Hangul shaper.
-- Fix mark advance zeroing for Hebrew shaper:
- https://bugs.freedesktop.org/show_bug.cgi?id=76767
-- Implement Windows-1256 custom Arabic shaping. Only built on Windows,
- and requires help from get_glyph(). Used by Firefox.
- https://bugzilla.mozilla.org/show_bug.cgi?id=1045139
-- Disable 'liga' in vertical text.
-- Build fixes.
-- API changes:
-
- * Make HB_BUFFER_FLAG_BOT/EOT easier to use.
-
- Previously, we expected users to provide BOT/EOT flags when the
- text *segment* was at paragraph boundaries. This meant that for
- clients that provide full paragraph to HarfBuzz (eg. Pango), they
- had code like this:
-
- hb_buffer_set_flags (hb_buffer,
- (item_offset == 0 ? HB_BUFFER_FLAG_BOT : 0) |
- (item_offset + item_length == paragraph_length ?
- HB_BUFFER_FLAG_EOT : 0));
-
- hb_buffer_add_utf8 (hb_buffer,
- paragraph_text, paragraph_length,
- item_offset, item_length);
-
- After this change such clients can simply say:
-
- hb_buffer_set_flags (hb_buffer,
- HB_BUFFER_FLAG_BOT | HB_BUFFER_FLAG_EOT);
-
- hb_buffer_add_utf8 (hb_buffer,
- paragraph_text, paragraph_length,
- item_offset, item_length);
-
- Ie, HarfBuzz itself checks whether the segment is at the beginning/end
- of the paragraph. Clients that only pass item-at-a-time to HarfBuzz
- continue not setting any flags whatsoever.
-
- Another way to put it is: if there's pre-context text in the buffer,
- HarfBuzz ignores the BOT flag. If there's post-context, it ignores
- EOT flag.
-
-
-Overview of changes leading to 0.9.33
-Tuesday, July 22, 2014
-=====================================
-
-- Turn off ARabic 'cswh' feature that was accidentally turned on.
-- Add HB_TAG_MAX_SIGNED.
-- Make hb_face_make_immutable() really make face immutable!
-- Windows build fixes.
-
-
-Overview of changes leading to 0.9.32
-Thursday, July 17, 2014
-=====================================
-
-- Apply Arabic shaping features in spec order exactly.
-- Another fix for Mongolian free variation selectors.
-- For non-Arabic scripts in Arabic shaper apply 'rlig' and 'calt'
- together.
-- Minor adjustment to U+FFFD logic.
-- Fix hb-coretext build.
-
-
-Overview of changes leading to 0.9.31
-Wednesday, July 16, 2014
-=====================================
-
-- Only accept valid UTF-8/16/32; we missed many cases before.
-- Better shaping of invalid UTF-8/16/32. Falls back to
- U+FFFD REPLACEMENT CHARACTER now.
-- With all changes in this release, the buffer will contain fully
- valid Unicode after hb_buffer_add_utf8/16/32 no matter how
- broken the input is. This can be overridden though. See below.
-- Fix Mongolian Variation Selectors for fonts without GDEF.
-- Fix minor invalid buffer access.
-- Accept zh-Hant and zh-Hans language tags. hb_ot_tag_to_language()
- now uses these instead of private tags.
-- Build fixes.
-- New API:
- * hb_buffer_add_codepoints(). This does what hb_buffer_add_utf32()
- used to do, ie. no validity check on the input at all. add_utf32
- now replaces invalid Unicode codepoints with the replacement
- character (see below).
- * hb_buffer_set_replacement_codepoint()
- * hb_buffer_get_replacement_codepoint()
- Previously, in hb_buffer_add_utf8 and hb_buffer_add_utf16, when
- we detected broken input, we replaced that with (hb_codepoint_t)-1.
- This has changed to use U+FFFD now, but can be changed using these
- new API.
-
-
-Overview of changes leading to 0.9.30
-Wednesday, July 9, 2014
-=====================================
-
-- Update to Unicode 7.0.0:
- * New scripts Manichaean and Psalter Pahlavi are shaped using
- Arabic shaper.
- * All the other new scripts to through the generic shaper for
- now.
-- Minor Indic improvements.
-- Fix graphite2 backend cluster mapping [crasher!]
-- API changes:
- * New HB_SCRIPT_* values for Unicode 7.0 scripts.
- * New function hb_ot_layout_language_get_required_feature().
-- Build fixes.
-
-
-Overview of changes leading to 0.9.29
-Thursday, May 29, 2014
-=====================================
-
-- Implement cmap in hb-ot-font.h. No variation-selectors yet.
-- Myanmar: Allow MedialYa+Asat.
-- Various Indic fixes:
- * Support most characters in Extended Devanagary and Vedic
- Unicode blocks.
- * Allow digits and a some punctuation as consonant placeholders.
-- Build fixes.
-
-
-Overview of changes leading to 0.9.28
-Monday, April 28, 2014
-=====================================
-
-- Unbreak old-spec Indic shaping. (bug 76705)
-- Fix shaping of U+17DD and U+0FC6.
-- Add HB_NO_MERGE_CLUSTERS build option. NOT to be enabled by default
- for shipping libraries. It's an option for further experimentation
- right now. When we are sure how to do it properly, we will add
- public run-time API for the functionality.
-- Build fixes.
-
-
-Overview of changes leading to 0.9.27
-Tuesday, March 18, 2014
-=====================================
-
-- Don't use "register" storage class specifier
-- Wrap definition of free_langs() with HAVE_ATEXIT
-- Add coretext_aat shaper and hb_coretext_face_create() constructor
-- If HAVE_ICU_BUILTIN is defined, use hb-icu Unicode callbacks
-- Add Myanmar test case from OpenType Myanmar spec
-- Only do fallback Hebrew composition if no GPOS 'mark' available
-- Allow bootstrapping without gtk-doc
-- Use AM_MISSING_PROG for ragel and git
-- Typo in ucdn's Makefile.am
-- Improve MemoryBarrier() implementation
-
-
-Overview of changes leading to 0.9.26
-Thursday, January 30, 2014
-=====================================
-
-- Misc fixes.
-- Fix application of 'rtlm' feature.
-- Automatically apply frac/numr/dnom around U+2044 FRACTION SLASH.
-- New header: hb-ot-shape.h
-- Uniscribe: fix scratch-buffer accounting.
-- Reorder Tai Tham SAKOT to after tone-marks.
-- Add Hangul shaper.
-- New files:
- hb-ot-shape-complex-hangul.cc
- hb-ot-shape-complex-hebrew.cc
- hb-ot-shape-complex-tibetan.cc
-- Disable 'cswh' feature in Arabic shaper.
-- Coretext: better handle surrogate pairs.
-- Add HB_TAG_MAX and _HB_SCRIPT_MAX_VALUE.
-
-
-Overview of changes leading to 0.9.25
-Wednesday, December 4, 2013
-=====================================
-
-- Myanmar shaper improvements.
-- Avoid font fallback in CoreText backend.
-- Additional OpenType language tag mappiongs.
-- More aggressive shape-plan caching.
-- Build with / require automake 1.13.
-- Build with libtool 2.4.2.418 alpha to support ppc64le.
-
-
-Overview of changes leading to 0.9.24
-Tuesday, November 13, 2013
-=====================================
-
-- Misc compiler warning fixes with clang.
-- No functional changes.
-
-
-Overview of changes leading to 0.9.23
-Monday, October 28, 2013
-=====================================
-
-- "Udupi HarfBuzz Hackfest", Paris, October 14..18 2013.
-- Fix (Chain)Context recursion with non-monotone lookup positions.
-- Misc Indic bug fixes.
-- New Javanese / Buginese shaping, similar to Windows 8.1.
-
-
-Overview of changes leading to 0.9.22
-Thursday, October 3, 2013
-=====================================
-
-- Fix use-after-end-of-scope in hb_language_from_string().
-- Fix hiding of default_ignorables if font doesn't have space glyph.
-- Protect against out-of-range lookup indices.
-
-- API Changes:
-
- * Added hb_ot_layout_table_get_lookup_count()
-
-
-Overview of changes leading to 0.9.21
-Monday, September 16, 2013
-=====================================
-
-- Rename gobject-introspection library name from harfbuzz to HarfBuzz.
-- Remove (long disabled) hb-old and hb-icu-le test shapers.
-- Misc gtk-doc and gobject-introspection annotations.
-- Misc fixes.
-- API changes:
-
- * Add HB_SET_VALUE_INVALID
-
-Overview of changes leading to 0.9.20
-Thursday, August 29, 2013
-=====================================
-
-General:
-- Misc substitute_closure() fixes.
-- Build fixes.
-
-Documentation:
-- gtk-doc boilerplate integrated. Docs are built now, but
- contain no contents. By next release hopefully we have
- some content in. Enable using --enable-gtk-doc.
-
-GObject and Introspection:
-- Added harfbuzz-gobject library (hb-gobject.h) that has type
- bindings for all HarfBuzz objects and enums. Enable using
- --with-gobject.
-- Added gobject-introspection boilerplate. Nothing useful
- right now. Work in progress. Gets enabled automatically if
- --with-gobject is used. Override with --disable-introspection.
-
-OpenType shaper:
-- Apply 'mark' in Myanmar shaper.
-- Don't apply 'dlig' by default.
-
-Uniscribe shaper:
-- Support user features.
-- Fix loading of fonts that are also installed on the system.
-- Fix shaping of Arabic Presentation Forms.
-- Fix build with wide chars.
-
-CoreText shaper:
-- Support user features.
-
-Source changes:
-- hb_face_t code moved to hb-face.h / hb-face.cc.
-- Added hb-deprecated.h.
-
-API changes:
-- Added HB_DISABLE_DEPRECATED.
-- Deprecated HB_SCRIPT_CANADIAN_ABORIGINAL; replaced by
- HB_SCRIPT_CANADIAN_SYLLABICS.
-- Deprecated HB_BUFFER_FLAGS_DEFAULT; replaced by
- HB_BUFFER_FLAG_DEFAULT.
-- Deprecated HB_BUFFER_SERIALIZE_FLAGS_DEFAULT; replaced by
- HB_BUFFER_SERIALIZE_FLAG_DEFAULT.
-
-
-Overview of changes leading to 0.9.19
-Tuesday, July 16, 2013
-=====================================
-
-- Build fixes.
-- Better handling of multiple variation selectors in a row.
-- Pass on variation selector to GSUB if not consumed by cmap.
-- Fix undefined memory access.
-- Add Javanese config to Indic shaper.
-- Misc bug fixes.
-
-Overview of changes leading to 0.9.18
-Tuesday, May 28, 2013
-=====================================
-
-New build system:
-
-- All unneeded code is all disabled by default,
-
-- Uniscribe and CoreText shapers can be enabled with their --with options,
-
-- icu_le and old shapers cannot be enabled for now,
-
-- glib, freetype, and cairo will be detected automatically.
- They can be force on/off'ed with their --with options,
-
-- icu and graphite2 are default off, can be enabled with their --with
- options,
-
-Moreover, ICU support is now build into a separate library:
-libharfbuzz-icu.so, and a new harfbuzz-icu.pc is shipped for it.
-Distros can enable ICU now without every application on earth
-getting linked to via libharfbuzz.so.
-
-For distros I recommend that they make sure they are building --with-glib
---with-freetype --with-cairo, --with-icu, and optionally --with-graphite2;
-And package harfbuzz and harfbuzz-icu separately.
-
-
-Overview of changes leading to 0.9.17
-Monday, May 20, 2013
-=====================================
-
-- Build fixes.
-- Fix bug in hb_set_get_min().
-- Fix regression with Arabic mark positioning / width-zeroing.
-
-Overview of changes leading to 0.9.16
-Friday, April 19, 2013
-=====================================
-
-- Major speedup in OpenType lookup processing. With the Amiri
- Arabic font, this release is over 3x faster than previous
- release. All scripts / languages should see this speedup.
-
-- New --num-iterations option for hb-shape / hb-view; useful for
- profiling.
-
-Overview of changes leading to 0.9.15
-Friday, April 05, 2013
-=====================================
-
-- Build fixes.
-- Fix crasher in graphite2 shaper.
-- Fix Arabic mark width zeroing regression.
-- Don't compose Hangul jamo into Unicode syllables.
-
-
-Overview of changes leading to 0.9.14
-Thursday, March 21, 2013
-=====================================
-
-- Build fixes.
-- Fix time-consuming sanitize with malicious fonts.
-- Implement hb_buffer_deserialize_glyphs() for both json and text.
-- Do not ignore Hangul filler characters.
-- Indic fixes:
- * Fix Malayalam pre-base reordering interaction with post-forms.
- * Further adjust ZWJ handling. Should fix known regressions from
- 0.9.13.
-
-
-Overview of changes leading to 0.9.13
-Thursday, February 25, 2013
-=====================================
-
-- Build fixes.
-- Ngapi HarfBuzz Hackfest in London (February 2013):
- * Fixed all known Indic bugs,
- * New Win8-style Myanmar shaper,
- * New South-East Asian shaper for Tai Tham, Cham, and New Tai Lue,
- * Smartly ignore Default_Ignorable characters (joiners, etc) wheb
- matching GSUB/GPOS lookups,
- * Fix 'Phags-Pa U+A872 shaping,
- * Fix partial disabling of default-on features,
- * Allow disabling of TrueType kerning.
-- Fix possible crasher with broken fonts with overlapping tables.
-- Removed generated files from git again. So, one needs ragel to
- bootstrap from the git tree.
-
-API changes:
-- hb_shape() and related APIs now abort if buffer direction is
- HB_DIRECTION_INVALID. Previously, hb_shape() was calling
- hb_buffer_guess_segment_properties() on the buffer before
- shaping. The heuristics in that function are fragile. If the
- user really wants the old behvaior, they can call that function
- right before calling hb_shape() to get the old behavior.
-- hb_blob_create_sub_blob() always creates sub-blob with
- HB_MEMORY_MODE_READONLY. See comments for the reason.
-
-
-Overview of changes leading to 0.9.12
-Thursday, January 18, 2013
-=====================================
-
-- Build fixes for Sun compiler.
-- Minor bug fix.
-
-Overview of changes leading to 0.9.11
-Thursday, January 10, 2013
-=====================================
-
-- Build fixes.
-- Fix GPOS mark attachment with null Anchor offsets.
-- [Indic] Fix old-spec reordering of viramas if sequence ends in one.
-- Fix multi-threaded shaper data creation crash.
-- Add atomic ops for Solaris.
-
-API changes:
-- Rename hb_buffer_clear() to hb_buffer_clear_contents().
-
-
-Overview of changes leading to 0.9.10
-Thursday, January 3, 2013
-=====================================
-
-- [Indic] Fixed rendering of Malayalam dot-reph
-- Updated OT language tags.
-- Updated graphite2 backend.
-- Improved hb_ot_layout_get_size_params() logic.
-- Improve hb-shape/hb-view help output.
-- Fixed hb-set.h implementation to not crash.
-- Fixed various issues with hb_ot_layout_collect_lookups().
-- Various build fixes.
-
-New API:
-
-hb_graphite2_face_get_gr_face()
-hb_graphite2_font_get_gr_font()
-hb_coretext_face_get_cg_font()
-
-Modified API:
-
-hb_ot_layout_get_size_params()
-
-
-Overview of changes leading to 0.9.9
-Wednesday, December 5, 2012
-====================================
-
-- Fix build on Windows.
-- Minor improvements.
-
-
-Overview of changes leading to 0.9.8
-Tuesday, December 4, 2012
-====================================
-
-
-- Actually implement hb_shape_plan_get_shaper ().
-- Make UCDB data tables const.
-- Lots of internal refactoring in OTLayout tables.
-- Flesh out hb_ot_layout_lookup_collect_glyphs().
-
-New API:
-
-hb_ot_layout_collect_lookups()
-hb_ot_layout_get_size_params()
-
-
-Overview of changes leading to 0.9.7
-Sunday, November 21, 2012
-====================================
-
-
-HarfBuzz "All-You-Can-Eat-Sushi" (aka Vancouver) Hackfest and follow-on fixes.
-
-- Fix Arabic contextual joining using pre-context text.
-- Fix Sinhala "split matra" mess.
-- Fix Khmer shaping with broken fonts.
-- Implement Thai "PUA" shaping for old fonts.
-- Do NOT route Kharoshthi script through the Indic shaper.
-- Disable fallback positioning for Indic and Thai shapers.
-- Misc fixes.
-
-
-hb-shape / hb-view changes:
-
-- Add --text-before and --text-after
-- Add --bot / --eot / --preserve-default-ignorables
-- hb-shape --output-format=json
-
-
-New API:
-
-hb_buffer_clear()
-
-hb_buffer_flags_t
-
-HB_BUFFER_FLAGS_DEFAULT
-HB_BUFFER_FLAG_BOT
-HB_BUFFER_FLAG_EOT
-HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES
-
-hb_buffer_set_flags()
-hb_buffer_get_flags()
-
-HB_BUFFER_SERIALIZE_FLAGS
-hb_buffer_serialize_glyphs()
-hb_buffer_deserialize_glyphs()
-hb_buffer_serialize_list_formats()
-
-hb_set_add_range()
-hb_set_del_range()
-hb_set_get_population()
-hb_set_next_range()
-
-hb_face_[sg]et_glyph_count()
-
-hb_segment_properties_t
-HB_SEGMENT_PROPERTIES_DEFAULT
-hb_segment_properties_equal()
-hb_segment_properties_hash()
-
-hb_buffer_set_segment_properties()
-hb_buffer_get_segment_properties()
-
-hb_ot_layout_glyph_class_t
-hb_ot_layout_get_glyph_class()
-hb_ot_layout_get_glyphs_in_class()
-
-hb_shape_plan_t
-hb_shape_plan_create()
-hb_shape_plan_create_cached()
-hb_shape_plan_get_empty()
-hb_shape_plan_reference()
-hb_shape_plan_destroy()
-hb_shape_plan_set_user_data()
-hb_shape_plan_get_user_data()
-hb_shape_plan_execute()
-hb_shape_plan_get_shaper()
-
-hb_ot_shape_plan_collect_lookups()
-
-
-API changes:
-
-- Remove "mask" parameter from hb_buffer_add().
-- Rename hb_ot_layout_would_substitute_lookup() and hb_ot_layout_substitute_closure_lookup().
-- hb-set.h API const correction.
-- Renamed hb_set_min/max() to hb_set_get_min/max().
-- Rename hb_ot_layout_feature_get_lookup_indexes() to hb_ot_layout_feature_get_lookups().
-- Rename hb_buffer_guess_properties() to hb_buffer_guess_segment_properties().
-
-
-
-Overview of changes leading to 0.9.6
-Sunday, November 13, 2012
-====================================
-
-- Don't clear pre-context text if no new context is provided.
-- Fix ReverseChainingSubstLookup, which was totally borked.
-- Adjust output format of hb-shape a bit.
-- Include config.h.in in-tree. Makes it easier for alternate build systems.
-- Fix hb_buffer_set_length(buffer, 0) invalid memory allocation.
-- Use ICU LayoutEngine's C API instead of C++. Avoids much headache.
-- Drop glyphs for all of Unicode Default_Ignorable characters.
-- Misc build fixes.
-
-Arabic shaper:
-- Enable 'dlig' and 'mset' features in Arabic shaper.
-- Implement 'Phags-pa shaping, improve Mongolian.
-
-Indic shaper:
-- Decompose Sinhala split matras the way old HarfBuzz / Pango did.
-- Initial support for Consonant Medials.
-- Start adding new-style Myanmar shaping.
-- Make reph and 'pref' logic introspect the font.
-- Route Meetei-Mayek through the Indic shaper.
-- Don't apply 'liga' in Indic shaper.
-- Improve Malayalam pre-base reordering Ra interaction with Chillus.
-
-
-
-Overview of changes leading to 0.9.5
-Sunday, October 14, 2012
-====================================
-
-- Synthetic-GSUB Arabic fallback shaping.
-
-- Misc Indic improvements.
-
-- Add build system support for pthread.
-
-- Imported UCDN for in-tree Unicode callbacks implementation.
-
-- Context-aware Arabic joining.
-
-- Misc other fixes.
-
-- New API:
-
- hb_feature_to/from-string()
- hb_buffer_[sg]et_content_type()
-
-
-
-Overview of changes leading to 0.9.4
-Tuesday, Sep 03, 2012
-====================================
-
-- Indic improvements with old-spec Malayalam.
-
-- Better fallback glyph positioning, specially with Thai / Lao marks.
-
-- Implement dotted-circle insertion.
-
-- Better Arabic fallback shaping / ligation.
-
-- Added ICU LayoutEngine backend for testing. Call it by the 'icu_le' name.
-
-- Misc fixes.
-
-
-
-Overview of changes leading to 0.9.3
-Friday, Aug 18, 2012
-====================================
-
-- Fixed fallback mark positioning for left-to-right text.
-
-- Improve mark positioning for the remaining combining classes.
-
-- Unbreak Thai and fallback Arabic shaping.
-
-- Port Arabic shaper to shape-plan caching.
-
-- Use new ICU normalizer functions.
-
-
-
-Overview of changes leading to 0.9.2
-Friday, Aug 10, 2012
-====================================
-
-- Over a thousand commits! This is the first major release of HarfBuzz.
-
-- HarfBuzz is feature-complete now! It should be in par, or better, than
- both Pango's shapers and old HarfBuzz / Qt shapers.
-
-- New Indic shaper, supporting main Indic scripts, Sinhala, and Khmer.
-
-- Improved Arabic shaper, with fallback Arabic shaping, supporting Arabic,
- Sinhala, N'ko, Mongolian, and Mandaic.
-
-- New Thai / Lao shaper.
-
-- Tibetan / Hangul support in the generic shaper.
-
-- Synthetic GDEF support for fonts without a GDEF table.
-
-- Fallback mark positioning for fonts without a GPOS table.
-
-- Unicode normalization shaping heuristic during glyph mapping.
-
-- New experimental Graphite2 backend.
-
-- New Uniscribe backend (primarily for testing).
-
-- New CoreText backend (primarily for testing).
-
-- Major optimization and speedup.
-
-- Test suites and testing infrastructure (work in progress).
-
-- Greatly improved hb-view cmdline tool.
-
-- hb-shape cmdline tool.
-
-- Unicode 6.1 support.
-
-Summary of API changes:
-
-o Changed API:
-
- - Users are expected to only include main header files now (ie. hb.h,
- hb-glib.h, hb-ft.h, ...)
-
- - All struct tag names had their initial underscore removed.
- Ie. "struct _hb_buffer_t" is "struct hb_buffer_t" now.
-
- - All set_user_data() functions now take a "replace" boolean parameter.
-
- - hb_buffer_create() takes zero arguments now.
- Use hb_buffer_pre_allocate() to pre-allocate.
-
- - hb_buffer_add_utf*() now accept -1 for length parameteres,
- meaning "nul-terminated".
-
- - hb_direction_t enum values changed.
-
- - All *_from_string() APIs now take a length parameter to allow for
- non-nul-terminated strings. A -1 length means "nul-terminated".
-
- - Typedef for hb_language_t changed.
-
- - hb_get_table_func_t renamed to hb_reference_table_func_t.
-
- - hb_ot_layout_table_choose_script()
-
- - Various renames in hb-unicode.h.
-
-o New API:
-
- - hb_buffer_guess_properties()
- Automatically called by hb_shape().
-
- - hb_buffer_normalize_glyphs()
-
- - hb_tag_from_string()
-
- - hb-coretext.h
-
- - hb-uniscribe.h
-
- - hb_face_reference_blob()
- - hb_face_[sg]et_index()
- - hb_face_set_upem()
-
- - hb_font_get_glyph_name_func_t
- hb_font_get_glyph_from_name_func_t
- hb_font_funcs_set_glyph_name_func()
- hb_font_funcs_set_glyph_from_name_func()
- hb_font_get_glyph_name()
- hb_font_get_glyph_from_name()
- hb_font_glyph_to_string()
- hb_font_glyph_from_string()
-
- - hb_font_set_funcs_data()
-
- - hb_ft_font_set_funcs()
- - hb_ft_font_get_face()
-
- - hb-gobject.h (work in progress)
-
- - hb_ot_shape_glyphs_closure()
- hb_ot_layout_substitute_closure_lookup()
-
- - hb-set.h
-
- - hb_shape_full()
-
- - hb_unicode_combining_class_t
-
- - hb_unicode_compose_func_t
- hb_unicode_decompose_func_t
- hb_unicode_decompose_compatibility_func_t
- hb_unicode_funcs_set_compose_func()
- hb_unicode_funcs_set_decompose_func()
- hb_unicode_funcs_set_decompose_compatibility_func()
- hb_unicode_compose()
- hb_unicode_decompose()
- hb_unicode_decompose_compatibility()
-
-o Removed API:
-
- - hb_ft_get_font_funcs()
-
- - hb_ot_layout_substitute_start()
- hb_ot_layout_substitute_lookup()
- hb_ot_layout_substitute_finish()
- hb_ot_layout_position_start()
- hb_ot_layout_position_lookup()
- hb_ot_layout_position_finish()
-
-
-
-Overview of changes leading to 0.6.0
-Friday, May 27, 2011
-====================================
-
-- Vertical text support in GPOS
-- Almost all API entries have unit tests now, under test/
-- All thread-safety issues are fixed
-
-Summary of API changes follows.
-
-
-* Simple Types API:
-
- o New API:
- HB_LANGUAGE_INVALID
- hb_language_get_default()
- hb_direction_to_string()
- hb_direction_from_string()
- hb_script_get_horizontal_direction()
- HB_UNTAG()
-
- o Renamed API:
- hb_category_t renamed to hb_unicode_general_category_t
-
- o Changed API:
- hb_language_t is a typed pointers now
-
- o Removed API:
- HB_TAG_STR()
-
-
-* Use ISO 15924 tags for hb_script_t:
-
- o New API:
- hb_script_from_iso15924_tag()
- hb_script_to_iso15924_tag()
- hb_script_from_string()
-
- o Changed API:
- HB_SCRIPT_* enum members changed value.
-
-
-* Buffer API streamlined:
-
- o New API:
- hb_buffer_reset()
- hb_buffer_set_length()
- hb_buffer_allocation_successful()
-
- o Renamed API:
- hb_buffer_ensure() renamed to hb_buffer_pre_allocate()
- hb_buffer_add_glyph() renamed to hb_buffer_add()
-
- o Removed API:
- hb_buffer_clear()
- hb_buffer_clear_positions()
-
- o Changed API:
- hb_buffer_get_glyph_infos() takes an out length parameter now
- hb_buffer_get_glyph_positions() takes an out length parameter now
-
-
-* Blob API streamlined:
-
- o New API:
- hb_blob_get_data()
- hb_blob_get_data_writable()
-
- o Renamed API:
- hb_blob_create_empty() renamed to hb_blob_get_empty()
-
- o Removed API:
- hb_blob_lock()
- hb_blob_unlock()
- hb_blob_is_writable()
- hb_blob_try_writable()
-
- o Changed API:
- hb_blob_create() takes user_data before destroy now
-
-
-* Unicode functions API:
-
- o Unicode function vectors can subclass other unicode function vectors now.
- Unimplemented callbacks in the subclass automatically chainup to the parent.
-
- o All hb_unicode_funcs_t callbacks take a user_data now. Their setters
- take a user_data and its respective destroy callback.
-
- o New API:
- hb_unicode_funcs_get_empty()
- hb_unicode_funcs_get_default()
- hb_unicode_funcs_get_parent()
-
- o Changed API:
- hb_unicode_funcs_create() now takes a parent_funcs.
-
- o Removed func getter functions:
- hb_unicode_funcs_get_mirroring_func()
- hb_unicode_funcs_get_general_category_func()
- hb_unicode_funcs_get_script_func()
- hb_unicode_funcs_get_combining_class_func()
- hb_unicode_funcs_get_eastasian_width_func()
-
-
-* Face API:
-
- o Renamed API:
- hb_face_get_table() renamed to hb_face_reference_table()
- hb_face_create_for_data() renamed to hb_face_create()
-
- o Changed API:
- hb_face_create_for_tables() takes user_data before destroy now
- hb_face_reference_table() returns empty blob instead of NULL
- hb_get_table_func_t accepts the face as first parameter now
-
-* Font API:
-
- o Fonts can subclass other fonts now. Unimplemented callbacks in the
- subclass automatically chainup to the parent. When chaining up,
- scale is adjusted if the parent font has a different scale.
-
- o All hb_font_funcs_t callbacks take a user_data now. Their setters
- take a user_data and its respective destroy callback.
-
- o New API:
- hb_font_get_parent()
- hb_font_funcs_get_empty()
- hb_font_create_sub_font()
-
- o Removed API:
- hb_font_funcs_copy()
- hb_font_unset_funcs()
-
- o Removed func getter functions:
- hb_font_funcs_get_glyph_func()
- hb_font_funcs_get_glyph_advance_func()
- hb_font_funcs_get_glyph_extents_func()
- hb_font_funcs_get_contour_point_func()
- hb_font_funcs_get_kerning_func()
-
- o Changed API:
- hb_font_create() takes a face and references it now
- hb_font_set_funcs() takes user_data before destroy now
- hb_font_set_scale() accepts signed integers now
- hb_font_get_contour_point_func_t now takes glyph first, then point_index
- hb_font_get_glyph_func_t returns a success boolean now
-
-
-* Changed object model:
-
- o All object types have a _get_empty() now:
- hb_blob_get_empty()
- hb_buffer_get_empty()
- hb_face_get_empty()
- hb_font_get_empty()
- hb_font_funcs_get_empty()
- hb_unicode_funcs_get_empty()
-
- o Added _set_user_data() and _get_user_data() for all object types:
- hb_blob_get_user_data()
- hb_blob_set_user_data()
- hb_buffer_get_user_data()
- hb_buffer_set_user_data()
- hb_face_get_user_data()
- hb_face_set_user_data()
- hb_font_funcs_get_user_data()
- hb_font_funcs_set_user_data()
- hb_font_get_user_data()
- hb_font_set_user_data()
- hb_unicode_funcs_get_user_data()
- hb_unicode_funcs_set_user_data()
-
- o Removed the _get_reference_count() from all object types:
- hb_blob_get_reference_count()
- hb_buffer_get_reference_count()
- hb_face_get_reference_count()
- hb_font_funcs_get_reference_count()
- hb_font_get_reference_count()
- hb_unicode_funcs_get_reference_count()
-
- o Added _make_immutable() and _is_immutable() for all object types except for buffer:
- hb_blob_make_immutable()
- hb_blob_is_immutable()
- hb_face_make_immutable()
- hb_face_is_immutable()
-
-
-* Changed API for vertical text support
-
- o The following callbacks where removed:
- hb_font_get_glyph_advance_func_t
- hb_font_get_kerning_func_t
-
- o The following new callbacks added instead:
- hb_font_get_glyph_h_advance_func_t
- hb_font_get_glyph_v_advance_func_t
- hb_font_get_glyph_h_origin_func_t
- hb_font_get_glyph_v_origin_func_t
- hb_font_get_glyph_h_kerning_func_t
- hb_font_get_glyph_v_kerning_func_t
-
- o The following API removed as such:
- hb_font_funcs_set_glyph_advance_func()
- hb_font_funcs_set_kerning_func()
- hb_font_get_glyph_advance()
- hb_font_get_kerning()
-
- o New API added instead:
- hb_font_funcs_set_glyph_h_advance_func()
- hb_font_funcs_set_glyph_v_advance_func()
- hb_font_funcs_set_glyph_h_origin_func()
- hb_font_funcs_set_glyph_v_origin_func()
- hb_font_funcs_set_glyph_h_kerning_func()
- hb_font_funcs_set_glyph_v_kerning_func()
- hb_font_get_glyph_h_advance()
- hb_font_get_glyph_v_advance()
- hb_font_get_glyph_h_origin()
- hb_font_get_glyph_v_origin()
- hb_font_get_glyph_h_kerning()
- hb_font_get_glyph_v_kerning()
-
- o The following higher-leve API added for convenience:
- hb_font_get_glyph_advance_for_direction()
- hb_font_get_glyph_origin_for_direction()
- hb_font_add_glyph_origin_for_direction()
- hb_font_subtract_glyph_origin_for_direction()
- hb_font_get_glyph_kerning_for_direction()
- hb_font_get_glyph_extents_for_origin()
- hb_font_get_glyph_contour_point_for_origin()
-
-
-* OpenType Layout API:
-
- o New API:
- hb_ot_layout_position_start()
- hb_ot_layout_substitute_start()
- hb_ot_layout_substitute_finish()
-
-
-* Glue code:
-
- o New API:
- hb_glib_script_to_script()
- hb_glib_script_from_script()
- hb_icu_script_to_script()
- hb_icu_script_from_script()
-
-
-* Version API added:
-
- o New API:
- HB_VERSION_MAJOR
- HB_VERSION_MINOR
- HB_VERSION_MICRO
- HB_VERSION_STRING
- HB_VERSION_CHECK()
- hb_version()
- hb_version_string()
- hb_version_check()
-
-
diff --git a/thirdparty/harfbuzz/src/hb-aat-layout-ankr-table.hh b/thirdparty/harfbuzz/src/hb-aat-layout-ankr-table.hh
index f2785a6f58..63fac84524 100644
--- a/thirdparty/harfbuzz/src/hb-aat-layout-ankr-table.hh
+++ b/thirdparty/harfbuzz/src/hb-aat-layout-ankr-table.hh
@@ -54,7 +54,7 @@ struct Anchor
DEFINE_SIZE_STATIC (4);
};
-typedef LArrayOf<Anchor> GlyphAnchors;
+typedef Array32Of<Anchor> GlyphAnchors;
struct ankr
{
@@ -64,7 +64,7 @@ struct ankr
unsigned int i,
unsigned int num_glyphs) const
{
- const NNOffsetTo<GlyphAnchors> *offset = (this+lookupTable).get_value (glyph_id, num_glyphs);
+ const NNOffset16To<GlyphAnchors> *offset = (this+lookupTable).get_value (glyph_id, num_glyphs);
if (!offset)
return Null (Anchor);
const GlyphAnchors &anchors = &(this+anchorData) + *offset;
@@ -83,9 +83,9 @@ struct ankr
protected:
HBUINT16 version; /* Version number (set to zero) */
HBUINT16 flags; /* Flags (currently unused; set to zero) */
- LOffsetTo<Lookup<NNOffsetTo<GlyphAnchors>>>
+ Offset32To<Lookup<NNOffset16To<GlyphAnchors>>>
lookupTable; /* Offset to the table's lookup table */
- LNNOffsetTo<HBUINT8>
+ NNOffset32To<HBUINT8>
anchorData; /* Offset to the glyph data table */
public:
diff --git a/thirdparty/harfbuzz/src/hb-aat-layout-common.hh b/thirdparty/harfbuzz/src/hb-aat-layout-common.hh
index 98ed20d8eb..e70ce97174 100644
--- a/thirdparty/harfbuzz/src/hb-aat-layout-common.hh
+++ b/thirdparty/harfbuzz/src/hb-aat-layout-common.hh
@@ -30,6 +30,9 @@
#include "hb-aat-layout.hh"
#include "hb-open-type.hh"
+namespace OT {
+struct GDEF;
+};
namespace AAT {
@@ -164,7 +167,7 @@ struct LookupSegmentArray
HBGlyphID last; /* Last GlyphID in this segment */
HBGlyphID first; /* First GlyphID in this segment */
- NNOffsetTo<UnsizedArrayOf<T>>
+ NNOffset16To<UnsizedArrayOf<T>>
valuesZ; /* A 16-bit offset from the start of
* the table to the data. */
public:
@@ -659,7 +662,7 @@ struct ClassTable
}
protected:
HBGlyphID firstGlyph; /* First glyph index included in the trimmed array. */
- ArrayOf<HBUCHAR> classArray; /* The class codes (indexed by glyph index minus
+ Array16Of<HBUCHAR> classArray; /* The class codes (indexed by glyph index minus
* firstGlyph). */
public:
DEFINE_SIZE_ARRAY (4, classArray);
@@ -678,7 +681,8 @@ struct ObsoleteTypes
const void *base,
const T *array)
{
- return (offset - ((const char *) array - (const char *) base)) / T::static_size;
+ /* https://github.com/harfbuzz/harfbuzz/issues/2816 */
+ return (offset - unsigned ((const char *) array - (const char *) base)) / T::static_size;
}
template <typename T>
static unsigned int byteOffsetToIndex (unsigned int offset,
@@ -862,6 +866,7 @@ struct hb_aat_apply_context_t :
hb_buffer_t *buffer;
hb_sanitize_context_t sanitizer;
const ankr *ankr_table;
+ const OT::GDEF *gdef_table;
/* Unused. For debug tracing only. */
unsigned int lookup_index;
diff --git a/thirdparty/harfbuzz/src/hb-aat-layout-feat-table.hh b/thirdparty/harfbuzz/src/hb-aat-layout-feat-table.hh
index 359e859cfc..573f0cf9f6 100644
--- a/thirdparty/harfbuzz/src/hb-aat-layout-feat-table.hh
+++ b/thirdparty/harfbuzz/src/hb-aat-layout-feat-table.hh
@@ -144,7 +144,7 @@ struct FeatureName
protected:
HBUINT16 feature; /* Feature type. */
HBUINT16 nSettings; /* The number of records in the setting name array. */
- LNNOffsetTo<UnsizedArrayOf<SettingName>>
+ NNOffset32To<UnsizedArrayOf<SettingName>>
settingTableZ; /* Offset in bytes from the beginning of this table to
* this feature's setting name array. The actual type of
* record this offset refers to will depend on the
diff --git a/thirdparty/harfbuzz/src/hb-aat-layout-just-table.hh b/thirdparty/harfbuzz/src/hb-aat-layout-just-table.hh
index 49506e9f5a..556d4ad75b 100644
--- a/thirdparty/harfbuzz/src/hb-aat-layout-just-table.hh
+++ b/thirdparty/harfbuzz/src/hb-aat-layout-just-table.hh
@@ -79,7 +79,7 @@ struct DecompositionAction
* to decompose before more frequent ones. The ligatures
* on the line of text will decompose in increasing
* value of this field. */
- ArrayOf<HBUINT16>
+ Array16Of<HBUINT16>
decomposedglyphs;
/* Number of 16-bit glyph indexes that follow;
* the ligature will be decomposed into these glyphs.
@@ -310,7 +310,7 @@ struct WidthDeltaPair
DEFINE_SIZE_STATIC (24);
};
-typedef OT::LArrayOf<WidthDeltaPair> WidthDeltaCluster;
+typedef OT::Array32Of<WidthDeltaPair> WidthDeltaCluster;
struct JustificationCategory
{
@@ -358,20 +358,20 @@ struct JustificationHeader
}
protected:
- OffsetTo<JustificationCategory>
+ Offset16To<JustificationCategory>
justClassTable; /* Offset to the justification category state table. */
- OffsetTo<WidthDeltaCluster>
+ Offset16To<WidthDeltaCluster>
wdcTable; /* Offset from start of justification table to start
* of the subtable containing the width delta factors
* for the glyphs in your font.
*
* The width delta clusters table. */
- OffsetTo<PostcompensationActionChain>
+ Offset16To<PostcompensationActionChain>
pcTable; /* Offset from start of justification table to start
* of postcompensation subtable (set to zero if none).
*
* The postcompensation subtable, if present in the font. */
- Lookup<OffsetTo<WidthDeltaCluster>>
+ Lookup<Offset16To<WidthDeltaCluster>>
lookupTable; /* Lookup table associating glyphs with width delta
* clusters. See the description of Width Delta Clusters
* table for details on how to interpret the lookup values. */
@@ -398,13 +398,13 @@ struct just
FixedVersion<>version; /* Version of the justification table
* (0x00010000u for version 1.0). */
HBUINT16 format; /* Format of the justification table (set to 0). */
- OffsetTo<JustificationHeader>
+ Offset16To<JustificationHeader>
horizData; /* Byte offset from the start of the justification table
* to the header for tables that contain justification
* information for horizontal text.
* If you are not including this information,
* store 0. */
- OffsetTo<JustificationHeader>
+ Offset16To<JustificationHeader>
vertData; /* ditto, vertical */
public:
diff --git a/thirdparty/harfbuzz/src/hb-aat-layout-kerx-table.hh b/thirdparty/harfbuzz/src/hb-aat-layout-kerx-table.hh
index 1cd412164e..d0eacf0e61 100644
--- a/thirdparty/harfbuzz/src/hb-aat-layout-kerx-table.hh
+++ b/thirdparty/harfbuzz/src/hb-aat-layout-kerx-table.hh
@@ -710,18 +710,18 @@ struct KerxSubTableFormat6
{
struct Long
{
- LNNOffsetTo<Lookup<HBUINT32>> rowIndexTable;
- LNNOffsetTo<Lookup<HBUINT32>> columnIndexTable;
- LNNOffsetTo<UnsizedArrayOf<FWORD32>> array;
+ NNOffset32To<Lookup<HBUINT32>> rowIndexTable;
+ NNOffset32To<Lookup<HBUINT32>> columnIndexTable;
+ NNOffset32To<UnsizedArrayOf<FWORD32>> array;
} l;
struct Short
{
- LNNOffsetTo<Lookup<HBUINT16>> rowIndexTable;
- LNNOffsetTo<Lookup<HBUINT16>> columnIndexTable;
- LNNOffsetTo<UnsizedArrayOf<FWORD>> array;
+ NNOffset32To<Lookup<HBUINT16>> rowIndexTable;
+ NNOffset32To<Lookup<HBUINT16>> columnIndexTable;
+ NNOffset32To<UnsizedArrayOf<FWORD>> array;
} s;
} u;
- LNNOffsetTo<UnsizedArrayOf<FWORD>> vector;
+ NNOffset32To<UnsizedArrayOf<FWORD>> vector;
public:
DEFINE_SIZE_STATIC (KernSubTableHeader::static_size + 24);
};
diff --git a/thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh b/thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh
index e3bc268d26..a807bdcfc5 100644
--- a/thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh
+++ b/thirdparty/harfbuzz/src/hb-aat-layout-morx-table.hh
@@ -30,6 +30,7 @@
#include "hb-open-type.hh"
#include "hb-aat-layout-common.hh"
#include "hb-ot-layout-common.hh"
+#include "hb-ot-layout-gdef-table.hh"
#include "hb-aat-map.hh"
/*
@@ -215,7 +216,9 @@ struct ContextualSubtable
hb_aat_apply_context_t *c_) :
ret (false),
c (c_),
+ gdef (*c->gdef_table),
mark_set (false),
+ has_glyph_classes (gdef.has_glyph_classes ()),
mark (0),
table (table_),
subs (table+table->substitutionTables) {}
@@ -263,6 +266,9 @@ struct ContextualSubtable
{
buffer->unsafe_to_break (mark, hb_min (buffer->idx + 1, buffer->len));
buffer->info[mark].codepoint = *replacement;
+ if (has_glyph_classes)
+ _hb_glyph_info_set_glyph_props (&buffer->info[mark],
+ gdef.get_glyph_props (*replacement));
ret = true;
}
@@ -287,6 +293,9 @@ struct ContextualSubtable
if (replacement)
{
buffer->info[idx].codepoint = *replacement;
+ if (has_glyph_classes)
+ _hb_glyph_info_set_glyph_props (&buffer->info[idx],
+ gdef.get_glyph_props (*replacement));
ret = true;
}
@@ -301,10 +310,12 @@ struct ContextualSubtable
bool ret;
private:
hb_aat_apply_context_t *c;
+ const OT::GDEF &gdef;
bool mark_set;
+ bool has_glyph_classes;
unsigned int mark;
const ContextualSubtable *table;
- const UnsizedOffsetListOf<Lookup<HBGlyphID>, HBUINT, false> &subs;
+ const UnsizedListOfOffset16To<Lookup<HBGlyphID>, HBUINT, false> &subs;
};
bool apply (hb_aat_apply_context_t *c) const
@@ -348,7 +359,7 @@ struct ContextualSubtable
protected:
StateTable<Types, EntryData>
machine;
- NNOffsetTo<UnsizedOffsetListOf<Lookup<HBGlyphID>, HBUINT, false>, HBUINT>
+ NNOffsetTo<UnsizedListOfOffset16To<Lookup<HBGlyphID>, HBUINT, false>, HBUINT>
substitutionTables;
public:
DEFINE_SIZE_STATIC (20);
@@ -599,6 +610,9 @@ struct NoncontextualSubtable
{
TRACE_APPLY (this);
+ const OT::GDEF &gdef (*c->gdef_table);
+ bool has_glyph_classes = gdef.has_glyph_classes ();
+
bool ret = false;
unsigned int num_glyphs = c->face->get_num_glyphs ();
@@ -610,6 +624,9 @@ struct NoncontextualSubtable
if (replacement)
{
info[i].codepoint = *replacement;
+ if (has_glyph_classes)
+ _hb_glyph_info_set_glyph_props (&info[i],
+ gdef.get_glyph_props (*replacement));
ret = true;
}
}
diff --git a/thirdparty/harfbuzz/src/hb-aat-layout-opbd-table.hh b/thirdparty/harfbuzz/src/hb-aat-layout-opbd-table.hh
index 8c04a6482f..b1a1512821 100644
--- a/thirdparty/harfbuzz/src/hb-aat-layout-opbd-table.hh
+++ b/thirdparty/harfbuzz/src/hb-aat-layout-opbd-table.hh
@@ -58,7 +58,7 @@ struct opbdFormat0
bool get_bounds (hb_font_t *font, hb_codepoint_t glyph_id,
hb_glyph_extents_t *extents, const void *base) const
{
- const OffsetTo<OpticalBounds> *bounds_offset = lookupTable.get_value (glyph_id, font->face->get_num_glyphs ());
+ const Offset16To<OpticalBounds> *bounds_offset = lookupTable.get_value (glyph_id, font->face->get_num_glyphs ());
if (!bounds_offset) return false;
const OpticalBounds &bounds = base+*bounds_offset;
@@ -79,7 +79,7 @@ struct opbdFormat0
}
protected:
- Lookup<OffsetTo<OpticalBounds>>
+ Lookup<Offset16To<OpticalBounds>>
lookupTable; /* Lookup table associating glyphs with the four
* int16 values for the left-side, top-side,
* right-side, and bottom-side optical bounds. */
@@ -92,7 +92,7 @@ struct opbdFormat1
bool get_bounds (hb_font_t *font, hb_codepoint_t glyph_id,
hb_glyph_extents_t *extents, const void *base) const
{
- const OffsetTo<OpticalBounds> *bounds_offset = lookupTable.get_value (glyph_id, font->face->get_num_glyphs ());
+ const Offset16To<OpticalBounds> *bounds_offset = lookupTable.get_value (glyph_id, font->face->get_num_glyphs ());
if (!bounds_offset) return false;
const OpticalBounds &bounds = base+*bounds_offset;
@@ -116,7 +116,7 @@ struct opbdFormat1
}
protected:
- Lookup<OffsetTo<OpticalBounds>>
+ Lookup<Offset16To<OpticalBounds>>
lookupTable; /* Lookup table associating glyphs with the four
* int16 values for the left-side, top-side,
* right-side, and bottom-side optical bounds. */
diff --git a/thirdparty/harfbuzz/src/hb-aat-layout-trak-table.hh b/thirdparty/harfbuzz/src/hb-aat-layout-trak-table.hh
index baa1c72020..68bcb2396f 100644
--- a/thirdparty/harfbuzz/src/hb-aat-layout-trak-table.hh
+++ b/thirdparty/harfbuzz/src/hb-aat-layout-trak-table.hh
@@ -66,7 +66,7 @@ struct TrackTableEntry
NameID trackNameID; /* The 'name' table index for this track.
* (a short word or phrase like "loose"
* or "very tight") */
- NNOffsetTo<UnsizedArrayOf<FWORD>>
+ NNOffset16To<UnsizedArrayOf<FWORD>>
valuesZ; /* Offset from start of tracking table to
* per-size tracking values for this track. */
@@ -141,7 +141,7 @@ struct TrackData
protected:
HBUINT16 nTracks; /* Number of separate tracks included in this table. */
HBUINT16 nSizes; /* Number of point sizes included in this table. */
- LNNOffsetTo<UnsizedArrayOf<HBFixed>>
+ NNOffset32To<UnsizedArrayOf<HBFixed>>
sizeTable; /* Offset from start of the tracking table to
* Array[nSizes] of size values.. */
UnsizedArrayOf<TrackTableEntry>
@@ -212,10 +212,10 @@ struct trak
FixedVersion<>version; /* Version of the tracking table
* (0x00010000u for version 1.0). */
HBUINT16 format; /* Format of the tracking table (set to 0). */
- OffsetTo<TrackData>
+ Offset16To<TrackData>
horizData; /* Offset from start of tracking table to TrackData
* for horizontal text (or 0 if none). */
- OffsetTo<TrackData>
+ Offset16To<TrackData>
vertData; /* Offset from start of tracking table to TrackData
* for vertical text (or 0 if none). */
HBUINT16 reserved; /* Reserved. Set to 0. */
diff --git a/thirdparty/harfbuzz/src/hb-aat-layout.cc b/thirdparty/harfbuzz/src/hb-aat-layout.cc
index 0e9f2b4954..e2d4de2ccd 100644
--- a/thirdparty/harfbuzz/src/hb-aat-layout.cc
+++ b/thirdparty/harfbuzz/src/hb-aat-layout.cc
@@ -55,6 +55,7 @@ AAT::hb_aat_apply_context_t::hb_aat_apply_context_t (const hb_ot_shape_plan_t *p
buffer (buffer_),
sanitizer (),
ankr_table (&Null (AAT::ankr)),
+ gdef_table (face->table.GDEF->table),
lookup_index (0)
{
sanitizer.init (blob);
@@ -79,7 +80,7 @@ AAT::hb_aat_apply_context_t::set_ankr_table (const AAT::ankr *ankr_table_)
* @short_description: Apple Advanced Typography Layout
* @include: hb-aat.h
*
- * Functions for querying AAT Layout features in the font face.
+ * Functions for querying AAT Layout features in the font face.
*
* HarfBuzz supports all of the AAT tables used to implement shaping. Other
* AAT tables and their associated features are not supported.
@@ -172,13 +173,13 @@ static const hb_aat_feature_mapping_t feature_mappings[] =
{HB_TAG ('z','e','r','o'), HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_OFF},
};
-/**
+/**
* hb_aat_layout_find_feature_mapping:
* @tag: The requested #hb_tag_t feature tag
*
* Fetches the AAT feature-and-selector combination that corresponds
* to a given OpenType feature tag.
- *
+ *
* Return value: the AAT features and selectors corresponding to the
* OpenType feature tag queried
*
@@ -248,7 +249,9 @@ hb_aat_layout_substitute (const hb_ot_shape_plan_t *plan,
if (morx.has_data ())
{
AAT::hb_aat_apply_context_t c (plan, font, buffer, morx_blob);
+ if (!buffer->message (font, "start table morx")) return;
morx.apply (&c);
+ (void) buffer->message (font, "end table morx");
return;
}
@@ -257,7 +260,9 @@ hb_aat_layout_substitute (const hb_ot_shape_plan_t *plan,
if (mort.has_data ())
{
AAT::hb_aat_apply_context_t c (plan, font, buffer, mort_blob);
+ if (!buffer->message (font, "start table mort")) return;
mort.apply (&c);
+ (void) buffer->message (font, "end table mort");
return;
}
}
@@ -313,8 +318,10 @@ hb_aat_layout_position (const hb_ot_shape_plan_t *plan,
const AAT::kerx& kerx = *kerx_blob->as<AAT::kerx> ();
AAT::hb_aat_apply_context_t c (plan, font, buffer, kerx_blob);
+ if (!buffer->message (font, "start table kerx")) return;
c.set_ankr_table (font->face->table.ankr.get ());
kerx.apply (&c);
+ (void) buffer->message (font, "end table kerx");
}
diff --git a/thirdparty/harfbuzz/src/hb-aat-ltag-table.hh b/thirdparty/harfbuzz/src/hb-aat-ltag-table.hh
index 711f9aa6c1..6d771e1513 100644
--- a/thirdparty/harfbuzz/src/hb-aat-ltag-table.hh
+++ b/thirdparty/harfbuzz/src/hb-aat-ltag-table.hh
@@ -50,7 +50,7 @@ struct FTStringRange
}
protected:
- NNOffsetTo<UnsizedArrayOf<HBUINT8>>
+ NNOffset16To<UnsizedArrayOf<HBUINT8>>
tag; /* Offset from the start of the table to
* the beginning of the string */
HBUINT16 length; /* String length (in bytes) */
@@ -80,7 +80,7 @@ struct ltag
protected:
HBUINT32 version; /* Table version; currently 1 */
HBUINT32 flags; /* Table flags; currently none defined */
- LArrayOf<FTStringRange>
+ Array32Of<FTStringRange>
tagRanges; /* Range for each tag's string */
public:
DEFINE_SIZE_ARRAY (12, tagRanges);
diff --git a/thirdparty/harfbuzz/src/hb-algs.hh b/thirdparty/harfbuzz/src/hb-algs.hh
index bc170b0546..bbe097fe01 100644
--- a/thirdparty/harfbuzz/src/hb-algs.hh
+++ b/thirdparty/harfbuzz/src/hb-algs.hh
@@ -760,6 +760,14 @@ static inline unsigned int ARRAY_LENGTH (const Type (&)[n]) { return n; }
#define ARRAY_LENGTH_CONST(__array) ((signed int) (sizeof (__array) / sizeof (__array[0])))
+static inline void *
+hb_memcpy (void *__restrict dst, const void *__restrict src, size_t len)
+{
+ /* It's illegal to pass 0 as size to memcpy. */
+ if (unlikely (!len)) return dst;
+ return memcpy (dst, src, len);
+}
+
static inline int
hb_memcmp (const void *a, const void *b, unsigned int len)
{
@@ -1151,30 +1159,48 @@ hb_codepoint_parse (const char *s, unsigned int len, int base, hb_codepoint_t *o
/* Operators. */
-struct hb_bitwise_and
+struct
{ HB_PARTIALIZE(2);
template <typename T> constexpr auto
operator () (const T &a, const T &b) const HB_AUTO_RETURN (a & b)
}
HB_FUNCOBJ (hb_bitwise_and);
-struct hb_bitwise_or
+struct
{ HB_PARTIALIZE(2);
template <typename T> constexpr auto
operator () (const T &a, const T &b) const HB_AUTO_RETURN (a | b)
}
HB_FUNCOBJ (hb_bitwise_or);
-struct hb_bitwise_xor
+struct
{ HB_PARTIALIZE(2);
template <typename T> constexpr auto
operator () (const T &a, const T &b) const HB_AUTO_RETURN (a ^ b)
}
HB_FUNCOBJ (hb_bitwise_xor);
-struct hb_bitwise_sub
+struct
+{ HB_PARTIALIZE(2);
+ template <typename T> constexpr auto
+ operator () (const T &a, const T &b) const HB_AUTO_RETURN (~a & b)
+}
+HB_FUNCOBJ (hb_bitwise_lt);
+struct
{ HB_PARTIALIZE(2);
template <typename T> constexpr auto
operator () (const T &a, const T &b) const HB_AUTO_RETURN (a & ~b)
}
-HB_FUNCOBJ (hb_bitwise_sub);
+HB_FUNCOBJ (hb_bitwise_gt); // aka sub
+struct
+{ HB_PARTIALIZE(2);
+ template <typename T> constexpr auto
+ operator () (const T &a, const T &b) const HB_AUTO_RETURN (~a | b)
+}
+HB_FUNCOBJ (hb_bitwise_le);
+struct
+{ HB_PARTIALIZE(2);
+ template <typename T> constexpr auto
+ operator () (const T &a, const T &b) const HB_AUTO_RETURN (a | ~b)
+}
+HB_FUNCOBJ (hb_bitwise_ge);
struct
{
template <typename T> constexpr auto
@@ -1197,6 +1223,12 @@ HB_FUNCOBJ (hb_sub);
struct
{ HB_PARTIALIZE(2);
template <typename T, typename T2> constexpr auto
+ operator () (const T &a, const T2 &b) const HB_AUTO_RETURN (b - a)
+}
+HB_FUNCOBJ (hb_rsub);
+struct
+{ HB_PARTIALIZE(2);
+ template <typename T, typename T2> constexpr auto
operator () (const T &a, const T2 &b) const HB_AUTO_RETURN (a * b)
}
HB_FUNCOBJ (hb_mul);
diff --git a/thirdparty/harfbuzz/src/hb-array.hh b/thirdparty/harfbuzz/src/hb-array.hh
index 02bd8d81c2..ab0dd6ebe3 100644
--- a/thirdparty/harfbuzz/src/hb-array.hh
+++ b/thirdparty/harfbuzz/src/hb-array.hh
@@ -36,6 +36,14 @@
template <typename Type>
struct hb_sorted_array_t;
+enum hb_not_found_t
+{
+ HB_NOT_FOUND_DONT_STORE,
+ HB_NOT_FOUND_STORE,
+ HB_NOT_FOUND_STORE_CLOSEST,
+};
+
+
template <typename Type>
struct hb_array_t : hb_iter_with_fallback_t<hb_array_t<Type>, Type&>
{
@@ -139,7 +147,9 @@ struct hb_array_t : hb_iter_with_fallback_t<hb_array_t<Type>, Type&>
return lfind (x, &i) ? &this->arrayZ[i] : not_found;
}
template <typename T>
- bool lfind (const T &x, unsigned *pos = nullptr) const
+ bool lfind (const T &x, unsigned *pos = nullptr,
+ hb_not_found_t not_found = HB_NOT_FOUND_DONT_STORE,
+ unsigned int to_store = (unsigned int) -1) const
{
for (unsigned i = 0; i < length; ++i)
if (hb_equal (x, this->arrayZ[i]))
@@ -149,6 +159,22 @@ struct hb_array_t : hb_iter_with_fallback_t<hb_array_t<Type>, Type&>
return true;
}
+ if (pos)
+ {
+ switch (not_found)
+ {
+ case HB_NOT_FOUND_DONT_STORE:
+ break;
+
+ case HB_NOT_FOUND_STORE:
+ *pos = to_store;
+ break;
+
+ case HB_NOT_FOUND_STORE_CLOSEST:
+ *pos = length;
+ break;
+ }
+ }
return false;
}
@@ -219,7 +245,7 @@ struct hb_array_t : hb_iter_with_fallback_t<hb_array_t<Type>, Type&>
unsigned P = sizeof (Type),
hb_enable_if (P == 1)>
const T *as () const
- { return length < hb_null_size (T) ? &Null (T) : reinterpret_cast<const T *> (arrayZ); }
+ { return length < hb_min_size (T) ? &Null (T) : reinterpret_cast<const T *> (arrayZ); }
template <typename T,
unsigned P = sizeof (Type),
@@ -231,9 +257,9 @@ struct hb_array_t : hb_iter_with_fallback_t<hb_array_t<Type>, Type&>
&& (unsigned int) (arrayZ + length - (const char *) p) >= size;
}
- /* Only call if you allocated the underlying array using malloc() or similar. */
- void free ()
- { ::free ((void *) arrayZ); arrayZ = nullptr; length = 0; }
+ /* Only call if you allocated the underlying array using hb_malloc() or similar. */
+ void fini ()
+ { hb_free ((void *) arrayZ); arrayZ = nullptr; length = 0; }
template <typename hb_serialize_context_t>
hb_array_t copy (hb_serialize_context_t *c) const
@@ -266,13 +292,6 @@ template <typename T, unsigned int length_> inline hb_array_t<T>
hb_array (T (&array_)[length_])
{ return hb_array_t<T> (array_); }
-enum hb_bfind_not_found_t
-{
- HB_BFIND_NOT_FOUND_DONT_STORE,
- HB_BFIND_NOT_FOUND_STORE,
- HB_BFIND_NOT_FOUND_STORE_CLOSEST,
-};
-
template <typename Type>
struct hb_sorted_array_t :
hb_iter_t<hb_sorted_array_t<Type>, Type&>,
@@ -323,7 +342,7 @@ struct hb_sorted_array_t :
}
template <typename T>
bool bfind (const T &x, unsigned int *i = nullptr,
- hb_bfind_not_found_t not_found = HB_BFIND_NOT_FOUND_DONT_STORE,
+ hb_not_found_t not_found = HB_NOT_FOUND_DONT_STORE,
unsigned int to_store = (unsigned int) -1) const
{
unsigned pos;
@@ -339,14 +358,14 @@ struct hb_sorted_array_t :
{
switch (not_found)
{
- case HB_BFIND_NOT_FOUND_DONT_STORE:
+ case HB_NOT_FOUND_DONT_STORE:
break;
- case HB_BFIND_NOT_FOUND_STORE:
+ case HB_NOT_FOUND_STORE:
*i = to_store;
break;
- case HB_BFIND_NOT_FOUND_STORE_CLOSEST:
+ case HB_NOT_FOUND_STORE_CLOSEST:
*i = pos;
break;
}
diff --git a/thirdparty/harfbuzz/src/hb-bimap.hh b/thirdparty/harfbuzz/src/hb-bimap.hh
index e9f3a6a52d..d409880751 100644
--- a/thirdparty/harfbuzz/src/hb-bimap.hh
+++ b/thirdparty/harfbuzz/src/hb-bimap.hh
@@ -58,10 +58,15 @@ struct hb_bimap_t
void set (hb_codepoint_t lhs, hb_codepoint_t rhs)
{
+ if (in_error ()) return;
if (unlikely (lhs == HB_MAP_VALUE_INVALID)) return;
if (unlikely (rhs == HB_MAP_VALUE_INVALID)) { del (lhs); return; }
+
forw_map.set (lhs, rhs);
+ if (in_error ()) return;
+
back_map.set (rhs, lhs);
+ if (in_error ()) forw_map.del (lhs);
}
hb_codepoint_t get (hb_codepoint_t lhs) const { return forw_map.get (lhs); }
diff --git a/thirdparty/harfbuzz/src/hb-bit-page.hh b/thirdparty/harfbuzz/src/hb-bit-page.hh
new file mode 100644
index 0000000000..263be3d044
--- /dev/null
+++ b/thirdparty/harfbuzz/src/hb-bit-page.hh
@@ -0,0 +1,203 @@
+/*
+ * Copyright © 2012,2017 Google, Inc.
+ * Copyright © 2021 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_BIT_PAGE_HH
+#define HB_BIT_PAGE_HH
+
+#include "hb.hh"
+
+struct hb_bit_page_t
+{
+ void init0 () { v.clear (); }
+ void init1 () { v.clear (0xFF); }
+
+ constexpr unsigned len () const
+ { return ARRAY_LENGTH_CONST (v); }
+
+ bool is_empty () const
+ {
+ for (unsigned int i = 0; i < len (); i++)
+ if (v[i])
+ return false;
+ return true;
+ }
+
+ void add (hb_codepoint_t g) { elt (g) |= mask (g); }
+ void del (hb_codepoint_t g) { elt (g) &= ~mask (g); }
+ void set (hb_codepoint_t g, bool v) { if (v) add (g); else del (g); }
+ bool get (hb_codepoint_t g) const { return elt (g) & mask (g); }
+
+ void add_range (hb_codepoint_t a, hb_codepoint_t b)
+ {
+ elt_t *la = &elt (a);
+ elt_t *lb = &elt (b);
+ if (la == lb)
+ *la |= (mask (b) << 1) - mask(a);
+ else
+ {
+ *la |= ~(mask (a) - 1);
+ la++;
+
+ memset (la, 0xff, (char *) lb - (char *) la);
+
+ *lb |= ((mask (b) << 1) - 1);
+ }
+ }
+ void del_range (hb_codepoint_t a, hb_codepoint_t b)
+ {
+ elt_t *la = &elt (a);
+ elt_t *lb = &elt (b);
+ if (la == lb)
+ *la &= ~((mask (b) << 1) - mask(a));
+ else
+ {
+ *la &= mask (a) - 1;
+ la++;
+
+ memset (la, 0, (char *) lb - (char *) la);
+
+ *lb &= ~((mask (b) << 1) - 1);
+ }
+ }
+ void set_range (hb_codepoint_t a, hb_codepoint_t b, bool v)
+ { if (v) add_range (a, b); else del_range (a, b); }
+
+ bool is_equal (const hb_bit_page_t &other) const
+ {
+ return 0 == hb_memcmp (&v, &other.v, sizeof (v));
+ }
+ bool is_subset (const hb_bit_page_t &larger_page) const
+ {
+ for (unsigned i = 0; i < len (); i++)
+ if (~larger_page.v[i] & v[i])
+ return false;
+ return true;
+ }
+
+ unsigned int get_population () const
+ {
+ unsigned int pop = 0;
+ for (unsigned int i = 0; i < len (); i++)
+ pop += hb_popcount (v[i]);
+ return pop;
+ }
+
+ bool next (hb_codepoint_t *codepoint) const
+ {
+ unsigned int m = (*codepoint + 1) & MASK;
+ if (!m)
+ {
+ *codepoint = INVALID;
+ return false;
+ }
+ unsigned int i = m / ELT_BITS;
+ unsigned int j = m & ELT_MASK;
+
+ const elt_t vv = v[i] & ~((elt_t (1) << j) - 1);
+ for (const elt_t *p = &vv; i < len (); p = &v[++i])
+ if (*p)
+ {
+ *codepoint = i * ELT_BITS + elt_get_min (*p);
+ return true;
+ }
+
+ *codepoint = INVALID;
+ return false;
+ }
+ bool previous (hb_codepoint_t *codepoint) const
+ {
+ unsigned int m = (*codepoint - 1) & MASK;
+ if (m == MASK)
+ {
+ *codepoint = INVALID;
+ return false;
+ }
+ unsigned int i = m / ELT_BITS;
+ unsigned int j = m & ELT_MASK;
+
+ /* Fancy mask to avoid shifting by elt_t bitsize, which is undefined. */
+ const elt_t mask = j < 8 * sizeof (elt_t) - 1 ?
+ ((elt_t (1) << (j + 1)) - 1) :
+ (elt_t) -1;
+ const elt_t vv = v[i] & mask;
+ const elt_t *p = &vv;
+ while (true)
+ {
+ if (*p)
+ {
+ *codepoint = i * ELT_BITS + elt_get_max (*p);
+ return true;
+ }
+ if ((int) i <= 0) break;
+ p = &v[--i];
+ }
+
+ *codepoint = INVALID;
+ return false;
+ }
+ hb_codepoint_t get_min () const
+ {
+ for (unsigned int i = 0; i < len (); i++)
+ if (v[i])
+ return i * ELT_BITS + elt_get_min (v[i]);
+ return INVALID;
+ }
+ hb_codepoint_t get_max () const
+ {
+ for (int i = len () - 1; i >= 0; i--)
+ if (v[i])
+ return i * ELT_BITS + elt_get_max (v[i]);
+ return 0;
+ }
+
+ static constexpr hb_codepoint_t INVALID = HB_SET_VALUE_INVALID;
+
+ typedef unsigned long long elt_t;
+ static constexpr unsigned PAGE_BITS = 512;
+ static_assert ((PAGE_BITS & ((PAGE_BITS) - 1)) == 0, "");
+
+ static unsigned int elt_get_min (const elt_t &elt) { return hb_ctz (elt); }
+ static unsigned int elt_get_max (const elt_t &elt) { return hb_bit_storage (elt) - 1; }
+
+ typedef hb_vector_size_t<elt_t, PAGE_BITS / 8> vector_t;
+
+ static constexpr unsigned ELT_BITS = sizeof (elt_t) * 8;
+ static constexpr unsigned ELT_MASK = ELT_BITS - 1;
+ static constexpr unsigned BITS = sizeof (vector_t) * 8;
+ static constexpr unsigned MASK = BITS - 1;
+ static_assert ((unsigned) PAGE_BITS == (unsigned) BITS, "");
+
+ elt_t &elt (hb_codepoint_t g) { return v[(g & MASK) / ELT_BITS]; }
+ const elt_t& elt (hb_codepoint_t g) const { return v[(g & MASK) / ELT_BITS]; }
+ static constexpr elt_t mask (hb_codepoint_t g) { return elt_t (1) << (g & ELT_MASK); }
+
+ vector_t v;
+};
+static_assert (hb_bit_page_t::PAGE_BITS == sizeof (hb_bit_page_t) * 8, "");
+
+
+#endif /* HB_BIT_PAGE_HH */
diff --git a/thirdparty/harfbuzz/src/hb-bit-set-invertible.hh b/thirdparty/harfbuzz/src/hb-bit-set-invertible.hh
new file mode 100644
index 0000000000..f48b72fe63
--- /dev/null
+++ b/thirdparty/harfbuzz/src/hb-bit-set-invertible.hh
@@ -0,0 +1,354 @@
+/*
+ * Copyright © 2012,2017 Google, Inc.
+ * Copyright © 2021 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_BIT_SET_INVERTIBLE_HH
+#define HB_BIT_SET_INVERTIBLE_HH
+
+#include "hb.hh"
+#include "hb-bit-set.hh"
+
+
+struct hb_bit_set_invertible_t
+{
+ hb_bit_set_t s;
+ bool inverted;
+
+ hb_bit_set_invertible_t () { init (); }
+ ~hb_bit_set_invertible_t () { fini (); }
+
+ void init () { s.init (); inverted = false; }
+ void fini () { s.fini (); }
+ void err () { s.err (); }
+ bool in_error () const { return s.in_error (); }
+ explicit operator bool () const { return !is_empty (); }
+
+ void reset ()
+ {
+ s.reset ();
+ inverted = false;
+ }
+ void clear ()
+ {
+ s.clear ();
+ if (likely (s.successful))
+ inverted = false;
+ }
+ void invert ()
+ {
+ if (likely (s.successful))
+ inverted = !inverted;
+ }
+
+ bool is_empty () const
+ {
+ hb_codepoint_t v = INVALID;
+ next (&v);
+ return v == INVALID;
+ }
+ hb_codepoint_t get_min () const
+ {
+ hb_codepoint_t v = INVALID;
+ next (&v);
+ return v;
+ }
+ hb_codepoint_t get_max () const
+ {
+ hb_codepoint_t v = INVALID;
+ previous (&v);
+ return v;
+ }
+ unsigned int get_population () const
+ { return inverted ? INVALID - s.get_population () : s.get_population (); }
+
+
+ void add (hb_codepoint_t g) { unlikely (inverted) ? s.del (g) : s.add (g); }
+ bool add_range (hb_codepoint_t a, hb_codepoint_t b)
+ { return unlikely (inverted) ? (s.del_range (a, b), true) : s.add_range (a, b); }
+
+ template <typename T>
+ void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+ { inverted ? s.del_array (array, count, stride) : s.add_array (array, count, stride); }
+ template <typename T>
+ void add_array (const hb_array_t<const T>& arr) { add_array (&arr, arr.len ()); }
+
+ /* Might return false if array looks unsorted.
+ * Used for faster rejection of corrupt data. */
+ template <typename T>
+ bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+ { return inverted ? s.del_sorted_array (array, count, stride) : s.add_sorted_array (array, count, stride); }
+ template <typename T>
+ bool add_sorted_array (const hb_sorted_array_t<const T>& arr) { return add_sorted_array (&arr, arr.len ()); }
+
+ void del (hb_codepoint_t g) { unlikely (inverted) ? s.add (g) : s.del (g); }
+ void del_range (hb_codepoint_t a, hb_codepoint_t b)
+ { unlikely (inverted) ? (void) s.add_range (a, b) : s.del_range (a, b); }
+
+ bool get (hb_codepoint_t g) const { return s.get (g) ^ inverted; }
+
+ /* Has interface. */
+ static constexpr bool SENTINEL = false;
+ typedef bool value_t;
+ value_t operator [] (hb_codepoint_t k) const { return get (k); }
+ bool has (hb_codepoint_t k) const { return (*this)[k] != SENTINEL; }
+ /* Predicate. */
+ bool operator () (hb_codepoint_t k) const { return has (k); }
+
+ /* Sink interface. */
+ hb_bit_set_invertible_t& operator << (hb_codepoint_t v)
+ { add (v); return *this; }
+ hb_bit_set_invertible_t& operator << (const hb_pair_t<hb_codepoint_t, hb_codepoint_t>& range)
+ { add_range (range.first, range.second); return *this; }
+
+ bool intersects (hb_codepoint_t first, hb_codepoint_t last) const
+ {
+ hb_codepoint_t c = first - 1;
+ return next (&c) && c <= last;
+ }
+
+ void set (const hb_bit_set_invertible_t &other)
+ {
+ s.set (other.s);
+ if (likely (s.successful))
+ inverted = other.inverted;
+ }
+
+ bool is_equal (const hb_bit_set_invertible_t &other) const
+ {
+ if (likely (inverted == other.inverted))
+ return s.is_equal (other.s);
+ else
+ {
+ /* TODO Add iter_ranges() and use here. */
+ auto it1 = iter ();
+ auto it2 = other.iter ();
+ return hb_all (+ hb_zip (it1, it2)
+ | hb_map ([](hb_pair_t<hb_codepoint_t, hb_codepoint_t> _) { return _.first == _.second; }));
+ }
+ }
+
+ bool is_subset (const hb_bit_set_invertible_t &larger_set) const
+ {
+ if (unlikely (inverted != larger_set.inverted))
+ return hb_all (hb_iter (s) | hb_map (larger_set.s));
+ else
+ return unlikely (inverted) ? larger_set.s.is_subset (s) : s.is_subset (larger_set.s);
+ }
+
+ protected:
+ template <typename Op>
+ void process (const Op& op, const hb_bit_set_invertible_t &other)
+ { s.process (op, other.s); }
+ public:
+ void union_ (const hb_bit_set_invertible_t &other)
+ {
+ if (likely (inverted == other.inverted))
+ {
+ if (unlikely (inverted))
+ process (hb_bitwise_and, other);
+ else
+ process (hb_bitwise_or, other); /* Main branch. */
+ }
+ else
+ {
+ if (unlikely (inverted))
+ process (hb_bitwise_gt, other);
+ else
+ process (hb_bitwise_lt, other);
+ }
+ if (likely (s.successful))
+ inverted = inverted || other.inverted;
+ }
+ void intersect (const hb_bit_set_invertible_t &other)
+ {
+ if (likely (inverted == other.inverted))
+ {
+ if (unlikely (inverted))
+ process (hb_bitwise_or, other);
+ else
+ process (hb_bitwise_and, other); /* Main branch. */
+ }
+ else
+ {
+ if (unlikely (inverted))
+ process (hb_bitwise_lt, other);
+ else
+ process (hb_bitwise_gt, other);
+ }
+ if (likely (s.successful))
+ inverted = inverted && other.inverted;
+ }
+ void subtract (const hb_bit_set_invertible_t &other)
+ {
+ if (likely (inverted == other.inverted))
+ {
+ if (unlikely (inverted))
+ process (hb_bitwise_lt, other);
+ else
+ process (hb_bitwise_gt, other); /* Main branch. */
+ }
+ else
+ {
+ if (unlikely (inverted))
+ process (hb_bitwise_or, other);
+ else
+ process (hb_bitwise_and, other);
+ }
+ if (likely (s.successful))
+ inverted = inverted && !other.inverted;
+ }
+ void symmetric_difference (const hb_bit_set_invertible_t &other)
+ {
+ process (hb_bitwise_xor, other);
+ if (likely (s.successful))
+ inverted = inverted ^ other.inverted;
+ }
+
+ bool next (hb_codepoint_t *codepoint) const
+ {
+ if (likely (!inverted))
+ return s.next (codepoint);
+
+ auto old = *codepoint;
+ if (unlikely (old + 1 == INVALID))
+ {
+ *codepoint = INVALID;
+ return false;
+ }
+
+ auto v = old;
+ s.next (&v);
+ if (old + 1 < v)
+ {
+ *codepoint = old + 1;
+ return true;
+ }
+
+ v = old;
+ s.next_range (&old, &v);
+
+ *codepoint = v + 1;
+ return *codepoint != INVALID;
+ }
+ bool previous (hb_codepoint_t *codepoint) const
+ {
+ if (likely (!inverted))
+ return s.previous (codepoint);
+
+ auto old = *codepoint;
+ if (unlikely (old - 1 == INVALID))
+ {
+ *codepoint = INVALID;
+ return false;
+ }
+
+ auto v = old;
+ s.previous (&v);
+
+ if (old - 1 > v || v == INVALID)
+ {
+ *codepoint = old - 1;
+ return true;
+ }
+
+ v = old;
+ s.previous_range (&v, &old);
+
+ *codepoint = v - 1;
+ return *codepoint != INVALID;
+ }
+ bool next_range (hb_codepoint_t *first, hb_codepoint_t *last) const
+ {
+ if (likely (!inverted))
+ return s.next_range (first, last);
+
+ if (!next (last))
+ {
+ *last = *first = INVALID;
+ return false;
+ }
+
+ *first = *last;
+ s.next (last);
+ --*last;
+ return true;
+ }
+ bool previous_range (hb_codepoint_t *first, hb_codepoint_t *last) const
+ {
+ if (likely (!inverted))
+ return s.previous_range (first, last);
+
+ if (!previous (first))
+ {
+ *last = *first = INVALID;
+ return false;
+ }
+
+ *last = *first;
+ s.previous (first);
+ ++*first;
+ return true;
+ }
+
+ static constexpr hb_codepoint_t INVALID = hb_bit_set_t::INVALID;
+
+ /*
+ * Iterator implementation.
+ */
+ struct iter_t : hb_iter_with_fallback_t<iter_t, hb_codepoint_t>
+ {
+ static constexpr bool is_sorted_iterator = true;
+ iter_t (const hb_bit_set_invertible_t &s_ = Null (hb_bit_set_invertible_t),
+ bool init = true) : s (&s_), v (INVALID), l(0)
+ {
+ if (init)
+ {
+ l = s->get_population () + 1;
+ __next__ ();
+ }
+ }
+
+ typedef hb_codepoint_t __item_t__;
+ hb_codepoint_t __item__ () const { return v; }
+ bool __more__ () const { return v != INVALID; }
+ void __next__ () { s->next (&v); if (l) l--; }
+ void __prev__ () { s->previous (&v); }
+ unsigned __len__ () const { return l; }
+ iter_t end () const { return iter_t (*s, false); }
+ bool operator != (const iter_t& o) const
+ { return s != o.s || v != o.v; }
+
+ protected:
+ const hb_bit_set_invertible_t *s;
+ hb_codepoint_t v;
+ unsigned l;
+ };
+ iter_t iter () const { return iter_t (*this); }
+ operator iter_t () const { return iter (); }
+};
+
+
+#endif /* HB_BIT_SET_INVERTIBLE_HH */
diff --git a/thirdparty/harfbuzz/src/hb-bit-set.hh b/thirdparty/harfbuzz/src/hb-bit-set.hh
new file mode 100644
index 0000000000..c21778d88e
--- /dev/null
+++ b/thirdparty/harfbuzz/src/hb-bit-set.hh
@@ -0,0 +1,808 @@
+/*
+ * Copyright © 2012,2017 Google, Inc.
+ * Copyright © 2021 Behdad Esfahbod
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_BIT_SET_HH
+#define HB_BIT_SET_HH
+
+#include "hb.hh"
+#include "hb-bit-page.hh"
+#include "hb-machinery.hh"
+
+
+struct hb_bit_set_t
+{
+ hb_bit_set_t () { init (); }
+ ~hb_bit_set_t () { fini (); }
+
+ hb_bit_set_t (const hb_bit_set_t& other) : hb_bit_set_t () { set (other); }
+ void operator= (const hb_bit_set_t& other) { set (other); }
+ // TODO Add move construtor/assign
+ // TODO Add constructor for Iterator; with specialization for (sorted) vector / array?
+
+ void init ()
+ {
+ successful = true;
+ population = 0;
+ last_page_lookup = 0;
+ page_map.init ();
+ pages.init ();
+ }
+ void fini ()
+ {
+ page_map.fini ();
+ pages.fini ();
+ }
+
+ using page_t = hb_bit_page_t;
+ struct page_map_t
+ {
+ int cmp (const page_map_t &o) const { return cmp (o.major); }
+ int cmp (uint32_t o_major) const { return (int) o_major - (int) major; }
+
+ uint32_t major;
+ uint32_t index;
+ };
+
+ bool successful; /* Allocations successful */
+ mutable unsigned int population;
+ mutable unsigned int last_page_lookup;
+ hb_sorted_vector_t<page_map_t> page_map;
+ hb_vector_t<page_t> pages;
+
+ void err () { if (successful) successful = false; } /* TODO Remove */
+ bool in_error () const { return !successful; }
+
+ bool resize (unsigned int count)
+ {
+ if (unlikely (!successful)) return false;
+ if (unlikely (!pages.resize (count) || !page_map.resize (count)))
+ {
+ pages.resize (page_map.length);
+ successful = false;
+ return false;
+ }
+ return true;
+ }
+
+ void reset ()
+ {
+ successful = true;
+ clear ();
+ }
+
+ void clear ()
+ {
+ resize (0);
+ if (likely (successful))
+ population = 0;
+ }
+ bool is_empty () const
+ {
+ unsigned int count = pages.length;
+ for (unsigned int i = 0; i < count; i++)
+ if (!pages[i].is_empty ())
+ return false;
+ return true;
+ }
+ explicit operator bool () const { return !is_empty (); }
+
+ private:
+ void dirty () { population = UINT_MAX; }
+ public:
+
+ void add (hb_codepoint_t g)
+ {
+ if (unlikely (!successful)) return;
+ if (unlikely (g == INVALID)) return;
+ dirty ();
+ page_t *page = page_for (g, true); if (unlikely (!page)) return;
+ page->add (g);
+ }
+ bool add_range (hb_codepoint_t a, hb_codepoint_t b)
+ {
+ if (unlikely (!successful)) return true; /* https://github.com/harfbuzz/harfbuzz/issues/657 */
+ if (unlikely (a > b || a == INVALID || b == INVALID)) return false;
+ dirty ();
+ unsigned int ma = get_major (a);
+ unsigned int mb = get_major (b);
+ if (ma == mb)
+ {
+ page_t *page = page_for (a, true); if (unlikely (!page)) return false;
+ page->add_range (a, b);
+ }
+ else
+ {
+ page_t *page = page_for (a, true); if (unlikely (!page)) return false;
+ page->add_range (a, major_start (ma + 1) - 1);
+
+ for (unsigned int m = ma + 1; m < mb; m++)
+ {
+ page = page_for (major_start (m), true); if (unlikely (!page)) return false;
+ page->init1 ();
+ }
+
+ page = page_for (b, true); if (unlikely (!page)) return false;
+ page->add_range (major_start (mb), b);
+ }
+ return true;
+ }
+
+ template <typename T>
+ void set_array (bool v, const T *array, unsigned int count, unsigned int stride=sizeof(T))
+ {
+ if (unlikely (!successful)) return;
+ if (!count) return;
+ dirty ();
+ hb_codepoint_t g = *array;
+ while (count)
+ {
+ unsigned int m = get_major (g);
+ page_t *page = page_for (g, v); if (unlikely (v && !page)) return;
+ unsigned int start = major_start (m);
+ unsigned int end = major_start (m + 1);
+ do
+ {
+ if (v || page) /* The v check is to optimize out the page check if v is true. */
+ page->set (g, v);
+
+ array = &StructAtOffsetUnaligned<T> (array, stride);
+ count--;
+ }
+ while (count && (g = *array, start <= g && g < end));
+ }
+ }
+
+ template <typename T>
+ void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+ { set_array (true, array, count, stride); }
+ template <typename T>
+ void add_array (const hb_array_t<const T>& arr) { add_array (&arr, arr.len ()); }
+
+ template <typename T>
+ void del_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+ { set_array (false, array, count, stride); }
+ template <typename T>
+ void del_array (const hb_array_t<const T>& arr) { del_array (&arr, arr.len ()); }
+
+ /* Might return false if array looks unsorted.
+ * Used for faster rejection of corrupt data. */
+ template <typename T>
+ bool set_sorted_array (bool v, const T *array, unsigned int count, unsigned int stride=sizeof(T))
+ {
+ if (unlikely (!successful)) return true; /* https://github.com/harfbuzz/harfbuzz/issues/657 */
+ if (!count) return true;
+ dirty ();
+ hb_codepoint_t g = *array;
+ hb_codepoint_t last_g = g;
+ while (count)
+ {
+ unsigned int m = get_major (g);
+ page_t *page = page_for (g, v); if (unlikely (v && !page)) return false;
+ unsigned int end = major_start (m + 1);
+ do
+ {
+ /* If we try harder we can change the following comparison to <=;
+ * Not sure if it's worth it. */
+ if (g < last_g) return false;
+ last_g = g;
+
+ if (v || page) /* The v check is to optimize out the page check if v is true. */
+ page->add (g);
+
+ array = (const T *) ((const char *) array + stride);
+ count--;
+ }
+ while (count && (g = *array, g < end));
+ }
+ return true;
+ }
+
+ template <typename T>
+ bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+ { return set_sorted_array (true, array, count, stride); }
+ template <typename T>
+ bool add_sorted_array (const hb_sorted_array_t<const T>& arr) { return add_sorted_array (&arr, arr.len ()); }
+
+ template <typename T>
+ bool del_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
+ { return set_sorted_array (false, array, count, stride); }
+ template <typename T>
+ bool del_sorted_array (const hb_sorted_array_t<const T>& arr) { return del_sorted_array (&arr, arr.len ()); }
+
+ void del (hb_codepoint_t g)
+ {
+ if (unlikely (!successful)) return;
+ page_t *page = page_for (g);
+ if (!page)
+ return;
+ dirty ();
+ page->del (g);
+ }
+
+ private:
+ void del_pages (int ds, int de)
+ {
+ if (ds <= de)
+ {
+ // Pre-allocate the workspace that compact() will need so we can bail on allocation failure
+ // before attempting to rewrite the page map.
+ hb_vector_t<unsigned> compact_workspace;
+ if (unlikely (!allocate_compact_workspace (compact_workspace))) return;
+
+ unsigned int write_index = 0;
+ for (unsigned int i = 0; i < page_map.length; i++)
+ {
+ int m = (int) page_map[i].major;
+ if (m < ds || de < m)
+ page_map[write_index++] = page_map[i];
+ }
+ compact (compact_workspace, write_index);
+ resize (write_index);
+ }
+ }
+
+
+ public:
+ void del_range (hb_codepoint_t a, hb_codepoint_t b)
+ {
+ if (unlikely (!successful)) return;
+ if (unlikely (a > b || a == INVALID)) return;
+ dirty ();
+ unsigned int ma = get_major (a);
+ unsigned int mb = get_major (b);
+ /* Delete pages from ds through de if ds <= de. */
+ int ds = (a == major_start (ma))? (int) ma: (int) (ma + 1);
+ int de = (b + 1 == major_start (mb + 1))? (int) mb: ((int) mb - 1);
+ if (ds > de || (int) ma < ds)
+ {
+ page_t *page = page_for (a);
+ if (page)
+ {
+ if (ma == mb)
+ page->del_range (a, b);
+ else
+ page->del_range (a, major_start (ma + 1) - 1);
+ }
+ }
+ if (de < (int) mb && ma != mb)
+ {
+ page_t *page = page_for (b);
+ if (page)
+ page->del_range (major_start (mb), b);
+ }
+ del_pages (ds, de);
+ }
+
+ bool get (hb_codepoint_t g) const
+ {
+ const page_t *page = page_for (g);
+ if (!page)
+ return false;
+ return page->get (g);
+ }
+
+ /* Has interface. */
+ static constexpr bool SENTINEL = false;
+ typedef bool value_t;
+ value_t operator [] (hb_codepoint_t k) const { return get (k); }
+ bool has (hb_codepoint_t k) const { return (*this)[k] != SENTINEL; }
+ /* Predicate. */
+ bool operator () (hb_codepoint_t k) const { return has (k); }
+
+ /* Sink interface. */
+ hb_bit_set_t& operator << (hb_codepoint_t v)
+ { add (v); return *this; }
+ hb_bit_set_t& operator << (const hb_pair_t<hb_codepoint_t, hb_codepoint_t>& range)
+ { add_range (range.first, range.second); return *this; }
+
+ bool intersects (hb_codepoint_t first, hb_codepoint_t last) const
+ {
+ hb_codepoint_t c = first - 1;
+ return next (&c) && c <= last;
+ }
+ void set (const hb_bit_set_t &other)
+ {
+ if (unlikely (!successful)) return;
+ unsigned int count = other.pages.length;
+ if (unlikely (!resize (count)))
+ return;
+ population = other.population;
+
+ /* TODO switch to vector operator =. */
+ hb_memcpy ((void *) pages, (const void *) other.pages, count * pages.item_size);
+ hb_memcpy ((void *) page_map, (const void *) other.page_map, count * page_map.item_size);
+ }
+
+ bool is_equal (const hb_bit_set_t &other) const
+ {
+ if (has_population () && other.has_population () &&
+ get_population () != other.get_population ())
+ return false;
+
+ unsigned int na = pages.length;
+ unsigned int nb = other.pages.length;
+
+ unsigned int a = 0, b = 0;
+ for (; a < na && b < nb; )
+ {
+ if (page_at (a).is_empty ()) { a++; continue; }
+ if (other.page_at (b).is_empty ()) { b++; continue; }
+ if (page_map[a].major != other.page_map[b].major ||
+ !page_at (a).is_equal (other.page_at (b)))
+ return false;
+ a++;
+ b++;
+ }
+ for (; a < na; a++)
+ if (!page_at (a).is_empty ()) { return false; }
+ for (; b < nb; b++)
+ if (!other.page_at (b).is_empty ()) { return false; }
+
+ return true;
+ }
+
+ bool is_subset (const hb_bit_set_t &larger_set) const
+ {
+ if (has_population () && larger_set.has_population () &&
+ get_population () != larger_set.get_population ())
+ return false;
+
+ uint32_t spi = 0;
+ for (uint32_t lpi = 0; spi < page_map.length && lpi < larger_set.page_map.length; lpi++)
+ {
+ uint32_t spm = page_map[spi].major;
+ uint32_t lpm = larger_set.page_map[lpi].major;
+ auto sp = page_at (spi);
+ auto lp = larger_set.page_at (lpi);
+
+ if (spm < lpm && !sp.is_empty ())
+ return false;
+
+ if (lpm < spm)
+ continue;
+
+ if (!sp.is_subset (lp))
+ return false;
+
+ spi++;
+ }
+
+ while (spi < page_map.length)
+ if (!page_at (spi++).is_empty ())
+ return false;
+
+ return true;
+ }
+
+ private:
+ bool allocate_compact_workspace (hb_vector_t<unsigned>& workspace)
+ {
+ if (unlikely (!workspace.resize (pages.length)))
+ {
+ successful = false;
+ return false;
+ }
+
+ return true;
+ }
+
+ /*
+ * workspace should be a pre-sized vector allocated to hold at exactly pages.length
+ * elements.
+ */
+ void compact (hb_vector_t<unsigned>& workspace,
+ unsigned int length)
+ {
+ assert(workspace.length == pages.length);
+ hb_vector_t<unsigned>& old_index_to_page_map_index = workspace;
+
+ hb_fill (old_index_to_page_map_index.writer(), 0xFFFFFFFF);
+ for (unsigned i = 0; i < length; i++)
+ old_index_to_page_map_index[page_map[i].index] = i;
+
+ compact_pages (old_index_to_page_map_index);
+ }
+ void compact_pages (const hb_vector_t<unsigned>& old_index_to_page_map_index)
+ {
+ unsigned int write_index = 0;
+ for (unsigned int i = 0; i < pages.length; i++)
+ {
+ if (old_index_to_page_map_index[i] == 0xFFFFFFFF) continue;
+
+ if (write_index < i)
+ pages[write_index] = pages[i];
+
+ page_map[old_index_to_page_map_index[i]].index = write_index;
+ write_index++;
+ }
+ }
+ public:
+
+ template <typename Op>
+ void process (const Op& op, const hb_bit_set_t &other)
+ {
+ const bool passthru_left = op (1, 0);
+ const bool passthru_right = op (0, 1);
+
+ if (unlikely (!successful)) return;
+
+ dirty ();
+
+ unsigned int na = pages.length;
+ unsigned int nb = other.pages.length;
+ unsigned int next_page = na;
+
+ unsigned int count = 0, newCount = 0;
+ unsigned int a = 0, b = 0;
+ unsigned int write_index = 0;
+
+ // Pre-allocate the workspace that compact() will need so we can bail on allocation failure
+ // before attempting to rewrite the page map.
+ hb_vector_t<unsigned> compact_workspace;
+ if (!passthru_left && unlikely (!allocate_compact_workspace (compact_workspace))) return;
+
+ for (; a < na && b < nb; )
+ {
+ if (page_map[a].major == other.page_map[b].major)
+ {
+ if (!passthru_left)
+ {
+ // Move page_map entries that we're keeping from the left side set
+ // to the front of the page_map vector. This isn't necessary if
+ // passthru_left is set since no left side pages will be removed
+ // in that case.
+ if (write_index < a)
+ page_map[write_index] = page_map[a];
+ write_index++;
+ }
+
+ count++;
+ a++;
+ b++;
+ }
+ else if (page_map[a].major < other.page_map[b].major)
+ {
+ if (passthru_left)
+ count++;
+ a++;
+ }
+ else
+ {
+ if (passthru_right)
+ count++;
+ b++;
+ }
+ }
+ if (passthru_left)
+ count += na - a;
+ if (passthru_right)
+ count += nb - b;
+
+ if (!passthru_left)
+ {
+ na = write_index;
+ next_page = write_index;
+ compact (compact_workspace, write_index);
+ }
+
+ if (unlikely (!resize (count)))
+ return;
+
+ newCount = count;
+
+ /* Process in-place backward. */
+ a = na;
+ b = nb;
+ for (; a && b; )
+ {
+ if (page_map[a - 1].major == other.page_map[b - 1].major)
+ {
+ a--;
+ b--;
+ count--;
+ page_map[count] = page_map[a];
+ page_at (count).v = op (page_at (a).v, other.page_at (b).v);
+ }
+ else if (page_map[a - 1].major > other.page_map[b - 1].major)
+ {
+ a--;
+ if (passthru_left)
+ {
+ count--;
+ page_map[count] = page_map[a];
+ }
+ }
+ else
+ {
+ b--;
+ if (passthru_right)
+ {
+ count--;
+ page_map[count].major = other.page_map[b].major;
+ page_map[count].index = next_page++;
+ page_at (count).v = other.page_at (b).v;
+ }
+ }
+ }
+ if (passthru_left)
+ while (a)
+ {
+ a--;
+ count--;
+ page_map[count] = page_map [a];
+ }
+ if (passthru_right)
+ while (b)
+ {
+ b--;
+ count--;
+ page_map[count].major = other.page_map[b].major;
+ page_map[count].index = next_page++;
+ page_at (count).v = other.page_at (b).v;
+ }
+ assert (!count);
+ resize (newCount);
+ }
+
+ void union_ (const hb_bit_set_t &other) { process (hb_bitwise_or, other); }
+ void intersect (const hb_bit_set_t &other) { process (hb_bitwise_and, other); }
+ void subtract (const hb_bit_set_t &other) { process (hb_bitwise_gt, other); }
+ void symmetric_difference (const hb_bit_set_t &other) { process (hb_bitwise_xor, other); }
+
+ bool next (hb_codepoint_t *codepoint) const
+ {
+ // TODO: this should be merged with prev() as both implementations
+ // are very similar.
+ if (unlikely (*codepoint == INVALID)) {
+ *codepoint = get_min ();
+ return *codepoint != INVALID;
+ }
+
+ const auto* page_map_array = page_map.arrayZ;
+ unsigned int major = get_major (*codepoint);
+ unsigned int i = last_page_lookup;
+
+ if (unlikely (i >= page_map.length || page_map_array[i].major != major))
+ {
+ page_map.bfind (major, &i, HB_NOT_FOUND_STORE_CLOSEST);
+ if (i >= page_map.length) {
+ *codepoint = INVALID;
+ return false;
+ }
+ }
+
+ const auto* pages_array = pages.arrayZ;
+ const page_map_t &current = page_map_array[i];
+ if (likely (current.major == major))
+ {
+ if (pages_array[current.index].next (codepoint))
+ {
+ *codepoint += current.major * page_t::PAGE_BITS;
+ last_page_lookup = i;
+ return true;
+ }
+ i++;
+ }
+
+ for (; i < page_map.length; i++)
+ {
+ const page_map_t &current = page_map.arrayZ[i];
+ hb_codepoint_t m = pages_array[current.index].get_min ();
+ if (m != INVALID)
+ {
+ *codepoint = current.major * page_t::PAGE_BITS + m;
+ last_page_lookup = i;
+ return true;
+ }
+ }
+ last_page_lookup = 0;
+ *codepoint = INVALID;
+ return false;
+ }
+ bool previous (hb_codepoint_t *codepoint) const
+ {
+ if (unlikely (*codepoint == INVALID)) {
+ *codepoint = get_max ();
+ return *codepoint != INVALID;
+ }
+
+ page_map_t map = {get_major (*codepoint), 0};
+ unsigned int i;
+ page_map.bfind (map, &i, HB_NOT_FOUND_STORE_CLOSEST);
+ if (i < page_map.length && page_map[i].major == map.major)
+ {
+ if (pages[page_map[i].index].previous (codepoint))
+ {
+ *codepoint += page_map[i].major * page_t::PAGE_BITS;
+ return true;
+ }
+ }
+ i--;
+ for (; (int) i >= 0; i--)
+ {
+ hb_codepoint_t m = pages[page_map[i].index].get_max ();
+ if (m != INVALID)
+ {
+ *codepoint = page_map[i].major * page_t::PAGE_BITS + m;
+ return true;
+ }
+ }
+ *codepoint = INVALID;
+ return false;
+ }
+ bool next_range (hb_codepoint_t *first, hb_codepoint_t *last) const
+ {
+ hb_codepoint_t i;
+
+ i = *last;
+ if (!next (&i))
+ {
+ *last = *first = INVALID;
+ return false;
+ }
+
+ /* TODO Speed up. */
+ *last = *first = i;
+ while (next (&i) && i == *last + 1)
+ (*last)++;
+
+ return true;
+ }
+ bool previous_range (hb_codepoint_t *first, hb_codepoint_t *last) const
+ {
+ hb_codepoint_t i;
+
+ i = *first;
+ if (!previous (&i))
+ {
+ *last = *first = INVALID;
+ return false;
+ }
+
+ /* TODO Speed up. */
+ *last = *first = i;
+ while (previous (&i) && i == *first - 1)
+ (*first)--;
+
+ return true;
+ }
+
+ bool has_population () const { return population != UINT_MAX; }
+ unsigned int get_population () const
+ {
+ if (has_population ())
+ return population;
+
+ unsigned int pop = 0;
+ unsigned int count = pages.length;
+ for (unsigned int i = 0; i < count; i++)
+ pop += pages[i].get_population ();
+
+ population = pop;
+ return pop;
+ }
+ hb_codepoint_t get_min () const
+ {
+ unsigned count = pages.length;
+ for (unsigned i = 0; i < count; i++)
+ {
+ const auto& map = page_map[i];
+ const auto& page = pages[map.index];
+
+ if (!page.is_empty ())
+ return map.major * page_t::PAGE_BITS + page.get_min ();
+ }
+ return INVALID;
+ }
+ hb_codepoint_t get_max () const
+ {
+ unsigned count = pages.length;
+ for (signed i = count - 1; i >= 0; i--)
+ {
+ const auto& map = page_map[(unsigned) i];
+ const auto& page = pages[map.index];
+
+ if (!page.is_empty ())
+ return map.major * page_t::PAGE_BITS + page.get_max ();
+ }
+ return INVALID;
+ }
+
+ static constexpr hb_codepoint_t INVALID = page_t::INVALID;
+
+ /*
+ * Iterator implementation.
+ */
+ struct iter_t : hb_iter_with_fallback_t<iter_t, hb_codepoint_t>
+ {
+ static constexpr bool is_sorted_iterator = true;
+ iter_t (const hb_bit_set_t &s_ = Null (hb_bit_set_t),
+ bool init = true) : s (&s_), v (INVALID), l(0)
+ {
+ if (init)
+ {
+ l = s->get_population () + 1;
+ __next__ ();
+ }
+ }
+
+ typedef hb_codepoint_t __item_t__;
+ hb_codepoint_t __item__ () const { return v; }
+ bool __more__ () const { return v != INVALID; }
+ void __next__ () { s->next (&v); if (l) l--; }
+ void __prev__ () { s->previous (&v); }
+ unsigned __len__ () const { return l; }
+ iter_t end () const { return iter_t (*s, false); }
+ bool operator != (const iter_t& o) const
+ { return s != o.s || v != o.v; }
+
+ protected:
+ const hb_bit_set_t *s;
+ hb_codepoint_t v;
+ unsigned l;
+ };
+ iter_t iter () const { return iter_t (*this); }
+ operator iter_t () const { return iter (); }
+
+ protected:
+
+ page_t *page_for (hb_codepoint_t g, bool insert = false)
+ {
+ page_map_t map = {get_major (g), pages.length};
+ unsigned int i;
+ if (!page_map.bfind (map, &i, HB_NOT_FOUND_STORE_CLOSEST))
+ {
+ if (!insert)
+ return nullptr;
+
+ if (unlikely (!resize (pages.length + 1)))
+ return nullptr;
+
+ pages[map.index].init0 ();
+ memmove (page_map + i + 1,
+ page_map + i,
+ (page_map.length - 1 - i) * page_map.item_size);
+ page_map[i] = map;
+ }
+ return &pages[page_map[i].index];
+ }
+ const page_t *page_for (hb_codepoint_t g) const
+ {
+ page_map_t key = {get_major (g)};
+ const page_map_t *found = page_map.bsearch (key);
+ if (found)
+ return &pages[found->index];
+ return nullptr;
+ }
+ page_t &page_at (unsigned int i) { return pages[page_map[i].index]; }
+ const page_t &page_at (unsigned int i) const { return pages[page_map[i].index]; }
+ unsigned int get_major (hb_codepoint_t g) const { return g / page_t::PAGE_BITS; }
+ hb_codepoint_t major_start (unsigned int major) const { return major * page_t::PAGE_BITS; }
+};
+
+
+#endif /* HB_BIT_SET_HH */
diff --git a/thirdparty/harfbuzz/src/hb-blob.cc b/thirdparty/harfbuzz/src/hb-blob.cc
index 71b1b1fc4f..f120002d17 100644
--- a/thirdparty/harfbuzz/src/hb-blob.cc
+++ b/thirdparty/harfbuzz/src/hb-blob.cc
@@ -72,14 +72,52 @@ hb_blob_create (const char *data,
void *user_data,
hb_destroy_func_t destroy)
{
+ if (!length)
+ {
+ if (destroy)
+ destroy (user_data);
+ return hb_blob_get_empty ();
+ }
+
+ hb_blob_t *blob = hb_blob_create_or_fail (data, length, mode,
+ user_data, destroy);
+ return likely (blob) ? blob : hb_blob_get_empty ();
+}
+
+/**
+ * hb_blob_create_or_fail: (skip)
+ * @data: Pointer to blob data.
+ * @length: Length of @data in bytes.
+ * @mode: Memory mode for @data.
+ * @user_data: Data parameter to pass to @destroy.
+ * @destroy: (nullable): Callback to call when @data is not needed anymore.
+ *
+ * Creates a new "blob" object wrapping @data. The @mode parameter is used
+ * to negotiate ownership and lifecycle of @data.
+ *
+ * Note that this function returns a freshly-allocated empty blob even if @length
+ * is zero. This is in contrast to hb_blob_create(), which returns the singleton
+ * empty blob (as returned by hb_blob_get_empty()) if @length is zero.
+ *
+ * Return value: New blob, or %NULL if failed. Destroy with hb_blob_destroy().
+ *
+ * Since: 2.8.2
+ **/
+hb_blob_t *
+hb_blob_create_or_fail (const char *data,
+ unsigned int length,
+ hb_memory_mode_t mode,
+ void *user_data,
+ hb_destroy_func_t destroy)
+{
hb_blob_t *blob;
- if (!length ||
- length >= 1u << 31 ||
- !(blob = hb_object_create<hb_blob_t> ())) {
+ if (length >= 1u << 31 ||
+ !(blob = hb_object_create<hb_blob_t> ()))
+ {
if (destroy)
destroy (user_data);
- return hb_blob_get_empty ();
+ return nullptr;
}
blob->data = data;
@@ -91,9 +129,10 @@ hb_blob_create (const char *data,
if (blob->mode == HB_MEMORY_MODE_DUPLICATE) {
blob->mode = HB_MEMORY_MODE_READONLY;
- if (!blob->try_make_writable ()) {
+ if (!blob->try_make_writable ())
+ {
hb_blob_destroy (blob);
- return hb_blob_get_empty ();
+ return nullptr;
}
}
@@ -226,7 +265,7 @@ hb_blob_destroy (hb_blob_t *blob)
blob->fini_shallow ();
- free (blob);
+ hb_free (blob);
}
/**
@@ -452,7 +491,7 @@ hb_blob_t::try_make_writable ()
char *new_data;
- new_data = (char *) malloc (this->length);
+ new_data = (char *) hb_malloc (this->length);
if (unlikely (!new_data))
return false;
@@ -463,7 +502,7 @@ hb_blob_t::try_make_writable ()
this->mode = HB_MEMORY_MODE_WRITABLE;
this->data = new_data;
this->user_data = new_data;
- this->destroy = free;
+ this->destroy = hb_free;
return true;
}
@@ -517,7 +556,7 @@ _hb_mapped_file_destroy (void *file_)
assert (0); // If we don't have mmap we shouldn't reach here
#endif
- free (file);
+ hb_free (file);
}
#endif
@@ -528,7 +567,7 @@ _open_resource_fork (const char *file_name, hb_mapped_file_t *file)
size_t name_len = strlen (file_name);
size_t len = name_len + sizeof (_PATH_RSRCFORKSPEC);
- char *rsrc_name = (char *) malloc (len);
+ char *rsrc_name = (char *) hb_malloc (len);
if (unlikely (!rsrc_name)) return -1;
strncpy (rsrc_name, file_name, name_len);
@@ -536,7 +575,7 @@ _open_resource_fork (const char *file_name, hb_mapped_file_t *file)
sizeof (_PATH_RSRCFORKSPEC) - 1);
int fd = open (rsrc_name, O_RDONLY | O_BINARY, 0);
- free (rsrc_name);
+ hb_free (rsrc_name);
if (fd != -1)
{
@@ -561,17 +600,37 @@ _open_resource_fork (const char *file_name, hb_mapped_file_t *file)
* Creates a new blob containing the data from the
* specified binary font file.
*
- * Returns: An #hb_blob_t pointer with the content of the file
+ * Returns: An #hb_blob_t pointer with the content of the file,
+ * or hb_blob_get_empty() if failed.
*
* Since: 1.7.7
**/
hb_blob_t *
hb_blob_create_from_file (const char *file_name)
{
+ hb_blob_t *blob = hb_blob_create_from_file_or_fail (file_name);
+ return likely (blob) ? blob : hb_blob_get_empty ();
+}
+
+/**
+ * hb_blob_create_from_file_or_fail:
+ * @file_name: A font filename
+ *
+ * Creates a new blob containing the data from the
+ * specified binary font file.
+ *
+ * Returns: An #hb_blob_t pointer with the content of the file,
+ * or %NULL if failed.
+ *
+ * Since: 2.8.2
+ **/
+hb_blob_t *
+hb_blob_create_from_file_or_fail (const char *file_name)
+{
/* Adopted from glib's gmappedfile.c with Matthias Clasen and
Allison Lortie permission but changed a lot to suit our need. */
#if defined(HAVE_MMAP) && !defined(HB_NO_MMAP)
- hb_mapped_file_t *file = (hb_mapped_file_t *) calloc (1, sizeof (hb_mapped_file_t));
+ hb_mapped_file_t *file = (hb_mapped_file_t *) hb_calloc (1, sizeof (hb_mapped_file_t));
if (unlikely (!file)) return hb_blob_get_empty ();
int fd = open (file_name, O_RDONLY | O_BINARY, 0);
@@ -601,22 +660,22 @@ hb_blob_create_from_file (const char *file_name)
close (fd);
- return hb_blob_create (file->contents, file->length,
- HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE, (void *) file,
- (hb_destroy_func_t) _hb_mapped_file_destroy);
+ return hb_blob_create_or_fail (file->contents, file->length,
+ HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE, (void *) file,
+ (hb_destroy_func_t) _hb_mapped_file_destroy);
fail:
close (fd);
fail_without_close:
- free (file);
+ hb_free (file);
#elif defined(_WIN32) && !defined(HB_NO_MMAP)
- hb_mapped_file_t *file = (hb_mapped_file_t *) calloc (1, sizeof (hb_mapped_file_t));
+ hb_mapped_file_t *file = (hb_mapped_file_t *) hb_calloc (1, sizeof (hb_mapped_file_t));
if (unlikely (!file)) return hb_blob_get_empty ();
HANDLE fd;
unsigned int size = strlen (file_name) + 1;
- wchar_t * wchar_file_name = (wchar_t *) malloc (sizeof (wchar_t) * size);
+ wchar_t * wchar_file_name = (wchar_t *) hb_malloc (sizeof (wchar_t) * size);
if (unlikely (!wchar_file_name)) goto fail_without_close;
mbstowcs (wchar_file_name, file_name, size);
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
@@ -636,7 +695,7 @@ fail_without_close:
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED,
nullptr);
#endif
- free (wchar_file_name);
+ hb_free (wchar_file_name);
if (unlikely (fd == INVALID_HANDLE_VALUE)) goto fail_without_close;
@@ -661,22 +720,22 @@ fail_without_close:
if (unlikely (!file->contents)) goto fail;
CloseHandle (fd);
- return hb_blob_create (file->contents, file->length,
- HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE, (void *) file,
- (hb_destroy_func_t) _hb_mapped_file_destroy);
+ return hb_blob_create_or_fail (file->contents, file->length,
+ HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE, (void *) file,
+ (hb_destroy_func_t) _hb_mapped_file_destroy);
fail:
CloseHandle (fd);
fail_without_close:
- free (file);
+ hb_free (file);
#endif
/* The following tries to read a file without knowing its size beforehand
It's used as a fallback for systems without mmap or to read from pipes */
unsigned long len = 0, allocated = BUFSIZ * 16;
- char *data = (char *) malloc (allocated);
- if (unlikely (!data)) return hb_blob_get_empty ();
+ char *data = (char *) hb_malloc (allocated);
+ if (unlikely (!data)) return nullptr;
FILE *fp = fopen (file_name, "rb");
if (unlikely (!fp)) goto fread_fail_without_close;
@@ -689,7 +748,7 @@ fail_without_close:
/* Don't allocate and go more than ~536MB, our mmap reader still
can cover files like that but lets limit our fallback reader */
if (unlikely (allocated > (2 << 28))) goto fread_fail;
- char *new_data = (char *) realloc (data, allocated);
+ char *new_data = (char *) hb_realloc (data, allocated);
if (unlikely (!new_data)) goto fread_fail;
data = new_data;
}
@@ -706,13 +765,13 @@ fail_without_close:
}
fclose (fp);
- return hb_blob_create (data, len, HB_MEMORY_MODE_WRITABLE, data,
- (hb_destroy_func_t) free);
+ return hb_blob_create_or_fail (data, len, HB_MEMORY_MODE_WRITABLE, data,
+ (hb_destroy_func_t) hb_free);
fread_fail:
fclose (fp);
fread_fail_without_close:
- free (data);
- return hb_blob_get_empty ();
+ hb_free (data);
+ return nullptr;
}
#endif /* !HB_NO_OPEN */
diff --git a/thirdparty/harfbuzz/src/hb-blob.h b/thirdparty/harfbuzz/src/hb-blob.h
index 86f12788d2..203f9e19dd 100644
--- a/thirdparty/harfbuzz/src/hb-blob.h
+++ b/thirdparty/harfbuzz/src/hb-blob.h
@@ -91,8 +91,18 @@ hb_blob_create (const char *data,
hb_destroy_func_t destroy);
HB_EXTERN hb_blob_t *
+hb_blob_create_or_fail (const char *data,
+ unsigned int length,
+ hb_memory_mode_t mode,
+ void *user_data,
+ hb_destroy_func_t destroy);
+
+HB_EXTERN hb_blob_t *
hb_blob_create_from_file (const char *file_name);
+HB_EXTERN hb_blob_t *
+hb_blob_create_from_file_or_fail (const char *file_name);
+
/* Always creates with MEMORY_MODE_READONLY.
* Even if the parent blob is writable, we don't
* want the user of the sub-blob to be able to
diff --git a/thirdparty/harfbuzz/src/hb-blob.hh b/thirdparty/harfbuzz/src/hb-blob.hh
index b03dfc1380..a3683a681e 100644
--- a/thirdparty/harfbuzz/src/hb-blob.hh
+++ b/thirdparty/harfbuzz/src/hb-blob.hh
@@ -88,7 +88,7 @@ struct hb_blob_ptr_t
const T * get () const { return b->as<T> (); }
hb_blob_t * get_blob () const { return b.get_raw (); }
unsigned int get_length () const { return b.get ()->length; }
- void destroy () { hb_blob_destroy (b.get ()); b = nullptr; }
+ void destroy () { hb_blob_destroy (b.get_raw ()); b = nullptr; }
private:
hb_nonnull_ptr_t<hb_blob_t> b;
diff --git a/thirdparty/harfbuzz/src/hb-buffer-deserialize-json.hh b/thirdparty/harfbuzz/src/hb-buffer-deserialize-json.hh
index 01db295498..e80cfea6e7 100644
--- a/thirdparty/harfbuzz/src/hb-buffer-deserialize-json.hh
+++ b/thirdparty/harfbuzz/src/hb-buffer-deserialize-json.hh
@@ -1,29 +1,30 @@
+
#line 1 "hb-buffer-deserialize-json.rl"
/*
-* Copyright © 2013 Google, Inc.
-*
-* This is part of HarfBuzz, a text shaping library.
-*
-* Permission is hereby granted, without written agreement and without
-* license or royalty fees, to use, copy, modify, and distribute this
-* software and its documentation for any purpose, provided that the
-* above copyright notice and the following two paragraphs appear in
-* all copies of this software.
-*
-* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
-* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
-* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
-* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-* DAMAGE.
-*
-* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
-* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
-* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
-* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-*
-* Google Author(s): Behdad Esfahbod
-*/
+ * Copyright © 2013 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
#ifndef HB_BUFFER_DESERIALIZE_JSON_HH
#define HB_BUFFER_DESERIALIZE_JSON_HH
@@ -31,158 +32,446 @@
#include "hb.hh"
-#line 35 "hb-buffer-deserialize-json.hh"
+#line 36 "hb-buffer-deserialize-json.hh"
static const unsigned char _deserialize_json_trans_keys[] = {
- 1u, 0u, 0u, 18u, 0u, 2u, 10u, 15u,
- 16u, 17u, 2u, 2u, 0u, 7u, 0u, 6u,
- 5u, 6u, 0u, 19u, 0u, 19u, 0u, 19u,
- 2u, 2u, 0u, 7u, 0u, 6u, 5u, 6u,
- 0u, 19u, 0u, 19u, 14u, 14u, 2u, 2u,
- 0u, 7u, 0u, 6u, 0u, 19u, 0u, 19u,
- 16u, 17u, 2u, 2u, 0u, 7u, 0u, 6u,
- 5u, 6u, 0u, 19u, 0u, 19u, 2u, 2u,
- 0u, 7u, 0u, 6u, 5u, 6u, 0u, 19u,
- 0u, 19u, 2u, 2u, 0u, 7u, 0u, 6u,
- 2u, 8u, 0u, 19u, 2u, 8u, 0u, 19u,
- 0u, 19u, 2u, 2u, 0u, 7u, 0u, 6u,
- 0u, 19u, 0u, 9u, 0u, 18u, 1u, 0u,
- 0u
+ 0u, 0u, 9u, 123u, 9u, 34u, 97u, 117u, 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u,
+ 48u, 57u, 9u, 125u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u,
+ 9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u, 9u, 125u,
+ 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 34u, 34u,
+ 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u,
+ 34u, 92u, 9u, 125u, 34u, 92u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u,
+ 9u, 125u, 9u, 93u, 9u, 123u, 0u, 0u, 0
};
-static const signed char _deserialize_json_char_class[] = {
- 0, 0, 0, 0, 0, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 0,
- 1, 2, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 3, 4, 1, 1, 5,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 7, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 8, 9, 1, 1, 1,
- 10, 1, 11, 12, 1, 1, 13, 1,
- 1, 1, 1, 14, 1, 1, 1, 1,
- 1, 1, 1, 1, 15, 1, 1, 16,
- 17, 1, 18, 1, 19, 0
+static const char _deserialize_json_key_spans[] = {
+ 0, 115, 26, 21, 2, 1, 50, 49,
+ 10, 117, 117, 117, 1, 50, 49, 10,
+ 117, 117, 1, 1, 50, 49, 117, 117,
+ 2, 1, 50, 49, 10, 117, 117, 1,
+ 50, 49, 10, 117, 117, 1, 50, 49,
+ 59, 117, 59, 117, 117, 1, 50, 49,
+ 117, 85, 115, 0
};
static const short _deserialize_json_index_offsets[] = {
- 0, 0, 19, 22, 28, 30, 31, 39,
- 46, 48, 68, 88, 108, 109, 117, 124,
- 126, 146, 166, 167, 168, 176, 183, 203,
- 223, 225, 226, 234, 241, 243, 263, 283,
- 284, 292, 299, 301, 321, 341, 342, 350,
- 357, 364, 384, 391, 411, 431, 432, 440,
- 447, 467, 477, 496, 0
+ 0, 0, 116, 143, 165, 168, 170, 221,
+ 271, 282, 400, 518, 636, 638, 689, 739,
+ 750, 868, 986, 988, 990, 1041, 1091, 1209,
+ 1327, 1330, 1332, 1383, 1433, 1444, 1562, 1680,
+ 1682, 1733, 1783, 1794, 1912, 2030, 2032, 2083,
+ 2133, 2193, 2311, 2371, 2489, 2607, 2609, 2660,
+ 2710, 2828, 2914, 3030
};
-static const signed char _deserialize_json_indicies[] = {
- 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 3, 0, 4, 5, 6,
- 7, 8, 0, 9, 10, 11, 12, 12,
- 0, 0, 0, 0, 0, 0, 13, 13,
- 0, 0, 0, 14, 15, 16, 18, 19,
- 20, 0, 0, 21, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 22, 23, 0, 0, 3,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 24,
- 20, 0, 0, 21, 0, 19, 19, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 22, 25, 25, 0, 0,
- 0, 0, 0, 0, 26, 26, 0, 0,
- 0, 27, 28, 29, 31, 32, 33, 0,
- 0, 34, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 35, 33, 0, 0, 34, 0, 32,
- 32, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 35, 36, 37,
- 37, 0, 0, 0, 0, 0, 0, 38,
- 38, 0, 0, 0, 0, 39, 40, 42,
- 0, 0, 43, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 44, 42, 0, 0, 43, 0,
- 45, 45, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 44, 46,
- 47, 48, 48, 0, 0, 0, 0, 0,
- 0, 49, 49, 0, 0, 0, 50, 51,
- 52, 54, 55, 56, 0, 0, 57, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 58, 56,
- 0, 0, 57, 0, 55, 55, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 58, 59, 59, 0, 0, 0,
- 0, 0, 0, 60, 60, 0, 0, 0,
- 61, 62, 63, 65, 66, 67, 0, 0,
- 68, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 69, 67, 0, 0, 68, 0, 66, 66,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 69, 70, 70, 0,
- 0, 0, 0, 0, 0, 71, 71, 0,
- 72, 0, 0, 73, 74, 76, 75, 75,
- 75, 75, 75, 77, 79, 0, 0, 80,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 81,
- 75, 0, 0, 0, 0, 0, 75, 83,
- 0, 0, 84, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 85, 83, 0, 0, 84, 0,
- 87, 87, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 85, 88,
- 88, 0, 0, 0, 0, 0, 0, 89,
- 89, 0, 0, 0, 0, 90, 91, 83,
- 0, 0, 84, 0, 93, 93, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 85, 94, 0, 0, 95, 0,
- 0, 0, 0, 0, 96, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 2,
+static const char _deserialize_json_indicies[] = {
+ 0, 0, 0, 0, 0, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 1, 3, 3, 3,
+ 3, 3, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 3, 1, 4, 1,
+ 5, 1, 6, 7, 1, 1, 8, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 9, 1, 10, 11,
+ 1, 12, 1, 12, 12, 12, 12, 12,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 12, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 13, 1, 13, 13,
+ 13, 13, 13, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 13, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 14, 1, 1, 15, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 1,
+ 17, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 1, 19, 19, 19, 19, 19,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 19, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 20, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 21,
+ 1, 22, 22, 22, 22, 22, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 22, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 3, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 23, 1, 19,
+ 19, 19, 19, 19, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 19, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 20, 1, 1, 1, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 21, 1, 24, 1, 24,
+ 24, 24, 24, 24, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 24, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 25, 1, 25, 25, 25, 25, 25, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 25, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 26, 1,
+ 1, 27, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 1, 29, 30, 30, 30,
+ 30, 30, 30, 30, 30, 30, 1, 31,
+ 31, 31, 31, 31, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 31, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 32, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 33, 1, 31, 31, 31,
+ 31, 31, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 31, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 32, 1, 1, 1, 30, 30, 30, 30,
+ 30, 30, 30, 30, 30, 30, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 33, 1, 34, 1, 35, 1, 35,
+ 35, 35, 35, 35, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 35, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 36, 1, 36, 36, 36, 36, 36, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 36, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 37, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 1, 39, 39, 39, 39,
+ 39, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 39, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 40,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 41, 1, 39, 39, 39, 39, 39, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 39, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 40, 1, 1,
+ 1, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 41, 1,
+ 43, 44, 1, 45, 1, 45, 45, 45,
+ 45, 45, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 45, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 46, 1,
+ 46, 46, 46, 46, 46, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 46,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 47, 1, 1, 48,
+ 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 1, 50, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 1, 52, 52, 52,
+ 52, 52, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 52, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 53, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 54, 1, 52, 52, 52, 52, 52,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 52, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 53, 1,
+ 1, 1, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 54,
+ 1, 55, 1, 55, 55, 55, 55, 55,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 55, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 56, 1, 56, 56,
+ 56, 56, 56, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 56, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 57, 1, 1, 58, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 1,
+ 60, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 1, 62, 62, 62, 62, 62,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 62, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 63, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 64,
+ 1, 62, 62, 62, 62, 62, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 62, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 63, 1, 1, 1,
+ 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 64, 1, 65,
+ 1, 65, 65, 65, 65, 65, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 65, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 66, 1, 66, 66, 66, 66,
+ 66, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 66, 1, 67, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 68, 69, 69, 69, 69,
+ 69, 69, 69, 69, 69, 1, 71, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70,
+ 72, 70, 73, 73, 73, 73, 73, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 73, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 74, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 75, 1,
+ 70, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 70, 1, 76, 76, 76, 76,
+ 76, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 76, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 77,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 78, 1, 76, 76, 76, 76, 76, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 76, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 77, 1, 1,
+ 1, 79, 79, 79, 79, 79, 79, 79,
+ 79, 79, 79, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 78, 1,
+ 80, 1, 80, 80, 80, 80, 80, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 80, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 81, 1, 81, 81, 81,
+ 81, 81, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 81, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 82, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 1, 76,
+ 76, 76, 76, 76, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 76, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 77, 1, 1, 1, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 78, 1, 85, 85, 85,
+ 85, 85, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 85, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 86, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 87, 1, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 0, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 1, 1,
0
};
-static const signed char _deserialize_json_index_defaults[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 75, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0
-};
-
-static const signed char _deserialize_json_cond_targs[] = {
- 0, 1, 2, 2, 3, 4, 18, 24,
- 37, 45, 5, 12, 6, 7, 8, 9,
- 11, 8, 9, 11, 10, 2, 49, 10,
- 49, 13, 14, 15, 16, 17, 15, 16,
- 17, 10, 2, 49, 19, 20, 21, 22,
- 23, 22, 10, 2, 49, 23, 25, 31,
- 26, 27, 28, 29, 30, 28, 29, 30,
- 10, 2, 49, 32, 33, 34, 35, 36,
- 34, 35, 36, 10, 2, 49, 38, 39,
- 40, 43, 44, 40, 41, 42, 41, 10,
- 2, 49, 43, 10, 2, 49, 44, 44,
- 46, 47, 43, 48, 48, 48, 49, 50,
- 51, 0
+static const char _deserialize_json_trans_targs[] = {
+ 1, 0, 2, 2, 3, 4, 18, 24,
+ 37, 45, 5, 12, 6, 7, 8, 9,
+ 11, 9, 11, 10, 2, 49, 10, 49,
+ 13, 14, 15, 16, 17, 16, 17, 10,
+ 2, 49, 19, 20, 21, 22, 23, 10,
+ 2, 49, 23, 25, 31, 26, 27, 28,
+ 29, 30, 29, 30, 10, 2, 49, 32,
+ 33, 34, 35, 36, 35, 36, 10, 2,
+ 49, 38, 39, 40, 43, 44, 40, 41,
+ 42, 10, 2, 49, 10, 2, 49, 44,
+ 46, 47, 43, 48, 48, 49, 50, 51
};
-static const signed char _deserialize_json_cond_actions[] = {
- 0, 0, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 2, 2,
- 2, 0, 0, 0, 3, 3, 4, 0,
- 5, 0, 0, 2, 2, 2, 0, 0,
- 0, 6, 6, 7, 0, 0, 0, 2,
- 2, 0, 8, 8, 9, 0, 0, 0,
- 0, 0, 2, 2, 2, 0, 0, 0,
- 10, 10, 11, 0, 0, 2, 2, 2,
- 0, 0, 0, 12, 12, 13, 0, 0,
- 2, 14, 14, 0, 15, 0, 0, 16,
- 16, 17, 0, 18, 18, 19, 0, 15,
- 0, 0, 20, 20, 0, 21, 0, 0,
- 0, 0
+static const char _deserialize_json_trans_actions[] = {
+ 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2, 2,
+ 2, 0, 0, 3, 3, 4, 0, 5,
+ 0, 0, 2, 2, 2, 0, 0, 6,
+ 6, 7, 0, 0, 0, 2, 2, 8,
+ 8, 9, 0, 0, 0, 0, 0, 2,
+ 2, 2, 0, 0, 10, 10, 11, 0,
+ 0, 2, 2, 2, 0, 0, 12, 12,
+ 13, 0, 0, 2, 14, 14, 0, 15,
+ 0, 16, 16, 17, 18, 18, 19, 15,
+ 0, 0, 20, 20, 21, 0, 0, 0
};
static const int deserialize_json_start = 1;
@@ -197,411 +486,247 @@ static const int deserialize_json_en_main = 1;
static hb_bool_t
_hb_buffer_deserialize_json (hb_buffer_t *buffer,
-const char *buf,
-unsigned int buf_len,
-const char **end_ptr,
-hb_font_t *font)
+ const char *buf,
+ unsigned int buf_len,
+ const char **end_ptr,
+ hb_font_t *font)
{
- const char *p = buf, *pe = buf + buf_len;
-
- /* Ensure we have positions. */
- (void) hb_buffer_get_glyph_positions (buffer, nullptr);
-
- while (p < pe && ISSPACE (*p))
- p++;
- if (p < pe && *p == (buffer->len ? ',' : '['))
- {
- *end_ptr = ++p;
- }
-
- const char *tok = nullptr;
- int cs;
- hb_glyph_info_t info = {0};
- hb_glyph_position_t pos = {0};
-
-#line 223 "hb-buffer-deserialize-json.hh"
+ const char *p = buf, *pe = buf + buf_len;
+
+ /* Ensure we have positions. */
+ (void) hb_buffer_get_glyph_positions (buffer, nullptr);
+
+ while (p < pe && ISSPACE (*p))
+ p++;
+ if (p < pe && *p == (buffer->len ? ',' : '['))
+ {
+ *end_ptr = ++p;
+ }
+
+ const char *tok = nullptr;
+ int cs;
+ hb_glyph_info_t info = {0};
+ hb_glyph_position_t pos = {0};
+
+#line 512 "hb-buffer-deserialize-json.hh"
{
- cs = (int)deserialize_json_start;
+ cs = deserialize_json_start;
}
-
-#line 228 "hb-buffer-deserialize-json.hh"
+
+#line 517 "hb-buffer-deserialize-json.hh"
{
- unsigned int _trans = 0;
- const unsigned char * _keys;
- const signed char * _inds;
- int _ic;
- _resume: {}
- if ( p == pe )
- goto _out;
- _keys = ( _deserialize_json_trans_keys + ((cs<<1)));
- _inds = ( _deserialize_json_indicies + (_deserialize_json_index_offsets[cs]));
-
- if ( ( (*( p))) <= 125 && ( (*( p))) >= 9 ) {
- _ic = (int)_deserialize_json_char_class[(int)( (*( p))) - 9];
- if ( _ic <= (int)(*( _keys+1)) && _ic >= (int)(*( _keys)) )
- _trans = (unsigned int)(*( _inds + (int)( _ic - (int)(*( _keys)) ) ));
- else
- _trans = (unsigned int)_deserialize_json_index_defaults[cs];
- }
- else {
- _trans = (unsigned int)_deserialize_json_index_defaults[cs];
- }
-
- cs = (int)_deserialize_json_cond_targs[_trans];
-
- if ( _deserialize_json_cond_actions[_trans] != 0 ) {
-
- switch ( _deserialize_json_cond_actions[_trans] ) {
- case 1: {
- {
+ int _slen;
+ int _trans;
+ const unsigned char *_keys;
+ const char *_inds;
+ if ( p == pe )
+ goto _test_eof;
+ if ( cs == 0 )
+ goto _out;
+_resume:
+ _keys = _deserialize_json_trans_keys + (cs<<1);
+ _inds = _deserialize_json_indicies + _deserialize_json_index_offsets[cs];
+
+ _slen = _deserialize_json_key_spans[cs];
+ _trans = _inds[ _slen > 0 && _keys[0] <=(*p) &&
+ (*p) <= _keys[1] ?
+ (*p) - _keys[0] : _slen ];
+
+ cs = _deserialize_json_trans_targs[_trans];
+
+ if ( _deserialize_json_trans_actions[_trans] == 0 )
+ goto _again;
+
+ switch ( _deserialize_json_trans_actions[_trans] ) {
+ case 1:
#line 38 "hb-buffer-deserialize-json.rl"
-
- memset (&info, 0, sizeof (info));
- memset (&pos , 0, sizeof (pos ));
- }
-
-#line 264 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 5: {
- {
+ {
+ memset (&info, 0, sizeof (info));
+ memset (&pos , 0, sizeof (pos ));
+}
+ break;
+ case 5:
#line 43 "hb-buffer-deserialize-json.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 280 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 2: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 2:
#line 51 "hb-buffer-deserialize-json.rl"
-
- tok = p;
- }
-
-#line 292 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 15: {
- {
+ {
+ tok = p;
+}
+ break;
+ case 15:
#line 55 "hb-buffer-deserialize-json.rl"
- if (unlikely (!buffer->ensure_glyphs ())) return false; }
-
-#line 302 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 21: {
- {
+ { if (unlikely (!buffer->ensure_glyphs ())) return false; }
+ break;
+ case 21:
#line 56 "hb-buffer-deserialize-json.rl"
- if (unlikely (!buffer->ensure_unicode ())) return false; }
-
-#line 312 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 16: {
- {
+ { if (unlikely (!buffer->ensure_unicode ())) return false; }
+ break;
+ case 16:
#line 58 "hb-buffer-deserialize-json.rl"
-
- /* TODO Unescape \" and \\ if found. */
- if (!hb_font_glyph_from_string (font,
- tok, p - tok,
- &info.codepoint))
- return false;
- }
-
-#line 328 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 18: {
- {
+ {
+ /* TODO Unescape \" and \\ if found. */
+ if (!hb_font_glyph_from_string (font,
+ tok, p - tok,
+ &info.codepoint))
+ return false;
+}
+ break;
+ case 18:
#line 66 "hb-buffer-deserialize-json.rl"
- if (!parse_uint (tok, p, &info.codepoint)) return false; }
-
-#line 338 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 8: {
- {
+ { if (!parse_uint (tok, p, &info.codepoint)) return false; }
+ break;
+ case 8:
#line 67 "hb-buffer-deserialize-json.rl"
- if (!parse_uint (tok, p, &info.cluster )) return false; }
-
-#line 348 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 10: {
- {
+ { if (!parse_uint (tok, p, &info.cluster )) return false; }
+ break;
+ case 10:
#line 68 "hb-buffer-deserialize-json.rl"
- if (!parse_int (tok, p, &pos.x_offset )) return false; }
-
-#line 358 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 12: {
- {
+ { if (!parse_int (tok, p, &pos.x_offset )) return false; }
+ break;
+ case 12:
#line 69 "hb-buffer-deserialize-json.rl"
- if (!parse_int (tok, p, &pos.y_offset )) return false; }
-
-#line 368 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 3: {
- {
+ { if (!parse_int (tok, p, &pos.y_offset )) return false; }
+ break;
+ case 3:
#line 70 "hb-buffer-deserialize-json.rl"
- if (!parse_int (tok, p, &pos.x_advance)) return false; }
-
-#line 378 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 6: {
- {
+ { if (!parse_int (tok, p, &pos.x_advance)) return false; }
+ break;
+ case 6:
#line 71 "hb-buffer-deserialize-json.rl"
- if (!parse_int (tok, p, &pos.y_advance)) return false; }
-
-#line 388 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 14: {
- {
+ { if (!parse_int (tok, p, &pos.y_advance)) return false; }
+ break;
+ case 14:
#line 51 "hb-buffer-deserialize-json.rl"
-
- tok = p;
- }
-
-#line 400 "hb-buffer-deserialize-json.hh"
-
- {
+ {
+ tok = p;
+}
#line 55 "hb-buffer-deserialize-json.rl"
- if (unlikely (!buffer->ensure_glyphs ())) return false; }
-
-#line 406 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 20: {
- {
+ { if (unlikely (!buffer->ensure_glyphs ())) return false; }
+ break;
+ case 20:
#line 51 "hb-buffer-deserialize-json.rl"
-
- tok = p;
- }
-
-#line 418 "hb-buffer-deserialize-json.hh"
-
- {
+ {
+ tok = p;
+}
#line 56 "hb-buffer-deserialize-json.rl"
- if (unlikely (!buffer->ensure_unicode ())) return false; }
-
-#line 424 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 17: {
- {
+ { if (unlikely (!buffer->ensure_unicode ())) return false; }
+ break;
+ case 17:
#line 58 "hb-buffer-deserialize-json.rl"
-
- /* TODO Unescape \" and \\ if found. */
- if (!hb_font_glyph_from_string (font,
- tok, p - tok,
- &info.codepoint))
- return false;
- }
-
-#line 440 "hb-buffer-deserialize-json.hh"
-
- {
+ {
+ /* TODO Unescape \" and \\ if found. */
+ if (!hb_font_glyph_from_string (font,
+ tok, p - tok,
+ &info.codepoint))
+ return false;
+}
#line 43 "hb-buffer-deserialize-json.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 452 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 19: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 19:
#line 66 "hb-buffer-deserialize-json.rl"
- if (!parse_uint (tok, p, &info.codepoint)) return false; }
-
-#line 462 "hb-buffer-deserialize-json.hh"
-
- {
+ { if (!parse_uint (tok, p, &info.codepoint)) return false; }
#line 43 "hb-buffer-deserialize-json.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 474 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 9: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 9:
#line 67 "hb-buffer-deserialize-json.rl"
- if (!parse_uint (tok, p, &info.cluster )) return false; }
-
-#line 484 "hb-buffer-deserialize-json.hh"
-
- {
+ { if (!parse_uint (tok, p, &info.cluster )) return false; }
#line 43 "hb-buffer-deserialize-json.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 496 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 11: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 11:
#line 68 "hb-buffer-deserialize-json.rl"
- if (!parse_int (tok, p, &pos.x_offset )) return false; }
-
-#line 506 "hb-buffer-deserialize-json.hh"
-
- {
+ { if (!parse_int (tok, p, &pos.x_offset )) return false; }
#line 43 "hb-buffer-deserialize-json.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 518 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 13: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 13:
#line 69 "hb-buffer-deserialize-json.rl"
- if (!parse_int (tok, p, &pos.y_offset )) return false; }
-
-#line 528 "hb-buffer-deserialize-json.hh"
-
- {
+ { if (!parse_int (tok, p, &pos.y_offset )) return false; }
#line 43 "hb-buffer-deserialize-json.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 540 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 4: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 4:
#line 70 "hb-buffer-deserialize-json.rl"
- if (!parse_int (tok, p, &pos.x_advance)) return false; }
-
-#line 550 "hb-buffer-deserialize-json.hh"
-
- {
+ { if (!parse_int (tok, p, &pos.x_advance)) return false; }
#line 43 "hb-buffer-deserialize-json.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 562 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- case 7: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 7:
#line 71 "hb-buffer-deserialize-json.rl"
- if (!parse_int (tok, p, &pos.y_advance)) return false; }
-
-#line 572 "hb-buffer-deserialize-json.hh"
-
- {
+ { if (!parse_int (tok, p, &pos.y_advance)) return false; }
#line 43 "hb-buffer-deserialize-json.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 584 "hb-buffer-deserialize-json.hh"
-
-
- break;
- }
- }
-
- }
-
- if ( cs != 0 ) {
- p += 1;
- goto _resume;
- }
- _out: {}
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+#line 713 "hb-buffer-deserialize-json.hh"
}
-
+
+_again:
+ if ( cs == 0 )
+ goto _out;
+ if ( ++p != pe )
+ goto _resume;
+ _test_eof: {}
+ _out: {}
+ }
+
#line 136 "hb-buffer-deserialize-json.rl"
-
-
- *end_ptr = p;
-
- return p == pe && *(p-1) != ']';
+
+
+ *end_ptr = p;
+
+ return p == pe && *(p-1) != ']';
}
#endif /* HB_BUFFER_DESERIALIZE_JSON_HH */
diff --git a/thirdparty/harfbuzz/src/hb-buffer-deserialize-text.hh b/thirdparty/harfbuzz/src/hb-buffer-deserialize-text.hh
index fb36f56015..b599e9667c 100644
--- a/thirdparty/harfbuzz/src/hb-buffer-deserialize-text.hh
+++ b/thirdparty/harfbuzz/src/hb-buffer-deserialize-text.hh
@@ -1,29 +1,30 @@
+
#line 1 "hb-buffer-deserialize-text.rl"
/*
-* Copyright © 2013 Google, Inc.
-*
-* This is part of HarfBuzz, a text shaping library.
-*
-* Permission is hereby granted, without written agreement and without
-* license or royalty fees, to use, copy, modify, and distribute this
-* software and its documentation for any purpose, provided that the
-* above copyright notice and the following two paragraphs appear in
-* all copies of this software.
-*
-* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
-* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
-* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
-* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-* DAMAGE.
-*
-* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
-* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
-* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
-* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-*
-* Google Author(s): Behdad Esfahbod
-*/
+ * Copyright © 2013 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
#ifndef HB_BUFFER_DESERIALIZE_TEXT_HH
#define HB_BUFFER_DESERIALIZE_TEXT_HH
@@ -31,143 +32,366 @@
#include "hb.hh"
-#line 35 "hb-buffer-deserialize-text.hh"
+#line 36 "hb-buffer-deserialize-text.hh"
static const unsigned char _deserialize_text_trans_keys[] = {
- 1u, 0u, 0u, 13u, 12u, 12u, 2u, 2u,
- 5u, 11u, 0u, 12u, 5u, 6u, 4u, 6u,
- 5u, 6u, 5u, 6u, 4u, 6u, 5u, 6u,
- 3u, 3u, 4u, 6u, 5u, 6u, 3u, 6u,
- 2u, 16u, 4u, 6u, 5u, 6u, 0u, 16u,
- 0u, 16u, 1u, 0u, 0u, 12u, 0u, 16u,
- 0u, 16u, 0u, 16u, 0u, 16u, 0u, 16u,
- 0u, 16u, 0u, 16u, 0u, 16u, 0u, 16u,
- 0u, 16u, 0u, 16u, 0u, 16u, 0u, 16u,
- 0u, 16u, 0u
+ 0u, 0u, 9u, 91u, 85u, 85u, 43u, 43u, 48u, 102u, 9u, 85u, 48u, 57u, 45u, 57u,
+ 48u, 57u, 48u, 57u, 45u, 57u, 48u, 57u, 44u, 44u, 45u, 57u, 48u, 57u, 44u, 57u,
+ 43u, 124u, 45u, 57u, 48u, 57u, 9u, 124u, 9u, 124u, 0u, 0u, 9u, 85u, 9u, 124u,
+ 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u,
+ 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 0
};
-static const signed char _deserialize_text_char_class[] = {
- 0, 0, 0, 0, 0, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 0,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 2, 3, 4, 1, 1, 5,
- 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 1, 1, 7, 8, 9, 1, 10,
- 11, 11, 11, 11, 11, 11, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 12, 1, 1, 1,
- 1, 1, 13, 14, 15, 1, 1, 1,
- 11, 11, 11, 11, 11, 11, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 16, 0
+static const char _deserialize_text_key_spans[] = {
+ 0, 83, 1, 1, 55, 77, 10, 13,
+ 10, 10, 13, 10, 1, 13, 10, 14,
+ 82, 13, 10, 116, 116, 0, 77, 116,
+ 116, 116, 116, 116, 116, 116, 116, 116,
+ 116, 116, 116, 116, 116
};
static const short _deserialize_text_index_offsets[] = {
- 0, 0, 14, 15, 16, 23, 36, 38,
- 41, 43, 45, 48, 50, 51, 54, 56,
- 60, 75, 78, 80, 97, 114, 114, 127,
- 144, 161, 178, 195, 212, 229, 246, 263,
- 280, 297, 314, 331, 348, 0
-};
-
-static const signed char _deserialize_text_indicies[] = {
- 1, 0, 0, 0, 0, 0, 0, 2,
- 0, 0, 0, 0, 0, 3, 4, 6,
- 7, 7, 0, 0, 0, 0, 7, 8,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 4, 10, 11, 13, 14,
- 15, 17, 18, 20, 21, 23, 24, 25,
- 27, 28, 29, 31, 32, 33, 35, 36,
- 29, 0, 28, 28, 38, 38, 0, 0,
- 0, 0, 38, 0, 38, 0, 0, 0,
- 38, 38, 38, 40, 41, 42, 44, 45,
- 47, 0, 0, 0, 0, 48, 48, 0,
- 49, 50, 0, 48, 0, 0, 0, 0,
- 51, 52, 0, 0, 0, 0, 0, 0,
- 0, 0, 53, 0, 0, 0, 0, 0,
- 0, 54, 8, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 4, 56,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 57, 0, 0, 0, 0, 0, 0, 58,
- 56, 0, 0, 0, 0, 60, 60, 0,
- 0, 57, 0, 0, 0, 0, 0, 0,
- 58, 63, 62, 64, 0, 62, 62, 62,
- 62, 65, 62, 66, 62, 62, 62, 67,
- 68, 69, 71, 38, 72, 0, 38, 38,
- 38, 38, 73, 38, 74, 38, 38, 38,
- 37, 75, 76, 78, 0, 0, 79, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 80, 81, 82, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 53, 83, 84, 62, 64,
- 0, 62, 62, 62, 62, 65, 62, 66,
- 62, 62, 62, 67, 68, 69, 86, 0,
- 87, 0, 0, 0, 0, 0, 0, 0,
- 88, 0, 0, 0, 0, 57, 89, 91,
- 0, 92, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 93, 94,
- 91, 0, 92, 0, 0, 36, 36, 0,
- 0, 0, 0, 0, 0, 0, 0, 93,
- 94, 86, 0, 87, 0, 0, 97, 97,
- 0, 0, 0, 88, 0, 0, 0, 0,
- 57, 89, 99, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 100, 101, 99, 0, 0, 0, 0,
- 45, 45, 0, 0, 0, 0, 0, 0,
- 0, 0, 100, 101, 78, 0, 0, 79,
- 0, 18, 18, 0, 0, 0, 0, 0,
- 0, 0, 0, 80, 81, 0
+ 0, 0, 84, 86, 88, 144, 222, 233,
+ 247, 258, 269, 283, 294, 296, 310, 321,
+ 336, 419, 433, 444, 561, 678, 679, 757,
+ 874, 991, 1108, 1225, 1342, 1459, 1576, 1693,
+ 1810, 1927, 2044, 2161, 2278
};
-static const signed char _deserialize_text_index_defaults[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 62, 38, 0, 0, 62, 0, 0,
- 0, 0, 0, 0, 0, 0
+static const char _deserialize_text_indicies[] = {
+ 0, 0, 0, 0, 0, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 3, 1, 4, 1, 5,
+ 1, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 1, 1, 1, 1, 1,
+ 1, 1, 6, 6, 6, 6, 6, 6,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 6, 6, 6, 6, 6, 6,
+ 1, 7, 7, 7, 7, 7, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 7, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 4, 1, 8,
+ 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 1, 10, 1, 1, 11, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 1,
+ 13, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 1, 15, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 1, 17, 1,
+ 1, 18, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 1, 20, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 1, 22,
+ 1, 23, 1, 1, 24, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 1, 26,
+ 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 1, 22, 1, 1, 1, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21,
+ 1, 28, 28, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 28, 1, 1, 28, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 28, 28, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 28, 1, 29, 1, 1, 30,
+ 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 1, 32, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 1, 34, 34, 34,
+ 34, 34, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 34, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 1, 1,
+ 1, 36, 37, 1, 1, 35, 35, 35,
+ 35, 35, 35, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 35, 35, 35,
+ 35, 35, 35, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 38, 1, 39, 39, 39, 39, 39, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 39, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 40,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 41, 1, 1,
+ 7, 7, 7, 7, 7, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 7,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 4, 1, 42, 42,
+ 42, 42, 42, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 42, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 43, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 44, 1, 42, 42, 42, 42, 42,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 42, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 1, 1, 1, 1,
+ 43, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 44, 1,
+ 47, 47, 47, 47, 47, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 47,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 48, 1, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 49, 46, 46, 50,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 51, 52, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 53, 46, 54, 54, 54,
+ 54, 54, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 54, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 55,
+ 1, 28, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, 56, 28, 28, 57, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28,
+ 58, 59, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28,
+ 60, 28, 61, 61, 61, 61, 61, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 61, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 62, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 63, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 64, 1, 65,
+ 65, 65, 65, 65, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 65, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 40, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 66, 1, 67, 67, 67, 67,
+ 67, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 67, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 48, 1,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 49, 46, 46, 50, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 51,
+ 52, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 53,
+ 46, 68, 68, 68, 68, 68, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 68, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 69, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 70, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 43, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 71, 1, 72, 72,
+ 72, 72, 72, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 72, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 73, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 74, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 75, 1, 72, 72, 72, 72, 72,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 72, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 73, 1, 1,
+ 1, 1, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 74,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 75, 1,
+ 68, 68, 68, 68, 68, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 68,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 69, 1, 1, 1, 1, 76,
+ 76, 76, 76, 76, 76, 76, 76, 76,
+ 76, 1, 1, 1, 1, 1, 1, 70,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 43, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 71, 1, 77, 77, 77,
+ 77, 77, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 77, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 78, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 79, 1, 77, 77, 77, 77, 77, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 77, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 78, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 79, 1, 61,
+ 61, 61, 61, 61, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 61, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 62, 1, 1, 1, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 63, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 64, 1, 0
};
-static const signed char _deserialize_text_cond_targs[] = {
- 0, 1, 2, 25, 3, 3, 4, 19,
- 5, 6, 23, 24, 7, 8, 27, 36,
- 8, 27, 36, 9, 30, 33, 10, 11,
- 12, 15, 11, 12, 15, 13, 13, 14,
- 31, 32, 14, 31, 32, 16, 26, 17,
- 18, 34, 35, 18, 34, 35, 19, 20,
- 19, 6, 21, 22, 20, 21, 22, 23,
- 20, 21, 22, 24, 24, 25, 26, 26,
- 7, 9, 10, 16, 21, 29, 26, 26,
- 7, 9, 10, 21, 29, 27, 28, 17,
- 21, 29, 28, 29, 29, 30, 28, 7,
- 10, 29, 31, 28, 7, 21, 29, 32,
- 33, 33, 34, 28, 21, 29, 35, 36,
- 0
+static const char _deserialize_text_trans_targs[] = {
+ 1, 0, 2, 25, 3, 4, 19, 5,
+ 23, 24, 8, 27, 36, 27, 36, 30,
+ 33, 11, 12, 15, 12, 15, 13, 14,
+ 31, 32, 31, 32, 26, 18, 34, 35,
+ 34, 35, 20, 19, 6, 21, 22, 20,
+ 21, 22, 20, 21, 22, 24, 26, 26,
+ 7, 9, 10, 16, 21, 29, 26, 7,
+ 9, 10, 16, 21, 29, 28, 17, 21,
+ 29, 28, 29, 29, 28, 7, 10, 29,
+ 28, 7, 21, 29, 33, 28, 21, 29
};
-static const signed char _deserialize_text_cond_actions[] = {
- 0, 0, 0, 0, 1, 0, 0, 2,
- 0, 0, 2, 2, 0, 3, 4, 4,
- 0, 5, 5, 0, 4, 4, 0, 3,
- 3, 3, 0, 0, 0, 6, 0, 3,
- 4, 4, 0, 5, 5, 0, 5, 0,
- 3, 4, 4, 0, 5, 5, 7, 7,
- 8, 9, 7, 7, 0, 0, 0, 10,
- 10, 10, 10, 10, 8, 11, 12, 13,
- 14, 14, 14, 15, 11, 11, 16, 17,
- 18, 18, 18, 16, 16, 19, 19, 20,
- 19, 19, 0, 0, 13, 10, 10, 21,
- 21, 10, 22, 22, 23, 22, 22, 22,
- 10, 5, 24, 24, 24, 24, 24, 19,
- 0
+static const char _deserialize_text_trans_actions[] = {
+ 0, 0, 0, 0, 1, 0, 2, 0,
+ 2, 2, 3, 4, 4, 5, 5, 4,
+ 4, 3, 3, 3, 0, 0, 6, 3,
+ 4, 4, 5, 5, 5, 3, 4, 4,
+ 5, 5, 7, 8, 9, 7, 7, 0,
+ 0, 0, 10, 10, 10, 8, 12, 13,
+ 14, 14, 14, 15, 11, 11, 17, 18,
+ 18, 18, 0, 16, 16, 19, 20, 19,
+ 19, 0, 0, 13, 10, 21, 21, 10,
+ 22, 23, 22, 22, 5, 24, 24, 24
};
-static const signed char _deserialize_text_eof_trans[] = {
- 1, 2, 3, 6, 7, 9, 10, 13,
- 17, 20, 23, 27, 28, 31, 35, 29,
- 38, 40, 44, 47, 53, 54, 55, 56,
- 60, 62, 71, 78, 83, 70, 86, 91,
- 96, 97, 99, 103, 104, 0
+static const char _deserialize_text_eof_actions[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 7, 0, 0, 0, 10,
+ 10, 11, 16, 19, 0, 11, 10, 22,
+ 22, 10, 24, 24, 19
};
static const int deserialize_text_start = 1;
@@ -182,583 +406,448 @@ static const int deserialize_text_en_main = 1;
static hb_bool_t
_hb_buffer_deserialize_text (hb_buffer_t *buffer,
-const char *buf,
-unsigned int buf_len,
-const char **end_ptr,
-hb_font_t *font)
+ const char *buf,
+ unsigned int buf_len,
+ const char **end_ptr,
+ hb_font_t *font)
{
- const char *p = buf, *pe = buf + buf_len;
-
- /* Ensure we have positions. */
- (void) hb_buffer_get_glyph_positions (buffer, nullptr);
-
- while (p < pe && ISSPACE (*p))
- p++;
-
- const char *eof = pe, *tok = nullptr;
- int cs;
- hb_glyph_info_t info = {0};
- hb_glyph_position_t pos = {0};
-
-#line 204 "hb-buffer-deserialize-text.hh"
- {
- cs = (int)deserialize_text_start;
+ const char *p = buf, *pe = buf + buf_len;
+
+ /* Ensure we have positions. */
+ (void) hb_buffer_get_glyph_positions (buffer, nullptr);
+
+ while (p < pe && ISSPACE (*p))
+ p++;
+
+ const char *eof = pe, *tok = nullptr;
+ int cs;
+ hb_glyph_info_t info = {0};
+ hb_glyph_position_t pos = {0};
+
+#line 428 "hb-buffer-deserialize-text.hh"
+ {
+ cs = deserialize_text_start;
}
-
-#line 209 "hb-buffer-deserialize-text.hh"
- {
- unsigned int _trans = 0;
- const unsigned char * _keys;
- const signed char * _inds;
- int _ic;
- _resume: {}
- if ( p == pe && p != eof )
- goto _out;
- if ( p == eof ) {
- if ( _deserialize_text_eof_trans[cs] > 0 ) {
- _trans = (unsigned int)_deserialize_text_eof_trans[cs] - 1;
- }
- }
- else {
- _keys = ( _deserialize_text_trans_keys + ((cs<<1)));
- _inds = ( _deserialize_text_indicies + (_deserialize_text_index_offsets[cs]));
-
- if ( ( (*( p))) <= 124 && ( (*( p))) >= 9 ) {
- _ic = (int)_deserialize_text_char_class[(int)( (*( p))) - 9];
- if ( _ic <= (int)(*( _keys+1)) && _ic >= (int)(*( _keys)) )
- _trans = (unsigned int)(*( _inds + (int)( _ic - (int)(*( _keys)) ) ));
- else
- _trans = (unsigned int)_deserialize_text_index_defaults[cs];
- }
- else {
- _trans = (unsigned int)_deserialize_text_index_defaults[cs];
- }
-
- }
- cs = (int)_deserialize_text_cond_targs[_trans];
-
- if ( _deserialize_text_cond_actions[_trans] != 0 ) {
-
- switch ( _deserialize_text_cond_actions[_trans] ) {
- case 1: {
- {
+
+#line 433 "hb-buffer-deserialize-text.hh"
+ {
+ int _slen;
+ int _trans;
+ const unsigned char *_keys;
+ const char *_inds;
+ if ( p == pe )
+ goto _test_eof;
+ if ( cs == 0 )
+ goto _out;
+_resume:
+ _keys = _deserialize_text_trans_keys + (cs<<1);
+ _inds = _deserialize_text_indicies + _deserialize_text_index_offsets[cs];
+
+ _slen = _deserialize_text_key_spans[cs];
+ _trans = _inds[ _slen > 0 && _keys[0] <=(*p) &&
+ (*p) <= _keys[1] ?
+ (*p) - _keys[0] : _slen ];
+
+ cs = _deserialize_text_trans_targs[_trans];
+
+ if ( _deserialize_text_trans_actions[_trans] == 0 )
+ goto _again;
+
+ switch ( _deserialize_text_trans_actions[_trans] ) {
+ case 1:
#line 38 "hb-buffer-deserialize-text.rl"
-
- memset (&info, 0, sizeof (info));
- memset (&pos , 0, sizeof (pos ));
- }
-
-#line 252 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 3: {
- {
+ {
+ memset (&info, 0, sizeof (info));
+ memset (&pos , 0, sizeof (pos ));
+}
+ break;
+ case 3:
#line 51 "hb-buffer-deserialize-text.rl"
-
- tok = p;
- }
-
-#line 264 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 5: {
- {
+ {
+ tok = p;
+}
+ break;
+ case 5:
#line 55 "hb-buffer-deserialize-text.rl"
- if (unlikely (!buffer->ensure_glyphs ())) return false; }
-
-#line 274 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 8: {
- {
+ { if (unlikely (!buffer->ensure_glyphs ())) return false; }
+ break;
+ case 8:
#line 56 "hb-buffer-deserialize-text.rl"
- if (unlikely (!buffer->ensure_unicode ())) return false; }
-
-#line 284 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 18: {
- {
+ { if (unlikely (!buffer->ensure_unicode ())) return false; }
+ break;
+ case 18:
#line 58 "hb-buffer-deserialize-text.rl"
-
- /* TODO Unescape delimeters. */
- if (!hb_font_glyph_from_string (font,
- tok, p - tok,
- &info.codepoint))
- return false;
- }
-
-#line 300 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 9: {
- {
+ {
+ /* TODO Unescape delimeters. */
+ if (!hb_font_glyph_from_string (font,
+ tok, p - tok,
+ &info.codepoint))
+ return false;
+}
+ break;
+ case 9:
#line 66 "hb-buffer-deserialize-text.rl"
- if (!parse_hex (tok, p, &info.codepoint )) return false; }
-
-#line 310 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 21: {
- {
+ {if (!parse_hex (tok, p, &info.codepoint )) return false; }
+ break;
+ case 21:
#line 68 "hb-buffer-deserialize-text.rl"
- if (!parse_uint (tok, p, &info.cluster )) return false; }
-
-#line 320 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 6: {
- {
+ { if (!parse_uint (tok, p, &info.cluster )) return false; }
+ break;
+ case 6:
#line 69 "hb-buffer-deserialize-text.rl"
- if (!parse_int (tok, p, &pos.x_offset )) return false; }
-
-#line 330 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 23: {
- {
+ { if (!parse_int (tok, p, &pos.x_offset )) return false; }
+ break;
+ case 23:
#line 70 "hb-buffer-deserialize-text.rl"
- if (!parse_int (tok, p, &pos.y_offset )) return false; }
-
-#line 340 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 20: {
- {
+ { if (!parse_int (tok, p, &pos.y_offset )) return false; }
+ break;
+ case 20:
#line 71 "hb-buffer-deserialize-text.rl"
- if (!parse_int (tok, p, &pos.x_advance)) return false; }
-
-#line 350 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 15: {
- {
+ { if (!parse_int (tok, p, &pos.x_advance)) return false; }
+ break;
+ case 15:
#line 38 "hb-buffer-deserialize-text.rl"
-
- memset (&info, 0, sizeof (info));
- memset (&pos , 0, sizeof (pos ));
- }
-
-#line 363 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ memset (&info, 0, sizeof (info));
+ memset (&pos , 0, sizeof (pos ));
+}
#line 51 "hb-buffer-deserialize-text.rl"
-
- tok = p;
- }
-
-#line 371 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 4: {
- {
+ {
+ tok = p;
+}
+ break;
+ case 4:
#line 51 "hb-buffer-deserialize-text.rl"
-
- tok = p;
- }
-
-#line 383 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ tok = p;
+}
#line 55 "hb-buffer-deserialize-text.rl"
- if (unlikely (!buffer->ensure_glyphs ())) return false; }
-
-#line 389 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 2: {
- {
+ { if (unlikely (!buffer->ensure_glyphs ())) return false; }
+ break;
+ case 2:
#line 51 "hb-buffer-deserialize-text.rl"
-
- tok = p;
- }
-
-#line 401 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ tok = p;
+}
#line 56 "hb-buffer-deserialize-text.rl"
- if (unlikely (!buffer->ensure_unicode ())) return false; }
-
-#line 407 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 16: {
- {
+ { if (unlikely (!buffer->ensure_unicode ())) return false; }
+ break;
+ case 16:
#line 58 "hb-buffer-deserialize-text.rl"
-
- /* TODO Unescape delimeters. */
- if (!hb_font_glyph_from_string (font,
- tok, p - tok,
- &info.codepoint))
- return false;
- }
-
-#line 423 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ /* TODO Unescape delimeters. */
+ if (!hb_font_glyph_from_string (font,
+ tok, p - tok,
+ &info.codepoint))
+ return false;
+}
#line 43 "hb-buffer-deserialize-text.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 435 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 7: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 7:
#line 66 "hb-buffer-deserialize-text.rl"
- if (!parse_hex (tok, p, &info.codepoint )) return false; }
-
-#line 445 "hb-buffer-deserialize-text.hh"
-
- {
+ {if (!parse_hex (tok, p, &info.codepoint )) return false; }
#line 43 "hb-buffer-deserialize-text.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 457 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 10: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 10:
#line 68 "hb-buffer-deserialize-text.rl"
- if (!parse_uint (tok, p, &info.cluster )) return false; }
-
-#line 467 "hb-buffer-deserialize-text.hh"
-
- {
+ { if (!parse_uint (tok, p, &info.cluster )) return false; }
#line 43 "hb-buffer-deserialize-text.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 479 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 22: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 22:
#line 70 "hb-buffer-deserialize-text.rl"
- if (!parse_int (tok, p, &pos.y_offset )) return false; }
-
-#line 489 "hb-buffer-deserialize-text.hh"
-
- {
+ { if (!parse_int (tok, p, &pos.y_offset )) return false; }
#line 43 "hb-buffer-deserialize-text.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 501 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 19: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 19:
#line 71 "hb-buffer-deserialize-text.rl"
- if (!parse_int (tok, p, &pos.x_advance)) return false; }
-
-#line 511 "hb-buffer-deserialize-text.hh"
-
- {
+ { if (!parse_int (tok, p, &pos.x_advance)) return false; }
#line 43 "hb-buffer-deserialize-text.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 523 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 24: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 24:
#line 72 "hb-buffer-deserialize-text.rl"
- if (!parse_int (tok, p, &pos.y_advance)) return false; }
-
-#line 533 "hb-buffer-deserialize-text.hh"
-
- {
+ { if (!parse_int (tok, p, &pos.y_advance)) return false; }
#line 43 "hb-buffer-deserialize-text.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 545 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 12: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 12:
#line 38 "hb-buffer-deserialize-text.rl"
-
- memset (&info, 0, sizeof (info));
- memset (&pos , 0, sizeof (pos ));
- }
-
-#line 558 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ memset (&info, 0, sizeof (info));
+ memset (&pos , 0, sizeof (pos ));
+}
#line 51 "hb-buffer-deserialize-text.rl"
-
- tok = p;
- }
-
-#line 566 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ tok = p;
+}
#line 55 "hb-buffer-deserialize-text.rl"
- if (unlikely (!buffer->ensure_glyphs ())) return false; }
-
-#line 572 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 14: {
- {
+ { if (unlikely (!buffer->ensure_glyphs ())) return false; }
+ break;
+ case 14:
#line 38 "hb-buffer-deserialize-text.rl"
-
- memset (&info, 0, sizeof (info));
- memset (&pos , 0, sizeof (pos ));
- }
-
-#line 585 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ memset (&info, 0, sizeof (info));
+ memset (&pos , 0, sizeof (pos ));
+}
#line 51 "hb-buffer-deserialize-text.rl"
-
- tok = p;
- }
-
-#line 593 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ tok = p;
+}
#line 58 "hb-buffer-deserialize-text.rl"
-
- /* TODO Unescape delimeters. */
- if (!hb_font_glyph_from_string (font,
- tok, p - tok,
- &info.codepoint))
- return false;
- }
-
-#line 605 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 17: {
- {
+ {
+ /* TODO Unescape delimeters. */
+ if (!hb_font_glyph_from_string (font,
+ tok, p - tok,
+ &info.codepoint))
+ return false;
+}
+ break;
+ case 17:
#line 58 "hb-buffer-deserialize-text.rl"
-
- /* TODO Unescape delimeters. */
- if (!hb_font_glyph_from_string (font,
- tok, p - tok,
- &info.codepoint))
- return false;
- }
-
-#line 621 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ /* TODO Unescape delimeters. */
+ if (!hb_font_glyph_from_string (font,
+ tok, p - tok,
+ &info.codepoint))
+ return false;
+}
#line 55 "hb-buffer-deserialize-text.rl"
- if (unlikely (!buffer->ensure_glyphs ())) return false; }
-
-#line 627 "hb-buffer-deserialize-text.hh"
-
- {
+ { if (unlikely (!buffer->ensure_glyphs ())) return false; }
#line 43 "hb-buffer-deserialize-text.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 639 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 11: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 11:
#line 38 "hb-buffer-deserialize-text.rl"
-
- memset (&info, 0, sizeof (info));
- memset (&pos , 0, sizeof (pos ));
- }
-
-#line 652 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ memset (&info, 0, sizeof (info));
+ memset (&pos , 0, sizeof (pos ));
+}
#line 51 "hb-buffer-deserialize-text.rl"
-
- tok = p;
- }
-
-#line 660 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ tok = p;
+}
#line 58 "hb-buffer-deserialize-text.rl"
-
- /* TODO Unescape delimeters. */
- if (!hb_font_glyph_from_string (font,
- tok, p - tok,
- &info.codepoint))
- return false;
- }
-
-#line 672 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ /* TODO Unescape delimeters. */
+ if (!hb_font_glyph_from_string (font,
+ tok, p - tok,
+ &info.codepoint))
+ return false;
+}
#line 43 "hb-buffer-deserialize-text.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 684 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- case 13: {
- {
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 13:
#line 38 "hb-buffer-deserialize-text.rl"
-
- memset (&info, 0, sizeof (info));
- memset (&pos , 0, sizeof (pos ));
- }
-
-#line 697 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ memset (&info, 0, sizeof (info));
+ memset (&pos , 0, sizeof (pos ));
+}
#line 51 "hb-buffer-deserialize-text.rl"
-
- tok = p;
- }
-
-#line 705 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ tok = p;
+}
#line 58 "hb-buffer-deserialize-text.rl"
-
- /* TODO Unescape delimeters. */
- if (!hb_font_glyph_from_string (font,
- tok, p - tok,
- &info.codepoint))
- return false;
- }
-
-#line 717 "hb-buffer-deserialize-text.hh"
-
- {
+ {
+ /* TODO Unescape delimeters. */
+ if (!hb_font_glyph_from_string (font,
+ tok, p - tok,
+ &info.codepoint))
+ return false;
+}
#line 55 "hb-buffer-deserialize-text.rl"
- if (unlikely (!buffer->ensure_glyphs ())) return false; }
-
-#line 723 "hb-buffer-deserialize-text.hh"
-
- {
+ { if (unlikely (!buffer->ensure_glyphs ())) return false; }
#line 43 "hb-buffer-deserialize-text.rl"
-
- buffer->add_info (info);
- if (unlikely (!buffer->successful))
- return false;
- buffer->pos[buffer->len - 1] = pos;
- *end_ptr = p;
- }
-
-#line 735 "hb-buffer-deserialize-text.hh"
-
-
- break;
- }
- }
-
- }
-
- if ( p == eof ) {
- if ( cs >= 19 )
- goto _out;
- }
- else {
- if ( cs != 0 ) {
- p += 1;
- goto _resume;
- }
- }
- _out: {}
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+#line 722 "hb-buffer-deserialize-text.hh"
}
-
-#line 138 "hb-buffer-deserialize-text.rl"
-
-
+
+_again:
+ if ( cs == 0 )
+ goto _out;
+ if ( ++p != pe )
+ goto _resume;
+ _test_eof: {}
+ if ( p == eof )
+ {
+ switch ( _deserialize_text_eof_actions[cs] ) {
+ case 16:
+#line 58 "hb-buffer-deserialize-text.rl"
+ {
+ /* TODO Unescape delimeters. */
+ if (!hb_font_glyph_from_string (font,
+ tok, p - tok,
+ &info.codepoint))
+ return false;
+}
+#line 43 "hb-buffer-deserialize-text.rl"
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 7:
+#line 66 "hb-buffer-deserialize-text.rl"
+ {if (!parse_hex (tok, p, &info.codepoint )) return false; }
+#line 43 "hb-buffer-deserialize-text.rl"
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 10:
+#line 68 "hb-buffer-deserialize-text.rl"
+ { if (!parse_uint (tok, p, &info.cluster )) return false; }
+#line 43 "hb-buffer-deserialize-text.rl"
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 22:
+#line 70 "hb-buffer-deserialize-text.rl"
+ { if (!parse_int (tok, p, &pos.y_offset )) return false; }
+#line 43 "hb-buffer-deserialize-text.rl"
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 19:
+#line 71 "hb-buffer-deserialize-text.rl"
+ { if (!parse_int (tok, p, &pos.x_advance)) return false; }
+#line 43 "hb-buffer-deserialize-text.rl"
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 24:
+#line 72 "hb-buffer-deserialize-text.rl"
+ { if (!parse_int (tok, p, &pos.y_advance)) return false; }
+#line 43 "hb-buffer-deserialize-text.rl"
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
+ *end_ptr = p;
+}
+ break;
+ case 11:
+#line 38 "hb-buffer-deserialize-text.rl"
+ {
+ memset (&info, 0, sizeof (info));
+ memset (&pos , 0, sizeof (pos ));
+}
+#line 51 "hb-buffer-deserialize-text.rl"
+ {
+ tok = p;
+}
+#line 58 "hb-buffer-deserialize-text.rl"
+ {
+ /* TODO Unescape delimeters. */
+ if (!hb_font_glyph_from_string (font,
+ tok, p - tok,
+ &info.codepoint))
+ return false;
+}
+#line 43 "hb-buffer-deserialize-text.rl"
+ {
+ buffer->add_info (info);
+ if (unlikely (!buffer->successful))
+ return false;
+ buffer->pos[buffer->len - 1] = pos;
*end_ptr = p;
-
- return p == pe && *(p-1) != ']';
+}
+ break;
+#line 839 "hb-buffer-deserialize-text.hh"
+ }
+ }
+
+ _out: {}
+ }
+
+#line 138 "hb-buffer-deserialize-text.rl"
+
+
+ *end_ptr = p;
+
+ return p == pe && *(p-1) != ']';
}
#endif /* HB_BUFFER_DESERIALIZE_TEXT_HH */
diff --git a/thirdparty/harfbuzz/src/hb-buffer.cc b/thirdparty/harfbuzz/src/hb-buffer.cc
index 8cad6ab8e6..c6591ca230 100644
--- a/thirdparty/harfbuzz/src/hb-buffer.cc
+++ b/thirdparty/harfbuzz/src/hb-buffer.cc
@@ -96,14 +96,15 @@ hb_segment_properties_hash (const hb_segment_properties_t *p)
* As an optimization, both info and out_info may point to the
* same piece of memory, which is owned by info. This remains the
* case as long as out_len doesn't exceed i at any time.
- * In that case, swap_buffers() is no-op and the glyph operations operate
- * mostly in-place.
+ * In that case, swap_buffers() is mostly no-op and the glyph operations
+ * operate mostly in-place.
*
* As soon as out_info gets longer than info, out_info is moved over
- * to an alternate buffer (which we reuse the pos buffer for!), and its
+ * to an alternate buffer (which we reuse the pos buffer for), and its
* current contents (out_len entries) are copied to the new place.
+ *
* This should all remain transparent to the user. swap_buffers() then
- * switches info and out_info.
+ * switches info over to out_info and does housekeeping.
*/
@@ -136,8 +137,8 @@ hb_buffer_t::enlarge (unsigned int size)
if (unlikely (hb_unsigned_mul_overflows (new_allocated, sizeof (info[0]))))
goto done;
- new_pos = (hb_glyph_position_t *) realloc (pos, new_allocated * sizeof (pos[0]));
- new_info = (hb_glyph_info_t *) realloc (info, new_allocated * sizeof (info[0]));
+ new_pos = (hb_glyph_position_t *) hb_realloc (pos, new_allocated * sizeof (pos[0]));
+ new_info = (hb_glyph_info_t *) hb_realloc (info, new_allocated * sizeof (info[0]));
done:
if (unlikely (!new_pos || !new_info))
@@ -282,21 +283,12 @@ hb_buffer_t::add_info (const hb_glyph_info_t &glyph_info)
void
-hb_buffer_t::remove_output ()
-{
- have_output = false;
- have_positions = false;
-
- out_len = 0;
- out_info = info;
-}
-
-void
hb_buffer_t::clear_output ()
{
have_output = true;
have_positions = false;
+ idx = 0;
out_len = 0;
out_info = info;
}
@@ -316,29 +308,23 @@ hb_buffer_t::clear_positions ()
void
hb_buffer_t::swap_buffers ()
{
- if (unlikely (!successful)) return;
+ assert (have_output);
assert (idx <= len);
- if (unlikely (!next_glyphs (len - idx))) return;
- assert (have_output);
- have_output = false;
+ if (unlikely (!successful || !next_glyphs (len - idx)))
+ goto reset;
if (out_info != info)
{
- hb_glyph_info_t *tmp;
- tmp = info;
+ pos = (hb_glyph_position_t *) info;
info = out_info;
- out_info = tmp;
-
- pos = (hb_glyph_position_t *) out_info;
}
-
- unsigned int tmp;
- tmp = len;
len = out_len;
- out_len = tmp;
+reset:
+ have_output = false;
+ out_len = 0;
idx = 0;
}
@@ -373,12 +359,11 @@ hb_buffer_t::move_to (unsigned int i)
/* This will blow in our face if memory allocation fails later
* in this same lookup...
*
- * We used to shift with extra 32 items, instead of the 0 below.
+ * We used to shift with extra 32 items.
* But that would leave empty slots in the buffer in case of allocation
- * failures. Setting to zero for now to avoid other problems (see
- * comments in shift_forward(). This can cause O(N^2) behavior more
- * severely than adding 32 empty slots can... */
- if (unlikely (idx < count && !shift_forward (count + 0))) return false;
+ * failures. See comments in shift_forward(). This can cause O(N^2)
+ * behavior more severely than adding 32 empty slots can... */
+ if (unlikely (idx < count && !shift_forward (count - idx))) return false;
assert (idx >= count);
@@ -630,7 +615,7 @@ DEFINE_NULL_INSTANCE (hb_buffer_t) =
HB_BUFFER_CONTENT_TYPE_INVALID,
HB_SEGMENT_PROPERTIES_DEFAULT,
false, /* successful */
- true, /* have_output */
+ false, /* have_output */
true /* have_positions */
/* Zero is good enough for everything else. */
@@ -717,14 +702,14 @@ hb_buffer_destroy (hb_buffer_t *buffer)
hb_unicode_funcs_destroy (buffer->unicode);
- free (buffer->info);
- free (buffer->pos);
+ hb_free (buffer->info);
+ hb_free (buffer->pos);
#ifndef HB_NO_BUFFER_MESSAGE
if (buffer->message_destroy)
buffer->message_destroy (buffer->message_data);
#endif
- free (buffer);
+ hb_free (buffer);
}
/**
@@ -1363,6 +1348,11 @@ hb_buffer_get_glyph_infos (hb_buffer_t *buffer,
* Returns @buffer glyph position array. Returned pointer
* is valid as long as @buffer contents are not modified.
*
+ * If buffer did not have positions before, the positions will be
+ * initialized to zeros, unless this function is called from
+ * within a buffer message callback (see hb_buffer_set_message_func()),
+ * in which case %NULL is returned.
+ *
* Return value: (transfer none) (array length=length):
* The @buffer glyph position array.
* The value valid as long as buffer has not been modified.
@@ -1373,12 +1363,17 @@ hb_glyph_position_t *
hb_buffer_get_glyph_positions (hb_buffer_t *buffer,
unsigned int *length)
{
- if (!buffer->have_positions)
- buffer->clear_positions ();
-
if (length)
*length = buffer->len;
+ if (!buffer->have_positions)
+ {
+ if (unlikely (buffer->message_depth))
+ return nullptr;
+
+ buffer->clear_positions ();
+ }
+
return (hb_glyph_position_t *) buffer->pos;
}
@@ -1760,6 +1755,28 @@ hb_buffer_append (hb_buffer_t *buffer,
memcpy (buffer->info + orig_len, source->info + start, (end - start) * sizeof (buffer->info[0]));
if (buffer->have_positions)
memcpy (buffer->pos + orig_len, source->pos + start, (end - start) * sizeof (buffer->pos[0]));
+
+ if (source->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE)
+ {
+ /* See similar logic in add_utf. */
+
+ /* pre-context */
+ if (!orig_len && start + source->context_len[0] > 0)
+ {
+ buffer->clear_context (0);
+ while (start > 0 && buffer->context_len[0] < buffer->CONTEXT_LENGTH)
+ buffer->context[0][buffer->context_len[0]++] = source->info[--start].codepoint;
+ for (auto i = 0u; i < source->context_len[0] && buffer->context_len[0] < buffer->CONTEXT_LENGTH; i++)
+ buffer->context[0][buffer->context_len[0]++] = source->context[0][i];
+ }
+
+ /* post-context */
+ buffer->clear_context (1);
+ while (end < source->len && buffer->context_len[1] < buffer->CONTEXT_LENGTH)
+ buffer->context[1][buffer->context_len[1]++] = source->info[end++].codepoint;
+ for (auto i = 0u; i < source->context_len[1] && buffer->context_len[1] < buffer->CONTEXT_LENGTH; i++)
+ buffer->context[1][buffer->context_len[1]++] = source->context[1][i];
+ }
}
diff --git a/thirdparty/harfbuzz/src/hb-buffer.hh b/thirdparty/harfbuzz/src/hb-buffer.hh
index 8b432b5f96..8635ebd35f 100644
--- a/thirdparty/harfbuzz/src/hb-buffer.hh
+++ b/thirdparty/harfbuzz/src/hb-buffer.hh
@@ -107,7 +107,7 @@ struct hb_buffer_t
unsigned int idx; /* Cursor into ->info and ->pos arrays */
unsigned int len; /* Length of ->info and ->pos arrays */
- unsigned int out_len; /* Length of ->out array if have_output */
+ unsigned int out_len; /* Length of ->out_info array if have_output */
unsigned int allocated; /* Length of allocated arrays */
hb_glyph_info_t *info;
@@ -128,6 +128,9 @@ struct hb_buffer_t
hb_buffer_message_func_t message_func;
void *message_data;
hb_destroy_func_t message_destroy;
+ unsigned message_depth; /* How deeply are we inside a message callback? */
+#else
+ static constexpr unsigned message_depth = 0u;
#endif
/* Internal debugging. */
@@ -186,13 +189,10 @@ struct hb_buffer_t
hb_glyph_info_t &prev () { return out_info[out_len ? out_len - 1 : 0]; }
hb_glyph_info_t prev () const { return out_info[out_len ? out_len - 1 : 0]; }
- HB_NODISCARD bool has_separate_output () const { return info != out_info; }
-
-
HB_INTERNAL void reset ();
HB_INTERNAL void clear ();
- unsigned int backtrack_len () const { return have_output? out_len : idx; }
+ unsigned int backtrack_len () const { return have_output ? out_len : idx; }
unsigned int lookahead_len () const { return len - idx; }
unsigned int next_serial () { return serial++; }
@@ -206,7 +206,6 @@ struct hb_buffer_t
HB_INTERNAL void guess_segment_properties ();
HB_INTERNAL void swap_buffers ();
- HB_INTERNAL void remove_output ();
HB_INTERNAL void clear_output ();
HB_INTERNAL void clear_positions ();
@@ -400,10 +399,16 @@ struct hb_buffer_t
#else
if (!messaging ())
return true;
+
+ message_depth++;
+
va_list ap;
va_start (ap, fmt);
bool ret = message_impl (font, fmt, ap);
va_end (ap);
+
+ message_depth--;
+
return ret;
#endif
}
diff --git a/thirdparty/harfbuzz/src/hb-cache.hh b/thirdparty/harfbuzz/src/hb-cache.hh
index bf26d96be4..e617b75de9 100644
--- a/thirdparty/harfbuzz/src/hb-cache.hh
+++ b/thirdparty/harfbuzz/src/hb-cache.hh
@@ -30,7 +30,7 @@
#include "hb.hh"
-/* Implements a lock-free cache for int->int functions. */
+/* Implements a lockfree cache for int->int functions. */
template <unsigned int key_bits, unsigned int value_bits, unsigned int cache_bits>
struct hb_cache_t
diff --git a/thirdparty/harfbuzz/src/hb-cff-interp-common.hh b/thirdparty/harfbuzz/src/hb-cff-interp-common.hh
index 91a9b7d0d1..c251e2d0ed 100644
--- a/thirdparty/harfbuzz/src/hb-cff-interp-common.hh
+++ b/thirdparty/harfbuzz/src/hb-cff-interp-common.hh
@@ -263,7 +263,7 @@ struct UnsizedByteStr : UnsizedArrayOf <HBUINT8>
T *ip = c->allocate_size<T> (T::static_size);
if (unlikely (!ip)) return_trace (false);
- return_trace (c->check_assign (*ip, value));
+ return_trace (c->check_assign (*ip, value, HB_SERIALIZE_ERROR_INT_OVERFLOW));
}
template <typename V>
diff --git a/thirdparty/harfbuzz/src/hb-cff2-interp-cs.hh b/thirdparty/harfbuzz/src/hb-cff2-interp-cs.hh
index 332ece31cd..d961566447 100644
--- a/thirdparty/harfbuzz/src/hb-cff2-interp-cs.hh
+++ b/thirdparty/harfbuzz/src/hb-cff2-interp-cs.hh
@@ -136,8 +136,8 @@ struct cff2_cs_interp_env_t : cs_interp_env_t<blend_arg_t, CFF2Subrs>
if (unlikely (!scalars.resize (region_count)))
set_error ();
else
- varStore->varStore.get_scalars (get_ivs (), coords, num_coords,
- &scalars[0], region_count);
+ varStore->varStore.get_region_scalars (get_ivs (), coords, num_coords,
+ &scalars[0], region_count);
}
seen_blend = true;
}
diff --git a/thirdparty/harfbuzz/src/hb-common.cc b/thirdparty/harfbuzz/src/hb-common.cc
index 7bb878b217..26c8ad0f49 100644
--- a/thirdparty/harfbuzz/src/hb-common.cc
+++ b/thirdparty/harfbuzz/src/hb-common.cc
@@ -257,13 +257,11 @@ struct hb_language_item_t {
bool operator == (const char *s) const
{ return lang_equal (lang, s); }
- hb_language_item_t & operator = (const char *s) {
- /* If a custom allocated is used calling strdup() pairs
- badly with a call to the custom free() in fini() below.
- Therefore don't call strdup(), implement its behavior.
- */
+ hb_language_item_t & operator = (const char *s)
+ {
+ /* We can't call strdup(), because we allow custom allocators. */
size_t len = strlen(s) + 1;
- lang = (hb_language_t) malloc(len);
+ lang = (hb_language_t) hb_malloc(len);
if (likely (lang))
{
memcpy((unsigned char *) lang, s, len);
@@ -274,16 +272,15 @@ struct hb_language_item_t {
return *this;
}
- void fini () { free ((void *) lang); }
+ void fini () { hb_free ((void *) lang); }
};
-/* Thread-safe lock-free language list */
+/* Thread-safe lockfree language list */
static hb_atomic_ptr_t <hb_language_item_t> langs;
-#if HB_USE_ATEXIT
-static void
+static inline void
free_langs ()
{
retry:
@@ -294,11 +291,10 @@ retry:
while (first_lang) {
hb_language_item_t *next = first_lang->next;
first_lang->fini ();
- free (first_lang);
+ hb_free (first_lang);
first_lang = next;
}
}
-#endif
static hb_language_item_t *
lang_find_or_insert (const char *key)
@@ -311,28 +307,26 @@ retry:
return lang;
/* Not found; allocate one. */
- hb_language_item_t *lang = (hb_language_item_t *) calloc (1, sizeof (hb_language_item_t));
+ hb_language_item_t *lang = (hb_language_item_t *) hb_calloc (1, sizeof (hb_language_item_t));
if (unlikely (!lang))
return nullptr;
lang->next = first_lang;
*lang = key;
if (unlikely (!lang->lang))
{
- free (lang);
+ hb_free (lang);
return nullptr;
}
if (unlikely (!langs.cmpexch (first_lang, lang)))
{
lang->fini ();
- free (lang);
+ hb_free (lang);
goto retry;
}
-#if HB_USE_ATEXIT
if (!first_lang)
- atexit (free_langs); /* First person registers atexit() callback. */
-#endif
+ hb_atexit (free_langs); /* First person registers atexit() callback. */
return lang;
}
@@ -601,6 +595,9 @@ hb_script_get_horizontal_direction (hb_script_t script)
case HB_SCRIPT_CHORASMIAN:
case HB_SCRIPT_YEZIDI:
+ /* Unicode-14.0 additions */
+ case HB_SCRIPT_OLD_UYGHUR:
+
return HB_DIRECTION_RTL;
diff --git a/thirdparty/harfbuzz/src/hb-common.h b/thirdparty/harfbuzz/src/hb-common.h
index 532fd428cb..0384117a4d 100644
--- a/thirdparty/harfbuzz/src/hb-common.h
+++ b/thirdparty/harfbuzz/src/hb-common.h
@@ -476,6 +476,11 @@ hb_language_get_default (void);
* @HB_SCRIPT_DIVES_AKURU: `Diak`, Since: 2.6.7
* @HB_SCRIPT_KHITAN_SMALL_SCRIPT: `Kits`, Since: 2.6.7
* @HB_SCRIPT_YEZIDI: `Yezi`, Since: 2.6.7
+ * @HB_SCRIPT_CYPRO_MINOAN: `Cpmn`, Since: 3.0.0
+ * @HB_SCRIPT_OLD_UYGHUR: `Ougr`, Since: 3.0.0
+ * @HB_SCRIPT_TANGSA: `Tnsa`, Since: 3.0.0
+ * @HB_SCRIPT_TOTO: `Toto`, Since: 3.0.0
+ * @HB_SCRIPT_VITHKUQI: `Vith`, Since: 3.0.0
* @HB_SCRIPT_INVALID: No script set
*
* Data type for scripts. Each #hb_script_t's value is an #hb_tag_t corresponding
@@ -683,6 +688,15 @@ typedef enum
HB_SCRIPT_KHITAN_SMALL_SCRIPT = HB_TAG ('K','i','t','s'), /*13.0*/
HB_SCRIPT_YEZIDI = HB_TAG ('Y','e','z','i'), /*13.0*/
+ /*
+ * Since 3.0.0
+ */
+ HB_SCRIPT_CYPRO_MINOAN = HB_TAG ('C','p','m','n'), /*14.0*/
+ HB_SCRIPT_OLD_UYGHUR = HB_TAG ('O','u','g','r'), /*14.0*/
+ HB_SCRIPT_TANGSA = HB_TAG ('T','n','s','a'), /*14.0*/
+ HB_SCRIPT_TOTO = HB_TAG ('T','o','t','o'), /*14.0*/
+ HB_SCRIPT_VITHKUQI = HB_TAG ('V','i','t','h'), /*14.0*/
+
/* No script set. */
HB_SCRIPT_INVALID = HB_TAG_NONE,
diff --git a/thirdparty/harfbuzz/src/hb-config.hh b/thirdparty/harfbuzz/src/hb-config.hh
index fc8d424bfb..ad800f0f74 100644
--- a/thirdparty/harfbuzz/src/hb-config.hh
+++ b/thirdparty/harfbuzz/src/hb-config.hh
@@ -86,6 +86,9 @@
#define HB_NO_LEGACY
#endif
+#ifdef HAVE_CONFIG_OVERRIDE_H
+#include "config-override.h"
+#endif
/* Closure of options. */
@@ -117,7 +120,7 @@
#define HB_NO_CMAP_LEGACY_SUBTABLES
#define HB_NO_FALLBACK_SHAPE
#define HB_NO_OT_KERN
-#define HB_NO_OT_LAYOUT_BLACKLIST
+#define HB_NO_OT_LAYOUT_BLOCKLIST
#define HB_NO_OT_SHAPE_FALLBACK
#endif
@@ -155,9 +158,5 @@
#endif
#endif
-#ifdef HAVE_CONFIG_OVERRIDE_H
-#include "config-override.h"
-#endif
-
#endif /* HB_CONFIG_HH */
diff --git a/thirdparty/harfbuzz/src/hb-coretext.cc b/thirdparty/harfbuzz/src/hb-coretext.cc
index 461bd20e65..4b6c67c1ee 100644
--- a/thirdparty/harfbuzz/src/hb-coretext.cc
+++ b/thirdparty/harfbuzz/src/hb-coretext.cc
@@ -332,6 +332,44 @@ _hb_coretext_shaper_font_data_create (hb_font_t *font)
return nullptr;
}
+ if (font->coords)
+ {
+ CFMutableDictionaryRef variations =
+ CFDictionaryCreateMutable (kCFAllocatorDefault,
+ font->num_coords,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+
+ for (unsigned i = 0; i < font->num_coords; i++)
+ {
+ if (font->coords[i] == 0.) continue;
+
+ hb_ot_var_axis_info_t info;
+ unsigned int c = 1;
+ hb_ot_var_get_axis_infos (font->face, i, &c, &info);
+ CFDictionarySetValue (variations,
+ CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &info.tag),
+ CFNumberCreate (kCFAllocatorDefault, kCFNumberFloatType, &font->design_coords[i])
+ );
+ }
+
+ CFDictionaryRef attributes =
+ CFDictionaryCreate (kCFAllocatorDefault,
+ (const void **) &kCTFontVariationAttribute,
+ (const void **) &variations,
+ 1,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+
+ CTFontDescriptorRef varDesc = CTFontDescriptorCreateWithAttributes (attributes);
+ CTFontRef new_ct_font = CTFontCreateCopyWithAttributes (ct_font, 0, nullptr, varDesc);
+
+ CFRelease (ct_font);
+ CFRelease (attributes);
+ CFRelease (variations);
+ ct_font = new_ct_font;
+ }
+
return (hb_coretext_font_data_t *) ct_font;
}
@@ -1061,7 +1099,7 @@ resize_and_retry:
hb_glyph_info_t *info = run_info;
if (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction))
{
- hb_position_t x_offset = (positions[0].x - advances_so_far) * x_mult;
+ hb_position_t x_offset = round ((positions[0].x - advances_so_far) * x_mult);
for (unsigned int j = 0; j < num_glyphs; j++)
{
CGFloat advance;
@@ -1069,15 +1107,15 @@ resize_and_retry:
advance = positions[j + 1].x - positions[j].x;
else /* last glyph */
advance = run_advance - (positions[j].x - positions[0].x);
- info->mask = advance * x_mult;
+ info->mask = round (advance * x_mult);
info->var1.i32 = x_offset;
- info->var2.i32 = positions[j].y * y_mult;
+ info->var2.i32 = round (positions[j].y * y_mult);
info++;
}
}
else
{
- hb_position_t y_offset = (positions[0].y - advances_so_far) * y_mult;
+ hb_position_t y_offset = round ((positions[0].y - advances_so_far) * y_mult);
for (unsigned int j = 0; j < num_glyphs; j++)
{
CGFloat advance;
@@ -1085,8 +1123,8 @@ resize_and_retry:
advance = positions[j + 1].y - positions[j].y;
else /* last glyph */
advance = run_advance - (positions[j].y - positions[0].y);
- info->mask = advance * y_mult;
- info->var1.i32 = positions[j].x * x_mult;
+ info->mask = round (advance * y_mult);
+ info->var1.i32 = round (positions[j].x * x_mult);
info->var2.i32 = y_offset;
info++;
}
diff --git a/thirdparty/harfbuzz/src/hb-debug.hh b/thirdparty/harfbuzz/src/hb-debug.hh
index ec3a1ff211..f80c8980ba 100644
--- a/thirdparty/harfbuzz/src/hb-debug.hh
+++ b/thirdparty/harfbuzz/src/hb-debug.hh
@@ -307,7 +307,7 @@ struct hb_auto_trace_t
_hb_debug_msg<max_level> (what, obj, func, true, plevel ? *plevel : 1, -1,
"return %s (line %d)",
- hb_printer_t<decltype (v)>().print (v), line);
+ hb_printer_t<hb_decay<decltype (v)>>().print (v), line);
if (plevel) --*plevel;
plevel = nullptr;
returned = true;
@@ -438,6 +438,10 @@ struct hb_no_trace_t {
#define TRACE_SUBSET(this) hb_no_trace_t<bool> trace
#endif
+#ifndef HB_DEBUG_SUBSET_REPACK
+#define HB_DEBUG_SUBSET_REPACK (HB_DEBUG+0)
+#endif
+
#ifndef HB_DEBUG_DISPATCH
#define HB_DEBUG_DISPATCH ( \
HB_DEBUG_APPLY + \
diff --git a/thirdparty/harfbuzz/src/hb-deprecated.h b/thirdparty/harfbuzz/src/hb-deprecated.h
index 5f19125789..a130d77f77 100644
--- a/thirdparty/harfbuzz/src/hb-deprecated.h
+++ b/thirdparty/harfbuzz/src/hb-deprecated.h
@@ -107,9 +107,6 @@ hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,
hb_font_get_glyph_func_t func,
void *user_data, hb_destroy_func_t destroy);
-HB_EXTERN HB_DEPRECATED void
-hb_set_invert (hb_set_t *set);
-
/**
* hb_unicode_eastasian_width_func_t:
* @ufuncs: A Unicode-functions structure
diff --git a/thirdparty/harfbuzz/src/hb-directwrite.cc b/thirdparty/harfbuzz/src/hb-directwrite.cc
index a07302159c..8f6d73b639 100644
--- a/thirdparty/harfbuzz/src/hb-directwrite.cc
+++ b/thirdparty/harfbuzz/src/hb-directwrite.cc
@@ -32,6 +32,7 @@
#include "hb-directwrite.h"
+#include "hb-ms-feature-ranges.hh"
/**
* SECTION:hb-directwrite
@@ -42,24 +43,6 @@
* Functions for using HarfBuzz with DirectWrite fonts.
**/
-/* Declare object creator for dynamic support of DWRITE */
-typedef HRESULT (* WINAPI t_DWriteCreateFactory)(
- DWRITE_FACTORY_TYPE factoryType,
- REFIID iid,
- IUnknown **factory
-);
-
-/*
- * hb-directwrite uses new/delete syntatically but as we let users
- * to override malloc/free, we will redefine new/delete so users
- * won't need to do that by their own.
- */
-void* operator new (size_t size) { return malloc (size); }
-void* operator new [] (size_t size) { return malloc (size); }
-void operator delete (void* pointer) { free (pointer); }
-void operator delete [] (void* pointer) { free (pointer); }
-
-
/*
* DirectWrite font stream helpers
*/
@@ -154,7 +137,6 @@ public:
struct hb_directwrite_face_data_t
{
- HMODULE dwrite_dll;
IDWriteFactory *dwriteFactory;
IDWriteFontFile *fontFile;
DWriteFontFileStream *fontFileStream;
@@ -176,33 +158,12 @@ _hb_directwrite_shaper_face_data_create (hb_face_t *face)
return nullptr; \
} HB_STMT_END
- data->dwrite_dll = LoadLibrary (TEXT ("DWRITE"));
- if (unlikely (!data->dwrite_dll))
- FAIL ("Cannot find DWrite.DLL");
-
- t_DWriteCreateFactory p_DWriteCreateFactory;
-
-#if defined(__GNUC__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wcast-function-type"
-#endif
-
- p_DWriteCreateFactory = (t_DWriteCreateFactory)
- GetProcAddress (data->dwrite_dll, "DWriteCreateFactory");
-
-#if defined(__GNUC__)
-#pragma GCC diagnostic pop
-#endif
-
- if (unlikely (!p_DWriteCreateFactory))
- FAIL ("Cannot find DWriteCreateFactory().");
-
HRESULT hr;
// TODO: factory and fontFileLoader should be cached separately
IDWriteFactory* dwriteFactory;
- hr = p_DWriteCreateFactory (DWRITE_FACTORY_TYPE_SHARED, __uuidof (IDWriteFactory),
- (IUnknown**) &dwriteFactory);
+ hr = DWriteCreateFactory (DWRITE_FACTORY_TYPE_SHARED, __uuidof (IDWriteFactory),
+ (IUnknown**) &dwriteFactory);
if (unlikely (hr != S_OK))
FAIL ("Failed to run DWriteCreateFactory().");
@@ -266,8 +227,6 @@ _hb_directwrite_shaper_face_data_destroy (hb_directwrite_face_data_t *data)
delete data->fontFileStream;
if (data->faceBlob)
hb_blob_destroy (data->faceBlob);
- if (data->dwrite_dll)
- FreeLibrary (data->dwrite_dll);
if (data)
delete data;
}
@@ -552,13 +511,12 @@ protected:
* shaper
*/
-static hb_bool_t
-_hb_directwrite_shape_full (hb_shape_plan_t *shape_plan,
- hb_font_t *font,
- hb_buffer_t *buffer,
- const hb_feature_t *features,
- unsigned int num_features,
- float lineWidth)
+hb_bool_t
+_hb_directwrite_shape (hb_shape_plan_t *shape_plan,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features)
{
hb_face_t *face = font->face;
const hb_directwrite_face_data_t *face_data = face->data.directwrite;
@@ -611,8 +569,6 @@ _hb_directwrite_shape_full (hb_shape_plan_t *shape_plan,
log_clusters[chars_len++] = cluster; /* Surrogates. */
}
- // TODO: Handle TEST_DISABLE_OPTIONAL_LIGATURES
-
DWRITE_READING_DIRECTION readingDirection;
readingDirection = buffer->props.direction ?
DWRITE_READING_DIRECTION_RIGHT_TO_LEFT :
@@ -623,7 +579,7 @@ _hb_directwrite_shape_full (hb_shape_plan_t *shape_plan,
* but we never attempt to shape a word longer than 64K characters
* in a single gfxShapedWord, so we cannot exceed that limit.
*/
- uint32_t textLength = buffer->len;
+ uint32_t textLength = chars_len;
TextAnalysis analysis (textString, textLength, nullptr, readingDirection);
TextAnalysis::Run *runHead;
@@ -648,38 +604,54 @@ _hb_directwrite_shape_full (hb_shape_plan_t *shape_plan,
mbstowcs ((wchar_t*) localeName,
hb_language_to_string (buffer->props.language), 20);
- // TODO: it does work but doesn't care about ranges
- DWRITE_TYPOGRAPHIC_FEATURES typographic_features;
- typographic_features.featureCount = num_features;
+ /*
+ * Set up features.
+ */
+ static_assert ((sizeof (DWRITE_TYPOGRAPHIC_FEATURES) == sizeof (hb_ms_features_t)), "");
+ static_assert ((sizeof (DWRITE_FONT_FEATURE) == sizeof (hb_ms_feature_t)), "");
+ hb_vector_t<hb_ms_features_t *> range_features;
+ hb_vector_t<uint32_t> range_char_counts;
if (num_features)
{
- typographic_features.features = new DWRITE_FONT_FEATURE[num_features];
- for (unsigned int i = 0; i < num_features; ++i)
- {
- typographic_features.features[i].nameTag = (DWRITE_FONT_FEATURE_TAG)
- hb_uint32_swap (features[i].tag);
- typographic_features.features[i].parameter = features[i].value;
- }
+ hb_vector_t<hb_ms_feature_t> feature_records;
+ hb_vector_t<hb_ms_range_record_t> range_records;
+ if (hb_ms_setup_features (features, num_features, feature_records, range_records))
+ hb_ms_make_feature_ranges (feature_records,
+ range_records,
+ 0,
+ chars_len,
+ log_clusters,
+ range_features,
+ range_char_counts);
}
- const DWRITE_TYPOGRAPHIC_FEATURES* dwFeatures;
- dwFeatures = (const DWRITE_TYPOGRAPHIC_FEATURES*) &typographic_features;
- const uint32_t featureRangeLengths[] = { textLength };
- //
uint16_t* clusterMap;
clusterMap = new uint16_t[textLength];
DWRITE_SHAPING_TEXT_PROPERTIES* textProperties;
textProperties = new DWRITE_SHAPING_TEXT_PROPERTIES[textLength];
+
retry_getglyphs:
uint16_t* glyphIndices = new uint16_t[maxGlyphCount];
DWRITE_SHAPING_GLYPH_PROPERTIES* glyphProperties;
glyphProperties = new DWRITE_SHAPING_GLYPH_PROPERTIES[maxGlyphCount];
- hr = analyzer->GetGlyphs (textString, textLength, fontFace, false,
- isRightToLeft, &runHead->mScript, localeName,
- nullptr, &dwFeatures, featureRangeLengths, 1,
- maxGlyphCount, clusterMap, textProperties,
- glyphIndices, glyphProperties, &glyphCount);
+ hr = analyzer->GetGlyphs (textString,
+ chars_len,
+ fontFace,
+ false,
+ isRightToLeft,
+ &runHead->mScript,
+ localeName,
+ nullptr,
+ (const DWRITE_TYPOGRAPHIC_FEATURES**) range_features.arrayZ,
+ range_char_counts.arrayZ,
+ range_features.length,
+ maxGlyphCount,
+ clusterMap,
+ textProperties,
+ glyphIndices,
+ glyphProperties,
+ &glyphCount);
if (unlikely (hr == HRESULT_FROM_WIN32 (ERROR_INSUFFICIENT_BUFFER)))
{
@@ -715,101 +687,28 @@ retry_getglyphs:
double x_mult = (double) font->x_scale / fontEmSize;
double y_mult = (double) font->y_scale / fontEmSize;
- hr = analyzer->GetGlyphPlacements (textString, clusterMap, textProperties,
- textLength, glyphIndices, glyphProperties,
- glyphCount, fontFace, fontEmSize,
- false, isRightToLeft, &runHead->mScript, localeName,
- &dwFeatures, featureRangeLengths, 1,
- glyphAdvances, glyphOffsets);
+ hr = analyzer->GetGlyphPlacements (textString,
+ clusterMap,
+ textProperties,
+ chars_len,
+ glyphIndices,
+ glyphProperties,
+ glyphCount,
+ fontFace,
+ fontEmSize,
+ false,
+ isRightToLeft,
+ &runHead->mScript,
+ localeName,
+ (const DWRITE_TYPOGRAPHIC_FEATURES**) range_features.arrayZ,
+ range_char_counts.arrayZ,
+ range_features.length,
+ glyphAdvances,
+ glyphOffsets);
if (FAILED (hr))
FAIL ("Analyzer failed to get glyph placements.");
- IDWriteTextAnalyzer1* analyzer1;
- analyzer->QueryInterface (&analyzer1);
-
- if (analyzer1 && lineWidth)
- {
- DWRITE_JUSTIFICATION_OPPORTUNITY* justificationOpportunities =
- new DWRITE_JUSTIFICATION_OPPORTUNITY[maxGlyphCount];
- hr = analyzer1->GetJustificationOpportunities (fontFace, fontEmSize, runHead->mScript,
- textLength, glyphCount, textString,
- clusterMap, glyphProperties,
- justificationOpportunities);
-
- if (FAILED (hr))
- FAIL ("Analyzer failed to get justification opportunities.");
-
- float* justifiedGlyphAdvances = new float[maxGlyphCount];
- DWRITE_GLYPH_OFFSET* justifiedGlyphOffsets = new DWRITE_GLYPH_OFFSET[glyphCount];
- hr = analyzer1->JustifyGlyphAdvances (lineWidth, glyphCount, justificationOpportunities,
- glyphAdvances, glyphOffsets, justifiedGlyphAdvances,
- justifiedGlyphOffsets);
-
- if (FAILED (hr)) FAIL ("Analyzer failed to get justify glyph advances.");
-
- DWRITE_SCRIPT_PROPERTIES scriptProperties;
- hr = analyzer1->GetScriptProperties (runHead->mScript, &scriptProperties);
- if (FAILED (hr)) FAIL ("Analyzer failed to get script properties.");
- uint32_t justificationCharacter = scriptProperties.justificationCharacter;
-
- // if a script justificationCharacter is not space, it can have GetJustifiedGlyphs
- if (justificationCharacter != 32)
- {
- uint16_t* modifiedClusterMap = new uint16_t[textLength];
- retry_getjustifiedglyphs:
- uint16_t* modifiedGlyphIndices = new uint16_t[maxGlyphCount];
- float* modifiedGlyphAdvances = new float[maxGlyphCount];
- DWRITE_GLYPH_OFFSET* modifiedGlyphOffsets = new DWRITE_GLYPH_OFFSET[maxGlyphCount];
- uint32_t actualGlyphsCount;
- hr = analyzer1->GetJustifiedGlyphs (fontFace, fontEmSize, runHead->mScript,
- textLength, glyphCount, maxGlyphCount,
- clusterMap, glyphIndices, glyphAdvances,
- justifiedGlyphAdvances, justifiedGlyphOffsets,
- glyphProperties, &actualGlyphsCount,
- modifiedClusterMap, modifiedGlyphIndices,
- modifiedGlyphAdvances, modifiedGlyphOffsets);
-
- if (hr == HRESULT_FROM_WIN32 (ERROR_INSUFFICIENT_BUFFER))
- {
- maxGlyphCount = actualGlyphsCount;
- delete [] modifiedGlyphIndices;
- delete [] modifiedGlyphAdvances;
- delete [] modifiedGlyphOffsets;
-
- maxGlyphCount = actualGlyphsCount;
-
- goto retry_getjustifiedglyphs;
- }
- if (FAILED (hr))
- FAIL ("Analyzer failed to get justified glyphs.");
-
- delete [] clusterMap;
- delete [] glyphIndices;
- delete [] glyphAdvances;
- delete [] glyphOffsets;
-
- glyphCount = actualGlyphsCount;
- clusterMap = modifiedClusterMap;
- glyphIndices = modifiedGlyphIndices;
- glyphAdvances = modifiedGlyphAdvances;
- glyphOffsets = modifiedGlyphOffsets;
-
- delete [] justifiedGlyphAdvances;
- delete [] justifiedGlyphOffsets;
- }
- else
- {
- delete [] glyphAdvances;
- delete [] glyphOffsets;
-
- glyphAdvances = justifiedGlyphAdvances;
- glyphOffsets = justifiedGlyphOffsets;
- }
-
- delete [] justificationOpportunities;
- }
-
/* Ok, we've got everything we need, now compose output buffer,
* very, *very*, carefully! */
@@ -870,43 +769,10 @@ retry_getglyphs:
delete [] glyphAdvances;
delete [] glyphOffsets;
- if (num_features)
- delete [] typographic_features.features;
-
/* Wow, done! */
return true;
}
-hb_bool_t
-_hb_directwrite_shape (hb_shape_plan_t *shape_plan,
- hb_font_t *font,
- hb_buffer_t *buffer,
- const hb_feature_t *features,
- unsigned int num_features)
-{
- return _hb_directwrite_shape_full (shape_plan, font, buffer,
- features, num_features, 0);
-}
-
-HB_UNUSED static bool
-_hb_directwrite_shape_experimental_width (hb_font_t *font,
- hb_buffer_t *buffer,
- const hb_feature_t *features,
- unsigned int num_features,
- float width)
-{
- static const char *shapers = "directwrite";
- hb_shape_plan_t *shape_plan;
- shape_plan = hb_shape_plan_create_cached (font->face, &buffer->props,
- features, num_features, &shapers);
- hb_bool_t res = _hb_directwrite_shape_full (shape_plan, font, buffer,
- features, num_features, width);
-
- buffer->unsafe_to_break_all ();
-
- return res;
-}
-
struct _hb_directwrite_font_table_context {
IDWriteFontFace *face;
void *table_context;
@@ -917,7 +783,7 @@ _hb_directwrite_table_data_release (void *data)
{
_hb_directwrite_font_table_context *context = (_hb_directwrite_font_table_context *) data;
context->face->ReleaseFontTable (context->table_context);
- delete context;
+ hb_free (context);
}
static hb_blob_t *
@@ -938,7 +804,7 @@ _hb_directwrite_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *
return nullptr;
}
- _hb_directwrite_font_table_context *context = new _hb_directwrite_font_table_context;
+ _hb_directwrite_font_table_context *context = (_hb_directwrite_font_table_context *) hb_malloc (sizeof (_hb_directwrite_font_table_context));
context->face = dw_face;
context->table_context = table_context;
diff --git a/thirdparty/harfbuzz/src/hb-draw.cc b/thirdparty/harfbuzz/src/hb-draw.cc
index 1a5f9c8c6b..c0af6ce013 100644
--- a/thirdparty/harfbuzz/src/hb-draw.cc
+++ b/thirdparty/harfbuzz/src/hb-draw.cc
@@ -191,7 +191,7 @@ hb_draw_funcs_destroy (hb_draw_funcs_t *funcs)
{
if (!hb_object_destroy (funcs)) return;
- free (funcs);
+ hb_free (funcs);
}
/**
diff --git a/thirdparty/harfbuzz/src/hb-face.cc b/thirdparty/harfbuzz/src/hb-face.cc
index 61bd4af7b1..2c0087370c 100644
--- a/thirdparty/harfbuzz/src/hb-face.cc
+++ b/thirdparty/harfbuzz/src/hb-face.cc
@@ -33,6 +33,7 @@
#include "hb-open-file.hh"
#include "hb-ot-face.hh"
#include "hb-ot-cmap-table.hh"
+#include "hb-map.hh"
/**
@@ -106,9 +107,9 @@ DEFINE_NULL_INSTANCE (hb_face_t) =
* convenient to provide data for individual tables instead of the whole font
* data. With the caveat that hb_face_get_table_tags() does not currently work
* with faces created this way.
- *
+ *
* Creates a new face object from the specified @user_data and @reference_table_func,
- * with the @destroy callback.
+ * with the @destroy callback.
*
* Return value: (transfer full): The new face object
*
@@ -150,7 +151,7 @@ _hb_face_for_data_closure_create (hb_blob_t *blob, unsigned int index)
{
hb_face_for_data_closure_t *closure;
- closure = (hb_face_for_data_closure_t *) calloc (1, sizeof (hb_face_for_data_closure_t));
+ closure = (hb_face_for_data_closure_t *) hb_calloc (1, sizeof (hb_face_for_data_closure_t));
if (unlikely (!closure))
return nullptr;
@@ -166,7 +167,7 @@ _hb_face_for_data_closure_destroy (void *data)
hb_face_for_data_closure_t *closure = (hb_face_for_data_closure_t *) data;
hb_blob_destroy (closure->blob);
- free (closure);
+ hb_free (closure);
}
static hb_blob_t *
@@ -265,7 +266,7 @@ hb_face_reference (hb_face_t *face)
/**
* hb_face_destroy: (skip)
* @face: A face object
- *
+ *
* Decreases the reference count on a face object. When the
* reference count reaches zero, the face is destroyed,
* freeing all memory.
@@ -281,7 +282,7 @@ hb_face_destroy (hb_face_t *face)
{
hb_face_t::plan_node_t *next = node->next;
hb_shape_plan_destroy (node->shape_plan);
- free (node);
+ hb_free (node);
node = next;
}
@@ -291,7 +292,7 @@ hb_face_destroy (hb_face_t *face)
if (face->destroy)
face->destroy (face->user_data);
- free (face);
+ hb_free (face);
}
/**
@@ -302,7 +303,7 @@ hb_face_destroy (hb_face_t *face)
* @destroy: (nullable): A callback to call when @data is not needed anymore
* @replace: Whether to replace an existing data with the same key
*
- * Attaches a user-data key/data pair to the given face object.
+ * Attaches a user-data key/data pair to the given face object.
*
* Return value: %true if success, %false otherwise
*
@@ -441,7 +442,7 @@ hb_face_set_index (hb_face_t *face,
*
* <note>Note: face indices within a collection are zero-based.</note>
*
- * Return value: The index of @face.
+ * Return value: The index of @face.
*
* Since: 0.9.2
**/
@@ -623,26 +624,26 @@ hb_face_collect_variation_unicodes (hb_face_t *face,
struct hb_face_builder_data_t
{
- struct table_entry_t
- {
- int cmp (hb_tag_t t) const
- {
- if (t < tag) return -1;
- if (t > tag) return -1;
- return 0;
- }
-
- hb_tag_t tag;
- hb_blob_t *blob;
- };
-
- hb_vector_t<table_entry_t> tables;
+ hb_hashmap_t<hb_tag_t, hb_blob_t *> tables;
};
+static int compare_entries (const void* pa, const void* pb)
+{
+ const auto& a = * (const hb_pair_t<hb_tag_t, hb_blob_t*> *) pa;
+ const auto& b = * (const hb_pair_t<hb_tag_t, hb_blob_t*> *) pb;
+
+ /* Order by blob size first (smallest to largest) and then table tag */
+
+ if (a.second->length != b.second->length)
+ return a.second->length < b.second->length ? -1 : +1;
+
+ return a.first < b.first ? -1 : a.first == b.first ? 0 : +1;
+}
+
static hb_face_builder_data_t *
_hb_face_builder_data_create ()
{
- hb_face_builder_data_t *data = (hb_face_builder_data_t *) calloc (1, sizeof (hb_face_builder_data_t));
+ hb_face_builder_data_t *data = (hb_face_builder_data_t *) hb_calloc (1, sizeof (hb_face_builder_data_t));
if (unlikely (!data))
return nullptr;
@@ -656,25 +657,25 @@ _hb_face_builder_data_destroy (void *user_data)
{
hb_face_builder_data_t *data = (hb_face_builder_data_t *) user_data;
- for (unsigned int i = 0; i < data->tables.length; i++)
- hb_blob_destroy (data->tables[i].blob);
+ for (hb_blob_t* b : data->tables.values())
+ hb_blob_destroy (b);
data->tables.fini ();
- free (data);
+ hb_free (data);
}
static hb_blob_t *
_hb_face_builder_data_reference_blob (hb_face_builder_data_t *data)
{
- unsigned int table_count = data->tables.length;
+ unsigned int table_count = data->tables.get_population ();
unsigned int face_length = table_count * 16 + 12;
- for (unsigned int i = 0; i < table_count; i++)
- face_length += hb_ceil_to_4 (hb_blob_get_length (data->tables[i].blob));
+ for (hb_blob_t* b : data->tables.values())
+ face_length += hb_ceil_to_4 (hb_blob_get_length (b));
- char *buf = (char *) malloc (face_length);
+ char *buf = (char *) hb_malloc (face_length);
if (unlikely (!buf))
return nullptr;
@@ -682,20 +683,31 @@ _hb_face_builder_data_reference_blob (hb_face_builder_data_t *data)
c.propagate_error (data->tables);
OT::OpenTypeFontFile *f = c.start_serialize<OT::OpenTypeFontFile> ();
- bool is_cff = data->tables.lsearch (HB_TAG ('C','F','F',' ')) || data->tables.lsearch (HB_TAG ('C','F','F','2'));
+ bool is_cff = (data->tables.has (HB_TAG ('C','F','F',' '))
+ || data->tables.has (HB_TAG ('C','F','F','2')));
hb_tag_t sfnt_tag = is_cff ? OT::OpenTypeFontFile::CFFTag : OT::OpenTypeFontFile::TrueTypeTag;
- bool ret = f->serialize_single (&c, sfnt_tag, data->tables.as_array ());
+ // Sort the tags so that produced face is deterministic.
+ hb_vector_t<hb_pair_t <hb_tag_t, hb_blob_t*>> sorted_entries;
+ data->tables.iter () | hb_sink (sorted_entries);
+ if (unlikely (sorted_entries.in_error ()))
+ {
+ hb_free (buf);
+ return nullptr;
+ }
+
+ sorted_entries.qsort (compare_entries);
+ bool ret = f->serialize_single (&c, sfnt_tag, + sorted_entries.iter());
c.end_serialize ();
if (unlikely (!ret))
{
- free (buf);
+ hb_free (buf);
return nullptr;
}
- return hb_blob_create (buf, face_length, HB_MEMORY_MODE_WRITABLE, buf, free);
+ return hb_blob_create (buf, face_length, HB_MEMORY_MODE_WRITABLE, buf, hb_free);
}
static hb_blob_t *
@@ -706,11 +718,7 @@ _hb_face_builder_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void
if (!tag)
return _hb_face_builder_data_reference_blob (data);
- hb_face_builder_data_t::table_entry_t *entry = data->tables.lsearch (tag);
- if (entry)
- return hb_blob_reference (entry->blob);
-
- return nullptr;
+ return hb_blob_reference (data->tables[tag]);
}
@@ -750,17 +758,21 @@ hb_face_builder_create ()
hb_bool_t
hb_face_builder_add_table (hb_face_t *face, hb_tag_t tag, hb_blob_t *blob)
{
+ if (tag == HB_MAP_VALUE_INVALID)
+ return false;
+
if (unlikely (face->destroy != (hb_destroy_func_t) _hb_face_builder_data_destroy))
return false;
hb_face_builder_data_t *data = (hb_face_builder_data_t *) face->user_data;
- hb_face_builder_data_t::table_entry_t *entry = data->tables.push ();
- if (unlikely (data->tables.in_error()))
+ hb_blob_t* previous = data->tables.get (tag);
+ if (!data->tables.set (tag, hb_blob_reference (blob)))
+ {
+ hb_blob_destroy (blob);
return false;
+ }
- entry->tag = tag;
- entry->blob = hb_blob_reference (blob);
-
+ hb_blob_destroy (previous);
return true;
}
diff --git a/thirdparty/harfbuzz/src/hb-font.cc b/thirdparty/harfbuzz/src/hb-font.cc
index 37a0e7fe85..fa8da96395 100644
--- a/thirdparty/harfbuzz/src/hb-font.cc
+++ b/thirdparty/harfbuzz/src/hb-font.cc
@@ -620,7 +620,7 @@ hb_font_funcs_destroy (hb_font_funcs_t *ffuncs)
HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
#undef HB_FONT_FUNC_IMPLEMENT
- free (ffuncs);
+ hb_free (ffuncs);
}
/**
@@ -1544,8 +1544,8 @@ _hb_font_adopt_var_coords (hb_font_t *font,
float *design_coords,
unsigned int coords_length)
{
- free (font->coords);
- free (font->design_coords);
+ hb_free (font->coords);
+ hb_free (font->design_coords);
font->coords = coords;
font->design_coords = design_coords;
@@ -1586,8 +1586,8 @@ hb_font_create_sub_font (hb_font_t *parent)
unsigned int num_coords = parent->num_coords;
if (num_coords)
{
- int *coords = (int *) calloc (num_coords, sizeof (parent->coords[0]));
- float *design_coords = (float *) calloc (num_coords, sizeof (parent->design_coords[0]));
+ int *coords = (int *) hb_calloc (num_coords, sizeof (parent->coords[0]));
+ float *design_coords = (float *) hb_calloc (num_coords, sizeof (parent->design_coords[0]));
if (likely (coords && design_coords))
{
memcpy (coords, parent->coords, num_coords * sizeof (parent->coords[0]));
@@ -1596,8 +1596,8 @@ hb_font_create_sub_font (hb_font_t *parent)
}
else
{
- free (coords);
- free (design_coords);
+ hb_free (coords);
+ hb_free (design_coords);
}
}
@@ -1659,10 +1659,10 @@ hb_font_destroy (hb_font_t *font)
hb_face_destroy (font->face);
hb_font_funcs_destroy (font->klass);
- free (font->coords);
- free (font->design_coords);
+ hb_free (font->coords);
+ hb_free (font->design_coords);
- free (font);
+ hb_free (font);
}
/**
@@ -2052,29 +2052,30 @@ hb_font_set_variations (hb_font_t *font,
return;
}
- unsigned int coords_length = hb_ot_var_get_axis_count (font->face);
+ const OT::fvar &fvar = *font->face->table.fvar;
+ auto axes = fvar.get_axes ();
+ const unsigned coords_length = axes.length;
- int *normalized = coords_length ? (int *) calloc (coords_length, sizeof (int)) : nullptr;
- float *design_coords = coords_length ? (float *) calloc (coords_length, sizeof (float)) : nullptr;
+ int *normalized = coords_length ? (int *) hb_calloc (coords_length, sizeof (int)) : nullptr;
+ float *design_coords = coords_length ? (float *) hb_calloc (coords_length, sizeof (float)) : nullptr;
if (unlikely (coords_length && !(normalized && design_coords)))
{
- free (normalized);
- free (design_coords);
+ hb_free (normalized);
+ hb_free (design_coords);
return;
}
- const OT::fvar &fvar = *font->face->table.fvar;
for (unsigned int i = 0; i < variations_length; i++)
{
- hb_ot_var_axis_info_t info;
- if (hb_ot_var_find_axis_info (font->face, variations[i].tag, &info) &&
- info.axis_index < coords_length)
- {
- float v = variations[i].value;
- design_coords[info.axis_index] = v;
- normalized[info.axis_index] = fvar.normalize_axis_value (info.axis_index, v);
- }
+ const auto tag = variations[i].tag;
+ const auto v = variations[i].value;
+ for (unsigned axis_index = 0; axis_index < coords_length; axis_index++)
+ if (axes[axis_index].axisTag == tag)
+ {
+ design_coords[axis_index] = v;
+ normalized[axis_index] = fvar.normalize_axis_value (axis_index, v);
+ }
}
font->face->table.avar->map_coords (normalized, coords_length);
@@ -2100,13 +2101,13 @@ hb_font_set_var_coords_design (hb_font_t *font,
if (hb_object_is_immutable (font))
return;
- int *normalized = coords_length ? (int *) calloc (coords_length, sizeof (int)) : nullptr;
- float *design_coords = coords_length ? (float *) calloc (coords_length, sizeof (float)) : nullptr;
+ int *normalized = coords_length ? (int *) hb_calloc (coords_length, sizeof (int)) : nullptr;
+ float *design_coords = coords_length ? (float *) hb_calloc (coords_length, sizeof (float)) : nullptr;
if (unlikely (coords_length && !(normalized && design_coords)))
{
- free (normalized);
- free (design_coords);
+ hb_free (normalized);
+ hb_free (design_coords);
return;
}
@@ -2135,13 +2136,13 @@ hb_font_set_var_named_instance (hb_font_t *font,
unsigned int coords_length = hb_ot_var_named_instance_get_design_coords (font->face, instance_index, nullptr, nullptr);
- float *coords = coords_length ? (float *) calloc (coords_length, sizeof (float)) : nullptr;
+ float *coords = coords_length ? (float *) hb_calloc (coords_length, sizeof (float)) : nullptr;
if (unlikely (coords_length && !coords))
return;
hb_ot_var_named_instance_get_design_coords (font->face, instance_index, &coords_length, coords);
hb_font_set_var_coords_design (font, coords, coords_length);
- free (coords);
+ hb_free (coords);
}
/**
@@ -2165,15 +2166,15 @@ hb_font_set_var_coords_normalized (hb_font_t *font,
if (hb_object_is_immutable (font))
return;
- int *copy = coords_length ? (int *) calloc (coords_length, sizeof (coords[0])) : nullptr;
- int *unmapped = coords_length ? (int *) calloc (coords_length, sizeof (coords[0])) : nullptr;
- float *design_coords = coords_length ? (float *) calloc (coords_length, sizeof (design_coords[0])) : nullptr;
+ int *copy = coords_length ? (int *) hb_calloc (coords_length, sizeof (coords[0])) : nullptr;
+ int *unmapped = coords_length ? (int *) hb_calloc (coords_length, sizeof (coords[0])) : nullptr;
+ float *design_coords = coords_length ? (float *) hb_calloc (coords_length, sizeof (design_coords[0])) : nullptr;
if (unlikely (coords_length && !(copy && unmapped && design_coords)))
{
- free (copy);
- free (unmapped);
- free (design_coords);
+ hb_free (copy);
+ hb_free (unmapped);
+ hb_free (design_coords);
return;
}
@@ -2187,7 +2188,7 @@ hb_font_set_var_coords_normalized (hb_font_t *font,
font->face->table.avar->unmap_coords (unmapped, coords_length);
for (unsigned int i = 0; i < coords_length; ++i)
design_coords[i] = font->face->table.fvar->unnormalize_axis_value (i, unmapped[i]);
- free (unmapped);
+ hb_free (unmapped);
_hb_font_adopt_var_coords (font, copy, design_coords, coords_length);
}
@@ -2267,7 +2268,7 @@ trampoline_create (FuncType func,
{
typedef hb_trampoline_t<FuncType> trampoline_t;
- trampoline_t *trampoline = (trampoline_t *) calloc (1, sizeof (trampoline_t));
+ trampoline_t *trampoline = (trampoline_t *) hb_calloc (1, sizeof (trampoline_t));
if (unlikely (!trampoline))
return nullptr;
@@ -2296,7 +2297,7 @@ trampoline_destroy (void *user_data)
if (closure->destroy)
closure->destroy (closure->user_data);
- free (closure);
+ hb_free (closure);
}
typedef hb_trampoline_t<hb_font_get_glyph_func_t> hb_font_get_glyph_trampoline_t;
diff --git a/thirdparty/harfbuzz/src/hb-ft.cc b/thirdparty/harfbuzz/src/hb-ft.cc
index b82c1a67bd..97a2c82e68 100644
--- a/thirdparty/harfbuzz/src/hb-ft.cc
+++ b/thirdparty/harfbuzz/src/hb-ft.cc
@@ -91,7 +91,7 @@ struct hb_ft_font_t
static hb_ft_font_t *
_hb_ft_font_create (FT_Face ft_face, bool symbol, bool unref)
{
- hb_ft_font_t *ft_font = (hb_ft_font_t *) calloc (1, sizeof (hb_ft_font_t));
+ hb_ft_font_t *ft_font = (hb_ft_font_t *) hb_calloc (1, sizeof (hb_ft_font_t));
if (unlikely (!ft_font)) return nullptr;
ft_font->lock.init ();
@@ -125,7 +125,7 @@ _hb_ft_font_destroy (void *data)
ft_font->lock.fini ();
- free (ft_font);
+ hb_free (ft_font);
}
/**
@@ -561,9 +561,7 @@ hb_ft_get_font_h_extents (hb_font_t *font HB_UNUSED,
return true;
}
-#if HB_USE_ATEXIT
-static void free_static_ft_funcs ();
-#endif
+static inline void free_static_ft_funcs ();
static struct hb_ft_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ft_font_funcs_lazy_loader_t>
{
@@ -591,21 +589,17 @@ static struct hb_ft_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ft
hb_font_funcs_make_immutable (funcs);
-#if HB_USE_ATEXIT
- atexit (free_static_ft_funcs);
-#endif
+ hb_atexit (free_static_ft_funcs);
return funcs;
}
} static_ft_funcs;
-#if HB_USE_ATEXIT
-static
+static inline
void free_static_ft_funcs ()
{
static_ft_funcs.free_instance ();
}
-#endif
static hb_font_funcs_t *
_hb_ft_get_font_funcs ()
@@ -642,20 +636,20 @@ _hb_ft_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data
if (error)
return nullptr;
- buffer = (FT_Byte *) malloc (length);
+ buffer = (FT_Byte *) hb_malloc (length);
if (!buffer)
return nullptr;
error = FT_Load_Sfnt_Table (ft_face, tag, 0, buffer, &length);
if (error)
{
- free (buffer);
+ hb_free (buffer);
return nullptr;
}
return hb_blob_create ((const char *) buffer, length,
HB_MEMORY_MODE_WRITABLE,
- buffer, free);
+ buffer, hb_free);
}
/**
@@ -846,8 +840,8 @@ hb_ft_font_changed (hb_font_t *font)
FT_MM_Var *mm_var = nullptr;
if (!FT_Get_MM_Var (ft_face, &mm_var))
{
- FT_Fixed *ft_coords = (FT_Fixed *) calloc (mm_var->num_axis, sizeof (FT_Fixed));
- int *coords = (int *) calloc (mm_var->num_axis, sizeof (int));
+ FT_Fixed *ft_coords = (FT_Fixed *) hb_calloc (mm_var->num_axis, sizeof (FT_Fixed));
+ int *coords = (int *) hb_calloc (mm_var->num_axis, sizeof (int));
if (coords && ft_coords)
{
if (!FT_Get_Var_Blend_Coordinates (ft_face, mm_var->num_axis, ft_coords))
@@ -866,12 +860,12 @@ hb_ft_font_changed (hb_font_t *font)
hb_font_set_var_coords_normalized (font, nullptr, 0);
}
}
- free (coords);
- free (ft_coords);
+ hb_free (coords);
+ hb_free (ft_coords);
#ifdef HAVE_FT_DONE_MM_VAR
FT_Done_MM_Var (ft_face->glyph->library, mm_var);
#else
- free (mm_var);
+ hb_free (mm_var);
#endif
}
#endif
@@ -905,9 +899,7 @@ hb_ft_font_create_referenced (FT_Face ft_face)
return hb_ft_font_create (ft_face, _hb_ft_face_destroy);
}
-#if HB_USE_ATEXIT
-static void free_static_ft_library ();
-#endif
+static inline void free_static_ft_library ();
static struct hb_ft_library_lazy_loader_t : hb_lazy_loader_t<hb_remove_pointer<FT_Library>,
hb_ft_library_lazy_loader_t>
@@ -918,9 +910,7 @@ static struct hb_ft_library_lazy_loader_t : hb_lazy_loader_t<hb_remove_pointer<F
if (FT_Init_FreeType (&l))
return nullptr;
-#if HB_USE_ATEXIT
- atexit (free_static_ft_library);
-#endif
+ hb_atexit (free_static_ft_library);
return l;
}
@@ -934,13 +924,11 @@ static struct hb_ft_library_lazy_loader_t : hb_lazy_loader_t<hb_remove_pointer<F
}
} static_ft_library;
-#if HB_USE_ATEXIT
-static
+static inline
void free_static_ft_library ()
{
static_ft_library.free_instance ();
}
-#endif
static FT_Library
get_ft_library ()
@@ -1020,13 +1008,13 @@ hb_ft_font_set_funcs (hb_font_t *font)
const int *coords = hb_font_get_var_coords_normalized (font, &num_coords);
if (num_coords)
{
- FT_Fixed *ft_coords = (FT_Fixed *) calloc (num_coords, sizeof (FT_Fixed));
+ FT_Fixed *ft_coords = (FT_Fixed *) hb_calloc (num_coords, sizeof (FT_Fixed));
if (ft_coords)
{
for (unsigned int i = 0; i < num_coords; i++)
ft_coords[i] = coords[i] * 4;
FT_Set_Var_Blend_Coordinates (ft_face, num_coords, ft_coords);
- free (ft_coords);
+ hb_free (ft_coords);
}
}
#endif
diff --git a/thirdparty/harfbuzz/src/hb-gdi.cc b/thirdparty/harfbuzz/src/hb-gdi.cc
index dc4659c7f6..8e7589beac 100644
--- a/thirdparty/harfbuzz/src/hb-gdi.cc
+++ b/thirdparty/harfbuzz/src/hb-gdi.cc
@@ -50,16 +50,16 @@ _hb_gdi_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_dat
length = GetFontData (hdc, hb_uint32_swap (tag), 0, buffer, length);
if (unlikely (length == GDI_ERROR)) goto fail_with_releasedc;
- buffer = (char *) malloc (length);
+ buffer = (char *) hb_malloc (length);
if (unlikely (!buffer)) goto fail_with_releasedc;
length = GetFontData (hdc, hb_uint32_swap (tag), 0, buffer, length);
if (unlikely (length == GDI_ERROR)) goto fail_with_releasedc_and_free;
ReleaseDC (nullptr, hdc);
- return hb_blob_create ((const char *) buffer, length, HB_MEMORY_MODE_WRITABLE, buffer, free);
+ return hb_blob_create ((const char *) buffer, length, HB_MEMORY_MODE_WRITABLE, buffer, hb_free);
fail_with_releasedc_and_free:
- free (buffer);
+ hb_free (buffer);
fail_with_releasedc:
ReleaseDC (nullptr, hdc);
fail:
diff --git a/thirdparty/harfbuzz/src/hb-glib.cc b/thirdparty/harfbuzz/src/hb-glib.cc
index f93bb8853c..8ddc7ebad8 100644
--- a/thirdparty/harfbuzz/src/hb-glib.cc
+++ b/thirdparty/harfbuzz/src/hb-glib.cc
@@ -218,9 +218,7 @@ hb_glib_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
}
-#if HB_USE_ATEXIT
-static void free_static_glib_funcs ();
-#endif
+static inline void free_static_glib_funcs ();
static struct hb_glib_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader_t<hb_glib_unicode_funcs_lazy_loader_t>
{
@@ -237,21 +235,17 @@ static struct hb_glib_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader
hb_unicode_funcs_make_immutable (funcs);
-#if HB_USE_ATEXIT
- atexit (free_static_glib_funcs);
-#endif
+ hb_atexit (free_static_glib_funcs);
return funcs;
}
} static_glib_funcs;
-#if HB_USE_ATEXIT
-static
+static inline
void free_static_glib_funcs ()
{
static_glib_funcs.free_instance ();
}
-#endif
/**
* hb_glib_get_unicode_funcs:
diff --git a/thirdparty/harfbuzz/src/hb-gobject-structs.cc b/thirdparty/harfbuzz/src/hb-gobject-structs.cc
index 7c46e26400..540b11f911 100644
--- a/thirdparty/harfbuzz/src/hb-gobject-structs.cc
+++ b/thirdparty/harfbuzz/src/hb-gobject-structs.cc
@@ -80,12 +80,12 @@ hb_gobject_##name##_get_type () \
#define HB_DEFINE_VALUE_TYPE(name) \
static hb_##name##_t *_hb_##name##_reference (const hb_##name##_t *l) \
{ \
- hb_##name##_t *c = (hb_##name##_t *) calloc (1, sizeof (hb_##name##_t)); \
+ hb_##name##_t *c = (hb_##name##_t *) hb_calloc (1, sizeof (hb_##name##_t)); \
if (unlikely (!c)) return nullptr; \
*c = *l; \
return c; \
} \
- static void _hb_##name##_destroy (hb_##name##_t *l) { free (l); } \
+ static void _hb_##name##_destroy (hb_##name##_t *l) { hb_free (l); } \
HB_DEFINE_BOXED_TYPE (name, _hb_##name##_reference, _hb_##name##_destroy)
HB_DEFINE_OBJECT_TYPE (buffer)
diff --git a/thirdparty/harfbuzz/src/hb-graphite2.cc b/thirdparty/harfbuzz/src/hb-graphite2.cc
index 9dafe654c8..209207f1e5 100644
--- a/thirdparty/harfbuzz/src/hb-graphite2.cc
+++ b/thirdparty/harfbuzz/src/hb-graphite2.cc
@@ -88,7 +88,7 @@ static const void *hb_graphite2_get_table (const void *data, unsigned int tag, s
{
blob = face_data->face->reference_table (tag);
- hb_graphite2_tablelist_t *p = (hb_graphite2_tablelist_t *) calloc (1, sizeof (hb_graphite2_tablelist_t));
+ hb_graphite2_tablelist_t *p = (hb_graphite2_tablelist_t *) hb_calloc (1, sizeof (hb_graphite2_tablelist_t));
if (unlikely (!p)) {
hb_blob_destroy (blob);
return nullptr;
@@ -123,15 +123,16 @@ _hb_graphite2_shaper_face_data_create (hb_face_t *face)
}
hb_blob_destroy (silf_blob);
- hb_graphite2_face_data_t *data = (hb_graphite2_face_data_t *) calloc (1, sizeof (hb_graphite2_face_data_t));
+ hb_graphite2_face_data_t *data = (hb_graphite2_face_data_t *) hb_calloc (1, sizeof (hb_graphite2_face_data_t));
if (unlikely (!data))
return nullptr;
data->face = face;
- data->grface = gr_make_face (data, &hb_graphite2_get_table, gr_face_preloadAll);
+ const gr_face_ops ops = {sizeof(gr_face_ops), &hb_graphite2_get_table, NULL};
+ data->grface = gr_make_face_with_ops (data, &ops, gr_face_preloadAll);
if (unlikely (!data->grface)) {
- free (data);
+ hb_free (data);
return nullptr;
}
@@ -148,12 +149,12 @@ _hb_graphite2_shaper_face_data_destroy (hb_graphite2_face_data_t *data)
hb_graphite2_tablelist_t *old = tlist;
hb_blob_destroy (tlist->blob);
tlist = tlist->next;
- free (old);
+ hb_free (old);
}
gr_face_destroy (data->grface);
- free (data);
+ hb_free (data);
}
/**
diff --git a/thirdparty/harfbuzz/src/hb-icu.cc b/thirdparty/harfbuzz/src/hb-icu.cc
index 008a39e414..e46401f7a6 100644
--- a/thirdparty/harfbuzz/src/hb-icu.cc
+++ b/thirdparty/harfbuzz/src/hb-icu.cc
@@ -233,9 +233,7 @@ hb_icu_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
}
-#if HB_USE_ATEXIT
-static void free_static_icu_funcs ();
-#endif
+static inline void free_static_icu_funcs ();
static struct hb_icu_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader_t<hb_icu_unicode_funcs_lazy_loader_t>
{
@@ -257,21 +255,17 @@ static struct hb_icu_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader_
hb_unicode_funcs_make_immutable (funcs);
-#if HB_USE_ATEXIT
- atexit (free_static_icu_funcs);
-#endif
+ hb_atexit (free_static_icu_funcs);
return funcs;
}
} static_icu_funcs;
-#if HB_USE_ATEXIT
-static
+static inline
void free_static_icu_funcs ()
{
static_icu_funcs.free_instance ();
}
-#endif
/**
* hb_icu_get_unicode_funcs:
diff --git a/thirdparty/harfbuzz/src/hb-iter.hh b/thirdparty/harfbuzz/src/hb-iter.hh
index f7018150e4..b8c4472636 100644
--- a/thirdparty/harfbuzz/src/hb-iter.hh
+++ b/thirdparty/harfbuzz/src/hb-iter.hh
@@ -46,7 +46,7 @@
* TODO Document more.
*
* If iterator implementation implements operator!=, then can be
- * used in range-based for loop. That comes free if the iterator
+ * used in range-based for loop. That already happens if the iterator
* is random-access. Otherwise, the range-based for loop incurs
* one traversal to find end(), which can be avoided if written
* as a while-style for loop, or if iterator implements a faster
diff --git a/thirdparty/harfbuzz/src/hb-machinery.hh b/thirdparty/harfbuzz/src/hb-machinery.hh
index 3bd5a979b0..010c2570d7 100644
--- a/thirdparty/harfbuzz/src/hb-machinery.hh
+++ b/thirdparty/harfbuzz/src/hb-machinery.hh
@@ -242,14 +242,14 @@ struct hb_lazy_loader_t : hb_data_wrapper_t<Data, WheresData>
static const Stored* get_null () { return &Null (Stored); }
static Stored *create (Data *data)
{
- Stored *p = (Stored *) calloc (1, sizeof (Stored));
+ Stored *p = (Stored *) hb_calloc (1, sizeof (Stored));
if (likely (p))
p->init (data);
return p;
}
static Stored *create ()
{
- Stored *p = (Stored *) calloc (1, sizeof (Stored));
+ Stored *p = (Stored *) hb_calloc (1, sizeof (Stored));
if (likely (p))
p->init ();
return p;
@@ -257,7 +257,7 @@ struct hb_lazy_loader_t : hb_data_wrapper_t<Data, WheresData>
static void destroy (Stored *p)
{
p->fini ();
- free (p);
+ hb_free (p);
}
// private:
diff --git a/thirdparty/harfbuzz/src/hb-map.cc b/thirdparty/harfbuzz/src/hb-map.cc
index f115da2bb8..9f1ac42846 100644
--- a/thirdparty/harfbuzz/src/hb-map.cc
+++ b/thirdparty/harfbuzz/src/hb-map.cc
@@ -109,7 +109,7 @@ hb_map_destroy (hb_map_t *map)
map->fini_shallow ();
- free (map);
+ hb_free (map);
}
/**
@@ -188,6 +188,7 @@ hb_map_set (hb_map_t *map,
hb_codepoint_t key,
hb_codepoint_t value)
{
+ /* Immutable-safe. */
map->set (key, value);
}
@@ -220,6 +221,7 @@ void
hb_map_del (hb_map_t *map,
hb_codepoint_t key)
{
+ /* Immutable-safe. */
map->del (key);
}
@@ -253,9 +255,6 @@ hb_map_has (const hb_map_t *map,
void
hb_map_clear (hb_map_t *map)
{
- if (unlikely (hb_object_is_immutable (map)))
- return;
-
return map->clear ();
}
diff --git a/thirdparty/harfbuzz/src/hb-map.hh b/thirdparty/harfbuzz/src/hb-map.hh
index 84fe1d549b..dcd5267d74 100644
--- a/thirdparty/harfbuzz/src/hb-map.hh
+++ b/thirdparty/harfbuzz/src/hb-map.hh
@@ -85,7 +85,7 @@ struct hb_hashmap_t
}
void fini_shallow ()
{
- free (items);
+ hb_free (items);
items = nullptr;
population = occupancy = 0;
}
@@ -109,7 +109,7 @@ struct hb_hashmap_t
unsigned int power = hb_bit_storage (population * 2 + 8);
unsigned int new_size = 1u << power;
- item_t *new_items = (item_t *) malloc ((size_t) new_size * sizeof (item_t));
+ item_t *new_items = (item_t *) hb_malloc ((size_t) new_size * sizeof (item_t));
if (unlikely (!new_items))
{
successful = false;
@@ -135,14 +135,14 @@ struct hb_hashmap_t
old_items[i].hash,
old_items[i].value);
- free (old_items);
+ hb_free (old_items);
return true;
}
- void set (K key, V value)
+ bool set (K key, V value)
{
- set_with_hash (key, hb_hash (key), value);
+ return set_with_hash (key, hb_hash (key), value);
}
V get (K key) const
@@ -169,6 +169,8 @@ struct hb_hashmap_t
void clear ()
{
+ if (unlikely (!successful)) return;
+
if (items)
for (auto &_ : hb_iter (items, mask + 1))
_.clear ();
@@ -211,20 +213,20 @@ struct hb_hashmap_t
protected:
- void set_with_hash (K key, uint32_t hash, V value)
+ bool set_with_hash (K key, uint32_t hash, V value)
{
- if (unlikely (!successful)) return;
- if (unlikely (key == kINVALID)) return;
- if ((occupancy + occupancy / 2) >= mask && !resize ()) return;
+ if (unlikely (!successful)) return false;
+ if (unlikely (key == kINVALID)) return true;
+ if (unlikely ((occupancy + occupancy / 2) >= mask && !resize ())) return false;
unsigned int i = bucket_for_hash (key, hash);
if (value == vINVALID && items[i].key != key)
- return; /* Trying to delete non-existent key. */
+ return true; /* Trying to delete non-existent key. */
if (!items[i].is_unused ())
{
occupancy--;
- if (items[i].is_tombstone ())
+ if (!items[i].is_tombstone ())
population--;
}
@@ -235,6 +237,8 @@ struct hb_hashmap_t
occupancy++;
if (!items[i].is_tombstone ())
population++;
+
+ return true;
}
unsigned int bucket_for (K key) const
diff --git a/thirdparty/harfbuzz/src/hb-meta.hh b/thirdparty/harfbuzz/src/hb-meta.hh
index e40d9fd178..a714bc2bf0 100644
--- a/thirdparty/harfbuzz/src/hb-meta.hh
+++ b/thirdparty/harfbuzz/src/hb-meta.hh
@@ -101,14 +101,14 @@ HB_FUNCOBJ (hb_addressof);
template <typename T> static inline T hb_declval ();
#define hb_declval(T) (hb_declval<T> ())
-template <typename T> struct hb_match_const : hb_type_identity_t<T>, hb_bool_constant<false>{};
-template <typename T> struct hb_match_const<const T> : hb_type_identity_t<T>, hb_bool_constant<true> {};
+template <typename T> struct hb_match_const : hb_type_identity_t<T>, hb_false_type {};
+template <typename T> struct hb_match_const<const T> : hb_type_identity_t<T>, hb_true_type {};
template <typename T> using hb_remove_const = typename hb_match_const<T>::type;
template <typename T> using hb_add_const = const T;
#define hb_is_const(T) hb_match_const<T>::value
-template <typename T> struct hb_match_reference : hb_type_identity_t<T>, hb_bool_constant<false>{};
-template <typename T> struct hb_match_reference<T &> : hb_type_identity_t<T>, hb_bool_constant<true> {};
-template <typename T> struct hb_match_reference<T &&> : hb_type_identity_t<T>, hb_bool_constant<true> {};
+template <typename T> struct hb_match_reference : hb_type_identity_t<T>, hb_false_type {};
+template <typename T> struct hb_match_reference<T &> : hb_type_identity_t<T>, hb_true_type {};
+template <typename T> struct hb_match_reference<T &&> : hb_type_identity_t<T>, hb_true_type {};
template <typename T> using hb_remove_reference = typename hb_match_reference<T>::type;
template <typename T> auto _hb_try_add_lvalue_reference (hb_priority<1>) -> hb_type_identity<T&>;
template <typename T> auto _hb_try_add_lvalue_reference (hb_priority<0>) -> hb_type_identity<T>;
@@ -117,8 +117,8 @@ template <typename T> auto _hb_try_add_rvalue_reference (hb_priority<1>) -> hb_t
template <typename T> auto _hb_try_add_rvalue_reference (hb_priority<0>) -> hb_type_identity<T>;
template <typename T> using hb_add_rvalue_reference = decltype (_hb_try_add_rvalue_reference<T> (hb_prioritize));
#define hb_is_reference(T) hb_match_reference<T>::value
-template <typename T> struct hb_match_pointer : hb_type_identity_t<T>, hb_bool_constant<false>{};
-template <typename T> struct hb_match_pointer<T *> : hb_type_identity_t<T>, hb_bool_constant<true> {};
+template <typename T> struct hb_match_pointer : hb_type_identity_t<T>, hb_false_type {};
+template <typename T> struct hb_match_pointer<T *> : hb_type_identity_t<T>, hb_true_type {};
template <typename T> using hb_remove_pointer = typename hb_match_pointer<T>::type;
template <typename T> auto _hb_try_add_pointer (hb_priority<1>) -> hb_type_identity<hb_remove_reference<T>*>;
template <typename T> auto _hb_try_add_pointer (hb_priority<1>) -> hb_type_identity<T>;
@@ -259,15 +259,15 @@ using hb_is_arithmetic = hb_bool_constant<
#define hb_is_arithmetic(T) hb_is_arithmetic<T>::value
-template <typename T>
-using hb_is_signed = hb_conditional<hb_is_arithmetic (T),
- hb_bool_constant<(T) -1 < (T) 0>,
- hb_false_type>;
+template <typename T, bool is_arithmetic> struct hb_is_signed_;
+template <typename T> struct hb_is_signed_<T, false> : hb_false_type {};
+template <typename T> struct hb_is_signed_<T, true> : hb_bool_constant<(T) -1 < (T) 0> {};
+template <typename T> struct hb_is_signed : hb_is_signed_<T, hb_is_arithmetic (T)> {};
#define hb_is_signed(T) hb_is_signed<T>::value
-template <typename T>
-using hb_is_unsigned = hb_conditional<hb_is_arithmetic (T),
- hb_bool_constant<(T) 0 < (T) -1>,
- hb_false_type>;
+template <typename T, bool is_arithmetic> struct hb_is_unsigned_;
+template <typename T> struct hb_is_unsigned_<T, false> : hb_false_type {};
+template <typename T> struct hb_is_unsigned_<T, true> : hb_bool_constant<(T) 0 < (T) -1> {};
+template <typename T> struct hb_is_unsigned : hb_is_unsigned_<T, hb_is_arithmetic (T)> {};
#define hb_is_unsigned(T) hb_is_unsigned<T>::value
template <typename T> struct hb_int_min;
@@ -282,6 +282,7 @@ template <> struct hb_int_min<signed long> : hb_integral_constant<signed long,
template <> struct hb_int_min<unsigned long> : hb_integral_constant<unsigned long, 0> {};
template <> struct hb_int_min<signed long long> : hb_integral_constant<signed long long, LLONG_MIN> {};
template <> struct hb_int_min<unsigned long long> : hb_integral_constant<unsigned long long, 0> {};
+template <typename T> struct hb_int_min<T *> : hb_integral_constant<T *, nullptr> {};
#define hb_int_min(T) hb_int_min<T>::value
template <typename T> struct hb_int_max;
template <> struct hb_int_max<char> : hb_integral_constant<char, CHAR_MAX> {};
diff --git a/thirdparty/harfbuzz/src/hb-ms-feature-ranges.cc b/thirdparty/harfbuzz/src/hb-ms-feature-ranges.cc
new file mode 100644
index 0000000000..6d09b252d8
--- /dev/null
+++ b/thirdparty/harfbuzz/src/hb-ms-feature-ranges.cc
@@ -0,0 +1,177 @@
+/*
+ * Copyright © 2011,2012,2013 Google, Inc.
+ * Copyright © 2021 Khaled Hosny
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#include "hb-ms-feature-ranges.hh"
+
+bool
+hb_ms_setup_features (const hb_feature_t *features,
+ unsigned int num_features,
+ hb_vector_t<hb_ms_feature_t> &feature_records, /* OUT */
+ hb_vector_t<hb_ms_range_record_t> &range_records /* OUT */)
+{
+ feature_records.shrink(0);
+ range_records.shrink(0);
+
+ /* Sort features by start/end events. */
+ hb_vector_t<hb_ms_feature_event_t> feature_events;
+ for (unsigned int i = 0; i < num_features; i++)
+ {
+ hb_ms_active_feature_t feature;
+ feature.fea.tag_le = hb_uint32_swap (features[i].tag);
+ feature.fea.value = features[i].value;
+ feature.order = i;
+
+ hb_ms_feature_event_t *event;
+
+ event = feature_events.push ();
+ event->index = features[i].start;
+ event->start = true;
+ event->feature = feature;
+
+ event = feature_events.push ();
+ event->index = features[i].end;
+ event->start = false;
+ event->feature = feature;
+ }
+ feature_events.qsort ();
+ /* Add a strategic final event. */
+ {
+ hb_ms_active_feature_t feature;
+ feature.fea.tag_le = 0;
+ feature.fea.value = 0;
+ feature.order = num_features + 1;
+
+ auto *event = feature_events.push ();
+ event->index = 0; /* This value does magic. */
+ event->start = false;
+ event->feature = feature;
+ }
+
+ /* Scan events and save features for each range. */
+ hb_vector_t<hb_ms_active_feature_t> active_features;
+ unsigned int last_index = 0;
+ for (unsigned int i = 0; i < feature_events.length; i++)
+ {
+ auto *event = &feature_events[i];
+
+ if (event->index != last_index)
+ {
+ /* Save a snapshot of active features and the range. */
+ auto *range = range_records.push ();
+ auto offset = feature_records.length;
+
+ active_features.qsort ();
+ for (unsigned int j = 0; j < active_features.length; j++)
+ {
+ if (!j || active_features[j].fea.tag_le != feature_records[feature_records.length - 1].tag_le)
+ {
+ feature_records.push (active_features[j].fea);
+ }
+ else
+ {
+ /* Overrides value for existing feature. */
+ feature_records[feature_records.length - 1].value = active_features[j].fea.value;
+ }
+ }
+
+ /* Will convert to pointer after all is ready, since feature_records.array
+ * may move as we grow it. */
+ range->features.features = reinterpret_cast<hb_ms_feature_t *> (offset);
+ range->features.num_features = feature_records.length - offset;
+ range->index_first = last_index;
+ range->index_last = event->index - 1;
+
+ last_index = event->index;
+ }
+
+ if (event->start)
+ {
+ active_features.push (event->feature);
+ }
+ else
+ {
+ auto *feature = active_features.find (&event->feature);
+ if (feature)
+ active_features.remove (feature - active_features.arrayZ);
+ }
+ }
+
+ if (!range_records.length) /* No active feature found. */
+ num_features = 0;
+
+ /* Fixup the pointers. */
+ for (unsigned int i = 0; i < range_records.length; i++)
+ {
+ auto *range = &range_records[i];
+ range->features.features = (hb_ms_feature_t *) feature_records + reinterpret_cast<uintptr_t> (range->features.features);
+ }
+
+ return !!num_features;
+}
+
+void
+hb_ms_make_feature_ranges (hb_vector_t<hb_ms_feature_t> &feature_records,
+ hb_vector_t<hb_ms_range_record_t> &range_records,
+ unsigned int chars_offset,
+ unsigned int chars_len,
+ uint16_t *log_clusters,
+ hb_vector_t<hb_ms_features_t*> &range_features, /* OUT */
+ hb_vector_t<uint32_t> &range_counts /* OUT */)
+{
+ range_features.shrink (0);
+ range_counts.shrink (0);
+
+ auto *last_range = &range_records[0];
+ for (unsigned int i = chars_offset; i < chars_len; i++)
+ {
+ auto *range = last_range;
+ while (log_clusters[i] < range->index_first)
+ range--;
+ while (log_clusters[i] > range->index_last)
+ range++;
+ if (!range_features.length ||
+ &range->features != range_features[range_features.length - 1])
+ {
+ auto **features = range_features.push ();
+ auto *c = range_counts.push ();
+ if (unlikely (!features || !c))
+ {
+ range_features.shrink (0);
+ range_counts.shrink (0);
+ break;
+ }
+ *features = &range->features;
+ *c = 1;
+ }
+ else
+ {
+ range_counts[range_counts.length - 1]++;
+ }
+
+ last_range = range;
+ }
+}
diff --git a/thirdparty/harfbuzz/src/hb-ms-feature-ranges.hh b/thirdparty/harfbuzz/src/hb-ms-feature-ranges.hh
new file mode 100644
index 0000000000..401d1e1d97
--- /dev/null
+++ b/thirdparty/harfbuzz/src/hb-ms-feature-ranges.hh
@@ -0,0 +1,96 @@
+/*
+ * Copyright © 2011,2012,2013 Google, Inc.
+ * Copyright © 2021 Khaled Hosny
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_MS_FEATURE_RANGES_HH
+#define HB_MS_FEATURE_RANGES_HH
+
+#include "hb.hh"
+
+typedef struct hb_ms_feature_t {
+ uint32_t tag_le;
+ uint32_t value;
+} hb_ms_feature_t;
+
+typedef struct hb_ms_features_t {
+ hb_ms_feature_t *features;
+ uint32_t num_features;
+} hb_ms_features_t;
+
+struct hb_ms_active_feature_t {
+ hb_ms_feature_t fea;
+ unsigned int order;
+
+ HB_INTERNAL static int cmp (const void *pa, const void *pb) {
+ const auto *a = (const hb_ms_active_feature_t *) pa;
+ const auto *b = (const hb_ms_active_feature_t *) pb;
+ return a->fea.tag_le < b->fea.tag_le ? -1 : a->fea.tag_le > b->fea.tag_le ? 1 :
+ a->order < b->order ? -1 : a->order > b->order ? 1 :
+ a->fea.value < b->fea.value ? -1 : a->fea.value > b->fea.value ? 1 :
+ 0;
+ }
+ bool operator== (const hb_ms_active_feature_t *f)
+ { return cmp (this, f) == 0; }
+};
+
+struct hb_ms_feature_event_t {
+ unsigned int index;
+ bool start;
+ hb_ms_active_feature_t feature;
+
+ HB_INTERNAL static int cmp (const void *pa, const void *pb)
+ {
+ const auto *a = (const hb_ms_feature_event_t *) pa;
+ const auto *b = (const hb_ms_feature_event_t *) pb;
+ return a->index < b->index ? -1 : a->index > b->index ? 1 :
+ a->start < b->start ? -1 : a->start > b->start ? 1 :
+ hb_ms_active_feature_t::cmp (&a->feature, &b->feature);
+ }
+};
+
+struct hb_ms_range_record_t {
+ hb_ms_features_t features;
+ unsigned int index_first; /* == start */
+ unsigned int index_last; /* == end - 1 */
+};
+
+HB_INTERNAL bool
+hb_ms_setup_features (const hb_feature_t *features,
+ unsigned int num_features,
+ hb_vector_t<hb_ms_feature_t> &feature_records, /* OUT */
+ hb_vector_t<hb_ms_range_record_t> &range_records /* OUT */);
+
+
+HB_INTERNAL void
+hb_ms_make_feature_ranges (hb_vector_t<hb_ms_feature_t> &feature_records,
+ hb_vector_t<hb_ms_range_record_t> &range_records,
+ unsigned int chars_offset,
+ unsigned int chars_len,
+ uint16_t *log_clusters,
+ hb_vector_t<hb_ms_features_t*> &range_features, /* OUT */
+ hb_vector_t<uint32_t> &range_counts /* OUT */);
+
+#endif /* HB_MS_FEATURE_RANGES_HH */
diff --git a/thirdparty/harfbuzz/src/hb-mutex.hh b/thirdparty/harfbuzz/src/hb-mutex.hh
index 2fc8d7ee58..a9227a741d 100644
--- a/thirdparty/harfbuzz/src/hb-mutex.hh
+++ b/thirdparty/harfbuzz/src/hb-mutex.hh
@@ -39,8 +39,7 @@
/* We need external help for these */
-#if defined(HB_MUTEX_IMPL_INIT) \
- && defined(hb_mutex_impl_init) \
+#if defined(hb_mutex_impl_init) \
&& defined(hb_mutex_impl_lock) \
&& defined(hb_mutex_impl_unlock) \
&& defined(hb_mutex_impl_finish)
@@ -52,7 +51,6 @@
#include <pthread.h>
typedef pthread_mutex_t hb_mutex_impl_t;
-#define HB_MUTEX_IMPL_INIT PTHREAD_MUTEX_INITIALIZER
#define hb_mutex_impl_init(M) pthread_mutex_init (M, nullptr)
#define hb_mutex_impl_lock(M) pthread_mutex_lock (M)
#define hb_mutex_impl_unlock(M) pthread_mutex_unlock (M)
@@ -62,7 +60,6 @@ typedef pthread_mutex_t hb_mutex_impl_t;
#elif !defined(HB_NO_MT) && defined(_WIN32)
typedef CRITICAL_SECTION hb_mutex_impl_t;
-#define HB_MUTEX_IMPL_INIT {0}
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#define hb_mutex_impl_init(M) InitializeCriticalSectionEx (M, 0, 0)
#else
@@ -76,7 +73,6 @@ typedef CRITICAL_SECTION hb_mutex_impl_t;
#elif defined(HB_NO_MT)
typedef int hb_mutex_impl_t;
-#define HB_MUTEX_IMPL_INIT 0
#define hb_mutex_impl_init(M) HB_STMT_START {} HB_STMT_END
#define hb_mutex_impl_lock(M) HB_STMT_START {} HB_STMT_END
#define hb_mutex_impl_unlock(M) HB_STMT_START {} HB_STMT_END
@@ -91,8 +87,6 @@ typedef int hb_mutex_impl_t;
#endif
-#define HB_MUTEX_INIT {HB_MUTEX_IMPL_INIT}
-
struct hb_mutex_t
{
hb_mutex_impl_t m;
diff --git a/thirdparty/harfbuzz/src/hb-null.hh b/thirdparty/harfbuzz/src/hb-null.hh
index d09f858cde..db38a4dfd2 100644
--- a/thirdparty/harfbuzz/src/hb-null.hh
+++ b/thirdparty/harfbuzz/src/hb-null.hh
@@ -39,8 +39,11 @@
#define HB_NULL_POOL_SIZE 384
-/* Use SFINAE to sniff whether T has min_size; in which case return T::null_size,
- * otherwise return sizeof(T). */
+/* Use SFINAE to sniff whether T has min_size; in which case return the larger
+ * of sizeof(T) and T::null_size, otherwise return sizeof(T).
+ *
+ * The main purpose of this is to let structs communicate that they are not nullable,
+ * by defining min_size but *not* null_size. */
/* The hard way...
* https://stackoverflow.com/questions/7776448/sfinae-tried-with-bool-gives-compiler-error-template-argument-tvalue-invol
@@ -49,8 +52,9 @@
template <typename T, typename>
struct _hb_null_size : hb_integral_constant<unsigned, sizeof (T)> {};
template <typename T>
-struct _hb_null_size<T, hb_void_t<decltype (T::min_size)>> : hb_integral_constant<unsigned, T::null_size> {};
-
+struct _hb_null_size<T, hb_void_t<decltype (T::min_size)>>
+ : hb_integral_constant<unsigned,
+ (sizeof (T) > T::null_size ? sizeof (T) : T::null_size)> {};
template <typename T>
using hb_null_size = _hb_null_size<T, void>;
#define hb_null_size(T) hb_null_size<T>::value
@@ -68,6 +72,14 @@ template <typename T>
using hb_static_size = _hb_static_size<T, void>;
#define hb_static_size(T) hb_static_size<T>::value
+template <typename T, typename>
+struct _hb_min_size : hb_integral_constant<unsigned, sizeof (T)> {};
+template <typename T>
+struct _hb_min_size<T, hb_void_t<decltype (T::min_size)>> : hb_integral_constant<unsigned, T::min_size> {};
+template <typename T>
+using hb_min_size = _hb_min_size<T, void>;
+#define hb_min_size(T) hb_min_size<T>::value
+
/*
* Null()
diff --git a/thirdparty/harfbuzz/src/hb-object.hh b/thirdparty/harfbuzz/src/hb-object.hh
index f3048b1c3e..0e15cb12c4 100644
--- a/thirdparty/harfbuzz/src/hb-object.hh
+++ b/thirdparty/harfbuzz/src/hb-object.hh
@@ -140,8 +140,6 @@ struct hb_lockable_set_t
* Reference-count.
*/
-#define HB_REFERENCE_COUNT_INIT {0}
-
struct hb_reference_count_t
{
mutable hb_atomic_int_t ref_count;
@@ -197,6 +195,8 @@ struct hb_object_header_t
hb_reference_count_t ref_count;
mutable hb_atomic_int_t writable = 0;
hb_atomic_ptr_t<hb_user_data_array_t> user_data;
+
+ bool is_inert () const { return !ref_count.get_relaxed (); }
};
#define HB_OBJECT_HEADER_STATIC {}
@@ -217,7 +217,7 @@ static inline void hb_object_trace (const Type *obj, const char *function)
template <typename Type>
static inline Type *hb_object_create ()
{
- Type *obj = (Type *) calloc (1, sizeof (Type));
+ Type *obj = (Type *) hb_calloc (1, sizeof (Type));
if (unlikely (!obj))
return obj;
@@ -234,11 +234,6 @@ static inline void hb_object_init (Type *obj)
obj->header.user_data.init ();
}
template <typename Type>
-static inline bool hb_object_is_inert (const Type *obj)
-{
- return unlikely (obj->header.ref_count.is_inert ());
-}
-template <typename Type>
static inline bool hb_object_is_valid (const Type *obj)
{
return likely (obj->header.ref_count.is_valid ());
@@ -257,7 +252,7 @@ template <typename Type>
static inline Type *hb_object_reference (Type *obj)
{
hb_object_trace (obj, HB_FUNC);
- if (unlikely (!obj || hb_object_is_inert (obj)))
+ if (unlikely (!obj || obj->header.is_inert ()))
return obj;
assert (hb_object_is_valid (obj));
obj->header.ref_count.inc ();
@@ -267,7 +262,7 @@ template <typename Type>
static inline bool hb_object_destroy (Type *obj)
{
hb_object_trace (obj, HB_FUNC);
- if (unlikely (!obj || hb_object_is_inert (obj)))
+ if (unlikely (!obj || obj->header.is_inert ()))
return false;
assert (hb_object_is_valid (obj));
if (obj->header.ref_count.dec () != 1)
@@ -284,7 +279,7 @@ static inline void hb_object_fini (Type *obj)
if (user_data)
{
user_data->fini ();
- free (user_data);
+ hb_free (user_data);
user_data = nullptr;
}
}
@@ -295,7 +290,7 @@ static inline bool hb_object_set_user_data (Type *obj,
hb_destroy_func_t destroy,
hb_bool_t replace)
{
- if (unlikely (!obj || hb_object_is_inert (obj)))
+ if (unlikely (!obj || obj->header.is_inert ()))
return false;
assert (hb_object_is_valid (obj));
@@ -303,14 +298,14 @@ retry:
hb_user_data_array_t *user_data = obj->header.user_data.get ();
if (unlikely (!user_data))
{
- user_data = (hb_user_data_array_t *) calloc (sizeof (hb_user_data_array_t), 1);
+ user_data = (hb_user_data_array_t *) hb_calloc (sizeof (hb_user_data_array_t), 1);
if (unlikely (!user_data))
return false;
user_data->init ();
if (unlikely (!obj->header.user_data.cmpexch (nullptr, user_data)))
{
user_data->fini ();
- free (user_data);
+ hb_free (user_data);
goto retry;
}
}
@@ -322,7 +317,7 @@ template <typename Type>
static inline void *hb_object_get_user_data (Type *obj,
hb_user_data_key_t *key)
{
- if (unlikely (!obj || hb_object_is_inert (obj)))
+ if (unlikely (!obj || obj->header.is_inert ()))
return nullptr;
assert (hb_object_is_valid (obj));
hb_user_data_array_t *user_data = obj->header.user_data.get ();
diff --git a/thirdparty/harfbuzz/src/hb-open-file.hh b/thirdparty/harfbuzz/src/hb-open-file.hh
index 54c07ff13c..6eee5827c1 100644
--- a/thirdparty/harfbuzz/src/hb-open-file.hh
+++ b/thirdparty/harfbuzz/src/hb-open-file.hh
@@ -35,7 +35,6 @@
namespace OT {
-
/*
*
* The OpenType Font File
@@ -102,7 +101,13 @@ typedef struct OpenTypeOffsetTable
{
Tag t;
t = tag;
- return tables.bfind (t, table_index, HB_BFIND_NOT_FOUND_STORE, Index::NOT_FOUND_INDEX);
+ /* Use lfind for small fonts; there are fonts that have unsorted table entries;
+ * those tend to work in other tools, so tolerate them.
+ * https://github.com/harfbuzz/harfbuzz/issues/3065 */
+ if (tables.len < 16)
+ return tables.lfind (t, table_index, HB_NOT_FOUND_STORE, Index::NOT_FOUND_INDEX);
+ else
+ return tables.bfind (t, table_index, HB_NOT_FOUND_STORE, Index::NOT_FOUND_INDEX);
}
const TableRecord& get_table_by_tag (hb_tag_t tag) const
{
@@ -113,44 +118,53 @@ typedef struct OpenTypeOffsetTable
public:
- template <typename item_t>
+ template <typename Iterator,
+ hb_requires ((hb_is_source_of<Iterator, hb_pair_t<hb_tag_t, hb_blob_t *>>::value))>
bool serialize (hb_serialize_context_t *c,
hb_tag_t sfnt_tag,
- hb_array_t<item_t> items)
+ Iterator it)
{
TRACE_SERIALIZE (this);
/* Alloc 12 for the OTHeader. */
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
/* Write sfntVersion (bytes 0..3). */
sfnt_version = sfnt_tag;
/* Take space for numTables, searchRange, entrySelector, RangeShift
* and the TableRecords themselves. */
- if (unlikely (!tables.serialize (c, items.length))) return_trace (false);
+ unsigned num_items = it.len ();
+ if (unlikely (!tables.serialize (c, num_items))) return_trace (false);
const char *dir_end = (const char *) c->head;
HBUINT32 *checksum_adjustment = nullptr;
/* Write OffsetTables, alloc for and write actual table blobs. */
- for (unsigned int i = 0; i < tables.len; i++)
+ unsigned i = 0;
+ for (hb_pair_t<hb_tag_t, hb_blob_t*> entry : it)
{
- TableRecord &rec = tables.arrayZ[i];
- hb_blob_t *blob = items[i].blob;
- rec.tag = items[i].tag;
- rec.length = blob->length;
- rec.offset.serialize (c, this);
+ hb_blob_t *blob = entry.second;
+ unsigned len = blob->length;
/* Allocate room for the table and copy it. */
- char *start = (char *) c->allocate_size<void> (rec.length);
+ char *start = (char *) c->allocate_size<void> (len);
if (unlikely (!start)) return false;
- if (likely (rec.length))
- memcpy (start, blob->data, rec.length);
+ TableRecord &rec = tables.arrayZ[i];
+ rec.tag = entry.first;
+ rec.length = len;
+ rec.offset = 0;
+ if (unlikely (!c->check_assign (rec.offset,
+ (unsigned) ((char *) start - (char *) this),
+ HB_SERIALIZE_ERROR_OFFSET_OVERFLOW)))
+ return_trace (false);
+
+ if (likely (len))
+ memcpy (start, blob->data, len);
/* 4-byte alignment. */
c->align (4);
const char *end = (const char *) c->head;
- if (items[i].tag == HB_OT_TAG_head &&
+ if (entry.first == HB_OT_TAG_head &&
(unsigned) (end - start) >= head::static_size)
{
head *h = (head *) start;
@@ -159,6 +173,7 @@ typedef struct OpenTypeOffsetTable
}
rec.checkSum.set_for_data (start, end - start);
+ i++;
}
tables.qsort ();
@@ -170,7 +185,7 @@ typedef struct OpenTypeOffsetTable
/* The following line is a slower version of the following block. */
//checksum.set_for_data (this, (const char *) c->head - (const char *) this);
checksum.set_for_data (this, dir_end - (const char *) this);
- for (unsigned int i = 0; i < items.length; i++)
+ for (unsigned int i = 0; i < num_items; i++)
{
TableRecord &rec = tables.arrayZ[i];
checksum = checksum + rec.checkSum;
@@ -218,7 +233,7 @@ struct TTCHeaderVersion1
Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */
FixedVersion<>version; /* Version of the TTC Header (1.0),
* 0x00010000u */
- LArrayOf<LOffsetTo<OpenTypeOffsetTable>>
+ Array32Of<Offset32To<OpenTypeOffsetTable>>
table; /* Array of offsets to the OffsetTable for each font
* from the beginning of the file */
public:
@@ -295,7 +310,7 @@ struct ResourceRecord
HBINT16 nameOffset; /* Offset from beginning of resource name list
* to resource name, -1 means there is none. */
HBUINT8 attrs; /* Resource attributes */
- NNOffsetTo<LArrayOf<HBUINT8>, HBUINT24>
+ NNOffset24To<Array32Of<HBUINT8>>
offset; /* Offset from beginning of data block to
* data for this resource */
HBUINT32 reserved; /* Reserved for handle to resource */
@@ -330,7 +345,7 @@ struct ResourceTypeRecord
protected:
Tag tag; /* Resource type. */
HBUINT16 resCountM1; /* Number of resources minus 1. */
- NNOffsetTo<UnsizedArrayOf<ResourceRecord>>
+ NNOffset16To<UnsizedArrayOf<ResourceRecord>>
resourcesZ; /* Offset from beginning of resource type list
* to reference item list for this type. */
public:
@@ -386,7 +401,7 @@ struct ResourceMap
HBUINT32 reserved1; /* Reserved for handle to next resource map */
HBUINT16 resreved2; /* Reserved for file reference number */
HBUINT16 attrs; /* Resource fork attribute */
- NNOffsetTo<ArrayOfM1<ResourceTypeRecord>>
+ NNOffset16To<ArrayOfM1<ResourceTypeRecord>>
typeList; /* Offset from beginning of map to
* resource type list */
Offset16 nameList; /* Offset from beginning of map to
@@ -418,10 +433,10 @@ struct ResourceForkHeader
}
protected:
- LNNOffsetTo<UnsizedArrayOf<HBUINT8>>
+ NNOffset32To<UnsizedArrayOf<HBUINT8>>
data; /* Offset from beginning of resource fork
* to resource data */
- LNNOffsetTo<ResourceMap >
+ NNOffset32To<ResourceMap >
map; /* Offset from beginning of resource fork
* to resource map */
HBUINT32 dataLen; /* Length of resource data */
@@ -477,14 +492,15 @@ struct OpenTypeFontFile
}
}
- template <typename item_t>
+ template <typename Iterator,
+ hb_requires ((hb_is_source_of<Iterator, hb_pair_t<hb_tag_t, hb_blob_t *>>::value))>
bool serialize_single (hb_serialize_context_t *c,
hb_tag_t sfnt_tag,
- hb_array_t<item_t> items)
+ Iterator items)
{
TRACE_SERIALIZE (this);
assert (sfnt_tag != TTCTag);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
return_trace (u.fontFace.serialize (c, sfnt_tag, items));
}
diff --git a/thirdparty/harfbuzz/src/hb-open-type.hh b/thirdparty/harfbuzz/src/hb-open-type.hh
index dc0ae1d989..49653ce97e 100644
--- a/thirdparty/harfbuzz/src/hb-open-type.hh
+++ b/thirdparty/harfbuzz/src/hb-open-type.hh
@@ -196,6 +196,12 @@ DECLARE_NULL_NAMESPACE_BYTES (OT, Index);
typedef Index NameID;
+struct VarIdx : HBUINT32 {
+ static constexpr unsigned NO_VARIATION = 0xFFFFFFFFu;
+ VarIdx& operator = (uint32_t i) { HBUINT32::operator= (i); return *this; }
+};
+DECLARE_NULL_NAMESPACE_BYTES (OT, VarIdx);
+
/* Offset, Null offset = 0 */
template <typename Type, bool has_null=true>
struct Offset : Type
@@ -206,18 +212,12 @@ struct Offset : Type
bool is_null () const { return has_null && 0 == *this; }
- void *serialize (hb_serialize_context_t *c, const void *base)
- {
- void *t = c->start_embed<void> ();
- c->check_assign (*this, (unsigned) ((char *) t - (char *) base));
- return t;
- }
-
public:
DEFINE_SIZE_STATIC (sizeof (Type));
};
typedef Offset<HBUINT16> Offset16;
+typedef Offset<HBUINT24> Offset24;
typedef Offset<HBUINT32> Offset32;
@@ -287,7 +287,7 @@ struct _hb_has_null<Type, true>
static Type *get_crap () { return &Crap (Type); }
};
-template <typename Type, typename OffsetType=HBUINT16, bool has_null=true>
+template <typename Type, typename OffsetType, bool has_null=true>
struct OffsetTo : Offset<OffsetType, has_null>
{
HB_DELETE_COPY_ASSIGN (OffsetTo);
@@ -319,10 +319,6 @@ struct OffsetTo : Offset<OffsetType, has_null>
hb_enable_if (hb_is_convertible (Base, void *))>
friend Type& operator + (OffsetTo &offset, Base &&base) { return offset ((void *) base); }
- Type& serialize (hb_serialize_context_t *c, const void *base)
- {
- return * (Type *) Offset<OffsetType>::serialize (c, base);
- }
template <typename ...Ts>
bool serialize_subset (hb_subset_context_t *c, const OffsetTo& src,
@@ -346,6 +342,23 @@ struct OffsetTo : Offset<OffsetType, has_null>
return ret;
}
+
+ template <typename ...Ts>
+ bool serialize_serialize (hb_serialize_context_t *c, Ts&&... ds)
+ {
+ *this = 0;
+
+ Type* obj = c->push<Type> ();
+ bool ret = obj->serialize (c, hb_forward<Ts> (ds)...);
+
+ if (ret)
+ c->add_link (*this, c->pop_pack ());
+ else
+ c->pop_discard ();
+
+ return ret;
+ }
+
/* TODO: Somehow merge this with previous function into a serialize_dispatch(). */
/* Workaround clang bug: https://bugs.llvm.org/show_bug.cgi?id=23029
* Can't compile: whence = hb_serialize_context_t::Head followed by Ts&&...
@@ -378,7 +391,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
TRACE_SANITIZE (this);
if (unlikely (!c->check_struct (this))) return_trace (false);
if (unlikely (this->is_null ())) return_trace (true);
- if (unlikely (!c->check_range (base, *this))) return_trace (false);
+ if (unlikely ((const char *) base + (unsigned) *this < (const char *) base)) return_trace (false);
return_trace (true);
}
@@ -401,12 +414,14 @@ struct OffsetTo : Offset<OffsetType, has_null>
DEFINE_SIZE_STATIC (sizeof (OffsetType));
};
/* Partial specializations. */
-template <typename Type, bool has_null=true>
-using LOffsetTo = OffsetTo<Type, HBUINT32, has_null>;
-template <typename Type, typename OffsetType=HBUINT16>
-using NNOffsetTo = OffsetTo<Type, OffsetType, false>;
-template <typename Type>
-using LNNOffsetTo = LOffsetTo<Type, false>;
+template <typename Type, bool has_null=true> using Offset16To = OffsetTo<Type, HBUINT16, has_null>;
+template <typename Type, bool has_null=true> using Offset24To = OffsetTo<Type, HBUINT24, has_null>;
+template <typename Type, bool has_null=true> using Offset32To = OffsetTo<Type, HBUINT32, has_null>;
+
+template <typename Type, typename OffsetType> using NNOffsetTo = OffsetTo<Type, OffsetType, false>;
+template <typename Type> using NNOffset16To = Offset16To<Type, false>;
+template <typename Type> using NNOffset24To = Offset24To<Type, false>;
+template <typename Type> using NNOffset32To = Offset32To<Type, false>;
/*
@@ -453,8 +468,10 @@ struct UnsizedArrayOf
const Type &lsearch (unsigned int len, const T &x, const Type &not_found = Null (Type)) const
{ return *as_array (len).lsearch (x, &not_found); }
template <typename T>
- bool lfind (unsigned int len, const T &x, unsigned *pos = nullptr) const
- { return as_array (len).lfind (x, pos); }
+ bool lfind (unsigned int len, const T &x, unsigned int *i = nullptr,
+ hb_not_found_t not_found = HB_NOT_FOUND_DONT_STORE,
+ unsigned int to_store = (unsigned int) -1) const
+ { return as_array (len).lfind (x, i, not_found, to_store); }
void qsort (unsigned int len, unsigned int start = 0, unsigned int end = (unsigned int) -1)
{ as_array (len).qsort (start, end); }
@@ -462,7 +479,7 @@ struct UnsizedArrayOf
bool serialize (hb_serialize_context_t *c, unsigned int items_len)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend (*this, items_len))) return_trace (false);
+ if (unlikely (!c->extend (this, items_len))) return_trace (false);
return_trace (true);
}
template <typename Iterator,
@@ -513,11 +530,11 @@ struct UnsizedArrayOf
/* Unsized array of offset's */
template <typename Type, typename OffsetType, bool has_null=true>
-using UnsizedOffsetArrayOf = UnsizedArrayOf<OffsetTo<Type, OffsetType, has_null>>;
+using UnsizedArray16OfOffsetTo = UnsizedArrayOf<OffsetTo<Type, OffsetType, has_null>>;
/* Unsized array of offsets relative to the beginning of the array itself. */
template <typename Type, typename OffsetType, bool has_null=true>
-struct UnsizedOffsetListOf : UnsizedOffsetArrayOf<Type, OffsetType, has_null>
+struct UnsizedListOfOffset16To : UnsizedArray16OfOffsetTo<Type, OffsetType, has_null>
{
const Type& operator [] (int i_) const
{
@@ -538,7 +555,7 @@ struct UnsizedOffsetListOf : UnsizedOffsetArrayOf<Type, OffsetType, has_null>
bool sanitize (hb_sanitize_context_t *c, unsigned int count, Ts&&... ds) const
{
TRACE_SANITIZE (this);
- return_trace ((UnsizedOffsetArrayOf<Type, OffsetType, has_null>
+ return_trace ((UnsizedArray16OfOffsetTo<Type, OffsetType, has_null>
::sanitize (c, count, this, hb_forward<Ts> (ds)...)));
}
};
@@ -562,14 +579,14 @@ struct SortedUnsizedArrayOf : UnsizedArrayOf<Type>
{ return *as_array (len).bsearch (x, &not_found); }
template <typename T>
bool bfind (unsigned int len, const T &x, unsigned int *i = nullptr,
- hb_bfind_not_found_t not_found = HB_BFIND_NOT_FOUND_DONT_STORE,
+ hb_not_found_t not_found = HB_NOT_FOUND_DONT_STORE,
unsigned int to_store = (unsigned int) -1) const
{ return as_array (len).bfind (x, i, not_found, to_store); }
};
/* An array with a number of elements. */
-template <typename Type, typename LenType=HBUINT16>
+template <typename Type, typename LenType>
struct ArrayOf
{
typedef Type item_t;
@@ -617,17 +634,32 @@ struct ArrayOf
hb_array_t<Type> sub_array (unsigned int start_offset, unsigned int *count = nullptr /* IN/OUT */)
{ return as_array ().sub_array (start_offset, count); }
- hb_success_t serialize (hb_serialize_context_t *c, unsigned items_len)
+ template <typename T>
+ Type &lsearch (const T &x, Type &not_found = Crap (Type))
+ { return *as_array ().lsearch (x, &not_found); }
+ template <typename T>
+ const Type &lsearch (const T &x, const Type &not_found = Null (Type)) const
+ { return *as_array ().lsearch (x, &not_found); }
+ template <typename T>
+ bool lfind (const T &x, unsigned int *i = nullptr,
+ hb_not_found_t not_found = HB_NOT_FOUND_DONT_STORE,
+ unsigned int to_store = (unsigned int) -1) const
+ { return as_array ().lfind (x, i, not_found, to_store); }
+
+ void qsort (unsigned int start = 0, unsigned int end = (unsigned int) -1)
+ { as_array ().qsort (start, end); }
+
+ HB_NODISCARD bool serialize (hb_serialize_context_t *c, unsigned items_len)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
- c->check_assign (len, items_len);
- if (unlikely (!c->extend (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
+ c->check_assign (len, items_len, HB_SERIALIZE_ERROR_ARRAY_OVERFLOW);
+ if (unlikely (!c->extend (this))) return_trace (false);
return_trace (true);
}
template <typename Iterator,
hb_requires (hb_is_source_of (Iterator, Type))>
- hb_success_t serialize (hb_serialize_context_t *c, Iterator items)
+ HB_NODISCARD bool serialize (hb_serialize_context_t *c, Iterator items)
{
TRACE_SERIALIZE (this);
unsigned count = items.len ();
@@ -643,7 +675,7 @@ struct ArrayOf
{
TRACE_SERIALIZE (this);
len++;
- if (unlikely (!len || !c->extend (*this)))
+ if (unlikely (!len || !c->extend (this)))
{
len--;
return_trace (nullptr);
@@ -656,7 +688,7 @@ struct ArrayOf
TRACE_SERIALIZE (this);
auto *out = c->start_embed (this);
if (unlikely (!c->extend_min (out))) return_trace (nullptr);
- c->check_assign (out->len, len);
+ c->check_assign (out->len, len, HB_SERIALIZE_ERROR_ARRAY_OVERFLOW);
if (unlikely (!as_array ().copy (c))) return_trace (nullptr);
return_trace (out);
}
@@ -674,19 +706,6 @@ struct ArrayOf
return_trace (true);
}
- template <typename T>
- Type &lsearch (const T &x, Type &not_found = Crap (Type))
- { return *as_array ().lsearch (x, &not_found); }
- template <typename T>
- const Type &lsearch (const T &x, const Type &not_found = Null (Type)) const
- { return *as_array ().lsearch (x, &not_found); }
- template <typename T>
- bool lfind (const T &x, unsigned *pos = nullptr) const
- { return as_array ().lfind (x, pos); }
-
- void qsort (unsigned int start = 0, unsigned int end = (unsigned int) -1)
- { as_array ().qsort (start, end); }
-
bool sanitize_shallow (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -699,21 +718,18 @@ struct ArrayOf
public:
DEFINE_SIZE_ARRAY (sizeof (LenType), arrayZ);
};
-template <typename Type>
-using LArrayOf = ArrayOf<Type, HBUINT32>;
+template <typename Type> using Array16Of = ArrayOf<Type, HBUINT16>;
+template <typename Type> using Array32Of = ArrayOf<Type, HBUINT32>;
using PString = ArrayOf<HBUINT8, HBUINT8>;
/* Array of Offset's */
-template <typename Type>
-using OffsetArrayOf = ArrayOf<OffsetTo<Type, HBUINT16>>;
-template <typename Type>
-using LOffsetArrayOf = ArrayOf<OffsetTo<Type, HBUINT32>>;
-template <typename Type>
-using LOffsetLArrayOf = ArrayOf<OffsetTo<Type, HBUINT32>, HBUINT32>;
+template <typename Type> using Array16OfOffset16To = ArrayOf<OffsetTo<Type, HBUINT16>, HBUINT16>;
+template <typename Type> using Array16OfOffset32To = ArrayOf<OffsetTo<Type, HBUINT32>, HBUINT16>;
+template <typename Type> using Array32OfOffset32To = ArrayOf<OffsetTo<Type, HBUINT32>, HBUINT32>;
/* Array of offsets relative to the beginning of the array itself. */
template <typename Type>
-struct OffsetListOf : OffsetArrayOf<Type>
+struct List16OfOffset16To : Array16OfOffset16To<Type>
{
const Type& operator [] (int i_) const
{
@@ -731,7 +747,7 @@ struct OffsetListOf : OffsetArrayOf<Type>
bool subset (hb_subset_context_t *c) const
{
TRACE_SUBSET (this);
- struct OffsetListOf<Type> *out = c->serializer->embed (*this);
+ struct List16OfOffset16To<Type> *out = c->serializer->embed (*this);
if (unlikely (!out)) return_trace (false);
unsigned int count = this->len;
for (unsigned int i = 0; i < count; i++)
@@ -743,7 +759,7 @@ struct OffsetListOf : OffsetArrayOf<Type>
bool sanitize (hb_sanitize_context_t *c, Ts&&... ds) const
{
TRACE_SANITIZE (this);
- return_trace (OffsetArrayOf<Type>::sanitize (c, this, hb_forward<Ts> (ds)...));
+ return_trace (Array16OfOffset16To<Type>::sanitize (c, this, hb_forward<Ts> (ds)...));
}
};
@@ -786,9 +802,9 @@ struct HeadlessArrayOf
bool serialize (hb_serialize_context_t *c, unsigned int items_len)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
- c->check_assign (lenP1, items_len + 1);
- if (unlikely (!c->extend (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
+ c->check_assign (lenP1, items_len + 1, HB_SERIALIZE_ERROR_ARRAY_OVERFLOW);
+ if (unlikely (!c->extend (this))) return_trace (false);
return_trace (true);
}
template <typename Iterator,
@@ -859,6 +875,7 @@ struct ArrayOfM1
{
TRACE_SANITIZE (this);
if (unlikely (!sanitize_shallow (c))) return_trace (false);
+ if (!sizeof... (Ts) && hb_is_trivially_copyable (Type)) return_trace (true);
unsigned int count = lenM1 + 1;
for (unsigned int i = 0; i < count; i++)
if (unlikely (!c->dispatch (arrayZ[i], hb_forward<Ts> (ds)...)))
@@ -882,7 +899,7 @@ struct ArrayOfM1
};
/* An array with sorted elements. Supports binary searching. */
-template <typename Type, typename LenType=HBUINT16>
+template <typename Type, typename LenType>
struct SortedArrayOf : ArrayOf<Type, LenType>
{
hb_sorted_array_t< Type> as_array () { return hb_sorted_array (this->arrayZ, this->len); }
@@ -928,11 +945,14 @@ struct SortedArrayOf : ArrayOf<Type, LenType>
{ return *as_array ().bsearch (x, &not_found); }
template <typename T>
bool bfind (const T &x, unsigned int *i = nullptr,
- hb_bfind_not_found_t not_found = HB_BFIND_NOT_FOUND_DONT_STORE,
+ hb_not_found_t not_found = HB_NOT_FOUND_DONT_STORE,
unsigned int to_store = (unsigned int) -1) const
{ return as_array ().bfind (x, i, not_found, to_store); }
};
+template <typename Type> using SortedArray16Of = SortedArrayOf<Type, HBUINT16>;
+template <typename Type> using SortedArray32Of = SortedArrayOf<Type, HBUINT32>;
+
/*
* Binary-search arrays
*/
diff --git a/thirdparty/harfbuzz/src/hb-ot-cff-common.hh b/thirdparty/harfbuzz/src/hb-ot-cff-common.hh
index 864a27f458..eaaf5e12ec 100644
--- a/thirdparty/harfbuzz/src/hb-ot-cff-common.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-cff-common.hh
@@ -126,7 +126,7 @@ struct CFFIndex
else
{
/* serialize CFFIndex header */
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
this->count = byteArray.length;
this->offSize = offSize_;
if (unlikely (!c->allocate_size<HBUINT8> (offSize_ * (byteArray.length + 1))))
@@ -214,7 +214,7 @@ struct CFFIndex
unsigned off_size = calcOffSize (total);
/* serialize CFFIndex header */
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
this->count = it.len ();
this->offSize = off_size;
if (unlikely (!c->allocate_size<HBUINT8> (off_size * (it.len () + 1))))
@@ -335,7 +335,7 @@ struct CFFIndexOf : CFFIndex<COUNT>
{
TRACE_SERIALIZE (this);
/* serialize CFFIndex header */
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
this->count = dataArrayLen;
this->offSize = offSize_;
if (unlikely (!c->allocate_size<HBUINT8> (offSize_ * (dataArrayLen + 1))))
diff --git a/thirdparty/harfbuzz/src/hb-ot-cff1-table.hh b/thirdparty/harfbuzz/src/hb-ot-cff1-table.hh
index 7228f77727..5dd183e3a0 100644
--- a/thirdparty/harfbuzz/src/hb-ot-cff1-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-cff1-table.hh
@@ -187,7 +187,7 @@ struct Encoding
const hb_vector_t<code_pair_t>& supp_codes)
{
TRACE_SERIALIZE (this);
- Encoding *dest = c->extend_min (*this);
+ Encoding *dest = c->extend_min (this);
if (unlikely (!dest)) return_trace (false);
dest->format = format | ((supp_codes.length > 0) ? 0x80 : 0);
switch (format) {
@@ -457,7 +457,7 @@ struct Charset
const hb_vector_t<code_pair_t>& sid_ranges)
{
TRACE_SERIALIZE (this);
- Charset *dest = c->extend_min (*this);
+ Charset *dest = c->extend_min (this);
if (unlikely (!dest)) return_trace (false);
dest->format = format;
switch (format)
@@ -713,6 +713,7 @@ struct cff1_top_dict_opset_t : top_dict_opset_t<cff1_top_dict_val_t>
case OpCode_Notice:
case OpCode_Copyright:
case OpCode_FullName:
+ case OpCode_FontName:
case OpCode_FamilyName:
case OpCode_Weight:
case OpCode_PostScript:
@@ -1390,7 +1391,7 @@ struct cff1
public:
FixedVersion<HBUINT8> version; /* Version of CFF table. set to 0x0100u */
- OffsetTo<CFF1NameIndex, HBUINT8> nameIndex; /* headerSize = Offset to Name INDEX. */
+ NNOffsetTo<CFF1NameIndex, HBUINT8> nameIndex; /* headerSize = Offset to Name INDEX. */
HBUINT8 offSize; /* offset size (unused?) */
public:
diff --git a/thirdparty/harfbuzz/src/hb-ot-cmap-table.hh b/thirdparty/harfbuzz/src/hb-ot-cmap-table.hh
index 878e02ff17..b904bb46a8 100644
--- a/thirdparty/harfbuzz/src/hb-ot-cmap-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-cmap-table.hh
@@ -49,6 +49,12 @@ struct CmapSubtableFormat0
*glyph = gid;
return true;
}
+
+ unsigned get_language () const
+ {
+ return language;
+ }
+
void collect_unicodes (hb_set_t *out) const
{
for (unsigned int i = 0; i < 256; i++)
@@ -212,29 +218,24 @@ struct CmapSubtableFormat4
HBINT16 *idDelta,
unsigned segcount)
{
+ hb_hashmap_t<hb_codepoint_t, hb_codepoint_t> cp_to_gid;
+ + it | hb_sink (cp_to_gid);
+
HBUINT16 *idRangeOffset = c->allocate_size<HBUINT16> (HBUINT16::static_size * segcount);
if (unlikely (!c->check_success (idRangeOffset))) return nullptr;
if (unlikely ((char *)idRangeOffset - (char *)idDelta != (int) segcount * (int) HBINT16::static_size)) return nullptr;
- + hb_range (segcount)
- | hb_filter ([&] (const unsigned _) { return idDelta[_] == 0; })
- | hb_apply ([&] (const unsigned i)
- {
- idRangeOffset[i] = 2 * (c->start_embed<HBUINT16> () - idRangeOffset - i);
-
- + it
- | hb_filter ([&] (const hb_item_type<Iterator> _) { return _.first >= startCode[i] && _.first <= endCode[i]; })
- | hb_apply ([&] (const hb_item_type<Iterator> _)
- {
- HBUINT16 glyID;
- glyID = _.second;
- c->copy<HBUINT16> (glyID);
- })
- ;
-
-
- })
- ;
+ for (unsigned i : + hb_range (segcount)
+ | hb_filter ([&] (const unsigned _) { return idDelta[_] == 0; }))
+ {
+ idRangeOffset[i] = 2 * (c->start_embed<HBUINT16> () - idRangeOffset - i);
+ for (hb_codepoint_t cp = startCode[i]; cp <= endCode[i]; cp++)
+ {
+ HBUINT16 gid;
+ gid = cp_to_gid[cp];
+ c->copy<HBUINT16> (gid);
+ }
+ }
return idRangeOffset;
}
@@ -253,7 +254,7 @@ struct CmapSubtableFormat4
if (format4_iter.len () == 0) return;
unsigned table_initpos = c->length ();
- if (unlikely (!c->extend_min (*this))) return;
+ if (unlikely (!c->extend_min (this))) return;
this->format = 4;
//serialize endCode[]
@@ -276,7 +277,17 @@ struct CmapSubtableFormat4
HBUINT16 *idRangeOffset = serialize_rangeoffset_glyid (c, format4_iter, endCode, startCode, idDelta, segcount);
if (unlikely (!c->check_success (idRangeOffset))) return;
- if (unlikely (!c->check_assign(this->length, c->length () - table_initpos))) return;
+ this->length = c->length () - table_initpos;
+ if ((long long) this->length != (long long) c->length () - table_initpos)
+ {
+ // Length overflowed. Discard the current object before setting the error condition, otherwise
+ // discard is a noop which prevents the higher level code from reverting the serializer to the
+ // pre-error state in cmap4 overflow handling code.
+ c->pop_discard ();
+ c->err (HB_SERIALIZE_ERROR_INT_OVERFLOW);
+ return;
+ }
+
this->segCountX2 = segcount * 2;
this->entrySelector = hb_max (1u, hb_bit_storage (segcount)) - 1;
this->searchRange = 2 * (1u << this->entrySelector);
@@ -285,6 +296,11 @@ struct CmapSubtableFormat4
: 0;
}
+ unsigned get_language () const
+ {
+ return language;
+ }
+
struct accelerator_t
{
accelerator_t () {}
@@ -547,6 +563,12 @@ struct CmapSubtableTrimmed
*glyph = gid;
return true;
}
+
+ unsigned get_language () const
+ {
+ return language;
+ }
+
void collect_unicodes (hb_set_t *out) const
{
hb_codepoint_t start = startCharCode;
@@ -606,6 +628,11 @@ struct CmapSubtableLongSegmented
return true;
}
+ unsigned get_language () const
+ {
+ return language;
+ }
+
void collect_unicodes (hb_set_t *out, unsigned int num_glyphs) const
{
for (unsigned int i = 0; i < this->groups.len; i++)
@@ -670,7 +697,7 @@ struct CmapSubtableLongSegmented
HBUINT16 reserved; /* Reserved; set to 0. */
HBUINT32 length; /* Byte length of this subtable. */
HBUINT32 language; /* Ignore. */
- SortedArrayOf<CmapSubtableLongGroup, HBUINT32>
+ SortedArray32Of<CmapSubtableLongGroup>
groups; /* Groupings. */
public:
DEFINE_SIZE_ARRAY (16, groups);
@@ -691,7 +718,7 @@ struct CmapSubtableFormat12 : CmapSubtableLongSegmented<CmapSubtableFormat12>
{
if (it.len () == 0) return;
unsigned table_initpos = c->length ();
- if (unlikely (!c->extend_min (*this))) return;
+ if (unlikely (!c->extend_min (this))) return;
hb_codepoint_t startCharCode = 0xFFFF, endCharCode = 0xFFFF;
hb_codepoint_t glyphID = 0;
@@ -784,7 +811,7 @@ struct UnicodeValueRange
DEFINE_SIZE_STATIC (4);
};
-struct DefaultUVS : SortedArrayOf<UnicodeValueRange, HBUINT32>
+struct DefaultUVS : SortedArray32Of<UnicodeValueRange>
{
void collect_unicodes (hb_set_t *out) const
{
@@ -850,7 +877,9 @@ struct DefaultUVS : SortedArrayOf<UnicodeValueRange, HBUINT32>
}
else
{
- if (unlikely (!c->check_assign (out->len, (c->length () - init_len) / UnicodeValueRange::static_size))) return nullptr;
+ if (unlikely (!c->check_assign (out->len,
+ (c->length () - init_len) / UnicodeValueRange::static_size,
+ HB_SERIALIZE_ERROR_INT_OVERFLOW))) return nullptr;
return out;
}
}
@@ -876,23 +905,21 @@ struct UVSMapping
DEFINE_SIZE_STATIC (5);
};
-struct NonDefaultUVS : SortedArrayOf<UVSMapping, HBUINT32>
+struct NonDefaultUVS : SortedArray32Of<UVSMapping>
{
void collect_unicodes (hb_set_t *out) const
{
- unsigned int count = len;
- for (unsigned int i = 0; i < count; i++)
- out->add (arrayZ[i].unicodeValue);
+ for (const auto& a : as_array ())
+ out->add (a.unicodeValue);
}
void collect_mapping (hb_set_t *unicodes, /* OUT */
hb_map_t *mapping /* OUT */) const
{
- unsigned count = len;
- for (unsigned i = 0; i < count; i++)
+ for (const auto& a : as_array ())
{
- hb_codepoint_t unicode = arrayZ[i].unicodeValue;
- hb_codepoint_t glyphid = arrayZ[i].glyphID;
+ hb_codepoint_t unicode = a.unicodeValue;
+ hb_codepoint_t glyphid = a.glyphID;
unicodes->add (unicode);
mapping->set (unicode, glyphid);
}
@@ -1041,9 +1068,9 @@ struct VariationSelectorRecord
}
HBUINT24 varSelector; /* Variation selector. */
- LOffsetTo<DefaultUVS>
+ Offset32To<DefaultUVS>
defaultUVS; /* Offset to Default UVS Table. May be 0. */
- LOffsetTo<NonDefaultUVS>
+ Offset32To<NonDefaultUVS>
nonDefaultUVS; /* Offset to Non-Default UVS Table. May be 0. */
public:
DEFINE_SIZE_STATIC (11);
@@ -1058,9 +1085,8 @@ struct CmapSubtableFormat14
void collect_variation_selectors (hb_set_t *out) const
{
- unsigned int count = record.len;
- for (unsigned int i = 0; i < count; i++)
- out->add (record.arrayZ[i].varSelector);
+ for (const auto& a : record.as_array ())
+ out->add (a.varSelector);
}
void collect_variation_unicodes (hb_codepoint_t variation_selector,
hb_set_t *out) const
@@ -1076,7 +1102,7 @@ struct CmapSubtableFormat14
unsigned table_initpos = c->length ();
const char* init_tail = c->tail;
- if (unlikely (!c->extend_min (*this))) return;
+ if (unlikely (!c->extend_min (this))) return;
this->format = 14;
auto src_tbl = reinterpret_cast<const CmapSubtableFormat14*> (base);
@@ -1112,10 +1138,12 @@ struct CmapSubtableFormat14
return;
int tail_len = init_tail - c->tail;
- c->check_assign (this->length, c->length () - table_initpos + tail_len);
+ c->check_assign (this->length, c->length () - table_initpos + tail_len,
+ HB_SERIALIZE_ERROR_INT_OVERFLOW);
c->check_assign (this->record.len,
(c->length () - table_initpos - CmapSubtableFormat14::min_size) /
- VariationSelectorRecord::static_size);
+ VariationSelectorRecord::static_size,
+ HB_SERIALIZE_ERROR_INT_OVERFLOW);
/* Correct the incorrect write order by reversing the order of the variation
records array. */
@@ -1180,7 +1208,7 @@ struct CmapSubtableFormat14
protected:
HBUINT16 format; /* Format number is set to 14. */
HBUINT32 length; /* Byte length of this subtable. */
- SortedArrayOf<VariationSelectorRecord, HBUINT32>
+ SortedArray32Of<VariationSelectorRecord>
record; /* Variation selector records; sorted
* in increasing order of `varSelector'. */
public:
@@ -1235,6 +1263,20 @@ struct CmapSubtable
}
}
+ unsigned get_language () const
+ {
+ switch (u.format) {
+ case 0: return u.format0 .get_language ();
+ case 4: return u.format4 .get_language ();
+ case 6: return u.format6 .get_language ();
+ case 10: return u.format10.get_language ();
+ case 12: return u.format12.get_language ();
+ case 13: return u.format13.get_language ();
+ case 14:
+ default: return 0;
+ }
+ }
+
template<typename Iterator,
hb_requires (hb_is_iterator (Iterator))>
void serialize (hb_serialize_context_t *c,
@@ -1338,7 +1380,7 @@ struct EncodingRecord
HBUINT16 platformID; /* Platform ID. */
HBUINT16 encodingID; /* Platform-specific encoding ID. */
- LOffsetTo<CmapSubtable>
+ Offset32To<CmapSubtable>
subtable; /* Byte offset from beginning of table to the subtable for this encoding. */
public:
DEFINE_SIZE_STATIC (8);
@@ -1350,58 +1392,112 @@ struct cmap
template<typename Iterator, typename EncodingRecIter,
hb_requires (hb_is_iterator (EncodingRecIter))>
- void serialize (hb_serialize_context_t *c,
+ bool serialize (hb_serialize_context_t *c,
Iterator it,
EncodingRecIter encodingrec_iter,
const void *base,
- const hb_subset_plan_t *plan)
+ const hb_subset_plan_t *plan,
+ bool drop_format_4 = false)
{
- if (unlikely (!c->extend_min ((*this)))) return;
+ if (unlikely (!c->extend_min ((*this)))) return false;
this->version = 0;
unsigned format4objidx = 0, format12objidx = 0, format14objidx = 0;
+ auto snap = c->snapshot ();
for (const EncodingRecord& _ : encodingrec_iter)
{
+ if (c->in_error ())
+ return false;
+
unsigned format = (base+_.subtable).u.format;
- if (!plan->glyphs_requested->is_empty ())
+ if (format != 4 && format != 12 && format != 14) continue;
+
+ hb_set_t unicodes_set;
+ (base+_.subtable).collect_unicodes (&unicodes_set);
+
+ if (!drop_format_4 && format == 4)
{
- hb_set_t unicodes_set;
- hb_map_t cp_glyphid_map;
- (base+_.subtable).collect_mapping (&unicodes_set, &cp_glyphid_map);
-
- auto table_iter =
- + hb_zip (unicodes_set.iter(), unicodes_set.iter() | hb_map(cp_glyphid_map))
- | hb_filter (plan->_glyphset, hb_second)
- | hb_filter ([plan] (const hb_pair_t<hb_codepoint_t, hb_codepoint_t>& p)
- {
- return plan->unicodes->has (p.first) ||
- plan->glyphs_requested->has (p.second);
- })
- | hb_map ([plan] (const hb_pair_t<hb_codepoint_t, hb_codepoint_t>& p_org)
- {
- return hb_pair_t<hb_codepoint_t, hb_codepoint_t> (p_org.first, plan->glyph_map->get(p_org.second));
- })
- ;
-
- if (format == 4) c->copy (_, table_iter, 4u, base, plan, &format4objidx);
- else if (format == 12) c->copy (_, table_iter, 12u, base, plan, &format12objidx);
- else if (format == 14) c->copy (_, table_iter, 14u, base, plan, &format14objidx);
+ c->copy (_, + it | hb_filter (unicodes_set, hb_first), 4u, base, plan, &format4objidx);
+ if (c->in_error () && c->only_overflow ())
+ {
+ // cmap4 overflowed, reset and retry serialization without format 4 subtables.
+ c->revert (snap);
+ return serialize (c, it,
+ encodingrec_iter,
+ base,
+ plan,
+ true);
+ }
}
- /* when --gids option is not used, we iterate input unicodes instead of
- * all codepoints in each subtable, which is more efficient */
- else
+
+ else if (format == 12)
{
- hb_set_t unicodes_set;
- (base+_.subtable).collect_unicodes (&unicodes_set);
+ if (_can_drop (_, unicodes_set, base, + it | hb_map (hb_first), encodingrec_iter)) continue;
+ c->copy (_, + it | hb_filter (unicodes_set, hb_first), 12u, base, plan, &format12objidx);
+ }
+ else if (format == 14) c->copy (_, it, 14u, base, plan, &format14objidx);
+ }
+ c->check_assign(this->encodingRecord.len,
+ (c->length () - cmap::min_size)/EncodingRecord::static_size,
+ HB_SERIALIZE_ERROR_INT_OVERFLOW);
- if (format == 4) c->copy (_, + it | hb_filter (unicodes_set, hb_first), 4u, base, plan, &format4objidx);
- else if (format == 12) c->copy (_, + it | hb_filter (unicodes_set, hb_first), 12u, base, plan, &format12objidx);
- else if (format == 14) c->copy (_, it, 14u, base, plan, &format14objidx);
+ // Fail if format 4 was dropped and there is no cmap12.
+ return !drop_format_4 || format12objidx;
+ }
+
+ template<typename Iterator, typename EncodingRecordIterator,
+ hb_requires (hb_is_iterator (Iterator)),
+ hb_requires (hb_is_iterator (EncodingRecordIterator))>
+ bool _can_drop (const EncodingRecord& cmap12,
+ const hb_set_t& cmap12_unicodes,
+ const void* base,
+ Iterator subset_unicodes,
+ EncodingRecordIterator encoding_records)
+ {
+ for (auto cp : + subset_unicodes | hb_filter (cmap12_unicodes))
+ {
+ if (cp >= 0x10000) return false;
+ }
+
+ unsigned target_platform;
+ unsigned target_encoding;
+ unsigned target_language = (base+cmap12.subtable).get_language ();
+
+ if (cmap12.platformID == 0 && cmap12.encodingID == 4)
+ {
+ target_platform = 0;
+ target_encoding = 3;
+ } else if (cmap12.platformID == 3 && cmap12.encodingID == 10) {
+ target_platform = 3;
+ target_encoding = 1;
+ } else {
+ return false;
+ }
+
+ for (const auto& _ : encoding_records)
+ {
+ if (_.platformID != target_platform
+ || _.encodingID != target_encoding
+ || (base+_.subtable).get_language() != target_language)
+ continue;
+
+ hb_set_t sibling_unicodes;
+ (base+_.subtable).collect_unicodes (&sibling_unicodes);
+
+ auto cmap12 = + subset_unicodes | hb_filter (cmap12_unicodes);
+ auto sibling = + subset_unicodes | hb_filter (sibling_unicodes);
+ for (; cmap12 && sibling; cmap12++, sibling++)
+ {
+ unsigned a = *cmap12;
+ unsigned b = *sibling;
+ if (a != b) return false;
}
+
+ return !cmap12 && !sibling;
}
- c->check_assign(this->encodingRecord.len, (c->length () - cmap::min_size)/EncodingRecord::static_size);
+ return false;
}
void closure_glyphs (const hb_set_t *unicodes,
@@ -1468,8 +1564,8 @@ struct cmap
| hb_filter ([&] (const hb_pair_t<hb_codepoint_t, hb_codepoint_t> _)
{ return (_.second != HB_MAP_VALUE_INVALID); })
;
- cmap_prime->serialize (c->serializer, it, encodingrec_iter, this, c->plan);
- return_trace (true);
+
+ return_trace (cmap_prime->serialize (c->serializer, it, encodingrec_iter, this, c->plan));
}
const CmapSubtable *find_best_subtable (bool *symbol = nullptr) const
@@ -1697,7 +1793,7 @@ struct cmap
protected:
HBUINT16 version; /* Table version number (0). */
- SortedArrayOf<EncodingRecord>
+ SortedArray16Of<EncodingRecord>
encodingRecord; /* Encoding tables. */
public:
DEFINE_SIZE_ARRAY (4, encodingRecord);
diff --git a/thirdparty/harfbuzz/src/hb-ot-color-cbdt-table.hh b/thirdparty/harfbuzz/src/hb-ot-color-cbdt-table.hh
index e285acec3d..6c31d1b53e 100644
--- a/thirdparty/harfbuzz/src/hb-ot-color-cbdt-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-color-cbdt-table.hh
@@ -510,7 +510,7 @@ struct IndexSubtableRecord
HBGlyphID firstGlyphIndex;
HBGlyphID lastGlyphIndex;
- LOffsetTo<IndexSubtable> offsetToSubtable;
+ Offset32To<IndexSubtable> offsetToSubtable;
public:
DEFINE_SIZE_STATIC (8);
};
@@ -672,7 +672,7 @@ struct BitmapSizeTable
}
protected:
- LNNOffsetTo<IndexSubtableArray>
+ NNOffset32To<IndexSubtableArray>
indexSubtableArrayOffset;
HBUINT32 indexTablesSize;
HBUINT32 numberOfIndexSubtables;
@@ -697,7 +697,7 @@ struct BitmapSizeTable
struct GlyphBitmapDataFormat17
{
SmallGlyphMetrics glyphMetrics;
- LArrayOf<HBUINT8> data;
+ Array32Of<HBUINT8> data;
public:
DEFINE_SIZE_ARRAY (9, data);
};
@@ -705,14 +705,14 @@ struct GlyphBitmapDataFormat17
struct GlyphBitmapDataFormat18
{
BigGlyphMetrics glyphMetrics;
- LArrayOf<HBUINT8> data;
+ Array32Of<HBUINT8> data;
public:
DEFINE_SIZE_ARRAY (12, data);
};
struct GlyphBitmapDataFormat19
{
- LArrayOf<HBUINT8> data;
+ Array32Of<HBUINT8> data;
public:
DEFINE_SIZE_ARRAY (4, data);
};
@@ -738,7 +738,7 @@ struct CBLC
cbdt_prime->length,
HB_MEMORY_MODE_WRITABLE,
cbdt_prime->arrayZ,
- free);
+ hb_free);
cbdt_prime->init (); // Leak arrayZ to the blob.
bool ret = c->plan->add_table (HB_OT_TAG_CBDT, cbdt_prime_blob);
hb_blob_destroy (cbdt_prime_blob);
@@ -798,7 +798,7 @@ struct CBLC
protected:
FixedVersion<> version;
- LArrayOf<BitmapSizeTable> sizeTables;
+ Array32Of<BitmapSizeTable> sizeTables;
public:
DEFINE_SIZE_ARRAY (8, sizeTables);
};
diff --git a/thirdparty/harfbuzz/src/hb-ot-color-colr-table.hh b/thirdparty/harfbuzz/src/hb-ot-color-colr-table.hh
index e2a1ff4662..007ff3f47b 100644
--- a/thirdparty/harfbuzz/src/hb-ot-color-colr-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-color-colr-table.hh
@@ -29,6 +29,7 @@
#define HB_OT_COLOR_COLR_TABLE_HH
#include "hb-open-type.hh"
+#include "hb-ot-layout-common.hh"
/*
* COLR -- Color
@@ -36,9 +37,78 @@
*/
#define HB_OT_TAG_COLR HB_TAG('C','O','L','R')
+#ifndef COLRV1_MAX_NESTING_LEVEL
+#define COLRV1_MAX_NESTING_LEVEL 100
+#endif
+
+#ifndef COLRV1_ENABLE_SUBSETTING
+#define COLRV1_ENABLE_SUBSETTING 0
+#endif
namespace OT {
+struct COLR;
+struct hb_colrv1_closure_context_t :
+ hb_dispatch_context_t<hb_colrv1_closure_context_t>
+{
+ template <typename T>
+ return_t dispatch (const T &obj)
+ {
+ if (unlikely (nesting_level_left == 0))
+ return hb_empty_t ();
+
+ if (paint_visited (&obj))
+ return hb_empty_t ();
+
+ nesting_level_left--;
+ obj.closurev1 (this);
+ nesting_level_left++;
+ return hb_empty_t ();
+ }
+ static return_t default_return_value () { return hb_empty_t (); }
+
+ bool paint_visited (const void *paint)
+ {
+ hb_codepoint_t delta = (hb_codepoint_t) ((uintptr_t) paint - (uintptr_t) base);
+ if (visited_paint.has (delta))
+ return true;
+
+ visited_paint.add (delta);
+ return false;
+ }
+
+ const COLR* get_colr_table () const
+ { return reinterpret_cast<const COLR *> (base); }
+
+ void add_glyph (unsigned glyph_id)
+ { glyphs->add (glyph_id); }
+
+ void add_layer_indices (unsigned first_layer_index, unsigned num_of_layers)
+ { layer_indices->add_range (first_layer_index, first_layer_index + num_of_layers - 1); }
+
+ void add_palette_index (unsigned palette_index)
+ { palette_indices->add (palette_index); }
+
+ public:
+ const void *base;
+ hb_set_t visited_paint;
+ hb_set_t *glyphs;
+ hb_set_t *layer_indices;
+ hb_set_t *palette_indices;
+ unsigned nesting_level_left;
+
+ hb_colrv1_closure_context_t (const void *base_,
+ hb_set_t *glyphs_,
+ hb_set_t *layer_indices_,
+ hb_set_t *palette_indices_,
+ unsigned nesting_level_left_ = COLRV1_MAX_NESTING_LEVEL) :
+ base (base_),
+ glyphs (glyphs_),
+ layer_indices (layer_indices_),
+ palette_indices (palette_indices_),
+ nesting_level_left (nesting_level_left_)
+ {}
+};
struct LayerRecord
{
@@ -90,6 +160,707 @@ struct BaseGlyphRecord
DEFINE_SIZE_STATIC (6);
};
+template <typename T>
+struct Variable
+{
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this));
+ }
+
+ protected:
+ T value;
+ VarIdx varIdx;
+ public:
+ DEFINE_SIZE_STATIC (4 + T::static_size);
+};
+
+template <typename T>
+struct NoVariable
+{
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this));
+ }
+
+ T value;
+ public:
+ DEFINE_SIZE_STATIC (T::static_size);
+};
+
+// Color structures
+
+template <template<typename> class Var>
+struct ColorIndex
+{
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->embed (*this);
+ if (unlikely (!out)) return_trace (false);
+ return_trace (c->serializer->check_assign (out->paletteIndex, c->plan->colr_palettes->get (paletteIndex),
+ HB_SERIALIZE_ERROR_INT_OVERFLOW));
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this));
+ }
+
+ HBUINT16 paletteIndex;
+ Var<F2DOT14> alpha;
+ public:
+ DEFINE_SIZE_STATIC (2 + Var<F2DOT14>::static_size);
+};
+
+template <template<typename> class Var>
+struct ColorStop
+{
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ if (unlikely (!c->serializer->embed (stopOffset))) return_trace (false);
+ return_trace (color.subset (c));
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this));
+ }
+
+ Var<F2DOT14> stopOffset;
+ ColorIndex<Var> color;
+ public:
+ DEFINE_SIZE_STATIC (Var<F2DOT14>::static_size + ColorIndex<Var>::static_size);
+};
+
+struct Extend : HBUINT8
+{
+ enum {
+ EXTEND_PAD = 0,
+ EXTEND_REPEAT = 1,
+ EXTEND_REFLECT = 2,
+ };
+ public:
+ DEFINE_SIZE_STATIC (1);
+};
+
+template <template<typename> class Var>
+struct ColorLine
+{
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->start_embed (this);
+ if (unlikely (!out)) return_trace (false);
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
+
+ if (!c->serializer->check_assign (out->extend, extend, HB_SERIALIZE_ERROR_INT_OVERFLOW)) return_trace (false);
+ if (!c->serializer->check_assign (out->stops.len, stops.len, HB_SERIALIZE_ERROR_ARRAY_OVERFLOW)) return_trace (false);
+
+ for (const auto& stop : stops.iter ())
+ {
+ if (!stop.subset (c)) return_trace (false);
+ }
+ return_trace (true);
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) &&
+ stops.sanitize (c));
+ }
+
+ Extend extend;
+ Array16Of<ColorStop<Var>> stops;
+ public:
+ DEFINE_SIZE_ARRAY_SIZED (3, stops);
+};
+
+// Composition modes
+
+// Compositing modes are taken from https://www.w3.org/TR/compositing-1/
+// NOTE: a brief audit of major implementations suggests most support most
+// or all of the specified modes.
+struct CompositeMode : HBUINT8
+{
+ enum {
+ // Porter-Duff modes
+ // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators
+ COMPOSITE_CLEAR = 0, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_clear
+ COMPOSITE_SRC = 1, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_src
+ COMPOSITE_DEST = 2, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_dst
+ COMPOSITE_SRC_OVER = 3, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_srcover
+ COMPOSITE_DEST_OVER = 4, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_dstover
+ COMPOSITE_SRC_IN = 5, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_srcin
+ COMPOSITE_DEST_IN = 6, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_dstin
+ COMPOSITE_SRC_OUT = 7, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_srcout
+ COMPOSITE_DEST_OUT = 8, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_dstout
+ COMPOSITE_SRC_ATOP = 9, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_srcatop
+ COMPOSITE_DEST_ATOP = 10, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_dstatop
+ COMPOSITE_XOR = 11, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_xor
+ COMPOSITE_PLUS = 12, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_plus
+
+ // Blend modes
+ // https://www.w3.org/TR/compositing-1/#blending
+ COMPOSITE_SCREEN = 13, // https://www.w3.org/TR/compositing-1/#blendingscreen
+ COMPOSITE_OVERLAY = 14, // https://www.w3.org/TR/compositing-1/#blendingoverlay
+ COMPOSITE_DARKEN = 15, // https://www.w3.org/TR/compositing-1/#blendingdarken
+ COMPOSITE_LIGHTEN = 16, // https://www.w3.org/TR/compositing-1/#blendinglighten
+ COMPOSITE_COLOR_DODGE = 17, // https://www.w3.org/TR/compositing-1/#blendingcolordodge
+ COMPOSITE_COLOR_BURN = 18, // https://www.w3.org/TR/compositing-1/#blendingcolorburn
+ COMPOSITE_HARD_LIGHT = 19, // https://www.w3.org/TR/compositing-1/#blendinghardlight
+ COMPOSITE_SOFT_LIGHT = 20, // https://www.w3.org/TR/compositing-1/#blendingsoftlight
+ COMPOSITE_DIFFERENCE = 21, // https://www.w3.org/TR/compositing-1/#blendingdifference
+ COMPOSITE_EXCLUSION = 22, // https://www.w3.org/TR/compositing-1/#blendingexclusion
+ COMPOSITE_MULTIPLY = 23, // https://www.w3.org/TR/compositing-1/#blendingmultiply
+
+ // Modes that, uniquely, do not operate on components
+ // https://www.w3.org/TR/compositing-1/#blendingnonseparable
+ COMPOSITE_HSL_HUE = 24, // https://www.w3.org/TR/compositing-1/#blendinghue
+ COMPOSITE_HSL_SATURATION = 25, // https://www.w3.org/TR/compositing-1/#blendingsaturation
+ COMPOSITE_HSL_COLOR = 26, // https://www.w3.org/TR/compositing-1/#blendingcolor
+ COMPOSITE_HSL_LUMINOSITY = 27, // https://www.w3.org/TR/compositing-1/#blendingluminosity
+ };
+ public:
+ DEFINE_SIZE_STATIC (1);
+};
+
+template <template<typename> class Var>
+struct Affine2x3
+{
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this));
+ }
+
+ Var<HBFixed> xx;
+ Var<HBFixed> yx;
+ Var<HBFixed> xy;
+ Var<HBFixed> yy;
+ Var<HBFixed> dx;
+ Var<HBFixed> dy;
+ public:
+ DEFINE_SIZE_STATIC (6 * Var<HBFixed>::static_size);
+};
+
+struct PaintColrLayers
+{
+ void closurev1 (hb_colrv1_closure_context_t* c) const;
+
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->embed (this);
+ if (unlikely (!out)) return_trace (false);
+ return_trace (c->serializer->check_assign (out->firstLayerIndex, c->plan->colrv1_layers->get (firstLayerIndex),
+ HB_SERIALIZE_ERROR_INT_OVERFLOW));
+
+ return_trace (true);
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this));
+ }
+
+ HBUINT8 format; /* format = 1 */
+ HBUINT8 numLayers;
+ HBUINT32 firstLayerIndex; /* index into COLRv1::layersV1 */
+ public:
+ DEFINE_SIZE_STATIC (6);
+};
+
+template <template<typename> class Var>
+struct PaintSolid
+{
+ void closurev1 (hb_colrv1_closure_context_t* c) const
+ { c->add_palette_index (color.paletteIndex); }
+
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ if (unlikely (!c->serializer->embed (format))) return_trace (false);
+ return_trace (color.subset (c));
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this));
+ }
+
+ HBUINT8 format; /* format = 2(noVar) or 3(Var)*/
+ ColorIndex<Var> color;
+ public:
+ DEFINE_SIZE_STATIC (1 + ColorIndex<Var>::static_size);
+};
+
+template <template<typename> class Var>
+struct PaintLinearGradient
+{
+ void closurev1 (hb_colrv1_closure_context_t* c) const
+ {
+ for (const auto &stop : (this+colorLine).stops.iter ())
+ c->add_palette_index (stop.color.paletteIndex);
+ }
+
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->embed (this);
+ if (unlikely (!out)) return_trace (false);
+
+ return_trace (out->colorLine.serialize_subset (c, colorLine, this));
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) && colorLine.sanitize (c, this));
+ }
+
+ HBUINT8 format; /* format = 4(noVar) or 5 (Var) */
+ Offset24To<ColorLine<Var>> colorLine; /* Offset (from beginning of PaintLinearGradient
+ * table) to ColorLine subtable. */
+ Var<FWORD> x0;
+ Var<FWORD> y0;
+ Var<FWORD> x1;
+ Var<FWORD> y1;
+ Var<FWORD> x2;
+ Var<FWORD> y2;
+ public:
+ DEFINE_SIZE_STATIC (4 + 6 * Var<FWORD>::static_size);
+};
+
+template <template<typename> class Var>
+struct PaintRadialGradient
+{
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->embed (this);
+ if (unlikely (!out)) return_trace (false);
+
+ return_trace (out->colorLine.serialize_subset (c, colorLine, this));
+ }
+
+ void closurev1 (hb_colrv1_closure_context_t* c) const
+ {
+ for (const auto &stop : (this+colorLine).stops.iter ())
+ c->add_palette_index (stop.color.paletteIndex);
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) && colorLine.sanitize (c, this));
+ }
+
+ HBUINT8 format; /* format = 6(noVar) or 7 (Var) */
+ Offset24To<ColorLine<Var>> colorLine; /* Offset (from beginning of PaintRadialGradient
+ * table) to ColorLine subtable. */
+ Var<FWORD> x0;
+ Var<FWORD> y0;
+ Var<UFWORD> radius0;
+ Var<FWORD> x1;
+ Var<FWORD> y1;
+ Var<UFWORD> radius1;
+ public:
+ DEFINE_SIZE_STATIC (4 + 6 * Var<FWORD>::static_size);
+};
+
+template <template<typename> class Var>
+struct PaintSweepGradient
+{
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->embed (this);
+ if (unlikely (!out)) return_trace (false);
+
+ return_trace (out->colorLine.serialize_subset (c, colorLine, this));
+ }
+
+ void closurev1 (hb_colrv1_closure_context_t* c) const
+ {
+ for (const auto &stop : (this+colorLine).stops.iter ())
+ c->add_palette_index (stop.color.paletteIndex);
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) && colorLine.sanitize (c, this));
+ }
+
+ HBUINT8 format; /* format = 8(noVar) or 9 (Var) */
+ Offset24To<ColorLine<Var>> colorLine; /* Offset (from beginning of PaintSweepGradient
+ * table) to ColorLine subtable. */
+ Var<FWORD> centerX;
+ Var<FWORD> centerY;
+ Var<HBFixed> startAngle;
+ Var<HBFixed> endAngle;
+ public:
+ DEFINE_SIZE_STATIC (2 * Var<FWORD>::static_size + 2 * Var<HBFixed>::static_size);
+};
+
+struct Paint;
+// Paint a non-COLR glyph, filled as indicated by paint.
+struct PaintGlyph
+{
+ void closurev1 (hb_colrv1_closure_context_t* c) const;
+
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->embed (this);
+ if (unlikely (!out)) return_trace (false);
+
+ if (! c->serializer->check_assign (out->gid, c->plan->glyph_map->get (gid),
+ HB_SERIALIZE_ERROR_INT_OVERFLOW))
+ return_trace (false);
+
+ return_trace (out->paint.serialize_subset (c, paint, this));
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) && paint.sanitize (c, this));
+ }
+
+ HBUINT8 format; /* format = 10 */
+ Offset24To<Paint> paint; /* Offset (from beginning of PaintGlyph table) to Paint subtable. */
+ HBUINT16 gid;
+ public:
+ DEFINE_SIZE_STATIC (6);
+};
+
+struct PaintColrGlyph
+{
+ void closurev1 (hb_colrv1_closure_context_t* c) const;
+
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->embed (this);
+ if (unlikely (!out)) return_trace (false);
+
+ return_trace (c->serializer->check_assign (out->gid, c->plan->glyph_map->get (gid),
+ HB_SERIALIZE_ERROR_INT_OVERFLOW));
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this));
+ }
+
+ HBUINT8 format; /* format = 11 */
+ HBUINT16 gid;
+ public:
+ DEFINE_SIZE_STATIC (3);
+};
+
+template <template<typename> class Var>
+struct PaintTransform
+{
+ HB_INTERNAL void closurev1 (hb_colrv1_closure_context_t* c) const;
+
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->embed (this);
+ if (unlikely (!out)) return_trace (false);
+
+ return_trace (out->src.serialize_subset (c, src, this));
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) && src.sanitize (c, this));
+ }
+
+ HBUINT8 format; /* format = 12(noVar) or 13 (Var) */
+ Offset24To<Paint> src; /* Offset (from beginning of PaintTransform table) to Paint subtable. */
+ Affine2x3<Var> transform;
+ public:
+ DEFINE_SIZE_STATIC (4 + Affine2x3<Var>::static_size);
+};
+
+template <template<typename> class Var>
+struct PaintTranslate
+{
+ HB_INTERNAL void closurev1 (hb_colrv1_closure_context_t* c) const;
+
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->embed (this);
+ if (unlikely (!out)) return_trace (false);
+
+ return_trace (out->src.serialize_subset (c, src, this));
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) && src.sanitize (c, this));
+ }
+
+ HBUINT8 format; /* format = 14(noVar) or 15 (Var) */
+ Offset24To<Paint> src; /* Offset (from beginning of PaintTranslate table) to Paint subtable. */
+ Var<HBFixed> dx;
+ Var<HBFixed> dy;
+ public:
+ DEFINE_SIZE_STATIC (4 + Var<HBFixed>::static_size);
+};
+
+template <template<typename> class Var>
+struct PaintRotate
+{
+ HB_INTERNAL void closurev1 (hb_colrv1_closure_context_t* c) const;
+
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->embed (this);
+ if (unlikely (!out)) return_trace (false);
+
+ return_trace (out->src.serialize_subset (c, src, this));
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) && src.sanitize (c, this));
+ }
+
+ HBUINT8 format; /* format = 16 (noVar) or 17(Var) */
+ Offset24To<Paint> src; /* Offset (from beginning of PaintRotate table) to Paint subtable. */
+ Var<HBFixed> angle;
+ Var<HBFixed> centerX;
+ Var<HBFixed> centerY;
+ public:
+ DEFINE_SIZE_STATIC (4 + 3 * Var<HBFixed>::static_size);
+};
+
+template <template<typename> class Var>
+struct PaintSkew
+{
+ HB_INTERNAL void closurev1 (hb_colrv1_closure_context_t* c) const;
+
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->embed (this);
+ if (unlikely (!out)) return_trace (false);
+
+ return_trace (out->src.serialize_subset (c, src, this));
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) && src.sanitize (c, this));
+ }
+
+ HBUINT8 format; /* format = 18(noVar) or 19 (Var) */
+ Offset24To<Paint> src; /* Offset (from beginning of PaintSkew table) to Paint subtable. */
+ Var<HBFixed> xSkewAngle;
+ Var<HBFixed> ySkewAngle;
+ Var<HBFixed> centerX;
+ Var<HBFixed> centerY;
+ public:
+ DEFINE_SIZE_STATIC (4 + 4 * Var<HBFixed>::static_size);
+};
+
+struct PaintComposite
+{
+ void closurev1 (hb_colrv1_closure_context_t* c) const;
+
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->embed (this);
+ if (unlikely (!out)) return_trace (false);
+
+ if (!out->src.serialize_subset (c, src, this)) return_trace (false);
+ return_trace (out->backdrop.serialize_subset (c, backdrop, this));
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (c->check_struct (this) &&
+ src.sanitize (c, this) &&
+ backdrop.sanitize (c, this));
+ }
+
+ HBUINT8 format; /* format = 20 */
+ Offset24To<Paint> src; /* Offset (from beginning of PaintComposite table) to source Paint subtable. */
+ CompositeMode mode; /* If mode is unrecognized use COMPOSITE_CLEAR */
+ Offset24To<Paint> backdrop; /* Offset (from beginning of PaintComposite table) to backdrop Paint subtable. */
+ public:
+ DEFINE_SIZE_STATIC (8);
+};
+
+struct Paint
+{
+ template <typename context_t, typename ...Ts>
+ typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
+ {
+ TRACE_DISPATCH (this, u.format);
+ if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
+ switch (u.format) {
+ case 1: return_trace (c->dispatch (u.paintformat1, hb_forward<Ts> (ds)...));
+ case 2: return_trace (c->dispatch (u.paintformat2, hb_forward<Ts> (ds)...));
+ case 3: return_trace (c->dispatch (u.paintformat3, hb_forward<Ts> (ds)...));
+ case 4: return_trace (c->dispatch (u.paintformat4, hb_forward<Ts> (ds)...));
+ case 5: return_trace (c->dispatch (u.paintformat5, hb_forward<Ts> (ds)...));
+ case 6: return_trace (c->dispatch (u.paintformat6, hb_forward<Ts> (ds)...));
+ case 7: return_trace (c->dispatch (u.paintformat7, hb_forward<Ts> (ds)...));
+ case 8: return_trace (c->dispatch (u.paintformat8, hb_forward<Ts> (ds)...));
+ case 9: return_trace (c->dispatch (u.paintformat9, hb_forward<Ts> (ds)...));
+ case 10: return_trace (c->dispatch (u.paintformat10, hb_forward<Ts> (ds)...));
+ case 11: return_trace (c->dispatch (u.paintformat11, hb_forward<Ts> (ds)...));
+ case 12: return_trace (c->dispatch (u.paintformat12, hb_forward<Ts> (ds)...));
+ case 13: return_trace (c->dispatch (u.paintformat13, hb_forward<Ts> (ds)...));
+ case 14: return_trace (c->dispatch (u.paintformat14, hb_forward<Ts> (ds)...));
+ case 15: return_trace (c->dispatch (u.paintformat15, hb_forward<Ts> (ds)...));
+ case 16: return_trace (c->dispatch (u.paintformat16, hb_forward<Ts> (ds)...));
+ case 17: return_trace (c->dispatch (u.paintformat17, hb_forward<Ts> (ds)...));
+ case 18: return_trace (c->dispatch (u.paintformat18, hb_forward<Ts> (ds)...));
+ case 19: return_trace (c->dispatch (u.paintformat19, hb_forward<Ts> (ds)...));
+ case 20: return_trace (c->dispatch (u.paintformat20, hb_forward<Ts> (ds)...));
+ default:return_trace (c->default_return_value ());
+ }
+ }
+
+ protected:
+ union {
+ HBUINT8 format;
+ PaintColrLayers paintformat1;
+ PaintSolid<NoVariable> paintformat2;
+ PaintSolid<Variable> paintformat3;
+ PaintLinearGradient<NoVariable> paintformat4;
+ PaintLinearGradient<Variable> paintformat5;
+ PaintRadialGradient<NoVariable> paintformat6;
+ PaintRadialGradient<Variable> paintformat7;
+ PaintSweepGradient<NoVariable> paintformat8;
+ PaintSweepGradient<Variable> paintformat9;
+ PaintGlyph paintformat10;
+ PaintColrGlyph paintformat11;
+ PaintTransform<NoVariable> paintformat12;
+ PaintTransform<Variable> paintformat13;
+ PaintTranslate<NoVariable> paintformat14;
+ PaintTranslate<Variable> paintformat15;
+ PaintRotate<NoVariable> paintformat16;
+ PaintRotate<Variable> paintformat17;
+ PaintSkew<NoVariable> paintformat18;
+ PaintSkew<Variable> paintformat19;
+ PaintComposite paintformat20;
+ } u;
+};
+
+struct BaseGlyphV1Record
+{
+ int cmp (hb_codepoint_t g) const
+ { return g < glyphId ? -1 : g > glyphId ? 1 : 0; }
+
+ bool serialize (hb_serialize_context_t *s, const hb_map_t* glyph_map,
+ const void* src_base, hb_subset_context_t *c) const
+ {
+ TRACE_SERIALIZE (this);
+ auto *out = s->embed (this);
+ if (unlikely (!out)) return_trace (false);
+ if (!s->check_assign (out->glyphId, glyph_map->get (glyphId),
+ HB_SERIALIZE_ERROR_INT_OVERFLOW))
+ return_trace (false);
+
+ return_trace (out->paint.serialize_subset (c, paint, src_base));
+ }
+
+ bool sanitize (hb_sanitize_context_t *c, const void *base) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (likely (c->check_struct (this) && paint.sanitize (c, base)));
+ }
+
+ public:
+ HBGlyphID glyphId; /* Glyph ID of reference glyph */
+ Offset32To<Paint> paint; /* Offset (from beginning of BaseGlyphV1Record array) to Paint,
+ * Typically PaintColrLayers */
+ public:
+ DEFINE_SIZE_STATIC (6);
+};
+
+struct BaseGlyphV1List : SortedArray32Of<BaseGlyphV1Record>
+{
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->start_embed (this);
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
+ const hb_set_t* glyphset = c->plan->_glyphset;
+
+ for (const auto& _ : as_array ())
+ {
+ unsigned gid = _.glyphId;
+ if (!glyphset->has (gid)) continue;
+
+ if (_.serialize (c->serializer, c->plan->glyph_map, this, c)) out->len++;
+ else return_trace (false);
+ }
+
+ return_trace (out->len != 0);
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (SortedArray32Of<BaseGlyphV1Record>::sanitize (c, this));
+ }
+};
+
+struct LayerV1List : Array32OfOffset32To<Paint>
+{
+ const Paint& get_paint (unsigned i) const
+ { return this+(*this)[i]; }
+
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->start_embed (this);
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
+
+ for (const auto& _ : + hb_enumerate (*this)
+ | hb_filter (c->plan->colrv1_layers, hb_first))
+
+ {
+ auto *o = out->serialize_append (c->serializer);
+ if (unlikely (!o) || !o->serialize_subset (c, _.second, this))
+ return_trace (false);
+ }
+ return_trace (true);
+ }
+
+ bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (Array32OfOffset32To<Paint>::sanitize (c, this));
+ }
+};
+
struct COLR
{
static constexpr hb_tag_t tableTag = HB_OT_TAG_COLR;
@@ -131,6 +902,15 @@ struct COLR
hb_set_t *related_ids /* OUT */) const
{ colr->closure_glyphs (glyph, related_ids); }
+ void closure_V0palette_indices (const hb_set_t *glyphs,
+ hb_set_t *palettes /* OUT */) const
+ { colr->closure_V0palette_indices (glyphs, palettes); }
+
+ void closure_forV1 (hb_set_t *glyphset,
+ hb_set_t *layer_indices,
+ hb_set_t *palette_indices) const
+ { colr->closure_forV1 (glyphset, layer_indices, palette_indices); }
+
private:
hb_blob_ptr_t<COLR> colr;
};
@@ -147,21 +927,70 @@ struct COLR
related_ids->add_array (&glyph_layers[0].glyphId, glyph_layers.length, LayerRecord::min_size);
}
+ void closure_V0palette_indices (const hb_set_t *glyphs,
+ hb_set_t *palettes /* OUT */) const
+ {
+ if (!numBaseGlyphs || !numLayers) return;
+ hb_array_t<const BaseGlyphRecord> baseGlyphs = (this+baseGlyphsZ).as_array (numBaseGlyphs);
+ hb_array_t<const LayerRecord> all_layers = (this+layersZ).as_array (numLayers);
+
+ for (const BaseGlyphRecord record : baseGlyphs)
+ {
+ if (!glyphs->has (record.glyphId)) continue;
+ hb_array_t<const LayerRecord> glyph_layers = all_layers.sub_array (record.firstLayerIdx,
+ record.numLayers);
+ for (const LayerRecord layer : glyph_layers)
+ palettes->add (layer.colorIdx);
+ }
+ }
+
+ void closure_forV1 (hb_set_t *glyphset,
+ hb_set_t *layer_indices,
+ hb_set_t *palette_indices) const
+ {
+ if (version != 1) return;
+ hb_set_t visited_glyphs;
+
+ hb_colrv1_closure_context_t c (this, &visited_glyphs, layer_indices, palette_indices);
+ const BaseGlyphV1List &baseglyphV1_records = this+baseGlyphsV1List;
+
+ for (const BaseGlyphV1Record &baseglyphV1record: baseglyphV1_records.iter ())
+ {
+ unsigned gid = baseglyphV1record.glyphId;
+ if (!glyphset->has (gid)) continue;
+
+ const Paint &paint = &baseglyphV1_records+baseglyphV1record.paint;
+ paint.dispatch (&c);
+ }
+ hb_set_union (glyphset, &visited_glyphs);
+ }
+
+ const LayerV1List& get_layerV1List () const
+ { return (this+layersV1); }
+
+ const BaseGlyphV1List& get_baseglyphV1List () const
+ { return (this+baseGlyphsV1List); }
+
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- return_trace (likely (c->check_struct (this) &&
- (this+baseGlyphsZ).sanitize (c, numBaseGlyphs) &&
- (this+layersZ).sanitize (c, numLayers)));
+ return_trace (c->check_struct (this) &&
+ (this+baseGlyphsZ).sanitize (c, numBaseGlyphs) &&
+ (this+layersZ).sanitize (c, numLayers) &&
+ (version == 0 ||
+ (COLRV1_ENABLE_SUBSETTING && version == 1 &&
+ baseGlyphsV1List.sanitize (c, this) &&
+ layersV1.sanitize (c, this) &&
+ varStore.sanitize (c, this))));
}
template<typename BaseIterator, typename LayerIterator,
hb_requires (hb_is_iterator (BaseIterator)),
hb_requires (hb_is_iterator (LayerIterator))>
- bool serialize (hb_serialize_context_t *c,
- unsigned version,
- BaseIterator base_it,
- LayerIterator layer_it)
+ bool serialize_V0 (hb_serialize_context_t *c,
+ unsigned version,
+ BaseIterator base_it,
+ LayerIterator layer_it)
{
TRACE_SERIALIZE (this);
if (unlikely (base_it.len () != layer_it.len ()))
@@ -171,6 +1000,12 @@ struct COLR
this->version = version;
numLayers = 0;
numBaseGlyphs = base_it.len ();
+ if (base_it.len () == 0)
+ {
+ baseGlyphsZ = 0;
+ layersZ = 0;
+ return_trace (true);
+ }
baseGlyphsZ = COLR::min_size;
layersZ = COLR::min_size + numBaseGlyphs * BaseGlyphRecord::min_size;
@@ -198,6 +1033,14 @@ struct COLR
return record;
}
+ const BaseGlyphV1Record* get_base_glyphV1_record (hb_codepoint_t gid) const
+ {
+ const BaseGlyphV1Record* record = &(this+baseGlyphsV1List).bsearch ((unsigned) gid);
+ if ((record && (hb_codepoint_t) record->glyphId != gid))
+ record = nullptr;
+ return record;
+ }
+
bool subset (hb_subset_context_t *c) const
{
TRACE_SUBSET (this);
@@ -245,6 +1088,7 @@ struct COLR
if (unlikely (!c->plan->new_gid_for_old_gid (out_layers[i].glyphId, &new_gid)))
return hb_pair_t<bool, hb_vector_t<LayerRecord>> (false, out_layers);
out_layers[i].glyphId = new_gid;
+ out_layers[i].colorIdx = c->plan->colr_palettes->get (layers[i].colorIdx);
}
return hb_pair_t<bool, hb_vector_t<LayerRecord>> (true, out_layers);
@@ -253,23 +1097,45 @@ struct COLR
| hb_map_retains_sorting (hb_second)
;
- if (unlikely (!base_it || !layer_it || base_it.len () != layer_it.len ()))
+ if (version == 0 && (!base_it || !layer_it))
return_trace (false);
COLR *colr_prime = c->serializer->start_embed<COLR> ();
- return_trace (colr_prime->serialize (c->serializer, version, base_it, layer_it));
+ bool ret = colr_prime->serialize_V0 (c->serializer, version, base_it, layer_it);
+
+ if (version == 0) return_trace (ret);
+ auto snap = c->serializer->snapshot ();
+ if (!c->serializer->allocate_size<void> (3 * HBUINT32::static_size)) return_trace (false);
+ if (!colr_prime->baseGlyphsV1List.serialize_subset (c, baseGlyphsV1List, this))
+ {
+ if (c->serializer->in_error ()) return_trace (false);
+ //no more COLRv1 glyphs: downgrade to version 0
+ c->serializer->revert (snap);
+ colr_prime->version = 0;
+ return_trace (true);
+ }
+
+ if (!colr_prime->layersV1.serialize_subset (c, layersV1, this)) return_trace (false);
+
+ colr_prime->varStore = 0;
+ //TODO: subset varStore once it's implemented in fonttools
+ return_trace (true);
}
protected:
HBUINT16 version; /* Table version number (starts at 0). */
HBUINT16 numBaseGlyphs; /* Number of Base Glyph Records. */
- LNNOffsetTo<SortedUnsizedArrayOf<BaseGlyphRecord>>
+ NNOffset32To<SortedUnsizedArrayOf<BaseGlyphRecord>>
baseGlyphsZ; /* Offset to Base Glyph records. */
- LNNOffsetTo<UnsizedArrayOf<LayerRecord>>
+ NNOffset32To<UnsizedArrayOf<LayerRecord>>
layersZ; /* Offset to Layer Records. */
HBUINT16 numLayers; /* Number of Layer Records. */
+ // Version-1 additions
+ Offset32To<BaseGlyphV1List> baseGlyphsV1List;
+ Offset32To<LayerV1List> layersV1;
+ Offset32To<VariationStore> varStore;
public:
- DEFINE_SIZE_STATIC (14);
+ DEFINE_SIZE_MIN (14);
};
} /* namespace OT */
diff --git a/thirdparty/harfbuzz/src/hb-ot-color-colrv1-closure.hh b/thirdparty/harfbuzz/src/hb-ot-color-colrv1-closure.hh
new file mode 100644
index 0000000000..4124efe0b1
--- /dev/null
+++ b/thirdparty/harfbuzz/src/hb-ot-color-colrv1-closure.hh
@@ -0,0 +1,101 @@
+/*
+ * Copyright © 2018 Ebrahim Byagowi
+ * Copyright © 2020 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ */
+
+#ifndef HB_OT_COLR_COLRV1_CLOSURE_HH
+#define HB_OT_COLR_COLRV1_CLOSURE_HH
+
+#include "hb-open-type.hh"
+#include "hb-ot-layout-common.hh"
+#include "hb-ot-color-colr-table.hh"
+
+/*
+ * COLR -- Color
+ * https://docs.microsoft.com/en-us/typography/opentype/spec/colr
+ */
+namespace OT {
+
+HB_INTERNAL void PaintColrLayers::closurev1 (hb_colrv1_closure_context_t* c) const
+{
+ c->add_layer_indices (firstLayerIndex, numLayers);
+ const LayerV1List &paint_offset_lists = c->get_colr_table ()->get_layerV1List ();
+ for (unsigned i = firstLayerIndex; i < firstLayerIndex + numLayers; i++)
+ {
+ const Paint &paint = hb_addressof (paint_offset_lists) + paint_offset_lists[i];
+ paint.dispatch (c);
+ }
+}
+
+HB_INTERNAL void PaintGlyph::closurev1 (hb_colrv1_closure_context_t* c) const
+{
+ c->add_glyph (gid);
+ (this+paint).dispatch (c);
+}
+
+HB_INTERNAL void PaintColrGlyph::closurev1 (hb_colrv1_closure_context_t* c) const
+{
+ const COLR *colr_table = c->get_colr_table ();
+ const BaseGlyphV1Record* baseglyphV1_record = colr_table->get_base_glyphV1_record (gid);
+ if (!baseglyphV1_record) return;
+ c->add_glyph (gid);
+
+ const BaseGlyphV1List &baseglyphV1_list = colr_table->get_baseglyphV1List ();
+ (&baseglyphV1_list+baseglyphV1_record->paint).dispatch (c);
+}
+
+template <template<typename> class Var>
+HB_INTERNAL void PaintTransform<Var>::closurev1 (hb_colrv1_closure_context_t* c) const
+{
+ (this+src).dispatch (c);
+}
+
+template <template<typename> class Var>
+HB_INTERNAL void PaintTranslate<Var>::closurev1 (hb_colrv1_closure_context_t* c) const
+{
+ (this+src).dispatch (c);
+}
+
+template <template<typename> class Var>
+HB_INTERNAL void PaintRotate<Var>::closurev1 (hb_colrv1_closure_context_t* c) const
+{
+ (this+src).dispatch (c);
+}
+
+template <template<typename> class Var>
+HB_INTERNAL void PaintSkew<Var>::closurev1 (hb_colrv1_closure_context_t* c) const
+{
+ (this+src).dispatch (c);
+}
+
+HB_INTERNAL void PaintComposite::closurev1 (hb_colrv1_closure_context_t* c) const
+{
+ (this+src).dispatch (c);
+ (this+backdrop).dispatch (c);
+}
+
+} /* namespace OT */
+
+
+#endif /* HB_OT_COLR_COLRV1_CLOSURE_HH */
diff --git a/thirdparty/harfbuzz/src/hb-ot-color-cpal-table.hh b/thirdparty/harfbuzz/src/hb-ot-color-cpal-table.hh
index fa7d3207be..a9deeba9a7 100644
--- a/thirdparty/harfbuzz/src/hb-ot-color-cpal-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-color-cpal-table.hh
@@ -39,7 +39,6 @@
*/
#define HB_OT_TAG_CPAL HB_TAG('C','P','A','L')
-
namespace OT {
@@ -74,6 +73,44 @@ struct CPALV1Tail
}
public:
+ bool serialize (hb_serialize_context_t *c,
+ unsigned palette_count,
+ unsigned color_count,
+ const void *base,
+ const hb_map_t *color_index_map) const
+ {
+ TRACE_SERIALIZE (this);
+ auto *out = c->allocate_size<CPALV1Tail> (static_size);
+ if (unlikely (!out)) return_trace (false);
+
+ out->paletteFlagsZ = 0;
+ if (paletteFlagsZ)
+ out->paletteFlagsZ.serialize_copy (c, paletteFlagsZ, base, 0, hb_serialize_context_t::Head, palette_count);
+
+ out->paletteLabelsZ = 0;
+ if (paletteLabelsZ)
+ out->paletteLabelsZ.serialize_copy (c, paletteLabelsZ, base, 0, hb_serialize_context_t::Head, palette_count);
+
+ const hb_array_t<const NameID> colorLabels = (base+colorLabelsZ).as_array (color_count);
+ if (colorLabelsZ)
+ {
+ c->push ();
+ for (const auto _ : colorLabels)
+ {
+ if (!color_index_map->has (_)) continue;
+ NameID new_color_idx;
+ new_color_idx = color_index_map->get (_);
+ if (!c->copy<NameID> (new_color_idx))
+ {
+ c->pop_discard ();
+ return_trace (false);
+ }
+ }
+ c->add_link (out->colorLabelsZ, c->pop_pack ());
+ }
+ return_trace (true);
+ }
+
bool sanitize (hb_sanitize_context_t *c,
const void *base,
unsigned int palette_count,
@@ -87,15 +124,17 @@ struct CPALV1Tail
}
protected:
- LNNOffsetTo<UnsizedArrayOf<HBUINT32>>
+ // TODO(garretrieger): these offsets can hold nulls so we should not be using non-null offsets
+ // here. Currently they are needed since UnsizedArrayOf doesn't define null_size
+ NNOffset32To<UnsizedArrayOf<HBUINT32>>
paletteFlagsZ; /* Offset from the beginning of CPAL table to
* the Palette Type Array. Set to 0 if no array
* is provided. */
- LNNOffsetTo<UnsizedArrayOf<NameID>>
+ NNOffset32To<UnsizedArrayOf<NameID>>
paletteLabelsZ; /* Offset from the beginning of CPAL table to
* the palette labels array. Set to 0 if no
* array is provided. */
- LNNOffsetTo<UnsizedArrayOf<NameID>>
+ NNOffset32To<UnsizedArrayOf<NameID>>
colorLabelsZ; /* Offset from the beginning of CPAL table to
* the color labels array. Set to 0
* if no array is provided. */
@@ -157,6 +196,84 @@ struct CPAL
}
public:
+ bool serialize (hb_serialize_context_t *c,
+ const hb_array_t<const BGRAColor> &color_records,
+ const hb_array_t<const HBUINT16> &color_record_indices,
+ const hb_map_t &color_record_index_map,
+ const hb_set_t &retained_color_record_indices) const
+ {
+ TRACE_SERIALIZE (this);
+
+ for (const auto idx : color_record_indices)
+ {
+ HBUINT16 new_idx;
+ if (idx == 0) new_idx = 0;
+ else new_idx = color_record_index_map.get (idx);
+ if (!c->copy<HBUINT16> (new_idx)) return_trace (false);
+ }
+
+ c->push ();
+ for (const auto _ : retained_color_record_indices.iter ())
+ {
+ if (!c->copy<BGRAColor> (color_records[_]))
+ {
+ c->pop_discard ();
+ return_trace (false);
+ }
+ }
+ c->add_link (colorRecordsZ, c->pop_pack ());
+ return_trace (true);
+ }
+
+ bool subset (hb_subset_context_t *c) const
+ {
+ TRACE_SUBSET (this);
+ const hb_map_t *color_index_map = c->plan->colr_palettes;
+ if (color_index_map->is_empty ()) return_trace (false);
+
+ hb_set_t retained_color_indices;
+ for (const auto _ : color_index_map->keys ())
+ {
+ if (_ == 0xFFFF) continue;
+ retained_color_indices.add (_);
+ }
+ if (retained_color_indices.is_empty ()) return_trace (false);
+
+ auto *out = c->serializer->start_embed (*this);
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
+
+ out->version = version;
+ out->numColors = retained_color_indices.get_population ();
+ out->numPalettes = numPalettes;
+
+ const hb_array_t<const HBUINT16> colorRecordIndices = colorRecordIndicesZ.as_array (numPalettes);
+ hb_map_t color_record_index_map;
+ hb_set_t retained_color_record_indices;
+
+ unsigned record_count = 0;
+ for (const auto first_color_record_idx : colorRecordIndices)
+ {
+ for (unsigned retained_color_idx : retained_color_indices.iter ())
+ {
+ unsigned color_record_idx = first_color_record_idx + retained_color_idx;
+ if (color_record_index_map.has (color_record_idx)) continue;
+ color_record_index_map.set (color_record_idx, record_count);
+ retained_color_record_indices.add (color_record_idx);
+ record_count++;
+ }
+ }
+
+ out->numColorRecords = record_count;
+ const hb_array_t<const BGRAColor> color_records = (this+colorRecordsZ).as_array (numColorRecords);
+ if (!out->serialize (c->serializer, color_records, colorRecordIndices, color_record_index_map, retained_color_record_indices))
+ return_trace (false);
+
+ if (version == 1)
+ return_trace (v1 ().serialize (c->serializer, numPalettes, numColors, this, color_index_map));
+
+ return_trace (true);
+ }
+
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -173,7 +290,7 @@ struct CPAL
HBUINT16 numPalettes; /* Number of palettes in the table. */
HBUINT16 numColorRecords; /* Total number of color records, combined for
* all palettes. */
- LNNOffsetTo<UnsizedArrayOf<BGRAColor>>
+ NNOffset32To<UnsizedArrayOf<BGRAColor>>
colorRecordsZ; /* Offset from the beginning of CPAL table to
* the first ColorRecord. */
UnsizedArrayOf<HBUINT16>
diff --git a/thirdparty/harfbuzz/src/hb-ot-color-sbix-table.hh b/thirdparty/harfbuzz/src/hb-ot-color-sbix-table.hh
index 09da11597d..d2911f19e6 100644
--- a/thirdparty/harfbuzz/src/hb-ot-color-sbix-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-color-sbix-table.hh
@@ -145,7 +145,7 @@ struct SBIXStrike
auto* out = c->serializer->start_embed<SBIXStrike> ();
if (unlikely (!out)) return_trace (false);
auto snap = c->serializer->snapshot ();
- if (unlikely (!c->serializer->extend (*out, num_output_glyphs + 1))) return_trace (false);
+ if (unlikely (!c->serializer->extend (out, num_output_glyphs + 1))) return_trace (false);
out->ppem = ppem;
out->resolution = resolution;
HBUINT32 head;
@@ -185,7 +185,7 @@ struct SBIXStrike
HBUINT16 resolution; /* The device pixel density (in PPI) for which this
* strike was designed. (E.g., 96 PPI, 192 PPI.) */
protected:
- UnsizedArrayOf<LOffsetTo<SBIXGlyph>>
+ UnsizedArrayOf<Offset32To<SBIXGlyph>>
imageOffsetsZ; /* Offset from the beginning of the strike data header
* to bitmap data for an individual glyph ID. */
public:
@@ -352,11 +352,11 @@ struct sbix
{
TRACE_SERIALIZE (this);
- auto *out = c->serializer->start_embed<LOffsetLArrayOf<SBIXStrike>> ();
+ auto *out = c->serializer->start_embed<Array32OfOffset32To<SBIXStrike>> ();
if (unlikely (!out)) return_trace (false);
if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
- hb_vector_t<LOffsetTo<SBIXStrike>*> new_strikes;
+ hb_vector_t<Offset32To<SBIXStrike>*> new_strikes;
hb_vector_t<hb_serialize_context_t::objidx_t> objidxs;
for (int i = strikes.len - 1; i >= 0; --i)
{
@@ -400,7 +400,7 @@ struct sbix
HBUINT16 version; /* Table version number — set to 1 */
HBUINT16 flags; /* Bit 0: Set to 1. Bit 1: Draw outlines.
* Bits 2 to 15: reserved (set to 0). */
- LOffsetLArrayOf<SBIXStrike>
+ Array32OfOffset32To<SBIXStrike>
strikes; /* Offsets from the beginning of the 'sbix'
* table to data for each individual bitmap strike. */
public:
diff --git a/thirdparty/harfbuzz/src/hb-ot-color-svg-table.hh b/thirdparty/harfbuzz/src/hb-ot-color-svg-table.hh
index 1cc40ae53f..e022ef43b7 100644
--- a/thirdparty/harfbuzz/src/hb-ot-color-svg-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-color-svg-table.hh
@@ -62,7 +62,7 @@ struct SVGDocumentIndexEntry
* this index entry. */
HBUINT16 endGlyphID; /* The last glyph ID in the range described by
* this index entry. Must be >= startGlyphID. */
- LNNOffsetTo<UnsizedArrayOf<HBUINT8>>
+ NNOffset32To<UnsizedArrayOf<HBUINT8>>
svgDoc; /* Offset from the beginning of the SVG Document Index
* to an SVG document. Must be non-zero. */
HBUINT32 svgDocLength; /* Length of the SVG document.
@@ -107,7 +107,7 @@ struct SVG
protected:
HBUINT16 version; /* Table version (starting at 0). */
- LOffsetTo<SortedArrayOf<SVGDocumentIndexEntry>>
+ Offset32To<SortedArray16Of<SVGDocumentIndexEntry>>
svgDocEntries; /* Offset (relative to the start of the SVG table) to the
* SVG Documents Index. Must be non-zero. */
/* Array of SVG Document Index Entries. */
diff --git a/thirdparty/harfbuzz/src/hb-ot-face-table-list.hh b/thirdparty/harfbuzz/src/hb-ot-face-table-list.hh
index 367e143fdf..ffbbb1bc53 100644
--- a/thirdparty/harfbuzz/src/hb-ot-face-table-list.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-face-table-list.hh
@@ -40,7 +40,7 @@
/* This lists font tables that the hb_face_t will contain and lazily
* load. Don't add a table unless it's used though. This is not
- * exactly free. */
+ * exactly zero-cost. */
/* v--- Add new tables in the right place here. */
diff --git a/thirdparty/harfbuzz/src/hb-ot-font.cc b/thirdparty/harfbuzz/src/hb-ot-font.cc
index fae7b5b65a..5c044c1c4f 100644
--- a/thirdparty/harfbuzz/src/hb-ot-font.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-font.cc
@@ -253,9 +253,7 @@ hb_ot_get_font_v_extents (hb_font_t *font,
_hb_ot_metrics_get_position_common (font, HB_OT_METRICS_TAG_VERTICAL_LINE_GAP, &metrics->line_gap);
}
-#if HB_USE_ATEXIT
-static void free_static_ot_funcs ();
-#endif
+static inline void free_static_ot_funcs ();
static struct hb_ot_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ot_font_funcs_lazy_loader_t>
{
@@ -281,21 +279,17 @@ static struct hb_ot_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ot
hb_font_funcs_make_immutable (funcs);
-#if HB_USE_ATEXIT
- atexit (free_static_ot_funcs);
-#endif
+ hb_atexit (free_static_ot_funcs);
return funcs;
}
} static_ot_funcs;
-#if HB_USE_ATEXIT
-static
+static inline
void free_static_ot_funcs ()
{
static_ot_funcs.free_instance ();
}
-#endif
static hb_font_funcs_t *
_hb_ot_get_font_funcs ()
diff --git a/thirdparty/harfbuzz/src/hb-ot-gasp-table.hh b/thirdparty/harfbuzz/src/hb-ot-gasp-table.hh
index 4f291924af..f2a9cad464 100644
--- a/thirdparty/harfbuzz/src/hb-ot-gasp-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-gasp-table.hh
@@ -71,7 +71,7 @@ struct gasp
protected:
HBUINT16 version; /* Version number (set to 1) */
- ArrayOf<GaspRange>
+ Array16Of<GaspRange>
gaspRanges; /* Number of records to follow
* Sorted by ppem */
public:
diff --git a/thirdparty/harfbuzz/src/hb-ot-glyf-table.hh b/thirdparty/harfbuzz/src/hb-ot-glyf-table.hh
index 5352156f02..ff7b9b2d25 100644
--- a/thirdparty/harfbuzz/src/hb-ot-glyf-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-glyf-table.hh
@@ -45,6 +45,10 @@ namespace OT {
*/
#define HB_OT_TAG_loca HB_TAG('l','o','c','a')
+#ifndef HB_MAX_COMPOSITE_OPERATIONS
+#define HB_MAX_COMPOSITE_OPERATIONS 100000
+#endif
+
struct loca
{
@@ -98,7 +102,7 @@ struct glyf
unsigned num_offsets = padded_offsets.len () + 1;
bool use_short_loca = max_offset < 0x1FFFF;
unsigned entry_size = use_short_loca ? 2 : 4;
- char *loca_prime_data = (char *) calloc (entry_size, num_offsets);
+ char *loca_prime_data = (char *) hb_calloc (entry_size, num_offsets);
if (unlikely (!loca_prime_data)) return false;
@@ -115,7 +119,7 @@ struct glyf
entry_size * num_offsets,
HB_MEMORY_MODE_WRITABLE,
loca_prime_data,
- free);
+ hb_free);
bool result = plan->add_table (HB_OT_TAG_loca, loca_blob)
&& _add_head_and_set_loca_version (plan, use_short_loca);
@@ -209,10 +213,15 @@ struct glyf
if (!plan->old_gid_for_new_gid (new_gid, &subset_glyph.old_gid))
return subset_glyph;
- subset_glyph.source_glyph = glyf.glyph_for_gid (subset_glyph.old_gid, true);
- if (plan->drop_hints) subset_glyph.drop_hints_bytes ();
- else subset_glyph.dest_start = subset_glyph.source_glyph.get_bytes ();
-
+ if (new_gid == 0 &&
+ !(plan->flags & HB_SUBSET_FLAGS_NOTDEF_OUTLINE))
+ subset_glyph.source_glyph = Glyph ();
+ else
+ subset_glyph.source_glyph = glyf.glyph_for_gid (subset_glyph.old_gid, true);
+ if (plan->flags & HB_SUBSET_FLAGS_NO_HINTING)
+ subset_glyph.drop_hints_bytes ();
+ else
+ subset_glyph.dest_start = subset_glyph.source_glyph.get_bytes ();
return subset_glyph;
})
| hb_sink (glyphs)
@@ -281,6 +290,11 @@ struct glyf
hb_codepoint_t get_glyph_index () const { return glyphIndex; }
void drop_instructions_flag () { flags = (uint16_t) flags & ~WE_HAVE_INSTRUCTIONS; }
+ void set_overlaps_flag ()
+ {
+ flags = (uint16_t) flags | OVERLAP_COMPOUND;
+ }
+
bool has_instructions () const { return flags & WE_HAVE_INSTRUCTIONS; }
bool has_more () const { return flags & MORE_COMPONENTS; }
@@ -383,9 +397,12 @@ struct glyf
{
typedef const CompositeGlyphChain *__item_t__;
composite_iter_t (hb_bytes_t glyph_, __item_t__ current_) :
- glyph (glyph_), current (current_)
- { if (!check_range (current)) current = nullptr; }
- composite_iter_t () : glyph (hb_bytes_t ()), current (nullptr) {}
+ glyph (glyph_), current (nullptr), current_size (0)
+ {
+ set_next (current_);
+ }
+
+ composite_iter_t () : glyph (hb_bytes_t ()), current (nullptr), current_size (0) {}
const CompositeGlyphChain &__item__ () const { return *current; }
bool __more__ () const { return current; }
@@ -393,23 +410,36 @@ struct glyf
{
if (!current->has_more ()) { current = nullptr; return; }
- const CompositeGlyphChain *possible = &StructAfter<CompositeGlyphChain,
- CompositeGlyphChain> (*current);
- if (!check_range (possible)) { current = nullptr; return; }
- current = possible;
+ set_next (&StructAtOffset<CompositeGlyphChain> (current, current_size));
}
bool operator != (const composite_iter_t& o) const
{ return glyph != o.glyph || current != o.current; }
- bool check_range (const CompositeGlyphChain *composite) const
+
+ void set_next (const CompositeGlyphChain *composite)
{
- return glyph.check_range (composite, CompositeGlyphChain::min_size)
- && glyph.check_range (composite, composite->get_size ());
+ if (!glyph.check_range (composite, CompositeGlyphChain::min_size))
+ {
+ current = nullptr;
+ current_size = 0;
+ return;
+ }
+ unsigned size = composite->get_size ();
+ if (!glyph.check_range (composite, size))
+ {
+ current = nullptr;
+ current_size = 0;
+ return;
+ }
+
+ current = composite;
+ current_size = size;
}
private:
hb_bytes_t glyph;
__item_t__ current;
+ unsigned current_size;
};
enum phantom_point_index_t
@@ -427,14 +457,14 @@ struct glyf
{
enum simple_glyph_flag_t
{
- FLAG_ON_CURVE = 0x01,
- FLAG_X_SHORT = 0x02,
- FLAG_Y_SHORT = 0x04,
- FLAG_REPEAT = 0x08,
- FLAG_X_SAME = 0x10,
- FLAG_Y_SAME = 0x20,
- FLAG_RESERVED1 = 0x40,
- FLAG_RESERVED2 = 0x80
+ FLAG_ON_CURVE = 0x01,
+ FLAG_X_SHORT = 0x02,
+ FLAG_Y_SHORT = 0x04,
+ FLAG_REPEAT = 0x08,
+ FLAG_X_SAME = 0x10,
+ FLAG_Y_SAME = 0x20,
+ FLAG_OVERLAP_SIMPLE = 0x40,
+ FLAG_RESERVED2 = 0x80
};
private:
@@ -495,8 +525,8 @@ struct glyf
const Glyph trim_padding () const
{
/* based on FontTools _g_l_y_f.py::trim */
- const char *glyph = bytes.arrayZ;
- const char *glyph_end = glyph + bytes.length;
+ const uint8_t *glyph = (uint8_t*) bytes.arrayZ;
+ const uint8_t *glyph_end = glyph + bytes.length;
/* simple glyph w/contours, possibly trimmable */
glyph += instruction_len_offset ();
@@ -553,6 +583,17 @@ struct glyf
dest_end = bytes.sub_array (glyph_length, bytes.length - glyph_length);
}
+ void set_overlaps_flag ()
+ {
+ if (unlikely (!header.numberOfContours)) return;
+
+ unsigned flags_offset = length (instructions_length ());
+ if (unlikely (length (flags_offset + 1) > bytes.length)) return;
+
+ HBUINT8 &first_flag = (HBUINT8 &) StructAtOffset<HBUINT16> (&bytes, flags_offset);
+ first_flag = (uint8_t) first_flag | FLAG_OVERLAP_SIMPLE;
+ }
+
static bool read_points (const HBUINT8 *&p /* IN/OUT */,
contour_point_vector_t &points_ /* IN/OUT */,
const hb_bytes_t &bytes,
@@ -666,6 +707,12 @@ struct glyf
/* Chop instructions off the end */
void drop_hints_bytes (hb_bytes_t &dest_start) const
{ dest_start = bytes.sub_array (0, bytes.length - instructions_length (bytes)); }
+
+ void set_overlaps_flag ()
+ {
+ const_cast<CompositeGlyphChain &> (StructAfter<CompositeGlyphChain, GlyphHeader> (header))
+ .set_overlaps_flag ();
+ }
};
enum glyph_type_t { EMPTY, SIMPLE, COMPOSITE };
@@ -695,6 +742,15 @@ struct glyf
}
}
+ void set_overlaps_flag ()
+ {
+ switch (type) {
+ case COMPOSITE: CompositeGlyph (*header, bytes).set_overlaps_flag (); return;
+ case SIMPLE: SimpleGlyph (*header, bytes).set_overlaps_flag (); return;
+ default: return;
+ }
+ }
+
void drop_hints_bytes (hb_bytes_t &dest_start, hb_bytes_t &dest_end) const
{
switch (type) {
@@ -886,7 +942,7 @@ struct glyf
{
if (gid >= num_glyphs) return false;
- /* Making this alloc free is not that easy
+ /* Making this allocfree is not that easy
https://github.com/harfbuzz/harfbuzz/issues/2095
mostly because of gvar handling in VF fonts,
perhaps a separate path for non-VF fonts can be considered */
@@ -1045,18 +1101,28 @@ struct glyf
return needs_padding_removal ? glyph.trim_padding () : glyph;
}
- void
- add_gid_and_children (hb_codepoint_t gid, hb_set_t *gids_to_retain,
- unsigned int depth = 0) const
+ unsigned
+ add_gid_and_children (hb_codepoint_t gid,
+ hb_set_t *gids_to_retain,
+ unsigned depth = 0,
+ unsigned operation_count = 0) const
{
- if (unlikely (depth++ > HB_MAX_NESTING_LEVEL)) return;
+ if (unlikely (depth++ > HB_MAX_NESTING_LEVEL)) return operation_count;
+ if (unlikely (operation_count++ > HB_MAX_COMPOSITE_OPERATIONS)) return operation_count;
/* Check if is already visited */
- if (gids_to_retain->has (gid)) return;
+ if (gids_to_retain->has (gid)) return operation_count;
gids_to_retain->add (gid);
- for (auto &item : glyph_for_gid (gid).get_composite_iterator ())
- add_gid_and_children (item.get_glyph_index (), gids_to_retain, depth);
+ auto it = glyph_for_gid (gid).get_composite_iterator ();
+ while (it)
+ {
+ auto item = *(it++);
+ operation_count +=
+ add_gid_and_children (item.get_glyph_index (), gids_to_retain, depth, operation_count);
+ }
+
+ return operation_count;
}
#ifdef HB_EXPERIMENTAL_API
@@ -1230,7 +1296,11 @@ struct glyf
const_cast<CompositeGlyphChain &> (_).set_glyph_index (new_gid);
}
- if (plan->drop_hints) Glyph (dest_glyph).drop_hints ();
+ if (plan->flags & HB_SUBSET_FLAGS_NO_HINTING)
+ Glyph (dest_glyph).drop_hints ();
+
+ if (plan->flags & HB_SUBSET_FLAGS_SET_OVERLAPS_FLAG)
+ Glyph (dest_glyph).set_overlaps_flag ();
return_trace (true);
}
diff --git a/thirdparty/harfbuzz/src/hb-ot-hdmx-table.hh b/thirdparty/harfbuzz/src/hb-ot-hdmx-table.hh
index c9c391bad5..dea2b7e29a 100644
--- a/thirdparty/harfbuzz/src/hb-ot-hdmx-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-hdmx-table.hh
@@ -52,7 +52,7 @@ struct DeviceRecord
unsigned length = it.len ();
- if (unlikely (!c->extend (*this, length))) return_trace (false);
+ if (unlikely (!c->extend (this, length))) return_trace (false);
this->pixelSize = pixelSize;
this->maxWidth =
@@ -110,7 +110,7 @@ struct hdmx
for (const hb_item_type<Iterator>& _ : +it)
c->start_embed<DeviceRecord> ()->serialize (c, _.first, _.second);
- return_trace (c->successful);
+ return_trace (c->successful ());
}
diff --git a/thirdparty/harfbuzz/src/hb-ot-hmtx-table.hh b/thirdparty/harfbuzz/src/hb-ot-hmtx-table.hh
index d06c0fa4a4..4038329938 100644
--- a/thirdparty/harfbuzz/src/hb-ot-hmtx-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-hmtx-table.hh
@@ -146,7 +146,7 @@ struct hmtxvmtx
_mtx.fini ();
- if (unlikely (c->serializer->ran_out_of_room || c->serializer->in_error ()))
+ if (unlikely (c->serializer->in_error ()))
return_trace (false);
// Amend header num hmetrics
diff --git a/thirdparty/harfbuzz/src/hb-ot-layout-base-table.hh b/thirdparty/harfbuzz/src/hb-ot-layout-base-table.hh
index 4df0d942ce..492947751e 100644
--- a/thirdparty/harfbuzz/src/hb-ot-layout-base-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-layout-base-table.hh
@@ -103,7 +103,7 @@ struct BaseCoordFormat3
protected:
HBUINT16 format; /* Format identifier--format = 3 */
FWORD coordinate; /* X or Y value, in design units */
- OffsetTo<Device>
+ Offset16To<Device>
deviceTable; /* Offset to Device table for X or
* Y value, from beginning of
* BaseCoord table (may be NULL). */
@@ -173,11 +173,11 @@ struct FeatMinMaxRecord
protected:
Tag tag; /* 4-byte feature identification tag--must
* match feature tag in FeatureList */
- OffsetTo<BaseCoord>
+ Offset16To<BaseCoord>
minCoord; /* Offset to BaseCoord table that defines
* the minimum extent value, from beginning
* of MinMax table (may be NULL) */
- OffsetTo<BaseCoord>
+ Offset16To<BaseCoord>
maxCoord; /* Offset to BaseCoord table that defines
* the maximum extent value, from beginning
* of MinMax table (may be NULL) */
@@ -212,15 +212,15 @@ struct MinMax
}
protected:
- OffsetTo<BaseCoord>
+ Offset16To<BaseCoord>
minCoord; /* Offset to BaseCoord table that defines
* minimum extent value, from the beginning
* of MinMax table (may be NULL) */
- OffsetTo<BaseCoord>
+ Offset16To<BaseCoord>
maxCoord; /* Offset to BaseCoord table that defines
* maximum extent value, from the beginning
* of MinMax table (may be NULL) */
- SortedArrayOf<FeatMinMaxRecord>
+ SortedArray16Of<FeatMinMaxRecord>
featMinMaxRecords;
/* Array of FeatMinMaxRecords, in alphabetical
* order by featureTableTag */
@@ -247,7 +247,7 @@ struct BaseValues
Index defaultIndex; /* Index number of default baseline for this
* script — equals index position of baseline tag
* in baselineTags array of the BaseTagList */
- OffsetArrayOf<BaseCoord>
+ Array16OfOffset16To<BaseCoord>
baseCoords; /* Number of BaseCoord tables defined — should equal
* baseTagCount in the BaseTagList
*
@@ -275,7 +275,7 @@ struct BaseLangSysRecord
protected:
Tag baseLangSysTag; /* 4-byte language system identification tag */
- OffsetTo<MinMax>
+ Offset16To<MinMax>
minMax; /* Offset to MinMax table, from beginning
* of BaseScript table */
public:
@@ -305,13 +305,13 @@ struct BaseScript
}
protected:
- OffsetTo<BaseValues>
+ Offset16To<BaseValues>
baseValues; /* Offset to BaseValues table, from beginning
* of BaseScript table (may be NULL) */
- OffsetTo<MinMax>
+ Offset16To<MinMax>
defaultMinMax; /* Offset to MinMax table, from beginning of
* BaseScript table (may be NULL) */
- SortedArrayOf<BaseLangSysRecord>
+ SortedArray16Of<BaseLangSysRecord>
baseLangSysRecords;
/* Number of BaseLangSysRecords
* defined — may be zero (0) */
@@ -339,7 +339,7 @@ struct BaseScriptRecord
protected:
Tag baseScriptTag; /* 4-byte script identification tag */
- OffsetTo<BaseScript>
+ Offset16To<BaseScript>
baseScript; /* Offset to BaseScript table, from beginning
* of BaseScriptList */
@@ -364,7 +364,7 @@ struct BaseScriptList
}
protected:
- SortedArrayOf<BaseScriptRecord>
+ SortedArray16Of<BaseScriptRecord>
baseScriptRecords;
public:
@@ -426,12 +426,12 @@ struct Axis
}
protected:
- OffsetTo<SortedArrayOf<Tag>>
+ Offset16To<SortedArray16Of<Tag>>
baseTagList; /* Offset to BaseTagList table, from beginning
* of Axis table (may be NULL)
* Array of 4-byte baseline identification tags — must
* be in alphabetical order */
- OffsetTo<BaseScriptList>
+ Offset16To<BaseScriptList>
baseScriptList; /* Offset to BaseScriptList table, from beginning
* of Axis table
* Array of BaseScriptRecords, in alphabetical order
@@ -501,11 +501,11 @@ struct BASE
protected:
FixedVersion<>version; /* Version of the BASE table */
- OffsetTo<Axis>hAxis; /* Offset to horizontal Axis table, from beginning
+ Offset16To<Axis>hAxis; /* Offset to horizontal Axis table, from beginning
* of BASE table (may be NULL) */
- OffsetTo<Axis>vAxis; /* Offset to vertical Axis table, from beginning
+ Offset16To<Axis>vAxis; /* Offset to vertical Axis table, from beginning
* of BASE table (may be NULL) */
- LOffsetTo<VariationStore>
+ Offset32To<VariationStore>
varStore; /* Offset to the table of Item Variation
* Store--from beginning of BASE
* header (may be NULL). Introduced
diff --git a/thirdparty/harfbuzz/src/hb-ot-layout-common.hh b/thirdparty/harfbuzz/src/hb-ot-layout-common.hh
index 0ba7e3c061..65f499a00d 100644
--- a/thirdparty/harfbuzz/src/hb-ot-layout-common.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-layout-common.hh
@@ -88,12 +88,66 @@ static inline void ClassDef_serialize (hb_serialize_context_t *c,
Iterator it);
static void ClassDef_remap_and_serialize (hb_serialize_context_t *c,
- const hb_set_t &glyphset,
const hb_map_t &gid_klass_map,
hb_sorted_vector_t<HBGlyphID> &glyphs,
const hb_set_t &klasses,
+ bool use_class_zero,
hb_map_t *klass_map /*INOUT*/);
+
+struct hb_prune_langsys_context_t
+{
+ hb_prune_langsys_context_t (const void *table_,
+ hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *script_langsys_map_,
+ const hb_map_t *duplicate_feature_map_,
+ hb_set_t *new_collected_feature_indexes_)
+ :table (table_),
+ script_langsys_map (script_langsys_map_),
+ duplicate_feature_map (duplicate_feature_map_),
+ new_feature_indexes (new_collected_feature_indexes_),
+ script_count (0),langsys_count (0) {}
+
+ bool visitedScript (const void *s)
+ {
+ if (script_count++ > HB_MAX_SCRIPTS)
+ return true;
+
+ return visited (s, visited_script);
+ }
+
+ bool visitedLangsys (const void *l)
+ {
+ if (langsys_count++ > HB_MAX_LANGSYS)
+ return true;
+
+ return visited (l, visited_langsys);
+ }
+
+ private:
+ template <typename T>
+ bool visited (const T *p, hb_set_t &visited_set)
+ {
+ hb_codepoint_t delta = (hb_codepoint_t) ((uintptr_t) p - (uintptr_t) table);
+ if (visited_set.has (delta))
+ return true;
+
+ visited_set.add (delta);
+ return false;
+ }
+
+ public:
+ const void *table;
+ hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *script_langsys_map;
+ const hb_map_t *duplicate_feature_map;
+ hb_set_t *new_feature_indexes;
+
+ private:
+ hb_set_t visited_script;
+ hb_set_t visited_langsys;
+ unsigned script_count;
+ unsigned langsys_count;
+};
+
struct hb_subset_layout_context_t :
hb_dispatch_context_t<hb_subset_layout_context_t, hb_empty_t, HB_DEBUG_SUBSET>
{
@@ -125,16 +179,21 @@ struct hb_subset_layout_context_t :
hb_subset_context_t *subset_context;
const hb_tag_t table_tag;
const hb_map_t *lookup_index_map;
+ const hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *script_langsys_map;
const hb_map_t *feature_index_map;
+ unsigned cur_script_index;
hb_subset_layout_context_t (hb_subset_context_t *c_,
hb_tag_t tag_,
hb_map_t *lookup_map_,
- hb_map_t *feature_map_) :
+ hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *script_langsys_map_,
+ hb_map_t *feature_index_map_) :
subset_context (c_),
table_tag (tag_),
lookup_index_map (lookup_map_),
- feature_index_map (feature_map_),
+ script_langsys_map (script_langsys_map_),
+ feature_index_map (feature_index_map_),
+ cur_script_index (0xFFFFu),
script_count (0),
langsys_count (0),
feature_index_count (0),
@@ -325,7 +384,7 @@ struct Record
}
Tag tag; /* 4-byte Tag identifier */
- OffsetTo<Type>
+ Offset16To<Type>
offset; /* Offset from beginning of object holding
* the Record */
public:
@@ -333,11 +392,11 @@ struct Record
};
template <typename Type>
-struct RecordArrayOf : SortedArrayOf<Record<Type>>
+struct RecordArrayOf : SortedArray16Of<Record<Type>>
{
- const OffsetTo<Type>& get_offset (unsigned int i) const
+ const Offset16To<Type>& get_offset (unsigned int i) const
{ return (*this)[i].offset; }
- OffsetTo<Type>& get_offset (unsigned int i)
+ Offset16To<Type>& get_offset (unsigned int i)
{ return (*this)[i].offset; }
const Tag& get_tag (unsigned int i) const
{ return (*this)[i].tag; }
@@ -356,7 +415,7 @@ struct RecordArrayOf : SortedArrayOf<Record<Type>>
}
bool find_index (hb_tag_t tag, unsigned int *index) const
{
- return this->bfind (tag, index, HB_BFIND_NOT_FOUND_STORE, Index::NOT_FOUND_INDEX);
+ return this->bfind (tag, index, HB_NOT_FOUND_STORE, Index::NOT_FOUND_INDEX);
}
};
@@ -407,6 +466,30 @@ struct RecordListOfFeature : RecordListOf<Feature>
}
};
+struct Script;
+struct RecordListOfScript : RecordListOf<Script>
+{
+ bool subset (hb_subset_context_t *c,
+ hb_subset_layout_context_t *l) const
+ {
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->start_embed (*this);
+ if (unlikely (!out || !c->serializer->extend_min (out))) return_trace (false);
+
+ unsigned count = this->len;
+ for (auto _ : + hb_zip (*this, hb_range (count)))
+ {
+ auto snap = c->serializer->snapshot ();
+ l->cur_script_index = _.second;
+ bool ret = _.first.subset (l, this);
+ if (!ret) c->serializer->revert (snap);
+ else out->len++;
+ }
+
+ return_trace (true);
+ }
+};
+
struct RangeRecord
{
int cmp (hb_codepoint_t g) const
@@ -434,7 +517,7 @@ struct RangeRecord
DECLARE_NULL_NAMESPACE_BYTES (OT, RangeRecord);
-struct IndexArray : ArrayOf<Index>
+struct IndexArray : Array16Of<Index>
{
bool intersects (const hb_map_t *indexes) const
{ return hb_any (*this, indexes); }
@@ -474,7 +557,7 @@ struct IndexArray : ArrayOf<Index>
void add_indexes_to (hb_set_t* output /* OUT */) const
{
- output->add_array (arrayZ, len);
+ output->add_array (as_array ());
}
};
@@ -506,18 +589,46 @@ struct LangSys
return_trace (c->embed (*this));
}
- bool operator == (const LangSys& o) const
+ bool compare (const LangSys& o, const hb_map_t *feature_index_map) const
{
- if (featureIndex.len != o.featureIndex.len ||
- reqFeatureIndex != o.reqFeatureIndex)
+ if (reqFeatureIndex != o.reqFeatureIndex)
+ return false;
+
+ auto iter =
+ + hb_iter (featureIndex)
+ | hb_filter (feature_index_map)
+ | hb_map (feature_index_map)
+ ;
+
+ auto o_iter =
+ + hb_iter (o.featureIndex)
+ | hb_filter (feature_index_map)
+ | hb_map (feature_index_map)
+ ;
+
+ if (iter.len () != o_iter.len ())
return false;
- for (const auto _ : + hb_zip (featureIndex, o.featureIndex))
+ for (const auto _ : + hb_zip (iter, o_iter))
if (_.first != _.second) return false;
return true;
}
+ void collect_features (hb_prune_langsys_context_t *c) const
+ {
+ if (!has_required_feature () && !get_feature_count ()) return;
+ if (c->visitedLangsys (this)) return;
+ if (has_required_feature () &&
+ c->duplicate_feature_map->has (reqFeatureIndex))
+ c->new_feature_indexes->add (get_required_feature_index ());
+
+ + hb_iter (featureIndex)
+ | hb_filter (c->duplicate_feature_map)
+ | hb_sink (c->new_feature_indexes)
+ ;
+ }
+
bool subset (hb_subset_context_t *c,
hb_subset_layout_context_t *l,
const Tag *tag = nullptr) const
@@ -581,6 +692,49 @@ struct Script
bool has_default_lang_sys () const { return defaultLangSys != 0; }
const LangSys& get_default_lang_sys () const { return this+defaultLangSys; }
+ void prune_langsys (hb_prune_langsys_context_t *c,
+ unsigned script_index) const
+ {
+ if (!has_default_lang_sys () && !get_lang_sys_count ()) return;
+ if (c->visitedScript (this)) return;
+
+ if (!c->script_langsys_map->has (script_index))
+ {
+ hb_set_t* empty_set = hb_set_create ();
+ if (unlikely (!c->script_langsys_map->set (script_index, empty_set)))
+ {
+ hb_set_destroy (empty_set);
+ return;
+ }
+ }
+
+ unsigned langsys_count = get_lang_sys_count ();
+ if (has_default_lang_sys ())
+ {
+ //only collect features from non-redundant langsys
+ const LangSys& d = get_default_lang_sys ();
+ d.collect_features (c);
+
+ for (auto _ : + hb_zip (langSys, hb_range (langsys_count)))
+ {
+ const LangSys& l = this+_.first.offset;
+ if (l.compare (d, c->duplicate_feature_map)) continue;
+
+ l.collect_features (c);
+ c->script_langsys_map->get (script_index)->add (_.second);
+ }
+ }
+ else
+ {
+ for (auto _ : + hb_zip (langSys, hb_range (langsys_count)))
+ {
+ const LangSys& l = this+_.first.offset;
+ l.collect_features (c);
+ c->script_langsys_map->get (script_index)->add (_.second);
+ }
+ }
+ }
+
bool subset (hb_subset_context_t *c,
hb_subset_layout_context_t *l,
const Tag *tag) const
@@ -609,16 +763,17 @@ struct Script
}
}
- + langSys.iter ()
- | hb_filter ([=] (const Record<LangSys>& record) {return l->visitLangSys (); })
- | hb_filter ([&] (const Record<LangSys>& record)
- {
- const LangSys& d = this+defaultLangSys;
- const LangSys& l = this+record.offset;
- return !(l == d);
- })
- | hb_apply (subset_record_array (l, &(out->langSys), this))
- ;
+ const hb_set_t *active_langsys = l->script_langsys_map->get (l->cur_script_index);
+ if (active_langsys)
+ {
+ unsigned count = langSys.len;
+ + hb_zip (langSys, hb_range (count))
+ | hb_filter (active_langsys, hb_second)
+ | hb_map (hb_first)
+ | hb_filter ([=] (const Record<LangSys>& record) {return l->visitLangSys (); })
+ | hb_apply (subset_record_array (l, &(out->langSys), this))
+ ;
+ }
return_trace (bool (out->langSys.len) || defaultLang || l->table_tag == HB_OT_TAG_GSUB);
}
@@ -631,7 +786,7 @@ struct Script
}
protected:
- OffsetTo<LangSys>
+ Offset16To<LangSys>
defaultLangSys; /* Offset to DefaultLangSys table--from
* beginning of Script table--may be Null */
RecordArrayOf<LangSys>
@@ -641,7 +796,7 @@ struct Script
DEFINE_SIZE_ARRAY_SIZED (4, langSys);
};
-typedef RecordListOf<Script> ScriptList;
+typedef RecordListOfScript ScriptList;
/* https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#size */
@@ -856,7 +1011,7 @@ struct FeatureParamsCharacterVariants
* user-interface labels for the
* feature parameters. (Must be zero
* if numParameters is zero.) */
- ArrayOf<HBUINT24>
+ Array16Of<HBUINT24>
characters; /* Array of the Unicode Scalar Value
* of the characters for which this
* feature provides glyph variants.
@@ -953,7 +1108,7 @@ struct Feature
auto *out = c->serializer->start_embed (*this);
if (unlikely (!out || !c->serializer->extend_min (out))) return_trace (false);
- bool subset_featureParams = out->featureParams.serialize_subset (c, featureParams, this, tag);
+ out->featureParams.serialize_subset (c, featureParams, this, tag);
auto it =
+ hb_iter (lookupIndex)
@@ -962,8 +1117,9 @@ struct Feature
;
out->lookupIndex.serialize (c->serializer, l, it);
- return_trace (bool (it) || subset_featureParams
- || (tag && *tag == HB_TAG ('p', 'r', 'e', 'f')));
+ // The decision to keep or drop this feature is already made before we get here
+ // so always retain it.
+ return_trace (true);
}
bool sanitize (hb_sanitize_context_t *c,
@@ -998,7 +1154,7 @@ struct Feature
unsigned int new_offset_int = orig_offset -
(((char *) this) - ((char *) closure->list_base));
- OffsetTo<FeatureParams> new_offset;
+ Offset16To<FeatureParams> new_offset;
/* Check that it would not overflow. */
new_offset = new_offset_int;
if (new_offset == new_offset_int &&
@@ -1010,7 +1166,7 @@ struct Feature
return_trace (true);
}
- OffsetTo<FeatureParams>
+ Offset16To<FeatureParams>
featureParams; /* Offset to Feature Parameters table (if one
* has been defined for the feature), relative
* to the beginning of the Feature Table; = Null
@@ -1049,11 +1205,11 @@ struct Lookup
unsigned int get_subtable_count () const { return subTable.len; }
template <typename TSubTable>
- const OffsetArrayOf<TSubTable>& get_subtables () const
- { return reinterpret_cast<const OffsetArrayOf<TSubTable> &> (subTable); }
+ const Array16OfOffset16To<TSubTable>& get_subtables () const
+ { return reinterpret_cast<const Array16OfOffset16To<TSubTable> &> (subTable); }
template <typename TSubTable>
- OffsetArrayOf<TSubTable>& get_subtables ()
- { return reinterpret_cast<OffsetArrayOf<TSubTable> &> (subTable); }
+ Array16OfOffset16To<TSubTable>& get_subtables ()
+ { return reinterpret_cast<Array16OfOffset16To<TSubTable> &> (subTable); }
template <typename TSubTable>
const TSubTable& get_subtable (unsigned int i) const
@@ -1106,13 +1262,13 @@ struct Lookup
unsigned int num_subtables)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
lookupType = lookup_type;
lookupFlag = lookup_props & 0xFFFFu;
if (unlikely (!subTable.serialize (c, num_subtables))) return_trace (false);
if (lookupFlag & LookupFlag::UseMarkFilteringSet)
{
- if (unlikely (!c->extend (*this))) return_trace (false);
+ if (unlikely (!c->extend (this))) return_trace (false);
HBUINT16 &markFilteringSet = StructAfter<HBUINT16> (subTable);
markFilteringSet = lookup_props >> 16;
}
@@ -1131,10 +1287,18 @@ struct Lookup
const hb_set_t *glyphset = c->plan->glyphset_gsub ();
unsigned int lookup_type = get_type ();
+ hb_iter (get_subtables <TSubTable> ())
- | hb_filter ([this, glyphset, lookup_type] (const OffsetTo<TSubTable> &_) { return (this+_).intersects (glyphset, lookup_type); })
+ | hb_filter ([this, glyphset, lookup_type] (const Offset16To<TSubTable> &_) { return (this+_).intersects (glyphset, lookup_type); })
| hb_apply (subset_offset_array (c, out->get_subtables<TSubTable> (), this, lookup_type))
;
+ if (lookupFlag & LookupFlag::UseMarkFilteringSet)
+ {
+ if (unlikely (!c->serializer->extend (out))) return_trace (false);
+ const HBUINT16 &markFilteringSet = StructAfter<HBUINT16> (subTable);
+ HBUINT16 &outMarkFilteringSet = StructAfter<HBUINT16> (out->subTable);
+ outMarkFilteringSet = markFilteringSet;
+ }
+
return_trace (true);
}
@@ -1179,7 +1343,7 @@ struct Lookup
private:
HBUINT16 lookupType; /* Different enumerations for GSUB and GPOS */
HBUINT16 lookupFlag; /* Lookup qualifiers */
- ArrayOf<Offset16>
+ Array16Of<Offset16>
subTable; /* Array of SubTables */
/*HBUINT16 markFilteringSetX[HB_VAR_ARRAY];*//* Index (base 0) into GDEF mark glyph sets
* structure. This field is only present if bit
@@ -1188,10 +1352,10 @@ struct Lookup
DEFINE_SIZE_ARRAY (6, subTable);
};
-typedef OffsetListOf<Lookup> LookupList;
+typedef List16OfOffset16To<Lookup> LookupList;
template <typename TLookup>
-struct LookupOffsetList : OffsetListOf<TLookup>
+struct LookupOffsetList : List16OfOffset16To<TLookup>
{
bool subset (hb_subset_context_t *c,
hb_subset_layout_context_t *l) const
@@ -1212,7 +1376,7 @@ struct LookupOffsetList : OffsetListOf<TLookup>
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- return_trace (OffsetListOf<TLookup>::sanitize (c, this));
+ return_trace (List16OfOffset16To<TLookup>::sanitize (c, this));
}
};
@@ -1229,7 +1393,7 @@ struct CoverageFormat1
unsigned int get_coverage (hb_codepoint_t glyph_id) const
{
unsigned int i;
- glyphArray.bfind (glyph_id, &i, HB_BFIND_NOT_FOUND_STORE, NOT_COVERED);
+ glyphArray.bfind (glyph_id, &i, HB_NOT_FOUND_STORE, NOT_COVERED);
return i;
}
@@ -1250,19 +1414,25 @@ struct CoverageFormat1
bool intersects (const hb_set_t *glyphs) const
{
/* TODO Speed up, using hb_set_next() and bsearch()? */
- unsigned int count = glyphArray.len;
- const HBGlyphID *arr = glyphArray.arrayZ;
- for (unsigned int i = 0; i < count; i++)
- if (glyphs->has (arr[i]))
+ for (const auto& g : glyphArray.as_array ())
+ if (glyphs->has (g))
return true;
return false;
}
bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const
{ return glyphs->has (glyphArray[index]); }
+ void intersected_coverage_glyphs (const hb_set_t *glyphs, hb_set_t *intersect_glyphs) const
+ {
+ unsigned count = glyphArray.len;
+ for (unsigned i = 0; i < count; i++)
+ if (glyphs->has (glyphArray[i]))
+ intersect_glyphs->add (glyphArray[i]);
+ }
+
template <typename set_t>
bool collect_coverage (set_t *glyphs) const
- { return glyphs->add_sorted_array (glyphArray.arrayZ, glyphArray.len); }
+ { return glyphs->add_sorted_array (glyphArray.as_array ()); }
public:
/* Older compilers need this to be public. */
@@ -1284,7 +1454,7 @@ struct CoverageFormat1
protected:
HBUINT16 coverageFormat; /* Format identifier--format = 1 */
- SortedArrayOf<HBGlyphID>
+ SortedArray16Of<HBGlyphID>
glyphArray; /* Array of GlyphIDs--in numerical order */
public:
DEFINE_SIZE_ARRAY (4, glyphArray);
@@ -1308,7 +1478,7 @@ struct CoverageFormat2
bool serialize (hb_serialize_context_t *c, Iterator glyphs)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
if (unlikely (!glyphs))
{
@@ -1358,20 +1528,16 @@ struct CoverageFormat2
{
/* TODO Speed up, using hb_set_next() and bsearch()? */
/* TODO(iter) Rewrite as dagger. */
- unsigned count = rangeRecord.len;
- const RangeRecord *arr = rangeRecord.arrayZ;
- for (unsigned i = 0; i < count; i++)
- if (arr[i].intersects (glyphs))
+ for (const auto& range : rangeRecord.as_array ())
+ if (range.intersects (glyphs))
return true;
return false;
}
bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const
{
/* TODO(iter) Rewrite as dagger. */
- unsigned count = rangeRecord.len;
- const RangeRecord *arr = rangeRecord.arrayZ;
- for (unsigned i = 0; i < count; i++) {
- const RangeRecord &range = arr[i];
+ for (const auto& range : rangeRecord.as_array ())
+ {
if (range.value <= index &&
index < (unsigned int) range.value + (range.last - range.first) &&
range.intersects (glyphs))
@@ -1382,6 +1548,16 @@ struct CoverageFormat2
return false;
}
+ void intersected_coverage_glyphs (const hb_set_t *glyphs, hb_set_t *intersect_glyphs) const
+ {
+ for (const auto& range : rangeRecord.as_array ())
+ {
+ if (!range.intersects (glyphs)) continue;
+ for (hb_codepoint_t g = range.first; g <= range.last; g++)
+ if (glyphs->has (g)) intersect_glyphs->add (g);
+ }
+ }
+
template <typename set_t>
bool collect_coverage (set_t *glyphs) const
{
@@ -1448,7 +1624,7 @@ struct CoverageFormat2
protected:
HBUINT16 coverageFormat; /* Format identifier--format = 2 */
- SortedArrayOf<RangeRecord>
+ SortedArray16Of<RangeRecord>
rangeRecord; /* Array of glyph ranges--ordered by
* Start GlyphID. rangeCount entries
* long */
@@ -1481,7 +1657,7 @@ struct Coverage
bool serialize (hb_serialize_context_t *c, Iterator glyphs)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
unsigned count = 0;
unsigned num_ranges = 0;
@@ -1564,6 +1740,16 @@ struct Coverage
}
}
+ void intersected_coverage_glyphs (const hb_set_t *glyphs, hb_set_t *intersect_glyphs) const
+ {
+ switch (u.format)
+ {
+ case 1: return u.format1.intersected_coverage_glyphs (glyphs, intersect_glyphs);
+ case 2: return u.format2.intersected_coverage_glyphs (glyphs, intersect_glyphs);
+ default:return ;
+ }
+ }
+
struct iter_t : hb_iter_with_fallback_t<iter_t, hb_codepoint_t>
{
static constexpr bool is_sorted_iterator = true;
@@ -1645,10 +1831,10 @@ Coverage_serialize (hb_serialize_context_t *c,
{ c->start_embed<Coverage> ()->serialize (c, it); }
static void ClassDef_remap_and_serialize (hb_serialize_context_t *c,
- const hb_set_t &glyphset,
const hb_map_t &gid_klass_map,
hb_sorted_vector_t<HBGlyphID> &glyphs,
const hb_set_t &klasses,
+ bool use_class_zero,
hb_map_t *klass_map /*INOUT*/)
{
if (!klass_map)
@@ -1660,7 +1846,7 @@ static void ClassDef_remap_and_serialize (hb_serialize_context_t *c,
/* any glyph not assigned a class value falls into Class zero (0),
* if any glyph assigned to class 0, remapping must start with 0->0*/
- if (glyphset.get_population () > gid_klass_map.get_population ())
+ if (!use_class_zero)
klass_map->set (0, 0);
unsigned idx = klass_map->has (0) ? 1 : 0;
@@ -1704,10 +1890,11 @@ struct ClassDefFormat1
Iterator it)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
if (unlikely (!it))
{
+ classFormat = 1;
startGlyph = 0;
classValue.len = 0;
return_trace (true);
@@ -1730,7 +1917,10 @@ struct ClassDefFormat1
}
bool subset (hb_subset_context_t *c,
- hb_map_t *klass_map = nullptr /*OUT*/) const
+ hb_map_t *klass_map = nullptr /*OUT*/,
+ bool keep_empty_table = true,
+ bool use_class_zero = true,
+ const Coverage* glyph_filter = nullptr) const
{
TRACE_SUBSET (this);
const hb_set_t &glyphset = *c->plan->glyphset_gsub ();
@@ -1742,9 +1932,12 @@ struct ClassDefFormat1
hb_codepoint_t start = startGlyph;
hb_codepoint_t end = start + classValue.len;
+
for (const hb_codepoint_t gid : + hb_range (start, end)
- | hb_filter (glyphset))
+ | hb_filter (glyphset))
{
+ if (glyph_filter && !glyph_filter->has(gid)) continue;
+
unsigned klass = classValue[gid - start];
if (!klass) continue;
@@ -1753,9 +1946,13 @@ struct ClassDefFormat1
orig_klasses.add (klass);
}
- ClassDef_remap_and_serialize (c->serializer, glyphset, gid_org_klass_map,
- glyphs, orig_klasses, klass_map);
- return_trace ((bool) glyphs);
+ unsigned glyph_count = glyph_filter
+ ? hb_len (hb_iter (glyphset) | hb_filter (glyph_filter))
+ : glyphset.get_population ();
+ use_class_zero = use_class_zero && glyph_count <= gid_org_klass_map.get_population ();
+ ClassDef_remap_and_serialize (c->serializer, gid_org_klass_map,
+ glyphs, orig_klasses, use_class_zero, klass_map);
+ return_trace (keep_empty_table || (bool) glyphs);
}
bool sanitize (hb_sanitize_context_t *c) const
@@ -1829,10 +2026,28 @@ struct ClassDefFormat1
return false;
}
+ void intersected_class_glyphs (const hb_set_t *glyphs, unsigned klass, hb_set_t *intersect_glyphs) const
+ {
+ unsigned count = classValue.len;
+ if (klass == 0)
+ {
+ hb_codepoint_t endGlyph = startGlyph + count -1;
+ for (hb_codepoint_t g : glyphs->iter ())
+ if (g < startGlyph || g > endGlyph)
+ intersect_glyphs->add (g);
+
+ return;
+ }
+
+ for (unsigned i = 0; i < count; i++)
+ if (classValue[i] == klass && glyphs->has (startGlyph + i))
+ intersect_glyphs->add (startGlyph + i);
+ }
+
protected:
HBUINT16 classFormat; /* Format identifier--format = 1 */
HBGlyphID startGlyph; /* First GlyphID of the classValueArray */
- ArrayOf<HBUINT16>
+ Array16Of<HBUINT16>
classValue; /* Array of Class Values--one per GlyphID */
public:
DEFINE_SIZE_ARRAY (6, classValue);
@@ -1854,10 +2069,11 @@ struct ClassDefFormat2
Iterator it)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
if (unlikely (!it))
{
+ classFormat = 2;
rangeRecord.len = 0;
return_trace (true);
}
@@ -1903,7 +2119,10 @@ struct ClassDefFormat2
}
bool subset (hb_subset_context_t *c,
- hb_map_t *klass_map = nullptr /*OUT*/) const
+ hb_map_t *klass_map = nullptr /*OUT*/,
+ bool keep_empty_table = true,
+ bool use_class_zero = true,
+ const Coverage* glyph_filter = nullptr) const
{
TRACE_SUBSET (this);
const hb_set_t &glyphset = *c->plan->glyphset_gsub ();
@@ -1923,15 +2142,20 @@ struct ClassDefFormat2
for (hb_codepoint_t g = start; g < end; g++)
{
if (!glyphset.has (g)) continue;
+ if (glyph_filter && !glyph_filter->has (g)) continue;
glyphs.push (glyph_map[g]);
gid_org_klass_map.set (glyph_map[g], klass);
orig_klasses.add (klass);
}
}
- ClassDef_remap_and_serialize (c->serializer, glyphset, gid_org_klass_map,
- glyphs, orig_klasses, klass_map);
- return_trace ((bool) glyphs);
+ unsigned glyph_count = glyph_filter
+ ? hb_len (hb_iter (glyphset) | hb_filter (glyph_filter))
+ : glyphset.get_population ();
+ use_class_zero = use_class_zero && glyph_count <= gid_org_klass_map.get_population ();
+ ClassDef_remap_and_serialize (c->serializer, gid_org_klass_map,
+ glyphs, orig_klasses, use_class_zero, klass_map);
+ return_trace (keep_empty_table || (bool) glyphs);
}
bool sanitize (hb_sanitize_context_t *c) const
@@ -2005,9 +2229,57 @@ struct ClassDefFormat2
return false;
}
+ void intersected_class_glyphs (const hb_set_t *glyphs, unsigned klass, hb_set_t *intersect_glyphs) const
+ {
+ unsigned count = rangeRecord.len;
+ if (klass == 0)
+ {
+ hb_codepoint_t g = HB_SET_VALUE_INVALID;
+ for (unsigned int i = 0; i < count; i++)
+ {
+ if (!hb_set_next (glyphs, &g))
+ break;
+ while (g != HB_SET_VALUE_INVALID && g < rangeRecord[i].first)
+ {
+ intersect_glyphs->add (g);
+ hb_set_next (glyphs, &g);
+ }
+ g = rangeRecord[i].last;
+ }
+ while (g != HB_SET_VALUE_INVALID && hb_set_next (glyphs, &g))
+ intersect_glyphs->add (g);
+
+ return;
+ }
+
+ hb_codepoint_t g = HB_SET_VALUE_INVALID;
+ for (unsigned int i = 0; i < count; i++)
+ {
+ if (rangeRecord[i].value != klass) continue;
+
+ if (g != HB_SET_VALUE_INVALID)
+ {
+ if (g >= rangeRecord[i].first &&
+ g <= rangeRecord[i].last)
+ intersect_glyphs->add (g);
+ if (g > rangeRecord[i].last)
+ continue;
+ }
+
+ g = rangeRecord[i].first - 1;
+ while (hb_set_next (glyphs, &g))
+ {
+ if (g >= rangeRecord[i].first && g <= rangeRecord[i].last)
+ intersect_glyphs->add (g);
+ else if (g > rangeRecord[i].last)
+ break;
+ }
+ }
+ }
+
protected:
HBUINT16 classFormat; /* Format identifier--format = 2 */
- SortedArrayOf<RangeRecord>
+ SortedArray16Of<RangeRecord>
rangeRecord; /* Array of glyph ranges--ordered by
* Start GlyphID */
public:
@@ -2036,19 +2308,20 @@ struct ClassDef
template<typename Iterator,
hb_requires (hb_is_iterator (Iterator))>
- bool serialize (hb_serialize_context_t *c, Iterator it)
+ bool serialize (hb_serialize_context_t *c, Iterator it_with_class_zero)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
+
+ auto it = + it_with_class_zero | hb_filter (hb_second);
unsigned format = 2;
if (likely (it))
{
hb_codepoint_t glyph_min = (*it).first;
- hb_codepoint_t glyph_max = + it
- | hb_map (hb_first)
- | hb_reduce (hb_max, 0u);
+ hb_codepoint_t glyph_max = glyph_min;
+ unsigned num_glyphs = 0;
unsigned num_ranges = 1;
hb_codepoint_t prev_gid = glyph_min;
unsigned prev_klass = (*it).second;
@@ -2057,7 +2330,9 @@ struct ClassDef
{
hb_codepoint_t cur_gid = gid_klass_pair.first;
unsigned cur_klass = gid_klass_pair.second;
- if (cur_gid == glyph_min || !cur_klass) continue;
+ num_glyphs++;
+ if (cur_gid == glyph_min) continue;
+ if (cur_gid > glyph_max) glyph_max = cur_gid;
if (cur_gid != prev_gid + 1 ||
cur_klass != prev_klass)
num_ranges++;
@@ -2066,7 +2341,7 @@ struct ClassDef
prev_klass = cur_klass;
}
- if (1 + (glyph_max - glyph_min + 1) <= num_ranges * 3)
+ if (num_glyphs && 1 + (glyph_max - glyph_min + 1) <= num_ranges * 3)
format = 1;
}
u.format = format;
@@ -2080,12 +2355,15 @@ struct ClassDef
}
bool subset (hb_subset_context_t *c,
- hb_map_t *klass_map = nullptr /*OUT*/) const
+ hb_map_t *klass_map = nullptr /*OUT*/,
+ bool keep_empty_table = true,
+ bool use_class_zero = true,
+ const Coverage* glyph_filter = nullptr) const
{
TRACE_SUBSET (this);
switch (u.format) {
- case 1: return_trace (u.format1.subset (c, klass_map));
- case 2: return_trace (u.format2.subset (c, klass_map));
+ case 1: return_trace (u.format1.subset (c, klass_map, keep_empty_table, use_class_zero, glyph_filter));
+ case 2: return_trace (u.format2.subset (c, klass_map, keep_empty_table, use_class_zero, glyph_filter));
default:return_trace (false);
}
}
@@ -2142,6 +2420,15 @@ struct ClassDef
}
}
+ void intersected_class_glyphs (const hb_set_t *glyphs, unsigned klass, hb_set_t *intersect_glyphs) const
+ {
+ switch (u.format) {
+ case 1: return u.format1.intersected_class_glyphs (glyphs, klass, intersect_glyphs);
+ case 2: return u.format2.intersected_class_glyphs (glyphs, klass, intersect_glyphs);
+ default:return;
+ }
+ }
+
protected:
union {
HBUINT16 format; /* Format identifier */
@@ -2229,19 +2516,19 @@ struct VarRegionList
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- return_trace (c->check_struct (this) &&
- axesZ.sanitize (c, (unsigned int) axisCount * (unsigned int) regionCount));
+ return_trace (c->check_struct (this) && axesZ.sanitize (c, axisCount * regionCount));
}
bool serialize (hb_serialize_context_t *c, const VarRegionList *src, const hb_bimap_t &region_map)
{
TRACE_SERIALIZE (this);
- VarRegionList *out = c->allocate_min<VarRegionList> ();
- if (unlikely (!out)) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
axisCount = src->axisCount;
regionCount = region_map.get_population ();
- if (unlikely (!c->allocate_size<VarRegionList> (get_size () - min_size))) return_trace (false);
- unsigned int region_count = src->get_region_count ();
+ if (unlikely (hb_unsigned_mul_overflows (axisCount * regionCount,
+ VarRegionAxis::static_size))) return_trace (false);
+ if (unlikely (!c->extend (this))) return_trace (false);
+ unsigned int region_count = src->regionCount;
for (unsigned int r = 0; r < regionCount; r++)
{
unsigned int backward = region_map.backward (r);
@@ -2253,11 +2540,11 @@ struct VarRegionList
}
unsigned int get_size () const { return min_size + VarRegionAxis::static_size * axisCount * regionCount; }
- unsigned int get_region_count () const { return regionCount; }
- protected:
+ public:
HBUINT16 axisCount;
HBUINT16 regionCount;
+ protected:
UnsizedArrayOf<VarRegionAxis>
axesZ;
public:
@@ -2273,7 +2560,10 @@ struct VarData
{ return shortCount + regionIndices.len; }
unsigned int get_size () const
- { return itemCount * get_row_size (); }
+ { return min_size
+ - regionIndices.min_size + regionIndices.get_size ()
+ + itemCount * get_row_size ();
+ }
float get_delta (unsigned int inner,
const int *coords, unsigned int coord_count,
@@ -2307,10 +2597,10 @@ struct VarData
return delta;
}
- void get_scalars (const int *coords, unsigned int coord_count,
- const VarRegionList &regions,
- float *scalars /*OUT */,
- unsigned int num_scalars) const
+ void get_region_scalars (const int *coords, unsigned int coord_count,
+ const VarRegionList &regions,
+ float *scalars /*OUT */,
+ unsigned int num_scalars) const
{
unsigned count = hb_min (num_scalars, regionIndices.len);
for (unsigned int i = 0; i < count; i++)
@@ -2336,7 +2626,7 @@ struct VarData
const hb_bimap_t &region_map)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
itemCount = inner_map.get_next_value ();
/* Optimize short count */
@@ -2378,9 +2668,7 @@ struct VarData
shortCount = new_short_count;
regionIndices.len = new_ri_count;
- unsigned int size = regionIndices.get_size () - HBUINT16::static_size/*regionIndices.len*/ + (get_row_size () * itemCount);
- if (unlikely (!c->allocate_size<HBUINT8> (size)))
- return_trace (false);
+ if (unlikely (!c->extend (this))) return_trace (false);
for (r = 0; r < ri_count; r++)
if (delta_sz[r]) regionIndices[ri_map[r]] = region_map[src->regionIndices[r]];
@@ -2395,16 +2683,16 @@ struct VarData
return_trace (true);
}
- void collect_region_refs (hb_inc_bimap_t &region_map, const hb_inc_bimap_t &inner_map) const
+ void collect_region_refs (hb_set_t &region_indices, const hb_inc_bimap_t &inner_map) const
{
for (unsigned int r = 0; r < regionIndices.len; r++)
{
unsigned int region = regionIndices[r];
- if (region_map.has (region)) continue;
+ if (region_indices.has (region)) continue;
for (unsigned int i = 0; i < inner_map.get_next_value (); i++)
if (get_item_delta (inner_map.backward (i), r) != 0)
{
- region_map.add (region);
+ region_indices.add (region);
break;
}
}
@@ -2439,7 +2727,7 @@ struct VarData
protected:
HBUINT16 itemCount;
HBUINT16 shortCount;
- ArrayOf<HBUINT16> regionIndices;
+ Array16Of<HBUINT16> regionIndices;
/*UnsizedArrayOf<HBUINT8>bytesX;*/
public:
DEFINE_SIZE_ARRAY (6, regionIndices);
@@ -2447,6 +2735,7 @@ struct VarData
struct VariationStore
{
+ private:
float get_delta (unsigned int outer, unsigned int inner,
const int *coords, unsigned int coord_count) const
{
@@ -2462,6 +2751,7 @@ struct VariationStore
this+regions);
}
+ public:
float get_delta (unsigned int index,
const int *coords, unsigned int coord_count) const
{
@@ -2488,32 +2778,48 @@ struct VariationStore
const hb_array_t <hb_inc_bimap_t> &inner_maps)
{
TRACE_SERIALIZE (this);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
+
unsigned int set_count = 0;
for (unsigned int i = 0; i < inner_maps.length; i++)
- if (inner_maps[i].get_population () > 0) set_count++;
+ if (inner_maps[i].get_population ())
+ set_count++;
- unsigned int size = min_size + HBUINT32::static_size * set_count;
- if (unlikely (!c->allocate_size<HBUINT32> (size))) return_trace (false);
format = 1;
- hb_inc_bimap_t region_map;
+ const auto &src_regions = src+src->regions;
+
+ hb_set_t region_indices;
for (unsigned int i = 0; i < inner_maps.length; i++)
- (src+src->dataSets[i]).collect_region_refs (region_map, inner_maps[i]);
- region_map.sort ();
+ (src+src->dataSets[i]).collect_region_refs (region_indices, inner_maps[i]);
- if (unlikely (!regions.serialize (c, this)
- .serialize (c, &(src+src->regions), region_map))) return_trace (false);
+ if (region_indices.in_error ())
+ return_trace (false);
+
+ region_indices.del_range ((src_regions).regionCount, hb_set_t::INVALID);
+
+ /* TODO use constructor when our data-structures support that. */
+ hb_inc_bimap_t region_map;
+ + hb_iter (region_indices)
+ | hb_apply ([&region_map] (unsigned _) { region_map.add(_); })
+ ;
+ if (region_map.in_error())
+ return_trace (false);
+
+ if (unlikely (!regions.serialize_serialize (c, &src_regions, region_map)))
+ return_trace (false);
- /* TODO: The following code could be simplified when
- * OffsetListOf::subset () can take a custom param to be passed to VarData::serialize ()
- */
dataSets.len = set_count;
+ if (unlikely (!c->extend (dataSets))) return_trace (false);
+
+ /* TODO: The following code could be simplified when
+ * List16OfOffset16To::subset () can take a custom param to be passed to VarData::serialize () */
unsigned int set_index = 0;
for (unsigned int i = 0; i < inner_maps.length; i++)
{
- if (inner_maps[i].get_population () == 0) continue;
- if (unlikely (!dataSets[set_index++].serialize (c, this)
- .serialize (c, &(src+src->dataSets[i]), inner_maps[i], region_map)))
+ if (!inner_maps[i].get_population ()) continue;
+ if (unlikely (!dataSets[set_index++]
+ .serialize_serialize (c, &(src+src->dataSets[i]), inner_maps[i], region_map)))
return_trace (false);
}
@@ -2558,13 +2864,13 @@ struct VariationStore
&& varstore_prime->dataSets);
}
- unsigned int get_region_index_count (unsigned int ivs) const
- { return (this+dataSets[ivs]).get_region_index_count (); }
+ unsigned int get_region_index_count (unsigned int major) const
+ { return (this+dataSets[major]).get_region_index_count (); }
- void get_scalars (unsigned int ivs,
- const int *coords, unsigned int coord_count,
- float *scalars /*OUT*/,
- unsigned int num_scalars) const
+ void get_region_scalars (unsigned int major,
+ const int *coords, unsigned int coord_count,
+ float *scalars /*OUT*/,
+ unsigned int num_scalars) const
{
#ifdef HB_NO_VAR
for (unsigned i = 0; i < num_scalars; i++)
@@ -2572,18 +2878,19 @@ struct VariationStore
return;
#endif
- (this+dataSets[ivs]).get_scalars (coords, coord_count, this+regions,
- &scalars[0], num_scalars);
+ (this+dataSets[major]).get_region_scalars (coords, coord_count,
+ this+regions,
+ &scalars[0], num_scalars);
}
unsigned int get_sub_table_count () const { return dataSets.len; }
protected:
HBUINT16 format;
- LOffsetTo<VarRegionList> regions;
- LOffsetArrayOf<VarData> dataSets;
+ Offset32To<VarRegionList> regions;
+ Array16OfOffset32To<VarData> dataSets;
public:
- DEFINE_SIZE_ARRAY (8, dataSets);
+ DEFINE_SIZE_ARRAY_SIZED (8, dataSets);
};
/*
@@ -2684,7 +2991,8 @@ struct ConditionSet
+ conditions.iter ()
| hb_apply (subset_offset_array (c, out->conditions, this))
;
- return_trace (true);
+
+ return_trace (bool (out->conditions));
}
bool sanitize (hb_sanitize_context_t *c) const
@@ -2694,7 +3002,7 @@ struct ConditionSet
}
protected:
- LOffsetArrayOf<Condition> conditions;
+ Array16OfOffset32To<Condition> conditions;
public:
DEFINE_SIZE_ARRAY (2, conditions);
};
@@ -2719,6 +3027,12 @@ struct FeatureTableSubstitutionRecord
bool subset (hb_subset_layout_context_t *c, const void *base) const
{
TRACE_SUBSET (this);
+ if (!c->feature_index_map->has (featureIndex)) {
+ // Feature that is being substituted is not being retained, so we don't
+ // need this.
+ return_trace (false);
+ }
+
auto *out = c->subset_context->serializer->embed (this);
if (unlikely (!out)) return_trace (false);
@@ -2735,7 +3049,7 @@ struct FeatureTableSubstitutionRecord
protected:
HBUINT16 featureIndex;
- LOffsetTo<Feature> feature;
+ Offset32To<Feature> feature;
public:
DEFINE_SIZE_STATIC (6);
};
@@ -2771,6 +3085,15 @@ struct FeatureTableSubstitution
record.closure_features (this, lookup_indexes, feature_indexes);
}
+ bool intersects_features (const hb_map_t *feature_index_map) const
+ {
+ for (const FeatureTableSubstitutionRecord& record : substitutions)
+ {
+ if (feature_index_map->has (record.featureIndex)) return true;
+ }
+ return false;
+ }
+
bool subset (hb_subset_context_t *c,
hb_subset_layout_context_t *l) const
{
@@ -2784,7 +3107,8 @@ struct FeatureTableSubstitution
+ substitutions.iter ()
| hb_apply (subset_record_array (l, &(out->substitutions), this))
;
- return_trace (true);
+
+ return_trace (bool (out->substitutions));
}
bool sanitize (hb_sanitize_context_t *c) const
@@ -2797,7 +3121,7 @@ struct FeatureTableSubstitution
protected:
FixedVersion<> version; /* Version--0x00010000u */
- ArrayOf<FeatureTableSubstitutionRecord>
+ Array16Of<FeatureTableSubstitutionRecord>
substitutions;
public:
DEFINE_SIZE_ARRAY (6, substitutions);
@@ -2821,6 +3145,11 @@ struct FeatureVariationRecord
(base+substitutions).closure_features (lookup_indexes, feature_indexes);
}
+ bool intersects_features (const void *base, const hb_map_t *feature_index_map) const
+ {
+ return (base+substitutions).intersects_features (feature_index_map);
+ }
+
bool subset (hb_subset_layout_context_t *c, const void *base) const
{
TRACE_SUBSET (this);
@@ -2841,9 +3170,9 @@ struct FeatureVariationRecord
}
protected:
- LOffsetTo<ConditionSet>
+ Offset32To<ConditionSet>
conditions;
- LOffsetTo<FeatureTableSubstitution>
+ Offset32To<FeatureTableSubstitution>
substitutions;
public:
DEFINE_SIZE_STATIC (8);
@@ -2907,9 +3236,18 @@ struct FeatureVariations
out->version.major = version.major;
out->version.minor = version.minor;
- + varRecords.iter ()
- | hb_apply (subset_record_array (l, &(out->varRecords), this))
- ;
+ int keep_up_to = -1;
+ for (int i = varRecords.len - 1; i >= 0; i--) {
+ if (varRecords[i].intersects_features (this, l->feature_index_map)) {
+ keep_up_to = i;
+ break;
+ }
+ }
+
+ unsigned count = (unsigned) (keep_up_to + 1);
+ for (unsigned i = 0; i < count; i++) {
+ subset_record_array (l, &(out->varRecords), this) (varRecords[i]);
+ }
return_trace (bool (out->varRecords));
}
@@ -2923,7 +3261,7 @@ struct FeatureVariations
protected:
FixedVersion<> version; /* Version--0x00010000u */
- LArrayOf<FeatureVariationRecord>
+ Array32Of<FeatureVariationRecord>
varRecords;
public:
DEFINE_SIZE_ARRAY_SIZED (8, varRecords);
@@ -3036,22 +3374,20 @@ struct VariationDevice
if (unlikely (!out)) return_trace (nullptr);
if (!layout_variation_idx_map || layout_variation_idx_map->is_empty ()) return_trace (out);
- unsigned org_idx = (outerIndex << 16) + innerIndex;
- if (!layout_variation_idx_map->has (org_idx))
+ /* TODO Just get() and bail if NO_VARIATION. Needs to setup the map to return that. */
+ if (!layout_variation_idx_map->has (varIdx))
{
c->revert (snap);
return_trace (nullptr);
}
- unsigned new_idx = layout_variation_idx_map->get (org_idx);
- out->outerIndex = new_idx >> 16;
- out->innerIndex = new_idx & 0xFFFF;
+ unsigned new_idx = layout_variation_idx_map->get (varIdx);
+ out->varIdx = new_idx;
return_trace (out);
}
void record_variation_index (hb_set_t *layout_variation_indices) const
{
- unsigned var_idx = (outerIndex << 16) + innerIndex;
- layout_variation_indices->add (var_idx);
+ layout_variation_indices->add (varIdx);
}
bool sanitize (hb_sanitize_context_t *c) const
@@ -3064,12 +3400,11 @@ struct VariationDevice
float get_delta (hb_font_t *font, const VariationStore &store) const
{
- return store.get_delta (outerIndex, innerIndex, font->coords, font->num_coords);
+ return store.get_delta (varIdx, font->coords, font->num_coords);
}
protected:
- HBUINT16 outerIndex;
- HBUINT16 innerIndex;
+ VarIdx varIdx;
HBUINT16 deltaFormat; /* Format identifier for this table: 0x0x8000 */
public:
DEFINE_SIZE_STATIC (6);
diff --git a/thirdparty/harfbuzz/src/hb-ot-layout-gdef-table.hh b/thirdparty/harfbuzz/src/hb-ot-layout-gdef-table.hh
index 437e760f64..31a4a3e84c 100644
--- a/thirdparty/harfbuzz/src/hb-ot-layout-gdef-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-layout-gdef-table.hh
@@ -42,7 +42,7 @@ namespace OT {
*/
/* Array of contour point indices--in increasing numerical order */
-struct AttachPoint : ArrayOf<HBUINT16>
+struct AttachPoint : Array16Of<HBUINT16>
{
bool subset (hb_subset_context_t *c) const
{
@@ -98,8 +98,7 @@ struct AttachList
| hb_map (glyph_map)
| hb_sink (new_coverage)
;
- out->coverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_coverage.iter ());
+ out->coverage.serialize_serialize (c->serializer, new_coverage.iter ());
return_trace (bool (new_coverage));
}
@@ -110,10 +109,10 @@ struct AttachList
}
protected:
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table -- from
* beginning of AttachList table */
- OffsetArrayOf<AttachPoint>
+ Array16OfOffset16To<AttachPoint>
attachPoint; /* Array of AttachPoint tables
* in Coverage Index order */
public:
@@ -220,7 +219,7 @@ struct CaretValueFormat3
protected:
HBUINT16 caretValueFormat; /* Format identifier--format = 3 */
FWORD coordinate; /* X or Y value, in design units */
- OffsetTo<Device>
+ Offset16To<Device>
deviceTable; /* Offset to Device table for X or Y
* value--from beginning of CaretValue
* table */
@@ -329,7 +328,7 @@ struct LigGlyph
void collect_variation_indices (hb_collect_variation_indices_context_t *c) const
{
- for (const OffsetTo<CaretValue>& offset : carets.iter ())
+ for (const Offset16To<CaretValue>& offset : carets.iter ())
(this+offset).collect_variation_indices (c->layout_variation_indices);
}
@@ -340,7 +339,7 @@ struct LigGlyph
}
protected:
- OffsetArrayOf<CaretValue>
+ Array16OfOffset16To<CaretValue>
carets; /* Offset array of CaretValue tables
* --from beginning of LigGlyph table
* --in increasing coordinate order */
@@ -386,8 +385,7 @@ struct LigCaretList
| hb_map (glyph_map)
| hb_sink (new_coverage)
;
- out->coverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_coverage.iter ());
+ out->coverage.serialize_serialize (c->serializer, new_coverage.iter ());
return_trace (bool (new_coverage));
}
@@ -408,10 +406,10 @@ struct LigCaretList
}
protected:
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of LigCaretList table */
- OffsetArrayOf<LigGlyph>
+ Array16OfOffset16To<LigGlyph>
ligGlyph; /* Array of LigGlyph tables
* in Coverage Index order */
public:
@@ -432,7 +430,7 @@ struct MarkGlyphSetsFormat1
out->format = format;
bool ret = true;
- for (const LOffsetTo<Coverage>& offset : coverage.iter ())
+ for (const Offset32To<Coverage>& offset : coverage.iter ())
{
auto *o = out->coverage.serialize_append (c->serializer);
if (unlikely (!o))
@@ -460,7 +458,7 @@ struct MarkGlyphSetsFormat1
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- ArrayOf<LOffsetTo<Coverage>>
+ Array16Of<Offset32To<Coverage>>
coverage; /* Array of long offsets to mark set
* coverage tables */
public:
@@ -643,10 +641,10 @@ struct GDEF
auto *out = c->serializer->embed (*this);
if (unlikely (!out)) return_trace (false);
- bool subset_glyphclassdef = out->glyphClassDef.serialize_subset (c, glyphClassDef, this);
+ bool subset_glyphclassdef = out->glyphClassDef.serialize_subset (c, glyphClassDef, this, nullptr, false, true);
bool subset_attachlist = out->attachList.serialize_subset (c, attachList, this);
bool subset_ligcaretlist = out->ligCaretList.serialize_subset (c, ligCaretList, this);
- bool subset_markattachclassdef = out->markAttachClassDef.serialize_subset (c, markAttachClassDef, this);
+ bool subset_markattachclassdef = out->markAttachClassDef.serialize_subset (c, markAttachClassDef, this, nullptr, false, true);
bool subset_markglyphsetsdef = true;
if (version.to_int () >= 0x00010002u)
@@ -687,28 +685,28 @@ struct GDEF
protected:
FixedVersion<>version; /* Version of the GDEF table--currently
* 0x00010003u */
- OffsetTo<ClassDef>
+ Offset16To<ClassDef>
glyphClassDef; /* Offset to class definition table
* for glyph type--from beginning of
* GDEF header (may be Null) */
- OffsetTo<AttachList>
+ Offset16To<AttachList>
attachList; /* Offset to list of glyphs with
* attachment points--from beginning
* of GDEF header (may be Null) */
- OffsetTo<LigCaretList>
+ Offset16To<LigCaretList>
ligCaretList; /* Offset to list of positioning points
* for ligature carets--from beginning
* of GDEF header (may be Null) */
- OffsetTo<ClassDef>
+ Offset16To<ClassDef>
markAttachClassDef; /* Offset to class definition table for
* mark attachment type--from beginning
* of GDEF header (may be Null) */
- OffsetTo<MarkGlyphSets>
+ Offset16To<MarkGlyphSets>
markGlyphSetsDef; /* Offset to the table of mark set
* definitions--from beginning of GDEF
* header (may be NULL). Introduced
* in version 0x00010002. */
- LOffsetTo<VariationStore>
+ Offset32To<VariationStore>
varStore; /* Offset to the table of Item Variation
* Store--from beginning of GDEF
* header (may be NULL). Introduced
diff --git a/thirdparty/harfbuzz/src/hb-ot-layout-gpos-table.hh b/thirdparty/harfbuzz/src/hb-ot-layout-gpos-table.hh
index f523e35c00..1e305518f5 100644
--- a/thirdparty/harfbuzz/src/hb-ot-layout-gpos-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-layout-gpos-table.hh
@@ -89,20 +89,22 @@ struct ValueFormat : HBUINT16
HBINT16 yAdvance; /* Vertical adjustment for advance--in
* design units (only used for vertical
* writing) */
- OffsetTo<Device> xPlaDevice; /* Offset to Device table for
+ Offset16To<Device> xPlaDevice; /* Offset to Device table for
* horizontal placement--measured from
* beginning of PosTable (may be NULL) */
- OffsetTo<Device> yPlaDevice; /* Offset to Device table for vertical
+ Offset16To<Device> yPlaDevice; /* Offset to Device table for vertical
* placement--measured from beginning
* of PosTable (may be NULL) */
- OffsetTo<Device> xAdvDevice; /* Offset to Device table for
+ Offset16To<Device> xAdvDevice; /* Offset to Device table for
* horizontal advance--measured from
* beginning of PosTable (may be NULL) */
- OffsetTo<Device> yAdvDevice; /* Offset to Device table for vertical
+ Offset16To<Device> yAdvDevice; /* Offset to Device table for vertical
* advance--measured from beginning of
* PosTable (may be NULL) */
#endif
+ IntType& operator = (uint16_t i) { v = i; return *this; }
+
unsigned int get_len () const { return hb_popcount ((unsigned int) *this); }
unsigned int get_size () const { return get_len () * Value::static_size; }
@@ -160,16 +162,40 @@ struct ValueFormat : HBUINT16
return ret;
}
- void serialize_copy (hb_serialize_context_t *c, const void *base,
- const Value *values, const hb_map_t *layout_variation_idx_map) const
+ unsigned int get_effective_format (const Value *values) const
+ {
+ unsigned int format = *this;
+ for (unsigned flag = xPlacement; flag <= yAdvDevice; flag = flag << 1) {
+ if (format & flag) should_drop (*values++, (Flags) flag, &format);
+ }
+
+ return format;
+ }
+
+ template<typename Iterator,
+ hb_requires (hb_is_iterator (Iterator))>
+ unsigned int get_effective_format (Iterator it) const {
+ unsigned int new_format = 0;
+
+ for (const hb_array_t<const Value>& values : it)
+ new_format = new_format | get_effective_format (&values);
+
+ return new_format;
+ }
+
+ void copy_values (hb_serialize_context_t *c,
+ unsigned int new_format,
+ const void *base,
+ const Value *values,
+ const hb_map_t *layout_variation_idx_map) const
{
unsigned int format = *this;
if (!format) return;
- if (format & xPlacement) c->copy (*values++);
- if (format & yPlacement) c->copy (*values++);
- if (format & xAdvance) c->copy (*values++);
- if (format & yAdvance) c->copy (*values++);
+ if (format & xPlacement) copy_value (c, new_format, xPlacement, *values++);
+ if (format & yPlacement) copy_value (c, new_format, yPlacement, *values++);
+ if (format & xAdvance) copy_value (c, new_format, xAdvance, *values++);
+ if (format & yAdvance) copy_value (c, new_format, yAdvance, *values++);
if (format & xPlaDevice) copy_device (c, base, values++, layout_variation_idx_map);
if (format & yPlaDevice) copy_device (c, base, values++, layout_variation_idx_map);
@@ -177,6 +203,16 @@ struct ValueFormat : HBUINT16
if (format & yAdvDevice) copy_device (c, base, values++, layout_variation_idx_map);
}
+ void copy_value (hb_serialize_context_t *c,
+ unsigned int new_format,
+ Flags flag,
+ Value value) const
+ {
+ // Filter by new format.
+ if (!(new_format & flag)) return;
+ c->copy (value);
+ }
+
void collect_variation_indices (hb_collect_variation_indices_context_t *c,
const void *base,
const hb_array_t<const Value>& values) const
@@ -232,14 +268,14 @@ struct ValueFormat : HBUINT16
return true;
}
- static inline OffsetTo<Device>& get_device (Value* value)
+ static inline Offset16To<Device>& get_device (Value* value)
{
- return *static_cast<OffsetTo<Device> *> (value);
+ return *static_cast<Offset16To<Device> *> (value);
}
- static inline const OffsetTo<Device>& get_device (const Value* value, bool *worked=nullptr)
+ static inline const Offset16To<Device>& get_device (const Value* value, bool *worked=nullptr)
{
if (worked) *worked |= bool (*value);
- return *static_cast<const OffsetTo<Device> *> (value);
+ return *static_cast<const Offset16To<Device> *> (value);
}
bool copy_device (hb_serialize_context_t *c, const void *base,
@@ -317,13 +353,21 @@ struct ValueFormat : HBUINT16
return_trace (true);
}
+
+ private:
+
+ void should_drop (Value value, Flags flag, unsigned int* format) const
+ {
+ if (value) return;
+ *format = *format & ~flag;
+ }
+
};
-template<typename Iterator>
+template<typename Iterator, typename SrcLookup>
static void SinglePos_serialize (hb_serialize_context_t *c,
- const void *src,
+ const SrcLookup *src,
Iterator it,
- ValueFormat valFormat,
const hb_map_t *layout_variation_idx_map);
@@ -346,7 +390,10 @@ struct AnchorFormat1
AnchorFormat1* copy (hb_serialize_context_t *c) const
{
TRACE_SERIALIZE (this);
- return_trace (c->embed<AnchorFormat1> (this));
+ AnchorFormat1* out = c->embed<AnchorFormat1> (this);
+ if (!out) return_trace (out);
+ out->format = 1;
+ return_trace (out);
}
protected:
@@ -447,11 +494,11 @@ struct AnchorFormat3
HBUINT16 format; /* Format identifier--format = 3 */
FWORD xCoordinate; /* Horizontal value--in design units */
FWORD yCoordinate; /* Vertical value--in design units */
- OffsetTo<Device>
+ Offset16To<Device>
xDeviceTable; /* Offset to Device table for X
* coordinate-- from beginning of
* Anchor table (may be NULL) */
- OffsetTo<Device>
+ Offset16To<Device>
yDeviceTable; /* Offset to Device table for Y
* coordinate-- from beginning of
* Anchor table (may be NULL) */
@@ -485,14 +532,22 @@ struct Anchor
}
}
- Anchor* copy (hb_serialize_context_t *c, const hb_map_t *layout_variation_idx_map) const
+ bool subset (hb_subset_context_t *c) const
{
- TRACE_SERIALIZE (this);
+ TRACE_SUBSET (this);
switch (u.format) {
- case 1: return_trace (reinterpret_cast<Anchor *> (u.format1.copy (c)));
- case 2: return_trace (reinterpret_cast<Anchor *> (u.format2.copy (c)));
- case 3: return_trace (reinterpret_cast<Anchor *> (u.format3.copy (c, layout_variation_idx_map)));
- default:return_trace (nullptr);
+ case 1: return_trace (bool (reinterpret_cast<Anchor *> (u.format1.copy (c->serializer))));
+ case 2:
+ if (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING)
+ {
+ // AnchorFormat 2 just containins extra hinting information, so
+ // if hints are being dropped convert to format 1.
+ return_trace (bool (reinterpret_cast<Anchor *> (u.format1.copy (c->serializer))));
+ }
+ return_trace (bool (reinterpret_cast<Anchor *> (u.format2.copy (c->serializer))));
+ case 3: return_trace (bool (reinterpret_cast<Anchor *> (u.format3.copy (c->serializer,
+ c->plan->layout_variation_idx_map))));
+ default:return_trace (false);
}
}
@@ -541,51 +596,29 @@ struct AnchorMatrix
}
template <typename Iterator,
- hb_requires (hb_is_iterator (Iterator))>
- bool serialize (hb_serialize_context_t *c,
- unsigned num_rows,
- AnchorMatrix const *offset_matrix,
- const hb_map_t *layout_variation_idx_map,
- Iterator index_iter)
+ hb_requires (hb_is_iterator (Iterator))>
+ bool subset (hb_subset_context_t *c,
+ unsigned num_rows,
+ Iterator index_iter) const
{
- TRACE_SERIALIZE (this);
+ TRACE_SUBSET (this);
+
+ auto *out = c->serializer->start_embed (this);
+
if (!index_iter) return_trace (false);
- if (unlikely (!c->extend_min ((*this)))) return_trace (false);
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
- this->rows = num_rows;
+ out->rows = num_rows;
for (const unsigned i : index_iter)
{
- auto *offset = c->embed (offset_matrix->matrixZ[i]);
+ auto *offset = c->serializer->embed (matrixZ[i]);
if (!offset) return_trace (false);
- offset->serialize_copy (c, offset_matrix->matrixZ[i],
- offset_matrix, c->to_bias (this),
- hb_serialize_context_t::Head,
- layout_variation_idx_map);
+ offset->serialize_subset (c, matrixZ[i], this);
}
return_trace (true);
}
- bool subset (hb_subset_context_t *c,
- unsigned cols,
- const hb_map_t *klass_mapping) const
- {
- TRACE_SUBSET (this);
- auto *out = c->serializer->start_embed (*this);
-
- auto indexes =
- + hb_range (rows * cols)
- | hb_filter ([=] (unsigned index) { return klass_mapping->has (index % cols); })
- ;
-
- out->serialize (c->serializer,
- (unsigned) rows,
- this,
- c->plan->layout_variation_idx_map,
- indexes);
- return_trace (true);
- }
-
bool sanitize (hb_sanitize_context_t *c, unsigned int cols) const
{
TRACE_SANITIZE (this);
@@ -599,7 +632,7 @@ struct AnchorMatrix
}
HBUINT16 rows; /* Number of rows */
- UnsizedArrayOf<OffsetTo<Anchor>>
+ UnsizedArrayOf<Offset16To<Anchor>>
matrixZ; /* Matrix of offsets to Anchor tables--
* from beginning of AnchorMatrix table */
public:
@@ -618,18 +651,16 @@ struct MarkRecord
return_trace (c->check_struct (this) && markAnchor.sanitize (c, base));
}
- MarkRecord *copy (hb_serialize_context_t *c,
- const void *src_base,
- unsigned dst_bias,
- const hb_map_t *klass_mapping,
- const hb_map_t *layout_variation_idx_map) const
+ MarkRecord *subset (hb_subset_context_t *c,
+ const void *src_base,
+ const hb_map_t *klass_mapping) const
{
- TRACE_SERIALIZE (this);
- auto *out = c->embed (this);
+ TRACE_SUBSET (this);
+ auto *out = c->serializer->embed (this);
if (unlikely (!out)) return_trace (nullptr);
out->klass = klass_mapping->get (klass);
- out->markAnchor.serialize_copy (c, markAnchor, src_base, dst_bias, hb_serialize_context_t::Head, layout_variation_idx_map);
+ out->markAnchor.serialize_subset (c, markAnchor, src_base);
return_trace (out);
}
@@ -641,14 +672,14 @@ struct MarkRecord
protected:
HBUINT16 klass; /* Class defined for this mark */
- OffsetTo<Anchor>
+ Offset16To<Anchor>
markAnchor; /* Offset to Anchor table--from
* beginning of MarkArray table */
public:
DEFINE_SIZE_STATIC (4);
};
-struct MarkArray : ArrayOf<MarkRecord> /* Array of MarkRecords--in Coverage order */
+struct MarkArray : Array16Of<MarkRecord> /* Array of MarkRecords--in Coverage order */
{
bool apply (hb_ot_apply_context_t *c,
unsigned int mark_index, unsigned int glyph_index,
@@ -657,7 +688,7 @@ struct MarkArray : ArrayOf<MarkRecord> /* Array of MarkRecords--in Coverage orde
{
TRACE_APPLY (this);
hb_buffer_t *buffer = c->buffer;
- const MarkRecord &record = ArrayOf<MarkRecord>::operator[](mark_index);
+ const MarkRecord &record = Array16Of<MarkRecord>::operator[](mark_index);
unsigned int mark_class = record.klass;
const Anchor& mark_anchor = this + record.markAnchor;
@@ -684,25 +715,42 @@ struct MarkArray : ArrayOf<MarkRecord> /* Array of MarkRecords--in Coverage orde
return_trace (true);
}
- template<typename Iterator,
- hb_requires (hb_is_source_of (Iterator, MarkRecord))>
- bool serialize (hb_serialize_context_t *c,
- const hb_map_t *klass_mapping,
- const hb_map_t *layout_variation_idx_map,
- const void *base,
- Iterator it)
+ template <typename Iterator,
+ hb_requires (hb_is_iterator (Iterator))>
+ bool subset (hb_subset_context_t *c,
+ Iterator coverage,
+ const hb_map_t *klass_mapping) const
{
- TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
- if (unlikely (!c->check_assign (len, it.len ()))) return_trace (false);
- c->copy_all (it, base, c->to_bias (this), klass_mapping, layout_variation_idx_map);
+ TRACE_SUBSET (this);
+ const hb_set_t &glyphset = *c->plan->glyphset_gsub ();
+
+ auto* out = c->serializer->start_embed (this);
+ if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
+
+ auto mark_iter =
+ + hb_zip (coverage, this->iter ())
+ | hb_filter (glyphset, hb_first)
+ | hb_map (hb_second)
+ ;
+
+ unsigned new_length = 0;
+ for (const auto& mark_record : mark_iter) {
+ if (unlikely (!mark_record.subset (c, this, klass_mapping)))
+ return_trace (false);
+ new_length++;
+ }
+
+ if (unlikely (!c->serializer->check_assign (out->len, new_length,
+ HB_SERIALIZE_ERROR_ARRAY_OVERFLOW)))
+ return_trace (false);
+
return_trace (true);
}
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- return_trace (ArrayOf<MarkRecord>::sanitize (c, this));
+ return_trace (Array16Of<MarkRecord>::sanitize (c, this));
}
};
@@ -733,6 +781,8 @@ struct SinglePosFormat1
const Coverage &get_coverage () const { return this+coverage; }
+ ValueFormat get_value_format () const { return valueFormat; }
+
bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
@@ -747,29 +797,33 @@ struct SinglePosFormat1
}
template<typename Iterator,
- hb_requires (hb_is_iterator (Iterator))>
+ typename SrcLookup,
+ hb_requires (hb_is_iterator (Iterator))>
void serialize (hb_serialize_context_t *c,
- const void *src,
+ const SrcLookup *src,
Iterator it,
- ValueFormat valFormat,
+ ValueFormat newFormat,
const hb_map_t *layout_variation_idx_map)
{
- auto out = c->extend_min (*this);
- if (unlikely (!out)) return;
- if (unlikely (!c->check_assign (valueFormat, valFormat))) return;
+ if (unlikely (!c->extend_min (this))) return;
+ if (unlikely (!c->check_assign (valueFormat,
+ newFormat,
+ HB_SERIALIZE_ERROR_INT_OVERFLOW))) return;
- + it
- | hb_map (hb_second)
- | hb_apply ([&] (hb_array_t<const Value> _)
- { valFormat.serialize_copy (c, src, &_, layout_variation_idx_map); })
- ;
+ for (const hb_array_t<const Value>& _ : + it | hb_map (hb_second))
+ {
+ src->get_value_format ().copy_values (c, newFormat, src, &_, layout_variation_idx_map);
+ // Only serialize the first entry in the iterator, the rest are assumed to
+ // be the same.
+ break;
+ }
auto glyphs =
+ it
| hb_map_retains_sorting (hb_first)
;
- coverage.serialize (c, this).serialize (c, glyphs);
+ coverage.serialize_serialize (c, glyphs);
}
bool subset (hb_subset_context_t *c) const
@@ -786,7 +840,7 @@ struct SinglePosFormat1
;
bool ret = bool (it);
- SinglePos_serialize (c->serializer, this, it, valueFormat, c->plan->layout_variation_idx_map);
+ SinglePos_serialize (c->serializer, this, it, c->plan->layout_variation_idx_map);
return_trace (ret);
}
@@ -800,7 +854,7 @@ struct SinglePosFormat1
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of subtable */
ValueFormat valueFormat; /* Defines the types of data in the
@@ -843,6 +897,8 @@ struct SinglePosFormat2
const Coverage &get_coverage () const { return this+coverage; }
+ ValueFormat get_value_format () const { return valueFormat; }
+
bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
@@ -861,22 +917,23 @@ struct SinglePosFormat2
}
template<typename Iterator,
- hb_requires (hb_is_iterator (Iterator))>
+ typename SrcLookup,
+ hb_requires (hb_is_iterator (Iterator))>
void serialize (hb_serialize_context_t *c,
- const void *src,
+ const SrcLookup *src,
Iterator it,
- ValueFormat valFormat,
+ ValueFormat newFormat,
const hb_map_t *layout_variation_idx_map)
{
- auto out = c->extend_min (*this);
+ auto out = c->extend_min (this);
if (unlikely (!out)) return;
- if (unlikely (!c->check_assign (valueFormat, valFormat))) return;
- if (unlikely (!c->check_assign (valueCount, it.len ()))) return;
+ if (unlikely (!c->check_assign (valueFormat, newFormat, HB_SERIALIZE_ERROR_INT_OVERFLOW))) return;
+ if (unlikely (!c->check_assign (valueCount, it.len (), HB_SERIALIZE_ERROR_ARRAY_OVERFLOW))) return;
+ it
| hb_map (hb_second)
| hb_apply ([&] (hb_array_t<const Value> _)
- { valFormat.serialize_copy (c, src, &_, layout_variation_idx_map); })
+ { src->get_value_format ().copy_values (c, newFormat, src, &_, layout_variation_idx_map); })
;
auto glyphs =
@@ -884,7 +941,7 @@ struct SinglePosFormat2
| hb_map_retains_sorting (hb_first)
;
- coverage.serialize (c, this).serialize (c, glyphs);
+ coverage.serialize_serialize (c, glyphs);
}
bool subset (hb_subset_context_t *c) const
@@ -908,7 +965,7 @@ struct SinglePosFormat2
;
bool ret = bool (it);
- SinglePos_serialize (c->serializer, this, it, valueFormat, c->plan->layout_variation_idx_map);
+ SinglePos_serialize (c->serializer, this, it, c->plan->layout_variation_idx_map);
return_trace (ret);
}
@@ -922,7 +979,7 @@ struct SinglePosFormat2
protected:
HBUINT16 format; /* Format identifier--format = 2 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of subtable */
ValueFormat valueFormat; /* Defines the types of data in the
@@ -952,24 +1009,37 @@ struct SinglePos
template<typename Iterator,
- hb_requires (hb_is_iterator (Iterator))>
+ typename SrcLookup,
+ hb_requires (hb_is_iterator (Iterator))>
void serialize (hb_serialize_context_t *c,
- const void *src,
+ const SrcLookup* src,
Iterator glyph_val_iter_pairs,
- ValueFormat valFormat,
const hb_map_t *layout_variation_idx_map)
{
if (unlikely (!c->extend_min (u.format))) return;
unsigned format = 2;
+ ValueFormat new_format = src->get_value_format ();
- if (glyph_val_iter_pairs) format = get_format (glyph_val_iter_pairs);
+ if (glyph_val_iter_pairs)
+ {
+ format = get_format (glyph_val_iter_pairs);
+ new_format = src->get_value_format ().get_effective_format (+ glyph_val_iter_pairs | hb_map (hb_second));
+ }
u.format = format;
switch (u.format) {
- case 1: u.format1.serialize (c, src, glyph_val_iter_pairs, valFormat, layout_variation_idx_map);
- return;
- case 2: u.format2.serialize (c, src, glyph_val_iter_pairs, valFormat, layout_variation_idx_map);
- return;
+ case 1: u.format1.serialize (c,
+ src,
+ glyph_val_iter_pairs,
+ new_format,
+ layout_variation_idx_map);
+ return;
+ case 2: u.format2.serialize (c,
+ src,
+ glyph_val_iter_pairs,
+ new_format,
+ layout_variation_idx_map);
+ return;
default:return;
}
}
@@ -994,14 +1064,13 @@ struct SinglePos
} u;
};
-template<typename Iterator>
+template<typename Iterator, typename SrcLookup>
static void
SinglePos_serialize (hb_serialize_context_t *c,
- const void *src,
+ const SrcLookup *src,
Iterator it,
- ValueFormat valFormat,
const hb_map_t *layout_variation_idx_map)
-{ c->start_embed<SinglePos> ()->serialize (c, src, it, valFormat, layout_variation_idx_map); }
+{ c->start_embed<SinglePos> ()->serialize (c, src, it, layout_variation_idx_map); }
struct PairValueRecord
@@ -1011,26 +1080,35 @@ struct PairValueRecord
int cmp (hb_codepoint_t k) const
{ return secondGlyph.cmp (k); }
- struct serialize_closure_t
+ struct context_t
{
const void *base;
const ValueFormat *valueFormats;
+ const ValueFormat *newFormats;
unsigned len1; /* valueFormats[0].get_len() */
const hb_map_t *glyph_map;
const hb_map_t *layout_variation_idx_map;
};
- bool serialize (hb_serialize_context_t *c,
- serialize_closure_t *closure) const
+ bool subset (hb_subset_context_t *c,
+ context_t *closure) const
{
TRACE_SERIALIZE (this);
- auto *out = c->start_embed (*this);
- if (unlikely (!c->extend_min (out))) return_trace (false);
+ auto *s = c->serializer;
+ auto *out = s->start_embed (*this);
+ if (unlikely (!s->extend_min (out))) return_trace (false);
out->secondGlyph = (*closure->glyph_map)[secondGlyph];
- closure->valueFormats[0].serialize_copy (c, closure->base, &values[0], closure->layout_variation_idx_map);
- closure->valueFormats[1].serialize_copy (c, closure->base, &values[closure->len1], closure->layout_variation_idx_map);
+ closure->valueFormats[0].copy_values (s,
+ closure->newFormats[0],
+ closure->base, &values[0],
+ closure->layout_variation_idx_map);
+ closure->valueFormats[1].copy_values (s,
+ closure->newFormats[1],
+ closure->base,
+ &values[closure->len1],
+ closure->layout_variation_idx_map);
return_trace (true);
}
@@ -1050,6 +1128,21 @@ struct PairValueRecord
valueFormats[1].collect_variation_indices (c, base, values_array.sub_array (record1_len, record2_len));
}
+ bool intersects (const hb_set_t& glyphset) const
+ {
+ return glyphset.has(secondGlyph);
+ }
+
+ const Value* get_values_1 () const
+ {
+ return &values[0];
+ }
+
+ const Value* get_values_2 (ValueFormat format1) const
+ {
+ return &values[format1.get_len ()];
+ }
+
protected:
HBGlyphID secondGlyph; /* GlyphID of second glyph in the
* pair--first glyph is listed in the
@@ -1140,7 +1233,8 @@ struct PairSet
}
bool subset (hb_subset_context_t *c,
- const ValueFormat valueFormats[2]) const
+ const ValueFormat valueFormats[2],
+ const ValueFormat newFormats[2]) const
{
TRACE_SUBSET (this);
auto snap = c->serializer->snapshot ();
@@ -1156,10 +1250,11 @@ struct PairSet
unsigned len2 = valueFormats[1].get_len ();
unsigned record_size = HBUINT16::static_size + Value::static_size * (len1 + len2);
- PairValueRecord::serialize_closure_t closure =
+ PairValueRecord::context_t context =
{
this,
valueFormats,
+ newFormats,
len1,
&glyph_map,
c->plan->layout_variation_idx_map
@@ -1170,7 +1265,7 @@ struct PairSet
for (unsigned i = 0; i < count; i++)
{
if (glyphset.has (record->secondGlyph)
- && record->serialize (c->serializer, &closure)) num++;
+ && record->subset (c, &context)) num++;
record = &StructAtOffset<const PairValueRecord> (record, record_size);
}
@@ -1218,7 +1313,7 @@ struct PairPosFormat1
+ hb_zip (this+coverage, pairSet)
| hb_filter (*glyphs, hb_first)
| hb_map (hb_second)
- | hb_map ([glyphs, this] (const OffsetTo<PairSet> &_)
+ | hb_map ([glyphs, this] (const Offset16To<PairSet> &_)
{ return (this+_).intersects (glyphs, valueFormat); })
| hb_any
;
@@ -1278,17 +1373,23 @@ struct PairPosFormat1
out->format = format;
out->valueFormat[0] = valueFormat[0];
out->valueFormat[1] = valueFormat[1];
+ if (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING)
+ {
+ hb_pair_t<unsigned, unsigned> newFormats = compute_effective_value_formats (glyphset);
+ out->valueFormat[0] = newFormats.first;
+ out->valueFormat[1] = newFormats.second;
+ }
hb_sorted_vector_t<hb_codepoint_t> new_coverage;
+ hb_zip (this+coverage, pairSet)
| hb_filter (glyphset, hb_first)
- | hb_filter ([this, c, out] (const OffsetTo<PairSet>& _)
+ | hb_filter ([this, c, out] (const Offset16To<PairSet>& _)
{
auto *o = out->pairSet.serialize_append (c->serializer);
if (unlikely (!o)) return false;
auto snap = c->serializer->snapshot ();
- bool ret = o->serialize_subset (c, _, this, valueFormat);
+ bool ret = o->serialize_subset (c, _, this, valueFormat, out->valueFormat);
if (!ret)
{
out->pairSet.pop ();
@@ -1302,12 +1403,41 @@ struct PairPosFormat1
| hb_sink (new_coverage)
;
- out->coverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_coverage.iter ());
+ out->coverage.serialize_serialize (c->serializer, new_coverage.iter ());
return_trace (bool (new_coverage));
}
+
+ hb_pair_t<unsigned, unsigned> compute_effective_value_formats (const hb_set_t& glyphset) const
+ {
+ unsigned len1 = valueFormat[0].get_len ();
+ unsigned len2 = valueFormat[1].get_len ();
+ unsigned record_size = HBUINT16::static_size + Value::static_size * (len1 + len2);
+
+ unsigned format1 = 0;
+ unsigned format2 = 0;
+ for (const Offset16To<PairSet>& _ :
+ + hb_zip (this+coverage, pairSet) | hb_filter (glyphset, hb_first) | hb_map (hb_second))
+ {
+ const PairSet& set = (this + _);
+ const PairValueRecord *record = &set.firstPairValueRecord;
+
+ for (unsigned i = 0; i < set.len; i++)
+ {
+ if (record->intersects (glyphset))
+ {
+ format1 = format1 | valueFormat[0].get_effective_format (record->get_values_1 ());
+ format2 = format2 | valueFormat[1].get_effective_format (record->get_values_2 (valueFormat[0]));
+ }
+ record = &StructAtOffset<const PairValueRecord> (record, record_size);
+ }
+ }
+
+ return hb_pair (format1, format2);
+ }
+
+
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -1328,7 +1458,7 @@ struct PairPosFormat1
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of subtable */
ValueFormat valueFormat[2]; /* [0] Defines the types of data in
@@ -1337,7 +1467,7 @@ struct PairPosFormat1
/* [1] Defines the types of data in
* ValueRecord2--for the second glyph
* in the pair--may be zero (0) */
- OffsetArrayOf<PairSet>
+ Array16OfOffset16To<PairSet>
pairSet; /* Array of PairSet tables
* ordered by Coverage Index */
public:
@@ -1355,18 +1485,35 @@ struct PairPosFormat2
void closure_lookups (hb_closure_lookups_context_t *c) const {}
void collect_variation_indices (hb_collect_variation_indices_context_t *c) const
{
+ if (!intersects (c->glyph_set)) return;
if ((!valueFormat1.has_device ()) && (!valueFormat2.has_device ())) return;
+ hb_set_t klass1_glyphs, klass2_glyphs;
+ if (!(this+classDef1).collect_coverage (&klass1_glyphs)) return;
+ if (!(this+classDef2).collect_coverage (&klass2_glyphs)) return;
+
hb_set_t class1_set, class2_set;
- for (const unsigned cp : c->glyph_set->iter ())
+ for (const unsigned cp : + c->glyph_set->iter () | hb_filter (this + coverage))
+ {
+ if (!klass1_glyphs.has (cp)) class1_set.add (0);
+ else
+ {
+ unsigned klass1 = (this+classDef1).get (cp);
+ class1_set.add (klass1);
+ }
+ }
+
+ class2_set.add (0);
+ for (const unsigned cp : + c->glyph_set->iter () | hb_filter (klass2_glyphs))
{
- unsigned klass1 = (this+classDef1).get (cp);
unsigned klass2 = (this+classDef2).get (cp);
- class1_set.add (klass1);
class2_set.add (klass2);
}
- if (class1_set.is_empty () || class2_set.is_empty ()) return;
+ if (class1_set.is_empty ()
+ || class2_set.is_empty ()
+ || (class2_set.get_population() == 1 && class2_set.has(0)))
+ return;
unsigned len1 = valueFormat1.get_len ();
unsigned len2 = valueFormat2.get_len ();
@@ -1431,35 +1578,34 @@ struct PairPosFormat2
auto *out = c->serializer->start_embed (*this);
if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
out->format = format;
- out->valueFormat1 = valueFormat1;
- out->valueFormat2 = valueFormat2;
hb_map_t klass1_map;
- out->classDef1.serialize_subset (c, classDef1, this, &klass1_map);
+ out->classDef1.serialize_subset (c, classDef1, this, &klass1_map, true, true, &(this + coverage));
out->class1Count = klass1_map.get_population ();
hb_map_t klass2_map;
- out->classDef2.serialize_subset (c, classDef2, this, &klass2_map);
+ out->classDef2.serialize_subset (c, classDef2, this, &klass2_map, true, false);
out->class2Count = klass2_map.get_population ();
unsigned len1 = valueFormat1.get_len ();
unsigned len2 = valueFormat2.get_len ();
- + hb_range ((unsigned) class1Count)
- | hb_filter (klass1_map)
- | hb_apply ([&] (const unsigned class1_idx)
- {
- + hb_range ((unsigned) class2Count)
- | hb_filter (klass2_map)
- | hb_apply ([&] (const unsigned class2_idx)
- {
- unsigned idx = (class1_idx * (unsigned) class2Count + class2_idx) * (len1 + len2);
- valueFormat1.serialize_copy (c->serializer, this, &values[idx], c->plan->layout_variation_idx_map);
- valueFormat2.serialize_copy (c->serializer, this, &values[idx + len1], c->plan->layout_variation_idx_map);
- })
- ;
- })
- ;
+ hb_pair_t<unsigned, unsigned> newFormats = hb_pair (valueFormat1, valueFormat2);
+ if (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING)
+ newFormats = compute_effective_value_formats (klass1_map, klass2_map);
+
+ out->valueFormat1 = newFormats.first;
+ out->valueFormat2 = newFormats.second;
+
+ for (unsigned class1_idx : + hb_range ((unsigned) class1Count) | hb_filter (klass1_map))
+ {
+ for (unsigned class2_idx : + hb_range ((unsigned) class2Count) | hb_filter (klass2_map))
+ {
+ unsigned idx = (class1_idx * (unsigned) class2Count + class2_idx) * (len1 + len2);
+ valueFormat1.copy_values (c->serializer, newFormats.first, this, &values[idx], c->plan->layout_variation_idx_map);
+ valueFormat2.copy_values (c->serializer, newFormats.second, this, &values[idx + len1], c->plan->layout_variation_idx_map);
+ }
+ }
const hb_set_t &glyphset = *c->plan->glyphset_gsub ();
const hb_map_t &glyph_map = *c->plan->glyph_map;
@@ -1470,10 +1616,34 @@ struct PairPosFormat2
| hb_map_retains_sorting (glyph_map)
;
- out->coverage.serialize (c->serializer, out).serialize (c->serializer, it);
+ out->coverage.serialize_serialize (c->serializer, it);
return_trace (out->class1Count && out->class2Count && bool (it));
}
+
+ hb_pair_t<unsigned, unsigned> compute_effective_value_formats (const hb_map_t& klass1_map,
+ const hb_map_t& klass2_map) const
+ {
+ unsigned len1 = valueFormat1.get_len ();
+ unsigned len2 = valueFormat2.get_len ();
+
+ unsigned format1 = 0;
+ unsigned format2 = 0;
+
+ for (unsigned class1_idx : + hb_range ((unsigned) class1Count) | hb_filter (klass1_map))
+ {
+ for (unsigned class2_idx : + hb_range ((unsigned) class2Count) | hb_filter (klass2_map))
+ {
+ unsigned idx = (class1_idx * (unsigned) class2Count + class2_idx) * (len1 + len2);
+ format1 = format1 | valueFormat1.get_effective_format (&values[idx]);
+ format2 = format2 | valueFormat2.get_effective_format (&values[idx + len1]);
+ }
+ }
+
+ return hb_pair (format1, format2);
+ }
+
+
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
@@ -1496,7 +1666,7 @@ struct PairPosFormat2
protected:
HBUINT16 format; /* Format identifier--format = 2 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of subtable */
ValueFormat valueFormat1; /* ValueRecord definition--for the
@@ -1505,11 +1675,11 @@ struct PairPosFormat2
ValueFormat valueFormat2; /* ValueRecord definition--for the
* second glyph of the pair--may be
* zero (0) */
- OffsetTo<ClassDef>
+ Offset16To<ClassDef>
classDef1; /* Offset to ClassDef table--from
* beginning of PairPos subtable--for
* the first glyph of the pair */
- OffsetTo<ClassDef>
+ Offset16To<ClassDef>
classDef2; /* Offset to ClassDef table--from
* beginning of PairPos subtable--for
* the second glyph of the pair */
@@ -1564,26 +1734,24 @@ struct EntryExitRecord
(src_base+exitAnchor).collect_variation_indices (c);
}
- EntryExitRecord* copy (hb_serialize_context_t *c,
- const void *src_base,
- const void *dst_base,
- const hb_map_t *layout_variation_idx_map) const
+ EntryExitRecord* subset (hb_subset_context_t *c,
+ const void *src_base) const
{
TRACE_SERIALIZE (this);
- auto *out = c->embed (this);
+ auto *out = c->serializer->embed (this);
if (unlikely (!out)) return_trace (nullptr);
- out->entryAnchor.serialize_copy (c, entryAnchor, src_base, c->to_bias (dst_base), hb_serialize_context_t::Head, layout_variation_idx_map);
- out->exitAnchor.serialize_copy (c, exitAnchor, src_base, c->to_bias (dst_base), hb_serialize_context_t::Head, layout_variation_idx_map);
+ out->entryAnchor.serialize_subset (c, entryAnchor, src_base);
+ out->exitAnchor.serialize_subset (c, exitAnchor, src_base);
return_trace (out);
}
protected:
- OffsetTo<Anchor>
+ Offset16To<Anchor>
entryAnchor; /* Offset to EntryAnchor table--from
* beginning of CursivePos
* subtable--may be NULL */
- OffsetTo<Anchor>
+ Offset16To<Anchor>
exitAnchor; /* Offset to ExitAnchor table--from
* beginning of CursivePos
* subtable--may be NULL */
@@ -1712,7 +1880,7 @@ struct CursivePosFormat1
else
pos[child].x_offset = x_offset;
- /* If parent was attached to child, break them free.
+ /* If parent was attached to child, separate them.
* https://github.com/harfbuzz/harfbuzz/issues/2469
*/
if (unlikely (pos[parent].attach_chain() == -pos[child].attach_chain()))
@@ -1724,25 +1892,24 @@ struct CursivePosFormat1
template <typename Iterator,
hb_requires (hb_is_iterator (Iterator))>
- void serialize (hb_serialize_context_t *c,
+ void serialize (hb_subset_context_t *c,
Iterator it,
- const void *src_base,
- const hb_map_t *layout_variation_idx_map)
+ const void *src_base)
{
- if (unlikely (!c->extend_min ((*this)))) return;
+ if (unlikely (!c->serializer->extend_min ((*this)))) return;
this->format = 1;
this->entryExitRecord.len = it.len ();
for (const EntryExitRecord& entry_record : + it
| hb_map (hb_second))
- c->copy (entry_record, src_base, this, layout_variation_idx_map);
+ entry_record.subset (c, src_base);
auto glyphs =
+ it
| hb_map_retains_sorting (hb_first)
;
- coverage.serialize (c, this).serialize (c, glyphs);
+ coverage.serialize_serialize (c->serializer, glyphs);
}
bool subset (hb_subset_context_t *c) const
@@ -1762,7 +1929,7 @@ struct CursivePosFormat1
;
bool ret = bool (it);
- out->serialize (c->serializer, it, this, c->plan->layout_variation_idx_map);
+ out->serialize (c, it, this);
return_trace (ret);
}
@@ -1774,10 +1941,10 @@ struct CursivePosFormat1
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of subtable */
- ArrayOf<EntryExitRecord>
+ Array16Of<EntryExitRecord>
entryExitRecord; /* Array of EntryExit records--in
* Coverage Index order */
public:
@@ -1949,13 +2116,12 @@ struct MarkBasePosFormat1
| hb_sink (new_coverage)
;
- if (!out->markCoverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_coverage.iter ()))
+ if (!out->markCoverage.serialize_serialize (c->serializer, new_coverage.iter ()))
return_trace (false);
- out->markArray.serialize (c->serializer, out)
- .serialize (c->serializer, &klass_mapping, c->plan->layout_variation_idx_map, &(this+markArray), + mark_iter
- | hb_map (hb_second));
+ out->markArray.serialize_subset (c, markArray, this,
+ (this+markCoverage).iter (),
+ &klass_mapping);
unsigned basecount = (this+baseArray).rows;
auto base_iter =
@@ -1970,8 +2136,7 @@ struct MarkBasePosFormat1
| hb_sink (new_coverage)
;
- if (!out->baseCoverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_coverage.iter ()))
+ if (!out->baseCoverage.serialize_serialize (c->serializer, new_coverage.iter ()))
return_trace (false);
hb_sorted_vector_t<unsigned> base_indexes;
@@ -1984,8 +2149,10 @@ struct MarkBasePosFormat1
| hb_sink (base_indexes)
;
}
- out->baseArray.serialize (c->serializer, out)
- .serialize (c->serializer, base_iter.len (), &(this+baseArray), c->plan->layout_variation_idx_map, base_indexes.iter ());
+
+ out->baseArray.serialize_subset (c, baseArray, this,
+ base_iter.len (),
+ base_indexes.iter ());
return_trace (true);
}
@@ -2002,17 +2169,17 @@ struct MarkBasePosFormat1
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
markCoverage; /* Offset to MarkCoverage table--from
* beginning of MarkBasePos subtable */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
baseCoverage; /* Offset to BaseCoverage table--from
* beginning of MarkBasePos subtable */
HBUINT16 classCount; /* Number of classes defined for marks */
- OffsetTo<MarkArray>
+ Offset16To<MarkArray>
markArray; /* Offset to MarkArray table--from
* beginning of MarkBasePos subtable */
- OffsetTo<BaseArray>
+ Offset16To<BaseArray>
baseArray; /* Offset to BaseArray table--from
* beginning of MarkBasePos subtable */
public:
@@ -2046,12 +2213,12 @@ typedef AnchorMatrix LigatureAttach; /* component-major--
* ordered by class--zero-based. */
/* Array of LigatureAttach tables ordered by LigatureCoverage Index */
-struct LigatureArray : OffsetListOf<LigatureAttach>
+struct LigatureArray : List16OfOffset16To<LigatureAttach>
{
template <typename Iterator,
hb_requires (hb_is_iterator (Iterator))>
bool subset (hb_subset_context_t *c,
- Iterator coverage,
+ Iterator coverage,
unsigned class_count,
const hb_map_t *klass_mapping) const
{
@@ -2067,11 +2234,16 @@ struct LigatureArray : OffsetListOf<LigatureAttach>
auto *matrix = out->serialize_append (c->serializer);
if (unlikely (!matrix)) return_trace (false);
+ const LigatureAttach& src = (this + _.second);
+ auto indexes =
+ + hb_range (src.rows * class_count)
+ | hb_filter ([=] (unsigned index) { return klass_mapping->has (index % class_count); })
+ ;
matrix->serialize_subset (c,
_.second,
this,
- class_count,
- klass_mapping);
+ src.rows,
+ indexes);
}
return_trace (this->len);
}
@@ -2201,17 +2373,12 @@ struct MarkLigPosFormat1
| hb_map_retains_sorting (glyph_map)
;
- if (!out->markCoverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_mark_coverage))
+ if (!out->markCoverage.serialize_serialize (c->serializer, new_mark_coverage))
return_trace (false);
- out->markArray.serialize (c->serializer, out)
- .serialize (c->serializer,
- &klass_mapping,
- c->plan->layout_variation_idx_map,
- &(this+markArray),
- + mark_iter
- | hb_map (hb_second));
+ out->markArray.serialize_subset (c, markArray, this,
+ (this+markCoverage).iter (),
+ &klass_mapping);
auto new_ligature_coverage =
+ hb_iter (this + ligatureCoverage)
@@ -2219,8 +2386,7 @@ struct MarkLigPosFormat1
| hb_map_retains_sorting (glyph_map)
;
- if (!out->ligatureCoverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_ligature_coverage))
+ if (!out->ligatureCoverage.serialize_serialize (c->serializer, new_ligature_coverage))
return_trace (false);
out->ligatureArray.serialize_subset (c, ligatureArray, this,
@@ -2241,18 +2407,18 @@ struct MarkLigPosFormat1
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
markCoverage; /* Offset to Mark Coverage table--from
* beginning of MarkLigPos subtable */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
ligatureCoverage; /* Offset to Ligature Coverage
* table--from beginning of MarkLigPos
* subtable */
HBUINT16 classCount; /* Number of defined mark classes */
- OffsetTo<MarkArray>
+ Offset16To<MarkArray>
markArray; /* Offset to MarkArray table--from
* beginning of MarkLigPos subtable */
- OffsetTo<LigatureArray>
+ Offset16To<LigatureArray>
ligatureArray; /* Offset to LigatureArray table--from
* beginning of MarkLigPos subtable */
public:
@@ -2409,13 +2575,12 @@ struct MarkMarkPosFormat1
| hb_sink (new_coverage)
;
- if (!out->mark1Coverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_coverage.iter ()))
+ if (!out->mark1Coverage.serialize_serialize (c->serializer, new_coverage.iter ()))
return_trace (false);
- out->mark1Array.serialize (c->serializer, out)
- .serialize (c->serializer, &klass_mapping, c->plan->layout_variation_idx_map, &(this+mark1Array), + mark1_iter
- | hb_map (hb_second));
+ out->mark1Array.serialize_subset (c, mark1Array, this,
+ (this+mark1Coverage).iter (),
+ &klass_mapping);
unsigned mark2count = (this+mark2Array).rows;
auto mark2_iter =
@@ -2430,8 +2595,7 @@ struct MarkMarkPosFormat1
| hb_sink (new_coverage)
;
- if (!out->mark2Coverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_coverage.iter ()))
+ if (!out->mark2Coverage.serialize_serialize (c->serializer, new_coverage.iter ()))
return_trace (false);
hb_sorted_vector_t<unsigned> mark2_indexes;
@@ -2444,8 +2608,8 @@ struct MarkMarkPosFormat1
| hb_sink (mark2_indexes)
;
}
- out->mark2Array.serialize (c->serializer, out)
- .serialize (c->serializer, mark2_iter.len (), &(this+mark2Array), c->plan->layout_variation_idx_map, mark2_indexes.iter ());
+
+ out->mark2Array.serialize_subset (c, mark2Array, this, mark2_iter.len (), mark2_indexes.iter ());
return_trace (true);
}
@@ -2462,19 +2626,19 @@ struct MarkMarkPosFormat1
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
mark1Coverage; /* Offset to Combining Mark1 Coverage
* table--from beginning of MarkMarkPos
* subtable */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
mark2Coverage; /* Offset to Combining Mark2 Coverage
* table--from beginning of MarkMarkPos
* subtable */
HBUINT16 classCount; /* Number of defined mark classes */
- OffsetTo<MarkArray>
+ Offset16To<MarkArray>
mark1Array; /* Offset to Mark1Array table--from
* beginning of MarkMarkPos subtable */
- OffsetTo<Mark2Array>
+ Offset16To<Mark2Array>
mark2Array; /* Offset to Mark2Array table--from
* beginning of MarkMarkPos subtable */
public:
@@ -2663,7 +2827,7 @@ struct GPOS : GSUBGPOS
bool subset (hb_subset_context_t *c) const
{
- hb_subset_layout_context_t l (c, tableTag, c->plan->gpos_lookups, c->plan->gpos_features);
+ hb_subset_layout_context_t l (c, tableTag, c->plan->gpos_lookups, c->plan->gpos_langsys, c->plan->gpos_features);
return GSUBGPOS::subset<PosLookup> (&l);
}
diff --git a/thirdparty/harfbuzz/src/hb-ot-layout-gsub-table.hh b/thirdparty/harfbuzz/src/hb-ot-layout-gsub-table.hh
index 5f10ecb7ee..393ada1351 100644
--- a/thirdparty/harfbuzz/src/hb-ot-layout-gsub-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-layout-gsub-table.hh
@@ -46,14 +46,19 @@ struct SingleSubstFormat1
bool intersects (const hb_set_t *glyphs) const
{ return (this+coverage).intersects (glyphs); }
+ bool may_have_non_1to1 () const
+ { return false; }
+
void closure (hb_closure_context_t *c) const
{
unsigned d = deltaGlyphID;
+
+ hb_iter (this+coverage)
- | hb_filter (*c->glyphs)
+ | hb_filter (c->parent_active_glyphs ())
| hb_map ([d] (hb_codepoint_t g) { return (g + d) & 0xFFFFu; })
| hb_sink (c->output)
;
+
}
void closure_lookups (hb_closure_lookups_context_t *c) const {}
@@ -95,9 +100,9 @@ struct SingleSubstFormat1
unsigned delta)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
- if (unlikely (!coverage.serialize (c, this).serialize (c, glyphs))) return_trace (false);
- c->check_assign (deltaGlyphID, delta);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
+ if (unlikely (!coverage.serialize_serialize (c, glyphs))) return_trace (false);
+ c->check_assign (deltaGlyphID, delta, HB_SERIALIZE_ERROR_INT_OVERFLOW);
return_trace (true);
}
@@ -133,7 +138,7 @@ struct SingleSubstFormat1
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of Substitution table */
HBUINT16 deltaGlyphID; /* Add to original GlyphID to get
@@ -147,13 +152,17 @@ struct SingleSubstFormat2
bool intersects (const hb_set_t *glyphs) const
{ return (this+coverage).intersects (glyphs); }
+ bool may_have_non_1to1 () const
+ { return false; }
+
void closure (hb_closure_context_t *c) const
{
+ hb_zip (this+coverage, substitute)
- | hb_filter (*c->glyphs, hb_first)
+ | hb_filter (c->parent_active_glyphs (), hb_first)
| hb_map (hb_second)
| hb_sink (c->output)
;
+
}
void closure_lookups (hb_closure_lookups_context_t *c) const {}
@@ -200,9 +209,9 @@ struct SingleSubstFormat2
+ it
| hb_map_retains_sorting (hb_first)
;
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
if (unlikely (!substitute.serialize (c, substitutes))) return_trace (false);
- if (unlikely (!coverage.serialize (c, this).serialize (c, glyphs))) return_trace (false);
+ if (unlikely (!coverage.serialize_serialize (c, glyphs))) return_trace (false);
return_trace (true);
}
@@ -233,10 +242,10 @@ struct SingleSubstFormat2
protected:
HBUINT16 format; /* Format identifier--format = 2 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of Substitution table */
- ArrayOf<HBGlyphID>
+ Array16Of<HBGlyphID>
substitute; /* Array of substitute
* GlyphIDs--ordered by Coverage Index */
public:
@@ -334,9 +343,14 @@ struct Sequence
unsigned int klass = _hb_glyph_info_is_ligature (&c->buffer->cur()) ?
HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH : 0;
+ unsigned lig_id = _hb_glyph_info_get_lig_id (&c->buffer->cur());
- for (unsigned int i = 0; i < count; i++) {
- _hb_glyph_info_set_lig_props_for_component (&c->buffer->cur(), i);
+ for (unsigned int i = 0; i < count; i++)
+ {
+ /* If is attached to a ligature, don't disturb that.
+ * https://github.com/harfbuzz/harfbuzz/issues/3069 */
+ if (!lig_id)
+ _hb_glyph_info_set_lig_props_for_component (&c->buffer->cur(), i);
c->output_glyph_for_component (substitute.arrayZ[i], klass);
}
c->buffer->skip_glyph ();
@@ -377,7 +391,7 @@ struct Sequence
}
protected:
- ArrayOf<HBGlyphID>
+ Array16Of<HBGlyphID>
substitute; /* String of GlyphIDs to substitute */
public:
DEFINE_SIZE_ARRAY (2, substitute);
@@ -388,10 +402,13 @@ struct MultipleSubstFormat1
bool intersects (const hb_set_t *glyphs) const
{ return (this+coverage).intersects (glyphs); }
+ bool may_have_non_1to1 () const
+ { return true; }
+
void closure (hb_closure_context_t *c) const
{
+ hb_zip (this+coverage, sequence)
- | hb_filter (*c->glyphs, hb_first)
+ | hb_filter (c->parent_active_glyphs (), hb_first)
| hb_map (hb_second)
| hb_map (hb_add (this))
| hb_apply ([c] (const Sequence &_) { _.closure (c); })
@@ -431,17 +448,17 @@ struct MultipleSubstFormat1
hb_array_t<const HBGlyphID> substitute_glyphs_list)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
if (unlikely (!sequence.serialize (c, glyphs.length))) return_trace (false);
for (unsigned int i = 0; i < glyphs.length; i++)
{
unsigned int substitute_len = substitute_len_list[i];
- if (unlikely (!sequence[i].serialize (c, this)
- .serialize (c, substitute_glyphs_list.sub_array (0, substitute_len))))
+ if (unlikely (!sequence[i]
+ .serialize_serialize (c, substitute_glyphs_list.sub_array (0, substitute_len))))
return_trace (false);
substitute_glyphs_list += substitute_len;
}
- return_trace (coverage.serialize (c, this).serialize (c, glyphs));
+ return_trace (coverage.serialize_serialize (c, glyphs));
}
bool subset (hb_subset_context_t *c) const
@@ -462,8 +479,7 @@ struct MultipleSubstFormat1
| hb_map (glyph_map)
| hb_sink (new_coverage)
;
- out->coverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_coverage.iter ());
+ out->coverage.serialize_serialize (c->serializer, new_coverage.iter ());
return_trace (bool (new_coverage));
}
@@ -475,10 +491,10 @@ struct MultipleSubstFormat1
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of Substitution table */
- OffsetArrayOf<Sequence>
+ Array16OfOffset16To<Sequence>
sequence; /* Array of Sequence tables
* ordered by Coverage Index */
public:
@@ -547,7 +563,12 @@ struct AlternateSet
/* If alt_index is MAX_VALUE, randomize feature if it is the rand feature. */
if (alt_index == HB_OT_MAP_MAX_VALUE && c->random)
+ {
+ /* Maybe we can do better than unsafe-to-break all; but since we are
+ * changing random state, it would be hard to track that. Good 'nough. */
+ c->buffer->unsafe_to_break_all ();
alt_index = c->random_number () % count + 1;
+ }
if (unlikely (alt_index > count || alt_index == 0)) return_trace (false);
@@ -603,7 +624,7 @@ struct AlternateSet
}
protected:
- ArrayOf<HBGlyphID>
+ Array16Of<HBGlyphID>
alternates; /* Array of alternate GlyphIDs--in
* arbitrary order */
public:
@@ -615,14 +636,18 @@ struct AlternateSubstFormat1
bool intersects (const hb_set_t *glyphs) const
{ return (this+coverage).intersects (glyphs); }
+ bool may_have_non_1to1 () const
+ { return false; }
+
void closure (hb_closure_context_t *c) const
{
+ hb_zip (this+coverage, alternateSet)
- | hb_filter (c->glyphs, hb_first)
+ | hb_filter (c->parent_active_glyphs (), hb_first)
| hb_map (hb_second)
| hb_map (hb_add (this))
| hb_apply ([c] (const AlternateSet &_) { _.closure (c); })
;
+
}
void closure_lookups (hb_closure_lookups_context_t *c) const {}
@@ -666,17 +691,17 @@ struct AlternateSubstFormat1
hb_array_t<const HBGlyphID> alternate_glyphs_list)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
if (unlikely (!alternateSet.serialize (c, glyphs.length))) return_trace (false);
for (unsigned int i = 0; i < glyphs.length; i++)
{
unsigned int alternate_len = alternate_len_list[i];
- if (unlikely (!alternateSet[i].serialize (c, this)
- .serialize (c, alternate_glyphs_list.sub_array (0, alternate_len))))
+ if (unlikely (!alternateSet[i]
+ .serialize_serialize (c, alternate_glyphs_list.sub_array (0, alternate_len))))
return_trace (false);
alternate_glyphs_list += alternate_len;
}
- return_trace (coverage.serialize (c, this).serialize (c, glyphs));
+ return_trace (coverage.serialize_serialize (c, glyphs));
}
bool subset (hb_subset_context_t *c) const
@@ -697,8 +722,7 @@ struct AlternateSubstFormat1
| hb_map (glyph_map)
| hb_sink (new_coverage)
;
- out->coverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_coverage.iter ());
+ out->coverage.serialize_serialize (c->serializer, new_coverage.iter ());
return_trace (bool (new_coverage));
}
@@ -710,10 +734,10 @@ struct AlternateSubstFormat1
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of Substitution table */
- OffsetArrayOf<AlternateSet>
+ Array16OfOffset16To<AlternateSet>
alternateSet; /* Array of AlternateSet tables
* ordered by Coverage Index */
public:
@@ -831,7 +855,7 @@ struct Ligature
Iterator components /* Starting from second */)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
ligGlyph = ligature;
if (unlikely (!component.serialize (c, components))) return_trace (false);
return_trace (true);
@@ -930,15 +954,14 @@ struct LigatureSet
hb_array_t<const HBGlyphID> &component_list /* Starting from second for each ligature */)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
if (unlikely (!ligature.serialize (c, ligatures.length))) return_trace (false);
for (unsigned int i = 0; i < ligatures.length; i++)
{
unsigned int component_count = (unsigned) hb_max ((int) component_count_list[i] - 1, 0);
- if (unlikely (!ligature[i].serialize (c, this)
- .serialize (c,
- ligatures[i],
- component_list.sub_array (0, component_count))))
+ if (unlikely (!ligature[i].serialize_serialize (c,
+ ligatures[i],
+ component_list.sub_array (0, component_count))))
return_trace (false);
component_list += component_count;
}
@@ -965,7 +988,7 @@ struct LigatureSet
}
protected:
- OffsetArrayOf<Ligature>
+ Array16OfOffset16To<Ligature>
ligature; /* Array LigatureSet tables
* ordered by preference */
public:
@@ -980,20 +1003,24 @@ struct LigatureSubstFormat1
+ hb_zip (this+coverage, ligatureSet)
| hb_filter (*glyphs, hb_first)
| hb_map (hb_second)
- | hb_map ([this, glyphs] (const OffsetTo<LigatureSet> &_)
+ | hb_map ([this, glyphs] (const Offset16To<LigatureSet> &_)
{ return (this+_).intersects (glyphs); })
| hb_any
;
}
+ bool may_have_non_1to1 () const
+ { return true; }
+
void closure (hb_closure_context_t *c) const
{
+ hb_zip (this+coverage, ligatureSet)
- | hb_filter (*c->glyphs, hb_first)
+ | hb_filter (c->parent_active_glyphs (), hb_first)
| hb_map (hb_second)
| hb_map (hb_add (this))
| hb_apply ([c] (const LigatureSet &_) { _.closure (c); })
;
+
}
void closure_lookups (hb_closure_lookups_context_t *c) const {}
@@ -1039,20 +1066,20 @@ struct LigatureSubstFormat1
hb_array_t<const HBGlyphID> component_list /* Starting from second for each ligature */)
{
TRACE_SERIALIZE (this);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
if (unlikely (!ligatureSet.serialize (c, first_glyphs.length))) return_trace (false);
for (unsigned int i = 0; i < first_glyphs.length; i++)
{
unsigned int ligature_count = ligature_per_first_glyph_count_list[i];
- if (unlikely (!ligatureSet[i].serialize (c, this)
- .serialize (c,
- ligatures_list.sub_array (0, ligature_count),
- component_count_list.sub_array (0, ligature_count),
- component_list))) return_trace (false);
+ if (unlikely (!ligatureSet[i]
+ .serialize_serialize (c,
+ ligatures_list.sub_array (0, ligature_count),
+ component_count_list.sub_array (0, ligature_count),
+ component_list))) return_trace (false);
ligatures_list += ligature_count;
component_count_list += ligature_count;
}
- return_trace (coverage.serialize (c, this).serialize (c, first_glyphs));
+ return_trace (coverage.serialize_serialize (c, first_glyphs));
}
bool subset (hb_subset_context_t *c) const
@@ -1073,8 +1100,7 @@ struct LigatureSubstFormat1
| hb_map (glyph_map)
| hb_sink (new_coverage)
;
- out->coverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_coverage.iter ());
+ out->coverage.serialize_serialize (c->serializer, new_coverage.iter ());
return_trace (bool (new_coverage));
}
@@ -1086,10 +1112,10 @@ struct LigatureSubstFormat1
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of Substitution table */
- OffsetArrayOf<LigatureSet>
+ Array16OfOffset16To<LigatureSet>
ligatureSet; /* Array LigatureSet tables
* ordered by Coverage Index */
public:
@@ -1157,7 +1183,7 @@ struct ReverseChainSingleSubstFormat1
if (!(this+coverage).intersects (glyphs))
return false;
- const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
unsigned int count;
@@ -1174,15 +1200,18 @@ struct ReverseChainSingleSubstFormat1
return true;
}
+ bool may_have_non_1to1 () const
+ { return false; }
+
void closure (hb_closure_context_t *c) const
{
if (!intersects (c->glyphs)) return;
- const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
- const ArrayOf<HBGlyphID> &substitute = StructAfter<ArrayOf<HBGlyphID>> (lookahead);
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
+ const Array16Of<HBGlyphID> &substitute = StructAfter<Array16Of<HBGlyphID>> (lookahead);
+ hb_zip (this+coverage, substitute)
- | hb_filter (*c->glyphs, hb_first)
+ | hb_filter (c->parent_active_glyphs (), hb_first)
| hb_map (hb_second)
| hb_sink (c->output)
;
@@ -1200,12 +1229,12 @@ struct ReverseChainSingleSubstFormat1
for (unsigned int i = 0; i < count; i++)
if (unlikely (!(this+backtrack[i]).collect_coverage (c->before))) return;
- const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
count = lookahead.len;
for (unsigned int i = 0; i < count; i++)
if (unlikely (!(this+lookahead[i]).collect_coverage (c->after))) return;
- const ArrayOf<HBGlyphID> &substitute = StructAfter<ArrayOf<HBGlyphID>> (lookahead);
+ const Array16Of<HBGlyphID> &substitute = StructAfter<Array16Of<HBGlyphID>> (lookahead);
count = substitute.len;
c->output->add_array (substitute.arrayZ, substitute.len);
}
@@ -1224,8 +1253,8 @@ struct ReverseChainSingleSubstFormat1
unsigned int index = (this+coverage).get_coverage (c->buffer->cur ().codepoint);
if (likely (index == NOT_COVERED)) return_trace (false);
- const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
- const ArrayOf<HBGlyphID> &substitute = StructAfter<ArrayOf<HBGlyphID>> (lookahead);
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
+ const Array16Of<HBGlyphID> &substitute = StructAfter<Array16Of<HBGlyphID>> (lookahead);
if (unlikely (index >= substitute.len)) return_trace (false);
@@ -1250,11 +1279,80 @@ struct ReverseChainSingleSubstFormat1
return_trace (false);
}
+ template<typename Iterator,
+ hb_requires (hb_is_iterator (Iterator))>
+ bool serialize_coverage_offset_array (hb_subset_context_t *c, Iterator it) const
+ {
+ TRACE_SERIALIZE (this);
+ auto *out = c->serializer->start_embed<Array16OfOffset16To<Coverage>> ();
+
+ if (unlikely (!c->serializer->allocate_size<HBUINT16> (HBUINT16::static_size)))
+ return_trace (false);
+
+ for (auto& offset : it) {
+ auto *o = out->serialize_append (c->serializer);
+ if (unlikely (!o) || !o->serialize_subset (c, offset, this))
+ return_trace (false);
+ }
+
+ return_trace (true);
+ }
+
+ template<typename Iterator, typename BacktrackIterator, typename LookaheadIterator,
+ hb_requires (hb_is_sorted_source_of (Iterator, hb_codepoint_pair_t)),
+ hb_requires (hb_is_iterator (BacktrackIterator)),
+ hb_requires (hb_is_iterator (LookaheadIterator))>
+ bool serialize (hb_subset_context_t *c,
+ Iterator coverage_subst_iter,
+ BacktrackIterator backtrack_iter,
+ LookaheadIterator lookahead_iter) const
+ {
+ TRACE_SERIALIZE (this);
+
+ auto *out = c->serializer->start_embed (this);
+ if (unlikely (!c->serializer->check_success (out))) return_trace (false);
+ if (unlikely (!c->serializer->embed (this->format))) return_trace (false);
+ if (unlikely (!c->serializer->embed (this->coverage))) return_trace (false);
+
+ if (!serialize_coverage_offset_array (c, backtrack_iter)) return_trace (false);
+ if (!serialize_coverage_offset_array (c, lookahead_iter)) return_trace (false);
+
+ auto *substitute_out = c->serializer->start_embed<Array16Of<HBGlyphID>> ();
+ auto substitutes =
+ + coverage_subst_iter
+ | hb_map (hb_second)
+ ;
+
+ auto glyphs =
+ + coverage_subst_iter
+ | hb_map_retains_sorting (hb_first)
+ ;
+ if (unlikely (! c->serializer->check_success (substitute_out->serialize (c->serializer, substitutes))))
+ return_trace (false);
+
+ if (unlikely (!out->coverage.serialize_serialize (c->serializer, glyphs)))
+ return_trace (false);
+ return_trace (true);
+ }
+
bool subset (hb_subset_context_t *c) const
{
TRACE_SUBSET (this);
- // TODO(subset)
- return_trace (false);
+ const hb_set_t &glyphset = *c->plan->glyphset_gsub ();
+ const hb_map_t &glyph_map = *c->plan->glyph_map;
+
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
+ const Array16Of<HBGlyphID> &substitute = StructAfter<Array16Of<HBGlyphID>> (lookahead);
+
+ auto it =
+ + hb_zip (this+coverage, substitute)
+ | hb_filter (glyphset, hb_first)
+ | hb_filter (glyphset, hb_second)
+ | hb_map_retains_sorting ([&] (hb_pair_t<hb_codepoint_t, const HBGlyphID &> p) -> hb_codepoint_pair_t
+ { return hb_pair (glyph_map[p.first], glyph_map[p.second]); })
+ ;
+
+ return_trace (bool (it) && serialize (c, it, backtrack.iter (), lookahead.iter ()));
}
bool sanitize (hb_sanitize_context_t *c) const
@@ -1262,27 +1360,27 @@ struct ReverseChainSingleSubstFormat1
TRACE_SANITIZE (this);
if (!(coverage.sanitize (c, this) && backtrack.sanitize (c, this)))
return_trace (false);
- const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
if (!lookahead.sanitize (c, this))
return_trace (false);
- const ArrayOf<HBGlyphID> &substitute = StructAfter<ArrayOf<HBGlyphID>> (lookahead);
+ const Array16Of<HBGlyphID> &substitute = StructAfter<Array16Of<HBGlyphID>> (lookahead);
return_trace (substitute.sanitize (c));
}
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of table */
- OffsetArrayOf<Coverage>
+ Array16OfOffset16To<Coverage>
backtrack; /* Array of coverage tables
* in backtracking sequence, in glyph
* sequence order */
- OffsetArrayOf<Coverage>
+ Array16OfOffset16To<Coverage>
lookaheadX; /* Array of coverage tables
* in lookahead sequence, in glyph
* sequence order */
- ArrayOf<HBGlyphID>
+ Array16Of<HBGlyphID>
substituteX; /* Array of substitute
* GlyphIDs--ordered by Coverage Index */
public:
@@ -1388,6 +1486,12 @@ struct SubstLookup : Lookup
return lookup_type_is_reverse (type);
}
+ bool may_have_non_1to1 () const
+ {
+ hb_have_non_1to1_context_t c;
+ return dispatch (&c);
+ }
+
bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
@@ -1455,10 +1559,6 @@ struct SubstLookup : Lookup
static inline bool apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index);
- SubTable& serialize_subtable (hb_serialize_context_t *c,
- unsigned int i)
- { return get_subtables<SubTable> ()[i].serialize (c, this); }
-
bool serialize_single (hb_serialize_context_t *c,
uint32_t lookup_props,
hb_sorted_array_t<const HBGlyphID> glyphs,
@@ -1466,8 +1566,13 @@ struct SubstLookup : Lookup
{
TRACE_SERIALIZE (this);
if (unlikely (!Lookup::serialize (c, SubTable::Single, lookup_props, 1))) return_trace (false);
- return_trace (serialize_subtable (c, 0).u.single.
- serialize (c, hb_zip (glyphs, substitutes)));
+ if (c->push<SubTable> ()->u.single.serialize (c, hb_zip (glyphs, substitutes)))
+ {
+ c->add_link (get_subtables<SubTable> ()[0], c->pop_pack ());
+ return_trace (true);
+ }
+ c->pop_discard ();
+ return_trace (false);
}
bool serialize_multiple (hb_serialize_context_t *c,
@@ -1478,11 +1583,17 @@ struct SubstLookup : Lookup
{
TRACE_SERIALIZE (this);
if (unlikely (!Lookup::serialize (c, SubTable::Multiple, lookup_props, 1))) return_trace (false);
- return_trace (serialize_subtable (c, 0).u.multiple.
- serialize (c,
- glyphs,
- substitute_len_list,
- substitute_glyphs_list));
+ if (c->push<SubTable> ()->u.multiple.
+ serialize (c,
+ glyphs,
+ substitute_len_list,
+ substitute_glyphs_list))
+ {
+ c->add_link (get_subtables<SubTable> ()[0], c->pop_pack ());
+ return_trace (true);
+ }
+ c->pop_discard ();
+ return_trace (false);
}
bool serialize_alternate (hb_serialize_context_t *c,
@@ -1493,11 +1604,18 @@ struct SubstLookup : Lookup
{
TRACE_SERIALIZE (this);
if (unlikely (!Lookup::serialize (c, SubTable::Alternate, lookup_props, 1))) return_trace (false);
- return_trace (serialize_subtable (c, 0).u.alternate.
- serialize (c,
- glyphs,
- alternate_len_list,
- alternate_glyphs_list));
+
+ if (c->push<SubTable> ()->u.alternate.
+ serialize (c,
+ glyphs,
+ alternate_len_list,
+ alternate_glyphs_list))
+ {
+ c->add_link (get_subtables<SubTable> ()[0], c->pop_pack ());
+ return_trace (true);
+ }
+ c->pop_discard ();
+ return_trace (false);
}
bool serialize_ligature (hb_serialize_context_t *c,
@@ -1510,24 +1628,32 @@ struct SubstLookup : Lookup
{
TRACE_SERIALIZE (this);
if (unlikely (!Lookup::serialize (c, SubTable::Ligature, lookup_props, 1))) return_trace (false);
- return_trace (serialize_subtable (c, 0).u.ligature.
- serialize (c,
- first_glyphs,
- ligature_per_first_glyph_count_list,
- ligatures_list,
- component_count_list,
- component_list));
+ if (c->push<SubTable> ()->u.ligature.
+ serialize (c,
+ first_glyphs,
+ ligature_per_first_glyph_count_list,
+ ligatures_list,
+ component_count_list,
+ component_list))
+ {
+ c->add_link (get_subtables<SubTable> ()[0], c->pop_pack ());
+ return_trace (true);
+ }
+ c->pop_discard ();
+ return_trace (false);
}
template <typename context_t>
static inline typename context_t::return_t dispatch_recurse_func (context_t *c, unsigned int lookup_index);
- static inline hb_closure_context_t::return_t dispatch_closure_recurse_func (hb_closure_context_t *c, unsigned int lookup_index)
+ static inline typename hb_closure_context_t::return_t closure_glyphs_recurse_func (hb_closure_context_t *c, unsigned lookup_index, hb_set_t *covered_seq_indices, unsigned seq_index, unsigned end_index);
+
+ static inline hb_closure_context_t::return_t dispatch_closure_recurse_func (hb_closure_context_t *c, unsigned lookup_index, hb_set_t *covered_seq_indices, unsigned seq_index, unsigned end_index)
{
if (!c->should_visit_lookup (lookup_index))
return hb_empty_t ();
- hb_closure_context_t::return_t ret = dispatch_recurse_func (c, lookup_index);
+ hb_closure_context_t::return_t ret = closure_glyphs_recurse_func (c, lookup_index, covered_seq_indices, seq_index, end_index);
/* While in theory we should flush here, it will cause timeouts because a recursive
* lookup can keep growing the glyph set. Skip, and outer loop will retry up to
@@ -1564,7 +1690,7 @@ struct GSUB : GSUBGPOS
bool subset (hb_subset_context_t *c) const
{
- hb_subset_layout_context_t l (c, tableTag, c->plan->gsub_lookups, c->plan->gsub_features);
+ hb_subset_layout_context_t l (c, tableTag, c->plan->gsub_lookups, c->plan->gsub_langsys, c->plan->gsub_features);
return GSUBGPOS::subset<SubstLookup> (&l);
}
@@ -1600,6 +1726,14 @@ template <typename context_t>
return l.dispatch (c);
}
+/*static*/ typename hb_closure_context_t::return_t SubstLookup::closure_glyphs_recurse_func (hb_closure_context_t *c, unsigned lookup_index, hb_set_t *covered_seq_indices, unsigned seq_index, unsigned end_index)
+{
+ const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index);
+ if (l.may_have_non_1to1 ())
+ hb_set_add_range (covered_seq_indices, seq_index, end_index);
+ return l.dispatch (c);
+}
+
/*static*/ inline hb_closure_lookups_context_t::return_t SubstLookup::dispatch_closure_lookups_recurse_func (hb_closure_lookups_context_t *c, unsigned this_index)
{
const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (this_index);
diff --git a/thirdparty/harfbuzz/src/hb-ot-layout-gsubgpos.hh b/thirdparty/harfbuzz/src/hb-ot-layout-gsubgpos.hh
index 36a95ead15..626abc5577 100644
--- a/thirdparty/harfbuzz/src/hb-ot-layout-gsubgpos.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-layout-gsubgpos.hh
@@ -52,23 +52,32 @@ struct hb_intersects_context_t :
const hb_set_t *glyphs;
hb_intersects_context_t (const hb_set_t *glyphs_) :
- glyphs (glyphs_) {}
+ glyphs (glyphs_) {}
+};
+
+struct hb_have_non_1to1_context_t :
+ hb_dispatch_context_t<hb_have_non_1to1_context_t, bool>
+{
+ template <typename T>
+ return_t dispatch (const T &obj) { return obj.may_have_non_1to1 (); }
+ static return_t default_return_value () { return false; }
+ bool stop_sublookup_iteration (return_t r) const { return r; }
};
struct hb_closure_context_t :
hb_dispatch_context_t<hb_closure_context_t>
{
- typedef return_t (*recurse_func_t) (hb_closure_context_t *c, unsigned int lookup_index);
+ typedef return_t (*recurse_func_t) (hb_closure_context_t *c, unsigned lookup_index, hb_set_t *covered_seq_indicies, unsigned seq_index, unsigned end_index);
template <typename T>
return_t dispatch (const T &obj) { obj.closure (this); return hb_empty_t (); }
static return_t default_return_value () { return hb_empty_t (); }
- void recurse (unsigned int lookup_index)
+ void recurse (unsigned lookup_index, hb_set_t *covered_seq_indicies, unsigned seq_index, unsigned end_index)
{
if (unlikely (nesting_level_left == 0 || !recurse_func))
return;
nesting_level_left--;
- recurse_func (this, lookup_index);
+ recurse_func (this, lookup_index, covered_seq_indicies, seq_index, end_index);
nesting_level_left++;
}
@@ -83,36 +92,90 @@ struct hb_closure_context_t :
if (is_lookup_done (lookup_index))
return false;
- done_lookups->set (lookup_index, glyphs->get_population ());
return true;
}
bool is_lookup_done (unsigned int lookup_index)
{
- if (unlikely (done_lookups->in_error ()))
+ if (done_lookups_glyph_count->in_error () ||
+ done_lookups_glyph_set->in_error ())
return true;
/* Have we visited this lookup with the current set of glyphs? */
- return done_lookups->get (lookup_index) == glyphs->get_population ();
+ if (done_lookups_glyph_count->get (lookup_index) != glyphs->get_population ())
+ {
+ done_lookups_glyph_count->set (lookup_index, glyphs->get_population ());
+
+ if (!done_lookups_glyph_set->get (lookup_index))
+ {
+ hb_set_t* empty_set = hb_set_create ();
+ if (unlikely (!done_lookups_glyph_set->set (lookup_index, empty_set)))
+ {
+ hb_set_destroy (empty_set);
+ return true;
+ }
+ }
+
+ hb_set_clear (done_lookups_glyph_set->get (lookup_index));
+ }
+
+ hb_set_t *covered_glyph_set = done_lookups_glyph_set->get (lookup_index);
+ if (unlikely (covered_glyph_set->in_error ()))
+ return true;
+ if (parent_active_glyphs ()->is_subset (*covered_glyph_set))
+ return true;
+
+ hb_set_union (covered_glyph_set, parent_active_glyphs ());
+ return false;
+ }
+
+ hb_set_t* parent_active_glyphs ()
+ {
+ if (active_glyphs_stack.length < 1)
+ return glyphs;
+
+ return active_glyphs_stack.tail ();
+ }
+
+ void push_cur_active_glyphs (hb_set_t* cur_active_glyph_set)
+ {
+ active_glyphs_stack.push (cur_active_glyph_set);
+ }
+
+ bool pop_cur_done_glyphs ()
+ {
+ if (active_glyphs_stack.length < 1)
+ return false;
+
+ active_glyphs_stack.pop ();
+ return true;
}
hb_face_t *face;
hb_set_t *glyphs;
+ hb_set_t *cur_intersected_glyphs;
hb_set_t output[1];
+ hb_vector_t<hb_set_t *> active_glyphs_stack;
recurse_func_t recurse_func;
unsigned int nesting_level_left;
hb_closure_context_t (hb_face_t *face_,
hb_set_t *glyphs_,
- hb_map_t *done_lookups_,
+ hb_set_t *cur_intersected_glyphs_,
+ hb_map_t *done_lookups_glyph_count_,
+ hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *done_lookups_glyph_set_,
unsigned int nesting_level_left_ = HB_MAX_NESTING_LEVEL) :
face (face_),
glyphs (glyphs_),
+ cur_intersected_glyphs (cur_intersected_glyphs_),
recurse_func (nullptr),
nesting_level_left (nesting_level_left_),
- done_lookups (done_lookups_),
+ done_lookups_glyph_count (done_lookups_glyph_count_),
+ done_lookups_glyph_set (done_lookups_glyph_set_),
lookup_count (0)
- {}
+ {
+ push_cur_active_glyphs (glyphs_);
+ }
~hb_closure_context_t () { flush (); }
@@ -120,16 +183,21 @@ struct hb_closure_context_t :
void flush ()
{
- hb_set_del_range (output, face->get_num_glyphs (), hb_set_get_max (output)); /* Remove invalid glyphs. */
+ hb_set_del_range (output, face->get_num_glyphs (), HB_SET_VALUE_INVALID); /* Remove invalid glyphs. */
hb_set_union (glyphs, output);
hb_set_clear (output);
+ active_glyphs_stack.pop ();
+ active_glyphs_stack.fini ();
}
private:
- hb_map_t *done_lookups;
+ hb_map_t *done_lookups_glyph_count;
+ hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *done_lookups_glyph_set;
unsigned int lookup_count;
};
+
+
struct hb_closure_lookups_context_t :
hb_dispatch_context_t<hb_closure_lookups_context_t>
{
@@ -737,12 +805,14 @@ struct hb_get_subtables_context_t :
typedef bool (*intersects_func_t) (const hb_set_t *glyphs, const HBUINT16 &value, const void *data);
+typedef void (*intersected_glyphs_func_t) (const hb_set_t *glyphs, const void *data, unsigned value, hb_set_t *intersected_glyphs);
typedef void (*collect_glyphs_func_t) (hb_set_t *glyphs, const HBUINT16 &value, const void *data);
typedef bool (*match_func_t) (hb_codepoint_t glyph_id, const HBUINT16 &value, const void *data);
struct ContextClosureFuncs
{
intersects_func_t intersects;
+ intersected_glyphs_func_t intersected_glyphs;
};
struct ContextCollectGlyphsFuncs
{
@@ -765,10 +835,29 @@ static inline bool intersects_class (const hb_set_t *glyphs, const HBUINT16 &val
}
static inline bool intersects_coverage (const hb_set_t *glyphs, const HBUINT16 &value, const void *data)
{
- const OffsetTo<Coverage> &coverage = (const OffsetTo<Coverage>&)value;
+ const Offset16To<Coverage> &coverage = (const Offset16To<Coverage>&)value;
return (data+coverage).intersects (glyphs);
}
+
+static inline void intersected_glyph (const hb_set_t *glyphs HB_UNUSED, const void *data, unsigned value, hb_set_t *intersected_glyphs)
+{
+ unsigned g = reinterpret_cast<const HBUINT16 *>(data)[value];
+ intersected_glyphs->add (g);
+}
+static inline void intersected_class_glyphs (const hb_set_t *glyphs, const void *data, unsigned value, hb_set_t *intersected_glyphs)
+{
+ const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
+ class_def.intersected_class_glyphs (glyphs, value, intersected_glyphs);
+}
+static inline void intersected_coverage_glyphs (const hb_set_t *glyphs, const void *data, unsigned value, hb_set_t *intersected_glyphs)
+{
+ Offset16To<Coverage> coverage;
+ coverage = value;
+ (data+coverage).intersected_coverage_glyphs (glyphs, intersected_glyphs);
+}
+
+
static inline bool array_is_subset_of (const hb_set_t *glyphs,
unsigned int count,
const HBUINT16 values[],
@@ -792,7 +881,7 @@ static inline void collect_class (hb_set_t *glyphs, const HBUINT16 &value, const
}
static inline void collect_coverage (hb_set_t *glyphs, const HBUINT16 &value, const void *data)
{
- const OffsetTo<Coverage> &coverage = (const OffsetTo<Coverage>&)value;
+ const Offset16To<Coverage> &coverage = (const Offset16To<Coverage>&)value;
(data+coverage).collect_coverage (glyphs);
}
static inline void collect_array (hb_collect_glyphs_context_t *c HB_UNUSED,
@@ -820,7 +909,7 @@ static inline bool match_class (hb_codepoint_t glyph_id, const HBUINT16 &value,
}
static inline bool match_coverage (hb_codepoint_t glyph_id, const HBUINT16 &value, const void *data)
{
- const OffsetTo<Coverage> &coverage = (const OffsetTo<Coverage>&)value;
+ const Offset16To<Coverage> &coverage = (const Offset16To<Coverage>&)value;
return (data+coverage).get_coverage (glyph_id) != NOT_COVERED;
}
@@ -1146,10 +1235,79 @@ struct LookupRecord
DEFINE_SIZE_STATIC (4);
};
+enum ContextFormat { SimpleContext = 1, ClassBasedContext = 2, CoverageBasedContext = 3 };
+
+static void context_closure_recurse_lookups (hb_closure_context_t *c,
+ unsigned inputCount, const HBUINT16 input[],
+ unsigned lookupCount,
+ const LookupRecord lookupRecord[] /* Array of LookupRecords--in design order */,
+ unsigned value,
+ ContextFormat context_format,
+ const void *data,
+ intersected_glyphs_func_t intersected_glyphs_func)
+{
+ hb_set_t *covered_seq_indicies = hb_set_create ();
+ for (unsigned int i = 0; i < lookupCount; i++)
+ {
+ unsigned seqIndex = lookupRecord[i].sequenceIndex;
+ if (seqIndex >= inputCount) continue;
+
+ hb_set_t *pos_glyphs = nullptr;
+
+ if (hb_set_is_empty (covered_seq_indicies) || !hb_set_has (covered_seq_indicies, seqIndex))
+ {
+ pos_glyphs = hb_set_create ();
+ if (seqIndex == 0)
+ {
+ switch (context_format) {
+ case ContextFormat::SimpleContext:
+ pos_glyphs->add (value);
+ break;
+ case ContextFormat::ClassBasedContext:
+ intersected_glyphs_func (c->cur_intersected_glyphs, data, value, pos_glyphs);
+ break;
+ case ContextFormat::CoverageBasedContext:
+ hb_set_set (pos_glyphs, c->cur_intersected_glyphs);
+ break;
+ }
+ }
+ else
+ {
+ const void *input_data = input;
+ unsigned input_value = seqIndex - 1;
+ if (context_format != ContextFormat::SimpleContext)
+ {
+ input_data = data;
+ input_value = input[seqIndex - 1];
+ }
+
+ intersected_glyphs_func (c->glyphs, input_data, input_value, pos_glyphs);
+ }
+ }
+
+ hb_set_add (covered_seq_indicies, seqIndex);
+ if (pos_glyphs)
+ c->push_cur_active_glyphs (pos_glyphs);
+
+ unsigned endIndex = inputCount;
+ if (context_format == ContextFormat::CoverageBasedContext)
+ endIndex += 1;
+
+ c->recurse (lookupRecord[i].lookupListIndex, covered_seq_indicies, seqIndex, endIndex);
+
+ if (pos_glyphs) {
+ c->pop_cur_done_glyphs ();
+ hb_set_destroy (pos_glyphs);
+ }
+ }
+
+ hb_set_destroy (covered_seq_indicies);
+}
+
template <typename context_t>
static inline void recurse_lookups (context_t *c,
- unsigned int lookupCount,
- const LookupRecord lookupRecord[] /* Array of LookupRecords--in design order */)
+ unsigned int lookupCount,
+ const LookupRecord lookupRecord[] /* Array of LookupRecords--in design order */)
{
for (unsigned int i = 0; i < lookupCount; i++)
c->recurse (lookupRecord[i].lookupListIndex);
@@ -1284,6 +1442,7 @@ static inline bool apply_lookup (hb_ot_apply_context_t *c,
struct ContextClosureLookupContext
{
ContextClosureFuncs funcs;
+ ContextFormat context_format;
const void *intersects_data;
};
@@ -1314,13 +1473,19 @@ static inline void context_closure_lookup (hb_closure_context_t *c,
const HBUINT16 input[], /* Array of input values--start with second glyph */
unsigned int lookupCount,
const LookupRecord lookupRecord[],
+ unsigned value, /* Index of first glyph in Coverage or Class value in ClassDef table */
ContextClosureLookupContext &lookup_context)
{
if (context_intersects (c->glyphs,
inputCount, input,
lookup_context))
- recurse_lookups (c,
- lookupCount, lookupRecord);
+ context_closure_recurse_lookups (c,
+ inputCount, input,
+ lookupCount, lookupRecord,
+ value,
+ lookup_context.context_format,
+ lookup_context.intersects_data,
+ lookup_context.funcs.intersected_glyphs);
}
static inline void context_collect_glyphs_lookup (hb_collect_glyphs_context_t *c,
@@ -1377,7 +1542,7 @@ struct Rule
lookup_context);
}
- void closure (hb_closure_context_t *c, ContextClosureLookupContext &lookup_context) const
+ void closure (hb_closure_context_t *c, unsigned value, ContextClosureLookupContext &lookup_context) const
{
if (unlikely (c->lookup_limit_exceeded ())) return;
@@ -1386,7 +1551,7 @@ struct Rule
context_closure_lookup (c,
inputCount, inputZ.arrayZ,
lookupCount, lookupRecord.arrayZ,
- lookup_context);
+ value, lookup_context);
}
void closure_lookups (hb_closure_lookups_context_t *c,
@@ -1453,7 +1618,14 @@ struct Rule
const UnsizedArrayOf<LookupRecord> &lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>>
(inputZ.as_array ((inputCount ? inputCount - 1 : 0)));
for (unsigned i = 0; i < (unsigned) lookupCount; i++)
+ {
+ if (!lookup_map->has (lookupRecord[i].lookupListIndex))
+ {
+ out->lookupCount--;
+ continue;
+ }
c->copy (lookupRecord[i], lookup_map);
+ }
return_trace (true);
}
@@ -1511,7 +1683,7 @@ struct RuleSet
;
}
- void closure (hb_closure_context_t *c,
+ void closure (hb_closure_context_t *c, unsigned value,
ContextClosureLookupContext &lookup_context) const
{
if (unlikely (c->lookup_limit_exceeded ())) return;
@@ -1519,7 +1691,7 @@ struct RuleSet
return
+ hb_iter (rule)
| hb_map (hb_add (this))
- | hb_apply ([&] (const Rule &_) { _.closure (c, lookup_context); })
+ | hb_apply ([&] (const Rule &_) { _.closure (c, value, lookup_context); })
;
}
@@ -1577,7 +1749,7 @@ struct RuleSet
auto *out = c->serializer->start_embed (*this);
if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
- for (const OffsetTo<Rule>& _ : rule)
+ for (const Offset16To<Rule>& _ : rule)
{
if (!_) continue;
auto *o = out->rule.serialize_append (c->serializer);
@@ -1604,7 +1776,7 @@ struct RuleSet
}
protected:
- OffsetArrayOf<Rule>
+ Array16OfOffset16To<Rule>
rule; /* Array of Rule tables
* ordered by preference */
public:
@@ -1617,7 +1789,8 @@ struct ContextFormat1
bool intersects (const hb_set_t *glyphs) const
{
struct ContextClosureLookupContext lookup_context = {
- {intersects_glyph},
+ {intersects_glyph, intersected_glyph},
+ ContextFormat::SimpleContext,
nullptr
};
@@ -1631,25 +1804,32 @@ struct ContextFormat1
;
}
+ bool may_have_non_1to1 () const
+ { return true; }
+
void closure (hb_closure_context_t *c) const
{
+ c->cur_intersected_glyphs->clear ();
+ get_coverage ().intersected_coverage_glyphs (c->parent_active_glyphs (), c->cur_intersected_glyphs);
+
struct ContextClosureLookupContext lookup_context = {
- {intersects_glyph},
+ {intersects_glyph, intersected_glyph},
+ ContextFormat::SimpleContext,
nullptr
};
- + hb_zip (this+coverage, ruleSet)
- | hb_filter (*c->glyphs, hb_first)
- | hb_map (hb_second)
- | hb_map (hb_add (this))
- | hb_apply ([&] (const RuleSet &_) { _.closure (c, lookup_context); })
+ + hb_zip (this+coverage, hb_range ((unsigned) ruleSet.len))
+ | hb_filter (c->parent_active_glyphs (), hb_first)
+ | hb_map ([&](const hb_pair_t<hb_codepoint_t, unsigned> _) { return hb_pair_t<unsigned, const RuleSet&> (_.first, this+ruleSet[_.second]); })
+ | hb_apply ([&] (const hb_pair_t<unsigned, const RuleSet&>& _) { _.second.closure (c, _.first, lookup_context); })
;
}
void closure_lookups (hb_closure_lookups_context_t *c) const
{
struct ContextClosureLookupContext lookup_context = {
- {intersects_glyph},
+ {intersects_glyph, intersected_glyph},
+ ContextFormat::SimpleContext,
nullptr
};
@@ -1725,8 +1905,7 @@ struct ContextFormat1
| hb_sink (new_coverage)
;
- out->coverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_coverage.iter ());
+ out->coverage.serialize_serialize (c->serializer, new_coverage.iter ());
return_trace (bool (new_coverage));
}
@@ -1738,10 +1917,10 @@ struct ContextFormat1
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of table */
- OffsetArrayOf<RuleSet>
+ Array16OfOffset16To<RuleSet>
ruleSet; /* Array of RuleSet tables
* ordered by Coverage Index */
public:
@@ -1759,7 +1938,8 @@ struct ContextFormat2
const ClassDef &class_def = this+classDef;
struct ContextClosureLookupContext lookup_context = {
- {intersects_class},
+ {intersects_class, intersected_class_glyphs},
+ ContextFormat::ClassBasedContext,
&class_def
};
@@ -1774,26 +1954,35 @@ struct ContextFormat2
;
}
+ bool may_have_non_1to1 () const
+ { return true; }
+
void closure (hb_closure_context_t *c) const
{
if (!(this+coverage).intersects (c->glyphs))
return;
+ c->cur_intersected_glyphs->clear ();
+ get_coverage ().intersected_coverage_glyphs (c->parent_active_glyphs (), c->cur_intersected_glyphs);
+
const ClassDef &class_def = this+classDef;
struct ContextClosureLookupContext lookup_context = {
- {intersects_class},
+ {intersects_class, intersected_class_glyphs},
+ ContextFormat::ClassBasedContext,
&class_def
};
return
+ hb_enumerate (ruleSet)
| hb_filter ([&] (unsigned _)
- { return class_def.intersects_class (c->glyphs, _); },
+ { return class_def.intersects_class (c->cur_intersected_glyphs, _); },
hb_first)
- | hb_map (hb_second)
- | hb_map (hb_add (this))
- | hb_apply ([&] (const RuleSet &_) { _.closure (c, lookup_context); })
+ | hb_apply ([&] (const hb_pair_t<unsigned, const Offset16To<RuleSet>&> _)
+ {
+ const RuleSet& rule_set = this+_.second;
+ rule_set.closure (c, _.first, lookup_context);
+ })
;
}
@@ -1805,7 +1994,8 @@ struct ContextFormat2
const ClassDef &class_def = this+classDef;
struct ContextClosureLookupContext lookup_context = {
- {intersects_class},
+ {intersects_class, intersected_class_glyphs},
+ ContextFormat::ClassBasedContext,
&class_def
};
@@ -1919,13 +2109,13 @@ struct ContextFormat2
protected:
HBUINT16 format; /* Format identifier--format = 2 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of table */
- OffsetTo<ClassDef>
+ Offset16To<ClassDef>
classDef; /* Offset to glyph ClassDef table--from
* beginning of table */
- OffsetArrayOf<RuleSet>
+ Array16OfOffset16To<RuleSet>
ruleSet; /* Array of RuleSet tables
* ordered by class */
public:
@@ -1941,7 +2131,8 @@ struct ContextFormat3
return false;
struct ContextClosureLookupContext lookup_context = {
- {intersects_coverage},
+ {intersects_coverage, intersected_coverage_glyphs},
+ ContextFormat::CoverageBasedContext,
this
};
return context_intersects (glyphs,
@@ -1949,20 +2140,27 @@ struct ContextFormat3
lookup_context);
}
+ bool may_have_non_1to1 () const
+ { return true; }
+
void closure (hb_closure_context_t *c) const
{
if (!(this+coverageZ[0]).intersects (c->glyphs))
return;
+ c->cur_intersected_glyphs->clear ();
+ get_coverage ().intersected_coverage_glyphs (c->parent_active_glyphs (), c->cur_intersected_glyphs);
+
const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
struct ContextClosureLookupContext lookup_context = {
- {intersects_coverage},
+ {intersects_coverage, intersected_coverage_glyphs},
+ ContextFormat::CoverageBasedContext,
this
};
context_closure_lookup (c,
glyphCount, (const HBUINT16 *) (coverageZ.arrayZ + 1),
lookupCount, lookupRecord,
- lookup_context);
+ 0, lookup_context);
}
void closure_lookups (hb_closure_lookups_context_t *c) const
@@ -2032,10 +2230,10 @@ struct ContextFormat3
auto coverages = coverageZ.as_array (glyphCount);
- for (const OffsetTo<Coverage>& offset : coverages)
+ for (const Offset16To<Coverage>& offset : coverages)
{
/* TODO(subset) This looks like should not be necessary to write this way. */
- auto *o = c->serializer->allocate_size<OffsetTo<Coverage>> (OffsetTo<Coverage>::static_size);
+ auto *o = c->serializer->allocate_size<Offset16To<Coverage>> (Offset16To<Coverage>::static_size);
if (unlikely (!o)) return_trace (false);
if (!o->serialize_subset (c, offset, this)) return_trace (false);
}
@@ -2043,7 +2241,14 @@ struct ContextFormat3
const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups;
for (unsigned i = 0; i < (unsigned) lookupCount; i++)
+ {
+ if (!lookup_map->has (lookupRecord[i].lookupListIndex))
+ {
+ out->lookupCount--;
+ continue;
+ }
c->serializer->copy (lookupRecord[i], lookup_map);
+ }
return_trace (true);
}
@@ -2066,7 +2271,7 @@ struct ContextFormat3
HBUINT16 glyphCount; /* Number of glyphs in the input glyph
* sequence */
HBUINT16 lookupCount; /* Number of LookupRecords */
- UnsizedArrayOf<OffsetTo<Coverage>>
+ UnsizedArrayOf<Offset16To<Coverage>>
coverageZ; /* Array of offsets to Coverage
* table in glyph sequence order */
/*UnsizedArrayOf<LookupRecord>
@@ -2106,6 +2311,7 @@ struct Context
struct ChainContextClosureLookupContext
{
ContextClosureFuncs funcs;
+ ContextFormat context_format;
const void *intersects_data[3];
};
@@ -2150,6 +2356,7 @@ static inline void chain_context_closure_lookup (hb_closure_context_t *c,
const HBUINT16 lookahead[],
unsigned int lookupCount,
const LookupRecord lookupRecord[],
+ unsigned value,
ChainContextClosureLookupContext &lookup_context)
{
if (chain_context_intersects (c->glyphs,
@@ -2157,8 +2364,13 @@ static inline void chain_context_closure_lookup (hb_closure_context_t *c,
inputCount, input,
lookaheadCount, lookahead,
lookup_context))
- recurse_lookups (c,
- lookupCount, lookupRecord);
+ context_closure_recurse_lookups (c,
+ inputCount, input,
+ lookupCount, lookupRecord,
+ value,
+ lookup_context.context_format,
+ lookup_context.intersects_data[1],
+ lookup_context.funcs.intersected_glyphs);
}
static inline void chain_context_collect_glyphs_lookup (hb_collect_glyphs_context_t *c,
@@ -2239,7 +2451,7 @@ struct ChainRule
bool intersects (const hb_set_t *glyphs, ChainContextClosureLookupContext &lookup_context) const
{
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
- const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
+ const Array16Of<HBUINT16> &lookahead = StructAfter<Array16Of<HBUINT16>> (input);
return chain_context_intersects (glyphs,
backtrack.len, backtrack.arrayZ,
input.lenP1, input.arrayZ,
@@ -2247,19 +2459,20 @@ struct ChainRule
lookup_context);
}
- void closure (hb_closure_context_t *c,
+ void closure (hb_closure_context_t *c, unsigned value,
ChainContextClosureLookupContext &lookup_context) const
{
if (unlikely (c->lookup_limit_exceeded ())) return;
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
- const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
- const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ const Array16Of<HBUINT16> &lookahead = StructAfter<Array16Of<HBUINT16>> (input);
+ const Array16Of<LookupRecord> &lookup = StructAfter<Array16Of<LookupRecord>> (lookahead);
chain_context_closure_lookup (c,
backtrack.len, backtrack.arrayZ,
input.lenP1, input.arrayZ,
lookahead.len, lookahead.arrayZ,
lookup.len, lookup.arrayZ,
+ value,
lookup_context);
}
@@ -2270,8 +2483,8 @@ struct ChainRule
if (!intersects (c->glyphs, lookup_context)) return;
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
- const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
- const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ const Array16Of<HBUINT16> &lookahead = StructAfter<Array16Of<HBUINT16>> (input);
+ const Array16Of<LookupRecord> &lookup = StructAfter<Array16Of<LookupRecord>> (lookahead);
recurse_lookups (c, lookup.len, lookup.arrayZ);
}
@@ -2279,8 +2492,8 @@ struct ChainRule
ChainContextCollectGlyphsLookupContext &lookup_context) const
{
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
- const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
- const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ const Array16Of<HBUINT16> &lookahead = StructAfter<Array16Of<HBUINT16>> (input);
+ const Array16Of<LookupRecord> &lookup = StructAfter<Array16Of<LookupRecord>> (lookahead);
chain_context_collect_glyphs_lookup (c,
backtrack.len, backtrack.arrayZ,
input.lenP1, input.arrayZ,
@@ -2293,8 +2506,8 @@ struct ChainRule
ChainContextApplyLookupContext &lookup_context) const
{
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
- const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
- const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ const Array16Of<HBUINT16> &lookahead = StructAfter<Array16Of<HBUINT16>> (input);
+ const Array16Of<LookupRecord> &lookup = StructAfter<Array16Of<LookupRecord>> (lookahead);
return chain_context_would_apply_lookup (c,
backtrack.len, backtrack.arrayZ,
input.lenP1, input.arrayZ,
@@ -2306,8 +2519,8 @@ struct ChainRule
{
TRACE_APPLY (this);
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
- const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
- const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ const Array16Of<HBUINT16> &lookahead = StructAfter<Array16Of<HBUINT16>> (input);
+ const Array16Of<LookupRecord> &lookup = StructAfter<Array16Of<LookupRecord>> (lookahead);
return_trace (chain_context_apply_lookup (c,
backtrack.len, backtrack.arrayZ,
input.lenP1, input.arrayZ,
@@ -2345,12 +2558,12 @@ struct ChainRule
serialize_array (c, input.lenP1, + input.iter ()
| hb_map (mapping));
- const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
+ const Array16Of<HBUINT16> &lookahead = StructAfter<Array16Of<HBUINT16>> (input);
if (lookahead_map) mapping = lookahead_map;
serialize_array (c, lookahead.len, + lookahead.iter ()
| hb_map (mapping));
- const ArrayOf<LookupRecord> &lookupRecord = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ const Array16Of<LookupRecord> &lookupRecord = StructAfter<Array16Of<LookupRecord>> (lookahead);
HBUINT16* lookupCount = c->embed (&(lookupRecord.len));
if (!lookupCount) return_trace (nullptr);
@@ -2377,7 +2590,7 @@ struct ChainRule
TRACE_SUBSET (this);
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
- const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
+ const Array16Of<HBUINT16> &lookahead = StructAfter<Array16Of<HBUINT16>> (input);
if (!backtrack_map)
{
@@ -2408,24 +2621,24 @@ struct ChainRule
if (!backtrack.sanitize (c)) return_trace (false);
const HeadlessArrayOf<HBUINT16> &input = StructAfter<HeadlessArrayOf<HBUINT16>> (backtrack);
if (!input.sanitize (c)) return_trace (false);
- const ArrayOf<HBUINT16> &lookahead = StructAfter<ArrayOf<HBUINT16>> (input);
+ const Array16Of<HBUINT16> &lookahead = StructAfter<Array16Of<HBUINT16>> (input);
if (!lookahead.sanitize (c)) return_trace (false);
- const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ const Array16Of<LookupRecord> &lookup = StructAfter<Array16Of<LookupRecord>> (lookahead);
return_trace (lookup.sanitize (c));
}
protected:
- ArrayOf<HBUINT16>
+ Array16Of<HBUINT16>
backtrack; /* Array of backtracking values
* (to be matched before the input
* sequence) */
HeadlessArrayOf<HBUINT16>
inputX; /* Array of input values (start with
* second glyph) */
- ArrayOf<HBUINT16>
+ Array16Of<HBUINT16>
lookaheadX; /* Array of lookahead values's (to be
* matched after the input sequence) */
- ArrayOf<LookupRecord>
+ Array16Of<LookupRecord>
lookupX; /* Array of LookupRecords--in
* design order) */
public:
@@ -2443,14 +2656,14 @@ struct ChainRuleSet
| hb_any
;
}
- void closure (hb_closure_context_t *c, ChainContextClosureLookupContext &lookup_context) const
+ void closure (hb_closure_context_t *c, unsigned value, ChainContextClosureLookupContext &lookup_context) const
{
if (unlikely (c->lookup_limit_exceeded ())) return;
return
+ hb_iter (rule)
| hb_map (hb_add (this))
- | hb_apply ([&] (const ChainRule &_) { _.closure (c, lookup_context); })
+ | hb_apply ([&] (const ChainRule &_) { _.closure (c, value, lookup_context); })
;
}
@@ -2508,7 +2721,7 @@ struct ChainRuleSet
auto *out = c->serializer->start_embed (*this);
if (unlikely (!c->serializer->extend_min (out))) return_trace (false);
- for (const OffsetTo<ChainRule>& _ : rule)
+ for (const Offset16To<ChainRule>& _ : rule)
{
if (!_) continue;
auto *o = out->rule.serialize_append (c->serializer);
@@ -2539,7 +2752,7 @@ struct ChainRuleSet
}
protected:
- OffsetArrayOf<ChainRule>
+ Array16OfOffset16To<ChainRule>
rule; /* Array of ChainRule tables
* ordered by preference */
public:
@@ -2551,7 +2764,8 @@ struct ChainContextFormat1
bool intersects (const hb_set_t *glyphs) const
{
struct ChainContextClosureLookupContext lookup_context = {
- {intersects_glyph},
+ {intersects_glyph, intersected_glyph},
+ ContextFormat::SimpleContext,
{nullptr, nullptr, nullptr}
};
@@ -2565,25 +2779,32 @@ struct ChainContextFormat1
;
}
+ bool may_have_non_1to1 () const
+ { return true; }
+
void closure (hb_closure_context_t *c) const
{
+ c->cur_intersected_glyphs->clear ();
+ get_coverage ().intersected_coverage_glyphs (c->parent_active_glyphs (), c->cur_intersected_glyphs);
+
struct ChainContextClosureLookupContext lookup_context = {
- {intersects_glyph},
+ {intersects_glyph, intersected_glyph},
+ ContextFormat::SimpleContext,
{nullptr, nullptr, nullptr}
};
- + hb_zip (this+coverage, ruleSet)
- | hb_filter (*c->glyphs, hb_first)
- | hb_map (hb_second)
- | hb_map (hb_add (this))
- | hb_apply ([&] (const ChainRuleSet &_) { _.closure (c, lookup_context); })
+ + hb_zip (this+coverage, hb_range ((unsigned) ruleSet.len))
+ | hb_filter (c->parent_active_glyphs (), hb_first)
+ | hb_map ([&](const hb_pair_t<hb_codepoint_t, unsigned> _) { return hb_pair_t<unsigned, const ChainRuleSet&> (_.first, this+ruleSet[_.second]); })
+ | hb_apply ([&] (const hb_pair_t<unsigned, const ChainRuleSet&>& _) { _.second.closure (c, _.first, lookup_context); })
;
}
void closure_lookups (hb_closure_lookups_context_t *c) const
{
struct ChainContextClosureLookupContext lookup_context = {
- {intersects_glyph},
+ {intersects_glyph, intersected_glyph},
+ ContextFormat::SimpleContext,
{nullptr, nullptr, nullptr}
};
@@ -2658,8 +2879,7 @@ struct ChainContextFormat1
| hb_sink (new_coverage)
;
- out->coverage.serialize (c->serializer, out)
- .serialize (c->serializer, new_coverage.iter ());
+ out->coverage.serialize_serialize (c->serializer, new_coverage.iter ());
return_trace (bool (new_coverage));
}
@@ -2671,10 +2891,10 @@ struct ChainContextFormat1
protected:
HBUINT16 format; /* Format identifier--format = 1 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of table */
- OffsetArrayOf<ChainRuleSet>
+ Array16OfOffset16To<ChainRuleSet>
ruleSet; /* Array of ChainRuleSet tables
* ordered by Coverage Index */
public:
@@ -2693,7 +2913,8 @@ struct ChainContextFormat2
const ClassDef &lookahead_class_def = this+lookaheadClassDef;
struct ChainContextClosureLookupContext lookup_context = {
- {intersects_class},
+ {intersects_class, intersected_class_glyphs},
+ ContextFormat::ClassBasedContext,
{&backtrack_class_def,
&input_class_def,
&lookahead_class_def}
@@ -2709,17 +2930,25 @@ struct ChainContextFormat2
| hb_any
;
}
+
+ bool may_have_non_1to1 () const
+ { return true; }
+
void closure (hb_closure_context_t *c) const
{
if (!(this+coverage).intersects (c->glyphs))
return;
+ c->cur_intersected_glyphs->clear ();
+ get_coverage ().intersected_coverage_glyphs (c->parent_active_glyphs (), c->cur_intersected_glyphs);
+
const ClassDef &backtrack_class_def = this+backtrackClassDef;
const ClassDef &input_class_def = this+inputClassDef;
const ClassDef &lookahead_class_def = this+lookaheadClassDef;
struct ChainContextClosureLookupContext lookup_context = {
- {intersects_class},
+ {intersects_class, intersected_class_glyphs},
+ ContextFormat::ClassBasedContext,
{&backtrack_class_def,
&input_class_def,
&lookahead_class_def}
@@ -2728,11 +2957,13 @@ struct ChainContextFormat2
return
+ hb_enumerate (ruleSet)
| hb_filter ([&] (unsigned _)
- { return input_class_def.intersects_class (c->glyphs, _); },
+ { return input_class_def.intersects_class (c->cur_intersected_glyphs, _); },
hb_first)
- | hb_map (hb_second)
- | hb_map (hb_add (this))
- | hb_apply ([&] (const ChainRuleSet &_) { _.closure (c, lookup_context); })
+ | hb_apply ([&] (const hb_pair_t<unsigned, const Offset16To<ChainRuleSet>&> _)
+ {
+ const ChainRuleSet& chainrule_set = this+_.second;
+ chainrule_set.closure (c, _.first, lookup_context);
+ })
;
}
@@ -2746,7 +2977,8 @@ struct ChainContextFormat2
const ClassDef &lookahead_class_def = this+lookaheadClassDef;
struct ChainContextClosureLookupContext lookup_context = {
- {intersects_class},
+ {intersects_class, intersected_class_glyphs},
+ ContextFormat::ClassBasedContext,
{&backtrack_class_def,
&input_class_def,
&lookahead_class_def}
@@ -2852,7 +3084,7 @@ struct ChainContextFormat2
bool ret = true;
const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups;
auto last_non_zero = c->serializer->snapshot ();
- for (const OffsetTo<ChainRuleSet>& _ : + hb_enumerate (ruleSet)
+ for (const Offset16To<ChainRuleSet>& _ : + hb_enumerate (ruleSet)
| hb_filter (input_klass_map, hb_first)
| hb_map (hb_second))
{
@@ -2898,22 +3130,22 @@ struct ChainContextFormat2
protected:
HBUINT16 format; /* Format identifier--format = 2 */
- OffsetTo<Coverage>
+ Offset16To<Coverage>
coverage; /* Offset to Coverage table--from
* beginning of table */
- OffsetTo<ClassDef>
+ Offset16To<ClassDef>
backtrackClassDef; /* Offset to glyph ClassDef table
* containing backtrack sequence
* data--from beginning of table */
- OffsetTo<ClassDef>
+ Offset16To<ClassDef>
inputClassDef; /* Offset to glyph ClassDef
* table containing input sequence
* data--from beginning of table */
- OffsetTo<ClassDef>
+ Offset16To<ClassDef>
lookaheadClassDef; /* Offset to glyph ClassDef table
* containing lookahead sequence
* data--from beginning of table */
- OffsetArrayOf<ChainRuleSet>
+ Array16OfOffset16To<ChainRuleSet>
ruleSet; /* Array of ChainRuleSet tables
* ordered by class */
public:
@@ -2924,14 +3156,15 @@ struct ChainContextFormat3
{
bool intersects (const hb_set_t *glyphs) const
{
- const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
+ const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
if (!(this+input[0]).intersects (glyphs))
return false;
- const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
struct ChainContextClosureLookupContext lookup_context = {
- {intersects_coverage},
+ {intersects_coverage, intersected_coverage_glyphs},
+ ContextFormat::CoverageBasedContext,
{this, this, this}
};
return chain_context_intersects (glyphs,
@@ -2941,17 +3174,24 @@ struct ChainContextFormat3
lookup_context);
}
+ bool may_have_non_1to1 () const
+ { return true; }
+
void closure (hb_closure_context_t *c) const
{
- const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
+ const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
if (!(this+input[0]).intersects (c->glyphs))
return;
- const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
- const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ c->cur_intersected_glyphs->clear ();
+ get_coverage ().intersected_coverage_glyphs (c->parent_active_glyphs (), c->cur_intersected_glyphs);
+
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
+ const Array16Of<LookupRecord> &lookup = StructAfter<Array16Of<LookupRecord>> (lookahead);
struct ChainContextClosureLookupContext lookup_context = {
- {intersects_coverage},
+ {intersects_coverage, intersected_coverage_glyphs},
+ ContextFormat::CoverageBasedContext,
{this, this, this}
};
chain_context_closure_lookup (c,
@@ -2959,7 +3199,7 @@ struct ChainContextFormat3
input.len, (const HBUINT16 *) input.arrayZ + 1,
lookahead.len, (const HBUINT16 *) lookahead.arrayZ,
lookup.len, lookup.arrayZ,
- lookup_context);
+ 0, lookup_context);
}
void closure_lookups (hb_closure_lookups_context_t *c) const
@@ -2967,9 +3207,9 @@ struct ChainContextFormat3
if (!intersects (c->glyphs))
return;
- const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
- const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
- const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
+ const Array16Of<LookupRecord> &lookup = StructAfter<Array16Of<LookupRecord>> (lookahead);
recurse_lookups (c, lookup.len, lookup.arrayZ);
}
@@ -2977,12 +3217,12 @@ struct ChainContextFormat3
void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
- const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
+ const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
(this+input[0]).collect_coverage (c->input);
- const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
- const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
+ const Array16Of<LookupRecord> &lookup = StructAfter<Array16Of<LookupRecord>> (lookahead);
struct ChainContextCollectGlyphsLookupContext lookup_context = {
{collect_coverage},
{this, this, this}
@@ -2997,9 +3237,9 @@ struct ChainContextFormat3
bool would_apply (hb_would_apply_context_t *c) const
{
- const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
- const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
- const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
+ const Array16Of<LookupRecord> &lookup = StructAfter<Array16Of<LookupRecord>> (lookahead);
struct ChainContextApplyLookupContext lookup_context = {
{match_coverage},
{this, this, this}
@@ -3013,20 +3253,20 @@ struct ChainContextFormat3
const Coverage &get_coverage () const
{
- const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
+ const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
return this+input[0];
}
bool apply (hb_ot_apply_context_t *c) const
{
TRACE_APPLY (this);
- const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
+ const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
unsigned int index = (this+input[0]).get_coverage (c->buffer->cur().codepoint);
if (likely (index == NOT_COVERED)) return_trace (false);
- const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
- const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
+ const Array16Of<LookupRecord> &lookup = StructAfter<Array16Of<LookupRecord>> (lookahead);
struct ChainContextApplyLookupContext lookup_context = {
{match_coverage},
{this, this, this}
@@ -3043,7 +3283,7 @@ struct ChainContextFormat3
bool serialize_coverage_offsets (hb_subset_context_t *c, Iterator it, const void* base) const
{
TRACE_SERIALIZE (this);
- auto *out = c->serializer->start_embed<OffsetArrayOf<Coverage>> ();
+ auto *out = c->serializer->start_embed<Array16OfOffset16To<Coverage>> ();
if (unlikely (!c->serializer->allocate_size<HBUINT16> (HBUINT16::static_size)))
return_trace (false);
@@ -3068,22 +3308,30 @@ struct ChainContextFormat3
if (!serialize_coverage_offsets (c, backtrack.iter (), this))
return_trace (false);
- const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
+ const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
if (!serialize_coverage_offsets (c, input.iter (), this))
return_trace (false);
- const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
if (!serialize_coverage_offsets (c, lookahead.iter (), this))
return_trace (false);
- const ArrayOf<LookupRecord> &lookupRecord = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ const Array16Of<LookupRecord> &lookupRecord = StructAfter<Array16Of<LookupRecord>> (lookahead);
+ const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups;
+ hb_set_t lookup_indices;
+ for (unsigned i = 0; i < (unsigned) lookupRecord.len; i++)
+ if (lookup_map->has (lookupRecord[i].lookupListIndex))
+ lookup_indices.add (i);
+
HBUINT16 lookupCount;
- lookupCount = lookupRecord.len;
+ lookupCount = lookup_indices.get_population ();
if (!c->serializer->copy (lookupCount)) return_trace (false);
- const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups;
- for (unsigned i = 0; i < (unsigned) lookupCount; i++)
- if (!c->serializer->copy (lookupRecord[i], lookup_map)) return_trace (false);
+ for (unsigned i : lookup_indices.iter ())
+ {
+ if (!c->serializer->copy (lookupRecord[i], lookup_map))
+ return_trace (false);
+ }
return_trace (true);
}
@@ -3092,30 +3340,30 @@ struct ChainContextFormat3
{
TRACE_SANITIZE (this);
if (!backtrack.sanitize (c, this)) return_trace (false);
- const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage>> (backtrack);
+ const Array16OfOffset16To<Coverage> &input = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
if (!input.sanitize (c, this)) return_trace (false);
if (!input.len) return_trace (false); /* To be consistent with Context. */
- const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage>> (input);
+ const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (input);
if (!lookahead.sanitize (c, this)) return_trace (false);
- const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord>> (lookahead);
+ const Array16Of<LookupRecord> &lookup = StructAfter<Array16Of<LookupRecord>> (lookahead);
return_trace (lookup.sanitize (c));
}
protected:
HBUINT16 format; /* Format identifier--format = 3 */
- OffsetArrayOf<Coverage>
+ Array16OfOffset16To<Coverage>
backtrack; /* Array of coverage tables
* in backtracking sequence, in glyph
* sequence order */
- OffsetArrayOf<Coverage>
+ Array16OfOffset16To<Coverage>
inputX ; /* Array of coverage
* tables in input sequence, in glyph
* sequence order */
- OffsetArrayOf<Coverage>
+ Array16OfOffset16To<Coverage>
lookaheadX; /* Array of coverage tables
* in lookahead sequence, in glyph
* sequence order */
- ArrayOf<LookupRecord>
+ Array16Of<LookupRecord>
lookupX; /* Array of LookupRecords--in
* design order) */
public:
@@ -3154,7 +3402,7 @@ struct ExtensionFormat1
template <typename X>
const X& get_subtable () const
- { return this + reinterpret_cast<const LOffsetTo<typename T::SubTable> &> (extensionOffset); }
+ { return this + reinterpret_cast<const Offset32To<typename T::SubTable> &> (extensionOffset); }
template <typename context_t, typename ...Ts>
typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const
@@ -3186,9 +3434,9 @@ struct ExtensionFormat1
out->extensionLookupType = extensionLookupType;
const auto& src_offset =
- reinterpret_cast<const LOffsetTo<typename T::SubTable> &> (extensionOffset);
+ reinterpret_cast<const Offset32To<typename T::SubTable> &> (extensionOffset);
auto& dest_offset =
- reinterpret_cast<LOffsetTo<typename T::SubTable> &> (out->extensionOffset);
+ reinterpret_cast<Offset32To<typename T::SubTable> &> (out->extensionOffset);
return_trace (dest_offset.serialize_subset (c, src_offset, this, get_type ()));
}
@@ -3372,6 +3620,20 @@ struct GSUBGPOS
hb_set_subtract (lookup_indexes, &inactive_lookups);
}
+ void prune_langsys (const hb_map_t *duplicate_feature_map,
+ hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *script_langsys_map,
+ hb_set_t *new_feature_indexes /* OUT */) const
+ {
+ hb_prune_langsys_context_t c (this, script_langsys_map, duplicate_feature_map, new_feature_indexes);
+
+ unsigned count = get_script_count ();
+ for (unsigned script_index = 0; script_index < count; script_index++)
+ {
+ const Script& s = get_script (script_index);
+ s.prune_langsys (&c, script_index);
+ }
+ }
+
template <typename TLookup>
bool subset (hb_subset_layout_context_t *c) const
{
@@ -3380,15 +3642,15 @@ struct GSUBGPOS
if (unlikely (!out)) return_trace (false);
typedef LookupOffsetList<TLookup> TLookupList;
- reinterpret_cast<OffsetTo<TLookupList> &> (out->lookupList)
+ reinterpret_cast<Offset16To<TLookupList> &> (out->lookupList)
.serialize_subset (c->subset_context,
- reinterpret_cast<const OffsetTo<TLookupList> &> (lookupList),
+ reinterpret_cast<const Offset16To<TLookupList> &> (lookupList),
this,
c);
- reinterpret_cast<OffsetTo<RecordListOfFeature> &> (out->featureList)
+ reinterpret_cast<Offset16To<RecordListOfFeature> &> (out->featureList)
.serialize_subset (c->subset_context,
- reinterpret_cast<const OffsetTo<RecordListOfFeature> &> (featureList),
+ reinterpret_cast<const Offset16To<RecordListOfFeature> &> (featureList),
this,
c);
@@ -3412,8 +3674,65 @@ struct GSUBGPOS
return_trace (true);
}
+ void find_duplicate_features (const hb_map_t *lookup_indices,
+ const hb_set_t *feature_indices,
+ hb_map_t *duplicate_feature_map /* OUT */) const
+ {
+ //find out duplicate features after subset
+ unsigned prev = 0xFFFFu;
+ for (unsigned i : feature_indices->iter ())
+ {
+ if (prev == 0xFFFFu)
+ {
+ duplicate_feature_map->set (i, i);
+ prev = i;
+ continue;
+ }
+
+ hb_tag_t t = get_feature_tag (i);
+ hb_tag_t prev_t = get_feature_tag (prev);
+ if (t != prev_t)
+ {
+ duplicate_feature_map->set (i, i);
+ prev = i;
+ continue;
+ }
+
+ const Feature& f = get_feature (i);
+ const Feature& prev_f = get_feature (prev);
+
+ auto f_iter =
+ + hb_iter (f.lookupIndex)
+ | hb_filter (lookup_indices)
+ ;
+
+ auto prev_iter =
+ + hb_iter (prev_f.lookupIndex)
+ | hb_filter (lookup_indices)
+ ;
+
+ if (f_iter.len () != prev_iter.len ())
+ {
+ duplicate_feature_map->set (i, i);
+ prev = i;
+ continue;
+ }
+
+ bool is_equal = true;
+ for (auto _ : + hb_zip (f_iter, prev_iter))
+ if (_.first != _.second) { is_equal = false; break; }
+
+ if (is_equal == true) duplicate_feature_map->set (i, prev);
+ else
+ {
+ duplicate_feature_map->set (i, i);
+ prev = i;
+ }
+ }
+ }
+
void prune_features (const hb_map_t *lookup_indices, /* IN */
- hb_set_t *feature_indices /* IN/OUT */) const
+ hb_set_t *feature_indices /* IN/OUT */) const
{
#ifndef HB_NO_VAR
// This is the set of feature indices which have alternate versions defined
@@ -3422,8 +3741,9 @@ struct GSUBGPOS
hb_set_t alternate_feature_indices;
if (version.to_int () >= 0x00010001u)
(this+featureVars).closure_features (lookup_indices, &alternate_feature_indices);
- if (unlikely (alternate_feature_indices.in_error())) {
- feature_indices->successful = false;
+ if (unlikely (alternate_feature_indices.in_error()))
+ {
+ feature_indices->err ();
return;
}
#endif
@@ -3431,6 +3751,13 @@ struct GSUBGPOS
for (unsigned i : feature_indices->iter())
{
const Feature& f = get_feature (i);
+ hb_tag_t tag = get_feature_tag (i);
+ if (tag == HB_TAG ('p', 'r', 'e', 'f'))
+ // Note: Never ever drop feature 'pref', even if it's empty.
+ // HarfBuzz chooses shaper for Khmer based on presence of this
+ // feature. See thread at:
+ // http://lists.freedesktop.org/archives/harfbuzz/2012-November/002660.html
+ continue;
if (f.featureParams.is_null ()
&& !f.intersects_lookup_indexes (lookup_indices)
@@ -3452,12 +3779,12 @@ struct GSUBGPOS
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- typedef OffsetListOf<TLookup> TLookupList;
+ typedef List16OfOffset16To<TLookup> TLookupList;
if (unlikely (!(version.sanitize (c) &&
likely (version.major == 1) &&
scriptList.sanitize (c, this) &&
featureList.sanitize (c, this) &&
- reinterpret_cast<const OffsetTo<TLookupList> &> (lookupList).sanitize (c, this))))
+ reinterpret_cast<const Offset16To<TLookupList> &> (lookupList).sanitize (c, this))))
return_trace (false);
#ifndef HB_NO_VAR
@@ -3482,7 +3809,7 @@ struct GSUBGPOS
this->lookup_count = table->get_lookup_count ();
- this->accels = (hb_ot_layout_lookup_accelerator_t *) calloc (this->lookup_count, sizeof (hb_ot_layout_lookup_accelerator_t));
+ this->accels = (hb_ot_layout_lookup_accelerator_t *) hb_calloc (this->lookup_count, sizeof (hb_ot_layout_lookup_accelerator_t));
if (unlikely (!this->accels))
{
this->lookup_count = 0;
@@ -3498,7 +3825,7 @@ struct GSUBGPOS
{
for (unsigned int i = 0; i < this->lookup_count; i++)
this->accels[i].fini ();
- free (this->accels);
+ hb_free (this->accels);
this->table.destroy ();
}
@@ -3510,13 +3837,13 @@ struct GSUBGPOS
protected:
FixedVersion<>version; /* Version of the GSUB/GPOS table--initially set
* to 0x00010000u */
- OffsetTo<ScriptList>
+ Offset16To<ScriptList>
scriptList; /* ScriptList table */
- OffsetTo<FeatureList>
+ Offset16To<FeatureList>
featureList; /* FeatureList table */
- OffsetTo<LookupList>
+ Offset16To<LookupList>
lookupList; /* LookupList table */
- LOffsetTo<FeatureVariations>
+ Offset32To<FeatureVariations>
featureVars; /* Offset to Feature Variations
table--from beginning of table
* (may be NULL). Introduced
diff --git a/thirdparty/harfbuzz/src/hb-ot-layout-jstf-table.hh b/thirdparty/harfbuzz/src/hb-ot-layout-jstf-table.hh
index ffd2bf4574..3b2293dff0 100644
--- a/thirdparty/harfbuzz/src/hb-ot-layout-jstf-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-layout-jstf-table.hh
@@ -45,7 +45,7 @@ typedef IndexArray JstfModList;
* JstfMax -- Justification Maximum Table
*/
-typedef OffsetListOf<PosLookup> JstfMax;
+typedef List16OfOffset16To<PosLookup> JstfMax;
/*
@@ -71,43 +71,43 @@ struct JstfPriority
}
protected:
- OffsetTo<JstfModList>
+ Offset16To<JstfModList>
shrinkageEnableGSUB; /* Offset to Shrinkage Enable GSUB
* JstfModList table--from beginning of
* JstfPriority table--may be NULL */
- OffsetTo<JstfModList>
+ Offset16To<JstfModList>
shrinkageDisableGSUB; /* Offset to Shrinkage Disable GSUB
* JstfModList table--from beginning of
* JstfPriority table--may be NULL */
- OffsetTo<JstfModList>
+ Offset16To<JstfModList>
shrinkageEnableGPOS; /* Offset to Shrinkage Enable GPOS
* JstfModList table--from beginning of
* JstfPriority table--may be NULL */
- OffsetTo<JstfModList>
+ Offset16To<JstfModList>
shrinkageDisableGPOS; /* Offset to Shrinkage Disable GPOS
* JstfModList table--from beginning of
* JstfPriority table--may be NULL */
- OffsetTo<JstfMax>
+ Offset16To<JstfMax>
shrinkageJstfMax; /* Offset to Shrinkage JstfMax table--
* from beginning of JstfPriority table
* --may be NULL */
- OffsetTo<JstfModList>
+ Offset16To<JstfModList>
extensionEnableGSUB; /* Offset to Extension Enable GSUB
* JstfModList table--from beginning of
* JstfPriority table--may be NULL */
- OffsetTo<JstfModList>
+ Offset16To<JstfModList>
extensionDisableGSUB; /* Offset to Extension Disable GSUB
* JstfModList table--from beginning of
* JstfPriority table--may be NULL */
- OffsetTo<JstfModList>
+ Offset16To<JstfModList>
extensionEnableGPOS; /* Offset to Extension Enable GPOS
* JstfModList table--from beginning of
* JstfPriority table--may be NULL */
- OffsetTo<JstfModList>
+ Offset16To<JstfModList>
extensionDisableGPOS; /* Offset to Extension Disable GPOS
* JstfModList table--from beginning of
* JstfPriority table--may be NULL */
- OffsetTo<JstfMax>
+ Offset16To<JstfMax>
extensionJstfMax; /* Offset to Extension JstfMax table--
* from beginning of JstfPriority table
* --may be NULL */
@@ -121,13 +121,13 @@ struct JstfPriority
* JstfLangSys -- Justification Language System Table
*/
-struct JstfLangSys : OffsetListOf<JstfPriority>
+struct JstfLangSys : List16OfOffset16To<JstfPriority>
{
bool sanitize (hb_sanitize_context_t *c,
const Record_sanitize_closure_t * = nullptr) const
{
TRACE_SANITIZE (this);
- return_trace (OffsetListOf<JstfPriority>::sanitize (c));
+ return_trace (List16OfOffset16To<JstfPriority>::sanitize (c));
}
};
@@ -136,7 +136,7 @@ struct JstfLangSys : OffsetListOf<JstfPriority>
* ExtenderGlyphs -- Extender Glyph Table
*/
-typedef SortedArrayOf<HBGlyphID> ExtenderGlyphs;
+typedef SortedArray16Of<HBGlyphID> ExtenderGlyphs;
/*
@@ -174,10 +174,10 @@ struct JstfScript
}
protected:
- OffsetTo<ExtenderGlyphs>
+ Offset16To<ExtenderGlyphs>
extenderGlyphs; /* Offset to ExtenderGlyph table--from beginning
* of JstfScript table-may be NULL */
- OffsetTo<JstfLangSys>
+ Offset16To<JstfLangSys>
defaultLangSys; /* Offset to DefaultJstfLangSys table--from
* beginning of JstfScript table--may be Null */
RecordArrayOf<JstfLangSys>
diff --git a/thirdparty/harfbuzz/src/hb-ot-layout.cc b/thirdparty/harfbuzz/src/hb-ot-layout.cc
index 89df949b26..0454af2063 100644
--- a/thirdparty/harfbuzz/src/hb-ot-layout.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-layout.cc
@@ -131,7 +131,9 @@ hb_ot_layout_kern (const hb_ot_shape_plan_t *plan,
AAT::hb_aat_apply_context_t c (plan, font, buffer, blob);
+ if (!buffer->message (font, "start table kern")) return;
kern.apply (&c);
+ (void) buffer->message (font, "end table kern");
}
#endif
@@ -144,7 +146,7 @@ bool
OT::GDEF::is_blocklisted (hb_blob_t *blob,
hb_face_t *face) const
{
-#ifdef HB_NO_OT_LAYOUT_BLACKLIST
+#ifdef HB_NO_OT_LAYOUT_BLOCKLIST
return false;
#endif
/* The ugly business of blocklisting individual fonts' tables happen here!
@@ -331,6 +333,8 @@ hb_ot_layout_get_glyphs_in_class (hb_face_t *face,
*
* Useful if the client program wishes to cache the list.
*
+ * Return value: Total number of attachment points for @glyph.
+ *
**/
unsigned int
hb_ot_layout_get_attach_points (hb_face_t *face,
@@ -357,6 +361,8 @@ hb_ot_layout_get_attach_points (hb_face_t *face,
* Fetches a list of the caret positions defined for a ligature glyph in the GDEF
* table of the font. The list returned will begin at the offset provided.
*
+ * Return value: Total number of ligature caret positions for @glyph.
+ *
**/
unsigned int
hb_ot_layout_get_ligature_carets (hb_font_t *font,
@@ -379,7 +385,7 @@ bool
OT::GSUB::is_blocklisted (hb_blob_t *blob HB_UNUSED,
hb_face_t *face) const
{
-#ifdef HB_NO_OT_LAYOUT_BLACKLIST
+#ifdef HB_NO_OT_LAYOUT_BLOCKLIST
return false;
#endif
return false;
@@ -389,7 +395,7 @@ bool
OT::GPOS::is_blocklisted (hb_blob_t *blob HB_UNUSED,
hb_face_t *face HB_UNUSED) const
{
-#ifdef HB_NO_OT_LAYOUT_BLACKLIST
+#ifdef HB_NO_OT_LAYOUT_BLOCKLIST
return false;
#endif
return false;
@@ -419,6 +425,8 @@ get_gsubgpos_table (hb_face_t *face,
* Fetches a list of all scripts enumerated in the specified face's GSUB table
* or GPOS table. The list returned will begin at the offset provided.
*
+ * Return value: Total number of script tags.
+ *
**/
unsigned int
hb_ot_layout_table_get_script_tags (hb_face_t *face,
@@ -585,6 +593,8 @@ hb_ot_layout_table_select_script (hb_face_t *face,
*
* Fetches a list of all feature tags in the given face's GSUB or GPOS table.
*
+ * Return value: Total number of feature tags.
+ *
**/
unsigned int
hb_ot_layout_table_get_feature_tags (hb_face_t *face,
@@ -647,6 +657,8 @@ hb_ot_layout_table_find_feature (hb_face_t *face,
* Fetches a list of language tags in the given face's GSUB or GPOS table, underneath
* the specified script index. The list returned will begin at the offset provided.
*
+ * Return value: Total number of language tags.
+ *
**/
unsigned int
hb_ot_layout_script_get_language_tags (hb_face_t *face,
@@ -818,6 +830,8 @@ hb_ot_layout_language_get_required_feature (hb_face_t *face,
* Fetches a list of all features in the specified face's GSUB table
* or GPOS table, underneath the specified script and language. The list
* returned will begin at the offset provided.
+ *
+ * Return value: Total number of features.
**/
unsigned int
hb_ot_layout_language_get_feature_indexes (hb_face_t *face,
@@ -850,6 +864,7 @@ hb_ot_layout_language_get_feature_indexes (hb_face_t *face,
* or GPOS table, underneath the specified script and language. The list
* returned will begin at the offset provided.
*
+ * Return value: Total number of feature tags.
**/
unsigned int
hb_ot_layout_language_get_feature_tags (hb_face_t *face,
@@ -932,6 +947,8 @@ hb_ot_layout_language_find_feature (hb_face_t *face,
* the specified face's GSUB table or GPOS table. The list returned will
* begin at the offset provided.
*
+ * Return value: Total number of lookups.
+ *
* Since: 0.9.7
**/
unsigned int
@@ -960,6 +977,8 @@ hb_ot_layout_feature_get_lookups (hb_face_t *face,
* Fetches the total number of lookups enumerated in the specified
* face's GSUB table or GPOS table.
*
+ * Return value: Total number of lookups.
+ *
* Since: 0.9.22
**/
unsigned int
@@ -974,10 +993,46 @@ struct hb_collect_features_context_t
{
hb_collect_features_context_t (hb_face_t *face,
hb_tag_t table_tag,
- hb_set_t *feature_indexes_)
+ hb_set_t *feature_indices_,
+ const hb_tag_t *features)
+
: g (get_gsubgpos_table (face, table_tag)),
- feature_indexes (feature_indexes_),
- script_count (0),langsys_count (0), feature_index_count (0) {}
+ feature_indices (feature_indices_),
+ has_feature_filter (false),
+ script_count (0),langsys_count (0), feature_index_count (0)
+ {
+ compute_feature_filter (features);
+ }
+
+ void compute_feature_filter (const hb_tag_t *features)
+ {
+ if (features == nullptr)
+ {
+ has_feature_filter = false;
+ return;
+ }
+
+ has_feature_filter = true;
+ for (; *features; features++)
+ {
+ hb_tag_t tag = *features;
+ unsigned index;
+ g.find_feature_index (tag, &index);
+ if (index == OT::Index::NOT_FOUND_INDEX) continue;
+
+ feature_indices_filter.add(index);
+ for (int i = (int) index - 1; i >= 0; i--)
+ {
+ if (g.get_feature_tag (i) != tag) break;
+ feature_indices_filter.add(i);
+ }
+ for (unsigned i = index + 1; i < g.get_feature_count (); i++)
+ {
+ if (g.get_feature_tag (i) != tag) break;
+ feature_indices_filter.add(i);
+ }
+ }
+ }
bool visited (const OT::Script &s)
{
@@ -1026,7 +1081,9 @@ struct hb_collect_features_context_t
public:
const OT::GSUBGPOS &g;
- hb_set_t *feature_indexes;
+ hb_set_t *feature_indices;
+ hb_set_t feature_indices_filter;
+ bool has_feature_filter;
private:
hb_set_t visited_script;
@@ -1038,37 +1095,31 @@ struct hb_collect_features_context_t
static void
langsys_collect_features (hb_collect_features_context_t *c,
- const OT::LangSys &l,
- const hb_tag_t *features)
+ const OT::LangSys &l)
{
if (c->visited (l)) return;
- if (!features)
+ if (!c->has_feature_filter)
{
/* All features. */
if (l.has_required_feature () && !c->visited_feature_indices (1))
- c->feature_indexes->add (l.get_required_feature_index ());
+ c->feature_indices->add (l.get_required_feature_index ());
+ // TODO(garretrieger): filter out indices >= feature count?
if (!c->visited_feature_indices (l.featureIndex.len))
- l.add_feature_indexes_to (c->feature_indexes);
+ l.add_feature_indexes_to (c->feature_indices);
}
else
{
- /* Ugh. Any faster way? */
- for (; *features; features++)
+ if (c->feature_indices_filter.is_empty()) return;
+ unsigned int num_features = l.get_feature_count ();
+ for (unsigned int i = 0; i < num_features; i++)
{
- hb_tag_t feature_tag = *features;
- unsigned int num_features = l.get_feature_count ();
- for (unsigned int i = 0; i < num_features; i++)
- {
- unsigned int feature_index = l.get_feature_index (i);
+ unsigned int feature_index = l.get_feature_index (i);
+ if (!c->feature_indices_filter.has (feature_index)) continue;
- if (feature_tag == c->g.get_feature_tag (feature_index))
- {
- c->feature_indexes->add (feature_index);
- break;
- }
- }
+ c->feature_indices->add (feature_index);
+ c->feature_indices_filter.del (feature_index);
}
}
}
@@ -1076,8 +1127,7 @@ langsys_collect_features (hb_collect_features_context_t *c,
static void
script_collect_features (hb_collect_features_context_t *c,
const OT::Script &s,
- const hb_tag_t *languages,
- const hb_tag_t *features)
+ const hb_tag_t *languages)
{
if (c->visited (s)) return;
@@ -1086,14 +1136,13 @@ script_collect_features (hb_collect_features_context_t *c,
/* All languages. */
if (s.has_default_lang_sys ())
langsys_collect_features (c,
- s.get_default_lang_sys (),
- features);
+ s.get_default_lang_sys ());
+
unsigned int count = s.get_lang_sys_count ();
for (unsigned int language_index = 0; language_index < count; language_index++)
langsys_collect_features (c,
- s.get_lang_sys (language_index),
- features);
+ s.get_lang_sys (language_index));
}
else
{
@@ -1102,8 +1151,8 @@ script_collect_features (hb_collect_features_context_t *c,
unsigned int language_index;
if (s.find_lang_sys_index (*languages, &language_index))
langsys_collect_features (c,
- s.get_lang_sys (language_index),
- features);
+ s.get_lang_sys (language_index));
+
}
}
}
@@ -1134,7 +1183,7 @@ hb_ot_layout_collect_features (hb_face_t *face,
const hb_tag_t *features,
hb_set_t *feature_indexes /* OUT */)
{
- hb_collect_features_context_t c (face, table_tag, feature_indexes);
+ hb_collect_features_context_t c (face, table_tag, feature_indexes, features);
if (!scripts)
{
/* All scripts. */
@@ -1142,8 +1191,7 @@ hb_ot_layout_collect_features (hb_face_t *face,
for (unsigned int script_index = 0; script_index < count; script_index++)
script_collect_features (&c,
c.g.get_script (script_index),
- languages,
- features);
+ languages);
}
else
{
@@ -1153,8 +1201,7 @@ hb_ot_layout_collect_features (hb_face_t *face,
if (c.g.find_script_index (*scripts, &script_index))
script_collect_features (&c,
c.g.get_script (script_index),
- languages,
- features);
+ languages);
}
}
}
@@ -1262,6 +1309,8 @@ hb_ot_layout_lookup_collect_glyphs (hb_face_t *face,
* Fetches a list of feature variations in the specified face's GSUB table
* or GPOS table, at the specified variation coordinates.
*
+ * Return value: %true if feature variations were found, %false otherwise.
+ *
**/
hb_bool_t
hb_ot_layout_table_find_feature_variations (hb_face_t *face,
@@ -1291,6 +1340,8 @@ hb_ot_layout_table_find_feature_variations (hb_face_t *face,
* the specified face's GSUB table or GPOS table, enabled at the specified
* variations index. The list returned will begin at the offset provided.
*
+ * Return value: Total number of lookups.
+ *
**/
unsigned int
hb_ot_layout_feature_with_variations_get_lookups (hb_face_t *face,
@@ -1337,7 +1388,8 @@ hb_ot_layout_has_substitution (hb_face_t *face)
* @lookup_index: The index of the lookup to query
* @glyphs: The sequence of glyphs to query for substitution
* @glyphs_length: The length of the glyph sequence
- * @zero_context: #hb_bool_t indicating whether substitutions should be context-free
+ * @zero_context: #hb_bool_t indicating whether pre-/post-context are disallowed
+ * in substitutions
*
* Tests whether a specified lookup in the specified face would
* trigger a substitution on the given glyph sequence.
@@ -1443,12 +1495,17 @@ hb_ot_layout_lookup_substitute_closure (hb_face_t *face,
unsigned int lookup_index,
hb_set_t *glyphs /* OUT */)
{
- hb_map_t done_lookups;
- OT::hb_closure_context_t c (face, glyphs, &done_lookups);
+ hb_set_t cur_intersected_glyphs;
+ hb_map_t done_lookups_glyph_count;
+ hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> done_lookups_glyph_set;
+ OT::hb_closure_context_t c (face, glyphs, &cur_intersected_glyphs, &done_lookups_glyph_count, &done_lookups_glyph_set);
const OT::SubstLookup& l = face->table.GSUB->table->get_lookup (lookup_index);
l.closure (&c, lookup_index);
+
+ for (auto _ : done_lookups_glyph_set.iter ())
+ hb_set_destroy (_.second);
}
/**
@@ -1467,8 +1524,10 @@ hb_ot_layout_lookups_substitute_closure (hb_face_t *face,
const hb_set_t *lookups,
hb_set_t *glyphs /* OUT */)
{
- hb_map_t done_lookups;
- OT::hb_closure_context_t c (face, glyphs, &done_lookups);
+ hb_set_t cur_intersected_glyphs;
+ hb_map_t done_lookups_glyph_count;
+ hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> done_lookups_glyph_set;
+ OT::hb_closure_context_t c (face, glyphs, &cur_intersected_glyphs, &done_lookups_glyph_count, &done_lookups_glyph_set);
const OT::GSUB& gsub = *face->table.GSUB->table;
unsigned int iteration_count = 0;
@@ -1488,6 +1547,9 @@ hb_ot_layout_lookups_substitute_closure (hb_face_t *face,
}
} while (iteration_count++ <= HB_CLOSURE_MAX_STAGES &&
glyphs_length != glyphs->get_population ());
+
+ for (auto _ : done_lookups_glyph_set.iter ())
+ hb_set_destroy (_.second);
}
/*
@@ -1824,27 +1886,20 @@ apply_string (OT::hb_ot_apply_context_t *c,
if (likely (!lookup.is_reverse ()))
{
/* in/out forward substitution/positioning */
- if (Proxy::table_index == 0u)
+ if (!Proxy::inplace)
buffer->clear_output ();
+
buffer->idx = 0;
+ apply_forward (c, accel);
- bool ret;
- ret = apply_forward (c, accel);
- if (ret)
- {
- if (!Proxy::inplace)
- buffer->swap_buffers ();
- else
- assert (!buffer->has_separate_output ());
- }
+ if (!Proxy::inplace)
+ buffer->swap_buffers ();
}
else
{
/* in-place backward substitution/positioning */
- if (Proxy::table_index == 0u)
- buffer->remove_output ();
+ assert (!buffer->have_output);
buffer->idx = buffer->len - 1;
-
apply_backward (c, accel);
}
}
@@ -1860,7 +1915,8 @@ inline void hb_ot_map_t::apply (const Proxy &proxy,
OT::hb_ot_apply_context_t c (table_index, font, buffer);
c.set_recurse_func (Proxy::Lookup::apply_recurse_func);
- for (unsigned int stage_index = 0; stage_index < stages[table_index].length; stage_index++) {
+ for (unsigned int stage_index = 0; stage_index < stages[table_index].length; stage_index++)
+ {
const stage_map_t *stage = &stages[table_index][stage_index];
for (; i < stage->last_lookup; i++)
{
@@ -1870,11 +1926,8 @@ inline void hb_ot_map_t::apply (const Proxy &proxy,
c.set_lookup_mask (lookups[table_index][i].mask);
c.set_auto_zwj (lookups[table_index][i].auto_zwj);
c.set_auto_zwnj (lookups[table_index][i].auto_zwnj);
- if (lookups[table_index][i].random)
- {
- c.set_random (true);
- buffer->unsafe_to_break_all ();
- }
+ c.set_random (lookups[table_index][i].random);
+
apply_string<Proxy> (&c,
proxy.table.get_lookup (lookup_index),
proxy.accels[lookup_index]);
@@ -1882,10 +1935,7 @@ inline void hb_ot_map_t::apply (const Proxy &proxy,
}
if (stage->pause_func)
- {
- buffer->clear_output ();
stage->pause_func (plan, font, buffer);
- }
}
}
@@ -1925,7 +1975,7 @@ hb_ot_layout_substitute_lookup (OT::hb_ot_apply_context_t *c,
*
* Fetches a baseline value from the face.
*
- * Return value: if found baseline value in the font.
+ * Return value: %true if found baseline value in the font.
*
* Since: 2.6.0
**/
@@ -1984,7 +2034,7 @@ struct hb_get_glyph_alternates_dispatch_t :
*
* Fetches alternates of a glyph from a given GSUB lookup index.
*
- * Return value: total number of alternates found in the specific lookup index for the given glyph id.
+ * Return value: Total number of alternates found in the specific lookup index for the given glyph id.
*
* Since: 2.6.8
**/
diff --git a/thirdparty/harfbuzz/src/hb-ot-layout.hh b/thirdparty/harfbuzz/src/hb-ot-layout.hh
index ac61bc70de..bcc014ee98 100644
--- a/thirdparty/harfbuzz/src/hb-ot-layout.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-layout.hh
@@ -314,7 +314,6 @@ _hb_glyph_info_get_unicode_space_fallback_type (const hb_glyph_info_t *info)
hb_unicode_funcs_t::NOT_SPACE;
}
-static inline bool _hb_glyph_info_ligated (const hb_glyph_info_t *info);
static inline bool _hb_glyph_info_substituted (const hb_glyph_info_t *info);
static inline bool
@@ -328,7 +327,7 @@ _hb_glyph_info_is_default_ignorable_and_not_hidden (const hb_glyph_info_t *info)
{
return ((info->unicode_props() & (UPROPS_MASK_IGNORABLE|UPROPS_MASK_HIDDEN))
== UPROPS_MASK_IGNORABLE) &&
- !_hb_glyph_info_ligated (info);
+ !_hb_glyph_info_substituted (info);
}
static inline void
_hb_glyph_info_unhide (hb_glyph_info_t *info)
diff --git a/thirdparty/harfbuzz/src/hb-ot-map.cc b/thirdparty/harfbuzz/src/hb-ot-map.cc
index e4bb4b6366..12ceea5785 100644
--- a/thirdparty/harfbuzz/src/hb-ot-map.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-map.cc
@@ -54,7 +54,6 @@ hb_ot_map_builder_t::hb_ot_map_builder_t (hb_face_t *face_,
face = face_;
props = *props_;
-
/* Fetch script/language indices for GSUB/GPOS. We need these later to skip
* features not available in either table and not waste precious bits for them. */
@@ -63,12 +62,28 @@ hb_ot_map_builder_t::hb_ot_map_builder_t (hb_face_t *face_,
hb_tag_t script_tags[HB_OT_MAX_TAGS_PER_SCRIPT];
hb_tag_t language_tags[HB_OT_MAX_TAGS_PER_LANGUAGE];
- hb_ot_tags_from_script_and_language (props.script, props.language, &script_count, script_tags, &language_count, language_tags);
+ hb_ot_tags_from_script_and_language (props.script,
+ props.language,
+ &script_count,
+ script_tags,
+ &language_count,
+ language_tags);
- for (unsigned int table_index = 0; table_index < 2; table_index++) {
+ for (unsigned int table_index = 0; table_index < 2; table_index++)
+ {
hb_tag_t table_tag = table_tags[table_index];
- found_script[table_index] = (bool) hb_ot_layout_table_select_script (face, table_tag, script_count, script_tags, &script_index[table_index], &chosen_script[table_index]);
- hb_ot_layout_script_select_language (face, table_tag, script_index[table_index], language_count, language_tags, &language_index[table_index]);
+ found_script[table_index] = (bool) hb_ot_layout_table_select_script (face,
+ table_tag,
+ script_count,
+ script_tags,
+ &script_index[table_index],
+ &chosen_script[table_index]);
+ hb_ot_layout_script_select_language (face,
+ table_tag,
+ script_index[table_index],
+ language_count,
+ language_tags,
+ &language_index[table_index]);
}
}
@@ -150,9 +165,8 @@ void
hb_ot_map_builder_t::compile (hb_ot_map_t &m,
const hb_ot_shape_plan_key_t &key)
{
- static_assert ((!(HB_GLYPH_FLAG_DEFINED & (HB_GLYPH_FLAG_DEFINED + 1))), "");
- unsigned int global_bit_mask = HB_GLYPH_FLAG_DEFINED + 1;
- unsigned int global_bit_shift = hb_popcount (HB_GLYPH_FLAG_DEFINED);
+ unsigned int global_bit_shift = 8 * sizeof (hb_mask_t) - 1;
+ unsigned int global_bit_mask = 1u << global_bit_shift;
m.global_mask = global_bit_mask;
@@ -205,7 +219,8 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m,
/* Allocate bits now */
- unsigned int next_bit = global_bit_shift + 1;
+ static_assert ((!(HB_GLYPH_FLAG_DEFINED & (HB_GLYPH_FLAG_DEFINED + 1))), "");
+ unsigned int next_bit = hb_popcount (HB_GLYPH_FLAG_DEFINED) + 1;
for (unsigned int i = 0; i < feature_infos.length; i++)
{
@@ -220,7 +235,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m,
/* Limit bits per feature. */
bits_needed = hb_min (HB_OT_MAP_MAX_BITS, hb_bit_storage (info->max_value));
- if (!info->max_value || next_bit + bits_needed > 8 * sizeof (hb_mask_t))
+ if (!info->max_value || next_bit + bits_needed >= global_bit_shift)
continue; /* Feature disabled, or not enough bits. */
@@ -274,7 +289,6 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m,
}
map->_1_mask = (1u << map->shift) & map->mask;
map->needs_fallback = !found;
-
}
feature_infos.shrink (0); /* Done with these */
diff --git a/thirdparty/harfbuzz/src/hb-ot-math-table.hh b/thirdparty/harfbuzz/src/hb-ot-math-table.hh
index 26aa080603..5916ad29f2 100644
--- a/thirdparty/harfbuzz/src/hb-ot-math-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-math-table.hh
@@ -49,7 +49,7 @@ struct MathValueRecord
protected:
HBINT16 value; /* The X or Y value in design units */
- OffsetTo<Device> deviceTable; /* Offset to the device table - from the
+ Offset16To<Device> deviceTable; /* Offset to the device table - from the
* beginning of parent table. May be NULL.
* Suggested format for device table is 1. */
@@ -181,11 +181,11 @@ struct MathItalicsCorrectionInfo
}
protected:
- OffsetTo<Coverage> coverage; /* Offset to Coverage table -
+ Offset16To<Coverage> coverage; /* Offset to Coverage table -
* from the beginning of
* MathItalicsCorrectionInfo
* table. */
- ArrayOf<MathValueRecord> italicsCorrection; /* Array of MathValueRecords
+ Array16Of<MathValueRecord> italicsCorrection; /* Array of MathValueRecords
* defining italics correction
* values for each
* covered glyph. */
@@ -214,11 +214,11 @@ struct MathTopAccentAttachment
}
protected:
- OffsetTo<Coverage> topAccentCoverage; /* Offset to Coverage table -
+ Offset16To<Coverage> topAccentCoverage; /* Offset to Coverage table -
* from the beginning of
* MathTopAccentAttachment
* table. */
- ArrayOf<MathValueRecord> topAccentAttachment; /* Array of MathValueRecords
+ Array16Of<MathValueRecord> topAccentAttachment; /* Array of MathValueRecords
* defining top accent
* attachment points for each
* covered glyph. */
@@ -320,7 +320,7 @@ struct MathKernInfoRecord
protected:
/* Offset to MathKern table for each corner -
* from the beginning of MathKernInfo table. May be NULL. */
- OffsetTo<MathKern> mathKern[4];
+ Offset16To<MathKern> mathKern[4];
public:
DEFINE_SIZE_STATIC (8);
@@ -346,12 +346,12 @@ struct MathKernInfo
}
protected:
- OffsetTo<Coverage>
+ Offset16To<Coverage>
mathKernCoverage;
/* Offset to Coverage table -
* from the beginning of the
* MathKernInfo table. */
- ArrayOf<MathKernInfoRecord>
+ Array16Of<MathKernInfoRecord>
mathKernInfoRecords;
/* Array of MathKernInfoRecords,
* per-glyph information for
@@ -395,22 +395,22 @@ struct MathGlyphInfo
protected:
/* Offset to MathItalicsCorrectionInfo table -
* from the beginning of MathGlyphInfo table. */
- OffsetTo<MathItalicsCorrectionInfo> mathItalicsCorrectionInfo;
+ Offset16To<MathItalicsCorrectionInfo> mathItalicsCorrectionInfo;
/* Offset to MathTopAccentAttachment table -
* from the beginning of MathGlyphInfo table. */
- OffsetTo<MathTopAccentAttachment> mathTopAccentAttachment;
+ Offset16To<MathTopAccentAttachment> mathTopAccentAttachment;
/* Offset to coverage table for Extended Shape glyphs -
* from the beginning of MathGlyphInfo table. When the left or right glyph of
* a box is an extended shape variant, the (ink) box (and not the default
* position defined by values in MathConstants table) should be used for
* vertical positioning purposes. May be NULL.. */
- OffsetTo<Coverage> extendedShapeCoverage;
+ Offset16To<Coverage> extendedShapeCoverage;
/* Offset to MathKernInfo table -
* from the beginning of MathGlyphInfo table. */
- OffsetTo<MathKernInfo> mathKernInfo;
+ Offset16To<MathKernInfo> mathKernInfo;
public:
DEFINE_SIZE_STATIC (8);
@@ -532,7 +532,7 @@ struct MathGlyphAssembly
/* Italics correction of this
* MathGlyphAssembly. Should not
* depend on the assembly size. */
- ArrayOf<MathGlyphPartRecord>
+ Array16Of<MathGlyphPartRecord>
partRecords; /* Array of part records, from
* left to right and bottom to
* top. */
@@ -572,10 +572,10 @@ struct MathGlyphConstruction
protected:
/* Offset to MathGlyphAssembly table for this shape - from the beginning of
MathGlyphConstruction table. May be NULL. */
- OffsetTo<MathGlyphAssembly> glyphAssembly;
+ Offset16To<MathGlyphAssembly> glyphAssembly;
/* MathGlyphVariantRecords for alternative variants of the glyphs. */
- ArrayOf<MathGlyphVariantRecord> mathGlyphVariantRecord;
+ Array16Of<MathGlyphVariantRecord> mathGlyphVariantRecord;
public:
DEFINE_SIZE_ARRAY (4, mathGlyphVariantRecord);
@@ -636,7 +636,7 @@ struct MathVariants
{
bool vertical = HB_DIRECTION_IS_VERTICAL (direction);
unsigned int count = vertical ? vertGlyphCount : horizGlyphCount;
- const OffsetTo<Coverage> &coverage = vertical ? vertGlyphCoverage
+ const Offset16To<Coverage> &coverage = vertical ? vertGlyphCoverage
: horizGlyphCoverage;
unsigned int index = (this+coverage).get_coverage (glyph);
@@ -653,11 +653,11 @@ struct MathVariants
/* Minimum overlap of connecting
* glyphs during glyph construction,
* in design units. */
- OffsetTo<Coverage> vertGlyphCoverage;
+ Offset16To<Coverage> vertGlyphCoverage;
/* Offset to Coverage table -
* from the beginning of MathVariants
* table. */
- OffsetTo<Coverage> horizGlyphCoverage;
+ Offset16To<Coverage> horizGlyphCoverage;
/* Offset to Coverage table -
* from the beginning of MathVariants
* table. */
@@ -671,7 +671,7 @@ struct MathVariants
/* Array of offsets to MathGlyphConstruction tables - from the beginning of
the MathVariants table, for shapes growing in vertical/horizontal
direction. */
- UnsizedArrayOf<OffsetTo<MathGlyphConstruction>>
+ UnsizedArrayOf<Offset16To<MathGlyphConstruction>>
glyphConstruction;
public:
@@ -711,11 +711,11 @@ struct MATH
protected:
FixedVersion<>version; /* Version of the MATH table
* initially set to 0x00010000u */
- OffsetTo<MathConstants>
+ Offset16To<MathConstants>
mathConstants; /* MathConstants table */
- OffsetTo<MathGlyphInfo>
+ Offset16To<MathGlyphInfo>
mathGlyphInfo; /* MathGlyphInfo table */
- OffsetTo<MathVariants>
+ Offset16To<MathVariants>
mathVariants; /* MathVariants table */
public:
diff --git a/thirdparty/harfbuzz/src/hb-ot-maxp-table.hh b/thirdparty/harfbuzz/src/hb-ot-maxp-table.hh
index 929956d12b..3a019ef782 100644
--- a/thirdparty/harfbuzz/src/hb-ot-maxp-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-maxp-table.hh
@@ -107,7 +107,7 @@ struct maxp
maxpV1Tail *dest_v1 = c->serializer->embed<maxpV1Tail> (src_v1);
if (unlikely (!dest_v1)) return_trace (false);
- if (c->plan->drop_hints)
+ if (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING)
drop_hint_fields (dest_v1);
}
diff --git a/thirdparty/harfbuzz/src/hb-ot-meta-table.hh b/thirdparty/harfbuzz/src/hb-ot-meta-table.hh
index 1225e26ce1..e31447f8fc 100644
--- a/thirdparty/harfbuzz/src/hb-ot-meta-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-meta-table.hh
@@ -56,7 +56,7 @@ struct DataMap
protected:
Tag tag; /* A tag indicating the type of metadata. */
- LNNOffsetTo<UnsizedArrayOf<HBUINT8>>
+ NNOffset32To<UnsizedArrayOf<HBUINT8>>
dataZ; /* Offset in bytes from the beginning of the
* metadata table to the data for this tag. */
HBUINT32 dataLength; /* Length of the data. The data is not required to
@@ -113,7 +113,7 @@ struct meta
* Offset from the beginning of the table to the data.
* Per OT specification:
* Reserved. Not used; should be set to 0. */
- LArrayOf<DataMap>
+ Array32Of<DataMap>
dataMaps;/* Array of data map records. */
public:
DEFINE_SIZE_ARRAY (16, dataMaps);
diff --git a/thirdparty/harfbuzz/src/hb-ot-name-table.hh b/thirdparty/harfbuzz/src/hb-ot-name-table.hh
index ece3c28466..c17bb4abb8 100644
--- a/thirdparty/harfbuzz/src/hb-ot-name-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-name-table.hh
@@ -149,7 +149,7 @@ struct NameRecord
HBUINT16 languageID; /* Language ID. */
HBUINT16 nameID; /* Name ID. */
HBUINT16 length; /* String length (in bytes). */
- NNOffsetTo<UnsizedArrayOf<HBUINT8>>
+ NNOffset16To<UnsizedArrayOf<HBUINT8>>
offset; /* String offset from start of storage area (in bytes). */
public:
DEFINE_SIZE_STATIC (12);
@@ -214,7 +214,7 @@ struct name
this->format = 0;
this->count = it.len ();
- NameRecord *name_records = (NameRecord *) calloc (it.len (), NameRecord::static_size);
+ NameRecord *name_records = (NameRecord *) hb_calloc (it.len (), NameRecord::static_size);
if (unlikely (!name_records)) return_trace (false);
hb_array_t<NameRecord> records (name_records, it.len ());
@@ -228,9 +228,10 @@ struct name
records.qsort ();
c->copy_all (records, src_string_pool);
- free (records.arrayZ);
+ hb_free (records.arrayZ);
- if (unlikely (c->ran_out_of_room)) return_trace (false);
+
+ if (unlikely (c->ran_out_of_room ())) return_trace (false);
this->stringOffset = c->length ();
@@ -248,7 +249,11 @@ struct name
+ nameRecordZ.as_array (count)
| hb_filter (c->plan->name_ids, &NameRecord::nameID)
| hb_filter (c->plan->name_languages, &NameRecord::languageID)
- | hb_filter ([&] (const NameRecord& namerecord) { return c->plan->name_legacy || namerecord.isUnicode (); })
+ | hb_filter ([&] (const NameRecord& namerecord) {
+ return
+ (c->plan->flags & HB_SUBSET_FLAGS_NAME_LEGACY)
+ || namerecord.isUnicode ();
+ })
;
name_prime->serialize (c->serializer, it, hb_addressof (this + stringOffset));
@@ -357,7 +362,7 @@ struct name
/* We only implement format 0 for now. */
HBUINT16 format; /* Format selector (=0/1). */
HBUINT16 count; /* Number of name records. */
- NNOffsetTo<UnsizedArrayOf<HBUINT8>>
+ NNOffset16To<UnsizedArrayOf<HBUINT8>>
stringOffset; /* Offset to start of string storage (from start of table). */
UnsizedArrayOf<NameRecord>
nameRecordZ; /* The name records where count is the number of records. */
diff --git a/thirdparty/harfbuzz/src/hb-ot-name.cc b/thirdparty/harfbuzz/src/hb-ot-name.cc
index 4588226e6e..eff46ef227 100644
--- a/thirdparty/harfbuzz/src/hb-ot-name.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-name.cc
@@ -156,7 +156,8 @@ hb_ot_name_get_utf (hb_face_t *face,
*
* Fetches a font name from the OpenType 'name' table.
* If @language is #HB_LANGUAGE_INVALID, English ("en") is assumed.
- * Returns string in UTF-8 encoding.
+ * Returns string in UTF-8 encoding. A NUL terminator is always written
+ * for convenience, and isn't included in the output @text_size.
*
* Returns: full length of the requested string, or 0 if not found.
* Since: 2.1.0
@@ -183,7 +184,8 @@ hb_ot_name_get_utf8 (hb_face_t *face,
*
* Fetches a font name from the OpenType 'name' table.
* If @language is #HB_LANGUAGE_INVALID, English ("en") is assumed.
- * Returns string in UTF-16 encoding.
+ * Returns string in UTF-16 encoding. A NUL terminator is always written
+ * for convenience, and isn't included in the output @text_size.
*
* Returns: full length of the requested string, or 0 if not found.
* Since: 2.1.0
@@ -209,7 +211,8 @@ hb_ot_name_get_utf16 (hb_face_t *face,
*
* Fetches a font name from the OpenType 'name' table.
* If @language is #HB_LANGUAGE_INVALID, English ("en") is assumed.
- * Returns string in UTF-32 encoding.
+ * Returns string in UTF-32 encoding. A NUL terminator is always written
+ * for convenience, and isn't included in the output @text_size.
*
* Returns: full length of the requested string, or 0 if not found.
* Since: 2.1.0
diff --git a/thirdparty/harfbuzz/src/hb-ot-os2-table.hh b/thirdparty/harfbuzz/src/hb-ot-os2-table.hh
index 8e98f87f4e..f0035e2f04 100644
--- a/thirdparty/harfbuzz/src/hb-ot-os2-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-os2-table.hh
@@ -30,7 +30,6 @@
#include "hb-open-type.hh"
#include "hb-ot-os2-unicode-ranges.hh"
-#include "hb-ot-cmap-table.hh"
#include "hb-set.hh"
@@ -172,33 +171,17 @@ struct OS2
TRACE_SUBSET (this);
OS2 *os2_prime = c->serializer->embed (this);
if (unlikely (!os2_prime)) return_trace (false);
+ if (c->plan->flags & HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES)
+ return_trace (true);
- hb_set_t unicodes;
- if (!c->plan->glyphs_requested->is_empty ())
- {
- hb_map_t unicode_glyphid_map;
-
- OT::cmap::accelerator_t cmap;
- cmap.init (c->plan->source);
- cmap.collect_mapping (&unicodes, &unicode_glyphid_map);
- cmap.fini ();
-
- hb_set_set (&unicodes, c->plan->unicodes);
-
- + unicode_glyphid_map.iter ()
- | hb_filter (c->plan->glyphs_requested, hb_second)
- | hb_map (hb_first)
- | hb_sink (unicodes)
- ;
- }
/* when --gids option is not used, no need to do collect_mapping that is
* iterating all codepoints in each subtable, which is not efficient */
uint16_t min_cp, max_cp;
- find_min_and_max_codepoint (unicodes.is_empty () ? c->plan->unicodes : &unicodes, &min_cp, &max_cp);
+ find_min_and_max_codepoint (c->plan->unicodes, &min_cp, &max_cp);
os2_prime->usFirstCharIndex = min_cp;
os2_prime->usLastCharIndex = max_cp;
- _update_unicode_ranges (unicodes.is_empty () ? c->plan->unicodes : &unicodes, os2_prime->ulUnicodeRange);
+ _update_unicode_ranges (c->plan->unicodes, os2_prime->ulUnicodeRange);
return_trace (true);
}
diff --git a/thirdparty/harfbuzz/src/hb-ot-post-table-v2subset.hh b/thirdparty/harfbuzz/src/hb-ot-post-table-v2subset.hh
new file mode 100644
index 0000000000..94450eb53a
--- /dev/null
+++ b/thirdparty/harfbuzz/src/hb-ot-post-table-v2subset.hh
@@ -0,0 +1,130 @@
+/*
+ * Copyright © 2021 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ */
+
+#ifndef HB_OT_POST_TABLE_V2SUBSET_HH
+#define HB_OT_POST_TABLE_V2SUBSET_HH
+
+#include "hb-open-type.hh"
+#include "hb-ot-post-table.hh"
+
+/*
+ * post -- PostScript
+ * https://docs.microsoft.com/en-us/typography/opentype/spec/post
+ */
+
+namespace OT {
+template<typename Iterator>
+HB_INTERNAL bool postV2Tail::serialize (hb_serialize_context_t *c,
+ Iterator it,
+ const void* _post) const
+{
+ TRACE_SERIALIZE (this);
+ auto *out = c->start_embed (this);
+ if (unlikely (!c->check_success (out))) return_trace (false);
+ if (!out->glyphNameIndex.serialize (c, + it
+ | hb_map (hb_second)))
+ return_trace (false);
+
+ hb_set_t copied_indices;
+ for (const auto& _ : + it )
+ {
+ unsigned glyph_id = _.first;
+ unsigned new_index = _.second;
+
+ if (new_index < 258) continue;
+ if (copied_indices.has (new_index)) continue;
+ copied_indices.add (new_index);
+
+ hb_bytes_t s = reinterpret_cast<const post::accelerator_t*> (_post)->find_glyph_name (glyph_id);
+ HBUINT8 *o = c->allocate_size<HBUINT8> (HBUINT8::static_size * (s.length + 1));
+ if (unlikely (!o)) return_trace (false);
+ if (!c->check_assign (o[0], s.length, HB_SERIALIZE_ERROR_INT_OVERFLOW)) return_trace (false);
+ memcpy (o+1, s.arrayZ, HBUINT8::static_size * s.length);
+ }
+
+ return_trace (true);
+}
+
+HB_INTERNAL bool postV2Tail::subset (hb_subset_context_t *c) const
+{
+ TRACE_SUBSET (this);
+
+ const hb_map_t &reverse_glyph_map = *c->plan->reverse_glyph_map;
+ unsigned num_glyphs = c->plan->num_output_glyphs ();
+ hb_map_t old_new_index_map, old_gid_new_index_map;
+ unsigned i = 0;
+
+ post::accelerator_t _post;
+ _post.init (c->plan->source);
+
+ for (hb_codepoint_t new_gid = 0; new_gid < num_glyphs; new_gid++)
+ {
+ hb_codepoint_t old_gid = reverse_glyph_map.get (new_gid);
+ unsigned old_index = glyphNameIndex[old_gid];
+
+ unsigned new_index;
+ if (old_index <= 257) new_index = old_index;
+ else if (old_new_index_map.has (old_index)) new_index = old_new_index_map.get (old_index);
+ else
+ {
+ hb_bytes_t s = _post.find_glyph_name (old_gid);
+ int standard_glyph_index = -1;
+ for (unsigned i = 0; i < format1_names_length; i++)
+ {
+ if (s == format1_names (i))
+ {
+ standard_glyph_index = i;
+ break;
+ }
+ }
+ if (standard_glyph_index == -1)
+ {
+ new_index = 258 + i;
+ i++;
+ }
+ else
+ { new_index = standard_glyph_index; }
+ old_new_index_map.set (old_index, new_index);
+ }
+ old_gid_new_index_map.set (old_gid, new_index);
+ }
+
+ auto index_iter =
+ + hb_range (num_glyphs)
+ | hb_map (reverse_glyph_map)
+ | hb_map_retains_sorting ([&](hb_codepoint_t old_gid)
+ {
+ unsigned new_index = old_gid_new_index_map.get (old_gid);
+ return hb_pair_t<unsigned, unsigned> (old_gid, new_index);
+ })
+ ;
+
+ bool ret = serialize (c->serializer, index_iter, &_post);
+ _post.fini ();
+ return_trace (ret);
+}
+
+} /* namespace OT */
+#endif /* HB_OT_POST_TABLE_V2SUBSET_HH */
diff --git a/thirdparty/harfbuzz/src/hb-ot-post-table.hh b/thirdparty/harfbuzz/src/hb-ot-post-table.hh
index f22d6e244d..39de671707 100644
--- a/thirdparty/harfbuzz/src/hb-ot-post-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-post-table.hh
@@ -55,8 +55,15 @@ struct postV2Tail
return_trace (glyphNameIndex.sanitize (c));
}
+ template<typename Iterator>
+ bool serialize (hb_serialize_context_t *c,
+ Iterator it,
+ const void* _post) const;
+
+ bool subset (hb_subset_context_t *c) const;
+
protected:
- ArrayOf<HBUINT16> glyphNameIndex; /* This is not an offset, but is the
+ Array16Of<HBUINT16> glyphNameIndex; /* This is not an offset, but is the
* ordinal number of the glyph in 'post'
* string tables. */
/*UnsizedArrayOf<HBUINT8>
@@ -71,13 +78,18 @@ struct post
{
static constexpr hb_tag_t tableTag = HB_OT_TAG_post;
- void serialize (hb_serialize_context_t *c) const
+ bool serialize (hb_serialize_context_t *c, bool glyph_names) const
{
+ TRACE_SERIALIZE (this);
post *post_prime = c->allocate_min<post> ();
- if (unlikely (!post_prime)) return;
+ if (unlikely (!post_prime)) return_trace (false);
memcpy (post_prime, this, post::min_size);
- post_prime->version.major = 3; // Version 3 does not have any glyph names.
+ if (!glyph_names)
+ return_trace (c->check_assign (post_prime->version.major, 3,
+ HB_SERIALIZE_ERROR_INT_OVERFLOW)); // Version 3 does not have any glyph names.
+
+ return_trace (true);
}
bool subset (hb_subset_context_t *c) const
@@ -86,13 +98,19 @@ struct post
post *post_prime = c->serializer->start_embed<post> ();
if (unlikely (!post_prime)) return_trace (false);
- serialize (c->serializer);
+ bool glyph_names = c->plan->flags & HB_SUBSET_FLAGS_GLYPH_NAMES;
+ if (!serialize (c->serializer, glyph_names))
+ return_trace (false);
+
+ if (glyph_names && version.major == 2)
+ return_trace (v2X.subset (c));
return_trace (true);
}
struct accelerator_t
{
+ friend struct postV2Tail;
void init (hb_face_t *face)
{
index_to_offset.init ();
@@ -117,7 +135,7 @@ struct post
void fini ()
{
index_to_offset.fini ();
- free (gids_sorted_by_name.get ());
+ hb_free (gids_sorted_by_name.get ());
table.destroy ();
}
@@ -148,7 +166,7 @@ struct post
if (unlikely (!gids))
{
- gids = (uint16_t *) malloc (count * sizeof (gids[0]));
+ gids = (uint16_t *) hb_malloc (count * sizeof (gids[0]));
if (unlikely (!gids))
return false; /* Anything better?! */
@@ -158,7 +176,7 @@ struct post
if (unlikely (!gids_sorted_by_name.cmpexch (nullptr, gids)))
{
- free (gids);
+ hb_free (gids);
goto retry;
}
}
@@ -236,7 +254,7 @@ struct post
private:
uint32_t version;
- const ArrayOf<HBUINT16> *glyphNameIndex;
+ const Array16Of<HBUINT16> *glyphNameIndex;
hb_vector_t<uint32_t> index_to_offset;
const uint8_t *pool;
hb_atomic_ptr_t<uint16_t *> gids_sorted_by_name;
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-fallback.hh b/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-fallback.hh
index 244e967b12..2b3b134ae3 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-fallback.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-fallback.hh
@@ -208,11 +208,11 @@ struct ManifestLookup
{
public:
OT::Tag tag;
- OT::OffsetTo<OT::SubstLookup> lookupOffset;
+ OT::Offset16To<OT::SubstLookup> lookupOffset;
public:
DEFINE_SIZE_STATIC (6);
};
-typedef OT::ArrayOf<ManifestLookup> Manifest;
+typedef OT::Array16Of<ManifestLookup> Manifest;
static bool
arabic_fallback_plan_init_win1256 (arabic_fallback_plan_t *fallback_plan HB_UNUSED,
@@ -290,7 +290,7 @@ static arabic_fallback_plan_t *
arabic_fallback_plan_create (const hb_ot_shape_plan_t *plan,
hb_font_t *font)
{
- arabic_fallback_plan_t *fallback_plan = (arabic_fallback_plan_t *) calloc (1, sizeof (arabic_fallback_plan_t));
+ arabic_fallback_plan_t *fallback_plan = (arabic_fallback_plan_t *) hb_calloc (1, sizeof (arabic_fallback_plan_t));
if (unlikely (!fallback_plan))
return const_cast<arabic_fallback_plan_t *> (&Null (arabic_fallback_plan_t));
@@ -308,7 +308,7 @@ arabic_fallback_plan_create (const hb_ot_shape_plan_t *plan,
return fallback_plan;
assert (fallback_plan->num_lookups == 0);
- free (fallback_plan);
+ hb_free (fallback_plan);
return const_cast<arabic_fallback_plan_t *> (&Null (arabic_fallback_plan_t));
}
@@ -323,10 +323,10 @@ arabic_fallback_plan_destroy (arabic_fallback_plan_t *fallback_plan)
{
fallback_plan->accel_array[i].fini ();
if (fallback_plan->free_lookups)
- free (fallback_plan->lookup_array[i]);
+ hb_free (fallback_plan->lookup_array[i]);
}
- free (fallback_plan);
+ hb_free (fallback_plan);
}
static void
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-joining-list.hh b/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-joining-list.hh
index c022d4bb06..e6339ee72b 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-joining-list.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-joining-list.hh
@@ -6,10 +6,10 @@
*
* on files with these headers:
*
- * # ArabicShaping-13.0.0.txt
- * # Date: 2020-01-31, 23:55:00 GMT [KW, RP]
- * # Scripts-13.0.0.txt
- * # Date: 2020-01-22, 00:07:43 GMT
+ * # ArabicShaping-14.0.0.txt
+ * # Date: 2021-05-21, 01:54:00 GMT [KW, RP]
+ * # Scripts-14.0.0.txt
+ * # Date: 2021-07-10, 00:35:31 GMT
*/
#ifndef HB_OT_SHAPE_COMPLEX_ARABIC_JOINING_LIST_HH
@@ -29,6 +29,7 @@ has_arabic_joining (hb_script_t script)
case HB_SCRIPT_MANICHAEAN:
case HB_SCRIPT_MONGOLIAN:
case HB_SCRIPT_NKO:
+ case HB_SCRIPT_OLD_UYGHUR:
case HB_SCRIPT_PHAGS_PA:
case HB_SCRIPT_PSALTER_PAHLAVI:
case HB_SCRIPT_SOGDIAN:
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-table.hh b/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-table.hh
index 70ffe623c0..c158964f2c 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic-table.hh
@@ -6,10 +6,10 @@
*
* on files with these headers:
*
- * # ArabicShaping-13.0.0.txt
- * # Date: 2020-01-31, 23:55:00 GMT [KW, RP]
- * # Blocks-13.0.0.txt
- * # Date: 2019-07-10, 19:06:00 GMT [KW]
+ * # ArabicShaping-14.0.0.txt
+ * # Date: 2021-05-21, 01:54:00 GMT [KW, RP]
+ * # Blocks-14.0.0.txt
+ * # Date: 2021-01-22, 23:29:00 GMT [KW]
* UnicodeData.txt does not have a header.
*/
@@ -75,13 +75,17 @@ static const uint8_t joining_table[] =
/* Syriac Supplement */
- /* 0860 */ D,U,D,D,D,D,U,R,D,R,R,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
- /* 0880 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
+ /* 0860 */ D,U,D,D,D,D,U,R,D,R,R,X,X,X,X,X,
+
+ /* Arabic Extended-B */
+
+ /* 0860 */ R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,
+ /* 0880 */ R,R,R,C,C,C,D,U,U,D,D,D,D,D,R,X,U,U,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
/* Arabic Extended-A */
- /* 08A0 */ D,D,D,D,D,D,D,D,D,D,R,R,R,U,R,D,D,R,R,D,D,X,D,D,D,R,D,D,D,D,D,D,
- /* 08C0 */ D,D,D,D,D,D,D,D,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
+ /* 08A0 */ D,D,D,D,D,D,D,D,D,D,R,R,R,U,R,D,D,R,R,D,D,D,D,D,D,R,D,D,D,D,D,D,
+ /* 08C0 */ D,D,D,D,D,D,D,D,D,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
/* 08E0 */ X,X,U,
#define joining_offset_0x1806u 739
@@ -137,23 +141,28 @@ static const uint8_t joining_table[] =
/* Sogdian */
/* 10F20 */ D,D,D,R,D,D,D,D,D,D,D,D,D,D,D,D,
- /* 10F40 */ D,D,D,D,D,U,X,X,X,X,X,X,X,X,X,X,X,D,D,D,R,
+ /* 10F40 */ D,D,D,D,D,U,X,X,X,X,X,X,X,X,X,X,X,D,D,D,R,X,X,X,X,X,X,X,X,X,X,X,
+ /* 10F60 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
+
+ /* Old Uyghur */
-#define joining_offset_0x10fb0u 1219
+ /* 10F60 */ D,D,D,D,R,R,D,D,D,D,D,D,D,D,D,D,
+ /* 10F80 */ D,D,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
+ /* 10FA0 */ X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,
/* Chorasmian */
/* 10FA0 */ D,U,D,D,R,R,R,U,D,R,R,D,D,R,D,D,
/* 10FC0 */ U,D,R,R,D,U,U,U,U,R,D,L,
-#define joining_offset_0x110bdu 1247
+#define joining_offset_0x110bdu 1338
/* Kaithi */
/* 110A0 */ U,X,X,
/* 110C0 */ X,X,X,X,X,X,X,X,X,X,X,X,X,U,
-#define joining_offset_0x1e900u 1264
+#define joining_offset_0x1e900u 1355
/* Adlam */
@@ -161,7 +170,7 @@ static const uint8_t joining_table[] =
/* 1E920 */ D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,
/* 1E940 */ D,D,D,D,X,X,X,X,X,X,X,T,
-}; /* Table items: 1340; occupancy: 57% */
+}; /* Table items: 1431; occupancy: 57% */
static unsigned int
@@ -189,8 +198,7 @@ joining_type (hb_codepoint_t u)
if (hb_in_range<hb_codepoint_t> (u, 0x10AC0u, 0x10AEFu)) return joining_table[u - 0x10AC0u + joining_offset_0x10ac0u];
if (hb_in_range<hb_codepoint_t> (u, 0x10B80u, 0x10BAFu)) return joining_table[u - 0x10B80u + joining_offset_0x10b80u];
if (hb_in_range<hb_codepoint_t> (u, 0x10D00u, 0x10D23u)) return joining_table[u - 0x10D00u + joining_offset_0x10d00u];
- if (hb_in_range<hb_codepoint_t> (u, 0x10F30u, 0x10F54u)) return joining_table[u - 0x10F30u + joining_offset_0x10f30u];
- if (hb_in_range<hb_codepoint_t> (u, 0x10FB0u, 0x10FCBu)) return joining_table[u - 0x10FB0u + joining_offset_0x10fb0u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x10F30u, 0x10FCBu)) return joining_table[u - 0x10F30u + joining_offset_0x10f30u];
break;
case 0x11u:
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic.cc b/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic.cc
index 1f244f940c..1f8c1410fc 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic.cc
@@ -259,7 +259,7 @@ struct arabic_shape_plan_t
void *
data_create_arabic (const hb_ot_shape_plan_t *plan)
{
- arabic_shape_plan_t *arabic_plan = (arabic_shape_plan_t *) calloc (1, sizeof (arabic_shape_plan_t));
+ arabic_shape_plan_t *arabic_plan = (arabic_shape_plan_t *) hb_calloc (1, sizeof (arabic_shape_plan_t));
if (unlikely (!arabic_plan))
return nullptr;
@@ -282,7 +282,7 @@ data_destroy_arabic (void *data)
arabic_fallback_plan_destroy (arabic_plan->fallback_plan);
- free (data);
+ hb_free (data);
}
static void
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-hangul.cc b/thirdparty/harfbuzz/src/hb-ot-shape-complex-hangul.cc
index dbedd6af0c..0d84a76b85 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-hangul.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-hangul.cc
@@ -80,7 +80,7 @@ struct hangul_shape_plan_t
static void *
data_create_hangul (const hb_ot_shape_plan_t *plan)
{
- hangul_shape_plan_t *hangul_plan = (hangul_shape_plan_t *) calloc (1, sizeof (hangul_shape_plan_t));
+ hangul_shape_plan_t *hangul_plan = (hangul_shape_plan_t *) hb_calloc (1, sizeof (hangul_shape_plan_t));
if (unlikely (!hangul_plan))
return nullptr;
@@ -93,7 +93,7 @@ data_create_hangul (const hb_ot_shape_plan_t *plan)
static void
data_destroy_hangul (void *data)
{
- free (data);
+ hb_free (data);
}
/* Constants for algorithmic hangul syllable [de]composition. */
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-indic-table.cc b/thirdparty/harfbuzz/src/hb-ot-shape-complex-indic-table.cc
index dd204b23c1..326aa9f96e 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-indic-table.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-indic-table.cc
@@ -6,12 +6,12 @@
*
* on files with these headers:
*
- * # IndicSyllabicCategory-13.0.0.txt
- * # Date: 2019-07-22, 19:55:00 GMT [KW, RP]
- * # IndicPositionalCategory-13.0.0.txt
- * # Date: 2019-07-23, 00:01:00 GMT [KW, RP]
- * # Blocks-13.0.0.txt
- * # Date: 2019-07-10, 19:06:00 GMT [KW]
+ * # IndicSyllabicCategory-14.0.0.txt
+ * # Date: 2021-05-22, 01:01:00 GMT [KW, RP]
+ * # IndicPositionalCategory-14.0.0.txt
+ * # Date: 2021-05-22, 01:01:00 GMT [KW, RP]
+ * # Blocks-14.0.0.txt
+ * # Date: 2021-01-22, 23:29:00 GMT [KW]
*/
#include "hb.hh"
@@ -27,9 +27,9 @@
#define ISC_Bi INDIC_SYLLABIC_CATEGORY_BINDU /* 91 chars; Bindu */
#define ISC_BJN INDIC_SYLLABIC_CATEGORY_BRAHMI_JOINING_NUMBER /* 20 chars; Brahmi_Joining_Number */
#define ISC_Ca INDIC_SYLLABIC_CATEGORY_CANTILLATION_MARK /* 59 chars; Cantillation_Mark */
-#define ISC_C INDIC_SYLLABIC_CATEGORY_CONSONANT /* 2195 chars; Consonant */
-#define ISC_CD INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD /* 12 chars; Consonant_Dead */
-#define ISC_CF INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL /* 67 chars; Consonant_Final */
+#define ISC_C INDIC_SYLLABIC_CATEGORY_CONSONANT /* 2206 chars; Consonant */
+#define ISC_CD INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD /* 14 chars; Consonant_Dead */
+#define ISC_CF INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL /* 70 chars; Consonant_Final */
#define ISC_CHL INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER /* 5 chars; Consonant_Head_Letter */
#define ISC_CIP INDIC_SYLLABIC_CATEGORY_CONSONANT_INITIAL_POSTFIXED /* 1 chars; Consonant_Initial_Postfixed */
#define ISC_CK INDIC_SYLLABIC_CATEGORY_CONSONANT_KILLER /* 2 chars; Consonant_Killer */
@@ -38,18 +38,18 @@
#define ISC_CPR INDIC_SYLLABIC_CATEGORY_CONSONANT_PRECEDING_REPHA /* 3 chars; Consonant_Preceding_Repha */
#define ISC_CPrf INDIC_SYLLABIC_CATEGORY_CONSONANT_PREFIXED /* 10 chars; Consonant_Prefixed */
#define ISC_CS INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED /* 94 chars; Consonant_Subjoined */
-#define ISC_CSR INDIC_SYLLABIC_CATEGORY_CONSONANT_SUCCEEDING_REPHA /* 4 chars; Consonant_Succeeding_Repha */
+#define ISC_CSR INDIC_SYLLABIC_CATEGORY_CONSONANT_SUCCEEDING_REPHA /* 1 chars; Consonant_Succeeding_Repha */
#define ISC_CWS INDIC_SYLLABIC_CATEGORY_CONSONANT_WITH_STACKER /* 8 chars; Consonant_With_Stacker */
#define ISC_GM INDIC_SYLLABIC_CATEGORY_GEMINATION_MARK /* 3 chars; Gemination_Mark */
#define ISC_IS INDIC_SYLLABIC_CATEGORY_INVISIBLE_STACKER /* 12 chars; Invisible_Stacker */
#define ISC_ZWJ INDIC_SYLLABIC_CATEGORY_JOINER /* 1 chars; Joiner */
#define ISC_ML INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER /* 1 chars; Modifying_Letter */
#define ISC_ZWNJ INDIC_SYLLABIC_CATEGORY_NON_JOINER /* 1 chars; Non_Joiner */
-#define ISC_N INDIC_SYLLABIC_CATEGORY_NUKTA /* 31 chars; Nukta */
+#define ISC_N INDIC_SYLLABIC_CATEGORY_NUKTA /* 32 chars; Nukta */
#define ISC_Nd INDIC_SYLLABIC_CATEGORY_NUMBER /* 491 chars; Number */
#define ISC_NJ INDIC_SYLLABIC_CATEGORY_NUMBER_JOINER /* 1 chars; Number_Joiner */
#define ISC_x INDIC_SYLLABIC_CATEGORY_OTHER /* 1 chars; Other */
-#define ISC_PK INDIC_SYLLABIC_CATEGORY_PURE_KILLER /* 23 chars; Pure_Killer */
+#define ISC_PK INDIC_SYLLABIC_CATEGORY_PURE_KILLER /* 25 chars; Pure_Killer */
#define ISC_RS INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER /* 2 chars; Register_Shifter */
#define ISC_SM INDIC_SYLLABIC_CATEGORY_SYLLABLE_MODIFIER /* 25 chars; Syllable_Modifier */
#define ISC_TL INDIC_SYLLABIC_CATEGORY_TONE_LETTER /* 7 chars; Tone_Letter */
@@ -57,18 +57,18 @@
#define ISC_V INDIC_SYLLABIC_CATEGORY_VIRAMA /* 27 chars; Virama */
#define ISC_Vs INDIC_SYLLABIC_CATEGORY_VISARGA /* 35 chars; Visarga */
#define ISC_Vo INDIC_SYLLABIC_CATEGORY_VOWEL /* 30 chars; Vowel */
-#define ISC_M INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT /* 683 chars; Vowel_Dependent */
-#define ISC_VI INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT /* 484 chars; Vowel_Independent */
+#define ISC_M INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT /* 686 chars; Vowel_Dependent */
+#define ISC_VI INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT /* 486 chars; Vowel_Independent */
-#define IMC_B INDIC_MATRA_CATEGORY_BOTTOM /* 351 chars; Bottom */
+#define IMC_B INDIC_MATRA_CATEGORY_BOTTOM /* 352 chars; Bottom */
#define IMC_BL INDIC_MATRA_CATEGORY_BOTTOM_AND_LEFT /* 1 chars; Bottom_And_Left */
#define IMC_BR INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT /* 4 chars; Bottom_And_Right */
#define IMC_L INDIC_MATRA_CATEGORY_LEFT /* 64 chars; Left */
#define IMC_LR INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT /* 22 chars; Left_And_Right */
#define IMC_x INDIC_MATRA_CATEGORY_NOT_APPLICABLE /* 1 chars; Not_Applicable */
#define IMC_O INDIC_MATRA_CATEGORY_OVERSTRUCK /* 10 chars; Overstruck */
-#define IMC_R INDIC_MATRA_CATEGORY_RIGHT /* 288 chars; Right */
-#define IMC_T INDIC_MATRA_CATEGORY_TOP /* 415 chars; Top */
+#define IMC_R INDIC_MATRA_CATEGORY_RIGHT /* 290 chars; Right */
+#define IMC_T INDIC_MATRA_CATEGORY_TOP /* 418 chars; Top */
#define IMC_TB INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM /* 10 chars; Top_And_Bottom */
#define IMC_TBL INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_LEFT /* 2 chars; Top_And_Bottom_And_Left */
#define IMC_TBR INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT /* 1 chars; Top_And_Bottom_And_Right */
@@ -231,11 +231,11 @@ static const uint16_t indic_table[] = {
/* 0C20 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x),
/* 0C28 */ _(C,x), _(x,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x),
/* 0C30 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x),
- /* 0C38 */ _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(A,x), _(M,T), _(M,T),
+ /* 0C38 */ _(C,x), _(C,x), _(x,x), _(x,x), _(N,B), _(A,x), _(M,T), _(M,T),
/* 0C40 */ _(M,T), _(M,R), _(M,R), _(M,R), _(M,R), _(x,x), _(M,T), _(M,T),
/* 0C48 */ _(M,TB), _(x,x), _(M,T), _(M,T), _(M,T), _(V,T), _(x,x), _(x,x),
/* 0C50 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,T), _(M,B), _(x,x),
- /* 0C58 */ _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x),
+ /* 0C58 */ _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(CD,x), _(x,x), _(x,x),
/* 0C60 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(Nd,x), _(Nd,x),
/* 0C68 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x),
/* 0C70 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x),
@@ -254,7 +254,7 @@ static const uint16_t indic_table[] = {
/* 0CC0 */ _(M,TR), _(M,R), _(M,R), _(M,R), _(M,R), _(x,x), _(M,T), _(M,TR),
/* 0CC8 */ _(M,TR), _(x,x), _(M,TR), _(M,TR), _(M,T), _(V,T), _(x,x), _(x,x),
/* 0CD0 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(M,R), _(M,R), _(x,x),
- /* 0CD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(C,x), _(x,x),
+ /* 0CD8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(CD,x), _(C,x), _(x,x),
/* 0CE0 */ _(VI,x), _(VI,x), _(M,B), _(M,B), _(x,x), _(x,x), _(Nd,x), _(Nd,x),
/* 0CE8 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x),
/* 0CF0 */ _(x,x),_(CWS,x),_(CWS,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x),
@@ -402,7 +402,7 @@ static const uint16_t indic_table[] = {
/* AA70 */ _(x,x), _(C,x), _(C,x), _(C,x), _(CP,x), _(CP,x), _(CP,x), _(x,x),
/* AA78 */ _(x,x), _(x,x), _(C,x), _(TM,R), _(TM,T), _(TM,R), _(C,x), _(C,x),
-}; /* Table items: 1792; occupancy: 70% */
+}; /* Table items: 1792; occupancy: 71% */
uint16_t
hb_indic_get_categories (hb_codepoint_t u)
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-indic.cc b/thirdparty/harfbuzz/src/hb-ot-shape-complex-indic.cc
index a4f2d9a847..0983a32848 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-indic.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-indic.cc
@@ -106,7 +106,8 @@ indic_features[] =
{
/*
* Basic features.
- * These features are applied in order, one at a time, after initial_reordering.
+ * These features are applied in order, one at a time, after initial_reordering,
+ * constrained to the syllable.
*/
{HB_TAG('n','u','k','t'), F_GLOBAL_MANUAL_JOINERS},
{HB_TAG('a','k','h','n'), F_GLOBAL_MANUAL_JOINERS},
@@ -121,8 +122,8 @@ indic_features[] =
{HB_TAG('c','j','c','t'), F_GLOBAL_MANUAL_JOINERS},
/*
* Other features.
- * These features are applied all at once, after final_reordering
- * but before clearing syllables.
+ * These features are applied all at once, after final_reordering, constrained
+ * to the syllable.
* Default Bengali font in Windows for example has intermixed
* lookups for init,pres,abvs,blws features.
*/
@@ -257,7 +258,7 @@ struct indic_shape_plan_t
static void *
data_create_indic (const hb_ot_shape_plan_t *plan)
{
- indic_shape_plan_t *indic_plan = (indic_shape_plan_t *) calloc (1, sizeof (indic_shape_plan_t));
+ indic_shape_plan_t *indic_plan = (indic_shape_plan_t *) hb_calloc (1, sizeof (indic_shape_plan_t));
if (unlikely (!indic_plan))
return nullptr;
@@ -300,7 +301,7 @@ data_create_indic (const hb_ot_shape_plan_t *plan)
static void
data_destroy_indic (void *data)
{
- free (data);
+ hb_free (data);
}
static indic_position_t
@@ -960,7 +961,8 @@ initial_reordering_indic (const hb_ot_shape_plan_t *plan,
hb_syllabic_insert_dotted_circles (font, buffer,
indic_broken_cluster,
OT_DOTTEDCIRCLE,
- OT_Repha);
+ OT_Repha,
+ POS_END);
foreach_syllable (buffer, start, end)
initial_reordering_syllable_indic (plan, font->face, buffer, start, end);
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer-machine.hh b/thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer-machine.hh
index 82ab186a41..c52f72f394 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer-machine.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer-machine.hh
@@ -1,29 +1,30 @@
+
#line 1 "hb-ot-shape-complex-khmer-machine.rl"
/*
-* Copyright © 2011,2012 Google, Inc.
-*
-* This is part of HarfBuzz, a text shaping library.
-*
-* Permission is hereby granted, without written agreement and without
-* license or royalty fees, to use, copy, modify, and distribute this
-* software and its documentation for any purpose, provided that the
-* above copyright notice and the following two paragraphs appear in
-* all copies of this software.
-*
-* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
-* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
-* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
-* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-* DAMAGE.
-*
-* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
-* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
-* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
-* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-*
-* Google Author(s): Behdad Esfahbod
-*/
+ * Copyright © 2011,2012 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
#ifndef HB_OT_SHAPE_COMPLEX_KHMER_MACHINE_HH
#define HB_OT_SHAPE_COMPLEX_KHMER_MACHINE_HH
@@ -31,13 +32,13 @@
#include "hb.hh"
enum khmer_syllable_type_t {
- khmer_consonant_syllable,
- khmer_broken_cluster,
- khmer_non_khmer_cluster,
+ khmer_consonant_syllable,
+ khmer_broken_cluster,
+ khmer_non_khmer_cluster,
};
-#line 41 "hb-ot-shape-complex-khmer-machine.hh"
+#line 42 "hb-ot-shape-complex-khmer-machine.hh"
#define khmer_syllable_machine_ex_C 1u
#define khmer_syllable_machine_ex_Coeng 14u
#define khmer_syllable_machine_ex_DOTTEDCIRCLE 12u
@@ -55,125 +56,180 @@ enum khmer_syllable_type_t {
#define khmer_syllable_machine_ex_ZWNJ 5u
-#line 59 "hb-ot-shape-complex-khmer-machine.hh"
+#line 60 "hb-ot-shape-complex-khmer-machine.hh"
static const unsigned char _khmer_syllable_machine_trans_keys[] = {
- 2u, 8u, 2u, 6u, 2u, 8u, 2u, 6u,
- 0u, 0u, 2u, 6u, 2u, 8u, 2u, 6u,
- 2u, 8u, 2u, 6u, 2u, 6u, 2u, 8u,
- 2u, 6u, 0u, 0u, 2u, 6u, 2u, 8u,
- 2u, 6u, 2u, 8u, 2u, 6u, 2u, 8u,
- 0u, 11u, 2u, 11u, 2u, 11u, 2u, 11u,
- 7u, 7u, 2u, 7u, 2u, 11u, 2u, 11u,
- 2u, 11u, 0u, 0u, 2u, 8u, 2u, 11u,
- 2u, 11u, 7u, 7u, 2u, 7u, 2u, 11u,
- 2u, 11u, 0u, 0u, 2u, 11u, 2u, 11u,
- 0u
+ 5u, 26u, 5u, 21u, 5u, 26u, 5u, 21u, 1u, 16u, 5u, 21u, 5u, 26u, 5u, 21u,
+ 5u, 26u, 5u, 21u, 5u, 21u, 5u, 26u, 5u, 21u, 1u, 16u, 5u, 21u, 5u, 26u,
+ 5u, 21u, 5u, 26u, 5u, 21u, 5u, 26u, 1u, 29u, 5u, 29u, 5u, 29u, 5u, 29u,
+ 22u, 22u, 5u, 22u, 5u, 29u, 5u, 29u, 5u, 29u, 1u, 16u, 5u, 26u, 5u, 29u,
+ 5u, 29u, 22u, 22u, 5u, 22u, 5u, 29u, 5u, 29u, 1u, 16u, 5u, 29u, 5u, 29u,
+ 0
};
-static const signed char _khmer_syllable_machine_char_class[] = {
- 0, 0, 1, 1, 2, 2, 1, 1,
- 1, 1, 3, 3, 1, 4, 1, 0,
- 1, 1, 1, 5, 6, 7, 1, 1,
- 1, 8, 9, 10, 11, 0
+static const char _khmer_syllable_machine_key_spans[] = {
+ 22, 17, 22, 17, 16, 17, 22, 17,
+ 22, 17, 17, 22, 17, 16, 17, 22,
+ 17, 22, 17, 22, 29, 25, 25, 25,
+ 1, 18, 25, 25, 25, 16, 22, 25,
+ 25, 1, 18, 25, 25, 16, 25, 25
};
static const short _khmer_syllable_machine_index_offsets[] = {
- 0, 7, 12, 19, 24, 25, 30, 37,
- 42, 49, 54, 59, 66, 71, 72, 77,
- 84, 89, 96, 101, 108, 120, 130, 140,
- 150, 151, 157, 167, 177, 187, 188, 195,
- 205, 215, 216, 222, 232, 242, 243, 253,
- 0
-};
-
-static const signed char _khmer_syllable_machine_indicies[] = {
- 1, 0, 0, 2, 3, 0, 4, 1,
- 0, 0, 0, 3, 1, 0, 0, 0,
- 3, 0, 4, 5, 0, 0, 0, 4,
- 6, 7, 0, 0, 0, 8, 9, 0,
- 0, 0, 10, 0, 4, 9, 0, 0,
- 0, 10, 11, 0, 0, 0, 12, 0,
- 4, 11, 0, 0, 0, 12, 14, 13,
- 13, 13, 15, 14, 16, 16, 16, 15,
- 16, 17, 18, 16, 16, 16, 17, 19,
- 20, 16, 16, 16, 21, 22, 16, 16,
- 16, 23, 16, 17, 22, 16, 16, 16,
- 23, 24, 16, 16, 16, 25, 16, 17,
- 24, 16, 16, 16, 25, 14, 16, 16,
- 26, 15, 16, 17, 29, 28, 30, 2,
- 31, 28, 15, 19, 17, 23, 25, 21,
- 33, 32, 34, 2, 3, 6, 4, 10,
- 12, 8, 35, 32, 36, 32, 3, 6,
- 4, 10, 12, 8, 5, 32, 36, 32,
- 4, 6, 32, 32, 32, 8, 6, 7,
- 32, 36, 32, 8, 6, 37, 32, 36,
- 32, 10, 6, 4, 32, 32, 8, 38,
- 32, 36, 32, 12, 6, 4, 10, 32,
- 8, 35, 32, 34, 32, 3, 6, 4,
- 10, 12, 8, 29, 14, 39, 39, 39,
- 15, 39, 17, 41, 40, 42, 40, 15,
- 19, 17, 23, 25, 21, 18, 40, 42,
- 40, 17, 19, 40, 40, 40, 21, 19,
- 20, 40, 42, 40, 21, 19, 43, 40,
- 42, 40, 23, 19, 17, 40, 40, 21,
- 44, 40, 42, 40, 25, 19, 17, 23,
- 40, 21, 45, 46, 40, 31, 26, 15,
- 19, 17, 23, 25, 21, 41, 40, 31,
- 40, 15, 19, 17, 23, 25, 21, 0
+ 0, 23, 41, 64, 82, 99, 117, 140,
+ 158, 181, 199, 217, 240, 258, 275, 293,
+ 316, 334, 357, 375, 398, 428, 454, 480,
+ 506, 508, 527, 553, 579, 605, 622, 645,
+ 671, 697, 699, 718, 744, 770, 787, 813
};
-static const signed char _khmer_syllable_machine_index_defaults[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 13, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 28, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 39, 40,
- 40, 40, 40, 40, 40, 40, 40, 40,
- 0
+static const char _khmer_syllable_machine_indicies[] = {
+ 1, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2,
+ 3, 0, 0, 0, 0, 4, 0, 1,
+ 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3,
+ 0, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3, 0, 0, 0, 0, 4, 0,
+ 5, 5, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 0, 6, 6, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 6, 0, 7, 7, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 8, 0, 9, 9, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 10, 0, 0,
+ 0, 0, 4, 0, 9, 9, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 10, 0, 11, 11,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 12, 0,
+ 0, 0, 0, 4, 0, 11, 11, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 12, 0, 14,
+ 14, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 15,
+ 13, 14, 14, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 15, 16, 16, 16, 16, 17, 16,
+ 18, 18, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 17, 16, 19, 19, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 19, 16, 20, 20, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 21, 16, 22, 22, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 23, 16, 16,
+ 16, 16, 17, 16, 22, 22, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 23, 16, 24, 24,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 25, 16,
+ 16, 16, 16, 17, 16, 24, 24, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 25, 16, 14,
+ 14, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 26, 15,
+ 16, 16, 16, 16, 17, 16, 28, 28,
+ 27, 27, 29, 29, 27, 27, 27, 27,
+ 2, 2, 27, 30, 27, 28, 27, 27,
+ 27, 27, 15, 19, 27, 27, 27, 17,
+ 23, 25, 21, 27, 32, 32, 31, 31,
+ 31, 31, 31, 31, 31, 33, 31, 31,
+ 31, 31, 31, 2, 3, 6, 31, 31,
+ 31, 4, 10, 12, 8, 31, 34, 34,
+ 31, 31, 31, 31, 31, 31, 31, 35,
+ 31, 31, 31, 31, 31, 31, 3, 6,
+ 31, 31, 31, 4, 10, 12, 8, 31,
+ 5, 5, 31, 31, 31, 31, 31, 31,
+ 31, 35, 31, 31, 31, 31, 31, 31,
+ 4, 6, 31, 31, 31, 31, 31, 31,
+ 8, 31, 6, 31, 7, 7, 31, 31,
+ 31, 31, 31, 31, 31, 35, 31, 31,
+ 31, 31, 31, 31, 8, 6, 31, 36,
+ 36, 31, 31, 31, 31, 31, 31, 31,
+ 35, 31, 31, 31, 31, 31, 31, 10,
+ 6, 31, 31, 31, 4, 31, 31, 8,
+ 31, 37, 37, 31, 31, 31, 31, 31,
+ 31, 31, 35, 31, 31, 31, 31, 31,
+ 31, 12, 6, 31, 31, 31, 4, 10,
+ 31, 8, 31, 34, 34, 31, 31, 31,
+ 31, 31, 31, 31, 33, 31, 31, 31,
+ 31, 31, 31, 3, 6, 31, 31, 31,
+ 4, 10, 12, 8, 31, 28, 28, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 28, 31, 14, 14,
+ 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 15, 38,
+ 38, 38, 38, 17, 38, 40, 40, 39,
+ 39, 39, 39, 39, 39, 39, 41, 39,
+ 39, 39, 39, 39, 39, 15, 19, 39,
+ 39, 39, 17, 23, 25, 21, 39, 18,
+ 18, 39, 39, 39, 39, 39, 39, 39,
+ 41, 39, 39, 39, 39, 39, 39, 17,
+ 19, 39, 39, 39, 39, 39, 39, 21,
+ 39, 19, 39, 20, 20, 39, 39, 39,
+ 39, 39, 39, 39, 41, 39, 39, 39,
+ 39, 39, 39, 21, 19, 39, 42, 42,
+ 39, 39, 39, 39, 39, 39, 39, 41,
+ 39, 39, 39, 39, 39, 39, 23, 19,
+ 39, 39, 39, 17, 39, 39, 21, 39,
+ 43, 43, 39, 39, 39, 39, 39, 39,
+ 39, 41, 39, 39, 39, 39, 39, 39,
+ 25, 19, 39, 39, 39, 17, 23, 39,
+ 21, 39, 44, 44, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 44, 39, 45, 45, 39, 39, 39,
+ 39, 39, 39, 39, 30, 39, 39, 39,
+ 39, 39, 26, 15, 19, 39, 39, 39,
+ 17, 23, 25, 21, 39, 40, 40, 39,
+ 39, 39, 39, 39, 39, 39, 30, 39,
+ 39, 39, 39, 39, 39, 15, 19, 39,
+ 39, 39, 17, 23, 25, 21, 39, 0
};
-static const signed char _khmer_syllable_machine_cond_targs[] = {
- 20, 1, 28, 22, 23, 3, 24, 5,
- 25, 7, 26, 9, 27, 20, 10, 31,
- 20, 32, 12, 33, 14, 34, 16, 35,
- 18, 36, 39, 20, 20, 21, 30, 37,
- 20, 0, 29, 2, 4, 6, 8, 20,
- 20, 11, 13, 15, 17, 38, 19, 0
+static const char _khmer_syllable_machine_trans_targs[] = {
+ 20, 1, 28, 22, 23, 3, 24, 5,
+ 25, 7, 26, 9, 27, 20, 10, 31,
+ 20, 32, 12, 33, 14, 34, 16, 35,
+ 18, 36, 39, 20, 21, 30, 37, 20,
+ 0, 29, 2, 4, 6, 8, 20, 20,
+ 11, 13, 15, 17, 38, 19
};
-static const signed char _khmer_syllable_machine_cond_actions[] = {
- 1, 0, 2, 2, 2, 0, 0, 0,
- 2, 0, 2, 0, 2, 3, 0, 4,
- 5, 2, 0, 0, 0, 2, 0, 2,
- 0, 2, 4, 0, 8, 2, 9, 0,
- 10, 0, 0, 0, 0, 0, 0, 11,
- 12, 0, 0, 0, 0, 4, 0, 0
+static const char _khmer_syllable_machine_trans_actions[] = {
+ 1, 0, 2, 2, 2, 0, 0, 0,
+ 2, 0, 2, 0, 2, 3, 0, 4,
+ 5, 2, 0, 0, 0, 2, 0, 2,
+ 0, 2, 4, 8, 2, 9, 0, 10,
+ 0, 0, 0, 0, 0, 0, 11, 12,
+ 0, 0, 0, 0, 4, 0
};
-static const signed char _khmer_syllable_machine_to_state_actions[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 6, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0
+static const char _khmer_syllable_machine_to_state_actions[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0
};
-static const signed char _khmer_syllable_machine_from_state_actions[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 7, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0
+static const char _khmer_syllable_machine_from_state_actions[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 7, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0
};
-static const signed char _khmer_syllable_machine_eof_trans[] = {
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 14, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 28, 33, 33, 33,
- 33, 33, 33, 33, 33, 33, 40, 41,
- 41, 41, 41, 41, 41, 41, 41, 41,
- 0
+static const unsigned char _khmer_syllable_machine_eof_trans[] = {
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 14, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 0, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 39, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40
};
static const int khmer_syllable_machine_start = 20;
@@ -191,263 +247,148 @@ static const int khmer_syllable_machine_en_main = 20;
#define found_syllable(syllable_type) \
-HB_STMT_START { \
- if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \
- for (unsigned int i = ts; i < te; i++) \
- info[i].syllable() = (syllable_serial << 4) | syllable_type; \
- syllable_serial++; \
- if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
- } HB_STMT_END
+ HB_STMT_START { \
+ if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \
+ for (unsigned int i = ts; i < te; i++) \
+ info[i].syllable() = (syllable_serial << 4) | syllable_type; \
+ syllable_serial++; \
+ if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
+ } HB_STMT_END
static void
find_syllables_khmer (hb_buffer_t *buffer)
{
- unsigned int p, pe, eof, ts, te, act HB_UNUSED;
- int cs;
- hb_glyph_info_t *info = buffer->info;
-
-#line 210 "hb-ot-shape-complex-khmer-machine.hh"
+ unsigned int p, pe, eof, ts, te, act HB_UNUSED;
+ int cs;
+ hb_glyph_info_t *info = buffer->info;
+
+#line 266 "hb-ot-shape-complex-khmer-machine.hh"
{
- cs = (int)khmer_syllable_machine_start;
- ts = 0;
- te = 0;
- act = 0;
+ cs = khmer_syllable_machine_start;
+ ts = 0;
+ te = 0;
+ act = 0;
}
-
+
#line 106 "hb-ot-shape-complex-khmer-machine.rl"
-
-
- p = 0;
- pe = eof = buffer->len;
-
- unsigned int syllable_serial = 1;
-
-#line 226 "hb-ot-shape-complex-khmer-machine.hh"
+
+
+ p = 0;
+ pe = eof = buffer->len;
+
+ unsigned int syllable_serial = 1;
+
+#line 282 "hb-ot-shape-complex-khmer-machine.hh"
{
- unsigned int _trans = 0;
- const unsigned char * _keys;
- const signed char * _inds;
- int _ic;
- _resume: {}
- if ( p == pe && p != eof )
- goto _out;
- switch ( _khmer_syllable_machine_from_state_actions[cs] ) {
- case 7: {
- {
+ int _slen;
+ int _trans;
+ const unsigned char *_keys;
+ const char *_inds;
+ if ( p == pe )
+ goto _test_eof;
+_resume:
+ switch ( _khmer_syllable_machine_from_state_actions[cs] ) {
+ case 7:
#line 1 "NONE"
- {ts = p;}}
-
-#line 241 "hb-ot-shape-complex-khmer-machine.hh"
-
-
- break;
- }
- }
-
- if ( p == eof ) {
- if ( _khmer_syllable_machine_eof_trans[cs] > 0 ) {
- _trans = (unsigned int)_khmer_syllable_machine_eof_trans[cs] - 1;
- }
- }
- else {
- _keys = ( _khmer_syllable_machine_trans_keys + ((cs<<1)));
- _inds = ( _khmer_syllable_machine_indicies + (_khmer_syllable_machine_index_offsets[cs]));
-
- if ( (info[p].khmer_category()) <= 29 && (info[p].khmer_category()) >= 1 ) {
- _ic = (int)_khmer_syllable_machine_char_class[(int)(info[p].khmer_category()) - 1];
- if ( _ic <= (int)(*( _keys+1)) && _ic >= (int)(*( _keys)) )
- _trans = (unsigned int)(*( _inds + (int)( _ic - (int)(*( _keys)) ) ));
- else
- _trans = (unsigned int)_khmer_syllable_machine_index_defaults[cs];
- }
- else {
- _trans = (unsigned int)_khmer_syllable_machine_index_defaults[cs];
- }
-
- }
- cs = (int)_khmer_syllable_machine_cond_targs[_trans];
-
- if ( _khmer_syllable_machine_cond_actions[_trans] != 0 ) {
-
- switch ( _khmer_syllable_machine_cond_actions[_trans] ) {
- case 2: {
- {
+ {ts = p;}
+ break;
+#line 296 "hb-ot-shape-complex-khmer-machine.hh"
+ }
+
+ _keys = _khmer_syllable_machine_trans_keys + (cs<<1);
+ _inds = _khmer_syllable_machine_indicies + _khmer_syllable_machine_index_offsets[cs];
+
+ _slen = _khmer_syllable_machine_key_spans[cs];
+ _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].khmer_category()) &&
+ ( info[p].khmer_category()) <= _keys[1] ?
+ ( info[p].khmer_category()) - _keys[0] : _slen ];
+
+_eof_trans:
+ cs = _khmer_syllable_machine_trans_targs[_trans];
+
+ if ( _khmer_syllable_machine_trans_actions[_trans] == 0 )
+ goto _again;
+
+ switch ( _khmer_syllable_machine_trans_actions[_trans] ) {
+ case 2:
#line 1 "NONE"
- {te = p+1;}}
-
-#line 279 "hb-ot-shape-complex-khmer-machine.hh"
-
-
- break;
- }
- case 8: {
- {
-#line 82 "hb-ot-shape-complex-khmer-machine.rl"
- {te = p+1;{
+ {te = p+1;}
+ break;
+ case 8:
#line 82 "hb-ot-shape-complex-khmer-machine.rl"
- found_syllable (khmer_non_khmer_cluster); }
- }}
-
-#line 292 "hb-ot-shape-complex-khmer-machine.hh"
-
-
- break;
- }
- case 10: {
- {
+ {te = p+1;{ found_syllable (khmer_non_khmer_cluster); }}
+ break;
+ case 10:
#line 80 "hb-ot-shape-complex-khmer-machine.rl"
- {te = p;p = p - 1;{
-#line 80 "hb-ot-shape-complex-khmer-machine.rl"
- found_syllable (khmer_consonant_syllable); }
- }}
-
-#line 305 "hb-ot-shape-complex-khmer-machine.hh"
-
-
- break;
- }
- case 12: {
- {
-#line 81 "hb-ot-shape-complex-khmer-machine.rl"
- {te = p;p = p - 1;{
+ {te = p;p--;{ found_syllable (khmer_consonant_syllable); }}
+ break;
+ case 12:
#line 81 "hb-ot-shape-complex-khmer-machine.rl"
- found_syllable (khmer_broken_cluster); }
- }}
-
-#line 318 "hb-ot-shape-complex-khmer-machine.hh"
-
-
- break;
- }
- case 11: {
- {
-#line 82 "hb-ot-shape-complex-khmer-machine.rl"
- {te = p;p = p - 1;{
+ {te = p;p--;{ found_syllable (khmer_broken_cluster); }}
+ break;
+ case 11:
#line 82 "hb-ot-shape-complex-khmer-machine.rl"
- found_syllable (khmer_non_khmer_cluster); }
- }}
-
-#line 331 "hb-ot-shape-complex-khmer-machine.hh"
-
-
- break;
- }
- case 1: {
- {
+ {te = p;p--;{ found_syllable (khmer_non_khmer_cluster); }}
+ break;
+ case 1:
#line 80 "hb-ot-shape-complex-khmer-machine.rl"
- {p = ((te))-1;
- {
-#line 80 "hb-ot-shape-complex-khmer-machine.rl"
- found_syllable (khmer_consonant_syllable); }
- }}
-
-#line 345 "hb-ot-shape-complex-khmer-machine.hh"
-
-
- break;
- }
- case 5: {
- {
-#line 81 "hb-ot-shape-complex-khmer-machine.rl"
- {p = ((te))-1;
- {
+ {{p = ((te))-1;}{ found_syllable (khmer_consonant_syllable); }}
+ break;
+ case 5:
#line 81 "hb-ot-shape-complex-khmer-machine.rl"
- found_syllable (khmer_broken_cluster); }
- }}
-
-#line 359 "hb-ot-shape-complex-khmer-machine.hh"
-
-
- break;
- }
- case 3: {
- {
+ {{p = ((te))-1;}{ found_syllable (khmer_broken_cluster); }}
+ break;
+ case 3:
#line 1 "NONE"
- {switch( act ) {
- case 2: {
- p = ((te))-1;
- {
-#line 81 "hb-ot-shape-complex-khmer-machine.rl"
- found_syllable (khmer_broken_cluster); }
- break;
- }
- case 3: {
- p = ((te))-1;
- {
-#line 82 "hb-ot-shape-complex-khmer-machine.rl"
- found_syllable (khmer_non_khmer_cluster); }
- break;
- }
- }}
- }
-
-#line 385 "hb-ot-shape-complex-khmer-machine.hh"
-
-
- break;
- }
- case 4: {
- {
+ { switch( act ) {
+ case 2:
+ {{p = ((te))-1;} found_syllable (khmer_broken_cluster); }
+ break;
+ case 3:
+ {{p = ((te))-1;} found_syllable (khmer_non_khmer_cluster); }
+ break;
+ }
+ }
+ break;
+ case 4:
#line 1 "NONE"
- {te = p+1;}}
-
-#line 395 "hb-ot-shape-complex-khmer-machine.hh"
-
- {
+ {te = p+1;}
#line 81 "hb-ot-shape-complex-khmer-machine.rl"
- {act = 2;}}
-
-#line 401 "hb-ot-shape-complex-khmer-machine.hh"
-
-
- break;
- }
- case 9: {
- {
+ {act = 2;}
+ break;
+ case 9:
#line 1 "NONE"
- {te = p+1;}}
-
-#line 411 "hb-ot-shape-complex-khmer-machine.hh"
-
- {
+ {te = p+1;}
#line 82 "hb-ot-shape-complex-khmer-machine.rl"
- {act = 3;}}
-
-#line 417 "hb-ot-shape-complex-khmer-machine.hh"
-
-
- break;
- }
- }
-
- }
-
- if ( p == eof ) {
- if ( cs >= 20 )
- goto _out;
- }
- else {
- switch ( _khmer_syllable_machine_to_state_actions[cs] ) {
- case 6: {
- {
+ {act = 3;}
+ break;
+#line 366 "hb-ot-shape-complex-khmer-machine.hh"
+ }
+
+_again:
+ switch ( _khmer_syllable_machine_to_state_actions[cs] ) {
+ case 6:
#line 1 "NONE"
- {ts = 0;}}
-
-#line 437 "hb-ot-shape-complex-khmer-machine.hh"
-
-
- break;
- }
- }
-
- p += 1;
- goto _resume;
- }
- _out: {}
+ {ts = 0;}
+ break;
+#line 375 "hb-ot-shape-complex-khmer-machine.hh"
+ }
+
+ if ( ++p != pe )
+ goto _resume;
+ _test_eof: {}
+ if ( p == eof )
+ {
+ if ( _khmer_syllable_machine_eof_trans[cs] > 0 ) {
+ _trans = _khmer_syllable_machine_eof_trans[cs] - 1;
+ goto _eof_trans;
+ }
}
-
+
+ }
+
#line 114 "hb-ot-shape-complex-khmer-machine.rl"
-
+
}
#undef found_syllable
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer.cc b/thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer.cc
index dddba142a3..7787886857 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer.cc
@@ -42,7 +42,8 @@ khmer_features[] =
{
/*
* Basic features.
- * These features are applied in order, one at a time, after reordering.
+ * These features are applied all at once, before reordering, constrained
+ * to the syllable.
*/
{HB_TAG('p','r','e','f'), F_MANUAL_JOINERS},
{HB_TAG('b','l','w','f'), F_MANUAL_JOINERS},
@@ -147,7 +148,7 @@ struct khmer_shape_plan_t
static void *
data_create_khmer (const hb_ot_shape_plan_t *plan)
{
- khmer_shape_plan_t *khmer_plan = (khmer_shape_plan_t *) calloc (1, sizeof (khmer_shape_plan_t));
+ khmer_shape_plan_t *khmer_plan = (khmer_shape_plan_t *) hb_calloc (1, sizeof (khmer_shape_plan_t));
if (unlikely (!khmer_plan))
return nullptr;
@@ -161,7 +162,7 @@ data_create_khmer (const hb_ot_shape_plan_t *plan)
static void
data_destroy_khmer (void *data)
{
- free (data);
+ hb_free (data);
}
static void
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-myanmar.cc b/thirdparty/harfbuzz/src/hb-ot-shape-complex-myanmar.cc
index bc5dcb904c..6e92a9b0ae 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-myanmar.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-myanmar.cc
@@ -41,7 +41,8 @@ myanmar_basic_features[] =
{
/*
* Basic features.
- * These features are applied in order, one at a time, after reordering.
+ * These features are applied in order, one at a time, after reordering,
+ * constrained to the syllable.
*/
HB_TAG('r','p','h','f'),
HB_TAG('p','r','e','f'),
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-syllabic.cc b/thirdparty/harfbuzz/src/hb-ot-shape-complex-syllabic.cc
index 46509abee2..5a08f878dc 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-syllabic.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-syllabic.cc
@@ -34,7 +34,8 @@ hb_syllabic_insert_dotted_circles (hb_font_t *font,
hb_buffer_t *buffer,
unsigned int broken_syllable_type,
unsigned int dottedcircle_category,
- int repha_category)
+ int repha_category,
+ int dottedcircle_position)
{
if (unlikely (buffer->flags & HB_BUFFER_FLAG_DO_NOT_INSERT_DOTTED_CIRCLE))
return;
@@ -61,6 +62,8 @@ hb_syllabic_insert_dotted_circles (hb_font_t *font,
hb_glyph_info_t dottedcircle = {0};
dottedcircle.codepoint = 0x25CCu;
dottedcircle.complex_var_u8_category() = dottedcircle_category;
+ if (dottedcircle_position != -1)
+ dottedcircle.complex_var_u8_auxiliary() = dottedcircle_position;
dottedcircle.codepoint = dottedcircle_glyph;
buffer->clear_output ();
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-syllabic.hh b/thirdparty/harfbuzz/src/hb-ot-shape-complex-syllabic.hh
index c80b8fee1d..b901a660d3 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-syllabic.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-syllabic.hh
@@ -35,7 +35,8 @@ hb_syllabic_insert_dotted_circles (hb_font_t *font,
hb_buffer_t *buffer,
unsigned int broken_syllable_type,
unsigned int dottedcircle_category,
- int repha_category = -1);
+ int repha_category = -1,
+ int dottedcircle_position = -1);
#endif /* HB_OT_SHAPE_COMPLEX_SYLLABIC_HH */
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-use-machine.hh b/thirdparty/harfbuzz/src/hb-ot-shape-complex-use-machine.hh
index b4b2b75100..bb046a72ec 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-use-machine.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-use-machine.hh
@@ -1,31 +1,32 @@
+
#line 1 "hb-ot-shape-complex-use-machine.rl"
/*
-* Copyright © 2015 Mozilla Foundation.
-* Copyright © 2015 Google, Inc.
-*
-* This is part of HarfBuzz, a text shaping library.
-*
-* Permission is hereby granted, without written agreement and without
-* license or royalty fees, to use, copy, modify, and distribute this
-* software and its documentation for any purpose, provided that the
-* above copyright notice and the following two paragraphs appear in
-* all copies of this software.
-*
-* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
-* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
-* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
-* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-* DAMAGE.
-*
-* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
-* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
-* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
-* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-*
-* Mozilla Author(s): Jonathan Kew
-* Google Author(s): Behdad Esfahbod
-*/
+ * Copyright © 2015 Mozilla Foundation.
+ * Copyright © 2015 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Mozilla Author(s): Jonathan Kew
+ * Google Author(s): Behdad Esfahbod
+ */
#ifndef HB_OT_SHAPE_COMPLEX_USE_MACHINE_HH
#define HB_OT_SHAPE_COMPLEX_USE_MACHINE_HH
@@ -40,20 +41,20 @@
#define USE(Cat) use_syllable_machine_ex_##Cat
enum use_syllable_type_t {
- use_independent_cluster,
- use_virama_terminated_cluster,
- use_sakot_terminated_cluster,
- use_standard_cluster,
- use_number_joiner_terminated_cluster,
- use_numeral_cluster,
- use_symbol_cluster,
- use_hieroglyph_cluster,
- use_broken_cluster,
- use_non_cluster,
+ use_independent_cluster,
+ use_virama_terminated_cluster,
+ use_sakot_terminated_cluster,
+ use_standard_cluster,
+ use_number_joiner_terminated_cluster,
+ use_numeral_cluster,
+ use_symbol_cluster,
+ use_hieroglyph_cluster,
+ use_broken_cluster,
+ use_non_cluster,
};
-#line 57 "hb-ot-shape-complex-use-machine.hh"
+#line 58 "hb-ot-shape-complex-use-machine.hh"
#define use_syllable_machine_ex_B 1u
#define use_syllable_machine_ex_CMAbv 31u
#define use_syllable_machine_ex_CMBlw 32u
@@ -95,254 +96,266 @@ enum use_syllable_type_t {
#define use_syllable_machine_ex_ZWNJ 14u
-#line 99 "hb-ot-shape-complex-use-machine.hh"
+#line 100 "hb-ot-shape-complex-use-machine.hh"
static const unsigned char _use_syllable_machine_trans_keys[] = {
- 1u, 1u, 1u, 1u, 0u, 37u, 5u, 34u,
- 5u, 34u, 1u, 1u, 10u, 34u, 11u, 34u,
- 12u, 33u, 13u, 33u, 14u, 33u, 31u, 32u,
- 32u, 32u, 12u, 34u, 12u, 34u, 12u, 34u,
- 1u, 1u, 12u, 34u, 11u, 34u, 11u, 34u,
- 11u, 34u, 10u, 34u, 10u, 34u, 10u, 34u,
- 5u, 34u, 1u, 34u, 7u, 7u, 3u, 3u,
- 5u, 34u, 27u, 28u, 28u, 28u, 5u, 34u,
- 10u, 34u, 11u, 34u, 12u, 33u, 13u, 33u,
- 14u, 33u, 31u, 32u, 32u, 32u, 12u, 34u,
- 12u, 34u, 12u, 34u, 12u, 34u, 11u, 34u,
- 11u, 34u, 11u, 34u, 10u, 34u, 10u, 34u,
- 10u, 34u, 5u, 34u, 1u, 34u, 1u, 1u,
- 3u, 3u, 7u, 7u, 1u, 34u, 5u, 34u,
- 27u, 28u, 28u, 28u, 1u, 4u, 36u, 38u,
- 35u, 38u, 35u, 37u, 0u
+ 1u, 1u, 1u, 1u, 0u, 51u, 11u, 48u, 11u, 48u, 1u, 1u, 22u, 48u, 23u, 48u,
+ 24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u, 24u, 48u, 24u, 48u,
+ 1u, 1u, 24u, 48u, 23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, 22u, 48u, 22u, 48u,
+ 11u, 48u, 1u, 48u, 13u, 13u, 4u, 4u, 11u, 48u, 41u, 42u, 42u, 42u, 11u, 48u,
+ 22u, 48u, 23u, 48u, 24u, 47u, 25u, 47u, 26u, 47u, 45u, 46u, 46u, 46u, 24u, 48u,
+ 24u, 48u, 24u, 48u, 24u, 48u, 23u, 48u, 23u, 48u, 23u, 48u, 22u, 48u, 22u, 48u,
+ 22u, 48u, 11u, 48u, 1u, 48u, 1u, 1u, 4u, 4u, 13u, 13u, 1u, 48u, 11u, 48u,
+ 41u, 42u, 42u, 42u, 1u, 5u, 50u, 52u, 49u, 52u, 49u, 51u, 0
};
-static const signed char _use_syllable_machine_char_class[] = {
- 0, 1, 2, 2, 3, 4, 2, 2,
- 2, 2, 2, 5, 6, 7, 2, 2,
- 2, 2, 8, 9, 2, 2, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 2, 24, 25, 26,
- 2, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 0
+static const char _use_syllable_machine_key_spans[] = {
+ 1, 1, 52, 38, 38, 1, 27, 26,
+ 24, 23, 22, 2, 1, 25, 25, 25,
+ 1, 25, 26, 26, 26, 27, 27, 27,
+ 38, 48, 1, 1, 38, 2, 1, 38,
+ 27, 26, 24, 23, 22, 2, 1, 25,
+ 25, 25, 25, 26, 26, 26, 27, 27,
+ 27, 38, 48, 1, 1, 1, 48, 38,
+ 2, 1, 5, 3, 4, 3
};
static const short _use_syllable_machine_index_offsets[] = {
- 0, 1, 2, 40, 70, 100, 101, 126,
- 150, 172, 193, 213, 215, 216, 239, 262,
- 285, 286, 309, 333, 357, 381, 406, 431,
- 456, 486, 520, 521, 522, 552, 554, 555,
- 585, 610, 634, 656, 677, 697, 699, 700,
- 723, 746, 769, 792, 816, 840, 864, 889,
- 914, 939, 969, 1003, 1004, 1005, 1006, 1040,
- 1070, 1072, 1073, 1077, 1080, 1084, 0
-};
-
-static const signed char _use_syllable_machine_indicies[] = {
- 1, 2, 4, 5, 6, 7, 8, 1,
- 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 13, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 9, 36, 6, 37,
- 39, 40, 38, 38, 38, 41, 42, 43,
- 44, 45, 46, 47, 41, 48, 5, 49,
- 50, 51, 52, 53, 54, 55, 38, 38,
- 38, 56, 57, 58, 59, 40, 39, 40,
- 38, 38, 38, 41, 42, 43, 44, 45,
- 46, 47, 41, 48, 49, 49, 50, 51,
- 52, 53, 54, 55, 38, 38, 38, 56,
- 57, 58, 59, 40, 39, 41, 42, 43,
- 44, 45, 38, 38, 38, 38, 38, 38,
- 50, 51, 52, 53, 54, 55, 38, 38,
- 38, 42, 57, 58, 59, 61, 42, 43,
- 44, 45, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 53, 54, 55, 38, 38,
- 38, 38, 57, 58, 59, 61, 43, 44,
- 45, 38, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 38, 38, 38, 38,
- 38, 57, 58, 59, 44, 45, 38, 38,
- 38, 38, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 38, 38, 57, 58,
- 59, 45, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 38, 38, 38, 38,
- 38, 38, 57, 58, 59, 57, 58, 58,
- 43, 44, 45, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 53, 54, 55, 38,
- 38, 38, 38, 57, 58, 59, 61, 43,
- 44, 45, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 54, 55, 38, 38,
- 38, 38, 57, 58, 59, 61, 43, 44,
- 45, 38, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 55, 38, 38, 38,
- 38, 57, 58, 59, 61, 63, 43, 44,
- 45, 38, 38, 38, 38, 38, 38, 38,
- 38, 38, 38, 38, 38, 38, 38, 38,
- 38, 57, 58, 59, 61, 42, 43, 44,
- 45, 38, 38, 38, 38, 38, 38, 50,
- 51, 52, 53, 54, 55, 38, 38, 38,
- 42, 57, 58, 59, 61, 42, 43, 44,
- 45, 38, 38, 38, 38, 38, 38, 38,
- 51, 52, 53, 54, 55, 38, 38, 38,
- 42, 57, 58, 59, 61, 42, 43, 44,
- 45, 38, 38, 38, 38, 38, 38, 38,
- 38, 52, 53, 54, 55, 38, 38, 38,
- 42, 57, 58, 59, 61, 41, 42, 43,
- 44, 45, 38, 47, 41, 38, 38, 38,
- 50, 51, 52, 53, 54, 55, 38, 38,
- 38, 42, 57, 58, 59, 61, 41, 42,
- 43, 44, 45, 38, 38, 41, 38, 38,
- 38, 50, 51, 52, 53, 54, 55, 38,
- 38, 38, 42, 57, 58, 59, 61, 41,
- 42, 43, 44, 45, 46, 47, 41, 38,
- 38, 38, 50, 51, 52, 53, 54, 55,
- 38, 38, 38, 42, 57, 58, 59, 61,
- 39, 40, 38, 38, 38, 41, 42, 43,
- 44, 45, 46, 47, 41, 48, 38, 49,
- 50, 51, 52, 53, 54, 55, 38, 38,
- 38, 56, 57, 58, 59, 40, 39, 60,
- 60, 60, 60, 60, 60, 60, 60, 60,
- 42, 43, 44, 45, 60, 60, 60, 60,
- 60, 60, 60, 60, 60, 53, 54, 55,
- 60, 60, 60, 60, 57, 58, 59, 61,
- 65, 7, 39, 40, 38, 38, 38, 41,
- 42, 43, 44, 45, 46, 47, 41, 48,
- 5, 49, 50, 51, 52, 53, 54, 55,
- 12, 67, 38, 56, 57, 58, 59, 40,
- 12, 67, 67, 1, 70, 69, 69, 69,
- 13, 14, 15, 16, 17, 18, 19, 13,
- 20, 22, 22, 23, 24, 25, 26, 27,
- 28, 69, 69, 69, 32, 33, 34, 35,
- 70, 13, 14, 15, 16, 17, 69, 69,
- 69, 69, 69, 69, 23, 24, 25, 26,
- 27, 28, 69, 69, 69, 14, 33, 34,
- 35, 71, 14, 15, 16, 17, 69, 69,
- 69, 69, 69, 69, 69, 69, 69, 26,
- 27, 28, 69, 69, 69, 69, 33, 34,
- 35, 71, 15, 16, 17, 69, 69, 69,
- 69, 69, 69, 69, 69, 69, 69, 69,
- 69, 69, 69, 69, 69, 33, 34, 35,
- 16, 17, 69, 69, 69, 69, 69, 69,
- 69, 69, 69, 69, 69, 69, 69, 69,
- 69, 69, 33, 34, 35, 17, 69, 69,
- 69, 69, 69, 69, 69, 69, 69, 69,
- 69, 69, 69, 69, 69, 69, 33, 34,
- 35, 33, 34, 34, 15, 16, 17, 69,
- 69, 69, 69, 69, 69, 69, 69, 69,
- 26, 27, 28, 69, 69, 69, 69, 33,
- 34, 35, 71, 15, 16, 17, 69, 69,
- 69, 69, 69, 69, 69, 69, 69, 69,
- 27, 28, 69, 69, 69, 69, 33, 34,
- 35, 71, 15, 16, 17, 69, 69, 69,
- 69, 69, 69, 69, 69, 69, 69, 69,
- 28, 69, 69, 69, 69, 33, 34, 35,
- 71, 15, 16, 17, 69, 69, 69, 69,
- 69, 69, 69, 69, 69, 69, 69, 69,
- 69, 69, 69, 69, 33, 34, 35, 71,
- 14, 15, 16, 17, 69, 69, 69, 69,
- 69, 69, 23, 24, 25, 26, 27, 28,
- 69, 69, 69, 14, 33, 34, 35, 71,
- 14, 15, 16, 17, 69, 69, 69, 69,
- 69, 69, 69, 24, 25, 26, 27, 28,
- 69, 69, 69, 14, 33, 34, 35, 71,
- 14, 15, 16, 17, 69, 69, 69, 69,
- 69, 69, 69, 69, 25, 26, 27, 28,
- 69, 69, 69, 14, 33, 34, 35, 71,
- 13, 14, 15, 16, 17, 69, 19, 13,
- 69, 69, 69, 23, 24, 25, 26, 27,
- 28, 69, 69, 69, 14, 33, 34, 35,
- 71, 13, 14, 15, 16, 17, 69, 69,
- 13, 69, 69, 69, 23, 24, 25, 26,
- 27, 28, 69, 69, 69, 14, 33, 34,
- 35, 71, 13, 14, 15, 16, 17, 18,
- 19, 13, 69, 69, 69, 23, 24, 25,
- 26, 27, 28, 69, 69, 69, 14, 33,
- 34, 35, 71, 1, 70, 69, 69, 69,
- 13, 14, 15, 16, 17, 18, 19, 13,
- 20, 69, 22, 23, 24, 25, 26, 27,
- 28, 69, 69, 69, 32, 33, 34, 35,
- 70, 1, 69, 69, 69, 69, 69, 69,
- 69, 69, 69, 14, 15, 16, 17, 69,
- 69, 69, 69, 69, 69, 69, 69, 69,
- 26, 27, 28, 69, 69, 69, 69, 33,
- 34, 35, 71, 1, 73, 10, 5, 69,
- 69, 5, 1, 70, 10, 69, 69, 13,
- 14, 15, 16, 17, 18, 19, 13, 20,
- 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 69, 32, 33, 34, 35, 70,
- 1, 70, 69, 69, 69, 13, 14, 15,
- 16, 17, 18, 19, 13, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 69, 69,
- 69, 32, 33, 34, 35, 70, 29, 30,
- 30, 5, 72, 72, 5, 75, 74, 36,
- 36, 75, 74, 75, 36, 74, 37, 0
+ 0, 2, 4, 57, 96, 135, 137, 165,
+ 192, 217, 241, 264, 267, 269, 295, 321,
+ 347, 349, 375, 402, 429, 456, 484, 512,
+ 540, 579, 628, 630, 632, 671, 674, 676,
+ 715, 743, 770, 795, 819, 842, 845, 847,
+ 873, 899, 925, 951, 978, 1005, 1032, 1060,
+ 1088, 1116, 1155, 1204, 1206, 1208, 1210, 1259,
+ 1298, 1301, 1303, 1309, 1313, 1318
};
-static const signed char _use_syllable_machine_index_defaults[] = {
- 0, 0, 6, 38, 38, 60, 38, 38,
- 38, 38, 38, 38, 38, 38, 38, 38,
- 62, 38, 38, 38, 38, 38, 38, 38,
- 38, 60, 64, 66, 38, 68, 68, 69,
- 69, 69, 69, 69, 69, 69, 69, 69,
- 69, 69, 69, 69, 69, 69, 69, 69,
- 69, 69, 69, 72, 69, 69, 69, 69,
- 69, 69, 72, 74, 74, 74, 0
+static const char _use_syllable_machine_indicies[] = {
+ 1, 0, 2, 0, 3, 4, 5, 5,
+ 6, 7, 5, 5, 5, 5, 5, 1,
+ 8, 9, 5, 5, 5, 5, 10, 11,
+ 5, 5, 12, 13, 14, 15, 16, 17,
+ 18, 12, 19, 20, 21, 22, 23, 24,
+ 5, 25, 26, 27, 5, 28, 29, 30,
+ 31, 32, 33, 34, 8, 35, 5, 36,
+ 5, 38, 39, 37, 37, 37, 37, 37,
+ 37, 37, 37, 37, 40, 41, 42, 43,
+ 44, 45, 46, 40, 47, 4, 48, 49,
+ 50, 51, 37, 52, 53, 54, 37, 37,
+ 37, 37, 55, 56, 57, 58, 39, 37,
+ 38, 39, 37, 37, 37, 37, 37, 37,
+ 37, 37, 37, 40, 41, 42, 43, 44,
+ 45, 46, 40, 47, 48, 48, 49, 50,
+ 51, 37, 52, 53, 54, 37, 37, 37,
+ 37, 55, 56, 57, 58, 39, 37, 38,
+ 59, 40, 41, 42, 43, 44, 37, 37,
+ 37, 37, 37, 37, 49, 50, 51, 37,
+ 52, 53, 54, 37, 37, 37, 37, 41,
+ 56, 57, 58, 60, 37, 41, 42, 43,
+ 44, 37, 37, 37, 37, 37, 37, 37,
+ 37, 37, 37, 52, 53, 54, 37, 37,
+ 37, 37, 37, 56, 57, 58, 60, 37,
+ 42, 43, 44, 37, 37, 37, 37, 37,
+ 37, 37, 37, 37, 37, 37, 37, 37,
+ 37, 37, 37, 37, 37, 56, 57, 58,
+ 37, 43, 44, 37, 37, 37, 37, 37,
+ 37, 37, 37, 37, 37, 37, 37, 37,
+ 37, 37, 37, 37, 37, 56, 57, 58,
+ 37, 44, 37, 37, 37, 37, 37, 37,
+ 37, 37, 37, 37, 37, 37, 37, 37,
+ 37, 37, 37, 37, 56, 57, 58, 37,
+ 56, 57, 37, 57, 37, 42, 43, 44,
+ 37, 37, 37, 37, 37, 37, 37, 37,
+ 37, 37, 52, 53, 54, 37, 37, 37,
+ 37, 37, 56, 57, 58, 60, 37, 42,
+ 43, 44, 37, 37, 37, 37, 37, 37,
+ 37, 37, 37, 37, 37, 53, 54, 37,
+ 37, 37, 37, 37, 56, 57, 58, 60,
+ 37, 42, 43, 44, 37, 37, 37, 37,
+ 37, 37, 37, 37, 37, 37, 37, 37,
+ 54, 37, 37, 37, 37, 37, 56, 57,
+ 58, 60, 37, 62, 61, 42, 43, 44,
+ 37, 37, 37, 37, 37, 37, 37, 37,
+ 37, 37, 37, 37, 37, 37, 37, 37,
+ 37, 37, 56, 57, 58, 60, 37, 41,
+ 42, 43, 44, 37, 37, 37, 37, 37,
+ 37, 49, 50, 51, 37, 52, 53, 54,
+ 37, 37, 37, 37, 41, 56, 57, 58,
+ 60, 37, 41, 42, 43, 44, 37, 37,
+ 37, 37, 37, 37, 37, 50, 51, 37,
+ 52, 53, 54, 37, 37, 37, 37, 41,
+ 56, 57, 58, 60, 37, 41, 42, 43,
+ 44, 37, 37, 37, 37, 37, 37, 37,
+ 37, 51, 37, 52, 53, 54, 37, 37,
+ 37, 37, 41, 56, 57, 58, 60, 37,
+ 40, 41, 42, 43, 44, 37, 46, 40,
+ 37, 37, 37, 49, 50, 51, 37, 52,
+ 53, 54, 37, 37, 37, 37, 41, 56,
+ 57, 58, 60, 37, 40, 41, 42, 43,
+ 44, 37, 37, 40, 37, 37, 37, 49,
+ 50, 51, 37, 52, 53, 54, 37, 37,
+ 37, 37, 41, 56, 57, 58, 60, 37,
+ 40, 41, 42, 43, 44, 45, 46, 40,
+ 37, 37, 37, 49, 50, 51, 37, 52,
+ 53, 54, 37, 37, 37, 37, 41, 56,
+ 57, 58, 60, 37, 38, 39, 37, 37,
+ 37, 37, 37, 37, 37, 37, 37, 40,
+ 41, 42, 43, 44, 45, 46, 40, 47,
+ 37, 48, 49, 50, 51, 37, 52, 53,
+ 54, 37, 37, 37, 37, 55, 56, 57,
+ 58, 39, 37, 38, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 41, 42, 43, 44, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 52,
+ 53, 54, 59, 59, 59, 59, 59, 56,
+ 57, 58, 60, 59, 64, 63, 6, 65,
+ 38, 39, 37, 37, 37, 37, 37, 37,
+ 37, 37, 37, 40, 41, 42, 43, 44,
+ 45, 46, 40, 47, 4, 48, 49, 50,
+ 51, 37, 52, 53, 54, 37, 11, 66,
+ 37, 55, 56, 57, 58, 39, 37, 11,
+ 66, 67, 66, 67, 1, 69, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 12,
+ 13, 14, 15, 16, 17, 18, 12, 19,
+ 21, 21, 22, 23, 24, 68, 25, 26,
+ 27, 68, 68, 68, 68, 31, 32, 33,
+ 34, 69, 68, 12, 13, 14, 15, 16,
+ 68, 68, 68, 68, 68, 68, 22, 23,
+ 24, 68, 25, 26, 27, 68, 68, 68,
+ 68, 13, 32, 33, 34, 70, 68, 13,
+ 14, 15, 16, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 25, 26, 27,
+ 68, 68, 68, 68, 68, 32, 33, 34,
+ 70, 68, 14, 15, 16, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 32,
+ 33, 34, 68, 15, 16, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 32,
+ 33, 34, 68, 16, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 32, 33,
+ 34, 68, 32, 33, 68, 33, 68, 14,
+ 15, 16, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 25, 26, 27, 68,
+ 68, 68, 68, 68, 32, 33, 34, 70,
+ 68, 14, 15, 16, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 26,
+ 27, 68, 68, 68, 68, 68, 32, 33,
+ 34, 70, 68, 14, 15, 16, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 27, 68, 68, 68, 68, 68,
+ 32, 33, 34, 70, 68, 14, 15, 16,
+ 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 32, 33, 34, 70, 68, 13,
+ 14, 15, 16, 68, 68, 68, 68, 68,
+ 68, 22, 23, 24, 68, 25, 26, 27,
+ 68, 68, 68, 68, 13, 32, 33, 34,
+ 70, 68, 13, 14, 15, 16, 68, 68,
+ 68, 68, 68, 68, 68, 23, 24, 68,
+ 25, 26, 27, 68, 68, 68, 68, 13,
+ 32, 33, 34, 70, 68, 13, 14, 15,
+ 16, 68, 68, 68, 68, 68, 68, 68,
+ 68, 24, 68, 25, 26, 27, 68, 68,
+ 68, 68, 13, 32, 33, 34, 70, 68,
+ 12, 13, 14, 15, 16, 68, 18, 12,
+ 68, 68, 68, 22, 23, 24, 68, 25,
+ 26, 27, 68, 68, 68, 68, 13, 32,
+ 33, 34, 70, 68, 12, 13, 14, 15,
+ 16, 68, 68, 12, 68, 68, 68, 22,
+ 23, 24, 68, 25, 26, 27, 68, 68,
+ 68, 68, 13, 32, 33, 34, 70, 68,
+ 12, 13, 14, 15, 16, 17, 18, 12,
+ 68, 68, 68, 22, 23, 24, 68, 25,
+ 26, 27, 68, 68, 68, 68, 13, 32,
+ 33, 34, 70, 68, 1, 69, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 12,
+ 13, 14, 15, 16, 17, 18, 12, 19,
+ 68, 21, 22, 23, 24, 68, 25, 26,
+ 27, 68, 68, 68, 68, 31, 32, 33,
+ 34, 69, 68, 1, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 13, 14, 15, 16, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 25,
+ 26, 27, 68, 68, 68, 68, 68, 32,
+ 33, 34, 70, 68, 1, 71, 72, 68,
+ 9, 68, 4, 68, 68, 68, 4, 68,
+ 68, 68, 68, 68, 1, 69, 9, 68,
+ 68, 68, 68, 68, 68, 68, 68, 12,
+ 13, 14, 15, 16, 17, 18, 12, 19,
+ 20, 21, 22, 23, 24, 68, 25, 26,
+ 27, 68, 28, 29, 68, 31, 32, 33,
+ 34, 69, 68, 1, 69, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 12, 13,
+ 14, 15, 16, 17, 18, 12, 19, 20,
+ 21, 22, 23, 24, 68, 25, 26, 27,
+ 68, 68, 68, 68, 31, 32, 33, 34,
+ 69, 68, 28, 29, 68, 29, 68, 4,
+ 71, 71, 71, 4, 71, 74, 73, 35,
+ 73, 35, 74, 73, 74, 73, 35, 73,
+ 36, 73, 0
};
-static const signed char _use_syllable_machine_cond_targs[] = {
- 2, 31, 42, 2, 2, 3, 2, 26,
- 28, 51, 52, 54, 29, 32, 33, 34,
- 35, 36, 46, 47, 48, 55, 49, 43,
- 44, 45, 39, 40, 41, 56, 57, 58,
- 50, 37, 38, 2, 59, 61, 2, 4,
- 5, 6, 7, 8, 9, 10, 21, 22,
- 23, 24, 18, 19, 20, 13, 14, 15,
- 25, 11, 12, 2, 2, 16, 2, 17,
- 2, 27, 2, 30, 2, 2, 0, 1,
- 2, 53, 2, 60, 0
+static const char _use_syllable_machine_trans_targs[] = {
+ 2, 31, 42, 2, 3, 2, 26, 28,
+ 51, 52, 54, 29, 32, 33, 34, 35,
+ 36, 46, 47, 48, 55, 49, 43, 44,
+ 45, 39, 40, 41, 56, 57, 58, 50,
+ 37, 38, 2, 59, 61, 2, 4, 5,
+ 6, 7, 8, 9, 10, 21, 22, 23,
+ 24, 18, 19, 20, 13, 14, 15, 25,
+ 11, 12, 2, 2, 16, 2, 17, 2,
+ 27, 2, 30, 2, 2, 0, 1, 2,
+ 53, 2, 60
};
-static const signed char _use_syllable_machine_cond_actions[] = {
- 1, 2, 2, 0, 5, 0, 6, 0,
- 0, 0, 0, 2, 0, 2, 2, 0,
- 0, 0, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 0, 0, 0,
- 2, 0, 0, 7, 0, 0, 8, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 9, 10, 0, 11, 0,
- 12, 0, 13, 0, 14, 15, 0, 0,
- 16, 0, 17, 0, 0
+static const char _use_syllable_machine_trans_actions[] = {
+ 1, 2, 2, 5, 0, 6, 0, 0,
+ 0, 0, 2, 0, 2, 2, 0, 0,
+ 0, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 0, 0, 0, 2,
+ 0, 0, 7, 0, 0, 8, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 9, 10, 0, 11, 0, 12,
+ 0, 13, 0, 14, 15, 0, 0, 16,
+ 0, 17, 0
};
-static const signed char _use_syllable_machine_to_state_actions[] = {
- 0, 0, 3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0
+static const char _use_syllable_machine_to_state_actions[] = {
+ 0, 0, 3, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0
};
-static const signed char _use_syllable_machine_from_state_actions[] = {
- 0, 0, 4, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0
+static const char _use_syllable_machine_from_state_actions[] = {
+ 0, 0, 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0
};
-static const signed char _use_syllable_machine_eof_trans[] = {
- 1, 1, 4, 39, 39, 61, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39,
- 63, 39, 39, 39, 39, 39, 39, 39,
- 39, 61, 65, 67, 39, 69, 69, 70,
- 70, 70, 70, 70, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70,
- 70, 70, 70, 73, 70, 70, 70, 70,
- 70, 70, 73, 75, 75, 75, 0
+static const short _use_syllable_machine_eof_trans[] = {
+ 1, 1, 0, 38, 38, 60, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38,
+ 62, 38, 38, 38, 38, 38, 38, 38,
+ 38, 60, 64, 66, 38, 68, 68, 69,
+ 69, 69, 69, 69, 69, 69, 69, 69,
+ 69, 69, 69, 69, 69, 69, 69, 69,
+ 69, 69, 69, 72, 69, 69, 69, 69,
+ 69, 69, 72, 74, 74, 74
};
static const int use_syllable_machine_start = 2;
@@ -360,49 +373,49 @@ static const int use_syllable_machine_en_main = 2;
#define found_syllable(syllable_type) \
-HB_STMT_START { \
- if (0) fprintf (stderr, "syllable %d..%d %s\n", (*ts).second.first, (*te).second.first, #syllable_type); \
- for (unsigned i = (*ts).second.first; i < (*te).second.first; ++i) \
- info[i].syllable() = (syllable_serial << 4) | syllable_type; \
- syllable_serial++; \
- if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
- } HB_STMT_END
+ HB_STMT_START { \
+ if (0) fprintf (stderr, "syllable %d..%d %s\n", (*ts).second.first, (*te).second.first, #syllable_type); \
+ for (unsigned i = (*ts).second.first; i < (*te).second.first; ++i) \
+ info[i].syllable() = (syllable_serial << 4) | syllable_type; \
+ syllable_serial++; \
+ if (unlikely (syllable_serial == 16)) syllable_serial = 1; \
+ } HB_STMT_END
template <typename Iter>
struct machine_index_t :
-hb_iter_with_fallback_t<machine_index_t<Iter>,
-typename Iter::item_t>
+ hb_iter_with_fallback_t<machine_index_t<Iter>,
+ typename Iter::item_t>
{
- machine_index_t (const Iter& it) : it (it) {}
- machine_index_t (const machine_index_t& o) : it (o.it) {}
-
- static constexpr bool is_random_access_iterator = Iter::is_random_access_iterator;
- static constexpr bool is_sorted_iterator = Iter::is_sorted_iterator;
-
- typename Iter::item_t __item__ () const { return *it; }
- typename Iter::item_t __item_at__ (unsigned i) const { return it[i]; }
- unsigned __len__ () const { return it.len (); }
- void __next__ () { ++it; }
- void __forward__ (unsigned n) { it += n; }
- void __prev__ () { --it; }
- void __rewind__ (unsigned n) { it -= n; }
- void operator = (unsigned n)
- { unsigned index = (*it).first; if (index < n) it += n - index; else if (index > n) it -= index - n; }
- void operator = (const machine_index_t& o) { *this = (*o.it).first; }
- bool operator == (const machine_index_t& o) const { return (*it).first == (*o.it).first; }
- bool operator != (const machine_index_t& o) const { return !(*this == o); }
-
- private:
- Iter it;
+ machine_index_t (const Iter& it) : it (it) {}
+ machine_index_t (const machine_index_t& o) : it (o.it) {}
+
+ static constexpr bool is_random_access_iterator = Iter::is_random_access_iterator;
+ static constexpr bool is_sorted_iterator = Iter::is_sorted_iterator;
+
+ typename Iter::item_t __item__ () const { return *it; }
+ typename Iter::item_t __item_at__ (unsigned i) const { return it[i]; }
+ unsigned __len__ () const { return it.len (); }
+ void __next__ () { ++it; }
+ void __forward__ (unsigned n) { it += n; }
+ void __prev__ () { --it; }
+ void __rewind__ (unsigned n) { it -= n; }
+ void operator = (unsigned n)
+ { unsigned index = (*it).first; if (index < n) it += n - index; else if (index > n) it -= index - n; }
+ void operator = (const machine_index_t& o) { *this = (*o.it).first; }
+ bool operator == (const machine_index_t& o) const { return (*it).first == (*o.it).first; }
+ bool operator != (const machine_index_t& o) const { return !(*this == o); }
+
+ private:
+ Iter it;
};
struct
{
- template <typename Iter,
- hb_requires (hb_is_iterable (Iter))>
- machine_index_t<hb_iter_type<Iter>>
- operator () (Iter&& it) const
- { return machine_index_t<hb_iter_type<Iter>> (hb_iter (it)); }
+ template <typename Iter,
+ hb_requires (hb_is_iterable (Iter))>
+ machine_index_t<hb_iter_type<Iter>>
+ operator () (Iter&& it) const
+ { return machine_index_t<hb_iter_type<Iter>> (hb_iter (it)); }
}
HB_FUNCOBJ (machine_index);
@@ -415,313 +428,162 @@ not_standard_default_ignorable (const hb_glyph_info_t &i)
static inline void
find_syllables_use (hb_buffer_t *buffer)
{
- hb_glyph_info_t *info = buffer->info;
- auto p =
- + hb_iter (info, buffer->len)
- | hb_enumerate
- | hb_filter ([] (const hb_glyph_info_t &i) { return not_standard_default_ignorable (i); },
- hb_second)
- | hb_filter ([&] (const hb_pair_t<unsigned, const hb_glyph_info_t &> p)
+ hb_glyph_info_t *info = buffer->info;
+ auto p =
+ + hb_iter (info, buffer->len)
+ | hb_enumerate
+ | hb_filter ([] (const hb_glyph_info_t &i) { return not_standard_default_ignorable (i); },
+ hb_second)
+ | hb_filter ([&] (const hb_pair_t<unsigned, const hb_glyph_info_t &> p)
+ {
+ if (p.second.use_category() == USE(ZWNJ))
+ for (unsigned i = p.first + 1; i < buffer->len; ++i)
+ if (not_standard_default_ignorable (info[i]))
+ return !_hb_glyph_info_is_unicode_mark (&info[i]);
+ return true;
+ })
+ | hb_enumerate
+ | machine_index
+ ;
+ auto pe = p + p.len ();
+ auto eof = +pe;
+ auto ts = +p;
+ auto te = +p;
+ unsigned int act HB_UNUSED;
+ int cs;
+
+#line 456 "hb-ot-shape-complex-use-machine.hh"
{
- if (p.second.use_category() == USE(ZWNJ))
- for (unsigned i = p.first + 1; i < buffer->len; ++i)
- if (not_standard_default_ignorable (info[i]))
- return !_hb_glyph_info_is_unicode_mark (&info[i]);
- return true;
- })
- | hb_enumerate
- | machine_index
- ;
- auto pe = p + p.len ();
- auto eof = +pe;
- auto ts = +p;
- auto te = +p;
- unsigned int act HB_UNUSED;
- int cs;
-
-#line 443 "hb-ot-shape-complex-use-machine.hh"
- {
- cs = (int)use_syllable_machine_start;
- ts = 0;
- te = 0;
+ cs = use_syllable_machine_start;
+ ts = 0;
+ te = 0;
+ act = 0;
}
-
+
#line 260 "hb-ot-shape-complex-use-machine.rl"
-
-
- unsigned int syllable_serial = 1;
-
-#line 455 "hb-ot-shape-complex-use-machine.hh"
+
+
+ unsigned int syllable_serial = 1;
+
+#line 469 "hb-ot-shape-complex-use-machine.hh"
{
- unsigned int _trans = 0;
- const unsigned char * _keys;
- const signed char * _inds;
- int _ic;
- _resume: {}
- if ( p == pe && p != eof )
- goto _out;
- switch ( _use_syllable_machine_from_state_actions[cs] ) {
- case 4: {
- {
+ int _slen;
+ int _trans;
+ const unsigned char *_keys;
+ const char *_inds;
+ if ( p == pe )
+ goto _test_eof;
+_resume:
+ switch ( _use_syllable_machine_from_state_actions[cs] ) {
+ case 4:
#line 1 "NONE"
- {ts = p;}}
-
-#line 470 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- }
-
- if ( p == eof ) {
- if ( _use_syllable_machine_eof_trans[cs] > 0 ) {
- _trans = (unsigned int)_use_syllable_machine_eof_trans[cs] - 1;
- }
- }
- else {
- _keys = ( _use_syllable_machine_trans_keys + ((cs<<1)));
- _inds = ( _use_syllable_machine_indicies + (_use_syllable_machine_index_offsets[cs]));
-
- if ( ((*p).second.second.use_category()) <= 52 ) {
- _ic = (int)_use_syllable_machine_char_class[(int)((*p).second.second.use_category()) - 0];
- if ( _ic <= (int)(*( _keys+1)) && _ic >= (int)(*( _keys)) )
- _trans = (unsigned int)(*( _inds + (int)( _ic - (int)(*( _keys)) ) ));
- else
- _trans = (unsigned int)_use_syllable_machine_index_defaults[cs];
- }
- else {
- _trans = (unsigned int)_use_syllable_machine_index_defaults[cs];
- }
-
- }
- cs = (int)_use_syllable_machine_cond_targs[_trans];
-
- if ( _use_syllable_machine_cond_actions[_trans] != 0 ) {
-
- switch ( _use_syllable_machine_cond_actions[_trans] ) {
- case 2: {
- {
+ {ts = p;}
+ break;
+#line 483 "hb-ot-shape-complex-use-machine.hh"
+ }
+
+ _keys = _use_syllable_machine_trans_keys + (cs<<1);
+ _inds = _use_syllable_machine_indicies + _use_syllable_machine_index_offsets[cs];
+
+ _slen = _use_syllable_machine_key_spans[cs];
+ _trans = _inds[ _slen > 0 && _keys[0] <=( (*p).second.second.use_category()) &&
+ ( (*p).second.second.use_category()) <= _keys[1] ?
+ ( (*p).second.second.use_category()) - _keys[0] : _slen ];
+
+_eof_trans:
+ cs = _use_syllable_machine_trans_targs[_trans];
+
+ if ( _use_syllable_machine_trans_actions[_trans] == 0 )
+ goto _again;
+
+ switch ( _use_syllable_machine_trans_actions[_trans] ) {
+ case 2:
#line 1 "NONE"
- {te = p+1;}}
-
-#line 508 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 5: {
- {
+ {te = p+1;}
+ break;
+ case 5:
#line 163 "hb-ot-shape-complex-use-machine.rl"
- {te = p+1;{
-#line 163 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_independent_cluster); }
- }}
-
-#line 521 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 9: {
- {
-#line 166 "hb-ot-shape-complex-use-machine.rl"
- {te = p+1;{
+ {te = p+1;{ found_syllable (use_independent_cluster); }}
+ break;
+ case 9:
#line 166 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_standard_cluster); }
- }}
-
-#line 534 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 7: {
- {
+ {te = p+1;{ found_syllable (use_standard_cluster); }}
+ break;
+ case 7:
#line 171 "hb-ot-shape-complex-use-machine.rl"
- {te = p+1;{
-#line 171 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_broken_cluster); }
- }}
-
-#line 547 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 6: {
- {
-#line 172 "hb-ot-shape-complex-use-machine.rl"
- {te = p+1;{
+ {te = p+1;{ found_syllable (use_broken_cluster); }}
+ break;
+ case 6:
#line 172 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_non_cluster); }
- }}
-
-#line 560 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 10: {
- {
+ {te = p+1;{ found_syllable (use_non_cluster); }}
+ break;
+ case 10:
#line 164 "hb-ot-shape-complex-use-machine.rl"
- {te = p;p = p - 1;{
-#line 164 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_virama_terminated_cluster); }
- }}
-
-#line 573 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 11: {
- {
-#line 165 "hb-ot-shape-complex-use-machine.rl"
- {te = p;p = p - 1;{
+ {te = p;p--;{ found_syllable (use_virama_terminated_cluster); }}
+ break;
+ case 11:
#line 165 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_sakot_terminated_cluster); }
- }}
-
-#line 586 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 8: {
- {
+ {te = p;p--;{ found_syllable (use_sakot_terminated_cluster); }}
+ break;
+ case 8:
#line 166 "hb-ot-shape-complex-use-machine.rl"
- {te = p;p = p - 1;{
-#line 166 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_standard_cluster); }
- }}
-
-#line 599 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 13: {
- {
-#line 167 "hb-ot-shape-complex-use-machine.rl"
- {te = p;p = p - 1;{
+ {te = p;p--;{ found_syllable (use_standard_cluster); }}
+ break;
+ case 13:
#line 167 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_number_joiner_terminated_cluster); }
- }}
-
-#line 612 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 12: {
- {
-#line 168 "hb-ot-shape-complex-use-machine.rl"
- {te = p;p = p - 1;{
+ {te = p;p--;{ found_syllable (use_number_joiner_terminated_cluster); }}
+ break;
+ case 12:
#line 168 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_numeral_cluster); }
- }}
-
-#line 625 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 14: {
- {
+ {te = p;p--;{ found_syllable (use_numeral_cluster); }}
+ break;
+ case 14:
#line 169 "hb-ot-shape-complex-use-machine.rl"
- {te = p;p = p - 1;{
-#line 169 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_symbol_cluster); }
- }}
-
-#line 638 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 17: {
- {
-#line 170 "hb-ot-shape-complex-use-machine.rl"
- {te = p;p = p - 1;{
+ {te = p;p--;{ found_syllable (use_symbol_cluster); }}
+ break;
+ case 17:
#line 170 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_hieroglyph_cluster); }
- }}
-
-#line 651 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 15: {
- {
+ {te = p;p--;{ found_syllable (use_hieroglyph_cluster); }}
+ break;
+ case 15:
#line 171 "hb-ot-shape-complex-use-machine.rl"
- {te = p;p = p - 1;{
-#line 171 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_broken_cluster); }
- }}
-
-#line 664 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 16: {
- {
-#line 172 "hb-ot-shape-complex-use-machine.rl"
- {te = p;p = p - 1;{
+ {te = p;p--;{ found_syllable (use_broken_cluster); }}
+ break;
+ case 16:
#line 172 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_non_cluster); }
- }}
-
-#line 677 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- case 1: {
- {
+ {te = p;p--;{ found_syllable (use_non_cluster); }}
+ break;
+ case 1:
#line 171 "hb-ot-shape-complex-use-machine.rl"
- {p = ((te))-1;
- {
-#line 171 "hb-ot-shape-complex-use-machine.rl"
- found_syllable (use_broken_cluster); }
- }}
-
-#line 691 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- }
-
- }
-
- if ( p == eof ) {
- if ( cs >= 2 )
- goto _out;
- }
- else {
- switch ( _use_syllable_machine_to_state_actions[cs] ) {
- case 3: {
- {
+ {{p = ((te))-1;}{ found_syllable (use_broken_cluster); }}
+ break;
+#line 561 "hb-ot-shape-complex-use-machine.hh"
+ }
+
+_again:
+ switch ( _use_syllable_machine_to_state_actions[cs] ) {
+ case 3:
#line 1 "NONE"
- {ts = 0;}}
-
-#line 711 "hb-ot-shape-complex-use-machine.hh"
-
-
- break;
- }
- }
-
- p += 1;
- goto _resume;
- }
- _out: {}
+ {ts = 0;}
+ break;
+#line 570 "hb-ot-shape-complex-use-machine.hh"
+ }
+
+ if ( ++p != pe )
+ goto _resume;
+ _test_eof: {}
+ if ( p == eof )
+ {
+ if ( _use_syllable_machine_eof_trans[cs] > 0 ) {
+ _trans = _use_syllable_machine_eof_trans[cs] - 1;
+ goto _eof_trans;
+ }
}
-
+
+ }
+
#line 265 "hb-ot-shape-complex-use-machine.rl"
-
+
}
#undef found_syllable
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-use-table.hh b/thirdparty/harfbuzz/src/hb-ot-shape-complex-use-table.hh
index a35894ce81..7903a0ef89 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-use-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-use-table.hh
@@ -6,14 +6,14 @@
*
* on files with these headers:
*
- * # IndicSyllabicCategory-13.0.0.txt
- * # Date: 2019-07-22, 19:55:00 GMT [KW, RP]
- * # IndicPositionalCategory-13.0.0.txt
- * # Date: 2019-07-23, 00:01:00 GMT [KW, RP]
- * # ArabicShaping-13.0.0.txt
- * # Date: 2020-01-31, 23:55:00 GMT [KW, RP]
- * # Blocks-13.0.0.txt
- * # Date: 2019-07-10, 19:06:00 GMT [KW]
+ * # IndicSyllabicCategory-14.0.0.txt
+ * # Date: 2021-05-22, 01:01:00 GMT [KW, RP]
+ * # IndicPositionalCategory-14.0.0.txt
+ * # Date: 2021-05-22, 01:01:00 GMT [KW, RP]
+ * # ArabicShaping-14.0.0.txt
+ * # Date: 2021-05-21, 01:54:00 GMT [KW, RP]
+ * # Blocks-14.0.0.txt
+ * # Date: 2021-01-22, 23:29:00 GMT [KW]
* # Override values For Indic_Syllabic_Category
* # Not derivable
* # Initial version based on Unicode 7.0 by Andrew Glass 2014-03-17
@@ -199,7 +199,7 @@ static const uint8_t use_table[] = {
/* 0C00 */ VMAbv, VMPst, VMPst, VMPst, VMAbv, B, B, B, B, B, B, B, B, O, B, B,
/* 0C10 */ B, O, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
/* 0C20 */ B, B, B, B, B, B, B, B, B, O, B, B, B, B, B, B,
- /* 0C30 */ B, B, B, B, B, B, B, B, B, B, O, O, O, B, VAbv, VAbv,
+ /* 0C30 */ B, B, B, B, B, B, B, B, B, B, O, O, CMBlw, B, VAbv, VAbv,
/* 0C40 */ VAbv, VPst, VPst, VPst, VPst, O, VAbv, VAbv, VAbv, O, VAbv, VAbv, VAbv, H, O, O,
/* 0C50 */ O, O, O, O, O, VAbv, VBlw, O, B, B, B, O, O, O, O, O,
/* 0C60 */ B, B, VBlw, VBlw, O, O, B, B, B, B, B, B, B, B, B, B,
@@ -278,13 +278,13 @@ static const uint8_t use_table[] = {
/* Tagalog */
- /* 1700 */ B, B, B, B, B, B, B, B, B, B, B, B, B, O, B, B,
- /* 1710 */ B, B, VAbv, VBlw, VBlw, O, O, O, O, O, O, O, O, O, O, O,
+ /* 1700 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
+ /* 1710 */ B, B, VAbv, VBlw, VBlw, VPst, O, O, O, O, O, O, O, O, O, B,
/* Hanunoo */
/* 1720 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
- /* 1730 */ B, B, VAbv, VBlw, VBlw, O, O, O, O, O, O, O, O, O, O, O,
+ /* 1730 */ B, B, VAbv, VBlw, VPst, O, O, O, O, O, O, O, O, O, O, O,
/* Buhid */
@@ -374,7 +374,7 @@ static const uint8_t use_table[] = {
/* 1B10 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
/* 1B20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
/* 1B30 */ B, B, B, B, CMAbv, VPst, VAbv, VAbv, VBlw, VBlw, VBlw, VBlw, VAbv, VAbv, VPre, VPre,
- /* 1B40 */ VPre, VPre, VAbv, VAbv, H, B, B, B, B, B, B, B, O, O, O, O,
+ /* 1B40 */ VPre, VPre, VAbv, VAbv, H, B, B, B, B, B, B, B, B, O, O, O,
/* 1B50 */ B, B, B, B, B, B, B, B, B, B, O, GB, GB, O, O, GB,
/* 1B60 */ O, S, GB, S, S, S, S, S, GB, S, S, SMAbv, SMBlw, SMAbv, SMAbv, SMAbv,
/* 1B70 */ SMAbv, SMAbv, SMAbv, SMAbv, O, O, O, O, O, O, O, O, O, O, O, O,
@@ -630,7 +630,7 @@ static const uint8_t use_table[] = {
/* 11040 */ VBlw, VBlw, VAbv, VAbv, VAbv, VAbv, HVM, O, O, O, O, O, O, O, O, O,
/* 11050 */ O, O, N, N, N, N, N, N, N, N, N, N, N, N, N, N,
/* 11060 */ N, N, N, N, N, N, B, B, B, B, B, B, B, B, B, B,
- /* 11070 */ O, O, O, O, O, O, O, O, O, O, O, O, O, O, O, HN,
+ /* 11070 */ VAbv, B, B, VAbv, VAbv, B, O, O, O, O, O, O, O, O, O, HN,
/* Kaithi */
@@ -638,8 +638,9 @@ static const uint8_t use_table[] = {
/* 11090 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
/* 110A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
/* 110B0 */ VPst, VPre, VPst, VBlw, VBlw, VAbv, VAbv, VPst, VPst, H, CMBlw, O, O, O, O, O,
+ /* 110C0 */ O, O, VBlw, O, O, O, O, O,
-#define use_offset_0x11100u 4608
+#define use_offset_0x11100u 4616
/* Chakma */
@@ -677,7 +678,7 @@ static const uint8_t use_table[] = {
/* 11220 */ B, B, B, B, B, B, B, B, B, B, B, B, VPst, VPst, VPst, VBlw,
/* 11230 */ VAbv, VAbv, VAbv, VAbv, VMAbv, H, CMAbv, CMAbv, O, O, O, O, O, O, VMAbv, O,
-#define use_offset_0x11280u 4928
+#define use_offset_0x11280u 4936
/* Multani */
@@ -705,7 +706,7 @@ static const uint8_t use_table[] = {
/* 11360 */ B, B, VPst, VPst, O, O, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, O, O, O,
/* 11370 */ VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, O, O, O,
-#define use_offset_0x11400u 5176
+#define use_offset_0x11400u 5184
/* Newa */
@@ -728,7 +729,7 @@ static const uint8_t use_table[] = {
/* 114C0 */ VMAbv, VMAbv, H, CMBlw, B, O, O, O, O, O, O, O, O, O, O, O,
/* 114D0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-#define use_offset_0x11580u 5400
+#define use_offset_0x11580u 5408
/* Siddham */
@@ -770,8 +771,9 @@ static const uint8_t use_table[] = {
/* 11710 */ B, B, B, B, B, B, B, B, B, B, B, O, O, MBlw, MPre, MAbv,
/* 11720 */ VPst, VPst, VAbv, VAbv, VBlw, VBlw, VPre, VAbv, VBlw, VAbv, VAbv, VAbv, O, O, O, O,
/* 11730 */ B, B, B, B, B, B, B, B, B, B, B, B, O, O, O, O,
+ /* 11740 */ B, B, B, B, B, B, B, O,
-#define use_offset_0x11800u 5848
+#define use_offset_0x11800u 5864
/* Dogra */
@@ -781,7 +783,7 @@ static const uint8_t use_table[] = {
/* 11820 */ B, B, B, B, B, B, B, B, B, B, B, B, VPst, VPre, VPst, VBlw,
/* 11830 */ VBlw, VBlw, VBlw, VAbv, VAbv, VAbv, VAbv, VMAbv, VMPst, H, CMBlw, O, O, O, O, O,
-#define use_offset_0x11900u 5912
+#define use_offset_0x11900u 5928
/* Dives Akuru */
@@ -793,7 +795,7 @@ static const uint8_t use_table[] = {
/* 11940 */ MPst, R, MPst, CMBlw, O, O, O, O, O, O, O, O, O, O, O, O,
/* 11950 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-#define use_offset_0x119a0u 6008
+#define use_offset_0x119a0u 6024
/* Nandinagari */
@@ -821,7 +823,7 @@ static const uint8_t use_table[] = {
/* 11A80 */ B, B, B, B, R, R, R, R, R, R, FBlw, FBlw, FBlw, FBlw, FBlw, FBlw,
/* 11A90 */ FBlw, FBlw, FBlw, FBlw, FBlw, FBlw, VMAbv, VMPst, CMAbv, H, O, O, O, B, O, O,
-#define use_offset_0x11c00u 6264
+#define use_offset_0x11c00u 6280
/* Bhaiksuki */
@@ -842,7 +844,7 @@ static const uint8_t use_table[] = {
/* 11CA0 */ SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, O, SUB, SUB, SUB, SUB, SUB, SUB, SUB,
/* 11CB0 */ VBlw, VPre, VBlw, VAbv, VPst, VMAbv, VMAbv, O,
-#define use_offset_0x11d00u 6448
+#define use_offset_0x11d00u 6464
/* Masaram Gondi */
@@ -862,7 +864,7 @@ static const uint8_t use_table[] = {
/* 11D90 */ VAbv, VAbv, O, VPst, VPst, VMAbv, VMPst, H, O, O, O, O, O, O, O, O,
/* 11DA0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-#define use_offset_0x11ee0u 6624
+#define use_offset_0x11ee0u 6640
/* Makasar */
@@ -870,7 +872,7 @@ static const uint8_t use_table[] = {
/* 11EE0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
/* 11EF0 */ B, B, GB, VAbv, VBlw, VPre, VPst, O,
-#define use_offset_0x13000u 6648
+#define use_offset_0x13000u 6664
/* Egyptian Hieroglyphs */
@@ -947,7 +949,7 @@ static const uint8_t use_table[] = {
/* 13430 */ J, J, J, J, J, J, J, SB, SE, O, O, O, O, O, O, O,
-#define use_offset_0x16b00u 7736
+#define use_offset_0x16b00u 7752
/* Pahawh Hmong */
@@ -957,7 +959,7 @@ static const uint8_t use_table[] = {
/* 16B20 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
/* 16B30 */ VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, O,
-#define use_offset_0x16f00u 7792
+#define use_offset_0x16f00u 7808
/* Miao */
@@ -973,14 +975,14 @@ static const uint8_t use_table[] = {
/* 16F80 */ VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, VBlw, O, O, O, O, O, O, O, VMBlw,
/* 16F90 */ VMBlw, VMBlw, VMBlw, O, O, O, O, O,
-#define use_offset_0x16fe0u 7944
+#define use_offset_0x16fe0u 7960
/* Ideographic Symbols and Punctuation */
/* 16FE0 */ O, O, O, O, B, O, O, O,
-#define use_offset_0x18b00u 7952
+#define use_offset_0x18b00u 7968
/* Khitan Small Script */
@@ -1016,7 +1018,7 @@ static const uint8_t use_table[] = {
/* 18CC0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
/* 18CD0 */ B, B, B, B, B, B, O, O,
-#define use_offset_0x1bc00u 8424
+#define use_offset_0x1bc00u 8440
/* Duployan */
@@ -1032,7 +1034,7 @@ static const uint8_t use_table[] = {
/* 1BC80 */ B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, O,
/* 1BC90 */ B, B, B, B, B, B, B, B, B, B, O, O, O, CMBlw, CMBlw, O,
-#define use_offset_0x1e100u 8584
+#define use_offset_0x1e100u 8600
/* Nyiakeng Puachue Hmong */
@@ -1043,7 +1045,7 @@ static const uint8_t use_table[] = {
/* 1E130 */ VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, B, B, B, B, B, B, B, O, O,
/* 1E140 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, B, B,
-#define use_offset_0x1e2c0u 8664
+#define use_offset_0x1e2c0u 8680
/* Wancho */
@@ -1053,7 +1055,7 @@ static const uint8_t use_table[] = {
/* 1E2E0 */ B, B, B, B, B, B, B, B, B, B, B, B, VMAbv, VMAbv, VMAbv, VMAbv,
/* 1E2F0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-#define use_offset_0x1e900u 8728
+#define use_offset_0x1e900u 8744
/* Adlam */
@@ -1065,7 +1067,7 @@ static const uint8_t use_table[] = {
/* 1E940 */ B, B, B, B, CMAbv, CMAbv, CMAbv, CMAbv, CMAbv, CMAbv, CMAbv, B, O, O, O, O,
/* 1E950 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-}; /* Table items: 8824; occupancy: 79% */
+}; /* Table items: 8840; occupancy: 79% */
static inline uint8_t
hb_use_get_category (hb_codepoint_t u)
@@ -1111,15 +1113,15 @@ hb_use_get_category (hb_codepoint_t u)
if (hb_in_range<hb_codepoint_t> (u, 0x10D00u, 0x10D3Fu)) return use_table[u - 0x10D00u + use_offset_0x10d00u];
if (hb_in_range<hb_codepoint_t> (u, 0x10E80u, 0x10EB7u)) return use_table[u - 0x10E80u + use_offset_0x10e80u];
if (hb_in_range<hb_codepoint_t> (u, 0x10F30u, 0x10F57u)) return use_table[u - 0x10F30u + use_offset_0x10f30u];
- if (hb_in_range<hb_codepoint_t> (u, 0x10FB0u, 0x110BFu)) return use_table[u - 0x10FB0u + use_offset_0x10fb0u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x10FB0u, 0x110C7u)) return use_table[u - 0x10FB0u + use_offset_0x10fb0u];
break;
case 0x11u:
- if (hb_in_range<hb_codepoint_t> (u, 0x10FB0u, 0x110BFu)) return use_table[u - 0x10FB0u + use_offset_0x10fb0u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x10FB0u, 0x110C7u)) return use_table[u - 0x10FB0u + use_offset_0x10fb0u];
if (hb_in_range<hb_codepoint_t> (u, 0x11100u, 0x1123Fu)) return use_table[u - 0x11100u + use_offset_0x11100u];
if (hb_in_range<hb_codepoint_t> (u, 0x11280u, 0x11377u)) return use_table[u - 0x11280u + use_offset_0x11280u];
if (hb_in_range<hb_codepoint_t> (u, 0x11400u, 0x114DFu)) return use_table[u - 0x11400u + use_offset_0x11400u];
- if (hb_in_range<hb_codepoint_t> (u, 0x11580u, 0x1173Fu)) return use_table[u - 0x11580u + use_offset_0x11580u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x11580u, 0x11747u)) return use_table[u - 0x11580u + use_offset_0x11580u];
if (hb_in_range<hb_codepoint_t> (u, 0x11800u, 0x1183Fu)) return use_table[u - 0x11800u + use_offset_0x11800u];
if (hb_in_range<hb_codepoint_t> (u, 0x11900u, 0x1195Fu)) return use_table[u - 0x11900u + use_offset_0x11900u];
if (hb_in_range<hb_codepoint_t> (u, 0x119A0u, 0x11A9Fu)) return use_table[u - 0x119A0u + use_offset_0x119a0u];
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-use.cc b/thirdparty/harfbuzz/src/hb-ot-shape-complex-use.cc
index 0d0b7e771e..1e4804c4a2 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-use.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-use.cc
@@ -47,7 +47,8 @@ use_basic_features[] =
{
/*
* Basic features.
- * These features are applied all at once, before reordering.
+ * These features are applied all at once, before reordering, constrained
+ * to the syllable.
*/
HB_TAG('r','k','r','f'),
HB_TAG('a','b','v','f'),
@@ -154,7 +155,7 @@ struct use_shape_plan_t
static void *
data_create_use (const hb_ot_shape_plan_t *plan)
{
- use_shape_plan_t *use_plan = (use_shape_plan_t *) calloc (1, sizeof (use_shape_plan_t));
+ use_shape_plan_t *use_plan = (use_shape_plan_t *) hb_calloc (1, sizeof (use_shape_plan_t));
if (unlikely (!use_plan))
return nullptr;
@@ -165,7 +166,7 @@ data_create_use (const hb_ot_shape_plan_t *plan)
use_plan->arabic_plan = (arabic_shape_plan_t *) data_create_arabic (plan);
if (unlikely (!use_plan->arabic_plan))
{
- free (use_plan);
+ hb_free (use_plan);
return nullptr;
}
}
@@ -181,7 +182,7 @@ data_destroy_use (void *data)
if (use_plan->arabic_plan)
data_destroy_arabic (use_plan->arabic_plan);
- free (data);
+ hb_free (data);
}
static void
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-vowel-constraints.cc b/thirdparty/harfbuzz/src/hb-ot-shape-complex-vowel-constraints.cc
index 1037626998..045731dfb4 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-vowel-constraints.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-vowel-constraints.cc
@@ -10,8 +10,8 @@
* # Date: 2015-03-12, 21:17:00 GMT [AG]
* # Date: 2019-11-08, 23:22:00 GMT [AG]
*
- * # Scripts-13.0.0.txt
- * # Date: 2020-01-22, 00:07:43 GMT
+ * # Scripts-14.0.0.txt
+ * # Date: 2021-07-10, 00:35:31 GMT
*/
#include "hb.hh"
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex.hh b/thirdparty/harfbuzz/src/hb-ot-shape-complex.hh
index 19e24b9f30..8012a9ae94 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex.hh
@@ -373,6 +373,15 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
/* Unicode-13.0 additions */
case HB_SCRIPT_CHORASMIAN:
case HB_SCRIPT_DIVES_AKURU:
+ case HB_SCRIPT_KHITAN_SMALL_SCRIPT:
+ case HB_SCRIPT_YEZIDI:
+
+ /* Unicode-14.0 additions */
+ case HB_SCRIPT_CYPRO_MINOAN:
+ case HB_SCRIPT_OLD_UYGHUR:
+ case HB_SCRIPT_TANGSA:
+ case HB_SCRIPT_TOTO:
+ case HB_SCRIPT_VITHKUQI:
/* If the designer designed the font for the 'DFLT' script,
* (or we ended up arbitrarily pick 'latn'), use the default shaper.
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-fallback.cc b/thirdparty/harfbuzz/src/hb-ot-shape-fallback.cc
index 7d00a35ab9..eb1bc79768 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-fallback.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-fallback.cc
@@ -92,7 +92,7 @@ recategorize_combining_class (hb_codepoint_t u,
case HB_MODIFIED_COMBINING_CLASS_CCC15: /* tsere */
case HB_MODIFIED_COMBINING_CLASS_CCC16: /* segol */
case HB_MODIFIED_COMBINING_CLASS_CCC17: /* patah */
- case HB_MODIFIED_COMBINING_CLASS_CCC18: /* qamats */
+ case HB_MODIFIED_COMBINING_CLASS_CCC18: /* qamats & qamats qatan */
case HB_MODIFIED_COMBINING_CLASS_CCC20: /* qubuts */
case HB_MODIFIED_COMBINING_CLASS_CCC22: /* meteg */
return HB_UNICODE_COMBINING_CLASS_BELOW;
@@ -104,7 +104,7 @@ recategorize_combining_class (hb_codepoint_t u,
return HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT;
case HB_MODIFIED_COMBINING_CLASS_CCC25: /* sin dot */
- case HB_MODIFIED_COMBINING_CLASS_CCC19: /* holam */
+ case HB_MODIFIED_COMBINING_CLASS_CCC19: /* holam & holam haser for vav */
return HB_UNICODE_COMBINING_CLASS_ABOVE_LEFT;
case HB_MODIFIED_COMBINING_CLASS_CCC26: /* point varika */
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape.cc b/thirdparty/harfbuzz/src/hb-ot-shape.cc
index 86ab0b4268..0e215c24f7 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-shape.cc
@@ -149,13 +149,17 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
* Decide who does positioning. GPOS, kerx, kern, or fallback.
*/
- if (0)
+#ifndef HB_NO_AAT_SHAPE
+ bool has_gsub = hb_ot_layout_has_substitution (face);
+#endif
+ bool has_gpos = !disable_gpos && hb_ot_layout_has_positioning (face);
+ if (false)
;
#ifndef HB_NO_AAT_SHAPE
- else if (hb_aat_layout_has_positioning (face))
+ else if (hb_aat_layout_has_positioning (face) && !(has_gsub && has_gpos))
plan.apply_kerx = true;
#endif
- else if (!apply_morx && !disable_gpos && hb_ot_layout_has_positioning (face))
+ else if (!apply_morx && has_gpos)
plan.apply_gpos = true;
if (!plan.apply_kerx && (!has_gpos_kern || !plan.apply_gpos))
@@ -172,6 +176,8 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
#endif
}
+ plan.apply_fallback_kern = !(plan.apply_gpos || plan.apply_kerx || plan.apply_kern);
+
plan.zero_marks = script_zero_marks &&
!plan.apply_kerx &&
(!plan.apply_kern
@@ -193,6 +199,12 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
script_fallback_mark_positioning;
#ifndef HB_NO_AAT_SHAPE
+ /* If we're using morx shaping, we cancel mark position adjustment because
+ Apple Color Emoji assumes this will NOT be done when forming emoji sequences;
+ https://github.com/harfbuzz/harfbuzz/issues/2967. */
+ if (plan.apply_morx)
+ plan.adjust_mark_positioning_when_zeroing = false;
+
/* Currently we always apply trak. */
plan.apply_trak = plan.requested_tracking && hb_aat_layout_has_tracking (face);
#endif
@@ -266,11 +278,12 @@ hb_ot_shape_plan_t::position (hb_font_t *font,
else if (this->apply_kerx)
hb_aat_layout_position (this, font, buffer);
#endif
+
#ifndef HB_NO_OT_KERN
- else if (this->apply_kern)
+ if (this->apply_kern)
hb_ot_layout_kern (this, font, buffer);
#endif
- else
+ else if (this->apply_fallback_kern)
_hb_ot_shape_fallback_kern (this, font, buffer);
#ifndef HB_NO_AAT_SHAPE
@@ -306,16 +319,17 @@ horizontal_features[] =
};
static void
-hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
- const hb_feature_t *user_features,
- unsigned int num_user_features)
+hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
+ const hb_feature_t *user_features,
+ unsigned int num_user_features)
{
hb_ot_map_builder_t *map = &planner->map;
map->enable_feature (HB_TAG('r','v','r','n'));
map->add_gsub_pause (nullptr);
- switch (planner->props.direction) {
+ switch (planner->props.direction)
+ {
case HB_DIRECTION_LTR:
map->enable_feature (HB_TAG ('l','t','r','a'));
map->enable_feature (HB_TAG ('l','t','r','m'));
@@ -348,12 +362,14 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
map->enable_feature (HB_TAG ('t','r','a','k'), F_HAS_FALLBACK);
#endif
- map->enable_feature (HB_TAG ('H','A','R','F'));
+ map->enable_feature (HB_TAG ('H','a','r','f')); /* Considered required. */
+ map->enable_feature (HB_TAG ('H','A','R','F')); /* Considered discretionary. */
if (planner->shaper->collect_features)
planner->shaper->collect_features (planner);
- map->enable_feature (HB_TAG ('B','U','Z','Z'));
+ map->enable_feature (HB_TAG ('B','u','z','z')); /* Considered required. */
+ map->enable_feature (HB_TAG ('B','U','Z','Z')); /* Considered discretionary. */
for (unsigned int i = 0; i < ARRAY_LENGTH (common_features); i++)
map->add_feature (common_features[i]);
@@ -363,6 +379,10 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
map->add_feature (horizontal_features[i]);
else
{
+ /* We only apply `vert` feature. See:
+ * https://github.com/harfbuzz/harfbuzz/commit/d71c0df2d17f4590d5611239577a6cb532c26528
+ * https://lists.freedesktop.org/archives/harfbuzz/2013-August/003490.html */
+
/* We really want to find a 'vert' feature if there's any in the font, no
* matter which script/langsys it is listed (or not) under.
* See various bugs referenced from:
@@ -478,6 +498,14 @@ hb_set_unicode_props (hb_buffer_t *buffer)
if (unlikely (_hb_glyph_info_get_general_category (&info[i]) == HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL &&
hb_in_range<hb_codepoint_t> (info[i].codepoint, 0x1F3FBu, 0x1F3FFu)))
{
+ _hb_glyph_info_set_continuation (&info[i]);
+ }
+ /* Regional_Indicators are hairy as hell...
+ * https://github.com/harfbuzz/harfbuzz/issues/2265 */
+ else if (unlikely (i && hb_in_range<hb_codepoint_t> (info[i].codepoint, 0x1F1E6u, 0x1F1FFu)))
+ {
+ if (hb_in_range<hb_codepoint_t> (info[i - 1].codepoint, 0x1F1E6u, 0x1F1FFu) &&
+ !_hb_glyph_info_is_continuation (&info[i - 1]))
_hb_glyph_info_set_continuation (&info[i]);
}
#ifndef HB_NO_EMOJI_SEQUENCES
@@ -535,6 +563,7 @@ hb_insert_dotted_circle (hb_buffer_t *buffer, hb_font_t *font)
info.cluster = buffer->cur().cluster;
info.mask = buffer->cur().mask;
(void) buffer->output_info (info);
+
buffer->swap_buffers ();
}
@@ -558,6 +587,36 @@ hb_ensure_native_direction (hb_buffer_t *buffer)
hb_direction_t direction = buffer->props.direction;
hb_direction_t horiz_dir = hb_script_get_horizontal_direction (buffer->props.script);
+ /* Numeric runs in natively-RTL scripts are actually native-LTR, so we reset
+ * the horiz_dir if the run contains at least one decimal-number char, and no
+ * letter chars (ideally we should be checking for chars with strong
+ * directionality but hb-unicode currently lacks bidi categories).
+ *
+ * This allows digit sequences in Arabic etc to be shaped in "native"
+ * direction, so that features like ligatures will work as intended.
+ *
+ * https://github.com/harfbuzz/harfbuzz/issues/501
+ */
+ if (unlikely (horiz_dir == HB_DIRECTION_RTL && direction == HB_DIRECTION_LTR))
+ {
+ bool found_number = false, found_letter = false;
+ const auto* info = buffer->info;
+ const auto count = buffer->len;
+ for (unsigned i = 0; i < count; i++)
+ {
+ auto gc = _hb_glyph_info_get_general_category (&info[i]);
+ if (gc == HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER)
+ found_number = true;
+ else if (HB_UNICODE_GENERAL_CATEGORY_IS_LETTER (gc))
+ {
+ found_letter = true;
+ break;
+ }
+ }
+ if (found_number && !found_letter)
+ horiz_dir = HB_DIRECTION_LTR;
+ }
+
/* TODO vertical:
* The only BTT vertical script is Ogham, but it's not clear to me whether OpenType
* Ogham fonts are supposed to be implemented BTT or not. Need to research that
@@ -1111,8 +1170,6 @@ hb_ot_shape_internal (hb_ot_shape_context_t *c)
_hb_buffer_allocate_unicode_vars (c->buffer);
- c->buffer->clear_output ();
-
hb_ot_shape_initialize_masks (c);
hb_set_unicode_props (c->buffer);
hb_insert_dotted_circle (c->buffer, c->font);
@@ -1122,7 +1179,8 @@ hb_ot_shape_internal (hb_ot_shape_context_t *c)
hb_ensure_native_direction (c->buffer);
if (c->plan->shaper->preprocess_text &&
- c->buffer->message(c->font, "start preprocess-text")) {
+ c->buffer->message(c->font, "start preprocess-text"))
+ {
c->plan->shaper->preprocess_text (c->plan, c->buffer, c->font);
(void) c->buffer->message(c->font, "end preprocess-text");
}
@@ -1164,7 +1222,7 @@ _hb_ot_shape (hb_shape_plan_t *shape_plan,
* @lookup_indexes: (out): The #hb_set_t set of lookups returned
*
* Computes the complete set of GSUB or GPOS lookups that are applicable
- * under a given @shape_plan.
+ * under a given @shape_plan.
*
* Since: 0.9.7
**/
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape.hh b/thirdparty/harfbuzz/src/hb-ot-shape.hh
index acc98772a9..e8c81015c7 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-shape.hh
@@ -112,6 +112,7 @@ struct hb_ot_shape_plan_t
#else
static constexpr bool apply_kern = false;
#endif
+ bool apply_fallback_kern : 1;
#ifndef HB_NO_AAT_SHAPE
bool apply_kerx : 1;
bool apply_morx : 1;
diff --git a/thirdparty/harfbuzz/src/hb-ot-stat-table.hh b/thirdparty/harfbuzz/src/hb-ot-stat-table.hh
index 6aa4fa4492..41d1734b39 100644
--- a/thirdparty/harfbuzz/src/hb-ot-stat-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-stat-table.hh
@@ -297,7 +297,7 @@ struct STAT
unsigned int axis_index;
if (!get_design_axes ().lfind (tag, &axis_index)) return false;
- hb_array_t<const OffsetTo<AxisValue>> axis_values = get_axis_value_offsets ();
+ hb_array_t<const Offset16To<AxisValue>> axis_values = get_axis_value_offsets ();
for (unsigned int i = 0; i < axis_values.length; i++)
{
const AxisValue& axis_value = this+axis_values[i];
@@ -359,7 +359,7 @@ struct STAT
hb_array_t<const StatAxisRecord> const get_design_axes () const
{ return (this+designAxesOffset).as_array (designAxisCount); }
- hb_array_t<const OffsetTo<AxisValue>> const get_axis_value_offsets () const
+ hb_array_t<const Offset16To<AxisValue>> const get_axis_value_offsets () const
{ return (this+offsetToAxisValueOffsets).as_array (axisValueCount); }
@@ -373,7 +373,7 @@ struct STAT
* in the 'fvar' table. In all fonts, must
* be greater than zero if axisValueCount
* is greater than zero. */
- LNNOffsetTo<UnsizedArrayOf<StatAxisRecord>>
+ NNOffset32To<UnsizedArrayOf<StatAxisRecord>>
designAxesOffset;
/* Offset in bytes from the beginning of
* the STAT table to the start of the design
@@ -381,7 +381,7 @@ struct STAT
* set to zero; if designAxisCount is greater
* than zero, must be greater than zero. */
HBUINT16 axisValueCount; /* The number of axis value tables. */
- LNNOffsetTo<UnsizedArrayOf<OffsetTo<AxisValue>>>
+ NNOffset32To<UnsizedArrayOf<Offset16To<AxisValue>>>
offsetToAxisValueOffsets;
/* Offset in bytes from the beginning of
* the STAT table to the start of the design
diff --git a/thirdparty/harfbuzz/src/hb-ot-tag-table.hh b/thirdparty/harfbuzz/src/hb-ot-tag-table.hh
index 87830b5462..fc9bffc23f 100644
--- a/thirdparty/harfbuzz/src/hb-ot-tag-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-tag-table.hh
@@ -6,8 +6,8 @@
*
* on files with these headers:
*
- * <meta name="updated_at" content="2021-02-12 04:08 PM" />
- * File-Date: 2021-03-05
+ * <meta name="updated_at" content="2021-09-02 09:40 PM" />
+ * File-Date: 2021-08-06
*/
#ifndef HB_OT_TAG_TABLE_HH
@@ -93,6 +93,7 @@ static const LangTag ot_languages[] = {
{"auz", HB_TAG('A','R','A',' ')}, /* Uzbeki Arabic -> Arabic */
{"av", HB_TAG('A','V','R',' ')}, /* Avaric -> Avar */
{"avl", HB_TAG('A','R','A',' ')}, /* Eastern Egyptian Bedawi Arabic -> Arabic */
+/*{"avn", HB_TAG('A','V','N',' ')},*/ /* Avatime */
/*{"awa", HB_TAG('A','W','A',' ')},*/ /* Awadhi */
{"ay", HB_TAG('A','Y','M',' ')}, /* Aymara [macrolanguage] */
{"ayc", HB_TAG('A','Y','M',' ')}, /* Southern Aymara -> Aymara */
@@ -345,6 +346,7 @@ static const LangTag ot_languages[] = {
{"cth", HB_TAG('Q','I','N',' ')}, /* Thaiphum Chin -> Chin */
{"ctl", HB_TAG('C','C','H','N')}, /* Tlacoatzintepec Chinantec -> Chinantec */
{"cts", HB_TAG('B','I','K',' ')}, /* Northern Catanduanes Bikol -> Bikol */
+/*{"ctt", HB_TAG('C','T','T',' ')},*/ /* Wayanad Chetti */
{"ctu", HB_TAG('M','Y','N',' ')}, /* Chol -> Mayan */
{"cu", HB_TAG('C','S','L',' ')}, /* Church Slavonic */
{"cuc", HB_TAG('C','C','H','N')}, /* Usila Chinantec -> Chinantec */
@@ -537,23 +539,27 @@ static const LangTag ot_languages[] = {
{"ha", HB_TAG('H','A','U',' ')}, /* Hausa */
{"haa", HB_TAG('A','T','H',' ')}, /* Han -> Athapaskan */
{"hae", HB_TAG('O','R','O',' ')}, /* Eastern Oromo -> Oromo */
- {"hai", HB_TAG_NONE }, /* Haida [macrolanguage] != Haitian (Haitian Creole) */
+ {"hai", HB_TAG('H','A','I','0')}, /* Haida [macrolanguage] */
{"hak", HB_TAG('Z','H','S',' ')}, /* Hakka Chinese -> Chinese, Simplified */
{"hal", HB_TAG_NONE }, /* Halang != Halam (Falam Chin) */
{"har", HB_TAG('H','R','I',' ')}, /* Harari */
/*{"haw", HB_TAG('H','A','W',' ')},*/ /* Hawaiian */
+ {"hax", HB_TAG('H','A','I','0')}, /* Southern Haida -> Haida */
/*{"hay", HB_TAG('H','A','Y',' ')},*/ /* Haya */
/*{"haz", HB_TAG('H','A','Z',' ')},*/ /* Hazaragi */
{"hbn", HB_TAG_NONE }, /* Heiban != Hammer-Banna */
{"hca", HB_TAG('C','P','P',' ')}, /* Andaman Creole Hindi -> Creoles */
+ {"hdn", HB_TAG('H','A','I','0')}, /* Northern Haida -> Haida */
{"he", HB_TAG('I','W','R',' ')}, /* Hebrew */
{"hea", HB_TAG('H','M','N',' ')}, /* Northern Qiandong Miao -> Hmong */
+/*{"hei", HB_TAG('H','E','I',' ')},*/ /* Heiltsuk */
{"hi", HB_TAG('H','I','N',' ')}, /* Hindi */
/*{"hil", HB_TAG('H','I','L',' ')},*/ /* Hiligaynon */
{"hji", HB_TAG('M','L','Y',' ')}, /* Haji -> Malay */
{"hlt", HB_TAG('Q','I','N',' ')}, /* Matu Chin -> Chin */
{"hma", HB_TAG('H','M','N',' ')}, /* Southern Mashan Hmong -> Hmong */
{"hmc", HB_TAG('H','M','N',' ')}, /* Central Huishui Hmong -> Hmong */
+ {"hmd", HB_TAG('H','M','D',' ')}, /* Large Flowery Miao -> A-Hmao */
{"hmd", HB_TAG('H','M','N',' ')}, /* Large Flowery Miao -> Hmong */
{"hme", HB_TAG('H','M','N',' ')}, /* Eastern Huishui Hmong -> Hmong */
{"hmg", HB_TAG('H','M','N',' ')}, /* Southwestern Guiyang Hmong -> Hmong */
@@ -569,6 +575,7 @@ static const LangTag ot_languages[] = {
{"hms", HB_TAG('H','M','N',' ')}, /* Southern Qiandong Miao -> Hmong */
{"hmw", HB_TAG('H','M','N',' ')}, /* Western Mashan Hmong -> Hmong */
{"hmy", HB_TAG('H','M','N',' ')}, /* Southern Guiyang Hmong -> Hmong */
+ {"hmz", HB_TAG('H','M','Z',' ')}, /* Hmong Shua -> Hmong Shuat */
{"hmz", HB_TAG('H','M','N',' ')}, /* Hmong Shua -> Hmong */
/*{"hnd", HB_TAG('H','N','D',' ')},*/ /* Southern Hindko -> Hindko */
{"hne", HB_TAG('C','H','H',' ')}, /* Chhattisgarhi -> Chattisgarhi */
@@ -625,6 +632,7 @@ static const LangTag ot_languages[] = {
{"inh", HB_TAG('I','N','G',' ')}, /* Ingush */
{"io", HB_TAG('I','D','O',' ')}, /* Ido */
{"iri", HB_TAG_NONE }, /* Rigwe != Irish */
+/*{"iru", HB_TAG('I','R','U',' ')},*/ /* Irula */
{"is", HB_TAG('I','S','L',' ')}, /* Icelandic */
{"ism", HB_TAG_NONE }, /* Masimasi != Inari Sami */
{"it", HB_TAG('I','T','A',' ')}, /* Italian */
@@ -660,6 +668,7 @@ static const LangTag ot_languages[] = {
{"kac", HB_TAG_NONE }, /* Kachin != Kachchi */
{"kam", HB_TAG('K','M','B',' ')}, /* Kamba (Kenya) */
{"kar", HB_TAG('K','R','N',' ')}, /* Karen [family] */
+/*{"kaw", HB_TAG('K','A','W',' ')},*/ /* Kawi (Old Javanese) */
{"kbd", HB_TAG('K','A','B',' ')}, /* Kabardian */
{"kby", HB_TAG('K','N','R',' ')}, /* Manga Kanuri -> Kanuri */
{"kca", HB_TAG('K','H','K',' ')}, /* Khanty -> Khanty-Kazim */
@@ -779,6 +788,7 @@ static const LangTag ot_languages[] = {
{"kvu", HB_TAG('K','R','N',' ')}, /* Yinbaw Karen -> Karen */
{"kvy", HB_TAG('K','R','N',' ')}, /* Yintale Karen -> Karen */
{"kw", HB_TAG('C','O','R',' ')}, /* Cornish */
+/*{"kwk", HB_TAG('K','W','K',' ')},*/ /* Kwakiutl -> Kwakʼwala */
{"kww", HB_TAG('C','P','P',' ')}, /* Kwinti -> Creoles */
{"kwy", HB_TAG('K','O','N','0')}, /* San Salvador Kongo -> Kongo */
{"kxc", HB_TAG('K','M','S',' ')}, /* Konso -> Komso */
@@ -806,6 +816,7 @@ static const LangTag ot_languages[] = {
{"lcf", HB_TAG('M','L','Y',' ')}, /* Lubu -> Malay */
{"ldi", HB_TAG('K','O','N','0')}, /* Laari -> Kongo */
{"ldk", HB_TAG_NONE }, /* Leelau != Ladakhi */
+/*{"lef", HB_TAG('L','E','F',' ')},*/ /* Lelemi */
/*{"lez", HB_TAG('L','E','Z',' ')},*/ /* Lezghian -> Lezgi */
{"lg", HB_TAG('L','U','G',' ')}, /* Ganda */
{"li", HB_TAG('L','I','M',' ')}, /* Limburgish */
@@ -832,6 +843,7 @@ static const LangTag ot_languages[] = {
{"lo", HB_TAG('L','A','O',' ')}, /* Lao */
/*{"lom", HB_TAG('L','O','M',' ')},*/ /* Loma (Liberia) */
{"lou", HB_TAG('C','P','P',' ')}, /* Louisiana Creole -> Creoles */
+/*{"lpo", HB_TAG('L','P','O',' ')},*/ /* Lipo */
/*{"lrc", HB_TAG('L','R','C',' ')},*/ /* Northern Luri -> Luri */
{"lri", HB_TAG('L','U','H',' ')}, /* Marachi -> Luyia */
{"lrm", HB_TAG('L','U','H',' ')}, /* Marama -> Luyia */
@@ -1231,6 +1243,7 @@ static const LangTag ot_languages[] = {
{"rbl", HB_TAG('B','I','K',' ')}, /* Miraya Bikol -> Bikol */
{"rcf", HB_TAG('C','P','P',' ')}, /* Réunion Creole French -> Creoles */
/*{"rej", HB_TAG('R','E','J',' ')},*/ /* Rejang */
+/*{"rhg", HB_TAG('R','H','G',' ')},*/ /* Rohingya */
/*{"ria", HB_TAG('R','I','A',' ')},*/ /* Riang (India) */
{"rif", HB_TAG('R','I','F',' ')}, /* Tarifit */
{"rif", HB_TAG('B','B','R',' ')}, /* Tarifit -> Berber */
@@ -1286,6 +1299,7 @@ static const LangTag ot_languages[] = {
{"sek", HB_TAG('A','T','H',' ')}, /* Sekani -> Athapaskan */
/*{"sel", HB_TAG('S','E','L',' ')},*/ /* Selkup */
{"sez", HB_TAG('Q','I','N',' ')}, /* Senthang Chin -> Chin */
+ {"sfm", HB_TAG('S','F','M',' ')}, /* Small Flowery Miao */
{"sfm", HB_TAG('H','M','N',' ')}, /* Small Flowery Miao -> Hmong */
{"sg", HB_TAG('S','G','O',' ')}, /* Sango */
/*{"sga", HB_TAG('S','G','A',' ')},*/ /* Old Irish (to 900) */
@@ -1413,6 +1427,7 @@ static const LangTag ot_languages[] = {
{"tkg", HB_TAG('M','L','G',' ')}, /* Tesaka Malagasy -> Malagasy */
{"tkm", HB_TAG_NONE }, /* Takelma != Turkmen */
{"tl", HB_TAG('T','G','L',' ')}, /* Tagalog */
+/*{"tli", HB_TAG('T','L','I',' ')},*/ /* Tlingit */
{"tmg", HB_TAG('C','P','P',' ')}, /* Ternateño -> Creoles */
{"tmh", HB_TAG('T','M','H',' ')}, /* Tamashek [macrolanguage] */
{"tmh", HB_TAG('B','B','R',' ')}, /* Tamashek [macrolanguage] -> Berber */
@@ -1499,6 +1514,7 @@ static const LangTag ot_languages[] = {
{"wbm", HB_TAG('W','A',' ',' ')}, /* Wa */
{"wbr", HB_TAG('W','A','G',' ')}, /* Wagdi */
{"wbr", HB_TAG('R','A','J',' ')}, /* Wagdi -> Rajasthani */
+/*{"wci", HB_TAG('W','C','I',' ')},*/ /* Waci Gbe */
{"wea", HB_TAG('K','R','N',' ')}, /* Wewaw -> Karen */
{"wes", HB_TAG('C','P','P',' ')}, /* Cameroon Pidgin -> Creoles */
{"weu", HB_TAG('Q','I','N',' ')}, /* Rawngtu Chin -> Chin */
@@ -1533,6 +1549,8 @@ static const LangTag ot_languages[] = {
{"xsl", HB_TAG('S','L','A',' ')}, /* South Slavey -> Slavey */
{"xsl", HB_TAG('A','T','H',' ')}, /* South Slavey -> Athapaskan */
{"xst", HB_TAG('S','I','G',' ')}, /* Silt'e (retired code) -> Silte Gurage */
+/*{"xub", HB_TAG('X','U','B',' ')},*/ /* Betta Kurumba -> Bette Kuruma */
+/*{"xuj", HB_TAG('X','U','J',' ')},*/ /* Jennu Kurumba -> Jennu Kuruma */
{"xup", HB_TAG('A','T','H',' ')}, /* Upper Umpqua -> Athapaskan */
{"xwo", HB_TAG('T','O','D',' ')}, /* Written Oirat -> Todo */
{"yaj", HB_TAG('B','A','D','0')}, /* Banda-Yangere -> Banda */
@@ -1543,13 +1561,16 @@ static const LangTag ot_languages[] = {
{"ybb", HB_TAG('B','M','L',' ')}, /* Yemba -> Bamileke */
{"ybd", HB_TAG('A','R','K',' ')}, /* Yangbye (retired code) -> Rakhine */
{"ydd", HB_TAG('J','I','I',' ')}, /* Eastern Yiddish -> Yiddish */
+/*{"ygp", HB_TAG('Y','G','P',' ')},*/ /* Gepo */
{"yi", HB_TAG('J','I','I',' ')}, /* Yiddish [macrolanguage] */
{"yih", HB_TAG('J','I','I',' ')}, /* Western Yiddish -> Yiddish */
{"yim", HB_TAG_NONE }, /* Yimchungru Naga != Yi Modern */
+/*{"yna", HB_TAG('Y','N','A',' ')},*/ /* Aluo */
{"yo", HB_TAG('Y','B','A',' ')}, /* Yoruba */
{"yos", HB_TAG('Q','I','N',' ')}, /* Yos (retired code) -> Chin */
{"yua", HB_TAG('M','Y','N',' ')}, /* Yucateco -> Mayan */
{"yue", HB_TAG('Z','H','H',' ')}, /* Yue Chinese -> Chinese, Traditional, Hong Kong SAR */
+/*{"ywq", HB_TAG('Y','W','Q',' ')},*/ /* Wuding-Luquan Yi */
{"za", HB_TAG('Z','H','A',' ')}, /* Zhuang [macrolanguage] */
{"zch", HB_TAG('Z','H','A',' ')}, /* Central Hongshuihe Zhuang -> Zhuang */
{"zdj", HB_TAG('C','M','R',' ')}, /* Ngazidja Comorian -> Comorian */
diff --git a/thirdparty/harfbuzz/src/hb-ot-tag.cc b/thirdparty/harfbuzz/src/hb-ot-tag.cc
index fc145a41f7..1837063af8 100644
--- a/thirdparty/harfbuzz/src/hb-ot-tag.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-tag.cc
@@ -522,7 +522,7 @@ hb_ot_tags_to_script_and_language (hb_tag_t script_tag,
unsigned char *buf;
const char *lang_str = hb_language_to_string (*language);
size_t len = strlen (lang_str);
- buf = (unsigned char *) malloc (len + 16);
+ buf = (unsigned char *) hb_malloc (len + 16);
if (unlikely (!buf))
{
*language = nullptr;
@@ -544,7 +544,7 @@ hb_ot_tags_to_script_and_language (hb_tag_t script_tag,
for (shift = 28; shift >= 0; shift -= 4)
buf[len++] = TOHEX (script_tag >> shift);
*language = hb_language_from_string ((char *) buf, len);
- free (buf);
+ hb_free (buf);
}
}
}
diff --git a/thirdparty/harfbuzz/src/hb-ot-var-avar-table.hh b/thirdparty/harfbuzz/src/hb-ot-var-avar-table.hh
index 29219adb0a..65f26c1d22 100644
--- a/thirdparty/harfbuzz/src/hb-ot-var-avar-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-var-avar-table.hh
@@ -58,7 +58,7 @@ struct AxisValueMap
DEFINE_SIZE_STATIC (4);
};
-struct SegmentMaps : ArrayOf<AxisValueMap>
+struct SegmentMaps : Array16Of<AxisValueMap>
{
int map (int value, unsigned int from_offset = 0, unsigned int to_offset = 1) const
{
diff --git a/thirdparty/harfbuzz/src/hb-ot-var-fvar-table.hh b/thirdparty/harfbuzz/src/hb-ot-var-fvar-table.hh
index f9e933fb2b..05f289db26 100644
--- a/thirdparty/harfbuzz/src/hb-ot-var-fvar-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-var-fvar-table.hh
@@ -142,11 +142,13 @@ struct AxisRecord
max = hb_max (default_, maxValue / 65536.f);
}
- protected:
+ public:
Tag axisTag; /* Tag identifying the design variation for the axis. */
+ protected:
HBFixed minValue; /* The minimum coordinate value for the axis. */
HBFixed defaultValue; /* The default coordinate value for the axis. */
HBFixed maxValue; /* The maximum coordinate value for the axis. */
+ public:
HBUINT16 flags; /* Axis flags. */
NameID axisNameID; /* The name ID for entries in the 'name' table that
* provide a display name for this axis. */
@@ -214,7 +216,6 @@ struct fvar
return axes.lfind (tag, axis_index) && (axes[*axis_index].get_axis_deprecated (info), true);
}
#endif
-
bool
find_axis_info (hb_tag_t tag, hb_ot_var_axis_info_t *info) const
{
@@ -289,7 +290,7 @@ struct fvar
;
}
- protected:
+ public:
hb_array_t<const AxisRecord> get_axes () const
{ return hb_array (&(this+firstAxis), axisCount); }
@@ -303,7 +304,7 @@ struct fvar
protected:
FixedVersion<>version; /* Version of the fvar table
* initially set to 0x00010000u */
- OffsetTo<AxisRecord>
+ Offset16To<AxisRecord>
firstAxis; /* Offset in bytes from the beginning of the table
* to the start of the AxisRecord array. */
HBUINT16 reserved; /* This field is permanently reserved. Set to 2. */
diff --git a/thirdparty/harfbuzz/src/hb-ot-var-gvar-table.hh b/thirdparty/harfbuzz/src/hb-ot-var-gvar-table.hh
index 7e4eaaad95..49b5532d40 100644
--- a/thirdparty/harfbuzz/src/hb-ot-var-gvar-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-var-gvar-table.hh
@@ -374,7 +374,7 @@ struct GlyphVariationData
* low 12 bits are the number of tuple variation tables
* for this glyph. The number of tuple variation tables
* can be any number between 1 and 4095. */
- OffsetTo<HBUINT8>
+ Offset16To<HBUINT8>
data; /* Offset from the start of the GlyphVariationData table
* to the serialized data. */
/* TupleVariationHeader tupleVariationHeaders[] *//* Array of tuple variation headers. */
@@ -419,7 +419,9 @@ struct gvar
out->glyphCount = num_glyphs;
unsigned int subset_data_size = 0;
- for (hb_codepoint_t gid = 0; gid < num_glyphs; gid++)
+ for (hb_codepoint_t gid = (c->plan->flags & HB_SUBSET_FLAGS_NOTDEF_OUTLINE) ? 0 : 1;
+ gid < num_glyphs;
+ gid++)
{
hb_codepoint_t old_gid;
if (!c->plan->old_gid_for_new_gid (gid, &old_gid)) continue;
@@ -449,7 +451,9 @@ struct gvar
out->dataZ = subset_data - (char *) out;
unsigned int glyph_offset = 0;
- for (hb_codepoint_t gid = 0; gid < num_glyphs; gid++)
+ for (hb_codepoint_t gid = (c->plan->flags & HB_SUBSET_FLAGS_NOTDEF_OUTLINE) ? 0 : 1;
+ gid < num_glyphs;
+ gid++)
{
hb_codepoint_t old_gid;
hb_bytes_t var_data_bytes = c->plan->old_gid_for_new_gid (gid, &old_gid)
@@ -676,7 +680,7 @@ no_more_gaps:
* can be referenced within glyph variation data tables for
* multiple glyphs, as opposed to other tuple records stored
* directly within a glyph variation data table. */
- LNNOffsetTo<UnsizedArrayOf<F2DOT14>>
+ NNOffset32To<UnsizedArrayOf<F2DOT14>>
sharedTuples; /* Offset from the start of this table to the shared tuple records.
* Array of tuple records shared across all glyph variation data tables. */
HBUINT16 glyphCount; /* The number of glyphs in this font. This must match the number of
@@ -684,7 +688,7 @@ no_more_gaps:
HBUINT16 flags; /* Bit-field that gives the format of the offset array that follows.
* If bit 0 is clear, the offsets are uint16; if bit 0 is set, the
* offsets are uint32. */
- LOffsetTo<GlyphVariationData>
+ Offset32To<GlyphVariationData>
dataZ; /* Offset from the start of this table to the array of
* GlyphVariationData tables. */
UnsizedArrayOf<HBUINT8>
diff --git a/thirdparty/harfbuzz/src/hb-ot-var-hvar-table.hh b/thirdparty/harfbuzz/src/hb-ot-var-hvar-table.hh
index fdcc88d674..72217e7f29 100644
--- a/thirdparty/harfbuzz/src/hb-ot-var-hvar-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-var-hvar-table.hh
@@ -49,12 +49,12 @@ struct DeltaSetIndexMap
{
unsigned int width = plan.get_width ();
unsigned int inner_bit_count = plan.get_inner_bit_count ();
- const hb_array_t<const unsigned int> output_map = plan.get_output_map ();
+ const hb_array_t<const uint32_t> output_map = plan.get_output_map ();
TRACE_SERIALIZE (this);
if (unlikely (output_map.length && ((((inner_bit_count-1)&~0xF)!=0) || (((width-1)&~0x3)!=0))))
return_trace (false);
- if (unlikely (!c->extend_min (*this))) return_trace (false);
+ if (unlikely (!c->extend_min (this))) return_trace (false);
format = ((width-1)<<4)|(inner_bit_count-1);
mapCount = output_map.length;
@@ -76,7 +76,7 @@ struct DeltaSetIndexMap
return_trace (true);
}
- unsigned int map (unsigned int v) const /* Returns 16.16 outer.inner. */
+ uint32_t map (unsigned int v) const /* Returns 16.16 outer.inner. */
{
/* If count is zero, pass value unchanged. This takes
* care of direct mapping for advance map. */
@@ -217,7 +217,7 @@ struct index_map_subset_plan_t
hb_codepoint_t old_gid;
if (plan->old_gid_for_new_gid (gid, &old_gid))
{
- unsigned int v = input_map->map (old_gid);
+ uint32_t v = input_map->map (old_gid);
unsigned int outer = v >> 16;
output_map[gid] = (outer_map[outer] << 16) | (inner_maps[outer][v & 0xFFFF]);
}
@@ -234,14 +234,14 @@ struct index_map_subset_plan_t
{ return (map_count? (DeltaSetIndexMap::min_size + get_width () * map_count): 0); }
bool is_identity () const { return get_output_map ().length == 0; }
- hb_array_t<const unsigned int> get_output_map () const { return output_map.as_array (); }
+ hb_array_t<const uint32_t> get_output_map () const { return output_map.as_array (); }
protected:
unsigned int map_count;
hb_vector_t<unsigned int> max_inners;
unsigned int outer_bit_count;
unsigned int inner_bit_count;
- hb_vector_t<unsigned int> output_map;
+ hb_vector_t<uint32_t> output_map;
};
struct hvarvvar_subset_plan_t
@@ -272,7 +272,7 @@ struct hvarvvar_subset_plan_t
index_map_plans[0].init (*index_maps[0], outer_map, inner_sets, plan);
if (index_maps[0] == &Null (DeltaSetIndexMap))
{
- retain_adv_map = plan->retain_gids;
+ retain_adv_map = plan->flags & HB_SUBSET_FLAGS_RETAIN_GIDS;
outer_map.add (0);
for (hb_codepoint_t gid = 0; gid < plan->num_output_glyphs (); gid++)
{
@@ -367,15 +367,15 @@ struct HVARVVAR
TRACE_SERIALIZE (this);
if (im_plans[index_map_subset_plan_t::ADV_INDEX].is_identity ())
advMap = 0;
- else if (unlikely (!advMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::ADV_INDEX])))
+ else if (unlikely (!advMap.serialize_serialize (c, im_plans[index_map_subset_plan_t::ADV_INDEX])))
return_trace (false);
if (im_plans[index_map_subset_plan_t::LSB_INDEX].is_identity ())
lsbMap = 0;
- else if (unlikely (!lsbMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::LSB_INDEX])))
+ else if (unlikely (!lsbMap.serialize_serialize (c, im_plans[index_map_subset_plan_t::LSB_INDEX])))
return_trace (false);
if (im_plans[index_map_subset_plan_t::RSB_INDEX].is_identity ())
rsbMap = 0;
- else if (unlikely (!rsbMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::RSB_INDEX])))
+ else if (unlikely (!rsbMap.serialize_serialize (c, im_plans[index_map_subset_plan_t::RSB_INDEX])))
return_trace (false);
return_trace (true);
@@ -398,8 +398,10 @@ struct HVARVVAR
out->version.major = 1;
out->version.minor = 0;
- if (unlikely (!out->varStore.serialize (c->serializer, out)
- .serialize (c->serializer, hvar_plan.var_store, hvar_plan.inner_maps.as_array ())))
+ if (unlikely (!out->varStore
+ .serialize_serialize (c->serializer,
+ hvar_plan.var_store,
+ hvar_plan.inner_maps.as_array ())))
return_trace (false);
return_trace (out->T::serialize_index_maps (c->serializer,
@@ -408,7 +410,7 @@ struct HVARVVAR
float get_advance_var (hb_codepoint_t glyph, hb_font_t *font) const
{
- unsigned int varidx = (this+advMap).map (glyph);
+ uint32_t varidx = (this+advMap).map (glyph);
return (this+varStore).get_delta (varidx, font->coords, font->num_coords);
}
@@ -416,7 +418,7 @@ struct HVARVVAR
const int *coords, unsigned int coord_count) const
{
if (!has_side_bearing_deltas ()) return 0.f;
- unsigned int varidx = (this+lsbMap).map (glyph);
+ uint32_t varidx = (this+lsbMap).map (glyph);
return (this+varStore).get_delta (varidx, coords, coord_count);
}
@@ -425,13 +427,13 @@ struct HVARVVAR
protected:
FixedVersion<>version; /* Version of the metrics variation table
* initially set to 0x00010000u */
- LOffsetTo<VariationStore>
+ Offset32To<VariationStore>
varStore; /* Offset to item variation store table. */
- LOffsetTo<DeltaSetIndexMap>
+ Offset32To<DeltaSetIndexMap>
advMap; /* Offset to advance var-idx mapping. */
- LOffsetTo<DeltaSetIndexMap>
+ Offset32To<DeltaSetIndexMap>
lsbMap; /* Offset to lsb/tsb var-idx mapping. */
- LOffsetTo<DeltaSetIndexMap>
+ Offset32To<DeltaSetIndexMap>
rsbMap; /* Offset to rsb/bsb var-idx mapping. */
public:
@@ -466,7 +468,7 @@ struct VVAR : HVARVVAR {
return_trace (false);
if (!im_plans[index_map_subset_plan_t::VORG_INDEX].get_map_count ())
vorgMap = 0;
- else if (unlikely (!vorgMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::VORG_INDEX])))
+ else if (unlikely (!vorgMap.serialize_serialize (c, im_plans[index_map_subset_plan_t::VORG_INDEX])))
return_trace (false);
return_trace (true);
@@ -475,7 +477,7 @@ struct VVAR : HVARVVAR {
bool subset (hb_subset_context_t *c) const { return HVARVVAR::_subset<VVAR> (c); }
protected:
- LOffsetTo<DeltaSetIndexMap>
+ Offset32To<DeltaSetIndexMap>
vorgMap; /* Offset to vertical-origin var-idx mapping. */
public:
diff --git a/thirdparty/harfbuzz/src/hb-ot-var-mvar-table.hh b/thirdparty/harfbuzz/src/hb-ot-var-mvar-table.hh
index 1b7fad9cec..208db46741 100644
--- a/thirdparty/harfbuzz/src/hb-ot-var-mvar-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-var-mvar-table.hh
@@ -103,7 +103,7 @@ protected:
HBUINT16 valueRecordSize;/* The size in bytes of each value record —
* must be greater than zero. */
HBUINT16 valueRecordCount;/* The number of value records — may be zero. */
- OffsetTo<VariationStore>
+ Offset16To<VariationStore>
varStore; /* Offset to item variation store table. */
UnsizedArrayOf<HBUINT8>
valuesZ; /* Array of value records. The records must be
diff --git a/thirdparty/harfbuzz/src/hb-ot-vorg-table.hh b/thirdparty/harfbuzz/src/hb-ot-vorg-table.hh
index c6803200f9..efa7737d6f 100644
--- a/thirdparty/harfbuzz/src/hb-ot-vorg-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-vorg-table.hh
@@ -125,7 +125,7 @@ struct VORG
FixedVersion<>version; /* Version of VORG table. Set to 0x00010000u. */
FWORD defaultVertOriginY;
/* The default vertical origin. */
- SortedArrayOf<VertOriginMetric>
+ SortedArray16Of<VertOriginMetric>
vertYOrigins; /* The array of vertical origins. */
public:
diff --git a/thirdparty/harfbuzz/src/hb-pool.hh b/thirdparty/harfbuzz/src/hb-pool.hh
index dcf0faf2a9..dcf8f6627d 100644
--- a/thirdparty/harfbuzz/src/hb-pool.hh
+++ b/thirdparty/harfbuzz/src/hb-pool.hh
@@ -41,7 +41,7 @@ struct hb_pool_t
{
next = nullptr;
- for (chunk_t *_ : chunks) ::free (_);
+ for (chunk_t *_ : chunks) hb_free (_);
chunks.fini ();
}
@@ -51,7 +51,7 @@ struct hb_pool_t
if (unlikely (!next))
{
if (unlikely (!chunks.alloc (chunks.length + 1))) return nullptr;
- chunk_t *chunk = (chunk_t *) calloc (1, sizeof (chunk_t));
+ chunk_t *chunk = (chunk_t *) hb_calloc (1, sizeof (chunk_t));
if (unlikely (!chunk)) return nullptr;
chunks.push (chunk);
next = chunk->thread ();
@@ -65,7 +65,7 @@ struct hb_pool_t
return obj;
}
- void free (T* obj)
+ void release (T* obj)
{
* (T**) obj = next;
next = obj;
diff --git a/thirdparty/harfbuzz/src/hb-priority-queue.hh b/thirdparty/harfbuzz/src/hb-priority-queue.hh
new file mode 100644
index 0000000000..7d799ae906
--- /dev/null
+++ b/thirdparty/harfbuzz/src/hb-priority-queue.hh
@@ -0,0 +1,151 @@
+/*
+ * Copyright © 2020 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Garret Rieger
+ */
+
+#ifndef HB_PRIORITY_QUEUE_HH
+#define HB_PRIORITY_QUEUE_HH
+
+#include "hb.hh"
+#include "hb-vector.hh"
+
+/*
+ * hb_priority_queue_t
+ *
+ * Priority queue implemented as a binary heap. Supports extract minimum
+ * and insert operations.
+ */
+struct hb_priority_queue_t
+{
+ HB_DELETE_COPY_ASSIGN (hb_priority_queue_t);
+ hb_priority_queue_t () { init (); }
+ ~hb_priority_queue_t () { fini (); }
+
+ private:
+ typedef hb_pair_t<int64_t, unsigned> item_t;
+ hb_vector_t<item_t> heap;
+
+ public:
+ void init () { heap.init (); }
+
+ void fini () { heap.fini (); }
+
+ void reset () { heap.resize (0); }
+
+ bool in_error () const { return heap.in_error (); }
+
+ void insert (int64_t priority, unsigned value)
+ {
+ heap.push (item_t (priority, value));
+ bubble_up (heap.length - 1);
+ }
+
+ item_t pop_minimum ()
+ {
+ item_t result = heap[0];
+
+ heap[0] = heap[heap.length - 1];
+ heap.shrink (heap.length - 1);
+ bubble_down (0);
+
+ return result;
+ }
+
+ const item_t& minimum ()
+ {
+ return heap[0];
+ }
+
+ bool is_empty () const { return heap.length == 0; }
+ explicit operator bool () const { return !is_empty (); }
+ unsigned int get_population () const { return heap.length; }
+
+ /* Sink interface. */
+ hb_priority_queue_t& operator << (item_t item)
+ { insert (item.first, item.second); return *this; }
+
+ private:
+
+ static constexpr unsigned parent (unsigned index)
+ {
+ return (index - 1) / 2;
+ }
+
+ static constexpr unsigned left_child (unsigned index)
+ {
+ return 2 * index + 1;
+ }
+
+ static constexpr unsigned right_child (unsigned index)
+ {
+ return 2 * index + 2;
+ }
+
+ void bubble_down (unsigned index)
+ {
+ unsigned left = left_child (index);
+ unsigned right = right_child (index);
+
+ bool has_left = left < heap.length;
+ if (!has_left)
+ // If there's no left, then there's also no right.
+ return;
+
+ bool has_right = right < heap.length;
+ if (heap[index].first <= heap[left].first
+ && (!has_right || heap[index].first <= heap[right].first))
+ return;
+
+ if (!has_right || heap[left].first < heap[right].first)
+ {
+ swap (index, left);
+ bubble_down (left);
+ return;
+ }
+
+ swap (index, right);
+ bubble_down (right);
+ }
+
+ void bubble_up (unsigned index)
+ {
+ if (index == 0) return;
+
+ unsigned parent_index = parent (index);
+ if (heap[parent_index].first <= heap[index].first)
+ return;
+
+ swap (index, parent_index);
+ bubble_up (parent_index);
+ }
+
+ void swap (unsigned a, unsigned b)
+ {
+ item_t temp = heap[a];
+ heap[a] = heap[b];
+ heap[b] = temp;
+ }
+};
+
+#endif /* HB_PRIORITY_QUEUE_HH */
diff --git a/thirdparty/harfbuzz/src/hb-repacker.hh b/thirdparty/harfbuzz/src/hb-repacker.hh
new file mode 100644
index 0000000000..b02128b5c4
--- /dev/null
+++ b/thirdparty/harfbuzz/src/hb-repacker.hh
@@ -0,0 +1,769 @@
+/*
+ * Copyright © 2020 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Garret Rieger
+ */
+
+#ifndef HB_REPACKER_HH
+#define HB_REPACKER_HH
+
+#include "hb-open-type.hh"
+#include "hb-map.hh"
+#include "hb-priority-queue.hh"
+#include "hb-serialize.hh"
+#include "hb-vector.hh"
+
+
+struct graph_t
+{
+ struct vertex_t
+ {
+ vertex_t () :
+ distance (0),
+ incoming_edges (0),
+ start (0),
+ end (0),
+ priority(0) {}
+
+ void fini () { obj.fini (); }
+
+ hb_serialize_context_t::object_t obj;
+ int64_t distance;
+ unsigned incoming_edges;
+ unsigned start;
+ unsigned end;
+ unsigned priority;
+
+ bool is_shared () const
+ {
+ return incoming_edges > 1;
+ }
+
+ bool is_leaf () const
+ {
+ return !obj.links.length;
+ }
+
+ void raise_priority ()
+ {
+ priority++;
+ }
+
+ int64_t modified_distance (unsigned order) const
+ {
+ // TODO(garretrieger): once priority is high enough, should try
+ // setting distance = 0 which will force to sort immediately after
+ // it's parent where possible.
+
+ int64_t modified_distance =
+ hb_min (hb_max(distance + distance_modifier (), 0), 0x7FFFFFFFFF);
+ return (modified_distance << 24) | (0x00FFFFFF & order);
+ }
+
+ int64_t distance_modifier () const
+ {
+ if (!priority) return 0;
+ int64_t table_size = obj.tail - obj.head;
+ return -(table_size - table_size / (1 << hb_min(priority, 16u)));
+ }
+ };
+
+ struct overflow_record_t
+ {
+ unsigned parent;
+ const hb_serialize_context_t::object_t::link_t* link;
+ };
+
+ struct clone_buffer_t
+ {
+ clone_buffer_t () : head (nullptr), tail (nullptr) {}
+
+ bool copy (const hb_serialize_context_t::object_t& object)
+ {
+ fini ();
+ unsigned size = object.tail - object.head;
+ head = (char*) hb_malloc (size);
+ if (!head) return false;
+
+ memcpy (head, object.head, size);
+ tail = head + size;
+ return true;
+ }
+
+ char* head;
+ char* tail;
+
+ void fini ()
+ {
+ if (!head) return;
+ hb_free (head);
+ head = nullptr;
+ }
+ };
+
+ /*
+ * A topological sorting of an object graph. Ordered
+ * in reverse serialization order (first object in the
+ * serialization is at the end of the list). This matches
+ * the 'packed' object stack used internally in the
+ * serializer
+ */
+ graph_t (const hb_vector_t<hb_serialize_context_t::object_t *>& objects)
+ : edge_count_invalid (true),
+ distance_invalid (true),
+ positions_invalid (true),
+ successful (true)
+ {
+ bool removed_nil = false;
+ for (unsigned i = 0; i < objects.length; i++)
+ {
+ // TODO(grieger): check all links point to valid objects.
+
+ // If this graph came from a serialization buffer object 0 is the
+ // nil object. We don't need it for our purposes here so drop it.
+ if (i == 0 && !objects[i])
+ {
+ removed_nil = true;
+ continue;
+ }
+
+ vertex_t* v = vertices_.push ();
+ if (check_success (!vertices_.in_error ()))
+ v->obj = *objects[i];
+ if (!removed_nil) continue;
+ for (unsigned i = 0; i < v->obj.links.length; i++)
+ // Fix indices to account for removed nil object.
+ v->obj.links[i].objidx--;
+ }
+ }
+
+ ~graph_t ()
+ {
+ vertices_.fini_deep ();
+ clone_buffers_.fini_deep ();
+ }
+
+ bool in_error () const
+ {
+ return !successful || vertices_.in_error () || clone_buffers_.in_error ();
+ }
+
+ const vertex_t& root () const
+ {
+ return vertices_[root_idx ()];
+ }
+
+ unsigned root_idx () const
+ {
+ // Object graphs are in reverse order, the first object is at the end
+ // of the vector. Since the graph is topologically sorted it's safe to
+ // assume the first object has no incoming edges.
+ return vertices_.length - 1;
+ }
+
+ const hb_serialize_context_t::object_t& object(unsigned i) const
+ {
+ return vertices_[i].obj;
+ }
+
+ /*
+ * serialize graph into the provided serialization buffer.
+ */
+ void serialize (hb_serialize_context_t* c) const
+ {
+ c->start_serialize<void> ();
+ for (unsigned i = 0; i < vertices_.length; i++) {
+ c->push ();
+
+ size_t size = vertices_[i].obj.tail - vertices_[i].obj.head;
+ char* start = c->allocate_size <char> (size);
+ if (!start) return;
+
+ memcpy (start, vertices_[i].obj.head, size);
+
+ for (const auto& link : vertices_[i].obj.links)
+ serialize_link (link, start, c);
+
+ // All duplications are already encoded in the graph, so don't
+ // enable sharing during packing.
+ c->pop_pack (false);
+ }
+ c->end_serialize ();
+ }
+
+ /*
+ * Generates a new topological sorting of graph using Kahn's
+ * algorithm: https://en.wikipedia.org/wiki/Topological_sorting#Algorithms
+ */
+ void sort_kahn ()
+ {
+ positions_invalid = true;
+
+ if (vertices_.length <= 1) {
+ // Graph of 1 or less doesn't need sorting.
+ return;
+ }
+
+ hb_vector_t<unsigned> queue;
+ hb_vector_t<vertex_t> sorted_graph;
+ hb_vector_t<unsigned> id_map;
+ if (unlikely (!check_success (id_map.resize (vertices_.length)))) return;
+
+ hb_vector_t<unsigned> removed_edges;
+ if (unlikely (!check_success (removed_edges.resize (vertices_.length)))) return;
+ update_incoming_edge_count ();
+
+ queue.push (root_idx ());
+ int new_id = vertices_.length - 1;
+
+ while (!queue.in_error () && queue.length)
+ {
+ unsigned next_id = queue[0];
+ queue.remove (0);
+
+ vertex_t& next = vertices_[next_id];
+ sorted_graph.push (next);
+ id_map[next_id] = new_id--;
+
+ for (const auto& link : next.obj.links) {
+ removed_edges[link.objidx]++;
+ if (!(vertices_[link.objidx].incoming_edges - removed_edges[link.objidx]))
+ queue.push (link.objidx);
+ }
+ }
+
+ check_success (!queue.in_error ());
+ check_success (!sorted_graph.in_error ());
+ if (!check_success (new_id == -1))
+ DEBUG_MSG (SUBSET_REPACK, nullptr, "Graph is not fully connected.");
+
+ remap_obj_indices (id_map, &sorted_graph);
+
+ sorted_graph.as_array ().reverse ();
+
+ vertices_.fini_deep ();
+ vertices_ = sorted_graph;
+ sorted_graph.fini_deep ();
+ }
+
+ /*
+ * Generates a new topological sorting of graph ordered by the shortest
+ * distance to each node.
+ */
+ void sort_shortest_distance ()
+ {
+ positions_invalid = true;
+
+ if (vertices_.length <= 1) {
+ // Graph of 1 or less doesn't need sorting.
+ return;
+ }
+
+ update_distances ();
+
+ hb_priority_queue_t queue;
+ hb_vector_t<vertex_t> sorted_graph;
+ hb_vector_t<unsigned> id_map;
+ if (unlikely (!check_success (id_map.resize (vertices_.length)))) return;
+
+ hb_vector_t<unsigned> removed_edges;
+ if (unlikely (!check_success (removed_edges.resize (vertices_.length)))) return;
+ update_incoming_edge_count ();
+
+ queue.insert (root ().modified_distance (0), root_idx ());
+ int new_id = root_idx ();
+ unsigned order = 1;
+ while (!queue.in_error () && !queue.is_empty ())
+ {
+ unsigned next_id = queue.pop_minimum().second;
+
+ vertex_t& next = vertices_[next_id];
+ sorted_graph.push (next);
+ id_map[next_id] = new_id--;
+
+ for (const auto& link : next.obj.links) {
+ removed_edges[link.objidx]++;
+ if (!(vertices_[link.objidx].incoming_edges - removed_edges[link.objidx]))
+ // Add the order that the links were encountered to the priority.
+ // This ensures that ties between priorities objects are broken in a consistent
+ // way. More specifically this is set up so that if a set of objects have the same
+ // distance they'll be added to the topological order in the order that they are
+ // referenced from the parent object.
+ queue.insert (vertices_[link.objidx].modified_distance (order++),
+ link.objidx);
+ }
+ }
+
+ check_success (!queue.in_error ());
+ check_success (!sorted_graph.in_error ());
+ if (!check_success (new_id == -1))
+ DEBUG_MSG (SUBSET_REPACK, nullptr, "Graph is not fully connected.");
+
+ remap_obj_indices (id_map, &sorted_graph);
+
+ sorted_graph.as_array ().reverse ();
+
+ vertices_.fini_deep ();
+ vertices_ = sorted_graph;
+ sorted_graph.fini_deep ();
+ }
+
+ /*
+ * Creates a copy of child and re-assigns the link from
+ * parent to the clone. The copy is a shallow copy, objects
+ * linked from child are not duplicated.
+ */
+ void duplicate (unsigned parent_idx, unsigned child_idx)
+ {
+ DEBUG_MSG (SUBSET_REPACK, nullptr, " Duplicating %d => %d",
+ parent_idx, child_idx);
+
+ positions_invalid = true;
+
+ auto* clone = vertices_.push ();
+ auto& child = vertices_[child_idx];
+ clone_buffer_t* buffer = clone_buffers_.push ();
+ if (vertices_.in_error ()
+ || clone_buffers_.in_error ()
+ || !check_success (buffer->copy (child.obj))) {
+ return;
+ }
+
+ clone->obj.head = buffer->head;
+ clone->obj.tail = buffer->tail;
+ clone->distance = child.distance;
+
+ for (const auto& l : child.obj.links)
+ clone->obj.links.push (l);
+
+ check_success (!clone->obj.links.in_error ());
+
+ auto& parent = vertices_[parent_idx];
+ unsigned clone_idx = vertices_.length - 2;
+ for (unsigned i = 0; i < parent.obj.links.length; i++)
+ {
+ auto& l = parent.obj.links[i];
+ if (l.objidx == child_idx)
+ {
+ l.objidx = clone_idx;
+ clone->incoming_edges++;
+ child.incoming_edges--;
+ }
+ }
+
+ // The last object is the root of the graph, so swap back the root to the end.
+ // The root's obj idx does change, however since it's root nothing else refers to it.
+ // all other obj idx's will be unaffected.
+ vertex_t root = vertices_[vertices_.length - 2];
+ vertices_[vertices_.length - 2] = *clone;
+ vertices_[vertices_.length - 1] = root;
+ }
+
+ /*
+ * Raises the sorting priority of all children.
+ */
+ void raise_childrens_priority (unsigned parent_idx)
+ {
+ DEBUG_MSG (SUBSET_REPACK, nullptr, " Raising priority of all children of %d",
+ parent_idx);
+ // This operation doesn't change ordering until a sort is run, so no need
+ // to invalidate positions. It does not change graph structure so no need
+ // to update distances or edge counts.
+ auto& parent = vertices_[parent_idx].obj;
+ for (unsigned i = 0; i < parent.links.length; i++)
+ vertices_[parent.links[i].objidx].raise_priority ();
+ }
+
+ /*
+ * Will any offsets overflow on graph when it's serialized?
+ */
+ bool will_overflow (hb_vector_t<overflow_record_t>* overflows = nullptr)
+ {
+ if (overflows) overflows->resize (0);
+ update_positions ();
+
+ for (int parent_idx = vertices_.length - 1; parent_idx >= 0; parent_idx--)
+ {
+ for (const auto& link : vertices_[parent_idx].obj.links)
+ {
+ int64_t offset = compute_offset (parent_idx, link);
+ if (is_valid_offset (offset, link))
+ continue;
+
+ if (!overflows) return true;
+
+ overflow_record_t r;
+ r.parent = parent_idx;
+ r.link = &link;
+ overflows->push (r);
+ }
+ }
+
+ if (!overflows) return false;
+ return overflows->length;
+ }
+
+ void print_overflows (const hb_vector_t<overflow_record_t>& overflows)
+ {
+ if (!DEBUG_ENABLED(SUBSET_REPACK)) return;
+
+ update_incoming_edge_count ();
+ for (const auto& o : overflows)
+ {
+ const auto& child = vertices_[o.link->objidx];
+ DEBUG_MSG (SUBSET_REPACK, nullptr, " overflow from %d => %d (%d incoming , %d outgoing)",
+ o.parent,
+ o.link->objidx,
+ child.incoming_edges,
+ child.obj.links.length);
+ }
+ }
+
+ void err_other_error () { this->successful = false; }
+
+ private:
+
+ bool check_success (bool success)
+ { return this->successful && (success || (err_other_error (), false)); }
+
+ /*
+ * Creates a map from objid to # of incoming edges.
+ */
+ void update_incoming_edge_count ()
+ {
+ if (!edge_count_invalid) return;
+
+ for (unsigned i = 0; i < vertices_.length; i++)
+ vertices_[i].incoming_edges = 0;
+
+ for (const vertex_t& v : vertices_)
+ {
+ for (auto& l : v.obj.links)
+ {
+ vertices_[l.objidx].incoming_edges++;
+ }
+ }
+
+ edge_count_invalid = false;
+ }
+
+ /*
+ * compute the serialized start and end positions for each vertex.
+ */
+ void update_positions ()
+ {
+ if (!positions_invalid) return;
+
+ unsigned current_pos = 0;
+ for (int i = root_idx (); i >= 0; i--)
+ {
+ auto& v = vertices_[i];
+ v.start = current_pos;
+ current_pos += v.obj.tail - v.obj.head;
+ v.end = current_pos;
+ }
+
+ positions_invalid = false;
+ }
+
+ /*
+ * Finds the distance to each object in the graph
+ * from the initial node.
+ */
+ void update_distances ()
+ {
+ if (!distance_invalid) return;
+
+ // Uses Dijkstra's algorithm to find all of the shortest distances.
+ // https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
+ //
+ // Implementation Note:
+ // Since our priority queue doesn't support fast priority decreases
+ // we instead just add new entries into the queue when a priority changes.
+ // Redundant ones are filtered out later on by the visited set.
+ // According to https://www3.cs.stonybrook.edu/~rezaul/papers/TR-07-54.pdf
+ // for practical performance this is faster then using a more advanced queue
+ // (such as a fibonaacci queue) with a fast decrease priority.
+ for (unsigned i = 0; i < vertices_.length; i++)
+ {
+ if (i == vertices_.length - 1)
+ vertices_[i].distance = 0;
+ else
+ vertices_[i].distance = hb_int_max (int64_t);
+ }
+
+ hb_priority_queue_t queue;
+ queue.insert (0, vertices_.length - 1);
+
+ hb_set_t visited;
+
+ while (!queue.in_error () && !queue.is_empty ())
+ {
+ unsigned next_idx = queue.pop_minimum ().second;
+ if (visited.has (next_idx)) continue;
+ const auto& next = vertices_[next_idx];
+ int64_t next_distance = vertices_[next_idx].distance;
+ visited.add (next_idx);
+
+ for (const auto& link : next.obj.links)
+ {
+ if (visited.has (link.objidx)) continue;
+
+ const auto& child = vertices_[link.objidx].obj;
+ int64_t child_weight = child.tail - child.head +
+ ((int64_t) 1 << (link.width * 8));
+ int64_t child_distance = next_distance + child_weight;
+
+ if (child_distance < vertices_[link.objidx].distance)
+ {
+ vertices_[link.objidx].distance = child_distance;
+ queue.insert (child_distance, link.objidx);
+ }
+ }
+ }
+
+ check_success (!queue.in_error ());
+ if (!check_success (queue.is_empty ()))
+ {
+ DEBUG_MSG (SUBSET_REPACK, nullptr, "Graph is not fully connected.");
+ return;
+ }
+
+ distance_invalid = false;
+ }
+
+ int64_t compute_offset (
+ unsigned parent_idx,
+ const hb_serialize_context_t::object_t::link_t& link) const
+ {
+ const auto& parent = vertices_[parent_idx];
+ const auto& child = vertices_[link.objidx];
+ int64_t offset = 0;
+ switch ((hb_serialize_context_t::whence_t) link.whence) {
+ case hb_serialize_context_t::whence_t::Head:
+ offset = child.start - parent.start; break;
+ case hb_serialize_context_t::whence_t::Tail:
+ offset = child.start - parent.end; break;
+ case hb_serialize_context_t::whence_t::Absolute:
+ offset = child.start; break;
+ }
+
+ assert (offset >= link.bias);
+ offset -= link.bias;
+ return offset;
+ }
+
+ bool is_valid_offset (int64_t offset,
+ const hb_serialize_context_t::object_t::link_t& link) const
+ {
+ if (link.is_signed)
+ {
+ if (link.width == 4)
+ return offset >= -((int64_t) 1 << 31) && offset < ((int64_t) 1 << 31);
+ else
+ return offset >= -(1 << 15) && offset < (1 << 15);
+ }
+ else
+ {
+ if (link.width == 4)
+ return offset >= 0 && offset < ((int64_t) 1 << 32);
+ else if (link.width == 3)
+ return offset >= 0 && offset < ((int32_t) 1 << 24);
+ else
+ return offset >= 0 && offset < (1 << 16);
+ }
+ }
+
+ /*
+ * Updates all objidx's in all links using the provided mapping.
+ */
+ void remap_obj_indices (const hb_vector_t<unsigned>& id_map,
+ hb_vector_t<vertex_t>* sorted_graph) const
+ {
+ for (unsigned i = 0; i < sorted_graph->length; i++)
+ {
+ for (unsigned j = 0; j < (*sorted_graph)[i].obj.links.length; j++)
+ {
+ auto& link = (*sorted_graph)[i].obj.links[j];
+ link.objidx = id_map[link.objidx];
+ }
+ }
+ }
+
+ template <typename O> void
+ serialize_link_of_type (const hb_serialize_context_t::object_t::link_t& link,
+ char* head,
+ hb_serialize_context_t* c) const
+ {
+ OT::Offset<O>* offset = reinterpret_cast<OT::Offset<O>*> (head + link.position);
+ *offset = 0;
+ c->add_link (*offset,
+ // serializer has an extra nil object at the start of the
+ // object array. So all id's are +1 of what our id's are.
+ link.objidx + 1,
+ (hb_serialize_context_t::whence_t) link.whence,
+ link.bias);
+ }
+
+ void serialize_link (const hb_serialize_context_t::object_t::link_t& link,
+ char* head,
+ hb_serialize_context_t* c) const
+ {
+ switch (link.width)
+ {
+ case 4:
+ if (link.is_signed)
+ {
+ serialize_link_of_type<OT::HBINT32> (link, head, c);
+ } else {
+ serialize_link_of_type<OT::HBUINT32> (link, head, c);
+ }
+ return;
+ case 2:
+ if (link.is_signed)
+ {
+ serialize_link_of_type<OT::HBINT16> (link, head, c);
+ } else {
+ serialize_link_of_type<OT::HBUINT16> (link, head, c);
+ }
+ return;
+ case 3:
+ serialize_link_of_type<OT::HBUINT24> (link, head, c);
+ return;
+ default:
+ // Unexpected link width.
+ assert (0);
+ }
+ }
+
+ public:
+ // TODO(garretrieger): make private, will need to move most of offset overflow code into graph.
+ hb_vector_t<vertex_t> vertices_;
+ private:
+ hb_vector_t<clone_buffer_t> clone_buffers_;
+ bool edge_count_invalid;
+ bool distance_invalid;
+ bool positions_invalid;
+ bool successful;
+};
+
+
+/*
+ * Attempts to modify the topological sorting of the provided object graph to
+ * eliminate offset overflows in the links between objects of the graph. If a
+ * non-overflowing ordering is found the updated graph is serialized it into the
+ * provided serialization context.
+ *
+ * If necessary the structure of the graph may be modified in ways that do not
+ * affect the functionality of the graph. For example shared objects may be
+ * duplicated.
+ */
+inline void
+hb_resolve_overflows (const hb_vector_t<hb_serialize_context_t::object_t *>& packed,
+ hb_serialize_context_t* c) {
+ // Kahn sort is ~twice as fast as shortest distance sort and works for many fonts
+ // so try it first to save time.
+ graph_t sorted_graph (packed);
+ sorted_graph.sort_kahn ();
+ if (!sorted_graph.will_overflow ())
+ {
+ sorted_graph.serialize (c);
+ return;
+ }
+
+ sorted_graph.sort_shortest_distance ();
+
+ unsigned round = 0;
+ hb_vector_t<graph_t::overflow_record_t> overflows;
+ // TODO(garretrieger): select a good limit for max rounds.
+ while (!sorted_graph.in_error ()
+ && sorted_graph.will_overflow (&overflows)
+ && round++ < 10) {
+ DEBUG_MSG (SUBSET_REPACK, nullptr, "=== Over flow resolution round %d ===", round);
+ sorted_graph.print_overflows (overflows);
+
+ bool resolution_attempted = false;
+ hb_set_t priority_bumped_parents;
+ // Try resolving the furthest overflows first.
+ for (int i = overflows.length - 1; i >= 0; i--)
+ {
+ const graph_t::overflow_record_t& r = overflows[i];
+ const auto& child = sorted_graph.vertices_[r.link->objidx];
+ if (child.is_shared ())
+ {
+ // The child object is shared, we may be able to eliminate the overflow
+ // by duplicating it.
+ sorted_graph.duplicate (r.parent, r.link->objidx);
+ resolution_attempted = true;
+
+ // Stop processing overflows for this round so that object order can be
+ // updated to account for the newly added object.
+ break;
+ }
+
+ if (child.is_leaf () && !priority_bumped_parents.has (r.parent))
+ {
+ // This object is too far from it's parent, attempt to move it closer.
+ //
+ // TODO(garretrieger): initially limiting this to leaf's since they can be
+ // moved closer with fewer consequences. However, this can
+ // likely can be used for non-leafs as well.
+ // TODO(garretrieger): add a maximum priority, don't try to raise past this.
+ // TODO(garretrieger): also try lowering priority of the parent. Make it
+ // get placed further up in the ordering, closer to it's children.
+ // this is probably preferable if the total size of the parent object
+ // is < then the total size of the children (and the parent can be moved).
+ // Since in that case moving the parent will cause a smaller increase in
+ // the length of other offsets.
+ sorted_graph.raise_childrens_priority (r.parent);
+ priority_bumped_parents.add (r.parent);
+ resolution_attempted = true;
+ continue;
+ }
+
+ // TODO(garretrieger): add additional offset resolution strategies
+ // - Promotion to extension lookups.
+ // - Table splitting.
+ }
+
+ if (resolution_attempted)
+ {
+ sorted_graph.sort_shortest_distance ();
+ continue;
+ }
+
+ DEBUG_MSG (SUBSET_REPACK, nullptr, "No resolution available :(");
+ c->err (HB_SERIALIZE_ERROR_OFFSET_OVERFLOW);
+ return;
+ }
+
+ if (sorted_graph.in_error ())
+ {
+ c->err (HB_SERIALIZE_ERROR_OTHER);
+ return;
+ }
+ sorted_graph.serialize (c);
+}
+
+
+#endif /* HB_REPACKER_HH */
diff --git a/thirdparty/harfbuzz/src/hb-sanitize.hh b/thirdparty/harfbuzz/src/hb-sanitize.hh
index 1675e8448a..56c46015a6 100644
--- a/thirdparty/harfbuzz/src/hb-sanitize.hh
+++ b/thirdparty/harfbuzz/src/hb-sanitize.hh
@@ -105,7 +105,7 @@
#define HB_SANITIZE_MAX_EDITS 32
#endif
#ifndef HB_SANITIZE_MAX_OPS_FACTOR
-#define HB_SANITIZE_MAX_OPS_FACTOR 8
+#define HB_SANITIZE_MAX_OPS_FACTOR 64
#endif
#ifndef HB_SANITIZE_MAX_OPS_MIN
#define HB_SANITIZE_MAX_OPS_MIN 16384
@@ -233,7 +233,7 @@ struct hb_sanitize_context_t :
(this->start <= p &&
p <= this->end &&
(unsigned int) (this->end - p) >= len &&
- this->max_ops-- > 0);
+ (this->max_ops -= len) > 0);
DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0,
"check_range [%p..%p]"
diff --git a/thirdparty/harfbuzz/src/hb-serialize.hh b/thirdparty/harfbuzz/src/hb-serialize.hh
index fe29bdf96e..7212d9872a 100644
--- a/thirdparty/harfbuzz/src/hb-serialize.hh
+++ b/thirdparty/harfbuzz/src/hb-serialize.hh
@@ -41,6 +41,16 @@
* Serialize
*/
+enum hb_serialize_error_t {
+ HB_SERIALIZE_ERROR_NONE = 0x00000000u,
+ HB_SERIALIZE_ERROR_OTHER = 0x00000001u,
+ HB_SERIALIZE_ERROR_OFFSET_OVERFLOW = 0x00000002u,
+ HB_SERIALIZE_ERROR_OUT_OF_ROOM = 0x00000004u,
+ HB_SERIALIZE_ERROR_INT_OVERFLOW = 0x00000008u,
+ HB_SERIALIZE_ERROR_ARRAY_OVERFLOW = 0x00000010u
+};
+HB_MARK_AS_FLAG_T (hb_serialize_error_t);
+
struct hb_serialize_context_t
{
typedef unsigned objidx_t;
@@ -51,6 +61,8 @@ struct hb_serialize_context_t
Absolute /* Absolute: from the start of the serialize buffer. */
};
+
+
struct object_t
{
void fini () { links.fini (); }
@@ -70,7 +82,7 @@ struct hb_serialize_context_t
struct link_t
{
- bool is_wide: 1;
+ unsigned width: 3;
bool is_signed: 1;
unsigned whence: 2;
unsigned position: 28;
@@ -90,10 +102,11 @@ struct hb_serialize_context_t
char *tail;
object_t *current; // Just for sanity check
unsigned num_links;
+ hb_serialize_error_t errors;
};
snapshot_t snapshot ()
- { return snapshot_t { head, tail, current, current->links.length }; }
+ { return snapshot_t { head, tail, current, current->links.length, errors }; }
hb_serialize_context_t (void *start_, unsigned int size) :
start ((char *) start_),
@@ -117,30 +130,60 @@ struct hb_serialize_context_t
object_pool.fini ();
}
- bool in_error () const { return !this->successful; }
+ bool in_error () const { return bool (errors); }
+
+ bool successful () const { return !bool (errors); }
+
+ HB_NODISCARD bool ran_out_of_room () const { return errors & HB_SERIALIZE_ERROR_OUT_OF_ROOM; }
+ HB_NODISCARD bool offset_overflow () const { return errors & HB_SERIALIZE_ERROR_OFFSET_OVERFLOW; }
+ HB_NODISCARD bool only_offset_overflow () const { return errors == HB_SERIALIZE_ERROR_OFFSET_OVERFLOW; }
+ HB_NODISCARD bool only_overflow () const
+ {
+ return errors == HB_SERIALIZE_ERROR_OFFSET_OVERFLOW
+ || errors == HB_SERIALIZE_ERROR_INT_OVERFLOW
+ || errors == HB_SERIALIZE_ERROR_ARRAY_OVERFLOW;
+ }
+
+ void reset (void *start_, unsigned int size)
+ {
+ start = (char*) start_;
+ end = start + size;
+ reset ();
+ current = nullptr;
+ }
void reset ()
{
- this->successful = true;
- this->ran_out_of_room = false;
+ this->errors = HB_SERIALIZE_ERROR_NONE;
this->head = this->start;
this->tail = this->end;
this->debug_depth = 0;
fini ();
this->packed.push (nullptr);
+ this->packed_map.init ();
}
- bool check_success (bool success)
- { return this->successful && (success || (err_other_error (), false)); }
+ bool check_success (bool success,
+ hb_serialize_error_t err_type = HB_SERIALIZE_ERROR_OTHER)
+ {
+ return successful ()
+ && (success || err (err_type));
+ }
template <typename T1, typename T2>
- bool check_equal (T1 &&v1, T2 &&v2)
- { return check_success ((long long) v1 == (long long) v2); }
+ bool check_equal (T1 &&v1, T2 &&v2, hb_serialize_error_t err_type)
+ {
+ if ((long long) v1 != (long long) v2)
+ {
+ return err (err_type);
+ }
+ return true;
+ }
template <typename T1, typename T2>
- bool check_assign (T1 &v1, T2 &&v2)
- { return check_equal (v1 = v2, v2); }
+ bool check_assign (T1 &v1, T2 &&v2, hb_serialize_error_t err_type)
+ { return check_equal (v1 = v2, v2, err_type); }
template <typename T> bool propagate_error (T &&obj)
{ return check_success (!hb_deref (obj).in_error ()); }
@@ -167,12 +210,18 @@ struct hb_serialize_context_t
"end [%p..%p] serialized %u bytes; %s",
this->start, this->end,
(unsigned) (this->head - this->start),
- this->successful ? "successful" : "UNSUCCESSFUL");
+ successful () ? "successful" : "UNSUCCESSFUL");
propagate_error (packed, packed_map);
if (unlikely (!current)) return;
- if (unlikely (in_error())) return;
+ if (unlikely (in_error()))
+ {
+ // Offset overflows that occur before link resolution cannot be handled
+ // by repacking, so set a more general error.
+ if (offset_overflow ()) err (HB_SERIALIZE_ERROR_OTHER);
+ return;
+ }
assert (!current->next);
@@ -212,7 +261,7 @@ struct hb_serialize_context_t
current = current->next;
revert (obj->head, obj->tail);
obj->fini ();
- object_pool.free (obj);
+ object_pool.release (obj);
}
/* Set share to false when an object is unlikely sharable with others
@@ -275,9 +324,11 @@ struct hb_serialize_context_t
void revert (snapshot_t snap)
{
- if (unlikely (in_error ())) return;
+ // Overflows that happened after the snapshot will be erased by the revert.
+ if (unlikely (in_error () && !only_overflow ())) return;
assert (snap.current == current);
current->links.shrink (snap.num_links);
+ errors = snap.errors;
revert (snap.head, snap.tail);
}
@@ -312,7 +363,6 @@ struct hb_serialize_context_t
whence_t whence = Head,
unsigned bias = 0)
{
- static_assert (sizeof (T) == 2 || sizeof (T) == 4, "");
if (unlikely (in_error ())) return;
if (!objidx)
@@ -322,8 +372,10 @@ struct hb_serialize_context_t
assert (current->head <= (const char *) &ofs);
auto& link = *current->links.push ();
+ if (current->links.in_error ())
+ err (HB_SERIALIZE_ERROR_OTHER);
- link.is_wide = sizeof (T) == 4;
+ link.width = sizeof (T);
link.is_signed = hb_is_signed (hb_unwrap_type (T));
link.whence = (unsigned) whence;
link.position = (const char *) &ofs - current->head;
@@ -351,7 +403,7 @@ struct hb_serialize_context_t
for (const object_t::link_t &link : parent->links)
{
const object_t* child = packed[link.objidx];
- if (unlikely (!child)) { err_other_error(); return; }
+ if (unlikely (!child)) { err (HB_SERIALIZE_ERROR_OTHER); return; }
unsigned offset = 0;
switch ((whence_t) link.whence) {
case Head: offset = child->head - parent->head; break;
@@ -363,15 +415,19 @@ struct hb_serialize_context_t
offset -= link.bias;
if (link.is_signed)
{
- if (link.is_wide)
+ assert (link.width == 2 || link.width == 4);
+ if (link.width == 4)
assign_offset<int32_t> (parent, link, offset);
else
assign_offset<int16_t> (parent, link, offset);
}
else
{
- if (link.is_wide)
+ assert (link.width == 2 || link.width == 3 || link.width == 4);
+ if (link.width == 4)
assign_offset<uint32_t> (parent, link, offset);
+ else if (link.width == 3)
+ assign_offset<uint32_t, 3> (parent, link, offset);
else
assign_offset<uint16_t> (parent, link, offset);
}
@@ -398,22 +454,22 @@ struct hb_serialize_context_t
Type *start_embed (const Type &obj) const
{ return start_embed (hb_addressof (obj)); }
- /* Following two functions exist to allow setting breakpoint on. */
- void err_ran_out_of_room () { this->ran_out_of_room = true; }
- void err_other_error () { this->successful = false; }
+ bool err (hb_serialize_error_t err_type)
+ {
+ return !bool ((errors = (errors | err_type)));
+ }
template <typename Type>
- Type *allocate_size (unsigned int size)
+ Type *allocate_size (size_t size)
{
- if (unlikely (!this->successful)) return nullptr;
+ if (unlikely (in_error ())) return nullptr;
- if (this->tail - this->head < ptrdiff_t (size))
+ if (unlikely (size > INT_MAX || this->tail - this->head < ptrdiff_t (size)))
{
- err_ran_out_of_room ();
- this->successful = false;
+ err (HB_SERIALIZE_ERROR_OUT_OF_ROOM);
return nullptr;
}
- memset (this->head, 0, size);
+ hb_memset (this->head, 0, size);
char *ret = this->head;
this->head += size;
return reinterpret_cast<Type *> (ret);
@@ -468,18 +524,19 @@ struct hb_serialize_context_t
hb_serialize_context_t& operator << (const Type &obj) & { embed (obj); return *this; }
template <typename Type>
- Type *extend_size (Type *obj, unsigned int size)
+ Type *extend_size (Type *obj, size_t size)
{
if (unlikely (in_error ())) return nullptr;
assert (this->start <= (char *) obj);
assert ((char *) obj <= this->head);
- assert ((char *) obj + size >= this->head);
- if (unlikely (!this->allocate_size<Type> (((char *) obj) + size - this->head))) return nullptr;
+ assert ((size_t) (this->head - (char *) obj) <= size);
+ if (unlikely (((char *) obj + size < (char *) obj) ||
+ !this->allocate_size<Type> (((char *) obj) + size - this->head))) return nullptr;
return reinterpret_cast<Type *> (obj);
}
template <typename Type>
- Type *extend_size (Type &obj, unsigned int size)
+ Type *extend_size (Type &obj, size_t size)
{ return extend_size (hb_addressof (obj), size); }
template <typename Type>
@@ -497,12 +554,16 @@ struct hb_serialize_context_t
/* Output routines. */
hb_bytes_t copy_bytes () const
{
- assert (this->successful);
+ assert (successful ());
/* Copy both items from head side and tail side... */
unsigned int len = (this->head - this->start)
+ (this->end - this->tail);
- char *p = (char *) malloc (len);
+ // If len is zero don't hb_malloc as the memory won't get properly
+ // cleaned up later.
+ if (!len) return hb_bytes_t ();
+
+ char *p = (char *) hb_malloc (len);
if (unlikely (!p)) return hb_bytes_t ();
memcpy (p, this->start, this->head - this->start);
@@ -517,23 +578,25 @@ struct hb_serialize_context_t
hb_bytes_t b = copy_bytes ();
return hb_blob_create (b.arrayZ, b.length,
HB_MEMORY_MODE_WRITABLE,
- (char *) b.arrayZ, free);
+ (char *) b.arrayZ, hb_free);
}
+ const hb_vector_t<object_t *>& object_graph() const
+ { return packed; }
+
private:
- template <typename T>
+ template <typename T, unsigned Size = sizeof (T)>
void assign_offset (const object_t* parent, const object_t::link_t &link, unsigned offset)
{
- auto &off = * ((BEInt<T> *) (parent->head + link.position));
+ auto &off = * ((BEInt<T, Size> *) (parent->head + link.position));
assert (0 == off);
- check_assign (off, offset);
+ check_assign (off, offset, HB_SERIALIZE_ERROR_OFFSET_OVERFLOW);
}
public: /* TODO Make private. */
char *start, *head, *tail, *end;
unsigned int debug_depth;
- bool successful;
- bool ran_out_of_room;
+ hb_serialize_error_t errors;
private:
@@ -550,5 +613,4 @@ struct hb_serialize_context_t
hb_hashmap_t<const object_t *, objidx_t, nullptr, 0> packed_map;
};
-
#endif /* HB_SERIALIZE_HH */
diff --git a/thirdparty/harfbuzz/src/hb-set-digest.hh b/thirdparty/harfbuzz/src/hb-set-digest.hh
index b97526f775..1ef1ba5fb2 100644
--- a/thirdparty/harfbuzz/src/hb-set-digest.hh
+++ b/thirdparty/harfbuzz/src/hb-set-digest.hh
@@ -87,6 +87,8 @@ struct hb_set_digest_lowest_bits_t
}
}
template <typename T>
+ void add_array (const hb_array_t<const T>& arr) { add_array (&arr, arr.len ()); }
+ template <typename T>
bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
{
for (unsigned int i = 0; i < count; i++)
@@ -96,6 +98,8 @@ struct hb_set_digest_lowest_bits_t
}
return true;
}
+ template <typename T>
+ bool add_sorted_array (const hb_sorted_array_t<const T>& arr) { return add_sorted_array (&arr, arr.len ()); }
bool may_have (hb_codepoint_t g) const
{ return !!(mask & mask_for (g)); }
@@ -135,12 +139,16 @@ struct hb_set_digest_combiner_t
tail.add_array (array, count, stride);
}
template <typename T>
+ void add_array (const hb_array_t<const T>& arr) { add_array (&arr, arr.len ()); }
+ template <typename T>
bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
{
head.add_sorted_array (array, count, stride);
tail.add_sorted_array (array, count, stride);
return true;
}
+ template <typename T>
+ bool add_sorted_array (const hb_sorted_array_t<const T>& arr) { return add_sorted_array (&arr, arr.len ()); }
bool may_have (hb_codepoint_t g) const
{
diff --git a/thirdparty/harfbuzz/src/hb-set.cc b/thirdparty/harfbuzz/src/hb-set.cc
index 86bf70034c..204dbb5645 100644
--- a/thirdparty/harfbuzz/src/hb-set.cc
+++ b/thirdparty/harfbuzz/src/hb-set.cc
@@ -109,7 +109,7 @@ hb_set_destroy (hb_set_t *set)
set->fini_shallow ();
- free (set);
+ hb_free (set);
}
/**
@@ -169,7 +169,25 @@ hb_set_get_user_data (hb_set_t *set,
hb_bool_t
hb_set_allocation_successful (const hb_set_t *set)
{
- return set->successful;
+ return !set->in_error ();
+}
+
+/**
+ * hb_set_copy:
+ * @set: A set
+ *
+ * Allocate a copy of @set.
+ *
+ * Return value: Newly-allocated set.
+ *
+ * Since: 2.8.2
+ **/
+hb_set_t *
+hb_set_copy (const hb_set_t *set)
+{
+ hb_set_t *copy = hb_set_create ();
+ copy->set (*set);
+ return copy;
}
/**
@@ -183,9 +201,7 @@ hb_set_allocation_successful (const hb_set_t *set)
void
hb_set_clear (hb_set_t *set)
{
- if (unlikely (hb_object_is_immutable (set)))
- return;
-
+ /* Immutible-safe. */
set->clear ();
}
@@ -236,6 +252,7 @@ void
hb_set_add (hb_set_t *set,
hb_codepoint_t codepoint)
{
+ /* Immutible-safe. */
set->add (codepoint);
}
@@ -255,6 +272,7 @@ hb_set_add_range (hb_set_t *set,
hb_codepoint_t first,
hb_codepoint_t last)
{
+ /* Immutible-safe. */
set->add_range (first, last);
}
@@ -271,6 +289,7 @@ void
hb_set_del (hb_set_t *set,
hb_codepoint_t codepoint)
{
+ /* Immutible-safe. */
set->del (codepoint);
}
@@ -283,6 +302,9 @@ hb_set_del (hb_set_t *set,
* Removes all of the elements from @first to @last
* (inclusive) from @set.
*
+ * If @last is #HB_SET_VALUE_INVALID, then all values
+ * greater than or equal to @first are removed.
+ *
* Since: 0.9.7
**/
void
@@ -290,6 +312,7 @@ hb_set_del_range (hb_set_t *set,
hb_codepoint_t first,
hb_codepoint_t last)
{
+ /* Immutible-safe. */
set->del_range (first, last);
}
@@ -309,7 +332,7 @@ hb_bool_t
hb_set_is_equal (const hb_set_t *set,
const hb_set_t *other)
{
- return set->is_equal (other);
+ return set->is_equal (*other);
}
/**
@@ -327,7 +350,7 @@ hb_bool_t
hb_set_is_subset (const hb_set_t *set,
const hb_set_t *larger_set)
{
- return set->is_subset (larger_set);
+ return set->is_subset (*larger_set);
}
/**
@@ -343,7 +366,8 @@ void
hb_set_set (hb_set_t *set,
const hb_set_t *other)
{
- set->set (other);
+ /* Immutible-safe. */
+ set->set (*other);
}
/**
@@ -359,7 +383,8 @@ void
hb_set_union (hb_set_t *set,
const hb_set_t *other)
{
- set->union_ (other);
+ /* Immutible-safe. */
+ set->union_ (*other);
}
/**
@@ -375,7 +400,8 @@ void
hb_set_intersect (hb_set_t *set,
const hb_set_t *other)
{
- set->intersect (other);
+ /* Immutible-safe. */
+ set->intersect (*other);
}
/**
@@ -391,7 +417,8 @@ void
hb_set_subtract (hb_set_t *set,
const hb_set_t *other)
{
- set->subtract (other);
+ /* Immutible-safe. */
+ set->subtract (*other);
}
/**
@@ -408,25 +435,24 @@ void
hb_set_symmetric_difference (hb_set_t *set,
const hb_set_t *other)
{
- set->symmetric_difference (other);
+ /* Immutible-safe. */
+ set->symmetric_difference (*other);
}
-#ifndef HB_DISABLE_DEPRECATED
/**
* hb_set_invert:
* @set: A set
*
* Inverts the contents of @set.
*
- * Since: 0.9.10
- *
- * Deprecated: 1.6.1
+ * Since: 3.0.0
**/
void
-hb_set_invert (hb_set_t *set HB_UNUSED)
+hb_set_invert (hb_set_t *set)
{
+ /* Immutible-safe. */
+ set->invert ();
}
-#endif
/**
* hb_set_get_population:
diff --git a/thirdparty/harfbuzz/src/hb-set.h b/thirdparty/harfbuzz/src/hb-set.h
index 0ad27f4bbd..423225bf96 100644
--- a/thirdparty/harfbuzz/src/hb-set.h
+++ b/thirdparty/harfbuzz/src/hb-set.h
@@ -85,12 +85,18 @@ hb_set_get_user_data (hb_set_t *set,
HB_EXTERN hb_bool_t
hb_set_allocation_successful (const hb_set_t *set);
+HB_EXTERN hb_set_t *
+hb_set_copy (const hb_set_t *set);
+
HB_EXTERN void
hb_set_clear (hb_set_t *set);
HB_EXTERN hb_bool_t
hb_set_is_empty (const hb_set_t *set);
+HB_EXTERN void
+hb_set_invert (hb_set_t *set);
+
HB_EXTERN hb_bool_t
hb_set_has (const hb_set_t *set,
hb_codepoint_t codepoint);
diff --git a/thirdparty/harfbuzz/src/hb-set.hh b/thirdparty/harfbuzz/src/hb-set.hh
index ae8b5eb10f..437e234361 100644
--- a/thirdparty/harfbuzz/src/hb-set.hh
+++ b/thirdparty/harfbuzz/src/hb-set.hh
@@ -1,5 +1,6 @@
/*
* Copyright © 2012,2017 Google, Inc.
+ * Copyright © 2021 Behdad Esfahbod
*
* This is part of HarfBuzz, a text shaping library.
*
@@ -28,420 +29,67 @@
#define HB_SET_HH
#include "hb.hh"
-#include "hb-machinery.hh"
+#include "hb-bit-set-invertible.hh"
-/*
- * hb_set_t
- */
-
-/* TODO Keep a free-list so we can free pages that are completely zeroed. At that
- * point maybe also use a sentinel value for "all-1" pages? */
-
-struct hb_set_t
+template <typename impl_t>
+struct hb_sparseset_t
{
- HB_DELETE_COPY_ASSIGN (hb_set_t);
- hb_set_t () { init (); }
- ~hb_set_t () { fini (); }
-
- struct page_map_t
- {
- int cmp (const page_map_t &o) const { return (int) o.major - (int) major; }
-
- uint32_t major;
- uint32_t index;
- };
-
- struct page_t
- {
- void init0 () { v.clear (); }
- void init1 () { v.clear (0xFF); }
-
- unsigned int len () const
- { return ARRAY_LENGTH_CONST (v); }
-
- bool is_empty () const
- {
- for (unsigned int i = 0; i < len (); i++)
- if (v[i])
- return false;
- return true;
- }
-
- void add (hb_codepoint_t g) { elt (g) |= mask (g); }
- void del (hb_codepoint_t g) { elt (g) &= ~mask (g); }
- bool get (hb_codepoint_t g) const { return elt (g) & mask (g); }
-
- void add_range (hb_codepoint_t a, hb_codepoint_t b)
- {
- elt_t *la = &elt (a);
- elt_t *lb = &elt (b);
- if (la == lb)
- *la |= (mask (b) << 1) - mask(a);
- else
- {
- *la |= ~(mask (a) - 1);
- la++;
-
- memset (la, 0xff, (char *) lb - (char *) la);
-
- *lb |= ((mask (b) << 1) - 1);
- }
- }
-
- void del_range (hb_codepoint_t a, hb_codepoint_t b)
- {
- elt_t *la = &elt (a);
- elt_t *lb = &elt (b);
- if (la == lb)
- *la &= ~((mask (b) << 1) - mask(a));
- else
- {
- *la &= mask (a) - 1;
- la++;
-
- memset (la, 0, (char *) lb - (char *) la);
-
- *lb &= ~((mask (b) << 1) - 1);
- }
- }
-
- bool is_equal (const page_t *other) const
- {
- return 0 == hb_memcmp (&v, &other->v, sizeof (v));
- }
-
- unsigned int get_population () const
- {
- unsigned int pop = 0;
- for (unsigned int i = 0; i < len (); i++)
- pop += hb_popcount (v[i]);
- return pop;
- }
-
- bool next (hb_codepoint_t *codepoint) const
- {
- unsigned int m = (*codepoint + 1) & MASK;
- if (!m)
- {
- *codepoint = INVALID;
- return false;
- }
- unsigned int i = m / ELT_BITS;
- unsigned int j = m & ELT_MASK;
-
- const elt_t vv = v[i] & ~((elt_t (1) << j) - 1);
- for (const elt_t *p = &vv; i < len (); p = &v[++i])
- if (*p)
- {
- *codepoint = i * ELT_BITS + elt_get_min (*p);
- return true;
- }
-
- *codepoint = INVALID;
- return false;
- }
- bool previous (hb_codepoint_t *codepoint) const
- {
- unsigned int m = (*codepoint - 1) & MASK;
- if (m == MASK)
- {
- *codepoint = INVALID;
- return false;
- }
- unsigned int i = m / ELT_BITS;
- unsigned int j = m & ELT_MASK;
-
- /* Fancy mask to avoid shifting by elt_t bitsize, which is undefined. */
- const elt_t mask = j < 8 * sizeof (elt_t) - 1 ?
- ((elt_t (1) << (j + 1)) - 1) :
- (elt_t) -1;
- const elt_t vv = v[i] & mask;
- const elt_t *p = &vv;
- while (true)
- {
- if (*p)
- {
- *codepoint = i * ELT_BITS + elt_get_max (*p);
- return true;
- }
- if ((int) i <= 0) break;
- p = &v[--i];
- }
-
- *codepoint = INVALID;
- return false;
- }
- hb_codepoint_t get_min () const
- {
- for (unsigned int i = 0; i < len (); i++)
- if (v[i])
- return i * ELT_BITS + elt_get_min (v[i]);
- return INVALID;
- }
- hb_codepoint_t get_max () const
- {
- for (int i = len () - 1; i >= 0; i--)
- if (v[i])
- return i * ELT_BITS + elt_get_max (v[i]);
- return 0;
- }
-
- typedef unsigned long long elt_t;
- static constexpr unsigned PAGE_BITS = 512;
- static_assert ((PAGE_BITS & ((PAGE_BITS) - 1)) == 0, "");
-
- static unsigned int elt_get_min (const elt_t &elt) { return hb_ctz (elt); }
- static unsigned int elt_get_max (const elt_t &elt) { return hb_bit_storage (elt) - 1; }
-
- typedef hb_vector_size_t<elt_t, PAGE_BITS / 8> vector_t;
-
- static constexpr unsigned ELT_BITS = sizeof (elt_t) * 8;
- static constexpr unsigned ELT_MASK = ELT_BITS - 1;
- static constexpr unsigned BITS = sizeof (vector_t) * 8;
- static constexpr unsigned MASK = BITS - 1;
- static_assert ((unsigned) PAGE_BITS == (unsigned) BITS, "");
-
- elt_t &elt (hb_codepoint_t g) { return v[(g & MASK) / ELT_BITS]; }
- elt_t const &elt (hb_codepoint_t g) const { return v[(g & MASK) / ELT_BITS]; }
- elt_t mask (hb_codepoint_t g) const { return elt_t (1) << (g & ELT_MASK); }
+ hb_object_header_t header;
+ impl_t s;
- vector_t v;
- };
- static_assert (page_t::PAGE_BITS == sizeof (page_t) * 8, "");
+ hb_sparseset_t () { init (); }
+ ~hb_sparseset_t () { fini (); }
- hb_object_header_t header;
- bool successful; /* Allocations successful */
- mutable unsigned int population;
- hb_sorted_vector_t<page_map_t> page_map;
- hb_vector_t<page_t> pages;
+ hb_sparseset_t (const hb_sparseset_t& other) : hb_sparseset_t () { set (other); }
+ void operator= (const hb_sparseset_t& other) { set (other); }
+ // TODO Add move construtor/assign
+ // TODO Add constructor for Iterator
- void init_shallow ()
- {
- successful = true;
- population = 0;
- page_map.init ();
- pages.init ();
- }
+ void init_shallow () { s.init (); }
void init ()
{
hb_object_init (this);
init_shallow ();
}
- void fini_shallow ()
- {
- population = 0;
- page_map.fini ();
- pages.fini ();
- }
+ void fini_shallow () { s.fini (); }
void fini ()
{
hb_object_fini (this);
fini_shallow ();
}
- bool in_error () const { return !successful; }
-
- bool resize (unsigned int count)
- {
- if (unlikely (count > pages.length && !successful)) return false;
- if (!pages.resize (count) || !page_map.resize (count))
- {
- pages.resize (page_map.length);
- successful = false;
- return false;
- }
- return true;
- }
-
- void reset ()
- {
- successful = true;
- clear ();
- }
-
- void clear ()
- {
- if (resize (0))
- population = 0;
- }
- bool is_empty () const
- {
- unsigned int count = pages.length;
- for (unsigned int i = 0; i < count; i++)
- if (!pages[i].is_empty ())
- return false;
- return true;
- }
explicit operator bool () const { return !is_empty (); }
- void dirty () { population = UINT_MAX; }
-
- void add (hb_codepoint_t g)
- {
- if (unlikely (!successful)) return;
- if (unlikely (g == INVALID)) return;
- dirty ();
- page_t *page = page_for_insert (g); if (unlikely (!page)) return;
- page->add (g);
- }
- bool add_range (hb_codepoint_t a, hb_codepoint_t b)
- {
- if (unlikely (!successful)) return true; /* https://github.com/harfbuzz/harfbuzz/issues/657 */
- if (unlikely (a > b || a == INVALID || b == INVALID)) return false;
- dirty ();
- unsigned int ma = get_major (a);
- unsigned int mb = get_major (b);
- if (ma == mb)
- {
- page_t *page = page_for_insert (a); if (unlikely (!page)) return false;
- page->add_range (a, b);
- }
- else
- {
- page_t *page = page_for_insert (a); if (unlikely (!page)) return false;
- page->add_range (a, major_start (ma + 1) - 1);
+ void err () { s.err (); }
+ bool in_error () const { return s.in_error (); }
- for (unsigned int m = ma + 1; m < mb; m++)
- {
- page = page_for_insert (major_start (m)); if (unlikely (!page)) return false;
- page->init1 ();
- }
+ void reset () { s.reset (); }
+ void clear () { s.clear (); }
+ void invert () { s.invert (); }
+ bool is_empty () const { return s.is_empty (); }
- page = page_for_insert (b); if (unlikely (!page)) return false;
- page->add_range (major_start (mb), b);
- }
- return true;
- }
+ void add (hb_codepoint_t g) { s.add (g); }
+ bool add_range (hb_codepoint_t a, hb_codepoint_t b) { return s.add_range (a, b); }
template <typename T>
void add_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
- {
- if (unlikely (!successful)) return;
- if (!count) return;
- dirty ();
- hb_codepoint_t g = *array;
- while (count)
- {
- unsigned int m = get_major (g);
- page_t *page = page_for_insert (g); if (unlikely (!page)) return;
- unsigned int start = major_start (m);
- unsigned int end = major_start (m + 1);
- do
- {
- page->add (g);
-
- array = &StructAtOffsetUnaligned<T> (array, stride);
- count--;
- }
- while (count && (g = *array, start <= g && g < end));
- }
- }
+ { s.add_array (array, count, stride); }
+ template <typename T>
+ void add_array (const hb_array_t<const T>& arr) { add_array (&arr, arr.len ()); }
/* Might return false if array looks unsorted.
* Used for faster rejection of corrupt data. */
template <typename T>
bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T))
- {
- if (unlikely (!successful)) return true; /* https://github.com/harfbuzz/harfbuzz/issues/657 */
- if (!count) return true;
- dirty ();
- hb_codepoint_t g = *array;
- hb_codepoint_t last_g = g;
- while (count)
- {
- unsigned int m = get_major (g);
- page_t *page = page_for_insert (g); if (unlikely (!page)) return false;
- unsigned int end = major_start (m + 1);
- do
- {
- /* If we try harder we can change the following comparison to <=;
- * Not sure if it's worth it. */
- if (g < last_g) return false;
- last_g = g;
- page->add (g);
-
- array = (const T *) ((const char *) array + stride);
- count--;
- }
- while (count && (g = *array, g < end));
- }
- return true;
- }
-
- void del (hb_codepoint_t g)
- {
- /* TODO perform op even if !successful. */
- if (unlikely (!successful)) return;
- page_t *page = page_for (g);
- if (!page)
- return;
- dirty ();
- page->del (g);
- }
-
- private:
- void del_pages (int ds, int de)
- {
- if (ds <= de)
- {
- // Pre-allocate the workspace that compact() will need so we can bail on allocation failure
- // before attempting to rewrite the page map.
- hb_vector_t<unsigned> compact_workspace;
- if (unlikely (!allocate_compact_workspace (compact_workspace))) return;
-
- unsigned int write_index = 0;
- for (unsigned int i = 0; i < page_map.length; i++)
- {
- int m = (int) page_map[i].major;
- if (m < ds || de < m)
- page_map[write_index++] = page_map[i];
- }
- compact (compact_workspace, write_index);
- resize (write_index);
- }
- }
+ { return s.add_sorted_array (array, count, stride); }
+ template <typename T>
+ bool add_sorted_array (const hb_sorted_array_t<const T>& arr) { return add_sorted_array (&arr, arr.len ()); }
+ void del (hb_codepoint_t g) { s.del (g); }
+ void del_range (hb_codepoint_t a, hb_codepoint_t b) { s.del_range (a, b); }
- public:
- void del_range (hb_codepoint_t a, hb_codepoint_t b)
- {
- /* TODO perform op even if !successful. */
- if (unlikely (!successful)) return;
- if (unlikely (a > b || a == INVALID || b == INVALID)) return;
- dirty ();
- unsigned int ma = get_major (a);
- unsigned int mb = get_major (b);
- /* Delete pages from ds through de if ds <= de. */
- int ds = (a == major_start (ma))? (int) ma: (int) (ma + 1);
- int de = (b + 1 == major_start (mb + 1))? (int) mb: ((int) mb - 1);
- if (ds > de || (int) ma < ds)
- {
- page_t *page = page_for (a);
- if (page)
- {
- if (ma == mb)
- page->del_range (a, b);
- else
- page->del_range (a, major_start (ma + 1) - 1);
- }
- }
- if (de < (int) mb && ma != mb)
- {
- page_t *page = page_for (b);
- if (page)
- page->del_range (major_start (mb), b);
- }
- del_pages (ds, de);
- }
-
- bool get (hb_codepoint_t g) const
- {
- const page_t *page = page_for (g);
- if (!page)
- return false;
- return page->get (g);
- }
+ bool get (hb_codepoint_t g) const { return s.get (g); }
/* Has interface. */
static constexpr bool SENTINEL = false;
@@ -452,464 +100,49 @@ struct hb_set_t
bool operator () (hb_codepoint_t k) const { return has (k); }
/* Sink interface. */
- hb_set_t& operator << (hb_codepoint_t v)
+ hb_sparseset_t& operator << (hb_codepoint_t v)
{ add (v); return *this; }
- hb_set_t& operator << (const hb_pair_t<hb_codepoint_t, hb_codepoint_t>& range)
+ hb_sparseset_t& operator << (const hb_pair_t<hb_codepoint_t, hb_codepoint_t>& range)
{ add_range (range.first, range.second); return *this; }
bool intersects (hb_codepoint_t first, hb_codepoint_t last) const
- {
- hb_codepoint_t c = first - 1;
- return next (&c) && c <= last;
- }
- void set (const hb_set_t *other)
- {
- if (unlikely (!successful)) return;
- unsigned int count = other->pages.length;
- if (!resize (count))
- return;
- population = other->population;
- memcpy ((void *) pages, (const void *) other->pages, count * pages.item_size);
- memcpy ((void *) page_map, (const void *) other->page_map, count * page_map.item_size);
- }
-
- bool is_equal (const hb_set_t *other) const
- {
- if (get_population () != other->get_population ())
- return false;
-
- unsigned int na = pages.length;
- unsigned int nb = other->pages.length;
+ { return s.intersects (first, last); }
- unsigned int a = 0, b = 0;
- for (; a < na && b < nb; )
- {
- if (page_at (a).is_empty ()) { a++; continue; }
- if (other->page_at (b).is_empty ()) { b++; continue; }
- if (page_map[a].major != other->page_map[b].major ||
- !page_at (a).is_equal (&other->page_at (b)))
- return false;
- a++;
- b++;
- }
- for (; a < na; a++)
- if (!page_at (a).is_empty ()) { return false; }
- for (; b < nb; b++)
- if (!other->page_at (b).is_empty ()) { return false; }
+ void set (const hb_sparseset_t &other) { s.set (other.s); }
- return true;
- }
-
- bool is_subset (const hb_set_t *larger_set) const
- {
- if (get_population () > larger_set->get_population ())
- return false;
-
- /* TODO Optimize to use pages. */
- hb_codepoint_t c = INVALID;
- while (next (&c))
- if (!larger_set->has (c))
- return false;
-
- return true;
- }
-
- bool allocate_compact_workspace(hb_vector_t<unsigned>& workspace)
- {
- if (unlikely(!workspace.resize (pages.length)))
- {
- successful = false;
- return false;
- }
-
- return true;
- }
-
-
- /*
- * workspace should be a pre-sized vector allocated to hold at exactly pages.length
- * elements.
- */
- void compact (hb_vector_t<unsigned>& workspace,
- unsigned int length)
- {
- assert(workspace.length == pages.length);
- hb_vector_t<unsigned>& old_index_to_page_map_index = workspace;
-
- hb_fill (old_index_to_page_map_index.writer(), 0xFFFFFFFF);
- /* TODO(iter) Rewrite as dagger? */
- for (unsigned i = 0; i < length; i++)
- old_index_to_page_map_index[page_map[i].index] = i;
-
- compact_pages (old_index_to_page_map_index);
- }
-
- void compact_pages (const hb_vector_t<unsigned>& old_index_to_page_map_index)
- {
- unsigned int write_index = 0;
- for (unsigned int i = 0; i < pages.length; i++)
- {
- if (old_index_to_page_map_index[i] == 0xFFFFFFFF) continue;
+ bool is_equal (const hb_sparseset_t &other) const { return s.is_equal (other.s); }
- if (write_index < i)
- pages[write_index] = pages[i];
+ bool is_subset (const hb_sparseset_t &larger_set) const { return s.is_subset (larger_set.s); }
- page_map[old_index_to_page_map_index[i]].index = write_index;
- write_index++;
- }
- }
-
- template <typename Op>
- void process (const Op& op, const hb_set_t *other)
- {
- const bool passthru_left = op (1, 0);
- const bool passthru_right = op (0, 1);
-
- if (unlikely (!successful)) return;
-
- dirty ();
-
- unsigned int na = pages.length;
- unsigned int nb = other->pages.length;
- unsigned int next_page = na;
-
- unsigned int count = 0, newCount = 0;
- unsigned int a = 0, b = 0;
- unsigned int write_index = 0;
-
- // Pre-allocate the workspace that compact() will need so we can bail on allocation failure
- // before attempting to rewrite the page map.
- hb_vector_t<unsigned> compact_workspace;
- if (!passthru_left && unlikely (!allocate_compact_workspace (compact_workspace))) return;
-
- for (; a < na && b < nb; )
- {
- if (page_map[a].major == other->page_map[b].major)
- {
- if (!passthru_left)
- {
- // Move page_map entries that we're keeping from the left side set
- // to the front of the page_map vector. This isn't necessary if
- // passthru_left is set since no left side pages will be removed
- // in that case.
- if (write_index < a)
- page_map[write_index] = page_map[a];
- write_index++;
- }
-
- count++;
- a++;
- b++;
- }
- else if (page_map[a].major < other->page_map[b].major)
- {
- if (passthru_left)
- count++;
- a++;
- }
- else
- {
- if (passthru_right)
- count++;
- b++;
- }
- }
- if (passthru_left)
- count += na - a;
- if (passthru_right)
- count += nb - b;
+ void union_ (const hb_sparseset_t &other) { s.union_ (other.s); }
+ void intersect (const hb_sparseset_t &other) { s.intersect (other.s); }
+ void subtract (const hb_sparseset_t &other) { s.subtract (other.s); }
+ void symmetric_difference (const hb_sparseset_t &other) { s.symmetric_difference (other.s); }
- if (!passthru_left)
- {
- na = write_index;
- next_page = write_index;
- compact (compact_workspace, write_index);
- }
-
- if (!resize (count))
- return;
-
- newCount = count;
-
- /* Process in-place backward. */
- a = na;
- b = nb;
- for (; a && b; )
- {
- if (page_map[a - 1].major == other->page_map[b - 1].major)
- {
- a--;
- b--;
- count--;
- page_map[count] = page_map[a];
- page_at (count).v = op (page_at (a).v, other->page_at (b).v);
- }
- else if (page_map[a - 1].major > other->page_map[b - 1].major)
- {
- a--;
- if (passthru_left)
- {
- count--;
- page_map[count] = page_map[a];
- }
- }
- else
- {
- b--;
- if (passthru_right)
- {
- count--;
- page_map[count].major = other->page_map[b].major;
- page_map[count].index = next_page++;
- page_at (count).v = other->page_at (b).v;
- }
- }
- }
- if (passthru_left)
- while (a)
- {
- a--;
- count--;
- page_map[count] = page_map [a];
- }
- if (passthru_right)
- while (b)
- {
- b--;
- count--;
- page_map[count].major = other->page_map[b].major;
- page_map[count].index = next_page++;
- page_at (count).v = other->page_at (b).v;
- }
- assert (!count);
- if (pages.length > newCount)
- // This resize() doesn't need to be checked because we can't get here
- // if the set is currently in_error() and this only resizes downwards
- // which will always succeed if the set is not in_error().
- resize (newCount);
- }
-
- void union_ (const hb_set_t *other)
- {
- process (hb_bitwise_or, other);
- }
- void intersect (const hb_set_t *other)
- {
- process (hb_bitwise_and, other);
- }
- void subtract (const hb_set_t *other)
- {
- process (hb_bitwise_sub, other);
- }
- void symmetric_difference (const hb_set_t *other)
- {
- process (hb_bitwise_xor, other);
- }
- bool next (hb_codepoint_t *codepoint) const
- {
- if (unlikely (*codepoint == INVALID)) {
- *codepoint = get_min ();
- return *codepoint != INVALID;
- }
-
- page_map_t map = {get_major (*codepoint), 0};
- unsigned int i;
- page_map.bfind (map, &i, HB_BFIND_NOT_FOUND_STORE_CLOSEST);
- if (i < page_map.length && page_map[i].major == map.major)
- {
- if (pages[page_map[i].index].next (codepoint))
- {
- *codepoint += page_map[i].major * page_t::PAGE_BITS;
- return true;
- }
- i++;
- }
- for (; i < page_map.length; i++)
- {
- hb_codepoint_t m = pages[page_map[i].index].get_min ();
- if (m != INVALID)
- {
- *codepoint = page_map[i].major * page_t::PAGE_BITS + m;
- return true;
- }
- }
- *codepoint = INVALID;
- return false;
- }
- bool previous (hb_codepoint_t *codepoint) const
- {
- if (unlikely (*codepoint == INVALID)) {
- *codepoint = get_max ();
- return *codepoint != INVALID;
- }
-
- page_map_t map = {get_major (*codepoint), 0};
- unsigned int i;
- page_map.bfind (map, &i, HB_BFIND_NOT_FOUND_STORE_CLOSEST);
- if (i < page_map.length && page_map[i].major == map.major)
- {
- if (pages[page_map[i].index].previous (codepoint))
- {
- *codepoint += page_map[i].major * page_t::PAGE_BITS;
- return true;
- }
- }
- i--;
- for (; (int) i >= 0; i--)
- {
- hb_codepoint_t m = pages[page_map[i].index].get_max ();
- if (m != INVALID)
- {
- *codepoint = page_map[i].major * page_t::PAGE_BITS + m;
- return true;
- }
- }
- *codepoint = INVALID;
- return false;
- }
+ bool next (hb_codepoint_t *codepoint) const { return s.next (codepoint); }
+ bool previous (hb_codepoint_t *codepoint) const { return s.previous (codepoint); }
bool next_range (hb_codepoint_t *first, hb_codepoint_t *last) const
- {
- hb_codepoint_t i;
-
- i = *last;
- if (!next (&i))
- {
- *last = *first = INVALID;
- return false;
- }
-
- /* TODO Speed up. */
- *last = *first = i;
- while (next (&i) && i == *last + 1)
- (*last)++;
-
- return true;
- }
+ { return s.next_range (first, last); }
bool previous_range (hb_codepoint_t *first, hb_codepoint_t *last) const
- {
- hb_codepoint_t i;
+ { return s.previous_range (first, last); }
- i = *first;
- if (!previous (&i))
- {
- *last = *first = INVALID;
- return false;
- }
-
- /* TODO Speed up. */
- *last = *first = i;
- while (previous (&i) && i == *first - 1)
- (*first)--;
-
- return true;
- }
-
- unsigned int get_population () const
- {
- if (population != UINT_MAX)
- return population;
+ unsigned int get_population () const { return s.get_population (); }
+ hb_codepoint_t get_min () const { return s.get_min (); }
+ hb_codepoint_t get_max () const { return s.get_max (); }
- unsigned int pop = 0;
- unsigned int count = pages.length;
- for (unsigned int i = 0; i < count; i++)
- pop += pages[i].get_population ();
-
- population = pop;
- return pop;
- }
- hb_codepoint_t get_min () const
- {
- unsigned int count = pages.length;
- for (unsigned int i = 0; i < count; i++)
- if (!page_at (i).is_empty ())
- return page_map[i].major * page_t::PAGE_BITS + page_at (i).get_min ();
- return INVALID;
- }
- hb_codepoint_t get_max () const
- {
- unsigned int count = pages.length;
- for (int i = count - 1; i >= 0; i++)
- if (!page_at (i).is_empty ())
- return page_map[(unsigned) i].major * page_t::PAGE_BITS + page_at (i).get_max ();
- return INVALID;
- }
-
- static constexpr hb_codepoint_t INVALID = HB_SET_VALUE_INVALID;
+ static constexpr hb_codepoint_t INVALID = impl_t::INVALID;
/*
* Iterator implementation.
*/
- struct iter_t : hb_iter_with_fallback_t<iter_t, hb_codepoint_t>
- {
- static constexpr bool is_sorted_iterator = true;
- iter_t (const hb_set_t &s_ = Null (hb_set_t),
- bool init = true) : s (&s_), v (INVALID), l(0)
- {
- if (init)
- {
- l = s->get_population () + 1;
- __next__ ();
- }
- }
-
- typedef hb_codepoint_t __item_t__;
- hb_codepoint_t __item__ () const { return v; }
- bool __more__ () const { return v != INVALID; }
- void __next__ () { s->next (&v); if (l) l--; }
- void __prev__ () { s->previous (&v); }
- unsigned __len__ () const { return l; }
- iter_t end () const { return iter_t (*s, false); }
- bool operator != (const iter_t& o) const
- { return s != o.s || v != o.v; }
-
- protected:
- const hb_set_t *s;
- hb_codepoint_t v;
- unsigned l;
- };
- iter_t iter () const { return iter_t (*this); }
+ using iter_t = typename impl_t::iter_t;
+ iter_t iter () const { return iter_t (this->s); }
operator iter_t () const { return iter (); }
+};
- protected:
-
- page_t *page_for_insert (hb_codepoint_t g)
- {
- page_map_t map = {get_major (g), pages.length};
- unsigned int i;
- if (!page_map.bfind (map, &i, HB_BFIND_NOT_FOUND_STORE_CLOSEST))
- {
- if (!resize (pages.length + 1))
- return nullptr;
+struct hb_set_t : hb_sparseset_t<hb_bit_set_invertible_t> {};
- pages[map.index].init0 ();
- memmove (page_map + i + 1,
- page_map + i,
- (page_map.length - 1 - i) * page_map.item_size);
- page_map[i] = map;
- }
- return &pages[page_map[i].index];
- }
- page_t *page_for (hb_codepoint_t g)
- {
- page_map_t key = {get_major (g)};
- const page_map_t *found = page_map.bsearch (key);
- if (found)
- return &pages[found->index];
- return nullptr;
- }
- const page_t *page_for (hb_codepoint_t g) const
- {
- page_map_t key = {get_major (g)};
- const page_map_t *found = page_map.bsearch (key);
- if (found)
- return &pages[found->index];
- return nullptr;
- }
- page_t &page_at (unsigned int i) { return pages[page_map[i].index]; }
- const page_t &page_at (unsigned int i) const { return pages[page_map[i].index]; }
- unsigned int get_major (hb_codepoint_t g) const { return g / page_t::PAGE_BITS; }
- hb_codepoint_t major_start (unsigned int major) const { return major * page_t::PAGE_BITS; }
-};
+static_assert (hb_set_t::INVALID == HB_SET_VALUE_INVALID, "");
#endif /* HB_SET_HH */
diff --git a/thirdparty/harfbuzz/src/hb-shape-plan.cc b/thirdparty/harfbuzz/src/hb-shape-plan.cc
index 0d9eaddaa6..66332165c3 100644
--- a/thirdparty/harfbuzz/src/hb-shape-plan.cc
+++ b/thirdparty/harfbuzz/src/hb-shape-plan.cc
@@ -66,7 +66,7 @@ hb_shape_plan_key_t::init (bool copy,
const char * const *shaper_list)
{
hb_feature_t *features = nullptr;
- if (copy && num_user_features && !(features = (hb_feature_t *) calloc (num_user_features, sizeof (hb_feature_t))))
+ if (copy && num_user_features && !(features = (hb_feature_t *) hb_calloc (num_user_features, sizeof (hb_feature_t))))
goto bail;
this->props = *props;
@@ -130,7 +130,7 @@ hb_shape_plan_key_t::init (bool copy,
#undef HB_SHAPER_PLAN
bail:
- ::free (features);
+ ::hb_free (features);
return false;
}
@@ -264,9 +264,9 @@ hb_shape_plan_create2 (hb_face_t *face,
#ifndef HB_NO_OT_SHAPE
bail3:
#endif
- shape_plan->key.free ();
+ shape_plan->key.fini ();
bail2:
- free (shape_plan);
+ hb_free (shape_plan);
bail:
return hb_shape_plan_get_empty ();
}
@@ -320,8 +320,8 @@ hb_shape_plan_destroy (hb_shape_plan_t *shape_plan)
#ifndef HB_NO_OT_SHAPE
shape_plan->ot.fini ();
#endif
- shape_plan->key.free ();
- free (shape_plan);
+ shape_plan->key.fini ();
+ hb_free (shape_plan);
}
/**
@@ -404,7 +404,7 @@ _hb_shape_plan_execute_internal (hb_shape_plan_t *shape_plan,
buffer->assert_unicode ();
- if (unlikely (hb_object_is_inert (shape_plan)))
+ if (unlikely (!hb_object_is_valid (shape_plan)))
return false;
assert (shape_plan->face_unsafe == font->face);
@@ -529,7 +529,7 @@ hb_shape_plan_create_cached2 (hb_face_t *face,
retry:
hb_face_t::plan_node_t *cached_plan_nodes = face->shape_plans;
- bool dont_cache = hb_object_is_inert (face);
+ bool dont_cache = !hb_object_is_valid (face);
if (likely (!dont_cache))
{
@@ -560,7 +560,7 @@ retry:
if (unlikely (dont_cache))
return shape_plan;
- hb_face_t::plan_node_t *node = (hb_face_t::plan_node_t *) calloc (1, sizeof (hb_face_t::plan_node_t));
+ hb_face_t::plan_node_t *node = (hb_face_t::plan_node_t *) hb_calloc (1, sizeof (hb_face_t::plan_node_t));
if (unlikely (!node))
return shape_plan;
@@ -570,7 +570,7 @@ retry:
if (unlikely (!face->shape_plans.cmpexch (cached_plan_nodes, node)))
{
hb_shape_plan_destroy (shape_plan);
- free (node);
+ hb_free (node);
goto retry;
}
DEBUG_MSG_FUNC (SHAPE_PLAN, shape_plan, "inserted into cache");
diff --git a/thirdparty/harfbuzz/src/hb-shape-plan.hh b/thirdparty/harfbuzz/src/hb-shape-plan.hh
index 6da7edb2f8..8cb4ddb927 100644
--- a/thirdparty/harfbuzz/src/hb-shape-plan.hh
+++ b/thirdparty/harfbuzz/src/hb-shape-plan.hh
@@ -55,7 +55,7 @@ struct hb_shape_plan_key_t
unsigned int num_coords,
const char * const *shaper_list);
- HB_INTERNAL void free () { ::free ((void *) user_features); }
+ HB_INTERNAL void fini () { hb_free ((void *) user_features); }
HB_INTERNAL bool user_features_match (const hb_shape_plan_key_t *other);
diff --git a/thirdparty/harfbuzz/src/hb-shape.cc b/thirdparty/harfbuzz/src/hb-shape.cc
index c442f4403b..c1f619c81c 100644
--- a/thirdparty/harfbuzz/src/hb-shape.cc
+++ b/thirdparty/harfbuzz/src/hb-shape.cc
@@ -48,9 +48,7 @@
**/
-#if HB_USE_ATEXIT
-static void free_static_shaper_list ();
-#endif
+static inline void free_static_shaper_list ();
static const char *nil_shaper_list[] = {nullptr};
@@ -59,7 +57,7 @@ static struct hb_shaper_list_lazy_loader_t : hb_lazy_loader_t<const char *,
{
static const char ** create ()
{
- const char **shaper_list = (const char **) calloc (1 + HB_SHAPERS_COUNT, sizeof (const char *));
+ const char **shaper_list = (const char **) hb_calloc (1 + HB_SHAPERS_COUNT, sizeof (const char *));
if (unlikely (!shaper_list))
return nullptr;
@@ -69,25 +67,21 @@ static struct hb_shaper_list_lazy_loader_t : hb_lazy_loader_t<const char *,
shaper_list[i] = shapers[i].name;
shaper_list[i] = nullptr;
-#if HB_USE_ATEXIT
- atexit (free_static_shaper_list);
-#endif
+ hb_atexit (free_static_shaper_list);
return shaper_list;
}
static void destroy (const char **l)
- { free (l); }
+ { hb_free (l); }
static const char ** get_null ()
{ return nil_shaper_list; }
} static_shaper_list;
-#if HB_USE_ATEXIT
-static
+static inline
void free_static_shaper_list ()
{
static_shaper_list.free_instance ();
}
-#endif
/**
diff --git a/thirdparty/harfbuzz/src/hb-shaper.cc b/thirdparty/harfbuzz/src/hb-shaper.cc
index 0ea68ad1f5..a11ed83afd 100644
--- a/thirdparty/harfbuzz/src/hb-shaper.cc
+++ b/thirdparty/harfbuzz/src/hb-shaper.cc
@@ -38,9 +38,7 @@ static const hb_shaper_entry_t all_shapers[] = {
static_assert (0 != ARRAY_LENGTH_CONST (all_shapers), "No shaper enabled.");
#endif
-#if HB_USE_ATEXIT
-static void free_static_shapers ();
-#endif
+static inline void free_static_shapers ();
static struct hb_shapers_lazy_loader_t : hb_lazy_loader_t<const hb_shaper_entry_t,
hb_shapers_lazy_loader_t>
@@ -51,7 +49,7 @@ static struct hb_shapers_lazy_loader_t : hb_lazy_loader_t<const hb_shaper_entry_
if (!env || !*env)
return nullptr;
- hb_shaper_entry_t *shapers = (hb_shaper_entry_t *) calloc (1, sizeof (all_shapers));
+ hb_shaper_entry_t *shapers = (hb_shaper_entry_t *) hb_calloc (1, sizeof (all_shapers));
if (unlikely (!shapers))
return nullptr;
@@ -83,23 +81,19 @@ static struct hb_shapers_lazy_loader_t : hb_lazy_loader_t<const hb_shaper_entry_
p = end + 1;
}
-#if HB_USE_ATEXIT
- atexit (free_static_shapers);
-#endif
+ hb_atexit (free_static_shapers);
return shapers;
}
- static void destroy (const hb_shaper_entry_t *p) { free ((void *) p); }
+ static void destroy (const hb_shaper_entry_t *p) { hb_free ((void *) p); }
static const hb_shaper_entry_t *get_null () { return all_shapers; }
} static_shapers;
-#if HB_USE_ATEXIT
-static
+static inline
void free_static_shapers ()
{
static_shapers.free_instance ();
}
-#endif
const hb_shaper_entry_t *
_hb_shapers_get ()
diff --git a/thirdparty/harfbuzz/src/hb-static.cc b/thirdparty/harfbuzz/src/hb-static.cc
index f5b7fa50a0..ec4b241470 100644
--- a/thirdparty/harfbuzz/src/hb-static.cc
+++ b/thirdparty/harfbuzz/src/hb-static.cc
@@ -43,6 +43,7 @@ uint64_t const _hb_NullPool[(HB_NULL_POOL_SIZE + sizeof (uint64_t) - 1) / sizeof
/*thread_local*/ uint64_t _hb_CrapPool[(HB_NULL_POOL_SIZE + sizeof (uint64_t) - 1) / sizeof (uint64_t)] = {};
DEFINE_NULL_NAMESPACE_BYTES (OT, Index) = {0xFF,0xFF};
+DEFINE_NULL_NAMESPACE_BYTES (OT, VarIdx) = {0xFF,0xFF,0xFF,0xFF};
DEFINE_NULL_NAMESPACE_BYTES (OT, LangSys) = {0x00,0x00, 0xFF,0xFF, 0x00,0x00};
DEFINE_NULL_NAMESPACE_BYTES (OT, RangeRecord) = {0x00,0x01, 0x00,0x00, 0x00, 0x00};
DEFINE_NULL_NAMESPACE_BYTES (OT, CmapSubtableLongGroup) = {0x00,0x00,0x00,0x01, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00};
diff --git a/thirdparty/harfbuzz/src/hb-style.cc b/thirdparty/harfbuzz/src/hb-style.cc
index 2f45d119f9..dfb1017c88 100644
--- a/thirdparty/harfbuzz/src/hb-style.cc
+++ b/thirdparty/harfbuzz/src/hb-style.cc
@@ -25,7 +25,6 @@
#include "hb.hh"
#ifndef HB_NO_STYLE
-#ifdef HB_EXPERIMENTAL_API
#include "hb-ot-var-avar-table.hh"
#include "hb-ot-var-fvar-table.hh"
@@ -36,56 +35,46 @@
#include "hb-ot-face.hh"
/**
- * hb_style_tag_t:
- * @HB_STYLE_TAG_ITALIC: Used to vary between non-italic and italic.
- * A value of 0 can be interpreted as "Roman" (non-italic); a value of 1 can
- * be interpreted as (fully) italic.
- * @HB_STYLE_TAG_OPTICAL_SIZE: Used to vary design to suit different text sizes.
- * Non-zero. Values can be interpreted as text size, in points.
- * @HB_STYLE_TAG_SLANT: Used to vary between upright and slanted text. Values
- * must be greater than -90 and less than +90. Values can be interpreted as
- * the angle, in counter-clockwise degrees, of oblique slant from whatever the
- * designer considers to be upright for that font design.
- * @HB_STYLE_TAG_WIDTH: Used to vary width of text from narrower to wider.
- * Non-zero. Values can be interpreted as a percentage of whatever the font
- * designer considers “normal width†for that font design.
- * @HB_STYLE_TAG_WEIGHT: Used to vary stroke thicknesses or other design details
- * to give variation from lighter to blacker. Values can be interpreted in direct
- * comparison to values for usWeightClass in the OS/2 table,
- * or the CSS font-weight property.
+ * SECTION:hb-style
+ * @title: hb-style
+ * @short_description: Font Styles
+ * @include: hb.h
*
- * Defined by https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg
- *
- * Since: EXPERIMENTAL
+ * Functions for fetching style information from fonts.
**/
-typedef enum {
- HB_STYLE_TAG_ITALIC = HB_TAG ('i','t','a','l'),
- HB_STYLE_TAG_OPTICAL_SIZE = HB_TAG ('o','p','s','z'),
- HB_STYLE_TAG_SLANT = HB_TAG ('s','l','n','t'),
- HB_STYLE_TAG_WIDTH = HB_TAG ('w','d','t','h'),
- HB_STYLE_TAG_WEIGHT = HB_TAG ('w','g','h','t'),
- /*< private >*/
- _HB_STYLE_TAG_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/
-} hb_style_tag_t;
+static inline float
+_hb_angle_to_ratio (float a)
+{
+ return tanf (a * float (M_PI / 180.));
+}
+#if 0
+static inline float
+_hb_ratio_to_angle (float r)
+{
+ return atanf (r) * float (180. / M_PI);
+}
+#endif
/**
* hb_style_get_value:
* @font: a #hb_font_t object.
* @style_tag: a style tag.
*
- * Searches variation axes of a hb_font_t object for a specific axis first,
+ * Searches variation axes of a #hb_font_t object for a specific axis first,
* if not set, then tries to get default style values from different
* tables of the font.
*
* Returns: Corresponding axis or default value to a style tag.
*
- * Since: EXPERIMENTAL
+ * Since: 3.0.0
**/
float
-hb_style_get_value (hb_font_t *font, hb_tag_t tag)
+hb_style_get_value (hb_font_t *font, hb_style_tag_t style_tag)
{
- hb_style_tag_t style_tag = (hb_style_tag_t) tag;
+ if (unlikely (style_tag == HB_STYLE_TAG_SLANT_RATIO))
+ return _hb_angle_to_ratio (hb_style_get_value (font, HB_STYLE_TAG_SLANT_ANGLE));
+
hb_face_t *face = font->face;
#ifndef HB_NO_VAR
@@ -112,12 +101,14 @@ hb_style_get_value (hb_font_t *font, hb_tag_t tag)
return face->table.OS2->is_italic () || face->table.head->is_italic () ? 1 : 0;
case HB_STYLE_TAG_OPTICAL_SIZE:
{
- unsigned int lower, upper;
+ unsigned int lower, design, upper;
return face->table.OS2->v5 ().get_optical_size (&lower, &upper)
? (float) (lower + upper) / 2.f
+ : hb_ot_layout_get_size_params (face, &design, nullptr, nullptr, nullptr, nullptr)
+ ? design / 10.f
: 12.f;
}
- case HB_STYLE_TAG_SLANT:
+ case HB_STYLE_TAG_SLANT_ANGLE:
return face->table.post->table->italicAngle.to_float ();
case HB_STYLE_TAG_WIDTH:
return face->table.OS2->has_data ()
@@ -133,4 +124,3 @@ hb_style_get_value (hb_font_t *font, hb_tag_t tag)
}
#endif
-#endif
diff --git a/thirdparty/harfbuzz/src/hb-style.h b/thirdparty/harfbuzz/src/hb-style.h
index f5776cee58..30a6f2b878 100644
--- a/thirdparty/harfbuzz/src/hb-style.h
+++ b/thirdparty/harfbuzz/src/hb-style.h
@@ -33,10 +33,46 @@
HB_BEGIN_DECLS
-#ifdef HB_EXPERIMENTAL_API
+/**
+ * hb_style_tag_t:
+ * @HB_STYLE_TAG_ITALIC: Used to vary between non-italic and italic.
+ * A value of 0 can be interpreted as "Roman" (non-italic); a value of 1 can
+ * be interpreted as (fully) italic.
+ * @HB_STYLE_TAG_OPTICAL_SIZE: Used to vary design to suit different text sizes.
+ * Non-zero. Values can be interpreted as text size, in points.
+ * @HB_STYLE_TAG_SLANT_ANGLE: Used to vary between upright and slanted text. Values
+ * must be greater than -90 and less than +90. Values can be interpreted as
+ * the angle, in counter-clockwise degrees, of oblique slant from whatever the
+ * designer considers to be upright for that font design.
+ * @HB_STYLE_TAG_SLANT_RATIO: same as @HB_STYLE_TAG_SLANT_ANGLE expression as ratio.
+ * @HB_STYLE_TAG_WIDTH: Used to vary width of text from narrower to wider.
+ * Non-zero. Values can be interpreted as a percentage of whatever the font
+ * designer considers “normal width†for that font design.
+ * @HB_STYLE_TAG_WEIGHT: Used to vary stroke thicknesses or other design details
+ * to give variation from lighter to blacker. Values can be interpreted in direct
+ * comparison to values for usWeightClass in the OS/2 table,
+ * or the CSS font-weight property.
+ *
+ * Defined by [OpenType Design-Variation Axis Tag Registry](https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg).
+ *
+ * Since: 3.0.0
+ **/
+typedef enum
+{
+ HB_STYLE_TAG_ITALIC = HB_TAG ('i','t','a','l'),
+ HB_STYLE_TAG_OPTICAL_SIZE = HB_TAG ('o','p','s','z'),
+ HB_STYLE_TAG_SLANT_ANGLE = HB_TAG ('s','l','n','t'),
+ HB_STYLE_TAG_SLANT_RATIO = HB_TAG ('S','l','n','t'),
+ HB_STYLE_TAG_WIDTH = HB_TAG ('w','d','t','h'),
+ HB_STYLE_TAG_WEIGHT = HB_TAG ('w','g','h','t'),
+
+ /*< private >*/
+ _HB_STYLE_TAG_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/
+} hb_style_tag_t;
+
+
HB_EXTERN float
-hb_style_get_value (hb_font_t *font, hb_tag_t style_tag);
-#endif
+hb_style_get_value (hb_font_t *font, hb_style_tag_t style_tag);
HB_END_DECLS
diff --git a/thirdparty/harfbuzz/src/hb-subset-cff-common.cc b/thirdparty/harfbuzz/src/hb-subset-cff-common.cc
index 04e1db24ac..711b2236d6 100644
--- a/thirdparty/harfbuzz/src/hb-subset-cff-common.cc
+++ b/thirdparty/harfbuzz/src/hb-subset-cff-common.cc
@@ -38,13 +38,12 @@
using namespace CFF;
-/**
- * hb_plan_subset_cff_fdselect
- * Determine an optimal FDSelect format according to a provided plan.
+
+/* Determine an optimal FDSelect format according to a provided plan.
*
* Return value: FDSelect format, size, and ranges for the most compact subset FDSelect
* along with a font index remapping table
- **/
+ */
bool
hb_plan_subset_cff_fdselect (const hb_subset_plan_t *plan,
@@ -169,10 +168,7 @@ serialize_fdselect_3_4 (hb_serialize_context_t *c,
return_trace (true);
}
-/**
- * hb_serialize_cff_fdselect
- * Serialize a subset FDSelect format planned above.
- **/
+/* Serialize a subset FDSelect format planned above. */
bool
hb_serialize_cff_fdselect (hb_serialize_context_t *c,
const unsigned int num_glyphs,
diff --git a/thirdparty/harfbuzz/src/hb-subset-cff-common.hh b/thirdparty/harfbuzz/src/hb-subset-cff-common.hh
index 422b20b8d0..7fd96ca86d 100644
--- a/thirdparty/harfbuzz/src/hb-subset-cff-common.hh
+++ b/thirdparty/harfbuzz/src/hb-subset-cff-common.hh
@@ -259,7 +259,10 @@ struct subr_flattener_t
return false;
cs_interpreter_t<ENV, OPSET, flatten_param_t> interp;
interp.env.init (str, acc, fd);
- flatten_param_t param = { flat_charstrings[i], plan->drop_hints };
+ flatten_param_t param = {
+ flat_charstrings[i],
+ (bool) (plan->flags & HB_SUBSET_FLAGS_NO_HINTING)
+ };
if (unlikely (!interp.interpret (param)))
return false;
}
@@ -636,7 +639,7 @@ struct subr_subsetter_t
param.init (&parsed_charstrings[i],
&parsed_global_subrs, &parsed_local_subrs[fd],
closures.global_closure, closures.local_closures[fd],
- plan->drop_hints);
+ plan->flags & HB_SUBSET_FLAGS_NO_HINTING);
if (unlikely (!interp.interpret (param)))
return false;
@@ -645,7 +648,7 @@ struct subr_subsetter_t
SUBSETTER::complete_parsed_str (interp.env, param, parsed_charstrings[i]);
}
- if (plan->drop_hints)
+ if (plan->flags & HB_SUBSET_FLAGS_NO_HINTING)
{
/* mark hint ops and arguments for drop */
for (unsigned int i = 0; i < plan->num_output_glyphs (); i++)
@@ -660,7 +663,7 @@ struct subr_subsetter_t
param.init (&parsed_charstrings[i],
&parsed_global_subrs, &parsed_local_subrs[fd],
closures.global_closure, closures.local_closures[fd],
- plan->drop_hints);
+ plan->flags & HB_SUBSET_FLAGS_NO_HINTING);
drop_hints_param_t drop;
if (drop_hints_in_str (parsed_charstrings[i], param, drop))
@@ -685,7 +688,7 @@ struct subr_subsetter_t
param.init (&parsed_charstrings[i],
&parsed_global_subrs, &parsed_local_subrs[fd],
closures.global_closure, closures.local_closures[fd],
- plan->drop_hints);
+ plan->flags & HB_SUBSET_FLAGS_NO_HINTING);
collect_subr_refs_in_str (parsed_charstrings[i], param);
}
}
diff --git a/thirdparty/harfbuzz/src/hb-subset-cff1.cc b/thirdparty/harfbuzz/src/hb-subset-cff1.cc
index df322f8451..b4e24122c9 100644
--- a/thirdparty/harfbuzz/src/hb-subset-cff1.cc
+++ b/thirdparty/harfbuzz/src/hb-subset-cff1.cc
@@ -402,7 +402,7 @@ struct cff_subset_plan {
void plan_subset_encoding (const OT::cff1::accelerator_subset_t &acc, hb_subset_plan_t *plan)
{
const Encoding *encoding = acc.encoding;
- unsigned int size0, size1, supp_size;
+ unsigned int size0, size1;
hb_codepoint_t code, last_code = CFF_UNDEF_CODE;
hb_vector_t<hb_codepoint_t> supp_codes;
@@ -412,7 +412,6 @@ struct cff_subset_plan {
return;
}
- supp_size = 0;
supp_codes.init ();
subset_enc_num_codes = plan->num_output_glyphs () - 1;
@@ -448,7 +447,6 @@ struct cff_subset_plan {
code_pair_t pair = { supp_codes[i], sid };
subset_enc_supp_codes.push (pair);
}
- supp_size += SuppEncoding::static_size * supp_codes.length;
}
}
supp_codes.fini ();
@@ -545,8 +543,8 @@ struct cff_subset_plan {
num_glyphs = plan->num_output_glyphs ();
orig_fdcount = acc.fdCount;
- drop_hints = plan->drop_hints;
- desubroutinize = plan->desubroutinize;
+ drop_hints = plan->flags & HB_SUBSET_FLAGS_NO_HINTING;
+ desubroutinize = plan->flags & HB_SUBSET_FLAGS_DESUBROUTINIZE;
/* check whether the subset renumbers any glyph IDs */
gid_renum = false;
@@ -919,12 +917,6 @@ _hb_subset_cff1 (const OT::cff1::accelerator_subset_t &acc,
return _serialize_cff1 (c->serializer, cff_plan, acc, c->plan->num_output_glyphs ());
}
-/**
- * hb_subset_cff1:
- * Subsets the CFF table according to a provided plan.
- *
- * Return value: subsetted cff table.
- **/
bool
hb_subset_cff1 (hb_subset_context_t *c)
{
diff --git a/thirdparty/harfbuzz/src/hb-subset-cff2.cc b/thirdparty/harfbuzz/src/hb-subset-cff2.cc
index 17ee040deb..896ae64016 100644
--- a/thirdparty/harfbuzz/src/hb-subset-cff2.cc
+++ b/thirdparty/harfbuzz/src/hb-subset-cff2.cc
@@ -262,8 +262,8 @@ struct cff2_subset_plan {
{
orig_fdcount = acc.fdArray->count;
- drop_hints = plan->drop_hints;
- desubroutinize = plan->desubroutinize;
+ drop_hints = plan->flags & HB_SUBSET_FLAGS_NO_HINTING;
+ desubroutinize = plan->flags & HB_SUBSET_FLAGS_DESUBROUTINIZE;
if (desubroutinize)
{
@@ -470,10 +470,6 @@ _hb_subset_cff2 (const OT::cff2::accelerator_subset_t &acc,
return _serialize_cff2 (c->serializer, cff2_plan, acc, c->plan->num_output_glyphs ());
}
-/**
- * hb_subset_cff2:
- * Subsets the CFF2 table according to a provided subset context.
- **/
bool
hb_subset_cff2 (hb_subset_context_t *c)
{
diff --git a/thirdparty/harfbuzz/src/hb-subset-input.cc b/thirdparty/harfbuzz/src/hb-subset-input.cc
index fe9be3ce02..4885280996 100644
--- a/thirdparty/harfbuzz/src/hb-subset-input.cc
+++ b/thirdparty/harfbuzz/src/hb-subset-input.cc
@@ -30,35 +30,37 @@
/**
* hb_subset_input_create_or_fail:
*
- * Return value: New subset input.
+ * Creates a new subset input object.
+ *
+ * Return value: (transfer full): New subset input, or %NULL if failed. Destroy
+ * with hb_subset_input_destroy().
*
* Since: 1.8.0
**/
hb_subset_input_t *
-hb_subset_input_create_or_fail ()
+hb_subset_input_create_or_fail (void)
{
hb_subset_input_t *input = hb_object_create<hb_subset_input_t>();
if (unlikely (!input))
return nullptr;
- input->unicodes = hb_set_create ();
- input->glyphs = hb_set_create ();
- input->name_ids = hb_set_create ();
- hb_set_add_range (input->name_ids, 0, 6);
- input->name_languages = hb_set_create ();
- hb_set_add (input->name_languages, 0x0409);
- input->drop_tables = hb_set_create ();
- input->drop_hints = false;
- input->desubroutinize = false;
- input->retain_gids = false;
- input->name_legacy = false;
+ for (auto& set : input->sets_iter ())
+ set = hb_set_create ();
+
+ if (input->in_error ())
+ {
+ hb_subset_input_destroy (input);
+ return nullptr;
+ }
+
+ input->flags = HB_SUBSET_FLAGS_DEFAULT;
+
+ hb_set_add_range (input->sets.name_ids, 0, 6);
+ hb_set_add (input->sets.name_languages, 0x0409);
hb_tag_t default_drop_tables[] = {
// Layout disabled by default
- HB_TAG ('G', 'S', 'U', 'B'),
- HB_TAG ('G', 'P', 'O', 'S'),
- HB_TAG ('G', 'D', 'E', 'F'),
HB_TAG ('m', 'o', 'r', 'x'),
HB_TAG ('m', 'o', 'r', 't'),
HB_TAG ('k', 'e', 'r', 'x'),
@@ -81,149 +83,281 @@ hb_subset_input_create_or_fail ()
HB_TAG ('S', 'i', 'l', 'f'),
HB_TAG ('S', 'i', 'l', 'l'),
};
+ input->sets.drop_tables->add_array (default_drop_tables, ARRAY_LENGTH (default_drop_tables));
+
+ hb_tag_t default_no_subset_tables[] = {
+ HB_TAG ('a', 'v', 'a', 'r'),
+ HB_TAG ('f', 'v', 'a', 'r'),
+ HB_TAG ('g', 'a', 's', 'p'),
+ HB_TAG ('c', 'v', 't', ' '),
+ HB_TAG ('f', 'p', 'g', 'm'),
+ HB_TAG ('p', 'r', 'e', 'p'),
+ HB_TAG ('V', 'D', 'M', 'X'),
+ HB_TAG ('D', 'S', 'I', 'G'),
+ HB_TAG ('M', 'V', 'A', 'R'),
+ HB_TAG ('c', 'v', 'a', 'r'),
+ HB_TAG ('S', 'T', 'A', 'T'),
+ };
+ input->sets.no_subset_tables->add_array (default_no_subset_tables,
+ ARRAY_LENGTH (default_no_subset_tables));
+
+ //copied from _layout_features_groups in fonttools
+ hb_tag_t default_layout_features[] = {
+ // default shaper
+ // common
+ HB_TAG ('r', 'v', 'r', 'n'),
+ HB_TAG ('c', 'c', 'm', 'p'),
+ HB_TAG ('l', 'i', 'g', 'a'),
+ HB_TAG ('l', 'o', 'c', 'l'),
+ HB_TAG ('m', 'a', 'r', 'k'),
+ HB_TAG ('m', 'k', 'm', 'k'),
+ HB_TAG ('r', 'l', 'i', 'g'),
- input->drop_tables->add_array (default_drop_tables, ARRAY_LENGTH (default_drop_tables));
+ //fractions
+ HB_TAG ('f', 'r', 'a', 'c'),
+ HB_TAG ('n', 'u', 'm', 'r'),
+ HB_TAG ('d', 'n', 'o', 'm'),
+ //horizontal
+ HB_TAG ('c', 'a', 'l', 't'),
+ HB_TAG ('c', 'l', 'i', 'g'),
+ HB_TAG ('c', 'u', 'r', 's'),
+ HB_TAG ('k', 'e', 'r', 'n'),
+ HB_TAG ('r', 'c', 'l', 't'),
+
+ //vertical
+ HB_TAG ('v', 'a', 'l', 't'),
+ HB_TAG ('v', 'e', 'r', 't'),
+ HB_TAG ('v', 'k', 'r', 'n'),
+ HB_TAG ('v', 'p', 'a', 'l'),
+ HB_TAG ('v', 'r', 't', '2'),
+
+ //ltr
+ HB_TAG ('l', 't', 'r', 'a'),
+ HB_TAG ('l', 't', 'r', 'm'),
+
+ //rtl
+ HB_TAG ('r', 't', 'l', 'a'),
+ HB_TAG ('r', 't', 'l', 'm'),
+
+ //Complex shapers
+ //arabic
+ HB_TAG ('i', 'n', 'i', 't'),
+ HB_TAG ('m', 'e', 'd', 'i'),
+ HB_TAG ('f', 'i', 'n', 'a'),
+ HB_TAG ('i', 's', 'o', 'l'),
+ HB_TAG ('m', 'e', 'd', '2'),
+ HB_TAG ('f', 'i', 'n', '2'),
+ HB_TAG ('f', 'i', 'n', '3'),
+ HB_TAG ('c', 's', 'w', 'h'),
+ HB_TAG ('m', 's', 'e', 't'),
+ HB_TAG ('s', 't', 'c', 'h'),
+
+ //hangul
+ HB_TAG ('l', 'j', 'm', 'o'),
+ HB_TAG ('v', 'j', 'm', 'o'),
+ HB_TAG ('t', 'j', 'm', 'o'),
+
+ //tibetan
+ HB_TAG ('a', 'b', 'v', 's'),
+ HB_TAG ('b', 'l', 'w', 's'),
+ HB_TAG ('a', 'b', 'v', 'm'),
+ HB_TAG ('b', 'l', 'w', 'm'),
+
+ //indic
+ HB_TAG ('n', 'u', 'k', 't'),
+ HB_TAG ('a', 'k', 'h', 'n'),
+ HB_TAG ('r', 'p', 'h', 'f'),
+ HB_TAG ('r', 'k', 'r', 'f'),
+ HB_TAG ('p', 'r', 'e', 'f'),
+ HB_TAG ('b', 'l', 'w', 'f'),
+ HB_TAG ('h', 'a', 'l', 'f'),
+ HB_TAG ('a', 'b', 'v', 'f'),
+ HB_TAG ('p', 's', 't', 'f'),
+ HB_TAG ('c', 'f', 'a', 'r'),
+ HB_TAG ('v', 'a', 't', 'u'),
+ HB_TAG ('c', 'j', 'c', 't'),
+ HB_TAG ('i', 'n', 'i', 't'),
+ HB_TAG ('p', 'r', 'e', 's'),
+ HB_TAG ('a', 'b', 'v', 's'),
+ HB_TAG ('b', 'l', 'w', 's'),
+ HB_TAG ('p', 's', 't', 's'),
+ HB_TAG ('h', 'a', 'l', 'n'),
+ HB_TAG ('d', 'i', 's', 't'),
+ HB_TAG ('a', 'b', 'v', 'm'),
+ HB_TAG ('b', 'l', 'w', 'm'),
+ };
+
+ input->sets.layout_features->add_array (default_layout_features, ARRAY_LENGTH (default_layout_features));
+
+ if (input->in_error ())
+ {
+ hb_subset_input_destroy (input);
+ return nullptr;
+ }
return input;
}
/**
* hb_subset_input_reference: (skip)
- * @subset_input: a subset_input.
+ * @input: a #hb_subset_input_t object.
*
+ * Increases the reference count on @input.
*
- *
- * Return value:
+ * Return value: @input.
*
* Since: 1.8.0
**/
hb_subset_input_t *
-hb_subset_input_reference (hb_subset_input_t *subset_input)
+hb_subset_input_reference (hb_subset_input_t *input)
{
- return hb_object_reference (subset_input);
+ return hb_object_reference (input);
}
/**
* hb_subset_input_destroy:
- * @subset_input: a subset_input.
+ * @input: a #hb_subset_input_t object.
+ *
+ * Decreases the reference count on @input, and if it reaches zero, destroys
+ * @input, freeing all memory.
*
* Since: 1.8.0
**/
void
-hb_subset_input_destroy (hb_subset_input_t *subset_input)
+hb_subset_input_destroy (hb_subset_input_t *input)
{
- if (!hb_object_destroy (subset_input)) return;
+ if (!hb_object_destroy (input)) return;
- hb_set_destroy (subset_input->unicodes);
- hb_set_destroy (subset_input->glyphs);
- hb_set_destroy (subset_input->name_ids);
- hb_set_destroy (subset_input->name_languages);
- hb_set_destroy (subset_input->drop_tables);
+ for (hb_set_t* set : input->sets_iter ())
+ hb_set_destroy (set);
- free (subset_input);
+ hb_free (input);
}
/**
* hb_subset_input_unicode_set:
- * @subset_input: a subset_input.
+ * @input: a #hb_subset_input_t object.
+ *
+ * Gets the set of Unicode code points to retain, the caller should modify the
+ * set as needed.
+ *
+ * Return value: (transfer none): pointer to the #hb_set_t of Unicode code
+ * points.
*
* Since: 1.8.0
**/
HB_EXTERN hb_set_t *
-hb_subset_input_unicode_set (hb_subset_input_t *subset_input)
+hb_subset_input_unicode_set (hb_subset_input_t *input)
{
- return subset_input->unicodes;
+ return input->sets.unicodes;
}
/**
* hb_subset_input_glyph_set:
- * @subset_input: a subset_input.
+ * @input: a #hb_subset_input_t object.
+ *
+ * Gets the set of glyph IDs to retain, the caller should modify the set as
+ * needed.
+ *
+ * Return value: (transfer none): pointer to the #hb_set_t of glyph IDs.
*
* Since: 1.8.0
**/
HB_EXTERN hb_set_t *
-hb_subset_input_glyph_set (hb_subset_input_t *subset_input)
-{
- return subset_input->glyphs;
-}
-
-HB_EXTERN hb_set_t *
-hb_subset_input_nameid_set (hb_subset_input_t *subset_input)
-{
- return subset_input->name_ids;
-}
-
-HB_EXTERN hb_set_t *
-hb_subset_input_namelangid_set (hb_subset_input_t *subset_input)
+hb_subset_input_glyph_set (hb_subset_input_t *input)
{
- return subset_input->name_languages;
+ return input->sets.glyphs;
}
+/**
+ * hb_subset_input_set:
+ * @input: a #hb_subset_input_t object.
+ * @set_type: a #hb_subset_sets_t set type.
+ *
+ * Gets the set of the specified type.
+ *
+ * Return value: (transfer none): pointer to the #hb_set_t of the specified type.
+ *
+ * Since: 2.9.1
+ **/
HB_EXTERN hb_set_t *
-hb_subset_input_drop_tables_set (hb_subset_input_t *subset_input)
-{
- return subset_input->drop_tables;
-}
-
-HB_EXTERN void
-hb_subset_input_set_drop_hints (hb_subset_input_t *subset_input,
- hb_bool_t drop_hints)
+hb_subset_input_set (hb_subset_input_t *input, hb_subset_sets_t set_type)
{
- subset_input->drop_hints = drop_hints;
+ return input->sets_iter () [set_type];
}
-HB_EXTERN hb_bool_t
-hb_subset_input_get_drop_hints (hb_subset_input_t *subset_input)
-{
- return subset_input->drop_hints;
-}
-
-HB_EXTERN void
-hb_subset_input_set_desubroutinize (hb_subset_input_t *subset_input,
- hb_bool_t desubroutinize)
-{
- subset_input->desubroutinize = desubroutinize;
-}
-
-HB_EXTERN hb_bool_t
-hb_subset_input_get_desubroutinize (hb_subset_input_t *subset_input)
+/**
+ * hb_subset_input_get_flags:
+ * @input: a #hb_subset_input_t object.
+ *
+ * Gets all of the subsetting flags in the input object.
+ *
+ * Return value: the subsetting flags bit field.
+ *
+ * Since: 2.9.0
+ **/
+HB_EXTERN hb_subset_flags_t
+hb_subset_input_get_flags (hb_subset_input_t *input)
{
- return subset_input->desubroutinize;
+ return (hb_subset_flags_t) input->flags;
}
/**
- * hb_subset_input_set_retain_gids:
- * @subset_input: a subset_input.
- * @retain_gids: If true the subsetter will not renumber glyph ids.
- * Since: 2.4.0
+ * hb_subset_input_set_flags:
+ * @input: a #hb_subset_input_t object.
+ * @value: bit field of flags
+ *
+ * Sets all of the flags in the input object to the values specified by the bit
+ * field.
+ *
+ * Since: 2.9.0
**/
HB_EXTERN void
-hb_subset_input_set_retain_gids (hb_subset_input_t *subset_input,
- hb_bool_t retain_gids)
+hb_subset_input_set_flags (hb_subset_input_t *input,
+ unsigned value)
{
- subset_input->retain_gids = retain_gids;
+ input->flags = (hb_subset_flags_t) value;
}
/**
- * hb_subset_input_get_retain_gids:
- * Returns: value of retain_gids.
- * Since: 2.4.0
+ * hb_subset_input_set_user_data: (skip)
+ * @input: a #hb_subset_input_t object.
+ * @key: The user-data key to set
+ * @data: A pointer to the user data
+ * @destroy: (nullable): A callback to call when @data is not needed anymore
+ * @replace: Whether to replace an existing data with the same key
+ *
+ * Attaches a user-data key/data pair to the given subset input object.
+ *
+ * Return value: %true if success, %false otherwise
+ *
+ * Since: 2.9.0
**/
-HB_EXTERN hb_bool_t
-hb_subset_input_get_retain_gids (hb_subset_input_t *subset_input)
+hb_bool_t
+hb_subset_input_set_user_data (hb_subset_input_t *input,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace)
{
- return subset_input->retain_gids;
+ return hb_object_set_user_data (input, key, data, destroy, replace);
}
-HB_EXTERN void
-hb_subset_input_set_name_legacy (hb_subset_input_t *subset_input,
- hb_bool_t name_legacy)
-{
- subset_input->name_legacy = name_legacy;
-}
-
-HB_EXTERN hb_bool_t
-hb_subset_input_get_name_legacy (hb_subset_input_t *subset_input)
+/**
+ * hb_subset_input_get_user_data: (skip)
+ * @input: a #hb_subset_input_t object.
+ * @key: The user-data key to query
+ *
+ * Fetches the user data associated with the specified key,
+ * attached to the specified subset input object.
+ *
+ * Return value: (transfer none): A pointer to the user data
+ *
+ * Since: 2.9.0
+ **/
+void *
+hb_subset_input_get_user_data (const hb_subset_input_t *input,
+ hb_user_data_key_t *key)
{
- return subset_input->name_legacy;
+ return hb_object_get_user_data (input, key);
}
diff --git a/thirdparty/harfbuzz/src/hb-subset-input.hh b/thirdparty/harfbuzz/src/hb-subset-input.hh
index 0aeb96695b..a3e28b0562 100644
--- a/thirdparty/harfbuzz/src/hb-subset-input.hh
+++ b/thirdparty/harfbuzz/src/hb-subset-input.hh
@@ -31,30 +31,51 @@
#include "hb.hh"
#include "hb-subset.h"
+#include "hb-map.hh"
+#include "hb-set.hh"
#include "hb-font.hh"
+HB_MARK_AS_FLAG_T (hb_subset_flags_t);
+
struct hb_subset_input_t
{
hb_object_header_t header;
- hb_set_t *unicodes;
- hb_set_t *glyphs;
- hb_set_t *name_ids;
- hb_set_t *name_languages;
- hb_set_t *drop_tables;
-
- bool drop_hints;
- bool desubroutinize;
- bool retain_gids;
- bool name_legacy;
- /* TODO
- *
- * features
- * lookups
- * name_ids
- * ...
- */
+ union {
+ struct {
+ hb_set_t *glyphs;
+ hb_set_t *unicodes;
+ hb_set_t *no_subset_tables;
+ hb_set_t *drop_tables;
+ hb_set_t *name_ids;
+ hb_set_t *name_languages;
+ hb_set_t *layout_features;
+ } sets;
+ hb_set_t* set_ptrs[sizeof (sets) / sizeof (hb_set_t*)];
+ };
+
+ unsigned flags;
+
+ inline unsigned num_sets () const
+ {
+ return sizeof (set_ptrs) / sizeof (hb_set_t*);
+ }
+
+ inline hb_array_t<hb_set_t*> sets_iter ()
+ {
+ return hb_array_t<hb_set_t*> (set_ptrs, num_sets ());
+ }
+
+ bool in_error () const
+ {
+ for (unsigned i = 0; i < num_sets (); i++)
+ {
+ if (unlikely (set_ptrs[i]->in_error ()))
+ return true;
+ }
+ return false;
+ }
};
diff --git a/thirdparty/harfbuzz/src/hb-subset-plan.cc b/thirdparty/harfbuzz/src/hb-subset-plan.cc
index d055783a4d..677df35fad 100644
--- a/thirdparty/harfbuzz/src/hb-subset-plan.cc
+++ b/thirdparty/harfbuzz/src/hb-subset-plan.cc
@@ -35,10 +35,12 @@
#include "hb-ot-layout-gsub-table.hh"
#include "hb-ot-cff1-table.hh"
#include "hb-ot-color-colr-table.hh"
+#include "hb-ot-color-colrv1-closure.hh"
#include "hb-ot-var-fvar-table.hh"
#include "hb-ot-stat-table.hh"
+typedef hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> script_langsys_map;
#ifndef HB_NO_SUBSET_CFF
static inline void
_add_cff_seac_components (const OT::cff1::accelerator_t &cff,
@@ -54,7 +56,23 @@ _add_cff_seac_components (const OT::cff1::accelerator_t &cff,
}
#endif
-#ifndef HB_NO_SUBSET_LAYOUT
+static void
+_remap_palette_indexes (const hb_set_t *palette_indexes,
+ hb_map_t *mapping /* OUT */)
+{
+ unsigned new_idx = 0;
+ for (unsigned palette_index : palette_indexes->iter ())
+ {
+ if (palette_index == 0xFFFF)
+ {
+ mapping->set (palette_index, palette_index);
+ continue;
+ }
+ mapping->set (palette_index, new_idx);
+ new_idx++;
+ }
+}
+
static void
_remap_indexes (const hb_set_t *indexes,
hb_map_t *mapping /* OUT */)
@@ -66,73 +84,100 @@ _remap_indexes (const hb_set_t *indexes,
}
-static inline void
-_gsub_closure_glyphs_lookups_features (hb_face_t *face,
- hb_set_t *gids_to_retain,
- hb_map_t *gsub_lookups,
- hb_map_t *gsub_features)
+#ifndef HB_NO_SUBSET_LAYOUT
+typedef void (*layout_collect_func_t) (hb_face_t *face, hb_tag_t table_tag, const hb_tag_t *scripts, const hb_tag_t *languages, const hb_tag_t *features, hb_set_t *lookup_indexes /* OUT */);
+
+
+template <typename T>
+static void _collect_layout_indices (hb_face_t *face,
+ const T& table,
+ const hb_set_t *layout_features_to_retain,
+ layout_collect_func_t layout_collect_func,
+ hb_set_t *indices /* OUT */)
{
- hb_set_t lookup_indices;
- hb_ot_layout_collect_lookups (face,
- HB_OT_TAG_GSUB,
- nullptr,
- nullptr,
- nullptr,
- &lookup_indices);
- hb_ot_layout_lookups_substitute_closure (face,
- &lookup_indices,
- gids_to_retain);
- hb_blob_ptr_t<OT::GSUB> gsub = hb_sanitize_context_t ().reference_table<OT::GSUB> (face);
- gsub->closure_lookups (face,
- gids_to_retain,
- &lookup_indices);
- _remap_indexes (&lookup_indices, gsub_lookups);
+ hb_vector_t<hb_tag_t> features;
+ if (!features.alloc (table.get_feature_count () + 1))
+ return;
- // Collect and prune features
- hb_set_t feature_indices;
- hb_ot_layout_collect_features (face,
- HB_OT_TAG_GSUB,
- nullptr,
- nullptr,
- nullptr,
- &feature_indices);
- gsub->prune_features (gsub_lookups, &feature_indices);
- _remap_indexes (&feature_indices, gsub_features);
-
- gsub.destroy ();
+ for (unsigned i = 0; i < table.get_feature_count (); i++)
+ {
+ hb_tag_t tag = table.get_feature_tag (i);
+ if (tag && layout_features_to_retain->has (tag))
+ features.push (tag);
+ }
+
+ if (!features)
+ return;
+
+ // The collect function needs a null element to signal end of the array.
+ features.push (0);
+
+ if (features.get_size () == table.get_feature_count () + 1)
+ {
+ // Looking for all features, trigger the faster collection method.
+ layout_collect_func (face,
+ T::tableTag,
+ nullptr,
+ nullptr,
+ nullptr,
+ indices);
+ return;
+ }
+
+ layout_collect_func (face,
+ T::tableTag,
+ nullptr,
+ nullptr,
+ features.arrayZ,
+ indices);
}
+template <typename T>
static inline void
-_gpos_closure_lookups_features (hb_face_t *face,
- const hb_set_t *gids_to_retain,
- hb_map_t *gpos_lookups,
- hb_map_t *gpos_features)
+_closure_glyphs_lookups_features (hb_face_t *face,
+ hb_set_t *gids_to_retain,
+ const hb_set_t *layout_features_to_retain,
+ hb_map_t *lookups,
+ hb_map_t *features,
+ script_langsys_map *langsys_map)
{
+ hb_blob_ptr_t<T> table = hb_sanitize_context_t ().reference_table<T> (face);
+ hb_tag_t table_tag = table->tableTag;
hb_set_t lookup_indices;
- hb_ot_layout_collect_lookups (face,
- HB_OT_TAG_GPOS,
- nullptr,
- nullptr,
- nullptr,
- &lookup_indices);
- hb_blob_ptr_t<OT::GPOS> gpos = hb_sanitize_context_t ().reference_table<OT::GPOS> (face);
- gpos->closure_lookups (face,
- gids_to_retain,
+ _collect_layout_indices<T> (face,
+ *table,
+ layout_features_to_retain,
+ hb_ot_layout_collect_lookups,
+ &lookup_indices);
+
+ if (table_tag == HB_OT_TAG_GSUB)
+ hb_ot_layout_lookups_substitute_closure (face,
+ &lookup_indices,
+ gids_to_retain);
+ table->closure_lookups (face,
+ gids_to_retain,
&lookup_indices);
- _remap_indexes (&lookup_indices, gpos_lookups);
+ _remap_indexes (&lookup_indices, lookups);
// Collect and prune features
hb_set_t feature_indices;
- hb_ot_layout_collect_features (face,
- HB_OT_TAG_GPOS,
- nullptr,
- nullptr,
- nullptr,
- &feature_indices);
- gpos->prune_features (gpos_lookups, &feature_indices);
- _remap_indexes (&feature_indices, gpos_features);
- gpos.destroy ();
+ _collect_layout_indices<T> (face,
+ *table,
+ layout_features_to_retain,
+ hb_ot_layout_collect_features,
+ &feature_indices);
+
+ table->prune_features (lookups, &feature_indices);
+ hb_map_t duplicate_feature_map;
+ table->find_duplicate_features (lookups, &feature_indices, &duplicate_feature_map);
+
+ feature_indices.clear ();
+ table->prune_langsys (&duplicate_feature_map, langsys_map, &feature_indices);
+ _remap_indexes (&feature_indices, features);
+
+ table.destroy ();
}
+
#endif
#ifndef HB_NO_VAR
@@ -166,9 +211,9 @@ static inline void
#endif
static inline void
-_cmap_closure (hb_face_t *face,
- const hb_set_t *unicodes,
- hb_set_t *glyphset)
+_cmap_closure (hb_face_t *face,
+ const hb_set_t *unicodes,
+ hb_set_t *glyphset)
{
OT::cmap::accelerator_t cmap;
cmap.init (face);
@@ -189,20 +234,74 @@ _remove_invalid_gids (hb_set_t *glyphs,
}
static void
+_populate_unicodes_to_retain (const hb_set_t *unicodes,
+ const hb_set_t *glyphs,
+ hb_subset_plan_t *plan)
+{
+ OT::cmap::accelerator_t cmap;
+ cmap.init (plan->source);
+
+ constexpr static const int size_threshold = 4096;
+
+ if (glyphs->is_empty () && unicodes->get_population () < size_threshold)
+ {
+ /* This is the fast path if it's anticipated that size of unicodes
+ * is << than the number of codepoints in the font. */
+ for (hb_codepoint_t cp : *unicodes)
+ {
+ hb_codepoint_t gid;
+ if (!cmap.get_nominal_glyph (cp, &gid))
+ {
+ DEBUG_MSG(SUBSET, nullptr, "Drop U+%04X; no gid", cp);
+ continue;
+ }
+
+ plan->codepoint_to_glyph->set (cp, gid);
+ }
+ }
+ else
+ {
+ hb_map_t unicode_glyphid_map;
+ cmap.collect_mapping (hb_set_get_empty (), &unicode_glyphid_map);
+
+ for (hb_pair_t<hb_codepoint_t, hb_codepoint_t> cp_gid :
+ + unicode_glyphid_map.iter ())
+ {
+ if (!unicodes->has (cp_gid.first) && !glyphs->has (cp_gid.second))
+ continue;
+
+ plan->codepoint_to_glyph->set (cp_gid.first, cp_gid.second);
+ }
+
+ /* Add gids which where requested, but not mapped in cmap */
+ // TODO(garretrieger):
+ // Once https://github.com/harfbuzz/harfbuzz/issues/3169
+ // is implemented, this can be done with union and del_range
+ for (hb_codepoint_t gid : glyphs->iter ())
+ {
+ if (gid >= plan->source->get_num_glyphs ())
+ break;
+ plan->_glyphset_gsub->add (gid);
+ }
+ }
+
+ + plan->codepoint_to_glyph->keys () | hb_sink (plan->unicodes);
+ + plan->codepoint_to_glyph->values () | hb_sink (plan->_glyphset_gsub);
+
+ cmap.fini ();
+}
+
+static void
_populate_gids_to_retain (hb_subset_plan_t* plan,
- const hb_set_t *unicodes,
- const hb_set_t *input_glyphs_to_retain,
bool close_over_gsub,
bool close_over_gpos,
bool close_over_gdef)
{
- OT::cmap::accelerator_t cmap;
OT::glyf::accelerator_t glyf;
#ifndef HB_NO_SUBSET_CFF
OT::cff1::accelerator_t cff;
#endif
OT::COLR::accelerator_t colr;
- cmap.init (plan->source);
glyf.init (plan->source);
#ifndef HB_NO_SUBSET_CFF
cff.init (plan->source);
@@ -210,73 +309,88 @@ _populate_gids_to_retain (hb_subset_plan_t* plan,
colr.init (plan->source);
plan->_glyphset_gsub->add (0); // Not-def
- hb_set_union (plan->_glyphset_gsub, input_glyphs_to_retain);
-
- hb_codepoint_t cp = HB_SET_VALUE_INVALID;
- while (unicodes->next (&cp))
- {
- hb_codepoint_t gid;
- if (!cmap.get_nominal_glyph (cp, &gid))
- {
- DEBUG_MSG(SUBSET, nullptr, "Drop U+%04X; no gid", cp);
- continue;
- }
- plan->unicodes->add (cp);
- plan->codepoint_to_glyph->set (cp, gid);
- plan->_glyphset_gsub->add (gid);
- }
_cmap_closure (plan->source, plan->unicodes, plan->_glyphset_gsub);
#ifndef HB_NO_SUBSET_LAYOUT
if (close_over_gsub)
// closure all glyphs/lookups/features needed for GSUB substitutions.
- _gsub_closure_glyphs_lookups_features (plan->source, plan->_glyphset_gsub, plan->gsub_lookups, plan->gsub_features);
+ _closure_glyphs_lookups_features<OT::GSUB> (
+ plan->source,
+ plan->_glyphset_gsub,
+ plan->layout_features,
+ plan->gsub_lookups,
+ plan->gsub_features,
+ plan->gsub_langsys);
if (close_over_gpos)
- _gpos_closure_lookups_features (plan->source, plan->_glyphset_gsub, plan->gpos_lookups, plan->gpos_features);
+ _closure_glyphs_lookups_features<OT::GPOS> (
+ plan->source,
+ plan->_glyphset_gsub,
+ plan->layout_features,
+ plan->gpos_lookups,
+ plan->gpos_features,
+ plan->gpos_langsys);
#endif
_remove_invalid_gids (plan->_glyphset_gsub, plan->source->get_num_glyphs ());
+ // Collect all glyphs referenced by COLRv0
+ hb_set_t* cur_glyphset = plan->_glyphset_gsub;
+ hb_set_t glyphset_colrv0;
+ if (colr.is_valid ())
+ {
+ glyphset_colrv0.union_ (*cur_glyphset);
+ for (hb_codepoint_t gid : cur_glyphset->iter ())
+ colr.closure_glyphs (gid, &glyphset_colrv0);
+ cur_glyphset = &glyphset_colrv0;
+ }
+
+ hb_set_t palette_indices;
+ colr.closure_V0palette_indices (cur_glyphset, &palette_indices);
+
+ hb_set_t layer_indices;
+ colr.closure_forV1 (cur_glyphset, &layer_indices, &palette_indices);
+ _remap_indexes (&layer_indices, plan->colrv1_layers);
+ _remap_palette_indexes (&palette_indices, plan->colr_palettes);
+ colr.fini ();
+ _remove_invalid_gids (cur_glyphset, plan->source->get_num_glyphs ());
+
// Populate a full set of glyphs to retain by adding all referenced
// composite glyphs.
- hb_codepoint_t gid = HB_SET_VALUE_INVALID;
- while (plan->_glyphset_gsub->next (&gid))
+ for (hb_codepoint_t gid : cur_glyphset->iter ())
{
glyf.add_gid_and_children (gid, plan->_glyphset);
#ifndef HB_NO_SUBSET_CFF
if (cff.is_valid ())
_add_cff_seac_components (cff, gid, plan->_glyphset);
#endif
- if (colr.is_valid ())
- colr.closure_glyphs (gid, plan->_glyphset);
}
_remove_invalid_gids (plan->_glyphset, plan->source->get_num_glyphs ());
+
#ifndef HB_NO_VAR
if (close_over_gdef)
_collect_layout_variation_indices (plan->source,
- plan->_glyphset_gsub,
- plan->gpos_lookups,
- plan->layout_variation_indices,
- plan->layout_variation_idx_map);
+ plan->_glyphset_gsub,
+ plan->gpos_lookups,
+ plan->layout_variation_indices,
+ plan->layout_variation_idx_map);
#endif
#ifndef HB_NO_SUBSET_CFF
cff.fini ();
#endif
glyf.fini ();
- cmap.fini ();
}
static void
_create_old_gid_to_new_gid_map (const hb_face_t *face,
- bool retain_gids,
- const hb_set_t *all_gids_to_retain,
- hb_map_t *glyph_map, /* OUT */
- hb_map_t *reverse_glyph_map, /* OUT */
- unsigned int *num_glyphs /* OUT */)
+ bool retain_gids,
+ const hb_set_t *all_gids_to_retain,
+ hb_map_t *glyph_map, /* OUT */
+ hb_map_t *reverse_glyph_map, /* OUT */
+ unsigned int *num_glyphs /* OUT */)
{
if (!retain_gids)
{
@@ -319,33 +433,36 @@ _nameid_closure (hb_face_t *face,
/**
* hb_subset_plan_create:
+ * @face: font face to create the plan for.
+ * @input: a #hb_subset_input_t input.
+ *
* Computes a plan for subsetting the supplied face according
* to a provided input. The plan describes
* which tables and glyphs should be retained.
*
- * Return value: New subset plan.
+ * Return value: (transfer full): New subset plan. Destroy with
+ * hb_subset_plan_destroy().
*
* Since: 1.7.5
**/
hb_subset_plan_t *
-hb_subset_plan_create (hb_face_t *face,
- hb_subset_input_t *input)
+hb_subset_plan_create (hb_face_t *face,
+ const hb_subset_input_t *input)
{
hb_subset_plan_t *plan;
if (unlikely (!(plan = hb_object_create<hb_subset_plan_t> ())))
return const_cast<hb_subset_plan_t *> (&Null (hb_subset_plan_t));
plan->successful = true;
- plan->drop_hints = input->drop_hints;
- plan->desubroutinize = input->desubroutinize;
- plan->retain_gids = input->retain_gids;
- plan->name_legacy = input->name_legacy;
+ plan->flags = input->flags;
plan->unicodes = hb_set_create ();
- plan->name_ids = hb_set_reference (input->name_ids);
+ plan->name_ids = hb_set_copy (input->sets.name_ids);
_nameid_closure (face, plan->name_ids);
- plan->name_languages = hb_set_reference (input->name_languages);
- plan->glyphs_requested = hb_set_reference (input->glyphs);
- plan->drop_tables = hb_set_reference (input->drop_tables);
+ plan->name_languages = hb_set_copy (input->sets.name_languages);
+ plan->layout_features = hb_set_copy (input->sets.layout_features);
+ plan->glyphs_requested = hb_set_copy (input->sets.glyphs);
+ plan->drop_tables = hb_set_copy (input->sets.drop_tables);
+ plan->no_subset_tables = hb_set_copy (input->sets.no_subset_tables);
plan->source = hb_face_reference (face);
plan->dest = hb_face_builder_create ();
@@ -356,20 +473,32 @@ hb_subset_plan_create (hb_face_t *face,
plan->reverse_glyph_map = hb_map_create ();
plan->gsub_lookups = hb_map_create ();
plan->gpos_lookups = hb_map_create ();
+
+ if (plan->check_success (plan->gsub_langsys = hb_object_create<script_langsys_map> ()))
+ plan->gsub_langsys->init_shallow ();
+ if (plan->check_success (plan->gpos_langsys = hb_object_create<script_langsys_map> ()))
+ plan->gpos_langsys->init_shallow ();
+
plan->gsub_features = hb_map_create ();
plan->gpos_features = hb_map_create ();
+ plan->colrv1_layers = hb_map_create ();
+ plan->colr_palettes = hb_map_create ();
plan->layout_variation_indices = hb_set_create ();
plan->layout_variation_idx_map = hb_map_create ();
+ if (plan->in_error ()) {
+ return plan;
+ }
+
+ _populate_unicodes_to_retain (input->sets.unicodes, input->sets.glyphs, plan);
+
_populate_gids_to_retain (plan,
- input->unicodes,
- input->glyphs,
- !input->drop_tables->has (HB_OT_TAG_GSUB),
- !input->drop_tables->has (HB_OT_TAG_GPOS),
- !input->drop_tables->has (HB_OT_TAG_GDEF));
+ !input->sets.drop_tables->has (HB_OT_TAG_GSUB),
+ !input->sets.drop_tables->has (HB_OT_TAG_GPOS),
+ !input->sets.drop_tables->has (HB_OT_TAG_GDEF));
_create_old_gid_to_new_gid_map (face,
- input->retain_gids,
+ input->flags & HB_SUBSET_FLAGS_RETAIN_GIDS,
plan->_glyphset,
plan->glyph_map,
plan->reverse_glyph_map,
@@ -380,6 +509,10 @@ hb_subset_plan_create (hb_face_t *face,
/**
* hb_subset_plan_destroy:
+ * @plan: a #hb_subset_plan_t
+ *
+ * Decreases the reference count on @plan, and if it reaches zero, destroys
+ * @plan, freeing all memory.
*
* Since: 1.7.5
**/
@@ -391,8 +524,10 @@ hb_subset_plan_destroy (hb_subset_plan_t *plan)
hb_set_destroy (plan->unicodes);
hb_set_destroy (plan->name_ids);
hb_set_destroy (plan->name_languages);
+ hb_set_destroy (plan->layout_features);
hb_set_destroy (plan->glyphs_requested);
hb_set_destroy (plan->drop_tables);
+ hb_set_destroy (plan->no_subset_tables);
hb_face_destroy (plan->source);
hb_face_destroy (plan->dest);
hb_map_destroy (plan->codepoint_to_glyph);
@@ -404,9 +539,30 @@ hb_subset_plan_destroy (hb_subset_plan_t *plan)
hb_map_destroy (plan->gpos_lookups);
hb_map_destroy (plan->gsub_features);
hb_map_destroy (plan->gpos_features);
+ hb_map_destroy (plan->colrv1_layers);
+ hb_map_destroy (plan->colr_palettes);
hb_set_destroy (plan->layout_variation_indices);
hb_map_destroy (plan->layout_variation_idx_map);
+ if (plan->gsub_langsys)
+ {
+ for (auto _ : plan->gsub_langsys->iter ())
+ hb_set_destroy (_.second);
+
+ hb_object_destroy (plan->gsub_langsys);
+ plan->gsub_langsys->fini_shallow ();
+ hb_free (plan->gsub_langsys);
+ }
+
+ if (plan->gpos_langsys)
+ {
+ for (auto _ : plan->gpos_langsys->iter ())
+ hb_set_destroy (_.second);
+
+ hb_object_destroy (plan->gpos_langsys);
+ plan->gpos_langsys->fini_shallow ();
+ hb_free (plan->gpos_langsys);
+ }
- free (plan);
+ hb_free (plan);
}
diff --git a/thirdparty/harfbuzz/src/hb-subset-plan.hh b/thirdparty/harfbuzz/src/hb-subset-plan.hh
index cc9cb7a1a2..92a4e27ccc 100644
--- a/thirdparty/harfbuzz/src/hb-subset-plan.hh
+++ b/thirdparty/harfbuzz/src/hb-subset-plan.hh
@@ -39,11 +39,8 @@ struct hb_subset_plan_t
{
hb_object_header_t header;
- bool successful : 1;
- bool drop_hints : 1;
- bool desubroutinize : 1;
- bool retain_gids : 1;
- bool name_legacy : 1;
+ bool successful;
+ unsigned flags;
// For each cp that we'd like to retain maps to the corresponding gid.
hb_set_t *unicodes;
@@ -54,9 +51,15 @@ struct hb_subset_plan_t
// name_languages we would like to retain
hb_set_t *name_languages;
+ //layout features which will be preserved
+ hb_set_t *layout_features;
+
//glyph ids requested to retain
hb_set_t *glyphs_requested;
+ // Tables which should not be processed, just pass them through.
+ hb_set_t *no_subset_tables;
+
// Tables which should be dropped.
hb_set_t *drop_tables;
@@ -79,10 +82,18 @@ struct hb_subset_plan_t
hb_map_t *gsub_lookups;
hb_map_t *gpos_lookups;
- //active features we'd like to retain
+ //active langsys we'd like to retain
+ hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *gsub_langsys;
+ hb_hashmap_t<unsigned, hb_set_t *, (unsigned)-1, nullptr> *gpos_langsys;
+
+ //active features after removing redundant langsys and prune_features
hb_map_t *gsub_features;
hb_map_t *gpos_features;
+ //active layers/palettes we'd like to retain
+ hb_map_t *colrv1_layers;
+ hb_map_t *colr_palettes;
+
//The set of layout item variation store delta set indices to be retained
hb_set_t *layout_variation_indices;
//Old -> New layout item variation store delta set index mapping
@@ -189,7 +200,7 @@ typedef struct hb_subset_plan_t hb_subset_plan_t;
HB_INTERNAL hb_subset_plan_t *
hb_subset_plan_create (hb_face_t *face,
- hb_subset_input_t *input);
+ const hb_subset_input_t *input);
HB_INTERNAL void
hb_subset_plan_destroy (hb_subset_plan_t *plan);
diff --git a/thirdparty/harfbuzz/src/hb-subset.cc b/thirdparty/harfbuzz/src/hb-subset.cc
index 8b77ecd45a..34f92e0d81 100644
--- a/thirdparty/harfbuzz/src/hb-subset.cc
+++ b/thirdparty/harfbuzz/src/hb-subset.cc
@@ -39,8 +39,10 @@
#include "hb-ot-maxp-table.hh"
#include "hb-ot-color-sbix-table.hh"
#include "hb-ot-color-colr-table.hh"
+#include "hb-ot-color-cpal-table.hh"
#include "hb-ot-os2-table.hh"
#include "hb-ot-post-table.hh"
+#include "hb-ot-post-table-v2subset.hh"
#include "hb-ot-cff1-table.hh"
#include "hb-ot-cff2-table.hh"
#include "hb-ot-vorg-table.hh"
@@ -50,7 +52,28 @@
#include "hb-ot-layout-gpos-table.hh"
#include "hb-ot-var-gvar-table.hh"
#include "hb-ot-var-hvar-table.hh"
+#include "hb-repacker.hh"
+/**
+ * SECTION:hb-subset
+ * @title: hb-subset
+ * @short_description: Subsets font files.
+ * @include: hb-subset.h
+ *
+ * Subsetting reduces the codepoint coverage of font files and removes all data
+ * that is no longer needed. A subset input describes the desired subset. The input is
+ * provided along with a font to the subsetting operation. Output is a new font file
+ * containing only the data specified in the input.
+ *
+ * Currently most outline and bitmap tables are supported: glyf, CFF, CFF2, sbix,
+ * COLR, and CBDT/CBLC. This also includes fonts with variable outlines via OpenType
+ * variations. Notably EBDT/EBLC and SVG are not supported. Layout subsetting is supported
+ * only for OpenType Layout tables (GSUB, GPOS, GDEF). Notably subsetting of graphite or AAT tables
+ * is not yet supported.
+ *
+ * Fonts with graphite or AAT tables may still be subsetted but will likely need to use the
+ * retain glyph ids option and configure the subset to pass through the layout tables untouched.
+ */
static unsigned
_plan_estimate_subset_table_size (hb_subset_plan_t *plan, unsigned table_len)
@@ -64,69 +87,133 @@ _plan_estimate_subset_table_size (hb_subset_plan_t *plan, unsigned table_len)
return 512 + (unsigned) (table_len * sqrt ((double) dst_glyphs / src_glyphs));
}
+/*
+ * Repack the serialization buffer if any offset overflows exist.
+ */
+static hb_blob_t*
+_repack (hb_tag_t tag, const hb_serialize_context_t& c)
+{
+ if (tag != HB_OT_TAG_GPOS
+ && tag != HB_OT_TAG_GSUB)
+ {
+ // Check for overflow in a non-handled table.
+ return c.successful () ? c.copy_blob () : nullptr;
+ }
+
+ if (!c.offset_overflow ())
+ return c.copy_blob ();
+
+ hb_vector_t<char> buf;
+ int buf_size = c.end - c.start;
+ if (unlikely (!buf.alloc (buf_size)))
+ return nullptr;
+
+ hb_serialize_context_t repacked ((void *) buf, buf_size);
+ hb_resolve_overflows (c.object_graph (), &repacked);
+
+ if (unlikely (repacked.in_error ()))
+ // TODO(garretrieger): refactor so we can share the resize/retry logic with the subset
+ // portion.
+ return nullptr;
+
+ return repacked.copy_blob ();
+}
+
+template<typename TableType>
+static
+bool
+_try_subset (const TableType *table,
+ hb_vector_t<char>* buf,
+ unsigned buf_size,
+ hb_subset_context_t* c /* OUT */)
+{
+ c->serializer->start_serialize<TableType> ();
+ if (c->serializer->in_error ()) return false;
+
+ bool needed = table->subset (c);
+ if (!c->serializer->ran_out_of_room ())
+ {
+ c->serializer->end_serialize ();
+ return needed;
+ }
+
+ buf_size += (buf_size >> 1) + 32;
+ DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c ran out of room; reallocating to %u bytes.",
+ HB_UNTAG (c->table_tag), buf_size);
+
+ if (unlikely (!buf->alloc (buf_size)))
+ {
+ DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c failed to reallocate %u bytes.",
+ HB_UNTAG (c->table_tag), buf_size);
+ return needed;
+ }
+
+ c->serializer->reset (buf->arrayZ, buf_size);
+ return _try_subset (table, buf, buf_size, c);
+}
+
template<typename TableType>
static bool
_subset (hb_subset_plan_t *plan)
{
- bool result = false;
hb_blob_t *source_blob = hb_sanitize_context_t ().reference_table<TableType> (plan->source);
const TableType *table = source_blob->as<TableType> ();
hb_tag_t tag = TableType::tableTag;
- if (source_blob->data)
+ if (!source_blob->data)
+ {
+ DEBUG_MSG (SUBSET, nullptr,
+ "OT::%c%c%c%c::subset sanitize failed on source table.", HB_UNTAG (tag));
+ hb_blob_destroy (source_blob);
+ return false;
+ }
+
+ hb_vector_t<char> buf;
+ /* TODO Not all tables are glyph-related. 'name' table size for example should not be
+ * affected by number of glyphs. Accommodate that. */
+ unsigned buf_size = _plan_estimate_subset_table_size (plan, source_blob->length);
+ DEBUG_MSG (SUBSET, nullptr,
+ "OT::%c%c%c%c initial estimated table size: %u bytes.", HB_UNTAG (tag), buf_size);
+ if (unlikely (!buf.alloc (buf_size)))
+ {
+ DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c failed to allocate %u bytes.", HB_UNTAG (tag), buf_size);
+ hb_blob_destroy (source_blob);
+ return false;
+ }
+
+ bool needed = false;
+ hb_serialize_context_t serializer (buf.arrayZ, buf_size);
{
- hb_vector_t<char> buf;
- /* TODO Not all tables are glyph-related. 'name' table size for example should not be
- * affected by number of glyphs. Accommodate that. */
- unsigned buf_size = _plan_estimate_subset_table_size (plan, source_blob->length);
- DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c initial estimated table size: %u bytes.", HB_UNTAG (tag), buf_size);
- if (unlikely (!buf.alloc (buf_size)))
- {
- DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c failed to allocate %u bytes.", HB_UNTAG (tag), buf_size);
- hb_blob_destroy (source_blob);
- return false;
- }
- retry:
- hb_serialize_context_t serializer ((void *) buf, buf_size);
- serializer.start_serialize<TableType> ();
hb_subset_context_t c (source_blob, plan, &serializer, tag);
- bool needed = table->subset (&c);
- if (serializer.ran_out_of_room)
- {
- buf_size += (buf_size >> 1) + 32;
- DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c ran out of room; reallocating to %u bytes.", HB_UNTAG (tag), buf_size);
- if (unlikely (!buf.alloc (buf_size)))
- {
- DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c failed to reallocate %u bytes.", HB_UNTAG (tag), buf_size);
- hb_blob_destroy (source_blob);
- return false;
- }
- goto retry;
- }
- serializer.end_serialize ();
+ needed = _try_subset (table, &buf, buf_size, &c);
+ }
+ hb_blob_destroy (source_blob);
- result = !serializer.in_error ();
+ if (serializer.in_error () && !serializer.only_offset_overflow ())
+ {
+ DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c::subset FAILED!", HB_UNTAG (tag));
+ return false;
+ }
- if (result)
- {
- if (needed)
- {
- hb_blob_t *dest_blob = serializer.copy_blob ();
- DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c final subset table size: %u bytes.", HB_UNTAG (tag), dest_blob->length);
- result = c.plan->add_table (tag, dest_blob);
- hb_blob_destroy (dest_blob);
- }
- else
- {
- DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c::subset table subsetted to empty.", HB_UNTAG (tag));
- }
- }
+ if (!needed)
+ {
+ DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c::subset table subsetted to empty.", HB_UNTAG (tag));
+ return true;
}
- else
- DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c::subset sanitize failed on source table.", HB_UNTAG (tag));
- hb_blob_destroy (source_blob);
- DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c::subset %s", HB_UNTAG (tag), result ? "success" : "FAILED!");
+ bool result = false;
+ hb_blob_t *dest_blob = _repack (tag, serializer);
+ if (dest_blob)
+ {
+ DEBUG_MSG (SUBSET, nullptr,
+ "OT::%c%c%c%c final subset table size: %u bytes.",
+ HB_UNTAG (tag), dest_blob->length);
+ result = plan->add_table (tag, dest_blob);
+ hb_blob_destroy (dest_blob);
+ }
+
+ DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c::subset %s",
+ HB_UNTAG (tag), result ? "success" : "FAILED!");
return result;
}
@@ -159,7 +246,7 @@ _should_drop_table (hb_subset_plan_t *plan, hb_tag_t tag)
case HB_TAG ('p','r','e','p'): /* hint table, fallthrough */
case HB_TAG ('h','d','m','x'): /* hint table, fallthrough */
case HB_TAG ('V','D','M','X'): /* hint table, fallthrough */
- return plan->drop_hints;
+ return plan->flags & HB_SUBSET_FLAGS_NO_HINTING;
#ifdef HB_NO_SUBSET_LAYOUT
// Drop Layout Tables if requested.
@@ -179,8 +266,21 @@ _should_drop_table (hb_subset_plan_t *plan, hb_tag_t tag)
}
static bool
+_passthrough (hb_subset_plan_t *plan, hb_tag_t tag)
+{
+ hb_blob_t *source_table = hb_face_reference_table (plan->source, tag);
+ bool result = plan->add_table (tag, source_table);
+ hb_blob_destroy (source_table);
+ return result;
+}
+
+static bool
_subset_table (hb_subset_plan_t *plan, hb_tag_t tag)
{
+ if (plan->no_subset_tables->has (tag)) {
+ return _passthrough (plan, tag);
+ }
+
DEBUG_MSG (SUBSET, nullptr, "subset %c%c%c%c", HB_UNTAG (tag));
switch (tag)
{
@@ -202,6 +302,7 @@ _subset_table (hb_subset_plan_t *plan, hb_tag_t tag)
case HB_OT_TAG_OS2 : return _subset<const OT::OS2 > (plan);
case HB_OT_TAG_post: return _subset<const OT::post> (plan);
case HB_OT_TAG_COLR: return _subset<const OT::COLR> (plan);
+ case HB_OT_TAG_CPAL: return _subset<const OT::CPAL> (plan);
case HB_OT_TAG_CBLC: return _subset<const OT::CBLC> (plan);
case HB_OT_TAG_CBDT: return true; /* skip CBDT, handled by CBLC */
@@ -221,28 +322,34 @@ _subset_table (hb_subset_plan_t *plan, hb_tag_t tag)
#endif
default:
- hb_blob_t *source_table = hb_face_reference_table (plan->source, tag);
- bool result = plan->add_table (tag, source_table);
- hb_blob_destroy (source_table);
- return result;
+ if (plan->flags & HB_SUBSET_FLAGS_PASSTHROUGH_UNRECOGNIZED)
+ return _passthrough (plan, tag);
+
+ // Drop table
+ return true;
}
}
/**
- * hb_subset:
+ * hb_subset_or_fail:
* @source: font face data to be subset.
* @input: input to use for the subsetting.
*
- * Subsets a font according to provided input.
+ * Subsets a font according to provided input. Returns nullptr
+ * if the subset operation fails.
+ *
+ * Since: 2.9.0
**/
hb_face_t *
-hb_subset (hb_face_t *source, hb_subset_input_t *input)
+hb_subset_or_fail (hb_face_t *source, const hb_subset_input_t *input)
{
if (unlikely (!input || !source)) return hb_face_get_empty ();
hb_subset_plan_t *plan = hb_subset_plan_create (source, input);
- if (unlikely (plan->in_error ()))
- return hb_face_get_empty ();
+ if (unlikely (plan->in_error ())) {
+ hb_subset_plan_destroy (plan);
+ return nullptr;
+ }
hb_set_t tags_set;
bool success = true;
@@ -262,7 +369,7 @@ hb_subset (hb_face_t *source, hb_subset_input_t *input)
}
end:
- hb_face_t *result = success ? hb_face_reference (plan->dest) : hb_face_get_empty ();
+ hb_face_t *result = success ? hb_face_reference (plan->dest) : nullptr;
hb_subset_plan_destroy (plan);
return result;
diff --git a/thirdparty/harfbuzz/src/hb-subset.h b/thirdparty/harfbuzz/src/hb-subset.h
index ddf4409734..1c65a4da1c 100644
--- a/thirdparty/harfbuzz/src/hb-subset.h
+++ b/thirdparty/harfbuzz/src/hb-subset.h
@@ -31,66 +31,119 @@
HB_BEGIN_DECLS
-/*
- * hb_subset_input_t
+/**
+ * hb_subset_input_t:
*
* Things that change based on the input. Characters to keep, etc.
*/
typedef struct hb_subset_input_t hb_subset_input_t;
+/**
+ * hb_subset_flags_t:
+ * @HB_SUBSET_FLAGS_DEFAULT: all flags at their default value of false.
+ * @HB_SUBSET_FLAGS_NO_HINTING: If set hinting instructions will be dropped in
+ * the produced subset. Otherwise hinting instructions will be retained.
+ * @HB_SUBSET_FLAGS_RETAIN_GIDS: If set glyph indices will not be modified in
+ * the produced subset. If glyphs are dropped their indices will be retained
+ * as an empty glyph.
+ * @HB_SUBSET_FLAGS_DESUBROUTINIZE: If set and subsetting a CFF font the
+ * subsetter will attempt to remove subroutines from the CFF glyphs.
+ * @HB_SUBSET_FLAGS_NAME_LEGACY: If set non-unicode name records will be
+ * retained in the subset.
+ * @HB_SUBSET_FLAGS_SET_OVERLAPS_FLAG: If set the subsetter will set the
+ * OVERLAP_SIMPLE flag on each simple glyph.
+ * @HB_SUBSET_FLAGS_PASSTHROUGH_UNRECOGNIZED: If set the subsetter will not
+ * drop unrecognized tables and instead pass them through untouched.
+ * @HB_SUBSET_FLAGS_NOTDEF_OUTLINE: If set the notdef glyph outline will be
+ * retained in the final subset.
+ * @HB_SUBSET_FLAGS_GLYPH_NAMES: If set the PS glyph names will be retained
+ * in the final subset.
+ * @HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES: If set then the unicode ranges in
+ * OS/2 will not be recalculated.
+ *
+ * List of boolean properties that can be configured on the subset input.
+ *
+ * Since: 2.9.0
+ **/
+typedef enum { /*< flags >*/
+ HB_SUBSET_FLAGS_DEFAULT = 0x00000000u,
+ HB_SUBSET_FLAGS_NO_HINTING = 0x00000001u,
+ HB_SUBSET_FLAGS_RETAIN_GIDS = 0x00000002u,
+ HB_SUBSET_FLAGS_DESUBROUTINIZE = 0x00000004u,
+ HB_SUBSET_FLAGS_NAME_LEGACY = 0x00000008u,
+ HB_SUBSET_FLAGS_SET_OVERLAPS_FLAG = 0x00000010u,
+ HB_SUBSET_FLAGS_PASSTHROUGH_UNRECOGNIZED = 0x00000020u,
+ HB_SUBSET_FLAGS_NOTDEF_OUTLINE = 0x00000040u,
+ HB_SUBSET_FLAGS_GLYPH_NAMES = 0x00000080u,
+ HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES = 0x00000100u,
+} hb_subset_flags_t;
+
+/**
+ * hb_subset_sets_t:
+ * @HB_SUBSET_SETS_GLYPH_INDEX: the set of glyph indexes to retain in the subset.
+ * @HB_SUBSET_SETS_UNICODE: the set of unicode codepoints to retain in the subset.
+ * @HB_SUBSET_SETS_NO_SUBSET_TABLE_TAG: the set of table tags which specifies tables that should not be
+ * subsetted.
+ * @HB_SUBSET_SETS_DROP_TABLE_TAG: the set of table tags which specifies tables which will be dropped
+ * in the subset.
+ * @HB_SUBSET_SETS_NAME_ID: the set of name ids that will be retained.
+ * @HB_SUBSET_SETS_NAME_LANG_ID: the set of name lang ids that will be retained.
+ * @HB_SUBSET_SETS_LAYOUT_FEATURE_TAG: the set of layout feature tags that will be retained
+ * in the subset.
+ *
+ * List of sets that can be configured on the subset input.
+ *
+ * Since: 2.9.1
+ **/
+typedef enum {
+ HB_SUBSET_SETS_GLYPH_INDEX = 0,
+ HB_SUBSET_SETS_UNICODE,
+ HB_SUBSET_SETS_NO_SUBSET_TABLE_TAG,
+ HB_SUBSET_SETS_DROP_TABLE_TAG,
+ HB_SUBSET_SETS_NAME_ID,
+ HB_SUBSET_SETS_NAME_LANG_ID,
+ HB_SUBSET_SETS_LAYOUT_FEATURE_TAG,
+} hb_subset_sets_t;
+
HB_EXTERN hb_subset_input_t *
hb_subset_input_create_or_fail (void);
HB_EXTERN hb_subset_input_t *
-hb_subset_input_reference (hb_subset_input_t *subset_input);
+hb_subset_input_reference (hb_subset_input_t *input);
HB_EXTERN void
-hb_subset_input_destroy (hb_subset_input_t *subset_input);
+hb_subset_input_destroy (hb_subset_input_t *input);
-HB_EXTERN hb_set_t *
-hb_subset_input_unicode_set (hb_subset_input_t *subset_input);
+HB_EXTERN hb_bool_t
+hb_subset_input_set_user_data (hb_subset_input_t *input,
+ hb_user_data_key_t *key,
+ void * data,
+ hb_destroy_func_t destroy,
+ hb_bool_t replace);
-HB_EXTERN hb_set_t *
-hb_subset_input_glyph_set (hb_subset_input_t *subset_input);
+HB_EXTERN void *
+hb_subset_input_get_user_data (const hb_subset_input_t *input,
+ hb_user_data_key_t *key);
HB_EXTERN hb_set_t *
-hb_subset_input_nameid_set (hb_subset_input_t *subset_input);
+hb_subset_input_unicode_set (hb_subset_input_t *input);
HB_EXTERN hb_set_t *
-hb_subset_input_namelangid_set (hb_subset_input_t *subset_input);
+hb_subset_input_glyph_set (hb_subset_input_t *input);
HB_EXTERN hb_set_t *
-hb_subset_input_drop_tables_set (hb_subset_input_t *subset_input);
+hb_subset_input_set (hb_subset_input_t *input, hb_subset_sets_t set_type);
-HB_EXTERN void
-hb_subset_input_set_drop_hints (hb_subset_input_t *subset_input,
- hb_bool_t drop_hints);
-HB_EXTERN hb_bool_t
-hb_subset_input_get_drop_hints (hb_subset_input_t *subset_input);
+HB_EXTERN hb_subset_flags_t
+hb_subset_input_get_flags (hb_subset_input_t *input);
HB_EXTERN void
-hb_subset_input_set_desubroutinize (hb_subset_input_t *subset_input,
- hb_bool_t desubroutinize);
-HB_EXTERN hb_bool_t
-hb_subset_input_get_desubroutinize (hb_subset_input_t *subset_input);
-
-HB_EXTERN void
-hb_subset_input_set_retain_gids (hb_subset_input_t *subset_input,
- hb_bool_t retain_gids);
-HB_EXTERN hb_bool_t
-hb_subset_input_get_retain_gids (hb_subset_input_t *subset_input);
+hb_subset_input_set_flags (hb_subset_input_t *input,
+ unsigned value);
-HB_EXTERN void
-hb_subset_input_set_name_legacy (hb_subset_input_t *subset_input,
- hb_bool_t name_legacy);
-HB_EXTERN hb_bool_t
-hb_subset_input_get_name_legacy (hb_subset_input_t *subset_input);
-
-/* hb_subset () */
HB_EXTERN hb_face_t *
-hb_subset (hb_face_t *source, hb_subset_input_t *input);
-
+hb_subset_or_fail (hb_face_t *source, const hb_subset_input_t *input);
HB_END_DECLS
diff --git a/thirdparty/harfbuzz/src/hb-ucd-table.hh b/thirdparty/harfbuzz/src/hb-ucd-table.hh
index 88623db338..1a4c89c17f 100644
--- a/thirdparty/harfbuzz/src/hb-ucd-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ucd-table.hh
@@ -4,7 +4,7 @@
*
* ./gen-ucd-table.py ucd.nounihan.grouped.xml
*
- * on file with this description: Unicode 13.0.0
+ * on file with this description: Unicode 14.0.0
*/
#ifndef HB_UCD_TABLE_HH
@@ -13,7 +13,7 @@
#include "hb.hh"
static const hb_script_t
-_hb_ucd_sc_map[157] =
+_hb_ucd_sc_map[162] =
{
HB_SCRIPT_COMMON, HB_SCRIPT_INHERITED,
HB_SCRIPT_UNKNOWN, HB_SCRIPT_ARABIC,
@@ -93,7 +93,9 @@ _hb_ucd_sc_map[157] =
HB_SCRIPT_NANDINAGARI, HB_SCRIPT_NYIAKENG_PUACHUE_HMONG,
HB_SCRIPT_WANCHO, HB_SCRIPT_CHORASMIAN,
HB_SCRIPT_DIVES_AKURU, HB_SCRIPT_KHITAN_SMALL_SCRIPT,
- HB_SCRIPT_YEZIDI,
+ HB_SCRIPT_YEZIDI, HB_SCRIPT_CYPRO_MINOAN,
+ HB_SCRIPT_OLD_UYGHUR, HB_SCRIPT_TANGSA,
+ HB_SCRIPT_TOTO, HB_SCRIPT_VITHKUQI,
};
static const uint16_t
_hb_ucd_dm1_p0_map[825] =
@@ -1065,144 +1067,144 @@ _hb_ucd_dm2_u64_map[388] =
#ifndef HB_OPTIMIZE_SIZE
static const uint8_t
-_hb_ucd_u8[32480] =
+_hb_ucd_u8[33120] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 27, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 28,
- 29, 26, 30, 31, 32, 33, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 34, 35, 35, 35, 35,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 26, 57, 58, 59, 59, 59, 59, 59, 26, 26, 60, 59, 59, 59, 59, 59,
- 59, 59, 26, 61, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 26, 62, 59, 63, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 64, 26, 26, 65, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 66, 67, 59, 59, 59, 59, 68, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 69, 70, 71, 72, 73, 74, 59, 59,
- 75, 76, 59, 59, 77, 59, 78, 79, 80, 81, 73, 82, 83, 84, 59, 59,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 28, 26, 29, 30, 31, 32, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 33, 34, 34, 34, 34,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
+ 26, 56, 57, 58, 58, 58, 58, 59, 26, 26, 60, 58, 58, 58, 58, 58,
+ 58, 58, 26, 61, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 26, 62, 58, 63, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 64, 26, 26, 65, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 66, 67, 68, 58, 58, 58, 58, 69, 58,
+ 58, 58, 58, 58, 58, 58, 58, 70, 71, 72, 73, 74, 75, 76, 58, 77,
+ 78, 79, 58, 80, 81, 58, 82, 83, 84, 85, 75, 86, 87, 88, 58, 58,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 85, 26, 26, 26, 26, 26, 26, 26, 86, 87, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 88, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 89, 59, 59, 59, 59, 59, 59, 26, 90, 59, 59,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 91, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 92, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 93,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 94,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 89, 26, 26, 26, 26, 26, 26, 26, 90, 91, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 92, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 93, 58, 58, 58, 58, 58, 58, 26, 94, 58, 58,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 95, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 96, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 97,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 98,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
29, 21, 21, 21, 23, 21, 21, 21, 22, 18, 21, 25, 21, 17, 21, 21,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 21, 21, 25, 25, 25, 21,
@@ -1255,7 +1257,7 @@ _hb_ucd_u8[32480] =
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2, 2, 7,
7, 7, 7, 21, 21, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1, 1, 1, 1, 1, 1, 25, 25, 25, 21, 21, 23, 21, 21, 26, 26,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 21, 1, 2, 21, 21,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 21, 1, 21, 21, 21,
6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 12, 12, 12, 12, 12,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 21, 21, 21, 21, 7, 7,
12, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
@@ -1275,10 +1277,9 @@ _hb_ucd_u8[32480] =
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 2,
7, 7, 7, 7, 7, 7, 7, 7, 7, 12, 12, 12, 2, 2, 21, 2,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 7, 7, 7, 7, 7, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 7, 7, 7, 7, 7, 7, 7, 7, 24, 7, 7, 7, 7, 7, 7, 2,
+ 1, 1, 2, 2, 2, 2, 2, 2, 12, 12, 12, 12, 12, 12, 12, 12,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 12, 12, 12, 12, 12, 12,
12, 12, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 10, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 12, 10, 12, 7, 10, 10,
@@ -1320,14 +1321,14 @@ _hb_ucd_u8[32480] =
15, 15, 15, 26, 26, 26, 26, 26, 26, 23, 26, 2, 2, 2, 2, 2,
12, 10, 10, 10, 12, 7, 7, 7, 7, 7, 7, 7, 7, 2, 7, 7,
7, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2, 7, 12, 12,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 12, 7, 12, 12,
12, 10, 10, 10, 10, 2, 12, 12, 12, 2, 12, 12, 12, 12, 2, 2,
- 2, 2, 2, 2, 2, 12, 12, 2, 7, 7, 7, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 12, 12, 2, 7, 7, 7, 2, 2, 7, 2, 2,
2, 2, 2, 2, 2, 2, 2, 21, 15, 15, 15, 15, 15, 15, 15, 26,
7, 12, 10, 10, 21, 7, 7, 7, 7, 7, 7, 7, 7, 2, 7, 7,
7, 7, 7, 7, 2, 7, 7, 7, 7, 7, 2, 2, 12, 7, 10, 12,
10, 10, 10, 10, 10, 2, 12, 10, 10, 2, 10, 10, 12, 12, 2, 2,
- 2, 2, 2, 2, 2, 10, 10, 2, 2, 2, 2, 2, 2, 2, 7, 2,
+ 2, 2, 2, 2, 2, 10, 10, 2, 2, 2, 2, 2, 2, 7, 7, 2,
2, 7, 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
12, 12, 10, 10, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 12, 12, 7, 10, 10,
@@ -1344,6 +1345,7 @@ _hb_ucd_u8[32480] =
7, 12, 7, 7, 12, 12, 12, 12, 12, 12, 12, 2, 2, 2, 2, 23,
7, 7, 7, 7, 7, 7, 6, 12, 12, 12, 12, 12, 12, 12, 12, 21,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 21, 21, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 7, 7, 2, 7, 2, 7, 7, 7, 7, 7, 2, 7, 7, 7, 7,
7, 7, 7, 7, 2, 7, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 12, 7, 7, 12, 12, 12, 12, 12, 12, 12, 12, 12, 7, 2, 2,
@@ -1387,17 +1389,17 @@ _hb_ucd_u8[32480] =
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 22, 18, 2, 2, 2,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 21, 21, 14, 14,
14, 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2, 2, 2, 2, 2,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 7, 7,
- 7, 7, 12, 12, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 7, 7, 12, 12, 12, 21, 21, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 7, 7, 12, 12, 12, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7,
+ 7, 7, 12, 12, 10, 21, 21, 2, 2, 2, 2, 2, 2, 2, 2, 2,
7, 7, 12, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 7, 7,
7, 2, 12, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
7, 7, 7, 7, 12, 12, 10, 12, 12, 12, 12, 12, 12, 12, 10, 10,
10, 10, 10, 10, 10, 10, 12, 10, 10, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 21, 21, 21, 6, 21, 21, 21, 23, 7, 12, 2, 2,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 2, 2, 2, 2, 2, 2,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 2, 2, 2, 2, 2, 2,
- 21, 21, 21, 21, 21, 21, 17, 21, 21, 21, 21, 12, 12, 12, 1, 2,
+ 21, 21, 21, 21, 21, 21, 17, 21, 21, 21, 21, 12, 12, 12, 1, 12,
7, 7, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2, 2, 2, 2, 2,
7, 7, 7, 7, 7, 12, 12, 7, 7, 7, 7, 7, 7, 7, 7, 7,
@@ -1419,12 +1421,12 @@ _hb_ucd_u8[32480] =
10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 2, 2, 12,
21, 21, 21, 21, 21, 21, 21, 6, 21, 21, 21, 21, 21, 21, 2, 2,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12,
- 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 2,
12, 12, 12, 12, 10, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 12, 10, 12, 12, 12, 12, 12, 10, 12, 10, 10, 10,
- 10, 10, 12, 10, 10, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2, 2,
+ 10, 10, 12, 10, 10, 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2,
21, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 26, 26, 26, 26, 26, 26, 26, 26, 26, 2, 2, 2,
+ 12, 12, 12, 12, 26, 26, 26, 26, 26, 26, 26, 26, 26, 21, 21, 2,
12, 12, 10, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 10, 12, 12, 12, 12, 10, 10, 12, 12, 10, 12, 12, 12, 7, 7,
7, 7, 7, 7, 7, 7, 12, 10, 12, 12, 10, 10, 10, 12, 10, 12,
@@ -1443,7 +1445,6 @@ _hb_ucd_u8[32480] =
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 2, 12, 12, 12, 12, 12,
9, 5, 9, 5, 9, 5, 5, 5, 5, 5, 5, 5, 5, 5, 9, 5,
5, 5, 5, 5, 5, 5, 5, 5, 9, 9, 9, 9, 9, 9, 9, 9,
5, 5, 5, 5, 5, 5, 2, 2, 9, 9, 9, 9, 9, 9, 2, 2,
@@ -1466,8 +1467,10 @@ _hb_ucd_u8[32480] =
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 25, 25, 25, 22, 18, 2,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 2, 2, 2,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11,
11, 12, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
26, 26, 9, 26, 26, 26, 26, 9, 26, 26, 5, 9, 9, 9, 5, 5,
9, 9, 9, 5, 26, 9, 26, 26, 25, 9, 9, 9, 9, 9, 26, 26,
26, 26, 26, 26, 9, 26, 9, 26, 9, 26, 9, 9, 9, 9, 26, 5,
@@ -1509,8 +1512,6 @@ _hb_ucd_u8[32480] =
25, 25, 25, 25, 25, 26, 26, 25, 25, 25, 25, 25, 25, 26, 26, 26,
26, 26, 26, 26, 2, 2, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 2, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 2,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2,
9, 5, 9, 9, 9, 5, 5, 9, 5, 9, 5, 9, 5, 9, 9, 9,
9, 5, 9, 5, 5, 9, 5, 5, 5, 5, 5, 5, 6, 6, 9, 9,
9, 5, 9, 5, 5, 26, 26, 26, 26, 26, 26, 9, 5, 9, 5, 12,
@@ -1525,7 +1526,7 @@ _hb_ucd_u8[32480] =
20, 19, 22, 18, 22, 18, 22, 18, 22, 18, 21, 21, 21, 21, 21, 6,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 17, 17, 21, 21, 21, 21,
17, 21, 22, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 26, 26, 21, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 26, 26, 21, 21, 21, 22, 18, 22, 18, 22, 18, 22, 18, 17, 2, 2,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 2, 26, 26, 26, 26, 26,
26, 26, 26, 26, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
26, 26, 26, 26, 26, 26, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -1558,8 +1559,9 @@ _hb_ucd_u8[32480] =
9, 5, 9, 5, 5, 5, 9, 5, 9, 5, 9, 5, 9, 5, 9, 5,
9, 5, 9, 5, 9, 5, 9, 5, 9, 5, 9, 9, 9, 9, 9, 5,
9, 9, 9, 9, 9, 5, 9, 5, 9, 5, 9, 5, 9, 5, 9, 5,
- 2, 2, 9, 5, 9, 9, 9, 9, 5, 9, 5, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 9, 5, 7, 6, 6, 5, 7, 7, 7, 7, 7,
+ 9, 5, 9, 5, 9, 9, 9, 9, 5, 9, 5, 2, 2, 2, 2, 2,
+ 9, 5, 2, 5, 2, 5, 9, 5, 9, 5, 2, 2, 2, 2, 2, 2,
+ 2, 2, 6, 6, 6, 9, 5, 7, 6, 6, 5, 7, 7, 7, 7, 7,
7, 7, 12, 7, 7, 7, 12, 7, 7, 7, 7, 12, 7, 7, 7, 7,
7, 7, 7, 10, 10, 12, 12, 10, 26, 26, 26, 26, 12, 2, 2, 2,
15, 15, 15, 15, 15, 15, 26, 26, 23, 26, 2, 2, 2, 2, 2, 2,
@@ -1601,16 +1603,18 @@ _hb_ucd_u8[32480] =
7, 7, 7, 7, 7, 7, 7, 2, 7, 7, 7, 7, 7, 2, 7, 2,
7, 7, 2, 7, 7, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
- 24, 24, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 24, 24, 24, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 18, 22,
2, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 23, 26, 2, 2,
+ 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2, 2, 2, 2, 2, 26,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 23, 26, 26, 26,
21, 21, 21, 21, 21, 21, 21, 22, 18, 21, 2, 2, 2, 2, 2, 2,
21, 17, 17, 16, 16, 22, 18, 22, 18, 22, 18, 22, 18, 22, 18, 22,
18, 22, 18, 22, 18, 21, 21, 22, 18, 21, 21, 21, 21, 16, 16, 16,
21, 21, 21, 2, 21, 21, 21, 21, 17, 22, 18, 22, 18, 22, 18, 21,
21, 21, 25, 17, 25, 25, 25, 2, 21, 23, 21, 21, 2, 2, 2, 2,
+ 7, 7, 7, 7, 7, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 1,
2, 21, 21, 21, 23, 21, 21, 21, 22, 18, 21, 25, 21, 17, 21, 21,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 22, 25, 18, 25, 22,
@@ -1641,7 +1645,14 @@ _hb_ucd_u8[32480] =
9, 9, 9, 9, 9, 9, 9, 9, 5, 5, 5, 5, 5, 5, 5, 5,
9, 9, 9, 9, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2,
+ 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2, 2, 2, 2, 2, 2,
7, 7, 7, 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 21,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 2, 9, 9, 9, 9,
+ 9, 9, 9, 2, 9, 9, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 2, 5, 5, 5, 5, 5, 5, 5, 2, 5, 5, 2, 2, 2,
+ 6, 6, 6, 6, 6, 6, 2, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 2, 6, 6, 6, 6, 6, 6, 6, 6, 6, 2, 2, 2, 2, 2,
7, 7, 7, 7, 7, 7, 2, 2, 7, 2, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 2, 7, 7, 2, 2, 2, 7, 2, 2, 7,
7, 7, 7, 7, 7, 7, 2, 21, 15, 15, 15, 15, 15, 15, 15, 15,
@@ -1675,14 +1686,15 @@ _hb_ucd_u8[32480] =
7, 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
15, 15, 15, 15, 15, 15, 15, 7, 2, 2, 2, 2, 2, 2, 2, 2,
12, 15, 15, 15, 15, 21, 21, 21, 21, 21, 2, 2, 2, 2, 2, 2,
+ 7, 7, 12, 12, 12, 12, 21, 21, 21, 21, 2, 2, 2, 2, 2, 2,
7, 7, 7, 7, 7, 15, 15, 15, 15, 15, 15, 15, 2, 2, 2, 2,
10, 12, 10, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 21, 21, 21, 21, 21, 21, 21, 2, 2,
15, 15, 15, 15, 15, 15, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12,
+ 12, 7, 7, 12, 12, 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12,
10, 10, 10, 12, 12, 12, 12, 10, 10, 12, 12, 21, 21, 1, 21, 21,
- 21, 21, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2,
+ 21, 21, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2,
12, 12, 12, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 12, 12, 12, 12, 12, 10, 12, 12, 12,
12, 12, 12, 12, 12, 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
@@ -1719,7 +1731,7 @@ _hb_ucd_u8[32480] =
12, 21, 21, 21, 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 2, 2, 2,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 12, 10, 12, 10, 10,
- 12, 12, 12, 12, 12, 12, 10, 12, 7, 2, 2, 2, 2, 2, 2, 2,
+ 12, 12, 12, 12, 12, 12, 10, 12, 7, 21, 2, 2, 2, 2, 2, 2,
10, 10, 12, 12, 12, 12, 10, 12, 12, 12, 12, 12, 2, 2, 2, 2,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 21, 21, 21, 26,
12, 12, 12, 12, 12, 12, 12, 12, 10, 12, 12, 21, 2, 2, 2, 2,
@@ -1756,6 +1768,7 @@ _hb_ucd_u8[32480] =
26, 26, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 21,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 2,
21, 21, 21, 21, 21, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 7, 21, 21, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
12, 12, 12, 12, 12, 21, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
12, 12, 12, 12, 12, 12, 12, 21, 21, 21, 21, 21, 26, 26, 26, 26,
@@ -1771,16 +1784,18 @@ _hb_ucd_u8[32480] =
12, 12, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 21, 6, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
10, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 6, 6, 6, 6, 2, 6, 6, 6, 6, 6, 6, 6, 2, 6, 6, 2,
7, 7, 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 7, 7, 7, 7, 2, 2, 2, 2, 2, 2, 2, 2,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 26, 12, 12, 21,
1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 2, 2,
+ 12, 12, 12, 12, 12, 12, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2,
26, 26, 26, 26, 26, 26, 26, 2, 2, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 10, 10, 12, 12, 12, 26, 26, 26, 10, 10, 10,
10, 10, 10, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 12,
12, 12, 12, 26, 26, 12, 12, 12, 12, 12, 12, 12, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 12, 12, 12, 12, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 2, 2, 2, 2, 2, 2, 2,
26, 26, 12, 12, 12, 26, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
15, 15, 15, 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 5, 5, 5, 5, 5, 5,
@@ -1818,15 +1833,18 @@ _hb_ucd_u8[32480] =
26, 26, 26, 26, 26, 12, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 12, 26, 26, 21, 21, 21, 21, 21, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12, 12, 12, 12, 12,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2,
12, 12, 12, 12, 12, 12, 12, 2, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 2, 2, 12, 12, 12, 12, 12,
12, 12, 2, 12, 12, 2, 12, 12, 12, 12, 12, 2, 2, 2, 2, 2,
12, 12, 12, 12, 12, 12, 12, 6, 6, 6, 6, 6, 6, 6, 2, 2,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 2, 2, 2, 2, 7, 26,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 12, 2,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 12, 12, 12, 12,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 2, 2, 2, 2, 2, 23,
+ 7, 7, 7, 7, 7, 7, 7, 2, 7, 7, 7, 7, 2, 7, 7, 2,
7, 7, 7, 7, 7, 2, 2, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 12, 12, 12, 12, 12, 12, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2,
5, 5, 5, 5, 12, 12, 12, 12, 12, 12, 12, 6, 2, 2, 2, 2,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 26, 15, 15, 15,
23, 15, 15, 15, 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -1847,12 +1865,12 @@ _hb_ucd_u8[32480] =
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 2, 2,
2, 2, 2, 2, 2, 2, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 2, 2, 2, 2, 2, 2, 2,
26, 26, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 24, 24, 24, 24, 24,
+ 26, 26, 26, 26, 26, 26, 26, 26, 2, 2, 2, 2, 2, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 2, 2, 2, 2, 2, 2, 2, 2,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 2, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 2, 26, 26, 26,
- 26, 26, 26, 26, 26, 2, 2, 2, 26, 26, 26, 2, 2, 2, 2, 2,
+ 26, 26, 26, 26, 26, 2, 2, 2, 26, 26, 26, 26, 26, 2, 2, 2,
26, 26, 26, 2, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -1891,9 +1909,9 @@ _hb_ucd_u8[32480] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 50, 0, 0, 0,
0, 0, 0, 51, 0, 52, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 54, 55, 0, 0, 0, 0, 56, 0, 0, 57, 58, 0,
- 59, 60, 61, 62, 63, 64, 65, 0, 66, 67, 0, 68, 69, 70, 71, 0,
- 60, 0, 72, 73, 74, 75, 0, 0, 69, 0, 76, 77, 0, 0, 0, 0,
+ 0, 0, 0, 0, 54, 55, 0, 0, 0, 0, 56, 0, 0, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 0, 67, 68, 0, 69, 70, 71, 72, 0,
+ 61, 0, 73, 74, 75, 76, 0, 0, 70, 0, 77, 78, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1903,7 +1921,7 @@ _hb_ucd_u8[32480] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 78, 79, 0, 0, 0, 0, 0, 0, 0, 0, 80,
+ 0, 0, 0, 0, 0, 79, 80, 0, 0, 0, 0, 0, 0, 0, 0, 81,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1913,13 +1931,13 @@ _hb_ucd_u8[32480] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 82, 83, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 83, 84, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 85, 0, 79, 0, 0, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 87, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 86, 0, 80, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 1, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 14, 15, 16, 17, 18, 19, 20, 0, 0, 0,
@@ -1928,86 +1946,87 @@ _hb_ucd_u8[32480] =
28, 29, 0, 0, 0, 0, 30, 0, 0, 0, 31, 32, 33, 34, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 13, 35, 36, 0, 0, 26, 37, 38, 39, 0, 0, 0, 0, 0, 40,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 1,
- 42, 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 46, 0, 47, 48, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 47, 0, 0,
- 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 46, 0, 47, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 50, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, 47, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 0, 54, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 42, 43, 1,
+ 44, 45, 46, 47, 0, 0, 0, 0, 0, 0, 0, 48, 0, 49, 50, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 49, 0, 0,
+ 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 48, 0, 49, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 49, 52, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 0, 49, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 56, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 58, 59, 0, 0, 0, 0,
- 0, 0, 60, 61, 62, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 65, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 58, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 60, 61, 0, 0, 0, 0,
+ 0, 0, 62, 63, 64, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 67, 0, 0, 0, 0,
0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
- 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 67, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 68,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 71, 72, 0, 0, 0, 0, 0, 0, 0, 0,
- 73, 0, 66, 74, 0, 0, 0, 0, 0, 0, 75, 76, 72, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 67, 0, 0, 0,
- 0, 77, 78, 0, 0, 0, 0, 0, 0, 79, 0, 0, 0, 0, 0, 0,
- 80, 0, 79, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 82,
- 83, 84, 85, 86, 0, 0, 0, 0, 0, 0, 0, 0, 87, 88, 89, 1,
- 1, 1, 90, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93,
- 94, 95, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 71, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 0, 0, 0, 0, 0, 98, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 71,100,101, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 86, 0,102, 0, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0,
- 1, 1, 86, 0, 0, 0, 0, 0, 0,103, 0, 0, 0, 0,104, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,105, 0, 73, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,106,107,108, 0, 0, 0,
- 0, 0,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 47, 0, 0, 0, 0, 0,109, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,110,111, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,
+ 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 70, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 71,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 74, 75, 0, 0, 0, 0, 0, 0, 0, 0,
+ 76, 0, 68, 77, 0, 0, 0, 0, 0, 0, 78, 79, 80, 81, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 70, 0, 0, 0,
+ 0, 82, 83, 0, 0, 0, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0,
+ 85, 0, 84, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 87,
+ 88, 89, 90, 91, 0, 0, 0, 0, 0, 0, 0, 0, 92, 93, 94, 1,
+ 1, 1, 95, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 98,
+ 99,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 74, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 0, 0, 0, 0, 0,103, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,104, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 74,105,106, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 91, 0,107, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 0, 0, 0,
+ 1, 1, 91, 0, 0, 0, 0, 0, 0,108, 0, 0, 0, 0,109, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,110, 0, 76, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,112,113, 0, 0, 0,
+ 0, 0,107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 49, 0, 0, 0, 0, 0,114, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,115,116, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 26,112, 0,113, 0, 0, 0, 0, 0,114, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 115, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,116, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,117,118, 72, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,102, 0, 0, 0,
- 0, 0, 0, 97, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0,
- 0, 0, 0, 0,112, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0,
- 0, 0,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73,120, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,122, 0, 0, 0, 0, 0, 0, 0, 0, 0,123, 0, 47, 0, 0,
- 26,124,124, 0, 0, 0, 0, 0, 0, 0, 0, 0,125, 0, 0, 49,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97,127, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,129,105, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 97, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,130, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,131, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,132, 0, 0, 0, 0, 0, 0, 0,133, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,134, 0, 0, 0, 0,135, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 136,137,138,139,140,141, 0, 0, 0,142, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143, 0, 0, 0,
- 0, 0, 0, 0,133, 1, 1,144,145,112, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,146, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100,147, 0, 0,
+ 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 26,117, 0,118, 0, 0, 0, 0, 0,119, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 120, 0, 0, 0, 0, 0, 0, 0,105, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,121, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122,123, 75, 0,
+ 0, 0, 0, 0,124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107, 0, 0, 0,
+ 0, 0, 76,102, 0, 0, 0, 0, 0, 0, 0,125, 0, 0, 0, 0,
+ 0, 0, 0, 0,117, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0,
+ 0, 0,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76,126, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,129, 0, 49, 0, 0,
+ 26,130,130, 0, 0, 0, 0, 0, 0, 0, 0, 0,131, 0, 0, 51,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,132, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,102,133, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,102, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,134, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,109, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,110, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 0,102, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,136, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,137, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,102, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,138, 0, 0, 0, 0, 0, 0, 0,139, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,140, 0, 0, 0, 0,141, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 142,143,144,145,146,147, 0, 0, 0,148, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,149, 0, 0, 0,
+ 0, 0, 0, 0,139, 1, 1,150,151,117, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0,
+ 0,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,105,153, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,230,230,230,230,
230,230,230,230,230,230,230,230,230,232,220,220,220,220,232,216,
220,220,220,220,220,202,202,220,220,220,220,202,202,220,220,220,
@@ -2028,7 +2047,8 @@ _hb_ucd_u8[32480] =
220,230,220,230,220,230,230, 0, 0, 0, 0, 0,230,230,220,230,
0, 0, 0, 0, 0, 0, 0, 0, 0,220, 0, 0,230,230, 0,230,
230,230,230,230,230,230,230,230, 0,230,230,230, 0,230,230,230,
- 230,230, 0, 0, 0,220,220,220, 0, 0, 0, 0, 0, 0, 0,220,
+ 230,230, 0, 0, 0,220,220,220, 0, 0, 0, 0,230,220,220,220,
+ 230,230,230,230, 0, 0,230,230,230,230,230,220,220,220,220,220,
230,230,230,230,230,230, 0,220,230,230,220,230,230,220,230,230,
230,220,220,220, 27, 28, 29,230,230,230,220,230,230,220,220,230,
230,230,230,230, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0,
@@ -2042,32 +2062,34 @@ _hb_ucd_u8[32480] =
130,130, 0, 0,130, 0,230,230, 9, 0,230,230, 0, 0, 0, 0,
0, 0,220, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 9, 9, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,230,230,230, 0, 0, 0, 0,
- 9, 0, 0, 0, 0, 0, 0, 0, 0,230, 0, 0, 0,228, 0, 0,
- 0, 0, 0, 0, 0,222,230,220, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,230,220, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
- 0, 0, 0, 0,230,230,230,230,230, 0, 0,220,230,230,230,230,
- 230,220,220,220,220,220,220,230,230,220, 0,220, 0, 0, 0,230,
- 220,230,230,230,230,230,230,230, 0, 0, 0, 0, 0, 0, 9, 9,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0,230,230,230, 0,
- 1,220,220,220,220,220,230,230,220,220,220,220,230, 0, 1, 1,
- 1, 1, 1, 1, 1, 0, 0, 0, 0,220, 0, 0, 0, 0, 0, 0,
- 230, 0, 0, 0,230,230, 0, 0, 0, 0, 0, 0,230,230,220,230,
- 230,230,230,230,230,230,220,230,230,234,214,220,202,230,230,230,
- 230,230,230,230,230,230,230,230,230,230,232,228,228,220, 0,230,
- 233,220,230,220,230,230, 1, 1,230,230,230,230, 1, 1, 1,230,
- 230, 0, 0, 0, 0,230, 0, 0, 0, 1, 1,230,220,230, 1, 1,
- 220,220,220,220,230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 9, 0, 0,218,228,232,222,224,224, 0, 8, 8, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,230,230,230,230,230,230,230,230,
- 230,230, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0,220,
- 220,220, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 7,
- 0, 0, 0, 0,230, 0,230,230,220, 0, 0,230,230, 0, 0, 0,
- 0, 0,230,230, 0,230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 26, 0,230,230,230,230,230,230,230,220,220,220,220,220,
- 220,220,230,230,230,230,230, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,220, 0,230,230, 1,220, 0, 0, 0, 0, 9, 0, 0, 0, 0,
- 0,230,220, 0, 0, 0, 0,230,230, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,220,220,230,230,230,220,230,220,220,220, 0, 9, 7, 0,
+ 9, 9, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,
+ 0,230, 0, 0, 0,228, 0, 0, 0, 0, 0, 0, 0,222,230,220,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,230,220, 0, 0, 0,
+ 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,230,230,230,230,
+ 230, 0, 0,220,230,230,230,230,230,220,220,220,220,220,220,230,
+ 230,220, 0,220,220,230,230,220,220,230,230,230,230,230,220,230,
+ 230,230,230, 0, 0, 0, 0,230,220,230,230,230,230,230,230,230,
+ 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 7, 0,230,230,230, 0, 1,220,220,220,220,220,230,230,
+ 220,220,220,220,230, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0,
+ 0,220, 0, 0, 0, 0, 0, 0,230, 0, 0, 0,230,230, 0, 0,
+ 0, 0, 0, 0,230,230,220,230,230,230,230,230,230,230,220,230,
+ 230,234,214,220,202,230,230,230,230,230,230,230,230,230,230,230,
+ 230,230,232,228,228,220,218,230,233,220,230,220,230,230, 1, 1,
+ 230,230,230,230, 1, 1, 1,230,230, 0, 0, 0, 0,230, 0, 0,
+ 0, 1, 1,230,220,230, 1, 1,220,220,220,220,230, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0,218,228,
+ 232,222,224,224, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 230,230,230,230,230,230,230,230,230,230, 0, 0, 0, 0, 0, 0,
+ 0, 0, 9, 0, 0, 0, 0,220,220,220, 0, 0, 0, 0, 0, 9,
+ 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0,230, 0,230,230,
+ 220, 0, 0,230,230, 0, 0, 0, 0, 0,230,230, 0,230, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0,230,230,230,230,
+ 230,230,230,220,220,220,220,220,220,220,230,230,230,230,230, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,220, 0,230,230, 1,220, 0,
+ 0, 0, 0, 9, 0, 0, 0, 0, 0,230,220, 0, 0, 0, 0,230,
+ 230, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,220,230,230,230,220,
+ 230,220,220,220, 0, 0,230,220,230,220, 0, 0, 0, 9, 7, 0,
0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 9, 7, 0, 0, 7, 9, 0, 0, 0, 0, 0, 0, 0, 0, 7,
7, 0, 0, 0,230,230,230,230,230, 0, 0, 0, 0, 0, 9, 0,
@@ -2135,7 +2157,7 @@ _hb_ucd_u8[32480] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 46, 7, 1, 10, 1, 0, 0, 0, 1, 20, 20, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 34, 9, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 20, 20, 1, 20, 20, 0, 0, 0, 0, 0,
@@ -2155,114 +2177,114 @@ _hb_ucd_u8[32480] =
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 27, 28, 28, 29, 30, 31, 32, 33, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 34,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 35, 35, 35, 35, 35, 59, 59, 60, 35,
- 35, 35, 35, 35, 35, 35, 61, 62, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 63, 64, 35, 65, 66, 66, 66, 66,
- 66, 66, 66, 66, 66, 66, 66, 67, 66, 68, 69, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 70, 71, 35, 35,
- 35, 35, 72, 35, 35, 35, 35, 35, 35, 35, 35, 35, 73, 74, 75, 76,
- 77, 78, 35, 35, 79, 80, 35, 35, 81, 35, 82, 83, 84, 85, 17, 86,
- 87, 88, 35, 35, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 27, 27, 28, 29, 30, 31, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 33,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 34, 34, 34, 34, 58, 59, 59, 60, 34,
+ 34, 34, 34, 34, 34, 34, 61, 62, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 63, 64, 34, 65, 66, 66, 66, 66,
+ 66, 66, 66, 66, 66, 66, 66, 67, 66, 68, 69, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 70, 71, 72, 34, 34,
+ 34, 34, 73, 34, 34, 34, 34, 34, 34, 34, 34, 74, 75, 76, 77, 78,
+ 79, 80, 34, 81, 82, 83, 34, 84, 85, 34, 86, 87, 88, 89, 17, 90,
+ 91, 92, 34, 34, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 89, 25, 25, 25, 25, 25, 25, 25, 90,
- 91, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 92, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 93, 35, 35, 35, 35, 35, 35,
- 25, 94, 35, 35, 25, 25, 25, 25, 25, 25, 25, 25, 25, 95, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 25, 25, 25, 25, 25, 25, 25, 93, 25, 25, 25, 25, 25, 25, 25, 94,
+ 95, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 96, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 97, 34, 34, 34, 34, 34, 34,
+ 25, 98, 34, 34, 25, 25, 25, 25, 25, 25, 25, 25, 25, 99, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -2289,7 +2311,7 @@ _hb_ucd_u8[32480] =
14, 2, 2, 2, 2, 14, 14, 14, 14, 14, 14, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3,
3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 0, 3, 2, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 0, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
@@ -2307,10 +2329,8 @@ _hb_ucd_u8[32480] =
90, 90, 90, 90, 90, 2, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
95, 95, 2, 2, 95, 2, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
- 37, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
+ 37, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 2, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 1, 1, 1, 1, 7, 7, 7, 7, 7,
@@ -2359,9 +2379,9 @@ _hb_ucd_u8[32480] =
23, 23, 23, 2, 23, 23, 23, 2, 23, 23, 23, 23, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 2,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 2, 2, 2, 23, 23, 23, 23, 23, 23, 23, 23, 2, 23, 23, 23, 2,
+ 2, 2, 23, 23, 23, 23, 23, 23, 23, 23, 23, 2, 23, 23, 23, 2,
23, 23, 23, 23, 2, 2, 2, 2, 2, 2, 2, 23, 23, 2, 23, 23,
- 23, 2, 2, 2, 2, 2, 23, 23, 23, 23, 2, 2, 23, 23, 23, 23,
+ 23, 2, 2, 23, 2, 2, 23, 23, 23, 23, 2, 2, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 2, 2, 2, 2, 2, 2, 2, 23, 23, 23,
23, 23, 23, 23, 23, 23, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 2, 16, 16, 16, 2, 16, 16, 16, 16, 16, 16, 16, 16,
@@ -2369,7 +2389,7 @@ _hb_ucd_u8[32480] =
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 16,
2, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 2,
16, 16, 16, 16, 2, 2, 2, 2, 2, 2, 2, 16, 16, 2, 2, 2,
- 2, 2, 2, 2, 16, 2, 16, 16, 16, 16, 2, 2, 16, 16, 16, 16,
+ 2, 2, 2, 16, 16, 2, 16, 16, 16, 16, 2, 2, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 2, 16, 16, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 2, 20, 20, 20, 2, 20, 20, 20, 20, 20, 20, 20, 20,
@@ -2389,7 +2409,8 @@ _hb_ucd_u8[32480] =
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 2, 2, 2, 2, 0, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
- 24, 24, 2, 2, 2, 2, 2, 18, 18, 2, 18, 2, 18, 18, 18, 18,
+ 24, 24, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 18, 18, 2, 18, 2, 18, 18, 18, 18,
18, 2, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 2, 18, 2, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
@@ -2424,8 +2445,8 @@ _hb_ucd_u8[32480] =
35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 0, 0, 0, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 2,
2, 2, 2, 2, 2, 2, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 2, 45, 45, 45, 45, 45, 45, 45, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 45, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 0, 0, 2, 2, 2,
2, 2, 2, 2, 2, 2, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 2, 2, 2, 2, 2, 2,
@@ -2435,7 +2456,7 @@ _hb_ucd_u8[32480] =
31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 2, 2, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
2, 2, 2, 2, 2, 2, 32, 32, 0, 0, 32, 0, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 2, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
2, 2, 2, 2, 2, 2, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 2,
2, 2, 2, 2, 2, 2, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
@@ -2458,11 +2479,11 @@ _hb_ucd_u8[32480] =
91, 91, 91, 91, 91, 2, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 2, 2, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
2, 2, 2, 2, 2, 2, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
+ 91, 91, 91, 91, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 2, 2, 2, 2, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 2, 2, 2, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
+ 62, 62, 62, 2, 2, 2, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 2, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
76, 76, 76, 76, 76, 76, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 2, 2, 2, 2, 2, 2,
2, 2, 93, 93, 93, 93, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
@@ -2480,8 +2501,7 @@ _hb_ucd_u8[32480] =
19, 19, 19, 9, 9, 9, 9, 9, 19, 19, 19, 19, 9, 9, 9, 9,
9, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 6, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 2, 2, 9, 9,
+ 19, 19, 19, 19, 19, 9, 9, 9, 9, 9, 9, 9, 2, 2, 9, 9,
9, 9, 9, 9, 2, 2, 9, 9, 9, 9, 9, 9, 9, 9, 2, 9,
2, 9, 2, 9, 2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 2, 2, 9, 9, 9, 9, 9, 2, 9, 9, 9, 9,
@@ -2492,7 +2512,9 @@ _hb_ucd_u8[32480] =
0, 0, 0, 0, 0, 0, 0, 19, 2, 2, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 2, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 2, 2, 2, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
+ 19, 19, 19, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
19, 19, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 19, 0, 19, 19, 19, 19, 19, 19, 19, 19, 19, 0,
@@ -2502,16 +2524,15 @@ _hb_ucd_u8[32480] =
27, 27, 27, 27, 27, 27, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 0, 0, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
- 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
- 56, 56, 56, 56, 56, 2, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 56, 56, 56, 56, 56, 56, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 2, 2, 2, 2, 2, 55,
55, 55, 55, 55, 55, 55, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 2, 2,
2, 2, 2, 2, 2, 61, 61, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 61, 30, 30, 30, 30, 30, 30, 30, 2, 2, 2,
2, 2, 2, 2, 2, 2, 30, 30, 30, 30, 30, 30, 30, 2, 30, 30,
- 30, 30, 30, 30, 30, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 30, 30, 30, 30, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 13, 13, 2, 2, 2, 2,
@@ -2533,8 +2554,7 @@ _hb_ucd_u8[32480] =
2, 2, 2, 2, 2, 2, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 0, 17, 17, 17, 17, 17, 17, 17, 17, 0, 0,
- 0, 0, 0, 0, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 2, 2, 2, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 0, 0, 0, 0, 0, 0, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 2, 2, 2, 39, 39, 39, 39, 39, 39, 39, 2, 2, 2,
2, 2, 2, 2, 2, 2, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
@@ -2544,8 +2564,9 @@ _hb_ucd_u8[32480] =
79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 2, 2,
2, 2, 2, 2, 2, 2, 0, 0, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 0, 0,
- 0, 19, 19, 19, 19, 19, 2, 2, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 19, 19, 19, 19, 19,
+ 0, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 2, 2, 2, 2, 2, 19, 19, 2, 19, 2, 19, 19, 19, 19, 19,
+ 2, 2, 2, 2, 2, 2, 2, 2, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -2587,14 +2608,16 @@ _hb_ucd_u8[32480] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 2, 2,
2, 2, 2, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 2, 14, 14,
14, 14, 14, 2, 14, 2, 14, 14, 2, 14, 14, 2, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 0, 0, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
+ 14, 14, 14, 14, 14, 14, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 3, 3, 3, 3, 0, 0, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2,
+ 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 6, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
- 0, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 0, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
@@ -2642,11 +2665,17 @@ _hb_ucd_u8[32480] =
106,106,106,106,106,106,106,106,106,106,106,106,106,106, 2, 2,
2, 2, 2, 2, 2, 2,104,104,104,104,104,104,104,104,104,104,
104,104,104,104,104,104,104,104,104,104, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2,104,110,110,110,110,110,110,110,110,110,110,
+ 2, 2, 2, 2, 2,104,161,161,161,161,161,161,161,161,161,161,
+ 161, 2,161,161,161,161,161,161,161, 2,161,161, 2,161,161,161,
+ 161,161,161,161,161,161,161,161, 2,161,161,161,161,161,161,161,
+ 161,161,161,161,161,161,161,161, 2,161,161,161,161,161,161,161,
+ 2,161,161, 2, 2, 2,110,110,110,110,110,110,110,110,110,110,
110,110,110,110,110,110,110,110,110,110,110,110,110, 2, 2, 2,
2, 2, 2, 2, 2, 2,110,110,110,110,110,110, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2,110,110,110,110,110,110,110,110, 2, 2,
- 2, 2, 2, 2, 2, 2, 47, 47, 47, 47, 47, 47, 2, 2, 47, 2,
+ 2, 2, 2, 2, 2, 2, 19, 19, 19, 19, 19, 19, 2, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 2, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 2, 2, 2, 2, 2, 47, 47, 47, 47, 47, 47, 2, 2, 47, 2,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 2, 47, 47, 2,
2, 2, 47, 2, 2, 47, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
@@ -2692,14 +2721,15 @@ _hb_ucd_u8[32480] =
130,130,130,130,130,130,144,144,144,144,144,144,144,144,144,144,
144,144,144,144,144,144,144,144,144,144,144,144,144,144, 2, 2,
2, 2, 2, 2, 2, 2,144,144,144,144,144,144,144,144,144,144,
- 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 2,156,156,156,156,156,156,156,156,156,156,
+ 2, 2, 2, 2, 2, 2,156,156,156,156,156,156,156,156,156,156,
156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,
2,156,156,156, 2, 2,156,156, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2,147,147,147,147,147,147,147,147,147,147,
147,147,147,147,147,147,147,147,147,147,147,147,147,147, 2, 2,
2, 2, 2, 2, 2, 2,148,148,148,148,148,148,148,148,148,148,
148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,
+ 2, 2, 2, 2, 2, 2,158,158,158,158,158,158,158,158,158,158,
+ 158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,
2, 2, 2, 2, 2, 2,153,153,153,153,153,153,153,153,153,153,
153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,
153,153, 2, 2, 2, 2,149,149,149,149,149,149,149,149,149,149,
@@ -2707,9 +2737,9 @@ _hb_ucd_u8[32480] =
2, 2, 2, 2, 2, 2, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
94, 94, 94, 94, 2, 2, 2, 2, 94, 94, 94, 94, 94, 94, 94, 94,
- 94, 94, 94, 94, 94, 94, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 2, 2, 2, 2,
2, 2, 2, 2, 2, 94, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
- 85, 85, 85, 85, 85, 85, 85, 85, 2, 2, 2, 2, 2, 2, 2, 2,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 85, 2, 2,101,101,101,101,101,101,101,101,101,101,
101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, 2,
2, 2, 2, 2, 2, 2,101,101,101,101,101,101,101,101,101,101,
@@ -2752,12 +2782,12 @@ _hb_ucd_u8[32480] =
2, 2, 2, 2, 2, 2,114,114,114,114,114,114,114,114,114,114,
2, 2, 2, 2, 2, 2, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 2, 2, 2,102,102,102,102,102,102,102,102,102,102,
- 102,102,102,102,102,102,102,102,102,102,102,102,102,102,102, 2,
- 2, 2, 2, 2, 2, 2,102,102,102,102,102,102,102,102,102,102,
+ 102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
2, 2, 2, 2, 2, 2,126,126,126,126,126,126,126,126,126,126,
126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
126, 2, 2,126,126,126,126,126,126,126,126,126,126,126,126,126,
- 126,126, 2, 2, 2, 2,142,142,142,142,142,142,142,142,142,142,
+ 126,126, 2, 2, 2, 2,126,126,126,126,126,126,126, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2,142,142,142,142,142,142,142,142,142,142,
142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
142,142, 2, 2, 2, 2,125,125,125,125,125,125,125,125,125,125,
125,125,125,125,125,125,125,125,125, 2, 2, 2, 2, 2, 2, 2,
@@ -2805,6 +2835,8 @@ _hb_ucd_u8[32480] =
2, 2, 2, 2, 2, 2, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 2, 63, 63, 63, 63, 63, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 63, 63, 63, 63, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2,157,157,157,157,157,157,157,157,157,157,
+ 157,157,157,157,157,157,157,157,157, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 2, 80, 80, 80, 80, 80, 80, 80, 80, 80, 2,
@@ -2814,7 +2846,10 @@ _hb_ucd_u8[32480] =
2, 2, 2, 2, 2, 2,115,115,115,115,115,115,115,115,115,115,
115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
115,115,115,115,115, 2,115,115,115,115,115,115,115,115,115,115,
- 2, 2, 2, 2,115,115,103,103,103,103,103,103,103,103,103,103,
+ 2, 2, 2, 2,115,115,159,159,159,159,159,159,159,159,159,159,
+ 159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
+ 159,159,159,159,159, 2,159,159,159,159,159,159,159,159,159,159,
+ 2, 2, 2, 2, 2, 2,103,103,103,103,103,103,103,103,103,103,
103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
103,103,103,103, 2, 2,103,103,103,103,103,103, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2,119,119,119,119,119,119,119,119,119,119,
@@ -2827,16 +2862,17 @@ _hb_ucd_u8[32480] =
146, 2, 2, 2, 2, 2, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 2, 2, 2, 2, 99, 99, 99, 99, 99, 99, 99, 99, 99, 2, 2,
- 2, 2, 2, 2, 2, 99,136,139, 0, 0,155, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 99,136,139, 13, 13,155, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 13, 13, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136, 2, 2,
2, 2, 2, 2, 2, 2,155,155,155,155,155,155,155,155,155,155,
155,155,155,155,155,155,155,155,155,155,155,155, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2,136,136,136,136,136,136,136,136,136, 2,
- 2, 2, 2, 2, 2, 2, 17, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 2, 15, 15, 15, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 17, 17, 17, 17, 2, 17, 17, 17, 17, 17,
+ 17, 17, 2, 17, 17, 2, 17, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 17, 17, 17, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 15, 15, 15, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 17, 17, 17, 17, 2, 2,
2, 2, 2, 2, 2, 2,139,139,139,139,139,139,139,139,139,139,
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
@@ -2845,14 +2881,16 @@ _hb_ucd_u8[32480] =
105, 2, 2, 2, 2, 2,105,105,105,105,105,105,105,105,105,105,
105,105,105, 2, 2, 2,105,105,105,105,105,105,105,105,105, 2,
2, 2, 2, 2, 2, 2,105,105,105,105,105,105,105,105,105,105,
- 2, 2,105,105,105,105, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2,
+ 2, 2,105,105,105,105, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1,
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
- 2, 2, 2, 2, 2, 2, 9, 9, 9, 9, 9, 9, 2, 2, 2, 2,
+ 1, 1, 1, 1, 0, 0, 9, 9, 9, 9, 9, 9, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 2, 0, 0, 2, 2, 0, 2, 2, 0, 0, 2, 2, 0,
0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -2868,24 +2906,28 @@ _hb_ucd_u8[32480] =
131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,
131,131, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,131,131,131,131,131, 2,131,131,131,131,131,131,131,131,131,
- 131,131,131,131,131,131, 56, 56, 56, 56, 56, 56, 56, 2, 56, 56,
+ 131,131,131,131,131,131, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 2, 56, 56, 56, 56, 56, 56, 56, 2, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 2,
2, 56, 56, 56, 56, 56, 56, 56, 2, 56, 56, 2, 56, 56, 56, 56,
56, 2, 2, 2, 2, 2,151,151,151,151,151,151,151,151,151,151,
151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,
151,151,151, 2, 2, 2,151,151,151,151,151,151,151,151,151,151,
151,151,151,151, 2, 2,151,151,151,151,151,151,151,151,151,151,
- 2, 2, 2, 2,151,151,152,152,152,152,152,152,152,152,152,152,
+ 2, 2, 2, 2,151,151,160,160,160,160,160,160,160,160,160,160,
+ 160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,
+ 160,160,160,160,160, 2,152,152,152,152,152,152,152,152,152,152,
152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
- 2, 2, 2, 2, 2,152,113,113,113,113,113,113,113,113,113,113,
+ 2, 2, 2, 2, 2,152, 30, 30, 30, 30, 30, 30, 30, 2, 30, 30,
+ 30, 30, 2, 30, 30, 2, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ 30, 30, 30, 30, 30, 2,113,113,113,113,113,113,113,113,113,113,
113,113,113,113,113,113,113,113,113,113,113, 2, 2,113,113,113,
113,113,113,113,113,113,113,113,113,113,113,113,113, 2, 2, 2,
2, 2, 2, 2, 2, 2,132,132,132,132,132,132,132,132,132,132,
132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,
132,132, 2, 2, 2, 2,132,132,132,132,132,132,132,132,132,132,
2, 2, 2, 2,132,132, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 2, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3,
+ 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 2, 3, 3, 2, 3, 2, 2, 3, 2, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3,
2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 3,
@@ -2895,14 +2937,14 @@ _hb_ucd_u8[32480] =
3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 2, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 3, 3,
- 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0,
+ 2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 15, 0, 0, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2,
- 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0,
- 0, 2, 2, 2, 2, 2, 13, 13, 13, 13, 13, 2, 2, 2, 2, 2,
+ 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2,
+ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0,
+ 0, 0, 0, 2, 2, 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 2,
2, 2, 2, 2, 2, 2, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -3099,7 +3141,7 @@ _hb_ucd_u8[32480] =
0, 0, 0, 0, 0, 0, 72, 73, 74, 75, 76, 77, 78, 79, 80, 0,
};
static const uint16_t
-_hb_ucd_u16[11328] =
+_hb_ucd_u16[11584] =
{
0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 10, 11, 12,
13, 13, 13, 14, 15, 13, 13, 16, 17, 18, 19, 20, 21, 22, 13, 23,
@@ -3109,14 +3151,14 @@ _hb_ucd_u16[11328] =
13, 13, 13, 42, 9, 43, 11, 11, 44, 45, 32, 46, 47, 48, 49, 50,
51, 52, 48, 48, 53, 32, 54, 55, 48, 48, 48, 48, 48, 56, 57, 58,
59, 60, 48, 32, 61, 48, 48, 48, 48, 48, 62, 63, 64, 48, 65, 66,
- 48, 67, 68, 69, 48, 70, 71, 72, 72, 72, 48, 73, 74, 75, 76, 32,
- 77, 48, 48, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
- 91, 84, 85, 92, 93, 94, 95, 96, 97, 98, 85, 99, 100, 101, 89, 102,
- 103, 84, 85, 104, 105, 106, 89, 107, 108, 109, 110, 111, 112, 113, 95, 114,
- 115, 116, 85, 117, 118, 119, 89, 120, 121, 116, 85, 122, 123, 124, 89, 125,
- 126, 116, 48, 127, 128, 129, 89, 130, 131, 132, 48, 133, 134, 135, 95, 136,
- 137, 48, 48, 138, 139, 140, 72, 72, 141, 48, 142, 143, 144, 145, 72, 72,
- 146, 147, 148, 149, 150, 48, 151, 152, 153, 154, 32, 155, 156, 157, 72, 72,
+ 48, 67, 68, 69, 48, 70, 71, 48, 72, 73, 48, 48, 74, 32, 75, 32,
+ 76, 48, 48, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 83, 84, 91, 92, 93, 94, 95, 96, 97, 84, 98, 99, 100, 88, 101,
+ 102, 83, 84, 103, 104, 105, 88, 106, 107, 108, 109, 110, 111, 112, 94, 113,
+ 114, 115, 84, 116, 117, 118, 88, 119, 120, 115, 84, 121, 122, 123, 88, 124,
+ 125, 115, 48, 126, 127, 128, 88, 129, 130, 131, 48, 132, 133, 134, 94, 135,
+ 136, 48, 48, 137, 138, 139, 140, 140, 141, 48, 142, 143, 144, 145, 140, 140,
+ 146, 147, 148, 149, 150, 48, 151, 152, 153, 154, 32, 155, 156, 157, 140, 140,
48, 48, 158, 159, 160, 161, 162, 163, 164, 165, 9, 9, 166, 11, 11, 167,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 168, 169, 48, 48, 168, 48, 48, 170, 171, 172, 48, 48,
@@ -3124,51 +3166,49 @@ _hb_ucd_u16[11328] =
178, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 179, 48, 180, 181, 48, 48, 48, 48, 182, 183,
- 184, 185, 48, 186, 48, 187, 184, 188, 48, 48, 48, 189, 190, 191, 192, 193,
+ 48, 184, 48, 185, 48, 186, 187, 188, 48, 48, 48, 189, 190, 191, 192, 193,
194, 192, 48, 48, 195, 48, 48, 196, 197, 48, 198, 48, 48, 48, 48, 199,
48, 200, 201, 202, 203, 48, 204, 205, 48, 48, 206, 48, 207, 208, 209, 209,
- 48, 210, 48, 48, 48, 211, 212, 213, 192, 192, 214, 215, 216, 72, 72, 72,
+ 48, 210, 48, 48, 48, 211, 212, 213, 192, 192, 214, 215, 216, 140, 140, 140,
217, 48, 48, 218, 219, 160, 220, 221, 222, 48, 223, 64, 48, 48, 224, 225,
48, 48, 226, 227, 228, 64, 48, 229, 230, 9, 9, 231, 232, 233, 234, 235,
- 11, 11, 236, 27, 27, 27, 237, 238, 11, 239, 27, 27, 32, 32, 32, 240,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 241, 13, 13, 13, 13, 13, 13,
- 242, 243, 242, 242, 243, 244, 242, 245, 246, 246, 246, 247, 248, 249, 250, 251,
- 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 262, 72, 263, 264, 216,
- 265, 266, 267, 268, 269, 270, 271, 271, 272, 273, 274, 209, 275, 276, 209, 277,
- 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
- 279, 209, 280, 209, 209, 209, 209, 281, 209, 282, 278, 283, 209, 284, 285, 209,
- 209, 209, 286, 72, 287, 72, 270, 270, 270, 288, 209, 209, 209, 209, 289, 270,
- 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 290, 291, 209, 209, 292,
- 209, 209, 209, 209, 209, 209, 293, 209, 209, 209, 209, 209, 209, 209, 209, 209,
- 209, 209, 209, 209, 209, 209, 294, 295, 270, 296, 209, 209, 297, 278, 298, 278,
+ 11, 11, 236, 27, 27, 27, 237, 238, 11, 239, 27, 27, 32, 32, 32, 32,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 240, 13, 13, 13, 13, 13, 13,
+ 241, 242, 241, 241, 242, 243, 241, 244, 245, 245, 245, 246, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 272, 273, 274, 275, 209, 276, 277, 209, 278,
+ 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279,
+ 280, 209, 281, 209, 209, 209, 209, 282, 209, 283, 279, 284, 209, 285, 286, 209,
+ 209, 209, 287, 140, 288, 140, 271, 271, 271, 289, 209, 209, 209, 209, 290, 271,
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 291, 292, 209, 209, 293,
+ 209, 209, 209, 209, 209, 209, 294, 209, 209, 209, 209, 209, 209, 209, 209, 209,
+ 209, 209, 209, 209, 209, 209, 295, 296, 271, 297, 209, 209, 298, 279, 299, 279,
209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
- 278, 278, 278, 278, 278, 278, 278, 278, 299, 300, 278, 278, 278, 301, 278, 302,
- 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
- 209, 209, 209, 278, 303, 209, 209, 304, 209, 305, 209, 209, 209, 209, 209, 209,
- 9, 9, 306, 11, 11, 307, 308, 309, 13, 13, 13, 13, 13, 13, 310, 311,
- 11, 11, 312, 48, 48, 48, 313, 314, 48, 315, 316, 316, 316, 316, 32, 32,
- 317, 318, 319, 320, 321, 322, 72, 72, 209, 323, 209, 209, 209, 209, 209, 324,
- 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 325, 72, 326,
- 327, 328, 329, 330, 137, 48, 48, 48, 48, 331, 178, 48, 48, 48, 48, 332,
- 333, 48, 48, 137, 48, 48, 48, 48, 200, 334, 48, 48, 209, 209, 324, 48,
- 209, 335, 336, 209, 337, 338, 209, 209, 336, 209, 209, 338, 209, 209, 209, 209,
+ 279, 279, 279, 279, 279, 279, 279, 279, 300, 301, 279, 279, 279, 302, 279, 303,
+ 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279,
+ 209, 209, 209, 279, 304, 209, 209, 305, 209, 306, 209, 209, 209, 209, 209, 209,
+ 9, 9, 9, 11, 11, 11, 307, 308, 13, 13, 13, 13, 13, 13, 309, 310,
+ 11, 11, 311, 48, 48, 48, 312, 313, 48, 314, 315, 315, 315, 315, 32, 32,
+ 316, 317, 318, 319, 320, 321, 140, 140, 209, 322, 209, 209, 209, 209, 209, 323,
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 324, 140, 325,
+ 326, 327, 328, 329, 136, 48, 48, 48, 48, 330, 178, 48, 48, 48, 48, 331,
+ 332, 48, 48, 136, 48, 48, 48, 48, 200, 333, 48, 48, 209, 209, 323, 48,
+ 209, 334, 335, 209, 336, 337, 209, 209, 335, 209, 209, 337, 209, 209, 209, 209,
209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 209, 209, 209, 209,
+ 48, 338, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 151,
- 48, 339, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 151, 209, 209, 209, 287, 48, 48, 229,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 151, 209, 209, 209, 286, 48, 48, 229,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 340, 48, 341, 72, 13, 13, 342, 343, 13, 344, 48, 48, 48, 48, 345, 346,
- 31, 347, 348, 349, 13, 13, 13, 350, 351, 352, 353, 354, 355, 72, 72, 356,
+ 339, 48, 340, 140, 13, 13, 341, 342, 13, 343, 48, 48, 48, 48, 344, 345,
+ 31, 346, 347, 348, 13, 13, 13, 349, 350, 351, 352, 353, 354, 355, 140, 356,
357, 48, 358, 359, 48, 48, 48, 360, 361, 48, 48, 362, 363, 192, 32, 364,
- 64, 48, 365, 48, 366, 367, 48, 151, 77, 48, 48, 368, 369, 370, 371, 372,
+ 64, 48, 365, 48, 366, 367, 48, 151, 76, 48, 48, 368, 369, 370, 371, 372,
48, 48, 373, 374, 375, 376, 48, 377, 48, 48, 48, 378, 379, 380, 381, 382,
- 383, 384, 316, 11, 11, 385, 386, 11, 11, 11, 11, 11, 48, 48, 387, 192,
+ 383, 384, 315, 11, 11, 385, 386, 11, 11, 11, 11, 11, 48, 48, 387, 192,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 388, 48, 389, 48, 48, 206,
390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
@@ -3177,120 +3217,130 @@ _hb_ucd_u16[11328] =
391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391,
391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 204, 48, 48, 48, 48, 48, 48, 207, 72, 72,
+ 48, 48, 48, 48, 48, 48, 204, 48, 48, 48, 48, 48, 48, 207, 140, 140,
392, 393, 394, 395, 396, 48, 48, 48, 48, 48, 48, 397, 398, 399, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 400, 72, 48, 48, 48, 48, 401, 48, 48, 74, 72, 72, 402,
- 32, 403, 32, 404, 405, 406, 407, 73, 48, 48, 48, 48, 48, 48, 48, 408,
- 409, 2, 3, 4, 5, 410, 411, 412, 48, 413, 48, 200, 414, 415, 416, 417,
- 418, 48, 172, 419, 204, 204, 72, 72, 48, 48, 48, 48, 48, 48, 48, 71,
- 420, 270, 270, 421, 271, 271, 271, 422, 423, 424, 425, 72, 72, 209, 209, 426,
- 72, 72, 72, 72, 72, 72, 72, 72, 48, 151, 48, 48, 48, 101, 427, 428,
- 48, 48, 429, 48, 430, 48, 48, 431, 48, 432, 48, 48, 433, 434, 72, 72,
- 9, 9, 435, 11, 11, 48, 48, 48, 48, 204, 192, 9, 9, 436, 11, 437,
- 48, 48, 74, 48, 48, 48, 438, 72, 72, 72, 72, 72, 72, 72, 72, 72,
+ 48, 48, 48, 400, 209, 48, 48, 48, 48, 401, 48, 48, 402, 140, 140, 403,
+ 32, 404, 32, 405, 406, 407, 408, 409, 48, 48, 48, 48, 48, 48, 48, 410,
+ 411, 2, 3, 4, 5, 412, 413, 414, 48, 415, 48, 200, 416, 417, 418, 419,
+ 420, 48, 172, 421, 204, 204, 140, 140, 48, 48, 48, 48, 48, 48, 48, 71,
+ 422, 271, 271, 423, 272, 272, 272, 424, 425, 426, 427, 140, 140, 209, 209, 428,
+ 140, 140, 140, 140, 140, 140, 140, 140, 48, 151, 48, 48, 48, 100, 429, 430,
+ 48, 48, 431, 48, 432, 48, 48, 433, 48, 434, 48, 48, 435, 436, 140, 140,
+ 9, 9, 437, 11, 11, 48, 48, 48, 48, 204, 192, 9, 9, 438, 11, 439,
+ 48, 48, 440, 48, 48, 48, 441, 442, 442, 443, 444, 445, 140, 140, 140, 140,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 315, 48, 199, 74, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 439, 48, 48, 440, 48, 441, 48, 442, 48, 200, 443, 72, 72, 72, 48, 444,
- 48, 445, 48, 446, 72, 72, 72, 72, 48, 48, 48, 447, 270, 448, 270, 270,
- 449, 450, 48, 451, 452, 453, 48, 454, 48, 455, 72, 72, 456, 48, 457, 458,
- 48, 48, 48, 459, 48, 460, 48, 461, 48, 462, 463, 72, 72, 72, 72, 72,
- 48, 48, 48, 48, 196, 72, 72, 72, 9, 9, 9, 464, 11, 11, 11, 465,
- 48, 48, 466, 192, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 270, 467, 48, 48, 468, 469, 72, 72, 72, 72,
- 48, 455, 470, 48, 62, 471, 72, 72, 72, 72, 72, 48, 472, 72, 48, 315,
- 473, 48, 48, 474, 475, 448, 476, 477, 222, 48, 48, 478, 479, 48, 196, 192,
- 480, 48, 481, 482, 483, 48, 48, 484, 222, 48, 48, 485, 486, 487, 488, 489,
- 48, 98, 490, 491, 72, 72, 72, 72, 492, 493, 494, 48, 48, 495, 496, 192,
- 497, 84, 85, 498, 499, 500, 501, 502, 72, 72, 72, 72, 72, 72, 72, 72,
- 48, 48, 48, 503, 504, 505, 469, 72, 48, 48, 48, 506, 507, 192, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 48, 48, 508, 509, 510, 511, 72, 72,
- 48, 48, 48, 512, 513, 192, 514, 72, 48, 48, 515, 516, 192, 72, 72, 72,
- 48, 173, 517, 518, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 48, 48, 490, 519, 72, 72, 72, 72, 72, 72, 9, 9, 11, 11, 148, 520,
- 521, 522, 48, 523, 524, 192, 72, 72, 72, 72, 525, 48, 48, 526, 527, 72,
- 528, 48, 48, 529, 530, 531, 48, 48, 532, 533, 534, 72, 48, 48, 48, 196,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 85, 48, 508, 535, 536, 148, 175, 537, 48, 538, 539, 540, 72, 72, 72, 72,
- 541, 48, 48, 542, 543, 192, 544, 48, 545, 546, 192, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 48, 547,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 101, 270, 548, 549, 550,
+ 48, 48, 48, 314, 48, 199, 440, 140, 446, 27, 27, 447, 140, 140, 140, 140,
+ 448, 48, 48, 449, 48, 450, 48, 451, 48, 200, 452, 140, 140, 140, 48, 453,
+ 48, 454, 48, 455, 140, 140, 140, 140, 48, 48, 48, 456, 271, 457, 271, 271,
+ 458, 459, 48, 460, 461, 462, 48, 463, 48, 464, 140, 140, 465, 48, 466, 467,
+ 48, 48, 48, 468, 48, 469, 48, 470, 48, 471, 472, 140, 140, 140, 140, 140,
+ 48, 48, 48, 48, 196, 140, 140, 140, 9, 9, 9, 473, 11, 11, 11, 474,
+ 48, 48, 475, 192, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 271, 476, 48, 48, 477, 478, 140, 140, 140, 140,
+ 48, 464, 479, 48, 62, 480, 140, 48, 481, 140, 140, 48, 482, 140, 48, 314,
+ 483, 48, 48, 484, 485, 457, 486, 487, 222, 48, 48, 488, 489, 48, 196, 192,
+ 490, 48, 491, 492, 493, 48, 48, 494, 222, 48, 48, 495, 496, 497, 498, 499,
+ 48, 97, 500, 501, 140, 140, 140, 140, 502, 503, 504, 48, 48, 505, 506, 192,
+ 507, 83, 84, 508, 509, 510, 511, 512, 140, 140, 140, 140, 140, 140, 140, 140,
+ 48, 48, 48, 513, 514, 515, 478, 140, 48, 48, 48, 516, 517, 192, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 518, 519, 520, 521, 140, 140,
+ 48, 48, 48, 522, 523, 192, 524, 140, 48, 48, 525, 526, 192, 140, 140, 140,
+ 48, 173, 527, 528, 314, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 48, 48, 500, 529, 140, 140, 140, 140, 140, 140, 9, 9, 11, 11, 148, 530,
+ 531, 532, 48, 533, 534, 192, 140, 140, 140, 140, 535, 48, 48, 536, 537, 140,
+ 538, 48, 48, 539, 540, 541, 48, 48, 542, 543, 544, 48, 48, 48, 48, 196,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 84, 48, 518, 545, 546, 148, 175, 547, 48, 548, 549, 550, 140, 140, 140, 140,
+ 551, 48, 48, 552, 553, 192, 554, 48, 555, 556, 192, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 557,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 100, 271, 558, 559, 560,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 207, 72, 72, 72, 72, 72, 72,
- 271, 271, 271, 271, 271, 271, 551, 552, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 388, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 48, 48, 200, 553, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 48, 48, 48, 48, 315, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 48, 48, 48, 196, 48, 200, 370, 72, 72, 72, 72, 72, 72, 48, 204, 554,
- 48, 48, 48, 555, 556, 557, 558, 559, 48, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 9, 9, 11, 11, 270, 560, 72, 72, 72, 72, 72, 72,
- 48, 48, 48, 48, 561, 562, 563, 563, 564, 565, 72, 72, 72, 72, 566, 567,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 207, 140, 140, 140, 140, 140, 140,
+ 272, 272, 272, 272, 272, 272, 561, 562, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 388, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 48, 48, 48, 48, 563,
+ 48, 48, 200, 564, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 48, 48, 48, 48, 314, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 48, 48, 48, 196, 48, 200, 370, 48, 48, 48, 48, 200, 192, 48, 204, 565,
+ 48, 48, 48, 566, 567, 568, 569, 570, 48, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 9, 9, 11, 11, 271, 571, 140, 140, 140, 140, 140, 140,
+ 48, 48, 48, 48, 572, 573, 574, 574, 575, 576, 140, 140, 140, 140, 577, 578,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 74,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 199, 72, 72,
- 196, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 440,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 199, 140, 140,
+ 196, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 579,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 200, 72, 72, 72, 568, 569, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 580, 140, 140, 580, 581, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 206,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 48, 48, 48, 48, 48, 48, 71, 151, 196, 570, 571, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 325,
- 209, 209, 572, 209, 209, 209, 573, 574, 575, 209, 576, 209, 209, 209, 577, 72,
- 209, 209, 209, 209, 578, 72, 72, 72, 72, 72, 72, 72, 72, 72, 270, 579,
- 209, 209, 209, 209, 209, 286, 270, 452, 72, 72, 72, 72, 72, 72, 72, 72,
- 9, 580, 11, 581, 582, 583, 242, 9, 584, 585, 586, 587, 588, 9, 580, 11,
- 589, 590, 11, 591, 592, 593, 594, 9, 595, 11, 9, 580, 11, 581, 582, 11,
- 242, 9, 584, 594, 9, 595, 11, 9, 580, 11, 596, 9, 597, 598, 599, 600,
- 11, 601, 9, 602, 603, 604, 605, 11, 606, 9, 607, 11, 608, 609, 609, 609,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 48, 48, 48, 48, 48, 48, 71, 151, 196, 582, 583, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 32, 32, 584, 32, 585, 209, 209, 209, 209, 209, 209, 209, 323, 140, 140, 140,
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 324,
+ 209, 209, 586, 209, 209, 209, 587, 588, 589, 209, 590, 209, 209, 209, 288, 140,
+ 209, 209, 209, 209, 591, 140, 140, 140, 140, 140, 140, 140, 140, 140, 271, 592,
+ 209, 209, 209, 209, 209, 287, 271, 461, 140, 140, 140, 140, 140, 140, 140, 140,
+ 9, 593, 11, 594, 595, 596, 241, 9, 597, 598, 599, 600, 601, 9, 593, 11,
+ 602, 603, 11, 604, 605, 606, 607, 9, 608, 11, 9, 593, 11, 594, 595, 11,
+ 241, 9, 597, 607, 9, 608, 11, 9, 593, 11, 609, 9, 610, 611, 612, 613,
+ 11, 614, 9, 615, 616, 617, 618, 11, 619, 9, 620, 11, 621, 622, 622, 622,
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
+ 32, 32, 32, 623, 32, 32, 624, 625, 626, 627, 45, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 628, 629, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 630, 631, 632, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 48, 48, 151, 633, 634, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 635, 140, 48, 48, 636, 637,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 638, 200,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 639, 585, 140, 140,
+ 9, 9, 597, 11, 640, 370, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 498, 271, 271, 641, 642, 140, 140, 140, 140,
+ 498, 271, 643, 644, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 645, 48, 646, 647, 648, 649, 650, 651, 652, 206, 653, 206, 140, 140, 140, 654,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 209, 209, 325, 209, 209, 209, 209, 209, 209, 323, 334, 655, 655, 655, 209, 324,
+ 656, 209, 209, 209, 209, 209, 209, 209, 209, 209, 657, 140, 140, 140, 658, 209,
+ 659, 209, 209, 325, 660, 661, 324, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 662,
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 663, 426, 426,
+ 209, 209, 209, 209, 209, 209, 209, 323, 209, 209, 209, 209, 209, 660, 325, 427,
+ 325, 209, 209, 209, 664, 176, 209, 209, 664, 209, 657, 661, 140, 140, 140, 140,
209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
- 32, 32, 32, 610, 32, 32, 611, 612, 613, 614, 45, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 615, 616, 617, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 48, 48, 151, 618, 619, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 48, 48, 620, 621,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 622, 623, 72, 72,
- 9, 9, 584, 11, 624, 370, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 488, 270, 270, 625, 626, 72, 72, 72, 72,
- 488, 270, 627, 628, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 629, 48, 630, 631, 632, 633, 634, 635, 636, 206, 637, 206, 72, 72, 72, 638,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 209, 209, 326, 209, 209, 209, 209, 209, 209, 324, 335, 639, 639, 639, 209, 325,
- 640, 209, 209, 209, 209, 209, 209, 209, 209, 209, 641, 72, 72, 72, 642, 209,
- 643, 209, 209, 326, 577, 644, 325, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 645,
- 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 646, 424, 424,
- 209, 209, 209, 209, 209, 209, 209, 324, 209, 209, 209, 209, 209, 577, 326, 72,
- 326, 209, 209, 209, 646, 176, 209, 209, 646, 209, 641, 644, 72, 72, 72, 72,
- 209, 209, 209, 209, 209, 209, 209, 647, 209, 209, 209, 209, 648, 209, 209, 209,
- 209, 209, 209, 209, 209, 324, 641, 649, 286, 209, 577, 286, 643, 286, 72, 72,
- 209, 209, 209, 209, 209, 209, 209, 209, 209, 650, 209, 209, 287, 72, 72, 192,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 204, 72, 72,
+ 209, 209, 209, 209, 209, 323, 657, 665, 287, 209, 426, 288, 324, 176, 664, 287,
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 666, 209, 209, 288, 140, 140, 192,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 140, 140,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 205, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 196, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 204, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 469, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 478, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 101, 72,
- 48, 204, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 100, 140,
+ 48, 204, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 71, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 651, 72, 652, 652, 652, 652, 652, 652, 72, 72, 72, 72, 72, 72, 72, 72,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 72,
+ 48, 48, 48, 48, 71, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
+ 667, 140, 668, 668, 668, 668, 668, 668, 140, 140, 140, 140, 140, 140, 140, 140,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 140,
391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391,
- 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 653,
+ 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 669,
391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391,
- 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 654,
+ 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 670,
0, 0, 0, 0, 1, 2, 1, 2, 0, 0, 3, 3, 4, 5, 4, 5,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 0, 0, 7, 0,
@@ -3299,191 +3349,199 @@ _hb_ucd_u16[11328] =
14, 14, 14, 16, 17, 18, 17, 17, 19, 20, 21, 21, 22, 21, 23, 24,
25, 26, 27, 27, 28, 29, 27, 30, 27, 27, 27, 27, 27, 31, 27, 27,
32, 33, 33, 33, 34, 27, 27, 27, 35, 35, 35, 36, 37, 37, 37, 38,
- 39, 39, 40, 41, 42, 43, 44, 45, 45, 45, 27, 46, 47, 48, 49, 27,
- 50, 50, 50, 50, 50, 51, 52, 50, 53, 54, 55, 56, 57, 58, 59, 60,
- 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
- 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 110, 111, 111, 112, 113, 114, 111, 115, 116, 117, 118, 119, 120, 121, 122,
- 123, 124, 124, 125, 124, 126, 45, 45, 127, 128, 129, 130, 131, 132, 45, 45,
- 133, 133, 133, 133, 134, 133, 135, 136, 133, 134, 133, 137, 137, 138, 45, 45,
- 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 140, 140, 141, 140, 140, 142,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 144, 144, 144, 144, 145, 146, 144, 144, 145, 144, 144, 147, 148, 149, 144, 144,
- 144, 148, 144, 144, 144, 150, 144, 151, 144, 152, 153, 153, 153, 153, 153, 154,
- 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
- 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
- 155, 155, 155, 155, 155, 155, 155, 155, 156, 157, 158, 158, 158, 158, 159, 160,
- 161, 162, 163, 164, 165, 166, 167, 168, 169, 169, 169, 169, 169, 170, 171, 171,
- 172, 173, 174, 174, 174, 174, 174, 175, 174, 174, 176, 155, 155, 155, 155, 177,
- 178, 179, 180, 180, 181, 182, 183, 184, 185, 185, 186, 185, 187, 188, 169, 169,
- 189, 190, 191, 191, 191, 192, 191, 193, 194, 194, 195, 8, 196, 45, 45, 45,
- 197, 197, 197, 197, 198, 197, 197, 199, 200, 200, 200, 200, 201, 201, 201, 202,
- 203, 203, 203, 204, 205, 206, 206, 206, 207, 140, 140, 208, 209, 210, 211, 212,
- 4, 4, 213, 4, 4, 214, 215, 216, 4, 4, 4, 217, 8, 8, 8, 218,
+ 39, 39, 40, 41, 42, 43, 44, 27, 45, 46, 27, 27, 27, 27, 47, 27,
+ 48, 48, 48, 48, 48, 49, 50, 48, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 109, 110, 111, 112, 109, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 122, 123, 122, 124, 125, 125, 126, 127, 128, 129, 130, 131, 125, 125,
+ 132, 132, 132, 132, 133, 132, 134, 135, 132, 133, 132, 136, 136, 137, 125, 125,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 139, 139, 140, 139, 139, 141,
+ 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
+ 143, 143, 143, 143, 144, 145, 143, 143, 144, 143, 143, 146, 147, 148, 143, 143,
+ 143, 147, 143, 143, 143, 149, 143, 150, 143, 151, 152, 152, 152, 152, 152, 153,
+ 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154,
+ 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154,
+ 154, 154, 154, 154, 154, 154, 154, 154, 155, 156, 157, 157, 157, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 168, 168, 168, 168, 169, 170, 170,
+ 171, 172, 173, 173, 173, 173, 173, 174, 173, 173, 175, 154, 154, 154, 154, 176,
+ 177, 178, 179, 179, 180, 181, 182, 183, 184, 184, 185, 184, 186, 187, 168, 168,
+ 188, 189, 190, 190, 190, 191, 190, 192, 193, 193, 194, 8, 195, 125, 125, 125,
+ 196, 196, 196, 196, 197, 196, 196, 198, 199, 199, 199, 199, 200, 200, 200, 201,
+ 202, 202, 202, 203, 204, 205, 205, 205, 206, 139, 139, 207, 208, 209, 210, 211,
+ 4, 4, 212, 4, 4, 213, 214, 215, 4, 4, 4, 216, 8, 8, 8, 8,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 11, 219, 11, 11, 219, 220, 11, 221, 11, 11, 11, 222, 222, 223, 11, 224,
- 225, 0, 0, 0, 0, 0, 226, 227, 228, 229, 0, 0, 45, 8, 8, 196,
+ 11, 217, 11, 11, 217, 218, 11, 219, 11, 11, 11, 220, 220, 221, 11, 222,
+ 223, 0, 0, 0, 0, 0, 224, 225, 226, 227, 0, 0, 228, 8, 8, 229,
0, 0, 230, 231, 232, 0, 4, 4, 233, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 234, 45, 235, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 234, 125, 235, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 237, 0, 238, 0, 0, 0, 0, 0, 0,
- 239, 239, 240, 239, 239, 240, 4, 4, 241, 241, 241, 241, 241, 241, 241, 242,
- 140, 140, 141, 243, 243, 243, 244, 245, 144, 246, 247, 247, 247, 247, 14, 14,
- 0, 0, 0, 0, 0, 248, 45, 45, 249, 250, 249, 249, 249, 249, 249, 251,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 252, 45, 253,
- 254, 0, 255, 256, 257, 258, 258, 258, 258, 259, 260, 261, 261, 261, 261, 262,
- 263, 264, 264, 265, 143, 143, 143, 143, 266, 0, 264, 264, 0, 0, 267, 261,
- 143, 266, 0, 0, 0, 0, 143, 268, 0, 0, 0, 0, 0, 261, 261, 269,
- 261, 261, 261, 261, 261, 270, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 0, 0, 0, 0,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 271,
- 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272,
- 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272,
- 272, 272, 272, 272, 272, 272, 272, 272, 273, 272, 272, 272, 274, 275, 275, 275,
- 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276,
- 276, 276, 277, 45, 14, 14, 14, 14, 14, 14, 278, 278, 278, 278, 278, 279,
- 0, 0, 280, 4, 4, 4, 4, 4, 281, 4, 4, 4, 282, 45, 45, 283,
- 284, 284, 285, 286, 287, 287, 287, 288, 289, 289, 289, 289, 290, 291, 50, 50,
- 292, 292, 293, 294, 294, 295, 143, 296, 297, 297, 297, 297, 298, 299, 139, 300,
- 301, 301, 301, 302, 303, 304, 139, 139, 305, 305, 305, 305, 306, 307, 308, 309,
- 310, 311, 247, 4, 4, 312, 313, 153, 153, 153, 153, 153, 308, 308, 314, 315,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 316, 143, 317, 143, 143, 318,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 249, 249, 319, 249, 249, 249, 249, 249, 249, 320, 45, 45,
- 321, 322, 21, 323, 324, 27, 27, 27, 27, 27, 27, 27, 325, 48, 27, 27,
+ 239, 239, 239, 239, 239, 239, 4, 4, 240, 240, 240, 240, 240, 240, 240, 241,
+ 139, 139, 140, 242, 242, 242, 243, 244, 143, 245, 246, 246, 246, 246, 14, 14,
+ 0, 0, 0, 0, 0, 247, 125, 125, 248, 249, 248, 248, 248, 248, 248, 250,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 251, 125, 252,
+ 253, 0, 254, 255, 256, 257, 257, 257, 257, 258, 259, 260, 260, 260, 260, 261,
+ 262, 263, 263, 264, 142, 142, 142, 142, 265, 0, 263, 263, 0, 0, 266, 260,
+ 142, 265, 0, 0, 0, 0, 142, 267, 0, 0, 0, 0, 0, 260, 260, 268,
+ 260, 260, 260, 260, 260, 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 0, 0, 0, 0,
+ 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
+ 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
+ 270, 270, 270, 270, 270, 270, 270, 270, 271, 270, 270, 270, 272, 273, 273, 273,
+ 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
+ 274, 274, 275, 125, 14, 14, 14, 14, 14, 14, 276, 276, 276, 276, 276, 277,
+ 0, 0, 278, 4, 4, 4, 4, 4, 279, 4, 4, 4, 280, 281, 125, 282,
+ 283, 283, 284, 285, 286, 286, 286, 287, 288, 288, 288, 288, 289, 290, 48, 48,
+ 291, 291, 292, 293, 293, 294, 142, 295, 296, 296, 296, 296, 297, 298, 138, 299,
+ 300, 300, 300, 301, 302, 303, 138, 138, 304, 304, 304, 304, 305, 306, 307, 308,
+ 309, 310, 246, 4, 4, 311, 312, 152, 152, 152, 152, 152, 307, 307, 313, 314,
+ 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
+ 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
+ 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
+ 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 315, 142, 316, 142, 142, 317,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 248, 248, 248, 318, 248, 248, 248, 248, 248, 248, 319, 125, 125,
+ 320, 321, 21, 322, 323, 27, 27, 27, 27, 27, 27, 27, 324, 325, 27, 27,
27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 326, 45, 27, 27, 27, 27, 327, 27, 27, 47, 45, 45, 328,
- 8, 286, 329, 0, 0, 330, 331, 46, 27, 27, 27, 27, 27, 27, 27, 332,
- 333, 0, 1, 2, 1, 2, 334, 260, 261, 335, 143, 266, 336, 337, 338, 339,
- 340, 341, 342, 343, 344, 344, 45, 45, 341, 341, 341, 341, 341, 341, 341, 345,
- 346, 0, 0, 347, 11, 11, 11, 11, 348, 349, 350, 45, 45, 0, 0, 351,
- 45, 45, 45, 45, 45, 45, 45, 45, 352, 353, 354, 354, 354, 355, 356, 253,
- 357, 357, 358, 359, 360, 361, 361, 362, 363, 364, 365, 365, 366, 367, 45, 45,
- 368, 368, 368, 368, 368, 369, 369, 369, 370, 371, 372, 373, 373, 374, 373, 375,
- 376, 376, 377, 378, 378, 378, 379, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380,
- 380, 380, 380, 381, 380, 382, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 384, 385, 385, 386, 387, 388, 389, 389, 390, 391, 392, 45, 45, 45, 393, 394,
- 395, 396, 397, 398, 45, 45, 45, 45, 399, 399, 400, 401, 400, 402, 400, 400,
- 403, 404, 405, 406, 407, 407, 408, 408, 409, 409, 45, 45, 410, 410, 411, 412,
- 413, 413, 413, 414, 415, 416, 417, 418, 419, 420, 421, 45, 45, 45, 45, 45,
- 422, 422, 422, 422, 423, 45, 45, 45, 424, 424, 424, 425, 424, 424, 424, 426,
- 427, 427, 428, 429, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 27, 430, 431, 431, 432, 433, 45, 45, 45, 45,
- 434, 434, 435, 436, 436, 437, 45, 45, 45, 45, 45, 438, 439, 45, 440, 441,
- 442, 442, 442, 442, 443, 444, 442, 445, 446, 446, 446, 446, 447, 448, 449, 450,
- 451, 451, 451, 452, 453, 454, 454, 455, 456, 456, 456, 456, 456, 456, 457, 458,
- 459, 460, 459, 461, 45, 45, 45, 45, 462, 463, 464, 465, 465, 465, 466, 467,
- 468, 469, 470, 471, 472, 473, 474, 475, 45, 45, 45, 45, 45, 45, 45, 45,
- 476, 476, 476, 476, 476, 477, 478, 45, 479, 479, 479, 479, 480, 481, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45, 482, 482, 482, 483, 482, 484, 45, 45,
- 485, 485, 485, 485, 486, 487, 488, 45, 489, 489, 489, 490, 491, 45, 45, 45,
- 492, 493, 494, 492, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 495, 495, 495, 496, 45, 45, 45, 45, 45, 45, 497, 497, 497, 497, 497, 498,
- 499, 500, 501, 502, 503, 504, 45, 45, 45, 45, 505, 506, 506, 505, 507, 45,
- 508, 508, 508, 508, 509, 510, 510, 510, 510, 510, 511, 45, 512, 512, 512, 513,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 514, 515, 515, 516, 517, 515, 518, 519, 519, 520, 521, 522, 45, 45, 45, 45,
- 523, 524, 524, 525, 526, 527, 528, 529, 530, 531, 532, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 533, 534,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 535, 536, 536, 536, 537,
- 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538,
- 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538,
- 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538,
- 538, 538, 538, 538, 538, 538, 538, 538, 538, 539, 45, 45, 45, 45, 45, 45,
- 538, 538, 538, 538, 538, 538, 540, 541, 538, 538, 538, 538, 538, 538, 538, 538,
- 538, 538, 538, 538, 542, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543,
- 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543,
- 543, 543, 544, 545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 27, 27, 27, 326, 27, 27, 27, 27, 27, 327, 27, 27, 328, 125, 125, 27,
+ 8, 285, 329, 0, 0, 330, 331, 332, 27, 27, 27, 27, 27, 27, 27, 333,
+ 334, 0, 1, 2, 1, 2, 335, 259, 260, 336, 142, 265, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 345, 125, 125, 342, 342, 342, 342, 342, 342, 342, 346,
+ 347, 0, 0, 348, 11, 11, 11, 11, 349, 350, 351, 125, 125, 0, 0, 352,
+ 125, 125, 125, 125, 125, 125, 125, 125, 353, 354, 355, 355, 355, 356, 357, 252,
+ 358, 358, 359, 360, 361, 362, 362, 363, 364, 365, 366, 366, 367, 368, 125, 125,
+ 369, 369, 369, 369, 369, 370, 370, 370, 371, 372, 373, 374, 374, 375, 374, 376,
+ 377, 377, 378, 379, 379, 379, 380, 381, 381, 382, 383, 384, 125, 125, 125, 125,
+ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
+ 385, 385, 385, 386, 385, 387, 388, 125, 389, 4, 4, 390, 125, 125, 125, 125,
+ 391, 392, 392, 393, 394, 395, 396, 396, 397, 398, 399, 125, 125, 125, 400, 401,
+ 402, 403, 404, 405, 125, 125, 125, 125, 406, 406, 407, 408, 407, 409, 407, 407,
+ 410, 411, 412, 413, 414, 414, 415, 415, 416, 416, 125, 125, 417, 417, 418, 419,
+ 420, 420, 420, 421, 422, 423, 424, 425, 426, 427, 428, 125, 125, 125, 125, 125,
+ 429, 429, 429, 429, 430, 125, 125, 125, 431, 431, 431, 432, 431, 431, 431, 433,
+ 434, 434, 435, 436, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 27, 45, 437, 437, 438, 439, 125, 125, 125, 125,
+ 440, 440, 441, 442, 442, 443, 125, 444, 445, 125, 125, 446, 447, 125, 448, 449,
+ 450, 450, 450, 450, 451, 452, 450, 453, 454, 454, 454, 454, 455, 456, 457, 458,
+ 459, 459, 459, 460, 461, 462, 462, 463, 464, 464, 464, 464, 464, 464, 465, 466,
+ 467, 468, 467, 469, 125, 125, 125, 125, 470, 471, 472, 473, 473, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 125, 125, 125, 125, 125, 125, 125, 125,
+ 484, 484, 484, 484, 484, 485, 486, 125, 487, 487, 487, 487, 488, 489, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 490, 490, 490, 491, 490, 492, 125, 125,
+ 493, 493, 493, 493, 494, 495, 496, 125, 497, 497, 497, 498, 498, 125, 125, 125,
+ 499, 500, 501, 499, 502, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 503, 503, 503, 504, 125, 125, 125, 125, 125, 125, 505, 505, 505, 505, 505, 506,
+ 507, 508, 509, 510, 511, 512, 125, 125, 125, 125, 513, 514, 514, 513, 515, 125,
+ 516, 516, 516, 516, 517, 518, 518, 518, 518, 518, 519, 154, 520, 520, 520, 521,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 522, 523, 523, 524, 525, 523, 526, 527, 527, 528, 529, 530, 125, 125, 125, 125,
+ 531, 532, 532, 533, 534, 535, 536, 537, 538, 539, 540, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 541, 542,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 543, 544, 544, 544, 545,
546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546,
546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546,
- 546, 546, 546, 546, 547, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
- 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
- 278, 278, 278, 548, 549, 550, 551, 45, 45, 45, 45, 45, 45, 552, 553, 554,
- 555, 555, 555, 555, 556, 557, 558, 559, 555, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 560, 560, 560, 560, 560, 561, 45, 45, 45, 45, 45, 45,
- 562, 562, 562, 562, 563, 562, 562, 562, 564, 562, 45, 45, 45, 45, 565, 566,
- 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567,
- 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567,
- 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567,
- 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 568,
- 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567,
- 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569,
- 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 570, 45, 45,
- 571, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 572, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258,
- 258, 573, 45, 45, 45, 574, 575, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 577,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 578, 578, 578, 578, 578, 578, 579, 580, 581, 582, 267, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 583,
- 0, 0, 584, 0, 0, 0, 585, 586, 587, 0, 588, 0, 0, 0, 589, 45,
- 11, 11, 11, 11, 590, 45, 45, 45, 45, 45, 45, 45, 45, 45, 0, 267,
- 0, 0, 0, 0, 0, 234, 0, 589, 45, 45, 45, 45, 45, 45, 45, 45,
- 0, 0, 0, 0, 0, 226, 0, 0, 0, 591, 592, 593, 594, 0, 0, 0,
- 595, 596, 0, 597, 598, 599, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 600, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 601, 0, 0, 0,
- 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602,
- 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602,
- 602, 602, 602, 602, 602, 602, 602, 602, 603, 604, 605, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 606, 607, 608, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 609, 609, 610, 611, 612, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 613, 613, 613, 614,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 616, 617, 45, 45,
- 618, 618, 618, 618, 619, 620, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 333, 0, 0, 0, 621, 45, 45, 45, 45,
- 333, 0, 0, 622, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 623, 27, 624, 625, 626, 627, 628, 629, 630, 631, 632, 631, 45, 45, 45, 325,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 0, 0, 253, 0, 0, 0, 0, 0, 0, 267, 228, 333, 333, 333, 0, 583,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 622, 45, 45, 45, 633, 0,
- 634, 0, 0, 253, 589, 635, 583, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 636, 349, 349,
- 0, 0, 0, 0, 0, 0, 0, 267, 0, 0, 0, 0, 0, 589, 253, 45,
- 253, 0, 0, 0, 636, 286, 0, 0, 636, 0, 622, 635, 45, 45, 45, 45,
- 0, 0, 0, 0, 0, 0, 0, 637, 0, 0, 0, 0, 638, 0, 0, 0,
- 0, 0, 0, 0, 0, 267, 622, 639, 234, 0, 589, 234, 248, 234, 45, 45,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 330, 0, 0, 235, 45, 45, 286,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 319, 45, 45,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 640, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 319, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 566, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 641, 45,
- 249, 319, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 642, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 643, 45, 0, 0, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45,
+ 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546,
+ 546, 546, 546, 546, 546, 546, 546, 546, 546, 547, 125, 125, 125, 125, 125, 125,
+ 546, 546, 546, 546, 546, 546, 548, 549, 546, 546, 546, 546, 546, 546, 546, 546,
+ 546, 546, 546, 546, 550, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 551, 551, 551, 551, 551, 551, 552,
+ 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
+ 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
+ 553, 553, 554, 555, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556,
+ 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556,
+ 556, 556, 556, 556, 557, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276,
+ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276,
+ 276, 276, 276, 558, 559, 560, 561, 562, 562, 562, 562, 563, 564, 565, 566, 567,
+ 568, 568, 568, 568, 569, 570, 571, 572, 568, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 573, 573, 573, 573, 573, 574, 125, 125, 125, 125, 125, 125,
+ 575, 575, 575, 575, 576, 575, 575, 575, 577, 575, 125, 125, 125, 125, 578, 579,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 581,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582,
+ 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 583, 125, 125,
+ 584, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 585,
+ 586, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 587, 125, 125, 588, 589, 590, 590, 590, 590, 590, 590, 590, 590, 590,
+ 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 591,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 592, 592, 592, 592, 592, 592, 593, 594, 595, 596, 266, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 8, 8, 597, 8, 598, 0, 0, 0, 0, 0, 0, 0, 266, 125, 125, 125,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 599,
+ 0, 0, 600, 0, 0, 0, 601, 602, 603, 0, 604, 0, 0, 0, 235, 125,
+ 11, 11, 11, 11, 605, 125, 125, 125, 125, 125, 125, 125, 125, 125, 0, 266,
+ 0, 0, 0, 0, 0, 234, 0, 606, 125, 125, 125, 125, 125, 125, 125, 125,
+ 0, 0, 0, 0, 0, 224, 0, 0, 0, 607, 608, 609, 610, 0, 0, 0,
+ 611, 612, 0, 613, 614, 615, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 616, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 617, 0, 0, 0,
+ 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618,
+ 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618,
+ 618, 618, 618, 618, 618, 618, 618, 618, 619, 620, 621, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 4, 622, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 623, 624, 625, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 626, 626, 627, 628, 629, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 630, 631, 125, 632, 632, 632, 633,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 634, 635,
+ 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 637, 638, 125, 125,
+ 639, 639, 639, 639, 640, 641, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 334, 0, 0, 0, 642, 125, 125, 125, 125,
+ 334, 0, 0, 247, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 643, 27, 644, 645, 646, 647, 648, 649, 650, 651, 652, 651, 125, 125, 125, 653,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 0, 0, 252, 0, 0, 0, 0, 0, 0, 266, 226, 334, 334, 334, 0, 599,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 125, 125, 125, 654, 0,
+ 655, 0, 0, 252, 606, 656, 599, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 657, 350, 350,
+ 0, 0, 0, 0, 0, 0, 0, 266, 0, 0, 0, 0, 0, 606, 252, 228,
+ 252, 0, 0, 0, 658, 285, 0, 0, 658, 0, 247, 656, 125, 125, 125, 125,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 266, 247, 659, 234, 0, 350, 235, 599, 285, 658, 234,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 330, 0, 0, 235, 125, 125, 285,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 125, 125,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 660, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 318, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 579, 248, 248, 248, 248, 248,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 661, 125,
+ 248, 318, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 248, 662, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 663, 125, 0, 0, 0, 0, 0, 0, 125, 125, 125, 125, 125, 125, 125, 125,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -3836,7 +3894,7 @@ _hb_ucd_gc (unsigned u)
static inline uint_fast8_t
_hb_ucd_ccc (unsigned u)
{
- return u<125259u?_hb_ucd_u8[15060+(((_hb_ucd_u8[13636+(((_hb_ucd_u8[12656+(u>>3>>4)])<<4)+((u>>3)&15u))])<<3)+((u)&7u))]:0;
+ return u<125259u?_hb_ucd_u8[15332+(((_hb_ucd_u8[13892+(((_hb_ucd_u8[12912+(u>>3>>4)])<<4)+((u>>3)&15u))])<<3)+((u)&7u))]:0;
}
static inline unsigned
_hb_ucd_b4 (const uint8_t* a, unsigned i)
@@ -3846,59 +3904,59 @@ _hb_ucd_b4 (const uint8_t* a, unsigned i)
static inline int_fast16_t
_hb_ucd_bmg (unsigned u)
{
- return u<65380u?_hb_ucd_i16[((_hb_ucd_u8[16372+(((_hb_ucd_b4(16244+_hb_ucd_u8,u>>2>>6))<<6)+((u>>2)&63u))])<<2)+((u)&3u)]:0;
+ return u<65380u?_hb_ucd_i16[((_hb_ucd_u8[16692+(((_hb_ucd_b4(16564+_hb_ucd_u8,u>>2>>6))<<6)+((u>>2)&63u))])<<2)+((u)&3u)]:0;
}
static inline uint_fast8_t
_hb_ucd_sc (unsigned u)
{
- return u<918000u?_hb_ucd_u8[19126+(((_hb_ucd_u16[3040+(((_hb_ucd_u8[17332+(u>>4>>5)])<<5)+((u>>4)&31u))])<<4)+((u)&15u))]:2;
+ return u<918000u?_hb_ucd_u8[19446+(((_hb_ucd_u16[3168+(((_hb_ucd_u8[17652+(u>>4>>5)])<<5)+((u>>4)&31u))])<<4)+((u)&15u))]:2;
}
static inline uint_fast16_t
_hb_ucd_dm (unsigned u)
{
- return u<195102u?_hb_ucd_u16[6144+(((_hb_ucd_u8[29430+(u>>6)])<<6)+((u)&63u))]:0;
+ return u<195102u?_hb_ucd_u16[6400+(((_hb_ucd_u8[30070+(u>>6)])<<6)+((u)&63u))]:0;
}
#elif !defined(HB_NO_UCD_UNASSIGNED)
static const uint8_t
-_hb_ucd_u8[17508] =
+_hb_ucd_u8[17936] =
{
0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 9, 10, 11, 7, 7, 7, 7, 12, 13, 14, 14, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 21, 23, 21, 21, 21, 21, 24, 7, 7,
- 25, 26, 21, 21, 21, 21, 27, 28, 21, 21, 29, 30, 31, 32, 33, 34,
+ 7, 7, 7, 7, 9, 10, 7, 7, 7, 7, 11, 12, 13, 13, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 22, 22, 22, 22, 24, 7, 7,
+ 25, 26, 22, 22, 22, 27, 28, 29, 22, 30, 31, 32, 33, 34, 35, 36,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 35, 7, 36, 37, 7, 38, 7, 7, 7, 39, 21, 40,
- 7, 7, 41, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 42, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 43,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 44,
+ 7, 7, 7, 7, 37, 7, 38, 39, 7, 40, 7, 7, 7, 41, 22, 42,
+ 7, 7, 43, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 44, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 45,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 46,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 34, 35, 36, 37, 38, 39, 34, 34, 34, 40, 41, 42, 43,
@@ -3908,42 +3966,44 @@ _hb_ucd_u8[17508] =
84, 85, 86, 87, 88, 89, 69, 69, 34, 34, 34, 34, 34, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 90, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 91,
- 92, 34, 34, 34, 34, 34, 34, 34, 34, 93, 34, 34, 94, 95, 96, 97,
- 98, 99,100,101,102,103,104,105, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,106,
+ 91, 34, 34, 34, 34, 34, 34, 34, 34, 92, 34, 34, 93, 94, 95, 96,
+ 97, 98, 99,100,101,102,103,104, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,105,
+ 106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,
107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
- 108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,
- 108,108, 34, 34,109,110,111,112, 34, 34,113,114,115,116,117,118,
- 119,120,121,122,123,124,125,126,127,128,129,123, 34, 34,130,123,
- 131,132,133,134,135,136,137,138,139,140,141,123,142,143,144,145,
- 146,147,148,149,150,151,152,123,153,154,123,155,156,157,158,123,
- 159,160,161,162,163,164,123,123,165,166,167,168,123,169,123,170,
- 34, 34, 34, 34, 34, 34, 34,171,172, 34,173,123,123,123,123,123,
- 123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
- 34, 34, 34, 34, 34, 34, 34, 34,174,123,123,123,123,123,123,123,
- 123,123,123,123,123,123,123,123, 34, 34, 34, 34,175,123,123,123,
- 34, 34, 34, 34,176,177,178,179,123,123,123,123,180,181,182,183,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,184,
- 34, 34, 34, 34, 34, 34, 34, 34, 34,185,186,123,123,123,123,123,
- 34, 34,187, 34, 34,188,123,123,123,123,123,123,123,123,123,123,
- 123,123,123,123,123,123,123,123,189,190,123,123,123,123,123,123,
- 69,191,192,193,194,195,196,123,197,198,199,200,201,202,203,204,
- 69, 69, 69, 69,205,206,123,123,123,123,123,123,123,123,123,123,
- 207,123,208,123,123,209,123,123,123,123,123,123,123,123,123,123,
- 34,210,211,123,123,123,123,123,212,213,214,123,215,216,123,123,
- 217,218,219,220,221,123, 69,222, 69, 69, 69, 69, 69,223,224,225,
- 226,227,228,229,230,231, 69,232,123,123,123,123,123,123,123,123,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,233, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,234, 34,
- 235, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,236, 34, 34,
- 34, 34, 34, 34, 34, 34, 34,237,123,123,123,123,123,123,123,123,
- 34, 34, 34, 34,238,123,123,123,123,123,123,123,123,123,123,123,
- 34, 34, 34, 34, 34, 34,239,123,123,123,123,123,123,123,123,123,
- 240,123,241,242,123,123,123,123,123,123,123,123,123,123,123,123,
- 108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,243,
- 108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,244,
+ 107,107, 34, 34,108,109,110,111, 34, 34,112,113,114,115,116,117,
+ 118,119,120,121,122,123,124,125,126,127,128,129, 34, 34,130,131,
+ 132,133,134,135,136,137,138,139,140,141,142,122,143,144,145,146,
+ 147,148,149,150,151,152,153,122,154,155,122,156,157,158,159,122,
+ 160,161,162,163,164,165,122,122,166,167,168,169,122,170,122,171,
+ 34, 34, 34, 34, 34, 34, 34,172,173, 34,174,122,122,122,122,122,
+ 122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,175,
+ 34, 34, 34, 34, 34, 34, 34, 34,176,122,122,122,122,122,122,122,
+ 122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
+ 122,122,122,122,122,122,122,122, 34, 34, 34, 34,177,122,122,122,
+ 34, 34, 34, 34,178,179,180,181,122,122,122,122,182,183,184,185,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,186,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34,187,188,122,122,122,122,122,
+ 122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,189,
+ 34, 34,190, 34, 34,191,122,122,122,122,122,122,122,122,122,122,
+ 122,122,122,122,122,122,122,122,192,193,122,122,122,122,122,122,
+ 122,122,122,122,122,122,122,122,122,122,122,122,122,122,194,195,
+ 69,196,197,198,199,200,201,122,202,203,204,205,206,207,208,209,
+ 69, 69, 69, 69,210,211,122,122,122,122,122,122,122,122,212,122,
+ 213,122,214,122,122,215,122,122,122,122,122,122,122,122,122,216,
+ 34,217,218,122,122,122,122,122,219,220,221,122,222,223,122,122,
+ 224,225,226,227,228,122, 69,229, 69, 69, 69, 69, 69,230,231,232,
+ 233,234, 69, 69,235,236, 69,237,122,122,122,122,122,122,122,122,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,238, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,239, 34,
+ 240, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,241, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34,242,122,122,122,122,122,122,122,122,
+ 34, 34, 34, 34,243,122,122,122,122,122,122,122,122,122,122,122,
+ 34, 34, 34, 34, 34, 34,244,122,122,122,122,122,122,122,122,122,
+ 245,122,246,247,122,122,122,122,122,122,122,122,122,122,122,122,
+ 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,248,
+ 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,249,
0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 2, 4, 5, 6, 2,
7, 7, 7, 7, 7, 2, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16,
@@ -3980,298 +4040,306 @@ _hb_ucd_u8[17508] =
43, 43, 40, 21, 2, 81, 57, 20, 36, 36, 36, 43, 43, 75, 43, 43,
43, 43, 75, 43, 75, 43, 43, 44, 2, 2, 2, 2, 2, 2, 2, 64,
36, 36, 36, 36, 70, 43, 44, 64, 36, 36, 36, 36, 36, 61, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 36, 36, 61, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 44, 44, 44, 44, 44, 57, 43, 43, 43, 43, 43, 43,
- 43, 82, 43, 43, 43, 43, 43, 43, 43, 83, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 83, 71, 84, 85, 43, 43, 43, 83, 84, 85, 84,
- 70, 43, 43, 43, 36, 36, 36, 36, 36, 43, 2, 7, 7, 7, 7, 7,
- 86, 36, 36, 36, 36, 36, 36, 36, 70, 84, 62, 36, 36, 36, 61, 62,
- 61, 62, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 61, 36, 36, 36,
- 61, 61, 44, 36, 36, 44, 71, 84, 85, 43, 80, 87, 88, 87, 85, 61,
- 44, 44, 44, 87, 44, 44, 36, 62, 36, 43, 44, 7, 7, 7, 7, 7,
- 36, 20, 27, 27, 27, 56, 63, 80, 57, 83, 62, 36, 36, 61, 44, 62,
- 61, 36, 62, 61, 36, 44, 80, 84, 85, 80, 44, 57, 80, 57, 43, 44,
- 57, 44, 44, 44, 62, 36, 61, 61, 44, 44, 44, 7, 7, 7, 7, 7,
- 43, 36, 70, 64, 44, 44, 44, 44, 57, 83, 62, 36, 36, 36, 36, 62,
- 36, 62, 36, 36, 36, 36, 36, 36, 61, 36, 62, 36, 36, 44, 71, 84,
- 85, 43, 43, 57, 83, 87, 85, 44, 61, 44, 44, 44, 44, 44, 44, 44,
- 66, 44, 44, 44, 62, 43, 43, 43, 57, 84, 62, 36, 36, 36, 61, 62,
- 61, 36, 62, 36, 36, 44, 71, 85, 85, 43, 80, 87, 88, 87, 85, 44,
- 44, 44, 57, 83, 44, 44, 36, 62, 78, 27, 27, 27, 44, 44, 44, 44,
- 44, 71, 62, 36, 36, 61, 44, 36, 61, 36, 36, 44, 62, 61, 61, 36,
- 44, 62, 61, 44, 36, 61, 44, 36, 36, 36, 36, 36, 36, 44, 44, 84,
- 83, 88, 44, 84, 88, 84, 85, 44, 61, 44, 44, 87, 44, 44, 44, 44,
- 27, 89, 67, 67, 56, 90, 44, 44, 83, 84, 71, 36, 36, 36, 61, 36,
- 61, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 44, 62, 43,
- 83, 84, 88, 43, 80, 43, 43, 44, 44, 44, 57, 80, 36, 61, 44, 44,
- 44, 44, 44, 91, 27, 27, 27, 89, 70, 84, 72, 36, 36, 36, 61, 36,
- 36, 36, 62, 36, 36, 44, 71, 85, 84, 84, 88, 83, 88, 84, 43, 44,
- 44, 44, 87, 88, 44, 44, 44, 61, 62, 61, 44, 44, 44, 44, 44, 44,
- 43, 84, 36, 36, 36, 36, 61, 36, 36, 36, 36, 36, 36, 70, 71, 84,
- 85, 43, 80, 84, 88, 84, 85, 77, 44, 44, 36, 92, 27, 27, 27, 93,
- 27, 27, 27, 27, 89, 36, 36, 36, 57, 84, 62, 36, 36, 36, 36, 36,
- 36, 36, 36, 61, 44, 36, 36, 36, 36, 62, 36, 36, 36, 36, 62, 44,
- 36, 36, 36, 61, 44, 80, 44, 87, 84, 43, 80, 80, 84, 84, 84, 84,
- 44, 84, 64, 44, 44, 44, 44, 44, 62, 36, 36, 36, 36, 36, 36, 36,
- 70, 36, 43, 43, 43, 80, 44, 94, 36, 36, 36, 75, 43, 43, 43, 60,
- 7, 7, 7, 7, 7, 2, 44, 44, 62, 61, 61, 36, 36, 61, 36, 36,
+ 36, 36, 36, 36, 82, 36, 36, 61, 65, 44, 44, 44, 43, 43, 43, 43,
+ 36, 36, 36, 36, 83, 43, 43, 43, 43, 84, 43, 43, 43, 43, 43, 43,
+ 43, 85, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 85, 71, 86,
+ 87, 43, 43, 43, 85, 86, 87, 86, 70, 43, 43, 43, 36, 36, 36, 36,
+ 36, 43, 2, 7, 7, 7, 7, 7, 88, 36, 36, 36, 36, 36, 36, 36,
+ 70, 86, 62, 36, 36, 36, 61, 62, 61, 62, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 61, 36, 36, 36, 61, 61, 44, 36, 36, 44, 71, 86,
+ 87, 43, 80, 89, 90, 89, 87, 61, 44, 44, 44, 89, 44, 44, 36, 62,
+ 36, 43, 44, 7, 7, 7, 7, 7, 36, 20, 27, 27, 27, 56, 63, 80,
+ 57, 85, 62, 36, 36, 61, 44, 62, 61, 36, 62, 61, 36, 44, 80, 86,
+ 87, 80, 44, 57, 80, 57, 43, 44, 57, 44, 44, 44, 62, 36, 61, 61,
+ 44, 44, 44, 7, 7, 7, 7, 7, 43, 36, 70, 64, 44, 44, 44, 44,
+ 57, 85, 62, 36, 36, 36, 36, 62, 36, 62, 36, 36, 36, 36, 36, 36,
+ 61, 36, 62, 36, 36, 44, 71, 86, 87, 43, 43, 57, 85, 89, 87, 44,
+ 61, 44, 44, 44, 44, 44, 44, 44, 66, 44, 44, 44, 62, 43, 43, 43,
+ 57, 86, 62, 36, 36, 36, 61, 62, 61, 36, 62, 36, 36, 44, 71, 87,
+ 87, 43, 80, 89, 90, 89, 87, 44, 44, 44, 57, 85, 44, 44, 36, 62,
+ 78, 27, 27, 27, 44, 44, 44, 44, 44, 71, 62, 36, 36, 61, 44, 36,
+ 61, 36, 36, 44, 62, 61, 61, 36, 44, 62, 61, 44, 36, 61, 44, 36,
+ 36, 36, 36, 36, 36, 44, 44, 86, 85, 90, 44, 86, 90, 86, 87, 44,
+ 61, 44, 44, 89, 44, 44, 44, 44, 27, 91, 67, 67, 56, 92, 44, 44,
+ 85, 86, 71, 36, 36, 36, 61, 36, 61, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 44, 71, 43, 85, 86, 90, 43, 80, 43, 43, 44,
+ 44, 44, 57, 80, 36, 61, 62, 44, 44, 44, 44, 93, 27, 27, 27, 91,
+ 70, 86, 72, 36, 36, 36, 61, 36, 36, 36, 62, 36, 36, 44, 71, 87,
+ 86, 86, 90, 85, 90, 86, 43, 44, 44, 44, 89, 90, 44, 44, 62, 61,
+ 62, 61, 44, 44, 44, 44, 44, 44, 43, 86, 36, 36, 36, 36, 61, 36,
+ 36, 36, 36, 36, 36, 70, 71, 86, 87, 43, 80, 86, 90, 86, 87, 77,
+ 44, 44, 36, 94, 27, 27, 27, 95, 27, 27, 27, 27, 91, 36, 36, 36,
+ 57, 86, 62, 36, 36, 36, 36, 36, 36, 36, 36, 61, 44, 36, 36, 36,
+ 36, 62, 36, 36, 36, 36, 62, 44, 36, 36, 36, 61, 44, 80, 44, 89,
+ 86, 43, 80, 80, 86, 86, 86, 86, 44, 86, 64, 44, 44, 44, 44, 44,
+ 62, 36, 36, 36, 36, 36, 36, 36, 70, 36, 43, 43, 43, 80, 44, 96,
+ 36, 36, 36, 75, 43, 43, 43, 60, 7, 7, 7, 7, 7, 2, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 62, 61, 61, 36, 36, 61, 36, 36,
36, 36, 62, 62, 36, 36, 36, 36, 70, 36, 43, 43, 43, 43, 71, 44,
36, 36, 61, 81, 43, 43, 43, 44, 7, 7, 7, 7, 7, 44, 36, 36,
- 77, 67, 2, 2, 2, 2, 2, 2, 2, 95, 95, 67, 43, 67, 67, 67,
- 7, 7, 7, 7, 7, 27, 27, 27, 27, 27, 50, 50, 50, 4, 4, 84,
+ 77, 67, 2, 2, 2, 2, 2, 2, 2, 97, 97, 67, 43, 67, 67, 67,
+ 7, 7, 7, 7, 7, 27, 27, 27, 27, 27, 50, 50, 50, 4, 4, 86,
36, 36, 36, 36, 62, 36, 36, 36, 36, 36, 36, 36, 36, 36, 61, 44,
- 57, 43, 43, 43, 43, 43, 43, 83, 43, 43, 60, 43, 36, 36, 70, 43,
+ 57, 43, 43, 43, 43, 43, 43, 85, 43, 43, 60, 43, 36, 36, 70, 43,
43, 43, 43, 43, 57, 43, 43, 43, 43, 43, 43, 43, 43, 43, 80, 67,
- 67, 67, 67, 76, 67, 67, 90, 67, 2, 2, 95, 67, 21, 64, 44, 44,
- 36, 36, 36, 36, 36, 92, 85, 43, 83, 43, 43, 43, 85, 83, 85, 71,
- 7, 7, 7, 7, 7, 2, 2, 2, 36, 36, 36, 84, 43, 36, 36, 43,
- 71, 84, 96, 92, 84, 84, 84, 36, 70, 43, 71, 36, 36, 36, 36, 36,
- 36, 83, 85, 83, 84, 84, 85, 92, 7, 7, 7, 7, 7, 84, 85, 67,
+ 67, 67, 67, 76, 67, 67, 92, 67, 2, 2, 97, 67, 21, 64, 44, 44,
+ 36, 36, 36, 36, 36, 94, 87, 43, 85, 43, 43, 43, 87, 85, 87, 71,
+ 7, 7, 7, 7, 7, 2, 2, 2, 36, 36, 36, 86, 43, 36, 36, 43,
+ 71, 86, 98, 94, 86, 86, 86, 36, 70, 43, 71, 36, 36, 36, 36, 36,
+ 36, 85, 87, 85, 86, 86, 87, 94, 7, 7, 7, 7, 7, 86, 87, 67,
11, 11, 11, 48, 44, 44, 48, 44, 16, 16, 16, 16, 16, 53, 45, 16,
36, 36, 36, 36, 61, 36, 36, 44, 36, 36, 36, 61, 61, 36, 36, 44,
61, 36, 36, 44, 36, 36, 36, 61, 61, 36, 36, 44, 36, 36, 36, 36,
36, 36, 36, 61, 36, 36, 36, 36, 36, 36, 36, 36, 36, 61, 57, 43,
- 2, 2, 2, 2, 97, 27, 27, 27, 27, 27, 27, 27, 27, 27, 98, 44,
+ 2, 2, 2, 2, 99, 27, 27, 27, 27, 27, 27, 27, 27, 27,100, 44,
67, 67, 67, 67, 67, 44, 44, 44, 11, 11, 11, 44, 16, 16, 16, 44,
- 99, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 77, 72,
- 100, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,101,102, 44,
- 36, 36, 36, 36, 36, 63, 2,103,104, 36, 36, 36, 61, 44, 44, 44,
- 36, 36, 36, 36, 36, 36, 61, 36, 36, 43, 80, 44, 44, 44, 44, 44,
- 36, 43, 60, 64, 44, 44, 44, 44, 36, 43, 44, 44, 44, 44, 44, 44,
- 61, 43, 44, 44, 44, 44, 44, 44, 36, 36, 43, 85, 43, 43, 43, 84,
- 84, 84, 84, 83, 85, 43, 43, 43, 43, 43, 2, 86, 2, 66, 70, 44,
+ 101, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 77, 72,
+ 102, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,103,104, 44,
+ 36, 36, 36, 36, 36, 63, 2,105,106, 36, 36, 36, 61, 44, 44, 44,
+ 36, 43, 85, 44, 44, 44, 44, 62, 36, 43,107, 64, 44, 44, 44, 44,
+ 36, 43, 44, 44, 44, 44, 44, 44, 36, 36, 36, 36, 36, 36, 61, 36,
+ 61, 43, 44, 44, 44, 44, 44, 44, 36, 36, 43, 87, 43, 43, 43, 86,
+ 86, 86, 86, 85, 87, 43, 43, 43, 43, 43, 2, 88, 2, 66, 70, 44,
7, 7, 7, 7, 7, 44, 44, 44, 27, 27, 27, 27, 27, 44, 44, 44,
- 2, 2, 2,105, 2, 59, 43, 68, 36,106, 36, 36, 36, 36, 36, 36,
+ 2, 2, 2,108, 2, 59, 43, 84, 36, 83, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 61, 44, 44, 44, 36, 36, 70, 71, 36, 36, 36, 36,
36, 36, 36, 36, 70, 61, 44, 44, 36, 36, 36, 44, 44, 44, 44, 44,
- 36, 36, 36, 36, 36, 36, 36, 61, 43, 83, 84, 85, 83, 84, 44, 44,
- 84, 83, 84, 84, 85, 43, 44, 44, 90, 44, 2, 7, 7, 7, 7, 7,
+ 36, 36, 36, 36, 36, 36, 36, 61, 43, 85, 86, 87, 85, 86, 44, 44,
+ 86, 85, 86, 86, 87, 43, 44, 44, 92, 44, 2, 7, 7, 7, 7, 7,
36, 36, 36, 36, 36, 36, 36, 44, 36, 36, 61, 44, 44, 44, 44, 44,
36, 36, 36, 36, 36, 36, 44, 44, 36, 36, 36, 36, 36, 44, 44, 44,
- 7, 7, 7, 7, 7, 98, 44, 67, 67, 67, 67, 67, 67, 67, 67, 67,
- 36, 36, 36, 70, 83, 85, 44, 2, 36, 36, 92, 83, 43, 43, 43, 80,
- 83, 83, 85, 43, 43, 43, 83, 84, 84, 85, 43, 43, 43, 43, 80, 57,
- 2, 2, 2, 86, 2, 2, 2, 44, 43, 43, 43, 43, 43, 43, 43,107,
- 80, 44, 44, 44, 44, 44, 44, 44, 43, 43, 96, 36, 36, 36, 36, 36,
- 36, 36, 83, 43, 43, 83, 83, 84, 84, 83, 96, 36, 36, 36, 44, 44,
- 95, 67, 67, 67, 67, 50, 43, 43, 43, 43, 67, 67, 67, 67, 90, 44,
- 43, 96, 36, 36, 36, 36, 36, 36, 92, 43, 43, 84, 43, 85, 43, 36,
- 36, 36, 36, 83, 43, 84, 85, 85, 43, 84, 44, 44, 44, 44, 2, 2,
- 36, 36, 84, 84, 84, 84, 43, 43, 43, 43, 84, 43, 44, 91, 2, 2,
+ 7, 7, 7, 7, 7,100, 44, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ 36, 36, 36, 70, 85, 87, 44, 2, 36, 36, 94, 85, 43, 43, 43, 80,
+ 85, 85, 87, 43, 43, 43, 85, 86, 86, 87, 43, 43, 43, 43, 80, 57,
+ 2, 2, 2, 88, 2, 2, 2, 44, 43, 43, 43, 43, 43, 43, 43,109,
+ 43, 43, 43, 43, 43, 43, 43, 80, 43, 43, 98, 36, 36, 36, 36, 36,
+ 36, 36, 85, 43, 43, 85, 85, 86, 86, 85, 98, 36, 36, 36, 61, 44,
+ 97, 67, 67, 67, 67, 50, 43, 43, 43, 43, 67, 67, 67, 67, 21, 64,
+ 43, 98, 36, 36, 36, 36, 36, 36, 94, 43, 43, 86, 43, 87, 43, 36,
+ 36, 36, 36, 85, 43, 86, 87, 87, 43, 86, 44, 44, 44, 44, 2, 2,
+ 36, 36, 86, 86, 86, 86, 43, 43, 43, 43, 86, 43, 44, 93, 2, 2,
7, 7, 7, 7, 7, 44, 62, 36, 36, 36, 36, 36, 40, 40, 40, 2,
- 16, 16, 16, 16,108, 44, 44, 44, 11, 11, 11, 11, 11, 47, 48, 11,
+ 16, 16, 16, 16,110, 44, 44, 44, 11, 11, 11, 11, 11, 47, 48, 11,
2, 2, 2, 2, 44, 44, 44, 44, 43, 60, 43, 43, 43, 43, 43, 43,
- 83, 43, 43, 43, 71, 36, 70, 36, 36, 36, 71, 92, 43, 61, 44, 44,
+ 85, 43, 43, 43, 71, 36, 70, 36, 36, 36, 71, 94, 43, 61, 44, 44,
16, 16, 16, 16, 16, 16, 40, 40, 40, 40, 40, 40, 40, 45, 16, 16,
- 16, 16, 16, 16, 45, 16, 16, 16, 16, 16, 16, 16, 16,109, 40, 40,
- 43, 43, 43, 43, 43, 57, 43, 43, 32, 32, 32, 16, 16, 16, 16, 32,
- 16, 16, 16, 16, 11, 11, 11, 11, 16, 16, 16, 44, 11, 11, 11, 44,
- 16, 16, 16, 16, 48, 48, 48, 48, 16, 16, 16, 16, 16, 16, 16, 44,
- 16, 16, 16, 16,110,110,110,110, 16, 16,108, 16, 11, 11,111,112,
- 41, 16,108, 16, 11, 11,111, 41, 16, 16, 44, 16, 11, 11,113, 41,
- 16, 16, 16, 16, 11, 11,114, 41, 44, 16,108, 16, 11, 11,111,115,
- 116,116,116,116,116,117, 65, 65,118,118,118, 2,119,120,119,120,
- 2, 2, 2, 2,121, 65, 65,122, 2, 2, 2, 2,123,124, 2,125,
- 126, 2,127,128, 2, 2, 2, 2, 2, 9,126, 2, 2, 2, 2,129,
- 65, 65, 68, 65, 65, 65, 65, 65,130, 44, 27, 27, 27, 8,127,131,
- 27, 27, 27, 27, 27, 8,127,102, 40, 40, 40, 40, 40, 40, 81, 44,
- 20, 20, 20, 20, 20, 20, 20, 20, 43, 43, 43, 43, 43, 43,132, 51,
- 107, 51,107, 43, 43, 43, 43, 43, 67,133, 67,134, 67, 34, 11, 16,
- 11, 32,134, 67, 49, 11, 11, 67, 67, 67,133,133,133, 11, 11,135,
- 11, 11, 35, 36, 39, 67, 16, 11, 8, 8, 49, 16, 16, 26, 67,136,
- 27, 27, 27, 27, 27, 27, 27, 27,103,103,103,103,103,103,103,103,
- 103,137,138,103,139, 67, 44, 44, 8, 8,140, 67, 67, 8, 67, 67,
- 140, 26, 67,140, 67, 67, 67,140, 67, 67, 67, 67, 67, 67, 67, 8,
- 67,140,140, 67, 67, 67, 67, 67, 67, 67, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 67, 67, 67, 67, 4, 4, 67, 67,
- 8, 67, 67, 67,141,142, 67, 67, 67, 67, 67, 67, 67, 67,140, 67,
- 67, 67, 67, 67, 67, 26, 8, 8, 8, 8, 67, 67, 67, 67, 67, 67,
- 67, 67, 67, 67, 67, 67, 8, 8, 8, 67, 67, 67, 67, 67, 67, 67,
- 67, 67, 67, 90, 44, 44, 44, 44, 67, 67, 67, 67, 67, 90, 44, 44,
- 27, 27, 27, 27, 27, 27, 67, 67, 67, 67, 67, 67, 67, 27, 27, 27,
- 67, 67, 67, 26, 67, 67, 67, 67, 26, 67, 67, 67, 67, 67, 67, 67,
- 67, 67, 67, 67, 8, 8, 8, 8, 67, 67, 67, 67, 67, 67, 67, 26,
- 67, 67, 67, 67, 4, 4, 4, 4, 4, 4, 4, 27, 27, 27, 27, 27,
- 27, 27, 67, 67, 67, 67, 67, 67, 8, 8,127,143, 8, 8, 8, 8,
- 8, 8, 8, 4, 4, 4, 4, 4, 8,127,144,144,144,144,144,144,
- 144,144,144,144,143, 8, 8, 8, 8, 8, 8, 8, 4, 4, 8, 8,
- 8, 8, 8, 8, 8, 8, 4, 8, 8, 8,140, 26, 8, 8,140, 67,
- 67, 67, 44, 67, 67, 67, 67, 67, 67, 67, 67, 55, 67, 67, 67, 67,
- 11, 11, 11, 11, 11, 11, 11, 47, 16, 16, 16, 16, 16, 16, 16,108,
- 32, 11, 32, 34, 34, 34, 34, 11, 32, 32, 34, 16, 16, 16, 40, 11,
- 32, 32,136, 67, 67,134, 34,145, 43, 32, 44, 44, 91, 2, 97, 2,
- 16, 16, 16,146, 44, 44,146, 44, 36, 36, 36, 36, 44, 44, 44, 52,
- 64, 44, 44, 44, 44, 44, 44, 57, 36, 36, 36, 61, 44, 44, 44, 44,
- 36, 36, 36, 61, 36, 36, 36, 61, 2,119,119, 2,123,124,119, 2,
- 2, 2, 2, 6, 2,105,119, 2,119, 4, 4, 4, 4, 2, 2, 86,
- 2, 2, 2, 2, 2,118, 2, 2,105,147, 2, 2, 2, 2, 2, 2,
- 67, 64, 44, 44, 44, 44, 44, 44, 67, 67, 67, 67, 67, 55, 67, 67,
- 67, 67, 44, 44, 44, 44, 44, 44, 67, 67, 67, 44, 44, 44, 44, 44,
- 67, 67, 67, 67, 67, 67, 44, 44, 1, 2,148,149, 4, 4, 4, 4,
- 4, 67, 4, 4, 4, 4,150,151,152,103,103,103,103, 43, 43, 84,
- 153, 40, 40, 67,103,154, 63, 67, 36, 36, 36, 61, 57,155,156, 69,
- 36, 36, 36, 36, 36, 63, 40, 69, 44, 44, 62, 36, 36, 36, 36, 36,
- 67, 27, 27, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 90,
- 27, 27, 27, 27, 27, 67, 67, 67, 67, 67, 67, 67, 27, 27, 27, 27,
- 157, 27, 27, 27, 27, 27, 27, 27, 36, 36,106, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36,158, 2, 7, 7, 7, 7, 7, 36, 44, 44,
- 32, 32, 32, 32, 32, 32, 32, 70, 51,159, 43, 43, 43, 43, 43, 86,
- 32, 32, 32, 32, 32, 32, 40, 43, 36, 36, 36,103,103,103,103,103,
- 43, 2, 2, 2, 44, 44, 44, 44, 41, 41, 41,156, 40, 40, 40, 40,
- 41, 32, 32, 32, 32, 32, 32, 32, 16, 32, 32, 32, 32, 32, 32, 32,
- 45, 16, 16, 16, 34, 34, 34, 32, 32, 32, 32, 32, 42,160, 34, 35,
- 32, 32, 16, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 11, 11, 32,
- 11, 11, 32, 32, 32, 32, 32, 32, 44, 32, 11, 11, 34,108, 44, 44,
- 44, 44, 48, 35, 40, 35, 36, 36, 36, 71, 36, 71, 36, 70, 36, 36,
- 36, 92, 85, 83, 67, 67, 80, 44, 27, 27, 27, 67,161, 44, 44, 44,
- 36, 36, 2, 2, 44, 44, 44, 44, 84, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 84, 84, 84, 84, 84, 84, 84, 84, 43, 44, 44, 44, 44, 2,
+ 16, 16, 16, 16, 45, 16, 16, 16, 16, 16, 16, 16, 16,111, 40, 40,
+ 32, 32, 32, 16, 16, 16, 16, 32, 16, 16, 16, 16, 11, 11, 11, 11,
+ 16, 16, 16, 44, 11, 11, 11, 44, 16, 16, 16, 16, 48, 48, 48, 48,
+ 16, 16, 16, 16, 16, 16, 16, 44, 16, 16, 16, 16,112,112,112,112,
+ 16, 16,110, 16, 11, 11,113,114, 41, 16,110, 16, 11, 11,113, 41,
+ 16, 16, 44, 16, 11, 11,115, 41, 16, 16, 16, 16, 11, 11,116, 41,
+ 44, 16,110, 16, 11, 11,113,117,118,118,118,118,118,119, 65, 65,
+ 120,120,120, 2,121,122,121,122, 2, 2, 2, 2,123, 65, 65,124,
+ 2, 2, 2, 2,125,126, 2,127,128, 2,129,130, 2, 2, 2, 2,
+ 2, 9,128, 2, 2, 2, 2,131, 65, 65,132, 65, 65, 65, 65, 65,
+ 133, 44, 27, 27, 27, 8,129,134, 27, 27, 27, 27, 27, 8,129,104,
+ 40, 40, 40, 40, 40, 40, 81, 44, 20, 20, 20, 20, 20, 20, 20, 20,
+ 135, 44, 44, 44, 44, 44, 44, 44, 43, 43, 43, 43, 43, 43,136, 51,
+ 109, 51,109, 43, 43, 43, 43, 43, 80, 44, 44, 44, 44, 44, 44, 44,
+ 67,137, 67,138, 67, 34, 11, 16, 11, 32,138, 67, 49, 11, 11, 67,
+ 67, 67,137,137,137, 11, 11,139, 11, 11, 35, 36, 39, 67, 16, 11,
+ 8, 8, 49, 16, 16, 26, 67,140, 27, 27, 27, 27, 27, 27, 27, 27,
+ 105,105,105,105,105,105,105,105,105,141,142,105,143, 67, 44, 44,
+ 8, 8,144, 67, 67, 8, 67, 67,144, 26, 67,144, 67, 67, 67,144,
+ 67, 67, 67, 67, 67, 67, 67, 8, 67,144,144, 67, 67, 67, 67, 67,
+ 67, 67, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 67, 67, 67, 67, 4, 4, 67, 67, 8, 67, 67, 67,145,146, 67, 67,
+ 67, 67, 67, 67, 67, 67,144, 67, 67, 67, 67, 67, 67, 26, 8, 8,
+ 8, 8, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 8, 8,
+ 8, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 92, 44, 44, 44, 44,
+ 67, 67, 67, 67, 67, 92, 44, 44, 27, 27, 27, 27, 27, 27, 67, 67,
+ 67, 67, 67, 67, 67, 27, 27, 27, 67, 67, 67, 26, 67, 67, 67, 67,
+ 26, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 8, 8, 8, 8,
+ 67, 67, 67, 67, 67, 67, 67, 26, 67, 67, 67, 67, 4, 4, 4, 4,
+ 4, 4, 4, 27, 27, 27, 27, 27, 27, 27, 67, 67, 67, 67, 67, 67,
+ 8, 8,129,147, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4,
+ 8,129,148,148,148,148,148,148,148,148,148,148,147, 8, 8, 8,
+ 8, 8, 8, 8, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 4, 8,
+ 8, 8,144, 26, 8, 8,144, 67, 67, 67, 44, 67, 67, 67, 67, 67,
+ 67, 67, 67, 55, 67, 67, 67, 67, 32, 11, 32, 34, 34, 34, 34, 11,
+ 32, 32, 34, 16, 16, 16, 40, 11, 32, 32,140, 67, 67,138, 34,149,
+ 43, 32, 44, 44, 93, 2, 99, 2, 16, 16, 16,150, 44, 44,150, 44,
+ 36, 36, 36, 36, 44, 44, 44, 52, 64, 44, 44, 44, 44, 44, 44, 57,
+ 36, 36, 36, 61, 44, 44, 44, 44, 36, 36, 36, 61, 36, 36, 36, 61,
+ 2,121,121, 2,125,126,121, 2, 2, 2, 2, 6, 2,108,121, 2,
+ 121, 4, 4, 4, 4, 2, 2, 88, 2, 2, 2, 2, 2,120, 2, 2,
+ 108,151, 2, 2, 2, 2, 2, 2, 67, 2,152,148,148,148,153, 44,
+ 67, 67, 67, 67, 67, 55, 67, 67, 67, 67, 44, 44, 44, 44, 44, 44,
+ 67, 67, 67, 44, 44, 44, 44, 44, 67, 67, 67, 67, 67, 67, 44, 44,
+ 1, 2,154,155, 4, 4, 4, 4, 4, 67, 4, 4, 4, 4,156,157,
+ 158,105,105,105,105, 43, 43, 86,159, 40, 40, 67,105,160, 63, 67,
+ 36, 36, 36, 61, 57,161,162, 69, 36, 36, 36, 36, 36, 63, 40, 69,
+ 44, 44, 62, 36, 36, 36, 36, 36, 67, 27, 27, 67, 67, 67, 67, 67,
+ 67, 67, 67, 67, 67, 67, 67, 92, 27, 27, 27, 27, 27, 67, 67, 67,
+ 67, 67, 67, 67, 27, 27, 27, 27,163, 27, 27, 27, 27, 27, 27, 27,
+ 36, 36, 83, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,164, 2,
+ 7, 7, 7, 7, 7, 36, 44, 44, 32, 32, 32, 32, 32, 32, 32, 70,
+ 51,165, 43, 43, 43, 43, 43, 88, 32, 32, 32, 32, 32, 32, 40, 43,
+ 36, 36, 36,105,105,105,105,105, 43, 2, 2, 2, 44, 44, 44, 44,
+ 41, 41, 41,162, 40, 40, 40, 40, 41, 32, 32, 32, 32, 32, 32, 32,
+ 16, 32, 32, 32, 32, 32, 32, 32, 45, 16, 16, 16, 34, 34, 34, 32,
+ 32, 32, 32, 32, 42,166, 34, 35, 32, 32, 16, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 11, 11, 32, 11, 11, 32, 32, 32, 32, 32, 32,
+ 32, 32, 11, 11, 34,110, 44, 44, 32,150,150, 32, 32, 44, 44, 44,
+ 44, 40,167, 35, 40, 35, 36, 36, 36, 71, 36, 71, 36, 70, 36, 36,
+ 36, 94, 87, 85, 67, 67, 80, 44, 27, 27, 27, 67,168, 44, 44, 44,
+ 36, 36, 2, 2, 44, 44, 44, 44, 86, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 86, 86, 86, 86, 86, 86, 86, 86, 43, 44, 44, 44, 44, 2,
43, 36, 36, 36, 2, 72, 72, 70, 36, 36, 36, 43, 43, 43, 43, 2,
- 36, 36, 36, 70, 43, 43, 43, 43, 43, 84, 44, 44, 44, 44, 44, 91,
- 36, 70, 84, 43, 43, 84, 43, 84,162, 2, 2, 2, 2, 2, 2, 52,
+ 36, 36, 36, 70, 43, 43, 43, 43, 43, 86, 44, 44, 44, 44, 44, 93,
+ 36, 70, 86, 43, 43, 86, 43, 86,107, 2, 2, 2, 2, 2, 2, 52,
7, 7, 7, 7, 7, 44, 44, 2, 36, 36, 70, 69, 36, 36, 36, 36,
- 7, 7, 7, 7, 7, 36, 36, 61, 36, 36, 36, 36, 70, 43, 43, 83,
- 85, 83, 85, 80, 44, 44, 44, 44, 36, 70, 36, 36, 36, 36, 83, 44,
- 7, 7, 7, 7, 7, 44, 2, 2, 69, 36, 36, 77, 67, 92, 83, 36,
+ 7, 7, 7, 7, 7, 36, 36, 61, 36, 36, 36, 36, 70, 43, 43, 85,
+ 87, 85, 87, 80, 44, 44, 44, 44, 36, 70, 36, 36, 36, 36, 85, 44,
+ 7, 7, 7, 7, 7, 44, 2, 2, 69, 36, 36, 77, 67, 94, 85, 36,
71, 43, 71, 70, 71, 36, 36, 43, 70, 61, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 62,106, 2, 36, 36, 36, 36, 36, 92, 43, 84,
- 2,106,163, 80, 44, 44, 44, 44, 62, 36, 36, 61, 62, 36, 36, 61,
- 62, 36, 36, 61, 44, 44, 44, 44, 16, 16, 16, 16, 16,112, 40, 40,
- 16, 16, 16, 16,109, 41, 44, 44, 36, 92, 85, 84, 83,162, 85, 44,
+ 44, 44, 44, 44, 44, 62, 83, 2, 36, 36, 36, 36, 36, 94, 43, 86,
+ 2, 83,169, 80, 44, 44, 44, 44, 62, 36, 36, 61, 62, 36, 36, 61,
+ 62, 36, 36, 61, 44, 44, 44, 44, 16, 16, 16, 16, 16,114, 40, 40,
+ 16, 16, 16, 16,111, 41, 44, 44, 36, 94, 87, 86, 85,107, 87, 44,
36, 36, 44, 44, 44, 44, 44, 44, 36, 36, 36, 61, 44, 62, 36, 36,
- 164,164,164,164,164,164,164,164,165,165,165,165,165,165,165,165,
- 16, 16, 16,108, 44, 44, 44, 44, 44,146, 16, 16, 44, 44, 62, 71,
- 36, 36, 36, 36,166, 36, 36, 36, 36, 36, 36, 61, 36, 36, 61, 61,
+ 170,170,170,170,170,170,170,170,171,171,171,171,171,171,171,171,
+ 16, 16, 16,110, 44, 44, 44, 44, 44,150, 16, 16, 44, 44, 62, 71,
+ 36, 36, 36, 36,172, 36, 36, 36, 36, 36, 36, 61, 36, 36, 61, 61,
36, 62, 61, 36, 36, 36, 36, 36, 36, 41, 41, 41, 41, 41, 41, 41,
- 41, 44, 44, 44, 44, 44, 44, 44, 44, 62, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36,144, 44, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36,161, 44, 2, 2, 2,167,128, 44, 44, 44,
- 6,168,169,144,144,144,144,144,144,144,128,167,128, 2,125,170,
- 2, 64, 2, 2,150,144,144,128, 2,171, 8,172, 66, 2, 44, 44,
- 36, 36, 36, 36, 36, 36, 61, 79, 91, 2, 3, 2, 4, 5, 6, 2,
- 16, 16, 16, 16, 16, 17, 18,127,128, 4, 2, 36, 36, 36, 36, 36,
+ 41,117, 44, 44, 44, 44, 44, 44, 44, 62, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36,148, 44, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 44, 44, 44, 55, 36, 36, 36, 36, 36, 36,168, 67,
+ 2, 2, 2,152,130, 44, 44, 44, 6,173,174,148,148,148,148,148,
+ 148,148,130,152,130, 2,127,175, 2, 64, 2, 2,156,148,148,130,
+ 2,176, 8,177, 66, 2, 44, 44, 36, 36, 61, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 61, 79, 93, 2, 3, 2, 4, 5, 6, 2,
+ 16, 16, 16, 16, 16, 17, 18,129,130, 4, 2, 36, 36, 36, 36, 36,
69, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 40,
44, 36, 36, 36, 44, 36, 36, 36, 44, 36, 36, 36, 44, 36, 61, 44,
- 20,173, 56,174, 26, 8,140, 90, 44, 44, 44, 44, 79, 65, 67, 44,
+ 20,178, 56,135, 26, 8,144, 92, 44, 44, 44, 44, 79, 65, 67, 44,
36, 36, 36, 36, 36, 36, 62, 36, 36, 36, 36, 36, 36, 61, 36, 62,
- 2, 64, 44,175, 27, 27, 27, 27, 27, 27, 44, 55, 67, 67, 67, 67,
- 103,103,139, 27, 89, 67, 67, 67, 67, 67, 67, 67, 67, 27, 67, 90,
- 67, 67, 67, 67, 67, 67, 90, 44, 90, 44, 44, 44, 44, 44, 44, 44,
- 67, 67, 67, 67, 67, 67, 50, 44,176, 27, 27, 27, 27, 27, 27, 27,
+ 2, 64, 44,179, 27, 27, 27, 27, 27, 27, 44, 55, 67, 67, 67, 67,
+ 105,105,143, 27, 91, 67, 67, 67, 67, 67, 67, 67, 67, 27, 67, 92,
+ 67, 67, 67, 67, 67, 67, 92, 44, 92, 44, 44, 44, 44, 44, 44, 44,
+ 67, 67, 67, 67, 67, 67, 50, 44,180, 27, 27, 27, 27, 27, 27, 27,
27, 27, 27, 27, 27, 27, 44, 44, 27, 27, 44, 44, 44, 44, 62, 36,
- 149, 36, 36, 36, 36,177, 44, 44, 36, 36, 36, 43, 43, 80, 44, 44,
- 36, 36, 36, 36, 36, 36, 36, 91, 36, 36, 44, 44, 36, 36, 36, 36,
- 178,103,103, 44, 44, 44, 44, 44, 11, 11, 11, 11, 16, 16, 16, 16,
+ 155, 36, 36, 36, 36,181, 44, 44, 36, 36, 36, 43, 43, 80, 44, 44,
+ 36, 36, 36, 36, 36, 36, 36, 93, 36, 36, 44, 44, 36, 36, 36, 36,
+ 182,105,105, 44, 44, 44, 44, 44, 11, 11, 11, 11, 16, 16, 16, 16,
11, 11, 44, 44, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 44, 44,
- 36, 36, 44, 44, 44, 44, 44, 91, 36, 36, 36, 44, 61, 36, 36, 36,
- 36, 36, 36, 62, 61, 44, 61, 62, 36, 36, 36, 91, 27, 27, 27, 27,
- 36, 36, 36, 77,157, 27, 27, 27, 44, 44, 44,175, 27, 27, 27, 27,
- 36, 61, 36, 44, 44,175, 27, 27, 36, 36, 36, 27, 27, 27, 44, 91,
- 36, 36, 36, 36, 36, 44, 44, 91, 36, 36, 36, 36, 44, 44, 27, 36,
- 44, 27, 27, 27, 27, 27, 27, 27, 70, 43, 57, 80, 44, 44, 43, 43,
- 36, 36, 62, 36, 62, 36, 36, 36, 36, 36, 36, 44, 43, 80, 44, 57,
- 27, 27, 27, 27, 98, 44, 44, 44, 2, 2, 2, 2, 64, 44, 44, 44,
- 36, 36, 36, 36, 36, 36,179, 30, 36, 36, 36, 36, 36, 36,179, 27,
- 36, 36, 36, 36, 78, 36, 36, 36, 36, 36, 70, 80, 44,175, 27, 27,
- 2, 2, 2, 64, 44, 44, 44, 44, 36, 36, 36, 44, 91, 2, 2, 2,
- 36, 36, 36, 44, 27, 27, 27, 27, 36, 61, 44, 44, 27, 27, 27, 27,
- 36, 44, 44, 44, 91, 2, 64, 44, 44, 44, 44, 44,175, 27, 27, 27,
- 11, 47, 44, 44, 44, 44, 44, 44, 16,108, 44, 44, 44, 27, 27, 27,
- 36, 36, 43, 43, 44, 44, 44, 44, 27, 27, 27, 27, 27, 27, 27, 98,
- 36, 36, 36, 36, 36, 57,180, 44, 36, 44, 44, 44, 44, 44, 44, 44,
- 27, 27, 27, 93, 44, 44, 44, 44,176, 27, 30, 2, 2, 44, 44, 44,
- 36, 36,179, 27, 27, 27, 44, 44, 85, 96, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 44, 44, 44, 44, 36, 36, 44, 44, 44, 44, 44, 93,
+ 11, 11, 11, 11, 11, 47, 11, 11, 11, 47, 11,150, 16, 16, 16, 16,
+ 16,150, 16, 16, 16, 16, 16, 16, 16,150, 16, 16, 16,150,110, 44,
+ 40, 40, 40, 52, 40, 40, 40, 40, 81, 40, 40, 40, 40, 81, 44, 44,
+ 36, 36, 36, 44, 61, 36, 36, 36, 36, 36, 36, 62, 61, 44, 61, 62,
+ 36, 36, 36, 93, 27, 27, 27, 27, 36, 36, 36, 77,163, 27, 27, 27,
+ 44, 44, 44,179, 27, 27, 27, 27, 36, 61, 36, 44, 44,179, 27, 27,
+ 36, 36, 36, 27, 27, 27, 44, 93, 36, 36, 36, 36, 36, 44, 44, 93,
+ 36, 36, 36, 36, 44, 44, 27, 36, 44, 27, 27, 27, 27, 27, 27, 27,
+ 70, 43, 57, 80, 44, 44, 43, 43, 36, 36, 62, 36, 62, 36, 36, 36,
+ 36, 36, 36, 44, 43, 80, 44, 57, 27, 27, 27, 27,100, 44, 44, 44,
+ 2, 2, 2, 2, 64, 44, 44, 44, 36, 36, 36, 36, 36, 36,183, 30,
+ 36, 36, 36, 36, 36, 36,183, 27, 36, 36, 36, 36, 78, 36, 36, 36,
+ 36, 36, 70, 80, 44,179, 27, 27, 2, 2, 2, 64, 44, 44, 44, 44,
+ 36, 36, 36, 44, 93, 2, 2, 2, 36, 36, 36, 44, 27, 27, 27, 27,
+ 36, 61, 44, 44, 27, 27, 27, 27, 36, 44, 44, 44, 93, 2, 64, 44,
+ 44, 44, 44, 44,179, 27, 27, 27, 11, 47, 44, 44, 44, 44, 44, 44,
+ 16,110, 44, 44, 44, 27, 27, 27, 36, 36, 43, 43, 44, 44, 44, 44,
+ 27, 27, 27, 27, 27, 27, 27,100, 36, 36, 36, 36, 36, 57,184, 44,
+ 36, 44, 44, 44, 44, 44, 44, 44, 27, 27, 27, 95, 44, 44, 44, 44,
+ 180, 27, 30, 2, 2, 44, 44, 44, 36, 43, 43, 2, 2, 44, 44, 44,
+ 36, 36,183, 27, 27, 27, 44, 44, 87, 98, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 43, 43, 43, 43, 43, 43, 43, 60, 2, 2, 2, 44,
- 27, 27, 27, 7, 7, 7, 7, 7, 44, 44, 44, 44, 44, 44, 44, 57,
- 84, 85, 43, 83, 85, 60,181, 2, 2, 44, 44, 44, 44, 44, 79, 44,
- 43, 71, 36, 36, 36, 36, 36, 36, 36, 36, 36, 70, 43, 43, 85, 43,
- 43, 43, 80, 7, 7, 7, 7, 7, 2, 2, 92, 96, 44, 44, 44, 44,
- 36, 70, 2, 61, 44, 44, 44, 44, 36, 92, 84, 43, 43, 43, 43, 83,
- 96, 36, 63, 2, 59, 43, 60, 85, 7, 7, 7, 7, 7, 63, 63, 2,
- 175, 27, 27, 27, 27, 27, 27, 27, 27, 27, 98, 44, 44, 44, 44, 44,
- 36, 36, 36, 36, 36, 36, 84, 85, 43, 84, 83, 43, 2, 2, 2, 80,
+ 27, 27, 27, 7, 7, 7, 7, 7, 71, 70, 71, 44, 44, 44, 44, 57,
+ 86, 87, 43, 85, 87, 60,185, 2, 2, 80, 44, 44, 44, 44, 79, 44,
+ 43, 71, 36, 36, 36, 36, 36, 36, 36, 36, 36, 70, 43, 43, 87, 43,
+ 43, 43, 80, 7, 7, 7, 7, 7, 2, 2, 94, 98, 44, 44, 44, 44,
+ 36, 70, 2, 61, 44, 44, 44, 44, 36, 94, 86, 43, 43, 43, 43, 85,
+ 98, 36, 63, 2, 59, 43, 60, 87, 7, 7, 7, 7, 7, 63, 63, 2,
+ 179, 27, 27, 27, 27, 27, 27, 27, 27, 27,100, 44, 44, 44, 44, 44,
+ 36, 36, 36, 36, 36, 36, 86, 87, 43, 86, 85, 43, 2, 2, 2, 80,
36, 36, 36, 61, 61, 36, 36, 62, 36, 36, 36, 36, 36, 36, 36, 62,
36, 36, 36, 36, 63, 44, 44, 44, 36, 36, 36, 36, 36, 36, 36, 70,
- 84, 85, 43, 43, 43, 80, 44, 44, 43, 84, 62, 36, 36, 36, 61, 62,
- 61, 36, 62, 36, 36, 57, 71, 84, 83, 84, 88, 87, 88, 87, 84, 44,
- 61, 44, 44, 87, 44, 44, 62, 36, 36, 84, 44, 43, 43, 43, 80, 44,
- 43, 43, 80, 44, 44, 44, 44, 44, 36, 36, 92, 84, 43, 43, 43, 43,
- 84, 43, 83, 71, 36, 63, 2, 2, 7, 7, 7, 7, 7, 2, 91, 71,
- 84, 85, 43, 43, 83, 83, 84, 85, 83, 43, 36, 72, 44, 44, 44, 44,
- 36, 36, 36, 36, 36, 36, 36, 92, 84, 43, 43, 44, 84, 84, 43, 85,
+ 86, 87, 43, 43, 43, 80, 44, 44, 43, 86, 62, 36, 36, 36, 61, 62,
+ 61, 36, 62, 36, 36, 57, 71, 86, 85, 86, 90, 89, 90, 89, 86, 44,
+ 61, 44, 44, 89, 44, 44, 62, 36, 36, 86, 44, 43, 43, 43, 80, 44,
+ 43, 43, 80, 44, 44, 44, 44, 44, 36, 36, 94, 86, 43, 43, 43, 43,
+ 86, 43, 85, 71, 36, 63, 2, 2, 7, 7, 7, 7, 7, 2, 93, 71,
+ 86, 87, 43, 43, 85, 85, 86, 87, 85, 43, 36, 72, 44, 44, 44, 44,
+ 36, 36, 36, 36, 36, 36, 36, 94, 86, 43, 43, 44, 86, 86, 43, 87,
60, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 36, 36, 43, 44,
- 84, 85, 43, 43, 43, 83, 85, 85, 60, 2, 61, 44, 44, 44, 44, 44,
- 2, 2, 2, 2, 2, 2, 64, 44, 36, 36, 36, 36, 36, 70, 85, 84,
- 43, 43, 43, 85, 61, 44, 44, 44, 84, 43, 43, 85, 43, 43, 44, 44,
- 7, 7, 7, 7, 7, 27, 2, 95, 43, 43, 43, 43, 85, 60, 44, 44,
- 27, 98, 44, 44, 44, 44, 44, 62, 36, 36, 36, 61, 62, 44, 36, 36,
- 36, 36, 62, 61, 36, 36, 36, 36, 84, 84, 84, 87, 88, 57, 83, 71,
- 96, 85, 2, 64, 44, 44, 44, 44, 36, 36, 36, 36, 44, 36, 36, 36,
- 92, 84, 43, 43, 44, 43, 84, 84, 71, 72, 88, 44, 44, 44, 44, 44,
- 70, 43, 43, 43, 43, 71, 36, 36, 36, 70, 43, 43, 83, 70, 43, 60,
- 2, 2, 2, 59, 44, 44, 44, 44, 70, 43, 43, 83, 85, 43, 36, 36,
- 36, 36, 36, 36, 36, 43, 43, 43, 43, 43, 43, 83, 43, 2, 72, 2,
- 2, 64, 44, 44, 44, 44, 44, 44, 43, 43, 43, 80, 43, 43, 43, 85,
+ 86, 87, 43, 43, 43, 85, 87, 87, 60, 2, 61, 44, 44, 44, 44, 44,
+ 2, 2, 2, 2, 2, 2, 64, 44, 36, 36, 36, 36, 36, 70, 87, 86,
+ 43, 43, 43, 87, 63, 44, 44, 44, 86, 43, 43, 87, 43, 43, 44, 44,
+ 7, 7, 7, 7, 7, 27, 2, 97, 43, 43, 43, 43, 87, 60, 44, 44,
+ 27,100, 44, 44, 44, 44, 44, 62, 36, 36, 36, 61, 62, 44, 36, 36,
+ 36, 36, 62, 61, 36, 36, 36, 36, 86, 86, 86, 89, 90, 57, 85, 71,
+ 98, 87, 2, 64, 44, 44, 44, 44, 36, 36, 36, 36, 44, 36, 36, 36,
+ 94, 86, 43, 43, 44, 43, 86, 86, 71, 72, 90, 44, 44, 44, 44, 44,
+ 70, 43, 43, 43, 43, 71, 36, 36, 36, 70, 43, 43, 85, 70, 43, 60,
+ 2, 2, 2, 59, 44, 44, 44, 44, 70, 43, 43, 85, 87, 43, 36, 36,
+ 36, 36, 36, 36, 36, 43, 43, 43, 43, 43, 43, 85, 43, 2, 72, 2,
+ 2, 64, 44, 44, 44, 44, 44, 44, 43, 43, 43, 80, 43, 43, 43, 87,
63, 2, 2, 44, 44, 44, 44, 44, 2, 36, 36, 36, 36, 36, 36, 36,
- 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 87, 43, 43, 43,
- 83, 43, 85, 80, 44, 44, 44, 44, 36, 36, 36, 61, 36, 62, 36, 36,
+ 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 89, 43, 43, 43,
+ 85, 43, 87, 80, 44, 44, 44, 44, 36, 36, 36, 61, 36, 62, 36, 36,
70, 43, 43, 80, 44, 80, 43, 57, 43, 43, 43, 70, 44, 44, 44, 44,
- 36, 36, 36, 62, 61, 36, 36, 36, 36, 36, 36, 36, 36, 84, 84, 88,
- 43, 87, 85, 85, 61, 44, 44, 44, 36, 70, 83,162, 64, 44, 44, 44,
- 27, 27, 89, 67, 67, 67, 56, 20,161, 67, 67, 67, 67, 67, 67, 67,
- 67, 44, 44, 44, 44, 44, 44, 91,103,103,103,103,103,103,103,177,
- 2, 2, 64, 44, 44, 44, 44, 44, 65, 65, 65, 65, 68, 44, 44, 44,
- 43, 43, 60, 44, 44, 44, 44, 44, 43, 43, 43, 60, 2, 2, 67, 67,
- 40, 40, 95, 44, 44, 44, 44, 44, 7, 7, 7, 7, 7,175, 27, 27,
- 27, 62, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 44, 44, 62, 36,
- 27, 27, 27, 30, 2, 64, 44, 44, 36, 36, 36, 36, 36, 61, 44, 57,
- 92, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 44, 44, 44, 57, 43, 74, 40, 40, 40, 40, 40, 40,
- 40, 86, 80, 44, 44, 44, 44, 44, 84, 44, 44, 44, 44, 44, 44, 44,
+ 36, 36, 36, 62, 61, 36, 36, 36, 36, 36, 36, 36, 36, 86, 86, 90,
+ 43, 89, 87, 87, 61, 44, 44, 44, 36, 70, 85,107, 64, 44, 44, 44,
+ 27, 27, 91, 67, 67, 67, 56, 20,168, 67, 67, 67, 67, 67, 67, 67,
+ 67, 44, 44, 44, 44, 44, 44, 93,105,105,105,105,105,105,105,181,
+ 2, 2, 64, 44, 44, 44, 44, 44, 63, 64, 44, 44, 44, 44, 44, 44,
+ 65, 65, 65, 65,132, 44, 44, 44, 43, 43, 60, 44, 44, 44, 44, 44,
+ 43, 43, 43, 60, 2, 2, 67, 67, 40, 40, 97, 44, 44, 44, 44, 44,
+ 7, 7, 7, 7, 7,179, 27, 27, 27, 62, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 44, 44, 62, 36, 27, 27, 27, 30, 2, 64, 44, 44,
+ 36, 36, 36, 36, 36, 61, 44, 57, 94, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 44, 44, 44, 57,
+ 43, 74, 40, 40, 40, 40, 40, 40, 40, 88, 80, 44, 44, 44, 44, 44,
+ 86, 44, 44, 44, 44, 44, 44, 44, 40, 40, 52, 40, 40, 40, 52, 81,
36, 61, 44, 44, 44, 44, 44, 44, 44, 44, 36, 36, 44, 44, 44, 44,
36, 36, 36, 36, 36, 44, 50, 60, 65, 65, 44, 44, 44, 44, 44, 44,
- 67, 67, 67, 90, 55, 67, 67, 67, 67, 67,182, 85, 43, 67,182, 84,
- 84,183, 65, 65, 65, 82, 43, 43, 43, 76, 50, 43, 43, 43, 67, 67,
- 67, 67, 67, 67, 67, 43, 43, 67, 67, 67, 67, 67, 90, 44, 44, 44,
- 67, 43, 76, 44, 44, 44, 44, 44, 27, 27, 44, 44, 44, 44, 44, 44,
- 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 16, 16, 16,108, 16, 16, 16, 16, 16,
- 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 47, 11,
- 44, 47, 48, 47, 48, 11, 47, 11, 11, 11, 11, 16, 16,146,146, 16,
- 16, 16,146, 16, 16, 16, 16, 16, 16, 16, 11, 48, 11, 47, 48, 11,
- 11, 11, 47, 11, 11, 11, 47, 16, 16, 16, 16, 16, 11, 48, 11, 47,
- 11, 11, 47, 47, 44, 11, 11, 11, 47, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 11, 11, 11, 11, 11, 16, 16, 16, 16, 16,
- 16, 16, 16, 44, 11, 11, 11, 11, 31, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11,
- 11, 11, 31, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 33,
- 16, 16, 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 31,
- 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 31, 16, 16, 16,
- 16, 33, 16, 16, 16, 32, 44, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 43, 43, 43, 76, 67, 50, 43, 43, 43, 43, 43, 43, 43, 43, 76, 67,
- 67, 67, 50, 67, 67, 67, 67, 67, 67, 67, 76, 21, 2, 2, 44, 44,
- 44, 44, 44, 44, 44, 57, 43, 43, 43, 43, 43, 80, 43, 43, 43, 43,
- 43, 43, 43, 43, 80, 57, 43, 43, 43, 57, 80, 43, 43, 80, 44, 44,
- 43, 43, 43, 74, 40, 40, 40, 44, 7, 7, 7, 7, 7, 44, 44, 77,
- 36, 36, 36, 36, 36, 36, 43, 43, 7, 7, 7, 7, 7, 44, 44, 94,
- 36, 36, 61,175, 27, 27, 27, 27, 43, 43, 43, 80, 44, 44, 44, 44,
- 16, 16, 43, 43, 43, 74, 44, 44, 27, 27, 27, 27, 27, 27,157, 27,
- 184, 27, 98, 44, 44, 44, 44, 44, 27, 27, 27, 27, 27, 27, 27,157,
+ 43, 43, 43, 43, 43, 43, 43, 44, 43, 43, 43, 80, 44, 44, 44, 44,
+ 67, 67, 67, 92, 55, 67, 67, 67, 67, 67,186, 87, 43, 67,186, 86,
+ 86,187, 65, 65, 65, 84, 43, 43, 43, 76, 50, 43, 43, 43, 67, 67,
+ 67, 67, 67, 67, 67, 43, 43, 67, 67, 43, 76, 44, 44, 44, 44, 44,
+ 27, 27, 44, 44, 44, 44, 44, 44, 11, 11, 11, 11, 11, 16, 16, 16,
+ 16, 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 16,
+ 16, 16,110, 16, 16, 16, 16, 16, 11, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 47, 11, 44, 47, 48, 47, 48, 11, 47, 11,
+ 11, 11, 11, 16, 16,150,150, 16, 16, 16,150, 16, 16, 16, 16, 16,
+ 16, 16, 11, 48, 11, 47, 48, 11, 11, 11, 47, 11, 11, 11, 47, 16,
+ 16, 16, 16, 16, 11, 48, 11, 47, 11, 11, 47, 47, 44, 11, 11, 11,
+ 47, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 11, 11,
+ 11, 11, 11, 16, 16, 16, 16, 16, 16, 16, 16, 44, 11, 11, 11, 11,
+ 31, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 33, 16, 16,
+ 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 31, 16, 16,
+ 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 31, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16,
+ 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, 32, 44, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 43, 43, 43, 76, 67, 50, 43, 43,
+ 43, 43, 43, 43, 43, 43, 76, 67, 67, 67, 50, 67, 67, 67, 67, 67,
+ 67, 67, 76, 21, 2, 2, 44, 44, 44, 44, 44, 44, 44, 57, 43, 43,
+ 16, 16, 16, 16, 16, 39, 16, 16, 16, 16, 16, 16, 16, 16, 16,110,
+ 43, 43, 43, 80, 43, 43, 43, 43, 43, 43, 43, 43, 80, 57, 43, 43,
+ 43, 57, 80, 43, 43, 80, 44, 44, 43, 43, 43, 74, 40, 40, 40, 44,
+ 7, 7, 7, 7, 7, 44, 44, 77, 36, 36, 36, 36, 36, 36, 36, 80,
+ 36, 36, 36, 36, 36, 36, 43, 43, 7, 7, 7, 7, 7, 44, 44, 96,
+ 36, 36, 36, 61, 36, 36, 62, 61, 36, 36, 61,179, 27, 27, 27, 27,
+ 16, 16, 43, 43, 43, 74, 44, 44, 27, 27, 27, 27, 27, 27,163, 27,
+ 188, 27,100, 44, 44, 44, 44, 44, 27, 27, 27, 27, 27, 27, 27,163,
27, 27, 27, 27, 27, 27, 27, 44, 36, 36, 62, 36, 36, 36, 36, 36,
62, 61, 61, 62, 62, 36, 36, 36, 36, 61, 36, 36, 62, 62, 44, 44,
44, 61, 44, 62, 62, 62, 62, 36, 62, 61, 61, 62, 62, 62, 62, 62,
62, 61, 61, 62, 36, 61, 36, 36, 36, 61, 36, 36, 62, 36, 61, 61,
36, 36, 36, 36, 36, 62, 36, 36, 62, 36, 62, 36, 36, 62, 36, 36,
8, 44, 44, 44, 44, 44, 44, 44, 55, 67, 67, 67, 67, 67, 67, 67,
- 27, 27, 27, 27, 27, 27, 89, 67, 67, 67, 67, 67, 67, 67, 67, 44,
- 44, 44, 44, 67, 67, 67, 67, 67, 67, 90, 44, 44, 44, 44, 44, 44,
- 67, 44, 44, 44, 44, 44, 44, 44, 67, 67, 67, 67, 67, 25, 41, 41,
- 67, 67, 67, 67, 44, 44, 44, 44, 67, 67, 67, 67, 90, 67, 67, 67,
- 67, 67, 67, 67, 67, 67, 55, 67, 67, 67, 90, 44, 67, 90, 44, 44,
- 67, 90, 67, 67, 67, 67, 67, 67, 79, 44, 44, 44, 44, 44, 44, 44,
- 65, 65, 65, 65, 65, 65, 65, 65,165,165,165,165,165,165,165, 44,
- 165,165,165,165,165,165,165, 0, 0, 0, 29, 21, 21, 21, 23, 21,
+ 27, 27, 27, 27, 27, 27, 91, 67, 67, 67, 67, 67, 67, 67, 67, 44,
+ 44, 44, 44, 67, 67, 67, 67, 67, 67, 92, 44, 44, 44, 44, 44, 44,
+ 67, 67, 67, 67, 92, 44, 44, 44, 67, 44, 44, 44, 44, 44, 44, 44,
+ 67, 67, 67, 67, 67, 25, 41, 41, 67, 67, 67, 67, 44, 44, 55, 67,
+ 67, 67, 67, 67, 44, 44, 44, 44, 67, 67, 92, 44, 67, 67, 92, 44,
+ 67, 92, 67, 67, 67, 67, 67, 67, 79, 44, 44, 44, 44, 44, 44, 44,
+ 65, 65, 65, 65, 65, 65, 65, 65,171,171,171,171,171,171,171, 44,
+ 171,171,171,171,171,171,171, 0, 0, 0, 29, 21, 21, 21, 23, 21,
22, 18, 21, 25, 21, 17, 13, 13, 25, 25, 25, 21, 21, 9, 9, 9,
9, 22, 21, 18, 24, 16, 24, 5, 5, 5, 5, 22, 25, 18, 25, 0,
23, 23, 26, 21, 24, 26, 7, 20, 25, 1, 26, 24, 26, 25, 15, 15,
@@ -4280,2075 +4348,629 @@ _hb_ucd_u8[17508] =
2, 2, 6, 5, 9, 21, 9, 2, 2, 9, 25, 9, 26, 12, 11, 11,
2, 6, 5, 21, 17, 2, 2, 26, 26, 23, 2, 12, 17, 12, 21, 12,
12, 21, 7, 2, 2, 7, 7, 21, 21, 2, 1, 1, 21, 23, 26, 26,
- 1, 2, 6, 7, 7, 12, 12, 7, 21, 7, 12, 1, 12, 6, 6, 12,
- 12, 26, 7, 26, 26, 7, 2, 1, 12, 2, 6, 2, 1, 12, 12, 10,
- 10, 10, 10, 12, 21, 6, 2, 10, 10, 2, 15, 26, 26, 2, 2, 21,
- 7, 10, 15, 7, 2, 23, 21, 26, 10, 7, 21, 15, 15, 2, 17, 7,
- 29, 7, 7, 22, 18, 2, 14, 14, 14, 7, 17, 21, 7, 6, 11, 12,
- 5, 2, 5, 6, 8, 8, 8, 24, 5, 24, 2, 24, 9, 24, 24, 2,
- 29, 29, 29, 1, 17, 17, 20, 19, 22, 20, 27, 28, 1, 29, 21, 20,
- 19, 21, 21, 16, 16, 21, 25, 22, 18, 21, 21, 29, 15, 6, 18, 6,
- 12, 11, 9, 26, 26, 9, 26, 5, 5, 26, 14, 9, 5, 14, 14, 15,
- 25, 26, 26, 22, 18, 26, 18, 25, 18, 22, 5, 12, 2, 5, 22, 21,
- 26, 6, 7, 14, 17, 22, 18, 18, 26, 14, 17, 6, 14, 6, 12, 24,
- 24, 6, 26, 15, 6, 21, 11, 21, 24, 9, 23, 26, 10, 21, 6, 10,
- 4, 4, 3, 3, 7, 25, 21, 22, 17, 16, 16, 22, 16, 16, 25, 17,
- 25, 2, 25, 24, 23, 2, 2, 15, 12, 15, 14, 2, 21, 14, 7, 15,
- 12, 17, 21, 1, 26, 10, 10, 1, 23, 15, 0, 1, 2, 3, 4, 5,
- 6, 7, 8, 9, 0, 10, 11, 12, 13, 0, 14, 0, 0, 0, 0, 0,
- 15, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, 19,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 20, 0, 21, 22, 23, 0, 0, 0, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
- 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 37, 38, 0, 0, 0, 0, 0, 0, 39, 40, 0, 0, 41, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 0,
- 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 0,
- 9, 0, 10, 11, 0, 0, 12, 13, 14, 15, 16, 0, 0, 0, 0, 17,
- 18, 19, 20, 0, 0, 0, 21, 22, 0, 23, 24, 0, 0, 23, 25, 26,
- 0, 23, 25, 0, 0, 23, 25, 0, 0, 23, 25, 0, 0, 0, 25, 0,
- 0, 0, 27, 0, 0, 23, 25, 0, 0, 28, 25, 0, 0, 0, 29, 0,
- 0, 30, 31, 0, 0, 32, 33, 0, 34, 35, 0, 36, 37, 0, 38, 0,
- 0, 39, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 0, 0, 0, 0, 43, 0,
- 0, 0, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0,
- 46, 0, 0, 47, 0, 48, 49, 0, 0, 50, 51, 52, 0, 53, 0, 54,
- 0, 55, 0, 0, 0, 0, 56, 57, 0, 0, 0, 0, 0, 0, 58, 59,
- 0, 0, 0, 0, 0, 0, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 63, 0, 0, 0, 64,
- 0, 65, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 67, 68, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0,
- 70, 71, 0, 0, 0, 0, 51, 72, 0, 73, 74, 0, 0, 75, 76, 0,
- 0, 0, 0, 0, 0, 77, 78, 79, 0, 0, 0, 0, 0, 0, 0, 25,
- 0, 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0,
- 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,
- 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 83, 0, 0, 0, 0,
- 84, 85, 0, 0, 0, 0, 0, 86, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0,
- 0, 0, 70, 63, 0, 90, 0, 0, 91, 92, 0, 75, 0, 0, 93, 0,
- 0, 94, 0, 0, 0, 0, 0, 95, 0, 96, 25, 97, 0, 0, 0, 0,
- 0, 0, 98, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 63,100, 0,
- 0, 63, 0, 0, 0,101, 0, 0, 0,102, 0, 0, 0, 0, 0, 0,
- 0, 90, 0, 0, 0, 0, 0, 0, 0,103,104, 0, 0, 0, 0, 76,
- 0, 42,105, 0,106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 63, 0, 0, 0, 0, 0, 0, 0, 0,107, 0,108, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,109, 0,110, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,
- 0, 0, 0, 0,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,113,114,115, 0, 0,
- 0, 0,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 117,118, 0, 0, 0, 0, 0, 0, 0,110, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,120, 0, 0, 0,121, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3, 4,
- 5, 6, 7, 4, 4, 8, 9, 10, 1, 11, 12, 13, 14, 15, 16, 17,
- 18, 1, 1, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 20, 21, 22, 1, 23, 4, 21, 24, 25, 26, 27, 28,
- 29, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 31, 0,
- 0, 0, 32, 33, 34, 35, 1, 36, 0, 0, 0, 0, 37, 0, 0, 0,
- 0, 0, 0, 0, 0, 38, 1, 39, 14, 39, 40, 41, 0, 0, 0, 0,
- 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 43, 36, 44, 45,
- 21, 45, 46, 0, 0, 0, 0, 0, 0, 0, 19, 1, 21, 0, 0, 47,
- 0, 0, 0, 0, 0, 38, 48, 1, 1, 49, 49, 50, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 52, 1, 1, 1,
- 53, 21, 43, 54, 55, 21, 35, 1, 0, 0, 0, 0, 0, 0, 0, 56,
- 0, 0, 0, 57, 58, 59, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 57, 0, 61, 0, 0,
- 0, 0, 0, 0, 0, 0, 62, 63, 0, 0, 64, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 66, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 68, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 70, 71, 0,
- 0, 0, 0, 0, 72, 73, 74, 75, 76, 77, 0, 0, 0, 0, 0, 0,
- 0, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 80, 0,
+ 1, 21, 6, 7, 7, 12, 12, 7, 21, 7, 12, 1, 12, 6, 6, 12,
+ 12, 26, 7, 26, 26, 7, 2, 1, 12, 2, 6, 2, 24, 7, 7, 6,
+ 1, 12, 12, 10, 10, 10, 10, 12, 21, 6, 2, 10, 10, 2, 15, 26,
+ 26, 2, 2, 21, 7, 10, 15, 7, 2, 23, 21, 26, 10, 7, 21, 15,
+ 15, 2, 17, 7, 29, 7, 7, 22, 18, 2, 14, 14, 14, 7, 10, 21,
+ 17, 21, 11, 12, 5, 2, 5, 6, 8, 8, 8, 24, 5, 24, 2, 24,
+ 9, 24, 24, 2, 29, 29, 29, 1, 17, 17, 20, 19, 22, 20, 27, 28,
+ 1, 29, 21, 20, 19, 21, 21, 16, 16, 21, 25, 22, 18, 21, 21, 29,
+ 1, 2, 15, 6, 18, 6, 23, 2, 12, 11, 9, 26, 26, 9, 26, 5,
+ 5, 26, 14, 9, 5, 14, 14, 15, 25, 26, 26, 22, 18, 26, 18, 25,
+ 18, 22, 5, 12, 2, 5, 22, 21, 21, 22, 18, 17, 26, 6, 7, 14,
+ 17, 22, 18, 18, 26, 14, 17, 6, 14, 6, 12, 24, 24, 6, 26, 15,
+ 6, 21, 11, 21, 24, 9, 6, 9, 23, 26, 6, 10, 4, 4, 3, 3,
+ 7, 25, 17, 16, 16, 22, 16, 16, 25, 17, 25, 2, 25, 24, 2, 15,
+ 12, 15, 14, 2, 21, 14, 7, 15, 12, 17, 21, 1, 26, 10, 10, 1,
+ 23, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 10, 11, 12,
+ 13, 0, 14, 0, 0, 0, 0, 0, 15, 0, 16, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20,
+ 0, 21, 22, 23, 0, 0, 0, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 0, 35, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, 0, 0, 0, 0,
+ 0, 0, 39, 40, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0,
+ 0, 0, 0, 0, 6, 7, 8, 0, 9, 0, 10, 11, 0, 0, 12, 13,
+ 14, 15, 16, 0, 0, 0, 0, 17, 18, 19, 20, 0, 21, 0, 22, 23,
+ 0, 24, 25, 0, 0, 24, 26, 27, 0, 24, 26, 0, 0, 24, 26, 0,
+ 0, 24, 26, 0, 0, 0, 26, 0, 0, 24, 28, 0, 0, 24, 26, 0,
+ 0, 29, 26, 0, 0, 0, 30, 0, 0, 31, 32, 0, 0, 33, 34, 0,
+ 35, 36, 0, 37, 38, 0, 39, 0, 0, 40, 0, 0, 41, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 43, 44, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 46, 0, 0,
+ 0, 47, 0, 0, 0, 0, 0, 0, 48, 0, 0, 49, 0, 50, 51, 0,
+ 0, 52, 53, 54, 0, 55, 0, 56, 0, 57, 0, 0, 0, 0, 58, 59,
+ 0, 0, 0, 0, 0, 0, 60, 61, 0, 0, 0, 0, 0, 0, 62, 63,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,
+ 0, 0, 0, 65, 0, 0, 0, 66, 0, 67, 0, 0, 68, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 70, 0, 0, 71,
+ 0, 0, 0, 0, 0, 0, 0, 0, 72, 73, 0, 0, 0, 0, 53, 74,
+ 0, 75, 76, 0, 0, 77, 78, 0, 0, 0, 0, 0, 0, 79, 80, 81,
+ 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0,
+ 82, 0, 0, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 85,
+ 0, 0, 0, 86, 0, 0, 0, 0, 87, 88, 0, 0, 0, 0, 0, 89,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 0, 0,
+ 0, 0, 92, 0, 93, 0, 0, 0, 0, 0, 72, 94, 0, 95, 0, 0,
+ 96, 97, 0, 77, 0, 0, 98, 0, 0, 99, 0, 0, 0, 0, 0,100,
+ 0,101, 26,102, 0, 0, 0, 0, 0, 0,103, 0, 0, 0,104, 0,
+ 0, 0, 0, 0, 0, 65,105, 0, 0, 65, 0, 0, 0,106, 0, 0,
+ 0,107, 0, 0, 0, 0, 0, 0, 0, 95, 0, 0, 0, 0, 0, 0,
+ 0,108,109, 0, 0, 0, 0, 78, 0, 44,110, 0,111, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0,
+ 0, 0,112, 0,113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,
+ 0,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,116, 0, 0, 0, 0,117, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,118,119,120, 0, 0, 0, 0,121, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,122,123, 0, 0, 0, 0, 0, 0,
+ 0,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,124, 0,125,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 0,
+ 0, 0,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 4, 4, 8, 9, 10,
+ 1, 11, 12, 13, 14, 15, 16, 17, 18, 1, 1, 1, 0, 0, 0, 0,
+ 19, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 1,
+ 23, 4, 21, 24, 25, 26, 27, 28, 29, 30, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 31, 0, 0, 0, 32, 33, 34, 35, 1, 36,
+ 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 38, 1, 39,
+ 14, 39, 40, 41, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0,
+ 0, 0, 0, 0, 43, 36, 44, 45, 21, 45, 46, 0, 0, 0, 0, 0,
+ 0, 0, 19, 1, 21, 0, 0, 47, 0, 0, 0, 0, 0, 38, 48, 1,
+ 1, 49, 49, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0,
+ 0, 0, 0, 0, 0, 0, 52, 1, 0, 0, 38, 14, 4, 1, 1, 1,
+ 53, 21, 43, 52, 54, 21, 35, 1, 0, 0, 0, 0, 0, 0, 0, 55,
+ 0, 0, 0, 56, 57, 58, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 56, 0, 60, 0, 0,
+ 0, 0, 0, 0, 0, 0, 61, 62, 0, 0, 63, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 65, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 69, 70, 0,
+ 0, 0, 0, 0, 71, 72, 73, 74, 75, 76, 0, 0, 0, 0, 0, 0,
+ 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 79, 0,
0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
- 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 64, 0, 0, 81,
- 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 0,
- 0, 0, 0, 0, 0, 19, 84, 0, 63, 0, 0, 0, 0, 49, 1, 85,
- 0, 0, 0, 0, 1, 54, 15, 86, 84, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 56, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0,
- 0, 0, 19, 10, 1, 0, 0, 0, 0, 0, 87, 0, 0, 0, 0, 0,
- 0, 88, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 79, 0, 0,
- 0, 0, 0, 0, 89, 9, 12, 4, 90, 8, 91, 47, 0, 59, 50, 0,
- 21, 1, 21, 92, 93, 1, 1, 1, 1, 1, 1, 1, 1, 94, 95, 96,
- 0, 0, 0, 0, 97, 1, 98, 59, 81, 99,100, 4, 59, 0, 0, 0,
- 0, 0, 0, 19, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,
- 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,101,102, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,103, 0, 0, 0, 0, 19, 0, 1, 1, 50,
- 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 50, 0, 0, 0,
- 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,
- 1, 1, 1, 1, 50, 0, 0, 0, 0, 0, 52, 69, 0, 0, 0, 0,
- 0, 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, 0, 79, 0, 0, 0,
- 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104,105, 59, 38,
- 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,106, 1, 14, 4, 12, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 38, 89, 0,
- 0, 0, 0,107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,108, 62,
- 0,109, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 19, 59, 0, 0, 0, 0, 0,110, 14, 54, 84, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,111, 0, 89, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 62, 63, 0, 0, 63, 0, 88, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,111, 0, 0, 0, 0,112, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 79, 56, 0, 38, 1, 59, 1, 59, 0, 0,
- 64, 88, 0, 0, 0, 0, 0, 60,113, 0, 0, 0, 0, 0, 0, 0,
- 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,113, 0, 0,
- 0, 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
- 79, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 57, 0, 88,114, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, 8, 91, 0, 0,
- 0, 0, 0, 0, 1, 89, 0, 0, 0, 0, 0, 0,115, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,116, 0,117,118,119,120, 0, 52, 4,
- 121, 49, 23, 0, 0, 0, 0, 0, 0, 0, 38, 50, 0, 0, 0, 0,
- 38, 59, 0, 0, 0, 0, 0, 0, 1, 89, 1, 1, 1, 1, 39, 1,
- 48,104, 89, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
- 0, 0, 0, 0, 4,121, 0, 0, 0, 1,122, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,230,230,230,230,230,232,220,220,220,220,232,216,
- 220,220,220,220,220,202,202,220,220,220,220,202,202,220,220,220,
- 1, 1, 1, 1, 1,220,220,220,220,230,230,230,230,240,230,220,
- 220,220,230,230,230,220,220, 0,230,230,230,220,220,220,220,230,
- 232,220,220,230,233,234,234,233,234,234,233,230, 0, 0, 0,230,
- 0,220,230,230,230,230,220,230,230,230,222,220,230,230,220,220,
- 230,222,228,230, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20,
- 21, 22, 0, 23, 0, 24, 25, 0,230,220, 0, 18, 30, 31, 32, 0,
- 0, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34,230,230,220,220,230,
- 220,230,230,220, 35, 0, 0, 0, 0, 0,230,230,230, 0, 0,230,
- 230, 0,220,230,230,220, 0, 0, 0, 36, 0, 0,230,220,230,230,
- 220,220,230,220,220,230,220,230,220,230,230, 0, 0,220, 0, 0,
- 230,230, 0,230, 0,230,230,230,230,230, 0, 0, 0,220,220,220,
- 0, 0, 0,220,230,230, 0,220,230,220,220,220, 27, 28, 29,230,
- 7, 0, 0, 0, 0, 9, 0, 0, 0,230,220,230,230, 0, 0, 0,
- 0, 0,230, 0, 0, 84, 91, 0, 0, 0, 0, 9, 9, 0, 0, 0,
- 0, 0, 9, 0,103,103, 9, 0,107,107,107,107,118,118, 9, 0,
- 122,122,122,122,220,220, 0, 0, 0,220, 0,220, 0,216, 0, 0,
- 0,129,130, 0,132, 0, 0, 0, 0, 0,130,130,130,130, 0, 0,
- 130, 0,230,230, 9, 0,230,230, 0, 0,220, 0, 0, 0, 0, 7,
- 0, 9, 9, 0, 0,230, 0, 0, 0,228, 0, 0, 0,222,230,220,
- 220, 0, 0, 0,230, 0, 0,220,230,220, 0,220, 0, 0, 9, 9,
- 0, 0, 7, 0,230,230,230, 0,230, 0, 1, 1, 1, 0, 0, 0,
- 230,234,214,220,202,230,230,230,230,230,232,228,228,220, 0,230,
- 233,220,230,220,230,230, 1, 1, 1, 1, 1,230, 0, 1, 1,230,
- 220,230, 1, 1, 0, 0,218,228,232,222,224,224, 0, 8, 8, 0,
- 230, 0,230,230,220, 0, 0,230, 0, 0, 26, 0, 0,220, 0,230,
- 230, 1,220, 0, 0,230,220, 0, 0, 0,220,220, 0, 9, 7, 0,
- 0, 7, 9, 0, 0, 0, 9, 7, 9, 9, 0, 0, 6, 6, 0, 0,
- 0, 0, 1, 0, 0,216,216, 1, 1, 1, 0, 0, 0,226,216,216,
- 216,216,216, 0,220,220,220, 0,230,230, 7, 0, 16, 17, 17, 17,
- 17, 17, 17, 33, 17, 17, 17, 19, 17, 17, 17, 17, 20,101, 17,113,
- 129,169, 17, 27, 28, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0,
+ 0, 0, 0, 0, 63, 0, 0, 81, 0, 0, 82, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, 0, 0, 0, 19, 84, 0,
+ 62, 0, 0, 0, 0, 49, 1, 85, 0, 0, 0, 0, 1, 52, 15, 86,
+ 36, 10, 21, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0,
+ 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, 19, 10, 1, 0, 0, 0,
+ 0, 0, 88, 0, 0, 0, 0, 0, 0, 89, 0, 0, 88, 0, 0, 0,
+ 0, 0, 0, 0, 0, 78, 0, 0, 0, 0, 0, 0, 87, 9, 12, 4,
+ 90, 8, 91, 47, 0, 58, 50, 0, 21, 1, 21, 92, 93, 1, 1, 1,
+ 1, 1, 1, 1, 1, 94, 95, 96, 0, 0, 0, 0, 97, 1, 98, 58,
+ 81, 99,100, 4, 58, 0, 0, 0, 0, 0, 0, 19, 50, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 61, 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 0,101,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,103, 0,
+ 0, 0, 0, 19, 0, 1, 1, 50, 0, 0, 0, 0, 0, 0, 0, 38,
+ 0, 0, 0, 0, 50, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 62, 0, 0, 0, 0, 1, 1, 1, 1, 50, 0, 0, 0,
+ 0, 0,104, 68, 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, 0, 0,
+ 0, 0, 0, 0, 78, 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,105,106, 58, 38, 81, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,
+ 1, 14, 4, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
+ 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 87, 0,
+ 0, 0, 0,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,109, 61,
+ 0,110, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 19, 58, 0, 0, 0, 0, 0,111, 14, 52, 84, 0, 0, 0,
+ 112, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 61,
+ 0, 0, 0, 0, 0, 0,113, 0, 87, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 61, 62, 0, 0, 62, 0, 89, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,113, 0, 0, 0, 0,114, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 78, 55, 0, 38, 1, 58, 1, 58, 0, 0,
+ 63, 89, 0, 0, 0, 0, 0, 59,115, 0, 0, 0, 0, 0, 0, 0,
+ 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,115, 0, 0,
+ 0, 0, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,
+ 78, 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 56, 0, 89, 80, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 61, 0, 0, 0, 0, 0, 0, 8, 91, 0, 0,
+ 0, 0, 0, 0, 1, 87, 0, 0, 0, 0, 0, 0,116, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,117, 0,118,119,120,121, 0,104, 4,
+ 122, 49, 23, 0, 0, 0, 0, 0, 0, 0, 38, 50, 0, 0, 0, 0,
+ 38, 58, 0, 0, 0, 0, 0, 0, 1, 87, 1, 1, 1, 1, 39, 1,
+ 48,105, 87, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0,
+ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4,122, 0, 0,
+ 0, 1,123, 0, 0, 0, 0, 0, 0, 0, 0, 0,230,230,230,230,
+ 230,232,220,220,220,220,232,216,220,220,220,220,220,202,202,220,
+ 220,220,220,202,202,220,220,220, 1, 1, 1, 1, 1,220,220,220,
+ 220,230,230,230,230,240,230,220,220,220,230,230,230,220,220, 0,
+ 230,230,230,220,220,220,220,230,232,220,220,230,233,234,234,233,
+ 234,234,233,230, 0, 0, 0,230, 0,220,230,230,230,230,220,230,
+ 230,230,222,220,230,230,220,220,230,222,228,230, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 0, 23, 0, 24, 25, 0,
+ 230,220, 0, 18, 30, 31, 32, 0, 0, 0, 0, 27, 28, 29, 30, 31,
+ 32, 33, 34,230,230,220,220,230,220,230,230,220, 35, 0, 0, 0,
+ 0, 0,230,230,230, 0, 0,230,230, 0,220,230,230,220, 0, 0,
+ 0, 36, 0, 0,230,220,230,230,220,220,230,220,220,230,220,230,
+ 220,230,230, 0, 0,220, 0, 0,230,230, 0,230, 0,230,230,230,
+ 230,230, 0, 0, 0,220,220,220,230,220,220,220,230,230, 0,220,
+ 27, 28, 29,230, 7, 0, 0, 0, 0, 9, 0, 0, 0,230,220,230,
+ 230, 0, 0, 0, 0, 0,230, 0, 0, 84, 91, 0, 0, 0, 0, 9,
+ 9, 0, 0, 0, 0, 0, 9, 0,103,103, 9, 0,107,107,107,107,
+ 118,118, 9, 0,122,122,122,122,220,220, 0, 0, 0,220, 0,220,
+ 0,216, 0, 0, 0,129,130, 0,132, 0, 0, 0, 0, 0,130,130,
+ 130,130, 0, 0,130, 0,230,230, 9, 0,230,230, 0, 0,220, 0,
+ 0, 0, 0, 7, 0, 9, 9, 0, 9, 9, 0, 0, 0,230, 0, 0,
+ 0,228, 0, 0, 0,222,230,220,220, 0, 0, 0,230, 0, 0,220,
+ 230,220, 0,220,230,230,230, 0, 0, 0, 9, 9, 0, 0, 7, 0,
+ 230, 0, 1, 1, 1, 0, 0, 0,230,234,214,220,202,230,230,230,
+ 230,230,232,228,228,220,218,230,233,220,230,220,230,230, 1, 1,
+ 1, 1, 1,230, 0, 1, 1,230,220,230, 1, 1, 0, 0,218,228,
+ 232,222,224,224, 0, 8, 8, 0, 0, 0, 0,220,230, 0,230,230,
+ 220, 0, 0,230, 0, 0, 26, 0, 0,220, 0,230,230, 1,220, 0,
+ 0,230,220, 0, 0, 0,220,220, 0, 0,230,220, 0, 9, 7, 0,
+ 0, 7, 9, 0, 0, 0, 9, 7, 6, 6, 0, 0, 0, 0, 1, 0,
+ 0,216,216, 1, 1, 1, 0, 0, 0,226,216,216,216,216,216, 0,
+ 220,220,220, 0,230,230, 7, 0, 16, 17, 17, 17, 17, 17, 17, 33,
+ 17, 17, 17, 19, 17, 17, 17, 17, 20,101, 17,113,129,169, 17, 27,
+ 28, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,237, 0, 1, 2, 2,
- 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 6, 7, 8,
- 9, 0, 0, 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 21, 22, 0, 0, 0, 0,
- 23, 24, 25, 26, 0, 27, 0, 28, 29, 30, 31, 32, 0, 0, 0, 0,
- 0, 0, 0, 33, 34, 35, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 37, 38, 0, 0, 0, 0, 1, 2, 39, 40,
- 0, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
- 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 5, 0,
- 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0,
- 0, 0, 8, 9, 0, 0, 0, 0, 0, 0, 10, 0, 0, 10, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 10,
- 0, 0, 0, 0, 0, 0, 11, 12, 0, 13, 0, 14, 15, 16, 0, 0,
- 0, 0, 0, 1, 17, 18, 0, 19, 7, 1, 0, 0, 0, 20, 20, 7,
- 20, 20, 20, 20, 20, 20, 20, 8, 21, 0, 22, 0, 7, 23, 24, 0,
- 20, 20, 25, 0, 0, 0, 26, 27, 1, 7, 20, 20, 20, 20, 20, 1,
- 28, 29, 30, 31, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 10, 0,
- 0, 0, 0, 0, 0, 0, 20, 20, 20, 1, 0, 0, 8, 21, 32, 4,
- 0, 10, 0, 33, 7, 20, 20, 20, 0, 0, 0, 0, 8, 34, 34, 35,
- 36, 34, 37, 0, 38, 1, 20, 20, 0, 0, 39, 0, 1, 1, 0, 8,
- 21, 1, 20, 0, 0, 0, 1, 0, 0, 40, 1, 1, 0, 0, 8, 21,
- 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 26, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 21, 7, 20, 41, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 21, 0, 42, 43, 44, 0, 45, 0, 8, 21, 0, 0, 0, 0, 0,
- 0, 0, 0, 46, 7, 1, 10, 1, 0, 0, 0, 1, 20, 20, 1, 0,
- 0, 0, 0, 0, 0, 0, 20, 20, 1, 20, 20, 0, 0, 0, 0, 0,
- 0, 0, 26, 21, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 3, 47, 48, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3,
- 4, 5, 6, 7, 7, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9,
- 10, 11, 12, 12, 12, 12, 13, 14, 14, 14, 14, 15, 16, 17, 18, 19,
- 20, 14, 21, 14, 22, 14, 14, 14, 14, 23, 24, 24, 25, 26, 14, 14,
- 14, 14, 27, 28, 14, 14, 29, 30, 31, 32, 33, 34, 7, 7, 7, 7,
+ 17, 17, 17, 17, 17, 17, 17,237, 0, 1, 2, 2, 0, 3, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 5, 0, 0, 0, 0, 6, 7, 8, 9, 0, 0, 0,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 20, 0, 0, 21, 22, 0, 0, 0, 0, 23, 24, 25, 26,
+ 0, 27, 0, 28, 29, 30, 31, 32, 0, 0, 0, 0, 0, 0, 0, 33,
+ 34, 35, 36, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 38, 39, 0, 0, 0, 0, 1, 2, 40, 41, 0, 1, 2, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2,
+ 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 5, 0, 0, 0, 6, 0,
+ 0, 0, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0, 8, 9,
+ 0, 0, 0, 0, 0, 0, 10, 0, 0, 10, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0,
+ 0, 0, 11, 12, 0, 13, 0, 14, 15, 16, 0, 0, 0, 0, 0, 1,
+ 17, 18, 0, 19, 7, 1, 0, 0, 0, 20, 20, 7, 20, 20, 20, 20,
+ 20, 20, 20, 8, 21, 0, 22, 0, 7, 23, 24, 0, 20, 20, 25, 0,
+ 0, 0, 26, 27, 1, 7, 20, 20, 20, 20, 20, 1, 28, 29, 30, 31,
+ 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0,
+ 0, 0, 20, 20, 20, 1, 0, 0, 8, 21, 32, 4, 0, 10, 0, 33,
+ 7, 20, 20, 20, 0, 0, 0, 0, 8, 34, 34, 35, 36, 34, 37, 0,
+ 38, 1, 20, 20, 0, 0, 39, 0, 1, 1, 0, 8, 21, 1, 20, 0,
+ 0, 0, 1, 0, 0, 40, 1, 1, 0, 0, 8, 21, 0, 1, 0, 1,
+ 0, 1, 0, 0, 0, 0, 26, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 21, 7, 20, 41, 34, 34, 34, 34, 34, 34, 34, 34, 34, 21, 0, 42,
+ 43, 44, 0, 45, 0, 8, 21, 0, 0, 0, 0, 0, 0, 0, 0, 46,
+ 7, 1, 10, 1, 0, 0, 0, 1, 20, 20, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 26, 34, 9, 0, 0, 20, 20, 1, 20, 20, 0,
+ 0, 0, 0, 0, 0, 0, 26, 21, 0, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3, 47, 48, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 9, 10, 11, 11, 11, 11, 12, 13, 13, 13, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 13, 22, 13, 13, 13, 13, 23, 24, 24,
+ 25, 26, 13, 13, 13, 27, 28, 29, 13, 30, 31, 32, 33, 34, 35, 36,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 35, 7, 36, 37, 7, 38, 7, 7, 7, 39, 14, 40, 7, 7, 41, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 42, 0, 0, 1,
- 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 32, 33, 34, 35, 36, 37, 37, 37, 37, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 2, 2, 53, 54, 55, 56,
- 57, 58, 59, 59, 59, 59, 60, 59, 59, 59, 59, 59, 59, 59, 61, 61,
- 59, 59, 59, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 77, 78, 59, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 7, 7, 7, 7, 37, 7, 38, 39, 7, 40, 7, 7, 7, 41, 13, 42,
+ 7, 7, 43, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 44, 0, 0, 1, 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 32, 33, 34, 35, 36, 37, 37, 37, 37, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 2, 2,
+ 53, 54, 55, 56, 57, 58, 59, 59, 59, 59, 60, 59, 59, 59, 59, 59,
+ 59, 59, 61, 61, 59, 59, 59, 59, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 59, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 79, 70, 70, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 80, 81, 81,
- 81, 81, 81, 81, 81, 81, 81, 82, 83, 83, 84, 85, 86, 87, 88, 89,
- 90, 91, 92, 93, 94, 95, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 79, 70, 70,
+ 70, 70, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 82, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 96, 97, 97,
- 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 70, 70, 98, 99,100,101,102,102,103,104,105,106,107,108,109,110,
- 111,112, 97,113,114,115,116,117,118, 97,119,119,120, 97,121,122,
- 123,124,125,126,127,128,129,130,131, 97,132,133,134,135,136,137,
- 138,139,140,141,142, 97,143,144, 97,145,146,147,148, 97,149,150,
- 151,152,153,154, 97, 97,155,156,157,158, 97,159, 97,160,161,161,
- 161,161,161,161,161,162,163,161,164, 97, 97, 97, 97, 97,165,165,
- 165,165,165,165,165,165,166, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 97, 97, 97, 97, 97, 97,167,167,167,167,168, 97, 97, 97,169,169,
- 169,169,170,171,172,173, 97, 97, 97, 97,174,175,176,177,178,178,
- 178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,
- 178,178,178,178,178,178,178,178,178,178,178,178,178,179,178,178,
- 178,178,178,178,180,180,180,181,182, 97, 97, 97, 97, 97,183,184,
- 185,186,186,187, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 97, 97, 97, 97, 97, 97,188,189, 97, 97, 97, 97, 97, 97, 59,190,
- 191,192,193,194,195, 97,196,197,198, 59, 59,199, 59,200,201,201,
- 201,201,201,202, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,203, 97,
- 204, 97, 97,205, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,206,207,
- 208, 97, 97, 97, 97, 97,209,210,211, 97,212,213, 97, 97,214,215,
- 59,216,217, 97, 59, 59, 59, 59, 59, 59, 59,218,219,220,221,222,
- 223,224,225,226, 59,227, 97, 97, 97, 97, 97, 97, 97, 97, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,228, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,229, 70,230, 70,
+ 32, 95, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
+ 96, 96, 96, 96, 70, 70, 97, 98, 99,100,101,101,102,103,104,105,
+ 106,107,108,109,110,111, 96,112,113,114,115,116,117,118,119,119,
+ 120,121,122,123,124,125,126,127,128,129,130,131,132, 96,133,134,
+ 135,136,137,138,139,140,141,142,143, 96,144,145, 96,146,147,148,
+ 149, 96,150,151,152,153,154,155, 96, 96,156,157,158,159, 96,160,
+ 96,161,162,162,162,162,162,162,162,163,164,162,165, 96, 96, 96,
+ 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
+ 96,166,167,167,167,167,167,167,167,167,168, 96, 96, 96, 96, 96,
+ 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,169,169,169,169,170, 96,
+ 96, 96,171,171,171,171,172,173,174,175, 96, 96, 96, 96,176,177,
+ 178,179,180,180,180,180,180,180,180,180,180,180,180,180,180,180,
+ 180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,
+ 180,181,180,180,180,180,180,180,182,182,182,183,184, 96, 96, 96,
+ 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
+ 96,185,186,187,188,189,189,190, 96, 96, 96, 96, 96, 96, 96, 96,
+ 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,191,192, 96, 96, 96, 96,
+ 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
+ 193,194, 59,195,196,197,198,199,200, 96,201,202,203, 59, 59,204,
+ 59,205,206,206,206,206,206,207, 96, 96, 96, 96, 96, 96, 96, 96,
+ 208, 96,209, 96,210, 96, 96,211, 96, 96, 96, 96, 96, 96, 96, 96,
+ 96,212,213,214,215, 96, 96, 96, 96, 96,216,217,218, 96,219,220,
+ 96, 96,221,222, 59,223,224, 96, 59, 59, 59, 59, 59, 59, 59,225,
+ 226,227,228,229, 59, 59,230,231, 59,232, 96, 96, 96, 96, 96, 96,
+ 96, 96, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,233,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,231, 70, 70, 70, 70,
- 70, 70, 70, 70, 70,232, 97, 97, 97, 97, 97, 97, 97, 97, 70, 70,
- 70, 70,233, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 70, 70,
- 70, 70, 70, 70,234, 97, 97, 97, 97, 97, 97, 97, 97, 97,235, 97,
- 236,237, 0, 1, 2, 2, 0, 1, 2, 2, 2, 3, 4, 5, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 0, 0, 0, 0, 0, 0, 0,
- 19, 0, 0, 0, 0, 0, 19, 19, 19, 19, 19, 19, 19, 0, 19, 0,
- 0, 0, 0, 0, 0, 0, 19, 19, 19, 19, 19, 0, 0, 0, 0, 0,
- 26, 26, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9,
- 9, 9, 0, 9, 9, 9, 2, 2, 9, 9, 9, 9, 0, 9, 2, 2,
- 2, 2, 9, 0, 9, 0, 9, 9, 9, 2, 9, 2, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 2, 9, 9, 9, 9, 9, 9, 9,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 6, 2, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 2, 4, 4, 4, 2, 2, 4, 4, 4, 2, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 2, 2,
- 2, 2, 2, 2, 2, 2, 14, 14, 14, 2, 2, 2, 2, 14, 14, 14,
- 14, 14, 14, 2, 2, 2, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3,
- 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 0, 3, 2, 3, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 3,
- 3, 3, 3, 3, 3, 3, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
- 37, 37, 37, 37, 2, 37, 37, 37, 37, 2, 2, 37, 37, 37, 38, 38,
- 38, 38, 38, 38, 38, 38, 38, 38, 2, 2, 2, 2, 2, 2, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 2, 2, 64, 64, 64, 90, 90,
- 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 2, 2, 90, 90,
- 90, 90, 90, 90, 90, 2, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
- 95, 95, 2, 2, 95, 2, 37, 37, 37, 2, 2, 2, 2, 2, 3, 3,
- 3, 3, 3, 2, 3, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
- 0, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1,
- 1, 1, 1, 7, 7, 7, 7, 7, 7, 7, 0, 0, 7, 7, 5, 5,
- 5, 5, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 5, 5, 2,
- 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2,
- 5, 5, 5, 5, 5, 5, 5, 2, 5, 2, 2, 2, 5, 5, 5, 5,
- 2, 2, 5, 5, 5, 5, 5, 2, 2, 5, 5, 5, 5, 2, 2, 2,
- 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 5, 5, 2, 5, 5, 5,
- 5, 5, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 11,
- 11, 11, 2, 11, 11, 11, 11, 11, 11, 2, 2, 2, 2, 11, 11, 2,
- 2, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 2,
- 11, 11, 11, 11, 11, 11, 11, 2, 11, 11, 2, 11, 11, 2, 11, 11,
- 2, 2, 11, 2, 11, 11, 11, 2, 2, 11, 11, 11, 2, 2, 2, 11,
- 2, 2, 2, 2, 2, 2, 2, 11, 11, 11, 11, 2, 11, 2, 2, 2,
- 2, 2, 2, 2, 11, 11, 11, 11, 11, 11, 11, 11, 11, 2, 2, 10,
- 10, 10, 2, 10, 10, 10, 10, 10, 10, 10, 10, 10, 2, 10, 10, 10,
- 2, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 2,
- 10, 10, 10, 10, 10, 10, 10, 2, 10, 10, 2, 10, 10, 10, 10, 10,
- 2, 2, 10, 10, 10, 10, 10, 10, 2, 10, 10, 10, 2, 2, 10, 2,
- 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 2, 2, 10, 10, 10, 10,
- 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10, 10, 2, 21,
- 21, 21, 2, 21, 21, 21, 21, 21, 21, 21, 21, 2, 2, 21, 21, 2,
- 2, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 2,
- 21, 21, 21, 21, 21, 21, 21, 2, 21, 21, 2, 21, 21, 21, 21, 21,
- 2, 2, 21, 21, 21, 21, 21, 2, 2, 21, 21, 21, 2, 2, 2, 2,
- 2, 2, 2, 21, 21, 21, 2, 2, 2, 2, 21, 21, 2, 21, 21, 21,
- 21, 21, 2, 2, 21, 21, 2, 2, 22, 22, 2, 22, 22, 22, 22, 22,
- 22, 2, 2, 2, 22, 22, 22, 2, 22, 22, 22, 22, 2, 2, 2, 22,
- 22, 2, 22, 2, 22, 22, 2, 2, 2, 22, 22, 2, 2, 2, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 2, 2, 2, 2, 22, 22, 22, 2,
- 2, 2, 2, 2, 2, 22, 2, 2, 2, 2, 2, 2, 22, 22, 22, 22,
- 22, 2, 2, 2, 2, 2, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 2, 23, 23, 23, 2, 23, 23, 23, 23, 23, 23, 23, 23,
- 2, 2, 2, 23, 23, 23, 23, 2, 23, 23, 23, 23, 2, 2, 2, 2,
- 2, 2, 2, 23, 23, 2, 23, 23, 23, 2, 2, 2, 2, 2, 23, 23,
- 23, 23, 2, 2, 23, 23, 2, 2, 2, 2, 2, 2, 2, 23, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 2,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 16,
- 2, 2, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 2, 2, 2, 2,
- 2, 2, 2, 16, 16, 2, 2, 2, 2, 2, 2, 2, 16, 2, 16, 16,
- 16, 16, 2, 2, 16, 16, 2, 16, 16, 2, 2, 2, 2, 2, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 2, 20, 20, 20, 2,
- 20, 20, 20, 20, 20, 20, 2, 2, 2, 2, 20, 20, 20, 20, 20, 20,
- 20, 20, 2, 2, 20, 20, 2, 36, 36, 36, 2, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 2, 2, 2,
- 36, 36, 36, 36, 36, 36, 36, 36, 2, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 2, 36, 2, 2, 2, 2, 36, 2, 2, 2, 2, 36, 36, 36,
- 36, 36, 36, 2, 36, 2, 2, 2, 2, 2, 2, 2, 36, 36, 2, 2,
- 36, 36, 36, 2, 2, 2, 2, 24, 24, 24, 24, 24, 24, 24, 24, 24,
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 2, 2, 2, 2, 0, 24, 24,
- 24, 24, 2, 2, 2, 2, 2, 18, 18, 2, 18, 2, 18, 18, 18, 18,
- 18, 2, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
- 18, 18, 2, 18, 2, 18, 18, 18, 18, 18, 18, 18, 2, 2, 18, 18,
- 18, 18, 18, 2, 18, 2, 18, 18, 2, 2, 18, 18, 18, 18, 25, 25,
- 25, 25, 25, 25, 25, 25, 2, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 2, 2, 2, 25, 25, 25, 25, 25, 2, 25, 25, 25, 25,
- 25, 25, 25, 0, 0, 0, 0, 25, 25, 2, 2, 2, 2, 2, 33, 33,
- 33, 33, 33, 33, 33, 33, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 2, 8, 2, 2, 2, 2, 2, 8, 2, 2, 8, 8,
- 8, 0, 8, 8, 8, 8, 12, 12, 12, 12, 12, 12, 12, 12, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 2, 30, 30, 30, 30, 2, 2, 30, 30,
- 30, 30, 30, 30, 30, 2, 30, 30, 30, 2, 2, 30, 30, 30, 30, 30,
- 30, 30, 30, 2, 2, 2, 30, 30, 2, 2, 2, 2, 2, 2, 29, 29,
- 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 2, 2, 28, 28,
- 28, 28, 28, 28, 28, 28, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 2, 2, 2, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 0, 0, 0, 35, 35, 35, 2, 2, 2, 2, 2, 2, 2, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 2, 45, 45, 45, 45,
- 45, 45, 45, 2, 2, 2, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 0, 0, 2, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 43, 2, 2, 2, 2, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
- 46, 46, 46, 2, 46, 46, 46, 2, 46, 46, 2, 2, 2, 2, 31, 31,
- 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 2, 2, 31, 31,
- 2, 2, 2, 2, 2, 2, 32, 32, 0, 0, 32, 0, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 2, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 2, 2, 2, 2, 2, 2, 32, 2, 2, 2, 2, 2, 2, 2, 32, 32,
- 32, 2, 2, 2, 2, 2, 28, 28, 28, 28, 28, 28, 2, 2, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 2, 48, 48,
- 48, 48, 2, 2, 2, 2, 48, 2, 2, 2, 48, 48, 48, 48, 52, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 2, 2, 52, 52,
- 52, 52, 52, 2, 2, 2, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
- 58, 58, 2, 2, 2, 2, 58, 58, 2, 2, 2, 2, 2, 2, 58, 58,
- 58, 2, 2, 2, 58, 58, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 2, 2, 54, 54, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 91, 2, 91, 91, 91, 91, 91, 2, 2, 91, 91, 91,
- 2, 2, 2, 2, 2, 2, 91, 91, 91, 91, 91, 91, 2, 2, 1, 2,
- 2, 2, 2, 2, 2, 2, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 2, 2, 2, 2, 62, 62, 62, 62, 62, 2, 2, 2, 76, 76,
- 76, 76, 76, 76, 76, 76, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
- 93, 93, 2, 2, 2, 2, 2, 2, 2, 2, 93, 93, 93, 93, 70, 70,
- 70, 70, 70, 70, 70, 70, 2, 2, 2, 70, 70, 70, 70, 70, 70, 70,
- 2, 2, 2, 70, 70, 70, 73, 73, 73, 73, 73, 73, 73, 73, 6, 2,
- 2, 2, 2, 2, 2, 2, 8, 8, 8, 2, 2, 8, 8, 8, 1, 1,
- 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0,
- 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1,
- 0, 2, 2, 2, 2, 2, 19, 19, 19, 19, 19, 19, 9, 9, 9, 9,
- 9, 6, 19, 19, 19, 19, 19, 19, 19, 19, 19, 9, 9, 9, 9, 9,
- 19, 19, 19, 19, 9, 9, 9, 9, 9, 19, 19, 19, 19, 19, 6, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 9, 1, 1,
- 2, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 2, 2, 2, 9,
- 2, 9, 2, 9, 2, 9, 9, 9, 9, 9, 9, 2, 9, 9, 9, 9,
- 9, 9, 2, 2, 9, 9, 9, 9, 9, 9, 2, 9, 9, 9, 2, 2,
- 9, 9, 9, 2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 2, 0, 0,
- 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 19,
- 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0,
- 0, 0, 0, 0, 0, 2, 19, 19, 19, 19, 19, 2, 2, 2, 0, 0,
- 0, 0, 0, 0, 9, 0, 0, 0, 19, 19, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 19, 0, 19, 0, 0, 0, 2, 2, 2, 2, 0, 0,
- 0, 2, 2, 2, 2, 2, 27, 27, 27, 27, 27, 27, 27, 27, 0, 0,
- 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 56, 56,
- 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 2, 55, 55,
- 55, 55, 2, 2, 2, 2, 2, 55, 55, 55, 55, 55, 55, 55, 61, 61,
- 61, 61, 61, 61, 61, 61, 2, 2, 2, 2, 2, 2, 2, 61, 61, 2,
- 2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 2, 2, 2, 2, 13, 13,
- 13, 13, 13, 13, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0,
- 0, 0, 0, 13, 0, 13, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 1, 1, 1, 1, 12, 12, 13, 13, 13, 13, 0, 0, 0, 0, 2, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 2, 2, 1, 1, 0, 0, 15, 15, 15, 0, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 0, 0, 17, 17, 17, 2, 2, 2, 2, 2, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 2, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 2, 12, 12, 12, 12, 12, 12, 12, 0, 17, 17,
- 17, 17, 17, 17, 17, 0, 13, 13, 13, 13, 13, 2, 2, 2, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 2, 2, 2, 39, 39,
- 39, 39, 39, 39, 39, 2, 86, 86, 86, 86, 86, 86, 86, 86, 77, 77,
- 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 2, 2, 2, 2, 79, 79,
- 79, 79, 79, 79, 79, 79, 0, 0, 19, 19, 19, 19, 19, 19, 0, 0,
- 0, 19, 19, 19, 19, 19, 2, 2, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 19, 19, 19, 60, 60,
- 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 2, 2, 2, 0, 0,
- 2, 2, 2, 2, 2, 2, 65, 65, 65, 65, 65, 65, 65, 65, 75, 75,
- 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 2, 2, 2, 2,
- 2, 2, 2, 2, 75, 75, 75, 75, 2, 2, 2, 2, 2, 2, 69, 69,
- 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 0, 69, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 74, 12, 12, 12, 12, 12, 2, 2, 2, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 2, 0, 84, 84,
- 2, 2, 2, 2, 84, 84, 33, 33, 33, 33, 33, 33, 33, 2, 68, 68,
- 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 2, 68, 68,
- 68, 68, 68, 68, 2, 2, 68, 68, 2, 2, 68, 68, 68, 68, 92, 92,
- 92, 92, 92, 92, 92, 92, 92, 92, 92, 2, 2, 2, 2, 2, 2, 2,
- 2, 92, 92, 92, 92, 92, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 2, 2, 30, 30, 30, 30, 30, 30, 2, 19, 19,
- 19, 0, 19, 19, 19, 19, 19, 19, 19, 19, 19, 9, 19, 19, 19, 19,
- 0, 0, 2, 2, 2, 2, 87, 87, 87, 87, 87, 87, 2, 2, 87, 87,
- 2, 2, 2, 2, 2, 2, 12, 12, 12, 12, 2, 2, 2, 2, 2, 2,
- 2, 12, 12, 12, 12, 12, 13, 13, 2, 2, 2, 2, 2, 2, 19, 19,
- 19, 19, 19, 19, 19, 2, 2, 2, 2, 4, 4, 4, 4, 4, 2, 2,
- 2, 2, 2, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 2, 14, 14,
- 14, 14, 14, 2, 14, 2, 14, 14, 2, 14, 14, 2, 14, 14, 3, 3,
- 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 0, 0, 2, 2,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 1, 1,
- 1, 1, 1, 1, 6, 6, 0, 0, 0, 2, 0, 0, 0, 0, 3, 3,
- 3, 3, 3, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, 0, 0, 2, 2,
- 12, 12, 12, 12, 12, 12, 2, 2, 12, 12, 12, 2, 2, 2, 2, 0,
- 0, 0, 0, 0, 2, 2, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 2, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 2, 49, 49,
- 49, 2, 49, 49, 2, 49, 49, 49, 49, 49, 49, 49, 2, 2, 49, 49,
- 49, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0,
- 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 9, 2,
- 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 1, 2, 2, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 2, 2, 2, 67, 67,
- 67, 67, 67, 67, 67, 67, 67, 2, 2, 2, 2, 2, 2, 2, 1, 0,
- 0, 0, 0, 0, 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 2, 2, 2, 2, 2, 2, 2, 2, 2, 42, 42, 42, 41, 41,
- 41, 41, 41, 41, 41, 41, 41, 41, 41, 2, 2, 2, 2, 2,118,118,
- 118,118,118,118,118,118,118,118,118, 2, 2, 2, 2, 2, 53, 53,
- 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 2, 53, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 2, 2, 2, 2, 59, 59,
- 59, 59, 59, 59, 2, 2, 40, 40, 40, 40, 40, 40, 40, 40, 51, 51,
- 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 2, 2, 50, 50, 2, 2, 2, 2, 2, 2,135,135,
- 135,135,135,135,135,135,135,135,135,135, 2, 2, 2, 2,106,106,
- 106,106,106,106,106,106,104,104,104,104,104,104,104,104,104,104,
- 104,104, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,104,110,110,
- 110,110,110,110,110,110,110,110,110,110,110,110,110, 2,110,110,
- 110,110,110,110, 2, 2, 47, 47, 47, 47, 47, 47, 2, 2, 47, 2,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 2, 47, 47, 2, 2, 2, 47, 2, 2, 47, 81, 81,
- 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 2, 81,120,120,
- 120,120,120,120,120,120,116,116,116,116,116,116,116,116,116,116,
- 116,116,116,116,116, 2, 2, 2, 2, 2, 2, 2, 2,116,128,128,
- 128,128,128,128,128,128,128,128,128, 2,128,128, 2, 2, 2, 2,
- 2,128,128,128,128,128, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
- 66, 66, 2, 2, 2, 66, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
- 2, 2, 2, 2, 2, 72, 98, 98, 98, 98, 98, 98, 98, 98, 97, 97,
- 97, 97, 97, 97, 97, 97, 2, 2, 2, 2, 97, 97, 97, 97, 2, 2,
- 97, 97, 97, 97, 97, 97, 57, 57, 57, 57, 2, 57, 57, 2, 2, 2,
- 2, 2, 57, 57, 57, 57, 57, 57, 57, 57, 2, 57, 57, 57, 2, 57,
- 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
- 57, 57, 57, 57, 2, 2, 57, 57, 57, 2, 2, 2, 2, 57, 57, 2,
- 2, 2, 2, 2, 2, 2, 88, 88, 88, 88, 88, 88, 88, 88,117,117,
- 117,117,117,117,117,117,112,112,112,112,112,112,112,112,112,112,
- 112,112,112,112,112, 2, 2, 2, 2,112,112,112,112,112, 78, 78,
- 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 2, 2, 2, 78,
- 78, 78, 78, 78, 78, 78, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
- 83, 83, 83, 83, 2, 2, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 2, 2, 2, 2, 2,122,122,122,122,122,122,122,122,122,122,
- 2, 2, 2, 2, 2, 2, 2,122,122,122,122, 2, 2, 2, 2,122,
- 122,122,122,122,122,122, 89, 89, 89, 89, 89, 89, 89, 89, 89, 2,
- 2, 2, 2, 2, 2, 2,130,130,130,130,130,130,130,130,130,130,
- 130, 2, 2, 2, 2, 2, 2, 2,130,130,130,130,130,130,144,144,
- 144,144,144,144,144,144,144,144, 2, 2, 2, 2, 2, 2, 3, 3,
- 3, 3, 3, 3, 3, 2,156,156,156,156,156,156,156,156,156,156,
- 2,156,156,156, 2, 2,156,156, 2, 2, 2, 2, 2, 2,147,147,
- 147,147,147,147,147,147,148,148,148,148,148,148,148,148,148,148,
- 2, 2, 2, 2, 2, 2,153,153,153,153,153,153,153,153,153,153,
- 153,153, 2, 2, 2, 2,149,149,149,149,149,149,149,149,149,149,
- 149,149,149,149,149, 2, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
- 94, 94, 94, 94, 2, 2, 2, 2, 94, 94, 94, 94, 94, 94, 2, 2,
- 2, 2, 2, 2, 2, 94, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 85, 2, 2,101,101,
- 101,101,101,101,101,101,101, 2, 2, 2, 2, 2, 2, 2,101,101,
- 2, 2, 2, 2, 2, 2, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
- 96, 96, 96, 2, 96, 96,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111, 2,100,100,100,100,100,100,100,100, 2, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 2, 2, 2,108,108,
- 108,108,108,108,108,108,108,108, 2,108,108,108,108,108,108,108,
- 108,108,108,108,108, 2,129,129,129,129,129,129,129, 2,129, 2,
- 129,129,129,129, 2,129,129,129,129,129,129,129,129,129,129,129,
- 129,129,129,129, 2,129,129,129, 2, 2, 2, 2, 2, 2,109,109,
- 109,109,109,109,109,109,109,109,109, 2, 2, 2, 2, 2,109,109,
- 2, 2, 2, 2, 2, 2,107,107,107,107, 2,107,107,107,107,107,
- 107,107,107, 2, 2,107,107, 2, 2,107,107,107,107,107,107,107,
- 107,107,107,107,107,107,107, 2,107,107,107,107,107,107,107, 2,
- 107,107, 2,107,107,107,107,107, 2, 1,107,107,107,107,107, 2,
- 2,107,107,107, 2, 2,107, 2, 2, 2, 2, 2, 2,107, 2, 2,
- 2, 2, 2,107,107,107,107,107,107,107, 2, 2,107,107,107,107,
- 107,107,107, 2, 2, 2,137,137,137,137,137,137,137,137,137,137,
- 137,137, 2,137,137,137,137,137, 2, 2, 2, 2, 2, 2,124,124,
- 124,124,124,124,124,124,124,124, 2, 2, 2, 2, 2, 2,123,123,
- 123,123,123,123,123,123,123,123,123,123,123,123, 2, 2,114,114,
- 114,114,114,114,114,114,114,114,114,114,114, 2, 2, 2,114,114,
- 2, 2, 2, 2, 2, 2, 32, 32, 32, 32, 32, 2, 2, 2,102,102,
- 102,102,102,102,102,102,102, 2, 2, 2, 2, 2, 2, 2,102,102,
- 2, 2, 2, 2, 2, 2,126,126,126,126,126,126,126,126,126,126,
- 126, 2, 2,126,126,126,126,126,126,126, 2, 2, 2, 2,142,142,
- 142,142,142,142,142,142,142,142,142,142, 2, 2, 2, 2,125,125,
- 125,125,125,125,125,125,125,125,125, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2,125,154,154,154,154,154,154,154, 2, 2,154,
- 2, 2,154,154,154,154,154,154,154,154, 2,154,154, 2,154,154,
- 154,154,154,154,154,154,154,154,154,154,154,154, 2,154,154, 2,
- 2,154,154,154,154,154,154,154, 2, 2, 2, 2, 2, 2,150,150,
- 150,150,150,150,150,150, 2, 2,150,150,150,150,150,150,150,150,
- 150,150,150, 2, 2, 2,141,141,141,141,141,141,141,141,140,140,
- 140,140,140,140,140,140,140,140,140, 2, 2, 2, 2, 2,121,121,
- 121,121,121,121,121,121,121, 2, 2, 2, 2, 2, 2, 2,133,133,
- 133,133,133,133,133,133,133, 2,133,133,133,133,133,133,133,133,
- 133,133,133,133,133, 2,133,133,133,133,133,133, 2, 2,133,133,
- 133,133,133, 2, 2, 2,134,134,134,134,134,134,134,134, 2, 2,
- 134,134,134,134,134,134, 2,134,134,134,134,134,134,134,134,134,
- 134,134,134,134,134, 2,138,138,138,138,138,138,138, 2,138,138,
- 2,138,138,138,138,138,138,138,138,138,138,138,138,138, 2, 2,
- 138, 2,138,138, 2,138,138,138, 2, 2, 2, 2, 2, 2,143,143,
- 143,143,143,143, 2,143,143, 2,143,143,143,143,143,143,143,143,
- 143,143,143,143,143,143,143,143,143,143,143,143,143, 2,143,143,
- 2,143,143,143,143,143,143, 2, 2, 2, 2, 2, 2, 2,143,143,
- 2, 2, 2, 2, 2, 2,145,145,145,145,145,145,145,145,145, 2,
- 2, 2, 2, 2, 2, 2, 86, 2, 2, 2, 2, 2, 2, 2, 22, 22,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 22, 63, 63,
- 63, 63, 63, 63, 63, 63, 63, 63, 2, 2, 2, 2, 2, 2, 63, 63,
- 63, 63, 63, 63, 63, 2, 63, 63, 63, 63, 63, 2, 2, 2, 63, 63,
- 63, 63, 2, 2, 2, 2, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 2, 80, 2, 2, 2, 2, 2, 2, 2,127,127,
- 127,127,127,127,127,127,127,127,127,127,127,127,127, 2, 79, 2,
- 2, 2, 2, 2, 2, 2,115,115,115,115,115,115,115,115,115,115,
- 115,115,115,115,115, 2,115,115, 2, 2, 2, 2,115,115,103,103,
- 103,103,103,103,103,103,103,103,103,103,103,103, 2, 2,119,119,
- 119,119,119,119,119,119,119,119,119,119,119,119, 2, 2,119,119,
- 2,119,119,119,119,119, 2, 2, 2, 2, 2,119,119,119,146,146,
- 146,146,146,146,146,146,146,146,146, 2, 2, 2, 2, 2, 99, 99,
- 99, 99, 99, 99, 99, 99, 99, 99, 99, 2, 2, 2, 2, 99, 2, 2,
- 2, 2, 2, 2, 2, 99,136,139, 0, 0,155, 2, 2, 2,136,136,
- 136,136,136,136,136,136,155,155,155,155,155,155,155,155,155,155,
- 155,155,155,155, 2, 2,136, 2, 2, 2, 2, 2, 2, 2, 17, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 17, 17, 17, 17,139,139,139,139,139,139,139,139,139,139,
- 139,139, 2, 2, 2, 2,105,105,105,105,105,105,105,105,105,105,
- 105, 2, 2, 2, 2, 2,105,105,105,105,105, 2, 2, 2,105, 2,
- 2, 2, 2, 2, 2, 2,105,105, 2, 2,105,105,105,105, 0, 0,
- 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0,
- 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
- 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0,
- 0, 0, 0, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2,
- 0, 0, 0, 0, 0, 0,131,131,131,131,131,131,131,131,131,131,
- 131,131, 2, 2, 2, 2, 2, 2, 2,131,131,131,131,131, 2,131,
- 131,131,131,131,131,131, 56, 2, 2, 56, 56, 56, 56, 56, 56, 56,
- 2, 56, 56, 2, 56, 56, 56, 56, 56, 2, 2, 2, 2, 2,151,151,
- 151,151,151,151,151,151,151,151,151,151,151, 2, 2, 2,151,151,
- 151,151,151,151, 2, 2,151,151, 2, 2, 2, 2,151,151,152,152,
- 152,152,152,152,152,152,152,152, 2, 2, 2, 2, 2,152,113,113,
- 113,113,113,113,113,113,113,113,113,113,113, 2, 2,113,113,113,
- 113,113,113,113,113, 2,132,132,132,132,132,132,132,132,132,132,
- 132,132, 2, 2, 2, 2,132,132, 2, 2, 2, 2,132,132, 3, 3,
- 3, 3, 2, 3, 3, 3, 2, 3, 3, 2, 3, 2, 2, 3, 2, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 3,
- 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 3,
- 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3,
- 3, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 2, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 2,
- 2, 2, 2, 2, 0, 0, 15, 0, 0, 2, 2, 2, 2, 2, 13, 2,
- 2, 2, 2, 2, 2, 2, 13, 13, 13, 2, 2, 2, 2, 2, 2, 0,
- 2, 2, 2, 2, 2, 2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
- 9, 9, 9, 10, 9, 11, 12, 13, 9, 9, 9, 14, 9, 9, 15, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 16, 17, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 18, 19,
- 20, 9, 21, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 22, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 23, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 24, 25, 26, 27, 28,
- 29, 30, 0, 0, 31, 32, 0, 33, 0, 34, 0, 35, 0, 0, 0, 0,
- 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 43, 44, 0, 45, 0, 0, 0, 0, 0, 0,
- 46, 47, 0, 0, 0, 0, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 50, 51, 0, 0, 0, 52, 0, 0,
- 53, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0,
- 55, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0,
- 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
- 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 67, 68, 0, 69, 70, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
- 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
- 99,100,101,102,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,104, 0, 0, 0, 0, 0, 0,105,106, 0,
- 107, 0, 0, 0,108, 0,109, 0,110, 0,111,112,113, 0,114, 0,
- 0, 0,115, 0, 0, 0,116, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,118,119,120,121, 0,122,123,124,
- 125,126, 0,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,128,129,130,131,132,133,134,135,136,137,138,139,
- 140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,
- 156,157, 0, 0, 0,158,159,160,161, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,162,163, 0,
- 0, 0, 0, 0, 0, 0,164, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,165, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,166,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,167,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,168, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,169,170, 0, 0, 0, 0,171,
- 172, 0, 0, 0,173,174,175,176,177,178,179,180,181,182,183,184,
- 185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,
- 201,202,203,204,205,206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 2, 3, 4,
-};
-static const uint16_t
-_hb_ucd_u16[9080] =
-{
- 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 10, 11, 12,
- 13, 13, 13, 14, 15, 13, 13, 16, 17, 18, 19, 20, 21, 22, 13, 23,
- 13, 13, 13, 24, 25, 11, 11, 11, 11, 26, 11, 27, 28, 29, 30, 31,
- 32, 32, 32, 32, 32, 32, 32, 33, 34, 35, 36, 11, 37, 38, 13, 39,
- 9, 9, 9, 11, 11, 11, 13, 13, 40, 13, 13, 13, 41, 13, 13, 13,
- 13, 13, 13, 42, 9, 43, 11, 11, 44, 45, 32, 46, 47, 48, 49, 50,
- 51, 52, 48, 48, 53, 32, 54, 55, 48, 48, 48, 48, 48, 56, 57, 58,
- 59, 60, 48, 32, 61, 48, 48, 48, 48, 48, 62, 63, 64, 48, 65, 66,
- 48, 67, 68, 69, 48, 70, 71, 72, 72, 72, 48, 73, 74, 75, 76, 32,
- 77, 48, 48, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
- 91, 84, 85, 92, 93, 94, 95, 96, 97, 98, 85, 99, 100, 101, 89, 102,
- 103, 84, 85, 104, 105, 106, 89, 107, 108, 109, 110, 111, 112, 113, 95, 114,
- 115, 116, 85, 117, 118, 119, 89, 120, 121, 116, 85, 122, 123, 124, 89, 125,
- 126, 116, 48, 127, 128, 129, 89, 130, 131, 132, 48, 133, 134, 135, 95, 136,
- 137, 48, 48, 138, 139, 140, 72, 72, 141, 48, 142, 143, 144, 145, 72, 72,
- 146, 147, 148, 149, 150, 48, 151, 152, 153, 154, 32, 155, 156, 157, 72, 72,
- 48, 48, 158, 159, 160, 161, 162, 163, 164, 165, 9, 9, 166, 11, 11, 167,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 168, 169, 48, 48,
- 168, 48, 48, 170, 171, 172, 48, 48, 48, 171, 48, 48, 48, 173, 174, 175,
- 48, 176, 9, 9, 9, 9, 9, 177, 178, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 179, 48, 180, 181, 48, 48, 48, 48, 182, 183,
- 184, 185, 48, 186, 48, 187, 184, 188, 48, 48, 48, 189, 190, 191, 192, 193,
- 194, 192, 48, 48, 195, 48, 48, 196, 197, 48, 198, 48, 48, 48, 48, 199,
- 48, 200, 201, 202, 203, 48, 204, 205, 48, 48, 206, 48, 207, 208, 209, 209,
- 48, 210, 48, 48, 48, 211, 212, 213, 192, 192, 214, 215, 216, 72, 72, 72,
- 217, 48, 48, 218, 219, 160, 220, 221, 222, 48, 223, 64, 48, 48, 224, 225,
- 48, 48, 226, 227, 228, 64, 48, 229, 230, 9, 9, 231, 232, 233, 234, 235,
- 11, 11, 236, 27, 27, 27, 237, 238, 11, 239, 27, 27, 32, 32, 32, 240,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 241, 13, 13, 13, 13, 13, 13,
- 242, 243, 242, 242, 243, 244, 242, 245, 246, 246, 246, 247, 248, 249, 250, 251,
- 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 262, 72, 263, 264, 216,
- 265, 266, 267, 268, 269, 270, 271, 271, 272, 273, 274, 209, 275, 276, 209, 277,
- 278, 278, 278, 278, 278, 278, 278, 278, 279, 209, 280, 209, 209, 209, 209, 281,
- 209, 282, 278, 283, 209, 284, 285, 209, 209, 209, 286, 72, 287, 72, 270, 270,
- 270, 288, 209, 209, 209, 209, 289, 270, 209, 209, 209, 209, 209, 209, 209, 209,
- 209, 209, 209, 290, 291, 209, 209, 292, 209, 209, 209, 209, 209, 209, 293, 209,
- 209, 209, 209, 209, 209, 209, 294, 295, 270, 296, 209, 209, 297, 278, 298, 278,
- 299, 300, 278, 278, 278, 301, 278, 302, 209, 209, 209, 278, 303, 209, 209, 304,
- 209, 305, 209, 209, 209, 209, 209, 209, 9, 9, 306, 11, 11, 307, 308, 309,
- 13, 13, 13, 13, 13, 13, 310, 311, 11, 11, 312, 48, 48, 48, 313, 314,
- 48, 315, 316, 316, 316, 316, 32, 32, 317, 318, 319, 320, 321, 322, 72, 72,
- 209, 323, 209, 209, 209, 209, 209, 324, 209, 209, 209, 209, 209, 325, 72, 326,
- 327, 328, 329, 330, 137, 48, 48, 48, 48, 331, 178, 48, 48, 48, 48, 332,
- 333, 48, 48, 137, 48, 48, 48, 48, 200, 334, 48, 48, 209, 209, 324, 48,
- 209, 335, 336, 209, 337, 338, 209, 209, 336, 209, 209, 338, 209, 209, 209, 209,
- 48, 48, 48, 48, 209, 209, 209, 209, 48, 48, 48, 48, 48, 48, 48, 151,
- 48, 339, 48, 48, 48, 48, 48, 48, 151, 209, 209, 209, 286, 48, 48, 229,
- 340, 48, 341, 72, 13, 13, 342, 343, 13, 344, 48, 48, 48, 48, 345, 346,
- 31, 347, 348, 349, 13, 13, 13, 350, 351, 352, 353, 354, 355, 72, 72, 356,
- 357, 48, 358, 359, 48, 48, 48, 360, 361, 48, 48, 362, 363, 192, 32, 364,
- 64, 48, 365, 48, 366, 367, 48, 151, 77, 48, 48, 368, 369, 370, 371, 372,
- 48, 48, 373, 374, 375, 376, 48, 377, 48, 48, 48, 378, 379, 380, 381, 382,
- 383, 384, 316, 11, 11, 385, 386, 11, 11, 11, 11, 11, 48, 48, 387, 192,
- 48, 48, 388, 48, 389, 48, 48, 206, 390, 390, 390, 390, 390, 390, 390, 390,
- 391, 391, 391, 391, 391, 391, 391, 391, 48, 48, 48, 48, 48, 48, 204, 48,
- 48, 48, 48, 48, 48, 207, 72, 72, 392, 393, 394, 395, 396, 48, 48, 48,
- 48, 48, 48, 397, 398, 399, 48, 48, 48, 48, 48, 400, 72, 48, 48, 48,
- 48, 401, 48, 48, 74, 72, 72, 402, 32, 403, 32, 404, 405, 406, 407, 73,
- 48, 48, 48, 48, 48, 48, 48, 408, 409, 2, 3, 4, 5, 410, 411, 412,
- 48, 413, 48, 200, 414, 415, 416, 417, 418, 48, 172, 419, 204, 204, 72, 72,
- 48, 48, 48, 48, 48, 48, 48, 71, 420, 270, 270, 421, 271, 271, 271, 422,
- 423, 424, 425, 72, 72, 209, 209, 426, 72, 72, 72, 72, 72, 72, 72, 72,
- 48, 151, 48, 48, 48, 101, 427, 428, 48, 48, 429, 48, 430, 48, 48, 431,
- 48, 432, 48, 48, 433, 434, 72, 72, 9, 9, 435, 11, 11, 48, 48, 48,
- 48, 204, 192, 9, 9, 436, 11, 437, 48, 48, 74, 48, 48, 48, 438, 72,
- 48, 48, 48, 315, 48, 199, 74, 72, 439, 48, 48, 440, 48, 441, 48, 442,
- 48, 200, 443, 72, 72, 72, 48, 444, 48, 445, 48, 446, 72, 72, 72, 72,
- 48, 48, 48, 447, 270, 448, 270, 270, 449, 450, 48, 451, 452, 453, 48, 454,
- 48, 455, 72, 72, 456, 48, 457, 458, 48, 48, 48, 459, 48, 460, 48, 461,
- 48, 462, 463, 72, 72, 72, 72, 72, 48, 48, 48, 48, 196, 72, 72, 72,
- 9, 9, 9, 464, 11, 11, 11, 465, 48, 48, 466, 192, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 270, 467, 48, 48, 468, 469, 72, 72, 72, 72,
- 48, 455, 470, 48, 62, 471, 72, 72, 72, 72, 72, 48, 472, 72, 48, 315,
- 473, 48, 48, 474, 475, 448, 476, 477, 222, 48, 48, 478, 479, 48, 196, 192,
- 480, 48, 481, 482, 483, 48, 48, 484, 222, 48, 48, 485, 486, 487, 488, 489,
- 48, 98, 490, 491, 72, 72, 72, 72, 492, 493, 494, 48, 48, 495, 496, 192,
- 497, 84, 85, 498, 499, 500, 501, 502, 48, 48, 48, 503, 504, 505, 469, 72,
- 48, 48, 48, 506, 507, 192, 72, 72, 48, 48, 508, 509, 510, 511, 72, 72,
- 48, 48, 48, 512, 513, 192, 514, 72, 48, 48, 515, 516, 192, 72, 72, 72,
- 48, 173, 517, 518, 72, 72, 72, 72, 48, 48, 490, 519, 72, 72, 72, 72,
- 72, 72, 9, 9, 11, 11, 148, 520, 521, 522, 48, 523, 524, 192, 72, 72,
- 72, 72, 525, 48, 48, 526, 527, 72, 528, 48, 48, 529, 530, 531, 48, 48,
- 532, 533, 534, 72, 48, 48, 48, 196, 85, 48, 508, 535, 536, 148, 175, 537,
- 48, 538, 539, 540, 72, 72, 72, 72, 541, 48, 48, 542, 543, 192, 544, 48,
- 545, 546, 192, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 48, 547,
- 72, 72, 72, 101, 270, 548, 549, 550, 48, 207, 72, 72, 72, 72, 72, 72,
- 271, 271, 271, 271, 271, 271, 551, 552, 48, 48, 48, 48, 388, 72, 72, 72,
- 48, 48, 200, 553, 72, 72, 72, 72, 48, 48, 48, 48, 315, 72, 72, 72,
- 48, 48, 48, 196, 48, 200, 370, 72, 72, 72, 72, 72, 72, 48, 204, 554,
- 48, 48, 48, 555, 556, 557, 558, 559, 48, 72, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 72, 9, 9, 11, 11, 270, 560, 72, 72, 72, 72, 72, 72,
- 48, 48, 48, 48, 561, 562, 563, 563, 564, 565, 72, 72, 72, 72, 566, 567,
- 48, 48, 48, 48, 48, 48, 48, 74, 48, 48, 48, 48, 48, 199, 72, 72,
- 196, 72, 72, 72, 72, 72, 72, 72, 48, 200, 72, 72, 72, 568, 569, 48,
- 48, 48, 48, 48, 48, 48, 48, 206, 48, 48, 48, 48, 48, 48, 71, 151,
- 196, 570, 571, 72, 72, 72, 72, 72, 209, 209, 209, 209, 209, 209, 209, 325,
- 209, 209, 572, 209, 209, 209, 573, 574, 575, 209, 576, 209, 209, 209, 577, 72,
- 209, 209, 209, 209, 578, 72, 72, 72, 72, 72, 72, 72, 72, 72, 270, 579,
- 209, 209, 209, 209, 209, 286, 270, 452, 9, 580, 11, 581, 582, 583, 242, 9,
- 584, 585, 586, 587, 588, 9, 580, 11, 589, 590, 11, 591, 592, 593, 594, 9,
- 595, 11, 9, 580, 11, 581, 582, 11, 242, 9, 584, 594, 9, 595, 11, 9,
- 580, 11, 596, 9, 597, 598, 599, 600, 11, 601, 9, 602, 603, 604, 605, 11,
- 606, 9, 607, 11, 608, 609, 609, 609, 32, 32, 32, 610, 32, 32, 611, 612,
- 613, 614, 45, 72, 72, 72, 72, 72, 615, 616, 617, 72, 72, 72, 72, 72,
- 48, 48, 151, 618, 619, 72, 72, 72, 72, 72, 72, 72, 48, 48, 620, 621,
- 48, 48, 48, 48, 622, 623, 72, 72, 9, 9, 584, 11, 624, 370, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 488, 270, 270, 625, 626, 72, 72, 72, 72,
- 488, 270, 627, 628, 72, 72, 72, 72, 629, 48, 630, 631, 632, 633, 634, 635,
- 636, 206, 637, 206, 72, 72, 72, 638, 209, 209, 326, 209, 209, 209, 209, 209,
- 209, 324, 335, 639, 639, 639, 209, 325, 640, 209, 209, 209, 209, 209, 209, 209,
- 209, 209, 641, 72, 72, 72, 642, 209, 643, 209, 209, 326, 577, 644, 325, 72,
- 209, 209, 209, 209, 209, 209, 209, 645, 209, 209, 209, 209, 209, 646, 424, 424,
- 209, 209, 209, 209, 209, 209, 209, 324, 209, 209, 209, 209, 209, 577, 326, 72,
- 326, 209, 209, 209, 646, 176, 209, 209, 646, 209, 641, 644, 72, 72, 72, 72,
- 209, 209, 209, 209, 209, 209, 209, 647, 209, 209, 209, 209, 648, 209, 209, 209,
- 209, 209, 209, 209, 209, 324, 641, 649, 286, 209, 577, 286, 643, 286, 72, 72,
- 209, 650, 209, 209, 287, 72, 72, 192, 48, 48, 48, 48, 48, 204, 72, 72,
- 48, 48, 48, 205, 48, 48, 48, 48, 48, 204, 48, 48, 48, 48, 48, 48,
- 48, 48, 469, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 101, 72,
- 48, 204, 72, 72, 72, 72, 72, 72, 48, 48, 48, 48, 71, 72, 72, 72,
- 651, 72, 652, 652, 652, 652, 652, 652, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 72, 391, 391, 391, 391, 391, 391, 391, 653,
- 391, 391, 391, 391, 391, 391, 391, 654, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 2, 2, 3, 1, 2, 2, 3, 0, 0, 0, 0, 0, 4, 0, 4,
- 2, 2, 5, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6,
- 0, 0, 0, 0, 7, 8, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 10, 11, 12, 13, 14, 14, 15, 14, 14, 14,
- 14, 14, 14, 14, 16, 17, 14, 14, 18, 18, 18, 18, 18, 18, 18, 18,
- 18, 18, 18, 18, 18, 18, 18, 18, 19, 18, 18, 18, 18, 18, 18, 18,
- 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 20, 21,
- 21, 21, 22, 20, 21, 21, 21, 21, 21, 23, 24, 25, 25, 25, 25, 25,
- 25, 26, 25, 25, 25, 27, 28, 26, 29, 30, 31, 32, 31, 31, 31, 31,
- 33, 34, 35, 31, 31, 31, 36, 31, 31, 31, 31, 31, 31, 31, 31, 31,
- 31, 31, 31, 29, 31, 31, 31, 31, 37, 38, 37, 37, 37, 37, 37, 37,
- 37, 39, 31, 31, 31, 31, 31, 31, 40, 40, 40, 40, 40, 40, 41, 26,
- 42, 42, 42, 42, 42, 42, 42, 43, 44, 44, 44, 44, 44, 45, 44, 46,
- 47, 47, 47, 48, 37, 49, 26, 26, 26, 26, 26, 26, 31, 31, 50, 31,
- 31, 26, 51, 31, 52, 31, 31, 31, 53, 53, 53, 53, 53, 53, 53, 53,
- 53, 53, 54, 53, 55, 53, 53, 53, 56, 57, 58, 59, 59, 60, 61, 62,
- 57, 63, 64, 65, 66, 59, 59, 67, 68, 69, 70, 71, 71, 72, 73, 74,
- 69, 75, 76, 77, 78, 71, 79, 26, 80, 81, 82, 83, 83, 84, 85, 86,
- 81, 87, 88, 26, 89, 83, 90, 91, 92, 93, 94, 95, 95, 96, 97, 98,
- 93, 99, 100, 101, 102, 95, 95, 26, 103, 104, 105, 106, 107, 104, 108, 109,
- 104, 105, 110, 26, 111, 108, 108, 112, 113, 114, 115, 113, 113, 115, 113, 116,
- 114, 117, 118, 119, 120, 113, 121, 113, 122, 123, 124, 122, 122, 124, 125, 126,
- 123, 127, 128, 129, 130, 122, 131, 26, 132, 133, 134, 132, 132, 132, 132, 132,
- 133, 134, 135, 132, 136, 132, 132, 132, 137, 138, 139, 140, 138, 138, 141, 142,
- 139, 143, 144, 138, 145, 138, 146, 26, 147, 148, 148, 148, 148, 148, 148, 149,
- 148, 148, 148, 150, 26, 26, 26, 26, 151, 152, 153, 153, 154, 153, 153, 155,
- 156, 155, 153, 157, 26, 26, 26, 26, 158, 158, 158, 158, 158, 158, 158, 158,
- 158, 159, 158, 158, 158, 160, 159, 158, 158, 158, 158, 159, 158, 158, 158, 161,
- 158, 161, 162, 163, 26, 26, 26, 26, 164, 164, 164, 164, 164, 164, 164, 164,
- 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 165, 165, 165, 165,
- 166, 167, 165, 165, 165, 165, 165, 168, 169, 169, 169, 169, 169, 169, 169, 169,
- 169, 169, 169, 169, 169, 169, 169, 169, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 171, 172, 171, 170, 170, 170, 170, 170, 171, 170, 170, 170, 170, 171, 172,
- 171, 170, 172, 170, 170, 170, 170, 170, 170, 170, 171, 170, 170, 170, 170, 170,
- 170, 170, 170, 173, 170, 170, 170, 174, 170, 170, 170, 175, 176, 176, 176, 176,
- 176, 176, 176, 176, 176, 176, 177, 177, 178, 178, 178, 178, 178, 178, 178, 178,
- 178, 178, 178, 178, 178, 178, 178, 178, 179, 179, 179, 180, 181, 181, 181, 181,
- 181, 181, 181, 181, 181, 182, 181, 183, 184, 185, 186, 26, 187, 187, 188, 26,
- 189, 189, 190, 26, 191, 192, 193, 26, 194, 194, 194, 194, 194, 194, 194, 194,
- 194, 194, 194, 195, 194, 196, 194, 196, 197, 198, 199, 200, 199, 199, 199, 199,
- 199, 199, 199, 199, 199, 199, 199, 201, 199, 199, 199, 199, 199, 202, 178, 178,
- 178, 178, 178, 178, 178, 178, 203, 26, 204, 204, 204, 205, 204, 206, 204, 206,
- 207, 204, 208, 208, 208, 209, 210, 26, 211, 211, 211, 211, 211, 212, 211, 211,
- 211, 213, 211, 214, 194, 194, 194, 194, 215, 215, 215, 216, 217, 217, 217, 217,
- 217, 217, 217, 218, 217, 217, 217, 219, 217, 220, 217, 220, 217, 221, 9, 9,
- 222, 26, 26, 26, 26, 26, 26, 26, 223, 223, 223, 223, 223, 223, 223, 223,
- 223, 224, 223, 223, 223, 223, 223, 225, 226, 226, 226, 226, 226, 226, 226, 226,
- 227, 227, 227, 227, 227, 227, 228, 229, 230, 230, 230, 230, 230, 230, 230, 231,
- 230, 232, 233, 233, 233, 233, 233, 233, 18, 234, 165, 165, 165, 165, 165, 235,
- 226, 26, 236, 9, 237, 238, 239, 240, 2, 2, 2, 2, 241, 242, 2, 2,
- 2, 2, 2, 243, 244, 245, 2, 246, 2, 2, 2, 2, 2, 2, 2, 247,
- 9, 9, 9, 9, 9, 9, 9, 248, 14, 14, 249, 249, 14, 14, 14, 14,
- 249, 249, 14, 250, 14, 14, 14, 249, 14, 14, 14, 14, 14, 14, 251, 14,
- 251, 14, 252, 253, 14, 14, 254, 255, 0, 256, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 257, 0, 258, 259, 0, 260, 2, 261, 0, 0, 0, 0,
- 26, 26, 9, 9, 9, 9, 222, 26, 0, 0, 0, 0, 262, 263, 4, 0,
- 0, 264, 0, 0, 2, 2, 2, 2, 2, 265, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 260, 26, 26, 26,
- 0, 266, 26, 26, 0, 0, 0, 0, 267, 267, 267, 267, 267, 267, 267, 267,
- 267, 267, 267, 267, 267, 267, 267, 267, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, 269, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 270, 270, 270, 270, 270, 271, 270, 270,
- 270, 270, 270, 271, 2, 2, 2, 2, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 272, 273, 165, 165, 165, 165, 166, 167, 274, 274,
- 274, 274, 274, 274, 274, 275, 276, 275, 170, 170, 172, 26, 172, 172, 172, 172,
- 172, 172, 172, 172, 18, 18, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 266, 26, 26, 26, 26, 26, 277, 277, 277, 278, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 279, 26, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 280, 26, 26, 26, 0, 281, 282, 0, 0, 0, 283, 284, 0, 285,
- 286, 287, 287, 287, 287, 287, 287, 287, 287, 287, 288, 289, 290, 291, 291, 291,
- 291, 291, 291, 291, 291, 291, 291, 292, 293, 294, 294, 294, 294, 294, 295, 169,
- 169, 169, 169, 169, 169, 169, 169, 169, 169, 296, 0, 0, 294, 294, 294, 294,
- 0, 0, 0, 0, 281, 26, 291, 291, 169, 169, 169, 296, 0, 0, 0, 0,
- 0, 0, 0, 0, 169, 169, 169, 297, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 291, 291, 291, 291, 291, 298, 291, 291, 291, 291, 291, 291, 291, 291,
- 291, 291, 291, 0, 0, 0, 0, 0, 277, 277, 277, 277, 277, 277, 277, 277,
- 0, 0, 0, 0, 0, 0, 0, 0, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 299, 300, 300, 300, 300, 300, 300, 300, 300,
- 300, 300, 300, 300, 300, 300, 300, 300, 300, 301, 300, 300, 300, 300, 300, 300,
- 302, 26, 303, 303, 303, 303, 303, 303, 304, 304, 304, 304, 304, 304, 304, 304,
- 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 305, 26, 26,
- 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 306, 306, 306, 306,
- 306, 306, 306, 306, 306, 306, 306, 26, 0, 0, 0, 0, 307, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 308, 2, 2, 2, 2, 2, 2,
- 309, 310, 26, 26, 26, 26, 311, 2, 312, 312, 312, 312, 312, 313, 0, 314,
- 315, 315, 315, 315, 315, 315, 315, 26, 316, 316, 316, 316, 316, 316, 316, 316,
- 317, 318, 316, 319, 53, 53, 53, 53, 320, 320, 320, 320, 320, 321, 322, 322,
- 322, 322, 323, 324, 169, 169, 169, 325, 326, 326, 326, 326, 326, 326, 326, 326,
- 326, 327, 326, 328, 164, 164, 164, 329, 330, 330, 330, 330, 330, 330, 331, 26,
- 330, 332, 330, 333, 164, 164, 164, 164, 334, 334, 334, 334, 334, 334, 334, 334,
- 335, 26, 26, 336, 337, 337, 338, 26, 339, 339, 339, 26, 172, 172, 2, 2,
- 2, 2, 2, 340, 341, 342, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
- 337, 337, 337, 337, 337, 343, 337, 344, 169, 169, 169, 169, 345, 26, 169, 169,
- 296, 346, 169, 169, 169, 169, 169, 345, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 280, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 347, 26, 26, 26, 26, 348, 26, 349, 350, 25, 25, 351, 352,
- 353, 25, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
- 354, 26, 51, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
- 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 355,
- 26, 26, 31, 31, 31, 31, 31, 31, 31, 31, 356, 31, 31, 31, 31, 31,
- 31, 26, 26, 26, 26, 26, 31, 357, 9, 9, 0, 314, 9, 358, 0, 0,
- 0, 0, 359, 0, 260, 281, 50, 31, 31, 31, 31, 31, 31, 31, 31, 31,
- 31, 31, 31, 31, 31, 31, 31, 360, 361, 0, 0, 0, 1, 2, 2, 3,
- 1, 2, 2, 3, 362, 291, 290, 291, 291, 291, 291, 363, 169, 169, 169, 296,
- 364, 364, 364, 365, 260, 260, 26, 366, 367, 368, 367, 367, 369, 367, 367, 370,
- 367, 371, 367, 371, 26, 26, 26, 26, 367, 367, 367, 367, 367, 367, 367, 367,
- 367, 367, 367, 367, 367, 367, 367, 372, 373, 0, 0, 0, 0, 0, 374, 0,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 255, 0, 375, 376, 26, 26, 26,
- 26, 26, 0, 0, 0, 0, 0, 377, 378, 378, 378, 379, 380, 380, 380, 380,
- 380, 380, 381, 26, 382, 0, 0, 281, 383, 383, 383, 383, 384, 385, 386, 386,
- 386, 387, 388, 388, 388, 388, 388, 389, 390, 390, 390, 391, 392, 392, 392, 392,
- 393, 392, 394, 26, 26, 26, 26, 26, 395, 395, 395, 395, 395, 395, 395, 395,
- 395, 395, 396, 396, 396, 396, 396, 396, 397, 397, 397, 398, 397, 399, 400, 400,
- 400, 400, 401, 400, 400, 400, 400, 401, 402, 402, 402, 402, 402, 26, 403, 403,
- 403, 403, 403, 403, 404, 405, 26, 26, 406, 406, 406, 406, 406, 406, 406, 406,
- 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 407, 26,
- 406, 406, 408, 26, 406, 26, 26, 26, 409, 410, 411, 411, 411, 411, 412, 413,
- 414, 414, 415, 414, 416, 416, 416, 416, 417, 417, 417, 418, 419, 417, 26, 26,
- 26, 26, 26, 26, 420, 420, 421, 422, 423, 423, 423, 424, 425, 425, 425, 426,
- 26, 26, 26, 26, 26, 26, 26, 26, 427, 427, 427, 427, 428, 428, 428, 429,
- 428, 428, 430, 428, 428, 428, 428, 428, 431, 432, 433, 434, 435, 435, 436, 437,
- 435, 438, 435, 438, 439, 439, 439, 439, 440, 440, 440, 440, 26, 26, 26, 26,
- 441, 441, 441, 441, 442, 443, 442, 26, 444, 444, 444, 444, 444, 444, 445, 446,
- 447, 447, 448, 447, 449, 449, 450, 449, 451, 451, 452, 453, 26, 454, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 455, 455, 455, 455, 455, 455, 455, 455,
- 455, 456, 26, 26, 26, 26, 26, 26, 457, 457, 457, 457, 457, 457, 458, 26,
- 457, 457, 457, 457, 457, 457, 458, 459, 460, 460, 460, 460, 460, 26, 460, 461,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 31, 31, 31, 462, 463, 463, 463, 463, 463, 464, 465, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 466, 466, 466, 466, 466, 26, 467, 467,
- 467, 467, 467, 468, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 469, 469,
- 469, 470, 26, 26, 471, 471, 472, 26, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 474, 475, 473, 473, 473, 26, 476, 477, 477, 477, 477, 477, 477, 477, 477,
- 478, 479, 480, 480, 480, 481, 480, 482, 483, 483, 483, 483, 483, 483, 484, 483,
- 483, 26, 485, 485, 485, 485, 486, 26, 487, 487, 487, 487, 487, 487, 487, 487,
- 487, 487, 487, 487, 488, 138, 489, 26, 490, 490, 491, 490, 490, 490, 490, 492,
- 26, 26, 26, 26, 26, 26, 26, 26, 493, 494, 495, 496, 495, 497, 498, 498,
- 498, 498, 498, 498, 498, 499, 498, 500, 501, 502, 503, 504, 504, 505, 506, 507,
- 502, 508, 509, 510, 511, 512, 512, 26, 513, 513, 513, 513, 513, 513, 513, 513,
- 513, 513, 513, 514, 515, 26, 26, 26, 516, 516, 516, 516, 516, 516, 516, 516,
- 516, 26, 516, 517, 26, 26, 26, 26, 518, 518, 518, 518, 518, 518, 519, 518,
- 518, 518, 518, 519, 26, 26, 26, 26, 520, 520, 520, 520, 520, 520, 520, 520,
- 521, 26, 520, 522, 199, 523, 26, 26, 524, 524, 524, 524, 524, 524, 524, 525,
- 524, 526, 26, 26, 26, 26, 26, 26, 527, 527, 527, 528, 527, 529, 527, 527,
- 26, 26, 26, 26, 26, 26, 26, 26, 530, 530, 530, 530, 530, 530, 530, 531,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 532, 532, 532, 532,
- 532, 532, 532, 532, 532, 532, 533, 534, 535, 536, 537, 538, 538, 538, 539, 540,
- 535, 26, 538, 541, 26, 26, 26, 26, 26, 26, 26, 26, 542, 543, 542, 542,
- 542, 542, 542, 543, 544, 26, 26, 26, 545, 545, 545, 545, 545, 545, 545, 545,
- 545, 26, 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, 547, 26, 26, 26,
- 548, 548, 548, 548, 548, 548, 548, 549, 550, 551, 550, 550, 550, 550, 552, 550,
- 553, 26, 550, 550, 550, 554, 555, 555, 555, 555, 556, 555, 555, 557, 558, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 559, 560, 561, 561, 561, 561, 559, 562,
- 561, 26, 561, 563, 564, 565, 566, 566, 566, 567, 568, 569, 566, 570, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 571, 571, 571, 572, 26, 26, 26, 26, 26, 26, 573, 26,
- 108, 108, 108, 108, 108, 108, 574, 575, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 577, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 578, 579, 26, 576, 576, 576, 576, 576, 576, 576, 576,
- 580, 26, 26, 26, 26, 26, 26, 26, 581, 581, 581, 581, 581, 581, 581, 581,
- 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 582, 581, 583,
- 26, 26, 26, 26, 26, 26, 26, 26, 584, 584, 584, 584, 584, 584, 584, 584,
- 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584,
- 585, 26, 26, 26, 26, 26, 26, 26, 306, 306, 306, 306, 306, 306, 306, 306,
- 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 586,
- 587, 587, 587, 588, 587, 589, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 590, 590, 590, 591, 591, 26, 592, 592, 592, 592, 592, 592, 592, 592,
- 593, 26, 592, 594, 594, 592, 592, 595, 592, 592, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 597, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 598, 598, 598, 598, 598, 598, 598, 598,
- 598, 599, 598, 598, 598, 598, 598, 598, 598, 600, 598, 598, 26, 26, 26, 26,
- 26, 26, 26, 26, 601, 26, 347, 26, 602, 602, 602, 602, 602, 602, 602, 602,
- 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602,
- 602, 602, 602, 602, 602, 602, 602, 26, 603, 603, 603, 603, 603, 603, 603, 603,
- 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603,
- 603, 603, 604, 26, 26, 26, 26, 26, 602, 605, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 606, 287, 287, 287, 287, 287, 287, 287,
- 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287,
- 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 288, 26, 26, 26, 26,
- 26, 26, 607, 26, 608, 26, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
- 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
- 609, 609, 609, 609, 609, 609, 609, 610, 611, 611, 611, 611, 611, 611, 611, 611,
- 611, 611, 611, 611, 611, 612, 611, 613, 611, 614, 611, 615, 281, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 616, 26, 0, 0, 0, 0, 260, 361, 0, 0,
- 0, 0, 0, 0, 617, 618, 0, 619, 620, 621, 0, 0, 0, 622, 0, 0,
- 0, 0, 0, 0, 0, 623, 26, 26, 14, 14, 14, 14, 14, 14, 14, 14,
- 249, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 0, 0, 281, 26, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 260, 26, 0, 0, 0, 623, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 257, 0, 0, 0, 0, 0, 0, 0, 0, 257, 624, 625, 0, 626,
- 627, 0, 0, 0, 0, 0, 0, 0, 269, 628, 257, 257, 0, 0, 0, 629,
- 630, 631, 632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 616, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 268, 0, 0, 0, 0, 0, 0, 633, 633, 633, 633, 633, 633, 633, 633,
- 633, 633, 633, 633, 633, 633, 633, 633, 633, 634, 26, 635, 636, 633, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 271, 270, 270, 637, 638, 639, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 640, 640, 640, 640, 640, 641, 640, 642,
- 640, 643, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 644, 644, 644, 644, 644, 644, 644, 645, 646, 646, 646, 646, 646, 646, 646, 646,
- 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646,
- 647, 646, 648, 26, 26, 26, 26, 26, 649, 649, 649, 649, 649, 649, 649, 649,
- 649, 650, 649, 651, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 361, 0, 0, 0, 0, 0, 0, 0, 375, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 361, 0, 0, 0, 0, 0, 0, 616,
- 26, 26, 26, 26, 26, 26, 26, 26, 652, 31, 31, 31, 653, 654, 655, 656,
- 657, 658, 653, 659, 653, 655, 655, 660, 31, 661, 31, 662, 663, 661, 31, 662,
- 26, 26, 26, 26, 26, 26, 354, 26, 0, 0, 0, 0, 0, 281, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 281, 26, 0, 260, 361, 0,
- 361, 0, 361, 0, 0, 0, 616, 26, 0, 0, 0, 0, 0, 616, 26, 26,
- 26, 26, 26, 26, 664, 0, 0, 0, 665, 26, 0, 0, 0, 0, 0, 281,
- 0, 623, 314, 26, 616, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 26, 0, 375, 0, 375, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 281, 26, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 623, 0, 281, 26, 26, 0, 281, 0, 0, 0, 0, 0, 0,
- 0, 26, 0, 314, 0, 0, 0, 0, 0, 26, 0, 0, 0, 616, 314, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 632, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 281, 26, 0, 616, 375, 266, 260, 26, 0, 0, 0, 623, 260, 26,
- 266, 26, 260, 26, 26, 26, 26, 26, 0, 0, 359, 0, 0, 0, 0, 0,
- 0, 266, 26, 26, 26, 26, 0, 314, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 280, 26, 26, 26, 26, 277, 277, 277, 277, 277, 277, 299, 26,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 280, 277, 277, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 347, 26, 277, 277,
- 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 277, 277, 277, 666, 26, 26, 26, 277, 277, 277, 280, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 277, 277, 277, 277, 277, 277, 277, 277,
- 277, 667, 26, 26, 26, 26, 26, 26, 668, 26, 26, 26, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 939, 940, 941, 942, 946, 948, 0, 962,
- 969, 970, 971, 976,1001,1002,1003,1008, 0,1033,1040,1041,1042,1043,1047, 0,
- 0,1080,1081,1082,1086,1110, 0, 0,1124,1125,1126,1127,1131,1133, 0,1147,
- 1154,1155,1156,1161,1187,1188,1189,1193, 0,1219,1226,1227,1228,1229,1233, 0,
- 0,1267,1268,1269,1273,1298, 0,1303, 943,1128, 944,1129, 954,1139, 958,1143,
- 959,1144, 960,1145, 961,1146, 964,1149, 0, 0, 973,1158, 974,1159, 975,1160,
- 983,1168, 978,1163, 988,1173, 990,1175, 991,1176, 993,1178, 994,1179, 0, 0,
- 1004,1190,1005,1191,1006,1192,1014,1199,1007, 0, 0, 0,1016,1201,1020,1206,
- 0,1022,1208,1025,1211,1023,1209, 0, 0, 0, 0,1032,1218,1037,1223,1035,
- 1221, 0, 0, 0,1044,1230,1045,1231,1049,1235, 0, 0,1058,1244,1064,1250,
- 1060,1246,1066,1252,1067,1253,1072,1258,1069,1255,1077,1264,1074,1261, 0, 0,
- 1083,1270,1084,1271,1085,1272,1088,1275,1089,1276,1096,1283,1103,1290,1111,1299,
- 1115,1118,1307,1120,1309,1121,1310, 0,1053,1239, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,1093,1280, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 949,1134,1010,1195,1050,1236,1090,1277,1341,1368,1340,
- 1367,1342,1369,1339,1366, 0,1320,1347,1418,1419,1323,1350, 0, 0, 992,1177,
- 1018,1204,1055,1241,1416,1417,1415,1424,1202, 0, 0, 0, 987,1172, 0, 0,
- 1031,1217,1321,1348,1322,1349,1338,1365, 950,1135, 951,1136, 979,1164, 980,1165,
- 1011,1196,1012,1197,1051,1237,1052,1238,1061,1247,1062,1248,1091,1278,1092,1279,
- 1071,1257,1076,1263, 0, 0, 997,1182, 0, 0, 0, 0, 0, 0, 945,1130,
- 982,1167,1337,1364,1335,1362,1046,1232,1422,1423,1113,1301, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 8, 9, 0, 10,1425, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,1314,1427, 5,
- 1434,1438,1443, 0,1450, 0,1455,1461,1514, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,1446,1458,1468,1476,1480,1486,1517, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,1489,1503,1494,1500,1508, 0, 0, 0, 0,1520,1521, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,1526,1528, 0,1525, 0, 0, 0,1522,
- 0, 0, 0, 0,1536,1532,1539, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,1534, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,1556, 0, 0, 0, 0, 0, 0,1548,1550, 0,1547, 0, 0, 0,1567,
- 0, 0, 0, 0,1558,1554,1561, 0, 0, 0, 0, 0, 0, 0,1568,1569,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,1529,1551, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,1523,1545,1524,1546, 0, 0,1527,1549,
- 0, 0,1570,1571,1530,1552,1531,1553, 0, 0,1533,1555,1535,1557,1537,1559,
- 0, 0,1572,1573,1544,1566,1538,1560,1540,1562,1541,1563,1542,1564, 0, 0,
- 1543,1565, 0, 0, 0, 0, 0, 0, 0, 0,1606,1607,1609,1608,1610, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,1613, 0,1611, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1612, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,1620, 0, 0, 0, 0, 0, 0, 0,1623, 0, 0,1624, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1614,1615,1616,1617,1618,1619,1621,1622, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,1628,1629, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,1625,1626, 0,1627, 0, 0, 0,1634, 0, 0,1635, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,1630,1631,1632, 0, 0,1633, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1639, 0, 0,1638,1640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,1636,1637, 0, 0, 0, 0, 0, 0,1641, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,1642,1644,1643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1645, 0, 0, 0, 0, 0, 0, 0,1646, 0, 0, 0, 0, 0, 0,1648,
- 1649, 0,1647,1650, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,1651,1653,1652, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,1654, 0,1655,1657,1656, 0, 0, 0, 0,1659, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,1660, 0, 0, 0, 0,1661, 0, 0, 0, 0,1662,
- 0, 0, 0, 0,1663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,1658, 0, 0, 0, 0, 0, 0, 0, 0, 0,1664, 0,1665,1673, 0,
- 1674, 0, 0, 0, 0, 0, 0, 0, 0,1666, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1668, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,1669, 0, 0, 0, 0,1670, 0, 0, 0, 0,1671,
- 0, 0, 0, 0,1672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,1667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1675, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1676, 0,
- 1677, 0,1678, 0,1679, 0,1680, 0, 0, 0,1681, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,1682, 0,1683, 0, 0,1684,1685, 0,1686, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 953,1138, 955,1140, 956,1141, 957,1142,
- 1324,1351, 963,1148, 965,1150, 968,1153, 966,1151, 967,1152,1378,1380,1379,1381,
- 984,1169, 985,1170,1420,1421, 986,1171, 989,1174, 995,1180, 998,1183, 996,1181,
- 999,1184,1000,1185,1015,1200,1329,1356,1017,1203,1019,1205,1021,1207,1024,1210,
- 1687,1688,1027,1213,1026,1212,1028,1214,1029,1215,1030,1216,1034,1220,1036,1222,
- 1039,1225,1038,1224,1334,1361,1336,1363,1382,1384,1383,1385,1056,1242,1057,1243,
- 1059,1245,1063,1249,1689,1690,1065,1251,1068,1254,1070,1256,1386,1387,1388,1389,
- 1691,1692,1073,1259,1075,1262,1079,1266,1078,1265,1095,1282,1098,1285,1097,1284,
- 1390,1391,1392,1393,1099,1286,1100,1287,1101,1288,1102,1289,1105,1292,1104,1291,
- 1106,1294,1107,1295,1108,1296,1114,1302,1119,1308,1122,1311,1123,1312,1186,1260,
- 1293,1305, 0,1394, 0, 0, 0, 0, 952,1137, 947,1132,1317,1344,1316,1343,
- 1319,1346,1318,1345,1693,1695,1371,1375,1370,1374,1373,1377,1372,1376,1694,1696,
- 981,1166, 977,1162, 972,1157,1326,1353,1325,1352,1328,1355,1327,1354,1697,1698,
- 1009,1194,1013,1198,1054,1240,1048,1234,1331,1358,1330,1357,1333,1360,1332,1359,
- 1699,1700,1396,1401,1395,1400,1398,1403,1397,1402,1399,1404,1094,1281,1087,1274,
- 1406,1411,1405,1410,1408,1413,1407,1412,1409,1414,1109,1297,1117,1306,1116,1304,
- 1112,1300, 0, 0, 0, 0, 0, 0,1471,1472,1701,1705,1702,1706,1703,1707,
- 1430,1431,1715,1719,1716,1720,1717,1721,1477,1478,1729,1731,1730,1732, 0, 0,
- 1435,1436,1733,1735,1734,1736, 0, 0,1481,1482,1737,1741,1738,1742,1739,1743,
- 1439,1440,1751,1755,1752,1756,1753,1757,1490,1491,1765,1768,1766,1769,1767,1770,
- 1447,1448,1771,1774,1772,1775,1773,1776,1495,1496,1777,1779,1778,1780, 0, 0,
- 1451,1452,1781,1783,1782,1784, 0, 0,1504,1505,1785,1788,1786,1789,1787,1790,
- 0,1459, 0,1791, 0,1792, 0,1793,1509,1510,1794,1798,1795,1799,1796,1800,
- 1462,1463,1808,1812,1809,1813,1810,1814,1467, 21,1475, 22,1479, 23,1485, 24,
- 1493, 27,1499, 28,1507, 29, 0, 0,1704,1708,1709,1710,1711,1712,1713,1714,
- 1718,1722,1723,1724,1725,1726,1727,1728,1740,1744,1745,1746,1747,1748,1749,1750,
- 1754,1758,1759,1760,1761,1762,1763,1764,1797,1801,1802,1803,1804,1805,1806,1807,
- 1811,1815,1816,1817,1818,1819,1820,1821,1470,1469,1822,1474,1465, 0,1473,1825,
- 1429,1428,1426, 12,1432, 0, 26, 0, 0,1315,1823,1484,1466, 0,1483,1829,
- 1433, 13,1437, 14,1441,1826,1827,1828,1488,1487,1513, 19, 0, 0,1492,1515,
- 1445,1444,1442, 15, 0,1831,1832,1833,1502,1501,1516, 25,1497,1498,1506,1518,
- 1457,1456,1454, 17,1453,1313, 11, 3, 0, 0,1824,1512,1519, 0,1511,1830,
- 1449, 16,1460, 18,1464, 4, 0, 0, 30, 31, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0,
- 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,1834,1835, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,1836, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,1837,1839,1838, 0, 0, 0, 0,1840, 0, 0, 0,
- 0,1841, 0, 0,1842, 0, 0, 0, 0, 0, 0, 0,1843, 0,1844, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,1845, 0, 0,1846, 0, 0,1847,
- 0,1848, 0, 0, 0, 0, 0, 0, 937, 0,1850, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,1849, 936, 938,1851,1852, 0, 0,1853,1854, 0, 0,
- 1855,1856, 0, 0, 0, 0, 0, 0,1857,1858, 0, 0,1861,1862, 0, 0,
- 1863,1864, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,1867,1868,1869,1870,1859,1860,1865,1866, 0, 0, 0, 0,
- 0, 0,1871,1872,1873,1874, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,1875, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,1877, 0,1878, 0,1879, 0,1880, 0,1881, 0,1882, 0,
- 1883, 0,1884, 0,1885, 0,1886, 0,1887, 0,1888, 0, 0,1889, 0,1890,
- 0,1891, 0, 0, 0, 0, 0, 0,1892,1893, 0,1894,1895, 0,1896,1897,
- 0,1898,1899, 0,1900,1901, 0, 0, 0, 0, 0, 0,1876, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,1902, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,1904, 0,1905, 0,1906, 0,1907, 0,1908, 0,1909, 0,
- 1910, 0,1911, 0,1912, 0,1913, 0,1914, 0,1915, 0, 0,1916, 0,1917,
- 0,1918, 0, 0, 0, 0, 0, 0,1919,1920, 0,1921,1922, 0,1923,1924,
- 0,1925,1926, 0,1927,1928, 0, 0, 0, 0, 0, 0,1903, 0, 0,1929,
- 1930,1931,1932, 0, 0, 0,1933, 0, 710, 385, 724, 715, 455, 103, 186, 825,
- 825, 242, 751, 205, 241, 336, 524, 601, 663, 676, 688, 738, 411, 434, 474, 500,
- 649, 746, 799, 108, 180, 416, 482, 662, 810, 275, 462, 658, 692, 344, 618, 679,
- 293, 388, 440, 492, 740, 116, 146, 168, 368, 414, 481, 527, 606, 660, 665, 722,
- 781, 803, 809, 538, 553, 588, 642, 758, 811, 701, 233, 299, 573, 612, 487, 540,
- 714, 779, 232, 267, 412, 445, 457, 585, 594, 766, 167, 613, 149, 148, 560, 589,
- 648, 768, 708, 345, 411, 704, 105, 259, 313, 496, 518, 174, 542, 120, 307, 101,
- 430, 372, 584, 183, 228, 529, 650, 697, 424, 732, 428, 349, 632, 355, 517, 110,
- 135, 147, 403, 580, 624, 700, 750, 170, 193, 245, 297, 374, 463, 543, 763, 801,
- 812, 815, 162, 384, 420, 730, 287, 330, 337, 366, 459, 476, 509, 558, 591, 610,
- 726, 652, 734, 759, 154, 163, 198, 473, 683, 697, 292, 311, 353, 423, 572, 494,
- 113, 217, 259, 280, 314, 499, 506, 603, 608, 752, 778, 782, 788, 117, 557, 748,
- 774, 320, 109, 126, 260, 265, 373, 411, 479, 523, 655, 737, 823, 380, 765, 161,
- 395, 398, 438, 451, 502, 516, 537, 583, 791, 136, 340, 769, 122, 273, 446, 727,
- 305, 322, 400, 496, 771, 155, 190, 269, 377, 391, 406, 432, 501, 519, 599, 684,
- 687, 749, 776, 175, 452, 191, 480, 510, 659, 772, 805, 813, 397, 444, 619, 566,
- 568, 575, 491, 471, 707, 111, 636, 156, 153, 288, 346, 578, 256, 435, 383, 729,
- 680, 767, 694, 295, 128, 210, 0, 0, 227, 0, 379, 0, 0, 150, 493, 525,
- 544, 551, 552, 556, 783, 576, 604, 0, 661, 0, 703, 0, 0, 735, 743, 0,
- 0, 0, 793, 794, 795, 808, 741, 773, 118, 127, 130, 166, 169, 177, 207, 213,
- 215, 226, 229, 268, 270, 317, 327, 329, 335, 369, 375, 381, 404, 441, 448, 458,
- 477, 484, 503, 539, 545, 547, 546, 548, 549, 550, 554, 555, 561, 564, 569, 591,
- 593, 595, 598, 607, 620, 625, 625, 651, 690, 695, 705, 706, 716, 717, 733, 735,
- 777, 786, 790, 315, 869, 623, 0, 0, 102, 145, 134, 115, 129, 138, 165, 171,
- 207, 202, 206, 212, 227, 231, 240, 243, 250, 254, 294, 296, 303, 308, 319, 325,
- 321, 329, 326, 335, 341, 357, 360, 362, 370, 379, 388, 389, 393, 421, 424, 438,
- 456, 454, 458, 465, 477, 535, 485, 490, 493, 507, 512, 514, 521, 522, 525, 526,
- 528, 533, 532, 541, 565, 569, 574, 586, 591, 597, 607, 637, 647, 674, 691, 693,
- 695, 698, 703, 699, 705, 704, 702, 706, 709, 717, 728, 736, 747, 754, 770, 777,
- 783, 784, 786, 787, 790, 802, 825, 848, 847, 857, 55, 65, 66, 883, 892, 916,
- 822, 824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,1586, 0,1605, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,1602,1603,1934,1935,1574,1575,1576,1577,1579,1580,1581,1583,1584, 0,
- 1585,1587,1588,1589,1591, 0,1592, 0,1593,1594, 0,1595,1596, 0,1598,1599,
- 1600,1601,1604,1582,1578,1590,1597, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,1936, 0,1937, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,1938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,1939,1940, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,1941,1942, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,1944,1943, 0,1945, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,1946,1947, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1948, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,1949,1950,1951,1952,1953,1954,1955, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,1956,1957,1958,1960,1959,1961, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 106, 104, 107, 826, 114, 118, 119, 121,
- 123, 124, 127, 125, 34, 830, 130, 131, 132, 137, 827, 35, 133, 139, 829, 142,
- 143, 112, 144, 145, 924, 151, 152, 37, 157, 158, 159, 160, 38, 165, 166, 169,
- 171, 172, 173, 174, 176, 177, 178, 179, 181, 182, 182, 182, 833, 468, 184, 185,
- 834, 187, 188, 189, 196, 192, 194, 195, 197, 199, 200, 201, 203, 204, 204, 206,
- 208, 209, 211, 218, 213, 219, 214, 216, 153, 234, 221, 222, 223, 220, 225, 224,
- 230, 835, 235, 236, 237, 238, 239, 244, 836, 837, 247, 248, 249, 246, 251, 39,
- 40, 253, 255, 255, 838, 257, 258, 259, 261, 839, 262, 263, 301, 264, 41, 266,
- 270, 272, 271, 841, 274, 842, 277, 276, 278, 281, 282, 42, 283, 284, 285, 286,
- 43, 843, 44, 289, 290, 291, 293, 934, 298, 845, 845, 621, 300, 300, 45, 852,
- 894, 302, 304, 46, 306, 309, 310, 312, 316, 48, 47, 317, 846, 318, 323, 324,
- 325, 324, 328, 329, 333, 331, 332, 334, 335, 336, 338, 339, 342, 343, 347, 351,
- 849, 350, 348, 352, 354, 359, 850, 361, 358, 356, 49, 363, 365, 367, 364, 50,
- 369, 371, 851, 376, 386, 378, 53, 381, 52, 51, 140, 141, 387, 382, 614, 78,
- 388, 389, 390, 394, 392, 856, 54, 399, 396, 402, 404, 858, 405, 401, 407, 55,
- 408, 409, 410, 413, 859, 415, 56, 417, 860, 418, 57, 419, 422, 424, 425, 861,
- 840, 862, 426, 863, 429, 431, 427, 433, 437, 441, 438, 439, 442, 443, 864, 436,
- 449, 450, 58, 454, 453, 865, 447, 460, 866, 867, 461, 466, 465, 464, 59, 467,
- 470, 469, 472, 828, 475, 868, 478, 870, 483, 485, 486, 871, 488, 489, 872, 873,
- 495, 497, 60, 498, 61, 61, 504, 505, 507, 508, 511, 62, 513, 874, 515, 875,
- 518, 844, 520, 876, 877, 878, 63, 64, 528, 880, 879, 881, 882, 530, 531, 531,
- 533, 66, 534, 67, 68, 884, 536, 538, 541, 69, 885, 549, 886, 887, 556, 559,
- 70, 561, 562, 563, 888, 889, 889, 567, 71, 890, 570, 571, 72, 891, 577, 73,
- 581, 579, 582, 893, 587, 74, 590, 592, 596, 75, 895, 896, 76, 897, 600, 898,
- 602, 605, 607, 899, 900, 609, 901, 611, 853, 77, 615, 616, 79, 617, 252, 902,
- 903, 854, 855, 621, 622, 731, 80, 627, 626, 628, 164, 629, 630, 631, 633, 904,
- 632, 634, 639, 640, 635, 641, 646, 651, 638, 643, 644, 645, 905, 907, 906, 81,
- 653, 654, 656, 911, 657, 908, 82, 83, 909, 910, 84, 664, 665, 666, 667, 669,
- 668, 671, 670, 674, 672, 673, 675, 85, 677, 678, 86, 681, 682, 912, 685, 686,
- 87, 689, 36, 913, 914, 88, 89, 696, 702, 709, 711, 915, 712, 713, 718, 719,
- 917, 831, 721, 720, 723, 832, 725, 728, 918, 919, 739, 742, 744, 920, 745, 753,
- 756, 757, 755, 760, 761, 921, 762, 90, 764, 922, 91, 775, 279, 780, 923, 925,
- 92, 93, 785, 926, 94, 927, 787, 787, 789, 928, 792, 95, 796, 797, 798, 800,
- 96, 929, 802, 804, 806, 97, 98, 807, 930, 99, 931, 932, 933, 814, 100, 816,
- 817, 818, 819, 820, 821, 935, 0, 0,
-};
-static const int16_t
-_hb_ucd_i16[196] =
-{
- 0, 0, 0, 0, 1, -1, 0, 0, 2, 0, -2, 0, 0, 0, 0, 2,
- 0, -2, 0, 0, 0, 0, 0, 16, 0, 0, 0, -16, 0, 0, 1, -1,
- 0, 0, 0, 1, -1, 0, 0, 0, 0, 1, -1, 0, 3, 3, 3, -3,
- -3, -3, 0, 0, 0, 2016, 0, 0, 0, 0, 0, 2527, 1923, 1914, 1918, 0,
- 2250, 0, 0, 0, 0, 0, 0, 138, 0, 7, 0, 0, -7, 0, 0, 0,
- 1, -1, 1, -1, -1, 1, -1, 0, 1824, 0, 0, 0, 0, 0, 2104, 0,
- 2108, 2106, 0, 2106, 1316, 0, 0, 0, 0, 1, -1, 1, -1, -138, 0, 0,
- 1, -1, 8, 8, 8, 0, 7, 7, 0, 0, -8, -8, -8, -7, -7, 0,
- 1, -1, 0, 2,-1316, 1, -1, 0, -1, 1, -1, 1, -1, 3, 1, -1,
- -3, 1, -1, 1, -1, 0, 0,-1914,-1918, 0, 0,-1923,-1824, 0, 0, 0,
- 0,-2016, 0, 0, 1, -1, 0, 1, 0, 0,-2104, 0, 0, 0, 0,-2106,
- -2108,-2106, 0, 0, 1, -1,-2250, 0, 0, 0,-2527, 0, 0, -2, 0, 1,
- -1, 0, 1, -1,
-};
-
-static inline uint_fast8_t
-_hb_ucd_gc (unsigned u)
-{
- return u<1114110u?_hb_ucd_u8[6504+(((_hb_ucd_u8[1264+(((_hb_ucd_u16[((_hb_ucd_u8[544+(((_hb_ucd_u8[u>>1>>3>>3>>4])<<4)+((u>>1>>3>>3)&15u))])<<3)+((u>>1>>3)&7u)])<<3)+((u>>1)&7u))])<<1)+((u)&1u))]:2;
-}
-static inline uint_fast8_t
-_hb_ucd_ccc (unsigned u)
-{
- return u<125259u?_hb_ucd_u8[8768+(((_hb_ucd_u8[7792+(((_hb_ucd_u8[7120+(((_hb_ucd_u8[6874+(u>>2>>3>>4)])<<4)+((u>>2>>3)&15u))])<<3)+((u>>2)&7u))])<<2)+((u)&3u))]:0;
-}
-static inline unsigned
-_hb_ucd_b4 (const uint8_t* a, unsigned i)
-{
- return (a[i>>1]>>((i&1u)<<2))&15u;
-}
-static inline int_fast16_t
-_hb_ucd_bmg (unsigned u)
-{
- return u<65380u?_hb_ucd_i16[((_hb_ucd_u8[9508+(((_hb_ucd_u8[9388+(((_hb_ucd_b4(9260+_hb_ucd_u8,u>>2>>3>>3))<<3)+((u>>2>>3)&7u))])<<3)+((u>>2)&7u))])<<2)+((u)&3u)]:0;
-}
-static inline uint_fast8_t
-_hb_ucd_sc (unsigned u)
-{
- return u<918000u?_hb_ucd_u8[10974+(((_hb_ucd_u16[1960+(((_hb_ucd_u8[10286+(((_hb_ucd_u8[9836+(u>>3>>4>>4)])<<4)+((u>>3>>4)&15u))])<<4)+((u>>3)&15u))])<<3)+((u)&7u))]:2;
-}
-static inline uint_fast16_t
-_hb_ucd_dm (unsigned u)
-{
- return u<195102u?_hb_ucd_u16[5768+(((_hb_ucd_u8[16708+(((_hb_ucd_u8[16326+(u>>4>>5)])<<5)+((u>>4)&31u))])<<4)+((u)&15u))]:0;
-}
-
-
-#else
-
-static const uint8_t
-_hb_ucd_u8[13344] =
-{
- 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 6, 5, 5, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 5, 17, 15, 15, 18, 15, 19, 20, 21,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 22, 23,
- 5, 24, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 234, 70,235, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,236,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70,237, 96, 96, 96, 96, 96, 96,
+ 96, 96, 70, 70, 70, 70,238, 96, 96, 96, 96, 96, 96, 96, 96, 96,
+ 96, 96, 70, 70, 70, 70, 70, 70,239, 96, 96, 96, 96, 96, 96, 96,
+ 96, 96,240, 96,241,242, 0, 1, 2, 2, 0, 1, 2, 2, 2, 3,
+ 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 0, 0, 0,
+ 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 19, 19, 19, 19, 19, 19,
+ 19, 0, 19, 0, 0, 0, 0, 0, 0, 0, 19, 19, 19, 19, 19, 0,
+ 0, 0, 0, 0, 26, 26, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
+ 1, 1, 9, 9, 9, 9, 0, 9, 9, 9, 2, 2, 9, 9, 9, 9,
+ 0, 9, 2, 2, 2, 2, 9, 0, 9, 0, 9, 9, 9, 2, 9, 2,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 2, 9, 9, 9,
+ 9, 9, 9, 9, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1,
+ 1, 6, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 2, 2, 4,
+ 4, 4, 2, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 2, 2, 2, 2, 2, 2, 2, 2, 14, 14, 14, 2, 2, 2,
+ 2, 14, 14, 14, 14, 14, 14, 2, 2, 2, 3, 3, 3, 3, 3, 0,
+ 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 0, 3, 3, 3, 0, 0, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 37, 37, 37, 37, 37, 37,
+ 37, 37, 37, 37, 37, 37, 37, 37, 2, 37, 37, 37, 37, 2, 2, 37,
+ 37, 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 2, 2, 2, 2,
+ 2, 2, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 2, 2, 64,
+ 64, 64, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 2, 2, 90, 90, 90, 90, 90, 90, 90, 2, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 2, 2, 95, 2, 37, 37, 37, 2, 2, 2,
+ 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 2, 2, 2, 2,
+ 2, 2, 3, 3, 0, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7, 7, 0, 0,
+ 7, 7, 5, 5, 5, 5, 2, 5, 5, 5, 5, 5, 5, 5, 5, 2,
+ 2, 5, 5, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 2, 5, 5, 5, 5, 5, 5, 5, 2, 5, 2, 2, 2,
+ 5, 5, 5, 5, 2, 2, 5, 5, 5, 5, 5, 2, 2, 5, 5, 5,
+ 5, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 5, 5,
+ 2, 5, 5, 5, 5, 5, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 2, 2, 11, 11, 11, 2, 11, 11, 11, 11, 11, 11, 2, 2, 2,
+ 2, 11, 11, 2, 2, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 2, 11, 11, 11, 11, 11, 11, 11, 2, 11, 11, 2, 11,
+ 11, 2, 11, 11, 2, 2, 11, 2, 11, 11, 11, 2, 2, 11, 11, 11,
+ 2, 2, 2, 11, 2, 2, 2, 2, 2, 2, 2, 11, 11, 11, 11, 2,
+ 11, 2, 2, 2, 2, 2, 2, 2, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 2, 2, 10, 10, 10, 2, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 2, 10, 10, 10, 2, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 2, 10, 10, 10, 10, 10, 10, 10, 2, 10, 10, 2, 10,
+ 10, 10, 10, 10, 2, 2, 10, 10, 10, 10, 10, 10, 2, 10, 10, 10,
+ 2, 2, 10, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 2, 2,
+ 10, 10, 10, 10, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 10,
+ 10, 10, 2, 21, 21, 21, 2, 21, 21, 21, 21, 21, 21, 21, 21, 2,
+ 2, 21, 21, 2, 2, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 2, 21, 21, 21, 21, 21, 21, 21, 2, 21, 21, 2, 21,
+ 21, 21, 21, 21, 2, 2, 21, 21, 21, 21, 21, 2, 2, 21, 21, 21,
+ 2, 2, 2, 2, 2, 2, 2, 21, 21, 21, 2, 2, 2, 2, 21, 21,
+ 2, 21, 21, 21, 21, 21, 2, 2, 21, 21, 2, 2, 22, 22, 2, 22,
+ 22, 22, 22, 22, 22, 2, 2, 2, 22, 22, 22, 2, 22, 22, 22, 22,
+ 2, 2, 2, 22, 22, 2, 22, 2, 22, 22, 2, 2, 2, 22, 22, 2,
+ 2, 2, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 2, 2, 2, 2,
+ 22, 22, 22, 2, 2, 2, 2, 2, 2, 22, 2, 2, 2, 2, 2, 2,
+ 22, 22, 22, 22, 22, 2, 2, 2, 2, 2, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 2, 23, 23, 23, 2, 23, 23, 23, 23,
+ 23, 23, 23, 23, 2, 2, 23, 23, 23, 23, 23, 2, 23, 23, 23, 23,
+ 2, 2, 2, 2, 2, 2, 2, 23, 23, 2, 23, 23, 23, 2, 2, 23,
+ 2, 2, 23, 23, 23, 23, 2, 2, 23, 23, 2, 2, 2, 2, 2, 2,
+ 2, 23, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2,
+ 16, 16, 16, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 16,
+ 16, 16, 16, 16, 2, 2, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16,
+ 2, 2, 2, 2, 2, 2, 2, 16, 16, 2, 16, 16, 16, 16, 2, 2,
+ 16, 16, 2, 16, 16, 2, 2, 2, 2, 2, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 2, 20, 20, 20, 2, 20, 20, 20, 20,
+ 20, 20, 2, 2, 2, 2, 20, 20, 20, 20, 20, 20, 20, 20, 2, 2,
+ 20, 20, 2, 36, 36, 36, 2, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 2, 2, 2, 36, 36, 36, 36,
+ 36, 36, 36, 36, 2, 36, 36, 36, 36, 36, 36, 36, 36, 36, 2, 36,
+ 2, 2, 2, 2, 36, 2, 2, 2, 2, 36, 36, 36, 36, 36, 36, 2,
+ 36, 2, 2, 2, 2, 2, 2, 2, 36, 36, 2, 2, 36, 36, 36, 2,
+ 2, 2, 2, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 2, 2, 2, 2, 0, 24, 24, 24, 24, 2, 2,
+ 2, 2, 2, 18, 18, 2, 18, 2, 18, 18, 18, 18, 18, 2, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 2, 18,
+ 2, 18, 18, 18, 18, 18, 18, 18, 2, 2, 18, 18, 18, 18, 18, 2,
+ 18, 2, 18, 18, 2, 2, 18, 18, 18, 18, 25, 25, 25, 25, 25, 25,
+ 25, 25, 2, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 2,
+ 2, 2, 25, 25, 25, 25, 25, 2, 25, 25, 25, 25, 25, 25, 25, 0,
+ 0, 0, 0, 25, 25, 2, 2, 2, 2, 2, 33, 33, 33, 33, 33, 33,
+ 33, 33, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 2, 8, 2, 2, 2, 2, 2, 8, 2, 2, 8, 8, 8, 0, 8, 8,
+ 8, 8, 12, 12, 12, 12, 12, 12, 12, 12, 30, 30, 30, 30, 30, 30,
+ 30, 30, 30, 2, 30, 30, 30, 30, 2, 2, 30, 30, 30, 30, 30, 30,
+ 30, 2, 30, 30, 30, 2, 2, 30, 30, 30, 30, 30, 30, 30, 30, 2,
+ 2, 2, 30, 30, 2, 2, 2, 2, 2, 2, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 2, 2, 28, 28, 28, 28, 28, 28,
+ 28, 28, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 2,
+ 2, 2, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 0, 0, 0,
+ 35, 35, 35, 2, 2, 2, 2, 2, 2, 2, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 45, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 0,
+ 0, 2, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 2, 2,
+ 2, 2, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 2,
+ 46, 46, 46, 2, 46, 46, 2, 2, 2, 2, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 2, 2, 31, 31, 2, 2, 2, 2,
+ 2, 2, 32, 32, 0, 0, 32, 0, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 2, 2, 2, 2, 2, 2, 32, 2, 2, 2, 2, 2,
+ 2, 2, 32, 32, 32, 2, 2, 2, 2, 2, 28, 28, 28, 28, 28, 28,
+ 2, 2, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 2, 48, 48, 48, 48, 2, 2, 2, 2, 48, 2, 2, 2, 48, 48,
+ 48, 48, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 2, 2, 52, 52, 52, 52, 52, 2, 2, 2, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 2, 2, 2, 2, 58, 58, 2, 2, 2, 2,
+ 2, 2, 58, 58, 58, 2, 2, 2, 58, 58, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 2, 2, 54, 54, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 2, 91, 91, 91, 91, 91, 2,
+ 2, 91, 91, 91, 2, 2, 2, 2, 2, 2, 91, 91, 91, 91, 91, 91,
+ 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, 2, 2, 2, 62, 62, 62, 62, 62, 62,
+ 62, 2, 76, 76, 76, 76, 76, 76, 76, 76, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 2, 2, 2, 2, 2, 2, 2, 2, 93, 93,
+ 93, 93, 70, 70, 70, 70, 70, 70, 70, 70, 2, 2, 2, 70, 70, 70,
+ 70, 70, 70, 70, 2, 2, 2, 70, 70, 70, 73, 73, 73, 73, 73, 73,
+ 73, 73, 6, 2, 2, 2, 2, 2, 2, 2, 8, 8, 8, 2, 2, 8,
+ 8, 8, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,
+ 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0,
+ 0, 0, 1, 1, 0, 2, 2, 2, 2, 2, 19, 19, 19, 19, 19, 19,
+ 9, 9, 9, 9, 9, 6, 19, 19, 19, 19, 19, 19, 19, 19, 19, 9,
+ 9, 9, 9, 9, 19, 19, 19, 19, 9, 9, 9, 9, 9, 19, 19, 19,
+ 19, 19, 6, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 9, 9, 9, 9, 9, 9, 9, 2, 2, 2, 9, 2, 9, 2, 9,
+ 2, 9, 9, 9, 9, 9, 9, 2, 9, 9, 9, 9, 9, 9, 2, 2,
+ 9, 9, 9, 9, 9, 9, 2, 9, 9, 9, 2, 2, 9, 9, 9, 2,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 2, 0, 0, 0, 0, 1, 1,
+ 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 19, 2, 2, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0,
+ 0, 2, 19, 19, 19, 19, 19, 2, 2, 2, 0, 2, 2, 2, 2, 2,
+ 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
+ 9, 0, 0, 0, 19, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 19, 0, 19, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2,
+ 2, 2, 27, 27, 27, 27, 27, 27, 27, 27, 0, 0, 0, 0, 2, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 56, 56, 56, 56, 56, 56,
+ 56, 56, 55, 55, 55, 55, 2, 2, 2, 2, 2, 55, 55, 55, 55, 55,
+ 55, 55, 61, 61, 61, 61, 61, 61, 61, 61, 2, 2, 2, 2, 2, 2,
+ 2, 61, 61, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
+ 2, 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 2, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 2, 2, 2, 2, 13, 13, 13, 13, 13, 13,
+ 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 13,
+ 0, 13, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, 1,
+ 12, 12, 13, 13, 13, 13, 0, 0, 0, 0, 2, 15, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 25, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 34, 34, 34, 35, 36, 37, 34, 34, 34, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 62, 63, 64, 65, 66, 67, 68, 69, 67, 70, 71,
- 67, 67, 62, 72, 62, 62, 73, 67, 74, 75, 76, 77, 78, 67, 67, 67,
- 79, 80, 34, 81, 82, 83, 67, 67, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 84, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 85, 34, 34, 34, 34, 34, 34, 34, 34, 86, 34, 34, 87, 88, 89, 90,
- 91, 92, 93, 94, 95, 96, 97, 98, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
- 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
- 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
- 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
- 100,100, 34, 34, 34, 34,101,102, 34, 34,103,104,105,106,107,108,
- 34, 34,109,110,111,112,113,114,115,116,117,111, 34, 34, 34,111,
- 118,119,120,121,122,123,124,125, 34,126,127,111,128,129,130,131,
- 132,133,134,135,136,137,138,111,139,140,111,141,142,143,144,111,
- 145,146,147,148,149,150,111,111,151,152,153,154,111,155,111,156,
- 34, 34, 34, 34, 34, 34, 34, 34,157, 34, 34,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 34, 34, 34, 34, 34, 34, 34, 34,158,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111, 34, 34, 34, 34, 34,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 34, 34, 34, 34,159,160,161, 34,111,111,111,111,162,163,164,165,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,111,111,111,111,111,
- 34, 34, 34, 34, 34, 34,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111, 34,166,111,111,111,111,111,111,
- 67, 67,167,168,169,128, 65,111,170,171,172,173,174,175,176,177,
- 67, 67, 67, 67,178,179,111,111,111,111,111,111,111,111,111,111,
- 180,111,181,111,111,182,111,111,111,111,111,111,111,111,111,111,
- 34,183,184,111,111,111,111,111,128,185,186,111, 34,187,111,111,
- 67, 67,188, 67, 67,111, 67,189, 67, 67, 67, 67, 67, 67, 67, 67,
- 67, 67, 67, 67, 67, 67, 67,190,111,111,111,111,111,111,111,111,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 34, 34, 34, 34, 34,111,111,111,111,111,111,111,111,111,111,111,
- 34, 34, 34, 34, 34, 34, 34,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 191,111,180,180,111,111,111,111,111,111,111,111,111,111,111,111,
- 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 2, 4, 5, 6, 2,
- 7, 7, 7, 7, 7, 2, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 17, 18, 19, 1, 20, 20, 21, 22, 23, 24, 25,
- 26, 27, 15, 2, 28, 29, 27, 30, 11, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 31, 11, 11, 11, 32, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 33, 16, 16, 16, 16, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 34, 34, 34, 34, 34, 34, 34, 34, 16, 32, 32, 32,
- 32, 32, 32, 32, 11, 34, 34, 16, 34, 32, 32, 11, 34, 11, 16, 11,
- 11, 34, 32, 11, 32, 16, 11, 34, 32, 32, 32, 11, 34, 16, 32, 11,
- 34, 11, 34, 34, 32, 35, 32, 16, 36, 36, 37, 34, 38, 37, 34, 34,
- 34, 34, 34, 34, 34, 34, 16, 32, 34, 38, 32, 11, 32, 32, 32, 32,
- 32, 32, 16, 16, 16, 11, 34, 32, 34, 34, 11, 32, 32, 32, 32, 32,
- 16, 16, 39, 16, 16, 16, 16, 16, 40, 40, 40, 40, 40, 40, 40, 40,
- 40, 41, 41, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41,
- 40, 40, 42, 41, 41, 41, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41,
- 43, 43, 43, 43, 43, 43, 43, 43, 32, 32, 42, 32, 16, 44, 16, 10,
- 41, 41, 41, 45, 11, 11, 11, 11, 34, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 34,
- 16, 11, 32, 16, 32, 32, 32, 32, 16, 16, 32, 46, 34, 32, 34, 11,
- 32, 47, 43, 43, 48, 32, 32, 32, 11, 34, 34, 34, 34, 34, 34, 16,
- 11, 11, 11, 11, 49, 2, 2, 2, 16, 16, 16, 16, 50, 51, 52, 53,
- 54, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 55,
- 56, 57, 43, 56, 43, 43, 43, 43, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 58, 2, 2, 2, 2, 2, 2, 59, 59, 59, 8, 9, 60, 2, 61,
- 43, 43, 43, 43, 43, 57, 59, 2, 62, 36, 36, 36, 36, 63, 43, 43,
- 7, 7, 7, 7, 7, 2, 2, 36, 64, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 65, 43, 43, 43, 66, 47, 43, 43, 67, 68, 69, 43, 43, 36,
- 7, 7, 7, 7, 7, 36, 70, 71, 2, 2, 2, 2, 2, 2, 2, 72,
- 63, 36, 36, 36, 36, 36, 36, 36, 43, 43, 43, 43, 43, 43, 64, 36,
- 36, 36, 36, 43, 43, 43, 43, 43, 7, 7, 7, 7, 7, 36, 36, 36,
- 36, 36, 36, 36, 36, 63, 43, 43, 43, 43, 40, 21, 2, 40, 68, 20,
- 36, 36, 36, 43, 43, 68, 43, 43, 43, 43, 68, 43, 68, 43, 43, 43,
- 2, 2, 2, 2, 2, 2, 2, 2, 36, 36, 36, 36, 63, 43, 43, 2,
- 36, 63, 43, 43, 43, 43, 43, 43, 43, 73, 43, 43, 43, 43, 43, 43,
- 43, 74, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 74, 64, 75,
- 76, 43, 43, 43, 74, 75, 76, 75, 63, 43, 43, 43, 36, 36, 36, 36,
- 36, 43, 2, 7, 7, 7, 7, 7, 77, 36, 36, 36, 36, 36, 36, 36,
- 63, 75, 78, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 64, 75,
- 76, 43, 43, 74, 75, 75, 76, 36, 36, 36, 36, 79, 75, 75, 36, 36,
- 36, 43, 43, 7, 7, 7, 7, 7, 36, 20, 27, 27, 27, 53, 58, 43,
- 43, 74, 78, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 43, 75,
- 76, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 64, 36, 36, 36,
- 36, 36, 36, 7, 7, 7, 7, 7, 43, 36, 63, 2, 2, 2, 2, 2,
- 76, 43, 43, 43, 74, 75, 76, 43, 60, 20, 20, 20, 80, 43, 43, 43,
- 43, 75, 78, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 64, 76,
- 76, 43, 43, 74, 75, 75, 76, 43, 43, 43, 43, 74, 75, 75, 36, 36,
- 71, 27, 27, 27, 27, 27, 27, 27, 43, 64, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 75, 74, 75, 75, 75, 75, 75, 76, 43,
- 36, 36, 36, 79, 75, 75, 75, 75, 75, 75, 75, 7, 7, 7, 7, 7,
- 27, 81, 61, 61, 53, 61, 61, 61, 74, 75, 64, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 43, 74, 75, 75, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 36, 36, 36, 36, 7, 7, 7, 82, 27, 27, 27, 81,
- 63, 75, 65, 36, 36, 36, 36, 36, 75, 75, 75, 74, 75, 75, 43, 43,
- 43, 43, 74, 75, 75, 75, 75, 36, 83, 36, 36, 36, 36, 36, 36, 36,
- 43, 75, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 63, 64, 75,
- 76, 43, 43, 75, 75, 75, 76, 70, 61, 61, 36, 79, 27, 27, 27, 84,
- 27, 27, 27, 27, 81, 36, 36, 36, 36, 36, 36, 36, 36, 43, 43, 74,
- 75, 43, 43, 43, 75, 75, 75, 75, 7, 75, 2, 2, 2, 2, 2, 2,
- 63, 36, 43, 43, 43, 43, 43, 85, 36, 36, 36, 68, 43, 43, 43, 57,
- 7, 7, 7, 7, 7, 2, 2, 2, 63, 36, 43, 43, 43, 43, 64, 36,
- 36, 36, 36, 40, 43, 43, 43, 43, 7, 7, 7, 7, 7, 7, 36, 36,
- 70, 61, 2, 2, 2, 2, 2, 2, 2, 86, 86, 61, 43, 61, 61, 61,
- 7, 7, 7, 7, 7, 27, 27, 27, 27, 27, 47, 47, 47, 4, 4, 75,
- 63, 43, 43, 43, 43, 43, 43, 74, 43, 43, 57, 43, 36, 36, 63, 43,
- 43, 43, 43, 43, 43, 43, 43, 61, 61, 61, 61, 69, 61, 61, 61, 61,
- 2, 2, 86, 61, 21, 2, 2, 2, 36, 36, 36, 36, 36, 79, 76, 43,
- 74, 43, 43, 43, 76, 74, 76, 64, 36, 36, 36, 75, 43, 36, 36, 43,
- 64, 75, 78, 79, 75, 75, 75, 36, 63, 43, 64, 36, 36, 36, 36, 36,
- 36, 74, 76, 74, 75, 75, 76, 79, 7, 7, 7, 7, 7, 75, 76, 61,
- 16, 16, 16, 16, 16, 50, 44, 16, 36, 36, 36, 36, 36, 36, 63, 43,
- 2, 2, 2, 2, 87, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
- 61, 61, 61, 61, 61, 61, 61, 61, 11, 11, 11, 11, 16, 16, 16, 16,
- 88, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 70, 65,
- 89, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 90, 91, 91,
- 36, 36, 36, 36, 36, 58, 2, 92, 93, 36, 36, 36, 36, 36, 36, 36,
- 36, 43, 43, 43, 43, 43, 43, 43, 36, 43, 57, 2, 2, 2, 2, 2,
- 36, 36, 43, 76, 43, 43, 43, 75, 75, 75, 75, 74, 76, 43, 43, 43,
- 43, 43, 2, 77, 2, 60, 63, 43, 7, 7, 7, 7, 7, 7, 7, 7,
- 2, 2, 2, 94, 2, 56, 43, 59, 36, 95, 36, 36, 36, 36, 36, 36,
- 36, 36, 63, 64, 36, 36, 36, 36, 36, 36, 36, 36, 63, 36, 36, 36,
- 43, 74, 75, 76, 74, 75, 75, 75, 75, 74, 75, 75, 76, 43, 43, 43,
- 61, 61, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 27, 27, 61,
- 36, 36, 36, 63, 74, 76, 43, 2, 36, 36, 79, 74, 43, 43, 43, 43,
- 74, 74, 76, 43, 43, 43, 74, 75, 75, 76, 43, 43, 43, 43, 43, 43,
- 2, 2, 2, 77, 2, 2, 2, 2, 43, 43, 43, 43, 43, 43, 43, 96,
- 43, 43, 78, 36, 36, 36, 36, 36, 36, 36, 74, 43, 43, 74, 74, 75,
- 75, 74, 78, 36, 36, 36, 36, 36, 86, 61, 61, 61, 61, 47, 43, 43,
- 43, 43, 61, 61, 61, 61, 61, 61, 43, 78, 36, 36, 36, 36, 36, 36,
- 79, 43, 43, 75, 43, 76, 43, 36, 36, 36, 36, 74, 43, 75, 76, 76,
- 43, 75, 75, 75, 75, 75, 2, 2, 36, 36, 75, 75, 75, 75, 43, 43,
- 43, 43, 75, 43, 43, 57, 2, 2, 7, 7, 7, 7, 7, 7, 83, 36,
- 36, 36, 36, 36, 40, 40, 40, 2, 43, 57, 43, 43, 43, 43, 43, 43,
- 74, 43, 43, 43, 64, 36, 63, 36, 36, 36, 64, 79, 43, 36, 36, 36,
- 16, 16, 16, 16, 16, 16, 40, 40, 40, 40, 40, 40, 40, 44, 16, 16,
- 16, 16, 16, 16, 44, 16, 16, 16, 16, 16, 16, 16, 16, 97, 40, 40,
- 32, 32, 32, 16, 16, 16, 16, 32, 16, 16, 16, 16, 11, 11, 11, 11,
- 16, 16, 16, 16, 34, 11, 11, 11, 16, 16, 16, 16, 98, 98, 98, 98,
- 16, 16, 16, 16, 11, 11, 99,100, 41, 16, 16, 16, 11, 11, 99, 41,
- 16, 16, 16, 16, 11, 11,101, 41,102,102,102,102,102,103, 59, 59,
- 51, 51, 51, 2,104,105,104,105, 2, 2, 2, 2,106, 59, 59,107,
- 2, 2, 2, 2,108,109, 2,110,111, 2,112,113, 2, 2, 2, 2,
- 2, 9,111, 2, 2, 2, 2,114, 59, 59, 59, 59, 59, 59, 59, 59,
- 115, 40, 27, 27, 27, 8,112,116, 27, 27, 27, 27, 27, 8,112, 91,
- 20, 20, 20, 20, 20, 20, 20, 20, 43, 43, 43, 43, 43, 43,117, 48,
- 96, 48, 96, 43, 43, 43, 43, 43, 61,118, 61,119, 61, 34, 11, 16,
- 11, 32,119, 61, 46, 11, 11, 61, 61, 61,118,118,118, 11, 11,120,
- 11, 11, 35, 36, 39, 61, 16, 11, 8, 8, 46, 16, 16, 26, 61,121,
- 92, 92, 92, 92, 92, 92, 92, 92, 92,122,123, 92,124, 61, 61, 61,
- 8, 8,125, 61, 61, 8, 61, 61,125, 26, 61,125, 61, 61, 61,125,
- 61, 61, 61, 61, 61, 61, 61, 8, 61,125,125, 61, 61, 61, 61, 61,
- 61, 61, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 61, 61, 61, 61, 4, 4, 61, 61, 8, 61, 61, 61,126,127, 61, 61,
- 61, 61, 61, 61, 61, 61,125, 61, 61, 61, 61, 61, 61, 26, 8, 8,
- 8, 8, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 8, 8,
- 8, 61, 61, 61, 61, 61, 61, 61, 27, 27, 27, 27, 27, 27, 61, 61,
- 61, 61, 61, 61, 61, 27, 27, 27, 61, 61, 61, 26, 61, 61, 61, 61,
- 26, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 8, 8, 8, 8,
- 61, 61, 61, 61, 61, 61, 61, 26, 61, 61, 61, 61, 4, 4, 4, 4,
- 4, 4, 4, 27, 27, 27, 27, 27, 27, 27, 61, 61, 61, 61, 61, 61,
- 8, 8,112,128, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4,
- 8,112,129,129,129,129,129,129,129,129,129,129,128, 8, 8, 8,
- 8, 8, 8, 8, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 4, 8,
- 8, 8,125, 26, 8, 8,125, 61, 32, 11, 32, 34, 34, 34, 34, 11,
- 32, 32, 34, 16, 16, 16, 40, 11, 32, 32,121, 61, 61,119, 34,130,
- 43, 32, 16, 16, 50, 2, 87, 2, 36, 36, 36, 36, 36, 36, 36, 95,
- 2, 2, 2, 2, 2, 2, 2, 56, 2,104,104, 2,108,109,104, 2,
- 2, 2, 2, 6, 2, 94,104, 2,104, 4, 4, 4, 4, 2, 2, 77,
- 2, 2, 2, 2, 2, 51, 2, 2, 94,131, 2, 2, 2, 2, 2, 2,
- 61, 2, 2, 2, 2, 2, 2, 2, 1, 2,132,133, 4, 4, 4, 4,
- 4, 61, 4, 4, 4, 4,134, 91,135, 92, 92, 92, 92, 43, 43, 75,
- 136, 40, 40, 61, 92,137, 58, 61, 71, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 63,138,139, 62, 36, 36, 36, 36, 36, 58, 40, 62,
- 61, 27, 27, 61, 61, 61, 61, 61, 27, 27, 27, 27, 27, 61, 61, 61,
- 61, 61, 61, 61, 27, 27, 27, 27,140, 27, 27, 27, 27, 27, 27, 27,
- 36, 36, 95, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,141, 2,
- 32, 32, 32, 32, 32, 32, 32, 63, 48,142, 43, 43, 43, 43, 43, 77,
- 32, 32, 32, 32, 32, 32, 40, 43, 36, 36, 36, 92, 92, 92, 92, 92,
- 43, 2, 2, 2, 2, 2, 2, 2, 41, 41, 41,139, 40, 40, 40, 40,
- 41, 32, 32, 32, 32, 32, 32, 32, 16, 32, 32, 32, 32, 32, 32, 32,
- 44, 16, 16, 16, 34, 34, 34, 32, 32, 32, 32, 32, 42,143, 34, 35,
- 32, 32, 16, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 11, 11, 32,
- 11, 11, 32, 32, 32, 32, 32, 32, 16, 32, 11, 11, 34, 16, 16, 16,
- 16, 16, 34, 35, 40, 35, 36, 36, 36, 64, 36, 64, 36, 63, 36, 36,
- 36, 79, 76, 74, 61, 61, 43, 43, 27, 27, 27, 61,144, 61, 61, 61,
- 36, 36, 2, 2, 2, 2, 2, 2, 75, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 75, 75, 75, 75, 75, 75, 75, 75, 43, 43, 43, 43, 43, 2,
- 43, 36, 36, 36, 2, 65, 65, 63, 36, 36, 36, 43, 43, 43, 43, 2,
- 36, 36, 36, 63, 43, 43, 43, 43, 43, 75, 75, 75, 75, 75, 75,145,
- 36, 63, 75, 43, 43, 75, 43, 75,145, 2, 2, 2, 2, 2, 2, 77,
- 7, 7, 7, 7, 7, 7, 7, 2, 36, 36, 63, 62, 36, 36, 36, 36,
- 36, 36, 36, 36, 63, 43, 43, 74, 76, 74, 76, 43, 43, 43, 43, 43,
- 36, 63, 36, 36, 36, 36, 74, 75, 7, 7, 7, 7, 7, 7, 2, 2,
- 62, 36, 36, 70, 61, 79, 74, 36, 64, 43, 64, 63, 64, 36, 36, 43,
- 36, 36, 36, 36, 36, 36, 95, 2, 36, 36, 36, 36, 36, 79, 43, 75,
- 2, 95,146, 43, 43, 43, 43, 43, 16, 16, 16, 16, 16,100, 40, 40,
- 16, 16, 16, 16, 97, 41, 41, 41, 36, 79, 76, 75, 74,145, 76, 43,
- 147,147,147,147,147,147,147,147,148,148,148,148,148,148,148,148,
- 16, 16, 16, 16, 16, 16, 35, 64, 36, 36, 36, 36,149, 36, 36, 36,
- 36, 41, 41, 41, 41, 41, 41, 41, 41,150, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36,129,151,151,151,151,151,151,151,151,
- 36, 36, 36, 36, 36, 36,144, 61, 2, 2, 2,152,113, 2, 2, 2,
- 6,153,154,129,129,129,129,129,129,129,113,152,113, 2,110,155,
- 2, 2, 2, 2,134,129,129,113, 2,156, 8, 8, 60, 2, 2, 2,
- 36, 36, 36, 36, 36, 36, 36,157, 2, 2, 3, 2, 4, 5, 6, 2,
- 16, 16, 16, 16, 16, 17, 18,112,113, 4, 2, 36, 36, 36, 36, 36,
- 62, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 40,
- 20,158, 53, 20, 26, 8,125, 61, 61, 61, 61, 61,159, 59, 61, 61,
- 2, 2, 2, 87, 27, 27, 27, 27, 27, 27, 27, 81, 61, 61, 61, 61,
- 92, 92,124, 27, 81, 61, 61, 61, 61, 61, 61, 61, 61, 27, 61, 61,
- 61, 61, 61, 61, 61, 61, 47, 43,160,160,160,160,160,160,160,160,
- 161, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 84, 36,
- 133, 36, 36, 36, 36, 92, 92, 92, 36, 36, 36, 36, 36, 36, 36, 58,
- 162, 92, 92, 92, 92, 92, 92, 92, 36, 36, 36, 58, 27, 27, 27, 27,
- 36, 36, 36, 70,140, 27, 27, 27, 36, 36, 36,163, 27, 27, 27, 27,
- 36, 36, 36, 36, 36,163, 27, 27, 36, 36, 36, 27, 27, 27, 27, 30,
- 36, 36, 36, 36, 36, 36, 27, 36, 63, 43, 43, 43, 43, 43, 43, 43,
- 36, 36, 36, 36, 43, 43, 43, 43, 36, 36, 36, 36, 36, 36,163, 30,
- 36, 36, 36, 36, 36, 36,163, 27, 36, 36, 36, 36, 71, 36, 36, 36,
- 36, 36, 63, 43, 43,161, 27, 27, 36, 36, 36, 36, 58, 2, 2, 2,
- 36, 36, 36, 36, 27, 27, 27, 27, 16, 16, 16, 16, 16, 27, 27, 27,
- 36, 36, 43, 43, 43, 43, 43, 43, 36, 36, 36, 36, 36, 63,164, 51,
- 27, 27, 27, 84, 36, 36, 36, 36,161, 27, 30, 2, 2, 2, 2, 2,
- 36, 36,163, 27, 27, 27, 27, 27, 76, 78, 36, 36, 36, 36, 36, 36,
- 43, 43, 43, 57, 2, 2, 2, 2, 2, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,165,
- 75, 76, 43, 74, 76, 57, 72, 2, 2, 2, 2, 2, 2, 2, 72, 59,
- 36, 36, 36, 63, 43, 43, 76, 43, 43, 43, 43, 7, 7, 7, 7, 7,
- 2, 2, 79, 78, 36, 36, 36, 36, 36, 63, 2, 36, 36, 36, 36, 36,
- 36, 79, 75, 43, 43, 43, 43, 74, 78, 36, 58, 2, 56, 43, 57, 76,
- 7, 7, 7, 7, 7, 58, 58, 2, 87, 27, 27, 27, 27, 27, 27, 27,
- 36, 36, 36, 36, 36, 36, 75, 76, 43, 75, 74, 43, 2, 2, 2, 43,
- 36, 36, 36, 36, 36, 36, 36, 63, 74, 75, 75, 75, 75, 75, 75, 75,
- 36, 36, 36, 79, 75, 75, 78, 36, 36, 75, 75, 43, 43, 43, 43, 43,
- 36, 36, 79, 75, 43, 43, 43, 43, 75, 43, 74, 64, 36, 58, 2, 2,
- 7, 7, 7, 7, 7, 2, 2, 64, 75, 76, 43, 43, 74, 74, 75, 76,
- 74, 43, 36, 65, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 79,
- 75, 43, 43, 43, 75, 75, 43, 76, 57, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 36, 36, 43, 43, 75, 76, 43, 43, 43, 74, 76, 76,
- 57, 2, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 63, 76, 75,
- 43, 43, 43, 76, 36, 36, 36, 36, 75, 43, 43, 76, 43, 43, 43, 43,
- 7, 7, 7, 7, 7, 27, 2, 86, 43, 43, 43, 43, 76, 57, 2, 2,
- 27, 27, 27, 27, 27, 27, 27, 84, 75, 75, 75, 75, 75, 76, 74, 64,
- 78, 76, 2, 2, 2, 2, 2, 2, 79, 75, 43, 43, 43, 43, 75, 75,
- 64, 65, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
- 63, 43, 43, 43, 43, 64, 36, 36, 36, 63, 43, 43, 74, 63, 43, 57,
- 2, 2, 2, 56, 43, 43, 43, 43, 63, 43, 43, 74, 76, 43, 36, 36,
- 36, 36, 36, 36, 36, 43, 43, 43, 43, 43, 43, 74, 43, 2, 65, 2,
- 43, 43, 43, 43, 43, 43, 43, 76, 58, 2, 2, 2, 2, 2, 2, 2,
- 2, 36, 36, 36, 36, 36, 36, 36, 43, 43, 43, 43, 74, 43, 43, 43,
- 74, 43, 76, 43, 43, 43, 43, 43, 43, 43, 43, 63, 43, 43, 43, 43,
- 36, 36, 36, 36, 36, 75, 75, 75, 43, 74, 76, 76, 36, 36, 36, 36,
- 36, 63, 74,145, 2, 2, 2, 2, 27, 27, 81, 61, 61, 61, 53, 20,
- 144, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 21,
- 43, 43, 57, 2, 2, 2, 2, 2, 43, 43, 43, 57, 2, 2, 61, 61,
- 40, 40, 86, 61, 61, 61, 61, 61, 7, 7, 7, 7, 7,166, 27, 27,
- 27, 84, 36, 36, 36, 36, 36, 36, 27, 27, 27, 30, 2, 2, 2, 2,
- 79, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 76,
- 43, 67, 40, 40, 40, 40, 40, 40, 40, 77, 43, 43, 43, 43, 43, 43,
- 36, 36, 36, 36, 36, 36, 47, 57, 61, 61,167, 76, 43, 61,167, 75,
- 75,168, 59, 59, 59, 73, 43, 43, 43, 69, 47, 43, 43, 43, 61, 61,
- 61, 61, 61, 61, 61, 43, 43, 61, 61, 43, 69, 61, 61, 61, 61, 61,
- 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 16, 11, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 11, 11, 11, 11, 11, 16, 16, 16, 16, 16,
- 31, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 33, 16, 16,
- 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 31, 16, 16,
- 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 31, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16,
- 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, 32, 16, 7,
- 43, 43, 43, 69, 61, 47, 43, 43, 43, 43, 43, 43, 43, 43, 69, 61,
- 61, 61, 47, 61, 61, 61, 61, 61, 61, 61, 69, 21, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 56, 43, 43, 43, 43, 43, 67, 40, 40, 40, 40,
- 7, 7, 7, 7, 7, 7, 7, 70, 36, 36, 36, 36, 36, 36, 43, 43,
- 7, 7, 7, 7, 7, 7, 7,169, 16, 16, 43, 43, 43, 67, 40, 40,
- 27, 27, 27, 27, 27, 27,140, 27,170, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27,140, 27, 27, 27, 27, 27, 27, 81, 61,
- 61, 61, 61, 61, 61, 25, 41, 41, 0, 0, 29, 21, 21, 21, 23, 21,
- 22, 18, 21, 25, 21, 17, 13, 13, 25, 25, 25, 21, 21, 9, 9, 9,
- 9, 22, 21, 18, 24, 16, 24, 5, 5, 5, 5, 22, 25, 18, 25, 0,
- 23, 23, 26, 21, 24, 26, 7, 20, 25, 1, 26, 24, 26, 25, 15, 15,
- 24, 15, 7, 19, 15, 21, 9, 25, 9, 5, 5, 25, 5, 9, 5, 7,
- 7, 7, 9, 8, 8, 5, 7, 5, 6, 6, 24, 24, 6, 24, 12, 12,
- 6, 5, 9, 21, 25, 9, 26, 12, 11, 11, 9, 6, 5, 21, 17, 17,
- 17, 26, 26, 23, 23, 12, 17, 12, 21, 12, 12, 21, 7, 21, 1, 1,
- 21, 23, 26, 26, 6, 7, 7, 12, 12, 7, 21, 7, 12, 1, 12, 6,
- 6, 12, 12, 26, 7, 26, 26, 7, 21, 1, 1, 12, 12, 10, 10, 10,
- 10, 12, 21, 6, 10, 7, 7, 10, 23, 7, 15, 26, 13, 21, 13, 7,
- 15, 7, 12, 23, 21, 26, 21, 15, 17, 7, 29, 7, 7, 22, 18, 18,
- 14, 14, 14, 7, 17, 21, 7, 6, 11, 12, 5, 6, 8, 8, 8, 24,
- 5, 24, 9, 24, 29, 29, 29, 1, 20, 19, 22, 20, 27, 28, 1, 29,
- 21, 20, 19, 21, 21, 16, 16, 21, 25, 22, 18, 21, 21, 29, 15, 6,
- 18, 6, 12, 11, 9, 26, 26, 9, 26, 5, 5, 26, 14, 9, 5, 14,
- 14, 15, 25, 26, 26, 22, 18, 26, 18, 25, 18, 22, 5, 12, 22, 21,
- 26, 6, 7, 14, 17, 22, 26, 14, 17, 6, 14, 6, 12, 24, 24, 6,
- 26, 15, 6, 21, 11, 21, 24, 9, 23, 26, 10, 21, 6, 10, 4, 4,
- 3, 3, 7, 25, 24, 7, 22, 22, 21, 22, 17, 16, 16, 22, 16, 16,
- 25, 17, 7, 1, 25, 24, 26, 1, 2, 2, 12, 15, 21, 14, 7, 15,
- 12, 17, 13, 12, 13, 15, 26, 10, 10, 1, 13, 23, 23, 15, 0, 1,
- 2, 3, 4, 5, 6, 7, 8, 9, 0, 10, 11, 12, 13, 0, 14, 0,
- 0, 0, 0, 0, 15, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 21, 22, 23,
- 0, 0, 0, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 34, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 37, 38, 0, 0, 0, 0, 0, 0, 39, 40,
- 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 2, 0, 0, 0, 0, 3, 0, 0, 0, 4, 5, 6, 7, 0, 8,
- 9, 10, 0, 11, 12, 13, 0, 14, 15, 16, 15, 17, 15, 18, 15, 18,
- 15, 18, 0, 18, 0, 19, 15, 18, 20, 18, 0, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 32, 0, 0, 0, 0, 0, 0, 33, 0, 0, 34, 0, 0, 35, 0,
- 36, 0, 0, 0, 37, 38, 39, 40, 41, 42, 43, 44, 45, 0, 0, 46,
- 0, 0, 0, 47, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 49,
- 0, 50, 0, 51, 52, 0, 53, 0, 0, 0, 0, 0, 0, 54, 55, 56,
- 0, 0, 0, 0, 57, 0, 0, 58, 59, 60, 61, 62, 0, 0, 63, 64,
- 0, 0, 0, 65, 0, 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 69,
- 0, 70, 0, 0, 71, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0,
- 73, 0, 0, 0, 0, 0, 74, 0, 0, 75, 0, 0, 0, 76, 77, 0,
- 78, 61, 0, 79, 80, 0, 0, 81, 82, 83, 0, 0, 0, 84, 0, 85,
- 0, 0, 50, 86, 50, 0, 87, 0, 88, 0, 0, 0, 77, 0, 0, 0,
- 89, 90, 0, 91, 92, 93, 94, 0, 0, 0, 0, 0, 50, 0, 0, 0,
- 0, 95, 96, 0, 0, 0, 0, 97, 98, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 99, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,101,102, 0, 0,103, 0, 0, 0, 0, 0, 0,104, 0, 0, 0,
- 98, 0, 0, 0, 0, 0, 0,105, 0, 0, 0, 0, 0, 0, 0,106,
- 0,107, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0,
- 8, 0, 0, 0, 0, 9, 10, 11, 12, 0, 0, 0, 0, 13, 0, 0,
- 14, 15, 0, 16, 0, 17, 18, 0, 0, 19, 0, 20, 21, 0, 0, 0,
- 0, 0, 22, 23, 0, 24, 25, 0, 0, 26, 0, 0, 0, 27, 28, 29,
- 0, 0, 0, 30, 31, 32, 0, 0, 31, 0, 0, 33, 31, 0, 0, 0,
- 31, 34, 0, 0, 0, 0, 0, 35, 36, 0, 0, 0, 0, 0, 0, 37,
- 38, 0, 0, 0, 0, 0, 0, 39, 40, 0, 0, 0, 0, 41, 0, 42,
- 0, 0, 0, 43, 44, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 46,
- 47, 0, 0, 0, 0, 48, 0, 0, 0, 49, 0, 49, 0, 50, 0, 0,
- 0, 0, 51, 0, 0, 0, 0, 52, 0, 53, 0, 0, 0, 0, 54, 55,
- 0, 0, 0, 56, 57, 0, 0, 0, 0, 0, 0, 58, 49, 0, 59, 60,
- 0, 0, 61, 0, 0, 0, 62, 63, 0, 0, 0, 64, 0, 65, 66, 67,
- 68, 69, 1, 70, 0, 71, 72, 73, 0, 0, 74, 75, 0, 0, 0, 76,
- 0, 0, 1, 1, 0, 0, 77, 0, 0, 78, 0, 0, 0, 0, 74, 79,
- 0, 80, 0, 0, 0, 0, 0, 75, 81, 0, 82, 0, 49, 0, 1, 75,
- 0, 0, 83, 0, 0, 84, 0, 0, 0, 0, 0, 85, 54, 0, 0, 0,
- 0, 0, 0, 86, 87, 0, 0, 81, 0, 0, 31, 0, 0, 88, 0, 0,
- 0, 0, 89, 0, 0, 0, 0, 47, 0, 0, 57, 0, 0, 0, 0, 90,
- 91, 0, 0, 92, 0, 0, 93, 0, 0, 0, 94, 0, 0, 0, 95, 0,
- 96, 57, 0, 0, 81, 0, 0, 76, 0, 0, 0, 97, 98, 0, 0, 99,
- 100, 0, 0, 0, 0, 0, 0,101, 0, 0,102, 0, 0, 0, 0,103,
- 31, 0,104,105,106, 33, 0, 0,107, 0, 0, 0,108, 0, 0, 0,
- 0, 0, 0,109, 0, 0,110, 0, 0, 0, 0,111, 85, 0, 0, 0,
- 0, 0, 54, 0, 0, 0, 0, 49,112, 0, 0, 0, 0,113, 0, 0,
- 114, 0, 0, 0, 0,112, 0, 0, 0, 0, 0,115, 0, 0, 0,116,
- 0, 0, 0,117, 0,118, 0, 0, 0, 0,119,120,121, 0,122, 0,
- 123, 0, 0, 0,124,125,126, 0, 0, 0,127, 0, 0,128, 0, 0,
- 129, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3, 4,
- 5, 6, 7, 4, 4, 8, 9, 10, 1, 11, 12, 13, 14, 15, 16, 17,
- 18, 1, 1, 1, 19, 1, 0, 0, 20, 21, 22, 1, 23, 4, 21, 24,
- 25, 26, 27, 28, 29, 30, 0, 0, 1, 1, 31, 0, 0, 0, 32, 33,
- 34, 35, 1, 36, 37, 0, 0, 0, 0, 38, 1, 39, 14, 39, 40, 41,
- 42, 0, 0, 0, 43, 36, 44, 45, 21, 45, 46, 0, 0, 0, 19, 1,
- 21, 0, 0, 47, 0, 38, 48, 1, 1, 49, 49, 50, 0, 0, 51, 0,
- 52, 1, 1, 1, 53, 21, 43, 54, 55, 21, 35, 1, 0, 0, 0, 56,
- 0, 0, 0, 57, 58, 59, 0, 0, 0, 0, 0, 60, 0, 61, 0, 0,
- 0, 0, 62, 63, 0, 0, 64, 0, 0, 0, 65, 0, 0, 0, 66, 0,
- 0, 0, 67, 0, 0, 0, 68, 0, 0, 0, 69, 0, 0, 70, 71, 0,
- 72, 73, 74, 75, 76, 77, 0, 0, 0, 78, 0, 0, 0, 79, 80, 0,
- 0, 0, 0, 47, 0, 0, 0, 49, 0, 63, 0, 0, 64, 0, 0, 81,
- 0, 0, 82, 0, 0, 0, 83, 0, 0, 19, 84, 0, 63, 0, 0, 0,
- 0, 49, 1, 85, 1, 54, 15, 86, 84, 0, 0, 0, 0, 56, 0, 0,
- 0, 0, 19, 10, 1, 0, 0, 0, 0, 0, 87, 0, 0, 88, 0, 0,
- 87, 0, 0, 0, 0, 79, 0, 0, 89, 9, 12, 4, 90, 8, 91, 47,
- 0, 59, 50, 0, 21, 1, 21, 92, 93, 1, 1, 1, 1, 94, 95, 96,
- 97, 1, 98, 59, 81, 99,100, 4, 59, 0, 0, 0, 0, 0, 0, 19,
- 50, 0, 0, 0, 0, 0, 0, 62, 0, 0,101,102, 0, 0,103, 0,
- 0, 1, 1, 50, 0, 0, 0, 38, 0, 64, 0, 0, 0, 0, 0, 63,
- 0, 0, 52, 69, 62, 0, 0, 0, 79, 0, 0, 0,104,105, 59, 38,
- 81, 0, 0, 0, 0, 0, 0,106, 1, 14, 4, 12, 0, 38, 89, 0,
- 0, 0, 0,107, 0, 0,108, 62, 0,109, 0, 0, 0, 1, 0, 0,
- 0, 0, 19, 59, 0,110, 14, 54, 0, 0,111, 0, 89, 0, 0, 0,
- 62, 63, 0, 0, 63, 0, 88, 0, 0,111, 0, 0, 0, 0,112, 0,
- 0, 0, 79, 56, 0, 38, 1, 59, 1, 59, 0, 0, 64, 88, 0, 0,
- 113, 0, 0, 0, 56, 0, 0, 0, 0,113, 0, 0, 0, 0, 62, 0,
- 0, 0, 0, 80, 0, 62, 0, 0, 0, 0, 57, 0, 88,114, 0, 0,
- 8, 91, 0, 0, 1, 89, 0, 0,115, 0, 0, 0, 0, 0, 0,116,
- 0,117,118,119,120, 0, 52, 4,121, 49, 23, 0, 0, 0, 38, 50,
- 38, 59, 0, 0, 1, 89, 1, 1, 1, 1, 39, 1, 48,104, 89, 0,
- 0, 0, 0, 1, 4,121, 0, 0, 0, 1,122, 0, 0, 0, 0, 0,
- 230,230,230,230,230,232,220,220,220,220,232,216,220,220,220,220,
- 220,202,202,220,220,220,220,202,202,220,220,220, 1, 1, 1, 1,
- 1,220,220,220,220,230,230,230,230,240,230,220,220,220,230,230,
- 230,220,220, 0,230,230,230,220,220,220,220,230,232,220,220,230,
- 233,234,234,233,234,234,233,230, 0, 0, 0,230, 0,220,230,230,
- 230,230,220,230,230,230,222,220,230,230,220,220,230,222,228,230,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 0, 23,
- 0, 24, 25, 0,230,220, 0, 18, 30, 31, 32, 0, 0, 0, 0, 27,
- 28, 29, 30, 31, 32, 33, 34,230,230,220,220,230,220,230,230,220,
- 35, 0, 0, 0, 0, 0,230,230,230, 0, 0,230,230, 0,220,230,
- 230,220, 0, 0, 0, 36, 0, 0,230,220,230,230,220,220,230,220,
- 220,230,220,230,220,230,230, 0, 0,220, 0, 0,230,230, 0,230,
- 0,230,230,230,230,230, 0, 0, 0,220,220,220, 0, 0, 0,220,
- 230,230, 0,220,230,220,220,220, 27, 28, 29,230, 7, 0, 0, 0,
- 0, 9, 0, 0, 0,230,220,230,230, 0, 0, 0, 0, 0,230, 0,
- 0, 84, 91, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 9, 0,
- 103,103, 9, 0,107,107,107,107,118,118, 9, 0,122,122,122,122,
- 220,220, 0, 0, 0,220, 0,220, 0,216, 0, 0, 0,129,130, 0,
- 132, 0, 0, 0, 0, 0,130,130,130,130, 0, 0,130, 0,230,230,
- 9, 0,230,230, 0, 0,220, 0, 0, 0, 0, 7, 0, 9, 9, 0,
- 0,230, 0, 0, 0,228, 0, 0, 0,222,230,220,220, 0, 0, 0,
- 230, 0, 0,220,230,220, 0,220, 0, 0, 9, 9, 0, 0, 7, 0,
- 230,230,230, 0,230, 0, 1, 1, 1, 0, 0, 0,230,234,214,220,
- 202,230,230,230,230,230,232,228,228,220, 0,230,233,220,230,220,
- 230,230, 1, 1, 1, 1, 1,230, 0, 1, 1,230,220,230, 1, 1,
- 0, 0,218,228,232,222,224,224, 0, 8, 8, 0,230, 0,230,230,
- 220, 0, 0,230, 0, 0, 26, 0, 0,220, 0,230,230, 1,220, 0,
- 0,230,220, 0, 0, 0,220,220, 0, 9, 7, 0, 0, 7, 9, 0,
- 0, 0, 9, 7, 9, 9, 0, 0, 6, 6, 0, 0, 0, 0, 1, 0,
- 0,216,216, 1, 1, 1, 0, 0, 0,226,216,216,216,216,216, 0,
- 220,220,220, 0,230,230, 7, 0, 16, 17, 17, 33, 17, 49, 17, 17,
- 84, 97,135,145, 26, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17,177, 0, 1, 2, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3,
- 3, 3, 5, 3, 3, 3, 3, 3, 6, 7, 8, 3, 3, 3, 3, 3,
- 9, 10, 11, 12, 13, 3, 3, 3, 3, 3, 3, 3, 3, 14, 3, 15,
- 3, 3, 3, 3, 3, 3, 16, 17, 18, 19, 20, 21, 3, 3, 3, 22,
- 23, 3, 3, 3, 3, 3, 3, 3, 24, 3, 3, 3, 3, 3, 3, 3,
- 3, 25, 3, 3, 26, 27, 0, 1, 0, 0, 0, 0, 0, 1, 0, 2,
- 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 4, 0, 5,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
- 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,
- 9, 0, 0, 0, 0, 0, 0, 9, 0, 9, 0, 0, 0, 0, 0, 0,
- 0, 10, 11, 12, 13, 0, 0, 14, 15, 16, 6, 0, 17, 18, 19, 19,
- 19, 20, 21, 22, 23, 24, 19, 25, 0, 26, 27, 19, 19, 28, 29, 30,
- 0, 31, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 19, 28, 0,
- 32, 33, 9, 34, 35, 19, 0, 0, 36, 37, 38, 39, 40, 19, 0, 41,
- 42, 43, 44, 31, 0, 1, 45, 42, 0, 0, 0, 0, 0, 32, 14, 14,
- 0, 0, 0, 0, 14, 0, 0, 46, 47, 47, 47, 47, 48, 49, 47, 47,
- 47, 47, 50, 51, 52, 53, 43, 21, 0, 0, 0, 0, 0, 0, 0, 54,
- 6, 55, 0, 14, 19, 1, 0, 0, 0, 19, 56, 31, 0, 0, 0, 0,
- 0, 0, 0, 57, 14, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 3,
- 0, 0, 0, 58, 59, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
- 0, 0, 2, 3, 0, 4, 5, 0, 0, 6, 0, 0, 0, 7, 0, 0,
- 0, 1, 1, 0, 0, 8, 9, 0, 8, 9, 0, 0, 0, 0, 8, 9,
- 10, 11, 12, 0, 0, 0, 13, 0, 0, 0, 0, 14, 15, 16, 17, 0,
- 0, 0, 1, 0, 0, 18, 19, 0, 0, 0, 20, 0, 0, 0, 1, 1,
- 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 8, 21, 9, 0, 0,
- 22, 0, 0, 0, 0, 1, 0, 23, 24, 25, 0, 0, 26, 0, 0, 0,
- 8, 21, 27, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 28, 29, 30,
- 0, 31, 32, 20, 1, 1, 0, 0, 0, 8, 21, 9, 1, 4, 5, 0,
- 0, 0, 33, 9, 0, 1, 1, 1, 0, 8, 21, 21, 21, 21, 34, 1,
- 35, 21, 21, 21, 9, 36, 0, 0, 37, 38, 1, 0, 39, 0, 0, 0,
- 1, 0, 1, 0, 0, 0, 0, 8, 21, 9, 1, 0, 0, 0, 40, 0,
- 8, 21, 21, 21, 21, 21, 21, 21, 21, 9, 0, 1, 1, 1, 1, 8,
- 21, 21, 21, 9, 0, 0, 0, 41, 0, 42, 43, 0, 0, 0, 1, 44,
- 0, 0, 0, 45, 8, 9, 1, 0, 1, 0, 1, 1, 8, 21, 21, 9,
- 0, 4, 5, 8, 9, 1, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7,
- 7, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 10, 11, 11,
- 11, 11, 11, 12, 12, 12, 12, 13, 14, 15, 16, 17, 18, 12, 19, 12,
- 20, 12, 12, 12, 12, 21, 22, 22, 22, 23, 12, 12, 12, 12, 24, 25,
- 12, 12, 26, 27, 28, 29, 30, 31, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 32, 12, 33, 7, 7, 34, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 35, 0, 0, 1, 2, 2, 2, 3,
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 32, 33, 33,
- 33, 34, 35, 35, 35, 35, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, 50, 2, 2, 51, 51, 52, 53, 54, 55, 56, 56,
- 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57, 57, 56, 56, 56, 56,
- 56, 56, 58, 59, 60, 61, 56, 62, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 56, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 71, 62, 62, 62, 62, 72, 72, 72, 72, 72, 72,
- 72, 72, 72, 73, 74, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
- 85, 86, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 62, 62, 62, 62,
- 88, 89, 89, 89, 90, 89, 91, 92, 93, 94, 95, 95, 96, 97, 87, 98,
- 99,100,101,102,103, 87,104,104,104, 87,105,106,107,108,109,110,
- 111,112,113,114,115, 87, 89,116,117,118,119,120,121,122,123,124,
- 125, 87,126,127, 87,128,129,130,131, 87,132,133,134,135,136,137,
- 87, 87,138,139,140,141, 87,142, 87,143,144,144,144,144,144,144,
- 144,144,144,144,144, 87, 87, 87, 87, 87,145,145,145,145,145,145,
- 145,145,145, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87,146,146,146,146,146, 87, 87, 87,147,147,147,147,148,149,
- 150,150, 87, 87, 87, 87,151,151,152,153,154,154,154,154,154,154,
- 154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
- 155,155,155,155,154, 87, 87, 87, 87, 87,156,157,158,159,159,159,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87,160,161, 87, 87, 87, 87, 87, 87, 56, 56,162,163, 51, 56,
- 56, 87, 56, 56, 56, 56, 56, 56, 56, 56,164,164,164,164,164,164,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,165, 87,166, 87, 87,167,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,168,168,169, 87, 87, 87,
- 87, 87, 56, 56, 56, 87, 89, 89, 87, 87, 56, 56, 56, 56,170, 87,
- 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
- 56, 56, 87, 87, 87, 87, 87, 87, 87, 87, 62, 62, 62, 62, 62, 62,
- 62, 62, 87, 87, 87, 87, 87, 87, 87, 87, 62, 62, 62, 62, 62, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 62, 62, 62, 62, 62, 62,
- 62, 87, 87, 87, 87, 87, 87, 87, 87, 87, 56, 87,171,171, 0, 1,
- 2, 2, 0, 1, 2, 2, 2, 3, 4, 5, 0, 0, 0, 0, 1, 2,
- 1, 2, 0, 0, 3, 3, 4, 5, 4, 5, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 6, 0, 0, 7, 0, 8, 8, 8, 8, 8, 8,
- 8, 9, 10, 11, 11, 11, 11, 11, 12, 11, 13, 13, 13, 13, 13, 13,
- 13, 13, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 16, 16,
- 16, 16, 16, 17, 18, 18, 18, 18, 18, 18, 19, 20, 21, 21, 22, 23,
- 21, 24, 21, 21, 21, 21, 21, 25, 21, 21, 26, 26, 26, 26, 26, 21,
- 21, 21, 27, 27, 27, 27, 28, 28, 28, 28, 29, 29, 29, 29, 30, 30,
- 26, 26, 21, 21, 21, 21, 21, 21, 31, 21, 32, 32, 32, 32, 32, 33,
- 34, 32, 35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36,
- 36, 36, 37, 37, 37, 37, 37, 37, 37, 37, 38, 38, 38, 38, 38, 38,
- 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40, 40, 40,
- 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 42, 42, 42, 42, 42, 42,
- 42, 42, 43, 43, 43, 43, 43, 43, 43, 43, 44, 44, 44, 45, 44, 44,
- 44, 44, 46, 46, 46, 46, 46, 46, 46, 46, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 48, 47, 47, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 50, 50, 50, 50, 50, 51, 52, 52, 52, 52, 52, 52,
- 52, 52, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 54, 54, 54, 54,
- 54, 54, 55, 55, 55, 55, 55, 55, 55, 55, 56, 56, 57, 57, 57, 57,
- 58, 57, 59, 59, 60, 61, 62, 62, 63, 63, 64, 64, 64, 64, 64, 64,
- 64, 64, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 55, 55, 55,
- 55, 55, 67, 67, 67, 67, 67, 68, 68, 68, 69, 69, 69, 69, 69, 69,
- 64, 64, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 8, 8, 8,
- 8, 8, 72, 72, 72, 72, 72, 72, 72, 72, 73, 73, 73, 73, 74, 74,
- 74, 74, 75, 75, 75, 75, 75, 76, 76, 76, 13, 50, 50, 50, 73, 77,
- 78, 79, 4, 4, 80, 4, 4, 81, 82, 83, 4, 4, 4, 84, 8, 8,
- 8, 8, 11, 11, 11, 11, 11, 11, 11, 11, 85, 0, 0, 0, 0, 0,
- 0, 86, 0, 4, 0, 0, 0, 8, 8, 8, 0, 0, 87, 88, 89, 0,
- 4, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 90, 90, 90, 90, 90, 90, 90, 90, 91, 91, 91, 91, 91, 91,
- 4, 4, 92, 92, 92, 92, 92, 92, 92, 92, 50, 50, 50, 93, 93, 93,
- 93, 93, 53, 53, 53, 53, 53, 53, 13, 13, 94, 94, 94, 94, 94, 94,
- 94, 94, 94, 94, 94, 94, 94, 94, 94, 0, 95, 0, 96, 97, 98, 99,
- 99, 99, 99,100,101,102,102,102,102,103,104,104,104,105, 52, 52,
- 52, 52, 52, 0,104,104, 0, 0, 0,102, 52, 52, 0, 0, 0, 0,
- 52,106, 0, 0, 0, 0, 0,102,102,107,102,102,102,102,102,108,
- 0, 0, 94, 94, 94, 94, 0, 0, 0, 0,109,109,109,109,109,109,
- 109,109,109,109,109,109,109,110,110,110,111,111,111,111,111,111,
- 111,111,111,111,111,111, 13, 13, 13, 13, 13, 13,112,112,112,112,
- 112,112, 0, 0,113, 4, 4, 4, 4, 4,114, 4, 4, 4, 4, 4,
- 4, 4,115,115,115, 0,116,116,116,116,117,117,117,117,117,117,
- 32, 32,118,118,119,120,120,120, 52, 52,121,121,121,121,122,121,
- 49, 49,123,123,123,123,123,123, 49, 49,124,124,124,124,124,124,
- 125,125, 53, 53, 53, 4, 4,126,127, 54, 54, 54, 54, 54,125,125,
- 125,125,128,128,128,128,128,128,128,128, 4,129, 18, 18, 18, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,130, 0, 21,
- 21, 21, 8, 0,131, 0, 0, 0, 0, 21, 21, 21, 21, 21, 21, 21,
- 21,132, 0, 0, 1, 2, 1, 2,133,101,102,134, 52, 52, 52, 52,
- 0, 0,135,135,135,135,135,135,135,135, 0, 0, 0, 0, 11, 11,
- 11, 11, 11, 0, 11, 11, 11, 0, 0,136,137,137,138,138,138,138,
- 139, 0,140,140,140,141,141,142,142,142,143,143,144,144,144,144,
- 144,144,145,145,145,145,145,146,146,146,147,147,147,148,148,148,
- 148,148,149,149,149,150,150,150,150,150,151,151,151,151,151,151,
- 151,151,152,152,152,152,153,153,154,154,155,155,155,155,155,155,
- 156,156,157,157,158,158,158,158,158,158,159,159,160,160,160,160,
- 160,160,161,161,161,161,161,161,162,162,163,163,163,163,164,164,
- 164,164,165,165,165,165,166,166,167,167,168,168,168,168,168,168,
- 168,168,169,169,169,169,169,169,169,169,170,170,170,170,170,170,
- 170,170,171,171,171,171,171,171,171,171,172,172,172,172,172,172,
- 172,172,173,173,173,174,174,174,174,174,175,175,175,175,175,175,
- 176,176,177,177,177,177,177,177,177,177,178,178,178,178,178,179,
- 179,179,180,180,180,180,180,181,181,181,182,182,182,182,182,182,
- 183, 43,184,184,184,184,184,184,184,184,185,185,185,186,186,186,
- 186,186,187,187,187,188,187,187,187,187,189,189,189,189,189,189,
- 189,189,190,190,190,190,190,190,190,190,191,191,191,191,191,191,
- 191,191,192,192,192,192,192,192, 66, 66,193,193,193,193,193,193,
- 193,193,194,194,194,194,194,194,194,194,195,195,195,195,195,195,
- 195,195,196,196,196,196,196,196,196,196,197,197,197,197,197,197,
- 197,197,198,198,198,198,198,198,198,198,199,199,199,199,199,200,
- 200,200,200,200,200,200,201,201,201,201,202,202,202,202,202,202,
- 202,203,203,203,203,203,203,203,203,203,204,204,204,204,204,204,
- 205,205,205,205,205,205,205,205,205,205,206,206,206,206,206,206,
- 206,206,110,110,110,110, 39, 39, 39, 39,207,207,207,207,207,207,
- 207,207,208,208,208,208,208,208,208,208,209,209,209,209,209,209,
- 209,209,112,112,112,112,112,112,112,112,112,112,112,112,210,210,
- 210,210,211,211,211,211,211,211,211,211,212,212,212,212,212,212,
- 212,212,213,213,213,213,213,213,213,213,214,214,214,214,214,214,
- 214,214,214,214,214,214,214,214,215, 94,216,216,216,216,216,216,
- 216,216,217,217,217,217,217,217,217,217,218, 99, 99, 99, 99, 99,
- 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
- 219,220,220,220,220,220,220,220,220,220,221,221,221,221,221,221,
- 221,221,221,221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 222,223,224, 0,225, 0, 0, 0, 0, 0,226,226,226,226,226,226,
- 226,226, 91, 91, 91, 91, 91, 91, 91, 91,227,227,227,227,227,227,
- 227,227,228,228,228,228,228,228,228,228,229,229,229,229,229,229,
- 229,229,230,230,230,230,230,230,230,230,231, 0, 0, 0, 0, 0,
- 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 1, 2,
- 2, 2, 2, 2, 3, 0, 0, 0, 4, 0, 2, 2, 2, 2, 2, 3,
- 2, 2, 2, 2, 5, 0, 2, 5, 6, 0, 7, 7, 7, 7, 8, 9,
- 8, 10, 8, 11, 8, 8, 8, 8, 8, 8, 12, 13, 13, 13, 14, 14,
- 14, 14, 14, 15, 14, 14, 16, 17, 17, 17, 17, 17, 17, 17, 18, 19,
- 19, 19, 19, 19, 19, 19, 20, 21, 20, 22, 20, 20, 23, 23, 20, 20,
- 20, 20, 22, 20, 24, 7, 7, 25, 20, 20, 26, 20, 20, 20, 20, 20,
- 20, 21, 27, 27, 27, 27, 28, 28, 28, 28, 29, 29, 29, 29, 30, 30,
- 30, 30, 31, 31, 31, 31, 32, 20, 20, 20, 33, 33, 33, 33, 34, 35,
- 33, 33, 33, 36, 33, 33, 37, 37, 37, 37, 38, 38, 38, 38, 39, 39,
- 39, 39, 40, 40, 40, 40, 41, 41, 41, 41, 42, 42, 42, 42, 43, 43,
- 43, 43, 44, 44, 44, 44, 45, 45, 45, 45, 46, 46, 46, 46, 46, 46,
- 46, 47, 48, 48, 48, 48, 49, 49, 49, 49, 49, 50, 51, 49, 52, 52,
- 52, 52, 53, 53, 53, 53, 53, 53, 54, 53, 55, 55, 55, 55, 56, 56,
- 56, 56, 57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59, 60, 60,
- 60, 60, 60, 60, 61, 62, 63, 63, 63, 63, 64, 64, 64, 64, 64, 65,
- 0, 0, 66, 66, 66, 66, 67, 67, 67, 67, 68, 68, 68, 68, 69, 70,
- 71, 71, 71, 71, 71, 71, 72, 72, 72, 72, 73, 73, 73, 73, 74, 74,
- 74, 74, 75, 75, 75, 75, 76, 76, 76, 76, 77, 77, 77, 77, 78, 78,
- 78, 78, 79, 79, 79, 79, 80, 80, 80, 80, 81, 81, 81, 81, 82, 7,
- 7, 7, 83, 7, 84, 85, 0, 84, 86, 0, 2, 87, 88, 2, 2, 2,
- 2, 89, 90, 87, 91, 2, 2, 2, 92, 2, 2, 2, 2, 93, 0, 0,
- 0, 86, 1, 0, 0, 94, 0, 95, 96, 0, 4, 0, 0, 0, 0, 0,
- 0, 4, 97, 97, 97, 97, 98, 98, 98, 98, 13, 13, 13, 13, 99, 99,
- 99, 99,100,100,100,100, 0,101, 0, 0,102,100,103,104, 0, 0,
- 100, 0,105,106,106,106,106,106,106,106,106,106,107,105,108,109,
- 109,109,109,109,109,109,109,109,110,108,111,111,111,111,112, 55,
- 55, 55, 55, 55, 55,113,109,109,109,110,109,109, 0, 0,114,114,
- 114,114,115,115,115,115,116,116,116,116,117,117,117,117, 96, 2,
- 2, 2, 2, 2, 94, 2,118,118,118,118,119,119,119,119,120,120,
- 120,120,121,121,121,121,121,121,121,122,123,123,123,123,124,124,
- 124,124,124,124,124,125,126,126,126,126,127,127,127,127,128,128,
- 128,128, 2, 2, 3, 2, 2,129,130, 0,131,131,131,131,132, 17,
- 17, 18, 20, 20, 20,133, 7, 7, 7,134, 20, 20, 20, 23, 0,135,
- 109,109,109,109,109,136,137,137,137,137, 0, 0, 0,138,139,139,
- 139,139,140,140,140,140, 84, 0, 0, 0,141,141,141,141,142,142,
- 142,142,143,143,143,143,144,144,144,144,145,145,145,145,146,146,
- 146,146,147,147,147,147,148,148,148,148,149,149,149,149,150,150,
- 150,150,151,151,151,151,152,152,152,152,153,153,153,153,154,154,
- 154,154,155,155,155,155,156,156,156,156,157,157,157,157,158,158,
- 158,158,159,159,159,159,160,160,160,160,161,161,161,161,162,162,
- 162,162,163,163,163,163,164,164,164,164,165,165,165,165,166,166,
- 166,166,167,167,167,167,168,168,168,168,169,169,169,169,170,170,
- 170,170,171,171,171,171,172,172,172,172,173,173,173,173,174,174,
- 174,174,175,175,175,175,176,176,176,176,177,177,177,177,178,178,
- 178,178,179,179,179,179,180,180,180,180,181,181,181,181,182,182,
- 182,182,183,183,183,183,184, 45, 45, 45,185,185,185,185,186,186,
- 186,186,187,187,187,187,188,188,188,188,188,188,189,188,190,190,
- 190,190,191,191,191,191,192,192,192,192,193,193,193,193,194,194,
- 194,194,195,195,195,195,196,196,196,196,197,197,197,197,198,198,
- 198,198,199,199,199,199,200,200,200,200,201,201,201,201,202,202,
- 202,202,203,203,203,203,204,204,204,204,205,205,205,205,206,206,
- 206,206,207,207,207,207,208,208,208,208,209,209,209,209,210,210,
- 210,210,211,211,211,211,212,212,212,212,213,213,213,213,214,214,
- 214,214,215,215,215,215,216,217,217,217,218,218,218,218,217,217,
- 217,217,219,106,106,106,106,109,109,109,220,220,220,220,221,221,
- 221,221, 0,222, 86, 0, 0, 0,222, 7, 82,138, 7, 0, 0, 0,
- 223, 86,224,224,224,224,225,225,225,225,226,226,226,226,227,227,
- 227,227,228,228,228,228,229, 0, 0, 0, 0, 0, 0, 0, 0, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 0, 0, 0, 19, 0, 19, 0,
- 0, 0, 0, 0, 26, 26, 1, 1, 1, 1, 9, 9, 9, 9, 0, 9,
- 9, 9, 9, 9, 0, 9, 9, 0, 9, 0, 9, 9, 55, 55, 55, 55,
- 55, 55, 6, 6, 6, 6, 6, 1, 1, 6, 6, 4, 4, 4, 4, 4,
- 4, 4, 4, 14, 14, 14, 14, 14, 14, 14, 3, 3, 3, 3, 3, 0,
- 3, 3, 0, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 1, 1, 1,
- 3, 3, 1, 3, 3, 3, 37, 37, 37, 37, 38, 38, 38, 38, 64, 64,
- 64, 64, 90, 90, 90, 90, 95, 95, 95, 95, 3, 3, 0, 3, 7, 7,
- 7, 7, 7, 1, 1, 1, 1, 7, 7, 7, 0, 0, 7, 7, 5, 5,
- 5, 5, 11, 11, 11, 11, 10, 10, 10, 10, 21, 21, 21, 21, 22, 22,
- 22, 22, 23, 23, 23, 23, 16, 16, 16, 16, 20, 20, 20, 20, 36, 36,
- 36, 36, 24, 24, 24, 24, 24, 24, 24, 0, 18, 18, 18, 18, 25, 25,
- 25, 25, 25, 0, 0, 0, 0, 25, 25, 25, 33, 33, 33, 33, 8, 8,
- 8, 8, 8, 8, 8, 0, 12, 12, 12, 12, 30, 30, 30, 30, 29, 29,
- 29, 29, 28, 28, 28, 28, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35,
- 35, 0, 0, 0, 35, 35, 45, 45, 45, 45, 44, 44, 44, 44, 44, 0,
- 0, 0, 43, 43, 43, 43, 46, 46, 46, 46, 31, 31, 31, 31, 32, 32,
- 0, 0, 32, 0, 32, 32, 32, 32, 32, 32, 48, 48, 48, 48, 52, 52,
- 52, 52, 58, 58, 58, 58, 54, 54, 54, 54, 91, 91, 91, 91, 62, 62,
- 62, 62, 76, 76, 76, 76, 93, 93, 93, 93, 70, 70, 70, 70, 73, 73,
- 73, 73, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1,
- 0, 0, 1, 1, 0, 0, 19, 19, 9, 9, 9, 9, 9, 6, 19, 9,
- 9, 9, 9, 9, 19, 19, 9, 9, 9, 19, 6, 19, 19, 19, 19, 19,
- 19, 9, 0, 0, 0, 19, 0, 0, 9, 0, 0, 0, 19, 19, 27, 27,
- 27, 27, 56, 56, 56, 56, 61, 61, 61, 61, 13, 13, 13, 13, 0, 13,
- 0, 13, 0, 13, 13, 13, 13, 13, 1, 1, 1, 1, 12, 12, 0, 15,
- 15, 15, 15, 15, 15, 15, 15, 1, 1, 0, 0, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 0, 26, 26, 26, 26, 26, 12, 12, 12, 12, 12,
- 12, 0, 39, 39, 39, 39, 86, 86, 86, 86, 77, 77, 77, 77, 79, 79,
- 79, 79, 60, 60, 60, 60, 65, 65, 65, 65, 75, 75, 75, 75, 69, 69,
- 69, 69, 69, 69, 0, 69, 74, 74, 74, 74, 84, 84, 84, 84, 84, 84,
- 84, 0, 68, 68, 68, 68, 92, 92, 92, 92, 87, 87, 87, 87, 19, 9,
- 19, 19, 19, 19, 0, 0, 2, 2, 2, 2, 19, 19, 19, 4, 3, 3,
- 0, 0, 1, 1, 6, 6, 0, 0, 17, 17, 17, 17, 0, 0, 49, 49,
- 49, 49, 0, 1, 1, 1, 71, 71, 71, 71, 67, 67, 67, 67, 42, 42,
- 42, 42, 41, 41, 41, 41,118,118,118,118, 53, 53, 53, 53, 59, 59,
- 59, 59, 40, 40, 40, 40, 51, 51, 51, 51, 50, 50, 50, 50,135,135,
- 135,135,106,106,106,106,104,104,104,104,110,110,110,110, 47, 47,
- 47, 47, 81, 81, 81, 81,120,120,120,120,116,116,116,116,128,128,
- 128,128, 66, 66, 66, 66, 72, 72, 72, 72, 98, 98, 98, 98, 97, 97,
- 97, 97, 57, 57, 57, 57, 88, 88, 88, 88,117,117,117,117,112,112,
- 112,112, 78, 78, 78, 78, 83, 83, 83, 83, 82, 82, 82, 82,122,122,
- 122,122, 89, 89, 89, 89,130,130,130,130,144,144,144,144,156,156,
- 156,156,147,147,147,147,148,148,148,148,153,153,153,153,149,149,
- 149,149, 94, 94, 94, 94, 85, 85, 85, 85,101,101,101,101, 96, 96,
- 96, 96,111,111,111,111,100,100,100,100,100, 36, 36, 36,108,108,
- 108,108,129,129,129,129,109,109,109,109,107,107,107,107,107,107,
- 107, 1,137,137,137,137,124,124,124,124,123,123,123,123,114,114,
- 114,114,102,102,102,102,126,126,126,126,142,142,142,142,125,125,
- 125,125,154,154,154,154,150,150,150,150,141,141,141,141,140,140,
- 140,140,121,121,121,121,133,133,133,133,134,134,134,134,138,138,
- 138,138,143,143,143,143,145,145,145,145, 63, 63, 63, 63, 80, 80,
- 80, 80,127,127,127,127,115,115,115,115,103,103,103,103,119,119,
- 119,119,146,146,146,146, 99, 99, 99, 99,136,139, 0, 0,155,155,
- 155,155,136,136,136,136, 17, 15, 15, 15,139,139,139,139,105,105,
- 105,105, 0, 0, 0, 1, 0, 0, 1, 1,131,131,131,131,151,151,
- 151,151,152,152,152,152,113,113,113,113,132,132,132,132, 15, 0,
- 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9, 9, 10,
+ 15, 2, 2, 1, 1, 0, 0, 15, 15, 15, 0, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 0, 0, 17,
+ 17, 17, 2, 2, 2, 2, 2, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 2, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 2, 12, 12, 12, 12, 12, 12, 12, 0, 17, 17, 17, 17, 17, 17,
+ 17, 0, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 2,
+ 2, 2, 39, 39, 39, 39, 39, 39, 39, 2, 86, 86, 86, 86, 86, 86,
+ 86, 86, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 2, 2,
+ 2, 2, 79, 79, 79, 79, 79, 79, 79, 79, 0, 0, 19, 19, 19, 19,
+ 19, 19, 0, 0, 0, 19, 19, 19, 19, 19, 19, 19, 19, 2, 2, 2,
+ 2, 2, 19, 19, 2, 19, 2, 19, 19, 19, 19, 19, 2, 2, 2, 2,
+ 2, 2, 2, 2, 19, 19, 19, 19, 19, 19, 60, 60, 60, 60, 60, 60,
+ 60, 60, 60, 60, 60, 60, 60, 2, 2, 2, 0, 0, 2, 2, 2, 2,
+ 2, 2, 65, 65, 65, 65, 65, 65, 65, 65, 75, 75, 75, 75, 75, 75,
+ 75, 75, 75, 75, 75, 75, 75, 75, 2, 2, 2, 2, 2, 2, 2, 2,
+ 75, 75, 75, 75, 2, 2, 2, 2, 2, 2, 69, 69, 69, 69, 69, 69,
+ 69, 69, 69, 69, 69, 69, 69, 69, 0, 69, 74, 74, 74, 74, 74, 74,
+ 74, 74, 74, 74, 74, 74, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 74, 12, 12, 12, 12, 12, 2, 2, 2, 84, 84, 84, 84, 84, 84,
+ 84, 84, 84, 84, 84, 84, 84, 84, 2, 0, 84, 84, 2, 2, 2, 2,
+ 84, 84, 33, 33, 33, 33, 33, 33, 33, 2, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68, 68, 2, 68, 68, 68, 68, 68, 68,
+ 2, 2, 68, 68, 2, 2, 68, 68, 68, 68, 92, 92, 92, 92, 92, 92,
+ 92, 92, 92, 92, 92, 2, 2, 2, 2, 2, 2, 2, 2, 92, 92, 92,
+ 92, 92, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 2, 2, 30, 30, 30, 30, 30, 30, 2, 19, 19, 19, 0, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 9, 19, 19, 19, 19, 0, 0, 2, 2,
+ 2, 2, 87, 87, 87, 87, 87, 87, 2, 2, 87, 87, 2, 2, 2, 2,
+ 2, 2, 12, 12, 12, 12, 2, 2, 2, 2, 2, 2, 2, 12, 12, 12,
+ 12, 12, 13, 13, 2, 2, 2, 2, 2, 2, 19, 19, 19, 19, 19, 19,
+ 19, 2, 2, 2, 2, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 2, 14, 14, 14, 14, 14, 2,
+ 14, 2, 14, 14, 2, 14, 14, 2, 14, 14, 3, 3, 3, 2, 2, 2,
+ 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 0, 0, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2,
+ 2, 3, 1, 1, 1, 1, 1, 1, 6, 6, 0, 0, 0, 2, 0, 0,
+ 0, 0, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 2,
+ 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 17, 17, 17, 17, 17, 17, 17, 17, 0, 0, 2, 2, 12, 12, 12, 12,
+ 12, 12, 2, 2, 12, 12, 12, 2, 2, 2, 2, 0, 0, 0, 0, 0,
+ 2, 2, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 2, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 2, 49, 49, 49, 2, 49, 49,
+ 2, 49, 49, 49, 49, 49, 49, 49, 2, 2, 49, 49, 49, 2, 2, 2,
+ 2, 2, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2,
+ 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 9, 2, 2, 2, 2, 2,
+ 2, 2, 0, 0, 0, 0, 0, 1, 2, 2, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 2, 2, 2, 67, 67, 67, 67, 67, 67,
+ 67, 67, 67, 2, 2, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0, 0,
+ 0, 0, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 42, 42, 42, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 2, 2, 2, 2, 2,118,118,118,118,118,118,
+ 118,118,118,118,118, 2, 2, 2, 2, 2, 53, 53, 53, 53, 53, 53,
+ 53, 53, 53, 53, 53, 53, 53, 53, 2, 53, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 2, 2, 2, 2, 59, 59, 59, 59, 59, 59,
+ 2, 2, 40, 40, 40, 40, 40, 40, 40, 40, 51, 51, 51, 51, 51, 51,
+ 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
+ 2, 2, 50, 50, 2, 2, 2, 2, 2, 2,135,135,135,135,135,135,
+ 135,135,135,135,135,135, 2, 2, 2, 2,106,106,106,106,106,106,
+ 106,106,104,104,104,104,104,104,104,104,104,104,104,104, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,104,161,161,161,161,161,161,
+ 161,161,161,161,161, 2,161,161,161,161,161,161,161, 2,161,161,
+ 2,161,161,161, 2,161,161,161,161,161,161,161, 2,161,161, 2,
+ 2, 2,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+ 110, 2,110,110,110,110,110,110, 2, 2, 19, 19, 19, 19, 19, 19,
+ 2, 19, 19, 2, 19, 19, 19, 19, 19, 19, 47, 47, 47, 47, 47, 47,
+ 2, 2, 47, 2, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 2, 47, 47, 2, 2, 2, 47, 2,
+ 2, 47, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
+ 2, 81,120,120,120,120,120,120,120,120,116,116,116,116,116,116,
+ 116,116,116,116,116,116,116,116,116, 2, 2, 2, 2, 2, 2, 2,
+ 2,116,128,128,128,128,128,128,128,128,128,128,128, 2,128,128,
+ 2, 2, 2, 2, 2,128,128,128,128,128, 66, 66, 66, 66, 66, 66,
+ 66, 66, 66, 66, 66, 66, 2, 2, 2, 66, 72, 72, 72, 72, 72, 72,
+ 72, 72, 72, 72, 2, 2, 2, 2, 2, 72, 98, 98, 98, 98, 98, 98,
+ 98, 98, 97, 97, 97, 97, 97, 97, 97, 97, 2, 2, 2, 2, 97, 97,
+ 97, 97, 2, 2, 97, 97, 97, 97, 97, 97, 57, 57, 57, 57, 2, 57,
+ 57, 2, 2, 2, 2, 2, 57, 57, 57, 57, 57, 57, 57, 57, 2, 57,
+ 57, 57, 2, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
+ 57, 57, 57, 57, 57, 57, 57, 57, 2, 2, 57, 57, 57, 2, 2, 2,
+ 2, 57, 57, 2, 2, 2, 2, 2, 2, 2, 88, 88, 88, 88, 88, 88,
+ 88, 88,117,117,117,117,117,117,117,117,112,112,112,112,112,112,
+ 112,112,112,112,112,112,112,112,112, 2, 2, 2, 2,112,112,112,
+ 112,112, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
+ 2, 2, 2, 78, 78, 78, 78, 78, 78, 78, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 2, 2, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 2, 2, 2, 2, 2,122,122,122,122,122,122,
+ 122,122,122,122, 2, 2, 2, 2, 2, 2, 2,122,122,122,122, 2,
+ 2, 2, 2,122,122,122,122,122,122,122, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 2, 2, 2, 2, 2, 2, 2,130,130,130,130,130,130,
+ 130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2,130,130,130,130,
+ 130,130,144,144,144,144,144,144,144,144,144,144, 2, 2, 2, 2,
+ 2, 2,156,156,156,156,156,156,156,156,156,156, 2,156,156,156,
+ 2, 2,156,156, 2, 2, 2, 2, 2, 2,147,147,147,147,147,147,
+ 147,147,148,148,148,148,148,148,148,148,148,148, 2, 2, 2, 2,
+ 2, 2,158,158,158,158,158,158,158,158,158,158, 2, 2, 2, 2,
+ 2, 2,153,153,153,153,153,153,153,153,153,153,153,153, 2, 2,
+ 2, 2,149,149,149,149,149,149,149,149,149,149,149,149,149,149,
+ 149, 2, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 2, 2, 2, 2, 94, 94, 94, 94, 94, 94, 2, 2, 2, 2, 2, 2,
+ 2, 94, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 85, 2, 2,101,101,101,101,101,101,
+ 101,101,101, 2, 2, 2, 2, 2, 2, 2,101,101, 2, 2, 2, 2,
+ 2, 2, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 2,
+ 96, 96,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+ 111, 2,100,100,100,100,100,100,100,100, 2, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 2, 2, 2,108,108,108,108,108,108,
+ 108,108,108,108, 2,108,108,108,108,108,108,108,108,108,108,108,
+ 108, 2,129,129,129,129,129,129,129, 2,129, 2,129,129,129,129,
+ 2,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
+ 2,129,129,129, 2, 2, 2, 2, 2, 2,109,109,109,109,109,109,
+ 109,109,109,109,109, 2, 2, 2, 2, 2,109,109, 2, 2, 2, 2,
+ 2, 2,107,107,107,107, 2,107,107,107,107,107,107,107,107, 2,
+ 2,107,107, 2, 2,107,107,107,107,107,107,107,107,107,107,107,
+ 107,107,107, 2,107,107,107,107,107,107,107, 2,107,107, 2,107,
+ 107,107,107,107, 2, 1,107,107,107,107,107, 2, 2,107,107,107,
+ 2, 2,107, 2, 2, 2, 2, 2, 2,107, 2, 2, 2, 2, 2,107,
+ 107,107,107,107,107,107, 2, 2,107,107,107,107,107,107,107, 2,
+ 2, 2,137,137,137,137,137,137,137,137,137,137,137,137, 2,137,
+ 137,137,137,137, 2, 2, 2, 2, 2, 2,124,124,124,124,124,124,
+ 124,124,124,124, 2, 2, 2, 2, 2, 2,123,123,123,123,123,123,
+ 123,123,123,123,123,123,123,123, 2, 2,114,114,114,114,114,114,
+ 114,114,114,114,114,114,114, 2, 2, 2,114,114, 2, 2, 2, 2,
+ 2, 2, 32, 32, 32, 32, 32, 2, 2, 2,102,102,102,102,102,102,
+ 102,102,102,102, 2, 2, 2, 2, 2, 2,126,126,126,126,126,126,
+ 126,126,126,126,126, 2, 2,126,126,126,126,126,126,126, 2, 2,
+ 2, 2,126,126,126,126,126,126,126, 2,142,142,142,142,142,142,
+ 142,142,142,142,142,142, 2, 2, 2, 2,125,125,125,125,125,125,
+ 125,125,125,125,125, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2,125,154,154,154,154,154,154,154, 2, 2,154, 2, 2,154,154,
+ 154,154,154,154,154,154, 2,154,154, 2,154,154,154,154,154,154,
+ 154,154,154,154,154,154,154,154, 2,154,154, 2, 2,154,154,154,
+ 154,154,154,154, 2, 2, 2, 2, 2, 2,150,150,150,150,150,150,
+ 150,150, 2, 2,150,150,150,150,150,150,150,150,150,150,150, 2,
+ 2, 2,141,141,141,141,141,141,141,141,140,140,140,140,140,140,
+ 140,140,140,140,140, 2, 2, 2, 2, 2,121,121,121,121,121,121,
+ 121,121,121, 2, 2, 2, 2, 2, 2, 2,133,133,133,133,133,133,
+ 133,133,133, 2,133,133,133,133,133,133,133,133,133,133,133,133,
+ 133, 2,133,133,133,133,133,133, 2, 2,133,133,133,133,133, 2,
+ 2, 2,134,134,134,134,134,134,134,134, 2, 2,134,134,134,134,
+ 134,134, 2,134,134,134,134,134,134,134,134,134,134,134,134,134,
+ 134, 2,138,138,138,138,138,138,138, 2,138,138, 2,138,138,138,
+ 138,138,138,138,138,138,138,138,138,138, 2, 2,138, 2,138,138,
+ 2,138,138,138, 2, 2, 2, 2, 2, 2,143,143,143,143,143,143,
+ 2,143,143, 2,143,143,143,143,143,143,143,143,143,143,143,143,
+ 143,143,143,143,143,143,143,143,143, 2,143,143, 2,143,143,143,
+ 143,143,143, 2, 2, 2, 2, 2, 2, 2,143,143, 2, 2, 2, 2,
+ 2, 2,145,145,145,145,145,145,145,145,145, 2, 2, 2, 2, 2,
+ 2, 2, 86, 2, 2, 2, 2, 2, 2, 2, 22, 22, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 22, 63, 63, 63, 63, 63, 63,
+ 63, 63, 63, 63, 2, 2, 2, 2, 2, 2, 63, 63, 63, 63, 63, 63,
+ 63, 2, 63, 63, 63, 63, 63, 2, 2, 2, 63, 63, 63, 63, 2, 2,
+ 2, 2,157,157,157,157,157,157,157,157,157,157,157, 2, 2, 2,
+ 2, 2, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 80, 2, 80, 2, 2, 2, 2, 2, 2, 2,127,127,127,127,127,127,
+ 127,127,127,127,127,127,127,127,127, 2, 79, 2, 2, 2, 2, 2,
+ 2, 2,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 115, 2,115,115, 2, 2, 2, 2,115,115,159,159,159,159,159,159,
+ 159,159,159,159,159,159,159,159,159, 2,159,159, 2, 2, 2, 2,
+ 2, 2,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
+ 2, 2,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
+ 2, 2,119,119, 2,119,119,119,119,119, 2, 2, 2, 2, 2,119,
+ 119,119,146,146,146,146,146,146,146,146,146,146,146, 2, 2, 2,
+ 2, 2, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 2, 2, 2,
+ 2, 99, 2, 2, 2, 2, 2, 2, 2, 99,136,139, 13, 13,155, 2,
+ 2, 2,136,136,136,136,136,136,136,136,155,155,155,155,155,155,
+ 155,155,155,155,155,155,155,155, 2, 2,136, 2, 2, 2, 2, 2,
+ 2, 2, 17, 17, 17, 17, 2, 17, 17, 17, 17, 17, 17, 17, 2, 17,
+ 17, 2, 17, 15, 15, 15, 15, 15, 15, 15, 17, 17, 17, 2, 2, 2,
+ 2, 2, 15, 15, 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, 17, 17,
+ 17, 17,139,139,139,139,139,139,139,139,139,139,139,139, 2, 2,
+ 2, 2,105,105,105,105,105,105,105,105,105,105,105, 2, 2, 2,
+ 2, 2,105,105,105,105,105, 2, 2, 2,105, 2, 2, 2, 2, 2,
+ 2, 2,105,105, 2, 2,105,105,105,105, 1, 1, 1, 1, 1, 1,
+ 2, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1,
+ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
+ 0, 0, 2, 2, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 2,
+ 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0,
+ 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
+ 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 0, 0, 0, 0,
+ 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,131,131,131,131,131,131,
+ 131,131,131,131,131,131, 2, 2, 2, 2, 2, 2, 2,131,131,131,
+ 131,131, 2,131,131,131,131,131,131,131, 56, 56, 56, 56, 56, 56,
+ 56, 2, 56, 2, 2, 56, 56, 56, 56, 56, 56, 56, 2, 56, 56, 2,
+ 56, 56, 56, 56, 56, 2, 2, 2, 2, 2,151,151,151,151,151,151,
+ 151,151,151,151,151,151,151, 2, 2, 2,151,151,151,151,151,151,
+ 2, 2,151,151, 2, 2, 2, 2,151,151,160,160,160,160,160,160,
+ 160,160,160,160,160,160,160,160,160, 2,152,152,152,152,152,152,
+ 152,152,152,152, 2, 2, 2, 2, 2,152, 30, 30, 30, 30, 2, 30,
+ 30, 2,113,113,113,113,113,113,113,113,113,113,113,113,113, 2,
+ 2,113,113,113,113,113,113,113,113, 2,132,132,132,132,132,132,
+ 132,132,132,132,132,132, 2, 2, 2, 2,132,132, 2, 2, 2, 2,
+ 132,132, 3, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 2, 3, 2,
+ 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3,
+ 3, 3, 2, 3, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2,
+ 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 2, 3,
+ 2, 3, 2, 3, 3, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 3, 3, 3, 2, 3,
+ 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 15, 0, 0, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 13, 2, 2, 2, 2, 2,
+ 2, 2, 13, 13, 13, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2,
+ 2, 2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9, 9, 10,
9, 11, 12, 13, 9, 9, 9, 14, 9, 9, 15, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
@@ -6424,104 +5046,376 @@ _hb_ucd_u8[13344] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4,
};
static const uint16_t
-_hb_ucd_u16[4848] =
+_hb_ucd_u16[9200] =
{
0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 10, 11, 12,
13, 13, 13, 14, 15, 13, 13, 16, 17, 18, 19, 20, 21, 22, 13, 23,
13, 13, 13, 24, 25, 11, 11, 11, 11, 26, 11, 27, 28, 29, 30, 31,
32, 32, 32, 32, 32, 32, 32, 33, 34, 35, 36, 11, 37, 38, 13, 39,
9, 9, 9, 11, 11, 11, 13, 13, 40, 13, 13, 13, 41, 13, 13, 13,
- 13, 13, 13, 35, 9, 42, 11, 11, 43, 44, 32, 45, 46, 47, 47, 48,
- 49, 50, 47, 47, 51, 32, 52, 53, 47, 47, 47, 47, 47, 54, 55, 56,
- 57, 58, 47, 32, 59, 47, 47, 47, 47, 47, 60, 53, 61, 47, 62, 63,
- 47, 64, 65, 66, 47, 67, 47, 47, 47, 47, 47, 47, 47, 68, 69, 32,
- 70, 47, 47, 71, 72, 73, 74, 75, 76, 47, 47, 77, 78, 79, 80, 81,
- 82, 47, 47, 83, 84, 85, 86, 87, 82, 47, 47, 77, 88, 47, 80, 89,
- 90, 47, 47, 91, 92, 93, 80, 94, 95, 47, 47, 96, 97, 98, 99, 100,
- 101, 47, 47, 102, 103, 104, 80, 105, 106, 47, 47, 91, 107, 108, 80, 109,
- 110, 47, 47, 111, 112, 113, 80, 114, 90, 47, 47, 47, 115, 116, 99, 117,
- 47, 47, 47, 118, 119, 120, 66, 66, 47, 47, 47, 121, 122, 123, 47, 47,
- 124, 125, 126, 127, 47, 47, 47, 128, 129, 32, 32, 130, 131, 132, 66, 66,
- 47, 47, 133, 134, 120, 135, 136, 137, 138, 139, 9, 9, 9, 11, 11, 140,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 141, 142, 143,
- 47, 144, 9, 9, 9, 9, 9, 145, 146, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 147, 47, 148, 149, 47, 47, 47, 47, 150, 151,
- 47, 152, 47, 153, 47, 152, 47, 152, 47, 47, 47, 154, 155, 156, 157, 143,
- 158, 157, 47, 47, 159, 47, 47, 47, 160, 47, 161, 47, 47, 47, 47, 47,
- 47, 47, 162, 163, 164, 47, 47, 47, 47, 47, 47, 47, 47, 165, 144, 144,
- 47, 166, 47, 47, 47, 167, 168, 169, 157, 157, 170, 171, 32, 32, 32, 32,
- 172, 47, 47, 173, 174, 120, 175, 176, 177, 47, 178, 61, 47, 47, 179, 180,
- 47, 47, 181, 182, 183, 61, 47, 184, 11, 9, 9, 9, 66, 185, 186, 187,
- 11, 11, 188, 27, 27, 27, 189, 190, 11, 191, 27, 27, 32, 32, 32, 32,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 192, 13, 13, 13, 13, 13, 13,
- 193, 193, 193, 193, 193, 194, 193, 11, 195, 195, 195, 196, 197, 198, 198, 197,
- 199, 200, 201, 202, 203, 204, 205, 206, 207, 27, 208, 208, 208, 209, 210, 32,
- 211, 212, 213, 214, 215, 143, 216, 216, 217, 218, 219, 144, 220, 221, 144, 222,
- 223, 223, 223, 223, 223, 223, 223, 223, 224, 144, 225, 144, 144, 144, 144, 226,
- 144, 227, 223, 228, 144, 229, 230, 144, 144, 144, 144, 144, 144, 144, 143, 143,
- 143, 231, 144, 144, 144, 144, 232, 143, 144, 144, 144, 144, 144, 144, 144, 144,
- 144, 144, 144, 233, 234, 144, 144, 235, 144, 144, 144, 144, 144, 144, 236, 144,
- 144, 144, 144, 144, 144, 144, 237, 238, 143, 239, 144, 144, 240, 223, 241, 223,
- 242, 243, 223, 223, 223, 244, 223, 245, 144, 144, 144, 223, 246, 144, 144, 144,
- 9, 9, 9, 11, 11, 11, 247, 248, 13, 13, 13, 13, 13, 13, 249, 250,
- 11, 11, 11, 47, 47, 47, 251, 252, 47, 47, 47, 47, 47, 47, 32, 32,
- 253, 254, 255, 256, 257, 258, 66, 66, 259, 260, 261, 262, 263, 47, 47, 47,
- 47, 264, 146, 47, 47, 47, 47, 265, 47, 266, 47, 47, 144, 144, 144, 47,
- 144, 144, 267, 144, 268, 269, 144, 144, 267, 144, 144, 269, 144, 144, 144, 144,
- 47, 47, 47, 47, 144, 144, 144, 144, 47, 270, 47, 47, 47, 47, 47, 47,
- 47, 144, 144, 144, 144, 47, 47, 184, 271, 47, 61, 47, 13, 13, 272, 273,
- 13, 274, 47, 47, 47, 47, 275, 276, 31, 277, 278, 279, 13, 13, 13, 280,
- 281, 282, 283, 284, 285, 11, 11, 286, 287, 47, 288, 289, 47, 47, 47, 290,
- 291, 47, 47, 292, 293, 157, 32, 294, 61, 47, 295, 47, 296, 297, 47, 47,
- 70, 47, 47, 298, 299, 300, 301, 61, 47, 47, 302, 303, 304, 305, 47, 306,
- 47, 47, 47, 307, 58, 308, 309, 310, 47, 47, 47, 11, 11, 311, 312, 11,
- 11, 11, 11, 11, 47, 47, 313, 157, 314, 314, 314, 314, 314, 314, 314, 314,
- 315, 315, 315, 315, 315, 315, 315, 315, 11, 316, 317, 47, 47, 47, 47, 47,
- 47, 47, 47, 318, 31, 319, 47, 47, 47, 47, 47, 320, 321, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 322, 32, 323, 32, 324, 325, 326, 327, 47,
- 47, 47, 47, 47, 47, 47, 47, 328, 329, 2, 3, 4, 5, 330, 331, 332,
- 47, 333, 47, 47, 47, 47, 334, 335, 336, 143, 143, 337, 216, 216, 216, 338,
- 339, 144, 144, 144, 144, 144, 144, 340, 341, 341, 341, 341, 341, 341, 341, 341,
- 47, 47, 47, 47, 47, 47, 342, 143, 47, 47, 343, 47, 344, 47, 47, 60,
- 47, 345, 47, 47, 47, 346, 216, 216, 9, 9, 145, 11, 11, 47, 47, 47,
- 47, 47, 157, 9, 9, 145, 11, 11, 47, 47, 47, 47, 47, 47, 345, 66,
- 47, 47, 47, 47, 47, 347, 47, 348, 47, 47, 349, 143, 143, 143, 47, 350,
- 47, 351, 47, 345, 66, 66, 66, 66, 47, 47, 47, 352, 143, 143, 143, 143,
- 353, 47, 47, 354, 143, 66, 47, 355, 47, 356, 143, 143, 357, 47, 358, 66,
- 47, 47, 47, 359, 47, 360, 47, 360, 47, 359, 142, 143, 143, 143, 143, 143,
- 9, 9, 9, 9, 11, 11, 11, 361, 47, 47, 362, 157, 157, 157, 157, 157,
- 143, 143, 143, 143, 143, 143, 143, 143, 47, 47, 363, 47, 47, 47, 47, 47,
- 47, 356, 364, 47, 60, 365, 66, 66, 47, 47, 47, 47, 366, 143, 47, 47,
- 367, 47, 47, 354, 368, 369, 370, 371, 177, 47, 47, 372, 373, 47, 47, 157,
- 95, 47, 374, 375, 376, 47, 47, 377, 177, 47, 47, 378, 379, 380, 381, 143,
- 47, 47, 382, 383, 32, 32, 32, 32, 47, 47, 359, 47, 47, 384, 169, 157,
- 90, 47, 47, 111, 385, 386, 387, 32, 47, 47, 47, 388, 389, 390, 47, 47,
- 47, 47, 47, 391, 392, 157, 157, 157, 47, 47, 393, 394, 395, 396, 32, 32,
- 47, 47, 47, 397, 398, 157, 66, 66, 47, 47, 399, 400, 157, 157, 157, 157,
- 47, 141, 401, 402, 144, 144, 144, 144, 47, 47, 382, 403, 66, 66, 66, 66,
- 9, 9, 9, 9, 11, 11, 126, 404, 47, 47, 47, 405, 406, 157, 157, 157,
- 47, 47, 47, 47, 47, 407, 408, 409, 410, 47, 47, 411, 412, 413, 47, 47,
- 414, 415, 66, 66, 47, 47, 47, 47, 47, 47, 393, 416, 417, 126, 143, 418,
- 47, 152, 419, 420, 32, 32, 32, 32, 47, 47, 47, 353, 421, 157, 47, 47,
- 422, 423, 157, 157, 157, 157, 157, 157, 47, 47, 47, 47, 47, 47, 47, 424,
- 47, 47, 47, 47, 143, 425, 426, 427, 216, 216, 216, 216, 216, 216, 216, 66,
- 47, 47, 47, 205, 205, 205, 205, 205, 47, 47, 47, 47, 47, 47, 300, 66,
- 47, 47, 47, 47, 47, 47, 47, 428, 47, 47, 47, 429, 430, 431, 432, 47,
- 9, 9, 9, 9, 9, 9, 11, 11, 143, 433, 66, 66, 66, 66, 66, 66,
- 47, 47, 47, 47, 384, 434, 409, 409, 435, 436, 27, 27, 27, 27, 437, 409,
- 47, 438, 205, 205, 205, 205, 205, 205, 144, 144, 144, 144, 144, 144, 439, 440,
- 441, 144, 442, 144, 144, 144, 144, 144, 144, 144, 144, 144, 443, 144, 144, 144,
- 9, 444, 11, 445, 446, 11, 193, 9, 447, 448, 9, 449, 11, 9, 444, 11,
- 445, 446, 11, 193, 9, 447, 448, 9, 449, 11, 9, 444, 11, 445, 446, 11,
- 193, 9, 447, 448, 9, 449, 11, 9, 444, 11, 193, 9, 450, 451, 452, 453,
- 11, 454, 9, 455, 456, 457, 458, 11, 459, 9, 460, 11, 461, 157, 157, 157,
- 32, 32, 32, 462, 32, 32, 463, 464, 465, 466, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 47, 47, 47, 467, 468, 144, 144, 144,
- 47, 47, 47, 47, 47, 47, 469, 470, 47, 47, 47, 47, 349, 32, 32, 32,
- 9, 9, 447, 11, 471, 300, 66, 66, 143, 143, 472, 473, 143, 143, 143, 143,
- 143, 143, 474, 143, 143, 143, 143, 143, 47, 47, 47, 47, 47, 47, 47, 223,
- 475, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 476,
- 144, 144, 144, 144, 144, 144, 144, 157, 205, 205, 205, 205, 205, 205, 205, 205,
+ 13, 13, 13, 42, 9, 43, 11, 11, 44, 45, 32, 46, 47, 48, 49, 50,
+ 51, 52, 48, 48, 53, 32, 54, 55, 48, 48, 48, 48, 48, 56, 57, 58,
+ 59, 60, 48, 32, 61, 48, 48, 48, 48, 48, 62, 63, 64, 48, 65, 66,
+ 48, 67, 68, 69, 48, 70, 71, 48, 72, 73, 48, 48, 74, 32, 75, 32,
+ 76, 48, 48, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 83, 84, 91, 92, 93, 94, 95, 96, 97, 84, 98, 99, 100, 88, 101,
+ 102, 83, 84, 103, 104, 105, 88, 106, 107, 108, 109, 110, 111, 112, 94, 113,
+ 114, 115, 84, 116, 117, 118, 88, 119, 120, 115, 84, 121, 122, 123, 88, 124,
+ 125, 115, 48, 126, 127, 128, 88, 129, 130, 131, 48, 132, 133, 134, 94, 135,
+ 136, 48, 48, 137, 138, 139, 140, 140, 141, 48, 142, 143, 144, 145, 140, 140,
+ 146, 147, 148, 149, 150, 48, 151, 152, 153, 154, 32, 155, 156, 157, 140, 140,
+ 48, 48, 158, 159, 160, 161, 162, 163, 164, 165, 9, 9, 166, 11, 11, 167,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 168, 169, 48, 48,
+ 168, 48, 48, 170, 171, 172, 48, 48, 48, 171, 48, 48, 48, 173, 174, 175,
+ 48, 176, 9, 9, 9, 9, 9, 177, 178, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 179, 48, 180, 181, 48, 48, 48, 48, 182, 183,
+ 48, 184, 48, 185, 48, 186, 187, 188, 48, 48, 48, 189, 190, 191, 192, 193,
+ 194, 192, 48, 48, 195, 48, 48, 196, 197, 48, 198, 48, 48, 48, 48, 199,
+ 48, 200, 201, 202, 203, 48, 204, 205, 48, 48, 206, 48, 207, 208, 209, 209,
+ 48, 210, 48, 48, 48, 211, 212, 213, 192, 192, 214, 215, 216, 140, 140, 140,
+ 217, 48, 48, 218, 219, 160, 220, 221, 222, 48, 223, 64, 48, 48, 224, 225,
+ 48, 48, 226, 227, 228, 64, 48, 229, 230, 9, 9, 231, 232, 233, 234, 235,
+ 11, 11, 236, 27, 27, 27, 237, 238, 11, 239, 27, 27, 32, 32, 32, 32,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 240, 13, 13, 13, 13, 13, 13,
+ 241, 242, 241, 241, 242, 243, 241, 244, 245, 245, 245, 246, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 272, 273, 274, 275, 209, 276, 277, 209, 278,
+ 279, 279, 279, 279, 279, 279, 279, 279, 280, 209, 281, 209, 209, 209, 209, 282,
+ 209, 283, 279, 284, 209, 285, 286, 209, 209, 209, 287, 140, 288, 140, 271, 271,
+ 271, 289, 209, 209, 209, 209, 290, 271, 209, 209, 209, 209, 209, 209, 209, 209,
+ 209, 209, 209, 291, 292, 209, 209, 293, 209, 209, 209, 209, 209, 209, 294, 209,
+ 209, 209, 209, 209, 209, 209, 295, 296, 271, 297, 209, 209, 298, 279, 299, 279,
+ 300, 301, 279, 279, 279, 302, 279, 303, 209, 209, 209, 279, 304, 209, 209, 305,
+ 209, 306, 209, 209, 209, 209, 209, 209, 9, 9, 9, 11, 11, 11, 307, 308,
+ 13, 13, 13, 13, 13, 13, 309, 310, 11, 11, 311, 48, 48, 48, 312, 313,
+ 48, 314, 315, 315, 315, 315, 32, 32, 316, 317, 318, 319, 320, 321, 140, 140,
+ 209, 322, 209, 209, 209, 209, 209, 323, 209, 209, 209, 209, 209, 324, 140, 325,
+ 326, 327, 328, 329, 136, 48, 48, 48, 48, 330, 178, 48, 48, 48, 48, 331,
+ 332, 48, 48, 136, 48, 48, 48, 48, 200, 333, 48, 48, 209, 209, 323, 48,
+ 209, 334, 335, 209, 336, 337, 209, 209, 335, 209, 209, 337, 209, 209, 209, 209,
+ 48, 48, 48, 48, 209, 209, 209, 209, 48, 338, 48, 48, 48, 48, 48, 48,
+ 151, 209, 209, 209, 287, 48, 48, 229, 339, 48, 340, 140, 13, 13, 341, 342,
+ 13, 343, 48, 48, 48, 48, 344, 345, 31, 346, 347, 348, 13, 13, 13, 349,
+ 350, 351, 352, 353, 354, 355, 140, 356, 357, 48, 358, 359, 48, 48, 48, 360,
+ 361, 48, 48, 362, 363, 192, 32, 364, 64, 48, 365, 48, 366, 367, 48, 151,
+ 76, 48, 48, 368, 369, 370, 371, 372, 48, 48, 373, 374, 375, 376, 48, 377,
+ 48, 48, 48, 378, 379, 380, 381, 382, 383, 384, 315, 11, 11, 385, 386, 11,
+ 11, 11, 11, 11, 48, 48, 387, 192, 48, 48, 388, 48, 389, 48, 48, 206,
+ 390, 390, 390, 390, 390, 390, 390, 390, 391, 391, 391, 391, 391, 391, 391, 391,
+ 48, 48, 48, 48, 48, 48, 204, 48, 48, 48, 48, 48, 48, 207, 140, 140,
+ 392, 393, 394, 395, 396, 48, 48, 48, 48, 48, 48, 397, 398, 399, 48, 48,
+ 48, 48, 48, 400, 209, 48, 48, 48, 48, 401, 48, 48, 402, 140, 140, 403,
+ 32, 404, 32, 405, 406, 407, 408, 409, 48, 48, 48, 48, 48, 48, 48, 410,
+ 411, 2, 3, 4, 5, 412, 413, 414, 48, 415, 48, 200, 416, 417, 418, 419,
+ 420, 48, 172, 421, 204, 204, 140, 140, 48, 48, 48, 48, 48, 48, 48, 71,
+ 422, 271, 271, 423, 272, 272, 272, 424, 425, 426, 427, 140, 140, 209, 209, 428,
+ 140, 140, 140, 140, 140, 140, 140, 140, 48, 151, 48, 48, 48, 100, 429, 430,
+ 48, 48, 431, 48, 432, 48, 48, 433, 48, 434, 48, 48, 435, 436, 140, 140,
+ 9, 9, 437, 11, 11, 48, 48, 48, 48, 204, 192, 9, 9, 438, 11, 439,
+ 48, 48, 440, 48, 48, 48, 441, 442, 442, 443, 444, 445, 140, 140, 140, 140,
+ 48, 48, 48, 314, 48, 199, 440, 140, 446, 27, 27, 447, 140, 140, 140, 140,
+ 448, 48, 48, 449, 48, 450, 48, 451, 48, 200, 452, 140, 140, 140, 48, 453,
+ 48, 454, 48, 455, 140, 140, 140, 140, 48, 48, 48, 456, 271, 457, 271, 271,
+ 458, 459, 48, 460, 461, 462, 48, 463, 48, 464, 140, 140, 465, 48, 466, 467,
+ 48, 48, 48, 468, 48, 469, 48, 470, 48, 471, 472, 140, 140, 140, 140, 140,
+ 48, 48, 48, 48, 196, 140, 140, 140, 9, 9, 9, 473, 11, 11, 11, 474,
+ 48, 48, 475, 192, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 271, 476,
+ 48, 48, 477, 478, 140, 140, 140, 140, 48, 464, 479, 48, 62, 480, 140, 48,
+ 481, 140, 140, 48, 482, 140, 48, 314, 483, 48, 48, 484, 485, 457, 486, 487,
+ 222, 48, 48, 488, 489, 48, 196, 192, 490, 48, 491, 492, 493, 48, 48, 494,
+ 222, 48, 48, 495, 496, 497, 498, 499, 48, 97, 500, 501, 140, 140, 140, 140,
+ 502, 503, 504, 48, 48, 505, 506, 192, 507, 83, 84, 508, 509, 510, 511, 512,
+ 48, 48, 48, 513, 514, 515, 478, 140, 48, 48, 48, 516, 517, 192, 140, 140,
+ 48, 48, 518, 519, 520, 521, 140, 140, 48, 48, 48, 522, 523, 192, 524, 140,
+ 48, 48, 525, 526, 192, 140, 140, 140, 48, 173, 527, 528, 314, 140, 140, 140,
+ 48, 48, 500, 529, 140, 140, 140, 140, 140, 140, 9, 9, 11, 11, 148, 530,
+ 531, 532, 48, 533, 534, 192, 140, 140, 140, 140, 535, 48, 48, 536, 537, 140,
+ 538, 48, 48, 539, 540, 541, 48, 48, 542, 543, 544, 48, 48, 48, 48, 196,
+ 84, 48, 518, 545, 546, 148, 175, 547, 48, 548, 549, 550, 140, 140, 140, 140,
+ 551, 48, 48, 552, 553, 192, 554, 48, 555, 556, 192, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 48, 557, 140, 140, 140, 100, 271, 558, 559, 560,
+ 48, 207, 140, 140, 140, 140, 140, 140, 272, 272, 272, 272, 272, 272, 561, 562,
+ 48, 48, 48, 48, 388, 140, 140, 140, 140, 48, 48, 48, 48, 48, 48, 563,
+ 48, 48, 200, 564, 140, 140, 140, 140, 48, 48, 48, 48, 314, 140, 140, 140,
+ 48, 48, 48, 196, 48, 200, 370, 48, 48, 48, 48, 200, 192, 48, 204, 565,
+ 48, 48, 48, 566, 567, 568, 569, 570, 48, 140, 140, 140, 140, 140, 140, 140,
+ 140, 140, 140, 140, 9, 9, 11, 11, 271, 571, 140, 140, 140, 140, 140, 140,
+ 48, 48, 48, 48, 572, 573, 574, 574, 575, 576, 140, 140, 140, 140, 577, 578,
+ 48, 48, 48, 48, 48, 48, 48, 440, 48, 48, 48, 48, 48, 199, 140, 140,
+ 196, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 579,
+ 48, 48, 580, 140, 140, 580, 581, 48, 48, 48, 48, 48, 48, 48, 48, 206,
+ 48, 48, 48, 48, 48, 48, 71, 151, 196, 582, 583, 140, 140, 140, 140, 140,
+ 32, 32, 584, 32, 585, 209, 209, 209, 209, 209, 209, 209, 323, 140, 140, 140,
+ 209, 209, 209, 209, 209, 209, 209, 324, 209, 209, 586, 209, 209, 209, 587, 588,
+ 589, 209, 590, 209, 209, 209, 288, 140, 209, 209, 209, 209, 591, 140, 140, 140,
+ 140, 140, 140, 140, 140, 140, 271, 592, 209, 209, 209, 209, 209, 287, 271, 461,
+ 9, 593, 11, 594, 595, 596, 241, 9, 597, 598, 599, 600, 601, 9, 593, 11,
+ 602, 603, 11, 604, 605, 606, 607, 9, 608, 11, 9, 593, 11, 594, 595, 11,
+ 241, 9, 597, 607, 9, 608, 11, 9, 593, 11, 609, 9, 610, 611, 612, 613,
+ 11, 614, 9, 615, 616, 617, 618, 11, 619, 9, 620, 11, 621, 622, 622, 622,
+ 32, 32, 32, 623, 32, 32, 624, 625, 626, 627, 45, 140, 140, 140, 140, 140,
+ 628, 629, 140, 140, 140, 140, 140, 140, 630, 631, 632, 140, 140, 140, 140, 140,
+ 48, 48, 151, 633, 634, 140, 140, 140, 140, 48, 635, 140, 48, 48, 636, 637,
+ 140, 140, 140, 140, 140, 140, 638, 200, 48, 48, 48, 48, 639, 585, 140, 140,
+ 9, 9, 597, 11, 640, 370, 140, 140, 140, 140, 140, 140, 140, 140, 140, 498,
+ 271, 271, 641, 642, 140, 140, 140, 140, 498, 271, 643, 644, 140, 140, 140, 140,
+ 645, 48, 646, 647, 648, 649, 650, 651, 652, 206, 653, 206, 140, 140, 140, 654,
+ 209, 209, 325, 209, 209, 209, 209, 209, 209, 323, 334, 655, 655, 655, 209, 324,
+ 656, 209, 209, 209, 209, 209, 209, 209, 209, 209, 657, 140, 140, 140, 658, 209,
+ 659, 209, 209, 325, 660, 661, 324, 140, 209, 209, 209, 209, 209, 209, 209, 662,
+ 209, 209, 209, 209, 209, 663, 426, 426, 209, 209, 209, 209, 209, 209, 209, 323,
+ 209, 209, 209, 209, 209, 660, 325, 427, 325, 209, 209, 209, 664, 176, 209, 209,
+ 664, 209, 657, 661, 140, 140, 140, 140, 209, 209, 209, 209, 209, 323, 657, 665,
+ 287, 209, 426, 288, 324, 176, 664, 287, 209, 666, 209, 209, 288, 140, 140, 192,
+ 48, 48, 48, 48, 48, 48, 140, 140, 48, 48, 48, 196, 48, 48, 48, 48,
+ 48, 204, 48, 48, 48, 48, 48, 48, 48, 48, 478, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 100, 140, 48, 204, 140, 140, 140, 140, 140, 140,
+ 48, 48, 48, 48, 71, 140, 140, 140, 667, 140, 668, 668, 668, 668, 668, 668,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 140,
+ 391, 391, 391, 391, 391, 391, 391, 669, 391, 391, 391, 391, 391, 391, 391, 670,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 3, 1, 2, 2, 3,
+ 0, 0, 0, 0, 0, 4, 0, 4, 2, 2, 5, 2, 2, 2, 5, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 6, 0, 0, 0, 0, 7, 8, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 11,
+ 12, 13, 14, 14, 15, 14, 14, 14, 14, 14, 14, 14, 16, 17, 14, 14,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 19, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 20, 21, 21, 21, 22, 20, 21, 21, 21, 21,
+ 21, 23, 24, 25, 25, 25, 25, 25, 25, 26, 25, 25, 25, 27, 28, 26,
+ 29, 30, 31, 32, 31, 31, 31, 31, 33, 34, 35, 31, 31, 31, 36, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 29, 31, 31, 31, 31,
+ 37, 38, 37, 37, 37, 37, 37, 37, 37, 39, 31, 31, 31, 31, 31, 31,
+ 40, 40, 40, 40, 40, 40, 41, 26, 42, 42, 42, 42, 42, 42, 42, 43,
+ 44, 44, 44, 44, 44, 45, 44, 46, 47, 47, 47, 48, 37, 49, 31, 31,
+ 31, 50, 51, 31, 31, 31, 31, 31, 31, 31, 31, 31, 52, 31, 31, 31,
+ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 54, 53, 55, 53, 53, 53,
+ 56, 57, 58, 59, 59, 60, 61, 62, 57, 63, 64, 65, 66, 59, 59, 67,
+ 68, 69, 70, 71, 71, 72, 73, 74, 69, 75, 76, 77, 78, 71, 79, 26,
+ 80, 81, 82, 83, 83, 84, 85, 86, 81, 87, 88, 26, 89, 83, 90, 91,
+ 92, 93, 94, 95, 95, 96, 97, 98, 93, 99, 100, 101, 102, 95, 95, 26,
+ 103, 104, 105, 106, 107, 104, 108, 109, 104, 105, 110, 26, 111, 108, 108, 112,
+ 113, 114, 115, 113, 113, 115, 113, 116, 114, 117, 118, 119, 120, 113, 121, 113,
+ 122, 123, 124, 122, 122, 124, 125, 126, 123, 127, 128, 128, 129, 122, 130, 26,
+ 131, 132, 133, 131, 131, 131, 131, 131, 132, 133, 134, 131, 135, 131, 131, 131,
+ 136, 137, 138, 139, 137, 137, 140, 141, 138, 142, 143, 137, 144, 137, 145, 26,
+ 146, 147, 147, 147, 147, 147, 147, 148, 147, 147, 147, 149, 26, 26, 26, 26,
+ 150, 151, 152, 152, 153, 152, 152, 154, 155, 154, 152, 156, 26, 26, 26, 26,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, 157, 157, 157, 159, 158, 157,
+ 157, 157, 157, 158, 157, 157, 157, 160, 157, 160, 161, 162, 26, 26, 26, 26,
+ 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
+ 163, 163, 163, 163, 164, 164, 164, 164, 165, 166, 164, 164, 164, 164, 164, 167,
+ 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
+ 169, 169, 169, 169, 169, 169, 169, 169, 169, 170, 171, 170, 169, 169, 169, 169,
+ 169, 170, 169, 169, 169, 169, 170, 171, 170, 169, 171, 169, 169, 169, 169, 169,
+ 169, 169, 170, 169, 169, 169, 169, 169, 169, 169, 169, 172, 169, 169, 169, 173,
+ 169, 169, 169, 174, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 176, 176,
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
+ 178, 178, 178, 179, 180, 180, 180, 180, 180, 180, 180, 180, 180, 181, 180, 182,
+ 183, 183, 184, 185, 186, 186, 187, 26, 188, 188, 189, 26, 190, 191, 192, 26,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 194, 193, 195, 193, 195,
+ 196, 197, 197, 198, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 199,
+ 197, 197, 197, 197, 197, 200, 177, 177, 177, 177, 177, 177, 177, 177, 201, 26,
+ 202, 202, 202, 203, 202, 204, 202, 204, 205, 202, 206, 206, 206, 207, 208, 26,
+ 209, 209, 209, 209, 209, 210, 209, 209, 209, 211, 209, 212, 193, 193, 193, 193,
+ 213, 213, 213, 214, 215, 215, 215, 215, 215, 215, 215, 216, 215, 215, 215, 217,
+ 215, 218, 215, 218, 215, 219, 9, 9, 9, 220, 26, 26, 26, 26, 26, 26,
+ 221, 221, 221, 221, 221, 221, 221, 221, 221, 222, 221, 221, 221, 221, 221, 223,
+ 224, 224, 224, 224, 224, 224, 224, 224, 225, 225, 225, 225, 225, 225, 226, 227,
+ 228, 228, 228, 228, 228, 228, 228, 229, 228, 230, 231, 231, 231, 231, 231, 231,
+ 18, 232, 164, 164, 164, 164, 164, 233, 224, 26, 234, 9, 235, 236, 237, 238,
+ 2, 2, 2, 2, 239, 240, 2, 2, 2, 2, 2, 241, 242, 243, 2, 244,
+ 2, 2, 2, 2, 2, 2, 2, 245, 9, 9, 9, 9, 9, 9, 9, 9,
+ 14, 14, 246, 246, 14, 14, 14, 14, 246, 246, 14, 247, 14, 14, 14, 246,
+ 14, 14, 14, 14, 14, 14, 248, 14, 248, 14, 249, 250, 14, 14, 251, 252,
+ 0, 253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 0, 255, 256,
+ 0, 257, 2, 258, 0, 0, 0, 0, 259, 26, 9, 9, 9, 9, 260, 26,
+ 0, 0, 0, 0, 261, 262, 4, 0, 0, 263, 0, 0, 2, 2, 2, 2,
+ 2, 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 257, 26, 26, 26, 0, 265, 26, 26, 0, 0, 0, 0,
+ 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 267, 0,
+ 0, 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 2, 2, 2, 2,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 270, 271,
+ 164, 164, 164, 164, 165, 166, 272, 272, 272, 272, 272, 272, 272, 273, 274, 273,
+ 169, 169, 171, 26, 171, 171, 171, 171, 171, 171, 171, 171, 18, 18, 18, 18,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 275, 26, 26, 26, 26,
+ 276, 276, 276, 277, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 278, 26,
+ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276,
+ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 279, 26, 26, 26, 0, 280,
+ 281, 0, 0, 0, 282, 283, 0, 284, 285, 286, 286, 286, 286, 286, 286, 286,
+ 286, 286, 287, 288, 289, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 291,
+ 292, 293, 293, 293, 293, 293, 294, 168, 168, 168, 168, 168, 168, 168, 168, 168,
+ 168, 295, 0, 0, 293, 293, 293, 293, 0, 0, 0, 0, 280, 26, 290, 290,
+ 168, 168, 168, 295, 0, 0, 0, 0, 0, 0, 0, 0, 168, 168, 168, 296,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 290, 290, 290, 290, 290, 297,
+ 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 0, 0, 0, 0, 0,
+ 276, 276, 276, 276, 276, 276, 276, 276, 0, 0, 0, 0, 0, 0, 0, 0,
+ 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 299, 298, 298, 298, 298, 298, 298, 300, 26, 301, 301, 301, 301, 301, 301,
+ 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
+ 302, 302, 302, 302, 302, 303, 26, 26, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 26,
+ 0, 0, 0, 0, 305, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 306, 2, 2, 2, 2, 2, 2, 2, 307, 308, 309, 26, 26, 310, 2,
+ 311, 311, 311, 311, 311, 312, 0, 313, 314, 314, 314, 314, 314, 314, 314, 26,
+ 315, 315, 315, 315, 315, 315, 315, 315, 316, 317, 315, 318, 53, 53, 53, 53,
+ 319, 319, 319, 319, 319, 320, 321, 321, 321, 321, 322, 323, 168, 168, 168, 324,
+ 325, 325, 325, 325, 325, 325, 325, 325, 325, 326, 325, 327, 163, 163, 163, 328,
+ 329, 329, 329, 329, 329, 329, 330, 26, 329, 331, 329, 332, 163, 163, 163, 163,
+ 333, 333, 333, 333, 333, 333, 333, 333, 334, 26, 26, 335, 336, 336, 337, 26,
+ 338, 338, 338, 26, 171, 171, 2, 2, 2, 2, 2, 339, 340, 341, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 336, 336, 336, 336, 336, 342, 336, 343,
+ 168, 168, 168, 168, 344, 26, 168, 168, 295, 345, 168, 168, 168, 168, 168, 344,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 279, 276, 276,
+ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 346, 26, 26, 26, 26,
+ 347, 26, 348, 349, 25, 25, 350, 351, 352, 25, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 353, 26, 354, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 355, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 356, 31, 31, 31, 31, 31, 31, 357, 26, 26, 26, 26, 31, 31,
+ 9, 9, 0, 313, 9, 358, 0, 0, 0, 0, 359, 0, 257, 280, 360, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 361,
+ 362, 0, 0, 0, 1, 2, 2, 3, 1, 2, 2, 3, 363, 290, 289, 290,
+ 290, 290, 290, 364, 168, 168, 168, 295, 365, 365, 365, 366, 257, 257, 26, 367,
+ 368, 369, 368, 368, 370, 368, 368, 371, 368, 372, 368, 372, 26, 26, 26, 26,
+ 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, 373,
+ 374, 0, 0, 0, 0, 0, 375, 0, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 252, 0, 376, 377, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 378,
+ 379, 379, 379, 380, 381, 381, 381, 381, 381, 381, 382, 26, 383, 0, 0, 280,
+ 384, 384, 384, 384, 385, 386, 387, 387, 387, 388, 389, 389, 389, 389, 389, 390,
+ 391, 391, 391, 392, 393, 393, 393, 393, 394, 393, 395, 26, 26, 26, 26, 26,
+ 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, 397, 397, 397, 397, 397, 397,
+ 398, 398, 398, 399, 398, 400, 401, 401, 401, 401, 402, 401, 401, 401, 401, 402,
+ 403, 403, 403, 403, 403, 26, 404, 404, 404, 404, 404, 404, 405, 406, 407, 408,
+ 407, 408, 409, 407, 410, 407, 410, 411, 26, 26, 26, 26, 26, 26, 26, 26,
+ 412, 412, 412, 412, 412, 412, 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
+ 412, 412, 412, 412, 412, 412, 413, 26, 412, 412, 414, 26, 412, 26, 26, 26,
+ 415, 2, 2, 2, 2, 2, 416, 307, 26, 26, 26, 26, 26, 26, 26, 26,
+ 417, 418, 419, 419, 419, 419, 420, 421, 422, 422, 423, 422, 424, 424, 424, 424,
+ 425, 425, 425, 426, 427, 425, 26, 26, 26, 26, 26, 26, 428, 428, 429, 430,
+ 431, 431, 431, 432, 433, 433, 433, 434, 26, 26, 26, 26, 26, 26, 26, 26,
+ 435, 435, 435, 435, 436, 436, 436, 437, 436, 436, 438, 436, 436, 436, 436, 436,
+ 439, 440, 441, 442, 443, 443, 444, 445, 443, 446, 443, 446, 447, 447, 447, 447,
+ 448, 448, 448, 448, 26, 26, 26, 26, 449, 449, 449, 449, 450, 451, 450, 26,
+ 452, 452, 452, 452, 452, 452, 453, 454, 455, 455, 456, 455, 457, 457, 458, 457,
+ 459, 459, 460, 461, 26, 462, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 463, 463, 463, 463, 463, 463, 463, 463, 463, 464, 26, 26, 26, 26, 26, 26,
+ 465, 465, 465, 465, 465, 465, 466, 26, 465, 465, 465, 465, 465, 465, 466, 467,
+ 468, 468, 468, 468, 468, 26, 468, 469, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 31, 31, 31, 50,
+ 470, 470, 470, 470, 470, 471, 472, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 473, 473, 473, 473, 473, 26, 474, 474, 474, 474, 474, 475, 26, 26, 476, 476,
+ 476, 477, 26, 26, 26, 26, 478, 478, 478, 479, 26, 26, 480, 480, 481, 26,
+ 482, 482, 482, 482, 482, 482, 482, 482, 482, 483, 484, 482, 482, 482, 483, 485,
+ 486, 486, 486, 486, 486, 486, 486, 486, 487, 488, 489, 489, 489, 490, 489, 491,
+ 492, 492, 492, 492, 492, 492, 493, 492, 492, 26, 494, 494, 494, 494, 495, 26,
+ 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 497, 137, 498, 26,
+ 499, 499, 500, 499, 499, 499, 499, 501, 26, 26, 26, 26, 26, 26, 26, 26,
+ 502, 503, 504, 505, 504, 506, 507, 507, 507, 507, 507, 507, 507, 508, 507, 509,
+ 510, 511, 512, 513, 513, 514, 515, 516, 511, 517, 518, 519, 520, 521, 521, 26,
+ 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 523, 524, 26, 26, 26,
+ 525, 525, 525, 525, 525, 525, 525, 525, 525, 26, 525, 526, 26, 26, 26, 26,
+ 527, 527, 527, 527, 527, 527, 528, 527, 527, 527, 527, 528, 26, 26, 26, 26,
+ 529, 529, 529, 529, 529, 529, 529, 529, 530, 26, 529, 531, 197, 532, 26, 26,
+ 533, 533, 533, 533, 533, 533, 533, 534, 533, 534, 26, 26, 26, 26, 26, 26,
+ 535, 535, 535, 536, 535, 537, 535, 535, 538, 26, 26, 26, 26, 26, 26, 26,
+ 539, 539, 539, 539, 539, 539, 539, 540, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 542, 543,
+ 544, 545, 546, 547, 547, 547, 548, 549, 544, 26, 547, 550, 26, 26, 26, 26,
+ 26, 26, 26, 26, 551, 552, 551, 551, 551, 551, 551, 552, 553, 26, 26, 26,
+ 554, 554, 554, 554, 554, 554, 554, 554, 554, 26, 555, 555, 555, 555, 555, 555,
+ 555, 555, 555, 555, 556, 26, 177, 177, 557, 557, 557, 557, 557, 557, 557, 558,
+ 559, 560, 559, 559, 559, 559, 561, 559, 562, 26, 559, 559, 559, 563, 564, 564,
+ 564, 564, 565, 564, 564, 566, 567, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 568, 569, 570, 570, 570, 570, 568, 571, 570, 26, 570, 572, 573, 574, 575, 575,
+ 575, 576, 577, 578, 575, 579, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 580, 580, 580, 581,
+ 26, 26, 26, 26, 26, 26, 582, 26, 108, 108, 108, 108, 108, 108, 583, 584,
+ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ 585, 585, 585, 586, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 587, 588, 26,
+ 585, 585, 585, 585, 585, 585, 585, 585, 589, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 591, 26,
+ 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592,
+ 592, 592, 592, 592, 592, 593, 592, 594, 26, 26, 26, 26, 26, 26, 26, 26,
+ 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
+ 595, 595, 595, 595, 595, 595, 595, 595, 596, 26, 26, 26, 26, 26, 26, 26,
+ 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, 304,
+ 304, 304, 304, 304, 304, 304, 304, 597, 598, 598, 598, 599, 598, 600, 601, 601,
+ 601, 601, 601, 601, 601, 601, 601, 602, 601, 603, 604, 604, 604, 605, 605, 26,
+ 606, 606, 606, 606, 606, 606, 606, 606, 607, 26, 606, 608, 608, 606, 606, 609,
+ 606, 606, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 610, 610, 610, 610, 610, 610, 610, 610,
+ 610, 610, 610, 611, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 612, 612, 612, 612, 612, 612, 612, 612, 612, 613, 612, 612, 612, 612, 612, 612,
+ 612, 614, 612, 612, 26, 26, 26, 26, 26, 26, 26, 26, 615, 26, 346, 26,
+ 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616,
+ 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 26,
+ 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617,
+ 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 618, 26, 26, 26, 26, 26,
+ 616, 619, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 620, 621,
+ 622, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
+ 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
+ 286, 286, 286, 286, 623, 26, 26, 26, 26, 26, 624, 26, 625, 26, 626, 626,
+ 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626,
+ 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 627,
+ 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 629, 628, 630,
+ 628, 631, 628, 632, 280, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 9, 9, 9, 9, 9, 633, 9, 9, 220, 26, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 280, 26, 26, 26, 26, 26, 26, 26,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 275, 26,
+ 0, 0, 0, 0, 257, 362, 0, 0, 0, 0, 0, 0, 634, 635, 0, 636,
+ 637, 638, 0, 0, 0, 639, 0, 0, 0, 0, 0, 0, 0, 265, 26, 26,
+ 14, 14, 14, 14, 14, 14, 14, 14, 246, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 280, 26,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 257, 26, 0, 0, 0, 259,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 0, 0, 0, 0, 0,
+ 0, 0, 0, 254, 640, 641, 0, 642, 643, 0, 0, 0, 0, 0, 0, 0,
+ 268, 644, 254, 254, 0, 0, 0, 645, 646, 647, 648, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 275, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 267, 0, 0, 0, 0, 0, 0,
+ 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649,
+ 649, 650, 26, 651, 652, 649, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 2, 2, 2, 347, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 653, 269, 269, 654, 655, 656, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 657, 657, 657, 657, 657, 658, 657, 659, 657, 660, 26, 26, 26, 26, 26, 26,
+ 26, 26, 661, 661, 661, 662, 26, 26, 663, 663, 663, 663, 663, 663, 663, 664,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 171, 665, 169, 171,
+ 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666,
+ 666, 666, 666, 666, 666, 666, 666, 666, 667, 666, 668, 26, 26, 26, 26, 26,
+ 669, 669, 669, 669, 669, 669, 669, 669, 669, 670, 669, 671, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 362, 0,
+ 0, 0, 0, 0, 0, 0, 376, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 362, 0, 0, 0, 0, 0, 0, 275, 26, 26, 26, 26, 26, 26, 26, 26,
+ 672, 31, 31, 31, 673, 674, 675, 676, 677, 678, 673, 679, 673, 675, 675, 680,
+ 31, 681, 31, 682, 683, 681, 31, 682, 26, 26, 26, 26, 26, 26, 51, 26,
+ 0, 0, 0, 0, 0, 280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 280, 26, 0, 257, 362, 0, 362, 0, 362, 0, 0, 0, 275, 26,
+ 0, 0, 0, 0, 0, 275, 26, 26, 26, 26, 26, 26, 684, 0, 0, 0,
+ 685, 26, 0, 0, 0, 0, 0, 280, 0, 259, 313, 26, 275, 26, 26, 26,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 686, 0, 376, 0, 376,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 280, 26,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 259, 0, 280, 259, 26,
+ 0, 280, 0, 0, 0, 0, 0, 0, 0, 26, 0, 313, 0, 0, 0, 0,
+ 0, 26, 0, 0, 0, 275, 313, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 280, 26, 0, 275, 376, 376,
+ 257, 26, 0, 0, 0, 376, 0, 265, 275, 26, 0, 313, 0, 26, 257, 26,
+ 0, 0, 359, 0, 0, 0, 0, 0, 0, 265, 26, 26, 26, 26, 0, 313,
+ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 26, 26, 26, 26,
+ 276, 276, 276, 276, 276, 276, 276, 687, 276, 276, 276, 276, 276, 276, 276, 276,
+ 276, 276, 276, 279, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276,
+ 276, 276, 276, 276, 346, 26, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276,
+ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 687, 26, 26, 26,
+ 276, 276, 276, 279, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 276, 276, 276, 276, 276, 276, 276, 276, 276, 688, 26, 26, 26, 26, 26, 26,
+ 689, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
939, 940, 941, 942, 946, 948, 0, 962, 969, 970, 971, 976,1001,1002,1003,1008,
0,1033,1040,1041,1042,1043,1047, 0, 0,1080,1081,1082,1086,1110, 0, 0,
@@ -6731,25 +5625,1249 @@ _hb_ucd_u16[4848] =
930, 99, 931, 932, 933, 814, 100, 816, 817, 818, 819, 820, 821, 935, 0, 0,
};
static const int16_t
-_hb_ucd_i16[92] =
+_hb_ucd_i16[196] =
{
- 0, 0, 1, -1, 2, 0, -2, 0, 0, 2, 0, -2, 0, 16, 0, -16,
- 0, 1, -1, 0, 3, 3, 3, -3, -3, -3, 0, 2016, 0, 2527, 1923, 1914,
- 1918, 0, 2250, 0, 0, 138, 0, 7, -7, 0, -1, 1, 1824, 0, 2104, 0,
- 2108, 2106, 0, 2106, 1316, 0, -1, -138, 8, 8, 8, 0, 7, 7, -8, -8,
- -8, -7,-1316, 1, -1, 3, -3, 1, 0,-1914,-1918, 0, 0,-1923,-1824, 0,
- 0,-2016,-2104, 0, 0,-2106,-2108,-2106,-2250, 0,-2527, 0,
+ 0, 0, 0, 0, 1, -1, 0, 0, 2, 0, -2, 0, 0, 0, 0, 2,
+ 0, -2, 0, 0, 0, 0, 0, 16, 0, 0, 0, -16, 0, 0, 1, -1,
+ 0, 0, 0, 1, -1, 0, 0, 0, 0, 1, -1, 0, 3, 3, 3, -3,
+ -3, -3, 0, 0, 0, 2016, 0, 0, 0, 0, 0, 2527, 1923, 1914, 1918, 0,
+ 2250, 0, 0, 0, 0, 0, 0, 138, 0, 7, 0, 0, -7, 0, 0, 0,
+ 1, -1, 1, -1, -1, 1, -1, 0, 1824, 0, 0, 0, 0, 0, 2104, 0,
+ 2108, 2106, 0, 2106, 1316, 0, 0, 0, 0, 1, -1, 1, -1, -138, 0, 0,
+ 1, -1, 8, 8, 8, 0, 7, 7, 0, 0, -8, -8, -8, -7, -7, 0,
+ 1, -1, 0, 2,-1316, 1, -1, 0, -1, 1, -1, 1, -1, 3, 1, -1,
+ -3, 1, -1, 1, -1, 0, 0,-1914,-1918, 0, 0,-1923,-1824, 0, 0, 0,
+ 0,-2016, 0, 0, 1, -1, 0, 1, 0, 0,-2104, 0, 0, 0, 0,-2106,
+ -2108,-2106, 0, 0, 1, -1,-2250, 0, 0, 0,-2527, 0, 0, -2, 0, 1,
+ -1, 0, 1, -1,
+};
+
+static inline uint_fast8_t
+_hb_ucd_gc (unsigned u)
+{
+ return u<1114110u?_hb_ucd_u8[6664+(((_hb_ucd_u8[1296+(((_hb_ucd_u16[((_hb_ucd_u8[544+(((_hb_ucd_u8[u>>1>>3>>3>>4])<<4)+((u>>1>>3>>3)&15u))])<<3)+((u>>1>>3)&7u)])<<3)+((u>>1)&7u))])<<1)+((u)&1u))]:2;
+}
+static inline uint_fast8_t
+_hb_ucd_ccc (unsigned u)
+{
+ return u<125259u?_hb_ucd_u8[8984+(((_hb_ucd_u8[7960+(((_hb_ucd_u8[7288+(((_hb_ucd_u8[7042+(u>>2>>3>>4)])<<4)+((u>>2>>3)&15u))])<<3)+((u>>2)&7u))])<<2)+((u)&3u))]:0;
+}
+static inline unsigned
+_hb_ucd_b4 (const uint8_t* a, unsigned i)
+{
+ return (a[i>>1]>>((i&1u)<<2))&15u;
+}
+static inline int_fast16_t
+_hb_ucd_bmg (unsigned u)
+{
+ return u<65380u?_hb_ucd_i16[((_hb_ucd_u8[9728+(((_hb_ucd_u8[9608+(((_hb_ucd_b4(9480+_hb_ucd_u8,u>>2>>3>>3))<<3)+((u>>2>>3)&7u))])<<3)+((u>>2)&7u))])<<2)+((u)&3u)]:0;
+}
+static inline uint_fast8_t
+_hb_ucd_sc (unsigned u)
+{
+ return u<918000u?_hb_ucd_u8[11234+(((_hb_ucd_u16[2000+(((_hb_ucd_u8[10514+(((_hb_ucd_u8[10064+(u>>3>>4>>4)])<<4)+((u>>3>>4)&15u))])<<4)+((u>>3)&15u))])<<3)+((u)&7u))]:2;
+}
+static inline uint_fast16_t
+_hb_ucd_dm (unsigned u)
+{
+ return u<195102u?_hb_ucd_u16[5888+(((_hb_ucd_u8[17136+(((_hb_ucd_u8[16754+(u>>4>>5)])<<5)+((u>>4)&31u))])<<4)+((u)&15u))]:0;
+}
+
+
+#else
+
+static const uint8_t
+_hb_ucd_u8[13602] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 9, 10, 7, 7, 7, 7, 7, 11, 12, 12, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 21, 21, 21, 21, 23, 7, 7,
+ 7, 24, 21, 21, 21, 25, 26, 27, 21, 28, 29, 30, 31, 32, 33, 34,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 35, 21, 36,
+ 7, 7, 37, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 38, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 34, 34, 34, 35, 36, 37, 34, 34, 34, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 62, 63, 64, 65, 66, 67, 68, 69, 67, 70, 71,
+ 67, 67, 62, 72, 62, 62, 73, 67, 74, 75, 76, 77, 78, 67, 67, 67,
+ 79, 80, 34, 81, 82, 83, 67, 67, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 84, 34, 34, 34, 34,
+ 85, 34, 34, 34, 34, 34, 34, 34, 34, 86, 34, 34, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 34, 34, 34, 34, 34, 34, 34, 34,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
+ 100,100, 34, 34, 34, 34,101,102, 34, 34,103,104,105,106,107,108,
+ 34, 34,109,110,111,112,113,114,115,116,117,118, 34, 34, 34,119,
+ 120,121,122,123,124,125,126,127, 34,128,129,111,130,131,132,133,
+ 134,135,136,137,138,139,140,111,141,142,111,143,144,145,146,111,
+ 147,148,149,150,151,152,111,111,153,154,155,156,111,157,111,158,
+ 34, 34, 34, 34, 34, 34, 34, 34,159, 34, 34,111,111,111,111,111,
+ 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,160,
+ 34, 34, 34, 34, 34, 34, 34, 34,161,111,111,111,111,111,111,111,
+ 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+ 111,111,111,111,111,111,111,111, 34, 34, 34, 34, 34,111,111,111,
+ 34, 34, 34, 34,162,163,164, 34,111,111,111,111,165,166,167,168,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,111,111,111,111,111,
+ 111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,119,
+ 34, 34, 34, 34, 34, 34,111,111,111,111,111,111,111,111,111,111,
+ 111,111,111,111,111,111,111,111, 34,169,111,111,111,111,111,111,
+ 111,111,111,111,111,111,111,111,111,111,111,111,111,111,170, 67,
+ 67, 67,171,172,173,130, 65,111,174,175,176,177,178,179,180,181,
+ 67, 67, 67, 67,182,183,111,111,111,111,111,111,111,111,184,111,
+ 185,111,186,111,111,187,111,111,111,111,111,111,111,111,111, 34,
+ 34,188,189,111,111,111,111,111,130,190,191,111, 34,192,111,111,
+ 67, 67,193, 67, 67,111, 67,194, 67, 67, 67, 67, 67, 67, 67, 67,
+ 67, 67, 67, 67, 67, 67, 67,195,111,111,111,111,111,111,111,111,
+ 34, 34, 34, 34, 34, 34, 34, 34,111,111,111,111,111,111,111,111,
+ 34, 34, 34, 34, 34,111,111,111,111,111,111,111,111,111,111,111,
+ 34, 34, 34, 34, 34, 34, 34,111,111,111,111,111,111,111,111,111,
+ 196,111,185,185,111,111,111,111,111,111,111,111,111,111,111,111,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 2, 4, 5, 6, 2,
+ 7, 7, 7, 7, 7, 2, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 17, 18, 19, 1, 20, 20, 21, 22, 23, 24, 25,
+ 26, 27, 15, 2, 28, 29, 27, 30, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 31, 11, 11, 11, 32, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 33, 16, 16, 16, 16, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 34, 34, 34, 34, 34, 34, 34, 34, 16, 32, 32, 32,
+ 32, 32, 32, 32, 11, 34, 34, 16, 34, 32, 32, 11, 34, 11, 16, 11,
+ 11, 34, 32, 11, 32, 16, 11, 34, 32, 32, 32, 11, 34, 16, 32, 11,
+ 34, 11, 34, 34, 32, 35, 32, 16, 36, 36, 37, 34, 38, 37, 34, 34,
+ 34, 34, 34, 34, 34, 34, 16, 32, 34, 38, 32, 11, 32, 32, 32, 32,
+ 32, 32, 16, 16, 16, 11, 34, 32, 34, 34, 11, 32, 32, 32, 32, 32,
+ 16, 16, 39, 16, 16, 16, 16, 16, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 41, 41, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41,
+ 40, 40, 42, 41, 41, 41, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41,
+ 43, 43, 43, 43, 43, 43, 43, 43, 32, 32, 42, 32, 16, 44, 16, 10,
+ 41, 41, 41, 45, 11, 11, 11, 11, 34, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 34,
+ 16, 11, 32, 16, 32, 32, 32, 32, 16, 16, 32, 46, 34, 32, 34, 11,
+ 32, 47, 43, 43, 48, 32, 32, 32, 11, 34, 34, 34, 34, 34, 34, 16,
+ 11, 11, 11, 11, 49, 2, 2, 2, 16, 16, 16, 16, 50, 51, 52, 53,
+ 54, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 55,
+ 56, 57, 43, 56, 43, 43, 43, 43, 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 58, 2, 2, 2, 2, 2, 2, 59, 59, 59, 8, 9, 60, 2, 61,
+ 43, 43, 43, 43, 43, 57, 62, 2, 63, 36, 36, 36, 36, 64, 43, 43,
+ 7, 7, 7, 7, 7, 2, 2, 36, 65, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 66, 43, 43, 43, 67, 47, 43, 43, 68, 69, 70, 43, 43, 36,
+ 7, 7, 7, 7, 7, 36, 71, 72, 2, 2, 2, 2, 2, 2, 2, 73,
+ 64, 36, 36, 36, 36, 36, 36, 36, 43, 43, 43, 43, 43, 43, 65, 36,
+ 36, 36, 36, 43, 43, 43, 43, 43, 7, 7, 7, 7, 7, 36, 36, 36,
+ 36, 36, 36, 36, 36, 64, 43, 43, 43, 43, 40, 21, 2, 40, 69, 20,
+ 36, 36, 36, 43, 43, 69, 43, 43, 43, 43, 69, 43, 69, 43, 43, 43,
+ 2, 2, 2, 2, 2, 2, 2, 2, 36, 36, 36, 36, 64, 43, 43, 2,
+ 36, 36, 36, 36, 74, 36, 36, 36, 59, 59, 59, 59, 43, 43, 43, 43,
+ 36, 36, 36, 36, 75, 43, 43, 43, 43, 76, 43, 43, 43, 43, 43, 43,
+ 43, 77, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 77, 65, 78,
+ 79, 43, 43, 43, 77, 78, 79, 78, 64, 43, 43, 43, 36, 36, 36, 36,
+ 36, 43, 2, 7, 7, 7, 7, 7, 80, 36, 36, 36, 36, 36, 36, 36,
+ 64, 78, 81, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 65, 78,
+ 79, 43, 43, 77, 78, 78, 79, 36, 36, 36, 36, 82, 78, 78, 36, 36,
+ 36, 43, 43, 7, 7, 7, 7, 7, 36, 20, 27, 27, 27, 53, 58, 43,
+ 43, 77, 81, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 43, 78,
+ 79, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 65, 36, 36, 36,
+ 36, 36, 36, 7, 7, 7, 7, 7, 43, 36, 64, 2, 2, 2, 2, 2,
+ 79, 43, 43, 43, 77, 78, 79, 43, 60, 20, 20, 20, 83, 43, 43, 43,
+ 43, 78, 81, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 65, 79,
+ 79, 43, 43, 77, 78, 78, 79, 43, 43, 43, 43, 77, 78, 78, 36, 36,
+ 72, 27, 27, 27, 27, 27, 27, 27, 43, 65, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 78, 77, 78, 78, 78, 78, 78, 79, 43,
+ 36, 36, 36, 82, 78, 78, 78, 78, 78, 78, 78, 7, 7, 7, 7, 7,
+ 27, 84, 61, 61, 53, 61, 61, 61, 77, 78, 65, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 65, 43, 77, 78, 78, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 36, 36, 36, 36, 7, 7, 7, 85, 27, 27, 27, 84,
+ 64, 78, 66, 36, 36, 36, 36, 36, 78, 78, 78, 77, 78, 78, 43, 43,
+ 43, 43, 77, 78, 78, 78, 81, 36, 86, 36, 36, 36, 36, 36, 36, 36,
+ 43, 78, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 64, 65, 78,
+ 79, 43, 43, 78, 78, 78, 79, 71, 61, 61, 36, 82, 27, 27, 27, 87,
+ 27, 27, 27, 27, 84, 36, 36, 36, 36, 36, 36, 36, 36, 43, 43, 77,
+ 78, 43, 43, 43, 78, 78, 78, 78, 7, 78, 2, 2, 2, 2, 2, 2,
+ 64, 36, 43, 43, 43, 43, 43, 88, 36, 36, 36, 69, 43, 43, 43, 57,
+ 7, 7, 7, 7, 7, 2, 2, 2, 64, 36, 43, 43, 43, 43, 65, 36,
+ 36, 36, 36, 40, 43, 43, 43, 43, 7, 7, 7, 7, 7, 7, 36, 36,
+ 71, 61, 2, 2, 2, 2, 2, 2, 2, 89, 89, 61, 43, 61, 61, 61,
+ 7, 7, 7, 7, 7, 27, 27, 27, 27, 27, 47, 47, 47, 4, 4, 78,
+ 64, 43, 43, 43, 43, 43, 43, 77, 43, 43, 57, 43, 36, 36, 64, 43,
+ 43, 43, 43, 43, 43, 43, 43, 61, 61, 61, 61, 70, 61, 61, 61, 61,
+ 2, 2, 89, 61, 21, 2, 2, 2, 36, 36, 36, 36, 36, 82, 79, 43,
+ 77, 43, 43, 43, 79, 77, 79, 65, 36, 36, 36, 78, 43, 36, 36, 43,
+ 65, 78, 81, 82, 78, 78, 78, 36, 64, 43, 65, 36, 36, 36, 36, 36,
+ 36, 77, 79, 77, 78, 78, 79, 82, 7, 7, 7, 7, 7, 78, 79, 61,
+ 16, 16, 16, 16, 16, 50, 44, 16, 36, 36, 36, 36, 36, 36, 64, 43,
+ 2, 2, 2, 2, 90, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 61, 61, 61, 61, 61, 61, 61, 61, 11, 11, 11, 11, 16, 16, 16, 16,
+ 91, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 71, 66,
+ 92, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 93, 94, 94,
+ 36, 36, 36, 36, 36, 58, 2, 95, 96, 36, 36, 36, 36, 36, 36, 36,
+ 36, 43, 77, 78, 78, 78, 78, 81, 36, 43, 97, 2, 2, 2, 2, 2,
+ 36, 43, 43, 43, 43, 43, 43, 43, 36, 36, 43, 79, 43, 43, 43, 78,
+ 78, 78, 78, 77, 79, 43, 43, 43, 43, 43, 2, 80, 2, 60, 64, 43,
+ 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2, 98, 2, 56, 43, 76,
+ 36, 75, 36, 36, 36, 36, 36, 36, 36, 36, 64, 65, 36, 36, 36, 36,
+ 36, 36, 36, 36, 64, 36, 36, 36, 43, 77, 78, 79, 77, 78, 78, 78,
+ 78, 77, 78, 78, 79, 43, 43, 43, 61, 61, 2, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 27, 27, 61, 36, 36, 36, 64, 77, 79, 43, 2,
+ 36, 36, 82, 77, 43, 43, 43, 43, 77, 77, 79, 43, 43, 43, 77, 78,
+ 78, 79, 43, 43, 43, 43, 43, 43, 2, 2, 2, 80, 2, 2, 2, 2,
+ 43, 43, 43, 43, 43, 43, 43, 99, 43, 43, 81, 36, 36, 36, 36, 36,
+ 36, 36, 77, 43, 43, 77, 77, 78, 78, 77, 81, 36, 36, 36, 36, 36,
+ 89, 61, 61, 61, 61, 47, 43, 43, 43, 43, 61, 61, 61, 61, 21, 2,
+ 43, 81, 36, 36, 36, 36, 36, 36, 82, 43, 43, 78, 43, 79, 43, 36,
+ 36, 36, 36, 77, 43, 78, 79, 79, 43, 78, 78, 78, 78, 78, 2, 2,
+ 36, 36, 78, 78, 78, 78, 43, 43, 43, 43, 78, 43, 43, 57, 2, 2,
+ 7, 7, 7, 7, 7, 7, 86, 36, 36, 36, 36, 36, 40, 40, 40, 2,
+ 43, 57, 43, 43, 43, 43, 43, 43, 77, 43, 43, 43, 65, 36, 64, 36,
+ 36, 36, 65, 82, 43, 36, 36, 36, 16, 16, 16, 16, 16, 16, 40, 40,
+ 40, 40, 40, 40, 40, 44, 16, 16, 16, 16, 16, 16, 44, 16, 16, 16,
+ 16, 16, 16, 16, 16,100, 40, 40, 32, 32, 32, 16, 16, 16, 16, 32,
+ 16, 16, 16, 16, 11, 11, 11, 11, 16, 16, 16, 16, 34, 11, 11, 11,
+ 16, 16, 16, 16,101,101,101,101, 16, 16, 16, 16, 11, 11,102,103,
+ 41, 16, 16, 16, 11, 11,102, 41, 16, 16, 16, 16, 11, 11,104, 41,
+ 105,105,105,105,105,106, 59, 59, 51, 51, 51, 2,107,108,107,108,
+ 2, 2, 2, 2,109, 59, 59,110, 2, 2, 2, 2,111,112, 2,113,
+ 114, 2,115,116, 2, 2, 2, 2, 2, 9,114, 2, 2, 2, 2,117,
+ 59, 59, 59, 59, 59, 59, 59, 59,118, 40, 27, 27, 27, 8,115,119,
+ 27, 27, 27, 27, 27, 8,115, 94, 20, 20, 20, 20, 20, 20, 20, 20,
+ 43, 43, 43, 43, 43, 43,120, 48, 99, 48, 99, 43, 43, 43, 43, 43,
+ 61,121, 61,122, 61, 34, 11, 16, 11, 32,122, 61, 46, 11, 11, 61,
+ 61, 61,121,121,121, 11, 11,123, 11, 11, 35, 36, 39, 61, 16, 11,
+ 8, 8, 46, 16, 16, 26, 61,124, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95,125,126, 95,127, 61, 61, 61, 8, 8,128, 61, 61, 8, 61, 61,
+ 128, 26, 61,128, 61, 61, 61,128, 61, 61, 61, 61, 61, 61, 61, 8,
+ 61,128,128, 61, 61, 61, 61, 61, 61, 61, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 61, 61, 61, 61, 4, 4, 61, 61,
+ 8, 61, 61, 61,129,130, 61, 61, 61, 61, 61, 61, 61, 61,128, 61,
+ 61, 61, 61, 61, 61, 26, 8, 8, 8, 8, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 8, 8, 8, 61, 61, 61, 61, 61, 61, 61,
+ 27, 27, 27, 27, 27, 27, 61, 61, 61, 61, 61, 61, 61, 27, 27, 27,
+ 61, 61, 61, 26, 61, 61, 61, 61, 26, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 8, 8, 8, 8, 61, 61, 61, 61, 61, 61, 61, 26,
+ 61, 61, 61, 61, 4, 4, 4, 4, 4, 4, 4, 27, 27, 27, 27, 27,
+ 27, 27, 61, 61, 61, 61, 61, 61, 8, 8,115,131, 8, 8, 8, 8,
+ 8, 8, 8, 4, 4, 4, 4, 4, 8,115,132,132,132,132,132,132,
+ 132,132,132,132,131, 8, 8, 8, 8, 8, 8, 8, 4, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 4, 8, 8, 8,128, 26, 8, 8,128, 61,
+ 32, 11, 32, 34, 34, 34, 34, 11, 32, 32, 34, 16, 16, 16, 40, 11,
+ 32, 32,124, 61, 61,122, 34,133, 43, 32, 16, 16, 50, 2, 90, 2,
+ 36, 36, 36, 36, 36, 36, 36, 75, 2, 2, 2, 2, 2, 2, 2, 56,
+ 2,107,107, 2,111,112,107, 2, 2, 2, 2, 6, 2, 98,107, 2,
+ 107, 4, 4, 4, 4, 2, 2, 80, 2, 2, 2, 2, 2, 51, 2, 2,
+ 98,134, 2, 2, 2, 2, 2, 2, 61, 2,135,132,132,132,136, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 1, 2,137,138, 4, 4, 4, 4,
+ 4, 61, 4, 4, 4, 4,139, 94,140, 95, 95, 95, 95, 43, 43, 78,
+ 141, 40, 40, 61, 95,142, 58, 61, 72, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 64,143,144, 63, 36, 36, 36, 36, 36, 58, 40, 63,
+ 61, 27, 27, 61, 61, 61, 61, 61, 27, 27, 27, 27, 27, 61, 61, 61,
+ 61, 61, 61, 61, 27, 27, 27, 27,145, 27, 27, 27, 27, 27, 27, 27,
+ 36, 36, 75, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,146, 2,
+ 32, 32, 32, 32, 32, 32, 32, 64, 48,147, 43, 43, 43, 43, 43, 80,
+ 32, 32, 32, 32, 32, 32, 40, 43, 36, 36, 36, 95, 95, 95, 95, 95,
+ 43, 2, 2, 2, 2, 2, 2, 2, 41, 41, 41,144, 40, 40, 40, 40,
+ 41, 32, 32, 32, 32, 32, 32, 32, 16, 32, 32, 32, 32, 32, 32, 32,
+ 44, 16, 16, 16, 34, 34, 34, 32, 32, 32, 32, 32, 42,148, 34, 35,
+ 32, 32, 16, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 11, 11, 32,
+ 11, 11, 32, 32, 32, 32, 32, 32, 32, 32, 11, 11, 34, 16, 16, 16,
+ 32, 16, 16, 32, 32, 16, 16, 16, 16, 40,149, 35, 40, 35, 36, 36,
+ 36, 65, 36, 65, 36, 64, 36, 36, 36, 82, 79, 77, 61, 61, 43, 43,
+ 27, 27, 27, 61,150, 61, 61, 61, 36, 36, 2, 2, 2, 2, 2, 2,
+ 78, 36, 36, 36, 36, 36, 36, 36, 36, 36, 78, 78, 78, 78, 78, 78,
+ 78, 78, 43, 43, 43, 43, 43, 2, 43, 36, 36, 36, 2, 66, 66, 64,
+ 36, 36, 36, 43, 43, 43, 43, 2, 36, 36, 36, 64, 43, 43, 43, 43,
+ 43, 78, 78, 78, 78, 78, 78, 97, 36, 64, 78, 43, 43, 78, 43, 78,
+ 97, 2, 2, 2, 2, 2, 2, 80, 7, 7, 7, 7, 7, 7, 7, 2,
+ 36, 36, 64, 63, 36, 36, 36, 36, 36, 36, 36, 36, 64, 43, 43, 77,
+ 79, 77, 79, 43, 43, 43, 43, 43, 36, 64, 36, 36, 36, 36, 77, 78,
+ 7, 7, 7, 7, 7, 7, 2, 2, 63, 36, 36, 71, 61, 82, 77, 36,
+ 65, 43, 65, 64, 65, 36, 36, 43, 36, 36, 36, 36, 36, 36, 75, 2,
+ 36, 36, 36, 36, 36, 82, 43, 78, 2, 75,151, 43, 43, 43, 43, 43,
+ 16, 16, 16, 16, 16,103, 40, 40, 16, 16, 16, 16,100, 41, 41, 41,
+ 36, 82, 79, 78, 77, 97, 79, 43,152,152,152,152,152,152,152,152,
+ 153,153,153,153,153,153,153,153, 16, 16, 16, 16, 16, 16, 35, 65,
+ 36, 36, 36, 36,154, 36, 36, 36, 36, 41, 41, 41, 41, 41, 41, 41,
+ 41, 74, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,132,
+ 36, 36, 36, 36, 36, 36, 36, 71, 36, 36, 36, 36, 36, 36,150, 61,
+ 2, 2, 2,135,116, 2, 2, 2, 6,155,156,132,132,132,132,132,
+ 132,132,116,135,116, 2,113,157, 2, 2, 2, 2,139,132,132,116,
+ 2,158, 8, 8, 60, 2, 2, 2, 36, 36, 36, 36, 36, 36, 36,159,
+ 2, 2, 3, 2, 4, 5, 6, 2, 16, 16, 16, 16, 16, 17, 18,115,
+ 116, 4, 2, 36, 36, 36, 36, 36, 63, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 40, 20,160, 53, 20, 26, 8,128, 61,
+ 61, 61, 61, 61,161, 59, 61, 61, 2, 2, 2, 90, 27, 27, 27, 27,
+ 27, 27, 27, 84, 61, 61, 61, 61, 95, 95,127, 27, 84, 61, 61, 61,
+ 61, 61, 61, 61, 61, 27, 61, 61, 61, 61, 61, 61, 61, 61, 47, 43,
+ 162,162,162,162,162,162,162,162,163, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 87, 36,138, 36, 36, 36, 36, 95, 95, 95,
+ 36, 36, 36, 36, 36, 36, 36, 58,164, 95, 95, 95, 95, 95, 95, 95,
+ 11, 11, 11, 32, 16, 16, 16, 16, 36, 36, 36, 58, 27, 27, 27, 27,
+ 36, 36, 36, 71,145, 27, 27, 27, 36, 36, 36,165, 27, 27, 27, 27,
+ 36, 36, 36, 36, 36,165, 27, 27, 36, 36, 36, 27, 27, 27, 27, 30,
+ 36, 36, 36, 36, 36, 36, 27, 36, 64, 43, 43, 43, 43, 43, 43, 43,
+ 36, 36, 36, 36, 43, 43, 43, 43, 36, 36, 36, 36, 36, 36,165, 30,
+ 36, 36, 36, 36, 36, 36,165, 27, 36, 36, 36, 36, 72, 36, 36, 36,
+ 36, 36, 64, 43, 43,163, 27, 27, 36, 36, 36, 36, 58, 2, 2, 2,
+ 36, 36, 36, 36, 27, 27, 27, 27, 16, 16, 16, 16, 16, 27, 27, 27,
+ 36, 36, 43, 43, 43, 43, 43, 43, 36, 36, 36, 36, 36, 64,166, 51,
+ 27, 27, 27, 87, 36, 36, 36, 36,163, 27, 30, 2, 2, 2, 2, 2,
+ 36, 43, 43, 2, 2, 2, 2, 2, 36, 36,165, 27, 27, 27, 27, 27,
+ 79, 81, 36, 36, 36, 36, 36, 36, 43, 43, 43, 57, 2, 2, 2, 2,
+ 2, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 7, 7, 7, 7, 7,
+ 65, 64, 65, 36, 36, 36, 36, 64, 78, 79, 43, 77, 79, 57, 73, 2,
+ 2, 43, 43, 43, 43, 43, 67, 59, 36, 36, 36, 64, 43, 43, 79, 43,
+ 43, 43, 43, 7, 7, 7, 7, 7, 2, 2, 82, 81, 36, 36, 36, 36,
+ 36, 64, 2, 36, 36, 36, 36, 36, 36, 82, 78, 43, 43, 43, 43, 77,
+ 81, 36, 58, 2, 56, 43, 57, 79, 7, 7, 7, 7, 7, 58, 58, 2,
+ 90, 27, 27, 27, 27, 27, 27, 27, 36, 36, 36, 36, 36, 36, 78, 79,
+ 43, 78, 77, 43, 2, 2, 2, 43, 36, 36, 36, 36, 36, 36, 36, 64,
+ 77, 78, 78, 78, 78, 78, 78, 78, 36, 36, 36, 82, 78, 78, 81, 36,
+ 36, 78, 78, 43, 43, 43, 43, 43, 36, 36, 82, 78, 43, 43, 43, 43,
+ 78, 43, 77, 65, 36, 58, 2, 2, 7, 7, 7, 7, 7, 2, 2, 65,
+ 78, 79, 43, 43, 77, 77, 78, 79, 77, 43, 36, 66, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 82, 78, 43, 43, 43, 78, 78, 43, 79,
+ 57, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 36, 36, 43, 43,
+ 78, 79, 43, 43, 43, 77, 79, 79, 57, 2, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 64, 79, 78, 43, 43, 43, 79, 58, 2, 2, 2,
+ 78, 43, 43, 79, 43, 43, 43, 43, 7, 7, 7, 7, 7, 27, 2, 89,
+ 43, 43, 43, 43, 79, 57, 2, 2, 27, 27, 27, 27, 27, 27, 27, 87,
+ 78, 78, 78, 78, 78, 79, 77, 65, 81, 79, 2, 2, 2, 2, 2, 2,
+ 82, 78, 43, 43, 43, 43, 78, 78, 65, 66, 78, 78, 78, 78, 78, 78,
+ 78, 78, 78, 78, 78, 78, 78, 78, 64, 43, 43, 43, 43, 65, 36, 36,
+ 36, 64, 43, 43, 77, 64, 43, 57, 2, 2, 2, 56, 43, 43, 43, 43,
+ 64, 43, 43, 77, 79, 43, 36, 36, 36, 36, 36, 36, 36, 43, 43, 43,
+ 43, 43, 43, 77, 43, 2, 66, 2, 43, 43, 43, 43, 43, 43, 43, 79,
+ 58, 2, 2, 2, 2, 2, 2, 2, 2, 36, 36, 36, 36, 36, 36, 36,
+ 43, 43, 43, 43, 77, 43, 43, 43, 77, 43, 79, 43, 43, 43, 43, 43,
+ 43, 43, 43, 64, 43, 43, 43, 43, 36, 36, 36, 36, 36, 78, 78, 78,
+ 43, 77, 79, 79, 36, 36, 36, 36, 36, 64, 77, 97, 2, 2, 2, 2,
+ 27, 27, 84, 61, 61, 61, 53, 20,150, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 21, 43, 43, 57, 2, 2, 2, 2, 2,
+ 43, 43, 43, 57, 2, 2, 61, 61, 40, 40, 89, 61, 61, 61, 61, 61,
+ 7, 7, 7, 7, 7,167, 27, 27, 27, 87, 36, 36, 36, 36, 36, 36,
+ 27, 27, 27, 30, 2, 2, 2, 2, 82, 78, 78, 78, 78, 78, 78, 78,
+ 78, 78, 78, 78, 78, 78, 78, 79, 43, 68, 40, 40, 40, 40, 40, 40,
+ 40, 80, 43, 43, 43, 43, 43, 43, 36, 36, 36, 36, 36, 36, 47, 57,
+ 61, 61,168, 79, 43, 61,168, 78, 78,169, 59, 59, 59, 76, 43, 43,
+ 43, 70, 47, 43, 43, 43, 61, 61, 61, 61, 61, 61, 61, 43, 43, 61,
+ 61, 43, 70, 61, 61, 61, 61, 61, 11, 11, 11, 11, 11, 16, 16, 16,
+ 16, 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 16,
+ 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 11, 11,
+ 11, 11, 11, 16, 16, 16, 16, 16, 31, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 31, 16, 16, 16, 16, 33, 16, 16, 16, 11, 11,
+ 11, 11, 31, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 33,
+ 16, 16, 16, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 31,
+ 16, 16, 16, 16, 33, 16, 16, 16, 11, 11, 11, 11, 31, 16, 16, 16,
+ 16, 33, 16, 16, 16, 32, 16, 7, 43, 43, 43, 70, 61, 47, 43, 43,
+ 43, 43, 43, 43, 43, 43, 70, 61, 61, 61, 47, 61, 61, 61, 61, 61,
+ 61, 61, 70, 21, 2, 2, 2, 2, 2, 2, 2, 2, 2, 56, 43, 43,
+ 16, 16, 16, 16, 16, 39, 16, 16, 43, 43, 43, 68, 40, 40, 40, 40,
+ 7, 7, 7, 7, 7, 7, 7, 71, 36, 36, 36, 36, 36, 36, 36, 43,
+ 36, 36, 36, 36, 36, 36, 43, 43, 7, 7, 7, 7, 7, 7, 7,170,
+ 16, 16, 43, 43, 43, 68, 40, 40, 27, 27, 27, 27, 27, 27,145, 27,
+ 171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,145,
+ 27, 27, 27, 27, 27, 27, 84, 61, 61, 61, 61, 61, 61, 25, 41, 41,
+ 0, 0, 29, 21, 21, 21, 23, 21, 22, 18, 21, 25, 21, 17, 13, 13,
+ 25, 25, 25, 21, 21, 9, 9, 9, 9, 22, 21, 18, 24, 16, 24, 5,
+ 5, 5, 5, 22, 25, 18, 25, 0, 23, 23, 26, 21, 24, 26, 7, 20,
+ 25, 1, 26, 24, 26, 25, 15, 15, 24, 15, 7, 19, 15, 21, 9, 25,
+ 9, 5, 5, 25, 5, 9, 5, 7, 7, 7, 9, 8, 8, 5, 7, 5,
+ 6, 6, 24, 24, 6, 24, 12, 12, 6, 5, 9, 21, 25, 9, 26, 12,
+ 11, 11, 9, 6, 5, 21, 17, 17, 17, 26, 26, 23, 23, 12, 17, 12,
+ 21, 12, 12, 21, 7, 21, 1, 1, 21, 23, 26, 26, 1, 21, 6, 7,
+ 7, 12, 12, 7, 21, 7, 12, 1, 12, 6, 6, 12, 12, 26, 7, 26,
+ 26, 7, 21, 1, 24, 7, 7, 6, 1, 12, 12, 10, 10, 10, 10, 12,
+ 21, 6, 10, 7, 7, 10, 23, 7, 15, 26, 13, 21, 13, 7, 15, 7,
+ 12, 23, 21, 26, 21, 15, 17, 7, 29, 7, 7, 22, 18, 18, 14, 14,
+ 14, 7, 10, 21, 17, 21, 11, 12, 5, 6, 8, 8, 8, 24, 5, 24,
+ 9, 24, 29, 29, 29, 1, 20, 19, 22, 20, 27, 28, 1, 29, 21, 20,
+ 19, 21, 21, 16, 16, 21, 25, 22, 18, 21, 21, 29, 15, 6, 18, 6,
+ 12, 11, 9, 26, 26, 9, 26, 5, 5, 26, 14, 9, 5, 14, 14, 15,
+ 25, 26, 26, 22, 18, 26, 18, 25, 18, 22, 5, 12, 22, 21, 21, 22,
+ 18, 17, 26, 6, 7, 14, 17, 22, 26, 14, 17, 6, 14, 6, 12, 24,
+ 24, 6, 26, 15, 6, 21, 11, 21, 24, 9, 6, 9, 23, 26, 6, 10,
+ 4, 4, 3, 3, 7, 25, 17, 16, 16, 22, 16, 16, 25, 17, 7, 1,
+ 25, 24, 26, 1, 2, 2, 12, 15, 21, 14, 7, 15, 12, 17, 13, 15,
+ 26, 10, 10, 1, 13, 23, 23, 15, 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 0, 10, 11, 12, 13, 0, 14, 0, 0, 0, 0, 0, 15, 0,
+ 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 20, 0, 21, 22, 23, 0, 0, 0, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 35,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 37, 38, 0, 0, 0, 0, 0, 0, 39, 40, 0, 0, 41, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0,
+ 3, 0, 0, 0, 4, 5, 6, 7, 0, 8, 9, 10, 0, 11, 12, 13,
+ 14, 15, 16, 17, 16, 18, 16, 19, 16, 19, 16, 19, 0, 19, 16, 20,
+ 16, 19, 21, 19, 0, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0,
+ 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0,
+ 0, 0, 34, 0, 0, 35, 0, 0, 36, 0, 37, 0, 0, 0, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 0, 0, 47, 0, 0, 0, 48, 0, 0,
+ 0, 49, 0, 0, 0, 0, 0, 0, 0, 50, 0, 51, 0, 52, 53, 0,
+ 54, 0, 0, 0, 0, 0, 0, 55, 56, 57, 0, 0, 0, 0, 58, 0,
+ 0, 59, 60, 61, 62, 63, 0, 0, 64, 65, 0, 0, 0, 66, 0, 0,
+ 0, 0, 67, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, 72, 0,
+ 0, 73, 0, 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0,
+ 75, 0, 0, 76, 77, 0, 0, 78, 79, 0, 80, 62, 0, 81, 82, 0,
+ 0, 83, 84, 85, 0, 0, 0, 86, 0, 87, 0, 0, 51, 88, 51, 0,
+ 89, 0, 90, 0, 0, 0, 79, 0, 0, 0, 91, 92, 0, 93, 94, 95,
+ 96, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 97, 98, 0, 0, 0,
+ 0, 99,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,101, 0, 0,
+ 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,103,104, 0, 0,105,
+ 0, 0, 0, 0, 0, 0,106, 0, 0, 0,100, 0, 0, 0, 0, 0,
+ 107,108, 0, 0, 0, 0, 0, 0, 0,109, 0,110, 0, 0, 0, 0,
+ 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, 8, 0, 0, 0, 0, 9,
+ 10, 11, 12, 0, 0, 0, 0, 13, 0, 0, 14, 15, 0, 16, 0, 17,
+ 18, 0, 0, 19, 0, 20, 21, 0, 0, 0, 0, 0, 22, 23, 0, 24,
+ 25, 0, 0, 26, 0, 0, 0, 27, 0, 0, 28, 29, 30, 31, 0, 0,
+ 0, 32, 33, 34, 0, 0, 33, 0, 0, 35, 33, 0, 0, 0, 33, 36,
+ 0, 0, 0, 0, 0, 37, 38, 0, 0, 0, 0, 0, 0, 39, 40, 0,
+ 0, 0, 0, 0, 0, 41, 42, 0, 0, 0, 0, 43, 0, 44, 0, 0,
+ 0, 45, 46, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 48, 49, 0,
+ 0, 0, 0, 50, 0, 0, 0, 51, 0, 52, 0, 53, 0, 0, 0, 0,
+ 54, 0, 0, 0, 0, 55, 0, 56, 0, 0, 0, 0, 57, 58, 0, 0,
+ 0, 59, 60, 0, 0, 0, 0, 0, 0, 61, 52, 0, 62, 63, 0, 0,
+ 64, 0, 0, 0, 65, 66, 0, 0, 0, 67, 0, 68, 69, 70, 71, 72,
+ 1, 73, 0, 74, 75, 76, 0, 0, 77, 78, 0, 0, 0, 79, 0, 0,
+ 1, 1, 0, 0, 80, 0, 0, 81, 0, 0, 0, 0, 77, 82, 0, 83,
+ 0, 0, 0, 0, 0, 78, 84, 0, 85, 0, 52, 0, 1, 78, 0, 0,
+ 86, 0, 0, 87, 0, 0, 0, 0, 0, 88, 57, 0, 0, 0, 0, 0,
+ 0, 89, 90, 0, 0, 84, 0, 0, 33, 0, 0, 91, 0, 0, 0, 0,
+ 92, 0, 0, 0, 0, 49, 0, 0, 93, 0, 0, 0, 0, 94, 95, 0,
+ 0, 96, 0, 0, 97, 0, 0, 0, 98, 0, 0, 0, 99, 0,100, 93,
+ 0, 0,101, 0, 0, 0, 84, 0, 0,102, 0, 0, 0,103,104, 0,
+ 0,105,106, 0, 0, 0, 0, 0, 0,107, 0, 0,108, 0, 0, 0,
+ 0,109, 33, 0,110,111,112, 35, 0, 0,113, 0, 0, 0,114, 0,
+ 0, 0, 0, 0, 0,115, 0, 0,116, 0, 0, 0, 0,117, 88, 0,
+ 0, 0, 0, 0, 57, 0, 0, 0, 0, 52,118, 0, 0, 0, 0,119,
+ 0, 0,120, 0, 0, 0, 0,118, 0, 0, 0, 0, 0,121, 0, 0,
+ 0,122, 0, 0, 0,123, 0,124, 0, 0, 0, 0,125,126,127, 0,
+ 128, 0,129, 0, 0, 0,130,131,132, 0, 0, 0, 35, 0, 0, 0,
+ 133, 0, 0,134, 0, 0,135, 0, 0, 0, 0, 0, 0, 0, 1, 1,
+ 1, 1, 1, 2, 3, 4, 5, 6, 7, 4, 4, 8, 9, 10, 1, 11,
+ 12, 13, 14, 15, 16, 17, 18, 1, 1, 1, 19, 1, 0, 0, 20, 21,
+ 22, 1, 23, 4, 21, 24, 25, 26, 27, 28, 29, 30, 0, 0, 1, 1,
+ 31, 0, 0, 0, 32, 33, 34, 35, 1, 36, 37, 0, 0, 0, 0, 38,
+ 1, 39, 14, 39, 40, 41, 42, 0, 0, 0, 43, 36, 44, 45, 21, 45,
+ 46, 0, 0, 0, 19, 1, 21, 0, 0, 47, 0, 38, 48, 1, 1, 49,
+ 49, 50, 0, 0, 51, 0, 0, 0, 52, 1, 0, 0, 38, 14, 4, 1,
+ 1, 1, 53, 21, 43, 52, 54, 21, 35, 1, 0, 0, 0, 55, 0, 0,
+ 0, 56, 57, 58, 0, 0, 0, 0, 0, 59, 0, 60, 0, 0, 0, 0,
+ 61, 62, 0, 0, 63, 0, 0, 0, 64, 0, 0, 0, 65, 0, 0, 0,
+ 66, 0, 0, 0, 67, 0, 0, 0, 68, 0, 0, 69, 70, 0, 71, 72,
+ 73, 74, 75, 76, 0, 0, 0, 77, 0, 0, 0, 78, 79, 0, 0, 0,
+ 0, 47, 0, 0, 0, 49, 0, 80, 0, 0, 0, 62, 0, 0, 63, 0,
+ 0, 81, 0, 0, 82, 0, 0, 0, 83, 0, 0, 19, 84, 0, 62, 0,
+ 0, 0, 0, 49, 1, 85, 1, 52, 15, 86, 36, 10, 21, 87, 0, 55,
+ 0, 0, 0, 0, 19, 10, 1, 0, 0, 0, 0, 0, 88, 0, 0, 89,
+ 0, 0, 88, 0, 0, 0, 0, 78, 0, 0, 87, 9, 12, 4, 90, 8,
+ 91, 47, 0, 58, 50, 0, 21, 1, 21, 92, 93, 1, 1, 1, 1, 94,
+ 95, 96, 97, 1, 98, 58, 81, 99,100, 4, 58, 0, 0, 0, 0, 0,
+ 0, 19, 50, 0, 0, 0, 0, 0, 0, 61, 0, 0,101,102, 0, 0,
+ 103, 0, 0, 1, 1, 50, 0, 0, 0, 38, 0, 63, 0, 0, 0, 0,
+ 0, 62, 0, 0,104, 68, 61, 0, 0, 0, 78, 0, 0, 0,105,106,
+ 58, 38, 81, 0, 0, 0, 0, 0, 0,107, 1, 14, 4, 12, 84, 0,
+ 0, 0, 0, 38, 87, 0, 0, 0, 0,108, 0, 0,109, 61, 0,110,
+ 0, 0, 0, 1, 0, 0, 0, 0, 19, 58, 0,111, 14, 52,112, 41,
+ 0, 0, 62, 0, 0, 61, 0, 0,113, 0, 87, 0, 0, 0, 61, 62,
+ 0, 0, 62, 0, 89, 0, 0,113, 0, 0, 0, 0,114, 0, 0, 0,
+ 78, 55, 0, 38, 1, 58, 1, 58, 0, 0, 63, 89, 0, 0,115, 0,
+ 0, 0, 55, 0, 0, 0, 0,115, 0, 0, 0, 0, 61, 0, 0, 0,
+ 0, 79, 0, 61, 0, 0, 0, 0, 56, 0, 89, 80, 0, 0, 8, 91,
+ 0, 0, 1, 87, 0, 0,116, 0, 0, 0, 0, 0, 0,117, 0,118,
+ 119,120,121, 0,104, 4,122, 49, 23, 0, 0, 0, 38, 50, 38, 58,
+ 0, 0, 1, 87, 1, 1, 1, 1, 39, 1, 48,105, 87, 0, 0, 0,
+ 0, 1, 4,122, 0, 0, 0, 1,123, 0, 0, 0, 0, 0,230,230,
+ 230,230,230,232,220,220,220,220,232,216,220,220,220,220,220,202,
+ 202,220,220,220,220,202,202,220,220,220, 1, 1, 1, 1, 1,220,
+ 220,220,220,230,230,230,230,240,230,220,220,220,230,230,230,220,
+ 220, 0,230,230,230,220,220,220,220,230,232,220,220,230,233,234,
+ 234,233,234,234,233,230, 0, 0, 0,230, 0,220,230,230,230,230,
+ 220,230,230,230,222,220,230,230,220,220,230,222,228,230, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 0, 23, 0, 24,
+ 25, 0,230,220, 0, 18, 30, 31, 32, 0, 0, 0, 0, 27, 28, 29,
+ 30, 31, 32, 33, 34,230,230,220,220,230,220,230,230,220, 35, 0,
+ 0, 0, 0, 0,230,230,230, 0, 0,230,230, 0,220,230,230,220,
+ 0, 0, 0, 36, 0, 0,230,220,230,230,220,220,230,220,220,230,
+ 220,230,220,230,230, 0, 0,220, 0, 0,230,230, 0,230, 0,230,
+ 230,230,230,230, 0, 0, 0,220,220,220,230,220,220,220,230,230,
+ 0,220, 27, 28, 29,230, 7, 0, 0, 0, 0, 9, 0, 0, 0,230,
+ 220,230,230, 0, 0, 0, 0, 0,230, 0, 0, 84, 91, 0, 0, 0,
+ 0, 9, 9, 0, 0, 0, 0, 0, 9, 0,103,103, 9, 0,107,107,
+ 107,107,118,118, 9, 0,122,122,122,122,220,220, 0, 0, 0,220,
+ 0,220, 0,216, 0, 0, 0,129,130, 0,132, 0, 0, 0, 0, 0,
+ 130,130,130,130, 0, 0,130, 0,230,230, 9, 0,230,230, 0, 0,
+ 220, 0, 0, 0, 0, 7, 0, 9, 9, 0, 9, 9, 0, 0, 0,230,
+ 0, 0, 0,228, 0, 0, 0,222,230,220,220, 0, 0, 0,230, 0,
+ 0,220,230,220, 0,220,230,230,230, 0, 0, 0, 9, 9, 0, 0,
+ 7, 0,230, 0, 1, 1, 1, 0, 0, 0,230,234,214,220,202,230,
+ 230,230,230,230,232,228,228,220,218,230,233,220,230,220,230,230,
+ 1, 1, 1, 1, 1,230, 0, 1, 1,230,220,230, 1, 1, 0, 0,
+ 218,228,232,222,224,224, 0, 8, 8, 0, 0, 0, 0,220,230, 0,
+ 230,230,220, 0, 0,230, 0, 0, 26, 0, 0,220, 0,230,230, 1,
+ 220, 0, 0,230,220, 0, 0, 0,220,220, 0, 0,230,220, 0, 9,
+ 7, 0, 0, 7, 9, 0, 0, 0, 9, 7, 6, 6, 0, 0, 0, 0,
+ 1, 0, 0,216,216, 1, 1, 1, 0, 0, 0,226,216,216,216,216,
+ 216, 0,220,220,220, 0,230,230, 7, 0, 16, 17, 17, 17, 17, 17,
+ 17, 33, 17, 17, 17, 19, 17, 17, 17, 17, 20,101, 17,113,129,169,
+ 17, 27, 28, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17,237, 0, 1, 2, 2, 0, 3,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 6, 7, 8, 9, 0,
+ 0, 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 20, 0, 0, 21, 22, 0, 0, 0, 0, 23, 24,
+ 25, 26, 0, 27, 0, 28, 29, 30, 31, 32, 0, 0, 0, 0, 0, 0,
+ 0, 33, 34, 35, 36, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 38, 39, 0, 0, 0, 0, 1, 2, 40, 41, 0, 1,
+ 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+ 0, 2, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 5, 0, 0, 0,
+ 6, 0, 0, 0, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 0, 0,
+ 8, 9, 0, 0, 0, 0, 0, 0, 10, 0, 0, 10, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0,
+ 0, 0, 0, 0, 11, 12, 0, 13, 0, 14, 15, 16, 0, 0, 0, 0,
+ 0, 1, 17, 18, 0, 19, 7, 1, 0, 0, 0, 20, 20, 7, 20, 20,
+ 20, 20, 20, 20, 20, 8, 21, 0, 22, 0, 7, 23, 24, 0, 20, 20,
+ 25, 0, 0, 0, 26, 27, 1, 7, 20, 20, 20, 20, 20, 1, 28, 29,
+ 30, 31, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
+ 0, 0, 0, 0, 20, 20, 20, 1, 0, 0, 8, 21, 32, 4, 0, 10,
+ 0, 33, 7, 20, 20, 20, 0, 0, 0, 0, 8, 34, 34, 35, 36, 34,
+ 37, 0, 38, 1, 20, 20, 0, 0, 39, 0, 1, 1, 0, 8, 21, 1,
+ 20, 0, 0, 0, 1, 0, 0, 40, 1, 1, 0, 0, 8, 21, 0, 1,
+ 0, 1, 0, 1, 0, 0, 0, 0, 26, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 21, 7, 20, 41, 34, 34, 34, 34, 34, 34, 34, 34, 34, 21,
+ 0, 42, 43, 44, 0, 45, 0, 8, 21, 0, 0, 0, 0, 0, 0, 0,
+ 0, 46, 7, 1, 10, 1, 0, 0, 0, 1, 20, 20, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 26, 34, 9, 0, 0, 20, 20, 1, 20,
+ 20, 0, 0, 0, 0, 0, 0, 0, 26, 21, 0, 1, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 47, 48, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 9, 10, 11, 11, 11, 11, 11, 12, 12, 12,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 12, 21, 12, 12, 12, 12, 22,
+ 23, 23, 23, 24, 12, 12, 12, 25, 26, 27, 12, 28, 29, 30, 31, 32,
+ 33, 34, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 35,
+ 12, 36, 7, 7, 37, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 38, 0, 0, 1, 2, 2, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 32, 33, 33, 33, 34, 35, 35, 35, 35,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 2, 2, 51, 51, 52, 53, 54, 55, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 57, 57, 56, 56, 56, 56, 56, 56, 58, 59, 60, 61,
+ 56, 62, 62, 63, 64, 65, 66, 67, 68, 69, 70, 56, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 71,
+ 62, 62, 62, 62, 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, 74, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 62, 62, 62, 62, 88, 89, 89, 89, 90, 89,
+ 91, 92, 93, 94, 95, 95, 96, 97, 87, 98, 99,100,101,102,103,104,
+ 105,105,105, 2,106,107,108,109,110,111,112,113,114,115,116, 87,
+ 89,117,118,119,120,121,122,123,124,125,126, 87,127,128, 87,129,
+ 130,131,132, 87,133,134,135,136,137,138, 87, 87,139,140,141,142,
+ 87,143, 87,144,145,145,145,145,145,145,145,145,145,145,145, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87,146,147,147,147,147,147,147,147,147,147, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,148,148,148,148,
+ 148, 87, 87, 87,149,149,149,149,150,151,152,152, 87, 87, 87, 87,
+ 153,153,154,155,156,156,156,156,156,156,156,156,156,156,156,156,
+ 156,156,156,156,156,156,156,156,156,156,157,157,157,157,156, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87,158,159,160,161,162,162,162, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,163,164, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87,165, 56, 56, 56,166,167, 51, 56, 56, 87, 56, 56, 56, 56,
+ 56, 56, 56, 56,168,168,168,168,168,168, 87, 87, 87, 87, 87, 87,
+ 87, 87, 2, 87,169, 87,170, 87, 87,171, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 33,172,172,173, 87, 87, 87, 87, 87, 56, 56, 56, 87,
+ 89, 89, 87, 87, 56, 56, 56, 56,174, 87, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 87, 87, 87, 87,
+ 87, 87, 87, 87, 62, 62, 62, 62, 62, 62, 62, 62, 87, 87, 87, 87,
+ 87, 87, 87, 87, 62, 62, 62, 62, 62, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 62, 62, 62, 62, 62, 62, 62, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 56, 87,175,175, 0, 1, 2, 2, 0, 1, 2, 2,
+ 2, 3, 4, 5, 0, 0, 0, 0, 1, 2, 1, 2, 0, 0, 3, 3,
+ 4, 5, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6,
+ 0, 0, 7, 0, 8, 8, 8, 8, 8, 8, 8, 9, 10, 11, 11, 11,
+ 11, 11, 12, 11, 13, 13, 13, 13, 13, 13, 13, 13, 14, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 15, 16, 16, 16, 16, 16, 17, 18, 18,
+ 18, 18, 18, 18, 19, 20, 21, 21, 22, 23, 21, 24, 21, 21, 21, 21,
+ 21, 25, 21, 21, 26, 26, 26, 26, 26, 21, 21, 21, 27, 27, 27, 27,
+ 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 26, 21, 21, 21, 21, 21,
+ 21, 21, 31, 21, 32, 32, 32, 32, 32, 33, 34, 32, 35, 35, 35, 35,
+ 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, 37,
+ 37, 37, 37, 37, 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39,
+ 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41,
+ 41, 41, 41, 41, 42, 42, 42, 42, 42, 42, 42, 42, 43, 43, 43, 43,
+ 43, 43, 43, 43, 44, 44, 44, 45, 44, 44, 44, 44, 46, 46, 46, 46,
+ 46, 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 48, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 50, 50,
+ 50, 50, 50, 51, 52, 52, 52, 52, 52, 52, 52, 52, 53, 53, 53, 53,
+ 53, 53, 53, 53, 53, 53, 54, 54, 54, 54, 54, 54, 55, 55, 55, 55,
+ 55, 55, 55, 55, 56, 56, 57, 57, 57, 57, 58, 57, 59, 59, 60, 61,
+ 62, 62, 63, 63, 64, 64, 64, 64, 64, 64, 64, 64, 65, 66, 66, 66,
+ 66, 66, 66, 66, 66, 66, 66, 55, 55, 55, 55, 55, 67, 67, 67, 67,
+ 67, 68, 68, 68, 69, 69, 69, 69, 69, 69, 64, 64, 70, 70, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 8, 8, 8, 8, 8, 72, 72, 72, 72,
+ 72, 72, 72, 72, 73, 73, 73, 73, 74, 74, 74, 74, 75, 75, 75, 75,
+ 75, 76, 76, 76, 13, 50, 50, 50, 73, 77, 78, 79, 4, 4, 80, 4,
+ 4, 81, 82, 83, 4, 4, 4, 84, 8, 8, 8, 8, 11, 11, 11, 11,
+ 11, 11, 11, 11, 85, 0, 0, 0, 0, 0, 0, 86, 0, 4, 0, 0,
+ 0, 8, 8, 8, 0, 0, 87, 88, 89, 0, 4, 4, 6, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 90, 90, 90,
+ 90, 90, 90, 90, 91, 91, 91, 91, 91, 91, 4, 4, 92, 92, 92, 92,
+ 92, 92, 92, 92, 50, 50, 50, 93, 93, 93, 93, 93, 53, 53, 53, 53,
+ 53, 53, 13, 13, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
+ 94, 94, 94, 0, 95, 0, 96, 97, 98, 99, 99, 99, 99,100,101,102,
+ 102,102,102,103,104,104,104,105, 52, 52, 52, 52, 52, 0,104,104,
+ 0, 0, 0,102, 52, 52, 0, 0, 0, 0, 52,106, 0, 0, 0, 0,
+ 0,102,102,107,102,102,102,102,102,108, 0, 0, 94, 94, 94, 94,
+ 0, 0, 0, 0,109,109,109,109,109,109,109,109,109,109,109,109,
+ 109,110,110,110,111,111,111,111,111,111,111,111,111,111,111,111,
+ 13, 13, 13, 13, 13, 13,112,112,112,112,112,112, 0, 0,113, 4,
+ 4, 4, 4, 4,114, 4, 4, 4, 4, 4, 4, 4,115,115,115, 0,
+ 116,116,116,116,117,117,117,117,117,117, 32, 32,118,118,119,120,
+ 120,120, 52, 52,121,121,121,121,122,121, 49, 49,123,123,123,123,
+ 123,123, 49, 49,124,124,124,124,124,124,125,125, 53, 53, 53, 4,
+ 4,126,127, 54, 54, 54, 54, 54,125,125,125,125,128,128,128,128,
+ 128,128,128,128, 4,129, 18, 18, 18, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21,130, 21, 21, 21, 21, 8, 0,131, 0,
+ 0, 0, 0, 21, 21, 21, 21, 21, 21, 21, 21,132, 0, 0, 1, 2,
+ 1, 2,133,101,102,134, 52, 52, 52, 52, 0, 0,135,135,135,135,
+ 135,135,135,135, 0, 0, 0, 0, 11, 11, 11, 11, 11, 0, 11, 11,
+ 11, 0, 0,136,137,137,138,138,138,138,139, 0,140,140,140,141,
+ 141,142,142,142,143,143,144,144,144,144,144,144,145,145,145,145,
+ 145,146,146,146,147,147,147,148,148,148,148,148,149,149,149,150,
+ 150,150,150,151,151,151,151,151,151,151,151,151,152,152,152,152,
+ 152,152,152,152,153,153,153,153,154,154,155,155,156,156,156,156,
+ 156,156,157,157,158,158,159,159,159,159,159,159,160,160,161,161,
+ 161,161,161,161,162,162,162,162,162,162,163,163,164,164,164,164,
+ 165,165,165,165,166,166,166,166,167,167,168,168,169,169,169,169,
+ 169,169,169,169,170,170,170,170,170,170,170,170,171,171,171,171,
+ 171,171,171,171,172,172,172,172,172,172,172,172,173,173,173,173,
+ 173,173,173,173,174,174,174,175,175,175,175,176,176,176,176,177,
+ 177,177,178,178,179,179,179,179,179,179,179,179,180,180,180,180,
+ 180,181,181,181,182,182,182,182,182,183,183,183,184,184,184,184,
+ 184,184,185, 43,186,186,186,186,186,186,186,186,187,187,187,188,
+ 188,188,188,188,189,189,189,190,189,189,189,189,191,191,191,191,
+ 191,191,191,191,192,192,192,192,192,192,192,192,193,193,193,193,
+ 193,193,193,193,194,194,194,194,194,194, 66, 66,195,195,195,195,
+ 195,195,195,195,196,196,196,196,196,196,196,196,197,197,197,197,
+ 197,197,197,197,198,198,198,198,198,198,198,198,199,199,199,199,
+ 199,199,199,199,200,200,200,200,200,200,200,200,201,201,201,201,
+ 201,202,202,202,202,202,202, 55,203,203,203,203,204,204,204,204,
+ 204,204,204,205,205,205,205,205,205,205,205,205,206,206,206,206,
+ 206,206,207,207,207,207,207,207,207,207,207,207,208,208,208,208,
+ 208,208,208,208,110,110,110,110, 39, 39, 39, 39,209,209,209,209,
+ 209,209,209,209,210,210,210,210,210,210,210,210,211,211,211,211,
+ 211,211,211,211,212,212,212,212,212,212,212,212,112,112,112,112,
+ 112,112,112,112,112,112,112,112,213,213,213,214,214,214,214,214,
+ 214,215,215,215,216,216,216,216,216,216,216,216,217,217,217,217,
+ 217,217,217,217,218,218,218,218,218,218,218,218,218,218,218,218,
+ 218,218,219, 94,220,220,220,220,220,220,220,220,221,221,221,221,
+ 221,221,221,221,102,102,102,102,102,102,102,102,222, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,102,102,
+ 102, 99,223,224,224,224,224,224,224,224,224,224,225,225,225,225,
+ 225,225,225,225,225,225, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8,
+ 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,226,227,228, 0,229, 0,
+ 0, 0, 0, 0,230,230,230,230,230,230,230,230, 91, 91, 91, 91,
+ 91, 91, 91, 91,231,231,231,231,231,231,231,231,232,232,232,232,
+ 233,233,233,233,234,234,234,234,234,234,234,234,235,235,235,235,
+ 235,235,235,235,236, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8,
+ 8, 8, 8, 8, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 3, 0,
+ 0, 0, 4, 0, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 5, 0,
+ 2, 5, 6, 0, 7, 7, 7, 7, 8, 9, 8, 10, 8, 11, 8, 8,
+ 8, 8, 8, 8, 12, 13, 13, 13, 14, 14, 14, 14, 14, 15, 14, 14,
+ 16, 17, 17, 17, 17, 17, 17, 17, 18, 19, 19, 19, 19, 19, 19, 19,
+ 20, 21, 20, 22, 20, 20, 23, 23, 20, 20, 20, 20, 22, 20, 24, 7,
+ 7, 25, 20, 20, 26, 20, 20, 20, 20, 20, 20, 21, 27, 27, 27, 27,
+ 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31,
+ 32, 20, 20, 20, 33, 33, 33, 33, 34, 35, 33, 33, 33, 36, 33, 33,
+ 37, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 39, 40, 40, 40, 40,
+ 41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43, 44, 44, 44, 44,
+ 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, 46, 47, 48, 48, 48, 48,
+ 49, 49, 49, 49, 49, 50, 51, 49, 52, 52, 52, 52, 53, 53, 53, 53,
+ 53, 53, 54, 53, 55, 55, 55, 55, 56, 56, 56, 56, 57, 57, 57, 57,
+ 58, 58, 58, 58, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 61, 62,
+ 63, 63, 63, 63, 64, 64, 64, 64, 64, 65, 0, 0, 66, 66, 66, 66,
+ 67, 67, 67, 67, 68, 68, 68, 68, 69, 70, 71, 71, 71, 71, 71, 71,
+ 72, 72, 72, 72, 73, 73, 73, 73, 74, 74, 74, 74, 75, 75, 75, 75,
+ 76, 76, 76, 76, 77, 77, 77, 77, 78, 78, 78, 78, 79, 79, 79, 79,
+ 80, 80, 80, 80, 81, 81, 81, 81, 82, 7, 7, 7, 83, 7, 84, 85,
+ 0, 84, 86, 0, 2, 87, 88, 2, 2, 2, 2, 89, 90, 87, 91, 2,
+ 2, 2, 92, 2, 2, 2, 2, 93, 0, 0, 0, 86, 1, 0, 0, 94,
+ 0, 95, 96, 0, 4, 0, 0, 0, 0, 0, 0, 4, 97, 97, 97, 97,
+ 98, 98, 98, 98, 13, 13, 13, 13, 99, 99, 99, 99,100,100,100,100,
+ 0,101, 0, 0,102,100,103,104, 0, 0,100, 0,105,106,106,106,
+ 106,106,106,106,106,106,107,105,108,109,109,109,109,109,109,109,
+ 109,109,110,108,111,111,111,111,112, 55, 55, 55, 55, 55, 55,113,
+ 109,109,109,110,109,109, 0, 0,114,114,114,114,115,115,115,115,
+ 116,116,116,116,117,117,117,117, 96, 2, 2, 2, 2, 2, 94, 2,
+ 118,118,118,118,119,119,119,119,120,120,120,120,121,121,121,121,
+ 121,121,121,122,123,123,123,123,124,124,124,124,124,124,124,125,
+ 126,126,126,126,127,127,127,127,128,128,128,128, 2, 2, 3, 2,
+ 2,129,130, 0,131,131,131,131,132, 17, 17, 18, 20, 20, 20,133,
+ 7, 7, 7,134, 20, 20, 20, 23, 0,135,109,109,109,109,109,136,
+ 137,137,137,137, 0, 0, 0,138,139,139,139,139,140,140,140,140,
+ 84, 0, 0, 0,141,141,141,141,142,142,142,142,143,143,143,143,
+ 144,144,144,144,145,145,145,145,146,146,146,146,147,147,147,147,
+ 148,148,148,148,149,149,149,149,150,150,150,150,151,151,151,151,
+ 152,152,152,152,153,153,153,153,154,154,154,154,155,155,155,155,
+ 156,156,156,156,157,157,157,157,158,158,158,158,159,159,159,159,
+ 160,160,160,160,161,161,161,161,162,162,162,162,163,163,163,163,
+ 164,164,164,164,165,165,165,165,166,166,166,166,167,167,167,167,
+ 168,168,168,168,169,169,169,169,170,170,170,170,171,171,171,171,
+ 172,172,172,172,173,173,173,173,174,174,174,174,175,175,175,175,
+ 176,176,176,176,177,177,177,177,178,178,178,178,179,179,179,179,
+ 180,180,180,180,181,181,181,181,182,182,182,182,183,183,183,183,
+ 184,184,184,184,185,185,185,185,186, 45, 45, 45,187,187,187,187,
+ 188,188,188,188,189,189,189,189,190,190,190,190,190,190,191,190,
+ 192,192,192,192,193,193,193,193,194,194,194,194,195,195,195,195,
+ 196,196,196,196,197,197,197,197,198,198,198,198,199,199,199,199,
+ 200,200,200,200,201,201,201,201,202,202,202,202,203,203,203,203,
+ 204,204,204,204,205,205,205,205,206,206,206,206,207,207,207,207,
+ 208,208,208,208,209,209,209,209,210,210,210,210,211,211,211,211,
+ 212,212,212,212,213,213,213,213,214,214,214,214,215,215,215,215,
+ 216,216,216,216,217,217,217,217,218,218,218,218,219,219,219,219,
+ 220,221,221,221,222,222,222,222,221,221,221,221,223,106,106,106,
+ 106,109,109,109,224,224,224,224,225,225,225,225, 0,226, 86, 0,
+ 0, 0,226, 7, 82,138, 7, 0, 0, 0,227, 86,228,228,228,228,
+ 229,229,229,229,230,230,230,230,231,231,231,231,232,232,232,232,
+ 233,233,233,233,234, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 0, 0, 0, 19, 0, 19, 0, 0, 0,
+ 0, 0, 26, 26, 1, 1, 1, 1, 9, 9, 9, 9, 0, 9, 9, 9,
+ 9, 9, 0, 9, 9, 0, 9, 0, 9, 9, 55, 55, 55, 55, 55, 55,
+ 6, 6, 6, 6, 6, 1, 1, 6, 6, 4, 4, 4, 4, 4, 4, 4,
+ 4, 14, 14, 14, 14, 14, 14, 14, 3, 3, 3, 3, 3, 0, 3, 3,
+ 0, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 1, 1, 1, 3, 3,
+ 1, 3, 3, 3, 37, 37, 37, 37, 38, 38, 38, 38, 64, 64, 64, 64,
+ 90, 90, 90, 90, 95, 95, 95, 95, 3, 3, 0, 3, 7, 7, 7, 7,
+ 7, 1, 1, 1, 1, 7, 7, 7, 0, 0, 7, 7, 5, 5, 5, 5,
+ 11, 11, 11, 11, 10, 10, 10, 10, 21, 21, 21, 21, 22, 22, 22, 22,
+ 23, 23, 23, 23, 16, 16, 16, 16, 20, 20, 20, 20, 36, 36, 36, 36,
+ 24, 24, 24, 24, 24, 24, 24, 0, 18, 18, 18, 18, 25, 25, 25, 25,
+ 25, 0, 0, 0, 0, 25, 25, 25, 33, 33, 33, 33, 8, 8, 8, 8,
+ 8, 8, 8, 0, 12, 12, 12, 12, 30, 30, 30, 30, 29, 29, 29, 29,
+ 28, 28, 28, 28, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 0,
+ 0, 0, 35, 35, 45, 45, 45, 45, 44, 44, 44, 44, 44, 0, 0, 0,
+ 43, 43, 43, 43, 46, 46, 46, 46, 31, 31, 31, 31, 32, 32, 0, 0,
+ 32, 0, 32, 32, 32, 32, 32, 32, 48, 48, 48, 48, 52, 52, 52, 52,
+ 58, 58, 58, 58, 54, 54, 54, 54, 91, 91, 91, 91, 62, 62, 62, 62,
+ 76, 76, 76, 76, 93, 93, 93, 93, 70, 70, 70, 70, 73, 73, 73, 73,
+ 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0,
+ 1, 1, 0, 0, 19, 19, 9, 9, 9, 9, 9, 6, 19, 9, 9, 9,
+ 9, 9, 19, 19, 9, 9, 9, 19, 6, 19, 19, 19, 19, 19, 19, 9,
+ 0, 0, 0, 19, 0, 0, 9, 0, 0, 0, 19, 19, 27, 27, 27, 27,
+ 56, 56, 56, 56, 61, 61, 61, 61, 13, 13, 13, 13, 0, 13, 0, 13,
+ 0, 13, 13, 13, 13, 13, 1, 1, 1, 1, 12, 12, 0, 15, 15, 15,
+ 15, 15, 15, 15, 15, 1, 1, 0, 0, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 0, 26, 26, 26, 26, 26, 12, 12, 12, 12, 12, 12, 0,
+ 39, 39, 39, 39, 86, 86, 86, 86, 77, 77, 77, 77, 79, 79, 79, 79,
+ 60, 60, 60, 60, 65, 65, 65, 65, 75, 75, 75, 75, 69, 69, 69, 69,
+ 69, 69, 0, 69, 74, 74, 74, 74, 84, 84, 84, 84, 84, 84, 84, 0,
+ 68, 68, 68, 68, 92, 92, 92, 92, 87, 87, 87, 87, 19, 9, 19, 19,
+ 19, 19, 0, 0, 2, 2, 2, 2, 19, 19, 19, 4, 3, 3, 0, 0,
+ 1, 1, 6, 6, 0, 0, 17, 17, 17, 17, 0, 0, 49, 49, 49, 49,
+ 0, 1, 1, 1, 71, 71, 71, 71, 67, 67, 67, 67, 42, 42, 42, 42,
+ 41, 41, 41, 41,118,118,118,118, 53, 53, 53, 53, 59, 59, 59, 59,
+ 40, 40, 40, 40, 51, 51, 51, 51, 50, 50, 50, 50,135,135,135,135,
+ 106,106,106,106,104,104,104,104,161,161,161,161,110,110,110,110,
+ 47, 47, 47, 47, 81, 81, 81, 81,120,120,120,120,116,116,116,116,
+ 128,128,128,128, 66, 66, 66, 66, 72, 72, 72, 72, 98, 98, 98, 98,
+ 97, 97, 97, 97, 57, 57, 57, 57, 88, 88, 88, 88,117,117,117,117,
+ 112,112,112,112, 78, 78, 78, 78, 83, 83, 83, 83, 82, 82, 82, 82,
+ 122,122,122,122, 89, 89, 89, 89,130,130,130,130,144,144,144,144,
+ 156,156,156,156,147,147,147,147,148,148,148,148,158,158,158,158,
+ 153,153,153,153,149,149,149,149, 94, 94, 94, 94, 85, 85, 85, 85,
+ 101,101,101,101, 96, 96, 96, 96,111,111,111,111,100,100,100,100,
+ 100, 36, 36, 36,108,108,108,108,129,129,129,129,109,109,109,109,
+ 107,107,107,107,107,107,107, 1,137,137,137,137,124,124,124,124,
+ 123,123,123,123,114,114,114,114,102,102,102,102,126,126,126,126,
+ 142,142,142,142,125,125,125,125,154,154,154,154,150,150,150,150,
+ 141,141,141,141,140,140,140,140,121,121,121,121,133,133,133,133,
+ 134,134,134,134,138,138,138,138,143,143,143,143,145,145,145,145,
+ 63, 63, 63, 63,157,157,157,157, 80, 80, 80, 80,127,127,127,127,
+ 115,115,115,115,159,159,159,159,103,103,103,103,119,119,119,119,
+ 146,146,146,146, 99, 99, 99, 99,136,139, 13, 13,155,155,155,155,
+ 136,136,136,136, 17, 15, 15, 15,139,139,139,139,105,105,105,105,
+ 0, 0, 0, 1, 0, 0, 1, 1,131,131,131,131,151,151,151,151,
+ 160,160,160,160,152,152,152,152,113,113,113,113,132,132,132,132,
+ 15, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9,
+ 9, 10, 9, 11, 12, 13, 9, 9, 9, 14, 9, 9, 15, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 16, 17, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 18, 19, 20, 9,
+ 21, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 22, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 23, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 23, 0, 0, 24, 25, 26, 27, 28, 29, 30,
+ 0, 0, 31, 32, 0, 33, 0, 34, 0, 35, 0, 0, 0, 0, 36, 37,
+ 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 42,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 43, 44, 0, 45, 0, 0, 0, 0, 0, 0, 46, 47,
+ 0, 0, 0, 0, 0, 48, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 50, 51, 0, 0, 0, 52, 0, 0, 53, 0,
+ 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 55, 0,
+ 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 57,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
+ 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 67, 68, 0, 69, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,100,
+ 101,102,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,104, 0, 0, 0, 0, 0, 0,105,106, 0,107, 0,
+ 0, 0,108, 0,109, 0,110, 0,111,112,113, 0,114, 0, 0, 0,
+ 115, 0, 0, 0,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,117,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,118,119,120,121, 0,122,123,124,125,126,
+ 0,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,128,129,130,131,132,133,134,135,136,137,138,139,140,141,
+ 142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,
+ 0, 0, 0,158,159,160,161, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,162,163, 0, 0, 0,
+ 0, 0, 0, 0,164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,165, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,166, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,167, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,169,170, 0, 0, 0, 0,171,172, 0,
+ 0, 0,173,174,175,176,177,178,179,180,181,182,183,184,185,186,
+ 187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,
+ 203,204,205,206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2,
+ 3, 4,
+};
+static const uint16_t
+_hb_ucd_u16[4888] =
+{
+ 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 10, 11, 12,
+ 13, 13, 13, 14, 15, 13, 13, 16, 17, 18, 19, 20, 21, 22, 13, 23,
+ 13, 13, 13, 24, 25, 11, 11, 11, 11, 26, 11, 27, 28, 29, 30, 31,
+ 32, 32, 32, 32, 32, 32, 32, 33, 34, 35, 36, 11, 37, 38, 13, 39,
+ 9, 9, 9, 11, 11, 11, 13, 13, 40, 13, 13, 13, 41, 13, 13, 13,
+ 13, 13, 13, 35, 9, 42, 11, 11, 43, 44, 32, 45, 46, 47, 47, 48,
+ 49, 50, 47, 47, 51, 32, 52, 53, 47, 47, 47, 47, 47, 54, 55, 56,
+ 57, 58, 47, 32, 59, 47, 47, 47, 47, 47, 60, 53, 61, 47, 62, 63,
+ 47, 64, 65, 66, 47, 67, 47, 47, 68, 69, 47, 47, 70, 32, 71, 32,
+ 72, 47, 47, 73, 74, 75, 76, 77, 78, 47, 47, 79, 80, 81, 82, 83,
+ 84, 47, 47, 85, 86, 87, 88, 89, 84, 47, 47, 79, 90, 47, 82, 91,
+ 92, 47, 47, 93, 94, 95, 82, 96, 97, 47, 47, 98, 99, 100, 101, 102,
+ 103, 47, 47, 104, 105, 106, 82, 107, 108, 47, 47, 93, 109, 110, 82, 111,
+ 112, 47, 47, 113, 114, 115, 82, 116, 92, 47, 47, 47, 117, 118, 101, 119,
+ 47, 47, 47, 120, 121, 122, 66, 66, 47, 47, 47, 123, 124, 125, 47, 47,
+ 126, 127, 128, 129, 47, 47, 47, 130, 131, 32, 32, 132, 133, 134, 66, 66,
+ 47, 47, 135, 136, 122, 137, 138, 139, 140, 141, 9, 9, 9, 11, 11, 142,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 143, 144, 145,
+ 47, 146, 9, 9, 9, 9, 9, 147, 148, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 149, 47, 150, 151, 47, 47, 47, 47, 152, 153,
+ 47, 154, 47, 155, 47, 156, 47, 156, 47, 47, 47, 157, 158, 159, 160, 145,
+ 161, 160, 47, 47, 162, 47, 47, 47, 163, 47, 164, 47, 47, 47, 47, 47,
+ 47, 47, 165, 166, 167, 47, 47, 47, 47, 47, 47, 47, 47, 168, 146, 146,
+ 47, 169, 47, 47, 47, 170, 171, 172, 160, 160, 173, 174, 32, 32, 32, 32,
+ 175, 47, 47, 176, 177, 122, 178, 179, 180, 47, 181, 61, 47, 47, 182, 183,
+ 47, 47, 184, 185, 186, 61, 47, 187, 11, 9, 9, 9, 66, 188, 189, 190,
+ 11, 11, 191, 27, 27, 27, 192, 193, 11, 194, 27, 27, 32, 32, 32, 32,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 195, 13, 13, 13, 13, 13, 13,
+ 196, 196, 196, 196, 196, 197, 196, 11, 198, 198, 198, 199, 200, 201, 201, 200,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 27, 211, 211, 211, 212, 213, 32,
+ 214, 215, 216, 217, 218, 145, 219, 219, 220, 221, 222, 146, 223, 224, 146, 225,
+ 226, 226, 226, 226, 226, 226, 226, 226, 227, 146, 228, 146, 146, 146, 146, 229,
+ 146, 230, 226, 231, 146, 232, 233, 146, 146, 146, 146, 146, 146, 146, 145, 145,
+ 145, 234, 146, 146, 146, 146, 235, 145, 146, 146, 146, 146, 146, 146, 146, 146,
+ 146, 146, 146, 236, 237, 146, 146, 238, 146, 146, 146, 146, 146, 146, 239, 146,
+ 146, 146, 146, 146, 146, 146, 240, 241, 145, 242, 146, 146, 243, 226, 244, 226,
+ 245, 246, 226, 226, 226, 247, 226, 248, 146, 146, 146, 226, 249, 146, 146, 146,
+ 9, 9, 9, 11, 11, 11, 250, 251, 13, 13, 13, 13, 13, 13, 252, 253,
+ 11, 11, 11, 47, 47, 47, 254, 255, 47, 47, 47, 47, 47, 47, 32, 32,
+ 256, 257, 258, 259, 260, 261, 262, 262, 263, 264, 265, 266, 267, 47, 47, 47,
+ 47, 268, 148, 47, 47, 47, 47, 269, 47, 270, 47, 47, 146, 146, 146, 47,
+ 146, 146, 271, 146, 272, 273, 146, 146, 271, 146, 146, 273, 146, 146, 146, 146,
+ 47, 47, 47, 47, 146, 146, 146, 146, 47, 274, 47, 47, 47, 47, 47, 47,
+ 47, 146, 146, 146, 146, 47, 47, 187, 275, 47, 61, 47, 13, 13, 276, 277,
+ 13, 278, 47, 47, 47, 47, 279, 280, 31, 281, 282, 283, 13, 13, 13, 284,
+ 285, 286, 287, 288, 289, 290, 11, 291, 292, 47, 293, 294, 47, 47, 47, 295,
+ 296, 47, 47, 297, 298, 160, 32, 299, 61, 47, 300, 47, 301, 302, 47, 47,
+ 72, 47, 47, 303, 304, 305, 306, 61, 47, 47, 307, 308, 309, 310, 47, 311,
+ 47, 47, 47, 312, 58, 313, 314, 315, 47, 47, 47, 11, 11, 316, 317, 11,
+ 11, 11, 11, 11, 47, 47, 318, 160, 319, 319, 319, 319, 319, 319, 319, 319,
+ 320, 320, 320, 320, 320, 320, 320, 320, 11, 321, 322, 47, 47, 47, 47, 47,
+ 47, 47, 47, 323, 31, 324, 47, 47, 47, 47, 47, 325, 146, 47, 47, 47,
+ 47, 47, 47, 47, 326, 146, 146, 327, 32, 328, 32, 329, 330, 331, 332, 47,
+ 47, 47, 47, 47, 47, 47, 47, 333, 334, 2, 3, 4, 5, 335, 336, 337,
+ 47, 338, 47, 47, 47, 47, 339, 340, 341, 145, 145, 342, 219, 219, 219, 343,
+ 344, 146, 146, 146, 146, 146, 146, 345, 346, 346, 346, 346, 346, 346, 346, 346,
+ 47, 47, 47, 47, 47, 47, 347, 145, 47, 47, 348, 47, 349, 47, 47, 60,
+ 47, 350, 47, 47, 47, 351, 219, 219, 9, 9, 147, 11, 11, 47, 47, 47,
+ 47, 47, 160, 9, 9, 147, 11, 11, 47, 47, 47, 47, 47, 47, 350, 9,
+ 9, 352, 11, 11, 11, 11, 11, 11, 27, 27, 27, 27, 27, 27, 27, 27,
+ 47, 47, 47, 47, 47, 353, 47, 354, 47, 47, 355, 145, 145, 145, 47, 356,
+ 47, 357, 47, 350, 66, 66, 66, 66, 47, 47, 47, 358, 145, 145, 145, 145,
+ 359, 47, 47, 360, 145, 66, 47, 361, 47, 362, 145, 145, 363, 47, 364, 66,
+ 47, 47, 47, 365, 47, 366, 47, 366, 47, 365, 144, 145, 145, 145, 145, 145,
+ 9, 9, 9, 9, 11, 11, 11, 367, 47, 47, 368, 160, 160, 160, 160, 160,
+ 145, 145, 145, 145, 145, 145, 145, 145, 47, 47, 369, 47, 47, 47, 47, 47,
+ 47, 362, 370, 47, 60, 371, 66, 47, 372, 66, 66, 47, 373, 145, 47, 47,
+ 374, 47, 47, 360, 375, 376, 377, 378, 180, 47, 47, 379, 380, 47, 47, 160,
+ 97, 47, 381, 382, 383, 47, 47, 384, 180, 47, 47, 385, 386, 387, 388, 145,
+ 47, 47, 389, 390, 32, 32, 32, 32, 47, 47, 365, 47, 47, 391, 172, 160,
+ 92, 47, 47, 113, 392, 393, 394, 32, 47, 47, 47, 395, 396, 397, 47, 47,
+ 47, 47, 47, 398, 399, 160, 160, 160, 47, 47, 400, 401, 402, 403, 32, 32,
+ 47, 47, 47, 404, 405, 160, 66, 66, 47, 47, 406, 407, 160, 160, 160, 160,
+ 47, 143, 408, 409, 47, 47, 47, 47, 47, 47, 389, 410, 66, 66, 66, 66,
+ 9, 9, 9, 9, 11, 11, 128, 411, 47, 47, 47, 412, 413, 160, 160, 160,
+ 47, 47, 47, 47, 47, 414, 415, 416, 417, 47, 47, 418, 419, 420, 47, 47,
+ 421, 422, 66, 47, 47, 47, 47, 47, 47, 47, 400, 423, 424, 128, 145, 425,
+ 47, 156, 426, 427, 32, 32, 32, 32, 47, 47, 47, 359, 428, 160, 47, 47,
+ 429, 430, 160, 160, 160, 160, 160, 160, 47, 47, 47, 47, 47, 47, 47, 431,
+ 47, 47, 47, 47, 145, 432, 433, 434, 219, 219, 219, 219, 219, 219, 219, 66,
+ 47, 47, 47, 47, 47, 47, 47, 424, 47, 47, 47, 208, 208, 208, 208, 208,
+ 47, 47, 47, 47, 47, 47, 305, 47, 47, 47, 47, 47, 160, 47, 47, 435,
+ 47, 47, 47, 436, 437, 438, 439, 47, 9, 9, 9, 9, 9, 9, 11, 11,
+ 145, 440, 66, 66, 66, 66, 66, 66, 47, 47, 47, 47, 391, 441, 416, 416,
+ 442, 443, 27, 27, 27, 27, 444, 416, 47, 445, 208, 208, 208, 208, 208, 208,
+ 32, 32, 32, 32, 32, 146, 146, 146, 146, 146, 146, 146, 146, 146, 446, 447,
+ 448, 146, 449, 146, 146, 146, 146, 146, 146, 146, 146, 146, 450, 146, 146, 146,
+ 9, 451, 11, 452, 453, 11, 196, 9, 454, 455, 9, 456, 11, 9, 451, 11,
+ 452, 453, 11, 196, 9, 454, 455, 9, 456, 11, 9, 451, 11, 452, 453, 11,
+ 196, 9, 454, 455, 9, 456, 11, 9, 451, 11, 196, 9, 457, 458, 459, 460,
+ 11, 461, 9, 462, 463, 464, 465, 11, 466, 9, 467, 11, 468, 160, 160, 160,
+ 32, 32, 32, 469, 32, 32, 470, 471, 472, 473, 32, 32, 32, 32, 32, 32,
+ 474, 11, 11, 11, 11, 11, 11, 11, 32, 32, 32, 32, 32, 32, 32, 32,
+ 47, 47, 47, 475, 476, 146, 146, 146, 47, 47, 477, 32, 47, 47, 478, 479,
+ 47, 47, 47, 47, 355, 32, 32, 32, 9, 9, 454, 11, 480, 305, 66, 66,
+ 145, 145, 481, 482, 145, 145, 145, 145, 145, 145, 483, 145, 145, 145, 145, 145,
+ 47, 47, 47, 47, 47, 47, 47, 226, 484, 146, 146, 146, 146, 146, 146, 146,
+ 146, 146, 146, 146, 146, 146, 146, 485, 146, 146, 146, 146, 146, 146, 146, 160,
+ 208, 208, 208, 208, 208, 208, 208, 208, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 939, 940, 941, 942, 946, 948, 0, 962,
+ 969, 970, 971, 976,1001,1002,1003,1008, 0,1033,1040,1041,1042,1043,1047, 0,
+ 0,1080,1081,1082,1086,1110, 0, 0,1124,1125,1126,1127,1131,1133, 0,1147,
+ 1154,1155,1156,1161,1187,1188,1189,1193, 0,1219,1226,1227,1228,1229,1233, 0,
+ 0,1267,1268,1269,1273,1298, 0,1303, 943,1128, 944,1129, 954,1139, 958,1143,
+ 959,1144, 960,1145, 961,1146, 964,1149, 0, 0, 973,1158, 974,1159, 975,1160,
+ 983,1168, 978,1163, 988,1173, 990,1175, 991,1176, 993,1178, 994,1179, 0, 0,
+ 1004,1190,1005,1191,1006,1192,1014,1199,1007, 0, 0, 0,1016,1201,1020,1206,
+ 0,1022,1208,1025,1211,1023,1209, 0, 0, 0, 0,1032,1218,1037,1223,1035,
+ 1221, 0, 0, 0,1044,1230,1045,1231,1049,1235, 0, 0,1058,1244,1064,1250,
+ 1060,1246,1066,1252,1067,1253,1072,1258,1069,1255,1077,1264,1074,1261, 0, 0,
+ 1083,1270,1084,1271,1085,1272,1088,1275,1089,1276,1096,1283,1103,1290,1111,1299,
+ 1115,1118,1307,1120,1309,1121,1310, 0,1053,1239, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,1093,1280, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 949,1134,1010,1195,1050,1236,1090,1277,1341,1368,1340,
+ 1367,1342,1369,1339,1366, 0,1320,1347,1418,1419,1323,1350, 0, 0, 992,1177,
+ 1018,1204,1055,1241,1416,1417,1415,1424,1202, 0, 0, 0, 987,1172, 0, 0,
+ 1031,1217,1321,1348,1322,1349,1338,1365, 950,1135, 951,1136, 979,1164, 980,1165,
+ 1011,1196,1012,1197,1051,1237,1052,1238,1061,1247,1062,1248,1091,1278,1092,1279,
+ 1071,1257,1076,1263, 0, 0, 997,1182, 0, 0, 0, 0, 0, 0, 945,1130,
+ 982,1167,1337,1364,1335,1362,1046,1232,1422,1423,1113,1301, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 8, 9, 0, 10,1425, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,1314,1427, 5,
+ 1434,1438,1443, 0,1450, 0,1455,1461,1514, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,1446,1458,1468,1476,1480,1486,1517, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,1489,1503,1494,1500,1508, 0, 0, 0, 0,1520,1521, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,1526,1528, 0,1525, 0, 0, 0,1522,
+ 0, 0, 0, 0,1536,1532,1539, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,1534, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,1556, 0, 0, 0, 0, 0, 0,1548,1550, 0,1547, 0, 0, 0,1567,
+ 0, 0, 0, 0,1558,1554,1561, 0, 0, 0, 0, 0, 0, 0,1568,1569,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,1529,1551, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,1523,1545,1524,1546, 0, 0,1527,1549,
+ 0, 0,1570,1571,1530,1552,1531,1553, 0, 0,1533,1555,1535,1557,1537,1559,
+ 0, 0,1572,1573,1544,1566,1538,1560,1540,1562,1541,1563,1542,1564, 0, 0,
+ 1543,1565, 0, 0, 0, 0, 0, 0, 0, 0,1606,1607,1609,1608,1610, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,1613, 0,1611, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1612, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,1620, 0, 0, 0, 0, 0, 0, 0,1623, 0, 0,1624, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1614,1615,1616,1617,1618,1619,1621,1622, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,1628,1629, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,1625,1626, 0,1627, 0, 0, 0,1634, 0, 0,1635, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,1630,1631,1632, 0, 0,1633, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1639, 0, 0,1638,1640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,1636,1637, 0, 0, 0, 0, 0, 0,1641, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,1642,1644,1643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1645, 0, 0, 0, 0, 0, 0, 0,1646, 0, 0, 0, 0, 0, 0,1648,
+ 1649, 0,1647,1650, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,1651,1653,1652, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,1654, 0,1655,1657,1656, 0, 0, 0, 0,1659, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,1660, 0, 0, 0, 0,1661, 0, 0, 0, 0,1662,
+ 0, 0, 0, 0,1663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,1658, 0, 0, 0, 0, 0, 0, 0, 0, 0,1664, 0,1665,1673, 0,
+ 1674, 0, 0, 0, 0, 0, 0, 0, 0,1666, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1668, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,1669, 0, 0, 0, 0,1670, 0, 0, 0, 0,1671,
+ 0, 0, 0, 0,1672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,1667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1675, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,1676, 0,
+ 1677, 0,1678, 0,1679, 0,1680, 0, 0, 0,1681, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,1682, 0,1683, 0, 0,1684,1685, 0,1686, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 953,1138, 955,1140, 956,1141, 957,1142,
+ 1324,1351, 963,1148, 965,1150, 968,1153, 966,1151, 967,1152,1378,1380,1379,1381,
+ 984,1169, 985,1170,1420,1421, 986,1171, 989,1174, 995,1180, 998,1183, 996,1181,
+ 999,1184,1000,1185,1015,1200,1329,1356,1017,1203,1019,1205,1021,1207,1024,1210,
+ 1687,1688,1027,1213,1026,1212,1028,1214,1029,1215,1030,1216,1034,1220,1036,1222,
+ 1039,1225,1038,1224,1334,1361,1336,1363,1382,1384,1383,1385,1056,1242,1057,1243,
+ 1059,1245,1063,1249,1689,1690,1065,1251,1068,1254,1070,1256,1386,1387,1388,1389,
+ 1691,1692,1073,1259,1075,1262,1079,1266,1078,1265,1095,1282,1098,1285,1097,1284,
+ 1390,1391,1392,1393,1099,1286,1100,1287,1101,1288,1102,1289,1105,1292,1104,1291,
+ 1106,1294,1107,1295,1108,1296,1114,1302,1119,1308,1122,1311,1123,1312,1186,1260,
+ 1293,1305, 0,1394, 0, 0, 0, 0, 952,1137, 947,1132,1317,1344,1316,1343,
+ 1319,1346,1318,1345,1693,1695,1371,1375,1370,1374,1373,1377,1372,1376,1694,1696,
+ 981,1166, 977,1162, 972,1157,1326,1353,1325,1352,1328,1355,1327,1354,1697,1698,
+ 1009,1194,1013,1198,1054,1240,1048,1234,1331,1358,1330,1357,1333,1360,1332,1359,
+ 1699,1700,1396,1401,1395,1400,1398,1403,1397,1402,1399,1404,1094,1281,1087,1274,
+ 1406,1411,1405,1410,1408,1413,1407,1412,1409,1414,1109,1297,1117,1306,1116,1304,
+ 1112,1300, 0, 0, 0, 0, 0, 0,1471,1472,1701,1705,1702,1706,1703,1707,
+ 1430,1431,1715,1719,1716,1720,1717,1721,1477,1478,1729,1731,1730,1732, 0, 0,
+ 1435,1436,1733,1735,1734,1736, 0, 0,1481,1482,1737,1741,1738,1742,1739,1743,
+ 1439,1440,1751,1755,1752,1756,1753,1757,1490,1491,1765,1768,1766,1769,1767,1770,
+ 1447,1448,1771,1774,1772,1775,1773,1776,1495,1496,1777,1779,1778,1780, 0, 0,
+ 1451,1452,1781,1783,1782,1784, 0, 0,1504,1505,1785,1788,1786,1789,1787,1790,
+ 0,1459, 0,1791, 0,1792, 0,1793,1509,1510,1794,1798,1795,1799,1796,1800,
+ 1462,1463,1808,1812,1809,1813,1810,1814,1467, 21,1475, 22,1479, 23,1485, 24,
+ 1493, 27,1499, 28,1507, 29, 0, 0,1704,1708,1709,1710,1711,1712,1713,1714,
+ 1718,1722,1723,1724,1725,1726,1727,1728,1740,1744,1745,1746,1747,1748,1749,1750,
+ 1754,1758,1759,1760,1761,1762,1763,1764,1797,1801,1802,1803,1804,1805,1806,1807,
+ 1811,1815,1816,1817,1818,1819,1820,1821,1470,1469,1822,1474,1465, 0,1473,1825,
+ 1429,1428,1426, 12,1432, 0, 26, 0, 0,1315,1823,1484,1466, 0,1483,1829,
+ 1433, 13,1437, 14,1441,1826,1827,1828,1488,1487,1513, 19, 0, 0,1492,1515,
+ 1445,1444,1442, 15, 0,1831,1832,1833,1502,1501,1516, 25,1497,1498,1506,1518,
+ 1457,1456,1454, 17,1453,1313, 11, 3, 0, 0,1824,1512,1519, 0,1511,1830,
+ 1449, 16,1460, 18,1464, 4, 0, 0, 30, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0,
+ 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,1834,1835, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,1836, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,1837,1839,1838, 0, 0, 0, 0,1840, 0, 0, 0,
+ 0,1841, 0, 0,1842, 0, 0, 0, 0, 0, 0, 0,1843, 0,1844, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,1845, 0, 0,1846, 0, 0,1847,
+ 0,1848, 0, 0, 0, 0, 0, 0, 937, 0,1850, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,1849, 936, 938,1851,1852, 0, 0,1853,1854, 0, 0,
+ 1855,1856, 0, 0, 0, 0, 0, 0,1857,1858, 0, 0,1861,1862, 0, 0,
+ 1863,1864, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,1867,1868,1869,1870,1859,1860,1865,1866, 0, 0, 0, 0,
+ 0, 0,1871,1872,1873,1874, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,1875, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,1877, 0,1878, 0,1879, 0,1880, 0,1881, 0,1882, 0,
+ 1883, 0,1884, 0,1885, 0,1886, 0,1887, 0,1888, 0, 0,1889, 0,1890,
+ 0,1891, 0, 0, 0, 0, 0, 0,1892,1893, 0,1894,1895, 0,1896,1897,
+ 0,1898,1899, 0,1900,1901, 0, 0, 0, 0, 0, 0,1876, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,1902, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,1904, 0,1905, 0,1906, 0,1907, 0,1908, 0,1909, 0,
+ 1910, 0,1911, 0,1912, 0,1913, 0,1914, 0,1915, 0, 0,1916, 0,1917,
+ 0,1918, 0, 0, 0, 0, 0, 0,1919,1920, 0,1921,1922, 0,1923,1924,
+ 0,1925,1926, 0,1927,1928, 0, 0, 0, 0, 0, 0,1903, 0, 0,1929,
+ 1930,1931,1932, 0, 0, 0,1933, 0, 710, 385, 724, 715, 455, 103, 186, 825,
+ 825, 242, 751, 205, 241, 336, 524, 601, 663, 676, 688, 738, 411, 434, 474, 500,
+ 649, 746, 799, 108, 180, 416, 482, 662, 810, 275, 462, 658, 692, 344, 618, 679,
+ 293, 388, 440, 492, 740, 116, 146, 168, 368, 414, 481, 527, 606, 660, 665, 722,
+ 781, 803, 809, 538, 553, 588, 642, 758, 811, 701, 233, 299, 573, 612, 487, 540,
+ 714, 779, 232, 267, 412, 445, 457, 585, 594, 766, 167, 613, 149, 148, 560, 589,
+ 648, 768, 708, 345, 411, 704, 105, 259, 313, 496, 518, 174, 542, 120, 307, 101,
+ 430, 372, 584, 183, 228, 529, 650, 697, 424, 732, 428, 349, 632, 355, 517, 110,
+ 135, 147, 403, 580, 624, 700, 750, 170, 193, 245, 297, 374, 463, 543, 763, 801,
+ 812, 815, 162, 384, 420, 730, 287, 330, 337, 366, 459, 476, 509, 558, 591, 610,
+ 726, 652, 734, 759, 154, 163, 198, 473, 683, 697, 292, 311, 353, 423, 572, 494,
+ 113, 217, 259, 280, 314, 499, 506, 603, 608, 752, 778, 782, 788, 117, 557, 748,
+ 774, 320, 109, 126, 260, 265, 373, 411, 479, 523, 655, 737, 823, 380, 765, 161,
+ 395, 398, 438, 451, 502, 516, 537, 583, 791, 136, 340, 769, 122, 273, 446, 727,
+ 305, 322, 400, 496, 771, 155, 190, 269, 377, 391, 406, 432, 501, 519, 599, 684,
+ 687, 749, 776, 175, 452, 191, 480, 510, 659, 772, 805, 813, 397, 444, 619, 566,
+ 568, 575, 491, 471, 707, 111, 636, 156, 153, 288, 346, 578, 256, 435, 383, 729,
+ 680, 767, 694, 295, 128, 210, 0, 0, 227, 0, 379, 0, 0, 150, 493, 525,
+ 544, 551, 552, 556, 783, 576, 604, 0, 661, 0, 703, 0, 0, 735, 743, 0,
+ 0, 0, 793, 794, 795, 808, 741, 773, 118, 127, 130, 166, 169, 177, 207, 213,
+ 215, 226, 229, 268, 270, 317, 327, 329, 335, 369, 375, 381, 404, 441, 448, 458,
+ 477, 484, 503, 539, 545, 547, 546, 548, 549, 550, 554, 555, 561, 564, 569, 591,
+ 593, 595, 598, 607, 620, 625, 625, 651, 690, 695, 705, 706, 716, 717, 733, 735,
+ 777, 786, 790, 315, 869, 623, 0, 0, 102, 145, 134, 115, 129, 138, 165, 171,
+ 207, 202, 206, 212, 227, 231, 240, 243, 250, 254, 294, 296, 303, 308, 319, 325,
+ 321, 329, 326, 335, 341, 357, 360, 362, 370, 379, 388, 389, 393, 421, 424, 438,
+ 456, 454, 458, 465, 477, 535, 485, 490, 493, 507, 512, 514, 521, 522, 525, 526,
+ 528, 533, 532, 541, 565, 569, 574, 586, 591, 597, 607, 637, 647, 674, 691, 693,
+ 695, 698, 703, 699, 705, 704, 702, 706, 709, 717, 728, 736, 747, 754, 770, 777,
+ 783, 784, 786, 787, 790, 802, 825, 848, 847, 857, 55, 65, 66, 883, 892, 916,
+ 822, 824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,1586, 0,1605, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,1602,1603,1934,1935,1574,1575,1576,1577,1579,1580,1581,1583,1584, 0,
+ 1585,1587,1588,1589,1591, 0,1592, 0,1593,1594, 0,1595,1596, 0,1598,1599,
+ 1600,1601,1604,1582,1578,1590,1597, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,1936, 0,1937, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,1938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,1939,1940, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,1941,1942, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,1944,1943, 0,1945, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0,1946,1947, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1948, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,1949,1950,1951,1952,1953,1954,1955, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,1956,1957,1958,1960,1959,1961, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 106, 104, 107, 826, 114, 118, 119, 121,
+ 123, 124, 127, 125, 34, 830, 130, 131, 132, 137, 827, 35, 133, 139, 829, 142,
+ 143, 112, 144, 145, 924, 151, 152, 37, 157, 158, 159, 160, 38, 165, 166, 169,
+ 171, 172, 173, 174, 176, 177, 178, 179, 181, 182, 182, 182, 833, 468, 184, 185,
+ 834, 187, 188, 189, 196, 192, 194, 195, 197, 199, 200, 201, 203, 204, 204, 206,
+ 208, 209, 211, 218, 213, 219, 214, 216, 153, 234, 221, 222, 223, 220, 225, 224,
+ 230, 835, 235, 236, 237, 238, 239, 244, 836, 837, 247, 248, 249, 246, 251, 39,
+ 40, 253, 255, 255, 838, 257, 258, 259, 261, 839, 262, 263, 301, 264, 41, 266,
+ 270, 272, 271, 841, 274, 842, 277, 276, 278, 281, 282, 42, 283, 284, 285, 286,
+ 43, 843, 44, 289, 290, 291, 293, 934, 298, 845, 845, 621, 300, 300, 45, 852,
+ 894, 302, 304, 46, 306, 309, 310, 312, 316, 48, 47, 317, 846, 318, 323, 324,
+ 325, 324, 328, 329, 333, 331, 332, 334, 335, 336, 338, 339, 342, 343, 347, 351,
+ 849, 350, 348, 352, 354, 359, 850, 361, 358, 356, 49, 363, 365, 367, 364, 50,
+ 369, 371, 851, 376, 386, 378, 53, 381, 52, 51, 140, 141, 387, 382, 614, 78,
+ 388, 389, 390, 394, 392, 856, 54, 399, 396, 402, 404, 858, 405, 401, 407, 55,
+ 408, 409, 410, 413, 859, 415, 56, 417, 860, 418, 57, 419, 422, 424, 425, 861,
+ 840, 862, 426, 863, 429, 431, 427, 433, 437, 441, 438, 439, 442, 443, 864, 436,
+ 449, 450, 58, 454, 453, 865, 447, 460, 866, 867, 461, 466, 465, 464, 59, 467,
+ 470, 469, 472, 828, 475, 868, 478, 870, 483, 485, 486, 871, 488, 489, 872, 873,
+ 495, 497, 60, 498, 61, 61, 504, 505, 507, 508, 511, 62, 513, 874, 515, 875,
+ 518, 844, 520, 876, 877, 878, 63, 64, 528, 880, 879, 881, 882, 530, 531, 531,
+ 533, 66, 534, 67, 68, 884, 536, 538, 541, 69, 885, 549, 886, 887, 556, 559,
+ 70, 561, 562, 563, 888, 889, 889, 567, 71, 890, 570, 571, 72, 891, 577, 73,
+ 581, 579, 582, 893, 587, 74, 590, 592, 596, 75, 895, 896, 76, 897, 600, 898,
+ 602, 605, 607, 899, 900, 609, 901, 611, 853, 77, 615, 616, 79, 617, 252, 902,
+ 903, 854, 855, 621, 622, 731, 80, 627, 626, 628, 164, 629, 630, 631, 633, 904,
+ 632, 634, 639, 640, 635, 641, 646, 651, 638, 643, 644, 645, 905, 907, 906, 81,
+ 653, 654, 656, 911, 657, 908, 82, 83, 909, 910, 84, 664, 665, 666, 667, 669,
+ 668, 671, 670, 674, 672, 673, 675, 85, 677, 678, 86, 681, 682, 912, 685, 686,
+ 87, 689, 36, 913, 914, 88, 89, 696, 702, 709, 711, 915, 712, 713, 718, 719,
+ 917, 831, 721, 720, 723, 832, 725, 728, 918, 919, 739, 742, 744, 920, 745, 753,
+ 756, 757, 755, 760, 761, 921, 762, 90, 764, 922, 91, 775, 279, 780, 923, 925,
+ 92, 93, 785, 926, 94, 927, 787, 787, 789, 928, 792, 95, 796, 797, 798, 800,
+ 96, 929, 802, 804, 806, 97, 98, 807, 930, 99, 931, 932, 933, 814, 100, 816,
+ 817, 818, 819, 820, 821, 935, 0, 0,
+};
+static const int16_t
+_hb_ucd_i16[196] =
+{
+ 0, 0, 0, 0, 1, -1, 0, 0, 2, 0, -2, 0, 0, 0, 0, 2,
+ 0, -2, 0, 0, 0, 0, 0, 16, 0, 0, 0, -16, 0, 0, 1, -1,
+ 0, 0, 0, 1, -1, 0, 0, 0, 0, 1, -1, 0, 3, 3, 3, -3,
+ -3, -3, 0, 0, 0, 2016, 0, 0, 0, 0, 0, 2527, 1923, 1914, 1918, 0,
+ 2250, 0, 0, 0, 0, 0, 0, 138, 0, 7, 0, 0, -7, 0, 0, 0,
+ 1, -1, 1, -1, -1, 1, -1, 0, 1824, 0, 0, 0, 0, 0, 2104, 0,
+ 2108, 2106, 0, 2106, 1316, 0, 0, 0, 0, 1, -1, 1, -1, -138, 0, 0,
+ 1, -1, 8, 8, 8, 0, 7, 7, 0, 0, -8, -8, -8, -7, -7, 0,
+ 1, -1, 0, 2,-1316, 1, -1, 0, -1, 1, -1, 1, -1, 3, 1, -1,
+ -3, 1, -1, 1, -1, 0, 0,-1914,-1918, 0, 0,-1923,-1824, 0, 0, 0,
+ 0,-2016, 0, 0, 1, -1, 0, 1, 0, 0,-2104, 0, 0, 0, 0,-2106,
+ -2108,-2106, 0, 0, 1, -1,-2250, 0, 0, 0,-2527, 0, 0, -2, 0, 1,
+ -1, 0, 1, -1,
};
static inline uint_fast8_t
_hb_ucd_gc (unsigned u)
{
- return u<1114112u?_hb_ucd_u8[4920+(((_hb_ucd_u8[1104+(((_hb_ucd_u16[((_hb_ucd_u8[272+(((_hb_ucd_u8[u>>1>>3>>3>>5])<<5)+((u>>1>>3>>3)&31u))])<<3)+((u>>1>>3)&7u)])<<3)+((u>>1)&7u))])<<1)+((u)&1u))]:2;
+ return u<1114112u?_hb_ucd_u8[5056+(((_hb_ucd_u8[1168+(((_hb_ucd_u16[((_hb_ucd_u8[544+(((_hb_ucd_u8[u>>1>>3>>3>>4])<<4)+((u>>1>>3>>3)&15u))])<<3)+((u>>1>>3)&7u)])<<3)+((u>>1)&7u))])<<1)+((u)&1u))]:2;
}
static inline uint_fast8_t
_hb_ucd_ccc (unsigned u)
{
- return u<125259u?_hb_ucd_u8[6796+(((_hb_ucd_u8[6276+(((_hb_ucd_u8[5844+(((_hb_ucd_u8[5508+(((_hb_ucd_u8[5262+(u>>2>>2>>2>>3)])<<3)+((u>>2>>2>>2)&7u))])<<2)+((u>>2>>2)&3u))])<<2)+((u>>2)&3u))])<<2)+((u)&3u))]:0;
+ return u<125259u?_hb_ucd_u8[6970+(((_hb_ucd_u8[6426+(((_hb_ucd_u8[5982+(((_hb_ucd_u8[5646+(((_hb_ucd_u8[5400+(u>>2>>2>>2>>3)])<<3)+((u>>2>>2>>2)&7u))])<<2)+((u>>2>>2)&3u))])<<2)+((u>>2)&3u))])<<2)+((u)&3u))]:0;
}
static inline unsigned
_hb_ucd_b4 (const uint8_t* a, unsigned i)
@@ -6759,17 +6877,17 @@ _hb_ucd_b4 (const uint8_t* a, unsigned i)
static inline int_fast16_t
_hb_ucd_bmg (unsigned u)
{
- return u<65380u?_hb_ucd_i16[((_hb_ucd_u8[7672+(((_hb_ucd_u8[7448+(((_hb_ucd_u8[7352+(((_hb_ucd_b4(7288+_hb_ucd_u8,u>>1>>2>>3>>3))<<3)+((u>>1>>2>>3)&7u))])<<3)+((u>>1>>2)&7u))])<<2)+((u>>1)&3u))])<<1)+((u)&1u)]:0;
+ return u<65380u?_hb_ucd_i16[((_hb_ucd_u8[7714+(((_hb_ucd_u8[7594+(((_hb_ucd_b4(7466+_hb_ucd_u8,u>>2>>3>>3))<<3)+((u>>2>>3)&7u))])<<3)+((u>>2)&7u))])<<2)+((u)&3u)]:0;
}
static inline uint_fast8_t
_hb_ucd_sc (unsigned u)
{
- return u<918016u?_hb_ucd_u8[11242+(((_hb_ucd_u8[10314+(((_hb_ucd_u8[8938+(((_hb_ucd_u8[8362+(((_hb_ucd_u8[7912+(u>>2>>2>>3>>4)])<<4)+((u>>2>>2>>3)&15u))])<<3)+((u>>2>>2)&7u))])<<2)+((u>>2)&3u))])<<2)+((u)&3u))]:2;
+ return u<918016u?_hb_ucd_u8[11480+(((_hb_ucd_u8[10532+(((_hb_ucd_u8[9124+(((_hb_ucd_u8[8500+(((_hb_ucd_u8[8050+(u>>2>>2>>3>>4)])<<4)+((u>>2>>2>>3)&15u))])<<3)+((u>>2>>2)&7u))])<<2)+((u>>2)&3u))])<<2)+((u)&3u))]:2;
}
static inline uint_fast16_t
_hb_ucd_dm (unsigned u)
{
- return u<195102u?_hb_ucd_u16[1536+(((_hb_ucd_u8[12544+(((_hb_ucd_u8[12162+(u>>4>>5)])<<5)+((u>>4)&31u))])<<4)+((u)&15u))]:0;
+ return u<195102u?_hb_ucd_u16[1576+(((_hb_ucd_u8[12802+(((_hb_ucd_u8[12420+(u>>4>>5)])<<5)+((u>>4)&31u))])<<4)+((u)&15u))]:0;
}
#endif
diff --git a/thirdparty/harfbuzz/src/hb-ucd.cc b/thirdparty/harfbuzz/src/hb-ucd.cc
index ad72a26c04..baea224a25 100644
--- a/thirdparty/harfbuzz/src/hb-ucd.cc
+++ b/thirdparty/harfbuzz/src/hb-ucd.cc
@@ -203,9 +203,7 @@ hb_ucd_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
}
-#if HB_USE_ATEXIT
static void free_static_ucd_funcs ();
-#endif
static struct hb_ucd_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader_t<hb_ucd_unicode_funcs_lazy_loader_t>
{
@@ -222,21 +220,17 @@ static struct hb_ucd_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader_
hb_unicode_funcs_make_immutable (funcs);
-#if HB_USE_ATEXIT
- atexit (free_static_ucd_funcs);
-#endif
+ hb_atexit (free_static_ucd_funcs);
return funcs;
}
} static_ucd_funcs;
-#if HB_USE_ATEXIT
-static
+static inline
void free_static_ucd_funcs ()
{
static_ucd_funcs.free_instance ();
}
-#endif
hb_unicode_funcs_t *
hb_ucd_get_unicode_funcs ()
diff --git a/thirdparty/harfbuzz/src/hb-unicode-emoji-table.hh b/thirdparty/harfbuzz/src/hb-unicode-emoji-table.hh
index eb7776eecb..c216379201 100644
--- a/thirdparty/harfbuzz/src/hb-unicode-emoji-table.hh
+++ b/thirdparty/harfbuzz/src/hb-unicode-emoji-table.hh
@@ -6,14 +6,14 @@
*
* on file with this header:
*
- * # emoji-data.txt
- * # Date: 2020-01-28, 20:52:38 GMT
- * # © 2020 Unicode®, Inc.
+ * # emoji-data-14.0.0.txt
+ * # Date: 2021-08-26, 17:22:22 GMT
+ * # © 2021 Unicode®, Inc.
* # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
* # For terms of use, see http://www.unicode.org/terms_of_use.html
* #
* # Emoji Data for UTS #51
- * # Version: 13.0
+ * # Used with Emoji Version 14.0 and subsequent minor revisions (if any)
* #
* # For documentation and usage, see http://www.unicode.org/reports/tr51
*/
@@ -24,36 +24,42 @@
#include "hb-unicode.hh"
static const uint8_t
-_hb_emoji_u8[448] =
+_hb_emoji_u8[544] =
{
- 0, 0, 0, 0, 33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, 17, 17, 17, 50, 20, 21, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,118,152,
+ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,118,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 3,
- 0, 0, 0, 0, 0, 0, 4, 5, 6, 7, 8, 7, 9, 10, 11, 0,
- 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0,
- 7, 7, 7, 14, 15, 16, 17, 18, 19, 20, 7, 7, 7, 7, 7, 21,
- 7, 7, 7, 7, 22, 23, 7, 7, 7, 24, 7, 14, 0, 25, 0, 26,
- 27, 28, 29, 14, 30, 31, 7, 7, 7, 7, 7, 14, 0, 0, 0, 0,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 22,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 1, 0, 2, 0, 0,
- 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, 7, 3,
- 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,
- 159,255,243,255,255,255,255,255,255,255,255,255,255,255,255,255,
- 31, 0,255,255,255,255,255,255, 31,255, 3, 0, 0, 0, 8, 0,
- 0, 0, 24, 0,120, 0, 0, 0, 0, 0, 96, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 16, 0, 96, 0, 0, 8, 0, 0, 0, 0,
- 255,255,255,255,255,255,255,127, 0, 96, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,240, 1, 64, 0, 0,254, 3, 0,224,255,255,
- 255,255,255,255, 31, 0, 0, 0,254,127, 0, 0, 0, 0,252,115,
- 0,254,255,255,255,255,255,255,255,255,255,255,255,255,255, 3,
- 255,255,255,255,255,255,255, 31,192,255,255,255,255,255,255,255,
- 255,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,127,
- 0, 0,224,255,255,255,255,127, 0,112, 0, 0, 0, 0, 0, 0,
- 0,127, 0,124, 0, 0, 0, 0, 0,127, 0, 0, 0,192,255,255,
- 0,240,255,255,255,255,255,243,159,255,255,255,255,255,255,255,
+ 2, 3, 0, 0, 4, 0, 5, 0, 0, 0, 0, 0, 6, 0, 7, 8,
+ 0, 0, 0, 9, 0, 0, 10, 11, 12, 13, 14, 13, 15, 16, 17, 0,
+ 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 19, 20, 0, 0,
+ 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0,
+ 13, 13, 13, 13, 23, 24, 25, 26, 27, 28, 13, 13, 13, 13, 13, 29,
+ 13, 13, 13, 13, 30, 31, 13, 13, 13, 32, 13, 13, 0, 33, 0, 34,
+ 35, 36, 37, 13, 38, 39, 13, 13, 13, 13, 13, 13, 0, 0, 0, 0,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 30,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 16, 0, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4, 0, 0, 2, 0, 0,240, 3, 0, 6, 0, 0,
+ 0, 0, 0, 12, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
+ 0,128, 0, 0, 0,254, 15, 7, 4, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 12, 64, 0, 1, 0, 0, 0, 0, 0, 0,120,
+ 191,255,247,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 63, 0,255,255,255,255,255,255, 63,255, 87, 32, 2, 1, 24, 0,
+ 144, 80,184, 0,248, 0, 0, 0, 0, 0,224, 0, 2, 0, 1,128,
+ 0, 0, 0, 0, 0, 0, 48, 0,224, 0, 0, 24, 0, 0, 0, 0,
+ 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 32,
+ 0, 0,128, 2, 0, 0, 0, 0, 0,224, 0, 0, 0,128, 0, 0,
+ 0, 0, 0, 0, 0,240, 3,192, 0, 64,254, 7, 0,224,255,255,
+ 255,255,255,255, 63, 0, 0, 0,254,255, 0, 4, 0,128,252,247,
+ 0,254,255,255,255,255,255,255,255,255,255,255,255,255,255, 7,
+ 255,255,255,255,255,255,255, 63,192,255,255,255,255,255,255,255,
+ 255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,255,
+ 0, 0,224,255,255,255,255,255, 0,240, 0, 0, 0, 0, 0, 0,
+ 0,255, 0,252, 0, 0, 0, 0, 0,255, 0, 0, 0,192,255,255,
+ 0,240,255,255,255,255,255,247,191,255,255,255,255,255,255,255,
};
static inline unsigned
@@ -69,7 +75,7 @@ _hb_emoji_b1 (const uint8_t* a, unsigned i)
static inline uint_fast8_t
_hb_emoji_is_Extended_Pictographic (unsigned u)
{
- return u<131069u?_hb_emoji_b1(192+_hb_emoji_u8,((_hb_emoji_u8[64+(((_hb_emoji_b4(_hb_emoji_u8,u>>6>>4))<<4)+((u>>6)&15u))])<<6)+((u)&63u)):0;
+ return u<131070u?_hb_emoji_b1(224+_hb_emoji_u8,((_hb_emoji_u8[64+(((_hb_emoji_b4(_hb_emoji_u8,u>>6>>4))<<4)+((u>>6)&15u))])<<6)+((u)&63u)):0;
}
diff --git a/thirdparty/harfbuzz/src/hb-unicode.cc b/thirdparty/harfbuzz/src/hb-unicode.cc
index 7470bb1b6e..83ead6398b 100644
--- a/thirdparty/harfbuzz/src/hb-unicode.cc
+++ b/thirdparty/harfbuzz/src/hb-unicode.cc
@@ -268,7 +268,7 @@ hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs)
hb_unicode_funcs_destroy (ufuncs->parent);
- free (ufuncs);
+ hb_free (ufuncs);
}
/**
diff --git a/thirdparty/harfbuzz/src/hb-unicode.hh b/thirdparty/harfbuzz/src/hb-unicode.hh
index 34d66d7aa3..0a79944107 100644
--- a/thirdparty/harfbuzz/src/hb-unicode.hh
+++ b/thirdparty/harfbuzz/src/hb-unicode.hh
@@ -289,8 +289,8 @@ DECLARE_NULL_INSTANCE (hb_unicode_funcs_t);
#define HB_MODIFIED_COMBINING_CLASS_CCC15 18 /* tsere */
#define HB_MODIFIED_COMBINING_CLASS_CCC16 19 /* segol */
#define HB_MODIFIED_COMBINING_CLASS_CCC17 20 /* patah */
-#define HB_MODIFIED_COMBINING_CLASS_CCC18 21 /* qamats */
-#define HB_MODIFIED_COMBINING_CLASS_CCC19 14 /* holam */
+#define HB_MODIFIED_COMBINING_CLASS_CCC18 21 /* qamats & qamats qatan */
+#define HB_MODIFIED_COMBINING_CLASS_CCC19 14 /* holam & holam haser for vav*/
#define HB_MODIFIED_COMBINING_CLASS_CCC20 24 /* qubuts */
#define HB_MODIFIED_COMBINING_CLASS_CCC21 12 /* dagesh */
#define HB_MODIFIED_COMBINING_CLASS_CCC22 25 /* meteg */
@@ -359,6 +359,13 @@ DECLARE_NULL_INSTANCE (hb_unicode_funcs_t);
FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | \
FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))
+#define HB_UNICODE_GENERAL_CATEGORY_IS_LETTER(gen_cat) \
+ (FLAG_UNSAFE (gen_cat) & \
+ (FLAG (HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER) | \
+ FLAG (HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER)))
/*
* Ranges, used for bsearch tables.
diff --git a/thirdparty/harfbuzz/src/hb-uniscribe.cc b/thirdparty/harfbuzz/src/hb-uniscribe.cc
index 48a5dc50ad..3dc4c0937d 100644
--- a/thirdparty/harfbuzz/src/hb-uniscribe.cc
+++ b/thirdparty/harfbuzz/src/hb-uniscribe.cc
@@ -44,6 +44,7 @@
#include "hb-uniscribe.h"
+#include "hb-ms-feature-ranges.hh"
#include "hb-open-file.hh"
#include "hb-ot-name-table.hh"
#include "hb-ot-layout.h"
@@ -238,30 +239,26 @@ struct hb_uniscribe_shaper_funcs_t
}
};
-#if HB_USE_ATEXIT
-static void free_static_uniscribe_shaper_funcs ();
-#endif
+static inline void free_static_uniscribe_shaper_funcs ();
static struct hb_uniscribe_shaper_funcs_lazy_loader_t : hb_lazy_loader_t<hb_uniscribe_shaper_funcs_t,
hb_uniscribe_shaper_funcs_lazy_loader_t>
{
static hb_uniscribe_shaper_funcs_t *create ()
{
- hb_uniscribe_shaper_funcs_t *funcs = (hb_uniscribe_shaper_funcs_t *) calloc (1, sizeof (hb_uniscribe_shaper_funcs_t));
+ hb_uniscribe_shaper_funcs_t *funcs = (hb_uniscribe_shaper_funcs_t *) hb_calloc (1, sizeof (hb_uniscribe_shaper_funcs_t));
if (unlikely (!funcs))
return nullptr;
funcs->init ();
-#if HB_USE_ATEXIT
- atexit (free_static_uniscribe_shaper_funcs);
-#endif
+ hb_atexit (free_static_uniscribe_shaper_funcs);
return funcs;
}
static void destroy (hb_uniscribe_shaper_funcs_t *p)
{
- free ((void *) p);
+ hb_free ((void *) p);
}
static hb_uniscribe_shaper_funcs_t *get_null ()
{
@@ -269,13 +266,11 @@ static struct hb_uniscribe_shaper_funcs_lazy_loader_t : hb_lazy_loader_t<hb_unis
}
} static_uniscribe_shaper_funcs;
-#if HB_USE_ATEXIT
-static
+static inline
void free_static_uniscribe_shaper_funcs ()
{
static_uniscribe_shaper_funcs.free_instance ();
}
-#endif
static hb_uniscribe_shaper_funcs_t *
hb_uniscribe_shaper_get_funcs ()
@@ -284,44 +279,6 @@ hb_uniscribe_shaper_get_funcs ()
}
-struct active_feature_t {
- OPENTYPE_FEATURE_RECORD rec;
- unsigned int order;
-
- HB_INTERNAL static int cmp (const void *pa, const void *pb) {
- const active_feature_t *a = (const active_feature_t *) pa;
- const active_feature_t *b = (const active_feature_t *) pb;
- return a->rec.tagFeature < b->rec.tagFeature ? -1 : a->rec.tagFeature > b->rec.tagFeature ? 1 :
- a->order < b->order ? -1 : a->order > b->order ? 1 :
- a->rec.lParameter < b->rec.lParameter ? -1 : a->rec.lParameter > b->rec.lParameter ? 1 :
- 0;
- }
- bool operator== (const active_feature_t *f)
- { return cmp (this, f) == 0; }
-};
-
-struct feature_event_t {
- unsigned int index;
- bool start;
- active_feature_t feature;
-
- HB_INTERNAL static int cmp (const void *pa, const void *pb)
- {
- const feature_event_t *a = (const feature_event_t *) pa;
- const feature_event_t *b = (const feature_event_t *) pb;
- return a->index < b->index ? -1 : a->index > b->index ? 1 :
- a->start < b->start ? -1 : a->start > b->start ? 1 :
- active_feature_t::cmp (&a->feature, &b->feature);
- }
-};
-
-struct range_record_t {
- TEXTRANGE_PROPERTIES props;
- unsigned int index_first; /* == start */
- unsigned int index_last; /* == end - 1 */
-};
-
-
/*
* shaper face data
*/
@@ -391,7 +348,7 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name)
unsigned int name_table_offset = (length + 3) & ~3;
new_length = name_table_offset + padded_name_table_length;
- void *new_sfnt_data = calloc (1, new_length);
+ void *new_sfnt_data = hb_calloc (1, new_length);
if (!new_sfnt_data)
{
hb_blob_destroy (blob);
@@ -441,7 +398,7 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name)
}
else if (face_index == 0) /* Fail if first face doesn't have 'name' table. */
{
- free (new_sfnt_data);
+ hb_free (new_sfnt_data);
hb_blob_destroy (blob);
return nullptr;
}
@@ -453,20 +410,20 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name)
hb_blob_destroy (blob);
return hb_blob_create ((const char *) new_sfnt_data, new_length,
- HB_MEMORY_MODE_WRITABLE, new_sfnt_data, free);
+ HB_MEMORY_MODE_WRITABLE, new_sfnt_data, hb_free);
}
hb_uniscribe_face_data_t *
_hb_uniscribe_shaper_face_data_create (hb_face_t *face)
{
- hb_uniscribe_face_data_t *data = (hb_uniscribe_face_data_t *) calloc (1, sizeof (hb_uniscribe_face_data_t));
+ hb_uniscribe_face_data_t *data = (hb_uniscribe_face_data_t *) hb_calloc (1, sizeof (hb_uniscribe_face_data_t));
if (unlikely (!data))
return nullptr;
data->funcs = hb_uniscribe_shaper_get_funcs ();
if (unlikely (!data->funcs))
{
- free (data);
+ hb_free (data);
return nullptr;
}
@@ -477,7 +434,7 @@ _hb_uniscribe_shaper_face_data_create (hb_face_t *face)
blob = _hb_rename_font (blob, data->face_name);
if (unlikely (!blob))
{
- free (data);
+ hb_free (data);
return nullptr;
}
@@ -488,7 +445,7 @@ _hb_uniscribe_shaper_face_data_create (hb_face_t *face)
if (unlikely (!data->fh))
{
DEBUG_MSG (UNISCRIBE, face, "Face AddFontMemResourceEx() failed");
- free (data);
+ hb_free (data);
return nullptr;
}
@@ -499,7 +456,7 @@ void
_hb_uniscribe_shaper_face_data_destroy (hb_uniscribe_face_data_t *data)
{
RemoveFontMemResourceEx (data->fh);
- free (data);
+ hb_free (data);
}
@@ -533,7 +490,7 @@ populate_log_font (LOGFONTW *lf,
hb_uniscribe_font_data_t *
_hb_uniscribe_shaper_font_data_create (hb_font_t *font)
{
- hb_uniscribe_font_data_t *data = (hb_uniscribe_font_data_t *) calloc (1, sizeof (hb_uniscribe_font_data_t));
+ hb_uniscribe_font_data_t *data = (hb_uniscribe_font_data_t *) hb_calloc (1, sizeof (hb_uniscribe_font_data_t));
if (unlikely (!data))
return nullptr;
@@ -580,7 +537,7 @@ _hb_uniscribe_shaper_font_data_destroy (hb_uniscribe_font_data_t *data)
DeleteObject (data->hfont);
if (data->script_cache)
ScriptFreeCache (&data->script_cache);
- free (data);
+ hb_free (data);
}
/**
@@ -635,109 +592,6 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
const hb_uniscribe_font_data_t *font_data = font->data.uniscribe;
hb_uniscribe_shaper_funcs_t *funcs = face_data->funcs;
- /*
- * Set up features.
- */
- hb_vector_t<OPENTYPE_FEATURE_RECORD> feature_records;
- hb_vector_t<range_record_t> range_records;
- if (num_features)
- {
- /* Sort features by start/end events. */
- hb_vector_t<feature_event_t> feature_events;
- for (unsigned int i = 0; i < num_features; i++)
- {
- active_feature_t feature;
- feature.rec.tagFeature = hb_uint32_swap (features[i].tag);
- feature.rec.lParameter = features[i].value;
- feature.order = i;
-
- feature_event_t *event;
-
- event = feature_events.push ();
- event->index = features[i].start;
- event->start = true;
- event->feature = feature;
-
- event = feature_events.push ();
- event->index = features[i].end;
- event->start = false;
- event->feature = feature;
- }
- feature_events.qsort ();
- /* Add a strategic final event. */
- {
- active_feature_t feature;
- feature.rec.tagFeature = 0;
- feature.rec.lParameter = 0;
- feature.order = num_features + 1;
-
- feature_event_t *event = feature_events.push ();
- event->index = 0; /* This value does magic. */
- event->start = false;
- event->feature = feature;
- }
-
- /* Scan events and save features for each range. */
- hb_vector_t<active_feature_t> active_features;
- unsigned int last_index = 0;
- for (unsigned int i = 0; i < feature_events.length; i++)
- {
- feature_event_t *event = &feature_events[i];
-
- if (event->index != last_index)
- {
- /* Save a snapshot of active features and the range. */
- range_record_t *range = range_records.push ();
-
- unsigned int offset = feature_records.length;
-
- active_features.qsort ();
- for (unsigned int j = 0; j < active_features.length; j++)
- {
- if (!j || active_features[j].rec.tagFeature != feature_records[feature_records.length - 1].tagFeature)
- {
- feature_records.push (active_features[j].rec);
- }
- else
- {
- /* Overrides value for existing feature. */
- feature_records[feature_records.length - 1].lParameter = active_features[j].rec.lParameter;
- }
- }
-
- /* Will convert to pointer after all is ready, since feature_records.array
- * may move as we grow it. */
- range->props.potfRecords = reinterpret_cast<OPENTYPE_FEATURE_RECORD *> (offset);
- range->props.cotfRecords = feature_records.length - offset;
- range->index_first = last_index;
- range->index_last = event->index - 1;
-
- last_index = event->index;
- }
-
- if (event->start)
- {
- active_features.push (event->feature);
- }
- else
- {
- active_feature_t *feature = active_features.find (&event->feature);
- if (feature)
- active_features.remove (feature - active_features.arrayZ);
- }
- }
-
- if (!range_records.length) /* No active feature found. */
- num_features = 0;
-
- /* Fixup the pointers. */
- for (unsigned int i = 0; i < range_records.length; i++)
- {
- range_record_t *range = &range_records[i];
- range->props.potfRecords = (OPENTYPE_FEATURE_RECORD *) feature_records + reinterpret_cast<uintptr_t> (range->props.potfRecords);
- }
- }
-
#define FAIL(...) \
HB_STMT_START { \
DEBUG_MSG (UNISCRIBE, nullptr, __VA_ARGS__); \
@@ -856,8 +710,23 @@ retry:
nullptr, nullptr,
&lang_count, &lang_tag);
OPENTYPE_TAG language_tag = hb_uint32_swap (lang_count ? lang_tag : HB_TAG_NONE);
- hb_vector_t<TEXTRANGE_PROPERTIES*> range_properties;
- hb_vector_t<int> range_char_counts;
+
+ /*
+ * Set up features.
+ */
+ static_assert ((sizeof (TEXTRANGE_PROPERTIES) == sizeof (hb_ms_features_t)), "");
+ static_assert ((sizeof (OPENTYPE_FEATURE_RECORD) == sizeof (hb_ms_feature_t)), "");
+ hb_vector_t<hb_ms_feature_t> feature_records;
+ hb_vector_t<hb_ms_range_record_t> range_records;
+ bool has_features = false;
+ if (num_features)
+ has_features = hb_ms_setup_features (features,
+ num_features,
+ feature_records,
+ range_records);
+
+ hb_vector_t<hb_ms_features_t*> range_properties;
+ hb_vector_t<uint32_t> range_char_counts;
unsigned int glyphs_offset = 0;
unsigned int glyphs_len;
@@ -867,42 +736,14 @@ retry:
unsigned int chars_offset = items[i].iCharPos;
unsigned int item_chars_len = items[i + 1].iCharPos - chars_offset;
- if (num_features)
- {
- range_properties.shrink (0);
- range_char_counts.shrink (0);
-
- range_record_t *last_range = &range_records[0];
-
- for (unsigned int k = chars_offset; k < chars_offset + item_chars_len; k++)
- {
- range_record_t *range = last_range;
- while (log_clusters[k] < range->index_first)
- range--;
- while (log_clusters[k] > range->index_last)
- range++;
- if (!range_properties.length ||
- &range->props != range_properties[range_properties.length - 1])
- {
- TEXTRANGE_PROPERTIES **props = range_properties.push ();
- int *c = range_char_counts.push ();
- if (unlikely (!props || !c))
- {
- range_properties.shrink (0);
- range_char_counts.shrink (0);
- break;
- }
- *props = &range->props;
- *c = 1;
- }
- else
- {
- range_char_counts[range_char_counts.length - 1]++;
- }
-
- last_range = range;
- }
- }
+ if (has_features)
+ hb_ms_make_feature_ranges (feature_records,
+ range_records,
+ item_chars_len,
+ chars_offset,
+ log_clusters,
+ range_properties,
+ range_char_counts);
/* Asking for glyphs in logical order circumvents at least
* one bug in Uniscribe. */
@@ -914,8 +755,8 @@ retry:
&items[i].a,
script_tags[i],
language_tag,
- range_char_counts.arrayZ,
- range_properties.arrayZ,
+ (int *) range_char_counts.arrayZ,
+ (TEXTRANGE_PROPERTIES**) range_properties.arrayZ,
range_properties.length,
pchars + chars_offset,
item_chars_len,
@@ -955,8 +796,8 @@ retry:
&items[i].a,
script_tags[i],
language_tag,
- range_char_counts.arrayZ,
- range_properties.arrayZ,
+ (int *) range_char_counts.arrayZ,
+ (TEXTRANGE_PROPERTIES**) range_properties.arrayZ,
range_properties.length,
pchars + chars_offset,
log_clusters + chars_offset,
diff --git a/thirdparty/harfbuzz/src/hb-vector.hh b/thirdparty/harfbuzz/src/hb-vector.hh
index 13517a9c29..110d457caf 100644
--- a/thirdparty/harfbuzz/src/hb-vector.hh
+++ b/thirdparty/harfbuzz/src/hb-vector.hh
@@ -69,7 +69,7 @@ struct hb_vector_t
void fini ()
{
- free (arrayZ);
+ hb_free (arrayZ);
init ();
}
void fini_deep ()
@@ -177,6 +177,11 @@ struct hb_vector_t
Type *push (T&& v)
{
Type *p = push ();
+ if (p == &Crap (Type))
+ // If push failed to allocate then don't copy v, since this may cause
+ // the created copy to leak memory since we won't have stored a
+ // reference to it.
+ return p;
*p = hb_forward<T> (v);
return p;
}
@@ -204,7 +209,7 @@ struct hb_vector_t
(new_allocated < (unsigned) allocated) ||
hb_unsigned_mul_overflows (new_allocated, sizeof (Type));
if (likely (!overflows))
- new_array = (Type *) realloc (arrayZ, new_allocated * sizeof (Type));
+ new_array = (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type));
if (unlikely (!new_array))
{
@@ -310,7 +315,7 @@ struct hb_sorted_vector_t : hb_vector_t<Type>
{ return as_array ().bsearch (x, not_found); }
template <typename T>
bool bfind (const T &x, unsigned int *i = nullptr,
- hb_bfind_not_found_t not_found = HB_BFIND_NOT_FOUND_DONT_STORE,
+ hb_not_found_t not_found = HB_NOT_FOUND_DONT_STORE,
unsigned int to_store = (unsigned int) -1) const
{ return as_array ().bfind (x, i, not_found, to_store); }
};
diff --git a/thirdparty/harfbuzz/src/hb-version.h b/thirdparty/harfbuzz/src/hb-version.h
index 6db58c3f7c..70325f88eb 100644
--- a/thirdparty/harfbuzz/src/hb-version.h
+++ b/thirdparty/harfbuzz/src/hb-version.h
@@ -41,13 +41,13 @@ HB_BEGIN_DECLS
*
* The major component of the library version available at compile-time.
*/
-#define HB_VERSION_MAJOR 2
+#define HB_VERSION_MAJOR 3
/**
* HB_VERSION_MINOR:
*
* The minor component of the library version available at compile-time.
*/
-#define HB_VERSION_MINOR 8
+#define HB_VERSION_MINOR 0
/**
* HB_VERSION_MICRO:
*
@@ -60,7 +60,7 @@ HB_BEGIN_DECLS
*
* A string literal containing the library version available at compile-time.
*/
-#define HB_VERSION_STRING "2.8.0"
+#define HB_VERSION_STRING "3.0.0"
/**
* HB_VERSION_ATLEAST:
diff --git a/thirdparty/harfbuzz/src/hb.hh b/thirdparty/harfbuzz/src/hb.hh
index 18516581c7..829b5a1ab7 100644
--- a/thirdparty/harfbuzz/src/hb.hh
+++ b/thirdparty/harfbuzz/src/hb.hh
@@ -117,6 +117,9 @@
#pragma GCC diagnostic ignored "-Wshadow" // TODO fix
#pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations" // TODO fix
#pragma GCC diagnostic ignored "-Wunused-parameter" // TODO fix
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic ignored "-Wunused-result" // TODO fix
+#endif
#endif
/* Ignored intentionally. */
@@ -179,6 +182,9 @@
#include <cassert>
#include <cfloat>
#include <climits>
+#ifdef _MSC_VER
+# define _USE_MATH_DEFINES
+#endif
#include <cmath>
#include <cstdarg>
#include <cstddef>
@@ -220,10 +226,15 @@ extern "C" void* hb_malloc_impl(size_t size);
extern "C" void* hb_calloc_impl(size_t nmemb, size_t size);
extern "C" void* hb_realloc_impl(void *ptr, size_t size);
extern "C" void hb_free_impl(void *ptr);
-#define malloc hb_malloc_impl
-#define calloc hb_calloc_impl
-#define realloc hb_realloc_impl
-#define free hb_free_impl
+#define hb_malloc hb_malloc_impl
+#define hb_calloc hb_calloc_impl
+#define hb_realloc hb_realloc_impl
+#define hb_free hb_free_impl
+#else
+#define hb_malloc malloc
+#define hb_calloc calloc
+#define hb_realloc realloc
+#define hb_free free
#endif
@@ -335,7 +346,6 @@ extern "C" void hb_free_impl(void *ptr);
#else
# define HB_NODISCARD
#endif
-#define hb_success_t HB_NODISCARD bool
/* https://github.com/harfbuzz/harfbuzz/issues/1852 */
#if defined(__clang__) && !(defined(_AIX) && (defined(__IBMCPP__) || defined(__ibmxl__)))
@@ -376,7 +386,7 @@ extern "C" void hb_free_impl(void *ptr);
# define HB_NO_SETLOCALE
# define HB_NO_ERRNO
# endif
-# elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+# elif !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
# ifndef HB_NO_GETENV
# define HB_NO_GETENV
# endif
@@ -398,6 +408,9 @@ static int HB_UNUSED _hb_errno = 0;
# define errno _hb_errno
#endif
+#define HB_STMT_START do
+#define HB_STMT_END while (0)
+
#if defined(HAVE_ATEXIT) && !defined(HB_USE_ATEXIT)
/* atexit() is only safe to be called from shared libraries on certain
* platforms. Whitelist.
@@ -426,16 +439,23 @@ static int HB_UNUSED _hb_errno = 0;
*/
# define HB_USE_ATEXIT 1
# endif
-#endif
+#endif /* defined(HAVE_ATEXIT) && !defined(HB_USE_ATEXIT) */
#ifdef HB_NO_ATEXIT
# undef HB_USE_ATEXIT
#endif
#ifndef HB_USE_ATEXIT
# define HB_USE_ATEXIT 0
#endif
-
-#define HB_STMT_START do
-#define HB_STMT_END while (0)
+#if !HB_USE_ATEXIT
+# define hb_atexit(_) HB_STMT_START { if (0) (_) (); } HB_STMT_END
+#else /* HB_USE_ATEXIT */
+# ifdef HAVE_ATEXIT
+# define hb_atexit atexit
+# else
+ template <void (*function) (void)> struct hb_atexit_t { ~hb_atexit_t () { function (); } };
+# define hb_atexit(f) static hb_atexit_t<f> _hb_atexit_##__LINE__;
+# endif
+#endif
/* Lets assert int types. Saves trouble down the road. */
static_assert ((sizeof (hb_codepoint_t) == 4), "");
diff --git a/thirdparty/misc/easing_equations.cpp b/thirdparty/misc/easing_equations.cpp
deleted file mode 100644
index ce32c1a362..0000000000
--- a/thirdparty/misc/easing_equations.cpp
+++ /dev/null
@@ -1,319 +0,0 @@
-/**
- * Adapted from Penner Easing equations' C++ port.
- * Source: https://github.com/jesusgollonet/ofpennereasing
- * License: BSD-3-clause
- */
-
-#include "scene/animation/tween.h"
-
-const real_t pi = 3.1415926535898;
-
-///////////////////////////////////////////////////////////////////////////
-// linear
-///////////////////////////////////////////////////////////////////////////
-namespace linear {
-static real_t in(real_t t, real_t b, real_t c, real_t d) {
- return c * t / d + b;
-}
-
-static real_t out(real_t t, real_t b, real_t c, real_t d) {
- return c * t / d + b;
-}
-
-static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
- return c * t / d + b;
-}
-
-static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
- return c * t / d + b;
-}
-}; // namespace linear
-///////////////////////////////////////////////////////////////////////////
-// sine
-///////////////////////////////////////////////////////////////////////////
-namespace sine {
-static real_t in(real_t t, real_t b, real_t c, real_t d) {
- return -c * cos(t / d * (pi / 2)) + c + b;
-}
-
-static real_t out(real_t t, real_t b, real_t c, real_t d) {
- return c * sin(t / d * (pi / 2)) + b;
-}
-
-static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
- return -c / 2 * (cos(pi * t / d) - 1) + b;
-}
-
-static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
- return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
-}
-}; // namespace sine
-///////////////////////////////////////////////////////////////////////////
-// quint
-///////////////////////////////////////////////////////////////////////////
-namespace quint {
-static real_t in(real_t t, real_t b, real_t c, real_t d) {
- return c * pow(t / d, 5) + b;
-}
-
-static real_t out(real_t t, real_t b, real_t c, real_t d) {
- return c * (pow(t / d - 1, 5) + 1) + b;
-}
-
-static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
- t = t / d * 2;
- if (t < 1) return c / 2 * pow(t, 5) + b;
- return c / 2 * (pow(t - 2, 5) + 2) + b;
-}
-
-static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
- return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
-}
-}; // namespace quint
-///////////////////////////////////////////////////////////////////////////
-// quart
-///////////////////////////////////////////////////////////////////////////
-namespace quart {
-static real_t in(real_t t, real_t b, real_t c, real_t d) {
- return c * pow(t / d, 4) + b;
-}
-
-static real_t out(real_t t, real_t b, real_t c, real_t d) {
- return -c * (pow(t / d - 1, 4) - 1) + b;
-}
-
-static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
- t = t / d * 2;
- if (t < 1) return c / 2 * pow(t, 4) + b;
- return -c / 2 * (pow(t - 2, 4) - 2) + b;
-}
-
-static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
- return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
-}
-}; // namespace quart
-///////////////////////////////////////////////////////////////////////////
-// quad
-///////////////////////////////////////////////////////////////////////////
-namespace quad {
-static real_t in(real_t t, real_t b, real_t c, real_t d) {
- return c * pow(t / d, 2) + b;
-}
-
-static real_t out(real_t t, real_t b, real_t c, real_t d) {
- t = t / d;
- return -c * t * (t - 2) + b;
-}
-
-static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
- t = t / d * 2;
- if (t < 1) return c / 2 * pow(t, 2) + b;
- return -c / 2 * ((t - 1) * (t - 3) - 1) + b;
-}
-
-static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
- return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
-}
-}; // namespace quad
-///////////////////////////////////////////////////////////////////////////
-// expo
-///////////////////////////////////////////////////////////////////////////
-namespace expo {
-static real_t in(real_t t, real_t b, real_t c, real_t d) {
- if (t == 0) return b;
- return c * pow(2, 10 * (t / d - 1)) + b - c * 0.001;
-}
-
-static real_t out(real_t t, real_t b, real_t c, real_t d) {
- if (t == d) return b + c;
- return c * 1.001 * (-pow(2, -10 * t / d) + 1) + b;
-}
-
-static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
- if (t == 0) return b;
- if (t == d) return b + c;
- t = t / d * 2;
- if (t < 1) return c / 2 * pow(2, 10 * (t - 1)) + b - c * 0.0005;
- return c / 2 * 1.0005 * (-pow(2, -10 * (t - 1)) + 2) + b;
-}
-
-static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
- return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
-}
-}; // namespace expo
-///////////////////////////////////////////////////////////////////////////
-// elastic
-///////////////////////////////////////////////////////////////////////////
-namespace elastic {
-static real_t in(real_t t, real_t b, real_t c, real_t d) {
- if (t == 0) return b;
- if ((t /= d) == 1) return b + c;
- float p = d * 0.3f;
- float a = c;
- float s = p / 4;
- float postFix = a * pow(2, 10 * (t -= 1)); // this is a fix, again, with post-increment operators
- return -(postFix * sin((t * d - s) * (2 * pi) / p)) + b;
-}
-
-static real_t out(real_t t, real_t b, real_t c, real_t d) {
- if (t == 0) return b;
- if ((t /= d) == 1) return b + c;
- float p = d * 0.3f;
- float a = c;
- float s = p / 4;
- return (a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b);
-}
-
-static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
- if (t == 0) return b;
- if ((t /= d / 2) == 2) return b + c;
- float p = d * (0.3f * 1.5f);
- float a = c;
- float s = p / 4;
-
- if (t < 1) {
- float postFix = a * pow(2, 10 * (t -= 1)); // postIncrement is evil
- return -0.5f * (postFix * sin((t * d - s) * (2 * pi) / p)) + b;
- }
- float postFix = a * pow(2, -10 * (t -= 1)); // postIncrement is evil
- return postFix * sin((t * d - s) * (2 * pi) / p) * 0.5f + c + b;
-}
-
-static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
- return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
-}
-}; // namespace elastic
-///////////////////////////////////////////////////////////////////////////
-// cubic
-///////////////////////////////////////////////////////////////////////////
-namespace cubic {
-static real_t in(real_t t, real_t b, real_t c, real_t d) {
- t /= d;
- return c * t * t * t + b;
-}
-
-static real_t out(real_t t, real_t b, real_t c, real_t d) {
- t = t / d - 1;
- return c * (t * t * t + 1) + b;
-}
-
-static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
- t /= d / 2;
- if (t < 1) return c / 2 * t * t * t + b;
- t -= 2;
- return c / 2 * (t * t * t + 2) + b;
-}
-
-static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
- return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
-}
-}; // namespace cubic
-///////////////////////////////////////////////////////////////////////////
-// circ
-///////////////////////////////////////////////////////////////////////////
-namespace circ {
-static real_t in(real_t t, real_t b, real_t c, real_t d) {
- t /= d;
- return -c * (sqrt(1 - t * t) - 1) + b;
-}
-
-static real_t out(real_t t, real_t b, real_t c, real_t d) {
- t = t / d - 1;
- return c * sqrt(1 - t * t) + b;
-}
-
-static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
- t /= d / 2;
- if (t < 1) {
- return -c / 2 * (sqrt(1 - t * t) - 1) + b;
- }
- t -= 2;
- return c / 2 * (sqrt(1 - t * t) + 1) + b;
-}
-
-static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
- return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
-}
-}; // namespace circ
-///////////////////////////////////////////////////////////////////////////
-// bounce
-///////////////////////////////////////////////////////////////////////////
-namespace bounce {
-static real_t out(real_t t, real_t b, real_t c, real_t d);
-
-static real_t in(real_t t, real_t b, real_t c, real_t d) {
- return c - out(d - t, 0, c, d) + b;
-}
-
-static real_t out(real_t t, real_t b, real_t c, real_t d) {
- if ((t /= d) < (1 / 2.75f)) {
- return c * (7.5625f * t * t) + b;
- } else if (t < (2 / 2.75f)) {
- float postFix = t -= (1.5f / 2.75f);
- return c * (7.5625f * (postFix)*t + .75f) + b;
- } else if (t < (2.5 / 2.75)) {
- float postFix = t -= (2.25f / 2.75f);
- return c * (7.5625f * (postFix)*t + .9375f) + b;
- } else {
- float postFix = t -= (2.625f / 2.75f);
- return c * (7.5625f * (postFix)*t + .984375f) + b;
- }
-}
-
-static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
- return (t < d / 2) ? in(t * 2, b, c / 2, d) : out((t * 2) - d, b + c / 2, c / 2, d);
-}
-
-static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
- return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
-}
-}; // namespace bounce
-///////////////////////////////////////////////////////////////////////////
-// back
-///////////////////////////////////////////////////////////////////////////
-namespace back {
-static real_t in(real_t t, real_t b, real_t c, real_t d) {
- float s = 1.70158f;
- float postFix = t /= d;
- return c * (postFix)*t * ((s + 1) * t - s) + b;
-}
-
-static real_t out(real_t t, real_t b, real_t c, real_t d) {
- float s = 1.70158f;
- t = t / d - 1;
- return c * (t * t * ((s + 1) * t + s) + 1) + b;
-}
-
-static real_t in_out(real_t t, real_t b, real_t c, real_t d) {
- float s = 1.70158f * 1.525f;
- t /= d / 2;
- if (t < 1) return c / 2 * (t * t * ((s + 1) * t - s)) + b;
- t -= 2;
- return c / 2 * (t * t * ((s + 1) * t + s) + 2) + b;
-}
-
-static real_t out_in(real_t t, real_t b, real_t c, real_t d) {
- return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d);
-}
-}; // namespace back
-
-Tween::interpolater Tween::interpolaters[Tween::TRANS_MAX][Tween::EASE_MAX] = {
- { &linear::in, &linear::out, &linear::in_out, &linear::out_in },
- { &sine::in, &sine::out, &sine::in_out, &sine::out_in },
- { &quint::in, &quint::out, &quint::in_out, &quint::out_in },
- { &quart::in, &quart::out, &quart::in_out, &quart::out_in },
- { &quad::in, &quad::out, &quad::in_out, &quad::out_in },
- { &expo::in, &expo::out, &expo::in_out, &expo::out_in },
- { &elastic::in, &elastic::out, &elastic::in_out, &elastic::out_in },
- { &cubic::in, &cubic::out, &cubic::in_out, &cubic::out_in },
- { &circ::in, &circ::out, &circ::in_out, &circ::out_in },
- { &bounce::in, &bounce::out, &bounce::in_out, &bounce::out_in },
- { &back::in, &back::out, &back::in_out, &back::out_in },
-};
-
-real_t Tween::run_equation(TransitionType p_trans_type, EaseType p_ease_type, real_t t, real_t b, real_t c, real_t d) {
-
- interpolater cb = interpolaters[p_trans_type][p_ease_type];
- ERR_FAIL_COND_V(cb == NULL, b);
- return cb(t, b, c, d);
-}
diff --git a/thirdparty/misc/stb_vorbis.c b/thirdparty/misc/stb_vorbis.c
deleted file mode 100644
index a8cbfa6c23..0000000000
--- a/thirdparty/misc/stb_vorbis.c
+++ /dev/null
@@ -1,5563 +0,0 @@
-// Ogg Vorbis audio decoder - v1.20 - public domain
-// http://nothings.org/stb_vorbis/
-//
-// Original version written by Sean Barrett in 2007.
-//
-// Originally sponsored by RAD Game Tools. Seeking implementation
-// sponsored by Phillip Bennefall, Marc Andersen, Aaron Baker,
-// Elias Software, Aras Pranckevicius, and Sean Barrett.
-//
-// LICENSE
-//
-// See end of file for license information.
-//
-// Limitations:
-//
-// - floor 0 not supported (used in old ogg vorbis files pre-2004)
-// - lossless sample-truncation at beginning ignored
-// - cannot concatenate multiple vorbis streams
-// - sample positions are 32-bit, limiting seekable 192Khz
-// files to around 6 hours (Ogg supports 64-bit)
-//
-// Feature contributors:
-// Dougall Johnson (sample-exact seeking)
-//
-// Bugfix/warning contributors:
-// Terje Mathisen Niklas Frykholm Andy Hill
-// Casey Muratori John Bolton Gargaj
-// Laurent Gomila Marc LeBlanc Ronny Chevalier
-// Bernhard Wodo Evan Balster github:alxprd
-// Tom Beaumont Ingo Leitgeb Nicolas Guillemot
-// Phillip Bennefall Rohit Thiago Goulart
-// github:manxorist saga musix github:infatum
-// Timur Gagiev Maxwell Koo Peter Waller
-// github:audinowho Dougall Johnson David Reid
-// github:Clownacy Pedro J. Estebanez Remi Verschelde
-//
-// Partial history:
-// 1.20 - 2020-07-11 - several small fixes
-// 1.19 - 2020-02-05 - warnings
-// 1.18 - 2020-02-02 - fix seek bugs; parse header comments; misc warnings etc.
-// 1.17 - 2019-07-08 - fix CVE-2019-13217..CVE-2019-13223 (by ForAllSecure)
-// 1.16 - 2019-03-04 - fix warnings
-// 1.15 - 2019-02-07 - explicit failure if Ogg Skeleton data is found
-// 1.14 - 2018-02-11 - delete bogus dealloca usage
-// 1.13 - 2018-01-29 - fix truncation of last frame (hopefully)
-// 1.12 - 2017-11-21 - limit residue begin/end to blocksize/2 to avoid large temp allocs in bad/corrupt files
-// 1.11 - 2017-07-23 - fix MinGW compilation
-// 1.10 - 2017-03-03 - more robust seeking; fix negative ilog(); clear error in open_memory
-// 1.09 - 2016-04-04 - back out 'truncation of last frame' fix from previous version
-// 1.08 - 2016-04-02 - warnings; setup memory leaks; truncation of last frame
-// 1.07 - 2015-01-16 - fixes for crashes on invalid files; warning fixes; const
-// 1.06 - 2015-08-31 - full, correct support for seeking API (Dougall Johnson)
-// some crash fixes when out of memory or with corrupt files
-// fix some inappropriately signed shifts
-// 1.05 - 2015-04-19 - don't define __forceinline if it's redundant
-// 1.04 - 2014-08-27 - fix missing const-correct case in API
-// 1.03 - 2014-08-07 - warning fixes
-// 1.02 - 2014-07-09 - declare qsort comparison as explicitly _cdecl in Windows
-// 1.01 - 2014-06-18 - fix stb_vorbis_get_samples_float (interleaved was correct)
-// 1.0 - 2014-05-26 - fix memory leaks; fix warnings; fix bugs in >2-channel;
-// (API change) report sample rate for decode-full-file funcs
-//
-// See end of file for full version history.
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// HEADER BEGINS HERE
-//
-
-#ifndef STB_VORBIS_INCLUDE_STB_VORBIS_H
-#define STB_VORBIS_INCLUDE_STB_VORBIS_H
-
-#if defined(STB_VORBIS_NO_CRT) && !defined(STB_VORBIS_NO_STDIO)
-#define STB_VORBIS_NO_STDIO 1
-#endif
-
-#ifndef STB_VORBIS_NO_STDIO
-#include <stdio.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/////////// THREAD SAFETY
-
-// Individual stb_vorbis* handles are not thread-safe; you cannot decode from
-// them from multiple threads at the same time. However, you can have multiple
-// stb_vorbis* handles and decode from them independently in multiple thrads.
-
-
-/////////// MEMORY ALLOCATION
-
-// normally stb_vorbis uses malloc() to allocate memory at startup,
-// and alloca() to allocate temporary memory during a frame on the
-// stack. (Memory consumption will depend on the amount of setup
-// data in the file and how you set the compile flags for speed
-// vs. size. In my test files the maximal-size usage is ~150KB.)
-//
-// You can modify the wrapper functions in the source (setup_malloc,
-// setup_temp_malloc, temp_malloc) to change this behavior, or you
-// can use a simpler allocation model: you pass in a buffer from
-// which stb_vorbis will allocate _all_ its memory (including the
-// temp memory). "open" may fail with a VORBIS_outofmem if you
-// do not pass in enough data; there is no way to determine how
-// much you do need except to succeed (at which point you can
-// query get_info to find the exact amount required. yes I know
-// this is lame).
-//
-// If you pass in a non-NULL buffer of the type below, allocation
-// will occur from it as described above. Otherwise just pass NULL
-// to use malloc()/alloca()
-
-typedef struct
-{
- char *alloc_buffer;
- int alloc_buffer_length_in_bytes;
-} stb_vorbis_alloc;
-
-
-/////////// FUNCTIONS USEABLE WITH ALL INPUT MODES
-
-typedef struct stb_vorbis stb_vorbis;
-
-typedef struct
-{
- unsigned int sample_rate;
- int channels;
-
- unsigned int setup_memory_required;
- unsigned int setup_temp_memory_required;
- unsigned int temp_memory_required;
-
- int max_frame_size;
-} stb_vorbis_info;
-
-typedef struct
-{
- char *vendor;
-
- int comment_list_length;
- char **comment_list;
-} stb_vorbis_comment;
-
-// get general information about the file
-extern stb_vorbis_info stb_vorbis_get_info(stb_vorbis *f);
-
-// get ogg comments
-extern stb_vorbis_comment stb_vorbis_get_comment(stb_vorbis *f);
-
-// get the last error detected (clears it, too)
-extern int stb_vorbis_get_error(stb_vorbis *f);
-
-// close an ogg vorbis file and free all memory in use
-extern void stb_vorbis_close(stb_vorbis *f);
-
-// this function returns the offset (in samples) from the beginning of the
-// file that will be returned by the next decode, if it is known, or -1
-// otherwise. after a flush_pushdata() call, this may take a while before
-// it becomes valid again.
-// NOT WORKING YET after a seek with PULLDATA API
-extern int stb_vorbis_get_sample_offset(stb_vorbis *f);
-
-// returns the current seek point within the file, or offset from the beginning
-// of the memory buffer. In pushdata mode it returns 0.
-extern unsigned int stb_vorbis_get_file_offset(stb_vorbis *f);
-
-/////////// PUSHDATA API
-
-#ifndef STB_VORBIS_NO_PUSHDATA_API
-
-// this API allows you to get blocks of data from any source and hand
-// them to stb_vorbis. you have to buffer them; stb_vorbis will tell
-// you how much it used, and you have to give it the rest next time;
-// and stb_vorbis may not have enough data to work with and you will
-// need to give it the same data again PLUS more. Note that the Vorbis
-// specification does not bound the size of an individual frame.
-
-extern stb_vorbis *stb_vorbis_open_pushdata(
- const unsigned char * datablock, int datablock_length_in_bytes,
- int *datablock_memory_consumed_in_bytes,
- int *error,
- const stb_vorbis_alloc *alloc_buffer);
-// create a vorbis decoder by passing in the initial data block containing
-// the ogg&vorbis headers (you don't need to do parse them, just provide
-// the first N bytes of the file--you're told if it's not enough, see below)
-// on success, returns an stb_vorbis *, does not set error, returns the amount of
-// data parsed/consumed on this call in *datablock_memory_consumed_in_bytes;
-// on failure, returns NULL on error and sets *error, does not change *datablock_memory_consumed
-// if returns NULL and *error is VORBIS_need_more_data, then the input block was
-// incomplete and you need to pass in a larger block from the start of the file
-
-extern int stb_vorbis_decode_frame_pushdata(
- stb_vorbis *f,
- const unsigned char *datablock, int datablock_length_in_bytes,
- int *channels, // place to write number of float * buffers
- float ***output, // place to write float ** array of float * buffers
- int *samples // place to write number of output samples
- );
-// decode a frame of audio sample data if possible from the passed-in data block
-//
-// return value: number of bytes we used from datablock
-//
-// possible cases:
-// 0 bytes used, 0 samples output (need more data)
-// N bytes used, 0 samples output (resynching the stream, keep going)
-// N bytes used, M samples output (one frame of data)
-// note that after opening a file, you will ALWAYS get one N-bytes,0-sample
-// frame, because Vorbis always "discards" the first frame.
-//
-// Note that on resynch, stb_vorbis will rarely consume all of the buffer,
-// instead only datablock_length_in_bytes-3 or less. This is because it wants
-// to avoid missing parts of a page header if they cross a datablock boundary,
-// without writing state-machiney code to record a partial detection.
-//
-// The number of channels returned are stored in *channels (which can be
-// NULL--it is always the same as the number of channels reported by
-// get_info). *output will contain an array of float* buffers, one per
-// channel. In other words, (*output)[0][0] contains the first sample from
-// the first channel, and (*output)[1][0] contains the first sample from
-// the second channel.
-
-extern void stb_vorbis_flush_pushdata(stb_vorbis *f);
-// inform stb_vorbis that your next datablock will not be contiguous with
-// previous ones (e.g. you've seeked in the data); future attempts to decode
-// frames will cause stb_vorbis to resynchronize (as noted above), and
-// once it sees a valid Ogg page (typically 4-8KB, as large as 64KB), it
-// will begin decoding the _next_ frame.
-//
-// if you want to seek using pushdata, you need to seek in your file, then
-// call stb_vorbis_flush_pushdata(), then start calling decoding, then once
-// decoding is returning you data, call stb_vorbis_get_sample_offset, and
-// if you don't like the result, seek your file again and repeat.
-#endif
-
-
-////////// PULLING INPUT API
-
-#ifndef STB_VORBIS_NO_PULLDATA_API
-// This API assumes stb_vorbis is allowed to pull data from a source--
-// either a block of memory containing the _entire_ vorbis stream, or a
-// FILE * that you or it create, or possibly some other reading mechanism
-// if you go modify the source to replace the FILE * case with some kind
-// of callback to your code. (But if you don't support seeking, you may
-// just want to go ahead and use pushdata.)
-
-#if !defined(STB_VORBIS_NO_STDIO) && !defined(STB_VORBIS_NO_INTEGER_CONVERSION)
-extern int stb_vorbis_decode_filename(const char *filename, int *channels, int *sample_rate, short **output);
-#endif
-#if !defined(STB_VORBIS_NO_INTEGER_CONVERSION)
-extern int stb_vorbis_decode_memory(const unsigned char *mem, int len, int *channels, int *sample_rate, short **output);
-#endif
-// decode an entire file and output the data interleaved into a malloc()ed
-// buffer stored in *output. The return value is the number of samples
-// decoded, or -1 if the file could not be opened or was not an ogg vorbis file.
-// When you're done with it, just free() the pointer returned in *output.
-
-extern stb_vorbis * stb_vorbis_open_memory(const unsigned char *data, int len,
- int *error, const stb_vorbis_alloc *alloc_buffer);
-// create an ogg vorbis decoder from an ogg vorbis stream in memory (note
-// this must be the entire stream!). on failure, returns NULL and sets *error
-
-#ifndef STB_VORBIS_NO_STDIO
-extern stb_vorbis * stb_vorbis_open_filename(const char *filename,
- int *error, const stb_vorbis_alloc *alloc_buffer);
-// create an ogg vorbis decoder from a filename via fopen(). on failure,
-// returns NULL and sets *error (possibly to VORBIS_file_open_failure).
-
-extern stb_vorbis * stb_vorbis_open_file(FILE *f, int close_handle_on_close,
- int *error, const stb_vorbis_alloc *alloc_buffer);
-// create an ogg vorbis decoder from an open FILE *, looking for a stream at
-// the _current_ seek point (ftell). on failure, returns NULL and sets *error.
-// note that stb_vorbis must "own" this stream; if you seek it in between
-// calls to stb_vorbis, it will become confused. Moreover, if you attempt to
-// perform stb_vorbis_seek_*() operations on this file, it will assume it
-// owns the _entire_ rest of the file after the start point. Use the next
-// function, stb_vorbis_open_file_section(), to limit it.
-
-extern stb_vorbis * stb_vorbis_open_file_section(FILE *f, int close_handle_on_close,
- int *error, const stb_vorbis_alloc *alloc_buffer, unsigned int len);
-// create an ogg vorbis decoder from an open FILE *, looking for a stream at
-// the _current_ seek point (ftell); the stream will be of length 'len' bytes.
-// on failure, returns NULL and sets *error. note that stb_vorbis must "own"
-// this stream; if you seek it in between calls to stb_vorbis, it will become
-// confused.
-#endif
-
-extern int stb_vorbis_seek_frame(stb_vorbis *f, unsigned int sample_number);
-extern int stb_vorbis_seek(stb_vorbis *f, unsigned int sample_number);
-// these functions seek in the Vorbis file to (approximately) 'sample_number'.
-// after calling seek_frame(), the next call to get_frame_*() will include
-// the specified sample. after calling stb_vorbis_seek(), the next call to
-// stb_vorbis_get_samples_* will start with the specified sample. If you
-// do not need to seek to EXACTLY the target sample when using get_samples_*,
-// you can also use seek_frame().
-
-extern int stb_vorbis_seek_start(stb_vorbis *f);
-// this function is equivalent to stb_vorbis_seek(f,0)
-
-extern unsigned int stb_vorbis_stream_length_in_samples(stb_vorbis *f);
-extern float stb_vorbis_stream_length_in_seconds(stb_vorbis *f);
-// these functions return the total length of the vorbis stream
-
-extern int stb_vorbis_get_frame_float(stb_vorbis *f, int *channels, float ***output);
-// decode the next frame and return the number of samples. the number of
-// channels returned are stored in *channels (which can be NULL--it is always
-// the same as the number of channels reported by get_info). *output will
-// contain an array of float* buffers, one per channel. These outputs will
-// be overwritten on the next call to stb_vorbis_get_frame_*.
-//
-// You generally should not intermix calls to stb_vorbis_get_frame_*()
-// and stb_vorbis_get_samples_*(), since the latter calls the former.
-
-#ifndef STB_VORBIS_NO_INTEGER_CONVERSION
-extern int stb_vorbis_get_frame_short_interleaved(stb_vorbis *f, int num_c, short *buffer, int num_shorts);
-extern int stb_vorbis_get_frame_short (stb_vorbis *f, int num_c, short **buffer, int num_samples);
-#endif
-// decode the next frame and return the number of *samples* per channel.
-// Note that for interleaved data, you pass in the number of shorts (the
-// size of your array), but the return value is the number of samples per
-// channel, not the total number of samples.
-//
-// The data is coerced to the number of channels you request according to the
-// channel coercion rules (see below). You must pass in the size of your
-// buffer(s) so that stb_vorbis will not overwrite the end of the buffer.
-// The maximum buffer size needed can be gotten from get_info(); however,
-// the Vorbis I specification implies an absolute maximum of 4096 samples
-// per channel.
-
-// Channel coercion rules:
-// Let M be the number of channels requested, and N the number of channels present,
-// and Cn be the nth channel; let stereo L be the sum of all L and center channels,
-// and stereo R be the sum of all R and center channels (channel assignment from the
-// vorbis spec).
-// M N output
-// 1 k sum(Ck) for all k
-// 2 * stereo L, stereo R
-// k l k > l, the first l channels, then 0s
-// k l k <= l, the first k channels
-// Note that this is not _good_ surround etc. mixing at all! It's just so
-// you get something useful.
-
-extern int stb_vorbis_get_samples_float_interleaved(stb_vorbis *f, int channels, float *buffer, int num_floats);
-extern int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, int num_samples);
-// gets num_samples samples, not necessarily on a frame boundary--this requires
-// buffering so you have to supply the buffers. DOES NOT APPLY THE COERCION RULES.
-// Returns the number of samples stored per channel; it may be less than requested
-// at the end of the file. If there are no more samples in the file, returns 0.
-
-#ifndef STB_VORBIS_NO_INTEGER_CONVERSION
-extern int stb_vorbis_get_samples_short_interleaved(stb_vorbis *f, int channels, short *buffer, int num_shorts);
-extern int stb_vorbis_get_samples_short(stb_vorbis *f, int channels, short **buffer, int num_samples);
-#endif
-// gets num_samples samples, not necessarily on a frame boundary--this requires
-// buffering so you have to supply the buffers. Applies the coercion rules above
-// to produce 'channels' channels. Returns the number of samples stored per channel;
-// it may be less than requested at the end of the file. If there are no more
-// samples in the file, returns 0.
-
-#endif
-
-//////// ERROR CODES
-
-enum STBVorbisError
-{
- VORBIS__no_error,
-
- VORBIS_need_more_data=1, // not a real error
-
- VORBIS_invalid_api_mixing, // can't mix API modes
- VORBIS_outofmem, // not enough memory
- VORBIS_feature_not_supported, // uses floor 0
- VORBIS_too_many_channels, // STB_VORBIS_MAX_CHANNELS is too small
- VORBIS_file_open_failure, // fopen() failed
- VORBIS_seek_without_length, // can't seek in unknown-length file
-
- VORBIS_unexpected_eof=10, // file is truncated?
- VORBIS_seek_invalid, // seek past EOF
-
- // decoding errors (corrupt/invalid stream) -- you probably
- // don't care about the exact details of these
-
- // vorbis errors:
- VORBIS_invalid_setup=20,
- VORBIS_invalid_stream,
-
- // ogg errors:
- VORBIS_missing_capture_pattern=30,
- VORBIS_invalid_stream_structure_version,
- VORBIS_continued_packet_flag_invalid,
- VORBIS_incorrect_stream_serial_number,
- VORBIS_invalid_first_page,
- VORBIS_bad_packet_type,
- VORBIS_cant_find_last_page,
- VORBIS_seek_failed,
- VORBIS_ogg_skeleton_not_supported
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // STB_VORBIS_INCLUDE_STB_VORBIS_H
-//
-// HEADER ENDS HERE
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef STB_VORBIS_HEADER_ONLY
-
-// global configuration settings (e.g. set these in the project/makefile),
-// or just set them in this file at the top (although ideally the first few
-// should be visible when the header file is compiled too, although it's not
-// crucial)
-
-// STB_VORBIS_NO_PUSHDATA_API
-// does not compile the code for the various stb_vorbis_*_pushdata()
-// functions
-// #define STB_VORBIS_NO_PUSHDATA_API
-
-// STB_VORBIS_NO_PULLDATA_API
-// does not compile the code for the non-pushdata APIs
-// #define STB_VORBIS_NO_PULLDATA_API
-
-// STB_VORBIS_NO_STDIO
-// does not compile the code for the APIs that use FILE *s internally
-// or externally (implied by STB_VORBIS_NO_PULLDATA_API)
-// #define STB_VORBIS_NO_STDIO
-
-// STB_VORBIS_NO_INTEGER_CONVERSION
-// does not compile the code for converting audio sample data from
-// float to integer (implied by STB_VORBIS_NO_PULLDATA_API)
-// #define STB_VORBIS_NO_INTEGER_CONVERSION
-
-// STB_VORBIS_NO_FAST_SCALED_FLOAT
-// does not use a fast float-to-int trick to accelerate float-to-int on
-// most platforms which requires endianness be defined correctly.
-//#define STB_VORBIS_NO_FAST_SCALED_FLOAT
-
-
-// STB_VORBIS_MAX_CHANNELS [number]
-// globally define this to the maximum number of channels you need.
-// The spec does not put a restriction on channels except that
-// the count is stored in a byte, so 255 is the hard limit.
-// Reducing this saves about 16 bytes per value, so using 16 saves
-// (255-16)*16 or around 4KB. Plus anything other memory usage
-// I forgot to account for. Can probably go as low as 8 (7.1 audio),
-// 6 (5.1 audio), or 2 (stereo only).
-#ifndef STB_VORBIS_MAX_CHANNELS
-#define STB_VORBIS_MAX_CHANNELS 16 // enough for anyone?
-#endif
-
-// STB_VORBIS_PUSHDATA_CRC_COUNT [number]
-// after a flush_pushdata(), stb_vorbis begins scanning for the
-// next valid page, without backtracking. when it finds something
-// that looks like a page, it streams through it and verifies its
-// CRC32. Should that validation fail, it keeps scanning. But it's
-// possible that _while_ streaming through to check the CRC32 of
-// one candidate page, it sees another candidate page. This #define
-// determines how many "overlapping" candidate pages it can search
-// at once. Note that "real" pages are typically ~4KB to ~8KB, whereas
-// garbage pages could be as big as 64KB, but probably average ~16KB.
-// So don't hose ourselves by scanning an apparent 64KB page and
-// missing a ton of real ones in the interim; so minimum of 2
-#ifndef STB_VORBIS_PUSHDATA_CRC_COUNT
-#define STB_VORBIS_PUSHDATA_CRC_COUNT 4
-#endif
-
-// STB_VORBIS_FAST_HUFFMAN_LENGTH [number]
-// sets the log size of the huffman-acceleration table. Maximum
-// supported value is 24. with larger numbers, more decodings are O(1),
-// but the table size is larger so worse cache missing, so you'll have
-// to probe (and try multiple ogg vorbis files) to find the sweet spot.
-#ifndef STB_VORBIS_FAST_HUFFMAN_LENGTH
-#define STB_VORBIS_FAST_HUFFMAN_LENGTH 10
-#endif
-
-// STB_VORBIS_FAST_BINARY_LENGTH [number]
-// sets the log size of the binary-search acceleration table. this
-// is used in similar fashion to the fast-huffman size to set initial
-// parameters for the binary search
-
-// STB_VORBIS_FAST_HUFFMAN_INT
-// The fast huffman tables are much more efficient if they can be
-// stored as 16-bit results instead of 32-bit results. This restricts
-// the codebooks to having only 65535 possible outcomes, though.
-// (At least, accelerated by the huffman table.)
-#ifndef STB_VORBIS_FAST_HUFFMAN_INT
-#define STB_VORBIS_FAST_HUFFMAN_SHORT
-#endif
-
-// STB_VORBIS_NO_HUFFMAN_BINARY_SEARCH
-// If the 'fast huffman' search doesn't succeed, then stb_vorbis falls
-// back on binary searching for the correct one. This requires storing
-// extra tables with the huffman codes in sorted order. Defining this
-// symbol trades off space for speed by forcing a linear search in the
-// non-fast case, except for "sparse" codebooks.
-// #define STB_VORBIS_NO_HUFFMAN_BINARY_SEARCH
-
-// STB_VORBIS_DIVIDES_IN_RESIDUE
-// stb_vorbis precomputes the result of the scalar residue decoding
-// that would otherwise require a divide per chunk. you can trade off
-// space for time by defining this symbol.
-// #define STB_VORBIS_DIVIDES_IN_RESIDUE
-
-// STB_VORBIS_DIVIDES_IN_CODEBOOK
-// vorbis VQ codebooks can be encoded two ways: with every case explicitly
-// stored, or with all elements being chosen from a small range of values,
-// and all values possible in all elements. By default, stb_vorbis expands
-// this latter kind out to look like the former kind for ease of decoding,
-// because otherwise an integer divide-per-vector-element is required to
-// unpack the index. If you define STB_VORBIS_DIVIDES_IN_CODEBOOK, you can
-// trade off storage for speed.
-//#define STB_VORBIS_DIVIDES_IN_CODEBOOK
-
-#ifdef STB_VORBIS_CODEBOOK_SHORTS
-#error "STB_VORBIS_CODEBOOK_SHORTS is no longer supported as it produced incorrect results for some input formats"
-#endif
-
-// STB_VORBIS_DIVIDE_TABLE
-// this replaces small integer divides in the floor decode loop with
-// table lookups. made less than 1% difference, so disabled by default.
-
-// STB_VORBIS_NO_INLINE_DECODE
-// disables the inlining of the scalar codebook fast-huffman decode.
-// might save a little codespace; useful for debugging
-// #define STB_VORBIS_NO_INLINE_DECODE
-
-// STB_VORBIS_NO_DEFER_FLOOR
-// Normally we only decode the floor without synthesizing the actual
-// full curve. We can instead synthesize the curve immediately. This
-// requires more memory and is very likely slower, so I don't think
-// you'd ever want to do it except for debugging.
-// #define STB_VORBIS_NO_DEFER_FLOOR
-
-
-
-
-//////////////////////////////////////////////////////////////////////////////
-
-#ifdef STB_VORBIS_NO_PULLDATA_API
- #define STB_VORBIS_NO_INTEGER_CONVERSION
- #define STB_VORBIS_NO_STDIO
-#endif
-
-#if defined(STB_VORBIS_NO_CRT) && !defined(STB_VORBIS_NO_STDIO)
- #define STB_VORBIS_NO_STDIO 1
-#endif
-
-#ifndef STB_VORBIS_NO_INTEGER_CONVERSION
-#ifndef STB_VORBIS_NO_FAST_SCALED_FLOAT
-
- // only need endianness for fast-float-to-int, which we don't
- // use for pushdata
-
- #ifndef STB_VORBIS_BIG_ENDIAN
- #define STB_VORBIS_ENDIAN 0
- #else
- #define STB_VORBIS_ENDIAN 1
- #endif
-
-#endif
-#endif
-
-
-#ifndef STB_VORBIS_NO_STDIO
-#include <stdio.h>
-#endif
-
-#ifndef STB_VORBIS_NO_CRT
- #include <stdlib.h>
- #include <string.h>
- #include <assert.h>
- #include <math.h>
-
- // find definition of alloca if it's not in stdlib.h:
- #if defined(_MSC_VER) || defined(__MINGW32__)
- #include <malloc.h>
- #endif
- #if defined(__linux__) || defined(__linux) || defined(__EMSCRIPTEN__) || defined(__NEWLIB__)
- #include <alloca.h>
- #endif
-#else // STB_VORBIS_NO_CRT
- #define NULL 0
- #define malloc(s) 0
- #define free(s) ((void) 0)
- #define realloc(s) 0
-#endif // STB_VORBIS_NO_CRT
-
-#include <limits.h>
-
-#ifdef __MINGW32__
- // eff you mingw:
- // "fixed":
- // http://sourceforge.net/p/mingw-w64/mailman/message/32882927/
- // "no that broke the build, reverted, who cares about C":
- // http://sourceforge.net/p/mingw-w64/mailman/message/32890381/
- #ifdef __forceinline
- #undef __forceinline
- #endif
- #define __forceinline
- #ifndef alloca
- #define alloca __builtin_alloca
- #endif
-#elif !defined(_MSC_VER)
- #if __GNUC__
- #define __forceinline inline
- #else
- #define __forceinline
- #endif
-#endif
-
-#if STB_VORBIS_MAX_CHANNELS > 256
-#error "Value of STB_VORBIS_MAX_CHANNELS outside of allowed range"
-#endif
-
-#if STB_VORBIS_FAST_HUFFMAN_LENGTH > 24
-#error "Value of STB_VORBIS_FAST_HUFFMAN_LENGTH outside of allowed range"
-#endif
-
-
-#if 0
-#include <crtdbg.h>
-#define CHECK(f) _CrtIsValidHeapPointer(f->channel_buffers[1])
-#else
-#define CHECK(f) ((void) 0)
-#endif
-
-#define MAX_BLOCKSIZE_LOG 13 // from specification
-#define MAX_BLOCKSIZE (1 << MAX_BLOCKSIZE_LOG)
-
-
-typedef unsigned char uint8;
-typedef signed char int8;
-typedef unsigned short uint16;
-typedef signed short int16;
-typedef unsigned int uint32;
-typedef signed int int32;
-
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-
-typedef float codetype;
-
-// @NOTE
-//
-// Some arrays below are tagged "//varies", which means it's actually
-// a variable-sized piece of data, but rather than malloc I assume it's
-// small enough it's better to just allocate it all together with the
-// main thing
-//
-// Most of the variables are specified with the smallest size I could pack
-// them into. It might give better performance to make them all full-sized
-// integers. It should be safe to freely rearrange the structures or change
-// the sizes larger--nothing relies on silently truncating etc., nor the
-// order of variables.
-
-#define FAST_HUFFMAN_TABLE_SIZE (1 << STB_VORBIS_FAST_HUFFMAN_LENGTH)
-#define FAST_HUFFMAN_TABLE_MASK (FAST_HUFFMAN_TABLE_SIZE - 1)
-
-typedef struct
-{
- int dimensions, entries;
- uint8 *codeword_lengths;
- float minimum_value;
- float delta_value;
- uint8 value_bits;
- uint8 lookup_type;
- uint8 sequence_p;
- uint8 sparse;
- uint32 lookup_values;
- codetype *multiplicands;
- uint32 *codewords;
- #ifdef STB_VORBIS_FAST_HUFFMAN_SHORT
- int16 fast_huffman[FAST_HUFFMAN_TABLE_SIZE];
- #else
- int32 fast_huffman[FAST_HUFFMAN_TABLE_SIZE];
- #endif
- uint32 *sorted_codewords;
- int *sorted_values;
- int sorted_entries;
-} Codebook;
-
-typedef struct
-{
- uint8 order;
- uint16 rate;
- uint16 bark_map_size;
- uint8 amplitude_bits;
- uint8 amplitude_offset;
- uint8 number_of_books;
- uint8 book_list[16]; // varies
-} Floor0;
-
-typedef struct
-{
- uint8 partitions;
- uint8 partition_class_list[32]; // varies
- uint8 class_dimensions[16]; // varies
- uint8 class_subclasses[16]; // varies
- uint8 class_masterbooks[16]; // varies
- int16 subclass_books[16][8]; // varies
- uint16 Xlist[31*8+2]; // varies
- uint8 sorted_order[31*8+2];
- uint8 neighbors[31*8+2][2];
- uint8 floor1_multiplier;
- uint8 rangebits;
- int values;
-} Floor1;
-
-typedef union
-{
- Floor0 floor0;
- Floor1 floor1;
-} Floor;
-
-typedef struct
-{
- uint32 begin, end;
- uint32 part_size;
- uint8 classifications;
- uint8 classbook;
- uint8 **classdata;
- int16 (*residue_books)[8];
-} Residue;
-
-typedef struct
-{
- uint8 magnitude;
- uint8 angle;
- uint8 mux;
-} MappingChannel;
-
-typedef struct
-{
- uint16 coupling_steps;
- MappingChannel *chan;
- uint8 submaps;
- uint8 submap_floor[15]; // varies
- uint8 submap_residue[15]; // varies
-} Mapping;
-
-typedef struct
-{
- uint8 blockflag;
- uint8 mapping;
- uint16 windowtype;
- uint16 transformtype;
-} Mode;
-
-typedef struct
-{
- uint32 goal_crc; // expected crc if match
- int bytes_left; // bytes left in packet
- uint32 crc_so_far; // running crc
- int bytes_done; // bytes processed in _current_ chunk
- uint32 sample_loc; // granule pos encoded in page
-} CRCscan;
-
-typedef struct
-{
- uint32 page_start, page_end;
- uint32 last_decoded_sample;
-} ProbedPage;
-
-struct stb_vorbis
-{
- // user-accessible info
- unsigned int sample_rate;
- int channels;
-
- unsigned int setup_memory_required;
- unsigned int temp_memory_required;
- unsigned int setup_temp_memory_required;
-
- char *vendor;
- int comment_list_length;
- char **comment_list;
-
- // input config
-#ifndef STB_VORBIS_NO_STDIO
- FILE *f;
- uint32 f_start;
- int close_on_free;
-#endif
-
- uint8 *stream;
- uint8 *stream_start;
- uint8 *stream_end;
-
- uint32 stream_len;
-
- uint8 push_mode;
-
- // the page to seek to when seeking to start, may be zero
- uint32 first_audio_page_offset;
-
- // p_first is the page on which the first audio packet ends
- // (but not necessarily the page on which it starts)
- ProbedPage p_first, p_last;
-
- // memory management
- stb_vorbis_alloc alloc;
- int setup_offset;
- int temp_offset;
-
- // run-time results
- int eof;
- enum STBVorbisError error;
-
- // user-useful data
-
- // header info
- int blocksize[2];
- int blocksize_0, blocksize_1;
- int codebook_count;
- Codebook *codebooks;
- int floor_count;
- uint16 floor_types[64]; // varies
- Floor *floor_config;
- int residue_count;
- uint16 residue_types[64]; // varies
- Residue *residue_config;
- int mapping_count;
- Mapping *mapping;
- int mode_count;
- Mode mode_config[64]; // varies
-
- uint32 total_samples;
-
- // decode buffer
- float *channel_buffers[STB_VORBIS_MAX_CHANNELS];
- float *outputs [STB_VORBIS_MAX_CHANNELS];
-
- float *previous_window[STB_VORBIS_MAX_CHANNELS];
- int previous_length;
-
- #ifndef STB_VORBIS_NO_DEFER_FLOOR
- int16 *finalY[STB_VORBIS_MAX_CHANNELS];
- #else
- float *floor_buffers[STB_VORBIS_MAX_CHANNELS];
- #endif
-
- uint32 current_loc; // sample location of next frame to decode
- int current_loc_valid;
-
- // per-blocksize precomputed data
-
- // twiddle factors
- float *A[2],*B[2],*C[2];
- float *window[2];
- uint16 *bit_reverse[2];
-
- // current page/packet/segment streaming info
- uint32 serial; // stream serial number for verification
- int last_page;
- int segment_count;
- uint8 segments[255];
- uint8 page_flag;
- uint8 bytes_in_seg;
- uint8 first_decode;
- int next_seg;
- int last_seg; // flag that we're on the last segment
- int last_seg_which; // what was the segment number of the last seg?
- uint32 acc;
- int valid_bits;
- int packet_bytes;
- int end_seg_with_known_loc;
- uint32 known_loc_for_packet;
- int discard_samples_deferred;
- uint32 samples_output;
-
- // push mode scanning
- int page_crc_tests; // only in push_mode: number of tests active; -1 if not searching
-#ifndef STB_VORBIS_NO_PUSHDATA_API
- CRCscan scan[STB_VORBIS_PUSHDATA_CRC_COUNT];
-#endif
-
- // sample-access
- int channel_buffer_start;
- int channel_buffer_end;
-};
-
-#if defined(STB_VORBIS_NO_PUSHDATA_API)
- #define IS_PUSH_MODE(f) FALSE
-#elif defined(STB_VORBIS_NO_PULLDATA_API)
- #define IS_PUSH_MODE(f) TRUE
-#else
- #define IS_PUSH_MODE(f) ((f)->push_mode)
-#endif
-
-typedef struct stb_vorbis vorb;
-
-static int error(vorb *f, enum STBVorbisError e)
-{
- f->error = e;
- if (!f->eof && e != VORBIS_need_more_data) {
- f->error=e; // breakpoint for debugging
- }
- return 0;
-}
-
-
-// these functions are used for allocating temporary memory
-// while decoding. if you can afford the stack space, use
-// alloca(); otherwise, provide a temp buffer and it will
-// allocate out of those.
-
-#define array_size_required(count,size) (count*(sizeof(void *)+(size)))
-
-#define temp_alloc(f,size) (f->alloc.alloc_buffer ? setup_temp_malloc(f,size) : alloca(size))
-#define temp_free(f,p) (void)0
-#define temp_alloc_save(f) ((f)->temp_offset)
-#define temp_alloc_restore(f,p) ((f)->temp_offset = (p))
-
-#define temp_block_array(f,count,size) make_block_array(temp_alloc(f,array_size_required(count,size)), count, size)
-
-// given a sufficiently large block of memory, make an array of pointers to subblocks of it
-static void *make_block_array(void *mem, int count, int size)
-{
- int i;
- void ** p = (void **) mem;
- char *q = (char *) (p + count);
- for (i=0; i < count; ++i) {
- p[i] = q;
- q += size;
- }
- return p;
-}
-
-static void *setup_malloc(vorb *f, int sz)
-{
- sz = (sz+7) & ~7; // round up to nearest 8 for alignment of future allocs.
- f->setup_memory_required += sz;
- if (f->alloc.alloc_buffer) {
- void *p = (char *) f->alloc.alloc_buffer + f->setup_offset;
- if (f->setup_offset + sz > f->temp_offset) return NULL;
- f->setup_offset += sz;
- return p;
- }
- return sz ? malloc(sz) : NULL;
-}
-
-static void setup_free(vorb *f, void *p)
-{
- if (f->alloc.alloc_buffer) return; // do nothing; setup mem is a stack
- free(p);
-}
-
-static void *setup_temp_malloc(vorb *f, int sz)
-{
- sz = (sz+7) & ~7; // round up to nearest 8 for alignment of future allocs.
- if (f->alloc.alloc_buffer) {
- if (f->temp_offset - sz < f->setup_offset) return NULL;
- f->temp_offset -= sz;
- return (char *) f->alloc.alloc_buffer + f->temp_offset;
- }
- return malloc(sz);
-}
-
-static void setup_temp_free(vorb *f, void *p, int sz)
-{
- if (f->alloc.alloc_buffer) {
- f->temp_offset += (sz+7)&~7;
- return;
- }
- free(p);
-}
-
-#define CRC32_POLY 0x04c11db7 // from spec
-
-static uint32 crc_table[256];
-static void crc32_init(void)
-{
- int i,j;
- uint32 s;
- for(i=0; i < 256; i++) {
- for (s=(uint32) i << 24, j=0; j < 8; ++j)
- s = (s << 1) ^ (s >= (1U<<31) ? CRC32_POLY : 0);
- crc_table[i] = s;
- }
-}
-
-static __forceinline uint32 crc32_update(uint32 crc, uint8 byte)
-{
- return (crc << 8) ^ crc_table[byte ^ (crc >> 24)];
-}
-
-
-// used in setup, and for huffman that doesn't go fast path
-static unsigned int bit_reverse(unsigned int n)
-{
- n = ((n & 0xAAAAAAAA) >> 1) | ((n & 0x55555555) << 1);
- n = ((n & 0xCCCCCCCC) >> 2) | ((n & 0x33333333) << 2);
- n = ((n & 0xF0F0F0F0) >> 4) | ((n & 0x0F0F0F0F) << 4);
- n = ((n & 0xFF00FF00) >> 8) | ((n & 0x00FF00FF) << 8);
- return (n >> 16) | (n << 16);
-}
-
-static float square(float x)
-{
- return x*x;
-}
-
-// this is a weird definition of log2() for which log2(1) = 1, log2(2) = 2, log2(4) = 3
-// as required by the specification. fast(?) implementation from stb.h
-// @OPTIMIZE: called multiple times per-packet with "constants"; move to setup
-static int ilog(int32 n)
-{
- static signed char log2_4[16] = { 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4 };
-
- if (n < 0) return 0; // signed n returns 0
-
- // 2 compares if n < 16, 3 compares otherwise (4 if signed or n > 1<<29)
- if (n < (1 << 14))
- if (n < (1 << 4)) return 0 + log2_4[n ];
- else if (n < (1 << 9)) return 5 + log2_4[n >> 5];
- else return 10 + log2_4[n >> 10];
- else if (n < (1 << 24))
- if (n < (1 << 19)) return 15 + log2_4[n >> 15];
- else return 20 + log2_4[n >> 20];
- else if (n < (1 << 29)) return 25 + log2_4[n >> 25];
- else return 30 + log2_4[n >> 30];
-}
-
-#ifndef M_PI
- #define M_PI 3.14159265358979323846264f // from CRC
-#endif
-
-// code length assigned to a value with no huffman encoding
-#define NO_CODE 255
-
-/////////////////////// LEAF SETUP FUNCTIONS //////////////////////////
-//
-// these functions are only called at setup, and only a few times
-// per file
-
-static float float32_unpack(uint32 x)
-{
- // from the specification
- uint32 mantissa = x & 0x1fffff;
- uint32 sign = x & 0x80000000;
- uint32 exp = (x & 0x7fe00000) >> 21;
- double res = sign ? -(double)mantissa : (double)mantissa;
- return (float) ldexp((float)res, exp-788);
-}
-
-
-// zlib & jpeg huffman tables assume that the output symbols
-// can either be arbitrarily arranged, or have monotonically
-// increasing frequencies--they rely on the lengths being sorted;
-// this makes for a very simple generation algorithm.
-// vorbis allows a huffman table with non-sorted lengths. This
-// requires a more sophisticated construction, since symbols in
-// order do not map to huffman codes "in order".
-static void add_entry(Codebook *c, uint32 huff_code, int symbol, int count, int len, uint32 *values)
-{
- if (!c->sparse) {
- c->codewords [symbol] = huff_code;
- } else {
- c->codewords [count] = huff_code;
- c->codeword_lengths[count] = len;
- values [count] = symbol;
- }
-}
-
-static int compute_codewords(Codebook *c, uint8 *len, int n, uint32 *values)
-{
- int i,k,m=0;
- uint32 available[32];
-
- memset(available, 0, sizeof(available));
- // find the first entry
- for (k=0; k < n; ++k) if (len[k] < NO_CODE) break;
- if (k == n) { assert(c->sorted_entries == 0); return TRUE; }
- // add to the list
- add_entry(c, 0, k, m++, len[k], values);
- // add all available leaves
- for (i=1; i <= len[k]; ++i)
- available[i] = 1U << (32-i);
- // note that the above code treats the first case specially,
- // but it's really the same as the following code, so they
- // could probably be combined (except the initial code is 0,
- // and I use 0 in available[] to mean 'empty')
- for (i=k+1; i < n; ++i) {
- uint32 res;
- int z = len[i], y;
- if (z == NO_CODE) continue;
- // find lowest available leaf (should always be earliest,
- // which is what the specification calls for)
- // note that this property, and the fact we can never have
- // more than one free leaf at a given level, isn't totally
- // trivial to prove, but it seems true and the assert never
- // fires, so!
- while (z > 0 && !available[z]) --z;
- if (z == 0) { return FALSE; }
- res = available[z];
- assert(z >= 0 && z < 32);
- available[z] = 0;
- add_entry(c, bit_reverse(res), i, m++, len[i], values);
- // propagate availability up the tree
- if (z != len[i]) {
- assert(len[i] >= 0 && len[i] < 32);
- for (y=len[i]; y > z; --y) {
- assert(available[y] == 0);
- available[y] = res + (1 << (32-y));
- }
- }
- }
- return TRUE;
-}
-
-// accelerated huffman table allows fast O(1) match of all symbols
-// of length <= STB_VORBIS_FAST_HUFFMAN_LENGTH
-static void compute_accelerated_huffman(Codebook *c)
-{
- int i, len;
- for (i=0; i < FAST_HUFFMAN_TABLE_SIZE; ++i)
- c->fast_huffman[i] = -1;
-
- len = c->sparse ? c->sorted_entries : c->entries;
- #ifdef STB_VORBIS_FAST_HUFFMAN_SHORT
- if (len > 32767) len = 32767; // largest possible value we can encode!
- #endif
- for (i=0; i < len; ++i) {
- if (c->codeword_lengths[i] <= STB_VORBIS_FAST_HUFFMAN_LENGTH) {
- uint32 z = c->sparse ? bit_reverse(c->sorted_codewords[i]) : c->codewords[i];
- // set table entries for all bit combinations in the higher bits
- while (z < FAST_HUFFMAN_TABLE_SIZE) {
- c->fast_huffman[z] = i;
- z += 1 << c->codeword_lengths[i];
- }
- }
- }
-}
-
-#ifdef _MSC_VER
-#define STBV_CDECL __cdecl
-#else
-#define STBV_CDECL
-#endif
-
-static int STBV_CDECL uint32_compare(const void *p, const void *q)
-{
- uint32 x = * (uint32 *) p;
- uint32 y = * (uint32 *) q;
- return x < y ? -1 : x > y;
-}
-
-static int include_in_sort(Codebook *c, uint8 len)
-{
- if (c->sparse) { assert(len != NO_CODE); return TRUE; }
- if (len == NO_CODE) return FALSE;
- if (len > STB_VORBIS_FAST_HUFFMAN_LENGTH) return TRUE;
- return FALSE;
-}
-
-// if the fast table above doesn't work, we want to binary
-// search them... need to reverse the bits
-static void compute_sorted_huffman(Codebook *c, uint8 *lengths, uint32 *values)
-{
- int i, len;
- // build a list of all the entries
- // OPTIMIZATION: don't include the short ones, since they'll be caught by FAST_HUFFMAN.
- // this is kind of a frivolous optimization--I don't see any performance improvement,
- // but it's like 4 extra lines of code, so.
- if (!c->sparse) {
- int k = 0;
- for (i=0; i < c->entries; ++i)
- if (include_in_sort(c, lengths[i]))
- c->sorted_codewords[k++] = bit_reverse(c->codewords[i]);
- assert(k == c->sorted_entries);
- } else {
- for (i=0; i < c->sorted_entries; ++i)
- c->sorted_codewords[i] = bit_reverse(c->codewords[i]);
- }
-
- qsort(c->sorted_codewords, c->sorted_entries, sizeof(c->sorted_codewords[0]), uint32_compare);
- c->sorted_codewords[c->sorted_entries] = 0xffffffff;
-
- len = c->sparse ? c->sorted_entries : c->entries;
- // now we need to indicate how they correspond; we could either
- // #1: sort a different data structure that says who they correspond to
- // #2: for each sorted entry, search the original list to find who corresponds
- // #3: for each original entry, find the sorted entry
- // #1 requires extra storage, #2 is slow, #3 can use binary search!
- for (i=0; i < len; ++i) {
- int huff_len = c->sparse ? lengths[values[i]] : lengths[i];
- if (include_in_sort(c,huff_len)) {
- uint32 code = bit_reverse(c->codewords[i]);
- int x=0, n=c->sorted_entries;
- while (n > 1) {
- // invariant: sc[x] <= code < sc[x+n]
- int m = x + (n >> 1);
- if (c->sorted_codewords[m] <= code) {
- x = m;
- n -= (n>>1);
- } else {
- n >>= 1;
- }
- }
- assert(c->sorted_codewords[x] == code);
- if (c->sparse) {
- c->sorted_values[x] = values[i];
- c->codeword_lengths[x] = huff_len;
- } else {
- c->sorted_values[x] = i;
- }
- }
- }
-}
-
-// only run while parsing the header (3 times)
-static int vorbis_validate(uint8 *data)
-{
- static uint8 vorbis[6] = { 'v', 'o', 'r', 'b', 'i', 's' };
- return memcmp(data, vorbis, 6) == 0;
-}
-
-// called from setup only, once per code book
-// (formula implied by specification)
-static int lookup1_values(int entries, int dim)
-{
- int r = (int) floor(exp((float) log((float) entries) / dim));
- if ((int) floor(pow((float) r+1, dim)) <= entries) // (int) cast for MinGW warning;
- ++r; // floor() to avoid _ftol() when non-CRT
- if (pow((float) r+1, dim) <= entries)
- return -1;
- if ((int) floor(pow((float) r, dim)) > entries)
- return -1;
- return r;
-}
-
-// called twice per file
-static void compute_twiddle_factors(int n, float *A, float *B, float *C)
-{
- int n4 = n >> 2, n8 = n >> 3;
- int k,k2;
-
- for (k=k2=0; k < n4; ++k,k2+=2) {
- A[k2 ] = (float) cos(4*k*M_PI/n);
- A[k2+1] = (float) -sin(4*k*M_PI/n);
- B[k2 ] = (float) cos((k2+1)*M_PI/n/2) * 0.5f;
- B[k2+1] = (float) sin((k2+1)*M_PI/n/2) * 0.5f;
- }
- for (k=k2=0; k < n8; ++k,k2+=2) {
- C[k2 ] = (float) cos(2*(k2+1)*M_PI/n);
- C[k2+1] = (float) -sin(2*(k2+1)*M_PI/n);
- }
-}
-
-static void compute_window(int n, float *window)
-{
- int n2 = n >> 1, i;
- for (i=0; i < n2; ++i)
- window[i] = (float) sin(0.5 * M_PI * square((float) sin((i - 0 + 0.5) / n2 * 0.5 * M_PI)));
-}
-
-static void compute_bitreverse(int n, uint16 *rev)
-{
- int ld = ilog(n) - 1; // ilog is off-by-one from normal definitions
- int i, n8 = n >> 3;
- for (i=0; i < n8; ++i)
- rev[i] = (bit_reverse(i) >> (32-ld+3)) << 2;
-}
-
-static int init_blocksize(vorb *f, int b, int n)
-{
- int n2 = n >> 1, n4 = n >> 2, n8 = n >> 3;
- f->A[b] = (float *) setup_malloc(f, sizeof(float) * n2);
- f->B[b] = (float *) setup_malloc(f, sizeof(float) * n2);
- f->C[b] = (float *) setup_malloc(f, sizeof(float) * n4);
- if (!f->A[b] || !f->B[b] || !f->C[b]) return error(f, VORBIS_outofmem);
- compute_twiddle_factors(n, f->A[b], f->B[b], f->C[b]);
- f->window[b] = (float *) setup_malloc(f, sizeof(float) * n2);
- if (!f->window[b]) return error(f, VORBIS_outofmem);
- compute_window(n, f->window[b]);
- f->bit_reverse[b] = (uint16 *) setup_malloc(f, sizeof(uint16) * n8);
- if (!f->bit_reverse[b]) return error(f, VORBIS_outofmem);
- compute_bitreverse(n, f->bit_reverse[b]);
- return TRUE;
-}
-
-static void neighbors(uint16 *x, int n, int *plow, int *phigh)
-{
- int low = -1;
- int high = 65536;
- int i;
- for (i=0; i < n; ++i) {
- if (x[i] > low && x[i] < x[n]) { *plow = i; low = x[i]; }
- if (x[i] < high && x[i] > x[n]) { *phigh = i; high = x[i]; }
- }
-}
-
-// this has been repurposed so y is now the original index instead of y
-typedef struct
-{
- uint16 x,id;
-} stbv__floor_ordering;
-
-static int STBV_CDECL point_compare(const void *p, const void *q)
-{
- stbv__floor_ordering *a = (stbv__floor_ordering *) p;
- stbv__floor_ordering *b = (stbv__floor_ordering *) q;
- return a->x < b->x ? -1 : a->x > b->x;
-}
-
-//
-/////////////////////// END LEAF SETUP FUNCTIONS //////////////////////////
-
-
-#if defined(STB_VORBIS_NO_STDIO)
- #define USE_MEMORY(z) TRUE
-#else
- #define USE_MEMORY(z) ((z)->stream)
-#endif
-
-static uint8 get8(vorb *z)
-{
- if (USE_MEMORY(z)) {
- if (z->stream >= z->stream_end) { z->eof = TRUE; return 0; }
- return *z->stream++;
- }
-
- #ifndef STB_VORBIS_NO_STDIO
- {
- int c = fgetc(z->f);
- if (c == EOF) { z->eof = TRUE; return 0; }
- return c;
- }
- #endif
-}
-
-static uint32 get32(vorb *f)
-{
- uint32 x;
- x = get8(f);
- x += get8(f) << 8;
- x += get8(f) << 16;
- x += (uint32) get8(f) << 24;
- return x;
-}
-
-static int getn(vorb *z, uint8 *data, int n)
-{
- if (USE_MEMORY(z)) {
- if (z->stream+n > z->stream_end) { z->eof = 1; return 0; }
- memcpy(data, z->stream, n);
- z->stream += n;
- return 1;
- }
-
- #ifndef STB_VORBIS_NO_STDIO
- if (fread(data, n, 1, z->f) == 1)
- return 1;
- else {
- z->eof = 1;
- return 0;
- }
- #endif
-}
-
-static void skip(vorb *z, int n)
-{
- if (USE_MEMORY(z)) {
- z->stream += n;
- if (z->stream >= z->stream_end) z->eof = 1;
- return;
- }
- #ifndef STB_VORBIS_NO_STDIO
- {
- long x = ftell(z->f);
- fseek(z->f, x+n, SEEK_SET);
- }
- #endif
-}
-
-static int set_file_offset(stb_vorbis *f, unsigned int loc)
-{
- #ifndef STB_VORBIS_NO_PUSHDATA_API
- if (f->push_mode) return 0;
- #endif
- f->eof = 0;
- if (USE_MEMORY(f)) {
- if (f->stream_start + loc >= f->stream_end || f->stream_start + loc < f->stream_start) {
- f->stream = f->stream_end;
- f->eof = 1;
- return 0;
- } else {
- f->stream = f->stream_start + loc;
- return 1;
- }
- }
- #ifndef STB_VORBIS_NO_STDIO
- if (loc + f->f_start < loc || loc >= 0x80000000) {
- loc = 0x7fffffff;
- f->eof = 1;
- } else {
- loc += f->f_start;
- }
- if (!fseek(f->f, loc, SEEK_SET))
- return 1;
- f->eof = 1;
- fseek(f->f, f->f_start, SEEK_END);
- return 0;
- #endif
-}
-
-
-static uint8 ogg_page_header[4] = { 0x4f, 0x67, 0x67, 0x53 };
-
-static int capture_pattern(vorb *f)
-{
- if (0x4f != get8(f)) return FALSE;
- if (0x67 != get8(f)) return FALSE;
- if (0x67 != get8(f)) return FALSE;
- if (0x53 != get8(f)) return FALSE;
- return TRUE;
-}
-
-#define PAGEFLAG_continued_packet 1
-#define PAGEFLAG_first_page 2
-#define PAGEFLAG_last_page 4
-
-static int start_page_no_capturepattern(vorb *f)
-{
- uint32 loc0,loc1,n;
- if (f->first_decode && !IS_PUSH_MODE(f)) {
- f->p_first.page_start = stb_vorbis_get_file_offset(f) - 4;
- }
- // stream structure version
- if (0 != get8(f)) return error(f, VORBIS_invalid_stream_structure_version);
- // header flag
- f->page_flag = get8(f);
- // absolute granule position
- loc0 = get32(f);
- loc1 = get32(f);
- // @TODO: validate loc0,loc1 as valid positions?
- // stream serial number -- vorbis doesn't interleave, so discard
- get32(f);
- //if (f->serial != get32(f)) return error(f, VORBIS_incorrect_stream_serial_number);
- // page sequence number
- n = get32(f);
- f->last_page = n;
- // CRC32
- get32(f);
- // page_segments
- f->segment_count = get8(f);
- if (!getn(f, f->segments, f->segment_count))
- return error(f, VORBIS_unexpected_eof);
- // assume we _don't_ know any the sample position of any segments
- f->end_seg_with_known_loc = -2;
- if (loc0 != ~0U || loc1 != ~0U) {
- int i;
- // determine which packet is the last one that will complete
- for (i=f->segment_count-1; i >= 0; --i)
- if (f->segments[i] < 255)
- break;
- // 'i' is now the index of the _last_ segment of a packet that ends
- if (i >= 0) {
- f->end_seg_with_known_loc = i;
- f->known_loc_for_packet = loc0;
- }
- }
- if (f->first_decode) {
- int i,len;
- len = 0;
- for (i=0; i < f->segment_count; ++i)
- len += f->segments[i];
- len += 27 + f->segment_count;
- f->p_first.page_end = f->p_first.page_start + len;
- f->p_first.last_decoded_sample = loc0;
- }
- f->next_seg = 0;
- return TRUE;
-}
-
-static int start_page(vorb *f)
-{
- if (!capture_pattern(f)) return error(f, VORBIS_missing_capture_pattern);
- return start_page_no_capturepattern(f);
-}
-
-static int start_packet(vorb *f)
-{
- while (f->next_seg == -1) {
- if (!start_page(f)) return FALSE;
- if (f->page_flag & PAGEFLAG_continued_packet)
- return error(f, VORBIS_continued_packet_flag_invalid);
- }
- f->last_seg = FALSE;
- f->valid_bits = 0;
- f->packet_bytes = 0;
- f->bytes_in_seg = 0;
- // f->next_seg is now valid
- return TRUE;
-}
-
-static int maybe_start_packet(vorb *f)
-{
- if (f->next_seg == -1) {
- int x = get8(f);
- if (f->eof) return FALSE; // EOF at page boundary is not an error!
- if (0x4f != x ) return error(f, VORBIS_missing_capture_pattern);
- if (0x67 != get8(f)) return error(f, VORBIS_missing_capture_pattern);
- if (0x67 != get8(f)) return error(f, VORBIS_missing_capture_pattern);
- if (0x53 != get8(f)) return error(f, VORBIS_missing_capture_pattern);
- if (!start_page_no_capturepattern(f)) return FALSE;
- if (f->page_flag & PAGEFLAG_continued_packet) {
- // set up enough state that we can read this packet if we want,
- // e.g. during recovery
- f->last_seg = FALSE;
- f->bytes_in_seg = 0;
- return error(f, VORBIS_continued_packet_flag_invalid);
- }
- }
- return start_packet(f);
-}
-
-static int next_segment(vorb *f)
-{
- int len;
- if (f->last_seg) return 0;
- if (f->next_seg == -1) {
- f->last_seg_which = f->segment_count-1; // in case start_page fails
- if (!start_page(f)) { f->last_seg = 1; return 0; }
- if (!(f->page_flag & PAGEFLAG_continued_packet)) return error(f, VORBIS_continued_packet_flag_invalid);
- }
- len = f->segments[f->next_seg++];
- if (len < 255) {
- f->last_seg = TRUE;
- f->last_seg_which = f->next_seg-1;
- }
- if (f->next_seg >= f->segment_count)
- f->next_seg = -1;
- assert(f->bytes_in_seg == 0);
- f->bytes_in_seg = len;
- return len;
-}
-
-#define EOP (-1)
-#define INVALID_BITS (-1)
-
-static int get8_packet_raw(vorb *f)
-{
- if (!f->bytes_in_seg) { // CLANG!
- if (f->last_seg) return EOP;
- else if (!next_segment(f)) return EOP;
- }
- assert(f->bytes_in_seg > 0);
- --f->bytes_in_seg;
- ++f->packet_bytes;
- return get8(f);
-}
-
-static int get8_packet(vorb *f)
-{
- int x = get8_packet_raw(f);
- f->valid_bits = 0;
- return x;
-}
-
-static int get32_packet(vorb *f)
-{
- uint32 x;
- x = get8_packet(f);
- x += get8_packet(f) << 8;
- x += get8_packet(f) << 16;
- x += (uint32) get8_packet(f) << 24;
- return x;
-}
-
-static void flush_packet(vorb *f)
-{
- while (get8_packet_raw(f) != EOP);
-}
-
-// @OPTIMIZE: this is the secondary bit decoder, so it's probably not as important
-// as the huffman decoder?
-static uint32 get_bits(vorb *f, int n)
-{
- uint32 z;
-
- if (f->valid_bits < 0) return 0;
- if (f->valid_bits < n) {
- if (n > 24) {
- // the accumulator technique below would not work correctly in this case
- z = get_bits(f, 24);
- z += get_bits(f, n-24) << 24;
- return z;
- }
- if (f->valid_bits == 0) f->acc = 0;
- while (f->valid_bits < n) {
- int z = get8_packet_raw(f);
- if (z == EOP) {
- f->valid_bits = INVALID_BITS;
- return 0;
- }
- f->acc += z << f->valid_bits;
- f->valid_bits += 8;
- }
- }
-
- assert(f->valid_bits >= n);
- z = f->acc & ((1 << n)-1);
- f->acc >>= n;
- f->valid_bits -= n;
- return z;
-}
-
-// @OPTIMIZE: primary accumulator for huffman
-// expand the buffer to as many bits as possible without reading off end of packet
-// it might be nice to allow f->valid_bits and f->acc to be stored in registers,
-// e.g. cache them locally and decode locally
-static __forceinline void prep_huffman(vorb *f)
-{
- if (f->valid_bits <= 24) {
- if (f->valid_bits == 0) f->acc = 0;
- do {
- int z;
- if (f->last_seg && !f->bytes_in_seg) return;
- z = get8_packet_raw(f);
- if (z == EOP) return;
- f->acc += (unsigned) z << f->valid_bits;
- f->valid_bits += 8;
- } while (f->valid_bits <= 24);
- }
-}
-
-enum
-{
- VORBIS_packet_id = 1,
- VORBIS_packet_comment = 3,
- VORBIS_packet_setup = 5
-};
-
-static int codebook_decode_scalar_raw(vorb *f, Codebook *c)
-{
- int i;
- prep_huffman(f);
-
- if (c->codewords == NULL && c->sorted_codewords == NULL)
- return -1;
-
- // cases to use binary search: sorted_codewords && !c->codewords
- // sorted_codewords && c->entries > 8
- if (c->entries > 8 ? c->sorted_codewords!=NULL : !c->codewords) {
- // binary search
- uint32 code = bit_reverse(f->acc);
- int x=0, n=c->sorted_entries, len;
-
- while (n > 1) {
- // invariant: sc[x] <= code < sc[x+n]
- int m = x + (n >> 1);
- if (c->sorted_codewords[m] <= code) {
- x = m;
- n -= (n>>1);
- } else {
- n >>= 1;
- }
- }
- // x is now the sorted index
- if (!c->sparse) x = c->sorted_values[x];
- // x is now sorted index if sparse, or symbol otherwise
- len = c->codeword_lengths[x];
- if (f->valid_bits >= len) {
- f->acc >>= len;
- f->valid_bits -= len;
- return x;
- }
-
- f->valid_bits = 0;
- return -1;
- }
-
- // if small, linear search
- assert(!c->sparse);
- for (i=0; i < c->entries; ++i) {
- if (c->codeword_lengths[i] == NO_CODE) continue;
- if (c->codewords[i] == (f->acc & ((1 << c->codeword_lengths[i])-1))) {
- if (f->valid_bits >= c->codeword_lengths[i]) {
- f->acc >>= c->codeword_lengths[i];
- f->valid_bits -= c->codeword_lengths[i];
- return i;
- }
- f->valid_bits = 0;
- return -1;
- }
- }
-
- error(f, VORBIS_invalid_stream);
- f->valid_bits = 0;
- return -1;
-}
-
-#ifndef STB_VORBIS_NO_INLINE_DECODE
-
-#define DECODE_RAW(var, f,c) \
- if (f->valid_bits < STB_VORBIS_FAST_HUFFMAN_LENGTH) \
- prep_huffman(f); \
- var = f->acc & FAST_HUFFMAN_TABLE_MASK; \
- var = c->fast_huffman[var]; \
- if (var >= 0) { \
- int n = c->codeword_lengths[var]; \
- f->acc >>= n; \
- f->valid_bits -= n; \
- if (f->valid_bits < 0) { f->valid_bits = 0; var = -1; } \
- } else { \
- var = codebook_decode_scalar_raw(f,c); \
- }
-
-#else
-
-static int codebook_decode_scalar(vorb *f, Codebook *c)
-{
- int i;
- if (f->valid_bits < STB_VORBIS_FAST_HUFFMAN_LENGTH)
- prep_huffman(f);
- // fast huffman table lookup
- i = f->acc & FAST_HUFFMAN_TABLE_MASK;
- i = c->fast_huffman[i];
- if (i >= 0) {
- f->acc >>= c->codeword_lengths[i];
- f->valid_bits -= c->codeword_lengths[i];
- if (f->valid_bits < 0) { f->valid_bits = 0; return -1; }
- return i;
- }
- return codebook_decode_scalar_raw(f,c);
-}
-
-#define DECODE_RAW(var,f,c) var = codebook_decode_scalar(f,c);
-
-#endif
-
-#define DECODE(var,f,c) \
- DECODE_RAW(var,f,c) \
- if (c->sparse) var = c->sorted_values[var];
-
-#ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK
- #define DECODE_VQ(var,f,c) DECODE_RAW(var,f,c)
-#else
- #define DECODE_VQ(var,f,c) DECODE(var,f,c)
-#endif
-
-
-
-
-
-
-// CODEBOOK_ELEMENT_FAST is an optimization for the CODEBOOK_FLOATS case
-// where we avoid one addition
-#define CODEBOOK_ELEMENT(c,off) (c->multiplicands[off])
-#define CODEBOOK_ELEMENT_FAST(c,off) (c->multiplicands[off])
-#define CODEBOOK_ELEMENT_BASE(c) (0)
-
-static int codebook_decode_start(vorb *f, Codebook *c)
-{
- int z = -1;
-
- // type 0 is only legal in a scalar context
- if (c->lookup_type == 0)
- error(f, VORBIS_invalid_stream);
- else {
- DECODE_VQ(z,f,c);
- if (c->sparse) assert(z < c->sorted_entries);
- if (z < 0) { // check for EOP
- if (!f->bytes_in_seg)
- if (f->last_seg)
- return z;
- error(f, VORBIS_invalid_stream);
- }
- }
- return z;
-}
-
-static int codebook_decode(vorb *f, Codebook *c, float *output, int len)
-{
- int i,z = codebook_decode_start(f,c);
- if (z < 0) return FALSE;
- if (len > c->dimensions) len = c->dimensions;
-
-#ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK
- if (c->lookup_type == 1) {
- float last = CODEBOOK_ELEMENT_BASE(c);
- int div = 1;
- for (i=0; i < len; ++i) {
- int off = (z / div) % c->lookup_values;
- float val = CODEBOOK_ELEMENT_FAST(c,off) + last;
- output[i] += val;
- if (c->sequence_p) last = val + c->minimum_value;
- div *= c->lookup_values;
- }
- return TRUE;
- }
-#endif
-
- z *= c->dimensions;
- if (c->sequence_p) {
- float last = CODEBOOK_ELEMENT_BASE(c);
- for (i=0; i < len; ++i) {
- float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last;
- output[i] += val;
- last = val + c->minimum_value;
- }
- } else {
- float last = CODEBOOK_ELEMENT_BASE(c);
- for (i=0; i < len; ++i) {
- output[i] += CODEBOOK_ELEMENT_FAST(c,z+i) + last;
- }
- }
-
- return TRUE;
-}
-
-static int codebook_decode_step(vorb *f, Codebook *c, float *output, int len, int step)
-{
- int i,z = codebook_decode_start(f,c);
- float last = CODEBOOK_ELEMENT_BASE(c);
- if (z < 0) return FALSE;
- if (len > c->dimensions) len = c->dimensions;
-
-#ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK
- if (c->lookup_type == 1) {
- int div = 1;
- for (i=0; i < len; ++i) {
- int off = (z / div) % c->lookup_values;
- float val = CODEBOOK_ELEMENT_FAST(c,off) + last;
- output[i*step] += val;
- if (c->sequence_p) last = val;
- div *= c->lookup_values;
- }
- return TRUE;
- }
-#endif
-
- z *= c->dimensions;
- for (i=0; i < len; ++i) {
- float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last;
- output[i*step] += val;
- if (c->sequence_p) last = val;
- }
-
- return TRUE;
-}
-
-static int codebook_decode_deinterleave_repeat(vorb *f, Codebook *c, float **outputs, int ch, int *c_inter_p, int *p_inter_p, int len, int total_decode)
-{
- int c_inter = *c_inter_p;
- int p_inter = *p_inter_p;
- int i,z, effective = c->dimensions;
-
- // type 0 is only legal in a scalar context
- if (c->lookup_type == 0) return error(f, VORBIS_invalid_stream);
-
- while (total_decode > 0) {
- float last = CODEBOOK_ELEMENT_BASE(c);
- DECODE_VQ(z,f,c);
- #ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK
- assert(!c->sparse || z < c->sorted_entries);
- #endif
- if (z < 0) {
- if (!f->bytes_in_seg)
- if (f->last_seg) return FALSE;
- return error(f, VORBIS_invalid_stream);
- }
-
- // if this will take us off the end of the buffers, stop short!
- // we check by computing the length of the virtual interleaved
- // buffer (len*ch), our current offset within it (p_inter*ch)+(c_inter),
- // and the length we'll be using (effective)
- if (c_inter + p_inter*ch + effective > len * ch) {
- effective = len*ch - (p_inter*ch - c_inter);
- }
-
- #ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK
- if (c->lookup_type == 1) {
- int div = 1;
- for (i=0; i < effective; ++i) {
- int off = (z / div) % c->lookup_values;
- float val = CODEBOOK_ELEMENT_FAST(c,off) + last;
- if (outputs[c_inter])
- outputs[c_inter][p_inter] += val;
- if (++c_inter == ch) { c_inter = 0; ++p_inter; }
- if (c->sequence_p) last = val;
- div *= c->lookup_values;
- }
- } else
- #endif
- {
- z *= c->dimensions;
- if (c->sequence_p) {
- for (i=0; i < effective; ++i) {
- float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last;
- if (outputs[c_inter])
- outputs[c_inter][p_inter] += val;
- if (++c_inter == ch) { c_inter = 0; ++p_inter; }
- last = val;
- }
- } else {
- for (i=0; i < effective; ++i) {
- float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last;
- if (outputs[c_inter])
- outputs[c_inter][p_inter] += val;
- if (++c_inter == ch) { c_inter = 0; ++p_inter; }
- }
- }
- }
-
- total_decode -= effective;
- }
- *c_inter_p = c_inter;
- *p_inter_p = p_inter;
- return TRUE;
-}
-
-static int predict_point(int x, int x0, int x1, int y0, int y1)
-{
- int dy = y1 - y0;
- int adx = x1 - x0;
- // @OPTIMIZE: force int division to round in the right direction... is this necessary on x86?
- int err = abs(dy) * (x - x0);
- int off = err / adx;
- return dy < 0 ? y0 - off : y0 + off;
-}
-
-// the following table is block-copied from the specification
-static float inverse_db_table[256] =
-{
- 1.0649863e-07f, 1.1341951e-07f, 1.2079015e-07f, 1.2863978e-07f,
- 1.3699951e-07f, 1.4590251e-07f, 1.5538408e-07f, 1.6548181e-07f,
- 1.7623575e-07f, 1.8768855e-07f, 1.9988561e-07f, 2.1287530e-07f,
- 2.2670913e-07f, 2.4144197e-07f, 2.5713223e-07f, 2.7384213e-07f,
- 2.9163793e-07f, 3.1059021e-07f, 3.3077411e-07f, 3.5226968e-07f,
- 3.7516214e-07f, 3.9954229e-07f, 4.2550680e-07f, 4.5315863e-07f,
- 4.8260743e-07f, 5.1396998e-07f, 5.4737065e-07f, 5.8294187e-07f,
- 6.2082472e-07f, 6.6116941e-07f, 7.0413592e-07f, 7.4989464e-07f,
- 7.9862701e-07f, 8.5052630e-07f, 9.0579828e-07f, 9.6466216e-07f,
- 1.0273513e-06f, 1.0941144e-06f, 1.1652161e-06f, 1.2409384e-06f,
- 1.3215816e-06f, 1.4074654e-06f, 1.4989305e-06f, 1.5963394e-06f,
- 1.7000785e-06f, 1.8105592e-06f, 1.9282195e-06f, 2.0535261e-06f,
- 2.1869758e-06f, 2.3290978e-06f, 2.4804557e-06f, 2.6416497e-06f,
- 2.8133190e-06f, 2.9961443e-06f, 3.1908506e-06f, 3.3982101e-06f,
- 3.6190449e-06f, 3.8542308e-06f, 4.1047004e-06f, 4.3714470e-06f,
- 4.6555282e-06f, 4.9580707e-06f, 5.2802740e-06f, 5.6234160e-06f,
- 5.9888572e-06f, 6.3780469e-06f, 6.7925283e-06f, 7.2339451e-06f,
- 7.7040476e-06f, 8.2047000e-06f, 8.7378876e-06f, 9.3057248e-06f,
- 9.9104632e-06f, 1.0554501e-05f, 1.1240392e-05f, 1.1970856e-05f,
- 1.2748789e-05f, 1.3577278e-05f, 1.4459606e-05f, 1.5399272e-05f,
- 1.6400004e-05f, 1.7465768e-05f, 1.8600792e-05f, 1.9809576e-05f,
- 2.1096914e-05f, 2.2467911e-05f, 2.3928002e-05f, 2.5482978e-05f,
- 2.7139006e-05f, 2.8902651e-05f, 3.0780908e-05f, 3.2781225e-05f,
- 3.4911534e-05f, 3.7180282e-05f, 3.9596466e-05f, 4.2169667e-05f,
- 4.4910090e-05f, 4.7828601e-05f, 5.0936773e-05f, 5.4246931e-05f,
- 5.7772202e-05f, 6.1526565e-05f, 6.5524908e-05f, 6.9783085e-05f,
- 7.4317983e-05f, 7.9147585e-05f, 8.4291040e-05f, 8.9768747e-05f,
- 9.5602426e-05f, 0.00010181521f, 0.00010843174f, 0.00011547824f,
- 0.00012298267f, 0.00013097477f, 0.00013948625f, 0.00014855085f,
- 0.00015820453f, 0.00016848555f, 0.00017943469f, 0.00019109536f,
- 0.00020351382f, 0.00021673929f, 0.00023082423f, 0.00024582449f,
- 0.00026179955f, 0.00027881276f, 0.00029693158f, 0.00031622787f,
- 0.00033677814f, 0.00035866388f, 0.00038197188f, 0.00040679456f,
- 0.00043323036f, 0.00046138411f, 0.00049136745f, 0.00052329927f,
- 0.00055730621f, 0.00059352311f, 0.00063209358f, 0.00067317058f,
- 0.00071691700f, 0.00076350630f, 0.00081312324f, 0.00086596457f,
- 0.00092223983f, 0.00098217216f, 0.0010459992f, 0.0011139742f,
- 0.0011863665f, 0.0012634633f, 0.0013455702f, 0.0014330129f,
- 0.0015261382f, 0.0016253153f, 0.0017309374f, 0.0018434235f,
- 0.0019632195f, 0.0020908006f, 0.0022266726f, 0.0023713743f,
- 0.0025254795f, 0.0026895994f, 0.0028643847f, 0.0030505286f,
- 0.0032487691f, 0.0034598925f, 0.0036847358f, 0.0039241906f,
- 0.0041792066f, 0.0044507950f, 0.0047400328f, 0.0050480668f,
- 0.0053761186f, 0.0057254891f, 0.0060975636f, 0.0064938176f,
- 0.0069158225f, 0.0073652516f, 0.0078438871f, 0.0083536271f,
- 0.0088964928f, 0.009474637f, 0.010090352f, 0.010746080f,
- 0.011444421f, 0.012188144f, 0.012980198f, 0.013823725f,
- 0.014722068f, 0.015678791f, 0.016697687f, 0.017782797f,
- 0.018938423f, 0.020169149f, 0.021479854f, 0.022875735f,
- 0.024362330f, 0.025945531f, 0.027631618f, 0.029427276f,
- 0.031339626f, 0.033376252f, 0.035545228f, 0.037855157f,
- 0.040315199f, 0.042935108f, 0.045725273f, 0.048696758f,
- 0.051861348f, 0.055231591f, 0.058820850f, 0.062643361f,
- 0.066714279f, 0.071049749f, 0.075666962f, 0.080584227f,
- 0.085821044f, 0.091398179f, 0.097337747f, 0.10366330f,
- 0.11039993f, 0.11757434f, 0.12521498f, 0.13335215f,
- 0.14201813f, 0.15124727f, 0.16107617f, 0.17154380f,
- 0.18269168f, 0.19456402f, 0.20720788f, 0.22067342f,
- 0.23501402f, 0.25028656f, 0.26655159f, 0.28387361f,
- 0.30232132f, 0.32196786f, 0.34289114f, 0.36517414f,
- 0.38890521f, 0.41417847f, 0.44109412f, 0.46975890f,
- 0.50028648f, 0.53279791f, 0.56742212f, 0.60429640f,
- 0.64356699f, 0.68538959f, 0.72993007f, 0.77736504f,
- 0.82788260f, 0.88168307f, 0.9389798f, 1.0f
-};
-
-
-// @OPTIMIZE: if you want to replace this bresenham line-drawing routine,
-// note that you must produce bit-identical output to decode correctly;
-// this specific sequence of operations is specified in the spec (it's
-// drawing integer-quantized frequency-space lines that the encoder
-// expects to be exactly the same)
-// ... also, isn't the whole point of Bresenham's algorithm to NOT
-// have to divide in the setup? sigh.
-#ifndef STB_VORBIS_NO_DEFER_FLOOR
-#define LINE_OP(a,b) a *= b
-#else
-#define LINE_OP(a,b) a = b
-#endif
-
-#ifdef STB_VORBIS_DIVIDE_TABLE
-#define DIVTAB_NUMER 32
-#define DIVTAB_DENOM 64
-int8 integer_divide_table[DIVTAB_NUMER][DIVTAB_DENOM]; // 2KB
-#endif
-
-static __forceinline void draw_line(float *output, int x0, int y0, int x1, int y1, int n)
-{
- int dy = y1 - y0;
- int adx = x1 - x0;
- int ady = abs(dy);
- int base;
- int x=x0,y=y0;
- int err = 0;
- int sy;
-
-#ifdef STB_VORBIS_DIVIDE_TABLE
- if (adx < DIVTAB_DENOM && ady < DIVTAB_NUMER) {
- if (dy < 0) {
- base = -integer_divide_table[ady][adx];
- sy = base-1;
- } else {
- base = integer_divide_table[ady][adx];
- sy = base+1;
- }
- } else {
- base = dy / adx;
- if (dy < 0)
- sy = base - 1;
- else
- sy = base+1;
- }
-#else
- base = dy / adx;
- if (dy < 0)
- sy = base - 1;
- else
- sy = base+1;
-#endif
- ady -= abs(base) * adx;
- if (x1 > n) x1 = n;
- if (x < x1) {
- LINE_OP(output[x], inverse_db_table[y&255]);
- for (++x; x < x1; ++x) {
- err += ady;
- if (err >= adx) {
- err -= adx;
- y += sy;
- } else
- y += base;
- LINE_OP(output[x], inverse_db_table[y&255]);
- }
- }
-}
-
-static int residue_decode(vorb *f, Codebook *book, float *target, int offset, int n, int rtype)
-{
- int k;
- if (rtype == 0) {
- int step = n / book->dimensions;
- for (k=0; k < step; ++k)
- if (!codebook_decode_step(f, book, target+offset+k, n-offset-k, step))
- return FALSE;
- } else {
- for (k=0; k < n; ) {
- if (!codebook_decode(f, book, target+offset, n-k))
- return FALSE;
- k += book->dimensions;
- offset += book->dimensions;
- }
- }
- return TRUE;
-}
-
-// n is 1/2 of the blocksize --
-// specification: "Correct per-vector decode length is [n]/2"
-static void decode_residue(vorb *f, float *residue_buffers[], int ch, int n, int rn, uint8 *do_not_decode)
-{
- int i,j,pass;
- Residue *r = f->residue_config + rn;
- int rtype = f->residue_types[rn];
- int c = r->classbook;
- int classwords = f->codebooks[c].dimensions;
- unsigned int actual_size = rtype == 2 ? n*2 : n;
- unsigned int limit_r_begin = (r->begin < actual_size ? r->begin : actual_size);
- unsigned int limit_r_end = (r->end < actual_size ? r->end : actual_size);
- int n_read = limit_r_end - limit_r_begin;
- int part_read = n_read / r->part_size;
- int temp_alloc_point = temp_alloc_save(f);
- #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE
- uint8 ***part_classdata = (uint8 ***) temp_block_array(f,f->channels, part_read * sizeof(**part_classdata));
- #else
- int **classifications = (int **) temp_block_array(f,f->channels, part_read * sizeof(**classifications));
- #endif
-
- CHECK(f);
-
- for (i=0; i < ch; ++i)
- if (!do_not_decode[i])
- memset(residue_buffers[i], 0, sizeof(float) * n);
-
- if (rtype == 2 && ch != 1) {
- for (j=0; j < ch; ++j)
- if (!do_not_decode[j])
- break;
- if (j == ch)
- goto done;
-
- for (pass=0; pass < 8; ++pass) {
- int pcount = 0, class_set = 0;
- if (ch == 2) {
- while (pcount < part_read) {
- int z = r->begin + pcount*r->part_size;
- int c_inter = (z & 1), p_inter = z>>1;
- if (pass == 0) {
- Codebook *c = f->codebooks+r->classbook;
- int q;
- DECODE(q,f,c);
- if (q == EOP) goto done;
- #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE
- part_classdata[0][class_set] = r->classdata[q];
- #else
- for (i=classwords-1; i >= 0; --i) {
- classifications[0][i+pcount] = q % r->classifications;
- q /= r->classifications;
- }
- #endif
- }
- for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) {
- int z = r->begin + pcount*r->part_size;
- #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE
- int c = part_classdata[0][class_set][i];
- #else
- int c = classifications[0][pcount];
- #endif
- int b = r->residue_books[c][pass];
- if (b >= 0) {
- Codebook *book = f->codebooks + b;
- #ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK
- if (!codebook_decode_deinterleave_repeat(f, book, residue_buffers, ch, &c_inter, &p_inter, n, r->part_size))
- goto done;
- #else
- // saves 1%
- if (!codebook_decode_deinterleave_repeat(f, book, residue_buffers, ch, &c_inter, &p_inter, n, r->part_size))
- goto done;
- #endif
- } else {
- z += r->part_size;
- c_inter = z & 1;
- p_inter = z >> 1;
- }
- }
- #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE
- ++class_set;
- #endif
- }
- } else if (ch > 2) {
- while (pcount < part_read) {
- int z = r->begin + pcount*r->part_size;
- int c_inter = z % ch, p_inter = z/ch;
- if (pass == 0) {
- Codebook *c = f->codebooks+r->classbook;
- int q;
- DECODE(q,f,c);
- if (q == EOP) goto done;
- #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE
- part_classdata[0][class_set] = r->classdata[q];
- #else
- for (i=classwords-1; i >= 0; --i) {
- classifications[0][i+pcount] = q % r->classifications;
- q /= r->classifications;
- }
- #endif
- }
- for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) {
- int z = r->begin + pcount*r->part_size;
- #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE
- int c = part_classdata[0][class_set][i];
- #else
- int c = classifications[0][pcount];
- #endif
- int b = r->residue_books[c][pass];
- if (b >= 0) {
- Codebook *book = f->codebooks + b;
- if (!codebook_decode_deinterleave_repeat(f, book, residue_buffers, ch, &c_inter, &p_inter, n, r->part_size))
- goto done;
- } else {
- z += r->part_size;
- c_inter = z % ch;
- p_inter = z / ch;
- }
- }
- #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE
- ++class_set;
- #endif
- }
- }
- }
- goto done;
- }
- CHECK(f);
-
- for (pass=0; pass < 8; ++pass) {
- int pcount = 0, class_set=0;
- while (pcount < part_read) {
- if (pass == 0) {
- for (j=0; j < ch; ++j) {
- if (!do_not_decode[j]) {
- Codebook *c = f->codebooks+r->classbook;
- int temp;
- DECODE(temp,f,c);
- if (temp == EOP) goto done;
- #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE
- part_classdata[j][class_set] = r->classdata[temp];
- #else
- for (i=classwords-1; i >= 0; --i) {
- classifications[j][i+pcount] = temp % r->classifications;
- temp /= r->classifications;
- }
- #endif
- }
- }
- }
- for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) {
- for (j=0; j < ch; ++j) {
- if (!do_not_decode[j]) {
- #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE
- int c = part_classdata[j][class_set][i];
- #else
- int c = classifications[j][pcount];
- #endif
- int b = r->residue_books[c][pass];
- if (b >= 0) {
- float *target = residue_buffers[j];
- int offset = r->begin + pcount * r->part_size;
- int n = r->part_size;
- Codebook *book = f->codebooks + b;
- if (!residue_decode(f, book, target, offset, n, rtype))
- goto done;
- }
- }
- }
- }
- #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE
- ++class_set;
- #endif
- }
- }
- done:
- CHECK(f);
- #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE
- temp_free(f,part_classdata);
- #else
- temp_free(f,classifications);
- #endif
- temp_alloc_restore(f,temp_alloc_point);
-}
-
-
-#if 0
-// slow way for debugging
-void inverse_mdct_slow(float *buffer, int n)
-{
- int i,j;
- int n2 = n >> 1;
- float *x = (float *) malloc(sizeof(*x) * n2);
- memcpy(x, buffer, sizeof(*x) * n2);
- for (i=0; i < n; ++i) {
- float acc = 0;
- for (j=0; j < n2; ++j)
- // formula from paper:
- //acc += n/4.0f * x[j] * (float) cos(M_PI / 2 / n * (2 * i + 1 + n/2.0)*(2*j+1));
- // formula from wikipedia
- //acc += 2.0f / n2 * x[j] * (float) cos(M_PI/n2 * (i + 0.5 + n2/2)*(j + 0.5));
- // these are equivalent, except the formula from the paper inverts the multiplier!
- // however, what actually works is NO MULTIPLIER!?!
- //acc += 64 * 2.0f / n2 * x[j] * (float) cos(M_PI/n2 * (i + 0.5 + n2/2)*(j + 0.5));
- acc += x[j] * (float) cos(M_PI / 2 / n * (2 * i + 1 + n/2.0)*(2*j+1));
- buffer[i] = acc;
- }
- free(x);
-}
-#elif 0
-// same as above, but just barely able to run in real time on modern machines
-void inverse_mdct_slow(float *buffer, int n, vorb *f, int blocktype)
-{
- float mcos[16384];
- int i,j;
- int n2 = n >> 1, nmask = (n << 2) -1;
- float *x = (float *) malloc(sizeof(*x) * n2);
- memcpy(x, buffer, sizeof(*x) * n2);
- for (i=0; i < 4*n; ++i)
- mcos[i] = (float) cos(M_PI / 2 * i / n);
-
- for (i=0; i < n; ++i) {
- float acc = 0;
- for (j=0; j < n2; ++j)
- acc += x[j] * mcos[(2 * i + 1 + n2)*(2*j+1) & nmask];
- buffer[i] = acc;
- }
- free(x);
-}
-#elif 0
-// transform to use a slow dct-iv; this is STILL basically trivial,
-// but only requires half as many ops
-void dct_iv_slow(float *buffer, int n)
-{
- float mcos[16384];
- float x[2048];
- int i,j;
- int n2 = n >> 1, nmask = (n << 3) - 1;
- memcpy(x, buffer, sizeof(*x) * n);
- for (i=0; i < 8*n; ++i)
- mcos[i] = (float) cos(M_PI / 4 * i / n);
- for (i=0; i < n; ++i) {
- float acc = 0;
- for (j=0; j < n; ++j)
- acc += x[j] * mcos[((2 * i + 1)*(2*j+1)) & nmask];
- buffer[i] = acc;
- }
-}
-
-void inverse_mdct_slow(float *buffer, int n, vorb *f, int blocktype)
-{
- int i, n4 = n >> 2, n2 = n >> 1, n3_4 = n - n4;
- float temp[4096];
-
- memcpy(temp, buffer, n2 * sizeof(float));
- dct_iv_slow(temp, n2); // returns -c'-d, a-b'
-
- for (i=0; i < n4 ; ++i) buffer[i] = temp[i+n4]; // a-b'
- for ( ; i < n3_4; ++i) buffer[i] = -temp[n3_4 - i - 1]; // b-a', c+d'
- for ( ; i < n ; ++i) buffer[i] = -temp[i - n3_4]; // c'+d
-}
-#endif
-
-#ifndef LIBVORBIS_MDCT
-#define LIBVORBIS_MDCT 0
-#endif
-
-#if LIBVORBIS_MDCT
-// directly call the vorbis MDCT using an interface documented
-// by Jeff Roberts... useful for performance comparison
-typedef struct
-{
- int n;
- int log2n;
-
- float *trig;
- int *bitrev;
-
- float scale;
-} mdct_lookup;
-
-extern void mdct_init(mdct_lookup *lookup, int n);
-extern void mdct_clear(mdct_lookup *l);
-extern void mdct_backward(mdct_lookup *init, float *in, float *out);
-
-mdct_lookup M1,M2;
-
-void inverse_mdct(float *buffer, int n, vorb *f, int blocktype)
-{
- mdct_lookup *M;
- if (M1.n == n) M = &M1;
- else if (M2.n == n) M = &M2;
- else if (M1.n == 0) { mdct_init(&M1, n); M = &M1; }
- else {
- if (M2.n) __asm int 3;
- mdct_init(&M2, n);
- M = &M2;
- }
-
- mdct_backward(M, buffer, buffer);
-}
-#endif
-
-
-// the following were split out into separate functions while optimizing;
-// they could be pushed back up but eh. __forceinline showed no change;
-// they're probably already being inlined.
-static void imdct_step3_iter0_loop(int n, float *e, int i_off, int k_off, float *A)
-{
- float *ee0 = e + i_off;
- float *ee2 = ee0 + k_off;
- int i;
-
- assert((n & 3) == 0);
- for (i=(n>>2); i > 0; --i) {
- float k00_20, k01_21;
- k00_20 = ee0[ 0] - ee2[ 0];
- k01_21 = ee0[-1] - ee2[-1];
- ee0[ 0] += ee2[ 0];//ee0[ 0] = ee0[ 0] + ee2[ 0];
- ee0[-1] += ee2[-1];//ee0[-1] = ee0[-1] + ee2[-1];
- ee2[ 0] = k00_20 * A[0] - k01_21 * A[1];
- ee2[-1] = k01_21 * A[0] + k00_20 * A[1];
- A += 8;
-
- k00_20 = ee0[-2] - ee2[-2];
- k01_21 = ee0[-3] - ee2[-3];
- ee0[-2] += ee2[-2];//ee0[-2] = ee0[-2] + ee2[-2];
- ee0[-3] += ee2[-3];//ee0[-3] = ee0[-3] + ee2[-3];
- ee2[-2] = k00_20 * A[0] - k01_21 * A[1];
- ee2[-3] = k01_21 * A[0] + k00_20 * A[1];
- A += 8;
-
- k00_20 = ee0[-4] - ee2[-4];
- k01_21 = ee0[-5] - ee2[-5];
- ee0[-4] += ee2[-4];//ee0[-4] = ee0[-4] + ee2[-4];
- ee0[-5] += ee2[-5];//ee0[-5] = ee0[-5] + ee2[-5];
- ee2[-4] = k00_20 * A[0] - k01_21 * A[1];
- ee2[-5] = k01_21 * A[0] + k00_20 * A[1];
- A += 8;
-
- k00_20 = ee0[-6] - ee2[-6];
- k01_21 = ee0[-7] - ee2[-7];
- ee0[-6] += ee2[-6];//ee0[-6] = ee0[-6] + ee2[-6];
- ee0[-7] += ee2[-7];//ee0[-7] = ee0[-7] + ee2[-7];
- ee2[-6] = k00_20 * A[0] - k01_21 * A[1];
- ee2[-7] = k01_21 * A[0] + k00_20 * A[1];
- A += 8;
- ee0 -= 8;
- ee2 -= 8;
- }
-}
-
-static void imdct_step3_inner_r_loop(int lim, float *e, int d0, int k_off, float *A, int k1)
-{
- int i;
- float k00_20, k01_21;
-
- float *e0 = e + d0;
- float *e2 = e0 + k_off;
-
- for (i=lim >> 2; i > 0; --i) {
- k00_20 = e0[-0] - e2[-0];
- k01_21 = e0[-1] - e2[-1];
- e0[-0] += e2[-0];//e0[-0] = e0[-0] + e2[-0];
- e0[-1] += e2[-1];//e0[-1] = e0[-1] + e2[-1];
- e2[-0] = (k00_20)*A[0] - (k01_21) * A[1];
- e2[-1] = (k01_21)*A[0] + (k00_20) * A[1];
-
- A += k1;
-
- k00_20 = e0[-2] - e2[-2];
- k01_21 = e0[-3] - e2[-3];
- e0[-2] += e2[-2];//e0[-2] = e0[-2] + e2[-2];
- e0[-3] += e2[-3];//e0[-3] = e0[-3] + e2[-3];
- e2[-2] = (k00_20)*A[0] - (k01_21) * A[1];
- e2[-3] = (k01_21)*A[0] + (k00_20) * A[1];
-
- A += k1;
-
- k00_20 = e0[-4] - e2[-4];
- k01_21 = e0[-5] - e2[-5];
- e0[-4] += e2[-4];//e0[-4] = e0[-4] + e2[-4];
- e0[-5] += e2[-5];//e0[-5] = e0[-5] + e2[-5];
- e2[-4] = (k00_20)*A[0] - (k01_21) * A[1];
- e2[-5] = (k01_21)*A[0] + (k00_20) * A[1];
-
- A += k1;
-
- k00_20 = e0[-6] - e2[-6];
- k01_21 = e0[-7] - e2[-7];
- e0[-6] += e2[-6];//e0[-6] = e0[-6] + e2[-6];
- e0[-7] += e2[-7];//e0[-7] = e0[-7] + e2[-7];
- e2[-6] = (k00_20)*A[0] - (k01_21) * A[1];
- e2[-7] = (k01_21)*A[0] + (k00_20) * A[1];
-
- e0 -= 8;
- e2 -= 8;
-
- A += k1;
- }
-}
-
-static void imdct_step3_inner_s_loop(int n, float *e, int i_off, int k_off, float *A, int a_off, int k0)
-{
- int i;
- float A0 = A[0];
- float A1 = A[0+1];
- float A2 = A[0+a_off];
- float A3 = A[0+a_off+1];
- float A4 = A[0+a_off*2+0];
- float A5 = A[0+a_off*2+1];
- float A6 = A[0+a_off*3+0];
- float A7 = A[0+a_off*3+1];
-
- float k00,k11;
-
- float *ee0 = e +i_off;
- float *ee2 = ee0+k_off;
-
- for (i=n; i > 0; --i) {
- k00 = ee0[ 0] - ee2[ 0];
- k11 = ee0[-1] - ee2[-1];
- ee0[ 0] = ee0[ 0] + ee2[ 0];
- ee0[-1] = ee0[-1] + ee2[-1];
- ee2[ 0] = (k00) * A0 - (k11) * A1;
- ee2[-1] = (k11) * A0 + (k00) * A1;
-
- k00 = ee0[-2] - ee2[-2];
- k11 = ee0[-3] - ee2[-3];
- ee0[-2] = ee0[-2] + ee2[-2];
- ee0[-3] = ee0[-3] + ee2[-3];
- ee2[-2] = (k00) * A2 - (k11) * A3;
- ee2[-3] = (k11) * A2 + (k00) * A3;
-
- k00 = ee0[-4] - ee2[-4];
- k11 = ee0[-5] - ee2[-5];
- ee0[-4] = ee0[-4] + ee2[-4];
- ee0[-5] = ee0[-5] + ee2[-5];
- ee2[-4] = (k00) * A4 - (k11) * A5;
- ee2[-5] = (k11) * A4 + (k00) * A5;
-
- k00 = ee0[-6] - ee2[-6];
- k11 = ee0[-7] - ee2[-7];
- ee0[-6] = ee0[-6] + ee2[-6];
- ee0[-7] = ee0[-7] + ee2[-7];
- ee2[-6] = (k00) * A6 - (k11) * A7;
- ee2[-7] = (k11) * A6 + (k00) * A7;
-
- ee0 -= k0;
- ee2 -= k0;
- }
-}
-
-static __forceinline void iter_54(float *z)
-{
- float k00,k11,k22,k33;
- float y0,y1,y2,y3;
-
- k00 = z[ 0] - z[-4];
- y0 = z[ 0] + z[-4];
- y2 = z[-2] + z[-6];
- k22 = z[-2] - z[-6];
-
- z[-0] = y0 + y2; // z0 + z4 + z2 + z6
- z[-2] = y0 - y2; // z0 + z4 - z2 - z6
-
- // done with y0,y2
-
- k33 = z[-3] - z[-7];
-
- z[-4] = k00 + k33; // z0 - z4 + z3 - z7
- z[-6] = k00 - k33; // z0 - z4 - z3 + z7
-
- // done with k33
-
- k11 = z[-1] - z[-5];
- y1 = z[-1] + z[-5];
- y3 = z[-3] + z[-7];
-
- z[-1] = y1 + y3; // z1 + z5 + z3 + z7
- z[-3] = y1 - y3; // z1 + z5 - z3 - z7
- z[-5] = k11 - k22; // z1 - z5 + z2 - z6
- z[-7] = k11 + k22; // z1 - z5 - z2 + z6
-}
-
-static void imdct_step3_inner_s_loop_ld654(int n, float *e, int i_off, float *A, int base_n)
-{
- int a_off = base_n >> 3;
- float A2 = A[0+a_off];
- float *z = e + i_off;
- float *base = z - 16 * n;
-
- while (z > base) {
- float k00,k11;
-
- k00 = z[-0] - z[-8];
- k11 = z[-1] - z[-9];
- z[-0] = z[-0] + z[-8];
- z[-1] = z[-1] + z[-9];
- z[-8] = k00;
- z[-9] = k11 ;
-
- k00 = z[ -2] - z[-10];
- k11 = z[ -3] - z[-11];
- z[ -2] = z[ -2] + z[-10];
- z[ -3] = z[ -3] + z[-11];
- z[-10] = (k00+k11) * A2;
- z[-11] = (k11-k00) * A2;
-
- k00 = z[-12] - z[ -4]; // reverse to avoid a unary negation
- k11 = z[ -5] - z[-13];
- z[ -4] = z[ -4] + z[-12];
- z[ -5] = z[ -5] + z[-13];
- z[-12] = k11;
- z[-13] = k00;
-
- k00 = z[-14] - z[ -6]; // reverse to avoid a unary negation
- k11 = z[ -7] - z[-15];
- z[ -6] = z[ -6] + z[-14];
- z[ -7] = z[ -7] + z[-15];
- z[-14] = (k00+k11) * A2;
- z[-15] = (k00-k11) * A2;
-
- iter_54(z);
- iter_54(z-8);
- z -= 16;
- }
-}
-
-static void inverse_mdct(float *buffer, int n, vorb *f, int blocktype)
-{
- int n2 = n >> 1, n4 = n >> 2, n8 = n >> 3, l;
- int ld;
- // @OPTIMIZE: reduce register pressure by using fewer variables?
- int save_point = temp_alloc_save(f);
- float *buf2 = (float *) temp_alloc(f, n2 * sizeof(*buf2));
- float *u=NULL,*v=NULL;
- // twiddle factors
- float *A = f->A[blocktype];
-
- // IMDCT algorithm from "The use of multirate filter banks for coding of high quality digital audio"
- // See notes about bugs in that paper in less-optimal implementation 'inverse_mdct_old' after this function.
-
- // kernel from paper
-
-
- // merged:
- // copy and reflect spectral data
- // step 0
-
- // note that it turns out that the items added together during
- // this step are, in fact, being added to themselves (as reflected
- // by step 0). inexplicable inefficiency! this became obvious
- // once I combined the passes.
-
- // so there's a missing 'times 2' here (for adding X to itself).
- // this propagates through linearly to the end, where the numbers
- // are 1/2 too small, and need to be compensated for.
-
- {
- float *d,*e, *AA, *e_stop;
- d = &buf2[n2-2];
- AA = A;
- e = &buffer[0];
- e_stop = &buffer[n2];
- while (e != e_stop) {
- d[1] = (e[0] * AA[0] - e[2]*AA[1]);
- d[0] = (e[0] * AA[1] + e[2]*AA[0]);
- d -= 2;
- AA += 2;
- e += 4;
- }
-
- e = &buffer[n2-3];
- while (d >= buf2) {
- d[1] = (-e[2] * AA[0] - -e[0]*AA[1]);
- d[0] = (-e[2] * AA[1] + -e[0]*AA[0]);
- d -= 2;
- AA += 2;
- e -= 4;
- }
- }
-
- // now we use symbolic names for these, so that we can
- // possibly swap their meaning as we change which operations
- // are in place
-
- u = buffer;
- v = buf2;
-
- // step 2 (paper output is w, now u)
- // this could be in place, but the data ends up in the wrong
- // place... _somebody_'s got to swap it, so this is nominated
- {
- float *AA = &A[n2-8];
- float *d0,*d1, *e0, *e1;
-
- e0 = &v[n4];
- e1 = &v[0];
-
- d0 = &u[n4];
- d1 = &u[0];
-
- while (AA >= A) {
- float v40_20, v41_21;
-
- v41_21 = e0[1] - e1[1];
- v40_20 = e0[0] - e1[0];
- d0[1] = e0[1] + e1[1];
- d0[0] = e0[0] + e1[0];
- d1[1] = v41_21*AA[4] - v40_20*AA[5];
- d1[0] = v40_20*AA[4] + v41_21*AA[5];
-
- v41_21 = e0[3] - e1[3];
- v40_20 = e0[2] - e1[2];
- d0[3] = e0[3] + e1[3];
- d0[2] = e0[2] + e1[2];
- d1[3] = v41_21*AA[0] - v40_20*AA[1];
- d1[2] = v40_20*AA[0] + v41_21*AA[1];
-
- AA -= 8;
-
- d0 += 4;
- d1 += 4;
- e0 += 4;
- e1 += 4;
- }
- }
-
- // step 3
- ld = ilog(n) - 1; // ilog is off-by-one from normal definitions
-
- // optimized step 3:
-
- // the original step3 loop can be nested r inside s or s inside r;
- // it's written originally as s inside r, but this is dumb when r
- // iterates many times, and s few. So I have two copies of it and
- // switch between them halfway.
-
- // this is iteration 0 of step 3
- imdct_step3_iter0_loop(n >> 4, u, n2-1-n4*0, -(n >> 3), A);
- imdct_step3_iter0_loop(n >> 4, u, n2-1-n4*1, -(n >> 3), A);
-
- // this is iteration 1 of step 3
- imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*0, -(n >> 4), A, 16);
- imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*1, -(n >> 4), A, 16);
- imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*2, -(n >> 4), A, 16);
- imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*3, -(n >> 4), A, 16);
-
- l=2;
- for (; l < (ld-3)>>1; ++l) {
- int k0 = n >> (l+2), k0_2 = k0>>1;
- int lim = 1 << (l+1);
- int i;
- for (i=0; i < lim; ++i)
- imdct_step3_inner_r_loop(n >> (l+4), u, n2-1 - k0*i, -k0_2, A, 1 << (l+3));
- }
-
- for (; l < ld-6; ++l) {
- int k0 = n >> (l+2), k1 = 1 << (l+3), k0_2 = k0>>1;
- int rlim = n >> (l+6), r;
- int lim = 1 << (l+1);
- int i_off;
- float *A0 = A;
- i_off = n2-1;
- for (r=rlim; r > 0; --r) {
- imdct_step3_inner_s_loop(lim, u, i_off, -k0_2, A0, k1, k0);
- A0 += k1*4;
- i_off -= 8;
- }
- }
-
- // iterations with count:
- // ld-6,-5,-4 all interleaved together
- // the big win comes from getting rid of needless flops
- // due to the constants on pass 5 & 4 being all 1 and 0;
- // combining them to be simultaneous to improve cache made little difference
- imdct_step3_inner_s_loop_ld654(n >> 5, u, n2-1, A, n);
-
- // output is u
-
- // step 4, 5, and 6
- // cannot be in-place because of step 5
- {
- uint16 *bitrev = f->bit_reverse[blocktype];
- // weirdly, I'd have thought reading sequentially and writing
- // erratically would have been better than vice-versa, but in
- // fact that's not what my testing showed. (That is, with
- // j = bitreverse(i), do you read i and write j, or read j and write i.)
-
- float *d0 = &v[n4-4];
- float *d1 = &v[n2-4];
- while (d0 >= v) {
- int k4;
-
- k4 = bitrev[0];
- d1[3] = u[k4+0];
- d1[2] = u[k4+1];
- d0[3] = u[k4+2];
- d0[2] = u[k4+3];
-
- k4 = bitrev[1];
- d1[1] = u[k4+0];
- d1[0] = u[k4+1];
- d0[1] = u[k4+2];
- d0[0] = u[k4+3];
-
- d0 -= 4;
- d1 -= 4;
- bitrev += 2;
- }
- }
- // (paper output is u, now v)
-
-
- // data must be in buf2
- assert(v == buf2);
-
- // step 7 (paper output is v, now v)
- // this is now in place
- {
- float *C = f->C[blocktype];
- float *d, *e;
-
- d = v;
- e = v + n2 - 4;
-
- while (d < e) {
- float a02,a11,b0,b1,b2,b3;
-
- a02 = d[0] - e[2];
- a11 = d[1] + e[3];
-
- b0 = C[1]*a02 + C[0]*a11;
- b1 = C[1]*a11 - C[0]*a02;
-
- b2 = d[0] + e[ 2];
- b3 = d[1] - e[ 3];
-
- d[0] = b2 + b0;
- d[1] = b3 + b1;
- e[2] = b2 - b0;
- e[3] = b1 - b3;
-
- a02 = d[2] - e[0];
- a11 = d[3] + e[1];
-
- b0 = C[3]*a02 + C[2]*a11;
- b1 = C[3]*a11 - C[2]*a02;
-
- b2 = d[2] + e[ 0];
- b3 = d[3] - e[ 1];
-
- d[2] = b2 + b0;
- d[3] = b3 + b1;
- e[0] = b2 - b0;
- e[1] = b1 - b3;
-
- C += 4;
- d += 4;
- e -= 4;
- }
- }
-
- // data must be in buf2
-
-
- // step 8+decode (paper output is X, now buffer)
- // this generates pairs of data a la 8 and pushes them directly through
- // the decode kernel (pushing rather than pulling) to avoid having
- // to make another pass later
-
- // this cannot POSSIBLY be in place, so we refer to the buffers directly
-
- {
- float *d0,*d1,*d2,*d3;
-
- float *B = f->B[blocktype] + n2 - 8;
- float *e = buf2 + n2 - 8;
- d0 = &buffer[0];
- d1 = &buffer[n2-4];
- d2 = &buffer[n2];
- d3 = &buffer[n-4];
- while (e >= v) {
- float p0,p1,p2,p3;
-
- p3 = e[6]*B[7] - e[7]*B[6];
- p2 = -e[6]*B[6] - e[7]*B[7];
-
- d0[0] = p3;
- d1[3] = - p3;
- d2[0] = p2;
- d3[3] = p2;
-
- p1 = e[4]*B[5] - e[5]*B[4];
- p0 = -e[4]*B[4] - e[5]*B[5];
-
- d0[1] = p1;
- d1[2] = - p1;
- d2[1] = p0;
- d3[2] = p0;
-
- p3 = e[2]*B[3] - e[3]*B[2];
- p2 = -e[2]*B[2] - e[3]*B[3];
-
- d0[2] = p3;
- d1[1] = - p3;
- d2[2] = p2;
- d3[1] = p2;
-
- p1 = e[0]*B[1] - e[1]*B[0];
- p0 = -e[0]*B[0] - e[1]*B[1];
-
- d0[3] = p1;
- d1[0] = - p1;
- d2[3] = p0;
- d3[0] = p0;
-
- B -= 8;
- e -= 8;
- d0 += 4;
- d2 += 4;
- d1 -= 4;
- d3 -= 4;
- }
- }
-
- temp_free(f,buf2);
- temp_alloc_restore(f,save_point);
-}
-
-#if 0
-// this is the original version of the above code, if you want to optimize it from scratch
-void inverse_mdct_naive(float *buffer, int n)
-{
- float s;
- float A[1 << 12], B[1 << 12], C[1 << 11];
- int i,k,k2,k4, n2 = n >> 1, n4 = n >> 2, n8 = n >> 3, l;
- int n3_4 = n - n4, ld;
- // how can they claim this only uses N words?!
- // oh, because they're only used sparsely, whoops
- float u[1 << 13], X[1 << 13], v[1 << 13], w[1 << 13];
- // set up twiddle factors
-
- for (k=k2=0; k < n4; ++k,k2+=2) {
- A[k2 ] = (float) cos(4*k*M_PI/n);
- A[k2+1] = (float) -sin(4*k*M_PI/n);
- B[k2 ] = (float) cos((k2+1)*M_PI/n/2);
- B[k2+1] = (float) sin((k2+1)*M_PI/n/2);
- }
- for (k=k2=0; k < n8; ++k,k2+=2) {
- C[k2 ] = (float) cos(2*(k2+1)*M_PI/n);
- C[k2+1] = (float) -sin(2*(k2+1)*M_PI/n);
- }
-
- // IMDCT algorithm from "The use of multirate filter banks for coding of high quality digital audio"
- // Note there are bugs in that pseudocode, presumably due to them attempting
- // to rename the arrays nicely rather than representing the way their actual
- // implementation bounces buffers back and forth. As a result, even in the
- // "some formulars corrected" version, a direct implementation fails. These
- // are noted below as "paper bug".
-
- // copy and reflect spectral data
- for (k=0; k < n2; ++k) u[k] = buffer[k];
- for ( ; k < n ; ++k) u[k] = -buffer[n - k - 1];
- // kernel from paper
- // step 1
- for (k=k2=k4=0; k < n4; k+=1, k2+=2, k4+=4) {
- v[n-k4-1] = (u[k4] - u[n-k4-1]) * A[k2] - (u[k4+2] - u[n-k4-3])*A[k2+1];
- v[n-k4-3] = (u[k4] - u[n-k4-1]) * A[k2+1] + (u[k4+2] - u[n-k4-3])*A[k2];
- }
- // step 2
- for (k=k4=0; k < n8; k+=1, k4+=4) {
- w[n2+3+k4] = v[n2+3+k4] + v[k4+3];
- w[n2+1+k4] = v[n2+1+k4] + v[k4+1];
- w[k4+3] = (v[n2+3+k4] - v[k4+3])*A[n2-4-k4] - (v[n2+1+k4]-v[k4+1])*A[n2-3-k4];
- w[k4+1] = (v[n2+1+k4] - v[k4+1])*A[n2-4-k4] + (v[n2+3+k4]-v[k4+3])*A[n2-3-k4];
- }
- // step 3
- ld = ilog(n) - 1; // ilog is off-by-one from normal definitions
- for (l=0; l < ld-3; ++l) {
- int k0 = n >> (l+2), k1 = 1 << (l+3);
- int rlim = n >> (l+4), r4, r;
- int s2lim = 1 << (l+2), s2;
- for (r=r4=0; r < rlim; r4+=4,++r) {
- for (s2=0; s2 < s2lim; s2+=2) {
- u[n-1-k0*s2-r4] = w[n-1-k0*s2-r4] + w[n-1-k0*(s2+1)-r4];
- u[n-3-k0*s2-r4] = w[n-3-k0*s2-r4] + w[n-3-k0*(s2+1)-r4];
- u[n-1-k0*(s2+1)-r4] = (w[n-1-k0*s2-r4] - w[n-1-k0*(s2+1)-r4]) * A[r*k1]
- - (w[n-3-k0*s2-r4] - w[n-3-k0*(s2+1)-r4]) * A[r*k1+1];
- u[n-3-k0*(s2+1)-r4] = (w[n-3-k0*s2-r4] - w[n-3-k0*(s2+1)-r4]) * A[r*k1]
- + (w[n-1-k0*s2-r4] - w[n-1-k0*(s2+1)-r4]) * A[r*k1+1];
- }
- }
- if (l+1 < ld-3) {
- // paper bug: ping-ponging of u&w here is omitted
- memcpy(w, u, sizeof(u));
- }
- }
-
- // step 4
- for (i=0; i < n8; ++i) {
- int j = bit_reverse(i) >> (32-ld+3);
- assert(j < n8);
- if (i == j) {
- // paper bug: original code probably swapped in place; if copying,
- // need to directly copy in this case
- int i8 = i << 3;
- v[i8+1] = u[i8+1];
- v[i8+3] = u[i8+3];
- v[i8+5] = u[i8+5];
- v[i8+7] = u[i8+7];
- } else if (i < j) {
- int i8 = i << 3, j8 = j << 3;
- v[j8+1] = u[i8+1], v[i8+1] = u[j8 + 1];
- v[j8+3] = u[i8+3], v[i8+3] = u[j8 + 3];
- v[j8+5] = u[i8+5], v[i8+5] = u[j8 + 5];
- v[j8+7] = u[i8+7], v[i8+7] = u[j8 + 7];
- }
- }
- // step 5
- for (k=0; k < n2; ++k) {
- w[k] = v[k*2+1];
- }
- // step 6
- for (k=k2=k4=0; k < n8; ++k, k2 += 2, k4 += 4) {
- u[n-1-k2] = w[k4];
- u[n-2-k2] = w[k4+1];
- u[n3_4 - 1 - k2] = w[k4+2];
- u[n3_4 - 2 - k2] = w[k4+3];
- }
- // step 7
- for (k=k2=0; k < n8; ++k, k2 += 2) {
- v[n2 + k2 ] = ( u[n2 + k2] + u[n-2-k2] + C[k2+1]*(u[n2+k2]-u[n-2-k2]) + C[k2]*(u[n2+k2+1]+u[n-2-k2+1]))/2;
- v[n-2 - k2] = ( u[n2 + k2] + u[n-2-k2] - C[k2+1]*(u[n2+k2]-u[n-2-k2]) - C[k2]*(u[n2+k2+1]+u[n-2-k2+1]))/2;
- v[n2+1+ k2] = ( u[n2+1+k2] - u[n-1-k2] + C[k2+1]*(u[n2+1+k2]+u[n-1-k2]) - C[k2]*(u[n2+k2]-u[n-2-k2]))/2;
- v[n-1 - k2] = (-u[n2+1+k2] + u[n-1-k2] + C[k2+1]*(u[n2+1+k2]+u[n-1-k2]) - C[k2]*(u[n2+k2]-u[n-2-k2]))/2;
- }
- // step 8
- for (k=k2=0; k < n4; ++k,k2 += 2) {
- X[k] = v[k2+n2]*B[k2 ] + v[k2+1+n2]*B[k2+1];
- X[n2-1-k] = v[k2+n2]*B[k2+1] - v[k2+1+n2]*B[k2 ];
- }
-
- // decode kernel to output
- // determined the following value experimentally
- // (by first figuring out what made inverse_mdct_slow work); then matching that here
- // (probably vorbis encoder premultiplies by n or n/2, to save it on the decoder?)
- s = 0.5; // theoretically would be n4
-
- // [[[ note! the s value of 0.5 is compensated for by the B[] in the current code,
- // so it needs to use the "old" B values to behave correctly, or else
- // set s to 1.0 ]]]
- for (i=0; i < n4 ; ++i) buffer[i] = s * X[i+n4];
- for ( ; i < n3_4; ++i) buffer[i] = -s * X[n3_4 - i - 1];
- for ( ; i < n ; ++i) buffer[i] = -s * X[i - n3_4];
-}
-#endif
-
-static float *get_window(vorb *f, int len)
-{
- len <<= 1;
- if (len == f->blocksize_0) return f->window[0];
- if (len == f->blocksize_1) return f->window[1];
- return NULL;
-}
-
-#ifndef STB_VORBIS_NO_DEFER_FLOOR
-typedef int16 YTYPE;
-#else
-typedef int YTYPE;
-#endif
-static int do_floor(vorb *f, Mapping *map, int i, int n, float *target, YTYPE *finalY, uint8 *step2_flag)
-{
- int n2 = n >> 1;
- int s = map->chan[i].mux, floor;
- floor = map->submap_floor[s];
- if (f->floor_types[floor] == 0) {
- return error(f, VORBIS_invalid_stream);
- } else {
- Floor1 *g = &f->floor_config[floor].floor1;
- int j,q;
- int lx = 0, ly = finalY[0] * g->floor1_multiplier;
- for (q=1; q < g->values; ++q) {
- j = g->sorted_order[q];
- #ifndef STB_VORBIS_NO_DEFER_FLOOR
- if (finalY[j] >= 0)
- #else
- if (step2_flag[j])
- #endif
- {
- int hy = finalY[j] * g->floor1_multiplier;
- int hx = g->Xlist[j];
- if (lx != hx)
- draw_line(target, lx,ly, hx,hy, n2);
- CHECK(f);
- lx = hx, ly = hy;
- }
- }
- if (lx < n2) {
- // optimization of: draw_line(target, lx,ly, n,ly, n2);
- for (j=lx; j < n2; ++j)
- LINE_OP(target[j], inverse_db_table[ly]);
- CHECK(f);
- }
- }
- return TRUE;
-}
-
-// The meaning of "left" and "right"
-//
-// For a given frame:
-// we compute samples from 0..n
-// window_center is n/2
-// we'll window and mix the samples from left_start to left_end with data from the previous frame
-// all of the samples from left_end to right_start can be output without mixing; however,
-// this interval is 0-length except when transitioning between short and long frames
-// all of the samples from right_start to right_end need to be mixed with the next frame,
-// which we don't have, so those get saved in a buffer
-// frame N's right_end-right_start, the number of samples to mix with the next frame,
-// has to be the same as frame N+1's left_end-left_start (which they are by
-// construction)
-
-static int vorbis_decode_initial(vorb *f, int *p_left_start, int *p_left_end, int *p_right_start, int *p_right_end, int *mode)
-{
- Mode *m;
- int i, n, prev, next, window_center;
- f->channel_buffer_start = f->channel_buffer_end = 0;
-
- retry:
- if (f->eof) return FALSE;
- if (!maybe_start_packet(f))
- return FALSE;
- // check packet type
- if (get_bits(f,1) != 0) {
- if (IS_PUSH_MODE(f))
- return error(f,VORBIS_bad_packet_type);
- while (EOP != get8_packet(f));
- goto retry;
- }
-
- if (f->alloc.alloc_buffer)
- assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset);
-
- i = get_bits(f, ilog(f->mode_count-1));
- if (i == EOP) return FALSE;
- if (i >= f->mode_count) return FALSE;
- *mode = i;
- m = f->mode_config + i;
- if (m->blockflag) {
- n = f->blocksize_1;
- prev = get_bits(f,1);
- next = get_bits(f,1);
- } else {
- prev = next = 0;
- n = f->blocksize_0;
- }
-
-// WINDOWING
-
- window_center = n >> 1;
- if (m->blockflag && !prev) {
- *p_left_start = (n - f->blocksize_0) >> 2;
- *p_left_end = (n + f->blocksize_0) >> 2;
- } else {
- *p_left_start = 0;
- *p_left_end = window_center;
- }
- if (m->blockflag && !next) {
- *p_right_start = (n*3 - f->blocksize_0) >> 2;
- *p_right_end = (n*3 + f->blocksize_0) >> 2;
- } else {
- *p_right_start = window_center;
- *p_right_end = n;
- }
-
- return TRUE;
-}
-
-static int vorbis_decode_packet_rest(vorb *f, int *len, Mode *m, int left_start, int left_end, int right_start, int right_end, int *p_left)
-{
- Mapping *map;
- int i,j,k,n,n2;
- int zero_channel[256];
- int really_zero_channel[256];
-
-// WINDOWING
-
- n = f->blocksize[m->blockflag];
- map = &f->mapping[m->mapping];
-
-// FLOORS
- n2 = n >> 1;
-
- CHECK(f);
-
- for (i=0; i < f->channels; ++i) {
- int s = map->chan[i].mux, floor;
- zero_channel[i] = FALSE;
- floor = map->submap_floor[s];
- if (f->floor_types[floor] == 0) {
- return error(f, VORBIS_invalid_stream);
- } else {
- Floor1 *g = &f->floor_config[floor].floor1;
- if (get_bits(f, 1)) {
- short *finalY;
- uint8 step2_flag[256];
- static int range_list[4] = { 256, 128, 86, 64 };
- int range = range_list[g->floor1_multiplier-1];
- int offset = 2;
- finalY = f->finalY[i];
- finalY[0] = get_bits(f, ilog(range)-1);
- finalY[1] = get_bits(f, ilog(range)-1);
- for (j=0; j < g->partitions; ++j) {
- int pclass = g->partition_class_list[j];
- int cdim = g->class_dimensions[pclass];
- int cbits = g->class_subclasses[pclass];
- int csub = (1 << cbits)-1;
- int cval = 0;
- if (cbits) {
- Codebook *c = f->codebooks + g->class_masterbooks[pclass];
- DECODE(cval,f,c);
- }
- for (k=0; k < cdim; ++k) {
- int book = g->subclass_books[pclass][cval & csub];
- cval = cval >> cbits;
- if (book >= 0) {
- int temp;
- Codebook *c = f->codebooks + book;
- DECODE(temp,f,c);
- finalY[offset++] = temp;
- } else
- finalY[offset++] = 0;
- }
- }
- if (f->valid_bits == INVALID_BITS) goto error; // behavior according to spec
- step2_flag[0] = step2_flag[1] = 1;
- for (j=2; j < g->values; ++j) {
- int low, high, pred, highroom, lowroom, room, val;
- low = g->neighbors[j][0];
- high = g->neighbors[j][1];
- //neighbors(g->Xlist, j, &low, &high);
- pred = predict_point(g->Xlist[j], g->Xlist[low], g->Xlist[high], finalY[low], finalY[high]);
- val = finalY[j];
- highroom = range - pred;
- lowroom = pred;
- if (highroom < lowroom)
- room = highroom * 2;
- else
- room = lowroom * 2;
- if (val) {
- step2_flag[low] = step2_flag[high] = 1;
- step2_flag[j] = 1;
- if (val >= room)
- if (highroom > lowroom)
- finalY[j] = val - lowroom + pred;
- else
- finalY[j] = pred - val + highroom - 1;
- else
- if (val & 1)
- finalY[j] = pred - ((val+1)>>1);
- else
- finalY[j] = pred + (val>>1);
- } else {
- step2_flag[j] = 0;
- finalY[j] = pred;
- }
- }
-
-#ifdef STB_VORBIS_NO_DEFER_FLOOR
- do_floor(f, map, i, n, f->floor_buffers[i], finalY, step2_flag);
-#else
- // defer final floor computation until _after_ residue
- for (j=0; j < g->values; ++j) {
- if (!step2_flag[j])
- finalY[j] = -1;
- }
-#endif
- } else {
- error:
- zero_channel[i] = TRUE;
- }
- // So we just defer everything else to later
-
- // at this point we've decoded the floor into buffer
- }
- }
- CHECK(f);
- // at this point we've decoded all floors
-
- if (f->alloc.alloc_buffer)
- assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset);
-
- // re-enable coupled channels if necessary
- memcpy(really_zero_channel, zero_channel, sizeof(really_zero_channel[0]) * f->channels);
- for (i=0; i < map->coupling_steps; ++i)
- if (!zero_channel[map->chan[i].magnitude] || !zero_channel[map->chan[i].angle]) {
- zero_channel[map->chan[i].magnitude] = zero_channel[map->chan[i].angle] = FALSE;
- }
-
- CHECK(f);
-// RESIDUE DECODE
- for (i=0; i < map->submaps; ++i) {
- float *residue_buffers[STB_VORBIS_MAX_CHANNELS];
- int r;
- uint8 do_not_decode[256];
- int ch = 0;
- for (j=0; j < f->channels; ++j) {
- if (map->chan[j].mux == i) {
- if (zero_channel[j]) {
- do_not_decode[ch] = TRUE;
- residue_buffers[ch] = NULL;
- } else {
- do_not_decode[ch] = FALSE;
- residue_buffers[ch] = f->channel_buffers[j];
- }
- ++ch;
- }
- }
- r = map->submap_residue[i];
- decode_residue(f, residue_buffers, ch, n2, r, do_not_decode);
- }
-
- if (f->alloc.alloc_buffer)
- assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset);
- CHECK(f);
-
-// INVERSE COUPLING
- for (i = map->coupling_steps-1; i >= 0; --i) {
- int n2 = n >> 1;
- float *m = f->channel_buffers[map->chan[i].magnitude];
- float *a = f->channel_buffers[map->chan[i].angle ];
- for (j=0; j < n2; ++j) {
- float a2,m2;
- if (m[j] > 0)
- if (a[j] > 0)
- m2 = m[j], a2 = m[j] - a[j];
- else
- a2 = m[j], m2 = m[j] + a[j];
- else
- if (a[j] > 0)
- m2 = m[j], a2 = m[j] + a[j];
- else
- a2 = m[j], m2 = m[j] - a[j];
- m[j] = m2;
- a[j] = a2;
- }
- }
- CHECK(f);
-
- // finish decoding the floors
-#ifndef STB_VORBIS_NO_DEFER_FLOOR
- for (i=0; i < f->channels; ++i) {
- if (really_zero_channel[i]) {
- memset(f->channel_buffers[i], 0, sizeof(*f->channel_buffers[i]) * n2);
- } else {
- do_floor(f, map, i, n, f->channel_buffers[i], f->finalY[i], NULL);
- }
- }
-#else
- for (i=0; i < f->channels; ++i) {
- if (really_zero_channel[i]) {
- memset(f->channel_buffers[i], 0, sizeof(*f->channel_buffers[i]) * n2);
- } else {
- for (j=0; j < n2; ++j)
- f->channel_buffers[i][j] *= f->floor_buffers[i][j];
- }
- }
-#endif
-
-// INVERSE MDCT
- CHECK(f);
- for (i=0; i < f->channels; ++i)
- inverse_mdct(f->channel_buffers[i], n, f, m->blockflag);
- CHECK(f);
-
- // this shouldn't be necessary, unless we exited on an error
- // and want to flush to get to the next packet
- flush_packet(f);
-
- if (f->first_decode) {
- // assume we start so first non-discarded sample is sample 0
- // this isn't to spec, but spec would require us to read ahead
- // and decode the size of all current frames--could be done,
- // but presumably it's not a commonly used feature
- f->current_loc = -n2; // start of first frame is positioned for discard
- // we might have to discard samples "from" the next frame too,
- // if we're lapping a large block then a small at the start?
- f->discard_samples_deferred = n - right_end;
- f->current_loc_valid = TRUE;
- f->first_decode = FALSE;
- } else if (f->discard_samples_deferred) {
- if (f->discard_samples_deferred >= right_start - left_start) {
- f->discard_samples_deferred -= (right_start - left_start);
- left_start = right_start;
- *p_left = left_start;
- } else {
- left_start += f->discard_samples_deferred;
- *p_left = left_start;
- f->discard_samples_deferred = 0;
- }
- } else if (f->previous_length == 0 && f->current_loc_valid) {
- // we're recovering from a seek... that means we're going to discard
- // the samples from this packet even though we know our position from
- // the last page header, so we need to update the position based on
- // the discarded samples here
- // but wait, the code below is going to add this in itself even
- // on a discard, so we don't need to do it here...
- }
-
- // check if we have ogg information about the sample # for this packet
- if (f->last_seg_which == f->end_seg_with_known_loc) {
- // if we have a valid current loc, and this is final:
- if (f->current_loc_valid && (f->page_flag & PAGEFLAG_last_page)) {
- uint32 current_end = f->known_loc_for_packet;
- // then let's infer the size of the (probably) short final frame
- if (current_end < f->current_loc + (right_end-left_start)) {
- if (current_end < f->current_loc) {
- // negative truncation, that's impossible!
- *len = 0;
- } else {
- *len = current_end - f->current_loc;
- }
- *len += left_start; // this doesn't seem right, but has no ill effect on my test files
- if (*len > right_end) *len = right_end; // this should never happen
- f->current_loc += *len;
- return TRUE;
- }
- }
- // otherwise, just set our sample loc
- // guess that the ogg granule pos refers to the _middle_ of the
- // last frame?
- // set f->current_loc to the position of left_start
- f->current_loc = f->known_loc_for_packet - (n2-left_start);
- f->current_loc_valid = TRUE;
- }
- if (f->current_loc_valid)
- f->current_loc += (right_start - left_start);
-
- if (f->alloc.alloc_buffer)
- assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset);
- *len = right_end; // ignore samples after the window goes to 0
- CHECK(f);
-
- return TRUE;
-}
-
-static int vorbis_decode_packet(vorb *f, int *len, int *p_left, int *p_right)
-{
- int mode, left_end, right_end;
- if (!vorbis_decode_initial(f, p_left, &left_end, p_right, &right_end, &mode)) return 0;
- return vorbis_decode_packet_rest(f, len, f->mode_config + mode, *p_left, left_end, *p_right, right_end, p_left);
-}
-
-static int vorbis_finish_frame(stb_vorbis *f, int len, int left, int right)
-{
- int prev,i,j;
- // we use right&left (the start of the right- and left-window sin()-regions)
- // to determine how much to return, rather than inferring from the rules
- // (same result, clearer code); 'left' indicates where our sin() window
- // starts, therefore where the previous window's right edge starts, and
- // therefore where to start mixing from the previous buffer. 'right'
- // indicates where our sin() ending-window starts, therefore that's where
- // we start saving, and where our returned-data ends.
-
- // mixin from previous window
- if (f->previous_length) {
- int i,j, n = f->previous_length;
- float *w = get_window(f, n);
- if (w == NULL) return 0;
- for (i=0; i < f->channels; ++i) {
- for (j=0; j < n; ++j)
- f->channel_buffers[i][left+j] =
- f->channel_buffers[i][left+j]*w[ j] +
- f->previous_window[i][ j]*w[n-1-j];
- }
- }
-
- prev = f->previous_length;
-
- // last half of this data becomes previous window
- f->previous_length = len - right;
-
- // @OPTIMIZE: could avoid this copy by double-buffering the
- // output (flipping previous_window with channel_buffers), but
- // then previous_window would have to be 2x as large, and
- // channel_buffers couldn't be temp mem (although they're NOT
- // currently temp mem, they could be (unless we want to level
- // performance by spreading out the computation))
- for (i=0; i < f->channels; ++i)
- for (j=0; right+j < len; ++j)
- f->previous_window[i][j] = f->channel_buffers[i][right+j];
-
- if (!prev)
- // there was no previous packet, so this data isn't valid...
- // this isn't entirely true, only the would-have-overlapped data
- // isn't valid, but this seems to be what the spec requires
- return 0;
-
- // truncate a short frame
- if (len < right) right = len;
-
- f->samples_output += right-left;
-
- return right - left;
-}
-
-static int vorbis_pump_first_frame(stb_vorbis *f)
-{
- int len, right, left, res;
- res = vorbis_decode_packet(f, &len, &left, &right);
- if (res)
- vorbis_finish_frame(f, len, left, right);
- return res;
-}
-
-#ifndef STB_VORBIS_NO_PUSHDATA_API
-static int is_whole_packet_present(stb_vorbis *f)
-{
- // make sure that we have the packet available before continuing...
- // this requires a full ogg parse, but we know we can fetch from f->stream
-
- // instead of coding this out explicitly, we could save the current read state,
- // read the next packet with get8() until end-of-packet, check f->eof, then
- // reset the state? but that would be slower, esp. since we'd have over 256 bytes
- // of state to restore (primarily the page segment table)
-
- int s = f->next_seg, first = TRUE;
- uint8 *p = f->stream;
-
- if (s != -1) { // if we're not starting the packet with a 'continue on next page' flag
- for (; s < f->segment_count; ++s) {
- p += f->segments[s];
- if (f->segments[s] < 255) // stop at first short segment
- break;
- }
- // either this continues, or it ends it...
- if (s == f->segment_count)
- s = -1; // set 'crosses page' flag
- if (p > f->stream_end) return error(f, VORBIS_need_more_data);
- first = FALSE;
- }
- for (; s == -1;) {
- uint8 *q;
- int n;
-
- // check that we have the page header ready
- if (p + 26 >= f->stream_end) return error(f, VORBIS_need_more_data);
- // validate the page
- if (memcmp(p, ogg_page_header, 4)) return error(f, VORBIS_invalid_stream);
- if (p[4] != 0) return error(f, VORBIS_invalid_stream);
- if (first) { // the first segment must NOT have 'continued_packet', later ones MUST
- if (f->previous_length)
- if ((p[5] & PAGEFLAG_continued_packet)) return error(f, VORBIS_invalid_stream);
- // if no previous length, we're resynching, so we can come in on a continued-packet,
- // which we'll just drop
- } else {
- if (!(p[5] & PAGEFLAG_continued_packet)) return error(f, VORBIS_invalid_stream);
- }
- n = p[26]; // segment counts
- q = p+27; // q points to segment table
- p = q + n; // advance past header
- // make sure we've read the segment table
- if (p > f->stream_end) return error(f, VORBIS_need_more_data);
- for (s=0; s < n; ++s) {
- p += q[s];
- if (q[s] < 255)
- break;
- }
- if (s == n)
- s = -1; // set 'crosses page' flag
- if (p > f->stream_end) return error(f, VORBIS_need_more_data);
- first = FALSE;
- }
- return TRUE;
-}
-#endif // !STB_VORBIS_NO_PUSHDATA_API
-
-static int start_decoder(vorb *f)
-{
- uint8 header[6], x,y;
- int len,i,j,k, max_submaps = 0;
- int longest_floorlist=0;
-
- // first page, first packet
- f->first_decode = TRUE;
-
- if (!start_page(f)) return FALSE;
- // validate page flag
- if (!(f->page_flag & PAGEFLAG_first_page)) return error(f, VORBIS_invalid_first_page);
- if (f->page_flag & PAGEFLAG_last_page) return error(f, VORBIS_invalid_first_page);
- if (f->page_flag & PAGEFLAG_continued_packet) return error(f, VORBIS_invalid_first_page);
- // check for expected packet length
- if (f->segment_count != 1) return error(f, VORBIS_invalid_first_page);
- if (f->segments[0] != 30) {
- // check for the Ogg skeleton fishead identifying header to refine our error
- if (f->segments[0] == 64 &&
- getn(f, header, 6) &&
- header[0] == 'f' &&
- header[1] == 'i' &&
- header[2] == 's' &&
- header[3] == 'h' &&
- header[4] == 'e' &&
- header[5] == 'a' &&
- get8(f) == 'd' &&
- get8(f) == '\0') return error(f, VORBIS_ogg_skeleton_not_supported);
- else
- return error(f, VORBIS_invalid_first_page);
- }
-
- // read packet
- // check packet header
- if (get8(f) != VORBIS_packet_id) return error(f, VORBIS_invalid_first_page);
- if (!getn(f, header, 6)) return error(f, VORBIS_unexpected_eof);
- if (!vorbis_validate(header)) return error(f, VORBIS_invalid_first_page);
- // vorbis_version
- if (get32(f) != 0) return error(f, VORBIS_invalid_first_page);
- f->channels = get8(f); if (!f->channels) return error(f, VORBIS_invalid_first_page);
- if (f->channels > STB_VORBIS_MAX_CHANNELS) return error(f, VORBIS_too_many_channels);
- f->sample_rate = get32(f); if (!f->sample_rate) return error(f, VORBIS_invalid_first_page);
- get32(f); // bitrate_maximum
- get32(f); // bitrate_nominal
- get32(f); // bitrate_minimum
- x = get8(f);
- {
- int log0,log1;
- log0 = x & 15;
- log1 = x >> 4;
- f->blocksize_0 = 1 << log0;
- f->blocksize_1 = 1 << log1;
- if (log0 < 6 || log0 > 13) return error(f, VORBIS_invalid_setup);
- if (log1 < 6 || log1 > 13) return error(f, VORBIS_invalid_setup);
- if (log0 > log1) return error(f, VORBIS_invalid_setup);
- }
-
- // framing_flag
- x = get8(f);
- if (!(x & 1)) return error(f, VORBIS_invalid_first_page);
-
- // second packet!
- if (!start_page(f)) return FALSE;
-
- if (!start_packet(f)) return FALSE;
-
- if (!next_segment(f)) return FALSE;
-
- if (get8_packet(f) != VORBIS_packet_comment) return error(f, VORBIS_invalid_setup);
- for (i=0; i < 6; ++i) header[i] = get8_packet(f);
- if (!vorbis_validate(header)) return error(f, VORBIS_invalid_setup);
- //file vendor
- len = get32_packet(f);
- f->vendor = (char*)setup_malloc(f, sizeof(char) * (len+1));
- if (f->vendor == NULL) return error(f, VORBIS_outofmem);
- for(i=0; i < len; ++i) {
- f->vendor[i] = get8_packet(f);
- }
- f->vendor[len] = (char)'\0';
- //user comments
- f->comment_list_length = get32_packet(f);
- f->comment_list = (char**)setup_malloc(f, sizeof(char*) * (f->comment_list_length));
- if (f->comment_list == NULL) return error(f, VORBIS_outofmem);
-
- for(i=0; i < f->comment_list_length; ++i) {
- len = get32_packet(f);
- f->comment_list[i] = (char*)setup_malloc(f, sizeof(char) * (len+1));
- if (f->comment_list[i] == NULL) return error(f, VORBIS_outofmem);
-
- for(j=0; j < len; ++j) {
- f->comment_list[i][j] = get8_packet(f);
- }
- f->comment_list[i][len] = (char)'\0';
- }
-
- // framing_flag
- x = get8_packet(f);
- if (!(x & 1)) return error(f, VORBIS_invalid_setup);
-
-
- skip(f, f->bytes_in_seg);
- f->bytes_in_seg = 0;
-
- do {
- len = next_segment(f);
- skip(f, len);
- f->bytes_in_seg = 0;
- } while (len);
-
- // third packet!
- if (!start_packet(f)) return FALSE;
-
- #ifndef STB_VORBIS_NO_PUSHDATA_API
- if (IS_PUSH_MODE(f)) {
- if (!is_whole_packet_present(f)) {
- // convert error in ogg header to write type
- if (f->error == VORBIS_invalid_stream)
- f->error = VORBIS_invalid_setup;
- return FALSE;
- }
- }
- #endif
-
- crc32_init(); // always init it, to avoid multithread race conditions
-
- if (get8_packet(f) != VORBIS_packet_setup) return error(f, VORBIS_invalid_setup);
- for (i=0; i < 6; ++i) header[i] = get8_packet(f);
- if (!vorbis_validate(header)) return error(f, VORBIS_invalid_setup);
-
- // codebooks
-
- f->codebook_count = get_bits(f,8) + 1;
- f->codebooks = (Codebook *) setup_malloc(f, sizeof(*f->codebooks) * f->codebook_count);
- if (f->codebooks == NULL) return error(f, VORBIS_outofmem);
- memset(f->codebooks, 0, sizeof(*f->codebooks) * f->codebook_count);
- for (i=0; i < f->codebook_count; ++i) {
- uint32 *values;
- int ordered, sorted_count;
- int total=0;
- uint8 *lengths;
- Codebook *c = f->codebooks+i;
- CHECK(f);
- x = get_bits(f, 8); if (x != 0x42) return error(f, VORBIS_invalid_setup);
- x = get_bits(f, 8); if (x != 0x43) return error(f, VORBIS_invalid_setup);
- x = get_bits(f, 8); if (x != 0x56) return error(f, VORBIS_invalid_setup);
- x = get_bits(f, 8);
- c->dimensions = (get_bits(f, 8)<<8) + x;
- x = get_bits(f, 8);
- y = get_bits(f, 8);
- c->entries = (get_bits(f, 8)<<16) + (y<<8) + x;
- ordered = get_bits(f,1);
- c->sparse = ordered ? 0 : get_bits(f,1);
-
- if (c->dimensions == 0 && c->entries != 0) return error(f, VORBIS_invalid_setup);
-
- if (c->sparse)
- lengths = (uint8 *) setup_temp_malloc(f, c->entries);
- else
- lengths = c->codeword_lengths = (uint8 *) setup_malloc(f, c->entries);
-
- if (!lengths) return error(f, VORBIS_outofmem);
-
- if (ordered) {
- int current_entry = 0;
- int current_length = get_bits(f,5) + 1;
- while (current_entry < c->entries) {
- int limit = c->entries - current_entry;
- int n = get_bits(f, ilog(limit));
- if (current_length >= 32) return error(f, VORBIS_invalid_setup);
- if (current_entry + n > (int) c->entries) { return error(f, VORBIS_invalid_setup); }
- memset(lengths + current_entry, current_length, n);
- current_entry += n;
- ++current_length;
- }
- } else {
- for (j=0; j < c->entries; ++j) {
- int present = c->sparse ? get_bits(f,1) : 1;
- if (present) {
- lengths[j] = get_bits(f, 5) + 1;
- ++total;
- if (lengths[j] == 32)
- return error(f, VORBIS_invalid_setup);
- } else {
- lengths[j] = NO_CODE;
- }
- }
- }
-
- if (c->sparse && total >= c->entries >> 2) {
- // convert sparse items to non-sparse!
- if (c->entries > (int) f->setup_temp_memory_required)
- f->setup_temp_memory_required = c->entries;
-
- c->codeword_lengths = (uint8 *) setup_malloc(f, c->entries);
- if (c->codeword_lengths == NULL) return error(f, VORBIS_outofmem);
- memcpy(c->codeword_lengths, lengths, c->entries);
- setup_temp_free(f, lengths, c->entries); // note this is only safe if there have been no intervening temp mallocs!
- lengths = c->codeword_lengths;
- c->sparse = 0;
- }
-
- // compute the size of the sorted tables
- if (c->sparse) {
- sorted_count = total;
- } else {
- sorted_count = 0;
- #ifndef STB_VORBIS_NO_HUFFMAN_BINARY_SEARCH
- for (j=0; j < c->entries; ++j)
- if (lengths[j] > STB_VORBIS_FAST_HUFFMAN_LENGTH && lengths[j] != NO_CODE)
- ++sorted_count;
- #endif
- }
-
- c->sorted_entries = sorted_count;
- values = NULL;
-
- CHECK(f);
- if (!c->sparse) {
- c->codewords = (uint32 *) setup_malloc(f, sizeof(c->codewords[0]) * c->entries);
- if (!c->codewords) return error(f, VORBIS_outofmem);
- } else {
- unsigned int size;
- if (c->sorted_entries) {
- c->codeword_lengths = (uint8 *) setup_malloc(f, c->sorted_entries);
- if (!c->codeword_lengths) return error(f, VORBIS_outofmem);
- c->codewords = (uint32 *) setup_temp_malloc(f, sizeof(*c->codewords) * c->sorted_entries);
- if (!c->codewords) return error(f, VORBIS_outofmem);
- values = (uint32 *) setup_temp_malloc(f, sizeof(*values) * c->sorted_entries);
- if (!values) return error(f, VORBIS_outofmem);
- }
- size = c->entries + (sizeof(*c->codewords) + sizeof(*values)) * c->sorted_entries;
- if (size > f->setup_temp_memory_required)
- f->setup_temp_memory_required = size;
- }
-
- if (!compute_codewords(c, lengths, c->entries, values)) {
- if (c->sparse) setup_temp_free(f, values, 0);
- return error(f, VORBIS_invalid_setup);
- }
-
- if (c->sorted_entries) {
- // allocate an extra slot for sentinels
- c->sorted_codewords = (uint32 *) setup_malloc(f, sizeof(*c->sorted_codewords) * (c->sorted_entries+1));
- if (c->sorted_codewords == NULL) return error(f, VORBIS_outofmem);
- // allocate an extra slot at the front so that c->sorted_values[-1] is defined
- // so that we can catch that case without an extra if
- c->sorted_values = ( int *) setup_malloc(f, sizeof(*c->sorted_values ) * (c->sorted_entries+1));
- if (c->sorted_values == NULL) return error(f, VORBIS_outofmem);
- ++c->sorted_values;
- c->sorted_values[-1] = -1;
- compute_sorted_huffman(c, lengths, values);
- }
-
- if (c->sparse) {
- setup_temp_free(f, values, sizeof(*values)*c->sorted_entries);
- setup_temp_free(f, c->codewords, sizeof(*c->codewords)*c->sorted_entries);
- setup_temp_free(f, lengths, c->entries);
- c->codewords = NULL;
- }
-
- compute_accelerated_huffman(c);
-
- CHECK(f);
- c->lookup_type = get_bits(f, 4);
- if (c->lookup_type > 2) return error(f, VORBIS_invalid_setup);
- if (c->lookup_type > 0) {
- uint16 *mults;
- c->minimum_value = float32_unpack(get_bits(f, 32));
- c->delta_value = float32_unpack(get_bits(f, 32));
- c->value_bits = get_bits(f, 4)+1;
- c->sequence_p = get_bits(f,1);
- if (c->lookup_type == 1) {
- int values = lookup1_values(c->entries, c->dimensions);
- if (values < 0) return error(f, VORBIS_invalid_setup);
- c->lookup_values = (uint32) values;
- } else {
- c->lookup_values = c->entries * c->dimensions;
- }
- if (c->lookup_values == 0) return error(f, VORBIS_invalid_setup);
- mults = (uint16 *) setup_temp_malloc(f, sizeof(mults[0]) * c->lookup_values);
- if (mults == NULL) return error(f, VORBIS_outofmem);
- for (j=0; j < (int) c->lookup_values; ++j) {
- int q = get_bits(f, c->value_bits);
- if (q == EOP) { setup_temp_free(f,mults,sizeof(mults[0])*c->lookup_values); return error(f, VORBIS_invalid_setup); }
- mults[j] = q;
- }
-
-#ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK
- if (c->lookup_type == 1) {
- int len, sparse = c->sparse;
- float last=0;
- // pre-expand the lookup1-style multiplicands, to avoid a divide in the inner loop
- if (sparse) {
- if (c->sorted_entries == 0) goto skip;
- c->multiplicands = (codetype *) setup_malloc(f, sizeof(c->multiplicands[0]) * c->sorted_entries * c->dimensions);
- } else
- c->multiplicands = (codetype *) setup_malloc(f, sizeof(c->multiplicands[0]) * c->entries * c->dimensions);
- if (c->multiplicands == NULL) { setup_temp_free(f,mults,sizeof(mults[0])*c->lookup_values); return error(f, VORBIS_outofmem); }
- len = sparse ? c->sorted_entries : c->entries;
- for (j=0; j < len; ++j) {
- unsigned int z = sparse ? c->sorted_values[j] : j;
- unsigned int div=1;
- for (k=0; k < c->dimensions; ++k) {
- int off = (z / div) % c->lookup_values;
- float val = mults[off];
- val = mults[off]*c->delta_value + c->minimum_value + last;
- c->multiplicands[j*c->dimensions + k] = val;
- if (c->sequence_p)
- last = val;
- if (k+1 < c->dimensions) {
- if (div > UINT_MAX / (unsigned int) c->lookup_values) {
- setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values);
- return error(f, VORBIS_invalid_setup);
- }
- div *= c->lookup_values;
- }
- }
- }
- c->lookup_type = 2;
- }
- else
-#endif
- {
- float last=0;
- CHECK(f);
- c->multiplicands = (codetype *) setup_malloc(f, sizeof(c->multiplicands[0]) * c->lookup_values);
- if (c->multiplicands == NULL) { setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values); return error(f, VORBIS_outofmem); }
- for (j=0; j < (int) c->lookup_values; ++j) {
- float val = mults[j] * c->delta_value + c->minimum_value + last;
- c->multiplicands[j] = val;
- if (c->sequence_p)
- last = val;
- }
- }
-#ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK
- skip:;
-#endif
- setup_temp_free(f, mults, sizeof(mults[0])*c->lookup_values);
-
- CHECK(f);
- }
- CHECK(f);
- }
-
- // time domain transfers (notused)
-
- x = get_bits(f, 6) + 1;
- for (i=0; i < x; ++i) {
- uint32 z = get_bits(f, 16);
- if (z != 0) return error(f, VORBIS_invalid_setup);
- }
-
- // Floors
- f->floor_count = get_bits(f, 6)+1;
- f->floor_config = (Floor *) setup_malloc(f, f->floor_count * sizeof(*f->floor_config));
- if (f->floor_config == NULL) return error(f, VORBIS_outofmem);
- for (i=0; i < f->floor_count; ++i) {
- f->floor_types[i] = get_bits(f, 16);
- if (f->floor_types[i] > 1) return error(f, VORBIS_invalid_setup);
- if (f->floor_types[i] == 0) {
- Floor0 *g = &f->floor_config[i].floor0;
- g->order = get_bits(f,8);
- g->rate = get_bits(f,16);
- g->bark_map_size = get_bits(f,16);
- g->amplitude_bits = get_bits(f,6);
- g->amplitude_offset = get_bits(f,8);
- g->number_of_books = get_bits(f,4) + 1;
- for (j=0; j < g->number_of_books; ++j)
- g->book_list[j] = get_bits(f,8);
- return error(f, VORBIS_feature_not_supported);
- } else {
- stbv__floor_ordering p[31*8+2];
- Floor1 *g = &f->floor_config[i].floor1;
- int max_class = -1;
- g->partitions = get_bits(f, 5);
- for (j=0; j < g->partitions; ++j) {
- g->partition_class_list[j] = get_bits(f, 4);
- if (g->partition_class_list[j] > max_class)
- max_class = g->partition_class_list[j];
- }
- for (j=0; j <= max_class; ++j) {
- g->class_dimensions[j] = get_bits(f, 3)+1;
- g->class_subclasses[j] = get_bits(f, 2);
- if (g->class_subclasses[j]) {
- g->class_masterbooks[j] = get_bits(f, 8);
- if (g->class_masterbooks[j] >= f->codebook_count) return error(f, VORBIS_invalid_setup);
- }
- for (k=0; k < 1 << g->class_subclasses[j]; ++k) {
- g->subclass_books[j][k] = get_bits(f,8)-1;
- if (g->subclass_books[j][k] >= f->codebook_count) return error(f, VORBIS_invalid_setup);
- }
- }
- g->floor1_multiplier = get_bits(f,2)+1;
- g->rangebits = get_bits(f,4);
- g->Xlist[0] = 0;
- g->Xlist[1] = 1 << g->rangebits;
- g->values = 2;
- for (j=0; j < g->partitions; ++j) {
- int c = g->partition_class_list[j];
- for (k=0; k < g->class_dimensions[c]; ++k) {
- g->Xlist[g->values] = get_bits(f, g->rangebits);
- ++g->values;
- }
- }
- // precompute the sorting
- for (j=0; j < g->values; ++j) {
- p[j].x = g->Xlist[j];
- p[j].id = j;
- }
- qsort(p, g->values, sizeof(p[0]), point_compare);
- for (j=0; j < g->values-1; ++j)
- if (p[j].x == p[j+1].x)
- return error(f, VORBIS_invalid_setup);
- for (j=0; j < g->values; ++j)
- g->sorted_order[j] = (uint8) p[j].id;
- // precompute the neighbors
- for (j=2; j < g->values; ++j) {
- int low = 0,hi = 0;
- neighbors(g->Xlist, j, &low,&hi);
- g->neighbors[j][0] = low;
- g->neighbors[j][1] = hi;
- }
-
- if (g->values > longest_floorlist)
- longest_floorlist = g->values;
- }
- }
-
- // Residue
- f->residue_count = get_bits(f, 6)+1;
- f->residue_config = (Residue *) setup_malloc(f, f->residue_count * sizeof(f->residue_config[0]));
- if (f->residue_config == NULL) return error(f, VORBIS_outofmem);
- memset(f->residue_config, 0, f->residue_count * sizeof(f->residue_config[0]));
- for (i=0; i < f->residue_count; ++i) {
- uint8 residue_cascade[64];
- Residue *r = f->residue_config+i;
- f->residue_types[i] = get_bits(f, 16);
- if (f->residue_types[i] > 2) return error(f, VORBIS_invalid_setup);
- r->begin = get_bits(f, 24);
- r->end = get_bits(f, 24);
- if (r->end < r->begin) return error(f, VORBIS_invalid_setup);
- r->part_size = get_bits(f,24)+1;
- r->classifications = get_bits(f,6)+1;
- r->classbook = get_bits(f,8);
- if (r->classbook >= f->codebook_count) return error(f, VORBIS_invalid_setup);
- for (j=0; j < r->classifications; ++j) {
- uint8 high_bits=0;
- uint8 low_bits=get_bits(f,3);
- if (get_bits(f,1))
- high_bits = get_bits(f,5);
- residue_cascade[j] = high_bits*8 + low_bits;
- }
- r->residue_books = (short (*)[8]) setup_malloc(f, sizeof(r->residue_books[0]) * r->classifications);
- if (r->residue_books == NULL) return error(f, VORBIS_outofmem);
- for (j=0; j < r->classifications; ++j) {
- for (k=0; k < 8; ++k) {
- if (residue_cascade[j] & (1 << k)) {
- r->residue_books[j][k] = get_bits(f, 8);
- if (r->residue_books[j][k] >= f->codebook_count) return error(f, VORBIS_invalid_setup);
- } else {
- r->residue_books[j][k] = -1;
- }
- }
- }
- // precompute the classifications[] array to avoid inner-loop mod/divide
- // call it 'classdata' since we already have r->classifications
- r->classdata = (uint8 **) setup_malloc(f, sizeof(*r->classdata) * f->codebooks[r->classbook].entries);
- if (!r->classdata) return error(f, VORBIS_outofmem);
- memset(r->classdata, 0, sizeof(*r->classdata) * f->codebooks[r->classbook].entries);
- for (j=0; j < f->codebooks[r->classbook].entries; ++j) {
- int classwords = f->codebooks[r->classbook].dimensions;
- int temp = j;
- r->classdata[j] = (uint8 *) setup_malloc(f, sizeof(r->classdata[j][0]) * classwords);
- if (r->classdata[j] == NULL) return error(f, VORBIS_outofmem);
- for (k=classwords-1; k >= 0; --k) {
- r->classdata[j][k] = temp % r->classifications;
- temp /= r->classifications;
- }
- }
- }
-
- f->mapping_count = get_bits(f,6)+1;
- f->mapping = (Mapping *) setup_malloc(f, f->mapping_count * sizeof(*f->mapping));
- if (f->mapping == NULL) return error(f, VORBIS_outofmem);
- memset(f->mapping, 0, f->mapping_count * sizeof(*f->mapping));
- for (i=0; i < f->mapping_count; ++i) {
- Mapping *m = f->mapping + i;
- int mapping_type = get_bits(f,16);
- if (mapping_type != 0) return error(f, VORBIS_invalid_setup);
- m->chan = (MappingChannel *) setup_malloc(f, f->channels * sizeof(*m->chan));
- if (m->chan == NULL) return error(f, VORBIS_outofmem);
- if (get_bits(f,1))
- m->submaps = get_bits(f,4)+1;
- else
- m->submaps = 1;
- if (m->submaps > max_submaps)
- max_submaps = m->submaps;
- if (get_bits(f,1)) {
- m->coupling_steps = get_bits(f,8)+1;
- if (m->coupling_steps > f->channels) return error(f, VORBIS_invalid_setup);
- for (k=0; k < m->coupling_steps; ++k) {
- m->chan[k].magnitude = get_bits(f, ilog(f->channels-1));
- m->chan[k].angle = get_bits(f, ilog(f->channels-1));
- if (m->chan[k].magnitude >= f->channels) return error(f, VORBIS_invalid_setup);
- if (m->chan[k].angle >= f->channels) return error(f, VORBIS_invalid_setup);
- if (m->chan[k].magnitude == m->chan[k].angle) return error(f, VORBIS_invalid_setup);
- }
- } else
- m->coupling_steps = 0;
-
- // reserved field
- if (get_bits(f,2)) return error(f, VORBIS_invalid_setup);
- if (m->submaps > 1) {
- for (j=0; j < f->channels; ++j) {
- m->chan[j].mux = get_bits(f, 4);
- if (m->chan[j].mux >= m->submaps) return error(f, VORBIS_invalid_setup);
- }
- } else
- // @SPECIFICATION: this case is missing from the spec
- for (j=0; j < f->channels; ++j)
- m->chan[j].mux = 0;
-
- for (j=0; j < m->submaps; ++j) {
- get_bits(f,8); // discard
- m->submap_floor[j] = get_bits(f,8);
- m->submap_residue[j] = get_bits(f,8);
- if (m->submap_floor[j] >= f->floor_count) return error(f, VORBIS_invalid_setup);
- if (m->submap_residue[j] >= f->residue_count) return error(f, VORBIS_invalid_setup);
- }
- }
-
- // Modes
- f->mode_count = get_bits(f, 6)+1;
- for (i=0; i < f->mode_count; ++i) {
- Mode *m = f->mode_config+i;
- m->blockflag = get_bits(f,1);
- m->windowtype = get_bits(f,16);
- m->transformtype = get_bits(f,16);
- m->mapping = get_bits(f,8);
- if (m->windowtype != 0) return error(f, VORBIS_invalid_setup);
- if (m->transformtype != 0) return error(f, VORBIS_invalid_setup);
- if (m->mapping >= f->mapping_count) return error(f, VORBIS_invalid_setup);
- }
-
- flush_packet(f);
-
- f->previous_length = 0;
-
- for (i=0; i < f->channels; ++i) {
- f->channel_buffers[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1);
- f->previous_window[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1/2);
- f->finalY[i] = (int16 *) setup_malloc(f, sizeof(int16) * longest_floorlist);
- if (f->channel_buffers[i] == NULL || f->previous_window[i] == NULL || f->finalY[i] == NULL) return error(f, VORBIS_outofmem);
- memset(f->channel_buffers[i], 0, sizeof(float) * f->blocksize_1);
- #ifdef STB_VORBIS_NO_DEFER_FLOOR
- f->floor_buffers[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1/2);
- if (f->floor_buffers[i] == NULL) return error(f, VORBIS_outofmem);
- #endif
- }
-
- if (!init_blocksize(f, 0, f->blocksize_0)) return FALSE;
- if (!init_blocksize(f, 1, f->blocksize_1)) return FALSE;
- f->blocksize[0] = f->blocksize_0;
- f->blocksize[1] = f->blocksize_1;
-
-#ifdef STB_VORBIS_DIVIDE_TABLE
- if (integer_divide_table[1][1]==0)
- for (i=0; i < DIVTAB_NUMER; ++i)
- for (j=1; j < DIVTAB_DENOM; ++j)
- integer_divide_table[i][j] = i / j;
-#endif
-
- // compute how much temporary memory is needed
-
- // 1.
- {
- uint32 imdct_mem = (f->blocksize_1 * sizeof(float) >> 1);
- uint32 classify_mem;
- int i,max_part_read=0;
- for (i=0; i < f->residue_count; ++i) {
- Residue *r = f->residue_config + i;
- unsigned int actual_size = f->blocksize_1 / 2;
- unsigned int limit_r_begin = r->begin < actual_size ? r->begin : actual_size;
- unsigned int limit_r_end = r->end < actual_size ? r->end : actual_size;
- int n_read = limit_r_end - limit_r_begin;
- int part_read = n_read / r->part_size;
- if (part_read > max_part_read)
- max_part_read = part_read;
- }
- #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE
- classify_mem = f->channels * (sizeof(void*) + max_part_read * sizeof(uint8 *));
- #else
- classify_mem = f->channels * (sizeof(void*) + max_part_read * sizeof(int *));
- #endif
-
- // maximum reasonable partition size is f->blocksize_1
-
- f->temp_memory_required = classify_mem;
- if (imdct_mem > f->temp_memory_required)
- f->temp_memory_required = imdct_mem;
- }
-
-
- if (f->alloc.alloc_buffer) {
- assert(f->temp_offset == f->alloc.alloc_buffer_length_in_bytes);
- // check if there's enough temp memory so we don't error later
- if (f->setup_offset + sizeof(*f) + f->temp_memory_required > (unsigned) f->temp_offset)
- return error(f, VORBIS_outofmem);
- }
-
- // @TODO: stb_vorbis_seek_start expects first_audio_page_offset to point to a page
- // without PAGEFLAG_continued_packet, so this either points to the first page, or
- // the page after the end of the headers. It might be cleaner to point to a page
- // in the middle of the headers, when that's the page where the first audio packet
- // starts, but we'd have to also correctly skip the end of any continued packet in
- // stb_vorbis_seek_start.
- if (f->next_seg == -1) {
- f->first_audio_page_offset = stb_vorbis_get_file_offset(f);
- } else {
- f->first_audio_page_offset = 0;
- }
-
- return TRUE;
-}
-
-static void vorbis_deinit(stb_vorbis *p)
-{
- int i,j;
-
- setup_free(p, p->vendor);
- for (i=0; i < p->comment_list_length; ++i) {
- setup_free(p, p->comment_list[i]);
- }
- setup_free(p, p->comment_list);
-
- if (p->residue_config) {
- for (i=0; i < p->residue_count; ++i) {
- Residue *r = p->residue_config+i;
- if (r->classdata) {
- for (j=0; j < p->codebooks[r->classbook].entries; ++j)
- setup_free(p, r->classdata[j]);
- setup_free(p, r->classdata);
- }
- setup_free(p, r->residue_books);
- }
- }
-
- if (p->codebooks) {
- CHECK(p);
- for (i=0; i < p->codebook_count; ++i) {
- Codebook *c = p->codebooks + i;
- setup_free(p, c->codeword_lengths);
- setup_free(p, c->multiplicands);
- setup_free(p, c->codewords);
- setup_free(p, c->sorted_codewords);
- // c->sorted_values[-1] is the first entry in the array
- setup_free(p, c->sorted_values ? c->sorted_values-1 : NULL);
- }
- setup_free(p, p->codebooks);
- }
- setup_free(p, p->floor_config);
- setup_free(p, p->residue_config);
- if (p->mapping) {
- for (i=0; i < p->mapping_count; ++i)
- setup_free(p, p->mapping[i].chan);
- setup_free(p, p->mapping);
- }
- CHECK(p);
- for (i=0; i < p->channels && i < STB_VORBIS_MAX_CHANNELS; ++i) {
- setup_free(p, p->channel_buffers[i]);
- setup_free(p, p->previous_window[i]);
- #ifdef STB_VORBIS_NO_DEFER_FLOOR
- setup_free(p, p->floor_buffers[i]);
- #endif
- setup_free(p, p->finalY[i]);
- }
- for (i=0; i < 2; ++i) {
- setup_free(p, p->A[i]);
- setup_free(p, p->B[i]);
- setup_free(p, p->C[i]);
- setup_free(p, p->window[i]);
- setup_free(p, p->bit_reverse[i]);
- }
- #ifndef STB_VORBIS_NO_STDIO
- if (p->close_on_free) fclose(p->f);
- #endif
-}
-
-void stb_vorbis_close(stb_vorbis *p)
-{
- if (p == NULL) return;
- vorbis_deinit(p);
- setup_free(p,p);
-}
-
-static void vorbis_init(stb_vorbis *p, const stb_vorbis_alloc *z)
-{
- memset(p, 0, sizeof(*p)); // NULL out all malloc'd pointers to start
- if (z) {
- p->alloc = *z;
- p->alloc.alloc_buffer_length_in_bytes &= ~7;
- p->temp_offset = p->alloc.alloc_buffer_length_in_bytes;
- }
- p->eof = 0;
- p->error = VORBIS__no_error;
- p->stream = NULL;
- p->codebooks = NULL;
- p->page_crc_tests = -1;
- #ifndef STB_VORBIS_NO_STDIO
- p->close_on_free = FALSE;
- p->f = NULL;
- #endif
-}
-
-int stb_vorbis_get_sample_offset(stb_vorbis *f)
-{
- if (f->current_loc_valid)
- return f->current_loc;
- else
- return -1;
-}
-
-stb_vorbis_info stb_vorbis_get_info(stb_vorbis *f)
-{
- stb_vorbis_info d;
- d.channels = f->channels;
- d.sample_rate = f->sample_rate;
- d.setup_memory_required = f->setup_memory_required;
- d.setup_temp_memory_required = f->setup_temp_memory_required;
- d.temp_memory_required = f->temp_memory_required;
- d.max_frame_size = f->blocksize_1 >> 1;
- return d;
-}
-
-stb_vorbis_comment stb_vorbis_get_comment(stb_vorbis *f)
-{
- stb_vorbis_comment d;
- d.vendor = f->vendor;
- d.comment_list_length = f->comment_list_length;
- d.comment_list = f->comment_list;
- return d;
-}
-
-int stb_vorbis_get_error(stb_vorbis *f)
-{
- int e = f->error;
- f->error = VORBIS__no_error;
- return e;
-}
-
-static stb_vorbis * vorbis_alloc(stb_vorbis *f)
-{
- stb_vorbis *p = (stb_vorbis *) setup_malloc(f, sizeof(*p));
- return p;
-}
-
-#ifndef STB_VORBIS_NO_PUSHDATA_API
-
-void stb_vorbis_flush_pushdata(stb_vorbis *f)
-{
- f->previous_length = 0;
- f->page_crc_tests = 0;
- f->discard_samples_deferred = 0;
- f->current_loc_valid = FALSE;
- f->first_decode = FALSE;
- f->samples_output = 0;
- f->channel_buffer_start = 0;
- f->channel_buffer_end = 0;
-}
-
-static int vorbis_search_for_page_pushdata(vorb *f, uint8 *data, int data_len)
-{
- int i,n;
- for (i=0; i < f->page_crc_tests; ++i)
- f->scan[i].bytes_done = 0;
-
- // if we have room for more scans, search for them first, because
- // they may cause us to stop early if their header is incomplete
- if (f->page_crc_tests < STB_VORBIS_PUSHDATA_CRC_COUNT) {
- if (data_len < 4) return 0;
- data_len -= 3; // need to look for 4-byte sequence, so don't miss
- // one that straddles a boundary
- for (i=0; i < data_len; ++i) {
- if (data[i] == 0x4f) {
- if (0==memcmp(data+i, ogg_page_header, 4)) {
- int j,len;
- uint32 crc;
- // make sure we have the whole page header
- if (i+26 >= data_len || i+27+data[i+26] >= data_len) {
- // only read up to this page start, so hopefully we'll
- // have the whole page header start next time
- data_len = i;
- break;
- }
- // ok, we have it all; compute the length of the page
- len = 27 + data[i+26];
- for (j=0; j < data[i+26]; ++j)
- len += data[i+27+j];
- // scan everything up to the embedded crc (which we must 0)
- crc = 0;
- for (j=0; j < 22; ++j)
- crc = crc32_update(crc, data[i+j]);
- // now process 4 0-bytes
- for ( ; j < 26; ++j)
- crc = crc32_update(crc, 0);
- // len is the total number of bytes we need to scan
- n = f->page_crc_tests++;
- f->scan[n].bytes_left = len-j;
- f->scan[n].crc_so_far = crc;
- f->scan[n].goal_crc = data[i+22] + (data[i+23] << 8) + (data[i+24]<<16) + (data[i+25]<<24);
- // if the last frame on a page is continued to the next, then
- // we can't recover the sample_loc immediately
- if (data[i+27+data[i+26]-1] == 255)
- f->scan[n].sample_loc = ~0;
- else
- f->scan[n].sample_loc = data[i+6] + (data[i+7] << 8) + (data[i+ 8]<<16) + (data[i+ 9]<<24);
- f->scan[n].bytes_done = i+j;
- if (f->page_crc_tests == STB_VORBIS_PUSHDATA_CRC_COUNT)
- break;
- // keep going if we still have room for more
- }
- }
- }
- }
-
- for (i=0; i < f->page_crc_tests;) {
- uint32 crc;
- int j;
- int n = f->scan[i].bytes_done;
- int m = f->scan[i].bytes_left;
- if (m > data_len - n) m = data_len - n;
- // m is the bytes to scan in the current chunk
- crc = f->scan[i].crc_so_far;
- for (j=0; j < m; ++j)
- crc = crc32_update(crc, data[n+j]);
- f->scan[i].bytes_left -= m;
- f->scan[i].crc_so_far = crc;
- if (f->scan[i].bytes_left == 0) {
- // does it match?
- if (f->scan[i].crc_so_far == f->scan[i].goal_crc) {
- // Houston, we have page
- data_len = n+m; // consumption amount is wherever that scan ended
- f->page_crc_tests = -1; // drop out of page scan mode
- f->previous_length = 0; // decode-but-don't-output one frame
- f->next_seg = -1; // start a new page
- f->current_loc = f->scan[i].sample_loc; // set the current sample location
- // to the amount we'd have decoded had we decoded this page
- f->current_loc_valid = f->current_loc != ~0U;
- return data_len;
- }
- // delete entry
- f->scan[i] = f->scan[--f->page_crc_tests];
- } else {
- ++i;
- }
- }
-
- return data_len;
-}
-
-// return value: number of bytes we used
-int stb_vorbis_decode_frame_pushdata(
- stb_vorbis *f, // the file we're decoding
- const uint8 *data, int data_len, // the memory available for decoding
- int *channels, // place to write number of float * buffers
- float ***output, // place to write float ** array of float * buffers
- int *samples // place to write number of output samples
- )
-{
- int i;
- int len,right,left;
-
- if (!IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing);
-
- if (f->page_crc_tests >= 0) {
- *samples = 0;
- return vorbis_search_for_page_pushdata(f, (uint8 *) data, data_len);
- }
-
- f->stream = (uint8 *) data;
- f->stream_end = (uint8 *) data + data_len;
- f->error = VORBIS__no_error;
-
- // check that we have the entire packet in memory
- if (!is_whole_packet_present(f)) {
- *samples = 0;
- return 0;
- }
-
- if (!vorbis_decode_packet(f, &len, &left, &right)) {
- // save the actual error we encountered
- enum STBVorbisError error = f->error;
- if (error == VORBIS_bad_packet_type) {
- // flush and resynch
- f->error = VORBIS__no_error;
- while (get8_packet(f) != EOP)
- if (f->eof) break;
- *samples = 0;
- return (int) (f->stream - data);
- }
- if (error == VORBIS_continued_packet_flag_invalid) {
- if (f->previous_length == 0) {
- // we may be resynching, in which case it's ok to hit one
- // of these; just discard the packet
- f->error = VORBIS__no_error;
- while (get8_packet(f) != EOP)
- if (f->eof) break;
- *samples = 0;
- return (int) (f->stream - data);
- }
- }
- // if we get an error while parsing, what to do?
- // well, it DEFINITELY won't work to continue from where we are!
- stb_vorbis_flush_pushdata(f);
- // restore the error that actually made us bail
- f->error = error;
- *samples = 0;
- return 1;
- }
-
- // success!
- len = vorbis_finish_frame(f, len, left, right);
- for (i=0; i < f->channels; ++i)
- f->outputs[i] = f->channel_buffers[i] + left;
-
- if (channels) *channels = f->channels;
- *samples = len;
- *output = f->outputs;
- return (int) (f->stream - data);
-}
-
-stb_vorbis *stb_vorbis_open_pushdata(
- const unsigned char *data, int data_len, // the memory available for decoding
- int *data_used, // only defined if result is not NULL
- int *error, const stb_vorbis_alloc *alloc)
-{
- stb_vorbis *f, p;
- vorbis_init(&p, alloc);
- p.stream = (uint8 *) data;
- p.stream_end = (uint8 *) data + data_len;
- p.push_mode = TRUE;
- if (!start_decoder(&p)) {
- if (p.eof)
- *error = VORBIS_need_more_data;
- else
- *error = p.error;
- return NULL;
- }
- f = vorbis_alloc(&p);
- if (f) {
- *f = p;
- *data_used = (int) (f->stream - data);
- *error = 0;
- return f;
- } else {
- vorbis_deinit(&p);
- return NULL;
- }
-}
-#endif // STB_VORBIS_NO_PUSHDATA_API
-
-unsigned int stb_vorbis_get_file_offset(stb_vorbis *f)
-{
- #ifndef STB_VORBIS_NO_PUSHDATA_API
- if (f->push_mode) return 0;
- #endif
- if (USE_MEMORY(f)) return (unsigned int) (f->stream - f->stream_start);
- #ifndef STB_VORBIS_NO_STDIO
- return (unsigned int) (ftell(f->f) - f->f_start);
- #endif
-}
-
-#ifndef STB_VORBIS_NO_PULLDATA_API
-//
-// DATA-PULLING API
-//
-
-static uint32 vorbis_find_page(stb_vorbis *f, uint32 *end, uint32 *last)
-{
- for(;;) {
- int n;
- if (f->eof) return 0;
- n = get8(f);
- if (n == 0x4f) { // page header candidate
- unsigned int retry_loc = stb_vorbis_get_file_offset(f);
- int i;
- // check if we're off the end of a file_section stream
- if (retry_loc - 25 > f->stream_len)
- return 0;
- // check the rest of the header
- for (i=1; i < 4; ++i)
- if (get8(f) != ogg_page_header[i])
- break;
- if (f->eof) return 0;
- if (i == 4) {
- uint8 header[27];
- uint32 i, crc, goal, len;
- for (i=0; i < 4; ++i)
- header[i] = ogg_page_header[i];
- for (; i < 27; ++i)
- header[i] = get8(f);
- if (f->eof) return 0;
- if (header[4] != 0) goto invalid;
- goal = header[22] + (header[23] << 8) + (header[24]<<16) + (header[25]<<24);
- for (i=22; i < 26; ++i)
- header[i] = 0;
- crc = 0;
- for (i=0; i < 27; ++i)
- crc = crc32_update(crc, header[i]);
- len = 0;
- for (i=0; i < header[26]; ++i) {
- int s = get8(f);
- crc = crc32_update(crc, s);
- len += s;
- }
- if (len && f->eof) return 0;
- for (i=0; i < len; ++i)
- crc = crc32_update(crc, get8(f));
- // finished parsing probable page
- if (crc == goal) {
- // we could now check that it's either got the last
- // page flag set, OR it's followed by the capture
- // pattern, but I guess TECHNICALLY you could have
- // a file with garbage between each ogg page and recover
- // from it automatically? So even though that paranoia
- // might decrease the chance of an invalid decode by
- // another 2^32, not worth it since it would hose those
- // invalid-but-useful files?
- if (end)
- *end = stb_vorbis_get_file_offset(f);
- if (last) {
- if (header[5] & 0x04)
- *last = 1;
- else
- *last = 0;
- }
- set_file_offset(f, retry_loc-1);
- return 1;
- }
- }
- invalid:
- // not a valid page, so rewind and look for next one
- set_file_offset(f, retry_loc);
- }
- }
-}
-
-
-#define SAMPLE_unknown 0xffffffff
-
-// seeking is implemented with a binary search, which narrows down the range to
-// 64K, before using a linear search (because finding the synchronization
-// pattern can be expensive, and the chance we'd find the end page again is
-// relatively high for small ranges)
-//
-// two initial interpolation-style probes are used at the start of the search
-// to try to bound either side of the binary search sensibly, while still
-// working in O(log n) time if they fail.
-
-static int get_seek_page_info(stb_vorbis *f, ProbedPage *z)
-{
- uint8 header[27], lacing[255];
- int i,len;
-
- // record where the page starts
- z->page_start = stb_vorbis_get_file_offset(f);
-
- // parse the header
- getn(f, header, 27);
- if (header[0] != 'O' || header[1] != 'g' || header[2] != 'g' || header[3] != 'S')
- return 0;
- getn(f, lacing, header[26]);
-
- // determine the length of the payload
- len = 0;
- for (i=0; i < header[26]; ++i)
- len += lacing[i];
-
- // this implies where the page ends
- z->page_end = z->page_start + 27 + header[26] + len;
-
- // read the last-decoded sample out of the data
- z->last_decoded_sample = header[6] + (header[7] << 8) + (header[8] << 16) + (header[9] << 24);
-
- // restore file state to where we were
- set_file_offset(f, z->page_start);
- return 1;
-}
-
-// rarely used function to seek back to the preceding page while finding the
-// start of a packet
-static int go_to_page_before(stb_vorbis *f, unsigned int limit_offset)
-{
- unsigned int previous_safe, end;
-
- // now we want to seek back 64K from the limit
- if (limit_offset >= 65536 && limit_offset-65536 >= f->first_audio_page_offset)
- previous_safe = limit_offset - 65536;
- else
- previous_safe = f->first_audio_page_offset;
-
- set_file_offset(f, previous_safe);
-
- while (vorbis_find_page(f, &end, NULL)) {
- if (end >= limit_offset && stb_vorbis_get_file_offset(f) < limit_offset)
- return 1;
- set_file_offset(f, end);
- }
-
- return 0;
-}
-
-// implements the search logic for finding a page and starting decoding. if
-// the function succeeds, current_loc_valid will be true and current_loc will
-// be less than or equal to the provided sample number (the closer the
-// better).
-static int seek_to_sample_coarse(stb_vorbis *f, uint32 sample_number)
-{
- ProbedPage left, right, mid;
- int i, start_seg_with_known_loc, end_pos, page_start;
- uint32 delta, stream_length, padding, last_sample_limit;
- double offset = 0.0, bytes_per_sample = 0.0;
- int probe = 0;
-
- // find the last page and validate the target sample
- stream_length = stb_vorbis_stream_length_in_samples(f);
- if (stream_length == 0) return error(f, VORBIS_seek_without_length);
- if (sample_number > stream_length) return error(f, VORBIS_seek_invalid);
-
- // this is the maximum difference between the window-center (which is the
- // actual granule position value), and the right-start (which the spec
- // indicates should be the granule position (give or take one)).
- padding = ((f->blocksize_1 - f->blocksize_0) >> 2);
- if (sample_number < padding)
- last_sample_limit = 0;
- else
- last_sample_limit = sample_number - padding;
-
- left = f->p_first;
- while (left.last_decoded_sample == ~0U) {
- // (untested) the first page does not have a 'last_decoded_sample'
- set_file_offset(f, left.page_end);
- if (!get_seek_page_info(f, &left)) goto error;
- }
-
- right = f->p_last;
- assert(right.last_decoded_sample != ~0U);
-
- // starting from the start is handled differently
- if (last_sample_limit <= left.last_decoded_sample) {
- if (stb_vorbis_seek_start(f)) {
- if (f->current_loc > sample_number)
- return error(f, VORBIS_seek_failed);
- return 1;
- }
- return 0;
- }
-
- while (left.page_end != right.page_start) {
- assert(left.page_end < right.page_start);
- // search range in bytes
- delta = right.page_start - left.page_end;
- if (delta <= 65536) {
- // there's only 64K left to search - handle it linearly
- set_file_offset(f, left.page_end);
- } else {
- if (probe < 2) {
- if (probe == 0) {
- // first probe (interpolate)
- double data_bytes = right.page_end - left.page_start;
- bytes_per_sample = data_bytes / right.last_decoded_sample;
- offset = left.page_start + bytes_per_sample * (last_sample_limit - left.last_decoded_sample);
- } else {
- // second probe (try to bound the other side)
- double error = ((double) last_sample_limit - mid.last_decoded_sample) * bytes_per_sample;
- if (error >= 0 && error < 8000) error = 8000;
- if (error < 0 && error > -8000) error = -8000;
- offset += error * 2;
- }
-
- // ensure the offset is valid
- if (offset < left.page_end)
- offset = left.page_end;
- if (offset > right.page_start - 65536)
- offset = right.page_start - 65536;
-
- set_file_offset(f, (unsigned int) offset);
- } else {
- // binary search for large ranges (offset by 32K to ensure
- // we don't hit the right page)
- set_file_offset(f, left.page_end + (delta / 2) - 32768);
- }
-
- if (!vorbis_find_page(f, NULL, NULL)) goto error;
- }
-
- for (;;) {
- if (!get_seek_page_info(f, &mid)) goto error;
- if (mid.last_decoded_sample != ~0U) break;
- // (untested) no frames end on this page
- set_file_offset(f, mid.page_end);
- assert(mid.page_start < right.page_start);
- }
-
- // if we've just found the last page again then we're in a tricky file,
- // and we're close enough (if it wasn't an interpolation probe).
- if (mid.page_start == right.page_start) {
- if (probe >= 2 || delta <= 65536)
- break;
- } else {
- if (last_sample_limit < mid.last_decoded_sample)
- right = mid;
- else
- left = mid;
- }
-
- ++probe;
- }
-
- // seek back to start of the last packet
- page_start = left.page_start;
- set_file_offset(f, page_start);
- if (!start_page(f)) return error(f, VORBIS_seek_failed);
- end_pos = f->end_seg_with_known_loc;
- assert(end_pos >= 0);
-
- for (;;) {
- for (i = end_pos; i > 0; --i)
- if (f->segments[i-1] != 255)
- break;
-
- start_seg_with_known_loc = i;
-
- if (start_seg_with_known_loc > 0 || !(f->page_flag & PAGEFLAG_continued_packet))
- break;
-
- // (untested) the final packet begins on an earlier page
- if (!go_to_page_before(f, page_start))
- goto error;
-
- page_start = stb_vorbis_get_file_offset(f);
- if (!start_page(f)) goto error;
- end_pos = f->segment_count - 1;
- }
-
- // prepare to start decoding
- f->current_loc_valid = FALSE;
- f->last_seg = FALSE;
- f->valid_bits = 0;
- f->packet_bytes = 0;
- f->bytes_in_seg = 0;
- f->previous_length = 0;
- f->next_seg = start_seg_with_known_loc;
-
- for (i = 0; i < start_seg_with_known_loc; i++)
- skip(f, f->segments[i]);
-
- // start decoding (optimizable - this frame is generally discarded)
- if (!vorbis_pump_first_frame(f))
- return 0;
- if (f->current_loc > sample_number)
- return error(f, VORBIS_seek_failed);
- return 1;
-
-error:
- // try to restore the file to a valid state
- stb_vorbis_seek_start(f);
- return error(f, VORBIS_seek_failed);
-}
-
-// the same as vorbis_decode_initial, but without advancing
-static int peek_decode_initial(vorb *f, int *p_left_start, int *p_left_end, int *p_right_start, int *p_right_end, int *mode)
-{
- int bits_read, bytes_read;
-
- if (!vorbis_decode_initial(f, p_left_start, p_left_end, p_right_start, p_right_end, mode))
- return 0;
-
- // either 1 or 2 bytes were read, figure out which so we can rewind
- bits_read = 1 + ilog(f->mode_count-1);
- if (f->mode_config[*mode].blockflag)
- bits_read += 2;
- bytes_read = (bits_read + 7) / 8;
-
- f->bytes_in_seg += bytes_read;
- f->packet_bytes -= bytes_read;
- skip(f, -bytes_read);
- if (f->next_seg == -1)
- f->next_seg = f->segment_count - 1;
- else
- f->next_seg--;
- f->valid_bits = 0;
-
- return 1;
-}
-
-int stb_vorbis_seek_frame(stb_vorbis *f, unsigned int sample_number)
-{
- uint32 max_frame_samples;
-
- if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing);
-
- // fast page-level search
- if (!seek_to_sample_coarse(f, sample_number))
- return 0;
-
- assert(f->current_loc_valid);
- assert(f->current_loc <= sample_number);
-
- // linear search for the relevant packet
- max_frame_samples = (f->blocksize_1*3 - f->blocksize_0) >> 2;
- while (f->current_loc < sample_number) {
- int left_start, left_end, right_start, right_end, mode, frame_samples;
- if (!peek_decode_initial(f, &left_start, &left_end, &right_start, &right_end, &mode))
- return error(f, VORBIS_seek_failed);
- // calculate the number of samples returned by the next frame
- frame_samples = right_start - left_start;
- if (f->current_loc + frame_samples > sample_number) {
- return 1; // the next frame will contain the sample
- } else if (f->current_loc + frame_samples + max_frame_samples > sample_number) {
- // there's a chance the frame after this could contain the sample
- vorbis_pump_first_frame(f);
- } else {
- // this frame is too early to be relevant
- f->current_loc += frame_samples;
- f->previous_length = 0;
- maybe_start_packet(f);
- flush_packet(f);
- }
- }
- // the next frame should start with the sample
- if (f->current_loc != sample_number) return error(f, VORBIS_seek_failed);
- return 1;
-}
-
-int stb_vorbis_seek(stb_vorbis *f, unsigned int sample_number)
-{
- if (!stb_vorbis_seek_frame(f, sample_number))
- return 0;
-
- if (sample_number != f->current_loc) {
- int n;
- uint32 frame_start = f->current_loc;
- stb_vorbis_get_frame_float(f, &n, NULL);
- assert(sample_number > frame_start);
- assert(f->channel_buffer_start + (int) (sample_number-frame_start) <= f->channel_buffer_end);
- f->channel_buffer_start += (sample_number - frame_start);
- }
-
- return 1;
-}
-
-int stb_vorbis_seek_start(stb_vorbis *f)
-{
- if (IS_PUSH_MODE(f)) { return error(f, VORBIS_invalid_api_mixing); }
- set_file_offset(f, f->first_audio_page_offset);
- f->previous_length = 0;
- f->first_decode = TRUE;
- f->next_seg = -1;
- return vorbis_pump_first_frame(f);
-}
-
-unsigned int stb_vorbis_stream_length_in_samples(stb_vorbis *f)
-{
- unsigned int restore_offset, previous_safe;
- unsigned int end, last_page_loc;
-
- if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing);
- if (!f->total_samples) {
- unsigned int last;
- uint32 lo,hi;
- char header[6];
-
- // first, store the current decode position so we can restore it
- restore_offset = stb_vorbis_get_file_offset(f);
-
- // now we want to seek back 64K from the end (the last page must
- // be at most a little less than 64K, but let's allow a little slop)
- if (f->stream_len >= 65536 && f->stream_len-65536 >= f->first_audio_page_offset)
- previous_safe = f->stream_len - 65536;
- else
- previous_safe = f->first_audio_page_offset;
-
- set_file_offset(f, previous_safe);
- // previous_safe is now our candidate 'earliest known place that seeking
- // to will lead to the final page'
-
- if (!vorbis_find_page(f, &end, &last)) {
- // if we can't find a page, we're hosed!
- f->error = VORBIS_cant_find_last_page;
- f->total_samples = 0xffffffff;
- goto done;
- }
-
- // check if there are more pages
- last_page_loc = stb_vorbis_get_file_offset(f);
-
- // stop when the last_page flag is set, not when we reach eof;
- // this allows us to stop short of a 'file_section' end without
- // explicitly checking the length of the section
- while (!last) {
- set_file_offset(f, end);
- if (!vorbis_find_page(f, &end, &last)) {
- // the last page we found didn't have the 'last page' flag
- // set. whoops!
- break;
- }
- previous_safe = last_page_loc+1;
- last_page_loc = stb_vorbis_get_file_offset(f);
- }
-
- set_file_offset(f, last_page_loc);
-
- // parse the header
- getn(f, (unsigned char *)header, 6);
- // extract the absolute granule position
- lo = get32(f);
- hi = get32(f);
- if (lo == 0xffffffff && hi == 0xffffffff) {
- f->error = VORBIS_cant_find_last_page;
- f->total_samples = SAMPLE_unknown;
- goto done;
- }
- if (hi)
- lo = 0xfffffffe; // saturate
- f->total_samples = lo;
-
- f->p_last.page_start = last_page_loc;
- f->p_last.page_end = end;
- f->p_last.last_decoded_sample = lo;
-
- done:
- set_file_offset(f, restore_offset);
- }
- return f->total_samples == SAMPLE_unknown ? 0 : f->total_samples;
-}
-
-float stb_vorbis_stream_length_in_seconds(stb_vorbis *f)
-{
- return stb_vorbis_stream_length_in_samples(f) / (float) f->sample_rate;
-}
-
-
-
-int stb_vorbis_get_frame_float(stb_vorbis *f, int *channels, float ***output)
-{
- int len, right,left,i;
- if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing);
-
- if (!vorbis_decode_packet(f, &len, &left, &right)) {
- f->channel_buffer_start = f->channel_buffer_end = 0;
- return 0;
- }
-
- len = vorbis_finish_frame(f, len, left, right);
- for (i=0; i < f->channels; ++i)
- f->outputs[i] = f->channel_buffers[i] + left;
-
- f->channel_buffer_start = left;
- f->channel_buffer_end = left+len;
-
- if (channels) *channels = f->channels;
- if (output) *output = f->outputs;
- return len;
-}
-
-#ifndef STB_VORBIS_NO_STDIO
-
-stb_vorbis * stb_vorbis_open_file_section(FILE *file, int close_on_free, int *error, const stb_vorbis_alloc *alloc, unsigned int length)
-{
- stb_vorbis *f, p;
- vorbis_init(&p, alloc);
- p.f = file;
- p.f_start = (uint32) ftell(file);
- p.stream_len = length;
- p.close_on_free = close_on_free;
- if (start_decoder(&p)) {
- f = vorbis_alloc(&p);
- if (f) {
- *f = p;
- vorbis_pump_first_frame(f);
- return f;
- }
- }
- if (error) *error = p.error;
- vorbis_deinit(&p);
- return NULL;
-}
-
-stb_vorbis * stb_vorbis_open_file(FILE *file, int close_on_free, int *error, const stb_vorbis_alloc *alloc)
-{
- unsigned int len, start;
- start = (unsigned int) ftell(file);
- fseek(file, 0, SEEK_END);
- len = (unsigned int) (ftell(file) - start);
- fseek(file, start, SEEK_SET);
- return stb_vorbis_open_file_section(file, close_on_free, error, alloc, len);
-}
-
-stb_vorbis * stb_vorbis_open_filename(const char *filename, int *error, const stb_vorbis_alloc *alloc)
-{
- FILE *f;
-#if defined(_WIN32) && defined(__STDC_WANT_SECURE_LIB__)
- if (0 != fopen_s(&f, filename, "rb"))
- f = NULL;
-#else
- f = fopen(filename, "rb");
-#endif
- if (f)
- return stb_vorbis_open_file(f, TRUE, error, alloc);
- if (error) *error = VORBIS_file_open_failure;
- return NULL;
-}
-#endif // STB_VORBIS_NO_STDIO
-
-stb_vorbis * stb_vorbis_open_memory(const unsigned char *data, int len, int *error, const stb_vorbis_alloc *alloc)
-{
- stb_vorbis *f, p;
- if (data == NULL) return NULL;
- vorbis_init(&p, alloc);
- p.stream = (uint8 *) data;
- p.stream_end = (uint8 *) data + len;
- p.stream_start = (uint8 *) p.stream;
- p.stream_len = len;
- p.push_mode = FALSE;
- if (start_decoder(&p)) {
- f = vorbis_alloc(&p);
- if (f) {
- *f = p;
- vorbis_pump_first_frame(f);
- if (error) *error = VORBIS__no_error;
- return f;
- }
- }
- if (error) *error = p.error;
- vorbis_deinit(&p);
- return NULL;
-}
-
-#ifndef STB_VORBIS_NO_INTEGER_CONVERSION
-#define PLAYBACK_MONO 1
-#define PLAYBACK_LEFT 2
-#define PLAYBACK_RIGHT 4
-
-#define L (PLAYBACK_LEFT | PLAYBACK_MONO)
-#define C (PLAYBACK_LEFT | PLAYBACK_RIGHT | PLAYBACK_MONO)
-#define R (PLAYBACK_RIGHT | PLAYBACK_MONO)
-
-static int8 channel_position[7][6] =
-{
- { 0 },
- { C },
- { L, R },
- { L, C, R },
- { L, R, L, R },
- { L, C, R, L, R },
- { L, C, R, L, R, C },
-};
-
-
-#ifndef STB_VORBIS_NO_FAST_SCALED_FLOAT
- typedef union {
- float f;
- int i;
- } float_conv;
- typedef char stb_vorbis_float_size_test[sizeof(float)==4 && sizeof(int) == 4];
- #define FASTDEF(x) float_conv x
- // add (1<<23) to convert to int, then divide by 2^SHIFT, then add 0.5/2^SHIFT to round
- #define MAGIC(SHIFT) (1.5f * (1 << (23-SHIFT)) + 0.5f/(1 << SHIFT))
- #define ADDEND(SHIFT) (((150-SHIFT) << 23) + (1 << 22))
- #define FAST_SCALED_FLOAT_TO_INT(temp,x,s) (temp.f = (x) + MAGIC(s), temp.i - ADDEND(s))
- #define check_endianness()
-#else
- #define FAST_SCALED_FLOAT_TO_INT(temp,x,s) ((int) ((x) * (1 << (s))))
- #define check_endianness()
- #define FASTDEF(x)
-#endif
-
-static void copy_samples(short *dest, float *src, int len)
-{
- int i;
- check_endianness();
- for (i=0; i < len; ++i) {
- FASTDEF(temp);
- int v = FAST_SCALED_FLOAT_TO_INT(temp, src[i],15);
- if ((unsigned int) (v + 32768) > 65535)
- v = v < 0 ? -32768 : 32767;
- dest[i] = v;
- }
-}
-
-static void compute_samples(int mask, short *output, int num_c, float **data, int d_offset, int len)
-{
- #define BUFFER_SIZE 32
- float buffer[BUFFER_SIZE];
- int i,j,o,n = BUFFER_SIZE;
- check_endianness();
- for (o = 0; o < len; o += BUFFER_SIZE) {
- memset(buffer, 0, sizeof(buffer));
- if (o + n > len) n = len - o;
- for (j=0; j < num_c; ++j) {
- if (channel_position[num_c][j] & mask) {
- for (i=0; i < n; ++i)
- buffer[i] += data[j][d_offset+o+i];
- }
- }
- for (i=0; i < n; ++i) {
- FASTDEF(temp);
- int v = FAST_SCALED_FLOAT_TO_INT(temp,buffer[i],15);
- if ((unsigned int) (v + 32768) > 65535)
- v = v < 0 ? -32768 : 32767;
- output[o+i] = v;
- }
- }
-}
-
-static void compute_stereo_samples(short *output, int num_c, float **data, int d_offset, int len)
-{
- #define BUFFER_SIZE 32
- float buffer[BUFFER_SIZE];
- int i,j,o,n = BUFFER_SIZE >> 1;
- // o is the offset in the source data
- check_endianness();
- for (o = 0; o < len; o += BUFFER_SIZE >> 1) {
- // o2 is the offset in the output data
- int o2 = o << 1;
- memset(buffer, 0, sizeof(buffer));
- if (o + n > len) n = len - o;
- for (j=0; j < num_c; ++j) {
- int m = channel_position[num_c][j] & (PLAYBACK_LEFT | PLAYBACK_RIGHT);
- if (m == (PLAYBACK_LEFT | PLAYBACK_RIGHT)) {
- for (i=0; i < n; ++i) {
- buffer[i*2+0] += data[j][d_offset+o+i];
- buffer[i*2+1] += data[j][d_offset+o+i];
- }
- } else if (m == PLAYBACK_LEFT) {
- for (i=0; i < n; ++i) {
- buffer[i*2+0] += data[j][d_offset+o+i];
- }
- } else if (m == PLAYBACK_RIGHT) {
- for (i=0; i < n; ++i) {
- buffer[i*2+1] += data[j][d_offset+o+i];
- }
- }
- }
- for (i=0; i < (n<<1); ++i) {
- FASTDEF(temp);
- int v = FAST_SCALED_FLOAT_TO_INT(temp,buffer[i],15);
- if ((unsigned int) (v + 32768) > 65535)
- v = v < 0 ? -32768 : 32767;
- output[o2+i] = v;
- }
- }
-}
-
-static void convert_samples_short(int buf_c, short **buffer, int b_offset, int data_c, float **data, int d_offset, int samples)
-{
- int i;
- if (buf_c != data_c && buf_c <= 2 && data_c <= 6) {
- static int channel_selector[3][2] = { {0}, {PLAYBACK_MONO}, {PLAYBACK_LEFT, PLAYBACK_RIGHT} };
- for (i=0; i < buf_c; ++i)
- compute_samples(channel_selector[buf_c][i], buffer[i]+b_offset, data_c, data, d_offset, samples);
- } else {
- int limit = buf_c < data_c ? buf_c : data_c;
- for (i=0; i < limit; ++i)
- copy_samples(buffer[i]+b_offset, data[i]+d_offset, samples);
- for ( ; i < buf_c; ++i)
- memset(buffer[i]+b_offset, 0, sizeof(short) * samples);
- }
-}
-
-int stb_vorbis_get_frame_short(stb_vorbis *f, int num_c, short **buffer, int num_samples)
-{
- float **output = NULL;
- int len = stb_vorbis_get_frame_float(f, NULL, &output);
- if (len > num_samples) len = num_samples;
- if (len)
- convert_samples_short(num_c, buffer, 0, f->channels, output, 0, len);
- return len;
-}
-
-static void convert_channels_short_interleaved(int buf_c, short *buffer, int data_c, float **data, int d_offset, int len)
-{
- int i;
- check_endianness();
- if (buf_c != data_c && buf_c <= 2 && data_c <= 6) {
- assert(buf_c == 2);
- for (i=0; i < buf_c; ++i)
- compute_stereo_samples(buffer, data_c, data, d_offset, len);
- } else {
- int limit = buf_c < data_c ? buf_c : data_c;
- int j;
- for (j=0; j < len; ++j) {
- for (i=0; i < limit; ++i) {
- FASTDEF(temp);
- float f = data[i][d_offset+j];
- int v = FAST_SCALED_FLOAT_TO_INT(temp, f,15);//data[i][d_offset+j],15);
- if ((unsigned int) (v + 32768) > 65535)
- v = v < 0 ? -32768 : 32767;
- *buffer++ = v;
- }
- for ( ; i < buf_c; ++i)
- *buffer++ = 0;
- }
- }
-}
-
-int stb_vorbis_get_frame_short_interleaved(stb_vorbis *f, int num_c, short *buffer, int num_shorts)
-{
- float **output;
- int len;
- if (num_c == 1) return stb_vorbis_get_frame_short(f,num_c,&buffer, num_shorts);
- len = stb_vorbis_get_frame_float(f, NULL, &output);
- if (len) {
- if (len*num_c > num_shorts) len = num_shorts / num_c;
- convert_channels_short_interleaved(num_c, buffer, f->channels, output, 0, len);
- }
- return len;
-}
-
-int stb_vorbis_get_samples_short_interleaved(stb_vorbis *f, int channels, short *buffer, int num_shorts)
-{
- float **outputs;
- int len = num_shorts / channels;
- int n=0;
- int z = f->channels;
- if (z > channels) z = channels;
- while (n < len) {
- int k = f->channel_buffer_end - f->channel_buffer_start;
- if (n+k >= len) k = len - n;
- if (k)
- convert_channels_short_interleaved(channels, buffer, f->channels, f->channel_buffers, f->channel_buffer_start, k);
- buffer += k*channels;
- n += k;
- f->channel_buffer_start += k;
- if (n == len) break;
- if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break;
- }
- return n;
-}
-
-int stb_vorbis_get_samples_short(stb_vorbis *f, int channels, short **buffer, int len)
-{
- float **outputs;
- int n=0;
- int z = f->channels;
- if (z > channels) z = channels;
- while (n < len) {
- int k = f->channel_buffer_end - f->channel_buffer_start;
- if (n+k >= len) k = len - n;
- if (k)
- convert_samples_short(channels, buffer, n, f->channels, f->channel_buffers, f->channel_buffer_start, k);
- n += k;
- f->channel_buffer_start += k;
- if (n == len) break;
- if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break;
- }
- return n;
-}
-
-#ifndef STB_VORBIS_NO_STDIO
-int stb_vorbis_decode_filename(const char *filename, int *channels, int *sample_rate, short **output)
-{
- int data_len, offset, total, limit, error;
- short *data;
- stb_vorbis *v = stb_vorbis_open_filename(filename, &error, NULL);
- if (v == NULL) return -1;
- limit = v->channels * 4096;
- *channels = v->channels;
- if (sample_rate)
- *sample_rate = v->sample_rate;
- offset = data_len = 0;
- total = limit;
- data = (short *) malloc(total * sizeof(*data));
- if (data == NULL) {
- stb_vorbis_close(v);
- return -2;
- }
- for (;;) {
- int n = stb_vorbis_get_frame_short_interleaved(v, v->channels, data+offset, total-offset);
- if (n == 0) break;
- data_len += n;
- offset += n * v->channels;
- if (offset + limit > total) {
- short *data2;
- total *= 2;
- data2 = (short *) realloc(data, total * sizeof(*data));
- if (data2 == NULL) {
- free(data);
- stb_vorbis_close(v);
- return -2;
- }
- data = data2;
- }
- }
- *output = data;
- stb_vorbis_close(v);
- return data_len;
-}
-#endif // NO_STDIO
-
-int stb_vorbis_decode_memory(const uint8 *mem, int len, int *channels, int *sample_rate, short **output)
-{
- int data_len, offset, total, limit, error;
- short *data;
- stb_vorbis *v = stb_vorbis_open_memory(mem, len, &error, NULL);
- if (v == NULL) return -1;
- limit = v->channels * 4096;
- *channels = v->channels;
- if (sample_rate)
- *sample_rate = v->sample_rate;
- offset = data_len = 0;
- total = limit;
- data = (short *) malloc(total * sizeof(*data));
- if (data == NULL) {
- stb_vorbis_close(v);
- return -2;
- }
- for (;;) {
- int n = stb_vorbis_get_frame_short_interleaved(v, v->channels, data+offset, total-offset);
- if (n == 0) break;
- data_len += n;
- offset += n * v->channels;
- if (offset + limit > total) {
- short *data2;
- total *= 2;
- data2 = (short *) realloc(data, total * sizeof(*data));
- if (data2 == NULL) {
- free(data);
- stb_vorbis_close(v);
- return -2;
- }
- data = data2;
- }
- }
- *output = data;
- stb_vorbis_close(v);
- return data_len;
-}
-#endif // STB_VORBIS_NO_INTEGER_CONVERSION
-
-int stb_vorbis_get_samples_float_interleaved(stb_vorbis *f, int channels, float *buffer, int num_floats)
-{
- float **outputs;
- int len = num_floats / channels;
- int n=0;
- int z = f->channels;
- if (z > channels) z = channels;
- while (n < len) {
- int i,j;
- int k = f->channel_buffer_end - f->channel_buffer_start;
- if (n+k >= len) k = len - n;
- for (j=0; j < k; ++j) {
- for (i=0; i < z; ++i)
- *buffer++ = f->channel_buffers[i][f->channel_buffer_start+j];
- for ( ; i < channels; ++i)
- *buffer++ = 0;
- }
- n += k;
- f->channel_buffer_start += k;
- if (n == len)
- break;
- if (!stb_vorbis_get_frame_float(f, NULL, &outputs))
- break;
- }
- return n;
-}
-
-int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, int num_samples)
-{
- float **outputs;
- int n=0;
- int z = f->channels;
- if (z > channels) z = channels;
- while (n < num_samples) {
- int i;
- int k = f->channel_buffer_end - f->channel_buffer_start;
- if (n+k >= num_samples) k = num_samples - n;
- if (k) {
- for (i=0; i < z; ++i)
- memcpy(buffer[i]+n, f->channel_buffers[i]+f->channel_buffer_start, sizeof(float)*k);
- for ( ; i < channels; ++i)
- memset(buffer[i]+n, 0, sizeof(float) * k);
- }
- n += k;
- f->channel_buffer_start += k;
- if (n == num_samples)
- break;
- if (!stb_vorbis_get_frame_float(f, NULL, &outputs))
- break;
- }
- return n;
-}
-#endif // STB_VORBIS_NO_PULLDATA_API
-
-/* Version history
- 1.17 - 2019-07-08 - fix CVE-2019-13217, -13218, -13219, -13220, -13221, -13222, -13223
- found with Mayhem by ForAllSecure
- 1.16 - 2019-03-04 - fix warnings
- 1.15 - 2019-02-07 - explicit failure if Ogg Skeleton data is found
- 1.14 - 2018-02-11 - delete bogus dealloca usage
- 1.13 - 2018-01-29 - fix truncation of last frame (hopefully)
- 1.12 - 2017-11-21 - limit residue begin/end to blocksize/2 to avoid large temp allocs in bad/corrupt files
- 1.11 - 2017-07-23 - fix MinGW compilation
- 1.10 - 2017-03-03 - more robust seeking; fix negative ilog(); clear error in open_memory
- 1.09 - 2016-04-04 - back out 'avoid discarding last frame' fix from previous version
- 1.08 - 2016-04-02 - fixed multiple warnings; fix setup memory leaks;
- avoid discarding last frame of audio data
- 1.07 - 2015-01-16 - fixed some warnings, fix mingw, const-correct API
- some more crash fixes when out of memory or with corrupt files
- 1.06 - 2015-08-31 - full, correct support for seeking API (Dougall Johnson)
- some crash fixes when out of memory or with corrupt files
- 1.05 - 2015-04-19 - don't define __forceinline if it's redundant
- 1.04 - 2014-08-27 - fix missing const-correct case in API
- 1.03 - 2014-08-07 - Warning fixes
- 1.02 - 2014-07-09 - Declare qsort compare function _cdecl on windows
- 1.01 - 2014-06-18 - fix stb_vorbis_get_samples_float
- 1.0 - 2014-05-26 - fix memory leaks; fix warnings; fix bugs in multichannel
- (API change) report sample rate for decode-full-file funcs
- 0.99996 - bracket #include <malloc.h> for macintosh compilation by Laurent Gomila
- 0.99995 - use union instead of pointer-cast for fast-float-to-int to avoid alias-optimization problem
- 0.99994 - change fast-float-to-int to work in single-precision FPU mode, remove endian-dependence
- 0.99993 - remove assert that fired on legal files with empty tables
- 0.99992 - rewind-to-start
- 0.99991 - bugfix to stb_vorbis_get_samples_short by Bernhard Wodo
- 0.9999 - (should have been 0.99990) fix no-CRT support, compiling as C++
- 0.9998 - add a full-decode function with a memory source
- 0.9997 - fix a bug in the read-from-FILE case in 0.9996 addition
- 0.9996 - query length of vorbis stream in samples/seconds
- 0.9995 - bugfix to another optimization that only happened in certain files
- 0.9994 - bugfix to one of the optimizations that caused significant (but inaudible?) errors
- 0.9993 - performance improvements; runs in 99% to 104% of time of reference implementation
- 0.9992 - performance improvement of IMDCT; now performs close to reference implementation
- 0.9991 - performance improvement of IMDCT
- 0.999 - (should have been 0.9990) performance improvement of IMDCT
- 0.998 - no-CRT support from Casey Muratori
- 0.997 - bugfixes for bugs found by Terje Mathisen
- 0.996 - bugfix: fast-huffman decode initialized incorrectly for sparse codebooks; fixing gives 10% speedup - found by Terje Mathisen
- 0.995 - bugfix: fix to 'effective' overrun detection - found by Terje Mathisen
- 0.994 - bugfix: garbage decode on final VQ symbol of a non-multiple - found by Terje Mathisen
- 0.993 - bugfix: pushdata API required 1 extra byte for empty page (failed to consume final page if empty) - found by Terje Mathisen
- 0.992 - fixes for MinGW warning
- 0.991 - turn fast-float-conversion on by default
- 0.990 - fix push-mode seek recovery if you seek into the headers
- 0.98b - fix to bad release of 0.98
- 0.98 - fix push-mode seek recovery; robustify float-to-int and support non-fast mode
- 0.97 - builds under c++ (typecasting, don't use 'class' keyword)
- 0.96 - somehow MY 0.95 was right, but the web one was wrong, so here's my 0.95 rereleased as 0.96, fixes a typo in the clamping code
- 0.95 - clamping code for 16-bit functions
- 0.94 - not publically released
- 0.93 - fixed all-zero-floor case (was decoding garbage)
- 0.92 - fixed a memory leak
- 0.91 - conditional compiles to omit parts of the API and the infrastructure to support them: STB_VORBIS_NO_PULLDATA_API, STB_VORBIS_NO_PUSHDATA_API, STB_VORBIS_NO_STDIO, STB_VORBIS_NO_INTEGER_CONVERSION
- 0.90 - first public release
-*/
-
-#endif // STB_VORBIS_HEADER_ONLY
-
-
-/*
-------------------------------------------------------------------------------
-This software is available under 2 licenses -- choose whichever you prefer.
-------------------------------------------------------------------------------
-ALTERNATIVE A - MIT License
-Copyright (c) 2017 Sean Barrett
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-------------------------------------------------------------------------------
-ALTERNATIVE B - Public Domain (www.unlicense.org)
-This is free and unencumbered software released into the public domain.
-Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
-software, either in source code form or as a compiled binary, for any purpose,
-commercial or non-commercial, and by any means.
-In jurisdictions that recognize copyright laws, the author or authors of this
-software dedicate any and all copyright interest in the software to the public
-domain. We make this dedication for the benefit of the public at large and to
-the detriment of our heirs and successors. We intend this dedication to be an
-overt act of relinquishment in perpetuity of all present and future rights to
-this software under copyright law.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-------------------------------------------------------------------------------
-*/
diff --git a/thirdparty/misc/stb_vorbis.h b/thirdparty/misc/stb_vorbis.h
deleted file mode 100644
index 357efcd5fc..0000000000
--- a/thirdparty/misc/stb_vorbis.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define STB_VORBIS_HEADER_ONLY
-#include "stb_vorbis.c"
diff --git a/thirdparty/msdfgen/CHANGELOG.md b/thirdparty/msdfgen/CHANGELOG.md
new file mode 100644
index 0000000000..4b9a752650
--- /dev/null
+++ b/thirdparty/msdfgen/CHANGELOG.md
@@ -0,0 +1,82 @@
+
+## Version 1.9 (2021-05-28)
+
+- Error correction of multi-channel distance fields has been completely reworked
+- Added new edge coloring strategy that optimizes colors based on distances between edges
+- Added some minor functions for the library API
+- Minor code refactor and optimizations
+
+## Version 1.8 (2020-10-17)
+
+- Integrated the Skia library into the project, which is used to preprocess the shape geometry and eliminate any self-intersections and other irregularities previously unsupported by the software
+ - The scanline pass and overlapping contour mode is made obsolete by this step and has been disabled by default. The preprocess step can be disabled by the new `-nopreprocess` switch and the former enabled by `-scanline` and `-overlap` respectively.
+ - The project can be built without the Skia library, forgoing the geometry preprocessing feature. This is controlled by the macro definition `MSDFGEN_USE_SKIA`
+- Significantly improved performance of the core algorithm by reusing results from previously computed pixels
+- Introduced an additional error correction routine which eliminates MSDF artifacts by analytically predicting results of bilinear interpolation
+- Added the possibility to load font glyphs by their index rather than a Unicode value (use the prefix `g` before the character code in `-font` argument)
+- Added `-distanceshift` argument that can be used to adjust the center of the distance range in the output distance field
+- Fixed several errors in the evaluation of curve distances
+- Fixed an issue with paths containing convergent corners (those whose inner angle is zero)
+- The algorithm for pseudo-distance computation slightly changed, fixing certain rare edge cases and improving consistency
+- Added the ability to supply own `FT_Face` handle to the msdfgen library
+- Minor refactor of the core algorithm
+
+### Version 1.7.1 (2020-03-09)
+
+- Fixed an edge case bug in scanline rasterization
+
+## Version 1.7 (2020-03-07)
+
+- Added `mtsdf` mode - a combination of `msdf` with `sdf` in the alpha channel
+- Distance fields can now be stored as uncompressed TIFF image files with floating point precision
+- Bitmap class refactor - template argument split into data type and number of channels, bitmap reference classes introduced
+- Added a secondary "ink trap" edge coloring heuristic, can be selected using `-coloringstrategy inktrap`
+- Added computation of estimated rendering error for a given SDF
+- Added computation of bounding box that includes sharp mitered corners
+- The API for bounds computation of the `Shape` class changed for clarity
+- Fixed several edge case bugs
+
+## Version 1.6 (2019-04-08)
+
+- Core algorithm rewritten to split up advanced edge selection logic into modular template arguments.
+- Pseudo-distance evaluation reworked to eliminate discontinuities at the midpoint between edges.
+- MSDF error correction reworked to also fix distances away from edges and consider diagonal pairs. Code simplified.
+- Added scanline rasterization support for `Shape`.
+- Added a scanline pass in the standalone version, which corrects the signs in the distance field according to the selected fill rule (`-fillrule`). Can be disabled using `-noscanline`.
+- Fixed autoframe scaling, which previously caused the output to have unnecessary empty border.
+- `-guessorder` switch no longer enabled by default, as the functionality is now provided by the scanline pass.
+- Updated FreeType and other libraries, changed to static linkage
+- Added 64-bit and static library builds to the Visual Studio solution
+
+## Version 1.5 (2017-07-23)
+
+- Fixed rounding error in cubic curve splitting.
+- SVG parser fixes and support for additional path commands.
+- Added CMake build script.
+
+## Version 1.4 (2017-02-09)
+
+- Reworked contour combining logic to support overlapping contours. Original algorithm preserved in functions with `_legacy` suffix, which are invoked by the new `-legacy` switch.
+- Fixed a severe bug in cubic curve distance computation, where a control point lies at the endpoint.
+- Standalone version now automatically detects if the input has the wrong orientation and adjusts the distance field accordingly. Can be disabled by `-keeporder` or `-reverseorder` switch.
+- SVG parser fixes and improvements.
+
+## Version 1.3 (2016-12-07)
+
+- Fixed `-reverseorder` switch.
+- Fixed glyph loading to use the proper method of acquiring outlines from FreeType.
+
+## Version 1.2 (2016-07-20)
+
+- Added option to specify that shape vertices are listed in reverse order (`-reverseorder`).
+- Added option to set a seed for the edge coloring heuristic (-seed \<n\>), which can be used to adjust the output.
+- Fixed parsing of glyph contours that start with a curve control point.
+
+## Version 1.1 (2016-05-08)
+
+- Switched to MIT license due to popular demand.
+- Fixed SDF rendering anti-aliasing when the output is smaller than the distance field.
+
+## Version 1.0 (2016-04-28)
+
+- Project published.
diff --git a/thirdparty/msdfgen/LICENSE.txt b/thirdparty/msdfgen/LICENSE.txt
new file mode 100644
index 0000000000..5fb05446bc
--- /dev/null
+++ b/thirdparty/msdfgen/LICENSE.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 Viktor Chlumsky
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/thirdparty/msdfgen/core/Bitmap.h b/thirdparty/msdfgen/core/Bitmap.h
new file mode 100644
index 0000000000..14407d6c34
--- /dev/null
+++ b/thirdparty/msdfgen/core/Bitmap.h
@@ -0,0 +1,50 @@
+
+#pragma once
+
+#include "BitmapRef.hpp"
+
+namespace msdfgen {
+
+/// A 2D image bitmap with N channels of type T. Pixel memory is managed by the class.
+template <typename T, int N = 1>
+class Bitmap {
+
+public:
+ Bitmap();
+ Bitmap(int width, int height);
+ Bitmap(const BitmapConstRef<T, N> &orig);
+ Bitmap(const Bitmap<T, N> &orig);
+#ifdef MSDFGEN_USE_CPP11
+ Bitmap(Bitmap<T, N> &&orig);
+#endif
+ ~Bitmap();
+ Bitmap<T, N> & operator=(const BitmapConstRef<T, N> &orig);
+ Bitmap<T, N> & operator=(const Bitmap<T, N> &orig);
+#ifdef MSDFGEN_USE_CPP11
+ Bitmap<T, N> & operator=(Bitmap<T, N> &&orig);
+#endif
+ /// Bitmap width in pixels.
+ int width() const;
+ /// Bitmap height in pixels.
+ int height() const;
+ T * operator()(int x, int y);
+ const T * operator()(int x, int y) const;
+#ifdef MSDFGEN_USE_CPP11
+ explicit operator T *();
+ explicit operator const T *() const;
+#else
+ operator T *();
+ operator const T *() const;
+#endif
+ operator BitmapRef<T, N>();
+ operator BitmapConstRef<T, N>() const;
+
+private:
+ T *pixels;
+ int w, h;
+
+};
+
+}
+
+#include "Bitmap.hpp"
diff --git a/thirdparty/msdfgen/core/Bitmap.hpp b/thirdparty/msdfgen/core/Bitmap.hpp
new file mode 100644
index 0000000000..cb16cac8d4
--- /dev/null
+++ b/thirdparty/msdfgen/core/Bitmap.hpp
@@ -0,0 +1,117 @@
+
+#include "Bitmap.h"
+
+#include <cstdlib>
+#include <cstring>
+
+namespace msdfgen {
+
+template <typename T, int N>
+Bitmap<T, N>::Bitmap() : pixels(NULL), w(0), h(0) { }
+
+template <typename T, int N>
+Bitmap<T, N>::Bitmap(int width, int height) : w(width), h(height) {
+ pixels = new T[N*w*h];
+}
+
+template <typename T, int N>
+Bitmap<T, N>::Bitmap(const BitmapConstRef<T, N> &orig) : w(orig.width), h(orig.height) {
+ pixels = new T[N*w*h];
+ memcpy(pixels, orig.pixels, sizeof(T)*N*w*h);
+}
+
+template <typename T, int N>
+Bitmap<T, N>::Bitmap(const Bitmap<T, N> &orig) : w(orig.w), h(orig.h) {
+ pixels = new T[N*w*h];
+ memcpy(pixels, orig.pixels, sizeof(T)*N*w*h);
+}
+
+#ifdef MSDFGEN_USE_CPP11
+template <typename T, int N>
+Bitmap<T, N>::Bitmap(Bitmap<T, N> &&orig) : pixels(orig.pixels), w(orig.w), h(orig.h) {
+ orig.pixels = NULL;
+ orig.w = 0, orig.h = 0;
+}
+#endif
+
+template <typename T, int N>
+Bitmap<T, N>::~Bitmap() {
+ delete [] pixels;
+}
+
+template <typename T, int N>
+Bitmap<T, N> & Bitmap<T, N>::operator=(const BitmapConstRef<T, N> &orig) {
+ if (pixels != orig.pixels) {
+ delete [] pixels;
+ w = orig.width, h = orig.height;
+ pixels = new T[N*w*h];
+ memcpy(pixels, orig.pixels, sizeof(T)*N*w*h);
+ }
+ return *this;
+}
+
+template <typename T, int N>
+Bitmap<T, N> & Bitmap<T, N>::operator=(const Bitmap<T, N> &orig) {
+ if (this != &orig) {
+ delete [] pixels;
+ w = orig.w, h = orig.h;
+ pixels = new T[N*w*h];
+ memcpy(pixels, orig.pixels, sizeof(T)*N*w*h);
+ }
+ return *this;
+}
+
+#ifdef MSDFGEN_USE_CPP11
+template <typename T, int N>
+Bitmap<T, N> & Bitmap<T, N>::operator=(Bitmap<T, N> &&orig) {
+ if (this != &orig) {
+ delete [] pixels;
+ pixels = orig.pixels;
+ w = orig.w, h = orig.h;
+ orig.pixels = NULL;
+ }
+ return *this;
+}
+#endif
+
+template <typename T, int N>
+int Bitmap<T, N>::width() const {
+ return w;
+}
+
+template <typename T, int N>
+int Bitmap<T, N>::height() const {
+ return h;
+}
+
+template <typename T, int N>
+T * Bitmap<T, N>::operator()(int x, int y) {
+ return pixels+N*(w*y+x);
+}
+
+template <typename T, int N>
+const T * Bitmap<T, N>::operator()(int x, int y) const {
+ return pixels+N*(w*y+x);
+}
+
+template <typename T, int N>
+Bitmap<T, N>::operator T *() {
+ return pixels;
+}
+
+template <typename T, int N>
+Bitmap<T, N>::operator const T *() const {
+ return pixels;
+}
+
+template <typename T, int N>
+Bitmap<T, N>::operator BitmapRef<T, N>() {
+ return BitmapRef<T, N>(pixels, w, h);
+}
+
+template <typename T, int N>
+Bitmap<T, N>::operator BitmapConstRef<T, N>() const {
+ return BitmapConstRef<T, N>(pixels, w, h);
+}
+
+}
diff --git a/thirdparty/msdfgen/core/BitmapRef.hpp b/thirdparty/msdfgen/core/BitmapRef.hpp
new file mode 100644
index 0000000000..6f9620dcdf
--- /dev/null
+++ b/thirdparty/msdfgen/core/BitmapRef.hpp
@@ -0,0 +1,43 @@
+
+#pragma once
+
+#include <cstdlib>
+
+namespace msdfgen {
+
+typedef unsigned char byte;
+
+/// Reference to a 2D image bitmap or a buffer acting as one. Pixel storage not owned or managed by the object.
+template <typename T, int N = 1>
+struct BitmapRef {
+
+ T *pixels;
+ int width, height;
+
+ inline BitmapRef() : pixels(NULL), width(0), height(0) { }
+ inline BitmapRef(T *pixels, int width, int height) : pixels(pixels), width(width), height(height) { }
+
+ inline T * operator()(int x, int y) const {
+ return pixels+N*(width*y+x);
+ }
+
+};
+
+/// Constant reference to a 2D image bitmap or a buffer acting as one. Pixel storage not owned or managed by the object.
+template <typename T, int N = 1>
+struct BitmapConstRef {
+
+ const T *pixels;
+ int width, height;
+
+ inline BitmapConstRef() : pixels(NULL), width(0), height(0) { }
+ inline BitmapConstRef(const T *pixels, int width, int height) : pixels(pixels), width(width), height(height) { }
+ inline BitmapConstRef(const BitmapRef<T, N> &orig) : pixels(orig.pixels), width(orig.width), height(orig.height) { }
+
+ inline const T * operator()(int x, int y) const {
+ return pixels+N*(width*y+x);
+ }
+
+};
+
+}
diff --git a/thirdparty/msdfgen/core/Contour.cpp b/thirdparty/msdfgen/core/Contour.cpp
new file mode 100644
index 0000000000..ca80d3c55a
--- /dev/null
+++ b/thirdparty/msdfgen/core/Contour.cpp
@@ -0,0 +1,90 @@
+
+#include "Contour.h"
+
+#include "arithmetics.hpp"
+
+namespace msdfgen {
+
+static double shoelace(const Point2 &a, const Point2 &b) {
+ return (b.x-a.x)*(a.y+b.y);
+}
+
+void Contour::addEdge(const EdgeHolder &edge) {
+ edges.push_back(edge);
+}
+
+#ifdef MSDFGEN_USE_CPP11
+void Contour::addEdge(EdgeHolder &&edge) {
+ edges.push_back((EdgeHolder &&) edge);
+}
+#endif
+
+EdgeHolder & Contour::addEdge() {
+ edges.resize(edges.size()+1);
+ return edges.back();
+}
+
+static void boundPoint(double &l, double &b, double &r, double &t, Point2 p) {
+ if (p.x < l) l = p.x;
+ if (p.y < b) b = p.y;
+ if (p.x > r) r = p.x;
+ if (p.y > t) t = p.y;
+}
+
+void Contour::bound(double &l, double &b, double &r, double &t) const {
+ for (std::vector<EdgeHolder>::const_iterator edge = edges.begin(); edge != edges.end(); ++edge)
+ (*edge)->bound(l, b, r, t);
+}
+
+void Contour::boundMiters(double &l, double &b, double &r, double &t, double border, double miterLimit, int polarity) const {
+ if (edges.empty())
+ return;
+ Vector2 prevDir = edges.back()->direction(1).normalize(true);
+ for (std::vector<EdgeHolder>::const_iterator edge = edges.begin(); edge != edges.end(); ++edge) {
+ Vector2 dir = -(*edge)->direction(0).normalize(true);
+ if (polarity*crossProduct(prevDir, dir) >= 0) {
+ double miterLength = miterLimit;
+ double q = .5*(1-dotProduct(prevDir, dir));
+ if (q > 0)
+ miterLength = min(1/sqrt(q), miterLimit);
+ Point2 miter = (*edge)->point(0)+border*miterLength*(prevDir+dir).normalize(true);
+ boundPoint(l, b, r, t, miter);
+ }
+ prevDir = (*edge)->direction(1).normalize(true);
+ }
+}
+
+int Contour::winding() const {
+ if (edges.empty())
+ return 0;
+ double total = 0;
+ if (edges.size() == 1) {
+ Point2 a = edges[0]->point(0), b = edges[0]->point(1/3.), c = edges[0]->point(2/3.);
+ total += shoelace(a, b);
+ total += shoelace(b, c);
+ total += shoelace(c, a);
+ } else if (edges.size() == 2) {
+ Point2 a = edges[0]->point(0), b = edges[0]->point(.5), c = edges[1]->point(0), d = edges[1]->point(.5);
+ total += shoelace(a, b);
+ total += shoelace(b, c);
+ total += shoelace(c, d);
+ total += shoelace(d, a);
+ } else {
+ Point2 prev = edges.back()->point(0);
+ for (std::vector<EdgeHolder>::const_iterator edge = edges.begin(); edge != edges.end(); ++edge) {
+ Point2 cur = (*edge)->point(0);
+ total += shoelace(prev, cur);
+ prev = cur;
+ }
+ }
+ return sign(total);
+}
+
+void Contour::reverse() {
+ for (int i = (int) edges.size()/2; i > 0; --i)
+ EdgeHolder::swap(edges[i-1], edges[edges.size()-i]);
+ for (std::vector<EdgeHolder>::iterator edge = edges.begin(); edge != edges.end(); ++edge)
+ (*edge)->reverse();
+}
+
+}
diff --git a/thirdparty/msdfgen/core/Contour.h b/thirdparty/msdfgen/core/Contour.h
new file mode 100644
index 0000000000..f79b269582
--- /dev/null
+++ b/thirdparty/msdfgen/core/Contour.h
@@ -0,0 +1,34 @@
+
+#pragma once
+
+#include <vector>
+#include "EdgeHolder.h"
+
+namespace msdfgen {
+
+/// A single closed contour of a shape.
+class Contour {
+
+public:
+ /// The sequence of edges that make up the contour.
+ std::vector<EdgeHolder> edges;
+
+ /// Adds an edge to the contour.
+ void addEdge(const EdgeHolder &edge);
+#ifdef MSDFGEN_USE_CPP11
+ void addEdge(EdgeHolder &&edge);
+#endif
+ /// Creates a new edge in the contour and returns its reference.
+ EdgeHolder & addEdge();
+ /// Adjusts the bounding box to fit the contour.
+ void bound(double &l, double &b, double &r, double &t) const;
+ /// Adjusts the bounding box to fit the contour border's mitered corners.
+ void boundMiters(double &l, double &b, double &r, double &t, double border, double miterLimit, int polarity) const;
+ /// Computes the winding of the contour. Returns 1 if positive, -1 if negative.
+ int winding() const;
+ /// Reverses the sequence of edges on the contour.
+ void reverse();
+
+};
+
+}
diff --git a/thirdparty/msdfgen/core/EdgeColor.h b/thirdparty/msdfgen/core/EdgeColor.h
new file mode 100644
index 0000000000..9d49a5a89e
--- /dev/null
+++ b/thirdparty/msdfgen/core/EdgeColor.h
@@ -0,0 +1,18 @@
+
+#pragma once
+
+namespace msdfgen {
+
+/// Edge color specifies which color channels an edge belongs to.
+enum EdgeColor {
+ BLACK = 0,
+ RED = 1,
+ GREEN = 2,
+ YELLOW = 3,
+ BLUE = 4,
+ MAGENTA = 5,
+ CYAN = 6,
+ WHITE = 7
+};
+
+}
diff --git a/thirdparty/msdfgen/core/EdgeHolder.cpp b/thirdparty/msdfgen/core/EdgeHolder.cpp
new file mode 100644
index 0000000000..1a8c5f66e9
--- /dev/null
+++ b/thirdparty/msdfgen/core/EdgeHolder.cpp
@@ -0,0 +1,77 @@
+
+#include "EdgeHolder.h"
+
+namespace msdfgen {
+
+void EdgeHolder::swap(EdgeHolder &a, EdgeHolder &b) {
+ EdgeSegment *tmp = a.edgeSegment;
+ a.edgeSegment = b.edgeSegment;
+ b.edgeSegment = tmp;
+}
+
+EdgeHolder::EdgeHolder() : edgeSegment(NULL) { }
+
+EdgeHolder::EdgeHolder(EdgeSegment *segment) : edgeSegment(segment) { }
+
+EdgeHolder::EdgeHolder(Point2 p0, Point2 p1, EdgeColor edgeColor) : edgeSegment(new LinearSegment(p0, p1, edgeColor)) { }
+
+EdgeHolder::EdgeHolder(Point2 p0, Point2 p1, Point2 p2, EdgeColor edgeColor) : edgeSegment(new QuadraticSegment(p0, p1, p2, edgeColor)) { }
+
+EdgeHolder::EdgeHolder(Point2 p0, Point2 p1, Point2 p2, Point2 p3, EdgeColor edgeColor) : edgeSegment(new CubicSegment(p0, p1, p2, p3, edgeColor)) { }
+
+EdgeHolder::EdgeHolder(const EdgeHolder &orig) : edgeSegment(orig.edgeSegment ? orig.edgeSegment->clone() : NULL) { }
+
+#ifdef MSDFGEN_USE_CPP11
+EdgeHolder::EdgeHolder(EdgeHolder &&orig) : edgeSegment(orig.edgeSegment) {
+ orig.edgeSegment = NULL;
+}
+#endif
+
+EdgeHolder::~EdgeHolder() {
+ delete edgeSegment;
+}
+
+EdgeHolder & EdgeHolder::operator=(const EdgeHolder &orig) {
+ if (this != &orig) {
+ delete edgeSegment;
+ edgeSegment = orig.edgeSegment ? orig.edgeSegment->clone() : NULL;
+ }
+ return *this;
+}
+
+#ifdef MSDFGEN_USE_CPP11
+EdgeHolder & EdgeHolder::operator=(EdgeHolder &&orig) {
+ if (this != &orig) {
+ delete edgeSegment;
+ edgeSegment = orig.edgeSegment;
+ orig.edgeSegment = NULL;
+ }
+ return *this;
+}
+#endif
+
+EdgeSegment & EdgeHolder::operator*() {
+ return *edgeSegment;
+}
+
+const EdgeSegment & EdgeHolder::operator*() const {
+ return *edgeSegment;
+}
+
+EdgeSegment * EdgeHolder::operator->() {
+ return edgeSegment;
+}
+
+const EdgeSegment * EdgeHolder::operator->() const {
+ return edgeSegment;
+}
+
+EdgeHolder::operator EdgeSegment *() {
+ return edgeSegment;
+}
+
+EdgeHolder::operator const EdgeSegment *() const {
+ return edgeSegment;
+}
+
+}
diff --git a/thirdparty/msdfgen/core/EdgeHolder.h b/thirdparty/msdfgen/core/EdgeHolder.h
new file mode 100644
index 0000000000..c4c5be7616
--- /dev/null
+++ b/thirdparty/msdfgen/core/EdgeHolder.h
@@ -0,0 +1,41 @@
+
+#pragma once
+
+#include "edge-segments.h"
+
+namespace msdfgen {
+
+/// Container for a single edge of dynamic type.
+class EdgeHolder {
+
+public:
+ /// Swaps the edges held by a and b.
+ static void swap(EdgeHolder &a, EdgeHolder &b);
+
+ EdgeHolder();
+ EdgeHolder(EdgeSegment *segment);
+ EdgeHolder(Point2 p0, Point2 p1, EdgeColor edgeColor = WHITE);
+ EdgeHolder(Point2 p0, Point2 p1, Point2 p2, EdgeColor edgeColor = WHITE);
+ EdgeHolder(Point2 p0, Point2 p1, Point2 p2, Point2 p3, EdgeColor edgeColor = WHITE);
+ EdgeHolder(const EdgeHolder &orig);
+#ifdef MSDFGEN_USE_CPP11
+ EdgeHolder(EdgeHolder &&orig);
+#endif
+ ~EdgeHolder();
+ EdgeHolder & operator=(const EdgeHolder &orig);
+#ifdef MSDFGEN_USE_CPP11
+ EdgeHolder & operator=(EdgeHolder &&orig);
+#endif
+ EdgeSegment & operator*();
+ const EdgeSegment & operator*() const;
+ EdgeSegment * operator->();
+ const EdgeSegment * operator->() const;
+ operator EdgeSegment *();
+ operator const EdgeSegment *() const;
+
+private:
+ EdgeSegment *edgeSegment;
+
+};
+
+}
diff --git a/thirdparty/msdfgen/core/MSDFErrorCorrection.cpp b/thirdparty/msdfgen/core/MSDFErrorCorrection.cpp
new file mode 100644
index 0000000000..7918597fd2
--- /dev/null
+++ b/thirdparty/msdfgen/core/MSDFErrorCorrection.cpp
@@ -0,0 +1,495 @@
+
+#include "MSDFErrorCorrection.h"
+
+#include <cstring>
+#include "arithmetics.hpp"
+#include "equation-solver.h"
+#include "EdgeColor.h"
+#include "bitmap-interpolation.hpp"
+#include "edge-selectors.h"
+#include "contour-combiners.h"
+#include "ShapeDistanceFinder.h"
+#include "generator-config.h"
+
+namespace msdfgen {
+
+#define ARTIFACT_T_EPSILON .01
+#define PROTECTION_RADIUS_TOLERANCE 1.001
+
+#define CLASSIFIER_FLAG_CANDIDATE 0x01
+#define CLASSIFIER_FLAG_ARTIFACT 0x02
+
+const double ErrorCorrectionConfig::defaultMinDeviationRatio = 1.11111111111111111;
+const double ErrorCorrectionConfig::defaultMinImproveRatio = 1.11111111111111111;
+
+/// The base artifact classifier recognizes artifacts based on the contents of the SDF alone.
+class BaseArtifactClassifier {
+public:
+ inline BaseArtifactClassifier(double span, bool protectedFlag) : span(span), protectedFlag(protectedFlag) { }
+ /// Evaluates if the median value xm interpolated at xt in the range between am at at and bm at bt indicates an artifact.
+ inline int rangeTest(double at, double bt, double xt, float am, float bm, float xm) const {
+ // For protected texels, only consider inversion artifacts (interpolated median has different sign than boundaries). For the rest, it is sufficient that the interpolated median is outside its boundaries.
+ if ((am > .5f && bm > .5f && xm <= .5f) || (am < .5f && bm < .5f && xm >= .5f) || (!protectedFlag && median(am, bm, xm) != xm)) {
+ double axSpan = (xt-at)*span, bxSpan = (bt-xt)*span;
+ // Check if the interpolated median's value is in the expected range based on its distance (span) from boundaries a, b.
+ if (!(xm >= am-axSpan && xm <= am+axSpan && xm >= bm-bxSpan && xm <= bm+bxSpan))
+ return CLASSIFIER_FLAG_CANDIDATE|CLASSIFIER_FLAG_ARTIFACT;
+ return CLASSIFIER_FLAG_CANDIDATE;
+ }
+ return 0;
+ }
+ /// Returns true if the combined results of the tests performed on the median value m interpolated at t indicate an artifact.
+ inline bool evaluate(double t, float m, int flags) const {
+ return (flags&2) != 0;
+ }
+private:
+ double span;
+ bool protectedFlag;
+};
+
+/// The shape distance checker evaluates the exact shape distance to find additional artifacts at a significant performance cost.
+template <template <typename> class ContourCombiner, int N>
+class ShapeDistanceChecker {
+public:
+ class ArtifactClassifier : public BaseArtifactClassifier {
+ public:
+ inline ArtifactClassifier(ShapeDistanceChecker *parent, const Vector2 &direction, double span) : BaseArtifactClassifier(span, parent->protectedFlag), parent(parent), direction(direction) { }
+ /// Returns true if the combined results of the tests performed on the median value m interpolated at t indicate an artifact.
+ inline bool evaluate(double t, float m, int flags) const {
+ if (flags&CLASSIFIER_FLAG_CANDIDATE) {
+ // Skip expensive distance evaluation if the point has already been classified as an artifact by the base classifier.
+ if (flags&CLASSIFIER_FLAG_ARTIFACT)
+ return true;
+ Vector2 tVector = t*direction;
+ float oldMSD[N], newMSD[3];
+ // Compute the color that would be currently interpolated at the artifact candidate's position.
+ Point2 sdfCoord = parent->sdfCoord+tVector;
+ interpolate(oldMSD, parent->sdf, sdfCoord);
+ // Compute the color that would be interpolated at the artifact candidate's position if error correction was applied on the current texel.
+ double aWeight = (1-fabs(tVector.x))*(1-fabs(tVector.y));
+ float aPSD = median(parent->msd[0], parent->msd[1], parent->msd[2]);
+ newMSD[0] = float(oldMSD[0]+aWeight*(aPSD-parent->msd[0]));
+ newMSD[1] = float(oldMSD[1]+aWeight*(aPSD-parent->msd[1]));
+ newMSD[2] = float(oldMSD[2]+aWeight*(aPSD-parent->msd[2]));
+ // Compute the evaluated distance (interpolated median) before and after error correction, as well as the exact shape distance.
+ float oldPSD = median(oldMSD[0], oldMSD[1], oldMSD[2]);
+ float newPSD = median(newMSD[0], newMSD[1], newMSD[2]);
+ float refPSD = float(parent->invRange*parent->distanceFinder.distance(parent->shapeCoord+tVector*parent->texelSize)+.5);
+ // Compare the differences of the exact distance and the before and after distances.
+ return parent->minImproveRatio*fabsf(newPSD-refPSD) < double(fabsf(oldPSD-refPSD));
+ }
+ return false;
+ }
+ private:
+ ShapeDistanceChecker *parent;
+ Vector2 direction;
+ };
+ Point2 shapeCoord, sdfCoord;
+ const float *msd;
+ bool protectedFlag;
+ inline ShapeDistanceChecker(const BitmapConstRef<float, N> &sdf, const Shape &shape, const Projection &projection, double invRange, double minImproveRatio) : distanceFinder(shape), sdf(sdf), invRange(invRange), minImproveRatio(minImproveRatio) {
+ texelSize = projection.unprojectVector(Vector2(1));
+ }
+ inline ArtifactClassifier classifier(const Vector2 &direction, double span) {
+ return ArtifactClassifier(this, direction, span);
+ }
+private:
+ ShapeDistanceFinder<ContourCombiner<PseudoDistanceSelector> > distanceFinder;
+ BitmapConstRef<float, N> sdf;
+ double invRange;
+ Vector2 texelSize;
+ double minImproveRatio;
+};
+
+MSDFErrorCorrection::MSDFErrorCorrection() { }
+
+MSDFErrorCorrection::MSDFErrorCorrection(const BitmapRef<byte, 1> &stencil, const Projection &projection, double range) : stencil(stencil), projection(projection) {
+ invRange = 1/range;
+ minDeviationRatio = ErrorCorrectionConfig::defaultMinDeviationRatio;
+ minImproveRatio = ErrorCorrectionConfig::defaultMinImproveRatio;
+ memset(stencil.pixels, 0, sizeof(byte)*stencil.width*stencil.height);
+}
+
+void MSDFErrorCorrection::setMinDeviationRatio(double minDeviationRatio) {
+ this->minDeviationRatio = minDeviationRatio;
+}
+
+void MSDFErrorCorrection::setMinImproveRatio(double minImproveRatio) {
+ this->minImproveRatio = minImproveRatio;
+}
+
+void MSDFErrorCorrection::protectCorners(const Shape &shape) {
+ for (std::vector<Contour>::const_iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour)
+ if (!contour->edges.empty()) {
+ const EdgeSegment *prevEdge = contour->edges.back();
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge) {
+ int commonColor = prevEdge->color&(*edge)->color;
+ // If the color changes from prevEdge to edge, this is a corner.
+ if (!(commonColor&(commonColor-1))) {
+ // Find the four texels that envelop the corner and mark them as protected.
+ Point2 p = projection.project((*edge)->point(0));
+ if (shape.inverseYAxis)
+ p.y = stencil.height-p.y;
+ int l = (int) floor(p.x-.5);
+ int b = (int) floor(p.y-.5);
+ int r = l+1;
+ int t = b+1;
+ // Check that the positions are within bounds.
+ if (l < stencil.width && b < stencil.height && r >= 0 && t >= 0) {
+ if (l >= 0 && b >= 0)
+ *stencil(l, b) |= (byte) PROTECTED;
+ if (r < stencil.width && b >= 0)
+ *stencil(r, b) |= (byte) PROTECTED;
+ if (l >= 0 && t < stencil.height)
+ *stencil(l, t) |= (byte) PROTECTED;
+ if (r < stencil.width && t < stencil.height)
+ *stencil(r, t) |= (byte) PROTECTED;
+ }
+ }
+ prevEdge = *edge;
+ }
+ }
+}
+
+/// Determines if the channel contributes to an edge between the two texels a, b.
+static bool edgeBetweenTexelsChannel(const float *a, const float *b, int channel) {
+ // Find interpolation ratio t (0 < t < 1) where an edge is expected (mix(a[channel], b[channel], t) == 0.5).
+ double t = (a[channel]-.5)/(a[channel]-b[channel]);
+ if (t > 0 && t < 1) {
+ // Interpolate channel values at t.
+ float c[3] = {
+ mix(a[0], b[0], t),
+ mix(a[1], b[1], t),
+ mix(a[2], b[2], t)
+ };
+ // This is only an edge if the zero-distance channel is the median.
+ return median(c[0], c[1], c[2]) == c[channel];
+ }
+ return false;
+}
+
+/// Returns a bit mask of which channels contribute to an edge between the two texels a, b.
+static int edgeBetweenTexels(const float *a, const float *b) {
+ return (
+ RED*edgeBetweenTexelsChannel(a, b, 0)+
+ GREEN*edgeBetweenTexelsChannel(a, b, 1)+
+ BLUE*edgeBetweenTexelsChannel(a, b, 2)
+ );
+}
+
+/// Marks texel as protected if one of its non-median channels is present in the channel mask.
+static void protectExtremeChannels(byte *stencil, const float *msd, float m, int mask) {
+ if (
+ (mask&RED && msd[0] != m) ||
+ (mask&GREEN && msd[1] != m) ||
+ (mask&BLUE && msd[2] != m)
+ )
+ *stencil |= (byte) MSDFErrorCorrection::PROTECTED;
+}
+
+template <int N>
+void MSDFErrorCorrection::protectEdges(const BitmapConstRef<float, N> &sdf) {
+ float radius;
+ // Horizontal texel pairs
+ radius = float(PROTECTION_RADIUS_TOLERANCE*projection.unprojectVector(Vector2(invRange, 0)).length());
+ for (int y = 0; y < sdf.height; ++y) {
+ const float *left = sdf(0, y);
+ const float *right = sdf(1, y);
+ for (int x = 0; x < sdf.width-1; ++x) {
+ float lm = median(left[0], left[1], left[2]);
+ float rm = median(right[0], right[1], right[2]);
+ if (fabsf(lm-.5f)+fabsf(rm-.5f) < radius) {
+ int mask = edgeBetweenTexels(left, right);
+ protectExtremeChannels(stencil(x, y), left, lm, mask);
+ protectExtremeChannels(stencil(x+1, y), right, rm, mask);
+ }
+ left += N, right += N;
+ }
+ }
+ // Vertical texel pairs
+ radius = float(PROTECTION_RADIUS_TOLERANCE*projection.unprojectVector(Vector2(0, invRange)).length());
+ for (int y = 0; y < sdf.height-1; ++y) {
+ const float *bottom = sdf(0, y);
+ const float *top = sdf(0, y+1);
+ for (int x = 0; x < sdf.width; ++x) {
+ float bm = median(bottom[0], bottom[1], bottom[2]);
+ float tm = median(top[0], top[1], top[2]);
+ if (fabsf(bm-.5f)+fabsf(tm-.5f) < radius) {
+ int mask = edgeBetweenTexels(bottom, top);
+ protectExtremeChannels(stencil(x, y), bottom, bm, mask);
+ protectExtremeChannels(stencil(x, y+1), top, tm, mask);
+ }
+ bottom += N, top += N;
+ }
+ }
+ // Diagonal texel pairs
+ radius = float(PROTECTION_RADIUS_TOLERANCE*projection.unprojectVector(Vector2(invRange)).length());
+ for (int y = 0; y < sdf.height-1; ++y) {
+ const float *lb = sdf(0, y);
+ const float *rb = sdf(1, y);
+ const float *lt = sdf(0, y+1);
+ const float *rt = sdf(1, y+1);
+ for (int x = 0; x < sdf.width-1; ++x) {
+ float mlb = median(lb[0], lb[1], lb[2]);
+ float mrb = median(rb[0], rb[1], rb[2]);
+ float mlt = median(lt[0], lt[1], lt[2]);
+ float mrt = median(rt[0], rt[1], rt[2]);
+ if (fabsf(mlb-.5f)+fabsf(mrt-.5f) < radius) {
+ int mask = edgeBetweenTexels(lb, rt);
+ protectExtremeChannels(stencil(x, y), lb, mlb, mask);
+ protectExtremeChannels(stencil(x+1, y+1), rt, mrt, mask);
+ }
+ if (fabsf(mrb-.5f)+fabsf(mlt-.5f) < radius) {
+ int mask = edgeBetweenTexels(rb, lt);
+ protectExtremeChannels(stencil(x+1, y), rb, mrb, mask);
+ protectExtremeChannels(stencil(x, y+1), lt, mlt, mask);
+ }
+ lb += N, rb += N, lt += N, rt += N;
+ }
+ }
+}
+
+void MSDFErrorCorrection::protectAll() {
+ byte *end = stencil.pixels+stencil.width*stencil.height;
+ for (byte *mask = stencil.pixels; mask < end; ++mask)
+ *mask |= (byte) PROTECTED;
+}
+
+/// Returns the median of the linear interpolation of texels a, b at t.
+static float interpolatedMedian(const float *a, const float *b, double t) {
+ return median(
+ mix(a[0], b[0], t),
+ mix(a[1], b[1], t),
+ mix(a[2], b[2], t)
+ );
+}
+/// Returns the median of the bilinear interpolation with the given constant, linear, and quadratic terms at t.
+static float interpolatedMedian(const float *a, const float *l, const float *q, double t) {
+ return float(median(
+ t*(t*q[0]+l[0])+a[0],
+ t*(t*q[1]+l[1])+a[1],
+ t*(t*q[2]+l[2])+a[2]
+ ));
+}
+
+/// Determines if the interpolated median xm is an artifact.
+static bool isArtifact(bool isProtected, double axSpan, double bxSpan, float am, float bm, float xm) {
+ return (
+ // For protected texels, only report an artifact if it would cause fill inversion (change between positive and negative distance).
+ (!isProtected || (am > .5f && bm > .5f && xm <= .5f) || (am < .5f && bm < .5f && xm >= .5f)) &&
+ // This is an artifact if the interpolated median is outside the range of possible values based on its distance from a, b.
+ !(xm >= am-axSpan && xm <= am+axSpan && xm >= bm-bxSpan && xm <= bm+bxSpan)
+ );
+}
+
+/// Checks if a linear interpolation artifact will occur at a point where two specific color channels are equal - such points have extreme median values.
+template <class ArtifactClassifier>
+static bool hasLinearArtifactInner(const ArtifactClassifier &artifactClassifier, float am, float bm, const float *a, const float *b, float dA, float dB) {
+ // Find interpolation ratio t (0 < t < 1) where two color channels are equal (mix(dA, dB, t) == 0).
+ double t = (double) dA/(dA-dB);
+ if (t > ARTIFACT_T_EPSILON && t < 1-ARTIFACT_T_EPSILON) {
+ // Interpolate median at t and let the classifier decide if its value indicates an artifact.
+ float xm = interpolatedMedian(a, b, t);
+ return artifactClassifier.evaluate(t, xm, artifactClassifier.rangeTest(0, 1, t, am, bm, xm));
+ }
+ return false;
+}
+
+/// Checks if a bilinear interpolation artifact will occur at a point where two specific color channels are equal - such points have extreme median values.
+template <class ArtifactClassifier>
+static bool hasDiagonalArtifactInner(const ArtifactClassifier &artifactClassifier, float am, float dm, const float *a, const float *l, const float *q, float dA, float dBC, float dD, double tEx0, double tEx1) {
+ // Find interpolation ratios t (0 < t[i] < 1) where two color channels are equal.
+ double t[2];
+ int solutions = solveQuadratic(t, dD-dBC+dA, dBC-dA-dA, dA);
+ for (int i = 0; i < solutions; ++i) {
+ // Solutions t[i] == 0 and t[i] == 1 are singularities and occur very often because two channels are usually equal at texels.
+ if (t[i] > ARTIFACT_T_EPSILON && t[i] < 1-ARTIFACT_T_EPSILON) {
+ // Interpolate median xm at t.
+ float xm = interpolatedMedian(a, l, q, t[i]);
+ // Determine if xm deviates too much from medians of a, d.
+ int rangeFlags = artifactClassifier.rangeTest(0, 1, t[i], am, dm, xm);
+ // Additionally, check xm against the interpolated medians at the local extremes tEx0, tEx1.
+ double tEnd[2];
+ float em[2];
+ // tEx0
+ if (tEx0 > 0 && tEx0 < 1) {
+ tEnd[0] = 0, tEnd[1] = 1;
+ em[0] = am, em[1] = dm;
+ tEnd[tEx0 > t[i]] = tEx0;
+ em[tEx0 > t[i]] = interpolatedMedian(a, l, q, tEx0);
+ rangeFlags |= artifactClassifier.rangeTest(tEnd[0], tEnd[1], t[i], am, dm, xm);
+ }
+ // tEx1
+ if (tEx1 > 0 && tEx1 < 1) {
+ tEnd[0] = 0, tEnd[1] = 1;
+ em[0] = am, em[1] = dm;
+ tEnd[tEx1 > t[i]] = tEx1;
+ em[tEx1 > t[i]] = interpolatedMedian(a, l, q, tEx1);
+ rangeFlags |= artifactClassifier.rangeTest(tEnd[0], tEnd[1], t[i], am, dm, xm);
+ }
+ if (artifactClassifier.evaluate(t[i], xm, rangeFlags))
+ return true;
+ }
+ }
+ return false;
+}
+
+/// Checks if a linear interpolation artifact will occur inbetween two horizontally or vertically adjacent texels a, b.
+template <class ArtifactClassifier>
+static bool hasLinearArtifact(const ArtifactClassifier &artifactClassifier, float am, const float *a, const float *b) {
+ float bm = median(b[0], b[1], b[2]);
+ return (
+ // Out of the pair, only report artifacts for the texel further from the edge to minimize side effects.
+ fabsf(am-.5f) >= fabsf(bm-.5f) && (
+ // Check points where each pair of color channels meets.
+ hasLinearArtifactInner(artifactClassifier, am, bm, a, b, a[1]-a[0], b[1]-b[0]) ||
+ hasLinearArtifactInner(artifactClassifier, am, bm, a, b, a[2]-a[1], b[2]-b[1]) ||
+ hasLinearArtifactInner(artifactClassifier, am, bm, a, b, a[0]-a[2], b[0]-b[2])
+ )
+ );
+}
+
+/// Checks if a bilinear interpolation artifact will occur inbetween two diagonally adjacent texels a, d (with b, c forming the other diagonal).
+template <class ArtifactClassifier>
+static bool hasDiagonalArtifact(const ArtifactClassifier &artifactClassifier, float am, const float *a, const float *b, const float *c, const float *d) {
+ float dm = median(d[0], d[1], d[2]);
+ // Out of the pair, only report artifacts for the texel further from the edge to minimize side effects.
+ if (fabsf(am-.5f) >= fabsf(dm-.5f)) {
+ float abc[3] = {
+ a[0]-b[0]-c[0],
+ a[1]-b[1]-c[1],
+ a[2]-b[2]-c[2]
+ };
+ // Compute the linear terms for bilinear interpolation.
+ float l[3] = {
+ -a[0]-abc[0],
+ -a[1]-abc[1],
+ -a[2]-abc[2]
+ };
+ // Compute the quadratic terms for bilinear interpolation.
+ float q[3] = {
+ d[0]+abc[0],
+ d[1]+abc[1],
+ d[2]+abc[2]
+ };
+ // Compute interpolation ratios tEx (0 < tEx[i] < 1) for the local extremes of each color channel (the derivative 2*q[i]*tEx[i]+l[i] == 0).
+ double tEx[3] = {
+ -.5*l[0]/q[0],
+ -.5*l[1]/q[1],
+ -.5*l[2]/q[2]
+ };
+ // Check points where each pair of color channels meets.
+ return (
+ hasDiagonalArtifactInner(artifactClassifier, am, dm, a, l, q, a[1]-a[0], b[1]-b[0]+c[1]-c[0], d[1]-d[0], tEx[0], tEx[1]) ||
+ hasDiagonalArtifactInner(artifactClassifier, am, dm, a, l, q, a[2]-a[1], b[2]-b[1]+c[2]-c[1], d[2]-d[1], tEx[1], tEx[2]) ||
+ hasDiagonalArtifactInner(artifactClassifier, am, dm, a, l, q, a[0]-a[2], b[0]-b[2]+c[0]-c[2], d[0]-d[2], tEx[2], tEx[0])
+ );
+ }
+ return false;
+}
+
+template <int N>
+void MSDFErrorCorrection::findErrors(const BitmapConstRef<float, N> &sdf) {
+ // Compute the expected deltas between values of horizontally, vertically, and diagonally adjacent texels.
+ double hSpan = minDeviationRatio*projection.unprojectVector(Vector2(invRange, 0)).length();
+ double vSpan = minDeviationRatio*projection.unprojectVector(Vector2(0, invRange)).length();
+ double dSpan = minDeviationRatio*projection.unprojectVector(Vector2(invRange)).length();
+ // Inspect all texels.
+ for (int y = 0; y < sdf.height; ++y) {
+ for (int x = 0; x < sdf.width; ++x) {
+ const float *c = sdf(x, y);
+ float cm = median(c[0], c[1], c[2]);
+ bool protectedFlag = (*stencil(x, y)&PROTECTED) != 0;
+ const float *l = NULL, *b = NULL, *r = NULL, *t = NULL;
+ // Mark current texel c with the error flag if an artifact occurs when it's interpolated with any of its 8 neighbors.
+ *stencil(x, y) |= (byte) (ERROR*(
+ (x > 0 && ((l = sdf(x-1, y)), hasLinearArtifact(BaseArtifactClassifier(hSpan, protectedFlag), cm, c, l))) ||
+ (y > 0 && ((b = sdf(x, y-1)), hasLinearArtifact(BaseArtifactClassifier(vSpan, protectedFlag), cm, c, b))) ||
+ (x < sdf.width-1 && ((r = sdf(x+1, y)), hasLinearArtifact(BaseArtifactClassifier(hSpan, protectedFlag), cm, c, r))) ||
+ (y < sdf.height-1 && ((t = sdf(x, y+1)), hasLinearArtifact(BaseArtifactClassifier(vSpan, protectedFlag), cm, c, t))) ||
+ (x > 0 && y > 0 && hasDiagonalArtifact(BaseArtifactClassifier(dSpan, protectedFlag), cm, c, l, b, sdf(x-1, y-1))) ||
+ (x < sdf.width-1 && y > 0 && hasDiagonalArtifact(BaseArtifactClassifier(dSpan, protectedFlag), cm, c, r, b, sdf(x+1, y-1))) ||
+ (x > 0 && y < sdf.height-1 && hasDiagonalArtifact(BaseArtifactClassifier(dSpan, protectedFlag), cm, c, l, t, sdf(x-1, y+1))) ||
+ (x < sdf.width-1 && y < sdf.height-1 && hasDiagonalArtifact(BaseArtifactClassifier(dSpan, protectedFlag), cm, c, r, t, sdf(x+1, y+1)))
+ ));
+ }
+ }
+}
+
+template <template <typename> class ContourCombiner, int N>
+void MSDFErrorCorrection::findErrors(const BitmapConstRef<float, N> &sdf, const Shape &shape) {
+ // Compute the expected deltas between values of horizontally, vertically, and diagonally adjacent texels.
+ double hSpan = minDeviationRatio*projection.unprojectVector(Vector2(invRange, 0)).length();
+ double vSpan = minDeviationRatio*projection.unprojectVector(Vector2(0, invRange)).length();
+ double dSpan = minDeviationRatio*projection.unprojectVector(Vector2(invRange)).length();
+#ifdef MSDFGEN_USE_OPENMP
+ #pragma omp parallel
+#endif
+ {
+ ShapeDistanceChecker<ContourCombiner, N> shapeDistanceChecker(sdf, shape, projection, invRange, minImproveRatio);
+ bool rightToLeft = false;
+ // Inspect all texels.
+#ifdef MSDFGEN_USE_OPENMP
+ #pragma omp for
+#endif
+ for (int y = 0; y < sdf.height; ++y) {
+ int row = shape.inverseYAxis ? sdf.height-y-1 : y;
+ for (int col = 0; col < sdf.width; ++col) {
+ int x = rightToLeft ? sdf.width-col-1 : col;
+ if ((*stencil(x, row)&ERROR))
+ continue;
+ const float *c = sdf(x, row);
+ shapeDistanceChecker.shapeCoord = projection.unproject(Point2(x+.5, y+.5));
+ shapeDistanceChecker.sdfCoord = Point2(x+.5, row+.5);
+ shapeDistanceChecker.msd = c;
+ shapeDistanceChecker.protectedFlag = (*stencil(x, row)&PROTECTED) != 0;
+ float cm = median(c[0], c[1], c[2]);
+ const float *l = NULL, *b = NULL, *r = NULL, *t = NULL;
+ // Mark current texel c with the error flag if an artifact occurs when it's interpolated with any of its 8 neighbors.
+ *stencil(x, row) |= (byte) (ERROR*(
+ (x > 0 && ((l = sdf(x-1, row)), hasLinearArtifact(shapeDistanceChecker.classifier(Vector2(-1, 0), hSpan), cm, c, l))) ||
+ (row > 0 && ((b = sdf(x, row-1)), hasLinearArtifact(shapeDistanceChecker.classifier(Vector2(0, -1), vSpan), cm, c, b))) ||
+ (x < sdf.width-1 && ((r = sdf(x+1, row)), hasLinearArtifact(shapeDistanceChecker.classifier(Vector2(+1, 0), hSpan), cm, c, r))) ||
+ (row < sdf.height-1 && ((t = sdf(x, row+1)), hasLinearArtifact(shapeDistanceChecker.classifier(Vector2(0, +1), vSpan), cm, c, t))) ||
+ (x > 0 && row > 0 && hasDiagonalArtifact(shapeDistanceChecker.classifier(Vector2(-1, -1), dSpan), cm, c, l, b, sdf(x-1, row-1))) ||
+ (x < sdf.width-1 && row > 0 && hasDiagonalArtifact(shapeDistanceChecker.classifier(Vector2(+1, -1), dSpan), cm, c, r, b, sdf(x+1, row-1))) ||
+ (x > 0 && row < sdf.height-1 && hasDiagonalArtifact(shapeDistanceChecker.classifier(Vector2(-1, +1), dSpan), cm, c, l, t, sdf(x-1, row+1))) ||
+ (x < sdf.width-1 && row < sdf.height-1 && hasDiagonalArtifact(shapeDistanceChecker.classifier(Vector2(+1, +1), dSpan), cm, c, r, t, sdf(x+1, row+1)))
+ ));
+ }
+ }
+ }
+}
+
+template <int N>
+void MSDFErrorCorrection::apply(const BitmapRef<float, N> &sdf) const {
+ int texelCount = sdf.width*sdf.height;
+ const byte *mask = stencil.pixels;
+ float *texel = sdf.pixels;
+ for (int i = 0; i < texelCount; ++i) {
+ if (*mask&ERROR) {
+ // Set all color channels to the median.
+ float m = median(texel[0], texel[1], texel[2]);
+ texel[0] = m, texel[1] = m, texel[2] = m;
+ }
+ ++mask;
+ texel += N;
+ }
+}
+
+BitmapConstRef<byte, 1> MSDFErrorCorrection::getStencil() const {
+ return stencil;
+}
+
+template void MSDFErrorCorrection::protectEdges(const BitmapConstRef<float, 3> &sdf);
+template void MSDFErrorCorrection::protectEdges(const BitmapConstRef<float, 4> &sdf);
+template void MSDFErrorCorrection::findErrors(const BitmapConstRef<float, 3> &sdf);
+template void MSDFErrorCorrection::findErrors(const BitmapConstRef<float, 4> &sdf);
+template void MSDFErrorCorrection::findErrors<SimpleContourCombiner>(const BitmapConstRef<float, 3> &sdf, const Shape &shape);
+template void MSDFErrorCorrection::findErrors<SimpleContourCombiner>(const BitmapConstRef<float, 4> &sdf, const Shape &shape);
+template void MSDFErrorCorrection::findErrors<OverlappingContourCombiner>(const BitmapConstRef<float, 3> &sdf, const Shape &shape);
+template void MSDFErrorCorrection::findErrors<OverlappingContourCombiner>(const BitmapConstRef<float, 4> &sdf, const Shape &shape);
+template void MSDFErrorCorrection::apply(const BitmapRef<float, 3> &sdf) const;
+template void MSDFErrorCorrection::apply(const BitmapRef<float, 4> &sdf) const;
+
+}
diff --git a/thirdparty/msdfgen/core/MSDFErrorCorrection.h b/thirdparty/msdfgen/core/MSDFErrorCorrection.h
new file mode 100644
index 0000000000..c2e92fbce7
--- /dev/null
+++ b/thirdparty/msdfgen/core/MSDFErrorCorrection.h
@@ -0,0 +1,56 @@
+
+#pragma once
+
+#include "Projection.h"
+#include "Shape.h"
+#include "BitmapRef.hpp"
+
+namespace msdfgen {
+
+/// Performs error correction on a computed MSDF to eliminate interpolation artifacts. This is a low-level class, you may want to use the API in msdf-error-correction.h instead.
+class MSDFErrorCorrection {
+
+public:
+ /// Stencil flags.
+ enum Flags {
+ /// Texel marked as potentially causing interpolation errors.
+ ERROR = 1,
+ /// Texel marked as protected. Protected texels are only given the error flag if they cause inversion artifacts.
+ PROTECTED = 2
+ };
+
+ MSDFErrorCorrection();
+ explicit MSDFErrorCorrection(const BitmapRef<byte, 1> &stencil, const Projection &projection, double range);
+ /// Sets the minimum ratio between the actual and maximum expected distance delta to be considered an error.
+ void setMinDeviationRatio(double minDeviationRatio);
+ /// Sets the minimum ratio between the pre-correction distance error and the post-correction distance error.
+ void setMinImproveRatio(double minImproveRatio);
+ /// Flags all texels that are interpolated at corners as protected.
+ void protectCorners(const Shape &shape);
+ /// Flags all texels that contribute to edges as protected.
+ template <int N>
+ void protectEdges(const BitmapConstRef<float, N> &sdf);
+ /// Flags all texels as protected.
+ void protectAll();
+ /// Flags texels that are expected to cause interpolation artifacts based on analysis of the SDF only.
+ template <int N>
+ void findErrors(const BitmapConstRef<float, N> &sdf);
+ /// Flags texels that are expected to cause interpolation artifacts based on analysis of the SDF and comparison with the exact shape distance.
+ template <template <typename> class ContourCombiner, int N>
+ void findErrors(const BitmapConstRef<float, N> &sdf, const Shape &shape);
+ /// Modifies the MSDF so that all texels with the error flag are converted to single-channel.
+ template <int N>
+ void apply(const BitmapRef<float, N> &sdf) const;
+ /// Returns the stencil in its current state (see Flags).
+ BitmapConstRef<byte, 1> getStencil() const;
+
+private:
+ BitmapRef<byte, 1> stencil;
+ Projection projection;
+ double invRange;
+ double minDeviationRatio;
+ double minImproveRatio;
+
+};
+
+}
diff --git a/thirdparty/msdfgen/core/Projection.cpp b/thirdparty/msdfgen/core/Projection.cpp
new file mode 100644
index 0000000000..fa2f5e2592
--- /dev/null
+++ b/thirdparty/msdfgen/core/Projection.cpp
@@ -0,0 +1,42 @@
+
+#include "Projection.h"
+
+namespace msdfgen {
+
+Projection::Projection() : scale(1), translate(0) { }
+
+Projection::Projection(const Vector2 &scale, const Vector2 &translate) : scale(scale), translate(translate) { }
+
+Point2 Projection::project(const Point2 &coord) const {
+ return scale*(coord+translate);
+}
+
+Point2 Projection::unproject(const Point2 &coord) const {
+ return coord/scale-translate;
+}
+
+Vector2 Projection::projectVector(const Vector2 &vector) const {
+ return scale*vector;
+}
+
+Vector2 Projection::unprojectVector(const Vector2 &vector) const {
+ return vector/scale;
+}
+
+double Projection::projectX(double x) const {
+ return scale.x*(x+translate.x);
+}
+
+double Projection::projectY(double y) const {
+ return scale.y*(y+translate.y);
+}
+
+double Projection::unprojectX(double x) const {
+ return x/scale.x-translate.x;
+}
+
+double Projection::unprojectY(double y) const {
+ return y/scale.y-translate.y;
+}
+
+}
diff --git a/thirdparty/msdfgen/core/Projection.h b/thirdparty/msdfgen/core/Projection.h
new file mode 100644
index 0000000000..7cdb1c307a
--- /dev/null
+++ b/thirdparty/msdfgen/core/Projection.h
@@ -0,0 +1,37 @@
+
+#pragma once
+
+#include "Vector2.h"
+
+namespace msdfgen {
+
+/// A transformation from shape coordinates to pixel coordinates.
+class Projection {
+
+public:
+ Projection();
+ Projection(const Vector2 &scale, const Vector2 &translate);
+ /// Converts the shape coordinate to pixel coordinate.
+ Point2 project(const Point2 &coord) const;
+ /// Converts the pixel coordinate to shape coordinate.
+ Point2 unproject(const Point2 &coord) const;
+ /// Converts the vector to pixel coordinate space.
+ Vector2 projectVector(const Vector2 &vector) const;
+ /// Converts the vector from pixel coordinate space.
+ Vector2 unprojectVector(const Vector2 &vector) const;
+ /// Converts the X-coordinate from shape to pixel coordinate space.
+ double projectX(double x) const;
+ /// Converts the Y-coordinate from shape to pixel coordinate space.
+ double projectY(double y) const;
+ /// Converts the X-coordinate from pixel to shape coordinate space.
+ double unprojectX(double x) const;
+ /// Converts the Y-coordinate from pixel to shape coordinate space.
+ double unprojectY(double y) const;
+
+private:
+ Vector2 scale;
+ Vector2 translate;
+
+};
+
+}
diff --git a/thirdparty/msdfgen/core/Scanline.cpp b/thirdparty/msdfgen/core/Scanline.cpp
new file mode 100644
index 0000000000..8e5352dbf6
--- /dev/null
+++ b/thirdparty/msdfgen/core/Scanline.cpp
@@ -0,0 +1,125 @@
+
+#include "Scanline.h"
+
+#include <algorithm>
+#include "arithmetics.hpp"
+
+namespace msdfgen {
+
+static int compareIntersections(const void *a, const void *b) {
+ return sign(reinterpret_cast<const Scanline::Intersection *>(a)->x-reinterpret_cast<const Scanline::Intersection *>(b)->x);
+}
+
+bool interpretFillRule(int intersections, FillRule fillRule) {
+ switch (fillRule) {
+ case FILL_NONZERO:
+ return intersections != 0;
+ case FILL_ODD:
+ return intersections&1;
+ case FILL_POSITIVE:
+ return intersections > 0;
+ case FILL_NEGATIVE:
+ return intersections < 0;
+ }
+ return false;
+}
+
+double Scanline::overlap(const Scanline &a, const Scanline &b, double xFrom, double xTo, FillRule fillRule) {
+ double total = 0;
+ bool aInside = false, bInside = false;
+ int ai = 0, bi = 0;
+ double ax = !a.intersections.empty() ? a.intersections[ai].x : xTo;
+ double bx = !b.intersections.empty() ? b.intersections[bi].x : xTo;
+ while (ax < xFrom || bx < xFrom) {
+ double xNext = min(ax, bx);
+ if (ax == xNext && ai < (int) a.intersections.size()) {
+ aInside = interpretFillRule(a.intersections[ai].direction, fillRule);
+ ax = ++ai < (int) a.intersections.size() ? a.intersections[ai].x : xTo;
+ }
+ if (bx == xNext && bi < (int) b.intersections.size()) {
+ bInside = interpretFillRule(b.intersections[bi].direction, fillRule);
+ bx = ++bi < (int) b.intersections.size() ? b.intersections[bi].x : xTo;
+ }
+ }
+ double x = xFrom;
+ while (ax < xTo || bx < xTo) {
+ double xNext = min(ax, bx);
+ if (aInside == bInside)
+ total += xNext-x;
+ if (ax == xNext && ai < (int) a.intersections.size()) {
+ aInside = interpretFillRule(a.intersections[ai].direction, fillRule);
+ ax = ++ai < (int) a.intersections.size() ? a.intersections[ai].x : xTo;
+ }
+ if (bx == xNext && bi < (int) b.intersections.size()) {
+ bInside = interpretFillRule(b.intersections[bi].direction, fillRule);
+ bx = ++bi < (int) b.intersections.size() ? b.intersections[bi].x : xTo;
+ }
+ x = xNext;
+ }
+ if (aInside == bInside)
+ total += xTo-x;
+ return total;
+}
+
+Scanline::Scanline() : lastIndex(0) { }
+
+void Scanline::preprocess() {
+ lastIndex = 0;
+ if (!intersections.empty()) {
+ qsort(&intersections[0], intersections.size(), sizeof(Intersection), compareIntersections);
+ int totalDirection = 0;
+ for (std::vector<Intersection>::iterator intersection = intersections.begin(); intersection != intersections.end(); ++intersection) {
+ totalDirection += intersection->direction;
+ intersection->direction = totalDirection;
+ }
+ }
+}
+
+void Scanline::setIntersections(const std::vector<Intersection> &intersections) {
+ this->intersections = intersections;
+ preprocess();
+}
+
+#ifdef MSDFGEN_USE_CPP11
+void Scanline::setIntersections(std::vector<Intersection> &&intersections) {
+ this->intersections = (std::vector<Intersection> &&) intersections;
+ preprocess();
+}
+#endif
+
+int Scanline::moveTo(double x) const {
+ if (intersections.empty())
+ return -1;
+ int index = lastIndex;
+ if (x < intersections[index].x) {
+ do {
+ if (index == 0) {
+ lastIndex = 0;
+ return -1;
+ }
+ --index;
+ } while (x < intersections[index].x);
+ } else {
+ while (index < (int) intersections.size()-1 && x >= intersections[index+1].x)
+ ++index;
+ }
+ lastIndex = index;
+ return index;
+}
+
+int Scanline::countIntersections(double x) const {
+ return moveTo(x)+1;
+}
+
+int Scanline::sumIntersections(double x) const {
+ int index = moveTo(x);
+ if (index >= 0)
+ return intersections[index].direction;
+ return 0;
+}
+
+bool Scanline::filled(double x, FillRule fillRule) const {
+ return interpretFillRule(sumIntersections(x), fillRule);
+}
+
+}
diff --git a/thirdparty/msdfgen/core/Scanline.h b/thirdparty/msdfgen/core/Scanline.h
new file mode 100644
index 0000000000..9c8f34044b
--- /dev/null
+++ b/thirdparty/msdfgen/core/Scanline.h
@@ -0,0 +1,55 @@
+
+#pragma once
+
+#include <vector>
+
+namespace msdfgen {
+
+/// Fill rule dictates how intersection total is interpreted during rasterization.
+enum FillRule {
+ FILL_NONZERO,
+ FILL_ODD, // "even-odd"
+ FILL_POSITIVE,
+ FILL_NEGATIVE
+};
+
+/// Resolves the number of intersection into a binary fill value based on fill rule.
+bool interpretFillRule(int intersections, FillRule fillRule);
+
+/// Represents a horizontal scanline intersecting a shape.
+class Scanline {
+
+public:
+ /// An intersection with the scanline.
+ struct Intersection {
+ /// X coordinate.
+ double x;
+ /// Normalized Y direction of the oriented edge at the point of intersection.
+ int direction;
+ };
+
+ static double overlap(const Scanline &a, const Scanline &b, double xFrom, double xTo, FillRule fillRule);
+
+ Scanline();
+ /// Populates the intersection list.
+ void setIntersections(const std::vector<Intersection> &intersections);
+#ifdef MSDFGEN_USE_CPP11
+ void setIntersections(std::vector<Intersection> &&intersections);
+#endif
+ /// Returns the number of intersections left of x.
+ int countIntersections(double x) const;
+ /// Returns the total sign of intersections left of x.
+ int sumIntersections(double x) const;
+ /// Decides whether the scanline is filled at x based on fill rule.
+ bool filled(double x, FillRule fillRule) const;
+
+private:
+ std::vector<Intersection> intersections;
+ mutable int lastIndex;
+
+ void preprocess();
+ int moveTo(double x) const;
+
+};
+
+}
diff --git a/thirdparty/msdfgen/core/Shape.cpp b/thirdparty/msdfgen/core/Shape.cpp
new file mode 100644
index 0000000000..8d6f47c807
--- /dev/null
+++ b/thirdparty/msdfgen/core/Shape.cpp
@@ -0,0 +1,183 @@
+
+#include "Shape.h"
+
+#include <algorithm>
+#include "arithmetics.hpp"
+
+namespace msdfgen {
+
+Shape::Shape() : inverseYAxis(false) { }
+
+void Shape::addContour(const Contour &contour) {
+ contours.push_back(contour);
+}
+
+#ifdef MSDFGEN_USE_CPP11
+void Shape::addContour(Contour &&contour) {
+ contours.push_back((Contour &&) contour);
+}
+#endif
+
+Contour & Shape::addContour() {
+ contours.resize(contours.size()+1);
+ return contours.back();
+}
+
+bool Shape::validate() const {
+ for (std::vector<Contour>::const_iterator contour = contours.begin(); contour != contours.end(); ++contour) {
+ if (!contour->edges.empty()) {
+ Point2 corner = contour->edges.back()->point(1);
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge) {
+ if (!*edge)
+ return false;
+ if ((*edge)->point(0) != corner)
+ return false;
+ corner = (*edge)->point(1);
+ }
+ }
+ }
+ return true;
+}
+
+static void deconvergeEdge(EdgeHolder &edgeHolder, int param) {
+ {
+ const QuadraticSegment *quadraticSegment = dynamic_cast<const QuadraticSegment *>(&*edgeHolder);
+ if (quadraticSegment)
+ edgeHolder = quadraticSegment->convertToCubic();
+ }
+ {
+ CubicSegment *cubicSegment = dynamic_cast<CubicSegment *>(&*edgeHolder);
+ if (cubicSegment)
+ cubicSegment->deconverge(param, MSDFGEN_DECONVERGENCE_FACTOR);
+ }
+}
+
+void Shape::normalize() {
+ for (std::vector<Contour>::iterator contour = contours.begin(); contour != contours.end(); ++contour) {
+ if (contour->edges.size() == 1) {
+ EdgeSegment *parts[3] = { };
+ contour->edges[0]->splitInThirds(parts[0], parts[1], parts[2]);
+ contour->edges.clear();
+ contour->edges.push_back(EdgeHolder(parts[0]));
+ contour->edges.push_back(EdgeHolder(parts[1]));
+ contour->edges.push_back(EdgeHolder(parts[2]));
+ } else {
+ EdgeHolder *prevEdge = &contour->edges.back();
+ for (std::vector<EdgeHolder>::iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge) {
+ Vector2 prevDir = (*prevEdge)->direction(1).normalize();
+ Vector2 curDir = (*edge)->direction(0).normalize();
+ if (dotProduct(prevDir, curDir) < MSDFGEN_CORNER_DOT_EPSILON-1) {
+ deconvergeEdge(*prevEdge, 1);
+ deconvergeEdge(*edge, 0);
+ }
+ prevEdge = &*edge;
+ }
+ }
+ }
+}
+
+void Shape::bound(double &l, double &b, double &r, double &t) const {
+ for (std::vector<Contour>::const_iterator contour = contours.begin(); contour != contours.end(); ++contour)
+ contour->bound(l, b, r, t);
+}
+
+void Shape::boundMiters(double &l, double &b, double &r, double &t, double border, double miterLimit, int polarity) const {
+ for (std::vector<Contour>::const_iterator contour = contours.begin(); contour != contours.end(); ++contour)
+ contour->boundMiters(l, b, r, t, border, miterLimit, polarity);
+}
+
+Shape::Bounds Shape::getBounds(double border, double miterLimit, int polarity) const {
+ static const double LARGE_VALUE = 1e240;
+ Shape::Bounds bounds = { +LARGE_VALUE, +LARGE_VALUE, -LARGE_VALUE, -LARGE_VALUE };
+ bound(bounds.l, bounds.b, bounds.r, bounds.t);
+ if (border > 0) {
+ bounds.l -= border, bounds.b -= border;
+ bounds.r += border, bounds.t += border;
+ if (miterLimit > 0)
+ boundMiters(bounds.l, bounds.b, bounds.r, bounds.t, border, miterLimit, polarity);
+ }
+ return bounds;
+}
+
+void Shape::scanline(Scanline &line, double y) const {
+ std::vector<Scanline::Intersection> intersections;
+ double x[3];
+ int dy[3];
+ for (std::vector<Contour>::const_iterator contour = contours.begin(); contour != contours.end(); ++contour) {
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge) {
+ int n = (*edge)->scanlineIntersections(x, dy, y);
+ for (int i = 0; i < n; ++i) {
+ Scanline::Intersection intersection = { x[i], dy[i] };
+ intersections.push_back(intersection);
+ }
+ }
+ }
+#ifdef MSDFGEN_USE_CPP11
+ line.setIntersections((std::vector<Scanline::Intersection> &&) intersections);
+#else
+ line.setIntersections(intersections);
+#endif
+}
+
+int Shape::edgeCount() const {
+ int total = 0;
+ for (std::vector<Contour>::const_iterator contour = contours.begin(); contour != contours.end(); ++contour)
+ total += (int) contour->edges.size();
+ return total;
+}
+
+void Shape::orientContours() {
+ struct Intersection {
+ double x;
+ int direction;
+ int contourIndex;
+
+ static int compare(const void *a, const void *b) {
+ return sign(reinterpret_cast<const Intersection *>(a)->x-reinterpret_cast<const Intersection *>(b)->x);
+ }
+ };
+
+ const double ratio = .5*(sqrt(5)-1); // an irrational number to minimize chance of intersecting a corner or other point of interest
+ std::vector<int> orientations(contours.size());
+ std::vector<Intersection> intersections;
+ for (int i = 0; i < (int) contours.size(); ++i) {
+ if (!orientations[i] && !contours[i].edges.empty()) {
+ // Find an Y that crosses the contour
+ double y0 = contours[i].edges.front()->point(0).y;
+ double y1 = y0;
+ for (std::vector<EdgeHolder>::const_iterator edge = contours[i].edges.begin(); edge != contours[i].edges.end() && y0 == y1; ++edge)
+ y1 = (*edge)->point(1).y;
+ for (std::vector<EdgeHolder>::const_iterator edge = contours[i].edges.begin(); edge != contours[i].edges.end() && y0 == y1; ++edge)
+ y1 = (*edge)->point(ratio).y; // in case all endpoints are in a horizontal line
+ double y = mix(y0, y1, ratio);
+ // Scanline through whole shape at Y
+ double x[3];
+ int dy[3];
+ for (int j = 0; j < (int) contours.size(); ++j) {
+ for (std::vector<EdgeHolder>::const_iterator edge = contours[j].edges.begin(); edge != contours[j].edges.end(); ++edge) {
+ int n = (*edge)->scanlineIntersections(x, dy, y);
+ for (int k = 0; k < n; ++k) {
+ Intersection intersection = { x[k], dy[k], j };
+ intersections.push_back(intersection);
+ }
+ }
+ }
+ qsort(&intersections[0], intersections.size(), sizeof(Intersection), &Intersection::compare);
+ // Disqualify multiple intersections
+ for (int j = 1; j < (int) intersections.size(); ++j)
+ if (intersections[j].x == intersections[j-1].x)
+ intersections[j].direction = intersections[j-1].direction = 0;
+ // Inspect scanline and deduce orientations of intersected contours
+ for (int j = 0; j < (int) intersections.size(); ++j)
+ if (intersections[j].direction)
+ orientations[intersections[j].contourIndex] += 2*((j&1)^(intersections[j].direction > 0))-1;
+ intersections.clear();
+ }
+ }
+ // Reverse contours that have the opposite orientation
+ for (int i = 0; i < (int) contours.size(); ++i)
+ if (orientations[i] < 0)
+ contours[i].reverse();
+}
+
+}
diff --git a/thirdparty/msdfgen/core/Shape.h b/thirdparty/msdfgen/core/Shape.h
new file mode 100644
index 0000000000..7539921ce7
--- /dev/null
+++ b/thirdparty/msdfgen/core/Shape.h
@@ -0,0 +1,55 @@
+
+#pragma once
+
+#include <vector>
+#include "Contour.h"
+#include "Scanline.h"
+
+namespace msdfgen {
+
+// Threshold of the dot product of adjacent edge directions to be considered convergent.
+#define MSDFGEN_CORNER_DOT_EPSILON .000001
+// The proportional amount by which a curve's control point will be adjusted to eliminate convergent corners.
+#define MSDFGEN_DECONVERGENCE_FACTOR .000001
+
+/// Vector shape representation.
+class Shape {
+
+public:
+ struct Bounds {
+ double l, b, r, t;
+ };
+
+ /// The list of contours the shape consists of.
+ std::vector<Contour> contours;
+ /// Specifies whether the shape uses bottom-to-top (false) or top-to-bottom (true) Y coordinates.
+ bool inverseYAxis;
+
+ Shape();
+ /// Adds a contour.
+ void addContour(const Contour &contour);
+#ifdef MSDFGEN_USE_CPP11
+ void addContour(Contour &&contour);
+#endif
+ /// Adds a blank contour and returns its reference.
+ Contour & addContour();
+ /// Normalizes the shape geometry for distance field generation.
+ void normalize();
+ /// Performs basic checks to determine if the object represents a valid shape.
+ bool validate() const;
+ /// Adjusts the bounding box to fit the shape.
+ void bound(double &l, double &b, double &r, double &t) const;
+ /// Adjusts the bounding box to fit the shape border's mitered corners.
+ void boundMiters(double &l, double &b, double &r, double &t, double border, double miterLimit, int polarity) const;
+ /// Computes the minimum bounding box that fits the shape, optionally with a (mitered) border.
+ Bounds getBounds(double border = 0, double miterLimit = 0, int polarity = 0) const;
+ /// Outputs the scanline that intersects the shape at y.
+ void scanline(Scanline &line, double y) const;
+ /// Returns the total number of edge segments
+ int edgeCount() const;
+ /// Assumes its contours are unoriented (even-odd fill rule). Attempts to orient them to conform to the non-zero winding rule.
+ void orientContours();
+
+};
+
+}
diff --git a/thirdparty/msdfgen/core/ShapeDistanceFinder.h b/thirdparty/msdfgen/core/ShapeDistanceFinder.h
new file mode 100644
index 0000000000..57df8d8e72
--- /dev/null
+++ b/thirdparty/msdfgen/core/ShapeDistanceFinder.h
@@ -0,0 +1,37 @@
+
+#pragma once
+
+#include <vector>
+#include "Vector2.h"
+#include "edge-selectors.h"
+#include "contour-combiners.h"
+
+namespace msdfgen {
+
+/// Finds the distance between a point and a Shape. ContourCombiner dictates the distance metric and its data type.
+template <class ContourCombiner>
+class ShapeDistanceFinder {
+
+public:
+ typedef typename ContourCombiner::DistanceType DistanceType;
+
+ // Passed shape object must persist until the distance finder is destroyed!
+ explicit ShapeDistanceFinder(const Shape &shape);
+ /// Finds the distance from origin. Not thread-safe! Is fastest when subsequent queries are close together.
+ DistanceType distance(const Point2 &origin);
+
+ /// Finds the distance between shape and origin. Does not allocate result cache used to optimize performance of multiple queries.
+ static DistanceType oneShotDistance(const Shape &shape, const Point2 &origin);
+
+private:
+ const Shape &shape;
+ ContourCombiner contourCombiner;
+ std::vector<typename ContourCombiner::EdgeSelectorType::EdgeCache> shapeEdgeCache;
+
+};
+
+typedef ShapeDistanceFinder<SimpleContourCombiner<TrueDistanceSelector> > SimpleTrueShapeDistanceFinder;
+
+}
+
+#include "ShapeDistanceFinder.hpp"
diff --git a/thirdparty/msdfgen/core/ShapeDistanceFinder.hpp b/thirdparty/msdfgen/core/ShapeDistanceFinder.hpp
new file mode 100644
index 0000000000..028738e5c3
--- /dev/null
+++ b/thirdparty/msdfgen/core/ShapeDistanceFinder.hpp
@@ -0,0 +1,56 @@
+
+#include "ShapeDistanceFinder.h"
+
+namespace msdfgen {
+
+template <class ContourCombiner>
+ShapeDistanceFinder<ContourCombiner>::ShapeDistanceFinder(const Shape &shape) : shape(shape), contourCombiner(shape), shapeEdgeCache(shape.edgeCount()) { }
+
+template <class ContourCombiner>
+typename ShapeDistanceFinder<ContourCombiner>::DistanceType ShapeDistanceFinder<ContourCombiner>::distance(const Point2 &origin) {
+ contourCombiner.reset(origin);
+ typename ContourCombiner::EdgeSelectorType::EdgeCache *edgeCache = &shapeEdgeCache[0];
+
+ for (std::vector<Contour>::const_iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour) {
+ if (!contour->edges.empty()) {
+ typename ContourCombiner::EdgeSelectorType &edgeSelector = contourCombiner.edgeSelector(int(contour-shape.contours.begin()));
+
+ const EdgeSegment *prevEdge = contour->edges.size() >= 2 ? *(contour->edges.end()-2) : *contour->edges.begin();
+ const EdgeSegment *curEdge = contour->edges.back();
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge) {
+ const EdgeSegment *nextEdge = *edge;
+ edgeSelector.addEdge(*edgeCache++, prevEdge, curEdge, nextEdge);
+ prevEdge = curEdge;
+ curEdge = nextEdge;
+ }
+ }
+ }
+
+ return contourCombiner.distance();
+}
+
+template <class ContourCombiner>
+typename ShapeDistanceFinder<ContourCombiner>::DistanceType ShapeDistanceFinder<ContourCombiner>::oneShotDistance(const Shape &shape, const Point2 &origin) {
+ ContourCombiner contourCombiner(shape);
+ contourCombiner.reset(origin);
+
+ for (std::vector<Contour>::const_iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour) {
+ if (!contour->edges.empty()) {
+ typename ContourCombiner::EdgeSelectorType &edgeSelector = contourCombiner.edgeSelector(int(contour-shape.contours.begin()));
+
+ const EdgeSegment *prevEdge = contour->edges.size() >= 2 ? *(contour->edges.end()-2) : *contour->edges.begin();
+ const EdgeSegment *curEdge = contour->edges.back();
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge) {
+ const EdgeSegment *nextEdge = *edge;
+ typename ContourCombiner::EdgeSelectorType::EdgeCache dummy;
+ edgeSelector.addEdge(dummy, prevEdge, curEdge, nextEdge);
+ prevEdge = curEdge;
+ curEdge = nextEdge;
+ }
+ }
+ }
+
+ return contourCombiner.distance();
+}
+
+}
diff --git a/thirdparty/msdfgen/core/SignedDistance.cpp b/thirdparty/msdfgen/core/SignedDistance.cpp
new file mode 100644
index 0000000000..18c9d2c424
--- /dev/null
+++ b/thirdparty/msdfgen/core/SignedDistance.cpp
@@ -0,0 +1,30 @@
+
+#include "SignedDistance.h"
+
+#include <cmath>
+
+namespace msdfgen {
+
+const SignedDistance SignedDistance::INFINITE(-1e240, 1);
+
+SignedDistance::SignedDistance() : distance(-1e240), dot(1) { }
+
+SignedDistance::SignedDistance(double dist, double d) : distance(dist), dot(d) { }
+
+bool operator<(SignedDistance a, SignedDistance b) {
+ return fabs(a.distance) < fabs(b.distance) || (fabs(a.distance) == fabs(b.distance) && a.dot < b.dot);
+}
+
+bool operator>(SignedDistance a, SignedDistance b) {
+ return fabs(a.distance) > fabs(b.distance) || (fabs(a.distance) == fabs(b.distance) && a.dot > b.dot);
+}
+
+bool operator<=(SignedDistance a, SignedDistance b) {
+ return fabs(a.distance) < fabs(b.distance) || (fabs(a.distance) == fabs(b.distance) && a.dot <= b.dot);
+}
+
+bool operator>=(SignedDistance a, SignedDistance b) {
+ return fabs(a.distance) > fabs(b.distance) || (fabs(a.distance) == fabs(b.distance) && a.dot >= b.dot);
+}
+
+}
diff --git a/thirdparty/msdfgen/core/SignedDistance.h b/thirdparty/msdfgen/core/SignedDistance.h
new file mode 100644
index 0000000000..034210f751
--- /dev/null
+++ b/thirdparty/msdfgen/core/SignedDistance.h
@@ -0,0 +1,25 @@
+
+#pragma once
+
+namespace msdfgen {
+
+/// Represents a signed distance and alignment, which together can be compared to uniquely determine the closest edge segment.
+class SignedDistance {
+
+public:
+ static const SignedDistance INFINITE;
+
+ double distance;
+ double dot;
+
+ SignedDistance();
+ SignedDistance(double dist, double d);
+
+ friend bool operator<(SignedDistance a, SignedDistance b);
+ friend bool operator>(SignedDistance a, SignedDistance b);
+ friend bool operator<=(SignedDistance a, SignedDistance b);
+ friend bool operator>=(SignedDistance a, SignedDistance b);
+
+};
+
+}
diff --git a/thirdparty/msdfgen/core/Vector2.cpp b/thirdparty/msdfgen/core/Vector2.cpp
new file mode 100644
index 0000000000..896963ff2c
--- /dev/null
+++ b/thirdparty/msdfgen/core/Vector2.cpp
@@ -0,0 +1,146 @@
+
+#include "Vector2.h"
+
+namespace msdfgen {
+
+Vector2::Vector2(double val) : x(val), y(val) { }
+
+Vector2::Vector2(double x, double y) : x(x), y(y) { }
+
+void Vector2::reset() {
+ x = 0, y = 0;
+}
+
+void Vector2::set(double x, double y) {
+ Vector2::x = x, Vector2::y = y;
+}
+
+double Vector2::length() const {
+ return sqrt(x*x+y*y);
+}
+
+double Vector2::direction() const {
+ return atan2(y, x);
+}
+
+Vector2 Vector2::normalize(bool allowZero) const {
+ double len = length();
+ if (len == 0)
+ return Vector2(0, !allowZero);
+ return Vector2(x/len, y/len);
+}
+
+Vector2 Vector2::getOrthogonal(bool polarity) const {
+ return polarity ? Vector2(-y, x) : Vector2(y, -x);
+}
+
+Vector2 Vector2::getOrthonormal(bool polarity, bool allowZero) const {
+ double len = length();
+ if (len == 0)
+ return polarity ? Vector2(0, !allowZero) : Vector2(0, -!allowZero);
+ return polarity ? Vector2(-y/len, x/len) : Vector2(y/len, -x/len);
+}
+
+Vector2 Vector2::project(const Vector2 &vector, bool positive) const {
+ Vector2 n = normalize(true);
+ double t = dotProduct(vector, n);
+ if (positive && t <= 0)
+ return Vector2();
+ return t*n;
+}
+
+Vector2::operator const void*() const {
+ return x || y ? this : NULL;
+}
+
+bool Vector2::operator!() const {
+ return !x && !y;
+}
+
+bool Vector2::operator==(const Vector2 &other) const {
+ return x == other.x && y == other.y;
+}
+
+bool Vector2::operator!=(const Vector2 &other) const {
+ return x != other.x || y != other.y;
+}
+
+Vector2 Vector2::operator+() const {
+ return *this;
+}
+
+Vector2 Vector2::operator-() const {
+ return Vector2(-x, -y);
+}
+
+Vector2 Vector2::operator+(const Vector2 &other) const {
+ return Vector2(x+other.x, y+other.y);
+}
+
+Vector2 Vector2::operator-(const Vector2 &other) const {
+ return Vector2(x-other.x, y-other.y);
+}
+
+Vector2 Vector2::operator*(const Vector2 &other) const {
+ return Vector2(x*other.x, y*other.y);
+}
+
+Vector2 Vector2::operator/(const Vector2 &other) const {
+ return Vector2(x/other.x, y/other.y);
+}
+
+Vector2 Vector2::operator*(double value) const {
+ return Vector2(x*value, y*value);
+}
+
+Vector2 Vector2::operator/(double value) const {
+ return Vector2(x/value, y/value);
+}
+
+Vector2 & Vector2::operator+=(const Vector2 &other) {
+ x += other.x, y += other.y;
+ return *this;
+}
+
+Vector2 & Vector2::operator-=(const Vector2 &other) {
+ x -= other.x, y -= other.y;
+ return *this;
+}
+
+Vector2 & Vector2::operator*=(const Vector2 &other) {
+ x *= other.x, y *= other.y;
+ return *this;
+}
+
+Vector2 & Vector2::operator/=(const Vector2 &other) {
+ x /= other.x, y /= other.y;
+ return *this;
+}
+
+Vector2 & Vector2::operator*=(double value) {
+ x *= value, y *= value;
+ return *this;
+}
+
+Vector2 & Vector2::operator/=(double value) {
+ x /= value, y /= value;
+ return *this;
+}
+
+double dotProduct(const Vector2 &a, const Vector2 &b) {
+ return a.x*b.x+a.y*b.y;
+}
+
+double crossProduct(const Vector2 &a, const Vector2 &b) {
+ return a.x*b.y-a.y*b.x;
+}
+
+Vector2 operator*(double value, const Vector2 &vector) {
+ return Vector2(value*vector.x, value*vector.y);
+}
+
+Vector2 operator/(double value, const Vector2 &vector) {
+ return Vector2(value/vector.x, value/vector.y);
+}
+
+}
diff --git a/thirdparty/msdfgen/core/Vector2.h b/thirdparty/msdfgen/core/Vector2.h
new file mode 100644
index 0000000000..47ca637c3d
--- /dev/null
+++ b/thirdparty/msdfgen/core/Vector2.h
@@ -0,0 +1,66 @@
+
+#pragma once
+
+#include <cstdlib>
+#include <cmath>
+
+namespace msdfgen {
+
+/**
+* A 2-dimensional euclidean vector with double precision.
+* Implementation based on the Vector2 template from Artery Engine.
+* @author Viktor Chlumsky
+*/
+struct Vector2 {
+
+ double x, y;
+
+ Vector2(double val = 0);
+ Vector2(double x, double y);
+ /// Sets the vector to zero.
+ void reset();
+ /// Sets individual elements of the vector.
+ void set(double x, double y);
+ /// Returns the vector's length.
+ double length() const;
+ /// Returns the angle of the vector in radians (atan2).
+ double direction() const;
+ /// Returns the normalized vector - one that has the same direction but unit length.
+ Vector2 normalize(bool allowZero = false) const;
+ /// Returns a vector with the same length that is orthogonal to this one.
+ Vector2 getOrthogonal(bool polarity = true) const;
+ /// Returns a vector with unit length that is orthogonal to this one.
+ Vector2 getOrthonormal(bool polarity = true, bool allowZero = false) const;
+ /// Returns a vector projected along this one.
+ Vector2 project(const Vector2 &vector, bool positive = false) const;
+ operator const void *() const;
+ bool operator!() const;
+ bool operator==(const Vector2 &other) const;
+ bool operator!=(const Vector2 &other) const;
+ Vector2 operator+() const;
+ Vector2 operator-() const;
+ Vector2 operator+(const Vector2 &other) const;
+ Vector2 operator-(const Vector2 &other) const;
+ Vector2 operator*(const Vector2 &other) const;
+ Vector2 operator/(const Vector2 &other) const;
+ Vector2 operator*(double value) const;
+ Vector2 operator/(double value) const;
+ Vector2 & operator+=(const Vector2 &other);
+ Vector2 & operator-=(const Vector2 &other);
+ Vector2 & operator*=(const Vector2 &other);
+ Vector2 & operator/=(const Vector2 &other);
+ Vector2 & operator*=(double value);
+ Vector2 & operator/=(double value);
+ /// Dot product of two vectors.
+ friend double dotProduct(const Vector2 &a, const Vector2 &b);
+ /// A special version of the cross product for 2D vectors (returns scalar value).
+ friend double crossProduct(const Vector2 &a, const Vector2 &b);
+ friend Vector2 operator*(double value, const Vector2 &vector);
+ friend Vector2 operator/(double value, const Vector2 &vector);
+
+};
+
+/// A vector may also represent a point, which shall be differentiated semantically using the alias Point2.
+typedef Vector2 Point2;
+
+}
diff --git a/thirdparty/msdfgen/core/arithmetics.hpp b/thirdparty/msdfgen/core/arithmetics.hpp
new file mode 100644
index 0000000000..78c21d658e
--- /dev/null
+++ b/thirdparty/msdfgen/core/arithmetics.hpp
@@ -0,0 +1,63 @@
+
+#pragma once
+
+#include <cstdlib>
+#include <cmath>
+
+namespace msdfgen {
+
+/// Returns the smaller of the arguments.
+template <typename T>
+inline T min(T a, T b) {
+ return b < a ? b : a;
+}
+
+/// Returns the larger of the arguments.
+template <typename T>
+inline T max(T a, T b) {
+ return a < b ? b : a;
+}
+
+/// Returns the middle out of three values
+template <typename T>
+inline T median(T a, T b, T c) {
+ return max(min(a, b), min(max(a, b), c));
+}
+
+/// Returns the weighted average of a and b.
+template <typename T, typename S>
+inline T mix(T a, T b, S weight) {
+ return T((S(1)-weight)*a+weight*b);
+}
+
+/// Clamps the number to the interval from 0 to 1.
+template <typename T>
+inline T clamp(T n) {
+ return n >= T(0) && n <= T(1) ? n : T(n > T(0));
+}
+
+/// Clamps the number to the interval from 0 to b.
+template <typename T>
+inline T clamp(T n, T b) {
+ return n >= T(0) && n <= b ? n : T(n > T(0))*b;
+}
+
+/// Clamps the number to the interval from a to b.
+template <typename T>
+inline T clamp(T n, T a, T b) {
+ return n >= a && n <= b ? n : n < a ? a : b;
+}
+
+/// Returns 1 for positive values, -1 for negative values, and 0 for zero.
+template <typename T>
+inline int sign(T n) {
+ return (T(0) < n)-(n < T(0));
+}
+
+/// Returns 1 for non-negative values and -1 for negative values.
+template <typename T>
+inline int nonZeroSign(T n) {
+ return 2*(n > T(0))-1;
+}
+
+}
diff --git a/thirdparty/msdfgen/core/bitmap-interpolation.hpp b/thirdparty/msdfgen/core/bitmap-interpolation.hpp
new file mode 100644
index 0000000000..a14b0fb534
--- /dev/null
+++ b/thirdparty/msdfgen/core/bitmap-interpolation.hpp
@@ -0,0 +1,25 @@
+
+#pragma once
+
+#include "arithmetics.hpp"
+#include "Vector2.h"
+#include "BitmapRef.hpp"
+
+namespace msdfgen {
+
+template <typename T, int N>
+static void interpolate(T *output, const BitmapConstRef<T, N> &bitmap, Point2 pos) {
+ pos -= .5;
+ int l = (int) floor(pos.x);
+ int b = (int) floor(pos.y);
+ int r = l+1;
+ int t = b+1;
+ double lr = pos.x-l;
+ double bt = pos.y-b;
+ l = clamp(l, bitmap.width-1), r = clamp(r, bitmap.width-1);
+ b = clamp(b, bitmap.height-1), t = clamp(t, bitmap.height-1);
+ for (int i = 0; i < N; ++i)
+ output[i] = mix(mix(bitmap(l, b)[i], bitmap(r, b)[i], lr), mix(bitmap(l, t)[i], bitmap(r, t)[i], lr), bt);
+}
+
+}
diff --git a/thirdparty/msdfgen/core/contour-combiners.cpp b/thirdparty/msdfgen/core/contour-combiners.cpp
new file mode 100644
index 0000000000..d0c5b46d74
--- /dev/null
+++ b/thirdparty/msdfgen/core/contour-combiners.cpp
@@ -0,0 +1,133 @@
+
+#include "contour-combiners.h"
+
+#include "arithmetics.hpp"
+
+namespace msdfgen {
+
+static void initDistance(double &distance) {
+ distance = SignedDistance::INFINITE.distance;
+}
+
+static void initDistance(MultiDistance &distance) {
+ distance.r = SignedDistance::INFINITE.distance;
+ distance.g = SignedDistance::INFINITE.distance;
+ distance.b = SignedDistance::INFINITE.distance;
+}
+
+static double resolveDistance(double distance) {
+ return distance;
+}
+
+static double resolveDistance(const MultiDistance &distance) {
+ return median(distance.r, distance.g, distance.b);
+}
+
+template <class EdgeSelector>
+SimpleContourCombiner<EdgeSelector>::SimpleContourCombiner(const Shape &shape) { }
+
+template <class EdgeSelector>
+void SimpleContourCombiner<EdgeSelector>::reset(const Point2 &p) {
+ shapeEdgeSelector.reset(p);
+}
+
+template <class EdgeSelector>
+EdgeSelector & SimpleContourCombiner<EdgeSelector>::edgeSelector(int) {
+ return shapeEdgeSelector;
+}
+
+template <class EdgeSelector>
+typename SimpleContourCombiner<EdgeSelector>::DistanceType SimpleContourCombiner<EdgeSelector>::distance() const {
+ return shapeEdgeSelector.distance();
+}
+
+template class SimpleContourCombiner<TrueDistanceSelector>;
+template class SimpleContourCombiner<PseudoDistanceSelector>;
+template class SimpleContourCombiner<MultiDistanceSelector>;
+template class SimpleContourCombiner<MultiAndTrueDistanceSelector>;
+
+template <class EdgeSelector>
+OverlappingContourCombiner<EdgeSelector>::OverlappingContourCombiner(const Shape &shape) {
+ windings.reserve(shape.contours.size());
+ for (std::vector<Contour>::const_iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour)
+ windings.push_back(contour->winding());
+ edgeSelectors.resize(shape.contours.size());
+}
+
+template <class EdgeSelector>
+void OverlappingContourCombiner<EdgeSelector>::reset(const Point2 &p) {
+ this->p = p;
+ for (typename std::vector<EdgeSelector>::iterator contourEdgeSelector = edgeSelectors.begin(); contourEdgeSelector != edgeSelectors.end(); ++contourEdgeSelector)
+ contourEdgeSelector->reset(p);
+}
+
+template <class EdgeSelector>
+EdgeSelector & OverlappingContourCombiner<EdgeSelector>::edgeSelector(int i) {
+ return edgeSelectors[i];
+}
+
+template <class EdgeSelector>
+typename OverlappingContourCombiner<EdgeSelector>::DistanceType OverlappingContourCombiner<EdgeSelector>::distance() const {
+ int contourCount = (int) edgeSelectors.size();
+ EdgeSelector shapeEdgeSelector;
+ EdgeSelector innerEdgeSelector;
+ EdgeSelector outerEdgeSelector;
+ shapeEdgeSelector.reset(p);
+ innerEdgeSelector.reset(p);
+ outerEdgeSelector.reset(p);
+ for (int i = 0; i < contourCount; ++i) {
+ DistanceType edgeDistance = edgeSelectors[i].distance();
+ shapeEdgeSelector.merge(edgeSelectors[i]);
+ if (windings[i] > 0 && resolveDistance(edgeDistance) >= 0)
+ innerEdgeSelector.merge(edgeSelectors[i]);
+ if (windings[i] < 0 && resolveDistance(edgeDistance) <= 0)
+ outerEdgeSelector.merge(edgeSelectors[i]);
+ }
+
+ DistanceType shapeDistance = shapeEdgeSelector.distance();
+ DistanceType innerDistance = innerEdgeSelector.distance();
+ DistanceType outerDistance = outerEdgeSelector.distance();
+ double innerScalarDistance = resolveDistance(innerDistance);
+ double outerScalarDistance = resolveDistance(outerDistance);
+ DistanceType distance;
+ initDistance(distance);
+
+ int winding = 0;
+ if (innerScalarDistance >= 0 && fabs(innerScalarDistance) <= fabs(outerScalarDistance)) {
+ distance = innerDistance;
+ winding = 1;
+ for (int i = 0; i < contourCount; ++i)
+ if (windings[i] > 0) {
+ DistanceType contourDistance = edgeSelectors[i].distance();
+ if (fabs(resolveDistance(contourDistance)) < fabs(outerScalarDistance) && resolveDistance(contourDistance) > resolveDistance(distance))
+ distance = contourDistance;
+ }
+ } else if (outerScalarDistance <= 0 && fabs(outerScalarDistance) < fabs(innerScalarDistance)) {
+ distance = outerDistance;
+ winding = -1;
+ for (int i = 0; i < contourCount; ++i)
+ if (windings[i] < 0) {
+ DistanceType contourDistance = edgeSelectors[i].distance();
+ if (fabs(resolveDistance(contourDistance)) < fabs(innerScalarDistance) && resolveDistance(contourDistance) < resolveDistance(distance))
+ distance = contourDistance;
+ }
+ } else
+ return shapeDistance;
+
+ for (int i = 0; i < contourCount; ++i)
+ if (windings[i] != winding) {
+ DistanceType contourDistance = edgeSelectors[i].distance();
+ if (resolveDistance(contourDistance)*resolveDistance(distance) >= 0 && fabs(resolveDistance(contourDistance)) < fabs(resolveDistance(distance)))
+ distance = contourDistance;
+ }
+ if (resolveDistance(distance) == resolveDistance(shapeDistance))
+ distance = shapeDistance;
+ return distance;
+}
+
+template class OverlappingContourCombiner<TrueDistanceSelector>;
+template class OverlappingContourCombiner<PseudoDistanceSelector>;
+template class OverlappingContourCombiner<MultiDistanceSelector>;
+template class OverlappingContourCombiner<MultiAndTrueDistanceSelector>;
+
+}
diff --git a/thirdparty/msdfgen/core/contour-combiners.h b/thirdparty/msdfgen/core/contour-combiners.h
new file mode 100644
index 0000000000..944b119aba
--- /dev/null
+++ b/thirdparty/msdfgen/core/contour-combiners.h
@@ -0,0 +1,47 @@
+
+#pragma once
+
+#include "Shape.h"
+#include "edge-selectors.h"
+
+namespace msdfgen {
+
+/// Simply selects the nearest contour.
+template <class EdgeSelector>
+class SimpleContourCombiner {
+
+public:
+ typedef EdgeSelector EdgeSelectorType;
+ typedef typename EdgeSelector::DistanceType DistanceType;
+
+ explicit SimpleContourCombiner(const Shape &shape);
+ void reset(const Point2 &p);
+ EdgeSelector & edgeSelector(int i);
+ DistanceType distance() const;
+
+private:
+ EdgeSelector shapeEdgeSelector;
+
+};
+
+/// Selects the nearest contour that actually forms a border between filled and unfilled area.
+template <class EdgeSelector>
+class OverlappingContourCombiner {
+
+public:
+ typedef EdgeSelector EdgeSelectorType;
+ typedef typename EdgeSelector::DistanceType DistanceType;
+
+ explicit OverlappingContourCombiner(const Shape &shape);
+ void reset(const Point2 &p);
+ EdgeSelector & edgeSelector(int i);
+ DistanceType distance() const;
+
+private:
+ Point2 p;
+ std::vector<int> windings;
+ std::vector<EdgeSelector> edgeSelectors;
+
+};
+
+}
diff --git a/thirdparty/msdfgen/core/edge-coloring.cpp b/thirdparty/msdfgen/core/edge-coloring.cpp
new file mode 100644
index 0000000000..370f9aa38d
--- /dev/null
+++ b/thirdparty/msdfgen/core/edge-coloring.cpp
@@ -0,0 +1,499 @@
+
+#include "edge-coloring.h"
+
+#include <cstdlib>
+#include <cmath>
+#include <cstring>
+#include <queue>
+#include "arithmetics.hpp"
+
+namespace msdfgen {
+
+static bool isCorner(const Vector2 &aDir, const Vector2 &bDir, double crossThreshold) {
+ return dotProduct(aDir, bDir) <= 0 || fabs(crossProduct(aDir, bDir)) > crossThreshold;
+}
+
+static double estimateEdgeLength(const EdgeSegment *edge) {
+ double len = 0;
+ Point2 prev = edge->point(0);
+ for (int i = 1; i <= MSDFGEN_EDGE_LENGTH_PRECISION; ++i) {
+ Point2 cur = edge->point(1./MSDFGEN_EDGE_LENGTH_PRECISION*i);
+ len += (cur-prev).length();
+ prev = cur;
+ }
+ return len;
+}
+
+static void switchColor(EdgeColor &color, unsigned long long &seed, EdgeColor banned = BLACK) {
+ EdgeColor combined = EdgeColor(color&banned);
+ if (combined == RED || combined == GREEN || combined == BLUE) {
+ color = EdgeColor(combined^WHITE);
+ return;
+ }
+ if (color == BLACK || color == WHITE) {
+ static const EdgeColor start[3] = { CYAN, MAGENTA, YELLOW };
+ color = start[seed%3];
+ seed /= 3;
+ return;
+ }
+ int shifted = color<<(1+(seed&1));
+ color = EdgeColor((shifted|shifted>>3)&WHITE);
+ seed >>= 1;
+}
+
+void edgeColoringSimple(Shape &shape, double angleThreshold, unsigned long long seed) {
+ double crossThreshold = sin(angleThreshold);
+ std::vector<int> corners;
+ for (std::vector<Contour>::iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour) {
+ // Identify corners
+ corners.clear();
+ if (!contour->edges.empty()) {
+ Vector2 prevDirection = contour->edges.back()->direction(1);
+ int index = 0;
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge, ++index) {
+ if (isCorner(prevDirection.normalize(), (*edge)->direction(0).normalize(), crossThreshold))
+ corners.push_back(index);
+ prevDirection = (*edge)->direction(1);
+ }
+ }
+
+ // Smooth contour
+ if (corners.empty())
+ for (std::vector<EdgeHolder>::iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge)
+ (*edge)->color = WHITE;
+ // "Teardrop" case
+ else if (corners.size() == 1) {
+ EdgeColor colors[3] = { WHITE, WHITE };
+ switchColor(colors[0], seed);
+ switchColor(colors[2] = colors[0], seed);
+ int corner = corners[0];
+ if (contour->edges.size() >= 3) {
+ int m = (int) contour->edges.size();
+ for (int i = 0; i < m; ++i)
+ contour->edges[(corner+i)%m]->color = (colors+1)[int(3+2.875*i/(m-1)-1.4375+.5)-3];
+ } else if (contour->edges.size() >= 1) {
+ // Less than three edge segments for three colors => edges must be split
+ EdgeSegment *parts[7] = { };
+ contour->edges[0]->splitInThirds(parts[0+3*corner], parts[1+3*corner], parts[2+3*corner]);
+ if (contour->edges.size() >= 2) {
+ contour->edges[1]->splitInThirds(parts[3-3*corner], parts[4-3*corner], parts[5-3*corner]);
+ parts[0]->color = parts[1]->color = colors[0];
+ parts[2]->color = parts[3]->color = colors[1];
+ parts[4]->color = parts[5]->color = colors[2];
+ } else {
+ parts[0]->color = colors[0];
+ parts[1]->color = colors[1];
+ parts[2]->color = colors[2];
+ }
+ contour->edges.clear();
+ for (int i = 0; parts[i]; ++i)
+ contour->edges.push_back(EdgeHolder(parts[i]));
+ }
+ }
+ // Multiple corners
+ else {
+ int cornerCount = (int) corners.size();
+ int spline = 0;
+ int start = corners[0];
+ int m = (int) contour->edges.size();
+ EdgeColor color = WHITE;
+ switchColor(color, seed);
+ EdgeColor initialColor = color;
+ for (int i = 0; i < m; ++i) {
+ int index = (start+i)%m;
+ if (spline+1 < cornerCount && corners[spline+1] == index) {
+ ++spline;
+ switchColor(color, seed, EdgeColor((spline == cornerCount-1)*initialColor));
+ }
+ contour->edges[index]->color = color;
+ }
+ }
+ }
+}
+
+struct EdgeColoringInkTrapCorner {
+ int index;
+ double prevEdgeLengthEstimate;
+ bool minor;
+ EdgeColor color;
+};
+
+void edgeColoringInkTrap(Shape &shape, double angleThreshold, unsigned long long seed) {
+ typedef EdgeColoringInkTrapCorner Corner;
+ double crossThreshold = sin(angleThreshold);
+ std::vector<Corner> corners;
+ for (std::vector<Contour>::iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour) {
+ // Identify corners
+ double splineLength = 0;
+ corners.clear();
+ if (!contour->edges.empty()) {
+ Vector2 prevDirection = contour->edges.back()->direction(1);
+ int index = 0;
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge, ++index) {
+ if (isCorner(prevDirection.normalize(), (*edge)->direction(0).normalize(), crossThreshold)) {
+ Corner corner = { index, splineLength };
+ corners.push_back(corner);
+ splineLength = 0;
+ }
+ splineLength += estimateEdgeLength(*edge);
+ prevDirection = (*edge)->direction(1);
+ }
+ }
+
+ // Smooth contour
+ if (corners.empty())
+ for (std::vector<EdgeHolder>::iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge)
+ (*edge)->color = WHITE;
+ // "Teardrop" case
+ else if (corners.size() == 1) {
+ EdgeColor colors[3] = { WHITE, WHITE };
+ switchColor(colors[0], seed);
+ switchColor(colors[2] = colors[0], seed);
+ int corner = corners[0].index;
+ if (contour->edges.size() >= 3) {
+ int m = (int) contour->edges.size();
+ for (int i = 0; i < m; ++i)
+ contour->edges[(corner+i)%m]->color = (colors+1)[int(3+2.875*i/(m-1)-1.4375+.5)-3];
+ } else if (contour->edges.size() >= 1) {
+ // Less than three edge segments for three colors => edges must be split
+ EdgeSegment *parts[7] = { };
+ contour->edges[0]->splitInThirds(parts[0+3*corner], parts[1+3*corner], parts[2+3*corner]);
+ if (contour->edges.size() >= 2) {
+ contour->edges[1]->splitInThirds(parts[3-3*corner], parts[4-3*corner], parts[5-3*corner]);
+ parts[0]->color = parts[1]->color = colors[0];
+ parts[2]->color = parts[3]->color = colors[1];
+ parts[4]->color = parts[5]->color = colors[2];
+ } else {
+ parts[0]->color = colors[0];
+ parts[1]->color = colors[1];
+ parts[2]->color = colors[2];
+ }
+ contour->edges.clear();
+ for (int i = 0; parts[i]; ++i)
+ contour->edges.push_back(EdgeHolder(parts[i]));
+ }
+ }
+ // Multiple corners
+ else {
+ int cornerCount = (int) corners.size();
+ int majorCornerCount = cornerCount;
+ if (cornerCount > 3) {
+ corners.begin()->prevEdgeLengthEstimate += splineLength;
+ for (int i = 0; i < cornerCount; ++i) {
+ if (
+ corners[i].prevEdgeLengthEstimate > corners[(i+1)%cornerCount].prevEdgeLengthEstimate &&
+ corners[(i+1)%cornerCount].prevEdgeLengthEstimate < corners[(i+2)%cornerCount].prevEdgeLengthEstimate
+ ) {
+ corners[i].minor = true;
+ --majorCornerCount;
+ }
+ }
+ }
+ EdgeColor color = WHITE;
+ EdgeColor initialColor = BLACK;
+ for (int i = 0; i < cornerCount; ++i) {
+ if (!corners[i].minor) {
+ --majorCornerCount;
+ switchColor(color, seed, EdgeColor(!majorCornerCount*initialColor));
+ corners[i].color = color;
+ if (!initialColor)
+ initialColor = color;
+ }
+ }
+ for (int i = 0; i < cornerCount; ++i) {
+ if (corners[i].minor) {
+ EdgeColor nextColor = corners[(i+1)%cornerCount].color;
+ corners[i].color = EdgeColor((color&nextColor)^WHITE);
+ } else
+ color = corners[i].color;
+ }
+ int spline = 0;
+ int start = corners[0].index;
+ color = corners[0].color;
+ int m = (int) contour->edges.size();
+ for (int i = 0; i < m; ++i) {
+ int index = (start+i)%m;
+ if (spline+1 < cornerCount && corners[spline+1].index == index)
+ color = corners[++spline].color;
+ contour->edges[index]->color = color;
+ }
+ }
+ }
+}
+
+// EDGE COLORING BY DISTANCE - EXPERIMENTAL IMPLEMENTATION - WORK IN PROGRESS
+#define MAX_RECOLOR_STEPS 16
+#define EDGE_DISTANCE_PRECISION 16
+
+static double edgeToEdgeDistance(const EdgeSegment &a, const EdgeSegment &b, int precision) {
+ if (a.point(0) == b.point(0) || a.point(0) == b.point(1) || a.point(1) == b.point(0) || a.point(1) == b.point(1))
+ return 0;
+ double iFac = 1./precision;
+ double minDistance = (b.point(0)-a.point(0)).length();
+ for (int i = 0; i <= precision; ++i) {
+ double t = iFac*i;
+ double d = fabs(a.signedDistance(b.point(t), t).distance);
+ minDistance = min(minDistance, d);
+ }
+ for (int i = 0; i <= precision; ++i) {
+ double t = iFac*i;
+ double d = fabs(b.signedDistance(a.point(t), t).distance);
+ minDistance = min(minDistance, d);
+ }
+ return minDistance;
+}
+
+static double splineToSplineDistance(EdgeSegment * const *edgeSegments, int aStart, int aEnd, int bStart, int bEnd, int precision) {
+ double minDistance = fabs(SignedDistance::INFINITE.distance);
+ for (int ai = aStart; ai < aEnd; ++ai)
+ for (int bi = bStart; bi < bEnd && minDistance; ++bi) {
+ double d = edgeToEdgeDistance(*edgeSegments[ai], *edgeSegments[bi], precision);
+ minDistance = min(minDistance, d);
+ }
+ return minDistance;
+}
+
+static void colorSecondDegreeGraph(int *coloring, const int * const *edgeMatrix, int vertexCount, unsigned long long seed) {
+ for (int i = 0; i < vertexCount; ++i) {
+ int possibleColors = 7;
+ for (int j = 0; j < i; ++j) {
+ if (edgeMatrix[i][j])
+ possibleColors &= ~(1<<coloring[j]);
+ }
+ int color = 0;
+ switch (possibleColors) {
+ case 1:
+ color = 0;
+ break;
+ case 2:
+ color = 1;
+ break;
+ case 3:
+ color = (int) seed&1;
+ seed >>= 1;
+ break;
+ case 4:
+ color = 2;
+ break;
+ case 5:
+ color = ((int) seed+1&1)<<1;
+ seed >>= 1;
+ break;
+ case 6:
+ color = ((int) seed&1)+1;
+ seed >>= 1;
+ break;
+ case 7:
+ color = int((seed+i)%3);
+ seed /= 3;
+ break;
+ }
+ coloring[i] = color;
+ }
+}
+
+static int vertexPossibleColors(const int *coloring, const int *edgeVector, int vertexCount) {
+ int usedColors = 0;
+ for (int i = 0; i < vertexCount; ++i)
+ if (edgeVector[i])
+ usedColors |= 1<<coloring[i];
+ return 7&~usedColors;
+}
+
+static void uncolorSameNeighbors(std::queue<int> &uncolored, int *coloring, const int * const *edgeMatrix, int vertex, int vertexCount) {
+ for (int i = vertex+1; i < vertexCount; ++i) {
+ if (edgeMatrix[vertex][i] && coloring[i] == coloring[vertex]) {
+ coloring[i] = -1;
+ uncolored.push(i);
+ }
+ }
+ for (int i = 0; i < vertex; ++i) {
+ if (edgeMatrix[vertex][i] && coloring[i] == coloring[vertex]) {
+ coloring[i] = -1;
+ uncolored.push(i);
+ }
+ }
+}
+
+static bool tryAddEdge(int *coloring, int * const *edgeMatrix, int vertexCount, int vertexA, int vertexB, int *coloringBuffer) {
+ static const int FIRST_POSSIBLE_COLOR[8] = { -1, 0, 1, 0, 2, 2, 1, 0 };
+ edgeMatrix[vertexA][vertexB] = 1;
+ edgeMatrix[vertexB][vertexA] = 1;
+ if (coloring[vertexA] != coloring[vertexB])
+ return true;
+ int bPossibleColors = vertexPossibleColors(coloring, edgeMatrix[vertexB], vertexCount);
+ if (bPossibleColors) {
+ coloring[vertexB] = FIRST_POSSIBLE_COLOR[bPossibleColors];
+ return true;
+ }
+ memcpy(coloringBuffer, coloring, sizeof(int)*vertexCount);
+ std::queue<int> uncolored;
+ {
+ int *coloring = coloringBuffer;
+ coloring[vertexB] = FIRST_POSSIBLE_COLOR[7&~(1<<coloring[vertexA])];
+ uncolorSameNeighbors(uncolored, coloring, edgeMatrix, vertexB, vertexCount);
+ int step = 0;
+ while (!uncolored.empty() && step < MAX_RECOLOR_STEPS) {
+ int i = uncolored.front();
+ uncolored.pop();
+ int possibleColors = vertexPossibleColors(coloring, edgeMatrix[i], vertexCount);
+ if (possibleColors) {
+ coloring[i] = FIRST_POSSIBLE_COLOR[possibleColors];
+ continue;
+ }
+ do {
+ coloring[i] = step++%3;
+ } while (edgeMatrix[i][vertexA] && coloring[i] == coloring[vertexA]);
+ uncolorSameNeighbors(uncolored, coloring, edgeMatrix, i, vertexCount);
+ }
+ }
+ if (!uncolored.empty()) {
+ edgeMatrix[vertexA][vertexB] = 0;
+ edgeMatrix[vertexB][vertexA] = 0;
+ return false;
+ }
+ memcpy(coloring, coloringBuffer, sizeof(int)*vertexCount);
+ return true;
+}
+
+static int cmpDoublePtr(const void *a, const void *b) {
+ return sign(**reinterpret_cast<const double * const *>(a)-**reinterpret_cast<const double * const *>(b));
+}
+
+void edgeColoringByDistance(Shape &shape, double angleThreshold, unsigned long long seed) {
+
+ std::vector<EdgeSegment *> edgeSegments;
+ std::vector<int> splineStarts;
+
+ double crossThreshold = sin(angleThreshold);
+ std::vector<int> corners;
+ for (std::vector<Contour>::iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour)
+ if (!contour->edges.empty()) {
+ // Identify corners
+ corners.clear();
+ Vector2 prevDirection = contour->edges.back()->direction(1);
+ int index = 0;
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge, ++index) {
+ if (isCorner(prevDirection.normalize(), (*edge)->direction(0).normalize(), crossThreshold))
+ corners.push_back(index);
+ prevDirection = (*edge)->direction(1);
+ }
+
+ splineStarts.push_back((int) edgeSegments.size());
+ // Smooth contour
+ if (corners.empty())
+ for (std::vector<EdgeHolder>::iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge)
+ edgeSegments.push_back(&**edge);
+ // "Teardrop" case
+ else if (corners.size() == 1) {
+ int corner = corners[0];
+ if (contour->edges.size() >= 3) {
+ int m = (int) contour->edges.size();
+ for (int i = 0; i < m; ++i) {
+ if (i == m/2)
+ splineStarts.push_back((int) edgeSegments.size());
+ if (int(3+2.875*i/(m-1)-1.4375+.5)-3)
+ edgeSegments.push_back(&*contour->edges[(corner+i)%m]);
+ else
+ contour->edges[(corner+i)%m]->color = WHITE;
+ }
+ } else if (contour->edges.size() >= 1) {
+ // Less than three edge segments for three colors => edges must be split
+ EdgeSegment *parts[7] = { };
+ contour->edges[0]->splitInThirds(parts[0+3*corner], parts[1+3*corner], parts[2+3*corner]);
+ if (contour->edges.size() >= 2) {
+ contour->edges[1]->splitInThirds(parts[3-3*corner], parts[4-3*corner], parts[5-3*corner]);
+ edgeSegments.push_back(parts[0]);
+ edgeSegments.push_back(parts[1]);
+ parts[2]->color = parts[3]->color = WHITE;
+ splineStarts.push_back((int) edgeSegments.size());
+ edgeSegments.push_back(parts[4]);
+ edgeSegments.push_back(parts[5]);
+ } else {
+ edgeSegments.push_back(parts[0]);
+ parts[1]->color = WHITE;
+ splineStarts.push_back((int) edgeSegments.size());
+ edgeSegments.push_back(parts[2]);
+ }
+ contour->edges.clear();
+ for (int i = 0; parts[i]; ++i)
+ contour->edges.push_back(EdgeHolder(parts[i]));
+ }
+ }
+ // Multiple corners
+ else {
+ int cornerCount = (int) corners.size();
+ int spline = 0;
+ int start = corners[0];
+ int m = (int) contour->edges.size();
+ for (int i = 0; i < m; ++i) {
+ int index = (start+i)%m;
+ if (spline+1 < cornerCount && corners[spline+1] == index) {
+ splineStarts.push_back((int) edgeSegments.size());
+ ++spline;
+ }
+ edgeSegments.push_back(&*contour->edges[index]);
+ }
+ }
+ }
+ splineStarts.push_back((int) edgeSegments.size());
+
+ int segmentCount = (int) edgeSegments.size();
+ int splineCount = (int) splineStarts.size()-1;
+ if (!splineCount)
+ return;
+
+ std::vector<double> distanceMatrixStorage(splineCount*splineCount);
+ std::vector<double *> distanceMatrix(splineCount);
+ for (int i = 0; i < splineCount; ++i)
+ distanceMatrix[i] = &distanceMatrixStorage[i*splineCount];
+ const double *distanceMatrixBase = &distanceMatrixStorage[0];
+
+ for (int i = 0; i < splineCount; ++i) {
+ distanceMatrix[i][i] = -1;
+ for (int j = i+1; j < splineCount; ++j) {
+ double dist = splineToSplineDistance(&edgeSegments[0], splineStarts[i], splineStarts[i+1], splineStarts[j], splineStarts[j+1], EDGE_DISTANCE_PRECISION);
+ distanceMatrix[i][j] = dist;
+ distanceMatrix[j][i] = dist;
+ }
+ }
+
+ std::vector<const double *> graphEdgeDistances;
+ graphEdgeDistances.reserve(splineCount*(splineCount-1)/2);
+ for (int i = 0; i < splineCount; ++i)
+ for (int j = i+1; j < splineCount; ++j)
+ graphEdgeDistances.push_back(&distanceMatrix[i][j]);
+ int graphEdgeCount = (int) graphEdgeDistances.size();
+ if (!graphEdgeDistances.empty())
+ qsort(&graphEdgeDistances[0], graphEdgeDistances.size(), sizeof(const double *), &cmpDoublePtr);
+
+ std::vector<int> edgeMatrixStorage(splineCount*splineCount);
+ std::vector<int *> edgeMatrix(splineCount);
+ for (int i = 0; i < splineCount; ++i)
+ edgeMatrix[i] = &edgeMatrixStorage[i*splineCount];
+ int nextEdge = 0;
+ for (; nextEdge < graphEdgeCount && !*graphEdgeDistances[nextEdge]; ++nextEdge) {
+ int elem = graphEdgeDistances[nextEdge]-distanceMatrixBase;
+ int row = elem/splineCount;
+ int col = elem%splineCount;
+ edgeMatrix[row][col] = 1;
+ edgeMatrix[col][row] = 1;
+ }
+
+ std::vector<int> coloring(2*splineCount);
+ colorSecondDegreeGraph(&coloring[0], &edgeMatrix[0], splineCount, seed);
+ for (; nextEdge < graphEdgeCount; ++nextEdge) {
+ int elem = graphEdgeDistances[nextEdge]-distanceMatrixBase;
+ tryAddEdge(&coloring[0], &edgeMatrix[0], splineCount, elem/splineCount, elem%splineCount, &coloring[splineCount]);
+ }
+
+ const EdgeColor colors[3] = { YELLOW, CYAN, MAGENTA };
+ int spline = -1;
+ for (int i = 0; i < segmentCount; ++i) {
+ if (splineStarts[spline+1] == i)
+ ++spline;
+ edgeSegments[i]->color = colors[coloring[spline]];
+ }
+}
+
+}
diff --git a/thirdparty/msdfgen/core/edge-coloring.h b/thirdparty/msdfgen/core/edge-coloring.h
new file mode 100644
index 0000000000..ffd5e6dce8
--- /dev/null
+++ b/thirdparty/msdfgen/core/edge-coloring.h
@@ -0,0 +1,29 @@
+
+#pragma once
+
+#include "Shape.h"
+
+#define MSDFGEN_EDGE_LENGTH_PRECISION 4
+
+namespace msdfgen {
+
+/** Assigns colors to edges of the shape in accordance to the multi-channel distance field technique.
+ * May split some edges if necessary.
+ * angleThreshold specifies the maximum angle (in radians) to be considered a corner, for example 3 (~172 degrees).
+ * Values below 1/2 PI will be treated as the external angle.
+ */
+void edgeColoringSimple(Shape &shape, double angleThreshold, unsigned long long seed = 0);
+
+/** The alternative "ink trap" coloring strategy is designed for better results with typefaces
+ * that use ink traps as a design feature. It guarantees that even if all edges that are shorter than
+ * both their neighboring edges are removed, the coloring remains consistent with the established rules.
+ */
+void edgeColoringInkTrap(Shape &shape, double angleThreshold, unsigned long long seed = 0);
+
+/** The alternative coloring by distance tries to use different colors for edges that are close together.
+ * This should theoretically be the best strategy on average. However, since it needs to compute the distance
+ * between all pairs of edges, and perform a graph optimization task, it is much slower than the rest.
+ */
+void edgeColoringByDistance(Shape &shape, double angleThreshold, unsigned long long seed = 0);
+
+}
diff --git a/thirdparty/msdfgen/core/edge-segments.cpp b/thirdparty/msdfgen/core/edge-segments.cpp
new file mode 100644
index 0000000000..5274a9a5a1
--- /dev/null
+++ b/thirdparty/msdfgen/core/edge-segments.cpp
@@ -0,0 +1,504 @@
+
+#include "edge-segments.h"
+
+#include "arithmetics.hpp"
+#include "equation-solver.h"
+
+namespace msdfgen {
+
+void EdgeSegment::distanceToPseudoDistance(SignedDistance &distance, Point2 origin, double param) const {
+ if (param < 0) {
+ Vector2 dir = direction(0).normalize();
+ Vector2 aq = origin-point(0);
+ double ts = dotProduct(aq, dir);
+ if (ts < 0) {
+ double pseudoDistance = crossProduct(aq, dir);
+ if (fabs(pseudoDistance) <= fabs(distance.distance)) {
+ distance.distance = pseudoDistance;
+ distance.dot = 0;
+ }
+ }
+ } else if (param > 1) {
+ Vector2 dir = direction(1).normalize();
+ Vector2 bq = origin-point(1);
+ double ts = dotProduct(bq, dir);
+ if (ts > 0) {
+ double pseudoDistance = crossProduct(bq, dir);
+ if (fabs(pseudoDistance) <= fabs(distance.distance)) {
+ distance.distance = pseudoDistance;
+ distance.dot = 0;
+ }
+ }
+ }
+}
+
+LinearSegment::LinearSegment(Point2 p0, Point2 p1, EdgeColor edgeColor) : EdgeSegment(edgeColor) {
+ p[0] = p0;
+ p[1] = p1;
+}
+
+QuadraticSegment::QuadraticSegment(Point2 p0, Point2 p1, Point2 p2, EdgeColor edgeColor) : EdgeSegment(edgeColor) {
+ if (p1 == p0 || p1 == p2)
+ p1 = 0.5*(p0+p2);
+ p[0] = p0;
+ p[1] = p1;
+ p[2] = p2;
+}
+
+CubicSegment::CubicSegment(Point2 p0, Point2 p1, Point2 p2, Point2 p3, EdgeColor edgeColor) : EdgeSegment(edgeColor) {
+ if ((p1 == p0 || p1 == p3) && (p2 == p0 || p2 == p3)) {
+ p1 = mix(p0, p3, 1/3.);
+ p2 = mix(p0, p3, 2/3.);
+ }
+ p[0] = p0;
+ p[1] = p1;
+ p[2] = p2;
+ p[3] = p3;
+}
+
+LinearSegment * LinearSegment::clone() const {
+ return new LinearSegment(p[0], p[1], color);
+}
+
+QuadraticSegment * QuadraticSegment::clone() const {
+ return new QuadraticSegment(p[0], p[1], p[2], color);
+}
+
+CubicSegment * CubicSegment::clone() const {
+ return new CubicSegment(p[0], p[1], p[2], p[3], color);
+}
+
+Point2 LinearSegment::point(double param) const {
+ return mix(p[0], p[1], param);
+}
+
+Point2 QuadraticSegment::point(double param) const {
+ return mix(mix(p[0], p[1], param), mix(p[1], p[2], param), param);
+}
+
+Point2 CubicSegment::point(double param) const {
+ Vector2 p12 = mix(p[1], p[2], param);
+ return mix(mix(mix(p[0], p[1], param), p12, param), mix(p12, mix(p[2], p[3], param), param), param);
+}
+
+Vector2 LinearSegment::direction(double param) const {
+ return p[1]-p[0];
+}
+
+Vector2 QuadraticSegment::direction(double param) const {
+ Vector2 tangent = mix(p[1]-p[0], p[2]-p[1], param);
+ if (!tangent)
+ return p[2]-p[0];
+ return tangent;
+}
+
+Vector2 CubicSegment::direction(double param) const {
+ Vector2 tangent = mix(mix(p[1]-p[0], p[2]-p[1], param), mix(p[2]-p[1], p[3]-p[2], param), param);
+ if (!tangent) {
+ if (param == 0) return p[2]-p[0];
+ if (param == 1) return p[3]-p[1];
+ }
+ return tangent;
+}
+
+Vector2 LinearSegment::directionChange(double param) const {
+ return Vector2();
+}
+
+Vector2 QuadraticSegment::directionChange(double param) const {
+ return (p[2]-p[1])-(p[1]-p[0]);
+}
+
+Vector2 CubicSegment::directionChange(double param) const {
+ return mix((p[2]-p[1])-(p[1]-p[0]), (p[3]-p[2])-(p[2]-p[1]), param);
+}
+
+double LinearSegment::length() const {
+ return (p[1]-p[0]).length();
+}
+
+double QuadraticSegment::length() const {
+ Vector2 ab = p[1]-p[0];
+ Vector2 br = p[2]-p[1]-ab;
+ double abab = dotProduct(ab, ab);
+ double abbr = dotProduct(ab, br);
+ double brbr = dotProduct(br, br);
+ double abLen = sqrt(abab);
+ double brLen = sqrt(brbr);
+ double crs = crossProduct(ab, br);
+ double h = sqrt(abab+abbr+abbr+brbr);
+ return (
+ brLen*((abbr+brbr)*h-abbr*abLen)+
+ crs*crs*log((brLen*h+abbr+brbr)/(brLen*abLen+abbr))
+ )/(brbr*brLen);
+}
+
+SignedDistance LinearSegment::signedDistance(Point2 origin, double &param) const {
+ Vector2 aq = origin-p[0];
+ Vector2 ab = p[1]-p[0];
+ param = dotProduct(aq, ab)/dotProduct(ab, ab);
+ Vector2 eq = p[param > .5]-origin;
+ double endpointDistance = eq.length();
+ if (param > 0 && param < 1) {
+ double orthoDistance = dotProduct(ab.getOrthonormal(false), aq);
+ if (fabs(orthoDistance) < endpointDistance)
+ return SignedDistance(orthoDistance, 0);
+ }
+ return SignedDistance(nonZeroSign(crossProduct(aq, ab))*endpointDistance, fabs(dotProduct(ab.normalize(), eq.normalize())));
+}
+
+SignedDistance QuadraticSegment::signedDistance(Point2 origin, double &param) const {
+ Vector2 qa = p[0]-origin;
+ Vector2 ab = p[1]-p[0];
+ Vector2 br = p[2]-p[1]-ab;
+ double a = dotProduct(br, br);
+ double b = 3*dotProduct(ab, br);
+ double c = 2*dotProduct(ab, ab)+dotProduct(qa, br);
+ double d = dotProduct(qa, ab);
+ double t[3];
+ int solutions = solveCubic(t, a, b, c, d);
+
+ Vector2 epDir = direction(0);
+ double minDistance = nonZeroSign(crossProduct(epDir, qa))*qa.length(); // distance from A
+ param = -dotProduct(qa, epDir)/dotProduct(epDir, epDir);
+ {
+ epDir = direction(1);
+ double distance = (p[2]-origin).length(); // distance from B
+ if (distance < fabs(minDistance)) {
+ minDistance = nonZeroSign(crossProduct(epDir, p[2]-origin))*distance;
+ param = dotProduct(origin-p[1], epDir)/dotProduct(epDir, epDir);
+ }
+ }
+ for (int i = 0; i < solutions; ++i) {
+ if (t[i] > 0 && t[i] < 1) {
+ Point2 qe = qa+2*t[i]*ab+t[i]*t[i]*br;
+ double distance = qe.length();
+ if (distance <= fabs(minDistance)) {
+ minDistance = nonZeroSign(crossProduct(ab+t[i]*br, qe))*distance;
+ param = t[i];
+ }
+ }
+ }
+
+ if (param >= 0 && param <= 1)
+ return SignedDistance(minDistance, 0);
+ if (param < .5)
+ return SignedDistance(minDistance, fabs(dotProduct(direction(0).normalize(), qa.normalize())));
+ else
+ return SignedDistance(minDistance, fabs(dotProduct(direction(1).normalize(), (p[2]-origin).normalize())));
+}
+
+SignedDistance CubicSegment::signedDistance(Point2 origin, double &param) const {
+ Vector2 qa = p[0]-origin;
+ Vector2 ab = p[1]-p[0];
+ Vector2 br = p[2]-p[1]-ab;
+ Vector2 as = (p[3]-p[2])-(p[2]-p[1])-br;
+
+ Vector2 epDir = direction(0);
+ double minDistance = nonZeroSign(crossProduct(epDir, qa))*qa.length(); // distance from A
+ param = -dotProduct(qa, epDir)/dotProduct(epDir, epDir);
+ {
+ epDir = direction(1);
+ double distance = (p[3]-origin).length(); // distance from B
+ if (distance < fabs(minDistance)) {
+ minDistance = nonZeroSign(crossProduct(epDir, p[3]-origin))*distance;
+ param = dotProduct(epDir-(p[3]-origin), epDir)/dotProduct(epDir, epDir);
+ }
+ }
+ // Iterative minimum distance search
+ for (int i = 0; i <= MSDFGEN_CUBIC_SEARCH_STARTS; ++i) {
+ double t = (double) i/MSDFGEN_CUBIC_SEARCH_STARTS;
+ Vector2 qe = qa+3*t*ab+3*t*t*br+t*t*t*as;
+ for (int step = 0; step < MSDFGEN_CUBIC_SEARCH_STEPS; ++step) {
+ // Improve t
+ Vector2 d1 = 3*ab+6*t*br+3*t*t*as;
+ Vector2 d2 = 6*br+6*t*as;
+ t -= dotProduct(qe, d1)/(dotProduct(d1, d1)+dotProduct(qe, d2));
+ if (t <= 0 || t >= 1)
+ break;
+ qe = qa+3*t*ab+3*t*t*br+t*t*t*as;
+ double distance = qe.length();
+ if (distance < fabs(minDistance)) {
+ minDistance = nonZeroSign(crossProduct(d1, qe))*distance;
+ param = t;
+ }
+ }
+ }
+
+ if (param >= 0 && param <= 1)
+ return SignedDistance(minDistance, 0);
+ if (param < .5)
+ return SignedDistance(minDistance, fabs(dotProduct(direction(0).normalize(), qa.normalize())));
+ else
+ return SignedDistance(minDistance, fabs(dotProduct(direction(1).normalize(), (p[3]-origin).normalize())));
+}
+
+int LinearSegment::scanlineIntersections(double x[3], int dy[3], double y) const {
+ if ((y >= p[0].y && y < p[1].y) || (y >= p[1].y && y < p[0].y)) {
+ double param = (y-p[0].y)/(p[1].y-p[0].y);
+ x[0] = mix(p[0].x, p[1].x, param);
+ dy[0] = sign(p[1].y-p[0].y);
+ return 1;
+ }
+ return 0;
+}
+
+int QuadraticSegment::scanlineIntersections(double x[3], int dy[3], double y) const {
+ int total = 0;
+ int nextDY = y > p[0].y ? 1 : -1;
+ x[total] = p[0].x;
+ if (p[0].y == y) {
+ if (p[0].y < p[1].y || (p[0].y == p[1].y && p[0].y < p[2].y))
+ dy[total++] = 1;
+ else
+ nextDY = 1;
+ }
+ {
+ Vector2 ab = p[1]-p[0];
+ Vector2 br = p[2]-p[1]-ab;
+ double t[2];
+ int solutions = solveQuadratic(t, br.y, 2*ab.y, p[0].y-y);
+ // Sort solutions
+ double tmp;
+ if (solutions >= 2 && t[0] > t[1])
+ tmp = t[0], t[0] = t[1], t[1] = tmp;
+ for (int i = 0; i < solutions && total < 2; ++i) {
+ if (t[i] >= 0 && t[i] <= 1) {
+ x[total] = p[0].x+2*t[i]*ab.x+t[i]*t[i]*br.x;
+ if (nextDY*(ab.y+t[i]*br.y) >= 0) {
+ dy[total++] = nextDY;
+ nextDY = -nextDY;
+ }
+ }
+ }
+ }
+ if (p[2].y == y) {
+ if (nextDY > 0 && total > 0) {
+ --total;
+ nextDY = -1;
+ }
+ if ((p[2].y < p[1].y || (p[2].y == p[1].y && p[2].y < p[0].y)) && total < 2) {
+ x[total] = p[2].x;
+ if (nextDY < 0) {
+ dy[total++] = -1;
+ nextDY = 1;
+ }
+ }
+ }
+ if (nextDY != (y >= p[2].y ? 1 : -1)) {
+ if (total > 0)
+ --total;
+ else {
+ if (fabs(p[2].y-y) < fabs(p[0].y-y))
+ x[total] = p[2].x;
+ dy[total++] = nextDY;
+ }
+ }
+ return total;
+}
+
+int CubicSegment::scanlineIntersections(double x[3], int dy[3], double y) const {
+ int total = 0;
+ int nextDY = y > p[0].y ? 1 : -1;
+ x[total] = p[0].x;
+ if (p[0].y == y) {
+ if (p[0].y < p[1].y || (p[0].y == p[1].y && (p[0].y < p[2].y || (p[0].y == p[2].y && p[0].y < p[3].y))))
+ dy[total++] = 1;
+ else
+ nextDY = 1;
+ }
+ {
+ Vector2 ab = p[1]-p[0];
+ Vector2 br = p[2]-p[1]-ab;
+ Vector2 as = (p[3]-p[2])-(p[2]-p[1])-br;
+ double t[3];
+ int solutions = solveCubic(t, as.y, 3*br.y, 3*ab.y, p[0].y-y);
+ // Sort solutions
+ double tmp;
+ if (solutions >= 2) {
+ if (t[0] > t[1])
+ tmp = t[0], t[0] = t[1], t[1] = tmp;
+ if (solutions >= 3 && t[1] > t[2]) {
+ tmp = t[1], t[1] = t[2], t[2] = tmp;
+ if (t[0] > t[1])
+ tmp = t[0], t[0] = t[1], t[1] = tmp;
+ }
+ }
+ for (int i = 0; i < solutions && total < 3; ++i) {
+ if (t[i] >= 0 && t[i] <= 1) {
+ x[total] = p[0].x+3*t[i]*ab.x+3*t[i]*t[i]*br.x+t[i]*t[i]*t[i]*as.x;
+ if (nextDY*(ab.y+2*t[i]*br.y+t[i]*t[i]*as.y) >= 0) {
+ dy[total++] = nextDY;
+ nextDY = -nextDY;
+ }
+ }
+ }
+ }
+ if (p[3].y == y) {
+ if (nextDY > 0 && total > 0) {
+ --total;
+ nextDY = -1;
+ }
+ if ((p[3].y < p[2].y || (p[3].y == p[2].y && (p[3].y < p[1].y || (p[3].y == p[1].y && p[3].y < p[0].y)))) && total < 3) {
+ x[total] = p[3].x;
+ if (nextDY < 0) {
+ dy[total++] = -1;
+ nextDY = 1;
+ }
+ }
+ }
+ if (nextDY != (y >= p[3].y ? 1 : -1)) {
+ if (total > 0)
+ --total;
+ else {
+ if (fabs(p[3].y-y) < fabs(p[0].y-y))
+ x[total] = p[3].x;
+ dy[total++] = nextDY;
+ }
+ }
+ return total;
+}
+
+static void pointBounds(Point2 p, double &l, double &b, double &r, double &t) {
+ if (p.x < l) l = p.x;
+ if (p.y < b) b = p.y;
+ if (p.x > r) r = p.x;
+ if (p.y > t) t = p.y;
+}
+
+void LinearSegment::bound(double &l, double &b, double &r, double &t) const {
+ pointBounds(p[0], l, b, r, t);
+ pointBounds(p[1], l, b, r, t);
+}
+
+void QuadraticSegment::bound(double &l, double &b, double &r, double &t) const {
+ pointBounds(p[0], l, b, r, t);
+ pointBounds(p[2], l, b, r, t);
+ Vector2 bot = (p[1]-p[0])-(p[2]-p[1]);
+ if (bot.x) {
+ double param = (p[1].x-p[0].x)/bot.x;
+ if (param > 0 && param < 1)
+ pointBounds(point(param), l, b, r, t);
+ }
+ if (bot.y) {
+ double param = (p[1].y-p[0].y)/bot.y;
+ if (param > 0 && param < 1)
+ pointBounds(point(param), l, b, r, t);
+ }
+}
+
+void CubicSegment::bound(double &l, double &b, double &r, double &t) const {
+ pointBounds(p[0], l, b, r, t);
+ pointBounds(p[3], l, b, r, t);
+ Vector2 a0 = p[1]-p[0];
+ Vector2 a1 = 2*(p[2]-p[1]-a0);
+ Vector2 a2 = p[3]-3*p[2]+3*p[1]-p[0];
+ double params[2];
+ int solutions;
+ solutions = solveQuadratic(params, a2.x, a1.x, a0.x);
+ for (int i = 0; i < solutions; ++i)
+ if (params[i] > 0 && params[i] < 1)
+ pointBounds(point(params[i]), l, b, r, t);
+ solutions = solveQuadratic(params, a2.y, a1.y, a0.y);
+ for (int i = 0; i < solutions; ++i)
+ if (params[i] > 0 && params[i] < 1)
+ pointBounds(point(params[i]), l, b, r, t);
+}
+
+void LinearSegment::reverse() {
+ Point2 tmp = p[0];
+ p[0] = p[1];
+ p[1] = tmp;
+}
+
+void QuadraticSegment::reverse() {
+ Point2 tmp = p[0];
+ p[0] = p[2];
+ p[2] = tmp;
+}
+
+void CubicSegment::reverse() {
+ Point2 tmp = p[0];
+ p[0] = p[3];
+ p[3] = tmp;
+ tmp = p[1];
+ p[1] = p[2];
+ p[2] = tmp;
+}
+
+void LinearSegment::moveStartPoint(Point2 to) {
+ p[0] = to;
+}
+
+void QuadraticSegment::moveStartPoint(Point2 to) {
+ Vector2 origSDir = p[0]-p[1];
+ Point2 origP1 = p[1];
+ p[1] += crossProduct(p[0]-p[1], to-p[0])/crossProduct(p[0]-p[1], p[2]-p[1])*(p[2]-p[1]);
+ p[0] = to;
+ if (dotProduct(origSDir, p[0]-p[1]) < 0)
+ p[1] = origP1;
+}
+
+void CubicSegment::moveStartPoint(Point2 to) {
+ p[1] += to-p[0];
+ p[0] = to;
+}
+
+void LinearSegment::moveEndPoint(Point2 to) {
+ p[1] = to;
+}
+
+void QuadraticSegment::moveEndPoint(Point2 to) {
+ Vector2 origEDir = p[2]-p[1];
+ Point2 origP1 = p[1];
+ p[1] += crossProduct(p[2]-p[1], to-p[2])/crossProduct(p[2]-p[1], p[0]-p[1])*(p[0]-p[1]);
+ p[2] = to;
+ if (dotProduct(origEDir, p[2]-p[1]) < 0)
+ p[1] = origP1;
+}
+
+void CubicSegment::moveEndPoint(Point2 to) {
+ p[2] += to-p[3];
+ p[3] = to;
+}
+
+void LinearSegment::splitInThirds(EdgeSegment *&part1, EdgeSegment *&part2, EdgeSegment *&part3) const {
+ part1 = new LinearSegment(p[0], point(1/3.), color);
+ part2 = new LinearSegment(point(1/3.), point(2/3.), color);
+ part3 = new LinearSegment(point(2/3.), p[1], color);
+}
+
+void QuadraticSegment::splitInThirds(EdgeSegment *&part1, EdgeSegment *&part2, EdgeSegment *&part3) const {
+ part1 = new QuadraticSegment(p[0], mix(p[0], p[1], 1/3.), point(1/3.), color);
+ part2 = new QuadraticSegment(point(1/3.), mix(mix(p[0], p[1], 5/9.), mix(p[1], p[2], 4/9.), .5), point(2/3.), color);
+ part3 = new QuadraticSegment(point(2/3.), mix(p[1], p[2], 2/3.), p[2], color);
+}
+
+void CubicSegment::splitInThirds(EdgeSegment *&part1, EdgeSegment *&part2, EdgeSegment *&part3) const {
+ part1 = new CubicSegment(p[0], p[0] == p[1] ? p[0] : mix(p[0], p[1], 1/3.), mix(mix(p[0], p[1], 1/3.), mix(p[1], p[2], 1/3.), 1/3.), point(1/3.), color);
+ part2 = new CubicSegment(point(1/3.),
+ mix(mix(mix(p[0], p[1], 1/3.), mix(p[1], p[2], 1/3.), 1/3.), mix(mix(p[1], p[2], 1/3.), mix(p[2], p[3], 1/3.), 1/3.), 2/3.),
+ mix(mix(mix(p[0], p[1], 2/3.), mix(p[1], p[2], 2/3.), 2/3.), mix(mix(p[1], p[2], 2/3.), mix(p[2], p[3], 2/3.), 2/3.), 1/3.),
+ point(2/3.), color);
+ part3 = new CubicSegment(point(2/3.), mix(mix(p[1], p[2], 2/3.), mix(p[2], p[3], 2/3.), 2/3.), p[2] == p[3] ? p[3] : mix(p[2], p[3], 2/3.), p[3], color);
+}
+
+EdgeSegment * QuadraticSegment::convertToCubic() const {
+ return new CubicSegment(p[0], mix(p[0], p[1], 2/3.), mix(p[1], p[2], 1/3.), p[2], color);
+}
+
+void CubicSegment::deconverge(int param, double amount) {
+ Vector2 dir = direction(param);
+ Vector2 normal = dir.getOrthonormal();
+ double h = dotProduct(directionChange(param)-dir, normal);
+ switch (param) {
+ case 0:
+ p[1] += amount*(dir+sign(h)*sqrt(fabs(h))*normal);
+ break;
+ case 1:
+ p[2] -= amount*(dir-sign(h)*sqrt(fabs(h))*normal);
+ break;
+ }
+}
+
+}
diff --git a/thirdparty/msdfgen/core/edge-segments.h b/thirdparty/msdfgen/core/edge-segments.h
new file mode 100644
index 0000000000..1c8fb599ff
--- /dev/null
+++ b/thirdparty/msdfgen/core/edge-segments.h
@@ -0,0 +1,122 @@
+
+#pragma once
+
+#include "Vector2.h"
+#include "SignedDistance.h"
+#include "EdgeColor.h"
+
+namespace msdfgen {
+
+// Parameters for iterative search of closest point on a cubic Bezier curve. Increase for higher precision.
+#define MSDFGEN_CUBIC_SEARCH_STARTS 4
+#define MSDFGEN_CUBIC_SEARCH_STEPS 4
+
+/// An abstract edge segment.
+class EdgeSegment {
+
+public:
+ EdgeColor color;
+
+ EdgeSegment(EdgeColor edgeColor = WHITE) : color(edgeColor) { }
+ virtual ~EdgeSegment() { }
+ /// Creates a copy of the edge segment.
+ virtual EdgeSegment * clone() const = 0;
+ /// Returns the point on the edge specified by the parameter (between 0 and 1).
+ virtual Point2 point(double param) const = 0;
+ /// Returns the direction the edge has at the point specified by the parameter.
+ virtual Vector2 direction(double param) const = 0;
+ /// Returns the change of direction (second derivative) at the point specified by the parameter.
+ virtual Vector2 directionChange(double param) const = 0;
+ /// Returns the minimum signed distance between origin and the edge.
+ virtual SignedDistance signedDistance(Point2 origin, double &param) const = 0;
+ /// Converts a previously retrieved signed distance from origin to pseudo-distance.
+ virtual void distanceToPseudoDistance(SignedDistance &distance, Point2 origin, double param) const;
+ /// Outputs a list of (at most three) intersections (their X coordinates) with an infinite horizontal scanline at y and returns how many there are.
+ virtual int scanlineIntersections(double x[3], int dy[3], double y) const = 0;
+ /// Adjusts the bounding box to fit the edge segment.
+ virtual void bound(double &l, double &b, double &r, double &t) const = 0;
+
+ /// Reverses the edge (swaps its start point and end point).
+ virtual void reverse() = 0;
+ /// Moves the start point of the edge segment.
+ virtual void moveStartPoint(Point2 to) = 0;
+ /// Moves the end point of the edge segment.
+ virtual void moveEndPoint(Point2 to) = 0;
+ /// Splits the edge segments into thirds which together represent the original edge.
+ virtual void splitInThirds(EdgeSegment *&part1, EdgeSegment *&part2, EdgeSegment *&part3) const = 0;
+
+};
+
+/// A line segment.
+class LinearSegment : public EdgeSegment {
+
+public:
+ Point2 p[2];
+
+ LinearSegment(Point2 p0, Point2 p1, EdgeColor edgeColor = WHITE);
+ LinearSegment * clone() const;
+ Point2 point(double param) const;
+ Vector2 direction(double param) const;
+ Vector2 directionChange(double param) const;
+ double length() const;
+ SignedDistance signedDistance(Point2 origin, double &param) const;
+ int scanlineIntersections(double x[3], int dy[3], double y) const;
+ void bound(double &l, double &b, double &r, double &t) const;
+
+ void reverse();
+ void moveStartPoint(Point2 to);
+ void moveEndPoint(Point2 to);
+ void splitInThirds(EdgeSegment *&part1, EdgeSegment *&part2, EdgeSegment *&part3) const;
+
+};
+
+/// A quadratic Bezier curve.
+class QuadraticSegment : public EdgeSegment {
+
+public:
+ Point2 p[3];
+
+ QuadraticSegment(Point2 p0, Point2 p1, Point2 p2, EdgeColor edgeColor = WHITE);
+ QuadraticSegment * clone() const;
+ Point2 point(double param) const;
+ Vector2 direction(double param) const;
+ Vector2 directionChange(double param) const;
+ double length() const;
+ SignedDistance signedDistance(Point2 origin, double &param) const;
+ int scanlineIntersections(double x[3], int dy[3], double y) const;
+ void bound(double &l, double &b, double &r, double &t) const;
+
+ void reverse();
+ void moveStartPoint(Point2 to);
+ void moveEndPoint(Point2 to);
+ void splitInThirds(EdgeSegment *&part1, EdgeSegment *&part2, EdgeSegment *&part3) const;
+
+ EdgeSegment * convertToCubic() const;
+
+};
+
+/// A cubic Bezier curve.
+class CubicSegment : public EdgeSegment {
+
+public:
+ Point2 p[4];
+
+ CubicSegment(Point2 p0, Point2 p1, Point2 p2, Point2 p3, EdgeColor edgeColor = WHITE);
+ CubicSegment * clone() const;
+ Point2 point(double param) const;
+ Vector2 direction(double param) const;
+ Vector2 directionChange(double param) const;
+ SignedDistance signedDistance(Point2 origin, double &param) const;
+ int scanlineIntersections(double x[3], int dy[3], double y) const;
+ void bound(double &l, double &b, double &r, double &t) const;
+
+ void reverse();
+ void moveStartPoint(Point2 to);
+ void moveEndPoint(Point2 to);
+ void splitInThirds(EdgeSegment *&part1, EdgeSegment *&part2, EdgeSegment *&part3) const;
+
+ void deconverge(int param, double amount);
+
+};
+
+}
diff --git a/thirdparty/msdfgen/core/edge-selectors.cpp b/thirdparty/msdfgen/core/edge-selectors.cpp
new file mode 100644
index 0000000000..aee78847fb
--- /dev/null
+++ b/thirdparty/msdfgen/core/edge-selectors.cpp
@@ -0,0 +1,261 @@
+
+#include "edge-selectors.h"
+
+#include "arithmetics.hpp"
+
+namespace msdfgen {
+
+#define DISTANCE_DELTA_FACTOR 1.001
+
+TrueDistanceSelector::EdgeCache::EdgeCache() : absDistance(0) { }
+
+void TrueDistanceSelector::reset(const Point2 &p) {
+ double delta = DISTANCE_DELTA_FACTOR*(p-this->p).length();
+ minDistance.distance += nonZeroSign(minDistance.distance)*delta;
+ this->p = p;
+}
+
+void TrueDistanceSelector::addEdge(EdgeCache &cache, const EdgeSegment *prevEdge, const EdgeSegment *edge, const EdgeSegment *nextEdge) {
+ double delta = DISTANCE_DELTA_FACTOR*(p-cache.point).length();
+ if (cache.absDistance-delta <= fabs(minDistance.distance)) {
+ double dummy;
+ SignedDistance distance = edge->signedDistance(p, dummy);
+ if (distance < minDistance)
+ minDistance = distance;
+ cache.point = p;
+ cache.absDistance = fabs(distance.distance);
+ }
+}
+
+void TrueDistanceSelector::merge(const TrueDistanceSelector &other) {
+ if (other.minDistance < minDistance)
+ minDistance = other.minDistance;
+}
+
+TrueDistanceSelector::DistanceType TrueDistanceSelector::distance() const {
+ return minDistance.distance;
+}
+
+PseudoDistanceSelectorBase::EdgeCache::EdgeCache() : absDistance(0), aDomainDistance(0), bDomainDistance(0), aPseudoDistance(0), bPseudoDistance(0) { }
+
+bool PseudoDistanceSelectorBase::getPseudoDistance(double &distance, const Vector2 &ep, const Vector2 &edgeDir) {
+ double ts = dotProduct(ep, edgeDir);
+ if (ts > 0) {
+ double pseudoDistance = crossProduct(ep, edgeDir);
+ if (fabs(pseudoDistance) < fabs(distance)) {
+ distance = pseudoDistance;
+ return true;
+ }
+ }
+ return false;
+}
+
+PseudoDistanceSelectorBase::PseudoDistanceSelectorBase() : minNegativePseudoDistance(-fabs(minTrueDistance.distance)), minPositivePseudoDistance(fabs(minTrueDistance.distance)), nearEdge(NULL), nearEdgeParam(0) { }
+
+void PseudoDistanceSelectorBase::reset(double delta) {
+ minTrueDistance.distance += nonZeroSign(minTrueDistance.distance)*delta;
+ minNegativePseudoDistance = -fabs(minTrueDistance.distance);
+ minPositivePseudoDistance = fabs(minTrueDistance.distance);
+ nearEdge = NULL;
+ nearEdgeParam = 0;
+}
+
+bool PseudoDistanceSelectorBase::isEdgeRelevant(const EdgeCache &cache, const EdgeSegment *edge, const Point2 &p) const {
+ double delta = DISTANCE_DELTA_FACTOR*(p-cache.point).length();
+ return (
+ cache.absDistance-delta <= fabs(minTrueDistance.distance) ||
+ fabs(cache.aDomainDistance) < delta ||
+ fabs(cache.bDomainDistance) < delta ||
+ (cache.aDomainDistance > 0 && (cache.aPseudoDistance < 0 ?
+ cache.aPseudoDistance+delta >= minNegativePseudoDistance :
+ cache.aPseudoDistance-delta <= minPositivePseudoDistance
+ )) ||
+ (cache.bDomainDistance > 0 && (cache.bPseudoDistance < 0 ?
+ cache.bPseudoDistance+delta >= minNegativePseudoDistance :
+ cache.bPseudoDistance-delta <= minPositivePseudoDistance
+ ))
+ );
+}
+
+void PseudoDistanceSelectorBase::addEdgeTrueDistance(const EdgeSegment *edge, const SignedDistance &distance, double param) {
+ if (distance < minTrueDistance) {
+ minTrueDistance = distance;
+ nearEdge = edge;
+ nearEdgeParam = param;
+ }
+}
+
+void PseudoDistanceSelectorBase::addEdgePseudoDistance(double distance) {
+ if (distance <= 0 && distance > minNegativePseudoDistance)
+ minNegativePseudoDistance = distance;
+ if (distance >= 0 && distance < minPositivePseudoDistance)
+ minPositivePseudoDistance = distance;
+}
+
+void PseudoDistanceSelectorBase::merge(const PseudoDistanceSelectorBase &other) {
+ if (other.minTrueDistance < minTrueDistance) {
+ minTrueDistance = other.minTrueDistance;
+ nearEdge = other.nearEdge;
+ nearEdgeParam = other.nearEdgeParam;
+ }
+ if (other.minNegativePseudoDistance > minNegativePseudoDistance)
+ minNegativePseudoDistance = other.minNegativePseudoDistance;
+ if (other.minPositivePseudoDistance < minPositivePseudoDistance)
+ minPositivePseudoDistance = other.minPositivePseudoDistance;
+}
+
+double PseudoDistanceSelectorBase::computeDistance(const Point2 &p) const {
+ double minDistance = minTrueDistance.distance < 0 ? minNegativePseudoDistance : minPositivePseudoDistance;
+ if (nearEdge) {
+ SignedDistance distance = minTrueDistance;
+ nearEdge->distanceToPseudoDistance(distance, p, nearEdgeParam);
+ if (fabs(distance.distance) < fabs(minDistance))
+ minDistance = distance.distance;
+ }
+ return minDistance;
+}
+
+SignedDistance PseudoDistanceSelectorBase::trueDistance() const {
+ return minTrueDistance;
+}
+
+void PseudoDistanceSelector::reset(const Point2 &p) {
+ double delta = DISTANCE_DELTA_FACTOR*(p-this->p).length();
+ PseudoDistanceSelectorBase::reset(delta);
+ this->p = p;
+}
+
+void PseudoDistanceSelector::addEdge(EdgeCache &cache, const EdgeSegment *prevEdge, const EdgeSegment *edge, const EdgeSegment *nextEdge) {
+ if (isEdgeRelevant(cache, edge, p)) {
+ double param;
+ SignedDistance distance = edge->signedDistance(p, param);
+ addEdgeTrueDistance(edge, distance, param);
+ cache.point = p;
+ cache.absDistance = fabs(distance.distance);
+
+ Vector2 ap = p-edge->point(0);
+ Vector2 bp = p-edge->point(1);
+ Vector2 aDir = edge->direction(0).normalize(true);
+ Vector2 bDir = edge->direction(1).normalize(true);
+ Vector2 prevDir = prevEdge->direction(1).normalize(true);
+ Vector2 nextDir = nextEdge->direction(0).normalize(true);
+ double add = dotProduct(ap, (prevDir+aDir).normalize(true));
+ double bdd = -dotProduct(bp, (bDir+nextDir).normalize(true));
+ if (add > 0) {
+ double pd = distance.distance;
+ if (getPseudoDistance(pd, ap, -aDir))
+ addEdgePseudoDistance(pd = -pd);
+ cache.aPseudoDistance = pd;
+ }
+ if (bdd > 0) {
+ double pd = distance.distance;
+ if (getPseudoDistance(pd, bp, bDir))
+ addEdgePseudoDistance(pd);
+ cache.bPseudoDistance = pd;
+ }
+ cache.aDomainDistance = add;
+ cache.bDomainDistance = bdd;
+ }
+}
+
+PseudoDistanceSelector::DistanceType PseudoDistanceSelector::distance() const {
+ return computeDistance(p);
+}
+
+void MultiDistanceSelector::reset(const Point2 &p) {
+ double delta = DISTANCE_DELTA_FACTOR*(p-this->p).length();
+ r.reset(delta);
+ g.reset(delta);
+ b.reset(delta);
+ this->p = p;
+}
+
+void MultiDistanceSelector::addEdge(EdgeCache &cache, const EdgeSegment *prevEdge, const EdgeSegment *edge, const EdgeSegment *nextEdge) {
+ if (
+ (edge->color&RED && r.isEdgeRelevant(cache, edge, p)) ||
+ (edge->color&GREEN && g.isEdgeRelevant(cache, edge, p)) ||
+ (edge->color&BLUE && b.isEdgeRelevant(cache, edge, p))
+ ) {
+ double param;
+ SignedDistance distance = edge->signedDistance(p, param);
+ if (edge->color&RED)
+ r.addEdgeTrueDistance(edge, distance, param);
+ if (edge->color&GREEN)
+ g.addEdgeTrueDistance(edge, distance, param);
+ if (edge->color&BLUE)
+ b.addEdgeTrueDistance(edge, distance, param);
+ cache.point = p;
+ cache.absDistance = fabs(distance.distance);
+
+ Vector2 ap = p-edge->point(0);
+ Vector2 bp = p-edge->point(1);
+ Vector2 aDir = edge->direction(0).normalize(true);
+ Vector2 bDir = edge->direction(1).normalize(true);
+ Vector2 prevDir = prevEdge->direction(1).normalize(true);
+ Vector2 nextDir = nextEdge->direction(0).normalize(true);
+ double add = dotProduct(ap, (prevDir+aDir).normalize(true));
+ double bdd = -dotProduct(bp, (bDir+nextDir).normalize(true));
+ if (add > 0) {
+ double pd = distance.distance;
+ if (PseudoDistanceSelectorBase::getPseudoDistance(pd, ap, -aDir)) {
+ pd = -pd;
+ if (edge->color&RED)
+ r.addEdgePseudoDistance(pd);
+ if (edge->color&GREEN)
+ g.addEdgePseudoDistance(pd);
+ if (edge->color&BLUE)
+ b.addEdgePseudoDistance(pd);
+ }
+ cache.aPseudoDistance = pd;
+ }
+ if (bdd > 0) {
+ double pd = distance.distance;
+ if (PseudoDistanceSelectorBase::getPseudoDistance(pd, bp, bDir)) {
+ if (edge->color&RED)
+ r.addEdgePseudoDistance(pd);
+ if (edge->color&GREEN)
+ g.addEdgePseudoDistance(pd);
+ if (edge->color&BLUE)
+ b.addEdgePseudoDistance(pd);
+ }
+ cache.bPseudoDistance = pd;
+ }
+ cache.aDomainDistance = add;
+ cache.bDomainDistance = bdd;
+ }
+}
+
+void MultiDistanceSelector::merge(const MultiDistanceSelector &other) {
+ r.merge(other.r);
+ g.merge(other.g);
+ b.merge(other.b);
+}
+
+MultiDistanceSelector::DistanceType MultiDistanceSelector::distance() const {
+ MultiDistance multiDistance;
+ multiDistance.r = r.computeDistance(p);
+ multiDistance.g = g.computeDistance(p);
+ multiDistance.b = b.computeDistance(p);
+ return multiDistance;
+}
+
+SignedDistance MultiDistanceSelector::trueDistance() const {
+ SignedDistance distance = r.trueDistance();
+ if (g.trueDistance() < distance)
+ distance = g.trueDistance();
+ if (b.trueDistance() < distance)
+ distance = b.trueDistance();
+ return distance;
+}
+
+MultiAndTrueDistanceSelector::DistanceType MultiAndTrueDistanceSelector::distance() const {
+ MultiDistance multiDistance = MultiDistanceSelector::distance();
+ MultiAndTrueDistance mtd;
+ mtd.r = multiDistance.r;
+ mtd.g = multiDistance.g;
+ mtd.b = multiDistance.b;
+ mtd.a = trueDistance().distance;
+ return mtd;
+}
+
+}
diff --git a/thirdparty/msdfgen/core/edge-selectors.h b/thirdparty/msdfgen/core/edge-selectors.h
new file mode 100644
index 0000000000..3620999f82
--- /dev/null
+++ b/thirdparty/msdfgen/core/edge-selectors.h
@@ -0,0 +1,117 @@
+
+#pragma once
+
+#include "Vector2.h"
+#include "SignedDistance.h"
+#include "edge-segments.h"
+
+namespace msdfgen {
+
+struct MultiDistance {
+ double r, g, b;
+};
+struct MultiAndTrueDistance : MultiDistance {
+ double a;
+};
+
+/// Selects the nearest edge by its true distance.
+class TrueDistanceSelector {
+
+public:
+ typedef double DistanceType;
+
+ struct EdgeCache {
+ Point2 point;
+ double absDistance;
+
+ EdgeCache();
+ };
+
+ void reset(const Point2 &p);
+ void addEdge(EdgeCache &cache, const EdgeSegment *prevEdge, const EdgeSegment *edge, const EdgeSegment *nextEdge);
+ void merge(const TrueDistanceSelector &other);
+ DistanceType distance() const;
+
+private:
+ Point2 p;
+ SignedDistance minDistance;
+
+};
+
+class PseudoDistanceSelectorBase {
+
+public:
+ struct EdgeCache {
+ Point2 point;
+ double absDistance;
+ double aDomainDistance, bDomainDistance;
+ double aPseudoDistance, bPseudoDistance;
+
+ EdgeCache();
+ };
+
+ static bool getPseudoDistance(double &distance, const Vector2 &ep, const Vector2 &edgeDir);
+
+ PseudoDistanceSelectorBase();
+ void reset(double delta);
+ bool isEdgeRelevant(const EdgeCache &cache, const EdgeSegment *edge, const Point2 &p) const;
+ void addEdgeTrueDistance(const EdgeSegment *edge, const SignedDistance &distance, double param);
+ void addEdgePseudoDistance(double distance);
+ void merge(const PseudoDistanceSelectorBase &other);
+ double computeDistance(const Point2 &p) const;
+ SignedDistance trueDistance() const;
+
+private:
+ SignedDistance minTrueDistance;
+ double minNegativePseudoDistance;
+ double minPositivePseudoDistance;
+ const EdgeSegment *nearEdge;
+ double nearEdgeParam;
+
+};
+
+/// Selects the nearest edge by its pseudo-distance.
+class PseudoDistanceSelector : public PseudoDistanceSelectorBase {
+
+public:
+ typedef double DistanceType;
+
+ void reset(const Point2 &p);
+ void addEdge(EdgeCache &cache, const EdgeSegment *prevEdge, const EdgeSegment *edge, const EdgeSegment *nextEdge);
+ DistanceType distance() const;
+
+private:
+ Point2 p;
+
+};
+
+/// Selects the nearest edge for each of the three channels by its pseudo-distance.
+class MultiDistanceSelector {
+
+public:
+ typedef MultiDistance DistanceType;
+ typedef PseudoDistanceSelectorBase::EdgeCache EdgeCache;
+
+ void reset(const Point2 &p);
+ void addEdge(EdgeCache &cache, const EdgeSegment *prevEdge, const EdgeSegment *edge, const EdgeSegment *nextEdge);
+ void merge(const MultiDistanceSelector &other);
+ DistanceType distance() const;
+ SignedDistance trueDistance() const;
+
+private:
+ Point2 p;
+ PseudoDistanceSelectorBase r, g, b;
+
+};
+
+/// Selects the nearest edge for each of the three color channels by its pseudo-distance and by true distance for the alpha channel.
+class MultiAndTrueDistanceSelector : public MultiDistanceSelector {
+
+public:
+ typedef MultiAndTrueDistance DistanceType;
+
+ DistanceType distance() const;
+
+};
+
+}
diff --git a/thirdparty/msdfgen/core/equation-solver.cpp b/thirdparty/msdfgen/core/equation-solver.cpp
new file mode 100644
index 0000000000..fbe906428b
--- /dev/null
+++ b/thirdparty/msdfgen/core/equation-solver.cpp
@@ -0,0 +1,77 @@
+
+#include "equation-solver.h"
+
+#define _USE_MATH_DEFINES
+#include <cmath>
+
+#define TOO_LARGE_RATIO 1e12
+
+namespace msdfgen {
+
+int solveQuadratic(double x[2], double a, double b, double c) {
+ // a = 0 -> linear equation
+ if (a == 0 || fabs(b)+fabs(c) > TOO_LARGE_RATIO*fabs(a)) {
+ // a, b = 0 -> no solution
+ if (b == 0 || fabs(c) > TOO_LARGE_RATIO*fabs(b)) {
+ if (c == 0)
+ return -1; // 0 = 0
+ return 0;
+ }
+ x[0] = -c/b;
+ return 1;
+ }
+ double dscr = b*b-4*a*c;
+ if (dscr > 0) {
+ dscr = sqrt(dscr);
+ x[0] = (-b+dscr)/(2*a);
+ x[1] = (-b-dscr)/(2*a);
+ return 2;
+ } else if (dscr == 0) {
+ x[0] = -b/(2*a);
+ return 1;
+ } else
+ return 0;
+}
+
+static int solveCubicNormed(double x[3], double a, double b, double c) {
+ double a2 = a*a;
+ double q = (a2 - 3*b)/9;
+ double r = (a*(2*a2-9*b) + 27*c)/54;
+ double r2 = r*r;
+ double q3 = q*q*q;
+ double A, B;
+ if (r2 < q3) {
+ double t = r/sqrt(q3);
+ if (t < -1) t = -1;
+ if (t > 1) t = 1;
+ t = acos(t);
+ a /= 3; q = -2*sqrt(q);
+ x[0] = q*cos(t/3)-a;
+ x[1] = q*cos((t+2*M_PI)/3)-a;
+ x[2] = q*cos((t-2*M_PI)/3)-a;
+ return 3;
+ } else {
+ A = -pow(fabs(r)+sqrt(r2-q3), 1/3.);
+ if (r < 0) A = -A;
+ B = A == 0 ? 0 : q/A;
+ a /= 3;
+ x[0] = (A+B)-a;
+ x[1] = -0.5*(A+B)-a;
+ x[2] = 0.5*sqrt(3.)*(A-B);
+ if (fabs(x[2]) < 1e-14)
+ return 2;
+ return 1;
+ }
+}
+
+int solveCubic(double x[3], double a, double b, double c, double d) {
+ if (a != 0) {
+ double bn = b/a, cn = c/a, dn = d/a;
+ // Check that a isn't "almost zero"
+ if (fabs(bn) < TOO_LARGE_RATIO && fabs(cn) < TOO_LARGE_RATIO && fabs(dn) < TOO_LARGE_RATIO)
+ return solveCubicNormed(x, bn, cn, dn);
+ }
+ return solveQuadratic(x, b, c, d);
+}
+
+}
diff --git a/thirdparty/msdfgen/core/equation-solver.h b/thirdparty/msdfgen/core/equation-solver.h
new file mode 100644
index 0000000000..bae097b2b9
--- /dev/null
+++ b/thirdparty/msdfgen/core/equation-solver.h
@@ -0,0 +1,12 @@
+
+#pragma once
+
+namespace msdfgen {
+
+// ax^2 + bx + c = 0
+int solveQuadratic(double x[2], double a, double b, double c);
+
+// ax^3 + bx^2 + cx + d = 0
+int solveCubic(double x[3], double a, double b, double c, double d);
+
+}
diff --git a/thirdparty/msdfgen/core/generator-config.h b/thirdparty/msdfgen/core/generator-config.h
new file mode 100644
index 0000000000..ddcad961f2
--- /dev/null
+++ b/thirdparty/msdfgen/core/generator-config.h
@@ -0,0 +1,63 @@
+
+#pragma once
+
+#include <cstdlib>
+#include "BitmapRef.hpp"
+
+namespace msdfgen {
+
+/// The configuration of the MSDF error correction pass.
+struct ErrorCorrectionConfig {
+ /// The default value of minDeviationRatio.
+ static const double defaultMinDeviationRatio;
+ /// The default value of minImproveRatio.
+ static const double defaultMinImproveRatio;
+
+ /// Mode of operation.
+ enum Mode {
+ /// Skips error correction pass.
+ DISABLED,
+ /// Corrects all discontinuities of the distance field regardless if edges are adversely affected.
+ INDISCRIMINATE,
+ /// Corrects artifacts at edges and other discontinuous distances only if it does not affect edges or corners.
+ EDGE_PRIORITY,
+ /// Only corrects artifacts at edges.
+ EDGE_ONLY
+ } mode;
+ /// Configuration of whether to use an algorithm that computes the exact shape distance at the positions of suspected artifacts. This algorithm can be much slower.
+ enum DistanceCheckMode {
+ /// Never computes exact shape distance.
+ DO_NOT_CHECK_DISTANCE,
+ /// Only computes exact shape distance at edges. Provides a good balance between speed and precision.
+ CHECK_DISTANCE_AT_EDGE,
+ /// Computes and compares the exact shape distance for each suspected artifact.
+ ALWAYS_CHECK_DISTANCE
+ } distanceCheckMode;
+ /// The minimum ratio between the actual and maximum expected distance delta to be considered an error.
+ double minDeviationRatio;
+ /// The minimum ratio between the pre-correction distance error and the post-correction distance error. Has no effect for DO_NOT_CHECK_DISTANCE.
+ double minImproveRatio;
+ /// An optional buffer to avoid dynamic allocation. Must have at least as many bytes as the MSDF has pixels.
+ byte *buffer;
+
+ inline explicit ErrorCorrectionConfig(Mode mode = EDGE_PRIORITY, DistanceCheckMode distanceCheckMode = CHECK_DISTANCE_AT_EDGE, double minDeviationRatio = defaultMinDeviationRatio, double minImproveRatio = defaultMinImproveRatio, byte *buffer = NULL) : mode(mode), distanceCheckMode(distanceCheckMode), minDeviationRatio(minDeviationRatio), minImproveRatio(minImproveRatio), buffer(buffer) { }
+};
+
+/// The configuration of the distance field generator algorithm.
+struct GeneratorConfig {
+ /// Specifies whether to use the version of the algorithm that supports overlapping contours with the same winding. May be set to false to improve performance when no such contours are present.
+ bool overlapSupport;
+
+ inline explicit GeneratorConfig(bool overlapSupport = true) : overlapSupport(overlapSupport) { }
+};
+
+/// The configuration of the multi-channel distance field generator algorithm.
+struct MSDFGeneratorConfig : GeneratorConfig {
+ /// Configuration of the error correction pass.
+ ErrorCorrectionConfig errorCorrection;
+
+ inline MSDFGeneratorConfig() { }
+ inline explicit MSDFGeneratorConfig(bool overlapSupport, const ErrorCorrectionConfig &errorCorrection = ErrorCorrectionConfig()) : GeneratorConfig(overlapSupport), errorCorrection(errorCorrection) { }
+};
+
+}
diff --git a/thirdparty/msdfgen/core/msdf-error-correction.cpp b/thirdparty/msdfgen/core/msdf-error-correction.cpp
new file mode 100644
index 0000000000..21ddff8c85
--- /dev/null
+++ b/thirdparty/msdfgen/core/msdf-error-correction.cpp
@@ -0,0 +1,154 @@
+
+#include "msdf-error-correction.h"
+
+#include <vector>
+#include "arithmetics.hpp"
+#include "Bitmap.h"
+#include "contour-combiners.h"
+#include "MSDFErrorCorrection.h"
+
+namespace msdfgen {
+
+template <int N>
+static void msdfErrorCorrectionInner(const BitmapRef<float, N> &sdf, const Shape &shape, const Projection &projection, double range, const MSDFGeneratorConfig &config) {
+ if (config.errorCorrection.mode == ErrorCorrectionConfig::DISABLED)
+ return;
+ Bitmap<byte, 1> stencilBuffer;
+ if (!config.errorCorrection.buffer)
+ stencilBuffer = Bitmap<byte, 1>(sdf.width, sdf.height);
+ BitmapRef<byte, 1> stencil;
+ stencil.pixels = config.errorCorrection.buffer ? config.errorCorrection.buffer : (byte *) stencilBuffer;
+ stencil.width = sdf.width, stencil.height = sdf.height;
+ MSDFErrorCorrection ec(stencil, projection, range);
+ ec.setMinDeviationRatio(config.errorCorrection.minDeviationRatio);
+ ec.setMinImproveRatio(config.errorCorrection.minImproveRatio);
+ switch (config.errorCorrection.mode) {
+ case ErrorCorrectionConfig::DISABLED:
+ case ErrorCorrectionConfig::INDISCRIMINATE:
+ break;
+ case ErrorCorrectionConfig::EDGE_PRIORITY:
+ ec.protectCorners(shape);
+ ec.protectEdges<N>(sdf);
+ break;
+ case ErrorCorrectionConfig::EDGE_ONLY:
+ ec.protectAll();
+ break;
+ }
+ if (config.errorCorrection.distanceCheckMode == ErrorCorrectionConfig::DO_NOT_CHECK_DISTANCE || (config.errorCorrection.distanceCheckMode == ErrorCorrectionConfig::CHECK_DISTANCE_AT_EDGE && config.errorCorrection.mode != ErrorCorrectionConfig::EDGE_ONLY)) {
+ ec.findErrors<N>(sdf);
+ if (config.errorCorrection.distanceCheckMode == ErrorCorrectionConfig::CHECK_DISTANCE_AT_EDGE)
+ ec.protectAll();
+ }
+ if (config.errorCorrection.distanceCheckMode == ErrorCorrectionConfig::ALWAYS_CHECK_DISTANCE || config.errorCorrection.distanceCheckMode == ErrorCorrectionConfig::CHECK_DISTANCE_AT_EDGE) {
+ if (config.overlapSupport)
+ ec.findErrors<OverlappingContourCombiner, N>(sdf, shape);
+ else
+ ec.findErrors<SimpleContourCombiner, N>(sdf, shape);
+ }
+ ec.apply(sdf);
+}
+
+template <int N>
+static void msdfErrorCorrectionShapeless(const BitmapRef<float, N> &sdf, const Projection &projection, double range, double minDeviationRatio, bool protectAll) {
+ Bitmap<byte, 1> stencilBuffer(sdf.width, sdf.height);
+ MSDFErrorCorrection ec(stencilBuffer, projection, range);
+ ec.setMinDeviationRatio(minDeviationRatio);
+ if (protectAll)
+ ec.protectAll();
+ ec.findErrors<N>(sdf);
+ ec.apply(sdf);
+}
+
+void msdfErrorCorrection(const BitmapRef<float, 3> &sdf, const Shape &shape, const Projection &projection, double range, const MSDFGeneratorConfig &config) {
+ msdfErrorCorrectionInner(sdf, shape, projection, range, config);
+}
+void msdfErrorCorrection(const BitmapRef<float, 4> &sdf, const Shape &shape, const Projection &projection, double range, const MSDFGeneratorConfig &config) {
+ msdfErrorCorrectionInner(sdf, shape, projection, range, config);
+}
+
+void msdfFastDistanceErrorCorrection(const BitmapRef<float, 3> &sdf, const Projection &projection, double range, double minDeviationRatio) {
+ msdfErrorCorrectionShapeless(sdf, projection, range, minDeviationRatio, false);
+}
+void msdfFastDistanceErrorCorrection(const BitmapRef<float, 4> &sdf, const Projection &projection, double range, double minDeviationRatio) {
+ msdfErrorCorrectionShapeless(sdf, projection, range, minDeviationRatio, false);
+}
+
+void msdfFastEdgeErrorCorrection(const BitmapRef<float, 3> &sdf, const Projection &projection, double range, double minDeviationRatio) {
+ msdfErrorCorrectionShapeless(sdf, projection, range, minDeviationRatio, true);
+}
+void msdfFastEdgeErrorCorrection(const BitmapRef<float, 4> &sdf, const Projection &projection, double range, double minDeviationRatio) {
+ msdfErrorCorrectionShapeless(sdf, projection, range, minDeviationRatio, true);
+}
+
+
+// Legacy version
+
+inline static bool detectClash(const float *a, const float *b, double threshold) {
+ // Sort channels so that pairs (a0, b0), (a1, b1), (a2, b2) go from biggest to smallest absolute difference
+ float a0 = a[0], a1 = a[1], a2 = a[2];
+ float b0 = b[0], b1 = b[1], b2 = b[2];
+ float tmp;
+ if (fabsf(b0-a0) < fabsf(b1-a1)) {
+ tmp = a0, a0 = a1, a1 = tmp;
+ tmp = b0, b0 = b1, b1 = tmp;
+ }
+ if (fabsf(b1-a1) < fabsf(b2-a2)) {
+ tmp = a1, a1 = a2, a2 = tmp;
+ tmp = b1, b1 = b2, b2 = tmp;
+ if (fabsf(b0-a0) < fabsf(b1-a1)) {
+ tmp = a0, a0 = a1, a1 = tmp;
+ tmp = b0, b0 = b1, b1 = tmp;
+ }
+ }
+ return (fabsf(b1-a1) >= threshold) &&
+ !(b0 == b1 && b0 == b2) && // Ignore if other pixel has been equalized
+ fabsf(a2-.5f) >= fabsf(b2-.5f); // Out of the pair, only flag the pixel farther from a shape edge
+}
+
+template <int N>
+static void msdfErrorCorrectionInner_legacy(const BitmapRef<float, N> &output, const Vector2 &threshold) {
+ std::vector<std::pair<int, int> > clashes;
+ int w = output.width, h = output.height;
+ for (int y = 0; y < h; ++y)
+ for (int x = 0; x < w; ++x) {
+ if (
+ (x > 0 && detectClash(output(x, y), output(x-1, y), threshold.x)) ||
+ (x < w-1 && detectClash(output(x, y), output(x+1, y), threshold.x)) ||
+ (y > 0 && detectClash(output(x, y), output(x, y-1), threshold.y)) ||
+ (y < h-1 && detectClash(output(x, y), output(x, y+1), threshold.y))
+ )
+ clashes.push_back(std::make_pair(x, y));
+ }
+ for (std::vector<std::pair<int, int> >::const_iterator clash = clashes.begin(); clash != clashes.end(); ++clash) {
+ float *pixel = output(clash->first, clash->second);
+ float med = median(pixel[0], pixel[1], pixel[2]);
+ pixel[0] = med, pixel[1] = med, pixel[2] = med;
+ }
+#ifndef MSDFGEN_NO_DIAGONAL_CLASH_DETECTION
+ clashes.clear();
+ for (int y = 0; y < h; ++y)
+ for (int x = 0; x < w; ++x) {
+ if (
+ (x > 0 && y > 0 && detectClash(output(x, y), output(x-1, y-1), threshold.x+threshold.y)) ||
+ (x < w-1 && y > 0 && detectClash(output(x, y), output(x+1, y-1), threshold.x+threshold.y)) ||
+ (x > 0 && y < h-1 && detectClash(output(x, y), output(x-1, y+1), threshold.x+threshold.y)) ||
+ (x < w-1 && y < h-1 && detectClash(output(x, y), output(x+1, y+1), threshold.x+threshold.y))
+ )
+ clashes.push_back(std::make_pair(x, y));
+ }
+ for (std::vector<std::pair<int, int> >::const_iterator clash = clashes.begin(); clash != clashes.end(); ++clash) {
+ float *pixel = output(clash->first, clash->second);
+ float med = median(pixel[0], pixel[1], pixel[2]);
+ pixel[0] = med, pixel[1] = med, pixel[2] = med;
+ }
+#endif
+}
+
+void msdfErrorCorrection_legacy(const BitmapRef<float, 3> &output, const Vector2 &threshold) {
+ msdfErrorCorrectionInner_legacy(output, threshold);
+}
+void msdfErrorCorrection_legacy(const BitmapRef<float, 4> &output, const Vector2 &threshold) {
+ msdfErrorCorrectionInner_legacy(output, threshold);
+}
+
+}
diff --git a/thirdparty/msdfgen/core/msdf-error-correction.h b/thirdparty/msdfgen/core/msdf-error-correction.h
new file mode 100644
index 0000000000..d5384c9329
--- /dev/null
+++ b/thirdparty/msdfgen/core/msdf-error-correction.h
@@ -0,0 +1,28 @@
+
+#pragma once
+
+#include "Vector2.h"
+#include "Projection.h"
+#include "Shape.h"
+#include "BitmapRef.hpp"
+#include "generator-config.h"
+
+namespace msdfgen {
+
+/// Predicts potential artifacts caused by the interpolation of the MSDF and corrects them by converting nearby texels to single-channel.
+void msdfErrorCorrection(const BitmapRef<float, 3> &sdf, const Shape &shape, const Projection &projection, double range, const MSDFGeneratorConfig &config = MSDFGeneratorConfig());
+void msdfErrorCorrection(const BitmapRef<float, 4> &sdf, const Shape &shape, const Projection &projection, double range, const MSDFGeneratorConfig &config = MSDFGeneratorConfig());
+
+/// Applies the simplified error correction to all discontiunous distances (INDISCRIMINATE mode). Does not need shape or translation.
+void msdfFastDistanceErrorCorrection(const BitmapRef<float, 3> &sdf, const Projection &projection, double range, double minDeviationRatio = ErrorCorrectionConfig::defaultMinDeviationRatio);
+void msdfFastDistanceErrorCorrection(const BitmapRef<float, 4> &sdf, const Projection &projection, double range, double minDeviationRatio = ErrorCorrectionConfig::defaultMinDeviationRatio);
+
+/// Applies the simplified error correction to edges only (EDGE_ONLY mode). Does not need shape or translation.
+void msdfFastEdgeErrorCorrection(const BitmapRef<float, 3> &sdf, const Projection &projection, double range, double minDeviationRatio = ErrorCorrectionConfig::defaultMinDeviationRatio);
+void msdfFastEdgeErrorCorrection(const BitmapRef<float, 4> &sdf, const Projection &projection, double range, double minDeviationRatio = ErrorCorrectionConfig::defaultMinDeviationRatio);
+
+/// The original version of the error correction algorithm.
+void msdfErrorCorrection_legacy(const BitmapRef<float, 3> &output, const Vector2 &threshold);
+void msdfErrorCorrection_legacy(const BitmapRef<float, 4> &output, const Vector2 &threshold);
+
+}
diff --git a/thirdparty/msdfgen/core/msdfgen.cpp b/thirdparty/msdfgen/core/msdfgen.cpp
new file mode 100644
index 0000000000..0289295f14
--- /dev/null
+++ b/thirdparty/msdfgen/core/msdfgen.cpp
@@ -0,0 +1,288 @@
+
+#include "../msdfgen.h"
+
+#include <vector>
+#include "edge-selectors.h"
+#include "contour-combiners.h"
+#include "ShapeDistanceFinder.h"
+
+namespace msdfgen {
+
+template <typename DistanceType>
+class DistancePixelConversion;
+
+template <>
+class DistancePixelConversion<double> {
+ double invRange;
+public:
+ typedef BitmapRef<float, 1> BitmapRefType;
+ inline explicit DistancePixelConversion(double range) : invRange(1/range) { }
+ inline void operator()(float *pixels, double distance) const {
+ *pixels = float(invRange*distance+.5);
+ }
+};
+
+template <>
+class DistancePixelConversion<MultiDistance> {
+ double invRange;
+public:
+ typedef BitmapRef<float, 3> BitmapRefType;
+ inline explicit DistancePixelConversion(double range) : invRange(1/range) { }
+ inline void operator()(float *pixels, const MultiDistance &distance) const {
+ pixels[0] = float(invRange*distance.r+.5);
+ pixels[1] = float(invRange*distance.g+.5);
+ pixels[2] = float(invRange*distance.b+.5);
+ }
+};
+
+template <>
+class DistancePixelConversion<MultiAndTrueDistance> {
+ double invRange;
+public:
+ typedef BitmapRef<float, 4> BitmapRefType;
+ inline explicit DistancePixelConversion(double range) : invRange(1/range) { }
+ inline void operator()(float *pixels, const MultiAndTrueDistance &distance) const {
+ pixels[0] = float(invRange*distance.r+.5);
+ pixels[1] = float(invRange*distance.g+.5);
+ pixels[2] = float(invRange*distance.b+.5);
+ pixels[3] = float(invRange*distance.a+.5);
+ }
+};
+
+template <class ContourCombiner>
+void generateDistanceField(const typename DistancePixelConversion<typename ContourCombiner::DistanceType>::BitmapRefType &output, const Shape &shape, const Projection &projection, double range) {
+ DistancePixelConversion<typename ContourCombiner::DistanceType> distancePixelConversion(range);
+#ifdef MSDFGEN_USE_OPENMP
+ #pragma omp parallel
+#endif
+ {
+ ShapeDistanceFinder<ContourCombiner> distanceFinder(shape);
+ bool rightToLeft = false;
+#ifdef MSDFGEN_USE_OPENMP
+ #pragma omp for
+#endif
+ for (int y = 0; y < output.height; ++y) {
+ int row = shape.inverseYAxis ? output.height-y-1 : y;
+ for (int col = 0; col < output.width; ++col) {
+ int x = rightToLeft ? output.width-col-1 : col;
+ Point2 p = projection.unproject(Point2(x+.5, y+.5));
+ typename ContourCombiner::DistanceType distance = distanceFinder.distance(p);
+ distancePixelConversion(output(x, row), distance);
+ }
+ rightToLeft = !rightToLeft;
+ }
+ }
+}
+
+void generateSDF(const BitmapRef<float, 1> &output, const Shape &shape, const Projection &projection, double range, const GeneratorConfig &config) {
+ if (config.overlapSupport)
+ generateDistanceField<OverlappingContourCombiner<TrueDistanceSelector> >(output, shape, projection, range);
+ else
+ generateDistanceField<SimpleContourCombiner<TrueDistanceSelector> >(output, shape, projection, range);
+}
+
+void generatePseudoSDF(const BitmapRef<float, 1> &output, const Shape &shape, const Projection &projection, double range, const GeneratorConfig &config) {
+ if (config.overlapSupport)
+ generateDistanceField<OverlappingContourCombiner<PseudoDistanceSelector> >(output, shape, projection, range);
+ else
+ generateDistanceField<SimpleContourCombiner<PseudoDistanceSelector> >(output, shape, projection, range);
+}
+
+void generateMSDF(const BitmapRef<float, 3> &output, const Shape &shape, const Projection &projection, double range, const MSDFGeneratorConfig &config) {
+ if (config.overlapSupport)
+ generateDistanceField<OverlappingContourCombiner<MultiDistanceSelector> >(output, shape, projection, range);
+ else
+ generateDistanceField<SimpleContourCombiner<MultiDistanceSelector> >(output, shape, projection, range);
+ msdfErrorCorrection(output, shape, projection, range, config);
+}
+
+void generateMTSDF(const BitmapRef<float, 4> &output, const Shape &shape, const Projection &projection, double range, const MSDFGeneratorConfig &config) {
+ if (config.overlapSupport)
+ generateDistanceField<OverlappingContourCombiner<MultiAndTrueDistanceSelector> >(output, shape, projection, range);
+ else
+ generateDistanceField<SimpleContourCombiner<MultiAndTrueDistanceSelector> >(output, shape, projection, range);
+ msdfErrorCorrection(output, shape, projection, range, config);
+}
+
+// Legacy API
+
+void generateSDF(const BitmapRef<float, 1> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate, bool overlapSupport) {
+ generateSDF(output, shape, Projection(scale, translate), range, GeneratorConfig(overlapSupport));
+}
+
+void generatePseudoSDF(const BitmapRef<float, 1> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate, bool overlapSupport) {
+ generatePseudoSDF(output, shape, Projection(scale, translate), range, GeneratorConfig(overlapSupport));
+}
+
+void generateMSDF(const BitmapRef<float, 3> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate, const ErrorCorrectionConfig &errorCorrectionConfig, bool overlapSupport) {
+ generateMSDF(output, shape, Projection(scale, translate), range, MSDFGeneratorConfig(overlapSupport, errorCorrectionConfig));
+}
+
+void generateMTSDF(const BitmapRef<float, 4> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate, const ErrorCorrectionConfig &errorCorrectionConfig, bool overlapSupport) {
+ generateMTSDF(output, shape, Projection(scale, translate), range, MSDFGeneratorConfig(overlapSupport, errorCorrectionConfig));
+}
+
+// Legacy version
+
+void generateSDF_legacy(const BitmapRef<float, 1> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate) {
+#ifdef MSDFGEN_USE_OPENMP
+ #pragma omp parallel for
+#endif
+ for (int y = 0; y < output.height; ++y) {
+ int row = shape.inverseYAxis ? output.height-y-1 : y;
+ for (int x = 0; x < output.width; ++x) {
+ double dummy;
+ Point2 p = Vector2(x+.5, y+.5)/scale-translate;
+ SignedDistance minDistance;
+ for (std::vector<Contour>::const_iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour)
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge) {
+ SignedDistance distance = (*edge)->signedDistance(p, dummy);
+ if (distance < minDistance)
+ minDistance = distance;
+ }
+ *output(x, row) = float(minDistance.distance/range+.5);
+ }
+ }
+}
+
+void generatePseudoSDF_legacy(const BitmapRef<float, 1> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate) {
+#ifdef MSDFGEN_USE_OPENMP
+ #pragma omp parallel for
+#endif
+ for (int y = 0; y < output.height; ++y) {
+ int row = shape.inverseYAxis ? output.height-y-1 : y;
+ for (int x = 0; x < output.width; ++x) {
+ Point2 p = Vector2(x+.5, y+.5)/scale-translate;
+ SignedDistance minDistance;
+ const EdgeHolder *nearEdge = NULL;
+ double nearParam = 0;
+ for (std::vector<Contour>::const_iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour)
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge) {
+ double param;
+ SignedDistance distance = (*edge)->signedDistance(p, param);
+ if (distance < minDistance) {
+ minDistance = distance;
+ nearEdge = &*edge;
+ nearParam = param;
+ }
+ }
+ if (nearEdge)
+ (*nearEdge)->distanceToPseudoDistance(minDistance, p, nearParam);
+ *output(x, row) = float(minDistance.distance/range+.5);
+ }
+ }
+}
+
+void generateMSDF_legacy(const BitmapRef<float, 3> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate, ErrorCorrectionConfig errorCorrectionConfig) {
+#ifdef MSDFGEN_USE_OPENMP
+ #pragma omp parallel for
+#endif
+ for (int y = 0; y < output.height; ++y) {
+ int row = shape.inverseYAxis ? output.height-y-1 : y;
+ for (int x = 0; x < output.width; ++x) {
+ Point2 p = Vector2(x+.5, y+.5)/scale-translate;
+
+ struct {
+ SignedDistance minDistance;
+ const EdgeHolder *nearEdge;
+ double nearParam;
+ } r, g, b;
+ r.nearEdge = g.nearEdge = b.nearEdge = NULL;
+ r.nearParam = g.nearParam = b.nearParam = 0;
+
+ for (std::vector<Contour>::const_iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour)
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge) {
+ double param;
+ SignedDistance distance = (*edge)->signedDistance(p, param);
+ if ((*edge)->color&RED && distance < r.minDistance) {
+ r.minDistance = distance;
+ r.nearEdge = &*edge;
+ r.nearParam = param;
+ }
+ if ((*edge)->color&GREEN && distance < g.minDistance) {
+ g.minDistance = distance;
+ g.nearEdge = &*edge;
+ g.nearParam = param;
+ }
+ if ((*edge)->color&BLUE && distance < b.minDistance) {
+ b.minDistance = distance;
+ b.nearEdge = &*edge;
+ b.nearParam = param;
+ }
+ }
+
+ if (r.nearEdge)
+ (*r.nearEdge)->distanceToPseudoDistance(r.minDistance, p, r.nearParam);
+ if (g.nearEdge)
+ (*g.nearEdge)->distanceToPseudoDistance(g.minDistance, p, g.nearParam);
+ if (b.nearEdge)
+ (*b.nearEdge)->distanceToPseudoDistance(b.minDistance, p, b.nearParam);
+ output(x, row)[0] = float(r.minDistance.distance/range+.5);
+ output(x, row)[1] = float(g.minDistance.distance/range+.5);
+ output(x, row)[2] = float(b.minDistance.distance/range+.5);
+ }
+ }
+
+ errorCorrectionConfig.distanceCheckMode = ErrorCorrectionConfig::DO_NOT_CHECK_DISTANCE;
+ msdfErrorCorrection(output, shape, Projection(scale, translate), range, MSDFGeneratorConfig(false, errorCorrectionConfig));
+}
+
+void generateMTSDF_legacy(const BitmapRef<float, 4> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate, ErrorCorrectionConfig errorCorrectionConfig) {
+#ifdef MSDFGEN_USE_OPENMP
+ #pragma omp parallel for
+#endif
+ for (int y = 0; y < output.height; ++y) {
+ int row = shape.inverseYAxis ? output.height-y-1 : y;
+ for (int x = 0; x < output.width; ++x) {
+ Point2 p = Vector2(x+.5, y+.5)/scale-translate;
+
+ SignedDistance minDistance;
+ struct {
+ SignedDistance minDistance;
+ const EdgeHolder *nearEdge;
+ double nearParam;
+ } r, g, b;
+ r.nearEdge = g.nearEdge = b.nearEdge = NULL;
+ r.nearParam = g.nearParam = b.nearParam = 0;
+
+ for (std::vector<Contour>::const_iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour)
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge) {
+ double param;
+ SignedDistance distance = (*edge)->signedDistance(p, param);
+ if (distance < minDistance)
+ minDistance = distance;
+ if ((*edge)->color&RED && distance < r.minDistance) {
+ r.minDistance = distance;
+ r.nearEdge = &*edge;
+ r.nearParam = param;
+ }
+ if ((*edge)->color&GREEN && distance < g.minDistance) {
+ g.minDistance = distance;
+ g.nearEdge = &*edge;
+ g.nearParam = param;
+ }
+ if ((*edge)->color&BLUE && distance < b.minDistance) {
+ b.minDistance = distance;
+ b.nearEdge = &*edge;
+ b.nearParam = param;
+ }
+ }
+
+ if (r.nearEdge)
+ (*r.nearEdge)->distanceToPseudoDistance(r.minDistance, p, r.nearParam);
+ if (g.nearEdge)
+ (*g.nearEdge)->distanceToPseudoDistance(g.minDistance, p, g.nearParam);
+ if (b.nearEdge)
+ (*b.nearEdge)->distanceToPseudoDistance(b.minDistance, p, b.nearParam);
+ output(x, row)[0] = float(r.minDistance.distance/range+.5);
+ output(x, row)[1] = float(g.minDistance.distance/range+.5);
+ output(x, row)[2] = float(b.minDistance.distance/range+.5);
+ output(x, row)[3] = float(minDistance.distance/range+.5);
+ }
+ }
+
+ errorCorrectionConfig.distanceCheckMode = ErrorCorrectionConfig::DO_NOT_CHECK_DISTANCE;
+ msdfErrorCorrection(output, shape, Projection(scale, translate), range, MSDFGeneratorConfig(false, errorCorrectionConfig));
+}
+
+}
diff --git a/thirdparty/msdfgen/core/pixel-conversion.hpp b/thirdparty/msdfgen/core/pixel-conversion.hpp
new file mode 100644
index 0000000000..7e9b6d08f0
--- /dev/null
+++ b/thirdparty/msdfgen/core/pixel-conversion.hpp
@@ -0,0 +1,18 @@
+
+#pragma once
+
+#include "arithmetics.hpp"
+
+namespace msdfgen {
+
+typedef unsigned char byte;
+
+inline byte pixelFloatToByte(float x) {
+ return byte(clamp(256.f*x, 255.f));
+}
+
+inline float pixelByteToFloat(byte x) {
+ return 1.f/255.f*float(x);
+}
+
+}
diff --git a/thirdparty/msdfgen/core/rasterization.cpp b/thirdparty/msdfgen/core/rasterization.cpp
new file mode 100644
index 0000000000..9aa695a8c1
--- /dev/null
+++ b/thirdparty/msdfgen/core/rasterization.cpp
@@ -0,0 +1,115 @@
+
+#include "rasterization.h"
+
+#include <vector>
+#include "arithmetics.hpp"
+
+namespace msdfgen {
+
+void rasterize(const BitmapRef<float, 1> &output, const Shape &shape, const Projection &projection, FillRule fillRule) {
+ Scanline scanline;
+ for (int y = 0; y < output.height; ++y) {
+ int row = shape.inverseYAxis ? output.height-y-1 : y;
+ shape.scanline(scanline, projection.unprojectY(y+.5));
+ for (int x = 0; x < output.width; ++x)
+ *output(x, row) = (float) scanline.filled(projection.unprojectX(x+.5), fillRule);
+ }
+}
+
+void distanceSignCorrection(const BitmapRef<float, 1> &sdf, const Shape &shape, const Projection &projection, FillRule fillRule) {
+ Scanline scanline;
+ for (int y = 0; y < sdf.height; ++y) {
+ int row = shape.inverseYAxis ? sdf.height-y-1 : y;
+ shape.scanline(scanline, projection.unprojectY(y+.5));
+ for (int x = 0; x < sdf.width; ++x) {
+ bool fill = scanline.filled(projection.unprojectX(x+.5), fillRule);
+ float &sd = *sdf(x, row);
+ if ((sd > .5f) != fill)
+ sd = 1.f-sd;
+ }
+ }
+}
+
+template <int N>
+static void multiDistanceSignCorrection(const BitmapRef<float, N> &sdf, const Shape &shape, const Projection &projection, FillRule fillRule) {
+ int w = sdf.width, h = sdf.height;
+ if (!(w*h))
+ return;
+ Scanline scanline;
+ bool ambiguous = false;
+ std::vector<char> matchMap;
+ matchMap.resize(w*h);
+ char *match = &matchMap[0];
+ for (int y = 0; y < h; ++y) {
+ int row = shape.inverseYAxis ? h-y-1 : y;
+ shape.scanline(scanline, projection.unprojectY(y+.5));
+ for (int x = 0; x < w; ++x) {
+ bool fill = scanline.filled(projection.unprojectX(x+.5), fillRule);
+ float *msd = sdf(x, row);
+ float sd = median(msd[0], msd[1], msd[2]);
+ if (sd == .5f)
+ ambiguous = true;
+ else if ((sd > .5f) != fill) {
+ msd[0] = 1.f-msd[0];
+ msd[1] = 1.f-msd[1];
+ msd[2] = 1.f-msd[2];
+ *match = -1;
+ } else
+ *match = 1;
+ if (N >= 4 && (msd[3] > .5f) != fill)
+ msd[3] = 1.f-msd[3];
+ ++match;
+ }
+ }
+ // This step is necessary to avoid artifacts when whole shape is inverted
+ if (ambiguous) {
+ match = &matchMap[0];
+ for (int y = 0; y < h; ++y) {
+ int row = shape.inverseYAxis ? h-y-1 : y;
+ for (int x = 0; x < w; ++x) {
+ if (!*match) {
+ int neighborMatch = 0;
+ if (x > 0) neighborMatch += *(match-1);
+ if (x < w-1) neighborMatch += *(match+1);
+ if (y > 0) neighborMatch += *(match-w);
+ if (y < h-1) neighborMatch += *(match+w);
+ if (neighborMatch < 0) {
+ float *msd = sdf(x, row);
+ msd[0] = 1.f-msd[0];
+ msd[1] = 1.f-msd[1];
+ msd[2] = 1.f-msd[2];
+ }
+ }
+ ++match;
+ }
+ }
+ }
+}
+
+void distanceSignCorrection(const BitmapRef<float, 3> &sdf, const Shape &shape, const Projection &projection, FillRule fillRule) {
+ multiDistanceSignCorrection(sdf, shape, projection, fillRule);
+}
+
+void distanceSignCorrection(const BitmapRef<float, 4> &sdf, const Shape &shape, const Projection &projection, FillRule fillRule) {
+ multiDistanceSignCorrection(sdf, shape, projection, fillRule);
+}
+
+// Legacy API
+
+void rasterize(const BitmapRef<float, 1> &output, const Shape &shape, const Vector2 &scale, const Vector2 &translate, FillRule fillRule) {
+ rasterize(output, shape, Projection(scale, translate), fillRule);
+}
+
+void distanceSignCorrection(const BitmapRef<float, 1> &sdf, const Shape &shape, const Vector2 &scale, const Vector2 &translate, FillRule fillRule) {
+ distanceSignCorrection(sdf, shape, Projection(scale, translate), fillRule);
+}
+
+void distanceSignCorrection(const BitmapRef<float, 3> &sdf, const Shape &shape, const Vector2 &scale, const Vector2 &translate, FillRule fillRule) {
+ distanceSignCorrection(sdf, shape, Projection(scale, translate), fillRule);
+}
+
+void distanceSignCorrection(const BitmapRef<float, 4> &sdf, const Shape &shape, const Vector2 &scale, const Vector2 &translate, FillRule fillRule) {
+ distanceSignCorrection(sdf, shape, Projection(scale, translate), fillRule);
+}
+
+}
diff --git a/thirdparty/msdfgen/core/rasterization.h b/thirdparty/msdfgen/core/rasterization.h
new file mode 100644
index 0000000000..82d0c73d95
--- /dev/null
+++ b/thirdparty/msdfgen/core/rasterization.h
@@ -0,0 +1,25 @@
+
+#pragma once
+
+#include "Vector2.h"
+#include "Shape.h"
+#include "Projection.h"
+#include "Scanline.h"
+#include "BitmapRef.hpp"
+
+namespace msdfgen {
+
+/// Rasterizes the shape into a monochrome bitmap.
+void rasterize(const BitmapRef<float, 1> &output, const Shape &shape, const Projection &projection, FillRule fillRule = FILL_NONZERO);
+/// Fixes the sign of the input signed distance field, so that it matches the shape's rasterized fill.
+void distanceSignCorrection(const BitmapRef<float, 1> &sdf, const Shape &shape, const Projection &projection, FillRule fillRule = FILL_NONZERO);
+void distanceSignCorrection(const BitmapRef<float, 3> &sdf, const Shape &shape, const Projection &projection, FillRule fillRule = FILL_NONZERO);
+void distanceSignCorrection(const BitmapRef<float, 4> &sdf, const Shape &shape, const Projection &projection, FillRule fillRule = FILL_NONZERO);
+
+// Old version of the function API's kept for backwards compatibility
+void rasterize(const BitmapRef<float, 1> &output, const Shape &shape, const Vector2 &scale, const Vector2 &translate, FillRule fillRule = FILL_NONZERO);
+void distanceSignCorrection(const BitmapRef<float, 1> &sdf, const Shape &shape, const Vector2 &scale, const Vector2 &translate, FillRule fillRule = FILL_NONZERO);
+void distanceSignCorrection(const BitmapRef<float, 3> &sdf, const Shape &shape, const Vector2 &scale, const Vector2 &translate, FillRule fillRule = FILL_NONZERO);
+void distanceSignCorrection(const BitmapRef<float, 4> &sdf, const Shape &shape, const Vector2 &scale, const Vector2 &translate, FillRule fillRule = FILL_NONZERO);
+
+}
diff --git a/thirdparty/msdfgen/core/render-sdf.cpp b/thirdparty/msdfgen/core/render-sdf.cpp
new file mode 100644
index 0000000000..e282285e59
--- /dev/null
+++ b/thirdparty/msdfgen/core/render-sdf.cpp
@@ -0,0 +1,108 @@
+
+#include "render-sdf.h"
+
+#include "arithmetics.hpp"
+#include "pixel-conversion.hpp"
+#include "bitmap-interpolation.hpp"
+
+namespace msdfgen {
+
+static float distVal(float dist, double pxRange, float midValue) {
+ if (!pxRange)
+ return (float) (dist > midValue);
+ return (float) clamp((dist-midValue)*pxRange+.5);
+}
+
+void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 1> &sdf, double pxRange, float midValue) {
+ Vector2 scale((double) sdf.width/output.width, (double) sdf.height/output.height);
+ pxRange *= (double) (output.width+output.height)/(sdf.width+sdf.height);
+ for (int y = 0; y < output.height; ++y)
+ for (int x = 0; x < output.width; ++x) {
+ float sd;
+ interpolate(&sd, sdf, scale*Point2(x+.5, y+.5));
+ *output(x, y) = distVal(sd, pxRange, midValue);
+ }
+}
+
+void renderSDF(const BitmapRef<float, 3> &output, const BitmapConstRef<float, 1> &sdf, double pxRange, float midValue) {
+ Vector2 scale((double) sdf.width/output.width, (double) sdf.height/output.height);
+ pxRange *= (double) (output.width+output.height)/(sdf.width+sdf.height);
+ for (int y = 0; y < output.height; ++y)
+ for (int x = 0; x < output.width; ++x) {
+ float sd;
+ interpolate(&sd, sdf, scale*Point2(x+.5, y+.5));
+ float v = distVal(sd, pxRange, midValue);
+ output(x, y)[0] = v;
+ output(x, y)[1] = v;
+ output(x, y)[2] = v;
+ }
+}
+
+void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 3> &sdf, double pxRange, float midValue) {
+ Vector2 scale((double) sdf.width/output.width, (double) sdf.height/output.height);
+ pxRange *= (double) (output.width+output.height)/(sdf.width+sdf.height);
+ for (int y = 0; y < output.height; ++y)
+ for (int x = 0; x < output.width; ++x) {
+ float sd[3];
+ interpolate(sd, sdf, scale*Point2(x+.5, y+.5));
+ *output(x, y) = distVal(median(sd[0], sd[1], sd[2]), pxRange, midValue);
+ }
+}
+
+void renderSDF(const BitmapRef<float, 3> &output, const BitmapConstRef<float, 3> &sdf, double pxRange, float midValue) {
+ Vector2 scale((double) sdf.width/output.width, (double) sdf.height/output.height);
+ pxRange *= (double) (output.width+output.height)/(sdf.width+sdf.height);
+ for (int y = 0; y < output.height; ++y)
+ for (int x = 0; x < output.width; ++x) {
+ float sd[3];
+ interpolate(sd, sdf, scale*Point2(x+.5, y+.5));
+ output(x, y)[0] = distVal(sd[0], pxRange, midValue);
+ output(x, y)[1] = distVal(sd[1], pxRange, midValue);
+ output(x, y)[2] = distVal(sd[2], pxRange, midValue);
+ }
+}
+
+void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 4> &sdf, double pxRange, float midValue) {
+ Vector2 scale((double) sdf.width/output.width, (double) sdf.height/output.height);
+ pxRange *= (double) (output.width+output.height)/(sdf.width+sdf.height);
+ for (int y = 0; y < output.height; ++y)
+ for (int x = 0; x < output.width; ++x) {
+ float sd[4];
+ interpolate(sd, sdf, scale*Point2(x+.5, y+.5));
+ *output(x, y) = distVal(median(sd[0], sd[1], sd[2]), pxRange, midValue);
+ }
+}
+
+void renderSDF(const BitmapRef<float, 4> &output, const BitmapConstRef<float, 4> &sdf, double pxRange, float midValue) {
+ Vector2 scale((double) sdf.width/output.width, (double) sdf.height/output.height);
+ pxRange *= (double) (output.width+output.height)/(sdf.width+sdf.height);
+ for (int y = 0; y < output.height; ++y)
+ for (int x = 0; x < output.width; ++x) {
+ float sd[4];
+ interpolate(sd, sdf, scale*Point2(x+.5, y+.5));
+ output(x, y)[0] = distVal(sd[0], pxRange, midValue);
+ output(x, y)[1] = distVal(sd[1], pxRange, midValue);
+ output(x, y)[2] = distVal(sd[2], pxRange, midValue);
+ output(x, y)[3] = distVal(sd[3], pxRange, midValue);
+ }
+}
+
+void simulate8bit(const BitmapRef<float, 1> &bitmap) {
+ const float *end = bitmap.pixels+1*bitmap.width*bitmap.height;
+ for (float *p = bitmap.pixels; p < end; ++p)
+ *p = pixelByteToFloat(pixelFloatToByte(*p));
+}
+
+void simulate8bit(const BitmapRef<float, 3> &bitmap) {
+ const float *end = bitmap.pixels+3*bitmap.width*bitmap.height;
+ for (float *p = bitmap.pixels; p < end; ++p)
+ *p = pixelByteToFloat(pixelFloatToByte(*p));
+}
+
+void simulate8bit(const BitmapRef<float, 4> &bitmap) {
+ const float *end = bitmap.pixels+4*bitmap.width*bitmap.height;
+ for (float *p = bitmap.pixels; p < end; ++p)
+ *p = pixelByteToFloat(pixelFloatToByte(*p));
+}
+
+}
diff --git a/thirdparty/msdfgen/core/render-sdf.h b/thirdparty/msdfgen/core/render-sdf.h
new file mode 100644
index 0000000000..7f2d270b67
--- /dev/null
+++ b/thirdparty/msdfgen/core/render-sdf.h
@@ -0,0 +1,22 @@
+
+#pragma once
+
+#include "Vector2.h"
+#include "BitmapRef.hpp"
+
+namespace msdfgen {
+
+/// Reconstructs the shape's appearance into output from the distance field sdf.
+void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 1> &sdf, double pxRange = 0, float midValue = .5f);
+void renderSDF(const BitmapRef<float, 3> &output, const BitmapConstRef<float, 1> &sdf, double pxRange = 0, float midValue = .5f);
+void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 3> &sdf, double pxRange = 0, float midValue = .5f);
+void renderSDF(const BitmapRef<float, 3> &output, const BitmapConstRef<float, 3> &sdf, double pxRange = 0, float midValue = .5f);
+void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 4> &sdf, double pxRange = 0, float midValue = .5f);
+void renderSDF(const BitmapRef<float, 4> &output, const BitmapConstRef<float, 4> &sdf, double pxRange = 0, float midValue = .5f);
+
+/// Snaps the values of the floating-point bitmaps into one of the 256 values representable in a standard 8-bit bitmap.
+void simulate8bit(const BitmapRef<float, 1> &bitmap);
+void simulate8bit(const BitmapRef<float, 3> &bitmap);
+void simulate8bit(const BitmapRef<float, 4> &bitmap);
+
+}
diff --git a/thirdparty/msdfgen/core/save-bmp.cpp b/thirdparty/msdfgen/core/save-bmp.cpp
new file mode 100644
index 0000000000..f761ee4f88
--- /dev/null
+++ b/thirdparty/msdfgen/core/save-bmp.cpp
@@ -0,0 +1,169 @@
+
+#define _CRT_SECURE_NO_WARNINGS
+
+#include "save-bmp.h"
+
+#include <cstdio>
+
+#ifdef MSDFGEN_USE_CPP11
+ #include <cstdint>
+#else
+ typedef int int32_t;
+ typedef unsigned uint32_t;
+ typedef unsigned short uint16_t;
+ typedef unsigned char uint8_t;
+#endif
+
+#include "pixel-conversion.hpp"
+
+namespace msdfgen {
+
+template <typename T>
+static bool writeValue(FILE *file, T value) {
+ #ifdef __BIG_ENDIAN__
+ T reverse = 0;
+ for (int i = 0; i < sizeof(T); ++i) {
+ reverse <<= 8;
+ reverse |= value&T(0xff);
+ value >>= 8;
+ }
+ return fwrite(&reverse, sizeof(T), 1, file) == 1;
+ #else
+ return fwrite(&value, sizeof(T), 1, file) == 1;
+ #endif
+}
+
+static bool writeBmpHeader(FILE *file, int width, int height, int &paddedWidth) {
+ paddedWidth = (3*width+3)&~3;
+ const uint32_t bitmapStart = 54;
+ const uint32_t bitmapSize = paddedWidth*height;
+ const uint32_t fileSize = bitmapStart+bitmapSize;
+
+ writeValue<uint16_t>(file, 0x4d42u);
+ writeValue<uint32_t>(file, fileSize);
+ writeValue<uint16_t>(file, 0);
+ writeValue<uint16_t>(file, 0);
+ writeValue<uint32_t>(file, bitmapStart);
+
+ writeValue<uint32_t>(file, 40);
+ writeValue<int32_t>(file, width);
+ writeValue<int32_t>(file, height);
+ writeValue<uint16_t>(file, 1);
+ writeValue<uint16_t>(file, 24);
+ writeValue<uint32_t>(file, 0);
+ writeValue<uint32_t>(file, bitmapSize);
+ writeValue<uint32_t>(file, 2835);
+ writeValue<uint32_t>(file, 2835);
+ writeValue<uint32_t>(file, 0);
+ writeValue<uint32_t>(file, 0);
+
+ return true;
+}
+
+bool saveBmp(const BitmapConstRef<byte, 1> &bitmap, const char *filename) {
+ FILE *file = fopen(filename, "wb");
+ if (!file)
+ return false;
+
+ int paddedWidth;
+ writeBmpHeader(file, bitmap.width, bitmap.height, paddedWidth);
+
+ const uint8_t padding[4] = { };
+ int padLength = paddedWidth-3*bitmap.width;
+ for (int y = 0; y < bitmap.height; ++y) {
+ for (int x = 0; x < bitmap.width; ++x) {
+ uint8_t px = (uint8_t) *bitmap(x, y);
+ fwrite(&px, sizeof(uint8_t), 1, file);
+ fwrite(&px, sizeof(uint8_t), 1, file);
+ fwrite(&px, sizeof(uint8_t), 1, file);
+ }
+ fwrite(padding, 1, padLength, file);
+ }
+
+ return !fclose(file);
+}
+
+bool saveBmp(const BitmapConstRef<byte, 3> &bitmap, const char *filename) {
+ FILE *file = fopen(filename, "wb");
+ if (!file)
+ return false;
+
+ int paddedWidth;
+ writeBmpHeader(file, bitmap.width, bitmap.height, paddedWidth);
+
+ const uint8_t padding[4] = { };
+ int padLength = paddedWidth-3*bitmap.width;
+ for (int y = 0; y < bitmap.height; ++y) {
+ for (int x = 0; x < bitmap.width; ++x) {
+ uint8_t bgr[3] = {
+ (uint8_t) bitmap(x, y)[2],
+ (uint8_t) bitmap(x, y)[1],
+ (uint8_t) bitmap(x, y)[0]
+ };
+ fwrite(bgr, sizeof(uint8_t), 3, file);
+ }
+ fwrite(padding, 1, padLength, file);
+ }
+
+ return !fclose(file);
+}
+
+bool saveBmp(const BitmapConstRef<byte, 4> &bitmap, const char *filename) {
+ // RGBA not supported by the BMP format
+ return false;
+}
+
+bool saveBmp(const BitmapConstRef<float, 1> &bitmap, const char *filename) {
+ FILE *file = fopen(filename, "wb");
+ if (!file)
+ return false;
+
+ int paddedWidth;
+ writeBmpHeader(file, bitmap.width, bitmap.height, paddedWidth);
+
+ const uint8_t padding[4] = { };
+ int padLength = paddedWidth-3*bitmap.width;
+ for (int y = 0; y < bitmap.height; ++y) {
+ for (int x = 0; x < bitmap.width; ++x) {
+ uint8_t px = (uint8_t) pixelFloatToByte(*bitmap(x, y));
+ fwrite(&px, sizeof(uint8_t), 1, file);
+ fwrite(&px, sizeof(uint8_t), 1, file);
+ fwrite(&px, sizeof(uint8_t), 1, file);
+ }
+ fwrite(padding, 1, padLength, file);
+ }
+
+ return !fclose(file);
+}
+
+bool saveBmp(const BitmapConstRef<float, 3> &bitmap, const char *filename) {
+ FILE *file = fopen(filename, "wb");
+ if (!file)
+ return false;
+
+ int paddedWidth;
+ writeBmpHeader(file, bitmap.width, bitmap.height, paddedWidth);
+
+ const uint8_t padding[4] = { };
+ int padLength = paddedWidth-3*bitmap.width;
+ for (int y = 0; y < bitmap.height; ++y) {
+ for (int x = 0; x < bitmap.width; ++x) {
+ uint8_t bgr[3] = {
+ (uint8_t) pixelFloatToByte(bitmap(x, y)[2]),
+ (uint8_t) pixelFloatToByte(bitmap(x, y)[1]),
+ (uint8_t) pixelFloatToByte(bitmap(x, y)[0])
+ };
+ fwrite(bgr, sizeof(uint8_t), 3, file);
+ }
+ fwrite(padding, 1, padLength, file);
+ }
+
+ return !fclose(file);
+}
+
+bool saveBmp(const BitmapConstRef<float, 4> &bitmap, const char *filename) {
+ // RGBA not supported by the BMP format
+ return false;
+}
+
+}
diff --git a/thirdparty/msdfgen/core/save-bmp.h b/thirdparty/msdfgen/core/save-bmp.h
new file mode 100644
index 0000000000..98f852921f
--- /dev/null
+++ b/thirdparty/msdfgen/core/save-bmp.h
@@ -0,0 +1,16 @@
+
+#pragma once
+
+#include "BitmapRef.hpp"
+
+namespace msdfgen {
+
+/// Saves the bitmap as a BMP file.
+bool saveBmp(const BitmapConstRef<byte, 1> &bitmap, const char *filename);
+bool saveBmp(const BitmapConstRef<byte, 3> &bitmap, const char *filename);
+bool saveBmp(const BitmapConstRef<byte, 4> &bitmap, const char *filename);
+bool saveBmp(const BitmapConstRef<float, 1> &bitmap, const char *filename);
+bool saveBmp(const BitmapConstRef<float, 3> &bitmap, const char *filename);
+bool saveBmp(const BitmapConstRef<float, 4> &bitmap, const char *filename);
+
+}
diff --git a/thirdparty/msdfgen/core/save-tiff.cpp b/thirdparty/msdfgen/core/save-tiff.cpp
new file mode 100644
index 0000000000..71405e00e5
--- /dev/null
+++ b/thirdparty/msdfgen/core/save-tiff.cpp
@@ -0,0 +1,190 @@
+
+#define _CRT_SECURE_NO_WARNINGS
+
+#include "save-tiff.h"
+
+#include <cstdio>
+
+#ifdef MSDFGEN_USE_CPP11
+ #include <cstdint>
+#else
+ typedef int int32_t;
+ typedef unsigned uint32_t;
+ typedef unsigned short uint16_t;
+ typedef unsigned char uint8_t;
+#endif
+
+namespace msdfgen {
+
+template <typename T>
+static bool writeValue(FILE *file, T value) {
+ return fwrite(&value, sizeof(T), 1, file) == 1;
+}
+template <typename T>
+static void writeValueRepeated(FILE *file, T value, int times) {
+ for (int i = 0; i < times; ++i)
+ writeValue(file, value);
+}
+
+static bool writeTiffHeader(FILE *file, int width, int height, int channels) {
+ #ifdef __BIG_ENDIAN__
+ writeValue<uint16_t>(file, 0x4d4du);
+ #else
+ writeValue<uint16_t>(file, 0x4949u);
+ #endif
+ writeValue<uint16_t>(file, 42);
+ writeValue<uint32_t>(file, 0x0008u); // Offset of first IFD
+ // Offset = 0x0008
+
+ writeValue<uint16_t>(file, 15); // Number of IFD entries
+
+ // ImageWidth
+ writeValue<uint16_t>(file, 0x0100u);
+ writeValue<uint16_t>(file, 0x0004u);
+ writeValue<uint32_t>(file, 1);
+ writeValue<int32_t>(file, width);
+ // ImageLength
+ writeValue<uint16_t>(file, 0x0101u);
+ writeValue<uint16_t>(file, 0x0004u);
+ writeValue<uint32_t>(file, 1);
+ writeValue<int32_t>(file, height);
+ // BitsPerSample
+ writeValue<uint16_t>(file, 0x0102u);
+ writeValue<uint16_t>(file, 0x0003u);
+ writeValue<uint32_t>(file, channels);
+ if (channels > 1)
+ writeValue<uint32_t>(file, 0x00c2u); // Offset of 32, 32, ...
+ else {
+ writeValue<uint16_t>(file, 32);
+ writeValue<uint16_t>(file, 0);
+ }
+ // Compression
+ writeValue<uint16_t>(file, 0x0103u);
+ writeValue<uint16_t>(file, 0x0003u);
+ writeValue<uint32_t>(file, 1);
+ writeValue<uint16_t>(file, 1);
+ writeValue<uint16_t>(file, 0);
+ // PhotometricInterpretation
+ writeValue<uint16_t>(file, 0x0106u);
+ writeValue<uint16_t>(file, 0x0003u);
+ writeValue<uint32_t>(file, 1);
+ writeValue<uint16_t>(file, channels >= 3 ? 2 : 1);
+ writeValue<uint16_t>(file, 0);
+ // StripOffsets
+ writeValue<uint16_t>(file, 0x0111u);
+ writeValue<uint16_t>(file, 0x0004u);
+ writeValue<uint32_t>(file, 1);
+ writeValue<uint32_t>(file, 0x00d2u+(channels > 1)*channels*12); // Offset of pixel data
+ // SamplesPerPixel
+ writeValue<uint16_t>(file, 0x0115u);
+ writeValue<uint16_t>(file, 0x0003u);
+ writeValue<uint32_t>(file, 1);
+ writeValue<uint16_t>(file, channels);
+ writeValue<uint16_t>(file, 0);
+ // RowsPerStrip
+ writeValue<uint16_t>(file, 0x0116u);
+ writeValue<uint16_t>(file, 0x0004u);
+ writeValue<uint32_t>(file, 1);
+ writeValue<int32_t>(file, height);
+ // StripByteCounts
+ writeValue<uint16_t>(file, 0x0117u);
+ writeValue<uint16_t>(file, 0x0004u);
+ writeValue<uint32_t>(file, 1);
+ writeValue<int32_t>(file, sizeof(float)*channels*width*height);
+ // XResolution
+ writeValue<uint16_t>(file, 0x011au);
+ writeValue<uint16_t>(file, 0x0005u);
+ writeValue<uint32_t>(file, 1);
+ writeValue<uint32_t>(file, 0x00c2u+(channels > 1)*channels*2); // Offset of 300, 1
+ // YResolution
+ writeValue<uint16_t>(file, 0x011bu);
+ writeValue<uint16_t>(file, 0x0005u);
+ writeValue<uint32_t>(file, 1);
+ writeValue<uint32_t>(file, 0x00cau+(channels > 1)*channels*2); // Offset of 300, 1
+ // ResolutionUnit
+ writeValue<uint16_t>(file, 0x0128u);
+ writeValue<uint16_t>(file, 0x0003u);
+ writeValue<uint32_t>(file, 1);
+ writeValue<uint16_t>(file, 2);
+ writeValue<uint16_t>(file, 0);
+ // SampleFormat
+ writeValue<uint16_t>(file, 0x0153u);
+ writeValue<uint16_t>(file, 0x0003u);
+ writeValue<uint32_t>(file, channels);
+ if (channels > 1)
+ writeValue<uint32_t>(file, 0x00d2u+channels*2); // Offset of 3, 3, ...
+ else {
+ writeValue<uint16_t>(file, 3);
+ writeValue<uint16_t>(file, 0);
+ }
+ // SMinSampleValue
+ writeValue<uint16_t>(file, 0x0154u);
+ writeValue<uint16_t>(file, 0x000bu);
+ writeValue<uint32_t>(file, channels);
+ if (channels > 1)
+ writeValue<uint32_t>(file, 0x00d2u+channels*4); // Offset of 0.f, 0.f, ...
+ else
+ writeValue<float>(file, 0.f);
+ // SMaxSampleValue
+ writeValue<uint16_t>(file, 0x0155u);
+ writeValue<uint16_t>(file, 0x000bu);
+ writeValue<uint32_t>(file, channels);
+ if (channels > 1)
+ writeValue<uint32_t>(file, 0x00d2u+channels*8); // Offset of 1.f, 1.f, ...
+ else
+ writeValue<float>(file, 1.f);
+ // Offset = 0x00be
+
+ writeValue<uint32_t>(file, 0);
+
+ if (channels > 1) {
+ // 0x00c2 BitsPerSample data
+ writeValueRepeated<uint16_t>(file, 32, channels);
+ // 0x00c2 + 2*N XResolution data
+ writeValue<uint32_t>(file, 300);
+ writeValue<uint32_t>(file, 1);
+ // 0x00ca + 2*N YResolution data
+ writeValue<uint32_t>(file, 300);
+ writeValue<uint32_t>(file, 1);
+ // 0x00d2 + 2*N SampleFormat data
+ writeValueRepeated<uint16_t>(file, 3, channels);
+ // 0x00d2 + 4*N SMinSampleValue data
+ writeValueRepeated<float>(file, 0.f, channels);
+ // 0x00d2 + 8*N SMaxSampleValue data
+ writeValueRepeated<float>(file, 1.f, channels);
+ // Offset = 0x00d2 + 12*N
+ } else {
+ // 0x00c2 XResolution data
+ writeValue<uint32_t>(file, 300);
+ writeValue<uint32_t>(file, 1);
+ // 0x00ca YResolution data
+ writeValue<uint32_t>(file, 300);
+ writeValue<uint32_t>(file, 1);
+ // Offset = 0x00d2
+ }
+
+ return true;
+}
+
+template <int N>
+bool saveTiffFloat(const BitmapConstRef<float, N> &bitmap, const char *filename) {
+ FILE *file = fopen(filename, "wb");
+ if (!file)
+ return false;
+ writeTiffHeader(file, bitmap.width, bitmap.height, N);
+ for (int y = bitmap.height-1; y >= 0; --y)
+ fwrite(bitmap(0, y), sizeof(float), N*bitmap.width, file);
+ return !fclose(file);
+}
+
+bool saveTiff(const BitmapConstRef<float, 1> &bitmap, const char *filename) {
+ return saveTiffFloat(bitmap, filename);
+}
+bool saveTiff(const BitmapConstRef<float, 3> &bitmap, const char *filename) {
+ return saveTiffFloat(bitmap, filename);
+}
+bool saveTiff(const BitmapConstRef<float, 4> &bitmap, const char *filename) {
+ return saveTiffFloat(bitmap, filename);
+}
+
+}
diff --git a/thirdparty/msdfgen/core/save-tiff.h b/thirdparty/msdfgen/core/save-tiff.h
new file mode 100644
index 0000000000..072cd71d50
--- /dev/null
+++ b/thirdparty/msdfgen/core/save-tiff.h
@@ -0,0 +1,13 @@
+
+#pragma once
+
+#include "BitmapRef.hpp"
+
+namespace msdfgen {
+
+/// Saves the bitmap as an uncompressed floating-point TIFF file.
+bool saveTiff(const BitmapConstRef<float, 1> &bitmap, const char *filename);
+bool saveTiff(const BitmapConstRef<float, 3> &bitmap, const char *filename);
+bool saveTiff(const BitmapConstRef<float, 4> &bitmap, const char *filename);
+
+}
diff --git a/thirdparty/msdfgen/core/sdf-error-estimation.cpp b/thirdparty/msdfgen/core/sdf-error-estimation.cpp
new file mode 100644
index 0000000000..7c00c449a9
--- /dev/null
+++ b/thirdparty/msdfgen/core/sdf-error-estimation.cpp
@@ -0,0 +1,192 @@
+
+#include "sdf-error-estimation.h"
+
+#include <cmath>
+#include "arithmetics.hpp"
+
+namespace msdfgen {
+
+void scanlineSDF(Scanline &line, const BitmapConstRef<float, 1> &sdf, const Projection &projection, double y, bool inverseYAxis) {
+ if (!(sdf.width > 0 && sdf.height > 0))
+ return line.setIntersections(std::vector<Scanline::Intersection>());
+ double pixelY = clamp(projection.projectY(y)-.5, double(sdf.height-1));
+ if (inverseYAxis)
+ pixelY = sdf.height-1-pixelY;
+ int b = (int) floor(pixelY);
+ int t = b+1;
+ double bt = pixelY-b;
+ if (t >= sdf.height) {
+ b = sdf.height-1;
+ t = sdf.height-1;
+ bt = 1;
+ }
+ bool inside = false;
+ std::vector<Scanline::Intersection> intersections;
+ float lv, rv = mix(*sdf(0, b), *sdf(0, t), bt);
+ if ((inside = rv > .5f)) {
+ Scanline::Intersection intersection = { -1e240, 1 };
+ intersections.push_back(intersection);
+ }
+ for (int l = 0, r = 1; r < sdf.width; ++l, ++r) {
+ lv = rv;
+ rv = mix(*sdf(r, b), *sdf(r, t), bt);
+ if (lv != rv) {
+ double lr = double(.5f-lv)/double(rv-lv);
+ if (lr >= 0 && lr <= 1) {
+ Scanline::Intersection intersection = { projection.unprojectX(l+lr+.5), sign(rv-lv) };
+ intersections.push_back(intersection);
+ }
+ }
+ }
+#ifdef MSDFGEN_USE_CPP11
+ line.setIntersections((std::vector<Scanline::Intersection> &&) intersections);
+#else
+ line.setIntersections(intersections);
+#endif
+}
+
+template <int N>
+void scanlineMSDF(Scanline &line, const BitmapConstRef<float, N> &sdf, const Projection &projection, double y, bool inverseYAxis) {
+ if (!(sdf.width > 0 && sdf.height > 0))
+ return line.setIntersections(std::vector<Scanline::Intersection>());
+ double pixelY = clamp(projection.projectY(y)-.5, double(sdf.height-1));
+ if (inverseYAxis)
+ pixelY = sdf.height-1-pixelY;
+ int b = (int) floor(pixelY);
+ int t = b+1;
+ double bt = pixelY-b;
+ if (t >= sdf.height) {
+ b = sdf.height-1;
+ t = sdf.height-1;
+ bt = 1;
+ }
+ bool inside = false;
+ std::vector<Scanline::Intersection> intersections;
+ float lv[3], rv[3];
+ rv[0] = mix(sdf(0, b)[0], sdf(0, t)[0], bt);
+ rv[1] = mix(sdf(0, b)[1], sdf(0, t)[1], bt);
+ rv[2] = mix(sdf(0, b)[2], sdf(0, t)[2], bt);
+ if ((inside = median(rv[0], rv[1], rv[2]) > .5f)) {
+ Scanline::Intersection intersection = { -1e240, 1 };
+ intersections.push_back(intersection);
+ }
+ for (int l = 0, r = 1; r < sdf.width; ++l, ++r) {
+ lv[0] = rv[0], lv[1] = rv[1], lv[2] = rv[2];
+ rv[0] = mix(sdf(r, b)[0], sdf(r, t)[0], bt);
+ rv[1] = mix(sdf(r, b)[1], sdf(r, t)[1], bt);
+ rv[2] = mix(sdf(r, b)[2], sdf(r, t)[2], bt);
+ Scanline::Intersection newIntersections[4];
+ int newIntersectionCount = 0;
+ for (int i = 0; i < 3; ++i) {
+ if (lv[i] != rv[i]) {
+ double lr = double(.5f-lv[i])/double(rv[i]-lv[i]);
+ if (lr >= 0 && lr <= 1) {
+ float v[3] = {
+ mix(lv[0], rv[0], lr),
+ mix(lv[1], rv[1], lr),
+ mix(lv[2], rv[2], lr)
+ };
+ if (median(v[0], v[1], v[2]) == v[i]) {
+ newIntersections[newIntersectionCount].x = projection.unprojectX(l+lr+.5);
+ newIntersections[newIntersectionCount].direction = sign(rv[i]-lv[i]);
+ ++newIntersectionCount;
+ }
+ }
+ }
+ }
+ // Sort new intersections
+ if (newIntersectionCount >= 2) {
+ if (newIntersections[0].x > newIntersections[1].x)
+ newIntersections[3] = newIntersections[0], newIntersections[0] = newIntersections[1], newIntersections[1] = newIntersections[3];
+ if (newIntersectionCount >= 3 && newIntersections[1].x > newIntersections[2].x) {
+ newIntersections[3] = newIntersections[1], newIntersections[1] = newIntersections[2], newIntersections[2] = newIntersections[3];
+ if (newIntersections[0].x > newIntersections[1].x)
+ newIntersections[3] = newIntersections[0], newIntersections[0] = newIntersections[1], newIntersections[1] = newIntersections[3];
+ }
+ }
+ for (int i = 0; i < newIntersectionCount; ++i) {
+ if ((newIntersections[i].direction > 0) == !inside) {
+ intersections.push_back(newIntersections[i]);
+ inside = !inside;
+ }
+ }
+ // Consistency check
+ float rvScalar = median(rv[0], rv[1], rv[2]);
+ if ((rvScalar > .5f) != inside && rvScalar != .5f && !intersections.empty()) {
+ intersections.pop_back();
+ inside = !inside;
+ }
+ }
+#ifdef MSDFGEN_USE_CPP11
+ line.setIntersections((std::vector<Scanline::Intersection> &&) intersections);
+#else
+ line.setIntersections(intersections);
+#endif
+}
+
+void scanlineSDF(Scanline &line, const BitmapConstRef<float, 3> &sdf, const Projection &projection, double y, bool inverseYAxis) {
+ scanlineMSDF(line, sdf, projection, y, inverseYAxis);
+}
+void scanlineSDF(Scanline &line, const BitmapConstRef<float, 4> &sdf, const Projection &projection, double y, bool inverseYAxis) {
+ scanlineMSDF(line, sdf, projection, y, inverseYAxis);
+}
+
+template <int N>
+double estimateSDFErrorInner(const BitmapConstRef<float, N> &sdf, const Shape &shape, const Projection &projection, int scanlinesPerRow, FillRule fillRule) {
+ if (sdf.width <= 1 || sdf.height <= 1 || scanlinesPerRow < 1)
+ return 0;
+ double subRowSize = 1./scanlinesPerRow;
+ double xFrom = projection.unprojectX(.5);
+ double xTo = projection.unprojectX(sdf.width-.5);
+ double overlapFactor = 1/(xTo-xFrom);
+ double error = 0;
+ Scanline refScanline, sdfScanline;
+ for (int row = 0; row < sdf.height-1; ++row) {
+ for (int subRow = 0; subRow < scanlinesPerRow; ++subRow) {
+ double bt = (subRow+.5)*subRowSize;
+ double y = projection.unprojectY(row+bt+.5);
+ shape.scanline(refScanline, y);
+ scanlineSDF(sdfScanline, sdf, projection, y, shape.inverseYAxis);
+ error += 1-overlapFactor*Scanline::overlap(refScanline, sdfScanline, xFrom, xTo, fillRule);
+ }
+ }
+ return error/((sdf.height-1)*scanlinesPerRow);
+}
+
+double estimateSDFError(const BitmapConstRef<float, 1> &sdf, const Shape &shape, const Projection &projection, int scanlinesPerRow, FillRule fillRule) {
+ return estimateSDFErrorInner(sdf, shape, projection, scanlinesPerRow, fillRule);
+}
+double estimateSDFError(const BitmapConstRef<float, 3> &sdf, const Shape &shape, const Projection &projection, int scanlinesPerRow, FillRule fillRule) {
+ return estimateSDFErrorInner(sdf, shape, projection, scanlinesPerRow, fillRule);
+}
+double estimateSDFError(const BitmapConstRef<float, 4> &sdf, const Shape &shape, const Projection &projection, int scanlinesPerRow, FillRule fillRule) {
+ return estimateSDFErrorInner(sdf, shape, projection, scanlinesPerRow, fillRule);
+}
+
+// Legacy API
+
+void scanlineSDF(Scanline &line, const BitmapConstRef<float, 1> &sdf, const Vector2 &scale, const Vector2 &translate, bool inverseYAxis, double y) {
+ scanlineSDF(line, sdf, Projection(scale, translate), y, inverseYAxis);
+}
+
+void scanlineSDF(Scanline &line, const BitmapConstRef<float, 3> &sdf, const Vector2 &scale, const Vector2 &translate, bool inverseYAxis, double y) {
+ scanlineSDF(line, sdf, Projection(scale, translate), y, inverseYAxis);
+}
+
+void scanlineSDF(Scanline &line, const BitmapConstRef<float, 4> &sdf, const Vector2 &scale, const Vector2 &translate, bool inverseYAxis, double y) {
+ scanlineSDF(line, sdf, Projection(scale, translate), y, inverseYAxis);
+}
+
+double estimateSDFError(const BitmapConstRef<float, 1> &sdf, const Shape &shape, const Vector2 &scale, const Vector2 &translate, int scanlinesPerRow, FillRule fillRule) {
+ return estimateSDFError(sdf, shape, Projection(scale, translate), scanlinesPerRow, fillRule);
+}
+
+double estimateSDFError(const BitmapConstRef<float, 3> &sdf, const Shape &shape, const Vector2 &scale, const Vector2 &translate, int scanlinesPerRow, FillRule fillRule) {
+ return estimateSDFError(sdf, shape, Projection(scale, translate), scanlinesPerRow, fillRule);
+}
+
+double estimateSDFError(const BitmapConstRef<float, 4> &sdf, const Shape &shape, const Vector2 &scale, const Vector2 &translate, int scanlinesPerRow, FillRule fillRule) {
+ return estimateSDFError(sdf, shape, Projection(scale, translate), scanlinesPerRow, fillRule);
+}
+
+}
diff --git a/thirdparty/msdfgen/core/sdf-error-estimation.h b/thirdparty/msdfgen/core/sdf-error-estimation.h
new file mode 100644
index 0000000000..d2fd40d2b8
--- /dev/null
+++ b/thirdparty/msdfgen/core/sdf-error-estimation.h
@@ -0,0 +1,30 @@
+
+#pragma once
+
+#include "Vector2.h"
+#include "Shape.h"
+#include "Projection.h"
+#include "Scanline.h"
+#include "BitmapRef.hpp"
+
+namespace msdfgen {
+
+/// Analytically constructs a scanline at y evaluating fill by linear interpolation of the SDF.
+void scanlineSDF(Scanline &line, const BitmapConstRef<float, 1> &sdf, const Projection &projection, double y, bool inverseYAxis = false);
+void scanlineSDF(Scanline &line, const BitmapConstRef<float, 3> &sdf, const Projection &projection, double y, bool inverseYAxis = false);
+void scanlineSDF(Scanline &line, const BitmapConstRef<float, 4> &sdf, const Projection &projection, double y, bool inverseYAxis = false);
+
+/// Estimates the portion of the area that will be filled incorrectly when rendering using the SDF.
+double estimateSDFError(const BitmapConstRef<float, 1> &sdf, const Shape &shape, const Projection &projection, int scanlinesPerRow, FillRule fillRule = FILL_NONZERO);
+double estimateSDFError(const BitmapConstRef<float, 3> &sdf, const Shape &shape, const Projection &projection, int scanlinesPerRow, FillRule fillRule = FILL_NONZERO);
+double estimateSDFError(const BitmapConstRef<float, 4> &sdf, const Shape &shape, const Projection &projection, int scanlinesPerRow, FillRule fillRule = FILL_NONZERO);
+
+// Old version of the function API's kept for backwards compatibility
+void scanlineSDF(Scanline &line, const BitmapConstRef<float, 1> &sdf, const Vector2 &scale, const Vector2 &translate, bool inverseYAxis, double y);
+void scanlineSDF(Scanline &line, const BitmapConstRef<float, 3> &sdf, const Vector2 &scale, const Vector2 &translate, bool inverseYAxis, double y);
+void scanlineSDF(Scanline &line, const BitmapConstRef<float, 4> &sdf, const Vector2 &scale, const Vector2 &translate, bool inverseYAxis, double y);
+double estimateSDFError(const BitmapConstRef<float, 1> &sdf, const Shape &shape, const Vector2 &scale, const Vector2 &translate, int scanlinesPerRow, FillRule fillRule = FILL_NONZERO);
+double estimateSDFError(const BitmapConstRef<float, 3> &sdf, const Shape &shape, const Vector2 &scale, const Vector2 &translate, int scanlinesPerRow, FillRule fillRule = FILL_NONZERO);
+double estimateSDFError(const BitmapConstRef<float, 4> &sdf, const Shape &shape, const Vector2 &scale, const Vector2 &translate, int scanlinesPerRow, FillRule fillRule = FILL_NONZERO);
+
+}
diff --git a/thirdparty/msdfgen/core/shape-description.cpp b/thirdparty/msdfgen/core/shape-description.cpp
new file mode 100644
index 0000000000..a096fa2541
--- /dev/null
+++ b/thirdparty/msdfgen/core/shape-description.cpp
@@ -0,0 +1,284 @@
+
+#define _CRT_SECURE_NO_WARNINGS
+#include "shape-description.h"
+
+namespace msdfgen {
+
+int readCharF(FILE *input) {
+ int c = '\0';
+ do {
+ c = fgetc(input);
+ } while (c == ' ' || c == '\t' || c == '\r' || c == '\n');
+ return c;
+}
+
+int readCharS(const char **input) {
+ int c = '\0';
+ do {
+ c = *(*input)++;
+ } while (c == ' ' || c == '\t' || c == '\r' || c == '\n');
+ if (!c) {
+ --c;
+ return EOF;
+ }
+ return c;
+}
+
+int readCoordF(FILE *input, Point2 &coord) {
+ return fscanf(input, "%lf,%lf", &coord.x, &coord.y);
+}
+
+int readCoordS(const char **input, Point2 &coord) {
+ int read = 0;
+ int result = sscanf(*input, "%lf,%lf%n", &coord.x, &coord.y, &read);
+ *input += read;
+ return result;
+}
+
+static bool writeCoord(FILE *output, Point2 coord) {
+ fprintf(output, "%.12g, %.12g", coord.x, coord.y);
+ return true;
+}
+
+template <typename T, int (*readChar)(T *), int (*readCoord)(T *, Point2 &)>
+static int readControlPoints(T *input, Point2 *output) {
+ int result = readCoord(input, output[0]);
+ if (result == 2) {
+ switch (readChar(input)) {
+ case ')':
+ return 1;
+ case ';':
+ break;
+ default:
+ return -1;
+ }
+ result = readCoord(input, output[1]);
+ if (result == 2 && readChar(input) == ')')
+ return 2;
+ } else if (result != 1 && readChar(input) == ')')
+ return 0;
+ return -1;
+}
+
+template <typename T, int (*readChar)(T *), int (*readCoord)(T *, Point2 &)>
+static bool readContour(T *input, Contour &output, const Point2 *first, int terminator, bool &colorsSpecified) {
+ Point2 p[4], start;
+ if (first)
+ p[0] = *first;
+ else {
+ int result = readCoord(input, p[0]);
+ if (result != 2)
+ return result != 1 && readChar(input) == terminator;
+ }
+ start = p[0];
+ int c = '\0';
+ while ((c = readChar(input)) != terminator) {
+ if (c != ';')
+ return false;
+ EdgeColor color = WHITE;
+ int result = readCoord(input, p[1]);
+ if (result == 2) {
+ output.addEdge(EdgeHolder(p[0], p[1], color));
+ p[0] = p[1];
+ continue;
+ } else if (result == 1)
+ return false;
+ else {
+ int controlPoints = 0;
+ switch ((c = readChar(input))) {
+ case '#':
+ output.addEdge(EdgeHolder(p[0], start, color));
+ p[0] = start;
+ continue;
+ case ';':
+ goto FINISH_EDGE;
+ case '(':
+ goto READ_CONTROL_POINTS;
+ case 'C': case 'c':
+ color = CYAN;
+ colorsSpecified = true;
+ break;
+ case 'M': case 'm':
+ color = MAGENTA;
+ colorsSpecified = true;
+ break;
+ case 'Y': case 'y':
+ color = YELLOW;
+ colorsSpecified = true;
+ break;
+ case 'W': case 'w':
+ color = WHITE;
+ colorsSpecified = true;
+ break;
+ default:
+ return c == terminator;
+ }
+ switch (readChar(input)) {
+ case ';':
+ goto FINISH_EDGE;
+ case '(':
+ READ_CONTROL_POINTS:
+ if ((controlPoints = readControlPoints<T, readChar, readCoord>(input, p+1)) < 0)
+ return false;
+ break;
+ default:
+ return false;
+ }
+ if (readChar(input) != ';')
+ return false;
+ FINISH_EDGE:
+ result = readCoord(input, p[1+controlPoints]);
+ if (result != 2) {
+ if (result == 1)
+ return false;
+ else {
+ if (readChar(input) == '#')
+ p[1+controlPoints] = start;
+ else
+ return false;
+ }
+ }
+ switch (controlPoints) {
+ case 0:
+ output.addEdge(EdgeHolder(p[0], p[1], color));
+ p[0] = p[1];
+ continue;
+ case 1:
+ output.addEdge(EdgeHolder(p[0], p[1], p[2], color));
+ p[0] = p[2];
+ continue;
+ case 2:
+ output.addEdge(EdgeHolder(p[0], p[1], p[2], p[3], color));
+ p[0] = p[3];
+ continue;
+ }
+ }
+ }
+ return true;
+}
+
+bool readShapeDescription(FILE *input, Shape &output, bool *colorsSpecified) {
+ bool locColorsSpec = false;
+ output.contours.clear();
+ output.inverseYAxis = false;
+ Point2 p;
+ int result = readCoordF(input, p);
+ if (result == 2) {
+ return readContour<FILE, readCharF, readCoordF>(input, output.addContour(), &p, EOF, locColorsSpec);
+ } else if (result == 1)
+ return false;
+ else {
+ int c = readCharF(input);
+ if (c == '@') {
+ char after = '\0';
+ if (fscanf(input, "invert-y%c", &after) != 1)
+ return feof(input) != 0;
+ output.inverseYAxis = true;
+ c = after;
+ if (c == ' ' || c == '\t' || c == '\r' || c == '\n')
+ c = readCharF(input);
+ }
+ for (; c == '{'; c = readCharF(input))
+ if (!readContour<FILE, readCharF, readCoordF>(input, output.addContour(), NULL, '}', locColorsSpec))
+ return false;
+ if (colorsSpecified)
+ *colorsSpecified = locColorsSpec;
+ return c == EOF && feof(input);
+ }
+}
+
+bool readShapeDescription(const char *input, Shape &output, bool *colorsSpecified) {
+ bool locColorsSpec = false;
+ output.contours.clear();
+ output.inverseYAxis = false;
+ Point2 p;
+ int result = readCoordS(&input, p);
+ if (result == 2) {
+ return readContour<const char *, readCharS, readCoordS>(&input, output.addContour(), &p, EOF, locColorsSpec);
+ } else if (result == 1)
+ return false;
+ else {
+ int c = readCharS(&input);
+ if (c == '@') {
+ for (int i = 0; i < (int) sizeof("invert-y")-1; ++i)
+ if (input[i] != "invert-y"[i])
+ return false;
+ output.inverseYAxis = true;
+ input += sizeof("invert-y")-1;
+ c = readCharS(&input);
+ }
+ for (; c == '{'; c = readCharS(&input))
+ if (!readContour<const char *, readCharS, readCoordS>(&input, output.addContour(), NULL, '}', locColorsSpec))
+ return false;
+ if (colorsSpecified)
+ *colorsSpecified = locColorsSpec;
+ return c == EOF;
+ }
+}
+
+static bool isColored(const Shape &shape) {
+ for (std::vector<Contour>::const_iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour)
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge)
+ if ((*edge)->color != WHITE)
+ return true;
+ return false;
+}
+
+bool writeShapeDescription(FILE *output, const Shape &shape) {
+ if (!shape.validate())
+ return false;
+ bool writeColors = isColored(shape);
+ if (shape.inverseYAxis)
+ fprintf(output, "@invert-y\n");
+ for (std::vector<Contour>::const_iterator contour = shape.contours.begin(); contour != shape.contours.end(); ++contour) {
+ fprintf(output, "{\n");
+ if (!contour->edges.empty()) {
+ for (std::vector<EdgeHolder>::const_iterator edge = contour->edges.begin(); edge != contour->edges.end(); ++edge) {
+ char colorCode = '\0';
+ if (writeColors) {
+ switch ((*edge)->color) {
+ case YELLOW: colorCode = 'y'; break;
+ case MAGENTA: colorCode = 'm'; break;
+ case CYAN: colorCode = 'c'; break;
+ case WHITE: colorCode = 'w'; break;
+ default:;
+ }
+ }
+ if (const LinearSegment *e = dynamic_cast<const LinearSegment *>(&**edge)) {
+ fprintf(output, "\t");
+ writeCoord(output, e->p[0]);
+ fprintf(output, ";\n");
+ if (colorCode)
+ fprintf(output, "\t\t%c;\n", colorCode);
+ }
+ if (const QuadraticSegment *e = dynamic_cast<const QuadraticSegment *>(&**edge)) {
+ fprintf(output, "\t");
+ writeCoord(output, e->p[0]);
+ fprintf(output, ";\n\t\t");
+ if (colorCode)
+ fprintf(output, "%c", colorCode);
+ fprintf(output, "(");
+ writeCoord(output, e->p[1]);
+ fprintf(output, ");\n");
+ }
+ if (const CubicSegment *e = dynamic_cast<const CubicSegment *>(&**edge)) {
+ fprintf(output, "\t");
+ writeCoord(output, e->p[0]);
+ fprintf(output, ";\n\t\t");
+ if (colorCode)
+ fprintf(output, "%c", colorCode);
+ fprintf(output, "(");
+ writeCoord(output, e->p[1]);
+ fprintf(output, "; ");
+ writeCoord(output, e->p[2]);
+ fprintf(output, ");\n");
+ }
+ }
+ fprintf(output, "\t#\n");
+ }
+ fprintf(output, "}\n");
+ }
+ return true;
+}
+
+}
diff --git a/thirdparty/msdfgen/core/shape-description.h b/thirdparty/msdfgen/core/shape-description.h
new file mode 100644
index 0000000000..5df7c50a03
--- /dev/null
+++ b/thirdparty/msdfgen/core/shape-description.h
@@ -0,0 +1,16 @@
+
+#pragma once
+
+#include <cstdlib>
+#include <cstdio>
+#include "Shape.h"
+
+namespace msdfgen {
+
+/// Deserializes a text description of a vector shape into output.
+bool readShapeDescription(FILE *input, Shape &output, bool *colorsSpecified = NULL);
+bool readShapeDescription(const char *input, Shape &output, bool *colorsSpecified = NULL);
+/// Serializes a shape object into a text description.
+bool writeShapeDescription(FILE *output, const Shape &shape);
+
+}
diff --git a/thirdparty/msdfgen/msdfgen.h b/thirdparty/msdfgen/msdfgen.h
new file mode 100644
index 0000000000..fb36bd7e1d
--- /dev/null
+++ b/thirdparty/msdfgen/msdfgen.h
@@ -0,0 +1,65 @@
+
+#pragma once
+
+/*
+ * MULTI-CHANNEL SIGNED DISTANCE FIELD GENERATOR v1.9 (2021-05-28)
+ * ---------------------------------------------------------------
+ * A utility by Viktor Chlumsky, (c) 2014 - 2021
+ *
+ * The technique used to generate multi-channel distance fields in this code
+ * has been developed by Viktor Chlumsky in 2014 for his master's thesis,
+ * "Shape Decomposition for Multi-Channel Distance Fields". It provides improved
+ * quality of sharp corners in glyphs and other 2D shapes compared to monochrome
+ * distance fields. To reconstruct an image of the shape, apply the median of three
+ * operation on the triplet of sampled signed distance values.
+ *
+ */
+
+#include "core/arithmetics.hpp"
+#include "core/Vector2.h"
+#include "core/Projection.h"
+#include "core/Scanline.h"
+#include "core/Shape.h"
+#include "core/BitmapRef.hpp"
+#include "core/Bitmap.h"
+#include "core/bitmap-interpolation.hpp"
+#include "core/pixel-conversion.hpp"
+#include "core/edge-coloring.h"
+#include "core/generator-config.h"
+#include "core/msdf-error-correction.h"
+#include "core/render-sdf.h"
+#include "core/rasterization.h"
+#include "core/sdf-error-estimation.h"
+#include "core/save-bmp.h"
+#include "core/save-tiff.h"
+#include "core/shape-description.h"
+
+#define MSDFGEN_VERSION "1.9"
+
+namespace msdfgen {
+
+/// Generates a conventional single-channel signed distance field.
+void generateSDF(const BitmapRef<float, 1> &output, const Shape &shape, const Projection &projection, double range, const GeneratorConfig &config = GeneratorConfig());
+
+/// Generates a single-channel signed pseudo-distance field.
+void generatePseudoSDF(const BitmapRef<float, 1> &output, const Shape &shape, const Projection &projection, double range, const GeneratorConfig &config = GeneratorConfig());
+
+/// Generates a multi-channel signed distance field. Edge colors must be assigned first! (See edgeColoringSimple)
+void generateMSDF(const BitmapRef<float, 3> &output, const Shape &shape, const Projection &projection, double range, const MSDFGeneratorConfig &config = MSDFGeneratorConfig());
+
+/// Generates a multi-channel signed distance field with true distance in the alpha channel. Edge colors must be assigned first.
+void generateMTSDF(const BitmapRef<float, 4> &output, const Shape &shape, const Projection &projection, double range, const MSDFGeneratorConfig &config = MSDFGeneratorConfig());
+
+// Old version of the function API's kept for backwards compatibility
+void generateSDF(const BitmapRef<float, 1> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate, bool overlapSupport = true);
+void generatePseudoSDF(const BitmapRef<float, 1> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate, bool overlapSupport = true);
+void generateMSDF(const BitmapRef<float, 3> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate, const ErrorCorrectionConfig &errorCorrectionConfig = ErrorCorrectionConfig(), bool overlapSupport = true);
+void generateMTSDF(const BitmapRef<float, 4> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate, const ErrorCorrectionConfig &errorCorrectionConfig = ErrorCorrectionConfig(), bool overlapSupport = true);
+
+// Original simpler versions of the previous functions, which work well under normal circumstances, but cannot deal with overlapping contours.
+void generateSDF_legacy(const BitmapRef<float, 1> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate);
+void generatePseudoSDF_legacy(const BitmapRef<float, 1> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate);
+void generateMSDF_legacy(const BitmapRef<float, 3> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate, ErrorCorrectionConfig errorCorrectionConfig = ErrorCorrectionConfig());
+void generateMTSDF_legacy(const BitmapRef<float, 4> &output, const Shape &shape, double range, const Vector2 &scale, const Vector2 &translate, ErrorCorrectionConfig errorCorrectionConfig = ErrorCorrectionConfig());
+
+}
diff --git a/thirdparty/nanosvg/nanosvg.h b/thirdparty/nanosvg/nanosvg.h
index 4c03ee5893..f5058b179a 100644
--- a/thirdparty/nanosvg/nanosvg.h
+++ b/thirdparty/nanosvg/nanosvg.h
@@ -1215,35 +1215,22 @@ static const char* nsvg__getNextPathItem(const char* s, char* it)
static unsigned int nsvg__parseColorHex(const char* str)
{
- unsigned int c = 0, r = 0, g = 0, b = 0;
- int n = 0;
- str++; // skip #
- // Calculate number of characters.
- while(str[n] && !nsvg__isspace(str[n]))
- n++;
- if (n == 6) {
- sscanf(str, "%x", &c);
- } else if (n == 3) {
- sscanf(str, "%x", &c);
- c = (c&0xf) | ((c&0xf0) << 4) | ((c&0xf00) << 8);
- c |= c<<4;
- }
- r = (c >> 16) & 0xff;
- g = (c >> 8) & 0xff;
- b = c & 0xff;
- return NSVG_RGB(r,g,b);
+ unsigned int r=0, g=0, b=0;
+ if (sscanf(str, "#%2x%2x%2x", &r, &g, &b) == 3 ) // 2 digit hex
+ return NSVG_RGB(r, g, b);
+ if (sscanf(str, "#%1x%1x%1x", &r, &g, &b) == 3 ) // 1 digit hex, e.g. #abc -> 0xccbbaa
+ return NSVG_RGB(r*17, g*17, b*17); // same effect as (r<<4|r), (g<<4|g), ..
+ return NSVG_RGB(128, 128, 128);
}
static unsigned int nsvg__parseColorRGB(const char* str)
{
- int r = -1, g = -1, b = -1;
- char s1[32]="", s2[32]="";
- sscanf(str + 4, "%d%[%%, \t]%d%[%%, \t]%d", &r, s1, &g, s2, &b);
- if (strchr(s1, '%')) {
- return NSVG_RGB((r*255)/100,(g*255)/100,(b*255)/100);
- } else {
- return NSVG_RGB(r,g,b);
- }
+ unsigned int r=0, g=0, b=0;
+ if (sscanf(str, "rgb(%u, %u, %u)", &r, &g, &b) == 3) // decimal integers
+ return NSVG_RGB(r, g, b);
+ if (sscanf(str, "rgb(%u%%, %u%%, %u%%)", &r, &g, &b) == 3) // decimal integer percentage
+ return NSVG_RGB(r*255/100, g*255/100, b*255/100);
+ return NSVG_RGB(128, 128, 128);
}
typedef struct NSVGNamedColor {
@@ -2187,7 +2174,12 @@ static void nsvg__pathArcTo(NSVGparser* p, float* cpx, float* cpy, float* args,
// The loop assumes an iteration per end point (including start and end), this +1.
ndivs = (int)(fabsf(da) / (NSVG_PI*0.5f) + 1.0f);
hda = (da / (float)ndivs) / 2.0f;
- kappa = fabsf(4.0f / 3.0f * (1.0f - cosf(hda)) / sinf(hda));
+ // Fix for ticket #179: division by 0: avoid cotangens around 0 (infinite)
+ if ((hda < 1e-3f) && (hda > -1e-3f))
+ hda *= 0.5f;
+ else
+ hda = (1.0f - cosf(hda)) / sinf(hda);
+ kappa = fabsf(4.0f / 3.0f * hda);
if (da < 0.0f)
kappa = -kappa;
diff --git a/thirdparty/volk/volk.c b/thirdparty/volk/volk.c
index 0237cd9061..bb8b928326 100644
--- a/thirdparty/volk/volk.c
+++ b/thirdparty/volk/volk.c
@@ -631,9 +631,12 @@ static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, c
vkGetPastPresentationTimingGOOGLE = (PFN_vkGetPastPresentationTimingGOOGLE)load(context, "vkGetPastPresentationTimingGOOGLE");
vkGetRefreshCycleDurationGOOGLE = (PFN_vkGetRefreshCycleDurationGOOGLE)load(context, "vkGetRefreshCycleDurationGOOGLE");
#endif /* defined(VK_GOOGLE_display_timing) */
+#if defined(VK_HUAWEI_invocation_mask)
+ vkCmdBindInvocationMaskHUAWEI = (PFN_vkCmdBindInvocationMaskHUAWEI)load(context, "vkCmdBindInvocationMaskHUAWEI");
+#endif /* defined(VK_HUAWEI_invocation_mask) */
#if defined(VK_HUAWEI_subpass_shading)
vkCmdSubpassShadingHUAWEI = (PFN_vkCmdSubpassShadingHUAWEI)load(context, "vkCmdSubpassShadingHUAWEI");
- vkGetSubpassShadingMaxWorkgroupSizeHUAWEI = (PFN_vkGetSubpassShadingMaxWorkgroupSizeHUAWEI)load(context, "vkGetSubpassShadingMaxWorkgroupSizeHUAWEI");
+ vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = (PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI)load(context, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI");
#endif /* defined(VK_HUAWEI_subpass_shading) */
#if defined(VK_INTEL_performance_query)
vkAcquirePerformanceConfigurationINTEL = (PFN_vkAcquirePerformanceConfigurationINTEL)load(context, "vkAcquirePerformanceConfigurationINTEL");
@@ -758,6 +761,9 @@ static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, c
vkGetPipelineExecutablePropertiesKHR = (PFN_vkGetPipelineExecutablePropertiesKHR)load(context, "vkGetPipelineExecutablePropertiesKHR");
vkGetPipelineExecutableStatisticsKHR = (PFN_vkGetPipelineExecutableStatisticsKHR)load(context, "vkGetPipelineExecutableStatisticsKHR");
#endif /* defined(VK_KHR_pipeline_executable_properties) */
+#if defined(VK_KHR_present_wait)
+ vkWaitForPresentKHR = (PFN_vkWaitForPresentKHR)load(context, "vkWaitForPresentKHR");
+#endif /* defined(VK_KHR_present_wait) */
#if defined(VK_KHR_push_descriptor)
vkCmdPushDescriptorSetKHR = (PFN_vkCmdPushDescriptorSetKHR)load(context, "vkCmdPushDescriptorSetKHR");
#endif /* defined(VK_KHR_push_descriptor) */
@@ -847,6 +853,9 @@ static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, c
vkDestroyIndirectCommandsLayoutNV = (PFN_vkDestroyIndirectCommandsLayoutNV)load(context, "vkDestroyIndirectCommandsLayoutNV");
vkGetGeneratedCommandsMemoryRequirementsNV = (PFN_vkGetGeneratedCommandsMemoryRequirementsNV)load(context, "vkGetGeneratedCommandsMemoryRequirementsNV");
#endif /* defined(VK_NV_device_generated_commands) */
+#if defined(VK_NV_external_memory_rdma)
+ vkGetMemoryRemoteAddressNV = (PFN_vkGetMemoryRemoteAddressNV)load(context, "vkGetMemoryRemoteAddressNV");
+#endif /* defined(VK_NV_external_memory_rdma) */
#if defined(VK_NV_external_memory_win32)
vkGetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV)load(context, "vkGetMemoryWin32HandleNV");
#endif /* defined(VK_NV_external_memory_win32) */
@@ -1182,9 +1191,12 @@ static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context,
table->vkGetPastPresentationTimingGOOGLE = (PFN_vkGetPastPresentationTimingGOOGLE)load(context, "vkGetPastPresentationTimingGOOGLE");
table->vkGetRefreshCycleDurationGOOGLE = (PFN_vkGetRefreshCycleDurationGOOGLE)load(context, "vkGetRefreshCycleDurationGOOGLE");
#endif /* defined(VK_GOOGLE_display_timing) */
+#if defined(VK_HUAWEI_invocation_mask)
+ table->vkCmdBindInvocationMaskHUAWEI = (PFN_vkCmdBindInvocationMaskHUAWEI)load(context, "vkCmdBindInvocationMaskHUAWEI");
+#endif /* defined(VK_HUAWEI_invocation_mask) */
#if defined(VK_HUAWEI_subpass_shading)
table->vkCmdSubpassShadingHUAWEI = (PFN_vkCmdSubpassShadingHUAWEI)load(context, "vkCmdSubpassShadingHUAWEI");
- table->vkGetSubpassShadingMaxWorkgroupSizeHUAWEI = (PFN_vkGetSubpassShadingMaxWorkgroupSizeHUAWEI)load(context, "vkGetSubpassShadingMaxWorkgroupSizeHUAWEI");
+ table->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = (PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI)load(context, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI");
#endif /* defined(VK_HUAWEI_subpass_shading) */
#if defined(VK_INTEL_performance_query)
table->vkAcquirePerformanceConfigurationINTEL = (PFN_vkAcquirePerformanceConfigurationINTEL)load(context, "vkAcquirePerformanceConfigurationINTEL");
@@ -1309,6 +1321,9 @@ static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context,
table->vkGetPipelineExecutablePropertiesKHR = (PFN_vkGetPipelineExecutablePropertiesKHR)load(context, "vkGetPipelineExecutablePropertiesKHR");
table->vkGetPipelineExecutableStatisticsKHR = (PFN_vkGetPipelineExecutableStatisticsKHR)load(context, "vkGetPipelineExecutableStatisticsKHR");
#endif /* defined(VK_KHR_pipeline_executable_properties) */
+#if defined(VK_KHR_present_wait)
+ table->vkWaitForPresentKHR = (PFN_vkWaitForPresentKHR)load(context, "vkWaitForPresentKHR");
+#endif /* defined(VK_KHR_present_wait) */
#if defined(VK_KHR_push_descriptor)
table->vkCmdPushDescriptorSetKHR = (PFN_vkCmdPushDescriptorSetKHR)load(context, "vkCmdPushDescriptorSetKHR");
#endif /* defined(VK_KHR_push_descriptor) */
@@ -1398,6 +1413,9 @@ static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context,
table->vkDestroyIndirectCommandsLayoutNV = (PFN_vkDestroyIndirectCommandsLayoutNV)load(context, "vkDestroyIndirectCommandsLayoutNV");
table->vkGetGeneratedCommandsMemoryRequirementsNV = (PFN_vkGetGeneratedCommandsMemoryRequirementsNV)load(context, "vkGetGeneratedCommandsMemoryRequirementsNV");
#endif /* defined(VK_NV_device_generated_commands) */
+#if defined(VK_NV_external_memory_rdma)
+ table->vkGetMemoryRemoteAddressNV = (PFN_vkGetMemoryRemoteAddressNV)load(context, "vkGetMemoryRemoteAddressNV");
+#endif /* defined(VK_NV_external_memory_rdma) */
#if defined(VK_NV_external_memory_win32)
table->vkGetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV)load(context, "vkGetMemoryWin32HandleNV");
#endif /* defined(VK_NV_external_memory_win32) */
@@ -1822,9 +1840,12 @@ PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP;
PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE;
PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE;
#endif /* defined(VK_GOOGLE_display_timing) */
+#if defined(VK_HUAWEI_invocation_mask)
+PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI;
+#endif /* defined(VK_HUAWEI_invocation_mask) */
#if defined(VK_HUAWEI_subpass_shading)
PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI;
-PFN_vkGetSubpassShadingMaxWorkgroupSizeHUAWEI vkGetSubpassShadingMaxWorkgroupSizeHUAWEI;
+PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI;
#endif /* defined(VK_HUAWEI_subpass_shading) */
#if defined(VK_INTEL_performance_query)
PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL;
@@ -1995,6 +2016,9 @@ PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInt
PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR;
PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR;
#endif /* defined(VK_KHR_pipeline_executable_properties) */
+#if defined(VK_KHR_present_wait)
+PFN_vkWaitForPresentKHR vkWaitForPresentKHR;
+#endif /* defined(VK_KHR_present_wait) */
#if defined(VK_KHR_push_descriptor)
PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR;
#endif /* defined(VK_KHR_push_descriptor) */
@@ -2131,6 +2155,9 @@ PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequi
#if defined(VK_NV_external_memory_capabilities)
PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV;
#endif /* defined(VK_NV_external_memory_capabilities) */
+#if defined(VK_NV_external_memory_rdma)
+PFN_vkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV;
+#endif /* defined(VK_NV_external_memory_rdma) */
#if defined(VK_NV_external_memory_win32)
PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV;
#endif /* defined(VK_NV_external_memory_win32) */
diff --git a/thirdparty/volk/volk.h b/thirdparty/volk/volk.h
index 15cf4df5cb..2e292ca114 100644
--- a/thirdparty/volk/volk.h
+++ b/thirdparty/volk/volk.h
@@ -15,7 +15,7 @@
#endif
/* VOLK_GENERATE_VERSION_DEFINE */
-#define VOLK_HEADER_VERSION 182
+#define VOLK_HEADER_VERSION 190
/* VOLK_GENERATE_VERSION_DEFINE */
#ifndef VK_NO_PROTOTYPES
@@ -51,10 +51,13 @@
# endif
#endif
-/* Disable VK_NVX_image_view_handle because SDK 140 introduced a change that can't be used with prior versions */
+/* Disable several extensions on earlier SDKs because later SDKs introduce a backwards incompatible change to function signatures */
#if VK_HEADER_VERSION < 140
# undef VK_NVX_image_view_handle
#endif
+#if VK_HEADER_VERSION < 184
+# undef VK_HUAWEI_subpass_shading
+#endif
#ifdef __cplusplus
extern "C" {
@@ -410,9 +413,12 @@ struct VolkDeviceTable
PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE;
PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE;
#endif /* defined(VK_GOOGLE_display_timing) */
+#if defined(VK_HUAWEI_invocation_mask)
+ PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI;
+#endif /* defined(VK_HUAWEI_invocation_mask) */
#if defined(VK_HUAWEI_subpass_shading)
PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI;
- PFN_vkGetSubpassShadingMaxWorkgroupSizeHUAWEI vkGetSubpassShadingMaxWorkgroupSizeHUAWEI;
+ PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI;
#endif /* defined(VK_HUAWEI_subpass_shading) */
#if defined(VK_INTEL_performance_query)
PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL;
@@ -537,6 +543,9 @@ struct VolkDeviceTable
PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR;
PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR;
#endif /* defined(VK_KHR_pipeline_executable_properties) */
+#if defined(VK_KHR_present_wait)
+ PFN_vkWaitForPresentKHR vkWaitForPresentKHR;
+#endif /* defined(VK_KHR_present_wait) */
#if defined(VK_KHR_push_descriptor)
PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR;
#endif /* defined(VK_KHR_push_descriptor) */
@@ -626,6 +635,9 @@ struct VolkDeviceTable
PFN_vkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV;
PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV;
#endif /* defined(VK_NV_device_generated_commands) */
+#if defined(VK_NV_external_memory_rdma)
+ PFN_vkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV;
+#endif /* defined(VK_NV_external_memory_rdma) */
#if defined(VK_NV_external_memory_win32)
PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV;
#endif /* defined(VK_NV_external_memory_win32) */
@@ -1042,9 +1054,12 @@ extern PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP
extern PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE;
extern PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE;
#endif /* defined(VK_GOOGLE_display_timing) */
+#if defined(VK_HUAWEI_invocation_mask)
+extern PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI;
+#endif /* defined(VK_HUAWEI_invocation_mask) */
#if defined(VK_HUAWEI_subpass_shading)
extern PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI;
-extern PFN_vkGetSubpassShadingMaxWorkgroupSizeHUAWEI vkGetSubpassShadingMaxWorkgroupSizeHUAWEI;
+extern PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI;
#endif /* defined(VK_HUAWEI_subpass_shading) */
#if defined(VK_INTEL_performance_query)
extern PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL;
@@ -1215,6 +1230,9 @@ extern PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecut
extern PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR;
extern PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR;
#endif /* defined(VK_KHR_pipeline_executable_properties) */
+#if defined(VK_KHR_present_wait)
+extern PFN_vkWaitForPresentKHR vkWaitForPresentKHR;
+#endif /* defined(VK_KHR_present_wait) */
#if defined(VK_KHR_push_descriptor)
extern PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR;
#endif /* defined(VK_KHR_push_descriptor) */
@@ -1351,6 +1369,9 @@ extern PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemo
#if defined(VK_NV_external_memory_capabilities)
extern PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV;
#endif /* defined(VK_NV_external_memory_capabilities) */
+#if defined(VK_NV_external_memory_rdma)
+extern PFN_vkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV;
+#endif /* defined(VK_NV_external_memory_rdma) */
#if defined(VK_NV_external_memory_win32)
extern PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV;
#endif /* defined(VK_NV_external_memory_win32) */
diff --git a/thirdparty/vulkan/include/vulkan/vulkan.hpp b/thirdparty/vulkan/include/vulkan/vulkan.hpp
index d3bc127203..63d72f4660 100644
--- a/thirdparty/vulkan/include/vulkan/vulkan.hpp
+++ b/thirdparty/vulkan/include/vulkan/vulkan.hpp
@@ -39,7 +39,6 @@
#include <tuple>
#include <type_traits>
#include <vulkan/vulkan.h>
-
#if 17 <= VULKAN_HPP_CPP_VERSION
# include <string_view>
#endif
@@ -53,6 +52,24 @@
# include <vector>
#endif
+#if defined( VULKAN_HPP_NO_CONSTRUCTORS )
+# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
+# define VULKAN_HPP_NO_STRUCT_CONSTRUCTORS
+# endif
+# if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS )
+# define VULKAN_HPP_NO_UNION_CONSTRUCTORS
+# endif
+#endif
+
+#if defined( VULKAN_HPP_NO_SETTERS )
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
+# define VULKAN_HPP_NO_STRUCT_SETTERS
+# endif
+# if !defined( VULKAN_HPP_NO_UNION_SETTERS )
+# define VULKAN_HPP_NO_UNION_SETTERS
+# endif
+#endif
+
#if !defined( VULKAN_HPP_ASSERT )
# include <cassert>
# define VULKAN_HPP_ASSERT assert
@@ -93,7 +110,12 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h
# include <compare>
#endif
-static_assert( VK_HEADER_VERSION == 182, "Wrong VK_HEADER_VERSION!" );
+#if ( 201803 <= __cpp_lib_span )
+# define VULKAN_HPP_SUPPORT_SPAN
+# include <span>
+#endif
+
+static_assert( VK_HEADER_VERSION == 190, "Wrong VK_HEADER_VERSION!" );
// 32-bit vulkan is not typesafe for handles, so don't allow copy constructors on this platform by default.
// To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION
@@ -334,6 +356,36 @@ namespace VULKAN_HPP_NAMESPACE
, m_ptr( data.data() )
{}
+# if defined( VULKAN_HPP_SUPPORT_SPAN )
+ template <size_t N = std::dynamic_extent>
+ ArrayProxy( std::span<T, N> const & data ) VULKAN_HPP_NOEXCEPT
+ : m_count( static_cast<uint32_t>( data.size() ) )
+ , m_ptr( data.data() )
+ {}
+
+ template <size_t N = std::dynamic_extent,
+ typename B = T,
+ typename std::enable_if<std::is_const<B>::value, int>::type = 0>
+ ArrayProxy( std::span<typename std::remove_const<T>::type, N> const & data ) VULKAN_HPP_NOEXCEPT
+ : m_count( static_cast<uint32_t>( data.size() ) )
+ , m_ptr( data.data() )
+ {}
+
+ template <size_t N = std::dynamic_extent>
+ ArrayProxy( std::span<T, N> & data ) VULKAN_HPP_NOEXCEPT
+ : m_count( static_cast<uint32_t>( data.size() ) )
+ , m_ptr( data.data() )
+ {}
+
+ template <size_t N = std::dynamic_extent,
+ typename B = T,
+ typename std::enable_if<std::is_const<B>::value, int>::type = 0>
+ ArrayProxy( std::span<typename std::remove_const<T>::type, N> & data ) VULKAN_HPP_NOEXCEPT
+ : m_count( static_cast<uint32_t>( data.size() ) )
+ , m_ptr( data.data() )
+ {}
+# endif
+
const T * begin() const VULKAN_HPP_NOEXCEPT
{
return m_ptr;
@@ -531,6 +583,36 @@ namespace VULKAN_HPP_NAMESPACE
typename std::enable_if<std::is_const<B>::value, int>::type = 0>
ArrayProxyNoTemporaries( std::vector<typename std::remove_const<T>::type, Allocator> && data ) = delete;
+# if defined( VULKAN_HPP_SUPPORT_SPAN )
+ template <size_t N = std::dynamic_extent>
+ ArrayProxyNoTemporaries( std::span<T, N> const & data ) VULKAN_HPP_NOEXCEPT
+ : m_count( static_cast<uint32_t>( data.size() ) )
+ , m_ptr( data.data() )
+ {}
+
+ template <size_t N = std::dynamic_extent,
+ typename B = T,
+ typename std::enable_if<std::is_const<B>::value, int>::type = 0>
+ ArrayProxyNoTemporaries( std::span<typename std::remove_const<T>::type, N> const & data ) VULKAN_HPP_NOEXCEPT
+ : m_count( static_cast<uint32_t>( data.size() ) )
+ , m_ptr( data.data() )
+ {}
+
+ template <size_t N = std::dynamic_extent>
+ ArrayProxyNoTemporaries( std::span<T, N> & data ) VULKAN_HPP_NOEXCEPT
+ : m_count( static_cast<uint32_t>( data.size() ) )
+ , m_ptr( data.data() )
+ {}
+
+ template <size_t N = std::dynamic_extent,
+ typename B = T,
+ typename std::enable_if<std::is_const<B>::value, int>::type = 0>
+ ArrayProxyNoTemporaries( std::span<typename std::remove_const<T>::type, N> & data ) VULKAN_HPP_NOEXCEPT
+ : m_count( static_cast<uint32_t>( data.size() ) )
+ , m_ptr( data.data() )
+ {}
+# endif
+
const T * begin() const VULKAN_HPP_NOEXCEPT
{
return m_ptr;
@@ -1296,8 +1378,22 @@ namespace VULKAN_HPP_NAMESPACE
}
#endif
+ class DispatchLoaderBase
+ {
+#if !defined( NDEBUG )
+ public:
+ size_t getVkHeaderVersion() const
+ {
+ return vkHeaderVersion;
+ }
+
+ private:
+ size_t vkHeaderVersion = VK_HEADER_VERSION;
+#endif
+ };
+
#if !defined( VK_NO_PROTOTYPES )
- class DispatchLoaderStatic
+ class DispatchLoaderStatic : public DispatchLoaderBase
{
public:
//=== VK_VERSION_1_0 ===
@@ -4715,6 +4811,16 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkGetPhysicalDeviceToolPropertiesEXT( physicalDevice, pToolCount, pToolProperties );
}
+ //=== VK_KHR_present_wait ===
+
+ VkResult vkWaitForPresentKHR( VkDevice device,
+ VkSwapchainKHR swapchain,
+ uint64_t presentId,
+ uint64_t timeout ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkWaitForPresentKHR( device, swapchain, presentId, timeout );
+ }
+
//=== VK_NV_cooperative_matrix ===
VkResult vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( VkPhysicalDevice physicalDevice,
@@ -5360,10 +5466,11 @@ namespace VULKAN_HPP_NAMESPACE
//=== VK_HUAWEI_subpass_shading ===
- VkResult vkGetSubpassShadingMaxWorkgroupSizeHUAWEI( VkRenderPass renderpass,
- VkExtent2D * pMaxWorkgroupSize ) const VULKAN_HPP_NOEXCEPT
+ VkResult vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( VkDevice device,
+ VkRenderPass renderpass,
+ VkExtent2D * pMaxWorkgroupSize ) const VULKAN_HPP_NOEXCEPT
{
- return ::vkGetSubpassShadingMaxWorkgroupSizeHUAWEI( renderpass, pMaxWorkgroupSize );
+ return ::vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( device, renderpass, pMaxWorkgroupSize );
}
void vkCmdSubpassShadingHUAWEI( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT
@@ -5371,6 +5478,24 @@ namespace VULKAN_HPP_NAMESPACE
return ::vkCmdSubpassShadingHUAWEI( commandBuffer );
}
+ //=== VK_HUAWEI_invocation_mask ===
+
+ void vkCmdBindInvocationMaskHUAWEI( VkCommandBuffer commandBuffer,
+ VkImageView imageView,
+ VkImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkCmdBindInvocationMaskHUAWEI( commandBuffer, imageView, imageLayout );
+ }
+
+ //=== VK_NV_external_memory_rdma ===
+
+ VkResult vkGetMemoryRemoteAddressNV( VkDevice device,
+ const VkMemoryGetRemoteAddressInfoNV * pMemoryGetRemoteAddressInfo,
+ VkRemoteAddressNV * pAddress ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ::vkGetMemoryRemoteAddressNV( device, pMemoryGetRemoteAddressInfo, pAddress );
+ }
+
//=== VK_EXT_extended_dynamic_state2 ===
void vkCmdSetPatchControlPointsEXT( VkCommandBuffer commandBuffer,
@@ -5531,7 +5656,7 @@ namespace VULKAN_HPP_NAMESPACE
ObjectDestroy( OwnerType owner,
Optional<const AllocationCallbacks> allocationCallbacks
VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
- Dispatch const & dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
+ Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT
: m_owner( owner )
, m_allocationCallbacks( allocationCallbacks )
, m_dispatch( &dispatch )
@@ -5569,7 +5694,7 @@ namespace VULKAN_HPP_NAMESPACE
ObjectDestroy() = default;
ObjectDestroy( Optional<const AllocationCallbacks> allocationCallbacks,
- Dispatch const & dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
+ Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT
: m_allocationCallbacks( allocationCallbacks )
, m_dispatch( &dispatch )
{}
@@ -5600,7 +5725,7 @@ namespace VULKAN_HPP_NAMESPACE
ObjectFree( OwnerType owner,
Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
- Dispatch const & dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
+ Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT
: m_owner( owner )
, m_allocationCallbacks( allocationCallbacks )
, m_dispatch( &dispatch )
@@ -5636,7 +5761,8 @@ namespace VULKAN_HPP_NAMESPACE
public:
ObjectRelease() = default;
- ObjectRelease( OwnerType owner, Dispatch const & dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
+ ObjectRelease( OwnerType owner,
+ Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT
: m_owner( owner )
, m_dispatch( &dispatch )
{}
@@ -5667,7 +5793,7 @@ namespace VULKAN_HPP_NAMESPACE
PoolFree( OwnerType owner,
PoolType pool,
- Dispatch const & dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
+ Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT
: m_owner( owner )
, m_pool( pool )
, m_dispatch( &dispatch )
@@ -5695,10 +5821,16 @@ namespace VULKAN_HPP_NAMESPACE
Dispatch const * m_dispatch = nullptr;
};
- using Bool32 = uint32_t;
- using DeviceAddress = uint64_t;
- using DeviceSize = uint64_t;
- using SampleMask = uint32_t;
+ //==================
+ //=== BASE TYPEs ===
+ //==================
+
+ using Bool32 = uint32_t;
+ using DeviceAddress = uint64_t;
+ using DeviceSize = uint64_t;
+ using RemoteAddressNV = void *;
+ using SampleMask = uint32_t;
+
} // namespace VULKAN_HPP_NAMESPACE
#include <vulkan/vulkan_enums.hpp>
@@ -6408,9 +6540,13 @@ namespace VULKAN_HPP_NAMESPACE
namespace VULKAN_HPP_NAMESPACE
{
+ //=======================
+ //=== STRUCTS EXTENDS ===
+ //=======================
+
+ //=== VK_VERSION_1_1 ===
template <>
- struct StructExtends<AccelerationStructureGeometryMotionTrianglesDataNV,
- AccelerationStructureGeometryTrianglesDataKHR>
+ struct StructExtends<PhysicalDeviceSubgroupProperties, PhysicalDeviceProperties2>
{
enum
{
@@ -6418,35 +6554,31 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<AccelerationStructureMotionInfoNV, AccelerationStructureCreateInfoKHR>
+ struct StructExtends<PhysicalDevice16BitStorageFeatures, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
template <>
- struct StructExtends<AndroidHardwareBufferFormatPropertiesANDROID, AndroidHardwareBufferPropertiesANDROID>
+ struct StructExtends<PhysicalDevice16BitStorageFeatures, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
template <>
- struct StructExtends<AndroidHardwareBufferUsageANDROID, ImageFormatProperties2>
+ struct StructExtends<MemoryDedicatedRequirements, MemoryRequirements2>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
template <>
- struct StructExtends<AttachmentDescriptionStencilLayout, AttachmentDescription2>
+ struct StructExtends<MemoryDedicatedAllocateInfo, MemoryAllocateInfo>
{
enum
{
@@ -6454,7 +6586,39 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<AttachmentReferenceStencilLayout, AttachmentReference2>
+ struct StructExtends<MemoryAllocateFlagsInfo, MemoryAllocateInfo>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+ template <>
+ struct StructExtends<DeviceGroupRenderPassBeginInfo, RenderPassBeginInfo>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+ template <>
+ struct StructExtends<DeviceGroupCommandBufferBeginInfo, CommandBufferBeginInfo>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+ template <>
+ struct StructExtends<DeviceGroupSubmitInfo, SubmitInfo>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+ template <>
+ struct StructExtends<DeviceGroupBindSparseInfo, BindSparseInfo>
{
enum
{
@@ -6478,7 +6642,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<BindImageMemorySwapchainInfoKHR, BindImageMemoryInfo>
+ struct StructExtends<DeviceGroupDeviceCreateInfo, DeviceCreateInfo>
{
enum
{
@@ -6486,7 +6650,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<BindImagePlaneMemoryInfo, BindImageMemoryInfo>
+ struct StructExtends<PhysicalDeviceFeatures2, DeviceCreateInfo>
{
enum
{
@@ -6494,7 +6658,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<BufferDeviceAddressCreateInfoEXT, BufferCreateInfo>
+ struct StructExtends<PhysicalDevicePointClippingProperties, PhysicalDeviceProperties2>
{
enum
{
@@ -6502,7 +6666,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<BufferOpaqueCaptureAddressCreateInfo, BufferCreateInfo>
+ struct StructExtends<RenderPassInputAttachmentAspectCreateInfo, RenderPassCreateInfo>
{
enum
{
@@ -6510,7 +6674,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<CommandBufferInheritanceConditionalRenderingInfoEXT, CommandBufferInheritanceInfo>
+ struct StructExtends<ImageViewUsageCreateInfo, ImageViewCreateInfo>
{
enum
{
@@ -6518,7 +6682,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<CommandBufferInheritanceRenderPassTransformInfoQCOM, CommandBufferInheritanceInfo>
+ struct StructExtends<PipelineTessellationDomainOriginStateCreateInfo, PipelineTessellationStateCreateInfo>
{
enum
{
@@ -6526,7 +6690,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<CommandBufferInheritanceViewportScissorInfoNV, CommandBufferInheritanceInfo>
+ struct StructExtends<RenderPassMultiviewCreateInfo, RenderPassCreateInfo>
{
enum
{
@@ -6534,7 +6698,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<CopyCommandTransformInfoQCOM, BufferImageCopy2KHR>
+ struct StructExtends<PhysicalDeviceMultiviewFeatures, PhysicalDeviceFeatures2>
{
enum
{
@@ -6542,25 +6706,23 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<CopyCommandTransformInfoQCOM, ImageBlit2KHR>
+ struct StructExtends<PhysicalDeviceMultiviewFeatures, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
template <>
- struct StructExtends<D3D12FenceSubmitInfoKHR, SubmitInfo>
+ struct StructExtends<PhysicalDeviceMultiviewProperties, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template <>
- struct StructExtends<DebugReportCallbackCreateInfoEXT, InstanceCreateInfo>
+ struct StructExtends<PhysicalDeviceVariablePointersFeatures, PhysicalDeviceFeatures2>
{
enum
{
@@ -6568,7 +6730,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DebugUtilsMessengerCreateInfoEXT, InstanceCreateInfo>
+ struct StructExtends<PhysicalDeviceVariablePointersFeatures, DeviceCreateInfo>
{
enum
{
@@ -6576,7 +6738,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DedicatedAllocationBufferCreateInfoNV, BufferCreateInfo>
+ struct StructExtends<PhysicalDeviceProtectedMemoryFeatures, PhysicalDeviceFeatures2>
{
enum
{
@@ -6584,7 +6746,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DedicatedAllocationImageCreateInfoNV, ImageCreateInfo>
+ struct StructExtends<PhysicalDeviceProtectedMemoryFeatures, DeviceCreateInfo>
{
enum
{
@@ -6592,7 +6754,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DedicatedAllocationMemoryAllocateInfoNV, MemoryAllocateInfo>
+ struct StructExtends<PhysicalDeviceProtectedMemoryProperties, PhysicalDeviceProperties2>
{
enum
{
@@ -6600,7 +6762,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DescriptorPoolInlineUniformBlockCreateInfoEXT, DescriptorPoolCreateInfo>
+ struct StructExtends<ProtectedSubmitInfo, SubmitInfo>
{
enum
{
@@ -6608,7 +6770,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DescriptorSetLayoutBindingFlagsCreateInfo, DescriptorSetLayoutCreateInfo>
+ struct StructExtends<SamplerYcbcrConversionInfo, SamplerCreateInfo>
{
enum
{
@@ -6616,7 +6778,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DescriptorSetVariableDescriptorCountAllocateInfo, DescriptorSetAllocateInfo>
+ struct StructExtends<SamplerYcbcrConversionInfo, ImageViewCreateInfo>
{
enum
{
@@ -6624,7 +6786,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DescriptorSetVariableDescriptorCountLayoutSupport, DescriptorSetLayoutSupport>
+ struct StructExtends<BindImagePlaneMemoryInfo, BindImageMemoryInfo>
{
enum
{
@@ -6632,7 +6794,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DeviceDeviceMemoryReportCreateInfoEXT, DeviceCreateInfo>
+ struct StructExtends<ImagePlaneMemoryRequirementsInfo, ImageMemoryRequirementsInfo2>
{
enum
{
@@ -6640,7 +6802,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DeviceDiagnosticsConfigCreateInfoNV, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceSamplerYcbcrConversionFeatures, PhysicalDeviceFeatures2>
{
enum
{
@@ -6648,7 +6810,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DeviceGroupBindSparseInfo, BindSparseInfo>
+ struct StructExtends<PhysicalDeviceSamplerYcbcrConversionFeatures, DeviceCreateInfo>
{
enum
{
@@ -6656,7 +6818,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DeviceGroupCommandBufferBeginInfo, CommandBufferBeginInfo>
+ struct StructExtends<SamplerYcbcrConversionImageFormatProperties, ImageFormatProperties2>
{
enum
{
@@ -6664,7 +6826,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DeviceGroupDeviceCreateInfo, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceExternalImageFormatInfo, PhysicalDeviceImageFormatInfo2>
{
enum
{
@@ -6672,7 +6834,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DeviceGroupPresentInfoKHR, PresentInfoKHR>
+ struct StructExtends<ExternalImageFormatProperties, ImageFormatProperties2>
{
enum
{
@@ -6680,7 +6842,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DeviceGroupRenderPassBeginInfo, RenderPassBeginInfo>
+ struct StructExtends<PhysicalDeviceIDProperties, PhysicalDeviceProperties2>
{
enum
{
@@ -6688,7 +6850,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DeviceGroupSubmitInfo, SubmitInfo>
+ struct StructExtends<ExternalMemoryImageCreateInfo, ImageCreateInfo>
{
enum
{
@@ -6696,7 +6858,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DeviceGroupSwapchainCreateInfoKHR, SwapchainCreateInfoKHR>
+ struct StructExtends<ExternalMemoryBufferCreateInfo, BufferCreateInfo>
{
enum
{
@@ -6704,7 +6866,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DeviceMemoryOverallocationCreateInfoAMD, DeviceCreateInfo>
+ struct StructExtends<ExportMemoryAllocateInfo, MemoryAllocateInfo>
{
enum
{
@@ -6712,7 +6874,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DevicePrivateDataCreateInfoEXT, DeviceCreateInfo>
+ struct StructExtends<ExportFenceCreateInfo, FenceCreateInfo>
{
enum
{
@@ -6720,7 +6882,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DeviceQueueGlobalPriorityCreateInfoEXT, DeviceQueueCreateInfo>
+ struct StructExtends<ExportSemaphoreCreateInfo, SemaphoreCreateInfo>
{
enum
{
@@ -6728,7 +6890,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DisplayNativeHdrSurfaceCapabilitiesAMD, SurfaceCapabilities2KHR>
+ struct StructExtends<PhysicalDeviceMaintenance3Properties, PhysicalDeviceProperties2>
{
enum
{
@@ -6736,7 +6898,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DisplayPresentInfoKHR, PresentInfoKHR>
+ struct StructExtends<PhysicalDeviceShaderDrawParametersFeatures, PhysicalDeviceFeatures2>
{
enum
{
@@ -6744,33 +6906,33 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<DrmFormatModifierPropertiesListEXT, FormatProperties2>
+ struct StructExtends<PhysicalDeviceShaderDrawParametersFeatures, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_VERSION_1_2 ===
template <>
- struct StructExtends<ExportFenceCreateInfo, FenceCreateInfo>
+ struct StructExtends<PhysicalDeviceVulkan11Features, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
template <>
- struct StructExtends<ExportFenceWin32HandleInfoKHR, FenceCreateInfo>
+ struct StructExtends<PhysicalDeviceVulkan11Features, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template <>
- struct StructExtends<ExportMemoryAllocateInfo, MemoryAllocateInfo>
+ struct StructExtends<PhysicalDeviceVulkan11Properties, PhysicalDeviceProperties2>
{
enum
{
@@ -6778,54 +6940,47 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ExportMemoryAllocateInfoNV, MemoryAllocateInfo>
+ struct StructExtends<PhysicalDeviceVulkan12Features, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
template <>
- struct StructExtends<ExportMemoryWin32HandleInfoKHR, MemoryAllocateInfo>
+ struct StructExtends<PhysicalDeviceVulkan12Features, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
template <>
- struct StructExtends<ExportMemoryWin32HandleInfoNV, MemoryAllocateInfo>
+ struct StructExtends<PhysicalDeviceVulkan12Properties, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template <>
- struct StructExtends<ExportSemaphoreCreateInfo, SemaphoreCreateInfo>
+ struct StructExtends<ImageFormatListCreateInfo, ImageCreateInfo>
{
enum
{
value = true
};
};
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
template <>
- struct StructExtends<ExportSemaphoreWin32HandleInfoKHR, SemaphoreCreateInfo>
+ struct StructExtends<ImageFormatListCreateInfo, SwapchainCreateInfoKHR>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
template <>
- struct StructExtends<ExternalFormatANDROID, ImageCreateInfo>
+ struct StructExtends<ImageFormatListCreateInfo, PhysicalDeviceImageFormatInfo2>
{
enum
{
@@ -6833,16 +6988,15 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ExternalFormatANDROID, SamplerYcbcrConversionCreateInfo>
+ struct StructExtends<PhysicalDevice8BitStorageFeatures, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
template <>
- struct StructExtends<ExternalImageFormatProperties, ImageFormatProperties2>
+ struct StructExtends<PhysicalDevice8BitStorageFeatures, DeviceCreateInfo>
{
enum
{
@@ -6850,7 +7004,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ExternalMemoryBufferCreateInfo, BufferCreateInfo>
+ struct StructExtends<PhysicalDeviceDriverProperties, PhysicalDeviceProperties2>
{
enum
{
@@ -6858,7 +7012,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ExternalMemoryImageCreateInfo, ImageCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderAtomicInt64Features, PhysicalDeviceFeatures2>
{
enum
{
@@ -6866,7 +7020,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ExternalMemoryImageCreateInfoNV, ImageCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderAtomicInt64Features, DeviceCreateInfo>
{
enum
{
@@ -6874,7 +7028,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<FilterCubicImageViewImageFormatPropertiesEXT, ImageFormatProperties2>
+ struct StructExtends<PhysicalDeviceShaderFloat16Int8Features, PhysicalDeviceFeatures2>
{
enum
{
@@ -6882,7 +7036,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<FragmentShadingRateAttachmentInfoKHR, SubpassDescription2>
+ struct StructExtends<PhysicalDeviceShaderFloat16Int8Features, DeviceCreateInfo>
{
enum
{
@@ -6890,7 +7044,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<FramebufferAttachmentsCreateInfo, FramebufferCreateInfo>
+ struct StructExtends<PhysicalDeviceFloatControlsProperties, PhysicalDeviceProperties2>
{
enum
{
@@ -6898,7 +7052,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<GraphicsPipelineShaderGroupsCreateInfoNV, GraphicsPipelineCreateInfo>
+ struct StructExtends<DescriptorSetLayoutBindingFlagsCreateInfo, DescriptorSetLayoutCreateInfo>
{
enum
{
@@ -6906,7 +7060,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ImageDrmFormatModifierExplicitCreateInfoEXT, ImageCreateInfo>
+ struct StructExtends<PhysicalDeviceDescriptorIndexingFeatures, PhysicalDeviceFeatures2>
{
enum
{
@@ -6914,7 +7068,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ImageDrmFormatModifierListCreateInfoEXT, ImageCreateInfo>
+ struct StructExtends<PhysicalDeviceDescriptorIndexingFeatures, DeviceCreateInfo>
{
enum
{
@@ -6922,7 +7076,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ImageFormatListCreateInfo, ImageCreateInfo>
+ struct StructExtends<PhysicalDeviceDescriptorIndexingProperties, PhysicalDeviceProperties2>
{
enum
{
@@ -6930,7 +7084,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ImageFormatListCreateInfo, SwapchainCreateInfoKHR>
+ struct StructExtends<DescriptorSetVariableDescriptorCountAllocateInfo, DescriptorSetAllocateInfo>
{
enum
{
@@ -6938,7 +7092,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ImageFormatListCreateInfo, PhysicalDeviceImageFormatInfo2>
+ struct StructExtends<DescriptorSetVariableDescriptorCountLayoutSupport, DescriptorSetLayoutSupport>
{
enum
{
@@ -6946,7 +7100,31 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ImagePlaneMemoryRequirementsInfo, ImageMemoryRequirementsInfo2>
+ struct StructExtends<SubpassDescriptionDepthStencilResolve, SubpassDescription2>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+ template <>
+ struct StructExtends<PhysicalDeviceDepthStencilResolveProperties, PhysicalDeviceProperties2>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+ template <>
+ struct StructExtends<PhysicalDeviceScalarBlockLayoutFeatures, PhysicalDeviceFeatures2>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+ template <>
+ struct StructExtends<PhysicalDeviceScalarBlockLayoutFeatures, DeviceCreateInfo>
{
enum
{
@@ -6970,7 +7148,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ImageSwapchainCreateInfoKHR, ImageCreateInfo>
+ struct StructExtends<SamplerReductionModeCreateInfo, SamplerCreateInfo>
{
enum
{
@@ -6978,7 +7156,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ImageViewASTCDecodeModeEXT, ImageViewCreateInfo>
+ struct StructExtends<PhysicalDeviceSamplerFilterMinmaxProperties, PhysicalDeviceProperties2>
{
enum
{
@@ -6986,25 +7164,23 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ImageViewUsageCreateInfo, ImageViewCreateInfo>
+ struct StructExtends<PhysicalDeviceVulkanMemoryModelFeatures, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
template <>
- struct StructExtends<ImportAndroidHardwareBufferInfoANDROID, MemoryAllocateInfo>
+ struct StructExtends<PhysicalDeviceVulkanMemoryModelFeatures, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
template <>
- struct StructExtends<ImportMemoryFdInfoKHR, MemoryAllocateInfo>
+ struct StructExtends<PhysicalDeviceImagelessFramebufferFeatures, PhysicalDeviceFeatures2>
{
enum
{
@@ -7012,45 +7188,39 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ImportMemoryHostPointerInfoEXT, MemoryAllocateInfo>
+ struct StructExtends<PhysicalDeviceImagelessFramebufferFeatures, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
template <>
- struct StructExtends<ImportMemoryWin32HandleInfoKHR, MemoryAllocateInfo>
+ struct StructExtends<FramebufferAttachmentsCreateInfo, FramebufferCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
template <>
- struct StructExtends<ImportMemoryWin32HandleInfoNV, MemoryAllocateInfo>
+ struct StructExtends<RenderPassAttachmentBeginInfo, RenderPassBeginInfo>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_FUCHSIA )
template <>
- struct StructExtends<ImportMemoryZirconHandleInfoFUCHSIA, MemoryAllocateInfo>
+ struct StructExtends<PhysicalDeviceUniformBufferStandardLayoutFeatures, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_FUCHSIA*/
template <>
- struct StructExtends<MemoryAllocateFlagsInfo, MemoryAllocateInfo>
+ struct StructExtends<PhysicalDeviceUniformBufferStandardLayoutFeatures, DeviceCreateInfo>
{
enum
{
@@ -7058,7 +7228,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<MemoryBarrier2KHR, SubpassDependency2>
+ struct StructExtends<PhysicalDeviceShaderSubgroupExtendedTypesFeatures, PhysicalDeviceFeatures2>
{
enum
{
@@ -7066,7 +7236,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<MemoryDedicatedAllocateInfo, MemoryAllocateInfo>
+ struct StructExtends<PhysicalDeviceShaderSubgroupExtendedTypesFeatures, DeviceCreateInfo>
{
enum
{
@@ -7074,7 +7244,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<MemoryDedicatedRequirements, MemoryRequirements2>
+ struct StructExtends<PhysicalDeviceSeparateDepthStencilLayoutsFeatures, PhysicalDeviceFeatures2>
{
enum
{
@@ -7082,7 +7252,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<MemoryOpaqueCaptureAddressAllocateInfo, MemoryAllocateInfo>
+ struct StructExtends<PhysicalDeviceSeparateDepthStencilLayoutsFeatures, DeviceCreateInfo>
{
enum
{
@@ -7090,7 +7260,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<MemoryPriorityAllocateInfoEXT, MemoryAllocateInfo>
+ struct StructExtends<AttachmentReferenceStencilLayout, AttachmentReference2>
{
enum
{
@@ -7098,7 +7268,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<MutableDescriptorTypeCreateInfoVALVE, DescriptorSetLayoutCreateInfo>
+ struct StructExtends<AttachmentDescriptionStencilLayout, AttachmentDescription2>
{
enum
{
@@ -7106,7 +7276,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<MutableDescriptorTypeCreateInfoVALVE, DescriptorPoolCreateInfo>
+ struct StructExtends<PhysicalDeviceHostQueryResetFeatures, PhysicalDeviceFeatures2>
{
enum
{
@@ -7114,7 +7284,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PerformanceQuerySubmitInfoKHR, SubmitInfo>
+ struct StructExtends<PhysicalDeviceHostQueryResetFeatures, DeviceCreateInfo>
{
enum
{
@@ -7122,7 +7292,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PerformanceQuerySubmitInfoKHR, SubmitInfo2KHR>
+ struct StructExtends<PhysicalDeviceTimelineSemaphoreFeatures, PhysicalDeviceFeatures2>
{
enum
{
@@ -7130,7 +7300,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevice16BitStorageFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceTimelineSemaphoreFeatures, DeviceCreateInfo>
{
enum
{
@@ -7138,7 +7308,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevice16BitStorageFeatures, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceTimelineSemaphoreProperties, PhysicalDeviceProperties2>
{
enum
{
@@ -7146,7 +7316,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevice4444FormatsFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<SemaphoreTypeCreateInfo, SemaphoreCreateInfo>
{
enum
{
@@ -7154,7 +7324,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevice4444FormatsFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<SemaphoreTypeCreateInfo, PhysicalDeviceExternalSemaphoreInfo>
{
enum
{
@@ -7162,7 +7332,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevice8BitStorageFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<TimelineSemaphoreSubmitInfo, SubmitInfo>
{
enum
{
@@ -7170,7 +7340,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevice8BitStorageFeatures, DeviceCreateInfo>
+ struct StructExtends<TimelineSemaphoreSubmitInfo, BindSparseInfo>
{
enum
{
@@ -7178,7 +7348,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceASTCDecodeFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceBufferDeviceAddressFeatures, PhysicalDeviceFeatures2>
{
enum
{
@@ -7186,7 +7356,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceASTCDecodeFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceBufferDeviceAddressFeatures, DeviceCreateInfo>
{
enum
{
@@ -7194,7 +7364,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceAccelerationStructureFeaturesKHR, PhysicalDeviceFeatures2>
+ struct StructExtends<BufferOpaqueCaptureAddressCreateInfo, BufferCreateInfo>
{
enum
{
@@ -7202,15 +7372,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceAccelerationStructureFeaturesKHR, DeviceCreateInfo>
+ struct StructExtends<MemoryOpaqueCaptureAddressAllocateInfo, MemoryAllocateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_swapchain ===
template <>
- struct StructExtends<PhysicalDeviceAccelerationStructurePropertiesKHR, PhysicalDeviceProperties2>
+ struct StructExtends<ImageSwapchainCreateInfoKHR, ImageCreateInfo>
{
enum
{
@@ -7218,7 +7390,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceBlendOperationAdvancedFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<BindImageMemorySwapchainInfoKHR, BindImageMemoryInfo>
{
enum
{
@@ -7226,7 +7398,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceBlendOperationAdvancedFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<DeviceGroupPresentInfoKHR, PresentInfoKHR>
{
enum
{
@@ -7234,39 +7406,48 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceBlendOperationAdvancedPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<DeviceGroupSwapchainCreateInfoKHR, SwapchainCreateInfoKHR>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_display_swapchain ===
template <>
- struct StructExtends<PhysicalDeviceBufferDeviceAddressFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<DisplayPresentInfoKHR, PresentInfoKHR>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_debug_report ===
template <>
- struct StructExtends<PhysicalDeviceBufferDeviceAddressFeatures, DeviceCreateInfo>
+ struct StructExtends<DebugReportCallbackCreateInfoEXT, InstanceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_AMD_rasterization_order ===
template <>
- struct StructExtends<PhysicalDeviceBufferDeviceAddressFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PipelineRasterizationStateRasterizationOrderAMD, PipelineRasterizationStateCreateInfo>
{
enum
{
value = true
};
};
+
+#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_queue ===
template <>
- struct StructExtends<PhysicalDeviceBufferDeviceAddressFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<VideoQueueFamilyProperties2KHR, QueueFamilyProperties2>
{
enum
{
@@ -7274,7 +7455,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceCoherentMemoryFeaturesAMD, PhysicalDeviceFeatures2>
+ struct StructExtends<VideoProfileKHR, QueryPoolCreateInfo>
{
enum
{
@@ -7282,7 +7463,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceCoherentMemoryFeaturesAMD, DeviceCreateInfo>
+ struct StructExtends<VideoProfileKHR, FormatProperties2>
{
enum
{
@@ -7290,7 +7471,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceColorWriteEnableFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<VideoProfileKHR, ImageCreateInfo>
{
enum
{
@@ -7298,7 +7479,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceColorWriteEnableFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<VideoProfileKHR, ImageViewCreateInfo>
{
enum
{
@@ -7306,7 +7487,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceComputeShaderDerivativesFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<VideoProfileKHR, BufferCreateInfo>
{
enum
{
@@ -7314,7 +7495,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceComputeShaderDerivativesFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<VideoProfilesKHR, FormatProperties2>
{
enum
{
@@ -7322,7 +7503,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceConditionalRenderingFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<VideoProfilesKHR, ImageCreateInfo>
{
enum
{
@@ -7330,7 +7511,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceConditionalRenderingFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<VideoProfilesKHR, ImageViewCreateInfo>
{
enum
{
@@ -7338,15 +7519,18 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceConservativeRasterizationPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<VideoProfilesKHR, BufferCreateInfo>
{
enum
{
value = true
};
};
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_NV_dedicated_allocation ===
template <>
- struct StructExtends<PhysicalDeviceCooperativeMatrixFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<DedicatedAllocationImageCreateInfoNV, ImageCreateInfo>
{
enum
{
@@ -7354,7 +7538,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceCooperativeMatrixFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<DedicatedAllocationBufferCreateInfoNV, BufferCreateInfo>
{
enum
{
@@ -7362,15 +7546,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceCooperativeMatrixPropertiesNV, PhysicalDeviceProperties2>
+ struct StructExtends<DedicatedAllocationMemoryAllocateInfoNV, MemoryAllocateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_transform_feedback ===
template <>
- struct StructExtends<PhysicalDeviceCornerSampledImageFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceTransformFeedbackFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -7378,7 +7564,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceCornerSampledImageFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceTransformFeedbackFeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -7386,7 +7572,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceCoverageReductionModeFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceTransformFeedbackPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
@@ -7394,15 +7580,18 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceCoverageReductionModeFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<PipelineRasterizationStateStreamCreateInfoEXT, PipelineRasterizationStateCreateInfo>
{
enum
{
value = true
};
};
+
+#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_EXT_video_encode_h264 ===
template <>
- struct StructExtends<PhysicalDeviceCustomBorderColorFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<VideoEncodeH264CapabilitiesEXT, VideoCapabilitiesKHR>
{
enum
{
@@ -7410,7 +7599,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceCustomBorderColorFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<VideoEncodeH264SessionCreateInfoEXT, VideoSessionCreateInfoKHR>
{
enum
{
@@ -7418,7 +7607,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceCustomBorderColorPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<VideoEncodeH264SessionParametersCreateInfoEXT, VideoSessionParametersCreateInfoKHR>
{
enum
{
@@ -7426,7 +7615,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<VideoEncodeH264SessionParametersAddInfoEXT, VideoSessionParametersUpdateInfoKHR>
{
enum
{
@@ -7434,7 +7623,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<VideoEncodeH264VclFrameInfoEXT, VideoEncodeInfoKHR>
{
enum
{
@@ -7442,7 +7631,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceDepthClipEnableFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<VideoEncodeH264EmitPictureParametersEXT, VideoEncodeInfoKHR>
{
enum
{
@@ -7450,15 +7639,19 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceDepthClipEnableFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<VideoEncodeH264ProfileEXT, VideoProfileKHR>
{
enum
{
value = true
};
};
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_EXT_video_decode_h264 ===
template <>
- struct StructExtends<PhysicalDeviceDepthStencilResolveProperties, PhysicalDeviceProperties2>
+ struct StructExtends<VideoDecodeH264ProfileEXT, VideoProfileKHR>
{
enum
{
@@ -7466,7 +7659,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceDescriptorIndexingFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<VideoDecodeH264CapabilitiesEXT, VideoCapabilitiesKHR>
{
enum
{
@@ -7474,7 +7667,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceDescriptorIndexingFeatures, DeviceCreateInfo>
+ struct StructExtends<VideoDecodeH264SessionCreateInfoEXT, VideoSessionCreateInfoKHR>
{
enum
{
@@ -7482,7 +7675,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceDescriptorIndexingProperties, PhysicalDeviceProperties2>
+ struct StructExtends<VideoDecodeH264SessionParametersCreateInfoEXT, VideoSessionParametersCreateInfoKHR>
{
enum
{
@@ -7490,7 +7683,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceDeviceGeneratedCommandsFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<VideoDecodeH264SessionParametersAddInfoEXT, VideoSessionParametersUpdateInfoKHR>
{
enum
{
@@ -7498,7 +7691,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceDeviceGeneratedCommandsFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<VideoDecodeH264PictureInfoEXT, VideoDecodeInfoKHR>
{
enum
{
@@ -7506,7 +7699,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceDeviceGeneratedCommandsPropertiesNV, PhysicalDeviceProperties2>
+ struct StructExtends<VideoDecodeH264MvcEXT, VideoDecodeH264PictureInfoEXT>
{
enum
{
@@ -7514,23 +7707,28 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceDeviceMemoryReportFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<VideoDecodeH264DpbSlotInfoEXT, VideoReferenceSlotKHR>
{
enum
{
value = true
};
};
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_AMD_texture_gather_bias_lod ===
template <>
- struct StructExtends<PhysicalDeviceDeviceMemoryReportFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<TextureLODGatherFormatPropertiesAMD, ImageFormatProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_corner_sampled_image ===
template <>
- struct StructExtends<PhysicalDeviceDiagnosticsConfigFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceCornerSampledImageFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -7538,15 +7736,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceDiagnosticsConfigFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceCornerSampledImageFeaturesNV, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_external_memory ===
template <>
- struct StructExtends<PhysicalDeviceDiscardRectanglePropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<ExternalMemoryImageCreateInfoNV, ImageCreateInfo>
{
enum
{
@@ -7554,15 +7754,18 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceDriverProperties, PhysicalDeviceProperties2>
+ struct StructExtends<ExportMemoryAllocateInfoNV, MemoryAllocateInfo>
{
enum
{
value = true
};
};
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_NV_external_memory_win32 ===
template <>
- struct StructExtends<PhysicalDeviceDrmPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<ImportMemoryWin32HandleInfoNV, MemoryAllocateInfo>
{
enum
{
@@ -7570,15 +7773,19 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceExclusiveScissorFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<ExportMemoryWin32HandleInfoNV, MemoryAllocateInfo>
{
enum
{
value = true
};
};
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_NV_win32_keyed_mutex ===
template <>
- struct StructExtends<PhysicalDeviceExclusiveScissorFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<Win32KeyedMutexAcquireReleaseInfoNV, SubmitInfo>
{
enum
{
@@ -7586,23 +7793,28 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceExtendedDynamicState2FeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<Win32KeyedMutexAcquireReleaseInfoNV, SubmitInfo2KHR>
{
enum
{
value = true
};
};
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_EXT_validation_flags ===
template <>
- struct StructExtends<PhysicalDeviceExtendedDynamicState2FeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<ValidationFlagsEXT, InstanceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_texture_compression_astc_hdr ===
template <>
- struct StructExtends<PhysicalDeviceExtendedDynamicStateFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -7610,15 +7822,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceExtendedDynamicStateFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_astc_decode_mode ===
template <>
- struct StructExtends<PhysicalDeviceExternalImageFormatInfo, PhysicalDeviceImageFormatInfo2>
+ struct StructExtends<ImageViewASTCDecodeModeEXT, ImageViewCreateInfo>
{
enum
{
@@ -7626,7 +7840,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceExternalMemoryHostPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceASTCDecodeFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -7634,15 +7848,18 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceFeatures2, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceASTCDecodeFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_memory_win32 ===
template <>
- struct StructExtends<PhysicalDeviceFloatControlsProperties, PhysicalDeviceProperties2>
+ struct StructExtends<ImportMemoryWin32HandleInfoKHR, MemoryAllocateInfo>
{
enum
{
@@ -7650,23 +7867,29 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceFragmentDensityMap2FeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<ExportMemoryWin32HandleInfoKHR, MemoryAllocateInfo>
{
enum
{
value = true
};
};
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_external_memory_fd ===
template <>
- struct StructExtends<PhysicalDeviceFragmentDensityMap2FeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<ImportMemoryFdInfoKHR, MemoryAllocateInfo>
{
enum
{
value = true
};
};
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_win32_keyed_mutex ===
template <>
- struct StructExtends<PhysicalDeviceFragmentDensityMap2PropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<Win32KeyedMutexAcquireReleaseInfoKHR, SubmitInfo>
{
enum
{
@@ -7674,15 +7897,19 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceFragmentDensityMapFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<Win32KeyedMutexAcquireReleaseInfoKHR, SubmitInfo2KHR>
{
enum
{
value = true
};
};
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_semaphore_win32 ===
template <>
- struct StructExtends<PhysicalDeviceFragmentDensityMapFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<ExportSemaphoreWin32HandleInfoKHR, SemaphoreCreateInfo>
{
enum
{
@@ -7690,23 +7917,28 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceFragmentDensityMapPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<D3D12FenceSubmitInfoKHR, SubmitInfo>
{
enum
{
value = true
};
};
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_push_descriptor ===
template <>
- struct StructExtends<PhysicalDeviceFragmentShaderBarycentricFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDevicePushDescriptorPropertiesKHR, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_conditional_rendering ===
template <>
- struct StructExtends<PhysicalDeviceFragmentShaderBarycentricFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceConditionalRenderingFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -7714,7 +7946,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceFragmentShaderInterlockFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceConditionalRenderingFeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -7722,63 +7954,77 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceFragmentShaderInterlockFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<CommandBufferInheritanceConditionalRenderingInfoEXT, CommandBufferInheritanceInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_incremental_present ===
template <>
- struct StructExtends<PhysicalDeviceFragmentShadingRateEnumsFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<PresentRegionsKHR, PresentInfoKHR>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_clip_space_w_scaling ===
template <>
- struct StructExtends<PhysicalDeviceFragmentShadingRateEnumsFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<PipelineViewportWScalingStateCreateInfoNV, PipelineViewportStateCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_display_control ===
template <>
- struct StructExtends<PhysicalDeviceFragmentShadingRateEnumsPropertiesNV, PhysicalDeviceProperties2>
+ struct StructExtends<SwapchainCounterCreateInfoEXT, SwapchainCreateInfoKHR>
{
enum
{
value = true
};
};
+
+ //=== VK_GOOGLE_display_timing ===
template <>
- struct StructExtends<PhysicalDeviceFragmentShadingRateFeaturesKHR, PhysicalDeviceFeatures2>
+ struct StructExtends<PresentTimesInfoGOOGLE, PresentInfoKHR>
{
enum
{
value = true
};
};
+
+ //=== VK_NVX_multiview_per_view_attributes ===
template <>
- struct StructExtends<PhysicalDeviceFragmentShadingRateFeaturesKHR, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_viewport_swizzle ===
template <>
- struct StructExtends<PhysicalDeviceFragmentShadingRatePropertiesKHR, PhysicalDeviceProperties2>
+ struct StructExtends<PipelineViewportSwizzleStateCreateInfoNV, PipelineViewportStateCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_discard_rectangles ===
template <>
- struct StructExtends<PhysicalDeviceGlobalPriorityQueryFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceDiscardRectanglePropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
@@ -7786,15 +8032,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceHostQueryResetFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<PipelineDiscardRectangleStateCreateInfoEXT, GraphicsPipelineCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_conservative_rasterization ===
template <>
- struct StructExtends<PhysicalDeviceHostQueryResetFeatures, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceConservativeRasterizationPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
@@ -7802,15 +8050,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceIDProperties, PhysicalDeviceProperties2>
+ struct StructExtends<PipelineRasterizationConservativeStateCreateInfoEXT, PipelineRasterizationStateCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_depth_clip_enable ===
template <>
- struct StructExtends<PhysicalDeviceImageDrmFormatModifierInfoEXT, PhysicalDeviceImageFormatInfo2>
+ struct StructExtends<PhysicalDeviceDepthClipEnableFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -7818,7 +8068,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceImageRobustnessFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceDepthClipEnableFeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -7826,31 +8076,39 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceImageRobustnessFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PipelineRasterizationDepthClipStateCreateInfoEXT, PipelineRasterizationStateCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_shared_presentable_image ===
template <>
- struct StructExtends<PhysicalDeviceImageViewImageFormatInfoEXT, PhysicalDeviceImageFormatInfo2>
+ struct StructExtends<SharedPresentSurfaceCapabilitiesKHR, SurfaceCapabilities2KHR>
{
enum
{
value = true
};
};
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_fence_win32 ===
template <>
- struct StructExtends<PhysicalDeviceImagelessFramebufferFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<ExportFenceWin32HandleInfoKHR, FenceCreateInfo>
{
enum
{
value = true
};
};
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_performance_query ===
template <>
- struct StructExtends<PhysicalDeviceImagelessFramebufferFeatures, DeviceCreateInfo>
+ struct StructExtends<PhysicalDevicePerformanceQueryFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
@@ -7858,7 +8116,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceIndexTypeUint8FeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDevicePerformanceQueryFeaturesKHR, DeviceCreateInfo>
{
enum
{
@@ -7866,7 +8124,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceIndexTypeUint8FeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PhysicalDevicePerformanceQueryPropertiesKHR, PhysicalDeviceProperties2>
{
enum
{
@@ -7874,7 +8132,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceInheritedViewportScissorFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<QueryPoolPerformanceCreateInfoKHR, QueryPoolCreateInfo>
{
enum
{
@@ -7882,7 +8140,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceInheritedViewportScissorFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<PerformanceQuerySubmitInfoKHR, SubmitInfo>
{
enum
{
@@ -7890,23 +8148,28 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceInlineUniformBlockFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PerformanceQuerySubmitInfoKHR, SubmitInfo2KHR>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_debug_utils ===
template <>
- struct StructExtends<PhysicalDeviceInlineUniformBlockFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<DebugUtilsMessengerCreateInfoEXT, InstanceCreateInfo>
{
enum
{
value = true
};
};
+
+#if defined( VK_USE_PLATFORM_ANDROID_KHR )
+ //=== VK_ANDROID_external_memory_android_hardware_buffer ===
template <>
- struct StructExtends<PhysicalDeviceInlineUniformBlockPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<AndroidHardwareBufferUsageANDROID, ImageFormatProperties2>
{
enum
{
@@ -7914,7 +8177,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceLineRasterizationFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<AndroidHardwareBufferFormatPropertiesANDROID, AndroidHardwareBufferPropertiesANDROID>
{
enum
{
@@ -7922,7 +8185,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceLineRasterizationFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<ImportAndroidHardwareBufferInfoANDROID, MemoryAllocateInfo>
{
enum
{
@@ -7930,7 +8193,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceLineRasterizationPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<ExternalFormatANDROID, ImageCreateInfo>
{
enum
{
@@ -7938,15 +8201,18 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceMaintenance3Properties, PhysicalDeviceProperties2>
+ struct StructExtends<ExternalFormatANDROID, SamplerYcbcrConversionCreateInfo>
{
enum
{
value = true
};
};
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+ //=== VK_EXT_inline_uniform_block ===
template <>
- struct StructExtends<PhysicalDeviceMemoryBudgetPropertiesEXT, PhysicalDeviceMemoryProperties2>
+ struct StructExtends<PhysicalDeviceInlineUniformBlockFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -7954,7 +8220,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceMemoryPriorityFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceInlineUniformBlockFeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -7962,7 +8228,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceMemoryPriorityFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceInlineUniformBlockPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
@@ -7970,7 +8236,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceMeshShaderFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<WriteDescriptorSetInlineUniformBlockEXT, WriteDescriptorSet>
{
enum
{
@@ -7978,15 +8244,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceMeshShaderFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<DescriptorPoolInlineUniformBlockCreateInfoEXT, DescriptorPoolCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_sample_locations ===
template <>
- struct StructExtends<PhysicalDeviceMeshShaderPropertiesNV, PhysicalDeviceProperties2>
+ struct StructExtends<SampleLocationsInfoEXT, ImageMemoryBarrier>
{
enum
{
@@ -7994,7 +8262,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceMultiDrawFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<SampleLocationsInfoEXT, ImageMemoryBarrier2KHR>
{
enum
{
@@ -8002,7 +8270,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceMultiDrawFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<RenderPassSampleLocationsBeginInfoEXT, RenderPassBeginInfo>
{
enum
{
@@ -8010,7 +8278,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceMultiDrawPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<PipelineSampleLocationsStateCreateInfoEXT, PipelineMultisampleStateCreateInfo>
{
enum
{
@@ -8018,15 +8286,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceMultiviewFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceSampleLocationsPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_blend_operation_advanced ===
template <>
- struct StructExtends<PhysicalDeviceMultiviewFeatures, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceBlendOperationAdvancedFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -8034,7 +8304,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceBlendOperationAdvancedFeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -8042,7 +8312,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceMultiviewProperties, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceBlendOperationAdvancedPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
@@ -8050,23 +8320,27 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceMutableDescriptorTypeFeaturesVALVE, PhysicalDeviceFeatures2>
+ struct StructExtends<PipelineColorBlendAdvancedStateCreateInfoEXT, PipelineColorBlendStateCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_fragment_coverage_to_color ===
template <>
- struct StructExtends<PhysicalDeviceMutableDescriptorTypeFeaturesVALVE, DeviceCreateInfo>
+ struct StructExtends<PipelineCoverageToColorStateCreateInfoNV, PipelineMultisampleStateCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_acceleration_structure ===
template <>
- struct StructExtends<PhysicalDevicePCIBusInfoPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<WriteDescriptorSetAccelerationStructureKHR, WriteDescriptorSet>
{
enum
{
@@ -8074,7 +8348,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevicePerformanceQueryFeaturesKHR, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceAccelerationStructureFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
@@ -8082,7 +8356,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevicePerformanceQueryFeaturesKHR, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceAccelerationStructureFeaturesKHR, DeviceCreateInfo>
{
enum
{
@@ -8090,23 +8364,27 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevicePerformanceQueryPropertiesKHR, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceAccelerationStructurePropertiesKHR, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_framebuffer_mixed_samples ===
template <>
- struct StructExtends<PhysicalDevicePipelineCreationCacheControlFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PipelineCoverageModulationStateCreateInfoNV, PipelineMultisampleStateCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_shader_sm_builtins ===
template <>
- struct StructExtends<PhysicalDevicePipelineCreationCacheControlFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderSMBuiltinsPropertiesNV, PhysicalDeviceProperties2>
{
enum
{
@@ -8114,7 +8392,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevicePipelineExecutablePropertiesFeaturesKHR, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceShaderSMBuiltinsFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -8122,24 +8400,25 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevicePipelineExecutablePropertiesFeaturesKHR, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderSMBuiltinsFeaturesNV, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_image_drm_format_modifier ===
template <>
- struct StructExtends<PhysicalDevicePointClippingProperties, PhysicalDeviceProperties2>
+ struct StructExtends<DrmFormatModifierPropertiesListEXT, FormatProperties2>
{
enum
{
value = true
};
};
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<PhysicalDevicePortabilitySubsetFeaturesKHR, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceImageDrmFormatModifierInfoEXT, PhysicalDeviceImageFormatInfo2>
{
enum
{
@@ -8147,26 +8426,44 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevicePortabilitySubsetFeaturesKHR, DeviceCreateInfo>
+ struct StructExtends<ImageDrmFormatModifierListCreateInfoEXT, ImageCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+ template <>
+ struct StructExtends<ImageDrmFormatModifierExplicitCreateInfoEXT, ImageCreateInfo>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+
+ //=== VK_EXT_validation_cache ===
+ template <>
+ struct StructExtends<ShaderModuleValidationCacheCreateInfoEXT, ShaderModuleCreateInfo>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+
#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_portability_subset ===
template <>
- struct StructExtends<PhysicalDevicePortabilitySubsetPropertiesKHR, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDevicePortabilitySubsetFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
template <>
- struct StructExtends<PhysicalDevicePrivateDataFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDevicePortabilitySubsetFeaturesKHR, DeviceCreateInfo>
{
enum
{
@@ -8174,15 +8471,18 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevicePrivateDataFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PhysicalDevicePortabilitySubsetPropertiesKHR, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_NV_shading_rate_image ===
template <>
- struct StructExtends<PhysicalDeviceProtectedMemoryFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<PipelineViewportShadingRateImageStateCreateInfoNV, PipelineViewportStateCreateInfo>
{
enum
{
@@ -8190,7 +8490,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceProtectedMemoryFeatures, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceShadingRateImageFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -8198,7 +8498,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceProtectedMemoryProperties, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceShadingRateImageFeaturesNV, DeviceCreateInfo>
{
enum
{
@@ -8206,7 +8506,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceProvokingVertexFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceShadingRateImagePropertiesNV, PhysicalDeviceProperties2>
{
enum
{
@@ -8214,15 +8514,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceProvokingVertexFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PipelineViewportCoarseSampleOrderStateCreateInfoNV, PipelineViewportStateCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_ray_tracing ===
template <>
- struct StructExtends<PhysicalDeviceProvokingVertexPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<WriteDescriptorSetAccelerationStructureNV, WriteDescriptorSet>
{
enum
{
@@ -8230,15 +8532,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDevicePushDescriptorPropertiesKHR, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceRayTracingPropertiesNV, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_representative_fragment_test ===
template <>
- struct StructExtends<PhysicalDeviceRayQueryFeaturesKHR, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceRepresentativeFragmentTestFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -8246,7 +8550,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceRayQueryFeaturesKHR, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceRepresentativeFragmentTestFeaturesNV, DeviceCreateInfo>
{
enum
{
@@ -8254,15 +8558,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceRayTracingMotionBlurFeaturesNV, PhysicalDeviceProperties2>
+ struct StructExtends<PipelineRepresentativeFragmentTestStateCreateInfoNV, GraphicsPipelineCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_filter_cubic ===
template <>
- struct StructExtends<PhysicalDeviceRayTracingMotionBlurFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceImageViewImageFormatInfoEXT, PhysicalDeviceImageFormatInfo2>
{
enum
{
@@ -8270,23 +8576,27 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceRayTracingPipelineFeaturesKHR, PhysicalDeviceFeatures2>
+ struct StructExtends<FilterCubicImageViewImageFormatPropertiesEXT, ImageFormatProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_global_priority ===
template <>
- struct StructExtends<PhysicalDeviceRayTracingPipelineFeaturesKHR, DeviceCreateInfo>
+ struct StructExtends<DeviceQueueGlobalPriorityCreateInfoEXT, DeviceQueueCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_external_memory_host ===
template <>
- struct StructExtends<PhysicalDeviceRayTracingPipelinePropertiesKHR, PhysicalDeviceProperties2>
+ struct StructExtends<ImportMemoryHostPointerInfoEXT, MemoryAllocateInfo>
{
enum
{
@@ -8294,15 +8604,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceRayTracingPropertiesNV, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceExternalMemoryHostPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_shader_clock ===
template <>
- struct StructExtends<PhysicalDeviceRepresentativeFragmentTestFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceShaderClockFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
@@ -8310,15 +8622,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceRepresentativeFragmentTestFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderClockFeaturesKHR, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_AMD_pipeline_compiler_control ===
template <>
- struct StructExtends<PhysicalDeviceRobustness2FeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PipelineCompilerControlCreateInfoAMD, GraphicsPipelineCreateInfo>
{
enum
{
@@ -8326,23 +8640,28 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceRobustness2FeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PipelineCompilerControlCreateInfoAMD, ComputePipelineCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_AMD_shader_core_properties ===
template <>
- struct StructExtends<PhysicalDeviceRobustness2PropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceShaderCorePropertiesAMD, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_EXT_video_decode_h265 ===
template <>
- struct StructExtends<PhysicalDeviceSampleLocationsPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<VideoDecodeH265ProfileEXT, VideoProfileKHR>
{
enum
{
@@ -8350,7 +8669,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceSamplerFilterMinmaxProperties, PhysicalDeviceProperties2>
+ struct StructExtends<VideoDecodeH265CapabilitiesEXT, VideoCapabilitiesKHR>
{
enum
{
@@ -8358,7 +8677,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceSamplerYcbcrConversionFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<VideoDecodeH265SessionCreateInfoEXT, VideoSessionCreateInfoKHR>
{
enum
{
@@ -8366,7 +8685,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceSamplerYcbcrConversionFeatures, DeviceCreateInfo>
+ struct StructExtends<VideoDecodeH265SessionParametersCreateInfoEXT, VideoSessionParametersCreateInfoKHR>
{
enum
{
@@ -8374,7 +8693,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceScalarBlockLayoutFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<VideoDecodeH265SessionParametersAddInfoEXT, VideoSessionParametersUpdateInfoKHR>
{
enum
{
@@ -8382,7 +8701,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceScalarBlockLayoutFeatures, DeviceCreateInfo>
+ struct StructExtends<VideoDecodeH265PictureInfoEXT, VideoDecodeInfoKHR>
{
enum
{
@@ -8390,23 +8709,28 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceSeparateDepthStencilLayoutsFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<VideoDecodeH265DpbSlotInfoEXT, VideoReferenceSlotKHR>
{
enum
{
value = true
};
};
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_AMD_memory_overallocation_behavior ===
template <>
- struct StructExtends<PhysicalDeviceSeparateDepthStencilLayoutsFeatures, DeviceCreateInfo>
+ struct StructExtends<DeviceMemoryOverallocationCreateInfoAMD, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_vertex_attribute_divisor ===
template <>
- struct StructExtends<PhysicalDeviceShaderAtomicFloatFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceVertexAttributeDivisorPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
@@ -8414,7 +8738,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShaderAtomicFloatFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PipelineVertexInputDivisorStateCreateInfoEXT, PipelineVertexInputStateCreateInfo>
{
enum
{
@@ -8422,7 +8746,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShaderAtomicInt64Features, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceVertexAttributeDivisorFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -8430,23 +8754,29 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShaderAtomicInt64Features, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceVertexAttributeDivisorFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+#if defined( VK_USE_PLATFORM_GGP )
+ //=== VK_GGP_frame_token ===
template <>
- struct StructExtends<PhysicalDeviceShaderClockFeaturesKHR, PhysicalDeviceFeatures2>
+ struct StructExtends<PresentFrameTokenGGP, PresentInfoKHR>
{
enum
{
value = true
};
};
+#endif /*VK_USE_PLATFORM_GGP*/
+
+ //=== VK_EXT_pipeline_creation_feedback ===
template <>
- struct StructExtends<PhysicalDeviceShaderClockFeaturesKHR, DeviceCreateInfo>
+ struct StructExtends<PipelineCreationFeedbackCreateInfoEXT, GraphicsPipelineCreateInfo>
{
enum
{
@@ -8454,7 +8784,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShaderCoreProperties2AMD, PhysicalDeviceProperties2>
+ struct StructExtends<PipelineCreationFeedbackCreateInfoEXT, ComputePipelineCreateInfo>
{
enum
{
@@ -8462,7 +8792,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShaderCorePropertiesAMD, PhysicalDeviceProperties2>
+ struct StructExtends<PipelineCreationFeedbackCreateInfoEXT, RayTracingPipelineCreateInfoNV>
{
enum
{
@@ -8470,15 +8800,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PipelineCreationFeedbackCreateInfoEXT, RayTracingPipelineCreateInfoKHR>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_compute_shader_derivatives ===
template <>
- struct StructExtends<PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceComputeShaderDerivativesFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -8486,15 +8818,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShaderDrawParametersFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceComputeShaderDerivativesFeaturesNV, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_mesh_shader ===
template <>
- struct StructExtends<PhysicalDeviceShaderDrawParametersFeatures, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceMeshShaderFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -8502,7 +8836,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShaderFloat16Int8Features, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceMeshShaderFeaturesNV, DeviceCreateInfo>
{
enum
{
@@ -8510,15 +8844,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShaderFloat16Int8Features, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceMeshShaderPropertiesNV, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_fragment_shader_barycentric ===
template <>
- struct StructExtends<PhysicalDeviceShaderImageAtomicInt64FeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceFragmentShaderBarycentricFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -8526,13 +8862,15 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShaderImageAtomicInt64FeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceFragmentShaderBarycentricFeaturesNV, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_shader_image_footprint ===
template <>
struct StructExtends<PhysicalDeviceShaderImageFootprintFeaturesNV, PhysicalDeviceFeatures2>
{
@@ -8549,8 +8887,10 @@ namespace VULKAN_HPP_NAMESPACE
value = true
};
};
+
+ //=== VK_NV_scissor_exclusive ===
template <>
- struct StructExtends<PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL, PhysicalDeviceFeatures2>
+ struct StructExtends<PipelineViewportExclusiveScissorStateCreateInfoNV, PipelineViewportStateCreateInfo>
{
enum
{
@@ -8558,7 +8898,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceExclusiveScissorFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -8566,23 +8906,27 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShaderSMBuiltinsFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceExclusiveScissorFeaturesNV, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_device_diagnostic_checkpoints ===
template <>
- struct StructExtends<PhysicalDeviceShaderSMBuiltinsFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<QueueFamilyCheckpointPropertiesNV, QueueFamilyProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_INTEL_shader_integer_functions2 ===
template <>
- struct StructExtends<PhysicalDeviceShaderSMBuiltinsPropertiesNV, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL, PhysicalDeviceFeatures2>
{
enum
{
@@ -8590,31 +8934,37 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShaderSubgroupExtendedTypesFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_INTEL_performance_query ===
template <>
- struct StructExtends<PhysicalDeviceShaderSubgroupExtendedTypesFeatures, DeviceCreateInfo>
+ struct StructExtends<QueryPoolPerformanceQueryCreateInfoINTEL, QueryPoolCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_pci_bus_info ===
template <>
- struct StructExtends<PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDevicePCIBusInfoPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_AMD_display_native_hdr ===
template <>
- struct StructExtends<PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR, DeviceCreateInfo>
+ struct StructExtends<DisplayNativeHdrSurfaceCapabilitiesAMD, SurfaceCapabilities2KHR>
{
enum
{
@@ -8622,6 +8972,16 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
+ struct StructExtends<SwapchainDisplayNativeHdrCreateInfoAMD, SwapchainCreateInfoKHR>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+
+ //=== VK_KHR_shader_terminate_invocation ===
+ template <>
struct StructExtends<PhysicalDeviceShaderTerminateInvocationFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
@@ -8637,8 +8997,10 @@ namespace VULKAN_HPP_NAMESPACE
value = true
};
};
+
+ //=== VK_EXT_fragment_density_map ===
template <>
- struct StructExtends<PhysicalDeviceShadingRateImageFeaturesNV, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceFragmentDensityMapFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -8646,7 +9008,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShadingRateImageFeaturesNV, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceFragmentDensityMapFeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -8654,7 +9016,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceShadingRateImagePropertiesNV, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceFragmentDensityMapPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
@@ -8662,13 +9024,23 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceSubgroupProperties, PhysicalDeviceProperties2>
+ struct StructExtends<RenderPassFragmentDensityMapCreateInfoEXT, RenderPassCreateInfo>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+ template <>
+ struct StructExtends<RenderPassFragmentDensityMapCreateInfoEXT, RenderPassCreateInfo2>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_subgroup_size_control ===
template <>
struct StructExtends<PhysicalDeviceSubgroupSizeControlFeaturesEXT, PhysicalDeviceFeatures2>
{
@@ -8694,15 +9066,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceSubpassShadingFeaturesHUAWEI, PhysicalDeviceFeatures2>
+ struct StructExtends<PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT, PipelineShaderStageCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_fragment_shading_rate ===
template <>
- struct StructExtends<PhysicalDeviceSubpassShadingFeaturesHUAWEI, DeviceCreateInfo>
+ struct StructExtends<FragmentShadingRateAttachmentInfoKHR, SubpassDescription2>
{
enum
{
@@ -8710,7 +9084,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceSubpassShadingPropertiesHUAWEI, PhysicalDeviceProperties2>
+ struct StructExtends<PipelineFragmentShadingRateStateCreateInfoKHR, GraphicsPipelineCreateInfo>
{
enum
{
@@ -8718,7 +9092,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceSynchronization2FeaturesKHR, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceFragmentShadingRateFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
@@ -8726,7 +9100,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceSynchronization2FeaturesKHR, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceFragmentShadingRateFeaturesKHR, DeviceCreateInfo>
{
enum
{
@@ -8734,23 +9108,27 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceTexelBufferAlignmentFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceFragmentShadingRatePropertiesKHR, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_AMD_shader_core_properties2 ===
template <>
- struct StructExtends<PhysicalDeviceTexelBufferAlignmentFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderCoreProperties2AMD, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_AMD_device_coherent_memory ===
template <>
- struct StructExtends<PhysicalDeviceTexelBufferAlignmentPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceCoherentMemoryFeaturesAMD, PhysicalDeviceFeatures2>
{
enum
{
@@ -8758,15 +9136,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceCoherentMemoryFeaturesAMD, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_shader_image_atomic_int64 ===
template <>
- struct StructExtends<PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderImageAtomicInt64FeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -8774,23 +9154,27 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceTimelineSemaphoreFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceShaderImageAtomicInt64FeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_memory_budget ===
template <>
- struct StructExtends<PhysicalDeviceTimelineSemaphoreFeatures, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceMemoryBudgetPropertiesEXT, PhysicalDeviceMemoryProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_memory_priority ===
template <>
- struct StructExtends<PhysicalDeviceTimelineSemaphoreProperties, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceMemoryPriorityFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -8798,7 +9182,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceTransformFeedbackFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceMemoryPriorityFeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -8806,23 +9190,27 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceTransformFeedbackFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<MemoryPriorityAllocateInfoEXT, MemoryAllocateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_surface_protected_capabilities ===
template <>
- struct StructExtends<PhysicalDeviceTransformFeedbackPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<SurfaceProtectedCapabilitiesKHR, SurfaceCapabilities2KHR>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_dedicated_allocation_image_aliasing ===
template <>
- struct StructExtends<PhysicalDeviceUniformBufferStandardLayoutFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -8830,15 +9218,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceUniformBufferStandardLayoutFeatures, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_buffer_device_address ===
template <>
- struct StructExtends<PhysicalDeviceVariablePointersFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceBufferDeviceAddressFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -8846,7 +9236,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceVariablePointersFeatures, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceBufferDeviceAddressFeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -8854,23 +9244,27 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceVertexAttributeDivisorFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<BufferDeviceAddressCreateInfoEXT, BufferCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_validation_features ===
template <>
- struct StructExtends<PhysicalDeviceVertexAttributeDivisorFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<ValidationFeaturesEXT, InstanceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_present_wait ===
template <>
- struct StructExtends<PhysicalDeviceVertexAttributeDivisorPropertiesEXT, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDevicePresentWaitFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
@@ -8878,15 +9272,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceVertexInputDynamicStateFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDevicePresentWaitFeaturesKHR, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_cooperative_matrix ===
template <>
- struct StructExtends<PhysicalDeviceVertexInputDynamicStateFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceCooperativeMatrixFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -8894,7 +9290,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceVulkan11Features, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceCooperativeMatrixFeaturesNV, DeviceCreateInfo>
{
enum
{
@@ -8902,15 +9298,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceVulkan11Features, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceCooperativeMatrixPropertiesNV, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_coverage_reduction_mode ===
template <>
- struct StructExtends<PhysicalDeviceVulkan11Properties, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceCoverageReductionModeFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -8918,7 +9316,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceVulkan12Features, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceCoverageReductionModeFeaturesNV, DeviceCreateInfo>
{
enum
{
@@ -8926,15 +9324,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceVulkan12Features, DeviceCreateInfo>
+ struct StructExtends<PipelineCoverageReductionStateCreateInfoNV, PipelineMultisampleStateCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_fragment_shader_interlock ===
template <>
- struct StructExtends<PhysicalDeviceVulkan12Properties, PhysicalDeviceProperties2>
+ struct StructExtends<PhysicalDeviceFragmentShaderInterlockFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -8942,15 +9342,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceVulkanMemoryModelFeatures, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceFragmentShaderInterlockFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_ycbcr_image_arrays ===
template <>
- struct StructExtends<PhysicalDeviceVulkanMemoryModelFeatures, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceYcbcrImageArraysFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -8958,15 +9360,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceYcbcrImageArraysFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_provoking_vertex ===
template <>
- struct StructExtends<PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceProvokingVertexFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -8974,7 +9378,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PhysicalDeviceProvokingVertexFeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -8982,7 +9386,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<PhysicalDeviceProvokingVertexPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
@@ -8990,15 +9394,18 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceYcbcrImageArraysFeaturesEXT, PhysicalDeviceFeatures2>
+ struct StructExtends<PipelineRasterizationProvokingVertexStateCreateInfoEXT, PipelineRasterizationStateCreateInfo>
{
enum
{
value = true
};
};
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_EXT_full_screen_exclusive ===
template <>
- struct StructExtends<PhysicalDeviceYcbcrImageArraysFeaturesEXT, DeviceCreateInfo>
+ struct StructExtends<SurfaceFullScreenExclusiveInfoEXT, PhysicalDeviceSurfaceInfo2KHR>
{
enum
{
@@ -9006,7 +9413,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR, PhysicalDeviceFeatures2>
+ struct StructExtends<SurfaceFullScreenExclusiveInfoEXT, SwapchainCreateInfoKHR>
{
enum
{
@@ -9014,7 +9421,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR, DeviceCreateInfo>
+ struct StructExtends<SurfaceCapabilitiesFullScreenExclusiveEXT, SurfaceCapabilities2KHR>
{
enum
{
@@ -9022,7 +9429,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineColorBlendAdvancedStateCreateInfoEXT, PipelineColorBlendStateCreateInfo>
+ struct StructExtends<SurfaceFullScreenExclusiveWin32InfoEXT, PhysicalDeviceSurfaceInfo2KHR>
{
enum
{
@@ -9030,15 +9437,18 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineColorWriteCreateInfoEXT, PipelineColorBlendStateCreateInfo>
+ struct StructExtends<SurfaceFullScreenExclusiveWin32InfoEXT, SwapchainCreateInfoKHR>
{
enum
{
value = true
};
};
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_EXT_line_rasterization ===
template <>
- struct StructExtends<PipelineCompilerControlCreateInfoAMD, GraphicsPipelineCreateInfo>
+ struct StructExtends<PhysicalDeviceLineRasterizationFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9046,7 +9456,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineCompilerControlCreateInfoAMD, ComputePipelineCreateInfo>
+ struct StructExtends<PhysicalDeviceLineRasterizationFeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -9054,7 +9464,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineCoverageModulationStateCreateInfoNV, PipelineMultisampleStateCreateInfo>
+ struct StructExtends<PhysicalDeviceLineRasterizationPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
@@ -9062,15 +9472,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineCoverageReductionStateCreateInfoNV, PipelineMultisampleStateCreateInfo>
+ struct StructExtends<PipelineRasterizationLineStateCreateInfoEXT, PipelineRasterizationStateCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_shader_atomic_float ===
template <>
- struct StructExtends<PipelineCoverageToColorStateCreateInfoNV, PipelineMultisampleStateCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderAtomicFloatFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9078,15 +9490,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineCreationFeedbackCreateInfoEXT, GraphicsPipelineCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderAtomicFloatFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_index_type_uint8 ===
template <>
- struct StructExtends<PipelineCreationFeedbackCreateInfoEXT, ComputePipelineCreateInfo>
+ struct StructExtends<PhysicalDeviceIndexTypeUint8FeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9094,15 +9508,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineCreationFeedbackCreateInfoEXT, RayTracingPipelineCreateInfoNV>
+ struct StructExtends<PhysicalDeviceIndexTypeUint8FeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_extended_dynamic_state ===
template <>
- struct StructExtends<PipelineCreationFeedbackCreateInfoEXT, RayTracingPipelineCreateInfoKHR>
+ struct StructExtends<PhysicalDeviceExtendedDynamicStateFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9110,15 +9526,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineDiscardRectangleStateCreateInfoEXT, GraphicsPipelineCreateInfo>
+ struct StructExtends<PhysicalDeviceExtendedDynamicStateFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_pipeline_executable_properties ===
template <>
- struct StructExtends<PipelineFragmentShadingRateEnumStateCreateInfoNV, GraphicsPipelineCreateInfo>
+ struct StructExtends<PhysicalDevicePipelineExecutablePropertiesFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
@@ -9126,15 +9544,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineFragmentShadingRateStateCreateInfoKHR, GraphicsPipelineCreateInfo>
+ struct StructExtends<PhysicalDevicePipelineExecutablePropertiesFeaturesKHR, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_shader_atomic_float2 ===
template <>
- struct StructExtends<PipelineRasterizationConservativeStateCreateInfoEXT, PipelineRasterizationStateCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderAtomicFloat2FeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9142,15 +9562,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineRasterizationDepthClipStateCreateInfoEXT, PipelineRasterizationStateCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderAtomicFloat2FeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_shader_demote_to_helper_invocation ===
template <>
- struct StructExtends<PipelineRasterizationLineStateCreateInfoEXT, PipelineRasterizationStateCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9158,15 +9580,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineRasterizationProvokingVertexStateCreateInfoEXT, PipelineRasterizationStateCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_device_generated_commands ===
template <>
- struct StructExtends<PipelineRasterizationStateRasterizationOrderAMD, PipelineRasterizationStateCreateInfo>
+ struct StructExtends<PhysicalDeviceDeviceGeneratedCommandsPropertiesNV, PhysicalDeviceProperties2>
{
enum
{
@@ -9174,7 +9598,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineRasterizationStateStreamCreateInfoEXT, PipelineRasterizationStateCreateInfo>
+ struct StructExtends<PhysicalDeviceDeviceGeneratedCommandsFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -9182,7 +9606,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineRepresentativeFragmentTestStateCreateInfoNV, GraphicsPipelineCreateInfo>
+ struct StructExtends<PhysicalDeviceDeviceGeneratedCommandsFeaturesNV, DeviceCreateInfo>
{
enum
{
@@ -9190,15 +9614,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineSampleLocationsStateCreateInfoEXT, PipelineMultisampleStateCreateInfo>
+ struct StructExtends<GraphicsPipelineShaderGroupsCreateInfoNV, GraphicsPipelineCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_inherited_viewport_scissor ===
template <>
- struct StructExtends<PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT, PipelineShaderStageCreateInfo>
+ struct StructExtends<PhysicalDeviceInheritedViewportScissorFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -9206,7 +9632,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineTessellationDomainOriginStateCreateInfo, PipelineTessellationStateCreateInfo>
+ struct StructExtends<PhysicalDeviceInheritedViewportScissorFeaturesNV, DeviceCreateInfo>
{
enum
{
@@ -9214,15 +9640,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineVertexInputDivisorStateCreateInfoEXT, PipelineVertexInputStateCreateInfo>
+ struct StructExtends<CommandBufferInheritanceViewportScissorInfoNV, CommandBufferInheritanceInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_shader_integer_dot_product ===
template <>
- struct StructExtends<PipelineViewportCoarseSampleOrderStateCreateInfoNV, PipelineViewportStateCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderIntegerDotProductFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
@@ -9230,7 +9658,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineViewportExclusiveScissorStateCreateInfoNV, PipelineViewportStateCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderIntegerDotProductFeaturesKHR, DeviceCreateInfo>
{
enum
{
@@ -9238,15 +9666,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineViewportShadingRateImageStateCreateInfoNV, PipelineViewportStateCreateInfo>
+ struct StructExtends<PhysicalDeviceShaderIntegerDotProductPropertiesKHR, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_texel_buffer_alignment ===
template <>
- struct StructExtends<PipelineViewportSwizzleStateCreateInfoNV, PipelineViewportStateCreateInfo>
+ struct StructExtends<PhysicalDeviceTexelBufferAlignmentFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9254,25 +9684,25 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PipelineViewportWScalingStateCreateInfoNV, PipelineViewportStateCreateInfo>
+ struct StructExtends<PhysicalDeviceTexelBufferAlignmentFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#if defined( VK_USE_PLATFORM_GGP )
template <>
- struct StructExtends<PresentFrameTokenGGP, PresentInfoKHR>
+ struct StructExtends<PhysicalDeviceTexelBufferAlignmentPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_GGP*/
+
+ //=== VK_QCOM_render_pass_transform ===
template <>
- struct StructExtends<PresentRegionsKHR, PresentInfoKHR>
+ struct StructExtends<RenderPassTransformBeginInfoQCOM, RenderPassBeginInfo>
{
enum
{
@@ -9280,15 +9710,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<PresentTimesInfoGOOGLE, PresentInfoKHR>
+ struct StructExtends<CommandBufferInheritanceRenderPassTransformInfoQCOM, CommandBufferInheritanceInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_device_memory_report ===
template <>
- struct StructExtends<ProtectedSubmitInfo, SubmitInfo>
+ struct StructExtends<PhysicalDeviceDeviceMemoryReportFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9296,7 +9728,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<QueryPoolPerformanceCreateInfoKHR, QueryPoolCreateInfo>
+ struct StructExtends<PhysicalDeviceDeviceMemoryReportFeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -9304,15 +9736,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<QueryPoolPerformanceQueryCreateInfoINTEL, QueryPoolCreateInfo>
+ struct StructExtends<DeviceDeviceMemoryReportCreateInfoEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_robustness2 ===
template <>
- struct StructExtends<QueueFamilyCheckpointProperties2NV, QueueFamilyProperties2>
+ struct StructExtends<PhysicalDeviceRobustness2FeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9320,7 +9754,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<QueueFamilyCheckpointPropertiesNV, QueueFamilyProperties2>
+ struct StructExtends<PhysicalDeviceRobustness2FeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -9328,15 +9762,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<QueueFamilyGlobalPriorityPropertiesEXT, QueueFamilyProperties2>
+ struct StructExtends<PhysicalDeviceRobustness2PropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_custom_border_color ===
template <>
- struct StructExtends<RenderPassAttachmentBeginInfo, RenderPassBeginInfo>
+ struct StructExtends<SamplerCustomBorderColorCreateInfoEXT, SamplerCreateInfo>
{
enum
{
@@ -9344,7 +9780,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<RenderPassFragmentDensityMapCreateInfoEXT, RenderPassCreateInfo>
+ struct StructExtends<PhysicalDeviceCustomBorderColorPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
@@ -9352,7 +9788,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<RenderPassFragmentDensityMapCreateInfoEXT, RenderPassCreateInfo2>
+ struct StructExtends<PhysicalDeviceCustomBorderColorFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9360,15 +9796,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<RenderPassInputAttachmentAspectCreateInfo, RenderPassCreateInfo>
+ struct StructExtends<PhysicalDeviceCustomBorderColorFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_present_id ===
template <>
- struct StructExtends<RenderPassMultiviewCreateInfo, RenderPassCreateInfo>
+ struct StructExtends<PresentIdKHR, PresentInfoKHR>
{
enum
{
@@ -9376,7 +9814,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<RenderPassSampleLocationsBeginInfoEXT, RenderPassBeginInfo>
+ struct StructExtends<PhysicalDevicePresentIdFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
@@ -9384,15 +9822,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<RenderPassTransformBeginInfoQCOM, RenderPassBeginInfo>
+ struct StructExtends<PhysicalDevicePresentIdFeaturesKHR, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_private_data ===
template <>
- struct StructExtends<SampleLocationsInfoEXT, ImageMemoryBarrier>
+ struct StructExtends<PhysicalDevicePrivateDataFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9400,7 +9840,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<SampleLocationsInfoEXT, ImageMemoryBarrier2KHR>
+ struct StructExtends<PhysicalDevicePrivateDataFeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -9408,15 +9848,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<SamplerCustomBorderColorCreateInfoEXT, SamplerCreateInfo>
+ struct StructExtends<DevicePrivateDataCreateInfoEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_pipeline_creation_cache_control ===
template <>
- struct StructExtends<SamplerReductionModeCreateInfo, SamplerCreateInfo>
+ struct StructExtends<PhysicalDevicePipelineCreationCacheControlFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9424,23 +9866,29 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<SamplerYcbcrConversionImageFormatProperties, ImageFormatProperties2>
+ struct StructExtends<PhysicalDevicePipelineCreationCacheControlFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_encode_queue ===
template <>
- struct StructExtends<SamplerYcbcrConversionInfo, SamplerCreateInfo>
+ struct StructExtends<VideoEncodeRateControlInfoKHR, VideoCodingControlInfoKHR>
{
enum
{
value = true
};
};
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_NV_device_diagnostics_config ===
template <>
- struct StructExtends<SamplerYcbcrConversionInfo, ImageViewCreateInfo>
+ struct StructExtends<PhysicalDeviceDiagnosticsConfigFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -9448,7 +9896,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<SemaphoreTypeCreateInfo, SemaphoreCreateInfo>
+ struct StructExtends<PhysicalDeviceDiagnosticsConfigFeaturesNV, DeviceCreateInfo>
{
enum
{
@@ -9456,15 +9904,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<SemaphoreTypeCreateInfo, PhysicalDeviceExternalSemaphoreInfo>
+ struct StructExtends<DeviceDiagnosticsConfigCreateInfoNV, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_synchronization2 ===
template <>
- struct StructExtends<ShaderModuleValidationCacheCreateInfoEXT, ShaderModuleCreateInfo>
+ struct StructExtends<MemoryBarrier2KHR, SubpassDependency2>
{
enum
{
@@ -9472,7 +9922,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<SharedPresentSurfaceCapabilitiesKHR, SurfaceCapabilities2KHR>
+ struct StructExtends<PhysicalDeviceSynchronization2FeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
@@ -9480,7 +9930,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<SubpassDescriptionDepthStencilResolve, SubpassDescription2>
+ struct StructExtends<PhysicalDeviceSynchronization2FeaturesKHR, DeviceCreateInfo>
{
enum
{
@@ -9488,61 +9938,61 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<SubpassShadingPipelineCreateInfoHUAWEI, ComputePipelineCreateInfo>
+ struct StructExtends<QueueFamilyCheckpointProperties2NV, QueueFamilyProperties2>
{
enum
{
value = true
};
};
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
+
+ //=== VK_KHR_shader_subgroup_uniform_control_flow ===
template <>
- struct StructExtends<SurfaceCapabilitiesFullScreenExclusiveEXT, SurfaceCapabilities2KHR>
+ struct StructExtends<PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
template <>
- struct StructExtends<SurfaceFullScreenExclusiveInfoEXT, PhysicalDeviceSurfaceInfo2KHR>
+ struct StructExtends<PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_KHR_zero_initialize_workgroup_memory ===
template <>
- struct StructExtends<SurfaceFullScreenExclusiveInfoEXT, SwapchainCreateInfoKHR>
+ struct StructExtends<PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
template <>
- struct StructExtends<SurfaceFullScreenExclusiveWin32InfoEXT, PhysicalDeviceSurfaceInfo2KHR>
+ struct StructExtends<PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_fragment_shading_rate_enums ===
template <>
- struct StructExtends<SurfaceFullScreenExclusiveWin32InfoEXT, SwapchainCreateInfoKHR>
+ struct StructExtends<PhysicalDeviceFragmentShadingRateEnumsFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
template <>
- struct StructExtends<SurfaceProtectedCapabilitiesKHR, SurfaceCapabilities2KHR>
+ struct StructExtends<PhysicalDeviceFragmentShadingRateEnumsFeaturesNV, DeviceCreateInfo>
{
enum
{
@@ -9550,7 +10000,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<SwapchainCounterCreateInfoEXT, SwapchainCreateInfoKHR>
+ struct StructExtends<PhysicalDeviceFragmentShadingRateEnumsPropertiesNV, PhysicalDeviceProperties2>
{
enum
{
@@ -9558,15 +10008,18 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<SwapchainDisplayNativeHdrCreateInfoAMD, SwapchainCreateInfoKHR>
+ struct StructExtends<PipelineFragmentShadingRateEnumStateCreateInfoNV, GraphicsPipelineCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_NV_ray_tracing_motion_blur ===
template <>
- struct StructExtends<TextureLODGatherFormatPropertiesAMD, ImageFormatProperties2>
+ struct StructExtends<AccelerationStructureGeometryMotionTrianglesDataNV,
+ AccelerationStructureGeometryTrianglesDataKHR>
{
enum
{
@@ -9574,7 +10027,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<TimelineSemaphoreSubmitInfo, SubmitInfo>
+ struct StructExtends<AccelerationStructureMotionInfoNV, AccelerationStructureCreateInfoKHR>
{
enum
{
@@ -9582,7 +10035,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<TimelineSemaphoreSubmitInfo, BindSparseInfo>
+ struct StructExtends<PhysicalDeviceRayTracingMotionBlurFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -9590,262 +10043,239 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<ValidationFeaturesEXT, InstanceCreateInfo>
+ struct StructExtends<PhysicalDeviceRayTracingMotionBlurFeaturesNV, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_ycbcr_2plane_444_formats ===
template <>
- struct StructExtends<ValidationFlagsEXT, InstanceCreateInfo>
+ struct StructExtends<PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoDecodeH264CapabilitiesEXT, VideoCapabilitiesKHR>
+ struct StructExtends<PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+
+ //=== VK_EXT_fragment_density_map2 ===
template <>
- struct StructExtends<VideoDecodeH264DpbSlotInfoEXT, VideoReferenceSlotKHR>
+ struct StructExtends<PhysicalDeviceFragmentDensityMap2FeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoDecodeH264MvcEXT, VideoDecodeH264PictureInfoEXT>
+ struct StructExtends<PhysicalDeviceFragmentDensityMap2FeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoDecodeH264PictureInfoEXT, VideoDecodeInfoKHR>
+ struct StructExtends<PhysicalDeviceFragmentDensityMap2PropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+
+ //=== VK_QCOM_rotated_copy_commands ===
template <>
- struct StructExtends<VideoDecodeH264ProfileEXT, VideoProfileKHR>
+ struct StructExtends<CopyCommandTransformInfoQCOM, BufferImageCopy2KHR>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoDecodeH264SessionCreateInfoEXT, VideoSessionCreateInfoKHR>
+ struct StructExtends<CopyCommandTransformInfoQCOM, ImageBlit2KHR>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+
+ //=== VK_EXT_image_robustness ===
template <>
- struct StructExtends<VideoDecodeH264SessionParametersAddInfoEXT, VideoSessionParametersUpdateInfoKHR>
+ struct StructExtends<PhysicalDeviceImageRobustnessFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoDecodeH264SessionParametersCreateInfoEXT, VideoSessionParametersCreateInfoKHR>
+ struct StructExtends<PhysicalDeviceImageRobustnessFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+
+ //=== VK_KHR_workgroup_memory_explicit_layout ===
template <>
- struct StructExtends<VideoDecodeH265CapabilitiesEXT, VideoCapabilitiesKHR>
+ struct StructExtends<PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoDecodeH265DpbSlotInfoEXT, VideoReferenceSlotKHR>
+ struct StructExtends<PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+
+ //=== VK_EXT_4444_formats ===
template <>
- struct StructExtends<VideoDecodeH265PictureInfoEXT, VideoDecodeInfoKHR>
+ struct StructExtends<PhysicalDevice4444FormatsFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoDecodeH265ProfileEXT, VideoProfileKHR>
+ struct StructExtends<PhysicalDevice4444FormatsFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+
+ //=== VK_KHR_ray_tracing_pipeline ===
template <>
- struct StructExtends<VideoDecodeH265SessionCreateInfoEXT, VideoSessionCreateInfoKHR>
+ struct StructExtends<PhysicalDeviceRayTracingPipelineFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoDecodeH265SessionParametersAddInfoEXT, VideoSessionParametersUpdateInfoKHR>
+ struct StructExtends<PhysicalDeviceRayTracingPipelineFeaturesKHR, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoDecodeH265SessionParametersCreateInfoEXT, VideoSessionParametersCreateInfoKHR>
+ struct StructExtends<PhysicalDeviceRayTracingPipelinePropertiesKHR, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+
+ //=== VK_KHR_ray_query ===
template <>
- struct StructExtends<VideoEncodeH264CapabilitiesEXT, VideoCapabilitiesKHR>
+ struct StructExtends<PhysicalDeviceRayQueryFeaturesKHR, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoEncodeH264EmitPictureParametersEXT, VideoEncodeInfoKHR>
+ struct StructExtends<PhysicalDeviceRayQueryFeaturesKHR, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+
+ //=== VK_VALVE_mutable_descriptor_type ===
template <>
- struct StructExtends<VideoEncodeH264ProfileEXT, VideoProfileKHR>
+ struct StructExtends<PhysicalDeviceMutableDescriptorTypeFeaturesVALVE, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoEncodeH264SessionCreateInfoEXT, VideoSessionCreateInfoKHR>
+ struct StructExtends<PhysicalDeviceMutableDescriptorTypeFeaturesVALVE, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoEncodeH264SessionParametersAddInfoEXT, VideoSessionParametersUpdateInfoKHR>
+ struct StructExtends<MutableDescriptorTypeCreateInfoVALVE, DescriptorSetLayoutCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoEncodeH264SessionParametersCreateInfoEXT, VideoSessionParametersCreateInfoKHR>
+ struct StructExtends<MutableDescriptorTypeCreateInfoVALVE, DescriptorPoolCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+
+ //=== VK_EXT_vertex_input_dynamic_state ===
template <>
- struct StructExtends<VideoEncodeH264VclFrameInfoEXT, VideoEncodeInfoKHR>
+ struct StructExtends<PhysicalDeviceVertexInputDynamicStateFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoEncodeRateControlInfoKHR, VideoCodingControlInfoKHR>
+ struct StructExtends<PhysicalDeviceVertexInputDynamicStateFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+
+ //=== VK_EXT_physical_device_drm ===
template <>
- struct StructExtends<VideoProfileKHR, QueryPoolCreateInfo>
+ struct StructExtends<PhysicalDeviceDrmPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_EXT_primitive_topology_list_restart ===
template <>
- struct StructExtends<VideoProfileKHR, FormatProperties2>
+ struct StructExtends<PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9853,33 +10283,37 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<VideoProfileKHR, ImageCreateInfo>
+ struct StructExtends<PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
+
+#if defined( VK_USE_PLATFORM_FUCHSIA )
+ //=== VK_FUCHSIA_external_memory ===
template <>
- struct StructExtends<VideoProfileKHR, ImageViewCreateInfo>
+ struct StructExtends<ImportMemoryZirconHandleInfoFUCHSIA, MemoryAllocateInfo>
{
enum
{
value = true
};
};
+#endif /*VK_USE_PLATFORM_FUCHSIA*/
+
+ //=== VK_HUAWEI_subpass_shading ===
template <>
- struct StructExtends<VideoProfileKHR, BufferCreateInfo>
+ struct StructExtends<SubpassShadingPipelineCreateInfoHUAWEI, ComputePipelineCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoProfilesKHR, FormatProperties2>
+ struct StructExtends<PhysicalDeviceSubpassShadingFeaturesHUAWEI, PhysicalDeviceFeatures2>
{
enum
{
@@ -9887,7 +10321,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<VideoProfilesKHR, ImageCreateInfo>
+ struct StructExtends<PhysicalDeviceSubpassShadingFeaturesHUAWEI, DeviceCreateInfo>
{
enum
{
@@ -9895,35 +10329,35 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<VideoProfilesKHR, ImageViewCreateInfo>
+ struct StructExtends<PhysicalDeviceSubpassShadingPropertiesHUAWEI, PhysicalDeviceProperties2>
{
enum
{
value = true
};
};
+
+ //=== VK_HUAWEI_invocation_mask ===
template <>
- struct StructExtends<VideoProfilesKHR, BufferCreateInfo>
+ struct StructExtends<PhysicalDeviceInvocationMaskFeaturesHUAWEI, PhysicalDeviceFeatures2>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
template <>
- struct StructExtends<VideoQueueFamilyProperties2KHR, QueueFamilyProperties2>
+ struct StructExtends<PhysicalDeviceInvocationMaskFeaturesHUAWEI, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
+
+ //=== VK_NV_external_memory_rdma ===
template <>
- struct StructExtends<Win32KeyedMutexAcquireReleaseInfoKHR, SubmitInfo>
+ struct StructExtends<PhysicalDeviceExternalMemoryRDMAFeaturesNV, PhysicalDeviceFeatures2>
{
enum
{
@@ -9931,17 +10365,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<Win32KeyedMutexAcquireReleaseInfoKHR, SubmitInfo2KHR>
+ struct StructExtends<PhysicalDeviceExternalMemoryRDMAFeaturesNV, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
+
+ //=== VK_EXT_extended_dynamic_state2 ===
template <>
- struct StructExtends<Win32KeyedMutexAcquireReleaseInfoNV, SubmitInfo>
+ struct StructExtends<PhysicalDeviceExtendedDynamicState2FeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9949,16 +10383,17 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<Win32KeyedMutexAcquireReleaseInfoNV, SubmitInfo2KHR>
+ struct StructExtends<PhysicalDeviceExtendedDynamicState2FeaturesEXT, DeviceCreateInfo>
{
enum
{
value = true
};
};
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_EXT_color_write_enable ===
template <>
- struct StructExtends<WriteDescriptorSetAccelerationStructureKHR, WriteDescriptorSet>
+ struct StructExtends<PhysicalDeviceColorWriteEnableFeaturesEXT, PhysicalDeviceFeatures2>
{
enum
{
@@ -9966,7 +10401,7 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<WriteDescriptorSetAccelerationStructureNV, WriteDescriptorSet>
+ struct StructExtends<PhysicalDeviceColorWriteEnableFeaturesEXT, DeviceCreateInfo>
{
enum
{
@@ -9974,7 +10409,59 @@ namespace VULKAN_HPP_NAMESPACE
};
};
template <>
- struct StructExtends<WriteDescriptorSetInlineUniformBlockEXT, WriteDescriptorSet>
+ struct StructExtends<PipelineColorWriteCreateInfoEXT, PipelineColorBlendStateCreateInfo>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+
+ //=== VK_EXT_global_priority_query ===
+ template <>
+ struct StructExtends<PhysicalDeviceGlobalPriorityQueryFeaturesEXT, PhysicalDeviceFeatures2>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+ template <>
+ struct StructExtends<PhysicalDeviceGlobalPriorityQueryFeaturesEXT, DeviceCreateInfo>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+ template <>
+ struct StructExtends<QueueFamilyGlobalPriorityPropertiesEXT, QueueFamilyProperties2>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+
+ //=== VK_EXT_multi_draw ===
+ template <>
+ struct StructExtends<PhysicalDeviceMultiDrawFeaturesEXT, PhysicalDeviceFeatures2>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+ template <>
+ struct StructExtends<PhysicalDeviceMultiDrawFeaturesEXT, DeviceCreateInfo>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+ template <>
+ struct StructExtends<PhysicalDeviceMultiDrawPropertiesEXT, PhysicalDeviceProperties2>
{
enum
{
@@ -10086,722 +10573,868 @@ namespace VULKAN_HPP_NAMESPACE
};
#endif
- class DispatchLoaderDynamic
+ using PFN_dummy = void ( * )();
+
+ class DispatchLoaderDynamic : public DispatchLoaderBase
{
public:
- using PFN_dummy = void ( * )();
+ //=== VK_VERSION_1_0 ===
+ PFN_vkCreateInstance vkCreateInstance = 0;
+ PFN_vkDestroyInstance vkDestroyInstance = 0;
+ PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices = 0;
+ PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures = 0;
+ PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties = 0;
+ PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties = 0;
+ PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties = 0;
+ PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties = 0;
+ PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties = 0;
+ PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0;
+ PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0;
+ PFN_vkCreateDevice vkCreateDevice = 0;
+ PFN_vkDestroyDevice vkDestroyDevice = 0;
+ PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties = 0;
+ PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties = 0;
+ PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties = 0;
+ PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties = 0;
+ PFN_vkGetDeviceQueue vkGetDeviceQueue = 0;
+ PFN_vkQueueSubmit vkQueueSubmit = 0;
+ PFN_vkQueueWaitIdle vkQueueWaitIdle = 0;
+ PFN_vkDeviceWaitIdle vkDeviceWaitIdle = 0;
+ PFN_vkAllocateMemory vkAllocateMemory = 0;
+ PFN_vkFreeMemory vkFreeMemory = 0;
+ PFN_vkMapMemory vkMapMemory = 0;
+ PFN_vkUnmapMemory vkUnmapMemory = 0;
+ PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges = 0;
+ PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges = 0;
+ PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment = 0;
+ PFN_vkBindBufferMemory vkBindBufferMemory = 0;
+ PFN_vkBindImageMemory vkBindImageMemory = 0;
+ PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements = 0;
+ PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements = 0;
+ PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements = 0;
+ PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties = 0;
+ PFN_vkQueueBindSparse vkQueueBindSparse = 0;
+ PFN_vkCreateFence vkCreateFence = 0;
+ PFN_vkDestroyFence vkDestroyFence = 0;
+ PFN_vkResetFences vkResetFences = 0;
+ PFN_vkGetFenceStatus vkGetFenceStatus = 0;
+ PFN_vkWaitForFences vkWaitForFences = 0;
+ PFN_vkCreateSemaphore vkCreateSemaphore = 0;
+ PFN_vkDestroySemaphore vkDestroySemaphore = 0;
+ PFN_vkCreateEvent vkCreateEvent = 0;
+ PFN_vkDestroyEvent vkDestroyEvent = 0;
+ PFN_vkGetEventStatus vkGetEventStatus = 0;
+ PFN_vkSetEvent vkSetEvent = 0;
+ PFN_vkResetEvent vkResetEvent = 0;
+ PFN_vkCreateQueryPool vkCreateQueryPool = 0;
+ PFN_vkDestroyQueryPool vkDestroyQueryPool = 0;
+ PFN_vkGetQueryPoolResults vkGetQueryPoolResults = 0;
+ PFN_vkCreateBuffer vkCreateBuffer = 0;
+ PFN_vkDestroyBuffer vkDestroyBuffer = 0;
+ PFN_vkCreateBufferView vkCreateBufferView = 0;
+ PFN_vkDestroyBufferView vkDestroyBufferView = 0;
+ PFN_vkCreateImage vkCreateImage = 0;
+ PFN_vkDestroyImage vkDestroyImage = 0;
+ PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout = 0;
+ PFN_vkCreateImageView vkCreateImageView = 0;
+ PFN_vkDestroyImageView vkDestroyImageView = 0;
+ PFN_vkCreateShaderModule vkCreateShaderModule = 0;
+ PFN_vkDestroyShaderModule vkDestroyShaderModule = 0;
+ PFN_vkCreatePipelineCache vkCreatePipelineCache = 0;
+ PFN_vkDestroyPipelineCache vkDestroyPipelineCache = 0;
+ PFN_vkGetPipelineCacheData vkGetPipelineCacheData = 0;
+ PFN_vkMergePipelineCaches vkMergePipelineCaches = 0;
+ PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines = 0;
+ PFN_vkCreateComputePipelines vkCreateComputePipelines = 0;
+ PFN_vkDestroyPipeline vkDestroyPipeline = 0;
+ PFN_vkCreatePipelineLayout vkCreatePipelineLayout = 0;
+ PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout = 0;
+ PFN_vkCreateSampler vkCreateSampler = 0;
+ PFN_vkDestroySampler vkDestroySampler = 0;
+ PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout = 0;
+ PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout = 0;
+ PFN_vkCreateDescriptorPool vkCreateDescriptorPool = 0;
+ PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool = 0;
+ PFN_vkResetDescriptorPool vkResetDescriptorPool = 0;
+ PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets = 0;
+ PFN_vkFreeDescriptorSets vkFreeDescriptorSets = 0;
+ PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets = 0;
+ PFN_vkCreateFramebuffer vkCreateFramebuffer = 0;
+ PFN_vkDestroyFramebuffer vkDestroyFramebuffer = 0;
+ PFN_vkCreateRenderPass vkCreateRenderPass = 0;
+ PFN_vkDestroyRenderPass vkDestroyRenderPass = 0;
+ PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity = 0;
+ PFN_vkCreateCommandPool vkCreateCommandPool = 0;
+ PFN_vkDestroyCommandPool vkDestroyCommandPool = 0;
+ PFN_vkResetCommandPool vkResetCommandPool = 0;
+ PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers = 0;
+ PFN_vkFreeCommandBuffers vkFreeCommandBuffers = 0;
+ PFN_vkBeginCommandBuffer vkBeginCommandBuffer = 0;
+ PFN_vkEndCommandBuffer vkEndCommandBuffer = 0;
+ PFN_vkResetCommandBuffer vkResetCommandBuffer = 0;
+ PFN_vkCmdBindPipeline vkCmdBindPipeline = 0;
+ PFN_vkCmdSetViewport vkCmdSetViewport = 0;
+ PFN_vkCmdSetScissor vkCmdSetScissor = 0;
+ PFN_vkCmdSetLineWidth vkCmdSetLineWidth = 0;
+ PFN_vkCmdSetDepthBias vkCmdSetDepthBias = 0;
+ PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants = 0;
+ PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds = 0;
+ PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask = 0;
+ PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask = 0;
+ PFN_vkCmdSetStencilReference vkCmdSetStencilReference = 0;
+ PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets = 0;
+ PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer = 0;
+ PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers = 0;
+ PFN_vkCmdDraw vkCmdDraw = 0;
+ PFN_vkCmdDrawIndexed vkCmdDrawIndexed = 0;
+ PFN_vkCmdDrawIndirect vkCmdDrawIndirect = 0;
+ PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect = 0;
+ PFN_vkCmdDispatch vkCmdDispatch = 0;
+ PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect = 0;
+ PFN_vkCmdCopyBuffer vkCmdCopyBuffer = 0;
+ PFN_vkCmdCopyImage vkCmdCopyImage = 0;
+ PFN_vkCmdBlitImage vkCmdBlitImage = 0;
+ PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage = 0;
+ PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer = 0;
+ PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer = 0;
+ PFN_vkCmdFillBuffer vkCmdFillBuffer = 0;
+ PFN_vkCmdClearColorImage vkCmdClearColorImage = 0;
+ PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage = 0;
+ PFN_vkCmdClearAttachments vkCmdClearAttachments = 0;
+ PFN_vkCmdResolveImage vkCmdResolveImage = 0;
+ PFN_vkCmdSetEvent vkCmdSetEvent = 0;
+ PFN_vkCmdResetEvent vkCmdResetEvent = 0;
+ PFN_vkCmdWaitEvents vkCmdWaitEvents = 0;
+ PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier = 0;
+ PFN_vkCmdBeginQuery vkCmdBeginQuery = 0;
+ PFN_vkCmdEndQuery vkCmdEndQuery = 0;
+ PFN_vkCmdResetQueryPool vkCmdResetQueryPool = 0;
+ PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp = 0;
+ PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults = 0;
+ PFN_vkCmdPushConstants vkCmdPushConstants = 0;
+ PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass = 0;
+ PFN_vkCmdNextSubpass vkCmdNextSubpass = 0;
+ PFN_vkCmdEndRenderPass vkCmdEndRenderPass = 0;
+ PFN_vkCmdExecuteCommands vkCmdExecuteCommands = 0;
- PFN_vkAcquireDrmDisplayEXT vkAcquireDrmDisplayEXT = 0;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT = 0;
+ //=== VK_VERSION_1_1 ===
+ PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion = 0;
+ PFN_vkBindBufferMemory2 vkBindBufferMemory2 = 0;
+ PFN_vkBindImageMemory2 vkBindImageMemory2 = 0;
+ PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures = 0;
+ PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask = 0;
+ PFN_vkCmdDispatchBase vkCmdDispatchBase = 0;
+ PFN_vkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups = 0;
+ PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2 = 0;
+ PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2 = 0;
+ PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2 = 0;
+ PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2 = 0;
+ PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2 = 0;
+ PFN_vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2 = 0;
+ PFN_vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2 = 0;
+ PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2 = 0;
+ PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2 = 0;
+ PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2 = 0;
+ PFN_vkTrimCommandPool vkTrimCommandPool = 0;
+ PFN_vkGetDeviceQueue2 vkGetDeviceQueue2 = 0;
+ PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion = 0;
+ PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion = 0;
+ PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate = 0;
+ PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate = 0;
+ PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate = 0;
+ PFN_vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties = 0;
+ PFN_vkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties = 0;
+ PFN_vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties = 0;
+ PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport = 0;
+
+ //=== VK_VERSION_1_2 ===
+ PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount = 0;
+ PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount = 0;
+ PFN_vkCreateRenderPass2 vkCreateRenderPass2 = 0;
+ PFN_vkCmdBeginRenderPass2 vkCmdBeginRenderPass2 = 0;
+ PFN_vkCmdNextSubpass2 vkCmdNextSubpass2 = 0;
+ PFN_vkCmdEndRenderPass2 vkCmdEndRenderPass2 = 0;
+ PFN_vkResetQueryPool vkResetQueryPool = 0;
+ PFN_vkGetSemaphoreCounterValue vkGetSemaphoreCounterValue = 0;
+ PFN_vkWaitSemaphores vkWaitSemaphores = 0;
+ PFN_vkSignalSemaphore vkSignalSemaphore = 0;
+ PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress = 0;
+ PFN_vkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress = 0;
+ PFN_vkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress = 0;
+
+ //=== VK_KHR_surface ===
+ PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR = 0;
+ PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR = 0;
+ PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 0;
+ PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR = 0;
+ PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR = 0;
+
+ //=== VK_KHR_swapchain ===
+ PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR = 0;
+ PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR = 0;
+ PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR = 0;
+ PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR = 0;
+ PFN_vkQueuePresentKHR vkQueuePresentKHR = 0;
+ PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR = 0;
+ PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR = 0;
+ PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR = 0;
+ PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR = 0;
+
+ //=== VK_KHR_display ===
+ PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR = 0;
+ PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR = 0;
+ PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR = 0;
+ PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR = 0;
+ PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR = 0;
+ PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR = 0;
+ PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR = 0;
+
+ //=== VK_KHR_display_swapchain ===
+ PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR = 0;
+
+#if defined( VK_USE_PLATFORM_XLIB_KHR )
+ //=== VK_KHR_xlib_surface ===
+ PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR = 0;
+ PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR = 0;
#else
- PFN_dummy placeholder_dont_call_vkAcquireFullScreenExclusiveModeEXT = 0;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR = 0;
- PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR = 0;
- PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL = 0;
- PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR = 0;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV = 0;
+ PFN_dummy vkCreateXlibSurfaceKHR_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceXlibPresentationSupportKHR_placeholder = 0;
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+
+#if defined( VK_USE_PLATFORM_XCB_KHR )
+ //=== VK_KHR_xcb_surface ===
+ PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR = 0;
+ PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR = 0;
#else
- PFN_dummy placeholder_dont_call_vkAcquireWinrtDisplayNV = 0;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT )
- PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT = 0;
+ PFN_dummy vkCreateXcbSurfaceKHR_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceXcbPresentationSupportKHR_placeholder = 0;
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+
+#if defined( VK_USE_PLATFORM_WAYLAND_KHR )
+ //=== VK_KHR_wayland_surface ===
+ PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR = 0;
+ PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR = 0;
#else
- PFN_dummy placeholder_dont_call_vkAcquireXlibDisplayEXT = 0;
-#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/
- PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers = 0;
- PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets = 0;
- PFN_vkAllocateMemory vkAllocateMemory = 0;
- PFN_vkBeginCommandBuffer vkBeginCommandBuffer = 0;
- PFN_vkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV = 0;
- PFN_vkBindBufferMemory vkBindBufferMemory = 0;
- PFN_vkBindBufferMemory2 vkBindBufferMemory2 = 0;
- PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR = 0;
- PFN_vkBindImageMemory vkBindImageMemory = 0;
- PFN_vkBindImageMemory2 vkBindImageMemory2 = 0;
- PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR = 0;
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkBindVideoSessionMemoryKHR vkBindVideoSessionMemoryKHR = 0;
+ PFN_dummy vkCreateWaylandSurfaceKHR_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceWaylandPresentationSupportKHR_placeholder = 0;
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+#if defined( VK_USE_PLATFORM_ANDROID_KHR )
+ //=== VK_KHR_android_surface ===
+ PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR = 0;
#else
- PFN_dummy placeholder_dont_call_vkBindVideoSessionMemoryKHR = 0;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkBuildAccelerationStructuresKHR vkBuildAccelerationStructuresKHR = 0;
- PFN_vkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT = 0;
- PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT = 0;
- PFN_vkCmdBeginQuery vkCmdBeginQuery = 0;
- PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT = 0;
- PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass = 0;
- PFN_vkCmdBeginRenderPass2 vkCmdBeginRenderPass2 = 0;
- PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR = 0;
- PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT = 0;
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkCmdBeginVideoCodingKHR vkCmdBeginVideoCodingKHR = 0;
+ PFN_dummy vkCreateAndroidSurfaceKHR_placeholder = 0;
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_win32_surface ===
+ PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR = 0;
+ PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR = 0;
#else
- PFN_dummy placeholder_dont_call_vkCmdBeginVideoCodingKHR = 0;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets = 0;
- PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer = 0;
- PFN_vkCmdBindPipeline vkCmdBindPipeline = 0;
- PFN_vkCmdBindPipelineShaderGroupNV vkCmdBindPipelineShaderGroupNV = 0;
- PFN_vkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV = 0;
- PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT = 0;
- PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers = 0;
- PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT = 0;
- PFN_vkCmdBlitImage vkCmdBlitImage = 0;
- PFN_vkCmdBlitImage2KHR vkCmdBlitImage2KHR = 0;
- PFN_vkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV = 0;
- PFN_vkCmdBuildAccelerationStructuresIndirectKHR vkCmdBuildAccelerationStructuresIndirectKHR = 0;
- PFN_vkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR = 0;
- PFN_vkCmdClearAttachments vkCmdClearAttachments = 0;
- PFN_vkCmdClearColorImage vkCmdClearColorImage = 0;
- PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage = 0;
+ PFN_dummy vkCreateWin32SurfaceKHR_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceWin32PresentationSupportKHR_placeholder = 0;
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_EXT_debug_report ===
+ PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = 0;
+ PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT = 0;
+ PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT = 0;
+
+ //=== VK_EXT_debug_marker ===
+ PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT = 0;
+ PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT = 0;
+ PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT = 0;
+ PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT = 0;
+ PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT = 0;
+
#if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkCmdControlVideoCodingKHR vkCmdControlVideoCodingKHR = 0;
+ //=== VK_KHR_video_queue ===
+ PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR vkGetPhysicalDeviceVideoCapabilitiesKHR = 0;
+ PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR vkGetPhysicalDeviceVideoFormatPropertiesKHR = 0;
+ PFN_vkCreateVideoSessionKHR vkCreateVideoSessionKHR = 0;
+ PFN_vkDestroyVideoSessionKHR vkDestroyVideoSessionKHR = 0;
+ PFN_vkGetVideoSessionMemoryRequirementsKHR vkGetVideoSessionMemoryRequirementsKHR = 0;
+ PFN_vkBindVideoSessionMemoryKHR vkBindVideoSessionMemoryKHR = 0;
+ PFN_vkCreateVideoSessionParametersKHR vkCreateVideoSessionParametersKHR = 0;
+ PFN_vkUpdateVideoSessionParametersKHR vkUpdateVideoSessionParametersKHR = 0;
+ PFN_vkDestroyVideoSessionParametersKHR vkDestroyVideoSessionParametersKHR = 0;
+ PFN_vkCmdBeginVideoCodingKHR vkCmdBeginVideoCodingKHR = 0;
+ PFN_vkCmdEndVideoCodingKHR vkCmdEndVideoCodingKHR = 0;
+ PFN_vkCmdControlVideoCodingKHR vkCmdControlVideoCodingKHR = 0;
#else
- PFN_dummy placeholder_dont_call_vkCmdControlVideoCodingKHR = 0;
+ PFN_dummy vkGetPhysicalDeviceVideoCapabilitiesKHR_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceVideoFormatPropertiesKHR_placeholder = 0;
+ PFN_dummy vkCreateVideoSessionKHR_placeholder = 0;
+ PFN_dummy vkDestroyVideoSessionKHR_placeholder = 0;
+ PFN_dummy vkGetVideoSessionMemoryRequirementsKHR_placeholder = 0;
+ PFN_dummy vkBindVideoSessionMemoryKHR_placeholder = 0;
+ PFN_dummy vkCreateVideoSessionParametersKHR_placeholder = 0;
+ PFN_dummy vkUpdateVideoSessionParametersKHR_placeholder = 0;
+ PFN_dummy vkDestroyVideoSessionParametersKHR_placeholder = 0;
+ PFN_dummy vkCmdBeginVideoCodingKHR_placeholder = 0;
+ PFN_dummy vkCmdEndVideoCodingKHR_placeholder = 0;
+ PFN_dummy vkCmdControlVideoCodingKHR_placeholder = 0;
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR = 0;
- PFN_vkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV = 0;
- PFN_vkCmdCopyAccelerationStructureToMemoryKHR vkCmdCopyAccelerationStructureToMemoryKHR = 0;
- PFN_vkCmdCopyBuffer vkCmdCopyBuffer = 0;
- PFN_vkCmdCopyBuffer2KHR vkCmdCopyBuffer2KHR = 0;
- PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage = 0;
- PFN_vkCmdCopyBufferToImage2KHR vkCmdCopyBufferToImage2KHR = 0;
- PFN_vkCmdCopyImage vkCmdCopyImage = 0;
- PFN_vkCmdCopyImage2KHR vkCmdCopyImage2KHR = 0;
- PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer = 0;
- PFN_vkCmdCopyImageToBuffer2KHR vkCmdCopyImageToBuffer2KHR = 0;
- PFN_vkCmdCopyMemoryToAccelerationStructureKHR vkCmdCopyMemoryToAccelerationStructureKHR = 0;
- PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults = 0;
- PFN_vkCmdCuLaunchKernelNVX vkCmdCuLaunchKernelNVX = 0;
- PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT = 0;
- PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT = 0;
- PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT = 0;
+
#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_decode_queue ===
PFN_vkCmdDecodeVideoKHR vkCmdDecodeVideoKHR = 0;
#else
- PFN_dummy placeholder_dont_call_vkCmdDecodeVideoKHR = 0;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkCmdDispatch vkCmdDispatch = 0;
- PFN_vkCmdDispatchBase vkCmdDispatchBase = 0;
- PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR = 0;
- PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect = 0;
- PFN_vkCmdDraw vkCmdDraw = 0;
- PFN_vkCmdDrawIndexed vkCmdDrawIndexed = 0;
- PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect = 0;
- PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount = 0;
- PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD = 0;
- PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR = 0;
- PFN_vkCmdDrawIndirect vkCmdDrawIndirect = 0;
- PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT = 0;
- PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount = 0;
- PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD = 0;
- PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR = 0;
- PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV = 0;
- PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV = 0;
- PFN_vkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV = 0;
- PFN_vkCmdDrawMultiEXT vkCmdDrawMultiEXT = 0;
- PFN_vkCmdDrawMultiIndexedEXT vkCmdDrawMultiIndexedEXT = 0;
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkCmdEncodeVideoKHR = 0;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT = 0;
- PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT = 0;
- PFN_vkCmdEndQuery vkCmdEndQuery = 0;
- PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT = 0;
- PFN_vkCmdEndRenderPass vkCmdEndRenderPass = 0;
- PFN_vkCmdEndRenderPass2 vkCmdEndRenderPass2 = 0;
- PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR = 0;
- PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT = 0;
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkCmdEndVideoCodingKHR vkCmdEndVideoCodingKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkCmdEndVideoCodingKHR = 0;
+ PFN_dummy vkCmdDecodeVideoKHR_placeholder = 0;
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkCmdExecuteCommands vkCmdExecuteCommands = 0;
- PFN_vkCmdExecuteGeneratedCommandsNV vkCmdExecuteGeneratedCommandsNV = 0;
- PFN_vkCmdFillBuffer vkCmdFillBuffer = 0;
- PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT = 0;
- PFN_vkCmdNextSubpass vkCmdNextSubpass = 0;
- PFN_vkCmdNextSubpass2 vkCmdNextSubpass2 = 0;
- PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR = 0;
- PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier = 0;
- PFN_vkCmdPipelineBarrier2KHR vkCmdPipelineBarrier2KHR = 0;
- PFN_vkCmdPreprocessGeneratedCommandsNV vkCmdPreprocessGeneratedCommandsNV = 0;
- PFN_vkCmdPushConstants vkCmdPushConstants = 0;
- PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR = 0;
- PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR = 0;
- PFN_vkCmdResetEvent vkCmdResetEvent = 0;
- PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR = 0;
- PFN_vkCmdResetQueryPool vkCmdResetQueryPool = 0;
- PFN_vkCmdResolveImage vkCmdResolveImage = 0;
- PFN_vkCmdResolveImage2KHR vkCmdResolveImage2KHR = 0;
- PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants = 0;
- PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV = 0;
- PFN_vkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV = 0;
- PFN_vkCmdSetColorWriteEnableEXT vkCmdSetColorWriteEnableEXT = 0;
- PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT = 0;
- PFN_vkCmdSetDepthBias vkCmdSetDepthBias = 0;
- PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT = 0;
- PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds = 0;
- PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT = 0;
- PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT = 0;
- PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT = 0;
- PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT = 0;
- PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask = 0;
- PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR = 0;
- PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT = 0;
- PFN_vkCmdSetEvent vkCmdSetEvent = 0;
- PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR = 0;
- PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV = 0;
- PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV = 0;
- PFN_vkCmdSetFragmentShadingRateKHR vkCmdSetFragmentShadingRateKHR = 0;
- PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT = 0;
- PFN_vkCmdSetLineStippleEXT vkCmdSetLineStippleEXT = 0;
- PFN_vkCmdSetLineWidth vkCmdSetLineWidth = 0;
- PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT = 0;
- PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT = 0;
- PFN_vkCmdSetPerformanceMarkerINTEL vkCmdSetPerformanceMarkerINTEL = 0;
- PFN_vkCmdSetPerformanceOverrideINTEL vkCmdSetPerformanceOverrideINTEL = 0;
- PFN_vkCmdSetPerformanceStreamMarkerINTEL vkCmdSetPerformanceStreamMarkerINTEL = 0;
- PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT = 0;
- PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT = 0;
- PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT = 0;
- PFN_vkCmdSetRayTracingPipelineStackSizeKHR vkCmdSetRayTracingPipelineStackSizeKHR = 0;
- PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT = 0;
- PFN_vkCmdSetScissor vkCmdSetScissor = 0;
- PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT = 0;
- PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask = 0;
- PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT = 0;
- PFN_vkCmdSetStencilReference vkCmdSetStencilReference = 0;
- PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT = 0;
- PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask = 0;
- PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT = 0;
- PFN_vkCmdSetViewport vkCmdSetViewport = 0;
- PFN_vkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV = 0;
- PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV = 0;
- PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT = 0;
- PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI = 0;
- PFN_vkCmdTraceRaysIndirectKHR vkCmdTraceRaysIndirectKHR = 0;
- PFN_vkCmdTraceRaysKHR vkCmdTraceRaysKHR = 0;
- PFN_vkCmdTraceRaysNV vkCmdTraceRaysNV = 0;
- PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer = 0;
- PFN_vkCmdWaitEvents vkCmdWaitEvents = 0;
- PFN_vkCmdWaitEvents2KHR vkCmdWaitEvents2KHR = 0;
- PFN_vkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR = 0;
- PFN_vkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV = 0;
- PFN_vkCmdWriteBufferMarker2AMD vkCmdWriteBufferMarker2AMD = 0;
- PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD = 0;
- PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp = 0;
- PFN_vkCmdWriteTimestamp2KHR vkCmdWriteTimestamp2KHR = 0;
- PFN_vkCompileDeferredNV vkCompileDeferredNV = 0;
- PFN_vkCopyAccelerationStructureKHR vkCopyAccelerationStructureKHR = 0;
- PFN_vkCopyAccelerationStructureToMemoryKHR vkCopyAccelerationStructureToMemoryKHR = 0;
- PFN_vkCopyMemoryToAccelerationStructureKHR vkCopyMemoryToAccelerationStructureKHR = 0;
- PFN_vkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR = 0;
- PFN_vkCreateAccelerationStructureNV vkCreateAccelerationStructureNV = 0;
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkCreateAndroidSurfaceKHR = 0;
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- PFN_vkCreateBuffer vkCreateBuffer = 0;
- PFN_vkCreateBufferView vkCreateBufferView = 0;
- PFN_vkCreateCommandPool vkCreateCommandPool = 0;
- PFN_vkCreateComputePipelines vkCreateComputePipelines = 0;
- PFN_vkCreateCuFunctionNVX vkCreateCuFunctionNVX = 0;
- PFN_vkCreateCuModuleNVX vkCreateCuModuleNVX = 0;
- PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = 0;
- PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT = 0;
- PFN_vkCreateDeferredOperationKHR vkCreateDeferredOperationKHR = 0;
- PFN_vkCreateDescriptorPool vkCreateDescriptorPool = 0;
- PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout = 0;
- PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate = 0;
- PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR = 0;
- PFN_vkCreateDevice vkCreateDevice = 0;
-#if defined( VK_USE_PLATFORM_DIRECTFB_EXT )
- PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT = 0;
-#else
- PFN_dummy placeholder_dont_call_vkCreateDirectFBSurfaceEXT = 0;
-#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/
- PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR = 0;
- PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR = 0;
- PFN_vkCreateEvent vkCreateEvent = 0;
- PFN_vkCreateFence vkCreateFence = 0;
- PFN_vkCreateFramebuffer vkCreateFramebuffer = 0;
- PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines = 0;
- PFN_vkCreateHeadlessSurfaceEXT vkCreateHeadlessSurfaceEXT = 0;
-#if defined( VK_USE_PLATFORM_IOS_MVK )
- PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK = 0;
-#else
- PFN_dummy placeholder_dont_call_vkCreateIOSSurfaceMVK = 0;
-#endif /*VK_USE_PLATFORM_IOS_MVK*/
- PFN_vkCreateImage vkCreateImage = 0;
-#if defined( VK_USE_PLATFORM_FUCHSIA )
- PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA = 0;
-#else
- PFN_dummy placeholder_dont_call_vkCreateImagePipeSurfaceFUCHSIA = 0;
-#endif /*VK_USE_PLATFORM_FUCHSIA*/
- PFN_vkCreateImageView vkCreateImageView = 0;
- PFN_vkCreateIndirectCommandsLayoutNV vkCreateIndirectCommandsLayoutNV = 0;
- PFN_vkCreateInstance vkCreateInstance = 0;
-#if defined( VK_USE_PLATFORM_MACOS_MVK )
- PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK = 0;
-#else
- PFN_dummy placeholder_dont_call_vkCreateMacOSSurfaceMVK = 0;
-#endif /*VK_USE_PLATFORM_MACOS_MVK*/
-#if defined( VK_USE_PLATFORM_METAL_EXT )
- PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT = 0;
-#else
- PFN_dummy placeholder_dont_call_vkCreateMetalSurfaceEXT = 0;
-#endif /*VK_USE_PLATFORM_METAL_EXT*/
- PFN_vkCreatePipelineCache vkCreatePipelineCache = 0;
- PFN_vkCreatePipelineLayout vkCreatePipelineLayout = 0;
- PFN_vkCreatePrivateDataSlotEXT vkCreatePrivateDataSlotEXT = 0;
- PFN_vkCreateQueryPool vkCreateQueryPool = 0;
- PFN_vkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR = 0;
- PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV = 0;
- PFN_vkCreateRenderPass vkCreateRenderPass = 0;
- PFN_vkCreateRenderPass2 vkCreateRenderPass2 = 0;
- PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR = 0;
- PFN_vkCreateSampler vkCreateSampler = 0;
- PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion = 0;
- PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR = 0;
-#if defined( VK_USE_PLATFORM_SCREEN_QNX )
- PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX = 0;
-#else
- PFN_dummy placeholder_dont_call_vkCreateScreenSurfaceQNX = 0;
-#endif /*VK_USE_PLATFORM_SCREEN_QNX*/
- PFN_vkCreateSemaphore vkCreateSemaphore = 0;
- PFN_vkCreateShaderModule vkCreateShaderModule = 0;
- PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR = 0;
+
+ //=== VK_EXT_transform_feedback ===
+ PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT = 0;
+ PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT = 0;
+ PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT = 0;
+ PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT = 0;
+ PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT = 0;
+ PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT = 0;
+
+ //=== VK_NVX_binary_import ===
+ PFN_vkCreateCuModuleNVX vkCreateCuModuleNVX = 0;
+ PFN_vkCreateCuFunctionNVX vkCreateCuFunctionNVX = 0;
+ PFN_vkDestroyCuModuleNVX vkDestroyCuModuleNVX = 0;
+ PFN_vkDestroyCuFunctionNVX vkDestroyCuFunctionNVX = 0;
+ PFN_vkCmdCuLaunchKernelNVX vkCmdCuLaunchKernelNVX = 0;
+
+ //=== VK_NVX_image_view_handle ===
+ PFN_vkGetImageViewHandleNVX vkGetImageViewHandleNVX = 0;
+ PFN_vkGetImageViewAddressNVX vkGetImageViewAddressNVX = 0;
+
+ //=== VK_AMD_draw_indirect_count ===
+ PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD = 0;
+ PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD = 0;
+
+ //=== VK_AMD_shader_info ===
+ PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD = 0;
+
#if defined( VK_USE_PLATFORM_GGP )
+ //=== VK_GGP_stream_descriptor_surface ===
PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP = 0;
#else
- PFN_dummy placeholder_dont_call_vkCreateStreamDescriptorSurfaceGGP = 0;
+ PFN_dummy vkCreateStreamDescriptorSurfaceGGP_placeholder = 0;
#endif /*VK_USE_PLATFORM_GGP*/
- PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR = 0;
- PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT = 0;
+
+ //=== VK_NV_external_memory_capabilities ===
+ PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV = 0;
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_NV_external_memory_win32 ===
+ PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV = 0;
+#else
+ PFN_dummy vkGetMemoryWin32HandleNV_placeholder = 0;
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_get_physical_device_properties2 ===
+ PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR = 0;
+ PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR = 0;
+
+ //=== VK_KHR_device_group ===
+ PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR = 0;
+ PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR = 0;
+ PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR = 0;
+
#if defined( VK_USE_PLATFORM_VI_NN )
+ //=== VK_NN_vi_surface ===
PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN = 0;
#else
- PFN_dummy placeholder_dont_call_vkCreateViSurfaceNN = 0;
+ PFN_dummy vkCreateViSurfaceNN_placeholder = 0;
#endif /*VK_USE_PLATFORM_VI_NN*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkCreateVideoSessionKHR vkCreateVideoSessionKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkCreateVideoSessionKHR = 0;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkCreateVideoSessionParametersKHR vkCreateVideoSessionParametersKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkCreateVideoSessionParametersKHR = 0;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_USE_PLATFORM_WAYLAND_KHR )
- PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkCreateWaylandSurfaceKHR = 0;
-#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+ //=== VK_KHR_maintenance1 ===
+ PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR = 0;
+
+ //=== VK_KHR_device_group_creation ===
+ PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = 0;
+
+ //=== VK_KHR_external_memory_capabilities ===
+ PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR = 0;
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR = 0;
+ //=== VK_KHR_external_memory_win32 ===
+ PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR = 0;
+ PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR = 0;
#else
- PFN_dummy placeholder_dont_call_vkCreateWin32SurfaceKHR = 0;
+ PFN_dummy vkGetMemoryWin32HandleKHR_placeholder = 0;
+ PFN_dummy vkGetMemoryWin32HandlePropertiesKHR_placeholder = 0;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_XCB_KHR )
- PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkCreateXcbSurfaceKHR = 0;
-#endif /*VK_USE_PLATFORM_XCB_KHR*/
-#if defined( VK_USE_PLATFORM_XLIB_KHR )
- PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR = 0;
+
+ //=== VK_KHR_external_memory_fd ===
+ PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR = 0;
+ PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR = 0;
+
+ //=== VK_KHR_external_semaphore_capabilities ===
+ PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = 0;
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_semaphore_win32 ===
+ PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR = 0;
+ PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR = 0;
#else
- PFN_dummy placeholder_dont_call_vkCreateXlibSurfaceKHR = 0;
-#endif /*VK_USE_PLATFORM_XLIB_KHR*/
- PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT = 0;
- PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT = 0;
- PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT = 0;
- PFN_vkDeferredOperationJoinKHR vkDeferredOperationJoinKHR = 0;
- PFN_vkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR = 0;
- PFN_vkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV = 0;
- PFN_vkDestroyBuffer vkDestroyBuffer = 0;
- PFN_vkDestroyBufferView vkDestroyBufferView = 0;
- PFN_vkDestroyCommandPool vkDestroyCommandPool = 0;
- PFN_vkDestroyCuFunctionNVX vkDestroyCuFunctionNVX = 0;
- PFN_vkDestroyCuModuleNVX vkDestroyCuModuleNVX = 0;
- PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT = 0;
- PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT = 0;
- PFN_vkDestroyDeferredOperationKHR vkDestroyDeferredOperationKHR = 0;
- PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool = 0;
- PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout = 0;
- PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate = 0;
+ PFN_dummy vkImportSemaphoreWin32HandleKHR_placeholder = 0;
+ PFN_dummy vkGetSemaphoreWin32HandleKHR_placeholder = 0;
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_external_semaphore_fd ===
+ PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR = 0;
+ PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR = 0;
+
+ //=== VK_KHR_push_descriptor ===
+ PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR = 0;
+ PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR = 0;
+
+ //=== VK_EXT_conditional_rendering ===
+ PFN_vkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT = 0;
+ PFN_vkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT = 0;
+
+ //=== VK_KHR_descriptor_update_template ===
+ PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR = 0;
PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR = 0;
- PFN_vkDestroyDevice vkDestroyDevice = 0;
- PFN_vkDestroyEvent vkDestroyEvent = 0;
- PFN_vkDestroyFence vkDestroyFence = 0;
- PFN_vkDestroyFramebuffer vkDestroyFramebuffer = 0;
- PFN_vkDestroyImage vkDestroyImage = 0;
- PFN_vkDestroyImageView vkDestroyImageView = 0;
- PFN_vkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV = 0;
- PFN_vkDestroyInstance vkDestroyInstance = 0;
- PFN_vkDestroyPipeline vkDestroyPipeline = 0;
- PFN_vkDestroyPipelineCache vkDestroyPipelineCache = 0;
- PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout = 0;
- PFN_vkDestroyPrivateDataSlotEXT vkDestroyPrivateDataSlotEXT = 0;
- PFN_vkDestroyQueryPool vkDestroyQueryPool = 0;
- PFN_vkDestroyRenderPass vkDestroyRenderPass = 0;
- PFN_vkDestroySampler vkDestroySampler = 0;
- PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion = 0;
- PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR = 0;
- PFN_vkDestroySemaphore vkDestroySemaphore = 0;
- PFN_vkDestroyShaderModule vkDestroyShaderModule = 0;
- PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR = 0;
- PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR = 0;
- PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT = 0;
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkDestroyVideoSessionKHR vkDestroyVideoSessionKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkDestroyVideoSessionKHR = 0;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkDestroyVideoSessionParametersKHR vkDestroyVideoSessionParametersKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkDestroyVideoSessionParametersKHR = 0;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkDeviceWaitIdle vkDeviceWaitIdle = 0;
- PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT = 0;
- PFN_vkEndCommandBuffer vkEndCommandBuffer = 0;
- PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties = 0;
- PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties = 0;
- PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties = 0;
- PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties = 0;
- PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion = 0;
- PFN_vkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups = 0;
- PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = 0;
- PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR
- vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = 0;
- PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices = 0;
- PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges = 0;
- PFN_vkFreeCommandBuffers vkFreeCommandBuffers = 0;
- PFN_vkFreeDescriptorSets vkFreeDescriptorSets = 0;
- PFN_vkFreeMemory vkFreeMemory = 0;
- PFN_vkGetAccelerationStructureBuildSizesKHR vkGetAccelerationStructureBuildSizesKHR = 0;
- PFN_vkGetAccelerationStructureDeviceAddressKHR vkGetAccelerationStructureDeviceAddressKHR = 0;
- PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV = 0;
- PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV = 0;
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID = 0;
+ PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR = 0;
+
+ //=== VK_NV_clip_space_w_scaling ===
+ PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV = 0;
+
+ //=== VK_EXT_direct_mode_display ===
+ PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT = 0;
+
+#if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT )
+ //=== VK_EXT_acquire_xlib_display ===
+ PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT = 0;
+ PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT = 0;
#else
- PFN_dummy placeholder_dont_call_vkGetAndroidHardwareBufferPropertiesANDROID = 0;
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress = 0;
- PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT = 0;
- PFN_vkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR = 0;
- PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements = 0;
- PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2 = 0;
- PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR = 0;
- PFN_vkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress = 0;
- PFN_vkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR = 0;
- PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT = 0;
- PFN_vkGetDeferredOperationMaxConcurrencyKHR vkGetDeferredOperationMaxConcurrencyKHR = 0;
- PFN_vkGetDeferredOperationResultKHR vkGetDeferredOperationResultKHR = 0;
- PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport = 0;
- PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR = 0;
- PFN_vkGetDeviceAccelerationStructureCompatibilityKHR vkGetDeviceAccelerationStructureCompatibilityKHR = 0;
- PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures = 0;
- PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR = 0;
- PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR = 0;
+ PFN_dummy vkAcquireXlibDisplayEXT_placeholder = 0;
+ PFN_dummy vkGetRandROutputDisplayEXT_placeholder = 0;
+#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/
+
+ //=== VK_EXT_display_surface_counter ===
+ PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT = 0;
+
+ //=== VK_EXT_display_control ===
+ PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT = 0;
+ PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT = 0;
+ PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT = 0;
+ PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT = 0;
+
+ //=== VK_GOOGLE_display_timing ===
+ PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE = 0;
+ PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE = 0;
+
+ //=== VK_EXT_discard_rectangles ===
+ PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT = 0;
+
+ //=== VK_EXT_hdr_metadata ===
+ PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT = 0;
+
+ //=== VK_KHR_create_renderpass2 ===
+ PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR = 0;
+ PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR = 0;
+ PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR = 0;
+ PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR = 0;
+
+ //=== VK_KHR_shared_presentable_image ===
+ PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR = 0;
+
+ //=== VK_KHR_external_fence_capabilities ===
+ PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR = 0;
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT = 0;
+ //=== VK_KHR_external_fence_win32 ===
+ PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR = 0;
+ PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR = 0;
#else
- PFN_dummy placeholder_dont_call_vkGetDeviceGroupSurfacePresentModes2EXT = 0;
+ PFN_dummy vkImportFenceWin32HandleKHR_placeholder = 0;
+ PFN_dummy vkGetFenceWin32HandleKHR_placeholder = 0;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR = 0;
- PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment = 0;
- PFN_vkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress = 0;
- PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR = 0;
- PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0;
- PFN_vkGetDeviceQueue vkGetDeviceQueue = 0;
- PFN_vkGetDeviceQueue2 vkGetDeviceQueue2 = 0;
- PFN_vkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR = 0;
- PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR = 0;
- PFN_vkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR = 0;
- PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR = 0;
- PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR = 0;
- PFN_vkGetDrmDisplayEXT vkGetDrmDisplayEXT = 0;
- PFN_vkGetEventStatus vkGetEventStatus = 0;
- PFN_vkGetFenceFdKHR vkGetFenceFdKHR = 0;
- PFN_vkGetFenceStatus vkGetFenceStatus = 0;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR = 0;
+
+ //=== VK_KHR_external_fence_fd ===
+ PFN_vkImportFenceFdKHR vkImportFenceFdKHR = 0;
+ PFN_vkGetFenceFdKHR vkGetFenceFdKHR = 0;
+
+ //=== VK_KHR_performance_query ===
+ PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR
+ vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = 0;
+ PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR
+ vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = 0;
+ PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR = 0;
+ PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR = 0;
+
+ //=== VK_KHR_get_surface_capabilities2 ===
+ PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR = 0;
+ PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR = 0;
+
+ //=== VK_KHR_get_display_properties2 ===
+ PFN_vkGetPhysicalDeviceDisplayProperties2KHR vkGetPhysicalDeviceDisplayProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR vkGetPhysicalDeviceDisplayPlaneProperties2KHR = 0;
+ PFN_vkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR = 0;
+ PFN_vkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR = 0;
+
+#if defined( VK_USE_PLATFORM_IOS_MVK )
+ //=== VK_MVK_ios_surface ===
+ PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK = 0;
#else
- PFN_dummy placeholder_dont_call_vkGetFenceWin32HandleKHR = 0;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV = 0;
- PFN_vkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT = 0;
- PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements = 0;
- PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2 = 0;
- PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR = 0;
- PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements = 0;
- PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2 = 0;
- PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR = 0;
- PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout = 0;
- PFN_vkGetImageViewAddressNVX vkGetImageViewAddressNVX = 0;
- PFN_vkGetImageViewHandleNVX vkGetImageViewHandleNVX = 0;
- PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0;
+ PFN_dummy vkCreateIOSSurfaceMVK_placeholder = 0;
+#endif /*VK_USE_PLATFORM_IOS_MVK*/
+
+#if defined( VK_USE_PLATFORM_MACOS_MVK )
+ //=== VK_MVK_macos_surface ===
+ PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK = 0;
+#else
+ PFN_dummy vkCreateMacOSSurfaceMVK_placeholder = 0;
+#endif /*VK_USE_PLATFORM_MACOS_MVK*/
+
+ //=== VK_EXT_debug_utils ===
+ PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT = 0;
+ PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT = 0;
+ PFN_vkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT = 0;
+ PFN_vkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT = 0;
+ PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT = 0;
+ PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT = 0;
+ PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT = 0;
+ PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT = 0;
+ PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT = 0;
+ PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT = 0;
+ PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT = 0;
+
#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID = 0;
+ //=== VK_ANDROID_external_memory_android_hardware_buffer ===
+ PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID = 0;
+ PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID = 0;
#else
- PFN_dummy placeholder_dont_call_vkGetMemoryAndroidHardwareBufferANDROID = 0;
+ PFN_dummy vkGetAndroidHardwareBufferPropertiesANDROID_placeholder = 0;
+ PFN_dummy vkGetMemoryAndroidHardwareBufferANDROID_placeholder = 0;
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR = 0;
- PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR = 0;
+
+ //=== VK_EXT_sample_locations ===
+ PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT = 0;
+ PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT = 0;
+
+ //=== VK_KHR_get_memory_requirements2 ===
+ PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR = 0;
+ PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR = 0;
+ PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR = 0;
+
+ //=== VK_KHR_acceleration_structure ===
+ PFN_vkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR = 0;
+ PFN_vkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR = 0;
+ PFN_vkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR = 0;
+ PFN_vkCmdBuildAccelerationStructuresIndirectKHR vkCmdBuildAccelerationStructuresIndirectKHR = 0;
+ PFN_vkBuildAccelerationStructuresKHR vkBuildAccelerationStructuresKHR = 0;
+ PFN_vkCopyAccelerationStructureKHR vkCopyAccelerationStructureKHR = 0;
+ PFN_vkCopyAccelerationStructureToMemoryKHR vkCopyAccelerationStructureToMemoryKHR = 0;
+ PFN_vkCopyMemoryToAccelerationStructureKHR vkCopyMemoryToAccelerationStructureKHR = 0;
+ PFN_vkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR = 0;
+ PFN_vkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR = 0;
+ PFN_vkCmdCopyAccelerationStructureToMemoryKHR vkCmdCopyAccelerationStructureToMemoryKHR = 0;
+ PFN_vkCmdCopyMemoryToAccelerationStructureKHR vkCmdCopyMemoryToAccelerationStructureKHR = 0;
+ PFN_vkGetAccelerationStructureDeviceAddressKHR vkGetAccelerationStructureDeviceAddressKHR = 0;
+ PFN_vkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR = 0;
+ PFN_vkGetDeviceAccelerationStructureCompatibilityKHR vkGetDeviceAccelerationStructureCompatibilityKHR = 0;
+ PFN_vkGetAccelerationStructureBuildSizesKHR vkGetAccelerationStructureBuildSizesKHR = 0;
+
+ //=== VK_KHR_sampler_ycbcr_conversion ===
+ PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR = 0;
+ PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR = 0;
+
+ //=== VK_KHR_bind_memory2 ===
+ PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR = 0;
+ PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR = 0;
+
+ //=== VK_EXT_image_drm_format_modifier ===
+ PFN_vkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT = 0;
+
+ //=== VK_EXT_validation_cache ===
+ PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT = 0;
+ PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT = 0;
+ PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT = 0;
+ PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT = 0;
+
+ //=== VK_NV_shading_rate_image ===
+ PFN_vkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV = 0;
+ PFN_vkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV = 0;
+ PFN_vkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV = 0;
+
+ //=== VK_NV_ray_tracing ===
+ PFN_vkCreateAccelerationStructureNV vkCreateAccelerationStructureNV = 0;
+ PFN_vkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV = 0;
+ PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV = 0;
+ PFN_vkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV = 0;
+ PFN_vkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV = 0;
+ PFN_vkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV = 0;
+ PFN_vkCmdTraceRaysNV vkCmdTraceRaysNV = 0;
+ PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV = 0;
+ PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV = 0;
+ PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV = 0;
+ PFN_vkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV = 0;
+ PFN_vkCompileDeferredNV vkCompileDeferredNV = 0;
+
+ //=== VK_KHR_maintenance3 ===
+ PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR = 0;
+
+ //=== VK_KHR_draw_indirect_count ===
+ PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR = 0;
+ PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR = 0;
+
+ //=== VK_EXT_external_memory_host ===
PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT = 0;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkGetMemoryWin32HandleKHR = 0;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV = 0;
-#else
- PFN_dummy placeholder_dont_call_vkGetMemoryWin32HandleNV = 0;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkGetMemoryWin32HandlePropertiesKHR = 0;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_AMD_buffer_marker ===
+ PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD = 0;
+
+ //=== VK_EXT_calibrated_timestamps ===
+ PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = 0;
+ PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT = 0;
+
+ //=== VK_NV_mesh_shader ===
+ PFN_vkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV = 0;
+ PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV = 0;
+ PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV = 0;
+
+ //=== VK_NV_scissor_exclusive ===
+ PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV = 0;
+
+ //=== VK_NV_device_diagnostic_checkpoints ===
+ PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV = 0;
+ PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV = 0;
+
+ //=== VK_KHR_timeline_semaphore ===
+ PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR = 0;
+ PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR = 0;
+ PFN_vkSignalSemaphoreKHR vkSignalSemaphoreKHR = 0;
+
+ //=== VK_INTEL_performance_query ===
+ PFN_vkInitializePerformanceApiINTEL vkInitializePerformanceApiINTEL = 0;
+ PFN_vkUninitializePerformanceApiINTEL vkUninitializePerformanceApiINTEL = 0;
+ PFN_vkCmdSetPerformanceMarkerINTEL vkCmdSetPerformanceMarkerINTEL = 0;
+ PFN_vkCmdSetPerformanceStreamMarkerINTEL vkCmdSetPerformanceStreamMarkerINTEL = 0;
+ PFN_vkCmdSetPerformanceOverrideINTEL vkCmdSetPerformanceOverrideINTEL = 0;
+ PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL = 0;
+ PFN_vkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL = 0;
+ PFN_vkQueueSetPerformanceConfigurationINTEL vkQueueSetPerformanceConfigurationINTEL = 0;
+ PFN_vkGetPerformanceParameterINTEL vkGetPerformanceParameterINTEL = 0;
+
+ //=== VK_AMD_display_native_hdr ===
+ PFN_vkSetLocalDimmingAMD vkSetLocalDimmingAMD = 0;
+
#if defined( VK_USE_PLATFORM_FUCHSIA )
- PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA = 0;
+ //=== VK_FUCHSIA_imagepipe_surface ===
+ PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA = 0;
#else
- PFN_dummy placeholder_dont_call_vkGetMemoryZirconHandleFUCHSIA = 0;
+ PFN_dummy vkCreateImagePipeSurfaceFUCHSIA_placeholder = 0;
#endif /*VK_USE_PLATFORM_FUCHSIA*/
-#if defined( VK_USE_PLATFORM_FUCHSIA )
- PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIA = 0;
+
+#if defined( VK_USE_PLATFORM_METAL_EXT )
+ //=== VK_EXT_metal_surface ===
+ PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT = 0;
#else
- PFN_dummy placeholder_dont_call_vkGetMemoryZirconHandlePropertiesFUCHSIA = 0;
-#endif /*VK_USE_PLATFORM_FUCHSIA*/
- PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE = 0;
- PFN_vkGetPerformanceParameterINTEL vkGetPerformanceParameterINTEL = 0;
- PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = 0;
+ PFN_dummy vkCreateMetalSurfaceEXT_placeholder = 0;
+#endif /*VK_USE_PLATFORM_METAL_EXT*/
+
+ //=== VK_KHR_fragment_shading_rate ===
+ PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR vkGetPhysicalDeviceFragmentShadingRatesKHR = 0;
+ PFN_vkCmdSetFragmentShadingRateKHR vkCmdSetFragmentShadingRateKHR = 0;
+
+ //=== VK_EXT_buffer_device_address ===
+ PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT = 0;
+
+ //=== VK_EXT_tooling_info ===
+ PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT = 0;
+
+ //=== VK_KHR_present_wait ===
+ PFN_vkWaitForPresentKHR vkWaitForPresentKHR = 0;
+
+ //=== VK_NV_cooperative_matrix ===
PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = 0;
-#if defined( VK_USE_PLATFORM_DIRECTFB_EXT )
- PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT = 0;
-#else
- PFN_dummy placeholder_dont_call_vkGetPhysicalDeviceDirectFBPresentationSupportEXT = 0;
-#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/
- PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR vkGetPhysicalDeviceDisplayPlaneProperties2KHR = 0;
- PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR = 0;
- PFN_vkGetPhysicalDeviceDisplayProperties2KHR vkGetPhysicalDeviceDisplayProperties2KHR = 0;
- PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR = 0;
- PFN_vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties = 0;
- PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR = 0;
- PFN_vkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties = 0;
- PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR = 0;
- PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV = 0;
- PFN_vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties = 0;
- PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = 0;
- PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures = 0;
- PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2 = 0;
- PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR = 0;
- PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties = 0;
- PFN_vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2 = 0;
- PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR = 0;
- PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR vkGetPhysicalDeviceFragmentShadingRatesKHR = 0;
- PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties = 0;
- PFN_vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2 = 0;
- PFN_vkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR = 0;
- PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties = 0;
- PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2 = 0;
- PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR = 0;
- PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT = 0;
- PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR = 0;
- PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties = 0;
- PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2 = 0;
- PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = 0;
- PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR
- vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = 0;
- PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties = 0;
- PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2 = 0;
- PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR = 0;
-#if defined( VK_USE_PLATFORM_SCREEN_QNX )
- PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX = 0;
-#else
- PFN_dummy placeholder_dont_call_vkGetPhysicalDeviceScreenPresentationSupportQNX = 0;
-#endif /*VK_USE_PLATFORM_SCREEN_QNX*/
- PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties = 0;
- PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2 = 0;
- PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR = 0;
+
+ //=== VK_NV_coverage_reduction_mode ===
PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV
- vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = 0;
- PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT = 0;
- PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR = 0;
- PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 0;
- PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR = 0;
- PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR = 0;
+ vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = 0;
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_EXT_full_screen_exclusive ===
PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT vkGetPhysicalDeviceSurfacePresentModes2EXT = 0;
+ PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT = 0;
+ PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT = 0;
+ PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT = 0;
#else
- PFN_dummy placeholder_dont_call_vkGetPhysicalDeviceSurfacePresentModes2EXT = 0;
+ PFN_dummy vkGetPhysicalDeviceSurfacePresentModes2EXT_placeholder = 0;
+ PFN_dummy vkAcquireFullScreenExclusiveModeEXT_placeholder = 0;
+ PFN_dummy vkReleaseFullScreenExclusiveModeEXT_placeholder = 0;
+ PFN_dummy vkGetDeviceGroupSurfacePresentModes2EXT_placeholder = 0;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR = 0;
- PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR = 0;
- PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT = 0;
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR vkGetPhysicalDeviceVideoCapabilitiesKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkGetPhysicalDeviceVideoCapabilitiesKHR = 0;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_EXT_headless_surface ===
+ PFN_vkCreateHeadlessSurfaceEXT vkCreateHeadlessSurfaceEXT = 0;
+
+ //=== VK_KHR_buffer_device_address ===
+ PFN_vkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR = 0;
+ PFN_vkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR = 0;
+ PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR = 0;
+
+ //=== VK_EXT_line_rasterization ===
+ PFN_vkCmdSetLineStippleEXT vkCmdSetLineStippleEXT = 0;
+
+ //=== VK_EXT_host_query_reset ===
+ PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT = 0;
+
+ //=== VK_EXT_extended_dynamic_state ===
+ PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT = 0;
+ PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT = 0;
+ PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT = 0;
+ PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT = 0;
+ PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT = 0;
+ PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT = 0;
+ PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT = 0;
+ PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT = 0;
+ PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT = 0;
+ PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT = 0;
+ PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT = 0;
+ PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT = 0;
+
+ //=== VK_KHR_deferred_host_operations ===
+ PFN_vkCreateDeferredOperationKHR vkCreateDeferredOperationKHR = 0;
+ PFN_vkDestroyDeferredOperationKHR vkDestroyDeferredOperationKHR = 0;
+ PFN_vkGetDeferredOperationMaxConcurrencyKHR vkGetDeferredOperationMaxConcurrencyKHR = 0;
+ PFN_vkGetDeferredOperationResultKHR vkGetDeferredOperationResultKHR = 0;
+ PFN_vkDeferredOperationJoinKHR vkDeferredOperationJoinKHR = 0;
+
+ //=== VK_KHR_pipeline_executable_properties ===
+ PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR = 0;
+ PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR = 0;
+ PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR = 0;
+
+ //=== VK_NV_device_generated_commands ===
+ PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV = 0;
+ PFN_vkCmdPreprocessGeneratedCommandsNV vkCmdPreprocessGeneratedCommandsNV = 0;
+ PFN_vkCmdExecuteGeneratedCommandsNV vkCmdExecuteGeneratedCommandsNV = 0;
+ PFN_vkCmdBindPipelineShaderGroupNV vkCmdBindPipelineShaderGroupNV = 0;
+ PFN_vkCreateIndirectCommandsLayoutNV vkCreateIndirectCommandsLayoutNV = 0;
+ PFN_vkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV = 0;
+
+ //=== VK_EXT_acquire_drm_display ===
+ PFN_vkAcquireDrmDisplayEXT vkAcquireDrmDisplayEXT = 0;
+ PFN_vkGetDrmDisplayEXT vkGetDrmDisplayEXT = 0;
+
+ //=== VK_EXT_private_data ===
+ PFN_vkCreatePrivateDataSlotEXT vkCreatePrivateDataSlotEXT = 0;
+ PFN_vkDestroyPrivateDataSlotEXT vkDestroyPrivateDataSlotEXT = 0;
+ PFN_vkSetPrivateDataEXT vkSetPrivateDataEXT = 0;
+ PFN_vkGetPrivateDataEXT vkGetPrivateDataEXT = 0;
+
#if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR vkGetPhysicalDeviceVideoFormatPropertiesKHR = 0;
+ //=== VK_KHR_video_encode_queue ===
+ PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR = 0;
#else
- PFN_dummy placeholder_dont_call_vkGetPhysicalDeviceVideoFormatPropertiesKHR = 0;
+ PFN_dummy vkCmdEncodeVideoKHR_placeholder = 0;
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_USE_PLATFORM_WAYLAND_KHR )
- PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkGetPhysicalDeviceWaylandPresentationSupportKHR = 0;
-#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+ //=== VK_KHR_synchronization2 ===
+ PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR = 0;
+ PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR = 0;
+ PFN_vkCmdWaitEvents2KHR vkCmdWaitEvents2KHR = 0;
+ PFN_vkCmdPipelineBarrier2KHR vkCmdPipelineBarrier2KHR = 0;
+ PFN_vkCmdWriteTimestamp2KHR vkCmdWriteTimestamp2KHR = 0;
+ PFN_vkQueueSubmit2KHR vkQueueSubmit2KHR = 0;
+ PFN_vkCmdWriteBufferMarker2AMD vkCmdWriteBufferMarker2AMD = 0;
+ PFN_vkGetQueueCheckpointData2NV vkGetQueueCheckpointData2NV = 0;
+
+ //=== VK_NV_fragment_shading_rate_enums ===
+ PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV = 0;
+
+ //=== VK_KHR_copy_commands2 ===
+ PFN_vkCmdCopyBuffer2KHR vkCmdCopyBuffer2KHR = 0;
+ PFN_vkCmdCopyImage2KHR vkCmdCopyImage2KHR = 0;
+ PFN_vkCmdCopyBufferToImage2KHR vkCmdCopyBufferToImage2KHR = 0;
+ PFN_vkCmdCopyImageToBuffer2KHR vkCmdCopyImageToBuffer2KHR = 0;
+ PFN_vkCmdBlitImage2KHR vkCmdBlitImage2KHR = 0;
+ PFN_vkCmdResolveImage2KHR vkCmdResolveImage2KHR = 0;
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR = 0;
+ //=== VK_NV_acquire_winrt_display ===
+ PFN_vkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV = 0;
+ PFN_vkGetWinrtDisplayNV vkGetWinrtDisplayNV = 0;
#else
- PFN_dummy placeholder_dont_call_vkGetPhysicalDeviceWin32PresentationSupportKHR = 0;
+ PFN_dummy vkAcquireWinrtDisplayNV_placeholder = 0;
+ PFN_dummy vkGetWinrtDisplayNV_placeholder = 0;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_XCB_KHR )
- PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkGetPhysicalDeviceXcbPresentationSupportKHR = 0;
-#endif /*VK_USE_PLATFORM_XCB_KHR*/
-#if defined( VK_USE_PLATFORM_XLIB_KHR )
- PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkGetPhysicalDeviceXlibPresentationSupportKHR = 0;
-#endif /*VK_USE_PLATFORM_XLIB_KHR*/
- PFN_vkGetPipelineCacheData vkGetPipelineCacheData = 0;
- PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR = 0;
- PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR = 0;
- PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR = 0;
- PFN_vkGetPrivateDataEXT vkGetPrivateDataEXT = 0;
- PFN_vkGetQueryPoolResults vkGetQueryPoolResults = 0;
- PFN_vkGetQueueCheckpointData2NV vkGetQueueCheckpointData2NV = 0;
- PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV = 0;
-#if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT )
- PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT = 0;
+
+#if defined( VK_USE_PLATFORM_DIRECTFB_EXT )
+ //=== VK_EXT_directfb_surface ===
+ PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT = 0;
+ PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT = 0;
#else
- PFN_dummy placeholder_dont_call_vkGetRandROutputDisplayEXT = 0;
-#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/
- PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = 0;
+ PFN_dummy vkCreateDirectFBSurfaceEXT_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceDirectFBPresentationSupportEXT_placeholder = 0;
+#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/
+
+ //=== VK_KHR_ray_tracing_pipeline ===
+ PFN_vkCmdTraceRaysKHR vkCmdTraceRaysKHR = 0;
+ PFN_vkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR = 0;
PFN_vkGetRayTracingShaderGroupHandlesKHR vkGetRayTracingShaderGroupHandlesKHR = 0;
- PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV = 0;
+ PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = 0;
+ PFN_vkCmdTraceRaysIndirectKHR vkCmdTraceRaysIndirectKHR = 0;
PFN_vkGetRayTracingShaderGroupStackSizeKHR vkGetRayTracingShaderGroupStackSizeKHR = 0;
- PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE = 0;
- PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity = 0;
- PFN_vkGetSemaphoreCounterValue vkGetSemaphoreCounterValue = 0;
- PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR = 0;
- PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR = 0;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkGetSemaphoreWin32HandleKHR = 0;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ PFN_vkCmdSetRayTracingPipelineStackSizeKHR vkCmdSetRayTracingPipelineStackSizeKHR = 0;
+
+ //=== VK_EXT_vertex_input_dynamic_state ===
+ PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT = 0;
+
#if defined( VK_USE_PLATFORM_FUCHSIA )
- PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA = 0;
+ //=== VK_FUCHSIA_external_memory ===
+ PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA = 0;
+ PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIA = 0;
#else
- PFN_dummy placeholder_dont_call_vkGetSemaphoreZirconHandleFUCHSIA = 0;
+ PFN_dummy vkGetMemoryZirconHandleFUCHSIA_placeholder = 0;
+ PFN_dummy vkGetMemoryZirconHandlePropertiesFUCHSIA_placeholder = 0;
#endif /*VK_USE_PLATFORM_FUCHSIA*/
- PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD = 0;
- PFN_vkGetSubpassShadingMaxWorkgroupSizeHUAWEI vkGetSubpassShadingMaxWorkgroupSizeHUAWEI = 0;
- PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT = 0;
- PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR = 0;
- PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR = 0;
- PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT = 0;
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkGetVideoSessionMemoryRequirementsKHR vkGetVideoSessionMemoryRequirementsKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkGetVideoSessionMemoryRequirementsKHR = 0;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetWinrtDisplayNV vkGetWinrtDisplayNV = 0;
-#else
- PFN_dummy placeholder_dont_call_vkGetWinrtDisplayNV = 0;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkImportFenceFdKHR vkImportFenceFdKHR = 0;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkImportFenceWin32HandleKHR = 0;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR = 0;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR = 0;
-#else
- PFN_dummy placeholder_dont_call_vkImportSemaphoreWin32HandleKHR = 0;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
#if defined( VK_USE_PLATFORM_FUCHSIA )
+ //=== VK_FUCHSIA_external_semaphore ===
PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA = 0;
+ PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA = 0;
#else
- PFN_dummy placeholder_dont_call_vkImportSemaphoreZirconHandleFUCHSIA = 0;
+ PFN_dummy vkImportSemaphoreZirconHandleFUCHSIA_placeholder = 0;
+ PFN_dummy vkGetSemaphoreZirconHandleFUCHSIA_placeholder = 0;
#endif /*VK_USE_PLATFORM_FUCHSIA*/
- PFN_vkInitializePerformanceApiINTEL vkInitializePerformanceApiINTEL = 0;
- PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges = 0;
- PFN_vkMapMemory vkMapMemory = 0;
- PFN_vkMergePipelineCaches vkMergePipelineCaches = 0;
- PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT = 0;
- PFN_vkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT = 0;
- PFN_vkQueueBindSparse vkQueueBindSparse = 0;
- PFN_vkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT = 0;
- PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT = 0;
- PFN_vkQueuePresentKHR vkQueuePresentKHR = 0;
- PFN_vkQueueSetPerformanceConfigurationINTEL vkQueueSetPerformanceConfigurationINTEL = 0;
- PFN_vkQueueSubmit vkQueueSubmit = 0;
- PFN_vkQueueSubmit2KHR vkQueueSubmit2KHR = 0;
- PFN_vkQueueWaitIdle vkQueueWaitIdle = 0;
- PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT = 0;
- PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT = 0;
- PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT = 0;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT = 0;
-#else
- PFN_dummy placeholder_dont_call_vkReleaseFullScreenExclusiveModeEXT = 0;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL = 0;
- PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR = 0;
- PFN_vkResetCommandBuffer vkResetCommandBuffer = 0;
- PFN_vkResetCommandPool vkResetCommandPool = 0;
- PFN_vkResetDescriptorPool vkResetDescriptorPool = 0;
- PFN_vkResetEvent vkResetEvent = 0;
- PFN_vkResetFences vkResetFences = 0;
- PFN_vkResetQueryPool vkResetQueryPool = 0;
- PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT = 0;
- PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT = 0;
- PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT = 0;
- PFN_vkSetEvent vkSetEvent = 0;
- PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT = 0;
- PFN_vkSetLocalDimmingAMD vkSetLocalDimmingAMD = 0;
- PFN_vkSetPrivateDataEXT vkSetPrivateDataEXT = 0;
- PFN_vkSignalSemaphore vkSignalSemaphore = 0;
- PFN_vkSignalSemaphoreKHR vkSignalSemaphoreKHR = 0;
- PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT = 0;
- PFN_vkTrimCommandPool vkTrimCommandPool = 0;
- PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR = 0;
- PFN_vkUninitializePerformanceApiINTEL vkUninitializePerformanceApiINTEL = 0;
- PFN_vkUnmapMemory vkUnmapMemory = 0;
- PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate = 0;
- PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR = 0;
- PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets = 0;
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkUpdateVideoSessionParametersKHR vkUpdateVideoSessionParametersKHR = 0;
+
+ //=== VK_HUAWEI_subpass_shading ===
+ PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = 0;
+ PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI = 0;
+
+ //=== VK_HUAWEI_invocation_mask ===
+ PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI = 0;
+
+ //=== VK_NV_external_memory_rdma ===
+ PFN_vkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV = 0;
+
+ //=== VK_EXT_extended_dynamic_state2 ===
+ PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT = 0;
+ PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT = 0;
+ PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT = 0;
+ PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT = 0;
+ PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT = 0;
+
+#if defined( VK_USE_PLATFORM_SCREEN_QNX )
+ //=== VK_QNX_screen_surface ===
+ PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX = 0;
+ PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX = 0;
#else
- PFN_dummy placeholder_dont_call_vkUpdateVideoSessionParametersKHR = 0;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkWaitForFences vkWaitForFences = 0;
- PFN_vkWaitSemaphores vkWaitSemaphores = 0;
- PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR = 0;
- PFN_vkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR = 0;
+ PFN_dummy vkCreateScreenSurfaceQNX_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceScreenPresentationSupportQNX_placeholder = 0;
+#endif /*VK_USE_PLATFORM_SCREEN_QNX*/
+
+ //=== VK_EXT_color_write_enable ===
+ PFN_vkCmdSetColorWriteEnableEXT vkCmdSetColorWriteEnableEXT = 0;
+
+ //=== VK_EXT_multi_draw ===
+ PFN_vkCmdDrawMultiEXT vkCmdDrawMultiEXT = 0;
+ PFN_vkCmdDrawMultiIndexedEXT vkCmdDrawMultiIndexedEXT = 0;
public:
DispatchLoaderDynamic() VULKAN_HPP_NOEXCEPT = default;
@@ -10850,11 +11483,15 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_ASSERT( getInstanceProcAddr );
vkGetInstanceProcAddr = getInstanceProcAddr;
- vkCreateInstance = PFN_vkCreateInstance( vkGetInstanceProcAddr( NULL, "vkCreateInstance" ) );
+
+ //=== VK_VERSION_1_0 ===
+ vkCreateInstance = PFN_vkCreateInstance( vkGetInstanceProcAddr( NULL, "vkCreateInstance" ) );
vkEnumerateInstanceExtensionProperties = PFN_vkEnumerateInstanceExtensionProperties(
vkGetInstanceProcAddr( NULL, "vkEnumerateInstanceExtensionProperties" ) );
vkEnumerateInstanceLayerProperties =
PFN_vkEnumerateInstanceLayerProperties( vkGetInstanceProcAddr( NULL, "vkEnumerateInstanceLayerProperties" ) );
+
+ //=== VK_VERSION_1_1 ===
vkEnumerateInstanceVersion =
PFN_vkEnumerateInstanceVersion( vkGetInstanceProcAddr( NULL, "vkEnumerateInstanceVersion" ) );
}
@@ -10886,1951 +11523,2267 @@ namespace VULKAN_HPP_NAMESPACE
void init( VULKAN_HPP_NAMESPACE::Instance instanceCpp ) VULKAN_HPP_NOEXCEPT
{
VkInstance instance = static_cast<VkInstance>( instanceCpp );
- vkAcquireDrmDisplayEXT =
- PFN_vkAcquireDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireDrmDisplayEXT" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkAcquireWinrtDisplayNV =
- PFN_vkAcquireWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkAcquireWinrtDisplayNV" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT )
- vkAcquireXlibDisplayEXT =
- PFN_vkAcquireXlibDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireXlibDisplayEXT" ) );
-#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- vkCreateAndroidSurfaceKHR =
- PFN_vkCreateAndroidSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" ) );
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- vkCreateDebugReportCallbackEXT =
- PFN_vkCreateDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugReportCallbackEXT" ) );
- vkCreateDebugUtilsMessengerEXT =
- PFN_vkCreateDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugUtilsMessengerEXT" ) );
- vkCreateDevice = PFN_vkCreateDevice( vkGetInstanceProcAddr( instance, "vkCreateDevice" ) );
-#if defined( VK_USE_PLATFORM_DIRECTFB_EXT )
- vkCreateDirectFBSurfaceEXT =
- PFN_vkCreateDirectFBSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateDirectFBSurfaceEXT" ) );
-#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/
- vkCreateDisplayModeKHR =
- PFN_vkCreateDisplayModeKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayModeKHR" ) );
- vkCreateDisplayPlaneSurfaceKHR =
- PFN_vkCreateDisplayPlaneSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayPlaneSurfaceKHR" ) );
- vkCreateHeadlessSurfaceEXT =
- PFN_vkCreateHeadlessSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateHeadlessSurfaceEXT" ) );
-#if defined( VK_USE_PLATFORM_IOS_MVK )
- vkCreateIOSSurfaceMVK = PFN_vkCreateIOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateIOSSurfaceMVK" ) );
-#endif /*VK_USE_PLATFORM_IOS_MVK*/
-#if defined( VK_USE_PLATFORM_FUCHSIA )
- vkCreateImagePipeSurfaceFUCHSIA =
- PFN_vkCreateImagePipeSurfaceFUCHSIA( vkGetInstanceProcAddr( instance, "vkCreateImagePipeSurfaceFUCHSIA" ) );
-#endif /*VK_USE_PLATFORM_FUCHSIA*/
-#if defined( VK_USE_PLATFORM_MACOS_MVK )
- vkCreateMacOSSurfaceMVK =
- PFN_vkCreateMacOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateMacOSSurfaceMVK" ) );
-#endif /*VK_USE_PLATFORM_MACOS_MVK*/
-#if defined( VK_USE_PLATFORM_METAL_EXT )
- vkCreateMetalSurfaceEXT =
- PFN_vkCreateMetalSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateMetalSurfaceEXT" ) );
-#endif /*VK_USE_PLATFORM_METAL_EXT*/
-#if defined( VK_USE_PLATFORM_SCREEN_QNX )
- vkCreateScreenSurfaceQNX =
- PFN_vkCreateScreenSurfaceQNX( vkGetInstanceProcAddr( instance, "vkCreateScreenSurfaceQNX" ) );
-#endif /*VK_USE_PLATFORM_SCREEN_QNX*/
-#if defined( VK_USE_PLATFORM_GGP )
- vkCreateStreamDescriptorSurfaceGGP = PFN_vkCreateStreamDescriptorSurfaceGGP(
- vkGetInstanceProcAddr( instance, "vkCreateStreamDescriptorSurfaceGGP" ) );
-#endif /*VK_USE_PLATFORM_GGP*/
-#if defined( VK_USE_PLATFORM_VI_NN )
- vkCreateViSurfaceNN = PFN_vkCreateViSurfaceNN( vkGetInstanceProcAddr( instance, "vkCreateViSurfaceNN" ) );
-#endif /*VK_USE_PLATFORM_VI_NN*/
-#if defined( VK_USE_PLATFORM_WAYLAND_KHR )
- vkCreateWaylandSurfaceKHR =
- PFN_vkCreateWaylandSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWaylandSurfaceKHR" ) );
-#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkCreateWin32SurfaceKHR =
- PFN_vkCreateWin32SurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWin32SurfaceKHR" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_XCB_KHR )
- vkCreateXcbSurfaceKHR = PFN_vkCreateXcbSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXcbSurfaceKHR" ) );
-#endif /*VK_USE_PLATFORM_XCB_KHR*/
-#if defined( VK_USE_PLATFORM_XLIB_KHR )
- vkCreateXlibSurfaceKHR =
- PFN_vkCreateXlibSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXlibSurfaceKHR" ) );
-#endif /*VK_USE_PLATFORM_XLIB_KHR*/
- vkDebugReportMessageEXT =
- PFN_vkDebugReportMessageEXT( vkGetInstanceProcAddr( instance, "vkDebugReportMessageEXT" ) );
- vkDestroyDebugReportCallbackEXT =
- PFN_vkDestroyDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugReportCallbackEXT" ) );
- vkDestroyDebugUtilsMessengerEXT =
- PFN_vkDestroyDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugUtilsMessengerEXT" ) );
- vkDestroyInstance = PFN_vkDestroyInstance( vkGetInstanceProcAddr( instance, "vkDestroyInstance" ) );
- vkDestroySurfaceKHR = PFN_vkDestroySurfaceKHR( vkGetInstanceProcAddr( instance, "vkDestroySurfaceKHR" ) );
- vkEnumerateDeviceExtensionProperties = PFN_vkEnumerateDeviceExtensionProperties(
- vkGetInstanceProcAddr( instance, "vkEnumerateDeviceExtensionProperties" ) );
- vkEnumerateDeviceLayerProperties =
- PFN_vkEnumerateDeviceLayerProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceLayerProperties" ) );
- vkEnumeratePhysicalDeviceGroups =
- PFN_vkEnumeratePhysicalDeviceGroups( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroups" ) );
- vkEnumeratePhysicalDeviceGroupsKHR = PFN_vkEnumeratePhysicalDeviceGroupsKHR(
- vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroupsKHR" ) );
- if ( !vkEnumeratePhysicalDeviceGroups )
- vkEnumeratePhysicalDeviceGroups = vkEnumeratePhysicalDeviceGroupsKHR;
- vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR =
- PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
- vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR" ) );
+
+ //=== VK_VERSION_1_0 ===
+ vkDestroyInstance = PFN_vkDestroyInstance( vkGetInstanceProcAddr( instance, "vkDestroyInstance" ) );
vkEnumeratePhysicalDevices =
PFN_vkEnumeratePhysicalDevices( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDevices" ) );
- vkGetDisplayModeProperties2KHR =
- PFN_vkGetDisplayModeProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModeProperties2KHR" ) );
- vkGetDisplayModePropertiesKHR =
- PFN_vkGetDisplayModePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModePropertiesKHR" ) );
- vkGetDisplayPlaneCapabilities2KHR =
- PFN_vkGetDisplayPlaneCapabilities2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilities2KHR" ) );
- vkGetDisplayPlaneCapabilitiesKHR =
- PFN_vkGetDisplayPlaneCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilitiesKHR" ) );
- vkGetDisplayPlaneSupportedDisplaysKHR = PFN_vkGetDisplayPlaneSupportedDisplaysKHR(
- vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneSupportedDisplaysKHR" ) );
- vkGetDrmDisplayEXT = PFN_vkGetDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetDrmDisplayEXT" ) );
- vkGetInstanceProcAddr = PFN_vkGetInstanceProcAddr( vkGetInstanceProcAddr( instance, "vkGetInstanceProcAddr" ) );
- vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT" ) );
- vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV" ) );
-#if defined( VK_USE_PLATFORM_DIRECTFB_EXT )
- vkGetPhysicalDeviceDirectFBPresentationSupportEXT = PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT" ) );
-#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/
- vkGetPhysicalDeviceDisplayPlaneProperties2KHR = PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR" ) );
- vkGetPhysicalDeviceDisplayPlanePropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR" ) );
- vkGetPhysicalDeviceDisplayProperties2KHR = PFN_vkGetPhysicalDeviceDisplayProperties2KHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayProperties2KHR" ) );
- vkGetPhysicalDeviceDisplayPropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPropertiesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPropertiesKHR" ) );
- vkGetPhysicalDeviceExternalBufferProperties = PFN_vkGetPhysicalDeviceExternalBufferProperties(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferProperties" ) );
- vkGetPhysicalDeviceExternalBufferPropertiesKHR = PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR" ) );
- if ( !vkGetPhysicalDeviceExternalBufferProperties )
- vkGetPhysicalDeviceExternalBufferProperties = vkGetPhysicalDeviceExternalBufferPropertiesKHR;
- vkGetPhysicalDeviceExternalFenceProperties = PFN_vkGetPhysicalDeviceExternalFenceProperties(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFenceProperties" ) );
- vkGetPhysicalDeviceExternalFencePropertiesKHR = PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR" ) );
- if ( !vkGetPhysicalDeviceExternalFenceProperties )
- vkGetPhysicalDeviceExternalFenceProperties = vkGetPhysicalDeviceExternalFencePropertiesKHR;
- vkGetPhysicalDeviceExternalImageFormatPropertiesNV = PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV" ) );
- vkGetPhysicalDeviceExternalSemaphoreProperties = PFN_vkGetPhysicalDeviceExternalSemaphoreProperties(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphoreProperties" ) );
- vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR" ) );
- if ( !vkGetPhysicalDeviceExternalSemaphoreProperties )
- vkGetPhysicalDeviceExternalSemaphoreProperties = vkGetPhysicalDeviceExternalSemaphorePropertiesKHR;
vkGetPhysicalDeviceFeatures =
PFN_vkGetPhysicalDeviceFeatures( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures" ) );
- vkGetPhysicalDeviceFeatures2 =
- PFN_vkGetPhysicalDeviceFeatures2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2" ) );
- vkGetPhysicalDeviceFeatures2KHR =
- PFN_vkGetPhysicalDeviceFeatures2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2KHR" ) );
- if ( !vkGetPhysicalDeviceFeatures2 )
- vkGetPhysicalDeviceFeatures2 = vkGetPhysicalDeviceFeatures2KHR;
vkGetPhysicalDeviceFormatProperties = PFN_vkGetPhysicalDeviceFormatProperties(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties" ) );
- vkGetPhysicalDeviceFormatProperties2 = PFN_vkGetPhysicalDeviceFormatProperties2(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2" ) );
- vkGetPhysicalDeviceFormatProperties2KHR = PFN_vkGetPhysicalDeviceFormatProperties2KHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2KHR" ) );
- if ( !vkGetPhysicalDeviceFormatProperties2 )
- vkGetPhysicalDeviceFormatProperties2 = vkGetPhysicalDeviceFormatProperties2KHR;
- vkGetPhysicalDeviceFragmentShadingRatesKHR = PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR" ) );
vkGetPhysicalDeviceImageFormatProperties = PFN_vkGetPhysicalDeviceImageFormatProperties(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties" ) );
- vkGetPhysicalDeviceImageFormatProperties2 = PFN_vkGetPhysicalDeviceImageFormatProperties2(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2" ) );
- vkGetPhysicalDeviceImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceImageFormatProperties2KHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2KHR" ) );
- if ( !vkGetPhysicalDeviceImageFormatProperties2 )
- vkGetPhysicalDeviceImageFormatProperties2 = vkGetPhysicalDeviceImageFormatProperties2KHR;
- vkGetPhysicalDeviceMemoryProperties = PFN_vkGetPhysicalDeviceMemoryProperties(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties" ) );
- vkGetPhysicalDeviceMemoryProperties2 = PFN_vkGetPhysicalDeviceMemoryProperties2(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2" ) );
- vkGetPhysicalDeviceMemoryProperties2KHR = PFN_vkGetPhysicalDeviceMemoryProperties2KHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2KHR" ) );
- if ( !vkGetPhysicalDeviceMemoryProperties2 )
- vkGetPhysicalDeviceMemoryProperties2 = vkGetPhysicalDeviceMemoryProperties2KHR;
- vkGetPhysicalDeviceMultisamplePropertiesEXT = PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT" ) );
- vkGetPhysicalDevicePresentRectanglesKHR = PFN_vkGetPhysicalDevicePresentRectanglesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDevicePresentRectanglesKHR" ) );
vkGetPhysicalDeviceProperties =
PFN_vkGetPhysicalDeviceProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties" ) );
- vkGetPhysicalDeviceProperties2 =
- PFN_vkGetPhysicalDeviceProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2" ) );
- vkGetPhysicalDeviceProperties2KHR =
- PFN_vkGetPhysicalDeviceProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2KHR" ) );
- if ( !vkGetPhysicalDeviceProperties2 )
- vkGetPhysicalDeviceProperties2 = vkGetPhysicalDeviceProperties2KHR;
- vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR =
- PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR" ) );
vkGetPhysicalDeviceQueueFamilyProperties = PFN_vkGetPhysicalDeviceQueueFamilyProperties(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties" ) );
- vkGetPhysicalDeviceQueueFamilyProperties2 = PFN_vkGetPhysicalDeviceQueueFamilyProperties2(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2" ) );
- vkGetPhysicalDeviceQueueFamilyProperties2KHR = PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR" ) );
- if ( !vkGetPhysicalDeviceQueueFamilyProperties2 )
- vkGetPhysicalDeviceQueueFamilyProperties2 = vkGetPhysicalDeviceQueueFamilyProperties2KHR;
-#if defined( VK_USE_PLATFORM_SCREEN_QNX )
- vkGetPhysicalDeviceScreenPresentationSupportQNX = PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceScreenPresentationSupportQNX" ) );
-#endif /*VK_USE_PLATFORM_SCREEN_QNX*/
+ vkGetPhysicalDeviceMemoryProperties = PFN_vkGetPhysicalDeviceMemoryProperties(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties" ) );
+ vkGetInstanceProcAddr = PFN_vkGetInstanceProcAddr( vkGetInstanceProcAddr( instance, "vkGetInstanceProcAddr" ) );
+ vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr" ) );
+ vkCreateDevice = PFN_vkCreateDevice( vkGetInstanceProcAddr( instance, "vkCreateDevice" ) );
+ vkDestroyDevice = PFN_vkDestroyDevice( vkGetInstanceProcAddr( instance, "vkDestroyDevice" ) );
+ vkEnumerateDeviceExtensionProperties = PFN_vkEnumerateDeviceExtensionProperties(
+ vkGetInstanceProcAddr( instance, "vkEnumerateDeviceExtensionProperties" ) );
+ vkEnumerateDeviceLayerProperties =
+ PFN_vkEnumerateDeviceLayerProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceLayerProperties" ) );
+ vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetInstanceProcAddr( instance, "vkGetDeviceQueue" ) );
+ vkQueueSubmit = PFN_vkQueueSubmit( vkGetInstanceProcAddr( instance, "vkQueueSubmit" ) );
+ vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetInstanceProcAddr( instance, "vkQueueWaitIdle" ) );
+ vkDeviceWaitIdle = PFN_vkDeviceWaitIdle( vkGetInstanceProcAddr( instance, "vkDeviceWaitIdle" ) );
+ vkAllocateMemory = PFN_vkAllocateMemory( vkGetInstanceProcAddr( instance, "vkAllocateMemory" ) );
+ vkFreeMemory = PFN_vkFreeMemory( vkGetInstanceProcAddr( instance, "vkFreeMemory" ) );
+ vkMapMemory = PFN_vkMapMemory( vkGetInstanceProcAddr( instance, "vkMapMemory" ) );
+ vkUnmapMemory = PFN_vkUnmapMemory( vkGetInstanceProcAddr( instance, "vkUnmapMemory" ) );
+ vkFlushMappedMemoryRanges =
+ PFN_vkFlushMappedMemoryRanges( vkGetInstanceProcAddr( instance, "vkFlushMappedMemoryRanges" ) );
+ vkInvalidateMappedMemoryRanges =
+ PFN_vkInvalidateMappedMemoryRanges( vkGetInstanceProcAddr( instance, "vkInvalidateMappedMemoryRanges" ) );
+ vkGetDeviceMemoryCommitment =
+ PFN_vkGetDeviceMemoryCommitment( vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryCommitment" ) );
+ vkBindBufferMemory = PFN_vkBindBufferMemory( vkGetInstanceProcAddr( instance, "vkBindBufferMemory" ) );
+ vkBindImageMemory = PFN_vkBindImageMemory( vkGetInstanceProcAddr( instance, "vkBindImageMemory" ) );
+ vkGetBufferMemoryRequirements =
+ PFN_vkGetBufferMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements" ) );
+ vkGetImageMemoryRequirements =
+ PFN_vkGetImageMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetImageMemoryRequirements" ) );
+ vkGetImageSparseMemoryRequirements = PFN_vkGetImageSparseMemoryRequirements(
+ vkGetInstanceProcAddr( instance, "vkGetImageSparseMemoryRequirements" ) );
vkGetPhysicalDeviceSparseImageFormatProperties = PFN_vkGetPhysicalDeviceSparseImageFormatProperties(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties" ) );
+ vkQueueBindSparse = PFN_vkQueueBindSparse( vkGetInstanceProcAddr( instance, "vkQueueBindSparse" ) );
+ vkCreateFence = PFN_vkCreateFence( vkGetInstanceProcAddr( instance, "vkCreateFence" ) );
+ vkDestroyFence = PFN_vkDestroyFence( vkGetInstanceProcAddr( instance, "vkDestroyFence" ) );
+ vkResetFences = PFN_vkResetFences( vkGetInstanceProcAddr( instance, "vkResetFences" ) );
+ vkGetFenceStatus = PFN_vkGetFenceStatus( vkGetInstanceProcAddr( instance, "vkGetFenceStatus" ) );
+ vkWaitForFences = PFN_vkWaitForFences( vkGetInstanceProcAddr( instance, "vkWaitForFences" ) );
+ vkCreateSemaphore = PFN_vkCreateSemaphore( vkGetInstanceProcAddr( instance, "vkCreateSemaphore" ) );
+ vkDestroySemaphore = PFN_vkDestroySemaphore( vkGetInstanceProcAddr( instance, "vkDestroySemaphore" ) );
+ vkCreateEvent = PFN_vkCreateEvent( vkGetInstanceProcAddr( instance, "vkCreateEvent" ) );
+ vkDestroyEvent = PFN_vkDestroyEvent( vkGetInstanceProcAddr( instance, "vkDestroyEvent" ) );
+ vkGetEventStatus = PFN_vkGetEventStatus( vkGetInstanceProcAddr( instance, "vkGetEventStatus" ) );
+ vkSetEvent = PFN_vkSetEvent( vkGetInstanceProcAddr( instance, "vkSetEvent" ) );
+ vkResetEvent = PFN_vkResetEvent( vkGetInstanceProcAddr( instance, "vkResetEvent" ) );
+ vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetInstanceProcAddr( instance, "vkCreateQueryPool" ) );
+ vkDestroyQueryPool = PFN_vkDestroyQueryPool( vkGetInstanceProcAddr( instance, "vkDestroyQueryPool" ) );
+ vkGetQueryPoolResults = PFN_vkGetQueryPoolResults( vkGetInstanceProcAddr( instance, "vkGetQueryPoolResults" ) );
+ vkCreateBuffer = PFN_vkCreateBuffer( vkGetInstanceProcAddr( instance, "vkCreateBuffer" ) );
+ vkDestroyBuffer = PFN_vkDestroyBuffer( vkGetInstanceProcAddr( instance, "vkDestroyBuffer" ) );
+ vkCreateBufferView = PFN_vkCreateBufferView( vkGetInstanceProcAddr( instance, "vkCreateBufferView" ) );
+ vkDestroyBufferView = PFN_vkDestroyBufferView( vkGetInstanceProcAddr( instance, "vkDestroyBufferView" ) );
+ vkCreateImage = PFN_vkCreateImage( vkGetInstanceProcAddr( instance, "vkCreateImage" ) );
+ vkDestroyImage = PFN_vkDestroyImage( vkGetInstanceProcAddr( instance, "vkDestroyImage" ) );
+ vkGetImageSubresourceLayout =
+ PFN_vkGetImageSubresourceLayout( vkGetInstanceProcAddr( instance, "vkGetImageSubresourceLayout" ) );
+ vkCreateImageView = PFN_vkCreateImageView( vkGetInstanceProcAddr( instance, "vkCreateImageView" ) );
+ vkDestroyImageView = PFN_vkDestroyImageView( vkGetInstanceProcAddr( instance, "vkDestroyImageView" ) );
+ vkCreateShaderModule = PFN_vkCreateShaderModule( vkGetInstanceProcAddr( instance, "vkCreateShaderModule" ) );
+ vkDestroyShaderModule = PFN_vkDestroyShaderModule( vkGetInstanceProcAddr( instance, "vkDestroyShaderModule" ) );
+ vkCreatePipelineCache = PFN_vkCreatePipelineCache( vkGetInstanceProcAddr( instance, "vkCreatePipelineCache" ) );
+ vkDestroyPipelineCache =
+ PFN_vkDestroyPipelineCache( vkGetInstanceProcAddr( instance, "vkDestroyPipelineCache" ) );
+ vkGetPipelineCacheData =
+ PFN_vkGetPipelineCacheData( vkGetInstanceProcAddr( instance, "vkGetPipelineCacheData" ) );
+ vkMergePipelineCaches = PFN_vkMergePipelineCaches( vkGetInstanceProcAddr( instance, "vkMergePipelineCaches" ) );
+ vkCreateGraphicsPipelines =
+ PFN_vkCreateGraphicsPipelines( vkGetInstanceProcAddr( instance, "vkCreateGraphicsPipelines" ) );
+ vkCreateComputePipelines =
+ PFN_vkCreateComputePipelines( vkGetInstanceProcAddr( instance, "vkCreateComputePipelines" ) );
+ vkDestroyPipeline = PFN_vkDestroyPipeline( vkGetInstanceProcAddr( instance, "vkDestroyPipeline" ) );
+ vkCreatePipelineLayout =
+ PFN_vkCreatePipelineLayout( vkGetInstanceProcAddr( instance, "vkCreatePipelineLayout" ) );
+ vkDestroyPipelineLayout =
+ PFN_vkDestroyPipelineLayout( vkGetInstanceProcAddr( instance, "vkDestroyPipelineLayout" ) );
+ vkCreateSampler = PFN_vkCreateSampler( vkGetInstanceProcAddr( instance, "vkCreateSampler" ) );
+ vkDestroySampler = PFN_vkDestroySampler( vkGetInstanceProcAddr( instance, "vkDestroySampler" ) );
+ vkCreateDescriptorSetLayout =
+ PFN_vkCreateDescriptorSetLayout( vkGetInstanceProcAddr( instance, "vkCreateDescriptorSetLayout" ) );
+ vkDestroyDescriptorSetLayout =
+ PFN_vkDestroyDescriptorSetLayout( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorSetLayout" ) );
+ vkCreateDescriptorPool =
+ PFN_vkCreateDescriptorPool( vkGetInstanceProcAddr( instance, "vkCreateDescriptorPool" ) );
+ vkDestroyDescriptorPool =
+ PFN_vkDestroyDescriptorPool( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorPool" ) );
+ vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetInstanceProcAddr( instance, "vkResetDescriptorPool" ) );
+ vkAllocateDescriptorSets =
+ PFN_vkAllocateDescriptorSets( vkGetInstanceProcAddr( instance, "vkAllocateDescriptorSets" ) );
+ vkFreeDescriptorSets = PFN_vkFreeDescriptorSets( vkGetInstanceProcAddr( instance, "vkFreeDescriptorSets" ) );
+ vkUpdateDescriptorSets =
+ PFN_vkUpdateDescriptorSets( vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSets" ) );
+ vkCreateFramebuffer = PFN_vkCreateFramebuffer( vkGetInstanceProcAddr( instance, "vkCreateFramebuffer" ) );
+ vkDestroyFramebuffer = PFN_vkDestroyFramebuffer( vkGetInstanceProcAddr( instance, "vkDestroyFramebuffer" ) );
+ vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetInstanceProcAddr( instance, "vkCreateRenderPass" ) );
+ vkDestroyRenderPass = PFN_vkDestroyRenderPass( vkGetInstanceProcAddr( instance, "vkDestroyRenderPass" ) );
+ vkGetRenderAreaGranularity =
+ PFN_vkGetRenderAreaGranularity( vkGetInstanceProcAddr( instance, "vkGetRenderAreaGranularity" ) );
+ vkCreateCommandPool = PFN_vkCreateCommandPool( vkGetInstanceProcAddr( instance, "vkCreateCommandPool" ) );
+ vkDestroyCommandPool = PFN_vkDestroyCommandPool( vkGetInstanceProcAddr( instance, "vkDestroyCommandPool" ) );
+ vkResetCommandPool = PFN_vkResetCommandPool( vkGetInstanceProcAddr( instance, "vkResetCommandPool" ) );
+ vkAllocateCommandBuffers =
+ PFN_vkAllocateCommandBuffers( vkGetInstanceProcAddr( instance, "vkAllocateCommandBuffers" ) );
+ vkFreeCommandBuffers = PFN_vkFreeCommandBuffers( vkGetInstanceProcAddr( instance, "vkFreeCommandBuffers" ) );
+ vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetInstanceProcAddr( instance, "vkBeginCommandBuffer" ) );
+ vkEndCommandBuffer = PFN_vkEndCommandBuffer( vkGetInstanceProcAddr( instance, "vkEndCommandBuffer" ) );
+ vkResetCommandBuffer = PFN_vkResetCommandBuffer( vkGetInstanceProcAddr( instance, "vkResetCommandBuffer" ) );
+ vkCmdBindPipeline = PFN_vkCmdBindPipeline( vkGetInstanceProcAddr( instance, "vkCmdBindPipeline" ) );
+ vkCmdSetViewport = PFN_vkCmdSetViewport( vkGetInstanceProcAddr( instance, "vkCmdSetViewport" ) );
+ vkCmdSetScissor = PFN_vkCmdSetScissor( vkGetInstanceProcAddr( instance, "vkCmdSetScissor" ) );
+ vkCmdSetLineWidth = PFN_vkCmdSetLineWidth( vkGetInstanceProcAddr( instance, "vkCmdSetLineWidth" ) );
+ vkCmdSetDepthBias = PFN_vkCmdSetDepthBias( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBias" ) );
+ vkCmdSetBlendConstants =
+ PFN_vkCmdSetBlendConstants( vkGetInstanceProcAddr( instance, "vkCmdSetBlendConstants" ) );
+ vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBounds" ) );
+ vkCmdSetStencilCompareMask =
+ PFN_vkCmdSetStencilCompareMask( vkGetInstanceProcAddr( instance, "vkCmdSetStencilCompareMask" ) );
+ vkCmdSetStencilWriteMask =
+ PFN_vkCmdSetStencilWriteMask( vkGetInstanceProcAddr( instance, "vkCmdSetStencilWriteMask" ) );
+ vkCmdSetStencilReference =
+ PFN_vkCmdSetStencilReference( vkGetInstanceProcAddr( instance, "vkCmdSetStencilReference" ) );
+ vkCmdBindDescriptorSets =
+ PFN_vkCmdBindDescriptorSets( vkGetInstanceProcAddr( instance, "vkCmdBindDescriptorSets" ) );
+ vkCmdBindIndexBuffer = PFN_vkCmdBindIndexBuffer( vkGetInstanceProcAddr( instance, "vkCmdBindIndexBuffer" ) );
+ vkCmdBindVertexBuffers =
+ PFN_vkCmdBindVertexBuffers( vkGetInstanceProcAddr( instance, "vkCmdBindVertexBuffers" ) );
+ vkCmdDraw = PFN_vkCmdDraw( vkGetInstanceProcAddr( instance, "vkCmdDraw" ) );
+ vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexed" ) );
+ vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirect" ) );
+ vkCmdDrawIndexedIndirect =
+ PFN_vkCmdDrawIndexedIndirect( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirect" ) );
+ vkCmdDispatch = PFN_vkCmdDispatch( vkGetInstanceProcAddr( instance, "vkCmdDispatch" ) );
+ vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect( vkGetInstanceProcAddr( instance, "vkCmdDispatchIndirect" ) );
+ vkCmdCopyBuffer = PFN_vkCmdCopyBuffer( vkGetInstanceProcAddr( instance, "vkCmdCopyBuffer" ) );
+ vkCmdCopyImage = PFN_vkCmdCopyImage( vkGetInstanceProcAddr( instance, "vkCmdCopyImage" ) );
+ vkCmdBlitImage = PFN_vkCmdBlitImage( vkGetInstanceProcAddr( instance, "vkCmdBlitImage" ) );
+ vkCmdCopyBufferToImage =
+ PFN_vkCmdCopyBufferToImage( vkGetInstanceProcAddr( instance, "vkCmdCopyBufferToImage" ) );
+ vkCmdCopyImageToBuffer =
+ PFN_vkCmdCopyImageToBuffer( vkGetInstanceProcAddr( instance, "vkCmdCopyImageToBuffer" ) );
+ vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer( vkGetInstanceProcAddr( instance, "vkCmdUpdateBuffer" ) );
+ vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetInstanceProcAddr( instance, "vkCmdFillBuffer" ) );
+ vkCmdClearColorImage = PFN_vkCmdClearColorImage( vkGetInstanceProcAddr( instance, "vkCmdClearColorImage" ) );
+ vkCmdClearDepthStencilImage =
+ PFN_vkCmdClearDepthStencilImage( vkGetInstanceProcAddr( instance, "vkCmdClearDepthStencilImage" ) );
+ vkCmdClearAttachments = PFN_vkCmdClearAttachments( vkGetInstanceProcAddr( instance, "vkCmdClearAttachments" ) );
+ vkCmdResolveImage = PFN_vkCmdResolveImage( vkGetInstanceProcAddr( instance, "vkCmdResolveImage" ) );
+ vkCmdSetEvent = PFN_vkCmdSetEvent( vkGetInstanceProcAddr( instance, "vkCmdSetEvent" ) );
+ vkCmdResetEvent = PFN_vkCmdResetEvent( vkGetInstanceProcAddr( instance, "vkCmdResetEvent" ) );
+ vkCmdWaitEvents = PFN_vkCmdWaitEvents( vkGetInstanceProcAddr( instance, "vkCmdWaitEvents" ) );
+ vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetInstanceProcAddr( instance, "vkCmdPipelineBarrier" ) );
+ vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetInstanceProcAddr( instance, "vkCmdBeginQuery" ) );
+ vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetInstanceProcAddr( instance, "vkCmdEndQuery" ) );
+ vkCmdResetQueryPool = PFN_vkCmdResetQueryPool( vkGetInstanceProcAddr( instance, "vkCmdResetQueryPool" ) );
+ vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp( vkGetInstanceProcAddr( instance, "vkCmdWriteTimestamp" ) );
+ vkCmdCopyQueryPoolResults =
+ PFN_vkCmdCopyQueryPoolResults( vkGetInstanceProcAddr( instance, "vkCmdCopyQueryPoolResults" ) );
+ vkCmdPushConstants = PFN_vkCmdPushConstants( vkGetInstanceProcAddr( instance, "vkCmdPushConstants" ) );
+ vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass" ) );
+ vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass" ) );
+ vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass" ) );
+ vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetInstanceProcAddr( instance, "vkCmdExecuteCommands" ) );
+
+ //=== VK_VERSION_1_1 ===
+ vkBindBufferMemory2 = PFN_vkBindBufferMemory2( vkGetInstanceProcAddr( instance, "vkBindBufferMemory2" ) );
+ vkBindImageMemory2 = PFN_vkBindImageMemory2( vkGetInstanceProcAddr( instance, "vkBindImageMemory2" ) );
+ vkGetDeviceGroupPeerMemoryFeatures = PFN_vkGetDeviceGroupPeerMemoryFeatures(
+ vkGetInstanceProcAddr( instance, "vkGetDeviceGroupPeerMemoryFeatures" ) );
+ vkCmdSetDeviceMask = PFN_vkCmdSetDeviceMask( vkGetInstanceProcAddr( instance, "vkCmdSetDeviceMask" ) );
+ vkCmdDispatchBase = PFN_vkCmdDispatchBase( vkGetInstanceProcAddr( instance, "vkCmdDispatchBase" ) );
+ vkEnumeratePhysicalDeviceGroups =
+ PFN_vkEnumeratePhysicalDeviceGroups( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroups" ) );
+ vkGetImageMemoryRequirements2 =
+ PFN_vkGetImageMemoryRequirements2( vkGetInstanceProcAddr( instance, "vkGetImageMemoryRequirements2" ) );
+ vkGetBufferMemoryRequirements2 =
+ PFN_vkGetBufferMemoryRequirements2( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements2" ) );
+ vkGetImageSparseMemoryRequirements2 = PFN_vkGetImageSparseMemoryRequirements2(
+ vkGetInstanceProcAddr( instance, "vkGetImageSparseMemoryRequirements2" ) );
+ vkGetPhysicalDeviceFeatures2 =
+ PFN_vkGetPhysicalDeviceFeatures2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2" ) );
+ vkGetPhysicalDeviceProperties2 =
+ PFN_vkGetPhysicalDeviceProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2" ) );
+ vkGetPhysicalDeviceFormatProperties2 = PFN_vkGetPhysicalDeviceFormatProperties2(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2" ) );
+ vkGetPhysicalDeviceImageFormatProperties2 = PFN_vkGetPhysicalDeviceImageFormatProperties2(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2" ) );
+ vkGetPhysicalDeviceQueueFamilyProperties2 = PFN_vkGetPhysicalDeviceQueueFamilyProperties2(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2" ) );
+ vkGetPhysicalDeviceMemoryProperties2 = PFN_vkGetPhysicalDeviceMemoryProperties2(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2" ) );
vkGetPhysicalDeviceSparseImageFormatProperties2 = PFN_vkGetPhysicalDeviceSparseImageFormatProperties2(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2" ) );
- vkGetPhysicalDeviceSparseImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR" ) );
- if ( !vkGetPhysicalDeviceSparseImageFormatProperties2 )
- vkGetPhysicalDeviceSparseImageFormatProperties2 = vkGetPhysicalDeviceSparseImageFormatProperties2KHR;
- vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV =
- PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV" ) );
- vkGetPhysicalDeviceSurfaceCapabilities2EXT = PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT" ) );
- vkGetPhysicalDeviceSurfaceCapabilities2KHR = PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR" ) );
+ vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetInstanceProcAddr( instance, "vkTrimCommandPool" ) );
+ vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetInstanceProcAddr( instance, "vkGetDeviceQueue2" ) );
+ vkCreateSamplerYcbcrConversion =
+ PFN_vkCreateSamplerYcbcrConversion( vkGetInstanceProcAddr( instance, "vkCreateSamplerYcbcrConversion" ) );
+ vkDestroySamplerYcbcrConversion =
+ PFN_vkDestroySamplerYcbcrConversion( vkGetInstanceProcAddr( instance, "vkDestroySamplerYcbcrConversion" ) );
+ vkCreateDescriptorUpdateTemplate =
+ PFN_vkCreateDescriptorUpdateTemplate( vkGetInstanceProcAddr( instance, "vkCreateDescriptorUpdateTemplate" ) );
+ vkDestroyDescriptorUpdateTemplate =
+ PFN_vkDestroyDescriptorUpdateTemplate( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorUpdateTemplate" ) );
+ vkUpdateDescriptorSetWithTemplate =
+ PFN_vkUpdateDescriptorSetWithTemplate( vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSetWithTemplate" ) );
+ vkGetPhysicalDeviceExternalBufferProperties = PFN_vkGetPhysicalDeviceExternalBufferProperties(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferProperties" ) );
+ vkGetPhysicalDeviceExternalFenceProperties = PFN_vkGetPhysicalDeviceExternalFenceProperties(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFenceProperties" ) );
+ vkGetPhysicalDeviceExternalSemaphoreProperties = PFN_vkGetPhysicalDeviceExternalSemaphoreProperties(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphoreProperties" ) );
+ vkGetDescriptorSetLayoutSupport =
+ PFN_vkGetDescriptorSetLayoutSupport( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutSupport" ) );
+
+ //=== VK_VERSION_1_2 ===
+ vkCmdDrawIndirectCount =
+ PFN_vkCmdDrawIndirectCount( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCount" ) );
+ vkCmdDrawIndexedIndirectCount =
+ PFN_vkCmdDrawIndexedIndirectCount( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCount" ) );
+ vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetInstanceProcAddr( instance, "vkCreateRenderPass2" ) );
+ vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass2" ) );
+ vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass2" ) );
+ vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass2" ) );
+ vkResetQueryPool = PFN_vkResetQueryPool( vkGetInstanceProcAddr( instance, "vkResetQueryPool" ) );
+ vkGetSemaphoreCounterValue =
+ PFN_vkGetSemaphoreCounterValue( vkGetInstanceProcAddr( instance, "vkGetSemaphoreCounterValue" ) );
+ vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetInstanceProcAddr( instance, "vkWaitSemaphores" ) );
+ vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetInstanceProcAddr( instance, "vkSignalSemaphore" ) );
+ vkGetBufferDeviceAddress =
+ PFN_vkGetBufferDeviceAddress( vkGetInstanceProcAddr( instance, "vkGetBufferDeviceAddress" ) );
+ vkGetBufferOpaqueCaptureAddress =
+ PFN_vkGetBufferOpaqueCaptureAddress( vkGetInstanceProcAddr( instance, "vkGetBufferOpaqueCaptureAddress" ) );
+ vkGetDeviceMemoryOpaqueCaptureAddress = PFN_vkGetDeviceMemoryOpaqueCaptureAddress(
+ vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryOpaqueCaptureAddress" ) );
+
+ //=== VK_KHR_surface ===
+ vkDestroySurfaceKHR = PFN_vkDestroySurfaceKHR( vkGetInstanceProcAddr( instance, "vkDestroySurfaceKHR" ) );
+ vkGetPhysicalDeviceSurfaceSupportKHR = PFN_vkGetPhysicalDeviceSurfaceSupportKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceSupportKHR" ) );
vkGetPhysicalDeviceSurfaceCapabilitiesKHR = PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR" ) );
- vkGetPhysicalDeviceSurfaceFormats2KHR = PFN_vkGetPhysicalDeviceSurfaceFormats2KHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceFormats2KHR" ) );
vkGetPhysicalDeviceSurfaceFormatsKHR = PFN_vkGetPhysicalDeviceSurfaceFormatsKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceFormatsKHR" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetPhysicalDeviceSurfacePresentModes2EXT = PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
vkGetPhysicalDeviceSurfacePresentModesKHR = PFN_vkGetPhysicalDeviceSurfacePresentModesKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModesKHR" ) );
- vkGetPhysicalDeviceSurfaceSupportKHR = PFN_vkGetPhysicalDeviceSurfaceSupportKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceSupportKHR" ) );
- vkGetPhysicalDeviceToolPropertiesEXT = PFN_vkGetPhysicalDeviceToolPropertiesEXT(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceToolPropertiesEXT" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkGetPhysicalDeviceVideoCapabilitiesKHR = PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoCapabilitiesKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkGetPhysicalDeviceVideoFormatPropertiesKHR = PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoFormatPropertiesKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_KHR_swapchain ===
+ vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR( vkGetInstanceProcAddr( instance, "vkCreateSwapchainKHR" ) );
+ vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR( vkGetInstanceProcAddr( instance, "vkDestroySwapchainKHR" ) );
+ vkGetSwapchainImagesKHR =
+ PFN_vkGetSwapchainImagesKHR( vkGetInstanceProcAddr( instance, "vkGetSwapchainImagesKHR" ) );
+ vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetInstanceProcAddr( instance, "vkAcquireNextImageKHR" ) );
+ vkQueuePresentKHR = PFN_vkQueuePresentKHR( vkGetInstanceProcAddr( instance, "vkQueuePresentKHR" ) );
+ vkGetDeviceGroupPresentCapabilitiesKHR = PFN_vkGetDeviceGroupPresentCapabilitiesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetDeviceGroupPresentCapabilitiesKHR" ) );
+ vkGetDeviceGroupSurfacePresentModesKHR = PFN_vkGetDeviceGroupSurfacePresentModesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetDeviceGroupSurfacePresentModesKHR" ) );
+ vkGetPhysicalDevicePresentRectanglesKHR = PFN_vkGetPhysicalDevicePresentRectanglesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDevicePresentRectanglesKHR" ) );
+ vkAcquireNextImage2KHR =
+ PFN_vkAcquireNextImage2KHR( vkGetInstanceProcAddr( instance, "vkAcquireNextImage2KHR" ) );
+
+ //=== VK_KHR_display ===
+ vkGetPhysicalDeviceDisplayPropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPropertiesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPropertiesKHR" ) );
+ vkGetPhysicalDeviceDisplayPlanePropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR" ) );
+ vkGetDisplayPlaneSupportedDisplaysKHR = PFN_vkGetDisplayPlaneSupportedDisplaysKHR(
+ vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneSupportedDisplaysKHR" ) );
+ vkGetDisplayModePropertiesKHR =
+ PFN_vkGetDisplayModePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModePropertiesKHR" ) );
+ vkCreateDisplayModeKHR =
+ PFN_vkCreateDisplayModeKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayModeKHR" ) );
+ vkGetDisplayPlaneCapabilitiesKHR =
+ PFN_vkGetDisplayPlaneCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilitiesKHR" ) );
+ vkCreateDisplayPlaneSurfaceKHR =
+ PFN_vkCreateDisplayPlaneSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayPlaneSurfaceKHR" ) );
+
+ //=== VK_KHR_display_swapchain ===
+ vkCreateSharedSwapchainsKHR =
+ PFN_vkCreateSharedSwapchainsKHR( vkGetInstanceProcAddr( instance, "vkCreateSharedSwapchainsKHR" ) );
+
+#if defined( VK_USE_PLATFORM_XLIB_KHR )
+ //=== VK_KHR_xlib_surface ===
+ vkCreateXlibSurfaceKHR =
+ PFN_vkCreateXlibSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXlibSurfaceKHR" ) );
+ vkGetPhysicalDeviceXlibPresentationSupportKHR = PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR" ) );
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+
+#if defined( VK_USE_PLATFORM_XCB_KHR )
+ //=== VK_KHR_xcb_surface ===
+ vkCreateXcbSurfaceKHR = PFN_vkCreateXcbSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXcbSurfaceKHR" ) );
+ vkGetPhysicalDeviceXcbPresentationSupportKHR = PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR" ) );
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+
#if defined( VK_USE_PLATFORM_WAYLAND_KHR )
+ //=== VK_KHR_wayland_surface ===
+ vkCreateWaylandSurfaceKHR =
+ PFN_vkCreateWaylandSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWaylandSurfaceKHR" ) );
vkGetPhysicalDeviceWaylandPresentationSupportKHR = PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR" ) );
#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+#if defined( VK_USE_PLATFORM_ANDROID_KHR )
+ //=== VK_KHR_android_surface ===
+ vkCreateAndroidSurfaceKHR =
+ PFN_vkCreateAndroidSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" ) );
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_win32_surface ===
+ vkCreateWin32SurfaceKHR =
+ PFN_vkCreateWin32SurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWin32SurfaceKHR" ) );
vkGetPhysicalDeviceWin32PresentationSupportKHR = PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR" ) );
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_XCB_KHR )
- vkGetPhysicalDeviceXcbPresentationSupportKHR = PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR" ) );
-#endif /*VK_USE_PLATFORM_XCB_KHR*/
-#if defined( VK_USE_PLATFORM_XLIB_KHR )
- vkGetPhysicalDeviceXlibPresentationSupportKHR = PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR" ) );
-#endif /*VK_USE_PLATFORM_XLIB_KHR*/
-#if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT )
- vkGetRandROutputDisplayEXT =
- PFN_vkGetRandROutputDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetRandROutputDisplayEXT" ) );
-#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetWinrtDisplayNV = PFN_vkGetWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkGetWinrtDisplayNV" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkReleaseDisplayEXT = PFN_vkReleaseDisplayEXT( vkGetInstanceProcAddr( instance, "vkReleaseDisplayEXT" ) );
- vkSubmitDebugUtilsMessageEXT =
- PFN_vkSubmitDebugUtilsMessageEXT( vkGetInstanceProcAddr( instance, "vkSubmitDebugUtilsMessageEXT" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkAcquireFullScreenExclusiveModeEXT = PFN_vkAcquireFullScreenExclusiveModeEXT(
- vkGetInstanceProcAddr( instance, "vkAcquireFullScreenExclusiveModeEXT" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkAcquireNextImage2KHR =
- PFN_vkAcquireNextImage2KHR( vkGetInstanceProcAddr( instance, "vkAcquireNextImage2KHR" ) );
- vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetInstanceProcAddr( instance, "vkAcquireNextImageKHR" ) );
- vkAcquirePerformanceConfigurationINTEL = PFN_vkAcquirePerformanceConfigurationINTEL(
- vkGetInstanceProcAddr( instance, "vkAcquirePerformanceConfigurationINTEL" ) );
- vkAcquireProfilingLockKHR =
- PFN_vkAcquireProfilingLockKHR( vkGetInstanceProcAddr( instance, "vkAcquireProfilingLockKHR" ) );
- vkAllocateCommandBuffers =
- PFN_vkAllocateCommandBuffers( vkGetInstanceProcAddr( instance, "vkAllocateCommandBuffers" ) );
- vkAllocateDescriptorSets =
- PFN_vkAllocateDescriptorSets( vkGetInstanceProcAddr( instance, "vkAllocateDescriptorSets" ) );
- vkAllocateMemory = PFN_vkAllocateMemory( vkGetInstanceProcAddr( instance, "vkAllocateMemory" ) );
- vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetInstanceProcAddr( instance, "vkBeginCommandBuffer" ) );
- vkBindAccelerationStructureMemoryNV = PFN_vkBindAccelerationStructureMemoryNV(
- vkGetInstanceProcAddr( instance, "vkBindAccelerationStructureMemoryNV" ) );
- vkBindBufferMemory = PFN_vkBindBufferMemory( vkGetInstanceProcAddr( instance, "vkBindBufferMemory" ) );
- vkBindBufferMemory2 = PFN_vkBindBufferMemory2( vkGetInstanceProcAddr( instance, "vkBindBufferMemory2" ) );
- vkBindBufferMemory2KHR =
- PFN_vkBindBufferMemory2KHR( vkGetInstanceProcAddr( instance, "vkBindBufferMemory2KHR" ) );
- if ( !vkBindBufferMemory2 )
- vkBindBufferMemory2 = vkBindBufferMemory2KHR;
- vkBindImageMemory = PFN_vkBindImageMemory( vkGetInstanceProcAddr( instance, "vkBindImageMemory" ) );
- vkBindImageMemory2 = PFN_vkBindImageMemory2( vkGetInstanceProcAddr( instance, "vkBindImageMemory2" ) );
- vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR( vkGetInstanceProcAddr( instance, "vkBindImageMemory2KHR" ) );
- if ( !vkBindImageMemory2 )
- vkBindImageMemory2 = vkBindImageMemory2KHR;
+
+ //=== VK_EXT_debug_report ===
+ vkCreateDebugReportCallbackEXT =
+ PFN_vkCreateDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugReportCallbackEXT" ) );
+ vkDestroyDebugReportCallbackEXT =
+ PFN_vkDestroyDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugReportCallbackEXT" ) );
+ vkDebugReportMessageEXT =
+ PFN_vkDebugReportMessageEXT( vkGetInstanceProcAddr( instance, "vkDebugReportMessageEXT" ) );
+
+ //=== VK_EXT_debug_marker ===
+ vkDebugMarkerSetObjectTagEXT =
+ PFN_vkDebugMarkerSetObjectTagEXT( vkGetInstanceProcAddr( instance, "vkDebugMarkerSetObjectTagEXT" ) );
+ vkDebugMarkerSetObjectNameEXT =
+ PFN_vkDebugMarkerSetObjectNameEXT( vkGetInstanceProcAddr( instance, "vkDebugMarkerSetObjectNameEXT" ) );
+ vkCmdDebugMarkerBeginEXT =
+ PFN_vkCmdDebugMarkerBeginEXT( vkGetInstanceProcAddr( instance, "vkCmdDebugMarkerBeginEXT" ) );
+ vkCmdDebugMarkerEndEXT =
+ PFN_vkCmdDebugMarkerEndEXT( vkGetInstanceProcAddr( instance, "vkCmdDebugMarkerEndEXT" ) );
+ vkCmdDebugMarkerInsertEXT =
+ PFN_vkCmdDebugMarkerInsertEXT( vkGetInstanceProcAddr( instance, "vkCmdDebugMarkerInsertEXT" ) );
+
#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_queue ===
+ vkGetPhysicalDeviceVideoCapabilitiesKHR = PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoCapabilitiesKHR" ) );
+ vkGetPhysicalDeviceVideoFormatPropertiesKHR = PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoFormatPropertiesKHR" ) );
+ vkCreateVideoSessionKHR =
+ PFN_vkCreateVideoSessionKHR( vkGetInstanceProcAddr( instance, "vkCreateVideoSessionKHR" ) );
+ vkDestroyVideoSessionKHR =
+ PFN_vkDestroyVideoSessionKHR( vkGetInstanceProcAddr( instance, "vkDestroyVideoSessionKHR" ) );
+ vkGetVideoSessionMemoryRequirementsKHR = PFN_vkGetVideoSessionMemoryRequirementsKHR(
+ vkGetInstanceProcAddr( instance, "vkGetVideoSessionMemoryRequirementsKHR" ) );
vkBindVideoSessionMemoryKHR =
PFN_vkBindVideoSessionMemoryKHR( vkGetInstanceProcAddr( instance, "vkBindVideoSessionMemoryKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkBuildAccelerationStructuresKHR =
- PFN_vkBuildAccelerationStructuresKHR( vkGetInstanceProcAddr( instance, "vkBuildAccelerationStructuresKHR" ) );
- vkCmdBeginConditionalRenderingEXT =
- PFN_vkCmdBeginConditionalRenderingEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginConditionalRenderingEXT" ) );
- vkCmdBeginDebugUtilsLabelEXT =
- PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginDebugUtilsLabelEXT" ) );
- vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetInstanceProcAddr( instance, "vkCmdBeginQuery" ) );
- vkCmdBeginQueryIndexedEXT =
- PFN_vkCmdBeginQueryIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginQueryIndexedEXT" ) );
- vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass" ) );
- vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass2" ) );
- vkCmdBeginRenderPass2KHR =
- PFN_vkCmdBeginRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass2KHR" ) );
- if ( !vkCmdBeginRenderPass2 )
- vkCmdBeginRenderPass2 = vkCmdBeginRenderPass2KHR;
- vkCmdBeginTransformFeedbackEXT =
- PFN_vkCmdBeginTransformFeedbackEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginTransformFeedbackEXT" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ vkCreateVideoSessionParametersKHR =
+ PFN_vkCreateVideoSessionParametersKHR( vkGetInstanceProcAddr( instance, "vkCreateVideoSessionParametersKHR" ) );
+ vkUpdateVideoSessionParametersKHR =
+ PFN_vkUpdateVideoSessionParametersKHR( vkGetInstanceProcAddr( instance, "vkUpdateVideoSessionParametersKHR" ) );
+ vkDestroyVideoSessionParametersKHR = PFN_vkDestroyVideoSessionParametersKHR(
+ vkGetInstanceProcAddr( instance, "vkDestroyVideoSessionParametersKHR" ) );
vkCmdBeginVideoCodingKHR =
PFN_vkCmdBeginVideoCodingKHR( vkGetInstanceProcAddr( instance, "vkCmdBeginVideoCodingKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkCmdBindDescriptorSets =
- PFN_vkCmdBindDescriptorSets( vkGetInstanceProcAddr( instance, "vkCmdBindDescriptorSets" ) );
- vkCmdBindIndexBuffer = PFN_vkCmdBindIndexBuffer( vkGetInstanceProcAddr( instance, "vkCmdBindIndexBuffer" ) );
- vkCmdBindPipeline = PFN_vkCmdBindPipeline( vkGetInstanceProcAddr( instance, "vkCmdBindPipeline" ) );
- vkCmdBindPipelineShaderGroupNV =
- PFN_vkCmdBindPipelineShaderGroupNV( vkGetInstanceProcAddr( instance, "vkCmdBindPipelineShaderGroupNV" ) );
- vkCmdBindShadingRateImageNV =
- PFN_vkCmdBindShadingRateImageNV( vkGetInstanceProcAddr( instance, "vkCmdBindShadingRateImageNV" ) );
- vkCmdBindTransformFeedbackBuffersEXT = PFN_vkCmdBindTransformFeedbackBuffersEXT(
- vkGetInstanceProcAddr( instance, "vkCmdBindTransformFeedbackBuffersEXT" ) );
- vkCmdBindVertexBuffers =
- PFN_vkCmdBindVertexBuffers( vkGetInstanceProcAddr( instance, "vkCmdBindVertexBuffers" ) );
- vkCmdBindVertexBuffers2EXT =
- PFN_vkCmdBindVertexBuffers2EXT( vkGetInstanceProcAddr( instance, "vkCmdBindVertexBuffers2EXT" ) );
- vkCmdBlitImage = PFN_vkCmdBlitImage( vkGetInstanceProcAddr( instance, "vkCmdBlitImage" ) );
- vkCmdBlitImage2KHR = PFN_vkCmdBlitImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdBlitImage2KHR" ) );
- vkCmdBuildAccelerationStructureNV =
- PFN_vkCmdBuildAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkCmdBuildAccelerationStructureNV" ) );
- vkCmdBuildAccelerationStructuresIndirectKHR = PFN_vkCmdBuildAccelerationStructuresIndirectKHR(
- vkGetInstanceProcAddr( instance, "vkCmdBuildAccelerationStructuresIndirectKHR" ) );
- vkCmdBuildAccelerationStructuresKHR = PFN_vkCmdBuildAccelerationStructuresKHR(
- vkGetInstanceProcAddr( instance, "vkCmdBuildAccelerationStructuresKHR" ) );
- vkCmdClearAttachments = PFN_vkCmdClearAttachments( vkGetInstanceProcAddr( instance, "vkCmdClearAttachments" ) );
- vkCmdClearColorImage = PFN_vkCmdClearColorImage( vkGetInstanceProcAddr( instance, "vkCmdClearColorImage" ) );
- vkCmdClearDepthStencilImage =
- PFN_vkCmdClearDepthStencilImage( vkGetInstanceProcAddr( instance, "vkCmdClearDepthStencilImage" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ vkCmdEndVideoCodingKHR =
+ PFN_vkCmdEndVideoCodingKHR( vkGetInstanceProcAddr( instance, "vkCmdEndVideoCodingKHR" ) );
vkCmdControlVideoCodingKHR =
PFN_vkCmdControlVideoCodingKHR( vkGetInstanceProcAddr( instance, "vkCmdControlVideoCodingKHR" ) );
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkCmdCopyAccelerationStructureKHR =
- PFN_vkCmdCopyAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCmdCopyAccelerationStructureKHR" ) );
- vkCmdCopyAccelerationStructureNV =
- PFN_vkCmdCopyAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkCmdCopyAccelerationStructureNV" ) );
- vkCmdCopyAccelerationStructureToMemoryKHR = PFN_vkCmdCopyAccelerationStructureToMemoryKHR(
- vkGetInstanceProcAddr( instance, "vkCmdCopyAccelerationStructureToMemoryKHR" ) );
- vkCmdCopyBuffer = PFN_vkCmdCopyBuffer( vkGetInstanceProcAddr( instance, "vkCmdCopyBuffer" ) );
- vkCmdCopyBuffer2KHR = PFN_vkCmdCopyBuffer2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyBuffer2KHR" ) );
- vkCmdCopyBufferToImage =
- PFN_vkCmdCopyBufferToImage( vkGetInstanceProcAddr( instance, "vkCmdCopyBufferToImage" ) );
- vkCmdCopyBufferToImage2KHR =
- PFN_vkCmdCopyBufferToImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyBufferToImage2KHR" ) );
- vkCmdCopyImage = PFN_vkCmdCopyImage( vkGetInstanceProcAddr( instance, "vkCmdCopyImage" ) );
- vkCmdCopyImage2KHR = PFN_vkCmdCopyImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyImage2KHR" ) );
- vkCmdCopyImageToBuffer =
- PFN_vkCmdCopyImageToBuffer( vkGetInstanceProcAddr( instance, "vkCmdCopyImageToBuffer" ) );
- vkCmdCopyImageToBuffer2KHR =
- PFN_vkCmdCopyImageToBuffer2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyImageToBuffer2KHR" ) );
- vkCmdCopyMemoryToAccelerationStructureKHR = PFN_vkCmdCopyMemoryToAccelerationStructureKHR(
- vkGetInstanceProcAddr( instance, "vkCmdCopyMemoryToAccelerationStructureKHR" ) );
- vkCmdCopyQueryPoolResults =
- PFN_vkCmdCopyQueryPoolResults( vkGetInstanceProcAddr( instance, "vkCmdCopyQueryPoolResults" ) );
- vkCmdCuLaunchKernelNVX =
- PFN_vkCmdCuLaunchKernelNVX( vkGetInstanceProcAddr( instance, "vkCmdCuLaunchKernelNVX" ) );
- vkCmdDebugMarkerBeginEXT =
- PFN_vkCmdDebugMarkerBeginEXT( vkGetInstanceProcAddr( instance, "vkCmdDebugMarkerBeginEXT" ) );
- vkCmdDebugMarkerEndEXT =
- PFN_vkCmdDebugMarkerEndEXT( vkGetInstanceProcAddr( instance, "vkCmdDebugMarkerEndEXT" ) );
- vkCmdDebugMarkerInsertEXT =
- PFN_vkCmdDebugMarkerInsertEXT( vkGetInstanceProcAddr( instance, "vkCmdDebugMarkerInsertEXT" ) );
+
#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_decode_queue ===
vkCmdDecodeVideoKHR = PFN_vkCmdDecodeVideoKHR( vkGetInstanceProcAddr( instance, "vkCmdDecodeVideoKHR" ) );
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkCmdDispatch = PFN_vkCmdDispatch( vkGetInstanceProcAddr( instance, "vkCmdDispatch" ) );
- vkCmdDispatchBase = PFN_vkCmdDispatchBase( vkGetInstanceProcAddr( instance, "vkCmdDispatchBase" ) );
- vkCmdDispatchBaseKHR = PFN_vkCmdDispatchBaseKHR( vkGetInstanceProcAddr( instance, "vkCmdDispatchBaseKHR" ) );
- if ( !vkCmdDispatchBase )
- vkCmdDispatchBase = vkCmdDispatchBaseKHR;
- vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect( vkGetInstanceProcAddr( instance, "vkCmdDispatchIndirect" ) );
- vkCmdDraw = PFN_vkCmdDraw( vkGetInstanceProcAddr( instance, "vkCmdDraw" ) );
- vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexed" ) );
- vkCmdDrawIndexedIndirect =
- PFN_vkCmdDrawIndexedIndirect( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirect" ) );
- vkCmdDrawIndexedIndirectCount =
- PFN_vkCmdDrawIndexedIndirectCount( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCount" ) );
- vkCmdDrawIndexedIndirectCountAMD =
- PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCountAMD" ) );
- if ( !vkCmdDrawIndexedIndirectCount )
- vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountAMD;
- vkCmdDrawIndexedIndirectCountKHR =
- PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCountKHR" ) );
- if ( !vkCmdDrawIndexedIndirectCount )
- vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountKHR;
- vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirect" ) );
+
+ //=== VK_EXT_transform_feedback ===
+ vkCmdBindTransformFeedbackBuffersEXT = PFN_vkCmdBindTransformFeedbackBuffersEXT(
+ vkGetInstanceProcAddr( instance, "vkCmdBindTransformFeedbackBuffersEXT" ) );
+ vkCmdBeginTransformFeedbackEXT =
+ PFN_vkCmdBeginTransformFeedbackEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginTransformFeedbackEXT" ) );
+ vkCmdEndTransformFeedbackEXT =
+ PFN_vkCmdEndTransformFeedbackEXT( vkGetInstanceProcAddr( instance, "vkCmdEndTransformFeedbackEXT" ) );
+ vkCmdBeginQueryIndexedEXT =
+ PFN_vkCmdBeginQueryIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginQueryIndexedEXT" ) );
+ vkCmdEndQueryIndexedEXT =
+ PFN_vkCmdEndQueryIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdEndQueryIndexedEXT" ) );
vkCmdDrawIndirectByteCountEXT =
PFN_vkCmdDrawIndirectByteCountEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectByteCountEXT" ) );
- vkCmdDrawIndirectCount =
- PFN_vkCmdDrawIndirectCount( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCount" ) );
+
+ //=== VK_NVX_binary_import ===
+ vkCreateCuModuleNVX = PFN_vkCreateCuModuleNVX( vkGetInstanceProcAddr( instance, "vkCreateCuModuleNVX" ) );
+ vkCreateCuFunctionNVX = PFN_vkCreateCuFunctionNVX( vkGetInstanceProcAddr( instance, "vkCreateCuFunctionNVX" ) );
+ vkDestroyCuModuleNVX = PFN_vkDestroyCuModuleNVX( vkGetInstanceProcAddr( instance, "vkDestroyCuModuleNVX" ) );
+ vkDestroyCuFunctionNVX =
+ PFN_vkDestroyCuFunctionNVX( vkGetInstanceProcAddr( instance, "vkDestroyCuFunctionNVX" ) );
+ vkCmdCuLaunchKernelNVX =
+ PFN_vkCmdCuLaunchKernelNVX( vkGetInstanceProcAddr( instance, "vkCmdCuLaunchKernelNVX" ) );
+
+ //=== VK_NVX_image_view_handle ===
+ vkGetImageViewHandleNVX =
+ PFN_vkGetImageViewHandleNVX( vkGetInstanceProcAddr( instance, "vkGetImageViewHandleNVX" ) );
+ vkGetImageViewAddressNVX =
+ PFN_vkGetImageViewAddressNVX( vkGetInstanceProcAddr( instance, "vkGetImageViewAddressNVX" ) );
+
+ //=== VK_AMD_draw_indirect_count ===
vkCmdDrawIndirectCountAMD =
PFN_vkCmdDrawIndirectCountAMD( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCountAMD" ) );
if ( !vkCmdDrawIndirectCount )
vkCmdDrawIndirectCount = vkCmdDrawIndirectCountAMD;
- vkCmdDrawIndirectCountKHR =
- PFN_vkCmdDrawIndirectCountKHR( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCountKHR" ) );
- if ( !vkCmdDrawIndirectCount )
- vkCmdDrawIndirectCount = vkCmdDrawIndirectCountKHR;
- vkCmdDrawMeshTasksIndirectCountNV =
- PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksIndirectCountNV" ) );
- vkCmdDrawMeshTasksIndirectNV =
- PFN_vkCmdDrawMeshTasksIndirectNV( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksIndirectNV" ) );
- vkCmdDrawMeshTasksNV = PFN_vkCmdDrawMeshTasksNV( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksNV" ) );
- vkCmdDrawMultiEXT = PFN_vkCmdDrawMultiEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMultiEXT" ) );
- vkCmdDrawMultiIndexedEXT =
- PFN_vkCmdDrawMultiIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMultiIndexedEXT" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCmdEncodeVideoKHR = PFN_vkCmdEncodeVideoKHR( vkGetInstanceProcAddr( instance, "vkCmdEncodeVideoKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+ vkCmdDrawIndexedIndirectCountAMD =
+ PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCountAMD" ) );
+ if ( !vkCmdDrawIndexedIndirectCount )
+ vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountAMD;
+
+ //=== VK_AMD_shader_info ===
+ vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD( vkGetInstanceProcAddr( instance, "vkGetShaderInfoAMD" ) );
+
+#if defined( VK_USE_PLATFORM_GGP )
+ //=== VK_GGP_stream_descriptor_surface ===
+ vkCreateStreamDescriptorSurfaceGGP = PFN_vkCreateStreamDescriptorSurfaceGGP(
+ vkGetInstanceProcAddr( instance, "vkCreateStreamDescriptorSurfaceGGP" ) );
+#endif /*VK_USE_PLATFORM_GGP*/
+
+ //=== VK_NV_external_memory_capabilities ===
+ vkGetPhysicalDeviceExternalImageFormatPropertiesNV = PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV" ) );
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_NV_external_memory_win32 ===
+ vkGetMemoryWin32HandleNV =
+ PFN_vkGetMemoryWin32HandleNV( vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandleNV" ) );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_get_physical_device_properties2 ===
+ vkGetPhysicalDeviceFeatures2KHR =
+ PFN_vkGetPhysicalDeviceFeatures2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2KHR" ) );
+ if ( !vkGetPhysicalDeviceFeatures2 )
+ vkGetPhysicalDeviceFeatures2 = vkGetPhysicalDeviceFeatures2KHR;
+ vkGetPhysicalDeviceProperties2KHR =
+ PFN_vkGetPhysicalDeviceProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2KHR" ) );
+ if ( !vkGetPhysicalDeviceProperties2 )
+ vkGetPhysicalDeviceProperties2 = vkGetPhysicalDeviceProperties2KHR;
+ vkGetPhysicalDeviceFormatProperties2KHR = PFN_vkGetPhysicalDeviceFormatProperties2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2KHR" ) );
+ if ( !vkGetPhysicalDeviceFormatProperties2 )
+ vkGetPhysicalDeviceFormatProperties2 = vkGetPhysicalDeviceFormatProperties2KHR;
+ vkGetPhysicalDeviceImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceImageFormatProperties2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2KHR" ) );
+ if ( !vkGetPhysicalDeviceImageFormatProperties2 )
+ vkGetPhysicalDeviceImageFormatProperties2 = vkGetPhysicalDeviceImageFormatProperties2KHR;
+ vkGetPhysicalDeviceQueueFamilyProperties2KHR = PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR" ) );
+ if ( !vkGetPhysicalDeviceQueueFamilyProperties2 )
+ vkGetPhysicalDeviceQueueFamilyProperties2 = vkGetPhysicalDeviceQueueFamilyProperties2KHR;
+ vkGetPhysicalDeviceMemoryProperties2KHR = PFN_vkGetPhysicalDeviceMemoryProperties2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2KHR" ) );
+ if ( !vkGetPhysicalDeviceMemoryProperties2 )
+ vkGetPhysicalDeviceMemoryProperties2 = vkGetPhysicalDeviceMemoryProperties2KHR;
+ vkGetPhysicalDeviceSparseImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR" ) );
+ if ( !vkGetPhysicalDeviceSparseImageFormatProperties2 )
+ vkGetPhysicalDeviceSparseImageFormatProperties2 = vkGetPhysicalDeviceSparseImageFormatProperties2KHR;
+
+ //=== VK_KHR_device_group ===
+ vkGetDeviceGroupPeerMemoryFeaturesKHR = PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetDeviceGroupPeerMemoryFeaturesKHR" ) );
+ if ( !vkGetDeviceGroupPeerMemoryFeatures )
+ vkGetDeviceGroupPeerMemoryFeatures = vkGetDeviceGroupPeerMemoryFeaturesKHR;
+ vkCmdSetDeviceMaskKHR = PFN_vkCmdSetDeviceMaskKHR( vkGetInstanceProcAddr( instance, "vkCmdSetDeviceMaskKHR" ) );
+ if ( !vkCmdSetDeviceMask )
+ vkCmdSetDeviceMask = vkCmdSetDeviceMaskKHR;
+ vkCmdDispatchBaseKHR = PFN_vkCmdDispatchBaseKHR( vkGetInstanceProcAddr( instance, "vkCmdDispatchBaseKHR" ) );
+ if ( !vkCmdDispatchBase )
+ vkCmdDispatchBase = vkCmdDispatchBaseKHR;
+
+#if defined( VK_USE_PLATFORM_VI_NN )
+ //=== VK_NN_vi_surface ===
+ vkCreateViSurfaceNN = PFN_vkCreateViSurfaceNN( vkGetInstanceProcAddr( instance, "vkCreateViSurfaceNN" ) );
+#endif /*VK_USE_PLATFORM_VI_NN*/
+
+ //=== VK_KHR_maintenance1 ===
+ vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetInstanceProcAddr( instance, "vkTrimCommandPoolKHR" ) );
+ if ( !vkTrimCommandPool )
+ vkTrimCommandPool = vkTrimCommandPoolKHR;
+
+ //=== VK_KHR_device_group_creation ===
+ vkEnumeratePhysicalDeviceGroupsKHR = PFN_vkEnumeratePhysicalDeviceGroupsKHR(
+ vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroupsKHR" ) );
+ if ( !vkEnumeratePhysicalDeviceGroups )
+ vkEnumeratePhysicalDeviceGroups = vkEnumeratePhysicalDeviceGroupsKHR;
+
+ //=== VK_KHR_external_memory_capabilities ===
+ vkGetPhysicalDeviceExternalBufferPropertiesKHR = PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR" ) );
+ if ( !vkGetPhysicalDeviceExternalBufferProperties )
+ vkGetPhysicalDeviceExternalBufferProperties = vkGetPhysicalDeviceExternalBufferPropertiesKHR;
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_memory_win32 ===
+ vkGetMemoryWin32HandleKHR =
+ PFN_vkGetMemoryWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandleKHR" ) );
+ vkGetMemoryWin32HandlePropertiesKHR = PFN_vkGetMemoryWin32HandlePropertiesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandlePropertiesKHR" ) );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_external_memory_fd ===
+ vkGetMemoryFdKHR = PFN_vkGetMemoryFdKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryFdKHR" ) );
+ vkGetMemoryFdPropertiesKHR =
+ PFN_vkGetMemoryFdPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryFdPropertiesKHR" ) );
+
+ //=== VK_KHR_external_semaphore_capabilities ===
+ vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR" ) );
+ if ( !vkGetPhysicalDeviceExternalSemaphoreProperties )
+ vkGetPhysicalDeviceExternalSemaphoreProperties = vkGetPhysicalDeviceExternalSemaphorePropertiesKHR;
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_semaphore_win32 ===
+ vkImportSemaphoreWin32HandleKHR =
+ PFN_vkImportSemaphoreWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkImportSemaphoreWin32HandleKHR" ) );
+ vkGetSemaphoreWin32HandleKHR =
+ PFN_vkGetSemaphoreWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreWin32HandleKHR" ) );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_external_semaphore_fd ===
+ vkImportSemaphoreFdKHR =
+ PFN_vkImportSemaphoreFdKHR( vkGetInstanceProcAddr( instance, "vkImportSemaphoreFdKHR" ) );
+ vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreFdKHR" ) );
+
+ //=== VK_KHR_push_descriptor ===
+ vkCmdPushDescriptorSetKHR =
+ PFN_vkCmdPushDescriptorSetKHR( vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSetKHR" ) );
+ vkCmdPushDescriptorSetWithTemplateKHR = PFN_vkCmdPushDescriptorSetWithTemplateKHR(
+ vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSetWithTemplateKHR" ) );
+
+ //=== VK_EXT_conditional_rendering ===
+ vkCmdBeginConditionalRenderingEXT =
+ PFN_vkCmdBeginConditionalRenderingEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginConditionalRenderingEXT" ) );
vkCmdEndConditionalRenderingEXT =
PFN_vkCmdEndConditionalRenderingEXT( vkGetInstanceProcAddr( instance, "vkCmdEndConditionalRenderingEXT" ) );
- vkCmdEndDebugUtilsLabelEXT =
- PFN_vkCmdEndDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkCmdEndDebugUtilsLabelEXT" ) );
- vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetInstanceProcAddr( instance, "vkCmdEndQuery" ) );
- vkCmdEndQueryIndexedEXT =
- PFN_vkCmdEndQueryIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdEndQueryIndexedEXT" ) );
- vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass" ) );
- vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass2" ) );
+
+ //=== VK_KHR_descriptor_update_template ===
+ vkCreateDescriptorUpdateTemplateKHR = PFN_vkCreateDescriptorUpdateTemplateKHR(
+ vkGetInstanceProcAddr( instance, "vkCreateDescriptorUpdateTemplateKHR" ) );
+ if ( !vkCreateDescriptorUpdateTemplate )
+ vkCreateDescriptorUpdateTemplate = vkCreateDescriptorUpdateTemplateKHR;
+ vkDestroyDescriptorUpdateTemplateKHR = PFN_vkDestroyDescriptorUpdateTemplateKHR(
+ vkGetInstanceProcAddr( instance, "vkDestroyDescriptorUpdateTemplateKHR" ) );
+ if ( !vkDestroyDescriptorUpdateTemplate )
+ vkDestroyDescriptorUpdateTemplate = vkDestroyDescriptorUpdateTemplateKHR;
+ vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR(
+ vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSetWithTemplateKHR" ) );
+ if ( !vkUpdateDescriptorSetWithTemplate )
+ vkUpdateDescriptorSetWithTemplate = vkUpdateDescriptorSetWithTemplateKHR;
+
+ //=== VK_NV_clip_space_w_scaling ===
+ vkCmdSetViewportWScalingNV =
+ PFN_vkCmdSetViewportWScalingNV( vkGetInstanceProcAddr( instance, "vkCmdSetViewportWScalingNV" ) );
+
+ //=== VK_EXT_direct_mode_display ===
+ vkReleaseDisplayEXT = PFN_vkReleaseDisplayEXT( vkGetInstanceProcAddr( instance, "vkReleaseDisplayEXT" ) );
+
+#if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT )
+ //=== VK_EXT_acquire_xlib_display ===
+ vkAcquireXlibDisplayEXT =
+ PFN_vkAcquireXlibDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireXlibDisplayEXT" ) );
+ vkGetRandROutputDisplayEXT =
+ PFN_vkGetRandROutputDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetRandROutputDisplayEXT" ) );
+#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/
+
+ //=== VK_EXT_display_surface_counter ===
+ vkGetPhysicalDeviceSurfaceCapabilities2EXT = PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT" ) );
+
+ //=== VK_EXT_display_control ===
+ vkDisplayPowerControlEXT =
+ PFN_vkDisplayPowerControlEXT( vkGetInstanceProcAddr( instance, "vkDisplayPowerControlEXT" ) );
+ vkRegisterDeviceEventEXT =
+ PFN_vkRegisterDeviceEventEXT( vkGetInstanceProcAddr( instance, "vkRegisterDeviceEventEXT" ) );
+ vkRegisterDisplayEventEXT =
+ PFN_vkRegisterDisplayEventEXT( vkGetInstanceProcAddr( instance, "vkRegisterDisplayEventEXT" ) );
+ vkGetSwapchainCounterEXT =
+ PFN_vkGetSwapchainCounterEXT( vkGetInstanceProcAddr( instance, "vkGetSwapchainCounterEXT" ) );
+
+ //=== VK_GOOGLE_display_timing ===
+ vkGetRefreshCycleDurationGOOGLE =
+ PFN_vkGetRefreshCycleDurationGOOGLE( vkGetInstanceProcAddr( instance, "vkGetRefreshCycleDurationGOOGLE" ) );
+ vkGetPastPresentationTimingGOOGLE =
+ PFN_vkGetPastPresentationTimingGOOGLE( vkGetInstanceProcAddr( instance, "vkGetPastPresentationTimingGOOGLE" ) );
+
+ //=== VK_EXT_discard_rectangles ===
+ vkCmdSetDiscardRectangleEXT =
+ PFN_vkCmdSetDiscardRectangleEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDiscardRectangleEXT" ) );
+
+ //=== VK_EXT_hdr_metadata ===
+ vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetInstanceProcAddr( instance, "vkSetHdrMetadataEXT" ) );
+
+ //=== VK_KHR_create_renderpass2 ===
+ vkCreateRenderPass2KHR =
+ PFN_vkCreateRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCreateRenderPass2KHR" ) );
+ if ( !vkCreateRenderPass2 )
+ vkCreateRenderPass2 = vkCreateRenderPass2KHR;
+ vkCmdBeginRenderPass2KHR =
+ PFN_vkCmdBeginRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass2KHR" ) );
+ if ( !vkCmdBeginRenderPass2 )
+ vkCmdBeginRenderPass2 = vkCmdBeginRenderPass2KHR;
+ vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass2KHR" ) );
+ if ( !vkCmdNextSubpass2 )
+ vkCmdNextSubpass2 = vkCmdNextSubpass2KHR;
vkCmdEndRenderPass2KHR =
PFN_vkCmdEndRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass2KHR" ) );
if ( !vkCmdEndRenderPass2 )
vkCmdEndRenderPass2 = vkCmdEndRenderPass2KHR;
- vkCmdEndTransformFeedbackEXT =
- PFN_vkCmdEndTransformFeedbackEXT( vkGetInstanceProcAddr( instance, "vkCmdEndTransformFeedbackEXT" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCmdEndVideoCodingKHR =
- PFN_vkCmdEndVideoCodingKHR( vkGetInstanceProcAddr( instance, "vkCmdEndVideoCodingKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetInstanceProcAddr( instance, "vkCmdExecuteCommands" ) );
- vkCmdExecuteGeneratedCommandsNV =
- PFN_vkCmdExecuteGeneratedCommandsNV( vkGetInstanceProcAddr( instance, "vkCmdExecuteGeneratedCommandsNV" ) );
- vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetInstanceProcAddr( instance, "vkCmdFillBuffer" ) );
+
+ //=== VK_KHR_shared_presentable_image ===
+ vkGetSwapchainStatusKHR =
+ PFN_vkGetSwapchainStatusKHR( vkGetInstanceProcAddr( instance, "vkGetSwapchainStatusKHR" ) );
+
+ //=== VK_KHR_external_fence_capabilities ===
+ vkGetPhysicalDeviceExternalFencePropertiesKHR = PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR" ) );
+ if ( !vkGetPhysicalDeviceExternalFenceProperties )
+ vkGetPhysicalDeviceExternalFenceProperties = vkGetPhysicalDeviceExternalFencePropertiesKHR;
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_fence_win32 ===
+ vkImportFenceWin32HandleKHR =
+ PFN_vkImportFenceWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkImportFenceWin32HandleKHR" ) );
+ vkGetFenceWin32HandleKHR =
+ PFN_vkGetFenceWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkGetFenceWin32HandleKHR" ) );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_external_fence_fd ===
+ vkImportFenceFdKHR = PFN_vkImportFenceFdKHR( vkGetInstanceProcAddr( instance, "vkImportFenceFdKHR" ) );
+ vkGetFenceFdKHR = PFN_vkGetFenceFdKHR( vkGetInstanceProcAddr( instance, "vkGetFenceFdKHR" ) );
+
+ //=== VK_KHR_performance_query ===
+ vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR =
+ PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
+ vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR" ) );
+ vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR =
+ PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR" ) );
+ vkAcquireProfilingLockKHR =
+ PFN_vkAcquireProfilingLockKHR( vkGetInstanceProcAddr( instance, "vkAcquireProfilingLockKHR" ) );
+ vkReleaseProfilingLockKHR =
+ PFN_vkReleaseProfilingLockKHR( vkGetInstanceProcAddr( instance, "vkReleaseProfilingLockKHR" ) );
+
+ //=== VK_KHR_get_surface_capabilities2 ===
+ vkGetPhysicalDeviceSurfaceCapabilities2KHR = PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR" ) );
+ vkGetPhysicalDeviceSurfaceFormats2KHR = PFN_vkGetPhysicalDeviceSurfaceFormats2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceFormats2KHR" ) );
+
+ //=== VK_KHR_get_display_properties2 ===
+ vkGetPhysicalDeviceDisplayProperties2KHR = PFN_vkGetPhysicalDeviceDisplayProperties2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayProperties2KHR" ) );
+ vkGetPhysicalDeviceDisplayPlaneProperties2KHR = PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR" ) );
+ vkGetDisplayModeProperties2KHR =
+ PFN_vkGetDisplayModeProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModeProperties2KHR" ) );
+ vkGetDisplayPlaneCapabilities2KHR =
+ PFN_vkGetDisplayPlaneCapabilities2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilities2KHR" ) );
+
+#if defined( VK_USE_PLATFORM_IOS_MVK )
+ //=== VK_MVK_ios_surface ===
+ vkCreateIOSSurfaceMVK = PFN_vkCreateIOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateIOSSurfaceMVK" ) );
+#endif /*VK_USE_PLATFORM_IOS_MVK*/
+
+#if defined( VK_USE_PLATFORM_MACOS_MVK )
+ //=== VK_MVK_macos_surface ===
+ vkCreateMacOSSurfaceMVK =
+ PFN_vkCreateMacOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateMacOSSurfaceMVK" ) );
+#endif /*VK_USE_PLATFORM_MACOS_MVK*/
+
+ //=== VK_EXT_debug_utils ===
+ vkSetDebugUtilsObjectNameEXT =
+ PFN_vkSetDebugUtilsObjectNameEXT( vkGetInstanceProcAddr( instance, "vkSetDebugUtilsObjectNameEXT" ) );
+ vkSetDebugUtilsObjectTagEXT =
+ PFN_vkSetDebugUtilsObjectTagEXT( vkGetInstanceProcAddr( instance, "vkSetDebugUtilsObjectTagEXT" ) );
+ vkQueueBeginDebugUtilsLabelEXT =
+ PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkQueueBeginDebugUtilsLabelEXT" ) );
+ vkQueueEndDebugUtilsLabelEXT =
+ PFN_vkQueueEndDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkQueueEndDebugUtilsLabelEXT" ) );
+ vkQueueInsertDebugUtilsLabelEXT =
+ PFN_vkQueueInsertDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkQueueInsertDebugUtilsLabelEXT" ) );
+ vkCmdBeginDebugUtilsLabelEXT =
+ PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginDebugUtilsLabelEXT" ) );
+ vkCmdEndDebugUtilsLabelEXT =
+ PFN_vkCmdEndDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkCmdEndDebugUtilsLabelEXT" ) );
vkCmdInsertDebugUtilsLabelEXT =
PFN_vkCmdInsertDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkCmdInsertDebugUtilsLabelEXT" ) );
- vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass" ) );
- vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass2" ) );
- vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass2KHR" ) );
- if ( !vkCmdNextSubpass2 )
- vkCmdNextSubpass2 = vkCmdNextSubpass2KHR;
- vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetInstanceProcAddr( instance, "vkCmdPipelineBarrier" ) );
- vkCmdPipelineBarrier2KHR =
- PFN_vkCmdPipelineBarrier2KHR( vkGetInstanceProcAddr( instance, "vkCmdPipelineBarrier2KHR" ) );
- vkCmdPreprocessGeneratedCommandsNV = PFN_vkCmdPreprocessGeneratedCommandsNV(
- vkGetInstanceProcAddr( instance, "vkCmdPreprocessGeneratedCommandsNV" ) );
- vkCmdPushConstants = PFN_vkCmdPushConstants( vkGetInstanceProcAddr( instance, "vkCmdPushConstants" ) );
- vkCmdPushDescriptorSetKHR =
- PFN_vkCmdPushDescriptorSetKHR( vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSetKHR" ) );
- vkCmdPushDescriptorSetWithTemplateKHR = PFN_vkCmdPushDescriptorSetWithTemplateKHR(
- vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSetWithTemplateKHR" ) );
- vkCmdResetEvent = PFN_vkCmdResetEvent( vkGetInstanceProcAddr( instance, "vkCmdResetEvent" ) );
- vkCmdResetEvent2KHR = PFN_vkCmdResetEvent2KHR( vkGetInstanceProcAddr( instance, "vkCmdResetEvent2KHR" ) );
- vkCmdResetQueryPool = PFN_vkCmdResetQueryPool( vkGetInstanceProcAddr( instance, "vkCmdResetQueryPool" ) );
- vkCmdResolveImage = PFN_vkCmdResolveImage( vkGetInstanceProcAddr( instance, "vkCmdResolveImage" ) );
- vkCmdResolveImage2KHR = PFN_vkCmdResolveImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdResolveImage2KHR" ) );
- vkCmdSetBlendConstants =
- PFN_vkCmdSetBlendConstants( vkGetInstanceProcAddr( instance, "vkCmdSetBlendConstants" ) );
- vkCmdSetCheckpointNV = PFN_vkCmdSetCheckpointNV( vkGetInstanceProcAddr( instance, "vkCmdSetCheckpointNV" ) );
- vkCmdSetCoarseSampleOrderNV =
- PFN_vkCmdSetCoarseSampleOrderNV( vkGetInstanceProcAddr( instance, "vkCmdSetCoarseSampleOrderNV" ) );
- vkCmdSetColorWriteEnableEXT =
- PFN_vkCmdSetColorWriteEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetColorWriteEnableEXT" ) );
- vkCmdSetCullModeEXT = PFN_vkCmdSetCullModeEXT( vkGetInstanceProcAddr( instance, "vkCmdSetCullModeEXT" ) );
- vkCmdSetDepthBias = PFN_vkCmdSetDepthBias( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBias" ) );
- vkCmdSetDepthBiasEnableEXT =
- PFN_vkCmdSetDepthBiasEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBiasEnableEXT" ) );
- vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBounds" ) );
- vkCmdSetDepthBoundsTestEnableEXT =
- PFN_vkCmdSetDepthBoundsTestEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBoundsTestEnableEXT" ) );
- vkCmdSetDepthCompareOpEXT =
- PFN_vkCmdSetDepthCompareOpEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthCompareOpEXT" ) );
- vkCmdSetDepthTestEnableEXT =
- PFN_vkCmdSetDepthTestEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthTestEnableEXT" ) );
- vkCmdSetDepthWriteEnableEXT =
- PFN_vkCmdSetDepthWriteEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthWriteEnableEXT" ) );
- vkCmdSetDeviceMask = PFN_vkCmdSetDeviceMask( vkGetInstanceProcAddr( instance, "vkCmdSetDeviceMask" ) );
- vkCmdSetDeviceMaskKHR = PFN_vkCmdSetDeviceMaskKHR( vkGetInstanceProcAddr( instance, "vkCmdSetDeviceMaskKHR" ) );
- if ( !vkCmdSetDeviceMask )
- vkCmdSetDeviceMask = vkCmdSetDeviceMaskKHR;
- vkCmdSetDiscardRectangleEXT =
- PFN_vkCmdSetDiscardRectangleEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDiscardRectangleEXT" ) );
- vkCmdSetEvent = PFN_vkCmdSetEvent( vkGetInstanceProcAddr( instance, "vkCmdSetEvent" ) );
- vkCmdSetEvent2KHR = PFN_vkCmdSetEvent2KHR( vkGetInstanceProcAddr( instance, "vkCmdSetEvent2KHR" ) );
- vkCmdSetExclusiveScissorNV =
- PFN_vkCmdSetExclusiveScissorNV( vkGetInstanceProcAddr( instance, "vkCmdSetExclusiveScissorNV" ) );
- vkCmdSetFragmentShadingRateEnumNV =
- PFN_vkCmdSetFragmentShadingRateEnumNV( vkGetInstanceProcAddr( instance, "vkCmdSetFragmentShadingRateEnumNV" ) );
- vkCmdSetFragmentShadingRateKHR =
- PFN_vkCmdSetFragmentShadingRateKHR( vkGetInstanceProcAddr( instance, "vkCmdSetFragmentShadingRateKHR" ) );
- vkCmdSetFrontFaceEXT = PFN_vkCmdSetFrontFaceEXT( vkGetInstanceProcAddr( instance, "vkCmdSetFrontFaceEXT" ) );
- vkCmdSetLineStippleEXT =
- PFN_vkCmdSetLineStippleEXT( vkGetInstanceProcAddr( instance, "vkCmdSetLineStippleEXT" ) );
- vkCmdSetLineWidth = PFN_vkCmdSetLineWidth( vkGetInstanceProcAddr( instance, "vkCmdSetLineWidth" ) );
- vkCmdSetLogicOpEXT = PFN_vkCmdSetLogicOpEXT( vkGetInstanceProcAddr( instance, "vkCmdSetLogicOpEXT" ) );
- vkCmdSetPatchControlPointsEXT =
- PFN_vkCmdSetPatchControlPointsEXT( vkGetInstanceProcAddr( instance, "vkCmdSetPatchControlPointsEXT" ) );
- vkCmdSetPerformanceMarkerINTEL =
- PFN_vkCmdSetPerformanceMarkerINTEL( vkGetInstanceProcAddr( instance, "vkCmdSetPerformanceMarkerINTEL" ) );
- vkCmdSetPerformanceOverrideINTEL =
- PFN_vkCmdSetPerformanceOverrideINTEL( vkGetInstanceProcAddr( instance, "vkCmdSetPerformanceOverrideINTEL" ) );
- vkCmdSetPerformanceStreamMarkerINTEL = PFN_vkCmdSetPerformanceStreamMarkerINTEL(
- vkGetInstanceProcAddr( instance, "vkCmdSetPerformanceStreamMarkerINTEL" ) );
- vkCmdSetPrimitiveRestartEnableEXT =
- PFN_vkCmdSetPrimitiveRestartEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetPrimitiveRestartEnableEXT" ) );
- vkCmdSetPrimitiveTopologyEXT =
- PFN_vkCmdSetPrimitiveTopologyEXT( vkGetInstanceProcAddr( instance, "vkCmdSetPrimitiveTopologyEXT" ) );
- vkCmdSetRasterizerDiscardEnableEXT = PFN_vkCmdSetRasterizerDiscardEnableEXT(
- vkGetInstanceProcAddr( instance, "vkCmdSetRasterizerDiscardEnableEXT" ) );
- vkCmdSetRayTracingPipelineStackSizeKHR = PFN_vkCmdSetRayTracingPipelineStackSizeKHR(
- vkGetInstanceProcAddr( instance, "vkCmdSetRayTracingPipelineStackSizeKHR" ) );
+ vkCreateDebugUtilsMessengerEXT =
+ PFN_vkCreateDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugUtilsMessengerEXT" ) );
+ vkDestroyDebugUtilsMessengerEXT =
+ PFN_vkDestroyDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugUtilsMessengerEXT" ) );
+ vkSubmitDebugUtilsMessageEXT =
+ PFN_vkSubmitDebugUtilsMessageEXT( vkGetInstanceProcAddr( instance, "vkSubmitDebugUtilsMessageEXT" ) );
+
+#if defined( VK_USE_PLATFORM_ANDROID_KHR )
+ //=== VK_ANDROID_external_memory_android_hardware_buffer ===
+ vkGetAndroidHardwareBufferPropertiesANDROID = PFN_vkGetAndroidHardwareBufferPropertiesANDROID(
+ vkGetInstanceProcAddr( instance, "vkGetAndroidHardwareBufferPropertiesANDROID" ) );
+ vkGetMemoryAndroidHardwareBufferANDROID = PFN_vkGetMemoryAndroidHardwareBufferANDROID(
+ vkGetInstanceProcAddr( instance, "vkGetMemoryAndroidHardwareBufferANDROID" ) );
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+ //=== VK_EXT_sample_locations ===
vkCmdSetSampleLocationsEXT =
PFN_vkCmdSetSampleLocationsEXT( vkGetInstanceProcAddr( instance, "vkCmdSetSampleLocationsEXT" ) );
- vkCmdSetScissor = PFN_vkCmdSetScissor( vkGetInstanceProcAddr( instance, "vkCmdSetScissor" ) );
- vkCmdSetScissorWithCountEXT =
- PFN_vkCmdSetScissorWithCountEXT( vkGetInstanceProcAddr( instance, "vkCmdSetScissorWithCountEXT" ) );
- vkCmdSetStencilCompareMask =
- PFN_vkCmdSetStencilCompareMask( vkGetInstanceProcAddr( instance, "vkCmdSetStencilCompareMask" ) );
- vkCmdSetStencilOpEXT = PFN_vkCmdSetStencilOpEXT( vkGetInstanceProcAddr( instance, "vkCmdSetStencilOpEXT" ) );
- vkCmdSetStencilReference =
- PFN_vkCmdSetStencilReference( vkGetInstanceProcAddr( instance, "vkCmdSetStencilReference" ) );
- vkCmdSetStencilTestEnableEXT =
- PFN_vkCmdSetStencilTestEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetStencilTestEnableEXT" ) );
- vkCmdSetStencilWriteMask =
- PFN_vkCmdSetStencilWriteMask( vkGetInstanceProcAddr( instance, "vkCmdSetStencilWriteMask" ) );
- vkCmdSetVertexInputEXT =
- PFN_vkCmdSetVertexInputEXT( vkGetInstanceProcAddr( instance, "vkCmdSetVertexInputEXT" ) );
- vkCmdSetViewport = PFN_vkCmdSetViewport( vkGetInstanceProcAddr( instance, "vkCmdSetViewport" ) );
- vkCmdSetViewportShadingRatePaletteNV = PFN_vkCmdSetViewportShadingRatePaletteNV(
- vkGetInstanceProcAddr( instance, "vkCmdSetViewportShadingRatePaletteNV" ) );
- vkCmdSetViewportWScalingNV =
- PFN_vkCmdSetViewportWScalingNV( vkGetInstanceProcAddr( instance, "vkCmdSetViewportWScalingNV" ) );
- vkCmdSetViewportWithCountEXT =
- PFN_vkCmdSetViewportWithCountEXT( vkGetInstanceProcAddr( instance, "vkCmdSetViewportWithCountEXT" ) );
- vkCmdSubpassShadingHUAWEI =
- PFN_vkCmdSubpassShadingHUAWEI( vkGetInstanceProcAddr( instance, "vkCmdSubpassShadingHUAWEI" ) );
- vkCmdTraceRaysIndirectKHR =
- PFN_vkCmdTraceRaysIndirectKHR( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysIndirectKHR" ) );
- vkCmdTraceRaysKHR = PFN_vkCmdTraceRaysKHR( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysKHR" ) );
- vkCmdTraceRaysNV = PFN_vkCmdTraceRaysNV( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysNV" ) );
- vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer( vkGetInstanceProcAddr( instance, "vkCmdUpdateBuffer" ) );
- vkCmdWaitEvents = PFN_vkCmdWaitEvents( vkGetInstanceProcAddr( instance, "vkCmdWaitEvents" ) );
- vkCmdWaitEvents2KHR = PFN_vkCmdWaitEvents2KHR( vkGetInstanceProcAddr( instance, "vkCmdWaitEvents2KHR" ) );
- vkCmdWriteAccelerationStructuresPropertiesKHR = PFN_vkCmdWriteAccelerationStructuresPropertiesKHR(
- vkGetInstanceProcAddr( instance, "vkCmdWriteAccelerationStructuresPropertiesKHR" ) );
- vkCmdWriteAccelerationStructuresPropertiesNV = PFN_vkCmdWriteAccelerationStructuresPropertiesNV(
- vkGetInstanceProcAddr( instance, "vkCmdWriteAccelerationStructuresPropertiesNV" ) );
- vkCmdWriteBufferMarker2AMD =
- PFN_vkCmdWriteBufferMarker2AMD( vkGetInstanceProcAddr( instance, "vkCmdWriteBufferMarker2AMD" ) );
- vkCmdWriteBufferMarkerAMD =
- PFN_vkCmdWriteBufferMarkerAMD( vkGetInstanceProcAddr( instance, "vkCmdWriteBufferMarkerAMD" ) );
- vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp( vkGetInstanceProcAddr( instance, "vkCmdWriteTimestamp" ) );
- vkCmdWriteTimestamp2KHR =
- PFN_vkCmdWriteTimestamp2KHR( vkGetInstanceProcAddr( instance, "vkCmdWriteTimestamp2KHR" ) );
- vkCompileDeferredNV = PFN_vkCompileDeferredNV( vkGetInstanceProcAddr( instance, "vkCompileDeferredNV" ) );
+ vkGetPhysicalDeviceMultisamplePropertiesEXT = PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT" ) );
+
+ //=== VK_KHR_get_memory_requirements2 ===
+ vkGetImageMemoryRequirements2KHR =
+ PFN_vkGetImageMemoryRequirements2KHR( vkGetInstanceProcAddr( instance, "vkGetImageMemoryRequirements2KHR" ) );
+ if ( !vkGetImageMemoryRequirements2 )
+ vkGetImageMemoryRequirements2 = vkGetImageMemoryRequirements2KHR;
+ vkGetBufferMemoryRequirements2KHR =
+ PFN_vkGetBufferMemoryRequirements2KHR( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements2KHR" ) );
+ if ( !vkGetBufferMemoryRequirements2 )
+ vkGetBufferMemoryRequirements2 = vkGetBufferMemoryRequirements2KHR;
+ vkGetImageSparseMemoryRequirements2KHR = PFN_vkGetImageSparseMemoryRequirements2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetImageSparseMemoryRequirements2KHR" ) );
+ if ( !vkGetImageSparseMemoryRequirements2 )
+ vkGetImageSparseMemoryRequirements2 = vkGetImageSparseMemoryRequirements2KHR;
+
+ //=== VK_KHR_acceleration_structure ===
+ vkCreateAccelerationStructureKHR =
+ PFN_vkCreateAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCreateAccelerationStructureKHR" ) );
+ vkDestroyAccelerationStructureKHR =
+ PFN_vkDestroyAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkDestroyAccelerationStructureKHR" ) );
+ vkCmdBuildAccelerationStructuresKHR = PFN_vkCmdBuildAccelerationStructuresKHR(
+ vkGetInstanceProcAddr( instance, "vkCmdBuildAccelerationStructuresKHR" ) );
+ vkCmdBuildAccelerationStructuresIndirectKHR = PFN_vkCmdBuildAccelerationStructuresIndirectKHR(
+ vkGetInstanceProcAddr( instance, "vkCmdBuildAccelerationStructuresIndirectKHR" ) );
+ vkBuildAccelerationStructuresKHR =
+ PFN_vkBuildAccelerationStructuresKHR( vkGetInstanceProcAddr( instance, "vkBuildAccelerationStructuresKHR" ) );
vkCopyAccelerationStructureKHR =
PFN_vkCopyAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCopyAccelerationStructureKHR" ) );
vkCopyAccelerationStructureToMemoryKHR = PFN_vkCopyAccelerationStructureToMemoryKHR(
vkGetInstanceProcAddr( instance, "vkCopyAccelerationStructureToMemoryKHR" ) );
vkCopyMemoryToAccelerationStructureKHR = PFN_vkCopyMemoryToAccelerationStructureKHR(
vkGetInstanceProcAddr( instance, "vkCopyMemoryToAccelerationStructureKHR" ) );
- vkCreateAccelerationStructureKHR =
- PFN_vkCreateAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCreateAccelerationStructureKHR" ) );
- vkCreateAccelerationStructureNV =
- PFN_vkCreateAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkCreateAccelerationStructureNV" ) );
- vkCreateBuffer = PFN_vkCreateBuffer( vkGetInstanceProcAddr( instance, "vkCreateBuffer" ) );
- vkCreateBufferView = PFN_vkCreateBufferView( vkGetInstanceProcAddr( instance, "vkCreateBufferView" ) );
- vkCreateCommandPool = PFN_vkCreateCommandPool( vkGetInstanceProcAddr( instance, "vkCreateCommandPool" ) );
- vkCreateComputePipelines =
- PFN_vkCreateComputePipelines( vkGetInstanceProcAddr( instance, "vkCreateComputePipelines" ) );
- vkCreateCuFunctionNVX = PFN_vkCreateCuFunctionNVX( vkGetInstanceProcAddr( instance, "vkCreateCuFunctionNVX" ) );
- vkCreateCuModuleNVX = PFN_vkCreateCuModuleNVX( vkGetInstanceProcAddr( instance, "vkCreateCuModuleNVX" ) );
- vkCreateDeferredOperationKHR =
- PFN_vkCreateDeferredOperationKHR( vkGetInstanceProcAddr( instance, "vkCreateDeferredOperationKHR" ) );
- vkCreateDescriptorPool =
- PFN_vkCreateDescriptorPool( vkGetInstanceProcAddr( instance, "vkCreateDescriptorPool" ) );
- vkCreateDescriptorSetLayout =
- PFN_vkCreateDescriptorSetLayout( vkGetInstanceProcAddr( instance, "vkCreateDescriptorSetLayout" ) );
- vkCreateDescriptorUpdateTemplate =
- PFN_vkCreateDescriptorUpdateTemplate( vkGetInstanceProcAddr( instance, "vkCreateDescriptorUpdateTemplate" ) );
- vkCreateDescriptorUpdateTemplateKHR = PFN_vkCreateDescriptorUpdateTemplateKHR(
- vkGetInstanceProcAddr( instance, "vkCreateDescriptorUpdateTemplateKHR" ) );
- if ( !vkCreateDescriptorUpdateTemplate )
- vkCreateDescriptorUpdateTemplate = vkCreateDescriptorUpdateTemplateKHR;
- vkCreateEvent = PFN_vkCreateEvent( vkGetInstanceProcAddr( instance, "vkCreateEvent" ) );
- vkCreateFence = PFN_vkCreateFence( vkGetInstanceProcAddr( instance, "vkCreateFence" ) );
- vkCreateFramebuffer = PFN_vkCreateFramebuffer( vkGetInstanceProcAddr( instance, "vkCreateFramebuffer" ) );
- vkCreateGraphicsPipelines =
- PFN_vkCreateGraphicsPipelines( vkGetInstanceProcAddr( instance, "vkCreateGraphicsPipelines" ) );
- vkCreateImage = PFN_vkCreateImage( vkGetInstanceProcAddr( instance, "vkCreateImage" ) );
- vkCreateImageView = PFN_vkCreateImageView( vkGetInstanceProcAddr( instance, "vkCreateImageView" ) );
- vkCreateIndirectCommandsLayoutNV =
- PFN_vkCreateIndirectCommandsLayoutNV( vkGetInstanceProcAddr( instance, "vkCreateIndirectCommandsLayoutNV" ) );
- vkCreatePipelineCache = PFN_vkCreatePipelineCache( vkGetInstanceProcAddr( instance, "vkCreatePipelineCache" ) );
- vkCreatePipelineLayout =
- PFN_vkCreatePipelineLayout( vkGetInstanceProcAddr( instance, "vkCreatePipelineLayout" ) );
- vkCreatePrivateDataSlotEXT =
- PFN_vkCreatePrivateDataSlotEXT( vkGetInstanceProcAddr( instance, "vkCreatePrivateDataSlotEXT" ) );
- vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetInstanceProcAddr( instance, "vkCreateQueryPool" ) );
- vkCreateRayTracingPipelinesKHR =
- PFN_vkCreateRayTracingPipelinesKHR( vkGetInstanceProcAddr( instance, "vkCreateRayTracingPipelinesKHR" ) );
- vkCreateRayTracingPipelinesNV =
- PFN_vkCreateRayTracingPipelinesNV( vkGetInstanceProcAddr( instance, "vkCreateRayTracingPipelinesNV" ) );
- vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetInstanceProcAddr( instance, "vkCreateRenderPass" ) );
- vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetInstanceProcAddr( instance, "vkCreateRenderPass2" ) );
- vkCreateRenderPass2KHR =
- PFN_vkCreateRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCreateRenderPass2KHR" ) );
- if ( !vkCreateRenderPass2 )
- vkCreateRenderPass2 = vkCreateRenderPass2KHR;
- vkCreateSampler = PFN_vkCreateSampler( vkGetInstanceProcAddr( instance, "vkCreateSampler" ) );
- vkCreateSamplerYcbcrConversion =
- PFN_vkCreateSamplerYcbcrConversion( vkGetInstanceProcAddr( instance, "vkCreateSamplerYcbcrConversion" ) );
+ vkWriteAccelerationStructuresPropertiesKHR = PFN_vkWriteAccelerationStructuresPropertiesKHR(
+ vkGetInstanceProcAddr( instance, "vkWriteAccelerationStructuresPropertiesKHR" ) );
+ vkCmdCopyAccelerationStructureKHR =
+ PFN_vkCmdCopyAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCmdCopyAccelerationStructureKHR" ) );
+ vkCmdCopyAccelerationStructureToMemoryKHR = PFN_vkCmdCopyAccelerationStructureToMemoryKHR(
+ vkGetInstanceProcAddr( instance, "vkCmdCopyAccelerationStructureToMemoryKHR" ) );
+ vkCmdCopyMemoryToAccelerationStructureKHR = PFN_vkCmdCopyMemoryToAccelerationStructureKHR(
+ vkGetInstanceProcAddr( instance, "vkCmdCopyMemoryToAccelerationStructureKHR" ) );
+ vkGetAccelerationStructureDeviceAddressKHR = PFN_vkGetAccelerationStructureDeviceAddressKHR(
+ vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureDeviceAddressKHR" ) );
+ vkCmdWriteAccelerationStructuresPropertiesKHR = PFN_vkCmdWriteAccelerationStructuresPropertiesKHR(
+ vkGetInstanceProcAddr( instance, "vkCmdWriteAccelerationStructuresPropertiesKHR" ) );
+ vkGetDeviceAccelerationStructureCompatibilityKHR = PFN_vkGetDeviceAccelerationStructureCompatibilityKHR(
+ vkGetInstanceProcAddr( instance, "vkGetDeviceAccelerationStructureCompatibilityKHR" ) );
+ vkGetAccelerationStructureBuildSizesKHR = PFN_vkGetAccelerationStructureBuildSizesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureBuildSizesKHR" ) );
+
+ //=== VK_KHR_sampler_ycbcr_conversion ===
vkCreateSamplerYcbcrConversionKHR =
PFN_vkCreateSamplerYcbcrConversionKHR( vkGetInstanceProcAddr( instance, "vkCreateSamplerYcbcrConversionKHR" ) );
if ( !vkCreateSamplerYcbcrConversion )
vkCreateSamplerYcbcrConversion = vkCreateSamplerYcbcrConversionKHR;
- vkCreateSemaphore = PFN_vkCreateSemaphore( vkGetInstanceProcAddr( instance, "vkCreateSemaphore" ) );
- vkCreateShaderModule = PFN_vkCreateShaderModule( vkGetInstanceProcAddr( instance, "vkCreateShaderModule" ) );
- vkCreateSharedSwapchainsKHR =
- PFN_vkCreateSharedSwapchainsKHR( vkGetInstanceProcAddr( instance, "vkCreateSharedSwapchainsKHR" ) );
- vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR( vkGetInstanceProcAddr( instance, "vkCreateSwapchainKHR" ) );
- vkCreateValidationCacheEXT =
- PFN_vkCreateValidationCacheEXT( vkGetInstanceProcAddr( instance, "vkCreateValidationCacheEXT" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCreateVideoSessionKHR =
- PFN_vkCreateVideoSessionKHR( vkGetInstanceProcAddr( instance, "vkCreateVideoSessionKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCreateVideoSessionParametersKHR =
- PFN_vkCreateVideoSessionParametersKHR( vkGetInstanceProcAddr( instance, "vkCreateVideoSessionParametersKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkDebugMarkerSetObjectNameEXT =
- PFN_vkDebugMarkerSetObjectNameEXT( vkGetInstanceProcAddr( instance, "vkDebugMarkerSetObjectNameEXT" ) );
- vkDebugMarkerSetObjectTagEXT =
- PFN_vkDebugMarkerSetObjectTagEXT( vkGetInstanceProcAddr( instance, "vkDebugMarkerSetObjectTagEXT" ) );
- vkDeferredOperationJoinKHR =
- PFN_vkDeferredOperationJoinKHR( vkGetInstanceProcAddr( instance, "vkDeferredOperationJoinKHR" ) );
- vkDestroyAccelerationStructureKHR =
- PFN_vkDestroyAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkDestroyAccelerationStructureKHR" ) );
- vkDestroyAccelerationStructureNV =
- PFN_vkDestroyAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkDestroyAccelerationStructureNV" ) );
- vkDestroyBuffer = PFN_vkDestroyBuffer( vkGetInstanceProcAddr( instance, "vkDestroyBuffer" ) );
- vkDestroyBufferView = PFN_vkDestroyBufferView( vkGetInstanceProcAddr( instance, "vkDestroyBufferView" ) );
- vkDestroyCommandPool = PFN_vkDestroyCommandPool( vkGetInstanceProcAddr( instance, "vkDestroyCommandPool" ) );
- vkDestroyCuFunctionNVX =
- PFN_vkDestroyCuFunctionNVX( vkGetInstanceProcAddr( instance, "vkDestroyCuFunctionNVX" ) );
- vkDestroyCuModuleNVX = PFN_vkDestroyCuModuleNVX( vkGetInstanceProcAddr( instance, "vkDestroyCuModuleNVX" ) );
- vkDestroyDeferredOperationKHR =
- PFN_vkDestroyDeferredOperationKHR( vkGetInstanceProcAddr( instance, "vkDestroyDeferredOperationKHR" ) );
- vkDestroyDescriptorPool =
- PFN_vkDestroyDescriptorPool( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorPool" ) );
- vkDestroyDescriptorSetLayout =
- PFN_vkDestroyDescriptorSetLayout( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorSetLayout" ) );
- vkDestroyDescriptorUpdateTemplate =
- PFN_vkDestroyDescriptorUpdateTemplate( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorUpdateTemplate" ) );
- vkDestroyDescriptorUpdateTemplateKHR = PFN_vkDestroyDescriptorUpdateTemplateKHR(
- vkGetInstanceProcAddr( instance, "vkDestroyDescriptorUpdateTemplateKHR" ) );
- if ( !vkDestroyDescriptorUpdateTemplate )
- vkDestroyDescriptorUpdateTemplate = vkDestroyDescriptorUpdateTemplateKHR;
- vkDestroyDevice = PFN_vkDestroyDevice( vkGetInstanceProcAddr( instance, "vkDestroyDevice" ) );
- vkDestroyEvent = PFN_vkDestroyEvent( vkGetInstanceProcAddr( instance, "vkDestroyEvent" ) );
- vkDestroyFence = PFN_vkDestroyFence( vkGetInstanceProcAddr( instance, "vkDestroyFence" ) );
- vkDestroyFramebuffer = PFN_vkDestroyFramebuffer( vkGetInstanceProcAddr( instance, "vkDestroyFramebuffer" ) );
- vkDestroyImage = PFN_vkDestroyImage( vkGetInstanceProcAddr( instance, "vkDestroyImage" ) );
- vkDestroyImageView = PFN_vkDestroyImageView( vkGetInstanceProcAddr( instance, "vkDestroyImageView" ) );
- vkDestroyIndirectCommandsLayoutNV =
- PFN_vkDestroyIndirectCommandsLayoutNV( vkGetInstanceProcAddr( instance, "vkDestroyIndirectCommandsLayoutNV" ) );
- vkDestroyPipeline = PFN_vkDestroyPipeline( vkGetInstanceProcAddr( instance, "vkDestroyPipeline" ) );
- vkDestroyPipelineCache =
- PFN_vkDestroyPipelineCache( vkGetInstanceProcAddr( instance, "vkDestroyPipelineCache" ) );
- vkDestroyPipelineLayout =
- PFN_vkDestroyPipelineLayout( vkGetInstanceProcAddr( instance, "vkDestroyPipelineLayout" ) );
- vkDestroyPrivateDataSlotEXT =
- PFN_vkDestroyPrivateDataSlotEXT( vkGetInstanceProcAddr( instance, "vkDestroyPrivateDataSlotEXT" ) );
- vkDestroyQueryPool = PFN_vkDestroyQueryPool( vkGetInstanceProcAddr( instance, "vkDestroyQueryPool" ) );
- vkDestroyRenderPass = PFN_vkDestroyRenderPass( vkGetInstanceProcAddr( instance, "vkDestroyRenderPass" ) );
- vkDestroySampler = PFN_vkDestroySampler( vkGetInstanceProcAddr( instance, "vkDestroySampler" ) );
- vkDestroySamplerYcbcrConversion =
- PFN_vkDestroySamplerYcbcrConversion( vkGetInstanceProcAddr( instance, "vkDestroySamplerYcbcrConversion" ) );
vkDestroySamplerYcbcrConversionKHR = PFN_vkDestroySamplerYcbcrConversionKHR(
vkGetInstanceProcAddr( instance, "vkDestroySamplerYcbcrConversionKHR" ) );
if ( !vkDestroySamplerYcbcrConversion )
vkDestroySamplerYcbcrConversion = vkDestroySamplerYcbcrConversionKHR;
- vkDestroySemaphore = PFN_vkDestroySemaphore( vkGetInstanceProcAddr( instance, "vkDestroySemaphore" ) );
- vkDestroyShaderModule = PFN_vkDestroyShaderModule( vkGetInstanceProcAddr( instance, "vkDestroyShaderModule" ) );
- vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR( vkGetInstanceProcAddr( instance, "vkDestroySwapchainKHR" ) );
+
+ //=== VK_KHR_bind_memory2 ===
+ vkBindBufferMemory2KHR =
+ PFN_vkBindBufferMemory2KHR( vkGetInstanceProcAddr( instance, "vkBindBufferMemory2KHR" ) );
+ if ( !vkBindBufferMemory2 )
+ vkBindBufferMemory2 = vkBindBufferMemory2KHR;
+ vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR( vkGetInstanceProcAddr( instance, "vkBindImageMemory2KHR" ) );
+ if ( !vkBindImageMemory2 )
+ vkBindImageMemory2 = vkBindImageMemory2KHR;
+
+ //=== VK_EXT_image_drm_format_modifier ===
+ vkGetImageDrmFormatModifierPropertiesEXT = PFN_vkGetImageDrmFormatModifierPropertiesEXT(
+ vkGetInstanceProcAddr( instance, "vkGetImageDrmFormatModifierPropertiesEXT" ) );
+
+ //=== VK_EXT_validation_cache ===
+ vkCreateValidationCacheEXT =
+ PFN_vkCreateValidationCacheEXT( vkGetInstanceProcAddr( instance, "vkCreateValidationCacheEXT" ) );
vkDestroyValidationCacheEXT =
PFN_vkDestroyValidationCacheEXT( vkGetInstanceProcAddr( instance, "vkDestroyValidationCacheEXT" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkDestroyVideoSessionKHR =
- PFN_vkDestroyVideoSessionKHR( vkGetInstanceProcAddr( instance, "vkDestroyVideoSessionKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkDestroyVideoSessionParametersKHR = PFN_vkDestroyVideoSessionParametersKHR(
- vkGetInstanceProcAddr( instance, "vkDestroyVideoSessionParametersKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkDeviceWaitIdle = PFN_vkDeviceWaitIdle( vkGetInstanceProcAddr( instance, "vkDeviceWaitIdle" ) );
- vkDisplayPowerControlEXT =
- PFN_vkDisplayPowerControlEXT( vkGetInstanceProcAddr( instance, "vkDisplayPowerControlEXT" ) );
- vkEndCommandBuffer = PFN_vkEndCommandBuffer( vkGetInstanceProcAddr( instance, "vkEndCommandBuffer" ) );
- vkFlushMappedMemoryRanges =
- PFN_vkFlushMappedMemoryRanges( vkGetInstanceProcAddr( instance, "vkFlushMappedMemoryRanges" ) );
- vkFreeCommandBuffers = PFN_vkFreeCommandBuffers( vkGetInstanceProcAddr( instance, "vkFreeCommandBuffers" ) );
- vkFreeDescriptorSets = PFN_vkFreeDescriptorSets( vkGetInstanceProcAddr( instance, "vkFreeDescriptorSets" ) );
- vkFreeMemory = PFN_vkFreeMemory( vkGetInstanceProcAddr( instance, "vkFreeMemory" ) );
- vkGetAccelerationStructureBuildSizesKHR = PFN_vkGetAccelerationStructureBuildSizesKHR(
- vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureBuildSizesKHR" ) );
- vkGetAccelerationStructureDeviceAddressKHR = PFN_vkGetAccelerationStructureDeviceAddressKHR(
- vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureDeviceAddressKHR" ) );
- vkGetAccelerationStructureHandleNV = PFN_vkGetAccelerationStructureHandleNV(
- vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureHandleNV" ) );
+ vkMergeValidationCachesEXT =
+ PFN_vkMergeValidationCachesEXT( vkGetInstanceProcAddr( instance, "vkMergeValidationCachesEXT" ) );
+ vkGetValidationCacheDataEXT =
+ PFN_vkGetValidationCacheDataEXT( vkGetInstanceProcAddr( instance, "vkGetValidationCacheDataEXT" ) );
+
+ //=== VK_NV_shading_rate_image ===
+ vkCmdBindShadingRateImageNV =
+ PFN_vkCmdBindShadingRateImageNV( vkGetInstanceProcAddr( instance, "vkCmdBindShadingRateImageNV" ) );
+ vkCmdSetViewportShadingRatePaletteNV = PFN_vkCmdSetViewportShadingRatePaletteNV(
+ vkGetInstanceProcAddr( instance, "vkCmdSetViewportShadingRatePaletteNV" ) );
+ vkCmdSetCoarseSampleOrderNV =
+ PFN_vkCmdSetCoarseSampleOrderNV( vkGetInstanceProcAddr( instance, "vkCmdSetCoarseSampleOrderNV" ) );
+
+ //=== VK_NV_ray_tracing ===
+ vkCreateAccelerationStructureNV =
+ PFN_vkCreateAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkCreateAccelerationStructureNV" ) );
+ vkDestroyAccelerationStructureNV =
+ PFN_vkDestroyAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkDestroyAccelerationStructureNV" ) );
vkGetAccelerationStructureMemoryRequirementsNV = PFN_vkGetAccelerationStructureMemoryRequirementsNV(
vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureMemoryRequirementsNV" ) );
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- vkGetAndroidHardwareBufferPropertiesANDROID = PFN_vkGetAndroidHardwareBufferPropertiesANDROID(
- vkGetInstanceProcAddr( instance, "vkGetAndroidHardwareBufferPropertiesANDROID" ) );
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- vkGetBufferDeviceAddress =
- PFN_vkGetBufferDeviceAddress( vkGetInstanceProcAddr( instance, "vkGetBufferDeviceAddress" ) );
+ vkBindAccelerationStructureMemoryNV = PFN_vkBindAccelerationStructureMemoryNV(
+ vkGetInstanceProcAddr( instance, "vkBindAccelerationStructureMemoryNV" ) );
+ vkCmdBuildAccelerationStructureNV =
+ PFN_vkCmdBuildAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkCmdBuildAccelerationStructureNV" ) );
+ vkCmdCopyAccelerationStructureNV =
+ PFN_vkCmdCopyAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkCmdCopyAccelerationStructureNV" ) );
+ vkCmdTraceRaysNV = PFN_vkCmdTraceRaysNV( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysNV" ) );
+ vkCreateRayTracingPipelinesNV =
+ PFN_vkCreateRayTracingPipelinesNV( vkGetInstanceProcAddr( instance, "vkCreateRayTracingPipelinesNV" ) );
+ vkGetRayTracingShaderGroupHandlesNV = PFN_vkGetRayTracingShaderGroupHandlesNV(
+ vkGetInstanceProcAddr( instance, "vkGetRayTracingShaderGroupHandlesNV" ) );
+ if ( !vkGetRayTracingShaderGroupHandlesKHR )
+ vkGetRayTracingShaderGroupHandlesKHR = vkGetRayTracingShaderGroupHandlesNV;
+ vkGetAccelerationStructureHandleNV = PFN_vkGetAccelerationStructureHandleNV(
+ vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureHandleNV" ) );
+ vkCmdWriteAccelerationStructuresPropertiesNV = PFN_vkCmdWriteAccelerationStructuresPropertiesNV(
+ vkGetInstanceProcAddr( instance, "vkCmdWriteAccelerationStructuresPropertiesNV" ) );
+ vkCompileDeferredNV = PFN_vkCompileDeferredNV( vkGetInstanceProcAddr( instance, "vkCompileDeferredNV" ) );
+
+ //=== VK_KHR_maintenance3 ===
+ vkGetDescriptorSetLayoutSupportKHR = PFN_vkGetDescriptorSetLayoutSupportKHR(
+ vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutSupportKHR" ) );
+ if ( !vkGetDescriptorSetLayoutSupport )
+ vkGetDescriptorSetLayoutSupport = vkGetDescriptorSetLayoutSupportKHR;
+
+ //=== VK_KHR_draw_indirect_count ===
+ vkCmdDrawIndirectCountKHR =
+ PFN_vkCmdDrawIndirectCountKHR( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCountKHR" ) );
+ if ( !vkCmdDrawIndirectCount )
+ vkCmdDrawIndirectCount = vkCmdDrawIndirectCountKHR;
+ vkCmdDrawIndexedIndirectCountKHR =
+ PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCountKHR" ) );
+ if ( !vkCmdDrawIndexedIndirectCount )
+ vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountKHR;
+
+ //=== VK_EXT_external_memory_host ===
+ vkGetMemoryHostPointerPropertiesEXT = PFN_vkGetMemoryHostPointerPropertiesEXT(
+ vkGetInstanceProcAddr( instance, "vkGetMemoryHostPointerPropertiesEXT" ) );
+
+ //=== VK_AMD_buffer_marker ===
+ vkCmdWriteBufferMarkerAMD =
+ PFN_vkCmdWriteBufferMarkerAMD( vkGetInstanceProcAddr( instance, "vkCmdWriteBufferMarkerAMD" ) );
+
+ //=== VK_EXT_calibrated_timestamps ===
+ vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT" ) );
+ vkGetCalibratedTimestampsEXT =
+ PFN_vkGetCalibratedTimestampsEXT( vkGetInstanceProcAddr( instance, "vkGetCalibratedTimestampsEXT" ) );
+
+ //=== VK_NV_mesh_shader ===
+ vkCmdDrawMeshTasksNV = PFN_vkCmdDrawMeshTasksNV( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksNV" ) );
+ vkCmdDrawMeshTasksIndirectNV =
+ PFN_vkCmdDrawMeshTasksIndirectNV( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksIndirectNV" ) );
+ vkCmdDrawMeshTasksIndirectCountNV =
+ PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksIndirectCountNV" ) );
+
+ //=== VK_NV_scissor_exclusive ===
+ vkCmdSetExclusiveScissorNV =
+ PFN_vkCmdSetExclusiveScissorNV( vkGetInstanceProcAddr( instance, "vkCmdSetExclusiveScissorNV" ) );
+
+ //=== VK_NV_device_diagnostic_checkpoints ===
+ vkCmdSetCheckpointNV = PFN_vkCmdSetCheckpointNV( vkGetInstanceProcAddr( instance, "vkCmdSetCheckpointNV" ) );
+ vkGetQueueCheckpointDataNV =
+ PFN_vkGetQueueCheckpointDataNV( vkGetInstanceProcAddr( instance, "vkGetQueueCheckpointDataNV" ) );
+
+ //=== VK_KHR_timeline_semaphore ===
+ vkGetSemaphoreCounterValueKHR =
+ PFN_vkGetSemaphoreCounterValueKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreCounterValueKHR" ) );
+ if ( !vkGetSemaphoreCounterValue )
+ vkGetSemaphoreCounterValue = vkGetSemaphoreCounterValueKHR;
+ vkWaitSemaphoresKHR = PFN_vkWaitSemaphoresKHR( vkGetInstanceProcAddr( instance, "vkWaitSemaphoresKHR" ) );
+ if ( !vkWaitSemaphores )
+ vkWaitSemaphores = vkWaitSemaphoresKHR;
+ vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetInstanceProcAddr( instance, "vkSignalSemaphoreKHR" ) );
+ if ( !vkSignalSemaphore )
+ vkSignalSemaphore = vkSignalSemaphoreKHR;
+
+ //=== VK_INTEL_performance_query ===
+ vkInitializePerformanceApiINTEL =
+ PFN_vkInitializePerformanceApiINTEL( vkGetInstanceProcAddr( instance, "vkInitializePerformanceApiINTEL" ) );
+ vkUninitializePerformanceApiINTEL =
+ PFN_vkUninitializePerformanceApiINTEL( vkGetInstanceProcAddr( instance, "vkUninitializePerformanceApiINTEL" ) );
+ vkCmdSetPerformanceMarkerINTEL =
+ PFN_vkCmdSetPerformanceMarkerINTEL( vkGetInstanceProcAddr( instance, "vkCmdSetPerformanceMarkerINTEL" ) );
+ vkCmdSetPerformanceStreamMarkerINTEL = PFN_vkCmdSetPerformanceStreamMarkerINTEL(
+ vkGetInstanceProcAddr( instance, "vkCmdSetPerformanceStreamMarkerINTEL" ) );
+ vkCmdSetPerformanceOverrideINTEL =
+ PFN_vkCmdSetPerformanceOverrideINTEL( vkGetInstanceProcAddr( instance, "vkCmdSetPerformanceOverrideINTEL" ) );
+ vkAcquirePerformanceConfigurationINTEL = PFN_vkAcquirePerformanceConfigurationINTEL(
+ vkGetInstanceProcAddr( instance, "vkAcquirePerformanceConfigurationINTEL" ) );
+ vkReleasePerformanceConfigurationINTEL = PFN_vkReleasePerformanceConfigurationINTEL(
+ vkGetInstanceProcAddr( instance, "vkReleasePerformanceConfigurationINTEL" ) );
+ vkQueueSetPerformanceConfigurationINTEL = PFN_vkQueueSetPerformanceConfigurationINTEL(
+ vkGetInstanceProcAddr( instance, "vkQueueSetPerformanceConfigurationINTEL" ) );
+ vkGetPerformanceParameterINTEL =
+ PFN_vkGetPerformanceParameterINTEL( vkGetInstanceProcAddr( instance, "vkGetPerformanceParameterINTEL" ) );
+
+ //=== VK_AMD_display_native_hdr ===
+ vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetInstanceProcAddr( instance, "vkSetLocalDimmingAMD" ) );
+
+#if defined( VK_USE_PLATFORM_FUCHSIA )
+ //=== VK_FUCHSIA_imagepipe_surface ===
+ vkCreateImagePipeSurfaceFUCHSIA =
+ PFN_vkCreateImagePipeSurfaceFUCHSIA( vkGetInstanceProcAddr( instance, "vkCreateImagePipeSurfaceFUCHSIA" ) );
+#endif /*VK_USE_PLATFORM_FUCHSIA*/
+
+#if defined( VK_USE_PLATFORM_METAL_EXT )
+ //=== VK_EXT_metal_surface ===
+ vkCreateMetalSurfaceEXT =
+ PFN_vkCreateMetalSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateMetalSurfaceEXT" ) );
+#endif /*VK_USE_PLATFORM_METAL_EXT*/
+
+ //=== VK_KHR_fragment_shading_rate ===
+ vkGetPhysicalDeviceFragmentShadingRatesKHR = PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR" ) );
+ vkCmdSetFragmentShadingRateKHR =
+ PFN_vkCmdSetFragmentShadingRateKHR( vkGetInstanceProcAddr( instance, "vkCmdSetFragmentShadingRateKHR" ) );
+
+ //=== VK_EXT_buffer_device_address ===
vkGetBufferDeviceAddressEXT =
PFN_vkGetBufferDeviceAddressEXT( vkGetInstanceProcAddr( instance, "vkGetBufferDeviceAddressEXT" ) );
if ( !vkGetBufferDeviceAddress )
vkGetBufferDeviceAddress = vkGetBufferDeviceAddressEXT;
+
+ //=== VK_EXT_tooling_info ===
+ vkGetPhysicalDeviceToolPropertiesEXT = PFN_vkGetPhysicalDeviceToolPropertiesEXT(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceToolPropertiesEXT" ) );
+
+ //=== VK_KHR_present_wait ===
+ vkWaitForPresentKHR = PFN_vkWaitForPresentKHR( vkGetInstanceProcAddr( instance, "vkWaitForPresentKHR" ) );
+
+ //=== VK_NV_cooperative_matrix ===
+ vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV" ) );
+
+ //=== VK_NV_coverage_reduction_mode ===
+ vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV =
+ PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV" ) );
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_EXT_full_screen_exclusive ===
+ vkGetPhysicalDeviceSurfacePresentModes2EXT = PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT" ) );
+ vkAcquireFullScreenExclusiveModeEXT = PFN_vkAcquireFullScreenExclusiveModeEXT(
+ vkGetInstanceProcAddr( instance, "vkAcquireFullScreenExclusiveModeEXT" ) );
+ vkReleaseFullScreenExclusiveModeEXT = PFN_vkReleaseFullScreenExclusiveModeEXT(
+ vkGetInstanceProcAddr( instance, "vkReleaseFullScreenExclusiveModeEXT" ) );
+ vkGetDeviceGroupSurfacePresentModes2EXT = PFN_vkGetDeviceGroupSurfacePresentModes2EXT(
+ vkGetInstanceProcAddr( instance, "vkGetDeviceGroupSurfacePresentModes2EXT" ) );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_EXT_headless_surface ===
+ vkCreateHeadlessSurfaceEXT =
+ PFN_vkCreateHeadlessSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateHeadlessSurfaceEXT" ) );
+
+ //=== VK_KHR_buffer_device_address ===
vkGetBufferDeviceAddressKHR =
PFN_vkGetBufferDeviceAddressKHR( vkGetInstanceProcAddr( instance, "vkGetBufferDeviceAddressKHR" ) );
if ( !vkGetBufferDeviceAddress )
vkGetBufferDeviceAddress = vkGetBufferDeviceAddressKHR;
- vkGetBufferMemoryRequirements =
- PFN_vkGetBufferMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements" ) );
- vkGetBufferMemoryRequirements2 =
- PFN_vkGetBufferMemoryRequirements2( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements2" ) );
- vkGetBufferMemoryRequirements2KHR =
- PFN_vkGetBufferMemoryRequirements2KHR( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements2KHR" ) );
- if ( !vkGetBufferMemoryRequirements2 )
- vkGetBufferMemoryRequirements2 = vkGetBufferMemoryRequirements2KHR;
- vkGetBufferOpaqueCaptureAddress =
- PFN_vkGetBufferOpaqueCaptureAddress( vkGetInstanceProcAddr( instance, "vkGetBufferOpaqueCaptureAddress" ) );
vkGetBufferOpaqueCaptureAddressKHR = PFN_vkGetBufferOpaqueCaptureAddressKHR(
vkGetInstanceProcAddr( instance, "vkGetBufferOpaqueCaptureAddressKHR" ) );
if ( !vkGetBufferOpaqueCaptureAddress )
vkGetBufferOpaqueCaptureAddress = vkGetBufferOpaqueCaptureAddressKHR;
- vkGetCalibratedTimestampsEXT =
- PFN_vkGetCalibratedTimestampsEXT( vkGetInstanceProcAddr( instance, "vkGetCalibratedTimestampsEXT" ) );
- vkGetDeferredOperationMaxConcurrencyKHR = PFN_vkGetDeferredOperationMaxConcurrencyKHR(
- vkGetInstanceProcAddr( instance, "vkGetDeferredOperationMaxConcurrencyKHR" ) );
- vkGetDeferredOperationResultKHR =
- PFN_vkGetDeferredOperationResultKHR( vkGetInstanceProcAddr( instance, "vkGetDeferredOperationResultKHR" ) );
- vkGetDescriptorSetLayoutSupport =
- PFN_vkGetDescriptorSetLayoutSupport( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutSupport" ) );
- vkGetDescriptorSetLayoutSupportKHR = PFN_vkGetDescriptorSetLayoutSupportKHR(
- vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutSupportKHR" ) );
- if ( !vkGetDescriptorSetLayoutSupport )
- vkGetDescriptorSetLayoutSupport = vkGetDescriptorSetLayoutSupportKHR;
- vkGetDeviceAccelerationStructureCompatibilityKHR = PFN_vkGetDeviceAccelerationStructureCompatibilityKHR(
- vkGetInstanceProcAddr( instance, "vkGetDeviceAccelerationStructureCompatibilityKHR" ) );
- vkGetDeviceGroupPeerMemoryFeatures = PFN_vkGetDeviceGroupPeerMemoryFeatures(
- vkGetInstanceProcAddr( instance, "vkGetDeviceGroupPeerMemoryFeatures" ) );
- vkGetDeviceGroupPeerMemoryFeaturesKHR = PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR(
- vkGetInstanceProcAddr( instance, "vkGetDeviceGroupPeerMemoryFeaturesKHR" ) );
- if ( !vkGetDeviceGroupPeerMemoryFeatures )
- vkGetDeviceGroupPeerMemoryFeatures = vkGetDeviceGroupPeerMemoryFeaturesKHR;
- vkGetDeviceGroupPresentCapabilitiesKHR = PFN_vkGetDeviceGroupPresentCapabilitiesKHR(
- vkGetInstanceProcAddr( instance, "vkGetDeviceGroupPresentCapabilitiesKHR" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetDeviceGroupSurfacePresentModes2EXT = PFN_vkGetDeviceGroupSurfacePresentModes2EXT(
- vkGetInstanceProcAddr( instance, "vkGetDeviceGroupSurfacePresentModes2EXT" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkGetDeviceGroupSurfacePresentModesKHR = PFN_vkGetDeviceGroupSurfacePresentModesKHR(
- vkGetInstanceProcAddr( instance, "vkGetDeviceGroupSurfacePresentModesKHR" ) );
- vkGetDeviceMemoryCommitment =
- PFN_vkGetDeviceMemoryCommitment( vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryCommitment" ) );
- vkGetDeviceMemoryOpaqueCaptureAddress = PFN_vkGetDeviceMemoryOpaqueCaptureAddress(
- vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryOpaqueCaptureAddress" ) );
vkGetDeviceMemoryOpaqueCaptureAddressKHR = PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR(
vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryOpaqueCaptureAddressKHR" ) );
if ( !vkGetDeviceMemoryOpaqueCaptureAddress )
vkGetDeviceMemoryOpaqueCaptureAddress = vkGetDeviceMemoryOpaqueCaptureAddressKHR;
- vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr" ) );
- vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetInstanceProcAddr( instance, "vkGetDeviceQueue" ) );
- vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetInstanceProcAddr( instance, "vkGetDeviceQueue2" ) );
- vkGetEventStatus = PFN_vkGetEventStatus( vkGetInstanceProcAddr( instance, "vkGetEventStatus" ) );
- vkGetFenceFdKHR = PFN_vkGetFenceFdKHR( vkGetInstanceProcAddr( instance, "vkGetFenceFdKHR" ) );
- vkGetFenceStatus = PFN_vkGetFenceStatus( vkGetInstanceProcAddr( instance, "vkGetFenceStatus" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetFenceWin32HandleKHR =
- PFN_vkGetFenceWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkGetFenceWin32HandleKHR" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkGetGeneratedCommandsMemoryRequirementsNV = PFN_vkGetGeneratedCommandsMemoryRequirementsNV(
- vkGetInstanceProcAddr( instance, "vkGetGeneratedCommandsMemoryRequirementsNV" ) );
- vkGetImageDrmFormatModifierPropertiesEXT = PFN_vkGetImageDrmFormatModifierPropertiesEXT(
- vkGetInstanceProcAddr( instance, "vkGetImageDrmFormatModifierPropertiesEXT" ) );
- vkGetImageMemoryRequirements =
- PFN_vkGetImageMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetImageMemoryRequirements" ) );
- vkGetImageMemoryRequirements2 =
- PFN_vkGetImageMemoryRequirements2( vkGetInstanceProcAddr( instance, "vkGetImageMemoryRequirements2" ) );
- vkGetImageMemoryRequirements2KHR =
- PFN_vkGetImageMemoryRequirements2KHR( vkGetInstanceProcAddr( instance, "vkGetImageMemoryRequirements2KHR" ) );
- if ( !vkGetImageMemoryRequirements2 )
- vkGetImageMemoryRequirements2 = vkGetImageMemoryRequirements2KHR;
- vkGetImageSparseMemoryRequirements = PFN_vkGetImageSparseMemoryRequirements(
- vkGetInstanceProcAddr( instance, "vkGetImageSparseMemoryRequirements" ) );
- vkGetImageSparseMemoryRequirements2 = PFN_vkGetImageSparseMemoryRequirements2(
- vkGetInstanceProcAddr( instance, "vkGetImageSparseMemoryRequirements2" ) );
- vkGetImageSparseMemoryRequirements2KHR = PFN_vkGetImageSparseMemoryRequirements2KHR(
- vkGetInstanceProcAddr( instance, "vkGetImageSparseMemoryRequirements2KHR" ) );
- if ( !vkGetImageSparseMemoryRequirements2 )
- vkGetImageSparseMemoryRequirements2 = vkGetImageSparseMemoryRequirements2KHR;
- vkGetImageSubresourceLayout =
- PFN_vkGetImageSubresourceLayout( vkGetInstanceProcAddr( instance, "vkGetImageSubresourceLayout" ) );
- vkGetImageViewAddressNVX =
- PFN_vkGetImageViewAddressNVX( vkGetInstanceProcAddr( instance, "vkGetImageViewAddressNVX" ) );
- vkGetImageViewHandleNVX =
- PFN_vkGetImageViewHandleNVX( vkGetInstanceProcAddr( instance, "vkGetImageViewHandleNVX" ) );
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- vkGetMemoryAndroidHardwareBufferANDROID = PFN_vkGetMemoryAndroidHardwareBufferANDROID(
- vkGetInstanceProcAddr( instance, "vkGetMemoryAndroidHardwareBufferANDROID" ) );
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- vkGetMemoryFdKHR = PFN_vkGetMemoryFdKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryFdKHR" ) );
- vkGetMemoryFdPropertiesKHR =
- PFN_vkGetMemoryFdPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryFdPropertiesKHR" ) );
- vkGetMemoryHostPointerPropertiesEXT = PFN_vkGetMemoryHostPointerPropertiesEXT(
- vkGetInstanceProcAddr( instance, "vkGetMemoryHostPointerPropertiesEXT" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetMemoryWin32HandleKHR =
- PFN_vkGetMemoryWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandleKHR" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetMemoryWin32HandleNV =
- PFN_vkGetMemoryWin32HandleNV( vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandleNV" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetMemoryWin32HandlePropertiesKHR = PFN_vkGetMemoryWin32HandlePropertiesKHR(
- vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandlePropertiesKHR" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_FUCHSIA )
- vkGetMemoryZirconHandleFUCHSIA =
- PFN_vkGetMemoryZirconHandleFUCHSIA( vkGetInstanceProcAddr( instance, "vkGetMemoryZirconHandleFUCHSIA" ) );
-#endif /*VK_USE_PLATFORM_FUCHSIA*/
-#if defined( VK_USE_PLATFORM_FUCHSIA )
- vkGetMemoryZirconHandlePropertiesFUCHSIA = PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA(
- vkGetInstanceProcAddr( instance, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ) );
-#endif /*VK_USE_PLATFORM_FUCHSIA*/
- vkGetPastPresentationTimingGOOGLE =
- PFN_vkGetPastPresentationTimingGOOGLE( vkGetInstanceProcAddr( instance, "vkGetPastPresentationTimingGOOGLE" ) );
- vkGetPerformanceParameterINTEL =
- PFN_vkGetPerformanceParameterINTEL( vkGetInstanceProcAddr( instance, "vkGetPerformanceParameterINTEL" ) );
- vkGetPipelineCacheData =
- PFN_vkGetPipelineCacheData( vkGetInstanceProcAddr( instance, "vkGetPipelineCacheData" ) );
- vkGetPipelineExecutableInternalRepresentationsKHR = PFN_vkGetPipelineExecutableInternalRepresentationsKHR(
- vkGetInstanceProcAddr( instance, "vkGetPipelineExecutableInternalRepresentationsKHR" ) );
+
+ //=== VK_EXT_line_rasterization ===
+ vkCmdSetLineStippleEXT =
+ PFN_vkCmdSetLineStippleEXT( vkGetInstanceProcAddr( instance, "vkCmdSetLineStippleEXT" ) );
+
+ //=== VK_EXT_host_query_reset ===
+ vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetInstanceProcAddr( instance, "vkResetQueryPoolEXT" ) );
+ if ( !vkResetQueryPool )
+ vkResetQueryPool = vkResetQueryPoolEXT;
+
+ //=== VK_EXT_extended_dynamic_state ===
+ vkCmdSetCullModeEXT = PFN_vkCmdSetCullModeEXT( vkGetInstanceProcAddr( instance, "vkCmdSetCullModeEXT" ) );
+ vkCmdSetFrontFaceEXT = PFN_vkCmdSetFrontFaceEXT( vkGetInstanceProcAddr( instance, "vkCmdSetFrontFaceEXT" ) );
+ vkCmdSetPrimitiveTopologyEXT =
+ PFN_vkCmdSetPrimitiveTopologyEXT( vkGetInstanceProcAddr( instance, "vkCmdSetPrimitiveTopologyEXT" ) );
+ vkCmdSetViewportWithCountEXT =
+ PFN_vkCmdSetViewportWithCountEXT( vkGetInstanceProcAddr( instance, "vkCmdSetViewportWithCountEXT" ) );
+ vkCmdSetScissorWithCountEXT =
+ PFN_vkCmdSetScissorWithCountEXT( vkGetInstanceProcAddr( instance, "vkCmdSetScissorWithCountEXT" ) );
+ vkCmdBindVertexBuffers2EXT =
+ PFN_vkCmdBindVertexBuffers2EXT( vkGetInstanceProcAddr( instance, "vkCmdBindVertexBuffers2EXT" ) );
+ vkCmdSetDepthTestEnableEXT =
+ PFN_vkCmdSetDepthTestEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthTestEnableEXT" ) );
+ vkCmdSetDepthWriteEnableEXT =
+ PFN_vkCmdSetDepthWriteEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthWriteEnableEXT" ) );
+ vkCmdSetDepthCompareOpEXT =
+ PFN_vkCmdSetDepthCompareOpEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthCompareOpEXT" ) );
+ vkCmdSetDepthBoundsTestEnableEXT =
+ PFN_vkCmdSetDepthBoundsTestEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBoundsTestEnableEXT" ) );
+ vkCmdSetStencilTestEnableEXT =
+ PFN_vkCmdSetStencilTestEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetStencilTestEnableEXT" ) );
+ vkCmdSetStencilOpEXT = PFN_vkCmdSetStencilOpEXT( vkGetInstanceProcAddr( instance, "vkCmdSetStencilOpEXT" ) );
+
+ //=== VK_KHR_deferred_host_operations ===
+ vkCreateDeferredOperationKHR =
+ PFN_vkCreateDeferredOperationKHR( vkGetInstanceProcAddr( instance, "vkCreateDeferredOperationKHR" ) );
+ vkDestroyDeferredOperationKHR =
+ PFN_vkDestroyDeferredOperationKHR( vkGetInstanceProcAddr( instance, "vkDestroyDeferredOperationKHR" ) );
+ vkGetDeferredOperationMaxConcurrencyKHR = PFN_vkGetDeferredOperationMaxConcurrencyKHR(
+ vkGetInstanceProcAddr( instance, "vkGetDeferredOperationMaxConcurrencyKHR" ) );
+ vkGetDeferredOperationResultKHR =
+ PFN_vkGetDeferredOperationResultKHR( vkGetInstanceProcAddr( instance, "vkGetDeferredOperationResultKHR" ) );
+ vkDeferredOperationJoinKHR =
+ PFN_vkDeferredOperationJoinKHR( vkGetInstanceProcAddr( instance, "vkDeferredOperationJoinKHR" ) );
+
+ //=== VK_KHR_pipeline_executable_properties ===
vkGetPipelineExecutablePropertiesKHR = PFN_vkGetPipelineExecutablePropertiesKHR(
vkGetInstanceProcAddr( instance, "vkGetPipelineExecutablePropertiesKHR" ) );
vkGetPipelineExecutableStatisticsKHR = PFN_vkGetPipelineExecutableStatisticsKHR(
vkGetInstanceProcAddr( instance, "vkGetPipelineExecutableStatisticsKHR" ) );
- vkGetPrivateDataEXT = PFN_vkGetPrivateDataEXT( vkGetInstanceProcAddr( instance, "vkGetPrivateDataEXT" ) );
- vkGetQueryPoolResults = PFN_vkGetQueryPoolResults( vkGetInstanceProcAddr( instance, "vkGetQueryPoolResults" ) );
+ vkGetPipelineExecutableInternalRepresentationsKHR = PFN_vkGetPipelineExecutableInternalRepresentationsKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPipelineExecutableInternalRepresentationsKHR" ) );
+
+ //=== VK_NV_device_generated_commands ===
+ vkGetGeneratedCommandsMemoryRequirementsNV = PFN_vkGetGeneratedCommandsMemoryRequirementsNV(
+ vkGetInstanceProcAddr( instance, "vkGetGeneratedCommandsMemoryRequirementsNV" ) );
+ vkCmdPreprocessGeneratedCommandsNV = PFN_vkCmdPreprocessGeneratedCommandsNV(
+ vkGetInstanceProcAddr( instance, "vkCmdPreprocessGeneratedCommandsNV" ) );
+ vkCmdExecuteGeneratedCommandsNV =
+ PFN_vkCmdExecuteGeneratedCommandsNV( vkGetInstanceProcAddr( instance, "vkCmdExecuteGeneratedCommandsNV" ) );
+ vkCmdBindPipelineShaderGroupNV =
+ PFN_vkCmdBindPipelineShaderGroupNV( vkGetInstanceProcAddr( instance, "vkCmdBindPipelineShaderGroupNV" ) );
+ vkCreateIndirectCommandsLayoutNV =
+ PFN_vkCreateIndirectCommandsLayoutNV( vkGetInstanceProcAddr( instance, "vkCreateIndirectCommandsLayoutNV" ) );
+ vkDestroyIndirectCommandsLayoutNV =
+ PFN_vkDestroyIndirectCommandsLayoutNV( vkGetInstanceProcAddr( instance, "vkDestroyIndirectCommandsLayoutNV" ) );
+
+ //=== VK_EXT_acquire_drm_display ===
+ vkAcquireDrmDisplayEXT =
+ PFN_vkAcquireDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireDrmDisplayEXT" ) );
+ vkGetDrmDisplayEXT = PFN_vkGetDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetDrmDisplayEXT" ) );
+
+ //=== VK_EXT_private_data ===
+ vkCreatePrivateDataSlotEXT =
+ PFN_vkCreatePrivateDataSlotEXT( vkGetInstanceProcAddr( instance, "vkCreatePrivateDataSlotEXT" ) );
+ vkDestroyPrivateDataSlotEXT =
+ PFN_vkDestroyPrivateDataSlotEXT( vkGetInstanceProcAddr( instance, "vkDestroyPrivateDataSlotEXT" ) );
+ vkSetPrivateDataEXT = PFN_vkSetPrivateDataEXT( vkGetInstanceProcAddr( instance, "vkSetPrivateDataEXT" ) );
+ vkGetPrivateDataEXT = PFN_vkGetPrivateDataEXT( vkGetInstanceProcAddr( instance, "vkGetPrivateDataEXT" ) );
+
+#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_encode_queue ===
+ vkCmdEncodeVideoKHR = PFN_vkCmdEncodeVideoKHR( vkGetInstanceProcAddr( instance, "vkCmdEncodeVideoKHR" ) );
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_KHR_synchronization2 ===
+ vkCmdSetEvent2KHR = PFN_vkCmdSetEvent2KHR( vkGetInstanceProcAddr( instance, "vkCmdSetEvent2KHR" ) );
+ vkCmdResetEvent2KHR = PFN_vkCmdResetEvent2KHR( vkGetInstanceProcAddr( instance, "vkCmdResetEvent2KHR" ) );
+ vkCmdWaitEvents2KHR = PFN_vkCmdWaitEvents2KHR( vkGetInstanceProcAddr( instance, "vkCmdWaitEvents2KHR" ) );
+ vkCmdPipelineBarrier2KHR =
+ PFN_vkCmdPipelineBarrier2KHR( vkGetInstanceProcAddr( instance, "vkCmdPipelineBarrier2KHR" ) );
+ vkCmdWriteTimestamp2KHR =
+ PFN_vkCmdWriteTimestamp2KHR( vkGetInstanceProcAddr( instance, "vkCmdWriteTimestamp2KHR" ) );
+ vkQueueSubmit2KHR = PFN_vkQueueSubmit2KHR( vkGetInstanceProcAddr( instance, "vkQueueSubmit2KHR" ) );
+ vkCmdWriteBufferMarker2AMD =
+ PFN_vkCmdWriteBufferMarker2AMD( vkGetInstanceProcAddr( instance, "vkCmdWriteBufferMarker2AMD" ) );
vkGetQueueCheckpointData2NV =
PFN_vkGetQueueCheckpointData2NV( vkGetInstanceProcAddr( instance, "vkGetQueueCheckpointData2NV" ) );
- vkGetQueueCheckpointDataNV =
- PFN_vkGetQueueCheckpointDataNV( vkGetInstanceProcAddr( instance, "vkGetQueueCheckpointDataNV" ) );
- vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
- vkGetInstanceProcAddr( instance, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR" ) );
+
+ //=== VK_NV_fragment_shading_rate_enums ===
+ vkCmdSetFragmentShadingRateEnumNV =
+ PFN_vkCmdSetFragmentShadingRateEnumNV( vkGetInstanceProcAddr( instance, "vkCmdSetFragmentShadingRateEnumNV" ) );
+
+ //=== VK_KHR_copy_commands2 ===
+ vkCmdCopyBuffer2KHR = PFN_vkCmdCopyBuffer2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyBuffer2KHR" ) );
+ vkCmdCopyImage2KHR = PFN_vkCmdCopyImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyImage2KHR" ) );
+ vkCmdCopyBufferToImage2KHR =
+ PFN_vkCmdCopyBufferToImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyBufferToImage2KHR" ) );
+ vkCmdCopyImageToBuffer2KHR =
+ PFN_vkCmdCopyImageToBuffer2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyImageToBuffer2KHR" ) );
+ vkCmdBlitImage2KHR = PFN_vkCmdBlitImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdBlitImage2KHR" ) );
+ vkCmdResolveImage2KHR = PFN_vkCmdResolveImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdResolveImage2KHR" ) );
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_NV_acquire_winrt_display ===
+ vkAcquireWinrtDisplayNV =
+ PFN_vkAcquireWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkAcquireWinrtDisplayNV" ) );
+ vkGetWinrtDisplayNV = PFN_vkGetWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkGetWinrtDisplayNV" ) );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+#if defined( VK_USE_PLATFORM_DIRECTFB_EXT )
+ //=== VK_EXT_directfb_surface ===
+ vkCreateDirectFBSurfaceEXT =
+ PFN_vkCreateDirectFBSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateDirectFBSurfaceEXT" ) );
+ vkGetPhysicalDeviceDirectFBPresentationSupportEXT = PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT" ) );
+#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/
+
+ //=== VK_KHR_ray_tracing_pipeline ===
+ vkCmdTraceRaysKHR = PFN_vkCmdTraceRaysKHR( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysKHR" ) );
+ vkCreateRayTracingPipelinesKHR =
+ PFN_vkCreateRayTracingPipelinesKHR( vkGetInstanceProcAddr( instance, "vkCreateRayTracingPipelinesKHR" ) );
vkGetRayTracingShaderGroupHandlesKHR = PFN_vkGetRayTracingShaderGroupHandlesKHR(
vkGetInstanceProcAddr( instance, "vkGetRayTracingShaderGroupHandlesKHR" ) );
- vkGetRayTracingShaderGroupHandlesNV = PFN_vkGetRayTracingShaderGroupHandlesNV(
- vkGetInstanceProcAddr( instance, "vkGetRayTracingShaderGroupHandlesNV" ) );
- if ( !vkGetRayTracingShaderGroupHandlesKHR )
- vkGetRayTracingShaderGroupHandlesKHR = vkGetRayTracingShaderGroupHandlesNV;
+ vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR" ) );
+ vkCmdTraceRaysIndirectKHR =
+ PFN_vkCmdTraceRaysIndirectKHR( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysIndirectKHR" ) );
vkGetRayTracingShaderGroupStackSizeKHR = PFN_vkGetRayTracingShaderGroupStackSizeKHR(
vkGetInstanceProcAddr( instance, "vkGetRayTracingShaderGroupStackSizeKHR" ) );
- vkGetRefreshCycleDurationGOOGLE =
- PFN_vkGetRefreshCycleDurationGOOGLE( vkGetInstanceProcAddr( instance, "vkGetRefreshCycleDurationGOOGLE" ) );
- vkGetRenderAreaGranularity =
- PFN_vkGetRenderAreaGranularity( vkGetInstanceProcAddr( instance, "vkGetRenderAreaGranularity" ) );
- vkGetSemaphoreCounterValue =
- PFN_vkGetSemaphoreCounterValue( vkGetInstanceProcAddr( instance, "vkGetSemaphoreCounterValue" ) );
- vkGetSemaphoreCounterValueKHR =
- PFN_vkGetSemaphoreCounterValueKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreCounterValueKHR" ) );
- if ( !vkGetSemaphoreCounterValue )
- vkGetSemaphoreCounterValue = vkGetSemaphoreCounterValueKHR;
- vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreFdKHR" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetSemaphoreWin32HandleKHR =
- PFN_vkGetSemaphoreWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreWin32HandleKHR" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ vkCmdSetRayTracingPipelineStackSizeKHR = PFN_vkCmdSetRayTracingPipelineStackSizeKHR(
+ vkGetInstanceProcAddr( instance, "vkCmdSetRayTracingPipelineStackSizeKHR" ) );
+
+ //=== VK_EXT_vertex_input_dynamic_state ===
+ vkCmdSetVertexInputEXT =
+ PFN_vkCmdSetVertexInputEXT( vkGetInstanceProcAddr( instance, "vkCmdSetVertexInputEXT" ) );
+
#if defined( VK_USE_PLATFORM_FUCHSIA )
- vkGetSemaphoreZirconHandleFUCHSIA =
- PFN_vkGetSemaphoreZirconHandleFUCHSIA( vkGetInstanceProcAddr( instance, "vkGetSemaphoreZirconHandleFUCHSIA" ) );
+ //=== VK_FUCHSIA_external_memory ===
+ vkGetMemoryZirconHandleFUCHSIA =
+ PFN_vkGetMemoryZirconHandleFUCHSIA( vkGetInstanceProcAddr( instance, "vkGetMemoryZirconHandleFUCHSIA" ) );
+ vkGetMemoryZirconHandlePropertiesFUCHSIA = PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA(
+ vkGetInstanceProcAddr( instance, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ) );
#endif /*VK_USE_PLATFORM_FUCHSIA*/
- vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD( vkGetInstanceProcAddr( instance, "vkGetShaderInfoAMD" ) );
- vkGetSubpassShadingMaxWorkgroupSizeHUAWEI = PFN_vkGetSubpassShadingMaxWorkgroupSizeHUAWEI(
- vkGetInstanceProcAddr( instance, "vkGetSubpassShadingMaxWorkgroupSizeHUAWEI" ) );
- vkGetSwapchainCounterEXT =
- PFN_vkGetSwapchainCounterEXT( vkGetInstanceProcAddr( instance, "vkGetSwapchainCounterEXT" ) );
- vkGetSwapchainImagesKHR =
- PFN_vkGetSwapchainImagesKHR( vkGetInstanceProcAddr( instance, "vkGetSwapchainImagesKHR" ) );
- vkGetSwapchainStatusKHR =
- PFN_vkGetSwapchainStatusKHR( vkGetInstanceProcAddr( instance, "vkGetSwapchainStatusKHR" ) );
- vkGetValidationCacheDataEXT =
- PFN_vkGetValidationCacheDataEXT( vkGetInstanceProcAddr( instance, "vkGetValidationCacheDataEXT" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkGetVideoSessionMemoryRequirementsKHR = PFN_vkGetVideoSessionMemoryRequirementsKHR(
- vkGetInstanceProcAddr( instance, "vkGetVideoSessionMemoryRequirementsKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkImportFenceFdKHR = PFN_vkImportFenceFdKHR( vkGetInstanceProcAddr( instance, "vkImportFenceFdKHR" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkImportFenceWin32HandleKHR =
- PFN_vkImportFenceWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkImportFenceWin32HandleKHR" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkImportSemaphoreFdKHR =
- PFN_vkImportSemaphoreFdKHR( vkGetInstanceProcAddr( instance, "vkImportSemaphoreFdKHR" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkImportSemaphoreWin32HandleKHR =
- PFN_vkImportSemaphoreWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkImportSemaphoreWin32HandleKHR" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
#if defined( VK_USE_PLATFORM_FUCHSIA )
+ //=== VK_FUCHSIA_external_semaphore ===
vkImportSemaphoreZirconHandleFUCHSIA = PFN_vkImportSemaphoreZirconHandleFUCHSIA(
vkGetInstanceProcAddr( instance, "vkImportSemaphoreZirconHandleFUCHSIA" ) );
+ vkGetSemaphoreZirconHandleFUCHSIA =
+ PFN_vkGetSemaphoreZirconHandleFUCHSIA( vkGetInstanceProcAddr( instance, "vkGetSemaphoreZirconHandleFUCHSIA" ) );
#endif /*VK_USE_PLATFORM_FUCHSIA*/
- vkInitializePerformanceApiINTEL =
- PFN_vkInitializePerformanceApiINTEL( vkGetInstanceProcAddr( instance, "vkInitializePerformanceApiINTEL" ) );
- vkInvalidateMappedMemoryRanges =
- PFN_vkInvalidateMappedMemoryRanges( vkGetInstanceProcAddr( instance, "vkInvalidateMappedMemoryRanges" ) );
- vkMapMemory = PFN_vkMapMemory( vkGetInstanceProcAddr( instance, "vkMapMemory" ) );
- vkMergePipelineCaches = PFN_vkMergePipelineCaches( vkGetInstanceProcAddr( instance, "vkMergePipelineCaches" ) );
- vkMergeValidationCachesEXT =
- PFN_vkMergeValidationCachesEXT( vkGetInstanceProcAddr( instance, "vkMergeValidationCachesEXT" ) );
- vkQueueBeginDebugUtilsLabelEXT =
- PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkQueueBeginDebugUtilsLabelEXT" ) );
- vkQueueBindSparse = PFN_vkQueueBindSparse( vkGetInstanceProcAddr( instance, "vkQueueBindSparse" ) );
- vkQueueEndDebugUtilsLabelEXT =
- PFN_vkQueueEndDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkQueueEndDebugUtilsLabelEXT" ) );
- vkQueueInsertDebugUtilsLabelEXT =
- PFN_vkQueueInsertDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkQueueInsertDebugUtilsLabelEXT" ) );
- vkQueuePresentKHR = PFN_vkQueuePresentKHR( vkGetInstanceProcAddr( instance, "vkQueuePresentKHR" ) );
- vkQueueSetPerformanceConfigurationINTEL = PFN_vkQueueSetPerformanceConfigurationINTEL(
- vkGetInstanceProcAddr( instance, "vkQueueSetPerformanceConfigurationINTEL" ) );
- vkQueueSubmit = PFN_vkQueueSubmit( vkGetInstanceProcAddr( instance, "vkQueueSubmit" ) );
- vkQueueSubmit2KHR = PFN_vkQueueSubmit2KHR( vkGetInstanceProcAddr( instance, "vkQueueSubmit2KHR" ) );
- vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetInstanceProcAddr( instance, "vkQueueWaitIdle" ) );
- vkRegisterDeviceEventEXT =
- PFN_vkRegisterDeviceEventEXT( vkGetInstanceProcAddr( instance, "vkRegisterDeviceEventEXT" ) );
- vkRegisterDisplayEventEXT =
- PFN_vkRegisterDisplayEventEXT( vkGetInstanceProcAddr( instance, "vkRegisterDisplayEventEXT" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkReleaseFullScreenExclusiveModeEXT = PFN_vkReleaseFullScreenExclusiveModeEXT(
- vkGetInstanceProcAddr( instance, "vkReleaseFullScreenExclusiveModeEXT" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkReleasePerformanceConfigurationINTEL = PFN_vkReleasePerformanceConfigurationINTEL(
- vkGetInstanceProcAddr( instance, "vkReleasePerformanceConfigurationINTEL" ) );
- vkReleaseProfilingLockKHR =
- PFN_vkReleaseProfilingLockKHR( vkGetInstanceProcAddr( instance, "vkReleaseProfilingLockKHR" ) );
- vkResetCommandBuffer = PFN_vkResetCommandBuffer( vkGetInstanceProcAddr( instance, "vkResetCommandBuffer" ) );
- vkResetCommandPool = PFN_vkResetCommandPool( vkGetInstanceProcAddr( instance, "vkResetCommandPool" ) );
- vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetInstanceProcAddr( instance, "vkResetDescriptorPool" ) );
- vkResetEvent = PFN_vkResetEvent( vkGetInstanceProcAddr( instance, "vkResetEvent" ) );
- vkResetFences = PFN_vkResetFences( vkGetInstanceProcAddr( instance, "vkResetFences" ) );
- vkResetQueryPool = PFN_vkResetQueryPool( vkGetInstanceProcAddr( instance, "vkResetQueryPool" ) );
- vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetInstanceProcAddr( instance, "vkResetQueryPoolEXT" ) );
- if ( !vkResetQueryPool )
- vkResetQueryPool = vkResetQueryPoolEXT;
- vkSetDebugUtilsObjectNameEXT =
- PFN_vkSetDebugUtilsObjectNameEXT( vkGetInstanceProcAddr( instance, "vkSetDebugUtilsObjectNameEXT" ) );
- vkSetDebugUtilsObjectTagEXT =
- PFN_vkSetDebugUtilsObjectTagEXT( vkGetInstanceProcAddr( instance, "vkSetDebugUtilsObjectTagEXT" ) );
- vkSetEvent = PFN_vkSetEvent( vkGetInstanceProcAddr( instance, "vkSetEvent" ) );
- vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetInstanceProcAddr( instance, "vkSetHdrMetadataEXT" ) );
- vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetInstanceProcAddr( instance, "vkSetLocalDimmingAMD" ) );
- vkSetPrivateDataEXT = PFN_vkSetPrivateDataEXT( vkGetInstanceProcAddr( instance, "vkSetPrivateDataEXT" ) );
- vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetInstanceProcAddr( instance, "vkSignalSemaphore" ) );
- vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetInstanceProcAddr( instance, "vkSignalSemaphoreKHR" ) );
- if ( !vkSignalSemaphore )
- vkSignalSemaphore = vkSignalSemaphoreKHR;
- vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetInstanceProcAddr( instance, "vkTrimCommandPool" ) );
- vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetInstanceProcAddr( instance, "vkTrimCommandPoolKHR" ) );
- if ( !vkTrimCommandPool )
- vkTrimCommandPool = vkTrimCommandPoolKHR;
- vkUninitializePerformanceApiINTEL =
- PFN_vkUninitializePerformanceApiINTEL( vkGetInstanceProcAddr( instance, "vkUninitializePerformanceApiINTEL" ) );
- vkUnmapMemory = PFN_vkUnmapMemory( vkGetInstanceProcAddr( instance, "vkUnmapMemory" ) );
- vkUpdateDescriptorSetWithTemplate =
- PFN_vkUpdateDescriptorSetWithTemplate( vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSetWithTemplate" ) );
- vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR(
- vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSetWithTemplateKHR" ) );
- if ( !vkUpdateDescriptorSetWithTemplate )
- vkUpdateDescriptorSetWithTemplate = vkUpdateDescriptorSetWithTemplateKHR;
- vkUpdateDescriptorSets =
- PFN_vkUpdateDescriptorSets( vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSets" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkUpdateVideoSessionParametersKHR =
- PFN_vkUpdateVideoSessionParametersKHR( vkGetInstanceProcAddr( instance, "vkUpdateVideoSessionParametersKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkWaitForFences = PFN_vkWaitForFences( vkGetInstanceProcAddr( instance, "vkWaitForFences" ) );
- vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetInstanceProcAddr( instance, "vkWaitSemaphores" ) );
- vkWaitSemaphoresKHR = PFN_vkWaitSemaphoresKHR( vkGetInstanceProcAddr( instance, "vkWaitSemaphoresKHR" ) );
- if ( !vkWaitSemaphores )
- vkWaitSemaphores = vkWaitSemaphoresKHR;
- vkWriteAccelerationStructuresPropertiesKHR = PFN_vkWriteAccelerationStructuresPropertiesKHR(
- vkGetInstanceProcAddr( instance, "vkWriteAccelerationStructuresPropertiesKHR" ) );
+
+ //=== VK_HUAWEI_subpass_shading ===
+ vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(
+ vkGetInstanceProcAddr( instance, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI" ) );
+ vkCmdSubpassShadingHUAWEI =
+ PFN_vkCmdSubpassShadingHUAWEI( vkGetInstanceProcAddr( instance, "vkCmdSubpassShadingHUAWEI" ) );
+
+ //=== VK_HUAWEI_invocation_mask ===
+ vkCmdBindInvocationMaskHUAWEI =
+ PFN_vkCmdBindInvocationMaskHUAWEI( vkGetInstanceProcAddr( instance, "vkCmdBindInvocationMaskHUAWEI" ) );
+
+ //=== VK_NV_external_memory_rdma ===
+ vkGetMemoryRemoteAddressNV =
+ PFN_vkGetMemoryRemoteAddressNV( vkGetInstanceProcAddr( instance, "vkGetMemoryRemoteAddressNV" ) );
+
+ //=== VK_EXT_extended_dynamic_state2 ===
+ vkCmdSetPatchControlPointsEXT =
+ PFN_vkCmdSetPatchControlPointsEXT( vkGetInstanceProcAddr( instance, "vkCmdSetPatchControlPointsEXT" ) );
+ vkCmdSetRasterizerDiscardEnableEXT = PFN_vkCmdSetRasterizerDiscardEnableEXT(
+ vkGetInstanceProcAddr( instance, "vkCmdSetRasterizerDiscardEnableEXT" ) );
+ vkCmdSetDepthBiasEnableEXT =
+ PFN_vkCmdSetDepthBiasEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBiasEnableEXT" ) );
+ vkCmdSetLogicOpEXT = PFN_vkCmdSetLogicOpEXT( vkGetInstanceProcAddr( instance, "vkCmdSetLogicOpEXT" ) );
+ vkCmdSetPrimitiveRestartEnableEXT =
+ PFN_vkCmdSetPrimitiveRestartEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetPrimitiveRestartEnableEXT" ) );
+
+#if defined( VK_USE_PLATFORM_SCREEN_QNX )
+ //=== VK_QNX_screen_surface ===
+ vkCreateScreenSurfaceQNX =
+ PFN_vkCreateScreenSurfaceQNX( vkGetInstanceProcAddr( instance, "vkCreateScreenSurfaceQNX" ) );
+ vkGetPhysicalDeviceScreenPresentationSupportQNX = PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceScreenPresentationSupportQNX" ) );
+#endif /*VK_USE_PLATFORM_SCREEN_QNX*/
+
+ //=== VK_EXT_color_write_enable ===
+ vkCmdSetColorWriteEnableEXT =
+ PFN_vkCmdSetColorWriteEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetColorWriteEnableEXT" ) );
+
+ //=== VK_EXT_multi_draw ===
+ vkCmdDrawMultiEXT = PFN_vkCmdDrawMultiEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMultiEXT" ) );
+ vkCmdDrawMultiIndexedEXT =
+ PFN_vkCmdDrawMultiIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMultiIndexedEXT" ) );
}
void init( VULKAN_HPP_NAMESPACE::Device deviceCpp ) VULKAN_HPP_NOEXCEPT
{
VkDevice device = static_cast<VkDevice>( deviceCpp );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkAcquireFullScreenExclusiveModeEXT =
- PFN_vkAcquireFullScreenExclusiveModeEXT( vkGetDeviceProcAddr( device, "vkAcquireFullScreenExclusiveModeEXT" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkAcquireNextImage2KHR = PFN_vkAcquireNextImage2KHR( vkGetDeviceProcAddr( device, "vkAcquireNextImage2KHR" ) );
- vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetDeviceProcAddr( device, "vkAcquireNextImageKHR" ) );
- vkAcquirePerformanceConfigurationINTEL = PFN_vkAcquirePerformanceConfigurationINTEL(
- vkGetDeviceProcAddr( device, "vkAcquirePerformanceConfigurationINTEL" ) );
- vkAcquireProfilingLockKHR =
- PFN_vkAcquireProfilingLockKHR( vkGetDeviceProcAddr( device, "vkAcquireProfilingLockKHR" ) );
- vkAllocateCommandBuffers =
- PFN_vkAllocateCommandBuffers( vkGetDeviceProcAddr( device, "vkAllocateCommandBuffers" ) );
+
+ //=== VK_VERSION_1_0 ===
+ vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetDeviceProcAddr( device, "vkGetDeviceProcAddr" ) );
+ vkDestroyDevice = PFN_vkDestroyDevice( vkGetDeviceProcAddr( device, "vkDestroyDevice" ) );
+ vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetDeviceProcAddr( device, "vkGetDeviceQueue" ) );
+ vkQueueSubmit = PFN_vkQueueSubmit( vkGetDeviceProcAddr( device, "vkQueueSubmit" ) );
+ vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetDeviceProcAddr( device, "vkQueueWaitIdle" ) );
+ vkDeviceWaitIdle = PFN_vkDeviceWaitIdle( vkGetDeviceProcAddr( device, "vkDeviceWaitIdle" ) );
+ vkAllocateMemory = PFN_vkAllocateMemory( vkGetDeviceProcAddr( device, "vkAllocateMemory" ) );
+ vkFreeMemory = PFN_vkFreeMemory( vkGetDeviceProcAddr( device, "vkFreeMemory" ) );
+ vkMapMemory = PFN_vkMapMemory( vkGetDeviceProcAddr( device, "vkMapMemory" ) );
+ vkUnmapMemory = PFN_vkUnmapMemory( vkGetDeviceProcAddr( device, "vkUnmapMemory" ) );
+ vkFlushMappedMemoryRanges =
+ PFN_vkFlushMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkFlushMappedMemoryRanges" ) );
+ vkInvalidateMappedMemoryRanges =
+ PFN_vkInvalidateMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkInvalidateMappedMemoryRanges" ) );
+ vkGetDeviceMemoryCommitment =
+ PFN_vkGetDeviceMemoryCommitment( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryCommitment" ) );
+ vkBindBufferMemory = PFN_vkBindBufferMemory( vkGetDeviceProcAddr( device, "vkBindBufferMemory" ) );
+ vkBindImageMemory = PFN_vkBindImageMemory( vkGetDeviceProcAddr( device, "vkBindImageMemory" ) );
+ vkGetBufferMemoryRequirements =
+ PFN_vkGetBufferMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements" ) );
+ vkGetImageMemoryRequirements =
+ PFN_vkGetImageMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements" ) );
+ vkGetImageSparseMemoryRequirements =
+ PFN_vkGetImageSparseMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements" ) );
+ vkQueueBindSparse = PFN_vkQueueBindSparse( vkGetDeviceProcAddr( device, "vkQueueBindSparse" ) );
+ vkCreateFence = PFN_vkCreateFence( vkGetDeviceProcAddr( device, "vkCreateFence" ) );
+ vkDestroyFence = PFN_vkDestroyFence( vkGetDeviceProcAddr( device, "vkDestroyFence" ) );
+ vkResetFences = PFN_vkResetFences( vkGetDeviceProcAddr( device, "vkResetFences" ) );
+ vkGetFenceStatus = PFN_vkGetFenceStatus( vkGetDeviceProcAddr( device, "vkGetFenceStatus" ) );
+ vkWaitForFences = PFN_vkWaitForFences( vkGetDeviceProcAddr( device, "vkWaitForFences" ) );
+ vkCreateSemaphore = PFN_vkCreateSemaphore( vkGetDeviceProcAddr( device, "vkCreateSemaphore" ) );
+ vkDestroySemaphore = PFN_vkDestroySemaphore( vkGetDeviceProcAddr( device, "vkDestroySemaphore" ) );
+ vkCreateEvent = PFN_vkCreateEvent( vkGetDeviceProcAddr( device, "vkCreateEvent" ) );
+ vkDestroyEvent = PFN_vkDestroyEvent( vkGetDeviceProcAddr( device, "vkDestroyEvent" ) );
+ vkGetEventStatus = PFN_vkGetEventStatus( vkGetDeviceProcAddr( device, "vkGetEventStatus" ) );
+ vkSetEvent = PFN_vkSetEvent( vkGetDeviceProcAddr( device, "vkSetEvent" ) );
+ vkResetEvent = PFN_vkResetEvent( vkGetDeviceProcAddr( device, "vkResetEvent" ) );
+ vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetDeviceProcAddr( device, "vkCreateQueryPool" ) );
+ vkDestroyQueryPool = PFN_vkDestroyQueryPool( vkGetDeviceProcAddr( device, "vkDestroyQueryPool" ) );
+ vkGetQueryPoolResults = PFN_vkGetQueryPoolResults( vkGetDeviceProcAddr( device, "vkGetQueryPoolResults" ) );
+ vkCreateBuffer = PFN_vkCreateBuffer( vkGetDeviceProcAddr( device, "vkCreateBuffer" ) );
+ vkDestroyBuffer = PFN_vkDestroyBuffer( vkGetDeviceProcAddr( device, "vkDestroyBuffer" ) );
+ vkCreateBufferView = PFN_vkCreateBufferView( vkGetDeviceProcAddr( device, "vkCreateBufferView" ) );
+ vkDestroyBufferView = PFN_vkDestroyBufferView( vkGetDeviceProcAddr( device, "vkDestroyBufferView" ) );
+ vkCreateImage = PFN_vkCreateImage( vkGetDeviceProcAddr( device, "vkCreateImage" ) );
+ vkDestroyImage = PFN_vkDestroyImage( vkGetDeviceProcAddr( device, "vkDestroyImage" ) );
+ vkGetImageSubresourceLayout =
+ PFN_vkGetImageSubresourceLayout( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout" ) );
+ vkCreateImageView = PFN_vkCreateImageView( vkGetDeviceProcAddr( device, "vkCreateImageView" ) );
+ vkDestroyImageView = PFN_vkDestroyImageView( vkGetDeviceProcAddr( device, "vkDestroyImageView" ) );
+ vkCreateShaderModule = PFN_vkCreateShaderModule( vkGetDeviceProcAddr( device, "vkCreateShaderModule" ) );
+ vkDestroyShaderModule = PFN_vkDestroyShaderModule( vkGetDeviceProcAddr( device, "vkDestroyShaderModule" ) );
+ vkCreatePipelineCache = PFN_vkCreatePipelineCache( vkGetDeviceProcAddr( device, "vkCreatePipelineCache" ) );
+ vkDestroyPipelineCache = PFN_vkDestroyPipelineCache( vkGetDeviceProcAddr( device, "vkDestroyPipelineCache" ) );
+ vkGetPipelineCacheData = PFN_vkGetPipelineCacheData( vkGetDeviceProcAddr( device, "vkGetPipelineCacheData" ) );
+ vkMergePipelineCaches = PFN_vkMergePipelineCaches( vkGetDeviceProcAddr( device, "vkMergePipelineCaches" ) );
+ vkCreateGraphicsPipelines =
+ PFN_vkCreateGraphicsPipelines( vkGetDeviceProcAddr( device, "vkCreateGraphicsPipelines" ) );
+ vkCreateComputePipelines =
+ PFN_vkCreateComputePipelines( vkGetDeviceProcAddr( device, "vkCreateComputePipelines" ) );
+ vkDestroyPipeline = PFN_vkDestroyPipeline( vkGetDeviceProcAddr( device, "vkDestroyPipeline" ) );
+ vkCreatePipelineLayout = PFN_vkCreatePipelineLayout( vkGetDeviceProcAddr( device, "vkCreatePipelineLayout" ) );
+ vkDestroyPipelineLayout = PFN_vkDestroyPipelineLayout( vkGetDeviceProcAddr( device, "vkDestroyPipelineLayout" ) );
+ vkCreateSampler = PFN_vkCreateSampler( vkGetDeviceProcAddr( device, "vkCreateSampler" ) );
+ vkDestroySampler = PFN_vkDestroySampler( vkGetDeviceProcAddr( device, "vkDestroySampler" ) );
+ vkCreateDescriptorSetLayout =
+ PFN_vkCreateDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkCreateDescriptorSetLayout" ) );
+ vkDestroyDescriptorSetLayout =
+ PFN_vkDestroyDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkDestroyDescriptorSetLayout" ) );
+ vkCreateDescriptorPool = PFN_vkCreateDescriptorPool( vkGetDeviceProcAddr( device, "vkCreateDescriptorPool" ) );
+ vkDestroyDescriptorPool = PFN_vkDestroyDescriptorPool( vkGetDeviceProcAddr( device, "vkDestroyDescriptorPool" ) );
+ vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetDeviceProcAddr( device, "vkResetDescriptorPool" ) );
vkAllocateDescriptorSets =
PFN_vkAllocateDescriptorSets( vkGetDeviceProcAddr( device, "vkAllocateDescriptorSets" ) );
- vkAllocateMemory = PFN_vkAllocateMemory( vkGetDeviceProcAddr( device, "vkAllocateMemory" ) );
- vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetDeviceProcAddr( device, "vkBeginCommandBuffer" ) );
- vkBindAccelerationStructureMemoryNV =
- PFN_vkBindAccelerationStructureMemoryNV( vkGetDeviceProcAddr( device, "vkBindAccelerationStructureMemoryNV" ) );
- vkBindBufferMemory = PFN_vkBindBufferMemory( vkGetDeviceProcAddr( device, "vkBindBufferMemory" ) );
- vkBindBufferMemory2 = PFN_vkBindBufferMemory2( vkGetDeviceProcAddr( device, "vkBindBufferMemory2" ) );
- vkBindBufferMemory2KHR = PFN_vkBindBufferMemory2KHR( vkGetDeviceProcAddr( device, "vkBindBufferMemory2KHR" ) );
- if ( !vkBindBufferMemory2 )
- vkBindBufferMemory2 = vkBindBufferMemory2KHR;
- vkBindImageMemory = PFN_vkBindImageMemory( vkGetDeviceProcAddr( device, "vkBindImageMemory" ) );
- vkBindImageMemory2 = PFN_vkBindImageMemory2( vkGetDeviceProcAddr( device, "vkBindImageMemory2" ) );
- vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR( vkGetDeviceProcAddr( device, "vkBindImageMemory2KHR" ) );
- if ( !vkBindImageMemory2 )
- vkBindImageMemory2 = vkBindImageMemory2KHR;
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkBindVideoSessionMemoryKHR =
- PFN_vkBindVideoSessionMemoryKHR( vkGetDeviceProcAddr( device, "vkBindVideoSessionMemoryKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkBuildAccelerationStructuresKHR =
- PFN_vkBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkBuildAccelerationStructuresKHR" ) );
- vkCmdBeginConditionalRenderingEXT =
- PFN_vkCmdBeginConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdBeginConditionalRenderingEXT" ) );
- vkCmdBeginDebugUtilsLabelEXT =
- PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdBeginDebugUtilsLabelEXT" ) );
- vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetDeviceProcAddr( device, "vkCmdBeginQuery" ) );
- vkCmdBeginQueryIndexedEXT =
- PFN_vkCmdBeginQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdBeginQueryIndexedEXT" ) );
- vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass" ) );
- vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2" ) );
- vkCmdBeginRenderPass2KHR =
- PFN_vkCmdBeginRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2KHR" ) );
- if ( !vkCmdBeginRenderPass2 )
- vkCmdBeginRenderPass2 = vkCmdBeginRenderPass2KHR;
- vkCmdBeginTransformFeedbackEXT =
- PFN_vkCmdBeginTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdBeginTransformFeedbackEXT" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCmdBeginVideoCodingKHR =
- PFN_vkCmdBeginVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdBeginVideoCodingKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+ vkFreeDescriptorSets = PFN_vkFreeDescriptorSets( vkGetDeviceProcAddr( device, "vkFreeDescriptorSets" ) );
+ vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSets" ) );
+ vkCreateFramebuffer = PFN_vkCreateFramebuffer( vkGetDeviceProcAddr( device, "vkCreateFramebuffer" ) );
+ vkDestroyFramebuffer = PFN_vkDestroyFramebuffer( vkGetDeviceProcAddr( device, "vkDestroyFramebuffer" ) );
+ vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetDeviceProcAddr( device, "vkCreateRenderPass" ) );
+ vkDestroyRenderPass = PFN_vkDestroyRenderPass( vkGetDeviceProcAddr( device, "vkDestroyRenderPass" ) );
+ vkGetRenderAreaGranularity =
+ PFN_vkGetRenderAreaGranularity( vkGetDeviceProcAddr( device, "vkGetRenderAreaGranularity" ) );
+ vkCreateCommandPool = PFN_vkCreateCommandPool( vkGetDeviceProcAddr( device, "vkCreateCommandPool" ) );
+ vkDestroyCommandPool = PFN_vkDestroyCommandPool( vkGetDeviceProcAddr( device, "vkDestroyCommandPool" ) );
+ vkResetCommandPool = PFN_vkResetCommandPool( vkGetDeviceProcAddr( device, "vkResetCommandPool" ) );
+ vkAllocateCommandBuffers =
+ PFN_vkAllocateCommandBuffers( vkGetDeviceProcAddr( device, "vkAllocateCommandBuffers" ) );
+ vkFreeCommandBuffers = PFN_vkFreeCommandBuffers( vkGetDeviceProcAddr( device, "vkFreeCommandBuffers" ) );
+ vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetDeviceProcAddr( device, "vkBeginCommandBuffer" ) );
+ vkEndCommandBuffer = PFN_vkEndCommandBuffer( vkGetDeviceProcAddr( device, "vkEndCommandBuffer" ) );
+ vkResetCommandBuffer = PFN_vkResetCommandBuffer( vkGetDeviceProcAddr( device, "vkResetCommandBuffer" ) );
+ vkCmdBindPipeline = PFN_vkCmdBindPipeline( vkGetDeviceProcAddr( device, "vkCmdBindPipeline" ) );
+ vkCmdSetViewport = PFN_vkCmdSetViewport( vkGetDeviceProcAddr( device, "vkCmdSetViewport" ) );
+ vkCmdSetScissor = PFN_vkCmdSetScissor( vkGetDeviceProcAddr( device, "vkCmdSetScissor" ) );
+ vkCmdSetLineWidth = PFN_vkCmdSetLineWidth( vkGetDeviceProcAddr( device, "vkCmdSetLineWidth" ) );
+ vkCmdSetDepthBias = PFN_vkCmdSetDepthBias( vkGetDeviceProcAddr( device, "vkCmdSetDepthBias" ) );
+ vkCmdSetBlendConstants = PFN_vkCmdSetBlendConstants( vkGetDeviceProcAddr( device, "vkCmdSetBlendConstants" ) );
+ vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds( vkGetDeviceProcAddr( device, "vkCmdSetDepthBounds" ) );
+ vkCmdSetStencilCompareMask =
+ PFN_vkCmdSetStencilCompareMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilCompareMask" ) );
+ vkCmdSetStencilWriteMask =
+ PFN_vkCmdSetStencilWriteMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilWriteMask" ) );
+ vkCmdSetStencilReference =
+ PFN_vkCmdSetStencilReference( vkGetDeviceProcAddr( device, "vkCmdSetStencilReference" ) );
vkCmdBindDescriptorSets = PFN_vkCmdBindDescriptorSets( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorSets" ) );
vkCmdBindIndexBuffer = PFN_vkCmdBindIndexBuffer( vkGetDeviceProcAddr( device, "vkCmdBindIndexBuffer" ) );
- vkCmdBindPipeline = PFN_vkCmdBindPipeline( vkGetDeviceProcAddr( device, "vkCmdBindPipeline" ) );
- vkCmdBindPipelineShaderGroupNV =
- PFN_vkCmdBindPipelineShaderGroupNV( vkGetDeviceProcAddr( device, "vkCmdBindPipelineShaderGroupNV" ) );
- vkCmdBindShadingRateImageNV =
- PFN_vkCmdBindShadingRateImageNV( vkGetDeviceProcAddr( device, "vkCmdBindShadingRateImageNV" ) );
- vkCmdBindTransformFeedbackBuffersEXT = PFN_vkCmdBindTransformFeedbackBuffersEXT(
- vkGetDeviceProcAddr( device, "vkCmdBindTransformFeedbackBuffersEXT" ) );
- vkCmdBindVertexBuffers = PFN_vkCmdBindVertexBuffers( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers" ) );
- vkCmdBindVertexBuffers2EXT =
- PFN_vkCmdBindVertexBuffers2EXT( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers2EXT" ) );
- vkCmdBlitImage = PFN_vkCmdBlitImage( vkGetDeviceProcAddr( device, "vkCmdBlitImage" ) );
- vkCmdBlitImage2KHR = PFN_vkCmdBlitImage2KHR( vkGetDeviceProcAddr( device, "vkCmdBlitImage2KHR" ) );
- vkCmdBuildAccelerationStructureNV =
- PFN_vkCmdBuildAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructureNV" ) );
- vkCmdBuildAccelerationStructuresIndirectKHR = PFN_vkCmdBuildAccelerationStructuresIndirectKHR(
- vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresIndirectKHR" ) );
- vkCmdBuildAccelerationStructuresKHR =
- PFN_vkCmdBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresKHR" ) );
- vkCmdClearAttachments = PFN_vkCmdClearAttachments( vkGetDeviceProcAddr( device, "vkCmdClearAttachments" ) );
- vkCmdClearColorImage = PFN_vkCmdClearColorImage( vkGetDeviceProcAddr( device, "vkCmdClearColorImage" ) );
- vkCmdClearDepthStencilImage =
- PFN_vkCmdClearDepthStencilImage( vkGetDeviceProcAddr( device, "vkCmdClearDepthStencilImage" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCmdControlVideoCodingKHR =
- PFN_vkCmdControlVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdControlVideoCodingKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkCmdCopyAccelerationStructureKHR =
- PFN_vkCmdCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureKHR" ) );
- vkCmdCopyAccelerationStructureNV =
- PFN_vkCmdCopyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureNV" ) );
- vkCmdCopyAccelerationStructureToMemoryKHR = PFN_vkCmdCopyAccelerationStructureToMemoryKHR(
- vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureToMemoryKHR" ) );
+ vkCmdBindVertexBuffers = PFN_vkCmdBindVertexBuffers( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers" ) );
+ vkCmdDraw = PFN_vkCmdDraw( vkGetDeviceProcAddr( device, "vkCmdDraw" ) );
+ vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetDeviceProcAddr( device, "vkCmdDrawIndexed" ) );
+ vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndirect" ) );
+ vkCmdDrawIndexedIndirect =
+ PFN_vkCmdDrawIndexedIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirect" ) );
+ vkCmdDispatch = PFN_vkCmdDispatch( vkGetDeviceProcAddr( device, "vkCmdDispatch" ) );
+ vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect( vkGetDeviceProcAddr( device, "vkCmdDispatchIndirect" ) );
vkCmdCopyBuffer = PFN_vkCmdCopyBuffer( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer" ) );
- vkCmdCopyBuffer2KHR = PFN_vkCmdCopyBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer2KHR" ) );
- vkCmdCopyBufferToImage = PFN_vkCmdCopyBufferToImage( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage" ) );
- vkCmdCopyBufferToImage2KHR =
- PFN_vkCmdCopyBufferToImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage2KHR" ) );
vkCmdCopyImage = PFN_vkCmdCopyImage( vkGetDeviceProcAddr( device, "vkCmdCopyImage" ) );
- vkCmdCopyImage2KHR = PFN_vkCmdCopyImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImage2KHR" ) );
+ vkCmdBlitImage = PFN_vkCmdBlitImage( vkGetDeviceProcAddr( device, "vkCmdBlitImage" ) );
+ vkCmdCopyBufferToImage = PFN_vkCmdCopyBufferToImage( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage" ) );
vkCmdCopyImageToBuffer = PFN_vkCmdCopyImageToBuffer( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer" ) );
- vkCmdCopyImageToBuffer2KHR =
- PFN_vkCmdCopyImageToBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer2KHR" ) );
- vkCmdCopyMemoryToAccelerationStructureKHR = PFN_vkCmdCopyMemoryToAccelerationStructureKHR(
- vkGetDeviceProcAddr( device, "vkCmdCopyMemoryToAccelerationStructureKHR" ) );
+ vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer( vkGetDeviceProcAddr( device, "vkCmdUpdateBuffer" ) );
+ vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetDeviceProcAddr( device, "vkCmdFillBuffer" ) );
+ vkCmdClearColorImage = PFN_vkCmdClearColorImage( vkGetDeviceProcAddr( device, "vkCmdClearColorImage" ) );
+ vkCmdClearDepthStencilImage =
+ PFN_vkCmdClearDepthStencilImage( vkGetDeviceProcAddr( device, "vkCmdClearDepthStencilImage" ) );
+ vkCmdClearAttachments = PFN_vkCmdClearAttachments( vkGetDeviceProcAddr( device, "vkCmdClearAttachments" ) );
+ vkCmdResolveImage = PFN_vkCmdResolveImage( vkGetDeviceProcAddr( device, "vkCmdResolveImage" ) );
+ vkCmdSetEvent = PFN_vkCmdSetEvent( vkGetDeviceProcAddr( device, "vkCmdSetEvent" ) );
+ vkCmdResetEvent = PFN_vkCmdResetEvent( vkGetDeviceProcAddr( device, "vkCmdResetEvent" ) );
+ vkCmdWaitEvents = PFN_vkCmdWaitEvents( vkGetDeviceProcAddr( device, "vkCmdWaitEvents" ) );
+ vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier" ) );
+ vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetDeviceProcAddr( device, "vkCmdBeginQuery" ) );
+ vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetDeviceProcAddr( device, "vkCmdEndQuery" ) );
+ vkCmdResetQueryPool = PFN_vkCmdResetQueryPool( vkGetDeviceProcAddr( device, "vkCmdResetQueryPool" ) );
+ vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp" ) );
vkCmdCopyQueryPoolResults =
PFN_vkCmdCopyQueryPoolResults( vkGetDeviceProcAddr( device, "vkCmdCopyQueryPoolResults" ) );
- vkCmdCuLaunchKernelNVX = PFN_vkCmdCuLaunchKernelNVX( vkGetDeviceProcAddr( device, "vkCmdCuLaunchKernelNVX" ) );
+ vkCmdPushConstants = PFN_vkCmdPushConstants( vkGetDeviceProcAddr( device, "vkCmdPushConstants" ) );
+ vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass" ) );
+ vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetDeviceProcAddr( device, "vkCmdNextSubpass" ) );
+ vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass" ) );
+ vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetDeviceProcAddr( device, "vkCmdExecuteCommands" ) );
+
+ //=== VK_VERSION_1_1 ===
+ vkBindBufferMemory2 = PFN_vkBindBufferMemory2( vkGetDeviceProcAddr( device, "vkBindBufferMemory2" ) );
+ vkBindImageMemory2 = PFN_vkBindImageMemory2( vkGetDeviceProcAddr( device, "vkBindImageMemory2" ) );
+ vkGetDeviceGroupPeerMemoryFeatures =
+ PFN_vkGetDeviceGroupPeerMemoryFeatures( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeatures" ) );
+ vkCmdSetDeviceMask = PFN_vkCmdSetDeviceMask( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMask" ) );
+ vkCmdDispatchBase = PFN_vkCmdDispatchBase( vkGetDeviceProcAddr( device, "vkCmdDispatchBase" ) );
+ vkGetImageMemoryRequirements2 =
+ PFN_vkGetImageMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2" ) );
+ vkGetBufferMemoryRequirements2 =
+ PFN_vkGetBufferMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2" ) );
+ vkGetImageSparseMemoryRequirements2 =
+ PFN_vkGetImageSparseMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2" ) );
+ vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetDeviceProcAddr( device, "vkTrimCommandPool" ) );
+ vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetDeviceProcAddr( device, "vkGetDeviceQueue2" ) );
+ vkCreateSamplerYcbcrConversion =
+ PFN_vkCreateSamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversion" ) );
+ vkDestroySamplerYcbcrConversion =
+ PFN_vkDestroySamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversion" ) );
+ vkCreateDescriptorUpdateTemplate =
+ PFN_vkCreateDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplate" ) );
+ vkDestroyDescriptorUpdateTemplate =
+ PFN_vkDestroyDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplate" ) );
+ vkUpdateDescriptorSetWithTemplate =
+ PFN_vkUpdateDescriptorSetWithTemplate( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplate" ) );
+ vkGetDescriptorSetLayoutSupport =
+ PFN_vkGetDescriptorSetLayoutSupport( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupport" ) );
+
+ //=== VK_VERSION_1_2 ===
+ vkCmdDrawIndirectCount = PFN_vkCmdDrawIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCount" ) );
+ vkCmdDrawIndexedIndirectCount =
+ PFN_vkCmdDrawIndexedIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCount" ) );
+ vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetDeviceProcAddr( device, "vkCreateRenderPass2" ) );
+ vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2" ) );
+ vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2" ) );
+ vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2" ) );
+ vkResetQueryPool = PFN_vkResetQueryPool( vkGetDeviceProcAddr( device, "vkResetQueryPool" ) );
+ vkGetSemaphoreCounterValue =
+ PFN_vkGetSemaphoreCounterValue( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValue" ) );
+ vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetDeviceProcAddr( device, "vkWaitSemaphores" ) );
+ vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetDeviceProcAddr( device, "vkSignalSemaphore" ) );
+ vkGetBufferDeviceAddress =
+ PFN_vkGetBufferDeviceAddress( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddress" ) );
+ vkGetBufferOpaqueCaptureAddress =
+ PFN_vkGetBufferOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddress" ) );
+ vkGetDeviceMemoryOpaqueCaptureAddress = PFN_vkGetDeviceMemoryOpaqueCaptureAddress(
+ vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddress" ) );
+
+ //=== VK_KHR_swapchain ===
+ vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR( vkGetDeviceProcAddr( device, "vkCreateSwapchainKHR" ) );
+ vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR( vkGetDeviceProcAddr( device, "vkDestroySwapchainKHR" ) );
+ vkGetSwapchainImagesKHR = PFN_vkGetSwapchainImagesKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainImagesKHR" ) );
+ vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetDeviceProcAddr( device, "vkAcquireNextImageKHR" ) );
+ vkQueuePresentKHR = PFN_vkQueuePresentKHR( vkGetDeviceProcAddr( device, "vkQueuePresentKHR" ) );
+ vkGetDeviceGroupPresentCapabilitiesKHR = PFN_vkGetDeviceGroupPresentCapabilitiesKHR(
+ vkGetDeviceProcAddr( device, "vkGetDeviceGroupPresentCapabilitiesKHR" ) );
+ vkGetDeviceGroupSurfacePresentModesKHR = PFN_vkGetDeviceGroupSurfacePresentModesKHR(
+ vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModesKHR" ) );
+ vkAcquireNextImage2KHR = PFN_vkAcquireNextImage2KHR( vkGetDeviceProcAddr( device, "vkAcquireNextImage2KHR" ) );
+
+ //=== VK_KHR_display_swapchain ===
+ vkCreateSharedSwapchainsKHR =
+ PFN_vkCreateSharedSwapchainsKHR( vkGetDeviceProcAddr( device, "vkCreateSharedSwapchainsKHR" ) );
+
+ //=== VK_EXT_debug_marker ===
+ vkDebugMarkerSetObjectTagEXT =
+ PFN_vkDebugMarkerSetObjectTagEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectTagEXT" ) );
+ vkDebugMarkerSetObjectNameEXT =
+ PFN_vkDebugMarkerSetObjectNameEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectNameEXT" ) );
vkCmdDebugMarkerBeginEXT =
PFN_vkCmdDebugMarkerBeginEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerBeginEXT" ) );
vkCmdDebugMarkerEndEXT = PFN_vkCmdDebugMarkerEndEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerEndEXT" ) );
vkCmdDebugMarkerInsertEXT =
PFN_vkCmdDebugMarkerInsertEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerInsertEXT" ) );
+
#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_queue ===
+ vkCreateVideoSessionKHR = PFN_vkCreateVideoSessionKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionKHR" ) );
+ vkDestroyVideoSessionKHR =
+ PFN_vkDestroyVideoSessionKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionKHR" ) );
+ vkGetVideoSessionMemoryRequirementsKHR = PFN_vkGetVideoSessionMemoryRequirementsKHR(
+ vkGetDeviceProcAddr( device, "vkGetVideoSessionMemoryRequirementsKHR" ) );
+ vkBindVideoSessionMemoryKHR =
+ PFN_vkBindVideoSessionMemoryKHR( vkGetDeviceProcAddr( device, "vkBindVideoSessionMemoryKHR" ) );
+ vkCreateVideoSessionParametersKHR =
+ PFN_vkCreateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionParametersKHR" ) );
+ vkUpdateVideoSessionParametersKHR =
+ PFN_vkUpdateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkUpdateVideoSessionParametersKHR" ) );
+ vkDestroyVideoSessionParametersKHR =
+ PFN_vkDestroyVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionParametersKHR" ) );
+ vkCmdBeginVideoCodingKHR =
+ PFN_vkCmdBeginVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdBeginVideoCodingKHR" ) );
+ vkCmdEndVideoCodingKHR = PFN_vkCmdEndVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdEndVideoCodingKHR" ) );
+ vkCmdControlVideoCodingKHR =
+ PFN_vkCmdControlVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdControlVideoCodingKHR" ) );
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_decode_queue ===
vkCmdDecodeVideoKHR = PFN_vkCmdDecodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdDecodeVideoKHR" ) );
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkCmdDispatch = PFN_vkCmdDispatch( vkGetDeviceProcAddr( device, "vkCmdDispatch" ) );
- vkCmdDispatchBase = PFN_vkCmdDispatchBase( vkGetDeviceProcAddr( device, "vkCmdDispatchBase" ) );
- vkCmdDispatchBaseKHR = PFN_vkCmdDispatchBaseKHR( vkGetDeviceProcAddr( device, "vkCmdDispatchBaseKHR" ) );
- if ( !vkCmdDispatchBase )
- vkCmdDispatchBase = vkCmdDispatchBaseKHR;
- vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect( vkGetDeviceProcAddr( device, "vkCmdDispatchIndirect" ) );
- vkCmdDraw = PFN_vkCmdDraw( vkGetDeviceProcAddr( device, "vkCmdDraw" ) );
- vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetDeviceProcAddr( device, "vkCmdDrawIndexed" ) );
- vkCmdDrawIndexedIndirect =
- PFN_vkCmdDrawIndexedIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirect" ) );
- vkCmdDrawIndexedIndirectCount =
- PFN_vkCmdDrawIndexedIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCount" ) );
- vkCmdDrawIndexedIndirectCountAMD =
- PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountAMD" ) );
- if ( !vkCmdDrawIndexedIndirectCount )
- vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountAMD;
- vkCmdDrawIndexedIndirectCountKHR =
- PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountKHR" ) );
- if ( !vkCmdDrawIndexedIndirectCount )
- vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountKHR;
- vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndirect" ) );
+
+ //=== VK_EXT_transform_feedback ===
+ vkCmdBindTransformFeedbackBuffersEXT = PFN_vkCmdBindTransformFeedbackBuffersEXT(
+ vkGetDeviceProcAddr( device, "vkCmdBindTransformFeedbackBuffersEXT" ) );
+ vkCmdBeginTransformFeedbackEXT =
+ PFN_vkCmdBeginTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdBeginTransformFeedbackEXT" ) );
+ vkCmdEndTransformFeedbackEXT =
+ PFN_vkCmdEndTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdEndTransformFeedbackEXT" ) );
+ vkCmdBeginQueryIndexedEXT =
+ PFN_vkCmdBeginQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdBeginQueryIndexedEXT" ) );
+ vkCmdEndQueryIndexedEXT = PFN_vkCmdEndQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdEndQueryIndexedEXT" ) );
vkCmdDrawIndirectByteCountEXT =
PFN_vkCmdDrawIndirectByteCountEXT( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectByteCountEXT" ) );
- vkCmdDrawIndirectCount = PFN_vkCmdDrawIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCount" ) );
+
+ //=== VK_NVX_binary_import ===
+ vkCreateCuModuleNVX = PFN_vkCreateCuModuleNVX( vkGetDeviceProcAddr( device, "vkCreateCuModuleNVX" ) );
+ vkCreateCuFunctionNVX = PFN_vkCreateCuFunctionNVX( vkGetDeviceProcAddr( device, "vkCreateCuFunctionNVX" ) );
+ vkDestroyCuModuleNVX = PFN_vkDestroyCuModuleNVX( vkGetDeviceProcAddr( device, "vkDestroyCuModuleNVX" ) );
+ vkDestroyCuFunctionNVX = PFN_vkDestroyCuFunctionNVX( vkGetDeviceProcAddr( device, "vkDestroyCuFunctionNVX" ) );
+ vkCmdCuLaunchKernelNVX = PFN_vkCmdCuLaunchKernelNVX( vkGetDeviceProcAddr( device, "vkCmdCuLaunchKernelNVX" ) );
+
+ //=== VK_NVX_image_view_handle ===
+ vkGetImageViewHandleNVX = PFN_vkGetImageViewHandleNVX( vkGetDeviceProcAddr( device, "vkGetImageViewHandleNVX" ) );
+ vkGetImageViewAddressNVX =
+ PFN_vkGetImageViewAddressNVX( vkGetDeviceProcAddr( device, "vkGetImageViewAddressNVX" ) );
+
+ //=== VK_AMD_draw_indirect_count ===
vkCmdDrawIndirectCountAMD =
PFN_vkCmdDrawIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountAMD" ) );
if ( !vkCmdDrawIndirectCount )
vkCmdDrawIndirectCount = vkCmdDrawIndirectCountAMD;
- vkCmdDrawIndirectCountKHR =
- PFN_vkCmdDrawIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountKHR" ) );
- if ( !vkCmdDrawIndirectCount )
- vkCmdDrawIndirectCount = vkCmdDrawIndirectCountKHR;
- vkCmdDrawMeshTasksIndirectCountNV =
- PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectCountNV" ) );
- vkCmdDrawMeshTasksIndirectNV =
- PFN_vkCmdDrawMeshTasksIndirectNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectNV" ) );
- vkCmdDrawMeshTasksNV = PFN_vkCmdDrawMeshTasksNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksNV" ) );
- vkCmdDrawMultiEXT = PFN_vkCmdDrawMultiEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiEXT" ) );
- vkCmdDrawMultiIndexedEXT =
- PFN_vkCmdDrawMultiIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiIndexedEXT" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCmdEncodeVideoKHR = PFN_vkCmdEncodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdEncodeVideoKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkCmdEndConditionalRenderingEXT =
- PFN_vkCmdEndConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdEndConditionalRenderingEXT" ) );
- vkCmdEndDebugUtilsLabelEXT =
- PFN_vkCmdEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdEndDebugUtilsLabelEXT" ) );
- vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetDeviceProcAddr( device, "vkCmdEndQuery" ) );
- vkCmdEndQueryIndexedEXT = PFN_vkCmdEndQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdEndQueryIndexedEXT" ) );
- vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass" ) );
- vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2" ) );
- vkCmdEndRenderPass2KHR = PFN_vkCmdEndRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2KHR" ) );
- if ( !vkCmdEndRenderPass2 )
- vkCmdEndRenderPass2 = vkCmdEndRenderPass2KHR;
- vkCmdEndTransformFeedbackEXT =
- PFN_vkCmdEndTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdEndTransformFeedbackEXT" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCmdEndVideoCodingKHR = PFN_vkCmdEndVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdEndVideoCodingKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetDeviceProcAddr( device, "vkCmdExecuteCommands" ) );
- vkCmdExecuteGeneratedCommandsNV =
- PFN_vkCmdExecuteGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdExecuteGeneratedCommandsNV" ) );
- vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetDeviceProcAddr( device, "vkCmdFillBuffer" ) );
- vkCmdInsertDebugUtilsLabelEXT =
- PFN_vkCmdInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdInsertDebugUtilsLabelEXT" ) );
- vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetDeviceProcAddr( device, "vkCmdNextSubpass" ) );
- vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2" ) );
- vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2KHR" ) );
- if ( !vkCmdNextSubpass2 )
- vkCmdNextSubpass2 = vkCmdNextSubpass2KHR;
- vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier" ) );
- vkCmdPipelineBarrier2KHR =
- PFN_vkCmdPipelineBarrier2KHR( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier2KHR" ) );
- vkCmdPreprocessGeneratedCommandsNV =
- PFN_vkCmdPreprocessGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdPreprocessGeneratedCommandsNV" ) );
- vkCmdPushConstants = PFN_vkCmdPushConstants( vkGetDeviceProcAddr( device, "vkCmdPushConstants" ) );
+ vkCmdDrawIndexedIndirectCountAMD =
+ PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountAMD" ) );
+ if ( !vkCmdDrawIndexedIndirectCount )
+ vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountAMD;
+
+ //=== VK_AMD_shader_info ===
+ vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD( vkGetDeviceProcAddr( device, "vkGetShaderInfoAMD" ) );
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_NV_external_memory_win32 ===
+ vkGetMemoryWin32HandleNV =
+ PFN_vkGetMemoryWin32HandleNV( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleNV" ) );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_device_group ===
+ vkGetDeviceGroupPeerMemoryFeaturesKHR = PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR(
+ vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeaturesKHR" ) );
+ if ( !vkGetDeviceGroupPeerMemoryFeatures )
+ vkGetDeviceGroupPeerMemoryFeatures = vkGetDeviceGroupPeerMemoryFeaturesKHR;
+ vkCmdSetDeviceMaskKHR = PFN_vkCmdSetDeviceMaskKHR( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMaskKHR" ) );
+ if ( !vkCmdSetDeviceMask )
+ vkCmdSetDeviceMask = vkCmdSetDeviceMaskKHR;
+ vkCmdDispatchBaseKHR = PFN_vkCmdDispatchBaseKHR( vkGetDeviceProcAddr( device, "vkCmdDispatchBaseKHR" ) );
+ if ( !vkCmdDispatchBase )
+ vkCmdDispatchBase = vkCmdDispatchBaseKHR;
+
+ //=== VK_KHR_maintenance1 ===
+ vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetDeviceProcAddr( device, "vkTrimCommandPoolKHR" ) );
+ if ( !vkTrimCommandPool )
+ vkTrimCommandPool = vkTrimCommandPoolKHR;
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_memory_win32 ===
+ vkGetMemoryWin32HandleKHR =
+ PFN_vkGetMemoryWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleKHR" ) );
+ vkGetMemoryWin32HandlePropertiesKHR =
+ PFN_vkGetMemoryWin32HandlePropertiesKHR( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandlePropertiesKHR" ) );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_external_memory_fd ===
+ vkGetMemoryFdKHR = PFN_vkGetMemoryFdKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdKHR" ) );
+ vkGetMemoryFdPropertiesKHR =
+ PFN_vkGetMemoryFdPropertiesKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdPropertiesKHR" ) );
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_semaphore_win32 ===
+ vkImportSemaphoreWin32HandleKHR =
+ PFN_vkImportSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreWin32HandleKHR" ) );
+ vkGetSemaphoreWin32HandleKHR =
+ PFN_vkGetSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreWin32HandleKHR" ) );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_external_semaphore_fd ===
+ vkImportSemaphoreFdKHR = PFN_vkImportSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreFdKHR" ) );
+ vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreFdKHR" ) );
+
+ //=== VK_KHR_push_descriptor ===
vkCmdPushDescriptorSetKHR =
PFN_vkCmdPushDescriptorSetKHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetKHR" ) );
vkCmdPushDescriptorSetWithTemplateKHR = PFN_vkCmdPushDescriptorSetWithTemplateKHR(
vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetWithTemplateKHR" ) );
- vkCmdResetEvent = PFN_vkCmdResetEvent( vkGetDeviceProcAddr( device, "vkCmdResetEvent" ) );
- vkCmdResetEvent2KHR = PFN_vkCmdResetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdResetEvent2KHR" ) );
- vkCmdResetQueryPool = PFN_vkCmdResetQueryPool( vkGetDeviceProcAddr( device, "vkCmdResetQueryPool" ) );
- vkCmdResolveImage = PFN_vkCmdResolveImage( vkGetDeviceProcAddr( device, "vkCmdResolveImage" ) );
- vkCmdResolveImage2KHR = PFN_vkCmdResolveImage2KHR( vkGetDeviceProcAddr( device, "vkCmdResolveImage2KHR" ) );
- vkCmdSetBlendConstants = PFN_vkCmdSetBlendConstants( vkGetDeviceProcAddr( device, "vkCmdSetBlendConstants" ) );
- vkCmdSetCheckpointNV = PFN_vkCmdSetCheckpointNV( vkGetDeviceProcAddr( device, "vkCmdSetCheckpointNV" ) );
- vkCmdSetCoarseSampleOrderNV =
- PFN_vkCmdSetCoarseSampleOrderNV( vkGetDeviceProcAddr( device, "vkCmdSetCoarseSampleOrderNV" ) );
- vkCmdSetColorWriteEnableEXT =
- PFN_vkCmdSetColorWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorWriteEnableEXT" ) );
- vkCmdSetCullModeEXT = PFN_vkCmdSetCullModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetCullModeEXT" ) );
- vkCmdSetDepthBias = PFN_vkCmdSetDepthBias( vkGetDeviceProcAddr( device, "vkCmdSetDepthBias" ) );
- vkCmdSetDepthBiasEnableEXT =
- PFN_vkCmdSetDepthBiasEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBiasEnableEXT" ) );
- vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds( vkGetDeviceProcAddr( device, "vkCmdSetDepthBounds" ) );
- vkCmdSetDepthBoundsTestEnableEXT =
- PFN_vkCmdSetDepthBoundsTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBoundsTestEnableEXT" ) );
- vkCmdSetDepthCompareOpEXT =
- PFN_vkCmdSetDepthCompareOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthCompareOpEXT" ) );
- vkCmdSetDepthTestEnableEXT =
- PFN_vkCmdSetDepthTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthTestEnableEXT" ) );
- vkCmdSetDepthWriteEnableEXT =
- PFN_vkCmdSetDepthWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthWriteEnableEXT" ) );
- vkCmdSetDeviceMask = PFN_vkCmdSetDeviceMask( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMask" ) );
- vkCmdSetDeviceMaskKHR = PFN_vkCmdSetDeviceMaskKHR( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMaskKHR" ) );
- if ( !vkCmdSetDeviceMask )
- vkCmdSetDeviceMask = vkCmdSetDeviceMaskKHR;
+
+ //=== VK_EXT_conditional_rendering ===
+ vkCmdBeginConditionalRenderingEXT =
+ PFN_vkCmdBeginConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdBeginConditionalRenderingEXT" ) );
+ vkCmdEndConditionalRenderingEXT =
+ PFN_vkCmdEndConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdEndConditionalRenderingEXT" ) );
+
+ //=== VK_KHR_descriptor_update_template ===
+ vkCreateDescriptorUpdateTemplateKHR =
+ PFN_vkCreateDescriptorUpdateTemplateKHR( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplateKHR" ) );
+ if ( !vkCreateDescriptorUpdateTemplate )
+ vkCreateDescriptorUpdateTemplate = vkCreateDescriptorUpdateTemplateKHR;
+ vkDestroyDescriptorUpdateTemplateKHR = PFN_vkDestroyDescriptorUpdateTemplateKHR(
+ vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplateKHR" ) );
+ if ( !vkDestroyDescriptorUpdateTemplate )
+ vkDestroyDescriptorUpdateTemplate = vkDestroyDescriptorUpdateTemplateKHR;
+ vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR(
+ vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplateKHR" ) );
+ if ( !vkUpdateDescriptorSetWithTemplate )
+ vkUpdateDescriptorSetWithTemplate = vkUpdateDescriptorSetWithTemplateKHR;
+
+ //=== VK_NV_clip_space_w_scaling ===
+ vkCmdSetViewportWScalingNV =
+ PFN_vkCmdSetViewportWScalingNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportWScalingNV" ) );
+
+ //=== VK_EXT_display_control ===
+ vkDisplayPowerControlEXT =
+ PFN_vkDisplayPowerControlEXT( vkGetDeviceProcAddr( device, "vkDisplayPowerControlEXT" ) );
+ vkRegisterDeviceEventEXT =
+ PFN_vkRegisterDeviceEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDeviceEventEXT" ) );
+ vkRegisterDisplayEventEXT =
+ PFN_vkRegisterDisplayEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDisplayEventEXT" ) );
+ vkGetSwapchainCounterEXT =
+ PFN_vkGetSwapchainCounterEXT( vkGetDeviceProcAddr( device, "vkGetSwapchainCounterEXT" ) );
+
+ //=== VK_GOOGLE_display_timing ===
+ vkGetRefreshCycleDurationGOOGLE =
+ PFN_vkGetRefreshCycleDurationGOOGLE( vkGetDeviceProcAddr( device, "vkGetRefreshCycleDurationGOOGLE" ) );
+ vkGetPastPresentationTimingGOOGLE =
+ PFN_vkGetPastPresentationTimingGOOGLE( vkGetDeviceProcAddr( device, "vkGetPastPresentationTimingGOOGLE" ) );
+
+ //=== VK_EXT_discard_rectangles ===
vkCmdSetDiscardRectangleEXT =
PFN_vkCmdSetDiscardRectangleEXT( vkGetDeviceProcAddr( device, "vkCmdSetDiscardRectangleEXT" ) );
- vkCmdSetEvent = PFN_vkCmdSetEvent( vkGetDeviceProcAddr( device, "vkCmdSetEvent" ) );
- vkCmdSetEvent2KHR = PFN_vkCmdSetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdSetEvent2KHR" ) );
- vkCmdSetExclusiveScissorNV =
- PFN_vkCmdSetExclusiveScissorNV( vkGetDeviceProcAddr( device, "vkCmdSetExclusiveScissorNV" ) );
- vkCmdSetFragmentShadingRateEnumNV =
- PFN_vkCmdSetFragmentShadingRateEnumNV( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateEnumNV" ) );
- vkCmdSetFragmentShadingRateKHR =
- PFN_vkCmdSetFragmentShadingRateKHR( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateKHR" ) );
- vkCmdSetFrontFaceEXT = PFN_vkCmdSetFrontFaceEXT( vkGetDeviceProcAddr( device, "vkCmdSetFrontFaceEXT" ) );
- vkCmdSetLineStippleEXT = PFN_vkCmdSetLineStippleEXT( vkGetDeviceProcAddr( device, "vkCmdSetLineStippleEXT" ) );
- vkCmdSetLineWidth = PFN_vkCmdSetLineWidth( vkGetDeviceProcAddr( device, "vkCmdSetLineWidth" ) );
- vkCmdSetLogicOpEXT = PFN_vkCmdSetLogicOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetLogicOpEXT" ) );
- vkCmdSetPatchControlPointsEXT =
- PFN_vkCmdSetPatchControlPointsEXT( vkGetDeviceProcAddr( device, "vkCmdSetPatchControlPointsEXT" ) );
- vkCmdSetPerformanceMarkerINTEL =
- PFN_vkCmdSetPerformanceMarkerINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceMarkerINTEL" ) );
- vkCmdSetPerformanceOverrideINTEL =
- PFN_vkCmdSetPerformanceOverrideINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceOverrideINTEL" ) );
- vkCmdSetPerformanceStreamMarkerINTEL = PFN_vkCmdSetPerformanceStreamMarkerINTEL(
- vkGetDeviceProcAddr( device, "vkCmdSetPerformanceStreamMarkerINTEL" ) );
- vkCmdSetPrimitiveRestartEnableEXT =
- PFN_vkCmdSetPrimitiveRestartEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveRestartEnableEXT" ) );
- vkCmdSetPrimitiveTopologyEXT =
- PFN_vkCmdSetPrimitiveTopologyEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveTopologyEXT" ) );
- vkCmdSetRasterizerDiscardEnableEXT =
- PFN_vkCmdSetRasterizerDiscardEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetRasterizerDiscardEnableEXT" ) );
- vkCmdSetRayTracingPipelineStackSizeKHR = PFN_vkCmdSetRayTracingPipelineStackSizeKHR(
- vkGetDeviceProcAddr( device, "vkCmdSetRayTracingPipelineStackSizeKHR" ) );
+
+ //=== VK_EXT_hdr_metadata ===
+ vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetDeviceProcAddr( device, "vkSetHdrMetadataEXT" ) );
+
+ //=== VK_KHR_create_renderpass2 ===
+ vkCreateRenderPass2KHR = PFN_vkCreateRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCreateRenderPass2KHR" ) );
+ if ( !vkCreateRenderPass2 )
+ vkCreateRenderPass2 = vkCreateRenderPass2KHR;
+ vkCmdBeginRenderPass2KHR =
+ PFN_vkCmdBeginRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2KHR" ) );
+ if ( !vkCmdBeginRenderPass2 )
+ vkCmdBeginRenderPass2 = vkCmdBeginRenderPass2KHR;
+ vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2KHR" ) );
+ if ( !vkCmdNextSubpass2 )
+ vkCmdNextSubpass2 = vkCmdNextSubpass2KHR;
+ vkCmdEndRenderPass2KHR = PFN_vkCmdEndRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2KHR" ) );
+ if ( !vkCmdEndRenderPass2 )
+ vkCmdEndRenderPass2 = vkCmdEndRenderPass2KHR;
+
+ //=== VK_KHR_shared_presentable_image ===
+ vkGetSwapchainStatusKHR = PFN_vkGetSwapchainStatusKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainStatusKHR" ) );
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_fence_win32 ===
+ vkImportFenceWin32HandleKHR =
+ PFN_vkImportFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportFenceWin32HandleKHR" ) );
+ vkGetFenceWin32HandleKHR =
+ PFN_vkGetFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetFenceWin32HandleKHR" ) );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_external_fence_fd ===
+ vkImportFenceFdKHR = PFN_vkImportFenceFdKHR( vkGetDeviceProcAddr( device, "vkImportFenceFdKHR" ) );
+ vkGetFenceFdKHR = PFN_vkGetFenceFdKHR( vkGetDeviceProcAddr( device, "vkGetFenceFdKHR" ) );
+
+ //=== VK_KHR_performance_query ===
+ vkAcquireProfilingLockKHR =
+ PFN_vkAcquireProfilingLockKHR( vkGetDeviceProcAddr( device, "vkAcquireProfilingLockKHR" ) );
+ vkReleaseProfilingLockKHR =
+ PFN_vkReleaseProfilingLockKHR( vkGetDeviceProcAddr( device, "vkReleaseProfilingLockKHR" ) );
+
+ //=== VK_EXT_debug_utils ===
+ vkSetDebugUtilsObjectNameEXT =
+ PFN_vkSetDebugUtilsObjectNameEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectNameEXT" ) );
+ vkSetDebugUtilsObjectTagEXT =
+ PFN_vkSetDebugUtilsObjectTagEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectTagEXT" ) );
+ vkQueueBeginDebugUtilsLabelEXT =
+ PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueBeginDebugUtilsLabelEXT" ) );
+ vkQueueEndDebugUtilsLabelEXT =
+ PFN_vkQueueEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueEndDebugUtilsLabelEXT" ) );
+ vkQueueInsertDebugUtilsLabelEXT =
+ PFN_vkQueueInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueInsertDebugUtilsLabelEXT" ) );
+ vkCmdBeginDebugUtilsLabelEXT =
+ PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdBeginDebugUtilsLabelEXT" ) );
+ vkCmdEndDebugUtilsLabelEXT =
+ PFN_vkCmdEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdEndDebugUtilsLabelEXT" ) );
+ vkCmdInsertDebugUtilsLabelEXT =
+ PFN_vkCmdInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdInsertDebugUtilsLabelEXT" ) );
+
+#if defined( VK_USE_PLATFORM_ANDROID_KHR )
+ //=== VK_ANDROID_external_memory_android_hardware_buffer ===
+ vkGetAndroidHardwareBufferPropertiesANDROID = PFN_vkGetAndroidHardwareBufferPropertiesANDROID(
+ vkGetDeviceProcAddr( device, "vkGetAndroidHardwareBufferPropertiesANDROID" ) );
+ vkGetMemoryAndroidHardwareBufferANDROID = PFN_vkGetMemoryAndroidHardwareBufferANDROID(
+ vkGetDeviceProcAddr( device, "vkGetMemoryAndroidHardwareBufferANDROID" ) );
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+ //=== VK_EXT_sample_locations ===
vkCmdSetSampleLocationsEXT =
PFN_vkCmdSetSampleLocationsEXT( vkGetDeviceProcAddr( device, "vkCmdSetSampleLocationsEXT" ) );
- vkCmdSetScissor = PFN_vkCmdSetScissor( vkGetDeviceProcAddr( device, "vkCmdSetScissor" ) );
- vkCmdSetScissorWithCountEXT =
- PFN_vkCmdSetScissorWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetScissorWithCountEXT" ) );
- vkCmdSetStencilCompareMask =
- PFN_vkCmdSetStencilCompareMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilCompareMask" ) );
- vkCmdSetStencilOpEXT = PFN_vkCmdSetStencilOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilOpEXT" ) );
- vkCmdSetStencilReference =
- PFN_vkCmdSetStencilReference( vkGetDeviceProcAddr( device, "vkCmdSetStencilReference" ) );
- vkCmdSetStencilTestEnableEXT =
- PFN_vkCmdSetStencilTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilTestEnableEXT" ) );
- vkCmdSetStencilWriteMask =
- PFN_vkCmdSetStencilWriteMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilWriteMask" ) );
- vkCmdSetVertexInputEXT = PFN_vkCmdSetVertexInputEXT( vkGetDeviceProcAddr( device, "vkCmdSetVertexInputEXT" ) );
- vkCmdSetViewport = PFN_vkCmdSetViewport( vkGetDeviceProcAddr( device, "vkCmdSetViewport" ) );
- vkCmdSetViewportShadingRatePaletteNV = PFN_vkCmdSetViewportShadingRatePaletteNV(
- vkGetDeviceProcAddr( device, "vkCmdSetViewportShadingRatePaletteNV" ) );
- vkCmdSetViewportWScalingNV =
- PFN_vkCmdSetViewportWScalingNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportWScalingNV" ) );
- vkCmdSetViewportWithCountEXT =
- PFN_vkCmdSetViewportWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetViewportWithCountEXT" ) );
- vkCmdSubpassShadingHUAWEI =
- PFN_vkCmdSubpassShadingHUAWEI( vkGetDeviceProcAddr( device, "vkCmdSubpassShadingHUAWEI" ) );
- vkCmdTraceRaysIndirectKHR =
- PFN_vkCmdTraceRaysIndirectKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysIndirectKHR" ) );
- vkCmdTraceRaysKHR = PFN_vkCmdTraceRaysKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysKHR" ) );
- vkCmdTraceRaysNV = PFN_vkCmdTraceRaysNV( vkGetDeviceProcAddr( device, "vkCmdTraceRaysNV" ) );
- vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer( vkGetDeviceProcAddr( device, "vkCmdUpdateBuffer" ) );
- vkCmdWaitEvents = PFN_vkCmdWaitEvents( vkGetDeviceProcAddr( device, "vkCmdWaitEvents" ) );
- vkCmdWaitEvents2KHR = PFN_vkCmdWaitEvents2KHR( vkGetDeviceProcAddr( device, "vkCmdWaitEvents2KHR" ) );
- vkCmdWriteAccelerationStructuresPropertiesKHR = PFN_vkCmdWriteAccelerationStructuresPropertiesKHR(
- vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesKHR" ) );
- vkCmdWriteAccelerationStructuresPropertiesNV = PFN_vkCmdWriteAccelerationStructuresPropertiesNV(
- vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesNV" ) );
- vkCmdWriteBufferMarker2AMD =
- PFN_vkCmdWriteBufferMarker2AMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarker2AMD" ) );
- vkCmdWriteBufferMarkerAMD =
- PFN_vkCmdWriteBufferMarkerAMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarkerAMD" ) );
- vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp" ) );
- vkCmdWriteTimestamp2KHR = PFN_vkCmdWriteTimestamp2KHR( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp2KHR" ) );
- vkCompileDeferredNV = PFN_vkCompileDeferredNV( vkGetDeviceProcAddr( device, "vkCompileDeferredNV" ) );
+
+ //=== VK_KHR_get_memory_requirements2 ===
+ vkGetImageMemoryRequirements2KHR =
+ PFN_vkGetImageMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2KHR" ) );
+ if ( !vkGetImageMemoryRequirements2 )
+ vkGetImageMemoryRequirements2 = vkGetImageMemoryRequirements2KHR;
+ vkGetBufferMemoryRequirements2KHR =
+ PFN_vkGetBufferMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2KHR" ) );
+ if ( !vkGetBufferMemoryRequirements2 )
+ vkGetBufferMemoryRequirements2 = vkGetBufferMemoryRequirements2KHR;
+ vkGetImageSparseMemoryRequirements2KHR = PFN_vkGetImageSparseMemoryRequirements2KHR(
+ vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2KHR" ) );
+ if ( !vkGetImageSparseMemoryRequirements2 )
+ vkGetImageSparseMemoryRequirements2 = vkGetImageSparseMemoryRequirements2KHR;
+
+ //=== VK_KHR_acceleration_structure ===
+ vkCreateAccelerationStructureKHR =
+ PFN_vkCreateAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureKHR" ) );
+ vkDestroyAccelerationStructureKHR =
+ PFN_vkDestroyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureKHR" ) );
+ vkCmdBuildAccelerationStructuresKHR =
+ PFN_vkCmdBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresKHR" ) );
+ vkCmdBuildAccelerationStructuresIndirectKHR = PFN_vkCmdBuildAccelerationStructuresIndirectKHR(
+ vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresIndirectKHR" ) );
+ vkBuildAccelerationStructuresKHR =
+ PFN_vkBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkBuildAccelerationStructuresKHR" ) );
vkCopyAccelerationStructureKHR =
PFN_vkCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCopyAccelerationStructureKHR" ) );
vkCopyAccelerationStructureToMemoryKHR = PFN_vkCopyAccelerationStructureToMemoryKHR(
vkGetDeviceProcAddr( device, "vkCopyAccelerationStructureToMemoryKHR" ) );
vkCopyMemoryToAccelerationStructureKHR = PFN_vkCopyMemoryToAccelerationStructureKHR(
vkGetDeviceProcAddr( device, "vkCopyMemoryToAccelerationStructureKHR" ) );
- vkCreateAccelerationStructureKHR =
- PFN_vkCreateAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureKHR" ) );
- vkCreateAccelerationStructureNV =
- PFN_vkCreateAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureNV" ) );
- vkCreateBuffer = PFN_vkCreateBuffer( vkGetDeviceProcAddr( device, "vkCreateBuffer" ) );
- vkCreateBufferView = PFN_vkCreateBufferView( vkGetDeviceProcAddr( device, "vkCreateBufferView" ) );
- vkCreateCommandPool = PFN_vkCreateCommandPool( vkGetDeviceProcAddr( device, "vkCreateCommandPool" ) );
- vkCreateComputePipelines =
- PFN_vkCreateComputePipelines( vkGetDeviceProcAddr( device, "vkCreateComputePipelines" ) );
- vkCreateCuFunctionNVX = PFN_vkCreateCuFunctionNVX( vkGetDeviceProcAddr( device, "vkCreateCuFunctionNVX" ) );
- vkCreateCuModuleNVX = PFN_vkCreateCuModuleNVX( vkGetDeviceProcAddr( device, "vkCreateCuModuleNVX" ) );
- vkCreateDeferredOperationKHR =
- PFN_vkCreateDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkCreateDeferredOperationKHR" ) );
- vkCreateDescriptorPool = PFN_vkCreateDescriptorPool( vkGetDeviceProcAddr( device, "vkCreateDescriptorPool" ) );
- vkCreateDescriptorSetLayout =
- PFN_vkCreateDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkCreateDescriptorSetLayout" ) );
- vkCreateDescriptorUpdateTemplate =
- PFN_vkCreateDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplate" ) );
- vkCreateDescriptorUpdateTemplateKHR =
- PFN_vkCreateDescriptorUpdateTemplateKHR( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplateKHR" ) );
- if ( !vkCreateDescriptorUpdateTemplate )
- vkCreateDescriptorUpdateTemplate = vkCreateDescriptorUpdateTemplateKHR;
- vkCreateEvent = PFN_vkCreateEvent( vkGetDeviceProcAddr( device, "vkCreateEvent" ) );
- vkCreateFence = PFN_vkCreateFence( vkGetDeviceProcAddr( device, "vkCreateFence" ) );
- vkCreateFramebuffer = PFN_vkCreateFramebuffer( vkGetDeviceProcAddr( device, "vkCreateFramebuffer" ) );
- vkCreateGraphicsPipelines =
- PFN_vkCreateGraphicsPipelines( vkGetDeviceProcAddr( device, "vkCreateGraphicsPipelines" ) );
- vkCreateImage = PFN_vkCreateImage( vkGetDeviceProcAddr( device, "vkCreateImage" ) );
- vkCreateImageView = PFN_vkCreateImageView( vkGetDeviceProcAddr( device, "vkCreateImageView" ) );
- vkCreateIndirectCommandsLayoutNV =
- PFN_vkCreateIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkCreateIndirectCommandsLayoutNV" ) );
- vkCreatePipelineCache = PFN_vkCreatePipelineCache( vkGetDeviceProcAddr( device, "vkCreatePipelineCache" ) );
- vkCreatePipelineLayout = PFN_vkCreatePipelineLayout( vkGetDeviceProcAddr( device, "vkCreatePipelineLayout" ) );
- vkCreatePrivateDataSlotEXT =
- PFN_vkCreatePrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkCreatePrivateDataSlotEXT" ) );
- vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetDeviceProcAddr( device, "vkCreateQueryPool" ) );
- vkCreateRayTracingPipelinesKHR =
- PFN_vkCreateRayTracingPipelinesKHR( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesKHR" ) );
- vkCreateRayTracingPipelinesNV =
- PFN_vkCreateRayTracingPipelinesNV( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesNV" ) );
- vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetDeviceProcAddr( device, "vkCreateRenderPass" ) );
- vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetDeviceProcAddr( device, "vkCreateRenderPass2" ) );
- vkCreateRenderPass2KHR = PFN_vkCreateRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCreateRenderPass2KHR" ) );
- if ( !vkCreateRenderPass2 )
- vkCreateRenderPass2 = vkCreateRenderPass2KHR;
- vkCreateSampler = PFN_vkCreateSampler( vkGetDeviceProcAddr( device, "vkCreateSampler" ) );
- vkCreateSamplerYcbcrConversion =
- PFN_vkCreateSamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversion" ) );
+ vkWriteAccelerationStructuresPropertiesKHR = PFN_vkWriteAccelerationStructuresPropertiesKHR(
+ vkGetDeviceProcAddr( device, "vkWriteAccelerationStructuresPropertiesKHR" ) );
+ vkCmdCopyAccelerationStructureKHR =
+ PFN_vkCmdCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureKHR" ) );
+ vkCmdCopyAccelerationStructureToMemoryKHR = PFN_vkCmdCopyAccelerationStructureToMemoryKHR(
+ vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureToMemoryKHR" ) );
+ vkCmdCopyMemoryToAccelerationStructureKHR = PFN_vkCmdCopyMemoryToAccelerationStructureKHR(
+ vkGetDeviceProcAddr( device, "vkCmdCopyMemoryToAccelerationStructureKHR" ) );
+ vkGetAccelerationStructureDeviceAddressKHR = PFN_vkGetAccelerationStructureDeviceAddressKHR(
+ vkGetDeviceProcAddr( device, "vkGetAccelerationStructureDeviceAddressKHR" ) );
+ vkCmdWriteAccelerationStructuresPropertiesKHR = PFN_vkCmdWriteAccelerationStructuresPropertiesKHR(
+ vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesKHR" ) );
+ vkGetDeviceAccelerationStructureCompatibilityKHR = PFN_vkGetDeviceAccelerationStructureCompatibilityKHR(
+ vkGetDeviceProcAddr( device, "vkGetDeviceAccelerationStructureCompatibilityKHR" ) );
+ vkGetAccelerationStructureBuildSizesKHR = PFN_vkGetAccelerationStructureBuildSizesKHR(
+ vkGetDeviceProcAddr( device, "vkGetAccelerationStructureBuildSizesKHR" ) );
+
+ //=== VK_KHR_sampler_ycbcr_conversion ===
vkCreateSamplerYcbcrConversionKHR =
PFN_vkCreateSamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversionKHR" ) );
if ( !vkCreateSamplerYcbcrConversion )
vkCreateSamplerYcbcrConversion = vkCreateSamplerYcbcrConversionKHR;
- vkCreateSemaphore = PFN_vkCreateSemaphore( vkGetDeviceProcAddr( device, "vkCreateSemaphore" ) );
- vkCreateShaderModule = PFN_vkCreateShaderModule( vkGetDeviceProcAddr( device, "vkCreateShaderModule" ) );
- vkCreateSharedSwapchainsKHR =
- PFN_vkCreateSharedSwapchainsKHR( vkGetDeviceProcAddr( device, "vkCreateSharedSwapchainsKHR" ) );
- vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR( vkGetDeviceProcAddr( device, "vkCreateSwapchainKHR" ) );
- vkCreateValidationCacheEXT =
- PFN_vkCreateValidationCacheEXT( vkGetDeviceProcAddr( device, "vkCreateValidationCacheEXT" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCreateVideoSessionKHR = PFN_vkCreateVideoSessionKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCreateVideoSessionParametersKHR =
- PFN_vkCreateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionParametersKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkDebugMarkerSetObjectNameEXT =
- PFN_vkDebugMarkerSetObjectNameEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectNameEXT" ) );
- vkDebugMarkerSetObjectTagEXT =
- PFN_vkDebugMarkerSetObjectTagEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectTagEXT" ) );
- vkDeferredOperationJoinKHR =
- PFN_vkDeferredOperationJoinKHR( vkGetDeviceProcAddr( device, "vkDeferredOperationJoinKHR" ) );
- vkDestroyAccelerationStructureKHR =
- PFN_vkDestroyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureKHR" ) );
- vkDestroyAccelerationStructureNV =
- PFN_vkDestroyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureNV" ) );
- vkDestroyBuffer = PFN_vkDestroyBuffer( vkGetDeviceProcAddr( device, "vkDestroyBuffer" ) );
- vkDestroyBufferView = PFN_vkDestroyBufferView( vkGetDeviceProcAddr( device, "vkDestroyBufferView" ) );
- vkDestroyCommandPool = PFN_vkDestroyCommandPool( vkGetDeviceProcAddr( device, "vkDestroyCommandPool" ) );
- vkDestroyCuFunctionNVX = PFN_vkDestroyCuFunctionNVX( vkGetDeviceProcAddr( device, "vkDestroyCuFunctionNVX" ) );
- vkDestroyCuModuleNVX = PFN_vkDestroyCuModuleNVX( vkGetDeviceProcAddr( device, "vkDestroyCuModuleNVX" ) );
- vkDestroyDeferredOperationKHR =
- PFN_vkDestroyDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkDestroyDeferredOperationKHR" ) );
- vkDestroyDescriptorPool = PFN_vkDestroyDescriptorPool( vkGetDeviceProcAddr( device, "vkDestroyDescriptorPool" ) );
- vkDestroyDescriptorSetLayout =
- PFN_vkDestroyDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkDestroyDescriptorSetLayout" ) );
- vkDestroyDescriptorUpdateTemplate =
- PFN_vkDestroyDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplate" ) );
- vkDestroyDescriptorUpdateTemplateKHR = PFN_vkDestroyDescriptorUpdateTemplateKHR(
- vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplateKHR" ) );
- if ( !vkDestroyDescriptorUpdateTemplate )
- vkDestroyDescriptorUpdateTemplate = vkDestroyDescriptorUpdateTemplateKHR;
- vkDestroyDevice = PFN_vkDestroyDevice( vkGetDeviceProcAddr( device, "vkDestroyDevice" ) );
- vkDestroyEvent = PFN_vkDestroyEvent( vkGetDeviceProcAddr( device, "vkDestroyEvent" ) );
- vkDestroyFence = PFN_vkDestroyFence( vkGetDeviceProcAddr( device, "vkDestroyFence" ) );
- vkDestroyFramebuffer = PFN_vkDestroyFramebuffer( vkGetDeviceProcAddr( device, "vkDestroyFramebuffer" ) );
- vkDestroyImage = PFN_vkDestroyImage( vkGetDeviceProcAddr( device, "vkDestroyImage" ) );
- vkDestroyImageView = PFN_vkDestroyImageView( vkGetDeviceProcAddr( device, "vkDestroyImageView" ) );
- vkDestroyIndirectCommandsLayoutNV =
- PFN_vkDestroyIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkDestroyIndirectCommandsLayoutNV" ) );
- vkDestroyPipeline = PFN_vkDestroyPipeline( vkGetDeviceProcAddr( device, "vkDestroyPipeline" ) );
- vkDestroyPipelineCache = PFN_vkDestroyPipelineCache( vkGetDeviceProcAddr( device, "vkDestroyPipelineCache" ) );
- vkDestroyPipelineLayout = PFN_vkDestroyPipelineLayout( vkGetDeviceProcAddr( device, "vkDestroyPipelineLayout" ) );
- vkDestroyPrivateDataSlotEXT =
- PFN_vkDestroyPrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkDestroyPrivateDataSlotEXT" ) );
- vkDestroyQueryPool = PFN_vkDestroyQueryPool( vkGetDeviceProcAddr( device, "vkDestroyQueryPool" ) );
- vkDestroyRenderPass = PFN_vkDestroyRenderPass( vkGetDeviceProcAddr( device, "vkDestroyRenderPass" ) );
- vkDestroySampler = PFN_vkDestroySampler( vkGetDeviceProcAddr( device, "vkDestroySampler" ) );
- vkDestroySamplerYcbcrConversion =
- PFN_vkDestroySamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversion" ) );
vkDestroySamplerYcbcrConversionKHR =
PFN_vkDestroySamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversionKHR" ) );
if ( !vkDestroySamplerYcbcrConversion )
vkDestroySamplerYcbcrConversion = vkDestroySamplerYcbcrConversionKHR;
- vkDestroySemaphore = PFN_vkDestroySemaphore( vkGetDeviceProcAddr( device, "vkDestroySemaphore" ) );
- vkDestroyShaderModule = PFN_vkDestroyShaderModule( vkGetDeviceProcAddr( device, "vkDestroyShaderModule" ) );
- vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR( vkGetDeviceProcAddr( device, "vkDestroySwapchainKHR" ) );
+
+ //=== VK_KHR_bind_memory2 ===
+ vkBindBufferMemory2KHR = PFN_vkBindBufferMemory2KHR( vkGetDeviceProcAddr( device, "vkBindBufferMemory2KHR" ) );
+ if ( !vkBindBufferMemory2 )
+ vkBindBufferMemory2 = vkBindBufferMemory2KHR;
+ vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR( vkGetDeviceProcAddr( device, "vkBindImageMemory2KHR" ) );
+ if ( !vkBindImageMemory2 )
+ vkBindImageMemory2 = vkBindImageMemory2KHR;
+
+ //=== VK_EXT_image_drm_format_modifier ===
+ vkGetImageDrmFormatModifierPropertiesEXT = PFN_vkGetImageDrmFormatModifierPropertiesEXT(
+ vkGetDeviceProcAddr( device, "vkGetImageDrmFormatModifierPropertiesEXT" ) );
+
+ //=== VK_EXT_validation_cache ===
+ vkCreateValidationCacheEXT =
+ PFN_vkCreateValidationCacheEXT( vkGetDeviceProcAddr( device, "vkCreateValidationCacheEXT" ) );
vkDestroyValidationCacheEXT =
PFN_vkDestroyValidationCacheEXT( vkGetDeviceProcAddr( device, "vkDestroyValidationCacheEXT" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkDestroyVideoSessionKHR =
- PFN_vkDestroyVideoSessionKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkDestroyVideoSessionParametersKHR =
- PFN_vkDestroyVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionParametersKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkDeviceWaitIdle = PFN_vkDeviceWaitIdle( vkGetDeviceProcAddr( device, "vkDeviceWaitIdle" ) );
- vkDisplayPowerControlEXT =
- PFN_vkDisplayPowerControlEXT( vkGetDeviceProcAddr( device, "vkDisplayPowerControlEXT" ) );
- vkEndCommandBuffer = PFN_vkEndCommandBuffer( vkGetDeviceProcAddr( device, "vkEndCommandBuffer" ) );
- vkFlushMappedMemoryRanges =
- PFN_vkFlushMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkFlushMappedMemoryRanges" ) );
- vkFreeCommandBuffers = PFN_vkFreeCommandBuffers( vkGetDeviceProcAddr( device, "vkFreeCommandBuffers" ) );
- vkFreeDescriptorSets = PFN_vkFreeDescriptorSets( vkGetDeviceProcAddr( device, "vkFreeDescriptorSets" ) );
- vkFreeMemory = PFN_vkFreeMemory( vkGetDeviceProcAddr( device, "vkFreeMemory" ) );
- vkGetAccelerationStructureBuildSizesKHR = PFN_vkGetAccelerationStructureBuildSizesKHR(
- vkGetDeviceProcAddr( device, "vkGetAccelerationStructureBuildSizesKHR" ) );
- vkGetAccelerationStructureDeviceAddressKHR = PFN_vkGetAccelerationStructureDeviceAddressKHR(
- vkGetDeviceProcAddr( device, "vkGetAccelerationStructureDeviceAddressKHR" ) );
- vkGetAccelerationStructureHandleNV =
- PFN_vkGetAccelerationStructureHandleNV( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureHandleNV" ) );
+ vkMergeValidationCachesEXT =
+ PFN_vkMergeValidationCachesEXT( vkGetDeviceProcAddr( device, "vkMergeValidationCachesEXT" ) );
+ vkGetValidationCacheDataEXT =
+ PFN_vkGetValidationCacheDataEXT( vkGetDeviceProcAddr( device, "vkGetValidationCacheDataEXT" ) );
+
+ //=== VK_NV_shading_rate_image ===
+ vkCmdBindShadingRateImageNV =
+ PFN_vkCmdBindShadingRateImageNV( vkGetDeviceProcAddr( device, "vkCmdBindShadingRateImageNV" ) );
+ vkCmdSetViewportShadingRatePaletteNV = PFN_vkCmdSetViewportShadingRatePaletteNV(
+ vkGetDeviceProcAddr( device, "vkCmdSetViewportShadingRatePaletteNV" ) );
+ vkCmdSetCoarseSampleOrderNV =
+ PFN_vkCmdSetCoarseSampleOrderNV( vkGetDeviceProcAddr( device, "vkCmdSetCoarseSampleOrderNV" ) );
+
+ //=== VK_NV_ray_tracing ===
+ vkCreateAccelerationStructureNV =
+ PFN_vkCreateAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureNV" ) );
+ vkDestroyAccelerationStructureNV =
+ PFN_vkDestroyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureNV" ) );
vkGetAccelerationStructureMemoryRequirementsNV = PFN_vkGetAccelerationStructureMemoryRequirementsNV(
vkGetDeviceProcAddr( device, "vkGetAccelerationStructureMemoryRequirementsNV" ) );
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- vkGetAndroidHardwareBufferPropertiesANDROID = PFN_vkGetAndroidHardwareBufferPropertiesANDROID(
- vkGetDeviceProcAddr( device, "vkGetAndroidHardwareBufferPropertiesANDROID" ) );
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- vkGetBufferDeviceAddress =
- PFN_vkGetBufferDeviceAddress( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddress" ) );
+ vkBindAccelerationStructureMemoryNV =
+ PFN_vkBindAccelerationStructureMemoryNV( vkGetDeviceProcAddr( device, "vkBindAccelerationStructureMemoryNV" ) );
+ vkCmdBuildAccelerationStructureNV =
+ PFN_vkCmdBuildAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructureNV" ) );
+ vkCmdCopyAccelerationStructureNV =
+ PFN_vkCmdCopyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureNV" ) );
+ vkCmdTraceRaysNV = PFN_vkCmdTraceRaysNV( vkGetDeviceProcAddr( device, "vkCmdTraceRaysNV" ) );
+ vkCreateRayTracingPipelinesNV =
+ PFN_vkCreateRayTracingPipelinesNV( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesNV" ) );
+ vkGetRayTracingShaderGroupHandlesNV =
+ PFN_vkGetRayTracingShaderGroupHandlesNV( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesNV" ) );
+ if ( !vkGetRayTracingShaderGroupHandlesKHR )
+ vkGetRayTracingShaderGroupHandlesKHR = vkGetRayTracingShaderGroupHandlesNV;
+ vkGetAccelerationStructureHandleNV =
+ PFN_vkGetAccelerationStructureHandleNV( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureHandleNV" ) );
+ vkCmdWriteAccelerationStructuresPropertiesNV = PFN_vkCmdWriteAccelerationStructuresPropertiesNV(
+ vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesNV" ) );
+ vkCompileDeferredNV = PFN_vkCompileDeferredNV( vkGetDeviceProcAddr( device, "vkCompileDeferredNV" ) );
+
+ //=== VK_KHR_maintenance3 ===
+ vkGetDescriptorSetLayoutSupportKHR =
+ PFN_vkGetDescriptorSetLayoutSupportKHR( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupportKHR" ) );
+ if ( !vkGetDescriptorSetLayoutSupport )
+ vkGetDescriptorSetLayoutSupport = vkGetDescriptorSetLayoutSupportKHR;
+
+ //=== VK_KHR_draw_indirect_count ===
+ vkCmdDrawIndirectCountKHR =
+ PFN_vkCmdDrawIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountKHR" ) );
+ if ( !vkCmdDrawIndirectCount )
+ vkCmdDrawIndirectCount = vkCmdDrawIndirectCountKHR;
+ vkCmdDrawIndexedIndirectCountKHR =
+ PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountKHR" ) );
+ if ( !vkCmdDrawIndexedIndirectCount )
+ vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountKHR;
+
+ //=== VK_EXT_external_memory_host ===
+ vkGetMemoryHostPointerPropertiesEXT =
+ PFN_vkGetMemoryHostPointerPropertiesEXT( vkGetDeviceProcAddr( device, "vkGetMemoryHostPointerPropertiesEXT" ) );
+
+ //=== VK_AMD_buffer_marker ===
+ vkCmdWriteBufferMarkerAMD =
+ PFN_vkCmdWriteBufferMarkerAMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarkerAMD" ) );
+
+ //=== VK_EXT_calibrated_timestamps ===
+ vkGetCalibratedTimestampsEXT =
+ PFN_vkGetCalibratedTimestampsEXT( vkGetDeviceProcAddr( device, "vkGetCalibratedTimestampsEXT" ) );
+
+ //=== VK_NV_mesh_shader ===
+ vkCmdDrawMeshTasksNV = PFN_vkCmdDrawMeshTasksNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksNV" ) );
+ vkCmdDrawMeshTasksIndirectNV =
+ PFN_vkCmdDrawMeshTasksIndirectNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectNV" ) );
+ vkCmdDrawMeshTasksIndirectCountNV =
+ PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectCountNV" ) );
+
+ //=== VK_NV_scissor_exclusive ===
+ vkCmdSetExclusiveScissorNV =
+ PFN_vkCmdSetExclusiveScissorNV( vkGetDeviceProcAddr( device, "vkCmdSetExclusiveScissorNV" ) );
+
+ //=== VK_NV_device_diagnostic_checkpoints ===
+ vkCmdSetCheckpointNV = PFN_vkCmdSetCheckpointNV( vkGetDeviceProcAddr( device, "vkCmdSetCheckpointNV" ) );
+ vkGetQueueCheckpointDataNV =
+ PFN_vkGetQueueCheckpointDataNV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointDataNV" ) );
+
+ //=== VK_KHR_timeline_semaphore ===
+ vkGetSemaphoreCounterValueKHR =
+ PFN_vkGetSemaphoreCounterValueKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValueKHR" ) );
+ if ( !vkGetSemaphoreCounterValue )
+ vkGetSemaphoreCounterValue = vkGetSemaphoreCounterValueKHR;
+ vkWaitSemaphoresKHR = PFN_vkWaitSemaphoresKHR( vkGetDeviceProcAddr( device, "vkWaitSemaphoresKHR" ) );
+ if ( !vkWaitSemaphores )
+ vkWaitSemaphores = vkWaitSemaphoresKHR;
+ vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetDeviceProcAddr( device, "vkSignalSemaphoreKHR" ) );
+ if ( !vkSignalSemaphore )
+ vkSignalSemaphore = vkSignalSemaphoreKHR;
+
+ //=== VK_INTEL_performance_query ===
+ vkInitializePerformanceApiINTEL =
+ PFN_vkInitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkInitializePerformanceApiINTEL" ) );
+ vkUninitializePerformanceApiINTEL =
+ PFN_vkUninitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkUninitializePerformanceApiINTEL" ) );
+ vkCmdSetPerformanceMarkerINTEL =
+ PFN_vkCmdSetPerformanceMarkerINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceMarkerINTEL" ) );
+ vkCmdSetPerformanceStreamMarkerINTEL = PFN_vkCmdSetPerformanceStreamMarkerINTEL(
+ vkGetDeviceProcAddr( device, "vkCmdSetPerformanceStreamMarkerINTEL" ) );
+ vkCmdSetPerformanceOverrideINTEL =
+ PFN_vkCmdSetPerformanceOverrideINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceOverrideINTEL" ) );
+ vkAcquirePerformanceConfigurationINTEL = PFN_vkAcquirePerformanceConfigurationINTEL(
+ vkGetDeviceProcAddr( device, "vkAcquirePerformanceConfigurationINTEL" ) );
+ vkReleasePerformanceConfigurationINTEL = PFN_vkReleasePerformanceConfigurationINTEL(
+ vkGetDeviceProcAddr( device, "vkReleasePerformanceConfigurationINTEL" ) );
+ vkQueueSetPerformanceConfigurationINTEL = PFN_vkQueueSetPerformanceConfigurationINTEL(
+ vkGetDeviceProcAddr( device, "vkQueueSetPerformanceConfigurationINTEL" ) );
+ vkGetPerformanceParameterINTEL =
+ PFN_vkGetPerformanceParameterINTEL( vkGetDeviceProcAddr( device, "vkGetPerformanceParameterINTEL" ) );
+
+ //=== VK_AMD_display_native_hdr ===
+ vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetDeviceProcAddr( device, "vkSetLocalDimmingAMD" ) );
+
+ //=== VK_KHR_fragment_shading_rate ===
+ vkCmdSetFragmentShadingRateKHR =
+ PFN_vkCmdSetFragmentShadingRateKHR( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateKHR" ) );
+
+ //=== VK_EXT_buffer_device_address ===
vkGetBufferDeviceAddressEXT =
PFN_vkGetBufferDeviceAddressEXT( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressEXT" ) );
if ( !vkGetBufferDeviceAddress )
vkGetBufferDeviceAddress = vkGetBufferDeviceAddressEXT;
+
+ //=== VK_KHR_present_wait ===
+ vkWaitForPresentKHR = PFN_vkWaitForPresentKHR( vkGetDeviceProcAddr( device, "vkWaitForPresentKHR" ) );
+
+#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_EXT_full_screen_exclusive ===
+ vkAcquireFullScreenExclusiveModeEXT =
+ PFN_vkAcquireFullScreenExclusiveModeEXT( vkGetDeviceProcAddr( device, "vkAcquireFullScreenExclusiveModeEXT" ) );
+ vkReleaseFullScreenExclusiveModeEXT =
+ PFN_vkReleaseFullScreenExclusiveModeEXT( vkGetDeviceProcAddr( device, "vkReleaseFullScreenExclusiveModeEXT" ) );
+ vkGetDeviceGroupSurfacePresentModes2EXT = PFN_vkGetDeviceGroupSurfacePresentModes2EXT(
+ vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModes2EXT" ) );
+#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_buffer_device_address ===
vkGetBufferDeviceAddressKHR =
PFN_vkGetBufferDeviceAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressKHR" ) );
if ( !vkGetBufferDeviceAddress )
vkGetBufferDeviceAddress = vkGetBufferDeviceAddressKHR;
- vkGetBufferMemoryRequirements =
- PFN_vkGetBufferMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements" ) );
- vkGetBufferMemoryRequirements2 =
- PFN_vkGetBufferMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2" ) );
- vkGetBufferMemoryRequirements2KHR =
- PFN_vkGetBufferMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2KHR" ) );
- if ( !vkGetBufferMemoryRequirements2 )
- vkGetBufferMemoryRequirements2 = vkGetBufferMemoryRequirements2KHR;
- vkGetBufferOpaqueCaptureAddress =
- PFN_vkGetBufferOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddress" ) );
vkGetBufferOpaqueCaptureAddressKHR =
PFN_vkGetBufferOpaqueCaptureAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddressKHR" ) );
if ( !vkGetBufferOpaqueCaptureAddress )
vkGetBufferOpaqueCaptureAddress = vkGetBufferOpaqueCaptureAddressKHR;
- vkGetCalibratedTimestampsEXT =
- PFN_vkGetCalibratedTimestampsEXT( vkGetDeviceProcAddr( device, "vkGetCalibratedTimestampsEXT" ) );
- vkGetDeferredOperationMaxConcurrencyKHR = PFN_vkGetDeferredOperationMaxConcurrencyKHR(
- vkGetDeviceProcAddr( device, "vkGetDeferredOperationMaxConcurrencyKHR" ) );
- vkGetDeferredOperationResultKHR =
- PFN_vkGetDeferredOperationResultKHR( vkGetDeviceProcAddr( device, "vkGetDeferredOperationResultKHR" ) );
- vkGetDescriptorSetLayoutSupport =
- PFN_vkGetDescriptorSetLayoutSupport( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupport" ) );
- vkGetDescriptorSetLayoutSupportKHR =
- PFN_vkGetDescriptorSetLayoutSupportKHR( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupportKHR" ) );
- if ( !vkGetDescriptorSetLayoutSupport )
- vkGetDescriptorSetLayoutSupport = vkGetDescriptorSetLayoutSupportKHR;
- vkGetDeviceAccelerationStructureCompatibilityKHR = PFN_vkGetDeviceAccelerationStructureCompatibilityKHR(
- vkGetDeviceProcAddr( device, "vkGetDeviceAccelerationStructureCompatibilityKHR" ) );
- vkGetDeviceGroupPeerMemoryFeatures =
- PFN_vkGetDeviceGroupPeerMemoryFeatures( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeatures" ) );
- vkGetDeviceGroupPeerMemoryFeaturesKHR = PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR(
- vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeaturesKHR" ) );
- if ( !vkGetDeviceGroupPeerMemoryFeatures )
- vkGetDeviceGroupPeerMemoryFeatures = vkGetDeviceGroupPeerMemoryFeaturesKHR;
- vkGetDeviceGroupPresentCapabilitiesKHR = PFN_vkGetDeviceGroupPresentCapabilitiesKHR(
- vkGetDeviceProcAddr( device, "vkGetDeviceGroupPresentCapabilitiesKHR" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetDeviceGroupSurfacePresentModes2EXT = PFN_vkGetDeviceGroupSurfacePresentModes2EXT(
- vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModes2EXT" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkGetDeviceGroupSurfacePresentModesKHR = PFN_vkGetDeviceGroupSurfacePresentModesKHR(
- vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModesKHR" ) );
- vkGetDeviceMemoryCommitment =
- PFN_vkGetDeviceMemoryCommitment( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryCommitment" ) );
- vkGetDeviceMemoryOpaqueCaptureAddress = PFN_vkGetDeviceMemoryOpaqueCaptureAddress(
- vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddress" ) );
vkGetDeviceMemoryOpaqueCaptureAddressKHR = PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR(
vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR" ) );
if ( !vkGetDeviceMemoryOpaqueCaptureAddress )
vkGetDeviceMemoryOpaqueCaptureAddress = vkGetDeviceMemoryOpaqueCaptureAddressKHR;
- vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetDeviceProcAddr( device, "vkGetDeviceProcAddr" ) );
- vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetDeviceProcAddr( device, "vkGetDeviceQueue" ) );
- vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetDeviceProcAddr( device, "vkGetDeviceQueue2" ) );
- vkGetEventStatus = PFN_vkGetEventStatus( vkGetDeviceProcAddr( device, "vkGetEventStatus" ) );
- vkGetFenceFdKHR = PFN_vkGetFenceFdKHR( vkGetDeviceProcAddr( device, "vkGetFenceFdKHR" ) );
- vkGetFenceStatus = PFN_vkGetFenceStatus( vkGetDeviceProcAddr( device, "vkGetFenceStatus" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetFenceWin32HandleKHR =
- PFN_vkGetFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetFenceWin32HandleKHR" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkGetGeneratedCommandsMemoryRequirementsNV = PFN_vkGetGeneratedCommandsMemoryRequirementsNV(
- vkGetDeviceProcAddr( device, "vkGetGeneratedCommandsMemoryRequirementsNV" ) );
- vkGetImageDrmFormatModifierPropertiesEXT = PFN_vkGetImageDrmFormatModifierPropertiesEXT(
- vkGetDeviceProcAddr( device, "vkGetImageDrmFormatModifierPropertiesEXT" ) );
- vkGetImageMemoryRequirements =
- PFN_vkGetImageMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements" ) );
- vkGetImageMemoryRequirements2 =
- PFN_vkGetImageMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2" ) );
- vkGetImageMemoryRequirements2KHR =
- PFN_vkGetImageMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2KHR" ) );
- if ( !vkGetImageMemoryRequirements2 )
- vkGetImageMemoryRequirements2 = vkGetImageMemoryRequirements2KHR;
- vkGetImageSparseMemoryRequirements =
- PFN_vkGetImageSparseMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements" ) );
- vkGetImageSparseMemoryRequirements2 =
- PFN_vkGetImageSparseMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2" ) );
- vkGetImageSparseMemoryRequirements2KHR = PFN_vkGetImageSparseMemoryRequirements2KHR(
- vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2KHR" ) );
- if ( !vkGetImageSparseMemoryRequirements2 )
- vkGetImageSparseMemoryRequirements2 = vkGetImageSparseMemoryRequirements2KHR;
- vkGetImageSubresourceLayout =
- PFN_vkGetImageSubresourceLayout( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout" ) );
- vkGetImageViewAddressNVX =
- PFN_vkGetImageViewAddressNVX( vkGetDeviceProcAddr( device, "vkGetImageViewAddressNVX" ) );
- vkGetImageViewHandleNVX = PFN_vkGetImageViewHandleNVX( vkGetDeviceProcAddr( device, "vkGetImageViewHandleNVX" ) );
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- vkGetMemoryAndroidHardwareBufferANDROID = PFN_vkGetMemoryAndroidHardwareBufferANDROID(
- vkGetDeviceProcAddr( device, "vkGetMemoryAndroidHardwareBufferANDROID" ) );
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- vkGetMemoryFdKHR = PFN_vkGetMemoryFdKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdKHR" ) );
- vkGetMemoryFdPropertiesKHR =
- PFN_vkGetMemoryFdPropertiesKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdPropertiesKHR" ) );
- vkGetMemoryHostPointerPropertiesEXT =
- PFN_vkGetMemoryHostPointerPropertiesEXT( vkGetDeviceProcAddr( device, "vkGetMemoryHostPointerPropertiesEXT" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetMemoryWin32HandleKHR =
- PFN_vkGetMemoryWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleKHR" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetMemoryWin32HandleNV =
- PFN_vkGetMemoryWin32HandleNV( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleNV" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetMemoryWin32HandlePropertiesKHR =
- PFN_vkGetMemoryWin32HandlePropertiesKHR( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandlePropertiesKHR" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_FUCHSIA )
- vkGetMemoryZirconHandleFUCHSIA =
- PFN_vkGetMemoryZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandleFUCHSIA" ) );
-#endif /*VK_USE_PLATFORM_FUCHSIA*/
-#if defined( VK_USE_PLATFORM_FUCHSIA )
- vkGetMemoryZirconHandlePropertiesFUCHSIA = PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA(
- vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ) );
-#endif /*VK_USE_PLATFORM_FUCHSIA*/
- vkGetPastPresentationTimingGOOGLE =
- PFN_vkGetPastPresentationTimingGOOGLE( vkGetDeviceProcAddr( device, "vkGetPastPresentationTimingGOOGLE" ) );
- vkGetPerformanceParameterINTEL =
- PFN_vkGetPerformanceParameterINTEL( vkGetDeviceProcAddr( device, "vkGetPerformanceParameterINTEL" ) );
- vkGetPipelineCacheData = PFN_vkGetPipelineCacheData( vkGetDeviceProcAddr( device, "vkGetPipelineCacheData" ) );
- vkGetPipelineExecutableInternalRepresentationsKHR = PFN_vkGetPipelineExecutableInternalRepresentationsKHR(
- vkGetDeviceProcAddr( device, "vkGetPipelineExecutableInternalRepresentationsKHR" ) );
+
+ //=== VK_EXT_line_rasterization ===
+ vkCmdSetLineStippleEXT = PFN_vkCmdSetLineStippleEXT( vkGetDeviceProcAddr( device, "vkCmdSetLineStippleEXT" ) );
+
+ //=== VK_EXT_host_query_reset ===
+ vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetDeviceProcAddr( device, "vkResetQueryPoolEXT" ) );
+ if ( !vkResetQueryPool )
+ vkResetQueryPool = vkResetQueryPoolEXT;
+
+ //=== VK_EXT_extended_dynamic_state ===
+ vkCmdSetCullModeEXT = PFN_vkCmdSetCullModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetCullModeEXT" ) );
+ vkCmdSetFrontFaceEXT = PFN_vkCmdSetFrontFaceEXT( vkGetDeviceProcAddr( device, "vkCmdSetFrontFaceEXT" ) );
+ vkCmdSetPrimitiveTopologyEXT =
+ PFN_vkCmdSetPrimitiveTopologyEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveTopologyEXT" ) );
+ vkCmdSetViewportWithCountEXT =
+ PFN_vkCmdSetViewportWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetViewportWithCountEXT" ) );
+ vkCmdSetScissorWithCountEXT =
+ PFN_vkCmdSetScissorWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetScissorWithCountEXT" ) );
+ vkCmdBindVertexBuffers2EXT =
+ PFN_vkCmdBindVertexBuffers2EXT( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers2EXT" ) );
+ vkCmdSetDepthTestEnableEXT =
+ PFN_vkCmdSetDepthTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthTestEnableEXT" ) );
+ vkCmdSetDepthWriteEnableEXT =
+ PFN_vkCmdSetDepthWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthWriteEnableEXT" ) );
+ vkCmdSetDepthCompareOpEXT =
+ PFN_vkCmdSetDepthCompareOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthCompareOpEXT" ) );
+ vkCmdSetDepthBoundsTestEnableEXT =
+ PFN_vkCmdSetDepthBoundsTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBoundsTestEnableEXT" ) );
+ vkCmdSetStencilTestEnableEXT =
+ PFN_vkCmdSetStencilTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilTestEnableEXT" ) );
+ vkCmdSetStencilOpEXT = PFN_vkCmdSetStencilOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilOpEXT" ) );
+
+ //=== VK_KHR_deferred_host_operations ===
+ vkCreateDeferredOperationKHR =
+ PFN_vkCreateDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkCreateDeferredOperationKHR" ) );
+ vkDestroyDeferredOperationKHR =
+ PFN_vkDestroyDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkDestroyDeferredOperationKHR" ) );
+ vkGetDeferredOperationMaxConcurrencyKHR = PFN_vkGetDeferredOperationMaxConcurrencyKHR(
+ vkGetDeviceProcAddr( device, "vkGetDeferredOperationMaxConcurrencyKHR" ) );
+ vkGetDeferredOperationResultKHR =
+ PFN_vkGetDeferredOperationResultKHR( vkGetDeviceProcAddr( device, "vkGetDeferredOperationResultKHR" ) );
+ vkDeferredOperationJoinKHR =
+ PFN_vkDeferredOperationJoinKHR( vkGetDeviceProcAddr( device, "vkDeferredOperationJoinKHR" ) );
+
+ //=== VK_KHR_pipeline_executable_properties ===
vkGetPipelineExecutablePropertiesKHR = PFN_vkGetPipelineExecutablePropertiesKHR(
vkGetDeviceProcAddr( device, "vkGetPipelineExecutablePropertiesKHR" ) );
vkGetPipelineExecutableStatisticsKHR = PFN_vkGetPipelineExecutableStatisticsKHR(
vkGetDeviceProcAddr( device, "vkGetPipelineExecutableStatisticsKHR" ) );
- vkGetPrivateDataEXT = PFN_vkGetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkGetPrivateDataEXT" ) );
- vkGetQueryPoolResults = PFN_vkGetQueryPoolResults( vkGetDeviceProcAddr( device, "vkGetQueryPoolResults" ) );
+ vkGetPipelineExecutableInternalRepresentationsKHR = PFN_vkGetPipelineExecutableInternalRepresentationsKHR(
+ vkGetDeviceProcAddr( device, "vkGetPipelineExecutableInternalRepresentationsKHR" ) );
+
+ //=== VK_NV_device_generated_commands ===
+ vkGetGeneratedCommandsMemoryRequirementsNV = PFN_vkGetGeneratedCommandsMemoryRequirementsNV(
+ vkGetDeviceProcAddr( device, "vkGetGeneratedCommandsMemoryRequirementsNV" ) );
+ vkCmdPreprocessGeneratedCommandsNV =
+ PFN_vkCmdPreprocessGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdPreprocessGeneratedCommandsNV" ) );
+ vkCmdExecuteGeneratedCommandsNV =
+ PFN_vkCmdExecuteGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdExecuteGeneratedCommandsNV" ) );
+ vkCmdBindPipelineShaderGroupNV =
+ PFN_vkCmdBindPipelineShaderGroupNV( vkGetDeviceProcAddr( device, "vkCmdBindPipelineShaderGroupNV" ) );
+ vkCreateIndirectCommandsLayoutNV =
+ PFN_vkCreateIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkCreateIndirectCommandsLayoutNV" ) );
+ vkDestroyIndirectCommandsLayoutNV =
+ PFN_vkDestroyIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkDestroyIndirectCommandsLayoutNV" ) );
+
+ //=== VK_EXT_private_data ===
+ vkCreatePrivateDataSlotEXT =
+ PFN_vkCreatePrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkCreatePrivateDataSlotEXT" ) );
+ vkDestroyPrivateDataSlotEXT =
+ PFN_vkDestroyPrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkDestroyPrivateDataSlotEXT" ) );
+ vkSetPrivateDataEXT = PFN_vkSetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkSetPrivateDataEXT" ) );
+ vkGetPrivateDataEXT = PFN_vkGetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkGetPrivateDataEXT" ) );
+
+#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_encode_queue ===
+ vkCmdEncodeVideoKHR = PFN_vkCmdEncodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdEncodeVideoKHR" ) );
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_KHR_synchronization2 ===
+ vkCmdSetEvent2KHR = PFN_vkCmdSetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdSetEvent2KHR" ) );
+ vkCmdResetEvent2KHR = PFN_vkCmdResetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdResetEvent2KHR" ) );
+ vkCmdWaitEvents2KHR = PFN_vkCmdWaitEvents2KHR( vkGetDeviceProcAddr( device, "vkCmdWaitEvents2KHR" ) );
+ vkCmdPipelineBarrier2KHR =
+ PFN_vkCmdPipelineBarrier2KHR( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier2KHR" ) );
+ vkCmdWriteTimestamp2KHR = PFN_vkCmdWriteTimestamp2KHR( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp2KHR" ) );
+ vkQueueSubmit2KHR = PFN_vkQueueSubmit2KHR( vkGetDeviceProcAddr( device, "vkQueueSubmit2KHR" ) );
+ vkCmdWriteBufferMarker2AMD =
+ PFN_vkCmdWriteBufferMarker2AMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarker2AMD" ) );
vkGetQueueCheckpointData2NV =
PFN_vkGetQueueCheckpointData2NV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointData2NV" ) );
- vkGetQueueCheckpointDataNV =
- PFN_vkGetQueueCheckpointDataNV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointDataNV" ) );
- vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
- vkGetDeviceProcAddr( device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR" ) );
+
+ //=== VK_NV_fragment_shading_rate_enums ===
+ vkCmdSetFragmentShadingRateEnumNV =
+ PFN_vkCmdSetFragmentShadingRateEnumNV( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateEnumNV" ) );
+
+ //=== VK_KHR_copy_commands2 ===
+ vkCmdCopyBuffer2KHR = PFN_vkCmdCopyBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer2KHR" ) );
+ vkCmdCopyImage2KHR = PFN_vkCmdCopyImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImage2KHR" ) );
+ vkCmdCopyBufferToImage2KHR =
+ PFN_vkCmdCopyBufferToImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage2KHR" ) );
+ vkCmdCopyImageToBuffer2KHR =
+ PFN_vkCmdCopyImageToBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer2KHR" ) );
+ vkCmdBlitImage2KHR = PFN_vkCmdBlitImage2KHR( vkGetDeviceProcAddr( device, "vkCmdBlitImage2KHR" ) );
+ vkCmdResolveImage2KHR = PFN_vkCmdResolveImage2KHR( vkGetDeviceProcAddr( device, "vkCmdResolveImage2KHR" ) );
+
+ //=== VK_KHR_ray_tracing_pipeline ===
+ vkCmdTraceRaysKHR = PFN_vkCmdTraceRaysKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysKHR" ) );
+ vkCreateRayTracingPipelinesKHR =
+ PFN_vkCreateRayTracingPipelinesKHR( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesKHR" ) );
vkGetRayTracingShaderGroupHandlesKHR = PFN_vkGetRayTracingShaderGroupHandlesKHR(
vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesKHR" ) );
- vkGetRayTracingShaderGroupHandlesNV =
- PFN_vkGetRayTracingShaderGroupHandlesNV( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesNV" ) );
- if ( !vkGetRayTracingShaderGroupHandlesKHR )
- vkGetRayTracingShaderGroupHandlesKHR = vkGetRayTracingShaderGroupHandlesNV;
+ vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
+ vkGetDeviceProcAddr( device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR" ) );
+ vkCmdTraceRaysIndirectKHR =
+ PFN_vkCmdTraceRaysIndirectKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysIndirectKHR" ) );
vkGetRayTracingShaderGroupStackSizeKHR = PFN_vkGetRayTracingShaderGroupStackSizeKHR(
vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupStackSizeKHR" ) );
- vkGetRefreshCycleDurationGOOGLE =
- PFN_vkGetRefreshCycleDurationGOOGLE( vkGetDeviceProcAddr( device, "vkGetRefreshCycleDurationGOOGLE" ) );
- vkGetRenderAreaGranularity =
- PFN_vkGetRenderAreaGranularity( vkGetDeviceProcAddr( device, "vkGetRenderAreaGranularity" ) );
- vkGetSemaphoreCounterValue =
- PFN_vkGetSemaphoreCounterValue( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValue" ) );
- vkGetSemaphoreCounterValueKHR =
- PFN_vkGetSemaphoreCounterValueKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValueKHR" ) );
- if ( !vkGetSemaphoreCounterValue )
- vkGetSemaphoreCounterValue = vkGetSemaphoreCounterValueKHR;
- vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreFdKHR" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetSemaphoreWin32HandleKHR =
- PFN_vkGetSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreWin32HandleKHR" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ vkCmdSetRayTracingPipelineStackSizeKHR = PFN_vkCmdSetRayTracingPipelineStackSizeKHR(
+ vkGetDeviceProcAddr( device, "vkCmdSetRayTracingPipelineStackSizeKHR" ) );
+
+ //=== VK_EXT_vertex_input_dynamic_state ===
+ vkCmdSetVertexInputEXT = PFN_vkCmdSetVertexInputEXT( vkGetDeviceProcAddr( device, "vkCmdSetVertexInputEXT" ) );
+
#if defined( VK_USE_PLATFORM_FUCHSIA )
- vkGetSemaphoreZirconHandleFUCHSIA =
- PFN_vkGetSemaphoreZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetSemaphoreZirconHandleFUCHSIA" ) );
+ //=== VK_FUCHSIA_external_memory ===
+ vkGetMemoryZirconHandleFUCHSIA =
+ PFN_vkGetMemoryZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandleFUCHSIA" ) );
+ vkGetMemoryZirconHandlePropertiesFUCHSIA = PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA(
+ vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ) );
#endif /*VK_USE_PLATFORM_FUCHSIA*/
- vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD( vkGetDeviceProcAddr( device, "vkGetShaderInfoAMD" ) );
- vkGetSubpassShadingMaxWorkgroupSizeHUAWEI = PFN_vkGetSubpassShadingMaxWorkgroupSizeHUAWEI(
- vkGetDeviceProcAddr( device, "vkGetSubpassShadingMaxWorkgroupSizeHUAWEI" ) );
- vkGetSwapchainCounterEXT =
- PFN_vkGetSwapchainCounterEXT( vkGetDeviceProcAddr( device, "vkGetSwapchainCounterEXT" ) );
- vkGetSwapchainImagesKHR = PFN_vkGetSwapchainImagesKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainImagesKHR" ) );
- vkGetSwapchainStatusKHR = PFN_vkGetSwapchainStatusKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainStatusKHR" ) );
- vkGetValidationCacheDataEXT =
- PFN_vkGetValidationCacheDataEXT( vkGetDeviceProcAddr( device, "vkGetValidationCacheDataEXT" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkGetVideoSessionMemoryRequirementsKHR = PFN_vkGetVideoSessionMemoryRequirementsKHR(
- vkGetDeviceProcAddr( device, "vkGetVideoSessionMemoryRequirementsKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkImportFenceFdKHR = PFN_vkImportFenceFdKHR( vkGetDeviceProcAddr( device, "vkImportFenceFdKHR" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkImportFenceWin32HandleKHR =
- PFN_vkImportFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportFenceWin32HandleKHR" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkImportSemaphoreFdKHR = PFN_vkImportSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreFdKHR" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkImportSemaphoreWin32HandleKHR =
- PFN_vkImportSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreWin32HandleKHR" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
#if defined( VK_USE_PLATFORM_FUCHSIA )
+ //=== VK_FUCHSIA_external_semaphore ===
vkImportSemaphoreZirconHandleFUCHSIA = PFN_vkImportSemaphoreZirconHandleFUCHSIA(
vkGetDeviceProcAddr( device, "vkImportSemaphoreZirconHandleFUCHSIA" ) );
+ vkGetSemaphoreZirconHandleFUCHSIA =
+ PFN_vkGetSemaphoreZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetSemaphoreZirconHandleFUCHSIA" ) );
#endif /*VK_USE_PLATFORM_FUCHSIA*/
- vkInitializePerformanceApiINTEL =
- PFN_vkInitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkInitializePerformanceApiINTEL" ) );
- vkInvalidateMappedMemoryRanges =
- PFN_vkInvalidateMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkInvalidateMappedMemoryRanges" ) );
- vkMapMemory = PFN_vkMapMemory( vkGetDeviceProcAddr( device, "vkMapMemory" ) );
- vkMergePipelineCaches = PFN_vkMergePipelineCaches( vkGetDeviceProcAddr( device, "vkMergePipelineCaches" ) );
- vkMergeValidationCachesEXT =
- PFN_vkMergeValidationCachesEXT( vkGetDeviceProcAddr( device, "vkMergeValidationCachesEXT" ) );
- vkQueueBeginDebugUtilsLabelEXT =
- PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueBeginDebugUtilsLabelEXT" ) );
- vkQueueBindSparse = PFN_vkQueueBindSparse( vkGetDeviceProcAddr( device, "vkQueueBindSparse" ) );
- vkQueueEndDebugUtilsLabelEXT =
- PFN_vkQueueEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueEndDebugUtilsLabelEXT" ) );
- vkQueueInsertDebugUtilsLabelEXT =
- PFN_vkQueueInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueInsertDebugUtilsLabelEXT" ) );
- vkQueuePresentKHR = PFN_vkQueuePresentKHR( vkGetDeviceProcAddr( device, "vkQueuePresentKHR" ) );
- vkQueueSetPerformanceConfigurationINTEL = PFN_vkQueueSetPerformanceConfigurationINTEL(
- vkGetDeviceProcAddr( device, "vkQueueSetPerformanceConfigurationINTEL" ) );
- vkQueueSubmit = PFN_vkQueueSubmit( vkGetDeviceProcAddr( device, "vkQueueSubmit" ) );
- vkQueueSubmit2KHR = PFN_vkQueueSubmit2KHR( vkGetDeviceProcAddr( device, "vkQueueSubmit2KHR" ) );
- vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetDeviceProcAddr( device, "vkQueueWaitIdle" ) );
- vkRegisterDeviceEventEXT =
- PFN_vkRegisterDeviceEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDeviceEventEXT" ) );
- vkRegisterDisplayEventEXT =
- PFN_vkRegisterDisplayEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDisplayEventEXT" ) );
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkReleaseFullScreenExclusiveModeEXT =
- PFN_vkReleaseFullScreenExclusiveModeEXT( vkGetDeviceProcAddr( device, "vkReleaseFullScreenExclusiveModeEXT" ) );
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkReleasePerformanceConfigurationINTEL = PFN_vkReleasePerformanceConfigurationINTEL(
- vkGetDeviceProcAddr( device, "vkReleasePerformanceConfigurationINTEL" ) );
- vkReleaseProfilingLockKHR =
- PFN_vkReleaseProfilingLockKHR( vkGetDeviceProcAddr( device, "vkReleaseProfilingLockKHR" ) );
- vkResetCommandBuffer = PFN_vkResetCommandBuffer( vkGetDeviceProcAddr( device, "vkResetCommandBuffer" ) );
- vkResetCommandPool = PFN_vkResetCommandPool( vkGetDeviceProcAddr( device, "vkResetCommandPool" ) );
- vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetDeviceProcAddr( device, "vkResetDescriptorPool" ) );
- vkResetEvent = PFN_vkResetEvent( vkGetDeviceProcAddr( device, "vkResetEvent" ) );
- vkResetFences = PFN_vkResetFences( vkGetDeviceProcAddr( device, "vkResetFences" ) );
- vkResetQueryPool = PFN_vkResetQueryPool( vkGetDeviceProcAddr( device, "vkResetQueryPool" ) );
- vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetDeviceProcAddr( device, "vkResetQueryPoolEXT" ) );
- if ( !vkResetQueryPool )
- vkResetQueryPool = vkResetQueryPoolEXT;
- vkSetDebugUtilsObjectNameEXT =
- PFN_vkSetDebugUtilsObjectNameEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectNameEXT" ) );
- vkSetDebugUtilsObjectTagEXT =
- PFN_vkSetDebugUtilsObjectTagEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectTagEXT" ) );
- vkSetEvent = PFN_vkSetEvent( vkGetDeviceProcAddr( device, "vkSetEvent" ) );
- vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetDeviceProcAddr( device, "vkSetHdrMetadataEXT" ) );
- vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetDeviceProcAddr( device, "vkSetLocalDimmingAMD" ) );
- vkSetPrivateDataEXT = PFN_vkSetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkSetPrivateDataEXT" ) );
- vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetDeviceProcAddr( device, "vkSignalSemaphore" ) );
- vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetDeviceProcAddr( device, "vkSignalSemaphoreKHR" ) );
- if ( !vkSignalSemaphore )
- vkSignalSemaphore = vkSignalSemaphoreKHR;
- vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetDeviceProcAddr( device, "vkTrimCommandPool" ) );
- vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetDeviceProcAddr( device, "vkTrimCommandPoolKHR" ) );
- if ( !vkTrimCommandPool )
- vkTrimCommandPool = vkTrimCommandPoolKHR;
- vkUninitializePerformanceApiINTEL =
- PFN_vkUninitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkUninitializePerformanceApiINTEL" ) );
- vkUnmapMemory = PFN_vkUnmapMemory( vkGetDeviceProcAddr( device, "vkUnmapMemory" ) );
- vkUpdateDescriptorSetWithTemplate =
- PFN_vkUpdateDescriptorSetWithTemplate( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplate" ) );
- vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR(
- vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplateKHR" ) );
- if ( !vkUpdateDescriptorSetWithTemplate )
- vkUpdateDescriptorSetWithTemplate = vkUpdateDescriptorSetWithTemplateKHR;
- vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSets" ) );
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkUpdateVideoSessionParametersKHR =
- PFN_vkUpdateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkUpdateVideoSessionParametersKHR" ) );
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkWaitForFences = PFN_vkWaitForFences( vkGetDeviceProcAddr( device, "vkWaitForFences" ) );
- vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetDeviceProcAddr( device, "vkWaitSemaphores" ) );
- vkWaitSemaphoresKHR = PFN_vkWaitSemaphoresKHR( vkGetDeviceProcAddr( device, "vkWaitSemaphoresKHR" ) );
- if ( !vkWaitSemaphores )
- vkWaitSemaphores = vkWaitSemaphoresKHR;
- vkWriteAccelerationStructuresPropertiesKHR = PFN_vkWriteAccelerationStructuresPropertiesKHR(
- vkGetDeviceProcAddr( device, "vkWriteAccelerationStructuresPropertiesKHR" ) );
+
+ //=== VK_HUAWEI_subpass_shading ===
+ vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(
+ vkGetDeviceProcAddr( device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI" ) );
+ vkCmdSubpassShadingHUAWEI =
+ PFN_vkCmdSubpassShadingHUAWEI( vkGetDeviceProcAddr( device, "vkCmdSubpassShadingHUAWEI" ) );
+
+ //=== VK_HUAWEI_invocation_mask ===
+ vkCmdBindInvocationMaskHUAWEI =
+ PFN_vkCmdBindInvocationMaskHUAWEI( vkGetDeviceProcAddr( device, "vkCmdBindInvocationMaskHUAWEI" ) );
+
+ //=== VK_NV_external_memory_rdma ===
+ vkGetMemoryRemoteAddressNV =
+ PFN_vkGetMemoryRemoteAddressNV( vkGetDeviceProcAddr( device, "vkGetMemoryRemoteAddressNV" ) );
+
+ //=== VK_EXT_extended_dynamic_state2 ===
+ vkCmdSetPatchControlPointsEXT =
+ PFN_vkCmdSetPatchControlPointsEXT( vkGetDeviceProcAddr( device, "vkCmdSetPatchControlPointsEXT" ) );
+ vkCmdSetRasterizerDiscardEnableEXT =
+ PFN_vkCmdSetRasterizerDiscardEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetRasterizerDiscardEnableEXT" ) );
+ vkCmdSetDepthBiasEnableEXT =
+ PFN_vkCmdSetDepthBiasEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBiasEnableEXT" ) );
+ vkCmdSetLogicOpEXT = PFN_vkCmdSetLogicOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetLogicOpEXT" ) );
+ vkCmdSetPrimitiveRestartEnableEXT =
+ PFN_vkCmdSetPrimitiveRestartEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveRestartEnableEXT" ) );
+
+ //=== VK_EXT_color_write_enable ===
+ vkCmdSetColorWriteEnableEXT =
+ PFN_vkCmdSetColorWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorWriteEnableEXT" ) );
+
+ //=== VK_EXT_multi_draw ===
+ vkCmdDrawMultiEXT = PFN_vkCmdDrawMultiEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiEXT" ) );
+ vkCmdDrawMultiIndexedEXT =
+ PFN_vkCmdDrawMultiIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiIndexedEXT" ) );
}
};
-
} // namespace VULKAN_HPP_NAMESPACE
namespace std
{
+ //=======================
+ //=== HASH structures ===
+ //=======================
+
+ template <typename BitType>
+ struct hash<VULKAN_HPP_NAMESPACE::Flags<BitType>>
+ {
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::Flags<BitType> const & flags ) const VULKAN_HPP_NOEXCEPT
+ {
+ return std::hash<typename std::underlying_type<BitType>::type>{}(
+ static_cast<typename std::underlying_type<BitType>::type>( flags ) );
+ }
+ };
+
+ //=== VK_VERSION_1_0 ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::AccelerationStructureKHR>
+ struct hash<VULKAN_HPP_NAMESPACE::Instance>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR const & accelerationStructureKHR ) const
- VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::Instance const & instance ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkAccelerationStructureKHR>{}(
- static_cast<VkAccelerationStructureKHR>( accelerationStructureKHR ) );
+ return std::hash<VkInstance>{}( static_cast<VkInstance>( instance ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::AccelerationStructureNV>
+ struct hash<VULKAN_HPP_NAMESPACE::PhysicalDevice>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureNV const & accelerationStructureNV ) const
- VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice const & physicalDevice ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkAccelerationStructureNV>{}(
- static_cast<VkAccelerationStructureNV>( accelerationStructureNV ) );
+ return std::hash<VkPhysicalDevice>{}( static_cast<VkPhysicalDevice>( physicalDevice ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::Buffer>
+ struct hash<VULKAN_HPP_NAMESPACE::Device>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::Buffer const & buffer ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::Device const & device ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkBuffer>{}( static_cast<VkBuffer>( buffer ) );
+ return std::hash<VkDevice>{}( static_cast<VkDevice>( device ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::BufferView>
+ struct hash<VULKAN_HPP_NAMESPACE::Queue>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferView const & bufferView ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::Queue const & queue ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkBufferView>{}( static_cast<VkBufferView>( bufferView ) );
+ return std::hash<VkQueue>{}( static_cast<VkQueue>( queue ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::CommandBuffer>
+ struct hash<VULKAN_HPP_NAMESPACE::DeviceMemory>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBuffer const & commandBuffer ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemory const & deviceMemory ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkCommandBuffer>{}( static_cast<VkCommandBuffer>( commandBuffer ) );
+ return std::hash<VkDeviceMemory>{}( static_cast<VkDeviceMemory>( deviceMemory ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::CommandPool>
+ struct hash<VULKAN_HPP_NAMESPACE::Fence>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandPool const & commandPool ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::Fence const & fence ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkCommandPool>{}( static_cast<VkCommandPool>( commandPool ) );
+ return std::hash<VkFence>{}( static_cast<VkFence>( fence ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::CuFunctionNVX>
+ struct hash<VULKAN_HPP_NAMESPACE::Semaphore>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::CuFunctionNVX const & cuFunctionNVX ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::Semaphore const & semaphore ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkCuFunctionNVX>{}( static_cast<VkCuFunctionNVX>( cuFunctionNVX ) );
+ return std::hash<VkSemaphore>{}( static_cast<VkSemaphore>( semaphore ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::CuModuleNVX>
+ struct hash<VULKAN_HPP_NAMESPACE::Event>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::CuModuleNVX const & cuModuleNVX ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::Event const & event ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkCuModuleNVX>{}( static_cast<VkCuModuleNVX>( cuModuleNVX ) );
+ return std::hash<VkEvent>{}( static_cast<VkEvent>( event ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT>
+ struct hash<VULKAN_HPP_NAMESPACE::QueryPool>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT const & debugReportCallbackEXT ) const
- VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPool const & queryPool ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkDebugReportCallbackEXT>{}( static_cast<VkDebugReportCallbackEXT>( debugReportCallbackEXT ) );
+ return std::hash<VkQueryPool>{}( static_cast<VkQueryPool>( queryPool ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT>
+ struct hash<VULKAN_HPP_NAMESPACE::Buffer>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT const & debugUtilsMessengerEXT ) const
- VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::Buffer const & buffer ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkDebugUtilsMessengerEXT>{}( static_cast<VkDebugUtilsMessengerEXT>( debugUtilsMessengerEXT ) );
+ return std::hash<VkBuffer>{}( static_cast<VkBuffer>( buffer ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::DeferredOperationKHR>
+ struct hash<VULKAN_HPP_NAMESPACE::BufferView>
{
- std::size_t
- operator()( VULKAN_HPP_NAMESPACE::DeferredOperationKHR const & deferredOperationKHR ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferView const & bufferView ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkDeferredOperationKHR>{}( static_cast<VkDeferredOperationKHR>( deferredOperationKHR ) );
+ return std::hash<VkBufferView>{}( static_cast<VkBufferView>( bufferView ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::DescriptorPool>
+ struct hash<VULKAN_HPP_NAMESPACE::Image>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorPool const & descriptorPool ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::Image const & image ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkDescriptorPool>{}( static_cast<VkDescriptorPool>( descriptorPool ) );
+ return std::hash<VkImage>{}( static_cast<VkImage>( image ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::DescriptorSet>
+ struct hash<VULKAN_HPP_NAMESPACE::ImageView>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSet const & descriptorSet ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageView const & imageView ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkDescriptorSet>{}( static_cast<VkDescriptorSet>( descriptorSet ) );
+ return std::hash<VkImageView>{}( static_cast<VkImageView>( imageView ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::DescriptorSetLayout>
+ struct hash<VULKAN_HPP_NAMESPACE::ShaderModule>
{
- std::size_t
- operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayout const & descriptorSetLayout ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModule const & shaderModule ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkDescriptorSetLayout>{}( static_cast<VkDescriptorSetLayout>( descriptorSetLayout ) );
+ return std::hash<VkShaderModule>{}( static_cast<VkShaderModule>( shaderModule ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate>
+ struct hash<VULKAN_HPP_NAMESPACE::PipelineCache>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate const & descriptorUpdateTemplate ) const
- VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCache const & pipelineCache ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkDescriptorUpdateTemplate>{}(
- static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ) );
+ return std::hash<VkPipelineCache>{}( static_cast<VkPipelineCache>( pipelineCache ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::Device>
+ struct hash<VULKAN_HPP_NAMESPACE::Pipeline>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::Device const & device ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::Pipeline const & pipeline ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkDevice>{}( static_cast<VkDevice>( device ) );
+ return std::hash<VkPipeline>{}( static_cast<VkPipeline>( pipeline ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::DeviceMemory>
+ struct hash<VULKAN_HPP_NAMESPACE::PipelineLayout>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemory const & deviceMemory ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineLayout const & pipelineLayout ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkDeviceMemory>{}( static_cast<VkDeviceMemory>( deviceMemory ) );
+ return std::hash<VkPipelineLayout>{}( static_cast<VkPipelineLayout>( pipelineLayout ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::DisplayKHR>
+ struct hash<VULKAN_HPP_NAMESPACE::Sampler>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayKHR const & displayKHR ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::Sampler const & sampler ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkDisplayKHR>{}( static_cast<VkDisplayKHR>( displayKHR ) );
+ return std::hash<VkSampler>{}( static_cast<VkSampler>( sampler ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::DisplayModeKHR>
+ struct hash<VULKAN_HPP_NAMESPACE::DescriptorPool>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeKHR const & displayModeKHR ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorPool const & descriptorPool ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkDisplayModeKHR>{}( static_cast<VkDisplayModeKHR>( displayModeKHR ) );
+ return std::hash<VkDescriptorPool>{}( static_cast<VkDescriptorPool>( descriptorPool ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::Event>
+ struct hash<VULKAN_HPP_NAMESPACE::DescriptorSet>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::Event const & event ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSet const & descriptorSet ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkEvent>{}( static_cast<VkEvent>( event ) );
+ return std::hash<VkDescriptorSet>{}( static_cast<VkDescriptorSet>( descriptorSet ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::Fence>
+ struct hash<VULKAN_HPP_NAMESPACE::DescriptorSetLayout>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::Fence const & fence ) const VULKAN_HPP_NOEXCEPT
+ std::size_t
+ operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayout const & descriptorSetLayout ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkFence>{}( static_cast<VkFence>( fence ) );
+ return std::hash<VkDescriptorSetLayout>{}( static_cast<VkDescriptorSetLayout>( descriptorSetLayout ) );
}
};
@@ -12844,214 +13797,252 @@ namespace std
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::Image>
+ struct hash<VULKAN_HPP_NAMESPACE::RenderPass>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::Image const & image ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPass const & renderPass ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkImage>{}( static_cast<VkImage>( image ) );
+ return std::hash<VkRenderPass>{}( static_cast<VkRenderPass>( renderPass ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::ImageView>
+ struct hash<VULKAN_HPP_NAMESPACE::CommandPool>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageView const & imageView ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandPool const & commandPool ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkImageView>{}( static_cast<VkImageView>( imageView ) );
+ return std::hash<VkCommandPool>{}( static_cast<VkCommandPool>( commandPool ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV>
+ struct hash<VULKAN_HPP_NAMESPACE::CommandBuffer>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV const & indirectCommandsLayoutNV ) const
- VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBuffer const & commandBuffer ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkIndirectCommandsLayoutNV>{}(
- static_cast<VkIndirectCommandsLayoutNV>( indirectCommandsLayoutNV ) );
+ return std::hash<VkCommandBuffer>{}( static_cast<VkCommandBuffer>( commandBuffer ) );
}
};
+ //=== VK_VERSION_1_1 ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::Instance>
+ struct hash<VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::Instance const & instance ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion const & samplerYcbcrConversion ) const
+ VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkInstance>{}( static_cast<VkInstance>( instance ) );
+ return std::hash<VkSamplerYcbcrConversion>{}( static_cast<VkSamplerYcbcrConversion>( samplerYcbcrConversion ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL>
+ struct hash<VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL const & performanceConfigurationINTEL )
- const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate const & descriptorUpdateTemplate ) const
+ VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkPerformanceConfigurationINTEL>{}(
- static_cast<VkPerformanceConfigurationINTEL>( performanceConfigurationINTEL ) );
+ return std::hash<VkDescriptorUpdateTemplate>{}(
+ static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ) );
}
};
+ //=== VK_KHR_surface ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::PhysicalDevice>
+ struct hash<VULKAN_HPP_NAMESPACE::SurfaceKHR>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice const & physicalDevice ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceKHR const & surfaceKHR ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkPhysicalDevice>{}( static_cast<VkPhysicalDevice>( physicalDevice ) );
+ return std::hash<VkSurfaceKHR>{}( static_cast<VkSurfaceKHR>( surfaceKHR ) );
}
};
+ //=== VK_KHR_swapchain ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::Pipeline>
+ struct hash<VULKAN_HPP_NAMESPACE::SwapchainKHR>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::Pipeline const & pipeline ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainKHR const & swapchainKHR ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkPipeline>{}( static_cast<VkPipeline>( pipeline ) );
+ return std::hash<VkSwapchainKHR>{}( static_cast<VkSwapchainKHR>( swapchainKHR ) );
}
};
+ //=== VK_KHR_display ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::PipelineCache>
+ struct hash<VULKAN_HPP_NAMESPACE::DisplayKHR>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCache const & pipelineCache ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayKHR const & displayKHR ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkPipelineCache>{}( static_cast<VkPipelineCache>( pipelineCache ) );
+ return std::hash<VkDisplayKHR>{}( static_cast<VkDisplayKHR>( displayKHR ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::PipelineLayout>
+ struct hash<VULKAN_HPP_NAMESPACE::DisplayModeKHR>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineLayout const & pipelineLayout ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeKHR const & displayModeKHR ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkPipelineLayout>{}( static_cast<VkPipelineLayout>( pipelineLayout ) );
+ return std::hash<VkDisplayModeKHR>{}( static_cast<VkDisplayModeKHR>( displayModeKHR ) );
}
};
+ //=== VK_EXT_debug_report ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT>
+ struct hash<VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT>
{
- std::size_t
- operator()( VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT const & privateDataSlotEXT ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT const & debugReportCallbackEXT ) const
+ VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkPrivateDataSlotEXT>{}( static_cast<VkPrivateDataSlotEXT>( privateDataSlotEXT ) );
+ return std::hash<VkDebugReportCallbackEXT>{}( static_cast<VkDebugReportCallbackEXT>( debugReportCallbackEXT ) );
}
};
+#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_queue ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::QueryPool>
+ struct hash<VULKAN_HPP_NAMESPACE::VideoSessionKHR>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPool const & queryPool ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionKHR const & videoSessionKHR ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkQueryPool>{}( static_cast<VkQueryPool>( queryPool ) );
+ return std::hash<VkVideoSessionKHR>{}( static_cast<VkVideoSessionKHR>( videoSessionKHR ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::Queue>
+ struct hash<VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::Queue const & queue ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR const & videoSessionParametersKHR ) const
+ VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkQueue>{}( static_cast<VkQueue>( queue ) );
+ return std::hash<VkVideoSessionParametersKHR>{}(
+ static_cast<VkVideoSessionParametersKHR>( videoSessionParametersKHR ) );
}
};
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_NVX_binary_import ===
template <>
- struct hash<VULKAN_HPP_NAMESPACE::RenderPass>
+ struct hash<VULKAN_HPP_NAMESPACE::CuModuleNVX>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPass const & renderPass ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::CuModuleNVX const & cuModuleNVX ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkRenderPass>{}( static_cast<VkRenderPass>( renderPass ) );
+ return std::hash<VkCuModuleNVX>{}( static_cast<VkCuModuleNVX>( cuModuleNVX ) );
}
};
template <>
- struct hash<VULKAN_HPP_NAMESPACE::Sampler>
+ struct hash<VULKAN_HPP_NAMESPACE::CuFunctionNVX>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::Sampler const & sampler ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::CuFunctionNVX const & cuFunctionNVX ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkSampler>{}( static_cast<VkSampler>( sampler ) );
+ return std::hash<VkCuFunctionNVX>{}( static_cast<VkCuFunctionNVX>( cuFunctionNVX ) );
}
};
+ //=== VK_EXT_debug_utils ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion>
+ struct hash<VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion const & samplerYcbcrConversion ) const
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT const & debugUtilsMessengerEXT ) const
VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkSamplerYcbcrConversion>{}( static_cast<VkSamplerYcbcrConversion>( samplerYcbcrConversion ) );
+ return std::hash<VkDebugUtilsMessengerEXT>{}( static_cast<VkDebugUtilsMessengerEXT>( debugUtilsMessengerEXT ) );
}
};
+ //=== VK_KHR_acceleration_structure ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::Semaphore>
+ struct hash<VULKAN_HPP_NAMESPACE::AccelerationStructureKHR>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::Semaphore const & semaphore ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR const & accelerationStructureKHR ) const
+ VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkSemaphore>{}( static_cast<VkSemaphore>( semaphore ) );
+ return std::hash<VkAccelerationStructureKHR>{}(
+ static_cast<VkAccelerationStructureKHR>( accelerationStructureKHR ) );
}
};
+ //=== VK_EXT_validation_cache ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::ShaderModule>
+ struct hash<VULKAN_HPP_NAMESPACE::ValidationCacheEXT>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModule const & shaderModule ) const VULKAN_HPP_NOEXCEPT
+ std::size_t
+ operator()( VULKAN_HPP_NAMESPACE::ValidationCacheEXT const & validationCacheEXT ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkShaderModule>{}( static_cast<VkShaderModule>( shaderModule ) );
+ return std::hash<VkValidationCacheEXT>{}( static_cast<VkValidationCacheEXT>( validationCacheEXT ) );
}
};
+ //=== VK_NV_ray_tracing ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::SurfaceKHR>
+ struct hash<VULKAN_HPP_NAMESPACE::AccelerationStructureNV>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceKHR const & surfaceKHR ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureNV const & accelerationStructureNV ) const
+ VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkSurfaceKHR>{}( static_cast<VkSurfaceKHR>( surfaceKHR ) );
+ return std::hash<VkAccelerationStructureNV>{}(
+ static_cast<VkAccelerationStructureNV>( accelerationStructureNV ) );
}
};
+ //=== VK_INTEL_performance_query ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::SwapchainKHR>
+ struct hash<VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainKHR const & swapchainKHR ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL const & performanceConfigurationINTEL )
+ const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkSwapchainKHR>{}( static_cast<VkSwapchainKHR>( swapchainKHR ) );
+ return std::hash<VkPerformanceConfigurationINTEL>{}(
+ static_cast<VkPerformanceConfigurationINTEL>( performanceConfigurationINTEL ) );
}
};
+ //=== VK_KHR_deferred_host_operations ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::ValidationCacheEXT>
+ struct hash<VULKAN_HPP_NAMESPACE::DeferredOperationKHR>
{
std::size_t
- operator()( VULKAN_HPP_NAMESPACE::ValidationCacheEXT const & validationCacheEXT ) const VULKAN_HPP_NOEXCEPT
+ operator()( VULKAN_HPP_NAMESPACE::DeferredOperationKHR const & deferredOperationKHR ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkValidationCacheEXT>{}( static_cast<VkValidationCacheEXT>( validationCacheEXT ) );
+ return std::hash<VkDeferredOperationKHR>{}( static_cast<VkDeferredOperationKHR>( deferredOperationKHR ) );
}
};
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_NV_device_generated_commands ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::VideoSessionKHR>
+ struct hash<VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionKHR const & videoSessionKHR ) const VULKAN_HPP_NOEXCEPT
+ std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV const & indirectCommandsLayoutNV ) const
+ VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkVideoSessionKHR>{}( static_cast<VkVideoSessionKHR>( videoSessionKHR ) );
+ return std::hash<VkIndirectCommandsLayoutNV>{}(
+ static_cast<VkIndirectCommandsLayoutNV>( indirectCommandsLayoutNV ) );
}
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_EXT_private_data ===
+
template <>
- struct hash<VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR>
+ struct hash<VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT>
{
- std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR const & videoSessionParametersKHR ) const
- VULKAN_HPP_NOEXCEPT
+ std::size_t
+ operator()( VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT const & privateDataSlotEXT ) const VULKAN_HPP_NOEXCEPT
{
- return std::hash<VkVideoSessionParametersKHR>{}(
- static_cast<VkVideoSessionParametersKHR>( videoSessionParametersKHR ) );
+ return std::hash<VkPrivateDataSlotEXT>{}( static_cast<VkPrivateDataSlotEXT>( privateDataSlotEXT ) );
}
};
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
} // namespace std
#endif
diff --git a/thirdparty/vulkan/include/vulkan/vulkan_beta.h b/thirdparty/vulkan/include/vulkan/vulkan_beta.h
index 9aebb1abb2..e2337adfde 100644
--- a/thirdparty/vulkan/include/vulkan/vulkan_beta.h
+++ b/thirdparty/vulkan/include/vulkan/vulkan_beta.h
@@ -22,7 +22,7 @@ extern "C" {
#define VK_KHR_video_queue 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionKHR)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionParametersKHR)
-#define VK_KHR_VIDEO_QUEUE_SPEC_VERSION 1
+#define VK_KHR_VIDEO_QUEUE_SPEC_VERSION 2
#define VK_KHR_VIDEO_QUEUE_EXTENSION_NAME "VK_KHR_video_queue"
typedef enum VkQueryResultStatusKHR {
@@ -66,12 +66,12 @@ typedef enum VkVideoComponentBitDepthFlagBitsKHR {
} VkVideoComponentBitDepthFlagBitsKHR;
typedef VkFlags VkVideoComponentBitDepthFlagsKHR;
-typedef enum VkVideoCapabilitiesFlagBitsKHR {
- VK_VIDEO_CAPABILITIES_PROTECTED_CONTENT_BIT_KHR = 0x00000001,
- VK_VIDEO_CAPABILITIES_SEPARATE_REFERENCE_IMAGES_BIT_KHR = 0x00000002,
- VK_VIDEO_CAPABILITIES_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
-} VkVideoCapabilitiesFlagBitsKHR;
-typedef VkFlags VkVideoCapabilitiesFlagsKHR;
+typedef enum VkVideoCapabilityFlagBitsKHR {
+ VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR = 0x00000001,
+ VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR = 0x00000002,
+ VK_VIDEO_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
+} VkVideoCapabilityFlagBitsKHR;
+typedef VkFlags VkVideoCapabilityFlagsKHR;
typedef enum VkVideoSessionCreateFlagBitsKHR {
VK_VIDEO_SESSION_CREATE_DEFAULT_KHR = 0,
@@ -120,21 +120,21 @@ typedef struct VkVideoProfilesKHR {
} VkVideoProfilesKHR;
typedef struct VkVideoCapabilitiesKHR {
- VkStructureType sType;
- void* pNext;
- VkVideoCapabilitiesFlagsKHR capabilityFlags;
- VkDeviceSize minBitstreamBufferOffsetAlignment;
- VkDeviceSize minBitstreamBufferSizeAlignment;
- VkExtent2D videoPictureExtentGranularity;
- VkExtent2D minExtent;
- VkExtent2D maxExtent;
- uint32_t maxReferencePicturesSlotsCount;
- uint32_t maxReferencePicturesActiveCount;
+ VkStructureType sType;
+ void* pNext;
+ VkVideoCapabilityFlagsKHR capabilityFlags;
+ VkDeviceSize minBitstreamBufferOffsetAlignment;
+ VkDeviceSize minBitstreamBufferSizeAlignment;
+ VkExtent2D videoPictureExtentGranularity;
+ VkExtent2D minExtent;
+ VkExtent2D maxExtent;
+ uint32_t maxReferencePicturesSlotsCount;
+ uint32_t maxReferencePicturesActiveCount;
} VkVideoCapabilitiesKHR;
typedef struct VkPhysicalDeviceVideoFormatInfoKHR {
VkStructureType sType;
- const void* pNext;
+ void* pNext;
VkImageUsageFlags imageUsage;
const VkVideoProfilesKHR* pVideoProfiles;
} VkPhysicalDeviceVideoFormatInfoKHR;
@@ -433,10 +433,10 @@ VKAPI_ATTR void VKAPI_CALL vkCmdEncodeVideoKHR(
#define VK_EXT_video_encode_h264 1
#include "vk_video/vulkan_video_codec_h264std.h"
#include "vk_video/vulkan_video_codec_h264std_encode.h"
-#define VK_EXT_VIDEO_ENCODE_H264_SPEC_VERSION 1
+#define VK_EXT_VIDEO_ENCODE_H264_SPEC_VERSION 2
#define VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME "VK_EXT_video_encode_h264"
-typedef enum VkVideoEncodeH264CapabilitiesFlagBitsEXT {
+typedef enum VkVideoEncodeH264CapabilityFlagBitsEXT {
VK_VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT = 0x00000001,
VK_VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT = 0x00000002,
VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BI_PRED_IMPLICIT_BIT_EXT = 0x00000004,
@@ -448,9 +448,9 @@ typedef enum VkVideoEncodeH264CapabilitiesFlagBitsEXT {
VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT = 0x00000100,
VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT = 0x00000200,
VK_VIDEO_ENCODE_H264_CAPABILITY_EVENLY_DISTRIBUTED_SLICE_SIZE_BIT_EXT = 0x00000400,
- VK_VIDEO_ENCODE_H264_CAPABILITIES_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkVideoEncodeH264CapabilitiesFlagBitsEXT;
-typedef VkFlags VkVideoEncodeH264CapabilitiesFlagsEXT;
+ VK_VIDEO_ENCODE_H264_CAPABILITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkVideoEncodeH264CapabilityFlagBitsEXT;
+typedef VkFlags VkVideoEncodeH264CapabilityFlagsEXT;
typedef enum VkVideoEncodeH264InputModeFlagBitsEXT {
VK_VIDEO_ENCODE_H264_INPUT_MODE_FRAME_BIT_EXT = 0x00000001,
@@ -475,19 +475,19 @@ typedef enum VkVideoEncodeH264CreateFlagBitsEXT {
} VkVideoEncodeH264CreateFlagBitsEXT;
typedef VkFlags VkVideoEncodeH264CreateFlagsEXT;
typedef struct VkVideoEncodeH264CapabilitiesEXT {
- VkStructureType sType;
- const void* pNext;
- VkVideoEncodeH264CapabilitiesFlagsEXT flags;
- VkVideoEncodeH264InputModeFlagsEXT inputModeFlags;
- VkVideoEncodeH264OutputModeFlagsEXT outputModeFlags;
- VkExtent2D minPictureSizeInMbs;
- VkExtent2D maxPictureSizeInMbs;
- VkExtent2D inputImageDataAlignment;
- uint8_t maxNumL0ReferenceForP;
- uint8_t maxNumL0ReferenceForB;
- uint8_t maxNumL1Reference;
- uint8_t qualityLevelCount;
- VkExtensionProperties stdExtensionVersion;
+ VkStructureType sType;
+ const void* pNext;
+ VkVideoEncodeH264CapabilityFlagsEXT flags;
+ VkVideoEncodeH264InputModeFlagsEXT inputModeFlags;
+ VkVideoEncodeH264OutputModeFlagsEXT outputModeFlags;
+ VkExtent2D minPictureSizeInMbs;
+ VkExtent2D maxPictureSizeInMbs;
+ VkExtent2D inputImageDataAlignment;
+ uint8_t maxNumL0ReferenceForP;
+ uint8_t maxNumL0ReferenceForB;
+ uint8_t maxNumL1Reference;
+ uint8_t qualityLevelCount;
+ VkExtensionProperties stdExtensionVersion;
} VkVideoEncodeH264CapabilitiesEXT;
typedef struct VkVideoEncodeH264SessionCreateInfoEXT {
@@ -567,22 +567,22 @@ typedef struct VkVideoEncodeH264ProfileEXT {
#define VK_EXT_video_decode_h264 1
#include "vk_video/vulkan_video_codec_h264std_decode.h"
-#define VK_EXT_VIDEO_DECODE_H264_SPEC_VERSION 1
+#define VK_EXT_VIDEO_DECODE_H264_SPEC_VERSION 3
#define VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME "VK_EXT_video_decode_h264"
-typedef enum VkVideoDecodeH264FieldLayoutFlagBitsEXT {
- VK_VIDEO_DECODE_H264_PROGRESSIVE_PICTURES_ONLY_EXT = 0,
- VK_VIDEO_DECODE_H264_FIELD_LAYOUT_LINE_INTERLACED_PLANE_BIT_EXT = 0x00000001,
- VK_VIDEO_DECODE_H264_FIELD_LAYOUT_SEPARATE_INTERLACED_PLANE_BIT_EXT = 0x00000002,
- VK_VIDEO_DECODE_H264_FIELD_LAYOUT_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
-} VkVideoDecodeH264FieldLayoutFlagBitsEXT;
-typedef VkFlags VkVideoDecodeH264FieldLayoutFlagsEXT;
+typedef enum VkVideoDecodeH264PictureLayoutFlagBitsEXT {
+ VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_EXT = 0,
+ VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_EXT = 0x00000001,
+ VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_EXT = 0x00000002,
+ VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
+} VkVideoDecodeH264PictureLayoutFlagBitsEXT;
+typedef VkFlags VkVideoDecodeH264PictureLayoutFlagsEXT;
typedef VkFlags VkVideoDecodeH264CreateFlagsEXT;
typedef struct VkVideoDecodeH264ProfileEXT {
- VkStructureType sType;
- const void* pNext;
- StdVideoH264ProfileIdc stdProfileIdc;
- VkVideoDecodeH264FieldLayoutFlagsEXT fieldLayout;
+ VkStructureType sType;
+ const void* pNext;
+ StdVideoH264ProfileIdc stdProfileIdc;
+ VkVideoDecodeH264PictureLayoutFlagsEXT pictureLayout;
} VkVideoDecodeH264ProfileEXT;
typedef struct VkVideoDecodeH264CapabilitiesEXT {
diff --git a/thirdparty/vulkan/include/vulkan/vulkan_core.h b/thirdparty/vulkan/include/vulkan/vulkan_core.h
index b2448fb2e1..36013cbed7 100644
--- a/thirdparty/vulkan/include/vulkan/vulkan_core.h
+++ b/thirdparty/vulkan/include/vulkan/vulkan_core.h
@@ -72,7 +72,7 @@ extern "C" {
#define VK_API_VERSION_1_0 VK_MAKE_API_VERSION(0, 1, 0, 0)// Patch version should always be set to 0
// Version of this file
-#define VK_HEADER_VERSION 182
+#define VK_HEADER_VERSION 190
// Complete version of this file
#define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 2, VK_HEADER_VERSION)
@@ -120,6 +120,7 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)
+#define VK_UUID_SIZE 16U
#define VK_ATTACHMENT_UNUSED (~0U)
#define VK_FALSE 0U
#define VK_LOD_CLAMP_NONE 1000.0F
@@ -132,7 +133,6 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)
#define VK_MAX_MEMORY_TYPES 32U
#define VK_MAX_MEMORY_HEAPS 16U
#define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256U
-#define VK_UUID_SIZE 16U
#define VK_MAX_EXTENSION_NAME_SIZE 256U
#define VK_MAX_DESCRIPTION_SIZE 256U
@@ -714,6 +714,7 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT = 1000244002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT = 1000245000,
VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT = 1000247000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR = 1000248000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV = 1000249000,
VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249002,
@@ -741,6 +742,7 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR = 1000269003,
VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR = 1000269004,
VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR = 1000269005,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT = 1000273000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT = 1000276000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV = 1000277000,
VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV = 1000277001,
@@ -752,6 +754,8 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV = 1000277007,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV = 1000278000,
VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV = 1000278001,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR = 1000280000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR = 1000280001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT = 1000281000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT = 1000281001,
VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM = 1000282000,
@@ -765,6 +769,8 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT = 1000287001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT = 1000287002,
VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR = 1000290000,
+ VK_STRUCTURE_TYPE_PRESENT_ID_KHR = 1000294000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR = 1000294001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT = 1000295000,
VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT = 1000295001,
VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT = 1000295002,
@@ -820,14 +826,18 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT = 1000352001,
VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT = 1000352002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT = 1000353000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT = 1000356000,
VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364000,
VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA = 1000364001,
VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364002,
VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365000,
VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365001,
- VK_STRUCTURE_TYPE_SUBPASSS_SHADING_PIPELINE_CREATE_INFO_HUAWEI = 1000369000,
+ VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI = 1000369000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI = 1000369001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI = 1000369002,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI = 1000370000,
+ VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV = 1000371000,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV = 1000371001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT = 1000377000,
VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX = 1000378000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT = 1000381000,
@@ -1058,6 +1068,11 @@ typedef enum VkObjectType {
VK_OBJECT_TYPE_MAX_ENUM = 0x7FFFFFFF
} VkObjectType;
+typedef enum VkPipelineCacheHeaderVersion {
+ VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
+ VK_PIPELINE_CACHE_HEADER_VERSION_MAX_ENUM = 0x7FFFFFFF
+} VkPipelineCacheHeaderVersion;
+
typedef enum VkVendorId {
VK_VENDOR_ID_VIV = 0x10001,
VK_VENDOR_ID_VSI = 0x10002,
@@ -1068,11 +1083,6 @@ typedef enum VkVendorId {
VK_VENDOR_ID_MAX_ENUM = 0x7FFFFFFF
} VkVendorId;
-typedef enum VkPipelineCacheHeaderVersion {
- VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1,
- VK_PIPELINE_CACHE_HEADER_VERSION_MAX_ENUM = 0x7FFFFFFF
-} VkPipelineCacheHeaderVersion;
-
typedef enum VkSystemAllocationScope {
VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1,
@@ -1699,13 +1709,15 @@ typedef enum VkAttachmentLoadOp {
VK_ATTACHMENT_LOAD_OP_LOAD = 0,
VK_ATTACHMENT_LOAD_OP_CLEAR = 1,
VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2,
+ VK_ATTACHMENT_LOAD_OP_NONE_EXT = 1000400000,
VK_ATTACHMENT_LOAD_OP_MAX_ENUM = 0x7FFFFFFF
} VkAttachmentLoadOp;
typedef enum VkAttachmentStoreOp {
VK_ATTACHMENT_STORE_OP_STORE = 0,
VK_ATTACHMENT_STORE_OP_DONT_CARE = 1,
- VK_ATTACHMENT_STORE_OP_NONE_QCOM = 1000301000,
+ VK_ATTACHMENT_STORE_OP_NONE_EXT = 1000301000,
+ VK_ATTACHMENT_STORE_OP_NONE_QCOM = VK_ATTACHMENT_STORE_OP_NONE_EXT,
VK_ATTACHMENT_STORE_OP_MAX_ENUM = 0x7FFFFFFF
} VkAttachmentStoreOp;
@@ -1917,6 +1929,7 @@ typedef enum VkImageUsageFlagBits {
#ifdef VK_ENABLE_BETA_EXTENSIONS
VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR = 0x00008000,
#endif
+ VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI = 0x00040000,
VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV = VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,
VK_IMAGE_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkImageUsageFlagBits;
@@ -1940,6 +1953,7 @@ typedef enum VkMemoryPropertyFlagBits {
VK_MEMORY_PROPERTY_PROTECTED_BIT = 0x00000020,
VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD = 0x00000040,
VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD = 0x00000080,
+ VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV = 0x00000100,
VK_MEMORY_PROPERTY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkMemoryPropertyFlagBits;
typedef VkFlags VkMemoryPropertyFlags;
@@ -2114,10 +2128,6 @@ typedef enum VkImageViewCreateFlagBits {
VK_IMAGE_VIEW_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
} VkImageViewCreateFlagBits;
typedef VkFlags VkImageViewCreateFlags;
-
-typedef enum VkShaderModuleCreateFlagBits {
- VK_SHADER_MODULE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
-} VkShaderModuleCreateFlagBits;
typedef VkFlags VkShaderModuleCreateFlags;
typedef enum VkPipelineCacheCreateFlagBits {
@@ -2421,6 +2431,14 @@ typedef struct VkMemoryBarrier {
VkAccessFlags dstAccessMask;
} VkMemoryBarrier;
+typedef struct VkPipelineCacheHeaderVersionOne {
+ uint32_t headerSize;
+ VkPipelineCacheHeaderVersion headerVersion;
+ uint32_t vendorID;
+ uint32_t deviceID;
+ uint8_t pipelineCacheUUID[VK_UUID_SIZE];
+} VkPipelineCacheHeaderVersionOne;
+
typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)(
void* pUserData,
size_t size,
@@ -4492,6 +4510,7 @@ typedef enum VkExternalMemoryHandleTypeFlagBits {
VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT = 0x00000080,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 0x00000100,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA = 0x00000800,
+ VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV = 0x00001000,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT,
@@ -5264,6 +5283,7 @@ typedef enum VkDriverId {
VK_DRIVER_ID_MOLTENVK = 14,
VK_DRIVER_ID_COREAVI_PROPRIETARY = 15,
VK_DRIVER_ID_JUICE_PROPRIETARY = 16,
+ VK_DRIVER_ID_VERISILICON_PROPRIETARY = 17,
VK_DRIVER_ID_AMD_PROPRIETARY_KHR = VK_DRIVER_ID_AMD_PROPRIETARY,
VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR = VK_DRIVER_ID_AMD_OPEN_SOURCE,
VK_DRIVER_ID_MESA_RADV_KHR = VK_DRIVER_ID_MESA_RADV,
@@ -6177,7 +6197,7 @@ typedef struct VkAcquireNextImageInfoKHR {
typedef struct VkDeviceGroupPresentCapabilitiesKHR {
VkStructureType sType;
- const void* pNext;
+ void* pNext;
uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE];
VkDeviceGroupPresentModeFlagsKHR modes;
} VkDeviceGroupPresentCapabilitiesKHR;
@@ -7052,7 +7072,7 @@ typedef struct VkPhysicalDevicePerformanceQueryPropertiesKHR {
typedef struct VkPerformanceCounterKHR {
VkStructureType sType;
- const void* pNext;
+ void* pNext;
VkPerformanceCounterUnitKHR unit;
VkPerformanceCounterScopeKHR scope;
VkPerformanceCounterStorageKHR storage;
@@ -7061,7 +7081,7 @@ typedef struct VkPerformanceCounterKHR {
typedef struct VkPerformanceCounterDescriptionKHR {
VkStructureType sType;
- const void* pNext;
+ void* pNext;
VkPerformanceCounterDescriptionFlagsKHR flags;
char name[VK_MAX_DESCRIPTION_SIZE];
char category[VK_MAX_DESCRIPTION_SIZE];
@@ -7662,6 +7682,26 @@ typedef VkAttachmentDescriptionStencilLayout VkAttachmentDescriptionStencilLayou
+#define VK_KHR_present_wait 1
+#define VK_KHR_PRESENT_WAIT_SPEC_VERSION 1
+#define VK_KHR_PRESENT_WAIT_EXTENSION_NAME "VK_KHR_present_wait"
+typedef struct VkPhysicalDevicePresentWaitFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 presentWait;
+} VkPhysicalDevicePresentWaitFeaturesKHR;
+
+typedef VkResult (VKAPI_PTR *PFN_vkWaitForPresentKHR)(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkWaitForPresentKHR(
+ VkDevice device,
+ VkSwapchainKHR swapchain,
+ uint64_t presentId,
+ uint64_t timeout);
+#endif
+
+
#define VK_KHR_uniform_buffer_standard_layout 1
#define VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_SPEC_VERSION 1
#define VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME "VK_KHR_uniform_buffer_standard_layout"
@@ -7826,6 +7866,52 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineExecutableInternalRepresentationsKHR
#endif
+#define VK_KHR_shader_integer_dot_product 1
+#define VK_KHR_SHADER_INTEGER_DOT_PRODUCT_SPEC_VERSION 1
+#define VK_KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME "VK_KHR_shader_integer_dot_product"
+typedef struct VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderIntegerDotProduct;
+} VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR;
+
+typedef struct VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 integerDotProduct8BitUnsignedAccelerated;
+ VkBool32 integerDotProduct8BitSignedAccelerated;
+ VkBool32 integerDotProduct8BitMixedSignednessAccelerated;
+ VkBool32 integerDotProduct4x8BitPackedUnsignedAccelerated;
+ VkBool32 integerDotProduct4x8BitPackedSignedAccelerated;
+ VkBool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated;
+ VkBool32 integerDotProduct16BitUnsignedAccelerated;
+ VkBool32 integerDotProduct16BitSignedAccelerated;
+ VkBool32 integerDotProduct16BitMixedSignednessAccelerated;
+ VkBool32 integerDotProduct32BitUnsignedAccelerated;
+ VkBool32 integerDotProduct32BitSignedAccelerated;
+ VkBool32 integerDotProduct32BitMixedSignednessAccelerated;
+ VkBool32 integerDotProduct64BitUnsignedAccelerated;
+ VkBool32 integerDotProduct64BitSignedAccelerated;
+ VkBool32 integerDotProduct64BitMixedSignednessAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated;
+ VkBool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated;
+} VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR;
+
+
+
#define VK_KHR_pipeline_library 1
#define VK_KHR_PIPELINE_LIBRARY_SPEC_VERSION 1
#define VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME "VK_KHR_pipeline_library"
@@ -7843,6 +7929,24 @@ typedef struct VkPipelineLibraryCreateInfoKHR {
#define VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME "VK_KHR_shader_non_semantic_info"
+#define VK_KHR_present_id 1
+#define VK_KHR_PRESENT_ID_SPEC_VERSION 1
+#define VK_KHR_PRESENT_ID_EXTENSION_NAME "VK_KHR_present_id"
+typedef struct VkPresentIdKHR {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t swapchainCount;
+ const uint64_t* pPresentIds;
+} VkPresentIdKHR;
+
+typedef struct VkPhysicalDevicePresentIdFeaturesKHR {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 presentId;
+} VkPhysicalDevicePresentIdFeaturesKHR;
+
+
+
#define VK_KHR_synchronization2 1
typedef uint64_t VkFlags64;
#define VK_KHR_SYNCHRONIZATION_2_SPEC_VERSION 1
@@ -7865,7 +7969,7 @@ static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = 0x00000400ULL;
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = 0x00000800ULL;
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = 0x00001000ULL;
-static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR = 0x00001000;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR = 0x00001000ULL;
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = 0x00002000ULL;
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_HOST_BIT_KHR = 0x00004000ULL;
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = 0x00008000ULL;
@@ -7887,15 +7991,16 @@ static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000ULL;
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = 0x00020000ULL;
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00400000ULL;
-static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV = 0x00400000;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV = 0x00400000ULL;
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 0x02000000ULL;
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR = 0x00200000ULL;
-static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV = 0x00200000;
-static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV = 0x02000000;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV = 0x00200000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV = 0x02000000ULL;
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 0x00800000ULL;
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = 0x00080000ULL;
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = 0x00100000ULL;
static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI = 0x8000000000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI = 0x10000000000ULL;
typedef VkFlags64 VkAccessFlags2KHR;
@@ -7941,13 +8046,14 @@ static const VkAccessFlagBits2KHR VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT
static const VkAccessFlagBits2KHR VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV = 0x00020000ULL;
static const VkAccessFlagBits2KHR VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV = 0x00040000ULL;
static const VkAccessFlagBits2KHR VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000ULL;
-static const VkAccessFlagBits2KHR VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV = 0x00800000;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV = 0x00800000ULL;
static const VkAccessFlagBits2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000ULL;
static const VkAccessFlagBits2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000ULL;
-static const VkAccessFlagBits2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV = 0x00200000;
-static const VkAccessFlagBits2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV = 0x00400000;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV = 0x00200000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV = 0x00400000ULL;
static const VkAccessFlagBits2KHR VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000ULL;
static const VkAccessFlagBits2KHR VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI = 0x8000000000ULL;
typedef enum VkSubmitFlagBitsKHR {
@@ -10075,9 +10181,10 @@ typedef VkGeometryFlagBitsKHR VkGeometryFlagBitsNV;
typedef enum VkGeometryInstanceFlagBitsKHR {
VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR = 0x00000001,
- VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = 0x00000002,
+ VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR = 0x00000002,
VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR = 0x00000004,
VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR = 0x00000008,
+ VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR,
VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV = VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR,
VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR,
VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV = VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR,
@@ -11588,6 +11695,28 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilOpEXT(
#endif
+#define VK_EXT_shader_atomic_float2 1
+#define VK_EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION 1
+#define VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME "VK_EXT_shader_atomic_float2"
+typedef struct VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 shaderBufferFloat16Atomics;
+ VkBool32 shaderBufferFloat16AtomicAdd;
+ VkBool32 shaderBufferFloat16AtomicMinMax;
+ VkBool32 shaderBufferFloat32AtomicMinMax;
+ VkBool32 shaderBufferFloat64AtomicMinMax;
+ VkBool32 shaderSharedFloat16Atomics;
+ VkBool32 shaderSharedFloat16AtomicAdd;
+ VkBool32 shaderSharedFloat16AtomicMinMax;
+ VkBool32 shaderSharedFloat32AtomicMinMax;
+ VkBool32 shaderSharedFloat64AtomicMinMax;
+ VkBool32 shaderImageFloat32AtomicMinMax;
+ VkBool32 sparseImageFloat32AtomicMinMax;
+} VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT;
+
+
+
#define VK_EXT_shader_demote_to_helper_invocation 1
#define VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_SPEC_VERSION 1
#define VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME "VK_EXT_shader_demote_to_helper_invocation"
@@ -11867,7 +11996,7 @@ typedef struct VkPhysicalDeviceDeviceMemoryReportFeaturesEXT {
typedef struct VkDeviceMemoryReportCallbackDataEXT {
VkStructureType sType;
- const void* pNext;
+ void* pNext;
VkDeviceMemoryReportFlagsEXT flags;
VkDeviceMemoryReportEventTypeEXT type;
uint64_t memoryObjectId;
@@ -12202,7 +12331,7 @@ typedef struct VkAccelerationStructureMotionInstanceNV {
typedef struct VkPhysicalDeviceRayTracingMotionBlurFeaturesNV {
VkStructureType sType;
- const void* pNext;
+ void* pNext;
VkBool32 rayTracingMotionBlur;
VkBool32 rayTracingMotionBlurPipelineTraceRaysIndirect;
} VkPhysicalDeviceRayTracingMotionBlurFeaturesNV;
@@ -12370,8 +12499,20 @@ typedef struct VkPhysicalDeviceDrmPropertiesEXT {
+#define VK_EXT_primitive_topology_list_restart 1
+#define VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_SPEC_VERSION 1
+#define VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME "VK_EXT_primitive_topology_list_restart"
+typedef struct VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 primitiveTopologyListRestart;
+ VkBool32 primitiveTopologyPatchListRestart;
+} VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT;
+
+
+
#define VK_HUAWEI_subpass_shading 1
-#define VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION 0
+#define VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION 2
#define VK_HUAWEI_SUBPASS_SHADING_EXTENSION_NAME "VK_HUAWEI_subpass_shading"
typedef struct VkSubpassShadingPipelineCreateInfoHUAWEI {
VkStructureType sType;
@@ -12392,11 +12533,12 @@ typedef struct VkPhysicalDeviceSubpassShadingPropertiesHUAWEI {
uint32_t maxSubpassShadingWorkgroupSizeAspectRatio;
} VkPhysicalDeviceSubpassShadingPropertiesHUAWEI;
-typedef VkResult (VKAPI_PTR *PFN_vkGetSubpassShadingMaxWorkgroupSizeHUAWEI)(VkRenderPass renderpass, VkExtent2D* pMaxWorkgroupSize);
+typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI)(VkDevice device, VkRenderPass renderpass, VkExtent2D* pMaxWorkgroupSize);
typedef void (VKAPI_PTR *PFN_vkCmdSubpassShadingHUAWEI)(VkCommandBuffer commandBuffer);
#ifndef VK_NO_PROTOTYPES
-VKAPI_ATTR VkResult VKAPI_CALL vkGetSubpassShadingMaxWorkgroupSizeHUAWEI(
+VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(
+ VkDevice device,
VkRenderPass renderpass,
VkExtent2D* pMaxWorkgroupSize);
@@ -12405,6 +12547,52 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSubpassShadingHUAWEI(
#endif
+#define VK_HUAWEI_invocation_mask 1
+#define VK_HUAWEI_INVOCATION_MASK_SPEC_VERSION 1
+#define VK_HUAWEI_INVOCATION_MASK_EXTENSION_NAME "VK_HUAWEI_invocation_mask"
+typedef struct VkPhysicalDeviceInvocationMaskFeaturesHUAWEI {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 invocationMask;
+} VkPhysicalDeviceInvocationMaskFeaturesHUAWEI;
+
+typedef void (VKAPI_PTR *PFN_vkCmdBindInvocationMaskHUAWEI)(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR void VKAPI_CALL vkCmdBindInvocationMaskHUAWEI(
+ VkCommandBuffer commandBuffer,
+ VkImageView imageView,
+ VkImageLayout imageLayout);
+#endif
+
+
+#define VK_NV_external_memory_rdma 1
+typedef void* VkRemoteAddressNV;
+#define VK_NV_EXTERNAL_MEMORY_RDMA_SPEC_VERSION 1
+#define VK_NV_EXTERNAL_MEMORY_RDMA_EXTENSION_NAME "VK_NV_external_memory_rdma"
+typedef struct VkMemoryGetRemoteAddressInfoNV {
+ VkStructureType sType;
+ const void* pNext;
+ VkDeviceMemory memory;
+ VkExternalMemoryHandleTypeFlagBits handleType;
+} VkMemoryGetRemoteAddressInfoNV;
+
+typedef struct VkPhysicalDeviceExternalMemoryRDMAFeaturesNV {
+ VkStructureType sType;
+ void* pNext;
+ VkBool32 externalMemoryRDMA;
+} VkPhysicalDeviceExternalMemoryRDMAFeaturesNV;
+
+typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryRemoteAddressNV)(VkDevice device, const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, VkRemoteAddressNV* pAddress);
+
+#ifndef VK_NO_PROTOTYPES
+VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryRemoteAddressNV(
+ VkDevice device,
+ const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo,
+ VkRemoteAddressNV* pAddress);
+#endif
+
+
#define VK_EXT_extended_dynamic_state2 1
#define VK_EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION 1
#define VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME "VK_EXT_extended_dynamic_state2"
@@ -12539,9 +12727,14 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawMultiIndexedEXT(
#endif
+#define VK_EXT_load_store_op_none 1
+#define VK_EXT_LOAD_STORE_OP_NONE_SPEC_VERSION 1
+#define VK_EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME "VK_EXT_load_store_op_none"
+
+
#define VK_KHR_acceleration_structure 1
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureKHR)
-#define VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION 11
+#define VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION 12
#define VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME "VK_KHR_acceleration_structure"
typedef enum VkBuildAccelerationStructureModeKHR {
diff --git a/thirdparty/vulkan/include/vulkan/vulkan_enums.hpp b/thirdparty/vulkan/include/vulkan/vulkan_enums.hpp
index 5aed891303..ca535a1b9b 100644
--- a/thirdparty/vulkan/include/vulkan/vulkan_enums.hpp
+++ b/thirdparty/vulkan/include/vulkan/vulkan_enums.hpp
@@ -672,6 +672,7 @@ namespace VULKAN_HPP_NAMESPACE
eBufferDeviceAddressCreateInfoEXT = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT,
ePhysicalDeviceToolPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT,
eValidationFeaturesEXT = VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT,
+ ePhysicalDevicePresentWaitFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR,
ePhysicalDeviceCooperativeMatrixFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV,
eCooperativeMatrixPropertiesNV = VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV,
ePhysicalDeviceCooperativeMatrixPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV,
@@ -706,6 +707,7 @@ namespace VULKAN_HPP_NAMESPACE
ePipelineExecutableInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR,
ePipelineExecutableStatisticKHR = VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR,
ePipelineExecutableInternalRepresentationKHR = VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR,
+ ePhysicalDeviceShaderAtomicFloat2FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT,
ePhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT =
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT,
ePhysicalDeviceDeviceGeneratedCommandsPropertiesNV =
@@ -722,6 +724,10 @@ namespace VULKAN_HPP_NAMESPACE
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV,
eCommandBufferInheritanceViewportScissorInfoNV =
VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV,
+ ePhysicalDeviceShaderIntegerDotProductFeaturesKHR =
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR,
+ ePhysicalDeviceShaderIntegerDotProductPropertiesKHR =
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR,
ePhysicalDeviceTexelBufferAlignmentFeaturesEXT =
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT,
ePhysicalDeviceTexelBufferAlignmentPropertiesEXT =
@@ -739,6 +745,8 @@ namespace VULKAN_HPP_NAMESPACE
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT,
ePhysicalDeviceCustomBorderColorFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT,
ePipelineLibraryCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR,
+ ePresentIdKHR = VK_STRUCTURE_TYPE_PRESENT_ID_KHR,
+ ePhysicalDevicePresentIdFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR,
ePhysicalDevicePrivateDataFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT,
eDevicePrivateDataCreateInfoEXT = VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT,
ePrivateDataSlotCreateInfoEXT = VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT,
@@ -808,6 +816,8 @@ namespace VULKAN_HPP_NAMESPACE
eVertexInputBindingDescription2EXT = VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT,
eVertexInputAttributeDescription2EXT = VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT,
ePhysicalDeviceDrmPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT,
+ ePhysicalDevicePrimitiveTopologyListRestartFeaturesEXT =
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT,
#if defined( VK_USE_PLATFORM_FUCHSIA )
eImportMemoryZirconHandleInfoFUCHSIA = VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA,
eMemoryZirconHandlePropertiesFUCHSIA = VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA,
@@ -815,9 +825,12 @@ namespace VULKAN_HPP_NAMESPACE
eImportSemaphoreZirconHandleInfoFUCHSIA = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA,
eSemaphoreGetZirconHandleInfoFUCHSIA = VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA,
#endif /*VK_USE_PLATFORM_FUCHSIA*/
- eSubpasssShadingPipelineCreateInfoHUAWEI = VK_STRUCTURE_TYPE_SUBPASSS_SHADING_PIPELINE_CREATE_INFO_HUAWEI,
+ eSubpassShadingPipelineCreateInfoHUAWEI = VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI,
ePhysicalDeviceSubpassShadingFeaturesHUAWEI = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI,
ePhysicalDeviceSubpassShadingPropertiesHUAWEI = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI,
+ ePhysicalDeviceInvocationMaskFeaturesHUAWEI = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI,
+ eMemoryGetRemoteAddressInfoNV = VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV,
+ ePhysicalDeviceExternalMemoryRdmaFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV,
ePhysicalDeviceExtendedDynamicState2FeaturesEXT =
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT,
#if defined( VK_USE_PLATFORM_SCREEN_QNX )
@@ -1547,6 +1560,7 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::eBufferDeviceAddressCreateInfoEXT: return "BufferDeviceAddressCreateInfoEXT";
case StructureType::ePhysicalDeviceToolPropertiesEXT: return "PhysicalDeviceToolPropertiesEXT";
case StructureType::eValidationFeaturesEXT: return "ValidationFeaturesEXT";
+ case StructureType::ePhysicalDevicePresentWaitFeaturesKHR: return "PhysicalDevicePresentWaitFeaturesKHR";
case StructureType::ePhysicalDeviceCooperativeMatrixFeaturesNV:
return "PhysicalDeviceCooperativeMatrixFeaturesNV";
case StructureType::eCooperativeMatrixPropertiesNV: return "CooperativeMatrixPropertiesNV";
@@ -1592,6 +1606,8 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::ePipelineExecutableStatisticKHR: return "PipelineExecutableStatisticKHR";
case StructureType::ePipelineExecutableInternalRepresentationKHR:
return "PipelineExecutableInternalRepresentationKHR";
+ case StructureType::ePhysicalDeviceShaderAtomicFloat2FeaturesEXT:
+ return "PhysicalDeviceShaderAtomicFloat2FeaturesEXT";
case StructureType::ePhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT:
return "PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT";
case StructureType::ePhysicalDeviceDeviceGeneratedCommandsPropertiesNV:
@@ -1609,6 +1625,10 @@ namespace VULKAN_HPP_NAMESPACE
return "PhysicalDeviceInheritedViewportScissorFeaturesNV";
case StructureType::eCommandBufferInheritanceViewportScissorInfoNV:
return "CommandBufferInheritanceViewportScissorInfoNV";
+ case StructureType::ePhysicalDeviceShaderIntegerDotProductFeaturesKHR:
+ return "PhysicalDeviceShaderIntegerDotProductFeaturesKHR";
+ case StructureType::ePhysicalDeviceShaderIntegerDotProductPropertiesKHR:
+ return "PhysicalDeviceShaderIntegerDotProductPropertiesKHR";
case StructureType::ePhysicalDeviceTexelBufferAlignmentFeaturesEXT:
return "PhysicalDeviceTexelBufferAlignmentFeaturesEXT";
case StructureType::ePhysicalDeviceTexelBufferAlignmentPropertiesEXT:
@@ -1628,6 +1648,8 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::ePhysicalDeviceCustomBorderColorFeaturesEXT:
return "PhysicalDeviceCustomBorderColorFeaturesEXT";
case StructureType::ePipelineLibraryCreateInfoKHR: return "PipelineLibraryCreateInfoKHR";
+ case StructureType::ePresentIdKHR: return "PresentIdKHR";
+ case StructureType::ePhysicalDevicePresentIdFeaturesKHR: return "PhysicalDevicePresentIdFeaturesKHR";
case StructureType::ePhysicalDevicePrivateDataFeaturesEXT: return "PhysicalDevicePrivateDataFeaturesEXT";
case StructureType::eDevicePrivateDataCreateInfoEXT: return "DevicePrivateDataCreateInfoEXT";
case StructureType::ePrivateDataSlotCreateInfoEXT: return "PrivateDataSlotCreateInfoEXT";
@@ -1699,6 +1721,8 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::eVertexInputBindingDescription2EXT: return "VertexInputBindingDescription2EXT";
case StructureType::eVertexInputAttributeDescription2EXT: return "VertexInputAttributeDescription2EXT";
case StructureType::ePhysicalDeviceDrmPropertiesEXT: return "PhysicalDeviceDrmPropertiesEXT";
+ case StructureType::ePhysicalDevicePrimitiveTopologyListRestartFeaturesEXT:
+ return "PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT";
#if defined( VK_USE_PLATFORM_FUCHSIA )
case StructureType::eImportMemoryZirconHandleInfoFUCHSIA: return "ImportMemoryZirconHandleInfoFUCHSIA";
case StructureType::eMemoryZirconHandlePropertiesFUCHSIA: return "MemoryZirconHandlePropertiesFUCHSIA";
@@ -1706,11 +1730,16 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::eImportSemaphoreZirconHandleInfoFUCHSIA: return "ImportSemaphoreZirconHandleInfoFUCHSIA";
case StructureType::eSemaphoreGetZirconHandleInfoFUCHSIA: return "SemaphoreGetZirconHandleInfoFUCHSIA";
#endif /*VK_USE_PLATFORM_FUCHSIA*/
- case StructureType::eSubpasssShadingPipelineCreateInfoHUAWEI: return "SubpasssShadingPipelineCreateInfoHUAWEI";
+ case StructureType::eSubpassShadingPipelineCreateInfoHUAWEI: return "SubpassShadingPipelineCreateInfoHUAWEI";
case StructureType::ePhysicalDeviceSubpassShadingFeaturesHUAWEI:
return "PhysicalDeviceSubpassShadingFeaturesHUAWEI";
case StructureType::ePhysicalDeviceSubpassShadingPropertiesHUAWEI:
return "PhysicalDeviceSubpassShadingPropertiesHUAWEI";
+ case StructureType::ePhysicalDeviceInvocationMaskFeaturesHUAWEI:
+ return "PhysicalDeviceInvocationMaskFeaturesHUAWEI";
+ case StructureType::eMemoryGetRemoteAddressInfoNV: return "MemoryGetRemoteAddressInfoNV";
+ case StructureType::ePhysicalDeviceExternalMemoryRdmaFeaturesNV:
+ return "PhysicalDeviceExternalMemoryRdmaFeaturesNV";
case StructureType::ePhysicalDeviceExtendedDynamicState2FeaturesEXT:
return "PhysicalDeviceExtendedDynamicState2FeaturesEXT";
#if defined( VK_USE_PLATFORM_SCREEN_QNX )
@@ -2624,7 +2653,8 @@ namespace VULKAN_HPP_NAMESPACE
eVideoEncodeSrcKHR = VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR,
eVideoEncodeDpbKHR = VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR,
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- eShadingRateImageNV = VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
+ eInvocationMaskHUAWEI = VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI,
+ eShadingRateImageNV = VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
};
VULKAN_HPP_INLINE std::string to_string( ImageUsageFlagBits value )
@@ -2651,6 +2681,7 @@ namespace VULKAN_HPP_NAMESPACE
case ImageUsageFlagBits::eVideoEncodeSrcKHR: return "VideoEncodeSrcKHR";
case ImageUsageFlagBits::eVideoEncodeDpbKHR: return "VideoEncodeDpbKHR";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+ case ImageUsageFlagBits::eInvocationMaskHUAWEI: return "InvocationMaskHUAWEI";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
@@ -2695,7 +2726,8 @@ namespace VULKAN_HPP_NAMESPACE
eLazilyAllocated = VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT,
eProtected = VK_MEMORY_PROPERTY_PROTECTED_BIT,
eDeviceCoherentAMD = VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD,
- eDeviceUncachedAMD = VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD
+ eDeviceUncachedAMD = VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD,
+ eRdmaCapableNV = VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV
};
VULKAN_HPP_INLINE std::string to_string( MemoryPropertyFlagBits value )
@@ -2710,6 +2742,7 @@ namespace VULKAN_HPP_NAMESPACE
case MemoryPropertyFlagBits::eProtected: return "Protected";
case MemoryPropertyFlagBits::eDeviceCoherentAMD: return "DeviceCoherentAMD";
case MemoryPropertyFlagBits::eDeviceUncachedAMD: return "DeviceUncachedAMD";
+ case MemoryPropertyFlagBits::eRdmaCapableNV: return "RdmaCapableNV";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
@@ -2814,18 +2847,22 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- enum class DeviceQueueCreateFlagBits : VkDeviceQueueCreateFlags
+ enum class InstanceCreateFlagBits
{
- eProtected = VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT
};
- VULKAN_HPP_INLINE std::string to_string( DeviceQueueCreateFlagBits value )
+ VULKAN_HPP_INLINE std::string to_string( InstanceCreateFlagBits )
{
- switch ( value )
- {
- case DeviceQueueCreateFlagBits::eProtected: return "Protected";
- default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
- }
+ return "(void)";
+ }
+
+ enum class DeviceCreateFlagBits
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( DeviceCreateFlagBits )
+ {
+ return "(void)";
}
enum class PipelineStageFlagBits : VkPipelineStageFlags
@@ -2897,6 +2934,15 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class MemoryMapFlagBits : VkMemoryMapFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( MemoryMapFlagBits )
+ {
+ return "(void)";
+ }
+
enum class ImageAspectFlagBits : VkImageAspectFlags
{
eColor = VK_IMAGE_ASPECT_COLOR_BIT,
@@ -2980,6 +3026,15 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class SemaphoreCreateFlagBits : VkSemaphoreCreateFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( SemaphoreCreateFlagBits )
+ {
+ return "(void)";
+ }
+
enum class EventCreateFlagBits : VkEventCreateFlags
{
eDeviceOnlyKHR = VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR
@@ -3098,6 +3153,15 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class QueryPoolCreateFlagBits
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( QueryPoolCreateFlagBits )
+ {
+ return "(void)";
+ }
+
enum class BufferCreateFlagBits : VkBufferCreateFlags
{
eSparseBinding = VK_BUFFER_CREATE_SPARSE_BINDING_BIT,
@@ -3202,6 +3266,15 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class BufferViewCreateFlagBits : VkBufferViewCreateFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( BufferViewCreateFlagBits )
+ {
+ return "(void)";
+ }
+
enum class ImageLayout
{
eUndefined = VK_IMAGE_LAYOUT_UNDEFINED,
@@ -3360,20 +3433,6 @@ namespace VULKAN_HPP_NAMESPACE
return "(void)";
}
- enum class PipelineCacheCreateFlagBits : VkPipelineCacheCreateFlags
- {
- eExternallySynchronizedEXT = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT
- };
-
- VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlagBits value )
- {
- switch ( value )
- {
- case PipelineCacheCreateFlagBits::eExternallySynchronizedEXT: return "ExternallySynchronizedEXT";
- default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
- }
- }
-
enum class BlendFactor
{
eZero = VK_BLEND_FACTOR_ZERO,
@@ -3975,6 +4034,96 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class PipelineColorBlendStateCreateFlagBits : VkPipelineColorBlendStateCreateFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineColorBlendStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineDepthStencilStateCreateFlagBits : VkPipelineDepthStencilStateCreateFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineDepthStencilStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineDynamicStateCreateFlagBits : VkPipelineDynamicStateCreateFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineDynamicStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineInputAssemblyStateCreateFlagBits : VkPipelineInputAssemblyStateCreateFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineInputAssemblyStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineLayoutCreateFlagBits : VkPipelineLayoutCreateFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineLayoutCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineMultisampleStateCreateFlagBits : VkPipelineMultisampleStateCreateFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineMultisampleStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineRasterizationStateCreateFlagBits : VkPipelineRasterizationStateCreateFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineTessellationStateCreateFlagBits : VkPipelineTessellationStateCreateFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineTessellationStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineVertexInputStateCreateFlagBits : VkPipelineVertexInputStateCreateFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineVertexInputStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
+ enum class PipelineViewportStateCreateFlagBits : VkPipelineViewportStateCreateFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineViewportStateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
enum class BorderColor
{
eFloatTransparentBlack = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK,
@@ -4157,6 +4306,15 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class DescriptorPoolResetFlagBits : VkDescriptorPoolResetFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( DescriptorPoolResetFlagBits )
+ {
+ return "(void)";
+ }
+
enum class AccessFlagBits : VkAccessFlags
{
eIndirectCommandRead = VK_ACCESS_INDIRECT_COMMAND_READ_BIT,
@@ -4248,7 +4406,8 @@ namespace VULKAN_HPP_NAMESPACE
{
eLoad = VK_ATTACHMENT_LOAD_OP_LOAD,
eClear = VK_ATTACHMENT_LOAD_OP_CLEAR,
- eDontCare = VK_ATTACHMENT_LOAD_OP_DONT_CARE
+ eDontCare = VK_ATTACHMENT_LOAD_OP_DONT_CARE,
+ eNoneEXT = VK_ATTACHMENT_LOAD_OP_NONE_EXT
};
VULKAN_HPP_INLINE std::string to_string( AttachmentLoadOp value )
@@ -4258,6 +4417,7 @@ namespace VULKAN_HPP_NAMESPACE
case AttachmentLoadOp::eLoad: return "Load";
case AttachmentLoadOp::eClear: return "Clear";
case AttachmentLoadOp::eDontCare: return "DontCare";
+ case AttachmentLoadOp::eNoneEXT: return "NoneEXT";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
@@ -4266,6 +4426,7 @@ namespace VULKAN_HPP_NAMESPACE
{
eStore = VK_ATTACHMENT_STORE_OP_STORE,
eDontCare = VK_ATTACHMENT_STORE_OP_DONT_CARE,
+ eNoneEXT = VK_ATTACHMENT_STORE_OP_NONE_EXT,
eNoneQCOM = VK_ATTACHMENT_STORE_OP_NONE_QCOM
};
@@ -4275,7 +4436,7 @@ namespace VULKAN_HPP_NAMESPACE
{
case AttachmentStoreOp::eStore: return "Store";
case AttachmentStoreOp::eDontCare: return "DontCare";
- case AttachmentStoreOp::eNoneQCOM: return "NoneQCOM";
+ case AttachmentStoreOp::eNoneEXT: return "NoneEXT";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
@@ -4520,159 +4681,6 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- enum class InstanceCreateFlagBits
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( InstanceCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class DeviceCreateFlagBits
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( DeviceCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class MemoryMapFlagBits : VkMemoryMapFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( MemoryMapFlagBits )
- {
- return "(void)";
- }
-
- enum class SemaphoreCreateFlagBits : VkSemaphoreCreateFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( SemaphoreCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class QueryPoolCreateFlagBits
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( QueryPoolCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class BufferViewCreateFlagBits : VkBufferViewCreateFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( BufferViewCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class PipelineColorBlendStateCreateFlagBits : VkPipelineColorBlendStateCreateFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( PipelineColorBlendStateCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class PipelineDepthStencilStateCreateFlagBits : VkPipelineDepthStencilStateCreateFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( PipelineDepthStencilStateCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class PipelineDynamicStateCreateFlagBits : VkPipelineDynamicStateCreateFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( PipelineDynamicStateCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class PipelineInputAssemblyStateCreateFlagBits : VkPipelineInputAssemblyStateCreateFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( PipelineInputAssemblyStateCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class PipelineLayoutCreateFlagBits : VkPipelineLayoutCreateFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( PipelineLayoutCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class PipelineMultisampleStateCreateFlagBits : VkPipelineMultisampleStateCreateFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( PipelineMultisampleStateCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class PipelineRasterizationStateCreateFlagBits : VkPipelineRasterizationStateCreateFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationStateCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class PipelineTessellationStateCreateFlagBits : VkPipelineTessellationStateCreateFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( PipelineTessellationStateCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class PipelineVertexInputStateCreateFlagBits : VkPipelineVertexInputStateCreateFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( PipelineVertexInputStateCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class PipelineViewportStateCreateFlagBits : VkPipelineViewportStateCreateFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( PipelineViewportStateCreateFlagBits )
- {
- return "(void)";
- }
-
- enum class DescriptorPoolResetFlagBits : VkDescriptorPoolResetFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( DescriptorPoolResetFlagBits )
- {
- return "(void)";
- }
-
//=== VK_VERSION_1_1 ===
enum class SubgroupFeatureFlagBits : VkSubgroupFeatureFlags
@@ -4745,6 +4753,15 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class CommandPoolTrimFlagBits : VkCommandPoolTrimFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( CommandPoolTrimFlagBits )
+ {
+ return "(void)";
+ }
+
enum class PointClippingBehavior
{
eAllClipPlanes = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES,
@@ -4779,6 +4796,20 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class DeviceQueueCreateFlagBits : VkDeviceQueueCreateFlags
+ {
+ eProtected = VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( DeviceQueueCreateFlagBits value )
+ {
+ switch ( value )
+ {
+ case DeviceQueueCreateFlagBits::eProtected: return "Protected";
+ default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
+ }
+ }
+
enum class SamplerYcbcrModelConversion
{
eRgbIdentity = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY,
@@ -4853,6 +4884,15 @@ namespace VULKAN_HPP_NAMESPACE
}
}
+ enum class DescriptorUpdateTemplateCreateFlagBits : VkDescriptorUpdateTemplateCreateFlags
+ {
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( DescriptorUpdateTemplateCreateFlagBits )
+ {
+ return "(void)";
+ }
+
enum class ExternalMemoryHandleTypeFlagBits : VkExternalMemoryHandleTypeFlags
{
eOpaqueFd = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT,
@@ -4869,8 +4909,9 @@ namespace VULKAN_HPP_NAMESPACE
eHostAllocationEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT,
eHostMappedForeignMemoryEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT,
#if defined( VK_USE_PLATFORM_FUCHSIA )
- eZirconVmoFUCHSIA = VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA
+ eZirconVmoFUCHSIA = VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA,
#endif /*VK_USE_PLATFORM_FUCHSIA*/
+ eRdmaAddressNV = VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV
};
using ExternalMemoryHandleTypeFlagBitsKHR = ExternalMemoryHandleTypeFlagBits;
@@ -4894,6 +4935,7 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_USE_PLATFORM_FUCHSIA )
case ExternalMemoryHandleTypeFlagBits::eZirconVmoFUCHSIA: return "ZirconVmoFUCHSIA";
#endif /*VK_USE_PLATFORM_FUCHSIA*/
+ case ExternalMemoryHandleTypeFlagBits::eRdmaAddressNV: return "RdmaAddressNV";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
@@ -5032,24 +5074,6 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- enum class CommandPoolTrimFlagBits : VkCommandPoolTrimFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( CommandPoolTrimFlagBits )
- {
- return "(void)";
- }
-
- enum class DescriptorUpdateTemplateCreateFlagBits : VkDescriptorUpdateTemplateCreateFlags
- {
- };
-
- VULKAN_HPP_INLINE std::string to_string( DescriptorUpdateTemplateCreateFlagBits )
- {
- return "(void)";
- }
-
//=== VK_VERSION_1_2 ===
enum class DriverId
@@ -5069,7 +5093,8 @@ namespace VULKAN_HPP_NAMESPACE
eMesaLlvmpipe = VK_DRIVER_ID_MESA_LLVMPIPE,
eMoltenvk = VK_DRIVER_ID_MOLTENVK,
eCoreaviProprietary = VK_DRIVER_ID_COREAVI_PROPRIETARY,
- eJuiceProprietary = VK_DRIVER_ID_JUICE_PROPRIETARY
+ eJuiceProprietary = VK_DRIVER_ID_JUICE_PROPRIETARY,
+ eVerisiliconProprietary = VK_DRIVER_ID_VERISILICON_PROPRIETARY
};
using DriverIdKHR = DriverId;
@@ -5093,6 +5118,7 @@ namespace VULKAN_HPP_NAMESPACE
case DriverId::eMoltenvk: return "Moltenvk";
case DriverId::eCoreaviProprietary: return "CoreaviProprietary";
case DriverId::eJuiceProprietary: return "JuiceProprietary";
+ case DriverId::eVerisiliconProprietary: return "VerisiliconProprietary";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
@@ -5681,18 +5707,18 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- enum class VideoCapabilitiesFlagBitsKHR : VkVideoCapabilitiesFlagsKHR
+ enum class VideoCapabilityFlagBitsKHR : VkVideoCapabilityFlagsKHR
{
- eProtectedContent = VK_VIDEO_CAPABILITIES_PROTECTED_CONTENT_BIT_KHR,
- eSeparateReferenceImages = VK_VIDEO_CAPABILITIES_SEPARATE_REFERENCE_IMAGES_BIT_KHR
+ eProtectedContent = VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR,
+ eSeparateReferenceImages = VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR
};
- VULKAN_HPP_INLINE std::string to_string( VideoCapabilitiesFlagBitsKHR value )
+ VULKAN_HPP_INLINE std::string to_string( VideoCapabilityFlagBitsKHR value )
{
switch ( value )
{
- case VideoCapabilitiesFlagBitsKHR::eProtectedContent: return "ProtectedContent";
- case VideoCapabilitiesFlagBitsKHR::eSeparateReferenceImages: return "SeparateReferenceImages";
+ case VideoCapabilityFlagBitsKHR::eProtectedContent: return "ProtectedContent";
+ case VideoCapabilityFlagBitsKHR::eSeparateReferenceImages: return "SeparateReferenceImages";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
@@ -5820,53 +5846,36 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS )
//=== VK_EXT_video_encode_h264 ===
- enum class VideoEncodeH264CapabilitiesFlagBitsEXT : VkVideoEncodeH264CapabilitiesFlagsEXT
- {
- eVkVideoEncodeH264CapabilityCabac = VK_VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT,
- eVkVideoEncodeH264CapabilityCavlc = VK_VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT,
- eVkVideoEncodeH264CapabilityWeightedBiPredImplicit =
- VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BI_PRED_IMPLICIT_BIT_EXT,
- eVkVideoEncodeH264CapabilityTransform8X8 = VK_VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT,
- eVkVideoEncodeH264CapabilityChromaQpOffset = VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT,
- eVkVideoEncodeH264CapabilitySecondChromaQpOffset = VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT,
- eVkVideoEncodeH264CapabilityDeblockingFilterDisabled =
- VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT,
- eVkVideoEncodeH264CapabilityDeblockingFilterEnabled =
- VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT,
- eVkVideoEncodeH264CapabilityDeblockingFilterPartial =
- VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT,
- eVkVideoEncodeH264CapabilityMultipleSlicePerFrame =
- VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT,
- eVkVideoEncodeH264CapabilityEvenlyDistributedSliceSize =
- VK_VIDEO_ENCODE_H264_CAPABILITY_EVENLY_DISTRIBUTED_SLICE_SIZE_BIT_EXT
- };
-
- VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264CapabilitiesFlagBitsEXT value )
- {
- switch ( value )
- {
- case VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityCabac:
- return "VkVideoEncodeH264CapabilityCabac";
- case VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityCavlc:
- return "VkVideoEncodeH264CapabilityCavlc";
- case VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityWeightedBiPredImplicit:
- return "VkVideoEncodeH264CapabilityWeightedBiPredImplicit";
- case VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityTransform8X8:
- return "VkVideoEncodeH264CapabilityTransform8X8";
- case VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityChromaQpOffset:
- return "VkVideoEncodeH264CapabilityChromaQpOffset";
- case VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilitySecondChromaQpOffset:
- return "VkVideoEncodeH264CapabilitySecondChromaQpOffset";
- case VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityDeblockingFilterDisabled:
- return "VkVideoEncodeH264CapabilityDeblockingFilterDisabled";
- case VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityDeblockingFilterEnabled:
- return "VkVideoEncodeH264CapabilityDeblockingFilterEnabled";
- case VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityDeblockingFilterPartial:
- return "VkVideoEncodeH264CapabilityDeblockingFilterPartial";
- case VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityMultipleSlicePerFrame:
- return "VkVideoEncodeH264CapabilityMultipleSlicePerFrame";
- case VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityEvenlyDistributedSliceSize:
- return "VkVideoEncodeH264CapabilityEvenlyDistributedSliceSize";
+ enum class VideoEncodeH264CapabilityFlagBitsEXT : VkVideoEncodeH264CapabilityFlagsEXT
+ {
+ eCabac = VK_VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT,
+ eCavlc = VK_VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT,
+ eWeightedBiPredImplicit = VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BI_PRED_IMPLICIT_BIT_EXT,
+ eTransform8X8 = VK_VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT,
+ eChromaQpOffset = VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT,
+ eSecondChromaQpOffset = VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT,
+ eDeblockingFilterDisabled = VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT,
+ eDeblockingFilterEnabled = VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT,
+ eDeblockingFilterPartial = VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT,
+ eMultipleSlicePerFrame = VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT,
+ eEvenlyDistributedSliceSize = VK_VIDEO_ENCODE_H264_CAPABILITY_EVENLY_DISTRIBUTED_SLICE_SIZE_BIT_EXT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264CapabilityFlagBitsEXT value )
+ {
+ switch ( value )
+ {
+ case VideoEncodeH264CapabilityFlagBitsEXT::eCabac: return "Cabac";
+ case VideoEncodeH264CapabilityFlagBitsEXT::eCavlc: return "Cavlc";
+ case VideoEncodeH264CapabilityFlagBitsEXT::eWeightedBiPredImplicit: return "WeightedBiPredImplicit";
+ case VideoEncodeH264CapabilityFlagBitsEXT::eTransform8X8: return "Transform8X8";
+ case VideoEncodeH264CapabilityFlagBitsEXT::eChromaQpOffset: return "ChromaQpOffset";
+ case VideoEncodeH264CapabilityFlagBitsEXT::eSecondChromaQpOffset: return "SecondChromaQpOffset";
+ case VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterDisabled: return "DeblockingFilterDisabled";
+ case VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterEnabled: return "DeblockingFilterEnabled";
+ case VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterPartial: return "DeblockingFilterPartial";
+ case VideoEncodeH264CapabilityFlagBitsEXT::eMultipleSlicePerFrame: return "MultipleSlicePerFrame";
+ case VideoEncodeH264CapabilityFlagBitsEXT::eEvenlyDistributedSliceSize: return "EvenlyDistributedSliceSize";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
@@ -5927,21 +5936,20 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS )
//=== VK_EXT_video_decode_h264 ===
- enum class VideoDecodeH264FieldLayoutFlagBitsEXT : VkVideoDecodeH264FieldLayoutFlagsEXT
+ enum class VideoDecodeH264PictureLayoutFlagBitsEXT : VkVideoDecodeH264PictureLayoutFlagsEXT
{
- eVkVideoDecodeH264ProgressivePicturesOnly = VK_VIDEO_DECODE_H264_PROGRESSIVE_PICTURES_ONLY_EXT,
- eLineInterlacedPlane = VK_VIDEO_DECODE_H264_FIELD_LAYOUT_LINE_INTERLACED_PLANE_BIT_EXT,
- eSeparateInterlacedPlane = VK_VIDEO_DECODE_H264_FIELD_LAYOUT_SEPARATE_INTERLACED_PLANE_BIT_EXT
+ eProgressive = VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_EXT,
+ eInterlacedInterleavedLines = VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_EXT,
+ eInterlacedSeparatePlanes = VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_EXT
};
- VULKAN_HPP_INLINE std::string to_string( VideoDecodeH264FieldLayoutFlagBitsEXT value )
+ VULKAN_HPP_INLINE std::string to_string( VideoDecodeH264PictureLayoutFlagBitsEXT value )
{
switch ( value )
{
- case VideoDecodeH264FieldLayoutFlagBitsEXT::eVkVideoDecodeH264ProgressivePicturesOnly:
- return "VkVideoDecodeH264ProgressivePicturesOnly";
- case VideoDecodeH264FieldLayoutFlagBitsEXT::eLineInterlacedPlane: return "LineInterlacedPlane";
- case VideoDecodeH264FieldLayoutFlagBitsEXT::eSeparateInterlacedPlane: return "SeparateInterlacedPlane";
+ case VideoDecodeH264PictureLayoutFlagBitsEXT::eProgressive: return "Progressive";
+ case VideoDecodeH264PictureLayoutFlagBitsEXT::eInterlacedInterleavedLines: return "InterlacedInterleavedLines";
+ case VideoDecodeH264PictureLayoutFlagBitsEXT::eInterlacedSeparatePlanes: return "InterlacedSeparatePlanes";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
@@ -6526,11 +6534,13 @@ namespace VULKAN_HPP_NAMESPACE
enum class GeometryInstanceFlagBitsKHR : VkGeometryInstanceFlagsKHR
{
- eTriangleFacingCullDisable = VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR,
- eTriangleFrontCounterclockwise = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR,
- eForceOpaque = VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR,
- eForceNoOpaque = VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR,
- eTriangleCullDisable = VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV
+ eTriangleFacingCullDisable = VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR,
+ eTriangleFlipFacing = VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR,
+ eForceOpaque = VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR,
+ eForceNoOpaque = VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR,
+ eTriangleCullDisable = VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV,
+ eTriangleFrontCounterclockwiseKHR = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR,
+ eTriangleFrontCounterclockwise = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV
};
using GeometryInstanceFlagBitsNV = GeometryInstanceFlagBitsKHR;
@@ -6539,7 +6549,7 @@ namespace VULKAN_HPP_NAMESPACE
switch ( value )
{
case GeometryInstanceFlagBitsKHR::eTriangleFacingCullDisable: return "TriangleFacingCullDisable";
- case GeometryInstanceFlagBitsKHR::eTriangleFrontCounterclockwise: return "TriangleFrontCounterclockwise";
+ case GeometryInstanceFlagBitsKHR::eTriangleFlipFacing: return "TriangleFlipFacing";
case GeometryInstanceFlagBitsKHR::eForceOpaque: return "ForceOpaque";
case GeometryInstanceFlagBitsKHR::eForceNoOpaque: return "ForceNoOpaque";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
@@ -7414,6 +7424,22 @@ namespace VULKAN_HPP_NAMESPACE
return "(void)";
}
+ //=== VK_EXT_pipeline_creation_cache_control ===
+
+ enum class PipelineCacheCreateFlagBits : VkPipelineCacheCreateFlags
+ {
+ eExternallySynchronizedEXT = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT
+ };
+
+ VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlagBits value )
+ {
+ switch ( value )
+ {
+ case PipelineCacheCreateFlagBits::eExternallySynchronizedEXT: return "ExternallySynchronizedEXT";
+ default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
+ }
+ }
+
#if defined( VK_ENABLE_BETA_EXTENSIONS )
//=== VK_KHR_video_encode_queue ===
@@ -7531,6 +7557,7 @@ namespace VULKAN_HPP_NAMESPACE
eTaskShaderNV = VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV,
eMeshShaderNV = VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV,
eSubpassShadingHUAWEI = VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI,
+ eInvocationMaskHUAWEI = VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI,
eAccelerationStructureBuildNV = VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV,
eRayTracingShaderNV = VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV,
eShadingRateImageNV = VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV,
@@ -7580,6 +7607,7 @@ namespace VULKAN_HPP_NAMESPACE
case PipelineStageFlagBits2KHR::eTaskShaderNV: return "TaskShaderNV";
case PipelineStageFlagBits2KHR::eMeshShaderNV: return "MeshShaderNV";
case PipelineStageFlagBits2KHR::eSubpassShadingHUAWEI: return "SubpassShadingHUAWEI";
+ case PipelineStageFlagBits2KHR::eInvocationMaskHUAWEI: return "InvocationMaskHUAWEI";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
@@ -7624,6 +7652,7 @@ namespace VULKAN_HPP_NAMESPACE
eAccelerationStructureWrite = VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR,
eFragmentDensityMapReadEXT = VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT,
eColorAttachmentReadNoncoherentEXT = VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT,
+ eInvocationMaskReadHUAWEI = VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI,
eAccelerationStructureReadNV = VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV,
eAccelerationStructureWriteNV = VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV,
eShadingRateImageReadNV = VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV
@@ -7671,6 +7700,7 @@ namespace VULKAN_HPP_NAMESPACE
case AccessFlagBits2KHR::eAccelerationStructureWrite: return "AccelerationStructureWrite";
case AccessFlagBits2KHR::eFragmentDensityMapReadEXT: return "FragmentDensityMapReadEXT";
case AccessFlagBits2KHR::eColorAttachmentReadNoncoherentEXT: return "ColorAttachmentReadNoncoherentEXT";
+ case AccessFlagBits2KHR::eInvocationMaskReadHUAWEI: return "InvocationMaskReadHUAWEI";
default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast<uint32_t>( value ) ) + " )";
}
}
@@ -8014,8 +8044,6 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & FormatFeatureFlagBits::eVideoDecodeOutputKHR )
result += "VideoDecodeOutputKHR | ";
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & FormatFeatureFlagBits::eVideoDecodeDpbKHR )
result += "VideoDecodeDpbKHR | ";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
@@ -8028,11 +8056,10 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & FormatFeatureFlagBits::eVideoEncodeInputKHR )
result += "VideoEncodeInputKHR | ";
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & FormatFeatureFlagBits::eVideoEncodeDpbKHR )
result += "VideoEncodeDpbKHR | ";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8115,6 +8142,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "SampleLocationsCompatibleDepthEXT | ";
if ( value & ImageCreateFlagBits::eSubsampledEXT )
result += "SubsampledEXT | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8140,6 +8168,7 @@ namespace VULKAN_HPP_NAMESPACE
| VkFlags( ImageUsageFlagBits::eVideoEncodeDstKHR ) |
VkFlags( ImageUsageFlagBits::eVideoEncodeSrcKHR ) | VkFlags( ImageUsageFlagBits::eVideoEncodeDpbKHR )
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+ | VkFlags( ImageUsageFlagBits::eInvocationMaskHUAWEI )
};
};
@@ -8191,12 +8220,8 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & ImageUsageFlagBits::eVideoDecodeDstKHR )
result += "VideoDecodeDstKHR | ";
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & ImageUsageFlagBits::eVideoDecodeSrcKHR )
result += "VideoDecodeSrcKHR | ";
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & ImageUsageFlagBits::eVideoDecodeDpbKHR )
result += "VideoDecodeDpbKHR | ";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
@@ -8207,15 +8232,14 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & ImageUsageFlagBits::eVideoEncodeDstKHR )
result += "VideoEncodeDstKHR | ";
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & ImageUsageFlagBits::eVideoEncodeSrcKHR )
result += "VideoEncodeSrcKHR | ";
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & ImageUsageFlagBits::eVideoEncodeDpbKHR )
result += "VideoEncodeDpbKHR | ";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+ if ( value & ImageUsageFlagBits::eInvocationMaskHUAWEI )
+ result += "InvocationMaskHUAWEI | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8270,6 +8294,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "DeviceLocal | ";
if ( value & MemoryHeapFlagBits::eMultiInstance )
result += "MultiInstance | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8284,7 +8309,8 @@ namespace VULKAN_HPP_NAMESPACE
VkFlags( MemoryPropertyFlagBits::eHostCoherent ) | VkFlags( MemoryPropertyFlagBits::eHostCached ) |
VkFlags( MemoryPropertyFlagBits::eLazilyAllocated ) | VkFlags( MemoryPropertyFlagBits::eProtected ) |
VkFlags( MemoryPropertyFlagBits::eDeviceCoherentAMD ) |
- VkFlags( MemoryPropertyFlagBits::eDeviceUncachedAMD )
+ VkFlags( MemoryPropertyFlagBits::eDeviceUncachedAMD ) |
+ VkFlags( MemoryPropertyFlagBits::eRdmaCapableNV )
};
};
@@ -8334,6 +8360,9 @@ namespace VULKAN_HPP_NAMESPACE
result += "DeviceCoherentAMD | ";
if ( value & MemoryPropertyFlagBits::eDeviceUncachedAMD )
result += "DeviceUncachedAMD | ";
+ if ( value & MemoryPropertyFlagBits::eRdmaCapableNV )
+ result += "RdmaCapableNV | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8394,11 +8423,10 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & QueueFlagBits::eVideoDecodeKHR )
result += "VideoDecodeKHR | ";
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & QueueFlagBits::eVideoEncodeKHR )
result += "VideoEncodeKHR | ";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8459,6 +8487,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "32 | ";
if ( value & SampleCountFlagBits::e64 )
result += "64 | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8512,6 +8541,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & DeviceQueueCreateFlagBits::eProtected )
result += "Protected | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8623,6 +8653,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "FragmentShadingRateAttachmentKHR | ";
if ( value & PipelineStageFlagBits::eCommandPreprocessNV )
result += "CommandPreprocessNV | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8700,6 +8731,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "MemoryPlane2EXT | ";
if ( value & ImageAspectFlagBits::eMemoryPlane3EXT )
result += "MemoryPlane3EXT | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8752,6 +8784,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "AlignedMipSize | ";
if ( value & SparseImageFormatFlagBits::eNonstandardBlockSize )
result += "NonstandardBlockSize | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8798,6 +8831,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & SparseMemoryBindFlagBits::eMetadata )
result += "Metadata | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8843,6 +8877,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & FenceCreateFlagBits::eSignaled )
result += "Signaled | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8895,6 +8930,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & EventCreateFlagBits::eDeviceOnlyKHR )
result += "DeviceOnlyKHR | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -8971,6 +9007,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "TessellationEvaluationShaderInvocations | ";
if ( value & QueryPipelineStatisticFlagBits::eComputeShaderInvocations )
result += "ComputeShaderInvocations | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9037,6 +9074,7 @@ namespace VULKAN_HPP_NAMESPACE
if ( value & QueryResultFlagBits::eWithStatusKHR )
result += "WithStatusKHR | ";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9092,6 +9130,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Protected | ";
if ( value & BufferCreateFlagBits::eDeviceAddressCaptureReplay )
result += "DeviceAddressCaptureReplay | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9175,8 +9214,6 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & BufferUsageFlagBits::eVideoDecodeSrcKHR )
result += "VideoDecodeSrcKHR | ";
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & BufferUsageFlagBits::eVideoDecodeDstKHR )
result += "VideoDecodeDstKHR | ";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
@@ -9195,11 +9232,10 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & BufferUsageFlagBits::eVideoEncodeDstKHR )
result += "VideoEncodeDstKHR | ";
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & BufferUsageFlagBits::eVideoEncodeSrcKHR )
result += "VideoEncodeSrcKHR | ";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9256,6 +9292,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "FragmentDensityMapDynamicEXT | ";
if ( value & ImageViewCreateFlagBits::eFragmentDensityMapDeferredEXT )
result += "FragmentDensityMapDeferredEXT | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9309,6 +9346,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & PipelineCacheCreateFlagBits::eExternallySynchronizedEXT )
result += "ExternallySynchronizedEXT | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9362,6 +9400,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "B | ";
if ( value & ColorComponentFlagBits::eA )
result += "A | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9410,6 +9449,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Front | ";
if ( value & CullModeFlagBits::eBack )
result += "Back | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9517,6 +9557,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "EarlyReturnOnFailureEXT | ";
if ( value & PipelineCreateFlagBits::eRayTracingAllowMotionNV )
result += "RayTracingAllowMotionNV | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9608,6 +9649,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "AllowVaryingSubgroupSizeEXT | ";
if ( value & PipelineShaderStageCreateFlagBits::eRequireFullSubgroupsEXT )
result += "RequireFullSubgroupsEXT | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9710,6 +9752,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "MeshNV | ";
if ( value & ShaderStageFlagBits::eSubpassShadingHUAWEI )
result += "SubpassShadingHUAWEI | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9758,6 +9801,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "SubsampledEXT | ";
if ( value & SamplerCreateFlagBits::eSubsampledCoarseReconstructionEXT )
result += "SubsampledCoarseReconstructionEXT | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9810,6 +9854,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "UpdateAfterBind | ";
if ( value & DescriptorPoolCreateFlagBits::eHostOnlyVALVE )
result += "HostOnlyVALVE | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9869,6 +9914,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "PushDescriptorKHR | ";
if ( value & DescriptorSetLayoutCreateFlagBits::eHostOnlyPoolVALVE )
result += "HostOnlyPoolVALVE | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -9987,6 +10033,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "CommandPreprocessReadNV | ";
if ( value & AccessFlagBits::eCommandPreprocessWriteNV )
result += "CommandPreprocessWriteNV | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10033,6 +10080,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & AttachmentDescriptionFlagBits::eMayAlias )
result += "MayAlias | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10083,6 +10131,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "DeviceGroup | ";
if ( value & DependencyFlagBits::eViewLocal )
result += "ViewLocal | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10129,6 +10178,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & FramebufferCreateFlagBits::eImageless )
result += "Imageless | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10175,6 +10225,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & RenderPassCreateFlagBits::eTransformQCOM )
result += "TransformQCOM | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10230,6 +10281,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "FragmentRegionQCOM | ";
if ( value & SubpassDescriptionFlagBits::eShaderResolveQCOM )
result += "ShaderResolveQCOM | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10282,6 +10334,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "ResetCommandBuffer | ";
if ( value & CommandPoolCreateFlagBits::eProtected )
result += "Protected | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10328,6 +10381,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & CommandPoolResetFlagBits::eReleaseResources )
result += "ReleaseResources | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10374,6 +10428,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & CommandBufferResetFlagBits::eReleaseResources )
result += "ReleaseResources | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10426,6 +10481,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "RenderPassContinue | ";
if ( value & CommandBufferUsageFlagBits::eSimultaneousUse )
result += "SimultaneousUse | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10471,6 +10527,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & QueryControlFlagBits::ePrecise )
result += "Precise | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10519,6 +10576,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Front | ";
if ( value & StencilFaceFlagBits::eBack )
result += "Back | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10587,6 +10645,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Quad | ";
if ( value & SubgroupFeatureFlagBits::ePartitionedNV )
result += "PartitionedNV | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10642,6 +10701,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "GenericSrc | ";
if ( value & PeerMemoryFeatureFlagBits::eGenericDst )
result += "GenericDst | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10695,6 +10755,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "DeviceAddress | ";
if ( value & MemoryAllocateFlagBits::eDeviceAddressCaptureReplay )
result += "DeviceAddressCaptureReplay | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10739,6 +10800,7 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_USE_PLATFORM_FUCHSIA )
| VkFlags( ExternalMemoryHandleTypeFlagBits::eZirconVmoFUCHSIA )
#endif /*VK_USE_PLATFORM_FUCHSIA*/
+ | VkFlags( ExternalMemoryHandleTypeFlagBits::eRdmaAddressNV )
};
};
@@ -10802,6 +10864,9 @@ namespace VULKAN_HPP_NAMESPACE
if ( value & ExternalMemoryHandleTypeFlagBits::eZirconVmoFUCHSIA )
result += "ZirconVmoFUCHSIA | ";
#endif /*VK_USE_PLATFORM_FUCHSIA*/
+ if ( value & ExternalMemoryHandleTypeFlagBits::eRdmaAddressNV )
+ result += "RdmaAddressNV | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10856,6 +10921,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Exportable | ";
if ( value & ExternalMemoryFeatureFlagBits::eImportable )
result += "Importable | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10913,6 +10979,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "OpaqueWin32Kmt | ";
if ( value & ExternalFenceHandleTypeFlagBits::eSyncFd )
result += "SyncFd | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -10964,6 +11031,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Exportable | ";
if ( value & ExternalFenceFeatureFlagBits::eImportable )
result += "Importable | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11011,6 +11079,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & FenceImportFlagBits::eTemporary )
result += "Temporary | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11059,6 +11128,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & SemaphoreImportFlagBits::eTemporary )
result += "Temporary | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11126,6 +11196,7 @@ namespace VULKAN_HPP_NAMESPACE
if ( value & ExternalSemaphoreHandleTypeFlagBits::eZirconEventFUCHSIA )
result += "ZirconEventFUCHSIA | ";
#endif /*VK_USE_PLATFORM_FUCHSIA*/
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11177,6 +11248,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Exportable | ";
if ( value & ExternalSemaphoreFeatureFlagBits::eImportable )
result += "Importable | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11236,6 +11308,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "PartiallyBound | ";
if ( value & DescriptorBindingFlagBits::eVariableDescriptorCount )
result += "VariableDescriptorCount | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11291,6 +11364,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Min | ";
if ( value & ResolveModeFlagBits::eMax )
result += "Max | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11338,6 +11412,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & SemaphoreWaitFlagBits::eAny )
result += "Any | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11393,6 +11468,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "PostMultiplied | ";
if ( value & CompositeAlphaFlagBitsKHR::eInherit )
result += "Inherit | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11447,6 +11523,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Protected | ";
if ( value & SwapchainCreateFlagBitsKHR::eMutableFormat )
result += "MutableFormat | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11502,6 +11579,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Sum | ";
if ( value & DeviceGroupPresentModeFlagBitsKHR::eLocalMultiDevice )
result += "LocalMultiDevice | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11565,6 +11643,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "PerPixel | ";
if ( value & DisplayPlaneAlphaFlagBitsKHR::ePerPixelPremultiplied )
result += "PerPixelPremultiplied | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11641,6 +11720,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "HorizontalMirrorRotate270 | ";
if ( value & SurfaceTransformFlagBitsKHR::eInherit )
result += "Inherit | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11754,6 +11834,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Error | ";
if ( value & DebugReportFlagBitsEXT::eDebug )
result += "Debug | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11809,15 +11890,12 @@ namespace VULKAN_HPP_NAMESPACE
# if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & VideoCodecOperationFlagBitsKHR::eEncodeH264EXT )
result += "EncodeH264EXT | ";
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & VideoCodecOperationFlagBitsKHR::eDecodeH264EXT )
result += "DecodeH264EXT | ";
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & VideoCodecOperationFlagBitsKHR::eDecodeH265EXT )
result += "DecodeH265EXT | ";
# endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11873,6 +11951,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "422 | ";
if ( value & VideoChromaSubsamplingFlagBitsKHR::e444 )
result += "444 | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -11925,55 +12004,57 @@ namespace VULKAN_HPP_NAMESPACE
result += "10 | ";
if ( value & VideoComponentBitDepthFlagBitsKHR::e12 )
result += "12 | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
- using VideoCapabilitiesFlagsKHR = Flags<VideoCapabilitiesFlagBitsKHR>;
+ using VideoCapabilityFlagsKHR = Flags<VideoCapabilityFlagBitsKHR>;
template <>
- struct FlagTraits<VideoCapabilitiesFlagBitsKHR>
+ struct FlagTraits<VideoCapabilityFlagBitsKHR>
{
enum : VkFlags
{
- allFlags = VkFlags( VideoCapabilitiesFlagBitsKHR::eProtectedContent ) |
- VkFlags( VideoCapabilitiesFlagBitsKHR::eSeparateReferenceImages )
+ allFlags = VkFlags( VideoCapabilityFlagBitsKHR::eProtectedContent ) |
+ VkFlags( VideoCapabilityFlagBitsKHR::eSeparateReferenceImages )
};
};
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCapabilitiesFlagsKHR
- operator|( VideoCapabilitiesFlagBitsKHR bit0, VideoCapabilitiesFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCapabilityFlagsKHR
+ operator|( VideoCapabilityFlagBitsKHR bit0, VideoCapabilityFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
{
- return VideoCapabilitiesFlagsKHR( bit0 ) | bit1;
+ return VideoCapabilityFlagsKHR( bit0 ) | bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCapabilitiesFlagsKHR
- operator&(VideoCapabilitiesFlagBitsKHR bit0, VideoCapabilitiesFlagBitsKHR bit1)VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCapabilityFlagsKHR
+ operator&(VideoCapabilityFlagBitsKHR bit0, VideoCapabilityFlagBitsKHR bit1)VULKAN_HPP_NOEXCEPT
{
- return VideoCapabilitiesFlagsKHR( bit0 ) & bit1;
+ return VideoCapabilityFlagsKHR( bit0 ) & bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCapabilitiesFlagsKHR
- operator^( VideoCapabilitiesFlagBitsKHR bit0, VideoCapabilitiesFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCapabilityFlagsKHR
+ operator^( VideoCapabilityFlagBitsKHR bit0, VideoCapabilityFlagBitsKHR bit1 ) VULKAN_HPP_NOEXCEPT
{
- return VideoCapabilitiesFlagsKHR( bit0 ) ^ bit1;
+ return VideoCapabilityFlagsKHR( bit0 ) ^ bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCapabilitiesFlagsKHR operator~( VideoCapabilitiesFlagBitsKHR bits )
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoCapabilityFlagsKHR operator~( VideoCapabilityFlagBitsKHR bits )
VULKAN_HPP_NOEXCEPT
{
- return ~( VideoCapabilitiesFlagsKHR( bits ) );
+ return ~( VideoCapabilityFlagsKHR( bits ) );
}
- VULKAN_HPP_INLINE std::string to_string( VideoCapabilitiesFlagsKHR value )
+ VULKAN_HPP_INLINE std::string to_string( VideoCapabilityFlagsKHR value )
{
if ( !value )
return "{}";
std::string result;
- if ( value & VideoCapabilitiesFlagBitsKHR::eProtectedContent )
+ if ( value & VideoCapabilityFlagBitsKHR::eProtectedContent )
result += "ProtectedContent | ";
- if ( value & VideoCapabilitiesFlagBitsKHR::eSeparateReferenceImages )
+ if ( value & VideoCapabilityFlagBitsKHR::eSeparateReferenceImages )
result += "SeparateReferenceImages | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -12021,6 +12102,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & VideoSessionCreateFlagBitsKHR::eProtectedContent )
result += "ProtectedContent | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -12081,6 +12163,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & VideoCodingControlFlagBitsKHR::eReset )
result += "Reset | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -12134,6 +12217,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Power | ";
if ( value & VideoCodingQualityPresetFlagBitsKHR::eQuality )
result += "Quality | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
@@ -12184,6 +12268,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & VideoDecodeFlagBitsKHR::eReserved0 )
result += "Reserved0 | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
@@ -12200,80 +12285,80 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS )
//=== VK_EXT_video_encode_h264 ===
- using VideoEncodeH264CapabilitiesFlagsEXT = Flags<VideoEncodeH264CapabilitiesFlagBitsEXT>;
+ using VideoEncodeH264CapabilityFlagsEXT = Flags<VideoEncodeH264CapabilityFlagBitsEXT>;
template <>
- struct FlagTraits<VideoEncodeH264CapabilitiesFlagBitsEXT>
+ struct FlagTraits<VideoEncodeH264CapabilityFlagBitsEXT>
{
enum : VkFlags
{
- allFlags =
- VkFlags( VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityCabac ) |
- VkFlags( VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityCavlc ) |
- VkFlags( VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityWeightedBiPredImplicit ) |
- VkFlags( VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityTransform8X8 ) |
- VkFlags( VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityChromaQpOffset ) |
- VkFlags( VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilitySecondChromaQpOffset ) |
- VkFlags( VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityDeblockingFilterDisabled ) |
- VkFlags( VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityDeblockingFilterEnabled ) |
- VkFlags( VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityDeblockingFilterPartial ) |
- VkFlags( VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityMultipleSlicePerFrame ) |
- VkFlags( VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityEvenlyDistributedSliceSize )
+ allFlags = VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eCabac ) |
+ VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eCavlc ) |
+ VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eWeightedBiPredImplicit ) |
+ VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eTransform8X8 ) |
+ VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eChromaQpOffset ) |
+ VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eSecondChromaQpOffset ) |
+ VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterDisabled ) |
+ VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterEnabled ) |
+ VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterPartial ) |
+ VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eMultipleSlicePerFrame ) |
+ VkFlags( VideoEncodeH264CapabilityFlagBitsEXT::eEvenlyDistributedSliceSize )
};
};
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilitiesFlagsEXT operator|(
- VideoEncodeH264CapabilitiesFlagBitsEXT bit0, VideoEncodeH264CapabilitiesFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilityFlagsEXT operator|(
+ VideoEncodeH264CapabilityFlagBitsEXT bit0, VideoEncodeH264CapabilityFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
{
- return VideoEncodeH264CapabilitiesFlagsEXT( bit0 ) | bit1;
+ return VideoEncodeH264CapabilityFlagsEXT( bit0 ) | bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilitiesFlagsEXT operator&(
- VideoEncodeH264CapabilitiesFlagBitsEXT bit0, VideoEncodeH264CapabilitiesFlagBitsEXT bit1)VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilityFlagsEXT
+ operator&(VideoEncodeH264CapabilityFlagBitsEXT bit0, VideoEncodeH264CapabilityFlagBitsEXT bit1)VULKAN_HPP_NOEXCEPT
{
- return VideoEncodeH264CapabilitiesFlagsEXT( bit0 ) & bit1;
+ return VideoEncodeH264CapabilityFlagsEXT( bit0 ) & bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilitiesFlagsEXT operator^(
- VideoEncodeH264CapabilitiesFlagBitsEXT bit0, VideoEncodeH264CapabilitiesFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilityFlagsEXT operator^(
+ VideoEncodeH264CapabilityFlagBitsEXT bit0, VideoEncodeH264CapabilityFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
{
- return VideoEncodeH264CapabilitiesFlagsEXT( bit0 ) ^ bit1;
+ return VideoEncodeH264CapabilityFlagsEXT( bit0 ) ^ bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilitiesFlagsEXT
- operator~( VideoEncodeH264CapabilitiesFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilityFlagsEXT
+ operator~( VideoEncodeH264CapabilityFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT
{
- return ~( VideoEncodeH264CapabilitiesFlagsEXT( bits ) );
+ return ~( VideoEncodeH264CapabilityFlagsEXT( bits ) );
}
- VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264CapabilitiesFlagsEXT value )
+ VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264CapabilityFlagsEXT value )
{
if ( !value )
return "{}";
std::string result;
- if ( value & VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityCabac )
- result += "VkVideoEncodeH264CapabilityCabac | ";
- if ( value & VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityCavlc )
- result += "VkVideoEncodeH264CapabilityCavlc | ";
- if ( value & VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityWeightedBiPredImplicit )
- result += "VkVideoEncodeH264CapabilityWeightedBiPredImplicit | ";
- if ( value & VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityTransform8X8 )
- result += "VkVideoEncodeH264CapabilityTransform8X8 | ";
- if ( value & VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityChromaQpOffset )
- result += "VkVideoEncodeH264CapabilityChromaQpOffset | ";
- if ( value & VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilitySecondChromaQpOffset )
- result += "VkVideoEncodeH264CapabilitySecondChromaQpOffset | ";
- if ( value & VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityDeblockingFilterDisabled )
- result += "VkVideoEncodeH264CapabilityDeblockingFilterDisabled | ";
- if ( value & VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityDeblockingFilterEnabled )
- result += "VkVideoEncodeH264CapabilityDeblockingFilterEnabled | ";
- if ( value & VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityDeblockingFilterPartial )
- result += "VkVideoEncodeH264CapabilityDeblockingFilterPartial | ";
- if ( value & VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityMultipleSlicePerFrame )
- result += "VkVideoEncodeH264CapabilityMultipleSlicePerFrame | ";
- if ( value & VideoEncodeH264CapabilitiesFlagBitsEXT::eVkVideoEncodeH264CapabilityEvenlyDistributedSliceSize )
- result += "VkVideoEncodeH264CapabilityEvenlyDistributedSliceSize | ";
+ if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eCabac )
+ result += "Cabac | ";
+ if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eCavlc )
+ result += "Cavlc | ";
+ if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eWeightedBiPredImplicit )
+ result += "WeightedBiPredImplicit | ";
+ if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eTransform8X8 )
+ result += "Transform8X8 | ";
+ if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eChromaQpOffset )
+ result += "ChromaQpOffset | ";
+ if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eSecondChromaQpOffset )
+ result += "SecondChromaQpOffset | ";
+ if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterDisabled )
+ result += "DeblockingFilterDisabled | ";
+ if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterEnabled )
+ result += "DeblockingFilterEnabled | ";
+ if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eDeblockingFilterPartial )
+ result += "DeblockingFilterPartial | ";
+ if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eMultipleSlicePerFrame )
+ result += "MultipleSlicePerFrame | ";
+ if ( value & VideoEncodeH264CapabilityFlagBitsEXT::eEvenlyDistributedSliceSize )
+ result += "EvenlyDistributedSliceSize | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -12326,6 +12411,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Slice | ";
if ( value & VideoEncodeH264InputModeFlagBitsEXT::eNonVcl )
result += "NonVcl | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -12378,6 +12464,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Slice | ";
if ( value & VideoEncodeH264OutputModeFlagBitsEXT::eNonVcl )
result += "NonVcl | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -12425,6 +12512,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & VideoEncodeH264CreateFlagBitsEXT::eReserved0 )
result += "Reserved0 | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
@@ -12432,53 +12520,54 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS )
//=== VK_EXT_video_decode_h264 ===
- using VideoDecodeH264FieldLayoutFlagsEXT = Flags<VideoDecodeH264FieldLayoutFlagBitsEXT>;
+ using VideoDecodeH264PictureLayoutFlagsEXT = Flags<VideoDecodeH264PictureLayoutFlagBitsEXT>;
template <>
- struct FlagTraits<VideoDecodeH264FieldLayoutFlagBitsEXT>
+ struct FlagTraits<VideoDecodeH264PictureLayoutFlagBitsEXT>
{
enum : VkFlags
{
- allFlags = VkFlags( VideoDecodeH264FieldLayoutFlagBitsEXT::eVkVideoDecodeH264ProgressivePicturesOnly ) |
- VkFlags( VideoDecodeH264FieldLayoutFlagBitsEXT::eLineInterlacedPlane ) |
- VkFlags( VideoDecodeH264FieldLayoutFlagBitsEXT::eSeparateInterlacedPlane )
+ allFlags = VkFlags( VideoDecodeH264PictureLayoutFlagBitsEXT::eProgressive ) |
+ VkFlags( VideoDecodeH264PictureLayoutFlagBitsEXT::eInterlacedInterleavedLines ) |
+ VkFlags( VideoDecodeH264PictureLayoutFlagBitsEXT::eInterlacedSeparatePlanes )
};
};
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeH264FieldLayoutFlagsEXT operator|(
- VideoDecodeH264FieldLayoutFlagBitsEXT bit0, VideoDecodeH264FieldLayoutFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeH264PictureLayoutFlagsEXT operator|(
+ VideoDecodeH264PictureLayoutFlagBitsEXT bit0, VideoDecodeH264PictureLayoutFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
{
- return VideoDecodeH264FieldLayoutFlagsEXT( bit0 ) | bit1;
+ return VideoDecodeH264PictureLayoutFlagsEXT( bit0 ) | bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeH264FieldLayoutFlagsEXT
- operator&(VideoDecodeH264FieldLayoutFlagBitsEXT bit0, VideoDecodeH264FieldLayoutFlagBitsEXT bit1)VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeH264PictureLayoutFlagsEXT operator&(
+ VideoDecodeH264PictureLayoutFlagBitsEXT bit0, VideoDecodeH264PictureLayoutFlagBitsEXT bit1)VULKAN_HPP_NOEXCEPT
{
- return VideoDecodeH264FieldLayoutFlagsEXT( bit0 ) & bit1;
+ return VideoDecodeH264PictureLayoutFlagsEXT( bit0 ) & bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeH264FieldLayoutFlagsEXT operator^(
- VideoDecodeH264FieldLayoutFlagBitsEXT bit0, VideoDecodeH264FieldLayoutFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeH264PictureLayoutFlagsEXT operator^(
+ VideoDecodeH264PictureLayoutFlagBitsEXT bit0, VideoDecodeH264PictureLayoutFlagBitsEXT bit1 ) VULKAN_HPP_NOEXCEPT
{
- return VideoDecodeH264FieldLayoutFlagsEXT( bit0 ) ^ bit1;
+ return VideoDecodeH264PictureLayoutFlagsEXT( bit0 ) ^ bit1;
}
- VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeH264FieldLayoutFlagsEXT
- operator~( VideoDecodeH264FieldLayoutFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR VideoDecodeH264PictureLayoutFlagsEXT
+ operator~( VideoDecodeH264PictureLayoutFlagBitsEXT bits ) VULKAN_HPP_NOEXCEPT
{
- return ~( VideoDecodeH264FieldLayoutFlagsEXT( bits ) );
+ return ~( VideoDecodeH264PictureLayoutFlagsEXT( bits ) );
}
- VULKAN_HPP_INLINE std::string to_string( VideoDecodeH264FieldLayoutFlagsEXT value )
+ VULKAN_HPP_INLINE std::string to_string( VideoDecodeH264PictureLayoutFlagsEXT value )
{
if ( !value )
return "{}";
std::string result;
- if ( value & VideoDecodeH264FieldLayoutFlagBitsEXT::eLineInterlacedPlane )
- result += "LineInterlacedPlane | ";
- if ( value & VideoDecodeH264FieldLayoutFlagBitsEXT::eSeparateInterlacedPlane )
- result += "SeparateInterlacedPlane | ";
+ if ( value & VideoDecodeH264PictureLayoutFlagBitsEXT::eInterlacedInterleavedLines )
+ result += "InterlacedInterleavedLines | ";
+ if ( value & VideoDecodeH264PictureLayoutFlagBitsEXT::eInterlacedSeparatePlanes )
+ result += "InterlacedSeparatePlanes | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -12555,6 +12644,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "D3D11Image | ";
if ( value & ExternalMemoryHandleTypeFlagBitsNV::eD3D11ImageKmt )
result += "D3D11ImageKmt | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -12607,6 +12697,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Exportable | ";
if ( value & ExternalMemoryFeatureFlagBitsNV::eImportable )
result += "Importable | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -12666,6 +12757,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & ConditionalRenderingFlagBitsEXT::eInverted )
result += "Inverted | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -12714,6 +12806,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & SurfaceCounterFlagBitsEXT::eVblank )
result += "Vblank | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -12802,6 +12895,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "PerformanceImpacting | ";
if ( value & PerformanceCounterDescriptionFlagBitsKHR::eConcurrentlyImpacted )
result += "ConcurrentlyImpacted | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -12888,6 +12982,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Warning | ";
if ( value & DebugUtilsMessageSeverityFlagBitsEXT::eError )
result += "Error | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -12940,6 +13035,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Validation | ";
if ( value & DebugUtilsMessageTypeFlagBitsEXT::ePerformance )
result += "Performance | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -13014,6 +13110,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "Opaque | ";
if ( value & GeometryFlagBitsKHR::eNoDuplicateAnyHitInvocation )
result += "NoDuplicateAnyHitInvocation | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -13025,7 +13122,7 @@ namespace VULKAN_HPP_NAMESPACE
enum : VkFlags
{
allFlags = VkFlags( GeometryInstanceFlagBitsKHR::eTriangleFacingCullDisable ) |
- VkFlags( GeometryInstanceFlagBitsKHR::eTriangleFrontCounterclockwise ) |
+ VkFlags( GeometryInstanceFlagBitsKHR::eTriangleFlipFacing ) |
VkFlags( GeometryInstanceFlagBitsKHR::eForceOpaque ) |
VkFlags( GeometryInstanceFlagBitsKHR::eForceNoOpaque )
};
@@ -13065,12 +13162,13 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & GeometryInstanceFlagBitsKHR::eTriangleFacingCullDisable )
result += "TriangleFacingCullDisable | ";
- if ( value & GeometryInstanceFlagBitsKHR::eTriangleFrontCounterclockwise )
- result += "TriangleFrontCounterclockwise | ";
+ if ( value & GeometryInstanceFlagBitsKHR::eTriangleFlipFacing )
+ result += "TriangleFlipFacing | ";
if ( value & GeometryInstanceFlagBitsKHR::eForceOpaque )
result += "ForceOpaque | ";
if ( value & GeometryInstanceFlagBitsKHR::eForceNoOpaque )
result += "ForceNoOpaque | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -13134,6 +13232,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "LowMemory | ";
if ( value & BuildAccelerationStructureFlagBitsKHR::eMotionNV )
result += "MotionNV | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -13183,6 +13282,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "DeviceAddressCaptureReplay | ";
if ( value & AccelerationStructureCreateFlagBitsKHR::eMotionNV )
result += "MotionNV | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -13275,6 +13375,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "ApplicationPipelineCacheHit | ";
if ( value & PipelineCreationFeedbackFlagBitsEXT::eBasePipelineAcceleration )
result += "BasePipelineAcceleration | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -13369,6 +13470,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "DebugReporting | ";
if ( value & ToolPurposeFlagBitsEXT::eDebugMarkers )
result += "DebugMarkers | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -13435,6 +13537,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & IndirectStateFlagBitsNV::eFlagFrontface )
result += "FlagFrontface | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -13487,6 +13590,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "IndexedSequences | ";
if ( value & IndirectCommandsLayoutUsageFlagBitsNV::eUnorderedSequences )
result += "UnorderedSequences | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -13554,6 +13658,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & VideoEncodeFlagBitsKHR::eReserved0 )
result += "Reserved0 | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -13601,6 +13706,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & VideoEncodeRateControlFlagBitsKHR::eReset )
result += "Reset | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -13647,6 +13753,7 @@ namespace VULKAN_HPP_NAMESPACE
return "{}";
std::string result;
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
@@ -13702,6 +13809,7 @@ namespace VULKAN_HPP_NAMESPACE
result += "EnableResourceTracking | ";
if ( value & DeviceDiagnosticsConfigFlagBitsNV::eEnableAutomaticCheckpoints )
result += "EnableAutomaticCheckpoints | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -13744,7 +13852,8 @@ namespace VULKAN_HPP_NAMESPACE
VkFlags64( PipelineStageFlagBits2KHR::eRayTracingShader ) |
VkFlags64( PipelineStageFlagBits2KHR::eFragmentDensityProcessEXT ) |
VkFlags64( PipelineStageFlagBits2KHR::eTaskShaderNV ) | VkFlags64( PipelineStageFlagBits2KHR::eMeshShaderNV ) |
- VkFlags64( PipelineStageFlagBits2KHR::eSubpassShadingHUAWEI )
+ VkFlags64( PipelineStageFlagBits2KHR::eSubpassShadingHUAWEI ) |
+ VkFlags64( PipelineStageFlagBits2KHR::eInvocationMaskHUAWEI )
};
};
@@ -13829,8 +13938,6 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & PipelineStageFlagBits2KHR::eVideoDecode )
result += "VideoDecode | ";
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & PipelineStageFlagBits2KHR::eVideoEncode )
result += "VideoEncode | ";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
@@ -13854,6 +13961,9 @@ namespace VULKAN_HPP_NAMESPACE
result += "MeshShaderNV | ";
if ( value & PipelineStageFlagBits2KHR::eSubpassShadingHUAWEI )
result += "SubpassShadingHUAWEI | ";
+ if ( value & PipelineStageFlagBits2KHR::eInvocationMaskHUAWEI )
+ result += "InvocationMaskHUAWEI | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -13890,7 +14000,8 @@ namespace VULKAN_HPP_NAMESPACE
VkFlags64( AccessFlagBits2KHR::eAccelerationStructureRead ) |
VkFlags64( AccessFlagBits2KHR::eAccelerationStructureWrite ) |
VkFlags64( AccessFlagBits2KHR::eFragmentDensityMapReadEXT ) |
- VkFlags64( AccessFlagBits2KHR::eColorAttachmentReadNoncoherentEXT )
+ VkFlags64( AccessFlagBits2KHR::eColorAttachmentReadNoncoherentEXT ) |
+ VkFlags64( AccessFlagBits2KHR::eInvocationMaskReadHUAWEI )
};
};
@@ -13966,16 +14077,10 @@ namespace VULKAN_HPP_NAMESPACE
#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & AccessFlagBits2KHR::eVideoDecodeRead )
result += "VideoDecodeRead | ";
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & AccessFlagBits2KHR::eVideoDecodeWrite )
result += "VideoDecodeWrite | ";
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & AccessFlagBits2KHR::eVideoEncodeRead )
result += "VideoEncodeRead | ";
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
if ( value & AccessFlagBits2KHR::eVideoEncodeWrite )
result += "VideoEncodeWrite | ";
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
@@ -14001,6 +14106,9 @@ namespace VULKAN_HPP_NAMESPACE
result += "FragmentDensityMapReadEXT | ";
if ( value & AccessFlagBits2KHR::eColorAttachmentReadNoncoherentEXT )
result += "ColorAttachmentReadNoncoherentEXT | ";
+ if ( value & AccessFlagBits2KHR::eInvocationMaskReadHUAWEI )
+ result += "InvocationMaskReadHUAWEI | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
@@ -14046,6 +14154,7 @@ namespace VULKAN_HPP_NAMESPACE
std::string result;
if ( value & SubmitFlagBitsKHR::eProtected )
result += "Protected | ";
+
return "{ " + result.substr( 0, result.size() - 3 ) + " }";
}
diff --git a/thirdparty/vulkan/include/vulkan/vulkan_funcs.hpp b/thirdparty/vulkan/include/vulkan/vulkan_funcs.hpp
index 544cbddfa9..d638fa774f 100644
--- a/thirdparty/vulkan/include/vulkan/vulkan_funcs.hpp
+++ b/thirdparty/vulkan/include/vulkan/vulkan_funcs.hpp
@@ -23,6 +23,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Instance * pInstance,
Dispatch const & d ) VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateInstance( reinterpret_cast<const VkInstanceCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
reinterpret_cast<VkInstance *>( pInstance ) ) );
@@ -36,6 +37,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d )
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Instance instance;
Result result = static_cast<Result>(
d.vkCreateInstance( reinterpret_cast<const VkInstanceCreateInfo *>( &createInfo ),
@@ -53,6 +55,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d )
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Instance instance;
Result result = static_cast<Result>(
d.vkCreateInstance( reinterpret_cast<const VkInstanceCreateInfo *>( &createInfo ),
@@ -70,6 +73,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void Instance::destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyInstance( m_instance, reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -78,6 +82,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void Instance::destroy( Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyInstance( m_instance,
reinterpret_cast<const VkAllocationCallbacks *>(
static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ) );
@@ -90,6 +95,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkEnumeratePhysicalDevices(
m_instance, pPhysicalDeviceCount, reinterpret_cast<VkPhysicalDevice *>( pPhysicalDevices ) ) );
}
@@ -100,6 +106,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<PhysicalDevice, PhysicalDeviceAllocator>>::type
Instance::enumeratePhysicalDevices( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PhysicalDevice, PhysicalDeviceAllocator> physicalDevices;
uint32_t physicalDeviceCount;
Result result;
@@ -130,6 +137,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<PhysicalDevice, PhysicalDeviceAllocator>>::type
Instance::enumeratePhysicalDevices( PhysicalDeviceAllocator & physicalDeviceAllocator, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PhysicalDevice, PhysicalDeviceAllocator> physicalDevices( physicalDeviceAllocator );
uint32_t physicalDeviceCount;
Result result;
@@ -157,6 +165,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void PhysicalDevice::getFeatures( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pFeatures,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures *>( pFeatures ) );
}
@@ -165,6 +174,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures
PhysicalDevice::getFeatures( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures features;
d.vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures *>( &features ) );
return features;
@@ -177,6 +187,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::FormatProperties * pFormatProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceFormatProperties(
m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties *>( pFormatProperties ) );
}
@@ -187,6 +198,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getFormatProperties( VULKAN_HPP_NAMESPACE::Format format,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::FormatProperties formatProperties;
d.vkGetPhysicalDeviceFormatProperties(
m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties *>( &formatProperties ) );
@@ -204,6 +216,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ImageFormatProperties * pImageFormatProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties(
m_physicalDevice,
static_cast<VkFormat>( format ),
@@ -225,6 +238,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ImageCreateFlags flags,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties(
m_physicalDevice,
@@ -243,6 +257,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void PhysicalDevice::getProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties *>( pProperties ) );
}
@@ -251,6 +266,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties
PhysicalDevice::getProperties( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties properties;
d.vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties *>( &properties ) );
return properties;
@@ -263,6 +279,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::QueueFamilyProperties * pQueueFamilyProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice,
pQueueFamilyPropertyCount,
reinterpret_cast<VkQueueFamilyProperties *>( pQueueFamilyProperties ) );
@@ -273,6 +290,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<QueueFamilyProperties, QueueFamilyPropertiesAllocator>
PhysicalDevice::getQueueFamilyProperties( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<QueueFamilyProperties, QueueFamilyPropertiesAllocator> queueFamilyProperties;
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
@@ -293,6 +311,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getQueueFamilyProperties( QueueFamilyPropertiesAllocator & queueFamilyPropertiesAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<QueueFamilyProperties, QueueFamilyPropertiesAllocator> queueFamilyProperties(
queueFamilyPropertiesAllocator );
uint32_t queueFamilyPropertyCount;
@@ -312,6 +331,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getMemoryProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties * pMemoryProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceMemoryProperties( m_physicalDevice,
reinterpret_cast<VkPhysicalDeviceMemoryProperties *>( pMemoryProperties ) );
}
@@ -321,6 +341,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties
PhysicalDevice::getMemoryProperties( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties memoryProperties;
d.vkGetPhysicalDeviceMemoryProperties( m_physicalDevice,
reinterpret_cast<VkPhysicalDeviceMemoryProperties *>( &memoryProperties ) );
@@ -332,6 +353,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const char * pName,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetInstanceProcAddr( m_instance, pName );
}
@@ -340,6 +362,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const std::string & name,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetInstanceProcAddr( m_instance, name.c_str() );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -348,6 +371,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const char * pName,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetDeviceProcAddr( m_device, pName );
}
@@ -356,6 +380,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const std::string & name,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetDeviceProcAddr( m_device, name.c_str() );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -367,6 +392,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Device * pDevice,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateDevice( m_physicalDevice,
reinterpret_cast<const VkDeviceCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -380,6 +406,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Device device;
Result result = static_cast<Result>(
d.vkCreateDevice( m_physicalDevice,
@@ -398,6 +425,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Device device;
Result result = static_cast<Result>(
d.vkCreateDevice( m_physicalDevice,
@@ -416,6 +444,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void Device::destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDevice( m_device, reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -424,6 +453,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void Device::destroy( Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDevice( m_device,
reinterpret_cast<const VkAllocationCallbacks *>(
static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ) );
@@ -437,6 +467,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ExtensionProperties * pProperties,
Dispatch const & d ) VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkEnumerateInstanceExtensionProperties(
pLayerName, pPropertyCount, reinterpret_cast<VkExtensionProperties *>( pProperties ) ) );
}
@@ -447,6 +478,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<ExtensionProperties, ExtensionPropertiesAllocator>>::type
enumerateInstanceExtensionProperties( Optional<const std::string> layerName, Dispatch const & d )
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<ExtensionProperties, ExtensionPropertiesAllocator> properties;
uint32_t propertyCount;
Result result;
@@ -482,6 +514,7 @@ namespace VULKAN_HPP_NAMESPACE
ExtensionPropertiesAllocator & extensionPropertiesAllocator,
Dispatch const & d )
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<ExtensionProperties, ExtensionPropertiesAllocator> properties( extensionPropertiesAllocator );
uint32_t propertyCount;
Result result;
@@ -515,6 +548,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ExtensionProperties * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkEnumerateDeviceExtensionProperties(
m_physicalDevice, pLayerName, pPropertyCount, reinterpret_cast<VkExtensionProperties *>( pProperties ) ) );
}
@@ -526,6 +560,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::enumerateDeviceExtensionProperties( Optional<const std::string> layerName,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<ExtensionProperties, ExtensionPropertiesAllocator> properties;
uint32_t propertyCount;
Result result;
@@ -562,6 +597,7 @@ namespace VULKAN_HPP_NAMESPACE
ExtensionPropertiesAllocator & extensionPropertiesAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<ExtensionProperties, ExtensionPropertiesAllocator> properties( extensionPropertiesAllocator );
uint32_t propertyCount;
Result result;
@@ -595,6 +631,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::LayerProperties * pProperties,
Dispatch const & d ) VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkEnumerateInstanceLayerProperties( pPropertyCount, reinterpret_cast<VkLayerProperties *>( pProperties ) ) );
}
@@ -605,6 +642,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<LayerProperties, LayerPropertiesAllocator>>::type
enumerateInstanceLayerProperties( Dispatch const & d )
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<LayerProperties, LayerPropertiesAllocator> properties;
uint32_t propertyCount;
Result result;
@@ -634,6 +672,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<LayerProperties, LayerPropertiesAllocator>>::type
enumerateInstanceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d )
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<LayerProperties, LayerPropertiesAllocator> properties( layerPropertiesAllocator );
uint32_t propertyCount;
Result result;
@@ -662,6 +701,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::LayerProperties * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkEnumerateDeviceLayerProperties(
m_physicalDevice, pPropertyCount, reinterpret_cast<VkLayerProperties *>( pProperties ) ) );
}
@@ -672,6 +712,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<LayerProperties, LayerPropertiesAllocator>>::type
PhysicalDevice::enumerateDeviceLayerProperties( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<LayerProperties, LayerPropertiesAllocator> properties;
uint32_t propertyCount;
Result result;
@@ -703,6 +744,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::enumerateDeviceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<LayerProperties, LayerPropertiesAllocator> properties( layerPropertiesAllocator );
uint32_t propertyCount;
Result result;
@@ -732,6 +774,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Queue * pQueue,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast<VkQueue *>( pQueue ) );
}
@@ -740,6 +783,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Queue
Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Queue queue;
d.vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast<VkQueue *>( &queue ) );
return queue;
@@ -752,6 +796,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Fence fence,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkQueueSubmit(
m_queue, submitCount, reinterpret_cast<const VkSubmitInfo *>( pSubmits ), static_cast<VkFence>( fence ) ) );
}
@@ -763,6 +808,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Fence fence,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkQueueSubmit( m_queue,
submits.size(),
reinterpret_cast<const VkSubmitInfo *>( submits.data() ),
@@ -775,6 +821,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::waitIdle( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkQueueWaitIdle( m_queue ) );
}
#else
@@ -782,6 +829,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Queue::waitIdle( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkQueueWaitIdle( m_queue ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::waitIdle" );
}
@@ -791,6 +839,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitIdle( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkDeviceWaitIdle( m_device ) );
}
#else
@@ -798,6 +847,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::waitIdle( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkDeviceWaitIdle( m_device ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitIdle" );
}
@@ -810,6 +860,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceMemory * pMemory,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkAllocateMemory( m_device,
reinterpret_cast<const VkMemoryAllocateInfo *>( pAllocateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -824,6 +875,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DeviceMemory memory;
Result result = static_cast<Result>(
d.vkAllocateMemory( m_device,
@@ -842,6 +894,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DeviceMemory memory;
Result result = static_cast<Result>(
d.vkAllocateMemory( m_device,
@@ -861,6 +914,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkFreeMemory(
m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -871,6 +925,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkFreeMemory( m_device,
static_cast<VkDeviceMemory>( memory ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -883,6 +938,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkFreeMemory(
m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -893,6 +949,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkFreeMemory( m_device,
static_cast<VkDeviceMemory>( memory ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -908,6 +965,7 @@ namespace VULKAN_HPP_NAMESPACE
void ** ppData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkMapMemory( m_device,
static_cast<VkDeviceMemory>( memory ),
static_cast<VkDeviceSize>( offset ),
@@ -925,6 +983,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MemoryMapFlags flags,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
void * pData;
Result result = static_cast<Result>( d.vkMapMemory( m_device,
static_cast<VkDeviceMemory>( memory ),
@@ -940,6 +999,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void Device::unmapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkUnmapMemory( m_device, static_cast<VkDeviceMemory>( memory ) );
}
@@ -949,6 +1009,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::MappedMemoryRange * pMemoryRanges,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkFlushMappedMemoryRanges(
m_device, memoryRangeCount, reinterpret_cast<const VkMappedMemoryRange *>( pMemoryRanges ) ) );
}
@@ -959,6 +1020,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::flushMappedMemoryRanges( ArrayProxy<const VULKAN_HPP_NAMESPACE::MappedMemoryRange> const & memoryRanges,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkFlushMappedMemoryRanges(
m_device, memoryRanges.size(), reinterpret_cast<const VkMappedMemoryRange *>( memoryRanges.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::flushMappedMemoryRanges" );
@@ -971,6 +1033,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::MappedMemoryRange * pMemoryRanges,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkInvalidateMappedMemoryRanges(
m_device, memoryRangeCount, reinterpret_cast<const VkMappedMemoryRange *>( pMemoryRanges ) ) );
}
@@ -981,6 +1044,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::invalidateMappedMemoryRanges(
ArrayProxy<const VULKAN_HPP_NAMESPACE::MappedMemoryRange> const & memoryRanges, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkInvalidateMappedMemoryRanges(
m_device, memoryRanges.size(), reinterpret_cast<const VkMappedMemoryRange *>( memoryRanges.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::invalidateMappedMemoryRanges" );
@@ -992,6 +1056,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceSize * pCommittedMemoryInBytes,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetDeviceMemoryCommitment(
m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<VkDeviceSize *>( pCommittedMemoryInBytes ) );
}
@@ -1002,6 +1067,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getMemoryCommitment( VULKAN_HPP_NAMESPACE::DeviceMemory memory,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DeviceSize committedMemoryInBytes;
d.vkGetDeviceMemoryCommitment(
m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<VkDeviceSize *>( &committedMemoryInBytes ) );
@@ -1016,6 +1082,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkBindBufferMemory( m_device,
static_cast<VkBuffer>( buffer ),
static_cast<VkDeviceMemory>( memory ),
@@ -1029,6 +1096,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkBindBufferMemory( m_device,
static_cast<VkBuffer>( buffer ),
static_cast<VkDeviceMemory>( memory ),
@@ -1044,6 +1112,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkBindImageMemory( m_device,
static_cast<VkImage>( image ),
static_cast<VkDeviceMemory>( memory ),
@@ -1057,6 +1126,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkBindImageMemory( m_device,
static_cast<VkImage>( image ),
static_cast<VkDeviceMemory>( memory ),
@@ -1071,6 +1141,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MemoryRequirements * pMemoryRequirements,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetBufferMemoryRequirements(
m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<VkMemoryRequirements *>( pMemoryRequirements ) );
}
@@ -1081,6 +1152,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getBufferMemoryRequirements( VULKAN_HPP_NAMESPACE::Buffer buffer,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements;
d.vkGetBufferMemoryRequirements(
m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<VkMemoryRequirements *>( &memoryRequirements ) );
@@ -1094,6 +1166,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MemoryRequirements * pMemoryRequirements,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetImageMemoryRequirements(
m_device, static_cast<VkImage>( image ), reinterpret_cast<VkMemoryRequirements *>( pMemoryRequirements ) );
}
@@ -1104,6 +1177,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getImageMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements;
d.vkGetImageMemoryRequirements(
m_device, static_cast<VkImage>( image ), reinterpret_cast<VkMemoryRequirements *>( &memoryRequirements ) );
@@ -1118,6 +1192,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements * pSparseMemoryRequirements,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetImageSparseMemoryRequirements(
m_device,
static_cast<VkImage>( image ),
@@ -1131,6 +1206,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements, SparseImageMemoryRequirementsAllocator>
Device::getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SparseImageMemoryRequirements, SparseImageMemoryRequirementsAllocator> sparseMemoryRequirements;
uint32_t sparseMemoryRequirementCount;
d.vkGetImageSparseMemoryRequirements(
@@ -1157,6 +1233,7 @@ namespace VULKAN_HPP_NAMESPACE
SparseImageMemoryRequirementsAllocator & sparseImageMemoryRequirementsAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SparseImageMemoryRequirements, SparseImageMemoryRequirementsAllocator> sparseMemoryRequirements(
sparseImageMemoryRequirementsAllocator );
uint32_t sparseMemoryRequirementCount;
@@ -1184,6 +1261,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SparseImageFormatProperties * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceSparseImageFormatProperties(
m_physicalDevice,
static_cast<VkFormat>( format ),
@@ -1205,6 +1283,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ImageTiling tiling,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SparseImageFormatProperties, SparseImageFormatPropertiesAllocator> properties;
uint32_t propertyCount;
d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice,
@@ -1244,6 +1323,7 @@ namespace VULKAN_HPP_NAMESPACE
SparseImageFormatPropertiesAllocator & sparseImageFormatPropertiesAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SparseImageFormatProperties, SparseImageFormatPropertiesAllocator> properties(
sparseImageFormatPropertiesAllocator );
uint32_t propertyCount;
@@ -1277,6 +1357,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Fence fence,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkQueueBindSparse( m_queue,
bindInfoCount,
reinterpret_cast<const VkBindSparseInfo *>( pBindInfo ),
@@ -1290,6 +1371,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Fence fence,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkQueueBindSparse( m_queue,
bindInfo.size(),
@@ -1306,6 +1388,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Fence * pFence,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateFence( m_device,
reinterpret_cast<const VkFenceCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -1319,6 +1402,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Fence fence;
Result result = static_cast<Result>(
d.vkCreateFence( m_device,
@@ -1337,6 +1421,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Fence fence;
Result result = static_cast<Result>(
d.vkCreateFence( m_device,
@@ -1356,6 +1441,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyFence(
m_device, static_cast<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -1366,6 +1452,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyFence( m_device,
static_cast<VkFence>( fence ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -1378,6 +1465,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyFence(
m_device, static_cast<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -1388,6 +1476,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyFence( m_device,
static_cast<VkFence>( fence ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -1400,6 +1489,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::Fence * pFences,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkResetFences( m_device, fenceCount, reinterpret_cast<const VkFence *>( pFences ) ) );
}
@@ -1408,6 +1498,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::resetFences( ArrayProxy<const VULKAN_HPP_NAMESPACE::Fence> const & fences, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkResetFences( m_device, fences.size(), reinterpret_cast<const VkFence *>( fences.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetFences" );
@@ -1419,6 +1510,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetFenceStatus( m_device, static_cast<VkFence>( fence ) ) );
}
#else
@@ -1426,6 +1518,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkGetFenceStatus( m_device, static_cast<VkFence>( fence ) ) );
return createResultValue( result,
VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceStatus",
@@ -1440,6 +1533,7 @@ namespace VULKAN_HPP_NAMESPACE
uint64_t timeout,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkWaitForFences(
m_device, fenceCount, reinterpret_cast<const VkFence *>( pFences ), static_cast<VkBool32>( waitAll ), timeout ) );
}
@@ -1452,6 +1546,7 @@ namespace VULKAN_HPP_NAMESPACE
uint64_t timeout,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkWaitForFences( m_device,
fences.size(),
reinterpret_cast<const VkFence *>( fences.data() ),
@@ -1470,6 +1565,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Semaphore * pSemaphore,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateSemaphore( m_device,
reinterpret_cast<const VkSemaphoreCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -1484,6 +1580,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Semaphore semaphore;
Result result = static_cast<Result>(
d.vkCreateSemaphore( m_device,
@@ -1502,6 +1599,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Semaphore semaphore;
Result result = static_cast<Result>(
d.vkCreateSemaphore( m_device,
@@ -1521,6 +1619,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySemaphore(
m_device, static_cast<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -1531,6 +1630,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySemaphore( m_device,
static_cast<VkSemaphore>( semaphore ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -1543,6 +1643,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySemaphore(
m_device, static_cast<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -1553,6 +1654,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySemaphore( m_device,
static_cast<VkSemaphore>( semaphore ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -1567,6 +1669,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Event * pEvent,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateEvent( m_device,
reinterpret_cast<const VkEventCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -1580,6 +1683,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Event event;
Result result = static_cast<Result>(
d.vkCreateEvent( m_device,
@@ -1598,6 +1702,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Event event;
Result result = static_cast<Result>(
d.vkCreateEvent( m_device,
@@ -1617,6 +1722,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyEvent(
m_device, static_cast<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -1627,6 +1733,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyEvent( m_device,
static_cast<VkEvent>( event ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -1639,6 +1746,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyEvent(
m_device, static_cast<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -1649,6 +1757,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyEvent( m_device,
static_cast<VkEvent>( event ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -1661,6 +1770,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getEventStatus( VULKAN_HPP_NAMESPACE::Event event,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetEventStatus( m_device, static_cast<VkEvent>( event ) ) );
}
#else
@@ -1668,6 +1778,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getEventStatus( VULKAN_HPP_NAMESPACE::Event event,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkGetEventStatus( m_device, static_cast<VkEvent>( event ) ) );
return createResultValue( result,
VULKAN_HPP_NAMESPACE_STRING "::Device::getEventStatus",
@@ -1680,6 +1791,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setEvent( VULKAN_HPP_NAMESPACE::Event event,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkSetEvent( m_device, static_cast<VkEvent>( event ) ) );
}
#else
@@ -1687,6 +1799,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::setEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkSetEvent( m_device, static_cast<VkEvent>( event ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setEvent" );
}
@@ -1697,6 +1810,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::resetEvent( VULKAN_HPP_NAMESPACE::Event event,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkResetEvent( m_device, static_cast<VkEvent>( event ) ) );
}
#else
@@ -1704,6 +1818,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::resetEvent( VULKAN_HPP_NAMESPACE::Event event,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkResetEvent( m_device, static_cast<VkEvent>( event ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetEvent" );
}
@@ -1716,6 +1831,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::QueryPool * pQueryPool,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateQueryPool( m_device,
reinterpret_cast<const VkQueryPoolCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -1730,6 +1846,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::QueryPool queryPool;
Result result = static_cast<Result>(
d.vkCreateQueryPool( m_device,
@@ -1748,6 +1865,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::QueryPool queryPool;
Result result = static_cast<Result>(
d.vkCreateQueryPool( m_device,
@@ -1767,6 +1885,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyQueryPool(
m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -1777,6 +1896,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyQueryPool( m_device,
static_cast<VkQueryPool>( queryPool ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -1789,6 +1909,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyQueryPool(
m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -1799,6 +1920,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyQueryPool( m_device,
static_cast<VkQueryPool>( queryPool ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -1817,6 +1939,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::QueryResultFlags flags,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetQueryPoolResults( m_device,
static_cast<VkQueryPool>( queryPool ),
firstQuery,
@@ -1839,6 +1962,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::QueryResultFlags flags,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkGetQueryPoolResults( m_device,
static_cast<VkQueryPool>( queryPool ),
firstQuery,
@@ -1862,6 +1986,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::QueryResultFlags flags,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_ASSERT( dataSize % sizeof( T ) == 0 );
std::vector<T, Allocator> data( dataSize / sizeof( T ) );
Result result = static_cast<Result>( d.vkGetQueryPoolResults( m_device,
@@ -1887,6 +2012,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::QueryResultFlags flags,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
T data;
Result result = static_cast<Result>( d.vkGetQueryPoolResults( m_device,
static_cast<VkQueryPool>( queryPool ),
@@ -1910,6 +2036,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Buffer * pBuffer,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateBuffer( m_device,
reinterpret_cast<const VkBufferCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -1923,6 +2050,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Buffer buffer;
Result result = static_cast<Result>(
d.vkCreateBuffer( m_device,
@@ -1941,6 +2069,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Buffer buffer;
Result result = static_cast<Result>(
d.vkCreateBuffer( m_device,
@@ -1960,6 +2089,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyBuffer(
m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -1970,6 +2100,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyBuffer( m_device,
static_cast<VkBuffer>( buffer ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -1982,6 +2113,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyBuffer(
m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -1992,6 +2124,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyBuffer( m_device,
static_cast<VkBuffer>( buffer ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -2006,6 +2139,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::BufferView * pView,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateBufferView( m_device,
reinterpret_cast<const VkBufferViewCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -2020,6 +2154,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::BufferView view;
Result result = static_cast<Result>(
d.vkCreateBufferView( m_device,
@@ -2038,6 +2173,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::BufferView view;
Result result = static_cast<Result>(
d.vkCreateBufferView( m_device,
@@ -2057,6 +2193,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyBufferView( m_device,
static_cast<VkBufferView>( bufferView ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -2068,6 +2205,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyBufferView( m_device,
static_cast<VkBufferView>( bufferView ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -2080,6 +2218,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyBufferView( m_device,
static_cast<VkBufferView>( bufferView ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -2091,6 +2230,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyBufferView( m_device,
static_cast<VkBufferView>( bufferView ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -2105,6 +2245,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Image * pImage,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateImage( m_device,
reinterpret_cast<const VkImageCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -2118,6 +2259,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Image image;
Result result = static_cast<Result>(
d.vkCreateImage( m_device,
@@ -2136,6 +2278,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Image image;
Result result = static_cast<Result>(
d.vkCreateImage( m_device,
@@ -2155,6 +2298,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyImage(
m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -2165,6 +2309,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyImage( m_device,
static_cast<VkImage>( image ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -2177,6 +2322,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyImage(
m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -2187,6 +2333,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyImage( m_device,
static_cast<VkImage>( image ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -2200,6 +2347,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SubresourceLayout * pLayout,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetImageSubresourceLayout( m_device,
static_cast<VkImage>( image ),
reinterpret_cast<const VkImageSubresource *>( pSubresource ),
@@ -2213,6 +2361,7 @@ namespace VULKAN_HPP_NAMESPACE
const ImageSubresource & subresource,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SubresourceLayout layout;
d.vkGetImageSubresourceLayout( m_device,
static_cast<VkImage>( image ),
@@ -2229,6 +2378,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ImageView * pView,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateImageView( m_device,
reinterpret_cast<const VkImageViewCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -2243,6 +2393,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ImageView view;
Result result = static_cast<Result>(
d.vkCreateImageView( m_device,
@@ -2261,6 +2412,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ImageView view;
Result result = static_cast<Result>(
d.vkCreateImageView( m_device,
@@ -2280,6 +2432,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyImageView(
m_device, static_cast<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -2290,6 +2443,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyImageView( m_device,
static_cast<VkImageView>( imageView ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -2302,6 +2456,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyImageView(
m_device, static_cast<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -2312,6 +2467,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyImageView( m_device,
static_cast<VkImageView>( imageView ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -2326,6 +2482,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ShaderModule * pShaderModule,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateShaderModule( m_device,
reinterpret_cast<const VkShaderModuleCreateInfo *>( pCreateInfo ),
@@ -2341,6 +2498,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ShaderModule shaderModule;
Result result = static_cast<Result>(
d.vkCreateShaderModule( m_device,
@@ -2359,6 +2517,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ShaderModule shaderModule;
Result result = static_cast<Result>(
d.vkCreateShaderModule( m_device,
@@ -2378,6 +2537,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyShaderModule( m_device,
static_cast<VkShaderModule>( shaderModule ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -2389,6 +2549,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyShaderModule( m_device,
static_cast<VkShaderModule>( shaderModule ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -2401,6 +2562,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyShaderModule( m_device,
static_cast<VkShaderModule>( shaderModule ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -2412,6 +2574,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyShaderModule( m_device,
static_cast<VkShaderModule>( shaderModule ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -2426,6 +2589,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PipelineCache * pPipelineCache,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreatePipelineCache( m_device,
reinterpret_cast<const VkPipelineCacheCreateInfo *>( pCreateInfo ),
@@ -2441,6 +2605,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache;
Result result = static_cast<Result>(
d.vkCreatePipelineCache( m_device,
@@ -2459,6 +2624,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache;
Result result = static_cast<Result>(
d.vkCreatePipelineCache( m_device,
@@ -2478,6 +2644,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPipelineCache( m_device,
static_cast<VkPipelineCache>( pipelineCache ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -2489,6 +2656,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPipelineCache( m_device,
static_cast<VkPipelineCache>( pipelineCache ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -2501,6 +2669,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPipelineCache( m_device,
static_cast<VkPipelineCache>( pipelineCache ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -2512,6 +2681,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPipelineCache( m_device,
static_cast<VkPipelineCache>( pipelineCache ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -2526,6 +2696,7 @@ namespace VULKAN_HPP_NAMESPACE
void * pData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), pDataSize, pData ) );
}
@@ -2535,6 +2706,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t, Uint8_tAllocator>>::type
Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<uint8_t, Uint8_tAllocator> data;
size_t dataSize;
Result result;
@@ -2568,6 +2740,7 @@ namespace VULKAN_HPP_NAMESPACE
Uint8_tAllocator & uint8_tAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<uint8_t, Uint8_tAllocator> data( uint8_tAllocator );
size_t dataSize;
Result result;
@@ -2600,6 +2773,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::PipelineCache * pSrcCaches,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkMergePipelineCaches( m_device,
static_cast<VkPipelineCache>( dstCache ),
srcCacheCount,
@@ -2613,6 +2787,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::PipelineCache> const & srcCaches,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkMergePipelineCaches( m_device,
static_cast<VkPipelineCache>( dstCache ),
@@ -2631,6 +2806,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Pipeline * pPipelines,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateGraphicsPipelines( m_device,
static_cast<VkPipelineCache>( pipelineCache ),
@@ -2649,6 +2825,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<Pipeline, PipelineAllocator> pipelines( createInfos.size() );
Result result = static_cast<Result>(
d.vkCreateGraphicsPipelines( m_device,
@@ -2677,6 +2854,7 @@ namespace VULKAN_HPP_NAMESPACE
PipelineAllocator & pipelineAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<Pipeline, PipelineAllocator> pipelines( createInfos.size(), pipelineAllocator );
Result result = static_cast<Result>(
d.vkCreateGraphicsPipelines( m_device,
@@ -2700,6 +2878,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Pipeline pipeline;
Result result = static_cast<Result>(
d.vkCreateGraphicsPipelines( m_device,
@@ -2725,6 +2904,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<Pipeline, Dispatch>, PipelineAllocator> uniquePipelines;
std::vector<Pipeline> pipelines( createInfos.size() );
Result result = static_cast<Result>(
@@ -2765,6 +2945,7 @@ namespace VULKAN_HPP_NAMESPACE
PipelineAllocator & pipelineAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<Pipeline, Dispatch>, PipelineAllocator> uniquePipelines( pipelineAllocator );
std::vector<Pipeline> pipelines( createInfos.size() );
Result result = static_cast<Result>(
@@ -2799,6 +2980,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Pipeline pipeline;
Result result = static_cast<Result>(
d.vkCreateGraphicsPipelines( m_device,
@@ -2828,6 +3010,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Pipeline * pPipelines,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateComputePipelines( m_device,
static_cast<VkPipelineCache>( pipelineCache ),
@@ -2846,6 +3029,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<Pipeline, PipelineAllocator> pipelines( createInfos.size() );
Result result = static_cast<Result>(
d.vkCreateComputePipelines( m_device,
@@ -2874,6 +3058,7 @@ namespace VULKAN_HPP_NAMESPACE
PipelineAllocator & pipelineAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<Pipeline, PipelineAllocator> pipelines( createInfos.size(), pipelineAllocator );
Result result = static_cast<Result>(
d.vkCreateComputePipelines( m_device,
@@ -2897,6 +3082,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Pipeline pipeline;
Result result = static_cast<Result>(
d.vkCreateComputePipelines( m_device,
@@ -2922,6 +3108,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<Pipeline, Dispatch>, PipelineAllocator> uniquePipelines;
std::vector<Pipeline> pipelines( createInfos.size() );
Result result = static_cast<Result>(
@@ -2962,6 +3149,7 @@ namespace VULKAN_HPP_NAMESPACE
PipelineAllocator & pipelineAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<Pipeline, Dispatch>, PipelineAllocator> uniquePipelines( pipelineAllocator );
std::vector<Pipeline> pipelines( createInfos.size() );
Result result = static_cast<Result>(
@@ -2996,6 +3184,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Pipeline pipeline;
Result result = static_cast<Result>(
d.vkCreateComputePipelines( m_device,
@@ -3021,6 +3210,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPipeline(
m_device, static_cast<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -3031,6 +3221,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPipeline( m_device,
static_cast<VkPipeline>( pipeline ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3043,6 +3234,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPipeline(
m_device, static_cast<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -3053,6 +3245,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPipeline( m_device,
static_cast<VkPipeline>( pipeline ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3067,6 +3260,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PipelineLayout * pPipelineLayout,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreatePipelineLayout( m_device,
reinterpret_cast<const VkPipelineLayoutCreateInfo *>( pCreateInfo ),
@@ -3082,6 +3276,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout;
Result result = static_cast<Result>(
d.vkCreatePipelineLayout( m_device,
@@ -3100,6 +3295,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout;
Result result = static_cast<Result>(
d.vkCreatePipelineLayout( m_device,
@@ -3119,6 +3315,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPipelineLayout( m_device,
static_cast<VkPipelineLayout>( pipelineLayout ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -3130,6 +3327,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPipelineLayout( m_device,
static_cast<VkPipelineLayout>( pipelineLayout ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3142,6 +3340,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPipelineLayout( m_device,
static_cast<VkPipelineLayout>( pipelineLayout ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -3153,6 +3352,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPipelineLayout( m_device,
static_cast<VkPipelineLayout>( pipelineLayout ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3167,6 +3367,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Sampler * pSampler,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateSampler( m_device,
reinterpret_cast<const VkSamplerCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -3181,6 +3382,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Sampler sampler;
Result result = static_cast<Result>(
d.vkCreateSampler( m_device,
@@ -3199,6 +3401,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Sampler sampler;
Result result = static_cast<Result>(
d.vkCreateSampler( m_device,
@@ -3218,6 +3421,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySampler(
m_device, static_cast<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -3228,6 +3432,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySampler( m_device,
static_cast<VkSampler>( sampler ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3240,6 +3445,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySampler(
m_device, static_cast<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -3250,6 +3456,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySampler( m_device,
static_cast<VkSampler>( sampler ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3264,6 +3471,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayout,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateDescriptorSetLayout( m_device,
reinterpret_cast<const VkDescriptorSetLayoutCreateInfo *>( pCreateInfo ),
@@ -3279,6 +3487,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout;
Result result = static_cast<Result>(
d.vkCreateDescriptorSetLayout( m_device,
@@ -3297,6 +3506,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout;
Result result = static_cast<Result>(
d.vkCreateDescriptorSetLayout( m_device,
@@ -3317,6 +3527,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorSetLayout( m_device,
static_cast<VkDescriptorSetLayout>( descriptorSetLayout ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -3329,6 +3540,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorSetLayout( m_device,
static_cast<VkDescriptorSetLayout>( descriptorSetLayout ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3341,6 +3553,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorSetLayout( m_device,
static_cast<VkDescriptorSetLayout>( descriptorSetLayout ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -3352,6 +3565,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorSetLayout( m_device,
static_cast<VkDescriptorSetLayout>( descriptorSetLayout ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3366,6 +3580,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DescriptorPool * pDescriptorPool,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateDescriptorPool( m_device,
reinterpret_cast<const VkDescriptorPoolCreateInfo *>( pCreateInfo ),
@@ -3381,6 +3596,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool;
Result result = static_cast<Result>(
d.vkCreateDescriptorPool( m_device,
@@ -3399,6 +3615,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool;
Result result = static_cast<Result>(
d.vkCreateDescriptorPool( m_device,
@@ -3418,6 +3635,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorPool( m_device,
static_cast<VkDescriptorPool>( descriptorPool ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -3429,6 +3647,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorPool( m_device,
static_cast<VkDescriptorPool>( descriptorPool ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3441,6 +3660,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorPool( m_device,
static_cast<VkDescriptorPool>( descriptorPool ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -3452,6 +3672,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorPool( m_device,
static_cast<VkDescriptorPool>( descriptorPool ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3465,6 +3686,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkResetDescriptorPool(
m_device, static_cast<VkDescriptorPool>( descriptorPool ), static_cast<VkDescriptorPoolResetFlags>( flags ) ) );
}
@@ -3475,6 +3697,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkResetDescriptorPool(
m_device, static_cast<VkDescriptorPool>( descriptorPool ), static_cast<VkDescriptorPoolResetFlags>( flags ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetDescriptorPool" );
@@ -3487,6 +3710,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkAllocateDescriptorSets( m_device,
reinterpret_cast<const VkDescriptorSetAllocateInfo *>( pAllocateInfo ),
@@ -3499,6 +3723,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<DescriptorSet, DescriptorSetAllocator>>::type
Device::allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DescriptorSet, DescriptorSetAllocator> descriptorSets( allocateInfo.descriptorSetCount );
Result result = static_cast<Result>(
d.vkAllocateDescriptorSets( m_device,
@@ -3517,6 +3742,7 @@ namespace VULKAN_HPP_NAMESPACE
DescriptorSetAllocator & descriptorSetAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DescriptorSet, DescriptorSetAllocator> descriptorSets( allocateInfo.descriptorSetCount,
descriptorSetAllocator );
Result result = static_cast<Result>(
@@ -3532,6 +3758,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<UniqueHandle<DescriptorSet, Dispatch>, DescriptorSetAllocator>>::type
Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<DescriptorSet, Dispatch>, DescriptorSetAllocator> uniqueDescriptorSets;
std::vector<DescriptorSet> descriptorSets( allocateInfo.descriptorSetCount );
Result result = static_cast<Result>(
@@ -3562,6 +3789,7 @@ namespace VULKAN_HPP_NAMESPACE
DescriptorSetAllocator & descriptorSetAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<DescriptorSet, Dispatch>, DescriptorSetAllocator> uniqueDescriptorSets(
descriptorSetAllocator );
std::vector<DescriptorSet> descriptorSets( allocateInfo.descriptorSetCount );
@@ -3590,6 +3818,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkFreeDescriptorSets( m_device,
static_cast<VkDescriptorPool>( descriptorPool ),
@@ -3604,6 +3833,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::DescriptorSet> const & descriptorSets,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkFreeDescriptorSets( m_device,
static_cast<VkDescriptorPool>( descriptorPool ),
@@ -3619,6 +3849,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkFreeDescriptorSets( m_device,
static_cast<VkDescriptorPool>( descriptorPool ),
@@ -3633,6 +3864,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::DescriptorSet> const & descriptorSets,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkFreeDescriptorSets( m_device,
static_cast<VkDescriptorPool>( descriptorPool ),
@@ -3650,6 +3882,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::CopyDescriptorSet * pDescriptorCopies,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkUpdateDescriptorSets( m_device,
descriptorWriteCount,
reinterpret_cast<const VkWriteDescriptorSet *>( pDescriptorWrites ),
@@ -3664,6 +3897,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::CopyDescriptorSet> const & descriptorCopies,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkUpdateDescriptorSets( m_device,
descriptorWrites.size(),
reinterpret_cast<const VkWriteDescriptorSet *>( descriptorWrites.data() ),
@@ -3679,6 +3913,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Framebuffer * pFramebuffer,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateFramebuffer( m_device,
reinterpret_cast<const VkFramebufferCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -3693,6 +3928,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Framebuffer framebuffer;
Result result = static_cast<Result>(
d.vkCreateFramebuffer( m_device,
@@ -3711,6 +3947,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Framebuffer framebuffer;
Result result = static_cast<Result>(
d.vkCreateFramebuffer( m_device,
@@ -3730,6 +3967,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyFramebuffer( m_device,
static_cast<VkFramebuffer>( framebuffer ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -3741,6 +3979,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyFramebuffer( m_device,
static_cast<VkFramebuffer>( framebuffer ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3753,6 +3992,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyFramebuffer( m_device,
static_cast<VkFramebuffer>( framebuffer ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -3764,6 +4004,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyFramebuffer( m_device,
static_cast<VkFramebuffer>( framebuffer ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3778,6 +4019,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateRenderPass( m_device,
reinterpret_cast<const VkRenderPassCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -3792,6 +4034,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::RenderPass renderPass;
Result result = static_cast<Result>(
d.vkCreateRenderPass( m_device,
@@ -3810,6 +4053,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::RenderPass renderPass;
Result result = static_cast<Result>(
d.vkCreateRenderPass( m_device,
@@ -3829,6 +4073,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyRenderPass( m_device,
static_cast<VkRenderPass>( renderPass ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -3840,6 +4085,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyRenderPass( m_device,
static_cast<VkRenderPass>( renderPass ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3852,6 +4098,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyRenderPass( m_device,
static_cast<VkRenderPass>( renderPass ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -3863,6 +4110,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyRenderPass( m_device,
static_cast<VkRenderPass>( renderPass ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3875,6 +4123,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Extent2D * pGranularity,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetRenderAreaGranularity(
m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<VkExtent2D *>( pGranularity ) );
}
@@ -3885,6 +4134,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getRenderAreaGranularity( VULKAN_HPP_NAMESPACE::RenderPass renderPass,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Extent2D granularity;
d.vkGetRenderAreaGranularity(
m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<VkExtent2D *>( &granularity ) );
@@ -3899,6 +4149,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::CommandPool * pCommandPool,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateCommandPool( m_device,
reinterpret_cast<const VkCommandPoolCreateInfo *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -3913,6 +4164,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::CommandPool commandPool;
Result result = static_cast<Result>(
d.vkCreateCommandPool( m_device,
@@ -3931,6 +4183,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::CommandPool commandPool;
Result result = static_cast<Result>(
d.vkCreateCommandPool( m_device,
@@ -3950,6 +4203,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyCommandPool( m_device,
static_cast<VkCommandPool>( commandPool ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -3961,6 +4215,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyCommandPool( m_device,
static_cast<VkCommandPool>( commandPool ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3973,6 +4228,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyCommandPool( m_device,
static_cast<VkCommandPool>( commandPool ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -3984,6 +4240,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyCommandPool( m_device,
static_cast<VkCommandPool>( commandPool ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -3998,6 +4255,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkResetCommandPool(
m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolResetFlags>( flags ) ) );
}
@@ -4008,6 +4266,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkResetCommandPool(
m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolResetFlags>( flags ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetCommandPool" );
@@ -4020,6 +4279,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkAllocateCommandBuffers( m_device,
reinterpret_cast<const VkCommandBufferAllocateInfo *>( pAllocateInfo ),
@@ -4032,6 +4292,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<CommandBuffer, CommandBufferAllocator>>::type
Device::allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<CommandBuffer, CommandBufferAllocator> commandBuffers( allocateInfo.commandBufferCount );
Result result = static_cast<Result>(
d.vkAllocateCommandBuffers( m_device,
@@ -4050,6 +4311,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBufferAllocator & commandBufferAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<CommandBuffer, CommandBufferAllocator> commandBuffers( allocateInfo.commandBufferCount,
commandBufferAllocator );
Result result = static_cast<Result>(
@@ -4065,6 +4327,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<UniqueHandle<CommandBuffer, Dispatch>, CommandBufferAllocator>>::type
Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<CommandBuffer, Dispatch>, CommandBufferAllocator> uniqueCommandBuffers;
std::vector<CommandBuffer> commandBuffers( allocateInfo.commandBufferCount );
Result result = static_cast<Result>(
@@ -4095,6 +4358,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBufferAllocator & commandBufferAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<CommandBuffer, Dispatch>, CommandBufferAllocator> uniqueCommandBuffers(
commandBufferAllocator );
std::vector<CommandBuffer> commandBuffers( allocateInfo.commandBufferCount );
@@ -4123,6 +4387,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkFreeCommandBuffers( m_device,
static_cast<VkCommandPool>( commandPool ),
commandBufferCount,
@@ -4136,6 +4401,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::CommandBuffer> const & commandBuffers,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkFreeCommandBuffers( m_device,
static_cast<VkCommandPool>( commandPool ),
commandBuffers.size(),
@@ -4149,6 +4415,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkFreeCommandBuffers( m_device,
static_cast<VkCommandPool>( commandPool ),
commandBufferCount,
@@ -4161,6 +4428,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::CommandBuffer> const & commandBuffers,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkFreeCommandBuffers( m_device,
static_cast<VkCommandPool>( commandPool ),
commandBuffers.size(),
@@ -4172,6 +4440,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::begin(
const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo * pBeginInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast<const VkCommandBufferBeginInfo *>( pBeginInfo ) ) );
}
@@ -4181,6 +4450,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
CommandBuffer::begin( const CommandBufferBeginInfo & beginInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast<const VkCommandBufferBeginInfo *>( &beginInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::begin" );
@@ -4191,6 +4461,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::end( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkEndCommandBuffer( m_commandBuffer ) );
}
#else
@@ -4198,6 +4469,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
CommandBuffer::end( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkEndCommandBuffer( m_commandBuffer ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::end" );
}
@@ -4208,6 +4480,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::reset(
VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkResetCommandBuffer( m_commandBuffer, static_cast<VkCommandBufferResetFlags>( flags ) ) );
}
@@ -4216,6 +4489,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<void>::type
CommandBuffer::reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkResetCommandBuffer( m_commandBuffer, static_cast<VkCommandBufferResetFlags>( flags ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::reset" );
@@ -4227,6 +4501,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Pipeline pipeline,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBindPipeline(
m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipeline>( pipeline ) );
}
@@ -4237,6 +4512,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::Viewport * pViewports,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetViewport(
m_commandBuffer, firstViewport, viewportCount, reinterpret_cast<const VkViewport *>( pViewports ) );
}
@@ -4247,6 +4523,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::Viewport> const & viewports,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetViewport(
m_commandBuffer, firstViewport, viewports.size(), reinterpret_cast<const VkViewport *>( viewports.data() ) );
}
@@ -4258,6 +4535,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::Rect2D * pScissors,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetScissor( m_commandBuffer, firstScissor, scissorCount, reinterpret_cast<const VkRect2D *>( pScissors ) );
}
@@ -4267,6 +4545,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::Rect2D> const & scissors,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetScissor(
m_commandBuffer, firstScissor, scissors.size(), reinterpret_cast<const VkRect2D *>( scissors.data() ) );
}
@@ -4275,6 +4554,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch>
VULKAN_HPP_INLINE void CommandBuffer::setLineWidth( float lineWidth, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetLineWidth( m_commandBuffer, lineWidth );
}
@@ -4284,6 +4564,7 @@ namespace VULKAN_HPP_NAMESPACE
float depthBiasSlopeFactor,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetDepthBias( m_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor );
}
@@ -4291,6 +4572,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setBlendConstants( const float blendConstants[4],
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetBlendConstants( m_commandBuffer, blendConstants );
}
@@ -4299,6 +4581,7 @@ namespace VULKAN_HPP_NAMESPACE
float maxDepthBounds,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds );
}
@@ -4307,6 +4590,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t compareMask,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetStencilCompareMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), compareMask );
}
@@ -4315,6 +4599,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t writeMask,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetStencilWriteMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), writeMask );
}
@@ -4323,6 +4608,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t reference,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetStencilReference( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), reference );
}
@@ -4336,6 +4622,7 @@ namespace VULKAN_HPP_NAMESPACE
const uint32_t * pDynamicOffsets,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBindDescriptorSets( m_commandBuffer,
static_cast<VkPipelineBindPoint>( pipelineBindPoint ),
static_cast<VkPipelineLayout>( layout ),
@@ -4356,6 +4643,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const uint32_t> const & dynamicOffsets,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBindDescriptorSets( m_commandBuffer,
static_cast<VkPipelineBindPoint>( pipelineBindPoint ),
static_cast<VkPipelineLayout>( layout ),
@@ -4373,6 +4661,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::IndexType indexType,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBindIndexBuffer( m_commandBuffer,
static_cast<VkBuffer>( buffer ),
static_cast<VkDeviceSize>( offset ),
@@ -4386,6 +4675,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBindVertexBuffers( m_commandBuffer,
firstBinding,
bindingCount,
@@ -4401,6 +4691,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> const & offsets,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
# ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( buffers.size() == offsets.size() );
# else
@@ -4426,6 +4717,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t firstInstance,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDraw( m_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance );
}
@@ -4437,6 +4729,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t firstInstance,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawIndexed( m_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance );
}
@@ -4447,6 +4740,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t stride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawIndirect(
m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), drawCount, stride );
}
@@ -4458,6 +4752,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t stride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawIndexedIndirect(
m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), drawCount, stride );
}
@@ -4468,6 +4763,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t groupCountZ,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDispatch( m_commandBuffer, groupCountX, groupCountY, groupCountZ );
}
@@ -4476,6 +4772,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceSize offset,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDispatchIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ) );
}
@@ -4486,6 +4783,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::BufferCopy * pRegions,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyBuffer( m_commandBuffer,
static_cast<VkBuffer>( srcBuffer ),
static_cast<VkBuffer>( dstBuffer ),
@@ -4500,6 +4798,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::BufferCopy> const & regions,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyBuffer( m_commandBuffer,
static_cast<VkBuffer>( srcBuffer ),
static_cast<VkBuffer>( dstBuffer ),
@@ -4517,6 +4816,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ImageCopy * pRegions,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyImage( m_commandBuffer,
static_cast<VkImage>( srcImage ),
static_cast<VkImageLayout>( srcImageLayout ),
@@ -4535,6 +4835,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageCopy> const & regions,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyImage( m_commandBuffer,
static_cast<VkImage>( srcImage ),
static_cast<VkImageLayout>( srcImageLayout ),
@@ -4555,6 +4856,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Filter filter,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBlitImage( m_commandBuffer,
static_cast<VkImage>( srcImage ),
static_cast<VkImageLayout>( srcImageLayout ),
@@ -4575,6 +4877,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Filter filter,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBlitImage( m_commandBuffer,
static_cast<VkImage>( srcImage ),
static_cast<VkImageLayout>( srcImageLayout ),
@@ -4594,6 +4897,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::BufferImageCopy * pRegions,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyBufferToImage( m_commandBuffer,
static_cast<VkBuffer>( srcBuffer ),
static_cast<VkImage>( dstImage ),
@@ -4611,6 +4915,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::BufferImageCopy> const & regions,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyBufferToImage( m_commandBuffer,
static_cast<VkBuffer>( srcBuffer ),
static_cast<VkImage>( dstImage ),
@@ -4628,6 +4933,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::BufferImageCopy * pRegions,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyImageToBuffer( m_commandBuffer,
static_cast<VkImage>( srcImage ),
static_cast<VkImageLayout>( srcImageLayout ),
@@ -4645,6 +4951,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::BufferImageCopy> const & regions,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyImageToBuffer( m_commandBuffer,
static_cast<VkImage>( srcImage ),
static_cast<VkImageLayout>( srcImageLayout ),
@@ -4661,6 +4968,7 @@ namespace VULKAN_HPP_NAMESPACE
const void * pData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdUpdateBuffer( m_commandBuffer,
static_cast<VkBuffer>( dstBuffer ),
static_cast<VkDeviceSize>( dstOffset ),
@@ -4675,6 +4983,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const T> const & data,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdUpdateBuffer( m_commandBuffer,
static_cast<VkBuffer>( dstBuffer ),
static_cast<VkDeviceSize>( dstOffset ),
@@ -4690,6 +4999,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t data,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdFillBuffer( m_commandBuffer,
static_cast<VkBuffer>( dstBuffer ),
static_cast<VkDeviceSize>( dstOffset ),
@@ -4705,6 +5015,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ImageSubresourceRange * pRanges,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdClearColorImage( m_commandBuffer,
static_cast<VkImage>( image ),
static_cast<VkImageLayout>( imageLayout ),
@@ -4722,6 +5033,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageSubresourceRange> const & ranges,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdClearColorImage( m_commandBuffer,
static_cast<VkImage>( image ),
static_cast<VkImageLayout>( imageLayout ),
@@ -4740,6 +5052,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ImageSubresourceRange * pRanges,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdClearDepthStencilImage( m_commandBuffer,
static_cast<VkImage>( image ),
static_cast<VkImageLayout>( imageLayout ),
@@ -4757,6 +5070,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageSubresourceRange> const & ranges,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdClearDepthStencilImage( m_commandBuffer,
static_cast<VkImage>( image ),
static_cast<VkImageLayout>( imageLayout ),
@@ -4773,6 +5087,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ClearRect * pRects,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdClearAttachments( m_commandBuffer,
attachmentCount,
reinterpret_cast<const VkClearAttachment *>( pAttachments ),
@@ -4787,6 +5102,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::ClearRect> const & rects,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdClearAttachments( m_commandBuffer,
attachments.size(),
reinterpret_cast<const VkClearAttachment *>( attachments.data() ),
@@ -4804,6 +5120,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ImageResolve * pRegions,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdResolveImage( m_commandBuffer,
static_cast<VkImage>( srcImage ),
static_cast<VkImageLayout>( srcImageLayout ),
@@ -4823,6 +5140,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageResolve> const & regions,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdResolveImage( m_commandBuffer,
static_cast<VkImage>( srcImage ),
static_cast<VkImageLayout>( srcImageLayout ),
@@ -4838,6 +5156,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) );
}
@@ -4846,6 +5165,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdResetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) );
}
@@ -4863,6 +5183,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier * pImageMemoryBarriers,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdWaitEvents( m_commandBuffer,
eventCount,
reinterpret_cast<const VkEvent *>( pEvents ),
@@ -4887,6 +5208,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier> const & imageMemoryBarriers,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdWaitEvents( m_commandBuffer,
events.size(),
reinterpret_cast<const VkEvent *>( events.data() ),
@@ -4914,6 +5236,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier * pImageMemoryBarriers,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdPipelineBarrier( m_commandBuffer,
static_cast<VkPipelineStageFlags>( srcStageMask ),
static_cast<VkPipelineStageFlags>( dstStageMask ),
@@ -4937,6 +5260,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier> const & imageMemoryBarriers,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdPipelineBarrier( m_commandBuffer,
static_cast<VkPipelineStageFlags>( srcStageMask ),
static_cast<VkPipelineStageFlags>( dstStageMask ),
@@ -4956,6 +5280,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::QueryControlFlags flags,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginQuery(
m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, static_cast<VkQueryControlFlags>( flags ) );
}
@@ -4965,6 +5290,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t query,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEndQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query );
}
@@ -4974,6 +5300,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t queryCount,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdResetQueryPool( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount );
}
@@ -4983,6 +5310,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t query,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdWriteTimestamp( m_commandBuffer,
static_cast<VkPipelineStageFlagBits>( pipelineStage ),
static_cast<VkQueryPool>( queryPool ),
@@ -4999,6 +5327,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::QueryResultFlags flags,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyQueryPoolResults( m_commandBuffer,
static_cast<VkQueryPool>( queryPool ),
firstQuery,
@@ -5017,6 +5346,7 @@ namespace VULKAN_HPP_NAMESPACE
const void * pValues,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdPushConstants( m_commandBuffer,
static_cast<VkPipelineLayout>( layout ),
static_cast<VkShaderStageFlags>( stageFlags ),
@@ -5033,6 +5363,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const T> const & values,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdPushConstants( m_commandBuffer,
static_cast<VkPipelineLayout>( layout ),
static_cast<VkShaderStageFlags>( stageFlags ),
@@ -5048,6 +5379,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SubpassContents contents,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginRenderPass( m_commandBuffer,
reinterpret_cast<const VkRenderPassBeginInfo *>( pRenderPassBegin ),
static_cast<VkSubpassContents>( contents ) );
@@ -5059,6 +5391,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SubpassContents contents,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginRenderPass( m_commandBuffer,
reinterpret_cast<const VkRenderPassBeginInfo *>( &renderPassBegin ),
static_cast<VkSubpassContents>( contents ) );
@@ -5069,12 +5402,14 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( VULKAN_HPP_NAMESPACE::SubpassContents contents,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdNextSubpass( m_commandBuffer, static_cast<VkSubpassContents>( contents ) );
}
template <typename Dispatch>
VULKAN_HPP_INLINE void CommandBuffer::endRenderPass( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEndRenderPass( m_commandBuffer );
}
@@ -5083,6 +5418,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdExecuteCommands(
m_commandBuffer, commandBufferCount, reinterpret_cast<const VkCommandBuffer *>( pCommandBuffers ) );
}
@@ -5093,6 +5429,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::executeCommands( ArrayProxy<const VULKAN_HPP_NAMESPACE::CommandBuffer> const & commandBuffers,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdExecuteCommands(
m_commandBuffer, commandBuffers.size(), reinterpret_cast<const VkCommandBuffer *>( commandBuffers.data() ) );
}
@@ -5104,6 +5441,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result enumerateInstanceVersion( uint32_t * pApiVersion,
Dispatch const & d ) VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkEnumerateInstanceVersion( pApiVersion ) );
}
@@ -5111,6 +5449,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch>
VULKAN_HPP_INLINE typename ResultValueType<uint32_t>::type enumerateInstanceVersion( Dispatch const & d )
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
uint32_t apiVersion;
Result result = static_cast<Result>( d.vkEnumerateInstanceVersion( &apiVersion ) );
return createResultValue( result, apiVersion, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceVersion" );
@@ -5123,6 +5462,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo * pBindInfos,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkBindBufferMemory2(
m_device, bindInfoCount, reinterpret_cast<const VkBindBufferMemoryInfo *>( pBindInfos ) ) );
}
@@ -5133,6 +5473,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::bindBufferMemory2( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo> const & bindInfos,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkBindBufferMemory2(
m_device, bindInfos.size(), reinterpret_cast<const VkBindBufferMemoryInfo *>( bindInfos.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2" );
@@ -5145,6 +5486,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo * pBindInfos,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkBindImageMemory2( m_device, bindInfoCount, reinterpret_cast<const VkBindImageMemoryInfo *>( pBindInfos ) ) );
}
@@ -5155,6 +5497,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::bindImageMemory2( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo> const & bindInfos,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkBindImageMemory2(
m_device, bindInfos.size(), reinterpret_cast<const VkBindImageMemoryInfo *>( bindInfos.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2" );
@@ -5169,6 +5512,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags * pPeerMemoryFeatures,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetDeviceGroupPeerMemoryFeatures( m_device,
heapIndex,
localDeviceIndex,
@@ -5184,6 +5528,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t remoteDeviceIndex,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags peerMemoryFeatures;
d.vkGetDeviceGroupPeerMemoryFeatures( m_device,
heapIndex,
@@ -5198,6 +5543,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setDeviceMask( uint32_t deviceMask,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetDeviceMask( m_commandBuffer, deviceMask );
}
@@ -5210,6 +5556,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t groupCountZ,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDispatchBase( m_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ );
}
@@ -5219,6 +5566,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkEnumeratePhysicalDeviceGroups(
m_instance,
pPhysicalDeviceGroupCount,
@@ -5231,6 +5579,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<PhysicalDeviceGroupProperties, PhysicalDeviceGroupPropertiesAllocator>>::type
Instance::enumeratePhysicalDeviceGroups( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PhysicalDeviceGroupProperties, PhysicalDeviceGroupPropertiesAllocator> physicalDeviceGroupProperties;
uint32_t physicalDeviceGroupCount;
Result result;
@@ -5266,6 +5615,7 @@ namespace VULKAN_HPP_NAMESPACE
Instance::enumeratePhysicalDeviceGroups(
PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PhysicalDeviceGroupProperties, PhysicalDeviceGroupPropertiesAllocator> physicalDeviceGroupProperties(
physicalDeviceGroupPropertiesAllocator );
uint32_t physicalDeviceGroupCount;
@@ -5299,6 +5649,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetImageMemoryRequirements2( m_device,
reinterpret_cast<const VkImageMemoryRequirementsInfo2 *>( pInfo ),
reinterpret_cast<VkMemoryRequirements2 *>( pMemoryRequirements ) );
@@ -5310,6 +5661,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements;
d.vkGetImageMemoryRequirements2( m_device,
reinterpret_cast<const VkImageMemoryRequirementsInfo2 *>( &info ),
@@ -5322,6 +5674,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getImageMemoryRequirements2( const ImageMemoryRequirementsInfo2 & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements =
structureChain.template get<VULKAN_HPP_NAMESPACE::MemoryRequirements2>();
@@ -5338,6 +5691,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetBufferMemoryRequirements2( m_device,
reinterpret_cast<const VkBufferMemoryRequirementsInfo2 *>( pInfo ),
reinterpret_cast<VkMemoryRequirements2 *>( pMemoryRequirements ) );
@@ -5349,6 +5703,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements;
d.vkGetBufferMemoryRequirements2( m_device,
reinterpret_cast<const VkBufferMemoryRequirementsInfo2 *>( &info ),
@@ -5361,6 +5716,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getBufferMemoryRequirements2( const BufferMemoryRequirementsInfo2 & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements =
structureChain.template get<VULKAN_HPP_NAMESPACE::MemoryRequirements2>();
@@ -5378,6 +5734,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetImageSparseMemoryRequirements2(
m_device,
reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2 *>( pInfo ),
@@ -5392,6 +5749,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getImageSparseMemoryRequirements2( const ImageSparseMemoryRequirementsInfo2 & info,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SparseImageMemoryRequirements2, SparseImageMemoryRequirements2Allocator> sparseMemoryRequirements;
uint32_t sparseMemoryRequirementCount;
d.vkGetImageSparseMemoryRequirements2( m_device,
@@ -5420,6 +5778,7 @@ namespace VULKAN_HPP_NAMESPACE
SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SparseImageMemoryRequirements2, SparseImageMemoryRequirements2Allocator> sparseMemoryRequirements(
sparseImageMemoryRequirements2Allocator );
uint32_t sparseMemoryRequirementCount;
@@ -5442,6 +5801,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 * pFeatures,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2 *>( pFeatures ) );
}
@@ -5450,6 +5810,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2
PhysicalDevice::getFeatures2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features;
d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2 *>( &features ) );
return features;
@@ -5459,6 +5820,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain<X, Y, Z...>
PhysicalDevice::getFeatures2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 & features =
structureChain.template get<VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2>();
@@ -5471,6 +5833,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void PhysicalDevice::getProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceProperties2( m_physicalDevice,
reinterpret_cast<VkPhysicalDeviceProperties2 *>( pProperties ) );
}
@@ -5480,6 +5843,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2
PhysicalDevice::getProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties;
d.vkGetPhysicalDeviceProperties2( m_physicalDevice,
reinterpret_cast<VkPhysicalDeviceProperties2 *>( &properties ) );
@@ -5490,6 +5854,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain<X, Y, Z...>
PhysicalDevice::getProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 & properties =
structureChain.template get<VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2>();
@@ -5505,6 +5870,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::FormatProperties2 * pFormatProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceFormatProperties2(
m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2 *>( pFormatProperties ) );
}
@@ -5515,6 +5881,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties;
d.vkGetPhysicalDeviceFormatProperties2(
m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2 *>( &formatProperties ) );
@@ -5526,6 +5893,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::FormatProperties2 & formatProperties =
structureChain.template get<VULKAN_HPP_NAMESPACE::FormatProperties2>();
@@ -5541,6 +5909,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ImageFormatProperties2 * pImageFormatProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2 *>( pImageFormatInfo ),
@@ -5554,6 +5923,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2(
m_physicalDevice,
@@ -5568,6 +5938,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getImageFormatProperties2( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties =
structureChain.template get<VULKAN_HPP_NAMESPACE::ImageFormatProperties2>();
@@ -5586,6 +5957,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceQueueFamilyProperties2(
m_physicalDevice,
pQueueFamilyPropertyCount,
@@ -5597,6 +5969,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
PhysicalDevice::getQueueFamilyProperties2( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator> queueFamilyProperties;
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
@@ -5617,6 +5990,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getQueueFamilyProperties2( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator> queueFamilyProperties(
queueFamilyProperties2Allocator );
uint32_t queueFamilyPropertyCount;
@@ -5634,6 +6008,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<StructureChain, StructureChainAllocator>
PhysicalDevice::getQueueFamilyProperties2( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
std::vector<StructureChain, StructureChainAllocator> returnVector( queueFamilyPropertyCount );
@@ -5664,6 +6039,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getQueueFamilyProperties2( StructureChainAllocator & structureChainAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
std::vector<StructureChain, StructureChainAllocator> returnVector( queueFamilyPropertyCount,
@@ -5692,6 +6068,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getMemoryProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 * pMemoryProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceMemoryProperties2(
m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2 *>( pMemoryProperties ) );
}
@@ -5701,6 +6078,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2
PhysicalDevice::getMemoryProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties;
d.vkGetPhysicalDeviceMemoryProperties2(
m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2 *>( &memoryProperties ) );
@@ -5711,6 +6089,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain<X, Y, Z...>
PhysicalDevice::getMemoryProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 & memoryProperties =
structureChain.template get<VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2>();
@@ -5727,6 +6106,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceSparseImageFormatProperties2(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2 *>( pFormatInfo ),
@@ -5741,6 +6121,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getSparseImageFormatProperties2( const PhysicalDeviceSparseImageFormatInfo2 & formatInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SparseImageFormatProperties2, SparseImageFormatProperties2Allocator> properties;
uint32_t propertyCount;
d.vkGetPhysicalDeviceSparseImageFormatProperties2(
@@ -5770,6 +6151,7 @@ namespace VULKAN_HPP_NAMESPACE
SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SparseImageFormatProperties2, SparseImageFormatProperties2Allocator> properties(
sparseImageFormatProperties2Allocator );
uint32_t propertyCount;
@@ -5794,6 +6176,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkTrimCommandPool(
m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolTrimFlags>( flags ) );
}
@@ -5803,6 +6186,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Queue * pQueue,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetDeviceQueue2(
m_device, reinterpret_cast<const VkDeviceQueueInfo2 *>( pQueueInfo ), reinterpret_cast<VkQueue *>( pQueue ) );
}
@@ -5812,6 +6196,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Queue
Device::getQueue2( const DeviceQueueInfo2 & queueInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Queue queue;
d.vkGetDeviceQueue2(
m_device, reinterpret_cast<const VkDeviceQueueInfo2 *>( &queueInfo ), reinterpret_cast<VkQueue *>( &queue ) );
@@ -5826,6 +6211,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion * pYcbcrConversion,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateSamplerYcbcrConversion( m_device,
reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo *>( pCreateInfo ),
@@ -5841,6 +6227,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion;
Result result = static_cast<Result>(
d.vkCreateSamplerYcbcrConversion( m_device,
@@ -5860,6 +6247,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion;
Result result = static_cast<Result>(
d.vkCreateSamplerYcbcrConversion( m_device,
@@ -5880,6 +6268,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySamplerYcbcrConversion( m_device,
static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -5892,6 +6281,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySamplerYcbcrConversion(
m_device,
static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ),
@@ -5905,6 +6295,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySamplerYcbcrConversion( m_device,
static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -5916,6 +6307,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySamplerYcbcrConversion(
m_device,
static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ),
@@ -5931,6 +6323,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate * pDescriptorUpdateTemplate,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateDescriptorUpdateTemplate(
m_device,
reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo *>( pCreateInfo ),
@@ -5946,6 +6339,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate;
Result result = static_cast<Result>( d.vkCreateDescriptorUpdateTemplate(
m_device,
@@ -5965,6 +6359,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate;
Result result = static_cast<Result>( d.vkCreateDescriptorUpdateTemplate(
m_device,
@@ -5988,6 +6383,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorUpdateTemplate( m_device,
static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -6000,6 +6396,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorUpdateTemplate(
m_device,
static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ),
@@ -6013,6 +6410,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorUpdateTemplate( m_device,
static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -6024,6 +6422,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorUpdateTemplate(
m_device,
static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ),
@@ -6039,6 +6438,7 @@ namespace VULKAN_HPP_NAMESPACE
const void * pData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkUpdateDescriptorSetWithTemplate( m_device,
static_cast<VkDescriptorSet>( descriptorSet ),
static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ),
@@ -6051,6 +6451,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ExternalBufferProperties * pExternalBufferProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceExternalBufferProperties(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceExternalBufferInfo *>( pExternalBufferInfo ),
@@ -6063,6 +6464,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getExternalBufferProperties( const PhysicalDeviceExternalBufferInfo & externalBufferInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ExternalBufferProperties externalBufferProperties;
d.vkGetPhysicalDeviceExternalBufferProperties(
m_physicalDevice,
@@ -6078,6 +6480,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ExternalFenceProperties * pExternalFenceProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceExternalFenceProperties(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceExternalFenceInfo *>( pExternalFenceInfo ),
@@ -6090,6 +6493,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getExternalFenceProperties( const PhysicalDeviceExternalFenceInfo & externalFenceInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ExternalFenceProperties externalFenceProperties;
d.vkGetPhysicalDeviceExternalFenceProperties(
m_physicalDevice,
@@ -6105,6 +6509,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties * pExternalSemaphoreProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceExternalSemaphoreProperties(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceExternalSemaphoreInfo *>( pExternalSemaphoreInfo ),
@@ -6117,6 +6522,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getExternalSemaphoreProperties( const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties externalSemaphoreProperties;
d.vkGetPhysicalDeviceExternalSemaphoreProperties(
m_physicalDevice,
@@ -6132,6 +6538,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport * pSupport,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetDescriptorSetLayoutSupport( m_device,
reinterpret_cast<const VkDescriptorSetLayoutCreateInfo *>( pCreateInfo ),
reinterpret_cast<VkDescriptorSetLayoutSupport *>( pSupport ) );
@@ -6143,6 +6550,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support;
d.vkGetDescriptorSetLayoutSupport( m_device,
reinterpret_cast<const VkDescriptorSetLayoutCreateInfo *>( &createInfo ),
@@ -6155,6 +6563,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getDescriptorSetLayoutSupport( const DescriptorSetLayoutCreateInfo & createInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport & support =
structureChain.template get<VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport>();
@@ -6176,6 +6585,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t stride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawIndirectCount( m_commandBuffer,
static_cast<VkBuffer>( buffer ),
static_cast<VkDeviceSize>( offset ),
@@ -6194,6 +6604,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t stride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawIndexedIndirectCount( m_commandBuffer,
static_cast<VkBuffer>( buffer ),
static_cast<VkDeviceSize>( offset ),
@@ -6210,6 +6621,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateRenderPass2( m_device,
reinterpret_cast<const VkRenderPassCreateInfo2 *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -6224,6 +6636,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::RenderPass renderPass;
Result result = static_cast<Result>(
d.vkCreateRenderPass2( m_device,
@@ -6242,6 +6655,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::RenderPass renderPass;
Result result = static_cast<Result>(
d.vkCreateRenderPass2( m_device,
@@ -6262,6 +6676,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginRenderPass2( m_commandBuffer,
reinterpret_cast<const VkRenderPassBeginInfo *>( pRenderPassBegin ),
reinterpret_cast<const VkSubpassBeginInfo *>( pSubpassBeginInfo ) );
@@ -6273,6 +6688,7 @@ namespace VULKAN_HPP_NAMESPACE
const SubpassBeginInfo & subpassBeginInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginRenderPass2( m_commandBuffer,
reinterpret_cast<const VkRenderPassBeginInfo *>( &renderPassBegin ),
reinterpret_cast<const VkSubpassBeginInfo *>( &subpassBeginInfo ) );
@@ -6284,6 +6700,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdNextSubpass2( m_commandBuffer,
reinterpret_cast<const VkSubpassBeginInfo *>( pSubpassBeginInfo ),
reinterpret_cast<const VkSubpassEndInfo *>( pSubpassEndInfo ) );
@@ -6295,6 +6712,7 @@ namespace VULKAN_HPP_NAMESPACE
const SubpassEndInfo & subpassEndInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdNextSubpass2( m_commandBuffer,
reinterpret_cast<const VkSubpassBeginInfo *>( &subpassBeginInfo ),
reinterpret_cast<const VkSubpassEndInfo *>( &subpassEndInfo ) );
@@ -6305,6 +6723,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEndRenderPass2( m_commandBuffer, reinterpret_cast<const VkSubpassEndInfo *>( pSubpassEndInfo ) );
}
@@ -6313,6 +6732,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2( const SubpassEndInfo & subpassEndInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEndRenderPass2( m_commandBuffer, reinterpret_cast<const VkSubpassEndInfo *>( &subpassEndInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -6323,6 +6743,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t queryCount,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkResetQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount );
}
@@ -6330,6 +6751,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSemaphoreCounterValue(
VULKAN_HPP_NAMESPACE::Semaphore semaphore, uint64_t * pValue, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetSemaphoreCounterValue( m_device, static_cast<VkSemaphore>( semaphore ), pValue ) );
}
@@ -6339,6 +6761,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<uint64_t>::type
Device::getSemaphoreCounterValue( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
uint64_t value;
Result result =
static_cast<Result>( d.vkGetSemaphoreCounterValue( m_device, static_cast<VkSemaphore>( semaphore ), &value ) );
@@ -6352,6 +6775,7 @@ namespace VULKAN_HPP_NAMESPACE
uint64_t timeout,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkWaitSemaphores( m_device, reinterpret_cast<const VkSemaphoreWaitInfo *>( pWaitInfo ), timeout ) );
}
@@ -6362,6 +6786,7 @@ namespace VULKAN_HPP_NAMESPACE
uint64_t timeout,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkWaitSemaphores( m_device, reinterpret_cast<const VkSemaphoreWaitInfo *>( &waitInfo ), timeout ) );
return createResultValue( result,
@@ -6374,6 +6799,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::signalSemaphore(
const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo * pSignalInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkSignalSemaphore( m_device, reinterpret_cast<const VkSemaphoreSignalInfo *>( pSignalInfo ) ) );
}
@@ -6383,6 +6809,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::signalSemaphore( const SemaphoreSignalInfo & signalInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkSignalSemaphore( m_device, reinterpret_cast<const VkSemaphoreSignalInfo *>( &signalInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphore" );
@@ -6393,6 +6820,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<DeviceAddress>(
d.vkGetBufferDeviceAddress( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo *>( pInfo ) ) );
}
@@ -6402,6 +6830,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddress( const BufferDeviceAddressInfo & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetBufferDeviceAddress( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo *>( &info ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -6410,6 +6839,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddress(
const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetBufferOpaqueCaptureAddress( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo *>( pInfo ) );
}
@@ -6418,6 +6848,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddress( const BufferDeviceAddressInfo & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetBufferOpaqueCaptureAddress( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo *>( &info ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -6427,6 +6858,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo * pInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetDeviceMemoryOpaqueCaptureAddress(
m_device, reinterpret_cast<const VkDeviceMemoryOpaqueCaptureAddressInfo *>( pInfo ) );
}
@@ -6436,6 +6868,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddress( const DeviceMemoryOpaqueCaptureAddressInfo & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetDeviceMemoryOpaqueCaptureAddress(
m_device, reinterpret_cast<const VkDeviceMemoryOpaqueCaptureAddressInfo *>( &info ) );
}
@@ -6448,6 +6881,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySurfaceKHR(
m_instance, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -6458,6 +6892,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySurfaceKHR( m_instance,
static_cast<VkSurfaceKHR>( surface ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -6470,6 +6905,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySurfaceKHR(
m_instance, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -6480,6 +6916,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySurfaceKHR( m_instance,
static_cast<VkSurfaceKHR>( surface ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -6494,6 +6931,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Bool32 * pSupported,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice,
queueFamilyIndex,
static_cast<VkSurfaceKHR>( surface ),
@@ -6507,6 +6945,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR surface,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Bool32 supported;
Result result =
static_cast<Result>( d.vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice,
@@ -6523,6 +6962,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR * pSurfaceCapabilities,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
m_physicalDevice,
static_cast<VkSurfaceKHR>( surface ),
@@ -6535,6 +6975,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR>::type
PhysicalDevice::getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
m_physicalDevice,
@@ -6552,6 +6993,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceFormatKHR * pSurfaceFormats,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice,
static_cast<VkSurfaceKHR>( surface ),
@@ -6565,6 +7007,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<SurfaceFormatKHR, SurfaceFormatKHRAllocator>>::type
PhysicalDevice::getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SurfaceFormatKHR, SurfaceFormatKHRAllocator> surfaceFormats;
uint32_t surfaceFormatCount;
Result result;
@@ -6601,6 +7044,7 @@ namespace VULKAN_HPP_NAMESPACE
SurfaceFormatKHRAllocator & surfaceFormatKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SurfaceFormatKHR, SurfaceFormatKHRAllocator> surfaceFormats( surfaceFormatKHRAllocator );
uint32_t surfaceFormatCount;
Result result;
@@ -6635,6 +7079,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice,
static_cast<VkSurfaceKHR>( surface ),
@@ -6648,6 +7093,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<PresentModeKHR, PresentModeKHRAllocator>>::type
PhysicalDevice::getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PresentModeKHR, PresentModeKHRAllocator> presentModes;
uint32_t presentModeCount;
Result result;
@@ -6684,6 +7130,7 @@ namespace VULKAN_HPP_NAMESPACE
PresentModeKHRAllocator & presentModeKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PresentModeKHR, PresentModeKHRAllocator> presentModes( presentModeKHRAllocator );
uint32_t presentModeCount;
Result result;
@@ -6720,6 +7167,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchain,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateSwapchainKHR( m_device,
reinterpret_cast<const VkSwapchainCreateInfoKHR *>( pCreateInfo ),
@@ -6735,6 +7183,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain;
Result result = static_cast<Result>(
d.vkCreateSwapchainKHR( m_device,
@@ -6753,6 +7202,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain;
Result result = static_cast<Result>(
d.vkCreateSwapchainKHR( m_device,
@@ -6772,6 +7222,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySwapchainKHR( m_device,
static_cast<VkSwapchainKHR>( swapchain ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -6783,6 +7234,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySwapchainKHR( m_device,
static_cast<VkSwapchainKHR>( swapchain ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -6795,6 +7247,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySwapchainKHR( m_device,
static_cast<VkSwapchainKHR>( swapchain ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -6806,6 +7259,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySwapchainKHR( m_device,
static_cast<VkSwapchainKHR>( swapchain ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -6820,6 +7274,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Image * pSwapchainImages,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetSwapchainImagesKHR( m_device,
static_cast<VkSwapchainKHR>( swapchain ),
pSwapchainImageCount,
@@ -6831,6 +7286,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image, ImageAllocator>>::type
Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<Image, ImageAllocator> swapchainImages;
uint32_t swapchainImageCount;
Result result;
@@ -6865,6 +7321,7 @@ namespace VULKAN_HPP_NAMESPACE
ImageAllocator & imageAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<Image, ImageAllocator> swapchainImages( imageAllocator );
uint32_t swapchainImageCount;
Result result;
@@ -6900,6 +7357,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t * pImageIndex,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkAcquireNextImageKHR( m_device,
static_cast<VkSwapchainKHR>( swapchain ),
timeout,
@@ -6917,6 +7375,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Fence fence,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
uint32_t imageIndex;
Result result = static_cast<Result>( d.vkAcquireNextImageKHR( m_device,
static_cast<VkSwapchainKHR>( swapchain ),
@@ -6938,6 +7397,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::presentKHR(
const VULKAN_HPP_NAMESPACE::PresentInfoKHR * pPresentInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkQueuePresentKHR( m_queue, reinterpret_cast<const VkPresentInfoKHR *>( pPresentInfo ) ) );
}
@@ -6947,6 +7407,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR & presentInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkQueuePresentKHR( m_queue, reinterpret_cast<const VkPresentInfoKHR *>( &presentInfo ) ) );
return createResultValue(
@@ -6961,6 +7422,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR * pDeviceGroupPresentCapabilities,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetDeviceGroupPresentCapabilitiesKHR(
m_device, reinterpret_cast<VkDeviceGroupPresentCapabilitiesKHR *>( pDeviceGroupPresentCapabilities ) ) );
}
@@ -6971,6 +7433,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR>::type
Device::getGroupPresentCapabilitiesKHR( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR deviceGroupPresentCapabilities;
Result result = static_cast<Result>( d.vkGetDeviceGroupPresentCapabilitiesKHR(
m_device, reinterpret_cast<VkDeviceGroupPresentCapabilitiesKHR *>( &deviceGroupPresentCapabilities ) ) );
@@ -6985,6 +7448,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR * pModes,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetDeviceGroupSurfacePresentModesKHR( m_device,
static_cast<VkSurfaceKHR>( surface ),
@@ -6997,6 +7461,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR>::type
Device::getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes;
Result result = static_cast<Result>(
d.vkGetDeviceGroupSurfacePresentModesKHR( m_device,
@@ -7013,6 +7478,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Rect2D * pRects,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDevicePresentRectanglesKHR(
m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), pRectCount, reinterpret_cast<VkRect2D *>( pRects ) ) );
}
@@ -7022,6 +7488,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<Rect2D, Rect2DAllocator>>::type
PhysicalDevice::getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<Rect2D, Rect2DAllocator> rects;
uint32_t rectCount;
Result result;
@@ -7056,6 +7523,7 @@ namespace VULKAN_HPP_NAMESPACE
Rect2DAllocator & rect2DAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<Rect2D, Rect2DAllocator> rects( rect2DAllocator );
uint32_t rectCount;
Result result;
@@ -7088,6 +7556,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t * pImageIndex,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkAcquireNextImage2KHR(
m_device, reinterpret_cast<const VkAcquireNextImageInfoKHR *>( pAcquireInfo ), pImageIndex ) );
}
@@ -7097,6 +7566,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue<uint32_t>
Device::acquireNextImage2KHR( const AcquireNextImageInfoKHR & acquireInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
uint32_t imageIndex;
Result result = static_cast<Result>( d.vkAcquireNextImage2KHR(
m_device, reinterpret_cast<const VkAcquireNextImageInfoKHR *>( &acquireInfo ), &imageIndex ) );
@@ -7118,6 +7588,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceDisplayPropertiesKHR(
m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayPropertiesKHR *>( pProperties ) ) );
}
@@ -7128,6 +7599,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<DisplayPropertiesKHR, DisplayPropertiesKHRAllocator>>::type
PhysicalDevice::getDisplayPropertiesKHR( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayPropertiesKHR, DisplayPropertiesKHRAllocator> properties;
uint32_t propertyCount;
Result result;
@@ -7160,6 +7632,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getDisplayPropertiesKHR( DisplayPropertiesKHRAllocator & displayPropertiesKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayPropertiesKHR, DisplayPropertiesKHRAllocator> properties( displayPropertiesKHRAllocator );
uint32_t propertyCount;
Result result;
@@ -7190,6 +7663,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayPlanePropertiesKHR *>( pProperties ) ) );
}
@@ -7200,6 +7674,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<DisplayPlanePropertiesKHR, DisplayPlanePropertiesKHRAllocator>>::type
PhysicalDevice::getDisplayPlanePropertiesKHR( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayPlanePropertiesKHR, DisplayPlanePropertiesKHRAllocator> properties;
uint32_t propertyCount;
Result result;
@@ -7232,6 +7707,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getDisplayPlanePropertiesKHR(
DisplayPlanePropertiesKHRAllocator & displayPlanePropertiesKHRAllocator, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayPlanePropertiesKHR, DisplayPlanePropertiesKHRAllocator> properties(
displayPlanePropertiesKHRAllocator );
uint32_t propertyCount;
@@ -7264,6 +7740,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplays,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetDisplayPlaneSupportedDisplaysKHR(
m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast<VkDisplayKHR *>( pDisplays ) ) );
}
@@ -7273,6 +7750,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayKHR, DisplayKHRAllocator>>::type
PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayKHR, DisplayKHRAllocator> displays;
uint32_t displayCount;
Result result;
@@ -7305,6 +7783,7 @@ namespace VULKAN_HPP_NAMESPACE
DisplayKHRAllocator & displayKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayKHR, DisplayKHRAllocator> displays( displayKHRAllocator );
uint32_t displayCount;
Result result;
@@ -7336,6 +7815,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetDisplayModePropertiesKHR( m_physicalDevice,
static_cast<VkDisplayKHR>( display ),
@@ -7349,6 +7829,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<DisplayModePropertiesKHR, DisplayModePropertiesKHRAllocator>>::type
PhysicalDevice::getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayModePropertiesKHR, DisplayModePropertiesKHRAllocator> properties;
uint32_t propertyCount;
Result result;
@@ -7385,6 +7866,7 @@ namespace VULKAN_HPP_NAMESPACE
DisplayModePropertiesKHRAllocator & displayModePropertiesKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayModePropertiesKHR, DisplayModePropertiesKHRAllocator> properties(
displayModePropertiesKHRAllocator );
uint32_t propertyCount;
@@ -7421,6 +7903,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayModeKHR * pMode,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateDisplayModeKHR( m_physicalDevice,
static_cast<VkDisplayKHR>( display ),
@@ -7438,6 +7921,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DisplayModeKHR mode;
Result result = static_cast<Result>(
d.vkCreateDisplayModeKHR( m_physicalDevice,
@@ -7458,6 +7942,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DisplayModeKHR mode;
Result result = static_cast<Result>(
d.vkCreateDisplayModeKHR( m_physicalDevice,
@@ -7480,6 +7965,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR * pCapabilities,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice,
static_cast<VkDisplayModeKHR>( mode ),
@@ -7495,6 +7981,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t planeIndex,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities;
Result result = static_cast<Result>(
d.vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice,
@@ -7513,6 +8000,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateDisplayPlaneSurfaceKHR( m_instance,
reinterpret_cast<const VkDisplaySurfaceCreateInfoKHR *>( pCreateInfo ),
@@ -7528,6 +8016,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateDisplayPlaneSurfaceKHR( m_instance,
@@ -7546,6 +8035,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateDisplayPlaneSurfaceKHR( m_instance,
@@ -7570,6 +8060,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateSharedSwapchainsKHR( m_device,
swapchainCount,
@@ -7587,6 +8078,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SwapchainKHR, SwapchainKHRAllocator> swapchains( createInfos.size() );
Result result = static_cast<Result>(
d.vkCreateSharedSwapchainsKHR( m_device,
@@ -7610,6 +8102,7 @@ namespace VULKAN_HPP_NAMESPACE
SwapchainKHRAllocator & swapchainKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SwapchainKHR, SwapchainKHRAllocator> swapchains( createInfos.size(), swapchainKHRAllocator );
Result result = static_cast<Result>(
d.vkCreateSharedSwapchainsKHR( m_device,
@@ -7627,6 +8120,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
SwapchainKHR swapchain;
Result result = static_cast<Result>(
d.vkCreateSharedSwapchainsKHR( m_device,
@@ -7647,6 +8141,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<SwapchainKHR, Dispatch>, SwapchainKHRAllocator> uniqueSwapchains;
std::vector<SwapchainKHR> swapchains( createInfos.size() );
Result result = static_cast<Result>(
@@ -7682,6 +8177,7 @@ namespace VULKAN_HPP_NAMESPACE
SwapchainKHRAllocator & swapchainKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<SwapchainKHR, Dispatch>, SwapchainKHRAllocator> uniqueSwapchains( swapchainKHRAllocator );
std::vector<SwapchainKHR> swapchains( createInfos.size() );
Result result = static_cast<Result>(
@@ -7711,6 +8207,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
SwapchainKHR swapchain;
Result result = static_cast<Result>(
d.vkCreateSharedSwapchainsKHR( m_device,
@@ -7736,6 +8233,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateXlibSurfaceKHR( m_instance,
reinterpret_cast<const VkXlibSurfaceCreateInfoKHR *>( pCreateInfo ),
@@ -7751,6 +8249,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateXlibSurfaceKHR( m_instance,
@@ -7769,6 +8268,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateXlibSurfaceKHR( m_instance,
@@ -7789,6 +8289,7 @@ namespace VULKAN_HPP_NAMESPACE
VisualID visualID,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Bool32>(
d.vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, dpy, visualID ) );
}
@@ -7800,6 +8301,7 @@ namespace VULKAN_HPP_NAMESPACE
VisualID visualID,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &dpy, visualID );
}
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -7815,6 +8317,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateXcbSurfaceKHR( m_instance,
reinterpret_cast<const VkXcbSurfaceCreateInfoKHR *>( pCreateInfo ),
@@ -7830,6 +8333,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateXcbSurfaceKHR( m_instance,
@@ -7848,6 +8352,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateXcbSurfaceKHR( m_instance,
@@ -7868,6 +8373,7 @@ namespace VULKAN_HPP_NAMESPACE
xcb_visualid_t visual_id,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Bool32>(
d.vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection, visual_id ) );
}
@@ -7879,6 +8385,7 @@ namespace VULKAN_HPP_NAMESPACE
xcb_visualid_t visual_id,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection, visual_id );
}
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -7894,6 +8401,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateWaylandSurfaceKHR( m_instance,
reinterpret_cast<const VkWaylandSurfaceCreateInfoKHR *>( pCreateInfo ),
@@ -7909,6 +8417,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateWaylandSurfaceKHR( m_instance,
@@ -7927,6 +8436,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateWaylandSurfaceKHR( m_instance,
@@ -7945,6 +8455,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR(
uint32_t queueFamilyIndex, struct wl_display * display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Bool32>(
d.vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, display ) );
}
@@ -7954,6 +8465,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR(
uint32_t queueFamilyIndex, struct wl_display & display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &display );
}
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -7969,6 +8481,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateAndroidSurfaceKHR( m_instance,
reinterpret_cast<const VkAndroidSurfaceCreateInfoKHR *>( pCreateInfo ),
@@ -7984,6 +8497,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateAndroidSurfaceKHR( m_instance,
@@ -8002,6 +8516,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateAndroidSurfaceKHR( m_instance,
@@ -8027,6 +8542,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateWin32SurfaceKHR( m_instance,
reinterpret_cast<const VkWin32SurfaceCreateInfoKHR *>( pCreateInfo ),
@@ -8042,6 +8558,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateWin32SurfaceKHR( m_instance,
@@ -8060,6 +8577,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateWin32SurfaceKHR( m_instance,
@@ -8078,6 +8596,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR(
uint32_t queueFamilyIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Bool32>(
d.vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ) );
}
@@ -8092,6 +8611,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT * pCallback,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateDebugReportCallbackEXT( m_instance,
reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT *>( pCreateInfo ),
@@ -8106,6 +8626,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback;
Result result = static_cast<Result>(
d.vkCreateDebugReportCallbackEXT( m_instance,
@@ -8124,6 +8645,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback;
Result result = static_cast<Result>(
d.vkCreateDebugReportCallbackEXT( m_instance,
@@ -8144,6 +8666,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDebugReportCallbackEXT( m_instance,
static_cast<VkDebugReportCallbackEXT>( callback ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -8155,6 +8678,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDebugReportCallbackEXT(
m_instance,
static_cast<VkDebugReportCallbackEXT>( callback ),
@@ -8168,6 +8692,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDebugReportCallbackEXT( m_instance,
static_cast<VkDebugReportCallbackEXT>( callback ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -8179,6 +8704,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDebugReportCallbackEXT(
m_instance,
static_cast<VkDebugReportCallbackEXT>( callback ),
@@ -8197,6 +8723,7 @@ namespace VULKAN_HPP_NAMESPACE
const char * pMessage,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDebugReportMessageEXT( m_instance,
static_cast<VkDebugReportFlagsEXT>( flags ),
static_cast<VkDebugReportObjectTypeEXT>( objectType ),
@@ -8218,6 +8745,7 @@ namespace VULKAN_HPP_NAMESPACE
const std::string & message,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDebugReportMessageEXT( m_instance,
static_cast<VkDebugReportFlagsEXT>( flags ),
static_cast<VkDebugReportObjectTypeEXT>( objectType ),
@@ -8235,6 +8763,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectTagEXT(
const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT * pTagInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast<const VkDebugMarkerObjectTagInfoEXT *>( pTagInfo ) ) );
}
@@ -8244,6 +8773,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT & tagInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast<const VkDebugMarkerObjectTagInfoEXT *>( &tagInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectTagEXT" );
@@ -8254,6 +8784,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectNameEXT(
const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT * pNameInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkDebugMarkerSetObjectNameEXT(
m_device, reinterpret_cast<const VkDebugMarkerObjectNameInfoEXT *>( pNameInfo ) ) );
}
@@ -8263,6 +8794,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT & nameInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkDebugMarkerSetObjectNameEXT(
m_device, reinterpret_cast<const VkDebugMarkerObjectNameInfoEXT *>( &nameInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectNameEXT" );
@@ -8274,6 +8806,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT * pMarkerInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast<const VkDebugMarkerMarkerInfoEXT *>( pMarkerInfo ) );
}
@@ -8282,6 +8815,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT & markerInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast<const VkDebugMarkerMarkerInfoEXT *>( &markerInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -8289,6 +8823,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch>
VULKAN_HPP_INLINE void CommandBuffer::debugMarkerEndEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDebugMarkerEndEXT( m_commandBuffer );
}
@@ -8297,6 +8832,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT * pMarkerInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast<const VkDebugMarkerMarkerInfoEXT *>( pMarkerInfo ) );
}
@@ -8305,6 +8841,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT & markerInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast<const VkDebugMarkerMarkerInfoEXT *>( &markerInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -8318,6 +8855,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR * pCapabilities,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetPhysicalDeviceVideoCapabilitiesKHR( m_physicalDevice,
reinterpret_cast<const VkVideoProfileKHR *>( pVideoProfile ),
@@ -8330,6 +8868,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR>::type
PhysicalDevice::getVideoCapabilitiesKHR( const VideoProfileKHR & videoProfile, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR capabilities;
Result result = static_cast<Result>(
d.vkGetPhysicalDeviceVideoCapabilitiesKHR( m_physicalDevice,
@@ -8343,6 +8882,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<StructureChain<X, Y, Z...>>::type
PhysicalDevice::getVideoCapabilitiesKHR( const VideoProfileKHR & videoProfile, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR & capabilities =
structureChain.template get<VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR>();
@@ -8362,6 +8902,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VideoFormatPropertiesKHR * pVideoFormatProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceVideoFormatInfoKHR *>( pVideoFormatInfo ),
@@ -8376,6 +8917,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getVideoFormatPropertiesKHR( const PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<VideoFormatPropertiesKHR, VideoFormatPropertiesKHRAllocator> videoFormatProperties;
uint32_t videoFormatPropertyCount;
Result result;
@@ -8415,6 +8957,7 @@ namespace VULKAN_HPP_NAMESPACE
VideoFormatPropertiesKHRAllocator & videoFormatPropertiesKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<VideoFormatPropertiesKHR, VideoFormatPropertiesKHRAllocator> videoFormatProperties(
videoFormatPropertiesKHRAllocator );
uint32_t videoFormatPropertyCount;
@@ -8453,6 +8996,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VideoSessionKHR * pVideoSession,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateVideoSessionKHR( m_device,
reinterpret_cast<const VkVideoSessionCreateInfoKHR *>( pCreateInfo ),
@@ -8468,6 +9012,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession;
Result result = static_cast<Result>(
d.vkCreateVideoSessionKHR( m_device,
@@ -8486,6 +9031,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession;
Result result = static_cast<Result>(
d.vkCreateVideoSessionKHR( m_device,
@@ -8505,6 +9051,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyVideoSessionKHR( m_device,
static_cast<VkVideoSessionKHR>( videoSession ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -8516,6 +9063,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyVideoSessionKHR( m_device,
static_cast<VkVideoSessionKHR>( videoSession ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -8528,6 +9076,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyVideoSessionKHR( m_device,
static_cast<VkVideoSessionKHR>( videoSession ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -8539,6 +9088,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyVideoSessionKHR( m_device,
static_cast<VkVideoSessionKHR>( videoSession ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -8553,6 +9103,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VideoGetMemoryPropertiesKHR * pVideoSessionMemoryRequirements,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetVideoSessionMemoryRequirementsKHR(
m_device,
static_cast<VkVideoSessionKHR>( videoSession ),
@@ -8567,6 +9118,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<VideoGetMemoryPropertiesKHR, VideoGetMemoryPropertiesKHRAllocator> videoSessionMemoryRequirements;
uint32_t videoSessionMemoryRequirementsCount;
Result result;
@@ -8607,6 +9159,7 @@ namespace VULKAN_HPP_NAMESPACE
VideoGetMemoryPropertiesKHRAllocator & videoGetMemoryPropertiesKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<VideoGetMemoryPropertiesKHR, VideoGetMemoryPropertiesKHRAllocator> videoSessionMemoryRequirements(
videoGetMemoryPropertiesKHRAllocator );
uint32_t videoSessionMemoryRequirementsCount;
@@ -8644,6 +9197,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::VideoBindMemoryKHR * pVideoSessionBindMemories,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkBindVideoSessionMemoryKHR( m_device,
static_cast<VkVideoSessionKHR>( videoSession ),
@@ -8659,6 +9213,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::VideoBindMemoryKHR> const & videoSessionBindMemories,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkBindVideoSessionMemoryKHR(
m_device,
static_cast<VkVideoSessionKHR>( videoSession ),
@@ -8675,6 +9230,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR * pVideoSessionParameters,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateVideoSessionParametersKHR(
m_device,
reinterpret_cast<const VkVideoSessionParametersCreateInfoKHR *>( pCreateInfo ),
@@ -8690,6 +9246,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters;
Result result = static_cast<Result>( d.vkCreateVideoSessionParametersKHR(
m_device,
@@ -8709,6 +9266,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters;
Result result = static_cast<Result>( d.vkCreateVideoSessionParametersKHR(
m_device,
@@ -8732,6 +9290,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR * pUpdateInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkUpdateVideoSessionParametersKHR(
m_device,
static_cast<VkVideoSessionParametersKHR>( videoSessionParameters ),
@@ -8745,6 +9304,7 @@ namespace VULKAN_HPP_NAMESPACE
const VideoSessionParametersUpdateInfoKHR & updateInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkUpdateVideoSessionParametersKHR(
m_device,
static_cast<VkVideoSessionParametersKHR>( videoSessionParameters ),
@@ -8759,6 +9319,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyVideoSessionParametersKHR( m_device,
static_cast<VkVideoSessionParametersKHR>( videoSessionParameters ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -8771,6 +9332,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyVideoSessionParametersKHR(
m_device,
static_cast<VkVideoSessionParametersKHR>( videoSessionParameters ),
@@ -8784,6 +9346,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyVideoSessionParametersKHR( m_device,
static_cast<VkVideoSessionParametersKHR>( videoSessionParameters ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -8795,6 +9358,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyVideoSessionParametersKHR(
m_device,
static_cast<VkVideoSessionParametersKHR>( videoSessionParameters ),
@@ -8808,6 +9372,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR * pBeginInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginVideoCodingKHR( m_commandBuffer, reinterpret_cast<const VkVideoBeginCodingInfoKHR *>( pBeginInfo ) );
}
@@ -8816,6 +9381,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::beginVideoCodingKHR( const VideoBeginCodingInfoKHR & beginInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginVideoCodingKHR( m_commandBuffer, reinterpret_cast<const VkVideoBeginCodingInfoKHR *>( &beginInfo ) );
}
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -8825,6 +9391,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::endVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR * pEndCodingInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEndVideoCodingKHR( m_commandBuffer, reinterpret_cast<const VkVideoEndCodingInfoKHR *>( pEndCodingInfo ) );
}
@@ -8833,6 +9400,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::endVideoCodingKHR( const VideoEndCodingInfoKHR & endCodingInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEndVideoCodingKHR( m_commandBuffer, reinterpret_cast<const VkVideoEndCodingInfoKHR *>( &endCodingInfo ) );
}
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -8842,6 +9410,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::controlVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR * pCodingControlInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdControlVideoCodingKHR( m_commandBuffer,
reinterpret_cast<const VkVideoCodingControlInfoKHR *>( pCodingControlInfo ) );
}
@@ -8851,6 +9420,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::controlVideoCodingKHR( const VideoCodingControlInfoKHR & codingControlInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdControlVideoCodingKHR( m_commandBuffer,
reinterpret_cast<const VkVideoCodingControlInfoKHR *>( &codingControlInfo ) );
}
@@ -8864,6 +9434,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::decodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR * pFrameInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDecodeVideoKHR( m_commandBuffer, reinterpret_cast<const VkVideoDecodeInfoKHR *>( pFrameInfo ) );
}
@@ -8872,6 +9443,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::decodeVideoKHR( const VideoDecodeInfoKHR & frameInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDecodeVideoKHR( m_commandBuffer, reinterpret_cast<const VkVideoDecodeInfoKHR *>( &frameInfo ) );
}
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -8888,6 +9460,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::DeviceSize * pSizes,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBindTransformFeedbackBuffersEXT( m_commandBuffer,
firstBinding,
bindingCount,
@@ -8905,6 +9478,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> const & sizes,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
# ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( buffers.size() == offsets.size() );
VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() );
@@ -8938,6 +9512,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::DeviceSize * pCounterBufferOffsets,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginTransformFeedbackEXT( m_commandBuffer,
firstCounterBuffer,
counterBufferCount,
@@ -8953,6 +9528,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> const & counterBufferOffsets,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
# ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( counterBufferOffsets.empty() || counterBuffers.size() == counterBufferOffsets.size() );
# else
@@ -8980,6 +9556,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::DeviceSize * pCounterBufferOffsets,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEndTransformFeedbackEXT( m_commandBuffer,
firstCounterBuffer,
counterBufferCount,
@@ -8995,6 +9572,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> const & counterBufferOffsets,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
# ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( counterBufferOffsets.empty() || counterBuffers.size() == counterBufferOffsets.size() );
# else
@@ -9021,6 +9599,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t index,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginQueryIndexedEXT(
m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, static_cast<VkQueryControlFlags>( flags ), index );
}
@@ -9031,6 +9610,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t index,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEndQueryIndexedEXT( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, index );
}
@@ -9043,6 +9623,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t vertexStride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawIndirectByteCountEXT( m_commandBuffer,
instanceCount,
firstInstance,
@@ -9061,6 +9642,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::CuModuleNVX * pModule,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateCuModuleNVX( m_device,
reinterpret_cast<const VkCuModuleCreateInfoNVX *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -9075,6 +9657,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::CuModuleNVX module;
Result result = static_cast<Result>(
d.vkCreateCuModuleNVX( m_device,
@@ -9093,6 +9676,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::CuModuleNVX module;
Result result = static_cast<Result>(
d.vkCreateCuModuleNVX( m_device,
@@ -9114,6 +9698,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::CuFunctionNVX * pFunction,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateCuFunctionNVX( m_device,
reinterpret_cast<const VkCuFunctionCreateInfoNVX *>( pCreateInfo ),
@@ -9129,6 +9714,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::CuFunctionNVX function;
Result result = static_cast<Result>(
d.vkCreateCuFunctionNVX( m_device,
@@ -9147,6 +9733,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::CuFunctionNVX function;
Result result = static_cast<Result>(
d.vkCreateCuFunctionNVX( m_device,
@@ -9166,6 +9753,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyCuModuleNVX(
m_device, static_cast<VkCuModuleNVX>( module ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -9176,6 +9764,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyCuModuleNVX( m_device,
static_cast<VkCuModuleNVX>( module ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -9188,6 +9777,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyCuModuleNVX(
m_device, static_cast<VkCuModuleNVX>( module ), reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
}
@@ -9198,6 +9788,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyCuModuleNVX( m_device,
static_cast<VkCuModuleNVX>( module ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -9210,6 +9801,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyCuFunctionNVX( m_device,
static_cast<VkCuFunctionNVX>( function ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -9221,6 +9813,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyCuFunctionNVX( m_device,
static_cast<VkCuFunctionNVX>( function ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -9233,6 +9826,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyCuFunctionNVX( m_device,
static_cast<VkCuFunctionNVX>( function ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -9244,6 +9838,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyCuFunctionNVX( m_device,
static_cast<VkCuFunctionNVX>( function ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -9255,6 +9850,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX * pLaunchInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCuLaunchKernelNVX( m_commandBuffer, reinterpret_cast<const VkCuLaunchInfoNVX *>( pLaunchInfo ) );
}
@@ -9263,6 +9859,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::cuLaunchKernelNVX( const CuLaunchInfoNVX & launchInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCuLaunchKernelNVX( m_commandBuffer, reinterpret_cast<const VkCuLaunchInfoNVX *>( &launchInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -9273,6 +9870,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE uint32_t Device::getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX * pInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetImageViewHandleNVX( m_device, reinterpret_cast<const VkImageViewHandleInfoNVX *>( pInfo ) );
}
@@ -9281,6 +9879,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE uint32_t Device::getImageViewHandleNVX( const ImageViewHandleInfoNVX & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetImageViewHandleNVX( m_device, reinterpret_cast<const VkImageViewHandleInfoNVX *>( &info ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -9291,6 +9890,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetImageViewAddressNVX( m_device,
static_cast<VkImageView>( imageView ),
@@ -9303,6 +9903,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX>::type
Device::getImageViewAddressNVX( VULKAN_HPP_NAMESPACE::ImageView imageView, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX properties;
Result result = static_cast<Result>(
d.vkGetImageViewAddressNVX( m_device,
@@ -9323,6 +9924,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t stride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawIndirectCountAMD( m_commandBuffer,
static_cast<VkBuffer>( buffer ),
static_cast<VkDeviceSize>( offset ),
@@ -9341,6 +9943,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t stride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer,
static_cast<VkBuffer>( buffer ),
static_cast<VkDeviceSize>( offset ),
@@ -9361,6 +9964,7 @@ namespace VULKAN_HPP_NAMESPACE
void * pInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetShaderInfoAMD( m_device,
static_cast<VkPipeline>( pipeline ),
static_cast<VkShaderStageFlagBits>( shaderStage ),
@@ -9377,6 +9981,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<uint8_t, Uint8_tAllocator> info;
size_t infoSize;
Result result;
@@ -9418,6 +10023,7 @@ namespace VULKAN_HPP_NAMESPACE
Uint8_tAllocator & uint8_tAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<uint8_t, Uint8_tAllocator> info( uint8_tAllocator );
size_t infoSize;
Result result;
@@ -9459,6 +10065,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateStreamDescriptorSurfaceGGP(
m_instance,
reinterpret_cast<const VkStreamDescriptorSurfaceCreateInfoGGP *>( pCreateInfo ),
@@ -9474,6 +10081,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateStreamDescriptorSurfaceGGP(
m_instance,
@@ -9493,6 +10101,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateStreamDescriptorSurfaceGGP(
m_instance,
@@ -9521,6 +10130,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV * pExternalImageFormatProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
m_physicalDevice,
static_cast<VkFormat>( format ),
@@ -9545,6 +10155,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV externalImageFormatProperties;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
m_physicalDevice,
@@ -9571,6 +10182,7 @@ namespace VULKAN_HPP_NAMESPACE
HANDLE * pHandle,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetMemoryWin32HandleNV( m_device,
static_cast<VkDeviceMemory>( memory ),
@@ -9585,6 +10197,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
HANDLE handle;
Result result =
static_cast<Result>( d.vkGetMemoryWin32HandleNV( m_device,
@@ -9602,6 +10215,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 * pFeatures,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2 *>( pFeatures ) );
}
@@ -9610,6 +10224,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2
PhysicalDevice::getFeatures2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features;
d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2 *>( &features ) );
return features;
@@ -9619,6 +10234,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain<X, Y, Z...>
PhysicalDevice::getFeatures2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 & features =
structureChain.template get<VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2>();
@@ -9632,6 +10248,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice,
reinterpret_cast<VkPhysicalDeviceProperties2 *>( pProperties ) );
}
@@ -9641,6 +10258,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2
PhysicalDevice::getProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties;
d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice,
reinterpret_cast<VkPhysicalDeviceProperties2 *>( &properties ) );
@@ -9651,6 +10269,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain<X, Y, Z...>
PhysicalDevice::getProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 & properties =
structureChain.template get<VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2>();
@@ -9666,6 +10285,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::FormatProperties2 * pFormatProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceFormatProperties2KHR(
m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2 *>( pFormatProperties ) );
}
@@ -9676,6 +10296,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties;
d.vkGetPhysicalDeviceFormatProperties2KHR(
m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2 *>( &formatProperties ) );
@@ -9687,6 +10308,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::FormatProperties2 & formatProperties =
structureChain.template get<VULKAN_HPP_NAMESPACE::FormatProperties2>();
@@ -9702,6 +10324,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ImageFormatProperties2 * pImageFormatProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2KHR(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2 *>( pImageFormatInfo ),
@@ -9715,6 +10338,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceImageFormatProperties2KHR(
m_physicalDevice,
@@ -9729,6 +10353,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2 & imageFormatInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties =
structureChain.template get<VULKAN_HPP_NAMESPACE::ImageFormatProperties2>();
@@ -9747,6 +10372,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR(
m_physicalDevice,
pQueueFamilyPropertyCount,
@@ -9758,6 +10384,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator>
PhysicalDevice::getQueueFamilyProperties2KHR( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator> queueFamilyProperties;
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
@@ -9778,6 +10405,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getQueueFamilyProperties2KHR( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<QueueFamilyProperties2, QueueFamilyProperties2Allocator> queueFamilyProperties(
queueFamilyProperties2Allocator );
uint32_t queueFamilyPropertyCount;
@@ -9795,6 +10423,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<StructureChain, StructureChainAllocator>
PhysicalDevice::getQueueFamilyProperties2KHR( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
std::vector<StructureChain, StructureChainAllocator> returnVector( queueFamilyPropertyCount );
@@ -9825,6 +10454,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getQueueFamilyProperties2KHR( StructureChainAllocator & structureChainAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
uint32_t queueFamilyPropertyCount;
d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
std::vector<StructureChain, StructureChainAllocator> returnVector( queueFamilyPropertyCount,
@@ -9853,6 +10483,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getMemoryProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 * pMemoryProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceMemoryProperties2KHR(
m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2 *>( pMemoryProperties ) );
}
@@ -9862,6 +10493,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2
PhysicalDevice::getMemoryProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties;
d.vkGetPhysicalDeviceMemoryProperties2KHR(
m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2 *>( &memoryProperties ) );
@@ -9872,6 +10504,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE StructureChain<X, Y, Z...>
PhysicalDevice::getMemoryProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 & memoryProperties =
structureChain.template get<VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2>();
@@ -9888,6 +10521,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2 *>( pFormatInfo ),
@@ -9902,6 +10536,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2 & formatInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SparseImageFormatProperties2, SparseImageFormatProperties2Allocator> properties;
uint32_t propertyCount;
d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
@@ -9931,6 +10566,7 @@ namespace VULKAN_HPP_NAMESPACE
SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SparseImageFormatProperties2, SparseImageFormatProperties2Allocator> properties(
sparseImageFormatProperties2Allocator );
uint32_t propertyCount;
@@ -9960,6 +10596,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags * pPeerMemoryFeatures,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetDeviceGroupPeerMemoryFeaturesKHR( m_device,
heapIndex,
localDeviceIndex,
@@ -9975,6 +10612,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t remoteDeviceIndex,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags peerMemoryFeatures;
d.vkGetDeviceGroupPeerMemoryFeaturesKHR( m_device,
heapIndex,
@@ -9989,6 +10627,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setDeviceMaskKHR( uint32_t deviceMask,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetDeviceMaskKHR( m_commandBuffer, deviceMask );
}
@@ -10001,6 +10640,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t groupCountZ,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDispatchBaseKHR(
m_commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ );
}
@@ -10015,6 +10655,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateViSurfaceNN( m_instance,
reinterpret_cast<const VkViSurfaceCreateInfoNN *>( pCreateInfo ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -10029,6 +10670,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateViSurfaceNN( m_instance,
@@ -10047,6 +10689,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateViSurfaceNN( m_instance,
@@ -10069,6 +10712,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkTrimCommandPoolKHR(
m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolTrimFlags>( flags ) );
}
@@ -10081,6 +10725,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkEnumeratePhysicalDeviceGroupsKHR(
m_instance,
pPhysicalDeviceGroupCount,
@@ -10093,6 +10738,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<PhysicalDeviceGroupProperties, PhysicalDeviceGroupPropertiesAllocator>>::type
Instance::enumeratePhysicalDeviceGroupsKHR( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PhysicalDeviceGroupProperties, PhysicalDeviceGroupPropertiesAllocator> physicalDeviceGroupProperties;
uint32_t physicalDeviceGroupCount;
Result result;
@@ -10129,6 +10775,7 @@ namespace VULKAN_HPP_NAMESPACE
Instance::enumeratePhysicalDeviceGroupsKHR(
PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PhysicalDeviceGroupProperties, PhysicalDeviceGroupPropertiesAllocator> physicalDeviceGroupProperties(
physicalDeviceGroupPropertiesAllocator );
uint32_t physicalDeviceGroupCount;
@@ -10165,6 +10812,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ExternalBufferProperties * pExternalBufferProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceExternalBufferPropertiesKHR(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceExternalBufferInfo *>( pExternalBufferInfo ),
@@ -10177,6 +10825,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfo & externalBufferInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ExternalBufferProperties externalBufferProperties;
d.vkGetPhysicalDeviceExternalBufferPropertiesKHR(
m_physicalDevice,
@@ -10195,6 +10844,7 @@ namespace VULKAN_HPP_NAMESPACE
HANDLE * pHandle,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetMemoryWin32HandleKHR(
m_device, reinterpret_cast<const VkMemoryGetWin32HandleInfoKHR *>( pGetWin32HandleInfo ), pHandle ) );
}
@@ -10204,6 +10854,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<HANDLE>::type
Device::getMemoryWin32HandleKHR( const MemoryGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
HANDLE handle;
Result result = static_cast<Result>( d.vkGetMemoryWin32HandleKHR(
m_device, reinterpret_cast<const VkMemoryGetWin32HandleInfoKHR *>( &getWin32HandleInfo ), &handle ) );
@@ -10218,6 +10869,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR * pMemoryWin32HandleProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetMemoryWin32HandlePropertiesKHR(
m_device,
static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ),
@@ -10233,6 +10885,7 @@ namespace VULKAN_HPP_NAMESPACE
HANDLE handle,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR memoryWin32HandleProperties;
Result result = static_cast<Result>( d.vkGetMemoryWin32HandlePropertiesKHR(
m_device,
@@ -10253,6 +10906,7 @@ namespace VULKAN_HPP_NAMESPACE
int * pFd,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetMemoryFdKHR( m_device, reinterpret_cast<const VkMemoryGetFdInfoKHR *>( pGetFdInfo ), pFd ) );
}
@@ -10262,6 +10916,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<int>::type
Device::getMemoryFdKHR( const MemoryGetFdInfoKHR & getFdInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
int fd;
Result result = static_cast<Result>(
d.vkGetMemoryFdKHR( m_device, reinterpret_cast<const VkMemoryGetFdInfoKHR *>( &getFdInfo ), &fd ) );
@@ -10276,6 +10931,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR * pMemoryFdProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetMemoryFdPropertiesKHR( m_device,
static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ),
@@ -10291,6 +10947,7 @@ namespace VULKAN_HPP_NAMESPACE
int fd,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR memoryFdProperties;
Result result = static_cast<Result>(
d.vkGetMemoryFdPropertiesKHR( m_device,
@@ -10310,6 +10967,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties * pExternalSemaphoreProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceExternalSemaphoreInfo *>( pExternalSemaphoreInfo ),
@@ -10322,6 +10980,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getExternalSemaphorePropertiesKHR(
const PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties externalSemaphoreProperties;
d.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
m_physicalDevice,
@@ -10339,6 +10998,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR * pImportSemaphoreWin32HandleInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkImportSemaphoreWin32HandleKHR(
m_device, reinterpret_cast<const VkImportSemaphoreWin32HandleInfoKHR *>( pImportSemaphoreWin32HandleInfo ) ) );
}
@@ -10349,6 +11009,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkImportSemaphoreWin32HandleKHR(
m_device, reinterpret_cast<const VkImportSemaphoreWin32HandleInfoKHR *>( &importSemaphoreWin32HandleInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreWin32HandleKHR" );
@@ -10361,6 +11022,7 @@ namespace VULKAN_HPP_NAMESPACE
HANDLE * pHandle,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetSemaphoreWin32HandleKHR(
m_device, reinterpret_cast<const VkSemaphoreGetWin32HandleInfoKHR *>( pGetWin32HandleInfo ), pHandle ) );
}
@@ -10371,6 +11033,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getSemaphoreWin32HandleKHR( const SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
HANDLE handle;
Result result = static_cast<Result>( d.vkGetSemaphoreWin32HandleKHR(
m_device, reinterpret_cast<const VkSemaphoreGetWin32HandleInfoKHR *>( &getWin32HandleInfo ), &handle ) );
@@ -10386,6 +11049,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR * pImportSemaphoreFdInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkImportSemaphoreFdKHR(
m_device, reinterpret_cast<const VkImportSemaphoreFdInfoKHR *>( pImportSemaphoreFdInfo ) ) );
}
@@ -10395,6 +11059,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkImportSemaphoreFdKHR(
m_device, reinterpret_cast<const VkImportSemaphoreFdInfoKHR *>( &importSemaphoreFdInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreFdKHR" );
@@ -10407,6 +11072,7 @@ namespace VULKAN_HPP_NAMESPACE
int * pFd,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast<const VkSemaphoreGetFdInfoKHR *>( pGetFdInfo ), pFd ) );
}
@@ -10416,6 +11082,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<int>::type
Device::getSemaphoreFdKHR( const SemaphoreGetFdInfoKHR & getFdInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
int fd;
Result result = static_cast<Result>(
d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast<const VkSemaphoreGetFdInfoKHR *>( &getFdInfo ), &fd ) );
@@ -10434,6 +11101,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdPushDescriptorSetKHR( m_commandBuffer,
static_cast<VkPipelineBindPoint>( pipelineBindPoint ),
static_cast<VkPipelineLayout>( layout ),
@@ -10451,6 +11119,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::WriteDescriptorSet> const & descriptorWrites,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdPushDescriptorSetKHR( m_commandBuffer,
static_cast<VkPipelineBindPoint>( pipelineBindPoint ),
static_cast<VkPipelineLayout>( layout ),
@@ -10468,6 +11137,7 @@ namespace VULKAN_HPP_NAMESPACE
const void * pData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdPushDescriptorSetWithTemplateKHR( m_commandBuffer,
static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ),
static_cast<VkPipelineLayout>( layout ),
@@ -10482,6 +11152,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT * pConditionalRenderingBegin,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginConditionalRenderingEXT(
m_commandBuffer, reinterpret_cast<const VkConditionalRenderingBeginInfoEXT *>( pConditionalRenderingBegin ) );
}
@@ -10492,6 +11163,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::beginConditionalRenderingEXT( const ConditionalRenderingBeginInfoEXT & conditionalRenderingBegin,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginConditionalRenderingEXT(
m_commandBuffer, reinterpret_cast<const VkConditionalRenderingBeginInfoEXT *>( &conditionalRenderingBegin ) );
}
@@ -10500,6 +11172,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch>
VULKAN_HPP_INLINE void CommandBuffer::endConditionalRenderingEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEndConditionalRenderingEXT( m_commandBuffer );
}
@@ -10512,6 +11185,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate * pDescriptorUpdateTemplate,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCreateDescriptorUpdateTemplateKHR(
m_device,
reinterpret_cast<const VkDescriptorUpdateTemplateCreateInfo *>( pCreateInfo ),
@@ -10527,6 +11201,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate;
Result result = static_cast<Result>( d.vkCreateDescriptorUpdateTemplateKHR(
m_device,
@@ -10546,6 +11221,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate;
Result result = static_cast<Result>( d.vkCreateDescriptorUpdateTemplateKHR(
m_device,
@@ -10569,6 +11245,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorUpdateTemplateKHR( m_device,
static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -10581,6 +11258,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDescriptorUpdateTemplateKHR(
m_device,
static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ),
@@ -10596,6 +11274,7 @@ namespace VULKAN_HPP_NAMESPACE
const void * pData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkUpdateDescriptorSetWithTemplateKHR( m_device,
static_cast<VkDescriptorSet>( descriptorSet ),
static_cast<VkDescriptorUpdateTemplate>( descriptorUpdateTemplate ),
@@ -10611,6 +11290,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ViewportWScalingNV * pViewportWScalings,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetViewportWScalingNV( m_commandBuffer,
firstViewport,
viewportCount,
@@ -10624,6 +11304,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::ViewportWScalingNV> const & viewportWScalings,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetViewportWScalingNV( m_commandBuffer,
firstViewport,
viewportWScalings.size(),
@@ -10638,6 +11319,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE Result PhysicalDevice::releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkReleaseDisplayEXT( m_physicalDevice, static_cast<VkDisplayKHR>( display ) ) );
}
#else
@@ -10645,6 +11327,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<void>::type
PhysicalDevice::releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkReleaseDisplayEXT( m_physicalDevice, static_cast<VkDisplayKHR>( display ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::releaseDisplayEXT" );
@@ -10658,6 +11341,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::acquireXlibDisplayEXT(
Display * dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkAcquireXlibDisplayEXT( m_physicalDevice, dpy, static_cast<VkDisplayKHR>( display ) ) );
}
@@ -10669,6 +11353,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayKHR display,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast<VkDisplayKHR>( display ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireXlibDisplayEXT" );
@@ -10682,6 +11367,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplay,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetRandROutputDisplayEXT( m_physicalDevice, dpy, rrOutput, reinterpret_cast<VkDisplayKHR *>( pDisplay ) ) );
}
@@ -10691,6 +11377,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DisplayKHR>::type
PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DisplayKHR display;
Result result = static_cast<Result>(
d.vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast<VkDisplayKHR *>( &display ) ) );
@@ -10703,6 +11390,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<VULKAN_HPP_NAMESPACE::DisplayKHR, Dispatch>>::type
PhysicalDevice::getRandROutputDisplayEXTUnique( Display & dpy, RROutput rrOutput, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DisplayKHR display;
Result result = static_cast<Result>(
d.vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast<VkDisplayKHR *>( &display ) ) );
@@ -10722,6 +11410,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT * pSurfaceCapabilities,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT(
m_physicalDevice,
static_cast<VkSurfaceKHR>( surface ),
@@ -10734,6 +11423,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT>::type
PhysicalDevice::getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT surfaceCapabilities;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT(
m_physicalDevice,
@@ -10752,6 +11442,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT * pDisplayPowerInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkDisplayPowerControlEXT( m_device,
static_cast<VkDisplayKHR>( display ),
@@ -10763,6 +11454,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<void>::type Device::displayPowerControlEXT(
VULKAN_HPP_NAMESPACE::DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkDisplayPowerControlEXT( m_device,
static_cast<VkDisplayKHR>( display ),
@@ -10778,6 +11470,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Fence * pFence,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkRegisterDeviceEventEXT( m_device,
reinterpret_cast<const VkDeviceEventInfoEXT *>( pDeviceEventInfo ),
@@ -10792,6 +11485,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Fence fence;
Result result = static_cast<Result>(
d.vkRegisterDeviceEventEXT( m_device,
@@ -10809,6 +11503,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Fence fence;
Result result = static_cast<Result>(
d.vkRegisterDeviceEventEXT( m_device,
@@ -10831,6 +11526,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Fence * pFence,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkRegisterDisplayEventEXT( m_device,
static_cast<VkDisplayKHR>( display ),
@@ -10847,6 +11543,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Fence fence;
Result result = static_cast<Result>(
d.vkRegisterDisplayEventEXT( m_device,
@@ -10866,6 +11563,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Fence fence;
Result result = static_cast<Result>(
d.vkRegisterDisplayEventEXT( m_device,
@@ -10888,6 +11586,7 @@ namespace VULKAN_HPP_NAMESPACE
uint64_t * pCounterValue,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetSwapchainCounterEXT( m_device,
static_cast<VkSwapchainKHR>( swapchain ),
static_cast<VkSurfaceCounterFlagBitsEXT>( counter ),
@@ -10901,6 +11600,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
uint64_t counterValue;
Result result =
static_cast<Result>( d.vkGetSwapchainCounterEXT( m_device,
@@ -10919,6 +11619,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE * pDisplayTimingProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetRefreshCycleDurationGOOGLE(
m_device,
static_cast<VkSwapchainKHR>( swapchain ),
@@ -10931,6 +11632,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE>::type
Device::getRefreshCycleDurationGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE displayTimingProperties;
Result result = static_cast<Result>( d.vkGetRefreshCycleDurationGOOGLE(
m_device,
@@ -10948,6 +11650,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PastPresentationTimingGOOGLE * pPresentationTimings,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPastPresentationTimingGOOGLE(
m_device,
static_cast<VkSwapchainKHR>( swapchain ),
@@ -10961,6 +11664,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<PastPresentationTimingGOOGLE, PastPresentationTimingGOOGLEAllocator>>::type
Device::getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PastPresentationTimingGOOGLE, PastPresentationTimingGOOGLEAllocator> presentationTimings;
uint32_t presentationTimingCount;
Result result;
@@ -10999,6 +11703,7 @@ namespace VULKAN_HPP_NAMESPACE
PastPresentationTimingGOOGLEAllocator & pastPresentationTimingGOOGLEAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PastPresentationTimingGOOGLE, PastPresentationTimingGOOGLEAllocator> presentationTimings(
pastPresentationTimingGOOGLEAllocator );
uint32_t presentationTimingCount;
@@ -11035,6 +11740,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::Rect2D * pDiscardRectangles,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetDiscardRectangleEXT( m_commandBuffer,
firstDiscardRectangle,
discardRectangleCount,
@@ -11048,6 +11754,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::Rect2D> const & discardRectangles,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetDiscardRectangleEXT( m_commandBuffer,
firstDiscardRectangle,
discardRectangles.size(),
@@ -11063,6 +11770,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::HdrMetadataEXT * pMetadata,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkSetHdrMetadataEXT( m_device,
swapchainCount,
reinterpret_cast<const VkSwapchainKHR *>( pSwapchains ),
@@ -11076,6 +11784,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::HdrMetadataEXT> const & metadata,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
# ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( swapchains.size() == metadata.size() );
# else
@@ -11102,6 +11811,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateRenderPass2KHR( m_device,
reinterpret_cast<const VkRenderPassCreateInfo2 *>( pCreateInfo ),
@@ -11117,6 +11827,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::RenderPass renderPass;
Result result = static_cast<Result>(
d.vkCreateRenderPass2KHR( m_device,
@@ -11135,6 +11846,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::RenderPass renderPass;
Result result = static_cast<Result>(
d.vkCreateRenderPass2KHR( m_device,
@@ -11155,6 +11867,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginRenderPass2KHR( m_commandBuffer,
reinterpret_cast<const VkRenderPassBeginInfo *>( pRenderPassBegin ),
reinterpret_cast<const VkSubpassBeginInfo *>( pSubpassBeginInfo ) );
@@ -11166,6 +11879,7 @@ namespace VULKAN_HPP_NAMESPACE
const SubpassBeginInfo & subpassBeginInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginRenderPass2KHR( m_commandBuffer,
reinterpret_cast<const VkRenderPassBeginInfo *>( &renderPassBegin ),
reinterpret_cast<const VkSubpassBeginInfo *>( &subpassBeginInfo ) );
@@ -11178,6 +11892,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdNextSubpass2KHR( m_commandBuffer,
reinterpret_cast<const VkSubpassBeginInfo *>( pSubpassBeginInfo ),
reinterpret_cast<const VkSubpassEndInfo *>( pSubpassEndInfo ) );
@@ -11189,6 +11904,7 @@ namespace VULKAN_HPP_NAMESPACE
const SubpassEndInfo & subpassEndInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdNextSubpass2KHR( m_commandBuffer,
reinterpret_cast<const VkSubpassBeginInfo *>( &subpassBeginInfo ),
reinterpret_cast<const VkSubpassEndInfo *>( &subpassEndInfo ) );
@@ -11199,6 +11915,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEndRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassEndInfo *>( pSubpassEndInfo ) );
}
@@ -11207,6 +11924,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const SubpassEndInfo & subpassEndInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEndRenderPass2KHR( m_commandBuffer, reinterpret_cast<const VkSubpassEndInfo *>( &subpassEndInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -11218,6 +11936,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR(
VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetSwapchainStatusKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
}
#else
@@ -11225,6 +11944,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result
Device::getSwapchainStatusKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkGetSwapchainStatusKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
return createResultValue(
@@ -11242,6 +11962,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ExternalFenceProperties * pExternalFenceProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceExternalFencePropertiesKHR(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceExternalFenceInfo *>( pExternalFenceInfo ),
@@ -11254,6 +11975,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getExternalFencePropertiesKHR( const PhysicalDeviceExternalFenceInfo & externalFenceInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ExternalFenceProperties externalFenceProperties;
d.vkGetPhysicalDeviceExternalFencePropertiesKHR(
m_physicalDevice,
@@ -11271,6 +11993,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR * pImportFenceWin32HandleInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkImportFenceWin32HandleKHR(
m_device, reinterpret_cast<const VkImportFenceWin32HandleInfoKHR *>( pImportFenceWin32HandleInfo ) ) );
}
@@ -11281,6 +12004,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkImportFenceWin32HandleKHR(
m_device, reinterpret_cast<const VkImportFenceWin32HandleInfoKHR *>( &importFenceWin32HandleInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceWin32HandleKHR" );
@@ -11293,6 +12017,7 @@ namespace VULKAN_HPP_NAMESPACE
HANDLE * pHandle,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetFenceWin32HandleKHR(
m_device, reinterpret_cast<const VkFenceGetWin32HandleInfoKHR *>( pGetWin32HandleInfo ), pHandle ) );
}
@@ -11302,6 +12027,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<HANDLE>::type
Device::getFenceWin32HandleKHR( const FenceGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
HANDLE handle;
Result result = static_cast<Result>( d.vkGetFenceWin32HandleKHR(
m_device, reinterpret_cast<const VkFenceGetWin32HandleInfoKHR *>( &getWin32HandleInfo ), &handle ) );
@@ -11317,6 +12043,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR * pImportFenceFdInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkImportFenceFdKHR( m_device, reinterpret_cast<const VkImportFenceFdInfoKHR *>( pImportFenceFdInfo ) ) );
}
@@ -11326,6 +12053,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::importFenceFdKHR( const ImportFenceFdInfoKHR & importFenceFdInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkImportFenceFdKHR( m_device, reinterpret_cast<const VkImportFenceFdInfoKHR *>( &importFenceFdInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceFdKHR" );
@@ -11338,6 +12066,7 @@ namespace VULKAN_HPP_NAMESPACE
int * pFd,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetFenceFdKHR( m_device, reinterpret_cast<const VkFenceGetFdInfoKHR *>( pGetFdInfo ), pFd ) );
}
@@ -11347,6 +12076,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<int>::type
Device::getFenceFdKHR( const FenceGetFdInfoKHR & getFdInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
int fd;
Result result = static_cast<Result>(
d.vkGetFenceFdKHR( m_device, reinterpret_cast<const VkFenceGetFdInfoKHR *>( &getFdInfo ), &fd ) );
@@ -11364,6 +12094,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR * pCounterDescriptions,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
m_physicalDevice,
queueFamilyIndex,
@@ -11382,6 +12113,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<VULKAN_HPP_NAMESPACE::PerformanceCounterKHR> const & counters,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PerformanceCounterDescriptionKHR, Allocator> counterDescriptions;
uint32_t counterCount;
Result result;
@@ -11429,6 +12161,7 @@ namespace VULKAN_HPP_NAMESPACE
Allocator const & vectorAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PerformanceCounterDescriptionKHR, Allocator> counterDescriptions( vectorAllocator );
uint32_t counterCount;
Result result;
@@ -11471,6 +12204,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::pair<std::vector<PerformanceCounterKHR, PerformanceCounterKHRAllocator>,
std::vector<PerformanceCounterDescriptionKHR, PerformanceCounterDescriptionKHRAllocator>>
data;
@@ -11522,6 +12256,7 @@ namespace VULKAN_HPP_NAMESPACE
PerformanceCounterDescriptionKHRAllocator & performanceCounterDescriptionKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::pair<std::vector<PerformanceCounterKHR, PerformanceCounterKHRAllocator>,
std::vector<PerformanceCounterDescriptionKHR, PerformanceCounterDescriptionKHRAllocator>>
data( std::piecewise_construct,
@@ -11565,6 +12300,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t * pNumPasses,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
m_physicalDevice,
reinterpret_cast<const VkQueryPoolPerformanceCreateInfoKHR *>( pPerformanceQueryCreateInfo ),
@@ -11576,6 +12312,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t PhysicalDevice::getQueueFamilyPerformanceQueryPassesKHR(
const QueryPoolPerformanceCreateInfoKHR & performanceQueryCreateInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
uint32_t numPasses;
d.vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
m_physicalDevice,
@@ -11589,6 +12326,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::acquireProfilingLockKHR(
const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkAcquireProfilingLockKHR( m_device, reinterpret_cast<const VkAcquireProfilingLockInfoKHR *>( pInfo ) ) );
}
@@ -11598,6 +12336,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::acquireProfilingLockKHR( const AcquireProfilingLockInfoKHR & info, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkAcquireProfilingLockKHR( m_device, reinterpret_cast<const VkAcquireProfilingLockInfoKHR *>( &info ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireProfilingLockKHR" );
@@ -11607,6 +12346,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch>
VULKAN_HPP_INLINE void Device::releaseProfilingLockKHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkReleaseProfilingLockKHR( m_device );
}
@@ -11618,6 +12358,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR * pSurfaceCapabilities,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR *>( pSurfaceInfo ),
@@ -11631,6 +12372,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR surfaceCapabilities;
Result result = static_cast<Result>( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR(
m_physicalDevice,
@@ -11645,6 +12387,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR & surfaceCapabilities =
structureChain.template get<VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR>();
@@ -11664,6 +12407,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR * pSurfaceFormats,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceSurfaceFormats2KHR(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR *>( pSurfaceInfo ),
@@ -11677,6 +12421,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<SurfaceFormat2KHR, SurfaceFormat2KHRAllocator>>::type
PhysicalDevice::getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SurfaceFormat2KHR, SurfaceFormat2KHRAllocator> surfaceFormats;
uint32_t surfaceFormatCount;
Result result;
@@ -11716,6 +12461,7 @@ namespace VULKAN_HPP_NAMESPACE
SurfaceFormat2KHRAllocator & surfaceFormat2KHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SurfaceFormat2KHR, SurfaceFormat2KHRAllocator> surfaceFormats( surfaceFormat2KHRAllocator );
uint32_t surfaceFormatCount;
Result result;
@@ -11754,6 +12500,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayProperties2KHR * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceDisplayProperties2KHR(
m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayProperties2KHR *>( pProperties ) ) );
}
@@ -11764,6 +12511,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<DisplayProperties2KHR, DisplayProperties2KHRAllocator>>::type
PhysicalDevice::getDisplayProperties2KHR( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayProperties2KHR, DisplayProperties2KHRAllocator> properties;
uint32_t propertyCount;
Result result;
@@ -11796,6 +12544,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getDisplayProperties2KHR( DisplayProperties2KHRAllocator & displayProperties2KHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayProperties2KHR, DisplayProperties2KHRAllocator> properties( displayProperties2KHRAllocator );
uint32_t propertyCount;
Result result;
@@ -11826,6 +12575,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR(
m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayPlaneProperties2KHR *>( pProperties ) ) );
}
@@ -11836,6 +12586,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<DisplayPlaneProperties2KHR, DisplayPlaneProperties2KHRAllocator>>::type
PhysicalDevice::getDisplayPlaneProperties2KHR( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayPlaneProperties2KHR, DisplayPlaneProperties2KHRAllocator> properties;
uint32_t propertyCount;
Result result;
@@ -11868,6 +12619,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getDisplayPlaneProperties2KHR(
DisplayPlaneProperties2KHRAllocator & displayPlaneProperties2KHRAllocator, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayPlaneProperties2KHR, DisplayPlaneProperties2KHRAllocator> properties(
displayPlaneProperties2KHRAllocator );
uint32_t propertyCount;
@@ -11900,6 +12652,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetDisplayModeProperties2KHR( m_physicalDevice,
static_cast<VkDisplayKHR>( display ),
@@ -11913,6 +12666,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<DisplayModeProperties2KHR, DisplayModeProperties2KHRAllocator>>::type
PhysicalDevice::getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayModeProperties2KHR, DisplayModeProperties2KHRAllocator> properties;
uint32_t propertyCount;
Result result;
@@ -11950,6 +12704,7 @@ namespace VULKAN_HPP_NAMESPACE
DisplayModeProperties2KHRAllocator & displayModeProperties2KHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<DisplayModeProperties2KHR, DisplayModeProperties2KHRAllocator> properties(
displayModeProperties2KHRAllocator );
uint32_t propertyCount;
@@ -11984,6 +12739,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR * pCapabilities,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetDisplayPlaneCapabilities2KHR( m_physicalDevice,
reinterpret_cast<const VkDisplayPlaneInfo2KHR *>( pDisplayPlaneInfo ),
@@ -11997,6 +12753,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getDisplayPlaneCapabilities2KHR( const DisplayPlaneInfo2KHR & displayPlaneInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR capabilities;
Result result = static_cast<Result>(
d.vkGetDisplayPlaneCapabilities2KHR( m_physicalDevice,
@@ -12017,6 +12774,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateIOSSurfaceMVK( m_instance,
reinterpret_cast<const VkIOSSurfaceCreateInfoMVK *>( pCreateInfo ),
@@ -12032,6 +12790,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateIOSSurfaceMVK( m_instance,
@@ -12050,6 +12809,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateIOSSurfaceMVK( m_instance,
@@ -12075,6 +12835,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateMacOSSurfaceMVK( m_instance,
reinterpret_cast<const VkMacOSSurfaceCreateInfoMVK *>( pCreateInfo ),
@@ -12090,6 +12851,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateMacOSSurfaceMVK( m_instance,
@@ -12108,6 +12870,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateMacOSSurfaceMVK( m_instance,
@@ -12129,6 +12892,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setDebugUtilsObjectNameEXT(
const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT * pNameInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkSetDebugUtilsObjectNameEXT(
m_device, reinterpret_cast<const VkDebugUtilsObjectNameInfoEXT *>( pNameInfo ) ) );
}
@@ -12138,6 +12902,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::setDebugUtilsObjectNameEXT( const DebugUtilsObjectNameInfoEXT & nameInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkSetDebugUtilsObjectNameEXT(
m_device, reinterpret_cast<const VkDebugUtilsObjectNameInfoEXT *>( &nameInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectNameEXT" );
@@ -12148,6 +12913,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setDebugUtilsObjectTagEXT(
const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT * pTagInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkSetDebugUtilsObjectTagEXT( m_device, reinterpret_cast<const VkDebugUtilsObjectTagInfoEXT *>( pTagInfo ) ) );
}
@@ -12157,6 +12923,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::setDebugUtilsObjectTagEXT( const DebugUtilsObjectTagInfoEXT & tagInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkSetDebugUtilsObjectTagEXT( m_device, reinterpret_cast<const VkDebugUtilsObjectTagInfoEXT *>( &tagInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectTagEXT" );
@@ -12167,6 +12934,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkQueueBeginDebugUtilsLabelEXT( m_queue, reinterpret_cast<const VkDebugUtilsLabelEXT *>( pLabelInfo ) );
}
@@ -12175,6 +12943,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkQueueBeginDebugUtilsLabelEXT( m_queue, reinterpret_cast<const VkDebugUtilsLabelEXT *>( &labelInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -12182,6 +12951,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch>
VULKAN_HPP_INLINE void Queue::endDebugUtilsLabelEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkQueueEndDebugUtilsLabelEXT( m_queue );
}
@@ -12189,6 +12959,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void Queue::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkQueueInsertDebugUtilsLabelEXT( m_queue, reinterpret_cast<const VkDebugUtilsLabelEXT *>( pLabelInfo ) );
}
@@ -12197,6 +12968,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void Queue::insertDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkQueueInsertDebugUtilsLabelEXT( m_queue, reinterpret_cast<const VkDebugUtilsLabelEXT *>( &labelInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -12206,6 +12978,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast<const VkDebugUtilsLabelEXT *>( pLabelInfo ) );
}
@@ -12214,6 +12987,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::beginDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBeginDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast<const VkDebugUtilsLabelEXT *>( &labelInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -12221,6 +12995,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch>
VULKAN_HPP_INLINE void CommandBuffer::endDebugUtilsLabelEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEndDebugUtilsLabelEXT( m_commandBuffer );
}
@@ -12229,6 +13004,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdInsertDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast<const VkDebugUtilsLabelEXT *>( pLabelInfo ) );
}
@@ -12237,6 +13013,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::insertDebugUtilsLabelEXT( const DebugUtilsLabelEXT & labelInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdInsertDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast<const VkDebugUtilsLabelEXT *>( &labelInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -12248,6 +13025,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT * pMessenger,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateDebugUtilsMessengerEXT( m_instance,
reinterpret_cast<const VkDebugUtilsMessengerCreateInfoEXT *>( pCreateInfo ),
@@ -12262,6 +13040,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger;
Result result = static_cast<Result>(
d.vkCreateDebugUtilsMessengerEXT( m_instance,
@@ -12280,6 +13059,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger;
Result result = static_cast<Result>(
d.vkCreateDebugUtilsMessengerEXT( m_instance,
@@ -12300,6 +13080,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDebugUtilsMessengerEXT( m_instance,
static_cast<VkDebugUtilsMessengerEXT>( messenger ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -12312,6 +13093,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDebugUtilsMessengerEXT(
m_instance,
static_cast<VkDebugUtilsMessengerEXT>( messenger ),
@@ -12325,6 +13107,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDebugUtilsMessengerEXT( m_instance,
static_cast<VkDebugUtilsMessengerEXT>( messenger ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -12336,6 +13119,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDebugUtilsMessengerEXT(
m_instance,
static_cast<VkDebugUtilsMessengerEXT>( messenger ),
@@ -12351,6 +13135,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT * pCallbackData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkSubmitDebugUtilsMessageEXT( m_instance,
static_cast<VkDebugUtilsMessageSeverityFlagBitsEXT>( messageSeverity ),
static_cast<VkDebugUtilsMessageTypeFlagsEXT>( messageTypes ),
@@ -12365,6 +13150,7 @@ namespace VULKAN_HPP_NAMESPACE
const DebugUtilsMessengerCallbackDataEXT & callbackData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkSubmitDebugUtilsMessageEXT( m_instance,
static_cast<VkDebugUtilsMessageSeverityFlagBitsEXT>( messageSeverity ),
static_cast<VkDebugUtilsMessageTypeFlagsEXT>( messageTypes ),
@@ -12381,6 +13167,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetAndroidHardwareBufferPropertiesANDROID(
m_device, buffer, reinterpret_cast<VkAndroidHardwareBufferPropertiesANDROID *>( pProperties ) ) );
}
@@ -12391,6 +13178,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID>::type
Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID properties;
Result result = static_cast<Result>( d.vkGetAndroidHardwareBufferPropertiesANDROID(
m_device, &buffer, reinterpret_cast<VkAndroidHardwareBufferPropertiesANDROID *>( &properties ) ) );
@@ -12402,6 +13190,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<StructureChain<X, Y, Z...>>::type
Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID & properties =
structureChain.template get<VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID>();
@@ -12418,6 +13207,7 @@ namespace VULKAN_HPP_NAMESPACE
struct AHardwareBuffer ** pBuffer,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetMemoryAndroidHardwareBufferANDROID(
m_device, reinterpret_cast<const VkMemoryGetAndroidHardwareBufferInfoANDROID *>( pInfo ), pBuffer ) );
}
@@ -12428,6 +13218,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getMemoryAndroidHardwareBufferANDROID( const MemoryGetAndroidHardwareBufferInfoANDROID & info,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
struct AHardwareBuffer * buffer;
Result result = static_cast<Result>( d.vkGetMemoryAndroidHardwareBufferANDROID(
m_device, reinterpret_cast<const VkMemoryGetAndroidHardwareBufferInfoANDROID *>( &info ), &buffer ) );
@@ -12444,6 +13235,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT * pSampleLocationsInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetSampleLocationsEXT( m_commandBuffer,
reinterpret_cast<const VkSampleLocationsInfoEXT *>( pSampleLocationsInfo ) );
}
@@ -12453,6 +13245,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const SampleLocationsInfoEXT & sampleLocationsInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetSampleLocationsEXT( m_commandBuffer,
reinterpret_cast<const VkSampleLocationsInfoEXT *>( &sampleLocationsInfo ) );
}
@@ -12464,6 +13257,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT * pMultisampleProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPhysicalDeviceMultisamplePropertiesEXT(
m_physicalDevice,
static_cast<VkSampleCountFlagBits>( samples ),
@@ -12476,6 +13270,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT multisampleProperties;
d.vkGetPhysicalDeviceMultisamplePropertiesEXT(
m_physicalDevice,
@@ -12493,6 +13288,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetImageMemoryRequirements2KHR( m_device,
reinterpret_cast<const VkImageMemoryRequirementsInfo2 *>( pInfo ),
reinterpret_cast<VkMemoryRequirements2 *>( pMemoryRequirements ) );
@@ -12504,6 +13300,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements;
d.vkGetImageMemoryRequirements2KHR( m_device,
reinterpret_cast<const VkImageMemoryRequirementsInfo2 *>( &info ),
@@ -12516,6 +13313,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2 & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements =
structureChain.template get<VULKAN_HPP_NAMESPACE::MemoryRequirements2>();
@@ -12532,6 +13330,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetBufferMemoryRequirements2KHR( m_device,
reinterpret_cast<const VkBufferMemoryRequirementsInfo2 *>( pInfo ),
reinterpret_cast<VkMemoryRequirements2 *>( pMemoryRequirements ) );
@@ -12543,6 +13342,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements;
d.vkGetBufferMemoryRequirements2KHR( m_device,
reinterpret_cast<const VkBufferMemoryRequirementsInfo2 *>( &info ),
@@ -12555,6 +13355,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2 & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements =
structureChain.template get<VULKAN_HPP_NAMESPACE::MemoryRequirements2>();
@@ -12572,6 +13373,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetImageSparseMemoryRequirements2KHR(
m_device,
reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2 *>( pInfo ),
@@ -12586,6 +13388,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2 & info,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SparseImageMemoryRequirements2, SparseImageMemoryRequirements2Allocator> sparseMemoryRequirements;
uint32_t sparseMemoryRequirementCount;
d.vkGetImageSparseMemoryRequirements2KHR( m_device,
@@ -12614,6 +13417,7 @@ namespace VULKAN_HPP_NAMESPACE
SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<SparseImageMemoryRequirements2, SparseImageMemoryRequirements2Allocator> sparseMemoryRequirements(
sparseImageMemoryRequirements2Allocator );
uint32_t sparseMemoryRequirementCount;
@@ -12641,6 +13445,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructure,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateAccelerationStructureKHR( m_device,
reinterpret_cast<const VkAccelerationStructureCreateInfoKHR *>( pCreateInfo ),
@@ -12656,6 +13461,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure;
Result result = static_cast<Result>( d.vkCreateAccelerationStructureKHR(
m_device,
@@ -12675,6 +13481,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure;
Result result = static_cast<Result>( d.vkCreateAccelerationStructureKHR(
m_device,
@@ -12698,6 +13505,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyAccelerationStructureKHR( m_device,
static_cast<VkAccelerationStructureKHR>( accelerationStructure ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -12710,6 +13518,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyAccelerationStructureKHR(
m_device,
static_cast<VkAccelerationStructureKHR>( accelerationStructure ),
@@ -12723,6 +13532,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyAccelerationStructureKHR( m_device,
static_cast<VkAccelerationStructureKHR>( accelerationStructure ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -12734,6 +13544,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyAccelerationStructureKHR(
m_device,
static_cast<VkAccelerationStructureKHR>( accelerationStructure ),
@@ -12749,6 +13560,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBuildAccelerationStructuresKHR(
m_commandBuffer,
infoCount,
@@ -12763,6 +13575,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR * const> const & pBuildRangeInfos,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
# ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( infos.size() == pBuildRangeInfos.size() );
# else
@@ -12790,6 +13603,7 @@ namespace VULKAN_HPP_NAMESPACE
const uint32_t * const * ppMaxPrimitiveCounts,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBuildAccelerationStructuresIndirectKHR(
m_commandBuffer,
infoCount,
@@ -12808,6 +13622,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const uint32_t * const> const & pMaxPrimitiveCounts,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
# ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( infos.size() == indirectDeviceAddresses.size() );
VULKAN_HPP_ASSERT( infos.size() == indirectStrides.size() );
@@ -12851,6 +13666,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkBuildAccelerationStructuresKHR(
m_device,
static_cast<VkDeferredOperationKHR>( deferredOperation ),
@@ -12867,6 +13683,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR * const> const & pBuildRangeInfos,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
# ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( infos.size() == pBuildRangeInfos.size() );
# else
@@ -12897,6 +13714,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR * pInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCopyAccelerationStructureKHR( m_device,
static_cast<VkDeferredOperationKHR>( deferredOperation ),
@@ -12910,6 +13728,7 @@ namespace VULKAN_HPP_NAMESPACE
const CopyAccelerationStructureInfoKHR & info,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkCopyAccelerationStructureKHR( m_device,
static_cast<VkDeferredOperationKHR>( deferredOperation ),
@@ -12928,6 +13747,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR * pInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCopyAccelerationStructureToMemoryKHR(
m_device,
static_cast<VkDeferredOperationKHR>( deferredOperation ),
@@ -12941,6 +13761,7 @@ namespace VULKAN_HPP_NAMESPACE
const CopyAccelerationStructureToMemoryInfoKHR & info,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkCopyAccelerationStructureToMemoryKHR(
m_device,
static_cast<VkDeferredOperationKHR>( deferredOperation ),
@@ -12959,6 +13780,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR * pInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCopyMemoryToAccelerationStructureKHR(
m_device,
static_cast<VkDeferredOperationKHR>( deferredOperation ),
@@ -12972,6 +13794,7 @@ namespace VULKAN_HPP_NAMESPACE
const CopyMemoryToAccelerationStructureInfoKHR & info,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkCopyMemoryToAccelerationStructureKHR(
m_device,
static_cast<VkDeferredOperationKHR>( deferredOperation ),
@@ -12994,6 +13817,7 @@ namespace VULKAN_HPP_NAMESPACE
size_t stride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkWriteAccelerationStructuresPropertiesKHR(
m_device,
accelerationStructureCount,
@@ -13015,6 +13839,7 @@ namespace VULKAN_HPP_NAMESPACE
size_t stride,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkWriteAccelerationStructuresPropertiesKHR(
m_device,
accelerationStructures.size(),
@@ -13036,6 +13861,7 @@ namespace VULKAN_HPP_NAMESPACE
size_t stride,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_ASSERT( dataSize % sizeof( T ) == 0 );
std::vector<T, Allocator> data( dataSize / sizeof( T ) );
Result result = static_cast<Result>( d.vkWriteAccelerationStructuresPropertiesKHR(
@@ -13058,6 +13884,7 @@ namespace VULKAN_HPP_NAMESPACE
size_t stride,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
T data;
Result result = static_cast<Result>( d.vkWriteAccelerationStructuresPropertiesKHR(
m_device,
@@ -13077,6 +13904,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::copyAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR * pInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyAccelerationStructureKHR( m_commandBuffer,
reinterpret_cast<const VkCopyAccelerationStructureInfoKHR *>( pInfo ) );
}
@@ -13086,6 +13914,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureKHR( const CopyAccelerationStructureInfoKHR & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyAccelerationStructureKHR( m_commandBuffer,
reinterpret_cast<const VkCopyAccelerationStructureInfoKHR *>( &info ) );
}
@@ -13096,6 +13925,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR * pInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyAccelerationStructureToMemoryKHR(
m_commandBuffer, reinterpret_cast<const VkCopyAccelerationStructureToMemoryInfoKHR *>( pInfo ) );
}
@@ -13106,6 +13936,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::copyAccelerationStructureToMemoryKHR( const CopyAccelerationStructureToMemoryInfoKHR & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyAccelerationStructureToMemoryKHR(
m_commandBuffer, reinterpret_cast<const VkCopyAccelerationStructureToMemoryInfoKHR *>( &info ) );
}
@@ -13116,6 +13947,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR * pInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyMemoryToAccelerationStructureKHR(
m_commandBuffer, reinterpret_cast<const VkCopyMemoryToAccelerationStructureInfoKHR *>( pInfo ) );
}
@@ -13126,6 +13958,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::copyMemoryToAccelerationStructureKHR( const CopyMemoryToAccelerationStructureInfoKHR & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyMemoryToAccelerationStructureKHR(
m_commandBuffer, reinterpret_cast<const VkCopyMemoryToAccelerationStructureInfoKHR *>( &info ) );
}
@@ -13136,6 +13969,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR * pInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<DeviceAddress>( d.vkGetAccelerationStructureDeviceAddressKHR(
m_device, reinterpret_cast<const VkAccelerationStructureDeviceAddressInfoKHR *>( pInfo ) ) );
}
@@ -13145,6 +13979,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE DeviceAddress Device::getAccelerationStructureAddressKHR(
const AccelerationStructureDeviceAddressInfoKHR & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetAccelerationStructureDeviceAddressKHR(
m_device, reinterpret_cast<const VkAccelerationStructureDeviceAddressInfoKHR *>( &info ) );
}
@@ -13159,6 +13994,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t firstQuery,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdWriteAccelerationStructuresPropertiesKHR(
m_commandBuffer,
accelerationStructureCount,
@@ -13177,6 +14013,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t firstQuery,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdWriteAccelerationStructuresPropertiesKHR(
m_commandBuffer,
accelerationStructures.size(),
@@ -13193,6 +14030,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR * pCompatibility,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetDeviceAccelerationStructureCompatibilityKHR(
m_device,
reinterpret_cast<const VkAccelerationStructureVersionInfoKHR *>( pVersionInfo ),
@@ -13205,6 +14043,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getAccelerationStructureCompatibilityKHR( const AccelerationStructureVersionInfoKHR & versionInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR compatibility;
d.vkGetDeviceAccelerationStructureCompatibilityKHR(
m_device,
@@ -13222,6 +14061,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR * pSizeInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetAccelerationStructureBuildSizesKHR(
m_device,
static_cast<VkAccelerationStructureBuildTypeKHR>( buildType ),
@@ -13238,6 +14078,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const uint32_t> const & maxPrimitiveCounts,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
# ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( maxPrimitiveCounts.size() == buildInfo.geometryCount );
# else
@@ -13268,6 +14109,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion * pYcbcrConversion,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateSamplerYcbcrConversionKHR( m_device,
reinterpret_cast<const VkSamplerYcbcrConversionCreateInfo *>( pCreateInfo ),
@@ -13283,6 +14125,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion;
Result result = static_cast<Result>( d.vkCreateSamplerYcbcrConversionKHR(
m_device,
@@ -13302,6 +14145,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion;
Result result = static_cast<Result>( d.vkCreateSamplerYcbcrConversionKHR(
m_device,
@@ -13322,6 +14166,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySamplerYcbcrConversionKHR( m_device,
static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -13334,6 +14179,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroySamplerYcbcrConversionKHR(
m_device,
static_cast<VkSamplerYcbcrConversion>( ycbcrConversion ),
@@ -13350,6 +14196,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo * pBindInfos,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkBindBufferMemory2KHR(
m_device, bindInfoCount, reinterpret_cast<const VkBindBufferMemoryInfo *>( pBindInfos ) ) );
}
@@ -13360,6 +14207,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::bindBufferMemory2KHR( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo> const & bindInfos,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkBindBufferMemory2KHR(
m_device, bindInfos.size(), reinterpret_cast<const VkBindBufferMemoryInfo *>( bindInfos.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2KHR" );
@@ -13372,6 +14220,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo * pBindInfos,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkBindImageMemory2KHR(
m_device, bindInfoCount, reinterpret_cast<const VkBindImageMemoryInfo *>( pBindInfos ) ) );
}
@@ -13382,6 +14231,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::bindImageMemory2KHR( ArrayProxy<const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo> const & bindInfos,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkBindImageMemory2KHR(
m_device, bindInfos.size(), reinterpret_cast<const VkBindImageMemoryInfo *>( bindInfos.data() ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2KHR" );
@@ -13396,6 +14246,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetImageDrmFormatModifierPropertiesEXT(
m_device,
static_cast<VkImage>( image ),
@@ -13407,6 +14258,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT>::type
Device::getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT properties;
Result result = static_cast<Result>( d.vkGetImageDrmFormatModifierPropertiesEXT(
m_device,
@@ -13426,6 +14278,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ValidationCacheEXT * pValidationCache,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateValidationCacheEXT( m_device,
reinterpret_cast<const VkValidationCacheCreateInfoEXT *>( pCreateInfo ),
@@ -13440,6 +14293,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache;
Result result = static_cast<Result>(
d.vkCreateValidationCacheEXT( m_device,
@@ -13458,6 +14312,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache;
Result result = static_cast<Result>(
d.vkCreateValidationCacheEXT( m_device,
@@ -13478,6 +14333,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyValidationCacheEXT( m_device,
static_cast<VkValidationCacheEXT>( validationCache ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -13489,6 +14345,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyValidationCacheEXT( m_device,
static_cast<VkValidationCacheEXT>( validationCache ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -13501,6 +14358,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyValidationCacheEXT( m_device,
static_cast<VkValidationCacheEXT>( validationCache ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -13512,6 +14370,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyValidationCacheEXT( m_device,
static_cast<VkValidationCacheEXT>( validationCache ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -13526,6 +14385,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ValidationCacheEXT * pSrcCaches,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkMergeValidationCachesEXT( m_device,
static_cast<VkValidationCacheEXT>( dstCache ),
@@ -13540,6 +14400,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::ValidationCacheEXT> const & srcCaches,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkMergeValidationCachesEXT( m_device,
static_cast<VkValidationCacheEXT>( dstCache ),
@@ -13556,6 +14417,7 @@ namespace VULKAN_HPP_NAMESPACE
void * pData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetValidationCacheDataEXT(
m_device, static_cast<VkValidationCacheEXT>( validationCache ), pDataSize, pData ) );
}
@@ -13566,6 +14428,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<uint8_t, Uint8_tAllocator> data;
size_t dataSize;
Result result;
@@ -13600,6 +14463,7 @@ namespace VULKAN_HPP_NAMESPACE
Uint8_tAllocator & uint8_tAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<uint8_t, Uint8_tAllocator> data( uint8_tAllocator );
size_t dataSize;
Result result;
@@ -13633,6 +14497,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ImageLayout imageLayout,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBindShadingRateImageNV(
m_commandBuffer, static_cast<VkImageView>( imageView ), static_cast<VkImageLayout>( imageLayout ) );
}
@@ -13644,6 +14509,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV * pShadingRatePalettes,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetViewportShadingRatePaletteNV( m_commandBuffer,
firstViewport,
viewportCount,
@@ -13657,6 +14523,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV> const & shadingRatePalettes,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetViewportShadingRatePaletteNV(
m_commandBuffer,
firstViewport,
@@ -13672,6 +14539,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV * pCustomSampleOrders,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetCoarseSampleOrderNV( m_commandBuffer,
static_cast<VkCoarseSampleOrderTypeNV>( sampleOrderType ),
customSampleOrderCount,
@@ -13685,6 +14553,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV> const & customSampleOrders,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetCoarseSampleOrderNV( m_commandBuffer,
static_cast<VkCoarseSampleOrderTypeNV>( sampleOrderType ),
customSampleOrders.size(),
@@ -13701,6 +14570,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructure,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateAccelerationStructureNV( m_device,
reinterpret_cast<const VkAccelerationStructureCreateInfoNV *>( pCreateInfo ),
@@ -13715,6 +14585,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure;
Result result = static_cast<Result>( d.vkCreateAccelerationStructureNV(
m_device,
@@ -13734,6 +14605,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure;
Result result = static_cast<Result>( d.vkCreateAccelerationStructureNV(
m_device,
@@ -13757,6 +14629,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyAccelerationStructureNV( m_device,
static_cast<VkAccelerationStructureNV>( accelerationStructure ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -13769,6 +14642,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyAccelerationStructureNV(
m_device,
static_cast<VkAccelerationStructureNV>( accelerationStructure ),
@@ -13782,6 +14656,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyAccelerationStructureNV( m_device,
static_cast<VkAccelerationStructureNV>( accelerationStructure ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -13793,6 +14668,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyAccelerationStructureNV(
m_device,
static_cast<VkAccelerationStructureNV>( accelerationStructure ),
@@ -13807,6 +14683,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR * pMemoryRequirements,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetAccelerationStructureMemoryRequirementsNV(
m_device,
reinterpret_cast<const VkAccelerationStructureMemoryRequirementsInfoNV *>( pInfo ),
@@ -13819,6 +14696,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR memoryRequirements;
d.vkGetAccelerationStructureMemoryRequirementsNV(
m_device,
@@ -13832,6 +14710,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getAccelerationStructureMemoryRequirementsNV( const AccelerationStructureMemoryRequirementsInfoNV & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR & memoryRequirements =
structureChain.template get<VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR>();
@@ -13849,6 +14728,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV * pBindInfos,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkBindAccelerationStructureMemoryNV(
m_device, bindInfoCount, reinterpret_cast<const VkBindAccelerationStructureMemoryInfoNV *>( pBindInfos ) ) );
}
@@ -13860,6 +14740,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV> const & bindInfos,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkBindAccelerationStructureMemoryNV(
m_device,
bindInfos.size(),
@@ -13880,6 +14761,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBuildAccelerationStructureNV( m_commandBuffer,
reinterpret_cast<const VkAccelerationStructureInfoNV *>( pInfo ),
static_cast<VkBuffer>( instanceData ),
@@ -13903,6 +14785,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBuildAccelerationStructureNV( m_commandBuffer,
reinterpret_cast<const VkAccelerationStructureInfoNV *>( &info ),
static_cast<VkBuffer>( instanceData ),
@@ -13922,6 +14805,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyAccelerationStructureNV( m_commandBuffer,
static_cast<VkAccelerationStructureNV>( dst ),
static_cast<VkAccelerationStructureNV>( src ),
@@ -13945,6 +14829,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t depth,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdTraceRaysNV( m_commandBuffer,
static_cast<VkBuffer>( raygenShaderBindingTableBuffer ),
static_cast<VkDeviceSize>( raygenShaderBindingOffset ),
@@ -13971,6 +14856,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Pipeline * pPipelines,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateRayTracingPipelinesNV( m_device,
static_cast<VkPipelineCache>( pipelineCache ),
@@ -13989,6 +14875,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<Pipeline, PipelineAllocator> pipelines( createInfos.size() );
Result result = static_cast<Result>(
d.vkCreateRayTracingPipelinesNV( m_device,
@@ -14017,6 +14904,7 @@ namespace VULKAN_HPP_NAMESPACE
PipelineAllocator & pipelineAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<Pipeline, PipelineAllocator> pipelines( createInfos.size(), pipelineAllocator );
Result result = static_cast<Result>(
d.vkCreateRayTracingPipelinesNV( m_device,
@@ -14040,6 +14928,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Pipeline pipeline;
Result result = static_cast<Result>(
d.vkCreateRayTracingPipelinesNV( m_device,
@@ -14065,6 +14954,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<Pipeline, Dispatch>, PipelineAllocator> uniquePipelines;
std::vector<Pipeline> pipelines( createInfos.size() );
Result result = static_cast<Result>(
@@ -14105,6 +14995,7 @@ namespace VULKAN_HPP_NAMESPACE
PipelineAllocator & pipelineAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<Pipeline, Dispatch>, PipelineAllocator> uniquePipelines( pipelineAllocator );
std::vector<Pipeline> pipelines( createInfos.size() );
Result result = static_cast<Result>(
@@ -14139,6 +15030,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Pipeline pipeline;
Result result = static_cast<Result>(
d.vkCreateRayTracingPipelinesNV( m_device,
@@ -14168,6 +15060,7 @@ namespace VULKAN_HPP_NAMESPACE
void * pData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesNV(
m_device, static_cast<VkPipeline>( pipeline ), firstGroup, groupCount, dataSize, pData ) );
}
@@ -14183,6 +15076,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<T> const & data,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesNV( m_device,
static_cast<VkPipeline>( pipeline ),
@@ -14201,6 +15095,7 @@ namespace VULKAN_HPP_NAMESPACE
size_t dataSize,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_ASSERT( dataSize % sizeof( T ) == 0 );
std::vector<T, Allocator> data( dataSize / sizeof( T ) );
Result result =
@@ -14220,6 +15115,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t groupCount,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
T data;
Result result = static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesNV( m_device,
static_cast<VkPipeline>( pipeline ),
@@ -14238,6 +15134,7 @@ namespace VULKAN_HPP_NAMESPACE
void * pData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetAccelerationStructureHandleNV(
m_device, static_cast<VkAccelerationStructureNV>( accelerationStructure ), dataSize, pData ) );
}
@@ -14251,6 +15148,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<T> const & data,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkGetAccelerationStructureHandleNV( m_device,
static_cast<VkAccelerationStructureNV>( accelerationStructure ),
@@ -14265,6 +15163,7 @@ namespace VULKAN_HPP_NAMESPACE
size_t dataSize,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_ASSERT( dataSize % sizeof( T ) == 0 );
std::vector<T, Allocator> data( dataSize / sizeof( T ) );
Result result = static_cast<Result>(
@@ -14280,6 +15179,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
T data;
Result result = static_cast<Result>(
d.vkGetAccelerationStructureHandleNV( m_device,
@@ -14299,6 +15199,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t firstQuery,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdWriteAccelerationStructuresPropertiesNV(
m_commandBuffer,
accelerationStructureCount,
@@ -14317,6 +15218,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t firstQuery,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdWriteAccelerationStructuresPropertiesNV(
m_commandBuffer,
accelerationStructures.size(),
@@ -14332,6 +15234,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::compileDeferredNV(
VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t shader, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCompileDeferredNV( m_device, static_cast<VkPipeline>( pipeline ), shader ) );
}
#else
@@ -14339,6 +15242,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::compileDeferredNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t shader, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkCompileDeferredNV( m_device, static_cast<VkPipeline>( pipeline ), shader ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::compileDeferredNV" );
@@ -14353,6 +15257,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport * pSupport,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetDescriptorSetLayoutSupportKHR( m_device,
reinterpret_cast<const VkDescriptorSetLayoutCreateInfo *>( pCreateInfo ),
reinterpret_cast<VkDescriptorSetLayoutSupport *>( pSupport ) );
@@ -14364,6 +15269,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support;
d.vkGetDescriptorSetLayoutSupportKHR( m_device,
reinterpret_cast<const VkDescriptorSetLayoutCreateInfo *>( &createInfo ),
@@ -14376,6 +15282,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getDescriptorSetLayoutSupportKHR( const DescriptorSetLayoutCreateInfo & createInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport & support =
structureChain.template get<VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport>();
@@ -14397,6 +15304,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t stride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawIndirectCountKHR( m_commandBuffer,
static_cast<VkBuffer>( buffer ),
static_cast<VkDeviceSize>( offset ),
@@ -14415,6 +15323,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t stride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawIndexedIndirectCountKHR( m_commandBuffer,
static_cast<VkBuffer>( buffer ),
static_cast<VkDeviceSize>( offset ),
@@ -14433,6 +15342,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT * pMemoryHostPointerProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetMemoryHostPointerPropertiesEXT(
m_device,
static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ),
@@ -14448,6 +15358,7 @@ namespace VULKAN_HPP_NAMESPACE
const void * pHostPointer,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT memoryHostPointerProperties;
Result result = static_cast<Result>( d.vkGetMemoryHostPointerPropertiesEXT(
m_device,
@@ -14468,6 +15379,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t marker,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdWriteBufferMarkerAMD( m_commandBuffer,
static_cast<VkPipelineStageFlagBits>( pipelineStage ),
static_cast<VkBuffer>( dstBuffer ),
@@ -14483,6 +15395,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::TimeDomainEXT * pTimeDomains,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(
m_physicalDevice, pTimeDomainCount, reinterpret_cast<VkTimeDomainEXT *>( pTimeDomains ) ) );
}
@@ -14493,6 +15406,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<TimeDomainEXT, TimeDomainEXTAllocator>>::type
PhysicalDevice::getCalibrateableTimeDomainsEXT( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<TimeDomainEXT, TimeDomainEXTAllocator> timeDomains;
uint32_t timeDomainCount;
Result result;
@@ -14525,6 +15439,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getCalibrateableTimeDomainsEXT( TimeDomainEXTAllocator & timeDomainEXTAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<TimeDomainEXT, TimeDomainEXTAllocator> timeDomains( timeDomainEXTAllocator );
uint32_t timeDomainCount;
Result result;
@@ -14557,6 +15472,7 @@ namespace VULKAN_HPP_NAMESPACE
uint64_t * pMaxDeviation,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetCalibratedTimestampsEXT( m_device,
timestampCount,
@@ -14574,6 +15490,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<uint64_t> const & timestamps,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
# ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( timestampInfos.size() == timestamps.size() );
# else
@@ -14601,6 +15518,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoEXT> const & timestampInfos,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::pair<std::vector<uint64_t, Uint64_tAllocator>, uint64_t> data(
std::piecewise_construct, std::forward_as_tuple( timestampInfos.size() ), std::forward_as_tuple( 0 ) );
std::vector<uint64_t, Uint64_tAllocator> & timestamps = data.first;
@@ -14625,6 +15543,7 @@ namespace VULKAN_HPP_NAMESPACE
Uint64_tAllocator & uint64_tAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::pair<std::vector<uint64_t, Uint64_tAllocator>, uint64_t> data(
std::piecewise_construct,
std::forward_as_tuple( timestampInfos.size(), uint64_tAllocator ),
@@ -14648,6 +15567,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t firstTask,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawMeshTasksNV( m_commandBuffer, taskCount, firstTask );
}
@@ -14658,6 +15578,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t stride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawMeshTasksIndirectNV(
m_commandBuffer, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceSize>( offset ), drawCount, stride );
}
@@ -14672,6 +15593,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t stride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawMeshTasksIndirectCountNV( m_commandBuffer,
static_cast<VkBuffer>( buffer ),
static_cast<VkDeviceSize>( offset ),
@@ -14689,6 +15611,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::Rect2D * pExclusiveScissors,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetExclusiveScissorNV( m_commandBuffer,
firstExclusiveScissor,
exclusiveScissorCount,
@@ -14702,6 +15625,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::Rect2D> const & exclusiveScissors,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetExclusiveScissorNV( m_commandBuffer,
firstExclusiveScissor,
exclusiveScissors.size(),
@@ -14715,6 +15639,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setCheckpointNV( const void * pCheckpointMarker,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetCheckpointNV( m_commandBuffer, pCheckpointMarker );
}
@@ -14723,6 +15648,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::CheckpointDataNV * pCheckpointData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetQueueCheckpointDataNV(
m_queue, pCheckpointDataCount, reinterpret_cast<VkCheckpointDataNV *>( pCheckpointData ) );
}
@@ -14732,6 +15658,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<CheckpointDataNV, CheckpointDataNVAllocator>
Queue::getCheckpointDataNV( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<CheckpointDataNV, CheckpointDataNVAllocator> checkpointData;
uint32_t checkpointDataCount;
d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, nullptr );
@@ -14749,6 +15676,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<CheckpointDataNV, CheckpointDataNVAllocator>
Queue::getCheckpointDataNV( CheckpointDataNVAllocator & checkpointDataNVAllocator, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<CheckpointDataNV, CheckpointDataNVAllocator> checkpointData( checkpointDataNVAllocator );
uint32_t checkpointDataCount;
d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, nullptr );
@@ -14766,6 +15694,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSemaphoreCounterValueKHR(
VULKAN_HPP_NAMESPACE::Semaphore semaphore, uint64_t * pValue, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetSemaphoreCounterValueKHR( m_device, static_cast<VkSemaphore>( semaphore ), pValue ) );
}
@@ -14775,6 +15704,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<uint64_t>::type
Device::getSemaphoreCounterValueKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
uint64_t value;
Result result =
static_cast<Result>( d.vkGetSemaphoreCounterValueKHR( m_device, static_cast<VkSemaphore>( semaphore ), &value ) );
@@ -14788,6 +15718,7 @@ namespace VULKAN_HPP_NAMESPACE
uint64_t timeout,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkWaitSemaphoresKHR( m_device, reinterpret_cast<const VkSemaphoreWaitInfo *>( pWaitInfo ), timeout ) );
}
@@ -14798,6 +15729,7 @@ namespace VULKAN_HPP_NAMESPACE
uint64_t timeout,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkWaitSemaphoresKHR( m_device, reinterpret_cast<const VkSemaphoreWaitInfo *>( &waitInfo ), timeout ) );
return createResultValue( result,
@@ -14810,6 +15742,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::signalSemaphoreKHR(
const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo * pSignalInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkSignalSemaphoreKHR( m_device, reinterpret_cast<const VkSemaphoreSignalInfo *>( pSignalInfo ) ) );
}
@@ -14819,6 +15752,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::signalSemaphoreKHR( const SemaphoreSignalInfo & signalInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkSignalSemaphoreKHR( m_device, reinterpret_cast<const VkSemaphoreSignalInfo *>( &signalInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphoreKHR" );
@@ -14832,6 +15766,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL * pInitializeInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkInitializePerformanceApiINTEL(
m_device, reinterpret_cast<const VkInitializePerformanceApiInfoINTEL *>( pInitializeInfo ) ) );
}
@@ -14842,6 +15777,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::initializePerformanceApiINTEL( const InitializePerformanceApiInfoINTEL & initializeInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkInitializePerformanceApiINTEL(
m_device, reinterpret_cast<const VkInitializePerformanceApiInfoINTEL *>( &initializeInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::initializePerformanceApiINTEL" );
@@ -14851,6 +15787,7 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch>
VULKAN_HPP_INLINE void Device::uninitializePerformanceApiINTEL( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkUninitializePerformanceApiINTEL( m_device );
}
@@ -14858,6 +15795,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::setPerformanceMarkerINTEL(
const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL * pMarkerInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCmdSetPerformanceMarkerINTEL(
m_commandBuffer, reinterpret_cast<const VkPerformanceMarkerInfoINTEL *>( pMarkerInfo ) ) );
}
@@ -14867,6 +15805,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
CommandBuffer::setPerformanceMarkerINTEL( const PerformanceMarkerInfoINTEL & markerInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkCmdSetPerformanceMarkerINTEL(
m_commandBuffer, reinterpret_cast<const VkPerformanceMarkerInfoINTEL *>( &markerInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceMarkerINTEL" );
@@ -14878,6 +15817,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL * pMarkerInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCmdSetPerformanceStreamMarkerINTEL(
m_commandBuffer, reinterpret_cast<const VkPerformanceStreamMarkerInfoINTEL *>( pMarkerInfo ) ) );
}
@@ -14888,6 +15828,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::setPerformanceStreamMarkerINTEL( const PerformanceStreamMarkerInfoINTEL & markerInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkCmdSetPerformanceStreamMarkerINTEL(
m_commandBuffer, reinterpret_cast<const VkPerformanceStreamMarkerInfoINTEL *>( &markerInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceStreamMarkerINTEL" );
@@ -14899,6 +15840,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL * pOverrideInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkCmdSetPerformanceOverrideINTEL(
m_commandBuffer, reinterpret_cast<const VkPerformanceOverrideInfoINTEL *>( pOverrideInfo ) ) );
}
@@ -14909,6 +15851,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::setPerformanceOverrideINTEL( const PerformanceOverrideInfoINTEL & overrideInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkCmdSetPerformanceOverrideINTEL(
m_commandBuffer, reinterpret_cast<const VkPerformanceOverrideInfoINTEL *>( &overrideInfo ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceOverrideINTEL" );
@@ -14921,6 +15864,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL * pConfiguration,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkAcquirePerformanceConfigurationINTEL(
m_device,
reinterpret_cast<const VkPerformanceConfigurationAcquireInfoINTEL *>( pAcquireInfo ),
@@ -14934,6 +15878,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::acquirePerformanceConfigurationINTEL( const PerformanceConfigurationAcquireInfoINTEL & acquireInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration;
Result result = static_cast<Result>( d.vkAcquirePerformanceConfigurationINTEL(
m_device,
@@ -14950,6 +15895,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::acquirePerformanceConfigurationINTELUnique( const PerformanceConfigurationAcquireInfoINTEL & acquireInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration;
Result result = static_cast<Result>( d.vkAcquirePerformanceConfigurationINTEL(
m_device,
@@ -14970,6 +15916,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::releasePerformanceConfigurationINTEL(
VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkReleasePerformanceConfigurationINTEL(
m_device, static_cast<VkPerformanceConfigurationINTEL>( configuration ) ) );
}
@@ -14979,6 +15926,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::releasePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkReleasePerformanceConfigurationINTEL(
m_device, static_cast<VkPerformanceConfigurationINTEL>( configuration ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::releasePerformanceConfigurationINTEL" );
@@ -14990,6 +15938,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::release(
VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkReleasePerformanceConfigurationINTEL(
m_device, static_cast<VkPerformanceConfigurationINTEL>( configuration ) ) );
}
@@ -14998,6 +15947,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::release( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkReleasePerformanceConfigurationINTEL(
m_device, static_cast<VkPerformanceConfigurationINTEL>( configuration ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::release" );
@@ -15009,6 +15959,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::setPerformanceConfigurationINTEL(
VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkQueueSetPerformanceConfigurationINTEL(
m_queue, static_cast<VkPerformanceConfigurationINTEL>( configuration ) ) );
}
@@ -15018,6 +15969,7 @@ namespace VULKAN_HPP_NAMESPACE
Queue::setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkQueueSetPerformanceConfigurationINTEL(
m_queue, static_cast<VkPerformanceConfigurationINTEL>( configuration ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::setPerformanceConfigurationINTEL" );
@@ -15030,6 +15982,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PerformanceValueINTEL * pValue,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetPerformanceParameterINTEL( m_device,
static_cast<VkPerformanceParameterTypeINTEL>( parameter ),
@@ -15043,6 +15996,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PerformanceValueINTEL value;
Result result =
static_cast<Result>( d.vkGetPerformanceParameterINTEL( m_device,
@@ -15059,6 +16013,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkSetLocalDimmingAMD(
m_device, static_cast<VkSwapchainKHR>( swapChain ), static_cast<VkBool32>( localDimmingEnable ) );
}
@@ -15073,6 +16028,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateImagePipeSurfaceFUCHSIA( m_instance,
reinterpret_cast<const VkImagePipeSurfaceCreateInfoFUCHSIA *>( pCreateInfo ),
@@ -15088,6 +16044,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateImagePipeSurfaceFUCHSIA(
m_instance,
@@ -15107,6 +16064,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>( d.vkCreateImagePipeSurfaceFUCHSIA(
m_instance,
@@ -15132,6 +16090,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateMetalSurfaceEXT( m_instance,
reinterpret_cast<const VkMetalSurfaceCreateInfoEXT *>( pCreateInfo ),
@@ -15147,6 +16106,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateMetalSurfaceEXT( m_instance,
@@ -15165,6 +16125,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateMetalSurfaceEXT( m_instance,
@@ -15188,6 +16149,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateKHR * pFragmentShadingRates,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceFragmentShadingRatesKHR(
m_physicalDevice,
pFragmentShadingRateCount,
@@ -15200,6 +16162,7 @@ namespace VULKAN_HPP_NAMESPACE
std::vector<PhysicalDeviceFragmentShadingRateKHR, PhysicalDeviceFragmentShadingRateKHRAllocator>>::type
PhysicalDevice::getFragmentShadingRatesKHR( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PhysicalDeviceFragmentShadingRateKHR, PhysicalDeviceFragmentShadingRateKHRAllocator>
fragmentShadingRates;
uint32_t fragmentShadingRateCount;
@@ -15237,6 +16200,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDeviceFragmentShadingRateKHRAllocator & physicalDeviceFragmentShadingRateKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PhysicalDeviceFragmentShadingRateKHR, PhysicalDeviceFragmentShadingRateKHRAllocator>
fragmentShadingRates( physicalDeviceFragmentShadingRateKHRAllocator );
uint32_t fragmentShadingRateCount;
@@ -15270,6 +16234,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2],
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetFragmentShadingRateKHR( m_commandBuffer,
reinterpret_cast<const VkExtent2D *>( pFragmentSize ),
reinterpret_cast<const VkFragmentShadingRateCombinerOpKHR *>( combinerOps ) );
@@ -15282,6 +16247,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2],
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetFragmentShadingRateKHR( m_commandBuffer,
reinterpret_cast<const VkExtent2D *>( &fragmentSize ),
reinterpret_cast<const VkFragmentShadingRateCombinerOpKHR *>( combinerOps ) );
@@ -15294,6 +16260,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressEXT(
const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<DeviceAddress>(
d.vkGetBufferDeviceAddressEXT( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo *>( pInfo ) ) );
}
@@ -15303,6 +16270,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressEXT( const BufferDeviceAddressInfo & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetBufferDeviceAddressEXT( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo *>( &info ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -15315,6 +16283,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PhysicalDeviceToolPropertiesEXT * pToolProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceToolPropertiesEXT(
m_physicalDevice, pToolCount, reinterpret_cast<VkPhysicalDeviceToolPropertiesEXT *>( pToolProperties ) ) );
}
@@ -15325,6 +16294,7 @@ namespace VULKAN_HPP_NAMESPACE
std::vector<PhysicalDeviceToolPropertiesEXT, PhysicalDeviceToolPropertiesEXTAllocator>>::type
PhysicalDevice::getToolPropertiesEXT( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PhysicalDeviceToolPropertiesEXT, PhysicalDeviceToolPropertiesEXTAllocator> toolProperties;
uint32_t toolCount;
Result result;
@@ -15359,6 +16329,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getToolPropertiesEXT(
PhysicalDeviceToolPropertiesEXTAllocator & physicalDeviceToolPropertiesEXTAllocator, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PhysicalDeviceToolPropertiesEXT, PhysicalDeviceToolPropertiesEXTAllocator> toolProperties(
physicalDeviceToolPropertiesEXTAllocator );
uint32_t toolCount;
@@ -15385,6 +16356,36 @@ namespace VULKAN_HPP_NAMESPACE
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+ //=== VK_KHR_present_wait ===
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Dispatch>
+ VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result
+ Device::waitForPresentKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
+ uint64_t presentId,
+ uint64_t timeout,
+ Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
+ {
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
+ return static_cast<Result>(
+ d.vkWaitForPresentKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), presentId, timeout ) );
+ }
+#else
+ template <typename Dispatch>
+ VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitForPresentKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
+ uint64_t presentId,
+ uint64_t timeout,
+ Dispatch const & d ) const
+ {
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
+ Result result = static_cast<Result>(
+ d.vkWaitForPresentKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), presentId, timeout ) );
+ return createResultValue( result,
+ VULKAN_HPP_NAMESPACE_STRING "::Device::waitForPresentKHR",
+ { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
//=== VK_NV_cooperative_matrix ===
template <typename Dispatch>
@@ -15393,6 +16394,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(
m_physicalDevice, pPropertyCount, reinterpret_cast<VkCooperativeMatrixPropertiesNV *>( pProperties ) ) );
}
@@ -15403,6 +16405,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<std::vector<CooperativeMatrixPropertiesNV, CooperativeMatrixPropertiesNVAllocator>>::type
PhysicalDevice::getCooperativeMatrixPropertiesNV( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<CooperativeMatrixPropertiesNV, CooperativeMatrixPropertiesNVAllocator> properties;
uint32_t propertyCount;
Result result;
@@ -15438,6 +16441,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getCooperativeMatrixPropertiesNV(
CooperativeMatrixPropertiesNVAllocator & cooperativeMatrixPropertiesNVAllocator, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<CooperativeMatrixPropertiesNV, CooperativeMatrixPropertiesNVAllocator> properties(
cooperativeMatrixPropertiesNVAllocator );
uint32_t propertyCount;
@@ -15473,6 +16477,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV * pCombinations,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(
m_physicalDevice,
pCombinationCount,
@@ -15485,6 +16490,7 @@ namespace VULKAN_HPP_NAMESPACE
std::vector<FramebufferMixedSamplesCombinationNV, FramebufferMixedSamplesCombinationNVAllocator>>::type
PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<FramebufferMixedSamplesCombinationNV, FramebufferMixedSamplesCombinationNVAllocator> combinations;
uint32_t combinationCount;
Result result;
@@ -15523,6 +16529,7 @@ namespace VULKAN_HPP_NAMESPACE
FramebufferMixedSamplesCombinationNVAllocator & framebufferMixedSamplesCombinationNVAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<FramebufferMixedSamplesCombinationNV, FramebufferMixedSamplesCombinationNVAllocator> combinations(
framebufferMixedSamplesCombinationNVAllocator );
uint32_t combinationCount;
@@ -15562,6 +16569,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPhysicalDeviceSurfacePresentModes2EXT(
m_physicalDevice,
reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR *>( pSurfaceInfo ),
@@ -15576,6 +16584,7 @@ namespace VULKAN_HPP_NAMESPACE
PhysicalDevice::getSurfacePresentModes2EXT( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PresentModeKHR, PresentModeKHRAllocator> presentModes;
uint32_t presentModeCount;
Result result;
@@ -15615,6 +16624,7 @@ namespace VULKAN_HPP_NAMESPACE
PresentModeKHRAllocator & presentModeKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PresentModeKHR, PresentModeKHRAllocator> presentModes( presentModeKHRAllocator );
uint32_t presentModeCount;
Result result;
@@ -15650,6 +16660,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::acquireFullScreenExclusiveModeEXT(
VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkAcquireFullScreenExclusiveModeEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
}
@@ -15658,6 +16669,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::acquireFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkAcquireFullScreenExclusiveModeEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireFullScreenExclusiveModeEXT" );
@@ -15669,6 +16681,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::releaseFullScreenExclusiveModeEXT(
VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkReleaseFullScreenExclusiveModeEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
}
@@ -15677,6 +16690,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
Device::releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkReleaseFullScreenExclusiveModeEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::Device::releaseFullScreenExclusiveModeEXT" );
@@ -15689,6 +16703,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR * pModes,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetDeviceGroupSurfacePresentModes2EXT(
m_device,
reinterpret_cast<const VkPhysicalDeviceSurfaceInfo2KHR *>( pSurfaceInfo ),
@@ -15702,6 +16717,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getGroupSurfacePresentModes2EXT( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes;
Result result = static_cast<Result>( d.vkGetDeviceGroupSurfacePresentModes2EXT(
m_device,
@@ -15721,6 +16737,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateHeadlessSurfaceEXT( m_instance,
reinterpret_cast<const VkHeadlessSurfaceCreateInfoEXT *>( pCreateInfo ),
@@ -15736,6 +16753,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateHeadlessSurfaceEXT( m_instance,
@@ -15754,6 +16772,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateHeadlessSurfaceEXT( m_instance,
@@ -15774,6 +16793,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressKHR(
const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<DeviceAddress>(
d.vkGetBufferDeviceAddressKHR( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo *>( pInfo ) ) );
}
@@ -15783,6 +16803,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressKHR( const BufferDeviceAddressInfo & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetBufferDeviceAddressKHR( m_device, reinterpret_cast<const VkBufferDeviceAddressInfo *>( &info ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -15791,6 +16812,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddressKHR(
const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetBufferOpaqueCaptureAddressKHR( m_device,
reinterpret_cast<const VkBufferDeviceAddressInfo *>( pInfo ) );
}
@@ -15800,6 +16822,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddressKHR( const BufferDeviceAddressInfo & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetBufferOpaqueCaptureAddressKHR( m_device,
reinterpret_cast<const VkBufferDeviceAddressInfo *>( &info ) );
}
@@ -15810,6 +16833,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo * pInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetDeviceMemoryOpaqueCaptureAddressKHR(
m_device, reinterpret_cast<const VkDeviceMemoryOpaqueCaptureAddressInfo *>( pInfo ) );
}
@@ -15819,6 +16843,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddressKHR(
const DeviceMemoryOpaqueCaptureAddressInfo & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetDeviceMemoryOpaqueCaptureAddressKHR(
m_device, reinterpret_cast<const VkDeviceMemoryOpaqueCaptureAddressInfo *>( &info ) );
}
@@ -15831,6 +16856,7 @@ namespace VULKAN_HPP_NAMESPACE
uint16_t lineStipplePattern,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetLineStippleEXT( m_commandBuffer, lineStippleFactor, lineStipplePattern );
}
@@ -15842,6 +16868,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t queryCount,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkResetQueryPoolEXT( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount );
}
@@ -15851,6 +16878,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setCullModeEXT( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetCullModeEXT( m_commandBuffer, static_cast<VkCullModeFlags>( cullMode ) );
}
@@ -15858,6 +16886,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setFrontFaceEXT( VULKAN_HPP_NAMESPACE::FrontFace frontFace,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetFrontFaceEXT( m_commandBuffer, static_cast<VkFrontFace>( frontFace ) );
}
@@ -15866,6 +16895,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::setPrimitiveTopologyEXT( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetPrimitiveTopologyEXT( m_commandBuffer, static_cast<VkPrimitiveTopology>( primitiveTopology ) );
}
@@ -15874,6 +16904,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::Viewport * pViewports,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetViewportWithCountEXT(
m_commandBuffer, viewportCount, reinterpret_cast<const VkViewport *>( pViewports ) );
}
@@ -15884,6 +16915,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::setViewportWithCountEXT( ArrayProxy<const VULKAN_HPP_NAMESPACE::Viewport> const & viewports,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetViewportWithCountEXT(
m_commandBuffer, viewports.size(), reinterpret_cast<const VkViewport *>( viewports.data() ) );
}
@@ -15894,6 +16926,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::Rect2D * pScissors,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetScissorWithCountEXT( m_commandBuffer, scissorCount, reinterpret_cast<const VkRect2D *>( pScissors ) );
}
@@ -15903,6 +16936,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::setScissorWithCountEXT( ArrayProxy<const VULKAN_HPP_NAMESPACE::Rect2D> const & scissors,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetScissorWithCountEXT(
m_commandBuffer, scissors.size(), reinterpret_cast<const VkRect2D *>( scissors.data() ) );
}
@@ -15917,6 +16951,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::DeviceSize * pStrides,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBindVertexBuffers2EXT( m_commandBuffer,
firstBinding,
bindingCount,
@@ -15936,6 +16971,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::DeviceSize> const & strides,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
# ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( buffers.size() == offsets.size() );
VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() );
@@ -15972,6 +17008,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setDepthTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetDepthTestEnableEXT( m_commandBuffer, static_cast<VkBool32>( depthTestEnable ) );
}
@@ -15979,6 +17016,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setDepthWriteEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetDepthWriteEnableEXT( m_commandBuffer, static_cast<VkBool32>( depthWriteEnable ) );
}
@@ -15986,6 +17024,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setDepthCompareOpEXT( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetDepthCompareOpEXT( m_commandBuffer, static_cast<VkCompareOp>( depthCompareOp ) );
}
@@ -15993,6 +17032,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setDepthBoundsTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetDepthBoundsTestEnableEXT( m_commandBuffer, static_cast<VkBool32>( depthBoundsTestEnable ) );
}
@@ -16000,6 +17040,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setStencilTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetStencilTestEnableEXT( m_commandBuffer, static_cast<VkBool32>( stencilTestEnable ) );
}
@@ -16011,6 +17052,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::CompareOp compareOp,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetStencilOpEXT( m_commandBuffer,
static_cast<VkStencilFaceFlags>( faceMask ),
static_cast<VkStencilOp>( failOp ),
@@ -16027,6 +17069,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeferredOperationKHR * pDeferredOperation,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateDeferredOperationKHR( m_device,
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ),
@@ -16038,6 +17081,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::DeferredOperationKHR>::type
Device::createDeferredOperationKHR( Optional<const AllocationCallbacks> allocator, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation;
Result result = static_cast<Result>(
d.vkCreateDeferredOperationKHR( m_device,
@@ -16053,6 +17097,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<VULKAN_HPP_NAMESPACE::DeferredOperationKHR, Dispatch>>::type
Device::createDeferredOperationKHRUnique( Optional<const AllocationCallbacks> allocator, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation;
Result result = static_cast<Result>(
d.vkCreateDeferredOperationKHR( m_device,
@@ -16072,6 +17117,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDeferredOperationKHR( m_device,
static_cast<VkDeferredOperationKHR>( operation ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -16083,6 +17129,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDeferredOperationKHR( m_device,
static_cast<VkDeferredOperationKHR>( operation ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -16095,6 +17142,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDeferredOperationKHR( m_device,
static_cast<VkDeferredOperationKHR>( operation ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -16106,6 +17154,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyDeferredOperationKHR( m_device,
static_cast<VkDeferredOperationKHR>( operation ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -16117,6 +17166,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE uint32_t Device::getDeferredOperationMaxConcurrencyKHR(
VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetDeferredOperationMaxConcurrencyKHR( m_device, static_cast<VkDeferredOperationKHR>( operation ) );
}
@@ -16125,6 +17175,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getDeferredOperationResultKHR(
VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetDeferredOperationResultKHR( m_device, static_cast<VkDeferredOperationKHR>( operation ) ) );
}
@@ -16133,6 +17184,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getDeferredOperationResultKHR(
VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkGetDeferredOperationResultKHR( m_device, static_cast<VkDeferredOperationKHR>( operation ) ) );
return createResultValue( result,
@@ -16146,6 +17198,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::deferredOperationJoinKHR(
VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkDeferredOperationJoinKHR( m_device, static_cast<VkDeferredOperationKHR>( operation ) ) );
}
@@ -16154,6 +17207,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result
Device::deferredOperationJoinKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkDeferredOperationJoinKHR( m_device, static_cast<VkDeferredOperationKHR>( operation ) ) );
return createResultValue( result,
@@ -16173,6 +17227,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR * pProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetPipelineExecutablePropertiesKHR( m_device,
reinterpret_cast<const VkPipelineInfoKHR *>( pPipelineInfo ),
@@ -16186,6 +17241,7 @@ namespace VULKAN_HPP_NAMESPACE
std::vector<PipelineExecutablePropertiesKHR, PipelineExecutablePropertiesKHRAllocator>>::type
Device::getPipelineExecutablePropertiesKHR( const PipelineInfoKHR & pipelineInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PipelineExecutablePropertiesKHR, PipelineExecutablePropertiesKHRAllocator> properties;
uint32_t executableCount;
Result result;
@@ -16224,6 +17280,7 @@ namespace VULKAN_HPP_NAMESPACE
PipelineExecutablePropertiesKHRAllocator & pipelineExecutablePropertiesKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PipelineExecutablePropertiesKHR, PipelineExecutablePropertiesKHRAllocator> properties(
pipelineExecutablePropertiesKHRAllocator );
uint32_t executableCount;
@@ -16259,6 +17316,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticKHR * pStatistics,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetPipelineExecutableStatisticsKHR( m_device,
reinterpret_cast<const VkPipelineExecutableInfoKHR *>( pExecutableInfo ),
@@ -16273,6 +17331,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getPipelineExecutableStatisticsKHR( const PipelineExecutableInfoKHR & executableInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PipelineExecutableStatisticKHR, PipelineExecutableStatisticKHRAllocator> statistics;
uint32_t statisticCount;
Result result;
@@ -16314,6 +17373,7 @@ namespace VULKAN_HPP_NAMESPACE
PipelineExecutableStatisticKHRAllocator & pipelineExecutableStatisticKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PipelineExecutableStatisticKHR, PipelineExecutableStatisticKHRAllocator> statistics(
pipelineExecutableStatisticKHRAllocator );
uint32_t statisticCount;
@@ -16352,6 +17412,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR * pInternalRepresentations,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetPipelineExecutableInternalRepresentationsKHR(
m_device,
reinterpret_cast<const VkPipelineExecutableInfoKHR *>( pExecutableInfo ),
@@ -16367,6 +17428,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getPipelineExecutableInternalRepresentationsKHR( const PipelineExecutableInfoKHR & executableInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PipelineExecutableInternalRepresentationKHR, PipelineExecutableInternalRepresentationKHRAllocator>
internalRepresentations;
uint32_t internalRepresentationCount;
@@ -16412,6 +17474,7 @@ namespace VULKAN_HPP_NAMESPACE
PipelineExecutableInternalRepresentationKHRAllocator & pipelineExecutableInternalRepresentationKHRAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<PipelineExecutableInternalRepresentationKHR, PipelineExecutableInternalRepresentationKHRAllocator>
internalRepresentations( pipelineExecutableInternalRepresentationKHRAllocator );
uint32_t internalRepresentationCount;
@@ -16452,6 +17515,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetGeneratedCommandsMemoryRequirementsNV(
m_device,
reinterpret_cast<const VkGeneratedCommandsMemoryRequirementsInfoNV *>( pInfo ),
@@ -16464,6 +17528,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getGeneratedCommandsMemoryRequirementsNV( const GeneratedCommandsMemoryRequirementsInfoNV & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements;
d.vkGetGeneratedCommandsMemoryRequirementsNV(
m_device,
@@ -16477,6 +17542,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getGeneratedCommandsMemoryRequirementsNV( const GeneratedCommandsMemoryRequirementsInfoNV & info,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
StructureChain<X, Y, Z...> structureChain;
VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements =
structureChain.template get<VULKAN_HPP_NAMESPACE::MemoryRequirements2>();
@@ -16493,6 +17559,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV * pGeneratedCommandsInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdPreprocessGeneratedCommandsNV(
m_commandBuffer, reinterpret_cast<const VkGeneratedCommandsInfoNV *>( pGeneratedCommandsInfo ) );
}
@@ -16503,6 +17570,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::preprocessGeneratedCommandsNV( const GeneratedCommandsInfoNV & generatedCommandsInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdPreprocessGeneratedCommandsNV(
m_commandBuffer, reinterpret_cast<const VkGeneratedCommandsInfoNV *>( &generatedCommandsInfo ) );
}
@@ -16514,6 +17582,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV * pGeneratedCommandsInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdExecuteGeneratedCommandsNV( m_commandBuffer,
static_cast<VkBool32>( isPreprocessed ),
reinterpret_cast<const VkGeneratedCommandsInfoNV *>( pGeneratedCommandsInfo ) );
@@ -16526,6 +17595,7 @@ namespace VULKAN_HPP_NAMESPACE
const GeneratedCommandsInfoNV & generatedCommandsInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdExecuteGeneratedCommandsNV( m_commandBuffer,
static_cast<VkBool32>( isPreprocessed ),
reinterpret_cast<const VkGeneratedCommandsInfoNV *>( &generatedCommandsInfo ) );
@@ -16539,6 +17609,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t groupIndex,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBindPipelineShaderGroupNV( m_commandBuffer,
static_cast<VkPipelineBindPoint>( pipelineBindPoint ),
static_cast<VkPipeline>( pipeline ),
@@ -16552,6 +17623,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV * pIndirectCommandsLayout,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateIndirectCommandsLayoutNV( m_device,
reinterpret_cast<const VkIndirectCommandsLayoutCreateInfoNV *>( pCreateInfo ),
@@ -16567,6 +17639,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout;
Result result = static_cast<Result>( d.vkCreateIndirectCommandsLayoutNV(
m_device,
@@ -16586,6 +17659,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout;
Result result = static_cast<Result>( d.vkCreateIndirectCommandsLayoutNV(
m_device,
@@ -16609,6 +17683,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyIndirectCommandsLayoutNV( m_device,
static_cast<VkIndirectCommandsLayoutNV>( indirectCommandsLayout ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -16621,6 +17696,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyIndirectCommandsLayoutNV(
m_device,
static_cast<VkIndirectCommandsLayoutNV>( indirectCommandsLayout ),
@@ -16634,6 +17710,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyIndirectCommandsLayoutNV( m_device,
static_cast<VkIndirectCommandsLayoutNV>( indirectCommandsLayout ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -16645,6 +17722,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyIndirectCommandsLayoutNV(
m_device,
static_cast<VkIndirectCommandsLayoutNV>( indirectCommandsLayout ),
@@ -16660,6 +17738,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::acquireDrmDisplayEXT(
int32_t drmFd, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkAcquireDrmDisplayEXT( m_physicalDevice, drmFd, static_cast<VkDisplayKHR>( display ) ) );
}
@@ -16668,6 +17747,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE typename ResultValueType<void>::type PhysicalDevice::acquireDrmDisplayEXT(
int32_t drmFd, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkAcquireDrmDisplayEXT( m_physicalDevice, drmFd, static_cast<VkDisplayKHR>( display ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireDrmDisplayEXT" );
@@ -16681,6 +17761,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayKHR * display,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetDrmDisplayEXT( m_physicalDevice, drmFd, connectorId, reinterpret_cast<VkDisplayKHR *>( display ) ) );
}
@@ -16691,6 +17772,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<VULKAN_HPP_NAMESPACE::DisplayKHR>::type
PhysicalDevice::getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DisplayKHR display;
Result result = static_cast<Result>(
d.vkGetDrmDisplayEXT( m_physicalDevice, drmFd, connectorId, reinterpret_cast<VkDisplayKHR *>( &display ) ) );
@@ -16703,6 +17785,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<UniqueHandle<VULKAN_HPP_NAMESPACE::DisplayKHR, Dispatch>>::type
PhysicalDevice::getDrmDisplayEXTUnique( int32_t drmFd, uint32_t connectorId, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DisplayKHR display;
Result result = static_cast<Result>(
d.vkGetDrmDisplayEXT( m_physicalDevice, drmFd, connectorId, reinterpret_cast<VkDisplayKHR *>( &display ) ) );
@@ -16722,6 +17805,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT * pPrivateDataSlot,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreatePrivateDataSlotEXT( m_device,
reinterpret_cast<const VkPrivateDataSlotCreateInfoEXT *>( pCreateInfo ),
@@ -16736,6 +17820,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT privateDataSlot;
Result result = static_cast<Result>(
d.vkCreatePrivateDataSlotEXT( m_device,
@@ -16754,6 +17839,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT privateDataSlot;
Result result = static_cast<Result>(
d.vkCreatePrivateDataSlotEXT( m_device,
@@ -16774,6 +17860,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPrivateDataSlotEXT( m_device,
static_cast<VkPrivateDataSlotEXT>( privateDataSlot ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -16785,6 +17872,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPrivateDataSlotEXT( m_device,
static_cast<VkPrivateDataSlotEXT>( privateDataSlot ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -16797,6 +17885,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPrivateDataSlotEXT( m_device,
static_cast<VkPrivateDataSlotEXT>( privateDataSlot ),
reinterpret_cast<const VkAllocationCallbacks *>( pAllocator ) );
@@ -16808,6 +17897,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkDestroyPrivateDataSlotEXT( m_device,
static_cast<VkPrivateDataSlotEXT>( privateDataSlot ),
reinterpret_cast<const VkAllocationCallbacks *>(
@@ -16824,6 +17914,7 @@ namespace VULKAN_HPP_NAMESPACE
uint64_t data,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkSetPrivateDataEXT( m_device,
static_cast<VkObjectType>( objectType ),
objectHandle,
@@ -16839,6 +17930,7 @@ namespace VULKAN_HPP_NAMESPACE
uint64_t data,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkSetPrivateDataEXT( m_device,
static_cast<VkObjectType>( objectType ),
objectHandle,
@@ -16855,6 +17947,7 @@ namespace VULKAN_HPP_NAMESPACE
uint64_t * pData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetPrivateDataEXT( m_device,
static_cast<VkObjectType>( objectType ),
objectHandle,
@@ -16870,6 +17963,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT privateDataSlot,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
uint64_t data;
d.vkGetPrivateDataEXT( m_device,
static_cast<VkObjectType>( objectType ),
@@ -16887,6 +17981,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::encodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR * pEncodeInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEncodeVideoKHR( m_commandBuffer, reinterpret_cast<const VkVideoEncodeInfoKHR *>( pEncodeInfo ) );
}
@@ -16895,6 +17990,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::encodeVideoKHR( const VideoEncodeInfoKHR & encodeInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdEncodeVideoKHR( m_commandBuffer, reinterpret_cast<const VkVideoEncodeInfoKHR *>( &encodeInfo ) );
}
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -16907,6 +18003,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::DependencyInfoKHR * pDependencyInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetEvent2KHR( m_commandBuffer,
static_cast<VkEvent>( event ),
reinterpret_cast<const VkDependencyInfoKHR *>( pDependencyInfo ) );
@@ -16918,6 +18015,7 @@ namespace VULKAN_HPP_NAMESPACE
const DependencyInfoKHR & dependencyInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetEvent2KHR( m_commandBuffer,
static_cast<VkEvent>( event ),
reinterpret_cast<const VkDependencyInfoKHR *>( &dependencyInfo ) );
@@ -16929,6 +18027,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::PipelineStageFlags2KHR stageMask,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdResetEvent2KHR(
m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags2KHR>( stageMask ) );
}
@@ -16940,6 +18039,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::DependencyInfoKHR * pDependencyInfos,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdWaitEvents2KHR( m_commandBuffer,
eventCount,
reinterpret_cast<const VkEvent *>( pEvents ),
@@ -16953,6 +18053,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::DependencyInfoKHR> const & dependencyInfos,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
# ifdef VULKAN_HPP_NO_EXCEPTIONS
VULKAN_HPP_ASSERT( events.size() == dependencyInfos.size() );
# else
@@ -16975,6 +18076,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::pipelineBarrier2KHR( const VULKAN_HPP_NAMESPACE::DependencyInfoKHR * pDependencyInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdPipelineBarrier2KHR( m_commandBuffer, reinterpret_cast<const VkDependencyInfoKHR *>( pDependencyInfo ) );
}
@@ -16983,6 +18085,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier2KHR( const DependencyInfoKHR & dependencyInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdPipelineBarrier2KHR( m_commandBuffer, reinterpret_cast<const VkDependencyInfoKHR *>( &dependencyInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -16993,6 +18096,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t query,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdWriteTimestamp2KHR(
m_commandBuffer, static_cast<VkPipelineStageFlags2KHR>( stage ), static_cast<VkQueryPool>( queryPool ), query );
}
@@ -17004,6 +18108,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Fence fence,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkQueueSubmit2KHR(
m_queue, submitCount, reinterpret_cast<const VkSubmitInfo2KHR *>( pSubmits ), static_cast<VkFence>( fence ) ) );
}
@@ -17015,6 +18120,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Fence fence,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkQueueSubmit2KHR( m_queue,
submits.size(),
@@ -17031,6 +18137,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t marker,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdWriteBufferMarker2AMD( m_commandBuffer,
static_cast<VkPipelineStageFlags2KHR>( stage ),
static_cast<VkBuffer>( dstBuffer ),
@@ -17043,6 +18150,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::CheckpointData2NV * pCheckpointData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkGetQueueCheckpointData2NV(
m_queue, pCheckpointDataCount, reinterpret_cast<VkCheckpointData2NV *>( pCheckpointData ) );
}
@@ -17052,6 +18160,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<CheckpointData2NV, CheckpointData2NVAllocator>
Queue::getCheckpointData2NV( Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<CheckpointData2NV, CheckpointData2NVAllocator> checkpointData;
uint32_t checkpointDataCount;
d.vkGetQueueCheckpointData2NV( m_queue, &checkpointDataCount, nullptr );
@@ -17069,6 +18178,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<CheckpointData2NV, CheckpointData2NVAllocator>
Queue::getCheckpointData2NV( CheckpointData2NVAllocator & checkpointData2NVAllocator, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<CheckpointData2NV, CheckpointData2NVAllocator> checkpointData( checkpointData2NVAllocator );
uint32_t checkpointDataCount;
d.vkGetQueueCheckpointData2NV( m_queue, &checkpointDataCount, nullptr );
@@ -17088,6 +18198,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2],
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetFragmentShadingRateEnumNV( m_commandBuffer,
static_cast<VkFragmentShadingRateNV>( shadingRate ),
reinterpret_cast<const VkFragmentShadingRateCombinerOpKHR *>( combinerOps ) );
@@ -17100,6 +18211,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::copyBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2KHR * pCopyBufferInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyBuffer2KHR( m_commandBuffer, reinterpret_cast<const VkCopyBufferInfo2KHR *>( pCopyBufferInfo ) );
}
@@ -17108,6 +18220,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2KHR( const CopyBufferInfo2KHR & copyBufferInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyBuffer2KHR( m_commandBuffer, reinterpret_cast<const VkCopyBufferInfo2KHR *>( &copyBufferInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -17116,6 +18229,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::copyImage2KHR( const VULKAN_HPP_NAMESPACE::CopyImageInfo2KHR * pCopyImageInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyImage2KHR( m_commandBuffer, reinterpret_cast<const VkCopyImageInfo2KHR *>( pCopyImageInfo ) );
}
@@ -17124,6 +18238,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::copyImage2KHR( const CopyImageInfo2KHR & copyImageInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyImage2KHR( m_commandBuffer, reinterpret_cast<const VkCopyImageInfo2KHR *>( &copyImageInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -17133,6 +18248,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2KHR * pCopyBufferToImageInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyBufferToImage2KHR( m_commandBuffer,
reinterpret_cast<const VkCopyBufferToImageInfo2KHR *>( pCopyBufferToImageInfo ) );
}
@@ -17142,6 +18258,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage2KHR( const CopyBufferToImageInfo2KHR & copyBufferToImageInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyBufferToImage2KHR( m_commandBuffer,
reinterpret_cast<const VkCopyBufferToImageInfo2KHR *>( &copyBufferToImageInfo ) );
}
@@ -17152,6 +18269,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2KHR * pCopyImageToBufferInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyImageToBuffer2KHR( m_commandBuffer,
reinterpret_cast<const VkCopyImageToBufferInfo2KHR *>( pCopyImageToBufferInfo ) );
}
@@ -17161,6 +18279,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer2KHR( const CopyImageToBufferInfo2KHR & copyImageToBufferInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdCopyImageToBuffer2KHR( m_commandBuffer,
reinterpret_cast<const VkCopyImageToBufferInfo2KHR *>( &copyImageToBufferInfo ) );
}
@@ -17170,6 +18289,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::blitImage2KHR( const VULKAN_HPP_NAMESPACE::BlitImageInfo2KHR * pBlitImageInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBlitImage2KHR( m_commandBuffer, reinterpret_cast<const VkBlitImageInfo2KHR *>( pBlitImageInfo ) );
}
@@ -17178,6 +18298,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::blitImage2KHR( const BlitImageInfo2KHR & blitImageInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdBlitImage2KHR( m_commandBuffer, reinterpret_cast<const VkBlitImageInfo2KHR *>( &blitImageInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -17187,6 +18308,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::resolveImage2KHR( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2KHR * pResolveImageInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdResolveImage2KHR( m_commandBuffer, reinterpret_cast<const VkResolveImageInfo2KHR *>( pResolveImageInfo ) );
}
@@ -17195,6 +18317,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::resolveImage2KHR( const ResolveImageInfo2KHR & resolveImageInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdResolveImage2KHR( m_commandBuffer, reinterpret_cast<const VkResolveImageInfo2KHR *>( &resolveImageInfo ) );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -17207,6 +18330,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::acquireWinrtDisplayNV(
VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkAcquireWinrtDisplayNV( m_physicalDevice, static_cast<VkDisplayKHR>( display ) ) );
}
# else
@@ -17214,6 +18338,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType<void>::type
PhysicalDevice::acquireWinrtDisplayNV( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkAcquireWinrtDisplayNV( m_physicalDevice, static_cast<VkDisplayKHR>( display ) ) );
return createResultValue( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireWinrtDisplayNV" );
@@ -17226,6 +18351,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplay,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkGetWinrtDisplayNV( m_physicalDevice, deviceRelativeId, reinterpret_cast<VkDisplayKHR *>( pDisplay ) ) );
}
@@ -17236,6 +18362,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<VULKAN_HPP_NAMESPACE::DisplayKHR>::type
PhysicalDevice::getWinrtDisplayNV( uint32_t deviceRelativeId, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DisplayKHR display;
Result result = static_cast<Result>(
d.vkGetWinrtDisplayNV( m_physicalDevice, deviceRelativeId, reinterpret_cast<VkDisplayKHR *>( &display ) ) );
@@ -17248,6 +18375,7 @@ namespace VULKAN_HPP_NAMESPACE
typename ResultValueType<UniqueHandle<VULKAN_HPP_NAMESPACE::DisplayKHR, Dispatch>>::type
PhysicalDevice::getWinrtDisplayNVUnique( uint32_t deviceRelativeId, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::DisplayKHR display;
Result result = static_cast<Result>(
d.vkGetWinrtDisplayNV( m_physicalDevice, deviceRelativeId, reinterpret_cast<VkDisplayKHR *>( &display ) ) );
@@ -17269,6 +18397,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateDirectFBSurfaceEXT( m_instance,
reinterpret_cast<const VkDirectFBSurfaceCreateInfoEXT *>( pCreateInfo ),
@@ -17284,6 +18413,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateDirectFBSurfaceEXT( m_instance,
@@ -17302,6 +18432,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateDirectFBSurfaceEXT( m_instance,
@@ -17320,6 +18451,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE Bool32 PhysicalDevice::getDirectFBPresentationSupportEXT(
uint32_t queueFamilyIndex, IDirectFB * dfb, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Bool32>(
d.vkGetPhysicalDeviceDirectFBPresentationSupportEXT( m_physicalDevice, queueFamilyIndex, dfb ) );
}
@@ -17329,6 +18461,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE Bool32 PhysicalDevice::getDirectFBPresentationSupportEXT(
uint32_t queueFamilyIndex, IDirectFB & dfb, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetPhysicalDeviceDirectFBPresentationSupportEXT( m_physicalDevice, queueFamilyIndex, &dfb );
}
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -17347,6 +18480,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t depth,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdTraceRaysKHR( m_commandBuffer,
reinterpret_cast<const VkStridedDeviceAddressRegionKHR *>( pRaygenShaderBindingTable ),
reinterpret_cast<const VkStridedDeviceAddressRegionKHR *>( pMissShaderBindingTable ),
@@ -17368,6 +18502,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t depth,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdTraceRaysKHR( m_commandBuffer,
reinterpret_cast<const VkStridedDeviceAddressRegionKHR *>( &raygenShaderBindingTable ),
reinterpret_cast<const VkStridedDeviceAddressRegionKHR *>( &missShaderBindingTable ),
@@ -17389,6 +18524,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Pipeline * pPipelines,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateRayTracingPipelinesKHR( m_device,
static_cast<VkDeferredOperationKHR>( deferredOperation ),
@@ -17409,6 +18545,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<Pipeline, PipelineAllocator> pipelines( createInfos.size() );
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesKHR(
m_device,
@@ -17441,6 +18578,7 @@ namespace VULKAN_HPP_NAMESPACE
PipelineAllocator & pipelineAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<Pipeline, PipelineAllocator> pipelines( createInfos.size(), pipelineAllocator );
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesKHR(
m_device,
@@ -17468,6 +18606,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Pipeline pipeline;
Result result = static_cast<Result>(
d.vkCreateRayTracingPipelinesKHR( m_device,
@@ -17497,6 +18636,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<Pipeline, Dispatch>, PipelineAllocator> uniquePipelines;
std::vector<Pipeline> pipelines( createInfos.size() );
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesKHR(
@@ -17543,6 +18683,7 @@ namespace VULKAN_HPP_NAMESPACE
PipelineAllocator & pipelineAllocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
std::vector<UniqueHandle<Pipeline, Dispatch>, PipelineAllocator> uniquePipelines( pipelineAllocator );
std::vector<Pipeline> pipelines( createInfos.size() );
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesKHR(
@@ -17583,6 +18724,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Pipeline pipeline;
Result result = static_cast<Result>(
d.vkCreateRayTracingPipelinesKHR( m_device,
@@ -17616,6 +18758,7 @@ namespace VULKAN_HPP_NAMESPACE
void * pData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesKHR(
m_device, static_cast<VkPipeline>( pipeline ), firstGroup, groupCount, dataSize, pData ) );
}
@@ -17631,6 +18774,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<T> const & data,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result =
static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesKHR( m_device,
static_cast<VkPipeline>( pipeline ),
@@ -17649,6 +18793,7 @@ namespace VULKAN_HPP_NAMESPACE
size_t dataSize,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_ASSERT( dataSize % sizeof( T ) == 0 );
std::vector<T, Allocator> data( dataSize / sizeof( T ) );
Result result =
@@ -17669,6 +18814,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t groupCount,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
T data;
Result result = static_cast<Result>( d.vkGetRayTracingShaderGroupHandlesKHR( m_device,
static_cast<VkPipeline>( pipeline ),
@@ -17689,6 +18835,7 @@ namespace VULKAN_HPP_NAMESPACE
void * pData,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
m_device, static_cast<VkPipeline>( pipeline ), firstGroup, groupCount, dataSize, pData ) );
}
@@ -17704,6 +18851,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<T> const & data,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>(
d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( m_device,
static_cast<VkPipeline>( pipeline ),
@@ -17723,6 +18871,7 @@ namespace VULKAN_HPP_NAMESPACE
size_t dataSize,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_ASSERT( dataSize % sizeof( T ) == 0 );
std::vector<T, Allocator> data( dataSize / sizeof( T ) );
Result result = static_cast<Result>(
@@ -17743,6 +18892,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t groupCount,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
T data;
Result result =
static_cast<Result>( d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( m_device,
@@ -17765,6 +18915,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdTraceRaysIndirectKHR(
m_commandBuffer,
reinterpret_cast<const VkStridedDeviceAddressRegionKHR *>( pRaygenShaderBindingTable ),
@@ -17784,6 +18935,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdTraceRaysIndirectKHR(
m_commandBuffer,
reinterpret_cast<const VkStridedDeviceAddressRegionKHR *>( &raygenShaderBindingTable ),
@@ -17801,6 +18953,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::ShaderGroupShaderKHR groupShader,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<DeviceSize>( d.vkGetRayTracingShaderGroupStackSizeKHR(
m_device, static_cast<VkPipeline>( pipeline ), group, static_cast<VkShaderGroupShaderKHR>( groupShader ) ) );
}
@@ -17810,6 +18963,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::setRayTracingPipelineStackSizeKHR( uint32_t pipelineStackSize,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetRayTracingPipelineStackSizeKHR( m_commandBuffer, pipelineStackSize );
}
@@ -17823,6 +18977,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription2EXT * pVertexAttributeDescriptions,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetVertexInputEXT(
m_commandBuffer,
vertexBindingDescriptionCount,
@@ -17838,6 +18993,7 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription2EXT> const & vertexAttributeDescriptions,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetVertexInputEXT(
m_commandBuffer,
vertexBindingDescriptions.size(),
@@ -17856,6 +19012,7 @@ namespace VULKAN_HPP_NAMESPACE
zx_handle_t * pZirconHandle,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetMemoryZirconHandleFUCHSIA(
m_device, reinterpret_cast<const VkMemoryGetZirconHandleInfoFUCHSIA *>( pGetZirconHandleInfo ), pZirconHandle ) );
}
@@ -17866,6 +19023,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getMemoryZirconHandleFUCHSIA( const MemoryGetZirconHandleInfoFUCHSIA & getZirconHandleInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
zx_handle_t zirconHandle;
Result result = static_cast<Result>( d.vkGetMemoryZirconHandleFUCHSIA(
m_device, reinterpret_cast<const VkMemoryGetZirconHandleInfoFUCHSIA *>( &getZirconHandleInfo ), &zirconHandle ) );
@@ -17881,6 +19039,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA * pMemoryZirconHandleProperties,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetMemoryZirconHandlePropertiesFUCHSIA(
m_device,
static_cast<VkExternalMemoryHandleTypeFlagBits>( handleType ),
@@ -17895,6 +19054,7 @@ namespace VULKAN_HPP_NAMESPACE
zx_handle_t zirconHandle,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA memoryZirconHandleProperties;
Result result = static_cast<Result>( d.vkGetMemoryZirconHandlePropertiesFUCHSIA(
m_device,
@@ -17916,6 +19076,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA * pImportSemaphoreZirconHandleInfo,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkImportSemaphoreZirconHandleFUCHSIA(
m_device,
reinterpret_cast<const VkImportSemaphoreZirconHandleInfoFUCHSIA *>( pImportSemaphoreZirconHandleInfo ) ) );
@@ -17927,6 +19088,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::importSemaphoreZirconHandleFUCHSIA(
const ImportSemaphoreZirconHandleInfoFUCHSIA & importSemaphoreZirconHandleInfo, Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Result result = static_cast<Result>( d.vkImportSemaphoreZirconHandleFUCHSIA(
m_device,
reinterpret_cast<const VkImportSemaphoreZirconHandleInfoFUCHSIA *>( &importSemaphoreZirconHandleInfo ) ) );
@@ -17940,6 +19102,7 @@ namespace VULKAN_HPP_NAMESPACE
zx_handle_t * pZirconHandle,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>( d.vkGetSemaphoreZirconHandleFUCHSIA(
m_device,
reinterpret_cast<const VkSemaphoreGetZirconHandleInfoFUCHSIA *>( pGetZirconHandleInfo ),
@@ -17952,6 +19115,7 @@ namespace VULKAN_HPP_NAMESPACE
Device::getSemaphoreZirconHandleFUCHSIA( const SemaphoreGetZirconHandleInfoFUCHSIA & getZirconHandleInfo,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
zx_handle_t zirconHandle;
Result result = static_cast<Result>( d.vkGetSemaphoreZirconHandleFUCHSIA(
m_device,
@@ -17966,24 +19130,29 @@ namespace VULKAN_HPP_NAMESPACE
//=== VK_HUAWEI_subpass_shading ===
template <typename Dispatch>
- VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result RenderPass::getSubpassShadingMaxWorkgroupSizeHUAWEI(
- VULKAN_HPP_NAMESPACE::Extent2D * pMaxWorkgroupSize, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result
+ Device::getSubpassShadingMaxWorkgroupSizeHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderpass,
+ VULKAN_HPP_NAMESPACE::Extent2D * pMaxWorkgroupSize,
+ Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
- return static_cast<Result>( d.vkGetSubpassShadingMaxWorkgroupSizeHUAWEI(
- m_renderPass, reinterpret_cast<VkExtent2D *>( pMaxWorkgroupSize ) ) );
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
+ return static_cast<Result>( d.vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(
+ m_device, static_cast<VkRenderPass>( renderpass ), reinterpret_cast<VkExtent2D *>( pMaxWorkgroupSize ) ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Dispatch>
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue<VULKAN_HPP_NAMESPACE::Extent2D>
- RenderPass::getSubpassShadingMaxWorkgroupSizeHUAWEI( Dispatch const & d ) const
+ Device::getSubpassShadingMaxWorkgroupSizeHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderpass,
+ Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::Extent2D maxWorkgroupSize;
- Result result = static_cast<Result>( d.vkGetSubpassShadingMaxWorkgroupSizeHUAWEI(
- m_renderPass, reinterpret_cast<VkExtent2D *>( &maxWorkgroupSize ) ) );
+ Result result = static_cast<Result>( d.vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(
+ m_device, static_cast<VkRenderPass>( renderpass ), reinterpret_cast<VkExtent2D *>( &maxWorkgroupSize ) ) );
return createResultValue( result,
maxWorkgroupSize,
- VULKAN_HPP_NAMESPACE_STRING "::RenderPass::getSubpassShadingMaxWorkgroupSizeHUAWEI",
+ VULKAN_HPP_NAMESPACE_STRING "::Device::getSubpassShadingMaxWorkgroupSizeHUAWEI",
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -17991,15 +19160,60 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch>
VULKAN_HPP_INLINE void CommandBuffer::subpassShadingHUAWEI( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSubpassShadingHUAWEI( m_commandBuffer );
}
+ //=== VK_HUAWEI_invocation_mask ===
+
+ template <typename Dispatch>
+ VULKAN_HPP_INLINE void CommandBuffer::bindInvocationMaskHUAWEI( VULKAN_HPP_NAMESPACE::ImageView imageView,
+ VULKAN_HPP_NAMESPACE::ImageLayout imageLayout,
+ Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
+ {
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
+ d.vkCmdBindInvocationMaskHUAWEI(
+ m_commandBuffer, static_cast<VkImageView>( imageView ), static_cast<VkImageLayout>( imageLayout ) );
+ }
+
+ //=== VK_NV_external_memory_rdma ===
+
+ template <typename Dispatch>
+ VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryRemoteAddressNV(
+ const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV * pMemoryGetRemoteAddressInfo,
+ VULKAN_HPP_NAMESPACE::RemoteAddressNV * pAddress,
+ Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
+ {
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
+ return static_cast<Result>( d.vkGetMemoryRemoteAddressNV(
+ m_device,
+ reinterpret_cast<const VkMemoryGetRemoteAddressInfoNV *>( pMemoryGetRemoteAddressInfo ),
+ reinterpret_cast<VkRemoteAddressNV *>( pAddress ) ) );
+ }
+
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Dispatch>
+ VULKAN_HPP_INLINE typename ResultValueType<VULKAN_HPP_NAMESPACE::RemoteAddressNV>::type
+ Device::getMemoryRemoteAddressNV( const MemoryGetRemoteAddressInfoNV & memoryGetRemoteAddressInfo,
+ Dispatch const & d ) const
+ {
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
+ VULKAN_HPP_NAMESPACE::RemoteAddressNV address;
+ Result result = static_cast<Result>( d.vkGetMemoryRemoteAddressNV(
+ m_device,
+ reinterpret_cast<const VkMemoryGetRemoteAddressInfoNV *>( &memoryGetRemoteAddressInfo ),
+ reinterpret_cast<VkRemoteAddressNV *>( &address ) ) );
+ return createResultValue( result, address, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryRemoteAddressNV" );
+ }
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
//=== VK_EXT_extended_dynamic_state2 ===
template <typename Dispatch>
VULKAN_HPP_INLINE void CommandBuffer::setPatchControlPointsEXT( uint32_t patchControlPoints,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetPatchControlPointsEXT( m_commandBuffer, patchControlPoints );
}
@@ -18008,6 +19222,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::setRasterizerDiscardEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetRasterizerDiscardEnableEXT( m_commandBuffer, static_cast<VkBool32>( rasterizerDiscardEnable ) );
}
@@ -18015,6 +19230,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setDepthBiasEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetDepthBiasEnableEXT( m_commandBuffer, static_cast<VkBool32>( depthBiasEnable ) );
}
@@ -18022,6 +19238,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE void CommandBuffer::setLogicOpEXT( VULKAN_HPP_NAMESPACE::LogicOp logicOp,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetLogicOpEXT( m_commandBuffer, static_cast<VkLogicOp>( logicOp ) );
}
@@ -18030,6 +19247,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::setPrimitiveRestartEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetPrimitiveRestartEnableEXT( m_commandBuffer, static_cast<VkBool32>( primitiveRestartEnable ) );
}
@@ -18043,6 +19261,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Result>(
d.vkCreateScreenSurfaceQNX( m_instance,
reinterpret_cast<const VkScreenSurfaceCreateInfoQNX *>( pCreateInfo ),
@@ -18058,6 +19277,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateScreenSurfaceQNX( m_instance,
@@ -18076,6 +19296,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const AllocationCallbacks> allocator,
Dispatch const & d ) const
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
VULKAN_HPP_NAMESPACE::SurfaceKHR surface;
Result result = static_cast<Result>(
d.vkCreateScreenSurfaceQNX( m_instance,
@@ -18094,6 +19315,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE Bool32 PhysicalDevice::getScreenPresentationSupportQNX(
uint32_t queueFamilyIndex, struct _screen_window * window, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return static_cast<Bool32>(
d.vkGetPhysicalDeviceScreenPresentationSupportQNX( m_physicalDevice, queueFamilyIndex, window ) );
}
@@ -18103,6 +19325,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_INLINE Bool32 PhysicalDevice::getScreenPresentationSupportQNX(
uint32_t queueFamilyIndex, struct _screen_window & window, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
return d.vkGetPhysicalDeviceScreenPresentationSupportQNX( m_physicalDevice, queueFamilyIndex, &window );
}
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@@ -18115,6 +19338,7 @@ namespace VULKAN_HPP_NAMESPACE
const VULKAN_HPP_NAMESPACE::Bool32 * pColorWriteEnables,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetColorWriteEnableEXT(
m_commandBuffer, attachmentCount, reinterpret_cast<const VkBool32 *>( pColorWriteEnables ) );
}
@@ -18125,6 +19349,7 @@ namespace VULKAN_HPP_NAMESPACE
CommandBuffer::setColorWriteEnableEXT( ArrayProxy<const VULKAN_HPP_NAMESPACE::Bool32> const & colorWriteEnables,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdSetColorWriteEnableEXT(
m_commandBuffer, colorWriteEnables.size(), reinterpret_cast<const VkBool32 *>( colorWriteEnables.data() ) );
}
@@ -18140,6 +19365,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t stride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawMultiEXT( m_commandBuffer,
drawCount,
reinterpret_cast<const VkMultiDrawInfoEXT *>( pVertexInfo ),
@@ -18157,6 +19383,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32_t stride,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawMultiEXT( m_commandBuffer,
vertexInfo.size(),
reinterpret_cast<const VkMultiDrawInfoEXT *>( vertexInfo.data() ),
@@ -18176,6 +19403,7 @@ namespace VULKAN_HPP_NAMESPACE
const int32_t * pVertexOffset,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawMultiIndexedEXT( m_commandBuffer,
drawCount,
reinterpret_cast<const VkMultiDrawIndexedInfoEXT *>( pIndexInfo ),
@@ -18195,6 +19423,7 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const int32_t> vertexOffset,
Dispatch const & d ) const VULKAN_HPP_NOEXCEPT
{
+ VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
d.vkCmdDrawMultiIndexedEXT( m_commandBuffer,
indexInfo.size(),
reinterpret_cast<const VkMultiDrawIndexedInfoEXT *>( indexInfo.data() ),
diff --git a/thirdparty/vulkan/include/vulkan/vulkan_handles.hpp b/thirdparty/vulkan/include/vulkan/vulkan_handles.hpp
index 0b846c6191..a06156ec0a 100644
--- a/thirdparty/vulkan/include/vulkan/vulkan_handles.hpp
+++ b/thirdparty/vulkan/include/vulkan/vulkan_handles.hpp
@@ -10,981 +10,1229 @@
namespace VULKAN_HPP_NAMESPACE
{
- struct AabbPositionsKHR;
- using AabbPositionsNV = AabbPositionsKHR;
- struct AccelerationStructureBuildGeometryInfoKHR;
- struct AccelerationStructureBuildRangeInfoKHR;
- struct AccelerationStructureBuildSizesInfoKHR;
- struct AccelerationStructureCreateInfoKHR;
- struct AccelerationStructureCreateInfoNV;
- struct AccelerationStructureDeviceAddressInfoKHR;
- struct AccelerationStructureGeometryAabbsDataKHR;
- union AccelerationStructureGeometryDataKHR;
- struct AccelerationStructureGeometryInstancesDataKHR;
- struct AccelerationStructureGeometryKHR;
- struct AccelerationStructureGeometryMotionTrianglesDataNV;
- struct AccelerationStructureGeometryTrianglesDataKHR;
- struct AccelerationStructureInfoNV;
- struct AccelerationStructureInstanceKHR;
- using AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR;
- struct AccelerationStructureMatrixMotionInstanceNV;
- struct AccelerationStructureMemoryRequirementsInfoNV;
- struct AccelerationStructureMotionInfoNV;
- union AccelerationStructureMotionInstanceDataNV;
- struct AccelerationStructureMotionInstanceNV;
- struct AccelerationStructureSRTMotionInstanceNV;
- struct AccelerationStructureVersionInfoKHR;
- struct AcquireNextImageInfoKHR;
- struct AcquireProfilingLockInfoKHR;
- struct AllocationCallbacks;
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- struct AndroidHardwareBufferFormatPropertiesANDROID;
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- struct AndroidHardwareBufferPropertiesANDROID;
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- struct AndroidHardwareBufferUsageANDROID;
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- struct AndroidSurfaceCreateInfoKHR;
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- struct ApplicationInfo;
- struct AttachmentDescription;
- struct AttachmentDescription2;
- using AttachmentDescription2KHR = AttachmentDescription2;
- struct AttachmentDescriptionStencilLayout;
- using AttachmentDescriptionStencilLayoutKHR = AttachmentDescriptionStencilLayout;
- struct AttachmentReference;
- struct AttachmentReference2;
- using AttachmentReference2KHR = AttachmentReference2;
- struct AttachmentReferenceStencilLayout;
- using AttachmentReferenceStencilLayoutKHR = AttachmentReferenceStencilLayout;
- struct AttachmentSampleLocationsEXT;
+ //===================================
+ //=== STRUCT forward declarations ===
+ //===================================
+
+ //=== VK_VERSION_1_0 ===
+ struct Extent2D;
+ struct Extent3D;
+ struct Offset2D;
+ struct Offset3D;
+ struct Rect2D;
struct BaseInStructure;
struct BaseOutStructure;
- struct BindAccelerationStructureMemoryInfoNV;
- struct BindBufferMemoryDeviceGroupInfo;
- using BindBufferMemoryDeviceGroupInfoKHR = BindBufferMemoryDeviceGroupInfo;
- struct BindBufferMemoryInfo;
- using BindBufferMemoryInfoKHR = BindBufferMemoryInfo;
- struct BindImageMemoryDeviceGroupInfo;
- using BindImageMemoryDeviceGroupInfoKHR = BindImageMemoryDeviceGroupInfo;
- struct BindImageMemoryInfo;
- using BindImageMemoryInfoKHR = BindImageMemoryInfo;
- struct BindImageMemorySwapchainInfoKHR;
- struct BindImagePlaneMemoryInfo;
- using BindImagePlaneMemoryInfoKHR = BindImagePlaneMemoryInfo;
- struct BindIndexBufferIndirectCommandNV;
- struct BindShaderGroupIndirectCommandNV;
+ struct BufferMemoryBarrier;
+ struct DispatchIndirectCommand;
+ struct DrawIndexedIndirectCommand;
+ struct DrawIndirectCommand;
+ struct ImageMemoryBarrier;
+ struct MemoryBarrier;
+ struct PipelineCacheHeaderVersionOne;
+ struct AllocationCallbacks;
+ struct ApplicationInfo;
+ struct FormatProperties;
+ struct ImageFormatProperties;
+ struct InstanceCreateInfo;
+ struct MemoryHeap;
+ struct MemoryType;
+ struct PhysicalDeviceFeatures;
+ struct PhysicalDeviceLimits;
+ struct PhysicalDeviceMemoryProperties;
+ struct PhysicalDeviceProperties;
+ struct PhysicalDeviceSparseProperties;
+ struct QueueFamilyProperties;
+ struct DeviceCreateInfo;
+ struct DeviceQueueCreateInfo;
+ struct ExtensionProperties;
+ struct LayerProperties;
+ struct SubmitInfo;
+ struct MappedMemoryRange;
+ struct MemoryAllocateInfo;
+ struct MemoryRequirements;
struct BindSparseInfo;
- struct BindVertexBufferIndirectCommandNV;
- struct BlitImageInfo2KHR;
- struct BufferCopy;
- struct BufferCopy2KHR;
+ struct ImageSubresource;
+ struct SparseBufferMemoryBindInfo;
+ struct SparseImageFormatProperties;
+ struct SparseImageMemoryBind;
+ struct SparseImageMemoryBindInfo;
+ struct SparseImageMemoryRequirements;
+ struct SparseImageOpaqueMemoryBindInfo;
+ struct SparseMemoryBind;
+ struct FenceCreateInfo;
+ struct SemaphoreCreateInfo;
+ struct EventCreateInfo;
+ struct QueryPoolCreateInfo;
struct BufferCreateInfo;
- struct BufferDeviceAddressCreateInfoEXT;
- struct BufferDeviceAddressInfo;
- using BufferDeviceAddressInfoEXT = BufferDeviceAddressInfo;
- using BufferDeviceAddressInfoKHR = BufferDeviceAddressInfo;
- struct BufferImageCopy;
- struct BufferImageCopy2KHR;
- struct BufferMemoryBarrier;
- struct BufferMemoryBarrier2KHR;
- struct BufferMemoryRequirementsInfo2;
- using BufferMemoryRequirementsInfo2KHR = BufferMemoryRequirementsInfo2;
- struct BufferOpaqueCaptureAddressCreateInfo;
- using BufferOpaqueCaptureAddressCreateInfoKHR = BufferOpaqueCaptureAddressCreateInfo;
struct BufferViewCreateInfo;
- struct CalibratedTimestampInfoEXT;
- struct CheckpointData2NV;
- struct CheckpointDataNV;
- struct ClearAttachment;
- union ClearColorValue;
- struct ClearDepthStencilValue;
- struct ClearRect;
- union ClearValue;
- struct CoarseSampleLocationNV;
- struct CoarseSampleOrderCustomNV;
- struct CommandBufferAllocateInfo;
- struct CommandBufferBeginInfo;
- struct CommandBufferInheritanceConditionalRenderingInfoEXT;
- struct CommandBufferInheritanceInfo;
- struct CommandBufferInheritanceRenderPassTransformInfoQCOM;
- struct CommandBufferInheritanceViewportScissorInfoNV;
- struct CommandBufferSubmitInfoKHR;
- struct CommandPoolCreateInfo;
+ struct ImageCreateInfo;
+ struct SubresourceLayout;
struct ComponentMapping;
+ struct ImageSubresourceRange;
+ struct ImageViewCreateInfo;
+ struct ShaderModuleCreateInfo;
+ struct PipelineCacheCreateInfo;
struct ComputePipelineCreateInfo;
- struct ConditionalRenderingBeginInfoEXT;
- struct ConformanceVersion;
- using ConformanceVersionKHR = ConformanceVersion;
- struct CooperativeMatrixPropertiesNV;
- struct CopyAccelerationStructureInfoKHR;
- struct CopyAccelerationStructureToMemoryInfoKHR;
- struct CopyBufferInfo2KHR;
- struct CopyBufferToImageInfo2KHR;
- struct CopyCommandTransformInfoQCOM;
+ struct GraphicsPipelineCreateInfo;
+ struct PipelineColorBlendAttachmentState;
+ struct PipelineColorBlendStateCreateInfo;
+ struct PipelineDepthStencilStateCreateInfo;
+ struct PipelineDynamicStateCreateInfo;
+ struct PipelineInputAssemblyStateCreateInfo;
+ struct PipelineMultisampleStateCreateInfo;
+ struct PipelineRasterizationStateCreateInfo;
+ struct PipelineShaderStageCreateInfo;
+ struct PipelineTessellationStateCreateInfo;
+ struct PipelineVertexInputStateCreateInfo;
+ struct PipelineViewportStateCreateInfo;
+ struct SpecializationInfo;
+ struct SpecializationMapEntry;
+ struct StencilOpState;
+ struct VertexInputAttributeDescription;
+ struct VertexInputBindingDescription;
+ struct Viewport;
+ struct PipelineLayoutCreateInfo;
+ struct PushConstantRange;
+ struct SamplerCreateInfo;
struct CopyDescriptorSet;
- struct CopyImageInfo2KHR;
- struct CopyImageToBufferInfo2KHR;
- struct CopyMemoryToAccelerationStructureInfoKHR;
- struct CuFunctionCreateInfoNVX;
- struct CuLaunchInfoNVX;
- struct CuModuleCreateInfoNVX;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct D3D12FenceSubmitInfoKHR;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- struct DebugMarkerMarkerInfoEXT;
- struct DebugMarkerObjectNameInfoEXT;
- struct DebugMarkerObjectTagInfoEXT;
- struct DebugReportCallbackCreateInfoEXT;
- struct DebugUtilsLabelEXT;
- struct DebugUtilsMessengerCallbackDataEXT;
- struct DebugUtilsMessengerCreateInfoEXT;
- struct DebugUtilsObjectNameInfoEXT;
- struct DebugUtilsObjectTagInfoEXT;
- struct DedicatedAllocationBufferCreateInfoNV;
- struct DedicatedAllocationImageCreateInfoNV;
- struct DedicatedAllocationMemoryAllocateInfoNV;
- struct DependencyInfoKHR;
struct DescriptorBufferInfo;
struct DescriptorImageInfo;
struct DescriptorPoolCreateInfo;
- struct DescriptorPoolInlineUniformBlockCreateInfoEXT;
struct DescriptorPoolSize;
struct DescriptorSetAllocateInfo;
struct DescriptorSetLayoutBinding;
- struct DescriptorSetLayoutBindingFlagsCreateInfo;
- using DescriptorSetLayoutBindingFlagsCreateInfoEXT = DescriptorSetLayoutBindingFlagsCreateInfo;
struct DescriptorSetLayoutCreateInfo;
+ struct WriteDescriptorSet;
+ struct AttachmentDescription;
+ struct AttachmentReference;
+ struct FramebufferCreateInfo;
+ struct RenderPassCreateInfo;
+ struct SubpassDependency;
+ struct SubpassDescription;
+ struct CommandPoolCreateInfo;
+ struct CommandBufferAllocateInfo;
+ struct CommandBufferBeginInfo;
+ struct CommandBufferInheritanceInfo;
+ struct BufferCopy;
+ struct BufferImageCopy;
+ struct ClearAttachment;
+ union ClearColorValue;
+ struct ClearDepthStencilValue;
+ struct ClearRect;
+ union ClearValue;
+ struct ImageBlit;
+ struct ImageCopy;
+ struct ImageResolve;
+ struct ImageSubresourceLayers;
+ struct RenderPassBeginInfo;
+
+ //=== VK_VERSION_1_1 ===
+ struct PhysicalDeviceSubgroupProperties;
+ struct BindBufferMemoryInfo;
+ using BindBufferMemoryInfoKHR = BindBufferMemoryInfo;
+ struct BindImageMemoryInfo;
+ using BindImageMemoryInfoKHR = BindImageMemoryInfo;
+ struct PhysicalDevice16BitStorageFeatures;
+ using PhysicalDevice16BitStorageFeaturesKHR = PhysicalDevice16BitStorageFeatures;
+ struct MemoryDedicatedRequirements;
+ using MemoryDedicatedRequirementsKHR = MemoryDedicatedRequirements;
+ struct MemoryDedicatedAllocateInfo;
+ using MemoryDedicatedAllocateInfoKHR = MemoryDedicatedAllocateInfo;
+ struct MemoryAllocateFlagsInfo;
+ using MemoryAllocateFlagsInfoKHR = MemoryAllocateFlagsInfo;
+ struct DeviceGroupRenderPassBeginInfo;
+ using DeviceGroupRenderPassBeginInfoKHR = DeviceGroupRenderPassBeginInfo;
+ struct DeviceGroupCommandBufferBeginInfo;
+ using DeviceGroupCommandBufferBeginInfoKHR = DeviceGroupCommandBufferBeginInfo;
+ struct DeviceGroupSubmitInfo;
+ using DeviceGroupSubmitInfoKHR = DeviceGroupSubmitInfo;
+ struct DeviceGroupBindSparseInfo;
+ using DeviceGroupBindSparseInfoKHR = DeviceGroupBindSparseInfo;
+ struct BindBufferMemoryDeviceGroupInfo;
+ using BindBufferMemoryDeviceGroupInfoKHR = BindBufferMemoryDeviceGroupInfo;
+ struct BindImageMemoryDeviceGroupInfo;
+ using BindImageMemoryDeviceGroupInfoKHR = BindImageMemoryDeviceGroupInfo;
+ struct PhysicalDeviceGroupProperties;
+ using PhysicalDeviceGroupPropertiesKHR = PhysicalDeviceGroupProperties;
+ struct DeviceGroupDeviceCreateInfo;
+ using DeviceGroupDeviceCreateInfoKHR = DeviceGroupDeviceCreateInfo;
+ struct BufferMemoryRequirementsInfo2;
+ using BufferMemoryRequirementsInfo2KHR = BufferMemoryRequirementsInfo2;
+ struct ImageMemoryRequirementsInfo2;
+ using ImageMemoryRequirementsInfo2KHR = ImageMemoryRequirementsInfo2;
+ struct ImageSparseMemoryRequirementsInfo2;
+ using ImageSparseMemoryRequirementsInfo2KHR = ImageSparseMemoryRequirementsInfo2;
+ struct MemoryRequirements2;
+ using MemoryRequirements2KHR = MemoryRequirements2;
+ struct SparseImageMemoryRequirements2;
+ using SparseImageMemoryRequirements2KHR = SparseImageMemoryRequirements2;
+ struct PhysicalDeviceFeatures2;
+ using PhysicalDeviceFeatures2KHR = PhysicalDeviceFeatures2;
+ struct PhysicalDeviceProperties2;
+ using PhysicalDeviceProperties2KHR = PhysicalDeviceProperties2;
+ struct FormatProperties2;
+ using FormatProperties2KHR = FormatProperties2;
+ struct ImageFormatProperties2;
+ using ImageFormatProperties2KHR = ImageFormatProperties2;
+ struct PhysicalDeviceImageFormatInfo2;
+ using PhysicalDeviceImageFormatInfo2KHR = PhysicalDeviceImageFormatInfo2;
+ struct QueueFamilyProperties2;
+ using QueueFamilyProperties2KHR = QueueFamilyProperties2;
+ struct PhysicalDeviceMemoryProperties2;
+ using PhysicalDeviceMemoryProperties2KHR = PhysicalDeviceMemoryProperties2;
+ struct SparseImageFormatProperties2;
+ using SparseImageFormatProperties2KHR = SparseImageFormatProperties2;
+ struct PhysicalDeviceSparseImageFormatInfo2;
+ using PhysicalDeviceSparseImageFormatInfo2KHR = PhysicalDeviceSparseImageFormatInfo2;
+ struct PhysicalDevicePointClippingProperties;
+ using PhysicalDevicePointClippingPropertiesKHR = PhysicalDevicePointClippingProperties;
+ struct RenderPassInputAttachmentAspectCreateInfo;
+ using RenderPassInputAttachmentAspectCreateInfoKHR = RenderPassInputAttachmentAspectCreateInfo;
+ struct InputAttachmentAspectReference;
+ using InputAttachmentAspectReferenceKHR = InputAttachmentAspectReference;
+ struct ImageViewUsageCreateInfo;
+ using ImageViewUsageCreateInfoKHR = ImageViewUsageCreateInfo;
+ struct PipelineTessellationDomainOriginStateCreateInfo;
+ using PipelineTessellationDomainOriginStateCreateInfoKHR = PipelineTessellationDomainOriginStateCreateInfo;
+ struct RenderPassMultiviewCreateInfo;
+ using RenderPassMultiviewCreateInfoKHR = RenderPassMultiviewCreateInfo;
+ struct PhysicalDeviceMultiviewFeatures;
+ using PhysicalDeviceMultiviewFeaturesKHR = PhysicalDeviceMultiviewFeatures;
+ struct PhysicalDeviceMultiviewProperties;
+ using PhysicalDeviceMultiviewPropertiesKHR = PhysicalDeviceMultiviewProperties;
+ struct PhysicalDeviceVariablePointersFeatures;
+ using PhysicalDeviceVariablePointerFeatures = PhysicalDeviceVariablePointersFeatures;
+ using PhysicalDeviceVariablePointerFeaturesKHR = PhysicalDeviceVariablePointersFeatures;
+ using PhysicalDeviceVariablePointersFeaturesKHR = PhysicalDeviceVariablePointersFeatures;
+ struct PhysicalDeviceProtectedMemoryFeatures;
+ struct PhysicalDeviceProtectedMemoryProperties;
+ struct DeviceQueueInfo2;
+ struct ProtectedSubmitInfo;
+ struct SamplerYcbcrConversionCreateInfo;
+ using SamplerYcbcrConversionCreateInfoKHR = SamplerYcbcrConversionCreateInfo;
+ struct SamplerYcbcrConversionInfo;
+ using SamplerYcbcrConversionInfoKHR = SamplerYcbcrConversionInfo;
+ struct BindImagePlaneMemoryInfo;
+ using BindImagePlaneMemoryInfoKHR = BindImagePlaneMemoryInfo;
+ struct ImagePlaneMemoryRequirementsInfo;
+ using ImagePlaneMemoryRequirementsInfoKHR = ImagePlaneMemoryRequirementsInfo;
+ struct PhysicalDeviceSamplerYcbcrConversionFeatures;
+ using PhysicalDeviceSamplerYcbcrConversionFeaturesKHR = PhysicalDeviceSamplerYcbcrConversionFeatures;
+ struct SamplerYcbcrConversionImageFormatProperties;
+ using SamplerYcbcrConversionImageFormatPropertiesKHR = SamplerYcbcrConversionImageFormatProperties;
+ struct DescriptorUpdateTemplateEntry;
+ using DescriptorUpdateTemplateEntryKHR = DescriptorUpdateTemplateEntry;
+ struct DescriptorUpdateTemplateCreateInfo;
+ using DescriptorUpdateTemplateCreateInfoKHR = DescriptorUpdateTemplateCreateInfo;
+ struct ExternalMemoryProperties;
+ using ExternalMemoryPropertiesKHR = ExternalMemoryProperties;
+ struct PhysicalDeviceExternalImageFormatInfo;
+ using PhysicalDeviceExternalImageFormatInfoKHR = PhysicalDeviceExternalImageFormatInfo;
+ struct ExternalImageFormatProperties;
+ using ExternalImageFormatPropertiesKHR = ExternalImageFormatProperties;
+ struct PhysicalDeviceExternalBufferInfo;
+ using PhysicalDeviceExternalBufferInfoKHR = PhysicalDeviceExternalBufferInfo;
+ struct ExternalBufferProperties;
+ using ExternalBufferPropertiesKHR = ExternalBufferProperties;
+ struct PhysicalDeviceIDProperties;
+ using PhysicalDeviceIDPropertiesKHR = PhysicalDeviceIDProperties;
+ struct ExternalMemoryImageCreateInfo;
+ using ExternalMemoryImageCreateInfoKHR = ExternalMemoryImageCreateInfo;
+ struct ExternalMemoryBufferCreateInfo;
+ using ExternalMemoryBufferCreateInfoKHR = ExternalMemoryBufferCreateInfo;
+ struct ExportMemoryAllocateInfo;
+ using ExportMemoryAllocateInfoKHR = ExportMemoryAllocateInfo;
+ struct PhysicalDeviceExternalFenceInfo;
+ using PhysicalDeviceExternalFenceInfoKHR = PhysicalDeviceExternalFenceInfo;
+ struct ExternalFenceProperties;
+ using ExternalFencePropertiesKHR = ExternalFenceProperties;
+ struct ExportFenceCreateInfo;
+ using ExportFenceCreateInfoKHR = ExportFenceCreateInfo;
+ struct ExportSemaphoreCreateInfo;
+ using ExportSemaphoreCreateInfoKHR = ExportSemaphoreCreateInfo;
+ struct PhysicalDeviceExternalSemaphoreInfo;
+ using PhysicalDeviceExternalSemaphoreInfoKHR = PhysicalDeviceExternalSemaphoreInfo;
+ struct ExternalSemaphoreProperties;
+ using ExternalSemaphorePropertiesKHR = ExternalSemaphoreProperties;
+ struct PhysicalDeviceMaintenance3Properties;
+ using PhysicalDeviceMaintenance3PropertiesKHR = PhysicalDeviceMaintenance3Properties;
struct DescriptorSetLayoutSupport;
using DescriptorSetLayoutSupportKHR = DescriptorSetLayoutSupport;
+ struct PhysicalDeviceShaderDrawParametersFeatures;
+ using PhysicalDeviceShaderDrawParameterFeatures = PhysicalDeviceShaderDrawParametersFeatures;
+
+ //=== VK_VERSION_1_2 ===
+ struct PhysicalDeviceVulkan11Features;
+ struct PhysicalDeviceVulkan11Properties;
+ struct PhysicalDeviceVulkan12Features;
+ struct PhysicalDeviceVulkan12Properties;
+ struct ImageFormatListCreateInfo;
+ using ImageFormatListCreateInfoKHR = ImageFormatListCreateInfo;
+ struct RenderPassCreateInfo2;
+ using RenderPassCreateInfo2KHR = RenderPassCreateInfo2;
+ struct AttachmentDescription2;
+ using AttachmentDescription2KHR = AttachmentDescription2;
+ struct AttachmentReference2;
+ using AttachmentReference2KHR = AttachmentReference2;
+ struct SubpassDescription2;
+ using SubpassDescription2KHR = SubpassDescription2;
+ struct SubpassDependency2;
+ using SubpassDependency2KHR = SubpassDependency2;
+ struct SubpassBeginInfo;
+ using SubpassBeginInfoKHR = SubpassBeginInfo;
+ struct SubpassEndInfo;
+ using SubpassEndInfoKHR = SubpassEndInfo;
+ struct PhysicalDevice8BitStorageFeatures;
+ using PhysicalDevice8BitStorageFeaturesKHR = PhysicalDevice8BitStorageFeatures;
+ struct ConformanceVersion;
+ using ConformanceVersionKHR = ConformanceVersion;
+ struct PhysicalDeviceDriverProperties;
+ using PhysicalDeviceDriverPropertiesKHR = PhysicalDeviceDriverProperties;
+ struct PhysicalDeviceShaderAtomicInt64Features;
+ using PhysicalDeviceShaderAtomicInt64FeaturesKHR = PhysicalDeviceShaderAtomicInt64Features;
+ struct PhysicalDeviceShaderFloat16Int8Features;
+ using PhysicalDeviceFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features;
+ using PhysicalDeviceShaderFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features;
+ struct PhysicalDeviceFloatControlsProperties;
+ using PhysicalDeviceFloatControlsPropertiesKHR = PhysicalDeviceFloatControlsProperties;
+ struct DescriptorSetLayoutBindingFlagsCreateInfo;
+ using DescriptorSetLayoutBindingFlagsCreateInfoEXT = DescriptorSetLayoutBindingFlagsCreateInfo;
+ struct PhysicalDeviceDescriptorIndexingFeatures;
+ using PhysicalDeviceDescriptorIndexingFeaturesEXT = PhysicalDeviceDescriptorIndexingFeatures;
+ struct PhysicalDeviceDescriptorIndexingProperties;
+ using PhysicalDeviceDescriptorIndexingPropertiesEXT = PhysicalDeviceDescriptorIndexingProperties;
struct DescriptorSetVariableDescriptorCountAllocateInfo;
using DescriptorSetVariableDescriptorCountAllocateInfoEXT = DescriptorSetVariableDescriptorCountAllocateInfo;
struct DescriptorSetVariableDescriptorCountLayoutSupport;
using DescriptorSetVariableDescriptorCountLayoutSupportEXT = DescriptorSetVariableDescriptorCountLayoutSupport;
- struct DescriptorUpdateTemplateCreateInfo;
- using DescriptorUpdateTemplateCreateInfoKHR = DescriptorUpdateTemplateCreateInfo;
- struct DescriptorUpdateTemplateEntry;
- using DescriptorUpdateTemplateEntryKHR = DescriptorUpdateTemplateEntry;
- struct DeviceCreateInfo;
- struct DeviceDeviceMemoryReportCreateInfoEXT;
- struct DeviceDiagnosticsConfigCreateInfoNV;
- struct DeviceEventInfoEXT;
- struct DeviceGroupBindSparseInfo;
- using DeviceGroupBindSparseInfoKHR = DeviceGroupBindSparseInfo;
- struct DeviceGroupCommandBufferBeginInfo;
- using DeviceGroupCommandBufferBeginInfoKHR = DeviceGroupCommandBufferBeginInfo;
- struct DeviceGroupDeviceCreateInfo;
- using DeviceGroupDeviceCreateInfoKHR = DeviceGroupDeviceCreateInfo;
+ struct SubpassDescriptionDepthStencilResolve;
+ using SubpassDescriptionDepthStencilResolveKHR = SubpassDescriptionDepthStencilResolve;
+ struct PhysicalDeviceDepthStencilResolveProperties;
+ using PhysicalDeviceDepthStencilResolvePropertiesKHR = PhysicalDeviceDepthStencilResolveProperties;
+ struct PhysicalDeviceScalarBlockLayoutFeatures;
+ using PhysicalDeviceScalarBlockLayoutFeaturesEXT = PhysicalDeviceScalarBlockLayoutFeatures;
+ struct ImageStencilUsageCreateInfo;
+ using ImageStencilUsageCreateInfoEXT = ImageStencilUsageCreateInfo;
+ struct SamplerReductionModeCreateInfo;
+ using SamplerReductionModeCreateInfoEXT = SamplerReductionModeCreateInfo;
+ struct PhysicalDeviceSamplerFilterMinmaxProperties;
+ using PhysicalDeviceSamplerFilterMinmaxPropertiesEXT = PhysicalDeviceSamplerFilterMinmaxProperties;
+ struct PhysicalDeviceVulkanMemoryModelFeatures;
+ using PhysicalDeviceVulkanMemoryModelFeaturesKHR = PhysicalDeviceVulkanMemoryModelFeatures;
+ struct PhysicalDeviceImagelessFramebufferFeatures;
+ using PhysicalDeviceImagelessFramebufferFeaturesKHR = PhysicalDeviceImagelessFramebufferFeatures;
+ struct FramebufferAttachmentsCreateInfo;
+ using FramebufferAttachmentsCreateInfoKHR = FramebufferAttachmentsCreateInfo;
+ struct FramebufferAttachmentImageInfo;
+ using FramebufferAttachmentImageInfoKHR = FramebufferAttachmentImageInfo;
+ struct RenderPassAttachmentBeginInfo;
+ using RenderPassAttachmentBeginInfoKHR = RenderPassAttachmentBeginInfo;
+ struct PhysicalDeviceUniformBufferStandardLayoutFeatures;
+ using PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = PhysicalDeviceUniformBufferStandardLayoutFeatures;
+ struct PhysicalDeviceShaderSubgroupExtendedTypesFeatures;
+ using PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = PhysicalDeviceShaderSubgroupExtendedTypesFeatures;
+ struct PhysicalDeviceSeparateDepthStencilLayoutsFeatures;
+ using PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = PhysicalDeviceSeparateDepthStencilLayoutsFeatures;
+ struct AttachmentReferenceStencilLayout;
+ using AttachmentReferenceStencilLayoutKHR = AttachmentReferenceStencilLayout;
+ struct AttachmentDescriptionStencilLayout;
+ using AttachmentDescriptionStencilLayoutKHR = AttachmentDescriptionStencilLayout;
+ struct PhysicalDeviceHostQueryResetFeatures;
+ using PhysicalDeviceHostQueryResetFeaturesEXT = PhysicalDeviceHostQueryResetFeatures;
+ struct PhysicalDeviceTimelineSemaphoreFeatures;
+ using PhysicalDeviceTimelineSemaphoreFeaturesKHR = PhysicalDeviceTimelineSemaphoreFeatures;
+ struct PhysicalDeviceTimelineSemaphoreProperties;
+ using PhysicalDeviceTimelineSemaphorePropertiesKHR = PhysicalDeviceTimelineSemaphoreProperties;
+ struct SemaphoreTypeCreateInfo;
+ using SemaphoreTypeCreateInfoKHR = SemaphoreTypeCreateInfo;
+ struct TimelineSemaphoreSubmitInfo;
+ using TimelineSemaphoreSubmitInfoKHR = TimelineSemaphoreSubmitInfo;
+ struct SemaphoreWaitInfo;
+ using SemaphoreWaitInfoKHR = SemaphoreWaitInfo;
+ struct SemaphoreSignalInfo;
+ using SemaphoreSignalInfoKHR = SemaphoreSignalInfo;
+ struct PhysicalDeviceBufferDeviceAddressFeatures;
+ using PhysicalDeviceBufferDeviceAddressFeaturesKHR = PhysicalDeviceBufferDeviceAddressFeatures;
+ struct BufferDeviceAddressInfo;
+ using BufferDeviceAddressInfoEXT = BufferDeviceAddressInfo;
+ using BufferDeviceAddressInfoKHR = BufferDeviceAddressInfo;
+ struct BufferOpaqueCaptureAddressCreateInfo;
+ using BufferOpaqueCaptureAddressCreateInfoKHR = BufferOpaqueCaptureAddressCreateInfo;
+ struct MemoryOpaqueCaptureAddressAllocateInfo;
+ using MemoryOpaqueCaptureAddressAllocateInfoKHR = MemoryOpaqueCaptureAddressAllocateInfo;
+ struct DeviceMemoryOpaqueCaptureAddressInfo;
+ using DeviceMemoryOpaqueCaptureAddressInfoKHR = DeviceMemoryOpaqueCaptureAddressInfo;
+
+ //=== VK_KHR_surface ===
+ struct SurfaceCapabilitiesKHR;
+ struct SurfaceFormatKHR;
+
+ //=== VK_KHR_swapchain ===
+ struct SwapchainCreateInfoKHR;
+ struct PresentInfoKHR;
+ struct ImageSwapchainCreateInfoKHR;
+ struct BindImageMemorySwapchainInfoKHR;
+ struct AcquireNextImageInfoKHR;
struct DeviceGroupPresentCapabilitiesKHR;
struct DeviceGroupPresentInfoKHR;
- struct DeviceGroupRenderPassBeginInfo;
- using DeviceGroupRenderPassBeginInfoKHR = DeviceGroupRenderPassBeginInfo;
- struct DeviceGroupSubmitInfo;
- using DeviceGroupSubmitInfoKHR = DeviceGroupSubmitInfo;
struct DeviceGroupSwapchainCreateInfoKHR;
- struct DeviceMemoryOpaqueCaptureAddressInfo;
- using DeviceMemoryOpaqueCaptureAddressInfoKHR = DeviceMemoryOpaqueCaptureAddressInfo;
- struct DeviceMemoryOverallocationCreateInfoAMD;
- struct DeviceMemoryReportCallbackDataEXT;
- union DeviceOrHostAddressConstKHR;
- union DeviceOrHostAddressKHR;
- struct DevicePrivateDataCreateInfoEXT;
- struct DeviceQueueCreateInfo;
- struct DeviceQueueGlobalPriorityCreateInfoEXT;
- struct DeviceQueueInfo2;
-#if defined( VK_USE_PLATFORM_DIRECTFB_EXT )
- struct DirectFBSurfaceCreateInfoEXT;
-#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/
- struct DispatchIndirectCommand;
- struct DisplayEventInfoEXT;
+
+ //=== VK_KHR_display ===
struct DisplayModeCreateInfoKHR;
struct DisplayModeParametersKHR;
- struct DisplayModeProperties2KHR;
struct DisplayModePropertiesKHR;
- struct DisplayNativeHdrSurfaceCapabilitiesAMD;
- struct DisplayPlaneCapabilities2KHR;
struct DisplayPlaneCapabilitiesKHR;
- struct DisplayPlaneInfo2KHR;
- struct DisplayPlaneProperties2KHR;
struct DisplayPlanePropertiesKHR;
- struct DisplayPowerInfoEXT;
- struct DisplayPresentInfoKHR;
- struct DisplayProperties2KHR;
struct DisplayPropertiesKHR;
struct DisplaySurfaceCreateInfoKHR;
- struct DrawIndexedIndirectCommand;
- struct DrawIndirectCommand;
- struct DrawMeshTasksIndirectCommandNV;
- struct DrmFormatModifierPropertiesEXT;
- struct DrmFormatModifierPropertiesListEXT;
- struct EventCreateInfo;
- struct ExportFenceCreateInfo;
- using ExportFenceCreateInfoKHR = ExportFenceCreateInfo;
+
+ //=== VK_KHR_display_swapchain ===
+ struct DisplayPresentInfoKHR;
+
+#if defined( VK_USE_PLATFORM_XLIB_KHR )
+ //=== VK_KHR_xlib_surface ===
+ struct XlibSurfaceCreateInfoKHR;
+#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+
+#if defined( VK_USE_PLATFORM_XCB_KHR )
+ //=== VK_KHR_xcb_surface ===
+ struct XcbSurfaceCreateInfoKHR;
+#endif /*VK_USE_PLATFORM_XCB_KHR*/
+
+#if defined( VK_USE_PLATFORM_WAYLAND_KHR )
+ //=== VK_KHR_wayland_surface ===
+ struct WaylandSurfaceCreateInfoKHR;
+#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
+#if defined( VK_USE_PLATFORM_ANDROID_KHR )
+ //=== VK_KHR_android_surface ===
+ struct AndroidSurfaceCreateInfoKHR;
+#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct ExportFenceWin32HandleInfoKHR;
+ //=== VK_KHR_win32_surface ===
+ struct Win32SurfaceCreateInfoKHR;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- struct ExportMemoryAllocateInfo;
- using ExportMemoryAllocateInfoKHR = ExportMemoryAllocateInfo;
+
+ //=== VK_EXT_debug_report ===
+ struct DebugReportCallbackCreateInfoEXT;
+
+ //=== VK_AMD_rasterization_order ===
+ struct PipelineRasterizationStateRasterizationOrderAMD;
+
+ //=== VK_EXT_debug_marker ===
+ struct DebugMarkerObjectNameInfoEXT;
+ struct DebugMarkerObjectTagInfoEXT;
+ struct DebugMarkerMarkerInfoEXT;
+
+#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_queue ===
+ struct VideoQueueFamilyProperties2KHR;
+ struct VideoProfileKHR;
+ struct VideoProfilesKHR;
+ struct VideoCapabilitiesKHR;
+ struct PhysicalDeviceVideoFormatInfoKHR;
+ struct VideoFormatPropertiesKHR;
+ struct VideoPictureResourceKHR;
+ struct VideoReferenceSlotKHR;
+ struct VideoGetMemoryPropertiesKHR;
+ struct VideoBindMemoryKHR;
+ struct VideoSessionCreateInfoKHR;
+ struct VideoSessionParametersCreateInfoKHR;
+ struct VideoSessionParametersUpdateInfoKHR;
+ struct VideoBeginCodingInfoKHR;
+ struct VideoEndCodingInfoKHR;
+ struct VideoCodingControlInfoKHR;
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_decode_queue ===
+ struct VideoDecodeInfoKHR;
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_NV_dedicated_allocation ===
+ struct DedicatedAllocationImageCreateInfoNV;
+ struct DedicatedAllocationBufferCreateInfoNV;
+ struct DedicatedAllocationMemoryAllocateInfoNV;
+
+ //=== VK_EXT_transform_feedback ===
+ struct PhysicalDeviceTransformFeedbackFeaturesEXT;
+ struct PhysicalDeviceTransformFeedbackPropertiesEXT;
+ struct PipelineRasterizationStateStreamCreateInfoEXT;
+
+ //=== VK_NVX_binary_import ===
+ struct CuModuleCreateInfoNVX;
+ struct CuFunctionCreateInfoNVX;
+ struct CuLaunchInfoNVX;
+
+ //=== VK_NVX_image_view_handle ===
+ struct ImageViewHandleInfoNVX;
+ struct ImageViewAddressPropertiesNVX;
+
+#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_EXT_video_encode_h264 ===
+ struct VideoEncodeH264CapabilitiesEXT;
+ struct VideoEncodeH264SessionCreateInfoEXT;
+ struct VideoEncodeH264SessionParametersCreateInfoEXT;
+ struct VideoEncodeH264SessionParametersAddInfoEXT;
+ struct VideoEncodeH264VclFrameInfoEXT;
+ struct VideoEncodeH264EmitPictureParametersEXT;
+ struct VideoEncodeH264DpbSlotInfoEXT;
+ struct VideoEncodeH264NaluSliceEXT;
+ struct VideoEncodeH264ProfileEXT;
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_EXT_video_decode_h264 ===
+ struct VideoDecodeH264ProfileEXT;
+ struct VideoDecodeH264CapabilitiesEXT;
+ struct VideoDecodeH264SessionCreateInfoEXT;
+ struct VideoDecodeH264SessionParametersCreateInfoEXT;
+ struct VideoDecodeH264SessionParametersAddInfoEXT;
+ struct VideoDecodeH264PictureInfoEXT;
+ struct VideoDecodeH264MvcEXT;
+ struct VideoDecodeH264DpbSlotInfoEXT;
+#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_AMD_texture_gather_bias_lod ===
+ struct TextureLODGatherFormatPropertiesAMD;
+
+ //=== VK_AMD_shader_info ===
+ struct ShaderResourceUsageAMD;
+ struct ShaderStatisticsInfoAMD;
+
+#if defined( VK_USE_PLATFORM_GGP )
+ //=== VK_GGP_stream_descriptor_surface ===
+ struct StreamDescriptorSurfaceCreateInfoGGP;
+#endif /*VK_USE_PLATFORM_GGP*/
+
+ //=== VK_NV_corner_sampled_image ===
+ struct PhysicalDeviceCornerSampledImageFeaturesNV;
+
+ //=== VK_NV_external_memory_capabilities ===
+ struct ExternalImageFormatPropertiesNV;
+
+ //=== VK_NV_external_memory ===
+ struct ExternalMemoryImageCreateInfoNV;
struct ExportMemoryAllocateInfoNV;
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct ExportMemoryWin32HandleInfoKHR;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_NV_external_memory_win32 ===
+ struct ImportMemoryWin32HandleInfoNV;
struct ExportMemoryWin32HandleInfoNV;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- struct ExportSemaphoreCreateInfo;
- using ExportSemaphoreCreateInfoKHR = ExportSemaphoreCreateInfo;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct ExportSemaphoreWin32HandleInfoKHR;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- struct ExtensionProperties;
- struct Extent2D;
- struct Extent3D;
- struct ExternalBufferProperties;
- using ExternalBufferPropertiesKHR = ExternalBufferProperties;
- struct ExternalFenceProperties;
- using ExternalFencePropertiesKHR = ExternalFenceProperties;
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- struct ExternalFormatANDROID;
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- struct ExternalImageFormatProperties;
- using ExternalImageFormatPropertiesKHR = ExternalImageFormatProperties;
- struct ExternalImageFormatPropertiesNV;
- struct ExternalMemoryBufferCreateInfo;
- using ExternalMemoryBufferCreateInfoKHR = ExternalMemoryBufferCreateInfo;
- struct ExternalMemoryImageCreateInfo;
- using ExternalMemoryImageCreateInfoKHR = ExternalMemoryImageCreateInfo;
- struct ExternalMemoryImageCreateInfoNV;
- struct ExternalMemoryProperties;
- using ExternalMemoryPropertiesKHR = ExternalMemoryProperties;
- struct ExternalSemaphoreProperties;
- using ExternalSemaphorePropertiesKHR = ExternalSemaphoreProperties;
- struct FenceCreateInfo;
- struct FenceGetFdInfoKHR;
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct FenceGetWin32HandleInfoKHR;
+ //=== VK_NV_win32_keyed_mutex ===
+ struct Win32KeyedMutexAcquireReleaseInfoNV;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- struct FilterCubicImageViewImageFormatPropertiesEXT;
- struct FormatProperties;
- struct FormatProperties2;
- using FormatProperties2KHR = FormatProperties2;
- struct FragmentShadingRateAttachmentInfoKHR;
- struct FramebufferAttachmentImageInfo;
- using FramebufferAttachmentImageInfoKHR = FramebufferAttachmentImageInfo;
- struct FramebufferAttachmentsCreateInfo;
- using FramebufferAttachmentsCreateInfoKHR = FramebufferAttachmentsCreateInfo;
- struct FramebufferCreateInfo;
- struct FramebufferMixedSamplesCombinationNV;
- struct GeneratedCommandsInfoNV;
- struct GeneratedCommandsMemoryRequirementsInfoNV;
- struct GeometryAABBNV;
- struct GeometryDataNV;
- struct GeometryNV;
- struct GeometryTrianglesNV;
- struct GraphicsPipelineCreateInfo;
- struct GraphicsPipelineShaderGroupsCreateInfoNV;
- struct GraphicsShaderGroupCreateInfoNV;
- struct HdrMetadataEXT;
- struct HeadlessSurfaceCreateInfoEXT;
-#if defined( VK_USE_PLATFORM_IOS_MVK )
- struct IOSSurfaceCreateInfoMVK;
-#endif /*VK_USE_PLATFORM_IOS_MVK*/
- struct ImageBlit;
- struct ImageBlit2KHR;
- struct ImageCopy;
- struct ImageCopy2KHR;
- struct ImageCreateInfo;
- struct ImageDrmFormatModifierExplicitCreateInfoEXT;
- struct ImageDrmFormatModifierListCreateInfoEXT;
- struct ImageDrmFormatModifierPropertiesEXT;
- struct ImageFormatListCreateInfo;
- using ImageFormatListCreateInfoKHR = ImageFormatListCreateInfo;
- struct ImageFormatProperties;
- struct ImageFormatProperties2;
- using ImageFormatProperties2KHR = ImageFormatProperties2;
- struct ImageMemoryBarrier;
- struct ImageMemoryBarrier2KHR;
- struct ImageMemoryRequirementsInfo2;
- using ImageMemoryRequirementsInfo2KHR = ImageMemoryRequirementsInfo2;
-#if defined( VK_USE_PLATFORM_FUCHSIA )
- struct ImagePipeSurfaceCreateInfoFUCHSIA;
-#endif /*VK_USE_PLATFORM_FUCHSIA*/
- struct ImagePlaneMemoryRequirementsInfo;
- using ImagePlaneMemoryRequirementsInfoKHR = ImagePlaneMemoryRequirementsInfo;
- struct ImageResolve;
- struct ImageResolve2KHR;
- struct ImageSparseMemoryRequirementsInfo2;
- using ImageSparseMemoryRequirementsInfo2KHR = ImageSparseMemoryRequirementsInfo2;
- struct ImageStencilUsageCreateInfo;
- using ImageStencilUsageCreateInfoEXT = ImageStencilUsageCreateInfo;
- struct ImageSubresource;
- struct ImageSubresourceLayers;
- struct ImageSubresourceRange;
- struct ImageSwapchainCreateInfoKHR;
+
+ //=== VK_EXT_validation_flags ===
+ struct ValidationFlagsEXT;
+
+#if defined( VK_USE_PLATFORM_VI_NN )
+ //=== VK_NN_vi_surface ===
+ struct ViSurfaceCreateInfoNN;
+#endif /*VK_USE_PLATFORM_VI_NN*/
+
+ //=== VK_EXT_texture_compression_astc_hdr ===
+ struct PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT;
+
+ //=== VK_EXT_astc_decode_mode ===
struct ImageViewASTCDecodeModeEXT;
- struct ImageViewAddressPropertiesNVX;
- struct ImageViewCreateInfo;
- struct ImageViewHandleInfoNVX;
- struct ImageViewUsageCreateInfo;
- using ImageViewUsageCreateInfoKHR = ImageViewUsageCreateInfo;
-#if defined( VK_USE_PLATFORM_ANDROID_KHR )
- struct ImportAndroidHardwareBufferInfoANDROID;
-#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- struct ImportFenceFdInfoKHR;
+ struct PhysicalDeviceASTCDecodeFeaturesEXT;
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct ImportFenceWin32HandleInfoKHR;
+ //=== VK_KHR_external_memory_win32 ===
+ struct ImportMemoryWin32HandleInfoKHR;
+ struct ExportMemoryWin32HandleInfoKHR;
+ struct MemoryWin32HandlePropertiesKHR;
+ struct MemoryGetWin32HandleInfoKHR;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_external_memory_fd ===
struct ImportMemoryFdInfoKHR;
- struct ImportMemoryHostPointerInfoEXT;
+ struct MemoryFdPropertiesKHR;
+ struct MemoryGetFdInfoKHR;
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct ImportMemoryWin32HandleInfoKHR;
+ //=== VK_KHR_win32_keyed_mutex ===
+ struct Win32KeyedMutexAcquireReleaseInfoKHR;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct ImportMemoryWin32HandleInfoNV;
+ //=== VK_KHR_external_semaphore_win32 ===
+ struct ImportSemaphoreWin32HandleInfoKHR;
+ struct ExportSemaphoreWin32HandleInfoKHR;
+ struct D3D12FenceSubmitInfoKHR;
+ struct SemaphoreGetWin32HandleInfoKHR;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_FUCHSIA )
- struct ImportMemoryZirconHandleInfoFUCHSIA;
-#endif /*VK_USE_PLATFORM_FUCHSIA*/
+
+ //=== VK_KHR_external_semaphore_fd ===
struct ImportSemaphoreFdInfoKHR;
+ struct SemaphoreGetFdInfoKHR;
+
+ //=== VK_KHR_push_descriptor ===
+ struct PhysicalDevicePushDescriptorPropertiesKHR;
+
+ //=== VK_EXT_conditional_rendering ===
+ struct ConditionalRenderingBeginInfoEXT;
+ struct PhysicalDeviceConditionalRenderingFeaturesEXT;
+ struct CommandBufferInheritanceConditionalRenderingInfoEXT;
+
+ //=== VK_KHR_incremental_present ===
+ struct PresentRegionsKHR;
+ struct PresentRegionKHR;
+ struct RectLayerKHR;
+
+ //=== VK_NV_clip_space_w_scaling ===
+ struct ViewportWScalingNV;
+ struct PipelineViewportWScalingStateCreateInfoNV;
+
+ //=== VK_EXT_display_surface_counter ===
+ struct SurfaceCapabilities2EXT;
+
+ //=== VK_EXT_display_control ===
+ struct DisplayPowerInfoEXT;
+ struct DeviceEventInfoEXT;
+ struct DisplayEventInfoEXT;
+ struct SwapchainCounterCreateInfoEXT;
+
+ //=== VK_GOOGLE_display_timing ===
+ struct RefreshCycleDurationGOOGLE;
+ struct PastPresentationTimingGOOGLE;
+ struct PresentTimesInfoGOOGLE;
+ struct PresentTimeGOOGLE;
+
+ //=== VK_NVX_multiview_per_view_attributes ===
+ struct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX;
+
+ //=== VK_NV_viewport_swizzle ===
+ struct ViewportSwizzleNV;
+ struct PipelineViewportSwizzleStateCreateInfoNV;
+
+ //=== VK_EXT_discard_rectangles ===
+ struct PhysicalDeviceDiscardRectanglePropertiesEXT;
+ struct PipelineDiscardRectangleStateCreateInfoEXT;
+
+ //=== VK_EXT_conservative_rasterization ===
+ struct PhysicalDeviceConservativeRasterizationPropertiesEXT;
+ struct PipelineRasterizationConservativeStateCreateInfoEXT;
+
+ //=== VK_EXT_depth_clip_enable ===
+ struct PhysicalDeviceDepthClipEnableFeaturesEXT;
+ struct PipelineRasterizationDepthClipStateCreateInfoEXT;
+
+ //=== VK_EXT_hdr_metadata ===
+ struct HdrMetadataEXT;
+ struct XYColorEXT;
+
+ //=== VK_KHR_shared_presentable_image ===
+ struct SharedPresentSurfaceCapabilitiesKHR;
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct ImportSemaphoreWin32HandleInfoKHR;
+ //=== VK_KHR_external_fence_win32 ===
+ struct ImportFenceWin32HandleInfoKHR;
+ struct ExportFenceWin32HandleInfoKHR;
+ struct FenceGetWin32HandleInfoKHR;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_FUCHSIA )
- struct ImportSemaphoreZirconHandleInfoFUCHSIA;
-#endif /*VK_USE_PLATFORM_FUCHSIA*/
- struct IndirectCommandsLayoutCreateInfoNV;
- struct IndirectCommandsLayoutTokenNV;
- struct IndirectCommandsStreamNV;
- struct InitializePerformanceApiInfoINTEL;
- struct InputAttachmentAspectReference;
- using InputAttachmentAspectReferenceKHR = InputAttachmentAspectReference;
- struct InstanceCreateInfo;
- struct LayerProperties;
+
+ //=== VK_KHR_external_fence_fd ===
+ struct ImportFenceFdInfoKHR;
+ struct FenceGetFdInfoKHR;
+
+ //=== VK_KHR_performance_query ===
+ struct PhysicalDevicePerformanceQueryFeaturesKHR;
+ struct PhysicalDevicePerformanceQueryPropertiesKHR;
+ struct PerformanceCounterKHR;
+ struct PerformanceCounterDescriptionKHR;
+ struct QueryPoolPerformanceCreateInfoKHR;
+ union PerformanceCounterResultKHR;
+ struct AcquireProfilingLockInfoKHR;
+ struct PerformanceQuerySubmitInfoKHR;
+
+ //=== VK_KHR_get_surface_capabilities2 ===
+ struct PhysicalDeviceSurfaceInfo2KHR;
+ struct SurfaceCapabilities2KHR;
+ struct SurfaceFormat2KHR;
+
+ //=== VK_KHR_get_display_properties2 ===
+ struct DisplayProperties2KHR;
+ struct DisplayPlaneProperties2KHR;
+ struct DisplayModeProperties2KHR;
+ struct DisplayPlaneInfo2KHR;
+ struct DisplayPlaneCapabilities2KHR;
+
+#if defined( VK_USE_PLATFORM_IOS_MVK )
+ //=== VK_MVK_ios_surface ===
+ struct IOSSurfaceCreateInfoMVK;
+#endif /*VK_USE_PLATFORM_IOS_MVK*/
+
#if defined( VK_USE_PLATFORM_MACOS_MVK )
+ //=== VK_MVK_macos_surface ===
struct MacOSSurfaceCreateInfoMVK;
#endif /*VK_USE_PLATFORM_MACOS_MVK*/
- struct MappedMemoryRange;
- struct MemoryAllocateFlagsInfo;
- using MemoryAllocateFlagsInfoKHR = MemoryAllocateFlagsInfo;
- struct MemoryAllocateInfo;
- struct MemoryBarrier;
- struct MemoryBarrier2KHR;
- struct MemoryDedicatedAllocateInfo;
- using MemoryDedicatedAllocateInfoKHR = MemoryDedicatedAllocateInfo;
- struct MemoryDedicatedRequirements;
- using MemoryDedicatedRequirementsKHR = MemoryDedicatedRequirements;
- struct MemoryFdPropertiesKHR;
+
+ //=== VK_EXT_debug_utils ===
+ struct DebugUtilsLabelEXT;
+ struct DebugUtilsMessengerCallbackDataEXT;
+ struct DebugUtilsMessengerCreateInfoEXT;
+ struct DebugUtilsObjectNameInfoEXT;
+ struct DebugUtilsObjectTagInfoEXT;
+
#if defined( VK_USE_PLATFORM_ANDROID_KHR )
+ //=== VK_ANDROID_external_memory_android_hardware_buffer ===
+ struct AndroidHardwareBufferUsageANDROID;
+ struct AndroidHardwareBufferPropertiesANDROID;
+ struct AndroidHardwareBufferFormatPropertiesANDROID;
+ struct ImportAndroidHardwareBufferInfoANDROID;
struct MemoryGetAndroidHardwareBufferInfoANDROID;
+ struct ExternalFormatANDROID;
#endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- struct MemoryGetFdInfoKHR;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct MemoryGetWin32HandleInfoKHR;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_FUCHSIA )
- struct MemoryGetZirconHandleInfoFUCHSIA;
-#endif /*VK_USE_PLATFORM_FUCHSIA*/
- struct MemoryHeap;
- struct MemoryHostPointerPropertiesEXT;
- struct MemoryOpaqueCaptureAddressAllocateInfo;
- using MemoryOpaqueCaptureAddressAllocateInfoKHR = MemoryOpaqueCaptureAddressAllocateInfo;
- struct MemoryPriorityAllocateInfoEXT;
- struct MemoryRequirements;
- struct MemoryRequirements2;
- using MemoryRequirements2KHR = MemoryRequirements2;
- struct MemoryType;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct MemoryWin32HandlePropertiesKHR;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_FUCHSIA )
- struct MemoryZirconHandlePropertiesFUCHSIA;
-#endif /*VK_USE_PLATFORM_FUCHSIA*/
-#if defined( VK_USE_PLATFORM_METAL_EXT )
- struct MetalSurfaceCreateInfoEXT;
-#endif /*VK_USE_PLATFORM_METAL_EXT*/
- struct MultiDrawIndexedInfoEXT;
- struct MultiDrawInfoEXT;
+
+ //=== VK_EXT_inline_uniform_block ===
+ struct PhysicalDeviceInlineUniformBlockFeaturesEXT;
+ struct PhysicalDeviceInlineUniformBlockPropertiesEXT;
+ struct WriteDescriptorSetInlineUniformBlockEXT;
+ struct DescriptorPoolInlineUniformBlockCreateInfoEXT;
+
+ //=== VK_EXT_sample_locations ===
+ struct SampleLocationEXT;
+ struct SampleLocationsInfoEXT;
+ struct AttachmentSampleLocationsEXT;
+ struct SubpassSampleLocationsEXT;
+ struct RenderPassSampleLocationsBeginInfoEXT;
+ struct PipelineSampleLocationsStateCreateInfoEXT;
+ struct PhysicalDeviceSampleLocationsPropertiesEXT;
struct MultisamplePropertiesEXT;
- struct MutableDescriptorTypeCreateInfoVALVE;
- struct MutableDescriptorTypeListVALVE;
- struct Offset2D;
- struct Offset3D;
- struct PastPresentationTimingGOOGLE;
- struct PerformanceConfigurationAcquireInfoINTEL;
- struct PerformanceCounterDescriptionKHR;
- struct PerformanceCounterKHR;
- union PerformanceCounterResultKHR;
- struct PerformanceMarkerInfoINTEL;
- struct PerformanceOverrideInfoINTEL;
- struct PerformanceQuerySubmitInfoKHR;
- struct PerformanceStreamMarkerInfoINTEL;
- union PerformanceValueDataINTEL;
- struct PerformanceValueINTEL;
- struct PhysicalDevice16BitStorageFeatures;
- using PhysicalDevice16BitStorageFeaturesKHR = PhysicalDevice16BitStorageFeatures;
- struct PhysicalDevice4444FormatsFeaturesEXT;
- struct PhysicalDevice8BitStorageFeatures;
- using PhysicalDevice8BitStorageFeaturesKHR = PhysicalDevice8BitStorageFeatures;
- struct PhysicalDeviceASTCDecodeFeaturesEXT;
- struct PhysicalDeviceAccelerationStructureFeaturesKHR;
- struct PhysicalDeviceAccelerationStructurePropertiesKHR;
+
+ //=== VK_EXT_blend_operation_advanced ===
struct PhysicalDeviceBlendOperationAdvancedFeaturesEXT;
struct PhysicalDeviceBlendOperationAdvancedPropertiesEXT;
- struct PhysicalDeviceBufferDeviceAddressFeatures;
- using PhysicalDeviceBufferDeviceAddressFeaturesKHR = PhysicalDeviceBufferDeviceAddressFeatures;
- struct PhysicalDeviceBufferDeviceAddressFeaturesEXT;
- using PhysicalDeviceBufferAddressFeaturesEXT = PhysicalDeviceBufferDeviceAddressFeaturesEXT;
- struct PhysicalDeviceCoherentMemoryFeaturesAMD;
- struct PhysicalDeviceColorWriteEnableFeaturesEXT;
- struct PhysicalDeviceComputeShaderDerivativesFeaturesNV;
- struct PhysicalDeviceConditionalRenderingFeaturesEXT;
- struct PhysicalDeviceConservativeRasterizationPropertiesEXT;
- struct PhysicalDeviceCooperativeMatrixFeaturesNV;
- struct PhysicalDeviceCooperativeMatrixPropertiesNV;
- struct PhysicalDeviceCornerSampledImageFeaturesNV;
- struct PhysicalDeviceCoverageReductionModeFeaturesNV;
- struct PhysicalDeviceCustomBorderColorFeaturesEXT;
- struct PhysicalDeviceCustomBorderColorPropertiesEXT;
- struct PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV;
- struct PhysicalDeviceDepthClipEnableFeaturesEXT;
- struct PhysicalDeviceDepthStencilResolveProperties;
- using PhysicalDeviceDepthStencilResolvePropertiesKHR = PhysicalDeviceDepthStencilResolveProperties;
- struct PhysicalDeviceDescriptorIndexingFeatures;
- using PhysicalDeviceDescriptorIndexingFeaturesEXT = PhysicalDeviceDescriptorIndexingFeatures;
- struct PhysicalDeviceDescriptorIndexingProperties;
- using PhysicalDeviceDescriptorIndexingPropertiesEXT = PhysicalDeviceDescriptorIndexingProperties;
- struct PhysicalDeviceDeviceGeneratedCommandsFeaturesNV;
- struct PhysicalDeviceDeviceGeneratedCommandsPropertiesNV;
- struct PhysicalDeviceDeviceMemoryReportFeaturesEXT;
- struct PhysicalDeviceDiagnosticsConfigFeaturesNV;
- struct PhysicalDeviceDiscardRectanglePropertiesEXT;
- struct PhysicalDeviceDriverProperties;
- using PhysicalDeviceDriverPropertiesKHR = PhysicalDeviceDriverProperties;
- struct PhysicalDeviceDrmPropertiesEXT;
- struct PhysicalDeviceExclusiveScissorFeaturesNV;
- struct PhysicalDeviceExtendedDynamicState2FeaturesEXT;
- struct PhysicalDeviceExtendedDynamicStateFeaturesEXT;
- struct PhysicalDeviceExternalBufferInfo;
- using PhysicalDeviceExternalBufferInfoKHR = PhysicalDeviceExternalBufferInfo;
- struct PhysicalDeviceExternalFenceInfo;
- using PhysicalDeviceExternalFenceInfoKHR = PhysicalDeviceExternalFenceInfo;
- struct PhysicalDeviceExternalImageFormatInfo;
- using PhysicalDeviceExternalImageFormatInfoKHR = PhysicalDeviceExternalImageFormatInfo;
- struct PhysicalDeviceExternalMemoryHostPropertiesEXT;
- struct PhysicalDeviceExternalSemaphoreInfo;
- using PhysicalDeviceExternalSemaphoreInfoKHR = PhysicalDeviceExternalSemaphoreInfo;
- struct PhysicalDeviceFeatures;
- struct PhysicalDeviceFeatures2;
- using PhysicalDeviceFeatures2KHR = PhysicalDeviceFeatures2;
- struct PhysicalDeviceFloatControlsProperties;
- using PhysicalDeviceFloatControlsPropertiesKHR = PhysicalDeviceFloatControlsProperties;
- struct PhysicalDeviceFragmentDensityMap2FeaturesEXT;
- struct PhysicalDeviceFragmentDensityMap2PropertiesEXT;
- struct PhysicalDeviceFragmentDensityMapFeaturesEXT;
- struct PhysicalDeviceFragmentDensityMapPropertiesEXT;
- struct PhysicalDeviceFragmentShaderBarycentricFeaturesNV;
- struct PhysicalDeviceFragmentShaderInterlockFeaturesEXT;
- struct PhysicalDeviceFragmentShadingRateEnumsFeaturesNV;
- struct PhysicalDeviceFragmentShadingRateEnumsPropertiesNV;
- struct PhysicalDeviceFragmentShadingRateFeaturesKHR;
- struct PhysicalDeviceFragmentShadingRateKHR;
- struct PhysicalDeviceFragmentShadingRatePropertiesKHR;
- struct PhysicalDeviceGlobalPriorityQueryFeaturesEXT;
- struct PhysicalDeviceGroupProperties;
- using PhysicalDeviceGroupPropertiesKHR = PhysicalDeviceGroupProperties;
- struct PhysicalDeviceHostQueryResetFeatures;
- using PhysicalDeviceHostQueryResetFeaturesEXT = PhysicalDeviceHostQueryResetFeatures;
- struct PhysicalDeviceIDProperties;
- using PhysicalDeviceIDPropertiesKHR = PhysicalDeviceIDProperties;
+ struct PipelineColorBlendAdvancedStateCreateInfoEXT;
+
+ //=== VK_NV_fragment_coverage_to_color ===
+ struct PipelineCoverageToColorStateCreateInfoNV;
+
+ //=== VK_KHR_acceleration_structure ===
+ union DeviceOrHostAddressKHR;
+ union DeviceOrHostAddressConstKHR;
+ struct AccelerationStructureBuildRangeInfoKHR;
+ struct AabbPositionsKHR;
+ using AabbPositionsNV = AabbPositionsKHR;
+ struct AccelerationStructureGeometryTrianglesDataKHR;
+ struct TransformMatrixKHR;
+ using TransformMatrixNV = TransformMatrixKHR;
+ struct AccelerationStructureBuildGeometryInfoKHR;
+ struct AccelerationStructureGeometryAabbsDataKHR;
+ struct AccelerationStructureInstanceKHR;
+ using AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR;
+ struct AccelerationStructureGeometryInstancesDataKHR;
+ union AccelerationStructureGeometryDataKHR;
+ struct AccelerationStructureGeometryKHR;
+ struct AccelerationStructureCreateInfoKHR;
+ struct WriteDescriptorSetAccelerationStructureKHR;
+ struct PhysicalDeviceAccelerationStructureFeaturesKHR;
+ struct PhysicalDeviceAccelerationStructurePropertiesKHR;
+ struct AccelerationStructureDeviceAddressInfoKHR;
+ struct AccelerationStructureVersionInfoKHR;
+ struct CopyAccelerationStructureToMemoryInfoKHR;
+ struct CopyMemoryToAccelerationStructureInfoKHR;
+ struct CopyAccelerationStructureInfoKHR;
+ struct AccelerationStructureBuildSizesInfoKHR;
+
+ //=== VK_NV_framebuffer_mixed_samples ===
+ struct PipelineCoverageModulationStateCreateInfoNV;
+
+ //=== VK_NV_shader_sm_builtins ===
+ struct PhysicalDeviceShaderSMBuiltinsPropertiesNV;
+ struct PhysicalDeviceShaderSMBuiltinsFeaturesNV;
+
+ //=== VK_EXT_image_drm_format_modifier ===
+ struct DrmFormatModifierPropertiesListEXT;
+ struct DrmFormatModifierPropertiesEXT;
struct PhysicalDeviceImageDrmFormatModifierInfoEXT;
- struct PhysicalDeviceImageFormatInfo2;
- using PhysicalDeviceImageFormatInfo2KHR = PhysicalDeviceImageFormatInfo2;
- struct PhysicalDeviceImageRobustnessFeaturesEXT;
- struct PhysicalDeviceImageViewImageFormatInfoEXT;
- struct PhysicalDeviceImagelessFramebufferFeatures;
- using PhysicalDeviceImagelessFramebufferFeaturesKHR = PhysicalDeviceImagelessFramebufferFeatures;
- struct PhysicalDeviceIndexTypeUint8FeaturesEXT;
- struct PhysicalDeviceInheritedViewportScissorFeaturesNV;
- struct PhysicalDeviceInlineUniformBlockFeaturesEXT;
- struct PhysicalDeviceInlineUniformBlockPropertiesEXT;
- struct PhysicalDeviceLimits;
- struct PhysicalDeviceLineRasterizationFeaturesEXT;
- struct PhysicalDeviceLineRasterizationPropertiesEXT;
- struct PhysicalDeviceMaintenance3Properties;
- using PhysicalDeviceMaintenance3PropertiesKHR = PhysicalDeviceMaintenance3Properties;
- struct PhysicalDeviceMemoryBudgetPropertiesEXT;
- struct PhysicalDeviceMemoryPriorityFeaturesEXT;
- struct PhysicalDeviceMemoryProperties;
- struct PhysicalDeviceMemoryProperties2;
- using PhysicalDeviceMemoryProperties2KHR = PhysicalDeviceMemoryProperties2;
- struct PhysicalDeviceMeshShaderFeaturesNV;
- struct PhysicalDeviceMeshShaderPropertiesNV;
- struct PhysicalDeviceMultiDrawFeaturesEXT;
- struct PhysicalDeviceMultiDrawPropertiesEXT;
- struct PhysicalDeviceMultiviewFeatures;
- using PhysicalDeviceMultiviewFeaturesKHR = PhysicalDeviceMultiviewFeatures;
- struct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX;
- struct PhysicalDeviceMultiviewProperties;
- using PhysicalDeviceMultiviewPropertiesKHR = PhysicalDeviceMultiviewProperties;
- struct PhysicalDeviceMutableDescriptorTypeFeaturesVALVE;
- struct PhysicalDevicePCIBusInfoPropertiesEXT;
- struct PhysicalDevicePerformanceQueryFeaturesKHR;
- struct PhysicalDevicePerformanceQueryPropertiesKHR;
- struct PhysicalDevicePipelineCreationCacheControlFeaturesEXT;
- struct PhysicalDevicePipelineExecutablePropertiesFeaturesKHR;
- struct PhysicalDevicePointClippingProperties;
- using PhysicalDevicePointClippingPropertiesKHR = PhysicalDevicePointClippingProperties;
+ struct ImageDrmFormatModifierListCreateInfoEXT;
+ struct ImageDrmFormatModifierExplicitCreateInfoEXT;
+ struct ImageDrmFormatModifierPropertiesEXT;
+
+ //=== VK_EXT_validation_cache ===
+ struct ValidationCacheCreateInfoEXT;
+ struct ShaderModuleValidationCacheCreateInfoEXT;
+
#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_portability_subset ===
struct PhysicalDevicePortabilitySubsetFeaturesKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
struct PhysicalDevicePortabilitySubsetPropertiesKHR;
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- struct PhysicalDevicePrivateDataFeaturesEXT;
- struct PhysicalDeviceProperties;
- struct PhysicalDeviceProperties2;
- using PhysicalDeviceProperties2KHR = PhysicalDeviceProperties2;
- struct PhysicalDeviceProtectedMemoryFeatures;
- struct PhysicalDeviceProtectedMemoryProperties;
- struct PhysicalDeviceProvokingVertexFeaturesEXT;
- struct PhysicalDeviceProvokingVertexPropertiesEXT;
- struct PhysicalDevicePushDescriptorPropertiesKHR;
- struct PhysicalDeviceRayQueryFeaturesKHR;
- struct PhysicalDeviceRayTracingMotionBlurFeaturesNV;
- struct PhysicalDeviceRayTracingPipelineFeaturesKHR;
- struct PhysicalDeviceRayTracingPipelinePropertiesKHR;
+
+ //=== VK_NV_shading_rate_image ===
+ struct ShadingRatePaletteNV;
+ struct PipelineViewportShadingRateImageStateCreateInfoNV;
+ struct PhysicalDeviceShadingRateImageFeaturesNV;
+ struct PhysicalDeviceShadingRateImagePropertiesNV;
+ struct CoarseSampleLocationNV;
+ struct CoarseSampleOrderCustomNV;
+ struct PipelineViewportCoarseSampleOrderStateCreateInfoNV;
+
+ //=== VK_NV_ray_tracing ===
+ struct RayTracingShaderGroupCreateInfoNV;
+ struct RayTracingPipelineCreateInfoNV;
+ struct GeometryTrianglesNV;
+ struct GeometryAABBNV;
+ struct GeometryDataNV;
+ struct GeometryNV;
+ struct AccelerationStructureInfoNV;
+ struct AccelerationStructureCreateInfoNV;
+ struct BindAccelerationStructureMemoryInfoNV;
+ struct WriteDescriptorSetAccelerationStructureNV;
+ struct AccelerationStructureMemoryRequirementsInfoNV;
struct PhysicalDeviceRayTracingPropertiesNV;
+
+ //=== VK_NV_representative_fragment_test ===
struct PhysicalDeviceRepresentativeFragmentTestFeaturesNV;
- struct PhysicalDeviceRobustness2FeaturesEXT;
- struct PhysicalDeviceRobustness2PropertiesEXT;
- struct PhysicalDeviceSampleLocationsPropertiesEXT;
- struct PhysicalDeviceSamplerFilterMinmaxProperties;
- using PhysicalDeviceSamplerFilterMinmaxPropertiesEXT = PhysicalDeviceSamplerFilterMinmaxProperties;
- struct PhysicalDeviceSamplerYcbcrConversionFeatures;
- using PhysicalDeviceSamplerYcbcrConversionFeaturesKHR = PhysicalDeviceSamplerYcbcrConversionFeatures;
- struct PhysicalDeviceScalarBlockLayoutFeatures;
- using PhysicalDeviceScalarBlockLayoutFeaturesEXT = PhysicalDeviceScalarBlockLayoutFeatures;
- struct PhysicalDeviceSeparateDepthStencilLayoutsFeatures;
- using PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = PhysicalDeviceSeparateDepthStencilLayoutsFeatures;
- struct PhysicalDeviceShaderAtomicFloatFeaturesEXT;
- struct PhysicalDeviceShaderAtomicInt64Features;
- using PhysicalDeviceShaderAtomicInt64FeaturesKHR = PhysicalDeviceShaderAtomicInt64Features;
+ struct PipelineRepresentativeFragmentTestStateCreateInfoNV;
+
+ //=== VK_EXT_filter_cubic ===
+ struct PhysicalDeviceImageViewImageFormatInfoEXT;
+ struct FilterCubicImageViewImageFormatPropertiesEXT;
+
+ //=== VK_EXT_global_priority ===
+ struct DeviceQueueGlobalPriorityCreateInfoEXT;
+
+ //=== VK_EXT_external_memory_host ===
+ struct ImportMemoryHostPointerInfoEXT;
+ struct MemoryHostPointerPropertiesEXT;
+ struct PhysicalDeviceExternalMemoryHostPropertiesEXT;
+
+ //=== VK_KHR_shader_clock ===
struct PhysicalDeviceShaderClockFeaturesKHR;
- struct PhysicalDeviceShaderCoreProperties2AMD;
+
+ //=== VK_AMD_pipeline_compiler_control ===
+ struct PipelineCompilerControlCreateInfoAMD;
+
+ //=== VK_EXT_calibrated_timestamps ===
+ struct CalibratedTimestampInfoEXT;
+
+ //=== VK_AMD_shader_core_properties ===
struct PhysicalDeviceShaderCorePropertiesAMD;
- struct PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT;
- struct PhysicalDeviceShaderDrawParametersFeatures;
- using PhysicalDeviceShaderDrawParameterFeatures = PhysicalDeviceShaderDrawParametersFeatures;
- struct PhysicalDeviceShaderFloat16Int8Features;
- using PhysicalDeviceFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features;
- using PhysicalDeviceShaderFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features;
- struct PhysicalDeviceShaderImageAtomicInt64FeaturesEXT;
- struct PhysicalDeviceShaderImageFootprintFeaturesNV;
- struct PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL;
- struct PhysicalDeviceShaderSMBuiltinsFeaturesNV;
- struct PhysicalDeviceShaderSMBuiltinsPropertiesNV;
- struct PhysicalDeviceShaderSubgroupExtendedTypesFeatures;
- using PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = PhysicalDeviceShaderSubgroupExtendedTypesFeatures;
- struct PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR;
- struct PhysicalDeviceShaderTerminateInvocationFeaturesKHR;
- struct PhysicalDeviceShadingRateImageFeaturesNV;
- struct PhysicalDeviceShadingRateImagePropertiesNV;
- struct PhysicalDeviceSparseImageFormatInfo2;
- using PhysicalDeviceSparseImageFormatInfo2KHR = PhysicalDeviceSparseImageFormatInfo2;
- struct PhysicalDeviceSparseProperties;
- struct PhysicalDeviceSubgroupProperties;
- struct PhysicalDeviceSubgroupSizeControlFeaturesEXT;
- struct PhysicalDeviceSubgroupSizeControlPropertiesEXT;
- struct PhysicalDeviceSubpassShadingFeaturesHUAWEI;
- struct PhysicalDeviceSubpassShadingPropertiesHUAWEI;
- struct PhysicalDeviceSurfaceInfo2KHR;
- struct PhysicalDeviceSynchronization2FeaturesKHR;
- struct PhysicalDeviceTexelBufferAlignmentFeaturesEXT;
- struct PhysicalDeviceTexelBufferAlignmentPropertiesEXT;
- struct PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT;
- struct PhysicalDeviceTimelineSemaphoreFeatures;
- using PhysicalDeviceTimelineSemaphoreFeaturesKHR = PhysicalDeviceTimelineSemaphoreFeatures;
- struct PhysicalDeviceTimelineSemaphoreProperties;
- using PhysicalDeviceTimelineSemaphorePropertiesKHR = PhysicalDeviceTimelineSemaphoreProperties;
- struct PhysicalDeviceToolPropertiesEXT;
- struct PhysicalDeviceTransformFeedbackFeaturesEXT;
- struct PhysicalDeviceTransformFeedbackPropertiesEXT;
- struct PhysicalDeviceUniformBufferStandardLayoutFeatures;
- using PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = PhysicalDeviceUniformBufferStandardLayoutFeatures;
- struct PhysicalDeviceVariablePointersFeatures;
- using PhysicalDeviceVariablePointerFeatures = PhysicalDeviceVariablePointersFeatures;
- using PhysicalDeviceVariablePointerFeaturesKHR = PhysicalDeviceVariablePointersFeatures;
- using PhysicalDeviceVariablePointersFeaturesKHR = PhysicalDeviceVariablePointersFeatures;
- struct PhysicalDeviceVertexAttributeDivisorFeaturesEXT;
- struct PhysicalDeviceVertexAttributeDivisorPropertiesEXT;
- struct PhysicalDeviceVertexInputDynamicStateFeaturesEXT;
+
#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct PhysicalDeviceVideoFormatInfoKHR;
+ //=== VK_EXT_video_decode_h265 ===
+ struct VideoDecodeH265ProfileEXT;
+ struct VideoDecodeH265CapabilitiesEXT;
+ struct VideoDecodeH265SessionCreateInfoEXT;
+ struct VideoDecodeH265SessionParametersCreateInfoEXT;
+ struct VideoDecodeH265SessionParametersAddInfoEXT;
+ struct VideoDecodeH265PictureInfoEXT;
+ struct VideoDecodeH265DpbSlotInfoEXT;
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- struct PhysicalDeviceVulkan11Features;
- struct PhysicalDeviceVulkan11Properties;
- struct PhysicalDeviceVulkan12Features;
- struct PhysicalDeviceVulkan12Properties;
- struct PhysicalDeviceVulkanMemoryModelFeatures;
- using PhysicalDeviceVulkanMemoryModelFeaturesKHR = PhysicalDeviceVulkanMemoryModelFeatures;
- struct PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR;
- struct PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT;
- struct PhysicalDeviceYcbcrImageArraysFeaturesEXT;
- struct PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR;
- struct PipelineCacheCreateInfo;
- struct PipelineColorBlendAdvancedStateCreateInfoEXT;
- struct PipelineColorBlendAttachmentState;
- struct PipelineColorBlendStateCreateInfo;
- struct PipelineColorWriteCreateInfoEXT;
- struct PipelineCompilerControlCreateInfoAMD;
- struct PipelineCoverageModulationStateCreateInfoNV;
- struct PipelineCoverageReductionStateCreateInfoNV;
- struct PipelineCoverageToColorStateCreateInfoNV;
- struct PipelineCreationFeedbackCreateInfoEXT;
- struct PipelineCreationFeedbackEXT;
- struct PipelineDepthStencilStateCreateInfo;
- struct PipelineDiscardRectangleStateCreateInfoEXT;
- struct PipelineDynamicStateCreateInfo;
- struct PipelineExecutableInfoKHR;
- struct PipelineExecutableInternalRepresentationKHR;
- struct PipelineExecutablePropertiesKHR;
- struct PipelineExecutableStatisticKHR;
- union PipelineExecutableStatisticValueKHR;
- struct PipelineFragmentShadingRateEnumStateCreateInfoNV;
- struct PipelineFragmentShadingRateStateCreateInfoKHR;
- struct PipelineInfoKHR;
- struct PipelineInputAssemblyStateCreateInfo;
- struct PipelineLayoutCreateInfo;
- struct PipelineLibraryCreateInfoKHR;
- struct PipelineMultisampleStateCreateInfo;
- struct PipelineRasterizationConservativeStateCreateInfoEXT;
- struct PipelineRasterizationDepthClipStateCreateInfoEXT;
- struct PipelineRasterizationLineStateCreateInfoEXT;
- struct PipelineRasterizationProvokingVertexStateCreateInfoEXT;
- struct PipelineRasterizationStateCreateInfo;
- struct PipelineRasterizationStateRasterizationOrderAMD;
- struct PipelineRasterizationStateStreamCreateInfoEXT;
- struct PipelineRepresentativeFragmentTestStateCreateInfoNV;
- struct PipelineSampleLocationsStateCreateInfoEXT;
- struct PipelineShaderStageCreateInfo;
- struct PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT;
- struct PipelineTessellationDomainOriginStateCreateInfo;
- using PipelineTessellationDomainOriginStateCreateInfoKHR = PipelineTessellationDomainOriginStateCreateInfo;
- struct PipelineTessellationStateCreateInfo;
+
+ //=== VK_AMD_memory_overallocation_behavior ===
+ struct DeviceMemoryOverallocationCreateInfoAMD;
+
+ //=== VK_EXT_vertex_attribute_divisor ===
+ struct PhysicalDeviceVertexAttributeDivisorPropertiesEXT;
+ struct VertexInputBindingDivisorDescriptionEXT;
struct PipelineVertexInputDivisorStateCreateInfoEXT;
- struct PipelineVertexInputStateCreateInfo;
- struct PipelineViewportCoarseSampleOrderStateCreateInfoNV;
- struct PipelineViewportExclusiveScissorStateCreateInfoNV;
- struct PipelineViewportShadingRateImageStateCreateInfoNV;
- struct PipelineViewportStateCreateInfo;
- struct PipelineViewportSwizzleStateCreateInfoNV;
- struct PipelineViewportWScalingStateCreateInfoNV;
+ struct PhysicalDeviceVertexAttributeDivisorFeaturesEXT;
+
#if defined( VK_USE_PLATFORM_GGP )
+ //=== VK_GGP_frame_token ===
struct PresentFrameTokenGGP;
#endif /*VK_USE_PLATFORM_GGP*/
- struct PresentInfoKHR;
- struct PresentRegionKHR;
- struct PresentRegionsKHR;
- struct PresentTimeGOOGLE;
- struct PresentTimesInfoGOOGLE;
- struct PrivateDataSlotCreateInfoEXT;
- struct ProtectedSubmitInfo;
- struct PushConstantRange;
- struct QueryPoolCreateInfo;
- struct QueryPoolPerformanceCreateInfoKHR;
+
+ //=== VK_EXT_pipeline_creation_feedback ===
+ struct PipelineCreationFeedbackCreateInfoEXT;
+ struct PipelineCreationFeedbackEXT;
+
+ //=== VK_NV_compute_shader_derivatives ===
+ struct PhysicalDeviceComputeShaderDerivativesFeaturesNV;
+
+ //=== VK_NV_mesh_shader ===
+ struct PhysicalDeviceMeshShaderFeaturesNV;
+ struct PhysicalDeviceMeshShaderPropertiesNV;
+ struct DrawMeshTasksIndirectCommandNV;
+
+ //=== VK_NV_fragment_shader_barycentric ===
+ struct PhysicalDeviceFragmentShaderBarycentricFeaturesNV;
+
+ //=== VK_NV_shader_image_footprint ===
+ struct PhysicalDeviceShaderImageFootprintFeaturesNV;
+
+ //=== VK_NV_scissor_exclusive ===
+ struct PipelineViewportExclusiveScissorStateCreateInfoNV;
+ struct PhysicalDeviceExclusiveScissorFeaturesNV;
+
+ //=== VK_NV_device_diagnostic_checkpoints ===
+ struct QueueFamilyCheckpointPropertiesNV;
+ struct CheckpointDataNV;
+
+ //=== VK_INTEL_shader_integer_functions2 ===
+ struct PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL;
+
+ //=== VK_INTEL_performance_query ===
+ union PerformanceValueDataINTEL;
+ struct PerformanceValueINTEL;
+ struct InitializePerformanceApiInfoINTEL;
struct QueryPoolPerformanceQueryCreateInfoINTEL;
using QueryPoolCreateInfoINTEL = QueryPoolPerformanceQueryCreateInfoINTEL;
- struct QueueFamilyCheckpointProperties2NV;
- struct QueueFamilyCheckpointPropertiesNV;
- struct QueueFamilyGlobalPriorityPropertiesEXT;
- struct QueueFamilyProperties;
- struct QueueFamilyProperties2;
- using QueueFamilyProperties2KHR = QueueFamilyProperties2;
- struct RayTracingPipelineCreateInfoKHR;
- struct RayTracingPipelineCreateInfoNV;
- struct RayTracingPipelineInterfaceCreateInfoKHR;
- struct RayTracingShaderGroupCreateInfoKHR;
- struct RayTracingShaderGroupCreateInfoNV;
- struct Rect2D;
- struct RectLayerKHR;
- struct RefreshCycleDurationGOOGLE;
- struct RenderPassAttachmentBeginInfo;
- using RenderPassAttachmentBeginInfoKHR = RenderPassAttachmentBeginInfo;
- struct RenderPassBeginInfo;
- struct RenderPassCreateInfo;
- struct RenderPassCreateInfo2;
- using RenderPassCreateInfo2KHR = RenderPassCreateInfo2;
- struct RenderPassFragmentDensityMapCreateInfoEXT;
- struct RenderPassInputAttachmentAspectCreateInfo;
- using RenderPassInputAttachmentAspectCreateInfoKHR = RenderPassInputAttachmentAspectCreateInfo;
- struct RenderPassMultiviewCreateInfo;
- using RenderPassMultiviewCreateInfoKHR = RenderPassMultiviewCreateInfo;
- struct RenderPassSampleLocationsBeginInfoEXT;
- struct RenderPassTransformBeginInfoQCOM;
- struct ResolveImageInfo2KHR;
- struct SRTDataNV;
- struct SampleLocationEXT;
- struct SampleLocationsInfoEXT;
- struct SamplerCreateInfo;
- struct SamplerCustomBorderColorCreateInfoEXT;
- struct SamplerReductionModeCreateInfo;
- using SamplerReductionModeCreateInfoEXT = SamplerReductionModeCreateInfo;
- struct SamplerYcbcrConversionCreateInfo;
- using SamplerYcbcrConversionCreateInfoKHR = SamplerYcbcrConversionCreateInfo;
- struct SamplerYcbcrConversionImageFormatProperties;
- using SamplerYcbcrConversionImageFormatPropertiesKHR = SamplerYcbcrConversionImageFormatProperties;
- struct SamplerYcbcrConversionInfo;
- using SamplerYcbcrConversionInfoKHR = SamplerYcbcrConversionInfo;
-#if defined( VK_USE_PLATFORM_SCREEN_QNX )
- struct ScreenSurfaceCreateInfoQNX;
-#endif /*VK_USE_PLATFORM_SCREEN_QNX*/
- struct SemaphoreCreateInfo;
- struct SemaphoreGetFdInfoKHR;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct SemaphoreGetWin32HandleInfoKHR;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ struct PerformanceMarkerInfoINTEL;
+ struct PerformanceStreamMarkerInfoINTEL;
+ struct PerformanceOverrideInfoINTEL;
+ struct PerformanceConfigurationAcquireInfoINTEL;
+
+ //=== VK_EXT_pci_bus_info ===
+ struct PhysicalDevicePCIBusInfoPropertiesEXT;
+
+ //=== VK_AMD_display_native_hdr ===
+ struct DisplayNativeHdrSurfaceCapabilitiesAMD;
+ struct SwapchainDisplayNativeHdrCreateInfoAMD;
+
#if defined( VK_USE_PLATFORM_FUCHSIA )
- struct SemaphoreGetZirconHandleInfoFUCHSIA;
+ //=== VK_FUCHSIA_imagepipe_surface ===
+ struct ImagePipeSurfaceCreateInfoFUCHSIA;
#endif /*VK_USE_PLATFORM_FUCHSIA*/
- struct SemaphoreSignalInfo;
- using SemaphoreSignalInfoKHR = SemaphoreSignalInfo;
- struct SemaphoreSubmitInfoKHR;
- struct SemaphoreTypeCreateInfo;
- using SemaphoreTypeCreateInfoKHR = SemaphoreTypeCreateInfo;
- struct SemaphoreWaitInfo;
- using SemaphoreWaitInfoKHR = SemaphoreWaitInfo;
- struct SetStateFlagsIndirectCommandNV;
- struct ShaderModuleCreateInfo;
- struct ShaderModuleValidationCacheCreateInfoEXT;
- struct ShaderResourceUsageAMD;
- struct ShaderStatisticsInfoAMD;
- struct ShadingRatePaletteNV;
- struct SharedPresentSurfaceCapabilitiesKHR;
- struct SparseBufferMemoryBindInfo;
- struct SparseImageFormatProperties;
- struct SparseImageFormatProperties2;
- using SparseImageFormatProperties2KHR = SparseImageFormatProperties2;
- struct SparseImageMemoryBind;
- struct SparseImageMemoryBindInfo;
- struct SparseImageMemoryRequirements;
- struct SparseImageMemoryRequirements2;
- using SparseImageMemoryRequirements2KHR = SparseImageMemoryRequirements2;
- struct SparseImageOpaqueMemoryBindInfo;
- struct SparseMemoryBind;
- struct SpecializationInfo;
- struct SpecializationMapEntry;
- struct StencilOpState;
-#if defined( VK_USE_PLATFORM_GGP )
- struct StreamDescriptorSurfaceCreateInfoGGP;
-#endif /*VK_USE_PLATFORM_GGP*/
- struct StridedDeviceAddressRegionKHR;
- struct SubmitInfo;
- struct SubmitInfo2KHR;
- struct SubpassBeginInfo;
- using SubpassBeginInfoKHR = SubpassBeginInfo;
- struct SubpassDependency;
- struct SubpassDependency2;
- using SubpassDependency2KHR = SubpassDependency2;
- struct SubpassDescription;
- struct SubpassDescription2;
- using SubpassDescription2KHR = SubpassDescription2;
- struct SubpassDescriptionDepthStencilResolve;
- using SubpassDescriptionDepthStencilResolveKHR = SubpassDescriptionDepthStencilResolve;
- struct SubpassEndInfo;
- using SubpassEndInfoKHR = SubpassEndInfo;
- struct SubpassSampleLocationsEXT;
- struct SubpassShadingPipelineCreateInfoHUAWEI;
- struct SubresourceLayout;
- struct SurfaceCapabilities2EXT;
- struct SurfaceCapabilities2KHR;
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct SurfaceCapabilitiesFullScreenExclusiveEXT;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- struct SurfaceCapabilitiesKHR;
- struct SurfaceFormat2KHR;
- struct SurfaceFormatKHR;
+
+ //=== VK_KHR_shader_terminate_invocation ===
+ struct PhysicalDeviceShaderTerminateInvocationFeaturesKHR;
+
+#if defined( VK_USE_PLATFORM_METAL_EXT )
+ //=== VK_EXT_metal_surface ===
+ struct MetalSurfaceCreateInfoEXT;
+#endif /*VK_USE_PLATFORM_METAL_EXT*/
+
+ //=== VK_EXT_fragment_density_map ===
+ struct PhysicalDeviceFragmentDensityMapFeaturesEXT;
+ struct PhysicalDeviceFragmentDensityMapPropertiesEXT;
+ struct RenderPassFragmentDensityMapCreateInfoEXT;
+
+ //=== VK_EXT_subgroup_size_control ===
+ struct PhysicalDeviceSubgroupSizeControlFeaturesEXT;
+ struct PhysicalDeviceSubgroupSizeControlPropertiesEXT;
+ struct PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT;
+
+ //=== VK_KHR_fragment_shading_rate ===
+ struct FragmentShadingRateAttachmentInfoKHR;
+ struct PipelineFragmentShadingRateStateCreateInfoKHR;
+ struct PhysicalDeviceFragmentShadingRateFeaturesKHR;
+ struct PhysicalDeviceFragmentShadingRatePropertiesKHR;
+ struct PhysicalDeviceFragmentShadingRateKHR;
+
+ //=== VK_AMD_shader_core_properties2 ===
+ struct PhysicalDeviceShaderCoreProperties2AMD;
+
+ //=== VK_AMD_device_coherent_memory ===
+ struct PhysicalDeviceCoherentMemoryFeaturesAMD;
+
+ //=== VK_EXT_shader_image_atomic_int64 ===
+ struct PhysicalDeviceShaderImageAtomicInt64FeaturesEXT;
+
+ //=== VK_EXT_memory_budget ===
+ struct PhysicalDeviceMemoryBudgetPropertiesEXT;
+
+ //=== VK_EXT_memory_priority ===
+ struct PhysicalDeviceMemoryPriorityFeaturesEXT;
+ struct MemoryPriorityAllocateInfoEXT;
+
+ //=== VK_KHR_surface_protected_capabilities ===
+ struct SurfaceProtectedCapabilitiesKHR;
+
+ //=== VK_NV_dedicated_allocation_image_aliasing ===
+ struct PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV;
+
+ //=== VK_EXT_buffer_device_address ===
+ struct PhysicalDeviceBufferDeviceAddressFeaturesEXT;
+ using PhysicalDeviceBufferAddressFeaturesEXT = PhysicalDeviceBufferDeviceAddressFeaturesEXT;
+ struct BufferDeviceAddressCreateInfoEXT;
+
+ //=== VK_EXT_tooling_info ===
+ struct PhysicalDeviceToolPropertiesEXT;
+
+ //=== VK_EXT_validation_features ===
+ struct ValidationFeaturesEXT;
+
+ //=== VK_KHR_present_wait ===
+ struct PhysicalDevicePresentWaitFeaturesKHR;
+
+ //=== VK_NV_cooperative_matrix ===
+ struct CooperativeMatrixPropertiesNV;
+ struct PhysicalDeviceCooperativeMatrixFeaturesNV;
+ struct PhysicalDeviceCooperativeMatrixPropertiesNV;
+
+ //=== VK_NV_coverage_reduction_mode ===
+ struct PhysicalDeviceCoverageReductionModeFeaturesNV;
+ struct PipelineCoverageReductionStateCreateInfoNV;
+ struct FramebufferMixedSamplesCombinationNV;
+
+ //=== VK_EXT_fragment_shader_interlock ===
+ struct PhysicalDeviceFragmentShaderInterlockFeaturesEXT;
+
+ //=== VK_EXT_ycbcr_image_arrays ===
+ struct PhysicalDeviceYcbcrImageArraysFeaturesEXT;
+
+ //=== VK_EXT_provoking_vertex ===
+ struct PhysicalDeviceProvokingVertexFeaturesEXT;
+ struct PhysicalDeviceProvokingVertexPropertiesEXT;
+ struct PipelineRasterizationProvokingVertexStateCreateInfoEXT;
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_EXT_full_screen_exclusive ===
struct SurfaceFullScreenExclusiveInfoEXT;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
+ struct SurfaceCapabilitiesFullScreenExclusiveEXT;
struct SurfaceFullScreenExclusiveWin32InfoEXT;
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- struct SurfaceProtectedCapabilitiesKHR;
- struct SwapchainCounterCreateInfoEXT;
- struct SwapchainCreateInfoKHR;
- struct SwapchainDisplayNativeHdrCreateInfoAMD;
- struct TextureLODGatherFormatPropertiesAMD;
- struct TimelineSemaphoreSubmitInfo;
- using TimelineSemaphoreSubmitInfoKHR = TimelineSemaphoreSubmitInfo;
- struct TraceRaysIndirectCommandKHR;
- struct TransformMatrixKHR;
- using TransformMatrixNV = TransformMatrixKHR;
- struct ValidationCacheCreateInfoEXT;
- struct ValidationFeaturesEXT;
- struct ValidationFlagsEXT;
- struct VertexInputAttributeDescription;
- struct VertexInputAttributeDescription2EXT;
- struct VertexInputBindingDescription;
- struct VertexInputBindingDescription2EXT;
- struct VertexInputBindingDivisorDescriptionEXT;
-#if defined( VK_USE_PLATFORM_VI_NN )
- struct ViSurfaceCreateInfoNN;
-#endif /*VK_USE_PLATFORM_VI_NN*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoBeginCodingInfoKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoBindMemoryKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoCapabilitiesKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoCodingControlInfoKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH264CapabilitiesEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH264DpbSlotInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH264MvcEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH264PictureInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH264ProfileEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH264SessionCreateInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH264SessionParametersAddInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH264SessionParametersCreateInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH265CapabilitiesEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH265DpbSlotInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH265PictureInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH265ProfileEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH265SessionCreateInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH265SessionParametersAddInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeH265SessionParametersCreateInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoDecodeInfoKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoEncodeH264CapabilitiesEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoEncodeH264DpbSlotInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoEncodeH264EmitPictureParametersEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoEncodeH264NaluSliceEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoEncodeH264ProfileEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoEncodeH264SessionCreateInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoEncodeH264SessionParametersAddInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoEncodeH264SessionParametersCreateInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoEncodeH264VclFrameInfoEXT;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_EXT_headless_surface ===
+ struct HeadlessSurfaceCreateInfoEXT;
+
+ //=== VK_EXT_line_rasterization ===
+ struct PhysicalDeviceLineRasterizationFeaturesEXT;
+ struct PhysicalDeviceLineRasterizationPropertiesEXT;
+ struct PipelineRasterizationLineStateCreateInfoEXT;
+
+ //=== VK_EXT_shader_atomic_float ===
+ struct PhysicalDeviceShaderAtomicFloatFeaturesEXT;
+
+ //=== VK_EXT_index_type_uint8 ===
+ struct PhysicalDeviceIndexTypeUint8FeaturesEXT;
+
+ //=== VK_EXT_extended_dynamic_state ===
+ struct PhysicalDeviceExtendedDynamicStateFeaturesEXT;
+
+ //=== VK_KHR_pipeline_executable_properties ===
+ struct PhysicalDevicePipelineExecutablePropertiesFeaturesKHR;
+ struct PipelineInfoKHR;
+ struct PipelineExecutablePropertiesKHR;
+ struct PipelineExecutableInfoKHR;
+ union PipelineExecutableStatisticValueKHR;
+ struct PipelineExecutableStatisticKHR;
+ struct PipelineExecutableInternalRepresentationKHR;
+
+ //=== VK_EXT_shader_atomic_float2 ===
+ struct PhysicalDeviceShaderAtomicFloat2FeaturesEXT;
+
+ //=== VK_EXT_shader_demote_to_helper_invocation ===
+ struct PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT;
+
+ //=== VK_NV_device_generated_commands ===
+ struct PhysicalDeviceDeviceGeneratedCommandsPropertiesNV;
+ struct PhysicalDeviceDeviceGeneratedCommandsFeaturesNV;
+ struct GraphicsShaderGroupCreateInfoNV;
+ struct GraphicsPipelineShaderGroupsCreateInfoNV;
+ struct BindShaderGroupIndirectCommandNV;
+ struct BindIndexBufferIndirectCommandNV;
+ struct BindVertexBufferIndirectCommandNV;
+ struct SetStateFlagsIndirectCommandNV;
+ struct IndirectCommandsStreamNV;
+ struct IndirectCommandsLayoutTokenNV;
+ struct IndirectCommandsLayoutCreateInfoNV;
+ struct GeneratedCommandsInfoNV;
+ struct GeneratedCommandsMemoryRequirementsInfoNV;
+
+ //=== VK_NV_inherited_viewport_scissor ===
+ struct PhysicalDeviceInheritedViewportScissorFeaturesNV;
+ struct CommandBufferInheritanceViewportScissorInfoNV;
+
+ //=== VK_KHR_shader_integer_dot_product ===
+ struct PhysicalDeviceShaderIntegerDotProductFeaturesKHR;
+ struct PhysicalDeviceShaderIntegerDotProductPropertiesKHR;
+
+ //=== VK_EXT_texel_buffer_alignment ===
+ struct PhysicalDeviceTexelBufferAlignmentFeaturesEXT;
+ struct PhysicalDeviceTexelBufferAlignmentPropertiesEXT;
+
+ //=== VK_QCOM_render_pass_transform ===
+ struct RenderPassTransformBeginInfoQCOM;
+ struct CommandBufferInheritanceRenderPassTransformInfoQCOM;
+
+ //=== VK_EXT_device_memory_report ===
+ struct PhysicalDeviceDeviceMemoryReportFeaturesEXT;
+ struct DeviceDeviceMemoryReportCreateInfoEXT;
+ struct DeviceMemoryReportCallbackDataEXT;
+
+ //=== VK_EXT_robustness2 ===
+ struct PhysicalDeviceRobustness2FeaturesEXT;
+ struct PhysicalDeviceRobustness2PropertiesEXT;
+
+ //=== VK_EXT_custom_border_color ===
+ struct SamplerCustomBorderColorCreateInfoEXT;
+ struct PhysicalDeviceCustomBorderColorPropertiesEXT;
+ struct PhysicalDeviceCustomBorderColorFeaturesEXT;
+
+ //=== VK_KHR_pipeline_library ===
+ struct PipelineLibraryCreateInfoKHR;
+
+ //=== VK_KHR_present_id ===
+ struct PresentIdKHR;
+ struct PhysicalDevicePresentIdFeaturesKHR;
+
+ //=== VK_EXT_private_data ===
+ struct PhysicalDevicePrivateDataFeaturesEXT;
+ struct DevicePrivateDataCreateInfoEXT;
+ struct PrivateDataSlotCreateInfoEXT;
+
+ //=== VK_EXT_pipeline_creation_cache_control ===
+ struct PhysicalDevicePipelineCreationCacheControlFeaturesEXT;
+
#if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_encode_queue ===
struct VideoEncodeInfoKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
struct VideoEncodeRateControlInfoKHR;
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoEndCodingInfoKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoFormatPropertiesKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoGetMemoryPropertiesKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoPictureResourceKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoProfileKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoProfilesKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoQueueFamilyProperties2KHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoReferenceSlotKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoSessionCreateInfoKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoSessionParametersCreateInfoKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
-#if defined( VK_ENABLE_BETA_EXTENSIONS )
- struct VideoSessionParametersUpdateInfoKHR;
-#endif /*VK_ENABLE_BETA_EXTENSIONS*/
- struct Viewport;
- struct ViewportSwizzleNV;
- struct ViewportWScalingNV;
-#if defined( VK_USE_PLATFORM_WAYLAND_KHR )
- struct WaylandSurfaceCreateInfoKHR;
-#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct Win32KeyedMutexAcquireReleaseInfoKHR;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct Win32KeyedMutexAcquireReleaseInfoNV;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
-#if defined( VK_USE_PLATFORM_WIN32_KHR )
- struct Win32SurfaceCreateInfoKHR;
-#endif /*VK_USE_PLATFORM_WIN32_KHR*/
- struct WriteDescriptorSet;
- struct WriteDescriptorSetAccelerationStructureKHR;
- struct WriteDescriptorSetAccelerationStructureNV;
- struct WriteDescriptorSetInlineUniformBlockEXT;
- struct XYColorEXT;
-#if defined( VK_USE_PLATFORM_XCB_KHR )
- struct XcbSurfaceCreateInfoKHR;
-#endif /*VK_USE_PLATFORM_XCB_KHR*/
-#if defined( VK_USE_PLATFORM_XLIB_KHR )
- struct XlibSurfaceCreateInfoKHR;
-#endif /*VK_USE_PLATFORM_XLIB_KHR*/
+
+ //=== VK_NV_device_diagnostics_config ===
+ struct PhysicalDeviceDiagnosticsConfigFeaturesNV;
+ struct DeviceDiagnosticsConfigCreateInfoNV;
+
+ //=== VK_KHR_synchronization2 ===
+ struct MemoryBarrier2KHR;
+ struct BufferMemoryBarrier2KHR;
+ struct ImageMemoryBarrier2KHR;
+ struct DependencyInfoKHR;
+ struct SubmitInfo2KHR;
+ struct SemaphoreSubmitInfoKHR;
+ struct CommandBufferSubmitInfoKHR;
+ struct PhysicalDeviceSynchronization2FeaturesKHR;
+ struct QueueFamilyCheckpointProperties2NV;
+ struct CheckpointData2NV;
+
+ //=== VK_KHR_shader_subgroup_uniform_control_flow ===
+ struct PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR;
+
+ //=== VK_KHR_zero_initialize_workgroup_memory ===
+ struct PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR;
+
+ //=== VK_NV_fragment_shading_rate_enums ===
+ struct PhysicalDeviceFragmentShadingRateEnumsFeaturesNV;
+ struct PhysicalDeviceFragmentShadingRateEnumsPropertiesNV;
+ struct PipelineFragmentShadingRateEnumStateCreateInfoNV;
+
+ //=== VK_NV_ray_tracing_motion_blur ===
+ struct AccelerationStructureGeometryMotionTrianglesDataNV;
+ struct AccelerationStructureMotionInfoNV;
+ struct AccelerationStructureMotionInstanceNV;
+ union AccelerationStructureMotionInstanceDataNV;
+ struct AccelerationStructureMatrixMotionInstanceNV;
+ struct AccelerationStructureSRTMotionInstanceNV;
+ struct SRTDataNV;
+ struct PhysicalDeviceRayTracingMotionBlurFeaturesNV;
+
+ //=== VK_EXT_ycbcr_2plane_444_formats ===
+ struct PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT;
+
+ //=== VK_EXT_fragment_density_map2 ===
+ struct PhysicalDeviceFragmentDensityMap2FeaturesEXT;
+ struct PhysicalDeviceFragmentDensityMap2PropertiesEXT;
+
+ //=== VK_QCOM_rotated_copy_commands ===
+ struct CopyCommandTransformInfoQCOM;
+
+ //=== VK_EXT_image_robustness ===
+ struct PhysicalDeviceImageRobustnessFeaturesEXT;
+
+ //=== VK_KHR_workgroup_memory_explicit_layout ===
+ struct PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR;
+
+ //=== VK_KHR_copy_commands2 ===
+ struct CopyBufferInfo2KHR;
+ struct CopyImageInfo2KHR;
+ struct CopyBufferToImageInfo2KHR;
+ struct CopyImageToBufferInfo2KHR;
+ struct BlitImageInfo2KHR;
+ struct ResolveImageInfo2KHR;
+ struct BufferCopy2KHR;
+ struct ImageCopy2KHR;
+ struct ImageBlit2KHR;
+ struct BufferImageCopy2KHR;
+ struct ImageResolve2KHR;
+
+ //=== VK_EXT_4444_formats ===
+ struct PhysicalDevice4444FormatsFeaturesEXT;
+
+#if defined( VK_USE_PLATFORM_DIRECTFB_EXT )
+ //=== VK_EXT_directfb_surface ===
+ struct DirectFBSurfaceCreateInfoEXT;
+#endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/
+
+ //=== VK_KHR_ray_tracing_pipeline ===
+ struct RayTracingShaderGroupCreateInfoKHR;
+ struct RayTracingPipelineCreateInfoKHR;
+ struct PhysicalDeviceRayTracingPipelineFeaturesKHR;
+ struct PhysicalDeviceRayTracingPipelinePropertiesKHR;
+ struct StridedDeviceAddressRegionKHR;
+ struct TraceRaysIndirectCommandKHR;
+ struct RayTracingPipelineInterfaceCreateInfoKHR;
+
+ //=== VK_KHR_ray_query ===
+ struct PhysicalDeviceRayQueryFeaturesKHR;
+
+ //=== VK_VALVE_mutable_descriptor_type ===
+ struct PhysicalDeviceMutableDescriptorTypeFeaturesVALVE;
+ struct MutableDescriptorTypeListVALVE;
+ struct MutableDescriptorTypeCreateInfoVALVE;
+
+ //=== VK_EXT_vertex_input_dynamic_state ===
+ struct PhysicalDeviceVertexInputDynamicStateFeaturesEXT;
+ struct VertexInputBindingDescription2EXT;
+ struct VertexInputAttributeDescription2EXT;
+
+ //=== VK_EXT_physical_device_drm ===
+ struct PhysicalDeviceDrmPropertiesEXT;
+
+ //=== VK_EXT_primitive_topology_list_restart ===
+ struct PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT;
+
+#if defined( VK_USE_PLATFORM_FUCHSIA )
+ //=== VK_FUCHSIA_external_memory ===
+ struct ImportMemoryZirconHandleInfoFUCHSIA;
+ struct MemoryZirconHandlePropertiesFUCHSIA;
+ struct MemoryGetZirconHandleInfoFUCHSIA;
+#endif /*VK_USE_PLATFORM_FUCHSIA*/
+
+#if defined( VK_USE_PLATFORM_FUCHSIA )
+ //=== VK_FUCHSIA_external_semaphore ===
+ struct ImportSemaphoreZirconHandleInfoFUCHSIA;
+ struct SemaphoreGetZirconHandleInfoFUCHSIA;
+#endif /*VK_USE_PLATFORM_FUCHSIA*/
+
+ //=== VK_HUAWEI_subpass_shading ===
+ struct SubpassShadingPipelineCreateInfoHUAWEI;
+ struct PhysicalDeviceSubpassShadingFeaturesHUAWEI;
+ struct PhysicalDeviceSubpassShadingPropertiesHUAWEI;
+
+ //=== VK_HUAWEI_invocation_mask ===
+ struct PhysicalDeviceInvocationMaskFeaturesHUAWEI;
+
+ //=== VK_NV_external_memory_rdma ===
+ struct MemoryGetRemoteAddressInfoNV;
+ struct PhysicalDeviceExternalMemoryRDMAFeaturesNV;
+
+ //=== VK_EXT_extended_dynamic_state2 ===
+ struct PhysicalDeviceExtendedDynamicState2FeaturesEXT;
+
+#if defined( VK_USE_PLATFORM_SCREEN_QNX )
+ //=== VK_QNX_screen_surface ===
+ struct ScreenSurfaceCreateInfoQNX;
+#endif /*VK_USE_PLATFORM_SCREEN_QNX*/
+
+ //=== VK_EXT_color_write_enable ===
+ struct PhysicalDeviceColorWriteEnableFeaturesEXT;
+ struct PipelineColorWriteCreateInfoEXT;
+
+ //=== VK_EXT_global_priority_query ===
+ struct PhysicalDeviceGlobalPriorityQueryFeaturesEXT;
+ struct QueueFamilyGlobalPriorityPropertiesEXT;
+
+ //=== VK_EXT_multi_draw ===
+ struct PhysicalDeviceMultiDrawFeaturesEXT;
+ struct PhysicalDeviceMultiDrawPropertiesEXT;
+ struct MultiDrawInfoEXT;
+ struct MultiDrawIndexedInfoEXT;
+
+ //===============
+ //=== HANDLEs ===
+ //===============
class SurfaceKHR
{
@@ -2128,191 +2376,191 @@ namespace VULKAN_HPP_NAMESPACE
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true;
};
- class Pipeline
+ class ImageView
{
public:
- using CType = VkPipeline;
+ using CType = VkImageView;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
- VULKAN_HPP_NAMESPACE::ObjectType::ePipeline;
+ VULKAN_HPP_NAMESPACE::ObjectType::eImageView;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
- VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipeline;
+ VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImageView;
public:
- VULKAN_HPP_CONSTEXPR Pipeline() = default;
- VULKAN_HPP_CONSTEXPR Pipeline( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {}
- VULKAN_HPP_TYPESAFE_EXPLICIT Pipeline( VkPipeline pipeline ) VULKAN_HPP_NOEXCEPT : m_pipeline( pipeline ) {}
+ VULKAN_HPP_CONSTEXPR ImageView() = default;
+ VULKAN_HPP_CONSTEXPR ImageView( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {}
+ VULKAN_HPP_TYPESAFE_EXPLICIT ImageView( VkImageView imageView ) VULKAN_HPP_NOEXCEPT : m_imageView( imageView ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
- Pipeline & operator=( VkPipeline pipeline ) VULKAN_HPP_NOEXCEPT
+ ImageView & operator=( VkImageView imageView ) VULKAN_HPP_NOEXCEPT
{
- m_pipeline = pipeline;
+ m_imageView = imageView;
return *this;
}
#endif
- Pipeline & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT
+ ImageView & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT
{
- m_pipeline = {};
+ m_imageView = {};
return *this;
}
#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
- auto operator<=>( Pipeline const & ) const = default;
+ auto operator<=>( ImageView const & ) const = default;
#else
- bool operator==( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT
{
- return m_pipeline == rhs.m_pipeline;
+ return m_imageView == rhs.m_imageView;
}
- bool operator!=( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT
{
- return m_pipeline != rhs.m_pipeline;
+ return m_imageView != rhs.m_imageView;
}
- bool operator<( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator<( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT
{
- return m_pipeline < rhs.m_pipeline;
+ return m_imageView < rhs.m_imageView;
}
#endif
- VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipeline() const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImageView() const VULKAN_HPP_NOEXCEPT
{
- return m_pipeline;
+ return m_imageView;
}
explicit operator bool() const VULKAN_HPP_NOEXCEPT
{
- return m_pipeline != VK_NULL_HANDLE;
+ return m_imageView != VK_NULL_HANDLE;
}
bool operator!() const VULKAN_HPP_NOEXCEPT
{
- return m_pipeline == VK_NULL_HANDLE;
+ return m_imageView == VK_NULL_HANDLE;
}
private:
- VkPipeline m_pipeline = {};
+ VkImageView m_imageView = {};
};
- static_assert( sizeof( VULKAN_HPP_NAMESPACE::Pipeline ) == sizeof( VkPipeline ),
+ static_assert( sizeof( VULKAN_HPP_NAMESPACE::ImageView ) == sizeof( VkImageView ),
"handle and wrapper have different size!" );
template <>
- struct VULKAN_HPP_DEPRECATED( "vk::cpp_type is deprecated. Use vk::CppType instead." ) cpp_type<ObjectType::ePipeline>
+ struct VULKAN_HPP_DEPRECATED(
+ "vk::cpp_type is deprecated. Use vk::CppType instead." ) cpp_type<ObjectType::eImageView>
{
- using type = VULKAN_HPP_NAMESPACE::Pipeline;
+ using type = VULKAN_HPP_NAMESPACE::ImageView;
};
template <>
- struct CppType<VULKAN_HPP_NAMESPACE::ObjectType, VULKAN_HPP_NAMESPACE::ObjectType::ePipeline>
+ struct CppType<VULKAN_HPP_NAMESPACE::ObjectType, VULKAN_HPP_NAMESPACE::ObjectType::eImageView>
{
- using Type = VULKAN_HPP_NAMESPACE::Pipeline;
+ using Type = VULKAN_HPP_NAMESPACE::ImageView;
};
template <>
struct CppType<VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT,
- VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipeline>
+ VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImageView>
{
- using Type = VULKAN_HPP_NAMESPACE::Pipeline;
+ using Type = VULKAN_HPP_NAMESPACE::ImageView;
};
template <>
- struct isVulkanHandleType<VULKAN_HPP_NAMESPACE::Pipeline>
+ struct isVulkanHandleType<VULKAN_HPP_NAMESPACE::ImageView>
{
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true;
};
- class ImageView
+ class Pipeline
{
public:
- using CType = VkImageView;
+ using CType = VkPipeline;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
- VULKAN_HPP_NAMESPACE::ObjectType::eImageView;
+ VULKAN_HPP_NAMESPACE::ObjectType::ePipeline;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
- VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImageView;
+ VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipeline;
public:
- VULKAN_HPP_CONSTEXPR ImageView() = default;
- VULKAN_HPP_CONSTEXPR ImageView( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {}
- VULKAN_HPP_TYPESAFE_EXPLICIT ImageView( VkImageView imageView ) VULKAN_HPP_NOEXCEPT : m_imageView( imageView ) {}
+ VULKAN_HPP_CONSTEXPR Pipeline() = default;
+ VULKAN_HPP_CONSTEXPR Pipeline( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {}
+ VULKAN_HPP_TYPESAFE_EXPLICIT Pipeline( VkPipeline pipeline ) VULKAN_HPP_NOEXCEPT : m_pipeline( pipeline ) {}
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
- ImageView & operator=( VkImageView imageView ) VULKAN_HPP_NOEXCEPT
+ Pipeline & operator=( VkPipeline pipeline ) VULKAN_HPP_NOEXCEPT
{
- m_imageView = imageView;
+ m_pipeline = pipeline;
return *this;
}
#endif
- ImageView & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT
+ Pipeline & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT
{
- m_imageView = {};
+ m_pipeline = {};
return *this;
}
#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
- auto operator<=>( ImageView const & ) const = default;
+ auto operator<=>( Pipeline const & ) const = default;
#else
- bool operator==( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator==( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT
{
- return m_imageView == rhs.m_imageView;
+ return m_pipeline == rhs.m_pipeline;
}
- bool operator!=( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator!=( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT
{
- return m_imageView != rhs.m_imageView;
+ return m_pipeline != rhs.m_pipeline;
}
- bool operator<( ImageView const & rhs ) const VULKAN_HPP_NOEXCEPT
+ bool operator<( Pipeline const & rhs ) const VULKAN_HPP_NOEXCEPT
{
- return m_imageView < rhs.m_imageView;
+ return m_pipeline < rhs.m_pipeline;
}
#endif
- VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImageView() const VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipeline() const VULKAN_HPP_NOEXCEPT
{
- return m_imageView;
+ return m_pipeline;
}
explicit operator bool() const VULKAN_HPP_NOEXCEPT
{
- return m_imageView != VK_NULL_HANDLE;
+ return m_pipeline != VK_NULL_HANDLE;
}
bool operator!() const VULKAN_HPP_NOEXCEPT
{
- return m_imageView == VK_NULL_HANDLE;
+ return m_pipeline == VK_NULL_HANDLE;
}
private:
- VkImageView m_imageView = {};
+ VkPipeline m_pipeline = {};
};
- static_assert( sizeof( VULKAN_HPP_NAMESPACE::ImageView ) == sizeof( VkImageView ),
+ static_assert( sizeof( VULKAN_HPP_NAMESPACE::Pipeline ) == sizeof( VkPipeline ),
"handle and wrapper have different size!" );
template <>
- struct VULKAN_HPP_DEPRECATED(
- "vk::cpp_type is deprecated. Use vk::CppType instead." ) cpp_type<ObjectType::eImageView>
+ struct VULKAN_HPP_DEPRECATED( "vk::cpp_type is deprecated. Use vk::CppType instead." ) cpp_type<ObjectType::ePipeline>
{
- using type = VULKAN_HPP_NAMESPACE::ImageView;
+ using type = VULKAN_HPP_NAMESPACE::Pipeline;
};
template <>
- struct CppType<VULKAN_HPP_NAMESPACE::ObjectType, VULKAN_HPP_NAMESPACE::ObjectType::eImageView>
+ struct CppType<VULKAN_HPP_NAMESPACE::ObjectType, VULKAN_HPP_NAMESPACE::ObjectType::ePipeline>
{
- using Type = VULKAN_HPP_NAMESPACE::ImageView;
+ using Type = VULKAN_HPP_NAMESPACE::Pipeline;
};
template <>
struct CppType<VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT,
- VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImageView>
+ VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipeline>
{
- using Type = VULKAN_HPP_NAMESPACE::ImageView;
+ using Type = VULKAN_HPP_NAMESPACE::Pipeline;
};
template <>
- struct isVulkanHandleType<VULKAN_HPP_NAMESPACE::ImageView>
+ struct isVulkanHandleType<VULKAN_HPP_NAMESPACE::Pipeline>
{
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true;
};
@@ -4371,6 +4619,14 @@ namespace VULKAN_HPP_NAMESPACE
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
void subpassShadingHUAWEI( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
+ //=== VK_HUAWEI_invocation_mask ===
+
+ template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ void
+ bindInvocationMaskHUAWEI( VULKAN_HPP_NAMESPACE::ImageView imageView,
+ VULKAN_HPP_NAMESPACE::ImageLayout imageLayout,
+ Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
+
//=== VK_EXT_extended_dynamic_state2 ===
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
@@ -5777,18 +6033,6 @@ namespace VULKAN_HPP_NAMESPACE
}
#endif
- //=== VK_HUAWEI_subpass_shading ===
-
- template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- VULKAN_HPP_NODISCARD Result getSubpassShadingMaxWorkgroupSizeHUAWEI(
- VULKAN_HPP_NAMESPACE::Extent2D * pMaxWorkgroupSize,
- Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
-#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
- template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
- VULKAN_HPP_NODISCARD ResultValue<VULKAN_HPP_NAMESPACE::Extent2D>
- getSubpassShadingMaxWorkgroupSizeHUAWEI( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
-
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkRenderPass() const VULKAN_HPP_NOEXCEPT
{
return m_renderPass;
@@ -10503,6 +10747,23 @@ namespace VULKAN_HPP_NAMESPACE
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+ //=== VK_KHR_present_wait ===
+
+#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ VULKAN_HPP_NODISCARD Result
+ waitForPresentKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
+ uint64_t presentId,
+ uint64_t timeout,
+ Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
+#else
+ template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ VULKAN_HPP_NODISCARD Result waitForPresentKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain,
+ uint64_t presentId,
+ uint64_t timeout,
+ Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
//=== VK_EXT_full_screen_exclusive ===
@@ -11099,6 +11360,34 @@ namespace VULKAN_HPP_NAMESPACE
# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#endif /*VK_USE_PLATFORM_FUCHSIA*/
+ //=== VK_HUAWEI_subpass_shading ===
+
+ template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ VULKAN_HPP_NODISCARD Result getSubpassShadingMaxWorkgroupSizeHUAWEI(
+ VULKAN_HPP_NAMESPACE::RenderPass renderpass,
+ VULKAN_HPP_NAMESPACE::Extent2D * pMaxWorkgroupSize,
+ Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ VULKAN_HPP_NODISCARD ResultValue<VULKAN_HPP_NAMESPACE::Extent2D>
+ getSubpassShadingMaxWorkgroupSizeHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderpass,
+ Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
+ //=== VK_NV_external_memory_rdma ===
+
+ template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ VULKAN_HPP_NODISCARD Result
+ getMemoryRemoteAddressNV( const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV * pMemoryGetRemoteAddressInfo,
+ VULKAN_HPP_NAMESPACE::RemoteAddressNV * pAddress,
+ Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
+#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
+ template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
+ typename ResultValueType<VULKAN_HPP_NAMESPACE::RemoteAddressNV>::type
+ getMemoryRemoteAddressNV( const MemoryGetRemoteAddressInfoNV & memoryGetRemoteAddressInfo,
+ Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
+#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDevice() const VULKAN_HPP_NOEXCEPT
{
return m_device;
diff --git a/thirdparty/vulkan/include/vulkan/vulkan_raii.hpp b/thirdparty/vulkan/include/vulkan/vulkan_raii.hpp
index 9b15ebaa16..390e527992 100644
--- a/thirdparty/vulkan/include/vulkan/vulkan_raii.hpp
+++ b/thirdparty/vulkan/include/vulkan/vulkan_raii.hpp
@@ -32,1651 +32,2147 @@ namespace VULKAN_HPP_NAMESPACE
# endif
}
- class ContextDispatcher
+ class ContextDispatcher : public DispatchLoaderBase
{
public:
ContextDispatcher( PFN_vkGetInstanceProcAddr getProcAddr )
: vkGetInstanceProcAddr( getProcAddr )
+ //=== VK_VERSION_1_0 ===
, vkCreateInstance( PFN_vkCreateInstance( getProcAddr( NULL, "vkCreateInstance" ) ) )
, vkEnumerateInstanceExtensionProperties( PFN_vkEnumerateInstanceExtensionProperties(
getProcAddr( NULL, "vkEnumerateInstanceExtensionProperties" ) ) )
, vkEnumerateInstanceLayerProperties(
PFN_vkEnumerateInstanceLayerProperties( getProcAddr( NULL, "vkEnumerateInstanceLayerProperties" ) ) )
+ //=== VK_VERSION_1_1 ===
, vkEnumerateInstanceVersion(
PFN_vkEnumerateInstanceVersion( getProcAddr( NULL, "vkEnumerateInstanceVersion" ) ) )
{}
public:
- PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0;
+ PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0;
+
+ //=== VK_VERSION_1_0 ===
PFN_vkCreateInstance vkCreateInstance = 0;
PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties = 0;
PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties = 0;
- PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion = 0;
+
+ //=== VK_VERSION_1_1 ===
+ PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion = 0;
};
- class InstanceDispatcher
+ class InstanceDispatcher : public DispatchLoaderBase
{
public:
InstanceDispatcher( PFN_vkGetInstanceProcAddr getProcAddr ) : vkGetInstanceProcAddr( getProcAddr ) {}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ InstanceDispatcher() = default;
+# endif
+
void init( VkInstance instance )
{
+ //=== VK_VERSION_1_0 ===
+ vkDestroyInstance = PFN_vkDestroyInstance( vkGetInstanceProcAddr( instance, "vkDestroyInstance" ) );
+ vkEnumeratePhysicalDevices =
+ PFN_vkEnumeratePhysicalDevices( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDevices" ) );
+ vkGetPhysicalDeviceFeatures =
+ PFN_vkGetPhysicalDeviceFeatures( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures" ) );
+ vkGetPhysicalDeviceFormatProperties = PFN_vkGetPhysicalDeviceFormatProperties(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties" ) );
+ vkGetPhysicalDeviceImageFormatProperties = PFN_vkGetPhysicalDeviceImageFormatProperties(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties" ) );
+ vkGetPhysicalDeviceProperties =
+ PFN_vkGetPhysicalDeviceProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties" ) );
+ vkGetPhysicalDeviceQueueFamilyProperties = PFN_vkGetPhysicalDeviceQueueFamilyProperties(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties" ) );
+ vkGetPhysicalDeviceMemoryProperties = PFN_vkGetPhysicalDeviceMemoryProperties(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties" ) );
+ vkGetInstanceProcAddr = PFN_vkGetInstanceProcAddr( vkGetInstanceProcAddr( instance, "vkGetInstanceProcAddr" ) );
+ vkCreateDevice = PFN_vkCreateDevice( vkGetInstanceProcAddr( instance, "vkCreateDevice" ) );
+ vkEnumerateDeviceExtensionProperties = PFN_vkEnumerateDeviceExtensionProperties(
+ vkGetInstanceProcAddr( instance, "vkEnumerateDeviceExtensionProperties" ) );
+ vkEnumerateDeviceLayerProperties =
+ PFN_vkEnumerateDeviceLayerProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceLayerProperties" ) );
+ vkGetPhysicalDeviceSparseImageFormatProperties = PFN_vkGetPhysicalDeviceSparseImageFormatProperties(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties" ) );
+
+ //=== VK_VERSION_1_1 ===
+ vkEnumeratePhysicalDeviceGroups =
+ PFN_vkEnumeratePhysicalDeviceGroups( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroups" ) );
+ vkGetPhysicalDeviceFeatures2 =
+ PFN_vkGetPhysicalDeviceFeatures2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2" ) );
+ vkGetPhysicalDeviceProperties2 =
+ PFN_vkGetPhysicalDeviceProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2" ) );
+ vkGetPhysicalDeviceFormatProperties2 = PFN_vkGetPhysicalDeviceFormatProperties2(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2" ) );
+ vkGetPhysicalDeviceImageFormatProperties2 = PFN_vkGetPhysicalDeviceImageFormatProperties2(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2" ) );
+ vkGetPhysicalDeviceQueueFamilyProperties2 = PFN_vkGetPhysicalDeviceQueueFamilyProperties2(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2" ) );
+ vkGetPhysicalDeviceMemoryProperties2 = PFN_vkGetPhysicalDeviceMemoryProperties2(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2" ) );
+ vkGetPhysicalDeviceSparseImageFormatProperties2 = PFN_vkGetPhysicalDeviceSparseImageFormatProperties2(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2" ) );
+ vkGetPhysicalDeviceExternalBufferProperties = PFN_vkGetPhysicalDeviceExternalBufferProperties(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferProperties" ) );
+ vkGetPhysicalDeviceExternalFenceProperties = PFN_vkGetPhysicalDeviceExternalFenceProperties(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFenceProperties" ) );
+ vkGetPhysicalDeviceExternalSemaphoreProperties = PFN_vkGetPhysicalDeviceExternalSemaphoreProperties(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphoreProperties" ) );
+
+ //=== VK_EXT_acquire_drm_display ===
vkAcquireDrmDisplayEXT =
PFN_vkAcquireDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireDrmDisplayEXT" ) );
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkAcquireWinrtDisplayNV =
- PFN_vkAcquireWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkAcquireWinrtDisplayNV" ) );
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ vkGetDrmDisplayEXT = PFN_vkGetDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetDrmDisplayEXT" ) );
+
# if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT )
+ //=== VK_EXT_acquire_xlib_display ===
vkAcquireXlibDisplayEXT =
PFN_vkAcquireXlibDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireXlibDisplayEXT" ) );
+ vkGetRandROutputDisplayEXT =
+ PFN_vkGetRandROutputDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetRandROutputDisplayEXT" ) );
# endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/
-# if defined( VK_USE_PLATFORM_ANDROID_KHR )
- vkCreateAndroidSurfaceKHR =
- PFN_vkCreateAndroidSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" ) );
-# endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+ //=== VK_EXT_calibrated_timestamps ===
+ vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT" ) );
+
+ //=== VK_EXT_debug_report ===
vkCreateDebugReportCallbackEXT =
PFN_vkCreateDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugReportCallbackEXT" ) );
+ vkDestroyDebugReportCallbackEXT =
+ PFN_vkDestroyDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugReportCallbackEXT" ) );
+ vkDebugReportMessageEXT =
+ PFN_vkDebugReportMessageEXT( vkGetInstanceProcAddr( instance, "vkDebugReportMessageEXT" ) );
+
+ //=== VK_EXT_debug_utils ===
vkCreateDebugUtilsMessengerEXT =
PFN_vkCreateDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugUtilsMessengerEXT" ) );
- vkCreateDevice = PFN_vkCreateDevice( vkGetInstanceProcAddr( instance, "vkCreateDevice" ) );
+ vkDestroyDebugUtilsMessengerEXT =
+ PFN_vkDestroyDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugUtilsMessengerEXT" ) );
+ vkSubmitDebugUtilsMessageEXT =
+ PFN_vkSubmitDebugUtilsMessageEXT( vkGetInstanceProcAddr( instance, "vkSubmitDebugUtilsMessageEXT" ) );
+
+ //=== VK_EXT_direct_mode_display ===
+ vkReleaseDisplayEXT = PFN_vkReleaseDisplayEXT( vkGetInstanceProcAddr( instance, "vkReleaseDisplayEXT" ) );
+
# if defined( VK_USE_PLATFORM_DIRECTFB_EXT )
+ //=== VK_EXT_directfb_surface ===
vkCreateDirectFBSurfaceEXT =
PFN_vkCreateDirectFBSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateDirectFBSurfaceEXT" ) );
+ vkGetPhysicalDeviceDirectFBPresentationSupportEXT = PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT" ) );
# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/
- vkCreateDisplayModeKHR =
- PFN_vkCreateDisplayModeKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayModeKHR" ) );
- vkCreateDisplayPlaneSurfaceKHR =
- PFN_vkCreateDisplayPlaneSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayPlaneSurfaceKHR" ) );
+
+ //=== VK_EXT_display_surface_counter ===
+ vkGetPhysicalDeviceSurfaceCapabilities2EXT = PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT" ) );
+
+# if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_EXT_full_screen_exclusive ===
+ vkGetPhysicalDeviceSurfacePresentModes2EXT = PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT" ) );
+# endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_EXT_headless_surface ===
vkCreateHeadlessSurfaceEXT =
PFN_vkCreateHeadlessSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateHeadlessSurfaceEXT" ) );
-# if defined( VK_USE_PLATFORM_IOS_MVK )
- vkCreateIOSSurfaceMVK = PFN_vkCreateIOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateIOSSurfaceMVK" ) );
-# endif /*VK_USE_PLATFORM_IOS_MVK*/
-# if defined( VK_USE_PLATFORM_FUCHSIA )
- vkCreateImagePipeSurfaceFUCHSIA =
- PFN_vkCreateImagePipeSurfaceFUCHSIA( vkGetInstanceProcAddr( instance, "vkCreateImagePipeSurfaceFUCHSIA" ) );
-# endif /*VK_USE_PLATFORM_FUCHSIA*/
-# if defined( VK_USE_PLATFORM_MACOS_MVK )
- vkCreateMacOSSurfaceMVK =
- PFN_vkCreateMacOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateMacOSSurfaceMVK" ) );
-# endif /*VK_USE_PLATFORM_MACOS_MVK*/
+
# if defined( VK_USE_PLATFORM_METAL_EXT )
+ //=== VK_EXT_metal_surface ===
vkCreateMetalSurfaceEXT =
PFN_vkCreateMetalSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateMetalSurfaceEXT" ) );
# endif /*VK_USE_PLATFORM_METAL_EXT*/
-# if defined( VK_USE_PLATFORM_SCREEN_QNX )
- vkCreateScreenSurfaceQNX =
- PFN_vkCreateScreenSurfaceQNX( vkGetInstanceProcAddr( instance, "vkCreateScreenSurfaceQNX" ) );
-# endif /*VK_USE_PLATFORM_SCREEN_QNX*/
+
+ //=== VK_EXT_sample_locations ===
+ vkGetPhysicalDeviceMultisamplePropertiesEXT = PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT" ) );
+
+ //=== VK_EXT_tooling_info ===
+ vkGetPhysicalDeviceToolPropertiesEXT = PFN_vkGetPhysicalDeviceToolPropertiesEXT(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceToolPropertiesEXT" ) );
+
+# if defined( VK_USE_PLATFORM_FUCHSIA )
+ //=== VK_FUCHSIA_imagepipe_surface ===
+ vkCreateImagePipeSurfaceFUCHSIA =
+ PFN_vkCreateImagePipeSurfaceFUCHSIA( vkGetInstanceProcAddr( instance, "vkCreateImagePipeSurfaceFUCHSIA" ) );
+# endif /*VK_USE_PLATFORM_FUCHSIA*/
+
# if defined( VK_USE_PLATFORM_GGP )
+ //=== VK_GGP_stream_descriptor_surface ===
vkCreateStreamDescriptorSurfaceGGP = PFN_vkCreateStreamDescriptorSurfaceGGP(
vkGetInstanceProcAddr( instance, "vkCreateStreamDescriptorSurfaceGGP" ) );
# endif /*VK_USE_PLATFORM_GGP*/
-# if defined( VK_USE_PLATFORM_VI_NN )
- vkCreateViSurfaceNN = PFN_vkCreateViSurfaceNN( vkGetInstanceProcAddr( instance, "vkCreateViSurfaceNN" ) );
-# endif /*VK_USE_PLATFORM_VI_NN*/
-# if defined( VK_USE_PLATFORM_WAYLAND_KHR )
- vkCreateWaylandSurfaceKHR =
- PFN_vkCreateWaylandSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWaylandSurfaceKHR" ) );
-# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkCreateWin32SurfaceKHR =
- PFN_vkCreateWin32SurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWin32SurfaceKHR" ) );
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
-# if defined( VK_USE_PLATFORM_XCB_KHR )
- vkCreateXcbSurfaceKHR = PFN_vkCreateXcbSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXcbSurfaceKHR" ) );
-# endif /*VK_USE_PLATFORM_XCB_KHR*/
-# if defined( VK_USE_PLATFORM_XLIB_KHR )
- vkCreateXlibSurfaceKHR =
- PFN_vkCreateXlibSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXlibSurfaceKHR" ) );
-# endif /*VK_USE_PLATFORM_XLIB_KHR*/
- vkDebugReportMessageEXT =
- PFN_vkDebugReportMessageEXT( vkGetInstanceProcAddr( instance, "vkDebugReportMessageEXT" ) );
- vkDestroyDebugReportCallbackEXT =
- PFN_vkDestroyDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugReportCallbackEXT" ) );
- vkDestroyDebugUtilsMessengerEXT =
- PFN_vkDestroyDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugUtilsMessengerEXT" ) );
- vkDestroyInstance = PFN_vkDestroyInstance( vkGetInstanceProcAddr( instance, "vkDestroyInstance" ) );
- vkDestroySurfaceKHR = PFN_vkDestroySurfaceKHR( vkGetInstanceProcAddr( instance, "vkDestroySurfaceKHR" ) );
- vkEnumerateDeviceExtensionProperties = PFN_vkEnumerateDeviceExtensionProperties(
- vkGetInstanceProcAddr( instance, "vkEnumerateDeviceExtensionProperties" ) );
- vkEnumerateDeviceLayerProperties =
- PFN_vkEnumerateDeviceLayerProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceLayerProperties" ) );
- vkEnumeratePhysicalDeviceGroups =
- PFN_vkEnumeratePhysicalDeviceGroups( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroups" ) );
+
+# if defined( VK_USE_PLATFORM_ANDROID_KHR )
+ //=== VK_KHR_android_surface ===
+ vkCreateAndroidSurfaceKHR =
+ PFN_vkCreateAndroidSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" ) );
+# endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+ //=== VK_KHR_device_group ===
+ vkGetPhysicalDevicePresentRectanglesKHR = PFN_vkGetPhysicalDevicePresentRectanglesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDevicePresentRectanglesKHR" ) );
+
+ //=== VK_KHR_device_group_creation ===
vkEnumeratePhysicalDeviceGroupsKHR = PFN_vkEnumeratePhysicalDeviceGroupsKHR(
vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroupsKHR" ) );
if ( !vkEnumeratePhysicalDeviceGroups )
vkEnumeratePhysicalDeviceGroups = vkEnumeratePhysicalDeviceGroupsKHR;
- vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR =
- PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
- vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR" ) );
- vkEnumeratePhysicalDevices =
- PFN_vkEnumeratePhysicalDevices( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDevices" ) );
- vkGetDisplayModeProperties2KHR =
- PFN_vkGetDisplayModeProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModeProperties2KHR" ) );
+
+ //=== VK_KHR_display ===
+ vkGetPhysicalDeviceDisplayPropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPropertiesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPropertiesKHR" ) );
+ vkGetPhysicalDeviceDisplayPlanePropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR" ) );
+ vkGetDisplayPlaneSupportedDisplaysKHR = PFN_vkGetDisplayPlaneSupportedDisplaysKHR(
+ vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneSupportedDisplaysKHR" ) );
vkGetDisplayModePropertiesKHR =
PFN_vkGetDisplayModePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModePropertiesKHR" ) );
- vkGetDisplayPlaneCapabilities2KHR = PFN_vkGetDisplayPlaneCapabilities2KHR(
- vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilities2KHR" ) );
+ vkCreateDisplayModeKHR =
+ PFN_vkCreateDisplayModeKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayModeKHR" ) );
vkGetDisplayPlaneCapabilitiesKHR =
PFN_vkGetDisplayPlaneCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilitiesKHR" ) );
- vkGetDisplayPlaneSupportedDisplaysKHR = PFN_vkGetDisplayPlaneSupportedDisplaysKHR(
- vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneSupportedDisplaysKHR" ) );
- vkGetDrmDisplayEXT = PFN_vkGetDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetDrmDisplayEXT" ) );
- vkGetInstanceProcAddr = PFN_vkGetInstanceProcAddr( vkGetInstanceProcAddr( instance, "vkGetInstanceProcAddr" ) );
- vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT" ) );
- vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV" ) );
-# if defined( VK_USE_PLATFORM_DIRECTFB_EXT )
- vkGetPhysicalDeviceDirectFBPresentationSupportEXT = PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT" ) );
-# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/
- vkGetPhysicalDeviceDisplayPlaneProperties2KHR = PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR" ) );
- vkGetPhysicalDeviceDisplayPlanePropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR" ) );
- vkGetPhysicalDeviceDisplayProperties2KHR = PFN_vkGetPhysicalDeviceDisplayProperties2KHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayProperties2KHR" ) );
- vkGetPhysicalDeviceDisplayPropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPropertiesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPropertiesKHR" ) );
- vkGetPhysicalDeviceExternalBufferProperties = PFN_vkGetPhysicalDeviceExternalBufferProperties(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferProperties" ) );
- vkGetPhysicalDeviceExternalBufferPropertiesKHR = PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR" ) );
- if ( !vkGetPhysicalDeviceExternalBufferProperties )
- vkGetPhysicalDeviceExternalBufferProperties = vkGetPhysicalDeviceExternalBufferPropertiesKHR;
- vkGetPhysicalDeviceExternalFenceProperties = PFN_vkGetPhysicalDeviceExternalFenceProperties(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFenceProperties" ) );
+ vkCreateDisplayPlaneSurfaceKHR =
+ PFN_vkCreateDisplayPlaneSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayPlaneSurfaceKHR" ) );
+
+ //=== VK_KHR_external_fence_capabilities ===
vkGetPhysicalDeviceExternalFencePropertiesKHR = PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR" ) );
if ( !vkGetPhysicalDeviceExternalFenceProperties )
vkGetPhysicalDeviceExternalFenceProperties = vkGetPhysicalDeviceExternalFencePropertiesKHR;
- vkGetPhysicalDeviceExternalImageFormatPropertiesNV = PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV" ) );
- vkGetPhysicalDeviceExternalSemaphoreProperties = PFN_vkGetPhysicalDeviceExternalSemaphoreProperties(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphoreProperties" ) );
+
+ //=== VK_KHR_external_memory_capabilities ===
+ vkGetPhysicalDeviceExternalBufferPropertiesKHR = PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR" ) );
+ if ( !vkGetPhysicalDeviceExternalBufferProperties )
+ vkGetPhysicalDeviceExternalBufferProperties = vkGetPhysicalDeviceExternalBufferPropertiesKHR;
+
+ //=== VK_KHR_external_semaphore_capabilities ===
vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR" ) );
if ( !vkGetPhysicalDeviceExternalSemaphoreProperties )
vkGetPhysicalDeviceExternalSemaphoreProperties = vkGetPhysicalDeviceExternalSemaphorePropertiesKHR;
- vkGetPhysicalDeviceFeatures =
- PFN_vkGetPhysicalDeviceFeatures( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures" ) );
- vkGetPhysicalDeviceFeatures2 =
- PFN_vkGetPhysicalDeviceFeatures2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2" ) );
+
+ //=== VK_KHR_fragment_shading_rate ===
+ vkGetPhysicalDeviceFragmentShadingRatesKHR = PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR" ) );
+
+ //=== VK_KHR_get_display_properties2 ===
+ vkGetPhysicalDeviceDisplayProperties2KHR = PFN_vkGetPhysicalDeviceDisplayProperties2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayProperties2KHR" ) );
+ vkGetPhysicalDeviceDisplayPlaneProperties2KHR = PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR" ) );
+ vkGetDisplayModeProperties2KHR =
+ PFN_vkGetDisplayModeProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModeProperties2KHR" ) );
+ vkGetDisplayPlaneCapabilities2KHR = PFN_vkGetDisplayPlaneCapabilities2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilities2KHR" ) );
+
+ //=== VK_KHR_get_physical_device_properties2 ===
vkGetPhysicalDeviceFeatures2KHR =
PFN_vkGetPhysicalDeviceFeatures2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2KHR" ) );
if ( !vkGetPhysicalDeviceFeatures2 )
vkGetPhysicalDeviceFeatures2 = vkGetPhysicalDeviceFeatures2KHR;
- vkGetPhysicalDeviceFormatProperties = PFN_vkGetPhysicalDeviceFormatProperties(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties" ) );
- vkGetPhysicalDeviceFormatProperties2 = PFN_vkGetPhysicalDeviceFormatProperties2(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2" ) );
+ vkGetPhysicalDeviceProperties2KHR = PFN_vkGetPhysicalDeviceProperties2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2KHR" ) );
+ if ( !vkGetPhysicalDeviceProperties2 )
+ vkGetPhysicalDeviceProperties2 = vkGetPhysicalDeviceProperties2KHR;
vkGetPhysicalDeviceFormatProperties2KHR = PFN_vkGetPhysicalDeviceFormatProperties2KHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2KHR" ) );
if ( !vkGetPhysicalDeviceFormatProperties2 )
vkGetPhysicalDeviceFormatProperties2 = vkGetPhysicalDeviceFormatProperties2KHR;
- vkGetPhysicalDeviceFragmentShadingRatesKHR = PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR" ) );
- vkGetPhysicalDeviceImageFormatProperties = PFN_vkGetPhysicalDeviceImageFormatProperties(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties" ) );
- vkGetPhysicalDeviceImageFormatProperties2 = PFN_vkGetPhysicalDeviceImageFormatProperties2(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2" ) );
vkGetPhysicalDeviceImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceImageFormatProperties2KHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2KHR" ) );
if ( !vkGetPhysicalDeviceImageFormatProperties2 )
vkGetPhysicalDeviceImageFormatProperties2 = vkGetPhysicalDeviceImageFormatProperties2KHR;
- vkGetPhysicalDeviceMemoryProperties = PFN_vkGetPhysicalDeviceMemoryProperties(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties" ) );
- vkGetPhysicalDeviceMemoryProperties2 = PFN_vkGetPhysicalDeviceMemoryProperties2(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2" ) );
- vkGetPhysicalDeviceMemoryProperties2KHR = PFN_vkGetPhysicalDeviceMemoryProperties2KHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2KHR" ) );
- if ( !vkGetPhysicalDeviceMemoryProperties2 )
- vkGetPhysicalDeviceMemoryProperties2 = vkGetPhysicalDeviceMemoryProperties2KHR;
- vkGetPhysicalDeviceMultisamplePropertiesEXT = PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT" ) );
- vkGetPhysicalDevicePresentRectanglesKHR = PFN_vkGetPhysicalDevicePresentRectanglesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDevicePresentRectanglesKHR" ) );
- vkGetPhysicalDeviceProperties =
- PFN_vkGetPhysicalDeviceProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties" ) );
- vkGetPhysicalDeviceProperties2 =
- PFN_vkGetPhysicalDeviceProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2" ) );
- vkGetPhysicalDeviceProperties2KHR = PFN_vkGetPhysicalDeviceProperties2KHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2KHR" ) );
- if ( !vkGetPhysicalDeviceProperties2 )
- vkGetPhysicalDeviceProperties2 = vkGetPhysicalDeviceProperties2KHR;
- vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR =
- PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR" ) );
- vkGetPhysicalDeviceQueueFamilyProperties = PFN_vkGetPhysicalDeviceQueueFamilyProperties(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties" ) );
- vkGetPhysicalDeviceQueueFamilyProperties2 = PFN_vkGetPhysicalDeviceQueueFamilyProperties2(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2" ) );
vkGetPhysicalDeviceQueueFamilyProperties2KHR = PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR" ) );
if ( !vkGetPhysicalDeviceQueueFamilyProperties2 )
vkGetPhysicalDeviceQueueFamilyProperties2 = vkGetPhysicalDeviceQueueFamilyProperties2KHR;
-# if defined( VK_USE_PLATFORM_SCREEN_QNX )
- vkGetPhysicalDeviceScreenPresentationSupportQNX = PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceScreenPresentationSupportQNX" ) );
-# endif /*VK_USE_PLATFORM_SCREEN_QNX*/
- vkGetPhysicalDeviceSparseImageFormatProperties = PFN_vkGetPhysicalDeviceSparseImageFormatProperties(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties" ) );
- vkGetPhysicalDeviceSparseImageFormatProperties2 = PFN_vkGetPhysicalDeviceSparseImageFormatProperties2(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2" ) );
+ vkGetPhysicalDeviceMemoryProperties2KHR = PFN_vkGetPhysicalDeviceMemoryProperties2KHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2KHR" ) );
+ if ( !vkGetPhysicalDeviceMemoryProperties2 )
+ vkGetPhysicalDeviceMemoryProperties2 = vkGetPhysicalDeviceMemoryProperties2KHR;
vkGetPhysicalDeviceSparseImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR" ) );
if ( !vkGetPhysicalDeviceSparseImageFormatProperties2 )
vkGetPhysicalDeviceSparseImageFormatProperties2 = vkGetPhysicalDeviceSparseImageFormatProperties2KHR;
- vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV =
- PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV" ) );
- vkGetPhysicalDeviceSurfaceCapabilities2EXT = PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT" ) );
+
+ //=== VK_KHR_get_surface_capabilities2 ===
vkGetPhysicalDeviceSurfaceCapabilities2KHR = PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR" ) );
- vkGetPhysicalDeviceSurfaceCapabilitiesKHR = PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR" ) );
vkGetPhysicalDeviceSurfaceFormats2KHR = PFN_vkGetPhysicalDeviceSurfaceFormats2KHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceFormats2KHR" ) );
+
+ //=== VK_KHR_performance_query ===
+ vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR =
+ PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
+ vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR" ) );
+ vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR =
+ PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR" ) );
+
+ //=== VK_KHR_surface ===
+ vkDestroySurfaceKHR = PFN_vkDestroySurfaceKHR( vkGetInstanceProcAddr( instance, "vkDestroySurfaceKHR" ) );
+ vkGetPhysicalDeviceSurfaceSupportKHR = PFN_vkGetPhysicalDeviceSurfaceSupportKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceSupportKHR" ) );
+ vkGetPhysicalDeviceSurfaceCapabilitiesKHR = PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR" ) );
vkGetPhysicalDeviceSurfaceFormatsKHR = PFN_vkGetPhysicalDeviceSurfaceFormatsKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceFormatsKHR" ) );
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetPhysicalDeviceSurfacePresentModes2EXT = PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT" ) );
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
vkGetPhysicalDeviceSurfacePresentModesKHR = PFN_vkGetPhysicalDeviceSurfacePresentModesKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModesKHR" ) );
- vkGetPhysicalDeviceSurfaceSupportKHR = PFN_vkGetPhysicalDeviceSurfaceSupportKHR(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceSupportKHR" ) );
- vkGetPhysicalDeviceToolPropertiesEXT = PFN_vkGetPhysicalDeviceToolPropertiesEXT(
- vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceToolPropertiesEXT" ) );
+
# if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_queue ===
vkGetPhysicalDeviceVideoCapabilitiesKHR = PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoCapabilitiesKHR" ) );
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
vkGetPhysicalDeviceVideoFormatPropertiesKHR = PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoFormatPropertiesKHR" ) );
# endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
# if defined( VK_USE_PLATFORM_WAYLAND_KHR )
+ //=== VK_KHR_wayland_surface ===
+ vkCreateWaylandSurfaceKHR =
+ PFN_vkCreateWaylandSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWaylandSurfaceKHR" ) );
vkGetPhysicalDeviceWaylandPresentationSupportKHR = PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR" ) );
# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
# if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_win32_surface ===
+ vkCreateWin32SurfaceKHR =
+ PFN_vkCreateWin32SurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWin32SurfaceKHR" ) );
vkGetPhysicalDeviceWin32PresentationSupportKHR = PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR" ) );
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
# if defined( VK_USE_PLATFORM_XCB_KHR )
+ //=== VK_KHR_xcb_surface ===
+ vkCreateXcbSurfaceKHR = PFN_vkCreateXcbSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXcbSurfaceKHR" ) );
vkGetPhysicalDeviceXcbPresentationSupportKHR = PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR" ) );
# endif /*VK_USE_PLATFORM_XCB_KHR*/
+
# if defined( VK_USE_PLATFORM_XLIB_KHR )
+ //=== VK_KHR_xlib_surface ===
+ vkCreateXlibSurfaceKHR =
+ PFN_vkCreateXlibSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXlibSurfaceKHR" ) );
vkGetPhysicalDeviceXlibPresentationSupportKHR = PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR(
vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR" ) );
# endif /*VK_USE_PLATFORM_XLIB_KHR*/
-# if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT )
- vkGetRandROutputDisplayEXT =
- PFN_vkGetRandROutputDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetRandROutputDisplayEXT" ) );
-# endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/
+
+# if defined( VK_USE_PLATFORM_IOS_MVK )
+ //=== VK_MVK_ios_surface ===
+ vkCreateIOSSurfaceMVK = PFN_vkCreateIOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateIOSSurfaceMVK" ) );
+# endif /*VK_USE_PLATFORM_IOS_MVK*/
+
+# if defined( VK_USE_PLATFORM_MACOS_MVK )
+ //=== VK_MVK_macos_surface ===
+ vkCreateMacOSSurfaceMVK =
+ PFN_vkCreateMacOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateMacOSSurfaceMVK" ) );
+# endif /*VK_USE_PLATFORM_MACOS_MVK*/
+
+# if defined( VK_USE_PLATFORM_VI_NN )
+ //=== VK_NN_vi_surface ===
+ vkCreateViSurfaceNN = PFN_vkCreateViSurfaceNN( vkGetInstanceProcAddr( instance, "vkCreateViSurfaceNN" ) );
+# endif /*VK_USE_PLATFORM_VI_NN*/
+
# if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_NV_acquire_winrt_display ===
+ vkAcquireWinrtDisplayNV =
+ PFN_vkAcquireWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkAcquireWinrtDisplayNV" ) );
vkGetWinrtDisplayNV = PFN_vkGetWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkGetWinrtDisplayNV" ) );
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkReleaseDisplayEXT = PFN_vkReleaseDisplayEXT( vkGetInstanceProcAddr( instance, "vkReleaseDisplayEXT" ) );
- vkSubmitDebugUtilsMessageEXT =
- PFN_vkSubmitDebugUtilsMessageEXT( vkGetInstanceProcAddr( instance, "vkSubmitDebugUtilsMessageEXT" ) );
+
+ //=== VK_NV_cooperative_matrix ===
+ vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV" ) );
+
+ //=== VK_NV_coverage_reduction_mode ===
+ vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV =
+ PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV" ) );
+
+ //=== VK_NV_external_memory_capabilities ===
+ vkGetPhysicalDeviceExternalImageFormatPropertiesNV = PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV" ) );
+
+# if defined( VK_USE_PLATFORM_SCREEN_QNX )
+ //=== VK_QNX_screen_surface ===
+ vkCreateScreenSurfaceQNX =
+ PFN_vkCreateScreenSurfaceQNX( vkGetInstanceProcAddr( instance, "vkCreateScreenSurfaceQNX" ) );
+ vkGetPhysicalDeviceScreenPresentationSupportQNX = PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX(
+ vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceScreenPresentationSupportQNX" ) );
+# endif /*VK_USE_PLATFORM_SCREEN_QNX*/
vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr" ) );
}
public:
+ //=== VK_VERSION_1_0 ===
+ PFN_vkDestroyInstance vkDestroyInstance = 0;
+ PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices = 0;
+ PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures = 0;
+ PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties = 0;
+ PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties = 0;
+ PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties = 0;
+ PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties = 0;
+ PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties = 0;
+ PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0;
+ PFN_vkCreateDevice vkCreateDevice = 0;
+ PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties = 0;
+ PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties = 0;
+ PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties = 0;
+
+ //=== VK_VERSION_1_1 ===
+ PFN_vkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups = 0;
+ PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2 = 0;
+ PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2 = 0;
+ PFN_vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2 = 0;
+ PFN_vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2 = 0;
+ PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2 = 0;
+ PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2 = 0;
+ PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2 = 0;
+ PFN_vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties = 0;
+ PFN_vkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties = 0;
+ PFN_vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties = 0;
+
+ //=== VK_EXT_acquire_drm_display ===
PFN_vkAcquireDrmDisplayEXT vkAcquireDrmDisplayEXT = 0;
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV = 0;
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
+ PFN_vkGetDrmDisplayEXT vkGetDrmDisplayEXT = 0;
+
# if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT )
- PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT = 0;
+ //=== VK_EXT_acquire_xlib_display ===
+ PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT = 0;
+ PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT = 0;
+# else
+ PFN_dummy vkAcquireXlibDisplayEXT_placeholder = 0;
+ PFN_dummy vkGetRandROutputDisplayEXT_placeholder = 0;
# endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/
-# if defined( VK_USE_PLATFORM_ANDROID_KHR )
- PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR = 0;
-# endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = 0;
- PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT = 0;
- PFN_vkCreateDevice vkCreateDevice = 0;
+
+ //=== VK_EXT_calibrated_timestamps ===
+ PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = 0;
+
+ //=== VK_EXT_debug_report ===
+ PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = 0;
+ PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT = 0;
+ PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT = 0;
+
+ //=== VK_EXT_debug_utils ===
+ PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT = 0;
+ PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT = 0;
+ PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT = 0;
+
+ //=== VK_EXT_direct_mode_display ===
+ PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT = 0;
+
# if defined( VK_USE_PLATFORM_DIRECTFB_EXT )
- PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT = 0;
+ //=== VK_EXT_directfb_surface ===
+ PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT = 0;
+ PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT = 0;
+# else
+ PFN_dummy vkCreateDirectFBSurfaceEXT_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceDirectFBPresentationSupportEXT_placeholder = 0;
# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/
- PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR = 0;
- PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR = 0;
- PFN_vkCreateHeadlessSurfaceEXT vkCreateHeadlessSurfaceEXT = 0;
-# if defined( VK_USE_PLATFORM_IOS_MVK )
- PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK = 0;
-# endif /*VK_USE_PLATFORM_IOS_MVK*/
-# if defined( VK_USE_PLATFORM_FUCHSIA )
- PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA = 0;
-# endif /*VK_USE_PLATFORM_FUCHSIA*/
-# if defined( VK_USE_PLATFORM_MACOS_MVK )
- PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK = 0;
-# endif /*VK_USE_PLATFORM_MACOS_MVK*/
+
+ //=== VK_EXT_display_surface_counter ===
+ PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT = 0;
+
+# if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_EXT_full_screen_exclusive ===
+ PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT vkGetPhysicalDeviceSurfacePresentModes2EXT = 0;
+# else
+ PFN_dummy vkGetPhysicalDeviceSurfacePresentModes2EXT_placeholder = 0;
+# endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_EXT_headless_surface ===
+ PFN_vkCreateHeadlessSurfaceEXT vkCreateHeadlessSurfaceEXT = 0;
+
# if defined( VK_USE_PLATFORM_METAL_EXT )
+ //=== VK_EXT_metal_surface ===
PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT = 0;
+# else
+ PFN_dummy vkCreateMetalSurfaceEXT_placeholder = 0;
# endif /*VK_USE_PLATFORM_METAL_EXT*/
-# if defined( VK_USE_PLATFORM_SCREEN_QNX )
- PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX = 0;
-# endif /*VK_USE_PLATFORM_SCREEN_QNX*/
+
+ //=== VK_EXT_sample_locations ===
+ PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT = 0;
+
+ //=== VK_EXT_tooling_info ===
+ PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT = 0;
+
+# if defined( VK_USE_PLATFORM_FUCHSIA )
+ //=== VK_FUCHSIA_imagepipe_surface ===
+ PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA = 0;
+# else
+ PFN_dummy vkCreateImagePipeSurfaceFUCHSIA_placeholder = 0;
+# endif /*VK_USE_PLATFORM_FUCHSIA*/
+
# if defined( VK_USE_PLATFORM_GGP )
+ //=== VK_GGP_stream_descriptor_surface ===
PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP = 0;
+# else
+ PFN_dummy vkCreateStreamDescriptorSurfaceGGP_placeholder = 0;
# endif /*VK_USE_PLATFORM_GGP*/
-# if defined( VK_USE_PLATFORM_VI_NN )
- PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN = 0;
-# endif /*VK_USE_PLATFORM_VI_NN*/
-# if defined( VK_USE_PLATFORM_WAYLAND_KHR )
- PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR = 0;
-# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR = 0;
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
-# if defined( VK_USE_PLATFORM_XCB_KHR )
- PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR = 0;
-# endif /*VK_USE_PLATFORM_XCB_KHR*/
-# if defined( VK_USE_PLATFORM_XLIB_KHR )
- PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR = 0;
-# endif /*VK_USE_PLATFORM_XLIB_KHR*/
- PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT = 0;
- PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT = 0;
- PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT = 0;
- PFN_vkDestroyInstance vkDestroyInstance = 0;
- PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR = 0;
- PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties = 0;
- PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties = 0;
- PFN_vkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups = 0;
- PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = 0;
- PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR
- vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = 0;
- PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices = 0;
- PFN_vkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR = 0;
- PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR = 0;
- PFN_vkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR = 0;
- PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR = 0;
- PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR = 0;
- PFN_vkGetDrmDisplayEXT vkGetDrmDisplayEXT = 0;
- PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0;
- PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = 0;
- PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = 0;
-# if defined( VK_USE_PLATFORM_DIRECTFB_EXT )
- PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT = 0;
-# endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/
- PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR vkGetPhysicalDeviceDisplayPlaneProperties2KHR = 0;
- PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR = 0;
- PFN_vkGetPhysicalDeviceDisplayProperties2KHR vkGetPhysicalDeviceDisplayProperties2KHR = 0;
- PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR = 0;
- PFN_vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties = 0;
- PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR = 0;
- PFN_vkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties = 0;
- PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR = 0;
- PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV = 0;
- PFN_vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties = 0;
- PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = 0;
- PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures = 0;
- PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2 = 0;
+
+# if defined( VK_USE_PLATFORM_ANDROID_KHR )
+ //=== VK_KHR_android_surface ===
+ PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR = 0;
+# else
+ PFN_dummy vkCreateAndroidSurfaceKHR_placeholder = 0;
+# endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+ //=== VK_KHR_device_group ===
+ PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR = 0;
+
+ //=== VK_KHR_device_group_creation ===
+ PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = 0;
+
+ //=== VK_KHR_display ===
+ PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR = 0;
+ PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR = 0;
+ PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR = 0;
+ PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR = 0;
+ PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR = 0;
+ PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR = 0;
+ PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR = 0;
+
+ //=== VK_KHR_external_fence_capabilities ===
+ PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR = 0;
+
+ //=== VK_KHR_external_memory_capabilities ===
+ PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR = 0;
+
+ //=== VK_KHR_external_semaphore_capabilities ===
+ PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = 0;
+
+ //=== VK_KHR_fragment_shading_rate ===
+ PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR vkGetPhysicalDeviceFragmentShadingRatesKHR = 0;
+
+ //=== VK_KHR_get_display_properties2 ===
+ PFN_vkGetPhysicalDeviceDisplayProperties2KHR vkGetPhysicalDeviceDisplayProperties2KHR = 0;
+ PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR vkGetPhysicalDeviceDisplayPlaneProperties2KHR = 0;
+ PFN_vkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR = 0;
+ PFN_vkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR = 0;
+
+ //=== VK_KHR_get_physical_device_properties2 ===
PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR = 0;
- PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties = 0;
- PFN_vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2 = 0;
+ PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = 0;
PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR = 0;
- PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR vkGetPhysicalDeviceFragmentShadingRatesKHR = 0;
- PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties = 0;
- PFN_vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2 = 0;
PFN_vkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR = 0;
- PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties = 0;
- PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2 = 0;
+ PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR = 0;
PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR = 0;
- PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT = 0;
- PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR = 0;
- PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties = 0;
- PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2 = 0;
- PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = 0;
- PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR
- vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = 0;
- PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties = 0;
- PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2 = 0;
- PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR = 0;
-# if defined( VK_USE_PLATFORM_SCREEN_QNX )
- PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX = 0;
-# endif /*VK_USE_PLATFORM_SCREEN_QNX*/
- PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties = 0;
- PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2 = 0;
PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR = 0;
- PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV
- vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = 0;
- PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT = 0;
+
+ //=== VK_KHR_get_surface_capabilities2 ===
PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR = 0;
- PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 0;
PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR = 0;
- PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR = 0;
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT vkGetPhysicalDeviceSurfacePresentModes2EXT = 0;
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR = 0;
+
+ //=== VK_KHR_performance_query ===
+ PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR
+ vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = 0;
+ PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR
+ vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = 0;
+
+ //=== VK_KHR_surface ===
+ PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR = 0;
PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR = 0;
- PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT = 0;
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR vkGetPhysicalDeviceVideoCapabilitiesKHR = 0;
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
+ PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 0;
+ PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR = 0;
+ PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR = 0;
+
# if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_queue ===
+ PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR vkGetPhysicalDeviceVideoCapabilitiesKHR = 0;
PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR vkGetPhysicalDeviceVideoFormatPropertiesKHR = 0;
+# else
+ PFN_dummy vkGetPhysicalDeviceVideoCapabilitiesKHR_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceVideoFormatPropertiesKHR_placeholder = 0;
# endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
# if defined( VK_USE_PLATFORM_WAYLAND_KHR )
+ //=== VK_KHR_wayland_surface ===
+ PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR = 0;
PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR = 0;
+# else
+ PFN_dummy vkCreateWaylandSurfaceKHR_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceWaylandPresentationSupportKHR_placeholder = 0;
# endif /*VK_USE_PLATFORM_WAYLAND_KHR*/
+
# if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_win32_surface ===
+ PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR = 0;
PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR = 0;
+# else
+ PFN_dummy vkCreateWin32SurfaceKHR_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceWin32PresentationSupportKHR_placeholder = 0;
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
# if defined( VK_USE_PLATFORM_XCB_KHR )
+ //=== VK_KHR_xcb_surface ===
+ PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR = 0;
PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR = 0;
+# else
+ PFN_dummy vkCreateXcbSurfaceKHR_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceXcbPresentationSupportKHR_placeholder = 0;
# endif /*VK_USE_PLATFORM_XCB_KHR*/
+
# if defined( VK_USE_PLATFORM_XLIB_KHR )
+ //=== VK_KHR_xlib_surface ===
+ PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR = 0;
PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR = 0;
+# else
+ PFN_dummy vkCreateXlibSurfaceKHR_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceXlibPresentationSupportKHR_placeholder = 0;
# endif /*VK_USE_PLATFORM_XLIB_KHR*/
-# if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT )
- PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT = 0;
-# endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/
+
+# if defined( VK_USE_PLATFORM_IOS_MVK )
+ //=== VK_MVK_ios_surface ===
+ PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK = 0;
+# else
+ PFN_dummy vkCreateIOSSurfaceMVK_placeholder = 0;
+# endif /*VK_USE_PLATFORM_IOS_MVK*/
+
+# if defined( VK_USE_PLATFORM_MACOS_MVK )
+ //=== VK_MVK_macos_surface ===
+ PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK = 0;
+# else
+ PFN_dummy vkCreateMacOSSurfaceMVK_placeholder = 0;
+# endif /*VK_USE_PLATFORM_MACOS_MVK*/
+
+# if defined( VK_USE_PLATFORM_VI_NN )
+ //=== VK_NN_vi_surface ===
+ PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN = 0;
+# else
+ PFN_dummy vkCreateViSurfaceNN_placeholder = 0;
+# endif /*VK_USE_PLATFORM_VI_NN*/
+
# if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetWinrtDisplayNV vkGetWinrtDisplayNV = 0;
+ //=== VK_NV_acquire_winrt_display ===
+ PFN_vkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV = 0;
+ PFN_vkGetWinrtDisplayNV vkGetWinrtDisplayNV = 0;
+# else
+ PFN_dummy vkAcquireWinrtDisplayNV_placeholder = 0;
+ PFN_dummy vkGetWinrtDisplayNV_placeholder = 0;
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT = 0;
- PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT = 0;
+
+ //=== VK_NV_cooperative_matrix ===
+ PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = 0;
+
+ //=== VK_NV_coverage_reduction_mode ===
+ PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV
+ vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = 0;
+
+ //=== VK_NV_external_memory_capabilities ===
+ PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV = 0;
+
+# if defined( VK_USE_PLATFORM_SCREEN_QNX )
+ //=== VK_QNX_screen_surface ===
+ PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX = 0;
+ PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX = 0;
+# else
+ PFN_dummy vkCreateScreenSurfaceQNX_placeholder = 0;
+ PFN_dummy vkGetPhysicalDeviceScreenPresentationSupportQNX_placeholder = 0;
+# endif /*VK_USE_PLATFORM_SCREEN_QNX*/
PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0;
};
- class DeviceDispatcher
+ class DeviceDispatcher : public DispatchLoaderBase
{
public:
DeviceDispatcher( PFN_vkGetDeviceProcAddr getProcAddr ) : vkGetDeviceProcAddr( getProcAddr ) {}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ DeviceDispatcher() = default;
+# endif
+
void init( VkDevice device )
{
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkAcquireFullScreenExclusiveModeEXT = PFN_vkAcquireFullScreenExclusiveModeEXT(
- vkGetDeviceProcAddr( device, "vkAcquireFullScreenExclusiveModeEXT" ) );
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkAcquireNextImage2KHR = PFN_vkAcquireNextImage2KHR( vkGetDeviceProcAddr( device, "vkAcquireNextImage2KHR" ) );
- vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetDeviceProcAddr( device, "vkAcquireNextImageKHR" ) );
- vkAcquirePerformanceConfigurationINTEL = PFN_vkAcquirePerformanceConfigurationINTEL(
- vkGetDeviceProcAddr( device, "vkAcquirePerformanceConfigurationINTEL" ) );
- vkAcquireProfilingLockKHR =
- PFN_vkAcquireProfilingLockKHR( vkGetDeviceProcAddr( device, "vkAcquireProfilingLockKHR" ) );
- vkAllocateCommandBuffers =
- PFN_vkAllocateCommandBuffers( vkGetDeviceProcAddr( device, "vkAllocateCommandBuffers" ) );
+ //=== VK_VERSION_1_0 ===
+ vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetDeviceProcAddr( device, "vkGetDeviceProcAddr" ) );
+ vkDestroyDevice = PFN_vkDestroyDevice( vkGetDeviceProcAddr( device, "vkDestroyDevice" ) );
+ vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetDeviceProcAddr( device, "vkGetDeviceQueue" ) );
+ vkQueueSubmit = PFN_vkQueueSubmit( vkGetDeviceProcAddr( device, "vkQueueSubmit" ) );
+ vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetDeviceProcAddr( device, "vkQueueWaitIdle" ) );
+ vkDeviceWaitIdle = PFN_vkDeviceWaitIdle( vkGetDeviceProcAddr( device, "vkDeviceWaitIdle" ) );
+ vkAllocateMemory = PFN_vkAllocateMemory( vkGetDeviceProcAddr( device, "vkAllocateMemory" ) );
+ vkFreeMemory = PFN_vkFreeMemory( vkGetDeviceProcAddr( device, "vkFreeMemory" ) );
+ vkMapMemory = PFN_vkMapMemory( vkGetDeviceProcAddr( device, "vkMapMemory" ) );
+ vkUnmapMemory = PFN_vkUnmapMemory( vkGetDeviceProcAddr( device, "vkUnmapMemory" ) );
+ vkFlushMappedMemoryRanges =
+ PFN_vkFlushMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkFlushMappedMemoryRanges" ) );
+ vkInvalidateMappedMemoryRanges =
+ PFN_vkInvalidateMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkInvalidateMappedMemoryRanges" ) );
+ vkGetDeviceMemoryCommitment =
+ PFN_vkGetDeviceMemoryCommitment( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryCommitment" ) );
+ vkBindBufferMemory = PFN_vkBindBufferMemory( vkGetDeviceProcAddr( device, "vkBindBufferMemory" ) );
+ vkBindImageMemory = PFN_vkBindImageMemory( vkGetDeviceProcAddr( device, "vkBindImageMemory" ) );
+ vkGetBufferMemoryRequirements =
+ PFN_vkGetBufferMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements" ) );
+ vkGetImageMemoryRequirements =
+ PFN_vkGetImageMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements" ) );
+ vkGetImageSparseMemoryRequirements =
+ PFN_vkGetImageSparseMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements" ) );
+ vkQueueBindSparse = PFN_vkQueueBindSparse( vkGetDeviceProcAddr( device, "vkQueueBindSparse" ) );
+ vkCreateFence = PFN_vkCreateFence( vkGetDeviceProcAddr( device, "vkCreateFence" ) );
+ vkDestroyFence = PFN_vkDestroyFence( vkGetDeviceProcAddr( device, "vkDestroyFence" ) );
+ vkResetFences = PFN_vkResetFences( vkGetDeviceProcAddr( device, "vkResetFences" ) );
+ vkGetFenceStatus = PFN_vkGetFenceStatus( vkGetDeviceProcAddr( device, "vkGetFenceStatus" ) );
+ vkWaitForFences = PFN_vkWaitForFences( vkGetDeviceProcAddr( device, "vkWaitForFences" ) );
+ vkCreateSemaphore = PFN_vkCreateSemaphore( vkGetDeviceProcAddr( device, "vkCreateSemaphore" ) );
+ vkDestroySemaphore = PFN_vkDestroySemaphore( vkGetDeviceProcAddr( device, "vkDestroySemaphore" ) );
+ vkCreateEvent = PFN_vkCreateEvent( vkGetDeviceProcAddr( device, "vkCreateEvent" ) );
+ vkDestroyEvent = PFN_vkDestroyEvent( vkGetDeviceProcAddr( device, "vkDestroyEvent" ) );
+ vkGetEventStatus = PFN_vkGetEventStatus( vkGetDeviceProcAddr( device, "vkGetEventStatus" ) );
+ vkSetEvent = PFN_vkSetEvent( vkGetDeviceProcAddr( device, "vkSetEvent" ) );
+ vkResetEvent = PFN_vkResetEvent( vkGetDeviceProcAddr( device, "vkResetEvent" ) );
+ vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetDeviceProcAddr( device, "vkCreateQueryPool" ) );
+ vkDestroyQueryPool = PFN_vkDestroyQueryPool( vkGetDeviceProcAddr( device, "vkDestroyQueryPool" ) );
+ vkGetQueryPoolResults = PFN_vkGetQueryPoolResults( vkGetDeviceProcAddr( device, "vkGetQueryPoolResults" ) );
+ vkCreateBuffer = PFN_vkCreateBuffer( vkGetDeviceProcAddr( device, "vkCreateBuffer" ) );
+ vkDestroyBuffer = PFN_vkDestroyBuffer( vkGetDeviceProcAddr( device, "vkDestroyBuffer" ) );
+ vkCreateBufferView = PFN_vkCreateBufferView( vkGetDeviceProcAddr( device, "vkCreateBufferView" ) );
+ vkDestroyBufferView = PFN_vkDestroyBufferView( vkGetDeviceProcAddr( device, "vkDestroyBufferView" ) );
+ vkCreateImage = PFN_vkCreateImage( vkGetDeviceProcAddr( device, "vkCreateImage" ) );
+ vkDestroyImage = PFN_vkDestroyImage( vkGetDeviceProcAddr( device, "vkDestroyImage" ) );
+ vkGetImageSubresourceLayout =
+ PFN_vkGetImageSubresourceLayout( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout" ) );
+ vkCreateImageView = PFN_vkCreateImageView( vkGetDeviceProcAddr( device, "vkCreateImageView" ) );
+ vkDestroyImageView = PFN_vkDestroyImageView( vkGetDeviceProcAddr( device, "vkDestroyImageView" ) );
+ vkCreateShaderModule = PFN_vkCreateShaderModule( vkGetDeviceProcAddr( device, "vkCreateShaderModule" ) );
+ vkDestroyShaderModule = PFN_vkDestroyShaderModule( vkGetDeviceProcAddr( device, "vkDestroyShaderModule" ) );
+ vkCreatePipelineCache = PFN_vkCreatePipelineCache( vkGetDeviceProcAddr( device, "vkCreatePipelineCache" ) );
+ vkDestroyPipelineCache = PFN_vkDestroyPipelineCache( vkGetDeviceProcAddr( device, "vkDestroyPipelineCache" ) );
+ vkGetPipelineCacheData = PFN_vkGetPipelineCacheData( vkGetDeviceProcAddr( device, "vkGetPipelineCacheData" ) );
+ vkMergePipelineCaches = PFN_vkMergePipelineCaches( vkGetDeviceProcAddr( device, "vkMergePipelineCaches" ) );
+ vkCreateGraphicsPipelines =
+ PFN_vkCreateGraphicsPipelines( vkGetDeviceProcAddr( device, "vkCreateGraphicsPipelines" ) );
+ vkCreateComputePipelines =
+ PFN_vkCreateComputePipelines( vkGetDeviceProcAddr( device, "vkCreateComputePipelines" ) );
+ vkDestroyPipeline = PFN_vkDestroyPipeline( vkGetDeviceProcAddr( device, "vkDestroyPipeline" ) );
+ vkCreatePipelineLayout = PFN_vkCreatePipelineLayout( vkGetDeviceProcAddr( device, "vkCreatePipelineLayout" ) );
+ vkDestroyPipelineLayout =
+ PFN_vkDestroyPipelineLayout( vkGetDeviceProcAddr( device, "vkDestroyPipelineLayout" ) );
+ vkCreateSampler = PFN_vkCreateSampler( vkGetDeviceProcAddr( device, "vkCreateSampler" ) );
+ vkDestroySampler = PFN_vkDestroySampler( vkGetDeviceProcAddr( device, "vkDestroySampler" ) );
+ vkCreateDescriptorSetLayout =
+ PFN_vkCreateDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkCreateDescriptorSetLayout" ) );
+ vkDestroyDescriptorSetLayout =
+ PFN_vkDestroyDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkDestroyDescriptorSetLayout" ) );
+ vkCreateDescriptorPool = PFN_vkCreateDescriptorPool( vkGetDeviceProcAddr( device, "vkCreateDescriptorPool" ) );
+ vkDestroyDescriptorPool =
+ PFN_vkDestroyDescriptorPool( vkGetDeviceProcAddr( device, "vkDestroyDescriptorPool" ) );
+ vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetDeviceProcAddr( device, "vkResetDescriptorPool" ) );
vkAllocateDescriptorSets =
PFN_vkAllocateDescriptorSets( vkGetDeviceProcAddr( device, "vkAllocateDescriptorSets" ) );
- vkAllocateMemory = PFN_vkAllocateMemory( vkGetDeviceProcAddr( device, "vkAllocateMemory" ) );
- vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetDeviceProcAddr( device, "vkBeginCommandBuffer" ) );
- vkBindAccelerationStructureMemoryNV = PFN_vkBindAccelerationStructureMemoryNV(
- vkGetDeviceProcAddr( device, "vkBindAccelerationStructureMemoryNV" ) );
- vkBindBufferMemory = PFN_vkBindBufferMemory( vkGetDeviceProcAddr( device, "vkBindBufferMemory" ) );
- vkBindBufferMemory2 = PFN_vkBindBufferMemory2( vkGetDeviceProcAddr( device, "vkBindBufferMemory2" ) );
- vkBindBufferMemory2KHR = PFN_vkBindBufferMemory2KHR( vkGetDeviceProcAddr( device, "vkBindBufferMemory2KHR" ) );
- if ( !vkBindBufferMemory2 )
- vkBindBufferMemory2 = vkBindBufferMemory2KHR;
- vkBindImageMemory = PFN_vkBindImageMemory( vkGetDeviceProcAddr( device, "vkBindImageMemory" ) );
- vkBindImageMemory2 = PFN_vkBindImageMemory2( vkGetDeviceProcAddr( device, "vkBindImageMemory2" ) );
- vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR( vkGetDeviceProcAddr( device, "vkBindImageMemory2KHR" ) );
- if ( !vkBindImageMemory2 )
- vkBindImageMemory2 = vkBindImageMemory2KHR;
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkBindVideoSessionMemoryKHR =
- PFN_vkBindVideoSessionMemoryKHR( vkGetDeviceProcAddr( device, "vkBindVideoSessionMemoryKHR" ) );
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkBuildAccelerationStructuresKHR =
- PFN_vkBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkBuildAccelerationStructuresKHR" ) );
- vkCmdBeginConditionalRenderingEXT =
- PFN_vkCmdBeginConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdBeginConditionalRenderingEXT" ) );
- vkCmdBeginDebugUtilsLabelEXT =
- PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdBeginDebugUtilsLabelEXT" ) );
- vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetDeviceProcAddr( device, "vkCmdBeginQuery" ) );
- vkCmdBeginQueryIndexedEXT =
- PFN_vkCmdBeginQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdBeginQueryIndexedEXT" ) );
- vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass" ) );
- vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2" ) );
- vkCmdBeginRenderPass2KHR =
- PFN_vkCmdBeginRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2KHR" ) );
- if ( !vkCmdBeginRenderPass2 )
- vkCmdBeginRenderPass2 = vkCmdBeginRenderPass2KHR;
- vkCmdBeginTransformFeedbackEXT =
- PFN_vkCmdBeginTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdBeginTransformFeedbackEXT" ) );
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCmdBeginVideoCodingKHR =
- PFN_vkCmdBeginVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdBeginVideoCodingKHR" ) );
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
+ vkFreeDescriptorSets = PFN_vkFreeDescriptorSets( vkGetDeviceProcAddr( device, "vkFreeDescriptorSets" ) );
+ vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSets" ) );
+ vkCreateFramebuffer = PFN_vkCreateFramebuffer( vkGetDeviceProcAddr( device, "vkCreateFramebuffer" ) );
+ vkDestroyFramebuffer = PFN_vkDestroyFramebuffer( vkGetDeviceProcAddr( device, "vkDestroyFramebuffer" ) );
+ vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetDeviceProcAddr( device, "vkCreateRenderPass" ) );
+ vkDestroyRenderPass = PFN_vkDestroyRenderPass( vkGetDeviceProcAddr( device, "vkDestroyRenderPass" ) );
+ vkGetRenderAreaGranularity =
+ PFN_vkGetRenderAreaGranularity( vkGetDeviceProcAddr( device, "vkGetRenderAreaGranularity" ) );
+ vkCreateCommandPool = PFN_vkCreateCommandPool( vkGetDeviceProcAddr( device, "vkCreateCommandPool" ) );
+ vkDestroyCommandPool = PFN_vkDestroyCommandPool( vkGetDeviceProcAddr( device, "vkDestroyCommandPool" ) );
+ vkResetCommandPool = PFN_vkResetCommandPool( vkGetDeviceProcAddr( device, "vkResetCommandPool" ) );
+ vkAllocateCommandBuffers =
+ PFN_vkAllocateCommandBuffers( vkGetDeviceProcAddr( device, "vkAllocateCommandBuffers" ) );
+ vkFreeCommandBuffers = PFN_vkFreeCommandBuffers( vkGetDeviceProcAddr( device, "vkFreeCommandBuffers" ) );
+ vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetDeviceProcAddr( device, "vkBeginCommandBuffer" ) );
+ vkEndCommandBuffer = PFN_vkEndCommandBuffer( vkGetDeviceProcAddr( device, "vkEndCommandBuffer" ) );
+ vkResetCommandBuffer = PFN_vkResetCommandBuffer( vkGetDeviceProcAddr( device, "vkResetCommandBuffer" ) );
+ vkCmdBindPipeline = PFN_vkCmdBindPipeline( vkGetDeviceProcAddr( device, "vkCmdBindPipeline" ) );
+ vkCmdSetViewport = PFN_vkCmdSetViewport( vkGetDeviceProcAddr( device, "vkCmdSetViewport" ) );
+ vkCmdSetScissor = PFN_vkCmdSetScissor( vkGetDeviceProcAddr( device, "vkCmdSetScissor" ) );
+ vkCmdSetLineWidth = PFN_vkCmdSetLineWidth( vkGetDeviceProcAddr( device, "vkCmdSetLineWidth" ) );
+ vkCmdSetDepthBias = PFN_vkCmdSetDepthBias( vkGetDeviceProcAddr( device, "vkCmdSetDepthBias" ) );
+ vkCmdSetBlendConstants = PFN_vkCmdSetBlendConstants( vkGetDeviceProcAddr( device, "vkCmdSetBlendConstants" ) );
+ vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds( vkGetDeviceProcAddr( device, "vkCmdSetDepthBounds" ) );
+ vkCmdSetStencilCompareMask =
+ PFN_vkCmdSetStencilCompareMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilCompareMask" ) );
+ vkCmdSetStencilWriteMask =
+ PFN_vkCmdSetStencilWriteMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilWriteMask" ) );
+ vkCmdSetStencilReference =
+ PFN_vkCmdSetStencilReference( vkGetDeviceProcAddr( device, "vkCmdSetStencilReference" ) );
vkCmdBindDescriptorSets =
PFN_vkCmdBindDescriptorSets( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorSets" ) );
- vkCmdBindIndexBuffer = PFN_vkCmdBindIndexBuffer( vkGetDeviceProcAddr( device, "vkCmdBindIndexBuffer" ) );
- vkCmdBindPipeline = PFN_vkCmdBindPipeline( vkGetDeviceProcAddr( device, "vkCmdBindPipeline" ) );
- vkCmdBindPipelineShaderGroupNV =
- PFN_vkCmdBindPipelineShaderGroupNV( vkGetDeviceProcAddr( device, "vkCmdBindPipelineShaderGroupNV" ) );
- vkCmdBindShadingRateImageNV =
- PFN_vkCmdBindShadingRateImageNV( vkGetDeviceProcAddr( device, "vkCmdBindShadingRateImageNV" ) );
- vkCmdBindTransformFeedbackBuffersEXT = PFN_vkCmdBindTransformFeedbackBuffersEXT(
- vkGetDeviceProcAddr( device, "vkCmdBindTransformFeedbackBuffersEXT" ) );
+ vkCmdBindIndexBuffer = PFN_vkCmdBindIndexBuffer( vkGetDeviceProcAddr( device, "vkCmdBindIndexBuffer" ) );
vkCmdBindVertexBuffers = PFN_vkCmdBindVertexBuffers( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers" ) );
- vkCmdBindVertexBuffers2EXT =
- PFN_vkCmdBindVertexBuffers2EXT( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers2EXT" ) );
- vkCmdBlitImage = PFN_vkCmdBlitImage( vkGetDeviceProcAddr( device, "vkCmdBlitImage" ) );
- vkCmdBlitImage2KHR = PFN_vkCmdBlitImage2KHR( vkGetDeviceProcAddr( device, "vkCmdBlitImage2KHR" ) );
- vkCmdBuildAccelerationStructureNV =
- PFN_vkCmdBuildAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructureNV" ) );
- vkCmdBuildAccelerationStructuresIndirectKHR = PFN_vkCmdBuildAccelerationStructuresIndirectKHR(
- vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresIndirectKHR" ) );
- vkCmdBuildAccelerationStructuresKHR = PFN_vkCmdBuildAccelerationStructuresKHR(
- vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresKHR" ) );
- vkCmdClearAttachments = PFN_vkCmdClearAttachments( vkGetDeviceProcAddr( device, "vkCmdClearAttachments" ) );
- vkCmdClearColorImage = PFN_vkCmdClearColorImage( vkGetDeviceProcAddr( device, "vkCmdClearColorImage" ) );
- vkCmdClearDepthStencilImage =
- PFN_vkCmdClearDepthStencilImage( vkGetDeviceProcAddr( device, "vkCmdClearDepthStencilImage" ) );
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCmdControlVideoCodingKHR =
- PFN_vkCmdControlVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdControlVideoCodingKHR" ) );
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkCmdCopyAccelerationStructureKHR =
- PFN_vkCmdCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureKHR" ) );
- vkCmdCopyAccelerationStructureNV =
- PFN_vkCmdCopyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureNV" ) );
- vkCmdCopyAccelerationStructureToMemoryKHR = PFN_vkCmdCopyAccelerationStructureToMemoryKHR(
- vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureToMemoryKHR" ) );
+ vkCmdDraw = PFN_vkCmdDraw( vkGetDeviceProcAddr( device, "vkCmdDraw" ) );
+ vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetDeviceProcAddr( device, "vkCmdDrawIndexed" ) );
+ vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndirect" ) );
+ vkCmdDrawIndexedIndirect =
+ PFN_vkCmdDrawIndexedIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirect" ) );
+ vkCmdDispatch = PFN_vkCmdDispatch( vkGetDeviceProcAddr( device, "vkCmdDispatch" ) );
+ vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect( vkGetDeviceProcAddr( device, "vkCmdDispatchIndirect" ) );
vkCmdCopyBuffer = PFN_vkCmdCopyBuffer( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer" ) );
- vkCmdCopyBuffer2KHR = PFN_vkCmdCopyBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer2KHR" ) );
- vkCmdCopyBufferToImage = PFN_vkCmdCopyBufferToImage( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage" ) );
- vkCmdCopyBufferToImage2KHR =
- PFN_vkCmdCopyBufferToImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage2KHR" ) );
vkCmdCopyImage = PFN_vkCmdCopyImage( vkGetDeviceProcAddr( device, "vkCmdCopyImage" ) );
- vkCmdCopyImage2KHR = PFN_vkCmdCopyImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImage2KHR" ) );
+ vkCmdBlitImage = PFN_vkCmdBlitImage( vkGetDeviceProcAddr( device, "vkCmdBlitImage" ) );
+ vkCmdCopyBufferToImage = PFN_vkCmdCopyBufferToImage( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage" ) );
vkCmdCopyImageToBuffer = PFN_vkCmdCopyImageToBuffer( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer" ) );
- vkCmdCopyImageToBuffer2KHR =
- PFN_vkCmdCopyImageToBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer2KHR" ) );
- vkCmdCopyMemoryToAccelerationStructureKHR = PFN_vkCmdCopyMemoryToAccelerationStructureKHR(
- vkGetDeviceProcAddr( device, "vkCmdCopyMemoryToAccelerationStructureKHR" ) );
+ vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer( vkGetDeviceProcAddr( device, "vkCmdUpdateBuffer" ) );
+ vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetDeviceProcAddr( device, "vkCmdFillBuffer" ) );
+ vkCmdClearColorImage = PFN_vkCmdClearColorImage( vkGetDeviceProcAddr( device, "vkCmdClearColorImage" ) );
+ vkCmdClearDepthStencilImage =
+ PFN_vkCmdClearDepthStencilImage( vkGetDeviceProcAddr( device, "vkCmdClearDepthStencilImage" ) );
+ vkCmdClearAttachments = PFN_vkCmdClearAttachments( vkGetDeviceProcAddr( device, "vkCmdClearAttachments" ) );
+ vkCmdResolveImage = PFN_vkCmdResolveImage( vkGetDeviceProcAddr( device, "vkCmdResolveImage" ) );
+ vkCmdSetEvent = PFN_vkCmdSetEvent( vkGetDeviceProcAddr( device, "vkCmdSetEvent" ) );
+ vkCmdResetEvent = PFN_vkCmdResetEvent( vkGetDeviceProcAddr( device, "vkCmdResetEvent" ) );
+ vkCmdWaitEvents = PFN_vkCmdWaitEvents( vkGetDeviceProcAddr( device, "vkCmdWaitEvents" ) );
+ vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier" ) );
+ vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetDeviceProcAddr( device, "vkCmdBeginQuery" ) );
+ vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetDeviceProcAddr( device, "vkCmdEndQuery" ) );
+ vkCmdResetQueryPool = PFN_vkCmdResetQueryPool( vkGetDeviceProcAddr( device, "vkCmdResetQueryPool" ) );
+ vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp" ) );
vkCmdCopyQueryPoolResults =
PFN_vkCmdCopyQueryPoolResults( vkGetDeviceProcAddr( device, "vkCmdCopyQueryPoolResults" ) );
- vkCmdCuLaunchKernelNVX = PFN_vkCmdCuLaunchKernelNVX( vkGetDeviceProcAddr( device, "vkCmdCuLaunchKernelNVX" ) );
- vkCmdDebugMarkerBeginEXT =
- PFN_vkCmdDebugMarkerBeginEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerBeginEXT" ) );
- vkCmdDebugMarkerEndEXT = PFN_vkCmdDebugMarkerEndEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerEndEXT" ) );
- vkCmdDebugMarkerInsertEXT =
- PFN_vkCmdDebugMarkerInsertEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerInsertEXT" ) );
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCmdDecodeVideoKHR = PFN_vkCmdDecodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdDecodeVideoKHR" ) );
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkCmdDispatch = PFN_vkCmdDispatch( vkGetDeviceProcAddr( device, "vkCmdDispatch" ) );
- vkCmdDispatchBase = PFN_vkCmdDispatchBase( vkGetDeviceProcAddr( device, "vkCmdDispatchBase" ) );
- vkCmdDispatchBaseKHR = PFN_vkCmdDispatchBaseKHR( vkGetDeviceProcAddr( device, "vkCmdDispatchBaseKHR" ) );
- if ( !vkCmdDispatchBase )
- vkCmdDispatchBase = vkCmdDispatchBaseKHR;
- vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect( vkGetDeviceProcAddr( device, "vkCmdDispatchIndirect" ) );
- vkCmdDraw = PFN_vkCmdDraw( vkGetDeviceProcAddr( device, "vkCmdDraw" ) );
- vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetDeviceProcAddr( device, "vkCmdDrawIndexed" ) );
- vkCmdDrawIndexedIndirect =
- PFN_vkCmdDrawIndexedIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirect" ) );
+ vkCmdPushConstants = PFN_vkCmdPushConstants( vkGetDeviceProcAddr( device, "vkCmdPushConstants" ) );
+ vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass" ) );
+ vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetDeviceProcAddr( device, "vkCmdNextSubpass" ) );
+ vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass" ) );
+ vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetDeviceProcAddr( device, "vkCmdExecuteCommands" ) );
+
+ //=== VK_VERSION_1_1 ===
+ vkBindBufferMemory2 = PFN_vkBindBufferMemory2( vkGetDeviceProcAddr( device, "vkBindBufferMemory2" ) );
+ vkBindImageMemory2 = PFN_vkBindImageMemory2( vkGetDeviceProcAddr( device, "vkBindImageMemory2" ) );
+ vkGetDeviceGroupPeerMemoryFeatures =
+ PFN_vkGetDeviceGroupPeerMemoryFeatures( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeatures" ) );
+ vkCmdSetDeviceMask = PFN_vkCmdSetDeviceMask( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMask" ) );
+ vkCmdDispatchBase = PFN_vkCmdDispatchBase( vkGetDeviceProcAddr( device, "vkCmdDispatchBase" ) );
+ vkGetImageMemoryRequirements2 =
+ PFN_vkGetImageMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2" ) );
+ vkGetBufferMemoryRequirements2 =
+ PFN_vkGetBufferMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2" ) );
+ vkGetImageSparseMemoryRequirements2 = PFN_vkGetImageSparseMemoryRequirements2(
+ vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2" ) );
+ vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetDeviceProcAddr( device, "vkTrimCommandPool" ) );
+ vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetDeviceProcAddr( device, "vkGetDeviceQueue2" ) );
+ vkCreateSamplerYcbcrConversion =
+ PFN_vkCreateSamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversion" ) );
+ vkDestroySamplerYcbcrConversion =
+ PFN_vkDestroySamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversion" ) );
+ vkCreateDescriptorUpdateTemplate =
+ PFN_vkCreateDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplate" ) );
+ vkDestroyDescriptorUpdateTemplate =
+ PFN_vkDestroyDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplate" ) );
+ vkUpdateDescriptorSetWithTemplate =
+ PFN_vkUpdateDescriptorSetWithTemplate( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplate" ) );
+ vkGetDescriptorSetLayoutSupport =
+ PFN_vkGetDescriptorSetLayoutSupport( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupport" ) );
+
+ //=== VK_VERSION_1_2 ===
+ vkCmdDrawIndirectCount = PFN_vkCmdDrawIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCount" ) );
vkCmdDrawIndexedIndirectCount =
PFN_vkCmdDrawIndexedIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCount" ) );
- vkCmdDrawIndexedIndirectCountAMD =
- PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountAMD" ) );
- if ( !vkCmdDrawIndexedIndirectCount )
- vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountAMD;
- vkCmdDrawIndexedIndirectCountKHR =
- PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountKHR" ) );
- if ( !vkCmdDrawIndexedIndirectCount )
- vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountKHR;
- vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndirect" ) );
- vkCmdDrawIndirectByteCountEXT =
- PFN_vkCmdDrawIndirectByteCountEXT( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectByteCountEXT" ) );
- vkCmdDrawIndirectCount = PFN_vkCmdDrawIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCount" ) );
+ vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetDeviceProcAddr( device, "vkCreateRenderPass2" ) );
+ vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2" ) );
+ vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2" ) );
+ vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2" ) );
+ vkResetQueryPool = PFN_vkResetQueryPool( vkGetDeviceProcAddr( device, "vkResetQueryPool" ) );
+ vkGetSemaphoreCounterValue =
+ PFN_vkGetSemaphoreCounterValue( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValue" ) );
+ vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetDeviceProcAddr( device, "vkWaitSemaphores" ) );
+ vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetDeviceProcAddr( device, "vkSignalSemaphore" ) );
+ vkGetBufferDeviceAddress =
+ PFN_vkGetBufferDeviceAddress( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddress" ) );
+ vkGetBufferOpaqueCaptureAddress =
+ PFN_vkGetBufferOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddress" ) );
+ vkGetDeviceMemoryOpaqueCaptureAddress = PFN_vkGetDeviceMemoryOpaqueCaptureAddress(
+ vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddress" ) );
+
+ //=== VK_AMD_buffer_marker ===
+ vkCmdWriteBufferMarkerAMD =
+ PFN_vkCmdWriteBufferMarkerAMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarkerAMD" ) );
+
+ //=== VK_AMD_display_native_hdr ===
+ vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetDeviceProcAddr( device, "vkSetLocalDimmingAMD" ) );
+
+ //=== VK_AMD_draw_indirect_count ===
vkCmdDrawIndirectCountAMD =
PFN_vkCmdDrawIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountAMD" ) );
if ( !vkCmdDrawIndirectCount )
vkCmdDrawIndirectCount = vkCmdDrawIndirectCountAMD;
- vkCmdDrawIndirectCountKHR =
- PFN_vkCmdDrawIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountKHR" ) );
- if ( !vkCmdDrawIndirectCount )
- vkCmdDrawIndirectCount = vkCmdDrawIndirectCountKHR;
- vkCmdDrawMeshTasksIndirectCountNV =
- PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectCountNV" ) );
- vkCmdDrawMeshTasksIndirectNV =
- PFN_vkCmdDrawMeshTasksIndirectNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectNV" ) );
- vkCmdDrawMeshTasksNV = PFN_vkCmdDrawMeshTasksNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksNV" ) );
- vkCmdDrawMultiEXT = PFN_vkCmdDrawMultiEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiEXT" ) );
- vkCmdDrawMultiIndexedEXT =
- PFN_vkCmdDrawMultiIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiIndexedEXT" ) );
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCmdEncodeVideoKHR = PFN_vkCmdEncodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdEncodeVideoKHR" ) );
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
+ vkCmdDrawIndexedIndirectCountAMD =
+ PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountAMD" ) );
+ if ( !vkCmdDrawIndexedIndirectCount )
+ vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountAMD;
+
+ //=== VK_AMD_shader_info ===
+ vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD( vkGetDeviceProcAddr( device, "vkGetShaderInfoAMD" ) );
+
+# if defined( VK_USE_PLATFORM_ANDROID_KHR )
+ //=== VK_ANDROID_external_memory_android_hardware_buffer ===
+ vkGetAndroidHardwareBufferPropertiesANDROID = PFN_vkGetAndroidHardwareBufferPropertiesANDROID(
+ vkGetDeviceProcAddr( device, "vkGetAndroidHardwareBufferPropertiesANDROID" ) );
+ vkGetMemoryAndroidHardwareBufferANDROID = PFN_vkGetMemoryAndroidHardwareBufferANDROID(
+ vkGetDeviceProcAddr( device, "vkGetMemoryAndroidHardwareBufferANDROID" ) );
+# endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+ //=== VK_EXT_buffer_device_address ===
+ vkGetBufferDeviceAddressEXT =
+ PFN_vkGetBufferDeviceAddressEXT( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressEXT" ) );
+ if ( !vkGetBufferDeviceAddress )
+ vkGetBufferDeviceAddress = vkGetBufferDeviceAddressEXT;
+
+ //=== VK_EXT_calibrated_timestamps ===
+ vkGetCalibratedTimestampsEXT =
+ PFN_vkGetCalibratedTimestampsEXT( vkGetDeviceProcAddr( device, "vkGetCalibratedTimestampsEXT" ) );
+
+ //=== VK_EXT_color_write_enable ===
+ vkCmdSetColorWriteEnableEXT =
+ PFN_vkCmdSetColorWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorWriteEnableEXT" ) );
+
+ //=== VK_EXT_conditional_rendering ===
+ vkCmdBeginConditionalRenderingEXT =
+ PFN_vkCmdBeginConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdBeginConditionalRenderingEXT" ) );
vkCmdEndConditionalRenderingEXT =
PFN_vkCmdEndConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdEndConditionalRenderingEXT" ) );
+
+ //=== VK_EXT_debug_marker ===
+ vkDebugMarkerSetObjectTagEXT =
+ PFN_vkDebugMarkerSetObjectTagEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectTagEXT" ) );
+ vkDebugMarkerSetObjectNameEXT =
+ PFN_vkDebugMarkerSetObjectNameEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectNameEXT" ) );
+ vkCmdDebugMarkerBeginEXT =
+ PFN_vkCmdDebugMarkerBeginEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerBeginEXT" ) );
+ vkCmdDebugMarkerEndEXT = PFN_vkCmdDebugMarkerEndEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerEndEXT" ) );
+ vkCmdDebugMarkerInsertEXT =
+ PFN_vkCmdDebugMarkerInsertEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerInsertEXT" ) );
+
+ //=== VK_EXT_debug_utils ===
+ vkSetDebugUtilsObjectNameEXT =
+ PFN_vkSetDebugUtilsObjectNameEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectNameEXT" ) );
+ vkSetDebugUtilsObjectTagEXT =
+ PFN_vkSetDebugUtilsObjectTagEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectTagEXT" ) );
+ vkQueueBeginDebugUtilsLabelEXT =
+ PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueBeginDebugUtilsLabelEXT" ) );
+ vkQueueEndDebugUtilsLabelEXT =
+ PFN_vkQueueEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueEndDebugUtilsLabelEXT" ) );
+ vkQueueInsertDebugUtilsLabelEXT =
+ PFN_vkQueueInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueInsertDebugUtilsLabelEXT" ) );
+ vkCmdBeginDebugUtilsLabelEXT =
+ PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdBeginDebugUtilsLabelEXT" ) );
vkCmdEndDebugUtilsLabelEXT =
PFN_vkCmdEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdEndDebugUtilsLabelEXT" ) );
- vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetDeviceProcAddr( device, "vkCmdEndQuery" ) );
- vkCmdEndQueryIndexedEXT =
- PFN_vkCmdEndQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdEndQueryIndexedEXT" ) );
- vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass" ) );
- vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2" ) );
- vkCmdEndRenderPass2KHR = PFN_vkCmdEndRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2KHR" ) );
- if ( !vkCmdEndRenderPass2 )
- vkCmdEndRenderPass2 = vkCmdEndRenderPass2KHR;
- vkCmdEndTransformFeedbackEXT =
- PFN_vkCmdEndTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdEndTransformFeedbackEXT" ) );
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCmdEndVideoCodingKHR = PFN_vkCmdEndVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdEndVideoCodingKHR" ) );
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetDeviceProcAddr( device, "vkCmdExecuteCommands" ) );
- vkCmdExecuteGeneratedCommandsNV =
- PFN_vkCmdExecuteGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdExecuteGeneratedCommandsNV" ) );
- vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetDeviceProcAddr( device, "vkCmdFillBuffer" ) );
vkCmdInsertDebugUtilsLabelEXT =
PFN_vkCmdInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdInsertDebugUtilsLabelEXT" ) );
- vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetDeviceProcAddr( device, "vkCmdNextSubpass" ) );
- vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2" ) );
- vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2KHR" ) );
- if ( !vkCmdNextSubpass2 )
- vkCmdNextSubpass2 = vkCmdNextSubpass2KHR;
- vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier" ) );
- vkCmdPipelineBarrier2KHR =
- PFN_vkCmdPipelineBarrier2KHR( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier2KHR" ) );
- vkCmdPreprocessGeneratedCommandsNV =
- PFN_vkCmdPreprocessGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdPreprocessGeneratedCommandsNV" ) );
- vkCmdPushConstants = PFN_vkCmdPushConstants( vkGetDeviceProcAddr( device, "vkCmdPushConstants" ) );
- vkCmdPushDescriptorSetKHR =
- PFN_vkCmdPushDescriptorSetKHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetKHR" ) );
- vkCmdPushDescriptorSetWithTemplateKHR = PFN_vkCmdPushDescriptorSetWithTemplateKHR(
- vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetWithTemplateKHR" ) );
- vkCmdResetEvent = PFN_vkCmdResetEvent( vkGetDeviceProcAddr( device, "vkCmdResetEvent" ) );
- vkCmdResetEvent2KHR = PFN_vkCmdResetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdResetEvent2KHR" ) );
- vkCmdResetQueryPool = PFN_vkCmdResetQueryPool( vkGetDeviceProcAddr( device, "vkCmdResetQueryPool" ) );
- vkCmdResolveImage = PFN_vkCmdResolveImage( vkGetDeviceProcAddr( device, "vkCmdResolveImage" ) );
- vkCmdResolveImage2KHR = PFN_vkCmdResolveImage2KHR( vkGetDeviceProcAddr( device, "vkCmdResolveImage2KHR" ) );
- vkCmdSetBlendConstants = PFN_vkCmdSetBlendConstants( vkGetDeviceProcAddr( device, "vkCmdSetBlendConstants" ) );
- vkCmdSetCheckpointNV = PFN_vkCmdSetCheckpointNV( vkGetDeviceProcAddr( device, "vkCmdSetCheckpointNV" ) );
- vkCmdSetCoarseSampleOrderNV =
- PFN_vkCmdSetCoarseSampleOrderNV( vkGetDeviceProcAddr( device, "vkCmdSetCoarseSampleOrderNV" ) );
- vkCmdSetColorWriteEnableEXT =
- PFN_vkCmdSetColorWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorWriteEnableEXT" ) );
- vkCmdSetCullModeEXT = PFN_vkCmdSetCullModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetCullModeEXT" ) );
- vkCmdSetDepthBias = PFN_vkCmdSetDepthBias( vkGetDeviceProcAddr( device, "vkCmdSetDepthBias" ) );
- vkCmdSetDepthBiasEnableEXT =
- PFN_vkCmdSetDepthBiasEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBiasEnableEXT" ) );
- vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds( vkGetDeviceProcAddr( device, "vkCmdSetDepthBounds" ) );
- vkCmdSetDepthBoundsTestEnableEXT =
- PFN_vkCmdSetDepthBoundsTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBoundsTestEnableEXT" ) );
- vkCmdSetDepthCompareOpEXT =
- PFN_vkCmdSetDepthCompareOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthCompareOpEXT" ) );
+
+ //=== VK_EXT_discard_rectangles ===
+ vkCmdSetDiscardRectangleEXT =
+ PFN_vkCmdSetDiscardRectangleEXT( vkGetDeviceProcAddr( device, "vkCmdSetDiscardRectangleEXT" ) );
+
+ //=== VK_EXT_display_control ===
+ vkDisplayPowerControlEXT =
+ PFN_vkDisplayPowerControlEXT( vkGetDeviceProcAddr( device, "vkDisplayPowerControlEXT" ) );
+ vkRegisterDeviceEventEXT =
+ PFN_vkRegisterDeviceEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDeviceEventEXT" ) );
+ vkRegisterDisplayEventEXT =
+ PFN_vkRegisterDisplayEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDisplayEventEXT" ) );
+ vkGetSwapchainCounterEXT =
+ PFN_vkGetSwapchainCounterEXT( vkGetDeviceProcAddr( device, "vkGetSwapchainCounterEXT" ) );
+
+ //=== VK_EXT_extended_dynamic_state ===
+ vkCmdSetCullModeEXT = PFN_vkCmdSetCullModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetCullModeEXT" ) );
+ vkCmdSetFrontFaceEXT = PFN_vkCmdSetFrontFaceEXT( vkGetDeviceProcAddr( device, "vkCmdSetFrontFaceEXT" ) );
+ vkCmdSetPrimitiveTopologyEXT =
+ PFN_vkCmdSetPrimitiveTopologyEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveTopologyEXT" ) );
+ vkCmdSetViewportWithCountEXT =
+ PFN_vkCmdSetViewportWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetViewportWithCountEXT" ) );
+ vkCmdSetScissorWithCountEXT =
+ PFN_vkCmdSetScissorWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetScissorWithCountEXT" ) );
+ vkCmdBindVertexBuffers2EXT =
+ PFN_vkCmdBindVertexBuffers2EXT( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers2EXT" ) );
vkCmdSetDepthTestEnableEXT =
PFN_vkCmdSetDepthTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthTestEnableEXT" ) );
vkCmdSetDepthWriteEnableEXT =
PFN_vkCmdSetDepthWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthWriteEnableEXT" ) );
- vkCmdSetDeviceMask = PFN_vkCmdSetDeviceMask( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMask" ) );
- vkCmdSetDeviceMaskKHR = PFN_vkCmdSetDeviceMaskKHR( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMaskKHR" ) );
- if ( !vkCmdSetDeviceMask )
- vkCmdSetDeviceMask = vkCmdSetDeviceMaskKHR;
- vkCmdSetDiscardRectangleEXT =
- PFN_vkCmdSetDiscardRectangleEXT( vkGetDeviceProcAddr( device, "vkCmdSetDiscardRectangleEXT" ) );
- vkCmdSetEvent = PFN_vkCmdSetEvent( vkGetDeviceProcAddr( device, "vkCmdSetEvent" ) );
- vkCmdSetEvent2KHR = PFN_vkCmdSetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdSetEvent2KHR" ) );
- vkCmdSetExclusiveScissorNV =
- PFN_vkCmdSetExclusiveScissorNV( vkGetDeviceProcAddr( device, "vkCmdSetExclusiveScissorNV" ) );
- vkCmdSetFragmentShadingRateEnumNV =
- PFN_vkCmdSetFragmentShadingRateEnumNV( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateEnumNV" ) );
- vkCmdSetFragmentShadingRateKHR =
- PFN_vkCmdSetFragmentShadingRateKHR( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateKHR" ) );
- vkCmdSetFrontFaceEXT = PFN_vkCmdSetFrontFaceEXT( vkGetDeviceProcAddr( device, "vkCmdSetFrontFaceEXT" ) );
- vkCmdSetLineStippleEXT = PFN_vkCmdSetLineStippleEXT( vkGetDeviceProcAddr( device, "vkCmdSetLineStippleEXT" ) );
- vkCmdSetLineWidth = PFN_vkCmdSetLineWidth( vkGetDeviceProcAddr( device, "vkCmdSetLineWidth" ) );
- vkCmdSetLogicOpEXT = PFN_vkCmdSetLogicOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetLogicOpEXT" ) );
+ vkCmdSetDepthCompareOpEXT =
+ PFN_vkCmdSetDepthCompareOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthCompareOpEXT" ) );
+ vkCmdSetDepthBoundsTestEnableEXT =
+ PFN_vkCmdSetDepthBoundsTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBoundsTestEnableEXT" ) );
+ vkCmdSetStencilTestEnableEXT =
+ PFN_vkCmdSetStencilTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilTestEnableEXT" ) );
+ vkCmdSetStencilOpEXT = PFN_vkCmdSetStencilOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilOpEXT" ) );
+
+ //=== VK_EXT_extended_dynamic_state2 ===
vkCmdSetPatchControlPointsEXT =
PFN_vkCmdSetPatchControlPointsEXT( vkGetDeviceProcAddr( device, "vkCmdSetPatchControlPointsEXT" ) );
- vkCmdSetPerformanceMarkerINTEL =
- PFN_vkCmdSetPerformanceMarkerINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceMarkerINTEL" ) );
- vkCmdSetPerformanceOverrideINTEL =
- PFN_vkCmdSetPerformanceOverrideINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceOverrideINTEL" ) );
- vkCmdSetPerformanceStreamMarkerINTEL = PFN_vkCmdSetPerformanceStreamMarkerINTEL(
- vkGetDeviceProcAddr( device, "vkCmdSetPerformanceStreamMarkerINTEL" ) );
- vkCmdSetPrimitiveRestartEnableEXT =
- PFN_vkCmdSetPrimitiveRestartEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveRestartEnableEXT" ) );
- vkCmdSetPrimitiveTopologyEXT =
- PFN_vkCmdSetPrimitiveTopologyEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveTopologyEXT" ) );
vkCmdSetRasterizerDiscardEnableEXT =
PFN_vkCmdSetRasterizerDiscardEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetRasterizerDiscardEnableEXT" ) );
- vkCmdSetRayTracingPipelineStackSizeKHR = PFN_vkCmdSetRayTracingPipelineStackSizeKHR(
- vkGetDeviceProcAddr( device, "vkCmdSetRayTracingPipelineStackSizeKHR" ) );
+ vkCmdSetDepthBiasEnableEXT =
+ PFN_vkCmdSetDepthBiasEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBiasEnableEXT" ) );
+ vkCmdSetLogicOpEXT = PFN_vkCmdSetLogicOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetLogicOpEXT" ) );
+ vkCmdSetPrimitiveRestartEnableEXT =
+ PFN_vkCmdSetPrimitiveRestartEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveRestartEnableEXT" ) );
+
+ //=== VK_EXT_external_memory_host ===
+ vkGetMemoryHostPointerPropertiesEXT = PFN_vkGetMemoryHostPointerPropertiesEXT(
+ vkGetDeviceProcAddr( device, "vkGetMemoryHostPointerPropertiesEXT" ) );
+
+# if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_EXT_full_screen_exclusive ===
+ vkAcquireFullScreenExclusiveModeEXT = PFN_vkAcquireFullScreenExclusiveModeEXT(
+ vkGetDeviceProcAddr( device, "vkAcquireFullScreenExclusiveModeEXT" ) );
+ vkReleaseFullScreenExclusiveModeEXT = PFN_vkReleaseFullScreenExclusiveModeEXT(
+ vkGetDeviceProcAddr( device, "vkReleaseFullScreenExclusiveModeEXT" ) );
+ vkGetDeviceGroupSurfacePresentModes2EXT = PFN_vkGetDeviceGroupSurfacePresentModes2EXT(
+ vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModes2EXT" ) );
+# endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_EXT_hdr_metadata ===
+ vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetDeviceProcAddr( device, "vkSetHdrMetadataEXT" ) );
+
+ //=== VK_EXT_host_query_reset ===
+ vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetDeviceProcAddr( device, "vkResetQueryPoolEXT" ) );
+ if ( !vkResetQueryPool )
+ vkResetQueryPool = vkResetQueryPoolEXT;
+
+ //=== VK_EXT_image_drm_format_modifier ===
+ vkGetImageDrmFormatModifierPropertiesEXT = PFN_vkGetImageDrmFormatModifierPropertiesEXT(
+ vkGetDeviceProcAddr( device, "vkGetImageDrmFormatModifierPropertiesEXT" ) );
+
+ //=== VK_EXT_line_rasterization ===
+ vkCmdSetLineStippleEXT = PFN_vkCmdSetLineStippleEXT( vkGetDeviceProcAddr( device, "vkCmdSetLineStippleEXT" ) );
+
+ //=== VK_EXT_multi_draw ===
+ vkCmdDrawMultiEXT = PFN_vkCmdDrawMultiEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiEXT" ) );
+ vkCmdDrawMultiIndexedEXT =
+ PFN_vkCmdDrawMultiIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiIndexedEXT" ) );
+
+ //=== VK_EXT_private_data ===
+ vkCreatePrivateDataSlotEXT =
+ PFN_vkCreatePrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkCreatePrivateDataSlotEXT" ) );
+ vkDestroyPrivateDataSlotEXT =
+ PFN_vkDestroyPrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkDestroyPrivateDataSlotEXT" ) );
+ vkSetPrivateDataEXT = PFN_vkSetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkSetPrivateDataEXT" ) );
+ vkGetPrivateDataEXT = PFN_vkGetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkGetPrivateDataEXT" ) );
+
+ //=== VK_EXT_sample_locations ===
vkCmdSetSampleLocationsEXT =
PFN_vkCmdSetSampleLocationsEXT( vkGetDeviceProcAddr( device, "vkCmdSetSampleLocationsEXT" ) );
- vkCmdSetScissor = PFN_vkCmdSetScissor( vkGetDeviceProcAddr( device, "vkCmdSetScissor" ) );
- vkCmdSetScissorWithCountEXT =
- PFN_vkCmdSetScissorWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetScissorWithCountEXT" ) );
- vkCmdSetStencilCompareMask =
- PFN_vkCmdSetStencilCompareMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilCompareMask" ) );
- vkCmdSetStencilOpEXT = PFN_vkCmdSetStencilOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilOpEXT" ) );
- vkCmdSetStencilReference =
- PFN_vkCmdSetStencilReference( vkGetDeviceProcAddr( device, "vkCmdSetStencilReference" ) );
- vkCmdSetStencilTestEnableEXT =
- PFN_vkCmdSetStencilTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilTestEnableEXT" ) );
- vkCmdSetStencilWriteMask =
- PFN_vkCmdSetStencilWriteMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilWriteMask" ) );
+
+ //=== VK_EXT_transform_feedback ===
+ vkCmdBindTransformFeedbackBuffersEXT = PFN_vkCmdBindTransformFeedbackBuffersEXT(
+ vkGetDeviceProcAddr( device, "vkCmdBindTransformFeedbackBuffersEXT" ) );
+ vkCmdBeginTransformFeedbackEXT =
+ PFN_vkCmdBeginTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdBeginTransformFeedbackEXT" ) );
+ vkCmdEndTransformFeedbackEXT =
+ PFN_vkCmdEndTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdEndTransformFeedbackEXT" ) );
+ vkCmdBeginQueryIndexedEXT =
+ PFN_vkCmdBeginQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdBeginQueryIndexedEXT" ) );
+ vkCmdEndQueryIndexedEXT =
+ PFN_vkCmdEndQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdEndQueryIndexedEXT" ) );
+ vkCmdDrawIndirectByteCountEXT =
+ PFN_vkCmdDrawIndirectByteCountEXT( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectByteCountEXT" ) );
+
+ //=== VK_EXT_validation_cache ===
+ vkCreateValidationCacheEXT =
+ PFN_vkCreateValidationCacheEXT( vkGetDeviceProcAddr( device, "vkCreateValidationCacheEXT" ) );
+ vkDestroyValidationCacheEXT =
+ PFN_vkDestroyValidationCacheEXT( vkGetDeviceProcAddr( device, "vkDestroyValidationCacheEXT" ) );
+ vkMergeValidationCachesEXT =
+ PFN_vkMergeValidationCachesEXT( vkGetDeviceProcAddr( device, "vkMergeValidationCachesEXT" ) );
+ vkGetValidationCacheDataEXT =
+ PFN_vkGetValidationCacheDataEXT( vkGetDeviceProcAddr( device, "vkGetValidationCacheDataEXT" ) );
+
+ //=== VK_EXT_vertex_input_dynamic_state ===
vkCmdSetVertexInputEXT = PFN_vkCmdSetVertexInputEXT( vkGetDeviceProcAddr( device, "vkCmdSetVertexInputEXT" ) );
- vkCmdSetViewport = PFN_vkCmdSetViewport( vkGetDeviceProcAddr( device, "vkCmdSetViewport" ) );
- vkCmdSetViewportShadingRatePaletteNV = PFN_vkCmdSetViewportShadingRatePaletteNV(
- vkGetDeviceProcAddr( device, "vkCmdSetViewportShadingRatePaletteNV" ) );
- vkCmdSetViewportWScalingNV =
- PFN_vkCmdSetViewportWScalingNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportWScalingNV" ) );
- vkCmdSetViewportWithCountEXT =
- PFN_vkCmdSetViewportWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetViewportWithCountEXT" ) );
+
+# if defined( VK_USE_PLATFORM_FUCHSIA )
+ //=== VK_FUCHSIA_external_memory ===
+ vkGetMemoryZirconHandleFUCHSIA =
+ PFN_vkGetMemoryZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandleFUCHSIA" ) );
+ vkGetMemoryZirconHandlePropertiesFUCHSIA = PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA(
+ vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ) );
+# endif /*VK_USE_PLATFORM_FUCHSIA*/
+
+# if defined( VK_USE_PLATFORM_FUCHSIA )
+ //=== VK_FUCHSIA_external_semaphore ===
+ vkImportSemaphoreZirconHandleFUCHSIA = PFN_vkImportSemaphoreZirconHandleFUCHSIA(
+ vkGetDeviceProcAddr( device, "vkImportSemaphoreZirconHandleFUCHSIA" ) );
+ vkGetSemaphoreZirconHandleFUCHSIA =
+ PFN_vkGetSemaphoreZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetSemaphoreZirconHandleFUCHSIA" ) );
+# endif /*VK_USE_PLATFORM_FUCHSIA*/
+
+ //=== VK_GOOGLE_display_timing ===
+ vkGetRefreshCycleDurationGOOGLE =
+ PFN_vkGetRefreshCycleDurationGOOGLE( vkGetDeviceProcAddr( device, "vkGetRefreshCycleDurationGOOGLE" ) );
+ vkGetPastPresentationTimingGOOGLE =
+ PFN_vkGetPastPresentationTimingGOOGLE( vkGetDeviceProcAddr( device, "vkGetPastPresentationTimingGOOGLE" ) );
+
+ //=== VK_HUAWEI_invocation_mask ===
+ vkCmdBindInvocationMaskHUAWEI =
+ PFN_vkCmdBindInvocationMaskHUAWEI( vkGetDeviceProcAddr( device, "vkCmdBindInvocationMaskHUAWEI" ) );
+
+ //=== VK_HUAWEI_subpass_shading ===
+ vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(
+ vkGetDeviceProcAddr( device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI" ) );
vkCmdSubpassShadingHUAWEI =
PFN_vkCmdSubpassShadingHUAWEI( vkGetDeviceProcAddr( device, "vkCmdSubpassShadingHUAWEI" ) );
- vkCmdTraceRaysIndirectKHR =
- PFN_vkCmdTraceRaysIndirectKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysIndirectKHR" ) );
- vkCmdTraceRaysKHR = PFN_vkCmdTraceRaysKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysKHR" ) );
- vkCmdTraceRaysNV = PFN_vkCmdTraceRaysNV( vkGetDeviceProcAddr( device, "vkCmdTraceRaysNV" ) );
- vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer( vkGetDeviceProcAddr( device, "vkCmdUpdateBuffer" ) );
- vkCmdWaitEvents = PFN_vkCmdWaitEvents( vkGetDeviceProcAddr( device, "vkCmdWaitEvents" ) );
- vkCmdWaitEvents2KHR = PFN_vkCmdWaitEvents2KHR( vkGetDeviceProcAddr( device, "vkCmdWaitEvents2KHR" ) );
- vkCmdWriteAccelerationStructuresPropertiesKHR = PFN_vkCmdWriteAccelerationStructuresPropertiesKHR(
- vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesKHR" ) );
- vkCmdWriteAccelerationStructuresPropertiesNV = PFN_vkCmdWriteAccelerationStructuresPropertiesNV(
- vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesNV" ) );
- vkCmdWriteBufferMarker2AMD =
- PFN_vkCmdWriteBufferMarker2AMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarker2AMD" ) );
- vkCmdWriteBufferMarkerAMD =
- PFN_vkCmdWriteBufferMarkerAMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarkerAMD" ) );
- vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp" ) );
- vkCmdWriteTimestamp2KHR =
- PFN_vkCmdWriteTimestamp2KHR( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp2KHR" ) );
- vkCompileDeferredNV = PFN_vkCompileDeferredNV( vkGetDeviceProcAddr( device, "vkCompileDeferredNV" ) );
+
+ //=== VK_INTEL_performance_query ===
+ vkInitializePerformanceApiINTEL =
+ PFN_vkInitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkInitializePerformanceApiINTEL" ) );
+ vkUninitializePerformanceApiINTEL =
+ PFN_vkUninitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkUninitializePerformanceApiINTEL" ) );
+ vkCmdSetPerformanceMarkerINTEL =
+ PFN_vkCmdSetPerformanceMarkerINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceMarkerINTEL" ) );
+ vkCmdSetPerformanceStreamMarkerINTEL = PFN_vkCmdSetPerformanceStreamMarkerINTEL(
+ vkGetDeviceProcAddr( device, "vkCmdSetPerformanceStreamMarkerINTEL" ) );
+ vkCmdSetPerformanceOverrideINTEL =
+ PFN_vkCmdSetPerformanceOverrideINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceOverrideINTEL" ) );
+ vkAcquirePerformanceConfigurationINTEL = PFN_vkAcquirePerformanceConfigurationINTEL(
+ vkGetDeviceProcAddr( device, "vkAcquirePerformanceConfigurationINTEL" ) );
+ vkReleasePerformanceConfigurationINTEL = PFN_vkReleasePerformanceConfigurationINTEL(
+ vkGetDeviceProcAddr( device, "vkReleasePerformanceConfigurationINTEL" ) );
+ vkQueueSetPerformanceConfigurationINTEL = PFN_vkQueueSetPerformanceConfigurationINTEL(
+ vkGetDeviceProcAddr( device, "vkQueueSetPerformanceConfigurationINTEL" ) );
+ vkGetPerformanceParameterINTEL =
+ PFN_vkGetPerformanceParameterINTEL( vkGetDeviceProcAddr( device, "vkGetPerformanceParameterINTEL" ) );
+
+ //=== VK_KHR_acceleration_structure ===
+ vkCreateAccelerationStructureKHR =
+ PFN_vkCreateAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureKHR" ) );
+ vkDestroyAccelerationStructureKHR =
+ PFN_vkDestroyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureKHR" ) );
+ vkCmdBuildAccelerationStructuresKHR = PFN_vkCmdBuildAccelerationStructuresKHR(
+ vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresKHR" ) );
+ vkCmdBuildAccelerationStructuresIndirectKHR = PFN_vkCmdBuildAccelerationStructuresIndirectKHR(
+ vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresIndirectKHR" ) );
+ vkBuildAccelerationStructuresKHR =
+ PFN_vkBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkBuildAccelerationStructuresKHR" ) );
vkCopyAccelerationStructureKHR =
PFN_vkCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCopyAccelerationStructureKHR" ) );
vkCopyAccelerationStructureToMemoryKHR = PFN_vkCopyAccelerationStructureToMemoryKHR(
vkGetDeviceProcAddr( device, "vkCopyAccelerationStructureToMemoryKHR" ) );
vkCopyMemoryToAccelerationStructureKHR = PFN_vkCopyMemoryToAccelerationStructureKHR(
vkGetDeviceProcAddr( device, "vkCopyMemoryToAccelerationStructureKHR" ) );
- vkCreateAccelerationStructureKHR =
- PFN_vkCreateAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureKHR" ) );
- vkCreateAccelerationStructureNV =
- PFN_vkCreateAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureNV" ) );
- vkCreateBuffer = PFN_vkCreateBuffer( vkGetDeviceProcAddr( device, "vkCreateBuffer" ) );
- vkCreateBufferView = PFN_vkCreateBufferView( vkGetDeviceProcAddr( device, "vkCreateBufferView" ) );
- vkCreateCommandPool = PFN_vkCreateCommandPool( vkGetDeviceProcAddr( device, "vkCreateCommandPool" ) );
- vkCreateComputePipelines =
- PFN_vkCreateComputePipelines( vkGetDeviceProcAddr( device, "vkCreateComputePipelines" ) );
- vkCreateCuFunctionNVX = PFN_vkCreateCuFunctionNVX( vkGetDeviceProcAddr( device, "vkCreateCuFunctionNVX" ) );
- vkCreateCuModuleNVX = PFN_vkCreateCuModuleNVX( vkGetDeviceProcAddr( device, "vkCreateCuModuleNVX" ) );
- vkCreateDeferredOperationKHR =
- PFN_vkCreateDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkCreateDeferredOperationKHR" ) );
- vkCreateDescriptorPool = PFN_vkCreateDescriptorPool( vkGetDeviceProcAddr( device, "vkCreateDescriptorPool" ) );
- vkCreateDescriptorSetLayout =
- PFN_vkCreateDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkCreateDescriptorSetLayout" ) );
- vkCreateDescriptorUpdateTemplate =
- PFN_vkCreateDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplate" ) );
- vkCreateDescriptorUpdateTemplateKHR = PFN_vkCreateDescriptorUpdateTemplateKHR(
- vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplateKHR" ) );
- if ( !vkCreateDescriptorUpdateTemplate )
- vkCreateDescriptorUpdateTemplate = vkCreateDescriptorUpdateTemplateKHR;
- vkCreateEvent = PFN_vkCreateEvent( vkGetDeviceProcAddr( device, "vkCreateEvent" ) );
- vkCreateFence = PFN_vkCreateFence( vkGetDeviceProcAddr( device, "vkCreateFence" ) );
- vkCreateFramebuffer = PFN_vkCreateFramebuffer( vkGetDeviceProcAddr( device, "vkCreateFramebuffer" ) );
- vkCreateGraphicsPipelines =
- PFN_vkCreateGraphicsPipelines( vkGetDeviceProcAddr( device, "vkCreateGraphicsPipelines" ) );
- vkCreateImage = PFN_vkCreateImage( vkGetDeviceProcAddr( device, "vkCreateImage" ) );
- vkCreateImageView = PFN_vkCreateImageView( vkGetDeviceProcAddr( device, "vkCreateImageView" ) );
- vkCreateIndirectCommandsLayoutNV =
- PFN_vkCreateIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkCreateIndirectCommandsLayoutNV" ) );
- vkCreatePipelineCache = PFN_vkCreatePipelineCache( vkGetDeviceProcAddr( device, "vkCreatePipelineCache" ) );
- vkCreatePipelineLayout = PFN_vkCreatePipelineLayout( vkGetDeviceProcAddr( device, "vkCreatePipelineLayout" ) );
- vkCreatePrivateDataSlotEXT =
- PFN_vkCreatePrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkCreatePrivateDataSlotEXT" ) );
- vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetDeviceProcAddr( device, "vkCreateQueryPool" ) );
- vkCreateRayTracingPipelinesKHR =
- PFN_vkCreateRayTracingPipelinesKHR( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesKHR" ) );
- vkCreateRayTracingPipelinesNV =
- PFN_vkCreateRayTracingPipelinesNV( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesNV" ) );
- vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetDeviceProcAddr( device, "vkCreateRenderPass" ) );
- vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetDeviceProcAddr( device, "vkCreateRenderPass2" ) );
- vkCreateRenderPass2KHR = PFN_vkCreateRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCreateRenderPass2KHR" ) );
- if ( !vkCreateRenderPass2 )
- vkCreateRenderPass2 = vkCreateRenderPass2KHR;
- vkCreateSampler = PFN_vkCreateSampler( vkGetDeviceProcAddr( device, "vkCreateSampler" ) );
- vkCreateSamplerYcbcrConversion =
- PFN_vkCreateSamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversion" ) );
- vkCreateSamplerYcbcrConversionKHR =
- PFN_vkCreateSamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversionKHR" ) );
- if ( !vkCreateSamplerYcbcrConversion )
- vkCreateSamplerYcbcrConversion = vkCreateSamplerYcbcrConversionKHR;
- vkCreateSemaphore = PFN_vkCreateSemaphore( vkGetDeviceProcAddr( device, "vkCreateSemaphore" ) );
- vkCreateShaderModule = PFN_vkCreateShaderModule( vkGetDeviceProcAddr( device, "vkCreateShaderModule" ) );
- vkCreateSharedSwapchainsKHR =
- PFN_vkCreateSharedSwapchainsKHR( vkGetDeviceProcAddr( device, "vkCreateSharedSwapchainsKHR" ) );
- vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR( vkGetDeviceProcAddr( device, "vkCreateSwapchainKHR" ) );
- vkCreateValidationCacheEXT =
- PFN_vkCreateValidationCacheEXT( vkGetDeviceProcAddr( device, "vkCreateValidationCacheEXT" ) );
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCreateVideoSessionKHR =
- PFN_vkCreateVideoSessionKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionKHR" ) );
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkCreateVideoSessionParametersKHR =
- PFN_vkCreateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionParametersKHR" ) );
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkDebugMarkerSetObjectNameEXT =
- PFN_vkDebugMarkerSetObjectNameEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectNameEXT" ) );
- vkDebugMarkerSetObjectTagEXT =
- PFN_vkDebugMarkerSetObjectTagEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectTagEXT" ) );
- vkDeferredOperationJoinKHR =
- PFN_vkDeferredOperationJoinKHR( vkGetDeviceProcAddr( device, "vkDeferredOperationJoinKHR" ) );
- vkDestroyAccelerationStructureKHR =
- PFN_vkDestroyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureKHR" ) );
- vkDestroyAccelerationStructureNV =
- PFN_vkDestroyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureNV" ) );
- vkDestroyBuffer = PFN_vkDestroyBuffer( vkGetDeviceProcAddr( device, "vkDestroyBuffer" ) );
- vkDestroyBufferView = PFN_vkDestroyBufferView( vkGetDeviceProcAddr( device, "vkDestroyBufferView" ) );
- vkDestroyCommandPool = PFN_vkDestroyCommandPool( vkGetDeviceProcAddr( device, "vkDestroyCommandPool" ) );
- vkDestroyCuFunctionNVX = PFN_vkDestroyCuFunctionNVX( vkGetDeviceProcAddr( device, "vkDestroyCuFunctionNVX" ) );
- vkDestroyCuModuleNVX = PFN_vkDestroyCuModuleNVX( vkGetDeviceProcAddr( device, "vkDestroyCuModuleNVX" ) );
- vkDestroyDeferredOperationKHR =
- PFN_vkDestroyDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkDestroyDeferredOperationKHR" ) );
- vkDestroyDescriptorPool =
- PFN_vkDestroyDescriptorPool( vkGetDeviceProcAddr( device, "vkDestroyDescriptorPool" ) );
- vkDestroyDescriptorSetLayout =
- PFN_vkDestroyDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkDestroyDescriptorSetLayout" ) );
- vkDestroyDescriptorUpdateTemplate =
- PFN_vkDestroyDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplate" ) );
- vkDestroyDescriptorUpdateTemplateKHR = PFN_vkDestroyDescriptorUpdateTemplateKHR(
- vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplateKHR" ) );
- if ( !vkDestroyDescriptorUpdateTemplate )
- vkDestroyDescriptorUpdateTemplate = vkDestroyDescriptorUpdateTemplateKHR;
- vkDestroyDevice = PFN_vkDestroyDevice( vkGetDeviceProcAddr( device, "vkDestroyDevice" ) );
- vkDestroyEvent = PFN_vkDestroyEvent( vkGetDeviceProcAddr( device, "vkDestroyEvent" ) );
- vkDestroyFence = PFN_vkDestroyFence( vkGetDeviceProcAddr( device, "vkDestroyFence" ) );
- vkDestroyFramebuffer = PFN_vkDestroyFramebuffer( vkGetDeviceProcAddr( device, "vkDestroyFramebuffer" ) );
- vkDestroyImage = PFN_vkDestroyImage( vkGetDeviceProcAddr( device, "vkDestroyImage" ) );
- vkDestroyImageView = PFN_vkDestroyImageView( vkGetDeviceProcAddr( device, "vkDestroyImageView" ) );
- vkDestroyIndirectCommandsLayoutNV =
- PFN_vkDestroyIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkDestroyIndirectCommandsLayoutNV" ) );
- vkDestroyPipeline = PFN_vkDestroyPipeline( vkGetDeviceProcAddr( device, "vkDestroyPipeline" ) );
- vkDestroyPipelineCache = PFN_vkDestroyPipelineCache( vkGetDeviceProcAddr( device, "vkDestroyPipelineCache" ) );
- vkDestroyPipelineLayout =
- PFN_vkDestroyPipelineLayout( vkGetDeviceProcAddr( device, "vkDestroyPipelineLayout" ) );
- vkDestroyPrivateDataSlotEXT =
- PFN_vkDestroyPrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkDestroyPrivateDataSlotEXT" ) );
- vkDestroyQueryPool = PFN_vkDestroyQueryPool( vkGetDeviceProcAddr( device, "vkDestroyQueryPool" ) );
- vkDestroyRenderPass = PFN_vkDestroyRenderPass( vkGetDeviceProcAddr( device, "vkDestroyRenderPass" ) );
- vkDestroySampler = PFN_vkDestroySampler( vkGetDeviceProcAddr( device, "vkDestroySampler" ) );
- vkDestroySamplerYcbcrConversion =
- PFN_vkDestroySamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversion" ) );
- vkDestroySamplerYcbcrConversionKHR =
- PFN_vkDestroySamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversionKHR" ) );
- if ( !vkDestroySamplerYcbcrConversion )
- vkDestroySamplerYcbcrConversion = vkDestroySamplerYcbcrConversionKHR;
- vkDestroySemaphore = PFN_vkDestroySemaphore( vkGetDeviceProcAddr( device, "vkDestroySemaphore" ) );
- vkDestroyShaderModule = PFN_vkDestroyShaderModule( vkGetDeviceProcAddr( device, "vkDestroyShaderModule" ) );
- vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR( vkGetDeviceProcAddr( device, "vkDestroySwapchainKHR" ) );
- vkDestroyValidationCacheEXT =
- PFN_vkDestroyValidationCacheEXT( vkGetDeviceProcAddr( device, "vkDestroyValidationCacheEXT" ) );
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkDestroyVideoSessionKHR =
- PFN_vkDestroyVideoSessionKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionKHR" ) );
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkDestroyVideoSessionParametersKHR =
- PFN_vkDestroyVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionParametersKHR" ) );
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkDeviceWaitIdle = PFN_vkDeviceWaitIdle( vkGetDeviceProcAddr( device, "vkDeviceWaitIdle" ) );
- vkDisplayPowerControlEXT =
- PFN_vkDisplayPowerControlEXT( vkGetDeviceProcAddr( device, "vkDisplayPowerControlEXT" ) );
- vkEndCommandBuffer = PFN_vkEndCommandBuffer( vkGetDeviceProcAddr( device, "vkEndCommandBuffer" ) );
- vkFlushMappedMemoryRanges =
- PFN_vkFlushMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkFlushMappedMemoryRanges" ) );
- vkFreeCommandBuffers = PFN_vkFreeCommandBuffers( vkGetDeviceProcAddr( device, "vkFreeCommandBuffers" ) );
- vkFreeDescriptorSets = PFN_vkFreeDescriptorSets( vkGetDeviceProcAddr( device, "vkFreeDescriptorSets" ) );
- vkFreeMemory = PFN_vkFreeMemory( vkGetDeviceProcAddr( device, "vkFreeMemory" ) );
- vkGetAccelerationStructureBuildSizesKHR = PFN_vkGetAccelerationStructureBuildSizesKHR(
- vkGetDeviceProcAddr( device, "vkGetAccelerationStructureBuildSizesKHR" ) );
+ vkWriteAccelerationStructuresPropertiesKHR = PFN_vkWriteAccelerationStructuresPropertiesKHR(
+ vkGetDeviceProcAddr( device, "vkWriteAccelerationStructuresPropertiesKHR" ) );
+ vkCmdCopyAccelerationStructureKHR =
+ PFN_vkCmdCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureKHR" ) );
+ vkCmdCopyAccelerationStructureToMemoryKHR = PFN_vkCmdCopyAccelerationStructureToMemoryKHR(
+ vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureToMemoryKHR" ) );
+ vkCmdCopyMemoryToAccelerationStructureKHR = PFN_vkCmdCopyMemoryToAccelerationStructureKHR(
+ vkGetDeviceProcAddr( device, "vkCmdCopyMemoryToAccelerationStructureKHR" ) );
vkGetAccelerationStructureDeviceAddressKHR = PFN_vkGetAccelerationStructureDeviceAddressKHR(
vkGetDeviceProcAddr( device, "vkGetAccelerationStructureDeviceAddressKHR" ) );
- vkGetAccelerationStructureHandleNV =
- PFN_vkGetAccelerationStructureHandleNV( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureHandleNV" ) );
- vkGetAccelerationStructureMemoryRequirementsNV = PFN_vkGetAccelerationStructureMemoryRequirementsNV(
- vkGetDeviceProcAddr( device, "vkGetAccelerationStructureMemoryRequirementsNV" ) );
-# if defined( VK_USE_PLATFORM_ANDROID_KHR )
- vkGetAndroidHardwareBufferPropertiesANDROID = PFN_vkGetAndroidHardwareBufferPropertiesANDROID(
- vkGetDeviceProcAddr( device, "vkGetAndroidHardwareBufferPropertiesANDROID" ) );
-# endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- vkGetBufferDeviceAddress =
- PFN_vkGetBufferDeviceAddress( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddress" ) );
- vkGetBufferDeviceAddressEXT =
- PFN_vkGetBufferDeviceAddressEXT( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressEXT" ) );
- if ( !vkGetBufferDeviceAddress )
- vkGetBufferDeviceAddress = vkGetBufferDeviceAddressEXT;
+ vkCmdWriteAccelerationStructuresPropertiesKHR = PFN_vkCmdWriteAccelerationStructuresPropertiesKHR(
+ vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesKHR" ) );
+ vkGetDeviceAccelerationStructureCompatibilityKHR = PFN_vkGetDeviceAccelerationStructureCompatibilityKHR(
+ vkGetDeviceProcAddr( device, "vkGetDeviceAccelerationStructureCompatibilityKHR" ) );
+ vkGetAccelerationStructureBuildSizesKHR = PFN_vkGetAccelerationStructureBuildSizesKHR(
+ vkGetDeviceProcAddr( device, "vkGetAccelerationStructureBuildSizesKHR" ) );
+
+ //=== VK_KHR_bind_memory2 ===
+ vkBindBufferMemory2KHR = PFN_vkBindBufferMemory2KHR( vkGetDeviceProcAddr( device, "vkBindBufferMemory2KHR" ) );
+ if ( !vkBindBufferMemory2 )
+ vkBindBufferMemory2 = vkBindBufferMemory2KHR;
+ vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR( vkGetDeviceProcAddr( device, "vkBindImageMemory2KHR" ) );
+ if ( !vkBindImageMemory2 )
+ vkBindImageMemory2 = vkBindImageMemory2KHR;
+
+ //=== VK_KHR_buffer_device_address ===
vkGetBufferDeviceAddressKHR =
PFN_vkGetBufferDeviceAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressKHR" ) );
if ( !vkGetBufferDeviceAddress )
vkGetBufferDeviceAddress = vkGetBufferDeviceAddressKHR;
- vkGetBufferMemoryRequirements =
- PFN_vkGetBufferMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements" ) );
- vkGetBufferMemoryRequirements2 =
- PFN_vkGetBufferMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2" ) );
- vkGetBufferMemoryRequirements2KHR =
- PFN_vkGetBufferMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2KHR" ) );
- if ( !vkGetBufferMemoryRequirements2 )
- vkGetBufferMemoryRequirements2 = vkGetBufferMemoryRequirements2KHR;
- vkGetBufferOpaqueCaptureAddress =
- PFN_vkGetBufferOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddress" ) );
vkGetBufferOpaqueCaptureAddressKHR =
PFN_vkGetBufferOpaqueCaptureAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddressKHR" ) );
if ( !vkGetBufferOpaqueCaptureAddress )
vkGetBufferOpaqueCaptureAddress = vkGetBufferOpaqueCaptureAddressKHR;
- vkGetCalibratedTimestampsEXT =
- PFN_vkGetCalibratedTimestampsEXT( vkGetDeviceProcAddr( device, "vkGetCalibratedTimestampsEXT" ) );
+ vkGetDeviceMemoryOpaqueCaptureAddressKHR = PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR(
+ vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR" ) );
+ if ( !vkGetDeviceMemoryOpaqueCaptureAddress )
+ vkGetDeviceMemoryOpaqueCaptureAddress = vkGetDeviceMemoryOpaqueCaptureAddressKHR;
+
+ //=== VK_KHR_copy_commands2 ===
+ vkCmdCopyBuffer2KHR = PFN_vkCmdCopyBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer2KHR" ) );
+ vkCmdCopyImage2KHR = PFN_vkCmdCopyImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImage2KHR" ) );
+ vkCmdCopyBufferToImage2KHR =
+ PFN_vkCmdCopyBufferToImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage2KHR" ) );
+ vkCmdCopyImageToBuffer2KHR =
+ PFN_vkCmdCopyImageToBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer2KHR" ) );
+ vkCmdBlitImage2KHR = PFN_vkCmdBlitImage2KHR( vkGetDeviceProcAddr( device, "vkCmdBlitImage2KHR" ) );
+ vkCmdResolveImage2KHR = PFN_vkCmdResolveImage2KHR( vkGetDeviceProcAddr( device, "vkCmdResolveImage2KHR" ) );
+
+ //=== VK_KHR_create_renderpass2 ===
+ vkCreateRenderPass2KHR = PFN_vkCreateRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCreateRenderPass2KHR" ) );
+ if ( !vkCreateRenderPass2 )
+ vkCreateRenderPass2 = vkCreateRenderPass2KHR;
+ vkCmdBeginRenderPass2KHR =
+ PFN_vkCmdBeginRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2KHR" ) );
+ if ( !vkCmdBeginRenderPass2 )
+ vkCmdBeginRenderPass2 = vkCmdBeginRenderPass2KHR;
+ vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2KHR" ) );
+ if ( !vkCmdNextSubpass2 )
+ vkCmdNextSubpass2 = vkCmdNextSubpass2KHR;
+ vkCmdEndRenderPass2KHR = PFN_vkCmdEndRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2KHR" ) );
+ if ( !vkCmdEndRenderPass2 )
+ vkCmdEndRenderPass2 = vkCmdEndRenderPass2KHR;
+
+ //=== VK_KHR_deferred_host_operations ===
+ vkCreateDeferredOperationKHR =
+ PFN_vkCreateDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkCreateDeferredOperationKHR" ) );
+ vkDestroyDeferredOperationKHR =
+ PFN_vkDestroyDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkDestroyDeferredOperationKHR" ) );
vkGetDeferredOperationMaxConcurrencyKHR = PFN_vkGetDeferredOperationMaxConcurrencyKHR(
vkGetDeviceProcAddr( device, "vkGetDeferredOperationMaxConcurrencyKHR" ) );
vkGetDeferredOperationResultKHR =
PFN_vkGetDeferredOperationResultKHR( vkGetDeviceProcAddr( device, "vkGetDeferredOperationResultKHR" ) );
- vkGetDescriptorSetLayoutSupport =
- PFN_vkGetDescriptorSetLayoutSupport( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupport" ) );
- vkGetDescriptorSetLayoutSupportKHR =
- PFN_vkGetDescriptorSetLayoutSupportKHR( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupportKHR" ) );
- if ( !vkGetDescriptorSetLayoutSupport )
- vkGetDescriptorSetLayoutSupport = vkGetDescriptorSetLayoutSupportKHR;
- vkGetDeviceAccelerationStructureCompatibilityKHR = PFN_vkGetDeviceAccelerationStructureCompatibilityKHR(
- vkGetDeviceProcAddr( device, "vkGetDeviceAccelerationStructureCompatibilityKHR" ) );
- vkGetDeviceGroupPeerMemoryFeatures =
- PFN_vkGetDeviceGroupPeerMemoryFeatures( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeatures" ) );
+ vkDeferredOperationJoinKHR =
+ PFN_vkDeferredOperationJoinKHR( vkGetDeviceProcAddr( device, "vkDeferredOperationJoinKHR" ) );
+
+ //=== VK_KHR_descriptor_update_template ===
+ vkCreateDescriptorUpdateTemplateKHR = PFN_vkCreateDescriptorUpdateTemplateKHR(
+ vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplateKHR" ) );
+ if ( !vkCreateDescriptorUpdateTemplate )
+ vkCreateDescriptorUpdateTemplate = vkCreateDescriptorUpdateTemplateKHR;
+ vkDestroyDescriptorUpdateTemplateKHR = PFN_vkDestroyDescriptorUpdateTemplateKHR(
+ vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplateKHR" ) );
+ if ( !vkDestroyDescriptorUpdateTemplate )
+ vkDestroyDescriptorUpdateTemplate = vkDestroyDescriptorUpdateTemplateKHR;
+ vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR(
+ vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplateKHR" ) );
+ if ( !vkUpdateDescriptorSetWithTemplate )
+ vkUpdateDescriptorSetWithTemplate = vkUpdateDescriptorSetWithTemplateKHR;
+ vkCmdPushDescriptorSetWithTemplateKHR = PFN_vkCmdPushDescriptorSetWithTemplateKHR(
+ vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetWithTemplateKHR" ) );
+
+ //=== VK_KHR_device_group ===
vkGetDeviceGroupPeerMemoryFeaturesKHR = PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR(
vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeaturesKHR" ) );
if ( !vkGetDeviceGroupPeerMemoryFeatures )
vkGetDeviceGroupPeerMemoryFeatures = vkGetDeviceGroupPeerMemoryFeaturesKHR;
+ vkCmdSetDeviceMaskKHR = PFN_vkCmdSetDeviceMaskKHR( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMaskKHR" ) );
+ if ( !vkCmdSetDeviceMask )
+ vkCmdSetDeviceMask = vkCmdSetDeviceMaskKHR;
+ vkCmdDispatchBaseKHR = PFN_vkCmdDispatchBaseKHR( vkGetDeviceProcAddr( device, "vkCmdDispatchBaseKHR" ) );
+ if ( !vkCmdDispatchBase )
+ vkCmdDispatchBase = vkCmdDispatchBaseKHR;
vkGetDeviceGroupPresentCapabilitiesKHR = PFN_vkGetDeviceGroupPresentCapabilitiesKHR(
vkGetDeviceProcAddr( device, "vkGetDeviceGroupPresentCapabilitiesKHR" ) );
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetDeviceGroupSurfacePresentModes2EXT = PFN_vkGetDeviceGroupSurfacePresentModes2EXT(
- vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModes2EXT" ) );
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
vkGetDeviceGroupSurfacePresentModesKHR = PFN_vkGetDeviceGroupSurfacePresentModesKHR(
vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModesKHR" ) );
- vkGetDeviceMemoryCommitment =
- PFN_vkGetDeviceMemoryCommitment( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryCommitment" ) );
- vkGetDeviceMemoryOpaqueCaptureAddress = PFN_vkGetDeviceMemoryOpaqueCaptureAddress(
- vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddress" ) );
- vkGetDeviceMemoryOpaqueCaptureAddressKHR = PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR(
- vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR" ) );
- if ( !vkGetDeviceMemoryOpaqueCaptureAddress )
- vkGetDeviceMemoryOpaqueCaptureAddress = vkGetDeviceMemoryOpaqueCaptureAddressKHR;
- vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetDeviceProcAddr( device, "vkGetDeviceProcAddr" ) );
- vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetDeviceProcAddr( device, "vkGetDeviceQueue" ) );
- vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetDeviceProcAddr( device, "vkGetDeviceQueue2" ) );
- vkGetEventStatus = PFN_vkGetEventStatus( vkGetDeviceProcAddr( device, "vkGetEventStatus" ) );
- vkGetFenceFdKHR = PFN_vkGetFenceFdKHR( vkGetDeviceProcAddr( device, "vkGetFenceFdKHR" ) );
- vkGetFenceStatus = PFN_vkGetFenceStatus( vkGetDeviceProcAddr( device, "vkGetFenceStatus" ) );
+ vkAcquireNextImage2KHR = PFN_vkAcquireNextImage2KHR( vkGetDeviceProcAddr( device, "vkAcquireNextImage2KHR" ) );
+
+ //=== VK_KHR_display_swapchain ===
+ vkCreateSharedSwapchainsKHR =
+ PFN_vkCreateSharedSwapchainsKHR( vkGetDeviceProcAddr( device, "vkCreateSharedSwapchainsKHR" ) );
+
+ //=== VK_KHR_draw_indirect_count ===
+ vkCmdDrawIndirectCountKHR =
+ PFN_vkCmdDrawIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountKHR" ) );
+ if ( !vkCmdDrawIndirectCount )
+ vkCmdDrawIndirectCount = vkCmdDrawIndirectCountKHR;
+ vkCmdDrawIndexedIndirectCountKHR =
+ PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountKHR" ) );
+ if ( !vkCmdDrawIndexedIndirectCount )
+ vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountKHR;
+
+ //=== VK_KHR_external_fence_fd ===
+ vkImportFenceFdKHR = PFN_vkImportFenceFdKHR( vkGetDeviceProcAddr( device, "vkImportFenceFdKHR" ) );
+ vkGetFenceFdKHR = PFN_vkGetFenceFdKHR( vkGetDeviceProcAddr( device, "vkGetFenceFdKHR" ) );
+
# if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_fence_win32 ===
+ vkImportFenceWin32HandleKHR =
+ PFN_vkImportFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportFenceWin32HandleKHR" ) );
vkGetFenceWin32HandleKHR =
PFN_vkGetFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetFenceWin32HandleKHR" ) );
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkGetGeneratedCommandsMemoryRequirementsNV = PFN_vkGetGeneratedCommandsMemoryRequirementsNV(
- vkGetDeviceProcAddr( device, "vkGetGeneratedCommandsMemoryRequirementsNV" ) );
- vkGetImageDrmFormatModifierPropertiesEXT = PFN_vkGetImageDrmFormatModifierPropertiesEXT(
- vkGetDeviceProcAddr( device, "vkGetImageDrmFormatModifierPropertiesEXT" ) );
- vkGetImageMemoryRequirements =
- PFN_vkGetImageMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements" ) );
- vkGetImageMemoryRequirements2 =
- PFN_vkGetImageMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2" ) );
- vkGetImageMemoryRequirements2KHR =
- PFN_vkGetImageMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2KHR" ) );
- if ( !vkGetImageMemoryRequirements2 )
- vkGetImageMemoryRequirements2 = vkGetImageMemoryRequirements2KHR;
- vkGetImageSparseMemoryRequirements =
- PFN_vkGetImageSparseMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements" ) );
- vkGetImageSparseMemoryRequirements2 = PFN_vkGetImageSparseMemoryRequirements2(
- vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2" ) );
- vkGetImageSparseMemoryRequirements2KHR = PFN_vkGetImageSparseMemoryRequirements2KHR(
- vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2KHR" ) );
- if ( !vkGetImageSparseMemoryRequirements2 )
- vkGetImageSparseMemoryRequirements2 = vkGetImageSparseMemoryRequirements2KHR;
- vkGetImageSubresourceLayout =
- PFN_vkGetImageSubresourceLayout( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout" ) );
- vkGetImageViewAddressNVX =
- PFN_vkGetImageViewAddressNVX( vkGetDeviceProcAddr( device, "vkGetImageViewAddressNVX" ) );
- vkGetImageViewHandleNVX =
- PFN_vkGetImageViewHandleNVX( vkGetDeviceProcAddr( device, "vkGetImageViewHandleNVX" ) );
-# if defined( VK_USE_PLATFORM_ANDROID_KHR )
- vkGetMemoryAndroidHardwareBufferANDROID = PFN_vkGetMemoryAndroidHardwareBufferANDROID(
- vkGetDeviceProcAddr( device, "vkGetMemoryAndroidHardwareBufferANDROID" ) );
-# endif /*VK_USE_PLATFORM_ANDROID_KHR*/
+
+ //=== VK_KHR_external_memory_fd ===
vkGetMemoryFdKHR = PFN_vkGetMemoryFdKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdKHR" ) );
vkGetMemoryFdPropertiesKHR =
PFN_vkGetMemoryFdPropertiesKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdPropertiesKHR" ) );
- vkGetMemoryHostPointerPropertiesEXT = PFN_vkGetMemoryHostPointerPropertiesEXT(
- vkGetDeviceProcAddr( device, "vkGetMemoryHostPointerPropertiesEXT" ) );
+
# if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_memory_win32 ===
vkGetMemoryWin32HandleKHR =
PFN_vkGetMemoryWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleKHR" ) );
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetMemoryWin32HandleNV =
- PFN_vkGetMemoryWin32HandleNV( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleNV" ) );
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
vkGetMemoryWin32HandlePropertiesKHR = PFN_vkGetMemoryWin32HandlePropertiesKHR(
vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandlePropertiesKHR" ) );
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
-# if defined( VK_USE_PLATFORM_FUCHSIA )
- vkGetMemoryZirconHandleFUCHSIA =
- PFN_vkGetMemoryZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandleFUCHSIA" ) );
-# endif /*VK_USE_PLATFORM_FUCHSIA*/
-# if defined( VK_USE_PLATFORM_FUCHSIA )
- vkGetMemoryZirconHandlePropertiesFUCHSIA = PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA(
- vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ) );
-# endif /*VK_USE_PLATFORM_FUCHSIA*/
- vkGetPastPresentationTimingGOOGLE =
- PFN_vkGetPastPresentationTimingGOOGLE( vkGetDeviceProcAddr( device, "vkGetPastPresentationTimingGOOGLE" ) );
- vkGetPerformanceParameterINTEL =
- PFN_vkGetPerformanceParameterINTEL( vkGetDeviceProcAddr( device, "vkGetPerformanceParameterINTEL" ) );
- vkGetPipelineCacheData = PFN_vkGetPipelineCacheData( vkGetDeviceProcAddr( device, "vkGetPipelineCacheData" ) );
- vkGetPipelineExecutableInternalRepresentationsKHR = PFN_vkGetPipelineExecutableInternalRepresentationsKHR(
- vkGetDeviceProcAddr( device, "vkGetPipelineExecutableInternalRepresentationsKHR" ) );
+
+ //=== VK_KHR_external_semaphore_fd ===
+ vkImportSemaphoreFdKHR = PFN_vkImportSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreFdKHR" ) );
+ vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreFdKHR" ) );
+
+# if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_semaphore_win32 ===
+ vkImportSemaphoreWin32HandleKHR =
+ PFN_vkImportSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreWin32HandleKHR" ) );
+ vkGetSemaphoreWin32HandleKHR =
+ PFN_vkGetSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreWin32HandleKHR" ) );
+# endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_KHR_fragment_shading_rate ===
+ vkCmdSetFragmentShadingRateKHR =
+ PFN_vkCmdSetFragmentShadingRateKHR( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateKHR" ) );
+
+ //=== VK_KHR_get_memory_requirements2 ===
+ vkGetImageMemoryRequirements2KHR =
+ PFN_vkGetImageMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2KHR" ) );
+ if ( !vkGetImageMemoryRequirements2 )
+ vkGetImageMemoryRequirements2 = vkGetImageMemoryRequirements2KHR;
+ vkGetBufferMemoryRequirements2KHR =
+ PFN_vkGetBufferMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2KHR" ) );
+ if ( !vkGetBufferMemoryRequirements2 )
+ vkGetBufferMemoryRequirements2 = vkGetBufferMemoryRequirements2KHR;
+ vkGetImageSparseMemoryRequirements2KHR = PFN_vkGetImageSparseMemoryRequirements2KHR(
+ vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2KHR" ) );
+ if ( !vkGetImageSparseMemoryRequirements2 )
+ vkGetImageSparseMemoryRequirements2 = vkGetImageSparseMemoryRequirements2KHR;
+
+ //=== VK_KHR_maintenance1 ===
+ vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetDeviceProcAddr( device, "vkTrimCommandPoolKHR" ) );
+ if ( !vkTrimCommandPool )
+ vkTrimCommandPool = vkTrimCommandPoolKHR;
+
+ //=== VK_KHR_maintenance3 ===
+ vkGetDescriptorSetLayoutSupportKHR =
+ PFN_vkGetDescriptorSetLayoutSupportKHR( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupportKHR" ) );
+ if ( !vkGetDescriptorSetLayoutSupport )
+ vkGetDescriptorSetLayoutSupport = vkGetDescriptorSetLayoutSupportKHR;
+
+ //=== VK_KHR_performance_query ===
+ vkAcquireProfilingLockKHR =
+ PFN_vkAcquireProfilingLockKHR( vkGetDeviceProcAddr( device, "vkAcquireProfilingLockKHR" ) );
+ vkReleaseProfilingLockKHR =
+ PFN_vkReleaseProfilingLockKHR( vkGetDeviceProcAddr( device, "vkReleaseProfilingLockKHR" ) );
+
+ //=== VK_KHR_pipeline_executable_properties ===
vkGetPipelineExecutablePropertiesKHR = PFN_vkGetPipelineExecutablePropertiesKHR(
vkGetDeviceProcAddr( device, "vkGetPipelineExecutablePropertiesKHR" ) );
vkGetPipelineExecutableStatisticsKHR = PFN_vkGetPipelineExecutableStatisticsKHR(
vkGetDeviceProcAddr( device, "vkGetPipelineExecutableStatisticsKHR" ) );
- vkGetPrivateDataEXT = PFN_vkGetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkGetPrivateDataEXT" ) );
- vkGetQueryPoolResults = PFN_vkGetQueryPoolResults( vkGetDeviceProcAddr( device, "vkGetQueryPoolResults" ) );
- vkGetQueueCheckpointData2NV =
- PFN_vkGetQueueCheckpointData2NV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointData2NV" ) );
- vkGetQueueCheckpointDataNV =
- PFN_vkGetQueueCheckpointDataNV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointDataNV" ) );
- vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
- vkGetDeviceProcAddr( device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR" ) );
+ vkGetPipelineExecutableInternalRepresentationsKHR = PFN_vkGetPipelineExecutableInternalRepresentationsKHR(
+ vkGetDeviceProcAddr( device, "vkGetPipelineExecutableInternalRepresentationsKHR" ) );
+
+ //=== VK_KHR_present_wait ===
+ vkWaitForPresentKHR = PFN_vkWaitForPresentKHR( vkGetDeviceProcAddr( device, "vkWaitForPresentKHR" ) );
+
+ //=== VK_KHR_push_descriptor ===
+ vkCmdPushDescriptorSetKHR =
+ PFN_vkCmdPushDescriptorSetKHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetKHR" ) );
+
+ //=== VK_KHR_ray_tracing_pipeline ===
+ vkCmdTraceRaysKHR = PFN_vkCmdTraceRaysKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysKHR" ) );
+ vkCreateRayTracingPipelinesKHR =
+ PFN_vkCreateRayTracingPipelinesKHR( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesKHR" ) );
vkGetRayTracingShaderGroupHandlesKHR = PFN_vkGetRayTracingShaderGroupHandlesKHR(
vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesKHR" ) );
- vkGetRayTracingShaderGroupHandlesNV = PFN_vkGetRayTracingShaderGroupHandlesNV(
- vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesNV" ) );
- if ( !vkGetRayTracingShaderGroupHandlesKHR )
- vkGetRayTracingShaderGroupHandlesKHR = vkGetRayTracingShaderGroupHandlesNV;
+ vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
+ vkGetDeviceProcAddr( device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR" ) );
+ vkCmdTraceRaysIndirectKHR =
+ PFN_vkCmdTraceRaysIndirectKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysIndirectKHR" ) );
vkGetRayTracingShaderGroupStackSizeKHR = PFN_vkGetRayTracingShaderGroupStackSizeKHR(
vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupStackSizeKHR" ) );
- vkGetRefreshCycleDurationGOOGLE =
- PFN_vkGetRefreshCycleDurationGOOGLE( vkGetDeviceProcAddr( device, "vkGetRefreshCycleDurationGOOGLE" ) );
- vkGetRenderAreaGranularity =
- PFN_vkGetRenderAreaGranularity( vkGetDeviceProcAddr( device, "vkGetRenderAreaGranularity" ) );
- vkGetSemaphoreCounterValue =
- PFN_vkGetSemaphoreCounterValue( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValue" ) );
+ vkCmdSetRayTracingPipelineStackSizeKHR = PFN_vkCmdSetRayTracingPipelineStackSizeKHR(
+ vkGetDeviceProcAddr( device, "vkCmdSetRayTracingPipelineStackSizeKHR" ) );
+
+ //=== VK_KHR_sampler_ycbcr_conversion ===
+ vkCreateSamplerYcbcrConversionKHR =
+ PFN_vkCreateSamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversionKHR" ) );
+ if ( !vkCreateSamplerYcbcrConversion )
+ vkCreateSamplerYcbcrConversion = vkCreateSamplerYcbcrConversionKHR;
+ vkDestroySamplerYcbcrConversionKHR =
+ PFN_vkDestroySamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversionKHR" ) );
+ if ( !vkDestroySamplerYcbcrConversion )
+ vkDestroySamplerYcbcrConversion = vkDestroySamplerYcbcrConversionKHR;
+
+ //=== VK_KHR_shared_presentable_image ===
+ vkGetSwapchainStatusKHR =
+ PFN_vkGetSwapchainStatusKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainStatusKHR" ) );
+
+ //=== VK_KHR_swapchain ===
+ vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR( vkGetDeviceProcAddr( device, "vkCreateSwapchainKHR" ) );
+ vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR( vkGetDeviceProcAddr( device, "vkDestroySwapchainKHR" ) );
+ vkGetSwapchainImagesKHR =
+ PFN_vkGetSwapchainImagesKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainImagesKHR" ) );
+ vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetDeviceProcAddr( device, "vkAcquireNextImageKHR" ) );
+ vkQueuePresentKHR = PFN_vkQueuePresentKHR( vkGetDeviceProcAddr( device, "vkQueuePresentKHR" ) );
+
+ //=== VK_KHR_synchronization2 ===
+ vkCmdSetEvent2KHR = PFN_vkCmdSetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdSetEvent2KHR" ) );
+ vkCmdResetEvent2KHR = PFN_vkCmdResetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdResetEvent2KHR" ) );
+ vkCmdWaitEvents2KHR = PFN_vkCmdWaitEvents2KHR( vkGetDeviceProcAddr( device, "vkCmdWaitEvents2KHR" ) );
+ vkCmdPipelineBarrier2KHR =
+ PFN_vkCmdPipelineBarrier2KHR( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier2KHR" ) );
+ vkCmdWriteTimestamp2KHR =
+ PFN_vkCmdWriteTimestamp2KHR( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp2KHR" ) );
+ vkQueueSubmit2KHR = PFN_vkQueueSubmit2KHR( vkGetDeviceProcAddr( device, "vkQueueSubmit2KHR" ) );
+ vkCmdWriteBufferMarker2AMD =
+ PFN_vkCmdWriteBufferMarker2AMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarker2AMD" ) );
+ vkGetQueueCheckpointData2NV =
+ PFN_vkGetQueueCheckpointData2NV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointData2NV" ) );
+
+ //=== VK_KHR_timeline_semaphore ===
vkGetSemaphoreCounterValueKHR =
PFN_vkGetSemaphoreCounterValueKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValueKHR" ) );
if ( !vkGetSemaphoreCounterValue )
vkGetSemaphoreCounterValue = vkGetSemaphoreCounterValueKHR;
- vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreFdKHR" ) );
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkGetSemaphoreWin32HandleKHR =
- PFN_vkGetSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreWin32HandleKHR" ) );
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
-# if defined( VK_USE_PLATFORM_FUCHSIA )
- vkGetSemaphoreZirconHandleFUCHSIA =
- PFN_vkGetSemaphoreZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetSemaphoreZirconHandleFUCHSIA" ) );
-# endif /*VK_USE_PLATFORM_FUCHSIA*/
- vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD( vkGetDeviceProcAddr( device, "vkGetShaderInfoAMD" ) );
- vkGetSubpassShadingMaxWorkgroupSizeHUAWEI = PFN_vkGetSubpassShadingMaxWorkgroupSizeHUAWEI(
- vkGetDeviceProcAddr( device, "vkGetSubpassShadingMaxWorkgroupSizeHUAWEI" ) );
- vkGetSwapchainCounterEXT =
- PFN_vkGetSwapchainCounterEXT( vkGetDeviceProcAddr( device, "vkGetSwapchainCounterEXT" ) );
- vkGetSwapchainImagesKHR =
- PFN_vkGetSwapchainImagesKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainImagesKHR" ) );
- vkGetSwapchainStatusKHR =
- PFN_vkGetSwapchainStatusKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainStatusKHR" ) );
- vkGetValidationCacheDataEXT =
- PFN_vkGetValidationCacheDataEXT( vkGetDeviceProcAddr( device, "vkGetValidationCacheDataEXT" ) );
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkGetVideoSessionMemoryRequirementsKHR = PFN_vkGetVideoSessionMemoryRequirementsKHR(
- vkGetDeviceProcAddr( device, "vkGetVideoSessionMemoryRequirementsKHR" ) );
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkImportFenceFdKHR = PFN_vkImportFenceFdKHR( vkGetDeviceProcAddr( device, "vkImportFenceFdKHR" ) );
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkImportFenceWin32HandleKHR =
- PFN_vkImportFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportFenceWin32HandleKHR" ) );
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkImportSemaphoreFdKHR = PFN_vkImportSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreFdKHR" ) );
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkImportSemaphoreWin32HandleKHR =
- PFN_vkImportSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreWin32HandleKHR" ) );
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
-# if defined( VK_USE_PLATFORM_FUCHSIA )
- vkImportSemaphoreZirconHandleFUCHSIA = PFN_vkImportSemaphoreZirconHandleFUCHSIA(
- vkGetDeviceProcAddr( device, "vkImportSemaphoreZirconHandleFUCHSIA" ) );
-# endif /*VK_USE_PLATFORM_FUCHSIA*/
- vkInitializePerformanceApiINTEL =
- PFN_vkInitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkInitializePerformanceApiINTEL" ) );
- vkInvalidateMappedMemoryRanges =
- PFN_vkInvalidateMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkInvalidateMappedMemoryRanges" ) );
- vkMapMemory = PFN_vkMapMemory( vkGetDeviceProcAddr( device, "vkMapMemory" ) );
- vkMergePipelineCaches = PFN_vkMergePipelineCaches( vkGetDeviceProcAddr( device, "vkMergePipelineCaches" ) );
- vkMergeValidationCachesEXT =
- PFN_vkMergeValidationCachesEXT( vkGetDeviceProcAddr( device, "vkMergeValidationCachesEXT" ) );
- vkQueueBeginDebugUtilsLabelEXT =
- PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueBeginDebugUtilsLabelEXT" ) );
- vkQueueBindSparse = PFN_vkQueueBindSparse( vkGetDeviceProcAddr( device, "vkQueueBindSparse" ) );
- vkQueueEndDebugUtilsLabelEXT =
- PFN_vkQueueEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueEndDebugUtilsLabelEXT" ) );
- vkQueueInsertDebugUtilsLabelEXT =
- PFN_vkQueueInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueInsertDebugUtilsLabelEXT" ) );
- vkQueuePresentKHR = PFN_vkQueuePresentKHR( vkGetDeviceProcAddr( device, "vkQueuePresentKHR" ) );
- vkQueueSetPerformanceConfigurationINTEL = PFN_vkQueueSetPerformanceConfigurationINTEL(
- vkGetDeviceProcAddr( device, "vkQueueSetPerformanceConfigurationINTEL" ) );
- vkQueueSubmit = PFN_vkQueueSubmit( vkGetDeviceProcAddr( device, "vkQueueSubmit" ) );
- vkQueueSubmit2KHR = PFN_vkQueueSubmit2KHR( vkGetDeviceProcAddr( device, "vkQueueSubmit2KHR" ) );
- vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetDeviceProcAddr( device, "vkQueueWaitIdle" ) );
- vkRegisterDeviceEventEXT =
- PFN_vkRegisterDeviceEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDeviceEventEXT" ) );
- vkRegisterDisplayEventEXT =
- PFN_vkRegisterDisplayEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDisplayEventEXT" ) );
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- vkReleaseFullScreenExclusiveModeEXT = PFN_vkReleaseFullScreenExclusiveModeEXT(
- vkGetDeviceProcAddr( device, "vkReleaseFullScreenExclusiveModeEXT" ) );
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- vkReleasePerformanceConfigurationINTEL = PFN_vkReleasePerformanceConfigurationINTEL(
- vkGetDeviceProcAddr( device, "vkReleasePerformanceConfigurationINTEL" ) );
- vkReleaseProfilingLockKHR =
- PFN_vkReleaseProfilingLockKHR( vkGetDeviceProcAddr( device, "vkReleaseProfilingLockKHR" ) );
- vkResetCommandBuffer = PFN_vkResetCommandBuffer( vkGetDeviceProcAddr( device, "vkResetCommandBuffer" ) );
- vkResetCommandPool = PFN_vkResetCommandPool( vkGetDeviceProcAddr( device, "vkResetCommandPool" ) );
- vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetDeviceProcAddr( device, "vkResetDescriptorPool" ) );
- vkResetEvent = PFN_vkResetEvent( vkGetDeviceProcAddr( device, "vkResetEvent" ) );
- vkResetFences = PFN_vkResetFences( vkGetDeviceProcAddr( device, "vkResetFences" ) );
- vkResetQueryPool = PFN_vkResetQueryPool( vkGetDeviceProcAddr( device, "vkResetQueryPool" ) );
- vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetDeviceProcAddr( device, "vkResetQueryPoolEXT" ) );
- if ( !vkResetQueryPool )
- vkResetQueryPool = vkResetQueryPoolEXT;
- vkSetDebugUtilsObjectNameEXT =
- PFN_vkSetDebugUtilsObjectNameEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectNameEXT" ) );
- vkSetDebugUtilsObjectTagEXT =
- PFN_vkSetDebugUtilsObjectTagEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectTagEXT" ) );
- vkSetEvent = PFN_vkSetEvent( vkGetDeviceProcAddr( device, "vkSetEvent" ) );
- vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetDeviceProcAddr( device, "vkSetHdrMetadataEXT" ) );
- vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetDeviceProcAddr( device, "vkSetLocalDimmingAMD" ) );
- vkSetPrivateDataEXT = PFN_vkSetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkSetPrivateDataEXT" ) );
- vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetDeviceProcAddr( device, "vkSignalSemaphore" ) );
- vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetDeviceProcAddr( device, "vkSignalSemaphoreKHR" ) );
- if ( !vkSignalSemaphore )
- vkSignalSemaphore = vkSignalSemaphoreKHR;
- vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetDeviceProcAddr( device, "vkTrimCommandPool" ) );
- vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetDeviceProcAddr( device, "vkTrimCommandPoolKHR" ) );
- if ( !vkTrimCommandPool )
- vkTrimCommandPool = vkTrimCommandPoolKHR;
- vkUninitializePerformanceApiINTEL =
- PFN_vkUninitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkUninitializePerformanceApiINTEL" ) );
- vkUnmapMemory = PFN_vkUnmapMemory( vkGetDeviceProcAddr( device, "vkUnmapMemory" ) );
- vkUpdateDescriptorSetWithTemplate =
- PFN_vkUpdateDescriptorSetWithTemplate( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplate" ) );
- vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR(
- vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplateKHR" ) );
- if ( !vkUpdateDescriptorSetWithTemplate )
- vkUpdateDescriptorSetWithTemplate = vkUpdateDescriptorSetWithTemplateKHR;
- vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSets" ) );
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- vkUpdateVideoSessionParametersKHR =
- PFN_vkUpdateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkUpdateVideoSessionParametersKHR" ) );
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- vkWaitForFences = PFN_vkWaitForFences( vkGetDeviceProcAddr( device, "vkWaitForFences" ) );
- vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetDeviceProcAddr( device, "vkWaitSemaphores" ) );
vkWaitSemaphoresKHR = PFN_vkWaitSemaphoresKHR( vkGetDeviceProcAddr( device, "vkWaitSemaphoresKHR" ) );
if ( !vkWaitSemaphores )
vkWaitSemaphores = vkWaitSemaphoresKHR;
- vkWriteAccelerationStructuresPropertiesKHR = PFN_vkWriteAccelerationStructuresPropertiesKHR(
- vkGetDeviceProcAddr( device, "vkWriteAccelerationStructuresPropertiesKHR" ) );
- }
+ vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetDeviceProcAddr( device, "vkSignalSemaphoreKHR" ) );
+ if ( !vkSignalSemaphore )
+ vkSignalSemaphore = vkSignalSemaphoreKHR;
- public:
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT = 0;
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR = 0;
- PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR = 0;
- PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL = 0;
- PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR = 0;
- PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers = 0;
- PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets = 0;
- PFN_vkAllocateMemory vkAllocateMemory = 0;
- PFN_vkBeginCommandBuffer vkBeginCommandBuffer = 0;
- PFN_vkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV = 0;
- PFN_vkBindBufferMemory vkBindBufferMemory = 0;
- PFN_vkBindBufferMemory2 vkBindBufferMemory2 = 0;
- PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR = 0;
- PFN_vkBindImageMemory vkBindImageMemory = 0;
- PFN_vkBindImageMemory2 vkBindImageMemory2 = 0;
- PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR = 0;
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkBindVideoSessionMemoryKHR vkBindVideoSessionMemoryKHR = 0;
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkBuildAccelerationStructuresKHR vkBuildAccelerationStructuresKHR = 0;
- PFN_vkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT = 0;
- PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT = 0;
- PFN_vkCmdBeginQuery vkCmdBeginQuery = 0;
- PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT = 0;
- PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass = 0;
- PFN_vkCmdBeginRenderPass2 vkCmdBeginRenderPass2 = 0;
- PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR = 0;
- PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT = 0;
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkCmdBeginVideoCodingKHR vkCmdBeginVideoCodingKHR = 0;
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets = 0;
- PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer = 0;
- PFN_vkCmdBindPipeline vkCmdBindPipeline = 0;
- PFN_vkCmdBindPipelineShaderGroupNV vkCmdBindPipelineShaderGroupNV = 0;
- PFN_vkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV = 0;
- PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT = 0;
- PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers = 0;
- PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT = 0;
- PFN_vkCmdBlitImage vkCmdBlitImage = 0;
- PFN_vkCmdBlitImage2KHR vkCmdBlitImage2KHR = 0;
- PFN_vkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV = 0;
- PFN_vkCmdBuildAccelerationStructuresIndirectKHR vkCmdBuildAccelerationStructuresIndirectKHR = 0;
- PFN_vkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR = 0;
- PFN_vkCmdClearAttachments vkCmdClearAttachments = 0;
- PFN_vkCmdClearColorImage vkCmdClearColorImage = 0;
- PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage = 0;
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkCmdControlVideoCodingKHR vkCmdControlVideoCodingKHR = 0;
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR = 0;
- PFN_vkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV = 0;
- PFN_vkCmdCopyAccelerationStructureToMemoryKHR vkCmdCopyAccelerationStructureToMemoryKHR = 0;
- PFN_vkCmdCopyBuffer vkCmdCopyBuffer = 0;
- PFN_vkCmdCopyBuffer2KHR vkCmdCopyBuffer2KHR = 0;
- PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage = 0;
- PFN_vkCmdCopyBufferToImage2KHR vkCmdCopyBufferToImage2KHR = 0;
- PFN_vkCmdCopyImage vkCmdCopyImage = 0;
- PFN_vkCmdCopyImage2KHR vkCmdCopyImage2KHR = 0;
- PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer = 0;
- PFN_vkCmdCopyImageToBuffer2KHR vkCmdCopyImageToBuffer2KHR = 0;
- PFN_vkCmdCopyMemoryToAccelerationStructureKHR vkCmdCopyMemoryToAccelerationStructureKHR = 0;
- PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults = 0;
- PFN_vkCmdCuLaunchKernelNVX vkCmdCuLaunchKernelNVX = 0;
- PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT = 0;
- PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT = 0;
- PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT = 0;
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkCmdDecodeVideoKHR vkCmdDecodeVideoKHR = 0;
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkCmdDispatch vkCmdDispatch = 0;
- PFN_vkCmdDispatchBase vkCmdDispatchBase = 0;
- PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR = 0;
- PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect = 0;
- PFN_vkCmdDraw vkCmdDraw = 0;
- PFN_vkCmdDrawIndexed vkCmdDrawIndexed = 0;
- PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect = 0;
- PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount = 0;
- PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD = 0;
- PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR = 0;
- PFN_vkCmdDrawIndirect vkCmdDrawIndirect = 0;
- PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT = 0;
- PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount = 0;
- PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD = 0;
- PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR = 0;
- PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV = 0;
- PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV = 0;
- PFN_vkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV = 0;
- PFN_vkCmdDrawMultiEXT vkCmdDrawMultiEXT = 0;
- PFN_vkCmdDrawMultiIndexedEXT vkCmdDrawMultiIndexedEXT = 0;
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR = 0;
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT = 0;
- PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT = 0;
- PFN_vkCmdEndQuery vkCmdEndQuery = 0;
- PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT = 0;
- PFN_vkCmdEndRenderPass vkCmdEndRenderPass = 0;
- PFN_vkCmdEndRenderPass2 vkCmdEndRenderPass2 = 0;
- PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR = 0;
- PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT = 0;
# if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkCmdEndVideoCodingKHR vkCmdEndVideoCodingKHR = 0;
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkCmdExecuteCommands vkCmdExecuteCommands = 0;
- PFN_vkCmdExecuteGeneratedCommandsNV vkCmdExecuteGeneratedCommandsNV = 0;
- PFN_vkCmdFillBuffer vkCmdFillBuffer = 0;
- PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT = 0;
- PFN_vkCmdNextSubpass vkCmdNextSubpass = 0;
- PFN_vkCmdNextSubpass2 vkCmdNextSubpass2 = 0;
- PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR = 0;
- PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier = 0;
- PFN_vkCmdPipelineBarrier2KHR vkCmdPipelineBarrier2KHR = 0;
- PFN_vkCmdPreprocessGeneratedCommandsNV vkCmdPreprocessGeneratedCommandsNV = 0;
- PFN_vkCmdPushConstants vkCmdPushConstants = 0;
- PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR = 0;
- PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR = 0;
- PFN_vkCmdResetEvent vkCmdResetEvent = 0;
- PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR = 0;
- PFN_vkCmdResetQueryPool vkCmdResetQueryPool = 0;
- PFN_vkCmdResolveImage vkCmdResolveImage = 0;
- PFN_vkCmdResolveImage2KHR vkCmdResolveImage2KHR = 0;
- PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants = 0;
- PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV = 0;
- PFN_vkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV = 0;
- PFN_vkCmdSetColorWriteEnableEXT vkCmdSetColorWriteEnableEXT = 0;
- PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT = 0;
- PFN_vkCmdSetDepthBias vkCmdSetDepthBias = 0;
- PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT = 0;
- PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds = 0;
- PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT = 0;
- PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT = 0;
- PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT = 0;
- PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT = 0;
- PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask = 0;
- PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR = 0;
- PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT = 0;
- PFN_vkCmdSetEvent vkCmdSetEvent = 0;
- PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR = 0;
- PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV = 0;
- PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV = 0;
- PFN_vkCmdSetFragmentShadingRateKHR vkCmdSetFragmentShadingRateKHR = 0;
- PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT = 0;
- PFN_vkCmdSetLineStippleEXT vkCmdSetLineStippleEXT = 0;
- PFN_vkCmdSetLineWidth vkCmdSetLineWidth = 0;
- PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT = 0;
- PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT = 0;
- PFN_vkCmdSetPerformanceMarkerINTEL vkCmdSetPerformanceMarkerINTEL = 0;
- PFN_vkCmdSetPerformanceOverrideINTEL vkCmdSetPerformanceOverrideINTEL = 0;
- PFN_vkCmdSetPerformanceStreamMarkerINTEL vkCmdSetPerformanceStreamMarkerINTEL = 0;
- PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT = 0;
- PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT = 0;
- PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT = 0;
- PFN_vkCmdSetRayTracingPipelineStackSizeKHR vkCmdSetRayTracingPipelineStackSizeKHR = 0;
- PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT = 0;
- PFN_vkCmdSetScissor vkCmdSetScissor = 0;
- PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT = 0;
- PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask = 0;
- PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT = 0;
- PFN_vkCmdSetStencilReference vkCmdSetStencilReference = 0;
- PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT = 0;
- PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask = 0;
- PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT = 0;
- PFN_vkCmdSetViewport vkCmdSetViewport = 0;
- PFN_vkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV = 0;
- PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV = 0;
- PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT = 0;
- PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI = 0;
- PFN_vkCmdTraceRaysIndirectKHR vkCmdTraceRaysIndirectKHR = 0;
- PFN_vkCmdTraceRaysKHR vkCmdTraceRaysKHR = 0;
- PFN_vkCmdTraceRaysNV vkCmdTraceRaysNV = 0;
- PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer = 0;
- PFN_vkCmdWaitEvents vkCmdWaitEvents = 0;
- PFN_vkCmdWaitEvents2KHR vkCmdWaitEvents2KHR = 0;
- PFN_vkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR = 0;
- PFN_vkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV = 0;
- PFN_vkCmdWriteBufferMarker2AMD vkCmdWriteBufferMarker2AMD = 0;
- PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD = 0;
- PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp = 0;
- PFN_vkCmdWriteTimestamp2KHR vkCmdWriteTimestamp2KHR = 0;
- PFN_vkCompileDeferredNV vkCompileDeferredNV = 0;
- PFN_vkCopyAccelerationStructureKHR vkCopyAccelerationStructureKHR = 0;
- PFN_vkCopyAccelerationStructureToMemoryKHR vkCopyAccelerationStructureToMemoryKHR = 0;
- PFN_vkCopyMemoryToAccelerationStructureKHR vkCopyMemoryToAccelerationStructureKHR = 0;
- PFN_vkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR = 0;
- PFN_vkCreateAccelerationStructureNV vkCreateAccelerationStructureNV = 0;
- PFN_vkCreateBuffer vkCreateBuffer = 0;
- PFN_vkCreateBufferView vkCreateBufferView = 0;
- PFN_vkCreateCommandPool vkCreateCommandPool = 0;
- PFN_vkCreateComputePipelines vkCreateComputePipelines = 0;
- PFN_vkCreateCuFunctionNVX vkCreateCuFunctionNVX = 0;
- PFN_vkCreateCuModuleNVX vkCreateCuModuleNVX = 0;
- PFN_vkCreateDeferredOperationKHR vkCreateDeferredOperationKHR = 0;
- PFN_vkCreateDescriptorPool vkCreateDescriptorPool = 0;
- PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout = 0;
- PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate = 0;
- PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR = 0;
- PFN_vkCreateEvent vkCreateEvent = 0;
- PFN_vkCreateFence vkCreateFence = 0;
- PFN_vkCreateFramebuffer vkCreateFramebuffer = 0;
- PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines = 0;
- PFN_vkCreateImage vkCreateImage = 0;
- PFN_vkCreateImageView vkCreateImageView = 0;
- PFN_vkCreateIndirectCommandsLayoutNV vkCreateIndirectCommandsLayoutNV = 0;
- PFN_vkCreatePipelineCache vkCreatePipelineCache = 0;
- PFN_vkCreatePipelineLayout vkCreatePipelineLayout = 0;
- PFN_vkCreatePrivateDataSlotEXT vkCreatePrivateDataSlotEXT = 0;
- PFN_vkCreateQueryPool vkCreateQueryPool = 0;
- PFN_vkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR = 0;
- PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV = 0;
- PFN_vkCreateRenderPass vkCreateRenderPass = 0;
- PFN_vkCreateRenderPass2 vkCreateRenderPass2 = 0;
- PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR = 0;
- PFN_vkCreateSampler vkCreateSampler = 0;
- PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion = 0;
- PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR = 0;
- PFN_vkCreateSemaphore vkCreateSemaphore = 0;
- PFN_vkCreateShaderModule vkCreateShaderModule = 0;
- PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR = 0;
- PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR = 0;
- PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT = 0;
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkCreateVideoSessionKHR vkCreateVideoSessionKHR = 0;
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkCreateVideoSessionParametersKHR vkCreateVideoSessionParametersKHR = 0;
+ //=== VK_KHR_video_decode_queue ===
+ vkCmdDecodeVideoKHR = PFN_vkCmdDecodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdDecodeVideoKHR" ) );
# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT = 0;
- PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT = 0;
- PFN_vkDeferredOperationJoinKHR vkDeferredOperationJoinKHR = 0;
- PFN_vkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR = 0;
- PFN_vkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV = 0;
- PFN_vkDestroyBuffer vkDestroyBuffer = 0;
- PFN_vkDestroyBufferView vkDestroyBufferView = 0;
- PFN_vkDestroyCommandPool vkDestroyCommandPool = 0;
- PFN_vkDestroyCuFunctionNVX vkDestroyCuFunctionNVX = 0;
- PFN_vkDestroyCuModuleNVX vkDestroyCuModuleNVX = 0;
- PFN_vkDestroyDeferredOperationKHR vkDestroyDeferredOperationKHR = 0;
- PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool = 0;
- PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout = 0;
- PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate = 0;
- PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR = 0;
- PFN_vkDestroyDevice vkDestroyDevice = 0;
- PFN_vkDestroyEvent vkDestroyEvent = 0;
- PFN_vkDestroyFence vkDestroyFence = 0;
- PFN_vkDestroyFramebuffer vkDestroyFramebuffer = 0;
- PFN_vkDestroyImage vkDestroyImage = 0;
- PFN_vkDestroyImageView vkDestroyImageView = 0;
- PFN_vkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV = 0;
- PFN_vkDestroyPipeline vkDestroyPipeline = 0;
- PFN_vkDestroyPipelineCache vkDestroyPipelineCache = 0;
- PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout = 0;
- PFN_vkDestroyPrivateDataSlotEXT vkDestroyPrivateDataSlotEXT = 0;
- PFN_vkDestroyQueryPool vkDestroyQueryPool = 0;
- PFN_vkDestroyRenderPass vkDestroyRenderPass = 0;
- PFN_vkDestroySampler vkDestroySampler = 0;
- PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion = 0;
- PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR = 0;
- PFN_vkDestroySemaphore vkDestroySemaphore = 0;
- PFN_vkDestroyShaderModule vkDestroyShaderModule = 0;
- PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR = 0;
- PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT = 0;
+
# if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkDestroyVideoSessionKHR vkDestroyVideoSessionKHR = 0;
+ //=== VK_KHR_video_encode_queue ===
+ vkCmdEncodeVideoKHR = PFN_vkCmdEncodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdEncodeVideoKHR" ) );
# endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
# if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkDestroyVideoSessionParametersKHR vkDestroyVideoSessionParametersKHR = 0;
+ //=== VK_KHR_video_queue ===
+ vkCreateVideoSessionKHR =
+ PFN_vkCreateVideoSessionKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionKHR" ) );
+ vkDestroyVideoSessionKHR =
+ PFN_vkDestroyVideoSessionKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionKHR" ) );
+ vkGetVideoSessionMemoryRequirementsKHR = PFN_vkGetVideoSessionMemoryRequirementsKHR(
+ vkGetDeviceProcAddr( device, "vkGetVideoSessionMemoryRequirementsKHR" ) );
+ vkBindVideoSessionMemoryKHR =
+ PFN_vkBindVideoSessionMemoryKHR( vkGetDeviceProcAddr( device, "vkBindVideoSessionMemoryKHR" ) );
+ vkCreateVideoSessionParametersKHR =
+ PFN_vkCreateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionParametersKHR" ) );
+ vkUpdateVideoSessionParametersKHR =
+ PFN_vkUpdateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkUpdateVideoSessionParametersKHR" ) );
+ vkDestroyVideoSessionParametersKHR =
+ PFN_vkDestroyVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionParametersKHR" ) );
+ vkCmdBeginVideoCodingKHR =
+ PFN_vkCmdBeginVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdBeginVideoCodingKHR" ) );
+ vkCmdEndVideoCodingKHR = PFN_vkCmdEndVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdEndVideoCodingKHR" ) );
+ vkCmdControlVideoCodingKHR =
+ PFN_vkCmdControlVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdControlVideoCodingKHR" ) );
# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkDeviceWaitIdle vkDeviceWaitIdle = 0;
- PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT = 0;
- PFN_vkEndCommandBuffer vkEndCommandBuffer = 0;
- PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges = 0;
- PFN_vkFreeCommandBuffers vkFreeCommandBuffers = 0;
- PFN_vkFreeDescriptorSets vkFreeDescriptorSets = 0;
- PFN_vkFreeMemory vkFreeMemory = 0;
- PFN_vkGetAccelerationStructureBuildSizesKHR vkGetAccelerationStructureBuildSizesKHR = 0;
- PFN_vkGetAccelerationStructureDeviceAddressKHR vkGetAccelerationStructureDeviceAddressKHR = 0;
- PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV = 0;
- PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV = 0;
-# if defined( VK_USE_PLATFORM_ANDROID_KHR )
- PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID = 0;
-# endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress = 0;
- PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT = 0;
- PFN_vkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR = 0;
- PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements = 0;
- PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2 = 0;
- PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR = 0;
- PFN_vkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress = 0;
- PFN_vkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR = 0;
- PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT = 0;
- PFN_vkGetDeferredOperationMaxConcurrencyKHR vkGetDeferredOperationMaxConcurrencyKHR = 0;
- PFN_vkGetDeferredOperationResultKHR vkGetDeferredOperationResultKHR = 0;
- PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport = 0;
- PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR = 0;
- PFN_vkGetDeviceAccelerationStructureCompatibilityKHR vkGetDeviceAccelerationStructureCompatibilityKHR = 0;
- PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures = 0;
- PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR = 0;
- PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR = 0;
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT = 0;
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR = 0;
- PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment = 0;
- PFN_vkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress = 0;
- PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR = 0;
- PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0;
- PFN_vkGetDeviceQueue vkGetDeviceQueue = 0;
- PFN_vkGetDeviceQueue2 vkGetDeviceQueue2 = 0;
- PFN_vkGetEventStatus vkGetEventStatus = 0;
- PFN_vkGetFenceFdKHR vkGetFenceFdKHR = 0;
- PFN_vkGetFenceStatus vkGetFenceStatus = 0;
+
+ //=== VK_NVX_binary_import ===
+ vkCreateCuModuleNVX = PFN_vkCreateCuModuleNVX( vkGetDeviceProcAddr( device, "vkCreateCuModuleNVX" ) );
+ vkCreateCuFunctionNVX = PFN_vkCreateCuFunctionNVX( vkGetDeviceProcAddr( device, "vkCreateCuFunctionNVX" ) );
+ vkDestroyCuModuleNVX = PFN_vkDestroyCuModuleNVX( vkGetDeviceProcAddr( device, "vkDestroyCuModuleNVX" ) );
+ vkDestroyCuFunctionNVX = PFN_vkDestroyCuFunctionNVX( vkGetDeviceProcAddr( device, "vkDestroyCuFunctionNVX" ) );
+ vkCmdCuLaunchKernelNVX = PFN_vkCmdCuLaunchKernelNVX( vkGetDeviceProcAddr( device, "vkCmdCuLaunchKernelNVX" ) );
+
+ //=== VK_NVX_image_view_handle ===
+ vkGetImageViewHandleNVX =
+ PFN_vkGetImageViewHandleNVX( vkGetDeviceProcAddr( device, "vkGetImageViewHandleNVX" ) );
+ vkGetImageViewAddressNVX =
+ PFN_vkGetImageViewAddressNVX( vkGetDeviceProcAddr( device, "vkGetImageViewAddressNVX" ) );
+
+ //=== VK_NV_clip_space_w_scaling ===
+ vkCmdSetViewportWScalingNV =
+ PFN_vkCmdSetViewportWScalingNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportWScalingNV" ) );
+
+ //=== VK_NV_device_diagnostic_checkpoints ===
+ vkCmdSetCheckpointNV = PFN_vkCmdSetCheckpointNV( vkGetDeviceProcAddr( device, "vkCmdSetCheckpointNV" ) );
+ vkGetQueueCheckpointDataNV =
+ PFN_vkGetQueueCheckpointDataNV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointDataNV" ) );
+
+ //=== VK_NV_device_generated_commands ===
+ vkGetGeneratedCommandsMemoryRequirementsNV = PFN_vkGetGeneratedCommandsMemoryRequirementsNV(
+ vkGetDeviceProcAddr( device, "vkGetGeneratedCommandsMemoryRequirementsNV" ) );
+ vkCmdPreprocessGeneratedCommandsNV =
+ PFN_vkCmdPreprocessGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdPreprocessGeneratedCommandsNV" ) );
+ vkCmdExecuteGeneratedCommandsNV =
+ PFN_vkCmdExecuteGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdExecuteGeneratedCommandsNV" ) );
+ vkCmdBindPipelineShaderGroupNV =
+ PFN_vkCmdBindPipelineShaderGroupNV( vkGetDeviceProcAddr( device, "vkCmdBindPipelineShaderGroupNV" ) );
+ vkCreateIndirectCommandsLayoutNV =
+ PFN_vkCreateIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkCreateIndirectCommandsLayoutNV" ) );
+ vkDestroyIndirectCommandsLayoutNV =
+ PFN_vkDestroyIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkDestroyIndirectCommandsLayoutNV" ) );
+
+ //=== VK_NV_external_memory_rdma ===
+ vkGetMemoryRemoteAddressNV =
+ PFN_vkGetMemoryRemoteAddressNV( vkGetDeviceProcAddr( device, "vkGetMemoryRemoteAddressNV" ) );
+
# if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR = 0;
+ //=== VK_NV_external_memory_win32 ===
+ vkGetMemoryWin32HandleNV =
+ PFN_vkGetMemoryWin32HandleNV( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleNV" ) );
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV = 0;
- PFN_vkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT = 0;
- PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements = 0;
- PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2 = 0;
- PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR = 0;
- PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements = 0;
- PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2 = 0;
- PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR = 0;
- PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout = 0;
- PFN_vkGetImageViewAddressNVX vkGetImageViewAddressNVX = 0;
- PFN_vkGetImageViewHandleNVX vkGetImageViewHandleNVX = 0;
+
+ //=== VK_NV_fragment_shading_rate_enums ===
+ vkCmdSetFragmentShadingRateEnumNV =
+ PFN_vkCmdSetFragmentShadingRateEnumNV( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateEnumNV" ) );
+
+ //=== VK_NV_mesh_shader ===
+ vkCmdDrawMeshTasksNV = PFN_vkCmdDrawMeshTasksNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksNV" ) );
+ vkCmdDrawMeshTasksIndirectNV =
+ PFN_vkCmdDrawMeshTasksIndirectNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectNV" ) );
+ vkCmdDrawMeshTasksIndirectCountNV =
+ PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectCountNV" ) );
+
+ //=== VK_NV_ray_tracing ===
+ vkCreateAccelerationStructureNV =
+ PFN_vkCreateAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureNV" ) );
+ vkDestroyAccelerationStructureNV =
+ PFN_vkDestroyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureNV" ) );
+ vkGetAccelerationStructureMemoryRequirementsNV = PFN_vkGetAccelerationStructureMemoryRequirementsNV(
+ vkGetDeviceProcAddr( device, "vkGetAccelerationStructureMemoryRequirementsNV" ) );
+ vkBindAccelerationStructureMemoryNV = PFN_vkBindAccelerationStructureMemoryNV(
+ vkGetDeviceProcAddr( device, "vkBindAccelerationStructureMemoryNV" ) );
+ vkCmdBuildAccelerationStructureNV =
+ PFN_vkCmdBuildAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructureNV" ) );
+ vkCmdCopyAccelerationStructureNV =
+ PFN_vkCmdCopyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureNV" ) );
+ vkCmdTraceRaysNV = PFN_vkCmdTraceRaysNV( vkGetDeviceProcAddr( device, "vkCmdTraceRaysNV" ) );
+ vkCreateRayTracingPipelinesNV =
+ PFN_vkCreateRayTracingPipelinesNV( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesNV" ) );
+ vkGetRayTracingShaderGroupHandlesNV = PFN_vkGetRayTracingShaderGroupHandlesNV(
+ vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesNV" ) );
+ if ( !vkGetRayTracingShaderGroupHandlesKHR )
+ vkGetRayTracingShaderGroupHandlesKHR = vkGetRayTracingShaderGroupHandlesNV;
+ vkGetAccelerationStructureHandleNV =
+ PFN_vkGetAccelerationStructureHandleNV( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureHandleNV" ) );
+ vkCmdWriteAccelerationStructuresPropertiesNV = PFN_vkCmdWriteAccelerationStructuresPropertiesNV(
+ vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesNV" ) );
+ vkCompileDeferredNV = PFN_vkCompileDeferredNV( vkGetDeviceProcAddr( device, "vkCompileDeferredNV" ) );
+
+ //=== VK_NV_scissor_exclusive ===
+ vkCmdSetExclusiveScissorNV =
+ PFN_vkCmdSetExclusiveScissorNV( vkGetDeviceProcAddr( device, "vkCmdSetExclusiveScissorNV" ) );
+
+ //=== VK_NV_shading_rate_image ===
+ vkCmdBindShadingRateImageNV =
+ PFN_vkCmdBindShadingRateImageNV( vkGetDeviceProcAddr( device, "vkCmdBindShadingRateImageNV" ) );
+ vkCmdSetViewportShadingRatePaletteNV = PFN_vkCmdSetViewportShadingRatePaletteNV(
+ vkGetDeviceProcAddr( device, "vkCmdSetViewportShadingRatePaletteNV" ) );
+ vkCmdSetCoarseSampleOrderNV =
+ PFN_vkCmdSetCoarseSampleOrderNV( vkGetDeviceProcAddr( device, "vkCmdSetCoarseSampleOrderNV" ) );
+ }
+
+ public:
+ //=== VK_VERSION_1_0 ===
+ PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0;
+ PFN_vkDestroyDevice vkDestroyDevice = 0;
+ PFN_vkGetDeviceQueue vkGetDeviceQueue = 0;
+ PFN_vkQueueSubmit vkQueueSubmit = 0;
+ PFN_vkQueueWaitIdle vkQueueWaitIdle = 0;
+ PFN_vkDeviceWaitIdle vkDeviceWaitIdle = 0;
+ PFN_vkAllocateMemory vkAllocateMemory = 0;
+ PFN_vkFreeMemory vkFreeMemory = 0;
+ PFN_vkMapMemory vkMapMemory = 0;
+ PFN_vkUnmapMemory vkUnmapMemory = 0;
+ PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges = 0;
+ PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges = 0;
+ PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment = 0;
+ PFN_vkBindBufferMemory vkBindBufferMemory = 0;
+ PFN_vkBindImageMemory vkBindImageMemory = 0;
+ PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements = 0;
+ PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements = 0;
+ PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements = 0;
+ PFN_vkQueueBindSparse vkQueueBindSparse = 0;
+ PFN_vkCreateFence vkCreateFence = 0;
+ PFN_vkDestroyFence vkDestroyFence = 0;
+ PFN_vkResetFences vkResetFences = 0;
+ PFN_vkGetFenceStatus vkGetFenceStatus = 0;
+ PFN_vkWaitForFences vkWaitForFences = 0;
+ PFN_vkCreateSemaphore vkCreateSemaphore = 0;
+ PFN_vkDestroySemaphore vkDestroySemaphore = 0;
+ PFN_vkCreateEvent vkCreateEvent = 0;
+ PFN_vkDestroyEvent vkDestroyEvent = 0;
+ PFN_vkGetEventStatus vkGetEventStatus = 0;
+ PFN_vkSetEvent vkSetEvent = 0;
+ PFN_vkResetEvent vkResetEvent = 0;
+ PFN_vkCreateQueryPool vkCreateQueryPool = 0;
+ PFN_vkDestroyQueryPool vkDestroyQueryPool = 0;
+ PFN_vkGetQueryPoolResults vkGetQueryPoolResults = 0;
+ PFN_vkCreateBuffer vkCreateBuffer = 0;
+ PFN_vkDestroyBuffer vkDestroyBuffer = 0;
+ PFN_vkCreateBufferView vkCreateBufferView = 0;
+ PFN_vkDestroyBufferView vkDestroyBufferView = 0;
+ PFN_vkCreateImage vkCreateImage = 0;
+ PFN_vkDestroyImage vkDestroyImage = 0;
+ PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout = 0;
+ PFN_vkCreateImageView vkCreateImageView = 0;
+ PFN_vkDestroyImageView vkDestroyImageView = 0;
+ PFN_vkCreateShaderModule vkCreateShaderModule = 0;
+ PFN_vkDestroyShaderModule vkDestroyShaderModule = 0;
+ PFN_vkCreatePipelineCache vkCreatePipelineCache = 0;
+ PFN_vkDestroyPipelineCache vkDestroyPipelineCache = 0;
+ PFN_vkGetPipelineCacheData vkGetPipelineCacheData = 0;
+ PFN_vkMergePipelineCaches vkMergePipelineCaches = 0;
+ PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines = 0;
+ PFN_vkCreateComputePipelines vkCreateComputePipelines = 0;
+ PFN_vkDestroyPipeline vkDestroyPipeline = 0;
+ PFN_vkCreatePipelineLayout vkCreatePipelineLayout = 0;
+ PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout = 0;
+ PFN_vkCreateSampler vkCreateSampler = 0;
+ PFN_vkDestroySampler vkDestroySampler = 0;
+ PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout = 0;
+ PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout = 0;
+ PFN_vkCreateDescriptorPool vkCreateDescriptorPool = 0;
+ PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool = 0;
+ PFN_vkResetDescriptorPool vkResetDescriptorPool = 0;
+ PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets = 0;
+ PFN_vkFreeDescriptorSets vkFreeDescriptorSets = 0;
+ PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets = 0;
+ PFN_vkCreateFramebuffer vkCreateFramebuffer = 0;
+ PFN_vkDestroyFramebuffer vkDestroyFramebuffer = 0;
+ PFN_vkCreateRenderPass vkCreateRenderPass = 0;
+ PFN_vkDestroyRenderPass vkDestroyRenderPass = 0;
+ PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity = 0;
+ PFN_vkCreateCommandPool vkCreateCommandPool = 0;
+ PFN_vkDestroyCommandPool vkDestroyCommandPool = 0;
+ PFN_vkResetCommandPool vkResetCommandPool = 0;
+ PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers = 0;
+ PFN_vkFreeCommandBuffers vkFreeCommandBuffers = 0;
+ PFN_vkBeginCommandBuffer vkBeginCommandBuffer = 0;
+ PFN_vkEndCommandBuffer vkEndCommandBuffer = 0;
+ PFN_vkResetCommandBuffer vkResetCommandBuffer = 0;
+ PFN_vkCmdBindPipeline vkCmdBindPipeline = 0;
+ PFN_vkCmdSetViewport vkCmdSetViewport = 0;
+ PFN_vkCmdSetScissor vkCmdSetScissor = 0;
+ PFN_vkCmdSetLineWidth vkCmdSetLineWidth = 0;
+ PFN_vkCmdSetDepthBias vkCmdSetDepthBias = 0;
+ PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants = 0;
+ PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds = 0;
+ PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask = 0;
+ PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask = 0;
+ PFN_vkCmdSetStencilReference vkCmdSetStencilReference = 0;
+ PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets = 0;
+ PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer = 0;
+ PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers = 0;
+ PFN_vkCmdDraw vkCmdDraw = 0;
+ PFN_vkCmdDrawIndexed vkCmdDrawIndexed = 0;
+ PFN_vkCmdDrawIndirect vkCmdDrawIndirect = 0;
+ PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect = 0;
+ PFN_vkCmdDispatch vkCmdDispatch = 0;
+ PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect = 0;
+ PFN_vkCmdCopyBuffer vkCmdCopyBuffer = 0;
+ PFN_vkCmdCopyImage vkCmdCopyImage = 0;
+ PFN_vkCmdBlitImage vkCmdBlitImage = 0;
+ PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage = 0;
+ PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer = 0;
+ PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer = 0;
+ PFN_vkCmdFillBuffer vkCmdFillBuffer = 0;
+ PFN_vkCmdClearColorImage vkCmdClearColorImage = 0;
+ PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage = 0;
+ PFN_vkCmdClearAttachments vkCmdClearAttachments = 0;
+ PFN_vkCmdResolveImage vkCmdResolveImage = 0;
+ PFN_vkCmdSetEvent vkCmdSetEvent = 0;
+ PFN_vkCmdResetEvent vkCmdResetEvent = 0;
+ PFN_vkCmdWaitEvents vkCmdWaitEvents = 0;
+ PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier = 0;
+ PFN_vkCmdBeginQuery vkCmdBeginQuery = 0;
+ PFN_vkCmdEndQuery vkCmdEndQuery = 0;
+ PFN_vkCmdResetQueryPool vkCmdResetQueryPool = 0;
+ PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp = 0;
+ PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults = 0;
+ PFN_vkCmdPushConstants vkCmdPushConstants = 0;
+ PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass = 0;
+ PFN_vkCmdNextSubpass vkCmdNextSubpass = 0;
+ PFN_vkCmdEndRenderPass vkCmdEndRenderPass = 0;
+ PFN_vkCmdExecuteCommands vkCmdExecuteCommands = 0;
+
+ //=== VK_VERSION_1_1 ===
+ PFN_vkBindBufferMemory2 vkBindBufferMemory2 = 0;
+ PFN_vkBindImageMemory2 vkBindImageMemory2 = 0;
+ PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures = 0;
+ PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask = 0;
+ PFN_vkCmdDispatchBase vkCmdDispatchBase = 0;
+ PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2 = 0;
+ PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2 = 0;
+ PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2 = 0;
+ PFN_vkTrimCommandPool vkTrimCommandPool = 0;
+ PFN_vkGetDeviceQueue2 vkGetDeviceQueue2 = 0;
+ PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion = 0;
+ PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion = 0;
+ PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate = 0;
+ PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate = 0;
+ PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate = 0;
+ PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport = 0;
+
+ //=== VK_VERSION_1_2 ===
+ PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount = 0;
+ PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount = 0;
+ PFN_vkCreateRenderPass2 vkCreateRenderPass2 = 0;
+ PFN_vkCmdBeginRenderPass2 vkCmdBeginRenderPass2 = 0;
+ PFN_vkCmdNextSubpass2 vkCmdNextSubpass2 = 0;
+ PFN_vkCmdEndRenderPass2 vkCmdEndRenderPass2 = 0;
+ PFN_vkResetQueryPool vkResetQueryPool = 0;
+ PFN_vkGetSemaphoreCounterValue vkGetSemaphoreCounterValue = 0;
+ PFN_vkWaitSemaphores vkWaitSemaphores = 0;
+ PFN_vkSignalSemaphore vkSignalSemaphore = 0;
+ PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress = 0;
+ PFN_vkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress = 0;
+ PFN_vkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress = 0;
+
+ //=== VK_AMD_buffer_marker ===
+ PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD = 0;
+
+ //=== VK_AMD_display_native_hdr ===
+ PFN_vkSetLocalDimmingAMD vkSetLocalDimmingAMD = 0;
+
+ //=== VK_AMD_draw_indirect_count ===
+ PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD = 0;
+ PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD = 0;
+
+ //=== VK_AMD_shader_info ===
+ PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD = 0;
+
# if defined( VK_USE_PLATFORM_ANDROID_KHR )
- PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID = 0;
+ //=== VK_ANDROID_external_memory_android_hardware_buffer ===
+ PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID = 0;
+ PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID = 0;
+# else
+ PFN_dummy vkGetAndroidHardwareBufferPropertiesANDROID_placeholder = 0;
+ PFN_dummy vkGetMemoryAndroidHardwareBufferANDROID_placeholder = 0;
# endif /*VK_USE_PLATFORM_ANDROID_KHR*/
- PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR = 0;
- PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR = 0;
+
+ //=== VK_EXT_buffer_device_address ===
+ PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT = 0;
+
+ //=== VK_EXT_calibrated_timestamps ===
+ PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT = 0;
+
+ //=== VK_EXT_color_write_enable ===
+ PFN_vkCmdSetColorWriteEnableEXT vkCmdSetColorWriteEnableEXT = 0;
+
+ //=== VK_EXT_conditional_rendering ===
+ PFN_vkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT = 0;
+ PFN_vkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT = 0;
+
+ //=== VK_EXT_debug_marker ===
+ PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT = 0;
+ PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT = 0;
+ PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT = 0;
+ PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT = 0;
+ PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT = 0;
+
+ //=== VK_EXT_debug_utils ===
+ PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT = 0;
+ PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT = 0;
+ PFN_vkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT = 0;
+ PFN_vkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT = 0;
+ PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT = 0;
+ PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT = 0;
+ PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT = 0;
+ PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT = 0;
+
+ //=== VK_EXT_discard_rectangles ===
+ PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT = 0;
+
+ //=== VK_EXT_display_control ===
+ PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT = 0;
+ PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT = 0;
+ PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT = 0;
+ PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT = 0;
+
+ //=== VK_EXT_extended_dynamic_state ===
+ PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT = 0;
+ PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT = 0;
+ PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT = 0;
+ PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT = 0;
+ PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT = 0;
+ PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT = 0;
+ PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT = 0;
+ PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT = 0;
+ PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT = 0;
+ PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT = 0;
+ PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT = 0;
+ PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT = 0;
+
+ //=== VK_EXT_extended_dynamic_state2 ===
+ PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT = 0;
+ PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT = 0;
+ PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT = 0;
+ PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT = 0;
+ PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT = 0;
+
+ //=== VK_EXT_external_memory_host ===
PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT = 0;
+
# if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR = 0;
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV = 0;
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR = 0;
+ //=== VK_EXT_full_screen_exclusive ===
+ PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT = 0;
+ PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT = 0;
+ PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT = 0;
+# else
+ PFN_dummy vkAcquireFullScreenExclusiveModeEXT_placeholder = 0;
+ PFN_dummy vkReleaseFullScreenExclusiveModeEXT_placeholder = 0;
+ PFN_dummy vkGetDeviceGroupSurfacePresentModes2EXT_placeholder = 0;
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_EXT_hdr_metadata ===
+ PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT = 0;
+
+ //=== VK_EXT_host_query_reset ===
+ PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT = 0;
+
+ //=== VK_EXT_image_drm_format_modifier ===
+ PFN_vkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT = 0;
+
+ //=== VK_EXT_line_rasterization ===
+ PFN_vkCmdSetLineStippleEXT vkCmdSetLineStippleEXT = 0;
+
+ //=== VK_EXT_multi_draw ===
+ PFN_vkCmdDrawMultiEXT vkCmdDrawMultiEXT = 0;
+ PFN_vkCmdDrawMultiIndexedEXT vkCmdDrawMultiIndexedEXT = 0;
+
+ //=== VK_EXT_private_data ===
+ PFN_vkCreatePrivateDataSlotEXT vkCreatePrivateDataSlotEXT = 0;
+ PFN_vkDestroyPrivateDataSlotEXT vkDestroyPrivateDataSlotEXT = 0;
+ PFN_vkSetPrivateDataEXT vkSetPrivateDataEXT = 0;
+ PFN_vkGetPrivateDataEXT vkGetPrivateDataEXT = 0;
+
+ //=== VK_EXT_sample_locations ===
+ PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT = 0;
+
+ //=== VK_EXT_transform_feedback ===
+ PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT = 0;
+ PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT = 0;
+ PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT = 0;
+ PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT = 0;
+ PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT = 0;
+ PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT = 0;
+
+ //=== VK_EXT_validation_cache ===
+ PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT = 0;
+ PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT = 0;
+ PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT = 0;
+ PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT = 0;
+
+ //=== VK_EXT_vertex_input_dynamic_state ===
+ PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT = 0;
+
# if defined( VK_USE_PLATFORM_FUCHSIA )
- PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA = 0;
-# endif /*VK_USE_PLATFORM_FUCHSIA*/
-# if defined( VK_USE_PLATFORM_FUCHSIA )
+ //=== VK_FUCHSIA_external_memory ===
+ PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA = 0;
PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIA = 0;
+# else
+ PFN_dummy vkGetMemoryZirconHandleFUCHSIA_placeholder = 0;
+ PFN_dummy vkGetMemoryZirconHandlePropertiesFUCHSIA_placeholder = 0;
# endif /*VK_USE_PLATFORM_FUCHSIA*/
- PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE = 0;
- PFN_vkGetPerformanceParameterINTEL vkGetPerformanceParameterINTEL = 0;
- PFN_vkGetPipelineCacheData vkGetPipelineCacheData = 0;
- PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR = 0;
- PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR = 0;
- PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR = 0;
- PFN_vkGetPrivateDataEXT vkGetPrivateDataEXT = 0;
- PFN_vkGetQueryPoolResults vkGetQueryPoolResults = 0;
- PFN_vkGetQueueCheckpointData2NV vkGetQueueCheckpointData2NV = 0;
- PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV = 0;
- PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = 0;
- PFN_vkGetRayTracingShaderGroupHandlesKHR vkGetRayTracingShaderGroupHandlesKHR = 0;
- PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV = 0;
- PFN_vkGetRayTracingShaderGroupStackSizeKHR vkGetRayTracingShaderGroupStackSizeKHR = 0;
- PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE = 0;
- PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity = 0;
- PFN_vkGetSemaphoreCounterValue vkGetSemaphoreCounterValue = 0;
- PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR = 0;
- PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR = 0;
-# if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR = 0;
-# endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
# if defined( VK_USE_PLATFORM_FUCHSIA )
- PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA = 0;
+ //=== VK_FUCHSIA_external_semaphore ===
+ PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA = 0;
+ PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA = 0;
+# else
+ PFN_dummy vkImportSemaphoreZirconHandleFUCHSIA_placeholder = 0;
+ PFN_dummy vkGetSemaphoreZirconHandleFUCHSIA_placeholder = 0;
# endif /*VK_USE_PLATFORM_FUCHSIA*/
- PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD = 0;
- PFN_vkGetSubpassShadingMaxWorkgroupSizeHUAWEI vkGetSubpassShadingMaxWorkgroupSizeHUAWEI = 0;
- PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT = 0;
- PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR = 0;
- PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR = 0;
- PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT = 0;
-# if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkGetVideoSessionMemoryRequirementsKHR vkGetVideoSessionMemoryRequirementsKHR = 0;
-# endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_GOOGLE_display_timing ===
+ PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE = 0;
+ PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE = 0;
+
+ //=== VK_HUAWEI_invocation_mask ===
+ PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI = 0;
+
+ //=== VK_HUAWEI_subpass_shading ===
+ PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = 0;
+ PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI = 0;
+
+ //=== VK_INTEL_performance_query ===
+ PFN_vkInitializePerformanceApiINTEL vkInitializePerformanceApiINTEL = 0;
+ PFN_vkUninitializePerformanceApiINTEL vkUninitializePerformanceApiINTEL = 0;
+ PFN_vkCmdSetPerformanceMarkerINTEL vkCmdSetPerformanceMarkerINTEL = 0;
+ PFN_vkCmdSetPerformanceStreamMarkerINTEL vkCmdSetPerformanceStreamMarkerINTEL = 0;
+ PFN_vkCmdSetPerformanceOverrideINTEL vkCmdSetPerformanceOverrideINTEL = 0;
+ PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL = 0;
+ PFN_vkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL = 0;
+ PFN_vkQueueSetPerformanceConfigurationINTEL vkQueueSetPerformanceConfigurationINTEL = 0;
+ PFN_vkGetPerformanceParameterINTEL vkGetPerformanceParameterINTEL = 0;
+
+ //=== VK_KHR_acceleration_structure ===
+ PFN_vkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR = 0;
+ PFN_vkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR = 0;
+ PFN_vkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR = 0;
+ PFN_vkCmdBuildAccelerationStructuresIndirectKHR vkCmdBuildAccelerationStructuresIndirectKHR = 0;
+ PFN_vkBuildAccelerationStructuresKHR vkBuildAccelerationStructuresKHR = 0;
+ PFN_vkCopyAccelerationStructureKHR vkCopyAccelerationStructureKHR = 0;
+ PFN_vkCopyAccelerationStructureToMemoryKHR vkCopyAccelerationStructureToMemoryKHR = 0;
+ PFN_vkCopyMemoryToAccelerationStructureKHR vkCopyMemoryToAccelerationStructureKHR = 0;
+ PFN_vkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR = 0;
+ PFN_vkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR = 0;
+ PFN_vkCmdCopyAccelerationStructureToMemoryKHR vkCmdCopyAccelerationStructureToMemoryKHR = 0;
+ PFN_vkCmdCopyMemoryToAccelerationStructureKHR vkCmdCopyMemoryToAccelerationStructureKHR = 0;
+ PFN_vkGetAccelerationStructureDeviceAddressKHR vkGetAccelerationStructureDeviceAddressKHR = 0;
+ PFN_vkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR = 0;
+ PFN_vkGetDeviceAccelerationStructureCompatibilityKHR vkGetDeviceAccelerationStructureCompatibilityKHR = 0;
+ PFN_vkGetAccelerationStructureBuildSizesKHR vkGetAccelerationStructureBuildSizesKHR = 0;
+
+ //=== VK_KHR_bind_memory2 ===
+ PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR = 0;
+ PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR = 0;
+
+ //=== VK_KHR_buffer_device_address ===
+ PFN_vkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR = 0;
+ PFN_vkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR = 0;
+ PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR = 0;
+
+ //=== VK_KHR_copy_commands2 ===
+ PFN_vkCmdCopyBuffer2KHR vkCmdCopyBuffer2KHR = 0;
+ PFN_vkCmdCopyImage2KHR vkCmdCopyImage2KHR = 0;
+ PFN_vkCmdCopyBufferToImage2KHR vkCmdCopyBufferToImage2KHR = 0;
+ PFN_vkCmdCopyImageToBuffer2KHR vkCmdCopyImageToBuffer2KHR = 0;
+ PFN_vkCmdBlitImage2KHR vkCmdBlitImage2KHR = 0;
+ PFN_vkCmdResolveImage2KHR vkCmdResolveImage2KHR = 0;
+
+ //=== VK_KHR_create_renderpass2 ===
+ PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR = 0;
+ PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR = 0;
+ PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR = 0;
+ PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR = 0;
+
+ //=== VK_KHR_deferred_host_operations ===
+ PFN_vkCreateDeferredOperationKHR vkCreateDeferredOperationKHR = 0;
+ PFN_vkDestroyDeferredOperationKHR vkDestroyDeferredOperationKHR = 0;
+ PFN_vkGetDeferredOperationMaxConcurrencyKHR vkGetDeferredOperationMaxConcurrencyKHR = 0;
+ PFN_vkGetDeferredOperationResultKHR vkGetDeferredOperationResultKHR = 0;
+ PFN_vkDeferredOperationJoinKHR vkDeferredOperationJoinKHR = 0;
+
+ //=== VK_KHR_descriptor_update_template ===
+ PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR = 0;
+ PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR = 0;
+ PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR = 0;
+ PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR = 0;
+
+ //=== VK_KHR_device_group ===
+ PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR = 0;
+ PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR = 0;
+ PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR = 0;
+ PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR = 0;
+ PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR = 0;
+ PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR = 0;
+
+ //=== VK_KHR_display_swapchain ===
+ PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR = 0;
+
+ //=== VK_KHR_draw_indirect_count ===
+ PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR = 0;
+ PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR = 0;
+
+ //=== VK_KHR_external_fence_fd ===
PFN_vkImportFenceFdKHR vkImportFenceFdKHR = 0;
+ PFN_vkGetFenceFdKHR vkGetFenceFdKHR = 0;
+
# if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_KHR_external_fence_win32 ===
PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR = 0;
+ PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR = 0;
+# else
+ PFN_dummy vkImportFenceWin32HandleKHR_placeholder = 0;
+ PFN_dummy vkGetFenceWin32HandleKHR_placeholder = 0;
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR = 0;
+
+ //=== VK_KHR_external_memory_fd ===
+ PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR = 0;
+ PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR = 0;
+
# if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR = 0;
+ //=== VK_KHR_external_memory_win32 ===
+ PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR = 0;
+ PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR = 0;
+# else
+ PFN_dummy vkGetMemoryWin32HandleKHR_placeholder = 0;
+ PFN_dummy vkGetMemoryWin32HandlePropertiesKHR_placeholder = 0;
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
-# if defined( VK_USE_PLATFORM_FUCHSIA )
- PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA = 0;
-# endif /*VK_USE_PLATFORM_FUCHSIA*/
- PFN_vkInitializePerformanceApiINTEL vkInitializePerformanceApiINTEL = 0;
- PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges = 0;
- PFN_vkMapMemory vkMapMemory = 0;
- PFN_vkMergePipelineCaches vkMergePipelineCaches = 0;
- PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT = 0;
- PFN_vkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT = 0;
- PFN_vkQueueBindSparse vkQueueBindSparse = 0;
- PFN_vkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT = 0;
- PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT = 0;
- PFN_vkQueuePresentKHR vkQueuePresentKHR = 0;
- PFN_vkQueueSetPerformanceConfigurationINTEL vkQueueSetPerformanceConfigurationINTEL = 0;
- PFN_vkQueueSubmit vkQueueSubmit = 0;
- PFN_vkQueueSubmit2KHR vkQueueSubmit2KHR = 0;
- PFN_vkQueueWaitIdle vkQueueWaitIdle = 0;
- PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT = 0;
- PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT = 0;
+
+ //=== VK_KHR_external_semaphore_fd ===
+ PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR = 0;
+ PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR = 0;
+
# if defined( VK_USE_PLATFORM_WIN32_KHR )
- PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT = 0;
+ //=== VK_KHR_external_semaphore_win32 ===
+ PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR = 0;
+ PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR = 0;
+# else
+ PFN_dummy vkImportSemaphoreWin32HandleKHR_placeholder = 0;
+ PFN_dummy vkGetSemaphoreWin32HandleKHR_placeholder = 0;
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- PFN_vkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL = 0;
- PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR = 0;
- PFN_vkResetCommandBuffer vkResetCommandBuffer = 0;
- PFN_vkResetCommandPool vkResetCommandPool = 0;
- PFN_vkResetDescriptorPool vkResetDescriptorPool = 0;
- PFN_vkResetEvent vkResetEvent = 0;
- PFN_vkResetFences vkResetFences = 0;
- PFN_vkResetQueryPool vkResetQueryPool = 0;
- PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT = 0;
- PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT = 0;
- PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT = 0;
- PFN_vkSetEvent vkSetEvent = 0;
- PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT = 0;
- PFN_vkSetLocalDimmingAMD vkSetLocalDimmingAMD = 0;
- PFN_vkSetPrivateDataEXT vkSetPrivateDataEXT = 0;
- PFN_vkSignalSemaphore vkSignalSemaphore = 0;
- PFN_vkSignalSemaphoreKHR vkSignalSemaphoreKHR = 0;
- PFN_vkTrimCommandPool vkTrimCommandPool = 0;
- PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR = 0;
- PFN_vkUninitializePerformanceApiINTEL vkUninitializePerformanceApiINTEL = 0;
- PFN_vkUnmapMemory vkUnmapMemory = 0;
- PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate = 0;
- PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR = 0;
- PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets = 0;
+
+ //=== VK_KHR_fragment_shading_rate ===
+ PFN_vkCmdSetFragmentShadingRateKHR vkCmdSetFragmentShadingRateKHR = 0;
+
+ //=== VK_KHR_get_memory_requirements2 ===
+ PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR = 0;
+ PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR = 0;
+ PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR = 0;
+
+ //=== VK_KHR_maintenance1 ===
+ PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR = 0;
+
+ //=== VK_KHR_maintenance3 ===
+ PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR = 0;
+
+ //=== VK_KHR_performance_query ===
+ PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR = 0;
+ PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR = 0;
+
+ //=== VK_KHR_pipeline_executable_properties ===
+ PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR = 0;
+ PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR = 0;
+ PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR = 0;
+
+ //=== VK_KHR_present_wait ===
+ PFN_vkWaitForPresentKHR vkWaitForPresentKHR = 0;
+
+ //=== VK_KHR_push_descriptor ===
+ PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR = 0;
+
+ //=== VK_KHR_ray_tracing_pipeline ===
+ PFN_vkCmdTraceRaysKHR vkCmdTraceRaysKHR = 0;
+ PFN_vkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR = 0;
+ PFN_vkGetRayTracingShaderGroupHandlesKHR vkGetRayTracingShaderGroupHandlesKHR = 0;
+ PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = 0;
+ PFN_vkCmdTraceRaysIndirectKHR vkCmdTraceRaysIndirectKHR = 0;
+ PFN_vkGetRayTracingShaderGroupStackSizeKHR vkGetRayTracingShaderGroupStackSizeKHR = 0;
+ PFN_vkCmdSetRayTracingPipelineStackSizeKHR vkCmdSetRayTracingPipelineStackSizeKHR = 0;
+
+ //=== VK_KHR_sampler_ycbcr_conversion ===
+ PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR = 0;
+ PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR = 0;
+
+ //=== VK_KHR_shared_presentable_image ===
+ PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR = 0;
+
+ //=== VK_KHR_swapchain ===
+ PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR = 0;
+ PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR = 0;
+ PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR = 0;
+ PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR = 0;
+ PFN_vkQueuePresentKHR vkQueuePresentKHR = 0;
+
+ //=== VK_KHR_synchronization2 ===
+ PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR = 0;
+ PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR = 0;
+ PFN_vkCmdWaitEvents2KHR vkCmdWaitEvents2KHR = 0;
+ PFN_vkCmdPipelineBarrier2KHR vkCmdPipelineBarrier2KHR = 0;
+ PFN_vkCmdWriteTimestamp2KHR vkCmdWriteTimestamp2KHR = 0;
+ PFN_vkQueueSubmit2KHR vkQueueSubmit2KHR = 0;
+ PFN_vkCmdWriteBufferMarker2AMD vkCmdWriteBufferMarker2AMD = 0;
+ PFN_vkGetQueueCheckpointData2NV vkGetQueueCheckpointData2NV = 0;
+
+ //=== VK_KHR_timeline_semaphore ===
+ PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR = 0;
+ PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR = 0;
+ PFN_vkSignalSemaphoreKHR vkSignalSemaphoreKHR = 0;
+
# if defined( VK_ENABLE_BETA_EXTENSIONS )
- PFN_vkUpdateVideoSessionParametersKHR vkUpdateVideoSessionParametersKHR = 0;
+ //=== VK_KHR_video_decode_queue ===
+ PFN_vkCmdDecodeVideoKHR vkCmdDecodeVideoKHR = 0;
+# else
+ PFN_dummy vkCmdDecodeVideoKHR_placeholder = 0;
# endif /*VK_ENABLE_BETA_EXTENSIONS*/
- PFN_vkWaitForFences vkWaitForFences = 0;
- PFN_vkWaitSemaphores vkWaitSemaphores = 0;
- PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR = 0;
- PFN_vkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR = 0;
+
+# if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_encode_queue ===
+ PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR = 0;
+# else
+ PFN_dummy vkCmdEncodeVideoKHR_placeholder = 0;
+# endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+# if defined( VK_ENABLE_BETA_EXTENSIONS )
+ //=== VK_KHR_video_queue ===
+ PFN_vkCreateVideoSessionKHR vkCreateVideoSessionKHR = 0;
+ PFN_vkDestroyVideoSessionKHR vkDestroyVideoSessionKHR = 0;
+ PFN_vkGetVideoSessionMemoryRequirementsKHR vkGetVideoSessionMemoryRequirementsKHR = 0;
+ PFN_vkBindVideoSessionMemoryKHR vkBindVideoSessionMemoryKHR = 0;
+ PFN_vkCreateVideoSessionParametersKHR vkCreateVideoSessionParametersKHR = 0;
+ PFN_vkUpdateVideoSessionParametersKHR vkUpdateVideoSessionParametersKHR = 0;
+ PFN_vkDestroyVideoSessionParametersKHR vkDestroyVideoSessionParametersKHR = 0;
+ PFN_vkCmdBeginVideoCodingKHR vkCmdBeginVideoCodingKHR = 0;
+ PFN_vkCmdEndVideoCodingKHR vkCmdEndVideoCodingKHR = 0;
+ PFN_vkCmdControlVideoCodingKHR vkCmdControlVideoCodingKHR = 0;
+# else
+ PFN_dummy vkCreateVideoSessionKHR_placeholder = 0;
+ PFN_dummy vkDestroyVideoSessionKHR_placeholder = 0;
+ PFN_dummy vkGetVideoSessionMemoryRequirementsKHR_placeholder = 0;
+ PFN_dummy vkBindVideoSessionMemoryKHR_placeholder = 0;
+ PFN_dummy vkCreateVideoSessionParametersKHR_placeholder = 0;
+ PFN_dummy vkUpdateVideoSessionParametersKHR_placeholder = 0;
+ PFN_dummy vkDestroyVideoSessionParametersKHR_placeholder = 0;
+ PFN_dummy vkCmdBeginVideoCodingKHR_placeholder = 0;
+ PFN_dummy vkCmdEndVideoCodingKHR_placeholder = 0;
+ PFN_dummy vkCmdControlVideoCodingKHR_placeholder = 0;
+# endif /*VK_ENABLE_BETA_EXTENSIONS*/
+
+ //=== VK_NVX_binary_import ===
+ PFN_vkCreateCuModuleNVX vkCreateCuModuleNVX = 0;
+ PFN_vkCreateCuFunctionNVX vkCreateCuFunctionNVX = 0;
+ PFN_vkDestroyCuModuleNVX vkDestroyCuModuleNVX = 0;
+ PFN_vkDestroyCuFunctionNVX vkDestroyCuFunctionNVX = 0;
+ PFN_vkCmdCuLaunchKernelNVX vkCmdCuLaunchKernelNVX = 0;
+
+ //=== VK_NVX_image_view_handle ===
+ PFN_vkGetImageViewHandleNVX vkGetImageViewHandleNVX = 0;
+ PFN_vkGetImageViewAddressNVX vkGetImageViewAddressNVX = 0;
+
+ //=== VK_NV_clip_space_w_scaling ===
+ PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV = 0;
+
+ //=== VK_NV_device_diagnostic_checkpoints ===
+ PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV = 0;
+ PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV = 0;
+
+ //=== VK_NV_device_generated_commands ===
+ PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV = 0;
+ PFN_vkCmdPreprocessGeneratedCommandsNV vkCmdPreprocessGeneratedCommandsNV = 0;
+ PFN_vkCmdExecuteGeneratedCommandsNV vkCmdExecuteGeneratedCommandsNV = 0;
+ PFN_vkCmdBindPipelineShaderGroupNV vkCmdBindPipelineShaderGroupNV = 0;
+ PFN_vkCreateIndirectCommandsLayoutNV vkCreateIndirectCommandsLayoutNV = 0;
+ PFN_vkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV = 0;
+
+ //=== VK_NV_external_memory_rdma ===
+ PFN_vkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV = 0;
+
+# if defined( VK_USE_PLATFORM_WIN32_KHR )
+ //=== VK_NV_external_memory_win32 ===
+ PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV = 0;
+# else
+ PFN_dummy vkGetMemoryWin32HandleNV_placeholder = 0;
+# endif /*VK_USE_PLATFORM_WIN32_KHR*/
+
+ //=== VK_NV_fragment_shading_rate_enums ===
+ PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV = 0;
+
+ //=== VK_NV_mesh_shader ===
+ PFN_vkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV = 0;
+ PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV = 0;
+ PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV = 0;
+
+ //=== VK_NV_ray_tracing ===
+ PFN_vkCreateAccelerationStructureNV vkCreateAccelerationStructureNV = 0;
+ PFN_vkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV = 0;
+ PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV = 0;
+ PFN_vkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV = 0;
+ PFN_vkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV = 0;
+ PFN_vkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV = 0;
+ PFN_vkCmdTraceRaysNV vkCmdTraceRaysNV = 0;
+ PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV = 0;
+ PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV = 0;
+ PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV = 0;
+ PFN_vkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV = 0;
+ PFN_vkCompileDeferredNV vkCompileDeferredNV = 0;
+
+ //=== VK_NV_scissor_exclusive ===
+ PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV = 0;
+
+ //=== VK_NV_shading_rate_image ===
+ PFN_vkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV = 0;
+ PFN_vkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV = 0;
+ PFN_vkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV = 0;
};
+ //====================
+ //=== RAII HANDLES ===
+ //====================
+
class Context
{
public:
@@ -1714,6 +2210,7 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ContextDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher.getVkHeaderVersion() == VK_HEADER_VERSION );
return &m_dispatcher;
}
@@ -1770,7 +2267,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- Instance() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ Instance() = default;
+# else
+ Instance() = delete;
+# endif
Instance( Instance const & ) = delete;
Instance( Instance && rhs ) VULKAN_HPP_NOEXCEPT
: m_instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} ) )
@@ -1782,7 +2283,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyInstance( static_cast<VkInstance>( m_instance ), m_allocator );
+ if ( m_instance )
+ {
+ getDispatcher()->vkDestroyInstance( static_cast<VkInstance>( m_instance ), m_allocator );
+ }
m_instance = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_instance, {} );
m_allocator = rhs.m_allocator;
m_dispatcher = rhs.m_dispatcher;
@@ -1790,6 +2294,29 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+ VULKAN_HPP_NAMESPACE::Instance const & operator*() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_instance;
+ }
+
+ VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const
+ {
+ VULKAN_HPP_ASSERT( m_dispatcher.getVkHeaderVersion() == VK_HEADER_VERSION );
+ return &m_dispatcher;
+ }
+
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_instance.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_instance.operator!();
+ }
+# endif
+
//=== VK_VERSION_1_0 ===
VULKAN_HPP_NODISCARD PFN_vkVoidFunction getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT;
@@ -1821,16 +2348,6 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes,
const DebugUtilsMessengerCallbackDataEXT & callbackData ) const VULKAN_HPP_NOEXCEPT;
- VULKAN_HPP_NAMESPACE::Instance const & operator*() const VULKAN_HPP_NOEXCEPT
- {
- return m_instance;
- }
-
- VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const
- {
- return &m_dispatcher;
- }
-
private:
VULKAN_HPP_NAMESPACE::Instance m_instance;
const VkAllocationCallbacks * m_allocator;
@@ -1858,7 +2375,11 @@ namespace VULKAN_HPP_NAMESPACE
: m_physicalDevice( physicalDevice ), m_dispatcher( dispatcher )
{}
- PhysicalDevice() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ PhysicalDevice() = default;
+# else
+ PhysicalDevice() = delete;
+# endif
PhysicalDevice( PhysicalDevice const & ) = delete;
PhysicalDevice( PhysicalDevice && rhs ) VULKAN_HPP_NOEXCEPT
: m_physicalDevice( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, {} ) )
@@ -1875,6 +2396,29 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+ VULKAN_HPP_NAMESPACE::PhysicalDevice const & operator*() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_physicalDevice;
+ }
+
+ VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const
+ {
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
+ return m_dispatcher;
+ }
+
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_physicalDevice.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_physicalDevice.operator!();
+ }
+# endif
+
//=== VK_VERSION_1_0 ===
VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures getFeatures() const VULKAN_HPP_NOEXCEPT;
@@ -2194,16 +2738,6 @@ namespace VULKAN_HPP_NAMESPACE
struct _screen_window & window ) const VULKAN_HPP_NOEXCEPT;
# endif /*VK_USE_PLATFORM_SCREEN_QNX*/
- VULKAN_HPP_NAMESPACE::PhysicalDevice const & operator*() const VULKAN_HPP_NOEXCEPT
- {
- return m_physicalDevice;
- }
-
- VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const
- {
- return m_dispatcher;
- }
-
private:
VULKAN_HPP_NAMESPACE::PhysicalDevice m_physicalDevice;
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * m_dispatcher;
@@ -2245,7 +2779,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- PhysicalDevices() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ PhysicalDevices() = default;
+# else
+ PhysicalDevices() = delete;
+# endif
PhysicalDevices( PhysicalDevices const & ) = delete;
PhysicalDevices( PhysicalDevices && rhs ) = default;
PhysicalDevices & operator=( PhysicalDevices const & ) = delete;
@@ -2301,7 +2839,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- Device() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ Device() = default;
+# else
+ Device() = delete;
+# endif
Device( Device const & ) = delete;
Device( Device && rhs ) VULKAN_HPP_NOEXCEPT
: m_device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} ) )
@@ -2313,7 +2855,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyDevice( static_cast<VkDevice>( m_device ), m_allocator );
+ if ( m_device )
+ {
+ getDispatcher()->vkDestroyDevice( static_cast<VkDevice>( m_device ), m_allocator );
+ }
m_device = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_device, {} );
m_allocator = rhs.m_allocator;
m_dispatcher = rhs.m_dispatcher;
@@ -2321,6 +2866,29 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+ VULKAN_HPP_NAMESPACE::Device const & operator*() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_device;
+ }
+
+ VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
+ {
+ VULKAN_HPP_ASSERT( m_dispatcher.getVkHeaderVersion() == VK_HEADER_VERSION );
+ return &m_dispatcher;
+ }
+
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_device.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_device.operator!();
+ }
+# endif
+
//=== VK_VERSION_1_0 ===
VULKAN_HPP_NODISCARD PFN_vkVoidFunction getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT;
@@ -2716,15 +3284,10 @@ namespace VULKAN_HPP_NAMESPACE
getSemaphoreZirconHandleFUCHSIA( const SemaphoreGetZirconHandleInfoFUCHSIA & getZirconHandleInfo ) const;
# endif /*VK_USE_PLATFORM_FUCHSIA*/
- VULKAN_HPP_NAMESPACE::Device const & operator*() const VULKAN_HPP_NOEXCEPT
- {
- return m_device;
- }
+ //=== VK_NV_external_memory_rdma ===
- VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
- {
- return &m_dispatcher;
- }
+ VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::RemoteAddressNV
+ getMemoryRemoteAddressNV( const MemoryGetRemoteAddressInfoNV & memoryGetRemoteAddressInfo ) const;
private:
VULKAN_HPP_NAMESPACE::Device m_device;
@@ -2784,7 +3347,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- AccelerationStructureKHR() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ AccelerationStructureKHR() = default;
+# else
+ AccelerationStructureKHR() = delete;
+# endif
AccelerationStructureKHR( AccelerationStructureKHR const & ) = delete;
AccelerationStructureKHR( AccelerationStructureKHR && rhs ) VULKAN_HPP_NOEXCEPT
: m_accelerationStructureKHR(
@@ -2798,8 +3365,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyAccelerationStructureKHR(
- m_device, static_cast<VkAccelerationStructureKHR>( m_accelerationStructureKHR ), m_allocator );
+ if ( m_accelerationStructureKHR )
+ {
+ getDispatcher()->vkDestroyAccelerationStructureKHR(
+ m_device, static_cast<VkAccelerationStructureKHR>( m_accelerationStructureKHR ), m_allocator );
+ }
m_accelerationStructureKHR =
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_accelerationStructureKHR, {} );
m_device = rhs.m_device;
@@ -2816,9 +3386,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_accelerationStructureKHR.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_accelerationStructureKHR.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::AccelerationStructureKHR m_accelerationStructureKHR;
VkDevice m_device;
@@ -2878,7 +3461,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- AccelerationStructureNV() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ AccelerationStructureNV() = default;
+# else
+ AccelerationStructureNV() = delete;
+# endif
AccelerationStructureNV( AccelerationStructureNV const & ) = delete;
AccelerationStructureNV( AccelerationStructureNV && rhs ) VULKAN_HPP_NOEXCEPT
: m_accelerationStructureNV(
@@ -2892,8 +3479,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyAccelerationStructureNV(
- m_device, static_cast<VkAccelerationStructureNV>( m_accelerationStructureNV ), m_allocator );
+ if ( m_accelerationStructureNV )
+ {
+ getDispatcher()->vkDestroyAccelerationStructureNV(
+ m_device, static_cast<VkAccelerationStructureNV>( m_accelerationStructureNV ), m_allocator );
+ }
m_accelerationStructureNV =
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_accelerationStructureNV, {} );
m_device = rhs.m_device;
@@ -2903,14 +3493,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_NV_ray_tracing ===
-
- template <typename T>
- VULKAN_HPP_NODISCARD std::vector<T> getHandle( size_t dataSize ) const;
-
- template <typename T>
- VULKAN_HPP_NODISCARD T getHandle() const;
-
VULKAN_HPP_NAMESPACE::AccelerationStructureNV const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_accelerationStructureNV;
@@ -2918,9 +3500,30 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_accelerationStructureNV.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_accelerationStructureNV.operator!();
+ }
+# endif
+
+ //=== VK_NV_ray_tracing ===
+
+ template <typename T>
+ VULKAN_HPP_NODISCARD std::vector<T> getHandle( size_t dataSize ) const;
+
+ template <typename T>
+ VULKAN_HPP_NODISCARD T getHandle() const;
+
private:
VULKAN_HPP_NAMESPACE::AccelerationStructureNV m_accelerationStructureNV;
VkDevice m_device;
@@ -2976,7 +3579,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- Buffer() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ Buffer() = default;
+# else
+ Buffer() = delete;
+# endif
Buffer( Buffer const & ) = delete;
Buffer( Buffer && rhs ) VULKAN_HPP_NOEXCEPT
: m_buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_buffer, {} ) )
@@ -2989,7 +3596,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyBuffer( m_device, static_cast<VkBuffer>( m_buffer ), m_allocator );
+ if ( m_buffer )
+ {
+ getDispatcher()->vkDestroyBuffer( m_device, static_cast<VkBuffer>( m_buffer ), m_allocator );
+ }
m_buffer = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_buffer, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -2998,12 +3608,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_VERSION_1_0 ===
-
- void bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const;
-
- VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements getMemoryRequirements() const VULKAN_HPP_NOEXCEPT;
-
VULKAN_HPP_NAMESPACE::Buffer const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_buffer;
@@ -3011,9 +3615,28 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_buffer.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_buffer.operator!();
+ }
+# endif
+
+ //=== VK_VERSION_1_0 ===
+
+ void bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const;
+
+ VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements getMemoryRequirements() const VULKAN_HPP_NOEXCEPT;
+
private:
VULKAN_HPP_NAMESPACE::Buffer m_buffer;
VkDevice m_device;
@@ -3069,7 +3692,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- BufferView() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ BufferView() = default;
+# else
+ BufferView() = delete;
+# endif
BufferView( BufferView const & ) = delete;
BufferView( BufferView && rhs ) VULKAN_HPP_NOEXCEPT
: m_bufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_bufferView, {} ) )
@@ -3082,7 +3709,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyBufferView( m_device, static_cast<VkBufferView>( m_bufferView ), m_allocator );
+ if ( m_bufferView )
+ {
+ getDispatcher()->vkDestroyBufferView( m_device, static_cast<VkBufferView>( m_bufferView ), m_allocator );
+ }
m_bufferView = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_bufferView, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -3098,9 +3728,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_bufferView.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_bufferView.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::BufferView m_bufferView;
VkDevice m_device;
@@ -3156,7 +3799,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- CommandPool() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ CommandPool() = default;
+# else
+ CommandPool() = delete;
+# endif
CommandPool( CommandPool const & ) = delete;
CommandPool( CommandPool && rhs ) VULKAN_HPP_NOEXCEPT
: m_commandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandPool, {} ) )
@@ -3169,7 +3816,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyCommandPool( m_device, static_cast<VkCommandPool>( m_commandPool ), m_allocator );
+ if ( m_commandPool )
+ {
+ getDispatcher()->vkDestroyCommandPool( m_device, static_cast<VkCommandPool>( m_commandPool ), m_allocator );
+ }
m_commandPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandPool, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -3178,6 +3828,29 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+ VULKAN_HPP_NAMESPACE::CommandPool const & operator*() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_commandPool;
+ }
+
+ VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
+ {
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
+ return m_dispatcher;
+ }
+
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_commandPool.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_commandPool.operator!();
+ }
+# endif
+
//=== VK_VERSION_1_0 ===
void reset( VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const;
@@ -3192,16 +3865,6 @@ namespace VULKAN_HPP_NAMESPACE
void trimKHR( VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const
VULKAN_HPP_NOEXCEPT;
- VULKAN_HPP_NAMESPACE::CommandPool const & operator*() const VULKAN_HPP_NOEXCEPT
- {
- return m_commandPool;
- }
-
- VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
- {
- return m_dispatcher;
- }
-
private:
VULKAN_HPP_NAMESPACE::CommandPool m_commandPool;
VkDevice m_device;
@@ -3245,7 +3908,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- CommandBuffer() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ CommandBuffer() = default;
+# else
+ CommandBuffer() = delete;
+# endif
CommandBuffer( CommandBuffer const & ) = delete;
CommandBuffer( CommandBuffer && rhs ) VULKAN_HPP_NOEXCEPT
: m_commandBuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandBuffer, {} ) )
@@ -3258,8 +3925,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkFreeCommandBuffers(
- m_device, m_commandPool, 1, reinterpret_cast<VkCommandBuffer const *>( &m_commandBuffer ) );
+ if ( m_commandBuffer )
+ {
+ getDispatcher()->vkFreeCommandBuffers(
+ m_device, m_commandPool, 1, reinterpret_cast<VkCommandBuffer const *>( &m_commandBuffer ) );
+ }
m_commandBuffer = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_commandBuffer, {} );
m_device = rhs.m_device;
m_commandPool = rhs.m_commandPool;
@@ -3268,6 +3938,29 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+ VULKAN_HPP_NAMESPACE::CommandBuffer const & operator*() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_commandBuffer;
+ }
+
+ VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
+ {
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
+ return m_dispatcher;
+ }
+
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_commandBuffer.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_commandBuffer.operator!();
+ }
+# endif
+
//=== VK_VERSION_1_0 ===
void begin( const CommandBufferBeginInfo & beginInfo ) const;
@@ -3408,10 +4101,12 @@ namespace VULKAN_HPP_NAMESPACE
ArrayProxy<const VULKAN_HPP_NAMESPACE::ImageResolve> const & regions ) const VULKAN_HPP_NOEXCEPT;
void setEvent( VULKAN_HPP_NAMESPACE::Event event,
- VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask
+ VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
void resetEvent( VULKAN_HPP_NAMESPACE::Event event,
- VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask ) const VULKAN_HPP_NOEXCEPT;
+ VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask
+ VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
void waitEvents( ArrayProxy<const VULKAN_HPP_NAMESPACE::Event> const & events,
VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask,
@@ -3925,6 +4620,11 @@ namespace VULKAN_HPP_NAMESPACE
void subpassShadingHUAWEI() const VULKAN_HPP_NOEXCEPT;
+ //=== VK_HUAWEI_invocation_mask ===
+
+ void bindInvocationMaskHUAWEI( VULKAN_HPP_NAMESPACE::ImageView imageView,
+ VULKAN_HPP_NAMESPACE::ImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT;
+
//=== VK_EXT_extended_dynamic_state2 ===
void setPatchControlPointsEXT( uint32_t patchControlPoints ) const VULKAN_HPP_NOEXCEPT;
@@ -3958,16 +4658,6 @@ namespace VULKAN_HPP_NAMESPACE
Optional<const int32_t> vertexOffset
VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
- VULKAN_HPP_NAMESPACE::CommandBuffer const & operator*() const VULKAN_HPP_NOEXCEPT
- {
- return m_commandBuffer;
- }
-
- VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
- {
- return m_dispatcher;
- }
-
private:
VULKAN_HPP_NAMESPACE::CommandBuffer m_commandBuffer;
VkDevice m_device;
@@ -4004,7 +4694,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- CommandBuffers() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ CommandBuffers() = default;
+# else
+ CommandBuffers() = delete;
+# endif
CommandBuffers( CommandBuffers const & ) = delete;
CommandBuffers( CommandBuffers && rhs ) = default;
CommandBuffers & operator=( CommandBuffers const & ) = delete;
@@ -4062,7 +4756,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- CuFunctionNVX() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ CuFunctionNVX() = default;
+# else
+ CuFunctionNVX() = delete;
+# endif
CuFunctionNVX( CuFunctionNVX const & ) = delete;
CuFunctionNVX( CuFunctionNVX && rhs ) VULKAN_HPP_NOEXCEPT
: m_cuFunctionNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_cuFunctionNVX, {} ) )
@@ -4075,8 +4773,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyCuFunctionNVX(
- m_device, static_cast<VkCuFunctionNVX>( m_cuFunctionNVX ), m_allocator );
+ if ( m_cuFunctionNVX )
+ {
+ getDispatcher()->vkDestroyCuFunctionNVX(
+ m_device, static_cast<VkCuFunctionNVX>( m_cuFunctionNVX ), m_allocator );
+ }
m_cuFunctionNVX = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_cuFunctionNVX, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -4092,9 +4793,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_cuFunctionNVX.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_cuFunctionNVX.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::CuFunctionNVX m_cuFunctionNVX;
VkDevice m_device;
@@ -4150,7 +4864,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- CuModuleNVX() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ CuModuleNVX() = default;
+# else
+ CuModuleNVX() = delete;
+# endif
CuModuleNVX( CuModuleNVX const & ) = delete;
CuModuleNVX( CuModuleNVX && rhs ) VULKAN_HPP_NOEXCEPT
: m_cuModuleNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_cuModuleNVX, {} ) )
@@ -4163,7 +4881,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyCuModuleNVX( m_device, static_cast<VkCuModuleNVX>( m_cuModuleNVX ), m_allocator );
+ if ( m_cuModuleNVX )
+ {
+ getDispatcher()->vkDestroyCuModuleNVX( m_device, static_cast<VkCuModuleNVX>( m_cuModuleNVX ), m_allocator );
+ }
m_cuModuleNVX = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_cuModuleNVX, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -4179,9 +4900,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_cuModuleNVX.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_cuModuleNVX.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::CuModuleNVX m_cuModuleNVX;
VkDevice m_device;
@@ -4241,7 +4975,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- DebugReportCallbackEXT() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ DebugReportCallbackEXT() = default;
+# else
+ DebugReportCallbackEXT() = delete;
+# endif
DebugReportCallbackEXT( DebugReportCallbackEXT const & ) = delete;
DebugReportCallbackEXT( DebugReportCallbackEXT && rhs ) VULKAN_HPP_NOEXCEPT
: m_debugReportCallbackEXT(
@@ -4255,8 +4993,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyDebugReportCallbackEXT(
- m_instance, static_cast<VkDebugReportCallbackEXT>( m_debugReportCallbackEXT ), m_allocator );
+ if ( m_debugReportCallbackEXT )
+ {
+ getDispatcher()->vkDestroyDebugReportCallbackEXT(
+ m_instance, static_cast<VkDebugReportCallbackEXT>( m_debugReportCallbackEXT ), m_allocator );
+ }
m_debugReportCallbackEXT =
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_debugReportCallbackEXT, {} );
m_instance = rhs.m_instance;
@@ -4273,9 +5014,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_debugReportCallbackEXT.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_debugReportCallbackEXT.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT m_debugReportCallbackEXT;
VkInstance m_instance;
@@ -4335,7 +5089,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- DebugUtilsMessengerEXT() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ DebugUtilsMessengerEXT() = default;
+# else
+ DebugUtilsMessengerEXT() = delete;
+# endif
DebugUtilsMessengerEXT( DebugUtilsMessengerEXT const & ) = delete;
DebugUtilsMessengerEXT( DebugUtilsMessengerEXT && rhs ) VULKAN_HPP_NOEXCEPT
: m_debugUtilsMessengerEXT(
@@ -4349,8 +5107,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyDebugUtilsMessengerEXT(
- m_instance, static_cast<VkDebugUtilsMessengerEXT>( m_debugUtilsMessengerEXT ), m_allocator );
+ if ( m_debugUtilsMessengerEXT )
+ {
+ getDispatcher()->vkDestroyDebugUtilsMessengerEXT(
+ m_instance, static_cast<VkDebugUtilsMessengerEXT>( m_debugUtilsMessengerEXT ), m_allocator );
+ }
m_debugUtilsMessengerEXT =
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_debugUtilsMessengerEXT, {} );
m_instance = rhs.m_instance;
@@ -4367,9 +5128,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_debugUtilsMessengerEXT.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_debugUtilsMessengerEXT.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT m_debugUtilsMessengerEXT;
VkInstance m_instance;
@@ -4427,7 +5201,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- DeferredOperationKHR() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ DeferredOperationKHR() = default;
+# else
+ DeferredOperationKHR() = delete;
+# endif
DeferredOperationKHR( DeferredOperationKHR const & ) = delete;
DeferredOperationKHR( DeferredOperationKHR && rhs ) VULKAN_HPP_NOEXCEPT
: m_deferredOperationKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_deferredOperationKHR,
@@ -4441,8 +5219,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyDeferredOperationKHR(
- m_device, static_cast<VkDeferredOperationKHR>( m_deferredOperationKHR ), m_allocator );
+ if ( m_deferredOperationKHR )
+ {
+ getDispatcher()->vkDestroyDeferredOperationKHR(
+ m_device, static_cast<VkDeferredOperationKHR>( m_deferredOperationKHR ), m_allocator );
+ }
m_deferredOperationKHR =
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_deferredOperationKHR, {} );
m_device = rhs.m_device;
@@ -4452,14 +5233,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_KHR_deferred_host_operations ===
-
- VULKAN_HPP_NODISCARD uint32_t getMaxConcurrency() const VULKAN_HPP_NOEXCEPT;
-
- VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getResult() const VULKAN_HPP_NOEXCEPT;
-
- VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result join() const;
-
VULKAN_HPP_NAMESPACE::DeferredOperationKHR const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_deferredOperationKHR;
@@ -4467,9 +5240,30 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_deferredOperationKHR.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_deferredOperationKHR.operator!();
+ }
+# endif
+
+ //=== VK_KHR_deferred_host_operations ===
+
+ VULKAN_HPP_NODISCARD uint32_t getMaxConcurrency() const VULKAN_HPP_NOEXCEPT;
+
+ VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getResult() const VULKAN_HPP_NOEXCEPT;
+
+ VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result join() const;
+
private:
VULKAN_HPP_NAMESPACE::DeferredOperationKHR m_deferredOperationKHR;
VkDevice m_device;
@@ -4528,7 +5322,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- DescriptorPool() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ DescriptorPool() = default;
+# else
+ DescriptorPool() = delete;
+# endif
DescriptorPool( DescriptorPool const & ) = delete;
DescriptorPool( DescriptorPool && rhs ) VULKAN_HPP_NOEXCEPT
: m_descriptorPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorPool, {} ) )
@@ -4541,8 +5339,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyDescriptorPool(
- m_device, static_cast<VkDescriptorPool>( m_descriptorPool ), m_allocator );
+ if ( m_descriptorPool )
+ {
+ getDispatcher()->vkDestroyDescriptorPool(
+ m_device, static_cast<VkDescriptorPool>( m_descriptorPool ), m_allocator );
+ }
m_descriptorPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorPool, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -4551,11 +5352,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_VERSION_1_0 ===
-
- void reset( VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const
- VULKAN_HPP_NOEXCEPT;
-
VULKAN_HPP_NAMESPACE::DescriptorPool const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_descriptorPool;
@@ -4563,9 +5359,27 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_descriptorPool.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_descriptorPool.operator!();
+ }
+# endif
+
+ //=== VK_VERSION_1_0 ===
+
+ void reset( VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const
+ VULKAN_HPP_NOEXCEPT;
+
private:
VULKAN_HPP_NAMESPACE::DescriptorPool m_descriptorPool;
VkDevice m_device;
@@ -4612,7 +5426,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- DescriptorSet() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ DescriptorSet() = default;
+# else
+ DescriptorSet() = delete;
+# endif
DescriptorSet( DescriptorSet const & ) = delete;
DescriptorSet( DescriptorSet && rhs ) VULKAN_HPP_NOEXCEPT
: m_descriptorSet( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSet, {} ) )
@@ -4625,8 +5443,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkFreeDescriptorSets(
- m_device, m_descriptorPool, 1, reinterpret_cast<VkDescriptorSet const *>( &m_descriptorSet ) );
+ if ( m_descriptorSet )
+ {
+ getDispatcher()->vkFreeDescriptorSets(
+ m_device, m_descriptorPool, 1, reinterpret_cast<VkDescriptorSet const *>( &m_descriptorSet ) );
+ }
m_descriptorSet = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSet, {} );
m_device = rhs.m_device;
m_descriptorPool = rhs.m_descriptorPool;
@@ -4635,16 +5456,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_VERSION_1_1 ===
-
- void updateWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate,
- const void * pData ) const VULKAN_HPP_NOEXCEPT;
-
- //=== VK_KHR_descriptor_update_template ===
-
- void updateWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate,
- const void * pData ) const VULKAN_HPP_NOEXCEPT;
-
VULKAN_HPP_NAMESPACE::DescriptorSet const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_descriptorSet;
@@ -4652,9 +5463,32 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_descriptorSet.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_descriptorSet.operator!();
+ }
+# endif
+
+ //=== VK_VERSION_1_1 ===
+
+ void updateWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate,
+ const void * pData ) const VULKAN_HPP_NOEXCEPT;
+
+ //=== VK_KHR_descriptor_update_template ===
+
+ void updateWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate,
+ const void * pData ) const VULKAN_HPP_NOEXCEPT;
+
private:
VULKAN_HPP_NAMESPACE::DescriptorSet m_descriptorSet;
VkDevice m_device;
@@ -4691,7 +5525,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- DescriptorSets() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ DescriptorSets() = default;
+# else
+ DescriptorSets() = delete;
+# endif
DescriptorSets( DescriptorSets const & ) = delete;
DescriptorSets( DescriptorSets && rhs ) = default;
DescriptorSets & operator=( DescriptorSets const & ) = delete;
@@ -4750,7 +5588,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- DescriptorSetLayout() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ DescriptorSetLayout() = default;
+# else
+ DescriptorSetLayout() = delete;
+# endif
DescriptorSetLayout( DescriptorSetLayout const & ) = delete;
DescriptorSetLayout( DescriptorSetLayout && rhs ) VULKAN_HPP_NOEXCEPT
: m_descriptorSetLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSetLayout,
@@ -4764,8 +5606,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyDescriptorSetLayout(
- m_device, static_cast<VkDescriptorSetLayout>( m_descriptorSetLayout ), m_allocator );
+ if ( m_descriptorSetLayout )
+ {
+ getDispatcher()->vkDestroyDescriptorSetLayout(
+ m_device, static_cast<VkDescriptorSetLayout>( m_descriptorSetLayout ), m_allocator );
+ }
m_descriptorSetLayout =
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorSetLayout, {} );
m_device = rhs.m_device;
@@ -4782,9 +5627,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_descriptorSetLayout.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_descriptorSetLayout.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::DescriptorSetLayout m_descriptorSetLayout;
VkDevice m_device;
@@ -4844,7 +5702,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- DescriptorUpdateTemplate() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ DescriptorUpdateTemplate() = default;
+# else
+ DescriptorUpdateTemplate() = delete;
+# endif
DescriptorUpdateTemplate( DescriptorUpdateTemplate const & ) = delete;
DescriptorUpdateTemplate( DescriptorUpdateTemplate && rhs ) VULKAN_HPP_NOEXCEPT
: m_descriptorUpdateTemplate(
@@ -4858,8 +5720,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyDescriptorUpdateTemplate(
- m_device, static_cast<VkDescriptorUpdateTemplate>( m_descriptorUpdateTemplate ), m_allocator );
+ if ( m_descriptorUpdateTemplate )
+ {
+ getDispatcher()->vkDestroyDescriptorUpdateTemplate(
+ m_device, static_cast<VkDescriptorUpdateTemplate>( m_descriptorUpdateTemplate ), m_allocator );
+ }
m_descriptorUpdateTemplate =
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_descriptorUpdateTemplate, {} );
m_device = rhs.m_device;
@@ -4876,9 +5741,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_descriptorUpdateTemplate.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_descriptorUpdateTemplate.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate m_descriptorUpdateTemplate;
VkDevice m_device;
@@ -4936,7 +5814,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- DeviceMemory() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ DeviceMemory() = default;
+# else
+ DeviceMemory() = delete;
+# endif
DeviceMemory( DeviceMemory const & ) = delete;
DeviceMemory( DeviceMemory && rhs ) VULKAN_HPP_NOEXCEPT
: m_deviceMemory( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_deviceMemory, {} ) )
@@ -4949,7 +5831,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkFreeMemory( m_device, static_cast<VkDeviceMemory>( m_deviceMemory ), m_allocator );
+ if ( m_deviceMemory )
+ {
+ getDispatcher()->vkFreeMemory( m_device, static_cast<VkDeviceMemory>( m_deviceMemory ), m_allocator );
+ }
m_deviceMemory = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_deviceMemory, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -4958,6 +5843,29 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+ VULKAN_HPP_NAMESPACE::DeviceMemory const & operator*() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_deviceMemory;
+ }
+
+ VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
+ {
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
+ return m_dispatcher;
+ }
+
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_deviceMemory.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_deviceMemory.operator!();
+ }
+# endif
+
//=== VK_VERSION_1_0 ===
VULKAN_HPP_NODISCARD void *
@@ -4976,16 +5884,6 @@ namespace VULKAN_HPP_NAMESPACE
getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType ) const;
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- VULKAN_HPP_NAMESPACE::DeviceMemory const & operator*() const VULKAN_HPP_NOEXCEPT
- {
- return m_deviceMemory;
- }
-
- VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
- {
- return m_dispatcher;
- }
-
private:
VULKAN_HPP_NAMESPACE::DeviceMemory m_deviceMemory;
VkDevice m_device;
@@ -5075,7 +5973,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- DisplayKHR() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ DisplayKHR() = default;
+# else
+ DisplayKHR() = delete;
+# endif
DisplayKHR( DisplayKHR const & ) = delete;
DisplayKHR( DisplayKHR && rhs ) VULKAN_HPP_NOEXCEPT
: m_displayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_displayKHR, {} ) )
@@ -5087,7 +5989,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkReleaseDisplayEXT( m_physicalDevice, static_cast<VkDisplayKHR>( m_displayKHR ) );
+ if ( m_displayKHR )
+ {
+ getDispatcher()->vkReleaseDisplayEXT( m_physicalDevice, static_cast<VkDisplayKHR>( m_displayKHR ) );
+ }
m_displayKHR = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_displayKHR, {} );
m_physicalDevice = rhs.m_physicalDevice;
m_dispatcher = rhs.m_dispatcher;
@@ -5095,6 +6000,29 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+ VULKAN_HPP_NAMESPACE::DisplayKHR const & operator*() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_displayKHR;
+ }
+
+ VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const
+ {
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
+ return m_dispatcher;
+ }
+
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_displayKHR.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_displayKHR.operator!();
+ }
+# endif
+
//=== VK_KHR_display ===
VULKAN_HPP_NODISCARD std::vector<VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR> getModeProperties() const;
@@ -5109,16 +6037,6 @@ namespace VULKAN_HPP_NAMESPACE
void acquireWinrtNV() const;
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- VULKAN_HPP_NAMESPACE::DisplayKHR const & operator*() const VULKAN_HPP_NOEXCEPT
- {
- return m_displayKHR;
- }
-
- VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const
- {
- return m_dispatcher;
- }
-
private:
VULKAN_HPP_NAMESPACE::DisplayKHR m_displayKHR;
VkPhysicalDevice m_physicalDevice;
@@ -5162,7 +6080,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- DisplayKHRs() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ DisplayKHRs() = default;
+# else
+ DisplayKHRs() = delete;
+# endif
DisplayKHRs( DisplayKHRs const & ) = delete;
DisplayKHRs( DisplayKHRs && rhs ) = default;
DisplayKHRs & operator=( DisplayKHRs const & ) = delete;
@@ -5208,7 +6130,11 @@ namespace VULKAN_HPP_NAMESPACE
, m_dispatcher( physicalDevice.getDispatcher() )
{}
- DisplayModeKHR() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ DisplayModeKHR() = default;
+# else
+ DisplayModeKHR() = delete;
+# endif
DisplayModeKHR( DisplayModeKHR const & ) = delete;
DisplayModeKHR( DisplayModeKHR && rhs ) VULKAN_HPP_NOEXCEPT
: m_displayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_displayModeKHR, {} ) )
@@ -5225,11 +6151,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_KHR_display ===
-
- VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR
- getDisplayPlaneCapabilities( uint32_t planeIndex ) const;
-
VULKAN_HPP_NAMESPACE::DisplayModeKHR const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_displayModeKHR;
@@ -5237,9 +6158,27 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_displayModeKHR.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_displayModeKHR.operator!();
+ }
+# endif
+
+ //=== VK_KHR_display ===
+
+ VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR
+ getDisplayPlaneCapabilities( uint32_t planeIndex ) const;
+
private:
VULKAN_HPP_NAMESPACE::DisplayModeKHR m_displayModeKHR;
VULKAN_HPP_NAMESPACE::PhysicalDevice m_physicalDevice;
@@ -5294,7 +6233,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- Event() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ Event() = default;
+# else
+ Event() = delete;
+# endif
Event( Event const & ) = delete;
Event( Event && rhs ) VULKAN_HPP_NOEXCEPT
: m_event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_event, {} ) )
@@ -5307,7 +6250,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyEvent( m_device, static_cast<VkEvent>( m_event ), m_allocator );
+ if ( m_event )
+ {
+ getDispatcher()->vkDestroyEvent( m_device, static_cast<VkEvent>( m_event ), m_allocator );
+ }
m_event = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_event, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -5316,14 +6262,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_VERSION_1_0 ===
-
- VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getStatus() const;
-
- void set() const;
-
- void reset() const;
-
VULKAN_HPP_NAMESPACE::Event const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_event;
@@ -5331,9 +6269,30 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_event.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_event.operator!();
+ }
+# endif
+
+ //=== VK_VERSION_1_0 ===
+
+ VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getStatus() const;
+
+ void set() const;
+
+ void reset() const;
+
private:
VULKAN_HPP_NAMESPACE::Event m_event;
VkDevice m_device;
@@ -5430,7 +6389,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- Fence() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ Fence() = default;
+# else
+ Fence() = delete;
+# endif
Fence( Fence const & ) = delete;
Fence( Fence && rhs ) VULKAN_HPP_NOEXCEPT
: m_fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_fence, {} ) )
@@ -5443,7 +6406,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyFence( m_device, static_cast<VkFence>( m_fence ), m_allocator );
+ if ( m_fence )
+ {
+ getDispatcher()->vkDestroyFence( m_device, static_cast<VkFence>( m_fence ), m_allocator );
+ }
m_fence = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_fence, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -5452,10 +6418,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_VERSION_1_0 ===
-
- VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getStatus() const;
-
VULKAN_HPP_NAMESPACE::Fence const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_fence;
@@ -5463,9 +6425,26 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_fence.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_fence.operator!();
+ }
+# endif
+
+ //=== VK_VERSION_1_0 ===
+
+ VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getStatus() const;
+
private:
VULKAN_HPP_NAMESPACE::Fence m_fence;
VkDevice m_device;
@@ -5521,7 +6500,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- Framebuffer() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ Framebuffer() = default;
+# else
+ Framebuffer() = delete;
+# endif
Framebuffer( Framebuffer const & ) = delete;
Framebuffer( Framebuffer && rhs ) VULKAN_HPP_NOEXCEPT
: m_framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_framebuffer, {} ) )
@@ -5534,7 +6517,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyFramebuffer( m_device, static_cast<VkFramebuffer>( m_framebuffer ), m_allocator );
+ if ( m_framebuffer )
+ {
+ getDispatcher()->vkDestroyFramebuffer( m_device, static_cast<VkFramebuffer>( m_framebuffer ), m_allocator );
+ }
m_framebuffer = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_framebuffer, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -5550,9 +6536,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_framebuffer.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_framebuffer.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::Framebuffer m_framebuffer;
VkDevice m_device;
@@ -5608,7 +6607,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- Image() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ Image() = default;
+# else
+ Image() = delete;
+# endif
Image( Image const & ) = delete;
Image( Image && rhs ) VULKAN_HPP_NOEXCEPT
: m_image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_image, {} ) )
@@ -5621,7 +6624,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyImage( m_device, static_cast<VkImage>( m_image ), m_allocator );
+ if ( m_image )
+ {
+ getDispatcher()->vkDestroyImage( m_device, static_cast<VkImage>( m_image ), m_allocator );
+ }
m_image = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_image, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -5630,6 +6636,29 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+ VULKAN_HPP_NAMESPACE::Image const & operator*() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_image;
+ }
+
+ VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
+ {
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
+ return m_dispatcher;
+ }
+
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_image.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_image.operator!();
+ }
+# endif
+
//=== VK_VERSION_1_0 ===
void bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const;
@@ -5647,16 +6676,6 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT
getDrmFormatModifierPropertiesEXT() const;
- VULKAN_HPP_NAMESPACE::Image const & operator*() const VULKAN_HPP_NOEXCEPT
- {
- return m_image;
- }
-
- VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
- {
- return m_dispatcher;
- }
-
private:
VULKAN_HPP_NAMESPACE::Image m_image;
VkDevice m_device;
@@ -5712,7 +6731,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- ImageView() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ ImageView() = default;
+# else
+ ImageView() = delete;
+# endif
ImageView( ImageView const & ) = delete;
ImageView( ImageView && rhs ) VULKAN_HPP_NOEXCEPT
: m_imageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_imageView, {} ) )
@@ -5725,7 +6748,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyImageView( m_device, static_cast<VkImageView>( m_imageView ), m_allocator );
+ if ( m_imageView )
+ {
+ getDispatcher()->vkDestroyImageView( m_device, static_cast<VkImageView>( m_imageView ), m_allocator );
+ }
m_imageView = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_imageView, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -5734,10 +6760,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_NVX_image_view_handle ===
-
- VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX getAddressNVX() const;
-
VULKAN_HPP_NAMESPACE::ImageView const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_imageView;
@@ -5745,9 +6767,26 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_imageView.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_imageView.operator!();
+ }
+# endif
+
+ //=== VK_NVX_image_view_handle ===
+
+ VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX getAddressNVX() const;
+
private:
VULKAN_HPP_NAMESPACE::ImageView m_imageView;
VkDevice m_device;
@@ -5807,7 +6846,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- IndirectCommandsLayoutNV() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ IndirectCommandsLayoutNV() = default;
+# else
+ IndirectCommandsLayoutNV() = delete;
+# endif
IndirectCommandsLayoutNV( IndirectCommandsLayoutNV const & ) = delete;
IndirectCommandsLayoutNV( IndirectCommandsLayoutNV && rhs ) VULKAN_HPP_NOEXCEPT
: m_indirectCommandsLayoutNV(
@@ -5821,8 +6864,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyIndirectCommandsLayoutNV(
- m_device, static_cast<VkIndirectCommandsLayoutNV>( m_indirectCommandsLayoutNV ), m_allocator );
+ if ( m_indirectCommandsLayoutNV )
+ {
+ getDispatcher()->vkDestroyIndirectCommandsLayoutNV(
+ m_device, static_cast<VkIndirectCommandsLayoutNV>( m_indirectCommandsLayoutNV ), m_allocator );
+ }
m_indirectCommandsLayoutNV =
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_indirectCommandsLayoutNV, {} );
m_device = rhs.m_device;
@@ -5839,9 +6885,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_indirectCommandsLayoutNV.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_indirectCommandsLayoutNV.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV m_indirectCommandsLayoutNV;
VkDevice m_device;
@@ -5892,7 +6951,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- PerformanceConfigurationINTEL() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ PerformanceConfigurationINTEL() = default;
+# else
+ PerformanceConfigurationINTEL() = delete;
+# endif
PerformanceConfigurationINTEL( PerformanceConfigurationINTEL const & ) = delete;
PerformanceConfigurationINTEL( PerformanceConfigurationINTEL && rhs ) VULKAN_HPP_NOEXCEPT
: m_performanceConfigurationINTEL(
@@ -5905,8 +6968,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkReleasePerformanceConfigurationINTEL(
- m_device, static_cast<VkPerformanceConfigurationINTEL>( m_performanceConfigurationINTEL ) );
+ if ( m_performanceConfigurationINTEL )
+ {
+ getDispatcher()->vkReleasePerformanceConfigurationINTEL(
+ m_device, static_cast<VkPerformanceConfigurationINTEL>( m_performanceConfigurationINTEL ) );
+ }
m_performanceConfigurationINTEL =
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_performanceConfigurationINTEL, {} );
m_device = rhs.m_device;
@@ -5922,9 +6988,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_performanceConfigurationINTEL.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_performanceConfigurationINTEL.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL m_performanceConfigurationINTEL;
VkDevice m_device;
@@ -5982,7 +7061,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- PipelineCache() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ PipelineCache() = default;
+# else
+ PipelineCache() = delete;
+# endif
PipelineCache( PipelineCache const & ) = delete;
PipelineCache( PipelineCache && rhs ) VULKAN_HPP_NOEXCEPT
: m_pipelineCache( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineCache, {} ) )
@@ -5995,8 +7078,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyPipelineCache(
- m_device, static_cast<VkPipelineCache>( m_pipelineCache ), m_allocator );
+ if ( m_pipelineCache )
+ {
+ getDispatcher()->vkDestroyPipelineCache(
+ m_device, static_cast<VkPipelineCache>( m_pipelineCache ), m_allocator );
+ }
m_pipelineCache = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineCache, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -6005,12 +7091,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_VERSION_1_0 ===
-
- VULKAN_HPP_NODISCARD std::vector<uint8_t> getData() const;
-
- void merge( ArrayProxy<const VULKAN_HPP_NAMESPACE::PipelineCache> const & srcCaches ) const;
-
VULKAN_HPP_NAMESPACE::PipelineCache const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_pipelineCache;
@@ -6018,9 +7098,28 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_pipelineCache.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_pipelineCache.operator!();
+ }
+# endif
+
+ //=== VK_VERSION_1_0 ===
+
+ VULKAN_HPP_NODISCARD std::vector<uint8_t> getData() const;
+
+ void merge( ArrayProxy<const VULKAN_HPP_NAMESPACE::PipelineCache> const & srcCaches ) const;
+
private:
VULKAN_HPP_NAMESPACE::PipelineCache m_pipelineCache;
VkDevice m_device;
@@ -6177,7 +7276,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- Pipeline() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ Pipeline() = default;
+# else
+ Pipeline() = delete;
+# endif
Pipeline( Pipeline const & ) = delete;
Pipeline( Pipeline && rhs ) VULKAN_HPP_NOEXCEPT
: m_pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipeline, {} ) )
@@ -6190,7 +7293,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyPipeline( m_device, static_cast<VkPipeline>( m_pipeline ), m_allocator );
+ if ( m_pipeline )
+ {
+ getDispatcher()->vkDestroyPipeline( m_device, static_cast<VkPipeline>( m_pipeline ), m_allocator );
+ }
m_pipeline = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipeline, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -6199,6 +7305,34 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+ VULKAN_HPP_NAMESPACE::Pipeline const & operator*() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_pipeline;
+ }
+
+ VULKAN_HPP_NAMESPACE::Result getConstructorSuccessCode() const
+ {
+ return m_constructorSuccessCode;
+ }
+
+ VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
+ {
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
+ return m_dispatcher;
+ }
+
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_pipeline.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_pipeline.operator!();
+ }
+# endif
+
//=== VK_AMD_shader_info ===
VULKAN_HPP_NODISCARD std::vector<uint8_t>
@@ -6237,21 +7371,6 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceSize getRayTracingShaderGroupStackSizeKHR(
uint32_t group, VULKAN_HPP_NAMESPACE::ShaderGroupShaderKHR groupShader ) const VULKAN_HPP_NOEXCEPT;
- VULKAN_HPP_NAMESPACE::Pipeline const & operator*() const VULKAN_HPP_NOEXCEPT
- {
- return m_pipeline;
- }
-
- VULKAN_HPP_NAMESPACE::Result getConstructorSuccessCode() const
- {
- return m_constructorSuccessCode;
- }
-
- VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
- {
- return m_dispatcher;
- }
-
private:
VULKAN_HPP_NAMESPACE::Pipeline m_pipeline;
VkDevice m_device;
@@ -6420,7 +7539,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- Pipelines() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ Pipelines() = default;
+# else
+ Pipelines() = delete;
+# endif
Pipelines( Pipelines const & ) = delete;
Pipelines( Pipelines && rhs ) = default;
Pipelines & operator=( Pipelines const & ) = delete;
@@ -6478,7 +7601,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- PipelineLayout() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ PipelineLayout() = default;
+# else
+ PipelineLayout() = delete;
+# endif
PipelineLayout( PipelineLayout const & ) = delete;
PipelineLayout( PipelineLayout && rhs ) VULKAN_HPP_NOEXCEPT
: m_pipelineLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineLayout, {} ) )
@@ -6491,8 +7618,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyPipelineLayout(
- m_device, static_cast<VkPipelineLayout>( m_pipelineLayout ), m_allocator );
+ if ( m_pipelineLayout )
+ {
+ getDispatcher()->vkDestroyPipelineLayout(
+ m_device, static_cast<VkPipelineLayout>( m_pipelineLayout ), m_allocator );
+ }
m_pipelineLayout = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_pipelineLayout, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -6508,9 +7638,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_pipelineLayout.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_pipelineLayout.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::PipelineLayout m_pipelineLayout;
VkDevice m_device;
@@ -6570,7 +7713,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- PrivateDataSlotEXT() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ PrivateDataSlotEXT() = default;
+# else
+ PrivateDataSlotEXT() = delete;
+# endif
PrivateDataSlotEXT( PrivateDataSlotEXT const & ) = delete;
PrivateDataSlotEXT( PrivateDataSlotEXT && rhs ) VULKAN_HPP_NOEXCEPT
: m_privateDataSlotEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_privateDataSlotEXT,
@@ -6584,8 +7731,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyPrivateDataSlotEXT(
- m_device, static_cast<VkPrivateDataSlotEXT>( m_privateDataSlotEXT ), m_allocator );
+ if ( m_privateDataSlotEXT )
+ {
+ getDispatcher()->vkDestroyPrivateDataSlotEXT(
+ m_device, static_cast<VkPrivateDataSlotEXT>( m_privateDataSlotEXT ), m_allocator );
+ }
m_privateDataSlotEXT =
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_privateDataSlotEXT, {} );
m_device = rhs.m_device;
@@ -6602,9 +7752,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_privateDataSlotEXT.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_privateDataSlotEXT.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::PrivateDataSlotEXT m_privateDataSlotEXT;
VkDevice m_device;
@@ -6660,7 +7823,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- QueryPool() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ QueryPool() = default;
+# else
+ QueryPool() = delete;
+# endif
QueryPool( QueryPool const & ) = delete;
QueryPool( QueryPool && rhs ) VULKAN_HPP_NOEXCEPT
: m_queryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queryPool, {} ) )
@@ -6673,7 +7840,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( m_queryPool ), m_allocator );
+ if ( m_queryPool )
+ {
+ getDispatcher()->vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( m_queryPool ), m_allocator );
+ }
m_queryPool = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queryPool, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -6682,6 +7852,29 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+ VULKAN_HPP_NAMESPACE::QueryPool const & operator*() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_queryPool;
+ }
+
+ VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
+ {
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
+ return m_dispatcher;
+ }
+
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_queryPool.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_queryPool.operator!();
+ }
+# endif
+
//=== VK_VERSION_1_0 ===
template <typename T>
@@ -6707,16 +7900,6 @@ namespace VULKAN_HPP_NAMESPACE
void resetEXT( uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT;
- VULKAN_HPP_NAMESPACE::QueryPool const & operator*() const VULKAN_HPP_NOEXCEPT
- {
- return m_queryPool;
- }
-
- VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
- {
- return m_dispatcher;
- }
-
private:
VULKAN_HPP_NAMESPACE::QueryPool m_queryPool;
VkDevice m_device;
@@ -6757,7 +7940,11 @@ namespace VULKAN_HPP_NAMESPACE
: m_queue( queue ), m_dispatcher( device.getDispatcher() )
{}
- Queue() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ Queue() = default;
+# else
+ Queue() = delete;
+# endif
Queue( Queue const & ) = delete;
Queue( Queue && rhs ) VULKAN_HPP_NOEXCEPT
: m_queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queue, {} ) )
@@ -6774,6 +7961,29 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+ VULKAN_HPP_NAMESPACE::Queue const & operator*() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_queue;
+ }
+
+ VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
+ {
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
+ return m_dispatcher;
+ }
+
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_queue.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_queue.operator!();
+ }
+# endif
+
//=== VK_VERSION_1_0 ===
void submit( ArrayProxy<const VULKAN_HPP_NAMESPACE::SubmitInfo> const & submits,
@@ -6813,16 +8023,6 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NODISCARD std::vector<VULKAN_HPP_NAMESPACE::CheckpointData2NV>
getCheckpointData2NV() const VULKAN_HPP_NOEXCEPT;
- VULKAN_HPP_NAMESPACE::Queue const & operator*() const VULKAN_HPP_NOEXCEPT
- {
- return m_queue;
- }
-
- VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
- {
- return m_dispatcher;
- }
-
private:
VULKAN_HPP_NAMESPACE::Queue m_queue;
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * m_dispatcher;
@@ -6895,7 +8095,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- RenderPass() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ RenderPass() = default;
+# else
+ RenderPass() = delete;
+# endif
RenderPass( RenderPass const & ) = delete;
RenderPass( RenderPass && rhs ) VULKAN_HPP_NOEXCEPT
: m_renderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_renderPass, {} ) )
@@ -6908,7 +8112,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyRenderPass( m_device, static_cast<VkRenderPass>( m_renderPass ), m_allocator );
+ if ( m_renderPass )
+ {
+ getDispatcher()->vkDestroyRenderPass( m_device, static_cast<VkRenderPass>( m_renderPass ), m_allocator );
+ }
m_renderPass = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_renderPass, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -6917,15 +8124,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_VERSION_1_0 ===
-
- VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Extent2D getRenderAreaGranularity() const VULKAN_HPP_NOEXCEPT;
-
- //=== VK_HUAWEI_subpass_shading ===
-
- VULKAN_HPP_NODISCARD std::pair<VULKAN_HPP_NAMESPACE::Result, VULKAN_HPP_NAMESPACE::Extent2D>
- getSubpassShadingMaxWorkgroupSizeHUAWEI() const;
-
VULKAN_HPP_NAMESPACE::RenderPass const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_renderPass;
@@ -6933,9 +8131,31 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_renderPass.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_renderPass.operator!();
+ }
+# endif
+
+ //=== VK_VERSION_1_0 ===
+
+ VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Extent2D getRenderAreaGranularity() const VULKAN_HPP_NOEXCEPT;
+
+ //=== VK_HUAWEI_subpass_shading ===
+
+ VULKAN_HPP_NODISCARD std::pair<VULKAN_HPP_NAMESPACE::Result, VULKAN_HPP_NAMESPACE::Extent2D>
+ getSubpassShadingMaxWorkgroupSizeHUAWEI() const;
+
private:
VULKAN_HPP_NAMESPACE::RenderPass m_renderPass;
VkDevice m_device;
@@ -6991,7 +8211,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- Sampler() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ Sampler() = default;
+# else
+ Sampler() = delete;
+# endif
Sampler( Sampler const & ) = delete;
Sampler( Sampler && rhs ) VULKAN_HPP_NOEXCEPT
: m_sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_sampler, {} ) )
@@ -7004,7 +8228,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroySampler( m_device, static_cast<VkSampler>( m_sampler ), m_allocator );
+ if ( m_sampler )
+ {
+ getDispatcher()->vkDestroySampler( m_device, static_cast<VkSampler>( m_sampler ), m_allocator );
+ }
m_sampler = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_sampler, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -7020,9 +8247,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_sampler.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_sampler.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::Sampler m_sampler;
VkDevice m_device;
@@ -7082,7 +8322,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- SamplerYcbcrConversion() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ SamplerYcbcrConversion() = default;
+# else
+ SamplerYcbcrConversion() = delete;
+# endif
SamplerYcbcrConversion( SamplerYcbcrConversion const & ) = delete;
SamplerYcbcrConversion( SamplerYcbcrConversion && rhs ) VULKAN_HPP_NOEXCEPT
: m_samplerYcbcrConversion(
@@ -7096,8 +8340,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroySamplerYcbcrConversion(
- m_device, static_cast<VkSamplerYcbcrConversion>( m_samplerYcbcrConversion ), m_allocator );
+ if ( m_samplerYcbcrConversion )
+ {
+ getDispatcher()->vkDestroySamplerYcbcrConversion(
+ m_device, static_cast<VkSamplerYcbcrConversion>( m_samplerYcbcrConversion ), m_allocator );
+ }
m_samplerYcbcrConversion =
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_samplerYcbcrConversion, {} );
m_device = rhs.m_device;
@@ -7114,9 +8361,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_samplerYcbcrConversion.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_samplerYcbcrConversion.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion m_samplerYcbcrConversion;
VkDevice m_device;
@@ -7172,7 +8432,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- Semaphore() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ Semaphore() = default;
+# else
+ Semaphore() = delete;
+# endif
Semaphore( Semaphore const & ) = delete;
Semaphore( Semaphore && rhs ) VULKAN_HPP_NOEXCEPT
: m_semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_semaphore, {} ) )
@@ -7185,7 +8449,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroySemaphore( m_device, static_cast<VkSemaphore>( m_semaphore ), m_allocator );
+ if ( m_semaphore )
+ {
+ getDispatcher()->vkDestroySemaphore( m_device, static_cast<VkSemaphore>( m_semaphore ), m_allocator );
+ }
m_semaphore = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_semaphore, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -7194,14 +8461,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_VERSION_1_2 ===
-
- VULKAN_HPP_NODISCARD uint64_t getCounterValue() const;
-
- //=== VK_KHR_timeline_semaphore ===
-
- VULKAN_HPP_NODISCARD uint64_t getCounterValueKHR() const;
-
VULKAN_HPP_NAMESPACE::Semaphore const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_semaphore;
@@ -7209,9 +8468,30 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_semaphore.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_semaphore.operator!();
+ }
+# endif
+
+ //=== VK_VERSION_1_2 ===
+
+ VULKAN_HPP_NODISCARD uint64_t getCounterValue() const;
+
+ //=== VK_KHR_timeline_semaphore ===
+
+ VULKAN_HPP_NODISCARD uint64_t getCounterValueKHR() const;
+
private:
VULKAN_HPP_NAMESPACE::Semaphore m_semaphore;
VkDevice m_device;
@@ -7270,7 +8550,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- ShaderModule() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ ShaderModule() = default;
+# else
+ ShaderModule() = delete;
+# endif
ShaderModule( ShaderModule const & ) = delete;
ShaderModule( ShaderModule && rhs ) VULKAN_HPP_NOEXCEPT
: m_shaderModule( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_shaderModule, {} ) )
@@ -7283,8 +8567,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyShaderModule(
- m_device, static_cast<VkShaderModule>( m_shaderModule ), m_allocator );
+ if ( m_shaderModule )
+ {
+ getDispatcher()->vkDestroyShaderModule(
+ m_device, static_cast<VkShaderModule>( m_shaderModule ), m_allocator );
+ }
m_shaderModule = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_shaderModule, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -7300,9 +8587,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_shaderModule.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_shaderModule.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::ShaderModule m_shaderModule;
VkDevice m_device;
@@ -7661,7 +8961,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- SurfaceKHR() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ SurfaceKHR() = default;
+# else
+ SurfaceKHR() = delete;
+# endif
SurfaceKHR( SurfaceKHR const & ) = delete;
SurfaceKHR( SurfaceKHR && rhs ) VULKAN_HPP_NOEXCEPT
: m_surfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_surfaceKHR, {} ) )
@@ -7674,7 +8978,10 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroySurfaceKHR( m_instance, static_cast<VkSurfaceKHR>( m_surfaceKHR ), m_allocator );
+ if ( m_surfaceKHR )
+ {
+ getDispatcher()->vkDestroySurfaceKHR( m_instance, static_cast<VkSurfaceKHR>( m_surfaceKHR ), m_allocator );
+ }
m_surfaceKHR = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_surfaceKHR, {} );
m_instance = rhs.m_instance;
m_allocator = rhs.m_allocator;
@@ -7690,9 +8997,22 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::InstanceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_surfaceKHR.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_surfaceKHR.operator!();
+ }
+# endif
+
private:
VULKAN_HPP_NAMESPACE::SurfaceKHR m_surfaceKHR;
VkInstance m_instance;
@@ -7758,7 +9078,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- SwapchainKHR() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ SwapchainKHR() = default;
+# else
+ SwapchainKHR() = delete;
+# endif
SwapchainKHR( SwapchainKHR const & ) = delete;
SwapchainKHR( SwapchainKHR && rhs ) VULKAN_HPP_NOEXCEPT
: m_swapchainKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_swapchainKHR, {} ) )
@@ -7771,8 +9095,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroySwapchainKHR(
- m_device, static_cast<VkSwapchainKHR>( m_swapchainKHR ), m_allocator );
+ if ( m_swapchainKHR )
+ {
+ getDispatcher()->vkDestroySwapchainKHR(
+ m_device, static_cast<VkSwapchainKHR>( m_swapchainKHR ), m_allocator );
+ }
m_swapchainKHR = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_swapchainKHR, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -7781,6 +9108,29 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+ VULKAN_HPP_NAMESPACE::SwapchainKHR const & operator*() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_swapchainKHR;
+ }
+
+ VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
+ {
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
+ return m_dispatcher;
+ }
+
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_swapchainKHR.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_swapchainKHR.operator!();
+ }
+# endif
+
//=== VK_KHR_swapchain ===
VULKAN_HPP_NODISCARD std::vector<VkImage> getImages() const;
@@ -7809,6 +9159,10 @@ namespace VULKAN_HPP_NAMESPACE
void setLocalDimmingAMD( VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable ) const VULKAN_HPP_NOEXCEPT;
+ //=== VK_KHR_present_wait ===
+
+ VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitForPresent( uint64_t presentId, uint64_t timeout ) const;
+
# if defined( VK_USE_PLATFORM_WIN32_KHR )
//=== VK_EXT_full_screen_exclusive ===
@@ -7817,16 +9171,6 @@ namespace VULKAN_HPP_NAMESPACE
void releaseFullScreenExclusiveModeEXT() const;
# endif /*VK_USE_PLATFORM_WIN32_KHR*/
- VULKAN_HPP_NAMESPACE::SwapchainKHR const & operator*() const VULKAN_HPP_NOEXCEPT
- {
- return m_swapchainKHR;
- }
-
- VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
- {
- return m_dispatcher;
- }
-
private:
VULKAN_HPP_NAMESPACE::SwapchainKHR m_swapchainKHR;
VkDevice m_device;
@@ -7870,7 +9214,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- SwapchainKHRs() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ SwapchainKHRs() = default;
+# else
+ SwapchainKHRs() = delete;
+# endif
SwapchainKHRs( SwapchainKHRs const & ) = delete;
SwapchainKHRs( SwapchainKHRs && rhs ) = default;
SwapchainKHRs & operator=( SwapchainKHRs const & ) = delete;
@@ -7929,7 +9277,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- ValidationCacheEXT() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ ValidationCacheEXT() = default;
+# else
+ ValidationCacheEXT() = delete;
+# endif
ValidationCacheEXT( ValidationCacheEXT const & ) = delete;
ValidationCacheEXT( ValidationCacheEXT && rhs ) VULKAN_HPP_NOEXCEPT
: m_validationCacheEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_validationCacheEXT,
@@ -7943,8 +9295,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyValidationCacheEXT(
- m_device, static_cast<VkValidationCacheEXT>( m_validationCacheEXT ), m_allocator );
+ if ( m_validationCacheEXT )
+ {
+ getDispatcher()->vkDestroyValidationCacheEXT(
+ m_device, static_cast<VkValidationCacheEXT>( m_validationCacheEXT ), m_allocator );
+ }
m_validationCacheEXT =
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_validationCacheEXT, {} );
m_device = rhs.m_device;
@@ -7954,12 +9309,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_EXT_validation_cache ===
-
- void merge( ArrayProxy<const VULKAN_HPP_NAMESPACE::ValidationCacheEXT> const & srcCaches ) const;
-
- VULKAN_HPP_NODISCARD std::vector<uint8_t> getData() const;
-
VULKAN_HPP_NAMESPACE::ValidationCacheEXT const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_validationCacheEXT;
@@ -7967,9 +9316,28 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_validationCacheEXT.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_validationCacheEXT.operator!();
+ }
+# endif
+
+ //=== VK_EXT_validation_cache ===
+
+ void merge( ArrayProxy<const VULKAN_HPP_NAMESPACE::ValidationCacheEXT> const & srcCaches ) const;
+
+ VULKAN_HPP_NODISCARD std::vector<uint8_t> getData() const;
+
private:
VULKAN_HPP_NAMESPACE::ValidationCacheEXT m_validationCacheEXT;
VkDevice m_device;
@@ -8030,7 +9398,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- VideoSessionKHR() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ VideoSessionKHR() = default;
+# else
+ VideoSessionKHR() = delete;
+# endif
VideoSessionKHR( VideoSessionKHR const & ) = delete;
VideoSessionKHR( VideoSessionKHR && rhs ) VULKAN_HPP_NOEXCEPT
: m_videoSessionKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSessionKHR, {} ) )
@@ -8043,8 +9415,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyVideoSessionKHR(
- m_device, static_cast<VkVideoSessionKHR>( m_videoSessionKHR ), m_allocator );
+ if ( m_videoSessionKHR )
+ {
+ getDispatcher()->vkDestroyVideoSessionKHR(
+ m_device, static_cast<VkVideoSessionKHR>( m_videoSessionKHR ), m_allocator );
+ }
m_videoSessionKHR = VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSessionKHR, {} );
m_device = rhs.m_device;
m_allocator = rhs.m_allocator;
@@ -8053,13 +9428,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_KHR_video_queue ===
-
- VULKAN_HPP_NODISCARD std::vector<VULKAN_HPP_NAMESPACE::VideoGetMemoryPropertiesKHR> getMemoryRequirements() const;
-
- void
- bindMemory( ArrayProxy<const VULKAN_HPP_NAMESPACE::VideoBindMemoryKHR> const & videoSessionBindMemories ) const;
-
VULKAN_HPP_NAMESPACE::VideoSessionKHR const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_videoSessionKHR;
@@ -8067,9 +9435,29 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_videoSessionKHR.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_videoSessionKHR.operator!();
+ }
+# endif
+
+ //=== VK_KHR_video_queue ===
+
+ VULKAN_HPP_NODISCARD std::vector<VULKAN_HPP_NAMESPACE::VideoGetMemoryPropertiesKHR> getMemoryRequirements() const;
+
+ void
+ bindMemory( ArrayProxy<const VULKAN_HPP_NAMESPACE::VideoBindMemoryKHR> const & videoSessionBindMemories ) const;
+
private:
VULKAN_HPP_NAMESPACE::VideoSessionKHR m_videoSessionKHR;
VkDevice m_device;
@@ -8131,7 +9519,11 @@ namespace VULKAN_HPP_NAMESPACE
}
}
- VideoSessionParametersKHR() = delete;
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ VideoSessionParametersKHR() = default;
+# else
+ VideoSessionParametersKHR() = delete;
+# endif
VideoSessionParametersKHR( VideoSessionParametersKHR const & ) = delete;
VideoSessionParametersKHR( VideoSessionParametersKHR && rhs ) VULKAN_HPP_NOEXCEPT
: m_videoSessionParametersKHR(
@@ -8145,8 +9537,11 @@ namespace VULKAN_HPP_NAMESPACE
{
if ( this != &rhs )
{
- getDispatcher()->vkDestroyVideoSessionParametersKHR(
- m_device, static_cast<VkVideoSessionParametersKHR>( m_videoSessionParametersKHR ), m_allocator );
+ if ( m_videoSessionParametersKHR )
+ {
+ getDispatcher()->vkDestroyVideoSessionParametersKHR(
+ m_device, static_cast<VkVideoSessionParametersKHR>( m_videoSessionParametersKHR ), m_allocator );
+ }
m_videoSessionParametersKHR =
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_videoSessionParametersKHR, {} );
m_device = rhs.m_device;
@@ -8156,10 +9551,6 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- //=== VK_KHR_video_queue ===
-
- void update( const VideoSessionParametersUpdateInfoKHR & updateInfo ) const;
-
VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR const & operator*() const VULKAN_HPP_NOEXCEPT
{
return m_videoSessionParametersKHR;
@@ -8167,9 +9558,26 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceDispatcher const * getDispatcher() const
{
+ VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION );
return m_dispatcher;
}
+# if defined( VULKAN_HPP_RAII_ENABLE_DEFAULT_CONSTRUCTORS )
+ explicit operator bool() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_videoSessionParametersKHR.operator bool();
+ }
+
+ bool operator!() const VULKAN_HPP_NOEXCEPT
+ {
+ return m_videoSessionParametersKHR.operator!();
+ }
+# endif
+
+ //=== VK_KHR_video_queue ===
+
+ void update( const VideoSessionParametersUpdateInfoKHR & updateInfo ) const;
+
private:
VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR m_videoSessionParametersKHR;
VkDevice m_device;
@@ -13894,6 +15302,25 @@ namespace VULKAN_HPP_NAMESPACE
return toolProperties;
}
+ //=== VK_KHR_present_wait ===
+
+ VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result
+ SwapchainKHR::waitForPresent( uint64_t presentId, uint64_t timeout ) const
+ {
+ VULKAN_HPP_ASSERT( getDispatcher()->vkWaitForPresentKHR &&
+ "Function <vkWaitForPresentKHR> needs extension <VK_KHR_present_wait> enabled!" );
+
+ VULKAN_HPP_NAMESPACE::Result result =
+ static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkWaitForPresentKHR(
+ static_cast<VkDevice>( m_device ), static_cast<VkSwapchainKHR>( m_swapchainKHR ), presentId, timeout ) );
+ if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) &&
+ ( result != VULKAN_HPP_NAMESPACE::Result::eTimeout ) )
+ {
+ throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::waitForPresent" );
+ }
+ return result;
+ }
+
//=== VK_NV_cooperative_matrix ===
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector<VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV>
@@ -15116,13 +16543,15 @@ namespace VULKAN_HPP_NAMESPACE
RenderPass::getSubpassShadingMaxWorkgroupSizeHUAWEI() const
{
VULKAN_HPP_ASSERT(
- getDispatcher()->vkGetSubpassShadingMaxWorkgroupSizeHUAWEI &&
- "Function <vkGetSubpassShadingMaxWorkgroupSizeHUAWEI> needs extension <VK_HUAWEI_subpass_shading> enabled!" );
+ getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI &&
+ "Function <vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI> needs extension <VK_HUAWEI_subpass_shading> enabled!" );
VULKAN_HPP_NAMESPACE::Extent2D maxWorkgroupSize;
VULKAN_HPP_NAMESPACE::Result result =
- static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkGetSubpassShadingMaxWorkgroupSizeHUAWEI(
- static_cast<VkRenderPass>( m_renderPass ), reinterpret_cast<VkExtent2D *>( &maxWorkgroupSize ) ) );
+ static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(
+ static_cast<VkDevice>( m_device ),
+ static_cast<VkRenderPass>( m_renderPass ),
+ reinterpret_cast<VkExtent2D *>( &maxWorkgroupSize ) ) );
if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) &&
( result != VULKAN_HPP_NAMESPACE::Result::eIncomplete ) )
{
@@ -15140,6 +16569,43 @@ namespace VULKAN_HPP_NAMESPACE
getDispatcher()->vkCmdSubpassShadingHUAWEI( static_cast<VkCommandBuffer>( m_commandBuffer ) );
}
+ //=== VK_HUAWEI_invocation_mask ===
+
+ VULKAN_HPP_INLINE void
+ CommandBuffer::bindInvocationMaskHUAWEI( VULKAN_HPP_NAMESPACE::ImageView imageView,
+ VULKAN_HPP_NAMESPACE::ImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT
+ {
+ VULKAN_HPP_ASSERT(
+ getDispatcher()->vkCmdBindInvocationMaskHUAWEI &&
+ "Function <vkCmdBindInvocationMaskHUAWEI> needs extension <VK_HUAWEI_invocation_mask> enabled!" );
+
+ getDispatcher()->vkCmdBindInvocationMaskHUAWEI( static_cast<VkCommandBuffer>( m_commandBuffer ),
+ static_cast<VkImageView>( imageView ),
+ static_cast<VkImageLayout>( imageLayout ) );
+ }
+
+ //=== VK_NV_external_memory_rdma ===
+
+ VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::RemoteAddressNV
+ Device::getMemoryRemoteAddressNV( const MemoryGetRemoteAddressInfoNV & memoryGetRemoteAddressInfo ) const
+ {
+ VULKAN_HPP_ASSERT(
+ getDispatcher()->vkGetMemoryRemoteAddressNV &&
+ "Function <vkGetMemoryRemoteAddressNV> needs extension <VK_NV_external_memory_rdma> enabled!" );
+
+ VULKAN_HPP_NAMESPACE::RemoteAddressNV address;
+ VULKAN_HPP_NAMESPACE::Result result =
+ static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkGetMemoryRemoteAddressNV(
+ static_cast<VkDevice>( m_device ),
+ reinterpret_cast<const VkMemoryGetRemoteAddressInfoNV *>( &memoryGetRemoteAddressInfo ),
+ reinterpret_cast<VkRemoteAddressNV *>( &address ) ) );
+ if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess )
+ {
+ throwResultException( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryRemoteAddressNV" );
+ }
+ return address;
+ }
+
//=== VK_EXT_extended_dynamic_state2 ===
VULKAN_HPP_INLINE void
diff --git a/thirdparty/vulkan/include/vulkan/vulkan_structs.hpp b/thirdparty/vulkan/include/vulkan/vulkan_structs.hpp
index 257c78d9fa..bb0332a741 100644
--- a/thirdparty/vulkan/include/vulkan/vulkan_structs.hpp
+++ b/thirdparty/vulkan/include/vulkan/vulkan_structs.hpp
@@ -10,6 +10,10 @@
namespace VULKAN_HPP_NAMESPACE
{
+ //===============
+ //=== STRUCTS ===
+ //===============
+
struct AabbPositionsKHR
{
#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
@@ -42,6 +46,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AabbPositionsKHR & setMinX( float minX_ ) VULKAN_HPP_NOEXCEPT
{
minX = minX_;
@@ -77,6 +82,7 @@ namespace VULKAN_HPP_NAMESPACE
maxZ = maxZ_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAabbPositionsKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -118,6 +124,7 @@ namespace VULKAN_HPP_NAMESPACE
union DeviceOrHostAddressConstKHR
{
+#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS )
DeviceOrHostAddressConstKHR( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
memcpy( static_cast<void *>( this ), &rhs, sizeof( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR ) );
@@ -128,7 +135,9 @@ namespace VULKAN_HPP_NAMESPACE
{}
DeviceOrHostAddressConstKHR( const void * hostAddress_ ) : hostAddress( hostAddress_ ) {}
+#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/
+#if !defined( VULKAN_HPP_NO_UNION_SETTERS )
DeviceOrHostAddressConstKHR &
setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT
{
@@ -141,6 +150,7 @@ namespace VULKAN_HPP_NAMESPACE
hostAddress = hostAddress_;
return *this;
}
+#endif /*VULKAN_HPP_NO_UNION_SETTERS*/
VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR &
operator=( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & rhs ) VULKAN_HPP_NOEXCEPT
@@ -212,6 +222,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureGeometryTrianglesDataKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -265,6 +276,7 @@ namespace VULKAN_HPP_NAMESPACE
transformData = transformData_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureGeometryTrianglesDataKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -332,6 +344,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureGeometryAabbsDataKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -351,6 +364,7 @@ namespace VULKAN_HPP_NAMESPACE
stride = stride_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureGeometryAabbsDataKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -414,6 +428,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureGeometryInstancesDataKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -433,6 +448,7 @@ namespace VULKAN_HPP_NAMESPACE
data = data_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureGeometryInstancesDataKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -464,6 +480,7 @@ namespace VULKAN_HPP_NAMESPACE
union AccelerationStructureGeometryDataKHR
{
+#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS )
AccelerationStructureGeometryDataKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryDataKHR const & rhs )
VULKAN_HPP_NOEXCEPT
{
@@ -483,7 +500,9 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryInstancesDataKHR instances_ )
: instances( instances_ )
{}
+#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/
+#if !defined( VULKAN_HPP_NO_UNION_SETTERS )
AccelerationStructureGeometryDataKHR & setTriangles(
VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryTrianglesDataKHR const & triangles_ ) VULKAN_HPP_NOEXCEPT
{
@@ -504,6 +523,7 @@ namespace VULKAN_HPP_NAMESPACE
instances = instances_;
return *this;
}
+#endif /*VULKAN_HPP_NO_UNION_SETTERS*/
VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryDataKHR &
operator=( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT
@@ -564,6 +584,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureGeometryKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -589,6 +610,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureGeometryKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -620,6 +642,7 @@ namespace VULKAN_HPP_NAMESPACE
union DeviceOrHostAddressKHR
{
+#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS )
DeviceOrHostAddressKHR( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
memcpy( static_cast<void *>( this ), &rhs, sizeof( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR ) );
@@ -629,7 +652,9 @@ namespace VULKAN_HPP_NAMESPACE
{}
DeviceOrHostAddressKHR( void * hostAddress_ ) : hostAddress( hostAddress_ ) {}
+#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/
+#if !defined( VULKAN_HPP_NO_UNION_SETTERS )
DeviceOrHostAddressKHR & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT
{
deviceAddress = deviceAddress_;
@@ -641,6 +666,7 @@ namespace VULKAN_HPP_NAMESPACE
hostAddress = hostAddress_;
return *this;
}
+#endif /*VULKAN_HPP_NO_UNION_SETTERS*/
VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR &
operator=( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR const & rhs ) VULKAN_HPP_NOEXCEPT
@@ -753,6 +779,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureBuildGeometryInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -807,7 +834,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
AccelerationStructureBuildGeometryInfoKHR & setGeometries(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<
const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR> const & geometries_ ) VULKAN_HPP_NOEXCEPT
@@ -816,7 +843,7 @@ namespace VULKAN_HPP_NAMESPACE
pGeometries = geometries_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
AccelerationStructureBuildGeometryInfoKHR & setPpGeometries(
const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * const * ppGeometries_ ) VULKAN_HPP_NOEXCEPT
@@ -825,7 +852,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
AccelerationStructureBuildGeometryInfoKHR & setPGeometries(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<
const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * const> const & pGeometries_ ) VULKAN_HPP_NOEXCEPT
@@ -834,7 +861,7 @@ namespace VULKAN_HPP_NAMESPACE
ppGeometries = pGeometries_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
AccelerationStructureBuildGeometryInfoKHR &
setScratchData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR const & scratchData_ ) VULKAN_HPP_NOEXCEPT
@@ -842,6 +869,7 @@ namespace VULKAN_HPP_NAMESPACE
scratchData = scratchData_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureBuildGeometryInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -912,6 +940,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureBuildRangeInfoKHR & setPrimitiveCount( uint32_t primitiveCount_ ) VULKAN_HPP_NOEXCEPT
{
primitiveCount = primitiveCount_;
@@ -935,6 +964,7 @@ namespace VULKAN_HPP_NAMESPACE
transformOffset = transformOffset_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureBuildRangeInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -1007,6 +1037,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureBuildSizesInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -1033,6 +1064,7 @@ namespace VULKAN_HPP_NAMESPACE
buildScratchSize = buildScratchSize_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureBuildSizesInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -1119,6 +1151,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -1163,6 +1196,7 @@ namespace VULKAN_HPP_NAMESPACE
deviceAddress = deviceAddress_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -1259,6 +1293,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
GeometryTrianglesNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -1330,6 +1365,7 @@ namespace VULKAN_HPP_NAMESPACE
transformOffset = transformOffset_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkGeometryTrianglesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -1416,6 +1452,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
GeometryAABBNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -1445,6 +1482,7 @@ namespace VULKAN_HPP_NAMESPACE
offset = offset_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkGeometryAABBNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -1512,6 +1550,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
GeometryDataNV & setTriangles( VULKAN_HPP_NAMESPACE::GeometryTrianglesNV const & triangles_ ) VULKAN_HPP_NOEXCEPT
{
triangles = triangles_;
@@ -1523,6 +1562,7 @@ namespace VULKAN_HPP_NAMESPACE
aabbs = aabbs_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkGeometryDataNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -1585,6 +1625,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
GeometryNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -1608,6 +1649,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkGeometryNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -1700,6 +1742,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -1738,7 +1781,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
AccelerationStructureInfoNV & setGeometries(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::GeometryNV> const & geometries_ )
VULKAN_HPP_NOEXCEPT
@@ -1747,7 +1790,8 @@ namespace VULKAN_HPP_NAMESPACE
pGeometries = geometries_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -1826,6 +1870,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -1845,6 +1890,7 @@ namespace VULKAN_HPP_NAMESPACE
info = info_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -1920,6 +1966,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureDeviceAddressInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -1932,6 +1979,7 @@ namespace VULKAN_HPP_NAMESPACE
accelerationStructure = accelerationStructure_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureDeviceAddressInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -2007,6 +2055,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureGeometryMotionTrianglesDataNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -2019,6 +2068,7 @@ namespace VULKAN_HPP_NAMESPACE
vertexData = vertexData_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureGeometryMotionTrianglesDataNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -2071,11 +2121,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
TransformMatrixKHR & setMatrix( std::array<std::array<float, 4>, 3> matrix_ ) VULKAN_HPP_NOEXCEPT
{
matrix = matrix_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkTransformMatrixKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -2144,6 +2196,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureInstanceKHR &
setTransform( VULKAN_HPP_NAMESPACE::TransformMatrixKHR const & transform_ ) VULKAN_HPP_NOEXCEPT
{
@@ -2183,6 +2236,7 @@ namespace VULKAN_HPP_NAMESPACE
accelerationStructureReference = accelerationStructureReference_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureInstanceKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -2265,6 +2319,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureMatrixMotionInstanceNV &
setTransformT0( VULKAN_HPP_NAMESPACE::TransformMatrixKHR const & transformT0_ ) VULKAN_HPP_NOEXCEPT
{
@@ -2312,6 +2367,7 @@ namespace VULKAN_HPP_NAMESPACE
accelerationStructureReference = accelerationStructureReference_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureMatrixMotionInstanceNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -2390,6 +2446,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureMemoryRequirementsInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -2409,6 +2466,7 @@ namespace VULKAN_HPP_NAMESPACE
accelerationStructure = accelerationStructure_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureMemoryRequirementsInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -2485,6 +2543,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureMotionInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -2503,6 +2562,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureMotionInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -2597,6 +2657,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SRTDataNV & setSx( float sx_ ) VULKAN_HPP_NOEXCEPT
{
sx = sx_;
@@ -2692,6 +2753,7 @@ namespace VULKAN_HPP_NAMESPACE
tz = tz_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSRTDataNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -2781,6 +2843,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureSRTMotionInstanceNV &
setTransformT0( VULKAN_HPP_NAMESPACE::SRTDataNV const & transformT0_ ) VULKAN_HPP_NOEXCEPT
{
@@ -2828,6 +2891,7 @@ namespace VULKAN_HPP_NAMESPACE
accelerationStructureReference = accelerationStructureReference_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureSRTMotionInstanceNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -2873,6 +2937,7 @@ namespace VULKAN_HPP_NAMESPACE
union AccelerationStructureMotionInstanceDataNV
{
+#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS )
AccelerationStructureMotionInstanceDataNV(
VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceDataNV const & rhs ) VULKAN_HPP_NOEXCEPT
{
@@ -2894,7 +2959,9 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::AccelerationStructureSRTMotionInstanceNV srtMotionInstance_ )
: srtMotionInstance( srtMotionInstance_ )
{}
+#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/
+#if !defined( VULKAN_HPP_NO_UNION_SETTERS )
AccelerationStructureMotionInstanceDataNV & setStaticInstance(
VULKAN_HPP_NAMESPACE::AccelerationStructureInstanceKHR const & staticInstance_ ) VULKAN_HPP_NOEXCEPT
{
@@ -2916,6 +2983,7 @@ namespace VULKAN_HPP_NAMESPACE
srtMotionInstance = srtMotionInstance_;
return *this;
}
+#endif /*VULKAN_HPP_NO_UNION_SETTERS*/
VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceDataNV &
operator=( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceDataNV const & rhs ) VULKAN_HPP_NOEXCEPT
@@ -2978,6 +3046,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureMotionInstanceNV &
setType( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceTypeNV type_ ) VULKAN_HPP_NOEXCEPT
{
@@ -2998,6 +3067,7 @@ namespace VULKAN_HPP_NAMESPACE
data = data_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureMotionInstanceNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -3049,6 +3119,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AccelerationStructureVersionInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -3060,6 +3131,7 @@ namespace VULKAN_HPP_NAMESPACE
pVersionData = pVersionData_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAccelerationStructureVersionInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -3135,6 +3207,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AcquireNextImageInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -3170,6 +3243,7 @@ namespace VULKAN_HPP_NAMESPACE
deviceMask = deviceMask_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAcquireNextImageInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -3245,6 +3319,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AcquireProfilingLockInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -3263,6 +3338,7 @@ namespace VULKAN_HPP_NAMESPACE
timeout = timeout_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAcquireProfilingLockInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -3338,6 +3414,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AllocationCallbacks & setPUserData( void * pUserData_ ) VULKAN_HPP_NOEXCEPT
{
pUserData = pUserData_;
@@ -3374,6 +3451,7 @@ namespace VULKAN_HPP_NAMESPACE
pfnInternalFree = pfnInternalFree_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAllocationCallbacks const &() const VULKAN_HPP_NOEXCEPT
{
@@ -3443,6 +3521,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ComponentMapping & setR( VULKAN_HPP_NAMESPACE::ComponentSwizzle r_ ) VULKAN_HPP_NOEXCEPT
{
r = r_;
@@ -3466,6 +3545,7 @@ namespace VULKAN_HPP_NAMESPACE
a = a_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkComponentMapping const &() const VULKAN_HPP_NOEXCEPT
{
@@ -3783,6 +3863,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AndroidSurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -3801,6 +3882,7 @@ namespace VULKAN_HPP_NAMESPACE
window = window_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAndroidSurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -3877,6 +3959,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ApplicationInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -3912,6 +3995,7 @@ namespace VULKAN_HPP_NAMESPACE
apiVersion = apiVersion_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkApplicationInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -3998,6 +4082,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AttachmentDescription & setFlags( VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
@@ -4053,6 +4138,7 @@ namespace VULKAN_HPP_NAMESPACE
finalLayout = finalLayout_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAttachmentDescription const &() const VULKAN_HPP_NOEXCEPT
{
@@ -4140,6 +4226,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AttachmentDescription2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -4201,6 +4288,7 @@ namespace VULKAN_HPP_NAMESPACE
finalLayout = finalLayout_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAttachmentDescription2 const &() const VULKAN_HPP_NOEXCEPT
{
@@ -4286,6 +4374,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AttachmentDescriptionStencilLayout & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -4305,6 +4394,7 @@ namespace VULKAN_HPP_NAMESPACE
stencilFinalLayout = stencilFinalLayout_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAttachmentDescriptionStencilLayout const &() const VULKAN_HPP_NOEXCEPT
{
@@ -4375,6 +4465,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AttachmentReference & setAttachment( uint32_t attachment_ ) VULKAN_HPP_NOEXCEPT
{
attachment = attachment_;
@@ -4386,6 +4477,7 @@ namespace VULKAN_HPP_NAMESPACE
layout = layout_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAttachmentReference const &() const VULKAN_HPP_NOEXCEPT
{
@@ -4450,6 +4542,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AttachmentReference2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -4473,6 +4566,7 @@ namespace VULKAN_HPP_NAMESPACE
aspectMask = aspectMask_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAttachmentReference2 const &() const VULKAN_HPP_NOEXCEPT
{
@@ -4546,6 +4640,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AttachmentReferenceStencilLayout & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -4558,6 +4653,7 @@ namespace VULKAN_HPP_NAMESPACE
stencilLayout = stencilLayout_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAttachmentReferenceStencilLayout const &() const VULKAN_HPP_NOEXCEPT
{
@@ -4621,6 +4717,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
Extent2D & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT
{
width = width_;
@@ -4632,6 +4729,7 @@ namespace VULKAN_HPP_NAMESPACE
height = height_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExtent2D const &() const VULKAN_HPP_NOEXCEPT
{
@@ -4688,6 +4786,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SampleLocationEXT & setX( float x_ ) VULKAN_HPP_NOEXCEPT
{
x = x_;
@@ -4699,6 +4798,7 @@ namespace VULKAN_HPP_NAMESPACE
y = y_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSampleLocationEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -4779,6 +4879,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SampleLocationsInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -4812,7 +4913,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SampleLocationsInfoEXT & setSampleLocations(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SampleLocationEXT> const &
sampleLocations_ ) VULKAN_HPP_NOEXCEPT
@@ -4821,7 +4922,8 @@ namespace VULKAN_HPP_NAMESPACE
pSampleLocations = sampleLocations_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSampleLocationsInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -4895,6 +4997,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
AttachmentSampleLocationsEXT & setAttachmentIndex( uint32_t attachmentIndex_ ) VULKAN_HPP_NOEXCEPT
{
attachmentIndex = attachmentIndex_;
@@ -4907,6 +5010,7 @@ namespace VULKAN_HPP_NAMESPACE
sampleLocationsInfo = sampleLocationsInfo_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkAttachmentSampleLocationsEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -4963,11 +5067,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BaseInStructure & setPNext( const struct VULKAN_HPP_NAMESPACE::BaseInStructure * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBaseInStructure const &() const VULKAN_HPP_NOEXCEPT
{
@@ -5022,11 +5128,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BaseOutStructure & setPNext( struct VULKAN_HPP_NAMESPACE::BaseOutStructure * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBaseOutStructure const &() const VULKAN_HPP_NOEXCEPT
{
@@ -5113,6 +5221,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BindAccelerationStructureMemoryInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -5151,7 +5260,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
BindAccelerationStructureMemoryInfoNV & setDeviceIndices(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & deviceIndices_ ) VULKAN_HPP_NOEXCEPT
{
@@ -5159,7 +5268,8 @@ namespace VULKAN_HPP_NAMESPACE
pDeviceIndices = deviceIndices_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBindAccelerationStructureMemoryInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -5244,6 +5354,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BindBufferMemoryDeviceGroupInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -5262,7 +5373,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
BindBufferMemoryDeviceGroupInfo & setDeviceIndices(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & deviceIndices_ ) VULKAN_HPP_NOEXCEPT
{
@@ -5270,7 +5381,8 @@ namespace VULKAN_HPP_NAMESPACE
pDeviceIndices = deviceIndices_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBindBufferMemoryDeviceGroupInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -5345,6 +5457,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BindBufferMemoryInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -5368,6 +5481,7 @@ namespace VULKAN_HPP_NAMESPACE
memoryOffset = memoryOffset_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBindBufferMemoryInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -5433,6 +5547,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
Offset2D & setX( int32_t x_ ) VULKAN_HPP_NOEXCEPT
{
x = x_;
@@ -5444,6 +5559,7 @@ namespace VULKAN_HPP_NAMESPACE
y = y_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkOffset2D const &() const VULKAN_HPP_NOEXCEPT
{
@@ -5498,6 +5614,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
Rect2D & setOffset( VULKAN_HPP_NAMESPACE::Offset2D const & offset_ ) VULKAN_HPP_NOEXCEPT
{
offset = offset_;
@@ -5509,6 +5626,7 @@ namespace VULKAN_HPP_NAMESPACE
extent = extent_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRect2D const &() const VULKAN_HPP_NOEXCEPT
{
@@ -5587,6 +5705,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BindImageMemoryDeviceGroupInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -5605,7 +5724,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
BindImageMemoryDeviceGroupInfo & setDeviceIndices(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & deviceIndices_ ) VULKAN_HPP_NOEXCEPT
{
@@ -5613,7 +5732,7 @@ namespace VULKAN_HPP_NAMESPACE
pDeviceIndices = deviceIndices_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
BindImageMemoryDeviceGroupInfo &
setSplitInstanceBindRegionCount( uint32_t splitInstanceBindRegionCount_ ) VULKAN_HPP_NOEXCEPT
@@ -5629,7 +5748,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
BindImageMemoryDeviceGroupInfo & setSplitInstanceBindRegions(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Rect2D> const &
splitInstanceBindRegions_ ) VULKAN_HPP_NOEXCEPT
@@ -5638,7 +5757,8 @@ namespace VULKAN_HPP_NAMESPACE
pSplitInstanceBindRegions = splitInstanceBindRegions_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBindImageMemoryDeviceGroupInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -5717,6 +5837,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BindImageMemoryInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -5740,6 +5861,7 @@ namespace VULKAN_HPP_NAMESPACE
memoryOffset = memoryOffset_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBindImageMemoryInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -5813,6 +5935,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BindImageMemorySwapchainInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -5830,6 +5953,7 @@ namespace VULKAN_HPP_NAMESPACE
imageIndex = imageIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBindImageMemorySwapchainInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -5901,6 +6025,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BindImagePlaneMemoryInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -5913,6 +6038,7 @@ namespace VULKAN_HPP_NAMESPACE
planeAspect = planeAspect_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBindImagePlaneMemoryInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -5983,6 +6109,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BindIndexBufferIndirectCommandNV &
setBufferAddress( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ ) VULKAN_HPP_NOEXCEPT
{
@@ -6001,6 +6128,7 @@ namespace VULKAN_HPP_NAMESPACE
indexType = indexType_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBindIndexBufferIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -6060,11 +6188,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BindShaderGroupIndirectCommandNV & setGroupIndex( uint32_t groupIndex_ ) VULKAN_HPP_NOEXCEPT
{
groupIndex = groupIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBindShaderGroupIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -6128,6 +6258,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SparseMemoryBind & setResourceOffset( VULKAN_HPP_NAMESPACE::DeviceSize resourceOffset_ ) VULKAN_HPP_NOEXCEPT
{
resourceOffset = resourceOffset_;
@@ -6157,6 +6288,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSparseMemoryBind const &() const VULKAN_HPP_NOEXCEPT
{
@@ -6231,6 +6363,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SparseBufferMemoryBindInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
@@ -6249,7 +6382,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SparseBufferMemoryBindInfo & setBinds(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SparseMemoryBind> const & binds_ )
VULKAN_HPP_NOEXCEPT
@@ -6258,7 +6391,8 @@ namespace VULKAN_HPP_NAMESPACE
pBinds = binds_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSparseBufferMemoryBindInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -6331,6 +6465,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SparseImageOpaqueMemoryBindInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT
{
image = image_;
@@ -6350,7 +6485,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SparseImageOpaqueMemoryBindInfo & setBinds(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SparseMemoryBind> const & binds_ )
VULKAN_HPP_NOEXCEPT
@@ -6359,7 +6494,8 @@ namespace VULKAN_HPP_NAMESPACE
pBinds = binds_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSparseImageOpaqueMemoryBindInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -6421,6 +6557,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageSubresource & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
{
aspectMask = aspectMask_;
@@ -6438,6 +6575,7 @@ namespace VULKAN_HPP_NAMESPACE
arrayLayer = arrayLayer_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageSubresource const &() const VULKAN_HPP_NOEXCEPT
{
@@ -6496,6 +6634,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
Offset3D & setX( int32_t x_ ) VULKAN_HPP_NOEXCEPT
{
x = x_;
@@ -6513,6 +6652,7 @@ namespace VULKAN_HPP_NAMESPACE
z = z_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkOffset3D const &() const VULKAN_HPP_NOEXCEPT
{
@@ -6573,6 +6713,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
Extent3D & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT
{
width = width_;
@@ -6590,6 +6731,7 @@ namespace VULKAN_HPP_NAMESPACE
depth = depth_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExtent3D const &() const VULKAN_HPP_NOEXCEPT
{
@@ -6657,6 +6799,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SparseImageMemoryBind &
setSubresource( VULKAN_HPP_NAMESPACE::ImageSubresource const & subresource_ ) VULKAN_HPP_NOEXCEPT
{
@@ -6693,6 +6836,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSparseImageMemoryBind const &() const VULKAN_HPP_NOEXCEPT
{
@@ -6768,6 +6912,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SparseImageMemoryBindInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT
{
image = image_;
@@ -6787,7 +6932,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SparseImageMemoryBindInfo & setBinds(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SparseImageMemoryBind> const & binds_ )
VULKAN_HPP_NOEXCEPT
@@ -6796,7 +6941,8 @@ namespace VULKAN_HPP_NAMESPACE
pBinds = binds_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSparseImageMemoryBindInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -6900,6 +7046,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BindSparseInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -6918,7 +7065,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
BindSparseInfo & setWaitSemaphores(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Semaphore> const & waitSemaphores_ )
VULKAN_HPP_NOEXCEPT
@@ -6927,7 +7074,7 @@ namespace VULKAN_HPP_NAMESPACE
pWaitSemaphores = waitSemaphores_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
BindSparseInfo & setBufferBindCount( uint32_t bufferBindCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -6942,7 +7089,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
BindSparseInfo & setBufferBinds(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SparseBufferMemoryBindInfo> const &
bufferBinds_ ) VULKAN_HPP_NOEXCEPT
@@ -6951,7 +7098,7 @@ namespace VULKAN_HPP_NAMESPACE
pBufferBinds = bufferBinds_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
BindSparseInfo & setImageOpaqueBindCount( uint32_t imageOpaqueBindCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -6966,7 +7113,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
BindSparseInfo & setImageOpaqueBinds(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SparseImageOpaqueMemoryBindInfo> const &
imageOpaqueBinds_ ) VULKAN_HPP_NOEXCEPT
@@ -6975,7 +7122,7 @@ namespace VULKAN_HPP_NAMESPACE
pImageOpaqueBinds = imageOpaqueBinds_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
BindSparseInfo & setImageBindCount( uint32_t imageBindCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -6990,7 +7137,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
BindSparseInfo & setImageBinds(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SparseImageMemoryBindInfo> const &
imageBinds_ ) VULKAN_HPP_NOEXCEPT
@@ -6999,7 +7146,7 @@ namespace VULKAN_HPP_NAMESPACE
pImageBinds = imageBinds_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
BindSparseInfo & setSignalSemaphoreCount( uint32_t signalSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -7014,7 +7161,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
BindSparseInfo & setSignalSemaphores(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Semaphore> const & signalSemaphores_ )
VULKAN_HPP_NOEXCEPT
@@ -7023,7 +7170,8 @@ namespace VULKAN_HPP_NAMESPACE
pSignalSemaphores = signalSemaphores_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBindSparseInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -7105,6 +7253,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BindVertexBufferIndirectCommandNV &
setBufferAddress( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ ) VULKAN_HPP_NOEXCEPT
{
@@ -7123,6 +7272,7 @@ namespace VULKAN_HPP_NAMESPACE
stride = stride_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBindVertexBufferIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -7187,6 +7337,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageSubresourceLayers & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
{
aspectMask = aspectMask_;
@@ -7210,6 +7361,7 @@ namespace VULKAN_HPP_NAMESPACE
layerCount = layerCount_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageSubresourceLayers const &() const VULKAN_HPP_NOEXCEPT
{
@@ -7278,6 +7430,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageBlit2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -7311,6 +7464,7 @@ namespace VULKAN_HPP_NAMESPACE
dstOffsets = dstOffsets_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageBlit2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -7412,6 +7566,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BlitImageInfo2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -7454,7 +7609,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
BlitImageInfo2KHR & setRegions(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ImageBlit2KHR> const & regions_ )
VULKAN_HPP_NOEXCEPT
@@ -7463,13 +7618,14 @@ namespace VULKAN_HPP_NAMESPACE
pRegions = regions_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
BlitImageInfo2KHR & setFilter( VULKAN_HPP_NAMESPACE::Filter filter_ ) VULKAN_HPP_NOEXCEPT
{
filter = filter_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBlitImageInfo2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -7545,6 +7701,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BufferCopy & setSrcOffset( VULKAN_HPP_NAMESPACE::DeviceSize srcOffset_ ) VULKAN_HPP_NOEXCEPT
{
srcOffset = srcOffset_;
@@ -7562,6 +7719,7 @@ namespace VULKAN_HPP_NAMESPACE
size = size_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBufferCopy const &() const VULKAN_HPP_NOEXCEPT
{
@@ -7624,6 +7782,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BufferCopy2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -7647,6 +7806,7 @@ namespace VULKAN_HPP_NAMESPACE
size = size_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBufferCopy2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -7740,6 +7900,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BufferCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -7782,7 +7943,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
BufferCreateInfo & setQueueFamilyIndices(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & queueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT
{
@@ -7790,7 +7951,8 @@ namespace VULKAN_HPP_NAMESPACE
pQueueFamilyIndices = queueFamilyIndices_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBufferCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -7867,6 +8029,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BufferDeviceAddressCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -7879,6 +8042,7 @@ namespace VULKAN_HPP_NAMESPACE
deviceAddress = deviceAddress_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBufferDeviceAddressCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -7946,6 +8110,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BufferDeviceAddressInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -7957,6 +8122,7 @@ namespace VULKAN_HPP_NAMESPACE
buffer = buffer_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBufferDeviceAddressInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -8031,6 +8197,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BufferImageCopy & setBufferOffset( VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset_ ) VULKAN_HPP_NOEXCEPT
{
bufferOffset = bufferOffset_;
@@ -8067,6 +8234,7 @@ namespace VULKAN_HPP_NAMESPACE
imageExtent = imageExtent_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBufferImageCopy const &() const VULKAN_HPP_NOEXCEPT
{
@@ -8141,6 +8309,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BufferImageCopy2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -8183,6 +8352,7 @@ namespace VULKAN_HPP_NAMESPACE
imageExtent = imageExtent_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBufferImageCopy2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -8269,6 +8439,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BufferMemoryBarrier & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -8316,6 +8487,7 @@ namespace VULKAN_HPP_NAMESPACE
size = size_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBufferMemoryBarrier const &() const VULKAN_HPP_NOEXCEPT
{
@@ -8407,6 +8579,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BufferMemoryBarrier2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -8470,6 +8643,7 @@ namespace VULKAN_HPP_NAMESPACE
size = size_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBufferMemoryBarrier2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -8549,6 +8723,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BufferMemoryRequirementsInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -8560,6 +8735,7 @@ namespace VULKAN_HPP_NAMESPACE
buffer = buffer_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBufferMemoryRequirementsInfo2 const &() const VULKAN_HPP_NOEXCEPT
{
@@ -8631,6 +8807,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BufferOpaqueCaptureAddressCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -8642,6 +8819,7 @@ namespace VULKAN_HPP_NAMESPACE
opaqueCaptureAddress = opaqueCaptureAddress_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBufferOpaqueCaptureAddressCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -8719,6 +8897,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
BufferViewCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -8754,6 +8933,7 @@ namespace VULKAN_HPP_NAMESPACE
range = range_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkBufferViewCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -8828,6 +9008,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CalibratedTimestampInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -8839,6 +9020,7 @@ namespace VULKAN_HPP_NAMESPACE
timeDomain = timeDomain_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCalibratedTimestampInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -9020,6 +9202,7 @@ namespace VULKAN_HPP_NAMESPACE
union ClearColorValue
{
+#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS )
ClearColorValue( VULKAN_HPP_NAMESPACE::ClearColorValue const & rhs ) VULKAN_HPP_NOEXCEPT
{
memcpy( static_cast<void *>( this ), &rhs, sizeof( VULKAN_HPP_NAMESPACE::ClearColorValue ) );
@@ -9030,7 +9213,9 @@ namespace VULKAN_HPP_NAMESPACE
ClearColorValue( const std::array<int32_t, 4> & int32_ ) : int32( int32_ ) {}
ClearColorValue( const std::array<uint32_t, 4> & uint32_ ) : uint32( uint32_ ) {}
+#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/
+#if !defined( VULKAN_HPP_NO_UNION_SETTERS )
ClearColorValue & setFloat32( std::array<float, 4> float32_ ) VULKAN_HPP_NOEXCEPT
{
float32 = float32_;
@@ -9048,6 +9233,7 @@ namespace VULKAN_HPP_NAMESPACE
uint32 = uint32_;
return *this;
}
+#endif /*VULKAN_HPP_NO_UNION_SETTERS*/
VULKAN_HPP_NAMESPACE::ClearColorValue &
operator=( VULKAN_HPP_NAMESPACE::ClearColorValue const & rhs ) VULKAN_HPP_NOEXCEPT
@@ -9095,6 +9281,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ClearDepthStencilValue & setDepth( float depth_ ) VULKAN_HPP_NOEXCEPT
{
depth = depth_;
@@ -9106,6 +9293,7 @@ namespace VULKAN_HPP_NAMESPACE
stencil = stencil_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkClearDepthStencilValue const &() const VULKAN_HPP_NOEXCEPT
{
@@ -9141,6 +9329,7 @@ namespace VULKAN_HPP_NAMESPACE
union ClearValue
{
+#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS )
ClearValue( VULKAN_HPP_NAMESPACE::ClearValue const & rhs ) VULKAN_HPP_NOEXCEPT
{
memcpy( static_cast<void *>( this ), &rhs, sizeof( VULKAN_HPP_NAMESPACE::ClearValue ) );
@@ -9149,7 +9338,9 @@ namespace VULKAN_HPP_NAMESPACE
ClearValue( VULKAN_HPP_NAMESPACE::ClearColorValue color_ = {} ) : color( color_ ) {}
ClearValue( VULKAN_HPP_NAMESPACE::ClearDepthStencilValue depthStencil_ ) : depthStencil( depthStencil_ ) {}
+#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/
+#if !defined( VULKAN_HPP_NO_UNION_SETTERS )
ClearValue & setColor( VULKAN_HPP_NAMESPACE::ClearColorValue const & color_ ) VULKAN_HPP_NOEXCEPT
{
color = color_;
@@ -9162,6 +9353,7 @@ namespace VULKAN_HPP_NAMESPACE
depthStencil = depthStencil_;
return *this;
}
+#endif /*VULKAN_HPP_NO_UNION_SETTERS*/
VULKAN_HPP_NAMESPACE::ClearValue & operator=( VULKAN_HPP_NAMESPACE::ClearValue const & rhs ) VULKAN_HPP_NOEXCEPT
{
@@ -9214,6 +9406,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ClearAttachment & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
{
aspectMask = aspectMask_;
@@ -9231,6 +9424,7 @@ namespace VULKAN_HPP_NAMESPACE
clearValue = clearValue_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkClearAttachment const &() const VULKAN_HPP_NOEXCEPT
{
@@ -9275,6 +9469,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ClearRect & setRect( VULKAN_HPP_NAMESPACE::Rect2D const & rect_ ) VULKAN_HPP_NOEXCEPT
{
rect = rect_;
@@ -9292,6 +9487,7 @@ namespace VULKAN_HPP_NAMESPACE
layerCount = layerCount_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkClearRect const &() const VULKAN_HPP_NOEXCEPT
{
@@ -9351,6 +9547,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CoarseSampleLocationNV & setPixelX( uint32_t pixelX_ ) VULKAN_HPP_NOEXCEPT
{
pixelX = pixelX_;
@@ -9368,6 +9565,7 @@ namespace VULKAN_HPP_NAMESPACE
sample = sample_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCoarseSampleLocationNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -9447,6 +9645,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CoarseSampleOrderCustomNV &
setShadingRate( VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV shadingRate_ ) VULKAN_HPP_NOEXCEPT
{
@@ -9473,7 +9672,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
CoarseSampleOrderCustomNV & setSampleLocations(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV> const &
sampleLocations_ ) VULKAN_HPP_NOEXCEPT
@@ -9482,7 +9681,8 @@ namespace VULKAN_HPP_NAMESPACE
pSampleLocations = sampleLocations_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCoarseSampleOrderCustomNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -9553,6 +9753,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CommandBufferAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -9576,6 +9777,7 @@ namespace VULKAN_HPP_NAMESPACE
commandBufferCount = commandBufferCount_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCommandBufferAllocateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -9658,6 +9860,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CommandBufferInheritanceInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -9702,6 +9905,7 @@ namespace VULKAN_HPP_NAMESPACE
pipelineStatistics = pipelineStatistics_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCommandBufferInheritanceInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -9780,6 +9984,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CommandBufferBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -9798,6 +10003,7 @@ namespace VULKAN_HPP_NAMESPACE
pInheritanceInfo = pInheritanceInfo_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCommandBufferBeginInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -9873,6 +10079,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CommandBufferInheritanceConditionalRenderingInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -9885,6 +10092,7 @@ namespace VULKAN_HPP_NAMESPACE
conditionalRenderingEnable = conditionalRenderingEnable_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCommandBufferInheritanceConditionalRenderingInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -9964,6 +10172,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CommandBufferInheritanceRenderPassTransformInfoQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -9983,6 +10192,7 @@ namespace VULKAN_HPP_NAMESPACE
renderArea = renderArea_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCommandBufferInheritanceRenderPassTransformInfoQCOM const &() const VULKAN_HPP_NOEXCEPT
{
@@ -10058,6 +10268,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
Viewport & setX( float x_ ) VULKAN_HPP_NOEXCEPT
{
x = x_;
@@ -10093,6 +10304,7 @@ namespace VULKAN_HPP_NAMESPACE
maxDepth = maxDepth_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkViewport const &() const VULKAN_HPP_NOEXCEPT
{
@@ -10166,6 +10378,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CommandBufferInheritanceViewportScissorInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -10192,6 +10405,7 @@ namespace VULKAN_HPP_NAMESPACE
pViewportDepths = pViewportDepths_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCommandBufferInheritanceViewportScissorInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -10266,6 +10480,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CommandBufferSubmitInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -10284,6 +10499,7 @@ namespace VULKAN_HPP_NAMESPACE
deviceMask = deviceMask_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCommandBufferSubmitInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -10355,6 +10571,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CommandPoolCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -10372,6 +10589,7 @@ namespace VULKAN_HPP_NAMESPACE
queueFamilyIndex = queueFamilyIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCommandPoolCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -10440,6 +10658,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SpecializationMapEntry & setConstantID( uint32_t constantID_ ) VULKAN_HPP_NOEXCEPT
{
constantID = constantID_;
@@ -10457,6 +10676,7 @@ namespace VULKAN_HPP_NAMESPACE
size = size_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSpecializationMapEntry const &() const VULKAN_HPP_NOEXCEPT
{
@@ -10532,6 +10752,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SpecializationInfo & setMapEntryCount( uint32_t mapEntryCount_ ) VULKAN_HPP_NOEXCEPT
{
mapEntryCount = mapEntryCount_;
@@ -10545,7 +10766,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SpecializationInfo & setMapEntries(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SpecializationMapEntry> const &
mapEntries_ ) VULKAN_HPP_NOEXCEPT
@@ -10554,7 +10775,7 @@ namespace VULKAN_HPP_NAMESPACE
pMapEntries = mapEntries_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SpecializationInfo & setDataSize( size_t dataSize_ ) VULKAN_HPP_NOEXCEPT
{
@@ -10568,7 +10789,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
template <typename T>
SpecializationInfo &
setData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const T> const & data_ ) VULKAN_HPP_NOEXCEPT
@@ -10577,7 +10798,8 @@ namespace VULKAN_HPP_NAMESPACE
pData = data_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSpecializationInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -10650,6 +10872,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineShaderStageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -10687,6 +10910,7 @@ namespace VULKAN_HPP_NAMESPACE
pSpecializationInfo = pSpecializationInfo_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineShaderStageCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -10768,6 +10992,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ComputePipelineCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -10805,6 +11030,7 @@ namespace VULKAN_HPP_NAMESPACE
basePipelineIndex = basePipelineIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkComputePipelineCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -10884,6 +11110,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ConditionalRenderingBeginInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -10908,6 +11135,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkConditionalRenderingBeginInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -10981,6 +11209,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ConformanceVersion & setMajor( uint8_t major_ ) VULKAN_HPP_NOEXCEPT
{
major = major_;
@@ -11004,6 +11233,7 @@ namespace VULKAN_HPP_NAMESPACE
patch = patch_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkConformanceVersion const &() const VULKAN_HPP_NOEXCEPT
{
@@ -11082,6 +11312,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CooperativeMatrixPropertiesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -11135,6 +11366,7 @@ namespace VULKAN_HPP_NAMESPACE
scope = scope_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCooperativeMatrixPropertiesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -11218,6 +11450,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CopyAccelerationStructureInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -11242,6 +11475,7 @@ namespace VULKAN_HPP_NAMESPACE
mode = mode_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCopyAccelerationStructureInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -11324,6 +11558,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CopyAccelerationStructureToMemoryInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -11350,6 +11585,7 @@ namespace VULKAN_HPP_NAMESPACE
mode = mode_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCopyAccelerationStructureToMemoryInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -11426,6 +11662,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CopyBufferInfo2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -11456,7 +11693,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
CopyBufferInfo2KHR & setRegions(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::BufferCopy2KHR> const & regions_ )
VULKAN_HPP_NOEXCEPT
@@ -11465,7 +11702,8 @@ namespace VULKAN_HPP_NAMESPACE
pRegions = regions_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCopyBufferInfo2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -11560,6 +11798,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CopyBufferToImageInfo2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -11598,7 +11837,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
CopyBufferToImageInfo2KHR & setRegions(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::BufferImageCopy2KHR> const & regions_ )
VULKAN_HPP_NOEXCEPT
@@ -11607,7 +11846,8 @@ namespace VULKAN_HPP_NAMESPACE
pRegions = regions_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCopyBufferToImageInfo2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -11684,6 +11924,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CopyCommandTransformInfoQCOM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -11696,6 +11937,7 @@ namespace VULKAN_HPP_NAMESPACE
transform = transform_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCopyCommandTransformInfoQCOM const &() const VULKAN_HPP_NOEXCEPT
{
@@ -11776,6 +12018,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CopyDescriptorSet & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -11823,6 +12066,7 @@ namespace VULKAN_HPP_NAMESPACE
descriptorCount = descriptorCount_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCopyDescriptorSet const &() const VULKAN_HPP_NOEXCEPT
{
@@ -11905,6 +12149,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageCopy2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -11942,6 +12187,7 @@ namespace VULKAN_HPP_NAMESPACE
extent = extent_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageCopy2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -12040,6 +12286,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CopyImageInfo2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -12082,7 +12329,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
CopyImageInfo2KHR & setRegions(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ImageCopy2KHR> const & regions_ )
VULKAN_HPP_NOEXCEPT
@@ -12091,7 +12338,8 @@ namespace VULKAN_HPP_NAMESPACE
pRegions = regions_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCopyImageInfo2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -12190,6 +12438,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CopyImageToBufferInfo2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -12228,7 +12477,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
CopyImageToBufferInfo2KHR & setRegions(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::BufferImageCopy2KHR> const & regions_ )
VULKAN_HPP_NOEXCEPT
@@ -12237,7 +12486,8 @@ namespace VULKAN_HPP_NAMESPACE
pRegions = regions_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCopyImageToBufferInfo2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -12322,6 +12572,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CopyMemoryToAccelerationStructureInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -12348,6 +12599,7 @@ namespace VULKAN_HPP_NAMESPACE
mode = mode_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCopyMemoryToAccelerationStructureInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -12407,6 +12659,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CuFunctionCreateInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -12424,6 +12677,7 @@ namespace VULKAN_HPP_NAMESPACE
pName = pName_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCuFunctionCreateInfoNVX const &() const VULKAN_HPP_NOEXCEPT
{
@@ -12502,7 +12756,33 @@ namespace VULKAN_HPP_NAMESPACE
CuLaunchInfoNVX( VkCuLaunchInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT
: CuLaunchInfoNVX( *reinterpret_cast<CuLaunchInfoNVX const *>( &rhs ) )
{}
-#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/
+
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+ CuLaunchInfoNVX( VULKAN_HPP_NAMESPACE::CuFunctionNVX function_,
+ uint32_t gridDimX_,
+ uint32_t gridDimY_,
+ uint32_t gridDimZ_,
+ uint32_t blockDimX_,
+ uint32_t blockDimY_,
+ uint32_t blockDimZ_,
+ uint32_t sharedMemBytes_,
+ VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const void * const> const & params_,
+ VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const void * const> const & extras_ = {} )
+ : function( function_ )
+ , gridDimX( gridDimX_ )
+ , gridDimY( gridDimY_ )
+ , gridDimZ( gridDimZ_ )
+ , blockDimX( blockDimX_ )
+ , blockDimY( blockDimY_ )
+ , blockDimZ( blockDimZ_ )
+ , sharedMemBytes( sharedMemBytes_ )
+ , paramCount( params_.size() )
+ , pParams( params_.data() )
+ , extraCount( extras_.size() )
+ , pExtras( extras_.data() )
+ {}
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/
VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & operator=( CuLaunchInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default;
@@ -12512,6 +12792,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CuLaunchInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -12578,6 +12859,16 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+ CuLaunchInfoNVX &
+ setParams( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const void * const> const & params_ ) VULKAN_HPP_NOEXCEPT
+ {
+ paramCount = params_.size();
+ pParams = params_.data();
+ return *this;
+ }
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+
CuLaunchInfoNVX & setExtraCount( size_t extraCount_ ) VULKAN_HPP_NOEXCEPT
{
extraCount = extraCount_;
@@ -12590,6 +12881,17 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+ CuLaunchInfoNVX &
+ setExtras( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const void * const> const & extras_ ) VULKAN_HPP_NOEXCEPT
+ {
+ extraCount = extras_.size();
+ pExtras = extras_.data();
+ return *this;
+ }
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
+
operator VkCuLaunchInfoNVX const &() const VULKAN_HPP_NOEXCEPT
{
return *reinterpret_cast<const VkCuLaunchInfoNVX *>( this );
@@ -12670,6 +12972,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
CuModuleCreateInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -12687,6 +12990,7 @@ namespace VULKAN_HPP_NAMESPACE
pData = pData_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkCuModuleCreateInfoNVX const &() const VULKAN_HPP_NOEXCEPT
{
@@ -12772,6 +13076,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
D3D12FenceSubmitInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -12790,7 +13095,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
D3D12FenceSubmitInfoKHR & setWaitSemaphoreValues(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint64_t> const & waitSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT
{
@@ -12798,7 +13103,7 @@ namespace VULKAN_HPP_NAMESPACE
pWaitSemaphoreValues = waitSemaphoreValues_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
D3D12FenceSubmitInfoKHR & setSignalSemaphoreValuesCount( uint32_t signalSemaphoreValuesCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -12812,7 +13117,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
D3D12FenceSubmitInfoKHR & setSignalSemaphoreValues(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint64_t> const & signalSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT
{
@@ -12820,7 +13125,8 @@ namespace VULKAN_HPP_NAMESPACE
pSignalSemaphoreValues = signalSemaphoreValues_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkD3D12FenceSubmitInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -12898,6 +13204,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DebugMarkerMarkerInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -12915,6 +13222,7 @@ namespace VULKAN_HPP_NAMESPACE
color = color_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDebugMarkerMarkerInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -12989,6 +13297,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DebugMarkerObjectNameInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -13013,6 +13322,7 @@ namespace VULKAN_HPP_NAMESPACE
pObjectName = pObjectName_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDebugMarkerObjectNameInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -13108,6 +13418,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DebugMarkerObjectTagInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -13145,7 +13456,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
template <typename T>
DebugMarkerObjectTagInfoEXT &
setTag( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const T> const & tag_ ) VULKAN_HPP_NOEXCEPT
@@ -13154,7 +13465,8 @@ namespace VULKAN_HPP_NAMESPACE
pTag = tag_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDebugMarkerObjectTagInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -13234,6 +13546,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DebugReportCallbackCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -13257,6 +13570,7 @@ namespace VULKAN_HPP_NAMESPACE
pUserData = pUserData_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDebugReportCallbackCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -13329,6 +13643,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DebugUtilsLabelEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -13346,6 +13661,7 @@ namespace VULKAN_HPP_NAMESPACE
color = color_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDebugUtilsLabelEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -13420,6 +13736,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DebugUtilsObjectNameInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -13443,6 +13760,7 @@ namespace VULKAN_HPP_NAMESPACE
pObjectName = pObjectName_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDebugUtilsObjectNameInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -13560,6 +13878,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DebugUtilsMessengerCallbackDataEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -13604,7 +13923,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DebugUtilsMessengerCallbackDataEXT & setQueueLabels(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT> const &
queueLabels_ ) VULKAN_HPP_NOEXCEPT
@@ -13613,7 +13932,7 @@ namespace VULKAN_HPP_NAMESPACE
pQueueLabels = queueLabels_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
DebugUtilsMessengerCallbackDataEXT & setCmdBufLabelCount( uint32_t cmdBufLabelCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -13628,7 +13947,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DebugUtilsMessengerCallbackDataEXT & setCmdBufLabels(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT> const &
cmdBufLabels_ ) VULKAN_HPP_NOEXCEPT
@@ -13637,7 +13956,7 @@ namespace VULKAN_HPP_NAMESPACE
pCmdBufLabels = cmdBufLabels_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
DebugUtilsMessengerCallbackDataEXT & setObjectCount( uint32_t objectCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -13652,7 +13971,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DebugUtilsMessengerCallbackDataEXT & setObjects(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT> const &
objects_ ) VULKAN_HPP_NOEXCEPT
@@ -13661,7 +13980,8 @@ namespace VULKAN_HPP_NAMESPACE
pObjects = objects_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDebugUtilsMessengerCallbackDataEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -13753,6 +14073,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DebugUtilsMessengerCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -13792,6 +14113,7 @@ namespace VULKAN_HPP_NAMESPACE
pUserData = pUserData_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDebugUtilsMessengerCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -13889,6 +14211,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DebugUtilsObjectTagInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -13925,7 +14248,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
template <typename T>
DebugUtilsObjectTagInfoEXT &
setTag( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const T> const & tag_ ) VULKAN_HPP_NOEXCEPT
@@ -13934,7 +14257,8 @@ namespace VULKAN_HPP_NAMESPACE
pTag = tag_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDebugUtilsObjectTagInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -14012,6 +14336,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DedicatedAllocationBufferCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -14024,6 +14349,7 @@ namespace VULKAN_HPP_NAMESPACE
dedicatedAllocation = dedicatedAllocation_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDedicatedAllocationBufferCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -14095,6 +14421,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DedicatedAllocationImageCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -14107,6 +14434,7 @@ namespace VULKAN_HPP_NAMESPACE
dedicatedAllocation = dedicatedAllocation_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDedicatedAllocationImageCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -14181,6 +14509,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DedicatedAllocationMemoryAllocateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -14198,6 +14527,7 @@ namespace VULKAN_HPP_NAMESPACE
buffer = buffer_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDedicatedAllocationMemoryAllocateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -14274,6 +14604,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MemoryBarrier2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -14305,6 +14636,7 @@ namespace VULKAN_HPP_NAMESPACE
dstAccessMask = dstAccessMask_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMemoryBarrier2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -14381,6 +14713,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageSubresourceRange & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT
{
aspectMask = aspectMask_;
@@ -14410,6 +14743,7 @@ namespace VULKAN_HPP_NAMESPACE
layerCount = layerCount_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageSubresourceRange const &() const VULKAN_HPP_NOEXCEPT
{
@@ -14493,6 +14827,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageMemoryBarrier2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -14563,6 +14898,7 @@ namespace VULKAN_HPP_NAMESPACE
subresourceRange = subresourceRange_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageMemoryBarrier2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -14675,6 +15011,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DependencyInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -14700,7 +15037,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DependencyInfoKHR & setMemoryBarriers(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::MemoryBarrier2KHR> const &
memoryBarriers_ ) VULKAN_HPP_NOEXCEPT
@@ -14709,7 +15046,7 @@ namespace VULKAN_HPP_NAMESPACE
pMemoryBarriers = memoryBarriers_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
DependencyInfoKHR & setBufferMemoryBarrierCount( uint32_t bufferMemoryBarrierCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -14724,7 +15061,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DependencyInfoKHR & setBufferMemoryBarriers(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier2KHR> const &
bufferMemoryBarriers_ ) VULKAN_HPP_NOEXCEPT
@@ -14733,7 +15070,7 @@ namespace VULKAN_HPP_NAMESPACE
pBufferMemoryBarriers = bufferMemoryBarriers_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
DependencyInfoKHR & setImageMemoryBarrierCount( uint32_t imageMemoryBarrierCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -14748,7 +15085,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DependencyInfoKHR & setImageMemoryBarriers(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier2KHR> const &
imageMemoryBarriers_ ) VULKAN_HPP_NOEXCEPT
@@ -14757,7 +15094,8 @@ namespace VULKAN_HPP_NAMESPACE
pImageMemoryBarriers = imageMemoryBarriers_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDependencyInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -14836,6 +15174,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DescriptorBufferInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
@@ -14853,6 +15192,7 @@ namespace VULKAN_HPP_NAMESPACE
range = range_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDescriptorBufferInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -14915,6 +15255,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DescriptorImageInfo & setSampler( VULKAN_HPP_NAMESPACE::Sampler sampler_ ) VULKAN_HPP_NOEXCEPT
{
sampler = sampler_;
@@ -14932,6 +15273,7 @@ namespace VULKAN_HPP_NAMESPACE
imageLayout = imageLayout_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDescriptorImageInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -14992,6 +15334,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DescriptorPoolSize & setType( VULKAN_HPP_NAMESPACE::DescriptorType type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
@@ -15003,6 +15346,7 @@ namespace VULKAN_HPP_NAMESPACE
descriptorCount = descriptorCount_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDescriptorPoolSize const &() const VULKAN_HPP_NOEXCEPT
{
@@ -15081,6 +15425,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DescriptorPoolCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -15112,7 +15457,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DescriptorPoolCreateInfo & setPoolSizes(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DescriptorPoolSize> const & poolSizes_ )
VULKAN_HPP_NOEXCEPT
@@ -15121,7 +15466,8 @@ namespace VULKAN_HPP_NAMESPACE
pPoolSizes = poolSizes_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDescriptorPoolCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -15198,6 +15544,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DescriptorPoolInlineUniformBlockCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -15210,6 +15557,7 @@ namespace VULKAN_HPP_NAMESPACE
maxInlineUniformBlockBindings = maxInlineUniformBlockBindings_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDescriptorPoolInlineUniformBlockCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -15296,6 +15644,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DescriptorSetAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -15322,7 +15671,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DescriptorSetAllocateInfo & setSetLayouts(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DescriptorSetLayout> const &
setLayouts_ ) VULKAN_HPP_NOEXCEPT
@@ -15331,7 +15680,8 @@ namespace VULKAN_HPP_NAMESPACE
pSetLayouts = setLayouts_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDescriptorSetAllocateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -15423,6 +15773,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DescriptorSetLayoutBinding & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT
{
binding = binding_;
@@ -15455,7 +15806,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DescriptorSetLayoutBinding & setImmutableSamplers(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Sampler> const & immutableSamplers_ )
VULKAN_HPP_NOEXCEPT
@@ -15464,7 +15815,8 @@ namespace VULKAN_HPP_NAMESPACE
pImmutableSamplers = immutableSamplers_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDescriptorSetLayoutBinding const &() const VULKAN_HPP_NOEXCEPT
{
@@ -15546,6 +15898,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DescriptorSetLayoutBindingFlagsCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -15565,7 +15918,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DescriptorSetLayoutBindingFlagsCreateInfo & setBindingFlags(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DescriptorBindingFlags> const &
bindingFlags_ ) VULKAN_HPP_NOEXCEPT
@@ -15574,7 +15927,8 @@ namespace VULKAN_HPP_NAMESPACE
pBindingFlags = bindingFlags_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDescriptorSetLayoutBindingFlagsCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -15661,6 +16015,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DescriptorSetLayoutCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -15687,7 +16042,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DescriptorSetLayoutCreateInfo & setBindings(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding> const &
bindings_ ) VULKAN_HPP_NOEXCEPT
@@ -15696,7 +16051,8 @@ namespace VULKAN_HPP_NAMESPACE
pBindings = bindings_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDescriptorSetLayoutCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -15851,6 +16207,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DescriptorSetVariableDescriptorCountAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -15871,7 +16228,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DescriptorSetVariableDescriptorCountAllocateInfo & setDescriptorCounts(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & descriptorCounts_ ) VULKAN_HPP_NOEXCEPT
{
@@ -15879,7 +16236,8 @@ namespace VULKAN_HPP_NAMESPACE
pDescriptorCounts = descriptorCounts_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDescriptorSetVariableDescriptorCountAllocateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -16036,6 +16394,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DescriptorUpdateTemplateEntry & setDstBinding( uint32_t dstBinding_ ) VULKAN_HPP_NOEXCEPT
{
dstBinding = dstBinding_;
@@ -16072,6 +16431,7 @@ namespace VULKAN_HPP_NAMESPACE
stride = stride_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDescriptorUpdateTemplateEntry const &() const VULKAN_HPP_NOEXCEPT
{
@@ -16180,6 +16540,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DescriptorUpdateTemplateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -16207,7 +16568,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DescriptorUpdateTemplateCreateInfo & setDescriptorUpdateEntries(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateEntry> const &
descriptorUpdateEntries_ ) VULKAN_HPP_NOEXCEPT
@@ -16216,7 +16577,7 @@ namespace VULKAN_HPP_NAMESPACE
pDescriptorUpdateEntries = descriptorUpdateEntries_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
DescriptorUpdateTemplateCreateInfo &
setTemplateType( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType templateType_ ) VULKAN_HPP_NOEXCEPT
@@ -16251,6 +16612,7 @@ namespace VULKAN_HPP_NAMESPACE
set = set_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDescriptorUpdateTemplateCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -16348,6 +16710,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceQueueCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -16378,7 +16741,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DeviceQueueCreateInfo & setQueuePriorities(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const float> const & queuePriorities_ ) VULKAN_HPP_NOEXCEPT
{
@@ -16386,7 +16749,8 @@ namespace VULKAN_HPP_NAMESPACE
pQueuePriorities = queuePriorities_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceQueueCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -16564,6 +16928,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceFeatures &
setRobustBufferAccess( VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess_ ) VULKAN_HPP_NOEXCEPT
{
@@ -16927,6 +17292,7 @@ namespace VULKAN_HPP_NAMESPACE
inheritedQueries = inheritedQueries_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -17111,6 +17477,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -17136,7 +17503,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DeviceCreateInfo & setQueueCreateInfos(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo> const &
queueCreateInfos_ ) VULKAN_HPP_NOEXCEPT
@@ -17145,7 +17512,7 @@ namespace VULKAN_HPP_NAMESPACE
pQueueCreateInfos = queueCreateInfos_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
DeviceCreateInfo & setEnabledLayerCount( uint32_t enabledLayerCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -17159,7 +17526,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DeviceCreateInfo & setPEnabledLayerNames( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const char * const> const &
pEnabledLayerNames_ ) VULKAN_HPP_NOEXCEPT
{
@@ -17167,7 +17534,7 @@ namespace VULKAN_HPP_NAMESPACE
ppEnabledLayerNames = pEnabledLayerNames_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
DeviceCreateInfo & setEnabledExtensionCount( uint32_t enabledExtensionCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -17181,7 +17548,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DeviceCreateInfo & setPEnabledExtensionNames(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const char * const> const & pEnabledExtensionNames_ )
VULKAN_HPP_NOEXCEPT
@@ -17190,7 +17557,7 @@ namespace VULKAN_HPP_NAMESPACE
ppEnabledExtensionNames = pEnabledExtensionNames_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
DeviceCreateInfo &
setPEnabledFeatures( const VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pEnabledFeatures_ ) VULKAN_HPP_NOEXCEPT
@@ -17198,6 +17565,7 @@ namespace VULKAN_HPP_NAMESPACE
pEnabledFeatures = pEnabledFeatures_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -17284,6 +17652,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceDeviceMemoryReportCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -17309,6 +17678,7 @@ namespace VULKAN_HPP_NAMESPACE
pUserData = pUserData_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceDeviceMemoryReportCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -17382,6 +17752,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceDiagnosticsConfigCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -17394,6 +17765,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceDiagnosticsConfigCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -17463,6 +17835,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceEventInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -17474,6 +17847,7 @@ namespace VULKAN_HPP_NAMESPACE
deviceEvent = deviceEvent_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceEventInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -17543,6 +17917,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceGroupBindSparseInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -17560,6 +17935,7 @@ namespace VULKAN_HPP_NAMESPACE
memoryDeviceIndex = memoryDeviceIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceGroupBindSparseInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -17632,6 +18008,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceGroupCommandBufferBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -17643,6 +18020,7 @@ namespace VULKAN_HPP_NAMESPACE
deviceMask = deviceMask_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceGroupCommandBufferBeginInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -17724,6 +18102,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceGroupDeviceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -17743,7 +18122,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DeviceGroupDeviceCreateInfo & setPhysicalDevices(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::PhysicalDevice> const &
physicalDevices_ ) VULKAN_HPP_NOEXCEPT
@@ -17752,7 +18131,8 @@ namespace VULKAN_HPP_NAMESPACE
pPhysicalDevices = physicalDevices_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceGroupDeviceCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -17855,7 +18235,7 @@ namespace VULKAN_HPP_NAMESPACE
public:
VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupPresentCapabilitiesKHR;
- const void * pNext = {};
+ void * pNext = {};
VULKAN_HPP_NAMESPACE::ArrayWrapper1D<uint32_t, VK_MAX_DEVICE_GROUP_SIZE> presentMask = {};
VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes = {};
};
@@ -17913,6 +18293,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceGroupPresentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -17931,7 +18312,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DeviceGroupPresentInfoKHR & setDeviceMasks(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & deviceMasks_ ) VULKAN_HPP_NOEXCEPT
{
@@ -17939,7 +18320,7 @@ namespace VULKAN_HPP_NAMESPACE
pDeviceMasks = deviceMasks_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
DeviceGroupPresentInfoKHR &
setMode( VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR mode_ ) VULKAN_HPP_NOEXCEPT
@@ -17947,6 +18328,7 @@ namespace VULKAN_HPP_NAMESPACE
mode = mode_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceGroupPresentInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -18034,6 +18416,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceGroupRenderPassBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -18059,7 +18442,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DeviceGroupRenderPassBeginInfo & setDeviceRenderAreas(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Rect2D> const & deviceRenderAreas_ )
VULKAN_HPP_NOEXCEPT
@@ -18068,7 +18451,8 @@ namespace VULKAN_HPP_NAMESPACE
pDeviceRenderAreas = deviceRenderAreas_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceGroupRenderPassBeginInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -18165,6 +18549,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceGroupSubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -18184,7 +18569,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DeviceGroupSubmitInfo & setWaitSemaphoreDeviceIndices(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & waitSemaphoreDeviceIndices_ )
VULKAN_HPP_NOEXCEPT
@@ -18193,7 +18578,7 @@ namespace VULKAN_HPP_NAMESPACE
pWaitSemaphoreDeviceIndices = waitSemaphoreDeviceIndices_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
DeviceGroupSubmitInfo & setCommandBufferCount( uint32_t commandBufferCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -18208,7 +18593,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DeviceGroupSubmitInfo & setCommandBufferDeviceMasks(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & commandBufferDeviceMasks_ )
VULKAN_HPP_NOEXCEPT
@@ -18217,7 +18602,7 @@ namespace VULKAN_HPP_NAMESPACE
pCommandBufferDeviceMasks = commandBufferDeviceMasks_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
DeviceGroupSubmitInfo & setSignalSemaphoreCount( uint32_t signalSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -18232,7 +18617,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
DeviceGroupSubmitInfo & setSignalSemaphoreDeviceIndices(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & signalSemaphoreDeviceIndices_ )
VULKAN_HPP_NOEXCEPT
@@ -18241,7 +18626,8 @@ namespace VULKAN_HPP_NAMESPACE
pSignalSemaphoreDeviceIndices = signalSemaphoreDeviceIndices_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceGroupSubmitInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -18321,6 +18707,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceGroupSwapchainCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -18333,6 +18720,7 @@ namespace VULKAN_HPP_NAMESPACE
modes = modes_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceGroupSwapchainCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -18404,6 +18792,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceMemoryOpaqueCaptureAddressInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -18415,6 +18804,7 @@ namespace VULKAN_HPP_NAMESPACE
memory = memory_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceMemoryOpaqueCaptureAddressInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -18489,6 +18879,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceMemoryOverallocationCreateInfoAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -18501,6 +18892,7 @@ namespace VULKAN_HPP_NAMESPACE
overallocationBehavior = overallocationBehavior_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceMemoryOverallocationCreateInfoAMD const &() const VULKAN_HPP_NOEXCEPT
{
@@ -18615,7 +19007,7 @@ namespace VULKAN_HPP_NAMESPACE
public:
VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceMemoryReportCallbackDataEXT;
- const void * pNext = {};
+ void * pNext = {};
VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagsEXT flags = {};
VULKAN_HPP_NAMESPACE::DeviceMemoryReportEventTypeEXT type =
VULKAN_HPP_NAMESPACE::DeviceMemoryReportEventTypeEXT::eAllocate;
@@ -18664,6 +19056,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DevicePrivateDataCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -18676,6 +19069,7 @@ namespace VULKAN_HPP_NAMESPACE
privateDataSlotRequestCount = privateDataSlotRequestCount_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDevicePrivateDataCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -18750,6 +19144,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceQueueGlobalPriorityCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -18762,6 +19157,7 @@ namespace VULKAN_HPP_NAMESPACE
globalPriority = globalPriority_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceQueueGlobalPriorityCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -18832,6 +19228,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DeviceQueueInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -18855,6 +19252,7 @@ namespace VULKAN_HPP_NAMESPACE
queueIndex = queueIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDeviceQueueInfo2 const &() const VULKAN_HPP_NOEXCEPT
{
@@ -18930,6 +19328,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DirectFBSurfaceCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -18954,6 +19353,7 @@ namespace VULKAN_HPP_NAMESPACE
surface = surface_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDirectFBSurfaceCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -19025,6 +19425,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DispatchIndirectCommand & setX( uint32_t x_ ) VULKAN_HPP_NOEXCEPT
{
x = x_;
@@ -19042,6 +19443,7 @@ namespace VULKAN_HPP_NAMESPACE
z = z_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDispatchIndirectCommand const &() const VULKAN_HPP_NOEXCEPT
{
@@ -19104,6 +19506,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DisplayEventInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -19115,6 +19518,7 @@ namespace VULKAN_HPP_NAMESPACE
displayEvent = displayEvent_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDisplayEventInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -19180,6 +19584,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DisplayModeParametersKHR &
setVisibleRegion( VULKAN_HPP_NAMESPACE::Extent2D const & visibleRegion_ ) VULKAN_HPP_NOEXCEPT
{
@@ -19192,6 +19597,7 @@ namespace VULKAN_HPP_NAMESPACE
refreshRate = refreshRate_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDisplayModeParametersKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -19254,6 +19660,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DisplayModeCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -19272,6 +19679,7 @@ namespace VULKAN_HPP_NAMESPACE
parameters = parameters_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDisplayModeCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -19692,6 +20100,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DisplayPlaneInfo2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -19709,6 +20118,7 @@ namespace VULKAN_HPP_NAMESPACE
planeIndex = planeIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDisplayPlaneInfo2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -19906,6 +20316,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DisplayPowerInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -19917,6 +20328,7 @@ namespace VULKAN_HPP_NAMESPACE
powerState = powerState_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDisplayPowerInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -19987,6 +20399,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DisplayPresentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -20010,6 +20423,7 @@ namespace VULKAN_HPP_NAMESPACE
persistent = persistent_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDisplayPresentInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -20239,6 +20653,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DisplaySurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -20297,6 +20712,7 @@ namespace VULKAN_HPP_NAMESPACE
imageExtent = imageExtent_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDisplaySurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -20382,6 +20798,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DrawIndexedIndirectCommand & setIndexCount( uint32_t indexCount_ ) VULKAN_HPP_NOEXCEPT
{
indexCount = indexCount_;
@@ -20411,6 +20828,7 @@ namespace VULKAN_HPP_NAMESPACE
firstInstance = firstInstance_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDrawIndexedIndirectCommand const &() const VULKAN_HPP_NOEXCEPT
{
@@ -20479,6 +20897,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DrawIndirectCommand & setVertexCount( uint32_t vertexCount_ ) VULKAN_HPP_NOEXCEPT
{
vertexCount = vertexCount_;
@@ -20502,6 +20921,7 @@ namespace VULKAN_HPP_NAMESPACE
firstInstance = firstInstance_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDrawIndirectCommand const &() const VULKAN_HPP_NOEXCEPT
{
@@ -20564,6 +20984,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
DrawMeshTasksIndirectCommandNV & setTaskCount( uint32_t taskCount_ ) VULKAN_HPP_NOEXCEPT
{
taskCount = taskCount_;
@@ -20575,6 +20996,7 @@ namespace VULKAN_HPP_NAMESPACE
firstTask = firstTask_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkDrawMeshTasksIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -20783,6 +21205,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
EventCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -20794,6 +21217,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkEventCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -20860,6 +21284,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ExportFenceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -20872,6 +21297,7 @@ namespace VULKAN_HPP_NAMESPACE
handleTypes = handleTypes_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExportFenceCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -20945,6 +21371,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ExportFenceWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -20968,6 +21395,7 @@ namespace VULKAN_HPP_NAMESPACE
name = name_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExportFenceWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -21040,6 +21468,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ExportMemoryAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -21052,6 +21481,7 @@ namespace VULKAN_HPP_NAMESPACE
handleTypes = handleTypes_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExportMemoryAllocateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -21121,6 +21551,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ExportMemoryAllocateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -21133,6 +21564,7 @@ namespace VULKAN_HPP_NAMESPACE
handleTypes = handleTypes_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExportMemoryAllocateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -21206,6 +21638,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ExportMemoryWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -21229,6 +21662,7 @@ namespace VULKAN_HPP_NAMESPACE
name = name_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExportMemoryWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -21304,6 +21738,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ExportMemoryWin32HandleInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -21321,6 +21756,7 @@ namespace VULKAN_HPP_NAMESPACE
dwAccess = dwAccess_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExportMemoryWin32HandleInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -21393,6 +21829,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ExportSemaphoreCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -21405,6 +21842,7 @@ namespace VULKAN_HPP_NAMESPACE
handleTypes = handleTypes_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExportSemaphoreCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -21480,6 +21918,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ExportSemaphoreWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -21503,6 +21942,7 @@ namespace VULKAN_HPP_NAMESPACE
name = name_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExportSemaphoreWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -21841,6 +22281,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ExternalFormatANDROID & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -21852,6 +22293,7 @@ namespace VULKAN_HPP_NAMESPACE
externalFormat = externalFormat_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExternalFormatANDROID const &() const VULKAN_HPP_NOEXCEPT
{
@@ -22129,6 +22571,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ExternalMemoryBufferCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -22141,6 +22584,7 @@ namespace VULKAN_HPP_NAMESPACE
handleTypes = handleTypes_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExternalMemoryBufferCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -22211,6 +22655,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ExternalMemoryImageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -22223,6 +22668,7 @@ namespace VULKAN_HPP_NAMESPACE
handleTypes = handleTypes_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExternalMemoryImageCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -22293,6 +22739,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ExternalMemoryImageCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -22305,6 +22752,7 @@ namespace VULKAN_HPP_NAMESPACE
handleTypes = handleTypes_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkExternalMemoryImageCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -22449,6 +22897,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
FenceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -22460,6 +22909,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkFenceCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -22529,6 +22979,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
FenceGetFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -22547,6 +22998,7 @@ namespace VULKAN_HPP_NAMESPACE
handleType = handleType_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkFenceGetFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -22622,6 +23074,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
FenceGetWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -22640,6 +23093,7 @@ namespace VULKAN_HPP_NAMESPACE
handleType = handleType_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkFenceGetWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -22922,6 +23376,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
FragmentShadingRateAttachmentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -22941,6 +23396,7 @@ namespace VULKAN_HPP_NAMESPACE
shadingRateAttachmentTexelSize = shadingRateAttachmentTexelSize_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkFragmentShadingRateAttachmentInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -23043,6 +23499,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
FramebufferAttachmentImageInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -23092,7 +23549,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
FramebufferAttachmentImageInfo & setViewFormats(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Format> const & viewFormats_ )
VULKAN_HPP_NOEXCEPT
@@ -23101,7 +23558,8 @@ namespace VULKAN_HPP_NAMESPACE
pViewFormats = viewFormats_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkFramebufferAttachmentImageInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -23191,6 +23649,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
FramebufferAttachmentsCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -23211,7 +23670,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
FramebufferAttachmentsCreateInfo & setAttachmentImageInfos(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo> const &
attachmentImageInfos_ ) VULKAN_HPP_NOEXCEPT
@@ -23220,7 +23679,8 @@ namespace VULKAN_HPP_NAMESPACE
pAttachmentImageInfos = attachmentImageInfos_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkFramebufferAttachmentsCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -23322,6 +23782,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
FramebufferCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -23352,7 +23813,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
FramebufferCreateInfo & setAttachments(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ImageView> const & attachments_ )
VULKAN_HPP_NOEXCEPT
@@ -23361,7 +23822,7 @@ namespace VULKAN_HPP_NAMESPACE
pAttachments = attachments_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
FramebufferCreateInfo & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT
{
@@ -23380,6 +23841,7 @@ namespace VULKAN_HPP_NAMESPACE
layers = layers_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkFramebufferCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -23538,6 +24000,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
IndirectCommandsStreamNV & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT
{
buffer = buffer_;
@@ -23549,6 +24012,7 @@ namespace VULKAN_HPP_NAMESPACE
offset = offset_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkIndirectCommandsStreamNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -23664,6 +24128,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
GeneratedCommandsInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -23703,7 +24168,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
GeneratedCommandsInfoNV & setStreams(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::IndirectCommandsStreamNV> const &
streams_ ) VULKAN_HPP_NOEXCEPT
@@ -23712,7 +24177,7 @@ namespace VULKAN_HPP_NAMESPACE
pStreams = streams_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
GeneratedCommandsInfoNV & setSequencesCount( uint32_t sequencesCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -23766,6 +24231,7 @@ namespace VULKAN_HPP_NAMESPACE
sequencesIndexOffset = sequencesIndexOffset_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkGeneratedCommandsInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -23864,6 +24330,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
GeneratedCommandsMemoryRequirementsInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -23896,6 +24363,7 @@ namespace VULKAN_HPP_NAMESPACE
maxSequencesCount = maxSequencesCount_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkGeneratedCommandsMemoryRequirementsInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -23973,6 +24441,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VertexInputBindingDescription & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT
{
binding = binding_;
@@ -23990,6 +24459,7 @@ namespace VULKAN_HPP_NAMESPACE
inputRate = inputRate_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVertexInputBindingDescription const &() const VULKAN_HPP_NOEXCEPT
{
@@ -24056,6 +24526,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VertexInputAttributeDescription & setLocation( uint32_t location_ ) VULKAN_HPP_NOEXCEPT
{
location = location_;
@@ -24079,6 +24550,7 @@ namespace VULKAN_HPP_NAMESPACE
offset = offset_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVertexInputAttributeDescription const &() const VULKAN_HPP_NOEXCEPT
{
@@ -24170,6 +24642,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineVertexInputStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -24197,7 +24670,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineVertexInputStateCreateInfo & setVertexBindingDescriptions(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::VertexInputBindingDescription> const &
vertexBindingDescriptions_ ) VULKAN_HPP_NOEXCEPT
@@ -24206,7 +24679,7 @@ namespace VULKAN_HPP_NAMESPACE
pVertexBindingDescriptions = vertexBindingDescriptions_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
PipelineVertexInputStateCreateInfo &
setVertexAttributeDescriptionCount( uint32_t vertexAttributeDescriptionCount_ ) VULKAN_HPP_NOEXCEPT
@@ -24222,7 +24695,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineVertexInputStateCreateInfo & setVertexAttributeDescriptions(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription> const &
vertexAttributeDescriptions_ ) VULKAN_HPP_NOEXCEPT
@@ -24231,7 +24704,8 @@ namespace VULKAN_HPP_NAMESPACE
pVertexAttributeDescriptions = vertexAttributeDescriptions_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineVertexInputStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -24315,6 +24789,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineInputAssemblyStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -24341,6 +24816,7 @@ namespace VULKAN_HPP_NAMESPACE
primitiveRestartEnable = primitiveRestartEnable_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineInputAssemblyStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -24417,6 +24893,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineTessellationStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -24435,6 +24912,7 @@ namespace VULKAN_HPP_NAMESPACE
patchControlPoints = patchControlPoints_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineTessellationStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -24527,6 +25005,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineViewportStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -24553,7 +25032,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineViewportStateCreateInfo & setViewports(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Viewport> const & viewports_ )
VULKAN_HPP_NOEXCEPT
@@ -24562,7 +25041,7 @@ namespace VULKAN_HPP_NAMESPACE
pViewports = viewports_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
PipelineViewportStateCreateInfo & setScissorCount( uint32_t scissorCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -24577,7 +25056,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineViewportStateCreateInfo &
setScissors( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Rect2D> const & scissors_ )
VULKAN_HPP_NOEXCEPT
@@ -24586,7 +25065,8 @@ namespace VULKAN_HPP_NAMESPACE
pScissors = scissors_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineViewportStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -24684,6 +25164,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineRasterizationStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -24763,6 +25244,7 @@ namespace VULKAN_HPP_NAMESPACE
lineWidth = lineWidth_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineRasterizationStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -24862,6 +25344,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineMultisampleStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -24915,6 +25398,7 @@ namespace VULKAN_HPP_NAMESPACE
alphaToOneEnable = alphaToOneEnable_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineMultisampleStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -25001,6 +25485,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
StencilOpState & setFailOp( VULKAN_HPP_NAMESPACE::StencilOp failOp_ ) VULKAN_HPP_NOEXCEPT
{
failOp = failOp_;
@@ -25042,6 +25527,7 @@ namespace VULKAN_HPP_NAMESPACE
reference = reference_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkStencilOpState const &() const VULKAN_HPP_NOEXCEPT
{
@@ -25129,6 +25615,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineDepthStencilStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -25202,6 +25689,7 @@ namespace VULKAN_HPP_NAMESPACE
maxDepthBounds = maxDepthBounds_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineDepthStencilStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -25295,6 +25783,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineColorBlendAttachmentState & setBlendEnable( VULKAN_HPP_NAMESPACE::Bool32 blendEnable_ ) VULKAN_HPP_NOEXCEPT
{
blendEnable = blendEnable_;
@@ -25349,6 +25838,7 @@ namespace VULKAN_HPP_NAMESPACE
colorWriteMask = colorWriteMask_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineColorBlendAttachmentState const &() const VULKAN_HPP_NOEXCEPT
{
@@ -25448,6 +25938,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineColorBlendStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -25487,7 +25978,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineColorBlendStateCreateInfo & setAttachments(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<
const VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState> const & attachments_ ) VULKAN_HPP_NOEXCEPT
@@ -25496,13 +25987,14 @@ namespace VULKAN_HPP_NAMESPACE
pAttachments = attachments_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
PipelineColorBlendStateCreateInfo & setBlendConstants( std::array<float, 4> blendConstants_ ) VULKAN_HPP_NOEXCEPT
{
blendConstants = blendConstants_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineColorBlendStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -25594,6 +26086,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineDynamicStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -25620,7 +26113,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineDynamicStateCreateInfo & setDynamicStates(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DynamicState> const & dynamicStates_ )
VULKAN_HPP_NOEXCEPT
@@ -25629,7 +26122,8 @@ namespace VULKAN_HPP_NAMESPACE
pDynamicStates = dynamicStates_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineDynamicStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -25773,6 +26267,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
GraphicsPipelineCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -25798,7 +26293,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
GraphicsPipelineCreateInfo & setStages(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo> const &
stages_ ) VULKAN_HPP_NOEXCEPT
@@ -25807,7 +26302,7 @@ namespace VULKAN_HPP_NAMESPACE
pStages = stages_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
GraphicsPipelineCreateInfo & setPVertexInputState(
const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ ) VULKAN_HPP_NOEXCEPT
@@ -25902,6 +26397,7 @@ namespace VULKAN_HPP_NAMESPACE
basePipelineIndex = basePipelineIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkGraphicsPipelineCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -26014,6 +26510,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
GraphicsShaderGroupCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -26033,7 +26530,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
GraphicsShaderGroupCreateInfoNV & setStages(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo> const &
stages_ ) VULKAN_HPP_NOEXCEPT
@@ -26042,7 +26539,7 @@ namespace VULKAN_HPP_NAMESPACE
pStages = stages_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
GraphicsShaderGroupCreateInfoNV & setPVertexInputState(
const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ ) VULKAN_HPP_NOEXCEPT
@@ -26057,6 +26554,7 @@ namespace VULKAN_HPP_NAMESPACE
pTessellationState = pTessellationState_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkGraphicsShaderGroupCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -26153,6 +26651,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
GraphicsPipelineShaderGroupsCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -26172,7 +26671,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
GraphicsPipelineShaderGroupsCreateInfoNV & setGroups(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::GraphicsShaderGroupCreateInfoNV> const &
groups_ ) VULKAN_HPP_NOEXCEPT
@@ -26181,7 +26680,7 @@ namespace VULKAN_HPP_NAMESPACE
pGroups = groups_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
GraphicsPipelineShaderGroupsCreateInfoNV & setPipelineCount( uint32_t pipelineCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -26196,7 +26695,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
GraphicsPipelineShaderGroupsCreateInfoNV & setPipelines(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Pipeline> const & pipelines_ )
VULKAN_HPP_NOEXCEPT
@@ -26205,7 +26704,8 @@ namespace VULKAN_HPP_NAMESPACE
pPipelines = pipelines_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkGraphicsPipelineShaderGroupsCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -26275,6 +26775,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
XYColorEXT & setX( float x_ ) VULKAN_HPP_NOEXCEPT
{
x = x_;
@@ -26286,6 +26787,7 @@ namespace VULKAN_HPP_NAMESPACE
y = y_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkXYColorEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -26357,6 +26859,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
HdrMetadataEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -26413,6 +26916,7 @@ namespace VULKAN_HPP_NAMESPACE
maxFrameAverageLightLevel = maxFrameAverageLightLevel_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkHdrMetadataEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -26490,6 +26994,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
HeadlessSurfaceCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -26502,6 +27007,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkHeadlessSurfaceCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -26572,6 +27078,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
IOSSurfaceCreateInfoMVK & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -26589,6 +27096,7 @@ namespace VULKAN_HPP_NAMESPACE
pView = pView_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkIOSSurfaceCreateInfoMVK const &() const VULKAN_HPP_NOEXCEPT
{
@@ -26659,6 +27167,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageBlit &
setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT
{
@@ -26684,6 +27193,7 @@ namespace VULKAN_HPP_NAMESPACE
dstOffsets = dstOffsets_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageBlit const &() const VULKAN_HPP_NOEXCEPT
{
@@ -26748,6 +27258,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageCopy &
setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT
{
@@ -26779,6 +27290,7 @@ namespace VULKAN_HPP_NAMESPACE
extent = extent_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageCopy const &() const VULKAN_HPP_NOEXCEPT
{
@@ -26895,6 +27407,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -26973,7 +27486,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
ImageCreateInfo & setQueueFamilyIndices(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & queueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT
{
@@ -26981,13 +27494,14 @@ namespace VULKAN_HPP_NAMESPACE
pQueueFamilyIndices = queueFamilyIndices_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
ImageCreateInfo & setInitialLayout( VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ ) VULKAN_HPP_NOEXCEPT
{
initialLayout = initialLayout_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -27158,6 +27672,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageDrmFormatModifierExplicitCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -27185,7 +27700,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
ImageDrmFormatModifierExplicitCreateInfoEXT & setPlaneLayouts(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SubresourceLayout> const &
planeLayouts_ ) VULKAN_HPP_NOEXCEPT
@@ -27194,7 +27709,8 @@ namespace VULKAN_HPP_NAMESPACE
pPlaneLayouts = planeLayouts_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageDrmFormatModifierExplicitCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -27282,6 +27798,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageDrmFormatModifierListCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -27302,7 +27819,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
ImageDrmFormatModifierListCreateInfoEXT & setDrmFormatModifiers(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint64_t> const & drmFormatModifiers_ ) VULKAN_HPP_NOEXCEPT
{
@@ -27310,7 +27827,8 @@ namespace VULKAN_HPP_NAMESPACE
pDrmFormatModifiers = drmFormatModifiers_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageDrmFormatModifierListCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -27462,6 +27980,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageFormatListCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -27481,7 +28000,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
ImageFormatListCreateInfo & setViewFormats(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Format> const & viewFormats_ )
VULKAN_HPP_NOEXCEPT
@@ -27490,7 +28009,8 @@ namespace VULKAN_HPP_NAMESPACE
pViewFormats = viewFormats_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageFormatListCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -27643,6 +28163,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageMemoryBarrier & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -27697,6 +28218,7 @@ namespace VULKAN_HPP_NAMESPACE
subresourceRange = subresourceRange_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageMemoryBarrier const &() const VULKAN_HPP_NOEXCEPT
{
@@ -27775,6 +28297,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageMemoryRequirementsInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -27786,6 +28309,7 @@ namespace VULKAN_HPP_NAMESPACE
image = image_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageMemoryRequirementsInfo2 const &() const VULKAN_HPP_NOEXCEPT
{
@@ -27860,6 +28384,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImagePipeSurfaceCreateInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -27878,6 +28403,7 @@ namespace VULKAN_HPP_NAMESPACE
imagePipeHandle = imagePipeHandle_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImagePipeSurfaceCreateInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT
{
@@ -27951,6 +28477,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImagePlaneMemoryRequirementsInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -27963,6 +28490,7 @@ namespace VULKAN_HPP_NAMESPACE
planeAspect = planeAspect_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImagePlaneMemoryRequirementsInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -28035,6 +28563,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageResolve &
setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT
{
@@ -28066,6 +28595,7 @@ namespace VULKAN_HPP_NAMESPACE
extent = extent_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageResolve const &() const VULKAN_HPP_NOEXCEPT
{
@@ -28135,6 +28665,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageResolve2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -28172,6 +28703,7 @@ namespace VULKAN_HPP_NAMESPACE
extent = extent_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageResolve2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -28248,6 +28780,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageSparseMemoryRequirementsInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -28259,6 +28792,7 @@ namespace VULKAN_HPP_NAMESPACE
image = image_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageSparseMemoryRequirementsInfo2 const &() const VULKAN_HPP_NOEXCEPT
{
@@ -28329,6 +28863,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageStencilUsageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -28341,6 +28876,7 @@ namespace VULKAN_HPP_NAMESPACE
stencilUsage = stencilUsage_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageStencilUsageCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -28411,6 +28947,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageSwapchainCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -28422,6 +28959,7 @@ namespace VULKAN_HPP_NAMESPACE
swapchain = swapchain_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageSwapchainCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -28491,6 +29029,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageViewASTCDecodeModeEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -28502,6 +29041,7 @@ namespace VULKAN_HPP_NAMESPACE
decodeMode = decodeMode_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageViewASTCDecodeModeEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -28652,6 +29192,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageViewCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -28695,6 +29236,7 @@ namespace VULKAN_HPP_NAMESPACE
subresourceRange = subresourceRange_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageViewCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -28773,6 +29315,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageViewHandleInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -28797,6 +29340,7 @@ namespace VULKAN_HPP_NAMESPACE
sampler = sampler_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageViewHandleInfoNVX const &() const VULKAN_HPP_NOEXCEPT
{
@@ -28867,6 +29411,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImageViewUsageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -28878,6 +29423,7 @@ namespace VULKAN_HPP_NAMESPACE
usage = usage_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImageViewUsageCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -28951,6 +29497,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImportAndroidHardwareBufferInfoANDROID & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -28962,6 +29509,7 @@ namespace VULKAN_HPP_NAMESPACE
buffer = buffer_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImportAndroidHardwareBufferInfoANDROID const &() const VULKAN_HPP_NOEXCEPT
{
@@ -29037,6 +29585,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImportFenceFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -29067,6 +29616,7 @@ namespace VULKAN_HPP_NAMESPACE
fd = fd_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImportFenceFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -29150,6 +29700,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImportFenceWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -29186,6 +29737,7 @@ namespace VULKAN_HPP_NAMESPACE
name = name_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImportFenceWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -29263,6 +29815,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImportMemoryFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -29281,6 +29834,7 @@ namespace VULKAN_HPP_NAMESPACE
fd = fd_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImportMemoryFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -29354,6 +29908,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImportMemoryHostPointerInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -29372,6 +29927,7 @@ namespace VULKAN_HPP_NAMESPACE
pHostPointer = pHostPointer_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImportMemoryHostPointerInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -29450,6 +30006,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImportMemoryWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -29474,6 +30031,7 @@ namespace VULKAN_HPP_NAMESPACE
name = name_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImportMemoryWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -29551,6 +30109,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImportMemoryWin32HandleInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -29569,6 +30128,7 @@ namespace VULKAN_HPP_NAMESPACE
handle = handle_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImportMemoryWin32HandleInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -29647,6 +30207,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImportMemoryZirconHandleInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -29665,6 +30226,7 @@ namespace VULKAN_HPP_NAMESPACE
handle = handle_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImportMemoryZirconHandleInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT
{
@@ -29744,6 +30306,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImportSemaphoreFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -29774,6 +30337,7 @@ namespace VULKAN_HPP_NAMESPACE
fd = fd_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImportSemaphoreFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -29858,6 +30422,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImportSemaphoreWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -29895,6 +30460,7 @@ namespace VULKAN_HPP_NAMESPACE
name = name_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImportSemaphoreWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -29983,6 +30549,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ImportSemaphoreZirconHandleInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -30015,6 +30582,7 @@ namespace VULKAN_HPP_NAMESPACE
zirconHandle = zirconHandle_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkImportSemaphoreZirconHandleInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT
{
@@ -30157,6 +30725,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
IndirectCommandsLayoutTokenNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -30241,7 +30810,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
IndirectCommandsLayoutTokenNV & setIndexTypes(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::IndexType> const & indexTypes_ )
VULKAN_HPP_NOEXCEPT
@@ -30250,7 +30819,7 @@ namespace VULKAN_HPP_NAMESPACE
pIndexTypes = indexTypes_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
IndirectCommandsLayoutTokenNV & setPIndexTypeValues( const uint32_t * pIndexTypeValues_ ) VULKAN_HPP_NOEXCEPT
{
@@ -30258,7 +30827,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
IndirectCommandsLayoutTokenNV & setIndexTypeValues(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & indexTypeValues_ ) VULKAN_HPP_NOEXCEPT
{
@@ -30266,7 +30835,8 @@ namespace VULKAN_HPP_NAMESPACE
pIndexTypeValues = indexTypeValues_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkIndirectCommandsLayoutTokenNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -30384,6 +30954,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
IndirectCommandsLayoutCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -30417,7 +30988,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
IndirectCommandsLayoutCreateInfoNV & setTokens(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNV> const &
tokens_ ) VULKAN_HPP_NOEXCEPT
@@ -30426,7 +30997,7 @@ namespace VULKAN_HPP_NAMESPACE
pTokens = tokens_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
IndirectCommandsLayoutCreateInfoNV & setStreamCount( uint32_t streamCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -30440,7 +31011,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
IndirectCommandsLayoutCreateInfoNV & setStreamStrides(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & streamStrides_ ) VULKAN_HPP_NOEXCEPT
{
@@ -30448,7 +31019,8 @@ namespace VULKAN_HPP_NAMESPACE
pStreamStrides = streamStrides_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkIndirectCommandsLayoutCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -30526,6 +31098,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
InitializePerformanceApiInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -30537,6 +31110,7 @@ namespace VULKAN_HPP_NAMESPACE
pUserData = pUserData_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkInitializePerformanceApiInfoINTEL const &() const VULKAN_HPP_NOEXCEPT
{
@@ -30607,6 +31181,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
InputAttachmentAspectReference & setSubpass( uint32_t subpass_ ) VULKAN_HPP_NOEXCEPT
{
subpass = subpass_;
@@ -30625,6 +31200,7 @@ namespace VULKAN_HPP_NAMESPACE
aspectMask = aspectMask_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkInputAttachmentAspectReference const &() const VULKAN_HPP_NOEXCEPT
{
@@ -30713,6 +31289,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
InstanceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -30744,7 +31321,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
InstanceCreateInfo & setPEnabledLayerNames(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const char * const> const & pEnabledLayerNames_ )
VULKAN_HPP_NOEXCEPT
@@ -30753,7 +31330,7 @@ namespace VULKAN_HPP_NAMESPACE
ppEnabledLayerNames = pEnabledLayerNames_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
InstanceCreateInfo & setEnabledExtensionCount( uint32_t enabledExtensionCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -30767,7 +31344,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
InstanceCreateInfo & setPEnabledExtensionNames(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const char * const> const & pEnabledExtensionNames_ )
VULKAN_HPP_NOEXCEPT
@@ -30776,7 +31353,8 @@ namespace VULKAN_HPP_NAMESPACE
ppEnabledExtensionNames = pEnabledExtensionNames_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkInstanceCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -30919,6 +31497,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MacOSSurfaceCreateInfoMVK & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -30936,6 +31515,7 @@ namespace VULKAN_HPP_NAMESPACE
pView = pView_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMacOSSurfaceCreateInfoMVK const &() const VULKAN_HPP_NOEXCEPT
{
@@ -31009,6 +31589,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MappedMemoryRange & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -31032,6 +31613,7 @@ namespace VULKAN_HPP_NAMESPACE
size = size_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMappedMemoryRange const &() const VULKAN_HPP_NOEXCEPT
{
@@ -31103,6 +31685,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MemoryAllocateFlagsInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -31120,6 +31703,7 @@ namespace VULKAN_HPP_NAMESPACE
deviceMask = deviceMask_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMemoryAllocateFlagsInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -31191,6 +31775,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MemoryAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -31208,6 +31793,7 @@ namespace VULKAN_HPP_NAMESPACE
memoryTypeIndex = memoryTypeIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMemoryAllocateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -31277,6 +31863,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MemoryBarrier & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -31294,6 +31881,7 @@ namespace VULKAN_HPP_NAMESPACE
dstAccessMask = dstAccessMask_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMemoryBarrier const &() const VULKAN_HPP_NOEXCEPT
{
@@ -31364,6 +31952,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MemoryDedicatedAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -31381,6 +31970,7 @@ namespace VULKAN_HPP_NAMESPACE
buffer = buffer_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMemoryDedicatedAllocateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -31596,6 +32186,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MemoryGetAndroidHardwareBufferInfoANDROID & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -31608,6 +32199,7 @@ namespace VULKAN_HPP_NAMESPACE
memory = memory_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMemoryGetAndroidHardwareBufferInfoANDROID const &() const VULKAN_HPP_NOEXCEPT
{
@@ -31681,6 +32273,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MemoryGetFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -31699,6 +32292,7 @@ namespace VULKAN_HPP_NAMESPACE
handleType = handleType_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMemoryGetFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -31742,6 +32336,101 @@ namespace VULKAN_HPP_NAMESPACE
using Type = MemoryGetFdInfoKHR;
};
+ struct MemoryGetRemoteAddressInfoNV
+ {
+ static const bool allowDuplicate = false;
+ static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryGetRemoteAddressInfoNV;
+
+#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
+ VULKAN_HPP_CONSTEXPR MemoryGetRemoteAddressInfoNV(
+ VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {},
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ =
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) VULKAN_HPP_NOEXCEPT
+ : memory( memory_ )
+ , handleType( handleType_ )
+ {}
+
+ VULKAN_HPP_CONSTEXPR
+ MemoryGetRemoteAddressInfoNV( MemoryGetRemoteAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ MemoryGetRemoteAddressInfoNV( VkMemoryGetRemoteAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ : MemoryGetRemoteAddressInfoNV( *reinterpret_cast<MemoryGetRemoteAddressInfoNV const *>( &rhs ) )
+ {}
+#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/
+
+ VULKAN_HPP_CONSTEXPR_14 MemoryGetRemoteAddressInfoNV &
+ operator=( MemoryGetRemoteAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ MemoryGetRemoteAddressInfoNV & operator=( VkMemoryGetRemoteAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV const *>( &rhs );
+ return *this;
+ }
+
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
+ MemoryGetRemoteAddressInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ MemoryGetRemoteAddressInfoNV & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT
+ {
+ memory = memory_;
+ return *this;
+ }
+
+ MemoryGetRemoteAddressInfoNV &
+ setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT
+ {
+ handleType = handleType_;
+ return *this;
+ }
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
+
+ operator VkMemoryGetRemoteAddressInfoNV const &() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkMemoryGetRemoteAddressInfoNV *>( this );
+ }
+
+ operator VkMemoryGetRemoteAddressInfoNV &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkMemoryGetRemoteAddressInfoNV *>( this );
+ }
+
+#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
+ auto operator<=>( MemoryGetRemoteAddressInfoNV const & ) const = default;
+#else
+ bool operator==( MemoryGetRemoteAddressInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) &&
+ ( handleType == rhs.handleType );
+ }
+
+ bool operator!=( MemoryGetRemoteAddressInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+#endif
+
+ public:
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryGetRemoteAddressInfoNV;
+ const void * pNext = {};
+ VULKAN_HPP_NAMESPACE::DeviceMemory memory = {};
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType =
+ VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd;
+ };
+ static_assert( sizeof( MemoryGetRemoteAddressInfoNV ) == sizeof( VkMemoryGetRemoteAddressInfoNV ),
+ "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<MemoryGetRemoteAddressInfoNV>::value,
+ "struct wrapper is not a standard layout!" );
+
+ template <>
+ struct CppType<StructureType, StructureType::eMemoryGetRemoteAddressInfoNV>
+ {
+ using Type = MemoryGetRemoteAddressInfoNV;
+ };
+
#if defined( VK_USE_PLATFORM_WIN32_KHR )
struct MemoryGetWin32HandleInfoKHR
{
@@ -31774,6 +32463,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MemoryGetWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -31792,6 +32482,7 @@ namespace VULKAN_HPP_NAMESPACE
handleType = handleType_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMemoryGetWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -31869,6 +32560,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MemoryGetZirconHandleInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -31887,6 +32579,7 @@ namespace VULKAN_HPP_NAMESPACE
handleType = handleType_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMemoryGetZirconHandleInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT
{
@@ -32085,6 +32778,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MemoryOpaqueCaptureAddressAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -32097,6 +32791,7 @@ namespace VULKAN_HPP_NAMESPACE
opaqueCaptureAddress = opaqueCaptureAddress_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMemoryOpaqueCaptureAddressAllocateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -32166,6 +32861,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MemoryPriorityAllocateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -32177,6 +32873,7 @@ namespace VULKAN_HPP_NAMESPACE
priority = priority_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMemoryPriorityAllocateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -32570,6 +33267,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MetalSurfaceCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -32587,6 +33285,7 @@ namespace VULKAN_HPP_NAMESPACE
pLayer = pLayer_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMetalSurfaceCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -32657,6 +33356,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MultiDrawIndexedInfoEXT & setFirstIndex( uint32_t firstIndex_ ) VULKAN_HPP_NOEXCEPT
{
firstIndex = firstIndex_;
@@ -32674,6 +33374,7 @@ namespace VULKAN_HPP_NAMESPACE
vertexOffset = vertexOffset_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMultiDrawIndexedInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -32732,6 +33433,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MultiDrawInfoEXT & setFirstVertex( uint32_t firstVertex_ ) VULKAN_HPP_NOEXCEPT
{
firstVertex = firstVertex_;
@@ -32743,6 +33445,7 @@ namespace VULKAN_HPP_NAMESPACE
vertexCount = vertexCount_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMultiDrawInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -32879,6 +33582,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MutableDescriptorTypeListVALVE & setDescriptorTypeCount( uint32_t descriptorTypeCount_ ) VULKAN_HPP_NOEXCEPT
{
descriptorTypeCount = descriptorTypeCount_;
@@ -32892,7 +33596,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
MutableDescriptorTypeListVALVE & setDescriptorTypes(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DescriptorType> const &
descriptorTypes_ ) VULKAN_HPP_NOEXCEPT
@@ -32901,7 +33605,8 @@ namespace VULKAN_HPP_NAMESPACE
pDescriptorTypes = descriptorTypes_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMutableDescriptorTypeListVALVE const &() const VULKAN_HPP_NOEXCEPT
{
@@ -32978,6 +33683,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
MutableDescriptorTypeCreateInfoVALVE & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -32998,7 +33704,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
MutableDescriptorTypeCreateInfoVALVE & setMutableDescriptorTypeLists(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::MutableDescriptorTypeListVALVE> const &
mutableDescriptorTypeLists_ ) VULKAN_HPP_NOEXCEPT
@@ -33007,7 +33713,8 @@ namespace VULKAN_HPP_NAMESPACE
pMutableDescriptorTypeLists = mutableDescriptorTypeLists_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkMutableDescriptorTypeCreateInfoVALVE const &() const VULKAN_HPP_NOEXCEPT
{
@@ -33155,6 +33862,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PerformanceConfigurationAcquireInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -33167,6 +33875,7 @@ namespace VULKAN_HPP_NAMESPACE
type = type_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPerformanceConfigurationAcquireInfoINTEL const &() const VULKAN_HPP_NOEXCEPT
{
@@ -33271,7 +33980,7 @@ namespace VULKAN_HPP_NAMESPACE
public:
VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceCounterDescriptionKHR;
- const void * pNext = {};
+ void * pNext = {};
VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionFlagsKHR flags = {};
VULKAN_HPP_NAMESPACE::ArrayWrapper1D<char, VK_MAX_DESCRIPTION_SIZE> name = {};
VULKAN_HPP_NAMESPACE::ArrayWrapper1D<char, VK_MAX_DESCRIPTION_SIZE> category = {};
@@ -33350,7 +34059,7 @@ namespace VULKAN_HPP_NAMESPACE
public:
VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceCounterKHR;
- const void * pNext = {};
+ void * pNext = {};
VULKAN_HPP_NAMESPACE::PerformanceCounterUnitKHR unit = VULKAN_HPP_NAMESPACE::PerformanceCounterUnitKHR::eGeneric;
VULKAN_HPP_NAMESPACE::PerformanceCounterScopeKHR scope =
VULKAN_HPP_NAMESPACE::PerformanceCounterScopeKHR::eCommandBuffer;
@@ -33370,6 +34079,7 @@ namespace VULKAN_HPP_NAMESPACE
union PerformanceCounterResultKHR
{
+#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS )
PerformanceCounterResultKHR( VULKAN_HPP_NAMESPACE::PerformanceCounterResultKHR const & rhs ) VULKAN_HPP_NOEXCEPT
{
memcpy( static_cast<void *>( this ), &rhs, sizeof( VULKAN_HPP_NAMESPACE::PerformanceCounterResultKHR ) );
@@ -33386,7 +34096,9 @@ namespace VULKAN_HPP_NAMESPACE
PerformanceCounterResultKHR( float float32_ ) : float32( float32_ ) {}
PerformanceCounterResultKHR( double float64_ ) : float64( float64_ ) {}
+#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/
+#if !defined( VULKAN_HPP_NO_UNION_SETTERS )
PerformanceCounterResultKHR & setInt32( int32_t int32_ ) VULKAN_HPP_NOEXCEPT
{
int32 = int32_;
@@ -33422,6 +34134,7 @@ namespace VULKAN_HPP_NAMESPACE
float64 = float64_;
return *this;
}
+#endif /*VULKAN_HPP_NO_UNION_SETTERS*/
VULKAN_HPP_NAMESPACE::PerformanceCounterResultKHR &
operator=( VULKAN_HPP_NAMESPACE::PerformanceCounterResultKHR const & rhs ) VULKAN_HPP_NOEXCEPT
@@ -33473,6 +34186,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PerformanceMarkerInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -33484,6 +34198,7 @@ namespace VULKAN_HPP_NAMESPACE
marker = marker_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPerformanceMarkerInfoINTEL const &() const VULKAN_HPP_NOEXCEPT
{
@@ -33558,6 +34273,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PerformanceOverrideInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -33582,6 +34298,7 @@ namespace VULKAN_HPP_NAMESPACE
parameter = parameter_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPerformanceOverrideInfoINTEL const &() const VULKAN_HPP_NOEXCEPT
{
@@ -33654,6 +34371,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PerformanceQuerySubmitInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -33665,6 +34383,7 @@ namespace VULKAN_HPP_NAMESPACE
counterPassIndex = counterPassIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPerformanceQuerySubmitInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -33733,6 +34452,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PerformanceStreamMarkerInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -33744,6 +34464,7 @@ namespace VULKAN_HPP_NAMESPACE
marker = marker_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPerformanceStreamMarkerInfoINTEL const &() const VULKAN_HPP_NOEXCEPT
{
@@ -33787,6 +34508,7 @@ namespace VULKAN_HPP_NAMESPACE
union PerformanceValueDataINTEL
{
+#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS )
PerformanceValueDataINTEL( VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
{
memcpy( static_cast<void *>( this ), &rhs, sizeof( VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL ) );
@@ -33799,7 +34521,9 @@ namespace VULKAN_HPP_NAMESPACE
PerformanceValueDataINTEL( float valueFloat_ ) : valueFloat( valueFloat_ ) {}
PerformanceValueDataINTEL( const char * valueString_ ) : valueString( valueString_ ) {}
+#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/
+#if !defined( VULKAN_HPP_NO_UNION_SETTERS )
PerformanceValueDataINTEL & setValue32( uint32_t value32_ ) VULKAN_HPP_NOEXCEPT
{
value32 = value32_;
@@ -33829,6 +34553,7 @@ namespace VULKAN_HPP_NAMESPACE
valueString = valueString_;
return *this;
}
+#endif /*VULKAN_HPP_NO_UNION_SETTERS*/
VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL &
operator=( VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL const & rhs ) VULKAN_HPP_NOEXCEPT
@@ -33887,6 +34612,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PerformanceValueINTEL & setType( VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL type_ ) VULKAN_HPP_NOEXCEPT
{
type = type_;
@@ -33898,6 +34624,7 @@ namespace VULKAN_HPP_NAMESPACE
data = data_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPerformanceValueINTEL const &() const VULKAN_HPP_NOEXCEPT
{
@@ -33953,6 +34680,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDevice16BitStorageFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -33986,6 +34714,7 @@ namespace VULKAN_HPP_NAMESPACE
storageInputOutput16 = storageInputOutput16_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDevice16BitStorageFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -34067,6 +34796,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDevice4444FormatsFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -34086,6 +34816,7 @@ namespace VULKAN_HPP_NAMESPACE
formatA4B4G4R4 = formatA4B4G4R4_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDevice4444FormatsFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -34162,6 +34893,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDevice8BitStorageFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -34188,6 +34920,7 @@ namespace VULKAN_HPP_NAMESPACE
storagePushConstant8 = storagePushConstant8_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDevice8BitStorageFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -34265,6 +34998,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceASTCDecodeFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -34277,6 +35011,7 @@ namespace VULKAN_HPP_NAMESPACE
decodeModeSharedExponent = decodeModeSharedExponent_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceASTCDecodeFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -34359,6 +35094,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceAccelerationStructureFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -34399,6 +35135,7 @@ namespace VULKAN_HPP_NAMESPACE
descriptorBindingAccelerationStructureUpdateAfterBind = descriptorBindingAccelerationStructureUpdateAfterBind_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceAccelerationStructureFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -34586,6 +35323,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceBlendOperationAdvancedFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -34598,6 +35336,7 @@ namespace VULKAN_HPP_NAMESPACE
advancedBlendCoherentOperations = advancedBlendCoherentOperations_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -34772,6 +35511,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceBufferDeviceAddressFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -34798,6 +35538,7 @@ namespace VULKAN_HPP_NAMESPACE
bufferDeviceAddressMultiDevice = bufferDeviceAddressMultiDevice_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceBufferDeviceAddressFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -34881,6 +35622,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceBufferDeviceAddressFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -34907,6 +35649,7 @@ namespace VULKAN_HPP_NAMESPACE
bufferDeviceAddressMultiDevice = bufferDeviceAddressMultiDevice_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceBufferDeviceAddressFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -34985,6 +35728,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceCoherentMemoryFeaturesAMD & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -34997,6 +35741,7 @@ namespace VULKAN_HPP_NAMESPACE
deviceCoherentMemory = deviceCoherentMemory_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceCoherentMemoryFeaturesAMD const &() const VULKAN_HPP_NOEXCEPT
{
@@ -35070,6 +35815,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceColorWriteEnableFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -35082,6 +35828,7 @@ namespace VULKAN_HPP_NAMESPACE
colorWriteEnable = colorWriteEnable_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceColorWriteEnableFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -35158,6 +35905,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceComputeShaderDerivativesFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -35177,6 +35925,7 @@ namespace VULKAN_HPP_NAMESPACE
computeDerivativeGroupLinear = computeDerivativeGroupLinear_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceComputeShaderDerivativesFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -35256,6 +36005,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceConditionalRenderingFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -35275,6 +36025,7 @@ namespace VULKAN_HPP_NAMESPACE
inheritedConditionalRendering = inheritedConditionalRendering_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceConditionalRenderingFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -35460,6 +36211,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceCooperativeMatrixFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -35479,6 +36231,7 @@ namespace VULKAN_HPP_NAMESPACE
cooperativeMatrixRobustBufferAccess = cooperativeMatrixRobustBufferAccess_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceCooperativeMatrixFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -35629,6 +36382,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceCornerSampledImageFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -35641,6 +36395,7 @@ namespace VULKAN_HPP_NAMESPACE
cornerSampledImage = cornerSampledImage_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceCornerSampledImageFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -35715,6 +36470,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceCoverageReductionModeFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -35727,6 +36483,7 @@ namespace VULKAN_HPP_NAMESPACE
coverageReductionMode = coverageReductionMode_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceCoverageReductionModeFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -35803,6 +36560,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceCustomBorderColorFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -35822,6 +36580,7 @@ namespace VULKAN_HPP_NAMESPACE
customBorderColorWithoutFormat = customBorderColorWithoutFormat_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceCustomBorderColorFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -35973,6 +36732,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -35985,6 +36745,7 @@ namespace VULKAN_HPP_NAMESPACE
dedicatedAllocationImageAliasing = dedicatedAllocationImageAliasing_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -36061,6 +36822,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceDepthClipEnableFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -36073,6 +36835,7 @@ namespace VULKAN_HPP_NAMESPACE
depthClipEnable = depthClipEnable_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceDepthClipEnableFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -36272,6 +37035,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceDescriptorIndexingFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -36417,6 +37181,7 @@ namespace VULKAN_HPP_NAMESPACE
runtimeDescriptorArray = runtimeDescriptorArray_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceDescriptorIndexingFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -36710,6 +37475,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceDeviceGeneratedCommandsFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -36722,6 +37488,7 @@ namespace VULKAN_HPP_NAMESPACE
deviceGeneratedCommands = deviceGeneratedCommands_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -36904,6 +37671,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceDeviceMemoryReportFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -36916,6 +37684,7 @@ namespace VULKAN_HPP_NAMESPACE
deviceMemoryReport = deviceMemoryReport_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceDeviceMemoryReportFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -36990,6 +37759,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceDiagnosticsConfigFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -37002,6 +37772,7 @@ namespace VULKAN_HPP_NAMESPACE
diagnosticsConfig = diagnosticsConfig_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceDiagnosticsConfigFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -37313,6 +38084,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceExclusiveScissorFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -37325,6 +38097,7 @@ namespace VULKAN_HPP_NAMESPACE
exclusiveScissor = exclusiveScissor_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceExclusiveScissorFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -37403,6 +38176,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceExtendedDynamicState2FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -37429,6 +38203,7 @@ namespace VULKAN_HPP_NAMESPACE
extendedDynamicState2PatchControlPoints = extendedDynamicState2PatchControlPoints_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceExtendedDynamicState2FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -37508,6 +38283,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceExtendedDynamicStateFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -37520,6 +38296,7 @@ namespace VULKAN_HPP_NAMESPACE
extendedDynamicState = extendedDynamicState_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceExtendedDynamicStateFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -37595,6 +38372,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceExternalBufferInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -37619,6 +38397,7 @@ namespace VULKAN_HPP_NAMESPACE
handleType = handleType_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceExternalBufferInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -37694,6 +38473,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceExternalFenceInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -37706,6 +38486,7 @@ namespace VULKAN_HPP_NAMESPACE
handleType = handleType_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceExternalFenceInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -37781,6 +38562,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceExternalImageFormatInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -37793,6 +38575,7 @@ namespace VULKAN_HPP_NAMESPACE
handleType = handleType_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceExternalImageFormatInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -37910,6 +38693,94 @@ namespace VULKAN_HPP_NAMESPACE
using Type = PhysicalDeviceExternalMemoryHostPropertiesEXT;
};
+ struct PhysicalDeviceExternalMemoryRDMAFeaturesNV
+ {
+ static const bool allowDuplicate = false;
+ static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType =
+ StructureType::ePhysicalDeviceExternalMemoryRdmaFeaturesNV;
+
+#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalMemoryRDMAFeaturesNV(
+ VULKAN_HPP_NAMESPACE::Bool32 externalMemoryRDMA_ = {} ) VULKAN_HPP_NOEXCEPT
+ : externalMemoryRDMA( externalMemoryRDMA_ )
+ {}
+
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalMemoryRDMAFeaturesNV(
+ PhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDeviceExternalMemoryRDMAFeaturesNV( VkPhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs )
+ VULKAN_HPP_NOEXCEPT
+ : PhysicalDeviceExternalMemoryRDMAFeaturesNV(
+ *reinterpret_cast<PhysicalDeviceExternalMemoryRDMAFeaturesNV const *>( &rhs ) )
+ {}
+#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/
+
+ VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalMemoryRDMAFeaturesNV &
+ operator=( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDeviceExternalMemoryRDMAFeaturesNV &
+ operator=( VkPhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryRDMAFeaturesNV const *>( &rhs );
+ return *this;
+ }
+
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
+ PhysicalDeviceExternalMemoryRDMAFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceExternalMemoryRDMAFeaturesNV &
+ setExternalMemoryRDMA( VULKAN_HPP_NAMESPACE::Bool32 externalMemoryRDMA_ ) VULKAN_HPP_NOEXCEPT
+ {
+ externalMemoryRDMA = externalMemoryRDMA_;
+ return *this;
+ }
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
+
+ operator VkPhysicalDeviceExternalMemoryRDMAFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceExternalMemoryRDMAFeaturesNV *>( this );
+ }
+
+ operator VkPhysicalDeviceExternalMemoryRDMAFeaturesNV &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDeviceExternalMemoryRDMAFeaturesNV *>( this );
+ }
+
+#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
+ auto operator<=>( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & ) const = default;
+#else
+ bool operator==( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( externalMemoryRDMA == rhs.externalMemoryRDMA );
+ }
+
+ bool operator!=( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+#endif
+
+ public:
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalMemoryRdmaFeaturesNV;
+ void * pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 externalMemoryRDMA = {};
+ };
+ static_assert( sizeof( PhysicalDeviceExternalMemoryRDMAFeaturesNV ) ==
+ sizeof( VkPhysicalDeviceExternalMemoryRDMAFeaturesNV ),
+ "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceExternalMemoryRDMAFeaturesNV>::value,
+ "struct wrapper is not a standard layout!" );
+
+ template <>
+ struct CppType<StructureType, StructureType::ePhysicalDeviceExternalMemoryRdmaFeaturesNV>
+ {
+ using Type = PhysicalDeviceExternalMemoryRDMAFeaturesNV;
+ };
+
struct PhysicalDeviceExternalSemaphoreInfo
{
static const bool allowDuplicate = false;
@@ -37941,6 +38812,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceExternalSemaphoreInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -37953,6 +38825,7 @@ namespace VULKAN_HPP_NAMESPACE
handleType = handleType_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceExternalSemaphoreInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -38023,6 +38896,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceFeatures2 & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -38035,6 +38909,7 @@ namespace VULKAN_HPP_NAMESPACE
features = features_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceFeatures2 const &() const VULKAN_HPP_NOEXCEPT
{
@@ -38249,6 +39124,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceFragmentDensityMap2FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -38261,6 +39137,7 @@ namespace VULKAN_HPP_NAMESPACE
fragmentDensityMapDeferred = fragmentDensityMapDeferred_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceFragmentDensityMap2FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -38425,6 +39302,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceFragmentDensityMapFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -38451,6 +39329,7 @@ namespace VULKAN_HPP_NAMESPACE
fragmentDensityMapNonSubsampledImages = fragmentDensityMapNonSubsampledImages_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceFragmentDensityMapFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -38612,6 +39491,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceFragmentShaderBarycentricFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -38624,6 +39504,7 @@ namespace VULKAN_HPP_NAMESPACE
fragmentShaderBarycentric = fragmentShaderBarycentric_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -38703,6 +39584,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceFragmentShaderInterlockFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -38729,6 +39611,7 @@ namespace VULKAN_HPP_NAMESPACE
fragmentShaderShadingRateInterlock = fragmentShaderShadingRateInterlock_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -38812,6 +39695,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceFragmentShadingRateEnumsFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -38838,6 +39722,7 @@ namespace VULKAN_HPP_NAMESPACE
noInvocationFragmentShadingRates = noInvocationFragmentShadingRates_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -38919,6 +39804,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceFragmentShadingRateEnumsPropertiesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -38931,6 +39817,7 @@ namespace VULKAN_HPP_NAMESPACE
maxFragmentShadingRateInvocationCount = maxFragmentShadingRateInvocationCount_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -39011,6 +39898,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceFragmentShadingRateFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -39037,6 +39925,7 @@ namespace VULKAN_HPP_NAMESPACE
attachmentFragmentShadingRate = attachmentFragmentShadingRate_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceFragmentShadingRateFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -39334,6 +40223,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceGlobalPriorityQueryFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -39346,6 +40236,7 @@ namespace VULKAN_HPP_NAMESPACE
globalPriorityQuery = globalPriorityQuery_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceGlobalPriorityQueryFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -39495,6 +40386,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceHostQueryResetFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -39507,6 +40399,7 @@ namespace VULKAN_HPP_NAMESPACE
hostQueryReset = hostQueryReset_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceHostQueryResetFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -39682,6 +40575,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceImageDrmFormatModifierInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -39716,7 +40610,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PhysicalDeviceImageDrmFormatModifierInfoEXT & setQueueFamilyIndices(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & queueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT
{
@@ -39724,7 +40618,8 @@ namespace VULKAN_HPP_NAMESPACE
pQueueFamilyIndices = queueFamilyIndices_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceImageDrmFormatModifierInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -39808,6 +40703,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceImageFormatInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -39843,6 +40739,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceImageFormatInfo2 const &() const VULKAN_HPP_NOEXCEPT
{
@@ -39922,6 +40819,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceImageRobustnessFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -39934,6 +40832,7 @@ namespace VULKAN_HPP_NAMESPACE
robustImageAccess = robustImageAccess_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceImageRobustnessFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -40009,6 +40908,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceImageViewImageFormatInfoEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -40021,6 +40921,7 @@ namespace VULKAN_HPP_NAMESPACE
imageViewType = imageViewType_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceImageViewImageFormatInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -40095,6 +40996,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceImagelessFramebufferFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -40107,6 +41009,7 @@ namespace VULKAN_HPP_NAMESPACE
imagelessFramebuffer = imagelessFramebuffer_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceImagelessFramebufferFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -40181,6 +41084,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceIndexTypeUint8FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -40193,6 +41097,7 @@ namespace VULKAN_HPP_NAMESPACE
indexTypeUint8 = indexTypeUint8_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceIndexTypeUint8FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -40267,6 +41172,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceInheritedViewportScissorFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -40279,6 +41185,7 @@ namespace VULKAN_HPP_NAMESPACE
inheritedViewportScissor2D = inheritedViewportScissor2D_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceInheritedViewportScissorFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -40356,6 +41263,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceInlineUniformBlockFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -40375,6 +41283,7 @@ namespace VULKAN_HPP_NAMESPACE
descriptorBindingInlineUniformBlockUpdateAfterBind = descriptorBindingInlineUniformBlockUpdateAfterBind_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceInlineUniformBlockFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -40513,6 +41422,93 @@ namespace VULKAN_HPP_NAMESPACE
using Type = PhysicalDeviceInlineUniformBlockPropertiesEXT;
};
+ struct PhysicalDeviceInvocationMaskFeaturesHUAWEI
+ {
+ static const bool allowDuplicate = false;
+ static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType =
+ StructureType::ePhysicalDeviceInvocationMaskFeaturesHUAWEI;
+
+#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceInvocationMaskFeaturesHUAWEI( VULKAN_HPP_NAMESPACE::Bool32 invocationMask_ = {} )
+ VULKAN_HPP_NOEXCEPT : invocationMask( invocationMask_ )
+ {}
+
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceInvocationMaskFeaturesHUAWEI(
+ PhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDeviceInvocationMaskFeaturesHUAWEI( VkPhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs )
+ VULKAN_HPP_NOEXCEPT
+ : PhysicalDeviceInvocationMaskFeaturesHUAWEI(
+ *reinterpret_cast<PhysicalDeviceInvocationMaskFeaturesHUAWEI const *>( &rhs ) )
+ {}
+#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/
+
+ VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInvocationMaskFeaturesHUAWEI &
+ operator=( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDeviceInvocationMaskFeaturesHUAWEI &
+ operator=( VkPhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceInvocationMaskFeaturesHUAWEI const *>( &rhs );
+ return *this;
+ }
+
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
+ PhysicalDeviceInvocationMaskFeaturesHUAWEI & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceInvocationMaskFeaturesHUAWEI &
+ setInvocationMask( VULKAN_HPP_NAMESPACE::Bool32 invocationMask_ ) VULKAN_HPP_NOEXCEPT
+ {
+ invocationMask = invocationMask_;
+ return *this;
+ }
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
+
+ operator VkPhysicalDeviceInvocationMaskFeaturesHUAWEI const &() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceInvocationMaskFeaturesHUAWEI *>( this );
+ }
+
+ operator VkPhysicalDeviceInvocationMaskFeaturesHUAWEI &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDeviceInvocationMaskFeaturesHUAWEI *>( this );
+ }
+
+#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
+ auto operator<=>( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & ) const = default;
+#else
+ bool operator==( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( invocationMask == rhs.invocationMask );
+ }
+
+ bool operator!=( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+#endif
+
+ public:
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceInvocationMaskFeaturesHUAWEI;
+ void * pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 invocationMask = {};
+ };
+ static_assert( sizeof( PhysicalDeviceInvocationMaskFeaturesHUAWEI ) ==
+ sizeof( VkPhysicalDeviceInvocationMaskFeaturesHUAWEI ),
+ "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceInvocationMaskFeaturesHUAWEI>::value,
+ "struct wrapper is not a standard layout!" );
+
+ template <>
+ struct CppType<StructureType, StructureType::ePhysicalDeviceInvocationMaskFeaturesHUAWEI>
+ {
+ using Type = PhysicalDeviceInvocationMaskFeaturesHUAWEI;
+ };
+
struct PhysicalDeviceLimits
{
#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
@@ -41023,6 +42019,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceLineRasterizationFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -41070,6 +42067,7 @@ namespace VULKAN_HPP_NAMESPACE
stippledSmoothLines = stippledSmoothLines_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceLineRasterizationFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -41377,6 +42375,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceMemoryPriorityFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -41389,6 +42388,7 @@ namespace VULKAN_HPP_NAMESPACE
memoryPriority = memoryPriority_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceMemoryPriorityFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -41599,6 +42599,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceMeshShaderFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -41616,6 +42617,7 @@ namespace VULKAN_HPP_NAMESPACE
meshShader = meshShader_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceMeshShaderFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -41808,6 +42810,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceMultiDrawFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -41819,6 +42822,7 @@ namespace VULKAN_HPP_NAMESPACE
multiDraw = multiDraw_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceMultiDrawFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -41961,6 +42965,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceMultiviewFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -41986,6 +42991,7 @@ namespace VULKAN_HPP_NAMESPACE
multiviewTessellationShader = multiviewTessellationShader_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceMultiviewFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -42214,6 +43220,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceMutableDescriptorTypeFeaturesVALVE & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -42226,6 +43233,7 @@ namespace VULKAN_HPP_NAMESPACE
mutableDescriptorType = mutableDescriptorType_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE const &() const VULKAN_HPP_NOEXCEPT
{
@@ -42382,6 +43390,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDevicePerformanceQueryFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -42401,6 +43410,7 @@ namespace VULKAN_HPP_NAMESPACE
performanceCounterMultipleQueryPools = performanceCounterMultipleQueryPools_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDevicePerformanceQueryFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -42553,6 +43563,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDevicePipelineCreationCacheControlFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -42565,6 +43576,7 @@ namespace VULKAN_HPP_NAMESPACE
pipelineCreationCacheControl = pipelineCreationCacheControl_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -42641,6 +43653,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDevicePipelineExecutablePropertiesFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -42653,6 +43666,7 @@ namespace VULKAN_HPP_NAMESPACE
pipelineExecutableInfo = pipelineExecutableInfo_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -42831,6 +43845,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDevicePortabilitySubsetFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -42940,6 +43955,7 @@ namespace VULKAN_HPP_NAMESPACE
vertexAttributeAccessBeyondStride = vertexAttributeAccessBeyondStride_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDevicePortabilitySubsetFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -43042,6 +44058,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDevicePortabilitySubsetPropertiesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -43054,6 +44071,7 @@ namespace VULKAN_HPP_NAMESPACE
minVertexInputBindingStrideAlignment = minVertexInputBindingStrideAlignment_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDevicePortabilitySubsetPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -43098,6 +44116,276 @@ namespace VULKAN_HPP_NAMESPACE
};
#endif /*VK_ENABLE_BETA_EXTENSIONS*/
+ struct PhysicalDevicePresentIdFeaturesKHR
+ {
+ static const bool allowDuplicate = false;
+ static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType =
+ StructureType::ePhysicalDevicePresentIdFeaturesKHR;
+
+#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
+ VULKAN_HPP_CONSTEXPR
+ PhysicalDevicePresentIdFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 presentId_ = {} ) VULKAN_HPP_NOEXCEPT
+ : presentId( presentId_ )
+ {}
+
+ VULKAN_HPP_CONSTEXPR PhysicalDevicePresentIdFeaturesKHR( PhysicalDevicePresentIdFeaturesKHR const & rhs )
+ VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDevicePresentIdFeaturesKHR( VkPhysicalDevicePresentIdFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ : PhysicalDevicePresentIdFeaturesKHR( *reinterpret_cast<PhysicalDevicePresentIdFeaturesKHR const *>( &rhs ) )
+ {}
+#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/
+
+ VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentIdFeaturesKHR &
+ operator=( PhysicalDevicePresentIdFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDevicePresentIdFeaturesKHR &
+ operator=( VkPhysicalDevicePresentIdFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDevicePresentIdFeaturesKHR const *>( &rhs );
+ return *this;
+ }
+
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
+ PhysicalDevicePresentIdFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDevicePresentIdFeaturesKHR & setPresentId( VULKAN_HPP_NAMESPACE::Bool32 presentId_ ) VULKAN_HPP_NOEXCEPT
+ {
+ presentId = presentId_;
+ return *this;
+ }
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
+
+ operator VkPhysicalDevicePresentIdFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDevicePresentIdFeaturesKHR *>( this );
+ }
+
+ operator VkPhysicalDevicePresentIdFeaturesKHR &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDevicePresentIdFeaturesKHR *>( this );
+ }
+
+#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
+ auto operator<=>( PhysicalDevicePresentIdFeaturesKHR const & ) const = default;
+#else
+ bool operator==( PhysicalDevicePresentIdFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentId == rhs.presentId );
+ }
+
+ bool operator!=( PhysicalDevicePresentIdFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+#endif
+
+ public:
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePresentIdFeaturesKHR;
+ void * pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 presentId = {};
+ };
+ static_assert( sizeof( PhysicalDevicePresentIdFeaturesKHR ) == sizeof( VkPhysicalDevicePresentIdFeaturesKHR ),
+ "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDevicePresentIdFeaturesKHR>::value,
+ "struct wrapper is not a standard layout!" );
+
+ template <>
+ struct CppType<StructureType, StructureType::ePhysicalDevicePresentIdFeaturesKHR>
+ {
+ using Type = PhysicalDevicePresentIdFeaturesKHR;
+ };
+
+ struct PhysicalDevicePresentWaitFeaturesKHR
+ {
+ static const bool allowDuplicate = false;
+ static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType =
+ StructureType::ePhysicalDevicePresentWaitFeaturesKHR;
+
+#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
+ VULKAN_HPP_CONSTEXPR
+ PhysicalDevicePresentWaitFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 presentWait_ = {} ) VULKAN_HPP_NOEXCEPT
+ : presentWait( presentWait_ )
+ {}
+
+ VULKAN_HPP_CONSTEXPR PhysicalDevicePresentWaitFeaturesKHR( PhysicalDevicePresentWaitFeaturesKHR const & rhs )
+ VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDevicePresentWaitFeaturesKHR( VkPhysicalDevicePresentWaitFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ : PhysicalDevicePresentWaitFeaturesKHR( *reinterpret_cast<PhysicalDevicePresentWaitFeaturesKHR const *>( &rhs ) )
+ {}
+#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/
+
+ VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentWaitFeaturesKHR &
+ operator=( PhysicalDevicePresentWaitFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDevicePresentWaitFeaturesKHR &
+ operator=( VkPhysicalDevicePresentWaitFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDevicePresentWaitFeaturesKHR const *>( &rhs );
+ return *this;
+ }
+
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
+ PhysicalDevicePresentWaitFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDevicePresentWaitFeaturesKHR &
+ setPresentWait( VULKAN_HPP_NAMESPACE::Bool32 presentWait_ ) VULKAN_HPP_NOEXCEPT
+ {
+ presentWait = presentWait_;
+ return *this;
+ }
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
+
+ operator VkPhysicalDevicePresentWaitFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDevicePresentWaitFeaturesKHR *>( this );
+ }
+
+ operator VkPhysicalDevicePresentWaitFeaturesKHR &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDevicePresentWaitFeaturesKHR *>( this );
+ }
+
+#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
+ auto operator<=>( PhysicalDevicePresentWaitFeaturesKHR const & ) const = default;
+#else
+ bool operator==( PhysicalDevicePresentWaitFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentWait == rhs.presentWait );
+ }
+
+ bool operator!=( PhysicalDevicePresentWaitFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+#endif
+
+ public:
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePresentWaitFeaturesKHR;
+ void * pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 presentWait = {};
+ };
+ static_assert( sizeof( PhysicalDevicePresentWaitFeaturesKHR ) == sizeof( VkPhysicalDevicePresentWaitFeaturesKHR ),
+ "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDevicePresentWaitFeaturesKHR>::value,
+ "struct wrapper is not a standard layout!" );
+
+ template <>
+ struct CppType<StructureType, StructureType::ePhysicalDevicePresentWaitFeaturesKHR>
+ {
+ using Type = PhysicalDevicePresentWaitFeaturesKHR;
+ };
+
+ struct PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT
+ {
+ static const bool allowDuplicate = false;
+ static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType =
+ StructureType::ePhysicalDevicePrimitiveTopologyListRestartFeaturesEXT;
+
+#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
+ VULKAN_HPP_CONSTEXPR PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(
+ VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyListRestart_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyPatchListRestart_ = {} ) VULKAN_HPP_NOEXCEPT
+ : primitiveTopologyListRestart( primitiveTopologyListRestart_ )
+ , primitiveTopologyPatchListRestart( primitiveTopologyPatchListRestart_ )
+ {}
+
+ VULKAN_HPP_CONSTEXPR PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(
+ PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(
+ VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ : PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(
+ *reinterpret_cast<PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const *>( &rhs ) )
+ {}
+#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/
+
+ VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT &
+ operator=( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT &
+ operator=( VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this =
+ *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const *>( &rhs );
+ return *this;
+ }
+
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
+ PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT &
+ setPrimitiveTopologyListRestart( VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyListRestart_ ) VULKAN_HPP_NOEXCEPT
+ {
+ primitiveTopologyListRestart = primitiveTopologyListRestart_;
+ return *this;
+ }
+
+ PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT & setPrimitiveTopologyPatchListRestart(
+ VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyPatchListRestart_ ) VULKAN_HPP_NOEXCEPT
+ {
+ primitiveTopologyPatchListRestart = primitiveTopologyPatchListRestart_;
+ return *this;
+ }
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
+
+ operator VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *>( this );
+ }
+
+ operator VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *>( this );
+ }
+
+#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
+ auto operator<=>( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & ) const = default;
+#else
+ bool operator==( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) &&
+ ( primitiveTopologyListRestart == rhs.primitiveTopologyListRestart ) &&
+ ( primitiveTopologyPatchListRestart == rhs.primitiveTopologyPatchListRestart );
+ }
+
+ bool operator!=( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+#endif
+
+ public:
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePrimitiveTopologyListRestartFeaturesEXT;
+ void * pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyListRestart = {};
+ VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyPatchListRestart = {};
+ };
+ static_assert( sizeof( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT ) ==
+ sizeof( VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT ),
+ "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT>::value,
+ "struct wrapper is not a standard layout!" );
+
+ template <>
+ struct CppType<StructureType, StructureType::ePhysicalDevicePrimitiveTopologyListRestartFeaturesEXT>
+ {
+ using Type = PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT;
+ };
+
struct PhysicalDevicePrivateDataFeaturesEXT
{
static const bool allowDuplicate = false;
@@ -43128,6 +44416,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDevicePrivateDataFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -43140,6 +44429,7 @@ namespace VULKAN_HPP_NAMESPACE
privateData = privateData_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDevicePrivateDataFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -43437,6 +44727,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceProtectedMemoryFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -43449,6 +44740,7 @@ namespace VULKAN_HPP_NAMESPACE
protectedMemory = protectedMemory_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceProtectedMemoryFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -43596,6 +44888,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceProvokingVertexFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -43615,6 +44908,7 @@ namespace VULKAN_HPP_NAMESPACE
transformFeedbackPreservesProvokingVertex = transformFeedbackPreservesProvokingVertex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceProvokingVertexFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -43840,6 +45134,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceRayQueryFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -43851,6 +45146,7 @@ namespace VULKAN_HPP_NAMESPACE
rayQuery = rayQuery_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceRayQueryFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -43926,7 +45222,8 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
- PhysicalDeviceRayTracingMotionBlurFeaturesNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
+ PhysicalDeviceRayTracingMotionBlurFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
@@ -43945,6 +45242,7 @@ namespace VULKAN_HPP_NAMESPACE
rayTracingMotionBlurPipelineTraceRaysIndirect = rayTracingMotionBlurPipelineTraceRaysIndirect_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceRayTracingMotionBlurFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -43973,7 +45271,7 @@ namespace VULKAN_HPP_NAMESPACE
public:
VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingMotionBlurFeaturesNV;
- const void * pNext = {};
+ void * pNext = {};
VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlur = {};
VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlurPipelineTraceRaysIndirect = {};
};
@@ -44029,6 +45327,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceRayTracingPipelineFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -44069,6 +45368,7 @@ namespace VULKAN_HPP_NAMESPACE
rayTraversalPrimitiveCulling = rayTraversalPrimitiveCulling_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceRayTracingPipelineFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -44353,6 +45653,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceRepresentativeFragmentTestFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -44365,6 +45666,7 @@ namespace VULKAN_HPP_NAMESPACE
representativeFragmentTest = representativeFragmentTest_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -44442,6 +45744,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceRobustness2FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -44468,6 +45771,7 @@ namespace VULKAN_HPP_NAMESPACE
nullDescriptor = nullDescriptor_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceRobustness2FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -44789,6 +46093,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceSamplerYcbcrConversionFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -44801,6 +46106,7 @@ namespace VULKAN_HPP_NAMESPACE
samplerYcbcrConversion = samplerYcbcrConversion_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceSamplerYcbcrConversionFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -44875,6 +46181,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceScalarBlockLayoutFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -44887,6 +46194,7 @@ namespace VULKAN_HPP_NAMESPACE
scalarBlockLayout = scalarBlockLayout_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceScalarBlockLayoutFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -44963,6 +46271,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceSeparateDepthStencilLayoutsFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -44975,6 +46284,7 @@ namespace VULKAN_HPP_NAMESPACE
separateDepthStencilLayouts = separateDepthStencilLayouts_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -45019,6 +46329,216 @@ namespace VULKAN_HPP_NAMESPACE
};
using PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = PhysicalDeviceSeparateDepthStencilLayoutsFeatures;
+ struct PhysicalDeviceShaderAtomicFloat2FeaturesEXT
+ {
+ static const bool allowDuplicate = false;
+ static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType =
+ StructureType::ePhysicalDeviceShaderAtomicFloat2FeaturesEXT;
+
+#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicFloat2FeaturesEXT(
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16Atomics_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicAdd_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicMinMax_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicMinMax_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicMinMax_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16Atomics_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicAdd_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicMinMax_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicMinMax_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicMinMax_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicMinMax_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicMinMax_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderBufferFloat16Atomics( shaderBufferFloat16Atomics_ )
+ , shaderBufferFloat16AtomicAdd( shaderBufferFloat16AtomicAdd_ )
+ , shaderBufferFloat16AtomicMinMax( shaderBufferFloat16AtomicMinMax_ )
+ , shaderBufferFloat32AtomicMinMax( shaderBufferFloat32AtomicMinMax_ )
+ , shaderBufferFloat64AtomicMinMax( shaderBufferFloat64AtomicMinMax_ )
+ , shaderSharedFloat16Atomics( shaderSharedFloat16Atomics_ )
+ , shaderSharedFloat16AtomicAdd( shaderSharedFloat16AtomicAdd_ )
+ , shaderSharedFloat16AtomicMinMax( shaderSharedFloat16AtomicMinMax_ )
+ , shaderSharedFloat32AtomicMinMax( shaderSharedFloat32AtomicMinMax_ )
+ , shaderSharedFloat64AtomicMinMax( shaderSharedFloat64AtomicMinMax_ )
+ , shaderImageFloat32AtomicMinMax( shaderImageFloat32AtomicMinMax_ )
+ , sparseImageFloat32AtomicMinMax( sparseImageFloat32AtomicMinMax_ )
+ {}
+
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicFloat2FeaturesEXT(
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT( VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs )
+ VULKAN_HPP_NOEXCEPT
+ : PhysicalDeviceShaderAtomicFloat2FeaturesEXT(
+ *reinterpret_cast<PhysicalDeviceShaderAtomicFloat2FeaturesEXT const *>( &rhs ) )
+ {}
+#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/
+
+ VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT &
+ operator=( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT &
+ operator=( VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicFloat2FeaturesEXT const *>( &rhs );
+ return *this;
+ }
+
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT &
+ setShaderBufferFloat16Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16Atomics_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderBufferFloat16Atomics = shaderBufferFloat16Atomics_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT &
+ setShaderBufferFloat16AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicAdd_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderBufferFloat16AtomicAdd = shaderBufferFloat16AtomicAdd_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderBufferFloat16AtomicMinMax(
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderBufferFloat16AtomicMinMax = shaderBufferFloat16AtomicMinMax_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderBufferFloat32AtomicMinMax(
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderBufferFloat32AtomicMinMax = shaderBufferFloat32AtomicMinMax_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderBufferFloat64AtomicMinMax(
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderBufferFloat64AtomicMinMax = shaderBufferFloat64AtomicMinMax_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT &
+ setShaderSharedFloat16Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16Atomics_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderSharedFloat16Atomics = shaderSharedFloat16Atomics_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT &
+ setShaderSharedFloat16AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicAdd_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderSharedFloat16AtomicAdd = shaderSharedFloat16AtomicAdd_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderSharedFloat16AtomicMinMax(
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderSharedFloat16AtomicMinMax = shaderSharedFloat16AtomicMinMax_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderSharedFloat32AtomicMinMax(
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderSharedFloat32AtomicMinMax = shaderSharedFloat32AtomicMinMax_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderSharedFloat64AtomicMinMax(
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderSharedFloat64AtomicMinMax = shaderSharedFloat64AtomicMinMax_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderImageFloat32AtomicMinMax(
+ VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderImageFloat32AtomicMinMax = shaderImageFloat32AtomicMinMax_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setSparseImageFloat32AtomicMinMax(
+ VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT
+ {
+ sparseImageFloat32AtomicMinMax = sparseImageFloat32AtomicMinMax_;
+ return *this;
+ }
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
+
+ operator VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *>( this );
+ }
+
+ operator VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT *>( this );
+ }
+
+#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
+ auto operator<=>( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & ) const = default;
+#else
+ bool operator==( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) &&
+ ( shaderBufferFloat16Atomics == rhs.shaderBufferFloat16Atomics ) &&
+ ( shaderBufferFloat16AtomicAdd == rhs.shaderBufferFloat16AtomicAdd ) &&
+ ( shaderBufferFloat16AtomicMinMax == rhs.shaderBufferFloat16AtomicMinMax ) &&
+ ( shaderBufferFloat32AtomicMinMax == rhs.shaderBufferFloat32AtomicMinMax ) &&
+ ( shaderBufferFloat64AtomicMinMax == rhs.shaderBufferFloat64AtomicMinMax ) &&
+ ( shaderSharedFloat16Atomics == rhs.shaderSharedFloat16Atomics ) &&
+ ( shaderSharedFloat16AtomicAdd == rhs.shaderSharedFloat16AtomicAdd ) &&
+ ( shaderSharedFloat16AtomicMinMax == rhs.shaderSharedFloat16AtomicMinMax ) &&
+ ( shaderSharedFloat32AtomicMinMax == rhs.shaderSharedFloat32AtomicMinMax ) &&
+ ( shaderSharedFloat64AtomicMinMax == rhs.shaderSharedFloat64AtomicMinMax ) &&
+ ( shaderImageFloat32AtomicMinMax == rhs.shaderImageFloat32AtomicMinMax ) &&
+ ( sparseImageFloat32AtomicMinMax == rhs.sparseImageFloat32AtomicMinMax );
+ }
+
+ bool operator!=( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+#endif
+
+ public:
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderAtomicFloat2FeaturesEXT;
+ void * pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16Atomics = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicAdd = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicMinMax = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicMinMax = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicMinMax = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16Atomics = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicAdd = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicMinMax = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicMinMax = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicMinMax = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicMinMax = {};
+ VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicMinMax = {};
+ };
+ static_assert( sizeof( PhysicalDeviceShaderAtomicFloat2FeaturesEXT ) ==
+ sizeof( VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT ),
+ "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceShaderAtomicFloat2FeaturesEXT>::value,
+ "struct wrapper is not a standard layout!" );
+
+ template <>
+ struct CppType<StructureType, StructureType::ePhysicalDeviceShaderAtomicFloat2FeaturesEXT>
+ {
+ using Type = PhysicalDeviceShaderAtomicFloat2FeaturesEXT;
+ };
+
struct PhysicalDeviceShaderAtomicFloatFeaturesEXT
{
static const bool allowDuplicate = false;
@@ -45073,6 +46593,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShaderAtomicFloatFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -45162,6 +46683,7 @@ namespace VULKAN_HPP_NAMESPACE
sparseImageFloat32AtomicAdd = sparseImageFloat32AtomicAdd_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShaderAtomicFloatFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -45260,6 +46782,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShaderAtomicInt64Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -45279,6 +46802,7 @@ namespace VULKAN_HPP_NAMESPACE
shaderSharedInt64Atomics = shaderSharedInt64Atomics_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShaderAtomicInt64Features const &() const VULKAN_HPP_NOEXCEPT
{
@@ -45357,6 +46881,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShaderClockFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -45376,6 +46901,7 @@ namespace VULKAN_HPP_NAMESPACE
shaderDeviceClock = shaderDeviceClock_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShaderClockFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -45645,6 +47171,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -45657,6 +47184,7 @@ namespace VULKAN_HPP_NAMESPACE
shaderDemoteToHelperInvocation = shaderDemoteToHelperInvocation_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -45732,6 +47260,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShaderDrawParametersFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -45744,6 +47273,7 @@ namespace VULKAN_HPP_NAMESPACE
shaderDrawParameters = shaderDrawParameters_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShaderDrawParametersFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -45820,6 +47350,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShaderFloat16Int8Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -45839,6 +47370,7 @@ namespace VULKAN_HPP_NAMESPACE
shaderInt8 = shaderInt8_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShaderFloat16Int8Features const &() const VULKAN_HPP_NOEXCEPT
{
@@ -45919,6 +47451,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShaderImageAtomicInt64FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -45938,6 +47471,7 @@ namespace VULKAN_HPP_NAMESPACE
sparseImageInt64Atomics = sparseImageInt64Atomics_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -46014,6 +47548,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShaderImageFootprintFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -46026,6 +47561,7 @@ namespace VULKAN_HPP_NAMESPACE
imageFootprint = imageFootprint_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShaderImageFootprintFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -46068,6 +47604,587 @@ namespace VULKAN_HPP_NAMESPACE
using Type = PhysicalDeviceShaderImageFootprintFeaturesNV;
};
+ struct PhysicalDeviceShaderIntegerDotProductFeaturesKHR
+ {
+ static const bool allowDuplicate = false;
+ static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType =
+ StructureType::ePhysicalDeviceShaderIntegerDotProductFeaturesKHR;
+
+#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerDotProductFeaturesKHR(
+ VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct_ = {} ) VULKAN_HPP_NOEXCEPT
+ : shaderIntegerDotProduct( shaderIntegerDotProduct_ )
+ {}
+
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerDotProductFeaturesKHR(
+ PhysicalDeviceShaderIntegerDotProductFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDeviceShaderIntegerDotProductFeaturesKHR( VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR const & rhs )
+ VULKAN_HPP_NOEXCEPT
+ : PhysicalDeviceShaderIntegerDotProductFeaturesKHR(
+ *reinterpret_cast<PhysicalDeviceShaderIntegerDotProductFeaturesKHR const *>( &rhs ) )
+ {}
+#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/
+
+ VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderIntegerDotProductFeaturesKHR &
+ operator=( PhysicalDeviceShaderIntegerDotProductFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDeviceShaderIntegerDotProductFeaturesKHR &
+ operator=( VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerDotProductFeaturesKHR const *>( &rhs );
+ return *this;
+ }
+
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
+ PhysicalDeviceShaderIntegerDotProductFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductFeaturesKHR &
+ setShaderIntegerDotProduct( VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct_ ) VULKAN_HPP_NOEXCEPT
+ {
+ shaderIntegerDotProduct = shaderIntegerDotProduct_;
+ return *this;
+ }
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
+
+ operator VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR *>( this );
+ }
+
+ operator VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR *>( this );
+ }
+
+#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
+ auto operator<=>( PhysicalDeviceShaderIntegerDotProductFeaturesKHR const & ) const = default;
+#else
+ bool operator==( PhysicalDeviceShaderIntegerDotProductFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) &&
+ ( shaderIntegerDotProduct == rhs.shaderIntegerDotProduct );
+ }
+
+ bool operator!=( PhysicalDeviceShaderIntegerDotProductFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+#endif
+
+ public:
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderIntegerDotProductFeaturesKHR;
+ void * pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct = {};
+ };
+ static_assert( sizeof( PhysicalDeviceShaderIntegerDotProductFeaturesKHR ) ==
+ sizeof( VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR ),
+ "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceShaderIntegerDotProductFeaturesKHR>::value,
+ "struct wrapper is not a standard layout!" );
+
+ template <>
+ struct CppType<StructureType, StructureType::ePhysicalDeviceShaderIntegerDotProductFeaturesKHR>
+ {
+ using Type = PhysicalDeviceShaderIntegerDotProductFeaturesKHR;
+ };
+
+ struct PhysicalDeviceShaderIntegerDotProductPropertiesKHR
+ {
+ static const bool allowDuplicate = false;
+ static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType =
+ StructureType::ePhysicalDeviceShaderIntegerDotProductPropertiesKHR;
+
+#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerDotProductPropertiesKHR(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitUnsignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitSignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitMixedSignednessAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedUnsignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedSignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitUnsignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitSignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitMixedSignednessAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitUnsignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitSignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitMixedSignednessAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitUnsignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitSignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitMixedSignednessAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated_ = {},
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated_ = {} )
+ VULKAN_HPP_NOEXCEPT
+ : integerDotProduct8BitUnsignedAccelerated( integerDotProduct8BitUnsignedAccelerated_ )
+ , integerDotProduct8BitSignedAccelerated( integerDotProduct8BitSignedAccelerated_ )
+ , integerDotProduct8BitMixedSignednessAccelerated( integerDotProduct8BitMixedSignednessAccelerated_ )
+ , integerDotProduct4x8BitPackedUnsignedAccelerated( integerDotProduct4x8BitPackedUnsignedAccelerated_ )
+ , integerDotProduct4x8BitPackedSignedAccelerated( integerDotProduct4x8BitPackedSignedAccelerated_ )
+ , integerDotProduct4x8BitPackedMixedSignednessAccelerated(
+ integerDotProduct4x8BitPackedMixedSignednessAccelerated_ )
+ , integerDotProduct16BitUnsignedAccelerated( integerDotProduct16BitUnsignedAccelerated_ )
+ , integerDotProduct16BitSignedAccelerated( integerDotProduct16BitSignedAccelerated_ )
+ , integerDotProduct16BitMixedSignednessAccelerated( integerDotProduct16BitMixedSignednessAccelerated_ )
+ , integerDotProduct32BitUnsignedAccelerated( integerDotProduct32BitUnsignedAccelerated_ )
+ , integerDotProduct32BitSignedAccelerated( integerDotProduct32BitSignedAccelerated_ )
+ , integerDotProduct32BitMixedSignednessAccelerated( integerDotProduct32BitMixedSignednessAccelerated_ )
+ , integerDotProduct64BitUnsignedAccelerated( integerDotProduct64BitUnsignedAccelerated_ )
+ , integerDotProduct64BitSignedAccelerated( integerDotProduct64BitSignedAccelerated_ )
+ , integerDotProduct64BitMixedSignednessAccelerated( integerDotProduct64BitMixedSignednessAccelerated_ )
+ , integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(
+ integerDotProductAccumulatingSaturating8BitUnsignedAccelerated_ )
+ , integerDotProductAccumulatingSaturating8BitSignedAccelerated(
+ integerDotProductAccumulatingSaturating8BitSignedAccelerated_ )
+ , integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(
+ integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated_ )
+ , integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(
+ integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated_ )
+ , integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(
+ integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated_ )
+ , integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(
+ integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated_ )
+ , integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(
+ integerDotProductAccumulatingSaturating16BitUnsignedAccelerated_ )
+ , integerDotProductAccumulatingSaturating16BitSignedAccelerated(
+ integerDotProductAccumulatingSaturating16BitSignedAccelerated_ )
+ , integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(
+ integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated_ )
+ , integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(
+ integerDotProductAccumulatingSaturating32BitUnsignedAccelerated_ )
+ , integerDotProductAccumulatingSaturating32BitSignedAccelerated(
+ integerDotProductAccumulatingSaturating32BitSignedAccelerated_ )
+ , integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(
+ integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated_ )
+ , integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(
+ integerDotProductAccumulatingSaturating64BitUnsignedAccelerated_ )
+ , integerDotProductAccumulatingSaturating64BitSignedAccelerated(
+ integerDotProductAccumulatingSaturating64BitSignedAccelerated_ )
+ , integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(
+ integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated_ )
+ {}
+
+ VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerDotProductPropertiesKHR(
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR(
+ VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ : PhysicalDeviceShaderIntegerDotProductPropertiesKHR(
+ *reinterpret_cast<PhysicalDeviceShaderIntegerDotProductPropertiesKHR const *>( &rhs ) )
+ {}
+#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/
+
+ VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ operator=( PhysicalDeviceShaderIntegerDotProductPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ operator=( VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this =
+ *reinterpret_cast<VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerDotProductPropertiesKHR const *>( &rhs );
+ return *this;
+ }
+
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct8BitUnsignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitUnsignedAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct8BitUnsignedAccelerated = integerDotProduct8BitUnsignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct8BitSignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitSignedAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct8BitSignedAccelerated = integerDotProduct8BitSignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct8BitMixedSignednessAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitMixedSignednessAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct8BitMixedSignednessAccelerated = integerDotProduct8BitMixedSignednessAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct4x8BitPackedUnsignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedUnsignedAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct4x8BitPackedUnsignedAccelerated = integerDotProduct4x8BitPackedUnsignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct4x8BitPackedSignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedSignedAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct4x8BitPackedSignedAccelerated = integerDotProduct4x8BitPackedSignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct4x8BitPackedMixedSignednessAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct4x8BitPackedMixedSignednessAccelerated =
+ integerDotProduct4x8BitPackedMixedSignednessAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct16BitUnsignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitUnsignedAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct16BitUnsignedAccelerated = integerDotProduct16BitUnsignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct16BitSignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitSignedAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct16BitSignedAccelerated = integerDotProduct16BitSignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct16BitMixedSignednessAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitMixedSignednessAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct16BitMixedSignednessAccelerated = integerDotProduct16BitMixedSignednessAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct32BitUnsignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitUnsignedAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct32BitUnsignedAccelerated = integerDotProduct32BitUnsignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct32BitSignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitSignedAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct32BitSignedAccelerated = integerDotProduct32BitSignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct32BitMixedSignednessAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitMixedSignednessAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct32BitMixedSignednessAccelerated = integerDotProduct32BitMixedSignednessAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct64BitUnsignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitUnsignedAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct64BitUnsignedAccelerated = integerDotProduct64BitUnsignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct64BitSignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitSignedAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct64BitSignedAccelerated = integerDotProduct64BitSignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR & setIntegerDotProduct64BitMixedSignednessAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitMixedSignednessAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProduct64BitMixedSignednessAccelerated = integerDotProduct64BitMixedSignednessAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating8BitUnsignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating8BitUnsignedAccelerated =
+ integerDotProductAccumulatingSaturating8BitUnsignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating8BitSignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated_ ) VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating8BitSignedAccelerated =
+ integerDotProductAccumulatingSaturating8BitSignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated =
+ integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated =
+ integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated =
+ integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated =
+ integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating16BitUnsignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating16BitUnsignedAccelerated =
+ integerDotProductAccumulatingSaturating16BitUnsignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating16BitSignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating16BitSignedAccelerated =
+ integerDotProductAccumulatingSaturating16BitSignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated =
+ integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating32BitUnsignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating32BitUnsignedAccelerated =
+ integerDotProductAccumulatingSaturating32BitUnsignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating32BitSignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating32BitSignedAccelerated =
+ integerDotProductAccumulatingSaturating32BitSignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated =
+ integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating64BitUnsignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating64BitUnsignedAccelerated =
+ integerDotProductAccumulatingSaturating64BitUnsignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating64BitSignedAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating64BitSignedAccelerated =
+ integerDotProductAccumulatingSaturating64BitSignedAccelerated_;
+ return *this;
+ }
+
+ PhysicalDeviceShaderIntegerDotProductPropertiesKHR &
+ setIntegerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated =
+ integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated_;
+ return *this;
+ }
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
+
+ operator VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR *>( this );
+ }
+
+ operator VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR *>( this );
+ }
+
+#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
+ auto operator<=>( PhysicalDeviceShaderIntegerDotProductPropertiesKHR const & ) const = default;
+#else
+ bool operator==( PhysicalDeviceShaderIntegerDotProductPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) &&
+ ( integerDotProduct8BitUnsignedAccelerated == rhs.integerDotProduct8BitUnsignedAccelerated ) &&
+ ( integerDotProduct8BitSignedAccelerated == rhs.integerDotProduct8BitSignedAccelerated ) &&
+ ( integerDotProduct8BitMixedSignednessAccelerated ==
+ rhs.integerDotProduct8BitMixedSignednessAccelerated ) &&
+ ( integerDotProduct4x8BitPackedUnsignedAccelerated ==
+ rhs.integerDotProduct4x8BitPackedUnsignedAccelerated ) &&
+ ( integerDotProduct4x8BitPackedSignedAccelerated == rhs.integerDotProduct4x8BitPackedSignedAccelerated ) &&
+ ( integerDotProduct4x8BitPackedMixedSignednessAccelerated ==
+ rhs.integerDotProduct4x8BitPackedMixedSignednessAccelerated ) &&
+ ( integerDotProduct16BitUnsignedAccelerated == rhs.integerDotProduct16BitUnsignedAccelerated ) &&
+ ( integerDotProduct16BitSignedAccelerated == rhs.integerDotProduct16BitSignedAccelerated ) &&
+ ( integerDotProduct16BitMixedSignednessAccelerated ==
+ rhs.integerDotProduct16BitMixedSignednessAccelerated ) &&
+ ( integerDotProduct32BitUnsignedAccelerated == rhs.integerDotProduct32BitUnsignedAccelerated ) &&
+ ( integerDotProduct32BitSignedAccelerated == rhs.integerDotProduct32BitSignedAccelerated ) &&
+ ( integerDotProduct32BitMixedSignednessAccelerated ==
+ rhs.integerDotProduct32BitMixedSignednessAccelerated ) &&
+ ( integerDotProduct64BitUnsignedAccelerated == rhs.integerDotProduct64BitUnsignedAccelerated ) &&
+ ( integerDotProduct64BitSignedAccelerated == rhs.integerDotProduct64BitSignedAccelerated ) &&
+ ( integerDotProduct64BitMixedSignednessAccelerated ==
+ rhs.integerDotProduct64BitMixedSignednessAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating8BitUnsignedAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating8BitSignedAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating8BitSignedAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating16BitUnsignedAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating16BitSignedAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating16BitSignedAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating32BitUnsignedAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating32BitSignedAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating32BitSignedAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating64BitUnsignedAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating64BitSignedAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating64BitSignedAccelerated ) &&
+ ( integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated ==
+ rhs.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated );
+ }
+
+ bool operator!=( PhysicalDeviceShaderIntegerDotProductPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+#endif
+
+ public:
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderIntegerDotProductPropertiesKHR;
+ void * pNext = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitUnsignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitSignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitMixedSignednessAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedUnsignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedSignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitUnsignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitSignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitMixedSignednessAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitUnsignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitSignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitMixedSignednessAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitUnsignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitSignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitMixedSignednessAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated = {};
+ VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = {};
+ };
+ static_assert( sizeof( PhysicalDeviceShaderIntegerDotProductPropertiesKHR ) ==
+ sizeof( VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR ),
+ "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PhysicalDeviceShaderIntegerDotProductPropertiesKHR>::value,
+ "struct wrapper is not a standard layout!" );
+
+ template <>
+ struct CppType<StructureType, StructureType::ePhysicalDeviceShaderIntegerDotProductPropertiesKHR>
+ {
+ using Type = PhysicalDeviceShaderIntegerDotProductPropertiesKHR;
+ };
+
struct PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL
{
static const bool allowDuplicate = false;
@@ -46101,6 +48218,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -46113,6 +48231,7 @@ namespace VULKAN_HPP_NAMESPACE
shaderIntegerFunctions2 = shaderIntegerFunctions2_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const &() const VULKAN_HPP_NOEXCEPT
{
@@ -46187,6 +48306,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShaderSMBuiltinsFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -46199,6 +48319,7 @@ namespace VULKAN_HPP_NAMESPACE
shaderSMBuiltins = shaderSMBuiltins_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShaderSMBuiltinsFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -46351,6 +48472,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShaderSubgroupExtendedTypesFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -46363,6 +48485,7 @@ namespace VULKAN_HPP_NAMESPACE
shaderSubgroupExtendedTypes = shaderSubgroupExtendedTypes_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -46441,6 +48564,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -46453,6 +48577,7 @@ namespace VULKAN_HPP_NAMESPACE
shaderSubgroupUniformControlFlow = shaderSubgroupUniformControlFlow_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -46530,6 +48655,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShaderTerminateInvocationFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -46542,6 +48668,7 @@ namespace VULKAN_HPP_NAMESPACE
shaderTerminateInvocation = shaderTerminateInvocation_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -46619,6 +48746,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceShadingRateImageFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -46638,6 +48766,7 @@ namespace VULKAN_HPP_NAMESPACE
shadingRateCoarseSampleOrder = shadingRateCoarseSampleOrder_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceShadingRateImageFeaturesNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -46801,6 +48930,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceSparseImageFormatInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -46837,6 +48967,7 @@ namespace VULKAN_HPP_NAMESPACE
tiling = tiling_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceSparseImageFormatInfo2 const &() const VULKAN_HPP_NOEXCEPT
{
@@ -46997,6 +49128,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceSubgroupSizeControlFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -47016,6 +49148,7 @@ namespace VULKAN_HPP_NAMESPACE
computeFullSubgroups = computeFullSubgroups_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceSubgroupSizeControlFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -47176,6 +49309,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceSubpassShadingFeaturesHUAWEI & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -47188,6 +49322,7 @@ namespace VULKAN_HPP_NAMESPACE
subpassShading = subpassShading_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceSubpassShadingFeaturesHUAWEI const &() const VULKAN_HPP_NOEXCEPT
{
@@ -47332,6 +49467,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceSurfaceInfo2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -47343,6 +49479,7 @@ namespace VULKAN_HPP_NAMESPACE
surface = surface_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceSurfaceInfo2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -47415,6 +49552,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceSynchronization2FeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -47427,6 +49565,7 @@ namespace VULKAN_HPP_NAMESPACE
synchronization2 = synchronization2_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceSynchronization2FeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -47501,6 +49640,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceTexelBufferAlignmentFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -47513,6 +49653,7 @@ namespace VULKAN_HPP_NAMESPACE
texelBufferAlignment = texelBufferAlignment_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -47674,6 +49815,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -47686,6 +49828,7 @@ namespace VULKAN_HPP_NAMESPACE
textureCompressionASTC_HDR = textureCompressionASTC_HDR_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -47759,6 +49902,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceTimelineSemaphoreFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -47771,6 +49915,7 @@ namespace VULKAN_HPP_NAMESPACE
timelineSemaphore = timelineSemaphore_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceTimelineSemaphoreFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -48003,6 +50148,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceTransformFeedbackFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -48022,6 +50168,7 @@ namespace VULKAN_HPP_NAMESPACE
geometryStreams = geometryStreams_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceTransformFeedbackFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -48209,6 +50356,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceUniformBufferStandardLayoutFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -48221,6 +50369,7 @@ namespace VULKAN_HPP_NAMESPACE
uniformBufferStandardLayout = uniformBufferStandardLayout_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceUniformBufferStandardLayoutFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -48298,6 +50447,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceVariablePointersFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -48317,6 +50467,7 @@ namespace VULKAN_HPP_NAMESPACE
variablePointers = variablePointers_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceVariablePointersFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -48398,6 +50549,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceVertexAttributeDivisorFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -48417,6 +50569,7 @@ namespace VULKAN_HPP_NAMESPACE
vertexAttributeInstanceRateZeroDivisor = vertexAttributeInstanceRateZeroDivisor_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -48569,6 +50722,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceVertexInputDynamicStateFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -48581,6 +50735,7 @@ namespace VULKAN_HPP_NAMESPACE
vertexInputDynamicState = vertexInputDynamicState_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -48658,6 +50813,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoProfileKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -48691,6 +50847,7 @@ namespace VULKAN_HPP_NAMESPACE
chromaBitDepth = chromaBitDepth_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoProfileKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -48766,6 +50923,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoProfilesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -48783,6 +50941,7 @@ namespace VULKAN_HPP_NAMESPACE
pProfiles = pProfiles_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoProfilesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -48884,7 +51043,7 @@ namespace VULKAN_HPP_NAMESPACE
public:
VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVideoFormatInfoKHR;
- const void * pNext = {};
+ void * pNext = {};
VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage = {};
const VULKAN_HPP_NAMESPACE::VideoProfilesKHR * pVideoProfiles = {};
};
@@ -48950,6 +51109,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceVulkan11Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -49038,6 +51198,7 @@ namespace VULKAN_HPP_NAMESPACE
shaderDrawParameters = shaderDrawParameters_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceVulkan11Features const &() const VULKAN_HPP_NOEXCEPT
{
@@ -49342,6 +51503,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceVulkan12Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -49674,6 +51836,7 @@ namespace VULKAN_HPP_NAMESPACE
subgroupBroadcastDynamicId = subgroupBroadcastDynamicId_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceVulkan12Features const &() const VULKAN_HPP_NOEXCEPT
{
@@ -50131,6 +52294,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceVulkanMemoryModelFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -50157,6 +52321,7 @@ namespace VULKAN_HPP_NAMESPACE
vulkanMemoryModelAvailabilityVisibilityChains = vulkanMemoryModelAvailabilityVisibilityChains_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceVulkanMemoryModelFeatures const &() const VULKAN_HPP_NOEXCEPT
{
@@ -50243,6 +52408,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -50276,6 +52442,7 @@ namespace VULKAN_HPP_NAMESPACE
workgroupMemoryExplicitLayout16BitAccess = workgroupMemoryExplicitLayout16BitAccess_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -50357,6 +52524,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -50369,6 +52537,7 @@ namespace VULKAN_HPP_NAMESPACE
ycbcr2plane444Formats = ycbcr2plane444Formats_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -50442,6 +52611,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceYcbcrImageArraysFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -50454,6 +52624,7 @@ namespace VULKAN_HPP_NAMESPACE
ycbcrImageArrays = ycbcrImageArrays_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceYcbcrImageArraysFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -50529,6 +52700,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -50541,6 +52713,7 @@ namespace VULKAN_HPP_NAMESPACE
shaderZeroInitializeWorkgroupMemory = shaderZeroInitializeWorkgroupMemory_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -50622,6 +52795,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineCacheCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -50646,7 +52820,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
template <typename T>
PipelineCacheCreateInfo &
setInitialData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const T> const & initialData_ ) VULKAN_HPP_NOEXCEPT
@@ -50655,7 +52829,8 @@ namespace VULKAN_HPP_NAMESPACE
pInitialData = initialData_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineCacheCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -50699,6 +52874,113 @@ namespace VULKAN_HPP_NAMESPACE
using Type = PipelineCacheCreateInfo;
};
+ struct PipelineCacheHeaderVersionOne
+ {
+#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
+ VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne(
+ uint32_t headerSize_ = {},
+ VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion headerVersion_ =
+ VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion::eOne,
+ uint32_t vendorID_ = {},
+ uint32_t deviceID_ = {},
+ std::array<uint8_t, VK_UUID_SIZE> const & pipelineCacheUUID_ = {} ) VULKAN_HPP_NOEXCEPT
+ : headerSize( headerSize_ )
+ , headerVersion( headerVersion_ )
+ , vendorID( vendorID_ )
+ , deviceID( deviceID_ )
+ , pipelineCacheUUID( pipelineCacheUUID_ )
+ {}
+
+ VULKAN_HPP_CONSTEXPR_14
+ PipelineCacheHeaderVersionOne( PipelineCacheHeaderVersionOne const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PipelineCacheHeaderVersionOne( VkPipelineCacheHeaderVersionOne const & rhs ) VULKAN_HPP_NOEXCEPT
+ : PipelineCacheHeaderVersionOne( *reinterpret_cast<PipelineCacheHeaderVersionOne const *>( &rhs ) )
+ {}
+#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/
+
+ VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne &
+ operator=( PipelineCacheHeaderVersionOne const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PipelineCacheHeaderVersionOne & operator=( VkPipelineCacheHeaderVersionOne const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersionOne const *>( &rhs );
+ return *this;
+ }
+
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
+ PipelineCacheHeaderVersionOne & setHeaderSize( uint32_t headerSize_ ) VULKAN_HPP_NOEXCEPT
+ {
+ headerSize = headerSize_;
+ return *this;
+ }
+
+ PipelineCacheHeaderVersionOne &
+ setHeaderVersion( VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion headerVersion_ ) VULKAN_HPP_NOEXCEPT
+ {
+ headerVersion = headerVersion_;
+ return *this;
+ }
+
+ PipelineCacheHeaderVersionOne & setVendorID( uint32_t vendorID_ ) VULKAN_HPP_NOEXCEPT
+ {
+ vendorID = vendorID_;
+ return *this;
+ }
+
+ PipelineCacheHeaderVersionOne & setDeviceID( uint32_t deviceID_ ) VULKAN_HPP_NOEXCEPT
+ {
+ deviceID = deviceID_;
+ return *this;
+ }
+
+ PipelineCacheHeaderVersionOne &
+ setPipelineCacheUUID( std::array<uint8_t, VK_UUID_SIZE> pipelineCacheUUID_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pipelineCacheUUID = pipelineCacheUUID_;
+ return *this;
+ }
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
+
+ operator VkPipelineCacheHeaderVersionOne const &() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPipelineCacheHeaderVersionOne *>( this );
+ }
+
+ operator VkPipelineCacheHeaderVersionOne &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPipelineCacheHeaderVersionOne *>( this );
+ }
+
+#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
+ auto operator<=>( PipelineCacheHeaderVersionOne const & ) const = default;
+#else
+ bool operator==( PipelineCacheHeaderVersionOne const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( headerSize == rhs.headerSize ) && ( headerVersion == rhs.headerVersion ) &&
+ ( vendorID == rhs.vendorID ) && ( deviceID == rhs.deviceID ) &&
+ ( pipelineCacheUUID == rhs.pipelineCacheUUID );
+ }
+
+ bool operator!=( PipelineCacheHeaderVersionOne const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+#endif
+
+ public:
+ uint32_t headerSize = {};
+ VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion headerVersion =
+ VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion::eOne;
+ uint32_t vendorID = {};
+ uint32_t deviceID = {};
+ VULKAN_HPP_NAMESPACE::ArrayWrapper1D<uint8_t, VK_UUID_SIZE> pipelineCacheUUID = {};
+ };
+ static_assert( sizeof( PipelineCacheHeaderVersionOne ) == sizeof( VkPipelineCacheHeaderVersionOne ),
+ "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PipelineCacheHeaderVersionOne>::value,
+ "struct wrapper is not a standard layout!" );
+
struct PipelineColorBlendAdvancedStateCreateInfoEXT
{
static const bool allowDuplicate = false;
@@ -50736,6 +53018,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineColorBlendAdvancedStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -50762,6 +53045,7 @@ namespace VULKAN_HPP_NAMESPACE
blendOverlap = blendOverlap_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineColorBlendAdvancedStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -50845,6 +53129,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineColorWriteCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -50864,7 +53149,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineColorWriteCreateInfoEXT & setColorWriteEnables(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Bool32> const & colorWriteEnables_ )
VULKAN_HPP_NOEXCEPT
@@ -50873,7 +53158,8 @@ namespace VULKAN_HPP_NAMESPACE
pColorWriteEnables = colorWriteEnables_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineColorWriteCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -50947,6 +53233,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineCompilerControlCreateInfoAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -50959,6 +53246,7 @@ namespace VULKAN_HPP_NAMESPACE
compilerControlFlags = compilerControlFlags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineCompilerControlCreateInfoAMD const &() const VULKAN_HPP_NOEXCEPT
{
@@ -51055,6 +53343,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineCoverageModulationStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -51096,7 +53385,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineCoverageModulationStateCreateInfoNV & setCoverageModulationTable(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const float> const & coverageModulationTable_ ) VULKAN_HPP_NOEXCEPT
{
@@ -51104,7 +53393,8 @@ namespace VULKAN_HPP_NAMESPACE
pCoverageModulationTable = coverageModulationTable_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineCoverageModulationStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -51191,6 +53481,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineCoverageReductionStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -51210,6 +53501,7 @@ namespace VULKAN_HPP_NAMESPACE
coverageReductionMode = coverageReductionMode_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineCoverageReductionStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -51291,6 +53583,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineCoverageToColorStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -51317,6 +53610,7 @@ namespace VULKAN_HPP_NAMESPACE
coverageToColorLocation = coverageToColorLocation_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineCoverageToColorStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -51469,6 +53763,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineCreationFeedbackCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -51496,7 +53791,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineCreationFeedbackCreateInfoEXT & setPipelineStageCreationFeedbacks(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackEXT> const &
pipelineStageCreationFeedbacks_ ) VULKAN_HPP_NOEXCEPT
@@ -51505,7 +53800,8 @@ namespace VULKAN_HPP_NAMESPACE
pPipelineStageCreationFeedbacks = pipelineStageCreationFeedbacks_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineCreationFeedbackCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -51603,6 +53899,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineDiscardRectangleStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -51637,7 +53934,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineDiscardRectangleStateCreateInfoEXT & setDiscardRectangles(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Rect2D> const & discardRectangles_ )
VULKAN_HPP_NOEXCEPT
@@ -51646,7 +53943,8 @@ namespace VULKAN_HPP_NAMESPACE
pDiscardRectangles = discardRectangles_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineDiscardRectangleStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -51724,6 +54022,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineExecutableInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -51741,6 +54040,7 @@ namespace VULKAN_HPP_NAMESPACE
executableIndex = executableIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineExecutableInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -51965,6 +54265,7 @@ namespace VULKAN_HPP_NAMESPACE
union PipelineExecutableStatisticValueKHR
{
+#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS )
PipelineExecutableStatisticValueKHR( VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR const & rhs )
VULKAN_HPP_NOEXCEPT
{
@@ -51978,7 +54279,9 @@ namespace VULKAN_HPP_NAMESPACE
PipelineExecutableStatisticValueKHR( uint64_t u64_ ) : u64( u64_ ) {}
PipelineExecutableStatisticValueKHR( double f64_ ) : f64( f64_ ) {}
+#endif /*VULKAN_HPP_NO_UNION_CONSTRUCTORS*/
+#if !defined( VULKAN_HPP_NO_UNION_SETTERS )
PipelineExecutableStatisticValueKHR & setB32( VULKAN_HPP_NAMESPACE::Bool32 b32_ ) VULKAN_HPP_NOEXCEPT
{
b32 = b32_;
@@ -52002,6 +54305,7 @@ namespace VULKAN_HPP_NAMESPACE
f64 = f64_;
return *this;
}
+#endif /*VULKAN_HPP_NO_UNION_SETTERS*/
VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR &
operator=( VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR const & rhs ) VULKAN_HPP_NOEXCEPT
@@ -52137,6 +54441,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineFragmentShadingRateEnumStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -52163,6 +54468,7 @@ namespace VULKAN_HPP_NAMESPACE
combinerOps = combinerOps_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineFragmentShadingRateEnumStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -52246,6 +54552,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineFragmentShadingRateStateCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -52265,6 +54572,7 @@ namespace VULKAN_HPP_NAMESPACE
combinerOps = combinerOps_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineFragmentShadingRateStateCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -52334,6 +54642,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -52345,6 +54654,7 @@ namespace VULKAN_HPP_NAMESPACE
pipeline = pipeline_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -52411,6 +54721,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PushConstantRange & setStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT
{
stageFlags = stageFlags_;
@@ -52428,6 +54739,7 @@ namespace VULKAN_HPP_NAMESPACE
size = size_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPushConstantRange const &() const VULKAN_HPP_NOEXCEPT
{
@@ -52512,6 +54824,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineLayoutCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -52537,7 +54850,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineLayoutCreateInfo & setSetLayouts(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DescriptorSetLayout> const &
setLayouts_ ) VULKAN_HPP_NOEXCEPT
@@ -52546,7 +54859,7 @@ namespace VULKAN_HPP_NAMESPACE
pSetLayouts = setLayouts_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
PipelineLayoutCreateInfo & setPushConstantRangeCount( uint32_t pushConstantRangeCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -52561,7 +54874,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineLayoutCreateInfo & setPushConstantRanges(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::PushConstantRange> const &
pushConstantRanges_ ) VULKAN_HPP_NOEXCEPT
@@ -52570,7 +54883,8 @@ namespace VULKAN_HPP_NAMESPACE
pPushConstantRanges = pushConstantRanges_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineLayoutCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -52655,6 +54969,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineLibraryCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -52674,7 +54989,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineLibraryCreateInfoKHR & setLibraries(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Pipeline> const & libraries_ )
VULKAN_HPP_NOEXCEPT
@@ -52683,7 +54998,8 @@ namespace VULKAN_HPP_NAMESPACE
pLibraries = libraries_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineLibraryCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -52765,6 +55081,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineRasterizationConservativeStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -52791,6 +55108,7 @@ namespace VULKAN_HPP_NAMESPACE
extraPrimitiveOverestimationSize = extraPrimitiveOverestimationSize_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineRasterizationConservativeStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -52872,6 +55190,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineRasterizationDepthClipStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -52891,6 +55210,7 @@ namespace VULKAN_HPP_NAMESPACE
depthClipEnable = depthClipEnable_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineRasterizationDepthClipStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -52974,6 +55294,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineRasterizationLineStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -53007,6 +55328,7 @@ namespace VULKAN_HPP_NAMESPACE
lineStipplePattern = lineStipplePattern_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineRasterizationLineStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -53090,6 +55412,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineRasterizationProvokingVertexStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -53102,6 +55425,7 @@ namespace VULKAN_HPP_NAMESPACE
provokingVertexMode = provokingVertexMode_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineRasterizationProvokingVertexStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -53178,6 +55502,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineRasterizationStateRasterizationOrderAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -53190,6 +55515,7 @@ namespace VULKAN_HPP_NAMESPACE
rasterizationOrder = rasterizationOrder_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineRasterizationStateRasterizationOrderAMD const &() const VULKAN_HPP_NOEXCEPT
{
@@ -53267,6 +55593,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineRasterizationStateStreamCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -53286,6 +55613,7 @@ namespace VULKAN_HPP_NAMESPACE
rasterizationStream = rasterizationStream_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineRasterizationStateStreamCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -53363,6 +55691,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineRepresentativeFragmentTestStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -53375,6 +55704,7 @@ namespace VULKAN_HPP_NAMESPACE
representativeFragmentTestEnable = representativeFragmentTestEnable_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineRepresentativeFragmentTestStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -53452,6 +55782,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineSampleLocationsStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -53471,6 +55802,7 @@ namespace VULKAN_HPP_NAMESPACE
sampleLocationsInfo = sampleLocationsInfo_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineSampleLocationsStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -53622,6 +55954,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineTessellationDomainOriginStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -53634,6 +55967,7 @@ namespace VULKAN_HPP_NAMESPACE
domainOrigin = domainOrigin_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineTessellationDomainOriginStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -53706,6 +56040,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VertexInputBindingDivisorDescriptionEXT & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT
{
binding = binding_;
@@ -53717,6 +56052,7 @@ namespace VULKAN_HPP_NAMESPACE
divisor = divisor_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVertexInputBindingDivisorDescriptionEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -53796,6 +56132,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineVertexInputDivisorStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -53817,7 +56154,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineVertexInputDivisorStateCreateInfoEXT & setVertexBindingDivisors(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<
const VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescriptionEXT> const & vertexBindingDivisors_ )
@@ -53827,7 +56164,8 @@ namespace VULKAN_HPP_NAMESPACE
pVertexBindingDivisors = vertexBindingDivisors_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineVertexInputDivisorStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -53922,6 +56260,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineViewportCoarseSampleOrderStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -53949,7 +56288,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineViewportCoarseSampleOrderStateCreateInfoNV & setCustomSampleOrders(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV> const &
customSampleOrders_ ) VULKAN_HPP_NOEXCEPT
@@ -53958,7 +56297,8 @@ namespace VULKAN_HPP_NAMESPACE
pCustomSampleOrders = customSampleOrders_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -54049,6 +56389,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineViewportExclusiveScissorStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -54069,7 +56410,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineViewportExclusiveScissorStateCreateInfoNV & setExclusiveScissors(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Rect2D> const & exclusiveScissors_ )
VULKAN_HPP_NOEXCEPT
@@ -54078,7 +56419,8 @@ namespace VULKAN_HPP_NAMESPACE
pExclusiveScissors = exclusiveScissors_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineViewportExclusiveScissorStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -54158,6 +56500,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ShadingRatePaletteNV & setShadingRatePaletteEntryCount( uint32_t shadingRatePaletteEntryCount_ ) VULKAN_HPP_NOEXCEPT
{
shadingRatePaletteEntryCount = shadingRatePaletteEntryCount_;
@@ -54171,7 +56514,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
ShadingRatePaletteNV & setShadingRatePaletteEntries(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV> const &
shadingRatePaletteEntries_ ) VULKAN_HPP_NOEXCEPT
@@ -54180,7 +56523,8 @@ namespace VULKAN_HPP_NAMESPACE
pShadingRatePaletteEntries = shadingRatePaletteEntries_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkShadingRatePaletteNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -54263,6 +56607,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineViewportShadingRateImageStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -54289,7 +56634,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineViewportShadingRateImageStateCreateInfoNV & setShadingRatePalettes(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV> const &
shadingRatePalettes_ ) VULKAN_HPP_NOEXCEPT
@@ -54298,7 +56643,8 @@ namespace VULKAN_HPP_NAMESPACE
pShadingRatePalettes = shadingRatePalettes_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineViewportShadingRateImageStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -54379,6 +56725,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ViewportSwizzleNV & setX( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV x_ ) VULKAN_HPP_NOEXCEPT
{
x = x_;
@@ -54402,6 +56749,7 @@ namespace VULKAN_HPP_NAMESPACE
w = w_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkViewportSwizzleNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -54484,6 +56832,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineViewportSwizzleStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -54510,7 +56859,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineViewportSwizzleStateCreateInfoNV & setViewportSwizzles(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ViewportSwizzleNV> const &
viewportSwizzles_ ) VULKAN_HPP_NOEXCEPT
@@ -54519,7 +56868,8 @@ namespace VULKAN_HPP_NAMESPACE
pViewportSwizzles = viewportSwizzles_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineViewportSwizzleStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -54589,6 +56939,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ViewportWScalingNV & setXcoeff( float xcoeff_ ) VULKAN_HPP_NOEXCEPT
{
xcoeff = xcoeff_;
@@ -54600,6 +56951,7 @@ namespace VULKAN_HPP_NAMESPACE
ycoeff = ycoeff_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkViewportWScalingNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -54680,6 +57032,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PipelineViewportWScalingStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -54706,7 +57059,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PipelineViewportWScalingStateCreateInfoNV & setViewportWScalings(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ViewportWScalingNV> const &
viewportWScalings_ ) VULKAN_HPP_NOEXCEPT
@@ -54715,7 +57068,8 @@ namespace VULKAN_HPP_NAMESPACE
pViewportWScalings = viewportWScalings_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPipelineViewportWScalingStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -54789,6 +57143,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PresentFrameTokenGGP & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -54800,6 +57155,7 @@ namespace VULKAN_HPP_NAMESPACE
frameToken = frameToken_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPresentFrameTokenGGP const &() const VULKAN_HPP_NOEXCEPT
{
@@ -54842,6 +57198,109 @@ namespace VULKAN_HPP_NAMESPACE
};
#endif /*VK_USE_PLATFORM_GGP*/
+ struct PresentIdKHR
+ {
+ static const bool allowDuplicate = false;
+ static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePresentIdKHR;
+
+#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
+ VULKAN_HPP_CONSTEXPR PresentIdKHR( uint32_t swapchainCount_ = {},
+ const uint64_t * pPresentIds_ = {} ) VULKAN_HPP_NOEXCEPT
+ : swapchainCount( swapchainCount_ )
+ , pPresentIds( pPresentIds_ )
+ {}
+
+ VULKAN_HPP_CONSTEXPR PresentIdKHR( PresentIdKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PresentIdKHR( VkPresentIdKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ : PresentIdKHR( *reinterpret_cast<PresentIdKHR const *>( &rhs ) )
+ {}
+
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+ PresentIdKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint64_t> const & presentIds_ )
+ : swapchainCount( static_cast<uint32_t>( presentIds_.size() ) ), pPresentIds( presentIds_.data() )
+ {}
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_CONSTRUCTORS*/
+
+ VULKAN_HPP_CONSTEXPR_14 PresentIdKHR & operator=( PresentIdKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default;
+
+ PresentIdKHR & operator=( VkPresentIdKHR const & rhs ) VULKAN_HPP_NOEXCEPT
+ {
+ *this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::PresentIdKHR const *>( &rhs );
+ return *this;
+ }
+
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
+ PresentIdKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pNext = pNext_;
+ return *this;
+ }
+
+ PresentIdKHR & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT
+ {
+ swapchainCount = swapchainCount_;
+ return *this;
+ }
+
+ PresentIdKHR & setPPresentIds( const uint64_t * pPresentIds_ ) VULKAN_HPP_NOEXCEPT
+ {
+ pPresentIds = pPresentIds_;
+ return *this;
+ }
+
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+ PresentIdKHR & setPresentIds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint64_t> const & presentIds_ )
+ VULKAN_HPP_NOEXCEPT
+ {
+ swapchainCount = static_cast<uint32_t>( presentIds_.size() );
+ pPresentIds = presentIds_.data();
+ return *this;
+ }
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
+
+ operator VkPresentIdKHR const &() const VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<const VkPresentIdKHR *>( this );
+ }
+
+ operator VkPresentIdKHR &() VULKAN_HPP_NOEXCEPT
+ {
+ return *reinterpret_cast<VkPresentIdKHR *>( this );
+ }
+
+#if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR )
+ auto operator<=>( PresentIdKHR const & ) const = default;
+#else
+ bool operator==( PresentIdKHR const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchainCount == rhs.swapchainCount ) &&
+ ( pPresentIds == rhs.pPresentIds );
+ }
+
+ bool operator!=( PresentIdKHR const & rhs ) const VULKAN_HPP_NOEXCEPT
+ {
+ return !operator==( rhs );
+ }
+#endif
+
+ public:
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentIdKHR;
+ const void * pNext = {};
+ uint32_t swapchainCount = {};
+ const uint64_t * pPresentIds = {};
+ };
+ static_assert( sizeof( PresentIdKHR ) == sizeof( VkPresentIdKHR ), "struct and wrapper have different size!" );
+ static_assert( std::is_standard_layout<PresentIdKHR>::value, "struct wrapper is not a standard layout!" );
+
+ template <>
+ struct CppType<StructureType, StructureType::ePresentIdKHR>
+ {
+ using Type = PresentIdKHR;
+ };
+
struct PresentInfoKHR
{
static const bool allowDuplicate = false;
@@ -54916,6 +57375,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PresentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -54934,7 +57394,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PresentInfoKHR & setWaitSemaphores(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Semaphore> const & waitSemaphores_ )
VULKAN_HPP_NOEXCEPT
@@ -54943,7 +57403,7 @@ namespace VULKAN_HPP_NAMESPACE
pWaitSemaphores = waitSemaphores_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
PresentInfoKHR & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -54957,7 +57417,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PresentInfoKHR & setSwapchains(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SwapchainKHR> const & swapchains_ )
VULKAN_HPP_NOEXCEPT
@@ -54966,7 +57426,7 @@ namespace VULKAN_HPP_NAMESPACE
pSwapchains = swapchains_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
PresentInfoKHR & setPImageIndices( const uint32_t * pImageIndices_ ) VULKAN_HPP_NOEXCEPT
{
@@ -54974,7 +57434,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PresentInfoKHR & setImageIndices(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & imageIndices_ ) VULKAN_HPP_NOEXCEPT
{
@@ -54982,7 +57442,7 @@ namespace VULKAN_HPP_NAMESPACE
pImageIndices = imageIndices_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
PresentInfoKHR & setPResults( VULKAN_HPP_NAMESPACE::Result * pResults_ ) VULKAN_HPP_NOEXCEPT
{
@@ -54990,7 +57450,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PresentInfoKHR & setResults(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<VULKAN_HPP_NAMESPACE::Result> const & results_ ) VULKAN_HPP_NOEXCEPT
{
@@ -54998,7 +57458,8 @@ namespace VULKAN_HPP_NAMESPACE
pResults = results_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPresentInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -55076,6 +57537,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RectLayerKHR & setOffset( VULKAN_HPP_NAMESPACE::Offset2D const & offset_ ) VULKAN_HPP_NOEXCEPT
{
offset = offset_;
@@ -55093,6 +57555,7 @@ namespace VULKAN_HPP_NAMESPACE
layer = layer_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRectLayerKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -55158,6 +57621,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PresentRegionKHR & setRectangleCount( uint32_t rectangleCount_ ) VULKAN_HPP_NOEXCEPT
{
rectangleCount = rectangleCount_;
@@ -55170,7 +57634,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PresentRegionKHR & setRectangles(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::RectLayerKHR> const & rectangles_ )
VULKAN_HPP_NOEXCEPT
@@ -55179,7 +57643,8 @@ namespace VULKAN_HPP_NAMESPACE
pRectangles = rectangles_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPresentRegionKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -55249,6 +57714,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PresentRegionsKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -55267,7 +57733,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PresentRegionsKHR & setRegions(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::PresentRegionKHR> const & regions_ )
VULKAN_HPP_NOEXCEPT
@@ -55276,7 +57742,8 @@ namespace VULKAN_HPP_NAMESPACE
pRegions = regions_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPresentRegionsKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -55344,6 +57811,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PresentTimeGOOGLE & setPresentID( uint32_t presentID_ ) VULKAN_HPP_NOEXCEPT
{
presentID = presentID_;
@@ -55355,6 +57823,7 @@ namespace VULKAN_HPP_NAMESPACE
desiredPresentTime = desiredPresentTime_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPresentTimeGOOGLE const &() const VULKAN_HPP_NOEXCEPT
{
@@ -55424,6 +57893,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PresentTimesInfoGOOGLE & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -55442,7 +57912,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
PresentTimesInfoGOOGLE & setTimes(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE> const & times_ )
VULKAN_HPP_NOEXCEPT
@@ -55451,7 +57921,8 @@ namespace VULKAN_HPP_NAMESPACE
pTimes = times_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPresentTimesInfoGOOGLE const &() const VULKAN_HPP_NOEXCEPT
{
@@ -55521,6 +57992,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
PrivateDataSlotCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -55533,6 +58005,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkPrivateDataSlotCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -55600,6 +58073,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ProtectedSubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -55611,6 +58085,7 @@ namespace VULKAN_HPP_NAMESPACE
protectedSubmit = protectedSubmit_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkProtectedSubmitInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -55684,6 +58159,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
QueryPoolCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -55714,6 +58190,7 @@ namespace VULKAN_HPP_NAMESPACE
pipelineStatistics = pipelineStatistics_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkQueryPoolCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -55801,6 +58278,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
QueryPoolPerformanceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -55825,7 +58303,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
QueryPoolPerformanceCreateInfoKHR & setCounterIndices(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & counterIndices_ ) VULKAN_HPP_NOEXCEPT
{
@@ -55833,7 +58311,8 @@ namespace VULKAN_HPP_NAMESPACE
pCounterIndices = counterIndices_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkQueryPoolPerformanceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -55911,6 +58390,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
QueryPoolPerformanceQueryCreateInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -55923,6 +58403,7 @@ namespace VULKAN_HPP_NAMESPACE
performanceCountersSampling = performanceCountersSampling_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkQueryPoolPerformanceQueryCreateInfoINTEL const &() const VULKAN_HPP_NOEXCEPT
{
@@ -56158,6 +58639,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
QueueFamilyGlobalPriorityPropertiesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -56177,6 +58659,7 @@ namespace VULKAN_HPP_NAMESPACE
priorities = priorities_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkQueueFamilyGlobalPriorityPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -56395,6 +58878,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RayTracingShaderGroupCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -56438,6 +58922,7 @@ namespace VULKAN_HPP_NAMESPACE
pShaderGroupCaptureReplayHandle = pShaderGroupCaptureReplayHandle_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRayTracingShaderGroupCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -56522,6 +59007,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RayTracingPipelineInterfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -56541,6 +59027,7 @@ namespace VULKAN_HPP_NAMESPACE
maxPipelineRayHitAttributeSize = maxPipelineRayHitAttributeSize_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRayTracingPipelineInterfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -56665,6 +59152,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RayTracingPipelineCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -56690,7 +59178,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RayTracingPipelineCreateInfoKHR & setStages(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo> const &
stages_ ) VULKAN_HPP_NOEXCEPT
@@ -56699,7 +59187,7 @@ namespace VULKAN_HPP_NAMESPACE
pStages = stages_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
RayTracingPipelineCreateInfoKHR & setGroupCount( uint32_t groupCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -56714,7 +59202,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RayTracingPipelineCreateInfoKHR &
setGroups( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<
const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoKHR> const & groups_ ) VULKAN_HPP_NOEXCEPT
@@ -56723,7 +59211,7 @@ namespace VULKAN_HPP_NAMESPACE
pGroups = groups_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
RayTracingPipelineCreateInfoKHR &
setMaxPipelineRayRecursionDepth( uint32_t maxPipelineRayRecursionDepth_ ) VULKAN_HPP_NOEXCEPT
@@ -56771,6 +59259,7 @@ namespace VULKAN_HPP_NAMESPACE
basePipelineIndex = basePipelineIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRayTracingPipelineCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -56866,6 +59355,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RayTracingShaderGroupCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -56902,6 +59392,7 @@ namespace VULKAN_HPP_NAMESPACE
intersectionShader = intersectionShader_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRayTracingShaderGroupCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -57017,6 +59508,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RayTracingPipelineCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -57042,7 +59534,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RayTracingPipelineCreateInfoNV & setStages(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo> const &
stages_ ) VULKAN_HPP_NOEXCEPT
@@ -57051,7 +59543,7 @@ namespace VULKAN_HPP_NAMESPACE
pStages = stages_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
RayTracingPipelineCreateInfoNV & setGroupCount( uint32_t groupCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -57066,7 +59558,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RayTracingPipelineCreateInfoNV &
setGroups( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<
const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV> const & groups_ ) VULKAN_HPP_NOEXCEPT
@@ -57075,7 +59567,7 @@ namespace VULKAN_HPP_NAMESPACE
pGroups = groups_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
RayTracingPipelineCreateInfoNV & setMaxRecursionDepth( uint32_t maxRecursionDepth_ ) VULKAN_HPP_NOEXCEPT
{
@@ -57101,6 +59593,7 @@ namespace VULKAN_HPP_NAMESPACE
basePipelineIndex = basePipelineIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRayTracingPipelineCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -57246,6 +59739,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RenderPassAttachmentBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -57265,7 +59759,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassAttachmentBeginInfo & setAttachments(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ImageView> const & attachments_ )
VULKAN_HPP_NOEXCEPT
@@ -57274,7 +59768,8 @@ namespace VULKAN_HPP_NAMESPACE
pAttachments = attachments_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRenderPassAttachmentBeginInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -57368,6 +59863,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RenderPassBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -57404,7 +59900,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassBeginInfo & setClearValues(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ClearValue> const & clearValues_ )
VULKAN_HPP_NOEXCEPT
@@ -57413,7 +59909,8 @@ namespace VULKAN_HPP_NAMESPACE
pClearValues = clearValues_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRenderPassBeginInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -57538,6 +60035,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SubpassDescription & setFlags( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
@@ -57564,7 +60062,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubpassDescription & setInputAttachments(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::AttachmentReference> const &
inputAttachments_ ) VULKAN_HPP_NOEXCEPT
@@ -57573,7 +60071,7 @@ namespace VULKAN_HPP_NAMESPACE
pInputAttachments = inputAttachments_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SubpassDescription & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -57588,7 +60086,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubpassDescription & setColorAttachments(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::AttachmentReference> const &
colorAttachments_ ) VULKAN_HPP_NOEXCEPT
@@ -57597,7 +60095,7 @@ namespace VULKAN_HPP_NAMESPACE
pColorAttachments = colorAttachments_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SubpassDescription & setPResolveAttachments(
const VULKAN_HPP_NAMESPACE::AttachmentReference * pResolveAttachments_ ) VULKAN_HPP_NOEXCEPT
@@ -57606,7 +60104,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubpassDescription & setResolveAttachments(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::AttachmentReference> const &
resolveAttachments_ ) VULKAN_HPP_NOEXCEPT
@@ -57615,7 +60113,7 @@ namespace VULKAN_HPP_NAMESPACE
pResolveAttachments = resolveAttachments_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SubpassDescription & setPDepthStencilAttachment(
const VULKAN_HPP_NAMESPACE::AttachmentReference * pDepthStencilAttachment_ ) VULKAN_HPP_NOEXCEPT
@@ -57636,7 +60134,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubpassDescription & setPreserveAttachments(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & preserveAttachments_ ) VULKAN_HPP_NOEXCEPT
{
@@ -57644,7 +60142,8 @@ namespace VULKAN_HPP_NAMESPACE
pPreserveAttachments = preserveAttachments_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSubpassDescription const &() const VULKAN_HPP_NOEXCEPT
{
@@ -57728,6 +60227,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SubpassDependency & setSrcSubpass( uint32_t srcSubpass_ ) VULKAN_HPP_NOEXCEPT
{
srcSubpass = srcSubpass_;
@@ -57769,6 +60269,7 @@ namespace VULKAN_HPP_NAMESPACE
dependencyFlags = dependencyFlags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSubpassDependency const &() const VULKAN_HPP_NOEXCEPT
{
@@ -57868,6 +60369,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RenderPassCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -57893,7 +60395,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassCreateInfo & setAttachments(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::AttachmentDescription> const &
attachments_ ) VULKAN_HPP_NOEXCEPT
@@ -57902,7 +60404,7 @@ namespace VULKAN_HPP_NAMESPACE
pAttachments = attachments_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
RenderPassCreateInfo & setSubpassCount( uint32_t subpassCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -57917,7 +60419,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassCreateInfo & setSubpasses(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SubpassDescription> const & subpasses_ )
VULKAN_HPP_NOEXCEPT
@@ -57926,7 +60428,7 @@ namespace VULKAN_HPP_NAMESPACE
pSubpasses = subpasses_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
RenderPassCreateInfo & setDependencyCount( uint32_t dependencyCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -57941,7 +60443,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassCreateInfo & setDependencies(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SubpassDependency> const &
dependencies_ ) VULKAN_HPP_NOEXCEPT
@@ -57950,7 +60452,8 @@ namespace VULKAN_HPP_NAMESPACE
pDependencies = dependencies_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRenderPassCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -58085,6 +60588,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SubpassDescription2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -58123,7 +60627,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubpassDescription2 & setInputAttachments(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::AttachmentReference2> const &
inputAttachments_ ) VULKAN_HPP_NOEXCEPT
@@ -58132,7 +60636,7 @@ namespace VULKAN_HPP_NAMESPACE
pInputAttachments = inputAttachments_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SubpassDescription2 & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -58147,7 +60651,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubpassDescription2 & setColorAttachments(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::AttachmentReference2> const &
colorAttachments_ ) VULKAN_HPP_NOEXCEPT
@@ -58156,7 +60660,7 @@ namespace VULKAN_HPP_NAMESPACE
pColorAttachments = colorAttachments_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SubpassDescription2 & setPResolveAttachments(
const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pResolveAttachments_ ) VULKAN_HPP_NOEXCEPT
@@ -58165,7 +60669,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubpassDescription2 & setResolveAttachments(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::AttachmentReference2> const &
resolveAttachments_ ) VULKAN_HPP_NOEXCEPT
@@ -58174,7 +60678,7 @@ namespace VULKAN_HPP_NAMESPACE
pResolveAttachments = resolveAttachments_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SubpassDescription2 & setPDepthStencilAttachment(
const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilAttachment_ ) VULKAN_HPP_NOEXCEPT
@@ -58195,7 +60699,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubpassDescription2 & setPreserveAttachments(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & preserveAttachments_ ) VULKAN_HPP_NOEXCEPT
{
@@ -58203,7 +60707,8 @@ namespace VULKAN_HPP_NAMESPACE
pPreserveAttachments = preserveAttachments_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSubpassDescription2 const &() const VULKAN_HPP_NOEXCEPT
{
@@ -58302,6 +60807,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SubpassDependency2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -58356,6 +60862,7 @@ namespace VULKAN_HPP_NAMESPACE
viewOffset = viewOffset_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSubpassDependency2 const &() const VULKAN_HPP_NOEXCEPT
{
@@ -58472,6 +60979,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RenderPassCreateInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -58497,7 +61005,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassCreateInfo2 & setAttachments(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::AttachmentDescription2> const &
attachments_ ) VULKAN_HPP_NOEXCEPT
@@ -58506,7 +61014,7 @@ namespace VULKAN_HPP_NAMESPACE
pAttachments = attachments_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
RenderPassCreateInfo2 & setSubpassCount( uint32_t subpassCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -58521,7 +61029,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassCreateInfo2 & setSubpasses(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SubpassDescription2> const &
subpasses_ ) VULKAN_HPP_NOEXCEPT
@@ -58530,7 +61038,7 @@ namespace VULKAN_HPP_NAMESPACE
pSubpasses = subpasses_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
RenderPassCreateInfo2 & setDependencyCount( uint32_t dependencyCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -58545,7 +61053,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassCreateInfo2 & setDependencies(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SubpassDependency2> const &
dependencies_ ) VULKAN_HPP_NOEXCEPT
@@ -58554,7 +61062,7 @@ namespace VULKAN_HPP_NAMESPACE
pDependencies = dependencies_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
RenderPassCreateInfo2 & setCorrelatedViewMaskCount( uint32_t correlatedViewMaskCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -58568,7 +61076,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassCreateInfo2 & setCorrelatedViewMasks(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & correlatedViewMasks_ ) VULKAN_HPP_NOEXCEPT
{
@@ -58576,7 +61084,8 @@ namespace VULKAN_HPP_NAMESPACE
pCorrelatedViewMasks = correlatedViewMasks_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRenderPassCreateInfo2 const &() const VULKAN_HPP_NOEXCEPT
{
@@ -58663,6 +61172,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RenderPassFragmentDensityMapCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -58675,6 +61185,7 @@ namespace VULKAN_HPP_NAMESPACE
fragmentDensityMapAttachment = fragmentDensityMapAttachment_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRenderPassFragmentDensityMapCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -58761,6 +61272,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RenderPassInputAttachmentAspectCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -58781,7 +61293,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassInputAttachmentAspectCreateInfo & setAspectReferences(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference> const &
aspectReferences_ ) VULKAN_HPP_NOEXCEPT
@@ -58790,7 +61302,8 @@ namespace VULKAN_HPP_NAMESPACE
pAspectReferences = aspectReferences_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRenderPassInputAttachmentAspectCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -58887,6 +61400,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RenderPassMultiviewCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -58905,7 +61419,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassMultiviewCreateInfo & setViewMasks(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & viewMasks_ ) VULKAN_HPP_NOEXCEPT
{
@@ -58913,7 +61427,7 @@ namespace VULKAN_HPP_NAMESPACE
pViewMasks = viewMasks_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
RenderPassMultiviewCreateInfo & setDependencyCount( uint32_t dependencyCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -58927,7 +61441,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassMultiviewCreateInfo & setViewOffsets(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const int32_t> const & viewOffsets_ ) VULKAN_HPP_NOEXCEPT
{
@@ -58935,7 +61449,7 @@ namespace VULKAN_HPP_NAMESPACE
pViewOffsets = viewOffsets_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
RenderPassMultiviewCreateInfo & setCorrelationMaskCount( uint32_t correlationMaskCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -58949,7 +61463,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassMultiviewCreateInfo & setCorrelationMasks(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & correlationMasks_ ) VULKAN_HPP_NOEXCEPT
{
@@ -58957,7 +61471,8 @@ namespace VULKAN_HPP_NAMESPACE
pCorrelationMasks = correlationMasks_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRenderPassMultiviewCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -59035,6 +61550,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SubpassSampleLocationsEXT & setSubpassIndex( uint32_t subpassIndex_ ) VULKAN_HPP_NOEXCEPT
{
subpassIndex = subpassIndex_;
@@ -59047,6 +61563,7 @@ namespace VULKAN_HPP_NAMESPACE
sampleLocationsInfo = sampleLocationsInfo_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSubpassSampleLocationsEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -59131,6 +61648,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RenderPassSampleLocationsBeginInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -59152,7 +61670,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassSampleLocationsBeginInfoEXT & setAttachmentInitialSampleLocations(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT> const &
attachmentInitialSampleLocations_ ) VULKAN_HPP_NOEXCEPT
@@ -59161,7 +61679,7 @@ namespace VULKAN_HPP_NAMESPACE
pAttachmentInitialSampleLocations = attachmentInitialSampleLocations_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
RenderPassSampleLocationsBeginInfoEXT &
setPostSubpassSampleLocationsCount( uint32_t postSubpassSampleLocationsCount_ ) VULKAN_HPP_NOEXCEPT
@@ -59177,7 +61695,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
RenderPassSampleLocationsBeginInfoEXT & setPostSubpassSampleLocations(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT> const &
postSubpassSampleLocations_ ) VULKAN_HPP_NOEXCEPT
@@ -59186,7 +61704,8 @@ namespace VULKAN_HPP_NAMESPACE
pPostSubpassSampleLocations = postSubpassSampleLocations_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRenderPassSampleLocationsBeginInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -59263,6 +61782,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
RenderPassTransformBeginInfoQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -59275,6 +61795,7 @@ namespace VULKAN_HPP_NAMESPACE
transform = transform_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkRenderPassTransformBeginInfoQCOM const &() const VULKAN_HPP_NOEXCEPT
{
@@ -59370,6 +61891,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ResolveImageInfo2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -59412,7 +61934,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
ResolveImageInfo2KHR & setRegions(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ImageResolve2KHR> const & regions_ )
VULKAN_HPP_NOEXCEPT
@@ -59421,7 +61943,8 @@ namespace VULKAN_HPP_NAMESPACE
pRegions = regions_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkResolveImageInfo2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -59527,6 +62050,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SamplerCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -59629,6 +62153,7 @@ namespace VULKAN_HPP_NAMESPACE
unnormalizedCoordinates = unnormalizedCoordinates_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSamplerCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -59724,6 +62249,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SamplerCustomBorderColorCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -59742,6 +62268,7 @@ namespace VULKAN_HPP_NAMESPACE
format = format_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSamplerCustomBorderColorCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -59799,6 +62326,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SamplerReductionModeCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -59811,6 +62339,7 @@ namespace VULKAN_HPP_NAMESPACE
reductionMode = reductionMode_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSamplerReductionModeCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -59897,6 +62426,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SamplerYcbcrConversionCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -59956,6 +62486,7 @@ namespace VULKAN_HPP_NAMESPACE
forceExplicitReconstruction = forceExplicitReconstruction_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSamplerYcbcrConversionCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -60112,6 +62643,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SamplerYcbcrConversionInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -60124,6 +62656,7 @@ namespace VULKAN_HPP_NAMESPACE
conversion = conversion_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSamplerYcbcrConversionInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -60198,6 +62731,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ScreenSurfaceCreateInfoQNX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -60222,6 +62756,7 @@ namespace VULKAN_HPP_NAMESPACE
window = window_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkScreenSurfaceCreateInfoQNX const &() const VULKAN_HPP_NOEXCEPT
{
@@ -60294,6 +62829,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SemaphoreCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -60305,6 +62841,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSemaphoreCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -60375,6 +62912,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SemaphoreGetFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -60393,6 +62931,7 @@ namespace VULKAN_HPP_NAMESPACE
handleType = handleType_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSemaphoreGetFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -60468,6 +63007,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SemaphoreGetWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -60486,6 +63026,7 @@ namespace VULKAN_HPP_NAMESPACE
handleType = handleType_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSemaphoreGetWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -60565,6 +63106,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SemaphoreGetZirconHandleInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -60583,6 +63125,7 @@ namespace VULKAN_HPP_NAMESPACE
handleType = handleType_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSemaphoreGetZirconHandleInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT
{
@@ -60656,6 +63199,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SemaphoreSignalInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -60673,6 +63217,7 @@ namespace VULKAN_HPP_NAMESPACE
value = value_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSemaphoreSignalInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -60748,6 +63293,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SemaphoreSubmitInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -60777,6 +63323,7 @@ namespace VULKAN_HPP_NAMESPACE
deviceIndex = deviceIndex_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSemaphoreSubmitInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -60850,6 +63397,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SemaphoreTypeCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -60867,6 +63415,7 @@ namespace VULKAN_HPP_NAMESPACE
initialValue = initialValue_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSemaphoreTypeCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -60964,6 +63513,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SemaphoreWaitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -60988,7 +63538,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SemaphoreWaitInfo & setSemaphores(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Semaphore> const & semaphores_ )
VULKAN_HPP_NOEXCEPT
@@ -60997,7 +63547,7 @@ namespace VULKAN_HPP_NAMESPACE
pSemaphores = semaphores_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SemaphoreWaitInfo & setPValues( const uint64_t * pValues_ ) VULKAN_HPP_NOEXCEPT
{
@@ -61005,7 +63555,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SemaphoreWaitInfo &
setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint64_t> const & values_ ) VULKAN_HPP_NOEXCEPT
{
@@ -61013,7 +63563,8 @@ namespace VULKAN_HPP_NAMESPACE
pValues = values_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSemaphoreWaitInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -61082,11 +63633,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SetStateFlagsIndirectCommandNV & setData( uint32_t data_ ) VULKAN_HPP_NOEXCEPT
{
data = data_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSetStateFlagsIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -61157,6 +63710,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ShaderModuleCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -61181,7 +63735,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
ShaderModuleCreateInfo &
setCode( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & code_ ) VULKAN_HPP_NOEXCEPT
{
@@ -61189,7 +63743,8 @@ namespace VULKAN_HPP_NAMESPACE
pCode = code_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkShaderModuleCreateInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -61265,6 +63820,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ShaderModuleValidationCacheCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -61277,6 +63833,7 @@ namespace VULKAN_HPP_NAMESPACE
validationCache = validationCache_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkShaderModuleValidationCacheCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -61841,6 +64398,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
StreamDescriptorSurfaceCreateInfoGGP & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -61860,6 +64418,7 @@ namespace VULKAN_HPP_NAMESPACE
streamDescriptor = streamDescriptor_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkStreamDescriptorSurfaceCreateInfoGGP const &() const VULKAN_HPP_NOEXCEPT
{
@@ -61933,6 +64492,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
StridedDeviceAddressRegionKHR &
setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT
{
@@ -61951,6 +64511,7 @@ namespace VULKAN_HPP_NAMESPACE
size = size_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkStridedDeviceAddressRegionKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -62053,6 +64614,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -62071,7 +64633,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubmitInfo & setWaitSemaphores(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Semaphore> const & waitSemaphores_ )
VULKAN_HPP_NOEXCEPT
@@ -62080,7 +64642,7 @@ namespace VULKAN_HPP_NAMESPACE
pWaitSemaphores = waitSemaphores_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SubmitInfo &
setPWaitDstStageMask( const VULKAN_HPP_NAMESPACE::PipelineStageFlags * pWaitDstStageMask_ ) VULKAN_HPP_NOEXCEPT
@@ -62089,7 +64651,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubmitInfo & setWaitDstStageMask(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::PipelineStageFlags> const &
waitDstStageMask_ ) VULKAN_HPP_NOEXCEPT
@@ -62098,7 +64660,7 @@ namespace VULKAN_HPP_NAMESPACE
pWaitDstStageMask = waitDstStageMask_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SubmitInfo & setCommandBufferCount( uint32_t commandBufferCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -62112,7 +64674,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubmitInfo & setCommandBuffers(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::CommandBuffer> const & commandBuffers_ )
VULKAN_HPP_NOEXCEPT
@@ -62121,7 +64683,7 @@ namespace VULKAN_HPP_NAMESPACE
pCommandBuffers = commandBuffers_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SubmitInfo & setSignalSemaphoreCount( uint32_t signalSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -62135,7 +64697,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubmitInfo & setSignalSemaphores(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::Semaphore> const & signalSemaphores_ )
VULKAN_HPP_NOEXCEPT
@@ -62144,7 +64706,8 @@ namespace VULKAN_HPP_NAMESPACE
pSignalSemaphores = signalSemaphores_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSubmitInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -62250,6 +64813,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SubmitInfo2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -62275,7 +64839,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubmitInfo2KHR & setWaitSemaphoreInfos(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfoKHR> const &
waitSemaphoreInfos_ ) VULKAN_HPP_NOEXCEPT
@@ -62284,7 +64848,7 @@ namespace VULKAN_HPP_NAMESPACE
pWaitSemaphoreInfos = waitSemaphoreInfos_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SubmitInfo2KHR & setCommandBufferInfoCount( uint32_t commandBufferInfoCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -62299,7 +64863,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubmitInfo2KHR & setCommandBufferInfos(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::CommandBufferSubmitInfoKHR> const &
commandBufferInfos_ ) VULKAN_HPP_NOEXCEPT
@@ -62308,7 +64872,7 @@ namespace VULKAN_HPP_NAMESPACE
pCommandBufferInfos = commandBufferInfos_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SubmitInfo2KHR & setSignalSemaphoreInfoCount( uint32_t signalSemaphoreInfoCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -62323,7 +64887,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SubmitInfo2KHR & setSignalSemaphoreInfos(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfoKHR> const &
signalSemaphoreInfos_ ) VULKAN_HPP_NOEXCEPT
@@ -62332,7 +64896,8 @@ namespace VULKAN_HPP_NAMESPACE
pSignalSemaphoreInfos = signalSemaphoreInfos_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSubmitInfo2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -62410,6 +64975,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SubpassBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -62421,6 +64987,7 @@ namespace VULKAN_HPP_NAMESPACE
contents = contents_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSubpassBeginInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -62497,6 +65064,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SubpassDescriptionDepthStencilResolve & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -62523,6 +65091,7 @@ namespace VULKAN_HPP_NAMESPACE
pDepthStencilResolveAttachment = pDepthStencilResolveAttachment_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSubpassDescriptionDepthStencilResolve const &() const VULKAN_HPP_NOEXCEPT
{
@@ -62592,11 +65161,13 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SubpassEndInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSubpassEndInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -62640,7 +65211,7 @@ namespace VULKAN_HPP_NAMESPACE
{
static const bool allowDuplicate = false;
static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType =
- StructureType::eSubpasssShadingPipelineCreateInfoHUAWEI;
+ StructureType::eSubpassShadingPipelineCreateInfoHUAWEI;
#if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
VULKAN_HPP_CONSTEXPR SubpassShadingPipelineCreateInfoHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {},
@@ -62694,7 +65265,7 @@ namespace VULKAN_HPP_NAMESPACE
#endif
public:
- VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpasssShadingPipelineCreateInfoHUAWEI;
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassShadingPipelineCreateInfoHUAWEI;
void * pNext = {};
VULKAN_HPP_NAMESPACE::RenderPass renderPass = {};
uint32_t subpass = {};
@@ -62705,7 +65276,7 @@ namespace VULKAN_HPP_NAMESPACE
"struct wrapper is not a standard layout!" );
template <>
- struct CppType<StructureType, StructureType::eSubpasssShadingPipelineCreateInfoHUAWEI>
+ struct CppType<StructureType, StructureType::eSubpassShadingPipelineCreateInfoHUAWEI>
{
using Type = SubpassShadingPipelineCreateInfoHUAWEI;
};
@@ -63003,6 +65574,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SurfaceCapabilitiesFullScreenExclusiveEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -63015,6 +65587,7 @@ namespace VULKAN_HPP_NAMESPACE
fullScreenExclusiveSupported = fullScreenExclusiveSupported_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSurfaceCapabilitiesFullScreenExclusiveEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -63214,6 +65787,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SurfaceFullScreenExclusiveInfoEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -63226,6 +65800,7 @@ namespace VULKAN_HPP_NAMESPACE
fullScreenExclusive = fullScreenExclusive_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSurfaceFullScreenExclusiveInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -63300,6 +65875,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SurfaceFullScreenExclusiveWin32InfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -63311,6 +65887,7 @@ namespace VULKAN_HPP_NAMESPACE
hmonitor = hmonitor_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSurfaceFullScreenExclusiveWin32InfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -63381,6 +65958,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SurfaceProtectedCapabilitiesKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -63393,6 +65971,7 @@ namespace VULKAN_HPP_NAMESPACE
supportsProtected = supportsProtected_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSurfaceProtectedCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -63462,6 +66041,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SwapchainCounterCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -63474,6 +66054,7 @@ namespace VULKAN_HPP_NAMESPACE
surfaceCounters = surfaceCounters_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSwapchainCounterCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -63612,6 +66193,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SwapchainCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -63686,7 +66268,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
SwapchainCreateInfoKHR & setQueueFamilyIndices(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & queueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT
{
@@ -63694,7 +66276,7 @@ namespace VULKAN_HPP_NAMESPACE
pQueueFamilyIndices = queueFamilyIndices_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
SwapchainCreateInfoKHR &
setPreTransform( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR preTransform_ ) VULKAN_HPP_NOEXCEPT
@@ -63727,6 +66309,7 @@ namespace VULKAN_HPP_NAMESPACE
oldSwapchain = oldSwapchain_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSwapchainCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -63821,6 +66404,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
SwapchainDisplayNativeHdrCreateInfoAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -63833,6 +66417,7 @@ namespace VULKAN_HPP_NAMESPACE
localDimmingEnable = localDimmingEnable_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkSwapchainDisplayNativeHdrCreateInfoAMD const &() const VULKAN_HPP_NOEXCEPT
{
@@ -63990,6 +66575,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
TimelineSemaphoreSubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -64008,7 +66594,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
TimelineSemaphoreSubmitInfo & setWaitSemaphoreValues(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint64_t> const & waitSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT
{
@@ -64016,7 +66602,7 @@ namespace VULKAN_HPP_NAMESPACE
pWaitSemaphoreValues = waitSemaphoreValues_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
TimelineSemaphoreSubmitInfo &
setSignalSemaphoreValueCount( uint32_t signalSemaphoreValueCount_ ) VULKAN_HPP_NOEXCEPT
@@ -64032,7 +66618,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
TimelineSemaphoreSubmitInfo & setSignalSemaphoreValues(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint64_t> const & signalSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT
{
@@ -64040,7 +66626,8 @@ namespace VULKAN_HPP_NAMESPACE
pSignalSemaphoreValues = signalSemaphoreValues_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkTimelineSemaphoreSubmitInfo const &() const VULKAN_HPP_NOEXCEPT
{
@@ -64122,6 +66709,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
TraceRaysIndirectCommandKHR & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT
{
width = width_;
@@ -64139,6 +66727,7 @@ namespace VULKAN_HPP_NAMESPACE
depth = depth_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkTraceRaysIndirectCommandKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -64213,6 +66802,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ValidationCacheCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -64238,7 +66828,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
template <typename T>
ValidationCacheCreateInfoEXT &
setInitialData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const T> const & initialData_ ) VULKAN_HPP_NOEXCEPT
@@ -64247,7 +66837,8 @@ namespace VULKAN_HPP_NAMESPACE
pInitialData = initialData_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkValidationCacheCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -64338,6 +66929,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ValidationFeaturesEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -64358,7 +66950,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
ValidationFeaturesEXT & setEnabledValidationFeatures(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ValidationFeatureEnableEXT> const &
enabledValidationFeatures_ ) VULKAN_HPP_NOEXCEPT
@@ -64367,7 +66959,7 @@ namespace VULKAN_HPP_NAMESPACE
pEnabledValidationFeatures = enabledValidationFeatures_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
ValidationFeaturesEXT &
setDisabledValidationFeatureCount( uint32_t disabledValidationFeatureCount_ ) VULKAN_HPP_NOEXCEPT
@@ -64383,7 +66975,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
ValidationFeaturesEXT & setDisabledValidationFeatures(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ValidationFeatureDisableEXT> const &
disabledValidationFeatures_ ) VULKAN_HPP_NOEXCEPT
@@ -64392,7 +66984,8 @@ namespace VULKAN_HPP_NAMESPACE
pDisabledValidationFeatures = disabledValidationFeatures_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkValidationFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -64478,6 +67071,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ValidationFlagsEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -64497,7 +67091,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
ValidationFlagsEXT & setDisabledValidationChecks(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::ValidationCheckEXT> const &
disabledValidationChecks_ ) VULKAN_HPP_NOEXCEPT
@@ -64506,7 +67100,8 @@ namespace VULKAN_HPP_NAMESPACE
pDisabledValidationChecks = disabledValidationChecks_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkValidationFlagsEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -64586,6 +67181,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VertexInputAttributeDescription2EXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -64615,6 +67211,7 @@ namespace VULKAN_HPP_NAMESPACE
offset = offset_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVertexInputAttributeDescription2EXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -64695,6 +67292,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VertexInputBindingDescription2EXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -64725,6 +67323,7 @@ namespace VULKAN_HPP_NAMESPACE
divisor = divisor_;
return *this;
}
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVertexInputBindingDescription2EXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -64799,6 +67398,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
ViSurfaceCreateInfoNN & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -64816,6 +67416,7 @@ namespace VULKAN_HPP_NAMESPACE
window = window_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkViSurfaceCreateInfoNN const &() const VULKAN_HPP_NOEXCEPT
{
@@ -64892,6 +67493,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoPictureResourceKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -64922,6 +67524,7 @@ namespace VULKAN_HPP_NAMESPACE
imageViewBinding = imageViewBinding_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoPictureResourceKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -64998,6 +67601,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoReferenceSlotKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -65016,6 +67620,7 @@ namespace VULKAN_HPP_NAMESPACE
pPictureResource = pPictureResource_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoReferenceSlotKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -65114,6 +67719,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoBeginCodingInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -65159,7 +67765,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoBeginCodingInfoKHR & setReferenceSlots(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::VideoReferenceSlotKHR> const &
referenceSlots_ ) VULKAN_HPP_NOEXCEPT
@@ -65168,7 +67774,8 @@ namespace VULKAN_HPP_NAMESPACE
pReferenceSlots = referenceSlots_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoBeginCodingInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -65251,6 +67858,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoBindMemoryKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -65280,6 +67888,7 @@ namespace VULKAN_HPP_NAMESPACE
memorySize = memorySize_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoBindMemoryKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -65332,7 +67941,7 @@ namespace VULKAN_HPP_NAMESPACE
static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoCapabilitiesKHR;
# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
- VULKAN_HPP_CONSTEXPR VideoCapabilitiesKHR( VULKAN_HPP_NAMESPACE::VideoCapabilitiesFlagsKHR capabilityFlags_ = {},
+ VULKAN_HPP_CONSTEXPR VideoCapabilitiesKHR( VULKAN_HPP_NAMESPACE::VideoCapabilityFlagsKHR capabilityFlags_ = {},
VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferOffsetAlignment_ = {},
VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferSizeAlignment_ = {},
VULKAN_HPP_NAMESPACE::Extent2D videoPictureExtentGranularity_ = {},
@@ -65397,16 +68006,16 @@ namespace VULKAN_HPP_NAMESPACE
# endif
public:
- VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoCapabilitiesKHR;
- void * pNext = {};
- VULKAN_HPP_NAMESPACE::VideoCapabilitiesFlagsKHR capabilityFlags = {};
- VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferOffsetAlignment = {};
- VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferSizeAlignment = {};
- VULKAN_HPP_NAMESPACE::Extent2D videoPictureExtentGranularity = {};
- VULKAN_HPP_NAMESPACE::Extent2D minExtent = {};
- VULKAN_HPP_NAMESPACE::Extent2D maxExtent = {};
- uint32_t maxReferencePicturesSlotsCount = {};
- uint32_t maxReferencePicturesActiveCount = {};
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoCapabilitiesKHR;
+ void * pNext = {};
+ VULKAN_HPP_NAMESPACE::VideoCapabilityFlagsKHR capabilityFlags = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferOffsetAlignment = {};
+ VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferSizeAlignment = {};
+ VULKAN_HPP_NAMESPACE::Extent2D videoPictureExtentGranularity = {};
+ VULKAN_HPP_NAMESPACE::Extent2D minExtent = {};
+ VULKAN_HPP_NAMESPACE::Extent2D maxExtent = {};
+ uint32_t maxReferencePicturesSlotsCount = {};
+ uint32_t maxReferencePicturesActiveCount = {};
};
static_assert( sizeof( VideoCapabilitiesKHR ) == sizeof( VkVideoCapabilitiesKHR ),
"struct and wrapper have different size!" );
@@ -65448,6 +68057,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoCodingControlInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -65459,6 +68069,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoCodingControlInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -65608,6 +68219,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeH264DpbSlotInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -65620,6 +68232,7 @@ namespace VULKAN_HPP_NAMESPACE
pStdReferenceInfo = pStdReferenceInfo_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeH264DpbSlotInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -65689,6 +68302,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeH264MvcEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -65700,6 +68314,7 @@ namespace VULKAN_HPP_NAMESPACE
pStdMvc = pStdMvc_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeH264MvcEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -65783,6 +68398,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeH264PictureInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -65808,7 +68424,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoDecodeH264PictureInfoEXT & setSlicesDataOffsets(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & slicesDataOffsets_ ) VULKAN_HPP_NOEXCEPT
{
@@ -65816,7 +68432,8 @@ namespace VULKAN_HPP_NAMESPACE
pSlicesDataOffsets = slicesDataOffsets_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeH264PictureInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -65870,10 +68487,10 @@ namespace VULKAN_HPP_NAMESPACE
# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
VULKAN_HPP_CONSTEXPR VideoDecodeH264ProfileEXT(
- StdVideoH264ProfileIdc stdProfileIdc_ = {},
- VULKAN_HPP_NAMESPACE::VideoDecodeH264FieldLayoutFlagsEXT fieldLayout_ = {} ) VULKAN_HPP_NOEXCEPT
+ StdVideoH264ProfileIdc stdProfileIdc_ = {},
+ VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureLayoutFlagsEXT pictureLayout_ = {} ) VULKAN_HPP_NOEXCEPT
: stdProfileIdc( stdProfileIdc_ )
- , fieldLayout( fieldLayout_ )
+ , pictureLayout( pictureLayout_ )
{}
VULKAN_HPP_CONSTEXPR
@@ -65893,6 +68510,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeH264ProfileEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -65906,11 +68524,12 @@ namespace VULKAN_HPP_NAMESPACE
}
VideoDecodeH264ProfileEXT &
- setFieldLayout( VULKAN_HPP_NAMESPACE::VideoDecodeH264FieldLayoutFlagsEXT fieldLayout_ ) VULKAN_HPP_NOEXCEPT
+ setPictureLayout( VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureLayoutFlagsEXT pictureLayout_ ) VULKAN_HPP_NOEXCEPT
{
- fieldLayout = fieldLayout_;
+ pictureLayout = pictureLayout_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeH264ProfileEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -65929,7 +68548,7 @@ namespace VULKAN_HPP_NAMESPACE
{
return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) &&
( memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH264ProfileIdc ) ) == 0 ) &&
- ( fieldLayout == rhs.fieldLayout );
+ ( pictureLayout == rhs.pictureLayout );
}
bool operator!=( VideoDecodeH264ProfileEXT const & rhs ) const VULKAN_HPP_NOEXCEPT
@@ -65939,10 +68558,10 @@ namespace VULKAN_HPP_NAMESPACE
# endif
public:
- VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264ProfileEXT;
- const void * pNext = {};
- StdVideoH264ProfileIdc stdProfileIdc = {};
- VULKAN_HPP_NAMESPACE::VideoDecodeH264FieldLayoutFlagsEXT fieldLayout = {};
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264ProfileEXT;
+ const void * pNext = {};
+ StdVideoH264ProfileIdc stdProfileIdc = {};
+ VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureLayoutFlagsEXT pictureLayout = {};
};
static_assert( sizeof( VideoDecodeH264ProfileEXT ) == sizeof( VkVideoDecodeH264ProfileEXT ),
"struct and wrapper have different size!" );
@@ -65989,6 +68608,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeH264SessionCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -66008,6 +68628,7 @@ namespace VULKAN_HPP_NAMESPACE
pStdExtensionVersion = pStdExtensionVersion_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeH264SessionCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -66102,6 +68723,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeH264SessionParametersAddInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -66121,7 +68743,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoDecodeH264SessionParametersAddInfoEXT &
setSpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const StdVideoH264SequenceParameterSet> const & spsStd_ )
VULKAN_HPP_NOEXCEPT
@@ -66130,7 +68752,7 @@ namespace VULKAN_HPP_NAMESPACE
pSpsStd = spsStd_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VideoDecodeH264SessionParametersAddInfoEXT & setPpsStdCount( uint32_t ppsStdCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -66145,7 +68767,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoDecodeH264SessionParametersAddInfoEXT &
setPpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const StdVideoH264PictureParameterSet> const & ppsStd_ )
VULKAN_HPP_NOEXCEPT
@@ -66154,7 +68776,8 @@ namespace VULKAN_HPP_NAMESPACE
pPpsStd = ppsStd_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeH264SessionParametersAddInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -66240,6 +68863,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeH264SessionParametersCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -66264,6 +68888,7 @@ namespace VULKAN_HPP_NAMESPACE
pParametersAddInfo = pParametersAddInfo_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeH264SessionParametersCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -66412,6 +69037,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeH265DpbSlotInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -66424,6 +69050,7 @@ namespace VULKAN_HPP_NAMESPACE
pStdReferenceInfo = pStdReferenceInfo_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeH265DpbSlotInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -66508,6 +69135,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeH265PictureInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -66533,7 +69161,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoDecodeH265PictureInfoEXT & setSlicesDataOffsets(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & slicesDataOffsets_ ) VULKAN_HPP_NOEXCEPT
{
@@ -66541,7 +69169,8 @@ namespace VULKAN_HPP_NAMESPACE
pSlicesDataOffsets = slicesDataOffsets_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeH265PictureInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -66615,6 +69244,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeH265ProfileEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -66626,6 +69256,7 @@ namespace VULKAN_HPP_NAMESPACE
stdProfileIdc = stdProfileIdc_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeH265ProfileEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -66702,6 +69333,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeH265SessionCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -66721,6 +69353,7 @@ namespace VULKAN_HPP_NAMESPACE
pStdExtensionVersion = pStdExtensionVersion_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeH265SessionCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -66815,6 +69448,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeH265SessionParametersAddInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -66834,7 +69468,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoDecodeH265SessionParametersAddInfoEXT &
setSpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const StdVideoH265SequenceParameterSet> const & spsStd_ )
VULKAN_HPP_NOEXCEPT
@@ -66843,7 +69477,7 @@ namespace VULKAN_HPP_NAMESPACE
pSpsStd = spsStd_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VideoDecodeH265SessionParametersAddInfoEXT & setPpsStdCount( uint32_t ppsStdCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -66858,7 +69492,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoDecodeH265SessionParametersAddInfoEXT &
setPpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const StdVideoH265PictureParameterSet> const & ppsStd_ )
VULKAN_HPP_NOEXCEPT
@@ -66867,7 +69501,8 @@ namespace VULKAN_HPP_NAMESPACE
pPpsStd = ppsStd_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeH265SessionParametersAddInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -66953,6 +69588,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeH265SessionParametersCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -66977,6 +69613,7 @@ namespace VULKAN_HPP_NAMESPACE
pParametersAddInfo = pParametersAddInfo_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeH265SessionParametersCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -67094,6 +69731,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoDecodeInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -67163,7 +69801,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoDecodeInfoKHR & setReferenceSlots(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::VideoReferenceSlotKHR> const &
referenceSlots_ ) VULKAN_HPP_NOEXCEPT
@@ -67172,7 +69810,8 @@ namespace VULKAN_HPP_NAMESPACE
pReferenceSlots = referenceSlots_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoDecodeInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -67236,17 +69875,17 @@ namespace VULKAN_HPP_NAMESPACE
# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264CapabilitiesEXT(
- VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilitiesFlagsEXT flags_ = {},
- VULKAN_HPP_NAMESPACE::VideoEncodeH264InputModeFlagsEXT inputModeFlags_ = {},
- VULKAN_HPP_NAMESPACE::VideoEncodeH264OutputModeFlagsEXT outputModeFlags_ = {},
- VULKAN_HPP_NAMESPACE::Extent2D minPictureSizeInMbs_ = {},
- VULKAN_HPP_NAMESPACE::Extent2D maxPictureSizeInMbs_ = {},
- VULKAN_HPP_NAMESPACE::Extent2D inputImageDataAlignment_ = {},
- uint8_t maxNumL0ReferenceForP_ = {},
- uint8_t maxNumL0ReferenceForB_ = {},
- uint8_t maxNumL1Reference_ = {},
- uint8_t qualityLevelCount_ = {},
- VULKAN_HPP_NAMESPACE::ExtensionProperties stdExtensionVersion_ = {} ) VULKAN_HPP_NOEXCEPT
+ VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilityFlagsEXT flags_ = {},
+ VULKAN_HPP_NAMESPACE::VideoEncodeH264InputModeFlagsEXT inputModeFlags_ = {},
+ VULKAN_HPP_NAMESPACE::VideoEncodeH264OutputModeFlagsEXT outputModeFlags_ = {},
+ VULKAN_HPP_NAMESPACE::Extent2D minPictureSizeInMbs_ = {},
+ VULKAN_HPP_NAMESPACE::Extent2D maxPictureSizeInMbs_ = {},
+ VULKAN_HPP_NAMESPACE::Extent2D inputImageDataAlignment_ = {},
+ uint8_t maxNumL0ReferenceForP_ = {},
+ uint8_t maxNumL0ReferenceForB_ = {},
+ uint8_t maxNumL1Reference_ = {},
+ uint8_t qualityLevelCount_ = {},
+ VULKAN_HPP_NAMESPACE::ExtensionProperties stdExtensionVersion_ = {} ) VULKAN_HPP_NOEXCEPT
: flags( flags_ )
, inputModeFlags( inputModeFlags_ )
, outputModeFlags( outputModeFlags_ )
@@ -67277,6 +69916,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoEncodeH264CapabilitiesEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -67284,7 +69924,7 @@ namespace VULKAN_HPP_NAMESPACE
}
VideoEncodeH264CapabilitiesEXT &
- setFlags( VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilitiesFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
+ setFlags( VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilityFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT
{
flags = flags_;
return *this;
@@ -67355,6 +69995,7 @@ namespace VULKAN_HPP_NAMESPACE
stdExtensionVersion = stdExtensionVersion_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoEncodeH264CapabilitiesEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -67387,19 +70028,19 @@ namespace VULKAN_HPP_NAMESPACE
# endif
public:
- VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264CapabilitiesEXT;
- const void * pNext = {};
- VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilitiesFlagsEXT flags = {};
- VULKAN_HPP_NAMESPACE::VideoEncodeH264InputModeFlagsEXT inputModeFlags = {};
- VULKAN_HPP_NAMESPACE::VideoEncodeH264OutputModeFlagsEXT outputModeFlags = {};
- VULKAN_HPP_NAMESPACE::Extent2D minPictureSizeInMbs = {};
- VULKAN_HPP_NAMESPACE::Extent2D maxPictureSizeInMbs = {};
- VULKAN_HPP_NAMESPACE::Extent2D inputImageDataAlignment = {};
- uint8_t maxNumL0ReferenceForP = {};
- uint8_t maxNumL0ReferenceForB = {};
- uint8_t maxNumL1Reference = {};
- uint8_t qualityLevelCount = {};
- VULKAN_HPP_NAMESPACE::ExtensionProperties stdExtensionVersion = {};
+ VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264CapabilitiesEXT;
+ const void * pNext = {};
+ VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilityFlagsEXT flags = {};
+ VULKAN_HPP_NAMESPACE::VideoEncodeH264InputModeFlagsEXT inputModeFlags = {};
+ VULKAN_HPP_NAMESPACE::VideoEncodeH264OutputModeFlagsEXT outputModeFlags = {};
+ VULKAN_HPP_NAMESPACE::Extent2D minPictureSizeInMbs = {};
+ VULKAN_HPP_NAMESPACE::Extent2D maxPictureSizeInMbs = {};
+ VULKAN_HPP_NAMESPACE::Extent2D inputImageDataAlignment = {};
+ uint8_t maxNumL0ReferenceForP = {};
+ uint8_t maxNumL0ReferenceForB = {};
+ uint8_t maxNumL1Reference = {};
+ uint8_t qualityLevelCount = {};
+ VULKAN_HPP_NAMESPACE::ExtensionProperties stdExtensionVersion = {};
};
static_assert( sizeof( VideoEncodeH264CapabilitiesEXT ) == sizeof( VkVideoEncodeH264CapabilitiesEXT ),
"struct and wrapper have different size!" );
@@ -67444,6 +70085,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoEncodeH264DpbSlotInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -67462,6 +70104,7 @@ namespace VULKAN_HPP_NAMESPACE
pStdPictureInfo = pStdPictureInfo_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoEncodeH264DpbSlotInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -67556,6 +70199,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoEncodeH264EmitPictureParametersEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -67587,7 +70231,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoEncodeH264EmitPictureParametersEXT & setPsIdEntries(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint8_t> const & psIdEntries_ ) VULKAN_HPP_NOEXCEPT
{
@@ -67595,7 +70239,8 @@ namespace VULKAN_HPP_NAMESPACE
ppsIdEntries = psIdEntries_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoEncodeH264EmitPictureParametersEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -67712,6 +70357,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoEncodeH264NaluSliceEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -67744,7 +70390,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoEncodeH264NaluSliceEXT & setRefFinalList0Entries(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoEXT> const &
refFinalList0Entries_ ) VULKAN_HPP_NOEXCEPT
@@ -67753,7 +70399,7 @@ namespace VULKAN_HPP_NAMESPACE
pRefFinalList0Entries = refFinalList0Entries_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VideoEncodeH264NaluSliceEXT & setRefFinalList1EntryCount( uint8_t refFinalList1EntryCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -67768,7 +70414,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoEncodeH264NaluSliceEXT & setRefFinalList1Entries(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoEXT> const &
refFinalList1Entries_ ) VULKAN_HPP_NOEXCEPT
@@ -67777,7 +70423,7 @@ namespace VULKAN_HPP_NAMESPACE
pRefFinalList1Entries = refFinalList1Entries_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VideoEncodeH264NaluSliceEXT & setPrecedingNaluBytes( uint32_t precedingNaluBytes_ ) VULKAN_HPP_NOEXCEPT
{
@@ -67796,6 +70442,7 @@ namespace VULKAN_HPP_NAMESPACE
maxQp = maxQp_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoEncodeH264NaluSliceEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -67879,6 +70526,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoEncodeH264ProfileEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -67890,6 +70538,7 @@ namespace VULKAN_HPP_NAMESPACE
stdProfileIdc = stdProfileIdc_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoEncodeH264ProfileEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -67968,6 +70617,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoEncodeH264SessionCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -67994,6 +70644,7 @@ namespace VULKAN_HPP_NAMESPACE
pStdExtensionVersion = pStdExtensionVersion_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoEncodeH264SessionCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -68089,6 +70740,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoEncodeH264SessionParametersAddInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -68108,7 +70760,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoEncodeH264SessionParametersAddInfoEXT &
setSpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const StdVideoH264SequenceParameterSet> const & spsStd_ )
VULKAN_HPP_NOEXCEPT
@@ -68117,7 +70769,7 @@ namespace VULKAN_HPP_NAMESPACE
pSpsStd = spsStd_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VideoEncodeH264SessionParametersAddInfoEXT & setPpsStdCount( uint32_t ppsStdCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -68132,7 +70784,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoEncodeH264SessionParametersAddInfoEXT &
setPpsStd( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const StdVideoH264PictureParameterSet> const & ppsStd_ )
VULKAN_HPP_NOEXCEPT
@@ -68141,7 +70793,8 @@ namespace VULKAN_HPP_NAMESPACE
pPpsStd = ppsStd_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoEncodeH264SessionParametersAddInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -68227,6 +70880,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoEncodeH264SessionParametersCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -68251,6 +70905,7 @@ namespace VULKAN_HPP_NAMESPACE
pParametersAddInfo = pParametersAddInfo_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoEncodeH264SessionParametersCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -68357,6 +71012,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoEncodeH264VclFrameInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -68377,7 +71033,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoEncodeH264VclFrameInfoEXT & setRefDefaultFinalList0Entries(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoEXT> const &
refDefaultFinalList0Entries_ ) VULKAN_HPP_NOEXCEPT
@@ -68386,7 +71042,7 @@ namespace VULKAN_HPP_NAMESPACE
pRefDefaultFinalList0Entries = refDefaultFinalList0Entries_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VideoEncodeH264VclFrameInfoEXT &
setRefDefaultFinalList1EntryCount( uint8_t refDefaultFinalList1EntryCount_ ) VULKAN_HPP_NOEXCEPT
@@ -68402,7 +71058,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoEncodeH264VclFrameInfoEXT & setRefDefaultFinalList1Entries(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoEXT> const &
refDefaultFinalList1Entries_ ) VULKAN_HPP_NOEXCEPT
@@ -68411,7 +71067,7 @@ namespace VULKAN_HPP_NAMESPACE
pRefDefaultFinalList1Entries = refDefaultFinalList1Entries_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VideoEncodeH264VclFrameInfoEXT & setNaluSliceEntryCount( uint32_t naluSliceEntryCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -68426,7 +71082,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoEncodeH264VclFrameInfoEXT & setNaluSliceEntries(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::VideoEncodeH264NaluSliceEXT> const &
naluSliceEntries_ ) VULKAN_HPP_NOEXCEPT
@@ -68435,7 +71091,7 @@ namespace VULKAN_HPP_NAMESPACE
pNaluSliceEntries = naluSliceEntries_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VideoEncodeH264VclFrameInfoEXT & setPCurrentPictureInfo(
const VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoEXT * pCurrentPictureInfo_ ) VULKAN_HPP_NOEXCEPT
@@ -68443,6 +71099,7 @@ namespace VULKAN_HPP_NAMESPACE
pCurrentPictureInfo = pCurrentPictureInfo_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoEncodeH264VclFrameInfoEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -68568,6 +71225,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoEncodeInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -68639,7 +71297,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
VideoEncodeInfoKHR & setReferenceSlots(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::VideoReferenceSlotKHR> const &
referenceSlots_ ) VULKAN_HPP_NOEXCEPT
@@ -68648,7 +71306,8 @@ namespace VULKAN_HPP_NAMESPACE
pReferenceSlots = referenceSlots_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoEncodeInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -68747,6 +71406,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoEncodeRateControlInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -68797,6 +71457,7 @@ namespace VULKAN_HPP_NAMESPACE
virtualBufferSizeInMs = virtualBufferSizeInMs_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoEncodeRateControlInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -68878,6 +71539,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoEndCodingInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -68889,6 +71551,7 @@ namespace VULKAN_HPP_NAMESPACE
flags = flags_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoEndCodingInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -69029,6 +71692,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoGetMemoryPropertiesKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -69047,6 +71711,7 @@ namespace VULKAN_HPP_NAMESPACE
pMemoryRequirements = pMemoryRequirements_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoGetMemoryPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -69120,6 +71785,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoQueueFamilyProperties2KHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -69132,6 +71798,7 @@ namespace VULKAN_HPP_NAMESPACE
videoCodecOperations = videoCodecOperations_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoQueueFamilyProperties2KHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -69217,6 +71884,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoSessionCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -69275,6 +71943,7 @@ namespace VULKAN_HPP_NAMESPACE
maxReferencePicturesActiveCount = maxReferencePicturesActiveCount_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoSessionCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -69362,6 +72031,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoSessionParametersCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -69381,6 +72051,7 @@ namespace VULKAN_HPP_NAMESPACE
videoSession = videoSession_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoSessionParametersCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -69456,6 +72127,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
VideoSessionParametersUpdateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -69467,6 +72139,7 @@ namespace VULKAN_HPP_NAMESPACE
updateSequenceCount = updateSequenceCount_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkVideoSessionParametersUpdateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -69541,6 +72214,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
WaylandSurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -69565,6 +72239,7 @@ namespace VULKAN_HPP_NAMESPACE
surface = surface_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkWaylandSurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -69707,6 +72382,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
Win32KeyedMutexAcquireReleaseInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -69726,7 +72402,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
Win32KeyedMutexAcquireReleaseInfoKHR & setAcquireSyncs(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DeviceMemory> const & acquireSyncs_ )
VULKAN_HPP_NOEXCEPT
@@ -69735,7 +72411,7 @@ namespace VULKAN_HPP_NAMESPACE
pAcquireSyncs = acquireSyncs_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Win32KeyedMutexAcquireReleaseInfoKHR & setPAcquireKeys( const uint64_t * pAcquireKeys_ ) VULKAN_HPP_NOEXCEPT
{
@@ -69743,7 +72419,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
Win32KeyedMutexAcquireReleaseInfoKHR & setAcquireKeys(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint64_t> const & acquireKeys_ ) VULKAN_HPP_NOEXCEPT
{
@@ -69751,7 +72427,7 @@ namespace VULKAN_HPP_NAMESPACE
pAcquireKeys = acquireKeys_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Win32KeyedMutexAcquireReleaseInfoKHR & setPAcquireTimeouts( const uint32_t * pAcquireTimeouts_ ) VULKAN_HPP_NOEXCEPT
{
@@ -69759,7 +72435,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
Win32KeyedMutexAcquireReleaseInfoKHR & setAcquireTimeouts(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & acquireTimeouts_ ) VULKAN_HPP_NOEXCEPT
{
@@ -69767,7 +72443,7 @@ namespace VULKAN_HPP_NAMESPACE
pAcquireTimeouts = acquireTimeouts_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Win32KeyedMutexAcquireReleaseInfoKHR & setReleaseCount( uint32_t releaseCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -69782,7 +72458,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
Win32KeyedMutexAcquireReleaseInfoKHR & setReleaseSyncs(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DeviceMemory> const & releaseSyncs_ )
VULKAN_HPP_NOEXCEPT
@@ -69791,7 +72467,7 @@ namespace VULKAN_HPP_NAMESPACE
pReleaseSyncs = releaseSyncs_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Win32KeyedMutexAcquireReleaseInfoKHR & setPReleaseKeys( const uint64_t * pReleaseKeys_ ) VULKAN_HPP_NOEXCEPT
{
@@ -69799,7 +72475,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
Win32KeyedMutexAcquireReleaseInfoKHR & setReleaseKeys(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint64_t> const & releaseKeys_ ) VULKAN_HPP_NOEXCEPT
{
@@ -69807,7 +72483,8 @@ namespace VULKAN_HPP_NAMESPACE
pReleaseKeys = releaseKeys_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkWin32KeyedMutexAcquireReleaseInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -69956,6 +72633,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
Win32KeyedMutexAcquireReleaseInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -69975,7 +72653,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
Win32KeyedMutexAcquireReleaseInfoNV & setAcquireSyncs(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DeviceMemory> const & acquireSyncs_ )
VULKAN_HPP_NOEXCEPT
@@ -69984,7 +72662,7 @@ namespace VULKAN_HPP_NAMESPACE
pAcquireSyncs = acquireSyncs_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Win32KeyedMutexAcquireReleaseInfoNV & setPAcquireKeys( const uint64_t * pAcquireKeys_ ) VULKAN_HPP_NOEXCEPT
{
@@ -69992,7 +72670,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
Win32KeyedMutexAcquireReleaseInfoNV & setAcquireKeys(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint64_t> const & acquireKeys_ ) VULKAN_HPP_NOEXCEPT
{
@@ -70000,7 +72678,7 @@ namespace VULKAN_HPP_NAMESPACE
pAcquireKeys = acquireKeys_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Win32KeyedMutexAcquireReleaseInfoNV &
setPAcquireTimeoutMilliseconds( const uint32_t * pAcquireTimeoutMilliseconds_ ) VULKAN_HPP_NOEXCEPT
@@ -70009,7 +72687,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
Win32KeyedMutexAcquireReleaseInfoNV & setAcquireTimeoutMilliseconds(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint32_t> const & acquireTimeoutMilliseconds_ )
VULKAN_HPP_NOEXCEPT
@@ -70018,7 +72696,7 @@ namespace VULKAN_HPP_NAMESPACE
pAcquireTimeoutMilliseconds = acquireTimeoutMilliseconds_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Win32KeyedMutexAcquireReleaseInfoNV & setReleaseCount( uint32_t releaseCount_ ) VULKAN_HPP_NOEXCEPT
{
@@ -70033,7 +72711,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
Win32KeyedMutexAcquireReleaseInfoNV & setReleaseSyncs(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DeviceMemory> const & releaseSyncs_ )
VULKAN_HPP_NOEXCEPT
@@ -70042,7 +72720,7 @@ namespace VULKAN_HPP_NAMESPACE
pReleaseSyncs = releaseSyncs_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Win32KeyedMutexAcquireReleaseInfoNV & setPReleaseKeys( const uint64_t * pReleaseKeys_ ) VULKAN_HPP_NOEXCEPT
{
@@ -70050,7 +72728,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
Win32KeyedMutexAcquireReleaseInfoNV & setReleaseKeys(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const uint64_t> const & releaseKeys_ ) VULKAN_HPP_NOEXCEPT
{
@@ -70058,7 +72736,8 @@ namespace VULKAN_HPP_NAMESPACE
pReleaseKeys = releaseKeys_.data();
return *this;
}
-# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkWin32KeyedMutexAcquireReleaseInfoNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -70143,6 +72822,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
Win32SurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -70166,6 +72846,7 @@ namespace VULKAN_HPP_NAMESPACE
hwnd = hwnd_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkWin32SurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -70287,6 +72968,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
WriteDescriptorSet & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -70330,7 +73012,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
WriteDescriptorSet & setImageInfo(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DescriptorImageInfo> const &
imageInfo_ ) VULKAN_HPP_NOEXCEPT
@@ -70339,7 +73021,7 @@ namespace VULKAN_HPP_NAMESPACE
pImageInfo = imageInfo_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
WriteDescriptorSet &
setPBufferInfo( const VULKAN_HPP_NAMESPACE::DescriptorBufferInfo * pBufferInfo_ ) VULKAN_HPP_NOEXCEPT
@@ -70348,7 +73030,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
WriteDescriptorSet & setBufferInfo(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::DescriptorBufferInfo> const &
bufferInfo_ ) VULKAN_HPP_NOEXCEPT
@@ -70357,7 +73039,7 @@ namespace VULKAN_HPP_NAMESPACE
pBufferInfo = bufferInfo_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
WriteDescriptorSet &
setPTexelBufferView( const VULKAN_HPP_NAMESPACE::BufferView * pTexelBufferView_ ) VULKAN_HPP_NOEXCEPT
@@ -70366,7 +73048,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
WriteDescriptorSet & setTexelBufferView(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::BufferView> const & texelBufferView_ )
VULKAN_HPP_NOEXCEPT
@@ -70375,7 +73057,8 @@ namespace VULKAN_HPP_NAMESPACE
pTexelBufferView = texelBufferView_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkWriteDescriptorSet const &() const VULKAN_HPP_NOEXCEPT
{
@@ -70470,6 +73153,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
WriteDescriptorSetAccelerationStructureKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -70490,7 +73174,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
WriteDescriptorSetAccelerationStructureKHR & setAccelerationStructures(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR> const &
accelerationStructures_ ) VULKAN_HPP_NOEXCEPT
@@ -70499,7 +73183,8 @@ namespace VULKAN_HPP_NAMESPACE
pAccelerationStructures = accelerationStructures_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkWriteDescriptorSetAccelerationStructureKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -70588,6 +73273,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
WriteDescriptorSetAccelerationStructureNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -70608,7 +73294,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
WriteDescriptorSetAccelerationStructureNV & setAccelerationStructures(
VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const VULKAN_HPP_NAMESPACE::AccelerationStructureNV> const &
accelerationStructures_ ) VULKAN_HPP_NOEXCEPT
@@ -70617,7 +73303,8 @@ namespace VULKAN_HPP_NAMESPACE
pAccelerationStructures = accelerationStructures_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkWriteDescriptorSetAccelerationStructureNV const &() const VULKAN_HPP_NOEXCEPT
{
@@ -70702,6 +73389,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+#if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
WriteDescriptorSetInlineUniformBlockEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -70720,7 +73408,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
-#if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
+# if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
template <typename T>
WriteDescriptorSetInlineUniformBlockEXT &
setData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries<const T> const & data_ ) VULKAN_HPP_NOEXCEPT
@@ -70729,7 +73417,8 @@ namespace VULKAN_HPP_NAMESPACE
pData = data_.data();
return *this;
}
-#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+# endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
+#endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkWriteDescriptorSetInlineUniformBlockEXT const &() const VULKAN_HPP_NOEXCEPT
{
@@ -70804,6 +73493,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
XcbSurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -70827,6 +73517,7 @@ namespace VULKAN_HPP_NAMESPACE
window = window_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkXcbSurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
@@ -70902,6 +73593,7 @@ namespace VULKAN_HPP_NAMESPACE
return *this;
}
+# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
XlibSurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT
{
pNext = pNext_;
@@ -70925,6 +73617,7 @@ namespace VULKAN_HPP_NAMESPACE
window = window_;
return *this;
}
+# endif /*VULKAN_HPP_NO_STRUCT_SETTERS*/
operator VkXlibSurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT
{
diff --git a/thirdparty/vulkan/patches/VKEnumStringHelper-use-volk.patch b/thirdparty/vulkan/patches/VKEnumStringHelper-use-volk.patch
index 0fd22281d9..9a2267e2b6 100644
--- a/thirdparty/vulkan/patches/VKEnumStringHelper-use-volk.patch
+++ b/thirdparty/vulkan/patches/VKEnumStringHelper-use-volk.patch
@@ -1,5 +1,5 @@
diff --git a/thirdparty/vulkan/vk_enum_string_helper.h b/thirdparty/vulkan/vk_enum_string_helper.h
-index 4c36430341..004a861774 100755
+index 4c36430341..004a861774 100644
--- a/thirdparty/vulkan/vk_enum_string_helper.h
+++ b/thirdparty/vulkan/vk_enum_string_helper.h
@@ -36,7 +36,11 @@
diff --git a/thirdparty/vulkan/patches/VMA-use-volk.patch b/thirdparty/vulkan/patches/VMA-use-volk.patch
index 4ba84c9a60..81bfcccd89 100644
--- a/thirdparty/vulkan/patches/VMA-use-volk.patch
+++ b/thirdparty/vulkan/patches/VMA-use-volk.patch
@@ -1,9 +1,9 @@
diff --git a/thirdparty/vulkan/vk_mem_alloc.h b/thirdparty/vulkan/vk_mem_alloc.h
-index 8a42699e7f..510fa4d3ef 100644
+index 65d6243419..9890f20f7c 100644
--- a/thirdparty/vulkan/vk_mem_alloc.h
+++ b/thirdparty/vulkan/vk_mem_alloc.h
-@@ -1771,7 +1771,11 @@ available through VmaAllocatorCreateInfo::pRecordSettings.
- #endif
+@@ -2063,7 +2063,11 @@ available through VmaAllocatorCreateInfo::pRecordSettings.
+ #endif // #if defined(__ANDROID__) && VMA_STATIC_VULKAN_FUNCTIONS && VK_NO_PROTOTYPES
#ifndef VULKAN_H_
- #include <vulkan/vulkan.h>
@@ -14,4 +14,4 @@ index 8a42699e7f..510fa4d3ef 100644
+ #endif
#endif
- #if VMA_RECORDING_ENABLED
+ // Define this macro to declare maximum supported Vulkan version in format AAABBBCCC,
diff --git a/thirdparty/vulkan/vk_enum_string_helper.h b/thirdparty/vulkan/vk_enum_string_helper.h
index 004a861774..30bdcac16c 100644
--- a/thirdparty/vulkan/vk_enum_string_helper.h
+++ b/thirdparty/vulkan/vk_enum_string_helper.h
@@ -558,6 +558,8 @@ static inline const char* string_VkStructureType(VkStructureType input_value)
return "VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID";
case VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR:
return "VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR";
+ case VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV:
+ return "VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV";
case VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR:
return "VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR";
case VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA:
@@ -674,6 +676,8 @@ static inline const char* string_VkStructureType(VkStructureType input_value)
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2:
@@ -728,6 +732,8 @@ static inline const char* string_VkStructureType(VkStructureType input_value)
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT:
@@ -776,6 +782,12 @@ static inline const char* string_VkStructureType(VkStructureType input_value)
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR";
#endif // VK_ENABLE_BETA_EXTENSIONS
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2:
@@ -816,6 +828,8 @@ static inline const char* string_VkStructureType(VkStructureType input_value)
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES:
@@ -836,6 +850,10 @@ static inline const char* string_VkStructureType(VkStructureType input_value)
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR";
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR:
+ return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL:
return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL";
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV:
@@ -1006,6 +1024,8 @@ static inline const char* string_VkStructureType(VkStructureType input_value)
return "VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV";
case VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP:
return "VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP";
+ case VK_STRUCTURE_TYPE_PRESENT_ID_KHR:
+ return "VK_STRUCTURE_TYPE_PRESENT_ID_KHR";
case VK_STRUCTURE_TYPE_PRESENT_INFO_KHR:
return "VK_STRUCTURE_TYPE_PRESENT_INFO_KHR";
case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR:
@@ -1108,8 +1128,6 @@ static inline const char* string_VkStructureType(VkStructureType input_value)
return "VK_STRUCTURE_TYPE_SUBMIT_INFO";
case VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR:
return "VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR";
- case VK_STRUCTURE_TYPE_SUBPASSS_SHADING_PIPELINE_CREATE_INFO_HUAWEI:
- return "VK_STRUCTURE_TYPE_SUBPASSS_SHADING_PIPELINE_CREATE_INFO_HUAWEI";
case VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO:
return "VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO";
case VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2:
@@ -1120,6 +1138,8 @@ static inline const char* string_VkStructureType(VkStructureType input_value)
return "VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE";
case VK_STRUCTURE_TYPE_SUBPASS_END_INFO:
return "VK_STRUCTURE_TYPE_SUBPASS_END_INFO";
+ case VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI:
+ return "VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI";
case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT:
return "VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT";
case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR:
@@ -1657,6 +1677,17 @@ static inline const char* string_VkObjectType(VkObjectType input_value)
}
}
+static inline const char* string_VkPipelineCacheHeaderVersion(VkPipelineCacheHeaderVersion input_value)
+{
+ switch (input_value)
+ {
+ case VK_PIPELINE_CACHE_HEADER_VERSION_ONE:
+ return "VK_PIPELINE_CACHE_HEADER_VERSION_ONE";
+ default:
+ return "Unhandled VkPipelineCacheHeaderVersion";
+ }
+}
+
static inline const char* string_VkVendorId(VkVendorId input_value)
{
switch (input_value)
@@ -1678,17 +1709,6 @@ static inline const char* string_VkVendorId(VkVendorId input_value)
}
}
-static inline const char* string_VkPipelineCacheHeaderVersion(VkPipelineCacheHeaderVersion input_value)
-{
- switch (input_value)
- {
- case VK_PIPELINE_CACHE_HEADER_VERSION_ONE:
- return "VK_PIPELINE_CACHE_HEADER_VERSION_ONE";
- default:
- return "Unhandled VkPipelineCacheHeaderVersion";
- }
-}
-
static inline const char* string_VkSystemAllocationScope(VkSystemAllocationScope input_value)
{
switch (input_value)
@@ -2455,6 +2475,8 @@ static inline const char* string_VkImageUsageFlagBits(VkImageUsageFlagBits input
return "VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR";
case VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT:
return "VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT";
+ case VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI:
+ return "VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI";
case VK_IMAGE_USAGE_SAMPLED_BIT:
return "VK_IMAGE_USAGE_SAMPLED_BIT";
case VK_IMAGE_USAGE_STORAGE_BIT:
@@ -2559,6 +2581,8 @@ static inline const char* string_VkMemoryPropertyFlagBits(VkMemoryPropertyFlagBi
return "VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT";
case VK_MEMORY_PROPERTY_PROTECTED_BIT:
return "VK_MEMORY_PROPERTY_PROTECTED_BIT";
+ case VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV:
+ return "VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV";
default:
return "Unhandled VkMemoryPropertyFlagBits";
}
@@ -4066,6 +4090,8 @@ static inline const char* string_VkAttachmentLoadOp(VkAttachmentLoadOp input_val
return "VK_ATTACHMENT_LOAD_OP_DONT_CARE";
case VK_ATTACHMENT_LOAD_OP_LOAD:
return "VK_ATTACHMENT_LOAD_OP_LOAD";
+ case VK_ATTACHMENT_LOAD_OP_NONE_EXT:
+ return "VK_ATTACHMENT_LOAD_OP_NONE_EXT";
default:
return "Unhandled VkAttachmentLoadOp";
}
@@ -4077,8 +4103,8 @@ static inline const char* string_VkAttachmentStoreOp(VkAttachmentStoreOp input_v
{
case VK_ATTACHMENT_STORE_OP_DONT_CARE:
return "VK_ATTACHMENT_STORE_OP_DONT_CARE";
- case VK_ATTACHMENT_STORE_OP_NONE_QCOM:
- return "VK_ATTACHMENT_STORE_OP_NONE_QCOM";
+ case VK_ATTACHMENT_STORE_OP_NONE_EXT:
+ return "VK_ATTACHMENT_STORE_OP_NONE_EXT";
case VK_ATTACHMENT_STORE_OP_STORE:
return "VK_ATTACHMENT_STORE_OP_STORE";
default:
@@ -4655,6 +4681,8 @@ static inline const char* string_VkExternalMemoryHandleTypeFlagBits(VkExternalMe
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA";
default:
@@ -4927,6 +4955,8 @@ static inline const char* string_VkDriverId(VkDriverId input_value)
return "VK_DRIVER_ID_NVIDIA_PROPRIETARY";
case VK_DRIVER_ID_QUALCOMM_PROPRIETARY:
return "VK_DRIVER_ID_QUALCOMM_PROPRIETARY";
+ case VK_DRIVER_ID_VERISILICON_PROPRIETARY:
+ return "VK_DRIVER_ID_VERISILICON_PROPRIETARY";
default:
return "Unhandled VkDriverId";
}
@@ -5427,32 +5457,32 @@ static inline std::string string_VkVideoComponentBitDepthFlagsKHR(VkVideoCompone
#ifdef VK_ENABLE_BETA_EXTENSIONS
-static inline const char* string_VkVideoCapabilitiesFlagBitsKHR(VkVideoCapabilitiesFlagBitsKHR input_value)
+static inline const char* string_VkVideoCapabilityFlagBitsKHR(VkVideoCapabilityFlagBitsKHR input_value)
{
switch (input_value)
{
- case VK_VIDEO_CAPABILITIES_PROTECTED_CONTENT_BIT_KHR:
- return "VK_VIDEO_CAPABILITIES_PROTECTED_CONTENT_BIT_KHR";
- case VK_VIDEO_CAPABILITIES_SEPARATE_REFERENCE_IMAGES_BIT_KHR:
- return "VK_VIDEO_CAPABILITIES_SEPARATE_REFERENCE_IMAGES_BIT_KHR";
+ case VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR:
+ return "VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR";
+ case VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR:
+ return "VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR";
default:
- return "Unhandled VkVideoCapabilitiesFlagBitsKHR";
+ return "Unhandled VkVideoCapabilityFlagBitsKHR";
}
}
-static inline std::string string_VkVideoCapabilitiesFlagsKHR(VkVideoCapabilitiesFlagsKHR input_value)
+static inline std::string string_VkVideoCapabilityFlagsKHR(VkVideoCapabilityFlagsKHR input_value)
{
std::string ret;
int index = 0;
while(input_value) {
if (input_value & 1) {
if( !ret.empty()) ret.append("|");
- ret.append(string_VkVideoCapabilitiesFlagBitsKHR(static_cast<VkVideoCapabilitiesFlagBitsKHR>(1U << index)));
+ ret.append(string_VkVideoCapabilityFlagBitsKHR(static_cast<VkVideoCapabilityFlagBitsKHR>(1U << index)));
}
++index;
input_value >>= 1;
}
- if( ret.empty()) ret.append(string_VkVideoCapabilitiesFlagBitsKHR(static_cast<VkVideoCapabilitiesFlagBitsKHR>(0)));
+ if( ret.empty()) ret.append(string_VkVideoCapabilityFlagBitsKHR(static_cast<VkVideoCapabilityFlagBitsKHR>(0)));
return ret;
}
#endif // VK_ENABLE_BETA_EXTENSIONS
@@ -5702,6 +5732,8 @@ static inline const char* string_VkExternalMemoryHandleTypeFlagBitsKHR(VkExterna
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT";
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV:
+ return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV";
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA:
return "VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA";
default:
@@ -6154,6 +6186,8 @@ static inline const char* string_VkDriverIdKHR(VkDriverIdKHR input_value)
return "VK_DRIVER_ID_NVIDIA_PROPRIETARY";
case VK_DRIVER_ID_QUALCOMM_PROPRIETARY:
return "VK_DRIVER_ID_QUALCOMM_PROPRIETARY";
+ case VK_DRIVER_ID_VERISILICON_PROPRIETARY:
+ return "VK_DRIVER_ID_VERISILICON_PROPRIETARY";
default:
return "Unhandled VkDriverIdKHR";
}
@@ -6430,6 +6464,8 @@ static inline const char* string_VkPipelineStageFlagBits2KHR(uint64_t input_valu
return "VK_PIPELINE_STAGE_2_HOST_BIT_KHR";
case VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR:
return "VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR";
+ case VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI:
+ return "VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI";
case VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR:
return "VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR";
case VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV:
@@ -6527,6 +6563,8 @@ static inline const char* string_VkAccessFlagBits2KHR(uint64_t input_value)
return "VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR";
case VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR:
return "VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR";
+ case VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI:
+ return "VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI";
case VK_ACCESS_2_MEMORY_READ_BIT_KHR:
return "VK_ACCESS_2_MEMORY_READ_BIT_KHR";
case VK_ACCESS_2_MEMORY_WRITE_BIT_KHR:
@@ -6757,7 +6795,7 @@ static inline const char* string_VkRasterizationOrderAMD(VkRasterizationOrderAMD
#ifdef VK_ENABLE_BETA_EXTENSIONS
-static inline const char* string_VkVideoEncodeH264CapabilitiesFlagBitsEXT(VkVideoEncodeH264CapabilitiesFlagBitsEXT input_value)
+static inline const char* string_VkVideoEncodeH264CapabilityFlagBitsEXT(VkVideoEncodeH264CapabilityFlagBitsEXT input_value)
{
switch (input_value)
{
@@ -6784,23 +6822,23 @@ static inline const char* string_VkVideoEncodeH264CapabilitiesFlagBitsEXT(VkVide
case VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BI_PRED_IMPLICIT_BIT_EXT:
return "VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BI_PRED_IMPLICIT_BIT_EXT";
default:
- return "Unhandled VkVideoEncodeH264CapabilitiesFlagBitsEXT";
+ return "Unhandled VkVideoEncodeH264CapabilityFlagBitsEXT";
}
}
-static inline std::string string_VkVideoEncodeH264CapabilitiesFlagsEXT(VkVideoEncodeH264CapabilitiesFlagsEXT input_value)
+static inline std::string string_VkVideoEncodeH264CapabilityFlagsEXT(VkVideoEncodeH264CapabilityFlagsEXT input_value)
{
std::string ret;
int index = 0;
while(input_value) {
if (input_value & 1) {
if( !ret.empty()) ret.append("|");
- ret.append(string_VkVideoEncodeH264CapabilitiesFlagBitsEXT(static_cast<VkVideoEncodeH264CapabilitiesFlagBitsEXT>(1U << index)));
+ ret.append(string_VkVideoEncodeH264CapabilityFlagBitsEXT(static_cast<VkVideoEncodeH264CapabilityFlagBitsEXT>(1U << index)));
}
++index;
input_value >>= 1;
}
- if( ret.empty()) ret.append(string_VkVideoEncodeH264CapabilitiesFlagBitsEXT(static_cast<VkVideoEncodeH264CapabilitiesFlagBitsEXT>(0)));
+ if( ret.empty()) ret.append(string_VkVideoEncodeH264CapabilityFlagBitsEXT(static_cast<VkVideoEncodeH264CapabilityFlagBitsEXT>(0)));
return ret;
}
#endif // VK_ENABLE_BETA_EXTENSIONS
@@ -6911,34 +6949,34 @@ static inline std::string string_VkVideoEncodeH264CreateFlagsEXT(VkVideoEncodeH2
#ifdef VK_ENABLE_BETA_EXTENSIONS
-static inline const char* string_VkVideoDecodeH264FieldLayoutFlagBitsEXT(VkVideoDecodeH264FieldLayoutFlagBitsEXT input_value)
+static inline const char* string_VkVideoDecodeH264PictureLayoutFlagBitsEXT(VkVideoDecodeH264PictureLayoutFlagBitsEXT input_value)
{
switch (input_value)
{
- case VK_VIDEO_DECODE_H264_FIELD_LAYOUT_LINE_INTERLACED_PLANE_BIT_EXT:
- return "VK_VIDEO_DECODE_H264_FIELD_LAYOUT_LINE_INTERLACED_PLANE_BIT_EXT";
- case VK_VIDEO_DECODE_H264_FIELD_LAYOUT_SEPARATE_INTERLACED_PLANE_BIT_EXT:
- return "VK_VIDEO_DECODE_H264_FIELD_LAYOUT_SEPARATE_INTERLACED_PLANE_BIT_EXT";
- case VK_VIDEO_DECODE_H264_PROGRESSIVE_PICTURES_ONLY_EXT:
- return "VK_VIDEO_DECODE_H264_PROGRESSIVE_PICTURES_ONLY_EXT";
+ case VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_EXT:
+ return "VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_EXT";
+ case VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_EXT:
+ return "VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_EXT";
+ case VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_EXT:
+ return "VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_EXT";
default:
- return "Unhandled VkVideoDecodeH264FieldLayoutFlagBitsEXT";
+ return "Unhandled VkVideoDecodeH264PictureLayoutFlagBitsEXT";
}
}
-static inline std::string string_VkVideoDecodeH264FieldLayoutFlagsEXT(VkVideoDecodeH264FieldLayoutFlagsEXT input_value)
+static inline std::string string_VkVideoDecodeH264PictureLayoutFlagsEXT(VkVideoDecodeH264PictureLayoutFlagsEXT input_value)
{
std::string ret;
int index = 0;
while(input_value) {
if (input_value & 1) {
if( !ret.empty()) ret.append("|");
- ret.append(string_VkVideoDecodeH264FieldLayoutFlagBitsEXT(static_cast<VkVideoDecodeH264FieldLayoutFlagBitsEXT>(1U << index)));
+ ret.append(string_VkVideoDecodeH264PictureLayoutFlagBitsEXT(static_cast<VkVideoDecodeH264PictureLayoutFlagBitsEXT>(1U << index)));
}
++index;
input_value >>= 1;
}
- if( ret.empty()) ret.append(string_VkVideoDecodeH264FieldLayoutFlagBitsEXT(static_cast<VkVideoDecodeH264FieldLayoutFlagBitsEXT>(0)));
+ if( ret.empty()) ret.append(string_VkVideoDecodeH264PictureLayoutFlagBitsEXT(static_cast<VkVideoDecodeH264PictureLayoutFlagBitsEXT>(0)));
return ret;
}
#endif // VK_ENABLE_BETA_EXTENSIONS
@@ -7542,8 +7580,8 @@ static inline const char* string_VkGeometryInstanceFlagBitsKHR(VkGeometryInstanc
return "VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR";
case VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR:
return "VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR";
- case VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR:
- return "VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR";
+ case VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR:
+ return "VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR";
default:
return "Unhandled VkGeometryInstanceFlagBitsKHR";
}
@@ -7575,8 +7613,8 @@ static inline const char* string_VkGeometryInstanceFlagBitsNV(VkGeometryInstance
return "VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR";
case VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR:
return "VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR";
- case VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR:
- return "VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR";
+ case VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR:
+ return "VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR";
default:
return "Unhandled VkGeometryInstanceFlagBitsNV";
}